123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- /*!
- * filename: ej2-base.min.js
- * version : 19.2.44
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.base=function(e){"use strict";function t(){tt=!1}function r(e,t){var r=t;return r.unshift(void 0),new(Function.prototype.bind.apply(e,r))}function n(e){var t,r=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(r);var n="ej2"+C(r),i=function(r){r.source===window&&"string"==typeof r.data&&r.data.length<=32&&r.data===n&&(e(),t())};return window.addEventListener("message",i,!1),window.postMessage(n,"*"),t=function(){window.removeEventListener("message",i),e=i=n=void 0}}function i(e,t){for(var r=t,n=e.replace(/\[/g,".").replace(/\]/g,"").split("."),i=0;i<n.length&&!h(r);i++)r=r[n[i]];return r}function o(e,t,r){var n,i,o=e.replace(/\[/g,".").replace(/\]/g,"").split("."),a=r||{},s=a,l=o.length;for(n=0;n<l;n++)i=o[n],n+1===l?s[i]=void 0===t?{}:t:p(s[i])&&(s[i]={}),s=s[i];return a}function a(e,t){delete e[t]}function s(e){var t={};return!p(e)&&e.constructor===t.constructor}function l(e,t){return e[t]}function c(e,t){if(!p(t))for(var r=e,n=t,i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];p(r.deepMerge)||-1===r.deepMerge.indexOf(a)||!s(n[a])&&!Array.isArray(n[a])?r[a]=n[a]:u(r[a],r[a],n[a],!0)}}function u(e,t,r,n){var i=e&&"object"==typeof e?e:{},o=arguments.length;n&&(o-=1);for(var a=arguments,l=1;l<o;l++)!function(e){if(!a[e])return"continue";var t=a[e];Object.keys(t).forEach(function(e){var r,o=i[e],a=t[e],l=Array.isArray(a)&&Array.isArray(o)&&a.length!==o.length,c=!w()||!(o instanceof Event||l);n&&c&&(s(a)||Array.isArray(a))?s(a)?(r=o||{},Array.isArray(r)&&r.hasOwnProperty("isComplexArray")?u(r,{},a,n):i[e]=u(r,{},a,n)):(r=w()?o&&Object.keys(a).length:o||[],i[e]=u([],r,a,n)):i[e]=a})}(l);return i}function p(e){return void 0===e||null===e}function h(e){return void 0===e}function d(e){return e+"_"+et++}function m(e,t){var r;return function(){var n=this,i=arguments,o=function(){return r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function f(e){for(var t=[],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];t.push(encodeURIComponent(i)+"="+encodeURIComponent(""+e[i]))}return t.join("&")}function g(e){var t=Object.prototype.toString;return"[object Array]"===t.call(e)&&"[object Object]"===t.call(e[0])}function v(e,t){var r=e;return r===t||!(r===document||!r)&&v(r.parentNode,t)}function y(e){try{throw new Error(e)}catch(e){throw e.message+"\n"+e.stack}}function b(e,t){var r=document.createElement("div"),n=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("base, link, style")),i=[].slice.call(document.getElementsByTagName("body")[0].querySelectorAll("link, style"));if(i.length)for(var o=0,a=i.length;o<a;o++)n.push(i[o]);var s="";p(t)&&(t=window.open("","print","height=452,width=1024,tabbar=no")),r.appendChild(e.cloneNode(!0));for(var l=0,a=n.length;l<a;l++)s+=n[l].outerHTML;t.document.write("<!DOCTYPE html> <html><head>"+s+"</head><body>"+r.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),t.document.close(),t.focus();var c=setInterval(function(){t.ready&&(t.print(),t.close(),clearInterval(c))},500);return t}function M(e){var t=e+"";return t.match(/auto|%|px|vh|vm|vmax|vmin|em/)?t:t+"px"}function D(){tt=!0}function w(){return tt}function E(e){return e instanceof Node||!w()||p(e.xPath)?e:document.evaluate(e.xPath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}function P(e,t){var r="string"==typeof e?document.querySelector(e):e;if(r[Qe])for(var n=0,i=r[Qe];n<i.length;n++){var o=i[n];if(o instanceof t)return o}return null}function S(e,t){var r="string"==typeof e?document.querySelector(e):e;r[Qe]?r[Qe].push(t):r[Qe]=[t]}function O(){if("undefined"!=typeof window){var e=new Uint16Array(5);return(window.msCrypto||window.crypto).getRandomValues(e)}}function C(e){for(var t="",r=0;r<5;r++)t+=(r?",":"")+e[r];return t}function T(e){return i(e||"",at)}function j(t){e.defaultCulture=t,Mt.notify("notifyExternalChange",{locale:e.defaultCulture})}function x(t){e.defaultCurrencyCode=t,Mt.notify("notifyExternalChange",{currencyCode:e.defaultCurrencyCode})}function N(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];u(Dt,i,{},!0)}}function F(t){void 0===t&&(t=!0),e.rightToLeft=t,Mt.notify("notifyExternalChange",{enableRtl:e.rightToLeft})}function A(t,r){var n=e.IntlBase.getDependables(Dt,t,"",!0)[wt[0]],o=e.IntlBase.getDependables(Dt,t,"")[wt[1]],a=i("defaultNumberingSystem",n),s=w()?i("numberSymbols",n):i("symbols-numberSystem-"+a,n),l=e.IntlBase.getSymbolPattern(r||"decimal",a,n,!1);return u(s,e.IntlBase.getFormatData(l,!0,"",!0),{dateSeparator:e.IntlBase.getDateSeparator(o)})}function R(t,r){var n=e.IntlBase.getDependables(Dt,t,"",!0);return e.IntlBase.getCurrencySymbol(n.numericObject,r)}function I(t){return e.IntlBase.getDependables(Dt,"",t,!1)[wt[1]]}function H(e,t,r){var n='var str="'+L(e,"data",t,r)+'"; return str;';return new Function("data",n).bind(t)}function L(e,t,r,n){var i=0,o=[],a=e.match(/class="([^\"]+|)\s{2}/g),s="";return a&&a.forEach(function(t){s=t.replace(/\s\s+/g," "),e=e.replace(t,s)}),e.replace(Ft,"").replace(Yt,"'$1'").replace(Xt,function(e,a,s,l){var c=/\@|\#|\$/gm,u=a.match(Bt);if(u){var p=u[1];if(It.test(a))a='";} '+a.replace(u[1],p.replace(zt,function(e){return e=e.trim(),k(e,!At.test(e)&&-1===o.indexOf(e),t,o,n)}))+'{ \n str = str + "';else if(Rt.test(a))a='"; '+a.replace(u[1],p.replace(_t,function(e){return Y(e,t,o,n)}))+'{ \n str = str + "';else if(Lt.test(a)){var h=u[1].split(" of ");a='"; '+a.replace(u[1],function(e){return o.push(h[0]),o.push(h[0]+"Index"),"var i"+(i+=1)+"=0; i"+i+" < "+k(h[1],!0,t,o,n)+".length; i"+i+"++"})+"{ \n "+h[0]+"= "+k(h[1],!0,t,o,n)+"[i"+i+"]; \n var "+h[0]+"Index=i"+i+'; \n str = str + "'}else{var d=a.split("("),m=r&&r.hasOwnProperty(d[0])?"this.":"global";m=/\./.test(d[0])?"":m;var f=u[1].split(",");0===u[1].length||/data/.test(f[0])||/window./.test(f[0])||(u[1]="global"===m?t+"."+u[1]:u[1]);var g=/\@|\$|\#/gm,v=/\]\./gm;Kt.test(a)&&v.test(a)||g.test(a)?/\@|\$|\#|\]\./gm.test(a)&&(a='"+ '+("global"===m?"":m)+a.replace(u[1],p.replace(Ut,function(e){return Y(e,t,o,n)}))+'+ "'):a='" + '+("global"===m?"":m)+a.replace(p,k(u[1].replace(/,( |)data.|,/gi,","+t+".").replace(/,( |)data.window/gi,",window"),"global"!==m,t,o,n))+'+"'}}else Ht.test(a)?a='"; '+a.replace(Ht,'} else { \n str = str + "'):a.match(kt)?a=a.replace(kt,'"; \n } \n str = str + "'):c.test(a)?(a.match($t)&&(a=z(a)),a='"+'+G(a,-1===o.indexOf(a),t,o)+'"]+"'):a=a.match($t)?'"+'+G(a=z(a),-1===o.indexOf(a),t,o)+'"]+"':'"+'+k(a.replace(/\,/gi,"+"+t+"."),-1===o.indexOf(a),t,o,n)+'+"';return a})}function k(e,t,r,n,i){return!t||Gt.test(e)||-1!==n.indexOf(e.split(".")[0])||i?e:r+"."+e}function B(e,t,r,n){var i=/^\..*/gm;return!t||Gt.test(e)||-1!==n.indexOf(e.split(".")[0])||i.test(e)?e:r+"."+e}function G(e,t,r,n){return t&&!Gt.test(e)&&-1===n.indexOf(e.split(".")[0])?r+'["'+e:e}function z(e){return e=e.match(Vt)?e:e.replace($t,"\\\\")}function Y(e,t,r,n){if(e=e.trim(),/\window\./gm.test(e))return e;var i=/'|"/gm;return/\@|\$|\#/gm.test(e)&&(e=G(e,-1===r.indexOf(e),t,r)+'"]'),Wt.test(e)?B(e,!i.test(e)&&-1===r.indexOf(e),t,r):k(e,!i.test(e)&&-1===r.indexOf(e),t,r,n)}function _(){return"-"+Math.random().toString(36).substr(2,5)}function X(e,t,r){var n=Qt.compile(e,t,r);return function(e,t,r,i,o,a,s){var l=n(e,t,r,s);if(w()&&!o){var c=i+_();if(Jt[i]||(Jt[i]=[]),p(a))e.BlazorTemplateId=c,Jt[i].push(e);else for(var u=0,h=Object.keys(Jt[i][a]);u<h.length;u++){var d=h[u];"BlazorTemplateId"!==d&&e[d]&&(Jt[i][a][d]=e[d]),"BlazorTemplateId"===d&&(c=Jt[i][a][d])}return"rowTemplate"===r?[K("tr",{id:c,className:"e-blazor-template"})]:[K("div",{id:c,className:"e-blazor-template"})]}if("string"==typeof l){if(Zt.test(l))return(m=K("svg",{innerHTML:l})).childNodes;var m=K(qt.test(l)?"table":"div",{innerHTML:l});return m.childNodes}return l}}function W(e,t,r,n,i){if(w()){window.sfBlazor.updateTemplate(t,Jt[e],e,r,i),!1!==n&&(Jt[e]=[])}}function $(e,t,r){var n=document.getElementById(e);if(n)for(var i=n.getElementsByClassName("blazor-inner-template"),o=0;o<i.length;o++){var a=" ";a=p(r)?i[o].getAttribute("data-templateId"):i[r].getAttribute("data-templateId");var s=document.getElementById(a);if(s)for(var l=s.childNodes.length,c=0;c<l;c++)p(r)?i[o].appendChild(s.childNodes[0]):(i[r].appendChild(s.childNodes[0]),o=i.length)}}function V(e){Qt.compile=e.compile}function U(){return Qt.compile}function K(e,t){var r=gr.test(e)?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return void 0===t?r:(r.innerHTML=t.innerHTML?t.innerHTML:"",void 0!==t.className&&(r.className=t.className),void 0!==t.id&&(r.id=t.id),void 0!==t.styles&&r.setAttribute("style",t.styles),void 0!==t.attrs&&oe(r,t.attrs),r)}function q(e,t){for(var r=J(t),n=0,a=e;n<a.length;n++)for(var l=a[n],c=0,u=r;c<u.length;c++){var h=u[c];if(s(l)){var d=i("attributes.className",l);p(d)?o("attributes.className",h,l):new RegExp("\\b"+h+"\\b","i").test(d)||o("attributes.className",d+" "+h,l)}else l.classList.contains(h)||l.classList.add(h)}return e}function Z(e,t){for(var r=J(t),n=0,a=e;n<a.length;n++){var l=a[n],c=s(l);if(c?i("attributes.className",l):""!==l.className)for(var u=0,p=r;u<p.length;u++){var h=p[u];if(c){var d=i("attributes.className",l).split(" "),m=d.indexOf(h);-1!==m&&d.splice(m,1),o("attributes.className",d.join(" "),l)}else l.classList.remove(h)}}return e}function J(e){var t=[];return"string"==typeof e?t.push(e):t=e,t}function Q(e){var t=e;return""===t.style.visibility&&t.offsetWidth>0}function ee(e,t,r){if(s(t))jt.prepend(e,t);else{for(var n=document.createDocumentFragment(),i=0,o=e;i<o.length;i++){var a=o[i];n.appendChild(a)}t.insertBefore(n,t.firstElementChild),r&&re(t)}return e}function te(e,t,r){if(s(t))jt.append(e,t);else{for(var n=document.createDocumentFragment(),i=0,o=e;i<o.length;i++){var a=o[i];n.appendChild(a)}t.appendChild(n),r&&re(t)}return e}function re(e){e.querySelectorAll("script").forEach(function(e){var t=document.createElement("script");t.text=e.innerHTML,document.head.appendChild(t),ne(t)})}function ne(e){if(s(e))return jt.detach(e);var t=e.parentNode;return t?t.removeChild(e):void 0}function ie(e){if(s(e))jt.detach(e);else{var t=e.parentNode;Nt.clearEvents(e),t.removeChild(e)}}function oe(e,t){for(var r=e,n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];if(s(r)){var a=o;"tabindex"===o&&(a="tabIndex"),r.attributes[a]=t[o]}else r.setAttribute(o,t[o])}return r}function ae(e,t,r){return void 0===t&&(t=document),s(t)&&r?jt.vDomSelector({ele:t,selector:e,selectAll:!1}):(e=le(e),t.querySelector(e))}function se(e,t,r){return void 0===t&&(t=document),s(t)&&!r?jt.vDomSelector({ele:t,selector:e,selectAll:!0}):(e=le(e),t.querySelectorAll(e))}function le(e){var t=/(!|"|\$|%|&|'|\(|\)|\*|\/|:|;|<|=|\?|@|\]|\^|`|{|}|\||\+|~)/g;if(e.match(/#[0-9]/g)||e.match(t)){for(var r=e.split(","),n=0;n<r.length;n++){for(var i=r[n].split(" "),o=0;o<i.length;o++)if(i[o].indexOf("#")>-1&&!i[o].match(/\[.*\]/)){var a=i[o].split("#");if(a[1].match(/^\d/)||a[1].match(t)){var s=i[o].split(".");s[0]=s[0].replace(/#/,"[id='")+"']",i[o]=s.join(".")}}r[n]=i.join(" ")}return r.join(",")}return e}function ce(e,t){var r=e;if("function"==typeof r.closest)return r.closest(t);for(;r&&1===r.nodeType;){if(me(r,t))return r;r=r.parentNode}return null}function ue(e){for(var t=[],r=0,n=Array.prototype.slice.call(e.parentNode.childNodes);r<n.length;r++){var i=n[r];i.nodeType===Node.ELEMENT_NODE&&e!==i&&t.push(i)}return t}function pe(e,t,r){var n,o=s(e);return n=o?i("attributes."+t,e):e.getAttribute(t),p(n)&&r&&(o?e.attributes[t]=r:e.setAttribute(t,r.toString()),n=r),n}function he(e,t){void 0!==t&&(s(e)?jt.setStyleAttribute(e,t):Object.keys(t).forEach(function(r){e.style[r]=t[r]}))}function de(e,t,r){q([e],t),Z([e],r)}function me(e,t){var r=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return r?r.call(e,t):-1!==[].indexOf.call(document.querySelectorAll(t),e)}function fe(e,t){if(s(e))if(""===t)e.children=[];else{var r=jt.ConvertHTMLToJSon(t);r.length&&(jt.assignParent(r,e),e.children=r)}else e.innerHTML=t}function ge(e,t){return s(e)?new RegExp("\\b"+t+"\\b","i").test(e.attributes.className):e.classList.contains(t)}function ve(e,t){return s(e)?t?u({},{},e,!0):{tagName:e.tagName,attributes:e.attributes}:e.cloneNode(t)}function ye(e,t){var r,n,i="string"==typeof e?document.getElementById(e):e;for(n=0;n<i.ej2_instances.length;n++)if(r=i.ej2_instances[n],"string"==typeof t){if(t===r.getModuleName())return r}else if(r instanceof t)return r}function be(e){for(var t=[].slice.call(e.getElementsByClassName("e-control")),r=0;r<t.length;r++){var n=t[r].classList[1].split("e-")[1],i=ye(t[r],n);h(i)||i.destroy()}}function Me(e,t,n,i){return e.properties.hasOwnProperty(t)&&e.properties[t]instanceof i||(e.properties[t]=r(i,[e,t,n])),e.properties[t]}function De(e,t,n,i,o,a){for(var s=[],l=n?n.length:0,c=0;c<l;c++){var u=i;if(a&&(u=i(n[c],e)),o){var p=r(u,[e,t,{},!0]);p.setProperties(n[c],!0),s.push(p)}else s.push(r(u,[e,t,n[c],!1]))}return s}function we(e,t){return function(){return this.properties.hasOwnProperty(t)||(this.properties[t]=e),this.properties[t]}}function Ee(e,t){return function(r){if(this.properties[t]!==r){var n=this.properties.hasOwnProperty(t)?this.properties[t]:e;this.saveChanges(t,r,n),this.properties[t]=r}}}function Pe(e,t,r){return function(){return Me(this,t,e,r)}}function Se(e,t,r){return function(n){Me(this,t,e,r).setProperties(n)}}function Oe(e,t,r){return function(){var n=r({});return this.properties.hasOwnProperty(t)?this.properties[t]:Me(this,t,e,n)}}function Ce(e,t,r){return function(n){var i=r(n,this);Me(this,t,e,i).setProperties(n)}}function Te(e,t,r){return function(){var n=this;if(!this.properties.hasOwnProperty(t)){var i=De(this,t,e,r,!1);this.properties[t]=i}var o=void 0!==this.controlParent&&this.controlParent.ignoreCollectionWatch||this.ignoreCollectionWatch;return this.properties[t].hasOwnProperty("push")||o||["push","pop"].forEach(function(e){var i={value:Fe(e,t,r,n.properties[t]).bind(n),configurable:!0};Object.defineProperty(n.properties[t],e,i)}),this.properties[t].hasOwnProperty("isComplexArray")||Object.defineProperty(this.properties[t],"isComplexArray",{value:!0}),this.properties[t]}}function je(e,t,r){return function(n){this.isComplexArraySetter=!0;var i=De(this,t,e,r,!1),o=De(this,t,n,r,!0);this.isComplexArraySetter=!1,this.saveChanges(t,o,i),this.properties[t]=o}}function xe(e,t,r){return function(n){var i=this.properties.hasOwnProperty(t)?this.properties[t]:e,o=De(this,t,n,r,!0,!0);this.saveChanges(t,o,i),this.properties[t]=o}}function Ne(e,t,r){return function(){var n=r({});if(!this.properties.hasOwnProperty(t)){var i=De(this,t,e,n,!1);this.properties[t]=i}return this.properties[t]}}function Fe(e,t,r,n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=this.propName?this.getParentKey()+"."+t+"-":t+"-";switch(e){case"push":for(var a=0;a<r.length;a++){Array.prototype[e].apply(n,[r[a]]);var s=Ae(o+(n.length-1),r[a],!this.controlParent,e);this.serverDataBind(s,r[a],!1,e)}break;case"pop":Array.prototype[e].apply(n);var l=Ae(o+n.length,null,!this.controlParent,e);this.serverDataBind(l,{ejsAction:"pop"},!1,e)}return n}}function Ae(e,t,r,n){var i=e;if(r&&(i={},i[e]=t,t&&"object"==typeof t)){i[e].ejsAction=n}return i}function Re(e){return function(t,r){var n={set:Ee(e,r),get:we(e,r),enumerable:!0,configurable:!0};Object.defineProperty(t,r,n),ze(t,r,"prop",e)}}function Ie(e,t){return function(r,n){var i={set:Se(e,n,t),get:Pe(e,n,t),enumerable:!0,configurable:!0};Object.defineProperty(r,n,i),ze(r,n,"complexProp",e,t)}}function He(e){return function(t,r){var n={set:Ce({},r,e),get:Oe({},r,e),enumerable:!0,configurable:!0};Object.defineProperty(t,r,n),ze(t,r,"complexProp",{},e)}}function Le(e,t){return function(r,n){var i={set:je(e,n,t),get:Te(e,n,t),enumerable:!0,configurable:!0};Object.defineProperty(r,n,i),ze(r,n,"colProp",e,t)}}function ke(e){return function(t,r){var n={set:xe([],r,e),get:Ne([],r,e),enumerable:!0,configurable:!0};Object.defineProperty(t,r,n),ze(t,r,"colProp",{},e)}}function Be(){return function(e,t){var r={set:function(e){var r=this.properties[t];if(r!==e){var n=Xe(this,t);!1===h(r)&&n.context.removeEventListener(n.prefix,r),n.context.addEventListener(n.prefix,e),this.properties[t]=e}},get:we(void 0,t),enumerable:!0,configurable:!0};Object.defineProperty(e,t,r),ze(e,t,"event")}}function Ge(e){}function ze(e,t,r,n,i){h(e.propList)&&(e.propList={props:[],complexProps:[],colProps:[],events:[],propNames:[],complexPropNames:[],colPropNames:[],eventNames:[]}),e.propList[r+"s"].push({propertyName:t,defaultValue:n,type:i}),e.propList[r+"Names"].push(t)}function Ye(e){if(h(e.prototype.builderObject)){e.prototype.builderObject={properties:{},propCollections:[],add:function(){this.isPropertyArray=!0,this.propCollections.push(u({},this.properties,{}))}};for(var t=/complex/,r=0,n=Object.keys(e.prototype.propList);r<n.length;r++)for(var i=n[r],o=0,a=e.prototype.propList[i];o<a.length;o++)!function(r){t.test(i)?e.prototype.builderObject[r.propertyName]=function(e){var t={};c(t,Ye(r.type)),e(t);var n;return n=t.isPropertyArray?t.propCollections:u({},t.properties,{}),this.properties[r.propertyName]=n,t.properties={},t.propCollections=[],t.isPropertyArray=!1,this}:e.prototype.builderObject[r.propertyName]=function(e){return this.properties[r.propertyName]=e,this}}(a[o])}return e.prototype.builderObject}function _e(e){var t=function(e){return this.element=e,this};return function(r){return t.prototype.hasOwnProperty("create")||((t.prototype=Ye(e)).create=function(){var t=u({},{},this.properties);return this.properties={},new e(t,this.element)}),new t(r)}}function Xe(e,t){if(!1===e.hasOwnProperty("parentObj"))return{context:e,prefix:t};var r=i("propName",e);return r&&(t=r+"-"+t),Xe(i("parentObj",e),t)}function We(t,r,n){var i=$e(r);return!1===i.rippleFlag||void 0===i.rippleFlag&&!e.isRippleEnabled?Function:(t.setAttribute("data-ripple","true"),Nt.add(t,"mousedown",Ve,{parent:t,rippleOptions:i}),Nt.add(t,"mouseup",Ue,{parent:t,rippleOptions:i,done:n}),Nt.add(t,"mouseleave",Ke,{parent:t,rippleOptions:i}),xt.isPointer&&Nt.add(t,"transitionend",Ke,{parent:t,rippleOptions:i}),function(){t.removeAttribute("data-ripple"),Nt.remove(t,"mousedown",Ve),Nt.remove(t,"mouseup",Ue),Nt.remove(t,"mouseleave",Ke),Nt.remove(t,"transitionend",Ke)})}function $e(e){return{selector:e&&e.selector?e.selector:null,ignore:e&&e.ignore?e.ignore:null,rippleFlag:e&&e.rippleFlag,isCenterRipple:e&&e.isCenterRipple,duration:e&&e.duration?e.duration:350}}function Ve(e){var t=e.target,r=this.rippleOptions.selector,n=r?ce(t,r):t;if(!(!n||this.rippleOptions&&ce(t,this.rippleOptions.ignore))){var i=n.getBoundingClientRect(),o=e.pageX-document.body.scrollLeft,a=e.pageY-(!document.body.scrollTop&&document.documentElement?document.documentElement.scrollTop:document.body.scrollTop),s=Math.max(Math.abs(o-i.left),Math.abs(o-i.right)),l=Math.max(Math.abs(a-i.top),Math.abs(a-i.bottom)),c=Math.sqrt(s*s+l*l),u=2*c+"px",p=o-i.left-c,h=a-i.top-c;this.rippleOptions&&this.rippleOptions.isCenterRipple&&(p=0,h=0,u="100%"),n.classList.add("e-ripple");var d=K("div",{className:"e-ripple-element",styles:"width: "+u+";height: "+u+";left: "+p+"px;top: "+h+"px;transition-duration: "+this.rippleOptions.duration.toString()+"ms;"});n.appendChild(d),window.getComputedStyle(d).getPropertyValue("opacity"),d.style.transform="scale(1)",n!==this.parent&&Nt.add(n,"mouseleave",Ke,{parent:this.parent,rippleOptions:this.rippleOptions})}}function Ue(e){qe(e,this)}function Ke(e){qe(e,this)}function qe(e,t){var r=t.rippleOptions.duration,n=e.target,i=t.rippleOptions.selector,o=i?ce(n,i):n;if(o&&(!o||-1!==o.className.indexOf("e-ripple"))){var a=se(".e-ripple-element",o),s=a[a.length-1];s&&(s.style.opacity="0.5"),t.parent!==o&&Nt.remove(o,"mouseleave",Ke),setTimeout(function(){s&&s.parentNode&&s.parentNode.removeChild(s),o.getElementsByClassName("e-ripple-element").length||o.classList.remove("e-ripple"),t.done&&t.done(e)},r)}}function Ze(t){return e.isRippleEnabled=t,e.isRippleEnabled}function Je(t){e.versionBasedStatePersistence=t}var Qe="ej2_instances",et=0,tt=!1,rt={latn:{_digits:"0123456789",_type:"numeric"}},nt={decimal:".",group:",",percentSign:"%",plusSign:"+",minusSign:"-",infinity:"∞",nan:"NaN",exponential:"E"},it=[0,1,2,3,4,5,6,7,8,9],ot=function(){function e(){}return e.getMainObject=function(e,t){return i(w()?t:"main."+t,e)},e.getNumberingSystem=function(e){return i("supplemental.numberingSystems",e)||this.numberingSystems},e.reverseObject=function(e,t){for(var r={},n=0,i=t||Object.keys(e);n<i.length;n++){var o=i[n];r.hasOwnProperty(e[o])||(r[e[o]]=o)}return r},e.getSymbolRegex=function(e){var t=e.map(function(e){return e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}).join("|");return new RegExp(t,"g")},e.getSymbolMatch=function(e){for(var t={},r=0,n=Object.keys(nt);r<n.length;r++){var i=n[r];t[e[i]]=nt[i]}return t},e.constructRegex=function(e){for(var t=e.length,r="",n=0;n<t;n++)r+=n!==t-1?e[n]+"|":e[n];return r},e.convertValueParts=function(e,t,r){return e.replace(t,function(e){return r[e]})},e.getDefaultNumberingSystem=function(e){var t={};return t.obj=i("numbers",e),t.nSystem=i("defaultNumberingSystem",t.obj),t},e.getCurrentNumericOptions=function(e,t,r,n){var o={},a=this.getDefaultNumberingSystem(e);if(!h(a.nSystem)||n){var s=n?i("obj.mapperDigits",a):i(a.nSystem+"._digits",t);h(s)||(o.numericPair=this.reverseObject(s,it),o.numberParseRegex=new RegExp(this.constructRegex(s),"g"),o.numericRegex="["+s[0]+"-"+s[9]+"]",r&&(o.numericRegex=s[0]+"-"+s[9],o.symbolNumberSystem=i(n?"numberSymbols":"symbols-numberSystem-"+a.nSystem,a.obj),o.symbolMatch=this.getSymbolMatch(o.symbolNumberSystem),o.numberSystem=a.nSystem))}return o},e.getNumberMapper=function(e,t,r){var n={mapper:{}},o=this.getDefaultNumberingSystem(e);if(!h(o.nSystem)){n.numberSystem=o.nSystem,n.numberSymbols=i("symbols-numberSystem-"+o.nSystem,o.obj),n.timeSeparator=i("timeSeparator",n.numberSymbols);var a=i(o.nSystem+"._digits",t);if(!h(a))for(var s=0,l=it;s<l.length;s++){var c=l[s];n.mapper[c]=a[c]}}return n},e.nPair="numericPair",e.nRegex="numericRegex",e.numberingSystems=rt,e}(),at={DJF:"Fdj",ERN:"Nfk",ETB:"Br",NAD:"$",ZAR:"R",XAF:"FCFA",GHS:"GH₵",XDR:"XDR",AED:"د.إ.",BHD:"د.ب.",DZD:"د.ج.",EGP:"ج.م.",ILS:"₪",IQD:"د.ع.",JOD:"د.ا.",KMF:"CF",KWD:"د.ك.",LBP:"ل.ل.",LYD:"د.ل.",MAD:"د.م.",MRU:"أ.م.",OMR:"ر.ع.",QAR:"ر.ق.",SAR:"ر.س.",SDG:"ج.س.",SOS:"S",SSP:"£",SYP:"ل.س.",TND:"د.ت.",YER:"ر.ي.",CLP:"$",INR:"₹",TZS:"TSh",EUR:"€",AZN:"₼",RUB:"₽",BYN:"Br",ZMW:"K",BGN:"лв.",NGN:"₦",XOF:"CFA",BDT:"৳",CNY:"¥",BAM:"КМ",UGX:"USh",USD:"$",CZK:"Kč",GBP:"£",DKK:"kr.",KES:"Ksh",CHF:"CHF",MVR:"ރ.",BTN:"Nu.",XCD:"EC$",AUD:"$",BBD:"$",BIF:"FBu",BMD:"$",BSD:"$",BWP:"P",BZD:"$",CAD:"$",NZD:"$",FJD:"$",FKP:"£",GIP:"£",GMD:"D",GYD:"$",HKD:"$",IDR:"Rp",JMD:"$",KYD:"$",LRD:"$",MGA:"Ar",MOP:"MOP$",MUR:"Rs",MWK:"MK",MYR:"RM",PGK:"K",PHP:"₱",PKR:"Rs",RWF:"RF",SBD:"$",SCR:"SR",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",ANG:"NAf.",SZL:"E",TOP:"T$",TTD:"$",VUV:"VT",WST:"WS$",ARS:"$",BOB:"Bs",BRL:"R$",COP:"$",CRC:"₡",CUP:"$",DOP:"$",GTQ:"Q",HNL:"L",MXN:"$",NIO:"C$",PAB:"B/.",PEN:"S/",PYG:"₲",UYU:"$",VES:"Bs.S",IRR:"ريال",GNF:"FG",CDF:"FC",HTG:"G",XPF:"FCFP",HRK:"kn",HUF:"Ft",AMD:"֏",ISK:"kr",JPY:"¥",GEL:"₾",CVE:"",KZT:"₸",KHR:"៛",KPW:"₩",KRW:"₩",KGS:"сом",AOA:"Kz",LAK:"₭",MZN:"MTn",MKD:"ден",MNT:"₮",BND:"$",MMK:"K",NOK:"kr",NPR:"रु",AWG:"Afl.",SRD:"$",PLN:"zł",AFN:"؋",STN:"Db",MDL:"L",RON:"lei",UAH:"₴",LKR:"රු.",ALL:"Lekë",RSD:"дин.",TJS:"смн",THB:"฿",TMT:"m.",TRY:"₺",UZS:"сўм",VND:"₫",TWD:"NT$"};!function(e){function t(e){var t=e.getDate(),r=e.getMonth(),i=e.getFullYear(),o=r+1,a=i;o<3&&(a-=1,o+=12);var s=Math.floor(a/100),l=s-Math.floor(s/4)-2,c=Math.floor(365.25*(a+4716))+Math.floor(30.6001*(o+1))+t-l-1524,u=c+(l=(s=Math.floor((c-1867216.25)/36524.25))-Math.floor(s/4)+1)+1524,p=Math.floor((u-122.1)/365.25),h=Math.floor(365.25*p),d=Math.floor((u-h)/30.6001);t=u-h-Math.floor(30.6001*d),(r=Math.floor((u-h)/20.6001))>13&&(p+=1,r-=12),r-=1,i=p-4716;var m=c-24e5,f=c-1948084,g=Math.floor(f/10631);f-=10631*g;var v=Math.floor((f-.1335)/(10631/30)),y=30*g+v;f-=Math.floor(v*(10631/30)+.1335);var b=Math.floor((f+28.5001)/29.5);13===b&&(b=12);for(var M=f-Math.floor(29.5001*b-29),D=0;D<n.length&&!(n[D]>m);D++);var w=D+16260,E=Math.floor((w-1)/12),P=E+1,S=w-12*E,O=m-n[D-1]+1;return(O+"").length>2&&(O=M,S=b,P=y),{year:P,month:S,date:O}}function r(e,t,r){var i=r+n[12*(e-1)+1+(t-1)-16260-1]-1+24e5,o=Math.floor(i+.5),a=Math.floor((o-1867216.25)/36524.25),s=(a=o+1+a-Math.floor(a/4))+1524,l=Math.floor((s-122.1)/365.25),c=Math.floor(365.25*l),u=Math.floor((s-c)/30.6001),p=s-c-Math.floor(30.6001*u),h=u-(u>13.5?13:1),d=l-(h>2.5?4716:4715);return d<=0&&h--,new Date(d+"/"+h+"/"+p)}var n=[28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990];e.getHijriDate=t,e.toGregorian=r}(e.HijriParser||(e.HijriParser={}));var st=["sun","mon","tue","wed","thu","fri","sat"],lt={m:"getMinutes",h:"getHours",H:"getHours",s:"getSeconds",d:"getDate",f:"getMilliseconds"},ct={M:"month",d:"day",E:"weekday",c:"weekday",y:"year",m:"minute",h:"hour",H:"hour",s:"second",L:"month",a:"designator",z:"timeZone",Z:"timeZone",G:"era",f:"milliseconds"},ut=function(){function t(){}return t.dateFormat=function(t,r,n){var o=this,a=e.IntlBase.getDependables(n,t,r.calendar),s=i("parserObject.numbers",a),l=a.dateObject,c={isIslamic:e.IntlBase.islamicRegex.test(r.calendar)};w()&&r.isServerRendered&&(r=e.IntlBase.compareBlazorDateFormats(r,t));var p=r.format||e.IntlBase.getResultantPattern(r.skeleton,a.dateObject,r.type,!1,w()?t:"");if(c.dateSeperator=w()?i("dateSeperator",l):e.IntlBase.getDateSeparator(a.dateObject),h(p))y("Format options or type given must be invalid");else{p=e.IntlBase.ConvertDateToWeekFormat(p),w()&&(p=p.replace(/tt/,"a")),c.pattern=p,c.numMapper=w()?u({},s):ot.getNumberMapper(a.parserObject,ot.getNumberingSystem(n));for(var d=0,m=p.match(/\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi)||[];d<m.length;d++){var f=m[d],g=f.length,v=f[0];switch("K"===v&&(v="h"),v){case"E":case"c":w()?c.weekday=i("days."+e.IntlBase.monthIndex[g],l):c.weekday=a.dateObject[e.IntlBase.days]["stand-alone"][e.IntlBase.monthIndex[g]];break;case"M":case"L":w()?c.month=i("months."+e.IntlBase.monthIndex[g],l):c.month=a.dateObject[e.IntlBase.month]["stand-alone"][e.IntlBase.monthIndex[g]];break;case"a":c.designator=w()?i("dayPeriods",l):i("dayPeriods.format.wide",l);break;case"G":var b=g<=3?"eraAbbr":4===g?"eraNames":"eraNarrow";c.era=w()?i("eras",l):i("eras."+b,a.dateObject);break;case"z":c.timeZone=i("dates.timeZoneNames",a.parserObject)}}}return function(e){return isNaN(e.getDate())?null:o.intDateFormatter(e,c)}},t.intDateFormatter=function(t,r){for(var n="",i=r.pattern.match(e.IntlBase.dateParseRegex),o=this.getCurrentDateValue(t,r.isIslamic),a=0,s=i;a<s.length;a++){var l=s[a],c=l.length,u=l[0];"K"===u&&(u="h");var h=void 0,d="",m=void 0,f=void 0,g="";switch(u){case"M":case"L":h=o.month,c>2?n+=r.month[h]:m=!0;break;case"E":case"c":n+=r.weekday[st[t.getDay()]];break;case"H":case"h":case"m":case"s":case"d":case"f":if(m=!0,"d"===u)h=o.date;else if("f"===u){m=!1,f=!0;var v=(d=(d=t[lt[u]]().toString()).substring(0,c)).length;if(c!==v){if(c>3)continue;for(var y=0;y<c-v;y++)d="0"+d.toString()}g+=d}else h=t[lt[u]]();"h"===u&&(h=h%12||12);break;case"y":f=!0,g+=o.year,2===c&&(g=g.substr(g.length-2));break;case"a":var b=t.getHours()<12?"am":"pm";n+=r.designator[b];break;case"G":var M=t.getFullYear()<0?0:1,D=r.era[M];p(D)&&(D=r.era[M?0:1]),n+=D||"";break;case"'":n+="''"===l?"'":l.replace(/\'/g,"");break;case"z":var w=t.getTimezoneOffset(),E=c<4?"+H;-H":r.timeZone.hourFormat;E=E.replace(/:/g,r.numMapper.timeSeparator),0===w?n+=r.timeZone.gmtZeroFormat:(f=!0,g=this.getTimeZoneValue(w,E)),g=r.timeZone.gmtFormat.replace(/\{0\}/,g);break;case":":n+=r.numMapper.numberSymbols.timeSeparator;break;case"/":n+=r.dateSeperator;break;case"W":m=!0,h=e.IntlBase.getWeekOfYear(t);break;default:n+=l}m&&(f=!0,g=this.checkTwodigitNumber(h,c)),f&&(n+=ot.convertValueParts(g,e.IntlBase.latnParseRegex,r.numMapper.mapper))}return n},t.getCurrentDateValue=function(t,r){return r?e.HijriParser.getHijriDate(t):{year:t.getFullYear(),month:t.getMonth()+1,date:t.getDate()}},t.checkTwodigitNumber=function(e,t){var r=e+"";return 2===t&&2!==r.length?"0"+r:r},t.getTimeZoneValue=function(e,t){var r=this,n=t.split(";")[e>0?1:0],i=Math.abs(e);return n=n.replace(/HH?|mm/g,function(e){var t=e.length,n=-1!==e.indexOf("H");return r.checkTwodigitNumber(Math.floor(n?i/60:i%60),t)})},t}(),pt={ms:"minimumSignificantDigits",ls:"maximumSignificantDigits",mf:"minimumFractionDigits",lf:"maximumFractionDigits"},ht=["infinity","nan","group","decimal","exponential"],dt=function(){function t(){}return t.numberFormatter=function(t,r,n){var o,a=this,s=u({},r),l={},c={},p=e.IntlBase.getDependables(n,t,"",!0),d=p.numericObject;c.numberMapper=w()?u({},d):ot.getNumberMapper(p.parserObject,ot.getNumberingSystem(n),!0),c.currencySymbol=w()?i("currencySymbol",d):e.IntlBase.getCurrencySymbol(p.numericObject,s.currency||e.defaultCurrencyCode,r.altSymbol),c.percentSymbol=w()?i("numberSymbols.percentSign",d):c.numberMapper.numberSymbols.percentSign,c.minusSymbol=w()?i("numberSymbols.minusSign",d):c.numberMapper.numberSymbols.minusSign;var m=c.numberMapper.numberSymbols;if(r.format&&!e.IntlBase.formatRegex.test(r.format))l=e.IntlBase.customFormat(r.format,c,p.numericObject);else{if(u(s,e.IntlBase.getProperNumericSkeleton(r.format||"N")),s.isCurrency="currency"===s.type,s.isPercent="percent"===s.type,w()||(o=e.IntlBase.getSymbolPattern(s.type,c.numberMapper.numberSystem,p.numericObject,s.isAccount)),s.groupOne=this.checkValueRange(s.maximumSignificantDigits,s.minimumSignificantDigits,!0),this.checkValueRange(s.maximumFractionDigits,s.minimumFractionDigits,!1,!0),h(s.fractionDigits)||(s.minimumFractionDigits=s.maximumFractionDigits=s.fractionDigits),h(s.useGrouping)&&(s.useGrouping=!0),s.isCurrency&&!w()&&(o=o.replace(/\u00A4/g,e.IntlBase.defaultCurrency)),w())l.nData=u({},{},i(s.type+"nData",d)),l.pData=u({},{},i(s.type+"pData",d)),"currency"===s.type&&r.currency&&e.IntlBase.replaceBlazorCurrency([l.pData,l.nData],c.currencySymbol,r.currency);else{var f=o.split(";");l.nData=e.IntlBase.getFormatData(f[1]||"-"+f[0],!0,c.currencySymbol),l.pData=e.IntlBase.getFormatData(f[0],!1,c.currencySymbol),s.useGrouping&&(s.groupSeparator=m[ht[2]],s.groupData=this.getGroupingDetails(f[0]))}if(h(s.minimumFractionDigits)&&(s.minimumFractionDigits=l.nData.minimumFraction),h(s.maximumFractionDigits)){var g=l.nData.maximumFraction;s.maximumFractionDigits=h(g)&&s.isPercent?0:g}var v=s.minimumFractionDigits,y=s.maximumFractionDigits;h(v)||h(y)||v>y&&(s.maximumFractionDigits=v)}return u(l.nData,s),u(l.pData,s),function(e){return isNaN(e)?m[ht[1]]:isFinite(e)?a.intNumberFormatter(e,l,c):m[ht[0]]}},t.getGroupingDetails=function(t){var r={},n=t.match(e.IntlBase.negativeDataRegex);if(n&&n[4]){var i=n[4],o=i.lastIndexOf(",");if(-1!==o){var a=i.split(".")[0];r.primary=a.length-o-1;var s=i.lastIndexOf(",",o-1);-1!==s&&(r.secondary=o-1-s)}}return r},t.checkValueRange=function(e,t,r,n){var i=n?"f":"s",o=0,a=pt["l"+i],s=pt["m"+i];if(h(e)||(this.checkRange(e,a,n),o++),h(t)||(this.checkRange(t,s,n),o++),2===o){if(!(e<t))return!0;y(s+"specified must be less than the"+a)}else r&&1===o&&y("Both"+s+"and"+s+"must be present");return!1},t.checkRange=function(e,t,r){var n=r?[0,20]:[1,21];(e<n[0]||e>n[1])&&y(t+"value must be within the range"+n[0]+"to"+n[1])},t.intNumberFormatter=function(t,r,n){var i;if(!h(r.nData.type)){t<0?(t*=-1,i=r.nData):i=0===t?r.zeroData||r.pData:r.pData;var o="";return i.isPercent&&(t*=100),i.groupOne?o=this.processSignificantDigits(t,i.minimumSignificantDigits,i.maximumSignificantDigits):(o=this.processFraction(t,i.minimumFractionDigits,i.maximumFractionDigits),i.minimumIntegerDigits&&(o=this.processMinimumIntegers(o,i.minimumIntegerDigits))),"scientific"===i.type&&(o=(o=t.toExponential(i.maximumFractionDigits)).replace("e",n.numberMapper.numberSymbols[ht[4]])),o=o.replace(".",n.numberMapper.numberSymbols[ht[3]]),i.useGrouping&&(o=this.groupNumbers(o,i.groupData.primary,i.groupSeparator||",",n.numberMapper.numberSymbols[ht[3]]||".",i.groupData.secondary)),o=ot.convertValueParts(o,e.IntlBase.latnParseRegex,n.numberMapper.mapper),"N/A"===i.nlead?i.nlead:i.nlead+o+i.nend}},t.processSignificantDigits=function(e,t,r){var n=e+"";return n.length<t?e.toPrecision(t):(n=e.toPrecision(r),+n+"")},t.groupNumbers=function(e,t,r,n,i){for(var o=!p(i)&&0!==i,a=e.split(n),s=a[0],l=s.length,c="";l>t;)c=s.slice(l-t,l)+(c.length?r+c:""),l-=t,o&&(t=i,o=!1);return a[0]=s.slice(0,l)+(c.length?r:"")+c,a.join(n)},t.processFraction=function(e,t,r){var n=(e+"").split(".")[1],i=n?n.length:0;if(t&&i<t){var o="";if(0!==i){o+=e;for(var a=0;a<t-i;a++)o+="0";return o}return o=e.toFixed(t),e.toFixed(t)}return!p(r)&&(i>r||0===r)?e.toFixed(r):e+""},t.processMinimumIntegers=function(e,t){var r=e.split("."),n=r[0],i=n.length;if(i<t){for(var o=0;o<t-i;o++)n="0"+n;r[0]=n}return r.join(".")},t}(),mt=/^[0-9]*$/,ft={minute:"setMinutes",hour:"setHours",second:"setSeconds",day:"setDate",month:"setMonth",milliseconds:"setMilliseconds"},gt=function(){function t(){}return t.dateParser=function(t,r,n){var o=this,a=e.IntlBase.getDependables(n,t,r.calendar),s=ot.getCurrentNumericOptions(a.parserObject,ot.getNumberingSystem(n),!1,w()),l={};w()&&r.isServerRendered&&(r=e.IntlBase.compareBlazorDateFormats(r,t));var c,u=r.format||e.IntlBase.getResultantPattern(r.skeleton,a.dateObject,r.type,!1,w()?t:""),d="";if(h(u))y("Format options or type given must be invalid");else{u=e.IntlBase.ConvertDateToWeekFormat(u),l={isIslamic:e.IntlBase.islamicRegex.test(r.calendar),pattern:u,evalposition:{},culture:t};for(var m=u.match(e.IntlBase.dateParseRegex)||[],f=m.length,g=0,v=0,b=!1,M=s.numericRegex,D=w()?a.parserObject.numbers:ot.getNumberMapper(a.parserObject,ot.getNumberingSystem(n)),E=0;E<f;E++){var P=m[E],S=P.length,O="K"===P[0]?"h":P[0],C=void 0,T=void 0,j=ct[O],x=2===S?"":"?";switch(b&&(g=v,b=!1),O){case"E":case"c":var N=void 0;N=w()?i("days."+e.IntlBase.monthIndex[S],a.dateObject):a.dateObject[e.IntlBase.days]["stand-alone"][e.IntlBase.monthIndex[S]];var F=ot.reverseObject(N);d+="("+Object.keys(F).join("|")+")";break;case"M":case"L":case"d":case"m":case"s":case"h":case"H":case"f":if(T=!0,("M"===O||"L"===O)&&S>2){var A=void 0;A=w()?i("months."+e.IntlBase.monthIndex[S],a.dateObject):a.dateObject.months["stand-alone"][e.IntlBase.monthIndex[S]],l[j]=ot.reverseObject(A),d+="("+Object.keys(l[j]).join("|")+")"}else if("f"===O){if(S>3)continue;C=!0,d+="("+M+M+"?"+M+"?)"}else C=!0,d+="("+M+M+x+")";"h"===O&&(l.hour12=!0);break;case"W":d+="("+M+(1===S?"?":"")+M+")";break;case"y":T=C=!0,d+=2===S?"("+M+M+")":"("+M+"{"+S+",})";break;case"a":T=!0;var R=w()?i("dayPeriods",a.dateObject):i("dayPeriods.format.wide",a.dateObject);l[j]=ot.reverseObject(R),d+="("+Object.keys(l[j]).join("|")+")";break;case"G":T=!0;var I=S<=3?"eraAbbr":4===S?"eraNames":"eraNarrow";l[j]=ot.reverseObject(w()?i("eras",a.dateObject):i("eras."+I,a.dateObject)),d+="("+Object.keys(l[j]).join("|")+"?)";break;case"z":T=0!==(new Date).getTimezoneOffset(),l[j]=i("dates.timeZoneNames",a.parserObject);var H=l[j],L=(c=S<4)?"+H;-H":H.hourFormat;L=L.replace(/:/g,D.timeSeparator),d+="("+this.parseTimeZoneRegx(L,H,M)+")?",b=!0,v=c?6:12;break;case"'":d+="("+P.replace(/\'/g,"")+")?";break;default:d+="([\\D])"}T&&(l.evalposition[j]={isNumber:C,pos:E+1+g,hourOnly:c}),E!==f-1||p(d)||(l.parserRegex=new RegExp("^"+d+"$","i"))}}return function(t){var r=o.internalDateParse(t,l,s);if(p(r)||!Object.keys(r).length)return null;if(l.isIslamic){var n={},i=r.year,a=r.day,c=r.month,u=i?i+"":"",h=2===u.length;i&&c&&a&&!h||(n=e.HijriParser.getHijriDate(new Date)),h&&(i=parseInt((n.year+"").slice(0,2)+u,10));var d=e.HijriParser.toGregorian(i||n.year,c||n.month,a||n.date);r.year=d.getFullYear(),r.month=d.getMonth()+1,r.day=d.getDate()}return o.getDateObject(r)}},t.getDateObject=function(e,t){var r=t||new Date;r.setMilliseconds(0);var n=["hour","minute","second","milliseconds","month","day"],i=e.year,o=e.designator,a=e.timeZone;h(i)||((i+"").length<=2&&(i+=100*Math.floor(r.getFullYear()/100)),r.setFullYear(i));for(var s=0,l=n;s<l.length;s++){var c=l[s],u=e[c];if(h(u)&&"day"===c&&r.setDate(1),!h(u))if("month"===c){if((u-=1)<0||u>11)return new Date("invalid");var p=r.getDate();r.setDate(1),r[ft[c]](u);var d=new Date(r.getFullYear(),u+1,0).getDate();r.setDate(p<d?p:d)}else{if("day"===c){var m=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();if(u<1||u>m)return null}r[ft[c]](u)}}if(!h(o)){var f=r.getHours();"pm"===o?r.setHours(f+(12===f?0:12)):12===f&&r.setHours(0)}if(!h(a)){var g=a-r.getTimezoneOffset();0!==g&&r.setMinutes(r.getMinutes()+g)}return r},t.internalDateParse=function(e,t,r){var n=e.match(t.parserRegex),i={hour:0,minute:0,second:0};r.numericRegex;if(p(n))return null;for(var o=0,a=Object.keys(t.evalposition);o<a.length;o++){var s=a[o],l=t.evalposition[s],c=n[l.pos];if(l.isNumber)i[s]=this.internalNumberParser(c,r);else if("timeZone"!==s||h(c))c="month"!==s||t.isIslamic||"en"!==t.culture&&"en-GB"!==t.culture&&"en-US"!==t.culture?c:c[0].toUpperCase()+c.substring(1).toLowerCase(),i[s]=t[s][c];else{var u=l.pos,d=void 0,m=n[u+1],f=!h(m);l.hourOnly?d=60*this.getZoneValue(f,m,n[u+4],r):(d=60*this.getZoneValue(f,m,n[u+7],r),d+=this.getZoneValue(f,n[u+4],n[u+10],r)),p(d)||(i[s]=d)}}return t.hour12&&(i.hour12=!0),i},t.internalNumberParser=function(e,t){return e=ot.convertValueParts(e,t.numberParseRegex,t.numericPair),mt.test(e)?+e:null},t.parseTimeZoneRegx=function(e,t,r){var n,i,o=t.gmtFormat,a="("+r+")("+r+")";return n=e.replace("+","\\+"),n=-1!==e.indexOf("HH")?n.replace(/HH|mm/g,"("+a+")"):n.replace(/H|m/g,"("+a+"?)"),i=n.split(";").map(function(e){return o.replace("{0}",e)}),n=i.join("|")+"|"+t.gmtZeroFormat},t.getZoneValue=function(e,t,r,n){var i=e?t:r;if(!i)return 0;var o=this.internalNumberParser(i,n);return e?-o:o},t}(),vt=["minusSign","infinity"],yt=function(){function t(){}return t.numberParser=function(t,r,n){var o,a=this,s=e.IntlBase.getDependables(n,t,"",!0),l={custom:!0};e.IntlBase.formatRegex.test(r.format)||!r.format?(u(l,e.IntlBase.getProperNumericSkeleton(r.format||"N")),l.custom=!1,l.fractionDigits||r.maximumFractionDigits&&(l.maximumFractionDigits=r.maximumFractionDigits)):u(l,e.IntlBase.customFormat(r.format,null,null));var c=i("numbers",s.parserObject);o=ot.getCurrentNumericOptions(s.parserObject,ot.getNumberingSystem(n),!0,w()),l.symbolRegex=ot.getSymbolRegex(Object.keys(o.symbolMatch)),l.infinity=o.symbolNumberSystem[vt[1]];var p;if(w())l.nData=u({},{},i(l.type+"nData",c)),l.pData=u({},{},i(l.type+"pData",c)),"currency"===l.type&&r.currency&&e.IntlBase.replaceBlazorCurrency([l.pData,l.nData],i("currencySymbol",c),r.currency);else if(p=e.IntlBase.getSymbolPattern(l.type,o.numberSystem,s.numericObject,l.isAccount)){var h=(p=p.replace(/\u00A4/g,e.IntlBase.defaultCurrency)).split(";");l.nData=e.IntlBase.getFormatData(h[1]||"-"+h[0],!0,""),l.pData=e.IntlBase.getFormatData(h[0],!0,"")}return function(e){return a.getParsedNumber(e,l,o)}},t.getParsedNumber=function(e,t,r){var n,i,o,a,s,l;if(-1!==e.indexOf(t.infinity))return 1/0;e=ot.convertValueParts(e,t.symbolRegex,r.symbolMatch),0===(e=ot.convertValueParts(e,r.numberParseRegex,r.numericPair)).indexOf(".")&&(e="0"+e);var c=e.match(/^([^0-9]*)(([0-9,]*[0-9]+)(\.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$/);if(p(c))return NaN;a=c[1],o=c[2];var u=c[5];return s=c[6],n=t.custom?a===t.nData.nlead&&s===t.nData.nend:-1!==a.indexOf(t.nData.nlead)&&-1!==s.indexOf(t.nData.nend),i=n?t.nData.isPercent:t.pData.isPercent,o=o.replace(/,/g,""),u&&(o+=u),l=+o,("percent"===t.type||i)&&(l/=100),(t.custom||t.fractionDigits)&&(l=parseFloat(l.toFixed(t.custom?n?t.nData.maximumFractionDigits:t.pData.maximumFractionDigits:t.fractionDigits))),t.maximumFractionDigits&&(l=this.convertMaxFracDigits(o,t,l,n)),n&&(l*=-1),l},t.convertMaxFracDigits=function(e,t,r,n){var i=e.split(".");return i[1]&&i[1].length>t.maximumFractionDigits&&(r=+r.toFixed(t.custom?n?t.nData.maximumFractionDigits:t.pData.maximumFractionDigits:t.maximumFractionDigits)),r},t}(),bt=function(){function e(e){this.ranArray=[],this.boundedEvents={},p(e)||(this.context=e)}return e.prototype.on=function(e,t,r,n){if(!p(t)){var i=r||this.context;if(this.notExist(e))return void(this.boundedEvents[e]=[{handler:t,context:i}]);p(n)?this.isHandlerPresent(this.boundedEvents[e],t)||this.boundedEvents[e].push({handler:t,context:i}):-1===this.ranArray.indexOf(n)&&(this.ranArray.push(n),this.boundedEvents[e].push({handler:t,context:i,id:n}))}},e.prototype.off=function(e,t,r){if(!this.notExist(e)){var n=i(e,this.boundedEvents);if(t){for(var o=0;o<n.length;o++)if(r){if(n[o].id===r){n.splice(o,1);var a=this.ranArray.indexOf(r);-1!==a&&this.ranArray.splice(a,1);break}}else if(t===n[o].handler){n.splice(o,1);break}}else delete this.boundedEvents[e]}},e.prototype.notify=function(e,t,r,n){if(this.notExist(e))return void(r&&r.call(this,t));t&&(t.name=e);var o=i(e,this.boundedEvents).slice(0);if(window.Blazor)return this.blazorCallback(o,t,r,n,0);for(var a=0,s=o;a<s.length;a++){var l=s[a];l.handler.call(l.context,t)}r&&r.call(this,t)},e.prototype.blazorCallback=function(e,t,r,n,i){var o=this,a=i===e.length-1;if(i<e.length){var s=e[i],l=s.handler.call(s.context,t);if(l&&"function"==typeof l.then){if(!r)return l;l.then(function(l){if(l="string"==typeof l&&o.isJson(l)?JSON.parse(l,o.dateReviver):l,u(t,t,l,!0),!r||!a)return o.blazorCallback(e,t,r,n,i+1);r.call(s.context,t)}).catch(function(e){n&&n.call(s.context,"string"==typeof e&&o.isJson(e)?JSON.parse(e,o.dateReviver):e)})}else{if(!r||!a)return this.blazorCallback(e,t,r,n,i+1);r.call(s.context,t)}}},e.prototype.dateReviver=function(e,t){return w&&"string"==typeof t&&null!==t.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/)?new Date(t):t},e.prototype.isJson=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},e.prototype.destroy=function(){this.boundedEvents=this.context=void 0},e.prototype.notExist=function(e){return!1===this.boundedEvents.hasOwnProperty(e)||this.boundedEvents[e].length<=0},e.prototype.isHandlerPresent=function(e,t){for(var r=0,n=e;r<n.length;r++)if(n[r].handler===t)return!0;return!1},e}(),Mt=new bt;e.rightToLeft=!1;var Dt={};e.defaultCulture="en-US",e.defaultCurrencyCode="USD";var wt=["numericObject","dateObject"],Et=function(){function t(e){e&&(this.culture=e)}return t.prototype.getDateFormat=function(e){return ut.dateFormat(this.getCulture(),e||{type:"date",skeleton:"short"},Dt)},t.prototype.getNumberFormat=function(t){return t&&!t.currency&&(t.currency=e.defaultCurrencyCode),w()&&t&&!t.format&&(t.minimumFractionDigits=0),dt.numberFormatter(this.getCulture(),t||{},Dt)},t.prototype.getDateParser=function(e){return gt.dateParser(this.getCulture(),e||{skeleton:"short",type:"date"},Dt)},t.prototype.getNumberParser=function(e){return w()&&e&&!e.format&&(e.minimumFractionDigits=0),yt.numberParser(this.getCulture(),e||{format:"N"},Dt)},t.prototype.formatNumber=function(e,t){return this.getNumberFormat(t)(e)},t.prototype.formatDate=function(e,t){return this.getDateFormat(t)(e)},t.prototype.parseDate=function(e,t){return this.getDateParser(t)(e)},t.prototype.parseNumber=function(e,t){return this.getNumberParser(t)(e)},t.prototype.getDatePattern=function(t,r){return e.IntlBase.getActualDateTimeFormat(this.getCulture(),t,Dt,r)},t.prototype.getNumberPattern=function(t,r){return e.IntlBase.getActualNumberFormat(this.getCulture(),t,Dt,r)},t.prototype.getFirstDayOfWeek=function(){return e.IntlBase.getWeekData(this.getCulture(),Dt)},t.prototype.getCulture=function(){return this.culture||e.defaultCulture},t}(),Pt={"en-US":{d:"M/d/y",D:"EEEE, MMMM d, y",f:"EEEE, MMMM d, y h:mm a",F:"EEEE, MMMM d, y h:mm:s a",g:"M/d/y h:mm a",G:"M/d/yyyy h:mm:ss tt",m:"MMMM d",M:"MMMM d",r:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",R:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"h:mm tt",T:"h:m:s tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",U:"dddd, MMMM d, yyyy h:mm:ss tt",y:"MMMM yyyy",Y:"MMMM yyyy"}};!function(t){function r(e,r,n,o,a){var l,c=n||"date";if(a)l=s({skeleton:e},a).format||s({skeleton:"d"},"en-US").format;else{if(-1!==t.basicPatterns.indexOf(e)){if(l=i(c+"Formats."+e,r),"dateTime"===c){var u=i("dateFormats."+e,r),p=i("timeFormats."+e,r);l=l.replace("{1}",u).replace("{0}",p)}}else l=i("dateTimeFormats.availableFormats."+e,r);h(l)&&"yMd"===e&&(l="M/d/y")}return l}function n(e,r,n,o){var a={},s=n||"gregorian";if(a.parserObject=ot.getMainObject(e,r)||(w()?t.blazorDefaultObject:t.defaultObject),o)a.numericObject=i("numbers",a.parserObject);else{var l=w()?"dates":"dates.calendars."+s;a.dateObject=i(l,a.parserObject)}return a}function o(e,t,r,n){return i(e+"Formats-numberSystem-"+t+(n?".accounting":".standard"),r)||(n?i(e+"Formats-numberSystem-"+t+".standard",r):"")}function a(e){var r=e.match(t.dateConverterMapper);if(r&&w()){var n=3===r[0].length?"EEE":"EEEE";return e.replace(t.dateConverterMapper,n)}return e}function s(e,t){var r=e.format||e.skeleton,n=i((t||"en-US")+"."+r,Pt);return n||(n=i("en-US."+r,Pt)),n&&(n=a(n),e.format=n.replace(/tt/,"a")),e}function l(e){var r=e.match(t.formatRegex),n={},i=r[1].toUpperCase();return n.isAccount="A"===i,n.type=t.patternMatcher[i],e.length>1&&(n.fractionDigits=parseInt(r[2],10)),n}function c(e,r,n,i){var o=i?{}:{nlead:"",nend:""},a=e.match(t.customRegex);if(a){i||(o.nlead=d(a[1],n),o.nend=d(a[10],n),o.groupPattern=a[4]);var s=a[7];if(s&&r){var l=s.match(x);p(l)?o.minimumFraction=0:o.minimumFraction=l.length,o.maximumFraction=s.length-1}}return o}function d(e,r){return e?e.replace(t.defaultCurrency,r):""}function m(e,t,r){return i("currencies."+t+(r?"."+r:".symbol"),e)||i("currencies."+t+".symbol-alt-narrow",e)||"$"}function f(e,t,r){for(var n={},i=e.split(";"),o=["pData","nData","zeroData"],a=0;a<i.length;a++)n[o[a]]=g(i[a],t,r);return p(n.nData)&&(n.nData=u({},n.pData),n.nData.nlead=p(t)?"-"+n.nData.nlead:t.minusSymbol+n.nData.nlead),n}function g(e,r,n){var i={type:"decimal",minimumFractionDigits:0,maximumFractionDigits:0},a=e.match(t.customRegex);if(p(a)||""===a[5]&&"N/A"!==e)return i.type=void 0,i;i.nlead=a[1],i.nend=a[10];var s=a[6];i.useGrouping=-1!==s.indexOf(","),s=s.replace(/,/g,"");var l=a[7];if(-1!==s.indexOf("0")&&(i.minimumIntegerDigits=s.length-s.indexOf("0")),p(l)||(i.minimumFractionDigits=l.lastIndexOf("0"),i.maximumFractionDigits=l.lastIndexOf("#"),-1===i.minimumFractionDigits&&(i.minimumFractionDigits=0),(-1===i.maximumFractionDigits||i.maximumFractionDigits<i.minimumFractionDigits)&&(i.maximumFractionDigits=i.minimumFractionDigits)),p(r)?u(i,v([i.nlead,i.nend],"%","%")):(u(i,v([i.nlead,i.nend],"$",r.currencySymbol)),i.isCurrency||u(i,v([i.nlead,i.nend],"%",r.percentSymbol))),!p(n)){var c=o(i.type,r.numberMapper.numberSystem,n,!1);i.useGrouping&&(i.groupSeparator=r.numberMapper.numberSymbols[N[2]],i.groupData=dt.getGroupingDetails(c.split(";")[0])),i.nlead=i.nlead.replace(/\'/g,""),i.nend=i.nend.replace(/\'/g,"")}return i}function v(e,t,r){for(var n={nlead:e[0],nend:e[1]},i=0;i<2;i++){var o=e[i],a=o.indexOf(t);if(-1!==a&&(a<o.indexOf("'")||a>o.lastIndexOf("'"))){n[H[i]]=o.substr(0,a)+r+o.substr(a+1),n[H[t]]=!0,n.type=n.isCurrency?"currency":"percent";break}}return n}function y(e){var t=(i("dateFormats.short",e)||"").match(/[dM]([^dM])[dM]/i);return t?t[1]:"/"}function b(e,t,o,a){var l=n(o,e,t.calendar);w()&&(t=s(t,e));var c=t.format||r(t.skeleton,l.dateObject,t.type);if(a){if(-1!==(c=c.replace(F,function(e){return A[e]})).indexOf("z")){var u=c.match(/z/g).length,p=void 0,h={timeZone:{}};h.numMapper=ot.getNumberMapper(l.parserObject,ot.getNumberingSystem(o)),h.timeZone=i("dates.timeZoneNames",l.parserObject);var d=(new Date).getTimezoneOffset(),m=u<4?"+H;-H":h.timeZone.hourFormat;m=m.replace(/:/g,h.numMapper.timeSeparator),0===d?p=h.timeZone.gmtZeroFormat:(p=ut.getTimeZoneValue(d,m),p=h.timeZone.gmtFormat.replace(/\{0\}/,p)),c=c.replace(/[z]+/,'"'+p+'"')}c=c.replace(/ $/,"")}return c}function M(e,t){if(-1!==e.indexOf(",")){var r=e.split(",");e=r[0]+i("numberMapper.numberSymbols.group",t)+r[1].replace(".",i("numberMapper.numberSymbols.decimal",t))}else e=e.replace(".",i("numberMapper.numberSymbols.decimal",t));return e}function D(r,a,s,p){var h,d=n(s,r,"",!0),f={custom:!0},g=d.numericObject,v={},y=(a.format||"").match(t.currencyFormatRegex),b=t.formatRegex.test(a.format)?l(a.format||"N"):{},D={};if(y){D.numberMapper=w()?u({},d.numericObject):ot.getNumberMapper(d.parserObject,ot.getNumberingSystem(s),!0);var O=w()?i("currencySymbol",d.numericObject):m(d.numericObject,a.currency||e.defaultCurrencyCode,a.altSymbol),C=o("currency",D.numberMapper.numberSystem,d.numericObject,/a/i.test(a.format)),T=(C=C.replace(/\u00A4/g,O)).split(";");v.hasNegativePattern=!!w()||T.length>1,v.nData=w()?i(b.type+"nData",g):c(T[1]||"-"+T[0],!0,O),v.pData=w()?i(b.type+"pData",g):c(T[0],!1,O),y[2]||a.minimumFractionDigits||a.maximumFractionDigits||(h=c(C.split(";")[0],!0,"",!0).minimumFraction)}var j;if(t.formatRegex.test(a.format)||!a.format){if(u(f,l(a.format||"N")),f.custom=!1,j="###0",f.fractionDigits||a.minimumFractionDigits||a.maximumFractionDigits||h){f.fractionDigits&&(a.minimumFractionDigits=a.maximumFractionDigits=f.fractionDigits),j=E(j,h||f.fractionDigits||a.minimumFractionDigits||0,a.maximumFractionDigits||0)}if(a.minimumIntegerDigits&&(j=P(j,a.minimumIntegerDigits)),a.useGrouping&&(j=S(j)),"currency"===f.type||f.type&&w()){w()&&"currency"!==f.type&&(v.pData=i(f.type+"pData",g),v.nData=i(f.type+"nData",g));var x=j;j=v.pData.nlead+x+v.pData.nend,(v.hasNegativePattern||w())&&(j+=";"+v.nData.nlead+x+v.nData.nend)}"percent"!==f.type||w()||(j+=" %")}else j=a.format.replace(/\'/g,'"');return Object.keys(D).length>0&&(j=p?j:M(j,D)),j}function E(e,t,r){e+=".";for(var n=0;n<t;n++)e+="0";if(t<r)for(var i=r-t,o=0;o<i;o++)e+="#";return e}function P(e,t){for(var r=e.split("."),n="",i=0;i<t;i++)n+="0";return r[1]?n+"."+r[1]:n}function S(e){var t=e.split("."),r=t[0],n=3-r.length%3;e="";for(var i=(r=(n&&1===n?"#":2===n?"##":"")+r).length-1;i>0;i-=3)e=","+r[i-2]+r[i-1]+r[i]+e;return e=e.slice(1),t[1]?e+"."+t[1]:e}function O(e,t){var r=R,n=i("supplemental.weekData.firstDay",t),o=e;return/en-/.test(o)&&(o=o.slice(3)),o=o.slice(0,2).toUpperCase()+o.substr(2),n&&(r=n[o]||R),I[r]}function C(e,t,r){var n=T(r);if(t!==n)for(var i=0,o=e;i<o.length;i++){var a=o[i];a.nend=a.nend.replace(t,n),a.nlead=a.nlead.replace(t,n)}}function j(e){var t,r=new Date(e.getFullYear(),0,1),n=r.getDay();n=n>=0?n:n+7;var i=Math.floor((e.getTime()-r.getTime()-6e4*(e.getTimezoneOffset()-r.getTimezoneOffset()))/864e5)+1;if(n<4){if((t=Math.floor((i+n-1)/7)+1)>52){var o=new Date(e.getFullYear()+1,0,1).getDay();t=(o=o>=0?o:o+7)<4?1:53}}else t=Math.floor((i+n-1)/7);return t}t.negativeDataRegex=/^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/,t.customRegex=/^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/,t.latnParseRegex=/0|1|2|3|4|5|6|7|8|9/g;var x=/[0-9]/g;t.defaultCurrency="$";var N=["infinity","nan","group","decimal"],F=/G|M|L|H|c|'| a|yy|y|EEEE|E/g,A={G:"",M:"m",L:"m",H:"h",c:"d","'":'"'," a":" AM/PM",yy:"yy",y:"yyyy",EEEE:"dddd",E:"ddd"};t.dateConverterMapper=/dddd|ddd/gi;var R="sun";t.islamicRegex=/^islamic/;var I={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};t.formatRegex=/(^[ncpae]{1})([0-1]?[0-9]|20)?$/i,t.currencyFormatRegex=/(^[ca]{1})([0-1]?[0-9]|20)?$/i,t.curWithoutNumberRegex=/(c|a)$/gi;var H={$:"isCurrency","%":"isPercent","-":"isNegative",0:"nlead",1:"nend"};t.dateParseRegex=/([a-z])\1*|'([^']|'')+'|''|./gi,t.basicPatterns=["short","medium","long","full"],t.defaultObject={dates:{calendars:{gregorian:{months:{"stand-alone":{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},narrow:{1:"J",2:"F",3:"M",4:"A",5:"M",6:"J",7:"J",8:"A",9:"S",10:"O",11:"N",12:"D"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}}},days:{"stand-alone":{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}}},dayPeriods:{format:{wide:{am:"AM",pm:"PM"}}},eras:{eraNames:{0:"Before Christ","0-alt-variant":"Before Common Era",1:"Anno Domini","1-alt-variant":"Common Era"},eraAbbr:{0:"BC","0-alt-variant":"BCE",1:"AD","1-alt-variant":"CE"},eraNarrow:{0:"B","0-alt-variant":"BCE",1:"A","1-alt-variant":"CE"}},dateFormats:{full:"EEEE, MMMM d, y",long:"MMMM d, y",medium:"MMM d, y",short:"M/d/yy"},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{d:"d",E:"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",hmsv:"h:mm:ss a v",Hmsv:"HH:mm:ss v",hmv:"h:mm a v",Hmv:"HH:mm v",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss",y:"y",yM:"M/y",yMd:"M/d/y",yMEd:"E, M/d/y",yMMM:"MMM y",yMMMd:"MMM d, y",yMMMEd:"E, MMM d, y",yMMMM:"MMMM y"}}},islamic:{months:{"stand-alone":{abbreviated:{1:"Muh.",2:"Saf.",3:"Rab. I",4:"Rab. II",5:"Jum. I",6:"Jum. II",7:"Raj.",8:"Sha.",9:"Ram.",10:"Shaw.",11:"Dhuʻl-Q.",12:"Dhuʻl-H."},narrow:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},wide:{1:"Muharram",2:"Safar",3:"Rabiʻ I",4:"Rabiʻ II",5:"Jumada I",6:"Jumada II",7:"Rajab",8:"Shaʻban",9:"Ramadan",10:"Shawwal",11:"Dhuʻl-Qiʻdah",12:"Dhuʻl-Hijjah"}}},days:{"stand-alone":{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}}},dayPeriods:{format:{wide:{am:"AM",pm:"PM"}}},eras:{eraNames:{0:"AH"},eraAbbr:{0:"AH"},eraNarrow:{0:"AH"}},dateFormats:{full:"EEEE, MMMM d, y G",long:"MMMM d, y G",medium:"MMM d, y G",short:"M/d/y GGGGG"},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{d:"d",E:"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss",y:"y G",yyyy:"y G",yyyyM:"M/y GGGGG",yyyyMd:"M/d/y GGGGG",yyyyMEd:"E, M/d/y GGGGG",yyyyMMM:"MMM y G",yyyyMMMd:"MMM d, y G",yyyyMMMEd:"E, MMM d, y G",yyyyMMMM:"MMMM y G",yyyyQQQ:"QQQ y G",yyyyQQQQ:"QQQQ y G"}}}},timeZoneNames:{hourFormat:"+HH:mm;-HH:mm",gmtFormat:"GMT{0}",gmtZeroFormat:"GMT"}},numbers:{currencies:{USD:{displayName:"US Dollar",symbol:"$","symbol-alt-narrow":"$"},EUR:{displayName:"Euro",symbol:"€","symbol-alt-narrow":"€"},GBP:{displayName:"British Pound","symbol-alt-narrow":"£"}},defaultNumberingSystem:"latn",minimumGroupingDigits:"1","symbols-numberSystem-latn":{decimal:".",group:",",list:";",percentSign:"%",plusSign:"+",minusSign:"-",exponential:"E",superscriptingExponent:"×",perMille:"‰",infinity:"∞",nan:"NaN",timeSeparator:":"},"decimalFormats-numberSystem-latn":{standard:"#,##0.###"},"percentFormats-numberSystem-latn":{standard:"#,##0%"},"currencyFormats-numberSystem-latn":{standard:"¤#,##0.00",accounting:"¤#,##0.00;(¤#,##0.00)"},"scientificFormats-numberSystem-latn":{standard:"#E0"}}},t.blazorDefaultObject={numbers:{mapper:{0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},mapperDigits:"0123456789",numberSymbols:{decimal:".",group:",",plusSign:"+",minusSign:"-",percentSign:"%",nan:"NaN",timeSeparator:":",infinity:"∞"},timeSeparator:":",currencySymbol:"$",currencypData:{nlead:"$",nend:"",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},percentpData:{nlead:"",nend:"%",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},percentnData:{nlead:"-",nend:"%",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},currencynData:{nlead:"($",nend:")",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},decimalnData:{nlead:"-",nend:"",groupData:{primary:3},maximumFraction:2,minimumFraction:2},decimalpData:{nlead:"",nend:"",groupData:{primary:3},maximumFraction:2,minimumFraction:2}},dates:{dayPeriods:{am:"AM",pm:"PM"},dateSeperator:"/",days:{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}},months:{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}},eras:{1:"AD"}}},t.monthIndex={3:"abbreviated",4:"wide",5:"narrow",1:"abbreviated"},t.month="months",t.days="days",t.patternMatcher={C:"currency",P:"percent",N:"decimal",A:"currency",E:"scientific"},t.getResultantPattern=r,t.getDependables=n,t.getSymbolPattern=o,t.ConvertDateToWeekFormat=a,t.compareBlazorDateFormats=s,t.getProperNumericSkeleton=l,t.getFormatData=c,t.getCurrencySymbol=m,t.customFormat=f,t.isCurrencyPercent=v,t.getDateSeparator=y,t.getActualDateTimeFormat=b,t.getActualNumberFormat=D,t.getWeekData=O,t.replaceBlazorCurrency=C,t.getWeekOfYear=j}(e.IntlBase||(e.IntlBase={}));var St=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot="GET",Ct=function(){function e(e,t,r,n){this.mode=!0,this.emitError=!0,this.options={},"string"==typeof e?(this.url=e,this.type=t?t.toUpperCase():Ot,this.mode=!!p(r)||r):"object"==typeof e&&(this.options=e,c(this,this.options)),this.type=this.type?this.type.toUpperCase():Ot,this.contentType=void 0!==this.contentType?this.contentType:n}return e.prototype.send=function(e){var t=this;this.data=p(e)?this.data:e;var r={cancel:!1,httpRequest:null};return new Promise(function(e,n){t.httpRequest=new XMLHttpRequest,t.httpRequest.onreadystatechange=function(){t.stateChange(e,n)},p(t.onLoad)||(t.httpRequest.onload=t.onLoad),p(t.onProgress)||(t.httpRequest.onprogress=t.onProgress),p(t.onAbort)||(t.httpRequest.onabort=t.onAbort),p(t.onError)||(t.httpRequest.onerror=t.onError),p(t.onUploadProgress)||(t.httpRequest.upload.onprogress=t.onUploadProgress),t.httpRequest.open(t.type,t.url,t.mode),p(t.data)||null===t.contentType||t.httpRequest.setRequestHeader("Content-Type",t.contentType||"application/json; charset=utf-8"),t.beforeSend&&(r.httpRequest=t.httpRequest,t.beforeSend(r)),r.cancel||t.httpRequest.send(p(t.data)?null:t.data)})},e.prototype.successHandler=function(e){return this.onSuccess&&this.onSuccess(e,this),e},e.prototype.failureHandler=function(e){return this.onFailure&&this.onFailure(this.httpRequest),e},e.prototype.stateChange=function(e,t){var r=this.httpRequest.responseText;if(this.dataType&&"json"===this.dataType.toLowerCase())if(""===r)r=void 0;else try{r=JSON.parse(r)}catch(e){}4===this.httpRequest.readyState&&(this.httpRequest.status>=200&&this.httpRequest.status<=299||304===this.httpRequest.status?e(this.successHandler(r)):this.emitError?t(new Error(this.failureHandler(this.httpRequest.statusText))):e())},e.prototype.getResponseHeader=function(e){var t,r;t={};for(var n=St.exec(this.httpRequest.getAllResponseHeaders());n;)t[n[1].toLowerCase()]=n[2],n=St.exec(this.httpRequest.getAllResponseHeaders());return r=t[e.toLowerCase()],p(r)?null:r},e}(),Tt={OPERA:/(opera|opr)(?:.*version|)[ \/]([\w.]+)/i,EDGE:/(edge)(?:.*version|)[ \/]([\w.]+)/i,CHROME:/(chrome|crios)[ \/]([\w.]+)/i,PANTHOMEJS:/(phantomjs)[ \/]([\w.]+)/i,SAFARI:/(safari)[ \/]([\w.]+)/i,WEBKIT:/(webkit)[ \/]([\w.]+)/i,MSIE:/(msie|trident) ([\w.]+)/i,MOZILLA:/(mozilla)(?:.*? rv:([\w.]+)|)/i};"undefined"!=typeof window&&(window.browserDetails=window.browserDetails||{});var jt,xt=function(){function e(){}return e.extractBrowserDetail=function(){for(var t={culture:{}},r=[],n=0,i=Object.keys(Tt);n<i.length;n++){var o=i[n];if(r=e.userAgent.match(Tt[o])){if(t.name="opr"===r[1].toLowerCase()?"opera":r[1].toLowerCase(),t.name="crios"===r[1].toLowerCase()?"chrome":t.name,t.version=r[2],t.culture.name=t.culture.language=navigator.language,e.userAgent.match(/Trident\/7\./)){t.name="msie";break}var a=e.userAgent.match(/(version)[ \/]([\w.]+)/i);"safari"===t.name&&a&&(t.version=a[2]);break}}return t},e.getEvent=function(t){var r={start:{isPointer:"pointerdown",isTouch:"touchstart",isDevice:"mousedown"},move:{isPointer:"pointermove",isTouch:"touchmove",isDevice:"mousemove"},end:{isPointer:"pointerup",isTouch:"touchend",isDevice:"mouseup"},cancel:{isPointer:"pointercancel",isTouch:"touchcancel",isDevice:"mouseleave"}};return e.isPointer&&!e.isWindows?r[t].isPointer:e.isTouch?r[t].isTouch+(e.isDevice?"":" "+r[t].isDevice):r[t].isDevice},e.getTouchStartEvent=function(){return e.getEvent("start")},e.getTouchEndEvent=function(){return e.getEvent("end")},e.getTouchMoveEvent=function(){return e.getEvent("move")},e.getTouchCancelEvent=function(){return e.getEvent("cancel")},e.getValue=function(t,r){var n=window.browserDetails;return void 0===n[t]?n[t]=r.test(e.userAgent):n[t]},Object.defineProperty(e,"userAgent",{get:function(){return e.uA},set:function(t){e.uA=t,window.browserDetails={}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"info",{get:function(){return h(window.browserDetails.info)?window.browserDetails.info=e.extractBrowserDetail():window.browserDetails.info},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isIE",{get:function(){return e.getValue("isIE",/msie|trident/i)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isTouch",{get:function(){return h(window.browserDetails.isTouch)?window.browserDetails.isTouch="ontouchstart"in window.navigator||window&&window.navigator&&window.navigator.maxTouchPoints>0||"ontouchstart"in window:window.browserDetails.isTouch},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isPointer",{get:function(){return h(window.browserDetails.isPointer)?window.browserDetails.isPointer="pointerEnabled"in window.navigator:window.browserDetails.isPointer},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isMSPointer",{get:function(){return h(window.browserDetails.isMSPointer)?window.browserDetails.isMSPointer="msPointerEnabled"in window.navigator:window.browserDetails.isMSPointer},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isDevice",{get:function(){return e.getValue("isDevice",/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isIos",{get:function(){return e.getValue("isIos",/(ipad|iphone|ipod touch)/i)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isIos7",{get:function(){return e.getValue("isIos7",/(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isAndroid",{get:function(){return e.getValue("isAndroid",/android/i)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isWebView",{get:function(){return h(window.browserDetails.isWebView)?(window.browserDetails.isWebView=!(h(window.cordova)&&h(window.PhoneGap)&&h(window.phonegap)&&"object"!==window.forge),window.browserDetails.isWebView):window.browserDetails.isWebView},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isWindows",{get:function(){return e.getValue("isWindows",/trident|windows phone|edge/i)},enumerable:!0,configurable:!0}),Object.defineProperty(e,"touchStartEvent",{get:function(){return h(window.browserDetails.touchStartEvent)?window.browserDetails.touchStartEvent=e.getTouchStartEvent():window.browserDetails.touchStartEvent},enumerable:!0,configurable:!0}),Object.defineProperty(e,"touchMoveEvent",{get:function(){return h(window.browserDetails.touchMoveEvent)?window.browserDetails.touchMoveEvent=e.getTouchMoveEvent():window.browserDetails.touchMoveEvent},enumerable:!0,configurable:!0}),Object.defineProperty(e,"touchEndEvent",{get:function(){return h(window.browserDetails.touchEndEvent)?window.browserDetails.touchEndEvent=e.getTouchEndEvent():window.browserDetails.touchEndEvent},enumerable:!0,configurable:!0}),Object.defineProperty(e,"touchCancelEvent",{get:function(){return h(window.browserDetails.touchCancelEvent)?window.browserDetails.touchCancelEvent=e.getTouchCancelEvent():window.browserDetails.touchCancelEvent},enumerable:!0,configurable:!0}),e.uA="undefined"!=typeof navigator?navigator.userAgent:"",e}(),Nt=function(){function e(){}return e.addOrGetEventData=function(e){return"__eventList"in e?e.__eventList.events:(e.__eventList={},e.__eventList.events=[])},e.add=function(t,r,n,i,o){var a,s=e.addOrGetEventData(t);a=o?m(n,o):n,i&&(a=a.bind(i));for(var l=r.split(" "),c=0;c<l.length;c++)s.push({name:l[c],listener:n,debounce:a}),xt.isIE?t.addEventListener(l[c],a):t.addEventListener(l[c],a,{passive:!1});return a},e.remove=function(t,r,n){for(var i=e.addOrGetEventData(t),o=r.split(" "),a=0;a<o.length;a++)!function(e){var r,a=-1;i&&0!==i.length&&i.some(function(t,i){return t.name===o[e]&&t.listener===n&&(a=i,r=t.debounce,!0)}),-1!==a&&i.splice(a,1),r&&t.removeEventListener(o[e],r)}(a)},e.clearEvents=function(t){var r,n;n=u([],n,r=e.addOrGetEventData(t));for(var i=0;i<n.length;i++)t.removeEventListener(n[i].name,n[i].debounce),r.shift()},e.trigger=function(t,r,n){for(var i=0,o=e.addOrGetEventData(t);i<o.length;i++){var a=o[i];a.name===r&&a.debounce.call(this,n)}},e}(),Ft=new RegExp("\\n|\\r|\\s\\s+","g"),At=new RegExp(/'|"/g),Rt=new RegExp("if ?\\("),It=new RegExp("else if ?\\("),Ht=new RegExp("else"),Lt=new RegExp("for ?\\("),kt=new RegExp("(/if|/for)"),Bt=new RegExp("\\((.*)\\)",""),Gt=new RegExp("^[0-9]+$","g"),zt=new RegExp("[\\w\"'.\\s+]+","g"),Yt=new RegExp('"(.*?)"',"g"),_t=new RegExp("[\\w\"'@#$.\\s+]+","g"),Xt=new RegExp("\\${([^}]*)}","g"),Wt=/^\..*/gm,$t=/\\/gi,Vt=/\\\\/gi,Ut=new RegExp("[\\w\"'@#$.\\s+]+","g"),Kt=/\window\./gm,qt=/^[\n\r.]+\<tr|^\<tr/,Zt=/^[\n\r.]+\<svg|^\<path|^\<g/,Jt={},Qt={compile:(new(function(){function e(){}return e.prototype.compile=function(e,t,r){return void 0===t&&(t={}),H(e,t)},e}())).compile},er=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tr=/(?:#([\w-]+)|(\w+)|\.([\w-]+))/g,rr=/^(\.|#)/,nr={".":"className","#":"id"},ir="(?=.*?\\b{value}\\b)",or={className:"attributes.className",id:"attributes.id",tagName:"tagName"},ar=["area","base","basefont","br","col","frame","hr","img","input","link","meta","param","embed","command","keygen","source","track","wbr"],sr=["a","address","article","applet","aside","audio","blockquote","button","canvas","center","dd","del","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frameset","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","ins","isindex","li","map","menu","noframes","noscript","object","ol","output","p","pre","section","script","table","tbody","td","tfoot","th","thead","tr","ul","video"],lr=["abbr","acronym","applet","b","basefont","bdo","big","br","button","cite","code","del","dfn","em","font","i","iframe","img","input","ins","kbd","label","map","object","q","s","samp","script","select","small","span","strike","strong","sub","sup","textarea","tt","u","var"],cr=["colgroup","dd","dt","li","options","p","td","tfoot","th","thead","tr"],ur=["checked","compact","declare","defer","disabled","ismap","multiple","nohref","noresize","noshade","nowrap","readonly","selected"],pr=["Script","style"],hr={tabindex:"tabIndex"},dr=/^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,mr=/^<\/([-A-Za-z0-9_]+)[^>]*>/,fr=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;!function(e){function t(e,t){var r=[],n=u({},{},t,!0);if(!p(t)&&Object.keys(t).length&&(n.innerHTML&&(r=d(n.innerHTML),delete n.innerHTML),n.attrs&&(u(n,n.attrs),delete n.attrs),n.styles)){for(var i=n.styles.split(";"),o={},a=0,s=i.length;a<s;a++){var l=i[a].split(":");o[l[0]]=l[1]}delete n.styles,n.style=o}return{tagName:e,attributes:n||{},children:r}}function r(e,t){t&&e&&e.forEach(function(e){return s(e)&&(e.parent&&a(e),e.parent=t),e})}function n(e,t){r(e,t),t.children?t.children=t.children.concat(e):t.children=[].concat(e)}function o(e,t){if(r(e,t),t.children&&t.children.length)for(var n=e.length-1;n>=0;n--)t.children.unshift(e[n]);else t.children=[],t.children.concat(e)}function a(e){var t=e.parent;if(t){var r=t.children.indexOf(e);-1!==r&&t.children.splice(r)}return t}function l(e){for(var t=e.ele,r=e.selector,n=e.selectAll,i=e.immediateParent,o=r.split(" "),a=t,s=0,u=o.length;s<u;s++){var p=!1,d=a,m=o[s],f=[];if(er.test(m))c(m,f);else if(-1===m.indexOf(">"))for(var g=0,v=m.match(tr);g<v.length;g++)c(v[g],f);else if(-1!==m.indexOf(">")){p=!0;for(var y=t,b=void 0,M=0,D=0,w=m.split(">");D<w.length;D++){var E=w[D];if(!y)break;if(y.length){for(var P=[],S=0,O=y;S<O.length;S++){var C=O[S];P=P.concat(l({ele:C,selector:E,selectAll:n,immediateParent:!!M}))}b=P}else b=l({ele:y,selector:E,selectAll:n,immediateParent:!!M});M++,y=b}b&&(a=b)}if(!p)if(d.length){for(var T=[],j=0,x=d;j<x.length;j++){var N=x[j];T=T.concat(h(N,f,n,i))}a=T}else a=h(d,f,n,i)}return n?a:a[0]||null}function c(e,t){var r=e.match(rr),n={};if(r){var i=nr[r[0]];if("className"===i){var o=t.filter(function(e){return e.hasOwnProperty("className")})[0],a=!1;o||(a=!0,o={});var s=o[i]||"";o[i]=s+ir.replace("{value}",e.replace(".","")),a&&t.push(o)}else n[i]=e.replace(r[0],""),t.push(n)}else t.push({tagName:e})}function h(e,t,r,n){if(e.children){var o=e.children.filter(function(e){if("string"!=typeof e){for(var r=!0,n=0,o=t;n<o.length;n++){var a=o[n],s=Object.keys(a)[0],l=a[s],c=i(or[s],e);if("className"===s){if(!new RegExp("^"+l+".*$").test(c)){r=!1;break}}else if(c!==l){r=!1;break}}return r}return!1});return n||o.length&&!r||e.children.forEach(function(e){s(e)&&(o=o.concat(h(e,t,r)))}),o}return[]}function d(e){function t(e,t,n){if(t=t.toLowerCase(),f(sr,t))for(;m(a)&&f(lr,m(a));)r("",m(a));f(cr,t)&&m(a)&&r("",t);var i=f(ar,t);i||a.push(t);var l={};n.replace(fr,function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[2]?r[2]:r[3]?r[3]:r[4]?r[4]:f(ur,t)?t:"";if("style"===t){for(var o=i.split(";"),a={},s=0,c=o.length;s<c;s++){var u=o[s].split(":");a[u[0]]=u[1]}i=a}t=hr[t]||t,l[t]=i}),l["data-id"]=_();var c={tagName:t,attributes:l};if(i){var u=s[0]||o;void 0===u.children&&(u.children=[]),c.parent=u,u.children.push(c)}else s.unshift(c)}function r(e,t){var r;if(t)for(r=a.length-1;r>=0&&a[r]!==t;r--);else r=0;if(r>=0){for(var n=s.length-1;n>=r;n--){var i=s.shift();if(0===s.length)o.push(i);else{var l=s[0];void 0===l.children&&(l.children=[]),i.parent=l,l.children.push(i)}}a.length=r}}function n(e){if(0===s.length)o.push(e);else{var t=s[0];void 0===t.children&&(t.children=[]),t.children.push(e)}}for(var i,o=[],a=[],s=[];e;){i=!0;var l=m(a);if(l&&f(pr,l))e=e.replace(new RegExp("([\\s\\S]*?)</"+m(s)+"[^>]*>"),function(e,t){return t=t.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,"$1$2"),n(t),""}),r("",m(a));else{if(0===e.indexOf("</"))(c=e.match(mr))&&(e=e.substring(c[0].length),c[0].replace(mr,r)),i=!1;else if(0===e.indexOf("<")){var c=e.match(dr);c&&(e=e.substring(c[0].length),c[0].replace(dr,t)),i=!1}if(i){var u=e.indexOf("<"),p=u<0?e:e.substring(0,u);e=u<0?"":e.substring(u),n(p)}}}return o}function m(e){return e[e.length-1]}function f(e,t){return-1!==e.indexOf(t)}function g(e,t){return s(e)?t?u({},{},e,!0):{tagName:e.tagName,attributes:e.attributes}:e.cloneNode(t)}function v(e,t){e.attributes.style?e.attributes.style=u({},t):e.attributes.style=u(e.attributes.style,t)}e.createElement=t,e.assignParent=r,e.append=n,e.prepend=o,e.detach=a,e.vDomSelector=l,e.accessElement=h,e.ConvertHTMLToJSon=d,e.cloneNode=g,e.setStyleAttribute=v}(jt||(jt={}));var gr=/^svg|^path|^g/,vr=new RegExp("]"),yr=function(){function e(e,t){this.isRendered=!1,this.isComplexArraySetter=!1,this.isServerRendered=!1,this.allowServerDataBinding=!0,this.isProtectedOnChange=!0,this.properties={},this.changedProperties={},this.oldProperties={},this.bulkChanges={},this.refreshing=!1,this.ignoreCollectionWatch=!1,this.finalUpdate=function(){},this.childChangedProperties={},this.modelObserver=new bt(this),h(t)||(this.element="string"==typeof t?document.querySelector(t):t,p(this.element)||(this.isProtectedOnChange=!1,this.addInstance())),h(e)||this.setProperties(e,!0),this.isDestroyed=!1}return e.prototype.setProperties=function(e,t){var r=this.isProtectedOnChange;this.isProtectedOnChange=!!t,c(this,e),!0!==t?(c(this.changedProperties,e),this.dataBind()):w()&&this.isRendered&&this.serverDataBind(e),this.finalUpdate(),this.changedProperties={},this.oldProperties={},this.isProtectedOnChange=r},e.callChildDataBind=function(e,t){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t[i]instanceof Array)for(var o=0,a=t[i];o<a.length;o++){var s=a[o];void 0!==s.dataBind&&s.dataBind()}else t[i].dataBind()}},e.prototype.clearChanges=function(){this.finalUpdate(),this.changedProperties={},this.oldProperties={},this.childChangedProperties={}},e.prototype.dataBind=function(){if(e.callChildDataBind(this.childChangedProperties,this),Object.getOwnPropertyNames(this.changedProperties).length){var t=this.isProtectedOnChange,r=this.changedProperties,n=this.oldProperties;this.clearChanges(),this.isProtectedOnChange=!0,this.onPropertyChanged(r,n),this.isProtectedOnChange=t}},e.prototype.serverDataBind=function(e){if(w()){e=e||{},u(this.bulkChanges,{},e,!0);this.allowServerDataBinding&&window.sfBlazor.updateModel&&(window.sfBlazor.updateModel(this),this.bulkChanges={})}},e.prototype.saveChanges=function(e,t,r){if(w()){var i={};i[e]=t,this.serverDataBind(i)}this.isProtectedOnChange||(this.oldProperties[e]=r,this.changedProperties[e]=t,this.finalUpdate(),this.finalUpdate=n(this.dataBind.bind(this)))},e.prototype.addEventListener=function(e,t){this.modelObserver.on(e,t)},e.prototype.removeEventListener=function(e,t){this.modelObserver.off(e,t)},e.prototype.trigger=function(e,t,r,n){var o=this;if(!0!==this.isDestroyed){var a=this.isProtectedOnChange;this.isProtectedOnChange=!1;var s=this.modelObserver.notify(e,t,r,n);if(vr.test(e)){var l=i(e,this);if(l){if(window.Blazor){var c=l.call(this,t);c&&"function"==typeof c.then?r?c.then(function(e){r&&(e="string"==typeof e&&o.modelObserver.isJson(e)?JSON.parse(e):e,r.call(o,e))}).catch(function(e){n&&(e="string"==typeof e&&o.modelObserver.isJson(e)?JSON.parse(e):e,n.call(o,e))}):s=c:r&&r.call(this,t)}else l.call(this,t),r&&r.call(this,t)}else r&&r.call(this,t)}return this.isProtectedOnChange=a,s}},e.prototype.addInstance=function(){var e="e-"+this.getModuleName().toLowerCase();q([this.element],["e-lib",e]),p(this.element.ej2_instances)?o("ej2_instances",[this],this.element):this.element.ej2_instances.push(this)},e.prototype.destroy=function(){var e=this;this.element.ej2_instances=this.element.ej2_instances.filter(function(t){return t!==e}),Z([this.element],["e-"+this.getModuleName()]),0===this.element.ej2_instances.length&&Z([this.element],["e-lib"]),this.clearChanges(),this.modelObserver.destroy(),this.isDestroyed=!0},e}(),br=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Dr=function(e){function t(t){var r=e.call(this,t,void 0)||this;return r.easing={ease:"cubic-bezier(0.250, 0.100, 0.250, 1.000)",linear:"cubic-bezier(0.250, 0.250, 0.750, 0.750)",easeIn:"cubic-bezier(0.420, 0.000, 1.000, 1.000)",easeOut:"cubic-bezier(0.000, 0.000, 0.580, 1.000)",easeInOut:"cubic-bezier(0.420, 0.000, 0.580, 1.000)",elasticInOut:"cubic-bezier(0.5,-0.58,0.38,1.81)",elasticIn:"cubic-bezier(0.17,0.67,0.59,1.81)",elasticOut:"cubic-bezier(0.7,-0.75,0.99,1.01)"},r}br(t,e),r=t,t.prototype.animate=function(e,t){t=t||{};var n=this.getModel(t);if("string"==typeof e)for(var i=0,o=Array.prototype.slice.call(se(e,document));i<o.length;i++){var a=o[i];n.element=a,r.delayAnimation(n)}else n.element=e,r.delayAnimation(n)},t.stop=function(e,t){e.style.animation="",e.removeAttribute("e-animate");var r=e.getAttribute("e-animation-id");if(r){var n=parseInt(r,10);cancelAnimationFrame(n),e.removeAttribute("e-animation-id")}t&&t.end&&t.end.call(this,t)},t.delayAnimation=function(e){e.delay?setTimeout(function(){r.applyAnimation(e)},e.delay):r.applyAnimation(e)},t.applyAnimation=function(e){var t=this;e.timeStamp=0;var r=0,n=0,i=0,o=0,a=e.duration;e.element.setAttribute("e-animate","true");var s=function(l){try{if(l){o=0===o?l:o,e.timeStamp=l+e.timeStamp-o,o=l,!r&&e.begin&&e.begin.call(t,e),r+=1;var c=e.timeStamp/r;e.timeStamp<a&&e.timeStamp+c<a&&e.element.getAttribute("e-animate")?(e.element.style.animation=e.name+" "+e.duration+"ms "+e.timingFunction,e.progress&&e.progress.call(t,e),requestAnimationFrame(s)):(cancelAnimationFrame(n),e.element.removeAttribute("e-animation-id"),e.element.removeAttribute("e-animate"),e.element.style.animation="",e.end&&e.end.call(t,e))}else i=performance.now(),n=requestAnimationFrame(s),e.element.setAttribute("e-animation-id",n.toString())}catch(r){cancelAnimationFrame(n),e.element.removeAttribute("e-animation-id"),e.fail&&e.fail.call(t,r)}};s()},t.prototype.getModel=function(e){return{name:e.name||this.name,delay:e.delay||this.delay,duration:void 0!==e.duration?e.duration:this.duration,begin:e.begin||this.begin,end:e.end||this.end,fail:e.fail||this.fail,progress:e.progress||this.progress,timingFunction:this.easing[e.timingFunction]?this.easing[e.timingFunction]:e.timingFunction||this.easing[this.timingFunction]}},t.prototype.onPropertyChanged=function(e,t){},t.prototype.getModuleName=function(){return"animation"},t.prototype.destroy=function(){};var r;return Mr([Re("FadeIn")],t.prototype,"name",void 0),Mr([Re(400)],t.prototype,"duration",void 0),Mr([Re("ease")],t.prototype,"timingFunction",void 0),Mr([Re(0)],t.prototype,"delay",void 0),Mr([Be()],t.prototype,"progress",void 0),Mr([Be()],t.prototype,"begin",void 0),Mr([Be()],t.prototype,"end",void 0),Mr([Be()],t.prototype,"fail",void 0),t=r=Mr([Ge],t)}(yr);e.isRippleEnabled=!1;var wr,Er=function(){function e(e){this.loadedModules=[],this.parent=e}return e.prototype.inject=function(e,t){var n=e.length;if(0===n)return void this.clean();this.loadedModules.length&&this.clearUnusedModule(e);for(var i=0;i<n;i++)for(var a=e[i],s=0,l=t;s<l.length;s++){var c=l[s],u=a.member;if(c.prototype.getModuleName()===a.member&&!this.isModuleLoaded(u)){var p=r(c,a.args),h=this.getMemberName(u);a.isProperty?o(h,c,this.parent):o(h,p,this.parent);var d=a;d.member=h,this.loadedModules.push(d)}}},e.prototype.clean=function(){for(var e=0,t=this.loadedModules;e<t.length;e++){var r=t[e];r.isProperty||i(r.member,this.parent).destroy()}this.loadedModules=[]},e.prototype.clearUnusedModule=function(e){for(var t=this,r=e.map(function(e){return t.getMemberName(e.member)}),n=0,o=this.loadedModules.filter(function(e){return-1===r.indexOf(e.member)});n<o.length;n++){var s=o[n];s.isProperty||i(s.member,this.parent).destroy(),this.loadedModules.splice(this.loadedModules.indexOf(s),1),a(this.parent,s.member)}},e.prototype.getMemberName=function(e){return e[0].toLowerCase()+e.substring(1)+"Module"},e.prototype.isModuleLoaded=function(e){for(var t=0,r=this.loadedModules;t<r.length;t++)if(r[t].member===this.getMemberName(e))return!0;return!1},e}(),Pr=function(){function e(e,t,r,n){this.isComplexArraySetter=!1,this.properties={},this.changedProperties={},this.childChangedProperties={},this.oldProperties={},this.finalUpdate=function(){},this.callChildDataBind=i("callChildDataBind",yr),this.parentObj=e,this.controlParent=this.parentObj.controlParent||this.parentObj,this.propName=t,this.isParentArray=n,this.setProperties(r,!0)}return e.prototype.updateChange=function(e,t){!0===e?this.parentObj.childChangedProperties[t]=e:delete this.parentObj.childChangedProperties[t],this.parentObj.updateChange&&this.parentObj.updateChange(e,this.parentObj.propName)},e.prototype.updateTimeOut=function(){if(this.parentObj.updateTimeOut)this.parentObj.finalUpdate(),this.parentObj.updateTimeOut();else{var e=setTimeout(this.parentObj.dataBind.bind(this.parentObj)),t=function(){clearTimeout(e)};this.finalUpdate=t}},e.prototype.clearChanges=function(){this.finalUpdate(),this.updateChange(!1,this.propName),this.oldProperties={},this.changedProperties={}},e.prototype.setProperties=function(e,t){!0===t?(c(this,e),this.updateChange(!1,this.propName),this.clearChanges()):c(this,e)},e.prototype.dataBind=function(){if(this.callChildDataBind(this.childChangedProperties,this),this.isParentArray){var e=this.parentObj[this.propName].indexOf(this);Object.keys(this.changedProperties).length&&(o(this.propName+"."+e,this.changedProperties,this.parentObj.changedProperties),o(this.propName+"."+e,this.oldProperties,this.parentObj.oldProperties))}else this.parentObj.changedProperties[this.propName]=this.changedProperties,this.parentObj.oldProperties[this.propName]=this.oldProperties;this.clearChanges()},e.prototype.saveChanges=function(e,t,r,n){this.controlParent.isProtectedOnChange||(n||this.serverDataBind(e,t,!0),this.oldProperties[e]=r,this.changedProperties[e]=t,this.updateChange(!0,this.propName),this.finalUpdate(),this.updateTimeOut())},e.prototype.serverDataBind=function(e,t,r,n){if(w()&&!this.parentObj.isComplexArraySetter){var i,o={},a=r?this.getParentKey(!0)+"."+e:e;if(-1!==a.indexOf(".")){var s=a.split(".");i=o;for(var l=0;l<s.length;l++){var c=l===s.length-1;i[s[l]]=c?t:{},i=c?i:i[s[l]]}}else o[a]={},i=o[a],o[a][e]=t;if(this.isParentArray){i.ejsAction=n||"none"}this.controlParent.serverDataBind(o)}},e.prototype.getParentKey=function(e){var t="",r=this.propName;if(this.isParentArray){t=this.parentObj[this.propName].indexOf(this);var n=this.parentObj[this.propName].length;n=e?n:n>0?n-1:0,r+=t=-1!==t?"-"+t:"-"+n}return this.controlParent!==this.parentObj&&(r=this.parentObj.getParentKey()+"."+this.propName+t),r},e}(),Sr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Or=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Cr=0,Tr=0;e.versionBasedStatePersistence=!1;var jr=function(t){function r(r,n){var i=t.call(this,r,n)||this;return i.randomId=O(),i.isStringTemplate=!1,i.needsID=!1,i.isReactHybrid=!1,p(i.enableRtl)&&i.setProperties({enableRtl:e.rightToLeft},!0),p(i.locale)&&i.setProperties({locale:e.defaultCulture},!0),i.moduleLoader=new Er(i),i.localObserver=new bt(i),Mt.on("notifyExternalChange",i.detectFunction,i,i.randomId),h(n)||i.appendTo(),i}return Sr(r,t),r.prototype.requiredModules=function(){return[]},r.prototype.destroy=function(){this.isDestroyed||(this.enablePersistence&&this.setPersistData(),this.localObserver.destroy(),this.refreshing||(Z([this.element],["e-control"]),this.trigger("destroyed",{cancel:!1}),t.prototype.destroy.call(this),this.moduleLoader.clean(),Mt.off("notifyExternalChange",this.detectFunction,this.randomId)))},r.prototype.refresh=function(){this.refreshing=!0,this.moduleLoader.clean(),this.destroy(),this.clearChanges(),this.localObserver=new bt(this),this.preRender(),this.injectModules(),this.render(),this.refreshing=!1},r.prototype.accessMount=function(){this.mount&&!this.isReactHybrid&&this.mount()},r.prototype.getRootElement=function(){return this.isReactHybrid?this.actualElement:this.element},r.prototype.getLocalData=function(){var t=this.getModuleName()+this.element.id;return e.versionBasedStatePersistence?window.localStorage.getItem(t+this.ej2StatePersistenceVersion):window.localStorage.getItem(t)},r.prototype.appendTo=function(e){if(p(e)||"string"!=typeof e?p(e)||(this.element=e):this.element=ae(e,document),!p(this.element)){var r="e-"+this.getModuleName().toLowerCase();q([this.element],["e-control",r]),this.isProtectedOnChange=!1,this.needsID&&!this.element.id&&(this.element.id=this.getUniqueID(this.getModuleName())),this.enablePersistence&&(this.mergePersistData(),window.addEventListener("unload",this.setPersistData.bind(this)));var n=i("ej2_instances",this.element);n&&-1!==n.indexOf(this)||t.prototype.addInstance.call(this),this.preRender(),this.injectModules(),this.render(),this.mount?this.accessMount():this.trigger("created")}},r.prototype.renderComplete=function(e){if(w()){window.sfBlazor.renderComplete(this.element,e)}this.isRendered=!0},r.prototype.dataBind=function(){this.injectModules(),t.prototype.dataBind.call(this)},r.prototype.on=function(e,t,r){if("string"==typeof e)this.localObserver.on(e,t,r);else for(var n=0,i=e;n<i.length;n++){var o=i[n];this.localObserver.on(o.event,o.handler,o.context)}},r.prototype.off=function(e,t){if("string"==typeof e)this.localObserver.off(e,t);else for(var r=0,n=e;r<n.length;r++){var i=n[r];this.localObserver.off(i.event,i.handler)}},r.prototype.notify=function(e,t){!0!==this.isDestroyed&&this.localObserver.notify(e,t)},r.prototype.getInjectedModules=function(){return this.injectedModules},r.Inject=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.prototype.injectedModules||(this.prototype.injectedModules=[]);for(var r=0;r<e.length;r++)-1===this.prototype.injectedModules.indexOf(e[r])&&this.prototype.injectedModules.push(e[r])},r.prototype.createElement=function(e,t,r){return r&&this.isReactHybrid?(t&&(t={}),t["data-id"]=_(),jt.createElement(e,t)):K(e,t)},r.prototype.triggerStateChange=function(e,t){this.isReactHybrid&&(this.setState(),this.currentContext={calls:e,args:t})},r.prototype.injectModules=function(){this.injectedModules&&this.injectedModules.length&&this.moduleLoader.inject(this.requiredModules(),this.injectedModules)},r.prototype.detectFunction=function(e){var t=Object.keys(e);t.length&&(this[t[0]]=e[t[0]])},r.prototype.mergePersistData=function(){var t;p(t=e.versionBasedStatePersistence?window.localStorage.getItem(this.getModuleName()+this.element.id+this.ej2StatePersistenceVersion):window.localStorage.getItem(this.getModuleName()+this.element.id))||""===t||this.setProperties(JSON.parse(t),!0)},r.prototype.setPersistData=function(){this.isDestroyed||(e.versionBasedStatePersistence?window.localStorage.setItem(this.getModuleName()+this.element.id+this.ej2StatePersistenceVersion,this.getPersistData()):window.localStorage.setItem(this.getModuleName()+this.element.id,this.getPersistData()))},r.prototype.renderReactTemplates=function(){},r.prototype.clearTemplate=function(e,t){},r.prototype.getUniqueID=function(e){return this.isHistoryChanged()&&(Cr=0),wr=this.pageID(location.href),Tr=history.length,e+"_"+wr+"_"+Cr++},r.prototype.pageID=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return Math.abs(t)},r.prototype.isHistoryChanged=function(){return wr!==this.pageID(location.href)||Tr!==history.length},r.prototype.addOnPersist=function(e){for(var t=this,r={},n=0,a=e;n<a.length;n++){var s=a[n],l=void 0;h(l=i(s,this))||o(s,this.getActualProperties(l),r)}return JSON.stringify(r,function(e,r){return t.getActualProperties(r)})},r.prototype.getActualProperties=function(e){return e instanceof Pr?i("properties",e):e},r.prototype.ignoreOnPersist=function(e){return JSON.stringify(this.iterateJsonProperties(this.properties,e))},r.prototype.iterateJsonProperties=function(e,t){for(var r={},n=this,i=0,o=Object.keys(e);i<o.length;i++)!function(i){if(-1===t.indexOf(i)){var o=e[i];if("object"!=typeof o||o instanceof Array)r[i]=o;else{var a=t.filter(function(e){return new RegExp(i+".").test(e)}).map(function(e){return e.replace(i+".","")});r[i]=n.iterateJsonProperties(n.getActualProperties(o),a)}}}(o[i]);return r},Or([Re(!1)],r.prototype,"enablePersistence",void 0),Or([Re()],r.prototype,"enableRtl",void 0),Or([Re()],r.prototype,"locale",void 0),r=Or([Ge],r)}(yr);!function(){"undefined"!=typeof window&&window.addEventListener("popstate",function(){Cr=0})}();var xr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Nr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},Fr={left:0,top:0,bottom:0,right:0},Ar={isDragged:!1},Rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xr(t,e),Nr([Re(0)],t.prototype,"left",void 0),Nr([Re(0)],t.prototype,"top",void 0),t}(Pr),Ir=function(e){function t(t,n){var i=e.call(this,n,t)||this;return i.dragLimit=r.getDefaultPosition(),i.borderWidth=r.getDefaultPosition(),i.padding=r.getDefaultPosition(),i.diffX=0,i.prevLeft=0,i.prevTop=0,i.dragProcessStarted=!1,i.tapHoldTimer=0,i.externalInitialize=!1,i.diffY=0,i.parentScrollX=0,i.parentScrollY=0,i.droppables={},i.bind(),i}xr(t,e),r=t,t.prototype.bind=function(){this.toggleEvents(),xt.isIE&&q([this.element],"e-block-touch"),this.droppables[this.scope]={}},t.getDefaultPosition=function(){return u({},Fr)},t.prototype.toggleEvents=function(e){var t;h(this.handle)||(t=ae(this.handle,this.element));var r=this.enableTapHold&&xt.isDevice&&xt.isTouch?this.mobileInitialize:this.initialize;e?Nt.remove(t||this.element,xt.touchStartEvent,r):Nt.add(t||this.element,xt.touchStartEvent,r,this)},t.prototype.mobileInitialize=function(e){var t=this,r=e.currentTarget;this.tapHoldTimer=setTimeout(function(){t.externalInitialize=!0,t.removeTapholdTimer(),t.initialize(e,r)},this.tapHoldThreshold),Nt.add(document,xt.touchMoveEvent,this.removeTapholdTimer,this),Nt.add(document,xt.touchEndEvent,this.removeTapholdTimer,this)},t.prototype.removeTapholdTimer=function(){clearTimeout(this.tapHoldTimer),Nt.remove(document,xt.touchMoveEvent,this.removeTapholdTimer),Nt.remove(document,xt.touchEndEvent,this.removeTapholdTimer)},t.prototype.getScrollableParent=function(e,t){var r={vertical:"scrollHeight",horizontal:"scrollWidth"},n={vertical:"clientHeight",horizontal:"clientWidth"};return p(e)?null:e[r[t]]>e[n[t]]&&("vertical"===t?e.scrollTop>0:e.scrollLeft>0)?("vertical"===t?(this.parentScrollY=this.parentScrollY+(0===this.parentScrollY?e.scrollTop:e.scrollTop-this.parentScrollY),this.tempScrollHeight=e.scrollHeight):(this.parentScrollX=this.parentScrollX+(0===this.parentScrollX?e.scrollLeft:e.scrollLeft-this.parentScrollX),this.tempScrollWidth=e.scrollWidth),p(e)?e:this.getScrollableParent(e.parentNode,t)):this.getScrollableParent(e.parentNode,t)},t.prototype.getScrollableValues=function(){this.parentScrollX=0,this.parentScrollY=0;this.element.classList.contains("e-dialog")&&this.element.classList.contains("e-dlg-modal"),this.getScrollableParent(this.element.parentNode,"vertical"),this.getScrollableParent(this.element.parentNode,"horizontal")},t.prototype.initialize=function(e,t){if(this.currentStateTarget=e.target,!this.isDragStarted()){if(this.isDragStarted(!0),this.externalInitialize=!1,this.target=e.currentTarget||t,this.dragProcessStarted=!1,this.abort){var r=this.abort;"string"==typeof r&&(r=[r]);for(var n=0;n<r.length;n++)if(!p(ce(e.target,r[n])))return void(this.isDragStarted()&&this.isDragStarted(!0))}this.preventDefault&&!h(e.changedTouches)&&"touchstart"!==e.type&&e.preventDefault(),this.element.setAttribute("aria-grabbed","true");var i=this.getCoordinates(e);if(this.initialPosition={x:i.pageX,y:i.pageY},!this.clone){var o=this.element.getBoundingClientRect();this.getScrollableValues(),e.clientX===e.pageX&&(this.parentScrollX=0),e.clientY===e.pageY&&(this.parentScrollY=0),this.relativeXPosition=i.pageX-(o.left+this.parentScrollX),this.relativeYPosition=i.pageY-(o.top+this.parentScrollY)}this.externalInitialize?this.intDragStart(e):(Nt.add(document,xt.touchMoveEvent,this.intDragStart,this),Nt.add(document,xt.touchEndEvent,this.intDestroy,this)),this.toggleEvents(!0),"touchstart"!==e.type&&this.isPreventSelect&&document.body.classList.add("e-prevent-select"),this.externalInitialize=!1,Nt.trigger(document.documentElement,xt.touchStartEvent,e)}},t.prototype.intDragStart=function(e){this.removeTapholdTimer();var t=!h(e.changedTouches);if(!t||1===e.changedTouches.length){t&&e.preventDefault();var r,n=this.getCoordinates(e),i=getComputedStyle(this.element);this.margin={left:parseInt(i.marginLeft,10),top:parseInt(i.marginTop,10),right:parseInt(i.marginRight,10),bottom:parseInt(i.marginBottom,10)};var o=this.element;if(this.clone&&this.dragTarget){var a=ce(e.target,this.dragTarget);p(a)||(o=a)}this.isReplaceDragEle&&(o=this.currentStateCheck(e.target,o)),this.offset=this.calculateParentPosition(o),this.position=this.getMousePosition(e,this.isDragScroll);var s=this.initialPosition.x-n.pageX,l=this.initialPosition.y-n.pageY;if(Math.sqrt(s*s+l*l)>=this.distance||this.externalInitialize){var c=this.getHelperElement(e);if(!c||p(c))return;var u=this.helperElement=c;if(this.parentClientRect=this.calculateParentPosition(u.offsetParent),this.dragStart){var d={event:e,element:o,target:this.getProperTargetElement(e),bindEvents:w()?this.bindDragEvents.bind(this):null,dragElement:u};this.trigger("dragStart",d)}this.dragArea?this.setDragArea():(this.dragLimit={left:0,right:0,bottom:0,top:0},this.borderWidth={top:0,left:0}),r={left:this.position.left-this.parentClientRect.left,top:this.position.top-this.parentClientRect.top},this.clone&&!this.enableTailMode&&(this.diffX=this.position.left-this.offset.left,this.diffY=this.position.top-this.offset.top),this.getScrollableValues();var m=getComputedStyle(o),f=parseFloat(m.marginTop);this.clone&&0!==f&&(r.top+=f);var g=this.getProcessedPositionValue({top:r.top-this.diffY+"px",left:r.left-this.diffX+"px"});this.dragElePosition={top:r.top,left:r.left},he(u,this.getDragPosition({position:"absolute",left:g.left,top:g.top})),Nt.remove(document,xt.touchMoveEvent,this.intDragStart),Nt.remove(document,xt.touchEndEvent,this.intDestroy),w()||this.bindDragEvents(u)}}},t.prototype.bindDragEvents=function(e){Q(e)?(Nt.add(document,xt.touchMoveEvent,this.intDrag,this),Nt.add(document,xt.touchEndEvent,this.intDragStop,this),this.setGlobalDroppables(!1,this.element,e)):(this.toggleEvents(),document.body.classList.remove("e-prevent-select"))},t.prototype.elementInViewport=function(e){for(this.top=e.offsetTop,this.left=e.offsetLeft,this.width=e.offsetWidth,this.height=e.offsetHeight;e.offsetParent;)e=e.offsetParent,this.top+=e.offsetTop,this.left+=e.offsetLeft;return this.top>=window.pageYOffset&&this.left>=window.pageXOffset&&this.top+this.height<=window.pageYOffset+window.innerHeight&&this.left+this.width<=window.pageXOffset+window.innerWidth},t.prototype.getProcessedPositionValue=function(e){return this.queryPositionInfo?this.queryPositionInfo(e):e},t.prototype.calculateParentPosition=function(e){if(p(e))return{left:0,top:0};var t=e.getBoundingClientRect(),r=getComputedStyle(e);return{left:t.left+window.pageXOffset-parseInt(r.marginLeft,10),top:t.top+window.pageYOffset-parseInt(r.marginTop,10)}},t.prototype.intDrag=function(e){if(h(e.changedTouches)||1===e.changedTouches.length){var t,r;this.position=this.getMousePosition(e,this.isDragScroll);var n=this.getDocumentWidthHeight("Height");n<this.position.top&&(this.position.top=n);var i=this.getDocumentWidthHeight("Width");if(i<this.position.left&&(this.position.left=i),this.drag){var o=this.getProperTargetElement(e);this.trigger("drag",{event:e,element:this.element,target:o})}var a=this.checkTargetElement(e);if(a.target&&a.instance){var s=!0;this.hoverObject&&(this.hoverObject.instance!==a.instance?this.triggerOutFunction(e,a):s=!1),s&&(a.instance.dragData[this.scope]=this.droppables[this.scope],a.instance.intOver(e,a.target),this.hoverObject=a)}else this.hoverObject&&this.triggerOutFunction(e,a);var l=this.droppables[this.scope].helper;this.parentClientRect=this.calculateParentPosition(this.helperElement.offsetParent);var c=this.parentClientRect.left,u=this.parentClientRect.top,d=this.getCoordinates(e),m=d.pageX,f=d.pageY,g=this.position.left-this.diffX,v=this.position.top-this.diffY,y=getComputedStyle(l),b=parseFloat(y.marginTop);if(this.dragArea){if(this.pageX!==m||this.skipDistanceCheck){var M=l.offsetWidth+(parseFloat(y.marginLeft)+parseFloat(y.marginRight));t=this.dragLimit.left>g&&g>0?this.dragLimit.left:this.dragLimit.right+window.pageXOffset<g+M&&g>0?g-(g-this.dragLimit.right)+window.pageXOffset-M:g<0?this.dragLimit.left:g}if(this.pageY!==f||this.skipDistanceCheck){var D=l.offsetHeight+(parseFloat(y.marginTop)+parseFloat(y.marginBottom));r=this.dragLimit.top>v&&v>0?this.dragLimit.top:this.dragLimit.bottom+window.pageYOffset<v+D&&v>0?v-(v-this.dragLimit.bottom)+window.pageYOffset-D:v<0?this.dragLimit.top:v}}else t=g,r=v;var w=u+this.borderWidth.top,E=c+this.borderWidth.left;this.dragProcessStarted&&(p(r)&&(r=this.prevTop),p(t)&&(t=this.prevLeft));var P,S;if(this.dragArea){if(this.dragLimit.top=this.clone?this.dragLimit.top:0,P=r-w<0?this.dragLimit.top:r-w,S=t-E<0?this.dragElePosition.left:t-E,b>0&&(this.clone&&(P+=this.element.offsetTop,v<0&&(this.element.offsetTop+v>=0?P=this.element.offsetTop+v:P-=this.element.offsetTop),P=this.dragLimit.bottom<P?this.dragLimit.bottom:P),r-w<0))if(v+b+(l.offsetHeight-w)>=0){var O=this.dragLimit.top+v-w;O+b+w<0?P-=b+w:P=O}else P-=b+w}else P=r-w,S=t-E;var C=this.getProcessedPositionValue({top:P+"px",left:S+"px"});he(l,this.getDragPosition(C)),!this.elementInViewport(l)&&this.enableAutoScroll&&this.helperElement.scrollIntoView(),this.dragProcessStarted=!0,this.prevLeft=t,this.prevTop=r,this.position.left=t,this.position.top=r,this.pageX=m,this.pageY=f}},t.prototype.triggerOutFunction=function(e,t){this.hoverObject.instance.intOut(e,t.target),this.hoverObject.instance.dragData[this.scope]=null,this.hoverObject=null},t.prototype.getDragPosition=function(e){var t=u({},e);return this.axis&&("x"===this.axis?delete t.top:"y"===this.axis&&delete t.left),t},t.prototype.getDocumentWidthHeight=function(e){var t=document.body,r=document.documentElement;return Math.max(t["scroll"+e],r["scroll"+e],t["offset"+e],r["offset"+e],r["client"+e])},t.prototype.intDragStop=function(e){if(this.dragProcessStarted=!1,h(e.changedTouches)||1===e.changedTouches.length){if(-1!==["touchend","pointerup","mouseup"].indexOf(e.type)){if(this.dragStop){var t=this.getProperTargetElement(e);this.trigger("dragStop",{event:e,element:this.element,target:t,helper:this.helperElement})}this.intDestroy(e)}else this.element.setAttribute("aria-grabbed","false");var r=this.checkTargetElement(e);r.target&&r.instance&&(r.instance.dragStopCalled=!0,r.instance.dragData[this.scope]=this.droppables[this.scope],r.instance.intDrop(e,r.target)),this.setGlobalDroppables(!0),document.body.classList.remove("e-prevent-select")}},t.prototype.intDestroy=function(e){this.dragProcessStarted=!1,this.toggleEvents(),document.body.classList.remove("e-prevent-select"),this.element.setAttribute("aria-grabbed","false"),Nt.remove(document,xt.touchMoveEvent,this.intDragStart),Nt.remove(document,xt.touchEndEvent,this.intDragStop),Nt.remove(document,xt.touchEndEvent,this.intDestroy),Nt.remove(document,xt.touchMoveEvent,this.intDrag),this.isDragStarted()&&this.isDragStarted(!0)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.getModuleName=function(){return"draggable"},t.prototype.isDragStarted=function(e){return e&&(Ar.isDragged=!Ar.isDragged),Ar.isDragged},t.prototype.setDragArea=function(){var e,t,r,n=0,i=0;if(r="string"===typeof this.dragArea?ae(this.dragArea):this.dragArea){var o=r.getBoundingClientRect();e=r.scrollWidth?r.scrollWidth:o.right-o.left,t=r.scrollHeight?r.scrollHeight:o.bottom-o.top;for(var a=["Top","Left","Bottom","Right"],s=getComputedStyle(r),l=0;l<a.length;l++){var c=a[l],u=s["border"+c+"Width"],p=s["padding"+c],h=c.toLowerCase();this.borderWidth[h]=isNaN(parseFloat(u))?0:parseFloat(u),this.padding[h]=isNaN(parseFloat(p))?0:parseFloat(p)}n=o.top,i=o.left,this.dragLimit.left=i+this.borderWidth.left+this.padding.left,this.dragLimit.top=r.offsetTop+this.borderWidth.top+this.padding.top,this.dragLimit.right=i+e-(this.borderWidth.right+this.padding.right),this.dragLimit.bottom=n+t-(this.borderWidth.bottom+this.padding.bottom)}},t.prototype.getProperTargetElement=function(e){var t,r=this.getCoordinates(e),n=this.helperElement.style.pointerEvents||"";return v(e.target,this.helperElement)||-1!==e.type.indexOf("touch")?(this.helperElement.style.pointerEvents="none",t=document.elementFromPoint(r.clientX,r.clientY),this.helperElement.style.pointerEvents=n):t=e.target,t},t.prototype.currentStateCheck=function(e,t){return p(this.currentStateTarget)||this.currentStateTarget===e?p(t)?e:t:this.currentStateTarget},t.prototype.getMousePosition=function(e,t){var r,n,i=void 0!==e.srcElement?e.srcElement:e.target,o=this.getCoordinates(e),a=p(i.offsetParent);return t?(r=this.clone?o.pageX:o.pageX+(a?0:i.offsetParent.scrollLeft)-this.relativeXPosition,n=this.clone?o.pageY:o.pageY+(a?0:i.offsetParent.scrollTop)-this.relativeYPosition):(r=this.clone?o.pageX:o.pageX+window.pageXOffset-this.relativeXPosition,n=this.clone?o.pageY:o.pageY+window.pageYOffset-this.relativeYPosition),!this.clone&&this.dragArea&&(this.getScrollableValues(),n-=this.tempScrollHeight?this.parentScrollY:0,r-=this.tempScrollWidth?this.parentScrollX:0),{left:r-(this.margin.left+this.cursorAt.left),top:n-(this.margin.top+this.cursorAt.top)}},t.prototype.getCoordinates=function(e){return e.type.indexOf("touch")>-1?e.changedTouches[0]:e},t.prototype.getHelperElement=function(e){var t;return this.clone?this.helper?t=this.helper({sender:e,element:this.target}):(t=K("div",{className:"e-drag-helper e-block-touch",innerHTML:"Draggable"}),document.body.appendChild(t)):t=this.element,t},t.prototype.setGlobalDroppables=function(e,t,r){this.droppables[this.scope]=e?null:{draggable:t,helper:r,draggedElement:this.element}},t.prototype.checkTargetElement=function(e){var t=this.getProperTargetElement(e),r=this.getDropInstance(t);if(!r&&t&&!p(t.parentNode)){var n=ce(t.parentNode,".e-droppable")||t.parentElement;n&&(r=this.getDropInstance(n))}return{target:t,instance:r}},t.prototype.getDropInstance=function(e){var t,r=e&&e.ej2_instances;if(r)for(var n=0,i=r;n<i.length;n++){var o=i[n];if("droppable"===o.getModuleName()){t=o;break}}return t},t.prototype.destroy=function(){this.toggleEvents(!0),e.prototype.destroy.call(this)};var r;return Nr([Ie({},Rr)],t.prototype,"cursorAt",void 0),Nr([Re(!0)],t.prototype,"clone",void 0),Nr([Re()],t.prototype,"dragArea",void 0),Nr([Re()],t.prototype,"isDragScroll",void 0),Nr([Re()],t.prototype,"isReplaceDragEle",void 0),Nr([Re(!0)],t.prototype,"isPreventSelect",void 0),Nr([Be()],t.prototype,"drag",void 0),Nr([Be()],t.prototype,"dragStart",void 0),Nr([Be()],t.prototype,"dragStop",void 0),Nr([Re(1)],t.prototype,"distance",void 0),Nr([Re()],t.prototype,"handle",void 0),Nr([Re()],t.prototype,"abort",void 0),Nr([Re()],t.prototype,"helper",void 0),Nr([Re("default")],t.prototype,"scope",void 0),Nr([Re("")],t.prototype,"dragTarget",void 0),Nr([Re()],t.prototype,"axis",void 0),Nr([Re()],t.prototype,"queryPositionInfo",void 0),Nr([Re(!1)],t.prototype,"enableTailMode",void 0),Nr([Re(!1)],t.prototype,"skipDistanceCheck",void 0),Nr([Re(!0)],t.prototype,"preventDefault",void 0),Nr([Re(!1)],t.prototype,"enableAutoScroll",void 0),Nr([Re(!1)],t.prototype,"enableTapHold",void 0),Nr([Re(750)],t.prototype,"tapHoldThreshold",void 0),t=r=Nr([Ge],t)}(yr),Hr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Lr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},kr=function(e){function t(t,r){var n=e.call(this,r,t)||this;return n.mouseOver=!1,n.dragData={},n.dragStopCalled=!1,n.bind(),n}return Hr(t,e),t.prototype.bind=function(){this.wireEvents()},t.prototype.wireEvents=function(){Nt.add(this.element,xt.touchEndEvent,this.intDrop,this)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.getModuleName=function(){return"droppable"},t.prototype.intOver=function(e,t){if(!this.mouseOver){var r=this.dragData[this.scope];this.trigger("over",{event:e,target:t,dragData:r}),this.mouseOver=!0}},t.prototype.intOut=function(e,t){this.mouseOver&&(this.trigger("out",{evt:e,target:t}),this.mouseOver=!1)},t.prototype.intDrop=function(e,t){if(this.dragStopCalled){this.dragStopCalled=!1;var r,n=!0,i=this.dragData[this.scope],o=!!i&&(i.helper&&Q(i.helper));o&&(r=this.isDropArea(e,i.helper,t),this.accept&&(n=me(i.helper,this.accept))),o&&this.drop&&r.canDrop&&n&&this.trigger("drop",{event:e,target:r.target,droppedElement:i.helper,dragData:i}),this.mouseOver=!1}},t.prototype.isDropArea=function(e,t,r){var n={canDrop:!0,target:r||e.target},i="touchend"===e.type;if(i||n.target===t){t.style.display="none";var o=i?e.changedTouches[0]:e,a=document.elementFromPoint(o.clientX,o.clientY);n.canDrop=!1,n.canDrop=v(a,this.element),n.canDrop&&(n.target=a),t.style.display=""}return n},t.prototype.destroy=function(){Nt.remove(this.element,xt.touchEndEvent,this.intDrop),e.prototype.destroy.call(this)},Lr([Re()],t.prototype,"accept",void 0),Lr([Re("default")],t.prototype,"scope",void 0),Lr([Be()],t.prototype,"drop",void 0),Lr([Be()],t.prototype,"over",void 0),Lr([Be()],t.prototype,"out",void 0),t=Lr([Ge],t)}(yr),Br=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},zr={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,space:32,escape:27,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,semicolon:186,plus:187,comma:188,minus:189,dot:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},Yr=function(e){function t(t,n){var i=e.call(this,n,t)||this;return i.keyPressHandler=function(e){for(var t=e.altKey,n=e.ctrlKey,o=e.shiftKey,a=e.which,s=0,l=Object.keys(i.keyConfigs);s<l.length;s++)for(var c=l[s],u=0,p=i.keyConfigs[c].split(",");u<p.length;u++){var h=p[u],d=r.getKeyConfigData(h.trim());t===d.altKey&&n===d.ctrlKey&&o===d.shiftKey&&a===d.keyCode&&(e.action=c,i.keyAction&&i.keyAction(e))}},i.bind(),i}Br(t,e),r=t,t.prototype.destroy=function(){this.unwireEvents(),e.prototype.destroy.call(this)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.bind=function(){this.wireEvents()},t.prototype.getModuleName=function(){return"keyboard"},t.prototype.wireEvents=function(){this.element.addEventListener(this.eventName,this.keyPressHandler)},t.prototype.unwireEvents=function(){this.element.removeEventListener(this.eventName,this.keyPressHandler)},t.getKeyConfigData=function(e){if(e in this.configCache)return this.configCache[e];var t=e.toLowerCase().split("+"),n={altKey:-1!==t.indexOf("alt"),ctrlKey:-1!==t.indexOf("ctrl"),shiftKey:-1!==t.indexOf("shift"),keyCode:null};return t[t.length-1].length>1&&Number(t[t.length-1])?n.keyCode=Number(t[t.length-1]):n.keyCode=r.getKeyCode(t[t.length-1]),r.configCache[e]=n,n},t.getKeyCode=function(e){return zr[e]||e.toUpperCase().charCodeAt(0)};var r;return t.configCache={},Gr([Re({})],t.prototype,"keyConfigs",void 0),Gr([Re("keyup")],t.prototype,"eventName",void 0),Gr([Be()],t.prototype,"keyAction",void 0),t=r=Gr([Ge],t)}(yr),_r=function(){function t(t,r,n){this.controlName=t,this.localeStrings=r,this.setLocale(n||e.defaultCulture)}return t.prototype.setLocale=function(e){var r=this.intGetControlConstant(t.locale,e);this.currentLocale=r||this.localeStrings},t.load=function(e){this.locale=u(this.locale,e,{},!0)},t.prototype.getConstant=function(e){return p(this.currentLocale[e])?this.localeStrings[e]||"":this.currentLocale[e]},t.prototype.intGetControlConstant=function(e,t){return e[t]?e[t][this.controlName]:null},t.locale={},t}(),Xr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wr=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},$r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xr(t,e),Wr([Re(50)],t.prototype,"swipeThresholdDistance",void 0),t}(Pr),Vr=/(Up|Down)/,Ur=function(e){function t(t,r){var n=e.call(this,r,t)||this;return n.touchAction=!0,n.tapCount=0,n.startEvent=function(e){if(!0===n.touchAction){var t=n.updateChangeTouches(e);void 0!==e.changedTouches&&(n.touchAction=!1),n.isTouchMoved=!1,n.movedDirection="",n.startPoint=n.lastMovedPoint={clientX:t.clientX,clientY:t.clientY},n.startEventData=t,n.hScrollLocked=n.vScrollLocked=!1,n.tStampStart=Date.now(),n.timeOutTapHold=setTimeout(function(){n.tapHoldEvent(e)},n.tapHoldThreshold),Nt.add(n.element,xt.touchMoveEvent,n.moveEvent,n),Nt.add(n.element,xt.touchEndEvent,n.endEvent,n),Nt.add(n.element,xt.touchCancelEvent,n.cancelEvent,n)}},n.moveEvent=function(e){var t=n.updateChangeTouches(e);n.movedPoint=t,n.isTouchMoved=!(t.clientX===n.startPoint.clientX&&t.clientY===n.startPoint.clientY);var r={};n.isTouchMoved&&(clearTimeout(n.timeOutTapHold),n.calcScrollPoints(e),r=u(r,{},{startEvents:n.startEventData,originalEvent:e,startX:n.startPoint.clientX,startY:n.startPoint.clientY,distanceX:n.distanceX,distanceY:n.distanceY,scrollDirection:n.scrollDirection,velocity:n.getVelocity(t)}),n.trigger("scroll",r),n.lastMovedPoint={clientX:t.clientX,clientY:t.clientY})},n.cancelEvent=function(e){clearTimeout(n.timeOutTapHold),clearTimeout(n.timeOutTap),n.tapCount=0,n.swipeFn(e),Nt.remove(n.element,xt.touchCancelEvent,n.cancelEvent)},n.endEvent=function(e){n.swipeFn(e),n.isTouchMoved||"function"==typeof n.tap&&(n.trigger("tap",{originalEvent:e,tapCount:++n.tapCount}),n.timeOutTap=setTimeout(function(){n.tapCount=0},n.tapThreshold)),n.modeclear()},n.swipeFn=function(e){clearTimeout(n.timeOutTapHold),clearTimeout(n.timeOutTap);var t=n.updateChangeTouches(e),r=t.clientX-n.startPoint.clientX,i=t.clientY-n.startPoint.clientY;r=Math.floor(r<0?-1*r:r),i=Math.floor(i<0?-1*i:r),n.isTouchMoved=r>1||i>1,/Mozilla|Firefox/.test(xt.userAgent)&&0===t.clientX&&0===t.clientY&&"mouseup"===e.type&&(n.isTouchMoved=!1),n.endPoint=t,n.calcPoints(e);var o={originalEvent:e,startEvents:n.startEventData,startX:n.startPoint.clientX,startY:n.startPoint.clientY,distanceX:n.distanceX,distanceY:n.distanceY,swipeDirection:n.movedDirection,velocity:n.getVelocity(t)};if(n.isTouchMoved){var a=void 0,s=n.swipeSettings.swipeThresholdDistance;a=u(a,n.defaultArgs,o);var l=!1,c=n.element,p=n.isScrollable(c),h=Vr.test(n.movedDirection);(s<n.distanceX&&!h||s<n.distanceY&&h)&&(l=!p||n.checkSwipe(c,h)),l&&n.trigger("swipe",a)}n.modeclear()},n.modeclear=function(){n.modeClear=setTimeout(function(){n.touchAction=!0},"function"!=typeof n.tap?0:20),n.lastTapTime=(new Date).getTime(),Nt.remove(n.element,xt.touchMoveEvent,n.moveEvent),Nt.remove(n.element,xt.touchEndEvent,n.endEvent),Nt.remove(n.element,xt.touchCancelEvent,n.cancelEvent)},n.bind(),n}return Xr(t,e),t.prototype.onPropertyChanged=function(e,t){},t.prototype.bind=function(){this.wireEvents(),xt.isIE&&this.element.classList.add("e-block-touch")},t.prototype.destroy=function(){this.unwireEvents(),e.prototype.destroy.call(this)},t.prototype.wireEvents=function(){Nt.add(this.element,xt.touchStartEvent,this.startEvent,this)},t.prototype.unwireEvents=function(){Nt.remove(this.element,xt.touchStartEvent,this.startEvent)},t.prototype.getModuleName=function(){return"touch"},t.prototype.isScrollable=function(e){var t=getComputedStyle(e),r=t.overflow+t.overflowX+t.overflowY;return!!/(auto|scroll)/.test(r)},t.prototype.tapHoldEvent=function(e){this.tapCount=0,this.touchAction=!0;var t;Nt.remove(this.element,xt.touchMoveEvent,this.moveEvent),Nt.remove(this.element,xt.touchEndEvent,this.endEvent),t={originalEvent:e},this.trigger("tapHold",t),Nt.remove(this.element,xt.touchCancelEvent,this.cancelEvent)},t.prototype.calcPoints=function(e){var t=this.updateChangeTouches(e);this.defaultArgs={originalEvent:e},this.distanceX=Math.abs(Math.abs(t.clientX)-Math.abs(this.startPoint.clientX)),this.distanceY=Math.abs(Math.abs(t.clientY)-Math.abs(this.startPoint.clientY)),this.distanceX>this.distanceY?this.movedDirection=t.clientX>this.startPoint.clientX?"Right":"Left":this.movedDirection=t.clientY<this.startPoint.clientY?"Up":"Down"},t.prototype.calcScrollPoints=function(e){var t=this.updateChangeTouches(e);this.defaultArgs={originalEvent:e},this.distanceX=Math.abs(Math.abs(t.clientX)-Math.abs(this.lastMovedPoint.clientX)),this.distanceY=Math.abs(Math.abs(t.clientY)-Math.abs(this.lastMovedPoint.clientY)),(this.distanceX>this.distanceY||!0===this.hScrollLocked)&&!1===this.vScrollLocked?(this.scrollDirection=t.clientX>this.lastMovedPoint.clientX?"Right":"Left",this.hScrollLocked=!0):(this.scrollDirection=t.clientY<this.lastMovedPoint.clientY?"Up":"Down",this.vScrollLocked=!0)},t.prototype.getVelocity=function(e){var t=e.clientX,r=e.clientY,n=Date.now(),i=t-this.startPoint.clientX,o=r-this.startPoint.clientX,a=n-this.tStampStart;return Math.sqrt(i*i+o*o)/a},t.prototype.checkSwipe=function(e,t){var r=["scroll","offset"],n=t?["Height","Top"]:["Width","Left"];return e[r[0]+n[0]]<=e[r[1]+n[0]]||(0===e[r[0]+n[1]]||e[r[1]+n[0]]+e[r[0]+n[1]]>=e[r[0]+n[0]])},t.prototype.updateChangeTouches=function(e){return e.changedTouches&&0!==e.changedTouches.length?e.changedTouches[0]:e},Wr([Be()],t.prototype,"tap",void 0),Wr([Be()],t.prototype,"tapHold",void 0),Wr([Be()],t.prototype,"swipe",void 0),Wr([Be()],t.prototype,"scroll",void 0),Wr([Re(350)],t.prototype,"tapThreshold",void 0),Wr([Re(750)],t.prototype,"tapHoldThreshold",void 0),Wr([Ie({},$r)],t.prototype,"swipeSettings",void 0),t=Wr([Ge],t)}(yr),Kr=["script","style","iframe[src]",'link[href*="javascript:"]','object[type="text/x-scriptlet"]','object[data^="data:text/html;base64"]','img[src^="data:text/html;base64"]','[src^="javascript:"]','[dynsrc^="javascript:"]','[lowsrc^="javascript:"]','[type^="application/x-shockwave-flash"]'],qr=[{attribute:"href",selector:'[href*="javascript:"]'},{attribute:"background",selector:'[background^="javascript:"]'},{attribute:"style",selector:'[style*="javascript:"]'},{attribute:"style",selector:'[style*="expression("]'},{attribute:"href",selector:'a[href^="data:text/html;base64"]'}],Zr=["onchange","onclick","onmouseover","onmouseout","onkeydown","onload","onerror","onblur","onfocus","onbeforeload","onbeforeunload","onkeyup","onsubmit","onafterprint","onbeforeonload","onbeforeprint","onblur","oncanplay","oncanplaythrough","onchange","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onerror","onfocus","onformchange","onforminput","onhaschange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onoffline","onoine","ononline","onpagehide","onpageshow","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreadystatechange","onredo","onresize","onscroll","onseeked","onseeking","onselect","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","onundo","onunload","onvolumechange","onwaiting","onmouseenter","onmouseleave","onmousewheel","onstart","onpropertychange"],Jr=function(){function e(){}return e.beforeSanitize=function(){return{selectors:{tags:Kr,attributes:qr}}},e.sanitize=function(e){var t=this.beforeSanitize();return this.serializeValue(t,e)},e.serializeValue=function(e,t){this.removeAttrs=e.selectors.attributes,this.removeTags=e.selectors.tags,this.wrapElement=document.createElement("div"),this.wrapElement.innerHTML=t,this.removeXssTags(),this.removeJsEvents(),this.removeXssAttrs();var r=this.wrapElement.innerHTML;return this.removeElement(),r},e.removeElement=function(){for(var e=this.wrapElement.children,t=0;t<e.length;t++)for(var r=e[t].attributes,n=0;n<r.length;n++)this.wrapElement.children[t].removeAttribute(r[n].localName)},e.removeXssTags=function(){var e=this.wrapElement.querySelectorAll(this.removeTags.join(","));e.length>0&&e.forEach(function(e){ne(e)})},e.removeJsEvents=function(){var e=this.wrapElement.querySelectorAll("["+Zr.join("],[")+"]");e.length>0&&e.forEach(function(e){Zr.forEach(function(t){e.hasAttribute(t)&&e.removeAttribute(t)})})},e.removeXssAttrs=function(){var e=this;this.removeAttrs.forEach(function(t,r){var n=e.wrapElement.querySelectorAll(t.selector);n.length>0&&n.forEach(function(e){e.removeAttribute(t.attribute)})})},e}();return e.blazorCultureFormats=Pt,e.Ajax=Ct,e.Animation=Dr,e.rippleEffect=We,e.enableRipple=Ze,e.Base=yr,e.getComponent=ye,e.removeChildInstance=be,e.Browser=xt,e.enableVersionBasedPersistence=Je,e.Component=jr,e.ChildProperty=Pr,e.Position=Rr,e.Draggable=Ir,e.Droppable=kr,e.EventHandler=Nt,e.onIntlChange=Mt,e.cldrData=Dt,e.Internationalization=Et,e.setCulture=j,e.setCurrencyCode=x,e.loadCldr=N,e.enableRtl=F,e.getNumericObject=A,e.getNumberDependable=R,e.getDefaultDateObject=I,e.KeyboardEvents=Yr,e.L10n=_r,e.ModuleLoader=Er,e.Property=Re,e.Complex=Ie,e.ComplexFactory=He,e.Collection=Le,e.CollectionFactory=ke,e.Event=Be,e.NotifyPropertyChanges=Ge,e.CreateBuilder=_e,e.SwipeSettings=$r,e.Touch=Ur,e.blazorTemplates=Jt,e.getRandomId=_,e.compile=X,e.updateBlazorTemplate=W,e.resetBlazorTemplate=$,e.setTemplateEngine=V,e.getTemplateEngine=U,e.disableBlazorMode=t,e.createInstance=r,e.setImmediate=n,e.getValue=i,e.setValue=o,e.deleteObject=a,e.isObject=s,e.getEnumValue=l,e.merge=c,e.extend=u,e.isNullOrUndefined=p,e.isUndefined=h,e.getUniqueID=d,e.debounce=m,e.queryParams=f,e.isObjectArray=g,e.compareElementParent=v,e.throwError=y,e.print=b,e.formatUnit=M,e.enableBlazorMode=D,e.isBlazor=w,e.getElement=E,e.getInstance=P,e.addInstance=S,e.uniqueID=O,e.createElement=K,e.addClass=q,e.removeClass=Z,e.isVisible=Q,e.prepend=ee,e.append=te,e.detach=ne,e.remove=ie,e.attributes=oe,e.select=ae,e.selectAll=se,e.closest=ce,e.siblings=ue,e.getAttributeOrDefault=pe,e.setStyleAttribute=he,e.classList=de,e.matches=me,e.includeInnerHTML=fe,e.containsClass=ge,e.cloneNode=ve,e.Observer=bt,e.SanitizeHtmlHelper=Jr,e}({}),this.ejs=ej;
- /*!
- * filename: ej2-data.min.js
- * version : 19.2.44
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.data=function(e,t){"use strict";var r=function(){function e(e){return this.subQuery=null,this.isChild=!1,this.distincts=[],this.queries=[],this.key="",this.fKey="","string"==typeof e?this.fromTable=e:e&&e instanceof Array&&(this.lookups=e),this.expands=[],this.sortedColumns=[],this.groupedColumns=[],this.subQuery=null,this.isChild=!1,this.params=[],this.lazyLoad=[],this}return e.prototype.setKey=function(e){return this.key=e,this},e.prototype.using=function(e){return this.dataManager=e,this},e.prototype.execute=function(e,t,r,n){return e=e||this.dataManager,e?e.executeQuery(this,t,r,n):a.throwError('Query - execute() : dataManager needs to be is set using "using" function or should be passed as argument')},e.prototype.executeLocal=function(e){return e=e||this.dataManager,e?e.executeLocal(this):a.throwError('Query - executeLocal() : dataManager needs to be is set using "using" function or should be passed as argument')},e.prototype.clone=function(){var t=new e;return t.queries=this.queries.slice(0),t.key=this.key,t.isChild=this.isChild,t.dataManager=this.dataManager,t.fromTable=this.fromTable,t.params=this.params.slice(0),t.expands=this.expands.slice(0),t.sortedColumns=this.sortedColumns.slice(0),t.groupedColumns=this.groupedColumns.slice(0),t.subQuerySelector=this.subQuerySelector,t.subQuery=this.subQuery,t.fKey=this.fKey,t.isCountRequired=this.isCountRequired,t.distincts=this.distincts.slice(0),t.lazyLoad=this.lazyLoad.slice(0),t},e.prototype.from=function(e){return this.fromTable=e,this},e.prototype.addParams=function(e,t){return"function"==typeof t?this.params.push({key:e,fn:t}):this.params.push({key:e,value:t}),this},e.prototype.distinct=function(e){return this.distincts="string"==typeof e?[].slice.call([e],0):e.slice(0),this},e.prototype.expand=function(e){return this.expands="string"==typeof e?[].slice.call([e],0):e.slice(0),this},e.prototype.where=function(e,t,r,o,a){t=t?t.toLowerCase():null;var s=null;return"string"==typeof e?s=new n(e,t,r,o,a):e instanceof n&&(s=e),this.queries.push({fn:"onWhere",e:s}),this},e.prototype.search=function(e,t,r,n,o){"string"==typeof t&&(t=[t]),r&&"none"!==r||(r="contains");var s=a.fnOperators[r];return this.queries.push({fn:"onSearch",e:{fieldNames:t,operator:r,searchKey:e,ignoreCase:n,ignoreAccent:o,comparer:s}}),this},e.prototype.sortBy=function(e,t,r){return this.sortByForeignKey(e,t,r)},e.prototype.sortByForeignKey=function(r,n,o,s){var i,u,c=t.isNullOrUndefined(s)?"ascending":s;if("string"==typeof r&&a.endsWith(r.toLowerCase()," desc")&&(r=r.replace(/ desc$/i,""),n="descending"),n&&"string"!=typeof n||(c=n?n.toLowerCase():"ascending",n=a.fnSort(n)),o){i=e.filterQueries(this.queries,"onSortBy");for(var l=0;l<i.length;l++)if("string"==typeof(u=i[l].e.fieldName)){if(u===r)return this}else if(u instanceof Array)for(var p=0;p<u.length;p++)if(u[p]===r||r.toLowerCase()===u[p]+" desc")return this}return this.queries.push({fn:"onSortBy",e:{fieldName:r,comparer:n,direction:c}}),this},e.prototype.sortByDesc=function(e){return this.sortBy(e,"descending")},e.prototype.group=function(e,t,r){return this.sortBy(e,null,!0),this.queries.push({fn:"onGroup",e:{fieldName:e,comparer:t||null,format:r||null}}),this},e.prototype.page=function(e,t){return this.queries.push({fn:"onPage",e:{pageIndex:e,pageSize:t}}),this},e.prototype.range=function(e,t){return this.queries.push({fn:"onRange",e:{start:e,end:t}}),this},e.prototype.take=function(e){return this.queries.push({fn:"onTake",e:{nos:e}}),this},e.prototype.skip=function(e){return this.queries.push({fn:"onSkip",e:{nos:e}}),this},e.prototype.select=function(e){return"string"==typeof e&&(e=[].slice.call([e],0)),this.queries.push({fn:"onSelect",e:{fieldNames:e}}),this},e.prototype.hierarchy=function(e,t){return this.subQuerySelector=t,this.subQuery=e,this},e.prototype.foreignKey=function(e){return this.fKey=e,this},e.prototype.requiresCount=function(){return this.isCountRequired=!0,this},e.prototype.aggregate=function(e,t){return this.queries.push({fn:"onAggregates",e:{field:t,type:e}}),this},e.filterQueries=function(e,t){return e.filter(function(e){return e.fn===t})},e.filterQueryLists=function(e,t){for(var r=e.filter(function(e){return-1!==t.indexOf(e.fn)}),n={},o=0;o<r.length;o++)n[r[o].fn]||(n[r[o].fn]=r[o].e);return n},e}(),n=function(){function e(t,r,n,o,s){return void 0===o&&(o=!1),this.ignoreAccent=!1,this.isComplex=!1,"string"==typeof t?(this.field=t,this.operator=r.toLowerCase(),this.value=n,this.ignoreCase=o,this.ignoreAccent=s,this.isComplex=!1,this.comparer=a.fnOperators.processOperator(this.operator)):(t instanceof e&&n instanceof e||n instanceof Array)&&(this.isComplex=!0,this.condition=r.toLowerCase(),this.predicates=[t],n instanceof Array?[].push.apply(this.predicates,n):this.predicates.push(n)),this}return e.and=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.combinePredicates([].slice.call(t,0),"and")},e.prototype.and=function(t,r,n,o,a){return e.combine(this,t,r,n,"and",o,a)},e.or=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.combinePredicates([].slice.call(t,0),"or")},e.prototype.or=function(t,r,n,o,a){return e.combine(this,t,r,n,"or",o,a)},e.fromJson=function(e){if(e instanceof Array){for(var t=[],r=0,n=e.length;r<n;r++)t.push(this.fromJSONData(e[r]));return t}var o=e;return this.fromJSONData(o)},e.prototype.validate=function(e){var t,r,n=this.predicates?this.predicates:[];if(!this.isComplex&&this.comparer)return this.comparer.call(this,a.getObject(this.field,e),this.value,this.ignoreCase,this.ignoreAccent);t="and"===this.condition;for(var o=0;o<n.length;o++)if(r=n[o].validate(e),t){if(!r)return!1}else if(r)return!0;return t},e.prototype.toJson=function(){var e,t;if(this.isComplex){e=[],t=this.predicates;for(var r=0;r<t.length;r++)e.push(t[r].toJson())}return{isComplex:this.isComplex,field:this.field,operator:this.operator,value:this.value,ignoreCase:this.ignoreCase,ignoreAccent:this.ignoreAccent,condition:this.condition,predicates:e}},e.combinePredicates=function(t,r){if(1===t.length){if(!(t[0]instanceof Array))return t[0];t=t[0]}return new e(t[0],r,t.slice(1))},e.combine=function(t,r,n,o,s,i,u){return r instanceof e?e[s](t,r):"string"==typeof r?e[s](t,new e(r,n,o,i,u)):a.throwError("Predicate - "+s+" : invalid arguments")},e.fromJSONData=function(t){for(var r=t.predicates||[],n=r.length,o=[],a=0;a<n;a++)o.push(this.fromJSONData(r[a]));return t.isComplex?new e(o[0],t.condition,o.slice(1)):new e(t.field,t.operator,t.value,t.ignoreCase,t.ignoreAccent)},e}(),o={GroupGuid:"{271bbba0-1ee7}"},a=function(){function e(){}return e.getValue=function(e,t){return"function"==typeof e?e.call(t||{}):e},e.endsWith=function(e,t){return e.slice&&e.slice(-t.length)===t},e.startsWith=function(e,t){return e.slice(0,t.length)===t},e.fnSort=function(t){return t=t?e.toLowerCase(t):"ascending","ascending"===t?this.fnAscending:this.fnDescending},e.fnAscending=function(e,r){return t.isNullOrUndefined(e)&&t.isNullOrUndefined(r)?-1:null===r||void 0===r?-1:"string"==typeof e?e.localeCompare(r):null===e||void 0===e?1:e-r},e.fnDescending=function(e,r){return t.isNullOrUndefined(e)&&t.isNullOrUndefined(r)?-1:null===r||void 0===r?1:"string"==typeof e?-1*e.localeCompare(r):null===e||void 0===e?-1:r-e},e.extractFields=function(e,t){for(var r={},n=0;n<t.length;n++)r=this.setValue(t[n],this.getObject(t[n],e),r);return r},e.select=function(e,t){for(var r=[],n=0;n<e.length;n++)r.push(this.extractFields(e[n],t));return r},e.group=function(r,n,a,s,i,u,c){s=s||1;var l=r;if(l.GroupGuid===o.GroupGuid){for(var p=this,d=0;d<l.length;d++)!function(e){if(t.isNullOrUndefined(i))l[e].items=p.group(l[e].items,n,a,l.level+1,null,u,c),l[e].count=l[e].items.length;else{var r=-1,o=i.filter(function(t){return t.key===l[e].key});r=i.indexOf(o[0]),l[e].items=p.group(l[e].items,n,a,l.level+1,i[r].items,u,c),l[e].count=i[r].count}}(d);return l.childLevels+=1,l}var h={},f=[];f.GroupGuid=o.GroupGuid,f.level=s,f.childLevels=0,f.records=l;for(var g=this,y=0;y<l.length;y++)!function(e){var r=g.getVal(l,e,n);if(t.isNullOrUndefined(u)||(r=u(r,n)),!h[r]&&(h[r]={key:r,count:0,items:[],aggregates:{},field:n},f.push(h[r]),!t.isNullOrUndefined(i))){var o=i.filter(function(e){return e.key===h[r].key});h[r].count=o[0].count}h[r].count=t.isNullOrUndefined(i)?h[r].count+=1:h[r].count,(!c||c&&a.length)&&h[r].items.push(l[e])}(y);if(a&&a.length)for(y=0;y<f.length;y++)!function(r){for(var n={},o=void 0,s=a,u=0;u<a.length;u++)if(o=e.aggregates[a[u].type],t.isNullOrUndefined(i))o&&(n[s[u].field+" - "+s[u].type]=o(f[r].items,s[u].field));else{var c=i.filter(function(e){return e.key===f[r].key});o&&(n[s[u].field+" - "+s[u].type]=o(c[0].items,s[u].field))}f[r].aggregates=n}(y);if(c&&f.length&&a.length)for(y=0;y<f.length;y++)f[y].items=[];return l.length&&f||l},e.buildHierarchy=function(e,t,r,n,o){var a,s={};for(n.result&&(n=n.result),n.GroupGuid&&this.throwError("DataManager: Do not have support Grouping in hierarchy"),a=0;a<n.length;a++)(s[i=this.getObject(e,n[a])]||(s[i]=[])).push(n[a]);for(a=0;a<r.length;a++){var i=this.getObject(o||e,r[a]);r[a][t]=s[i]}},e.getFieldList=function(e,t,r){if(void 0===r&&(r=""),void 0===t||null===t)return this.getFieldList(e,[],r);for(var n=e,o=0,a=Object.keys(e);o<a.length;o++){var s=a[o];"object"!=typeof n[s]||n[s]instanceof Array?t.push(r+s):this.getFieldList(n[s],t,r+s+".")}return t},e.getObject=function(e,t){if(!e)return t;if(t){if(-1===e.indexOf("."))return t[e];for(var r=t,n=e.split("."),o=0;o<n.length&&null!=r;o++)r=r[n[o]];return r}},e.setValue=function(e,r,n){var o,a,s=e.toString().split("."),i=n||{},u=i,c=s.length;for(o=0;o<c;o++)a=s[o],o+1===c?u[a]=void 0===r?void 0:r:t.isNullOrUndefined(u[a])&&(u[a]={}),u=u[a];return i},e.sort=function(e,t,r){if(e.length<=1)return e;var n=parseInt((e.length/2).toString(),10),o=e.slice(0,n),a=e.slice(n);return o=this.sort(o,t,r),a=this.sort(a,t,r),this.merge(o,a,t,r)},e.ignoreDiacritics=function(t){return"string"!=typeof t?t:t.split("").map(function(t){return t in e.diacritics?e.diacritics[t]:t}).join("")},e.merge=function(e,t,r,n){for(var o,a=[];e.length>0||t.length>0;)o=e.length>0&&t.length>0?n?n(this.getVal(e,0,r),this.getVal(t,0,r),e[0],t[0])<=0?e:t:e[0][r]<e[0][r]?e:t:e.length>0?e:t,a.push(o.shift());return a},e.getVal=function(e,t,r){return r?this.getObject(r,e[t]):e[t]},e.toLowerCase=function(e){return e?"string"==typeof e?e.toLowerCase():e.toString():0===e||!1===e?e.toString():""},e.callAdaptorFunction=function(e,r,n,o){if(r in e){var a=e[r](n,o);t.isNullOrUndefined(a)||(n=a)}return n},e.getAddParams=function(t,r,n){var o={};return e.callAdaptorFunction(t,"addParams",{dm:r,query:n,params:n.params,reqParams:o}),o},e.isPlainObject=function(e){return!!e&&e.constructor===Object},e.isCors=function(){var e=null;try{e=new window.XMLHttpRequest}catch(e){}return!!e&&"withCredentials"in e},e.getGuid=function(e){var t;return(e||"")+"00000000-0000-4000-0000-000000000000".replace(/0/g,function(e,r){if("crypto"in window&&"getRandomValues"in crypto){var n=new Uint8Array(1);window.crypto.getRandomValues(n),t=n[0]%16|0}else t=16*Math.random()|0;return"0123456789abcdef"[19===r?3&t|8:t]})},e.isNull=function(e){return void 0===e||null===e},e.getItemFromComparer=function(r,n,o){var a,s,i,u=0,c="string"==typeof e.getVal(r,0,n);if(r.length)for(;t.isNullOrUndefined(a)&&u<r.length;)a=e.getVal(r,u,n),i=r[u++];for(;u<r.length;u++)s=e.getVal(r,u,n),t.isNullOrUndefined(s)||(c&&(a=+a,s=+s),o(a,s)>0&&(a=s,i=r[u]));return i},e.distinct=function(r,n,o){o=!t.isNullOrUndefined(o)&&o;var a,s=[],i={};return r.forEach(function(t,u){(a="object"==typeof r[u]?e.getVal(r,u,n):r[u])in i||(s.push(o?r[u]:a),i[a]=1)}),s},e.serverTimezoneOffset=null,e.timeZoneHandling=!0,e.throwError=function(e){try{throw new Error(e)}catch(e){throw e.message+"\n"+e.stack}},e.aggregates={sum:function(t,r){for(var n,o=0,a="number"!=typeof e.getVal(t,0,r),s=0;s<t.length;s++)n=e.getVal(t,s,r),isNaN(n)||null===n||(a&&(n=+n),o+=n);return o},average:function(t,r){return e.aggregates.sum(t,r)/t.length},min:function(t,r){var n;return"function"==typeof r&&(n=r,r=null),e.getObject(r,e.getItemFromComparer(t,r,n||e.fnAscending))},max:function(t,r){var n;return"function"==typeof r&&(n=r,r=null),e.getObject(r,e.getItemFromComparer(t,r,n||e.fnDescending))},truecount:function(e,t){return new m(e).executeLocal((new r).where(t,"equal",!0,!0)).length},falsecount:function(e,t){return new m(e).executeLocal((new r).where(t,"equal",!1,!0)).length},count:function(e,t){return e.length}},e.operatorSymbols={"<":"lessthan",">":"greaterthan","<=":"lessthanorequal",">=":"greaterthanorequal","==":"equal","!=":"notequal","*=":"contains","$=":"endswith","^=":"startswith"},e.odBiOperator={"<":" lt ",">":" gt ","<=":" le ",">=":" ge ","==":" eq ","!=":" ne ",lessthan:" lt ",lessthanorequal:" le ",greaterthan:" gt ",greaterthanorequal:" ge ",equal:" eq ",notequal:" ne "},e.odUniOperator={"$=":"endswith","^=":"startswith","*=":"substringof",endswith:"endswith",startswith:"startswith",contains:"substringof"},e.odv4UniOperator={"$=":"endswith","^=":"startswith","*=":"contains",endswith:"endswith",startswith:"startswith",contains:"contains"},e.diacritics={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"},e.fnOperators={equal:function(t,r,n,o){return o&&(t=e.ignoreDiacritics(t),r=e.ignoreDiacritics(r)),n?e.toLowerCase(t)===e.toLowerCase(r):t===r},notequal:function(t,r,n,o){return o&&(t=e.ignoreDiacritics(t),r=e.ignoreDiacritics(r)),!e.fnOperators.equal(t,r,n)},lessthan:function(t,r,n){return n?e.toLowerCase(t)<e.toLowerCase(r):t<r},greaterthan:function(t,r,n){return n?e.toLowerCase(t)>e.toLowerCase(r):t>r},lessthanorequal:function(t,r,n){return n?e.toLowerCase(t)<=e.toLowerCase(r):t<=r},greaterthanorequal:function(t,r,n){return n?e.toLowerCase(t)>=e.toLowerCase(r):t>=r},contains:function(r,n,o,a){return a&&(r=e.ignoreDiacritics(r),n=e.ignoreDiacritics(n)),o?!t.isNullOrUndefined(r)&&!t.isNullOrUndefined(n)&&-1!==e.toLowerCase(r).indexOf(e.toLowerCase(n)):!t.isNullOrUndefined(r)&&!t.isNullOrUndefined(n)&&-1!==r.toString().indexOf(n)},notnull:function(e){return null!==e},isnull:function(e){return null===e},startswith:function(t,r,n,o){return o&&(t=e.ignoreDiacritics(t),r=e.ignoreDiacritics(r)),n?t&&r&&e.startsWith(e.toLowerCase(t),e.toLowerCase(r)):t&&r&&e.startsWith(t,r)},endswith:function(t,r,n,o){return o&&(t=e.ignoreDiacritics(t),r=e.ignoreDiacritics(r)),n?t&&r&&e.endsWith(e.toLowerCase(t),e.toLowerCase(r)):t&&r&&e.endsWith(t,r)},processSymbols:function(t){var r=e.operatorSymbols[t];return r?e.fnOperators[r]:e.throwError("Query - Process Operator : Invalid operator")},processOperator:function(t){var r=e.fnOperators[t];return r||e.fnOperators.processSymbols(t)}},e.parse={parseJson:function(t){return"string"==typeof t?t=JSON.parse(t,e.parse.jsonReviver):t instanceof Array?e.parse.iterateAndReviveArray(t):"object"==typeof t&&null!==t&&e.parse.iterateAndReviveJson(t),t},iterateAndReviveArray:function(t){for(var r=0;r<t.length;r++)"object"==typeof t[r]&&null!==t[r]?e.parse.iterateAndReviveJson(t[r]):"string"!=typeof t[r]||/^[\s]*\[|^[\s]*\{(.)+:|\"/g.test(t[r])?t[r]=e.parse.parseJson(t[r]):t[r]=e.parse.jsonReviver("",t[r])},iterateAndReviveJson:function(t){for(var r,n=0,o=Object.keys(t);n<o.length;n++){var a=o[n];e.startsWith(a,"__")||("object"==typeof(r=t[a])?r instanceof Array?e.parse.iterateAndReviveArray(r):r&&e.parse.iterateAndReviveJson(r):t[a]=e.parse.jsonReviver(t[a],r))}},jsonReviver:function(t,r){if("string"==typeof r){var n=/^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(r),o=e.timeZoneHandling?e.serverTimezoneOffset:null;if(n)return e.dateParse.toTimeZone(new Date(parseInt(n[1],10)),o,!0);if(/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(r)){var a=r.indexOf("Z")>-1||r.indexOf("z")>-1,s=r.split(/[^0-9.]/);if(a)r=e.dateParse.toTimeZone(new Date(parseInt(s[0],10),parseInt(s[1],10)-1,parseInt(s[2],10),parseInt(s[3],10),parseInt(s[4],10),parseInt(s[5],10)),e.serverTimezoneOffset,!1);else{var i=new Date(parseInt(s[0],10),parseInt(s[1],10)-1,parseInt(s[2],10),parseInt(s[3],10),parseInt(s[4],10),parseInt(s[5],10)),u=parseInt(s[6],10),c=parseInt(s[7],10);if(isNaN(u)&&isNaN(c))return i;r.indexOf("+")>-1?i.setHours(i.getHours()-u,i.getMinutes()-c):i.setHours(i.getHours()+u,i.getMinutes()+c),r=e.dateParse.toTimeZone(i,e.serverTimezoneOffset,!1)}null==e.serverTimezoneOffset&&(r=e.dateParse.addSelfOffset(r))}}return r},isJson:function(t){return"string"==typeof t[0]?t:e.parse.parseJson(t)},isGuid:function(e){return null!=/[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i.exec(e)},replacer:function(t,r){return e.isPlainObject(t)?e.parse.jsonReplacer(t,r):t instanceof Array?e.parse.arrayReplacer(t):t instanceof Date?e.parse.jsonReplacer({val:t},r).val:t},jsonReplacer:function(t,r){for(var n,o=0,a=Object.keys(t);o<a.length;o++){var s=a[o];if((n=t[s])instanceof Date){var i=n;null==e.serverTimezoneOffset?t[s]=e.dateParse.toTimeZone(i,null).toJSON():(i=new Date(+i+36e5*e.serverTimezoneOffset),t[s]=e.dateParse.toTimeZone(e.dateParse.addSelfOffset(i),null).toJSON())}}return t},arrayReplacer:function(t){for(var r=0;r<t.length;r++)e.isPlainObject(t[r])?t[r]=e.parse.jsonReplacer(t[r]):t[r]instanceof Date&&(t[r]=e.parse.jsonReplacer({date:t[r]}).date);return t},jsonDateReplacer:function(t,r){if("value"===t&&r){if("string"==typeof r){var n=/^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(r);if(n)r=e.dateParse.toTimeZone(new Date(parseInt(n[1],10)),null,!0);else if(/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(r)){var o=r.split(/[^0-9]/);r=e.dateParse.toTimeZone(new Date(parseInt(o[0],10),parseInt(o[1],10)-1,parseInt(o[2],10),parseInt(o[3],10),parseInt(o[4],10),parseInt(o[5],10)),null,!0)}}if(r instanceof Date)return r=e.dateParse.addSelfOffset(r),null===e.serverTimezoneOffset?e.dateParse.toTimeZone(e.dateParse.addSelfOffset(r),null).toJSON():(r=e.dateParse.toTimeZone(r,r.getTimezoneOffset()/60*2-e.serverTimezoneOffset,!1)).toJSON()}return r}},e.dateParse={addSelfOffset:function(e){return new Date(+e-6e4*e.getTimezoneOffset())},toUTC:function(e){return new Date(+e+6e4*e.getTimezoneOffset())},toTimeZone:function(t,r,n){if(null===r)return t;var o=n?e.dateParse.toUTC(t):t;return new Date(+o-36e5*r)},toLocalTime:function(e){var t=e,r=-t.getTimezoneOffset(),n=r>=0?"+":"-",o=function(e){var t=Math.floor(Math.abs(e));return(t<10?"0":"")+t};return t.getFullYear()+"-"+o(t.getMonth()+1)+"-"+o(t.getDate())+"T"+o(t.getHours())+":"+o(t.getMinutes())+":"+o(t.getSeconds())+n+o(r/60)+":"+o(r%60)}},e}(),s=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i={GroupGuid:"{271bbba0-1ee7}"},u=function(){function e(t){this.options={from:"table",requestType:"json",sortBy:"sorted",select:"select",skip:"skip",group:"group",take:"take",search:"search",count:"requiresCounts",where:"where",aggregates:"aggregates",expand:"expand"},this.type=e,this.dataSource=t,this.pvt={}}return e.prototype.processResponse=function(e,t,r,n){return e},e}(),c=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return s(n,e),n.prototype.processQuery=function(e,t){for(var r,n,o,a=e.dataSource.json.slice(0),s=a.length,i=!0,u={},c=0,l=[],p=0;p<t.lazyLoad.length;p++)c++,u[t.lazyLoad[p].key]=t.lazyLoad[p].value;for(var d={},p=0;p<t.queries.length;p++)"onPage"!==(n=t.queries[p]).fn&&"onGroup"!==n.fn||!t.lazyLoad.length?(r=this[n.fn].call(this,a,n.e,t),"onAggregates"===n.fn?d[n.e.field+" - "+n.e.type]=r:a=void 0!==r?r:a,"onPage"!==n.fn&&"onSkip"!==n.fn&&"onTake"!==n.fn&&"onRange"!==n.fn||(i=!1),i&&(s=a.length)):("onGroup"===n.fn&&l.push(n.e),"onPage"===n.fn&&(o=n.e));if(c){var h={query:t,lazyLoad:u,result:a,group:l,page:o},f=this.lazyLoadGroup(h);a=f.result,s=f.count}return t.isCountRequired&&(a={result:a,count:s,aggregates:d}),a},n.prototype.lazyLoadGroup=function(e){var r=0,n=this.getAggregate(e.query),o=e.result;if(t.isNullOrUndefined(e.lazyLoad.onDemandGroupInfo)){u=e.group[0].fieldName;r=(o=a.group(o,u,n,null,null,e.group[0].comparer,!0)).length;c=o;e.page&&(o=this.onPage(o,e.page,e.query)),this.formGroupResult(o,c)}else{for(var s=e.lazyLoad.onDemandGroupInfo,i=s.where.length-1;i>=0;i--)o=this.onWhere(o,s.where[i]);if(e.group.length!==s.level){var u=e.group[s.level].fieldName;o=a.group(o,u,n,null,null,e.group[0].comparer,!0)}r=o.length;var c=o;o=(o=o.slice(s.skip)).slice(0,s.take),e.group.length!==s.level&&this.formGroupResult(o,c)}return{result:o,count:r}},n.prototype.formGroupResult=function(e,t){if(e.length&&t.length){e.GroupGuid=t.GroupGuid,e.childLevels=t.childLevels,e.level=t.level,e.records=t.records}return e},n.prototype.getAggregate=function(e){var t=r.filterQueries(e.queries,"onAggregates"),n=[];if(t.length)for(var o=void 0,s=0;s<t.length;s++)o=t[s].e,n.push({type:o.type,field:a.getValue(o.field,e)});return n},n.prototype.batchRequest=function(e,t,r){var n,o=t.deletedRecords.length;for(n=0;n<t.addedRecords.length;n++)this.insert(e,t.addedRecords[n]);for(n=0;n<t.changedRecords.length;n++)this.update(e,r.key,t.changedRecords[n]);for(n=0;n<o;n++)this.remove(e,r.key,t.deletedRecords[n]);return t},n.prototype.onWhere=function(e,t){return e&&e.length?e.filter(function(e){if(t)return t.validate(e)}):e},n.prototype.onAggregates=function(e,t){var r=a.aggregates[t.type];return e&&r&&0!==e.length?r(e,t.field):null},n.prototype.onSearch=function(e,t){return e&&e.length?(0===t.fieldNames.length&&a.getFieldList(e[0],t.fieldNames),e.filter(function(e){for(var r=0;r<t.fieldNames.length;r++)if(t.comparer.call(e,a.getObject(t.fieldNames[r],e),t.searchKey,t.ignoreCase,t.ignoreAccent))return!0;return!1})):e},n.prototype.onSortBy=function(e,t,r){if(!e||!e.length)return e;var n,o=a.getValue(t.fieldName,r);if(!o)return e.sort(t.comparer);if(o instanceof Array){for(var s=(o=o.slice(0)).length-1;s>=0;s--)o[s]&&(n=t.comparer,a.endsWith(o[s]," desc")&&(n=a.fnSort("descending"),o[s]=o[s].replace(" desc","")),e=a.sort(e,o[s],n));return e}return a.sort(e,o,t.comparer)},n.prototype.onGroup=function(e,t,r){if(!e||!e.length)return e;var n=this.getAggregate(r);return a.group(e,a.getValue(t.fieldName,r),n,null,null,t.comparer)},n.prototype.onPage=function(e,t,r){var n=a.getValue(t.pageSize,r),o=(a.getValue(t.pageIndex,r)-1)*n,s=o+n;return e&&e.length?e.slice(o,s):e},n.prototype.onRange=function(e,t){return e&&e.length?e.slice(a.getValue(t.start),a.getValue(t.end)):e},n.prototype.onTake=function(e,t){return e&&e.length?e.slice(0,a.getValue(t.nos)):e},n.prototype.onSkip=function(e,t){return e&&e.length?e.slice(a.getValue(t.nos)):e},n.prototype.onSelect=function(e,t){return e&&e.length?a.select(e,a.getValue(t.fieldNames)):e},n.prototype.insert=function(e,r,n,o,a){return t.isNullOrUndefined(a)?e.dataSource.json.push(r):e.dataSource.json.splice(a,0,r)},n.prototype.remove=function(e,t,r,n){var o,s=e.dataSource.json;for("object"!=typeof r||r instanceof Date||(r=a.getObject(t,r)),o=0;o<s.length&&a.getObject(t,s[o])!==r;o++);return o!==s.length?s.splice(o,1):null},n.prototype.update=function(e,r,n,o){var a,s,i=e.dataSource.json;for(t.isNullOrUndefined(r)||(s=t.getValue(r,n)),a=0;a<i.length&&(t.isNullOrUndefined(r)||t.getValue(r,i[a])!==s);a++);return a<i.length?t.merge(i[a],n):null},n}(u),l=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return s(o,e),o.prototype.processQuery=function(e,t,n){var o,s,i=this.getQueryRequest(t),u=r.filterQueryLists(t.queries,["onSelect","onPage","onSkip","onTake","onRange"]),c=t.params,l=e.dataSource.url,p=null,d=this.options,h={sorts:[],groups:[],filters:[],searches:[],aggregates:[]};"onPage"in u?(o=u.onPage,s=((s=a.getValue(o.pageIndex,t))-1)*(p=a.getValue(o.pageSize,t))):"onRange"in u&&(s=(o=u.onRange).start,p=o.end-o.start);for(v=0;v<i.sorts.length;v++)o=a.getValue(i.sorts[v].e.fieldName,t),h.sorts.push(a.callAdaptorFunction(this,"onEachSort",{name:o,direction:i.sorts[v].e.direction},t));n&&(o=this.getFiltersFrom(n,t))&&h.filters.push(a.callAdaptorFunction(this,"onEachWhere",o.toJson(),t));for(v=0;v<i.filters.length;v++){h.filters.push(a.callAdaptorFunction(this,"onEachWhere",i.filters[v].e.toJson(),t));for(var f=0,g="object"==typeof h.filters[v]?Object.keys(h.filters[v]):[];f<g.length;f++){O=g[f];a.isNull(h[O])&&delete h[O]}}for(v=0;v<i.searches.length;v++)o=i.searches[v].e,h.searches.push(a.callAdaptorFunction(this,"onEachSearch",{fields:o.fieldNames,operator:o.operator,key:o.searchKey,ignoreCase:o.ignoreCase},t));for(v=0;v<i.groups.length;v++)h.groups.push(a.getValue(i.groups[v].e.fieldName,t));for(v=0;v<i.aggregates.length;v++)o=i.aggregates[v].e,h.aggregates.push({type:o.type,field:a.getValue(o.field,t)});var y={};if(this.getRequestQuery(d,t,u,h,y),a.callAdaptorFunction(this,"addParams",{dm:e,query:t,params:c,reqParams:y}),t.lazyLoad.length)for(var v=0;v<t.lazyLoad.length;v++)y[t.lazyLoad[v].key]=t.lazyLoad[v].value;for(var m=0,S=Object.keys(y);m<S.length;m++){var O=S[m];(a.isNull(y[O])||""===y[O]||0===y[O].length)&&delete y[O]}d.skip in y&&d.take in y||null===p||(y[d.skip]=a.callAdaptorFunction(this,"onSkip",s,t),y[d.take]=a.callAdaptorFunction(this,"onTake",p,t));var b=this.pvt;return this.pvt={},"json"===this.options.requestType?{data:JSON.stringify(y,a.parse.jsonDateReplacer),url:l,pvtData:b,type:"POST",contentType:"application/json; charset=utf-8"}:(o=this.convertToQueryString(y,t,e),o=(-1!==e.dataSource.url.indexOf("?")?"&":"/")+o,{type:"GET",url:o.length?l.replace(/\/*$/,o):l,pvtData:b})},o.prototype.getRequestQuery=function(e,t,r,n,o){var s=o;s[e.from]=t.fromTable,e.apply&&t.distincts.length&&(s[e.apply]="onDistinct"in this?a.callAdaptorFunction(this,"onDistinct",t.distincts):""),!t.distincts.length&&e.expand&&(s[e.expand]="onExpand"in this&&"onSelect"in r?a.callAdaptorFunction(this,"onExpand",{selects:a.getValue(r.onSelect.fieldNames,t),expands:t.expands},t):t.expands),s[e.select]="onSelect"in r&&!t.distincts.length?a.callAdaptorFunction(this,"onSelect",a.getValue(r.onSelect.fieldNames,t),t):"",s[e.count]=t.isCountRequired?a.callAdaptorFunction(this,"onCount",t.isCountRequired,t):"",s[e.search]=n.searches.length?a.callAdaptorFunction(this,"onSearch",n.searches,t):"",s[e.skip]="onSkip"in r?a.callAdaptorFunction(this,"onSkip",a.getValue(r.onSkip.nos,t),t):"",s[e.take]="onTake"in r?a.callAdaptorFunction(this,"onTake",a.getValue(r.onTake.nos,t),t):"",s[e.where]=n.filters.length||n.searches.length?a.callAdaptorFunction(this,"onWhere",n.filters,t):"",s[e.sortBy]=n.sorts.length?a.callAdaptorFunction(this,"onSortBy",n.sorts,t):"",s[e.group]=n.groups.length?a.callAdaptorFunction(this,"onGroup",n.groups,t):"",s[e.aggregates]=n.aggregates.length?a.callAdaptorFunction(this,"onAggregates",n.aggregates,t):"",s.param=[]},o.prototype.convertToQueryString=function(e,t,r){return""},o.prototype.processResponse=function(e,r,n,o,s,i){if(o&&o.getResponseHeader("Content-Type")&&-1!==o.getResponseHeader("Content-Type").indexOf("application/json")){var u=a.timeZoneHandling;r&&!r.timeZoneHandling&&(a.timeZoneHandling=!1),e=a.parse.parseJson(e),a.timeZoneHandling=u}var c=s,l=c.pvtData||{},p=e?e.groupDs:[];if(o&&o.getResponseHeader("Content-Type")&&-1!==o.getResponseHeader("Content-Type").indexOf("xml"))return n.isCountRequired?{result:[],count:0}:[];var d=JSON.parse(c.data);if(d&&"batch"===d.action&&e&&e.addedRecords)return i.addedRecords=e.addedRecords,i;e&&e.d&&(e=e.d);var h={};e&&"count"in e&&(h.count=e.count),h.result=e&&e.result?e.result:e;var f=!1;if(Array.isArray(e.result)&&e.result.length){if(t.isNullOrUndefined(e.result[0].key)||(h.result=this.formRemoteGroupedData(h.result,1,l.groups.length-1)),n&&n.lazyLoad.length&&l.groups.length)for(var g=0;g<n.lazyLoad.length;g++)if("onDemandGroupInfo"===n.lazyLoad[g].key){var y=n.lazyLoad[g].value.level;l.groups.length===y&&(f=!0)}}return f||this.getAggregateResult(l,e,h,p,n),a.isNull(h.count)?h.result:{result:h.result,count:h.count,aggregates:h.aggregates}},o.prototype.formRemoteGroupedData=function(e,r,n){for(var o=0;o<e.length;o++)e[o].items.length&&Object.keys(e[o].items[0]).indexOf("key")>-1&&this.formRemoteGroupedData(e[o].items,r+1,n-1);return e.GroupGuid=i.GroupGuid,e.level=r,e.childLevels=n,e.records=e[0].items.length?this.getGroupedRecords(e,!t.isNullOrUndefined(e[0].items.records)):[],e},o.prototype.getGroupedRecords=function(e,t){for(var r=[],n=0;n<e.length;n++)if(t)r=r.concat(e[n].items.records);else for(var o=0;o<e[n].items.length;o++)r.push(e[n].items[o]);return r},o.prototype.onGroup=function(e){return this.pvt.groups=e,e},o.prototype.onAggregates=function(e){this.pvt.aggregates=e},o.prototype.batchRequest=function(e,r,n,o,s){return{type:"POST",url:e.dataSource.batchUrl||e.dataSource.crudUrl||e.dataSource.removeUrl||e.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t.extend({},{changed:r.changedRecords,added:r.addedRecords,deleted:r.deletedRecords,action:"batch",table:n[void 0],key:n[void 0]},a.getAddParams(this,e,o)))}},o.prototype.beforeSend=function(e,t){},o.prototype.insert=function(e,r,n,o){return{url:e.dataSource.insertUrl||e.dataSource.crudUrl||e.dataSource.url,data:JSON.stringify(t.extend({},{value:r,table:n,action:"insert"},a.getAddParams(this,e,o)))}},o.prototype.remove=function(e,r,n,o,s){return{type:"POST",url:e.dataSource.removeUrl||e.dataSource.crudUrl||e.dataSource.url,data:JSON.stringify(t.extend({},{key:n,keyColumn:r,table:o,action:"remove"},a.getAddParams(this,e,s)))}},o.prototype.update=function(e,r,n,o,s){return{type:"POST",url:e.dataSource.updateUrl||e.dataSource.crudUrl||e.dataSource.url,data:JSON.stringify(t.extend({},{value:n,action:"update",keyColumn:r,key:a.getObject(r,n),table:o},a.getAddParams(this,e,s)))}},o.prototype.getFiltersFrom=function(e,t){var r,o=t.fKey,s=o,i=t.key,u=[];"object"!=typeof e[0]&&(s=null);for(var c=0;c<e.length;c++)r="object"==typeof e[0]?a.getObject(i||s,e[c]):e[c],u.push(new n(o,"equal",r));return n.or(u)},o.prototype.getAggregateResult=function(e,n,o,s,i){var u=n;if(n&&n.result&&(u=n.result),e&&e.aggregates&&e.aggregates.length){var c=e.aggregates,l=void 0,p=u,d={};n.aggregate&&(p=n.aggregate);for(g=0;g<c.length;g++)(l=a.aggregates[c[g].type])&&(d[c[g].field+" - "+c[g].type]=l(p,c[g].field));o.aggregates=d}var h=Array.isArray(n.result)&&n.result.length&&!t.isNullOrUndefined(n.result[0].key);if(e&&e.groups&&e.groups.length&&!h){for(var f=e.groups,g=0;g<f.length;g++){t.isNullOrUndefined(s)||(s=a.group(s,f[g]));var y=r.filterQueries(i.queries,"onGroup")[g].e;u=a.group(u,f[g],e.aggregates,null,s,y.comparer)}o.result=u}return o},o.prototype.getQueryRequest=function(e){var t={sorts:[],groups:[],filters:[],searches:[],aggregates:[]};return t.sorts=r.filterQueries(e.queries,"onSortBy"),t.groups=r.filterQueries(e.queries,"onGroup"),t.filters=r.filterQueries(e.queries,"onWhere"),t.searches=r.filterQueries(e.queries,"onSearch"),t.aggregates=r.filterQueries(e.queries,"onAggregates"),t},o.prototype.addParams=function(e){var t=e.reqParams;e.params.length&&(t.params={});for(var r=0,n=e.params;r<n.length;r++){var o=n[r];if(t[o.key])throw new Error("Query() - addParams: Custom Param is conflicting other request arguments");t[o.key]=o.value,o.fn&&(t[o.key]=o.fn.call(e.query,o.key,e.query,e.dm)),t.params[o.key]=t[o.key]}},o}(u),p=function(e){function r(r){var n=e.call(this)||this;return n.options=t.extend({},n.options,{requestType:"get",accept:"application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$inlinecount",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 ",updateType:"PUT"}),t.extend(n.options,r||{}),n}return s(r,e),r.prototype.getModuleName=function(){return"ODataAdaptor"},r.prototype.onPredicate=function(e,n,o){var s,i,u="",c=e.value,l=typeof c,p=e.field?r.getField(e.field):null;if(c instanceof Date&&(c="datetime'"+a.parse.replacer(c)+"'"),"string"===l&&(c="'"+(c=encodeURIComponent(c))+"'",o&&(p="cast("+p+", 'Edm.String')"),a.parse.isGuid(c)&&(i="guid"),e.ignoreCase&&(i||(p="tolower("+p+")"),c=c.toLowerCase())),s=a.odBiOperator[e.operator])return u+=p,u+=s,i&&(u+=i),u+c;if("substringof"===(s=t.isNullOrUndefined(this.getModuleName)||"ODataV4Adaptor"!==this.getModuleName()?a.odUniOperator[e.operator]:a.odv4UniOperator[e.operator])){var d=c;c=p,p=d}return u+=s+"(",u+=p+",",i&&(u+=i),u+=c+")"},r.prototype.addParams=function(t){e.prototype.addParams.call(this,t),delete t.reqParams.params},r.prototype.onComplexPredicate=function(e,t,r){for(var n=[],o=0;o<e.predicates.length;o++)n.push("("+this.onEachWhere(e.predicates[o],t,r)+")");return n.join(" "+e.condition+" ")},r.prototype.onEachWhere=function(e,t,r){return e.isComplex?this.onComplexPredicate(e,t,r):this.onPredicate(e,t,r)},r.prototype.onWhere=function(e){return this.pvt.search&&e.push(this.onEachWhere(this.pvt.search,null,!0)),e.join(" and ")},r.prototype.onEachSearch=function(e){e.fields&&0===e.fields.length&&a.throwError("Query() - Search : oData search requires list of field names to search");for(var t=this.pvt.search||[],r=0;r<e.fields.length;r++)t.push(new n(e.fields[r],e.operator,e.key,e.ignoreCase));this.pvt.search=t},r.prototype.onSearch=function(e){return this.pvt.search=n.or(this.pvt.search),""},r.prototype.onEachSort=function(e){var t=[];if(e.name instanceof Array)for(var n=0;n<e.name.length;n++)t.push(r.getField(e.name[n])+("descending"===e.direction?" desc":""));else t.push(r.getField(e.name)+("descending"===e.direction?" desc":""));return t.join(",")},r.prototype.onSortBy=function(e){return e.reverse().join(",")},r.prototype.onGroup=function(e){return this.pvt.groups=e,[]},r.prototype.onSelect=function(e){for(var t=0;t<e.length;t++)e[t]=r.getField(e[t]);return e.join(",")},r.prototype.onAggregates=function(e){return this.pvt.aggregates=e,""},r.prototype.onCount=function(e){return!0===e?"allpages":""},r.prototype.beforeSend=function(e,t,r){a.endsWith(r.url,this.options.batch)&&"post"===r.type.toLowerCase()?(t.setRequestHeader("Accept",this.options.multipartAccept),t.setRequestHeader("DataServiceVersion","2.0"),t.overrideMimeType("text/plain; charset=x-user-defined")):t.setRequestHeader("Accept",this.options.accept),t.setRequestHeader("DataServiceVersion","2.0"),t.setRequestHeader("MaxDataServiceVersion","2.0")},r.prototype.processResponse=function(e,r,n,o,s,i){if(s&&"GET"===s.type&&!this.rootUrl&&e["odata.metadata"]){var u=e["odata.metadata"].split("/$metadata#");this.rootUrl=u[0],this.resourceTableName=u[1]}if(!t.isNullOrUndefined(e.d)){var c=n&&n.isCountRequired?e.d.results:e.d;if(!t.isNullOrUndefined(c))for(var l=0;l<c.length;l++)t.isNullOrUndefined(c[l].__metadata)||delete c[l].__metadata}var p=s&&s.pvtData,d=this.processBatchResponse(e,n,o,s,i);if(d)return d;var h=o&&s.getResponseHeader("DataServiceVersion"),f=null,g=h&&parseInt(h,10)||2;if(n&&n.isCountRequired){(e.__count||e["odata.count"])&&(f=e.__count||e["odata.count"]),e.d&&(e=e.d),(e.__count||e["odata.count"])&&(f=e.__count||e["odata.count"])}3===g&&e.value&&(e=e.value),e.d&&(e=e.d),g<3&&e.results&&(e=e.results);var y={};return y.count=f,y.result=e,this.getAggregateResult(p,e,y,null,n),a.isNull(f)?y.result:{result:y.result,count:y.count,aggregates:y.aggregates}},r.prototype.convertToQueryString=function(e,t,r){var n=[],o=e.table||"";delete e.table,r.dataSource.requiresFormat&&(e.$format="json");for(var a=0,s=Object.keys(e);a<s.length;a++){var i=s[a];n.push(i+"="+e[i])}return n=n.join("&"),r.dataSource.url&&-1!==r.dataSource.url.indexOf("?")&&!o?n:n.length?o+"?"+n:o||""},r.prototype.localTimeReplacer=function(e,r){for(var n=0,o=t.isNullOrUndefined(r)?[]:Object.keys(r);n<o.length;n++){var s=o[n];r[s]instanceof Date&&(r[s]=a.dateParse.toLocalTime(r[s]))}return r},r.prototype.insert=function(e,t,r){return{url:(e.dataSource.insertUrl||e.dataSource.url).replace(/\/*$/,r?"/"+r:""),data:JSON.stringify(t,this.options.localTime?this.localTimeReplacer:null)}},r.prototype.remove=function(e,t,r,n){var o;return o="string"!=typeof r||a.parse.isGuid(r)?"("+r+")":"('"+r+"')",{type:"DELETE",url:(e.dataSource.removeUrl||e.dataSource.url).replace(/\/*$/,n?"/"+n:"")+o}},r.prototype.update=function(e,r,n,o,s,i){"PATCH"!==this.options.updateType||t.isNullOrUndefined(i)||(n=this.compareAndRemove(n,i,r));var u;return u="string"!=typeof n[r]||a.parse.isGuid(n[r])?"("+n[r]+")":"('"+n[r]+"')",{type:this.options.updateType,url:(e.dataSource.updateUrl||e.dataSource.url).replace(/\/*$/,o?"/"+o:"")+u,data:JSON.stringify(n,this.options.localTime?this.localTimeReplacer:null),accept:this.options.accept}},r.prototype.batchRequest=function(e,t,r,n,o){var s=r.guid=a.getGuid(this.options.batchPre),i=this.rootUrl?this.rootUrl+"/"+this.options.batch:e.dataSource.url.replace(/\/*$/,"/"+this.options.batch);r.url=this.resourceTableName?this.resourceTableName:r.url;var u={url:r.url,key:r.key,cid:1,cSet:a.getGuid(this.options.changeSet)},c="--"+s+"\n";return c+="Content-Type: multipart/mixed; boundary="+u.cSet.replace("--","")+"\n",this.pvt.changeSet=0,c+=this.generateInsertRequest(t.addedRecords,u,e),c+=this.generateUpdateRequest(t.changedRecords,u,e,o?o.changedRecords:[]),c+=this.generateDeleteRequest(t.deletedRecords,u,e),c+=u.cSet+"--\n",c+="--"+s+"--",{type:"POST",url:i,dataType:"json",contentType:"multipart/mixed; charset=UTF-8;boundary="+s,data:c}},r.prototype.generateDeleteRequest=function(e,t,r){if(!e)return"";var n={method:"DELETE ",url:function(e,t,r){var n=a.getObject(r,e[t]);return"number"==typeof n||a.parse.isGuid(n)?"("+n+")":n instanceof Date?"("+e[t][r].toJSON()+")":"('"+n+"')"},data:function(e,t){return""}};return this.generateBodyContent(e,t,n,r)+"\n"},r.prototype.generateInsertRequest=function(e,t,r){if(!e)return"";var n={method:"POST ",url:function(e,t,r){return""},data:function(e,t){return JSON.stringify(e[t])+"\n\n"}};return this.generateBodyContent(e,t,n,r)},r.prototype.generateUpdateRequest=function(e,t,r,n){var o=this;if(!e)return"";e.forEach(function(e){return e=o.compareAndRemove(e,n.filter(function(r){return a.getObject(t.key,r)===a.getObject(t.key,e)})[0],t.key)});var s={method:this.options.updateType+" ",url:function(e,t,r){return"number"==typeof e[t][r]||a.parse.isGuid(e[t][r])?"("+e[t][r]+")":e[t][r]instanceof Date?"("+e[t][r].toJSON()+")":"('"+e[t][r]+"')"},data:function(e,t){return JSON.stringify(e[t])+"\n\n"}};return this.generateBodyContent(e,t,s,r)},r.getField=function(e){return e.replace(/\./g,"/")},r.prototype.generateBodyContent=function(e,r,n,o){for(var a="",s=0;s<e.length;s++)a+="\n"+r.cSet+"\n",a+=this.options.changeSetContent+"\n\n",a+=n.method,"POST "===n.method?a+=(o.dataSource.insertUrl||o.dataSource.crudUrl||r.url)+n.url(e,s,r.key)+" HTTP/1.1\n":"PUT "===n.method||"PATCH "===n.method?a+=(o.dataSource.updateUrl||o.dataSource.crudUrl||r.url)+n.url(e,s,r.key)+" HTTP/1.1\n":"DELETE "===n.method&&(a+=(o.dataSource.removeUrl||o.dataSource.crudUrl||r.url)+n.url(e,s,r.key)+" HTTP/1.1\n"),a+="Accept: "+this.options.accept+"\n",a+="Content-Id: "+this.pvt.changeSet+++"\n",a+=this.options.batchChangeSetContentType+"\n",t.isNullOrUndefined(e[s]["@odata.etag"])?a+="\n":(a+="If-Match: "+e[s]["@odata.etag"]+"\n\n",delete e[s]["@odata.etag"]),a+=n.data(e,s);return a},r.prototype.processBatchResponse=function(e,r,n,o,s){if(n&&n.getResponseHeader("Content-Type")&&-1!==n.getResponseHeader("Content-Type").indexOf("xml"))return r.isCountRequired?{result:[],count:0}:[];if(o&&this.options.batch&&a.endsWith(o.url,this.options.batch)&&"post"===o.type.toLowerCase()){var i=n.getResponseHeader("Content-Type"),u=void 0,c=void 0,l=e+"";if(i=i.substring(i.indexOf("=batchresponse")+1),(l=l.split(i)).length<2)return{};l=l[1];var p=/(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(l);p&&l.replace(p[0],"");for(var d=p?p[1]:"",h=(l=l.split(d)).length;h>-1;h--)/\bContent-ID:/i.test(l[h])&&/\bHTTP.+201/.test(l[h])&&(u=parseInt(/\bContent-ID: (\d+)/i.exec(l[h])[1],10),s.addedRecords[u]&&(c=a.parse.parseJson(/^\{.+\}/m.exec(l[h])[0]),t.extend({},s.addedRecords[u],this.processResponse(c))));return s}return null},r.prototype.compareAndRemove=function(e,r,n){var o=this;return t.isNullOrUndefined(r)?e:(Object.keys(e).forEach(function(t){t!==n&&"@odata.etag"!==t&&(a.isPlainObject(e[t])?(o.compareAndRemove(e[t],r[t]),0===Object.keys(e[t]).filter(function(e){return"@odata.etag"!==e}).length&&delete e[t]):e[t]===r[t]?delete e[t]:e[t]&&r[t]&&e[t].valueOf()===r[t].valueOf()&&delete e[t])}),e)},r}(l),d=function(e){function n(r){var n=e.call(this,r)||this;return n.options=t.extend({},n.options,{requestType:"get",accept:"application/json, text/javascript, */*; q=0.01",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$count",search:"$search",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 ",updateType:"PATCH",localTime:!1,apply:"$apply"}),t.extend(n.options,r||{}),n}return s(n,e),n.prototype.getModuleName=function(){return"ODataV4Adaptor"},n.prototype.onCount=function(e){return!0===e?"true":""},n.prototype.onPredicate=function(t,n,o){var s="",i=t.value,u=i instanceof Date;if(n instanceof r)for(var c=this.getQueryRequest(n),l=0;l<c.filters.length;l++)c.filters[l].e.key===t.value&&(o=!0);return s=e.prototype.onPredicate.call(this,t,n,o),u&&(s=s.replace(/datetime'(.*)'$/,"$1")),a.parse.isGuid(i)&&(s=s.replace("guid","").replace(/'/g,"")),s},n.prototype.onEachSearch=function(e){var t=this.pvt.searches||[];t.push(e.key),this.pvt.searches=t},n.prototype.onSearch=function(e){return this.pvt.searches.join(" OR ")},n.prototype.onExpand=function(e){var t=this,r={},n={},o=e.expands.slice(),a=[];return e.selects.filter(function(e){return e.indexOf(".")>-1}).forEach(function(e){var t=e.split(".");t[0]in r||(r[t[0]]=[]),r[t[0]].push(t[1])}),Object.keys(r).forEach(function(e){-1===o.indexOf(e)&&o.push(e)}),o.forEach(function(e){n[e]=e in r?e+"("+t.options.select+"="+r[e].join(",")+")":e}),Object.keys(n).forEach(function(e){return a.push(n[e])}),a.join(",")},n.prototype.onDistinct=function(e){return"groupby(("+e.map(function(e){return p.getField(e)}).join(",")+"))"},n.prototype.onSelect=function(t){return e.prototype.onSelect.call(this,t.filter(function(e){return-1===e.indexOf(".")}))},n.prototype.beforeSend=function(e,t,r){"POST"!==r.type&&"PUT"!==r.type&&"PATCH"!==r.type||t.setRequestHeader("Prefer","return=representation"),t.setRequestHeader("Accept",this.options.accept)},n.prototype.processResponse=function(r,n,o,s,i,u){if(i&&"GET"===i.type&&!this.rootUrl&&r["@odata.context"]){var c=r["@odata.context"].split("/$metadata#");this.rootUrl=c[0],this.resourceTableName=c[1]}var l=i&&i.pvtData,p=e.prototype.processBatchResponse.call(this,r,o,s,i,u);if(p)return p;var d=null;o&&o.isCountRequired&&"@odata.count"in r&&(d=r["@odata.count"]),r=t.isNullOrUndefined(r.value)?r:r.value;var h={};return h.count=d,h.result=r,this.getAggregateResult(l,r,h,null,o),a.isNull(d)?h.result:{result:h.result,count:d,aggregates:h.aggregates}},n}(p),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.getModuleName=function(){return"WebApiAdaptor"},t.prototype.insert=function(e,t,r){return{type:"POST",url:e.dataSource.url,data:JSON.stringify(t)}},t.prototype.remove=function(e,t,r,n){return{type:"DELETE",url:e.dataSource.url+"/"+r,data:JSON.stringify(r)}},t.prototype.update=function(e,t,r,n){return{type:"PUT",url:e.dataSource.url,data:JSON.stringify(r)}},t.prototype.batchRequest=function(e,t,r){var n=this,o=r.guid=a.getGuid(this.options.batchPre),s=e.dataSource.url.replace(/\/*$/,"/"+this.options.batch);r.url=this.resourceTableName?this.resourceTableName:r.url;for(var i=[],u=0,c=t.addedRecords.length;u<c;u++)!function(n,a){t.addedRecords.forEach(function(a,s){var u={method:"POST ",url:function(e,t,r){return""},data:function(e,t){return JSON.stringify(e[t])+"\n\n"}};i.push("--"+o),i.push("Content-Type: application/http; msgtype=request",""),i.push("POST /api/"+(e.dataSource.insertUrl||e.dataSource.crudUrl||r.url)+u.url(t.addedRecords,n,r.key)+" HTTP/1.1"),i.push("Content-Type: application/json; charset=utf-8"),i.push("Host: "+location.host),i.push("",a?JSON.stringify(a):"")})}(u);for(var u=0,c=t.changedRecords.length;u<c;u++)!function(a,s){t.changedRecords.forEach(function(s,u){var c={method:n.options.updateType+" ",url:function(e,t,r){return""},data:function(e,t){return JSON.stringify(e[t])+"\n\n"}};i.push("--"+o),i.push("Content-Type: application/http; msgtype=request",""),i.push("PUT /api/"+(e.dataSource.updateUrl||e.dataSource.crudUrl||r.url)+c.url(t.changedRecords,a,r.key)+" HTTP/1.1"),i.push("Content-Type: application/json; charset=utf-8"),i.push("Host: "+location.host),i.push("",s?JSON.stringify(s):"")})}(u);for(var u=0,c=t.deletedRecords.length;u<c;u++)!function(n,s){t.deletedRecords.forEach(function(s,u){var c={mtd:"DELETE ",url:function(e,t,r){var n=a.getObject(r,e[t]);return"number"==typeof n||a.parse.isGuid(n)?"/"+n:n instanceof Date?"/"+e[t][r].toJSON():"/'"+n+"'"},data:function(e,t){return""}};i.push("--"+o),i.push("Content-Type: application/http; msgtype=request",""),i.push("DELETE /api/"+(e.dataSource.removeUrl||e.dataSource.crudUrl||r.url)+c.url(t.deletedRecords,n,r.key)+" HTTP/1.1"),i.push("Content-Type: application/json; charset=utf-8"),i.push("Host: "+location.host),i.push("",s?JSON.stringify(s):"")})}(u);return i.push("--"+o+"--",""),{type:"POST",url:s,contentType:"multipart/mixed; boundary="+o,data:i.join("\r\n")}},t.prototype.beforeSend=function(e,t,r){t.setRequestHeader("Accept","application/json, text/javascript, */*; q=0.01")},t.prototype.processResponse=function(e,t,r,n,o,s){var i=o&&o.pvtData,u=null,c={};if(o&&"post"!==o.type.toLowerCase()){var l=n&&o.getResponseHeader("DataServiceVersion"),p=l&&parseInt(l,10)||2;r&&r.isCountRequired&&(a.isNull(e.Count)||(u=e.Count)),p<3&&e.Items&&(e=e.Items),c.count=u,c.result=e,this.getAggregateResult(i,e,c,null,r)}return c.result=c.result||e,a.isNull(u)?c.result:{result:c.result,count:c.count,aggregates:c.aggregates}},t}(p),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.processQuery=function(e,t,r){var n=(new l).processQuery(e,t,r),o=a.parse.parseJson(n.data),s={};if(o.param)for(var i=0;i<o.param.length;i++){var u=o.param[i],c=Object.keys(u)[0];s[c]=u[c]}s.value=o;return{data:JSON.stringify(s),url:n.url,pvtData:n.pvtData,type:"POST",contentType:"application/json; charset=utf-8"}},t}(l),g=function(e){function r(){var r=e.call(this)||this;return t.setValue("beforeSend",l.prototype.beforeSend,r),r}return s(r,e),r.prototype.insert=function(e,r,n,o,s){return this.pvt.position=s,this.updateType="add",{url:e.dataSource.insertUrl||e.dataSource.crudUrl||e.dataSource.url,data:JSON.stringify(t.extend({},{value:r,table:n,action:"insert"},a.getAddParams(this,e,o)))}},r.prototype.remove=function(r,n,o,s,i){return e.prototype.remove.call(this,r,n,o),{type:"POST",url:r.dataSource.removeUrl||r.dataSource.crudUrl||r.dataSource.url,data:JSON.stringify(t.extend({},{key:o,keyColumn:n,table:s,action:"remove"},a.getAddParams(this,r,i)))}},r.prototype.update=function(e,r,n,o,s){return this.updateType="update",this.updateKey=r,{type:"POST",url:e.dataSource.updateUrl||e.dataSource.crudUrl||e.dataSource.url,data:JSON.stringify(t.extend({},{value:n,action:"update",keyColumn:r,key:n[r],table:o},a.getAddParams(this,e,s)))}},r.prototype.processResponse=function(t,r,n,o,a,s,i){var u;if(t=a?JSON.parse(a.data):t,"add"===this.updateType&&e.prototype.insert.call(this,r,t,null,null,this.pvt.position),"update"===this.updateType&&e.prototype.update.call(this,r,this.updateKey,t),this.updateType=void 0,t.added)for(u=0;u<t.added.length;u++)e.prototype.insert.call(this,r,t.added[u]);if(t.changed)for(u=0;u<t.changed.length;u++)e.prototype.update.call(this,r,i.key,t.changed[u]);if(t.deleted)for(u=0;u<t.deleted.length;u++)e.prototype.remove.call(this,r,i.key,t.deleted[u]);return t},r.prototype.batchRequest=function(e,r,n,o,s){return{type:"POST",url:e.dataSource.batchUrl||e.dataSource.crudUrl||e.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t.extend({},{changed:r.changedRecords,added:r.addedRecords,deleted:r.deletedRecords,action:"batch",table:n.url,key:n.key},a.getAddParams(this,e,o)))}},r.prototype.addParams=function(e){(new l).addParams(e)},r}(c),y=function(e){function r(r){var n=e.call(this)||this;return n.options=t.extend({},n.options,{getData:new Function,addRecord:new Function,updateRecord:new Function,deleteRecord:new Function,batchUpdate:new Function}),t.extend(n.options,r||{}),n}return s(r,e),r.prototype.getModuleName=function(){return"CustomDataAdaptor"},r}(l),v=function(e){function n(r,n,o){var s=e.call(this)||this;s.isCrudAction=!1,s.isInsertAction=!1,t.isNullOrUndefined(r)||(s.cacheAdaptor=r),s.pageSize=o,s.guidId=a.getGuid("cacheAdaptor");var i={keys:[],results:[]};window.localStorage.setItem(s.guidId,JSON.stringify(i));var u=s.guidId;return t.isNullOrUndefined(n)||setInterval(function(){var e;e=a.parse.parseJson(window.localStorage.getItem(u));for(var t=[],r=0;r<e.results.length;r++){var o=+new Date,s=+new Date(e.results[r].timeStamp);e.results[r].timeStamp=o-s,o-s>n&&t.push(r)}for(r=0;r<t.length;r++)e.results.splice(t[r],1),e.keys.splice(t[r],1);window.localStorage.removeItem(u),window.localStorage.setItem(u,JSON.stringify(e))},n),s}return s(n,e),n.prototype.generateKey=function(e,t){var n=this.getQueryRequest(t),o=r.filterQueryLists(t.queries,["onSelect","onPage","onSkip","onTake","onRange"]),a=e;"onPage"in o&&(a+=o.onPage.pageIndex),n.sorts.forEach(function(e){a+=e.e.direction+e.e.fieldName}),n.groups.forEach(function(e){a+=e.e.fieldName}),n.searches.forEach(function(e){a+=e.e.searchKey});for(var s=0;s<n.filters.length;s++){var i=n.filters[s];if(i.e.isComplex){var u=t.clone();u.queries=[];for(var c=0;c<i.e.predicates.length;c++)u.queries.push({fn:"onWhere",e:i.e.predicates[c],filter:t.queries.filter});a+=i.e.condition+this.generateKey(e,u)}else a+=i.e.field+i.e.operator+i.e.value}return a},n.prototype.processQuery=function(e,t,r){var n,o=this.generateKey(e.dataSource.url,t),s=(n=a.parse.parseJson(window.localStorage.getItem(this.guidId)))?n.results[n.keys.indexOf(o)]:null;return null==s||this.isCrudAction||this.isInsertAction?(this.isCrudAction=null,this.isInsertAction=null,this.cacheAdaptor.processQuery.apply(this.cacheAdaptor,[].slice.call(arguments,0))):s},n.prototype.processResponse=function(e,t,r,n,o,s){if(this.isInsertAction||o&&this.cacheAdaptor.options.batch&&a.endsWith(o.url,this.cacheAdaptor.options.batch)&&"post"===o.type.toLowerCase())return this.cacheAdaptor.processResponse(e,t,r,n,o,s);e=this.cacheAdaptor.processResponse.apply(this.cacheAdaptor,[].slice.call(arguments,0));var i=r?this.generateKey(t.dataSource.url,r):t.dataSource.url,u={},c=(u=a.parse.parseJson(window.localStorage.getItem(this.guidId))).keys.indexOf(i);for(-1!==c&&(u.results.splice(c,1),u.keys.splice(c,1)),u.results[u.keys.push(i)-1]={keys:i,result:e.result,timeStamp:new Date,count:e.count};u.results.length>this.pageSize;)u.results.splice(0,1),u.keys.splice(0,1);return window.localStorage.setItem(this.guidId,JSON.stringify(u)),e},n.prototype.beforeSend=function(e,r,n){!t.isNullOrUndefined(this.cacheAdaptor.options.batch)&&a.endsWith(n.url,this.cacheAdaptor.options.batch)&&"post"===n.type.toLowerCase()&&r.setRequestHeader("Accept",this.cacheAdaptor.options.multipartAccept),e.dataSource.crossDomain||r.setRequestHeader("Accept",this.cacheAdaptor.options.accept)},n.prototype.update=function(e,t,r,n){return this.isCrudAction=!0,this.cacheAdaptor.update(e,t,r,n)},n.prototype.insert=function(e,t,r){return this.isInsertAction=!0,this.cacheAdaptor.insert(e,t,r)},n.prototype.remove=function(e,t,r,n){return this.isCrudAction=!0,this.cacheAdaptor.remove(e,t,r,n)},n.prototype.batchRequest=function(e,t,r){return this.cacheAdaptor.batchRequest(e,t,r)},n}(l),m=function(){function e(e,n,o){var s=this;this.dateParse=!0,this.timeZoneHandling=!0,this.requests=[],e||this.dataSource||(e=[]),o=o||e.adaptor,e&&!1===e.timeZoneHandling&&(this.timeZoneHandling=e.timeZoneHandling);var i;return e instanceof Array?i={json:e,offline:!0}:"object"==typeof e?(e.json||(e.json=[]),i={url:e.url,insertUrl:e.insertUrl,removeUrl:e.removeUrl,updateUrl:e.updateUrl,crudUrl:e.crudUrl,batchUrl:e.batchUrl,json:e.json,headers:e.headers,accept:e.accept,data:e.data,timeTillExpiration:e.timeTillExpiration,cachingPageSize:e.cachingPageSize,enableCaching:e.enableCaching,requestType:e.requestType,key:e.key,crossDomain:e.crossDomain,jsonp:e.jsonp,dataType:e.dataType,offline:void 0!==e.offline?e.offline:!(e.adaptor instanceof g||e.adaptor instanceof y)&&!e.url,requiresFormat:e.requiresFormat}):a.throwError("DataManager: Invalid arguments"),void 0!==i.requiresFormat||a.isCors()||(i.requiresFormat=!!t.isNullOrUndefined(i.crossDomain)||i.crossDomain),void 0===i.dataType&&(i.dataType="json"),this.dataSource=i,this.defaultQuery=n,i.url&&i.offline&&!i.json.length?(this.isDataAvailable=!1,this.adaptor=o||new p,this.dataSource.offline=!1,this.ready=this.executeQuery(n||new r),this.ready.then(function(e){s.dataSource.offline=!0,s.isDataAvailable=!0,i.json=e.result,s.adaptor=new c})):this.adaptor=i.offline?new c:new p,!i.jsonp&&this.adaptor instanceof p&&(i.jsonp="callback"),this.adaptor=o||this.adaptor,i.enableCaching&&(this.adaptor=new v(this.adaptor,i.timeTillExpiration,i.cachingPageSize)),this}return e.prototype.setDefaultQuery=function(e){return this.defaultQuery=e,this},e.prototype.executeLocal=function(n){this.defaultQuery||n instanceof r||a.throwError("DataManager - executeLocal() : A query is required to execute"),this.dataSource.json||a.throwError("DataManager - executeLocal() : Json data is required to execute"),n=n||this.defaultQuery;var o=this.adaptor.processQuery(this,n);if(n.subQuery){var s=n.subQuery.fromTable,i=n.subQuery.lookups,u=n.isCountRequired?o.result:o;i&&i instanceof Array&&a.buildHierarchy(n.subQuery.fKey,s,u,i,n.subQuery.key);for(var c=0;c<u.length;c++)u[c][s]instanceof Array&&(u[c]=t.extend({},{},u[c]),u[c][s]=this.adaptor.processResponse(n.subQuery.using(new e(u[c][s].slice(0))).executeLocal(),this,n))}return this.adaptor.processResponse(o,this,n)},e.prototype.executeQuery=function(n,o,s,i){var u=this;"function"==typeof n&&(i=s,s=o,o=n,n=null),n||(n=this.defaultQuery),n instanceof r||a.throwError("DataManager - executeQuery() : A query is required to execute");var c=new S,l={query:n};if(!this.dataSource.offline&&void 0!==this.dataSource.url&&""!==this.dataSource.url||!t.isNullOrUndefined(this.adaptor.makeRequest)||this.isCustomDataAdaptor(this.adaptor)){var p=this.adaptor.processQuery(this,n);t.isNullOrUndefined(this.adaptor.makeRequest)?!t.isNullOrUndefined(p.url)||this.isCustomDataAdaptor(this.adaptor)?this.makeRequest(p,c,l,n):(l=e.getDeferedArgs(n,p,l),c.resolve(l)):this.adaptor.makeRequest(p,c,l,n)}else e.nextTick(function(){var t=u.executeLocal(n);l=e.getDeferedArgs(n,t,l),c.resolve(l)});return(o||s)&&c.promise.then(o,s),i&&c.promise.then(i,i),c.promise},e.getDeferedArgs=function(e,t,r){return e.isCountRequired?(r.result=t.result,r.count=t.count,r.aggregates=t.aggregates):r.result=t,r},e.nextTick=function(e){(window.setImmediate||window.setTimeout)(e,0)},e.prototype.extendRequest=function(e,r,n){return t.extend({},{type:"GET",dataType:this.dataSource.dataType,crossDomain:this.dataSource.crossDomain,jsonp:this.dataSource.jsonp,cache:!0,processData:!1,onSuccess:r,onFailure:n},e)},e.prototype.makeRequest=function(e,r,n,o){var s=this,i=!!o.subQuerySelector,u=function(e){n.error=e,r.reject(n)},c=function(e,t,o,a,s,i,u){n.xhr=o,n.count=t?parseInt(t.toString(),10):0,n.result=e,n.request=a,n.aggregates=i,n.actual=s,n.virtualSelectRecords=u,r.resolve(n)},l=function(e,t){var r=new S,l={parent:n};o.subQuery.isChild=!0;var p=s.adaptor.processQuery(s,o.subQuery,e?s.adaptor.processResponse(e):t),d=s.makeRequest(p,r,l,o.subQuery);return i||r.then(function(t){e&&(a.buildHierarchy(o.subQuery.fKey,o.subQuery.fromTable,e,t,o.subQuery.key),c(e,t.count,t.xhr))},u),d},p=function(e,r){s.isCustomDataAdaptor(s.adaptor)&&(r=t.extend({},s.ajaxReqOption,r)),-1===r.httpRequest.getResponseHeader("Content-Type").indexOf("xml")&&s.dateParse&&(e=a.parse.parseJson(e));var n=s.adaptor.processResponse(e,s,o,r.httpRequest,r),u=0,p=null,d=e.virtualSelectRecords;if(o.isCountRequired&&(u=n.count,p=n.aggregates,n=n.result),!o.subQuery)return void c(n,u,r.httpRequest,r.type,e,p,d);i||l(n,r)},d=this.extendRequest(e,p,u);if(this.isCustomDataAdaptor(this.adaptor)){this.ajaxReqOption=d;var h=d;this.adaptor.options.getData({data:h.data,onSuccess:h.onSuccess,onFailure:h.onFailure})}else{var f=new t.Ajax(d);f.beforeSend=function(){s.beforeSend(f.httpRequest,f)},(d=f.send()).catch(function(e){return!0}),this.requests.push(f)}if(i){var g=o.subQuerySelector.call(this,{query:o.subQuery,parent:o});g&&g.length?Promise.all([d,l(null,g)]).then(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],n=s.adaptor.processResponse(r[0],s,o,s.requests[0].httpRequest,s.requests[0]),u=0;o.isCountRequired&&(u=n.count,n=n.result);var l=s.adaptor.processResponse(r[1],s,o.subQuery,s.requests[1].httpRequest,s.requests[1]);u=0,o.subQuery.isCountRequired&&(u=l.count,l=l.result),a.buildHierarchy(o.subQuery.fKey,o.subQuery.fromTable,n,l,o.subQuery.key),i=!1,c(n,u,s.requests[0].httpRequest)}):i=!1}return d},e.prototype.beforeSend=function(e,t){this.adaptor.beforeSend(this,e,t);for(var r,n=this.dataSource.headers,o=0;n&&o<n.length;o++){r=[];for(var a=0,s=Object.keys(n[o]);a<s.length;a++){var i=s[a];r.push(i),e.setRequestHeader(i,n[o][i])}}},e.prototype.saveChanges=function(e,n,o,a,s){var i=this;o instanceof r&&(a=o,o=null);var u={url:o,key:n||this.dataSource.key},c=this.adaptor.batchRequest(this,e,u,a||new r,s);if(this.dataSource.offline)return c;if(t.isNullOrUndefined(this.adaptor.doAjaxRequest)){if(this.isCustomDataAdaptor(this.adaptor))return this.doAjaxRequest(c,this.adaptor.options.batchUpdate);var l=new S,p=new t.Ajax(c);return p.beforeSend=function(){i.beforeSend(p.httpRequest,p)},p.onSuccess=function(t,r){l.resolve(i.adaptor.processResponse(t,i,null,r.httpRequest,r,e,u))},p.onFailure=function(e){l.reject([{error:e}])},p.send().catch(function(e){return!0}),l.promise}return this.adaptor.doAjaxRequest(c)},e.prototype.insert=function(e,n,o,a){n instanceof r&&(o=n,n=null);var s=this.adaptor.insert(this,e,n,o,a);return this.dataSource.offline?s:t.isNullOrUndefined(this.adaptor.doAjaxRequest)?this.doAjaxRequest(s,this.adaptor.options.addRecord):this.adaptor.doAjaxRequest(s)},e.prototype.remove=function(e,n,o,s){"object"==typeof n&&(n=a.getObject(e,n)),o instanceof r&&(s=o,o=null);var i=this.adaptor.remove(this,e,n,o,s);if(this.dataSource.offline)return i;if(t.isNullOrUndefined(this.adaptor.doAjaxRequest)){var u=this.adaptor.options.deleteRecord;return this.doAjaxRequest(i,u)}return this.adaptor.doAjaxRequest(i)},e.prototype.update=function(e,n,o,a,s){o instanceof r&&(a=o,o=null);var i=this.adaptor.update(this,e,n,o,a,s);if(this.dataSource.offline)return i;if(t.isNullOrUndefined(this.adaptor.doAjaxRequest)){var u=this.adaptor.options.updateRecord;return this.doAjaxRequest(i,u)}return this.adaptor.doAjaxRequest(i)},e.prototype.isCustomDataAdaptor=function(e){return this.adaptor.getModuleName&&"CustomDataAdaptor"===this.adaptor.getModuleName()},e.prototype.successFunc=function(e,r){this.isCustomDataAdaptor(this.adaptor)&&(r=t.extend({},this.ajaxReqOption,r));try{a.parse.parseJson(e)}catch(t){e=[]}e=this.adaptor.processResponse(a.parse.parseJson(e),this,null,r.httpRequest,r),this.ajaxDeffered.resolve(e)},e.prototype.failureFunc=function(e){this.ajaxDeffered.reject([{error:e}])},e.prototype.doAjaxRequest=function(e,r){var n=this;if(e=t.extend({},{type:"POST",contentType:"application/json; charset=utf-8",processData:!1},e),this.ajaxDeffered=new S,this.isCustomDataAdaptor(this.adaptor))this.ajaxReqOption=e,r.call(this,{data:e.data,onSuccess:this.successFunc.bind(this),onFailure:this.failureFunc.bind(this)});else{var o=new t.Ajax(e);o.beforeSend=function(){n.beforeSend(o.httpRequest,o)},o.onSuccess=this.successFunc.bind(this),o.onFailure=this.failureFunc.bind(this),o.send().catch(function(e){return!0})}return this.ajaxDeffered.promise},e}(),S=function(){function e(){var e=this;this.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}return e}();return e.DataManager=m,e.Deferred=S,e.Query=r,e.Predicate=n,e.Adaptor=u,e.JsonAdaptor=c,e.UrlAdaptor=l,e.ODataAdaptor=p,e.ODataV4Adaptor=d,e.WebApiAdaptor=h,e.WebMethodAdaptor=f,e.RemoteSaveAdaptor=g,e.CustomDataAdaptor=y,e.CacheAdaptor=v,e.DataUtil=a,e}({},ej.base),this.ejs=ej;
- /*!
- * filename: ej2-buttons.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.buttons=function(e,t){"use strict";function i(e,i,s,n,r,a){var l=n;if(n.tagName===i){var o=t.getValue("ej2_instances",n);l=e("input",{attrs:{type:s}});for(var c=["change","cssClass","label","labelPosition","id"],h=0,p=n.attributes.length;h<p;h++)-1===c.indexOf(n.attributes[h].nodeName)&&l.setAttribute(n.attributes[h].nodeName,n.attributes[h].nodeValue);t.attributes(n,{class:r,role:a,"aria-checked":"false"}),n.appendChild(l),t.setValue("ej2_instances",o,l),t.deleteObject(n,"ej2_instances")}return l}function s(e){for(var t,i=e.childNodes,s=0;s<i.length;s++)if(3===(t=i[s]).nodeType)return t;return null}function n(e,i,s){"INPUT"===s?(i.parentNode.insertBefore(e.element,i),t.detach(i),e.element.checked=!1,["name","value","disabled"].forEach(function(t){e.element.removeAttribute(t)})):(["role","aria-checked","class"].forEach(function(e){i.removeAttribute(e)}),i.innerHTML="")}function r(e,s,n,r,a){r=i(e.createElement,s,"checkbox",r,n,a),e.element=r,"checkbox"!==e.element.getAttribute("type")&&e.element.setAttribute("type","checkbox"),e.element.id||(e.element.id=t.getUniqueID("e-"+a))}function a(e,i,s){void 0===i&&(i=!1),void 0===s&&(s={});var n=e("div",{className:"e-checkbox-wrapper e-css"});if(s.cssClass&&t.addClass([n],s.cssClass.split(" ")),s.enableRtl&&n.classList.add("e-rtl"),i){var r=e("span",{className:"e-ripple-container"});t.rippleEffect(r,{isCenterRipple:!0,duration:400}),n.appendChild(r)}var a=e("span",{className:"e-frame e-icons"});if(s.checked&&a.classList.add("e-check"),n.appendChild(a),s.label){var l=e("span",{className:"e-label"});s.disableHtmlEncode?l.textContent=s.label:l.innerHTML=s.label,n.appendChild(l)}return n}function l(e,t){if(t){var i=document.createEvent("MouseEvents");i.initEvent(e.type,!1,!0),t.dispatchEvent(i)}}function o(e,t){e.element.getAttribute("ejs-for")&&t.appendChild(e.createElement("input",{attrs:{name:e.name||e.element.name,value:"false",type:"hidden"}}))}var c=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),h=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},p=new t.Observer,d={RTL:"e-rtl",BUTTON:"e-btn",PRIMARY:"e-primary",ICONBTN:"e-icon-btn"},u=function(e){function i(t,i){return e.call(this,t,i)||this}return c(i,e),i.prototype.preRender=function(){},i.prototype.render=function(){this.initialize(),this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+d.BUTTON}),this.renderComplete()},i.prototype.initialize=function(){if(this.cssClass&&t.addClass([this.element],this.cssClass.split(" ")),this.isPrimary&&this.element.classList.add(d.PRIMARY),!t.isBlazor()||t.isBlazor()&&"progress-btn"!==this.getModuleName()){if(this.content){var e=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(this.content):this.content;this.element.innerHTML=e}this.setIconCss()}this.enableRtl&&this.element.classList.add(d.RTL),this.disabled?this.controlStatus(this.disabled):this.wireEvents()},i.prototype.controlStatus=function(e){this.element.disabled=e},i.prototype.setIconCss=function(){if(this.iconCss){var e=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(e.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add(d.ICONBTN);var t=this.element.childNodes[0];!t||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?this.element.appendChild(e):this.element.insertBefore(e,t)}},i.prototype.wireEvents=function(){this.isToggle&&t.EventHandler.add(this.element,"click",this.btnClickHandler,this)},i.prototype.unWireEvents=function(){this.isToggle&&t.EventHandler.remove(this.element,"click",this.btnClickHandler)},i.prototype.btnClickHandler=function(){this.element.classList.contains("e-active")?this.element.classList.remove("e-active"):this.element.classList.add("e-active")},i.prototype.destroy=function(){var i=[d.PRIMARY,d.RTL,d.ICONBTN,"e-success","e-info","e-danger","e-warning","e-flat","e-outline","e-small","e-bigger","e-active","e-round","e-top-icon-btn","e-bottom-icon-btn"];this.cssClass&&(i=i.concat(this.cssClass.split(" "))),e.prototype.destroy.call(this),t.removeClass([this.element],i),this.element.getAttribute("class")||this.element.removeAttribute("class"),this.disabled&&this.element.removeAttribute("disabled"),this.content&&(this.element.innerHTML=this.element.innerHTML.replace(this.content,""));var s=this.element.querySelector("span.e-btn-icon");s&&t.detach(s),this.unWireEvents(),t.isRippleEnabled&&this.removeRippleEffect()},i.prototype.getModuleName=function(){return"btn"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.Inject=function(){},i.prototype.onPropertyChanged=function(e,i){for(var n=this.element.querySelector("span.e-btn-icon"),r=0,a=Object.keys(e);r<a.length;r++)switch(a[r]){case"isPrimary":e.isPrimary?this.element.classList.add(d.PRIMARY):this.element.classList.remove(d.PRIMARY);break;case"disabled":this.controlStatus(e.disabled);break;case"iconCss":n?e.iconCss?(n.className="e-btn-icon "+e.iconCss,this.element.textContent.trim()&&("Left"===this.iconPosition?n.classList.add("e-icon-left"):n.classList.add("e-icon-right"))):t.detach(n):this.setIconCss();break;case"iconPosition":t.removeClass([this.element],["e-top-icon-btn","e-bottom-icon-btn"]),(n=this.element.querySelector("span.e-btn-icon"))&&t.detach(n),this.setIconCss();break;case"cssClass":i.cssClass&&t.removeClass([this.element],i.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?this.element.classList.add(d.RTL):this.element.classList.remove(d.RTL);break;case"content":s(this.element)||this.element.classList.remove(d.ICONBTN),(!t.isBlazor()||t.isBlazor()&&!this.isServerRendered&&"progress-btn"!==this.getModuleName())&&(this.enableHtmlSanitizer&&(e.content=t.SanitizeHtmlHelper.sanitize(e.content)),this.element.innerHTML=e.content,this.setIconCss());break;case"isToggle":e.isToggle?t.EventHandler.add(this.element,"click",this.btnClickHandler,this):(t.EventHandler.remove(this.element,"click",this.btnClickHandler),t.removeClass([this.element],["e-active"]))}},i.prototype.click=function(){this.element.click()},i.prototype.focusIn=function(){this.element.focus()},h([t.Property("Left")],i.prototype,"iconPosition",void 0),h([t.Property("")],i.prototype,"iconCss",void 0),h([t.Property(!1)],i.prototype,"disabled",void 0),h([t.Property(!1)],i.prototype,"isPrimary",void 0),h([t.Property("")],i.prototype,"cssClass",void 0),h([t.Property("")],i.prototype,"content",void 0),h([t.Property(!1)],i.prototype,"isToggle",void 0),h([t.Property()],i.prototype,"locale",void 0),h([t.Property(!1)],i.prototype,"enableHtmlSanitizer",void 0),h([t.Event()],i.prototype,"created",void 0),i=h([t.NotifyPropertyChanges],i)}(t.Component),m=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),f=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},v="e-frame",y="e-ripple-container",b="e-checkbox-wrapper",g=["title","class","style","disabled","readonly","name","value"],C=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.isFocused=!1,s.isMouseClick=!1,s}return m(s,e),s.prototype.changeState=function(e){var i,s,n=this.getWrapper().getElementsByClassName(v)[0];t.isRippleEnabled&&(s=this.getWrapper().getElementsByClassName(y)[0]),"check"===e?(n.classList.remove("e-stop"),n.classList.add("e-check"),s&&(s.classList.remove("e-ripple-stop"),s.classList.add("e-ripple-check")),i="true",this.element.checked=!0):"uncheck"===e?(t.removeClass([n],["e-check","e-stop"]),s&&t.removeClass([s],["e-ripple-check","e-ripple-stop"]),i="false",this.element.checked=!1):(n.classList.remove("e-check"),n.classList.add("e-stop"),s&&(s.classList.remove("e-ripple-check"),s.classList.add("e-ripple-stop")),i="mixed",this.element.indeterminate=!0),this.getWrapper().setAttribute("aria-checked",i)},s.prototype.clickHandler=function(e){this.isMouseClick&&(this.focusOutHandler(),this.isMouseClick=!1),this.indeterminate?(this.changeState(this.checked?"check":"uncheck"),this.indeterminate=!1,this.element.indeterminate=!1):this.checked?(this.changeState("uncheck"),this.checked=!1):(this.changeState("check"),this.checked=!0);var t={checked:this.updateVueArrayModel(!1),event:e};this.trigger("change",t),e.stopPropagation()},s.prototype.destroy=function(){var i=this,s=this.getWrapper();e.prototype.destroy.call(this),this.wrapper&&(s=this.wrapper,this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(this.getWrapper()&&s.parentNode&&s.parentNode.insertBefore(this.element,s),t.detach(s),this.element.checked=!1,this.indeterminate&&(this.element.indeterminate=!1),["name","value","disabled"].forEach(function(e){i.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML=""))},s.prototype.focusHandler=function(){this.isFocused=!0},s.prototype.focusOutHandler=function(){var e=this.getWrapper();e&&e.classList.remove("e-focus"),this.isFocused=!1},s.prototype.getModuleName=function(){return"checkbox"},s.prototype.getPersistData=function(){return this.addOnPersist(["checked","indeterminate"])},s.prototype.getWrapper=function(){return this.element&&this.element.parentElement?this.element.parentElement.parentElement:null},s.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&(this.element.setAttribute("value",this.value),this.isVue&&"boolean"==typeof this.value&&!0===this.value&&this.setProperties({checked:!0},!0)),this.checked&&this.changeState("check"),this.indeterminate&&this.changeState(),this.disabled&&this.setDisabled()},s.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains(b)||(e=this.createElement("div",{className:b,attrs:{role:"checkbox","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var i=this.createElement("label",{attrs:{for:this.element.id}}),s=this.createElement("span",{className:"e-icons "+v});if(e.classList.add("e-wrapper"),this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),e.appendChild(i),i.appendChild(this.element),o(this,i),i.appendChild(s),t.isRippleEnabled){var n=this.createElement("span",{className:y});"Before"===this.labelPosition?i.appendChild(n):i.insertBefore(n,s),t.rippleEffect(n,{duration:400,isCenterRipple:!0})}this.label&&this.setText(this.label)},s.prototype.keyUpHandler=function(){this.isFocused&&this.getWrapper().classList.add("e-focus")},s.prototype.labelMouseDownHandler=function(e){this.isMouseClick=!0,l(e,this.getWrapper().getElementsByClassName(y)[0])},s.prototype.labelMouseUpHandler=function(e){this.isMouseClick=!0;var t=this.getWrapper().getElementsByClassName(y)[0];if(t){for(var i=t.querySelectorAll(".e-ripple-element"),s=0;s<i.length-1;s++)t.removeChild(t.childNodes[s]);l(e,t)}},s.prototype.onPropertyChanged=function(e,i){for(var s=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":this.indeterminate=!1,this.element.indeterminate=!1,this.changeState(e.checked?"check":"uncheck");break;case"indeterminate":e.indeterminate?this.changeState():(this.element.indeterminate=!1,this.changeState(this.checked?"check":"uncheck"));break;case"disabled":e.disabled?(this.setDisabled(),this.wrapper=this.getWrapper(),this.unWireEvents()):(this.element.disabled=!1,s.classList.remove("e-checkbox-disabled"),s.setAttribute("aria-disabled","false"),this.wireEvents());break;case"cssClass":i.cssClass&&t.removeClass([s],i.cssClass.split(" ")),e.cssClass&&t.addClass([s],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?s.classList.add("e-rtl"):s.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":var a=s.getElementsByClassName("e-label")[0],l=s.getElementsByTagName("label")[0];t.detach(a),"After"===e.labelPosition?l.appendChild(a):l.insertBefore(a,s.getElementsByClassName(v)[0]);break;case"name":this.element.setAttribute("name",e.name);break;case"value":if(this.isVue&&"object"==typeof e.value)break;this.element.setAttribute("value",e.value);break;case"htmlAttributes":this.updateHtmlAttributeToWrapper()}},s.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=i(this.createElement,"EJS-CHECKBOX","checkbox",e,b,"checkbox"),this.element=e,"checkbox"!==this.element.getAttribute("type")&&this.element.setAttribute("type","checkbox"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},s.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents(),this.updateHtmlAttributeToWrapper(),this.updateVueArrayModel(!0),this.renderComplete(),this.wrapper=this.getWrapper()},s.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-checkbox-disabled"),e.setAttribute("aria-disabled","true")},s.prototype.setText=function(e){var i=this.getWrapper();if(i){var s=i.getElementsByClassName("e-label")[0];if(s)s.textContent=e;else{e=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e):e,s=this.createElement("span",{className:"e-label",innerHTML:e});var n=i.getElementsByTagName("label")[0];"Before"===this.labelPosition?n.insertBefore(s,i.getElementsByClassName(v)[0]):n.appendChild(s)}}},s.prototype.changeHandler=function(e){e.stopPropagation()},s.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.element.checked=this.initialCheckedValue},s.prototype.unWireEvents=function(){var e=this.wrapper;t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler);var i=e.getElementsByTagName("label")[0];t.EventHandler.remove(i,"mousedown",this.labelMouseDownHandler),t.EventHandler.remove(i,"mouseup",this.labelMouseUpHandler),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.remove(this.element,"change",this.changeHandler)},s.prototype.wireEvents=function(){var e=this.getWrapper();t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var i=e.getElementsByTagName("label")[0];t.EventHandler.add(i,"mousedown",this.labelMouseDownHandler,this),t.EventHandler.add(i,"mouseup",this.labelMouseUpHandler,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),"EJS-CHECKBOX"===this.tagName&&t.EventHandler.add(this.element,"change",this.changeHandler,this)},s.prototype.updateVueArrayModel=function(e){if(this.isVue&&"object"==typeof this.value){var t=this.element.value;if(t&&this.value){if(!e){var i=this.value.indexOf(t);return this.checked?i<0&&this.value.push(t):i>-1&&this.value.splice(i,1),this.value}for(var s=0;s<this.value.length;s++)t===this.value[s]&&(this.changeState("check"),this.setProperties({checked:!0},!0))}}return this.element.checked},s.prototype.updateHtmlAttributeToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(g.indexOf(s)>-1){var n=this.getWrapper();"class"===s?t.addClass([n],this.htmlAttributes[s].split(" ")):"title"===s?n.setAttribute(s,this.htmlAttributes[s]):"style"===s?this.getWrapper().getElementsByClassName(v)[0].setAttribute(s,this.htmlAttributes[s]):this.element.setAttribute(s,this.htmlAttributes[s])}}},s.prototype.click=function(){this.element.click()},s.prototype.focusIn=function(){this.element.focus()},f([t.Event()],s.prototype,"change",void 0),f([t.Event()],s.prototype,"created",void 0),f([t.Property(!1)],s.prototype,"checked",void 0),f([t.Property("")],s.prototype,"cssClass",void 0),f([t.Property(!1)],s.prototype,"disabled",void 0),f([t.Property(!1)],s.prototype,"indeterminate",void 0),f([t.Property("")],s.prototype,"label",void 0),f([t.Property("After")],s.prototype,"labelPosition",void 0),f([t.Property("")],s.prototype,"name",void 0),f([t.Property("")],s.prototype,"value",void 0),f([t.Property(!1)],s.prototype,"enableHtmlSanitizer",void 0),f([t.Property({})],s.prototype,"htmlAttributes",void 0),s=f([t.NotifyPropertyChanges],s)}(t.Component),k=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),E=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},H=["title","class","style","disabled","readonly","name","value"],S=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.isFocused=!1,s}k(s,e),n=s,s.prototype.changeHandler=function(e){this.checked=!0,this.dataBind();var t=this.element.getAttribute("value");t=this.isVue&&t?this.element.value:this.value,this.trigger("change",{value:t,event:e}),"EJS-RADIOBUTTON"===this.tagName&&e.stopPropagation()},s.prototype.updateChange=function(){for(var e,i,s=this.getRadioGroup(),r=0;r<s.length;r++)(e=s[r])!==this.element&&((i=t.getInstance(e,n)).checked=!1,"EJS-RADIOBUTTON"===this.tagName&&(i.angularValue=this.value))},s.prototype.destroy=function(){var i=this,s=this.element.parentElement;e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),"INPUT"===this.tagName?(s.parentNode&&s.parentNode.insertBefore(this.element,s),t.detach(s),this.element.checked=!1,["name","value","disabled"].forEach(function(e){i.element.removeAttribute(e)})):(["role","aria-checked","class"].forEach(function(e){s.removeAttribute(e)}),s.innerHTML="")},s.prototype.focusHandler=function(){this.isFocused=!0},s.prototype.focusOutHandler=function(){var e=this.getLabel();e&&e.classList.remove("e-focus")},s.prototype.getModuleName=function(){return"radio"},s.prototype.getSelectedValue=function(){for(var e,t=this.getRadioGroup(),i=0,s=t.length;i<s;i++)if((e=t[i]).checked)return e.value;return""},s.prototype.getRadioGroup=function(){return document.querySelectorAll('input.e-radio[name="'+this.element.getAttribute("name")+'"]')},s.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},s.prototype.getWrapper=function(){return this.element?this.element.parentElement:null},s.prototype.getLabel=function(){return this.element?this.element.nextElementSibling:null},s.prototype.initialize=function(){t.isNullOrUndefined(this.initialCheckedValue)&&(this.initialCheckedValue=this.checked),this.initWrapper(),this.updateHtmlAttribute(),this.name&&this.element.setAttribute("name",this.name);var e=this.element.getAttribute("value");this.isVue&&e&&e===this.value&&(this.checked=!0),(this.isVue?this.value&&!e:this.value)&&this.element.setAttribute("value",this.value),this.checked&&(this.element.checked=!0),this.disabled&&this.setDisabled()},s.prototype.initWrapper=function(){var e,i=this.element.parentElement;i.classList.contains("e-radio-wrapper")||(i=this.createElement("div",{className:"e-radio-wrapper"}),this.element.parentNode.insertBefore(i,this.element));var s=this.createElement("label",{attrs:{for:this.element.id}});i.appendChild(this.element),i.appendChild(s),t.isRippleEnabled&&(e=this.createElement("span",{className:"e-ripple-container"}),s.appendChild(e),t.rippleEffect(e,{duration:400,isCenterRipple:!0})),i.classList.add("e-wrapper"),this.enableRtl&&s.classList.add("e-rtl"),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.label&&this.setText(this.label)},s.prototype.keyUpHandler=function(){this.isFocused&&this.getLabel().classList.add("e-focus")},s.prototype.labelRippleHandler=function(e){l(e,this.getLabel().getElementsByClassName("e-ripple-container")[0])},s.prototype.formResetHandler=function(){this.checked=this.initialCheckedValue,this.initialCheckedValue&&t.attributes(this.element,{checked:"true"})},s.prototype.onPropertyChanged=function(e,i){for(var s=this.getWrapper(),n=this.getLabel(),r=0,a=Object.keys(e);r<a.length;r++)switch(a[r]){case"checked":e.checked&&this.updateChange(),this.element.checked=e.checked;break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,this.wireEvents());break;case"cssClass":i.cssClass&&t.removeClass([s],i.cssClass.split(" ")),e.cssClass&&t.addClass([s],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?n.classList.add("e-rtl"):n.classList.remove("e-rtl");break;case"label":this.setText(e.label);break;case"labelPosition":"Before"===e.labelPosition?n.classList.add("e-right"):n.classList.remove("e-right");break;case"name":this.element.setAttribute("name",e.name);break;case"value":if(!t.isNullOrUndefined(this.htmlAttributes)&&this.htmlAttributes.value)break;this.element.setAttribute("value",e.value);break;case"htmlAttributes":this.updateHtmlAttribute()}},s.prototype.preRender=function(){var e=this.element;if(this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,e=i(this.createElement,"EJS-RADIOBUTTON","radio",e,"e-radio-wrapper","radio"),this.element=e,"radio"!==this.element.getAttribute("type")&&this.element.setAttribute("type","radio"),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),"EJS-RADIOBUTTON"===this.tagName){var s=this.element.getAttribute("formcontrolname");s&&(this.setProperties({name:s},!0),this.element.setAttribute("name",s))}},s.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},s.prototype.setDisabled=function(){this.element.disabled=!0},s.prototype.setText=function(e){var i=this.getLabel(),s=i.getElementsByClassName("e-label")[0];s?s.textContent=e:(e=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e):e,s=this.createElement("span",{className:"e-label",innerHTML:e}),i.appendChild(s)),"Before"===this.labelPosition?this.getLabel().classList.add("e-right"):this.getLabel().classList.remove("e-right")},s.prototype.updateHtmlAttribute=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(H.indexOf(s)>-1){var n=this.element.parentElement;"class"===s?t.addClass([n],this.htmlAttributes[s].split(" ")):"title"===s||"style"===s?n.setAttribute(s,this.htmlAttributes[s]):this.element.setAttribute(s,this.htmlAttributes[s])}}},s.prototype.unWireEvents=function(){var e=this.getLabel();t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler);var i=e.getElementsByClassName("e-label")[0];i&&(t.EventHandler.remove(i,"mousedown",this.labelRippleHandler),t.EventHandler.remove(i,"mouseup",this.labelRippleHandler)),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},s.prototype.wireEvents=function(){var e=this.getLabel();t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this);var i=e.getElementsByClassName("e-label")[0];i&&(t.EventHandler.add(i,"mousedown",this.labelRippleHandler,this),t.EventHandler.add(i,"mouseup",this.labelRippleHandler,this)),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)},s.prototype.click=function(){this.element.click()},s.prototype.focusIn=function(){this.element.focus()};var n;return E([t.Event()],s.prototype,"change",void 0),E([t.Event()],s.prototype,"created",void 0),E([t.Property(!1)],s.prototype,"checked",void 0),E([t.Property("")],s.prototype,"cssClass",void 0),E([t.Property(!1)],s.prototype,"disabled",void 0),E([t.Property("")],s.prototype,"label",void 0),E([t.Property("After")],s.prototype,"labelPosition",void 0),E([t.Property("")],s.prototype,"name",void 0),E([t.Property("")],s.prototype,"value",void 0),E([t.Property(!1)],s.prototype,"enableHtmlSanitizer",void 0),E([t.Property({})],s.prototype,"htmlAttributes",void 0),s=n=E([t.NotifyPropertyChanges],s)}(t.Component),A=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),P=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},L="e-ripple-container",N=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.isFocused=!1,s.isDrag=!1,s}return A(i,e),i.prototype.changeState=function(e){var i,s,n=this.getWrapper(),r=n.querySelector(".e-switch-inner"),a=n.querySelector(".e-switch-handle");t.isRippleEnabled&&(s=n.getElementsByClassName(L)[0]),e?(t.addClass([r,a],"e-switch-active"),i="true",this.element.checked=!0,this.checked=!0,s&&t.addClass([s],["e-ripple-check"])):(t.removeClass([r,a],"e-switch-active"),i="false",this.element.checked=!1,this.checked=!1,s&&t.removeClass([s],["e-ripple-check"])),n.setAttribute("aria-checked",i)},i.prototype.clickHandler=function(e){this.isDrag=!1,this.focusOutHandler(),this.changeState(!this.checked),this.element.focus();var t={checked:this.element.checked,event:e};this.trigger("change",t)},i.prototype.destroy=function(){e.prototype.destroy.call(this),this.disabled||this.unWireEvents(),n(this,this.getWrapper(),this.tagName)},i.prototype.focusHandler=function(){this.isFocused=!0},i.prototype.focusOutHandler=function(){this.getWrapper().classList.remove("e-focus")},i.prototype.getModuleName=function(){return"switch"},i.prototype.getPersistData=function(){return this.addOnPersist(["checked"])},i.prototype.getWrapper=function(){return this.element.parentElement},i.prototype.initialize=function(){t.isNullOrUndefined(this.initialSwitchCheckedValue)&&(this.initialSwitchCheckedValue=this.checked),this.name&&this.element.setAttribute("name",this.name),this.value&&this.element.setAttribute("value",this.value),this.checked&&this.changeState(!0),this.disabled&&this.setDisabled(),(this.onLabel||this.offLabel)&&this.setLabel(this.onLabel,this.offLabel)},i.prototype.initWrapper=function(){var e=this.element.parentElement;e.classList.contains("e-switch-wrapper")||(e=this.createElement("div",{className:"e-switch-wrapper",attrs:{role:"switch","aria-checked":"false"}}),this.element.parentNode.insertBefore(e,this.element));var i=this.createElement("span",{className:"e-switch-inner"}),s=this.createElement("span",{className:"e-switch-on"}),n=this.createElement("span",{className:"e-switch-off"}),r=this.createElement("span",{className:"e-switch-handle"});if(e.appendChild(this.element),o(this,e),i.appendChild(s),i.appendChild(n),e.appendChild(i),e.appendChild(r),t.isRippleEnabled){var a=this.createElement("span",{className:L});r.appendChild(a),t.rippleEffect(a,{duration:400,isCenterRipple:!0})}e.classList.add("e-wrapper"),this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" "))},i.prototype.onPropertyChanged=function(e,i){for(var s=this.getWrapper(),n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"checked":this.changeState(e.checked);break;case"disabled":e.disabled?(this.setDisabled(),this.unWireEvents()):(this.element.disabled=!1,s.classList.remove("e-switch-disabled"),s.setAttribute("aria-disabled","false"),this.wireEvents());break;case"value":this.element.setAttribute("value",e.value);break;case"name":this.element.setAttribute("name",e.name);break;case"onLabel":case"offLabel":this.setLabel(e.onLabel,e.offLabel);break;case"enableRtl":e.enableRtl?s.classList.add("e-rtl"):s.classList.remove("e-rtl");break;case"cssClass":i.cssClass&&t.removeClass([s],i.cssClass.split(" ")),e.cssClass&&t.addClass([s],e.cssClass.split(" "))}},i.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.tagName=this.element.tagName,r(this,"EJS-SWITCH","e-switch-wrapper",e,this.getModuleName())},i.prototype.render=function(){this.initWrapper(),this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},i.prototype.rippleHandler=function(e){l(e,this.getWrapper().getElementsByClassName(L)[0]),"mousedown"===e.type&&e.currentTarget.classList.contains("e-switch-wrapper")&&1===e.which&&(this.isDrag=!0,this.isFocused=!1)},i.prototype.rippleTouchHandler=function(e){var t=this.getWrapper().getElementsByClassName(L)[0];if(t){var i=document.createEvent("MouseEvents");i.initEvent(e,!1,!0),t.dispatchEvent(i)}},i.prototype.setDisabled=function(){var e=this.getWrapper();this.element.disabled=!0,e.classList.add("e-switch-disabled"),e.setAttribute("aria-disabled","true")},i.prototype.setLabel=function(e,t){var i=this.getWrapper();e&&(i.querySelector(".e-switch-on").textContent=e),t&&(i.querySelector(".e-switch-off").textContent=t)},i.prototype.switchFocusHandler=function(){this.isFocused&&this.getWrapper().classList.add("e-focus")},i.prototype.switchMouseUp=function(e){var t=e.target;"touchmove"===e.type&&e.preventDefault(),"touchstart"===e.type&&(this.isDrag=!0,this.rippleTouchHandler("mousedown")),this.isDrag&&("mouseup"===e.type&&t.className.indexOf("e-switch")<0||"touchend"===e.type)&&(this.clickHandler(e),this.rippleTouchHandler("mouseup"),e.preventDefault())},i.prototype.formResetHandler=function(){this.checked=this.initialSwitchCheckedValue,this.element.checked=this.initialSwitchCheckedValue},i.prototype.toggle=function(){this.clickHandler()},i.prototype.wireEvents=function(){var e=this.getWrapper();this.delegateMouseUpHandler=this.switchMouseUp.bind(this),this.delegateKeyUpHandler=this.switchFocusHandler.bind(this),t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"mouseup",this.delegateMouseUpHandler,this),t.EventHandler.add(this.element,"keyup",this.delegateKeyUpHandler,this),t.EventHandler.add(e,"mousedown mouseup",this.rippleHandler,this),t.EventHandler.add(e,"touchstart touchmove touchend",this.switchMouseUp,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this)},i.prototype.unWireEvents=function(){var e=this.getWrapper();t.EventHandler.remove(e,"click",this.clickHandler),t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"mouseup",this.delegateMouseUpHandler),t.EventHandler.remove(this.element,"keyup",this.delegateKeyUpHandler),t.EventHandler.remove(e,"mousedown mouseup",this.rippleHandler),t.EventHandler.remove(e,"touchstart touchmove touchend",this.switchMouseUp),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},i.prototype.click=function(){this.element.click()},i.prototype.focusIn=function(){this.element.focus()},P([t.Event()],i.prototype,"change",void 0),P([t.Event()],i.prototype,"created",void 0),P([t.Property(!1)],i.prototype,"checked",void 0),P([t.Property("")],i.prototype,"cssClass",void 0),P([t.Property(!1)],i.prototype,"disabled",void 0),P([t.Property("")],i.prototype,"name",void 0),P([t.Property("")],i.prototype,"onLabel",void 0),P([t.Property("")],i.prototype,"offLabel",void 0),P([t.Property("")],i.prototype,"value",void 0),i=P([t.NotifyPropertyChanges],i)}(t.Component),x=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),T=function(e,t,i,s){var n,r=arguments.length,a=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},w={chipSet:"e-chip-set",chip:"e-chip",avatar:"e-chip-avatar",text:"e-chip-text",icon:"e-chip-icon",delete:"e-chip-delete",deleteIcon:"e-dlt-btn",multiSelection:"e-multi-selection",singleSelection:"e-selection",active:"e-active",chipWrapper:"e-chip-avatar-wrap",iconWrapper:"e-chip-icon-wrap",focused:"e-focused",disabled:"e-disabled",rtl:"e-rtl"},O=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.multiSelectedChip=[],s}return x(i,e),i.prototype.preRender=function(){},i.prototype.chipType=function(){return this.chips&&this.chips.length&&this.chips.length>0},i.prototype.render=function(){this.type=this.chips.length?"chipset":this.text||this.element.innerText?"chip":"chipset",t.isBlazor()&&this.isServerRendered||(this.setAttributes(),this.createChip(),this.setRtl(),this.select(this.selectedChips,void 0)),this.wireEvent(!1),this.rippleFunction=t.rippleEffect(this.element,{selector:".e-chip"}),this.renderComplete()},i.prototype.createChip=function(){if(this.innerText=this.element.innerText.trim(),t.isBlazor())for(var e=this.element.querySelectorAll(".e-chip"),i=0;i<e.length;i++)null!=e[i]&&t.detach(e[i]);else this.element.innerHTML="";this.chipCreation("chip"===this.type?[this.innerText?this.innerText:this.text]:this.chips)},i.prototype.setAttributes=function(){"chip"===this.type?(this.element.tabIndex=0,this.element.setAttribute("role","option")):(this.element.classList.add(w.chipSet),this.element.setAttribute("role","listbox"),"Multiple"===this.selection?(this.element.classList.add(w.multiSelection),this.element.setAttribute("aria-multiselectable","true")):"Single"===this.selection?(this.element.classList.add(w.singleSelection),this.element.setAttribute("aria-multiselectable","false")):this.element.setAttribute("aria-multiselectable","false"))},i.prototype.setRtl=function(){this.element.classList[this.enableRtl?"add":"remove"](w.rtl)},i.prototype.chipCreation=function(e){for(var i=[],s=0;s<e.length;s++){var n=this.getFieldValues(e[s]),r=this.elementCreation(n),a=(w.chip+" "+(n.enabled?" ":w.disabled)+" "+(n.avatarIconCss||n.avatarText?w.chipWrapper:n.leadingIconCss?w.iconWrapper:" ")+" "+n.cssClass).split(" ").filter(function(e){return e});if(this.chipType()){var l=this.createElement("DIV",{className:a.join(" "),attrs:{tabIndex:"0",role:"option","aria-label":n.text,"aria-selected":"false"}});n.value&&l.setAttribute("data-value",n.value.toString()),t.append(r,l),i.push(l)}else i=r,t.addClass([this.element],a),this.element.setAttribute("aria-label",n.text),n.value&&this.element.setAttribute("data-value",n.value.toString())}t.append(i,this.element)},i.prototype.getFieldValues=function(e){var i=!("false"===this.enabled.toString());return{text:"object"==typeof e?e.text?e.text.toString():this.text.toString():this.chipType()?e.toString():this.innerText?this.innerText:this.text.toString(),cssClass:"object"==typeof e&&e.cssClass?e.cssClass.toString():this.cssClass.toString(),leadingIconCss:"object"==typeof e&&e.leadingIconCss?e.leadingIconCss.toString():this.leadingIconCss.toString(),avatarIconCss:"object"==typeof e&&e.avatarIconCss?e.avatarIconCss.toString():this.avatarIconCss.toString(),avatarText:"object"==typeof e&&e.avatarText?e.avatarText.toString():this.avatarText.toString(),trailingIconCss:"object"==typeof e&&e.trailingIconCss?e.trailingIconCss.toString():this.trailingIconCss.toString(),enabled:"object"==typeof e?t.isNullOrUndefined(e.enabled)?i:"false"!==e.enabled.toString():i,value:"object"==typeof e&&e.value?e.value.toString():null,leadingIconUrl:"object"==typeof e&&e.leadingIconUrl?e.leadingIconUrl.toString():this.leadingIconUrl,trailingIconUrl:"object"==typeof e&&e.trailingIconUrl?e.trailingIconUrl.toString():this.trailingIconUrl}},i.prototype.elementCreation=function(e){var t=[];if(e.avatarText||e.avatarIconCss){var i=(w.avatar+" "+e.avatarIconCss).trim(),s=this.createElement("span",{className:i});s.innerText=e.avatarText,t.push(s)}else if(e.leadingIconCss){var i=(w.icon+" "+e.leadingIconCss).trim(),n=this.createElement("span",{className:i});t.push(n)}else if(e.leadingIconUrl){i=(w.avatar+" image-url").trim();(n=this.createElement("span",{className:i})).style.backgroundImage="url("+e.leadingIconUrl+")",t.push(n)}var r=this.createElement("span",{className:w.text});if(r.innerText=e.text,t.push(r),e.trailingIconCss||this.chipType()&&this.enableDelete){var i=(w.delete+" "+(e.trailingIconCss?e.trailingIconCss:w.deleteIcon)).trim(),a=this.createElement("span",{className:i});t.push(a)}else if(e.trailingIconUrl){var i="trailing-icon-url".trim(),l=this.createElement("span",{className:i});l.style.backgroundImage="url("+e.trailingIconUrl+")",t.push(l)}return t},i.prototype.find=function(e){var t,i=e instanceof HTMLElement?e:this.element.querySelectorAll("."+w.chip)[e];return i&&this.chipType()&&((t={text:void 0,index:void 0,element:void 0,data:void 0}).index=Array.prototype.slice.call(this.element.querySelectorAll("."+w.chip)).indexOf(i),t.text="object"==typeof this.chips[t.index]?this.chips[t.index].text?this.chips[t.index].text.toString():"":this.chips[t.index].toString(),t.data=this.chips[t.index],t.element=i),t},i.prototype.add=function(e){var t;if("chip"!==this.type){var i=e instanceof Array?e:[e];(t=this.chips).push.apply(t,i),this.chipCreation(i)}},i.prototype.select=function(e,t){this.onSelect(e,!1,t)},i.prototype.multiSelection=function(e){for(var t=this.element.querySelectorAll(".e-chip"),i=0;i<e.length;i++)if("string"==typeof e[i]){for(var s=0;s<t.length;s++)if(e[i]!==s&&e[i]===t[s].attributes[5].value){this.multiSelectedChip.push(s);break}}else this.multiSelectedChip.push(e[i])},i.prototype.onSelect=function(e,t,i){var s,n,r;if(this.chipType()&&"None"!==this.selection){if(t)for(var a=this.element.querySelectorAll("."+w.chip),l=0;l<a.length;l++)a[l].setAttribute("aria-selected","false"),a[l].classList.remove(w.active);for(var o=e instanceof Array?e:[e],l=0;l<o.length;l++){var c=o[l]instanceof HTMLElement?o[l]:this.element.querySelectorAll("."+w.chip)[o[l]];if("index"!==i)for(var h=0;h<this.chips.length;h++){n=this.element.querySelectorAll("."+w.chip)[h];var p=this.getFieldValues(this.chips[h]);"value"===i?null!==p.value&&(r=n.dataset.value):"text"===i&&(r=n.innerText),r===o[l].toString()&&(s=h,c=this.element.querySelectorAll("."+w.chip)[s])}c instanceof HTMLElement&&this.selectionHandler(c)}}},i.prototype.remove=function(e){var t=this;if(this.chipType()){var i=e instanceof Array?e:[e],s=[],n=this.element.querySelectorAll("."+w.chip);i.forEach(function(e){var t=e instanceof HTMLElement?e:n[e];t instanceof HTMLElement&&s.push(t)}),s.forEach(function(e){var i=t.element.querySelectorAll("."+w.chip),s=Array.prototype.slice.call(i).indexOf(e);t.deleteHandler(e,s)})}},i.prototype.getSelectedChips=function(){var e;if(this.chipType()&&"None"!==this.selection){for(var i={texts:[],Indexes:[],data:[],elements:[]},s=this.element.querySelectorAll("."+w.active),n=0;n<s.length;n++){var r=s[n];i.elements.push(r);var a=Array.prototype.slice.call(this.element.querySelectorAll("."+w.chip)).indexOf(r);i.Indexes.push(a),i.data.push(this.chips[a]);var l="object"==typeof this.chips[a]?this.chips[a].text?this.chips[a].text.toString():null:this.chips[a].toString();i.texts.push(l)}var o={text:i.texts[0],index:i.Indexes[0],data:i.data[0],element:i.elements[0]};e=t.isNullOrUndefined(o.index)?void 0:"Multiple"===this.selection?i:o}return e},i.prototype.wireEvent=function(e){e?(t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keyHandler),t.EventHandler.remove(this.element,"keyup",this.keyHandler)):(t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyHandler,this),t.EventHandler.add(this.element,"keyup",this.keyHandler,this))},i.prototype.keyHandler=function(e){e.target.classList.contains(w.chip)&&("keydown"===e.type?13===e.keyCode?this.clickHandler(e):46===e.keyCode&&this.enableDelete&&this.clickHandler(e,!0):9===e.keyCode&&this.focusInHandler(e.target))},i.prototype.focusInHandler=function(e){e.classList.contains(w.focused)||e.classList.add(w.focused)},i.prototype.focusOutHandler=function(e){var i=t.closest(e.target,"."+w.chip),s=this.chipType()?this.element.querySelector("."+w.focused):this.element.classList.contains(w.focused)?this.element:null;i&&s&&s.classList.remove(w.focused)},i.prototype.clickHandler=function(e,i){var s=this;void 0===i&&(i=!1);var n=t.closest(e.target,"."+w.chip);if(n){var r=void 0;if(this.chipType())r=this.find(n);else{var a=Array.prototype.slice.call(this.element.querySelectorAll("."+w.chip)).indexOf(n);r={text:this.innerText?this.innerText:this.text,element:n,data:this.text,index:a}}r.event=e,r.cancel=!1,this.trigger("beforeClick",r,function(n){n.cancel||(n.element=t.isBlazor()?t.getElement(n.element):n.element,s.clickEventHandler(n.element,e,i))})}},i.prototype.clickEventHandler=function(e,i,s){var n=this;if(this.chipType()){var r=this.find(e);if(r.event=i,(i.target.classList.contains(w.deleteIcon)?i.target:s?e.querySelector("."+w.deleteIcon):void 0)&&this.enableDelete){r.cancel=!1;var a=r;this.trigger("delete",a,function(i){if(!i.cancel){i.element=t.isBlazor()?t.getElement(i.element):i.element,n.deleteHandler(i.element,i.index),n.selectionHandler(e),r.selected=i.element.classList.contains(w.active);var s=r;n.trigger("click",s)}})}else if("None"!==this.selection){this.selectionHandler(e),r.selected=e.classList.contains(w.active);var l=r;this.trigger("click",l)}else{this.focusInHandler(e);o=r;this.trigger("click",o)}}else{this.focusInHandler(e);var o={text:this.innerText?this.innerText:this.text,element:e,data:this.text,event:i};this.trigger("click",o)}},i.prototype.selectionHandler=function(e){if("Single"===this.selection){var t=this.element.querySelector("."+w.active);t&&t!==e&&(t.classList.remove(w.active),t.setAttribute("aria-selected","false")),this.setProperties({selectedChips:null},!0)}else this.setProperties({selectedChips:[]},!0);e.classList.contains(w.active)?(e.classList.remove(w.active),e.setAttribute("aria-selected","false")):(e.classList.add(w.active),e.setAttribute("aria-selected","true")),this.updateSelectedChips()},i.prototype.updateSelectedChips=function(){for(var e,t=this.element.querySelectorAll(".e-chip"),i=[],s=[],n=null,r=0;r<t.length;r++){var a=this.element.querySelectorAll(".e-chip")[r];if("true"===a.getAttribute("aria-selected")){if(e=a.getAttribute("data-value"),"Single"===this.selection&&a.classList.contains("e-active")){n=e||r;break}n=e?s.push(e):i.push(r)}}this.setProperties({selectedChips:"Single"===this.selection?n:e?s:i},!0)},i.prototype.deleteHandler=function(e,i){this.allowServerDataBinding=!0,this.chips.splice(i,1),this.setProperties({chips:this.chips},!0),this.serverDataBind(),this.allowServerDataBinding=!1,t.isBlazor()&&this.isServerRendered||t.detach(e)},i.prototype.destroy=function(){if(t.removeClass([this.element],[w.chipSet,w.chip,w.rtl,w.multiSelection,w.singleSelection,w.disabled,w.chipWrapper,w.iconWrapper,w.active,w.focused].concat(this.cssClass.toString().split(" ").filter(function(e){return e}))),this.removeMultipleAttributes(["tabindex","role","aria-label","aria-multiselectable"],this.element),this.wireEvent(!0),this.rippleFunction(),t.isBlazor())for(var i=this.chipType()?this.element.querySelectorAll(".e-chip"):this.element.querySelectorAll(".e-chip-text"),s=0;s<i.length;s++)null!=i[s]&&t.detach(i[s]);else e.prototype.destroy.call(this),this.element.innerHTML="",this.element.innerText=this.innerText},i.prototype.removeMultipleAttributes=function(e,t){e.forEach(function(e){t.removeAttribute(e)})},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.getModuleName=function(){return"chip-list"},i.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"chips":case"text":case"avatarText":case"avatarIconCss":case"leadingIconCss":case"trailingIconCss":case"selection":case"enableDelete":case"enabled":t.isBlazor()&&this.isServerRendered||(this.isServerRendered=!1,this.refresh(),this.isServerRendered=!0);break;case"cssClass":t.isBlazor()&&this.isServerRendered||(this.chipType()?(this.isServerRendered=!1,this.refresh(),this.isServerRendered=!0):(t.removeClass([this.element],i.cssClass.toString().split(" ").filter(function(e){return e})),t.addClass([this.element],e.cssClass.toString().split(" ").filter(function(e){return e}))));break;case"selectedChips":t.removeClass(this.element.querySelectorAll(".e-active"),"e-active"),"Multiple"===this.selection?(this.multiSelectedChip=[],this.multiSelection(e.selectedChips),this.onSelect(this.multiSelectedChip,!0,void 0),this.updateSelectedChips()):this.onSelect(e.selectedChips,!0,void 0);break;case"enableRtl":this.setRtl()}},T([t.Property([])],i.prototype,"chips",void 0),T([t.Property("")],i.prototype,"text",void 0),T([t.Property("")],i.prototype,"avatarText",void 0),T([t.Property("")],i.prototype,"avatarIconCss",void 0),T([t.Property("")],i.prototype,"leadingIconCss",void 0),T([t.Property("")],i.prototype,"trailingIconCss",void 0),T([t.Property("")],i.prototype,"leadingIconUrl",void 0),T([t.Property("")],i.prototype,"trailingIconUrl",void 0),T([t.Property("")],i.prototype,"cssClass",void 0),T([t.Property(!0)],i.prototype,"enabled",void 0),T([t.Property([])],i.prototype,"selectedChips",void 0),T([t.Property("None")],i.prototype,"selection",void 0),T([t.Property(!1)],i.prototype,"enableDelete",void 0),T([t.Event()],i.prototype,"created",void 0),T([t.Event()],i.prototype,"click",void 0),T([t.Event()],i.prototype,"beforeClick",void 0),T([t.Event()],i.prototype,"delete",void 0),i=T([t.NotifyPropertyChanges],i)}(t.Component),R=function(){function e(){}return e}();return e.wrapperInitialize=i,e.getTextNode=s,e.destroy=n,e.preRender=r,e.createCheckBox=a,e.rippleMouseHandler=l,e.setHiddenInput=o,e.buttonObserver=p,e.Button=u,e.CheckBox=C,e.RadioButton=S,e.Switch=N,e.classNames=w,e.ChipList=O,e.Chip=R,e}({},ej.base),this.ejs=ej;
- /*!
- * filename: ej2-popups.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.popups=function(t,e,i){"use strict";function o(t,i){var o=!1,n={left:0,top:0},s=t;if(!t||!i)return n;for(e.isNullOrUndefined(i.offsetParent)&&"fixed"===i.style.position&&(o=!0);(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;for(t=s;(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left-=t.scrollLeft,n.top-=t.scrollTop,t=t.parentElement;return n}function n(t,e,i,o,n){if(Zt=void 0,Zt=n,ae=!!o,!t)return{left:0,top:0};e||(e="left"),i||(i="top"),Kt=t.ownerDocument,Gt=t;var s={left:0,top:0};return l(e.toLowerCase(),i.toLowerCase(),s)}function s(t,e){e.left=t}function r(t,e){e.top=t}function l(t,e,i){switch(Wt=Gt.getBoundingClientRect(),e+t){case"topcenter":s(m(),i),r(c(),i);break;case"topright":s(f(),i),r(c(),i);break;case"centercenter":s(m(),i),r(p(),i);break;case"centerright":s(f(),i),r(p(),i);break;case"centerleft":s(u(),i),r(p(),i);break;case"bottomcenter":s(m(),i),r(d(),i);break;case"bottomright":s(f(),i),r(d(),i);break;case"bottomleft":s(u(),i),r(d(),i);break;default:case"topleft":s(u(),i),r(c(),i)}return i}function a(){return Kt.documentElement.scrollTop||Kt.body.scrollTop}function h(){return Kt.documentElement.scrollLeft||Kt.body.scrollLeft}function d(){return ae?Wt.bottom:Wt.bottom+a()}function p(){return c()+Wt.height/2}function c(){return ae?Wt.top:Wt.top+a()}function u(){return Wt.left+h()}function f(){var t=Gt&&Gt.classList.contains("e-date-range-wrapper")?Zt?Zt.width:0:Zt&&Wt.width>=Zt.width?Zt.width:0;return Wt.right+h()-t}function m(){return u()+Wt.width/2}function g(t,e,i,o){if(void 0===e&&(e=null),void 0===i&&(i={X:!1,Y:!1}),!i.Y&&!i.X)return{left:0,top:0};var s=t.getBoundingClientRect();if(Qt=e,Jt=t.ownerDocument,o||(o=n(t,"left","top")),i.X){var r=Qt?T():A(),l=B(),a=R(),h=l-o.left,d=o.left+s.width-a;s.width>r?o.left=h>0&&d<=0?a-s.width:d>0&&h<=0?l:h>d?a-s.width:l:h>0?o.left+=h:d>0&&(o.left-=d)}if(i.Y){var p=Qt?P():L(),c=U(),u=k(),f=c-o.top,m=o.top+s.height-u;s.height>p?o.top=f>0&&m<=0?u-s.height:m>0&&f<=0?c:f>m?u-s.height:c:f>0?o.top+=f:m>0&&(o.top-=m)}return o}function v(t,e,i,o){void 0===e&&(e=null);var s=n(t,"left","top");i&&(s.left=i),o&&(s.top=o);var r=[];Qt=e,Jt=t.ownerDocument;var l=t.getBoundingClientRect(),a=s.top,h=s.left,d=s.left+l.width,p=N(a,s.top+l.height),c=C(h,d);return p.topSide&&r.push("top"),c.rightSide&&r.push("right"),c.leftSide&&r.push("left"),p.bottomSide&&r.push("bottom"),r}function y(t,e,i,o,n,s,r,l,a){if(void 0===r&&(r=null),void 0===l&&(l={X:!0,Y:!0}),e&&t&&n&&s&&(l.X||l.Y)){var h,d={TL:null,TR:null,BL:null,BR:null},p={TL:null,TR:null,BL:null,BR:null};if("none"===window.getComputedStyle(t).display){var c=t.style.visibility;t.style.visibility="hidden",t.style.display="block",h=t.getBoundingClientRect(),t.style.removeProperty("display"),t.style.visibility=c}else h=t.getBoundingClientRect();var u={posX:n,posY:s,offsetX:i,offsetY:o,position:{left:0,top:0}};Qt=r,Jt=e.ownerDocument,E(e,d,u,a,h),O(p,u,h),l.X&&w(e,p,d,u,h,!0),l.Y&&d.TL.top>-1&&S(e,p,d,u,h,!0),b(t,u,h)}}function b(t,e,i){var o=0,s=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var r=n(t.offsetParent,"left","top",!1,i);o=r.left,s=r.top}t.style.top=e.position.top+e.offsetY-s+"px",t.style.left=e.position.left+e.offsetX-o+"px"}function E(t,e,i,o,s){i.position=n(t,i.posX,i.posY,o,s),e.TL=n(t,"left","top",o,s),e.TR=n(t,"right","top",o,s),e.BR=n(t,"left","bottom",o,s),e.BL=n(t,"right","bottom",o,s)}function O(t,e,i){t.TL={top:e.position.top+e.offsetY,left:e.position.left+e.offsetX},t.TR={top:t.TL.top,left:t.TL.left+i.width},t.BL={top:t.TL.top+i.height,left:t.TL.left},t.BR={top:t.TL.top+i.height,left:t.TL.left+i.width}}function C(t,e){var i=!1,o=!1;return t-M()<B()&&(i=!0),e>R()&&(o=!0),{leftSide:i,rightSide:o}}function w(t,e,i,o,s,r){var l=C(e.TL.left,e.TR.left);i.TL.left-M()<=B()&&(l.leftSide=!1),i.TR.left>R()&&(l.rightSide=!1),(l.leftSide&&!l.rightSide||!l.leftSide&&l.rightSide)&&("right"===o.posX?o.posX="left":o.posX="right",o.offsetX=o.offsetX+s.width,o.offsetX=-1*o.offsetX,o.position=n(t,o.posX,o.posY,!1),O(e,o,s),r&&w(t,e,i,o,s,!1))}function S(t,e,i,o,s,r){var l=N(e.TL.top,e.BL.top);i.TL.top-z()<=U()&&(l.topSide=!1),i.BL.top>=k()&&t.getBoundingClientRect().bottom<window.innerHeight&&(l.bottomSide=!1),(l.topSide&&!l.bottomSide||!l.topSide&&l.bottomSide)&&("top"===o.posY?o.posY="bottom":o.posY="top",o.offsetY=o.offsetY+s.height,o.offsetY=-1*o.offsetY,o.position=n(t,o.posX,o.posY,!1,s),O(e,o,s),r&&S(t,e,i,o,s,!1))}function N(t,e){var i=!1,o=!1;return t-z()<U()&&(i=!0),e>k()&&(o=!0),{topSide:i,bottomSide:o}}function T(){return Qt.getBoundingClientRect().width}function P(){return Qt.getBoundingClientRect().height}function x(){return Qt.getBoundingClientRect().left}function H(){return Qt.getBoundingClientRect().top}function U(){return Qt?H():0}function B(){return Qt?x():0}function R(){return Qt?M()+x()+T():M()+A()}function k(){return Qt?z()+H()+P():z()+L()}function z(){return Jt.documentElement.scrollTop||Jt.body.scrollTop}function M(){return Jt.documentElement.scrollLeft||Jt.body.scrollLeft}function L(){return window.innerHeight}function A(){var t=window.innerWidth,i=document.documentElement.getBoundingClientRect();return t-(t-(e.isNullOrUndefined(document.documentElement)?0:i.width))}function I(t,e){for(var i=getComputedStyle(t),o=[],n=/(auto|scroll)/,s=t.parentElement;s&&"HTML"!==s.tagName;){var r=getComputedStyle(s);"absolute"===i.position&&"static"===r.position||!n.test(r.overflow+r.overflowY+r.overflowX)||o.push(s),s=s.parentElement}return e||o.push(document),o}function Y(t){for(var i=t.parentElement,o=[];i&&"BODY"!==i.tagName;){var n=document.defaultView.getComputedStyle(i,null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(i,null).getPropertyValue("position");"auto"!==n&&"static"!==s&&o.push(n),i=i.parentElement}for(var r=[],l=0;l<document.body.children.length;l++)if(!t.isEqualNode(document.body.children[l])){var n=document.defaultView.getComputedStyle(document.body.children[l],null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(document.body.children[l],null).getPropertyValue("position");"auto"!==n&&"static"!==s&&r.push(n)}r.push("999");var a=[];if(!e.isNullOrUndefined(t.parentElement)&&"BODY"!==t.parentElement.tagName)for(var h=[].slice.call(t.parentElement.children),l=0;l<h.length;l++)if(!t.isEqualNode(h[l])){var n=document.defaultView.getComputedStyle(h[l],null).getPropertyValue("z-index"),s=document.defaultView.getComputedStyle(h[l],null).getPropertyValue("position");"auto"!==n&&"static"!==s&&a.push(n)}var d=o.concat(r,a),p=Math.max.apply(Math,d)+1;return p>2147483647?2147483647:p}function X(t){void 0===t&&(t=["*"]);for(var e=[],i=0;i<t.length;i++)for(var o=document.getElementsByTagName(t[i]),n=0;n<o.length;n++){var s=document.defaultView.getComputedStyle(o[n],null).getPropertyValue("z-index"),r=document.defaultView.getComputedStyle(o[n],null).getPropertyValue("position");"auto"!==s&&"static"!==r&&e.push(s)}var l=Math.max.apply(Math,e)+1;return l>2147483647?2147483647:l}function D(t){Te=t.resizeBegin,Pe=t.resizing,xe=t.resizeComplete,$t=q(t.element),se=q(t.boundary);for(var i=t.direction.split(" "),o=0;o<i.length;o++)if(be.indexOf(i[o])>=0&&i[o])j(i[o]);else if(""!==i[o].trim()){var n=e.createElement("div",{className:"e-icons "+me+" e-"+i[o]});$t.appendChild(n)}ee=t.minHeight,oe=t.minWidth,ne=t.maxWidth,ie=t.maxHeight,t.proxy&&t.proxy.element&&t.proxy.element.classList.contains("e-dialog")?F(t.proxy):F()}function j(t){Z();var i=e.createElement("span",{attrs:{unselectable:"on",contenteditable:"false"}});i.setAttribute("class","e-dialog-border-resize e-"+t),"south"===t&&(i.style.height="2px",i.style.width="100%",i.style.bottom="0px",i.style.left="0px"),"north"===t&&(i.style.height="2px",i.style.width="100%",i.style.top="0px",i.style.left="0px"),"east"===t&&(i.style.height="100%",i.style.width="2px",i.style.right="0px",i.style.top="0px"),"west"===t&&(i.style.height="100%",i.style.width="2px",i.style.left="0px",i.style.top="0px"),$t.appendChild(i)}function q(t){var i;return e.isNullOrUndefined(t)||(i="string"==typeof t?document.querySelector(t):t),i}function F(t){e.isNullOrUndefined(t)&&(t=this);for(var i=$t.querySelectorAll("."+me),o=0;o<i.length;o++){te=i[o],e.EventHandler.add(te,"mousedown",V,t);s="msie"===e.Browser.info.name?"pointerdown":"touchstart";e.EventHandler.add(te,s,G,t)}var n=$t.querySelectorAll(".e-dialog-border-resize");if(!e.isNullOrUndefined(n))for(o=0;o<n.length;o++){te=n[o],e.EventHandler.add(te,"mousedown",V,t);var s="msie"===e.Browser.info.name?"pointerdown":"touchstart";e.EventHandler.add(te,s,G,t)}}function _(t){return t.indexOf("mouse")>-1?"mouse":"touch"}function V(t){if(t.preventDefault(),$t=t.target.parentElement,Z(),Se=t.pageX,Ne=t.pageY,t.target.classList.add(ge),e.isNullOrUndefined(Te)||(le=this,!0!==Te(t,le))){var i=e.isNullOrUndefined(se)?document:se;e.EventHandler.add(i,"mousemove",K,this),e.EventHandler.add(document,"mouseup",W,this);for(var o=0;o<ve.length;o++)He=!$t.classList.contains(ve[o])}}function W(t){var i="msie"===e.Browser.info.name?"pointermove":"touchmove",o="msie"===e.Browser.info.name?"pointerup":"touchend",n=e.isNullOrUndefined(se)?document:se,s="msie"===e.Browser.info.name?"pointerdown":"touchstart";e.EventHandler.remove(n,"mousemove",K),e.EventHandler.remove(n,i,K),e.EventHandler.remove(n,s,K),e.isNullOrUndefined(document.body.querySelector("."+ge))||document.body.querySelector("."+ge).classList.remove(ge),e.isNullOrUndefined(xe)||xe(t,le=this),e.EventHandler.remove(document,"mouseup",W),e.EventHandler.remove(document,o,W)}function Z(){Ee=parseFloat(getComputedStyle($t,null).getPropertyValue("width").replace("px","")),Oe=parseFloat(getComputedStyle($t,null).getPropertyValue("height").replace("px","")),Ce=$t.getBoundingClientRect().left,we=$t.getBoundingClientRect().top}function G(t){$t=t.target.parentElement,Z();var i=t.touches?t.changedTouches[0]:t;if(Se=i.pageX,Ne=i.pageY,e.isNullOrUndefined(Te)||(le=this,!0!==Te(t,le))){var o="msie"===e.Browser.info.name?"pointermove":"touchmove",n="msie"===e.Browser.info.name?"pointerup":"touchend",s=e.isNullOrUndefined(se)?document:se;e.EventHandler.add(s,o,K,this),e.EventHandler.add(document,n,W)}}function K(t){if(t.target.classList.contains(me)&&t.target.classList.contains(ge)?te=t.target:e.isNullOrUndefined(document.body.querySelector("."+ge))||(te=document.body.querySelector("."+ge)),!e.isNullOrUndefined(te)){for(var i="",o=0;o<fe.length;o++)te.classList.contains("e-"+fe[o])&&(i=fe[o]);switch(e.isNullOrUndefined(Pe)||Pe(t,le=this),i){case"south":Q(t);break;case"north":$(t);break;case"west":tt(t);break;case"east":et(t);break;case"south-east":Q(t),et(t);break;case"south-west":Q(t),tt(t);break;case"north-east":$(t),et(t);break;case"north-west":$(t),tt(t)}}}function J(t){return t.getBoundingClientRect()}function Q(t){var i,o=document.documentElement.clientHeight,n=!1,s=(t.touches?t.changedTouches[0]:t).pageY,r=J($t);e.isNullOrUndefined(se)||(i=J(se)),e.isNullOrUndefined(se)?e.isNullOrUndefined(se)&&(o-s>=0||r.top<0)&&(n=!0):n=!0;var l=Oe+(s-Ne);l=l>ee?l:ee;var a=0;e.isNullOrUndefined(se)||(a=i.top);var h=e.isNullOrUndefined(se)?0:se.offsetHeight-se.clientHeight,d=r.top-a-h/2;if(d=d<0?0:d,r.top>0&&d+l>ie){if(n=!1,$t.classList.contains(ye))return;return void($t.style.height=ie-parseInt(d.toString(),10)+"px")}var p=0;if(n){r.top<0&&o+(r.height+r.top)>0&&l+(p=r.top)<=30&&(l=r.height-(r.height+r.top)+30),l+r.top>=ie&&($t.style.height=r.height+(o-(r.height+r.top))+"px");var c=e.isNullOrUndefined(se)?p:d;l>=ee&&l+c<=ie&&($t.style.height=l+"px")}}function $(t){var i,o=!1,n="mouse"===_(t.type)?t.pageY:t.touches[0].pageY,s=J($t);e.isNullOrUndefined(se)||(i=J(se)),!e.isNullOrUndefined(se)&&s.top-i.top>0?o=!0:e.isNullOrUndefined(se)&&n>0&&(o=!0);var r=Oe-(n-Ne);if(o&&r>=ee&&r<=ie){var l=0;e.isNullOrUndefined(se)||(l=i.top);var a=we-l+(n-Ne);a=a>0?a:1,$t.style.height=r+"px",$t.style.top=a+"px"}}function tt(t){var i,o=document.documentElement.clientWidth,n=!1;e.isNullOrUndefined(se)||(i=J(se));var s="mouse"===_(t.type)?t.pageX:t.touches[0].pageX,r=J($t),l=e.isNullOrUndefined(se)?0:se.offsetWidth-se.clientWidth,a=e.isNullOrUndefined(se)?0:i.left,h=e.isNullOrUndefined(se)?0:i.width;e.isNullOrUndefined(re)&&(e.isNullOrUndefined(se)?re=o:(re=r.left-a-l/2+r.width,re+=h-l-re)),!e.isNullOrUndefined(se)&&Math.floor(r.left-i.left+r.width+(i.right-r.right))-l<=ne?n=!0:e.isNullOrUndefined(se)&&s>=0&&(n=!0);var d=Ee-(s-Se);if(He&&(d=d>re?re:d),n&&d>=oe&&d<=ne){var p=0;e.isNullOrUndefined(se)||(p=i.left);var c=Ce-p+(s-Se);c=c>0?c:1,d!==Ue&&Be&&($t.style.width=d+"px"),He&&($t.style.left=c+"px",Be=1!==c)}Ue=d}function et(t){var i,o=document.documentElement.clientWidth,n=!1;e.isNullOrUndefined(se)||(i=J(se));var s=(t.touches?t.changedTouches[0]:t).pageX,r=J($t);!e.isNullOrUndefined(se)&&(r.left-i.left+r.width<=ne||r.right-i.left>=r.width)?n=!0:e.isNullOrUndefined(se)&&o-s>0&&(n=!0);var l=Ee+(s-Se),a=0;if(e.isNullOrUndefined(se)||(a=i.left),r.left-a+l>ne){if(n=!1,$t.classList.contains(ye))return;$t.style.width=ne-(r.left-a)+"px"}n&&l>=oe&&l<=ne&&($t.style.width=l+"px")}function it(t){ee=t}function ot(t){ne=t}function nt(t){ie=t}function st(){for(var t=$t.querySelectorAll("."+me),i=0;i<t.length;i++)e.detach(t[i]);var o=$t.querySelectorAll(".e-dialog-border-resize");if(!e.isNullOrUndefined(o))for(i=0;i<o.length;i++)e.detach(o[i])}function rt(t,e,i,o){switch(t){case"Create":lt({type:o,target:document.querySelector(e.target),cssClass:e.cssClass,label:e.label,width:e.width});break;case"Show":Dt(document.querySelector(i));break;case"Hide":qt(document.querySelector(i));break;case"Set":Ft({cssClass:e.cssClass,type:o})}}function lt(t,i){if(t.target){var o,n=e.isNullOrUndefined(i)?e.createElement:i,s=xt(t.target,n);if(e.isNullOrUndefined(t.cssClass)||s.wrap.classList.add(t.cssClass),e.isNullOrUndefined(t.template)&&e.isNullOrUndefined(mi)){var r=e.isNullOrUndefined(t.type)?mt(s.wrap):t.type;o=wt(e.isNullOrUndefined(t.width)?void 0:t.width,r),gt(r,s.wrap,o,n),e.isNullOrUndefined(t.label)||at(s.inner_wrap,t.label,n)}else{var l=e.isNullOrUndefined(t.template)?mi:t.template;s.wrap.classList.add(fi),Ct(s.wrap,l,gi)}s.wrap.classList.add(ii),s=null}}function at(t,e,i){var o=i("div",{});return o.classList.add(ui),o.innerHTML=e,t.appendChild(o),o}function ht(t,e,i){var o=Nt();Ke[o]={timeOut:0,type:"Material",radius:e},Pt(t,o,i,oi),Bt(e,t,"Material",oi)}function dt(t,e,i){var o=Nt();Ke[o]={timeOut:0,type:"Bootstrap4",radius:e},Pt(t,o,i,li),Bt(e,t,"Bootstrap4",li)}function pt(t,e,i){var o={};Ke[e].timeOut=0,o[e]=St(e,i,0,0),Ht({uniqueID:e,container:t,globalInfo:o,timeOutVar:0})}function ct(t,e,i){var o=Nt();Ke[o]={timeOut:0,type:"Fabric",radius:e},Tt(t,o,ni,i),At(e,t,ni)}function ut(t,e,i){var o=Nt();Ke[o]={timeOut:0,type:"Tailwind",radius:e},Tt(t,o,si,i),At(e,t,si)}function ft(t,e,i){var o=Nt();Ke[o]={timeOut:0,type:"HighContrast",radius:e},Tt(t,o,ai,i),At(e,t,ai)}function mt(t){return window.getComputedStyle(t,":after").getPropertyValue("content").replace(/['"]+/g,"")}function gt(t,i,o,n){var s=i.querySelector("."+di),r=s.querySelector("svg");switch(e.isNullOrUndefined(r)||s.removeChild(r),t){case"Material":ht(s,o,n);break;case"Fabric":ct(s,o,n);break;case"Bootstrap":vt(s,o,n);break;case"HighContrast":ft(s,o,n);break;case"Bootstrap4":dt(s,o,n);break;case"Tailwind":case"Tailwind-dark":ut(s,o,n)}}function vt(t,e,i){var o=Nt();Ke[o]={timeOut:0,type:"Bootstrap",radius:e},yt(t,o,i),bt(t,e)}function yt(t,e,i){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("id",e),o.setAttribute("class",ri),o.setAttribute("viewBox","0 0 64 64"),t.insertBefore(o,t.firstChild);for(var n=0;n<=7;n++){var s=document.createElementNS("http://www.w3.org/2000/svg","circle");s.setAttribute("class",pi+"_"+n),s.setAttribute("r","2"),s.setAttribute("transform","translate(32,32)"),o.appendChild(s)}}function bt(t,e){var i=t.querySelector("svg.e-spin-bootstrap");i.style.width=i.style.height=e+"px";for(var o=90,n=0;n<=7;n++){var s=It(0,0,24,o),r=i.querySelector("."+pi+"_"+n);r.setAttribute("cx",s.x+""),r.setAttribute("cy",s.y+""),o=o>=360?0:o,o+=45}}function Et(t,e){function i(t){o.push(t),t===s&&1!==l||(t<=n&&t>1&&!r?t=parseFloat((t-.2).toFixed(2)):1===t?(t=7,t=parseFloat((t+.2).toFixed(2)),r=!0):t<8&&r?8===(t=parseFloat((t+.2).toFixed(2)))&&(r=!1):t<=8&&!r&&(t=parseFloat((t-.2).toFixed(2))),++l,i(t))}var o=[],n=t,s=e,r=!1,l=1;return i(n),o}function Ot(t){for(var e=t.querySelector("svg.e-spin-bootstrap").getAttribute("id"),i=1;i<=8;i++)!function(t,e,i,o,n){function s(e){Ke[n].isAnimate&&(++r,t.setAttribute("r",e+""),r>=o.length&&(r=0),Ke[n].timeOut=setTimeout(s.bind(null,o[r]),18))}var r=0;s(e)}(t.getElementsByClassName("e-path-circle_"+(8===i?0:i))[0],i,0,Et(i,i),e)}function Ct(t,i,o){e.isNullOrUndefined(o)||t.classList.add(o),t.querySelector(".e-spinner-inner").innerHTML=i}function wt(t,e){var i;switch(e){case"Material":i=Je;break;case"Fabric":i=Qe;break;case"Tailwind":case"Tailwind-dark":i=Qe;break;case"Bootstrap4":i=ti;break;default:i=$e}return t=t?parseFloat(t+""):i,"Bootstrap"===e?t:t/2}function St(t,e,i,o){return{radius:e,count:i,previousId:o}}function Nt(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function Tt(t,e,i,o){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("id",e),n.setAttribute("class",i);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",pi);var r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("class",ci),t.insertBefore(n,t.firstChild),n.appendChild(s),n.appendChild(r)}function Pt(t,e,i,o){var n=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("class",o),n.setAttribute("id",e),s.setAttribute("class",pi),t.insertBefore(n,t.firstChild),n.appendChild(s)}function xt(t,e){var i=e("div",{}),o=e("div",{});return i.classList.add(hi),o.classList.add(di),t.appendChild(i),i.appendChild(o),{wrap:i,inner_wrap:o}}function Ht(t){Ut(1,149,Lt,1333,t.globalInfo[t.uniqueID].count,75,t),t.globalInfo[t.uniqueID].count=++t.globalInfo[t.uniqueID].count%4}function Ut(t,i,o,n,s,r,l){function a(e){var i=Math.max(0,Math.min((new Date).getTime()-p,n));h(o(i,t,c,n),e.container),d===e.globalInfo[e.uniqueID].previousId&&i<n?Ke[e.uniqueID].timeOut=setTimeout(a.bind(null,e),1):Ht(e)}function h(t,i){if(!e.isNullOrUndefined(i.querySelector("svg.e-spin-material"))&&!e.isNullOrUndefined(i.querySelector("svg.e-spin-material").querySelector("path.e-path-circle"))){var o=i.querySelector("svg.e-spin-material").querySelector("path.e-path-circle");o.setAttribute("stroke-dashoffset",Mt(u,f,t,r)+""),o.setAttribute("transform","rotate("+m+" "+u/2+" "+u/2+")")}}var d=++l.globalInfo[l.uniqueID].previousId,p=(new Date).getTime(),c=i-t,u=Rt(2*l.globalInfo[l.uniqueID].radius+""),f=zt(u),m=-90*(l.globalInfo[l.uniqueID].count||0);a(l)}function Bt(t,e,i,o){var n=2*t,s=e.querySelector("svg."+o),r=s.querySelector("path.e-path-circle"),l=zt(n),a=n/2+"px";s.setAttribute("viewBox","0 0 "+n+" "+n),s.style.width=s.style.height=n+"px",s.style.transformOrigin=a+" "+a+" "+a,r.setAttribute("d",kt(n,l)),"Material"===i&&(r.setAttribute("stroke-width",l+""),r.setAttribute("stroke-dasharray",(n-l)*Math.PI*.75+""),r.setAttribute("stroke-dashoffset",Mt(n,l,1,75)+""))}function Rt(t){return parseFloat(t)}function kt(t,e){var i=t/2,o=e/2;return"M"+i+","+o+"A"+(i-o)+","+(i-o)+" 0 1 1 "+o+","+i}function zt(t){return.1*t}function Mt(t,e,i,o){return(t-e)*Math.PI*(3*o/100-i/100)}function Lt(t,e,i,o){var n=(t/=o)*t,s=n*t;return e+i*(6*s*n+-15*n*n+10*s)}function At(t,e,i){var o=t,n=t,s=2*t,r=e.querySelector("."+i),l=r.querySelector(".e-path-circle"),a=r.querySelector(".e-path-arc"),h=s/2+"px";l.setAttribute("d",Xt(o,n,t)),a.setAttribute("d",Yt(o,n,t,315,45)),r.setAttribute("viewBox","0 0 "+s+" "+s),r.style.transformOrigin=h+" "+h+" "+h,r.style.width=r.style.height=s+"px"}function It(t,e,i,o){var n=(o-90)*Math.PI/180;return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function Yt(t,e,i,o,n){var s=It(t,e,i,n),r=It(t,e,i,o);return["M",s.x,s.y,"A",i,i,0,0,0,r.x,r.y].join(" ")}function Xt(t,e,i){return["M",t,e,"m",-i,0,"a",i,i,0,1,0,2*i,0,"a",i,i,0,1,0,2*-i,0].join(" ")}function Dt(t){jt(t,!1),t=null}function jt(t,i){var o;if(t&&(o=t.classList.contains(hi)?t:t.querySelector("."+hi)),t&&o){var n=o.querySelector("."+di);if(i?!o.classList.contains(fi)&&!o.classList.contains(ii):!o.classList.contains(fi)&&!o.classList.contains(ei)){var s=o.querySelector("svg");if(e.isNullOrUndefined(s))return;var r=s.getAttribute("id");switch(Ke[r].isAnimate=!i,Ke[r].type){case"Material":i?clearTimeout(Ke[r].timeOut):pt(n,r,Ke[r].radius);break;case"Bootstrap":i?clearTimeout(Ke[r].timeOut):Ot(n)}}i?e.classList(o,[ii],[ei]):e.classList(o,[ei],[ii]),t=null}}function qt(t){jt(t,!0),t=null}function Ft(t,i){var o=e.isNullOrUndefined(i)?e.createElement:i;void 0!==t.template&&(mi=t.template,void 0!==t.template&&(gi=t.cssClass));for(var n=document.querySelectorAll("."+hi),s=0;s<n.length;s++)_t(t.template,n[s],t.type,t.cssClass,o)}function _t(t,i,o,n,s){e.isNullOrUndefined(t)&&!i.classList.contains(fi)?(Vt(i,o,n,s),i.classList.contains(ei)?(i.classList.remove(ei),Dt(i)):(i.classList.remove(ii),qt(i))):(mi=t,e.isNullOrUndefined(n)||(gi=n))}function Vt(t,i,o,n){e.isNullOrUndefined(o)||t.classList.add(o);var s=t.querySelector("svg"),r="Bootstrap"===i?parseFloat(s.style.height):parseFloat(s.style.height)/2;if(s.getAttribute("class").split(/\s/).indexOf("e-spin-material")>=0){var l=s.getAttribute("id");clearTimeout(Ke[l].timeOut)}gt(i,t,r,n)}var Wt,Zt,Gt,Kt,Jt,Qt,$t,te,ee,ie,oe,ne,se,re,le,ae=!1,he=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),de=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},pe=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return he(i,t),de([e.Property("left")],i.prototype,"X",void 0),de([e.Property("top")],i.prototype,"Y",void 0),i}(e.ChildProperty),ce={ROOT:"e-popup",RTL:"e-rtl",OPEN:"e-popup-open",CLOSE:"e-popup-close"},ue=function(t){function i(e,i){return t.call(this,i,e)||this}return he(i,t),i.prototype.onPropertyChanged=function(t,i){for(var o=0,n=Object.keys(t);o<n.length;o++)switch(n[o]){case"width":e.setStyleAttribute(this.element,{width:e.formatUnit(t.width)});break;case"height":e.setStyleAttribute(this.element,{height:e.formatUnit(t.height)});break;case"zIndex":e.setStyleAttribute(this.element,{zIndex:t.zIndex});break;case"enableRtl":this.setEnableRtl();break;case"position":case"relateTo":this.refreshPosition();break;case"offsetX":var s=t.offsetX-i.offsetX;this.element.style.left=(parseInt(this.element.style.left,10)+s).toString()+"px";break;case"offsetY":var r=t.offsetY-i.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+r).toString()+"px";break;case"content":this.setContent();break;case"actionOnScroll":"none"!==t.actionOnScroll?this.wireScrollEvents():this.unwireScrollEvents()}},i.prototype.getModuleName=function(){return"popup"},i.prototype.resolveCollision=function(){this.checkCollision()},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.destroy=function(){this.element.classList.remove(ce.ROOT,ce.RTL,ce.OPEN,ce.CLOSE),this.unwireEvents(),t.prototype.destroy.call(this)},i.prototype.render=function(){this.element.classList.add(ce.ROOT);var t={};1e3!==this.zIndex&&(t.zIndex=this.zIndex),"auto"!==this.width&&(t.width=e.formatUnit(this.width)),"auto"!==this.height&&(t.height=e.formatUnit(this.height)),e.setStyleAttribute(this.element,t),this.fixedParent=!1,this.setEnableRtl(),this.setContent()},i.prototype.wireEvents=function(){e.Browser.isDevice&&e.EventHandler.add(window,"orientationchange",this.orientationOnChange,this),"none"!==this.actionOnScroll&&this.wireScrollEvents()},i.prototype.wireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,i=this.getScrollableParent(this.getRelateToElement());t<i.length;t++){var o=i[t];e.EventHandler.add(o,"scroll",this.scrollRefresh,this)}},i.prototype.unwireEvents=function(){e.Browser.isDevice&&e.EventHandler.remove(window,"orientationchange",this.orientationOnChange),"none"!==this.actionOnScroll&&this.unwireScrollEvents()},i.prototype.unwireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,i=this.getScrollableParent(this.getRelateToElement());t<i.length;t++){var o=i[t];e.EventHandler.remove(o,"scroll",this.scrollRefresh)}},i.prototype.getRelateToElement=function(){var t=""===this.relateTo||e.isNullOrUndefined(this.relateTo)?document.body:this.relateTo;return this.setProperties({relateTo:t},!0),"string"==typeof this.relateTo?document.querySelector(this.relateTo):this.relateTo},i.prototype.scrollRefresh=function(t){if("reposition"===this.actionOnScroll?e.isNullOrUndefined(this.element)||this.element.offsetParent===t.target||this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&null==t.target.parentElement||this.refreshPosition():"hide"===this.actionOnScroll&&this.hide(),"none"!==this.actionOnScroll&&this.getRelateToElement()){var i=this.isElementOnViewport(this.getRelateToElement(),t.target);i||this.targetInvisibleStatus?i&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},i.prototype.isElementOnViewport=function(t,e){for(var i=this.getScrollableParent(t),o=0;o<i.length;o++)if(!this.isElementVisible(t,i[o]))return!1;return!0},i.prototype.isElementVisible=function(t,i){var o=this.checkGetBoundingClientRect(t);if(!o.height||!o.width)return!1;if(e.isNullOrUndefined(this.checkGetBoundingClientRect(i))){var s=window,r={top:s.scrollY,left:s.scrollX,right:s.scrollX+s.outerWidth,bottom:s.scrollY+s.outerHeight},l=n(t),a={top:l.top,left:l.left,right:l.left+o.width,bottom:l.top+o.height},h={top:r.bottom-a.top,left:r.right-a.left,bottom:a.bottom-r.top,right:a.right-r.left};return h.top>0&&h.left>0&&h.right>0&&h.bottom>0}var d=i.getBoundingClientRect();return!(o.bottom<d.top||o.bottom>d.bottom||o.right>d.right||o.left<d.left)},i.prototype.preRender=function(){},i.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(ce.RTL):this.element.classList.remove(ce.RTL)},i.prototype.setContent=function(){e.isNullOrUndefined(this.content)||(this.element.innerHTML="","string"==typeof this.content?this.element.textContent=this.content:this.element.appendChild(this.content))},i.prototype.orientationOnChange=function(){var t=this;setTimeout(function(){t.refreshPosition()},200)},i.prototype.refreshPosition=function(t,i){e.isNullOrUndefined(t)||this.checkFixedParent(t),this.reposition(),i||this.checkCollision()},i.prototype.reposition=function(){var t,i,o=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)t={left:this.position.X,top:this.position.Y};else if("string"==typeof this.position.X&&"number"==typeof this.position.Y||"number"==typeof this.position.X&&"string"==typeof this.position.Y){var n=void 0,s=this.element.style.display;this.element.style.display="block",this.element.classList.contains("e-dlg-modal")&&(n=this.element.parentElement.style.display,this.element.parentElement.style.display="block"),i=this.getAnchorPosition(o,this.element,this.position,this.offsetX,this.offsetY),t="string"==typeof this.position.X?{left:i.left,top:this.position.Y}:{left:this.position.X,top:i.top},this.element.style.display=s,this.element.classList.contains("e-dlg-modal")&&(this.element.parentElement.style.display=n)}else if(o){s=this.element.style.display;this.element.style.display="block",t=this.getAnchorPosition(o,this.element,this.position,this.offsetX,this.offsetY),this.element.style.display=s}else t={left:0,top:0};e.isNullOrUndefined(t)||(this.element.style.left=t.left+"px",this.element.style.top=t.top+"px")},i.prototype.checkGetBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return null}},i.prototype.getAnchorPosition=function(t,i,s,r,l){var a=this.checkGetBoundingClientRect(i),h=this.checkGetBoundingClientRect(t);if(e.isNullOrUndefined(a)||e.isNullOrUndefined(h))return null;var d=t,p={left:0,top:0};switch(i.offsetParent&&"BODY"===i.offsetParent.tagName&&"BODY"===t.tagName?p=n(t):(i.classList.contains("e-dlg-modal")&&"BODY"!==d.tagName&&(i=i.parentElement),p=o(d,i)),s.X){default:case"left":break;case"center":i.classList.contains("e-dlg-modal")&&"BODY"===d.tagName&&"container"===this.targetType?p.left+=window.innerWidth/2-a.width/2:"container"===this.targetType?p.left+=h.width/2-a.width/2:p.left+=h.width/2;break;case"right":i.classList.contains("e-dlg-modal")&&"BODY"===d.tagName&&"container"===this.targetType?p.left+=window.innerWidth-a.width:"container"===this.targetType?p.left+=h.width-a.width:p.left+=h.width}switch(s.Y){default:case"top":break;case"center":i.classList.contains("e-dlg-modal")&&"BODY"===d.tagName&&"container"===this.targetType?p.top+=window.innerHeight/2-a.height/2:"container"===this.targetType?p.top+=h.height/2-a.height/2:p.top+=h.height/2;break;case"bottom":i.classList.contains("e-dlg-modal")&&"BODY"===d.tagName&&"container"===this.targetType?p.top+=window.innerHeight-a.height:"container"===this.targetType?p.top+=h.height-a.height:p.top+=h.height}return p.left+=r,p.top+=l,p},i.prototype.callFlip=function(t){var e=this.getRelateToElement();y(this.element,e,this.offsetX,this.offsetY,this.position.X,this.position.Y,this.viewPortElement,t,this.fixedParent)},i.prototype.callFit=function(t){if(0!==v(this.element,this.viewPortElement).length)if(e.isNullOrUndefined(this.viewPortElement)){var i=g(this.element,this.viewPortElement,t);t.X&&(this.element.style.left=i.left+"px"),t.Y&&(this.element.style.top=i.top+"px")}else{var o=this.checkGetBoundingClientRect(this.element),n=this.checkGetBoundingClientRect(this.viewPortElement);if(e.isNullOrUndefined(o)||e.isNullOrUndefined(n))return null;t&&!0===t.Y&&(n.top>o.top?this.element.style.top="0px":n.bottom<o.bottom&&(this.element.style.top=parseInt(this.element.style.top,10)-(o.bottom-n.bottom)+"px")),t&&!0===t.X&&(n.right<o.right?this.element.style.left=parseInt(this.element.style.left,10)-(o.right-n.right)+"px":n.left>o.left&&(this.element.style.left=parseInt(this.element.style.left,10)+(n.left-o.left)+"px"))}},i.prototype.checkCollision=function(){var t=this.collision.X,e=this.collision.Y;"none"===t&&"none"===e||("flip"===t&&"flip"===e?this.callFlip({X:!0,Y:!0}):"fit"===t&&"fit"===e?this.callFit({X:!0,Y:!0}):("flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1}),"fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0})))},i.prototype.show=function(t,i){var o=this;if(this.wireEvents(),1e3===this.zIndex||!e.isNullOrUndefined(i)){var n=e.isNullOrUndefined(i)?this.element:i;this.zIndex=Y(n),e.setStyleAttribute(this.element,{zIndex:this.zIndex})}t=e.isNullOrUndefined(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||(e.removeClass([this.element],ce.CLOSE),e.addClass([this.element],ce.OPEN),this.checkCollision(),e.removeClass([this.element],ce.OPEN),e.addClass([this.element],ce.CLOSE)),e.isNullOrUndefined(t)?(e.removeClass([this.element],ce.CLOSE),e.addClass([this.element],ce.OPEN),this.trigger("open")):(t.begin=function(){o.isDestroyed||(e.removeClass([o.element],ce.CLOSE),e.addClass([o.element],ce.OPEN))},t.end=function(){o.isDestroyed||o.trigger("open")},new e.Animation(t).animate(this.element))},i.prototype.hide=function(t){var i=this;t=e.isNullOrUndefined(t)||"object"!=typeof t?this.hideAnimation:t,e.isNullOrUndefined(t)?(e.removeClass([this.element],ce.OPEN),e.addClass([this.element],ce.CLOSE),this.trigger("close")):(t.end=function(){i.isDestroyed||(e.removeClass([i.element],ce.OPEN),e.addClass([i.element],ce.CLOSE),i.trigger("close"))},new e.Animation(t).animate(this.element)),this.unwireEvents()},i.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),I(t,this.fixedParent)},i.prototype.checkFixedParent=function(t){for(var i=t.parentElement;i&&"HTML"!==i.tagName;){var o=getComputedStyle(i);"fixed"===o.position&&!e.isNullOrUndefined(this.element)&&this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&(this.element.style.top=window.scrollY>parseInt(this.element.style.top)?e.formatUnit(window.scrollY-parseInt(this.element.style.top)):e.formatUnit(parseInt(this.element.style.top)-window.scrollY),this.element.style.position="fixed",this.fixedParent=!0),i=i.parentElement,!e.isNullOrUndefined(this.element)&&e.isNullOrUndefined(this.element.offsetParent)&&"fixed"===o.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},de([e.Property("auto")],i.prototype,"height",void 0),de([e.Property("auto")],i.prototype,"width",void 0),de([e.Property(null)],i.prototype,"content",void 0),de([e.Property("container")],i.prototype,"targetType",void 0),de([e.Property(null)],i.prototype,"viewPortElement",void 0),de([e.Property({X:"none",Y:"none"})],i.prototype,"collision",void 0),de([e.Property("")],i.prototype,"relateTo",void 0),de([e.Complex({},pe)],i.prototype,"position",void 0),de([e.Property(0)],i.prototype,"offsetX",void 0),de([e.Property(0)],i.prototype,"offsetY",void 0),de([e.Property(1e3)],i.prototype,"zIndex",void 0),de([e.Property(!1)],i.prototype,"enableRtl",void 0),de([e.Property("reposition")],i.prototype,"actionOnScroll",void 0),de([e.Property(null)],i.prototype,"showAnimation",void 0),de([e.Property(null)],i.prototype,"hideAnimation",void 0),de([e.Event()],i.prototype,"open",void 0),de([e.Event()],i.prototype,"close",void 0),de([e.Event()],i.prototype,"targetExitViewport",void 0),i=de([e.NotifyPropertyChanges],i)}(e.Component),fe=["north-west","north","north-east","west","east","south-west","south","south-east"],me="e-resize-handle",ge="e-focused-handle",ve=["e-restrict-left"],ye="e-resize-viewport",be=["north","west","east","south"],Ee=0,Oe=0,Ce=0,we=0,Se=0,Ne=0,Te=null,Pe=null,xe=null,He=!0,Ue=0,Be=!0,Re=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ke=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},ze=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Re(i,t),ke([e.Property(!0)],i.prototype,"isFlat",void 0),ke([e.Property()],i.prototype,"buttonModel",void 0),ke([e.Property("Button")],i.prototype,"type",void 0),ke([e.Event()],i.prototype,"click",void 0),i}(e.ChildProperty),Me=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Re(i,t),ke([e.Property("Fade")],i.prototype,"effect",void 0),ke([e.Property(400)],i.prototype,"duration",void 0),ke([e.Property(0)],i.prototype,"delay",void 0),i}(e.ChildProperty),Le="e-dialog",Ae="e-dlg-target",Ie="e-scroll-disabled",Ye="e-dlg-fullscreen",Xe="Information",De="e-scroll-disabled",je="e-alert-dialog",qe="e-confirm-dialog",Fe="user action",_e=function(t){function o(e,i){var o=t.call(this,e,i)||this;return o.dlgClosedBy=Fe,o}return Re(o,t),o.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents(),"100%"===this.width&&(this.element.style.width=""),""!==this.minHeight&&(this.element.style.minHeight=e.formatUnit(this.minHeight)),this.enableResize&&(this.setResize(),"None"===this.animationSettings.effect&&this.getMinHeight()),this.renderComplete()},o.prototype.preRender=function(){var t=this;this.headerContent=null,this.allowMaxHeight=!0,this.preventVisibility=!0,this.clonedEle=this.element.cloneNode(!0),this.closeIconClickEventHandler=function(e){t.dlgClosedBy="close icon",t.hide(e)},this.dlgOverlayClickEventHandler=function(e){t.dlgClosedBy="overlayClick",e.preventFocus=!1,t.trigger("overlayClick",e,function(e){e.preventFocus||t.focusContent(),t.dlgClosedBy=Fe})};var i={close:"Close"};if(this.l10n=new e.L10n("dialog",i,this.locale),this.checkPositionData(),e.isNullOrUndefined(this.target)){var o=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.target=document.body,this.isProtectedOnChange=o}},o.prototype.isNumberValue=function(t){return/^[-+]?\d*\.?\d+$/.test(t)},o.prototype.checkPositionData=function(){if(!e.isNullOrUndefined(this.position)){if(!e.isNullOrUndefined(this.position.X)&&"number"!=typeof this.position.X&&(t=this.isNumberValue(this.position.X))){i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.X=parseFloat(this.position.X),this.isProtectedOnChange=i}if(!e.isNullOrUndefined(this.position.Y)&&"number"!=typeof this.position.Y){var t=this.isNumberValue(this.position.Y);if(t){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.Y=parseFloat(this.position.Y),this.isProtectedOnChange=i}}}},o.prototype.getEle=function(t,e){for(var i=void 0,o=0;o<t.length;o++)if(t[o].classList.contains(e)){i=t[o];break}return i},o.prototype.getMinHeight=function(){var t="0px",i="0px";e.isNullOrUndefined(this.element.querySelector(".e-dlg-header-content"))||(t=getComputedStyle(this.headerContent).height);var o=this.getEle(this.element.children,"e-footer-content");e.isNullOrUndefined(o)||(i=getComputedStyle(o).height);var n=parseInt(t.slice(0,t.indexOf("p")),10),s=parseInt(i.slice(0,i.indexOf("p")),10);return it(n+30+(isNaN(s)?0:s)),n+30+s},o.prototype.onResizeStart=function(t,e){return e.trigger("resizeStart",t),t.cancel},o.prototype.onResizing=function(t,e){e.trigger("resizing",t)},o.prototype.onResizeComplete=function(t,e){e.trigger("resizeStop",t)},o.prototype.setResize=function(){if(this.enableResize){if(this.isBlazorServerRender()&&!e.isNullOrUndefined(this.element.querySelector(".e-icons.e-resize-handle")))return;this.element.classList.add("e-dlg-resizable");for(var t=getComputedStyle(this.element).minHeight,i=getComputedStyle(this.element).minWidth,o="",n=0;n<this.resizeHandles.length;n++){if("All"===this.resizeHandles[n]){o="south north east west north-east north-west south-east south-west";break}var s="";switch(this.resizeHandles[n].toString()){case"SouthEast":s="south-east";break;case"SouthWest":s="south-west";break;case"NorthEast":s="north-east";break;case"NorthWest":s="north-west";break;default:s=this.resizeHandles[n].toString()}o+=s.toLocaleLowerCase()+" "}this.enableRtl&&"south-east"===o.trim()?o="south-west":this.enableRtl&&"south-west"===o.trim()&&(o="south-east"),this.isModal&&this.enableRtl?this.element.classList.add("e-restrict-left"):this.isModal&&this.target===document.body&&this.element.classList.add("e-resize-viewport"),D({element:this.element,direction:o,minHeight:parseInt(t.slice(0,i.indexOf("p")),10),maxHeight:this.targetEle.clientHeight,minWidth:parseInt(i.slice(0,i.indexOf("p")),10),maxWidth:this.targetEle.clientWidth,boundary:this.target===document.body?null:this.targetEle,resizeBegin:this.onResizeStart.bind(this),resizeComplete:this.onResizeComplete.bind(this),resizing:this.onResizing.bind(this),proxy:this}),this.wireWindowResizeEvent()}else st(),this.unWireWindowResizeEvent(),this.isModal?this.element.classList.remove("e-restrict-left"):this.element.classList.remove("e-resize-viewport"),this.element.classList.remove("e-dlg-resizable")},o.prototype.getFocusElement=function(t){var e=t.querySelectorAll('input,select,textarea,button:enabled,a,[contenteditable="true"],[tabindex]');return{element:e[e.length-1]}},o.prototype.keyDown=function(t){var i=this;if(9===t.keyCode&&this.isModal){var o=void 0;e.isNullOrUndefined(this.btnObj)||(o=this.btnObj[this.btnObj.length-1]),e.isNullOrUndefined(this.btnObj)&&!e.isNullOrUndefined(this.ftrTemplateContent)&&(o=this.getFocusElement(this.ftrTemplateContent)),e.isNullOrUndefined(this.btnObj)&&e.isNullOrUndefined(this.ftrTemplateContent)&&!e.isNullOrUndefined(this.contentEle)&&(o=this.getFocusElement(this.contentEle)),e.isNullOrUndefined(o)||document.activeElement!==o.element||t.shiftKey||(t.preventDefault(),this.focusableElements(this.element).focus()),document.activeElement===this.focusableElements(this.element)&&t.shiftKey&&(t.preventDefault(),e.isNullOrUndefined(o)||o.element.focus())}var n=document.activeElement,s=["input","textarea"].indexOf(n.tagName.toLowerCase())>-1,r=!1;if(s||(r=n.hasAttribute("contenteditable")&&"true"===n.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape&&(this.dlgClosedBy="escape",this.hide(t)),13===t.keyCode&&!t.ctrlKey&&"textarea"!==n.tagName.toLowerCase()&&s&&!e.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===n.tagName.toLowerCase()||r)&&!e.isNullOrUndefined(this.primaryButtonEle)){var l;this.buttons.some(function(t,i){l=i;var o=t.buttonModel;return!e.isNullOrUndefined(o)&&!0===o.isPrimary})&&"function"==typeof this.buttons[l].click&&setTimeout(function(){i.buttons[l].click.call(i,t)})}},o.prototype.initialize=function(){e.isNullOrUndefined(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),this.isBlazorServerRender()||e.addClass([this.element],Le),e.Browser.isDevice&&e.addClass([this.element],"e-device"),this.isBlazorServerRender()||this.setCSSClass(),this.setMaxHeight()},o.prototype.initRender=function(){var t=this;if(this.initialRender=!0,this.isBlazorServerRender()||e.attributes(this.element,{role:"dialog"}),1e3===this.zIndex?(this.setzIndex(this.element,!1),this.calculatezIndex=!0):this.calculatezIndex=!1,this.isBlazorServerRender()&&e.isNullOrUndefined(this.headerContent)&&(this.headerContent=this.element.getElementsByClassName("e-dlg-header-content")[0]),this.isBlazorServerRender()&&e.isNullOrUndefined(this.contentEle)&&(this.contentEle=this.element.querySelector("#"+this.element.id+"_dialog-content")),this.isBlazorServerRender()||(this.setTargetContent(),""===this.header||e.isNullOrUndefined(this.header)||this.setHeader(),this.showCloseIcon&&this.renderCloseIcon(),this.setContent(),""===this.footerTemplate||e.isNullOrUndefined(this.footerTemplate)?e.isNullOrUndefined(this.buttons[0].buttonModel)||this.setButton():this.setFooterTemplate()),this.isBlazorServerRender()&&(e.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||this.setButton()),this.allowDragging&&!e.isNullOrUndefined(this.headerContent)&&this.setAllowDragging(),this.isBlazorServerRender()||(e.attributes(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal()),this.isBlazorServerRender()&&e.isNullOrUndefined(this.dlgContainer)){this.dlgContainer=this.element.parentElement;for(var i=0,o=this.dlgContainer.children;i<o.length;i++)o[i].classList.contains("e-dlg-overlay")&&(this.dlgOverlay=o[i])}if(!0!==this.element.classList.contains(je)&&!0!==this.element.classList.contains(qe)&&!e.isNullOrUndefined(this.element.parentElement)){var n=this.isModal?this.dlgContainer.parentElement:this.element.parentElement;this.refElement=this.createElement("div",{className:"e-dlg-ref-element"}),n.insertBefore(this.refElement,this.isModal?this.dlgContainer:this.element)}e.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new ue(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,actionOnScroll:"none",enableRtl:this.enableRtl,open:function(e){var i={container:t.isModal?t.dlgContainer:t.element,element:t.element,target:t.target,preventFocus:!1};t.enableResize&&t.resetResizeIcon(),t.trigger("open",i,function(e){e.preventFocus||t.focusContent()})},close:function(i){t.isModal&&e.addClass([t.dlgOverlay],"e-fade"),t.unBindEvent(t.element),t.isModal&&(t.dlgContainer.style.display="none"),t.trigger("close",t.closeArgs);var o=document.activeElement;e.isNullOrUndefined(o)||e.isNullOrUndefined(o.blur)||o.blur(),e.isNullOrUndefined(t.storeActiveElement)||e.isNullOrUndefined(t.storeActiveElement.focus)||t.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),this.isBlazorServerRender()||(e.addClass([this.element],"e-popup-close"),this.isModal&&this.setOverlayZindex()),this.visible?this.show():this.isModal&&(this.dlgOverlay.style.display="none"),this.initialRender=!1},o.prototype.resetResizeIcon=function(){var t=this.getMinHeight();if(this.targetEle.offsetHeight<t){var i=this.enableRtl?"e-south-west":"e-south-east",o=this.element.querySelector("."+i);e.isNullOrUndefined(o)||(o.style.bottom="-"+t.toString()+"px")}},o.prototype.setOverlayZindex=function(t){var i;i=e.isNullOrUndefined(t)?parseInt(this.element.style.zIndex,10)?parseInt(this.element.style.zIndex,10):this.zIndex:t,this.dlgOverlay.style.zIndex=(i-1).toString(),this.dlgContainer.style.zIndex=i.toString()},o.prototype.positionChange=function(){this.isModal&&(isNaN(parseFloat(this.position.X))||isNaN(parseFloat(this.position.Y)))?!isNaN(parseFloat(this.position.X))&&isNaN(parseFloat(this.position.Y))||isNaN(parseFloat(this.position.X))&&!isNaN(parseFloat(this.position.Y))?this.setPopupPosition():(this.element.style.top="0px",this.element.style.left="0px",this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y)):this.setPopupPosition()},o.prototype.setPopupPosition=function(){this.popupObj.setProperties({position:{X:this.position.X,Y:this.position.Y}})},o.prototype.setAllowDragging=function(){var t=this;this.dragObj=new e.Draggable(this.element,{clone:!1,isDragScroll:!0,abort:".e-dlg-closeicon-btn",handle:".e-dlg-header-content",dragStart:function(i){t.trigger("dragStart",i,function(t){e.isBlazor()&&t.bindEvents(i.dragElement)})},dragStop:function(i){t.isModal&&(e.isNullOrUndefined(t.position)||t.dlgContainer.classList.remove("e-dlg-"+t.position.X+"-"+t.position.Y),t.element.style.position="relative"),t.trigger("dragStop",i),t.element.classList.remove("e-restrict-left")},drag:function(e){t.trigger("drag",e)}}),e.isNullOrUndefined(this.targetEle)||(this.dragObj.dragArea=this.targetEle)},o.prototype.setButton=function(){if(!this.isBlazorServerRender()){this.buttonContent=[],this.btnObj=[];for(s=0;s<this.buttons.length;s++){var t=e.isNullOrUndefined(this.buttons[s].type)?"button":this.buttons[s].type.toLowerCase(),o=this.createElement("button",{attrs:{type:t}});this.buttonContent.push(o.outerHTML)}this.setFooterTemplate()}for(var n,s=0,r=this.element.children;s<r.length;s++)r[s].classList.contains("e-footer-content")&&(n=r[s].querySelectorAll("button"));for(s=0;s<this.buttons.length;s++)this.isBlazorServerRender()||(this.btnObj[s]=new i.Button(this.buttons[s].buttonModel)),this.isBlazorServerRender()&&(this.ftrTemplateContent=this.element.querySelector(".e-footer-content")),!e.isNullOrUndefined(this.ftrTemplateContent)&&n.length>0&&("function"==typeof this.buttons[s].click&&e.EventHandler.add(n[s],"click",this.buttons[s].click,this),"object"==typeof this.buttons[s].click&&e.EventHandler.add(n[s],"click",this.buttonClickHandler.bind(this,s),this)),this.isBlazorServerRender()||e.isNullOrUndefined(this.ftrTemplateContent)||(this.btnObj[s].appendTo(this.ftrTemplateContent.children[s]),this.buttons[s].isFlat&&this.btnObj[s].element.classList.add("e-flat"),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0])},o.prototype.buttonClickHandler=function(t){this.trigger("buttons["+t+"].click",{})},o.prototype.setContent=function(){e.attributes(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.contentEle=this.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),this.innerContentElement?this.contentEle.appendChild(this.innerContentElement):(e.isNullOrUndefined(this.content)||""===this.content)&&this.initialRender||("string"!=typeof this.content||e.isBlazor()?this.content instanceof HTMLElement?this.contentEle.appendChild(this.content):this.setTemplate(this.content,this.contentEle,"content"):this.contentEle.innerHTML=this.sanitizeHelper(this.content)),e.isNullOrUndefined(this.headerContent)?this.element.insertBefore(this.contentEle,this.element.children[0]):this.element.insertBefore(this.contentEle,this.element.children[1]),"auto"===this.height&&(this.isBlazorServerRender()||!e.Browser.isIE||""!==this.element.style.width||e.isNullOrUndefined(this.width)||(this.element.style.width=e.formatUnit(this.width)),this.setMaxHeight())},o.prototype.setTemplate=function(t,i,o){var n,s;s=i.classList.contains("e-dlg-header")?this.element.id+"header":i.classList.contains("e-footer-content")?this.element.id+"footerTemplate":this.element.id+"content";var r;e.isNullOrUndefined(t.outerHTML)?"string"!=typeof t||e.isBlazor()&&!this.isStringTemplate?(n=e.compile(t),r=t):i.innerHTML=this.sanitizeHelper(t):i.appendChild(t);var l=[];if(!e.isNullOrUndefined(n)){for(var a=0,h=n({},this,o,s,!(e.isBlazor()&&!this.isStringTemplate&&0===r.indexOf("<div>Blazor"))||this.isStringTemplate);a<h.length;a++){var d=h[a];l.push(d)}e.append([].slice.call(l),i)}},o.prototype.sanitizeHelper=function(t){if(this.enableHtmlSanitizer){var i=e.SanitizeHtmlHelper.beforeSanitize(),o={cancel:!1,helper:null};e.extend(i,i,o),this.trigger("beforeSanitizeHtml",i),i.cancel&&!e.isNullOrUndefined(i.helper)?t=i.helper(t):i.cancel||(t=e.SanitizeHtmlHelper.serializeValue(i,t))}return t},o.prototype.setMaxHeight=function(){if(this.allowMaxHeight){var t=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=!e.isNullOrUndefined(this.target)&&this.targetEle.offsetHeight<window.innerHeight?this.targetEle.offsetHeight-20+"px":window.innerHeight-20+"px",this.element.style.display=t,e.Browser.isIE&&"auto"===this.height&&!e.isNullOrUndefined(this.contentEle)&&this.element.offsetHeight<this.contentEle.offsetHeight&&(this.element.style.height="inherit")}},o.prototype.setEnableRTL=function(){this.isBlazorServerRender()||(this.enableRtl?e.addClass([this.element],"e-rtl"):e.removeClass([this.element],"e-rtl")),e.isNullOrUndefined(this.element.querySelector(".e-resize-handle"))||(st(),this.setResize())},o.prototype.setTargetContent=function(){var t=this;if(e.isNullOrUndefined(this.content)||""===this.content){var i=""!==this.element.innerHTML.replace(/\s|<(\/?|\/?)(!--!--)>/g,"");(this.element.children.length>0||i)&&(this.innerContentElement=document.createDocumentFragment(),[].slice.call(this.element.childNodes).forEach(function(e){8!==e.nodeType&&t.innerContentElement.appendChild(e)}))}},o.prototype.setHeader=function(){this.headerEle?this.headerEle.innerHTML="":this.headerEle=this.createElement("div",{id:this.element.id+"_title",className:"e-dlg-header"}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.setTemplate(this.header,this.headerEle,"header"),e.attributes(this.element,{"aria-labelledby":this.element.id+"_title"}),this.element.insertBefore(this.headerContent,this.element.children[0])},o.prototype.setFooterTemplate=function(){this.ftrTemplateContent?this.ftrTemplateContent.innerHTML="":this.ftrTemplateContent=this.createElement("div",{className:"e-footer-content"}),""===this.footerTemplate||e.isNullOrUndefined(this.footerTemplate)?this.ftrTemplateContent.innerHTML=this.buttonContent.join(""):this.setTemplate(this.footerTemplate,this.ftrTemplateContent,"footerTemplate"),this.element.appendChild(this.ftrTemplateContent)},o.prototype.createHeaderContent=function(){e.isNullOrUndefined(this.headerContent)&&(this.headerContent=this.createElement("div",{id:this.element.id+"_dialog-header",className:"e-dlg-header-content"}))},o.prototype.renderCloseIcon=function(){this.closeIcon=this.createElement("button",{className:"e-dlg-closeicon-btn",attrs:{type:"button"}}),this.closeIconBtnObj=new i.Button({cssClass:"e-flat",iconCss:"e-icon-dlg-close e-icons"}),this.closeIconTitle(),e.isNullOrUndefined(this.headerContent)?(this.createHeaderContent(),e.prepend([this.closeIcon],this.headerContent),this.element.insertBefore(this.headerContent,this.element.children[0])):e.prepend([this.closeIcon],this.headerContent),this.closeIconBtnObj.appendTo(this.closeIcon)},o.prototype.closeIconTitle=function(){this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close");this.closeIcon.setAttribute("title",t),this.closeIcon.setAttribute("aria-label",t)},o.prototype.setCSSClass=function(t){this.cssClass&&e.addClass([this.element],this.cssClass.split(" ")),t&&e.removeClass([this.element],t.split(" "))},o.prototype.setIsModal=function(){this.dlgContainer=this.createElement("div",{className:"e-dlg-container"}),this.element.classList.remove("e-popup-open"),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),e.addClass([this.element],"e-dlg-modal"),this.dlgOverlay=this.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},o.prototype.getValidFocusNode=function(t){for(var e,i=0;i<t.length;i++){if(((e=t[i]).clientHeight>0||"a"===e.tagName.toLowerCase()&&e.hasAttribute("href"))&&e.tabIndex>-1&&!e.disabled&&!this.disableElement(e,'[disabled],[aria-disabled="true"],[type="hidden"]'))return e;e=null}return e},o.prototype.focusableElements=function(t){if(!e.isNullOrUndefined(t)){var i=t.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"],[tabindex]');return this.getValidFocusNode(i)}return null},o.prototype.getAutoFocusNode=function(t){var i=t.querySelector(".e-dlg-closeicon-btn"),o=t.querySelectorAll("[autofocus]"),n=this.getValidFocusNode(o);if(e.isBlazor()&&(this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]),e.isNullOrUndefined(n)){if(n=this.focusableElements(this.contentEle),!e.isNullOrUndefined(n))return i=n;if(!e.isNullOrUndefined(this.primaryButtonEle))return this.element.querySelector(".e-primary")}else i=n;return i},o.prototype.disableElement=function(t,e){var i=t?t.matches||t.webkitMatchesSelector||t.msGetRegionContent:null;if(i)for(;t;t=t.parentNode)if(t instanceof Element&&i.call(t,e))return t;return null},o.prototype.focusContent=function(){var t=this.getAutoFocusNode(this.element),i=e.isNullOrUndefined(t)?this.element:t,o=e.Browser.userAgent;(o.indexOf("MSIE ")>0||o.indexOf("Trident/")>0)&&this.element.focus(),i.focus(),this.bindEvent(this.element)},o.prototype.bindEvent=function(t){e.EventHandler.add(t,"keydown",this.keyDown,this)},o.prototype.unBindEvent=function(t){e.EventHandler.remove(t,"keydown",this.keyDown)},o.prototype.updateSanitizeContent=function(){this.isBlazorServerRender()||(this.contentEle.innerHTML=this.sanitizeHelper(this.content))},o.prototype.isBlazorServerRender=function(){return e.isBlazor()&&this.isServerRendered},o.prototype.getModuleName=function(){return"dialog"},o.prototype.onPropertyChanged=function(t,i){if(this.element.classList.contains(Le))for(var o=0,n=Object.keys(t);o<n.length;o++)switch(n[o]){case"content":e.isNullOrUndefined(this.content)||""===this.content?e.isNullOrUndefined(this.contentEle)||(e.detach(this.contentEle),this.contentEle=null):(this.isBlazorServerRender()&&(this.contentEle=this.element.querySelector(".e-dlg-content")),e.isNullOrUndefined(this.contentEle)||"dialog"===this.contentEle.getAttribute("role")?this.isBlazorServerRender()&&!e.isNullOrUndefined(this.element.querySelector(".e-dlg-content"))||this.setContent():(this.isBlazorServerRender()||(this.contentEle.innerHTML=""),"function"==typeof this.content?(this.clearTemplate(["content"]),e.detach(this.contentEle),this.contentEle=null,this.setContent()):"string"==typeof this.content?this.isBlazorServerRender()&&""===this.contentEle.innerText?this.contentEle.insertAdjacentHTML("beforeend",this.sanitizeHelper(this.content)):this.updateSanitizeContent():this.contentEle.appendChild(this.content),this.setMaxHeight()));break;case"header":""===this.header||e.isNullOrUndefined(this.header)?this.headerEle&&(e.detach(this.headerEle),this.headerEle=null):this.isBlazorServerRender()&&!e.isNullOrUndefined(this.element.querySelector(".e-dlg-header-content"))||this.setHeader();break;case"footerTemplate":if(""===this.footerTemplate||e.isNullOrUndefined(this.footerTemplate)){if(!this.ftrTemplateContent)return;e.detach(this.ftrTemplateContent),this.ftrTemplateContent=null,this.buttons=[{}]}else this.isBlazorServerRender()&&!e.isNullOrUndefined(this.element.querySelector(".e-footer-content"))||this.setFooterTemplate(),this.buttons=[{}];break;case"showCloseIcon":this.element.getElementsByClassName("e-icon-dlg-close").length>0?this.showCloseIcon||""!==this.header&&!e.isNullOrUndefined(this.header)?this.showCloseIcon?this.isBlazorServerRender()&&this.wireEvents():e.detach(this.closeIcon):(e.detach(this.headerContent),this.headerContent=null):(this.isBlazorServerRender()||this.renderCloseIcon(),this.wireEvents());break;case"locale":this.showCloseIcon&&this.closeIconTitle();break;case"visible":this.visible?this.show():this.hide();break;case"isModal":this.updateIsModal();break;case"height":e.setStyleAttribute(this.element,{height:e.formatUnit(t.height)});break;case"width":e.setStyleAttribute(this.element,{width:e.formatUnit(t.width)});break;case"zIndex":this.popupObj.zIndex=this.zIndex,this.isModal&&this.setOverlayZindex(this.zIndex),this.element.style.zIndex!==this.zIndex.toString()&&(this.calculatezIndex=!1);break;case"cssClass":this.setCSSClass(i.cssClass);break;case"buttons":var s=this.buttons.length;e.isNullOrUndefined(this.ftrTemplateContent)||this.isBlazorServerRender()||(e.detach(this.ftrTemplateContent),this.ftrTemplateContent=null);for(var r=0;r<s;r++)e.isNullOrUndefined(this.buttons[r].buttonModel)||(this.footerTemplate="",this.setButton());break;case"allowDragging":this.allowDragging&&!e.isNullOrUndefined(this.headerContent)?this.setAllowDragging():this.dragObj.destroy();break;case"target":this.setTarget(t.target);break;case"position":if(this.checkPositionData(),this.isModal){var l=e.isNullOrUndefined(i.position.X)?this.position.X:i.position.X,a=e.isNullOrUndefined(i.position.Y)?this.position.Y:i.position.Y;this.dlgContainer.classList.contains("e-dlg-"+l+"-"+a)&&this.dlgContainer.classList.remove("e-dlg-"+l+"-"+a)}this.positionChange();break;case"enableRtl":this.setEnableRTL();break;case"enableResize":this.setResize()}},o.prototype.setTarget=function(t){this.popupObj.relateTo=t,this.target=t,this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target,this.dragObj&&(this.dragObj.dragArea=this.targetEle),this.setMaxHeight(),this.isModal&&this.updateIsModal(),this.enableResize&&this.setResize()},o.prototype.updateIsModal=function(){if(this.element.setAttribute("aria-modal",this.isModal?"true":"false"),this.isModal)this.setIsModal(),this.element.style.top="0px",this.element.style.left="0px",e.isNullOrUndefined(this.targetEle)||this.targetEle.appendChild(this.dlgContainer);else{for(e.removeClass([this.element],"e-dlg-modal"),e.removeClass([document.body],[Ae,Ie]),e.detach(this.dlgOverlay);this.dlgContainer.firstChild;)this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild,this.dlgContainer);this.dlgContainer.parentElement.removeChild(this.dlgContainer)}this.visible&&this.show(),this.positionChange(),this.isModal&&this.dlgOverlay&&e.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},o.prototype.setzIndex=function(t,e){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.zIndex=Y(t),this.isProtectedOnChange=i,e&&(this.popupObj.zIndex=this.zIndex)},o.prototype.windowResizeHandler=function(){ot(this.targetEle.clientWidth),nt(this.targetEle.clientHeight),this.setMaxHeight()},o.prototype.getPersistData=function(){return this.addOnPersist([])},o.prototype.destroy=function(){if(!this.isDestroyed){var i=["e-rtl","e-dlg-modal","e-dlg-resizable","e-restrict-left",Ye,"e-device"],o=["role","aria-modal","aria-labelledby","aria-describedby","aria-grabbed","tabindex","style"];if(e.removeClass([this.targetEle],[Ae,Ie]),!e.isNullOrUndefined(this.element)&&this.element.classList.contains(Ye)&&e.removeClass([document.body],[Ae,Ie]),this.isModal&&e.removeClass([e.isNullOrUndefined(this.targetEle)?document.body:this.targetEle],Ie),this.unWireEvents(),!e.isNullOrUndefined(this.btnObj))for(n=0;n<this.btnObj.length;n++)this.btnObj[n].destroy();if(e.isNullOrUndefined(this.dragObj)||this.dragObj.destroy(),!e.isNullOrUndefined(this.popupObj.element)&&this.popupObj.element.classList.contains("e-popup")&&this.popupObj.destroy(),e.removeClass([this.element],i),e.isNullOrUndefined(this.cssClass)||""===this.cssClass||e.removeClass([this.element],this.cssClass.split(" ")),e.isNullOrUndefined(this.refElement)||e.isNullOrUndefined(this.refElement.parentElement)||(this.refElement.parentElement.insertBefore(this.isModal?this.dlgContainer:this.element,this.refElement),e.detach(this.refElement),this.refElement=void 0),this.isModal&&!this.isBlazorServerRender()&&(e.detach(this.dlgOverlay),this.dlgContainer.parentNode.insertBefore(this.element,this.dlgContainer),e.detach(this.dlgContainer)),this.isBlazorServerRender()||(this.element.innerHTML=this.clonedEle.innerHTML),this.isBlazorServerRender()&&!e.isNullOrUndefined(this.element.children))for(n=0;n<=this.element.children.length;n++)n-=n,e.detach(this.element.children[n]);for(var n=0;n<o.length;n++)this.element.removeAttribute(o[n]);this.isBlazorServerRender()?this.isDestroyed=!0:t.prototype.destroy.call(this),this.isReact&&this.clearTemplate()}},o.prototype.wireWindowResizeEvent=function(){window.addEventListener("resize",this.windowResizeHandler.bind(this))},o.prototype.unWireWindowResizeEvent=function(){window.removeEventListener("resize",this.windowResizeHandler.bind(this))},o.prototype.wireEvents=function(){this.isBlazorServerRender()&&this.showCloseIcon&&(this.closeIcon=this.element.getElementsByClassName("e-dlg-closeicon-btn")[0]),this.showCloseIcon&&e.EventHandler.add(this.closeIcon,"click",this.closeIconClickEventHandler,this),this.isModal&&this.dlgOverlay&&e.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},o.prototype.unWireEvents=function(){if(this.showCloseIcon&&e.EventHandler.remove(this.closeIcon,"click",this.closeIconClickEventHandler),this.isModal&&e.EventHandler.remove(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler),this.buttons.length>0&&!e.isNullOrUndefined(this.buttons[0].buttonModel)&&""===this.footerTemplate)for(var t=0;t<this.buttons.length;t++)"function"==typeof this.buttons[t].click&&e.EventHandler.remove(this.ftrTemplateContent.children[t],"click",this.buttons[t].click)},o.prototype.refreshPosition=function(){this.popupObj.refreshPosition()},o.prototype.show=function(t){var i=this;if(this.element.classList.contains(Le)){if(!this.element.classList.contains("e-popup-open")||!e.isNullOrUndefined(t)){e.isNullOrUndefined(t)||this.fullScreen(t);var o=e.isBlazor()?{cancel:!1,element:this.element,container:this.isModal?this.dlgContainer:this.element,maxHeight:this.element.style.maxHeight}:{cancel:!1,element:this.element,container:this.isModal?this.dlgContainer:this.element,target:this.target,maxHeight:this.element.style.maxHeight};this.trigger("beforeOpen",o,function(t){if(!t.cancel){i.element.style.maxHeight!==o.maxHeight&&(i.allowMaxHeight=!1,i.element.style.maxHeight=o.maxHeight),i.storeActiveElement=document.activeElement,i.element.tabIndex=-1,i.isModal&&!e.isNullOrUndefined(i.dlgOverlay)&&(i.dlgOverlay.style.display="block",i.dlgContainer.style.display="flex",e.removeClass([i.dlgOverlay],"e-fade"),e.isNullOrUndefined(i.targetEle)?e.addClass([document.body],[Ae,Ie]):(i.targetEle===document.body?i.dlgContainer.style.position="fixed":i.dlgContainer.style.position="absolute",i.dlgOverlay.style.position="absolute",i.element.style.position="relative",e.addClass([i.targetEle],[Ae,Ie])));var n={name:i.animationSettings.effect+"In",duration:i.animationSettings.duration,delay:i.animationSettings.delay},s=i.isModal?i.element.parentElement:i.element;i.calculatezIndex&&(i.setzIndex(s,!0),e.setStyleAttribute(i.element,{zIndex:i.zIndex}),i.isModal&&i.setOverlayZindex(i.zIndex)),"None"===i.animationSettings.effect?i.popupObj.show():i.popupObj.show(n),i.dialogOpen=!0;var r=i.isProtectedOnChange;i.isProtectedOnChange=!0,i.visible=!0,i.preventVisibility=!0,i.isProtectedOnChange=r}})}this.isReact&&this.renderReactTemplates()}},o.prototype.hide=function(t){var i=this;if(this.element.classList.contains(Le)&&this.preventVisibility){var o=e.isBlazor()?{cancel:!1,isInteracted:!!t,element:this.element,container:this.isModal?this.dlgContainer:this.element,event:t}:{cancel:!1,isInteracted:!!t,element:this.element,target:this.target,container:this.isModal?this.dlgContainer:this.element,event:t,closedBy:this.dlgClosedBy};this.closeArgs=o,this.trigger("beforeClose",o,function(t){if(!t.cancel){i.isModal&&(e.isNullOrUndefined(i.targetEle)?e.removeClass([document.body],[Ae,Ie]):e.removeClass([i.targetEle],[Ae,Ie]));var o={name:i.animationSettings.effect+"Out",duration:i.animationSettings.duration,delay:i.animationSettings.delay};"None"===i.animationSettings.effect?i.popupObj.hide():i.popupObj.hide(o),i.dialogOpen=!1;var n=i.isProtectedOnChange;i.isProtectedOnChange=!0,i.visible=!1,i.preventVisibility=!1,i.isProtectedOnChange=n}i.dlgClosedBy=Fe})}},o.prototype.fullScreen=function(t){this.element.offsetTop,this.element.offsetLeft;if(t){e.addClass([this.element],Ye);var i=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=e.isNullOrUndefined(this.target)?window.innerHeight+"px":this.targetEle.offsetHeight+"px",this.element.style.display=i,e.addClass([document.body],[Ae,Ie]),this.allowDragging&&!e.isNullOrUndefined(this.dragObj)&&this.dragObj.destroy()}else e.removeClass([this.element],Ye),e.removeClass([document.body],[Ae,Ie]),this.allowDragging&&!e.isNullOrUndefined(this.headerContent)&&this.setAllowDragging();return t},o.prototype.getButtons=function(t){return e.isNullOrUndefined(t)?this.btnObj:this.btnObj[t]},ke([e.Property("")],o.prototype,"content",void 0),ke([e.Property(!0)],o.prototype,"enableHtmlSanitizer",void 0),ke([e.Property(!1)],o.prototype,"showCloseIcon",void 0),ke([e.Property(!1)],o.prototype,"isModal",void 0),ke([e.Property("")],o.prototype,"header",void 0),ke([e.Property(!0)],o.prototype,"visible",void 0),ke([e.Property(!1)],o.prototype,"enableResize",void 0),ke([e.Property(["South-East"])],o.prototype,"resizeHandles",void 0),ke([e.Property("auto")],o.prototype,"height",void 0),ke([e.Property("")],o.prototype,"minHeight",void 0),ke([e.Property("100%")],o.prototype,"width",void 0),ke([e.Property("")],o.prototype,"cssClass",void 0),ke([e.Property(1e3)],o.prototype,"zIndex",void 0),ke([e.Property(null)],o.prototype,"target",void 0),ke([e.Property("")],o.prototype,"footerTemplate",void 0),ke([e.Property(!1)],o.prototype,"allowDragging",void 0),ke([e.Collection([{}],ze)],o.prototype,"buttons",void 0),ke([e.Property(!0)],o.prototype,"closeOnEscape",void 0),ke([e.Complex({},Me)],o.prototype,"animationSettings",void 0),ke([e.Complex({X:"center",Y:"center"},pe)],o.prototype,"position",void 0),ke([e.Event()],o.prototype,"created",void 0),ke([e.Event()],o.prototype,"open",void 0),ke([e.Event()],o.prototype,"beforeSanitizeHtml",void 0),ke([e.Event()],o.prototype,"beforeOpen",void 0),ke([e.Event()],o.prototype,"close",void 0),ke([e.Event()],o.prototype,"beforeClose",void 0),ke([e.Event()],o.prototype,"dragStart",void 0),ke([e.Event()],o.prototype,"dragStop",void 0),ke([e.Event()],o.prototype,"drag",void 0),ke([e.Event()],o.prototype,"overlayClick",void 0),ke([e.Event()],o.prototype,"resizeStart",void 0),ke([e.Event()],o.prototype,"resizing",void 0),ke([e.Event()],o.prototype,"resizeStop",void 0),ke([e.Event()],o.prototype,"destroyed",void 0),o=ke([e.NotifyPropertyChanges],o)}(e.Component);!function(t){function i(t){var i=e.createElement("div",{className:je});document.body.appendChild(i);var o,r=[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}}];return o="string"==typeof t?n({content:t,position:{X:"center",Y:"top"},isModal:!0,header:Xe,buttons:r},i):n(s(t),i),o.close=function(){t&&t.close&&t.close.apply(o),o.destroy(),o.element.classList.contains("e-dlg-modal")?(o.element.parentElement.remove(),o.target.classList.remove(De)):o.element.remove()},o}function o(t){var i=e.createElement("div",{className:qe});document.body.appendChild(i);var o,s=[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}},{buttonModel:{content:"Cancel"},click:function(){this.hide()}}];return o="string"==typeof t?n({position:{X:"center",Y:"top"},content:t,isModal:!0,header:Xe,buttons:s},i):n(r(t),i),o.close=function(){t&&t.close&&t.close.apply(o),o.destroy(),o.element.classList.contains("e-dlg-modal")?(o.element.parentElement.remove(),o.target.classList.remove(De)):o.element.remove()},o}function n(t,e){var i=new _e(t);return i.appendTo(e),i}function s(t){var e={};return e.buttons=[],e=l(e,t),e=a(e,t)}function r(t){var e={};return e.buttons=[],e=l(e,t),e=h(e,t)}function l(t,i){return t.header=e.isNullOrUndefined(i.title)?Xe:i.title,t.content=e.isNullOrUndefined(i.content)?"":i.content,t.isModal=!!e.isNullOrUndefined(i.isModal)||i.isModal,t.showCloseIcon=!e.isNullOrUndefined(i.showCloseIcon)&&i.showCloseIcon,t.allowDragging=!e.isNullOrUndefined(i.isDraggable)&&i.isDraggable,t.closeOnEscape=!e.isNullOrUndefined(i.closeOnEscape)&&i.closeOnEscape,t.position=e.isNullOrUndefined(i.position)?{X:"center",Y:"top"}:i.position,t.animationSettings=e.isNullOrUndefined(i.animationSettings)?{effect:"Fade",duration:400,delay:0}:i.animationSettings,t.cssClass=e.isNullOrUndefined(i.cssClass)?"":i.cssClass,t.zIndex=e.isNullOrUndefined(i.zIndex)?1e3:i.zIndex,t.open=e.isNullOrUndefined(i.open)?null:i.open,t}function a(t,i){var o=[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}}];return e.isNullOrUndefined(i.okButton)?t.buttons=o:t.buttons[0]=d(t.buttons[0],i.okButton,o[0]),t}function h(t,i){var o={buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}},n={buttonModel:{content:"Cancel"},click:function(){this.hide()}};return e.isNullOrUndefined(i.okButton)?t.buttons[0]=o:t.buttons[0]=d(t.buttons[0],i.okButton,o),e.isNullOrUndefined(i.cancelButton)?t.buttons[1]=n:t.buttons[1]=d(t.buttons[1],i.cancelButton,n),t}function d(t,i,o){var n=o;return e.isNullOrUndefined(i.text)||(n.buttonModel.content=i.text),e.isNullOrUndefined(i.icon)||(n.buttonModel.iconCss=i.icon),e.isNullOrUndefined(i.cssClass)||(n.buttonModel.cssClass=i.cssClass),e.isNullOrUndefined(i.click)||(n.click=i.click),n}t.alert=i,t.confirm=o}(t.DialogUtility||(t.DialogUtility={}));var Ve=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),We=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},Ze=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ve(i,t),We([e.Property({effect:"FadeIn",duration:150,delay:0})],i.prototype,"open",void 0),We([e.Property({effect:"FadeOut",duration:150,delay:0})],i.prototype,"close",void 0),i}(e.ChildProperty),Ge=function(t){function i(e,i){var o=t.call(this,e,i)||this;return o.isBlazorTooltip=!1,o.contentTargetValue=null,o.contentEvent=null,o.contentAnimation=null,o.mouseMoveEvent=null,o.mouseMoveTarget=null,o}return Ve(i,t),i.prototype.initialize=function(){this.formatPosition(),this.isServerRender()||e.addClass([this.element],"e-tooltip")},i.prototype.isServerRender=function(){return e.isBlazor()&&this.isServerRendered},i.prototype.formatPosition=function(){var t,e;0===this.position.indexOf("Top")||0===this.position.indexOf("Bottom")?(t=this.position.split(/(?=[A-Z])/),this.tooltipPositionY=t[0],this.tooltipPositionX=t[1]):(e=this.position.split(/(?=[A-Z])/),this.tooltipPositionX=e[0],this.tooltipPositionY=e[1])},i.prototype.renderArrow=function(){if(this.setTipClass(this.position),this.isServerRender()){var t=this.tooltipEle.querySelector(".e-arrow-tip");e.addClass([t.querySelector(".e-arrow-tip-outer")],this.tipClass),e.addClass([t.querySelector(".e-arrow-tip-inner")],this.tipClass),this.tooltipEle.appendChild(t)}else(t=this.createElement("div",{className:"e-arrow-tip "+this.tipClass})).appendChild(this.createElement("div",{className:"e-arrow-tip-outer "+this.tipClass})),t.appendChild(this.createElement("div",{className:"e-arrow-tip-inner "+this.tipClass})),this.tooltipEle.appendChild(t)},i.prototype.setTipClass=function(t){0===t.indexOf("Right")?this.tipClass="e-tip-left":0===t.indexOf("Bottom")?this.tipClass="e-tip-top":0===t.indexOf("Left")?this.tipClass="e-tip-right":this.tipClass="e-tip-bottom"},i.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.tooltipEle.classList.remove("e-lib"),this.popupObj=new ue(this.tooltipEle,{height:this.height,width:this.width,position:{X:e.left,Y:e.top},enableRtl:this.enableRtl,open:this.openPopupHandler.bind(this),close:this.closePopupHandler.bind(this)})},i.prototype.getTooltipPosition=function(t){this.tooltipEle.style.display="block";var e=n(t,this.tooltipPositionX,this.tooltipPositionY),i=this.calculateTooltipOffset(this.position),o=this.collisionFlipFit(t,e.left+i.left,e.top+i.top);return this.tooltipEle.style.display="",o},i.prototype.reposition=function(t){var e=this.getTooltipPosition(t);this.popupObj.position={X:e.left,Y:e.top},this.popupObj.dataBind()},i.prototype.openPopupHandler=function(){!this.mouseTrail&&this.needTemplateReposition()&&this.reposition(this.findTarget()),this.trigger("afterOpen",this.tooltipEventArgs)},i.prototype.closePopupHandler=function(){e.resetBlazorTemplate(this.element.id+"content","Content"),this.clearTemplate(["content"]),this.clear(),this.trigger("afterClose",this.tooltipEventArgs)},i.prototype.calculateTooltipOffset=function(t){var e={top:0,left:0},i=this.tooltipEle.offsetWidth,o=this.tooltipEle.offsetHeight,n=this.tooltipEle.querySelector(".e-arrow-tip"),s=n?n.offsetWidth:0,r=n?n.offsetHeight:0,l=this.showTipPointer?0:8,a=r/2+2+(this.tooltipEle.offsetHeight-this.tooltipEle.clientHeight),h=s/2+2+(this.tooltipEle.offsetWidth-this.tooltipEle.clientWidth);switch(this.mouseTrail&&(l+=2),t){case"RightTop":e.left+=s+l,e.top-=o-a;break;case"RightCenter":e.left+=s+l,e.top-=o/2;break;case"RightBottom":e.left+=s+l,e.top-=a;break;case"BottomRight":e.top+=r+l,e.left-=h;break;case"BottomCenter":e.top+=r+l,e.left-=i/2;break;case"BottomLeft":e.top+=r+l,e.left-=i-h;break;case"LeftBottom":e.left-=s+i+l,e.top-=a;break;case"LeftCenter":e.left-=s+i+l,e.top-=o/2;break;case"LeftTop":e.left-=s+i+l,e.top-=o-a;break;case"TopLeft":e.top-=o+r+l,e.left-=i-h;break;case"TopRight":e.top-=o+r+l,e.left-=h;break;default:e.top-=o+r+l,e.left-=i/2}return e.left+=this.offsetX,e.top+=this.offsetY,e},i.prototype.updateTipPosition=function(t){var i=this.tooltipEle.querySelectorAll(".e-arrow-tip,.e-arrow-tip-outer,.e-arrow-tip-inner"),o=["e-tip-bottom","e-tip-top","e-tip-left","e-tip-right"];e.removeClass(i,o),this.setTipClass(t),e.addClass(i,this.tipClass)},i.prototype.adjustArrow=function(t,e,i,o){if(!1!==this.showTipPointer){this.updateTipPosition(e);var n,s;this.tooltipEle.style.display="block";var r=this.tooltipEle.clientWidth,l=this.tooltipEle.clientHeight,a=this.tooltipEle.querySelector(".e-arrow-tip"),h=this.tooltipEle.querySelector(".e-arrow-tip-inner"),d=a.offsetWidth,p=a.offsetHeight;if(this.tooltipEle.style.display="","e-tip-bottom"===this.tipClass||"e-tip-top"===this.tipClass)"e-tip-bottom"===this.tipClass?(s="99.9%",h.style.top="-"+(p-2)+"px"):(s=-(p-1)+"px",h.style.top="-"+(p-6)+"px"),t&&(n=(c="Center"!==i||r>t.offsetWidth||this.mouseTrail)&&"Left"===i||!c&&"End"===this.tipPointerPosition?r-d-2+"px":c&&"Right"===i||!c&&"Start"===this.tipPointerPosition?"2px":r/2-d/2+"px");else{"e-tip-right"===this.tipClass?(n="99.9%",h.style.left="-"+(d-2)+"px"):(n=-(d-1)+"px",h.style.left=d-2-d+"px");var c="Center"!==o||l>t.offsetHeight||this.mouseTrail;s=c&&"Top"===o||!c&&"End"===this.tipPointerPosition?l-p-2+"px":c&&"Bottom"===o||!c&&"Start"===this.tipPointerPosition?"2px":l/2-p/2+"px"}a.style.top=s,a.style.left=n}},i.prototype.renderContent=function(t){var i=this.tooltipEle.querySelector(".e-tip-content");if(this.cssClass&&e.addClass([this.tooltipEle],this.cssClass.split(" ")),t&&!e.isNullOrUndefined(t.getAttribute("title"))&&(t.setAttribute("data-content",t.getAttribute("title")),t.removeAttribute("title")),e.isNullOrUndefined(this.content))t&&!e.isNullOrUndefined(t.getAttribute("data-content"))&&(i.innerHTML=t.getAttribute("data-content"));else if(this.isBlazorTooltip||!this.isServerRender())if(i.innerHTML="",this.content instanceof HTMLElement)i.appendChild(this.content);else if("string"==typeof this.content&&this.content.indexOf("<div>Blazor")<0)this.enableHtmlSanitizer&&this.setProperties({content:e.SanitizeHtmlHelper.sanitize(this.content)},!0),i[this.enableHtmlParse?"innerHTML":"textContent"]=this.content;else{var o=e.compile(this.content)({},this,"content",this.element.id+"content",void 0,void 0,i);o&&e.append(o,i),this.renderReactTemplates(),"string"==typeof this.content&&this.content.indexOf("<div>Blazor")>=0&&(this.isBlazorTemplate=!0,e.updateBlazorTemplate(this.element.id+"content","Content",this))}},i.prototype.renderCloseIcon=function(){if(this.isSticky){var t=this.createElement("div",{className:"e-icons e-tooltip-close"});this.tooltipEle.appendChild(t),e.EventHandler.add(t,e.Browser.touchStartEvent,this.onStickyClose,this)}},i.prototype.addDescribedBy=function(t,i){var o=(t.getAttribute("aria-describedby")||"").split(/\s+/);o.indexOf(i)<0&&o.push(i),e.attributes(t,{"aria-describedby":o.join(" ").trim(),"data-tooltip-id":i})},i.prototype.removeDescribedBy=function(t){var e=t.getAttribute("data-tooltip-id"),i=(t.getAttribute("aria-describedby")||"").split(/\s+/),o=i.indexOf(e);-1!==o&&i.splice(o,1),t.removeAttribute("data-tooltip-id");var n=i.join(" ").trim();n?t.setAttribute("aria-describedby",n):t.removeAttribute("aria-describedby")},i.prototype.tapHoldHandler=function(t){clearTimeout(this.autoCloseTimer),this.targetHover(t.originalEvent)},i.prototype.touchEndHandler=function(t){var e=this;if(!this.isSticky){var i=function(){e.close()};this.autoCloseTimer=setTimeout(i,1500)}},i.prototype.targetClick=function(t){var i;i=this.target?e.closest(t.target,this.target):this.element,e.isNullOrUndefined(i)||(null===i.getAttribute("data-tooltip-id")?this.targetHover(t):this.isSticky||this.hideTooltip(this.animation.close,t,i))},i.prototype.targetHover=function(t){var i;if(i=this.target?e.closest(t.target,this.target):this.element,!(e.isNullOrUndefined(i)||null!==i.getAttribute("data-tooltip-id")&&0===this.closeDelay)){for(var o=0,n=[].slice.call(document.querySelectorAll("[data-tooltip-id= "+this.ctrlId+"_content]"));o<n.length;o++){var s=n[o];this.restoreElement(s)}this.showTooltip(i,this.animation.open,t)}},i.prototype.mouseMoveBeforeOpen=function(t){this.mouseMoveEvent=t},i.prototype.mouseMoveBeforeRemove=function(){this.mouseMoveTarget&&e.EventHandler.remove(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen)},i.prototype.showTooltip=function(t,i,o){var n=this;clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.openDelay&&this.mouseTrail&&(this.mouseMoveBeforeRemove(),this.mouseMoveTarget=t,e.EventHandler.add(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen,this)),this.tooltipEventArgs={type:o?o.type:null,cancel:!1,target:t,event:o||null,element:this.tooltipEle,isInteracted:!e.isNullOrUndefined(o)};var s=function(e){n.beforeRenderCallback(e,t,o,i)};this.trigger("beforeRender",this.tooltipEventArgs,s.bind(this))},i.prototype.beforeRenderCallback=function(t,i,o,n){var s=!1;if(t.cancel)this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove();else if(this.isHidden=!1,e.isNullOrUndefined(this.tooltipEle)){if(this.isServerRender()){this.contentTargetValue=i,this.contentEvent=o,this.contentAnimation=n;var r={enableTooltip:"true"};this.interopAdaptor.invokeMethodAsync("OnTooltipServerCall",r),s=!0}else this.ctrlId=this.element.getAttribute("id")?e.getUniqueID(this.element.getAttribute("id")):e.getUniqueID("tooltip"),this.tooltipEle=this.createElement("div",{className:"e-tooltip-wrap e-popup e-lib",attrs:{role:"tooltip","aria-hidden":"false",id:this.ctrlId+"_content"},styles:"width:"+e.formatUnit(this.width)+";height:"+e.formatUnit(this.height)+";position:absolute;"}),this.beforeRenderBlazor(i,this);s||this.afterRenderBlazor(i,o,n,this)}else this.isServerRender()&&(e.addClass([this.tooltipEle],"e-popup-open"),document.body.appendChild(this.tooltipEle),this.renderCloseIcon(),this.renderPopup(i)),i&&(this.adjustArrow(i,this.position,this.tooltipPositionX,this.tooltipPositionY),this.addDescribedBy(i,this.ctrlId+"_content"),this.renderContent(i),e.Animation.stop(this.tooltipEle),this.reposition(i),this.afterRenderBlazor(i,o,n,this))},i.prototype.contentUpdated=function(t){e.isNullOrUndefined(this.tooltipEle)&&this.isServerRender()&&(this.ctrlId=this.element.id,this.tooltipEle=document.querySelector("#"+this.ctrlId+"_content"),this.tooltipEle&&(this.tooltipEle.setAttribute("style","width:"+e.formatUnit(this.width)+";height:"+e.formatUnit(this.height)+";position:absolute;"),this.beforeRenderBlazor(this.contentTargetValue,this),this.afterRenderBlazor(this.contentTargetValue,this.contentEvent,this.contentAnimation,this),this.contentTargetValue=this.contentEvent=this.contentAnimation=null))},i.prototype.beforeRenderBlazor=function(t,i){t&&(e.Browser.isDevice&&e.addClass([i.tooltipEle],"e-bigger"),"auto"!==i.width&&(i.tooltipEle.style.maxWidth=e.formatUnit(i.width)),this.isServerRender()||i.tooltipEle.appendChild(i.createElement("div",{className:"e-tip-content"})),document.body.appendChild(i.tooltipEle),e.removeClass([i.tooltipEle],"e-hidden"),i.addDescribedBy(t,i.ctrlId+"_content"),i.renderContent(t),e.addClass([i.tooltipEle],"e-popup-open"),i.showTipPointer&&i.renderArrow(),i.renderCloseIcon(),i.renderPopup(t),i.adjustArrow(t,i.position,i.tooltipPositionX,i.tooltipPositionY),e.Animation.stop(i.tooltipEle),i.reposition(t))},i.prototype.afterRenderBlazor=function(t,i,o,n){if(t){e.removeClass([n.tooltipEle],"e-popup-open"),e.addClass([n.tooltipEle],"e-popup-close"),n.tooltipEventArgs={type:i?i.type:null,cancel:!1,target:t,event:i||null,element:n.tooltipEle,isInteracted:!e.isNullOrUndefined(i)},n.needTemplateReposition()&&!n.mouseTrail&&(n.tooltipEle.style.display="none");var s=function(e){n.beforeOpenCallback(e,t,o,i)};n.trigger("beforeOpen",n.tooltipEventArgs,s.bind(n))}},i.prototype.beforeOpenCallback=function(t,i,o,n){var s=this;if(t.cancel)this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove(),this.restoreElement(i);else{var r={name:o.effect,duration:o.duration,delay:o.delay,timingFunction:"easeOut"};if("None"===o.effect&&(r=void 0),this.openDelay>0){var l=function(){s.mouseTrail&&e.EventHandler.add(i,"mousemove touchstart mouseenter",s.onMouseMove,s),s.popupObj&&(s.popupObj.show(r,i),s.mouseMoveEvent&&s.mouseTrail&&s.onMouseMove(s.mouseMoveEvent))};this.showTimer=setTimeout(l,this.openDelay)}else this.popupObj&&this.popupObj.show(r,i)}n&&this.wireMouseEvents(n,i)},i.prototype.needTemplateReposition=function(){var t=this;return!e.isNullOrUndefined(t.viewContainerRef)&&"string"!=typeof t.viewContainerRef||this.isServerRender()&&this.isBlazorTemplate},i.prototype.checkCollision=function(t,e,i){var o={left:e,top:i,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},n=v(this.tooltipEle,this.checkCollideTarget(),e,i);return n.length>0&&(o.horizontal=n.indexOf("left")>=0?"Right":n.indexOf("right")>=0?"Left":this.tooltipPositionX,o.vertical=n.indexOf("top")>=0?"Bottom":n.indexOf("bottom")>=0?"Top":this.tooltipPositionY),o},i.prototype.collisionFlipFit=function(t,e,i){var o=this.checkCollision(t,e,i),s=o.position;if(this.tooltipPositionY!==o.vertical&&(s=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?o.vertical+this.tooltipPositionX:this.tooltipPositionX+o.vertical),this.tooltipPositionX!==o.horizontal&&(0===s.indexOf("Left")&&(o.vertical="LeftTop"===s||"LeftCenter"===s?"Top":"Bottom",s=o.vertical+"Left"),0===s.indexOf("Right")&&(o.vertical="RightTop"===s||"RightCenter"===s?"Top":"Bottom",s=o.vertical+"Right"),o.horizontal=this.tooltipPositionX),this.tooltipEventArgs={type:null,cancel:!1,target:t,event:null,element:this.tooltipEle,collidedPosition:s},this.trigger("beforeCollision",this.tooltipEventArgs),o.position!==s){var r=n(t,o.horizontal,o.vertical);this.adjustArrow(t,s,o.horizontal,o.vertical);var l=this.calculateTooltipOffset(s);l.top-=-1!=="TopBottom".indexOf(this.position.split(/(?=[A-Z])/)[0])&&-1!=="TopBottom".indexOf(s.split(/(?=[A-Z])/)[0])?2*this.offsetY:0,l.left-=-1!=="RightLeft".indexOf(this.position.split(/(?=[A-Z])/)[0])&&-1!=="RightLeft".indexOf(s.split(/(?=[A-Z])/)[0])?2*this.offsetX:0,o.position=s,o.left=r.left+l.left,o.top=r.top+l.top}else this.adjustArrow(t,s,o.horizontal,o.vertical);var a={left:o.left,top:o.top},h=g(this.tooltipEle,this.checkCollideTarget(),{X:!0,Y:!1},a).left;if(this.tooltipEle.style.display="block",this.showTipPointer&&(0===s.indexOf("Bottom")||0===s.indexOf("Top"))){var d=this.tooltipEle.querySelector(".e-arrow-tip"),p=parseInt(d.style.left,10)-(h-o.left);p<0?p=0:p+d.offsetWidth>this.tooltipEle.clientWidth&&(p=this.tooltipEle.clientWidth-d.offsetWidth),d.style.left=p.toString()+"px"}return this.tooltipEle.style.display="",a.left=h,a},i.prototype.checkCollideTarget=function(){return!this.windowCollision&&this.target?this.element:null},i.prototype.hideTooltip=function(t,e,i){var o=this;if(this.closeDelay>0){clearTimeout(this.hideTimer),clearTimeout(this.showTimer);var n=function(){o.closeDelay&&o.tooltipEle&&o.isTooltipOpen||o.tooltipHide(t,e,i)};this.hideTimer=setTimeout(n,this.closeDelay)}else this.tooltipHide(t,e,i)},i.prototype.tooltipHide=function(t,i,o){var n,s=this;n=i?this.target?o||i.target:this.element:document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]"),this.tooltipEventArgs={type:i?i.type:null,cancel:!1,target:n,event:i||null,element:this.tooltipEle,isInteracted:!e.isNullOrUndefined(i)},this.trigger("beforeClose",this.tooltipEventArgs,function(e){e.cancel?s.isHidden=!1:s.isServerRender()?s.blazorHide(t,n):(s.mouseMoveBeforeRemove(),s.popupHide(t,n))})},i.prototype.blazorHide=function(t,e){var i=this,o=function(){i.popupHide(t,e)};this.popupObj?this.popupHide(t,e):setTimeout(o,200)},i.prototype.popupHide=function(t,e){e&&this.restoreElement(e),this.isHidden=!0;var i={name:t.effect,duration:t.duration,delay:t.delay,timingFunction:"easeIn"};"None"===t.effect&&(i=void 0),this.popupObj&&this.popupObj.hide(i)},i.prototype.restoreElement=function(t){this.unwireMouseEvents(t),e.isNullOrUndefined(t.getAttribute("data-content"))||(t.setAttribute("title",t.getAttribute("data-content")),t.removeAttribute("data-content")),this.removeDescribedBy(t)},i.prototype.clear=function(){if(this.tooltipEle&&(e.removeClass([this.tooltipEle],"e-popup-close"),e.addClass([this.tooltipEle],"e-popup-open")),this.isHidden){if(this.popupObj&&this.popupObj.destroy(),this.isServerRender()&&this.tooltipEle){this.tooltipEle.style.display="none";var t={enableTooltip:"false"};this.interopAdaptor.invokeMethodAsync("OnTooltipServerCall",t),e.remove(this.tooltipEle)}else this.tooltipEle&&e.remove(this.tooltipEle);this.tooltipEle=null,this.popupObj=null}},i.prototype.tooltipHover=function(t){this.tooltipEle&&(this.isTooltipOpen=!0)},i.prototype.tooltipMouseOut=function(t){this.isTooltipOpen=!1,this.hideTooltip(this.animation.close,t,this.findTarget())},i.prototype.onMouseOut=function(t){var i=t.relatedTarget;if(i&&!this.mouseTrail){var o=e.closest(i,".e-tooltip-wrap.e-lib.e-popup");o?e.EventHandler.add(o,"mouseleave",this.tooltipElementMouseOut,this):(this.hideTooltip(this.animation.close,t,this.findTarget()),0===this.closeDelay&&this.clear())}else this.hideTooltip(this.animation.close,t,this.findTarget()),this.clear()},i.prototype.tooltipElementMouseOut=function(t){this.hideTooltip(this.animation.close,t,this.findTarget()),e.EventHandler.remove(this.element,"mouseleave",this.tooltipElementMouseOut),this.clear()},i.prototype.onStickyClose=function(t){this.close()},i.prototype.onMouseMove=function(t){var i=0,o=0;t.type.indexOf("touch")>-1?(t.preventDefault(),i=t.touches[0].pageX,o=t.touches[0].pageY):(i=t.pageX,o=t.pageY),e.Animation.stop(this.tooltipEle),e.removeClass([this.tooltipEle],"e-popup-close"),e.addClass([this.tooltipEle],"e-popup-open"),this.adjustArrow(t.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var n=this.calculateTooltipOffset(this.position),s=i+n.left+this.offsetX,r=o+n.top+this.offsetY,l=this.checkCollision(t.target,s,r);if(this.tooltipPositionX!==l.horizontal||this.tooltipPositionY!==l.vertical){var a=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?l.vertical+l.horizontal:l.horizontal+l.vertical;l.position=a,this.adjustArrow(t.target,l.position,l.horizontal,l.vertical);var h=this.calculateTooltipOffset(l.position);l.left=i+h.left-this.offsetX,l.top=o+h.top-this.offsetY}this.tooltipEle.style.left=l.left+"px",this.tooltipEle.style.top=l.top+"px"},i.prototype.keyDown=function(t){this.tooltipEle&&27===t.keyCode&&this.close()},i.prototype.touchEnd=function(t){this.tooltipEle&&null===e.closest(t.target,".e-tooltip")&&!this.isSticky&&this.close()},i.prototype.scrollHandler=function(t){this.tooltipEle&&(e.closest(t.target,".e-tooltip-wrap.e-lib.e-popup")||this.close())},i.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn),this.renderComplete()},i.prototype.preRender=function(){this.tipClass="e-tip-bottom",this.tooltipPositionX="Center",this.tooltipPositionY="Top",this.isHidden=!0},i.prototype.wireEvents=function(t){for(var i=0,o=this.getTriggerList(t);i<o.length;i++){var n=o[i];if("Custom"===n)return;"Focus"===n&&this.wireFocusEvents(),"Click"===n&&e.EventHandler.add(this.element,e.Browser.touchStartEvent,this.targetClick,this),"Hover"===n&&(e.Browser.isDevice?(this.touchModule=new e.Touch(this.element,{tapHoldThreshold:500,tapHold:this.tapHoldHandler.bind(this)}),e.EventHandler.add(this.element,e.Browser.touchEndEvent,this.touchEndHandler,this)):(e.EventHandler.add(this.element,"mouseover",this.targetHover,this),this.isServerRender()&&!this.isSticky&&e.EventHandler.add(this.element,"mouseleave",this.onMouseOut,this)))}e.EventHandler.add(document,"touchend",this.touchEnd,this),e.EventHandler.add(document,"scroll wheel",this.scrollHandler,this),e.EventHandler.add(document,"keydown",this.keyDown,this)},i.prototype.getTriggerList=function(t){return"Auto"===t&&(t=e.Browser.isDevice?"Hover":"Hover Focus"),t.split(" ")},i.prototype.wireFocusEvents=function(){if(e.isNullOrUndefined(this.target))e.EventHandler.add(this.element,"focus",this.targetHover,this);else for(var t=0,i=[].slice.call(this.element.querySelectorAll(this.target));t<i.length;t++){var o=i[t];e.EventHandler.add(o,"focus",this.targetHover,this)}},i.prototype.wireMouseEvents=function(t,i){this.tooltipEle&&(this.isSticky||("focus"===t.type&&e.EventHandler.add(i,"blur",this.onMouseOut,this),"mouseover"===t.type&&(this.isServerRender()||e.EventHandler.add(i,"mouseleave",this.onMouseOut,this)),this.closeDelay&&(e.EventHandler.add(this.tooltipEle,"mouseenter",this.tooltipHover,this),e.EventHandler.add(this.tooltipEle,"mouseleave",this.tooltipMouseOut,this))),this.mouseTrail&&0===this.openDelay&&e.EventHandler.add(i,"mousemove touchstart mouseenter",this.onMouseMove,this))},i.prototype.unwireEvents=function(t){for(var i=0,o=this.getTriggerList(t);i<o.length;i++){var n=o[i];if("Custom"===n)return;"Focus"===n&&this.unwireFocusEvents(),"Click"===n&&e.EventHandler.remove(this.element,e.Browser.touchStartEvent,this.targetClick),"Hover"===n&&(e.Browser.isDevice?(this.touchModule&&this.touchModule.destroy(),e.EventHandler.remove(this.element,e.Browser.touchEndEvent,this.touchEndHandler)):(e.EventHandler.remove(this.element,"mouseover",this.targetHover),this.isServerRender()&&!this.isSticky&&e.EventHandler.remove(this.element,"mouseleave",this.onMouseOut)))}e.EventHandler.remove(document,"touchend",this.touchEnd),e.EventHandler.remove(document,"scroll wheel",this.scrollHandler),e.EventHandler.remove(document,"keydown",this.keyDown)},i.prototype.unwireFocusEvents=function(){if(e.isNullOrUndefined(this.target))e.EventHandler.remove(this.element,"focus",this.targetHover);else for(var t=0,i=[].slice.call(this.element.querySelectorAll(this.target));t<i.length;t++){var o=i[t];e.EventHandler.remove(o,"focus",this.targetHover)}},i.prototype.unwireMouseEvents=function(t){if(!this.isSticky){for(var i=0,o=this.getTriggerList(this.opensOn);i<o.length;i++){var n=o[i];"Focus"===n&&e.EventHandler.remove(t,"blur",this.onMouseOut),"Hover"!==n||e.Browser.isDevice||this.isServerRender()||e.EventHandler.remove(t,"mouseleave",this.onMouseOut)}this.closeDelay&&(e.EventHandler.remove(t,"mouseenter",this.tooltipHover),e.EventHandler.remove(t,"mouseleave",this.tooltipMouseOut))}this.mouseTrail&&e.EventHandler.remove(t,"mousemove touchstart mouseenter",this.onMouseMove)},i.prototype.findTarget=function(){return document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]")},i.prototype.getModuleName=function(){return"tooltip"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(t,i){for(var o=this.findTarget(),n=0,s=Object.keys(t);n<s.length;n++)switch(s[n]){case"width":this.tooltipEle&&o&&(this.tooltipEle.style.width=this.tooltipEle.style.maxWidth=e.formatUnit(t.width),this.reposition(o));break;case"height":this.tooltipEle&&o&&(this.tooltipEle.style.height=e.formatUnit(t.height),this.reposition(o));break;case"content":if(this.tooltipEle)this.isServerRender()&&(this.isBlazorTooltip=!0),this.renderContent();else if(this.isServerRender()){var r={content:t.content};this.interopAdaptor.invokeMethodAsync("OnTooltipServerCall",r)}break;case"opensOn":this.unwireEvents(i.opensOn),this.wireEvents(t.opensOn);break;case"position":if(this.formatPosition(),this.tooltipEle&&o){var l=this.tooltipEle.querySelector(".e-arrow-tip-inner");l.style.top=l.style.left=null,this.reposition(o)}break;case"tipPointerPosition":this.tooltipEle&&o&&this.reposition(o);break;case"offsetX":if(this.tooltipEle){var a=t.offsetX-i.offsetX;this.tooltipEle.style.left=(parseInt(this.tooltipEle.style.left,10)+a).toString()+"px"}break;case"offsetY":if(this.tooltipEle){var h=t.offsetY-i.offsetY;this.tooltipEle.style.top=(parseInt(this.tooltipEle.style.top,10)+h).toString()+"px"}break;case"cssClass":this.tooltipEle&&(i.cssClass&&e.removeClass([this.tooltipEle],i.cssClass.split(" ")),t.cssClass&&e.addClass([this.tooltipEle],t.cssClass.split(" ")));break;case"enableRtl":this.tooltipEle&&(this.enableRtl?e.addClass([this.tooltipEle],"e-rtl"):e.removeClass([this.tooltipEle],"e-rtl"))}},i.prototype.open=function(t,i){e.isNullOrUndefined(i)&&(i=this.animation.open),e.isNullOrUndefined(t)&&(t=this.element),"none"!==t.style.display&&this.showTooltip(t,i)},i.prototype.close=function(t){t||(t=this.animation.close),this.hideTooltip(t)},i.prototype.refresh=function(t){this.tooltipEle&&this.renderContent(t),this.popupObj&&t&&this.reposition(t)},i.prototype.destroy=function(){if(this.isServerRender()||(t.prototype.destroy.call(this),this.tooltipEle&&e.remove(this.tooltipEle)),this.isServerRender()&&this.tooltipEle){var i=document.querySelector("#"+this.ctrlId+"_content_placeholder");i&&i.appendChild(this.tooltipEle)}this.popupObj&&this.popupObj.destroy(),e.removeClass([this.element],"e-tooltip"),this.unwireEvents(this.opensOn),this.unwireMouseEvents(this.element),this.tooltipEle=null,this.popupObj=null},We([e.Property("auto")],i.prototype,"width",void 0),We([e.Property("auto")],i.prototype,"height",void 0),We([e.Property()],i.prototype,"content",void 0),We([e.Property()],i.prototype,"target",void 0),We([e.Property("TopCenter")],i.prototype,"position",void 0),We([e.Property(0)],i.prototype,"offsetX",void 0),We([e.Property(0)],i.prototype,"offsetY",void 0),We([e.Property(!0)],i.prototype,"showTipPointer",void 0),We([e.Property(!0)],i.prototype,"enableHtmlParse",void 0),We([e.Property(!1)],i.prototype,"windowCollision",void 0),We([e.Property("Auto")],i.prototype,"tipPointerPosition",void 0),We([e.Property("Auto")],i.prototype,"opensOn",void 0),We([e.Property(!1)],i.prototype,"mouseTrail",void 0),We([e.Property(!1)],i.prototype,"isSticky",void 0),We([e.Complex({},Ze)],i.prototype,"animation",void 0),We([e.Property(0)],i.prototype,"openDelay",void 0),We([e.Property(0)],i.prototype,"closeDelay",void 0),We([e.Property()],i.prototype,"cssClass",void 0),We([e.Property(!1)],i.prototype,"enableHtmlSanitizer",void 0),We([e.Event()],i.prototype,"beforeRender",void 0),We([e.Event()],i.prototype,"beforeOpen",void 0),We([e.Event()],i.prototype,"afterOpen",void 0),We([e.Event()],i.prototype,"beforeClose",void 0),We([e.Event()],i.prototype,"afterClose",void 0),We([e.Event()],i.prototype,"beforeCollision",void 0),We([e.Event()],i.prototype,"created",void 0),We([e.Event()],i.prototype,"destroyed",void 0),i=We([e.NotifyPropertyChanges],i)}(e.Component),Ke={},Je=30,Qe=30,$e=30,ti=36,ei="e-spin-show",ii="e-spin-hide",oi="e-spin-material",ni="e-spin-fabric",si="e-spin-tailwind",ri="e-spin-bootstrap",li="e-spin-bootstrap4",ai="e-spin-high-contrast",hi="e-spinner-pane",di="e-spinner-inner",pi="e-path-circle",ci="e-path-arc",ui="e-spin-label",fi="e-spin-template",mi=null,gi=null;return t.PositionData=pe,t.Popup=ue,t.getScrollableParent=I,t.getZindexPartial=Y,t.getMaxZindex=X,t.calculateRelativeBasedPosition=o,t.calculatePosition=n,t.fit=g,t.isCollide=v,t.flip=y,t.ButtonProps=ze,t.AnimationSettings=Me,t.Dialog=_e,t.Animation=Ze,t.Tooltip=Ge,t.Spinner=rt,t.createSpinner=lt,t.showSpinner=Dt,t.hideSpinner=qt,t.setSpinner=Ft,t}({},ej.base,ej.buttons),this.ejs=ej;
- /*!
- * filename: ej2-splitbuttons.min.js
- * version : 19.2.44
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.splitbuttons=function(e,t,i,s){"use strict";function n(e,i){for(var s=t.extend({},e),n=0,o=Object.keys(s);n<o.length;n++){var r=o[n];i.indexOf(r)<0&&t.deleteObject(s,r)}return s}function o(e,i){var s=40===i?0:e.childElementCount-1,n=s,o=e.querySelector(".e-selected");o&&o.classList.remove("e-selected");for(var a=0,p=e.children.length;a<p;a++)e.children[a].classList.contains("e-focused")&&(n=a,e.children[a].classList.remove("e-focused"),40===i?n++:n--,n===(40===i?e.childElementCount:-1)&&(n=s));-1!==(n=r(e,e.children[n],n,i))&&(t.addClass([e.children[n]],"e-focused"),e.children[n].focus())}function r(e,t,i,s,n){if(void 0===n&&(n=0),(t.classList.contains("e-separator")||t.classList.contains("e-disabled"))&&(i===(40===s?e.childElementCount-1:0)?i=40===s?0:e.childElementCount-1:40===s?i++:i--),(t=e.children[i]).classList.contains("e-separator")||t.classList.contains("e-disabled")){if(++n===e.childElementCount)return i=-1;i=r(e,t,i,s,n)}return i}function a(e){var t=[].slice.call(e.getElementsByClassName("e-blank-icon"));if(t.length){var i=e.querySelector(".e-item:not(.e-blank-icon):not(.e-separator)");i.classList.contains("e-url")&&(i=i.querySelector(".e-menu-url"));var s,n=i.querySelector(".e-menu-icon"),o=e.classList.contains("e-rtl");s=o?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"};var r=parseInt(getComputedStyle(n).fontSize,10)+parseInt(getComputedStyle(n)[s.margin],10)+parseInt(getComputedStyle(i).paddingLeft,10)+"px";t.forEach(function(e){e.classList.contains("e-url")?e.querySelector(".e-menu-url").style[s.padding]=r:e.style[s.padding]=r})}}function p(e,s,n){void 0===s&&(s={});var o,r,a,p;t.isNullOrUndefined(n)&&(n=t.createElement);var l=document.querySelector(e);t.addClass([l],["e-btn-group","e-css"]),l.setAttribute("role","group");var c=l.children;s.buttons=s.buttons||[];for(var h=0,d=0;d<c.length;h++,d++)o=c[d],null!==(p=s.buttons[h])&&("BUTTON"===o.tagName?r=o:(r=n("label"),(a=c[d+1])?l.insertBefore(r,a):l.appendChild(r),o.id&&r.setAttribute("for",o.id),p&&p.disabled&&(o.disabled=!0),d++),s.cssClass&&p&&!p.cssClass&&(p.cssClass=s.cssClass),new i.Button(p||{},r));return l}var l=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),c=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},h=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return l(i,e),c([t.Property("")],i.prototype,"iconCss",void 0),c([t.Property("")],i.prototype,"id",void 0),c([t.Property(!1)],i.prototype,"separator",void 0),c([t.Property("")],i.prototype,"text",void 0),c([t.Property("")],i.prototype,"url",void 0),c([t.Property(!1)],i.prototype,"disabled",void 0),i}(t.ChildProperty),d=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),u=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},m={DISABLED:"e-disabled",FOCUS:"e-focused",ICON:"e-menu-icon",ITEM:"e-item",POPUP:"e-dropdown-popup",RTL:"e-rtl",SEPARATOR:"e-separator",VERTICAL:"e-vertical"},y=function(e){function r(t,i){var s=e.call(this,t,i)||this;return s.isPopupCreated=!0,s}return d(r,e),r.prototype.preRender=function(){},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.toggle=function(){this.canOpen()?this.openPopUp():this.closePopup()},r.prototype.render=function(){this.initialize(),this.disabled||this.wireEvents(),this.renderComplete()},r.prototype.addItems=function(e,t){for(var i,s=this.items.length,n=0,o=this.items.length;n<o;n++)if(t===this.items[n].text){s=n;break}for(var r=e.length-1;r>=0;r--)i=new h(this,"items",e[r],!0),this.items.splice(s,0,i);this.canOpen()||this.createItems()},r.prototype.removeItems=function(e,t){for(var i=!1,s=0,n=e.length;s<n;s++)for(var o=0,r=this.items.length;o<r;o++)if(e[s]===(t?this.items[o].id:this.items[o].text)){this.items.splice(o,1),i=!0;break}i&&this.getULElement()&&this.createItems()},r.prototype.createPopup=function(){var e,i=this.createElement("div",{className:m.POPUP,id:this.element.id+"-popup"});document.body.appendChild(i),this.dropDown=new s.Popup(i,{relateTo:this.element,collision:{X:"fit",Y:"flip"},position:{X:"left",Y:"bottom"},targetType:"relative",content:this.target?this.getTargetElement():"",enableRtl:this.enableRtl}),"fixed"===this.dropDown.element.style.position&&this.dropDown.refreshPosition(this.element),this.dropDown.hide(),t.attributes(this.element,(e={},e["aria-haspopup"]=this.items.length||this.target?"true":"false",e["aria-expanded"]="false",e["aria-owns"]=this.getPopUpElement().id,e.type="button",e["aria-label"]=this.element.textContent+" dropdownbutton",e)),this.cssClass&&t.addClass([i],this.cssClass.split(" ")),this.isPopupCreated=!0},r.prototype.getTargetElement=function(){return"string"==typeof this.target?t.select(this.target):this.target},r.prototype.createItems=function(e){var i,s,n,o,r=this.items,p=this.hasIcon(this.items,"iconCss"),l=this.getULElement();l?l.innerHTML="":l=this.createElement("ul",{attrs:{role:"menu",tabindex:"0"}});for(var c=0;c<r.length;c++){s=r[c];var h=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(s.text):s.text;n=this.createElement("li",{innerHTML:s.url?"":h,className:s.separator?m.ITEM+" "+m.SEPARATOR:m.ITEM,attrs:{role:"menuItem",tabindex:"-1"},id:s.id?s.id:t.getUniqueID("e-"+this.getModuleName()+"-item")}),s.url&&(n.appendChild(this.createAnchor(s)),n.classList.add("e-url")),s.iconCss?(i=this.createElement("span",{className:m.ICON+" "+s.iconCss}),s.url?n.childNodes[0].appendChild(i):n.insertBefore(i,n.childNodes[0])):p&&!s.separator&&n.classList.add("e-blank-icon"),s.disabled&&n.classList.add("e-disabled"),o={item:s,element:n},this.trigger("beforeItemRender",o),l.appendChild(n)}e&&this.getPopUpElement().appendChild(l),p&&a(this.getPopUpElement())},r.prototype.hasIcon=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][t])return!0;return!1},r.prototype.createAnchor=function(e){var i=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.text):e.text;return this.createElement("a",{className:"e-menu-text e-menu-url",innerHTML:i,attrs:{href:e.url}})},r.prototype.initialize=function(){this.button=new i.Button({iconCss:this.iconCss,iconPosition:this.iconPosition,cssClass:this.cssClass,content:this.content,disabled:this.disabled,enableRtl:this.enableRtl,enablePersistence:this.enablePersistence}),this.button.createElement=this.createElement,this.button.appendTo(this.element),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.appendArrowSpan(),this.setActiveElem([this.element]),this.target||!this.createPopupOnClick?this.createPopup():this.isPopupCreated=!1},r.prototype.appendArrowSpan=function(){this.element.appendChild(this.createElement("span",{className:"e-btn-icon e-icons e-icon-"+(this.cssClass.indexOf(m.VERTICAL)>-1?"bottom":"right")+" e-caret"}))},r.prototype.setActiveElem=function(e){this.activeElem=e},r.prototype.getModuleName=function(){return"dropdown-btn"},r.prototype.canOpen=function(){var e=!1;return this.isPopupCreated&&(e=this.getPopUpElement().classList.contains("e-popup-close")),e},r.prototype.destroy=function(){var i=this;if(e.prototype.destroy.call(this),"dropdown-btn"===this.getModuleName()){var s;this.element.querySelector("span.e-caret")&&t.detach(this.element.querySelector("span.e-caret")),this.cssClass&&(s=this.cssClass.split(" ")),this.button.destroy(),s&&t.removeClass([this.element],s),t.removeClass(this.activeElem,["e-active"]),(this.element.getAttribute("class")?["aria-haspopup","aria-expanded","aria-owns","type"]:["aria-haspopup","aria-expanded","aria-owns","type","class"]).forEach(function(e){i.element.removeAttribute(e)}),this.destroyPopup(),this.isPopupCreated=!1,this.disabled||this.unWireEvents()}},r.prototype.destroyPopup=function(){if(this.isPopupCreated){if(this.dropDown.destroy(),this.getPopUpElement()){var e=document.getElementById(this.getPopUpElement().id);e&&(t.removeClass([e],["e-popup-open","e-popup-close"]),t.detach(e))}t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler),this.isPopupCreated&&(this.dropDown=void 0)}this.isPopupCreated=!1},r.prototype.getPopUpElement=function(){var e=null;return this.dropDown&&(e=this.dropDown.element),e},r.prototype.getULElement=function(){var e=null;return this.getPopUpElement()&&(e=this.getPopUpElement().children[0]),e},r.prototype.wireEvents=function(){this.delegateMousedownHandler=this.mousedownHandler.bind(this),t.EventHandler.add(document,"mousedown touchstart",this.delegateMousedownHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyBoardHandler,this)},r.prototype.popupWireEvents=function(){var e=this.getPopUpElement();t.EventHandler.add(e,"click",this.clickHandler,this),t.EventHandler.add(e,"keydown",this.keyBoardHandler,this),this.rippleFn=t.rippleEffect(e,{selector:"."+m.ITEM})},r.prototype.keyBoardHandler=function(e){if(e.target!==this.element||9!==e.keyCode&&(e.altKey||40!==e.keyCode)&&38!==e.keyCode)switch(e.keyCode){case 38:case 40:!e.altKey||38!==e.keyCode&&40!==e.keyCode?this.upDownKeyHandler(e):this.keyEventHandler(e);break;case 9:case 13:case 27:case 32:this.keyEventHandler(e)}},r.prototype.upDownKeyHandler=function(e){(!this.target||38!==e.keyCode&&40!==e.keyCode)&&(e.preventDefault(),o(this.getULElement(),e.keyCode))},r.prototype.keyEventHandler=function(e){(!this.target||13!==e.keyCode&&9!==e.keyCode)&&(9!==e.keyCode&&e.preventDefault(),27===e.keyCode||38===e.keyCode||9===e.keyCode?this.canOpen()||this.closePopup(e,this.element):this.clickHandler(e))},r.prototype.getLI=function(e){return"LI"===e.tagName?e:t.closest(e,"li")},r.prototype.mousedownHandler=function(e){var i=e.target;!this.dropDown||this.canOpen()||t.closest(i,'[id="'+this.getPopUpElement().id+'"]')||t.closest(i,'[id="'+this.element.id+'"]')||this.closePopup(e)},r.prototype.clickHandler=function(e){var i=e.target;if(t.closest(i,'[id="'+this.element.id+'"]'))!this.createPopupOnClick||this.target?this.getPopUpElement().classList.contains("e-popup-close")?this.openPopUp(e):this.closePopup(e):this.isPopupCreated?this.closePopup(e,this.activeElem[0]):(this.createPopup(),this.openPopUp(e));else if(t.closest(i,'[id="'+this.getPopUpElement().id+'"]')){var s=void 0,n=void 0,o=void 0,r=this.getLI(i);r&&(n=Array.prototype.indexOf.call(this.getULElement().children,r),(o=this.items[n])&&(s={element:r,item:o},this.trigger("select",s)),this.closePopup(e,this.activeElem[0]))}},r.prototype.openPopUp=function(e){var i=this;void 0===e&&(e=null),this.target||this.createItems(!0);var s=this.getULElement();this.popupWireEvents();var n={element:s,items:this.items,event:e,cancel:!1};this.trigger("beforeOpen",n,function(e){if(!e.cancel){var s=i.getULElement();i.dropDown.show(null,i.element),t.addClass([i.element],"e-active"),i.element.setAttribute("aria-expanded","true"),s.focus();var n={element:s,items:i.items};i.trigger("open",n)}})},r.prototype.closePopup=function(e,i){var s=this;void 0===e&&(e=null);var n={element:this.getULElement(),items:this.items,event:e,cancel:!1};this.trigger("beforeClose",n,function(e){if(!e.cancel){var n=s.getULElement(),o=n.querySelector(".e-selected");o&&o.classList.remove("e-selected"),s.dropDown.hide(),t.removeClass(s.activeElem,"e-active"),s.element.setAttribute("aria-expanded","false"),i&&i.focus();var r={element:n,items:s.items};s.trigger("close",r),!s.target&&n&&t.detach(n),s.target||s.createPopupOnClick&&s.destroyPopup(),s.target&&(s.isPopupCreated=!s.createPopupOnClick)}})},r.prototype.unWireEvents=function(){t.EventHandler.remove(document,"mousedown touchstart",this.delegateMousedownHandler),t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"keydown",this.keyBoardHandler),this.isPopupCreated&&(t.EventHandler.remove(this.getPopUpElement(),"click",this.clickHandler),t.EventHandler.remove(this.getPopUpElement(),"keydown",this.keyBoardHandler))},r.prototype.onPropertyChanged=function(e,i){var s=["content","cssClass","iconCss","iconPosition","disabled","enableRtl"];this.button.setProperties(n(e,s));var o;this.isPopupCreated&&(o=this.getPopUpElement(),this.dropDown.setProperties(n(e,["enableRtl"])));for(var r=0,a=Object.keys(e);r<a.length;r++)switch(a[r]){case"content":this.element.querySelector("span.e-caret")||this.appendArrowSpan();break;case"disabled":e.disabled?(this.unWireEvents(),this.isPopupCreated&&!this.canOpen()&&this.closePopup()):this.wireEvents();break;case"cssClass":if(e.cssClass.indexOf(m.VERTICAL)>-1){var p=this.element.querySelector("span.e-caret");t.classList(p,["e-icon-bottom"],["e-icon-right"])}this.isPopupCreated&&(i.cssClass&&t.removeClass([o],i.cssClass.split(" ")),e.cssClass&&t.addClass([o],e.cssClass.split(" ")));break;case"target":this.dropDown.content=this.getTargetElement(),this.dropDown.dataBind();break;case"items":this.isPopupCreated&&this.getULElement()&&this.createItems();break;case"createPopupOnClick":e.createPopupOnClick?this.destroyPopup():this.createPopup()}},r.prototype.focusIn=function(){this.element.focus()},u([t.Property("")],r.prototype,"content",void 0),u([t.Property("")],r.prototype,"cssClass",void 0),u([t.Property(!1)],r.prototype,"disabled",void 0),u([t.Property("")],r.prototype,"iconCss",void 0),u([t.Property("Left")],r.prototype,"iconPosition",void 0),u([t.Property(!1)],r.prototype,"enableHtmlSanitizer",void 0),u([t.Collection([],h)],r.prototype,"items",void 0),u([t.Property(!1)],r.prototype,"createPopupOnClick",void 0),u([t.Property("")],r.prototype,"target",void 0),u([t.Event()],r.prototype,"beforeItemRender",void 0),u([t.Event()],r.prototype,"beforeOpen",void 0),u([t.Event()],r.prototype,"beforeClose",void 0),u([t.Event()],r.prototype,"close",void 0),u([t.Event()],r.prototype,"open",void 0),u([t.Event()],r.prototype,"select",void 0),u([t.Event()],r.prototype,"created",void 0),r=u([t.NotifyPropertyChanges],r)}(t.Component),f=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),v=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},g="e-rtl",b="EJS-SPLITBUTTON",C=function(e){function s(t,i){return e.call(this,t,i)||this}return f(s,e),s.prototype.preRender=function(){var e=this.element;if(e.tagName===b){for(var i=t.getValue("ej2_instances",e),s=this.createElement("button",{attrs:{type:"button"}}),n=this.createElement(b,{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,r=e.attributes.length;o<r;o++)s.setAttribute(e.attributes[o].nodeName,e.attributes[o].nodeValue);e.parentNode.insertBefore(n,e),t.detach(e),e=s,n.appendChild(e),t.setValue("ej2_instances",i,e),this.wrapper=n,this.element=e}this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},s.prototype.render=function(){this.initWrapper(),this.createPrimaryButton(),this.renderControl()},s.prototype.renderControl=function(){this.createSecondaryButton(),this.setActiveElem([this.element,this.secondaryBtnObj.element]),this.setAria(),this.wireEvents(),this.renderComplete()},s.prototype.addItems=function(t,i){e.prototype.addItems.call(this,t,i),this.secondaryBtnObj.items=this.items},s.prototype.removeItems=function(t,i){e.prototype.removeItems.call(this,t,i),this.secondaryBtnObj.items=this.items},s.prototype.initWrapper=function(){this.wrapper||(this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.element.parentNode.insertBefore(this.wrapper,this.element)),this.element.classList.remove("e-"+this.getModuleName()),this.enableRtl&&this.wrapper.classList.add(g),this.cssClass&&t.addClass([this.wrapper],this.cssClass.split(" "))},s.prototype.createPrimaryButton=function(){var e={cssClass:this.cssClass,enableRtl:this.enableRtl,iconCss:this.iconCss,iconPosition:this.iconPosition,content:this.content,disabled:this.disabled};this.primaryBtnObj=new i.Button(e),this.primaryBtnObj.createElement=this.createElement,this.primaryBtnObj.appendTo(this.element),this.element.classList.add("e-"+this.getModuleName()),this.element.type="button",this.wrapper.appendChild(this.element)},s.prototype.createSecondaryButton=function(){var e=this,t=this.createElement("button",{className:"e-icon-btn",attrs:{tabindex:"-1"},id:this.element.id+"_dropdownbtn"});this.wrapper.appendChild(t);var i={cssClass:this.cssClass,disabled:this.disabled,enableRtl:this.enableRtl,items:this.items,target:this.target,createPopupOnClick:this.createPopupOnClick};i.beforeItemRender=function(t){e.createPopupOnClick&&(e.secondaryBtnObj.dropDown.relateTo=e.wrapper,e.dropDown=e.secondaryBtnObj.dropDown),e.trigger("beforeItemRender",t)},i.open=function(t){e.trigger("open",t)},i.close=function(t){e.trigger("close",t)},i.select=function(t){e.trigger("select",t)},i.beforeOpen=function(t){var i=new P;return e.trigger("beforeOpen",t,function(e){i.resolve(e)}),i},i.beforeClose=function(t){var i=new P;return e.trigger("beforeClose",t,function(e){i.resolve(e)}),i},this.secondaryBtnObj=new y(i),this.secondaryBtnObj.createElement=this.createElement,this.secondaryBtnObj.appendTo(t),this.createPopupOnClick||(this.secondaryBtnObj.dropDown.relateTo=this.wrapper,this.dropDown=this.secondaryBtnObj.dropDown),this.secondaryBtnObj.activeElem=[this.element,this.secondaryBtnObj.element],this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right")},s.prototype.setAria=function(){t.attributes(this.element,{"aria-expanded":"false","aria-haspopup":"true","aria-label":this.element.textContent+" splitbutton","aria-owns":this.element.id+"_dropdownbtn-popup"})},s.prototype.getModuleName=function(){return"split-btn"},s.prototype.toggle=function(){this.secondaryBtnObj.toggle()},s.prototype.destroy=function(){var i=this,s=[g];if(this.cssClass&&(s=s.concat(this.cssClass.split(" "))),this.element){var n=document.getElementById(this.element.id);n&&n.parentElement===this.wrapper&&(this.wrapper.tagName===b?(this.wrapper.innerHTML="",t.removeClass([this.wrapper],["e-rtl","e-"+this.getModuleName()+"-wrapper"]),t.removeClass([this.wrapper],this.cssClass.split(" "))):(t.removeClass([this.element],s),["aria-label","aria-haspopup","aria-expanded","aria-owns","type"].forEach(function(e){i.element.removeAttribute(e)}),this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper)),this.unWireEvents())}this.primaryBtnObj.destroy(),this.secondaryBtnObj.destroy(),e.prototype.destroy.call(this),this.element.getAttribute("class")||this.element.removeAttribute("class")},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.primaryBtnClickHandler,this),new t.KeyboardEvents(this.element,{keyAction:this.btnKeyBoardHandler.bind(this),keyConfigs:{altdownarrow:"alt+downarrow"}})},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.primaryBtnClickHandler),t.getInstance(this.element,t.KeyboardEvents).destroy()},s.prototype.primaryBtnClickHandler=function(){this.trigger("click",{element:this.element})},s.prototype.btnKeyBoardHandler=function(e){switch(e.action){case"altdownarrow":this.clickHandler(e)}},s.prototype.onPropertyChanged=function(e,i){var s=["content","iconCss","iconPosition","cssClass","disabled","enableRtl"];this.primaryBtnObj.setProperties(n(e,s)),s=["beforeOpen","beforeItemRender","select","open","close","cssClass","disabled","enableRtl","createPopupOnClick"],Object.keys(e).indexOf("items")>-1&&(this.secondaryBtnObj.items=e.items,this.secondaryBtnObj.dataBind()),this.secondaryBtnObj.setProperties(n(e,s));for(var o=0,r=Object.keys(e);o<r.length;o++)switch(r[o]){case"cssClass":i.cssClass&&t.removeClass([this.wrapper],i.cssClass.split(" ")),t.addClass([this.wrapper],e.cssClass.split(" "));break;case"enableRtl":e.enableRtl?t.addClass([this.wrapper],g):t.removeClass([this.wrapper],g)}},s.prototype.focusIn=function(){this.element.focus()},v([t.Property("")],s.prototype,"content",void 0),v([t.Property("")],s.prototype,"cssClass",void 0),v([t.Property(!1)],s.prototype,"disabled",void 0),v([t.Property("")],s.prototype,"iconCss",void 0),v([t.Property("Left")],s.prototype,"iconPosition",void 0),v([t.Property(!1)],s.prototype,"createPopupOnClick",void 0),v([t.Collection([],h)],s.prototype,"items",void 0),v([t.Property("")],s.prototype,"target",void 0),v([t.Event()],s.prototype,"beforeItemRender",void 0),v([t.Event()],s.prototype,"beforeOpen",void 0),v([t.Event()],s.prototype,"beforeClose",void 0),v([t.Event()],s.prototype,"click",void 0),v([t.Event()],s.prototype,"close",void 0),v([t.Event()],s.prototype,"open",void 0),v([t.Event()],s.prototype,"select",void 0),v([t.Event()],s.prototype,"created",void 0),s=v([t.NotifyPropertyChanges],s)}(y),P=function(){function e(){var e=this;this.promise=new Promise(function(t,i){e.resolve=t,e.reject=i}),this.catch=this.promise.catch.bind(this.promise),this.then=this.promise.then.bind(this.promise)}return e}(),E=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),w=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},O="e-btn-content",k=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return E(i,e),w([t.Property(null)],i.prototype,"template",void 0),w([t.Property(16)],i.prototype,"width",void 0),w([t.Property("Left")],i.prototype,"position",void 0),i}(t.ChildProperty),S=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return E(i,e),w([t.Property(400)],i.prototype,"duration",void 0),w([t.Property("None")],i.prototype,"effect",void 0),w([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),L=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.step=1,s}return E(i,e),i.prototype.preRender=function(){e.prototype.preRender.call(this)},i.prototype.render=function(){t.isBlazor()&&(this.isServerRendered=!1),e.prototype.render.call(this),this.init(),this.wireEvents(),this.setAria(),this.renderComplete()},i.prototype.start=function(e){this.isPaused=!1,this.startProgress(e||this.percent,this.progressTime)},i.prototype.stop=function(){this.isPaused=!0,cancelAnimationFrame(this.timerId)},i.prototype.progressComplete=function(){this.isPaused=!1,this.finishProgress()},i.prototype.getModuleName=function(){return"progress-btn"},i.prototype.destroy=function(){var i=this,s=["e-hide-spinner","e-progress-active","e-round-corner","e-"+e.prototype.getModuleName.call(this),"e-spin-"+this.spinSettings.position.toLowerCase()];e.prototype.destroy.call(this),this.unWireEvents(),this.element.innerHTML="",this.cssClass&&(s=s.concat(this.cssClass.split(" "))),t.removeClass([this.element],s),(this.element.getAttribute("class")?["aria-label","aria-valuemin","aria-valuemax","aria-valuenow"]:["aria-label","aria-valuemin","aria-valuemax","aria-valuenow","class"]).forEach(function(e){i.element.removeAttribute(e)}),this.disabled&&this.element.removeAttribute("disabled")},i.prototype.init=function(){this.element.classList.add("e-"+e.prototype.getModuleName.call(this)),this.setContent(),this.createSpinner(),this.enableProgress&&this.createProgress()},i.prototype.createSpinner=function(){var e=this.createElement("span",{className:"e-spinner"});this.setSpinPosition(e),s.createSpinner({target:e,width:this.spinSettings.width||16,template:this.spinSettings.template},this.createElement)},i.prototype.getSpinner=function(){return this.element.getElementsByClassName("e-spinner")[0]},i.prototype.getProgress=function(){return this.element.getElementsByClassName("e-progress")[0]},i.prototype.setSpinPosition=function(e){var t=this.spinSettings.position||"Left";"Left"===t||"Top"===t?this.element.insertBefore(e,this.element.getElementsByClassName(O)[0]):this.element.appendChild(e),this.element.classList.add("e-spin-"+t.toLowerCase())},i.prototype.createProgress=function(){this.element.appendChild(this.createElement("span",{className:"e-progress"}))},i.prototype.setContent=function(){var e;t.isBlazor()?(e=this.content,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.content)),this.setContentIcon(e)):(e=this.element.innerHTML,this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(this.element.innerHTML)),this.element.innerHTML="",this.element.appendChild(this.createElement("span",{className:O,innerHTML:e})))},i.prototype.setContentIcon=function(e){var t=this.createElement("span",{className:O,innerHTML:e});if(this.iconCss){var i=this.createElement("span",{className:"e-btn-icon "+this.iconCss});this.element.textContent.trim()?(i.classList.add("e-icon-"+this.iconPosition.toLowerCase()),"Top"!==this.iconPosition&&"Bottom"!==this.iconPosition||this.element.classList.add("e-"+this.iconPosition.toLowerCase()+"-icon-btn")):this.element.classList.add("e-icon-btn");var s=t.childNodes[0];!s||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?t.appendChild(i):t.insertBefore(i,s)}this.element.appendChild(t)},i.prototype.clickHandler=function(){this.element.classList.contains("e-progress-active")||this.startProgress()},i.prototype.startProgress=function(e,t){var i=this.element.classList,n=i.contains("e-vertical");i.add("e-progress-active"),i.contains("e-hide-spinner")||s.showSpinner(this.element),this.startAnimate(Date.now(),t||0,t?Date.now()-1*this.duration/100:Date.now(),e||0,0,this.step,0,n),this.startContAnimate()},i.prototype.startAnimate=function(e,t,i,s,n,o,r,a){var p=this;try{var l=e-i,c=this.duration*o/100,h=l?l<c?l-c:l%c:0;this.progressTime=t=t+l-h,i=e-h,s+=(l-h)/this.duration*100;var d={percent:n=(t-r)%c==0||100===s?s:n,currentDuration:t,step:o};this.eIsVertical=a,0===s?this.trigger("begin",d,function(e){p.successCallback(e,s,n,t,r,h,i)}):100===s||t===this.duration?this.trigger("end",d,function(e){p.successCallback(e,s,n,t,r,h,i)}):this.trigger("progress",d,function(e){p.successCallback(e,s,n,t,r,h,i)})}catch(e){cancelAnimationFrame(this.timerId),this.trigger("fail",e)}},i.prototype.successCallback=function(e,t,i,s,n,o,r){var a=this,p=t,l=i,c=o,h=s,d=n,u=r,m=this.eIsVertical;p!==e.percent&&e.percent!==l&&(p=e.percent),this.percent=p,this.step=e.step,(h-d)%(this.duration*e.step/100)!=0&&100!==p||(this.timerId=requestAnimationFrame(function(){a.enableProgress&&(a.getProgress().style[m?"height":"width"]=p+"%"),a.element.setAttribute("aria-valuenow",p.toString())}),l=p,d=h),this.isPaused||(h<this.duration&&p<100?this.interval=window.setTimeout(function(){a.startAnimate(Date.now(),h,u,p,l,e.step,d,m)},this.duration/100-c):this.interval=window.setTimeout(function(){a.progressTime=a.percent=0,a.enableProgress&&(a.getProgress().style[m?"height":"width"]="0%"),a.element.setAttribute("aria-valuenow","0"),a.hideSpin()},100))},i.prototype.startContAnimate=function(){var e=this,i=this.element.getElementsByClassName(O)[0];"None"!==this.animationSettings.effect?new t.Animation({}).animate(i,{duration:this.animationSettings.duration,name:"Progress"+this.animationSettings.effect,timingFunction:this.animationSettings.easing,begin:function(){"Center"===e.spinSettings.position&&e.setSpinnerSize()},end:function(){i.classList.add("e-animate-end")}}):"Center"===this.spinSettings.position&&this.setSpinnerSize()},i.prototype.finishProgress=function(){var e=this.element.classList,t=e.contains("e-vertical");e.add("e-progress-active");for(var i=this.percent;i<100;i++)(i+=10)>100&&(i=100),this.enableProgress&&(this.getProgress().style[t?"height":"width"]=this.percent<100?i+"%":"100%");this.element.setAttribute("aria-valuenow","0"),this.hideSpin();var s={step:this.step,currentDuration:this.progressTime,percent:100};clearTimeout(this.interval),this.trigger("end",s),this.progressTime=this.percent=0},i.prototype.setSpinnerSize=function(){var e=this.element.getElementsByClassName(O)[0],t=this.getSpinner();t.style.width=Math.max(t.offsetWidth,e.offsetWidth)+"px",t.style.height=Math.max(t.offsetHeight,e.offsetHeight)+"px",e.classList.add("e-cont-animate")},i.prototype.hideSpin=function(){var e=this.element.getElementsByClassName(O)[0];if(this.element.classList.contains("e-hide-spinner")||s.hideSpinner(this.element),this.element.classList.remove("e-progress-active"),"None"!==this.animationSettings.effect&&e.classList.remove("e-animate-end"),"Center"===this.spinSettings.position){var t=this.getSpinner();e.classList.remove("e-cont-animate"),t.style.width="auto",t.style.height="auto"}},i.prototype.setIconSpan=function(){var e=this.element.getElementsByClassName(O)[0],t=this.element.getElementsByClassName("e-btn-icon")[0];!e.childNodes[0]||"Left"!==this.iconPosition&&"Top"!==this.iconPosition?e.appendChild(t):e.insertBefore(t,e.childNodes[0])},i.prototype.setAria=function(){t.attributes(this.element,{"aria-label":this.element.textContent+" progress","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"0"})},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this)},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler)},i.prototype.onPropertyChanged=function(i,n){var o=this.element,r=!1;this.element.querySelector(".e-spinner-pane").classList.contains("e-spin-show")&&(r=!0),e.prototype.onPropertyChanged.call(this,i,n);for(var a=0,p=Object.keys(i);a<p.length;a++)switch(p[a]){case"content":if(t.isBlazor()){var l=this.element.querySelector(".e-btn-content");this.iconCss?"Left"===this.iconPosition||"Top"===this.iconPosition?l.childNodes[1].textContent=this.content:l.childNodes[0].textContent=this.content:l.textContent=this.content}else this.setContent(),this.createSpinner(),r&&(s.showSpinner(this.element),r=!1),this.enableProgress&&this.createProgress();o.setAttribute("aria-label",o.textContent+" progress");break;case"iconCss":n.iconCss||this.setIconSpan();break;case"iconPosition":this.setIconSpan();break;case"enableProgress":i.enableProgress?this.createProgress():t.remove(this.getProgress());break;case"spinSettings":i.spinSettings.position&&(o.classList.remove("e-spin-"+n.spinSettings.position.toLowerCase()),this.setSpinPosition(this.getSpinner())),(i.spinSettings.template||i.spinSettings.width)&&(o.removeChild(this.getSpinner()),this.createSpinner())}},i.prototype.focusIn=function(){this.element.focus()},w([t.Property(!1)],i.prototype,"enableProgress",void 0),w([t.Property(2e3)],i.prototype,"duration",void 0),w([t.Property("Left")],i.prototype,"iconPosition",void 0),w([t.Property("")],i.prototype,"iconCss",void 0),w([t.Property(!1)],i.prototype,"disabled",void 0),w([t.Property(!1)],i.prototype,"isPrimary",void 0),w([t.Property("")],i.prototype,"cssClass",void 0),w([t.Property("")],i.prototype,"content",void 0),w([t.Property(!1)],i.prototype,"isToggle",void 0),w([t.Property(!1)],i.prototype,"enableHtmlSanitizer",void 0),w([t.Complex({},k)],i.prototype,"spinSettings",void 0),w([t.Complex({},S)],i.prototype,"animationSettings",void 0),w([t.Event()],i.prototype,"created",void 0),w([t.Event()],i.prototype,"begin",void 0),w([t.Event()],i.prototype,"progress",void 0),w([t.Event()],i.prototype,"end",void 0),w([t.Event()],i.prototype,"fail",void 0),i=w([t.NotifyPropertyChanges],i)}(i.Button);return e.getModel=n,e.upDownKeyHandler=o,e.setBlankIconStyle=a,e.Item=h,e.DropDownButton=y,e.SplitButton=C,e.Deferred=P,e.createButtonGroup=p,e.SpinSettings=k,e.AnimationSettings=S,e.ProgressButton=L,e}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
- /*!
- * filename: ej2-inputs.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.inputs=function(e,t,i,s){"use strict";function n(){if(t.attributes(this.element,{role:"textbox",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false","aria-live":"assertive","aria-valuenow":""}),this.mask){for(var e=this.mask.split("]"),i=0;i<e.length;i++)if("\\"===e[i][e[i].length-1]){e[i]=e[i]+"]";for(var s=e[i].split("["),n=0;n<s.length;n++)"\\"===s[n][s[n].length-1]&&(s[n]=s[n]+"["),m.call(this,s[n])}else if((s=e[i].split("[")).length>1)for(var a=!1,n=0;n<s.length;n++)"\\"===s[n]?(this.customRegExpCollec.push("["),this.hiddenMask+=s[n]+"["):""===s[n]?a=!0:""!==s[n]&&a||n===s.length-1?(this.customRegExpCollec.push("["+s[n]+"]"),this.hiddenMask+=this.promptChar,a=!1):m.call(this,s[n]);else m.call(this,s[0]);if(this.escapeMaskValue=this.hiddenMask,this.promptMask=this.hiddenMask.replace(/[09?LCAa#&]/g,this.promptChar),!t.isNullOrUndefined(this.customCharacters))for(i=0;i<this.promptMask.length;i++)t.isNullOrUndefined(this.customCharacters[this.promptMask[i]])||(this.promptMask=this.promptMask.replace(new RegExp(this.promptMask[i],"g"),this.promptChar));var r=0;if(this.hiddenMask.match(new RegExp(/\\/)))for(i=0;i<this.hiddenMask.length;i++){n=0;i>=1&&(n=i),n-=r=this.hiddenMask.length-this.promptMask.length,i>0&&"\\"!==this.hiddenMask[i-1]&&(">"===this.hiddenMask[i]||"<"===this.hiddenMask[i]||"|"===this.hiddenMask[i])&&(this.promptMask=this.promptMask.substring(0,n)+this.promptMask.substring(i+1-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue.substring(i+1-r,this.escapeMaskValue.length)),"\\"===this.hiddenMask[i]&&(this.promptMask=this.promptMask.substring(0,n)+this.hiddenMask[i+1]+this.promptMask.substring(i+2-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue[i+1]+this.escapeMaskValue.substring(i+2-r,this.escapeMaskValue.length))}else this.promptMask=this.promptMask.replace(/[>|<]/g,""),this.escapeMaskValue=this.hiddenMask.replace(/[>|<]/g,"");t.attributes(this.element,{"aria-invalid":"false"})}}function a(){I.call(this,this.promptMask),D.call(this,this.value)}function r(){t.EventHandler.add(this.element,"keydown",k,this),t.EventHandler.add(this.element,"keypress",L,this),t.EventHandler.add(this.element,"keyup",A,this),t.EventHandler.add(this.element,"input",T,this),t.EventHandler.add(this.element,"focus",g,this),t.EventHandler.add(this.element,"blur",b,this),t.EventHandler.add(this.element,"paste",E,this),t.EventHandler.add(this.element,"cut",C,this),t.EventHandler.add(this.element,"drop",S,this),t.EventHandler.add(this.element,"mousedown",v,this),t.EventHandler.add(this.element,"mouseup",f,this),this.enabled&&(o.call(this),this.formElement&&t.EventHandler.add(this.formElement,"reset",u,this))}function l(){t.EventHandler.remove(this.element,"keydown",k),t.EventHandler.remove(this.element,"keypress",L),t.EventHandler.remove(this.element,"keyup",A),t.EventHandler.remove(this.element,"input",T),t.EventHandler.remove(this.element,"focus",g),t.EventHandler.remove(this.element,"blur",b),t.EventHandler.remove(this.element,"paste",E),t.EventHandler.remove(this.element,"cut",C),t.EventHandler.remove(this.element,"mousedown",v),t.EventHandler.remove(this.element,"mouseup",f),this.formElement&&t.EventHandler.remove(this.formElement,"reset",u)}function o(){this.showClearButton&&t.EventHandler.add(this.inputObj.clearButton,"mousedown touchstart",h,this)}function h(e){e.preventDefault(),this.inputObj.clearButton.classList.contains("e-clear-icon-hide")||(d.call(this,e),this.value="")}function d(e){var t=this.element.value;I.call(this,this.promptMask),this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),B.call(this,e,t),this.element.setSelectionRange(0,0)}function u(){"EJS-MASKEDTEXTBOX"===this.element.tagName?I.call(this,this.promptMask):this.value=this.initInputValue}function c(e){return e.value}function p(e,i){var s="",n=0,a=!1,r=t.isNullOrUndefined(i)?t.isNullOrUndefined(e)||t.isNullOrUndefined(this)?i:e.value:i;if(r!==this.promptMask)for(var l=0;l<this.customRegExpCollec.length;l++)a&&(a=!1),">"!==this.customRegExpCollec[n]&&"<"!==this.customRegExpCollec[n]&&"|"!==this.customRegExpCollec[n]&&"\\"!==this.customRegExpCollec[n]||(--l,a=!0),a||r[l]!==this.promptChar&&!t.isNullOrUndefined(this.customRegExpCollec[n])&&(this._callPasteHandler||!t.isNullOrUndefined(this.regExpCollec[this.customRegExpCollec[n]])||this.customRegExpCollec[n].length>2&&"["===this.customRegExpCollec[n][0]&&"]"===this.customRegExpCollec[n][this.customRegExpCollec[n].length-1]||!t.isNullOrUndefined(this.customCharacters)&&!t.isNullOrUndefined(this.customCharacters[this.customRegExpCollec[n]]))&&""!==r&&(s+=r[l]),++n;return(null===this.mask||""===this.mask&&void 0!==this.value)&&(s=r),s}function m(e){for(var t=0;t<e.length;t++)this.hiddenMask+=e[t],"\\"!==e[t]&&this.customRegExpCollec.push(e[t])}function v(){this.isClicked=!0}function f(){this.isClicked=!1}function g(e){var i=this,s=this.element,n=0,a=p.call(this,s),r=!1,l=!1,o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:this.inputObj.container,selectionEnd:s.selectionEnd};if(this.isClicked||y.call(this,o,s),this.mask&&(null!==a&&""!==a||"Always"===this.floatLabelType||null===this.placeholder||""===this.placeholder||(s.value=this.promptMask),setTimeout(function(){if(s.selectionStart===i.promptMask.length||s.value[s.selectionStart]===i.promptChar)r=!0;else for(var e=s.selectionStart;e<i.promptMask.length;e++){if(s.value[e]===i.promptChar){r=!0;break}if(s.value[e]!==i.promptMask[e]){r=!1;break}}}),setTimeout(function(){var e=s.selectionStart-1;if(e===i.promptMask.length-1||s.value[e]===i.promptChar)l=!0;else for(var t=e;t>=0;t--){if(s.value[t]===i.promptChar){l=!0;break}if(s.value[t]!==i.promptMask[t]){l=!1;break}}}),this.isClicked||"Always"!==this.floatLabelType&&(null===a||""===a)&&null!==this.placeholder&&""!==this.placeholder)){for(n=0;n<this.promptMask.length;n++)if(s.value[n]===this.promptChar){setTimeout(function(){(r||l)&&(s.selectionEnd=n,s.selectionStart=n),o={selectionStart:s.selectionStart,event:e,value:i.value,maskedValue:s.value,container:i.inputObj.container,selectionEnd:s.selectionEnd},y.call(i,o,s)});break}t.isNullOrUndefined(s.value.match(this.promptChar))&&(o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:this.inputObj.container,selectionEnd:s.selectionEnd},y.call(this,o,s)),this.isClicked=!1}}function y(e,t){this.trigger("focus",e,function(e){t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd})}function b(e){if(this.blurEventArgs={event:e,value:this.value,maskedValue:this.element.value,container:this.inputObj.container},this.trigger("blur",this.blurEventArgs),this.mask&&(this.isFocus=!1,this.placeholder&&this.element.value===this.promptMask&&"Always"!==this.floatLabelType)){I.call(this,"");var i=this.element.parentNode.querySelector(".e-float-text");"Auto"===this.floatLabelType&&!t.isNullOrUndefined(i)&&i.classList.contains(ne)&&t.removeClass([i],ne)}}function E(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.selectionStart,s=this.element.selectionEnd,n=this.element.value;I.call(this,""),this._callPasteHandler=!0,setTimeout(function(){var a=t.element.value.replace(/ /g,"");t.redoCollec.length>0&&t.redoCollec[0].value===t.element.value&&(a=p.call(t,t.element)),I.call(t,n),t.element.selectionStart=i,t.element.selectionEnd=s;var r=0;t.maskKeyPress=!0;do{w.call(t,a[r],!1,null),++r}while(r<a.length);if(t.maskKeyPress=!1,t._callPasteHandler=!1,t.element.value===n){var l=0;t.maskKeyPress=!0;do{w.call(t,a[l],!1,null),++l}while(l<a.length);t.maskKeyPress=!1}else B.call(t,e,n)},1)}}function C(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.value,s=this.element.selectionStart,n=this.element.selectionEnd;this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd});var a=this.element.value.substring(0,s)+this.promptMask.substring(s,n)+this.element.value.substring(n);setTimeout(function(){I.call(t,a),t.element.selectionStart=t.element.selectionEnd=s,t.element.value!==i&&B.call(t,e,null)},0)}}function S(e){e.preventDefault()}function T(e){if(!0!==t.Browser.isIE||""!==this.element.value||"Never"!==this.floatLabelType){var i={ctrlKey:!1,keyCode:229};if(t.extend(e,i),this.mask){if(""===this.element.value&&this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this._callPasteHandler||P.call(this,e),this.element.value.length>this.promptMask.length){var s=this.element.selectionStart,n=this.element.value.length-this.promptMask.length,a=this.element.value.substring(s-n,s);this.maskKeyPress=!1;var r=0;do{w.call(this,a[r],e.ctrlKey,e),++r}while(r<a.length);this.element.value!==this.preEleVal&&B.call(this,e,null)}var l=p.call(this,this.element);this.prevValue=l,this.value=l,""===l&&(I.call(this,this.promptMask),this.element.setSelectionRange(0,0))}}}function k(e){if(this.mask&&!this.readonly){229!==e.keyCode&&(!e.ctrlKey||89!==e.keyCode&&90!==e.keyCode||e.preventDefault(),P.call(this,e));var t=this.element.value;if(e.ctrlKey&&(89===e.keyCode||90===e.keyCode)){var i=void 0;90===e.keyCode&&this.undoCollec.length>0&&t!==this.undoCollec[this.undoCollec.length-1].value?(i=this.undoCollec[this.undoCollec.length-1],this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),I.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.undoCollec.splice(this.undoCollec.length-1,1)):89===e.keyCode&&this.redoCollec.length>0&&t!==this.redoCollec[0].value&&(i=this.redoCollec[0],this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),I.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.redoCollec.splice(0,1))}}}function x(){var e,t=this.element.selectionStart,i=this.element.selectionEnd;this.redoCollec.length>0?(e=this.redoCollec[0],I.call(this,e.value),e.startIndex-t==1?(this.element.selectionStart=e.startIndex,this.element.selectionEnd=e.endIndex):(this.element.selectionStart=t+1,this.element.selectionEnd=i+1)):(I.call(this,this.promptMask),this.element.selectionStart=this.element.selectionEnd=t)}function O(e,t,i){return"input"===i.type&&(e=!1,t=this.element.value,I.call(this,this.promptMask),D.call(this,t)),e}function P(e){var i,s=!1,n=!1;this.element.value.length<this.promptMask.length&&(s=!0,i=this.element.value,s=O.call(this,s,i,e),x.call(this)),this.element.value.length>=this.promptMask.length&&"input"===e.type&&(s=O.call(this,s,i,e));var a=this.element.selectionStart,r=this.element.selectionEnd,l=this.element.selectionStart,o=this.element.selectionEnd,h=this.hiddenMask.replace(/[>|\\<]/g,""),d=h[l-1],u=this.element.selectionEnd;if(s||8===e.keyCode||46===e.keyCode){this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:o});var c=!1,p=this.element.value;if(l>0||(8===e.keyCode||46===e.keyCode)&&l<this.element.value.length&&this.element.selectionEnd-l!==this.element.value.length){var m=l;l!==o?(l=o,46===e.keyCode&&(c=!0)):46===e.keyCode?++m:--m;for(var v=l;8===e.keyCode||s||c?v>m:v<m;8===e.keyCode||s||c?v--:v++)for(var f=l;8===e.keyCode||s||c?f>0:f<this.element.value.length;8===e.keyCode||s||c?f--:f++){var g=void 0;(8===e.keyCode||c)&&(a!==r&&a!==l||a===r)||s?(d=h[f-1],g=l-1):(d=h[f],g=l,++l);var y=this.element.value[g];if(t.isNullOrUndefined(this.regExpCollec[d])&&!t.isNullOrUndefined(this.customCharacters)&&t.isNullOrUndefined(this.customCharacters[d])&&this.hiddenMask[g]!==this.promptChar&&"["!==this.customRegExpCollec[g][0]&&"]"!==this.customRegExpCollec[g][this.customRegExpCollec[g].length-1]||this.promptMask[g]!==this.promptChar&&t.isNullOrUndefined(this.customCharacters))this.element.selectionStart=this.element.selectionEnd=g,e.preventDefault(),46!==e.keyCode||c||++this.element.selectionStart;else{var b=this.element.value,E=this.promptChar,C=b.substring(0,g)+E+b.substring(l,b.length);I.call(this,C),e.preventDefault(),46!==e.keyCode||c||g++,this.element.selectionStart=this.element.selectionEnd=g,n=!0}if(l=this.element.selectionStart,!n&&8===e.keyCode||c||!n&&46!==e.keyCode?g=l-1:(g=l,n=!1),y=this.element.value[g],a!==r&&this.element.selectionStart===a||this.promptMask[g]===this.promptChar||y!==this.promptMask[g]&&this.promptMask[g]!==this.promptChar&&!t.isNullOrUndefined(this.customCharacters))break}}46===e.keyCode&&c&&n&&(this.element.selectionStart=this.element.selectionEnd=u),0===this.element.selectionStart&&this.element.selectionEnd===this.element.value.length&&(I.call(this,this.promptMask),e.preventDefault(),this.element.selectionStart=this.element.selectionEnd=l),this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),this.element.value!==p&&B.call(this,e,i)}}function L(e){if(this.mask&&!this.readonly){var t=this.element.value;if(!e.ctrlKey||e.ctrlKey&&"KeyA"!==e.code&&"KeyY"!==e.code&&"KeyZ"!==e.code&&"KeyX"!==e.code&&"KeyC"!==e.code&&"KeyV"!==e.code){this.maskKeyPress=!0;var i=e.key;"Spacebar"===i&&(i=String.fromCharCode(e.keyCode)),i?i&&1===i.length&&(w.call(this,i,e.ctrlKey,e),e.preventDefault()):(this.isIosInvalid=!0,w.call(this,String.fromCharCode(e.keyCode),e.ctrlKey,e),e.preventDefault(),this.isIosInvalid=!1),32===e.keyCode&&" "===i&&" "===this.promptChar&&(this.element.selectionStart=this.element.selectionEnd=this.element.selectionStart-i.length)}this.element.value!==t&&B.call(this,e,t)}}function B(e,i){var s=this.isProtectedOnChange;if(!t.isNullOrUndefined(this.changeEventArgs)&&!this.isInitial){var n={};this.changeEventArgs={value:this.element.value,maskedValue:this.element.value,isInteraction:!1,isInteracted:!1},this.mask&&(this.changeEventArgs.value=p.call(this,this.element)),t.isNullOrUndefined(e)||(this.changeEventArgs.isInteracted=!0,this.changeEventArgs.isInteraction=!0,this.changeEventArgs.event=e),this.isProtectedOnChange=!0,this.value=this.changeEventArgs.value,this.isProtectedOnChange=s,t.merge(n,this.changeEventArgs),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",n)}this.preEleVal=this.element.value,this.prevValue=p.call(this,this.element),t.attributes(this.element,{"aria-valuenow":this.element.value})}function A(e){if(this.mask&&!this.readonly){var i=void 0;if(this.maskKeyPress||229!==e.keyCode)V.call(this);else{var s=void 0;if(1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this.element.value.length>this.promptMask.length){var n=this.element.selectionStart,a=this.element.value.length-this.promptMask.length,r=this.element.value.substring(n-a,n);if(this.undoCollec.length>0){i=this.undoCollec[this.undoCollec.length-1];var l=this.element.selectionStart;s=i.value;var o=i.value.substring(l-a,l);i=this.redoCollec[0],r=r.trim();var h=t.Browser.isAndroid&&""===r;h||o===r||i.value.substring(l-a,l)===r?h&&R.call(this,e,l-1,this.element.selectionEnd-1,r,e.ctrlKey,!1):w.call(this,r,e.ctrlKey,e)}else s=this.promptMask,w.call(this,r,e.ctrlKey,e);this.maskKeyPress=!1,B.call(this,e,s)}}var d=p.call(this,this.element);(0!==this.element.selectionStart||this.promptMask!==this.element.value||""!==d||""===d&&this.value!==d)&&(this.prevValue=d,this.value=d)}else B.call(this,e);if(0===this.element.selectionStart&&0===this.element.selectionEnd){var u=this.element;setTimeout(function(){u.setSelectionRange(0,0)},0)}}function H(e){if(e.length>1&&this.promptMask.length+e.length<this.element.value.length){var t=this.redoCollec[0].value.substring(0,this.redoCollec[0].startIndex)+e+this.redoCollec[0].value.substring(this.redoCollec[0].startIndex,this.redoCollec[0].value.length);I.call(this,t),this.element.selectionStart=this.element.selectionEnd=this.redoCollec[0].startIndex+e.length}this.element.selectionStart=this.element.selectionStart-e.length,this.element.selectionEnd=this.element.selectionEnd-e.length}function N(e){this.maskKeyPress||H.call(this,e)}function w(e,i,s){if(N.call(this,e),!t.isNullOrUndefined(this)&&!t.isNullOrUndefined(e))for(var n,a,r=this.element.selectionStart,l=r,o=!1,h=this.element.value,d=!1,u=!1,c=0;c<e.length;c++){var p=e[c];if(r=this.element.selectionStart,this.maskKeyPress||l!==r||(r+=c),!this.maskKeyPress||r<this.promptMask.length){for(v=r;v<this.promptMask.length;v++)n=this.escapeMaskValue[r],"\\"===this.hiddenMask[r]&&this.hiddenMask[r+1]===e&&(u=!0),(t.isNullOrUndefined(this.regExpCollec[n])&&(t.isNullOrUndefined(this.customCharacters)||!t.isNullOrUndefined(this.customCharacters)&&t.isNullOrUndefined(this.customCharacters[n]))&&this.hiddenMask[r]!==this.promptChar&&"["!==this.customRegExpCollec[r][0]&&"]"!==this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]||this.promptMask[r]!==this.promptChar&&t.isNullOrUndefined(this.customCharacters)||this.promptChar===n&&this.escapeMaskValue===this.mask)&&(this.element.selectionStart=this.element.selectionEnd=r+1,r=this.element.selectionStart,n=this.hiddenMask[r]);if(t.isNullOrUndefined(this.customCharacters)||t.isNullOrUndefined(this.customCharacters[n]))!t.isNullOrUndefined(this.regExpCollec[n])&&p.match(new RegExp(this.regExpCollec[n]))&&this.promptMask[r]===this.promptChar?o=!0:this.promptMask[r]===this.promptChar&&"["===this.customRegExpCollec[r][0]&&"]"===this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]&&p.match(new RegExp(this.customRegExpCollec[r]))&&(o=!0);else for(var m=this.customCharacters[n].split(","),v=0;v<m.length;v++)if(p.match(new RegExp("["+m[v]+"]"))){o=!0;break}if((!this.maskKeyPress||r<this.hiddenMask.length)&&o){if(0===c)if(this.maskKeyPress)this.undoCollec.push({value:h,startIndex:r,endIndex:r});else{var f=this.element.selectionStart,g=this.element.selectionEnd;this.redoCollec.length>0?(a=this.redoCollec[0].value,I.call(this,a),this.undoCollec.push(this.redoCollec[0])):(this.undoCollec.push({value:this.promptMask,startIndex:r,endIndex:r}),a=this.promptMask,I.call(this,a)),this.element.selectionStart=f,this.element.selectionEnd=g}r=this.element.selectionStart,U.call(this,s,r,p,a,u),d=!0,c===e.length-1&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),o=!1}else r=this.element.selectionStart,R.call(this,s,r,l,e,i,d);c!==e.length-1||o||(!t.Browser.isAndroid||t.Browser.isAndroid&&r<this.promptMask.length)&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd})}else 1!==e.length||i||t.isNullOrUndefined(s)||F.call(this)}}function U(e,t,i,s,n){if(this.hiddenMask.length>this.promptMask.length&&(i=M.call(this,i,this.element.value)),!n){var a=this.element.value,r=a.substring(0,t)+i+a.substring(t+1,a.length);I.call(this,r),this.element.selectionStart=this.element.selectionEnd=t+1}}function R(e,i,s,n,a,r){if(!this.maskKeyPress){var l=this.element.value;i>=this.promptMask.length?I.call(this,l.substring(0,i)):(s===i?I.call(this,l.substring(0,i)+l.substring(i+1,l.length)):this.promptMask.length===this.element.value.length?I.call(this,l.substring(0,i)+l.substring(i,l.length)):I.call(this,l.substring(0,s)+l.substring(s+1,l.length)),this.element.selectionStart=this.element.selectionEnd=r||this.element.value[s]!==this.promptChar?i:s),F.call(this)}1!==n.length||a||t.isNullOrUndefined(e)||F.call(this)}function F(){var e=this,i=this.element.parentNode,s=200;i.classList.contains(te)||i.classList.contains(ie)?t.addClass([i],ee):t.addClass([this.element],ee),!0===this.isIosInvalid&&(s=400),t.attributes(this.element,{"aria-invalid":"true"}),setTimeout(function(){e.maskKeyPress||V.call(e)},s)}function V(){var e=this.element.parentNode;t.isNullOrUndefined(e)||t.removeClass([e],ee),t.removeClass([this.element],ee),t.attributes(this.element,{"aria-invalid":"false"})}function M(e,t){var i,s,n=t,a=0;for(s=0;s<this.hiddenMask.length;s++)if("\\"===this.hiddenMask[s]&&(i=n.substring(0,s)+"\\"+n.substring(s,n.length)),">"!==this.hiddenMask[s]&&"<"!==this.hiddenMask[s]&&"|"!==this.hiddenMask[s]||(this.hiddenMask[s]!==n[s]&&(i=n.substring(0,s)+this.hiddenMask[s]+n.substring(s,n.length)),++a),i){if(i[s]===this.promptChar&&s>this.element.selectionStart||this.element.value.indexOf(this.promptChar)<0&&this.element.selectionStart+a===s){a=0;break}n=i}for(;s>=0&&i;){if(0===s||"\\"!==i[s-1]){if(">"===i[s]){e=e.toUpperCase();break}if("<"===i[s]){e=e.toLowerCase();break}if("|"===i[s])break}--s}return e}function D(e){if(this.mask&&void 0!==e&&(void 0===this.prevValue||this.prevValue!==e)){if(this.maskKeyPress=!0,I.call(this,this.promptMask),""===e||null===e&&"Never"===this.floatLabelType&&this.placeholder||(this.element.selectionStart=0,this.element.selectionEnd=0),null!==e)for(var i=0;i<e.length;i++)w.call(this,e[i],!1,null);var s=p.call(this,this.element);this.prevValue=s,this.value=s,B.call(this,null,null),this.maskKeyPress=!1;var n=this.element.parentNode.querySelector(".e-float-text");this.element.value===this.promptMask&&"Auto"===this.floatLabelType&&this.placeholder&&!t.isNullOrUndefined(n)&&n.classList.contains(ne)&&!this.isFocus&&(t.removeClass([n],ne),t.addClass([n],ae),I.call(this,""))}(null===this.mask||""===this.mask&&void 0!==this.value)&&I.call(this,this.value)}function I(i,s){!this.isFocus&&"Auto"===this.floatLabelType&&this.placeholder&&t.isNullOrUndefined(this.value)&&(i="");var n=p.call(this,s||this.element,i);null===n||""===n?(e.Input.setValue(i,s||this.element,this.floatLabelType,!1),this.showClearButton&&this.inputObj.clearButton.classList.add("e-clear-icon-hide")):e.Input.setValue(i,s||this.element,this.floatLabelType,this.showClearButton)}function z(e){var t=q(e);a.call(t);var i=p.call(this,this.element);this.prevValue=i,this.value=i,e.mask&&(l.call(t),r.call(t))}function q(e){t.addClass([e.element],se);var i={element:e.element,mask:e.mask,promptMask:"",hiddenMask:"",escapeMaskValue:"",promptChar:e.promptChar?e.promptChar.length>1?e.promptChar=e.promptChar[0]:e.promptChar:"_",value:e.value?e.value:null,regExpCollec:re,customRegExpCollec:[],customCharacters:e.customCharacters,undoCollec:[],redoCollec:[],maskKeyPress:!1,prevValue:""};return n.call(i),i}function W(e){return p.call(_(e),e.element)}function j(e){return c.call(_(e),e.element)}function _(e){var i;return!t.isNullOrUndefined(e)&&e.element.classList.contains(se)&&(i=q(e)),i}var X={RTL:"e-rtl",DISABLE:"e-disabled",INPUT:"e-input",TEXTAREA:"e-multi-line-input",INPUTGROUP:"e-input-group",FLOATINPUT:"e-float-input",FLOATLINE:"e-float-line",FLOATTEXT:"e-float-text",CLEARICON:"e-clear-icon",CLEARICONHIDE:"e-clear-icon-hide",LABELTOP:"e-label-top",LABELBOTTOM:"e-label-bottom",NOFLOATLABEL:"e-no-float-label",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"};!function(e){function i(e,i){var n=t.isNullOrUndefined(i)?t.createElement:i,a={container:null,buttons:[],clearButton:null};if(q=e.floatLabelType,W=e.bindClearAction,t.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(a.container=y(e,X.INPUTGROUP,X.INPUTCUSTOMTAG,"span",n),e.element.parentNode.insertBefore(a.container,e.element),t.addClass([e.element],X.INPUT),a.container.appendChild(e.element)):h(e,a,n),s(e),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||"TEXTAREA"===e.element.tagName||(P(e.properties.showClearButton,e.element,a,!0,n),a.clearButton.setAttribute("role","button"),a.container.classList.contains(X.FLOATINPUT)&&t.addClass([a.container],X.INPUTGROUP)),!t.isNullOrUndefined(e.buttons)&&"TEXTAREA"!==e.element.tagName)for(var r=0;r<e.buttons.length;r++)a.buttons.push(I(e.buttons[r],a.container,n));return t.isNullOrUndefined(e.element)||"TEXTAREA"!==e.element.tagName||t.addClass([a.container],X.TEXTAREA),z(a.container,e.element),a=u(e,a)}function s(e){n(e.floatLabelType,e.element),e.element.addEventListener("focus",function(){var e=m(this);(e.classList.contains("e-input-group")||e.classList.contains("e-outline")||e.classList.contains("e-filled"))&&e.classList.add("e-input-focus")}),e.element.addEventListener("blur",function(){var e=m(this);(e.classList.contains("e-input-group")||e.classList.contains("e-outline")||e.classList.contains("e-filled"))&&e.classList.remove("e-input-focus")}),e.element.addEventListener("input",function(){n(q,e.element)})}function n(e,i){var s=i.value;""!==s&&!t.isNullOrUndefined(s)&&i.parentElement?i.parentElement.classList.add("e-valid-input"):"Always"!==e&&i.parentElement&&i.parentElement.classList.remove("e-valid-input")}function a(){var e=m(this).getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(e)||(t.addClass([e],X.LABELTOP),e.classList.contains(X.LABELBOTTOM)&&t.removeClass([e],X.LABELBOTTOM))}function r(){var e=m(this);if(e.getElementsByTagName("textarea")[0]?""===e.getElementsByTagName("textarea")[0].value:""===e.getElementsByTagName("input")[0].value){var i=e.getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(i)||(i.classList.contains(X.LABELTOP)&&t.removeClass([i],X.LABELTOP),t.addClass([i],X.LABELBOTTOM))}}function l(e){e.addEventListener("focus",a),e.addEventListener("blur",r)}function o(e){e.removeEventListener("focus",a),e.removeEventListener("blur",r)}function h(e,i,s){var n=t.isNullOrUndefined(s)?t.createElement:s;"Auto"===e.floatLabelType&&l(e.element),t.isNullOrUndefined(i.container)?(i.container=y(e,X.FLOATINPUT,X.FLOATCUSTOMTAG,"div",n),e.element.parentNode.insertBefore(i.container,e.element)):(t.isNullOrUndefined(e.customTag)||i.container.classList.add(X.FLOATCUSTOMTAG),i.container.classList.add(X.FLOATINPUT));var a=n("span",{className:X.FLOATLINE}),r=n("label",{className:X.FLOATTEXT});if(t.isNullOrUndefined(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),t.attributes(e.element,{"aria-labelledby":r.id})),t.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(r.innerText=b(e.element.placeholder),e.element.removeAttribute("placeholder")),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(r.innerText=b(e.properties.placeholder)),r.innerText||i.container.classList.add(X.NOFLOATLABEL),i.container.classList.contains("e-float-icon-left")){var o=i.container.querySelector(".e-input-in-wrap");o.appendChild(e.element),o.appendChild(a),o.appendChild(r)}else i.container.appendChild(e.element),i.container.appendChild(a),i.container.appendChild(r);p(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(X.LABELBOTTOM)&&t.removeClass([r],X.LABELBOTTOM),t.addClass([r],X.LABELTOP)),"Auto"===e.floatLabelType&&(e.element.addEventListener("input",function(t){p(e.element.value,r)}),e.element.addEventListener("blur",function(t){p(e.element.value,r)})),t.isNullOrUndefined(e.element.getAttribute("id"))||r.setAttribute("for",e.element.getAttribute("id"))}function d(e,t){"Always"===e&&t.classList.contains("e-outline")&&t.classList.add("e-valid-input")}function u(e,i){if(!t.isNullOrUndefined(e.properties))for(var s=0,n=Object.keys(e.properties);s<n.length;s++)switch(n[s]){case"cssClass":C(e.properties.cssClass,[i.container]),d(e.floatLabelType,i.container);break;case"enabled":O(e.properties.enabled,e.element,e.floatLabelType,i.container);break;case"enableRtl":x(e.properties.enableRtl,[i.container]);break;case"placeholder":T(e.properties.placeholder,e.element);break;case"readonly":k(e.properties.readonly,e.element)}return i}function c(e,i){e?t.removeClass([i],X.CLEARICONHIDE):t.addClass([i],X.CLEARICONHIDE)}function p(e,i){e?(t.addClass([i],X.LABELTOP),i.classList.contains(X.LABELBOTTOM)&&t.removeClass([i],X.LABELBOTTOM)):(i.classList.contains(X.LABELTOP)&&t.removeClass([i],X.LABELTOP),t.addClass([i],X.LABELBOTTOM))}function m(e){var i=t.isNullOrUndefined(e.parentNode)?e:e.parentNode;return i&&i.classList.contains("e-input-in-wrap")&&(i=i.parentNode),i}function v(e,i,s,n){var a=(t.isNullOrUndefined(n)?t.createElement:n)("span",{className:X.CLEARICON}),r=i.container;return t.isNullOrUndefined(s)?(i.container.classList.contains(X.FLOATINPUT)?i.container.querySelector("."+X.FLOATTEXT):e).insertAdjacentElement("afterend",a):r.appendChild(a),!t.isNullOrUndefined(r)&&r.classList.contains(X.FLOATINPUT)&&t.addClass([r],X.INPUTGROUP),t.addClass([a],X.CLEARICONHIDE),f(e,a,r),a.setAttribute("aria-label","close"),a}function f(e,i,s){(void 0==W||W)&&i.addEventListener("click",function(s){e.classList.contains(X.DISABLE)||e.readOnly||(s.preventDefault(),e!==document.activeElement&&e.focus(),e.value="",t.addClass([i],X.CLEARICONHIDE))}),e.addEventListener("input",function(t){c(e.value,i)}),e.addEventListener("focus",function(t){c(e.value,i)}),e.addEventListener("blur",function(e){setTimeout(function(){t.addClass([i],X.CLEARICONHIDE)},200)})}function g(e,t){if(m(e).classList.contains(X.FLOATINPUT)&&"Auto"===t){var i=m(e).getElementsByClassName("e-float-text")[0];p(e.value,i)}}function y(e,i,s,n,a){var r,l=t.isNullOrUndefined(a)?t.createElement:a;return t.isNullOrUndefined(e.customTag)?r=l(n,{className:i}):(r=l(e.customTag,{className:i})).classList.add(s),r.classList.add("e-control-wrapper"),r}function b(e){var i="";if(!t.isNullOrUndefined(e)&&""!==e){var s=document.createElement("span");s.innerHTML='<input placeholder="'+e+'"/>',i=s.children[0].placeholder}return i}function E(e,i,s,a){if(i.value=e,t.isNullOrUndefined(s)||"Auto"!==s||g(i,s),!t.isNullOrUndefined(a)&&a){var r=m(i);if(!t.isNullOrUndefined(r)){var l=r.getElementsByClassName(X.CLEARICON)[0];t.isNullOrUndefined(l)||(i.value&&r.classList.contains("e-input-focus")?t.removeClass([l],X.CLEARICONHIDE):t.addClass([l],X.CLEARICONHIDE))}}n(s,i)}function C(e,i,s){t.isNullOrUndefined(s)||""===s||t.removeClass(i,s.split(" ")),t.isNullOrUndefined(e)||""===e||t.addClass(i,e.split(" "))}function S(e,i){"number"==typeof e?i.style.width=t.formatUnit(e):"string"==typeof e&&(i.style.width=e.match(/px|%|em/)?e:t.formatUnit(e))}function T(e,i){e=b(e);var s=m(i);s.classList.contains(X.FLOATINPUT)?t.isNullOrUndefined(e)||""===e?(s.classList.add(X.NOFLOATLABEL),s.getElementsByClassName(X.FLOATTEXT)[0].textContent=""):(s.getElementsByClassName(X.FLOATTEXT)[0].textContent=e,s.classList.remove(X.NOFLOATLABEL),i.removeAttribute("placeholder")):t.isNullOrUndefined(e)||""===e?(i.removeAttribute("placeholder"),i.removeAttribute("aria-placeholder")):t.attributes(i,{placeholder:e,"aria-placeholder":e})}function k(e,i,s){e?t.attributes(i,{readonly:""}):i.removeAttribute("readonly"),t.isNullOrUndefined(s)||g(i,s)}function x(e,i){e?t.addClass(i,X.RTL):t.removeClass(i,X.RTL)}function O(e,i,s,n){var a={disabled:"disabled","aria-disabled":"true"},r=!t.isNullOrUndefined(n);e?(i.classList.remove(X.DISABLE),L(a,i),r&&t.removeClass([n],X.DISABLE)):(i.classList.add(X.DISABLE),B(a,i),r&&t.addClass([n],X.DISABLE)),t.isNullOrUndefined(s)||g(i,s)}function P(e,i,s,n,a){var r=t.isNullOrUndefined(a)?t.createElement:a;e?s.clearButton=v(i,s,n,r):(t.remove(s.clearButton),s.clearButton=null)}function L(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=m(t);"disabled"===n&&t.classList.remove(X.DISABLE),"disabled"===n&&a.classList.contains(X.INPUTGROUP)&&a.classList.remove(X.DISABLE),"placeholder"===n&&a.classList.contains(X.FLOATINPUT)?a.getElementsByClassName(X.FLOATTEXT)[0].textContent="":t.removeAttribute(n)}}function B(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=m(t);"disabled"===n&&t.classList.add(X.DISABLE),"disabled"===n&&a.classList.contains(X.INPUTGROUP)&&a.classList.add(X.DISABLE),"placeholder"===n&&a.classList.contains(X.FLOATINPUT)?a.getElementsByClassName(X.FLOATTEXT)[0].textContent=e[n]:t.setAttribute(n,e[n])}}function A(e){var i=e.container;if(!t.isNullOrUndefined(i)&&i.classList.contains(X.FLOATINPUT)){var s=i.querySelector("textarea")?i.querySelector("textarea"):i.querySelector("input"),n=i.querySelector("."+X.FLOATTEXT).textContent,a=null!==i.querySelector(".e-clear-icon");t.detach(i.querySelector("."+X.FLOATLINE)),t.detach(i.querySelector("."+X.FLOATTEXT)),t.classList(i,[X.INPUTGROUP],[X.FLOATINPUT]),o(s),t.attributes(s,{placeholder:n}),s.classList.add(X.INPUT),a||"INPUT"!==s.tagName||s.removeAttribute("required")}}function H(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=t.closest(e,"."+X.INPUTGROUP);if(q=i,"Never"!==i){var l=r.tagName,o={element:e,floatLabelType:i,customTag:l="DIV"!==l&&"SPAN"!==l?l:null,properties:{placeholder:s}},u=r.querySelector(".e-clear-icon"),c={container:r};e.classList.remove(X.INPUT),h(o,c,a);var p=r.classList.contains("e-float-icon-left");if(t.isNullOrUndefined(u)&&(u=p?r.querySelector(".e-input-in-wrap").querySelector(".e-input-group-icon"):r.querySelector(".e-input-group-icon")),t.isNullOrUndefined(u))p&&(u=r.querySelector(".e-input-group-icon")),t.isNullOrUndefined(u)&&r.classList.remove(X.INPUTGROUP);else{var m=r.querySelector("."+X.FLOATLINE),v=r.querySelector("."+X.FLOATTEXT),f=p?r.querySelector(".e-input-in-wrap"):r;f.insertBefore(e,u),f.insertBefore(m,u),f.insertBefore(v,u)}}d(i,e.parentElement)}function N(e,t){for(var i=0;i<t.length;i++)w(e,t[i].container)}function w(e,i,s){var n=[];n.push(s);var a=t.isNullOrUndefined(s)?i.querySelectorAll(".e-input-group-icon"):n;if(e&&a.length>0)for(r=0;r<a.length;r++)a[r].addEventListener("mousedown",R,!1),a[r].addEventListener("mouseup",F,!1);else if(a.length>0)for(var r=0;r<a.length;r++)a[r].removeEventListener("mousedown",R,this),a[r].removeEventListener("mouseup",F,this)}function U(e,t){e.classList.contains("e-disabled")||e.querySelector("input").readOnly||t.classList.add("e-input-btn-ripple")}function R(){for(var e=this,t=this.parentElement;!t.classList.contains("e-input-group");)t=t.parentElement;U(t,e)}function F(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}function V(e,t){var i=t("span",{className:e});return i.classList.add("e-input-group-icon"),i}function M(e,t,i,s,n){var a="string"==typeof t?t.split(","):t;if("append"===e.toLowerCase())for(var r=0,l=a;r<l.length;r++)I(d=l[r],i,n);else for(var o=0,h=a;o<h.length;o++){var d=h[o];D(d,i,s,n)}}function D(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=V(e,a);i.classList.add("e-float-icon-left");var l=i.querySelector(".e-input-in-wrap");if(t.isNullOrUndefined(l)){l=a("span",{className:"e-input-in-wrap"}),s.parentNode.insertBefore(l,s);var o=i.querySelectorAll(s.tagName+" ~ *");l.appendChild(s);for(var h=0;h<o.length;h++)l.appendChild(o[h])}return l.parentNode.insertBefore(r,l),i.classList.contains(X.INPUTGROUP)||i.classList.add(X.INPUTGROUP),w(!0,i,r),r}function I(e,i,s){var n=V(e,t.isNullOrUndefined(s)?t.createElement:s);return i.classList.contains(X.INPUTGROUP)||i.classList.add(X.INPUTGROUP),(i.classList.contains("e-float-icon-left")?i.querySelector(".e-input-in-wrap"):i).appendChild(n),w(!0,i,n),n}function z(e,t){"hidden"===t.type?e.classList.add("e-hidden"):e.classList.contains("e-hidden")&&e.classList.remove("e-hidden")}var q,W=!0;e.createInput=i,e.bindInitialEvent=s,e.wireFloatingEvents=l,e.wireClearBtnEvents=f,e.setValue=E,e.setCssClass=C,e.setWidth=S,e.setPlaceholder=T,e.setReadonly=k,e.setEnableRtl=x,e.setEnabled=O,e.setClearButton=P,e.removeAttributes=L,e.addAttributes=B,e.removeFloating=A,e.addFloating=H,e.setRipple=N,e.addIcon=M,e.prependSpan=D,e.appendSpan=I,e.validateInputType=z}(e.Input||(e.Input={}));var K=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Z=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Y="e-input-group-icon",G="e-spin-up",$=new RegExp("^(-)?(\\d*)$"),J=["title","style","class"],Q=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.isVue=!1,s.preventChange=!1,s.isAngular=!1,s.isDynamicChange=!1,s.numericOptions=e,s}return K(s,i),s.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var e=t.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=t.closest(this.element,"form"),"EJS-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var i=this.createElement("input"),s=0;for(s;s<this.element.attributes.length;s++)"id"!==this.element.attributes[s].nodeName&&(i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML);this.element.hasAttribute("name")&&this.element.removeAttribute("name"),this.element.classList.remove("e-control","e-numerictextbox"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}if(!t.isBlazor()||!this.isServerRendered){t.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off","aria-live":"assertive"});var n={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new t.L10n("numerictextbox",n,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0)}this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.prevValue=this.value,t.isBlazor()&&this.isServerRendered||(this.updateHTMLAttrToElement(),this.checkAttributes(!1),this.formEle&&(this.inputEleValue=this.value)),this.validateMinMax(),this.validateStep(),null!==this.placeholder||t.isBlazor()&&this.isServerRendered||this.updatePlaceholder()},s.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(t.isBlazor()&&this.isServerRendered?(this.container=this.element.parentElement,this.inputWrapper={container:this.container},this.hiddenInput=this.container.querySelector('input[type="hidden"]'),this.showClearButton&&(this.inputWrapper.clearButton=this.container.querySelector(".e-clear-icon"),e.Input.wireClearBtnEvents(this.element,this.inputWrapper.clearButton,this.inputWrapper.container)),this.showSpinButton&&(this.spinDown=this.container.querySelector(".e-spin-down"),this.spinUp=this.container.querySelector("."+G),this.wireSpinBtnEvents()),e.Input.bindInitialEvent({element:this.element,buttons:null,customTag:null,floatLabelType:this.floatLabelType,properties:this.properties})):(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),this.setElementWidth(this.width),this.container.classList.contains("e-input-group")||this.container.classList.add("e-input-group"),this.changeValue(null===this.value||isNaN(this.value)?null:this.strictMode?this.trimValue(this.value):this.value)),this.wireEvents(),t.isBlazor()&&this.isServerRendered||(null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0),(this.element.getAttribute("value")||this.value)&&(this.element.setAttribute("value",this.element.value),this.hiddenInput.setAttribute("value",this.hiddenInput.value))),this.elementPrevValue=this.element.value,this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),this.renderComplete())},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["value","min","max","step","disabled","readonly","style","name","placeholder"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.value||e){var l=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties(t.setValue(n,l,{}),!e)}break;case"min":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.min||e){var o=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===o||isNaN(o)||this.setProperties(t.setValue(n,o,{}),!e)}break;case"max":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.max||e){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===h||isNaN(h)||this.setProperties(t.setValue(n,h,{}),!e)}break;case"step":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.step||e){var d=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===d||isNaN(d)||this.setProperties(t.setValue(n,d,{}),!e)}break;case"style":this.inputStyle=this.element.getAttribute(n);break;case"name":this.inputName=this.element.getAttribute(n);break;default:var u=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));(null!==u&&!isNaN(u)||"value"===n)&&this.setProperties(t.setValue(n,u,{}),!0)}}},s.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},s.prototype.initCultureFunc=function(){this.instance=new t.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==t.getValue("currency",this)&&(t.setValue("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},s.prototype.createWrapper=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.getNumericValidClassList(this.cssClass));var s=e.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:i,enableRtl:this.enableRtl,showClearButton:this.showClearButton,enabled:this.enabled}},this.createElement);this.inputWrapper=s,this.container=s.container,this.container.setAttribute("class","e-control-wrapper e-numeric "+this.container.getAttribute("class")),this.updateHTMLAttrToWrapper(),this.readonly&&t.attributes(this.element,{"aria-readonly":"true"}),this.hiddenInput=this.createElement("input",{attrs:{type:"text",validateHidden:"true",class:"e-numeric-hidden"}}),this.inputName=null!==this.inputName?this.inputName:this.element.id,this.element.removeAttribute("name"),t.attributes(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.container.childNodes[1]),this.updateDataAttribute(!1),null!==this.inputStyle&&t.attributes(this.container,{style:this.inputStyle})},s.prototype.updateDataAttribute=function(e){var t={};if(e)t=this.htmlAttributes;else for(var i=0;i<this.element.attributes.length;i++)t[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name);for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];0===a.indexOf("data")&&this.hiddenInput.setAttribute(a,t[a])}},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];J.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[s])}},s.prototype.updateCssClass=function(t,i){e.Input.setCssClass(this.getNumericValidClassList(t),[this.container],this.getNumericValidClassList(i))},s.prototype.getNumericValidClassList=function(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(J.indexOf(s)>-1)if("class"===s){var n=this.getNumericValidClassList(this.htmlAttributes[s]);""!==n&&t.addClass([this.container],n.split(" "))}else if("style"===s){var a=this.container.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[s]:a+this.htmlAttributes[s],this.container.setAttribute(s,a)}else this.container.setAttribute(s,this.htmlAttributes[s])}},s.prototype.setElementWidth=function(e){t.isNullOrUndefined(e)||("number"==typeof e?this.container.style.width=t.formatUnit(e):"string"==typeof e&&(this.container.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)))},s.prototype.spinBtnCreation=function(){this.spinDown=e.Input.appendSpan(Y+" e-spin-down",this.container,this.createElement),t.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),this.spinUp=e.Input.appendSpan(Y+" "+G,this.container,this.createElement),t.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},s.prototype.validateMinMax=function(){("number"!=typeof this.min||isNaN(this.min))&&this.setProperties({min:-Number.MAX_VALUE},!0),("number"!=typeof this.max||isNaN(this.max))&&this.setProperties({max:Number.MAX_VALUE},!0),null!==this.decimals&&(this.min!==-Number.MAX_VALUE&&this.setProperties({min:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.min))},!0),this.max!==Number.MAX_VALUE&&this.setProperties({max:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.max))},!0)),this.setProperties({min:this.min>this.max?this.max:this.min},!0),t.attributes(this.element,{"aria-valuemin":this.min.toString(),"aria-valuemax":this.max.toString()})},s.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},s.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},s.prototype.action=function(e,t){this.isInteract=!0;var i=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(i,this.step,e)),this.raiseChangeEvent(t)},s.prototype.checkErrorClass=function(){this.isValidState?t.removeClass([this.container],"e-error"):t.addClass([this.container],"e-error"),t.attributes(this.element,{"aria-invalid":this.isValidState?"false":"true"})},s.prototype.bindClearEvent=function(){this.showClearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this)},s.prototype.resetHandler=function(e){e.preventDefault(),this.inputWrapper.clearButton.classList.contains("e-clear-icon-hide")||this.clear(e),this.isInteract=!0,this.raiseChangeEvent(e)},s.prototype.clear=function(e){if(this.setProperties({value:null},!0),this.setElementValue(""),this.hiddenInput.value="",t.closest(this.element,"form")){var i=this.element.nextElementSibling,s=document.createEvent("KeyboardEvent");s.initEvent("keyup",!1,!0),i.dispatchEvent(s)}},s.prototype.resetFormHandler=function(){"EJS-NUMERICTEXTBOX"===this.element.tagName?this.updateValue(null):this.updateValue(this.inputEleValue)},s.prototype.setSpinButton=function(){t.isNullOrUndefined(this.spinDown)||t.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),t.isNullOrUndefined(this.spinUp)||t.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"blur",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"input",this.inputHandler,this),t.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(this.element,"paste",this.pasteHandler,this),this.enabled&&(this.bindClearEvent(),this.formEle&&t.EventHandler.add(this.formEle,"reset",this.resetFormHandler,this))},s.prototype.wireSpinBtnEvents=function(){t.EventHandler.add(this.spinUp,t.Browser.touchStartEvent,this.mouseDownOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchStartEvent,this.mouseDownOnSpinner,this),t.EventHandler.add(this.spinUp,t.Browser.touchEndEvent,this.mouseUpOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchEndEvent,this.mouseUpOnSpinner,this),t.EventHandler.add(this.spinUp,t.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},s.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"blur",this.focusOutHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"input",this.inputHandler),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keypress",this.keyPressHandler),t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(this.element,"paste",this.pasteHandler),this.formEle&&t.EventHandler.remove(this.formEle,"reset",this.resetFormHandler)},s.prototype.unwireSpinBtnEvents=function(){t.EventHandler.remove(this.spinUp,t.Browser.touchStartEvent,this.mouseDownOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchStartEvent,this.mouseDownOnSpinner),t.EventHandler.remove(this.spinUp,t.Browser.touchEndEvent,this.mouseUpOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchEndEvent,this.mouseUpOnSpinner),t.EventHandler.remove(this.spinUp,t.Browser.touchMoveEvent,this.touchMoveOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchMoveEvent,this.touchMoveOnSpinner)},s.prototype.changeHandler=function(e){e.stopPropagation(),this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t,e)},s.prototype.raiseChangeEvent=function(e){if(this.prevValue!==this.value){var i={};this.changeEventArgs={value:this.value,previousValue:this.prevValue,isInteracted:this.isInteract,isInteraction:this.isInteract,event:e},e&&(this.changeEventArgs.event=e),void 0===this.changeEventArgs.event&&(this.changeEventArgs.isInteracted=!1,this.changeEventArgs.isInteraction=!1),t.merge(i,this.changeEventArgs),this.prevValue=this.value,this.isInteract=!1,this.elementPrevValue=this.element.value,this.preventChange=!1,this.trigger("change",i)}},s.prototype.pasteHandler=function(){var e=this;if(this.enabled&&!this.readonly){var t=this.element.value;setTimeout(function(){e.numericRegex().test(e.element.value)||e.setElementValue(t)})}},s.prototype.preventHandler=function(){var e=this,i=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);setTimeout(function(){if(e.element.selectionStart>0){var s=e.element.selectionStart,n=e.element.selectionStart-1,a=e.element.value.split(""),r=t.getNumericObject(e.locale),l=t.getValue("decimal",r).charCodeAt(0);" "===e.element.value[n]&&e.element.selectionStart>0&&!i?(t.isNullOrUndefined(e.prevVal)?e.element.value=e.element.value.trim():0!==n?e.element.value=e.prevVal:0===n&&(e.element.value=e.element.value.trim()),e.element.setSelectionRange(n,n)):isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&45!==e.element.value[e.element.selectionStart-1].charCodeAt(0)?(a.indexOf(e.element.value[e.element.selectionStart-1])!==a.lastIndexOf(e.element.value[e.element.selectionStart-1])&&e.element.value[e.element.selectionStart-1].charCodeAt(0)===l||e.element.value[e.element.selectionStart-1].charCodeAt(0)!==l)&&(e.element.value=e.element.value.substring(0,n)+e.element.value.substring(s,e.element.value.length),e.element.setSelectionRange(n,n),isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&e.element.selectionStart>0&&e.element.value.length&&e.preventHandler()):isNaN(parseFloat(e.element.value[e.element.selectionStart-2]))&&e.element.selectionStart>1&&45!==e.element.value[e.element.selectionStart-2].charCodeAt(0)&&(a.indexOf(e.element.value[e.element.selectionStart-2])!==a.lastIndexOf(e.element.value[e.element.selectionStart-2])&&e.element.value[e.element.selectionStart-2].charCodeAt(0)===l||e.element.value[e.element.selectionStart-2].charCodeAt(0)!==l)&&(e.element.setSelectionRange(n,n),e.nextEle=e.element.value[e.element.selectionStart],e.cursorPosChanged=!0,e.preventHandler()),!0===e.cursorPosChanged&&e.element.value[e.element.selectionStart]===e.nextEle&&isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&(e.element.setSelectionRange(e.element.selectionStart+1,e.element.selectionStart+1),e.cursorPosChanged=!1,e.nextEle=null),""===e.element.value.trim()&&e.element.setSelectionRange(0,0),e.element.selectionStart>0&&45===e.element.value[e.element.selectionStart-1].charCodeAt(0)&&e.element.selectionStart>1&&(t.isNullOrUndefined(e.prevVal)?e.element.value=e.element.value:e.element.value=e.prevVal,e.element.setSelectionRange(e.element.selectionStart,e.element.selectionStart)),e.prevVal=e.element.value}})},s.prototype.keyUpHandler=function(){if(this.enabled&&!this.readonly){!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))&&t.Browser.isDevice&&this.preventHandler();var e=this.instance.getNumberParser({format:"n"})(this.element.value);if(e=null===e||isNaN(e)?null:e,this.hiddenInput.value=e||0===e?e.toString():null,t.closest(this.element,"form")){var i=this.element.nextElementSibling,s=document.createEvent("KeyboardEvent");s.initEvent("keyup",!1,!0),i.dispatchEvent(s)}}},s.prototype.inputHandler=function(e){var i=this;if(this.enabled&&!this.readonly){var s=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);if((navigator.userAgent.toLowerCase().indexOf("firefox")>-1||s)&&t.Browser.isDevice&&this.preventHandler(),this.isAngular&&this.element.value!==t.getValue("decimal",t.getNumericObject(this.locale))&&this.element.value!==t.getValue("minusSign",t.getNumericObject(this.locale))){var n=this.instance.getNumberParser({format:"n"})(this.element.value);n=isNaN(n)?null:n,i.localChange({value:n}),this.preventChange=!0}if(this.isVue){var a=this.instance.getNumberParser({format:"n"})(this.element.value),r=this.instance.getNumberParser({format:"n"})(this.elementPrevValue),l={event:e,value:null===a||isNaN(a)?null:a,previousValue:null===r||isNaN(r)?null:r};this.preventChange=!0,this.elementPrevValue=this.element.value,this.trigger("input",l)}}},s.prototype.keyDownHandler=function(e){if(!this.readonly)switch(e.keyCode){case 38:e.preventDefault(),this.action("increment",e);break;case 40:e.preventDefault(),this.action("decrement",e)}},s.prototype.performAction=function(e,t,i){(null===e||isNaN(e))&&(e=0);var s="increment"===i?e+t:e-t;return s=this.correctRounding(e,t,s),this.strictMode?this.trimValue(s):s},s.prototype.correctRounding=function(e,t,i){var s=new RegExp("[,.](.*)"),n=s.test(e.toString()),a=s.test(t.toString());if(n||a){var r=n?s.exec(e.toString())[0].length:0,l=a?s.exec(t.toString())[0].length:0,o=Math.max(r,l);return e=this.roundValue(i,o)}return i},s.prototype.roundValue=function(e,t){t=t||0;var i=Math.pow(10,t);return e*=i,e=Math.round(e)/i},s.prototype.updateValue=function(e,t){t&&(this.isInteract=!0),null===e||isNaN(e)||this.decimals&&(e=this.roundNumber(e,this.decimals)),this.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.isDynamicChange||this.raiseChangeEvent(t)},s.prototype.updateCurrency=function(e,i){t.setValue(e,i,this.cultureInfo),this.updateValue(this.value)},s.prototype.changeValue=function(e){if(e||0===e){var t=this.getNumberOfDecimals(e);this.setProperties({value:this.roundNumber(e,t)},!0)}else e=null,this.setProperties({value:e},!0);this.modifyText(),this.strictMode||this.validateState()},s.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber(),i=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(i),t.attributes(this.element,{"aria-valuenow":e}),this.hiddenInput.value=this.value.toString(),null!==this.value&&this.serverDecimalSeparator&&(this.hiddenInput.value=this.hiddenInput.value.replace(".",this.serverDecimalSeparator))}else this.setElementValue(""),this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},s.prototype.setElementValue=function(t,i){e.Input.setValue(t,i||this.element,this.floatLabelType,this.showClearButton)},s.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},s.prototype.getNumberOfDecimals=function(e){var i,s=new RegExp("[eE][-+]?([0-9]+)"),n=e.toString();if(s.test(n)){var a=s.exec(n);t.isNullOrUndefined(a)||(n=e.toFixed(Math.min(parseInt(a[1],10),20)))}var r=n.split(".")[1];return i=r&&r.length?r.length:0,null!==this.decimals&&(i=i<this.decimals?i:this.decimals),i},s.prototype.formatNumber=function(){var e=this.getNumberOfDecimals(this.value);return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},s.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},s.prototype.roundNumber=function(e,t){var i=e,s=t||0,n=i.toString().split("e"),a=(i=Math.round(Number(n[0]+"e"+(n[1]?Number(n[1])+s:s)))).toString().split("e");return i=Number(a[0]+"e"+(a[1]?Number(a[1])-s:-s)),Number(i.toFixed(s))},s.prototype.cancelEvent=function(e){return e.preventDefault(),!1},s.prototype.keyPressHandler=function(e){if(!this.enabled||this.readonly)return!0;if(!t.Browser.isDevice&&"11.0"===t.Browser.info.version&&13===e.keyCode){var i=this.instance.getNumberParser({format:"n"})(this.element.value);return this.updateValue(i,e),!0}if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var s=String.fromCharCode(e.which),n=this.element.value;return n=n.substring(0,this.element.selectionStart)+s+n.substring(this.element.selectionEnd),!!this.numericRegex().test(n)||(e.preventDefault(),e.stopPropagation(),!1)},s.prototype.numericRegex=function(){var e=t.getNumericObject(this.locale),i=t.getValue("decimal",e),s="*";return"."===i&&(i="\\"+i),0===this.decimals&&this.validateDecimalOnType?$:(this.decimals&&this.validateDecimalOnType&&(s="{0,"+this.decimals+"}"),new RegExp("^(-)?(((\\d+("+i+"\\d"+s+")?)|("+i+"\\d"+s+")))?$"))},s.prototype.mouseWheel=function(e){e.preventDefault();var t,i=e;i.wheelDelta?t=i.wheelDelta/120:i.detail&&(t=-i.detail/3),t>0?this.action("increment",e):t<0&&this.action("decrement",e),this.cancelEvent(e)},s.prototype.focusHandler=function(e){var i=this;if(this.focusEventArgs={event:e,value:this.value,container:this.container},this.trigger("focus",this.focusEventArgs),this.enabled&&!this.readonly){if(this.isFocused=!0,t.removeClass([this.container],"e-error"),this.prevValue=this.value,this.value||0===this.value){var s=this.formatNumber();if(this.setElementValue(s),!this.isPrevFocused)if(t.Browser.isDevice||"11.0"!==t.Browser.info.version){var n=t.Browser.isDevice&&t.Browser.isIos?600:0;setTimeout(function(){i.element.setSelectionRange(0,s.length)},n)}else this.element.setSelectionRange(0,s.length)}t.Browser.isDevice||t.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},s.prototype.focusOutHandler=function(e){var i=this;if(this.blurEventArgs={event:e,value:this.value,container:this.container},this.trigger("blur",this.blurEventArgs),this.enabled&&!this.readonly){if(this.isPrevFocused){if(e.preventDefault(),t.Browser.isDevice){var s=this.element.value;this.element.focus(),this.isPrevFocused=!1;var n=this.element;setTimeout(function(){i.setElementValue(s,n)},200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var a=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(a),t.Browser.isDevice||t.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}if(t.closest(this.element,"form")){var r=this.element.nextElementSibling,l=document.createEvent("FocusEvent");l.initEvent("focusout",!1,!0),r.dispatchEvent(l)}}},s.prototype.mouseDownOnSpinner=function(e){var i=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){this.getElementData(e);var s=e.currentTarget,n=s.classList.contains(G)?"increment":"decrement";t.EventHandler.add(s,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval(function(){i.isCalled=!0,i.action(n,e)},150),t.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},s.prototype.touchMoveOnSpinner=function(e){var t;if("touchmove"===e.type){var i=e.touches;t=i.length&&document.elementFromPoint(i[0].pageX,i[0].pageY)}else t=document.elementFromPoint(e.clientX,e.clientY);t.classList.contains(Y)||clearInterval(this.timeOut)},s.prototype.mouseUpOnSpinner=function(e){if(this.isPrevFocused&&(this.element.focus(),t.Browser.isDevice||(this.isPrevFocused=!1)),t.Browser.isDevice||e.preventDefault(),this.getElementData(e)){var i=e.currentTarget,s=i.classList.contains(G)?"increment":"decrement";if(t.EventHandler.remove(i,"mouseleave",this.mouseUpClick),this.isCalled||this.action(s,e),this.isCalled=!1,t.EventHandler.remove(document,"mouseup",this.mouseUpClick),t.closest(this.element,"form")){var n=this.element.nextElementSibling,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}}},s.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},s.prototype.floatLabelTypeUpdate=function(){e.Input.removeFloating(this.inputWrapper);var t=this.hiddenInput;this.hiddenInput.remove(),e.Input.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement),this.container.insertBefore(t,this.container.childNodes[1])},s.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,t.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),t.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},s.prototype.increment=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,"increment")),this.raiseChangeEvent()},s.prototype.decrement=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,"decrement")),this.raiseChangeEvent()},s.prototype.destroy=function(){if(this.unwireEvents(),!t.isBlazor()||!this.isServerRendered){t.detach(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),t.detach(this.spinUp),t.detach(this.spinDown));for(var e=["aria-labelledby","role","autocomplete","aria-readonly","autocorrect","aria-disabled","aria-placeholder","autocapitalize","spellcheck","aria-autocomplete","tabindex","aria-valuemin","aria-valuemax","aria-live","aria-valuenow","aria-invalid"],s=0;s<e.length;s++)this.element.removeAttribute(e[s]);this.element.classList.remove("e-input"),this.container.insertAdjacentElement("afterend",this.element),t.detach(this.container),i.prototype.destroy.call(this)}},s.prototype.getText=function(){return this.element.value},s.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.element.focus(),t.addClass([this.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),t.removeClass([this.container],["e-input-focus"]))},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.onPropertyChanged=function(i,s){for(var n=0,a=Object.keys(i);n<a.length;n++){var r=a[n];switch(r){case"width":this.setElementWidth(i.width);break;case"cssClass":this.updateCssClass(i.cssClass,s.cssClass);break;case"enabled":e.Input.setEnabled(i.enabled,this.element);break;case"enableRtl":e.Input.setEnableRtl(i.enableRtl,[this.container]);break;case"readonly":e.Input.setReadonly(i.readonly,this.element),this.readonly?t.attributes(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.updateDataAttribute(!0),this.checkAttributes(!0),e.Input.validateInputType(this.container,this.element);break;case"placeholder":e.Input.setPlaceholder(i.placeholder,this.element);break;case"step":this.step=i.step,this.validateStep();break;case"showSpinButton":this.updateSpinButton(i);break;case"showClearButton":this.updateClearButton(i);break;case"floatLabelType":this.floatLabelType=i.floatLabelType,this.floatLabelTypeUpdate();break;case"value":this.isDynamicChange=(this.isAngular||this.isVue)&&this.preventChange,this.updateValue(i.value),this.isDynamicChange&&(this.preventChange=!1,this.isDynamicChange=!1);break;case"min":case"max":t.setValue(r,t.getValue(r,i),this),this.validateMinMax(),this.updateValue(this.value);break;case"strictMode":this.strictMode=i.strictMode,this.updateValue(this.value),this.validateState();break;case"locale":this.initCultureFunc(),this.l10n.setLocale(this.locale),this.setSpinButton(),this.updatePlaceholder(),e.Input.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":var l=t.getValue(r,i);this.setProperties({currencyCode:l},!0),this.updateCurrency(r,l);break;case"currencyCode":var o=t.getValue(r,i);this.setProperties({currency:o},!0),this.updateCurrency("currency",o);break;case"format":t.setValue(r,t.getValue(r,i),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=i.decimals,this.updateValue(this.value)}}},s.prototype.updateClearButton=function(i){t.isBlazor()?this.showClearButton&&(this.inputWrapper.clearButton=this.container.querySelector(".e-clear-icon"),e.Input.wireClearBtnEvents(this.element,this.inputWrapper.clearButton,this.inputWrapper.container)):(e.Input.setClearButton(i.showClearButton,this.element,this.inputWrapper,void 0,this.createElement),this.bindClearEvent())},s.prototype.updateSpinButton=function(e){t.isBlazor()?this.showSpinButton&&(this.spinDown=this.container.querySelector(".e-spin-down"),this.spinUp=this.container.querySelector("."+G),this.wireSpinBtnEvents()):e.showSpinButton?this.spinBtnCreation():(t.detach(this.spinUp),t.detach(this.spinDown))},s.prototype.getModuleName=function(){return"numerictextbox"},Z([t.Property("")],s.prototype,"cssClass",void 0),Z([t.Property(null)],s.prototype,"value",void 0),Z([t.Property(-Number.MAX_VALUE)],s.prototype,"min",void 0),Z([t.Property(Number.MAX_VALUE)],s.prototype,"max",void 0),Z([t.Property(1)],s.prototype,"step",void 0),Z([t.Property(null)],s.prototype,"width",void 0),Z([t.Property(null)],s.prototype,"placeholder",void 0),Z([t.Property({})],s.prototype,"htmlAttributes",void 0),Z([t.Property(!0)],s.prototype,"showSpinButton",void 0),Z([t.Property(!1)],s.prototype,"readonly",void 0),Z([t.Property(!0)],s.prototype,"enabled",void 0),Z([t.Property(!1)],s.prototype,"showClearButton",void 0),Z([t.Property(!1)],s.prototype,"enablePersistence",void 0),Z([t.Property("n2")],s.prototype,"format",void 0),Z([t.Property(null)],s.prototype,"decimals",void 0),Z([t.Property(null)],s.prototype,"currency",void 0),Z([t.Property(null)],s.prototype,"currencyCode",void 0),Z([t.Property(!0)],s.prototype,"strictMode",void 0),Z([t.Property(!1)],s.prototype,"validateDecimalOnType",void 0),Z([t.Property("Never")],s.prototype,"floatLabelType",void 0),Z([t.Event()],s.prototype,"created",void 0),Z([t.Event()],s.prototype,"destroyed",void 0),Z([t.Event()],s.prototype,"change",void 0),Z([t.Event()],s.prototype,"focus",void 0),Z([t.Event()],s.prototype,"blur",void 0),s=Z([t.NotifyPropertyChanges],s)}(t.Component),ee="e-error",te="e-input-group",ie="e-float-input",se="e-utility-mask",ne="e-label-top",ae="e-label-bottom",re={0:"[0-9]",9:"[0-9 ]","#":"[0-9 +-]",L:"[A-Za-z]","?":"[A-Za-z ]","&":"[^ ]+",C:"[^]+",A:"[A-Za-z0-9]",a:"[A-Za-z0-9 ]"},le=function(){function e(){}return e}(),oe=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),he=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},de=["title","style","class"],ue=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.initInputValue="",s.isAngular=!1,s.preventChange=!1,s.isClicked=!1,s.maskOptions=e,s}return oe(s,i),s.prototype.getModuleName=function(){return"maskedtextbox"},s.prototype.preRender=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.regExpCollec=re,this.customRegExpCollec=[],this.undoCollec=[],this.redoCollec=[],this.changeEventArgs={},this.focusEventArgs={},this.blurEventArgs={},this.maskKeyPress=!1,this.isFocus=!1,this.isInitial=!1,this.isIosInvalid=!1;var e=t.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],["e-control","e-maskedtextbox","e-lib"]),this.angularTagName=null,this.formElement=t.closest(this.element,"form"),"EJS-MASKEDTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;for(var i=this.createElement("input"),s=0;s<this.element.attributes.length;s++)i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML;this.element.hasAttribute("id")&&this.element.removeAttribute("id"),this.element.classList.remove("e-control","e-maskedtextbox"),this.element.classList.add("e-mask-container"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}this.updateHTMLAttrToElement(),this.checkHtmlAttributes(!1),this.formElement&&(this.initInputValue=this.value)},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.render=function(){var e=this;if("input"===this.element.tagName.toLowerCase()){var i=t.isBlazor()&&this.isServerRendered;"Never"===this.floatLabelType&&t.addClass([this.element],"e-input"),this.createWrapper(),this.updateHTMLAttrToWrapper(),""===this.element.name&&this.element.setAttribute("name",this.element.id),this.isInitial=!0,i&&!0===t.Browser.isIE?setTimeout(function(){e.resetMaskedTextBox()}):this.resetMaskedTextBox(),this.isInitial=!1,this.setMaskPlaceholder(!0,!1),this.setWidth(this.width),this.preEleVal=this.element.value,t.Browser.isDevice||"11.0"!==t.Browser.info.version&&"edge"!==t.Browser.info.name||this.element.blur(),t.Browser.isDevice&&t.Browser.isIos&&this.element.blur(),(this.element.getAttribute("value")||this.value)&&this.element.setAttribute("value",this.element.value),this.renderComplete()}},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];de.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[s])}},s.prototype.updateCssClass=function(t,i){e.Input.setCssClass(this.getValidClassList(t),[this.inputObj.container],this.getValidClassList(i))},s.prototype.getValidClassList=function(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(de.indexOf(s)>-1)if("class"===s){var n=this.htmlAttributes[s].replace(/\s+/g," ").trim();""!==n&&t.addClass([this.inputObj.container],n.split(" "))}else if("style"===s){var a=this.inputObj.container.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[s]:a+this.htmlAttributes[s],this.inputObj.container.setAttribute(s,a)}else this.inputObj.container.setAttribute(s,this.htmlAttributes[s])}},s.prototype.resetMaskedTextBox=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.customRegExpCollec=[],this.undoCollec=[],this.redoCollec=[],this.promptChar.length>1&&(this.promptChar=this.promptChar[0]),n.call(this),a.call(this),(null===this.mask||""===this.mask&&void 0!==this.value)&&I.call(this,this.value);var e=p.call(this,this.element);this.prevValue=e,this.value=e,this.isInitial||l.call(this),r.call(this)},s.prototype.setMaskPlaceholder=function(t,i){(i||this.placeholder)&&(e.Input.setPlaceholder(this.placeholder,this.element),(this.element.value===this.promptMask&&t&&"Always"!==this.floatLabelType||this.element.value===this.promptMask&&"Never"===this.floatLabelType)&&I.call(this,""))},s.prototype.setWidth=function(e){if(!t.isNullOrUndefined(e))if("number"==typeof e)this.inputObj.container.style.width=t.formatUnit(e),this.element.style.width=t.formatUnit(e);else if("string"==typeof e){var i=e.match(/px|%|em/)?e:t.formatUnit(e);this.inputObj.container.style.width=i,this.element.style.width=i}},s.prototype.checkHtmlAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"placeholder":(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"disabled":if(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"value":(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.value||e)&&this.setProperties({value:this.element.value},!e);break;case"readonly":if(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}}}},s.prototype.createWrapper=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.getValidClassList(this.cssClass)),this.inputObj=e.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{enableRtl:this.enableRtl,cssClass:i,enabled:this.enabled,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}},this.createElement),this.inputObj.container.setAttribute("class","e-control-wrapper e-mask "+this.inputObj.container.getAttribute("class"))},s.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);s<n.length;s++)switch(n[s]){case"value":D.call(this,this.value),this.placeholder&&this.setMaskPlaceholder(!1,!1);break;case"placeholder":this.setMaskPlaceholder(!0,!0);break;case"width":this.setWidth(t.width);break;case"cssClass":this.updateCssClass(t.cssClass,i.cssClass);break;case"enabled":e.Input.setEnabled(t.enabled,this.element,this.floatLabelType,this.inputObj.container);break;case"readonly":e.Input.setReadonly(t.readonly,this.element);break;case"enableRtl":e.Input.setEnableRtl(t.enableRtl,[this.inputObj.container]);break;case"customCharacters":this.customCharacters=t.customCharacters,this.resetMaskedTextBox();break;case"showClearButton":e.Input.setClearButton(t.showClearButton,this.element,this.inputObj,void 0,this.createElement),o.call(this);break;case"floatLabelType":this.floatLabelType=t.floatLabelType,e.Input.removeFloating(this.inputObj),e.Input.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement);break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkHtmlAttributes(!0);break;case"mask":var a=this.value;this.mask=t.mask,this.updateValue(a);break;case"promptChar":t.promptChar.length>1&&(t.promptChar=t.promptChar[0]),t.promptChar?this.promptChar=t.promptChar:this.promptChar="_";var r=this.element.value.replace(new RegExp("["+i.promptChar+"]","g"),this.promptChar);this.promptMask===this.element.value&&(r=this.promptMask.replace(new RegExp("["+i.promptChar+"]","g"),this.promptChar)),this.promptMask=this.promptMask.replace(new RegExp("["+i.promptChar+"]","g"),this.promptChar),this.undoCollec=this.redoCollec=[],I.call(this,r)}this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange},s.prototype.updateValue=function(e){this.resetMaskedTextBox(),D.call(this,e)},s.prototype.getMaskedValue=function(){return c.call(this,this.element)},s.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.element.focus(),t.addClass([this.inputObj.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),t.removeClass([this.inputObj.container],["e-input-focus"]))},s.prototype.destroy=function(){l.call(this);for(var e=["aria-labelledby","role","autocomplete","aria-readonly","autocorrect","aria-disabled","aria-placeholder","autocapitalize","spellcheck","aria-autocomplete","aria-live","aria-valuenow","aria-invalid"],s=0;s<e.length;s++)this.element.removeAttribute(e[s]);this.element.classList.remove("e-input"),this.inputObj.container.insertAdjacentElement("afterend",this.element),t.detach(this.inputObj.container),i.prototype.destroy.call(this)},he([t.Property(null)],s.prototype,"cssClass",void 0),he([t.Property(null)],s.prototype,"width",void 0),he([t.Property(null)],s.prototype,"placeholder",void 0),he([t.Property("Never")],s.prototype,"floatLabelType",void 0),he([t.Property({})],s.prototype,"htmlAttributes",void 0),he([t.Property(!0)],s.prototype,"enabled",void 0),he([t.Property(!1)],s.prototype,"readonly",void 0),he([t.Property(!1)],s.prototype,"showClearButton",void 0),he([t.Property(!1)],s.prototype,"enablePersistence",void 0),he([t.Property(null)],s.prototype,"mask",void 0),he([t.Property("_")],s.prototype,"promptChar",void 0),he([t.Property(null)],s.prototype,"value",void 0),he([t.Property(null)],s.prototype,"customCharacters",void 0),he([t.Event()],s.prototype,"created",void 0),he([t.Event()],s.prototype,"destroyed",void 0),he([t.Event()],s.prototype,"change",void 0),he([t.Event()],s.prototype,"focus",void 0),he([t.Event()],s.prototype,"blur",void 0),s=he([t.NotifyPropertyChanges],s)}(t.Component),ce=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),pe=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},me=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ce(i,e),pe([t.Property("None")],i.prototype,"placement",void 0),pe([t.Property(10)],i.prototype,"largeStep",void 0),pe([t.Property(1)],i.prototype,"smallStep",void 0),pe([t.Property(!1)],i.prototype,"showSmallTicks",void 0),pe([t.Property(null)],i.prototype,"format",void 0),i}(t.ChildProperty),ve=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ce(i,e),pe([t.Property(null)],i.prototype,"color",void 0),pe([t.Property(null)],i.prototype,"start",void 0),pe([t.Property(null)],i.prototype,"end",void 0),i}(t.ChildProperty),fe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ce(i,e),pe([t.Property(!1)],i.prototype,"enabled",void 0),pe([t.Property(null)],i.prototype,"minStart",void 0),pe([t.Property(null)],i.prototype,"minEnd",void 0),pe([t.Property(null)],i.prototype,"maxStart",void 0),pe([t.Property(null)],i.prototype,"maxEnd",void 0),pe([t.Property(!1)],i.prototype,"startHandleFixed",void 0),pe([t.Property(!1)],i.prototype,"endHandleFixed",void 0),i}(t.ChildProperty),ge=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ce(i,e),pe([t.Property("")],i.prototype,"cssClass",void 0),pe([t.Property("Before")],i.prototype,"placement",void 0),pe([t.Property("Focus")],i.prototype,"showOn",void 0),pe([t.Property(!1)],i.prototype,"isVisible",void 0),pe([t.Property(null)],i.prototype,"format",void 0),i}(t.ChildProperty),ye={root:"e-slider",rtl:"e-rtl",sliderHiddenInput:"e-slider-input",controlWrapper:"e-control-wrapper",sliderHandle:"e-handle",rangeBar:"e-range",sliderButton:"e-slider-button",firstButton:"e-first-button",secondButton:"e-second-button",scale:"e-scale",tick:"e-tick",large:"e-large",tickValue:"e-tick-value",sliderTooltip:"e-slider-tooltip",sliderHover:"e-slider-hover",sliderFirstHandle:"e-handle-first",sliderSecondHandle:"e-handle-second",sliderDisabled:"e-disabled",sliderContainer:"e-slider-container",horizontalTooltipBefore:"e-slider-horizontal-before",horizontalTooltipAfter:"e-slider-horizontal-after",verticalTooltipBefore:"e-slider-vertical-before",verticalTooltipAfter:"e-slider-vertical-after",materialTooltip:"e-material-tooltip",materialTooltipOpen:"e-material-tooltip-open",materialTooltipActive:"e-tooltip-active",materialSlider:"e-material-slider",sliderTrack:"e-slider-track",sliderHorizantalColor:"e-slider-horizantal-color",sliderVerticalColor:"e-slider-vertical-color",sliderHandleFocused:"e-handle-focused",verticalSlider:"e-vertical",horizontalSlider:"e-horizontal",sliderHandleStart:"e-handle-start",sliderTooltipStart:"e-material-tooltip-start",sliderTabHandle:"e-tab-handle",sliderButtonIcon:"e-button-icon",sliderSmallSize:"e-small-size",sliderTickPosition:"e-tick-pos",sliderFirstTick:"e-first-tick",sliderLastTick:"e-last-tick",sliderButtonClass:"e-slider-btn",sliderTooltipWrapper:"e-tooltip-wrap",sliderTabTrack:"e-tab-track",sliderTabRange:"e-tab-range",sliderActiveHandle:"e-handle-active",sliderMaterialHandle:"e-material-handle",sliderMaterialRange:"e-material-range",sliderMaterialDefault:"e-material-default",materialTooltipShow:"e-material-tooltip-show",materialTooltipHide:"e-material-tooltip-hide",readonly:"e-read-only",limits:"e-limits",limitBarDefault:"e-limit-bar",limitBarFirst:"e-limit-first",limitBarSecond:"e-limit-second",dragHorizontal:"e-drag-horizontal",dragVertical:"e-drag-vertical"},be=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.horDir="left",s.verDir="bottom",s.transition={handle:"left .4s cubic-bezier(.25, .8, .25, 1), right .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1) , bottom .4s cubic-bezier(.25, .8, .25, 1)",rangeBar:"all .4s cubic-bezier(.25, .8, .25, 1)"},s.transitionOnMaterialTooltip={handle:"left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, top 1ms ease-out",rangeBar:"left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, width 1ms ease-out, height 1ms ease-out"},s.scaleTransform="transform .4s cubic-bezier(.25, .8, .25, 1)",s.customAriaText=null,s.drag=!0,s.isDragComplete=!1,s.initialTooltip=!0,s}return ce(s,e),s.prototype.preRender=function(){var e={incrementTitle:"Increase",decrementTitle:"Decrease"};this.l10n=new t.L10n("slider",e,this.locale),this.isElementFocused=!1,this.tickElementCollection=[],this.tooltipFormatInfo={},this.ticksFormatInfo={},this.initCultureInfo(),this.initCultureFunc(),this.formChecker()},s.prototype.formChecker=function(){var e=t.closest(this.element,"form");e?(this.isForm=!0,t.isNullOrUndefined(this.formResetValue)||this.setProperties({value:this.formResetValue},!0),this.formResetValue=this.value,"Range"!==this.type||!t.isNullOrUndefined(this.formResetValue)&&"object"==typeof this.formResetValue?t.isNullOrUndefined(this.formResetValue)&&(this.formResetValue=parseFloat(t.formatUnit(this.min))):this.formResetValue=[parseFloat(t.formatUnit(this.min)),parseFloat(t.formatUnit(this.max))],this.formElement=e):this.isForm=!1},s.prototype.initCultureFunc=function(){this.internationalization=new t.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.tooltipFormatInfo.format=t.isNullOrUndefined(this.tooltip.format)?null:this.tooltip.format,this.ticksFormatInfo.format=t.isNullOrUndefined(this.ticks.format)?null:this.ticks.format},s.prototype.formatString=function(e,t){var i=null,s=null;if(e||0===e){i=this.formatNumber(e);var n=this.numberOfDecimals(e);s=this.internationalization.getNumberFormat(t)(this.makeRoundNumber(e,n))}return{elementVal:i,formatString:s}},s.prototype.formatNumber=function(e){var t=this.numberOfDecimals(e);return this.internationalization.getNumberFormat({maximumFractionDigits:t,minimumFractionDigits:t,useGrouping:!1})(e)},s.prototype.numberOfDecimals=function(e){var t=e.toString().split(".")[1];return t&&t.length?t.length:0},s.prototype.makeRoundNumber=function(e,t){var i=t||0;return Number(e.toFixed(i))},s.prototype.fractionalToInteger=function(e){e=0===this.numberOfDecimals(e)?Number(e).toFixed(this.noOfDecimals):e;for(var t=1,i=0;i<this.noOfDecimals;i++)t*=10;return e=Number((e*t).toFixed(0))},s.prototype.render=function(){t.isBlazor()&&this.isServerRendered||this.initialize(),this.initRender(),this.wireEvents(),this.setZindex(),this.renderComplete()},s.prototype.initialize=function(){t.addClass([this.element],ye.root),this.setCSSClass()},s.prototype.setElementWidth=function(e){t.isNullOrUndefined(e)||("number"==typeof e?this.sliderContainer.style.width=t.formatUnit(e):"string"==typeof e&&(this.sliderContainer.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)))},s.prototype.setCSSClass=function(e){e&&t.removeClass([this.element],e.split(" ")),this.cssClass&&t.addClass([this.element],this.cssClass.split(" "))},s.prototype.setEnabled=function(){this.enabled?(t.removeClass([this.sliderContainer],[ye.sliderDisabled]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.remove(ye.sliderDisabled),this.wireEvents()):(t.addClass([this.sliderContainer],[ye.sliderDisabled]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.add(ye.sliderDisabled),this.unwireEvents())},s.prototype.getTheme=function(e){return window.getComputedStyle(e,":after").getPropertyValue("content").replace(/['"]+/g,"")},s.prototype.initRender=function(){t.isBlazor()&&this.isServerRendered?(this.sliderContainer=this.element.parentElement,this.sliderTrack=this.element.querySelector(".e-slider-track"),this.hiddenInput=this.element.parentElement.querySelector(".e-slider-input")):(this.sliderContainer=this.createElement("div",{className:ye.sliderContainer+" "+ye.controlWrapper}),this.element.parentNode.insertBefore(this.sliderContainer,this.element),this.sliderContainer.appendChild(this.element),this.sliderTrack=this.createElement("div",{className:ye.sliderTrack}),this.element.appendChild(this.sliderTrack)),this.setElementWidth(this.width),this.element.tabIndex=-1,this.getThemeInitialization(),this.setHandler(),this.createRangeBar(),this.limits.enabled&&this.createLimitBar(),t.isBlazor()&&this.isServerRendered||(this.setOrientClass(),this.hiddenInput=this.createElement("input",{attrs:{type:"hidden",value:t.isNullOrUndefined(this.value)?this.min.toString():this.value.toString(),name:this.element.getAttribute("name")||this.element.getAttribute("id")||"_"+(1e3*Math.random()).toFixed(0)+"slider",class:ye.sliderHiddenInput}}),this.hiddenInput.tabIndex=-1,this.sliderContainer.appendChild(this.hiddenInput)),this.showButtons&&this.setButtons(),this.setEnableRTL(),"Range"===this.type?this.rangeValueUpdate():this.value=t.isNullOrUndefined(this.value)?parseFloat(t.formatUnit(this.min.toString())):this.value,this.previousVal="Range"!==this.type?this.checkHandleValue(parseFloat(t.formatUnit(this.value.toString()))):[this.checkHandleValue(parseFloat(t.formatUnit(this.value[0].toString()))),this.checkHandleValue(parseFloat(t.formatUnit(this.value[1].toString())))],this.previousChanged=this.previousVal,t.isNullOrUndefined(this.element.hasAttribute("name"))||this.element.removeAttribute("name"),this.setValue(),this.limits.enabled&&this.setLimitBar(),"None"!==this.ticks.placement&&this.renderScale(),this.tooltip.isVisible&&this.renderTooltip(),t.isBlazor()&&this.isServerRendered||(this.enabled?t.removeClass([this.sliderContainer],[ye.sliderDisabled]):t.addClass([this.sliderContainer],[ye.sliderDisabled]),this.readonly?t.addClass([this.sliderContainer],[ye.readonly]):t.removeClass([this.sliderContainer],[ye.readonly]))},s.prototype.getThemeInitialization=function(){this.isMaterial="material"===this.getTheme(this.sliderContainer)||"material-dark"===this.getTheme(this.sliderContainer),this.isBootstrap="bootstrap"===this.getTheme(this.sliderContainer)||"bootstrap-dark"===this.getTheme(this.sliderContainer),this.isBootstrap4="bootstrap4"===this.getTheme(this.sliderContainer),this.isTailwind="tailwind"===this.getTheme(this.sliderContainer)||"tailwind-dark"===this.getTheme(this.sliderContainer),this.isMaterialTooltip=this.isMaterial&&"Range"!==this.type&&this.tooltip.isVisible},s.prototype.createRangeBar=function(){"Default"!==this.type&&(this.rangeBar=this.createElement("div",{attrs:{class:ye.rangeBar}}),this.element.appendChild(this.rangeBar),this.drag&&"Range"===this.type&&("Horizontal"===this.orientation?this.rangeBar.classList.add(ye.dragHorizontal):this.rangeBar.classList.add(ye.dragVertical)))},s.prototype.createLimitBar=function(){if(t.isBlazor()&&this.isServerRendered)this.limitBarFirst=this.element.querySelectorAll(".e-limits")[0],"Range"===this.type&&(this.limitBarSecond=this.element.querySelectorAll(".e-limit-second")[0]);else{var e="Range"!==this.type?ye.limitBarDefault:ye.limitBarFirst;e+=" "+ye.limits,this.limitBarFirst=this.createElement("div",{attrs:{class:e}}),this.element.appendChild(this.limitBarFirst),"Range"===this.type&&(this.limitBarSecond=this.createElement("div",{attrs:{class:ye.limitBarSecond+" "+ye.limits}}),this.element.appendChild(this.limitBarSecond))}},s.prototype.setOrientClass=function(){"Vertical"!==this.orientation?(this.sliderContainer.classList.remove(ye.verticalSlider),this.sliderContainer.classList.add(ye.horizontalSlider),this.firstHandle.setAttribute("aria-orientation","horizontal"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","horizontal")):(this.sliderContainer.classList.remove(ye.horizontalSlider),this.sliderContainer.classList.add(ye.verticalSlider),this.firstHandle.setAttribute("aria-orientation","vertical"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","vertical"))},s.prototype.setAriaAttributes=function(e){var i=this,s=this.min,n=this.max;!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(s=this.customValues[0],n=this.customValues[this.customValues.length-1]),"Range"!==this.type?t.attributes(e,{"aria-valuemin":s.toString(),"aria-valuemax":n.toString()}):(!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0?[[s.toString(),this.customValues[this.value[1]].toString()],[this.customValues[this.value[0]].toString(),n.toString()]]:[[s.toString(),this.value[1].toString()],[this.value[0].toString(),n.toString()]]).forEach(function(e,s){var n=0===s?i.firstHandle:i.secondHandle;n&&t.attributes(n,{"aria-valuemin":e[0],"aria-valuemax":e[1]})})},s.prototype.createSecondHandle=function(){t.isBlazor()&&this.isServerRendered?this.secondHandle=this.element.querySelector(".e-handle-second"):(this.secondHandle=this.createElement("div",{attrs:{class:ye.sliderHandle,role:"slider",tabIndex:"0"}}),this.secondHandle.classList.add(ye.sliderSecondHandle),this.element.appendChild(this.secondHandle))},s.prototype.createFirstHandle=function(){t.isBlazor()&&this.isServerRendered?this.firstHandle=this.element.querySelector(".e-handle-first"):(this.firstHandle=this.createElement("div",{attrs:{class:ye.sliderHandle,role:"slider",tabIndex:"0"}}),this.firstHandle.classList.add(ye.sliderFirstHandle),this.element.appendChild(this.firstHandle)),this.isMaterialTooltip&&(this.materialHandle=this.createElement("div",{attrs:{class:ye.sliderHandle+" "+ye.sliderMaterialHandle}}),this.element.appendChild(this.materialHandle))},s.prototype.wireFirstHandleEvt=function(e){e?(t.EventHandler.remove(this.firstHandle,"mousedown touchstart",this.handleFocus),t.EventHandler.remove(this.firstHandle,"transitionend",this.transitionEnd),t.EventHandler.remove(this.firstHandle,"mouseenter touchenter",this.handleOver),t.EventHandler.remove(this.firstHandle,"mouseleave touchend",this.handleLeave)):(t.EventHandler.add(this.firstHandle,"mousedown touchstart",this.handleFocus,this),t.EventHandler.add(this.firstHandle,"transitionend",this.transitionEnd,this),t.EventHandler.add(this.firstHandle,"mouseenter touchenter",this.handleOver,this),t.EventHandler.add(this.firstHandle,"mouseleave touchend",this.handleLeave,this))},s.prototype.wireSecondHandleEvt=function(e){e?(t.EventHandler.remove(this.secondHandle,"mousedown touchstart",this.handleFocus),t.EventHandler.remove(this.secondHandle,"transitionend",this.transitionEnd),t.EventHandler.remove(this.secondHandle,"mouseenter touchenter",this.handleOver),t.EventHandler.remove(this.secondHandle,"mouseleave touchend",this.handleLeave)):(t.EventHandler.add(this.secondHandle,"mousedown touchstart",this.handleFocus,this),t.EventHandler.add(this.secondHandle,"transitionend",this.transitionEnd,this),t.EventHandler.add(this.secondHandle,"mouseenter touchenter",this.handleOver,this),t.EventHandler.add(this.secondHandle,"mouseleave touchend",this.handleLeave,this))},s.prototype.handleStart=function(){"Range"!==this.type&&(this.firstHandle.classList[0===this.handlePos1?"add":"remove"](ye.sliderHandleStart),this.isMaterialTooltip&&(this.materialHandle.classList[0===this.handlePos1?"add":"remove"](ye.sliderHandleStart),this.tooltipElement&&this.tooltipElement.classList[0===this.handlePos1?"add":"remove"](ye.sliderTooltipStart)))},s.prototype.transitionEnd=function(e){"transform"!==e.propertyName&&(this.handleStart(),this.getHandle().style.transition="none","Default"!==this.type&&(this.rangeBar.style.transition="none"),this.isMaterial&&this.tooltip.isVisible&&"Default"===this.type&&(this.tooltipElement.style.transition=this.transition.handle),this.tooltipToggle(this.getHandle()),this.closeTooltip())},s.prototype.handleFocusOut=function(){this.firstHandle.classList.contains(ye.sliderHandleFocused)&&this.firstHandle.classList.remove(ye.sliderHandleFocused),"Range"===this.type&&this.secondHandle.classList.contains(ye.sliderHandleFocused)&&this.secondHandle.classList.remove(ye.sliderHandleFocused)},s.prototype.handleFocus=function(e){this.focusSliderElement(),this.sliderBarClick(e),e.currentTarget===this.firstHandle?this.firstHandle.classList.add(ye.sliderHandleFocused):this.secondHandle.classList.add(ye.sliderHandleFocused),t.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),t.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},s.prototype.handleOver=function(e){this.tooltip.isVisible&&"Hover"===this.tooltip.showOn&&this.tooltipToggle(e.currentTarget),"Default"===this.type&&this.tooltipToggle(this.getHandle())},s.prototype.handleLeave=function(e){!this.tooltip.isVisible||"Hover"!==this.tooltip.showOn||e.currentTarget.classList.contains(ye.sliderHandleFocused)||e.currentTarget.classList.contains(ye.sliderTabHandle)||this.closeTooltip()},s.prototype.setHandler=function(){this.min>this.max&&(this.min=this.max),this.createFirstHandle(),"Range"===this.type&&this.createSecondHandle()},s.prototype.setEnableRTL=function(){if(!t.isBlazor()||!this.isServerRendered){this.enableRtl&&"Vertical"!==this.orientation?t.addClass([this.sliderContainer],ye.rtl):t.removeClass([this.sliderContainer],ye.rtl);var e="Vertical"!==this.orientation?this.horDir:this.verDir;this.enableRtl?(this.horDir="right",this.verDir="bottom"):(this.horDir="left",this.verDir="bottom"),e!==("Vertical"!==this.orientation?this.horDir:this.verDir)&&"Horizontal"===this.orientation&&(t.setStyleAttribute(this.firstHandle,{right:"",left:"auto"}),"Range"===this.type&&t.setStyleAttribute(this.secondHandle,{top:"",left:"auto"}))}this.setBarColor()},s.prototype.tooltipValue=function(){var e,i=this,s={value:this.value,text:""};this.initialTooltip&&(this.initialTooltip=!1,t.isBlazor()&&this.isServerRendered?s.text=this.formatContent(this.tooltipFormatInfo,!1):(this.setTooltipContent(),s.text=e=this.tooltipObj.content),this.trigger("tooltipChange",s,function(t){i.addTooltipClass(t.text),e!==t.text&&(i.customAriaText=t.text,i.tooltipObj.content=t.text,i.setAriaAttrValue(i.firstHandle),"Range"===i.type&&i.setAriaAttrValue(i.secondHandle))}),this.isMaterialTooltip&&this.setPreviousVal("change",this.value))},s.prototype.setTooltipContent=function(){var e;e=this.formatContent(this.tooltipFormatInfo,!1),this.tooltipObj.content=e},s.prototype.formatContent=function(e,i){var s="",n=this.handleVal1,a=this.handleVal2;return!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(n=this.customValues[this.handleVal1],a=this.customValues[this.handleVal2]),i?("Range"===this.type?s=this.enableRtl&&"Vertical"!==this.orientation?t.isNullOrUndefined(this.tooltip)||t.isNullOrUndefined(this.tooltip.format)?a.toString()+" - "+n.toString():this.formatString(a,e).elementVal+" - "+this.formatString(n,e).elementVal:t.isNullOrUndefined(this.tooltip)||t.isNullOrUndefined(this.tooltip.format)?n.toString()+" - "+a.toString():this.formatString(n,e).elementVal+" - "+this.formatString(a,e).elementVal:t.isNullOrUndefined(n)||(s=t.isNullOrUndefined(this.tooltip)||t.isNullOrUndefined(this.tooltip.format)?n.toString():this.formatString(n,e).elementVal),s):("Range"===this.type?s=this.enableRtl&&"Vertical"!==this.orientation?t.isNullOrUndefined(e.format)?a.toString()+" - "+n.toString():this.formatString(a,e).formatString+" - "+this.formatString(n,e).formatString:t.isNullOrUndefined(e.format)?n.toString()+" - "+a.toString():this.formatString(n,e).formatString+" - "+this.formatString(a,e).formatString:t.isNullOrUndefined(n)||(s=t.isNullOrUndefined(e.format)?n.toString():this.formatString(n,e).formatString),s)},s.prototype.addTooltipClass=function(e){if(this.isMaterialTooltip){var t=e.toString().length;if(this.tooltipElement){i=t>4?{oldCss:ye.sliderMaterialDefault,newCss:ye.sliderMaterialRange}:{oldCss:ye.sliderMaterialRange,newCss:ye.sliderMaterialDefault};this.tooltipElement.classList.remove(i.oldCss),this.tooltipElement.classList.contains(i.newCss)||(this.tooltipElement.classList.add(i.newCss),this.tooltipElement.style.transform=t>4?"scale(1)":this.getTooltipTransformProperties(this.previousTooltipClass).rotate)}else{var i=t>4?ye.sliderMaterialRange:ye.sliderMaterialDefault;this.tooltipObj.cssClass=ye.sliderTooltip+" "+i}}},s.prototype.tooltipPlacement=function(){return"Horizontal"===this.orientation?"Before"===this.tooltip.placement?"TopCenter":"BottomCenter":"Before"===this.tooltip.placement?"LeftCenter":"RightCenter"},s.prototype.tooltipBeforeOpen=function(e){this.tooltipElement=e.element,this.tooltip.cssClass&&t.addClass([this.tooltipElement],this.tooltip.cssClass.split(" ").filter(function(e){return e})),e.target.removeAttribute("aria-describedby"),this.isMaterialTooltip&&(this.tooltipElement.firstElementChild.classList.add(ye.materialTooltipHide),this.handleStart(),this.setTooltipTransform())},s.prototype.tooltipCollision=function(e){if(this.isBootstrap||this.isBootstrap4||this.isMaterial&&!this.isMaterialTooltip){var t=this.isBootstrap4?3:6;switch(e){case"TopCenter":this.tooltipObj.setProperties({offsetY:-t},!1);break;case"BottomCenter":this.tooltipObj.setProperties({offsetY:t},!1);break;case"LeftCenter":this.tooltipObj.setProperties({offsetX:-t},!1);break;case"RightCenter":this.tooltipObj.setProperties({offsetX:t},!1)}}},s.prototype.materialTooltipEventCallBack=function(e){this.sliderBarClick(e),t.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),t.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},s.prototype.wireMaterialTooltipEvent=function(e){this.isMaterialTooltip&&(e?t.EventHandler.remove(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack):t.EventHandler.add(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack,this))},s.prototype.tooltipPositionCalculation=function(e){var t;switch(e){case"TopCenter":t=ye.horizontalTooltipBefore;break;case"BottomCenter":t=ye.horizontalTooltipAfter;break;case"LeftCenter":t=ye.verticalTooltipBefore;break;case"RightCenter":t=ye.verticalTooltipAfter}return t},s.prototype.getTooltipTransformProperties=function(e){var t;if(this.tooltipElement){var i="Horizontal"===this.orientation?this.tooltipElement.clientHeight+14-this.tooltipElement.clientHeight/2:this.tooltipElement.clientWidth+14-this.tooltipElement.clientWidth/2;t="Horizontal"===this.orientation?e===ye.horizontalTooltipBefore?{rotate:"rotate(45deg)",translate:"translateY("+i+"px)"}:{rotate:"rotate(225deg)",translate:"translateY("+-i+"px)"}:e===ye.verticalTooltipBefore?{rotate:"rotate(-45deg)",translate:"translateX("+i+"px)"}:{rotate:"rotate(-225deg)",translate:"translateX("+-i+"px)"}}return t},s.prototype.openMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){this.refreshTooltip(this.firstHandle);var t=this.tooltipElement.firstElementChild;t.classList.remove(ye.materialTooltipHide),t.classList.add(ye.materialTooltipShow),this.firstHandle.style.cursor="default",this.tooltipElement.style.transition=this.scaleTransform,this.tooltipElement.classList.add(ye.materialTooltipOpen),this.materialHandle.style.transform="scale(0)",t.innerText.length>4?this.tooltipElement.style.transform="scale(1)":this.tooltipElement.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate,"Default"===this.type?setTimeout(function(){e.tooltipElement.style.transition=e.transition.handle},2500):setTimeout(function(){e.tooltipElement.style.transition="none"},2500)}},s.prototype.closeMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){var t=this.tooltipElement.firstElementChild;this.tooltipElement.style.transition=this.scaleTransform,t.classList.remove(ye.materialTooltipShow),t.classList.add(ye.materialTooltipHide),this.firstHandle.style.cursor="-webkit-grab",this.firstHandle.style.cursor="grab",this.materialHandle&&(this.materialHandle.style.transform="scale(1)"),this.tooltipElement.classList.remove(ye.materialTooltipOpen),this.setTooltipTransform(),this.tooltipTarget=void 0,setTimeout(function(){e.tooltipElement.style.transition="none"},2500)}},s.prototype.checkTooltipPosition=function(e){var t=this.tooltipPositionCalculation(e.collidedPosition);void 0!==this.tooltipCollidedPosition&&this.tooltipCollidedPosition===e.collidedPosition&&e.element.classList.contains(t)||(this.isMaterialTooltip&&(void 0!==t&&(e.element.classList.remove(this.previousTooltipClass),e.element.classList.add(t),this.previousTooltipClass=t),e.element.style.transform&&e.element.classList.contains(ye.materialTooltipOpen)&&e.element.firstElementChild.innerText.length<=4&&(e.element.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate)),this.tooltipCollidedPosition=e.collidedPosition),this.isMaterialTooltip&&this.tooltipElement&&-1!==this.tooltipElement.style.transform.indexOf("translate")&&this.setTooltipTransform()},s.prototype.setTooltipTransform=function(){var e=this.getTooltipTransformProperties(this.previousTooltipClass);this.tooltipElement.firstElementChild.innerText.length>4?this.tooltipElement.style.transform=e.translate+" scale(0.01)":this.tooltipElement.style.transform=e.translate+" "+e.rotate+" scale(0.01)"},s.prototype.renderTooltip=function(){this.tooltipObj=new i.Tooltip({showTipPointer:this.isBootstrap||this.isMaterial||this.isBootstrap4||this.isTailwind,cssClass:ye.sliderTooltip,height:this.isMaterial?30:"auto",animation:{open:{effect:"None"},close:{effect:"FadeOut",duration:500}},opensOn:"Custom",beforeOpen:this.tooltipBeforeOpen.bind(this),beforeCollision:this.checkTooltipPosition.bind(this),beforeClose:this.tooltipBeforeClose.bind(this),enableHtmlSanitizer:this.enableHtmlSanitizer}),this.tooltipObj.appendTo(this.firstHandle),this.initializeTooltipProps()},s.prototype.initializeTooltipProps=function(){var e=this.isMaterialTooltip?"Always":"Auto"===this.tooltip.showOn?"Hover":this.tooltip.showOn;this.setProperties({tooltip:{showOn:e}},!0),this.tooltipObj.position=this.tooltipPlacement(),this.tooltipCollision(this.tooltipObj.position),[this.firstHandle,this.rangeBar,this.secondHandle].forEach(function(e){t.isNullOrUndefined(e)||(e.style.transition="none")}),this.isMaterialTooltip&&(this.sliderContainer.classList.add(ye.materialSlider),t.isBlazor()||this.tooltipValue(),this.tooltipObj.animation.close.effect="None",this.tooltipObj.open(this.firstHandle))},s.prototype.tooltipBeforeClose=function(){this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0},s.prototype.setButtons=function(){t.isBlazor()&&this.isServerRendered?(this.firstBtn=this.element.parentElement.querySelector(".e-slider-button.e-first-button"),this.secondBtn=this.element.parentElement.querySelector(".e-slider-button.e-second-button")):(this.firstBtn=this.createElement("div",{className:ye.sliderButton+" "+ye.firstButton}),this.firstBtn.appendChild(this.createElement("span",{className:ye.sliderButtonIcon})),this.isTailwind&&this.firstBtn.querySelector("span").classList.add("e-icons"),this.firstBtn.tabIndex=-1,this.secondBtn=this.createElement("div",{className:ye.sliderButton+" "+ye.secondButton}),this.secondBtn.appendChild(this.createElement("span",{className:ye.sliderButtonIcon})),this.isTailwind&&this.secondBtn.querySelector("span").classList.add("e-icons"),this.secondBtn.tabIndex=-1,this.sliderContainer.classList.add(ye.sliderButtonClass),this.sliderContainer.appendChild(this.firstBtn),this.sliderContainer.appendChild(this.secondBtn),this.sliderContainer.appendChild(this.element),this.buttonTitle())},s.prototype.buttonTitle=function(){var e=this.enableRtl&&"Vertical"!==this.orientation;this.l10n.setLocale(this.locale);var i=this.l10n.getConstant("decrementTitle"),s=this.l10n.getConstant("incrementTitle");t.attributes(e?this.secondBtn:this.firstBtn,{"aria-label":i,title:i}),t.attributes(e?this.firstBtn:this.secondBtn,{"aria-label":s,title:s})},s.prototype.buttonFocusOut=function(){this.isMaterial&&this.getHandle().classList.remove("e-large-thumb-size")},s.prototype.repeatButton=function(e){var t,i=this.handleValueUpdate(),s=this.enableRtl&&"Vertical"!==this.orientation;e.target.parentElement.classList.contains(ye.firstButton)||e.target.classList.contains(ye.firstButton)?t=s?this.add(i,parseFloat(this.step.toString()),!0):this.add(i,parseFloat(this.step.toString()),!1):(e.target.parentElement.classList.contains(ye.secondButton)||e.target.classList.contains(ye.secondButton))&&(t=s?this.add(i,parseFloat(this.step.toString()),!1):this.add(i,parseFloat(this.step.toString()),!0)),this.limits.enabled&&(t=this.getLimitCorrectedValues(t)),t>=this.min&&t<=this.max&&(this.changeHandleValue(t),this.tooltipToggle(this.getHandle()))},s.prototype.repeatHandlerMouse=function(e){e.preventDefault(),"mousedown"!==e.type&&"touchstart"!==e.type||(this.buttonClick(e),this.repeatInterval=setInterval(this.repeatButton.bind(this),180,e))},s.prototype.materialChange=function(){this.getHandle().classList.contains("e-large-thumb-size")||this.getHandle().classList.add("e-large-thumb-size")},s.prototype.repeatHandlerUp=function(e){this.changeEvent("changed",e),this.closeTooltip(),clearInterval(this.repeatInterval),this.getHandle().focus()},s.prototype.customTickCounter=function(e){var i=4;return!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(e>4&&(i=3),e>7&&(i=2),e>14&&(i=1),e>28&&(i=0)),i},s.prototype.renderScale=function(){var e=0,i="Vertical"===this.orientation?"v":"h";this.noOfDecimals=this.numberOfDecimals(this.step),t.isBlazor()&&this.isServerRendered?this.ul=this.element.querySelector("ul"):this.ul=this.createElement("ul",{className:ye.scale+" e-"+i+"-scale "+ye.tick+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation",tabIndex:"-1","aria-hidden":"true"}}),this.ul.style.zIndex="-1",t.Browser.isAndroid&&"h"===i&&this.ul.classList.add(ye.sliderTickPosition);var s=this.ticks.smallStep;this.ticks.showSmallTicks?s<=0&&(s=parseFloat(t.formatUnit(this.step))):s=this.ticks.largeStep>0?this.ticks.largeStep:parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min));var n=this.fractionalToInteger(this.min),a=this.fractionalToInteger(this.max),r=this.fractionalToInteger(s),l=!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&this.customValues.length-1,o=this.customTickCounter(l),h=!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0?l*o+l:Math.abs((a-n)/r);t.isBlazor()&&this.isServerRendered||this.element.appendChild(this.ul);var d,u=parseFloat(this.min.toString());"v"===i&&(u=parseFloat(this.max.toString()));var c,p=0,m=100/h;m===1/0&&(m=5);for(var v=0,f=!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0?this.customValues.length-1:0,g=0;v<=h;v++){if(d=this.createElement("li",{attrs:{class:ye.tick,role:"presentation",tabIndex:"-1","aria-hidden":"true"}}),!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0)(c=v%(o+1)==0)&&("h"===i?(u=this.customValues[g],g++):(u=this.customValues[f],f--),d.setAttribute("title",u.toString()));else if(d.setAttribute("title",u.toString()),0===this.numberOfDecimals(this.max)&&0===this.numberOfDecimals(this.min)&&0===this.numberOfDecimals(this.step))c="h"===i?(u-parseFloat(this.min.toString()))%this.ticks.largeStep==0:Math.abs(u-parseFloat(this.max.toString()))%this.ticks.largeStep==0;else{var y=this.fractionalToInteger(this.ticks.largeStep),b=this.fractionalToInteger(u);c="h"===i?(b-n)%y==0:Math.abs(b-parseFloat(a.toString()))%y==0}c&&d.classList.add(ye.large),"h"===i?d.style.width=m+"%":d.style.height=m+"%";var E=c?"Both"===this.ticks.placement?2:1:0;if(c){for(var C=0;C<E;C++)this.createTick(d,u,m);t.isBlazor()&&this.isServerRendered&&t.isNullOrUndefined(this.customValues)&&(this.updateTicksValues(u,this.ul.children[e]),e++)}else t.isNullOrUndefined(this.customValues)&&(this.formatTicksValue(d,u),t.isBlazor()&&this.isServerRendered&&t.isNullOrUndefined(this.customValues)&&(this.updateTicksValues(u,this.ul.children[e]),e++));t.isBlazor()&&this.isServerRendered||this.ul.appendChild(d),this.tickElementCollection.push(d);var S=void 0;t.isNullOrUndefined(this.customValues)&&(S=this.numberOfDecimals(s)>this.numberOfDecimals(u)?this.numberOfDecimals(s):this.numberOfDecimals(u),u="h"===i?this.makeRoundNumber(u+s,S):this.makeRoundNumber(u-s,S),p=this.makeRoundNumber(p+s,S))}this.ticksAlignment(i,m)},s.prototype.updateTicksValues=function(e,t){if(t.childElementCount>0)for(var i=0;i<t.childElementCount;i++)this.blazortTicksValue(t,e,t.children[i]);else this.blazortTicksValue(t,e,null)},s.prototype.blazortTicksValue=function(e,i,s){var n=this,a=this.formatNumber(i),r={value:i,text:t.isNullOrUndefined(this.ticks)||t.isNullOrUndefined(this.ticks.format)?a:this.formatString(i,this.ticksFormatInfo).formatString,tickElement:e};this.trigger("renderingTicks",r,function(i){e.setAttribute("title",i.text.toString()),s&&(n.enableHtmlSanitizer?s.innerHTML=t.SanitizeHtmlHelper.sanitize(i.text.toString()):s.innerHTML=i.text.toString())})},s.prototype.ticksAlignment=function(e,t,i){void 0===i&&(i=!0),this.firstChild=this.ul.firstElementChild,this.lastChild=this.ul.lastElementChild,this.firstChild.classList.add(ye.sliderFirstTick),this.lastChild.classList.add(ye.sliderLastTick),this.sliderContainer.classList.add(ye.scale+"-"+this.ticks.placement.toLowerCase()),"h"===e?(this.firstChild.style.width=t/2+"%",this.lastChild.style.width=t/2+"%"):(this.firstChild.style.height=t/2+"%",this.lastChild.style.height=t/2+"%");var s={ticksWrapper:this.ul,tickElements:this.tickElementCollection};i&&this.trigger("renderedTicks",s),this.scaleAlignment()},s.prototype.createTick=function(e,i,s){var n=this.createElement("span",{className:ye.tickValue+" "+ye.tick+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation",tabIndex:"-1","aria-hidden":"true"}});e.appendChild(n),t.isNullOrUndefined(this.customValues)?this.formatTicksValue(e,i,n,s):this.enableHtmlSanitizer?n.innerHTML=t.SanitizeHtmlHelper.sanitize(i.toString()):n.innerHTML=i.toString()},s.prototype.formatTicksValue=function(e,i,s,n){var a=this,r=this.formatNumber(i),l={value:i,text:t.isNullOrUndefined(this.ticks)||t.isNullOrUndefined(this.ticks.format)?r:this.formatString(i,this.ticksFormatInfo).formatString,tickElement:e};this.trigger("renderingTicks",l,function(i){if(e.setAttribute("title",i.text.toString()),s&&(a.enableHtmlSanitizer?s.innerHTML=t.SanitizeHtmlHelper.sanitize(i.text.toString()):s.innerHTML=i.text.toString()),!t.isNullOrUndefined(a.renderingTicks)&&t.isBlazor()){var r="Horizontal"===a.orientation?"h":"v";a.ticksAlignment(r,n,!1)}})},s.prototype.scaleAlignment=function(){this.tickValuePosition();this.orientation;"Vertical"===this.orientation?this.element.getBoundingClientRect().width<=15?this.sliderContainer.classList.add(ye.sliderSmallSize):this.sliderContainer.classList.remove(ye.sliderSmallSize):this.element.getBoundingClientRect().height<=15?this.sliderContainer.classList.add(ye.sliderSmallSize):this.sliderContainer.classList.remove(ye.sliderSmallSize)},s.prototype.tickValuePosition=function(){this.firstChild=this.element.querySelector("ul").children[0];var e,i,s=this.firstChild.getBoundingClientRect(),n=this.ticks.smallStep,a=Math.abs(parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min)))/n;this.firstChild.children.length>0&&(e=this.firstChild.children[0].getBoundingClientRect());var r,l=[this.sliderContainer.querySelectorAll("."+ye.tick+"."+ye.large+" ."+ye.tickValue)];r="Both"===this.ticks.placement?[].slice.call(l[0],2):[].slice.call(l[0],1);for(var o="Vertical"===this.orientation?2*s.height:2*s.width,h=0;h<this.firstChild.children.length;h++)"Vertical"===this.orientation?t.isBlazor()&&this.isServerRendered||(this.firstChild.children[h].style.top=-e.height/2+"px"):this.enableRtl?this.firstChild.children[h].style.left=(o-this.firstChild.children[h].getBoundingClientRect().width)/2+"px":this.firstChild.children[h].style.left=-e.width/2+"px";for(h=0;h<r.length;h++)i=r[h].getBoundingClientRect(),"Vertical"===this.orientation?t.isBlazor()&&this.isServerRendered||t.setStyleAttribute(r[h],{top:(o-i.height)/2+"px"}):t.setStyleAttribute(r[h],{left:(o-i.width)/2+"px"});if(this.enableRtl&&this.lastChild.children.length&&0!==a&&(this.lastChild.children[0].style.left=-this.lastChild.getBoundingClientRect().width/2+"px","Both"===this.ticks.placement&&(t.isBlazor()||(this.lastChild.children[1].style.left=-this.lastChild.getBoundingClientRect().width/2+"px"))),0===a&&("Horizontal"===this.orientation&&(this.enableRtl?(this.firstChild.classList.remove(ye.sliderLastTick),this.firstChild.style.right=this.firstHandle.style.right,t.isBlazor()||(this.firstChild.children[0].style.left=this.firstChild.getBoundingClientRect().width/2+2+"px","Both"===this.ticks.placement&&(this.firstChild.children[1].style.left=this.firstChild.getBoundingClientRect().width/2+2+"px"))):(this.firstChild.classList.remove(ye.sliderLastTick),t.isBlazor()||(this.firstChild.style.left=this.firstHandle.style.left))),t.isBlazor()&&this.isServerRendered||"Vertical"===this.orientation&&this.firstChild.classList.remove(ye.sliderLastTick)),t.isBlazor()&&this.isServerRendered){var d=void 0;null!=this.firstChild&&(d="Horizontal"===this.orientation?{firstTickPostion:this.firstChild.children[0].style.left}:{firstTickPostion:-e.height/2+"px"}),null!=r[0]&&(d="Horizontal"===this.orientation?{otherTicksPosition:r[0].style.left}:{otherTicksPosition:(o-i.height)/2+"px"}),null!=this.firstChild&&null!=r[0]&&(d="Horizontal"===this.orientation?{firstTickPostion:this.firstChild.children[0].style.left,otherTicksPosition:r[0].style.left}:{firstTickPostion:-e.height/2+"px",otherTicksPosition:(o-i.height)/2+"px"}),this.interopAdaptor.invokeMethodAsync("SliderTicksData",d)}},s.prototype.setAriaAttrValue=function(e){var i,s=!t.isNullOrUndefined(this.ticks)&&!t.isNullOrUndefined(this.ticks.format),n=s?this.formatContent(this.tooltipFormatInfo,!1):this.formatContent(this.ticksFormatInfo,!1),a=s?this.formatContent(this.ticksFormatInfo,!0):this.formatContent(this.tooltipFormatInfo,!0);i=2===(n=this.customAriaText?this.customAriaText:n).split(" - ").length?n.split(" - "):[n,n],this.setAriaAttributes(e),"Range"!==this.type?t.attributes(e,{"aria-valuenow":a,"aria-valuetext":n}):this.enableRtl?e===this.firstHandle?t.attributes(e,{"aria-valuenow":a.split(" - ")[1],"aria-valuetext":i[1]}):t.attributes(e,{"aria-valuenow":a.split(" - ")[0],"aria-valuetext":i[0]}):e===this.firstHandle?t.attributes(e,{"aria-valuenow":a.split(" - ")[0],"aria-valuetext":i[0]}):t.attributes(e,{"aria-valuenow":a.split(" - ")[1],"aria-valuetext":i[1]})},s.prototype.handleValueUpdate=function(){return"Range"===this.type?1===this.activeHandle?this.handleVal1:this.handleVal2:this.handleVal1},s.prototype.getLimitCorrectedValues=function(e){return e="MinRange"===this.type||"Default"===this.type?this.getLimitValueAndPosition(e,this.limits.minStart,this.limits.minEnd)[0]:1===this.activeHandle?this.getLimitValueAndPosition(e,this.limits.minStart,this.limits.minEnd)[0]:this.getLimitValueAndPosition(e,this.limits.maxStart,this.limits.maxEnd)[0]},s.prototype.focusSliderElement=function(){this.isElementFocused||(this.element.focus(),this.isElementFocused=!0)},s.prototype.buttonClick=function(e){this.focusSliderElement();var i,s=this.enableRtl&&"Vertical"!==this.orientation,n=this.handleValueUpdate();40===e.keyCode||37===e.keyCode||e.currentTarget.classList.contains(ye.firstButton)?i=s?this.add(n,parseFloat(this.step.toString()),!0):this.add(n,parseFloat(this.step.toString()),!1):38===e.keyCode||39===e.keyCode||e.currentTarget.classList.contains(ye.secondButton)?i=s?this.add(n,parseFloat(this.step.toString()),!1):this.add(n,parseFloat(this.step.toString()),!0):33===e.keyCode||e.currentTarget.classList.contains(ye.firstButton)?i=s?this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):34===e.keyCode||e.currentTarget.classList.contains(ye.secondButton)?i=s?this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):36===e.keyCode?i=parseFloat(this.min.toString()):35===e.keyCode&&(i=parseFloat(this.max.toString())),this.limits.enabled&&(i=this.getLimitCorrectedValues(i)),this.changeHandleValue(i),!this.isMaterial||this.tooltip.isVisible||this.getHandle().classList.contains(ye.sliderTabHandle)||this.materialChange(),this.tooltipToggle(this.getHandle()),this.getHandle().focus(),e.currentTarget.classList.contains(ye.firstButton)&&t.EventHandler.add(this.firstBtn,"mouseup touchend",this.buttonUp,this),e.currentTarget.classList.contains(ye.secondButton)&&t.EventHandler.add(this.secondBtn,"mouseup touchend",this.buttonUp,this)},s.prototype.tooltipToggle=function(e){this.isMaterialTooltip?this.tooltipElement.classList.contains(ye.materialTooltipOpen)?this.refreshTooltip(this.firstHandle):this.openMaterialTooltip():this.tooltipElement?this.refreshTooltip(e):this.openTooltip(e)},s.prototype.buttonUp=function(e){e.currentTarget.classList.contains(ye.firstButton)&&t.EventHandler.remove(this.firstBtn,"mouseup touchend",this.buttonUp),e.currentTarget.classList.contains(ye.secondButton)&&t.EventHandler.remove(this.secondBtn,"mouseup touchend",this.buttonUp)},s.prototype.setRangeBar=function(){"Horizontal"===this.orientation?"MinRange"===this.type?(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",t.setStyleAttribute(this.rangeBar,{width:t.isNullOrUndefined(this.handlePos1)?0:this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right=this.handlePos1+"px":this.rangeBar.style.left=this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"})):"MinRange"===this.type?(this.rangeBar.style.bottom="0px",t.setStyleAttribute(this.rangeBar,{height:t.isNullOrUndefined(this.handlePos1)?0:this.handlePos1+"px"})):(this.rangeBar.style.bottom=this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{height:this.handlePos2-this.handlePos1+"px"}))},s.prototype.checkValidValueAndPos=function(e){return e=this.checkHandleValue(e),e=this.checkHandlePosition(e)},s.prototype.setLimitBarPositions=function(e,t,i,s){"Horizontal"===this.orientation?this.enableRtl?(this.limitBarFirst.style.right=e+"px",this.limitBarFirst.style.width=t-e+"px"):(this.limitBarFirst.style.left=e+"px",this.limitBarFirst.style.width=t-e+"px"):(this.limitBarFirst.style.bottom=e+"px",this.limitBarFirst.style.height=t-e+"px"),"Range"===this.type&&("Horizontal"===this.orientation?this.enableRtl?(this.limitBarSecond.style.right=i+"px",this.limitBarSecond.style.width=s-i+"px"):(this.limitBarSecond.style.left=i+"px",this.limitBarSecond.style.width=s-i+"px"):(this.limitBarSecond.style.bottom=i+"px",this.limitBarSecond.style.height=s-i+"px"))},s.prototype.setLimitBar=function(){if("Default"===this.type||"MinRange"===this.type){var e=this.getLimitValueAndPosition(this.limits.minStart,this.limits.minStart,this.limits.minEnd,!0)[0];e=this.checkValidValueAndPos(e);var t=this.getLimitValueAndPosition(this.limits.minEnd,this.limits.minStart,this.limits.minEnd,!0)[0];t=this.checkValidValueAndPos(t),this.setLimitBarPositions(e,t)}else if("Range"===this.type){var i=this.getLimitValueAndPosition(this.limits.minStart,this.limits.minStart,this.limits.minEnd,!0)[0];i=this.checkValidValueAndPos(i);var s=this.getLimitValueAndPosition(this.limits.minEnd,this.limits.minStart,this.limits.minEnd,!0)[0];s=this.checkValidValueAndPos(s);var n=this.getLimitValueAndPosition(this.limits.maxStart,this.limits.maxStart,this.limits.maxEnd,!0)[0];n=this.checkValidValueAndPos(n);var a=this.getLimitValueAndPosition(this.limits.maxEnd,this.limits.maxStart,this.limits.maxEnd,!0)[0];a=this.checkValidValueAndPos(a),this.setLimitBarPositions(i,s,n,a)}},s.prototype.getLimitValueAndPosition=function(e,i,s,n){return t.isNullOrUndefined(i)&&(i=this.min,t.isNullOrUndefined(e)&&n&&(e=i)),t.isNullOrUndefined(s)&&(s=this.max,t.isNullOrUndefined(e)&&n&&(e=s)),e<i&&(e=i),e>s&&(e=s),[e,this.checkHandlePosition(e)]},s.prototype.setValue=function(){if(!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(this.min=0,this.max=this.customValues.length-1,this.setBarColor()),this.setAriaAttributes(this.firstHandle),this.handleVal1=t.isNullOrUndefined(this.value)?this.checkHandleValue(parseFloat(this.min.toString())):this.checkHandleValue(parseFloat(this.value.toString())),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.preHandlePos1=this.handlePos1,t.isNullOrUndefined(this.activeHandle)?"Range"===this.type?this.activeHandle=2:this.activeHandle=1:this.activeHandle=this.activeHandle,"Default"===this.type||"MinRange"===this.type){if(this.limits.enabled){var e=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=e[0],this.handlePos1=e[1],this.preHandlePos1=this.handlePos1}this.setHandlePosition(null),this.handleStart(),this.value=this.handleVal1,this.setAriaAttrValue(this.firstHandle),this.changeEvent("changed",null)}else this.validateRangeValue();"Default"!==this.type&&this.setRangeBar(),this.limits.enabled&&this.setLimitBar()},s.prototype.rangeValueUpdate=function(){null!==this.value&&"object"==typeof this.value||(this.value=[parseFloat(t.formatUnit(this.min)),parseFloat(t.formatUnit(this.max))])},s.prototype.validateRangeValue=function(){this.rangeValueUpdate(),this.setRangeValue()},s.prototype.modifyZindex=function(){"Range"===this.type?1===this.activeHandle?(this.firstHandle.style.zIndex=this.zIndex+4+"",this.secondHandle.style.zIndex=this.zIndex+3+""):(this.firstHandle.style.zIndex=this.zIndex+3+"",this.secondHandle.style.zIndex=this.zIndex+4+""):this.isMaterialTooltip&&this.tooltipElement&&(this.tooltipElement.style.zIndex=i.getZindexPartial(this.element)+"")},s.prototype.setHandlePosition=function(e){var i,s=this,n=1===this.activeHandle?this.handlePos1:this.handlePos2;i=this.isMaterialTooltip?[this.firstHandle,this.materialHandle]:[this.getHandle()],this.handleStart(),i.forEach(function(e){"Horizontal"===s.orientation?s.enableRtl?e.style.right=n+"px":e.style.left=n+"px":e.style.bottom=n+"px",t.isBlazor()&&s.isServerRendered&&e.style.removeProperty("visibility")}),this.changeEvent("change",e)},s.prototype.getHandle=function(){return 1===this.activeHandle?this.firstHandle:this.secondHandle},s.prototype.setRangeValue=function(){this.updateRangeValue(),this.activeHandle=1,this.setHandlePosition(null),this.activeHandle=2,this.setHandlePosition(null),this.activeHandle=1},s.prototype.changeEvent=function(e,t){var i="change"===e?this.previousVal:this.previousChanged;if("Range"!==this.type)this.setProperties({value:this.handleVal1},!0),i===this.value||this.isMaterialTooltip&&this.initialTooltip||(this.trigger(e,this.changeEventArgs(e,t)),this.initialTooltip=!0,this.setPreviousVal(e,this.value)),this.setAriaAttrValue(this.firstHandle);else{var s=this.value=[this.handleVal1,this.handleVal2];this.setProperties({value:s},!0),(i.length===this.value.length&&this.value[0]!==i[0]||this.value[1]!==i[1])&&(this.initialTooltip=!1,this.trigger(e,this.changeEventArgs(e,t)),this.initialTooltip=!0,this.setPreviousVal(e,this.value)),this.setAriaAttrValue(this.getHandle())}this.hiddenInput.value=this.value.toString()},s.prototype.changeEventArgs=function(e,i){var s;return this.tooltip.isVisible&&this.tooltipObj&&this.initialTooltip?(t.isBlazor()&&this.isServerRendered||this.tooltipValue(),s={value:this.value,previousValue:"change"===e?this.previousVal:this.previousChanged,action:e,text:this.tooltipObj.content,isInteracted:!t.isNullOrUndefined(i)}):s={value:this.value,previousValue:"change"===e?this.previousVal:this.previousChanged,action:e,text:t.isNullOrUndefined(this.ticksFormatInfo.format)?this.value.toString():"Range"!==this.type?this.formatString(this.value,this.ticksFormatInfo).formatString:this.formatString(this.value[0],this.ticksFormatInfo).formatString+" - "+this.formatString(this.value[1],this.ticksFormatInfo).formatString,isInteracted:!t.isNullOrUndefined(i)},s},s.prototype.setPreviousVal=function(e,t){"change"===e?this.previousVal=t:this.previousChanged=t},s.prototype.updateRangeValue=function(){var e=this.value.toString().split(",").map(Number);if(this.enableRtl&&"Vertical"!==this.orientation||this.rtl?this.value=[e[1],e[0]]:this.value=[e[0],e[1]],this.enableRtl&&"Vertical"!==this.orientation?(this.handleVal1=this.checkHandleValue(this.value[1]),this.handleVal2=this.checkHandleValue(this.value[0])):(this.handleVal1=this.checkHandleValue(this.value[0]),this.handleVal2=this.checkHandleValue(this.value[1])),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handlePos2=this.checkHandlePosition(this.handleVal2),this.handlePos1>this.handlePos2&&(this.handlePos1=this.handlePos2,this.handleVal1=this.handleVal2),this.preHandlePos1=this.handlePos1,this.preHandlePos2=this.handlePos2,this.limits.enabled){this.activeHandle=1;var t=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=t[0],this.handlePos1=t[1],this.preHandlePos1=this.handlePos1,this.activeHandle=2,t=this.getLimitValueAndPosition(this.handleVal2,this.limits.maxStart,this.limits.maxEnd),this.handleVal2=t[0],this.handlePos2=t[1],this.preHandlePos2=this.handlePos2}},s.prototype.checkHandlePosition=function(e){var i;return e=100*(e-parseFloat(t.formatUnit(this.min)))/(parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min))),i="Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(e/100):this.element.getBoundingClientRect().height*(e/100),parseFloat(t.formatUnit(this.max))===parseFloat(t.formatUnit(this.min))&&(i="Horizontal"===this.orientation?this.element.getBoundingClientRect().width:this.element.getBoundingClientRect().height),i},s.prototype.checkHandleValue=function(e){if(this.min>this.max&&(this.min=this.max),this.min===this.max)return parseFloat(t.formatUnit(this.max));var i=this.tempStartEnd();return e<i.start?e=i.start:e>i.end&&(e=i.end),e},s.prototype.reposition=function(){var e=this;this.firstHandle.style.transition="none","Default"!==this.type&&(this.rangeBar.style.transition="none"),"Range"===this.type&&(this.secondHandle.style.transition="none"),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handleVal2&&(this.handlePos2=this.checkHandlePosition(this.handleVal2)),"Horizontal"===this.orientation?(this.enableRtl?this.firstHandle.style.right=this.handlePos1+"px":this.firstHandle.style.left=this.handlePos1+"px",this.isMaterialTooltip&&(this.enableRtl?this.materialHandle.style.right=this.handlePos1+"px":this.materialHandle.style.left=this.handlePos1+"px"),"MinRange"===this.type?(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",t.setStyleAttribute(this.rangeBar,{width:t.isNullOrUndefined(this.handlePos1)?0:this.handlePos1+"px"})):"Range"===this.type&&(this.enableRtl?this.secondHandle.style.right=this.handlePos2+"px":this.secondHandle.style.left=this.handlePos2+"px",this.enableRtl?this.rangeBar.style.right=this.handlePos1+"px":this.rangeBar.style.left=this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"}))):(this.firstHandle.style.bottom=this.handlePos1+"px",this.isMaterialTooltip&&(this.materialHandle.style.bottom=this.handlePos1+"px"),"MinRange"===this.type?(this.rangeBar.style.bottom="0px",t.setStyleAttribute(this.rangeBar,{height:t.isNullOrUndefined(this.handlePos1)?0:this.handlePos1+"px"})):"Range"===this.type&&(this.secondHandle.style.bottom=this.handlePos2+"px",this.rangeBar.style.bottom=this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{height:this.handlePos2-this.handlePos1+"px"}))),this.limits.enabled&&this.setLimitBar(),"None"!==this.ticks.placement&&this.ul&&(t.isBlazor()||(this.removeElement(this.ul),this.ul=void 0),this.renderScale(),t.isBlazor()&&this.tickValuePosition()),this.handleStart(),this.tooltip.isVisible||setTimeout(function(){e.firstHandle.style.transition=e.scaleTransform,"Range"===e.type&&(e.secondHandle.style.transition=e.scaleTransform)}),t.isBlazor()&&this.isServerRendered||this.refreshTooltip(this.tooltipTarget),this.setBarColor()},s.prototype.changeHandleValue=function(e){var t=null;1===this.activeHandle?(this.limits.enabled&&this.limits.startHandleFixed||(this.handleVal1=this.checkHandleValue(e),this.handlePos1=this.checkHandlePosition(this.handleVal1),"Range"===this.type&&this.handlePos1>this.handlePos2&&(this.handlePos1=this.handlePos2,this.handleVal1=this.handleVal2),this.handlePos1!==this.preHandlePos1&&(t=this.preHandlePos1=this.handlePos1)),this.modifyZindex()):(this.limits.enabled&&this.limits.endHandleFixed||(this.handleVal2=this.checkHandleValue(e),this.handlePos2=this.checkHandlePosition(this.handleVal2),"Range"===this.type&&this.handlePos2<this.handlePos1&&(this.handlePos2=this.handlePos1,this.handleVal2=this.handleVal1),this.handlePos2!==this.preHandlePos2&&(t=this.preHandlePos2=this.handlePos2)),this.modifyZindex()),null!==t&&("Default"!==this.type&&this.setRangeBar(),this.setHandlePosition(null))},s.prototype.tempStartEnd=function(){return this.min>this.max?{start:this.max,end:this.min}:{start:this.min,end:this.max}},s.prototype.xyToPosition=function(e){if(this.min===this.max)return 100;if("Horizontal"===this.orientation){var t=e.x-this.element.getBoundingClientRect().left,i=this.element.offsetWidth/100;this.val=t/i}else{var s=e.y-this.element.getBoundingClientRect().top,i=this.element.offsetHeight/100;this.val=100-s/i}var n=this.stepValueCalculation(this.val);return n<0?n=0:n>100&&(n=100),this.enableRtl&&"Vertical"!==this.orientation&&(n=100-n),"Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(n/100):this.element.getBoundingClientRect().height*(n/100)},s.prototype.stepValueCalculation=function(e){0===this.step&&(this.step=1);var i=parseFloat(t.formatUnit(this.step))/((parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min)))/100),s=e%Math.abs(i);return 0!==s&&(i/2>s?e-=s:e+=Math.abs(i)-s),e},s.prototype.add=function(e,t,i){var s=Math.pow(10,3);return i?(Math.round(e*s)+Math.round(t*s))/s:(Math.round(e*s)-Math.round(t*s))/s},s.prototype.positionToValue=function(e){var i,s=parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min));return i="Horizontal"===this.orientation?e/this.element.getBoundingClientRect().width*s:e/this.element.getBoundingClientRect().height*s,this.add(i,parseFloat(this.min.toString()),!0)},s.prototype.sliderBarClick=function(e){e.preventDefault();var t;"mousedown"===e.type||"mouseup"===e.type||"click"===e.type?t={x:e.clientX,y:e.clientY}:"touchend"!==e.type&&"touchstart"!==e.type||(t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY});var i=this.xyToPosition(t),s=this.positionToValue(i);if("Range"===this.type&&this.handlePos2-i<i-this.handlePos1)this.activeHandle=2,this.limits.enabled&&this.limits.endHandleFixed||(this.limits.enabled&&(s=(n=this.getLimitValueAndPosition(s,this.limits.maxStart,this.limits.maxEnd))[0],i=n[1]),this.secondHandle.classList.add(ye.sliderActiveHandle),this.handlePos2=this.preHandlePos2=i,this.handleVal2=s),this.modifyZindex(),this.secondHandle.focus();else{if(this.activeHandle=1,!this.limits.enabled||!this.limits.startHandleFixed){if(this.limits.enabled){var n=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd);s=n[0],i=n[1]}this.firstHandle.classList.add(ye.sliderActiveHandle),this.handlePos1=this.preHandlePos1=i,this.handleVal1=s}this.modifyZindex(),this.firstHandle.focus()}this.isMaterialTooltip&&this.tooltipElement.classList.add(ye.materialTooltipActive);var a=this.element.querySelector("."+ye.sliderTabHandle);a&&this.getHandle()!==a&&a.classList.remove(ye.sliderTabHandle);var r=1===this.activeHandle?this.firstHandle:this.secondHandle;if(e.target===r)return!this.isMaterial||this.tooltip.isVisible||this.getHandle().classList.contains(ye.sliderTabHandle)||this.materialChange(),this.sliderBarUp(e),void this.tooltipToggle(this.getHandle());if(this.checkRepeatedValue(s)){var l=this.isMaterial&&this.tooltip.isVisible?this.transitionOnMaterialTooltip:this.transition;this.getHandle().style.transition=l.handle,"Default"!==this.type&&(this.rangeBar.style.transition=l.rangeBar),this.setHandlePosition(e),this.isMaterialTooltip&&(this.initialTooltip=!1),this.changeEvent("changed",e),"Default"!==this.type&&this.setRangeBar()}},s.prototype.handleValueAdjust=function(e,t,i){1===i?(this.handleVal1=t,this.handleVal2=this.handleVal1+this.minDiff):2===i&&(this.handleVal2=t,this.handleVal1=this.handleVal2-this.minDiff),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handlePos2=this.checkHandlePosition(this.handleVal2)},s.prototype.dragRangeBarMove=function(e){var t,i;"touchmove"!==e.type&&e.preventDefault(),this.rangeBarDragged=!0;var s;this.rangeBar.style.transition="none",this.firstHandle.style.transition="none",this.secondHandle.style.transition="none";var n,a;if("mousemove"===e.type?(n=(t=[e.clientX,e.clientY])[0],a=t[1]):(n=(i=[e.changedTouches[0].clientX,e.changedTouches[0].clientY])[0],a=i[1]),!(this.limits.enabled&&this.limits.startHandleFixed||this.limits.enabled&&this.limits.endHandleFixed)){if(s=this.enableRtl?{x:n+this.secondPartRemain,y:a+this.secondPartRemain}:{x:n-this.firstPartRemain,y:a+this.secondPartRemain},this.handlePos1=this.xyToPosition(s),this.handleVal1=this.positionToValue(this.handlePos1),s=this.enableRtl?{x:n-this.firstPartRemain,y:a-this.firstPartRemain}:{x:n+this.secondPartRemain,y:a-this.firstPartRemain},this.handlePos2=this.xyToPosition(s),this.handleVal2=this.positionToValue(this.handlePos2),this.limits.enabled){var r=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=r[0],this.handlePos1=r[1],this.handleVal1===this.limits.minEnd&&this.handleValueAdjust(this.handleVal1,this.limits.minEnd,1),this.handleVal1===this.limits.minStart&&this.handleValueAdjust(this.handleVal1,this.limits.minStart,1),r=this.getLimitValueAndPosition(this.handleVal2,this.limits.maxStart,this.limits.maxEnd),this.handleVal2=r[0],this.handlePos2=r[1],this.handleVal2===this.limits.maxStart&&this.handleValueAdjust(this.handleVal2,this.limits.maxStart,2),this.handleVal2===this.limits.maxEnd&&this.handleValueAdjust(this.handleVal2,this.limits.maxEnd,2)}this.handleVal2===this.max&&this.handleValueAdjust(this.handleVal2,this.max,2),this.handleVal1===this.min&&this.handleValueAdjust(this.handleVal1,this.min,1)}this.activeHandle=1,this.setHandlePosition(e),this.activeHandle=2,this.setHandlePosition(e),this.tooltipToggle(this.rangeBar),this.setRangeBar()},s.prototype.sliderBarUp=function(e){this.changeEvent("changed",e),this.handleFocusOut(),this.firstHandle.classList.remove(ye.sliderActiveHandle),"Range"===this.type&&(this.initialTooltip=!1,this.secondHandle.classList.remove(ye.sliderActiveHandle)),this.closeTooltip(),this.isMaterial&&(this.getHandle().classList.remove("e-large-thumb-size"),this.isMaterialTooltip&&this.tooltipElement.classList.remove(ye.materialTooltipActive)),t.EventHandler.remove(document,"mousemove touchmove",this.sliderBarMove),t.EventHandler.remove(document,"mouseup touchend",this.sliderBarUp)},s.prototype.sliderBarMove=function(e){"touchmove"!==e.type&&e.preventDefault();var t;t="mousemove"===e.type?{x:e.clientX,y:e.clientY}:{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};var i=this.xyToPosition(t),s=this.positionToValue(i);if(i=Math.round(i),"Range"!==this.type&&1===this.activeHandle){if(!this.limits.enabled||!this.limits.startHandleFixed){if(this.limits.enabled){var n=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd);i=n[1],s=n[0]}this.handlePos1=i,this.handleVal1=s}this.firstHandle.classList.add(ye.sliderActiveHandle)}if("Range"===this.type)if(1===this.activeHandle)this.firstHandle.classList.add(ye.sliderActiveHandle),this.limits.enabled&&this.limits.startHandleFixed||(i>this.handlePos2&&(i=this.handlePos2,s=this.handleVal2),i!==this.preHandlePos1&&(this.limits.enabled&&(s=(a=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd))[0],i=a[1]),this.handlePos1=this.preHandlePos1=i,this.handleVal1=s,this.activeHandle=1));else if(2===this.activeHandle&&(this.secondHandle.classList.add(ye.sliderActiveHandle),!(this.limits.enabled&&this.limits.endHandleFixed||(i<this.handlePos1&&(i=this.handlePos1,s=this.handleVal1),i===this.preHandlePos2)))){if(this.limits.enabled){var a=this.getLimitValueAndPosition(s,this.limits.maxStart,this.limits.maxEnd);s=a[0],i=a[1]}this.handlePos2=this.preHandlePos2=i,this.handleVal2=s,this.activeHandle=2}this.checkRepeatedValue(s)&&(this.getHandle().style.transition=this.scaleTransform,"Default"!==this.type&&(this.rangeBar.style.transition="none"),this.setHandlePosition(e),!this.isMaterial||this.tooltip.isVisible||this.getHandle().classList.contains(ye.sliderTabHandle)||this.materialChange(),this.tooltipToggle(this.getHandle()),"Default"!==this.type&&this.setRangeBar())},s.prototype.dragRangeBarUp=function(e){this.rangeBarDragged?this.isDragComplete=!0:(this.focusSliderElement(),this.sliderBarClick(e)),this.changeEvent("changed",e),this.closeTooltip(),t.EventHandler.remove(document,"mousemove touchmove",this.dragRangeBarMove),t.EventHandler.remove(document,"mouseup touchend",this.dragRangeBarUp),this.rangeBarDragged=!1},s.prototype.checkRepeatedValue=function(e){if("Range"===this.type){if(e===(this.enableRtl&&"Vertical"!==this.orientation?1===this.activeHandle?this.previousVal[1]:this.previousVal[0]:1===this.activeHandle?this.previousVal[0]:this.previousVal[1]))return 0}else if(e===this.previousVal)return 0;return 1},s.prototype.refreshTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&(this.tooltipValue(),e&&(this.tooltipObj.refresh(e),this.tooltipTarget=e))},s.prototype.openTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.open(e),this.tooltipTarget=e)},s.prototype.closeTooltip=function(){this.tooltip.isVisible&&this.tooltipObj&&"Always"!==this.tooltip.showOn&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.close(),this.tooltipTarget=void 0)},s.prototype.keyDown=function(e){switch(e.keyCode){case 37:case 38:case 39:case 40:case 33:case 34:case 36:case 35:e.preventDefault(),this.buttonClick(e)}},s.prototype.wireButtonEvt=function(e){e?(t.EventHandler.remove(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut),t.EventHandler.remove(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut),t.EventHandler.remove(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse),t.EventHandler.remove(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),t.EventHandler.remove(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse),t.EventHandler.remove(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),t.EventHandler.remove(this.firstBtn,"focusout",this.sliderFocusOut),t.EventHandler.remove(this.secondBtn,"focusout",this.sliderFocusOut)):(t.EventHandler.add(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut,this),t.EventHandler.add(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut,this),t.EventHandler.add(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse,this),t.EventHandler.add(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),t.EventHandler.add(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse,this),t.EventHandler.add(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),t.EventHandler.add(this.firstBtn,"focusout",this.sliderFocusOut,this),t.EventHandler.add(this.secondBtn,"focusout",this.sliderFocusOut,this))},s.prototype.rangeBarMousedown=function(e){var i,s;if(e.preventDefault(),this.focusSliderElement(),"Range"===this.type&&this.drag&&e.target===this.rangeBar){var n=void 0,a=void 0;"mousedown"===e.type?(n=(i=[e.clientX,e.clientY])[0],a=i[1]):"touchstart"===e.type&&(n=(s=[e.changedTouches[0].clientX,e.changedTouches[0].clientY])[0],a=s[1]),"Horizontal"===this.orientation?(this.firstPartRemain=n-this.rangeBar.getBoundingClientRect().left,this.secondPartRemain=this.rangeBar.getBoundingClientRect().right-n):(this.firstPartRemain=a-this.rangeBar.getBoundingClientRect().top,this.secondPartRemain=this.rangeBar.getBoundingClientRect().bottom-a),this.minDiff=this.handleVal2-this.handleVal1,this.tooltipToggle(this.rangeBar);var r=this.element.querySelector("."+ye.sliderTabHandle);r&&r.classList.remove(ye.sliderTabHandle),t.EventHandler.add(document,"mousemove touchmove",this.dragRangeBarMove,this),t.EventHandler.add(document,"mouseup touchend",this.dragRangeBarUp,this)}},s.prototype.elementClick=function(e){if(this.isDragComplete)return void(this.isDragComplete=!1);e.preventDefault(),this.focusSliderElement(),this.sliderBarClick(e)},s.prototype.wireEvents=function(){this.onresize=this.reposition.bind(this),window.addEventListener("resize",this.onresize),this.enabled&&!this.readonly&&(t.EventHandler.add(this.element,"click",this.elementClick,this),"Range"===this.type&&this.drag&&t.EventHandler.add(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown,this),t.EventHandler.add(this.sliderContainer,"keydown",this.keyDown,this),t.EventHandler.add(this.sliderContainer,"keyup",this.keyUp,this),t.EventHandler.add(this.element,"focusout",this.sliderFocusOut,this),t.EventHandler.add(this.sliderContainer,"mouseover mouseout touchstart touchend",this.hover,this),this.wireFirstHandleEvt(!1),"Range"===this.type&&this.wireSecondHandleEvt(!1),this.showButtons&&this.wireButtonEvt(!1),this.wireMaterialTooltipEvent(!1),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this))},s.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.elementClick),"Range"===this.type&&this.drag&&t.EventHandler.remove(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown),t.EventHandler.remove(this.sliderContainer,"keydown",this.keyDown),t.EventHandler.remove(this.sliderContainer,"keyup",this.keyUp),t.EventHandler.remove(this.element,"focusout",this.sliderFocusOut),t.EventHandler.remove(this.sliderContainer,"mouseover mouseout touchstart touchend",this.hover),this.wireFirstHandleEvt(!0),"Range"===this.type&&this.wireSecondHandleEvt(!0),this.showButtons&&this.wireButtonEvt(!0),this.wireMaterialTooltipEvent(!0),t.EventHandler.remove(this.element,"reset",this.formResetHandler)},s.prototype.formResetHandler=function(){this.setProperties({value:this.formResetValue},!0),this.setValue()},s.prototype.keyUp=function(e){if(9===e.keyCode&&e.target.classList.contains(ye.sliderHandle)&&(this.focusSliderElement(),!e.target.classList.contains(ye.sliderTabHandle))){this.element.querySelector("."+ye.sliderTabHandle)&&this.element.querySelector("."+ye.sliderTabHandle).classList.remove(ye.sliderTabHandle),e.target.classList.add(ye.sliderTabHandle);var t=e.target.parentElement;t===this.element&&(t.querySelector("."+ye.sliderTrack).classList.add(ye.sliderTabTrack),"Range"!==this.type&&"MinRange"!==this.type||t.querySelector("."+ye.rangeBar).classList.add(ye.sliderTabRange)),"Range"===this.type&&(e.target.previousSibling.classList.contains(ye.sliderHandle)?this.activeHandle=2:this.activeHandle=1),this.getHandle().focus(),this.tooltipToggle(this.getHandle())}this.closeTooltip(),this.changeEvent("changed",e)},s.prototype.hover=function(e){t.isNullOrUndefined(e)||("mouseover"===e.type||"touchmove"===e.type||"mousemove"===e.type||"pointermove"===e.type||"touchstart"===e.type?this.sliderContainer.classList.add(ye.sliderHover):this.sliderContainer.classList.remove(ye.sliderHover))},s.prototype.sliderFocusOut=function(e){e.relatedTarget!==this.secondHandle&&e.relatedTarget!==this.firstHandle&&e.relatedTarget!==this.element&&e.relatedTarget!==this.firstBtn&&e.relatedTarget!==this.secondBtn&&(this.closeMaterialTooltip(),this.element.querySelector("."+ye.sliderTabHandle)&&this.element.querySelector("."+ye.sliderTabHandle).classList.remove(ye.sliderTabHandle),this.element.querySelector("."+ye.sliderTabTrack)&&(this.element.querySelector("."+ye.sliderTabTrack).classList.remove(ye.sliderTabTrack),"Range"!==this.type&&"MinRange"!==this.type||!this.element.querySelector("."+ye.sliderTabRange)||this.element.querySelector("."+ye.sliderTabRange).classList.remove(ye.sliderTabRange)),this.hiddenInput.focus(),this.hiddenInput.blur(),this.isElementFocused=!1)},s.prototype.removeElement=function(e){e.parentNode&&e.parentNode.removeChild(e)},s.prototype.changeSliderType=function(e,i){this.isMaterialTooltip&&this.materialHandle&&(this.sliderContainer.classList.remove(ye.materialSlider),this.removeElement(this.materialHandle),this.materialHandle=void 0),this.removeElement(this.firstHandle),this.firstHandle=void 0,"Default"!==e&&("Range"===e&&(this.removeElement(this.secondHandle),this.secondHandle=void 0),this.removeElement(this.rangeBar),this.rangeBar=void 0),this.tooltip.isVisible&&!t.isNullOrUndefined(this.tooltipObj)&&(this.tooltipObj.destroy(),this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0),this.limits.enabled&&("MinRange"===e||"Default"===e?t.isNullOrUndefined(this.limitBarFirst)||(this.removeElement(this.limitBarFirst),this.limitBarFirst=void 0):t.isNullOrUndefined(this.limitBarSecond)||(this.removeElement(this.limitBarSecond),this.limitBarSecond=void 0)),this.activeHandle=1,this.getThemeInitialization(),"Range"===this.type&&this.rangeValueUpdate(),this.createRangeBar(),this.limits.enabled&&this.createLimitBar(),this.setHandler(),this.setOrientClass(),this.wireFirstHandleEvt(!1),"Range"===this.type&&this.wireSecondHandleEvt(!1),this.setValue(),this.tooltip.isVisible&&(this.renderTooltip(),this.wireMaterialTooltipEvent(!1)),this.setBarColor(),(t.isBlazor()||this.isServerRendered)&&"tooltip"===i||this.updateConfig()},s.prototype.changeRtl=function(){if(this.enableRtl||"Range"!==this.type||(this.value=[this.handleVal2,this.handleVal1]),this.updateConfig(),this.tooltip.isVisible&&this.tooltipObj.refresh(this.firstHandle),this.showButtons){var e=this.enableRtl&&"Vertical"!==this.orientation;t.attributes(e?this.secondBtn:this.firstBtn,{"aria-label":"Decrease",title:"Decrease"}),t.attributes(e?this.firstBtn:this.secondBtn,{"aria-label":"Increase",title:"Increase"})}},s.prototype.changeOrientation=function(){this.changeSliderType(this.type,"null")},s.prototype.updateConfig=function(){this.setEnableRTL(),this.setValue(),this.tooltip.isVisible&&(t.isBlazor()||this.refreshTooltip(this.tooltipTarget)),"None"!==this.ticks.placement&&this.ul&&(this.removeElement(this.ul),this.ul=void 0,this.renderScale()),this.limitsPropertyChange()},s.prototype.limitsPropertyChange=function(){this.limits.enabled?(t.isNullOrUndefined(this.limitBarFirst)&&"Range"!==this.type&&this.createLimitBar(),t.isNullOrUndefined(this.limitBarFirst)&&t.isNullOrUndefined(this.limitBarSecond)&&"Range"===this.type&&this.createLimitBar(),this.setLimitBar(),this.setValue()):(t.isNullOrUndefined(this.limitBarFirst)||t.detach(this.limitBarFirst),t.isNullOrUndefined(this.limitBarSecond)||t.detach(this.limitBarSecond))},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.unwireEvents(),window.removeEventListener("resize",this.onresize),t.removeClass([this.sliderContainer],[ye.sliderDisabled]),this.firstHandle.removeAttribute("aria-orientation"),"Range"===this.type&&this.secondHandle.removeAttribute("aria-orientation"),t.isBlazor()||this.isServerRendered||(this.sliderContainer.parentNode.insertBefore(this.element,this.sliderContainer),t.detach(this.sliderContainer)),this.tooltip.isVisible&&this.tooltipObj.destroy(),t.isBlazor()&&this.isMaterialTooltip&&!t.isNullOrUndefined(this.materialHandle)&&this.materialHandle.remove(),t.isBlazor()||this.isServerRendered||(this.element.innerHTML="")},s.prototype.onPropertyChanged=function(e,i){for(var s=this,n=0,a=Object.keys(e);n<a.length;n++){var r=a[n];switch(r){case"cssClass":this.setCSSClass(i.cssClass);break;case"value":if(e&&i){var l=t.isNullOrUndefined(e.value)?"Range"===this.type?[this.min,this.max]:this.min:e.value;this.setProperties({value:l},!0),t.isNullOrUndefined(i.value)||i.value.toString()===l.toString()||(this.setValue(),t.isBlazor()&&this.isServerRendered||this.refreshTooltip(this.tooltipTarget),"Range"===this.type&&(t.isNullOrUndefined(e.value)||i.value[1]===l[1]?this.activeHandle=1:this.activeHandle=2))}break;case"min":case"step":case"max":t.isBlazor()&&this.isServerRendered&&(this.isServerRendered=!1),this.setMinMaxValue(),t.isBlazor()&&!this.isServerRendered&&(this.isServerRendered=!0);break;case"tooltip":t.isBlazor()&&this.isServerRendered&&(this.isServerRendered=!1),t.isNullOrUndefined(e.tooltip)||t.isNullOrUndefined(i.tooltip)||this.setTooltip(r),t.isBlazor()&&!this.isServerRendered&&(this.isServerRendered=!0);break;case"type":t.isBlazor()&&this.isServerRendered&&(this.isServerRendered=!1),t.isNullOrUndefined(i)||!Object.keys(i).length||t.isNullOrUndefined(i.type)||(this.changeSliderType(i.type,r),this.setZindex()),t.isBlazor()&&!this.isServerRendered&&(this.isServerRendered=!0);break;case"enableRtl":t.isBlazor()&&this.isServerRendered&&(this.isMaterialTooltip&&this.sliderContainer.classList.add(ye.materialSlider),this.isServerRendered=!1),i.enableRtl!==e.enableRtl&&"Vertical"!==this.orientation&&(this.rtl=i.enableRtl,this.changeRtl()),t.isBlazor()&&!this.isServerRendered&&(this.isServerRendered=!0);break;case"limits":this.limitsPropertyChange();break;case"orientation":t.isBlazor()&&this.isServerRendered&&(this.isServerRendered=!1),this.changeOrientation(),t.isBlazor()&&!this.isServerRendered&&(this.isServerRendered=!0);break;case"ticks":t.isNullOrUndefined(this.sliderContainer.querySelector("."+ye.scale))||(t.isBlazor()&&this.isServerRendered||t.detach(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,function(e){e.match(/e-scale-/)&&s.sliderContainer.classList.remove(e)})),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex());break;case"locale":this.showButtons&&this.buttonTitle();break;case"showButtons":e.showButtons?(this.setButtons(),this.reposition(),this.enabled&&!this.readonly&&this.wireButtonEvt(!1)):t.isBlazor()&&this.isServerRendered||this.firstBtn&&this.secondBtn&&(this.sliderContainer.removeChild(this.firstBtn),this.sliderContainer.removeChild(this.secondBtn),this.sliderContainer.classList.remove(ye.sliderButtonClass),this.firstBtn=void 0,this.secondBtn=void 0,this.reposition()),t.isBlazor()&&this.isServerRendered&&this.isMaterialTooltip&&this.sliderContainer.classList.add(ye.materialSlider);break;case"enabled":this.setEnabled(),t.isBlazor()&&this.isServerRendered&&this.isMaterialTooltip&&this.sliderContainer.classList.add(ye.materialSlider);break;case"readonly":this.setReadOnly(),t.isBlazor()&&this.isServerRendered&&this.isMaterialTooltip&&this.sliderContainer.classList.add(ye.materialSlider);break;case"customValues":t.isBlazor()&&this.isServerRendered&&(this.isServerRendered=!1),this.setValue(),this.reposition(),t.isBlazor()&&!this.isServerRendered&&(this.isServerRendered=!0);break;case"colorRange":t.isBlazor()&&this.isServerRendered&&(this.isServerRendered=!1),this.reposition(),t.isBlazor()&&!this.isServerRendered&&(this.isServerRendered=!0);break;case"width":this.setElementWidth(e.width),this.setMinMaxValue(),this.limits&&this.limitsPropertyChange()}}},s.prototype.setReadOnly=function(){this.readonly?(this.unwireEvents(),this.sliderContainer.classList.add(ye.readonly)):(this.wireEvents(),this.sliderContainer.classList.remove(ye.readonly))},s.prototype.setMinMaxValue=function(){var e=this;this.setValue(),t.isBlazor()||this.refreshTooltip(this.tooltipTarget),t.isNullOrUndefined(this.sliderContainer.querySelector("."+ye.scale))||this.ul&&(t.detach(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,function(t){t.match(/e-scale-/)&&e.sliderContainer.classList.remove(t)})),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex())},s.prototype.setZindex=function(){this.zIndex=6,t.isNullOrUndefined(this.ticks)||"None"===this.ticks.placement||(this.ul.style.zIndex=this.zIndex+-7+"",this.element.style.zIndex=this.zIndex+2+""),this.isMaterial||t.isNullOrUndefined(this.ticks)||"Both"!==this.ticks.placement||(this.element.style.zIndex=this.zIndex+2+""),this.firstHandle.style.zIndex=this.zIndex+3+"","Range"===this.type&&(this.secondHandle.style.zIndex=this.zIndex+4+"")},s.prototype.setTooltip=function(e){this.changeSliderType(this.type,e)},s.prototype.setBarColor=function(){for(var e,i,s=this.sliderTrack.lastElementChild;s;)this.sliderTrack.removeChild(s),s=this.sliderTrack.lastElementChild;for(var n=0;n<this.colorRange.length;n++)if(!t.isNullOrUndefined(this.colorRange[n].start)&&!t.isNullOrUndefined(this.colorRange[n].end)&&this.colorRange[n].end>this.colorRange[n].start){this.colorRange[n].start<this.min&&(this.colorRange[n].start=this.min),this.colorRange[n].end>this.max&&(this.colorRange[n].end=this.max);var a=this.checkHandlePosition(this.colorRange[n].start),r=this.checkHandlePosition(this.colorRange[n].end),l=this.createElement("div");l.style.backgroundColor=this.colorRange[n].color,l.style.border="1px solid "+this.colorRange[n].color,"Horizontal"===this.orientation?(i=ye.sliderHorizantalColor,e=this.enableRtl?t.isNullOrUndefined(this.customValues)?this.checkHandlePosition(this.max)-this.checkHandlePosition(this.colorRange[n].end):this.checkHandlePosition(this.customValues.length-this.colorRange[n].end-1):this.checkHandlePosition(this.colorRange[n].start),l.style.width=r-a+"px",l.style.left=e+"px"):(i=ye.sliderVerticalColor,e=this.checkHandlePosition(this.colorRange[n].start),l.style.height=r-a+"px",l.style.bottom=e+"px"),l.classList.add(i),this.sliderTrack.appendChild(l)}},s.prototype.getModuleName=function(){return"slider"},pe([t.Property(null)],s.prototype,"value",void 0),pe([t.Property(null)],s.prototype,"customValues",void 0),pe([t.Property(1)],s.prototype,"step",void 0),pe([t.Property(null)],s.prototype,"width",void 0),pe([t.Property(0)],s.prototype,"min",void 0),pe([t.Property(100)],s.prototype,"max",void 0),pe([t.Property(!1)],s.prototype,"readonly",void 0),pe([t.Property("Default")],s.prototype,"type",void 0),pe([t.Collection([{}],ve)],s.prototype,"colorRange",void 0),pe([t.Complex({},me)],s.prototype,"ticks",void 0),pe([t.Complex({},fe)],s.prototype,"limits",void 0),pe([t.Property(!0)],s.prototype,"enabled",void 0),pe([t.Complex({},ge)],s.prototype,"tooltip",void 0),pe([t.Property(!1)],s.prototype,"showButtons",void 0),pe([t.Property(!0)],s.prototype,"enableAnimation",void 0),pe([t.Property("Horizontal")],s.prototype,"orientation",void 0),pe([t.Property("")],s.prototype,"cssClass",void 0),pe([t.Property(!1)],s.prototype,"enableHtmlSanitizer",void 0),pe([t.Event()],s.prototype,"created",void 0),pe([t.Event()],s.prototype,"change",void 0),pe([t.Event()],s.prototype,"changed",void 0),pe([t.Event()],s.prototype,"renderingTicks",void 0),pe([t.Event()],s.prototype,"renderedTicks",void 0),pe([t.Event()],s.prototype,"tooltipChange",void 0),s=pe([t.NotifyPropertyChanges],s)}(t.Component),Ee=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Ce=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Se={EMAIL:new RegExp("^[A-Za-z0-9._%+-]{1,}@[A-Za-z0-9._%+-]{1,}([.]{1}[a-zA-Z0-9]{2,}|[.]{1}[a-zA-Z0-9]{2,4}[.]{1}[a-zA-Z0-9]{2,4})$"),URL:/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:\/?#[\]@!\$&'\(\)\*\+,;=.]+$/m,DATE_ISO:new RegExp("^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$"),DIGITS:new RegExp("^[0-9]*$"),PHONE:new RegExp("^[+]?[0-9]{9,13}$"),CREDITCARD:new RegExp("^\\d{13,16}$")};!function(e){e[e.Message=0]="Message",e[e.Label=1]="Label"}(e.ErrorOption||(e.ErrorOption={}));var Te=function(i){function s(e,s){var n=i.call(this,s,e)||this;if(n.validated=[],n.errorRules=[],n.allowSubmit=!1,n.required="required",n.infoElement=null,n.inputElement=null,n.selectQuery="input:not([type=reset]):not([type=button]), select, textarea",n.localyMessage={},n.defaultMessages={required:"This field is required.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateIso:"Please enter a valid date ( ISO ).",creditcard:"Please enter valid card number",number:"Please enter a valid number.",digits:"Please enter only digits.",maxLength:"Please enter no more than {0} characters.",minLength:"Please enter at least {0} characters.",rangeLength:"Please enter a value between {0} and {1} characters long.",range:"Please enter a value between {0} and {1}.",max:"Please enter a value less than or equal to {0}.",min:"Please enter a value greater than or equal to {0}.",regex:"Please enter a correct value.",tel:"Please enter a valid phone number.",pattern:"Please enter a correct pattern value.",equalTo:"Please enter the valid match text"},void 0===n.rules&&(n.rules={}),n.l10n=new t.L10n("formValidator",n.defaultMessages,n.locale),n.locale&&n.localeFunc(),t.onIntlChange.on("notifyExternalChange",n.afterLocalization,n),e="string"==typeof e?t.select(e,document):e,null!=n.element)return n.element.setAttribute("novalidate",""),n.inputElements=t.selectAll(n.selectQuery,n.element),n.createHTML5Rules(),n.wireEvents(),n}Ee(s,i),n=s,s.prototype.addRules=function(e,i){e&&(this.rules.hasOwnProperty(e)?t.extend(this.rules[e],i,{}):this.rules[e]=i)},s.prototype.removeRules=function(e,i){if(e||i)if(this.rules[e]&&!i)delete this.rules[e];else{if(t.isNullOrUndefined(this.rules[e]&&i))return;for(var s=0;s<i.length;s++)delete this.rules[e][i[s]]}else this.rules={}},s.prototype.validate=function(e){var t=Object.keys(this.rules);if(e&&t.length)return this.validateRules(e),-1!==t.indexOf(e)&&0===this.errorRules.filter(function(t){return t.name===e}).length;this.errorRules=[];for(var i=0,s=t;i<s.length;i++){var n=s[i];this.validateRules(n)}return 0===this.errorRules.length},s.prototype.reset=function(){this.element.reset(),this.clearForm()},s.prototype.getInputElement=function(e){return this.inputElement=t.select('[name="'+e+'"]',this.element),this.inputElement},s.prototype.destroy=function(){this.reset(),this.unwireEvents(),this.rules={};for(var e=0,s=t.selectAll("."+this.errorClass+", ."+this.validClass,this.element);e<s.length;e++){var n=s[e];t.detach(n)}i.prototype.destroy.call(this),t.onIntlChange.off("notifyExternalChange",this.afterLocalization)},s.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"locale":this.localeFunc()}},s.prototype.localeFunc=function(){for(var e=0,t=Object.keys(this.defaultMessages);e<t.length;e++){var i=t[e];this.l10n.setLocale(this.locale);var s=this.l10n.getConstant(i);this.localyMessage[i]=s}},s.prototype.getModuleName=function(){return"formValidator"},s.prototype.afterLocalization=function(e){this.locale=e.locale,this.localeFunc()},s.prototype.refresh=function(){this.unwireEvents(),this.inputElements=t.selectAll(this.selectQuery,this.element),this.wireEvents()},s.prototype.clearForm=function(){this.errorRules=[],this.validated=[];for(var e=0,i=t.selectAll(this.selectQuery,this.element);e<i.length;e++){var s=i[e];s.removeAttribute("aria-invalid"),s.classList.remove(this.errorClass),s.name.length>0&&(this.getInputElement(s.name),this.getErrorElement(s.name),this.hideMessage(s.name)),s.classList.remove(this.validClass)}},s.prototype.createHTML5Rules=function(){for(var e=["required","validateHidden","regex","rangeLength","maxLength","minLength","dateIso","digits","pattern","data-val-required","type","data-validation","min","max","range","equalTo","data-val-minlength-min","data-val-equalto-other","data-val-maxlength-max","data-val-range-min","data-val-regex-pattern","data-val-length-max","data-val-creditcard","data-val-phone"],t=["hidden","email","url","date","number","tel"],i=0,s=this.inputElements;i<s.length;i++){for(var n=s[i],a={},r=0,l=e;r<l.length;r++){var o=l[r];if(null!==n.getAttribute(o))switch(o){case"required":this.defRule(n,a,o,n.required);break;case"data-validation":o=n.getAttribute(o),this.defRule(n,a,o,!0);break;case"type":-1!==t.indexOf(n.type)&&this.defRule(n,a,n.type,!0);break;case"rangeLength":case"range":this.defRule(n,a,o,JSON.parse(n.getAttribute(o)));break;case"equalTo":var h=n.getAttribute(o);this.defRule(n,a,o,h);break;default:"true"===n.getAttribute("data-val")?this.annotationRule(n,a,o,n.getAttribute(o)):this.defRule(n,a,o,n.getAttribute(o))}}0!==Object.keys(a).length&&this.addRules(n.name,a)}},s.prototype.annotationRule=function(e,t,i,s){var n=i.split("-"),a=["required","creditcard","phone","maxlength","minlength","range","regex","equalto"],r=n[n.length-1],l=n[n.length-2];if(-1!==a.indexOf(r))switch(r){case"required":this.defRule(e,t,"required",s);break;case"creditcard":this.defRule(e,t,"creditcard",s);break;case"phone":this.defRule(e,t,"tel",s)}else if(-1!==a.indexOf(l))switch(l){case"maxlength":this.defRule(e,t,"maxLength",s);break;case"minlength":this.defRule(e,t,"minLength",s);break;case"range":var o=e.getAttribute("data-val-range-min"),h=e.getAttribute("data-val-range-max");this.defRule(e,t,"range",[o,h]);break;case"equalto":var d=e.getAttribute(i).split(".");this.defRule(e,t,"equalTo",d[d.length-1]);break;case"regex":this.defRule(e,t,"regex",s)}},s.prototype.defRule=function(e,t,i,s){var n,a=e.getAttribute("data-"+i+"-message"),r=e.getAttribute("data-val-"+i);this.rules[e.name]&&"validateHidden"!==i&&"hidden"!==i&&(this.getInputElement(e.name),n=this.getErrorMessage(this.rules[e.name][i],i)),a?s=[s,a]:r?s=[s,r]:n&&(s=[s,n]),t[i]=s},s.prototype.wireEvents=function(){for(var e=0,i=this.inputElements;e<i.length;e++){var s=i[e];n.isCheckable(s)?t.EventHandler.add(s,"click",this.clickHandler,this):"SELECT"===s.tagName?t.EventHandler.add(s,"change",this.changeHandler,this):(t.EventHandler.add(s,"focusout",this.focusOutHandler,this),t.EventHandler.add(s,"keyup",this.keyUpHandler,this))}t.EventHandler.add(this.element,"submit",this.submitHandler,this),t.EventHandler.add(this.element,"reset",this.resetHandler,this)},s.prototype.unwireEvents=function(){for(var e=0,i=this.inputElements;e<i.length;e++){var s=i[e];t.EventHandler.clearEvents(s)}t.EventHandler.remove(this.element,"submit",this.submitHandler),t.EventHandler.remove(this.element,"reset",this.resetHandler)},s.prototype.focusOutHandler=function(e){this.trigger("focusout",e);var t=e.target;this.rules[t.name]&&(this.rules[t.name][this.required]||t.value.length>0?this.validate(t.name):-1===this.validated.indexOf(t.name)&&this.validated.push(t.name))},s.prototype.keyUpHandler=function(e){this.trigger("keyup",e);var t=e.target,i=[16,17,18,20,35,36,37,38,39,40,45,144,225];(9!==e.which||this.rules[t.name]&&(!this.rules[t.name]||this.rules[t.name][this.required]))&&-1!==this.validated.indexOf(t.name)&&this.rules[t.name]&&-1===i.indexOf(e.which)&&this.validate(t.name)},s.prototype.clickHandler=function(e){this.trigger("click",e);var t=e.target;"submit"!==t.type?this.validate(t.name):null!==t.getAttribute("formnovalidate")&&(this.allowSubmit=!0)},s.prototype.changeHandler=function(e){this.trigger("change",e);var t=e.target;this.validate(t.name)},s.prototype.submitHandler=function(e){this.trigger("submit",e),this.allowSubmit||this.validate()?this.allowSubmit=!1:e.preventDefault()},s.prototype.resetHandler=function(){this.clearForm()},s.prototype.validateRules=function(e){if(this.rules[e]){var t=Object.keys(this.rules[e]),i=!1,s=!1,n=t.indexOf("validateHidden"),a=t.indexOf("hidden");if(this.getInputElement(e),-1!==a&&(i=!0),-1!==n&&(s=!0),!i||i&&s){-1!==n&&t.splice(n,1),-1!==a&&t.splice(a-1,1),this.getErrorElement(e);for(var r=0,l=t;r<l.length;r++){var o=l[r],h=this.getErrorMessage(this.rules[e][o],o),d={name:e,message:h},u={inputName:e,element:this.inputElement,message:h};if(!this.isValid(e,o)&&!this.inputElement.classList.contains(this.ignore)){this.removeErrorRules(e),this.errorRules.push(d),this.inputElement.setAttribute("aria-invalid","true"),this.inputElement.setAttribute("aria-describedby",this.inputElement.id+"-info"),this.inputElement.classList.add(this.errorClass),this.inputElement.classList.remove(this.validClass),this.infoElement?this.showMessage(d):this.createErrorElement(e,d.message,this.inputElement),u.errorElement=this.infoElement,u.status="failure",this.inputElement.classList.add(this.errorClass),this.inputElement.classList.remove(this.validClass),this.optionalValidationStatus(e,u),this.trigger("validationComplete",u),"required"===o&&this.inputElement.setAttribute("aria-required","true");break}this.hideMessage(e),u.status="success",this.trigger("validationComplete",u)}}}},s.prototype.optionalValidationStatus=function(e,i){this.rules[e][this.required]||this.inputElement.value.length||t.isNullOrUndefined(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),i.status="",this.hideMessage(e))},s.prototype.isValid=function(e,i){var s=this.rules[e][i],a=s instanceof Array&&"string"==typeof s[1]?s[0]:s,r=this.rules[e][i],l={value:this.inputElement.value,param:a,element:this.inputElement,formElement:this.element};return this.trigger("validationBegin",l),!l.param&&"required"===i||(r&&"function"==typeof r[0]?r[0].call(this,{element:this.inputElement,value:this.inputElement.value}):n.isCheckable(this.inputElement)?"required"!==i||t.selectAll('input[name="'+e+'"]:checked',this.element).length>0:n.checkValidator[i](l))},s.prototype.getErrorMessage=function(e,i){var s=this.inputElement.getAttribute("data-"+i+"-message")?this.inputElement.getAttribute("data-"+i+"-message"):e instanceof Array&&"string"==typeof e[1]?e[1]:0!==Object.keys(this.localyMessage).length?this.localyMessage[i]:this.defaultMessages[i],n=s.match(/{(\d)}/g);if(!t.isNullOrUndefined(n))for(var a=0;a<n.length;a++){var r=e instanceof Array?e[a]:e;s=s.replace(n[a],r)}return s},s.prototype.createErrorElement=function(i,s,n){var a=t.createElement(this.errorElement,{className:this.errorClass,innerHTML:s,attrs:{for:i}});if(this.errorOption===e.ErrorOption.Message&&(a.classList.remove(this.errorClass),a.classList.add("e-message"),a=t.createElement(this.errorContainer,{className:this.errorClass,innerHTML:a.outerHTML})),a.id=this.inputElement.name+"-info",this.element.querySelector('[data-valmsg-for="'+n.id+'"]'))this.element.querySelector('[data-valmsg-for="'+n.id+'"]').appendChild(a);else if(!0===n.hasAttribute("data-msg-containerid")){var r=n.getAttribute("data-msg-containerid");t.select("#"+r,this.element).appendChild(a)}else null!=this.customPlacement?this.customPlacement.call(this,this.inputElement,a):this.inputElement.parentNode.insertBefore(a,this.inputElement.nextSibling);a.style.display="block",this.getErrorElement(i),this.validated.push(i),this.checkRequired(i)},s.prototype.getErrorElement=function(e){return this.infoElement=t.select(this.errorElement+"."+this.errorClass,this.inputElement.parentElement),this.infoElement||(this.infoElement=t.select(this.errorElement+"."+this.errorClass+'[for="'+e+'"]',this.element)),this.infoElement},s.prototype.removeErrorRules=function(e){for(var t=0;t<this.errorRules.length;t++)this.errorRules[t].name===e&&this.errorRules.splice(t,1)},s.prototype.showMessage=function(e){this.infoElement.style.display="block",this.infoElement.innerHTML=e.message,this.checkRequired(e.name)},s.prototype.hideMessage=function(e){this.infoElement&&(this.infoElement.style.display="none",this.removeErrorRules(e),this.inputElement.classList.add(this.validClass),this.inputElement.classList.remove(this.errorClass),this.inputElement.setAttribute("aria-invalid","false"))},s.prototype.checkRequired=function(e){this.rules[e][this.required]||this.inputElement.value.length||t.isNullOrUndefined(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),this.hideMessage(e))},s.isCheckable=function(e){var t=e.getAttribute("type");return t&&("checkbox"===t||"radio"===t||"submit"===t)};var n;return s.checkValidator={required:function(e){return isNaN(Date.parse(e.value))?e.value.toString().length>0:!isNaN(new Date(e.value).getTime())},email:function(e){return Se.EMAIL.test(e.value)},url:function(e){return Se.URL.test(e.value)},dateIso:function(e){return Se.DATE_ISO.test(e.value)},tel:function(e){return Se.PHONE.test(e.value)},creditcard:function(e){return Se.CREDITCARD.test(e.value)},number:function(e){return!isNaN(Number(e.value))&&-1===e.value.indexOf(" ")},digits:function(e){return Se.DIGITS.test(e.value)},maxLength:function(e){return e.value.length<=e.param},minLength:function(e){return e.value.length>=e.param},rangeLength:function(e){var t=e.param;return e.value.length>=t[0]&&e.value.length<=t[1]},range:function(e){var t=e.param;return!isNaN(Number(e.value))&&Number(e.value)>=t[0]&&Number(e.value)<=t[1]},date:function(e){return!isNaN(new Date(e.value).getTime())},max:function(e){return isNaN(Number(e.value))?new Date(e.value).getTime()<=new Date(JSON.parse(JSON.stringify(e.param))).getTime():+e.value<=e.param},min:function(e){if(isNaN(Number(e.value))){if(-1!==e.value.indexOf(",")){var t=e.value.replace(/,/g,"");return parseFloat(t)>=e.param}return new Date(e.value).getTime()>=new Date(JSON.parse(JSON.stringify(e.param))).getTime()}return+e.value>=e.param},regex:function(e){return new RegExp(e.param).test(e.value)},equalTo:function(e){var t=e.formElement.querySelector("#"+e.param);return e.param=t.value,e.param===e.value}},Ce([t.Property("")],s.prototype,"locale",void 0),Ce([t.Property("e-hidden")],s.prototype,"ignore",void 0),Ce([t.Property()],s.prototype,"rules",void 0),Ce([t.Property("e-error")],s.prototype,"errorClass",void 0),Ce([t.Property("e-valid")],s.prototype,"validClass",void 0),Ce([t.Property("label")],s.prototype,"errorElement",void 0),Ce([t.Property("div")],s.prototype,"errorContainer",void 0),Ce([t.Property(e.ErrorOption.Label)],s.prototype,"errorOption",void 0),Ce([t.Event()],s.prototype,"focusout",void 0),Ce([t.Event()],s.prototype,"keyup",void 0),Ce([t.Event()],s.prototype,"click",void 0),Ce([t.Event()],s.prototype,"change",void 0),Ce([t.Event()],s.prototype,"submit",void 0),Ce([t.Event()],s.prototype,"validationBegin",void 0),Ce([t.Event()],s.prototype,"validationComplete",void 0),Ce([t.Event()],s.prototype,"customPlacement",void 0),s=n=Ce([t.NotifyPropertyChanges],s)}(t.Base),ke=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),xe=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Oe="e-upload-file-list",Pe="e-file-status",Le="e-file-remove-btn",Be="e-file-delete-btn",Ae="e-file-abort-btn",He="e-file-reload-btn",Ne="e-upload-progress-wrap",we="e-upload-progress-bar",Ue="e-upload-success",Re="e-upload-fails",Fe="e-file-pause-btn",Ve=["title","style","class"],Me=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ke(i,e),xe([t.Property("")],i.prototype,"name",void 0),xe([t.Property(null)],i.prototype,"size",void 0),xe([t.Property("")],i.prototype,"type",void 0),i}(t.ChildProperty),De=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ke(i,e),xe([t.Property("Browse...")],i.prototype,"browse",void 0),xe([t.Property("Upload")],i.prototype,"upload",void 0),xe([t.Property("Clear")],i.prototype,"clear",void 0),i}(t.ChildProperty),Ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ke(i,e),xe([t.Property("")],i.prototype,"saveUrl",void 0),xe([t.Property("")],i.prototype,"removeUrl",void 0),xe([t.Property(0)],i.prototype,"chunkSize",void 0),xe([t.Property(3)],i.prototype,"retryCount",void 0),xe([t.Property(500)],i.prototype,"retryAfterDelay",void 0),i}(t.ChildProperty),ze=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.initialAttr={accept:null,multiple:!1,disabled:!1},s.uploadedFilesData=[],s.base64String=[],s.isForm=!1,s.allTypes=!1,s.pausedData=[],s.uploadMetaData=[],s.tabIndex="0",s.btnTabIndex="0",s.disableKeyboardNavigation=!1,s.count=-1,s.actionCompleteCount=0,s.flag=!0,s.selectedFiles=[],s.uploaderName="UploadFiles",s.fileStreams=[],s.newFileRef=0,s.isFirstFileOnSelection=!1,s.dragCounter=0,s.fileList=[],s.filesData=[],s.uploaderOptions=t,s}return ke(s,e),s.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"allowedExtensions":this.setExtensions(this.allowedExtensions),this.clearAll();break;case"enabled":this.setControlStatus();break;case"multiple":this.setMultipleSelection();break;case"enableRtl":this.setRTL(),this.reRenderFileList();break;case"buttons":this.buttons.browse=t.isNullOrUndefined(this.buttons.browse)?"":this.buttons.browse,this.buttons.clear=t.isNullOrUndefined(this.buttons.clear)?"":this.buttons.clear,this.buttons.upload=t.isNullOrUndefined(this.buttons.upload)?"":this.buttons.upload,this.renderButtonTemplates();break;case"dropArea":this.unBindDropEvents(),this.updateDropArea();break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkHTMLAttributes(!0);break;case"files":this.renderPreLoadFiles();break;case"directoryUpload":this.updateDirectoryAttributes();break;case"template":this.isServerBlazor||this.clearAll();break;case"minFileSize":case"maxFileSize":case"autoUpload":case"sequentialUpload":this.clearAll();break;case"locale":this.l10n.setLocale(this.locale),this.setLocalizedTexts(),this.preLocaleObj=t.getValue("currentLocale",this.l10n);break;case"cssClass":this.setCSSClass(i.cssClass)}},s.prototype.setLocalizedTexts=function(){t.isNullOrUndefined(this.template)&&("string"==typeof this.buttons.browse&&(this.browseButton.innerText="Browse..."===this.buttons.browse?this.localizedTexts("Browse"):this.buttons.browse,this.browseButton.setAttribute("title",this.browseButton.innerText),this.uploadWrapper&&!t.isNullOrUndefined(this.uploadWrapper.querySelector(".e-file-drop"))&&(this.uploadWrapper.querySelector(".e-file-drop").innerHTML=this.localizedTexts("dropFilesHint"))),this.updateFileList())},s.prototype.getKeyValue=function(e){for(var t,i=0,s=Object.keys(this.preLocaleObj);i<s.length;i++){var n=s[i];this.preLocaleObj[n]===e&&(t=n)}return t},s.prototype.updateFileList=function(){if(this.fileList.length>0&&!t.isNullOrUndefined(this.uploadWrapper.querySelector(".e-upload-files")))for(var e=0;e<this.fileList.length;e++)this.fileList[e].querySelector(".e-file-status").innerHTML=this.localizedTexts(this.getKeyValue(this.filesData[e].status)),this.filesData[e].status=this.localizedTexts(this.getKeyValue(this.filesData[e].status)),this.fileList[e].classList.contains(Ue)&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("delete")),this.fileList[e].querySelector(".e-file-play-btn")&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("resume")),this.fileList[e].querySelector(".e-file-remove-btn")&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("remove")),this.fileList[e].querySelector(".e-file-reload-btn")&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("retry")),this.autoUpload||(this.uploadButton.innerText="Upload"===this.buttons.upload?this.localizedTexts("Upload"):this.buttons.upload,this.uploadButton.setAttribute("title",this.localizedTexts("Upload")),this.clearButton.innerText="Clear"===this.buttons.clear?this.localizedTexts("Clear"):this.buttons.clear,this.clearButton.setAttribute("title",this.localizedTexts("Clear")))},s.prototype.reRenderFileList=function(){this.listParent&&(t.detach(this.listParent),this.listParent=null,this.fileList=[],this.createFileList(this.filesData),this.actionButtons&&(this.removeActionButtons(),this.renderActionButtons(),this.checkActionButtonStatus()))},s.prototype.preRender=function(){if(this.localeText={Browse:"Browse...",Clear:"Clear",Upload:"Upload",dropFilesHint:"Or drop files here",invalidMaxFileSize:"File size is too large",invalidMinFileSize:"File size is too small",invalidFileType:"File type is not allowed",uploadFailedMessage:"File failed to upload",uploadSuccessMessage:"File uploaded successfully",removedSuccessMessage:"File removed successfully",removedFailedMessage:"Unable to remove file",inProgress:"Uploading",readyToUploadMessage:"Ready to upload",abort:"Abort",remove:"Remove",cancel:"Cancel",delete:"Delete file",pauseUpload:"File upload paused",pause:"Pause",resume:"Resume",retry:"Retry",fileUploadCancel:"File upload canceled",invalidFileSelection:"Invalid files selected",totalFiles:"Total files",size:"Size"},this.l10n=new t.L10n("uploader",this.localeText,this.locale),this.preLocaleObj=t.getValue("currentLocale",this.l10n),this.isServerBlazor=!(!t.isBlazor()||!this.isServerRendered),this.isBlazorTemplate=!(!this.isServerBlazor||""===this.template||t.isNullOrUndefined(this.template)),this.isBlazorSaveUrl=!(!this.isServerRendered||""!==this.asyncSettings.saveUrl&&!t.isNullOrUndefined(this.asyncSettings.saveUrl)),this.isBlazorSaveUrl&&this.sequentialUpload&&(this.sequentialUpload=!1),this.isBlazorSaveUrl||this.formRendered(),!this.isServerBlazor){this.updateHTMLAttrToElement(),this.checkHTMLAttributes(!1);var e=t.getValue("ej2_instances",this.element);if("EJS-UPLOADER"===this.element.tagName){var i=this.createElement("input",{attrs:{type:"file"}}),s=0;for(s;s<this.element.attributes.length;s++)i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML;i.hasAttribute("name")||i.setAttribute("name","UploadFiles"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}e[0].isPureReactComponent&&(t.isNullOrUndefined(e[0].props.name)?!t.isNullOrUndefined(e[0].props.id)&&t.isNullOrUndefined(e[0].props.name)?this.element.setAttribute("name",e[0].props.id):this.element.setAttribute("name","UploadFiles"):this.element.setAttribute("name",e[0].props.name)),t.isNullOrUndefined(this.element.getAttribute("name"))&&this.element.setAttribute("name",this.element.getAttribute("id")),this.element.hasAttribute("type")||this.element.setAttribute("type","file"),this.updateDirectoryAttributes()}this.keyConfigs={enter:"enter"},this.element.hasAttribute("tabindex")&&(this.tabIndex=this.element.getAttribute("tabindex")),this.browserName=t.Browser.info.name,this.uploaderName=this.element.getAttribute("name")},s.prototype.formRendered=function(){var e=t.closest(this.element,"form");if(!t.isNullOrUndefined(e))for(;e&&e!==document.documentElement;e=e.parentElement)"FORM"===e.tagName&&(this.isForm=!0,this.formElement=e,e.setAttribute("enctype","multipart/form-data"),e.setAttribute("encoding","multipart/form-data"))},s.prototype.getPersistData=function(){return this.addOnPersist(["filesData"])},s.prototype.getModuleName=function(){return"uploader"},s.prototype.updateDirectoryAttributes=function(){this.directoryUpload?(this.element.setAttribute("directory","true"),this.element.setAttribute("webkitdirectory","true")):(this.element.removeAttribute("directory"),this.element.removeAttribute("webkitdirectory"))},s.prototype.render=function(){this.isServerBlazor?(this.dropAreaWrapper=t.closest(this.element,".e-file-select-wrap"),this.uploadWrapper=t.closest(this.element,".e-upload.e-control-wrapper"),this.browseButton=this.dropAreaWrapper.querySelector("button.e-upload-browse-btn"),this.setDropArea(),this.renderPreLoadFiles(),this.wireEvents()):(this.renderBrowseButton(),this.initializeUpload(),this.updateHTMLAttrToWrapper(),this.wireEvents(),this.setMultipleSelection(),this.setExtensions(this.allowedExtensions),this.setRTL(),this.renderPreLoadFiles(),this.setControlStatus(),this.setCSSClass()),this.isServerBlazor&&this.renderComplete()},s.prototype.renderBrowseButton=function(){this.browseButton=this.createElement("button",{className:"e-css e-btn",attrs:{type:"button"}}),this.browseButton.setAttribute("tabindex",this.tabIndex),"string"==typeof this.buttons.browse?(this.browseButton.textContent="Browse..."===this.buttons.browse?this.localizedTexts("Browse"):this.buttons.browse,this.browseButton.setAttribute("title",this.browseButton.innerText)):this.browseButton.appendChild(this.buttons.browse),this.element.setAttribute("aria-label","Uploader")},s.prototype.renderActionButtons=function(){this.element.setAttribute("tabindex","-1"),this.isBlazorSaveUrl||this.isBlazorTemplate||(this.actionButtons=this.createElement("div",{className:"e-upload-actions"}),this.uploadButton=this.createElement("button",{className:"e-file-upload-btn e-css e-btn e-flat e-primary",attrs:{type:"button",tabindex:this.btnTabIndex}}),this.clearButton=this.createElement("button",{className:"e-file-clear-btn e-css e-btn e-flat",attrs:{type:"button",tabindex:this.btnTabIndex}}),this.actionButtons.appendChild(this.clearButton),this.actionButtons.appendChild(this.uploadButton),this.renderButtonTemplates(),this.uploadWrapper.appendChild(this.actionButtons),this.browseButton.blur(),this.uploadButton.focus(),this.wireActionButtonEvents())},s.prototype.serverActionButtonsEventBind=function(e){e&&!this.isForm&&(this.browseButton.blur(),this.actionButtons=e,this.uploadButton=this.actionButtons.querySelector(".e-file-upload-btn"),this.clearButton=this.actionButtons.querySelector(".e-file-clear-btn"),this.uploadButton.focus(),this.unwireActionButtonEvents(),this.wireActionButtonEvents(),this.checkActionButtonStatus())},s.prototype.serverUlElement=function(e){e&&(this.isBlazorSaveUrl||this.isBlazorTemplate)&&(this.listParent=e,this.fileList=[].slice.call(this.listParent.querySelectorAll("li")),this.serverRemoveIconBindEvent(),this.isForm||this.checkAutoUpload(this.filesData))},s.prototype.wireActionButtonEvents=function(){t.EventHandler.add(this.uploadButton,"click",this.uploadButtonClick,this),t.EventHandler.add(this.clearButton,"click",this.clearButtonClick,this)},s.prototype.unwireActionButtonEvents=function(){t.EventHandler.remove(this.uploadButton,"click",this.uploadButtonClick),t.EventHandler.remove(this.clearButton,"click",this.clearButtonClick)},s.prototype.removeActionButtons=function(){this.actionButtons&&(this.unwireActionButtonEvents(),this.isBlazorSaveUrl||this.isBlazorTemplate||t.detach(this.actionButtons),this.actionButtons=null)},s.prototype.renderButtonTemplates=function(){if("string"==typeof this.buttons.browse?(this.browseButton.textContent="Browse..."===this.buttons.browse?this.localizedTexts("Browse"):this.buttons.browse,this.browseButton.setAttribute("title",this.browseButton.textContent)):(this.browseButton.innerHTML="",this.browseButton.appendChild(this.buttons.browse)),this.uploadButton){var e=t.isNullOrUndefined(this.buttons.upload)?"Upload":this.buttons.upload;this.buttons.upload=e,"string"==typeof this.buttons.upload?(this.uploadButton.textContent="Upload"===this.buttons.upload?this.localizedTexts("Upload"):this.buttons.upload,this.uploadButton.setAttribute("title",this.uploadButton.textContent)):(this.uploadButton.innerHTML="",this.uploadButton.appendChild(this.buttons.upload))}if(this.clearButton){var i=t.isNullOrUndefined(this.buttons.clear)?"Clear":this.buttons.clear;this.buttons.clear=i,"string"==typeof this.buttons.clear?(this.clearButton.textContent="Clear"===this.buttons.clear?this.localizedTexts("Clear"):this.buttons.clear,this.clearButton.setAttribute("title",this.clearButton.textContent)):(this.clearButton.innerHTML="",this.clearButton.appendChild(this.buttons.clear))}},s.prototype.initializeUpload=function(){this.element.setAttribute("tabindex","-1");var e=this.createElement("span",{className:"e-file-select"});this.element.parentElement.insertBefore(e,this.element),this.dropAreaWrapper=this.createElement("div",{className:"e-file-select-wrap"}),this.element.parentElement.insertBefore(this.dropAreaWrapper,this.element),e.appendChild(this.element),this.dropAreaWrapper.appendChild(this.browseButton),this.dropAreaWrapper.appendChild(e),this.uploadWrapper=this.createElement("div",{className:"e-upload e-control-wrapper"}),this.dropAreaWrapper.parentElement.insertBefore(this.uploadWrapper,this.dropAreaWrapper),this.uploadWrapper.appendChild(this.dropAreaWrapper),this.setDropArea()},s.prototype.renderPreLoadFiles=function(){if(this.files.length){if(this.enablePersistence&&this.filesData.length)return void this.createFileList(this.filesData);if(t.isNullOrUndefined(this.files[0].size))return;var e=[].slice.call(this.files),i=[];this.multiple||(this.clearData(),e=[e[0]]);for(var s=0,n=e;s<n.length;s++){var a=n[s],r={name:a.name+"."+a.type.split(".")[a.type.split(".").length-1],rawFile:"",size:a.size,status:this.localizedTexts("uploadSuccessMessage"),type:a.type,validationMessages:{minSize:"",maxSize:""},statusCode:"2"};i.push(r),this.filesData.push(r)}this.createFileList(i),this.autoUpload||!this.listParent||this.actionButtons||this.isForm&&!this.allowUpload()||!this.showFileList||this.renderActionButtons(),this.checkActionButtonStatus(),this.sequentialUpload&&(this.count=this.filesData.length-1)}},s.prototype.checkActionButtonStatus=function(){if(this.actionButtons){var e=this.uploadWrapper.querySelectorAll(".e-validation-fails").length+this.uploadWrapper.querySelectorAll(".e-upload-fails:not(.e-upload-progress)").length+this.uploadWrapper.querySelectorAll("span."+Ue).length+this.uploadWrapper.querySelectorAll("span.e-upload-progress").length;e>0&&e===this.uploadWrapper.querySelectorAll("li").length?this.uploadButton.setAttribute("disabled","disabled"):this.uploadButton.removeAttribute("disabled")}},s.prototype.setDropArea=function(){var e=this.dropAreaWrapper.querySelector(".e-file-drop");if(this.dropArea){this.dropZoneElement="string"!=typeof this.dropArea?this.dropArea:t.select(this.dropArea,document);for(var i=this.element,s=!1;i.parentNode;)(i=i.parentNode)===this.dropZoneElement&&(s=!0,e?this.isServerBlazor||(e.innerHTML=this.localizedTexts("dropFilesHint")):this.createDropTextHint());!s&&e&&t.remove(e)}else t.isNullOrUndefined(this.uploaderOptions)||void 0!==this.uploaderOptions.dropArea||(this.createDropTextHint(),this.dropZoneElement=this.uploadWrapper,this.setProperties({dropArea:this.uploadWrapper},!0));this.bindDropEvents()},s.prototype.updateDropArea=function(){if(this.dropArea)this.setDropArea();else{this.dropZoneElement=null;var e=this.dropAreaWrapper.querySelector(".e-file-drop");e&&t.remove(e)}},s.prototype.createDropTextHint=function(){if(!this.isServerBlazor){var e=this.createElement("span",{className:"e-file-drop"});e.innerHTML=this.localizedTexts("dropFilesHint"),this.dropAreaWrapper.appendChild(e)}},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];Ve.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[s])}},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(Ve.indexOf(s)>-1)if("class"===s){var n=this.htmlAttributes[s].replace(/\s+/g," ").trim();""!==n&&t.addClass([this.uploadWrapper],n.split(" "))}else if("style"===s){var a=this.uploadWrapper.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[s]:a+this.htmlAttributes[s],this.uploadWrapper.setAttribute(s,a)}else this.uploadWrapper.setAttribute(s,this.htmlAttributes[s])}},s.prototype.setMultipleSelection=function(){if(this.multiple&&!this.element.hasAttribute("multiple")){var e=document.createAttribute("multiple");e.value="multiple",this.element.setAttributeNode(e)}else this.multiple||this.element.removeAttribute("multiple")},s.prototype.checkAutoUpload=function(e){this.autoUpload?(this.sequentialUpload?this.sequenceUpload(e):this.upload(e),this.removeActionButtons()):this.actionButtons||this.renderActionButtons(),this.checkActionButtonStatus()},s.prototype.sequenceUpload=function(e){if(this.filesData.length-e.length==0||"1"!==this.filesData[this.filesData.length-e.length-1].statusCode){++this.count;var t=!this.showFileList;"object"==typeof this.filesData[this.count]?(this.isFirstFileOnSelection=!1,this.upload(this.filesData[this.count],t),"0"===this.filesData[this.count].statusCode&&this.sequenceUpload(e)):--this.count}},s.prototype.setCSSClass=function(e){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.cssClass.replace(/\s+/g," ").trim()),t.isNullOrUndefined(this.cssClass)||""===i||t.addClass([this.uploadWrapper],i.split(i.indexOf(",")>-1?",":" "));var s=e;t.isNullOrUndefined(e)||(s=e.replace(/\s+/g," ").trim()),t.isNullOrUndefined(e)||""===s||t.removeClass([this.uploadWrapper],s.split(" "))},s.prototype.wireEvents=function(){t.EventHandler.add(this.browseButton,"click",this.browseButtonClick,this),t.EventHandler.add(this.element,"change",this.onSelectFiles,this),t.EventHandler.add(document,"click",this.removeFocus,this),this.keyboardModule=new t.KeyboardEvents(this.uploadWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.resetForm,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.browseButton,"click",this.browseButtonClick),t.EventHandler.remove(this.element,"change",this.onSelectFiles),t.EventHandler.remove(document,"click",this.removeFocus),this.isForm&&t.EventHandler.remove(this.formElement,"reset",this.resetForm),this.keyboardModule&&this.keyboardModule.destroy()},s.prototype.resetForm=function(){this.clearAll()},s.prototype.keyActionHandler=function(e){var i=e.target;switch(e.action){case"enter":if(e.target===this.clearButton)this.clearButtonClick();else if(e.target===this.uploadButton)this.uploadButtonClick();else if(e.target===this.browseButton)this.browseButtonClick();else if(i.classList.contains(Fe))(s=this.getCurrentMetaData(null,e)).file.statusCode="4",s.file.status=this.localizedTexts("pauseUpload"),this.abortUpload(s,!1);else if(i.classList.contains("e-file-play-btn"))this.resumeUpload(this.getCurrentMetaData(null,e),e);else if(i.classList.contains(He)){var s=this.getCurrentMetaData(null,e);if(t.isNullOrUndefined(s)){var n=e.target.parentElement,a=this.filesData[this.fileList.indexOf(n)];this.retry(a)}else s.file.statusCode="1",s.file.status=this.localizedTexts("readyToUploadMessage"),this.chunkUpload(s.file)}else this.removeFiles(e),i.classList.contains(Ae)||this.browseButton.focus();e.preventDefault(),e.stopPropagation()}},s.prototype.getCurrentMetaData=function(e,i){var s,n;if(t.isNullOrUndefined(e)){var a=i.target.parentElement;s=this.filesData[this.fileList.indexOf(a)]}else s=e;for(var r=0;r<this.uploadMetaData.length;r++)this.uploadMetaData[r].file.name===s.name&&(n=this.uploadMetaData[r]);return n},s.prototype.removeFocus=function(){this.uploadWrapper&&this.listParent&&this.listParent.querySelector(".e-clear-icon-focus")&&(document.activeElement.blur(),this.listParent.querySelector(".e-clear-icon-focus").classList.remove("e-clear-icon-focus"))},s.prototype.browseButtonClick=function(){this.element.click()},s.prototype.uploadButtonClick=function(){this.sequentialUpload?this.sequenceUpload(this.filesData):this.upload(this.filesData)},s.prototype.clearButtonClick=function(){this.clearAll(),this.sequentialUpload&&(this.count=-1),this.actionCompleteCount=0},s.prototype.bindDropEvents=function(){this.dropZoneElement&&(t.EventHandler.add(this.dropZoneElement,"drop",this.dropElement,this),t.EventHandler.add(this.dropZoneElement,"dragover",this.dragHover,this),t.EventHandler.add(this.dropZoneElement,"dragleave",this.onDragLeave,this),t.EventHandler.add(this.dropZoneElement,"paste",this.onPasteFile,this),t.EventHandler.add(this.dropZoneElement,"dragenter",this.onDragEnter,this))},s.prototype.unBindDropEvents=function(){this.dropZoneElement&&(t.EventHandler.remove(this.dropZoneElement,"drop",this.dropElement),t.EventHandler.remove(this.dropZoneElement,"dragover",this.dragHover),t.EventHandler.remove(this.dropZoneElement,"dragleave",this.onDragLeave),t.EventHandler.remove(this.dropZoneElement,"dragenter",this.onDragEnter))},s.prototype.onDragEnter=function(e){this.enabled&&(this.dropZoneElement.classList.add("e-upload-drag-hover"),this.dragCounter=this.dragCounter+1,e.preventDefault(),e.stopPropagation())},s.prototype.onDragLeave=function(){this.enabled&&(this.dragCounter=this.dragCounter-1,this.dragCounter||this.dropZoneElement.classList.remove("e-upload-drag-hover"))},s.prototype.dragHover=function(e){this.enabled&&("Default"!==this.dropEffect&&(e.dataTransfer.dropEffect=this.dropEffect.toLowerCase()),e.preventDefault(),e.stopPropagation())},s.prototype.dropElement=function(e){this.dragCounter=0,this.dropZoneElement.classList.remove("e-upload-drag-hover"),this.onSelectFiles(e),e.preventDefault(),e.stopPropagation()},s.prototype.onPasteFile=function(e){var t=e.clipboardData.items;if(1===t.length){var i=[].slice.call(t)[0];"file"===i.kind&&i.type.match("^image/")&&this.renderSelectedFiles(e,[i.getAsFile()],!1,!0)}},s.prototype.getSelectedFiles=function(e){for(var t=[],i=this.fileList[e],s=this.getFilesData(),n=+i.getAttribute("data-files-count"),a=0,r=0;r<e;r++)a+=+this.fileList[r].getAttribute("data-files-count");for(var l=a;l<a+n;l++)t.push(s[l]);return t},s.prototype.removeFiles=function(e){if(this.enabled){var s=e.target.parentElement;this.isBlazorSaveUrl&&(this.fileList=[].slice.call(this.uploadWrapper.querySelectorAll("li")));var n=this.fileList.indexOf(s),a=this.fileList[n],r=this.isFormUpload(),l=r?this.getSelectedFiles(n):this.getFilesInArray(this.filesData[n]);if(!t.isNullOrUndefined(l)){if(e.target.classList.contains(Ae)&&!r){if(l[0].statusCode="5",!t.isNullOrUndefined(a)){var o=a.querySelector("."+Ae);i.createSpinner({target:o,width:"20px"}),i.showSpinner(o)}this.sequentialUpload&&this.uploadSequential(),a.classList.contains("e-restrict-retry")||this.checkActionComplete(!0)}else t.closest(e.target,".e-spinner-pane")||this.remove(l,!1,!1,!0,e);this.element.value="",this.checkActionButtonStatus()}}},s.prototype.removeFilesData=function(e,i){var s;if(i)return void(this.showFileList||(s=this.filesData.indexOf(e),this.filesData.splice(s,1)));var n=this.getLiElement(e);t.isNullOrUndefined(n)||(this.isBlazorSaveUrl||t.detach(n),s=this.fileList.indexOf(n),this.fileList.splice(s,1),this.filesData.splice(s,1),this.isBlazorSaveUrl?this.interopAdaptor.invokeMethodAsync("removeFileData",s):(0!==this.fileList.length||t.isNullOrUndefined(this.listParent)||(t.detach(this.listParent),this.listParent=null,this.removeActionButtons()),this.sequentialUpload&&s<=this.count&&--this.count))},s.prototype.removeUploadedFile=function(e,i,s,n){var a=this,r=e,l=new t.Ajax(this.asyncSettings.removeUrl,"POST",!0,null);l.emitError=!1;var o=new FormData;if(l.beforeSend=function(n){i.currentRequest=l.httpRequest,t.isBlazor()&&(a.currentRequestHeader&&a.updateCustomheader(l.httpRequest,a.currentRequestHeader),a.customFormDatas&&a.updateFormData(o,a.customFormDatas)),s?a.removingEventCallback(i,o,r,e):a.trigger("removing",i,function(t){t.cancel?n.cancel=!0:a.removingEventCallback(t,o,r,e)})},this.isServerBlazor){var h=this.element.getAttribute("name");t.isNullOrUndefined(r.rawFile)||""===r.rawFile?o.append(h,r.name):o.append(h,r.rawFile,r.name)}l.onLoad=function(e){return a.removeCompleted(e,r,n),{}},l.onError=function(e){return a.removeFailed(e,r,n),{}},l.send(o)},s.prototype.removingEventCallback=function(e,s,n,a){var r=this.element.getAttribute("name"),l=this.getLiElement(a);if(!(t.isNullOrUndefined(l)||t.isNullOrUndefined(l.querySelector("."+Be))&&t.isNullOrUndefined(l.querySelector("."+Le)))){var o=l.querySelector("."+Be)?l.querySelector("."+Be):l.querySelector("."+Le);i.createSpinner({target:o,width:"20px"}),i.showSpinner(o)}this.isServerBlazor||(e.postRawFile&&!t.isNullOrUndefined(n.rawFile)&&""!==n.rawFile?s.append(r,n.rawFile,n.name):s.append(r,n.name),this.updateFormData(s,e.customFormData))},s.prototype.updateFormData=function(e,t){if(t.length>0&&t[0])for(var i=0;i<t.length;i++)!function(i){var s=t[i],n=Object.keys(s).map(function(e){return s[e]});e.append(Object.keys(s)[0],n)}(i)},s.prototype.updateCustomheader=function(e,t){if(t.length>0&&t[0])for(var i=0;i<t.length;i++)!function(i){var s=t[i],n=Object.keys(s).map(function(e){return s[e]});e.setRequestHeader(Object.keys(s)[0],n)}(i)},s.prototype.removeCompleted=function(e,t,i){var s=e&&e.currentTarget?this.getResponse(e):null,n=e.target;if(4===n.readyState&&n.status>=200&&n.status<=299){var a={e:e,response:s,operation:"remove",file:this.updateStatus(t,this.localizedTexts("removedSuccessMessage"),"2")};this.trigger("success",a),this.removeFilesData(t,i);var r=this.uploadedFilesData.indexOf(t);this.uploadedFilesData.splice(r,1),this.trigger("change",{files:this.uploadedFilesData})}else this.removeFailed(e,t,i)},s.prototype.removeFailed=function(e,s,n){var a={e:e,response:e&&e.currentTarget?this.getResponse(e):null,operation:"remove",file:this.updateStatus(s,this.localizedTexts("removedFailedMessage"),"0")};if(!n){var r=this.filesData.indexOf(s),l=this.fileList[r];if(l){l.classList.remove(Ue),l.classList.add(Re);var o=l.querySelector("."+Pe);o&&(o.classList.remove(Ue),o.classList.add(Re))}this.checkActionButtonStatus()}this.trigger("failure",a);var h=this.getLiElement(s);if(!t.isNullOrUndefined(h)&&!t.isNullOrUndefined(h.querySelector("."+Be))){var d=h.querySelector("."+Be);i.hideSpinner(d),t.detach(h.querySelector(".e-spinner-pane"))}},s.prototype.getFilesFromFolder=function(e){this.filesEntries=[];var t=this.multiple?e.dataTransfer.items:[e.dataTransfer.items[0]];if(this.checkDirectoryUpload(t))for(var i=this,s=0;s<t.length;s++)!function(s){var n=t[s].webkitGetAsEntry();if(n.isFile){var a=[];n.file(function(e){var t=n.fullPath;a.push({path:t,file:e})}),i.renderSelectedFiles(e,a,!0)}else n.isDirectory&&i.traverseFileTree(n,e)}(s)},s.prototype.checkDirectoryUpload=function(e){for(var t=0;e&&t<e.length;t++)if(e[t].webkitGetAsEntry().isDirectory)return!0;return!1},s.prototype.traverseFileTree=function(e,t){if(e.isFile)this.filesEntries.push(e);else if(e.isDirectory){var i=e.createReader();this.readFileFromDirectory(i,t)}},s.prototype.readFileFromDirectory=function(e,t){var i=this;e.readEntries(function(s){for(var n=0;n<s.length;n++)i.traverseFileTree(s[n],t);i.pushFilesEntries(t),s.length&&i.readFileFromDirectory(e)})},s.prototype.pushFilesEntries=function(e){for(var t=this,i=[],s=this,n=0;n<this.filesEntries.length;n++)!function(n){s.filesEntries[n].file(function(s){if(t.filesEntries.length){var a=t.filesEntries[n].fullPath;i.push({path:a,file:s}),n===t.filesEntries.length-1&&(t.filesEntries=[],t.renderSelectedFiles(e,i,!0))}})}(n)},s.prototype.onSelectFiles=function(e){if(this.enabled){var t;if("drop"===e.type)if(this.directoryUpload)this.getFilesFromFolder(e);else{var i=this.sortFilesList=e.dataTransfer.files;"msie"!==this.browserName&&"edge"!==this.browserName&&"safari"!==this.browserName&&(this.element.files=i),i.length>0&&(t=this.multiple?this.sortFileList(i):[i[0]],this.renderSelectedFiles(e,t))}else t=[].slice.call(e.target.files),this.renderSelectedFiles(e,t)}},s.prototype.getBase64=function(e){return new Promise(function(t,i){var s=new FileReader;s.readAsDataURL(e),s.onload=function(){return t(s.result)},s.onerror=function(e){return i(e)}})},s.prototype.renderSelectedFiles=function(e,t,i,s){var n=this;this.base64String=[];var a={event:e,cancel:!1,filesData:[],isModified:!1,modifiedFilesData:[],progressInterval:"",isCanceled:!1,currentRequest:null,customFormData:null};if(t.length<1)return a.isCanceled=!0,void this.trigger("selected",a);this.flag=!0;var r=[];this.multiple||(this.clearData(!0),t=[t[0]]);for(var l=0;l<t.length;l++){var o=i?t[l].file:t[l];this.updateInitialFileDetails(e,t,o,l,r,i,s)}a.filesData=r,this.allowedExtensions.indexOf("*")>-1&&(this.allTypes=!0),this.allTypes||(r=this.checkExtension(r)),this.trigger("selected",a,function(e){n._internalRenderSelect(e,r)})},s.prototype.updateInitialFileDetails=function(e,i,s,n,a,r,l){var o={name:r?i[n].path.substring(1,i[n].path.length):l?t.getUniqueID(s.name.substring(0,s.name.lastIndexOf(".")))+"."+this.getFileType(s.name):this.directoryUpload?i[n].webkitRelativePath:s.name,rawFile:s,size:s.size,status:this.localizedTexts("readyToUploadMessage"),type:this.getFileType(s.name),validationMessages:this.validatedFileSize(s.size),statusCode:"1",id:t.getUniqueID(s.name.substring(0,s.name.lastIndexOf(".")))+"."+this.getFileType(s.name)};l&&(o.fileSource="paste"),o.status=""!==o.validationMessages.minSize?this.localizedTexts("invalidMinFileSize"):""!==o.validationMessages.maxSize?this.localizedTexts("invalidMaxFileSize"):o.status,""===o.validationMessages.minSize&&""===o.validationMessages.maxSize||(o.statusCode="0"),a.push(o)},s.prototype._internalRenderSelect=function(e,i){if(!e.cancel){if(t.isBlazor()&&(this.currentRequestHeader=e.currentRequest,this.customFormDatas=e.customFormData),this.selectedFiles=this.selectedFiles.concat(i),this.btnTabIndex=this.disableKeyboardNavigation?"-1":"0",this.showFileList){if(e.isModified&&e.modifiedFilesData.length>0){for(var s=0;s<e.modifiedFilesData.length;s++)for(var n=0;n<i.length;n++)e.modifiedFilesData[s].id===i[n].id&&(e.modifiedFilesData[s].rawFile=i[n].rawFile);var a=this.allTypes?e.modifiedFilesData:this.checkExtension(e.modifiedFilesData);this.updateSortedFileList(a),this.filesData=a,this.isForm&&!this.allowUpload()||this.checkAutoUpload(a)}else this.createFileList(i,!0),this.isBlazorSaveUrl||this.isBlazorTemplate||(this.filesData=this.filesData.concat(i)),this.isForm&&!this.allowUpload()||this.isBlazorSaveUrl||this.isBlazorTemplate||this.checkAutoUpload(i);t.isNullOrUndefined(e.progressInterval)||""===e.progressInterval||(this.progressInterval=e.progressInterval)}else this.filesData=this.filesData.concat(i),this.isBlazorSaveUrl&&this.interopAdaptor.invokeMethodAsync("updateServerFileData",this.filesData,this.isForm),this.autoUpload&&this.upload(this.filesData,!0);this.raiseActionComplete(),this.isFirstFileOnSelection=!0}},s.prototype.allowUpload=function(){var e=!1;return this.isForm&&!t.isNullOrUndefined(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl&&(e=!0),e},s.prototype.isFormUpload=function(){var e=!1;return!this.isForm||!t.isNullOrUndefined(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl||!t.isNullOrUndefined(this.asyncSettings.removeUrl)&&""!==this.asyncSettings.removeUrl||(e=!0),e},s.prototype.clearData=function(e){t.isNullOrUndefined(this.listParent)||this.isBlazorSaveUrl||this.isBlazorTemplate||(t.detach(this.listParent),this.listParent=null),"msie"===this.browserName||e||(this.element.value=""),this.fileList=[],this.filesData=[],this.isBlazorSaveUrl||this.isBlazorTemplate?this.interopAdaptor.invokeMethodAsync("clearAll"):this.removeActionButtons()},s.prototype.updateSortedFileList=function(e){var i,s=this.createElement("div",{id:"clonewrapper"}),n=-1;if(this.listParent){for(var a=0;a<this.listParent.querySelectorAll("li").length;a++){var r=this.listParent.querySelectorAll("li")[a];s.appendChild(r.cloneNode(!0))}for(var l=0,o=i=this.listParent.querySelectorAll("li");l<o.length;l++){var h=o[l];t.detach(h)}this.removeActionButtons();var d=[].slice.call(s.childNodes);t.detach(this.listParent),this.listParent=null,this.fileList=[],this.createParentUL();for(var u=0;u<e.length;u++){for(var c=0;c<this.filesData.length;c++)this.filesData[c].name===e[u].name&&(this.listParent.appendChild(d[c]),t.EventHandler.add(d[c].querySelector(".e-icons"),"click",this.removeFiles,this),this.fileList.push(d[c]),n=u);n!==u&&this.createFileList([e[u]])}}else this.createFileList(e)},s.prototype.isBlank=function(e){return!e||/^\s*$/.test(e)},s.prototype.checkExtension=function(e){var t=e;if(!this.isBlank(this.allowedExtensions)){for(var i=[],s=0,n=this.allowedExtensions.split(",");s<n.length;s++){var a=n[s];i.push(a.trim().toLocaleLowerCase())}for(var r=0;r<e.length;r++)-1===i.indexOf(("."+e[r].type).toLocaleLowerCase())&&(e[r].status=this.localizedTexts("invalidFileType"),e[r].statusCode="0")}return t},s.prototype.validatedFileSize=function(e){var t="",i="";return e<this.minFileSize?t=this.localizedTexts("invalidMinFileSize"):e>this.maxFileSize?i=this.localizedTexts("invalidMaxFileSize"):(t="",i=""),{minSize:t,maxSize:i}},s.prototype.isPreLoadFile=function(e){for(var t=!1,i=0;i<this.files.length;i++)this.files[i].name===e.name.slice(0,e.name.lastIndexOf("."))&&this.files[i].type===e.type&&(t=!0);return t},s.prototype.createCustomfileList=function(e){this.createParentUL(),t.resetBlazorTemplate(this.element.id+"Template","Template");for(var i=0,s=e;i<s.length;i++){var n=s[i],a=this.createElement("li",{className:Oe,attrs:{"data-file-name":n.name}});this.uploadTemplateFn=this.templateComplier(this.template);var r=this.uploadTemplateFn(n,this,"template",this.element.id+"Template",this.isStringTemplate,null,a);if(r){var l=[].slice.call(r);t.append(l,a)}var o=e.indexOf(n),h={element:a,fileInfo:n,index:o,isPreload:this.isPreLoadFile(n)},d={element:a,fileInfo:n,index:o,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",h),this.trigger("fileListRendering",d),this.listParent.appendChild(a),this.fileList.push(a)}this.renderReactTemplates(),t.updateBlazorTemplate(this.element.id+"Template","Template",this,!1)},s.prototype.createParentUL=function(){t.isNullOrUndefined(this.listParent)&&(this.listParent=this.createElement("ul",{className:"e-upload-files"}),this.uploadWrapper.appendChild(this.listParent))},s.prototype.formFileList=function(e,i){var s=this.createElement("li",{className:Oe});s.setAttribute("data-files-count",e.length+"");for(var n,a=this.createElement("span",{className:"e-file-container"}),r=0,l=e;r<l.length;r++){var o=l[r],h=this.createElement("span",{className:"e-file-name"});h.innerHTML=this.getFileNameOnly(o.name);var d=this.createElement("span",{className:"e-file-type"}),u=this.getFileType(o.name);if(d.innerHTML="."+u,u||d.classList.add("e-hidden"),this.enableRtl){var c=this.createElement("span",{className:"e-rtl-container"});c.appendChild(d),c.appendChild(h),a.appendChild(c)}else a.appendChild(h),a.appendChild(d);this.truncateName(h),n=this.formValidateFileInfo(o,s)}s.appendChild(a),this.setListToFileInfo(e,s);var p=this.listParent.querySelectorAll("li").length,m=this.createElement("span");if(s.classList.contains("e-file-invalid")?(m.classList.add(Pe),m.classList.add("e-file-invalid"),m.innerText=e.length>1?this.localizedTexts("invalidFileSelection"):n):(m.classList.add(e.length>1?"e-file-information":"e-file-size"),m.innerText=e.length>1?this.localizedTexts("totalFiles")+": "+e.length+" , "+this.localizedTexts("size")+": "+this.bytesToSize(this.getFileSize(e)):this.bytesToSize(e[0].size),this.createFormInput(e)),a.appendChild(m),t.isNullOrUndefined(s.querySelector(".e-icons"))){var v=this.createElement("span",{className:"e-icons",attrs:{tabindex:this.btnTabIndex}});"msie"===this.browserName&&v.classList.add("e-msie"),v.setAttribute("title",this.localizedTexts("remove")),s.appendChild(a),s.appendChild(v),t.EventHandler.add(v,"click",this.removeFiles,this),v.classList.add(Le)}var f={element:s,fileInfo:this.mergeFileInfo(e,s),index:p,isPreload:this.isPreLoadFile(this.mergeFileInfo(e,s))},g={element:s,fileInfo:this.mergeFileInfo(e,s),index:p,isPreload:this.isPreLoadFile(this.mergeFileInfo(e,s))};this.trigger("rendering",f),this.trigger("fileListRendering",g),this.listParent.appendChild(s),this.fileList.push(s)},s.prototype.formValidateFileInfo=function(e,t){var i=e.status,s=this.validatedFileSize(e.size);""===s.minSize&&""===s.maxSize||(this.addInvalidClass(t),i=""!==s.minSize?this.localizedTexts("invalidMinFileSize"):""!==s.maxSize?this.localizedTexts("invalidMaxFileSize"):i);var n=this.checkExtension(this.getFilesInArray(e))[0].status;return n===this.localizedTexts("invalidFileType")&&(this.addInvalidClass(t),i=n),i},s.prototype.addInvalidClass=function(e){e.classList.add("e-file-invalid")},s.prototype.createFormInput=function(e){var t=this.element.cloneNode(!0);t.classList.add("e-hidden-file-input");for(var i=0,s=e;i<s.length;i++)s[i].input=t;t.setAttribute("name",this.uploaderName),this.uploadWrapper.querySelector(".e-file-select").appendChild(t),"msie"!==this.browserName&&"edge"!==this.browserName&&(this.element.value="")},s.prototype.getFileSize=function(e){for(var t=0,i=0,s=e;i<s.length;i++)t+=s[i].size;return t},s.prototype.mergeFileInfo=function(e,t){for(var i={name:"",rawFile:"",size:0,status:"",type:"",validationMessages:{minSize:"",maxSize:""},statusCode:"1",list:t},s=[],n="",a=0,r=e;a<r.length;a++){var l=r[a];s.push(l.name),n=l.type}return i.name=s.join(", "),i.size=this.getFileSize(e),i.type=n,i.status=this.statusForFormUpload(e,t),i},s.prototype.statusForFormUpload=function(e,t){for(var i,s=!0,n=0,a=e;n<a.length;n++){var r=a[n];i=r.status;var l=this.validatedFileSize(r.size);""===l.minSize&&""===l.maxSize||(s=!1,i=""!==l.minSize?this.localizedTexts("invalidMinFileSize"):""!==l.maxSize?this.localizedTexts("invalidMaxFileSize"):i);var o=this.checkExtension(this.getFilesInArray(r))[0].status;o===this.localizedTexts("invalidFileType")&&(s=!1,i=o)}return s?i=this.localizedTexts("totalFiles")+": "+e.length+" , "+this.localizedTexts("size")+": "+this.bytesToSize(this.getFileSize(e)):(t.classList.add("e-file-invalid"),i=e.length>1?this.localizedTexts("invalidFileSelection"):i),i},s.prototype.formCustomFileList=function(e,i){this.createParentUL(),t.resetBlazorTemplate(this.element.id+"Template","Template");var s=this.createElement("li",{className:Oe});s.setAttribute("data-files-count",e.length+""),this.setListToFileInfo(e,s);var n=this.mergeFileInfo(e,s);s.setAttribute("data-file-name",n.name),this.uploadTemplateFn=this.templateComplier(this.template);var a=this.uploadTemplateFn(n,this,"template",this.element.id+"Template",this.isStringTemplate,null,s);if(a){var r=[].slice.call(a);t.append(r,s)}var l=this.listParent.querySelectorAll("li").length;s.classList.contains("e-file-invalid")||this.createFormInput(e);var o={element:s,fileInfo:n,index:l,isPreload:this.isPreLoadFile(n)},h={element:s,fileInfo:n,index:l,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",o),this.trigger("fileListRendering",h),this.listParent.appendChild(s),this.fileList.push(s),this.renderReactTemplates(),t.updateBlazorTemplate(this.element.id+"Template","Template",this,!1)},s.prototype.createFileList=function(e,i){if(this.isBlazorSaveUrl||this.isBlazorTemplate){var s=i?this.filesData=this.filesData.concat(e):e;this.interopAdaptor.invokeMethodAsync("createFileList",s,this.isForm)}else if(this.createParentUL(),""===this.template||t.isNullOrUndefined(this.template))if(this.isFormUpload())this.uploadWrapper.classList.add("e-form-upload"),this.formFileList(e,this.element.files);else for(var n=0,a=e;n<a.length;n++){var r=a[n],l=this.createElement("li",{className:Oe,attrs:{"data-file-name":r.name,"data-files-count":"1"}}),o=this.createElement("span",{className:"e-file-container"}),h=this.createElement("span",{className:"e-file-name",attrs:{title:r.name}});h.innerHTML=this.getFileNameOnly(r.name);var d=this.createElement("span",{className:"e-file-type"}),u=this.getFileType(r.name);if(d.innerHTML="."+u,u||d.classList.add("e-hidden"),this.enableRtl){var c=this.createElement("span",{className:"e-rtl-container"});c.appendChild(d),c.appendChild(h),o.appendChild(c)}else o.appendChild(h),o.appendChild(d);var p=this.createElement("span",{className:"e-file-size"});p.innerHTML=this.bytesToSize(r.size),o.appendChild(p);var m=this.createElement("span",{className:Pe});o.appendChild(m),m.innerHTML=r.status,l.appendChild(o);var v=this.createElement("span",{className:" e-icons",attrs:{tabindex:this.btnTabIndex}});"msie"===this.browserName&&v.classList.add("e-msie"),v.setAttribute("title",this.localizedTexts("remove")),l.appendChild(v),t.EventHandler.add(v,"click",this.removeFiles,this),"2"===r.statusCode?(m.classList.add(Ue),v.classList.add(Be),v.setAttribute("title",this.localizedTexts("delete"))):"1"!==r.statusCode&&(m.classList.remove(Ue),m.classList.add("e-validation-fails")),this.autoUpload&&"1"===r.statusCode&&""!==this.asyncSettings.saveUrl&&(m.innerHTML=""),v.classList.contains(Be)||v.classList.add(Le);var f=e.indexOf(r),g={element:l,fileInfo:r,index:f,isPreload:this.isPreLoadFile(r)},y={element:l,fileInfo:r,index:f,isPreload:this.isPreLoadFile(r)};this.trigger("rendering",g),this.trigger("fileListRendering",y),this.listParent.appendChild(l),this.fileList.push(l),this.truncateName(h);var b=this.flag;this.isPreLoadFile(r)&&(this.flag=!1,this.checkActionComplete(!0),this.flag=b)}else this.isFormUpload()?(this.uploadWrapper.classList.add("e-form-upload"),this.formCustomFileList(e,this.element.files)):this.createCustomfileList(e)},s.prototype.getSlicedName=function(e){var t=e.textContent;e.dataset.tail=t.slice(t.length-10)},s.prototype.setListToFileInfo=function(e,t){for(var i=0,s=e;i<s.length;i++)s[i].list=t},s.prototype.truncateName=function(e){var t=e;"edge"!==this.browserName&&t.offsetWidth<t.scrollWidth?this.getSlicedName(t):t.offsetWidth+1<t.scrollWidth&&this.getSlicedName(t)},s.prototype.getFileType=function(e){var t,i=e.lastIndexOf(".");return i>=0&&(t=e.substring(i+1)),t||""},s.prototype.getFileNameOnly=function(e){var t=this.getFileType(e);return t=e.split("."+t)[0]},s.prototype.setInitialAttributes=function(){if(this.initialAttr.accept&&this.element.setAttribute("accept",this.initialAttr.accept),this.initialAttr.disabled&&this.element.setAttribute("disabled","disabled"),this.initialAttr.multiple){var e=document.createAttribute("multiple");this.element.setAttributeNode(e)}},s.prototype.filterfileList=function(e){for(var t=[],i=0;i<e.length;i++)this.getLiElement(e[i]).classList.contains(Ue)||t.push(e[i]);return t},s.prototype.updateStatus=function(e,i,s,n){if(void 0===n&&(n=!0),""!==i&&!t.isNullOrUndefined(i)&&""!==s&&!t.isNullOrUndefined(s))if(this.isBlazorSaveUrl)for(var a=0;a<this.filesData.length;a++)this.filesData[a].name===e.name&&(this.filesData[a].status=i,this.filesData[a].statusCode=s);else e.status=i,e.statusCode=s;if(n){var r=this.getLiElement(e);t.isNullOrUndefined(r)||t.isNullOrUndefined(r.querySelector("."+Pe))||""===i||t.isNullOrUndefined(i)||(r.querySelector("."+Pe).textContent=i)}return e},s.prototype.getLiElement=function(e){for(var i,s=0;s<this.filesData.length;s++)(t.isNullOrUndefined(this.filesData[s].id)||t.isNullOrUndefined(e.id)?this.filesData[s].name===e.name:this.filesData[s].name===e.name&&this.filesData[s].id===e.id)&&(i=s);return this.fileList[i]},s.prototype.createProgressBar=function(e){var t=this.createElement("span",{className:Ne}),i=this.createElement("progressbar",{className:we,attrs:{value:"0",max:"100"}}),s=this.createElement("span",{className:"e-progress-inner-wrap"});i.setAttribute("style","width: 0%");var n=this.createElement("span",{className:"e-progress-bar-text"});n.textContent="0%",s.appendChild(i),t.appendChild(s),t.appendChild(n),e.querySelector(".e-file-container").appendChild(t)},s.prototype.updateProgressbar=function(e,i){if(!isNaN(Math.round(e.loaded/e.total*100))&&!t.isNullOrUndefined(i.querySelector("."+we)))if(t.isNullOrUndefined(this.progressInterval)||""===this.progressInterval)this.changeProgressValue(i,Math.round(e.loaded/e.total*100).toString()+"%");else{var s=Math.round(e.loaded/e.total*100)%parseInt(this.progressInterval,10);0!==s&&100!==s||this.changeProgressValue(i,Math.round(e.loaded/e.total*100).toString()+"%")}},s.prototype.changeProgressValue=function(e,t){e.querySelector("."+we).setAttribute("style","width:"+t),e.querySelector(".e-progress-bar-text").textContent=t},s.prototype.uploadInProgress=function(e,i,s,n){var a=this.getLiElement(i);if(!t.isNullOrUndefined(a)||s){if(t.isNullOrUndefined(a))this.cancelUploadingFile(i,e,n);else{"5"===i.statusCode&&this.cancelUploadingFile(i,e,n,a),a.querySelectorAll("."+Ne).length>0||!a.querySelector("."+Pe)||(a.querySelector("."+Pe).classList.add("e-upload-progress"),this.createProgressBar(a),this.updateProgressBarClasses(a,"e-upload-progress"),a.querySelector("."+Pe).classList.remove(Re)),this.updateProgressbar(e,a);var r=a.querySelector("."+Le);t.isNullOrUndefined(r)||(r.classList.add(Ae,"e-upload-progress"),r.setAttribute("title",this.localizedTexts("abort")),r.classList.remove(Le))}var l={e:e,operation:"upload",file:this.updateStatus(i,this.localizedTexts("inProgress"),"3")};this.trigger("progress",l)}},s.prototype.cancelUploadingFile=function(e,s,n,a){var r=this;if("5"===e.statusCode){var l={event:s,fileData:e,cancel:!1,customFormData:[]};this.trigger("canceling",l,function(s){if(s.cancel){if(e.statusCode="3",!t.isNullOrUndefined(a)){var l=a.querySelector("."+Ae);t.isNullOrUndefined(l)||(i.hideSpinner(l),t.detach(a.querySelector(".e-spinner-pane")))}}else{n.emitError=!1,n.httpRequest.abort();var o=new FormData;if("5"===e.statusCode){var h=r.element.getAttribute("name");o.append(h,e.name),o.append("cancel-uploading",e.name),r.updateFormData(o,s.customFormData);var d=new t.Ajax(r.asyncSettings.removeUrl,"POST",!0,null);d.emitError=!1,d.onLoad=function(t){return r.removecanceledFile(t,e),{}},d.send(o)}}})}},s.prototype.removecanceledFile=function(e,s){var n=this.getLiElement(s);if(!n.querySelector("."+He)&&!t.isNullOrUndefined(n.querySelector("."+Ae))){this.updateStatus(s,this.localizedTexts("fileUploadCancel"),"5"),this.renderFailureState(e,s,n);var a=n.querySelector("."+Le);t.isNullOrUndefined(n)||(i.hideSpinner(a),t.isNullOrUndefined(n.querySelector(".e-spinner-pane"))||t.detach(n.querySelector(".e-spinner-pane")));var r={event:e,response:e&&e.currentTarget?this.getResponse(e):null,operation:"cancel",file:s};this.trigger("success",r)}},s.prototype.renderFailureState=function(e,i,s){var n=this;this.updateProgressBarClasses(s,Re),this.removeProgressbar(s,"failure"),t.isNullOrUndefined(s.querySelector(".e-file-status"))||s.querySelector(".e-file-status").classList.add(Re);var a=s.querySelector("."+Ae);t.isNullOrUndefined(a)||(a.classList.remove(Ae,"e-upload-progress"),a.classList.add(Le),a.setAttribute("title",this.localizedTexts("remove")),this.pauseButton=this.createElement("span",{className:"e-icons e-file-reload-btn",attrs:{tabindex:this.btnTabIndex}}),a.parentElement.insertBefore(this.pauseButton,a),this.pauseButton.setAttribute("title",this.localizedTexts("retry")),s.querySelector("."+He).addEventListener("click",function(e){n.reloadcanceledFile(e,i,s,!1)},!1))},s.prototype.reloadcanceledFile=function(e,i,s,n){i.statusCode="1",i.status=this.localizedTexts("readyToUploadMessage"),n||(t.isNullOrUndefined(s.querySelector("."+Pe))||s.querySelector("."+Pe).classList.remove(Re),t.isNullOrUndefined(s.querySelector("."+He))||t.detach(s.querySelector("."+He)),this.pauseButton=null),s.classList.add("e-restrict-retry"),this.upload([i])},s.prototype.uploadComplete=function(e,i,s){var n=e.target;if(4===n.readyState&&n.status>=200&&n.status<=299){var a=this.getLiElement(i);if(t.isNullOrUndefined(a)&&(!s||t.isNullOrUndefined(s)))return;if(!t.isNullOrUndefined(a)){this.updateProgressBarClasses(a,Ue),this.removeProgressbar(a,"success");var r=a.querySelector("."+Ae);t.isNullOrUndefined(r)||(r.classList.add(Be),r.setAttribute("title",this.localizedTexts("delete")),r.classList.remove(Ae),r.classList.remove("e-upload-progress"))}this.raiseSuccessEvent(e,i)}else this.uploadFailed(e,i)},s.prototype.getResponse=function(e){var t=e.currentTarget;return{readyState:t.readyState,statusCode:t.status,statusText:t.statusText,headers:t.getAllResponseHeaders(),withCredentials:t.withCredentials}},s.prototype.serverRemoveIconBindEvent=function(){if(this.uploadWrapper&&this.isBlazorSaveUrl)for(var e=[].slice.call(this.uploadWrapper.querySelectorAll("ul li")),i=0;i<e.length;i++){var s=e[i]?e[i].querySelector(".e-icons"):null;s&&(t.EventHandler.remove(s,"click",this.removeFiles),t.EventHandler.add(s,"click",this.removeFiles,this))}},s.prototype.raiseSuccessEvent=function(e,s){var n=this,a=e&&e.currentTarget?this.getResponse(e):null,r=this.localizedTexts("uploadSuccessMessage"),l={e:e,response:a,operation:"upload",file:this.updateStatus(s,r,"2",!1),statusText:r};if(!this.isBlazorSaveUrl){var o=this.getLiElement(s);if(!t.isNullOrUndefined(o)){var h=o.querySelector(".e-spinner-pane");t.isNullOrUndefined(h)||(i.hideSpinner(o),t.detach(h))}}this.trigger("success",l,function(e){n.updateStatus(s,e.statusText,"2"),n.uploadedFilesData.push(s),n.isBlazorSaveUrl||n.trigger("change",{file:n.uploadedFilesData}),n.checkActionButtonStatus(),n.fileList.length>0&&(n.getLiElement(s).classList.contains("e-restrict-retry")?n.getLiElement(s).classList.remove("e-restrict-retry"):(n.uploadSequential(),n.checkActionComplete(!0)))})},s.prototype.uploadFailed=function(e,i){var s=this,n=this.getLiElement(i),a=e&&e.currentTarget?this.getResponse(e):null,r=this.localizedTexts("uploadFailedMessage"),l={e:e,response:a,operation:"upload",file:this.updateStatus(i,r,"0",!1),statusText:r};t.isNullOrUndefined(n)||this.renderFailureState(e,i,n),this.trigger("failure",l,function(e){s.updateStatus(i,e.statusText,"0"),s.checkActionButtonStatus(),s.uploadSequential(),s.checkActionComplete(!0)})},s.prototype.uploadSequential=function(){this.sequentialUpload&&(this.autoUpload?this.checkAutoUpload(this.filesData):this.uploadButtonClick())},s.prototype.checkActionComplete=function(e){e?++this.actionCompleteCount:--this.actionCompleteCount,this.raiseActionComplete()},s.prototype.raiseActionComplete=function(){if(this.filesData.length===this.actionCompleteCount&&this.flag){this.flag=!1;var e={fileData:[]};e.fileData=this.getSelectedFileStatus(this.selectedFiles),this.trigger("actionComplete",e)}},s.prototype.getSelectedFileStatus=function(e){for(var t=[],i=0,s=0;s<e.length;s++)for(var n=e[s],a=0;a<this.filesData.length;a++)this.filesData[a].name===n.name&&(t[i]=this.filesData[a],++i);return t},s.prototype.updateProgressBarClasses=function(e,i){var s=e.querySelector("."+we);t.isNullOrUndefined(s)||s.classList.add(i)},s.prototype.removeProgressbar=function(e,i){var s=this;t.isNullOrUndefined(e.querySelector("."+Ne))||(this.progressAnimation=new t.Animation({duration:1250}),this.progressAnimation.animate(e.querySelector("."+Ne),{name:"FadeOut"}),this.progressAnimation.animate(e.querySelector(".e-progress-bar-text"),{name:"FadeOut"}),setTimeout(function(){s.animateProgressBar(e,i)},750))},s.prototype.animateProgressBar=function(e,i){"success"===i?(e.classList.add(Ue),t.isNullOrUndefined(e.querySelector("."+Pe))||(e.querySelector("."+Pe).classList.remove("e-upload-progress"),this.progressAnimation.animate(e.querySelector("."+Pe),{name:"FadeIn"}),e.querySelector("."+Pe).classList.add(Ue))):t.isNullOrUndefined(e.querySelector("."+Pe))||(e.querySelector("."+Pe).classList.remove("e-upload-progress"),this.progressAnimation.animate(e.querySelector("."+Pe),{name:"FadeIn"}),e.querySelector("."+Pe).classList.add(Re)),e.querySelector("."+Ne)&&t.detach(e.querySelector("."+Ne))},s.prototype.setExtensions=function(e){""===e||t.isNullOrUndefined(e)?this.element.removeAttribute("accept"):this.element.setAttribute("accept",e)},s.prototype.templateComplier=function(e){if(e)try{if(t.selectAll(e,document).length)return t.compile(t.select(e,document).innerHTML.trim())}catch(i){return t.compile(e)}},s.prototype.setRTL=function(){this.enableRtl?t.addClass([this.uploadWrapper],"e-rtl"):t.removeClass([this.uploadWrapper],"e-rtl")},s.prototype.localizedTexts=function(e){return this.l10n.setLocale(this.locale),this.l10n.getConstant(e)},s.prototype.setControlStatus=function(){this.enabled?(this.uploadWrapper.classList.contains("e-disabled")&&this.uploadWrapper.classList.remove("e-disabled"),!t.isNullOrUndefined(this.browseButton)&&this.element.hasAttribute("disabled")&&(this.element.removeAttribute("disabled"),this.browseButton.removeAttribute("disabled")),!t.isNullOrUndefined(this.clearButton)&&this.clearButton.hasAttribute("disabled")&&this.clearButton.removeAttribute("disabled"),!t.isNullOrUndefined(this.uploadButton)&&this.uploadButton.hasAttribute("disabled")&&this.uploadButton.hasAttribute("disabled")):(this.uploadWrapper.classList.add("e-disabled"),this.element.setAttribute("disabled","disabled"),this.browseButton.setAttribute("disabled","disabled"),t.isNullOrUndefined(this.clearButton)||this.clearButton.setAttribute("disabled","disabled"),t.isNullOrUndefined(this.uploadButton)||this.uploadButton.setAttribute("disabled","disabled"))},s.prototype.checkHTMLAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["accept","multiple","disabled"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"accept":(t.isNullOrUndefined(this.uploaderOptions)||void 0===this.uploaderOptions.allowedExtensions||e)&&(this.setProperties({allowedExtensions:this.element.getAttribute("accept")},!e),this.initialAttr.accept=this.allowedExtensions);break;case"multiple":if(t.isNullOrUndefined(this.uploaderOptions)||void 0===this.uploaderOptions.multiple||e){var a="multiple"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({multiple:a},!e),this.initialAttr.multiple=!0}break;case"disabled":if(t.isNullOrUndefined(this.uploaderOptions)||void 0===this.uploaderOptions.enabled||e){var r="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:r},!e),this.initialAttr.disabled=!0}}}},s.prototype.chunkUpload=function(e,t,i){var s=Math.min(this.asyncSettings.chunkSize,e.size),n={chunkIndex:0,blob:e.rawFile.slice(0,s),file:e,start:0,end:s,retryCount:0,request:null};this.sendRequest(e,n,t,i)},s.prototype.sendRequest=function(e,i,s,n){var a=this,r=new FormData,l=e.rawFile.slice(i.start,i.end);r.append("chunkFile",l,e.name),r.append(this.uploaderName,l,e.name),r.append("chunk-index",i.chunkIndex.toString()),r.append("chunkIndex",i.chunkIndex.toString());var o=Math.max(Math.ceil(e.size/this.asyncSettings.chunkSize),1);r.append("total-chunk",o.toString()),r.append("totalChunk",o.toString());var h=new t.Ajax({url:this.asyncSettings.saveUrl,type:"POST",async:!0,contentType:null});h.emitError=!1,h.onLoad=function(e){return a.chunkUploadComplete(e,i,s),{}},h.onUploadProgress=function(e){return a.chunkUploadInProgress(e,i,s),{}};var d={fileData:e,customFormData:[],cancel:!1,chunkSize:0===this.asyncSettings.chunkSize?null:this.asyncSettings.chunkSize};h.beforeSend=function(s){d.currentRequest=h.httpRequest,d.currentChunkIndex=i.chunkIndex,t.isBlazor()&&(a.currentRequestHeader&&a.updateCustomheader(h.httpRequest,a.currentRequestHeader),a.customFormDatas&&a.updateFormData(r,a.customFormDatas)),0===d.currentChunkIndex?a.trigger("uploading",d,function(t){a.uploadingEventCallback(r,t,s,e)}):a.trigger("chunkUploading",d,function(t){a.uploadingEventCallback(r,t,s,e)})},h.onError=function(e){return a.chunkUploadFailed(e,i,s),{}},h.send(r),i.request=h},s.prototype.uploadingEventCallback=function(e,t,i,s){t.cancel?this.eventCancelByArgs(i,t,s):this.updateFormData(e,t.customFormData)},s.prototype.eventCancelByArgs=function(e,i,s){var n=this;if(e.cancel=!0,"5"!==i.fileData.statusCode){i.fileData.statusCode="5",i.fileData.status=this.localizedTexts("fileUploadCancel");var a=this.getLiElement(i.fileData);if(a){t.isNullOrUndefined(a.querySelector("."+Pe))||(a.querySelector("."+Pe).innerHTML=this.localizedTexts("fileUploadCancel"),a.querySelector("."+Pe).classList.add(Re)),this.pauseButton=this.createElement("span",{className:"e-icons e-file-reload-btn",attrs:{tabindex:this.btnTabIndex}});var r=a.querySelector("."+Le);r&&r.parentElement.insertBefore(this.pauseButton,r),this.pauseButton.setAttribute("title",this.localizedTexts("retry")),this.pauseButton.addEventListener("click",function(e){n.reloadcanceledFile(e,s,a)},!1),this.checkActionButtonStatus()}}},s.prototype.checkChunkUpload=function(){return!(this.asyncSettings.chunkSize<=0||t.isNullOrUndefined(this.asyncSettings.chunkSize))},s.prototype.chunkUploadComplete=function(e,s,n){var a,r=this,l=e.target;if(4===l.readyState&&l.status>=200&&l.status<300){var o=e&&e.currentTarget?this.getResponse(e):null,h=Math.max(Math.ceil(s.file.size/this.asyncSettings.chunkSize),1),d={event:e,file:s.file,chunkIndex:s.chunkIndex,totalChunk:h,chunkSize:this.asyncSettings.chunkSize,response:o};if(this.trigger("chunkSuccess",d),!t.isNullOrUndefined(n)&&n||(a=this.getLiElement(s.file)),this.updateMetaData(s),s.end===s.file.size&&(s.file.statusCode="3"),"5"===s.file.statusCode){var u={event:e,fileData:s.file,cancel:!1,customFormData:[]};this.trigger("canceling",u,function(e){if(e.cancel){s.file.statusCode="3";var o=a.querySelector("."+Ae);t.isNullOrUndefined(a)||t.isNullOrUndefined(o)||(i.hideSpinner(o),t.detach(a.querySelector(".e-spinner-pane"))),r.sendNextRequest(s)}else{s.request.emitError=!1,l.abort();var h=new FormData,d=r.element.getAttribute("name");h.append(d,s.file.name),h.append("cancel-uploading",s.file.name),h.append("cancelUploading",s.file.name),r.updateFormData(h,e.customFormData);var u=new t.Ajax(r.asyncSettings.removeUrl,"POST",!0,null);u.emitError=!1,u.onLoad=function(e){return r.removeChunkFile(e,s,n),{}},u.send(h)}})}else{if(h-1===s.chunkIndex&&h>s.chunkIndex){var c=this.pausedData.indexOf(s);return c>=0&&this.pausedData.splice(c,1),t.isNullOrUndefined(this.template)&&(t.isNullOrUndefined(n)||!n)&&a&&(a&&!t.isNullOrUndefined(a.querySelector("."+Fe))&&t.detach(a.querySelector("."+Fe)),this.removeChunkProgressBar(s)),void this.raiseSuccessEvent(e,s.file)}"4"!==s.file.statusCode&&this.sendNextRequest(s)}}else this.chunkUploadFailed(e,s)},s.prototype.sendNextRequest=function(e){e.start=e.end,e.end+=this.asyncSettings.chunkSize,e.end=Math.min(e.end,e.file.size),e.chunkIndex+=1,this.sendRequest(e.file,e)},s.prototype.removeChunkFile=function(e,s,n){if(t.isNullOrUndefined(this.template)&&t.isNullOrUndefined(n)&&!n){var a=this.getLiElement(s.file),r=a.querySelector("."+Ae),l=r;this.updateStatus(s.file,this.localizedTexts("fileUploadCancel"),"5"),this.updateProgressBarClasses(a,Re),this.removeProgressbar(a,"failure"),r&&r.classList.remove(Ae),r&&r.classList.add(Le),r&&r.setAttribute("title",this.localizedTexts("remove"));var o=a.querySelector("."+Fe);o&&o.classList.add(He),o&&o.classList.remove(Fe),o&&o.setAttribute("title",this.localizedTexts("retry")),t.isNullOrUndefined(a)||t.isNullOrUndefined(r)||t.isNullOrUndefined(a.querySelector(".e-spinner-pane"))||(i.hideSpinner(l),t.detach(a.querySelector(".e-spinner-pane")))}},s.prototype.pauseUpload=function(e,t,i){e.file.statusCode="4",e.file.status=this.localizedTexts("pause"),this.updateMetaData(e);var s={event:t||null,file:e.file,chunkIndex:e.chunkIndex,chunkCount:Math.round(e.file.size/this.asyncSettings.chunkSize),chunkSize:this.asyncSettings.chunkSize};this.abortUpload(e,i,s)},s.prototype.abortUpload=function(e,i,s){"4"!==e.file.statusCode&&(e.request.emitError=!1,e.request.httpRequest.abort());var n=this.getLiElement(e.file);if(t.isNullOrUndefined(this.template)&&(t.isNullOrUndefined(i)||!i)){var a=n.querySelector("."+Fe);a.classList.remove(Fe),a.classList.add("e-file-play-btn"),a.setAttribute("title",this.localizedTexts("resume")),a.nextElementSibling.classList.add(Le),a.nextElementSibling.classList.remove(Ae),a.nextElementSibling.setAttribute("title",this.localizedTexts("remove"))}for(var r=0;r<this.pausedData.length;r++)this.pausedData[r].file.name===e.file.name&&this.pausedData.splice(r,1);this.pausedData.push(e),this.trigger("pausing",s)},s.prototype.resumeUpload=function(e,i,s){var n,a=this.getLiElement(e.file);t.isNullOrUndefined(a)||(n=a.querySelector(".e-file-play-btn")),t.isNullOrUndefined(n)||!t.isNullOrUndefined(s)&&s||(n.classList.remove("e-file-play-btn"),n.classList.add(Fe),n.setAttribute("title",this.localizedTexts("pause")),n.nextElementSibling.classList.remove(Le),n.nextElementSibling.classList.add(Ae),n.nextElementSibling.setAttribute("title",this.localizedTexts("abort"))),e.file.status=this.localizedTexts("inProgress"),e.file.statusCode="3",this.updateMetaData(e);var r={event:i||null,file:e.file,chunkIndex:e.chunkIndex,chunkCount:Math.round(e.file.size/this.asyncSettings.chunkSize),chunkSize:this.asyncSettings.chunkSize};this.trigger("resuming",r);for(var l=0;l<this.pausedData.length;l++)this.pausedData[l].end===this.pausedData[l].file.size?this.chunkUploadComplete(i,e,s):this.pausedData[l].file.name===e.file.name&&(this.pausedData[l].start=this.pausedData[l].end,this.pausedData[l].end=this.pausedData[l].end+this.asyncSettings.chunkSize,this.pausedData[l].end=Math.min(this.pausedData[l].end,this.pausedData[l].file.size),this.pausedData[l].chunkIndex=this.pausedData[l].chunkIndex+1,this.sendRequest(this.pausedData[l].file,this.pausedData[l],s))},s.prototype.updateMetaData=function(e){-1===this.uploadMetaData.indexOf(e)?this.uploadMetaData.push(e):(this.uploadMetaData.splice(this.uploadMetaData.indexOf(e),1),this.uploadMetaData.push(e))},s.prototype.removeChunkProgressBar=function(e){var i=this.getLiElement(e.file);if(!t.isNullOrUndefined(i)){this.updateProgressBarClasses(i,Ue),this.removeProgressbar(i,"success");var s=i.querySelector("."+Ae);t.isNullOrUndefined(s)||(s.classList.add(Be),s.setAttribute("title",this.localizedTexts("delete")),s.classList.remove(Ae,"e-upload-progress"))}},s.prototype.chunkUploadFailed=function(e,i,s){var n,a=this,r=Math.max(Math.ceil(i.file.size/this.asyncSettings.chunkSize),1);!t.isNullOrUndefined(this.template)||!t.isNullOrUndefined(s)&&s||(n=this.getLiElement(i.file));var l=e&&e.currentTarget?this.getResponse(e):null,o={event:e,file:i.file,chunkIndex:i.chunkIndex,totalChunk:r,chunkSize:this.asyncSettings.chunkSize,cancel:!1,response:l};this.trigger("chunkFailure",o,function(r){if(!r.cancel)if(i.retryCount<a.asyncSettings.retryCount)setTimeout(function(){a.retryRequest(n,i,s)},a.asyncSettings.retryAfterDelay);else{if(!t.isNullOrUndefined(n)){var o=n.querySelector("."+Fe)?n.querySelector("."+Fe):n.querySelector(".e-file-play-btn");t.isNullOrUndefined(o)||(o.classList.add(He),o.classList.remove(Fe,"e-file-play-btn")),a.updateProgressBarClasses(n,Re),a.removeProgressbar(n,"failure"),n.querySelector(".e-icons").classList.remove("e-upload-progress");var h=n.querySelector("."+Ae)?n.querySelector("."+Ae):n.querySelector("."+Le);h.classList.remove(Ae),t.isNullOrUndefined(n.querySelector("."+Fe))||t.detach(n.querySelector("."+Fe)),i.start>0?(h.classList.add(Be),h.setAttribute("title",a.localizedTexts("delete"))):(h.classList.add(Le),h.setAttribute("title",a.localizedTexts("remove")))}i.retryCount=0;var d=i.file,u=a.localizedTexts("uploadFailedMessage"),c={e:e,response:l,operation:"upload",file:a.updateStatus(d,u,"0",!1),statusText:u};a.trigger("failure",c,function(e){a.updateStatus(d,e.statusText,"0"),a.uploadSequential(),a.checkActionComplete(!0)})}})},s.prototype.retryRequest=function(e,i,s){t.isNullOrUndefined(this.template)&&(t.isNullOrUndefined(s)||!s)&&e&&this.updateProgressBarClasses(e,Re),i.retryCount+=1,this.sendRequest(i.file,i)},s.prototype.checkPausePlayAction=function(e){var t=e.target,i=e.target.parentElement,s=this.fileList.indexOf(i),n=this.filesData[s],a=this.getCurrentMetaData(n);t.classList.contains(Fe)?this.pauseUpload(a,e):t.classList.contains("e-file-play-btn")?this.resumeUpload(a,e):t.classList.contains(He)&&(a.file.status===this.localizedTexts("fileUploadCancel")?this.retryUpload(a,!1):this.retryUpload(a,!0))},s.prototype.retryUpload=function(e,t){t?(e.end=e.end+this.asyncSettings.chunkSize,e.start=e.start+this.asyncSettings.chunkSize,this.sendRequest(e.file,e)):(e.file.statusCode="1",e.file.status=this.localizedTexts("readyToUploadMessage"),this.chunkUpload(e.file)),this.getLiElement(e.file).classList.add("e-restrict-retry")},s.prototype.chunkUploadInProgress=function(e,i,s){var n=this;if("4"!==i.file.statusCode){"4"!==i.file.statusCode&&"5"!==i.file.statusCode&&(i.file.statusCode="3",i.file.status=this.localizedTexts("inProgress")),this.updateMetaData(i);var a=this.getLiElement(i.file);if(!t.isNullOrUndefined(a)){var r=a.querySelector("."+He);if(t.isNullOrUndefined(r)||(r.classList.add(Fe),r.setAttribute("title",this.localizedTexts("pause")),r.classList.remove(He)),!t.isNullOrUndefined(a)){if(!(a.querySelectorAll("."+Ne).length>0)){var l=a.querySelector("."+Pe);t.isNullOrUndefined(this.template)&&(l.classList.add("e-upload-progress"),l.classList.remove(Re),this.createProgressBar(a),this.updateProgressBarClasses(a,"e-upload-progress"));var o=a.querySelector("."+Le)?a.querySelector("."+Le):a.querySelector("."+Be);t.isNullOrUndefined(o)||(o.classList.add(Ae),o.setAttribute("title",this.localizedTexts("abort")),o.classList.remove(Le))}if(!isNaN(Math.round(e.loaded/e.total*100))&&t.isNullOrUndefined(this.template)&&"4"!==i.file.statusCode){var h=void 0,d=Math.ceil(i.file.size/this.asyncSettings.chunkSize)-1;this.asyncSettings.chunkSize&&d&&(h=Math.round(i.chunkIndex/d*100),this.changeProgressValue(a,h.toString()+"%"))}0===i.chunkIndex&&this.checkActionButtonStatus()}if(t.isNullOrUndefined(a.querySelector("."+Fe))&&t.isNullOrUndefined(this.template)&&t.isNullOrUndefined(a.querySelector("."+Be))){this.pauseButton=this.createElement("span",{className:"e-icons e-file-pause-btn",attrs:{tabindex:this.btnTabIndex}}),"msie"===this.browserName&&this.pauseButton.classList.add("e-msie");var u=a.querySelector("."+Ae);u.parentElement.insertBefore(this.pauseButton,u),this.pauseButton.setAttribute("title",this.localizedTexts("pause")),this.pauseButton.addEventListener("click",function(e){n.checkPausePlayAction(e)},!1)}}}},s.prototype.bytesToSize=function(e){var t=-1;if(!e)return"0.0 KB";do{e/=1024,t++}while(e>99);return t>=2&&(e*=1024,t=1),Math.max(e,0).toFixed(1)+" "+["KB","MB"][t]},s.prototype.sortFileList=function(e){for(var t=e=e||this.sortFilesList,i=[],s=0;s<t.length;s++)i.push(t[s].name);for(var n=[],a=0,r=i.sort();a<r.length;a++)for(var l=r[a],s=0;s<t.length;s++)l===t[s].name&&n.push(t[s]);return n},s.prototype.destroy=function(){this.element.value=null,this.clearTemplate(),this.isBlazorSaveUrl||this.isBlazorTemplate||this.clearAll(),this.unWireEvents(),this.unBindDropEvents(),this.multiple&&this.element.removeAttribute("multiple"),this.enabled||this.element.removeAttribute("disabled"),this.element.removeAttribute("accept"),this.setInitialAttributes();for(var i=0,s=["aria-label","directory","webkitdirectory","tabindex"];i<s.length;i++){var n=s[i];this.element.removeAttribute(n)}this.isServerBlazor?this.uploadWrapper=null:(t.isNullOrUndefined(this.uploadWrapper)||(this.uploadWrapper.parentElement.appendChild(this.element),t.detach(this.uploadWrapper)),this.uploadWrapper=null,e.prototype.destroy.call(this))},s.prototype.upload=function(e,i){var s=this;if(e=e||this.filesData,this.sequentialUpload&&(this.isFirstFileOnSelection||i))this.sequenceUpload(e);else{var n=this.getFilesInArray(e),a={customFormData:[],currentRequest:null,cancel:!1};this.trigger("beforeUpload",a,function(e){e.cancel||(t.isBlazor()&&(s.currentRequestHeader=e.currentRequest?e.currentRequest:s.currentRequestHeader,s.customFormDatas=e.customFormData&&e.customFormData.length>0?e.customFormData:s.customFormDatas),s.uploadFiles(n,i))})}},s.prototype.getFilesInArray=function(e){var t=[];return e instanceof Array?t=e:t.push(e),t},s.prototype.serverReadFileBase64=function(e,t,i){var s=this;return new Promise(function(n,a){var r=s.fileStreams[e].rawFile;try{var l=new FileReader;l.onload=function(e){return function(){try{var t=e.result,i=t?t.split(";base64,")[1]:null;n(i)}catch(e){a(e)}}}(l),l.readAsDataURL(r.slice(t,t+i))}catch(e){a(e)}})},s.prototype.uploadFileCount=function(e){var t=this.filesData;return t&&0!==t.length?t.length:-1},s.prototype.getFileRead=function(e,t){var i=this.filesData;if(!i||0===i.length)return-1;var s=i[e],n=this.newFileRef++;return this.fileStreams[n]=s,n},s.prototype.getFileInfo=function(e,t){var i=this.filesData;return i&&0!==i.length&&i[e]?this.filesData[e]:null},s.prototype.uploadFiles=function(e,i){var s=this,n=[];if(""===this.asyncSettings.saveUrl||t.isNullOrUndefined(this.asyncSettings.saveUrl))return void(this.isServerBlazor&&this.interopAdaptor.invokeMethodAsync("GetFileDetails",e));if(!i||t.isNullOrUndefined(i))if(this.multiple)n=this.filterfileList(e);else{var a=[];a.push(e[0]),n=this.filterfileList(a)}else n=e;for(var r=this,l=0;l<n.length;l++)!function(e){r.isServerBlazor&&!r.checkChunkUpload()?n[e]&&n[e].rawFile instanceof File&&r.getBase64(n[e].rawFile).then(function(t){s.base64String.push(t),s.uploadFilesRequest(n,e,i)}):r.uploadFilesRequest(n,e,i)}(l)},s.prototype.uploadFilesRequest=function(e,i,s){var n=this,a=[],r=this.checkChunkUpload(),l=new t.Ajax(this.asyncSettings.saveUrl,"POST",!0,null);l.emitError=!1;var o;this.isServerBlazor&&(o=e.slice(0),a.push(o[i].rawFile));var h={fileData:this.isServerBlazor?o[i]:e[i],customFormData:[],cancel:!1},d=new FormData;if(l.beforeSend=function(s){h.currentRequest=l.httpRequest,t.isBlazor()&&(h.fileData.rawFile=r?h.fileData.rawFile:n.base64String[i],n.currentRequestHeader&&n.updateCustomheader(l.httpRequest,n.currentRequestHeader),n.customFormDatas&&n.updateFormData(d,n.customFormDatas)),n.trigger("uploading",h,function(t){n.isServerBlazor&&!r&&(e[i].rawFile=t.fileData.rawFile=a[i]),t.cancel&&n.eventCancelByArgs(s,t,e[i]),n.updateFormData(d,t.customFormData)})},"1"===e[i].statusCode){var u=this.element.getAttribute("name");d.append(u,e[i].rawFile,e[i].name),r&&e[i].size>this.asyncSettings.chunkSize?this.chunkUpload(e[i],s,i):(l.onLoad=function(t){return h.cancel&&n.isServerBlazor?{}:(n.uploadComplete(t,e[i],s),{})},l.onUploadProgress=function(t){return h.cancel&&n.isServerBlazor?{}:(n.uploadInProgress(t,e[i],s,l),{})},l.onError=function(t){return n.uploadFailed(t,e[i]),{}},l.send(d))}},s.prototype.spliceFiles=function(e){for(var t=this.fileList[e],i=this.getFilesData(),s=+t.getAttribute("data-files-count"),n=0,a=0;a<e;a++)n+=+this.fileList[a].getAttribute("data-files-count");for(var r=n+s-1;r>=n;r--)i.splice(r,1)},s.prototype.remove=function(e,i,s,n,a){var r=this;t.isNullOrUndefined(n)&&(n=!0);var l={event:a,cancel:!1,filesData:[],customFormData:[],postRawFile:n,currentRequest:null},o={cancel:!1,customFormData:[],currentRequest:null};this.trigger("beforeRemove",o,function(n){if(!n.cancel)if(t.isBlazor()&&(r.currentRequestHeader=n.currentRequest,r.customFormDatas=n.customFormData),r.isFormUpload()&&!r.isBlazorSaveUrl)l.filesData=e,r.trigger("removing",l,function(i){if(!i.cancel)for(var s=!1,n=void 0,a=0,l=r.getFilesInArray(e);a<l.length;a++){var o=l[a];if(s||(n=r.fileList.indexOf(o.list)),n>-1){var h=t.isNullOrUndefined(o.input)?null:o.input;h&&t.detach(h),r.spliceFiles(n),t.detach(r.fileList[n]),r.fileList.splice(n,1),s=!0,n=-1}}});else if(!r.isForm||!t.isNullOrUndefined(r.asyncSettings.removeUrl)&&""!==r.asyncSettings.removeUrl||r.isBlazorSaveUrl){var o=[];(e=t.isNullOrUndefined(e)?r.filesData:e)instanceof Array?o=e:o.push(e),l.filesData=o;for(var h=r.asyncSettings.removeUrl,d=""!==h&&!t.isNullOrUndefined(h),u=0,c=o;u<c.length;u++)!function(e){var t=r.uploadedFilesData.indexOf(e);("2"===e.statusCode||"4"===e.statusCode||"0"===e.statusCode&&-1!==t)&&d?r.removeUploadedFile(e,l,s,i):s?r.removeFilesData(e,i):r.trigger("removing",l,function(t){t.cancel||r.removeFilesData(e,i)}),a&&!a.target.classList.contains(Le)&&r.checkActionComplete(!1)}(c[u])}else l.filesData=r.getFilesData(),r.trigger("removing",l,function(e){e.cancel||r.clearAll()})})},s.prototype.clearAll=function(){var e=this;if(t.isNullOrUndefined(this.listParent)&&!this.isBlazorSaveUrl&&!this.isBlazorTemplate)return"msie"!==this.browserName&&(this.element.value=""),void(this.filesData=[]);var i={cancel:!1,filesData:this.filesData};this.trigger("clearing",i,function(t){t.cancel||(e.clearData(),e.actionCompleteCount=0,e.count=-1)})},s.prototype.getFilesData=function(e){if(this.isServerBlazor){for(var i=0;i<this.filesData.length;i++)this.filesData[i].rawFile=this.base64String[i];return this.filesData}return t.isNullOrUndefined(e)?this.filesData:this.getSelectedFiles(e)},s.prototype.pause=function(e,t){e=e||this.filesData;var i=this.getFilesInArray(e);this.pauseUploading(i,t)},s.prototype.pauseUploading=function(e,t){for(var i=this.getFiles(e),s=0;s<i.length;s++)"3"===i[s].statusCode&&this.pauseUpload(this.getCurrentMetaData(i[s],null),null,t)},s.prototype.getFiles=function(e){var i=[];return t.isNullOrUndefined(e)||e instanceof Array?i=e:i.push(e),i},s.prototype.resume=function(e,t){e=e||this.filesData;var i=this.getFilesInArray(e);this.resumeFiles(i,t)},s.prototype.resumeFiles=function(e,t){for(var i=this.getFiles(e),s=0;s<i.length;s++)"4"===i[s].statusCode&&this.resumeUpload(this.getCurrentMetaData(i[s],null),null,t)},s.prototype.retry=function(e,t,i){e=e||this.filesData;var s=this.getFilesInArray(e);this.retryFailedFiles(s,t,i)},s.prototype.retryFailedFiles=function(e,t,i){for(var s=this.getFiles(e),n=0;n<s.length;n++)if("5"===s[n].statusCode||"0"===s[n].statusCode)if(this.asyncSettings.chunkSize>0)this.retryUpload(this.getCurrentMetaData(s[n],null),t);else{var a=void 0;i||(a=this.fileList[this.filesData.indexOf(s[n])]),this.reloadcanceledFile(null,s[n],a,i)}},s.prototype.cancel=function(e){e=e||this.filesData;var t=this.getFilesInArray(e);this.cancelUpload(t)},s.prototype.cancelUpload=function(e){var t=this.getFiles(e);if(this.asyncSettings.chunkSize>0){for(s=0;s<t.length;s++)if("3"===t[s].statusCode){var i=this.getCurrentMetaData(t[s],null);i.file.statusCode="5",i.file.status=this.localizedTexts("fileUploadCancel"),this.updateMetaData(i),this.showHideUploadSpinner(t[s])}}else for(var s=0;s<t.length;s++)"3"===t[s].statusCode&&(t[s].statusCode="5",t[s].status=this.localizedTexts("fileUploadCancel"),this.showHideUploadSpinner(t[s]))},s.prototype.showHideUploadSpinner=function(e){var s=this.getLiElement(e);if(!t.isNullOrUndefined(s)&&t.isNullOrUndefined(this.template)){var n=s.querySelector("."+Ae);i.createSpinner({target:n,width:"20px"}),i.showSpinner(n)}},xe([t.Complex({saveUrl:"",removeUrl:""},Ie)],s.prototype,"asyncSettings",void 0),xe([t.Property(!1)],s.prototype,"sequentialUpload",void 0),xe([t.Property({})],s.prototype,"htmlAttributes",void 0),xe([t.Property("")],s.prototype,"cssClass",void 0),xe([t.Property(!0)],s.prototype,"enabled",void 0),xe([t.Property(null)],s.prototype,"template",void 0),xe([t.Property(!0)],s.prototype,"multiple",void 0),xe([t.Property(!0)],s.prototype,"autoUpload",void 0),xe([t.Complex({},De)],s.prototype,"buttons",void 0),xe([t.Property("")],s.prototype,"allowedExtensions",void 0),xe([t.Property(0)],s.prototype,"minFileSize",void 0),xe([t.Property(3e7)],s.prototype,"maxFileSize",void 0),xe([t.Property(null)],s.prototype,"dropArea",void 0),xe([t.Collection([{}],Me)],s.prototype,"files",void 0),xe([t.Property(!0)],s.prototype,"showFileList",void 0),xe([t.Property(!1)],s.prototype,"directoryUpload",void 0),xe([t.Property("Default")],s.prototype,"dropEffect",void 0),xe([t.Event()],s.prototype,"created",void 0),xe([t.Event()],s.prototype,"actionComplete",void 0),xe([t.Event()],s.prototype,"rendering",void 0),xe([t.Event()],s.prototype,"beforeUpload",void 0),xe([t.Event()],s.prototype,"fileListRendering",void 0),xe([t.Event()],s.prototype,"selected",void 0),xe([t.Event()],s.prototype,"uploading",void 0),xe([t.Event()],s.prototype,"success",void 0),xe([t.Event()],s.prototype,"failure",void 0),xe([t.Event()],s.prototype,"removing",void 0),xe([t.Event()],s.prototype,"beforeRemove",void 0),xe([t.Event()],s.prototype,"clearing",void 0),xe([t.Event()],s.prototype,"progress",void 0),xe([t.Event()],s.prototype,"change",void 0),xe([t.Event()],s.prototype,"chunkSuccess",void 0),xe([t.Event()],s.prototype,"chunkFailure",void 0),xe([t.Event()],s.prototype,"chunkUploading",void 0),xe([t.Event()],s.prototype,"canceling",void 0),xe([t.Event()],s.prototype,"pausing",void 0),xe([t.Event()],s.prototype,"resuming",void 0),s=xe([t.NotifyPropertyChanges],s)}(t.Component),qe=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),We=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},je="e-switch-ctrl-btn",_e="e-hide-hex-value",Xe="e-hide-switchable-value",Ke="e-hide-value",Ze="e-hsv-color",Ye="e-selected-value",Ge="e-mode-switch-btn",$e="e-nocolor-item",Je="e-opacity-value",Qe="e-preview-container",et="e-show-value",tt="e-selected",it="e-tile",st={default:["#000000","#f44336","#e91e63","#9c27b0","#673ab7","#2196f3","#03a9f4","#00bcd4","#009688","#ffeb3b","#ffffff","#ffebee","#fce4ec","#f3e5f5","#ede7f6","#e3f2fd","#e1f5fe","#e0f7fa","#e0f2f1","#fffde7","#f2f2f2","#ffcdd2","#f8bbd0","#e1bee7","#d1c4e9","#bbdefb","#b3e5fc","#b2ebf2","#b2dfdb","#fff9c4","#e6e6e6","#ef9a9a","#f48fb1","#ce93d8","#b39ddb","#90caf9","#81d4fa","#80deea","#80cbc4","#fff59d","#cccccc","#e57373","#f06292","#ba68c8","#9575cd","#64b5f6","#4fc3f7","#4dd0e1","#4db6ac","#fff176","#b3b3b3","#ef5350","#ec407a","#ab47bc","#7e57c2","#42a5f5","#29b6f6","#26c6da","#26a69a","#ffee58","#999999","#e53935","#d81b60","#8e24aa","#5e35b1","#1e88e5","#039be5","#00acc1","#00897b","#fdd835","#808080","#d32f2f","#c2185b","#7b1fa2","#512da8","#1976d2","#0288d1","#0097a7","#00796b","#fbc02d","#666666","#c62828","#ad1457","#6a1b9a","#4527a0","#1565c0","#0277bd","#00838f","#00695c","#f9a825","#4d4d4d","#b71c1c","#880e4f","#4a148c","#311b92","#0d47a1","#01579b","#006064","#004d40","#f57f17"]},nt=function(n){function a(e,t){return n.call(this,e,t)||this}return qe(a,n),a.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this);var i={Apply:"Apply",Cancel:"Cancel",ModeSwitcher:"Switch Mode"};this.l10n=new t.L10n("colorpicker",i,this.locale),e.getAttribute("ejs-for")&&!e.getAttribute("name")&&e.setAttribute("name",e.id)},a.prototype.render=function(){this.initWrapper(),this.inline?this.createWidget():this.createSplitBtn(),this.enableOpacity||t.addClass([this.container.parentElement],"e-hide-opacity"),this.renderComplete()},a.prototype.initWrapper=function(){var e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"});this.element.parentNode.insertBefore(e,this.element),e.appendChild(this.element),t.attributes(this.element,{tabindex:"-1",spellcheck:"false"}),this.container=this.createElement("div",{className:"e-container"}),this.getWrapper().appendChild(this.container);var i=this.value?this.roundValue(this.value).toLowerCase():"#008000ff";this.noColor&&"Palette"===this.mode&&""===this.value&&(i="");var s=i.slice(0,7);t.isNullOrUndefined(this.initialInputValue)&&(this.initialInputValue=s),this.element.value=s,this.enableOpacity?this.setProperties({value:i},!0):this.setProperties({value:s},!0),this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),this.tileRipple=t.rippleEffect(this.container,{selector:"."+it}),this.ctrlBtnRipple=t.rippleEffect(this.container,{selector:".e-btn"})},a.prototype.getWrapper=function(){return this.element.parentElement},a.prototype.createWidget=function(){"Palette"===this.mode?(this.createPalette(),this.inline||this.firstPaletteFocus()):(this.createPicker(),this.inline||this.getDragHandler().focus()),this.isRgb=!0,this.createInput(),this.createCtrlBtn(),this.disabled||this.wireEvents(),this.inline&&this.disabled&&this.toggleDisabled(!0),t.Browser.isDevice&&this.refreshPopupPos()},a.prototype.createSplitBtn=function(){var e=this,n=this.createElement("button",{className:"e-split-colorpicker"});this.getWrapper().appendChild(n),this.splitBtn=new s.SplitButton({iconCss:"e-selected-color",target:this.container,disabled:this.disabled,enableRtl:this.enableRtl,open:this.onOpen.bind(this),click:function(){e.trigger("change",{currentValue:{hex:e.value.slice(0,7),rgba:e.convertToRgbString(e.hexToRgb(e.value))},previousValue:{hex:null,rgba:null},value:e.value})}}),this.splitBtn.createElement=this.createElement,this.splitBtn.appendTo(n);var a=this.createElement("span",{className:"e-split-preview"});t.select(".e-selected-color",n).appendChild(a),a.style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value));var r=this.getPopupEle();if(t.addClass([r],"e-colorpicker-popup"),this.cssClass&&t.addClass([r],this.cssClass.split(" ")),t.Browser.isDevice){var l=this.getPopupInst();l.relateTo=document.body,l.position={X:"center",Y:"center"},l.targetType="container",l.collision={X:"fit",Y:"fit"},l.offsetY=4,r.style.zIndex=i.getZindexPartial(this.splitBtn.element).toString()}this.bindCallBackEvent()},a.prototype.onOpen=function(){this.trigger("open",{element:this.container})},a.prototype.getPopupInst=function(){return t.getInstance(this.getPopupEle(),i.Popup)},a.prototype.bindCallBackEvent=function(){var e=this;this.splitBtn.beforeOpen=function(i){var n=new s.Deferred;return e.trigger("beforeOpen",i,function(s){if(!s.cancel){var a=e.getPopupEle();a.style.top=t.formatUnit(0+pageYOffset),a.style.left=t.formatUnit(0+pageXOffset),a.style.display="block",e.createWidget(),a.style.display="",t.Browser.isDevice&&(e.modal=e.createElement("div"),e.modal.className="e-"+e.getModuleName()+" e-modal",e.modal.style.display="none",document.body.insertBefore(e.modal,a),document.body.className+=" e-colorpicker-overflow",e.modal.style.display="block",e.modal.style.zIndex=(Number(a.style.zIndex)-1).toString())}i.cancel=s.cancel,n.resolve(s)}),n},this.splitBtn.beforeClose=function(i){var n=new s.Deferred;if(t.isNullOrUndefined(i.event))n.resolve(i);else{var a={element:e.container,event:i.event,cancel:!1};e.trigger("beforeClose",a,function(s){t.Browser.isDevice&&i.event.target===e.modal&&(s.cancel=!0),s.cancel||e.onPopupClose(),i.cancel=s.cancel,n.resolve(s)})}return n}},a.prototype.onPopupClose=function(){this.unWireEvents(),this.destroyOtherComp(),this.container.style.width="",t.select(".e-split-preview",this.splitBtn.element).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value)),this.container.innerHTML="",t.removeClass([this.container],["e-color-picker","e-color-palette"]),t.Browser.isDevice&&this.modal&&(t.removeClass([document.body],"e-colorpicker-overflow"),this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},a.prototype.createPalette=function(){if(t.classList(this.container,["e-color-palette"],["e-color-picker"]),this.presetColors){var e=this.createElement("div",{className:"e-custom-palette"});this.appendElement(e);var i=Object.keys(this.presetColors);if(1===i.length)this.appendPalette(this.presetColors[i[0]],i[0],e);else for(var s=0,n=i.length;s<n;s++)this.appendPalette(this.presetColors[i[s]],i[s],e);t.selectAll(".e-row",e).length>10&&t.addClass([e],"e-palette-group")}else this.appendPalette(st.default,"default");"Palette"===this.mode&&!this.modeSwitcher&&this.noColor&&this.setNoColor();var a=parseInt(getComputedStyle(this.container).borderBottomWidth,10);this.container.style.width=t.formatUnit(this.container.children[0].offsetWidth+a+a),this.rgb=this.hexToRgb(this.roundValue(this.value)),this.hsv=this.rgbToHsv.apply(this,this.rgb)},a.prototype.firstPaletteFocus=function(){t.select("."+tt,this.container.children[0])||t.selectAll(".e-palette",this.container)[0].focus()},a.prototype.appendPalette=function(e,t,i){var s=this.createElement("div",{className:"e-palette",attrs:{tabindex:"0"}});i?i.appendChild(s):this.appendElement(s);for(var n,a,r,l=0,o=e.length;l<o;l++)0!==l&&l%this.columns!=0||(n=this.createElement("div",{className:"e-row",attrs:{role:"presentation"}}),s.appendChild(n)),r=this.roundValue(e[l]).toLowerCase(),a=this.createElement("span",{className:it,attrs:{role:"gridcell","aria-label":r,"aria-selected":"false"}}),this.trigger("beforeTileRender",{element:a,presetName:t,value:e[l]}),n.appendChild(a),this.value===r&&(this.addTileSelection(a),s.focus()),a.style.backgroundColor=this.convertToRgbString(this.hexToRgb(r))},a.prototype.setNoColor=function(){var e=this.container.querySelector(".e-row").children[0];e.classList.add($e),this.value||(e.classList.add(tt),t.closest(e,".e-palette").focus()),["aria-selected","aria-label"].forEach(function(t){e.removeAttribute(t)}),e.style.backgroundColor=""},a.prototype.appendElement=function(e,t){void 0===t&&(t=0);var i=this.container.children[t];i?this.container.insertBefore(e,i):this.container.appendChild(e)},a.prototype.addTileSelection=function(e){e.classList.add(tt),e.setAttribute("aria-selected","true")},a.prototype.createPicker=function(){t.classList(this.container,["e-color-picker"],["e-color-palette"]);var e=this.createElement("div",{className:"e-hsv-container"});this.appendElement(e),e.appendChild(this.createElement("div",{className:Ze}));var i=this.createElement("span",{className:"e-handler",attrs:{tabindex:"0"}});e.appendChild(i),this.rgb=this.hexToRgb(this.value),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHsvContainerBg(),this.setHandlerPosition(),this.createSlider(),this.createDragTooltip()},a.prototype.setHsvContainerBg=function(e){void 0===e&&(e=this.hsv[0]),this.getHsvContainer().style.backgroundColor=this.convertToRgbString(this.hsvToRgb(e,100,100,1))},a.prototype.getHsvContainer=function(){return t.select(".e-hsv-container",this.container)},a.prototype.setHandlerPosition=function(){var e=this.getDragHandler(),i=t.select("."+Ze,this.container);this.enableRtl?e.style.left=t.formatUnit(i.offsetWidth*Math.abs(100-this.hsv[1])/100):e.style.left=t.formatUnit(i.offsetWidth*this.hsv[1]/100),e.style.top=t.formatUnit(i.offsetHeight*(100-this.hsv[2])/100)},a.prototype.createSlider=function(){var e=this.createElement("div",{className:"e-slider-preview"});this.appendElement(e,1),this.createPreview(e);var t=this.createElement("div",{className:"e-colorpicker-slider"});e.insertBefore(t,e.children[0]);var i=this.createElement("div",{className:"e-hue-slider"});t.appendChild(i),this.hueSlider=new be({value:this.hsv[0],min:0,max:359,enableRtl:this.enableRtl,enabled:!this.disabled,change:this.hueChange.bind(this)}),this.hueSlider.createElement=this.createElement,this.hueSlider.appendTo(i),this.enableOpacity&&(i=this.createElement("div",{className:"e-opacity-slider"}),t.appendChild(i),this.createOpacitySlider(i))},a.prototype.createOpacitySlider=function(e){this.opacitySlider=new be({value:100*this.rgb[3],min:0,max:100,enableRtl:this.enableRtl,enabled:!this.disabled,change:this.opacityChange.bind(this)}),this.opacitySlider.createElement=this.createElement,this.opacitySlider.appendTo(e);var t=this.createElement("div",{className:"e-opacity-empty-track"});e.appendChild(t),this.updateOpacitySliderBg()},a.prototype.updateOpacitySliderBg=function(){var e=this.enableRtl?"to left":"to right",i=t.select(".e-opacity-empty-track",this.opacitySlider.element);i&&(i.style.background="linear-gradient("+e+", rgba("+this.rgb.slice(0,3)+", 0) 0%, "+this.convertToRgbString(this.rgb.slice(0,3))+" 100%)")},a.prototype.hueChange=function(e){this.hsv[0]=e.value,this.setHsvContainerBg(),this.convertToOtherFormat()},a.prototype.opacityChange=function(e){var t=e.value,i=this.rgbToHex(this.rgb);this.hsv[3]=t/100,this.rgb[3]=t/100;var s=this.rgbToHex(this.rgb);this.updateOpacityInput(t);var n=this.convertToRgbString(this.rgb);this.updatePreview(n),this.triggerEvent(s,i,n)},a.prototype.updateOpacityInput=function(e){if(this.enableOpacity&&!this.getWrapper().classList.contains(Ke)){var i=t.getInstance(t.select("."+Je,this.container),Q);i.value=e,i.dataBind()}},a.prototype.createPreview=function(e){var t=this.createElement("div",{className:Qe});e.appendChild(t);var i=this.createElement("span",{className:"e-preview e-current"});t.appendChild(i);var s=this.convertToRgbString(this.rgb);i.style.backgroundColor=s,i=this.createElement("span",{className:"e-preview e-previous"}),t.appendChild(i),i.style.backgroundColor=s},a.prototype.isPicker=function(){return!this.container.classList.contains("e-color-palette")},a.prototype.getPopupEle=function(){return this.container.parentElement},a.prototype.createNumericInput=function(e,t,i,s){var n=this,a=new Q({value:t,placeholder:i,min:0,max:s,format:"###.##",showSpinButton:!1,floatLabelType:"Always",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker(),change:function(e){e.event&&n.inputHandler(e.event)}});a.createElement=this.createElement,a.appendTo(e)},a.prototype.createInput=function(){var t=this.isPicker(),i=this.getWrapper();if(t&&!i.classList.contains(Ke)||!t&&i.classList.contains(et)){var s=this.createElement("div",{className:Ye});t?this.appendElement(s,2):this.appendElement(s,1);var n=this.createElement("div",{className:"e-input-container"});if(s.appendChild(n),i.classList.contains("e-hide-valueswitcher")||this.appendValueSwitchBtn(s),!i.classList.contains(_e)){var a=this.createElement("input",{className:"e-hex",attrs:{maxlength:"7",spellcheck:"false"}});n.appendChild(a),e.Input.createInput({element:a,floatLabelType:"Always",properties:{placeholder:"HEX",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker()}},this.createElement),e.Input.setValue(this.value.slice(0,7),a),a.addEventListener("input",this.inputHandler.bind(this))}if(!i.classList.contains(Xe)){var r=void 0,l=void 0;this.isRgb?(r="RGB",l=this.rgb):(r="HSV",l=this.hsv);for(var o=["rh","gs","bv"],h=0;h<3;h++)this.createNumericInput(n.appendChild(this.createElement("input",{className:"e-"+o[h]+"-value"})),l[h],r[h],255);this.enableOpacity&&this.appendOpacityValue(n)}}},a.prototype.appendOpacityValue=function(e){this.createNumericInput(e.appendChild(this.createElement("input",{className:Je})),100*this.rgb[3],"A",100)},a.prototype.appendValueSwitchBtn=function(e){var t=this.createElement("button",{className:"e-icons e-css e-btn e-flat e-icon-btn e-value-switch-btn"});e.appendChild(t),this.isPicker()&&!this.getWrapper().classList.contains(Xe)&&t.addEventListener("click",this.formatSwitchHandler.bind(this))},a.prototype.createCtrlBtn=function(){if(this.modeSwitcher||this.showButtons){this.l10n.setLocale(this.locale);var e=this.createElement("div",{className:je});if(this.container.appendChild(e),this.showButtons){var t=this.createElement("div",{className:"e-ctrl-btn"});e.appendChild(t);var i=this.l10n.getConstant("Apply");t.appendChild(this.createElement("button",{innerHTML:i,className:"e-btn e-css e-flat e-primary e-small e-apply",attrs:{title:i}}));var s=this.l10n.getConstant("Cancel");t.appendChild(this.createElement("button",{innerHTML:s,className:"e-btn e-css e-flat e-small e-cancel",attrs:{title:s}}))}this.modeSwitcher&&this.appendModeSwitchBtn()}},a.prototype.appendModeSwitchBtn=function(){var e=this.createElement("button",{className:"e-icons e-btn e-flat e-icon-btn "+Ge,attrs:{title:this.l10n.getConstant("ModeSwitcher")}});t.select("."+je,this.container).insertBefore(e,t.select(".e-ctrl-btn",this.container))},a.prototype.createDragTooltip=function(){var e=this,s=new i.Tooltip({opensOn:"Custom",showTipPointer:!1,cssClass:"e-color-picker-tooltip",beforeOpen:function(t){e.tooltipEle=t.element},animation:{open:{effect:"None"},close:{effect:"None"}}});s.createElement=this.createElement,s.appendTo(this.container),s.open(this.container),this.tooltipEle.style.zIndex=i.getZindexPartial(this.tooltipEle).toString(),t.select(".e-tip-content",this.tooltipEle).appendChild(this.createElement("div",{className:"e-tip-transparent"}))},a.prototype.getTooltipInst=function(){return t.getInstance(this.container,i.Tooltip)},a.prototype.setTooltipOffset=function(e){this.getTooltipInst().offsetY=e},a.prototype.toggleDisabled=function(e){e?this.getWrapper().classList.add("e-disabled"):this.getWrapper().classList.remove("e-disabled"),this.showButtons&&[].slice.call(t.selectAll(".e-btn",this.container)).forEach(function(i){e?t.attributes(i,{disabled:""}):i.removeAttribute("disabled")})},a.prototype.convertToRgbString=function(e){return e.length?4===e.length?"rgba("+e.join()+")":"rgb("+e.join()+")":""},a.prototype.convertToHsvString=function(e){return 4===e.length?"hsva("+e.join()+")":"hsv("+e.join()+")"},a.prototype.updateHsv=function(){this.hsv[1]=this.hsv[1]>100?100:this.hsv[1],this.hsv[2]=this.hsv[2]>100?100:this.hsv[2],this.setHandlerPosition()},a.prototype.convertToOtherFormat=function(e){void 0===e&&(e=!1);var t=this.rgbToHex(this.rgb);this.rgb=this.hsvToRgb.apply(this,this.hsv);var i=this.rgbToHex(this.rgb),s=this.convertToRgbString(this.rgb);this.updatePreview(s),this.updateInput(i),this.triggerEvent(i,t,s,e)},a.prototype.updateInput=function(i){var s=this.getWrapper();s.classList.contains(Ke)||(s.classList.contains(_e)||e.Input.setValue(i.substr(0,7),t.select(".e-hex",this.container)),s.classList.contains(Xe)||(this.isRgb?this.updateValue(this.rgb,!1):this.updateValue(this.hsv,!1)))},a.prototype.updatePreview=function(e){this.enableOpacity&&this.updateOpacitySliderBg(),t.select(".e-tip-transparent",this.tooltipEle).style.backgroundColor=e,t.select("."+Qe+" .e-current",this.container).style.backgroundColor=e,t.select("."+Qe+" .e-previous",this.container).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value))},a.prototype.getDragHandler=function(){return t.select(".e-handler",this.container)},a.prototype.removeTileSelection=function(){[].slice.call(t.selectAll("."+tt,this.container.children[0])).forEach(function(e){e.classList.remove(tt),e.setAttribute("aria-selected","false")})},a.prototype.convertRgbToNumberArray=function(e){return e.slice(e.indexOf("(")+1,e.indexOf(")")).split(",").map(function(e,t){return 3!==t?parseInt(e,10):parseFloat(e)})},a.prototype.getValue=function(e,t){if(e||(e=this.value),t=t?t.toLowerCase():"hex","r"===e[0]){i=this.convertRgbToNumberArray(e);if("hex"===t||"hexa"===t){s=this.rgbToHex(i);return"hex"===t?s.slice(0,7):s}return"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i.slice(0,3))):"hsva"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i)):"null"}if("h"===e[0]){var i=this.hsvToRgb.apply(this,this.convertRgbToNumberArray(e));if("rgba"===t)return this.convertToRgbString(i);if("hex"===t||"hexa"===t){var s=this.rgbToHex(i);return"hex"===t?s.slice(0,7):s}return"rgb"===t?this.convertToRgbString(i.slice(0,3)):"null"}e=this.roundValue(e);var n=this.hexToRgb(e);return"rgb"!==t&&"hsv"!==t||(n=n.slice(0,3)),"rgba"===t||"rgb"===t?this.convertToRgbString(n):"hsva"===t||"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,n)):"hex"===t?e.slice(0,7):"a"===t?n[3].toString():"null"},a.prototype.toggle=function(){this.container.parentElement.classList.contains("e-popup-close")?this.splitBtn.toggle():this.closePopup(null)},a.prototype.getModuleName=function(){return"colorpicker"},a.prototype.getPersistData=function(){return this.addOnPersist(["value"])},a.prototype.wireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();t.EventHandler.add(e,"keydown",this.pickerKeyDown,this),t.EventHandler.add(this.getHsvContainer(),"mousedown touchstart",this.handlerDown,this),(this.modeSwitcher||this.showButtons)&&this.addCtrlSwitchEvent(),t.EventHandler.add(t.select(".e-previous",this.container),"click",this.previewHandler,this)}else t.EventHandler.add(this.container,"click",this.paletteClickHandler,this),t.EventHandler.add(this.container,"keydown",this.paletteKeyDown,this)},a.prototype.formResetHandler=function(){this.value=this.initialInputValue,t.attributes(this.element,{value:this.initialInputValue})},a.prototype.addCtrlSwitchEvent=function(){var e=t.select("."+je,this.container);e&&t.EventHandler.add(e,"click",this.btnClickHandler,this)},a.prototype.pickerKeyDown=function(e){switch(e.keyCode){case 39:this.handlerDragPosition(1,this.enableRtl?-1:1,e);break;case 37:this.handlerDragPosition(1,this.enableRtl?1:-1,e);break;case 38:this.handlerDragPosition(2,1,e);break;case 40:this.handlerDragPosition(2,-1,e);break;case 13:e.preventDefault();var t=this.rgbToHex(this.rgb);this.enterKeyHandler(t,e)}},a.prototype.enterKeyHandler=function(e,t){this.triggerChangeEvent(e),this.inline||(this.closePopup(t),this.splitBtn.element.focus())},a.prototype.closePopup=function(e){var t=this,i={element:this.container,event:e,cancel:!1};this.trigger("beforeClose",i,function(e){e.cancel||(t.splitBtn.toggle(),t.onPopupClose())})},a.prototype.triggerChangeEvent=function(e){var t=e.slice(0,7);this.trigger("change",{currentValue:{hex:t,rgba:this.convertToRgbString(this.rgb)},previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:this.enableOpacity?e:t}),this.enableOpacity?this.setProperties({value:e},!0):this.setProperties({value:t},!0),this.element.value=t||"#000000"},a.prototype.handlerDragPosition=function(e,t,i){i.preventDefault(),this.hsv[e]+=t*(i.ctrlKey?1:3),this.hsv[e]<0&&(this.hsv[e]=0),this.updateHsv(),this.convertToOtherFormat(!0)},a.prototype.handlerDown=function(e){e.preventDefault(),"mousedown"===e.type?(this.clientX=Math.abs(e.pageX-pageXOffset),this.clientY=Math.abs(e.pageY-pageYOffset),this.setTooltipOffset(8)):(this.clientX=Math.abs(e.changedTouches[0].pageX-pageXOffset),this.clientY=Math.abs(e.changedTouches[0].pageY-pageYOffset),this.setTooltipOffset(-8)),this.setHsv(this.clientX,this.clientY),this.getDragHandler().style.transition="left .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1)",this.updateHsv(),this.convertToOtherFormat(),this.getDragHandler().focus(),t.EventHandler.add(document,"mousemove touchmove",this.handlerMove,this),t.EventHandler.add(document,"mouseup touchend",this.handlerEnd,this)},a.prototype.handlerMove=function(e){"touchmove"!==e.type&&e.preventDefault();var i,s;"mousemove"===e.type?(i=Math.abs(e.pageX-pageXOffset),s=Math.abs(e.pageY-pageYOffset)):(i=Math.abs(e.changedTouches[0].pageX-pageXOffset),s=Math.abs(e.changedTouches[0].pageY-pageYOffset)),this.setHsv(i,s);var n=this.getDragHandler();this.updateHsv(),this.convertToOtherFormat(),this.getTooltipInst().refresh(n),this.tooltipEle.style.transform||(Math.abs(this.clientX-i)>8||Math.abs(this.clientY-s)>8)&&(t.select("."+Ze,this.container).style.cursor="pointer",n.style.transition="none",this.inline||(this.tooltipEle.style.zIndex=(parseInt(this.getPopupEle().style.zIndex,10)+1).toString()),this.tooltipEle.style.transform="rotate(45deg)",n.classList.add("e-hide-handler"))},a.prototype.setHsv=function(e,i){var s=t.select("."+Ze,this.container),n=s.getBoundingClientRect();e=this.enableRtl?e>n.right?0:Math.abs(e-n.right):e>n.left?Math.abs(e-n.left):0,i=i>n.top?Math.abs(i-n.top):0,this.hsv[2]=Math.round(10*Number(100*(s.offsetHeight-Math.max(0,Math.min(s.offsetHeight,i-s.offsetTop)))/s.offsetHeight))/10,this.hsv[1]=Math.round(10*Number(100*Math.max(0,Math.min(s.offsetWidth,e-s.offsetLeft))/s.offsetWidth))/10},a.prototype.handlerEnd=function(e){"touchend"!==e.type&&e.preventDefault(),t.EventHandler.remove(document,"mousemove touchmove",this.handlerMove),t.EventHandler.remove(document,"mouseup touchend",this.handlerEnd);var i=this.getDragHandler();t.select("."+Ze,this.container).style.cursor="",this.tooltipEle.style.transform&&(this.tooltipEle.style.transform="",i.classList.remove("e-hide-handler")),this.inline||this.showButtons||this.closePopup(e)},a.prototype.btnClickHandler=function(e){var i=e.target;t.closest(i,"."+Ge)?(e.stopPropagation(),this.switchToPalette()):(i.classList.contains("e-apply")||i.classList.contains("e-cancel"))&&this.ctrlBtnClick(i,e)},a.prototype.switchToPalette=function(){this.trigger("beforeModeSwitch",{element:this.container,mode:"Palette"}),this.unWireEvents(),this.destroyOtherComp(),t.detach(t.select(".e-slider-preview",this.container)),this.getWrapper().classList.contains(Ke)||t.remove(t.select("."+Ye,this.container)),t.detach(this.getHsvContainer()),this.createPalette(),this.firstPaletteFocus(),this.createInput(),this.refreshPopupPos(),this.wireEvents(),this.trigger("onModeSwitch",{element:this.container,mode:"Palette"})},a.prototype.refreshPopupPos=function(){if(!this.inline){var e=this.getPopupEle();e.style.left=t.formatUnit(0+pageXOffset),e.style.top=t.formatUnit(0+pageYOffset),this.getPopupInst().refreshPosition(this.splitBtn.element.parentElement)}},a.prototype.formatSwitchHandler=function(){this.isRgb?(this.updateValue(this.hsv,!0,3,[360,100,100]),this.isRgb=!1):(this.updateValue(this.rgb,!0,2),this.isRgb=!0)},a.prototype.updateValue=function(e,i,s,n){for(var a,r=["e-rh-value","e-gs-value","e-bv-value"],l=0,o=r.length;l<o;l++)(a=t.getInstance(t.select("."+r[l],this.container),Q)).value=Math.round(e[l]),i&&(a.placeholder=r[l].substr(s,1).toUpperCase(),a.max=n?n[l]:255),a.dataBind()},a.prototype.previewHandler=function(e){var i=e.target,s=this.rgbToHex(this.rgb);this.rgb=this.convertRgbToNumberArray(i.style.backgroundColor),this.rgb[3]||(this.rgb[3]=1);var n=this.rgbToHex(this.rgb),a=this.rgbToHsv.apply(this,this.rgb);a[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:a[0]},!0),this.hueSlider.refresh()),this.setHsvContainerBg(a[0]),this.enableOpacity&&a[3]!==this.hsv[3]&&(this.opacitySlider.setProperties({value:100*a[3]},!0),this.opacitySlider.refresh(),this.updateOpacitySliderBg()),this.hsv=a,this.setHandlerPosition(),this.updateInput(n),t.select("."+Qe+" .e-current",this.container).style.backgroundColor=this.convertToRgbString(this.rgb),this.triggerEvent(n,s,this.convertToRgbString(this.rgb))},a.prototype.paletteClickHandler=function(e){e.preventDefault();var i=e.target;if(i.classList.contains(it)){if(this.removeTileSelection(),this.addTileSelection(i),i.classList.contains($e))this.noColorTile();else{var s=i.getAttribute("aria-label"),n=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(this.roundValue(s)),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(et)&&this.updateInput(s),this.triggerEvent(s,n,this.convertToRgbString(this.rgb))}this.inline||this.showButtons||this.closePopup(e)}else t.closest(i,"."+Ge)?this.switchToPicker():i.classList.contains("e-apply")||i.classList.contains("e-cancel")?this.ctrlBtnClick(i,e):this.getWrapper().classList.contains(et)&&t.closest(i,".e-value-switch-btn")&&this.formatSwitchHandler()},a.prototype.noColorTile=function(e){void 0===e&&(e=!1);var t=this.rgbToHex(this.rgb);this.rgb=[],this.hsv=[],this.triggerEvent("",t,"",e)},a.prototype.switchToPicker=function(){var e=this.getWrapper();this.trigger("beforeModeSwitch",{element:this.container,mode:"Picker"}),this.unWireEvents(),[].slice.call(t.selectAll(".e-palette",this.container)).forEach(function(e){t.detach(e)}),e.classList.contains(et)&&t.detach(t.select("."+Ye,this.container)),this.container.style.width="";var i=t.select(".e-custom-palette",this.container);this.presetColors&&t.remove(i),this.createPicker(),this.getDragHandler().focus(),this.createInput(),this.refreshPopupPos(),this.wireEvents(),this.trigger("onModeSwitch",{element:this.container,mode:"Picker"})},a.prototype.ctrlBtnClick=function(e,t){if(e.classList.contains("e-apply")){var i=this.rgbToHex(this.rgb);this.triggerChangeEvent(i)}this.inline||(this.closePopup(t),this.splitBtn.element.focus())},a.prototype.paletteKeyDown=function(e){var i=e.target;if(i.classList.contains("e-palette")){var s,n,a=[].slice.call(t.selectAll("."+it,i)),r=a.filter(function(e){return e.classList.contains("e-selected")}).pop();switch(!e.altKey&&e.keyCode){case 39:e.preventDefault(),s=r?a[this.tilePosition(a,r,this.enableRtl?-1:1)]:a[this.enableRtl?a.length-1:0],this.keySelectionChanges(s);break;case 37:e.preventDefault(),s=r?a[this.tilePosition(a,r,this.enableRtl?1:-1)]:a[this.enableRtl?0:a.length-1],this.keySelectionChanges(s);break;case 38:e.preventDefault(),s=a[n=r?this.tilePosition(a,r,-this.columns):0]?a[n]:a[n-this.columns],this.keySelectionChanges(s);break;case 40:e.preventDefault(),a[n=r?this.tilePosition(a,r,this.columns):a.length-1]?s=a[n]:(n%=a.length,s=a[n+=a[a.length-1].parentElement.childElementCount]),this.keySelectionChanges(s);break;case 13:if(e.preventDefault(),r){var l=r.getAttribute("aria-label");this.enterKeyHandler(l||"",e)}}}},a.prototype.keySelectionChanges=function(e){if(this.removeTileSelection(),this.addTileSelection(e),e.classList.contains($e))this.noColorTile(!0);else{var t=e.getAttribute("aria-label"),i=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(t),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(et)&&this.updateInput(t),this.triggerEvent(t,i,this.convertToRgbString(this.rgb),!0)}},a.prototype.tilePosition=function(e,t,i){var s=(e=Array.prototype.slice.call(e)).length,n=this.columns-e[s-1].parentElement.childElementCount,a=e.indexOf(t);return a+=i,a<0?a+=s+n:a%=s+n,a},a.prototype.inputHandler=function(e){var i=e.target;if(i.value.length){var s,n;switch(t.select(".e-float-text",i.parentElement).textContent){case"HEX":var a="";if(("#"===i.value[0]&&5!==i.value.length||"#"!==i.value[0]&&4!==i.value.length)&&(a=this.roundValue(i.value)),9!==a.length)return;n=this.rgbToHex(this.rgb),this.rgb=this.hexToRgb(a+a.substr(-2)),this.inputValueChange(this.rgbToHsv.apply(this,this.rgb),n,i.value);break;case"R":this.rgb[0]!==Number(i.value)&&(n=this.rgbToHex(this.rgb),this.rgb[0]=Number(i.value),s=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(s,n));break;case"G":this.rgb[1]!==Number(i.value)&&(n=this.rgbToHex(this.rgb),this.rgb[1]=Number(i.value),s=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(s,n));break;case"B":this.rgb[2]!==Number(i.value)&&(n=this.rgbToHex(this.rgb),this.rgb[2]=Number(i.value),s=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(s,n));break;case"H":this.hueSlider.value=Number(i.value);break;case"S":this.hsv[1]!==Number(i.value)&&(this.hsv[1]=Number(i.value),this.updateHsv(),this.convertToOtherFormat());break;case"V":this.hsv[2]!==Number(i.value)&&(this.hsv[2]=Number(i.value),this.updateHsv(),this.convertToOtherFormat());break;case"A":this.opacitySlider.value=Number(i.value)}}},a.prototype.inputValueChange=function(e,t,i){e[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:e[0]},!0),this.hueSlider.refresh(),this.setHsvContainerBg(e[0])),this.hsv=e;var s=this.rgbToHex(this.rgb);this.setHandlerPosition(),this.updateInput(i||s);var n=this.convertToRgbString(this.rgb);this.updatePreview(n),this.triggerEvent(s,t,n)},a.prototype.triggerEvent=function(e,t,i,s){void 0===s&&(s=!1);var n=e.slice(0,7);this.showButtons||s?this.trigger("select",{currentValue:{hex:n,rgba:i},previousValue:{hex:t.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(t))}}):(this.trigger("change",{currentValue:{hex:n,rgba:i},previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:e}),this.setProperties({value:e},!0),this.element.value=n||"#000000")},a.prototype.destroy=function(){var e=this,i=this.getWrapper();n.prototype.destroy.call(this),["tabindex","spellcheck"].forEach(function(t){e.element.removeAttribute(t)}),this.inline?(this.unWireEvents(),this.destroyOtherComp()):(this.isPopupOpen()&&(this.unWireEvents(),this.destroyOtherComp()),this.splitBtn.destroy(),this.splitBtn=null),this.tileRipple(),this.tileRipple=null,this.ctrlBtnRipple(),this.ctrlBtnRipple=null,this.element.nextElementSibling&&t.detach(this.element.nextElementSibling),i&&(i.parentElement.insertBefore(this.element,i),t.detach(i)),this.container=null,this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},a.prototype.destroyOtherComp=function(){if(this.isPicker()){this.hueSlider.destroy(),this.enableOpacity&&(this.opacitySlider.destroy(),this.opacitySlider=null),this.hueSlider=null;var e=this.getTooltipInst();e.close(),e.destroy(),this.tooltipEle=null}},a.prototype.isPopupOpen=function(){return this.getPopupEle().classList.contains("e-popup-open")},a.prototype.unWireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();t.EventHandler.remove(e,"keydown",this.pickerKeyDown),t.EventHandler.remove(this.getHsvContainer(),"mousedown touchstart",this.handlerDown),(this.modeSwitcher||this.showButtons)&&t.EventHandler.remove(t.select("."+je,this.container),"click",this.btnClickHandler),t.EventHandler.remove(t.select(".e-previous",this.container),"click",this.previewHandler)}else t.EventHandler.remove(this.container,"click",this.paletteClickHandler),t.EventHandler.remove(this.container,"keydown",this.paletteKeyDown)},a.prototype.roundValue=function(e){if(!e)return"";"#"!==e[0]&&(e="#"+e);var t=e.length;if(4===t&&(e+="f",t=5),5===t){for(var i="",s=1,n=e.length;s<n;s++)i+=e.charAt(s)+e.charAt(s);e="#"+i,t=9}return 7===t&&(e+="ff"),e},a.prototype.hexToRgb=function(e){if(!e)return[];9!==(e=e.trim()).length&&(e=this.roundValue(e));var t=Number((parseInt(e.slice(-2),16)/255).toFixed(2));e=e.slice(1,7);var i=parseInt(e,16),s=[];return s.push(i>>16&255),s.push(i>>8&255),s.push(255&i),s.push(t),s},a.prototype.rgbToHsv=function(e,i,s,n){if(this.rgb&&!this.rgb.length)return[];e/=255,i/=255,s/=255;var a,r=Math.max(e,i,s),l=Math.min(e,i,s),o=r,h=r-l,d=0===r?0:h/r;if(r===l)a=0;else{switch(r){case e:a=(i-s)/h+(i<s?6:0);break;case i:a=(s-e)/h+2;break;case s:a=(e-i)/h+4}a/=6}var u=[Math.round(360*a),Math.round(1e3*d)/10,Math.round(1e3*o)/10];return t.isNullOrUndefined(n)||u.push(n),u},a.prototype.hsvToRgb=function(e,i,s,n){var a,r,l;if(i/=100,s/=100,0===i)return a=r=l=s,[Math.round(255*a),Math.round(255*r),Math.round(255*l),n];e/=60;var o=Math.floor(e),h=e-o,d=s*(1-i),u=s*(1-i*h),c=s*(1-i*(1-h));switch(o){case 0:a=s,r=c,l=d;break;case 1:a=u,r=s,l=d;break;case 2:a=d,r=s,l=c;break;case 3:a=d,r=u,l=s;break;case 4:a=c,r=d,l=s;break;default:a=s,r=d,l=u}var p=[Math.round(255*a),Math.round(255*r),Math.round(255*l)];return t.isNullOrUndefined(n)||p.push(n),p},a.prototype.rgbToHex=function(e){return e.length?"#"+this.hex(e[0])+this.hex(e[1])+this.hex(e[2])+(t.isNullOrUndefined(e[3])?"":0!==e[3]?(Math.round(255*e[3])+65536).toString(16).substr(-2):"00"):""},a.prototype.hex=function(e){return("0"+e.toString(16)).slice(-2)},a.prototype.changeModeSwitcherProp=function(e){var i=t.select("."+je,this.container);e?i?this.appendModeSwitchBtn():(this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):i&&(this.showButtons?t.detach(t.select("."+Ge,i)):t.remove(i))},a.prototype.changeShowBtnProps=function(e){var i=t.select("."+je,this.container);e?(i&&t.remove(i),this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):this.modeSwitcher?t.detach(t.select(".e-ctrl-btn",i)):t.remove(i)},a.prototype.changeValueProp=function(e){if(this.isPicker())this.rgb=this.hexToRgb(e),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHandlerPosition(),t.detach(t.closest(this.hueSlider.element,".e-slider-preview")),this.createSlider(),this.setHsvContainerBg(),this.updateInput(e),4===this.rgb.length&&this.updateOpacityInput(100*this.rgb[3]);else{this.removeTileSelection();var i=this.container.querySelector('span[aria-label="'+this.roundValue(e)+'"]');i&&this.addTileSelection(i)}},a.prototype.setInputEleProps=function(){t.remove(t.select("."+Ye,this.container)),this.createInput()},a.prototype.changeDisabledProp=function(e){this.isPicker()&&(this.hueSlider.enabled=!e,this.opacitySlider.enabled=!e,this.setInputEleProps()),e?(this.toggleDisabled(!0),this.unWireEvents()):(this.toggleDisabled(!1),this.wireEvents())},a.prototype.changeCssClassProps=function(e,i){var s=this.getWrapper(),n=this.getPopupEle();i&&t.removeClass([s,n],i.split(" ")),e&&t.addClass([s,n],e.split(" "))},a.prototype.changeRtlProps=function(e){e?t.addClass([this.getWrapper()],"e-rtl"):t.removeClass([this.getWrapper()],"e-rtl")},a.prototype.changePaletteProps=function(){t.detach(this.container.children[0]),this.container.style.width="",this.createPalette()},a.prototype.changeOpacityProps=function(e){var i=this.getWrapper();e?(t.removeClass([this.container.parentElement],"e-hide-opacity"),this.createOpacitySlider(t.select(".e-colorpicker-slider",this.container).appendChild(this.createElement("div",{className:"e-opacity-slider"}))),i.classList.contains(Ke)||i.classList.contains(Xe)||this.appendOpacityValue(t.select(".e-input-container",this.container))):(t.addClass([this.container.parentElement],"e-hide-opacity"),this.opacitySlider.destroy(),t.remove(this.opacitySlider.element),this.opacitySlider=null,i.classList.contains(Ke)||i.classList.contains(Xe)||t.remove(t.select("."+Je,this.container).parentElement))},a.prototype.onPropertyChanged=function(e,i){var n=this;if(!t.isNullOrUndefined(e.value)){var a=this.roundValue(e.value);if(9===a.length){this.element.value=this.roundValue(a).slice(0,7);var r=this.splitBtn&&t.select(".e-split-preview",this.splitBtn.element);r&&(r.style.backgroundColor=this.convertToRgbString(this.hexToRgb(e.value)))}else this.value=i.value}if(!this.inline&&t.isNullOrUndefined(e.inline)){var l=["disabled","enableRtl"];if(this.splitBtn.setProperties(s.getModel(e,l)),!this.isPopupOpen())return this.changeCssClassProps(e.cssClass,i.cssClass),void this.changeRtlProps(e.enableRtl)}for(var o=this,h=0,d=Object.keys(e);h<d.length;h++)!function(s){switch(s){case"inline":e.inline?(o.getWrapper().appendChild(o.container),o.splitBtn.destroy(),t.detach(o.element.nextElementSibling),o.container.children.length||o.createWidget()):(o.destroyOtherComp(),o.unWireEvents(),o.container.innerHTML="",o.createSplitBtn());break;case"cssClass":o.changeCssClassProps(e.cssClass,i.cssClass);var a=e.cssClass.split(" ").concat(i.cssClass.split(" ")),r=0;(a=a.reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[])).forEach(function(e){0!==r||e!==Ke&&"e-hide-valueswitcher"!==e&&e!==et&&e!==_e&&e!==Xe||(t.select("."+Ye,n.container)&&t.remove(t.select("."+Ye,n.container)),n.createInput(),r++)});break;case"enableRtl":o.isPicker()&&(o.hueSlider.enableRtl=e.enableRtl,o.enableOpacity&&(o.opacitySlider.enableRtl=e.enableRtl),o.setInputEleProps()),o.changeRtlProps(e.enableRtl);break;case"disabled":o.changeDisabledProp(e.disabled);break;case"value":o.value!==i.value&&o.changeValueProp(e.value);break;case"showButtons":o.changeShowBtnProps(e.showButtons);break;case"mode":"Picker"===e.mode?o.switchToPicker():o.switchToPalette();break;case"modeSwitcher":o.changeModeSwitcherProp(e.modeSwitcher);break;case"columns":case"presetColors":o.isPicker()||o.changePaletteProps();break;case"noColor":e.noColor?"Palette"!==o.mode||o.modeSwitcher||o.setNoColor():o.changePaletteProps();break;case"enableOpacity":o.changeOpacityProps(e.enableOpacity)}}(d[h])},a.prototype.focusIn=function(){this.element.parentElement.focus()},We([t.Property("#008000ff")],a.prototype,"value",void 0),We([t.Property("")],a.prototype,"cssClass",void 0),We([t.Property(!1)],a.prototype,"disabled",void 0),We([t.Property("Picker")],a.prototype,"mode",void 0),We([t.Property(!0)],a.prototype,"modeSwitcher",void 0),We([t.Property(null)],a.prototype,"presetColors",void 0),We([t.Property(!0)],a.prototype,"showButtons",void 0),We([t.Property(10)],a.prototype,"columns",void 0),We([t.Property(!1)],a.prototype,"inline",void 0),We([t.Property(!1)],a.prototype,"noColor",void 0),We([t.Property(!1)],a.prototype,"enablePersistence",void 0),We([t.Property(!0)],a.prototype,"enableOpacity",void 0),We([t.Event()],a.prototype,"select",void 0),We([t.Event()],a.prototype,"change",void 0),We([t.Event()],a.prototype,"beforeTileRender",void 0),We([t.Event()],a.prototype,"beforeOpen",void 0),We([t.Event()],a.prototype,"open",void 0),We([t.Event()],a.prototype,"beforeClose",void 0),We([t.Event()],a.prototype,"beforeModeSwitch",void 0),We([t.Event()],a.prototype,"onModeSwitch",void 0),We([t.Event()],a.prototype,"created",void 0),a=We([t.NotifyPropertyChanges],a)}(t.Component),at=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),rt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},lt=["title","style","class"],ot=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.previousValue=null,s.isAngular=!1,s.isHiddenInput=!1,s.isForm=!1,s.inputPreviousValue=null,s.isVue=!1,s.textboxOptions=e,s}return at(s,i),s.prototype.onPropertyChanged=function(i,s){for(var n=0,a=Object.keys(i);n<a.length;n++)switch(a[n]){case"floatLabelType":e.Input.removeFloating(this.textboxWrapper),e.Input.addFloating(this.respectiveElement,this.floatLabelType,this.placeholder);break;case"enabled":e.Input.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container),this.bindClearEvent();break;case"width":e.Input.setWidth(i.width,this.textboxWrapper.container);break;case"value":var r=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.isBlank(this.value)||(this.value=this.value.toString()),this.isProtectedOnChange=r,e.Input.setValue(this.value,this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value),this.inputPreviousValue=this.respectiveElement.value,(this.isAngular||this.isVue)&&!0===this.preventChange?(this.previousValue=this.isAngular?this.value:this.previousValue,this.preventChange=!1):(t.isNullOrUndefined(this.isAngular)||!this.isAngular||this.isAngular&&!this.preventChange||this.isAngular&&t.isNullOrUndefined(this.preventChange))&&this.raiseChangeEvent();break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkAttributes(!0),e.Input.validateInputType(this.textboxWrapper.container,this.element);break;case"readonly":e.Input.setReadonly(this.readonly,this.respectiveElement);break;case"type":"TEXTAREA"!==this.respectiveElement.tagName&&(this.respectiveElement.setAttribute("type",this.type),e.Input.validateInputType(this.textboxWrapper.container,this.element),this.raiseChangeEvent());break;case"showClearButton":"TEXTAREA"!==this.respectiveElement.tagName&&(e.Input.setClearButton(this.showClearButton,this.respectiveElement,this.textboxWrapper),this.bindClearEvent());break;case"enableRtl":e.Input.setEnableRtl(this.enableRtl,[this.textboxWrapper.container]);break;case"placeholder":e.Input.setPlaceholder(this.placeholder,this.respectiveElement);break;case"autocomplete":"on"!==this.autocomplete&&""!==this.autocomplete?this.respectiveElement.autocomplete=this.autocomplete:this.removeAttributes(["autocomplete"]);break;case"cssClass":this.updateCssClass(i.cssClass,s.cssClass);break;case"locale":this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),e.Input.setPlaceholder(this.placeholder,this.respectiveElement)}},s.prototype.getModuleName=function(){return"textbox"},s.prototype.isBlank=function(e){return!e||/^\s*$/.test(e)},s.prototype.preRender=function(){if(!t.isBlazor()||!this.isServerRendered){if(this.cloneElement=this.element.cloneNode(!0),this.formElement=t.closest(this.element,"form"),t.isNullOrUndefined(this.formElement)||(this.isForm=!0),"EJS-TEXTBOX"===this.element.tagName){var e=t.getValue("ej2_instances",this.element),i=this.multiline?this.createElement("textarea"):this.createElement("input");for(a=0;a<this.element.attributes.length;a++)"id"!==(r=this.element.attributes[a].nodeName)&&(i.setAttribute(r,this.element.attributes[a].nodeValue),i.innerHTML=this.element.innerHTML,"name"===r&&this.element.removeAttribute("name"));this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}this.updateHTMLAttrToElement(),this.checkAttributes(!1),"TEXTAREA"!==this.element.tagName&&this.element.setAttribute("type",this.type),this.element.setAttribute("role","textbox"),this.globalize=new t.Internationalization(this.locale);var s={placeholder:this.placeholder};if(this.l10n=new t.L10n("textbox",s,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",t.getUniqueID("textbox")),this.element.hasAttribute("name")||this.element.setAttribute("name",this.element.getAttribute("id")),"INPUT"===this.element.tagName&&this.multiline){this.isHiddenInput=!0,this.textarea=this.createElement("textarea"),this.element.parentNode.insertBefore(this.textarea,this.element),this.element.setAttribute("type","hidden"),this.textarea.setAttribute("name",this.element.getAttribute("name")),this.element.removeAttribute("name"),this.textarea.setAttribute("role",this.element.getAttribute("role")),this.element.removeAttribute("role"),this.textarea.setAttribute("id",t.getUniqueID("textarea"));for(var n=["placeholder","disabled","value","readonly","type","autocomplete"],a=0;a<this.element.attributes.length;a++){var r=this.element.attributes[a].nodeName;this.element.hasAttribute(r)&<.indexOf(r)<0&&"id"!==r&&"type"!==r&&"e-mappinguid"!==r&&(this.textarea.setAttribute(r,this.element.attributes[a].nodeValue),n.indexOf(r)<0&&(this.element.removeAttribute(r),a--))}}}},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly","type","autocomplete"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"autocomplete":if(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.autocomplete||e){var l="off"===this.element.autocomplete?"off":"on";this.setProperties({autocomplete:l},!e)}break;case"value":(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.value||e)&&this.setProperties({value:this.element.value},!e);break;case"type":(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.type||e)&&this.setProperties({type:this.element.type},!e)}}},s.prototype.render=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.getInputValidClassList(this.cssClass)),t.isBlazor()&&this.isServerRendered?(this.respectiveElement=this.element,this.textboxWrapper={container:this.element.parentElement},this.showClearButton&&!this.multiline&&(this.textboxWrapper.clearButton=this.textboxWrapper.container.querySelector(".e-clear-icon"),e.Input.wireClearBtnEvents(this.respectiveElement,this.textboxWrapper.clearButton,this.textboxWrapper.container)),"Auto"===this.floatLabelType&&e.Input.wireFloatingEvents(this.respectiveElement),e.Input.bindInitialEvent({element:this.respectiveElement,buttons:null,customTag:null,floatLabelType:this.floatLabelType,properties:this.properties})):(this.respectiveElement=this.isHiddenInput?this.textarea:this.element,this.textboxWrapper=e.Input.createInput({element:this.respectiveElement,floatLabelType:this.floatLabelType,properties:{enabled:this.enabled,enableRtl:this.enableRtl,cssClass:i,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}}),this.updateHTMLAttrToWrapper(),this.isHiddenInput&&this.respectiveElement.parentNode.insertBefore(this.element,this.respectiveElement)),this.wireEvents(),t.isNullOrUndefined(this.value)||(e.Input.setValue(this.value,this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value)),t.isNullOrUndefined(this.value)||(this.initialValue=this.value,this.setInitialValue()),"on"!==this.autocomplete&&""!==this.autocomplete?this.respectiveElement.autocomplete=this.autocomplete:t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.autocomplete||this.removeAttributes(["autocomplete"]),this.previousValue=this.value,this.inputPreviousValue=this.value,this.respectiveElement.defaultValue=this.respectiveElement.value,e.Input.setWidth(this.width,this.textboxWrapper.container),this.renderComplete()},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(lt.indexOf(s)>-1)if("class"===s){var n=this.getInputValidClassList(this.htmlAttributes[s]);""!==n&&t.addClass([this.textboxWrapper.container],n.split(" "))}else if("style"===s){var a=this.textboxWrapper.container.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[s]:a+this.htmlAttributes[s],this.textboxWrapper.container.setAttribute(s,a)}else this.textboxWrapper.container.setAttribute(s,this.htmlAttributes[s])}},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];lt.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[s])}},s.prototype.updateCssClass=function(t,i){e.Input.setCssClass(this.getInputValidClassList(t),[this.textboxWrapper.container],this.getInputValidClassList(i))},s.prototype.getInputValidClassList=function(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i},s.prototype.setInitialValue=function(){this.isAngular||this.respectiveElement.setAttribute("value",this.initialValue)},s.prototype.wireEvents=function(){t.EventHandler.add(this.respectiveElement,"focus",this.focusHandler,this),t.EventHandler.add(this.respectiveElement,"blur",this.focusOutHandler,this),t.EventHandler.add(this.respectiveElement,"input",this.inputHandler,this),t.EventHandler.add(this.respectiveElement,"change",this.changeHandler,this),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.resetForm,this),this.bindClearEvent(),!t.isNullOrUndefined(this.textboxWrapper.container.querySelector(".e-float-text"))&&"Auto"===this.floatLabelType&&this.textboxWrapper.container.classList.contains("e-autofill")&&this.textboxWrapper.container.classList.contains("e-outline")&&t.EventHandler.add(this.textboxWrapper.container.querySelector(".e-float-text"),"animationstart",this.animationHandler,this)},s.prototype.animationHandler=function(){this.textboxWrapper.container.classList.add("e-valid-input");var e=this.textboxWrapper.container.querySelector(".e-float-text");t.isNullOrUndefined(e)||(e.classList.add("e-label-top"),e.classList.contains("e-label-bottom")&&e.classList.remove("e-label-bottom"))},s.prototype.resetValue=function(e){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=e,this.isProtectedOnChange=t},s.prototype.resetForm=function(){if(this.isAngular?this.resetValue(""):this.resetValue(this.initialValue),!t.isNullOrUndefined(this.textboxWrapper)){var e=this.textboxWrapper.container.querySelector(".e-float-text");t.isNullOrUndefined(e)||(t.isNullOrUndefined(this.initialValue)||""===this.initialValue?(e.classList.add("e-label-bottom"),e.classList.remove("e-label-top")):""!==this.initialValue&&(e.classList.add("e-label-top"),e.classList.remove("e-label-bottom")))}},s.prototype.focusHandler=function(e){var t={container:this.textboxWrapper.container,event:e,value:this.value};this.trigger("focus",t)},s.prototype.focusOutHandler=function(e){null===this.previousValue&&null===this.value&&""===this.respectiveElement.value||this.previousValue===this.respectiveElement.value||this.raiseChangeEvent(e,!0);var t={container:this.textboxWrapper.container,event:e,value:this.value};this.trigger("blur",t)},s.prototype.inputHandler=function(e){var t=this,i={event:e,value:this.respectiveElement.value,previousValue:this.inputPreviousValue,container:this.textboxWrapper.container};this.inputPreviousValue=this.respectiveElement.value,this.isAngular&&(t.localChange({value:this.respectiveElement.value}),this.preventChange=!0),this.isVue&&(this.preventChange=!0),this.trigger("input",i),e.stopPropagation()},s.prototype.changeHandler=function(e){this.setProperties({value:this.respectiveElement.value},!0),this.raiseChangeEvent(e,!0),e.stopPropagation()},s.prototype.raiseChangeEvent=function(e,t){var i={event:e,value:this.value,previousValue:this.previousValue,container:this.textboxWrapper.container,isInteraction:t||!1,isInteracted:t||!1};this.preventChange=!1,this.trigger("change",i),this.previousValue=this.value},s.prototype.bindClearEvent=function(){this.showClearButton&&"TEXTAREA"!==this.respectiveElement.tagName&&(this.enabled?t.EventHandler.add(this.textboxWrapper.clearButton,"mousedown touchstart",this.resetInputHandler,this):t.EventHandler.remove(this.textboxWrapper.clearButton,"mousedown touchstart",this.resetInputHandler))},s.prototype.resetInputHandler=function(t){if(t.preventDefault(),!this.textboxWrapper.clearButton.classList.contains("e-clear-icon-hide")){e.Input.setValue("",this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value),this.setProperties({value:this.respectiveElement.value},!0);var i={event:t,value:this.respectiveElement.value,previousValue:this.inputPreviousValue,container:this.textboxWrapper.container};this.trigger("input",i),this.inputPreviousValue=this.respectiveElement.value,this.raiseChangeEvent(t,!0)}},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.respectiveElement,"focus",this.focusHandler),t.EventHandler.remove(this.respectiveElement,"blur",this.focusOutHandler),t.EventHandler.remove(this.respectiveElement,"input",this.inputHandler),t.EventHandler.remove(this.respectiveElement,"change",this.changeHandler),this.isForm&&t.EventHandler.remove(this.formElement,"reset",this.resetForm),!t.isNullOrUndefined(this.textboxWrapper.container.querySelector(".e-float-text"))&&"Auto"===this.floatLabelType&&this.textboxWrapper.container.classList.contains("e-outline")&&this.textboxWrapper.container.classList.contains("e-autofill")&&t.EventHandler.remove(this.textboxWrapper.container.querySelector(".e-float-text"),"animationstart",this.animationHandler)},s.prototype.destroy=function(){this.unWireEvents(),t.isBlazor()&&this.isServerRendered?this.textboxWrapper=null:("INPUT"===this.element.tagName&&this.multiline&&(t.detach(this.textboxWrapper.container.getElementsByTagName("textarea")[0]),this.respectiveElement=this.element,this.element.removeAttribute("type")),this.respectiveElement.value=this.respectiveElement.defaultValue,this.respectiveElement.classList.remove("e-input"),this.removeAttributes(["aria-placeholder","aria-disabled","aria-readonly","aria-labelledby"]),t.isNullOrUndefined(this.textboxWrapper)||(this.textboxWrapper.container.insertAdjacentElement("afterend",this.respectiveElement),t.detach(this.textboxWrapper.container)),this.textboxWrapper=null,i.prototype.destroy.call(this))},s.prototype.addIcon=function(t,i){e.Input.addIcon(t,i,this.textboxWrapper.container,this.respectiveElement,this.createElement)},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.addAttributes=function(t){for(var i=0,s=Object.keys(t);i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!1},!0),e.Input.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===n?(this.setProperties({readonly:!0},!0),e.Input.setReadonly(this.readonly,this.respectiveElement)):"class"===n?this.respectiveElement.classList.add(t[n]):"placeholder"===n?(this.setProperties({placeholder:t[n]},!0),e.Input.setPlaceholder(this.placeholder,this.respectiveElement)):("rows"===n&&this.respectiveElement.tagName,this.respectiveElement.setAttribute(n,t[n]))}},s.prototype.removeAttributes=function(t){for(var i=0,s=t;i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!0},!0),e.Input.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===n?(this.setProperties({readonly:!1},!0),e.Input.setReadonly(this.readonly,this.respectiveElement)):"placeholder"===n?(this.setProperties({placeholder:null},!0),e.Input.setPlaceholder(this.placeholder,this.respectiveElement)):this.respectiveElement.removeAttribute(n)}},s.prototype.focusIn=function(){document.activeElement!==this.respectiveElement&&this.enabled&&(this.respectiveElement.focus(),(this.textboxWrapper.container.classList.contains("e-input-group")||this.textboxWrapper.container.classList.contains("e-outline")||this.textboxWrapper.container.classList.contains("e-filled"))&&t.addClass([this.textboxWrapper.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.respectiveElement&&this.enabled&&(this.respectiveElement.blur(),(this.textboxWrapper.container.classList.contains("e-input-group")||this.textboxWrapper.container.classList.contains("e-outline")||this.textboxWrapper.container.classList.contains("e-filled"))&&t.removeClass([this.textboxWrapper.container],["e-input-focus"]))},rt([t.Property("text")],s.prototype,"type",void 0),rt([t.Property(!1)],s.prototype,"readonly",void 0),rt([t.Property(null)],s.prototype,"value",void 0),rt([t.Property("Never")],s.prototype,"floatLabelType",void 0),rt([t.Property("")],s.prototype,"cssClass",void 0),rt([t.Property(null)],s.prototype,"placeholder",void 0),rt([t.Property("on")],s.prototype,"autocomplete",void 0),rt([t.Property({})],s.prototype,"htmlAttributes",void 0),rt([t.Property(!1)],s.prototype,"multiline",void 0),rt([t.Property(!0)],s.prototype,"enabled",void 0),rt([t.Property(!1)],s.prototype,"showClearButton",void 0),rt([t.Property(!1)],s.prototype,"enablePersistence",void 0),rt([t.Property(null)],s.prototype,"width",void 0),rt([t.Event()],s.prototype,"created",void 0),rt([t.Event()],s.prototype,"destroyed",void 0),rt([t.Event()],s.prototype,"change",void 0),rt([t.Event()],s.prototype,"blur",void 0),rt([t.Event()],s.prototype,"focus",void 0),rt([t.Event()],s.prototype,"input",void 0),s=rt([t.NotifyPropertyChanges],s)}(t.Component);return e.NumericTextBox=Q,e.regularExpressions=re,e.createMask=n,e.applyMask=a,e.wireEvents=r,e.unwireEvents=l,e.bindClearEvent=o,e.unstrippedValue=c,e.strippedValue=p,e.maskInputMouseDownHandler=v,e.maskInputMouseUpHandler=f,e.maskInputFocusHandler=g,e.triggerFocus=y,e.maskInputBlurHandler=b,e.maskInputDropHandler=S,e.mobileRemoveFunction=x,e.setMaskValue=D,e.setElementValue=I,e.maskInput=z,e.getVal=W,e.getMaskedVal=j,e.MaskUndo=le,e.MaskedTextBox=ue,e.TicksData=me,e.ColorRangeData=ve,e.LimitData=fe,e.TooltipData=ge,e.Slider=be,e.regex=Se,e.FormValidator=Te,e.FilesProp=Me,e.ButtonsProps=De,e.AsyncSettings=Ie,e.Uploader=ze,e.ColorPicker=nt,e.TextBox=ot,e}({},ej.base,ej.popups,ej.splitbuttons),this.ejs=ej;
- /*!
- * filename: ej2-lists.min.js
- * version : 19.2.44
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.lists=function(e,t,i,s){"use strict";function n(e,i){var s={};if(t.isNullOrUndefined(e)||"string"==typeof e||"number"==typeof e||!t.isNullOrUndefined(e.isHeader))return e;for(var n=0,l=Object.keys(i);n<l.length;n++){var r=i[l[n]],a=t.isNullOrUndefined(r)||"string"!=typeof r?void 0:t.getValue(r,e);t.isNullOrUndefined(a)||(s[r]=a)}return s}function l(e,i,s,n){var l=[];if(i||(i=e),s&&s.length?s.forEach(function(t){l.push(e.children[t])}):l=[].slice.call(e.children),t.isNullOrUndefined(n))l.forEach(function(e){i.appendChild(e)});else{var r=i.children[n];l.forEach(function(e){i.insertBefore(e,r)})}}e.cssClass={li:"e-list-item",ul:"e-list-parent e-ul",group:"e-list-group-item",icon:"e-list-icon",text:"e-list-text",check:"e-list-check",checked:"e-checked",selected:"e-selected",expanded:"e-expanded",textContent:"e-text-content",hasChild:"e-has-child",level:"e-level",url:"e-list-url",collapsible:"e-icon-collapsible",disabled:"e-disabled",image:"e-list-img",iconWrapper:"e-icon-wrapper",anchorWrap:"e-anchor-wrap",navigable:"e-navigable"},function(s){function l(e,i,s,n,l){var a=t.extend({},D,s),o=t.extend({},k,a.ariaAttributes),h=v(i).typeof;return"string"===h||"number"===h?r(e,i,n,s,l):c(e,i,s,o.level,n,l)}function r(e,t,i,s,n){return E(e,a(e,t,i,s,n),null,s)}function a(i,s,n,l,r){var a=[],o=t.extend({},D,l);e.cssClass=L(o.moduleName);for(var c=w(),h=0;h<s.length;h++)if(!t.isNullOrUndefined(s[h])){var d=void 0;if(o.itemCreating&&"function"==typeof o.itemCreating){u={dataSource:s,curData:s[h],text:s[h],options:o};o.itemCreating(u)}if(d=n?x(i,s[h],void 0,null,null,[],null,c,h,l):V(i,s[h],void 0,null,null,l,r),o.itemCreated&&"function"==typeof o.itemCreated){var u={dataSource:s,curData:s[h],text:s[h],item:d,options:o};o.itemCreated(u)}a.push(d)}return a}function o(i,l,r,a,o,c){var h=t.extend({},D,r);e.cssClass=L(h.moduleName);var d,u=t.extend({},s.defaultMappedFields,h.fields),p=t.extend({},k,h.ariaAttributes),m=[];a&&(p.level=a);var f,g,y=[];l&&l.length&&!t.isNullOrUndefined(v(l).item)&&!v(l).item.hasOwnProperty(u.id)&&(d=w());for(var b=0;b<l.length;b++){var C=n(l[b],u);if(!t.isNullOrUndefined(l[b])){if(h.itemCreating&&"function"==typeof h.itemCreating){A={dataSource:l,curData:l[b],text:C[u.text],options:h,fields:u};h.itemCreating(A)}var E=l[b];h.itemCreating&&"function"==typeof h.itemCreating&&(C=n(l[b],u)),C.hasOwnProperty(u.id)&&!t.isNullOrUndefined(C[u.id])&&(d=C[u.id]);var O=[];if(h.showCheckBox&&(h.itemNavigable&&(C[u.url]||C[u.urlAttributes])?m.push(i("input",{className:e.cssClass.check,attrs:{type:"checkbox"}})):O.push(i("input",{className:e.cssClass.check,attrs:{type:"checkbox"}}))),!0===o)h.showIcon&&C.hasOwnProperty(u.iconCss)&&!t.isNullOrUndefined(C[u.iconCss])&&O.push(i("span",{className:e.cssClass.icon+" "+C[u.iconCss]})),g=(f=x(i,E,C,u,h.itemClass,O,!(!E.hasOwnProperty("isHeader")||!E.isHeader),d,b,r)).querySelector("."+e.cssClass.anchorWrap),h.itemNavigable&&m.length&&t.prepend(m,f.firstElementChild);else{if((f=V(i,E,C,u,h.itemClass,r,c)).classList.add(e.cssClass.level+"-"+p.level),f.setAttribute("aria-level",p.level.toString()),g=f.querySelector("."+e.cssClass.anchorWrap),C.hasOwnProperty(u.tooltip)&&f.setAttribute("title",C[u.tooltip]),C.hasOwnProperty(u.htmlAttributes)&&C[u.htmlAttributes]&&I(f,C[u.htmlAttributes]),C.hasOwnProperty(u.enabled)&&!1===C[u.enabled]&&f.classList.add(e.cssClass.disabled),C.hasOwnProperty(u.isVisible)&&!1===C[u.isVisible]&&(f.style.display="none"),C.hasOwnProperty(u.imageUrl)&&!t.isNullOrUndefined(C[u.imageUrl])&&!h.template){var B={src:C[u.imageUrl]};t.merge(B,C[u.imageAttributes]);var T=i("img",{className:e.cssClass.image,attrs:B});g?g.insertAdjacentElement("afterbegin",T):t.prepend([T],f.firstElementChild)}if(h.showIcon&&C.hasOwnProperty(u.iconCss)&&!t.isNullOrUndefined(C[u.iconCss])&&!h.template){var H=i("div",{className:e.cssClass.icon+" "+C[u.iconCss]});g?g.insertAdjacentElement("afterbegin",H):t.prepend([H],f.firstElementChild)}O.length&&t.prepend(O,f.firstElementChild),h.itemNavigable&&m.length&&t.prepend(m,f.firstElementChild),S(i,C,u,l,h,f,p.level)}if(g&&t.addClass([f],[e.cssClass.navigable]),h.itemCreated&&"function"==typeof h.itemCreated){var A={dataSource:l,curData:l[b],text:C[u.text],item:f,options:h,fields:u};h.itemCreated(A)}m=[],y.push(f)}}return y}function c(e,i,s,n,l,r){var a=t.extend({},D,s);return E(e,o(e,i,s,n,l,r),a.listClass,s)}function h(i,s,n){if(e.cssClass=L(D.moduleName),i&&i.length){var l,r,a=Array.prototype.slice.call(i);for(l=a[(r=s?d(s,a):!0===n?a.length:-1)+(!0===n?-1:1)];l&&(!t.isVisible(l)||l.classList.contains(e.cssClass.disabled));)l=a[r+=!0===n?-1:1];return l}}function d(e,t){if(t&&e){return Array.prototype.slice.call(t).indexOf(e)}}function u(e,n,l){void 0===l&&(l="None");var r=t.extend({},s.defaultMappedFields,n),a=(new i.Query).group(r.groupBy),o=m(e,a=p(l,"key",a));e=[];for(var c=0;c<o.length;c++){var h=o[c].items,d={};d[r.text]=o[c].key,d.isHeader=!0;var u=r.text;"id"===u&&(d[u="text"]=o[c].key),d._id="group-list-item-"+(o[c].key?o[c].key.toString().trim():"undefined"),d.items=h,e.push(d);for(var f=0;f<h.length;f++)e.push(h[f])}return e}function p(e,t,s){if(void 0===s&&(s=new i.Query),"Ascending"===e)s.sortBy(t,"ascending",!0);else if("Descending"===e)s.sortBy(t,"descending",!0);else for(var n=0;n<s.queries.length;n++)"onSortBy"===s.queries[n].fn&&s.queries.splice(n,1);return s}function m(e,t){return new i.DataManager(e).executeLocal(t)}function f(e,i){var n=t.extend({},D,i),l=t.extend({},s.defaultMappedFields,n.fields),r=e.cloneNode(!0),a=[];r.classList.add("json-parent");var o=r.querySelectorAll(".json-parent>li");r.classList.remove("json-parent");for(var c=0;c<o.length;c++){for(var h=o[c],d=h.querySelector("a"),u=h.querySelector("ul"),p={},m=d?d.childNodes:h.childNodes,v=Object.keys(m),I=0;I<m.length;I++)m[Number(v[I])].hasChildNodes()||(p[l.text]=m[Number(v[I])].textContent);var y=g(h);y.id?(p[l.id]=y.id,delete y.id):p[l.id]=w(),Object.keys(y).length&&(p[l.htmlAttributes]=y),d&&(y=g(d),Object.keys(y).length&&(p[l.urlAttributes]=y)),u&&(p[l.child]=f(u,i)),a.push(p)}return a}function v(e){for(var i={typeof:null,item:null},s=0;s<e.length;s++)if(!t.isNullOrUndefined(e[s]))return i={typeof:typeof e[s],item:e[s]};return i}function I(e,i){var s={};t.merge(s,i),s.class&&(t.addClass([e],s.class.split(" ")),delete s.class),t.attributes(e,s)}function g(e){for(var t={},i=e.attributes,s=0;s<i.length;s++)t[i[s].nodeName]=i[s].nodeValue;return t}function y(i,l,r,a,o,c){e.cssClass=L(D.moduleName);for(var h,d=i("ul",{className:e.cssClass.ul,attrs:{role:"presentation"}}),u=t.extend({},D,o),p=t.extend({},s.defaultMappedFields,a),m=t.compile(l),f=[],v=w(),I=0;I<r.length;I++){var g=n(r[I],p),y=r[I],b=y.isHeader;if(h="string"==typeof r[I]||"number"==typeof r[I]?y:g[p.value],u.itemCreating&&"function"==typeof u.itemCreating){C={dataSource:r,curData:y,text:h,options:u,fields:p};u.itemCreating(C)}u.itemCreating&&"function"==typeof u.itemCreating&&(g=n(r[I],p),h="string"==typeof r[I]||"number"==typeof r[I]?y:g[p.value]);var S=i("li",{id:v+"-"+I,className:b?e.cssClass.group:e.cssClass.li,attrs:{role:"presentation"}});if(b)"string"==typeof r[I]||"number"==typeof r[I]?S.innerText=y:S.innerText=g[p.text];else{var x=b?u.groupTemplateID:u.templateID;b?t.append(m(y,c,"headerTemplate",x,!!u.isStringTemplate),S):t.append(m(y,c,"template",x,!!u.isStringTemplate),S),S.setAttribute("data-value",t.isNullOrUndefined(h)?"null":h),S.setAttribute("role","option")}if(u.itemCreated&&"function"==typeof u.itemCreated){var C={dataSource:r,curData:y,text:h,item:S,options:u,fields:p};u.itemCreated(C)}f.push(S)}return t.append(f,d),d}function b(e,i,n,l,r,a){for(var o=t.compile(e),c=t.extend({},s.defaultMappedFields,n),h=t.extend({},D,r),d=c.groupBy,u=0,p=l;u<p.length;u++){var m=p[u],f={};f[d]=m.textContent,m.innerHTML="",t.append(o(f,a,"groupTemplate",h.groupTemplateID,!!h.isStringTemplate),m)}return l}function w(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function S(i,s,n,l,r,a,o){var h=s[n.child]||[],d=s[n.hasChildren];if(h.length&&(d=!0,a.classList.add(e.cssClass.hasChild),r.processSubChild)){var u=c(i,h,r,++o);a.appendChild(u)}r.expandCollapse&&d&&!r.template&&(a.firstElementChild.classList.add(e.cssClass.iconWrapper),("Left"===r.expandIconPosition?t.prepend:t.append)([i("div",{className:"e-icons "+r.expandIconClass})],a.querySelector("."+e.cssClass.textContent)))}function x(i,s,n,l,r,a,o,c,h,d){var u,p=t.extend({},D,d),m=t.extend({},k,p.ariaAttributes),f=s,v=s;"string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s&&(u=s,f="boolean"==typeof n[l.text]||"number"==typeof n[l.text]?n[l.text]:n[l.text]||"",v=n[l.value]);var g;g=t.isNullOrUndefined(u)||t.isNullOrUndefined(n[l.id])||""===n[l.id]?c+"-"+h:c;var y=i("li",{className:(!0===o?e.cssClass.group:e.cssClass.li)+" "+(t.isNullOrUndefined(r)?"":r),id:g,attrs:""!==m.groupItemRole&&""!==m.itemRole?{role:!0===o?m.groupItemRole:m.itemRole}:{}});return u&&n.hasOwnProperty(l.enabled)&&"false"===n[l.enabled].toString()&&y.classList.add(e.cssClass.disabled),o?y.innerText=f:(y.setAttribute("data-value",t.isNullOrUndefined(v)?"null":v),y.setAttribute("role","option"),u&&n.hasOwnProperty(l.htmlAttributes)&&n[l.htmlAttributes]&&I(y,n[l.htmlAttributes]),a.length&&!p.itemNavigable&&t.append(a,y),u&&(n[l.url]||n[l.urlAttributes]&&n[l.urlAttributes].href)?y.appendChild(C(i,u,l,f,a,p.itemNavigable)):(a.length&&p.itemNavigable&&t.append(a,y),y.appendChild(document.createTextNode(f)))),y}function L(e){return{li:"e-"+e+"-item",ul:"e-"+e+"-parent e-ul",group:"e-"+e+"-group-item",icon:"e-"+e+"-icon",text:"e-"+e+"-text",check:"e-"+e+"-check",checked:"e-checked",selected:"e-selected",expanded:"e-expanded",textContent:"e-text-content",hasChild:"e-has-child",level:"e-level",url:"e-"+e+"-url",collapsible:"e-icon-collapsible",disabled:"e-disabled",image:"e-"+e+"-img",iconWrapper:"e-icon-wrapper",anchorWrap:"e-anchor-wrap",navigable:"e-navigable"}}function C(i,s,l,r,a,o){var c=n(s,l),h={href:c[l.url]};c.hasOwnProperty(l.urlAttributes)&&c[l.urlAttributes]&&(t.merge(h,c[l.urlAttributes]),h.href=c[l.url]?c[l.url]:c[l.urlAttributes].href);var d;if(o){d=i("a",{className:e.cssClass.text+" "+e.cssClass.url});var u=i("div",{className:e.cssClass.anchorWrap});a&&a.length&&t.append(a,u),u.appendChild(document.createTextNode(r)),t.append([u],d)}else d=i("a",{className:e.cssClass.text+" "+e.cssClass.url,innerHTML:r});return I(d,h),d}function V(i,s,n,l,r,a,o){var c,h,d,u=t.extend({},D,a),p=t.extend({},k,u.ariaAttributes),m=s;"string"!=typeof s&&"number"!=typeof s&&(d=s,m=n[l.text]||"",c=t.isNullOrUndefined(n._id)?n[l.id]:n._id,h=!(!s.hasOwnProperty("isHeader")||!s.isHeader)),a&&a.enableHtmlSanitizer&&(m=m);var f=i("li",{className:(!0===h?e.cssClass.group:e.cssClass.li)+" "+(t.isNullOrUndefined(r)?"":r),attrs:""!==p.groupItemRole&&""!==p.itemRole?{role:!0===h?p.groupItemRole:p.itemRole}:{}});!0==!t.isNullOrUndefined(c)?f.setAttribute("data-uid",c):f.setAttribute("data-uid",w());if(a&&a.removeBlazorID&&"object"==typeof s&&s.hasOwnProperty("BlazId")&&delete s.BlazId,h&&a&&a.groupTemplate){v=t.compile(a.groupTemplate);t.append(v(s,o,"groupTemplate",u.groupTemplateID,!!u.isStringTemplate),f)}else if(!h&&a&&a.template){var v=t.compile(a.template);t.append(v(s,o,"template",u.templateID,!!u.isStringTemplate),f)}else{var I=i("div",{className:e.cssClass.textContent,attrs:""!==p.wrapperRole?{role:p.wrapperRole}:{}});if(d&&(n[l.url]||n[l.urlAttributes]&&n[l.urlAttributes].href))I.appendChild(C(i,d,l,m,null,u.itemNavigable));else{var g=i("span",{className:e.cssClass.text,attrs:""!==p.itemText?{role:p.itemText}:{}});a&&a.enableHtmlSanitizer?g.innerText=m:g.innerHTML=m,I.appendChild(g)}f.appendChild(I)}return f}function E(i,s,n,l){var r=t.extend({},D,l),a=t.extend({},k,r.ariaAttributes);e.cssClass=L(r.moduleName);var o=i("ul",{className:e.cssClass.ul+" "+(t.isNullOrUndefined(n)?"":n),attrs:""!==a.listRole?{role:a.listRole}:{}});return t.append(s,o),o}function O(i,s,n,l){var r=t.extend({},D,l);return e.cssClass=L(r.moduleName),("Left"===r.expandIconPosition?t.prepend:t.append)([i("div",{className:"e-icons "+r.expandIconClass+" "+(t.isNullOrUndefined(n)?"":n)})],s.querySelector("."+e.cssClass.textContent)),s}s.defaultMappedFields={id:"id",text:"text",url:"url",value:"value",isChecked:"isChecked",enabled:"enabled",expanded:"expanded",selected:"selected",iconCss:"iconCss",child:"child",isVisible:"isVisible",hasChildren:"hasChildren",tooltip:"tooltip",htmlAttributes:"htmlAttributes",urlAttributes:"urlAttributes",imageAttributes:"imageAttributes",imageUrl:"imageUrl",groupBy:null};var k={level:1,listRole:"presentation",itemRole:"presentation",groupItemRole:"group",itemText:"list-item",wrapperRole:"presentation"},D={showCheckBox:!1,showIcon:!1,enableHtmlSanitizer:!1,expandCollapse:!1,fields:s.defaultMappedFields,ariaAttributes:k,listClass:"",itemClass:"",processSubChild:!1,sortOrder:"None",template:null,groupTemplate:null,headerTemplate:null,expandIconClass:"e-icon-collapsible",moduleName:"list",expandIconPosition:"Right",itemNavigable:!1};s.createList=l,s.createListFromArray=r,s.createListItemFromArray=a,s.createListItemFromJson=o,s.createListFromJson=c,s.getSiblingLI=h,s.indexOf=d,s.groupDataSource=u,s.addSorting=p,s.getDataSource=m,s.createJsonFromElement=f,s.renderContentTemplate=y,s.renderGroupTemplate=b,s.generateId=w,s.generateUL=E,s.generateIcon=O}(e.ListBase||(e.ListBase={}));var r=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),a=function(e,t,i,s){var n,l=arguments.length,r=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(l<3?n(r):l>3?n(t,i,r):n(t,i))||r);return l>3&&r&&Object.defineProperty(t,i,r),r},o={None:[],SlideLeft:["SlideRightOut","SlideLeftOut","SlideLeftIn","SlideRightIn"],SlideDown:["SlideTopOut","SlideBottomOut","SlideBottomIn","SlideTopIn"],Zoom:["FadeOut","FadeZoomOut","FadeZoomIn","FadeIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},c={None:[],SlideLeft:["SlideLeftOut","SlideRightOut","SlideRightIn","SlideLeftIn"],SlideDown:["SlideBottomOut","SlideTopOut","SlideTopIn","SlideBottomIn"],Zoom:["FadeZoomOut","FadeOut","FadeIn","FadeZoomIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},h={root:"e-listview",hover:"e-hover",selected:"e-active",focused:"e-focused",parentItem:"e-list-parent",listItem:"e-list-item",listIcon:"e-list-icon",textContent:"e-text-content",listItemText:"e-list-text",groupListItem:"e-list-group-item",hasChild:"e-has-child",view:"e-view",header:"e-list-header",headerText:"e-headertext",headerTemplateText:"e-headertemplate-text",text:"e-text",disable:"e-disabled",content:"e-content",icon:"e-icons",backIcon:"e-icon-back",checkboxWrapper:"e-checkbox-wrapper",checkbox:"e-checkbox",checked:"e-check",checklist:"e-checklist",checkboxIcon:"e-frame",checkboxRight:"e-checkbox-right",checkboxLeft:"e-checkbox-left",listviewCheckbox:"e-listview-checkbox",itemCheckList:"e-checklist",virtualElementContainer:"e-list-virtualcontainer"},d=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r(i,e),a([t.Property("id")],i.prototype,"id",void 0),a([t.Property("text")],i.prototype,"text",void 0),a([t.Property("isChecked")],i.prototype,"isChecked",void 0),a([t.Property("isVisible")],i.prototype,"isVisible",void 0),a([t.Property("enabled")],i.prototype,"enabled",void 0),a([t.Property("iconCss")],i.prototype,"iconCss",void 0),a([t.Property("child")],i.prototype,"child",void 0),a([t.Property("tooltip")],i.prototype,"tooltip",void 0),a([t.Property("groupBy")],i.prototype,"groupBy",void 0),a([t.Property("text")],i.prototype,"sortBy",void 0),a([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),a([t.Property("tableName")],i.prototype,"tableName",void 0),i}(t.ChildProperty),u=function(l){function u(e,t){var i=l.call(this,e,t)||this;return i.itemReRender=!1,i.previousSelectedItems=[],i.hiddenItems=[],i.enabledItems=[],i.disabledItems=[],i}return r(u,l),u.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"htmlAttributes":this.setHTMLAttribute();break;case"cssClass":this.setCSSClass(i.cssClass);break;case"enable":this.setEnable();break;case"width":case"height":this.setSize();break;case"enableRtl":this.setEnableRTL();break;case"fields":this.listBaseOption.fields=this.fields.properties,this.enableVirtualization?this.isServerRendered&&t.isBlazor()||this.virtualizationModule.reRenderUiVirtualization():(t.isBlazor()&&this.isServerRendered&&!this.enableVirtualization&&(this.itemReRender=!0),this.reRender());break;case"headerTitle":this.curDSLevel.length||this.header(this.headerTitle,!1,"header");break;case"query":this.enableVirtualization?t.isBlazor()&&this.isServerRendered||this.virtualizationModule.reRenderUiVirtualization():(t.isBlazor()&&this.isServerRendered&&!this.enableVirtualization&&(this.itemReRender=!0),this.reRender());break;case"showHeader":this.header(this.headerTitle,!1,"header");break;case"enableVirtualization":t.isNullOrUndefined(this.contentContainer)||t.detach(this.contentContainer),this.refresh();break;case"showCheckBox":case"checkBoxPosition":t.isBlazor()&&this.isServerRendered||(this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():this.setCheckbox());break;case"dataSource":this.enableVirtualization?this.isServerRendered&&t.isBlazor()||this.virtualizationModule.reRenderUiVirtualization():(t.isBlazor()&&this.isServerRendered&&!this.enableVirtualization&&(this.itemReRender=!0),this.reRender());break;case"sortOrder":case"template":this.enableVirtualization||this.isServerRendered&&t.isBlazor()||this.refresh();break;case"showIcon":t.isBlazor()&&this.isServerRendered?this.interopAdaptor.invokeMethodAsync("ItemSorting"):this.enableVirtualization?this.virtualizationModule.reRenderUiVirtualization():(this.listBaseOption.showIcon=this.showIcon,this.curViewDS=this.getSubDS(),this.resetCurrentList())}},u.prototype.setHTMLAttribute=function(){Object.keys(this.htmlAttributes).length&&t.attributes(this.element,this.htmlAttributes)},u.prototype.setCSSClass=function(e){this.cssClass&&t.addClass([this.element],this.cssClass.split(" ").filter(function(e){return e})),e&&t.removeClass([this.element],e.split(" ").filter(function(e){return e}))},u.prototype.setSize=function(){this.element.style.height=t.formatUnit(this.height),this.element.style.width=t.formatUnit(this.width),this.isWindow=!this.element.clientHeight},u.prototype.setEnable=function(){this.enableElement(this.element,this.enable)},u.prototype.setEnableRTL=function(){this.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")},u.prototype.enableElement=function(e,t){t?e.classList.remove(h.disable):e.classList.add(h.disable)},u.prototype.header=function(e,i,s){if(t.isBlazor()&&this.isServerRendered){var n={HeaderText:e,BackButton:i};this.interopAdaptor.invokeMethodAsync("HeaderTitle",n)}else if(void 0===this.headerEle&&this.showHeader){this.enableHtmlSanitizer&&this.setProperties({headerTitle:t.SanitizeHtmlHelper.sanitize(this.headerTitle)},!0),this.headerEle=this.createElement("div",{className:h.header});var l=this.createElement("span",{className:h.headerText,innerHTML:this.headerTitle}),r=this.createElement("div",{className:h.text,innerHTML:l.outerHTML}),a=this.createElement("div",{className:h.icon+" "+h.backIcon+" e-but-back",attrs:{style:"display:none;"}});if(this.headerEle.appendChild(a),this.headerEle.appendChild(r),this.headerTemplate){var o=t.compile(this.headerTemplate),c=this.createElement("div",{className:h.headerTemplateText}),d=o({},this,s,this.LISTVIEW_HEADERTEMPLATE_ID,null,null,this.headerEle);d&&t.append(d,c),t.append([c],this.headerEle),this.updateBlazorTemplates(!1,!0,!0),this.isReact&&this.renderReactTemplates()}this.headerTemplate&&this.headerTitle&&r.classList.add("header"),this.element.classList.add("e-has-header"),t.prepend([this.headerEle],this.element)}else if(this.headerEle)if(this.showHeader){this.headerEle.style.display="";var r=this.headerEle.querySelector("."+h.headerText),a=this.headerEle.querySelector("."+h.backIcon);this.enableHtmlSanitizer&&(e=t.SanitizeHtmlHelper.sanitize(e)),r.innerHTML=e,this.headerTemplate&&i&&(r.parentElement.classList.remove("header"),this.headerEle.querySelector("."+h.headerTemplateText).classList.add("nested-header")),this.headerTemplate&&!i&&(r.parentElement.classList.add("header"),this.headerEle.querySelector("."+h.headerTemplateText).classList.remove("nested-header"),this.headerEle.querySelector("."+h.headerTemplateText).classList.add("header")),a.style.display=!0===i?"":"none"}else this.headerEle.style.display="none"},u.prototype.switchView=function(e,t,i){var s=this;if(e&&t){var n=e.style.position,l="hidden"!==this.element.style.overflow?this.element.style.overflow:"";e.style.position="absolute",e.classList.add("e-view");var r=void 0,a=this.animation.duration;if(this.animation.effect)r=this.enableRtl?c[this.animation.effect]:o[this.animation.effect];else{r=o.SlideLeft,i=this.enableRtl,a=0}this.element.style.overflow="hidden",this.aniObj.animate(e,{name:!0===i?r[0]:r[1],duration:a,timingFunction:this.animation.easing,end:function(t){e.style.display="none",s.element.style.overflow=l,e.style.position=n,e.classList.remove("e-view")}}),t.style.display="",this.aniObj.animate(t,{name:!0===i?r[2]:r[3],duration:a,timingFunction:this.animation.easing,end:function(){s.trigger("actionComplete")}}),this.curUL=t}},u.prototype.preRender=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.template=document.querySelector(this.template).innerHTML.trim())}catch(e){t.compile(this.template),this.isReact&&this.renderReactTemplates()}this.listBaseOption={template:this.template,headerTemplate:this.headerTemplate,groupTemplate:this.groupTemplate,expandCollapse:!0,listClass:"",ariaAttributes:{itemRole:"option",listRole:"presentation",itemText:"",groupItemRole:"group",wrapperRole:"presentation"},fields:this.fields.properties,sortOrder:this.sortOrder,showIcon:this.showIcon,itemCreated:this.renderCheckbox.bind(this),templateID:this.element.id+"Template",groupTemplateID:this.element.id+"GroupTemplate",enableHtmlSanitizer:this.enableHtmlSanitizer,removeBlazorID:!0},this.initialization()},u.prototype.updateLiElementHeight=function(){var e=this.element.querySelector("."+h.virtualElementContainer);e.children[0]&&(this.liElementHeight=e.children[0].getBoundingClientRect().height,this.interopAdaptor.invokeMethodAsync("LiElementHeight",this.liElementHeight))},u.prototype.initialization=function(){if(t.isBlazor()&&this.isServerRendered&&this.enableVirtualization){var e=this.element.querySelector("."+h.virtualElementContainer);null!==e&&(""===this.height&&(this.interopAdaptor.invokeMethodAsync("SetComponentHeight",window.innerHeight),this.isWindow=!0,e.scrollIntoView()),-1!==this.height.toString().indexOf("%")&&this.interopAdaptor.invokeMethodAsync("SetContainerHeight",this.element.getBoundingClientRect().height.toString()),e.children[0]&&(this.liElementHeight=e.children[0].getBoundingClientRect().height,this.interopAdaptor.invokeMethodAsync("LiElementHeight",this.liElementHeight)))}this.curDSLevel=[],this.animateOptions={},this.curViewDS=[],this.currentLiElements=[],this.isNestedList=!1,this.selectedData=[],this.selectedId=[],this.LISTVIEW_TEMPLATE_ID=this.element.id+"Template",this.LISTVIEW_GROUPTEMPLATE_ID=this.element.id+"GroupTemplate",this.LISTVIEW_HEADERTEMPLATE_ID=this.element.id+"HeaderTemplate",this.aniObj=new t.Animation(this.animateOptions),this.removeElement(this.curUL),this.removeElement(this.ulElement),this.removeElement(this.headerEle),this.removeElement(this.contentContainer),this.isReact&&this.clearTemplate(),this.curUL=this.ulElement=this.liCollection=this.headerEle=this.contentContainer=void 0},u.prototype.renderCheckbox=function(e){if(e.item.classList.contains(h.hasChild)&&(this.isNestedList=!0),this.showCheckBox&&this.isValidLI(e.item)){var t=void 0;(t=s.createCheckBox(this.createElement,!1,{checked:!1,enableRtl:this.enableRtl,cssClass:h.listviewCheckbox})).setAttribute("role","checkbox");var i=t.querySelector("."+h.checkboxIcon);e.item.classList.add(h.itemCheckList),e.item.firstElementChild.classList.add(h.checkbox),"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]?n(e.curData,this.listBaseOption.fields)[this.listBaseOption.fields.isChecked]&&this.checkInternally(e,t):"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]||-1===this.selectedData.indexOf(e.text)||this.checkInternally(e,t),t.setAttribute("aria-checked",i.classList.contains(h.checked)?"true":"false"),"Left"===this.checkBoxPosition?(t.classList.add(h.checkboxLeft),e.item.firstElementChild.classList.add(h.checkboxLeft),e.item.firstElementChild.insertBefore(t,e.item.firstElementChild.childNodes[0])):(t.classList.add(h.checkboxRight),e.item.firstElementChild.classList.add(h.checkboxRight),e.item.firstElementChild.appendChild(t)),this.currentLiElements.push(e.item),"Left"===this.checkBoxPosition?this.virtualCheckBox=e.item.firstElementChild.children[0]:this.virtualCheckBox=e.item.firstElementChild.lastElementChild}},u.prototype.checkInternally=function(e,t){e.item.classList.add(h.selected),e.item.setAttribute("aria-selected","true"),t.querySelector("."+h.checkboxIcon).classList.add(h.checked),t.setAttribute("aria-checked","true")},u.prototype.checkItem=function(e){this.toggleCheckBase(e,!0)},u.prototype.toggleCheckBase=function(e,i){if(this.showCheckBox){var s=e;if(e instanceof Object&&e.constructor!==HTMLLIElement&&(s=this.getLiFromObjOrElement(e)),!t.isNullOrUndefined(s)){var n=s.querySelector("."+h.checkboxIcon);!0===i?s.classList.add(h.selected):s.classList.remove(h.selected),s.setAttribute("aria-selected",i?"true":"false"),!0===i?n.classList.add(h.checked):n.classList.remove(h.checked),n.parentElement.setAttribute("aria-checked",i?"true":"false")}this.setSelectedItemData(s)}},u.prototype.uncheckItem=function(e){this.toggleCheckBase(e,!1)},u.prototype.checkAllItems=function(){this.toggleAllCheckBase(!0)},u.prototype.uncheckAllItems=function(){this.toggleAllCheckBase(!1)},u.prototype.toggleAllCheckBase=function(e){if(this.showCheckBox){for(var t=0;t<this.liCollection.length;t++){var i=this.liCollection[t].querySelector("."+h.checkboxIcon);i&&(e?i.classList.contains(h.checked)||this.checkItem(this.liCollection[t]):i.classList.contains(h.checked)&&this.uncheckItem(this.liCollection[t]))}this.enableVirtualization&&this.virtualizationModule.checkedItem(e)}},u.prototype.setCheckbox=function(){if(this.showCheckBox)for(var e=Array.prototype.slice.call(this.element.querySelectorAll("."+h.listItem)),t={item:void 0,curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:""},i=0;i<e.length;i++){var s=e[i];t.item=s,t.curData=this.getItemData(s),s.querySelector("."+h.checkboxWrapper)&&this.removeElement(s.querySelector("."+h.checkboxWrapper)),this.renderCheckbox(t),t.item.classList.contains(h.selected)&&this.checkInternally(t,t.item.querySelector("."+h.checkboxWrapper))}else{for(var e=Array.prototype.slice.call(this.element.querySelectorAll("."+h.itemCheckList)),i=0;i<e.length;i++)(s=e[i]).classList.remove(h.selected),s.firstElementChild.classList.remove(h.checkbox),this.removeElement(s.querySelector("."+h.checkboxWrapper));this.selectedItems&&this.selectedItems.item.classList.add(h.selected)}},u.prototype.refreshItemHeight=function(){this.virtualizationModule&&this.virtualizationModule.refreshItemHeight()},u.prototype.clickHandler=function(e){var i,s=e.target,n=s.classList;if(n.contains(h.backIcon)||n.contains(h.headerText))this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back();else{var l=t.closest(s.parentNode,"."+h.listItem);if(null===l&&(l=s),this.removeFocus(),this.enable&&this.showCheckBox&&this.isValidLI(l))if(e.target.classList.contains(h.checkboxIcon)){if(l.classList.add(h.focused),t.isNullOrUndefined(l.querySelector("."+h.checked))){var r={curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:void 0,item:l};this.checkInternally(r,r.item.querySelector("."+h.checkboxWrapper))}else this.uncheckItem(l),l.classList.add(h.focused);if(this.enableVirtualization&&this.virtualizationModule.setCheckboxLI(l,e),e){var a=this.selectEventData(l,e),o=l.querySelector("."+h.checkboxIcon);t.merge(a,{isChecked:o.classList.contains(h.checked)}),this.trigger("select",a)}}else l.classList.contains(h.hasChild)?(this.removeHover(),this.removeSelect(),this.removeSelect(l),this.setSelectLI(l,e),l.classList.remove(h.selected)):this.setCheckboxLI(l,e);else this.setSelectLI(l,e);i=t.closest(e.target,"li"),t.isNullOrUndefined(i)||i.classList.contains("e-has-child")&&!e.target.parentElement.classList.contains("e-listview-checkbox")&&i.classList.add(h.disable)}if(t.isBlazor()&&this.isServerRendered&&this.enableVirtualization){var c=this.element.querySelector("."+h.virtualElementContainer);if(c.querySelector(".e-active")){var d=c.querySelectorAll(".e-active");if(this.showCheckBox)for(var u=0;u<d.length;u++)this.previousSelectedItems.includes(d[u].getAttribute("data-uid"))||this.previousSelectedItems.push(d[u].getAttribute("data-uid"));else this.previousSelectedItems[0]=c.querySelector(".e-active").getAttribute("data-uid")}if(c.querySelector(".e-focused")){var p=c.querySelector(".e-focused");if(!p.classList.contains("e-active")){var m=p.getAttribute("data-uid");if(this.previousSelectedItems.includes(m)){var f=this.previousSelectedItems.slice(0,this.previousSelectedItems.indexOf(m)),v=this.previousSelectedItems.slice(this.previousSelectedItems.indexOf(m)+1,this.previousSelectedItems.length);this.previousSelectedItems=f.concat(v)}}}}},u.prototype.removeElement=function(e){return e&&e.parentNode&&e.parentNode.removeChild(e)},u.prototype.hoverHandler=function(e){var i=t.closest(e.target.parentNode,"."+h.listItem);this.setHoverLI(i)},u.prototype.leaveHandler=function(e){this.removeHover()},u.prototype.homeKeyHandler=function(e,t){if(Object.keys(this.dataSource).length&&this.curUL){this.selectedItems&&this.selectedItems.item.setAttribute("aria-selected","false");var i=this.curUL.querySelectorAll("."+h.listItem),s=this.curUL.querySelector("."+h.focused)||this.curUL.querySelector("."+h.selected);s&&(s.classList.remove(h.focused),this.showCheckBox||s.classList.remove(h.selected));var n=t?i.length-1:0;i[n].classList.contains(h.hasChild)||this.showCheckBox?i[n].classList.add(h.focused):this.setSelectLI(i[n],e),i[n]?this.element.setAttribute("aria-activedescendant",i[n].id.toString()):this.element.removeAttribute("aria-activedescendant")}},u.prototype.onArrowKeyDown=function(i,s){var n,l;return!t.isNullOrUndefined(this.curUL.querySelector("."+h.hasChild))||this.showCheckBox?(l=this.curUL.querySelector("."+h.focused)||this.curUL.querySelector("."+h.selected),n=e.ListBase.getSiblingLI(this.curUL.querySelectorAll("."+h.listItem),l,s),t.isNullOrUndefined(n)||(l&&(l.classList.remove(h.focused),this.showCheckBox||l.classList.remove(h.selected)),n.classList.contains(h.hasChild)||this.showCheckBox?n.classList.add(h.focused):this.setSelectLI(n,i))):(l=this.curUL.querySelector("."+h.selected),n=e.ListBase.getSiblingLI(this.curUL.querySelectorAll("."+h.listItem),l,s),this.setSelectLI(n,i)),n?this.element.setAttribute("aria-activedescendant",n.id.toString()):this.element.removeAttribute("aria-activedescendant"),n},u.prototype.arrowKeyHandler=function(e,t){var i=this;if(e.preventDefault(),Object.keys(this.dataSource).length&&this.curUL){var s=this.onArrowKeyDown(e,t),n=this.element.getBoundingClientRect().top,l=this.element.getBoundingClientRect().height,r=this.curUL.querySelector("."+h.listItem).getBoundingClientRect(),a=void 0,o=void 0;if(this.fields.groupBy&&(o=this.curUL.querySelector("."+h.groupListItem).getBoundingClientRect()),s){var c=s.getBoundingClientRect().top,d=s.getBoundingClientRect().height;if(t)(a=this.isWindow?c:c-n)<0&&(!0===this.isWindow?window.scroll(0,pageYOffset+a):this.element.scrollTop=this.element.scrollTop+a);else{var u=this.isWindow?window.innerHeight:l;(a=this.isWindow?c+d:c-n+d)>u&&(!0===this.isWindow?window.scroll(0,pageYOffset+(a-u)):this.element.scrollTop=this.element.scrollTop+(a-u))}}else if(this.enableVirtualization&&t&&this.virtualizationModule.uiFirstIndex)this.onUIScrolled=function(){i.onArrowKeyDown(e,t),i.onUIScrolled=void 0},a=this.virtualizationModule.listItemHeight,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=this.element.scrollTop-a;else if(t)if(this.showHeader&&this.headerEle){var p=o?o.top:r.top,m=this.headerEle.getBoundingClientRect();a=m.top<0?m.height-p:0,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=0}else this.fields.groupBy&&(a=this.isWindow?o.top<0?o.top:0:n-r.top+o.height,!0===this.isWindow?window.scroll(0,pageYOffset+a):this.element.scrollTop=this.element.scrollTop-a)}},u.prototype.enterKeyHandler=function(e){if(Object.keys(this.dataSource).length&&this.curUL){var i=!t.isNullOrUndefined(this.curUL.querySelector("."+h.hasChild)),s=this.curUL.querySelector("."+h.focused);i&&s&&(s.classList.remove(h.focused),this.showCheckBox&&(this.removeSelect(),this.removeSelect(s),this.removeHover()),this.setSelectLI(s,e))}},u.prototype.spaceKeyHandler=function(){if(this.enable&&this.showCheckBox&&Object.keys(this.dataSource).length&&this.curUL){var e=this.curUL.querySelector("."+h.focused);if(!t.isNullOrUndefined(e)&&t.isNullOrUndefined(e.querySelector("."+h.checked))){var i={curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:void 0,item:e};this.checkInternally(i,i.item.querySelector("."+h.checkboxWrapper))}else this.uncheckItem(e)}},u.prototype.keyActionHandler=function(e){switch(e.keyCode){case 36:this.homeKeyHandler(e);break;case 35:this.homeKeyHandler(e,!0);break;case 40:this.arrowKeyHandler(e);break;case 38:this.arrowKeyHandler(e,!0);break;case 13:this.enterKeyHandler(e);break;case 8:this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back();break;case 32:this.spaceKeyHandler()}},u.prototype.swipeActionHandler=function(e){"Right"===e.swipeDirection&&e.velocity>.5&&"touchend"===e.originalEvent.type&&(this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back())},u.prototype.focusout=function(){if(Object.keys(this.dataSource).length&&this.curUL){var e=this.curUL.querySelector("."+h.focused),t=this.curUL.querySelector("[aria-selected = true]");e&&(e.classList.remove(h.focused),t&&!this.showCheckBox&&t.classList.add(h.selected))}},u.prototype.wireEvents=function(){t.EventHandler.add(this.element,"keydown",this.keyActionHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"mouseout",this.leaveHandler,this),t.EventHandler.add(this.element,"focusout",this.focusout,this),this.touchModule=new t.Touch(this.element,{swipe:this.swipeActionHandler.bind(this)})},u.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"mouseout",this.leaveHandler),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"mouseout",this.leaveHandler),this.touchModule.destroy()},u.prototype.removeFocus=function(){for(var e=0,t=this.element.querySelectorAll("."+h.focused);e<t.length;e++)t[e].classList.remove(h.focused)},u.prototype.removeHover=function(){var e=this.element.querySelector("."+h.hover);e&&e.classList.remove(h.hover)},u.prototype.removeSelect=function(e){if(t.isNullOrUndefined(e))for(var i=0,s=this.element.querySelectorAll("."+h.selected);i<s.length;i++){var n=s[i];this.showCheckBox&&n.querySelector("."+h.checked)||(n.setAttribute("aria-selected","false"),n.classList.remove(h.selected))}else e.classList.remove(h.selected),e.setAttribute("aria-selected","false")},u.prototype.isValidLI=function(e){return e&&e.classList.contains(h.listItem)&&!e.classList.contains(h.groupListItem)&&!e.classList.contains(h.disable)},u.prototype.setCheckboxLI=function(e,i){if(this.isValidLI(e)&&this.enable&&this.showCheckBox){this.curUL.querySelector("."+h.focused)&&this.curUL.querySelector("."+h.focused).classList.remove(h.focused),e.classList.add(h.focused);var s=e.querySelector("."+h.checkboxWrapper),n=s.querySelector("."+h.checkboxIcon+"."+h.icon);this.removeHover(),n.classList.contains(h.checked)?(n.classList.remove(h.checked),e.classList.remove(h.selected),e.setAttribute("aria-selected","false")):(n.classList.add(h.checked),e.classList.add(h.selected),e.setAttribute("aria-selected","true")),s.setAttribute("aria-checked",n.classList.contains(h.checked)?"true":"false");var l=this.selectEventData(e,i);t.merge(l,{isChecked:n.classList.contains(h.checked)}),this.enableVirtualization&&this.virtualizationModule.setCheckboxLI(e,i),this.trigger("select",l),this.setSelectedItemData(e),this.renderSubList(e)}},u.prototype.selectEventData=function(e,i){var s,l=this.getItemData(e),r=n(l,this.listBaseOption.fields);s=!t.isNullOrUndefined(l)&&"string"==typeof this.dataSource[0]||"number"==typeof this.dataSource[0]?{item:e,text:e&&e.innerText.trim(),data:this.dataSource}:{item:e,text:r&&r[this.listBaseOption.fields.text],data:l};var a={};return t.merge(a,s),i&&t.merge(a,{isInteracted:!0,event:i,index:this.curUL&&Array.prototype.indexOf.call(this.curUL.children,e)}),a},u.prototype.setSelectedItemData=function(e){var i=this.getItemData(e),s=n(i,this.listBaseOption.fields);t.isNullOrUndefined(i)||"string"!=typeof this.dataSource[0]&&"number"!=typeof this.dataSource[0]?this.selectedItems={item:e,text:s&&s[this.listBaseOption.fields.text],data:i}:this.selectedItems={item:e,text:e&&e.innerText.trim(),data:this.dataSource}},u.prototype.setSelectLI=function(e,t){if(this.isValidLI(e)&&!e.classList.contains(h.selected)&&this.enable){this.showCheckBox||this.removeSelect(),e.classList.add(h.selected),e.setAttribute("aria-selected","true"),this.removeHover(),this.setSelectedItemData(e),this.enableVirtualization&&this.virtualizationModule.setSelectLI(e,t);var i=this.selectEventData(e,t);this.trigger("select",i),this.selectedLI=e,this.renderSubList(e)}},u.prototype.setHoverLI=function(e){if(this.isValidLI(e)&&!e.classList.contains(h.hover)&&this.enable){var i=this.element.querySelectorAll("."+h.hover);i&&i.length&&t.removeClass(i,h.hover),e.classList.contains(h.selected)&&!this.showCheckBox||e.classList.add(h.hover)}},u.prototype.getSubDS=function(){var e=this.curDSLevel;if(e.length){for(var t=this.localData,i=0,s=e;i<s.length;i++){var l=s[i],r={};r[this.fields.id]=l,this.curDSJSON=this.findItemFromDS(t,r);var a=n(this.curDSJSON,this.listBaseOption.fields);t=this.curDSJSON?a[this.fields.child]:t}return t}return this.localData},u.prototype.getItemData=function(e){var s,n=this.dataSource instanceof i.DataManager?this.localData:this.dataSource,l=this.getElementUID(e);return s=t.isNullOrUndefined(this.element.querySelector("."+h.hasChild))&&this.fields.groupBy?this.curViewDS:n,this.findItemFromDS(s,l)},u.prototype.findItemFromDS=function(e,i,s){var l,r=this;return e&&e.length&&i?e.some(function(a){var o=n(a,r.listBaseOption.fields);if(!i[r.fields.id]&&!i[r.fields.text]||i[r.fields.id]&&(!t.isNullOrUndefined(o[r.fields.id])&&o[r.fields.id].toString())!==i[r.fields.id].toString()||i[r.fields.text]&&o[r.fields.text]!==i[r.fields.text])if("object"!=typeof a&&-1!==e.indexOf(a))l=s?e:a;else if(!t.isNullOrUndefined(i[r.fields.id])&&t.isNullOrUndefined(o[r.fields.id])){var c=r.element.querySelector('[data-uid="'+i[r.fields.id]+'"]');c&&c.innerText.trim()===o[r.fields.text]&&(l=a)}else o.hasOwnProperty(r.fields.child)&&o[r.fields.child].length&&(l=r.findItemFromDS(o[r.fields.child],i,s));else l=s?e:a;return!!l}):l=e,l},u.prototype.getQuery=function(){var t=[],s=this.query?this.query:new i.Query;if(!this.query){for(var n=0,l=Object.keys(this.fields.properties);n<l.length;n++){var r=l[n];"tableName"!==r&&this.fields[r]&&this.fields[r]!==e.ListBase.defaultMappedFields[r]&&-1===t.indexOf(this.fields[r])&&t.push(this.fields[r])}s.select(t),this.fields.properties.hasOwnProperty("tableName")&&s.from(this.fields.tableName)}return s},u.prototype.setViewDataSource=function(t){void 0===t&&(t=this.localData),t&&this.fields.groupBy?"None"!==this.sortOrder?this.curViewDS=e.ListBase.groupDataSource(e.ListBase.getDataSource(t,e.ListBase.addSorting(this.sortOrder,this.fields.sortBy)),this.listBaseOption.fields,this.sortOrder):this.curViewDS=e.ListBase.groupDataSource(t,this.listBaseOption.fields,this.sortOrder):t&&"None"!==this.sortOrder?this.curViewDS=e.ListBase.getDataSource(t,e.ListBase.addSorting(this.sortOrder,this.fields.sortBy)):this.curViewDS=t},u.prototype.isInAnimation=function(){return this.curUL.classList.contains(".e-animate")},u.prototype.setLocalData=function(){var s=this;this.trigger("actionBegin");var n=this;if(this.dataSource instanceof i.DataManager)this.dataSource.executeQuery(this.getQuery()).then(function(e){s.isDestroyed||(s.localData=e.result,s.isServerRendered&&t.isBlazor()||(n.removeElement(n.contentContainer),s.isReact&&s.clearTemplate()),s.renderList(),s.trigger("actionComplete",e))}).catch(function(e){s.isDestroyed||s.trigger("actionFailure",e)});else if(this.dataSource&&this.dataSource.length)this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData});else{var l=this.element.querySelector("ul");l&&(t.remove(l),this.setProperties({dataSource:e.ListBase.createJsonFromElement(l)},!0),this.localData=this.dataSource,this.renderList(),this.trigger("actionComplete",{data:this.localData}))}},u.prototype.reRender=function(){t.isBlazor()&&this.isServerRendered&&!this.enableVirtualization||(this.resetBlazorTemplates(),this.removeElement(this.headerEle),this.removeElement(this.ulElement),this.removeElement(this.contentContainer),this.isReact&&this.clearTemplate(),-1===Object.keys(window).indexOf("ejsInterop")&&(this.element.innerHTML=""),this.headerEle=this.ulElement=this.liCollection=void 0,this.header()),this.setLocalData()},u.prototype.resetCurrentList=function(){this.resetBlazorTemplates(),this.setViewDataSource(this.curViewDS),this.contentContainer.innerHTML="",this.createList(),this.renderIntoDom(this.curUL)},u.prototype.setAttributes=function(e){for(var t=0;t<e.length;t++){var i=e[t];i.classList.contains("e-list-item")&&(i.setAttribute("id",this.element.id+"_"+i.getAttribute("data-uid")),i.setAttribute("aria-selected","false"),i.setAttribute("tabindex","-1"))}},u.prototype.createList=function(){this.currentLiElements=[],this.isNestedList=!1,this.ulElement=this.curUL=e.ListBase.createList(this.createElement,this.curViewDS,this.listBaseOption,null,this),this.liCollection=this.curUL.querySelectorAll("."+h.listItem),this.setAttributes(this.liCollection),this.updateBlazorTemplates(!0)},u.prototype.resetBlazorTemplates=function(){var e=t.blazorTemplates;this.template&&(e[this.LISTVIEW_TEMPLATE_ID]=[],t.resetBlazorTemplate(this.LISTVIEW_TEMPLATE_ID,"Template")),this.groupTemplate&&(e[this.LISTVIEW_GROUPTEMPLATE_ID]=[],t.resetBlazorTemplate(this.LISTVIEW_GROUPTEMPLATE_ID,"GroupTemplate")),this.headerTemplate&&t.resetBlazorTemplate(this.LISTVIEW_HEADERTEMPLATE_ID,"HeaderTemplate")},u.prototype.updateBlazorTemplates=function(e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=!1),this.template&&e&&!this.enableVirtualization&&t.updateBlazorTemplate(this.LISTVIEW_TEMPLATE_ID,"Template",this,s),this.groupTemplate&&e&&!this.enableVirtualization&&t.updateBlazorTemplate(this.LISTVIEW_GROUPTEMPLATE_ID,"GroupTemplate",this,s),this.headerTemplate&&i&&t.updateBlazorTemplate(this.LISTVIEW_HEADERTEMPLATE_ID,"HeaderTemplate",this,s)},u.prototype.exceptionEvent=function(e){this.trigger("actionFailure",e)},u.prototype.UpdateCurrentUL=function(){this.ulElement=this.curUL=this.element.querySelector("."+h.parentItem),this.curUL&&(this.liCollection=this.curUL.querySelectorAll("."+h.listItem))},u.prototype.removeActiveClass=function(){var e=this;setTimeout(function(){for(var t=e.element.querySelector("."+h.virtualElementContainer),i=0;i<t.childElementCount;i++){var s=t.children[i],n=void 0,l=void 0;if(e.showCheckBox)if(e.previousSelectedItems.length>0)for(var r=0;r<e.previousSelectedItems.length;r++)s.getAttribute("data-uid")===e.previousSelectedItems[r]?(s.classList.add("e-active"),s.setAttribute("aria-selected","true"),s.querySelector(".e-frame.e-icons")&&s.querySelector(".e-frame.e-icons").classList.add("e-check"),n=i):n!==i&&(s.classList.remove("e-active"),s.removeAttribute("aria-selected"),s.querySelector(".e-check")&&s.querySelector(".e-check").classList.remove("e-check"));else s.classList.remove("e-active"),s.removeAttribute("aria-selected"),s.querySelector(".e-check")&&s.querySelector(".e-check").classList.remove("e-check");else s.getAttribute("data-uid")===e.previousSelectedItems[0]?(s.classList.add("e-active"),s.setAttribute("aria-selected","true")):(s.classList.remove("e-active"),s.removeAttribute("aria-selected"));if(e.hiddenItems.length>0)for(var a=0;a<e.hiddenItems.length;a++)s.getAttribute("data-uid")===e.previousSelectedItems[a]?(s.style.display="none",l=i):l!==i&&(s.style.display=null);if(e.enabledItems.length>0)for(var o=0;o<e.enabledItems.length;o++)s.getAttribute("data-uid")===e.enabledItems[o]&&s.classList.contains("e-disabled")&&s.classList.remove("e-disabled");if(e.disabledItems.length>0)for(var c=0;c<e.disabledItems.length;c++)s.getAttribute("data-uid")===e.disabledItems[c]&&(s.classList.contains("e-disabled")||s.classList.add("e-disabled"))}},200)},u.prototype.renderingNestedList=function(){var e=t.closest(this.liElement.parentNode,"."+h.parentItem),i=this.element.id,s=document.getElementById(i),n=s.getElementsByTagName("UL")[s.getElementsByTagName("UL").length-1];this.switchView(e,n),this.liElement=null},u.prototype.renderSubList=function(i){this.liElement=i;var s=i.getAttribute("data-uid");if(i.classList.contains(h.hasChild)&&s){var l=t.closest(i.parentNode,"."+h.parentItem),r=this.element.querySelector("[pid='"+s+"']");if(this.curDSLevel.push(s),this.setViewDataSource(this.getSubDS()),!r){var a=this.curViewDS;if(t.isBlazor()&&this.isServerRendered)this.interopAdaptor.invokeMethodAsync("ListChildDataSource",a);else{r=e.ListBase.createListFromJson(this.createElement,a,this.listBaseOption,this.curDSLevel.length,null,this),this.isReact&&this.renderReactTemplates();var o=r.querySelectorAll("."+h.listItem);this.setAttributes(o),r.setAttribute("pID",s),r.style.display="none",this.renderIntoDom(r),this.updateBlazorTemplates(!0)}}if(t.isBlazor()&&this.isServerRendered&&!this.enableVirtualization||this.switchView(l,r),this.liCollection=this.curUL.querySelectorAll("."+h.listItem),this.selectedItems){var c=n(this.selectedItems.data,this.listBaseOption.fields);this.header(c[this.listBaseOption.fields.text],!0,"header")}this.selectedLI=void 0}},u.prototype.renderIntoDom=function(e){this.contentContainer.appendChild(e)},u.prototype.renderList=function(e){this.setViewDataSource(e),t.isBlazor()&&this.isServerRendered&&!this.enableVirtualization||(this.enableVirtualization?(Object.keys(this.dataSource).length&&(t.isBlazor()&&this.isServerRendered||!this.template&&!this.groupTemplate||this.virtualizationModule.isNgTemplate()||(this.listBaseOption.template=null,this.listBaseOption.groupTemplate=null,this.listBaseOption.itemCreated=this.virtualizationModule.createUIItem.bind(this.virtualizationModule))),this.virtualizationModule.uiVirtualization()):(this.createList(),this.contentContainer=this.createElement("div",{className:h.content}),this.element.appendChild(this.contentContainer),this.renderIntoDom(this.ulElement),this.isReact&&this.renderReactTemplates()))},u.prototype.getElementUID=function(e){var t={};return e instanceof Element?t[this.fields.id]=e.getAttribute("data-uid"):t=e,t},u.prototype.render=function(){t.isBlazor()&&this.isServerRendered?this.initBlazor(!0):(this.element.classList.add(h.root),t.attributes(this.element,{role:"list",tabindex:"0"}),this.setCSSClass(),this.setEnableRTL(),this.setEnable(),this.setSize(),this.wireEvents(),this.header(),this.setLocalData(),this.setHTMLAttribute(),this.isReact&&this.renderReactTemplates()),this.rippleFn=t.rippleEffect(this.element,{selector:"."+h.listItem}),this.renderComplete()},u.prototype.initBlazor=function(e){null===e&&(e=!1),this.setLocalData(),this.setViewDataSource(this.localData),this.contentContainer=this.element.querySelector("."+h.content),e&&this.wireEvents()},u.prototype.destroy=function(){this.resetBlazorTemplates(),this.isReact&&this.clearTemplate(),this.unWireEvents();var e=[h.root,h.disable,"e-rtl","e-has-header","e-lib"].concat(this.cssClass.split(" ").filter(function(e){return e}));t.removeClass([this.element],e),this.element.removeAttribute("role"),this.element.removeAttribute("tabindex"),this.curUL=this.ulElement=this.liCollection=this.headerEle=void 0,t.isBlazor()&&this.isServerRendered?this.element.style.display="none":(this.element.innerHTML="",l.prototype.destroy.call(this))},u.prototype.back=function(){var e=this.curDSLevel[this.curDSLevel.length-1];if(void 0!==e&&!this.isInAnimation()){this.curDSLevel.pop(),this.setViewDataSource(this.getSubDS());var i=this.element.querySelector("[data-uid='"+e+"']"),s=this.curUL;i?i=t.isBlazor()&&this.isServerRendered&&this.enableVirtualization?i.parentElement.parentElement.parentElement:i.parentElement:(this.createList(),this.renderIntoDom(this.ulElement),i=this.curUL);var l=n(this.curDSJSON,this.listBaseOption.fields)[this.fields.text];this.switchView(s,i,!0),this.removeFocus();var r=this.element.querySelector("[data-uid='"+e+"']");r.classList.remove(h.disable),r.classList.add(h.focused),this.showCheckBox&&r.querySelector("."+h.checkboxIcon).classList.contains(h.checked)?r.setAttribute("aria-selected","true"):(r.classList.remove(h.selected),r.setAttribute("aria-selected","false")),this.liCollection=this.curUL.querySelectorAll("."+h.listItem),this.enableHtmlSanitizer&&this.setProperties({headerTitle:t.SanitizeHtmlHelper.sanitize(this.headerTitle)},!0),this.header(this.curDSLevel.length?l:this.headerTitle,!!this.curDSLevel.length,"header")}},u.prototype.selectItem=function(e){this.enableVirtualization?this.virtualizationModule.selectItem(e):this.showCheckBox?this.setCheckboxLI(this.getLiFromObjOrElement(e)):!0===t.isNullOrUndefined(e)?this.removeSelect():this.setSelectLI(this.getLiFromObjOrElement(e))},u.prototype.getLiFromObjOrElement=function(e){var s,l=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;if(!t.isNullOrUndefined(e))if("string"==typeof l[0]||"number"==typeof l[0])if(e instanceof Element){for(var r=e.getAttribute("data-uid").toString(),a=0;a<this.liCollection.length;a++)if(this.liCollection[a].getAttribute("data-uid").toString()===r){s=this.liCollection[a];break}}else Array.prototype.some.call(this.curUL.querySelectorAll("."+h.listItem),function(t){return t.innerText.trim()===e.toString()&&(s=t,!0)});else{var o=this.getItemData(e),c=n(o,this.listBaseOption.fields);if(o&&(s=this.element.querySelector('[data-uid="'+c[this.fields.id]+'"]'),!this.enableVirtualization&&t.isNullOrUndefined(s)))for(var d=this.element.querySelectorAll("."+h.listItem),a=0;a<d.length;a++)d[a].innerText.trim()===c[this.fields.text]&&(s=d[a])}return s},u.prototype.selectMultipleItems=function(e){if(!t.isNullOrUndefined(e))for(var i=0;i<e.length;i++)t.isNullOrUndefined(e[i])||this.selectItem(e[i])},u.prototype.getParentId=function(){var e=[];if(this.isNestedList)for(var t=this.curDSLevel.length-1;t>=0;t--)e.push(this.curDSLevel[t]);return e},u.prototype.getSelectedItems=function(){var e,s=!1;this.selectedId=[];var l=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;if(this.enableVirtualization&&!s)e=this.virtualizationModule.getSelectedItems(),s=!0;else if(this.showCheckBox&&!s){var r=this.curUL.getElementsByClassName(h.selected),a=[],o=[];this.selectedId=[];for(var c=[],d=0;d<r.length;d++)if("string"==typeof l[0]||"number"==typeof l[0])a.push(r[d].innerText.trim());else{var u=this.getItemData(r[d]),p=n(u,this.listBaseOption.fields);this.isNestedList?c.push({data:u,parentId:this.getParentId()}):o.push(u),p?(a.push(p[this.listBaseOption.fields.text]),this.selectedId.push(p[this.listBaseOption.fields.id])):(a.push(void 0),this.selectedId.push(void 0))}"string"!=typeof l[0]&&"number"!=typeof l[0]||s||(e={item:r,data:l,text:a},s=!0),this.isNestedList&&!s?(e={item:r,data:c,text:a},s=!0):s||(e={item:r,data:o,text:a},s=!0)}else if(!s){var m=this.element.getElementsByClassName(h.selected)[0],p=n(this.getItemData(m),this.listBaseOption.fields);"string"!=typeof l[0]&&"number"!=typeof l[0]||s?s||(t.isNullOrUndefined(p)||t.isNullOrUndefined(m)?(e=void 0,s=!0):(this.selectedId.push(p[this.listBaseOption.fields.id]),e={text:p[this.listBaseOption.fields.text],item:m,data:this.getItemData(m)},s=!0)):(e=t.isNullOrUndefined(m)?void 0:{item:m,data:l,text:m.innerText.trim()},s=!0)}return t.isBlazor()?this.blazorGetSelectedItems(e):e},u.prototype.blazorGetSelectedItems=function(e){var i={data:[],index:[],parentId:[],text:[]};if(!t.isNullOrUndefined(e)){if(!t.isNullOrUndefined(e.data))if(this.showCheckBox&&this.isNestedList){for(var s=0;s<e.data.length;s++)i.data.push(e.data[s].data);t.isNullOrUndefined(e.data[0])||t.isNullOrUndefined(e.data[0].parentId)||(i.parentId=e.data[0].parentId)}else i.data=this.convertItemsToArray(e.data);t.isNullOrUndefined(e.text)||(i.text=this.convertItemsToArray(e.text)),t.isNullOrUndefined(e.index)||(i.index=this.convertItemsToArray(e.index))}return i},u.prototype.convertItemsToArray=function(e){return Array.isArray(e)?e.slice():[e]},u.prototype.findItem=function(e){return this.getItemData(e)},u.prototype.enableItem=function(e){this.setItemState(e,!0),this.enableVirtualization&&this.virtualizationModule.enableItem(e)},u.prototype.disableItem=function(e){this.setItemState(e,!1),this.enableVirtualization&&this.virtualizationModule.disableItem(e)},u.prototype.setItemState=function(e,t){var i=this.getItemData(e),s=n(i,this.listBaseOption.fields);if(i){var l=this.element.querySelector('[data-uid="'+s[this.fields.id]+'"]');t?(l&&l.classList.remove(h.disable),delete i[this.fields.enabled]):t||(l&&l.classList.add(h.disable),i[this.fields.enabled]=!1)}},u.prototype.showItem=function(e){this.showHideItem(e,!1,""),this.enableVirtualization&&this.virtualizationModule.showItem(e)},u.prototype.hideItem=function(e){this.showHideItem(e,!0,"none"),this.enableVirtualization&&this.virtualizationModule.hideItem(e)},u.prototype.showHideItem=function(e,t,i){var s=this.getItemData(e),l=n(s,this.listBaseOption.fields);if(s){var r=this.element.querySelector('[data-uid="'+l[this.fields.id]+'"]');r&&(r.style.display=i),t?s[this.fields.isVisible]=!1:delete s[this.fields.isVisible]}},u.prototype.addItem=function(e,t){void 0===t&&(t=void 0);var s=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;this.addItemInternally(e,t,s)},u.prototype.addItemInternally=function(e,t,i){if(e instanceof Array)if(this.enableVirtualization)this.virtualizationModule.addItem(e,t,i);else{var s=this.findItemFromDS(i,t),l=void 0;if(s&&((l=n(s,this.listBaseOption.fields)[this.fields.child])||(l=[]),l=l.concat(e)),s instanceof Array){for(var r=0;r<e.length;r++){i.push(e[r]),this.setViewDataSource(i);var a=this.contentContainer?this.contentContainer.children[0]:null;this.contentContainer&&a?this.addItemIntoDom(e[r],a,this.curViewDS):this.reRender()}this.curUL&&this.updateBlazorTemplates(!0),this.liCollection=this.curUL.querySelectorAll("."+h.listItem)}else s&&(s[this.fields.child]=l,this.addItemInNestedList(s,e))}},u.prototype.addItemInNestedList=function(i,s){var n=i[this.fields.id],l=i[this.fields.child],r=this.element.querySelector("[pid='"+n+"']"),a=this.element.querySelector("[data-uid='"+n+"']"),o=r||(a?t.closest(a,"ul"):null),c=r?l:[i],d=!1;if(!!a&&!a.classList.contains(h.hasChild)){var u=e.ListBase.createListItemFromJson(this.createElement,c,this.listBaseOption,null,null,this);this.setAttributes(u),o.insertBefore(u[0],a),t.detach(a),d=!0}if(r&&s){for(var p=0;p<s.length;p++)c.push(s[p]),this.addItemIntoDom(s[p],o,c);d=!0}d&&this.updateBlazorTemplates(!0)},u.prototype.addItemIntoDom=function(e,t,i){var s=i.indexOf(e);this.addListItem(e,s,t,i);var n=i[s-1];n&&n.isHeader&&1===n.items.length&&this.addListItem(n,s-1,t,i)},u.prototype.addListItem=function(t,i,s,n){var l=this.getLiFromObjOrElement(n[i+1])||this.getLiFromObjOrElement(n[i+2])||null,r=e.ListBase.createListItemFromJson(this.createElement,[t],this.listBaseOption,null,null,this);this.setAttributes(r),this.template&&this.isReact&&this.renderReactTemplates(),s.insertBefore(r[0],l)},u.prototype.removeItem=function(e){var t=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;this.enableVirtualization?this.virtualizationModule.removeItem(e):(this.removeItemFromList(e,t),this.updateBlazorTemplates(!0))},u.prototype.removeItemFromList=function(i,s){var n,l=this,r=this.curViewDS,a=i instanceof Element?this.getElementUID(i):i;if(n=this.findItemFromDS(s,a,!0)){var o;o=this.findItemFromDS(n,a);var c=r.indexOf(o),d=this.getLiFromObjOrElement(i),u=void 0;this.validateNestedView(d),this.fields.groupBy&&this.curViewDS[c-1]&&r[c-1].isHeader&&1===r[c-1].items.length&&d&&d.previousElementSibling.classList.contains(h.groupListItem)&&(t.isNullOrUndefined(d.nextElementSibling)||d.nextElementSibling&&d.nextElementSibling.classList.contains(h.groupListItem))&&(u=d.previousElementSibling),d&&t.detach(d),u&&t.detach(u);var p=n.length-1<=0?this.findParent(this.localData,this.fields.id,function(e){return e===o[l.fields.id]},null):null,m=n.indexOf(o);if(n.splice(m,1),this.setViewDataSource(s),p&&p.parent&&Array.isArray(p.parent[this.fields.child])&&p.parent[this.fields.child].length<=0){var f=this.getLiFromObjOrElement(p.parent);if(f){var v=e.ListBase.createListItemFromJson(this.createElement,[p.parent],this.listBaseOption,null,null,this);this.setAttributes(v),f.parentElement.insertBefore(v[0],f),f.parentElement.removeChild(f)}}n.length<=0&&this.back(),this.liCollection=Array.prototype.slice.call(this.element.querySelectorAll("."+h.listItem))}},u.prototype.validateNestedView=function(e){var t=e?e.getAttribute("data-uid").toString().toLowerCase():null;if(t&&this.curDSLevel&&this.curDSLevel.length>0)for(;this.curDSLevel.some(function(e){return e.toString().toLowerCase()===t});)this.back()},u.prototype.removeMultipleItems=function(e){if(e.length){for(var t=0;t<e.length;t++)this.removeItem(e[t]);this.updateBlazorTemplates(!0)}},u.prototype.findParent=function(e,i,s,n){if(e.hasOwnProperty(i)&&!0===s(e[i]))return t.extend({},e);for(var l=0;l<Object.keys(e).length;l++)if(e[Object.keys(e)[l]]&&"object"==typeof e[Object.keys(e)[l]]){var r=this.findParent(e[Object.keys(e)[l]],i,s,e);if(null!=r)return r.parent||(r.parent=n),r}return null},u.prototype.getModuleName=function(){return"listview"},u.prototype.requiredModules=function(){var e=[];return this.enableVirtualization&&e.push({args:[this],member:"virtualization"}),e},u.prototype.getPersistData=function(){return this.addOnPersist(["cssClass","enableRtl","htmlAttributes","enable","fields","animation","headerTitle","sortOrder","showIcon","height","width","showCheckBox","checkBoxPosition"])},a([t.Property("")],u.prototype,"cssClass",void 0),a([t.Property(!1)],u.prototype,"enableVirtualization",void 0),a([t.Property({})],u.prototype,"htmlAttributes",void 0),a([t.Property(!0)],u.prototype,"enable",void 0),a([t.Property([])],u.prototype,"dataSource",void 0),a([t.Property()],u.prototype,"query",void 0),a([t.Complex(e.ListBase.defaultMappedFields,d)],u.prototype,"fields",void 0),a([t.Property({effect:"SlideLeft",duration:400,easing:"ease"})],u.prototype,"animation",void 0),a([t.Property("None")],u.prototype,"sortOrder",void 0),a([t.Property(!1)],u.prototype,"showIcon",void 0),a([t.Property(!1)],u.prototype,"showCheckBox",void 0),a([t.Property("Left")],u.prototype,"checkBoxPosition",void 0),a([t.Property("")],u.prototype,"headerTitle",void 0),a([t.Property(!1)],u.prototype,"showHeader",void 0),a([t.Property(!1)],u.prototype,"enableHtmlSanitizer",void 0),a([t.Property("")],u.prototype,"height",void 0),a([t.Property("")],u.prototype,"width",void 0),a([t.Property(null)],u.prototype,"template",void 0),a([t.Property(null)],u.prototype,"headerTemplate",void 0),a([t.Property(null)],u.prototype,"groupTemplate",void 0),a([t.Event()],u.prototype,"select",void 0),a([t.Event()],u.prototype,"actionBegin",void 0),a([t.Event()],u.prototype,"actionComplete",void 0),a([t.Event()],u.prototype,"actionFailure",void 0),u=a([t.NotifyPropertyChanges],u)}(t.Component),p=function(){function s(e){this.elementDifference=0,this.listViewInstance=e}return s.prototype.isNgTemplate=function(){return!t.isNullOrUndefined(this.listViewInstance.templateRef)&&"string"!=typeof this.listViewInstance.templateRef},s.prototype.uiVirtualization=function(){this.wireScrollEvent(!1);var i=this.listViewInstance.curViewDS,s=i.slice(0,1);t.isBlazor()||this.listViewInstance.isServerRendered||(this.listViewInstance.ulElement=this.listViewInstance.curUL=e.ListBase.createList(this.listViewInstance.createElement,s,this.listViewInstance.listBaseOption,null,this),this.listViewInstance.contentContainer=this.listViewInstance.createElement("div",{className:h.content}),this.listViewInstance.element.appendChild(this.listViewInstance.contentContainer),this.listViewInstance.contentContainer.appendChild(this.listViewInstance.ulElement)),this.listItemHeight=this.listViewInstance.ulElement.firstElementChild.getBoundingClientRect().height,this.expectedDomItemCount=this.ValidateItemCount(1e4),this.domItemCount=this.ValidateItemCount(Object.keys(this.listViewInstance.curViewDS).length),this.uiFirstIndex=0,this.uiLastIndex=this.domItemCount-1;var n=i.slice(1,this.domItemCount);if(t.isBlazor()||this.listViewInstance.isServerRendered)this.listViewInstance.contentContainer=this.listViewInstance.element.querySelector(".e-content"),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li");else{var l=e.ListBase.createListItemFromJson(this.listViewInstance.createElement,n,this.listViewInstance.listBaseOption,null,null,this);t.append(l,this.listViewInstance.ulElement),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li"),this.topElement=this.listViewInstance.createElement("div"),this.listViewInstance.ulElement.insertBefore(this.topElement,this.listViewInstance.ulElement.firstElementChild),this.bottomElement=this.listViewInstance.createElement("div"),this.listViewInstance.ulElement.insertBefore(this.bottomElement,null),this.totalHeight=Object.keys(i).length*this.listItemHeight-this.domItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight}this.listDiff=0,this.uiIndicesInitialization()},s.prototype.wireScrollEvent=function(e){e?!0===this.listViewInstance.isWindow?(window.removeEventListener("scroll",this.onVirtualScroll),window.removeEventListener("scroll",this.updateUl)):(t.EventHandler.remove(this.listViewInstance.element,"scroll",this.onVirtualUiScroll),t.EventHandler.remove(this.listViewInstance.element,"scroll",this.updateUlContainer)):t.isBlazor()&&this.listViewInstance.isServerRendered?this.listViewInstance.isWindow?(this.onVirtualScroll=t.debounce(this.onVirtualUiScroll.bind(this),350),this.updateUl=this.updateUlContainer.bind(this),window.addEventListener("scroll",this.onVirtualScroll),window.addEventListener("scroll",this.updateUl)):(t.EventHandler.add(this.listViewInstance.element,"scroll",t.debounce(this.onVirtualUiScroll,350),this),t.EventHandler.add(this.listViewInstance.element,"scroll",this.updateUlContainer,this)):this.listViewInstance.isWindow?(this.onVirtualScroll=this.onVirtualUiScroll.bind(this),window.addEventListener("scroll",this.onVirtualScroll)):t.EventHandler.add(this.listViewInstance.element,"scroll",this.onVirtualUiScroll,this)},s.prototype.updateUlContainer=function(e){var i,s=this.listViewInstance.ulElement.querySelector("."+h.virtualElementContainer);t.isNullOrUndefined(this.listViewInstance.liElementHeight)&&this.listViewInstance.updateLiElementHeight(),((i=this.listViewInstance.isWindow?Math.round(e.target.documentElement.scrollTop/this.listViewInstance.liElementHeight)-2:Math.round(e.target.scrollTop/this.listViewInstance.liElementHeight)-2)-1)*this.listViewInstance.liElementHeight<0?s.style.top="0px":s.style.top=i*this.listViewInstance.liElementHeight+"px"},s.prototype.ValidateItemCount=function(e){var i,s=parseFloat(t.formatUnit(this.listViewInstance.height));return(i=this.listViewInstance.isWindow?Math.round(window.innerHeight/this.listItemHeight*3):"string"==typeof this.listViewInstance.height&&-1!==this.listViewInstance.height.indexOf("%")?Math.round(this.listViewInstance.element.getBoundingClientRect().height/this.listItemHeight*1.5):Math.round(s/this.listItemHeight*1.5))>e&&(i=e),i},s.prototype.uiIndicesInitialization=function(){this.uiIndices={activeIndices:[],disabledItemIndices:[],hiddenItemIndices:[]};for(var e=this.listViewInstance.curViewDS,i=0;i<e.length;i++)this.listViewInstance.showCheckBox&&e[i][this.listViewInstance.fields.isChecked]&&this.uiIndices.activeIndices.push(i),t.isNullOrUndefined(e[i][this.listViewInstance.fields.enabled])||e[i][this.listViewInstance.fields.enabled]||this.uiIndices.disabledItemIndices.push(i);if(this.isNgTemplate())for(var s=this.listViewInstance.element.querySelectorAll("."+h.listItem),n=0;n<s.length;n++)s[n].context=this.listViewInstance.viewContainerRef.get(n).context},s.prototype.refreshItemHeight=function(){if(this.listViewInstance.curViewDS.length){var e=this.listViewInstance.curViewDS;t.isBlazor()&&this.listViewInstance.isServerRendered?this.listViewInstance.ulElement.children[0].style.height=this.listViewInstance.liElementHeight*Object.keys(e).length+"px":(this.listItemHeight=this.topElement.nextSibling.getBoundingClientRect().height,this.totalHeight=Object.keys(e).length*this.listItemHeight-this.domItemCount*this.listItemHeight,this.bottomElementHeight=this.totalHeight,this.bottomElement.style.height=this.totalHeight+"px")}},s.prototype.getscrollerHeight=function(e){return this.listViewInstance.isWindow?pageYOffset-e<=0?0:pageYOffset-e:this.listViewInstance.element.scrollTop-e<=0?0:this.listViewInstance.element.scrollTop-e},s.prototype.onVirtualUiScroll=function(e){var i,s;s=this.listViewInstance.isWindow?this.listViewInstance.ulElement.getBoundingClientRect().top-document.documentElement.getBoundingClientRect().top:this.listViewInstance.headerEle?this.listViewInstance.headerEle.getBoundingClientRect().height:0,this.scrollPosition=t.isNullOrUndefined(this.scrollPosition)?0:this.scrollPosition;var n=this.getscrollerHeight(s);if(this.topElementHeight=this.listItemHeight*Math.floor(n/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,i=n<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=i[0],this.bottomElementHeight=i[1],t.isBlazor()&&this.listViewInstance.isServerRendered){var l=void 0;if(t.isNullOrUndefined(this.listViewInstance.liElementHeight)&&this.listViewInstance.updateLiElementHeight(),(l=this.listViewInstance.isWindow?Math.round(document.documentElement.scrollTop/this.listViewInstance.liElementHeight):Math.round(e.target.scrollTop/this.listViewInstance.liElementHeight))-2-this.elementDifference>=3||l-2-this.elementDifference<=-1){var r={listDiff:l-2,selectedItems:this.listViewInstance.previousSelectedItems};this.listViewInstance.interopAdaptor.invokeMethodAsync("VirtalScrolling",r),this.listViewInstance.ulElement.querySelector(".e-focused")&&this.listViewInstance.ulElement.querySelector(".e-focused").classList.remove("e-focused"),this.elementDifference=l-2}}else this.topElementHeight!==parseFloat(this.topElement.style.height)&&(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",n>this.scrollPosition?(l=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff))>this.expectedDomItemCount+5?this.onLongScroll(l,!0):this.onNormalScroll(l,!0):(l=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight))>this.expectedDomItemCount+5?this.onLongScroll(l,!1):this.onNormalScroll(l,!1)),this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),"function"==typeof this.listViewInstance.onUIScrolled&&this.listViewInstance.onUIScrolled();this.scrollPosition=n},s.prototype.onLongScroll=function(e,t){for(var i=t?this.uiFirstIndex+e:this.uiFirstIndex-e,s=this.listViewInstance.ulElement.querySelectorAll("li"),n=0;n<s.length;n++)this.updateUI(s[n],i),i++;this.uiLastIndex=t?this.uiLastIndex+e:this.uiLastIndex-e,this.uiFirstIndex=t?this.uiFirstIndex+e:this.uiFirstIndex-e},s.prototype.onNormalScroll=function(e,t){if(t)for(i=0;i<e;i++){s=++this.uiLastIndex;this.updateUI(this.topElement.nextElementSibling,s,this.bottomElement),this.uiFirstIndex++}else for(var i=0;i<e;i++){var s=--this.uiFirstIndex,n=this.topElement.nextSibling;this.updateUI(this.bottomElement.previousElementSibling,s,n),this.uiLastIndex--}},s.prototype.updateUiContent=function(i,s){var n=this.listViewInstance.curViewDS;if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0]?(i.dataset.uid=e.ListBase.generateId(),i.getElementsByClassName(h.listItemText)[0].innerHTML=this.listViewInstance.curViewDS[s].toString()):(i.dataset.uid=n[s][this.listViewInstance.fields.id]?n[s][this.listViewInstance.fields.id]:e.ListBase.generateId(),i.getElementsByClassName(h.listItemText)[0].innerHTML=n[s][this.listViewInstance.fields.text]),this.listViewInstance.showIcon&&(i.querySelector("."+h.listIcon)&&t.detach(i.querySelector("."+h.listIcon)),this.listViewInstance.curViewDS[s][this.listViewInstance.fields.iconCss])){var l=i.querySelector("."+h.textContent),r=this.listViewInstance.createElement("div",{className:h.listIcon+" "+this.listViewInstance.curViewDS[s][this.listViewInstance.fields.iconCss]});l.insertBefore(r,i.querySelector("."+h.listItemText))}if(this.listViewInstance.showCheckBox&&this.listViewInstance.fields.groupBy){this.checkListWrapper||(this.checkListWrapper=this.listViewInstance.curUL.querySelector("."+h.checkboxWrapper).cloneNode(!0));l=i.querySelector("."+h.textContent);this.listViewInstance.curViewDS[s].isHeader?i.querySelector("."+h.checkboxWrapper)&&(i.classList.remove(h.checklist),l.classList.remove(h.checkbox),t.detach(i.querySelector("."+h.checkboxWrapper))):i.querySelector("."+h.checkboxWrapper)||(i.classList.add(h.checklist),l.classList.add(h.checkbox),l.insertBefore(this.checkListWrapper.cloneNode(!0),i.querySelector("."+h.listItemText)))}},s.prototype.changeElementAttributes=function(e,i){if(e.classList.remove(h.disable),this.uiIndices.disabledItemIndices.length&&-1!==this.uiIndices.disabledItemIndices.indexOf(i)&&e.classList.add(h.disable),e.style.display="",this.uiIndices.hiddenItemIndices.length&&-1!==this.uiIndices.hiddenItemIndices.indexOf(i)&&(e.style.display="none"),this.listViewInstance.showCheckBox){var s=e.querySelector("."+h.checkboxWrapper);e.classList.remove(h.selected),e.classList.remove(h.focused),s&&(s.removeAttribute("aria-checked"),s.firstElementChild.classList.remove(h.checked)),this.uiIndices.activeIndices.length&&-1!==this.uiIndices.activeIndices.indexOf(i)&&!this.listViewInstance.curUL.querySelector(h.selected)&&(e.classList.add(h.selected),s.firstElementChild.classList.add(h.checked),s.setAttribute("aria-checked","true"),this.activeIndex===i&&e.classList.add(h.focused))}else e.classList.remove(h.selected),e.removeAttribute("aria-selected"),t.isNullOrUndefined(this.activeIndex)||this.activeIndex!==i||this.listViewInstance.curUL.querySelector(h.selected)||(e.classList.add(h.selected),e.setAttribute("aria-selected","true"));this.listViewInstance.fields.groupBy&&(this.listViewInstance.curViewDS[i].isHeader?e.classList.contains(h.listItem)&&(e.classList.remove(h.listItem),e.setAttribute("role","group"),e.classList.add(h.groupListItem)):e.classList.contains(h.groupListItem)&&(e.classList.remove(h.groupListItem),e.setAttribute("role","listitem"),e.classList.add(h.listItem)))},s.prototype.findDSAndIndexFromId=function(e,i){var s=this,n={};return i=this.listViewInstance.getElementUID(i),t.isNullOrUndefined(i)||e.some(function(e,t){return!!(i[s.listViewInstance.fields.id]&&i[s.listViewInstance.fields.id]===(e[s.listViewInstance.fields.id]&&e[s.listViewInstance.fields.id])||i===e)&&(n.index=t,n.data=e,!0)}),n},s.prototype.getSelectedItems=function(){var e=this;if(!t.isNullOrUndefined(this.activeIndex)||this.listViewInstance.showCheckBox&&this.uiIndices.activeIndices.length){var s=[],n=[];if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0]){var l=this.listViewInstance.curViewDS;if(this.listViewInstance.showCheckBox){for(var r=this.uiIndices.activeIndices,a=0;a<r.length;a++)s.push(l[r[a]]);return{text:s,data:s,index:this.uiIndices.activeIndices.map(function(t){return e.listViewInstance.dataSource.indexOf(l[t])})}}return{text:l[this.activeIndex],data:l[this.activeIndex],index:this.listViewInstance.dataSource.indexOf(l[this.activeIndex])}}if(t.isBlazor()&&this.listViewInstance.isServerRendered){var o=Math.round(this.listViewInstance.element.scrollTop/this.listViewInstance.liElementHeight)-2;o<0&&(o=0),this.activeIndex+=o}var c=this.listViewInstance.curViewDS,h=this.listViewInstance.fields.text;if(this.listViewInstance.showCheckBox){for(var d=this.uiIndices.activeIndices,a=0;a<d.length;a++)n.push(c[d[a]][h]),s.push(c[d[a]]);var u=this.listViewInstance.dataSource instanceof i.DataManager?c:this.listViewInstance.dataSource;return{text:n,data:s,index:this.uiIndices.activeIndices.map(function(e){return u.indexOf(c[e])})}}var p=this.listViewInstance.dataSource instanceof i.DataManager?c:this.listViewInstance.dataSource;return{text:c[this.activeIndex][this.listViewInstance.fields.text],data:c[this.activeIndex],index:p.indexOf(c[this.activeIndex])}}},s.prototype.selectItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(Object.keys(i).length){var s=this.activeIndex===i.index,n=void 0;if(this.activeIndex=i.index,this.listViewInstance.showCheckBox&&(-1===this.uiIndices.activeIndices.indexOf(i.index)?(n=!0,this.uiIndices.activeIndices.push(i.index)):(n=!1,this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(i.index),1)),this.listViewInstance.curUL.querySelector("."+h.focused)&&this.listViewInstance.curUL.querySelector("."+h.focused).classList.remove(h.focused)),this.listViewInstance.getLiFromObjOrElement(e))this.listViewInstance.showCheckBox?this.listViewInstance.setCheckboxLI(this.listViewInstance.getLiFromObjOrElement(e)):this.listViewInstance.setSelectLI(this.listViewInstance.getLiFromObjOrElement(e));else{var l=void 0;if("string"==typeof this.listViewInstance.dataSource[0]||"number"==typeof this.listViewInstance.dataSource[0])l={text:this.listViewInstance.curViewDS[this.activeIndex],data:this.listViewInstance.curViewDS[this.activeIndex],index:this.activeIndex};else{var r=this.listViewInstance.curViewDS;l={text:r[this.activeIndex][this.listViewInstance.fields.text],data:r[this.activeIndex],index:this.activeIndex}}this.listViewInstance.showCheckBox?(l.isChecked=n,this.listViewInstance.trigger("select",l)):s||(this.listViewInstance.removeSelect(),this.listViewInstance.trigger("select",l))}}else t.isNullOrUndefined(e)&&!this.listViewInstance.showCheckBox&&(this.listViewInstance.removeSelect(),this.activeIndex=void 0);if(t.isBlazor()&&this.listViewInstance.isServerRendered){var a=i.data[this.listViewInstance.fields.id];if(this.listViewInstance.showCheckBox)if(this.listViewInstance.previousSelectedItems.includes(a)){var o=this.listViewInstance.previousSelectedItems.indexOf(a);o>-1&&this.listViewInstance.previousSelectedItems.splice(o,1)}else this.listViewInstance.previousSelectedItems.push(a);else this.listViewInstance.previousSelectedItems[0]=a;this.listViewInstance.removeActiveClass()}},s.prototype.enableItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(t.isBlazor()&&this.listViewInstance.isServerRendered){var s=i.data[this.listViewInstance.fields.id];if(this.listViewInstance.enabledItems.includes(s)||(this.listViewInstance.enabledItems.push(s),this.listViewInstance.removeActiveClass()),this.listViewInstance.disabledItems.includes(s)){var n=this.listViewInstance.disabledItems.indexOf(s);n>-1&&this.listViewInstance.disabledItems.splice(n,1)}}else Object.keys(i).length&&this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(i.index),1)},s.prototype.disableItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(t.isBlazor()&&this.listViewInstance.isServerRendered){var s=i.data[this.listViewInstance.fields.id];if(this.listViewInstance.disabledItems.includes(s)||(this.listViewInstance.disabledItems.push(s),this.listViewInstance.removeActiveClass()),this.listViewInstance.enabledItems.includes(s)){var n=this.listViewInstance.enabledItems.indexOf(s);n>-1&&this.listViewInstance.enabledItems.splice(n,1)}}else Object.keys(i).length&&-1===this.uiIndices.disabledItemIndices.indexOf(i.index)&&this.uiIndices.disabledItemIndices.push(i.index)},s.prototype.showItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(t.isBlazor()&&this.listViewInstance.isServerRendered){var s=i.data[this.listViewInstance.fields.id];if(this.listViewInstance.hiddenItems.includes(s)){var n=this.listViewInstance.hiddenItems.indexOf(s);n>-1&&(this.listViewInstance.previousSelectedItems.splice(n,1),this.listViewInstance.removeActiveClass())}}else Object.keys(i).length&&this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(i.index),1)},s.prototype.hideItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(t.isBlazor()&&this.listViewInstance.isServerRendered){var s=i.data[this.listViewInstance.fields.id];this.listViewInstance.hiddenItems.includes(s)||(this.listViewInstance.hiddenItems.push(s),this.listViewInstance.removeActiveClass())}else Object.keys(i).length&&-1===this.uiIndices.hiddenItemIndices.indexOf(i.index)&&this.uiIndices.hiddenItemIndices.push(i.index)},s.prototype.removeItem=function(e){var s,n=this.listViewInstance.curViewDS,l=this.findDSAndIndexFromId(n,e);t.isBlazor()&&this.listViewInstance.isServerRendered&&void 0!==l.index&&this.listViewInstance.interopAdaptor.invokeMethodAsync("RemoveItemPosition",l.index),Object.keys(l).length&&(s=l.data,n[l.index-1]&&n[l.index-1].isHeader&&1===n[l.index-1].items.length?(this.removeUiItem(l.index-1),this.removeUiItem(l.index-1)):t.isBlazor()&&this.listViewInstance.isServerRendered||this.removeUiItem(l.index));var r=this.listViewInstance.dataSource instanceof i.DataManager?this.listViewInstance.localData:this.listViewInstance.dataSource,a=r.indexOf(s);-1!==a&&(r.splice(a,1),this.listViewInstance.setViewDataSource(r)),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li")},s.prototype.setCheckboxLI=function(e,i){t.isBlazor()&&this.listViewInstance.isServerRendered&&(this.uiFirstIndex=Math.round(this.listViewInstance.element.scrollTop/36)-4,this.uiFirstIndex<0&&(this.uiFirstIndex=0));var s=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex;this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex,e.classList.contains(h.selected)?-1===this.uiIndices.activeIndices.indexOf(s)&&this.uiIndices.activeIndices.push(s):this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(s),1)},s.prototype.setSelectLI=function(e,t){this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex},s.prototype.checkedItem=function(e){if(e){this.uiIndices.activeIndices=[],this.activeIndex=void 0;for(var t=this.listViewInstance.curViewDS,i=0;i<t.length;i++)t[i].isHeader||this.uiIndices.activeIndices.push(i)}else this.activeIndex=void 0,this.uiIndices.activeIndices=[]},s.prototype.addUiItem=function(e){var t=this.listViewInstance.curViewDS;if(this.changeUiIndices(e,!0),this.activeIndex&&this.activeIndex>=e&&this.activeIndex++,this.listViewInstance.showCheckBox&&t[e][this.listViewInstance.fields.isChecked]&&this.uiIndices.activeIndices.push(e),parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)||(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px"),parseFloat(this.bottomElement.style.height)){i=this.listViewInstance.curUL.lastElementChild.previousSibling;(s=this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]))&&(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px",this.updateUI(i,e,s))}else{var i=this.listViewInstance.curUL.firstElementChild.nextSibling,s=void 0;s=Object.keys(this.listViewInstance.curViewDS).length-1===e?this.listViewInstance.curUL.lastElementChild:this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]),this.topElement.style.height=parseFloat(this.topElement.style.height)+this.listItemHeight+"px",this.uiFirstIndex++,this.uiLastIndex++,s&&(this.updateUI(i,e,s),!0===this.listViewInstance.isWindow?window.scrollTo(0,pageYOffset+this.listItemHeight):this.listViewInstance.element.scrollTop+=this.listItemHeight)}this.totalHeight+=this.listItemHeight,this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},s.prototype.removeUiItem=function(e){this.totalHeight-=this.listItemHeight;var i=this.listViewInstance.curViewDS[e],s=this.listViewInstance.getLiFromObjOrElement(i);if(this.listViewInstance.curViewDS.splice(e,1),this.activeIndex&&this.activeIndex>=e&&this.activeIndex--,s)if(this.domItemCount>Object.keys(this.listViewInstance.curViewDS).length)t.detach(s),this.domItemCount--,this.uiLastIndex--,this.totalHeight=0;else{if(s.classList.contains(h.disable)&&(s.classList.remove(h.disable),this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(e),1)),"none"===s.style.display&&(s.style.display="",this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(e),1)),this.listViewInstance.showCheckBox&&s.classList.contains(h.selected)){this.listViewInstance.removeSelect(),this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(e),1);var n=s.querySelector("."+h.checkboxWrapper);n.removeAttribute("aria-checked"),n.firstElementChild.classList.remove(h.checked),s.classList.contains(h.focused)&&(s.classList.remove(h.focused),this.activeIndex=void 0)}else s.classList.contains(h.selected)&&(this.listViewInstance.removeSelect(),this.activeIndex=void 0);parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)?parseFloat(this.bottomElement.style.height)?(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)-this.listItemHeight+"px",this.updateUI(s,this.uiLastIndex,this.bottomElement)):(this.topElement.style.height=parseFloat(this.topElement.style.height)-this.listItemHeight+"px",this.updateUI(s,this.uiFirstIndex-1,this.topElement.nextSibling),this.uiLastIndex--,this.uiFirstIndex--):this.updateUI(s,this.uiLastIndex,this.bottomElement)}this.changeUiIndices(e,!1),this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},s.prototype.changeUiIndices=function(e,t){for(var i=Object.keys(this.uiIndices),s=0;s<i.length;s++)this.uiIndices[i[s]]=this.uiIndices[i[s]].map(function(i){return i>=e?t?++i:--i:i})},s.prototype.addItem=function(e,t,i){for(var s=0;s<e.length;s++){var n=e[s];if(i.push(n),this.listViewInstance.setViewDataSource(i),this.domItemCount)if(this.domItemCount<this.expectedDomItemCount){if(this.listViewInstance.findItemFromDS(i,t)instanceof Array){if(this.listViewInstance.ulElement){l=this.listViewInstance.curViewDS.indexOf(n);this.createAndInjectNewItem(n,l),(r=this.listViewInstance.curViewDS[l-1])&&r.isHeader&&1===r.items.length&&(--l,this.createAndInjectNewItem(r,l))}this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li")}}else{var l=this.listViewInstance.curViewDS.indexOf(n);this.addUiItem(l);var r=this.listViewInstance.curViewDS[l-1];r&&r.isHeader&&1===r.items.length&&this.addUiItem(l-1)}else!this.listViewInstance.template&&!this.listViewInstance.groupTemplate||this.isNgTemplate()||(this.listViewInstance.listBaseOption.template=null,this.listViewInstance.listBaseOption.groupTemplate=null,this.listViewInstance.listBaseOption.itemCreated=this.createUIItem.bind(this)),this.uiVirtualization()}},s.prototype.createAndInjectNewItem=function(t,i){var s,n=e.ListBase.createListItemFromJson(this.listViewInstance.createElement,[t],this.listViewInstance.listBaseOption,null,null,this);s=Object.keys(this.listViewInstance.curViewDS).length-1===i?this.listViewInstance.curUL.lastElementChild:this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[i+1])||this.listViewInstance.getLiFromObjOrElement(this.listViewInstance.curViewDS[i+2]),this.listViewInstance.ulElement.insertBefore(n[0],s),this.domItemCount++,this.bottomElementHeight<=0&&this.uiLastIndex++,this.refreshItemHeight()},s.prototype.createUIItem=function(e){var i=this.listViewInstance.template,s=this.listViewInstance.createElement("div"),n='<div class="e-text-content" role="presentation"> <span class="e-list-text"> ${'+this.listViewInstance.fields.text+"} </span></div>";if(this.listViewInstance.showCheckBox){if(this.listViewInstance.renderCheckbox(e),!t.isNullOrUndefined(this.listViewInstance.virtualCheckBox)&&!t.isNullOrUndefined(this.listViewInstance.virtualCheckBox.outerHTML)){var l=document.createElement("div");l.innerHTML=this.listViewInstance.template||n,l.children[0].classList.add("e-checkbox"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].classList.add("e-checkbox-left"):l.children[0].classList.add("e-checkbox-right"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].insertBefore(this.listViewInstance.virtualCheckBox,l.childNodes[0].children[0]):l.children[0].appendChild(this.listViewInstance.virtualCheckBox),this.listViewInstance.template=l.innerHTML}s.innerHTML=this.listViewInstance.template,this.listViewInstance.template=i}else s.innerHTML=this.listViewInstance.template||n;var r=s.getElementsByTagName("*"),a=this.listViewInstance.createElement("div");this.listViewInstance.fields.groupBy&&(a.innerHTML=this.listViewInstance.groupTemplate||n);var o=a.getElementsByTagName("*");e.curData.isHeader&&(this.headerData=e.curData),this.templateData=e.curData.isHeader?e.curData.items[0]:e.curData,e.item.innerHTML="",e.item.context={data:e.curData,nodes:{flatTemplateNodes:[],groupTemplateNodes:[]}};for(c=0;c<r.length;c++)this.compileTemplate(r[c],e.item,!1);for(var c=0;c<o.length;c++)this.compileTemplate(o[c],e.item,!0);e.item.context.template=e.curData.isHeader?s.firstElementChild:a.firstElementChild,e.item.context.type=e.curData.isHeader?"flatList":"groupList";var h=e.curData.isHeader?a:s;e.item.insertBefore(h.firstElementChild,null)},s.prototype.compileTemplate=function(e,t,i){this.textProperty(e,t,i),this.classProperty(e,t,i),this.attributeProperty(e,t,i)},s.prototype.onChange=function(e,i){i.context.data=e;var s=i.context.nodes.groupTemplateNodes,n=i.context.nodes.flatTemplateNodes;if(!t.isNullOrUndefined(e.isHeader)&&e.isHeader&&"groupList"===i.context.type){l=i.firstElementChild;t.detach(i.firstElementChild),i.insertBefore(i.context.template,null),i.context.template=l,i.context.type="flatList";for(r=0;r<s.length;r++)s[r].onChange(e)}else if(e.isHeader||"flatList"!==i.context.type)if(e.isHeader)for(r=0;r<s.length;r++)s[r].onChange(e);else for(r=0;r<n.length;r++)n[r].onChange(e);else{var l=i.firstElementChild;t.detach(i.firstElementChild),i.insertBefore(i.context.template,null),i.context.template=l,i.context.type="groupList";for(var r=0;r<n.length;r++)n[r].onChange(e)}},s.prototype.updateContextData=function(e,t,i){i?e.context.nodes.groupTemplateNodes.push(t):e.context.nodes.flatTemplateNodes.push(t)},s.prototype.classProperty=function(e,i,s){for(var n,l=new RegExp("\\${([^}]*)}","g"),r=[];null!==n;){var a=l.exec(e.className);r.push(a),null===(n=a)&&r.pop()}if(r&&r.length)for(var o=this,c=0;c<r.length;c++)!function(n){var l,a=r[n];l=-1!==a[1].indexOf("?")&&-1!==a[1].indexOf(":")?new Function("data","return "+a[1].replace(/\$/g,"data.")):new Function("data","return data."+a[1]);var c={};c.bindedvalue=l(s?o.headerData:o.templateData),c.onChange=function(i){c.bindedvalue&&t.removeClass([e],c.bindedvalue.split(" ").filter(function(e){return e}));var s=l(i);s&&t.addClass([e],s.split(" ").filter(function(e){return e})),c.bindedvalue=s};for(var h=a[0].split(" "),d=0;d<h.length;d++)e.classList.remove(h[d]);c.bindedvalue&&t.addClass([e],c.bindedvalue.split(" ").filter(function(e){return e})),o.updateContextData(i,c,s)}(c)},s.prototype.attributeProperty=function(e,t,i){for(var s=[],n=0;n<e.attributes.length;n++)s.push(e.attributes[n].nodeName);-1!==s.indexOf("class")&&s.splice(s.indexOf("class"),1);for(var l=this,n=0;n<s.length;n++)!function(n){var r,a,o=s[n],c=new RegExp("\\${([^}]*)}","g").exec(o)||[],h=new RegExp("\\${([^}]*)}","g").exec(e.getAttribute(o))||[];if(c.length||h.length){c[1]&&(r=new Function("data","return data."+c[1])),h[1]&&(a=-1!==h[1].indexOf("?")&&-1!==h[1].indexOf(":")?new Function("data","return "+h[1].replace(/\$/g,"data.")):new Function("data","return data."+h[1]));var d={};d.bindedvalue=i?[void 0===c[1]?void 0:r(l.headerData),void 0===h[1]?void 0:a(l.headerData)]:[void 0===c[1]?void 0:r(l.templateData),void 0===h[1]?void 0:a(l.templateData)],d.attrName=void 0===d.bindedvalue[0]?o:d.bindedvalue[0],d.onChange=function(t){var i=void 0===d.bindedvalue[1]?e.getAttribute(d.attrName):a(t);e.removeAttribute(d.attrName),d.attrName=void 0===d.bindedvalue[0]?d.attrName:r(t),e.setAttribute(d.attrName,i),d.bindedvalue=[void 0===d.bindedvalue[0]?void 0:r(t),void 0===d.bindedvalue[1]?void 0:a(t)]};var u=void 0===d.bindedvalue[1]?e.getAttribute(o):d.bindedvalue[1];e.removeAttribute(o),e.setAttribute(d.attrName,u),l.updateContextData(t,d,i)}}(n)},s.prototype.textProperty=function(e,t,i){for(var s,n=new RegExp("\\${([^}]*)}","g"),l=[];null!==s;){var r=n.exec(e.innerText);l.push(r),null===(s=r)&&l.pop()}var a=Array.prototype.some.call(e.children,function(e){return!!new RegExp("\\${([^}]*)}","g").exec(e.innerText)});if(l&&l.length&&!a)for(var o=this,c=0;c<l.length;c++)!function(s){var n,r=l[s],a={};n=-1!==r[1].indexOf("?")&&-1!==r[1].indexOf(":")?new Function("data","return "+r[1].replace(/\$/g,"data.")):new Function("data","return data."+r[1]),a.bindedvalue=n(i?o.headerData:o.templateData),a.onChange=function(t){e.innerText=e.innerText.replace(a.bindedvalue,n(t)),a.bindedvalue=n(t)},e.innerText=e.innerText.replace(r[0],a.bindedvalue),o.updateContextData(t,a,i)}(c)},s.prototype.reRenderUiVirtualization=function(){this.wireScrollEvent(!0),this.listViewInstance.contentContainer&&t.detach(this.listViewInstance.contentContainer),this.listViewInstance.preRender(),this.domItemCount=0,this.listViewInstance.header(),this.listViewInstance.setLocalData()},s.prototype.updateUI=function(t,i,s){var n=this.isNgTemplate()?this.onNgChange:this.onChange;if(this.listViewInstance.template||this.listViewInstance.groupTemplate){var l=this.listViewInstance.curViewDS[i];t.dataset.uid=l[this.listViewInstance.fields.id]?l[this.listViewInstance.fields.id]:e.ListBase.generateId(),n(l,t,this)}else this.updateUiContent(t,i);this.changeElementAttributes(t,i),s&&this.listViewInstance.ulElement.insertBefore(t,s)},s.prototype.onNgChange=function(e,i,s){for(var n=t.compile(s.listViewInstance.template)(e);i.lastChild;)i.removeChild(i.lastChild);i.appendChild(n[0])},s.prototype.getModuleName=function(){return"virtualization"},s.prototype.destroy=function(){this.wireScrollEvent(!0)},s}(),m=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),f=function(e,t,i,s){var n,l=arguments.length,r=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(l<3?n(r):l>3?n(t,i,r):n(t,i))||r);return l>3&&r&&Object.defineProperty(t,i,r),r},v=function(e){function i(i,s){var n=e.call(this,s,i)||this;return n.getHelper=function(e){var i=n.getSortableElement(e.sender.target);if(!n.isValidTarget(i,n))return!1;var s;return n.helper?s=n.helper({sender:i,element:e.element}):((s=i.cloneNode(!0)).style.width=i.offsetWidth+"px",s.style.height=i.offsetHeight+"px"),t.addClass([s],["e-sortableclone"]),t.removeClass([s],["e-listboxtool-container"]),document.body.appendChild(s),s},n.onDrag=function(e){n.trigger("drag",{event:e.event,element:n.element,target:e.target});var i=n.getSortableInstance(e.target),s=n.getSortableElement(e.target,i);if((n.isValidTarget(s,i)||e.target.className.indexOf("e-list-group-item")>-1)&&(n.curTarget!==s||!t.isNullOrUndefined(i.placeHolder))&&(!i.placeHolderElement||i.placeHolderElement!==e.target)){if(e.target.className.indexOf("e-list-group-item")>-1&&(s=e.target),n.curTarget=s,n.target===s)return;var l=n.getIndex(i.placeHolderElement,i),r=n.getPlaceHolder(s,i),a=void 0;if(r){l=t.isNullOrUndefined(l)?n.getIndex(n.target):l,a=n.getIndex(s,i,e.event);var o=n.isPlaceHolderPresent(i);if(o&&l===a)return;o&&t.remove(i.placeHolderElement),i.placeHolderElement=r,e.target.className.indexOf("e-list-group-item")>-1?i.element.insertBefore(i.placeHolderElement,i.element.children[a]):i.element!==n.element&&a===i.element.childElementCount?i.element.appendChild(i.placeHolderElement):i.element.insertBefore(i.placeHolderElement,i.element.children[a]),n.refreshDisabled(l,a,i)}else{l=t.isNullOrUndefined(l)?n.getIndex(n.target):n.getIndex(s,i)<l||!l?l:l-1,a=n.getIndex(s,i);var c=i.element!==n.element?a:l<a?a+1:a;n.updateItemClass(i),i.element.insertBefore(n.target,i.element.children[c]),n.refreshDisabled(l,a,i),n.curTarget=n.target,n.trigger("drop",{droppedElement:n.target,element:i.element,previousIndex:l,currentIndex:a,target:e.target,helper:document.getElementsByClassName("e-sortableclone")[0],event:e.event,scope:n.scope})}}if(i=n.getSortableInstance(n.curTarget),t.isNullOrUndefined(s)&&e.target!==i.placeHolderElement)n.isPlaceHolderPresent(i)&&n.removePlaceHolder(i);else{var h;[].slice.call(document.getElementsByClassName("e-sortable-placeholder")).forEach(function(e){(h=n.getSortableInstance(e)).element&&h!==i&&n.removePlaceHolder(h)})}},n.onDragStart=function(e){n.target=n.getSortableElement(e.target);var i=!1;n.target.classList.add("e-grabbed"),n.curTarget=n.target,e.helper=document.getElementsByClassName("e-sortableclone")[0];var s={cancel:!1,element:n.element,target:n.target};n.trigger("beforeDragStart",s,function(t){t.cancel&&(i=t.cancel,n.onDragStop(e))}),i||(t.isBlazor?n.trigger("dragStart",{event:e.event,element:n.element,target:n.target,bindEvents:e.bindEvents,dragElement:e.dragElement}):n.trigger("dragStart",{event:e.event,element:n.element,target:n.target}))},n.onDragStop=function(e){var i,s,l,r=n.getSortableInstance(n.curTarget);i=n.getIndex(n.target);var a=n.isPlaceHolderPresent(r);if(a){var o=n.getIndex(r.placeHolderElement,r),c=n===r&&i-o>0?i-1:i,h={previousIndex:c,currentIndex:n.curTarget===n.target?c:o,target:e.target,droppedElement:n.target,helper:e.helper,cancel:!1,handled:!1};n.trigger("beforeDrop",h,function(s){if(!s.cancel){if(l=s.handled,n.updateItemClass(r),s.handled){var a=n.target.cloneNode(!0);n.target.classList.remove("e-grabbed"),n.target=a}r.element.insertBefore(n.target,r.placeHolderElement);var o=n.getIndex(n.target,r);i=n===r&&i-o>1?i-1:i,n.trigger("drop",{event:e.event,element:r.element,previousIndex:i,currentIndex:o,target:e.target,helper:e.helper,droppedElement:n.target,scopeName:n.scope,handled:l})}t.remove(r.placeHolderElement)})}if(r=n.getSortableInstance(e.target),s=r.element.childElementCount,i=n.getIndex(n.target),r.element===e.target||!a&&n.curTarget===n.target){var d={previousIndex:i,currentIndex:n.curTarget===n.target?i:s,target:e.target,droppedElement:n.target,helper:e.helper,cancel:!1};n.trigger("beforeDrop",d,function(t){r.element!==e.target||t.cancel||(n.updateItemClass(r),r.element.appendChild(n.target),n.trigger("drop",{event:e.event,element:r.element,previousIndex:i,currentIndex:s,target:e.target,helper:e.helper,droppedElement:n.target,scopeName:n.scope}))})}n.target.classList.remove("e-grabbed"),n.target=null,n.curTarget=null,t.remove(e.helper),t.getComponent(n.element,t.Draggable).intDestroy(e.event)},n.bind(),n}m(i,e),s=i,i.prototype.bind=function(){this.element.id||(this.element.id=t.getUniqueID("sortable")),this.itemClass||(this.itemClass="e-sort-item",this.dataBind()),this.initializeDraggable()},i.prototype.initializeDraggable=function(){new t.Draggable(this.element,{helper:this.getHelper,dragStart:this.onDragStart,drag:this.onDrag,dragStop:this.onDragStop,dragTarget:"."+this.itemClass,enableTapHold:!0,tapHoldThreshold:200,queryPositionInfo:this.queryPositionInfo,distance:5})},i.prototype.getPlaceHolder=function(e,t){if(t.placeHolder){var i=t.placeHolder({element:t.element,grabbedElement:this.target,target:e});return i.classList.add("e-sortable-placeholder"),i}return null},i.prototype.isValidTarget=function(e,i){return e&&t.compareElementParent(e,i.element)&&e.classList.contains(i.itemClass)&&!e.classList.contains("e-disabled")},i.prototype.removePlaceHolder=function(e){t.remove(e.placeHolderElement),e.placeHolderElement=null},i.prototype.updateItemClass=function(e){this!==e&&(this.target.classList.remove(this.itemClass),this.target.classList.add(e.itemClass))},i.prototype.getSortableInstance=function(e){if(e=t.closest(e,".e-"+this.getModuleName())){var i=t.getComponent(e,s);return i.scope&&this.scope&&i.scope===this.scope?i:this}return this},i.prototype.refreshDisabled=function(e,t,i){if(i===this)for(var s=void 0,n=e<t,l=void 0,r=n?e:t,a=n?t:e;r<=a;)(s=this.element.children[r]).classList.contains("e-disabled")?(l=this.getIndex(s),this.element.insertBefore(s,this.element.children[n?l+2:l-1]),r=n?l+2:l+1):r++},i.prototype.getIndex=function(e,i,s){void 0===i&&(i=this);var n,l;return[].slice.call(i.element.children).forEach(function(i,r){if(i.classList.contains("e-sortable-placeholder")&&(l=!0),i!==e);else if(n=r,!t.isNullOrUndefined(s)){l&&(n-=1);var a=e.getBoundingClientRect(),o=a.bottom-(a.bottom-a.top)/2;n=s.clientY<=o?n:n+1}}),n},i.prototype.getSortableElement=function(e,i){return void 0===i&&(i=this),t.closest(e,"."+i.itemClass)},i.prototype.queryPositionInfo=function(e){return e.left=pageXOffset?parseFloat(e.left)-pageXOffset+"px":e.left,e.top=pageYOffset?parseFloat(e.top)-pageYOffset+"px":e.top,e},i.prototype.isPlaceHolderPresent=function(e){return e.placeHolderElement&&!!t.closest(e.placeHolderElement,"#"+e.element.id)},i.prototype.moveTo=function(e,t,i){l(this.element,e,t,i)},i.prototype.destroy=function(){"e-sort-item"===this.itemClass&&(this.itemClass=null,this.dataBind()),t.getComponent(this.element,t.Draggable).destroy(),e.prototype.destroy.call(this)},i.prototype.getModuleName=function(){return"sortable"},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"itemClass":[].slice.call(this.element.children).forEach(function(i){i.classList.contains(t.itemClass)&&i.classList.remove(t.itemClass),e.itemClass&&i.classList.add(e.itemClass)})}};var s;return f([t.Property(!1)],i.prototype,"enableAnimation",void 0),f([t.Property(null)],i.prototype,"itemClass",void 0),f([t.Property(null)],i.prototype,"scope",void 0),f([t.Property()],i.prototype,"helper",void 0),f([t.Property()],i.prototype,"placeHolder",void 0),f([t.Event()],i.prototype,"drag",void 0),f([t.Event()],i.prototype,"beforeDragStart",void 0),f([t.Event()],i.prototype,"dragStart",void 0),f([t.Event()],i.prototype,"beforeDrop",void 0),f([t.Event()],i.prototype,"drop",void 0),i=s=f([t.NotifyPropertyChanges],i)}(t.Base);return u.Inject(p),e.classNames=h,e.FieldSettings=d,e.ListView=u,e.Virtualization=p,e.getFieldValues=n,e.Sortable=v,e.moveTo=l,e}({},ej.base,ej.data,ej.buttons),this.ejs=ej;
- /*!
- * filename: ej2-navigations.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.navigations=function(e,t,i,s,n,r,l){"use strict";function o(e,t,i,s,n,r){var l,o,d=t.parentElement;if("vscroll"===s?(l=r||t.getBoundingClientRect().height,o=i.getBoundingClientRect().height):(l=t.getBoundingClientRect().width,o=i.getBoundingClientRect().width),l<o)return a(e,t,i,s,n,r);if(d){var h=d.getBoundingClientRect().width;return h<l&&"hscroll"===s?(o=h,t.style.maxWidth=h+"px",a(e,t,i,s,n,r)):i}return i}function a(e,i,s,n,r,l){var o=e("div",{className:"e-menu-"+n});i.appendChild(o),o.appendChild(s),l?(o.style.overflow="hidden",o.style.height=l+"px"):(o.style.maxHeight=i.style.maxHeight,i.style.overflow="hidden");return"vscroll"===n?new m({enableRtl:r},o).scrollStep=t.select(".e-"+n+"-bar",i).offsetHeight/2:new p({enableRtl:r},o).scrollStep=t.select(".e-"+n+"-bar",i).offsetWidth,o}function d(e,i,s){if(e){var n=t.select(".e-menu-parent",i);n?s&&s!==n||(e.destroy(),i.parentElement.appendChild(n),t.detach(i)):(e.destroy(),t.detach(i))}}var h=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),c=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},p=function(e){function i(t,i){return e.call(this,t,i)||this}return h(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollHandler,this),this.isDevice?(this.element.classList.add("e-scroll-device"),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetWidth,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=this.createElement("div",{className:"e-hscroll-content"}),t=this.createElement("div",{className:"e-hscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,s=0,n=[].slice.call(i.children);s<n.length;s++){var r=n[s];e.appendChild(r)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},i.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},i.prototype.getModuleName=function(){return"hScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",i.classList.remove("e-hscroll"),i.classList.remove("e-scroll-device");var s=t.selectAll(".e-"+i.id+"_nav.e-scroll-nav",i),n=t.selectAll(".e-scroll-overlay",i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var r=0,l=[].slice.call(this.scrollItems.children);r<l.length;r++){var o=l[r];i.appendChild(o)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(.e-overlay)",this.element);e?this.element.classList.add("e-overlay"):this.element.classList.remove("e-overlay"),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),i=this.createElement("div",{className:"e-scroll-overlay e-scroll-right-overlay"}),s="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),n=this.createElement("div",{id:t.concat("_right"),className:s}),r=this.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"});n.appendChild(r);var l=this.createElement("div",{className:"e-scroll-overlay e-scroll-left-overlay"});this.ieCheck&&n.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(n),e.insertBefore(l,e.firstChild),this.eventBinding([n])},i.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),s=this.createElement("div",{id:t.concat("_right"),className:i});s.setAttribute("aria-disabled","false");var n=this.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"}),r="e-"+e.id.concat("_nav e-scroll-nav e-scroll-left-nav"),l=this.createElement("div",{id:t.concat("_left"),className:r+" e-overlay"});l.setAttribute("aria-disabled","true");var o=this.createElement("div",{className:"e-nav-left-arrow e-nav-arrow e-icons"});l.appendChild(o),s.appendChild(n),e.appendChild(s),e.insertBefore(l,e.firstChild),this.ieCheck&&(s.classList.add("e-ie-align"),l.classList.add("e-ie-align")),this.eventBinding([s,l])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)};this.keyTimer=window.setTimeout(function(){i()},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var s=function(){t.eleScrolling(10,i,!0)};this.timeout=window.setInterval(function(){s()},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){var s=this.element,n=t.classList;n.contains("e-scroll-nav")&&(n=t.querySelector(".e-nav-arrow").classList),this.contains(s,"e-rtl")&&this.browserCheck&&(e=-e),!this.contains(s,"e-rtl")||this.browserCheck||this.ieCheck?n.contains("e-nav-right-arrow")?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i):n.contains("e-nav-left-arrow")?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceX/(10*e.velocity):e.distanceX/e.velocity;var s=.5,n=function(){var r=Math.sin(s);r<=0?window.cancelAnimationFrame(r):("Left"===e.swipeDirection?i.scrollLeft+=t*r:"Right"===e.swipeDirection&&(i.scrollLeft-=t*r),s-=.5,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)return void this.scrollUpdating(e,i);this.customStep||[].slice.call(t.selectAll(".e-scroll-overlay",this.element)).forEach(function(t){e-=t.offsetWidth});var r=function(){var t,s;n.contains(n.element,"e-rtl")&&n.browserCheck?(t=-e,s=-10):(t=e,s=10),t<10?window.cancelAnimationFrame(s):(n.scrollUpdating(s,i),e-=s,window.requestAnimationFrame(r))};r()},i.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceX;this.ieCheck&&this.contains(this.element,"e-rtl")&&(i=-i),"Left"===e.scrollDirection?t.scrollLeft=t.scrollLeft+i:"Right"===e.scrollDirection&&(t.scrollLeft=t.scrollLeft-i)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector(".e-nav-arrow");t.isNullOrUndefined(e)?t.classList(s,["e-nav-right-arrow"],["e-nav-left-arrow"]):t.classList(s,["e-nav-left-arrow"],["e-nav-right-arrow"])}else e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove("e-overlay"),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,s=this.element,n=this.element.querySelector(".e-scroll-left-nav"),r=this.element.querySelector(".e-scroll-right-nav"),l=this.element.querySelector(".e-scroll-left-overlay"),o=this.element.querySelector(".e-scroll-right-overlay"),a=t.scrollLeft;if(a<=0&&(a=-a),this.isDevice&&(!this.enableRtl||this.browserCheck||this.ieCheck||(l=this.element.querySelector(".e-scroll-right-overlay"),o=this.element.querySelector(".e-scroll-left-overlay")),l.style.width=a<40?a+"px":"40px",t.scrollWidth-Math.ceil(i+a)<40?o.style.width=t.scrollWidth-Math.ceil(i+a)+"px":o.style.width="40px"),0===a)!this.contains(s,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(n,r):this.arrowDisabling(r,n);else if(Math.ceil(i+a+.1)>=t.scrollWidth)!this.contains(s,"e-rtl")||this.browserCheck||this.ieCheck?this.arrowDisabling(r,n):this.arrowDisabling(n,r);else{var d=this.element.querySelector(".e-scroll-nav.e-overlay");d&&(d.classList.remove("e-overlay"),d.setAttribute("aria-disabled","false"),d.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}},c([t.Property(null)],i.prototype,"scrollStep",void 0),i=c([t.NotifyPropertyChanges],i)}(t.Component),u=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),f=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},m=function(e){function i(t,i){return e.call(this,t,i)||this}return u(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollEventHandler,this),this.isDevice?(this.element.classList.add("e-scroll-device"),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),t.EventHandler.add(this.element,"wheel",this.wheelEventHandler,this)},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=t.createElement("div",{className:"e-vscroll-content"}),i=t.createElement("div",{className:"e-vscroll-bar"});i.setAttribute("tabindex","-1");for(var s=this.element,n=0,r=[].slice.call(s.children);n<r.length;n++){var l=r[n];e.appendChild(l)}i.appendChild(e),s.appendChild(i),i.style.overflowY="hidden",this.scrollEle=i,this.scrollItems=e},i.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},i.prototype.getModuleName=function(){return"vScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",t.removeClass([this.element],["e-vscroll","e-scroll-device"]);var s=t.selectAll(".e-"+i.id+"_nav.e-scroll-nav",i),n=t.selectAll(".e-scroll-overlay",i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var r=0,l=[].slice.call(this.scrollItems.children);r<l.length;r++){var o=l[r];i.appendChild(o)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollEventHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(.e-overlay)",this.element);e?this.element.classList.add("e-overlay"):this.element.classList.remove("e-overlay"),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlayElement=function(e){var i=e.id.concat("_nav"),s=t.createElement("div",{className:"e-scroll-overlay e-scroll-down-overlay"}),n="e-"+e.id.concat("_nav e-scroll-nav e-scroll-down-nav"),r=t.createElement("div",{id:i.concat("down"),className:n}),l=t.createElement("div",{className:"e-nav-down-arrow e-nav-arrow e-icons"});r.appendChild(l);var o=t.createElement("div",{className:"e-scroll-overlay e-scroll-up-overlay"});this.ieCheck&&r.classList.add("e-ie-align"),e.appendChild(s),e.appendChild(r),e.insertBefore(o,e.firstChild),this.eventBinding([r])},i.prototype.createNavIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav e-scroll-nav e-scroll-down-nav"),n=t.createElement("div",{id:i.concat("_down"),className:s});n.setAttribute("aria-disabled","false");var r=t.createElement("div",{className:"e-nav-down-arrow e-nav-arrow e-icons"}),l="e-"+e.id.concat("_nav e-scroll-nav e-scroll-up-nav"),o=t.createElement("div",{id:i.concat("_up"),className:l+" e-overlay"});o.setAttribute("aria-disabled","true");var a=t.createElement("div",{className:"e-nav-up-arrow e-nav-arrow e-icons"});o.appendChild(a),n.appendChild(r),n.setAttribute("tabindex","0"),e.appendChild(n),e.insertBefore(o,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),o.classList.add("e-ie-align")),this.eventBinding([n,o])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)};this.keyTimer=window.setTimeout(function(){i()},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var s=function(){t.eleScrolling(10,i,!0)};this.timeout=window.setInterval(function(){s()},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){var s=t.classList;s.contains("e-scroll-nav")&&(s=t.querySelector(".e-nav-arrow").classList),s.contains("e-nav-down-arrow")?this.frameScrollRequest(e,"add",i):s.contains("e-nav-up-arrow")&&this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.wheelEventHandler=function(e){e.preventDefault(),this.frameScrollRequest(this.scrollStep,e.deltaY>0?"add":"",!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceY/(10*e.velocity):e.distanceY/e.velocity;var s=.5,n=function(){var r=Math.sin(s);r<=0?window.cancelAnimationFrame(r):("Up"===e.swipeDirection?i.scrollTop+=t*r:"Down"===e.swipeDirection&&(i.scrollTop-=t*r),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollTop+=e:this.scrollEle.scrollTop-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)return void this.scrollUpdating(e,i);this.customStep||[].slice.call(t.selectAll(".e-scroll-overlay",this.element)).forEach(function(t){e-=t.offsetHeight});var r=function(){e<10?window.cancelAnimationFrame(10):(n.scrollUpdating(10,i),e-=10,window.requestAnimationFrame(r))};r()},i.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceY;"Up"===e.scrollDirection?t.scrollTop=t.scrollTop+i:"Down"===e.scrollDirection&&(t.scrollTop=t.scrollTop-i)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector(".e-nav-arrow");t.isNullOrUndefined(e)?t.classList(s,["e-nav-down-arrow"],["e-nav-up-arrow"]):t.classList(s,["e-nav-up-arrow"],["e-nav-down-arrow"])}else e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove("e-overlay"),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollEventHandler=function(e){var t=e.target,i=t.offsetHeight,s=this.element.querySelector(".e-scroll-up-nav"),n=this.element.querySelector(".e-scroll-down-nav"),r=this.element.querySelector(".e-scroll-up-overlay"),l=this.element.querySelector(".e-scroll-down-overlay"),o=t.scrollTop;if(o<=0&&(o=-o),this.isDevice&&(r.style.height=o<40?o+"px":"40px",t.scrollHeight-Math.ceil(i+o)<40?l.style.height=t.scrollHeight-Math.ceil(i+o)+"px":l.style.height="40px"),0===o)this.arrowDisabling(s,n);else if(Math.ceil(i+o+.1)>=t.scrollHeight)this.arrowDisabling(n,s);else{var a=this.element.querySelector(".e-scroll-nav.e-overlay");a&&(a.classList.remove("e-overlay"),a.setAttribute("aria-disabled","false"),a.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}},f([t.Property(null)],i.prototype,"scrollStep",void 0),i=f([t.NotifyPropertyChanges],i)}(t.Component),v=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),g=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},y="e-focused",b="e-menu-header",C="e-selected",N="e-menu-item",E="e-menu-hide",x="e-menu-popup",O=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return v(i,e),g([t.Property("id")],i.prototype,"itemId",void 0),g([t.Property("parentId")],i.prototype,"parentId",void 0),g([t.Property("text")],i.prototype,"text",void 0),g([t.Property("iconCss")],i.prototype,"iconCss",void 0),g([t.Property("url")],i.prototype,"url",void 0),g([t.Property("separator")],i.prototype,"separator",void 0),g([t.Property("items")],i.prototype,"children",void 0),i}(t.ChildProperty),S=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return v(i,e),g([t.Property(null)],i.prototype,"iconCss",void 0),g([t.Property("")],i.prototype,"id",void 0),g([t.Property(!1)],i.prototype,"separator",void 0),g([t.Collection([],i)],i.prototype,"items",void 0),g([t.Property("")],i.prototype,"text",void 0),g([t.Property("")],i.prototype,"url",void 0),i}(t.ChildProperty),w=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return v(i,e),g([t.Property("SlideDown")],i.prototype,"effect",void 0),g([t.Property(400)],i.prototype,"duration",void 0),g([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),I=function(e){function n(i,s){var n=e.call(this,i,s)||this;return n.navIdx=[],n.animation=new t.Animation({}),n.isTapHold=!1,n.tempItem=[],n.showSubMenuOn="Auto",n}return v(n,e),n.prototype.preRender=function(){if(!this.isMenu){r=void 0;if("EJS-CONTEXTMENU"===this.element.tagName){r=this.createElement("ul",{id:t.getUniqueID(this.getModuleName()),className:"e-control e-lib e-"+this.getModuleName()});var e=t.getValue("ej2_instances",this.element);t.removeClass([this.element],["e-control","e-lib","e-"+this.getModuleName()]),this.clonedElement=this.element,this.element=r,t.setValue("ej2_instances",e,this.element)}else{r=this.createElement("ul",{id:t.getUniqueID(this.getModuleName())}),t.append([].slice.call(this.element.cloneNode(!0).children),r);var i=this.element.nextElementSibling;i?this.element.parentElement.insertBefore(r,i):this.element.parentElement.appendChild(r),this.clonedElement=r}this.clonedElement.style.display="none"}if("EJS-MENU"===this.element.tagName){for(var s=this.element,n=t.getValue("ej2_instances",s),r=this.createElement("ul"),l=this.createElement("EJS-MENU",{className:"e-"+this.getModuleName()+"-wrapper"}),o=0,a=s.attributes.length;o<a;o++)r.setAttribute(s.attributes[o].nodeName,s.attributes[o].nodeValue);s.parentNode.insertBefore(l,s),t.detach(s),s=r,l.appendChild(s),t.setValue("ej2_instances",n,s),this.clonedElement=l,this.element=s,this.element.id||(this.element.id=t.getUniqueID(this.getModuleName()))}},n.prototype.render=function(){var e=this;if(this.initialize(),this.renderItems(),this.isMenu&&this.template&&t.isBlazor()){var i=this.element.id+"Template";t.resetBlazorTemplate(i,"Template"),Object.keys(t.blazorTemplates).length&&t.extend(this.tempItem,t.blazorTemplates[i],[],!0),t.updateBlazorTemplate(i,"Template",this)}this.wireEvents(),this.renderComplete();var s=this.getWrapper();this.template&&this.enableScrolling&&(this.isReact||this.isAngular)&&requestAnimationFrame(function(){o(e.createElement,s,e.element,"hscroll",e.enableRtl)})},n.prototype.initialize=function(){var e=this.getWrapper();e||(e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.isMenu?this.element.parentElement.insertBefore(e,this.element):document.body.appendChild(e)),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),this.enableRtl&&e.classList.add("e-rtl"),e.appendChild(this.element),this.isMenu&&this.hamburgerMode&&(this.target||this.createHeaderContainer(e)),this.defaultOption=this.showItemOnClick},n.prototype.renderItems=function(){if(!this.items.length){var e=i.ListBase.createJsonFromElement(this.element,{fields:{child:"items"}});this.setProperties({items:e},!0),t.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML=""}var s=this.createItems(this.items);if(t.append(Array.prototype.slice.call(s.children),this.element),this.element.classList.add("e-menu-parent"),this.isMenu&&(!this.hamburgerMode&&this.element.classList.contains("e-vertical")&&this.setBlankIconStyle(this.element),this.enableScrolling)){var n=this.getWrapper();this.element.classList.contains("e-vertical")?o(this.createElement,n,this.element,"vscroll",this.enableRtl):o(this.createElement,n,this.element,"hscroll",this.enableRtl)}},n.prototype.wireEvents=function(){var e=this.getWrapper();if(this.target){for(var i=void 0,n=t.selectAll(this.target),r=0,l=n.length;r<l;r++)i=n[r],this.isMenu?t.EventHandler.add(i,"click",this.menuHeaderClickHandler,this):t.Browser.isIos?new t.Touch(i,{tapHold:this.touchHandler.bind(this)}):t.EventHandler.add(i,"contextmenu",this.cmenuHandler,this);if(this.targetElement=i,!this.isMenu){t.EventHandler.add(this.targetElement,"scroll",this.scrollHandler,this);for(var o=0,a=s.getScrollableParent(this.targetElement);o<a.length;o++){var d=a[o];t.EventHandler.add(d,"scroll",this.scrollHandler,this)}}}t.Browser.isDevice||(this.delegateMoverHandler=this.moverHandler.bind(this),this.delegateMouseDownHandler=this.mouseDownHandler.bind(this),t.EventHandler.add(this.isMenu?document:e,"mouseover",this.delegateMoverHandler,this),t.EventHandler.add(document,"mousedown",this.delegateMouseDownHandler,this)),this.delegateClickHandler=this.clickHandler.bind(this),t.EventHandler.add(document,"click",this.delegateClickHandler,this),this.wireKeyboardEvent(e),this.rippleFn=t.rippleEffect(e,{selector:"."+N})},n.prototype.wireKeyboardEvent=function(e){var i={downarrow:"downarrow",uparrow:"uparrow",enter:"enter",leftarrow:"leftarrow",rightarrow:"rightarrow",escape:"escape"};this.isMenu&&(i.home="home",i.end="end"),new t.KeyboardEvents(e,{keyAction:this.keyBoardHandler.bind(this),keyConfigs:i})},n.prototype.mouseDownHandler=function(e){t.closest(e.target,".e-"+this.getModuleName()+"-wrapper")===this.getWrapper()||t.closest(e.target,".e-"+this.getModuleName()+"-popup")||this.closeMenu(this.isMenu?null:this.navIdx.length,e)},n.prototype.keyBoardHandler=function(e){var i="",s=e.target,n=this.isMenu&&!this.hamburgerMode&&!this.element.classList.contains("e-vertical")&&this.navIdx.length<1;if(e.preventDefault(),this.enableScrolling&&13===e.keyCode&&s.classList.contains("e-scroll-nav")&&this.removeLIStateByClass([y,C],[t.closest(s,".e-"+this.getModuleName()+"-wrapper")]),n)switch(e.action){case"rightarrow":i="rightarrow",e.action="downarrow";break;case"leftarrow":i="leftarrow",e.action="uparrow";break;case"downarrow":i="downarrow",e.action="rightarrow";break;case"uparrow":i="uparrow",e.action=""}else if(this.enableRtl)switch(e.action){case"leftarrow":n=!0,i="leftarrow",e.action="rightarrow";break;case"rightarrow":n=!0,i="rightarrow",e.action="leftarrow"}switch(e.action){case"downarrow":case"uparrow":case"end":case"home":this.upDownKeyHandler(e);break;case"rightarrow":this.rightEnterKeyHandler(e);break;case"leftarrow":this.leftEscKeyHandler(e);break;case"enter":this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):this.rightEnterKeyHandler(e);break;case"escape":this.leftEscKeyHandler(e)}n&&(e.action=i)},n.prototype.upDownKeyHandler=function(e){var t=this.getUlByNavIdx(),i="downarrow"===e.action||"home"===e.action?0:t.childElementCount-1,s=i,n=this.getLIByClass(t,y);n&&("end"!==e.action&&"home"!==e.action&&(s=this.getIdx(t,n)),n.classList.remove(y),"end"!==e.action&&"home"!==e.action&&("downarrow"===e.action?s++:s--,s===("downarrow"===e.action?t.childElementCount:-1)&&(s=i)));var r=t.children[s];s=this.isValidLI(r,s,e.action),t.children[s].classList.add(y),t.children[s].focus()},n.prototype.isValidLI=function(e,t,i){var s=this.getUlByNavIdx();return(e.classList.contains("e-separator")||e.classList.contains("e-disabled")||e.classList.contains(E))&&("downarrow"===i||"rightarrow"===i?t++:t--),((e=s.children[t]).classList.contains("e-separator")||e.classList.contains("e-disabled")||e.classList.contains(E))&&(t=this.isValidLI(e,t,i)),t},n.prototype.getUlByNavIdx=function(e){if(void 0===e&&(e=this.navIdx.length),this.isMenu){var i=[this.getWrapper()].concat([].slice.call(t.selectAll("."+x)))[e];return t.isNullOrUndefined(i)?null:t.select(".e-menu-parent",i)}return this.getWrapper().children[e]},n.prototype.rightEnterKeyHandler=function(e){var t,i=this.getUlByNavIdx(),s=this.getLIByClass(i,y);if(s){var n=this.getIdx(i,s),r=this.navIdx.concat(n),l=this.getItem(r);l.items.length?(this.navIdx.push(n),this.keyType="right",this.action=e.action,this.openMenu(s,l,-1,-1,e)):"enter"===e.action&&(this.isMenu&&0===this.navIdx.length?this.removeLIStateByClass([C],[this.getWrapper()]):s.classList.remove(y),s.classList.add(C),t={element:s,item:l,event:e},this.trigger("select",t),this.closeMenu(null,e))}},n.prototype.leftEscKeyHandler=function(e){this.navIdx.length?(this.keyType="left",this.closeMenu(this.navIdx.length,e)):"escape"===e.action&&this.closeMenu(null,e)},n.prototype.scrollHandler=function(e){this.closeMenu(null,e)},n.prototype.touchHandler=function(e){this.isTapHold=!0,this.cmenuHandler(e.originalEvent)},n.prototype.cmenuHandler=function(e){e.preventDefault(),this.isCMenu=!0,this.pageX=e.changedTouches?e.changedTouches[0].pageX+1:e.pageX+1,this.pageY=e.changedTouches?e.changedTouches[0].pageY+1:e.pageY+1,this.closeMenu(null,e),this.isCMenu&&(this.canOpen(e.target)&&this.openMenu(null,null,this.pageY,this.pageX,e),this.isCMenu=!1)},n.prototype.closeMenu=function(e,i,n){var r=this;if(void 0===e&&(e=0),void 0===i&&(i=null),this.isMenuVisible()){var l,o,a=void 0,h=this.getWrapper(),c=void 0,p=this.getPopups(),u=!1,f=this.isMenu?p.length+1:h.childElementCount,v=this.isMenu&&1!==f?t.select(".e-ul",p[f-2]):t.selectAll(".e-menu-parent",h)[f-1];if(this.isMenu&&v.classList.contains("e-menu")&&((a=this.getLIByClass(v,C))&&a.classList.remove(C),u=!0),!u){var g=i&&i.target&&this.getLI(i.target);l=this.navIdx.length?this.getItem(this.navIdx):null,o=l?l.items:this.items,c={element:v,parentItem:this.isMenu&&t.isBlazor()?this.getMenuItemModel(l,e):l,items:o,event:i,cancel:!1,isFocused:!0},this.trigger("beforeClose",c,function(a){var h,c,p,u="",f=!a.cancel;(f||r.isCMenu)&&(r.isMenu?(h=t.closest(v,"."+x),r.hamburgerMode&&(h.parentElement.style.minHeight="",t.closest(v,".e-menu-item").setAttribute("aria-expanded","false")),r.unWireKeyboardEvent(h),d(t.getInstance(h.children[0],m),h.children[0]),(p=t.getInstance(h,s.Popup)).hide(),u=h.id,p.destroy(),t.detach(h)):r.toggleAnimation(v,!1),c={element:v,parentItem:l,items:o},r.trigger("onClose",c),r.navIdx.pop()),r.updateReactTemplate();var b,N,E,O=r.getWrapper()&&r.getUlByNavIdx();r.isCMenu&&(r.canOpen(i.target)&&r.openMenu(null,null,r.pageY,r.pageX,i),r.isCMenu=!1),r.isMenu&&O&&u.length&&(b=new RegExp("(.*)-ej2menu-"+r.element.id+"-popup").exec(u)[1],N=O.querySelector('[id="'+b+'"]'),E=g&&O.querySelector('[id="'+g.id+'"]'));var S=g&&g.querySelectorAll(".e-menu-item");if(f&&r.hamburgerMode&&e&&!S.length)r.afterCloseMenu(i);else if(f&&!r.hamburgerMode&&r.navIdx.length&&N&&!E){var w=i&&i.target.classList.contains("e-vscroll")?t.closest(i.target,".e-menu-wrapper"):null;w?(w=w.querySelector(".e-menu-item"),(r.showItemOnClick||w&&r.getIndex(w.id,!0).length<=r.navIdx.length)&&r.closeMenu(r.navIdx[r.navIdx.length-1],i,!0)):r.closeMenu(r.navIdx[r.navIdx.length-1],i)}else if(f&&!n&&!e&&(r.hamburgerMode&&r.navIdx.length||1===r.navIdx.length))r.closeMenu(null,i);else if(f&&t.isNullOrUndefined(e)&&r.navIdx.length)r.closeMenu(null,i);else if(!f||r.isMenu||e||0!==r.navIdx.length||r.isMenusClosed)if(f&&r.isMenu&&i&&i.target&&0!==r.navIdx.length&&t.closest(i.target,".e-menu-parent.e-control"))r.closeMenu(0,i);else{if(!f||"right"!==r.keyType&&"click"!==r.keyType){var I=r.getUlByNavIdx(),k=r.getLIByClass(I,C);if(k&&(k.setAttribute("aria-expanded","false"),k.classList.remove(C),a.isFocused&&g&&(k.classList.add(y),k.focus())),!f&&r.hamburgerMode&&g&&"false"===g.getAttribute("aria-expanded")&&"true"===g.getAttribute("aria-haspopup")){t.closest(g,".e-menu-parent.e-control")?r.navIdx=[]:r.navIdx.pop(),r.navIdx.push(r.cliIdx);var L=r.getItem(r.navIdx);g.setAttribute("aria-expanded","true"),r.openMenu(g,L,-1,-1,i)}}else r.afterCloseMenu(i);r.navIdx.length<1&&("Hover"!==r.showSubMenuOn&&"Click"!==r.showSubMenuOn||(r.showItemOnClick=r.defaultOption,r.showSubMenuOn="Auto"))}else r.isMenusClosed=!0,r.closeMenu(0,i);r.removeStateWrapper()})}}},n.prototype.updateReactTemplate=function(){if(this.isReact&&this.template&&0===this.navIdx.length){var e=this.portals.splice(0,this.items.length);this.clearTemplate(["template"]),this.portals=e,this.renderReactTemplates()}},n.prototype.getMenuItemModel=function(e,i){if(t.isNullOrUndefined(e))return null;t.isNullOrUndefined(i)&&(i=0);var s=this.getFields(i);return{text:e[s.text],id:e[s.id],items:e[s.child],separator:e[s.separator],iconCss:e[s.iconCss],url:e[s.url]}},n.prototype.getPopups=function(){var e=this,i=[];return[].slice.call(document.querySelectorAll("."+x)).forEach(function(s){!t.isNullOrUndefined(s.querySelector("."+N))&&e.getIndex(s.querySelector("."+N).id,!0).length&&i.push(s)}),i},n.prototype.isMenuVisible=function(){return this.navIdx.length>0||this.element.classList.contains("e-contextmenu")&&t.isVisible(this.element).valueOf()},n.prototype.canOpen=function(e){var i=!0;if(this.filter){i=!1;for(var s=this.filter.split(" "),n=0,r=s.length;n<r;n++)if(t.closest(e,"."+s[n])){i=!0;break}}return i},n.prototype.openMenu=function(e,i,n,r,l,o){var a=this;void 0===n&&(n=0),void 0===r&&(r=0),void 0===l&&(l=null),void 0===o&&(o=this.targetElement);var d=this.getWrapper();this.lItem=e;var h=""!==this.element.id?this.element.id:"menu";if(this.isMenusClosed=!1,t.isNullOrUndefined(n)&&(n=-1),t.isNullOrUndefined(r)&&(r=-1),e){if(this.uList=this.createItems(i[this.getField("children",this.navIdx.length-1)]),!this.isMenu&&t.Browser.isDevice){d.lastChild.style.display="none";var c={text:i[this.getField("text")].toString(),iconCss:"e-icons e-previous"},p=new S(this.items[0],"items",c,!0),u=this.createItems([p]).children[0];u.classList.add(b),this.uList.insertBefore(u,this.uList.children[0])}this.isMenu?(this.popupWrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper "+x,id:e.id+"-ej2menu-"+h+"-popup"}),this.hamburgerMode?(n=e.offsetHeight,e.appendChild(this.popupWrapper)):document.body.appendChild(this.popupWrapper),this.isNestedOrVertical=this.element.classList.contains("e-vertical")||1!==this.navIdx.length,this.popupObj=this.generatePopup(this.popupWrapper,this.uList,e,this.isNestedOrVertical),this.template&&this.renderReactTemplates(),this.hamburgerMode?this.calculateIndentSize(this.uList,e):(this.cssClass&&t.addClass([this.popupWrapper],this.cssClass.split(" ")),this.popupObj.hide()),this.hamburgerMode||this.showItemOnClick||!this.hoverDelay?this.triggerBeforeOpen(e,this.uList,i,l,0,0,"menu"):(window.clearInterval(this.timer),this.timer=window.setTimeout(function(){a.triggerBeforeOpen(e,a.uList,i,l,0,0,"menu")},this.hoverDelay))):(this.uList.style.zIndex=this.element.style.zIndex,d.appendChild(this.uList),!this.showItemOnClick&&this.hoverDelay?(window.clearInterval(this.timer),this.timer=window.setTimeout(function(){a.triggerBeforeOpen(e,a.uList,i,l,n,r,"none")},this.hoverDelay)):this.triggerBeforeOpen(e,this.uList,i,l,n,r,"none"))}else this.uList=this.element,this.uList.style.zIndex=s.getZindexPartial(o||this.element).toString(),this.triggerBeforeOpen(e,this.uList,i,l,n,r,"none");if(this.isMenu&&this.template&&t.isBlazor()){var f=this.element.id+"Template";if(Object.keys(t.blazorTemplates).length){var m=t.blazorTemplates[f];this.tempItem=this.tempItem.concat(m),t.blazorTemplates[f]=this.tempItem}t.updateBlazorTemplate(f,"Template",this)}},n.prototype.calculateIndentSize=function(e,t){var i=getComputedStyle(t),s=parseInt(i.textIndent,10);this.navIdx.length<2&&!t.classList.contains("e-blankicon")?s*=2:s+=s/4,e.style.textIndent=s+"px";var n=e.querySelectorAll(".e-blankicon");if(n&&n.length)for(var r=e.querySelector(".e-menu-icon"),l=getComputedStyle(r),o=parseInt(l.marginRight,10)+r.offsetWidth+s,a=0;a<n.length;a++)n[a].style.textIndent=o+"px"},n.prototype.generatePopup=function(e,i,n,r){var l=this,o=new s.Popup(e,{actionOnScroll:this.hamburgerMode?"none":"reposition",relateTo:n,collision:this.hamburgerMode?{X:"none",Y:"none"}:{X:r||this.enableRtl?"none":"flip",Y:"fit"},position:r&&!this.hamburgerMode?{X:"right",Y:"top"}:{X:"left",Y:"bottom"},targetType:"relative",enableRtl:this.enableRtl,content:i,open:function(){var e=t.select(".e-menu-vscroll",o.element);e&&(e.style.height="inherit",e.style.maxHeight="");var i=t.select(".e-ul",o.element);o.element.style.maxHeight="",i.focus(),l.triggerOpen(i)}});return o},n.prototype.createHeaderContainer=function(e){e=e||this.getWrapper();var i=this.createElement("span",{className:"e-"+this.getModuleName()+"-header"}),s=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(this.title):this.title,n=this.createElement("span",{className:"e-"+this.getModuleName()+"-title",innerHTML:s}),r=this.createElement("span",{className:"e-icons e-"+this.getModuleName()+"-icon",attrs:{tabindex:"0"}});i.appendChild(n),i.appendChild(r),e.insertBefore(i,this.element)},n.prototype.openHamburgerMenu=function(e){this.hamburgerMode&&this.triggerBeforeOpen(null,this.element,null,e,0,0,"hamburger")},n.prototype.closeHamburgerMenu=function(e){var t=this,i={element:this.element,parentItem:null,event:e,items:this.items,cancel:!1};this.trigger("beforeClose",i,function(i){i.cancel||(t.closeMenu(null,e),t.element.classList.add("e-hide-menu"),t.trigger("onClose",{element:t.element,parentItem:null,items:t.items}))})},n.prototype.callFit=function(e,t,i,n,r){return s.fit(e,null,{X:t,Y:i},{top:n,left:r})},n.prototype.triggerBeforeOpen=function(e,i,s,n,r,l,a){var d=this,h=e?s[this.getField("children",this.navIdx.length-1)]:this.items,c={element:i,items:h,parentItem:this.isMenu&&t.isBlazor()?this.getMenuItemModel(s,this.navIdx.length-1):s,event:n,cancel:!1,top:r,left:l,showSubMenuOn:"Auto"},p=a;this.trigger("beforeOpen",c,function(r){switch(p){case"menu":d.hamburgerMode||("Auto"!==r.showSubMenuOn&&(d.showItemOnClick=!d.defaultOption,d.showSubMenuOn=r.showSubMenuOn),d.top=r.top,d.left=r.left),d.popupWrapper.style.display="block",d.hamburgerMode||(d.popupWrapper.style.maxHeight=d.popupWrapper.getBoundingClientRect().height+"px",d.enableScrolling&&o(d.createElement,d.popupWrapper,d.uList,"vscroll",d.enableRtl),d.checkScrollOffset(n)),d.hamburgerMode||d.left||d.top?(d.popupObj.collision={X:"none",Y:"none"},d.popupWrapper.style.display=""):(d.popupObj.refreshPosition(d.lItem,!0),d.left=parseInt(d.popupWrapper.style.left,10),d.top=parseInt(d.popupWrapper.style.top,10),d.enableRtl&&(d.left=d.isNestedOrVertical?d.left-d.popupWrapper.offsetWidth-d.lItem.parentElement.offsetWidth+2:d.left-d.popupWrapper.offsetWidth+d.lItem.offsetWidth),d.template&&(d.isReact||d.isAngular)?requestAnimationFrame(function(){d.collision(),d.popupWrapper.style.display=""}):(d.collision(),d.popupWrapper.style.display=""));break;case"none":d.top=r.top,d.left=r.left;break;case"hamburger":r.cancel||(d.element.classList.remove("e-hide-menu"),d.triggerOpen(d.element))}if("hamburger"!==p)if(r.cancel)d.isMenu?(d.popupObj.destroy(),t.detach(d.popupWrapper)):i.className.indexOf("e-ul")>-1&&t.detach(i),d.navIdx.pop();else if(d.isMenu)if(d.hamburgerMode)d.popupWrapper.style.top=d.top+"px",d.popupWrapper.style.left="0px",d.toggleAnimation(d.popupWrapper);else{d.setBlankIconStyle(d.popupWrapper),d.wireKeyboardEvent(d.popupWrapper),t.rippleEffect(d.popupWrapper,{selector:"."+N}),d.popupWrapper.style.left=d.left+"px",d.popupWrapper.style.top=d.top+"px";var l="None"!==d.animationSettings.effect?{name:d.animationSettings.effect,duration:d.animationSettings.duration,timingFunction:d.animationSettings.easing}:null;d.popupObj.show(l,d.lItem)}else d.setBlankIconStyle(d.uList),d.setPosition(d.lItem,d.uList,d.top,d.left),d.toggleAnimation(d.uList);if("right"===d.keyType){var a=d.getUlByNavIdx();if(e.classList.remove(y),d.isMenu&&1===d.navIdx.length&&d.removeLIStateByClass([C],[d.getWrapper()]),e.classList.add(C),"enter"===d.action){var h={element:e,item:s,event:n};d.trigger("select",h)}e.focus(),a=d.getUlByNavIdx();var c=d.isValidLI(a.children[0],0,d.action);a.children[c].classList.add(y),a.children[c].focus()}})},n.prototype.collision=function(){var e;if(e=s.isCollide(this.popupWrapper,null,this.left,this.top),(this.isNestedOrVertical||this.enableRtl)&&(e.indexOf("right")>-1||e.indexOf("left")>-1)){this.popupObj.collision.X="none";var i=t.closest(this.lItem,".e-"+this.getModuleName()+"-wrapper").offsetWidth;this.left=this.enableRtl?s.calculatePosition(this.lItem,this.isNestedOrVertical?"right":"left","top").left:this.left-this.popupWrapper.offsetWidth-i+2}((e=s.isCollide(this.popupWrapper,null,this.left,this.top)).indexOf("left")>-1||e.indexOf("right")>-1)&&(this.left=this.callFit(this.popupWrapper,!0,!1,this.top,this.left).left),this.popupWrapper.style.left=this.left+"px"},n.prototype.setBlankIconStyle=function(e){var t=[].slice.call(e.getElementsByClassName("e-blankicon"));if(t.length){var i=e.querySelector(".e-menu-item:not(.e-blankicon):not(.e-separator)"),s=i.querySelector(".e-menu-icon");if(s){var n=this.enableRtl?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"},r=getComputedStyle(s),l=parseInt(r.fontSize,10);parseInt(r.width,10)&&parseInt(r.width,10)>l&&(l=parseInt(r.width,10));var o=l+parseInt(r[n.margin],10)+parseInt(getComputedStyle(i)[n.padding],10)+"px";t.forEach(function(e){e.style[n.padding]=o})}}},n.prototype.checkScrollOffset=function(e){var i=this.getWrapper();if(i.children[0].classList.contains("e-menu-hscroll")&&1===this.navIdx.length){var s=t.isNullOrUndefined(e)?this.element:t.closest(e.target,"."+N),n=t.select(".e-hscroll-bar",i);n.scrollLeft>s.offsetLeft&&(n.scrollLeft-=n.scrollLeft-s.offsetLeft);var r=n.scrollLeft+n.offsetWidth,l=s.offsetLeft+s.offsetWidth;r<l&&(n.scrollLeft+=l-r)}},n.prototype.setPosition=function(e,i,n,r){if(this.toggleVisiblity(i),i===this.element||r>-1&&n>-1){if((d=s.isCollide(i,null,r,n)).indexOf("right")>-1&&(r-=i.offsetWidth),d.indexOf("bottom")>-1&&(n=(a=this.callFit(i,!1,!0,n,r)).top-20)<0){var l=pageYOffset+document.documentElement.clientHeight-i.getBoundingClientRect().height;l>-1&&(n=l)}(d=s.isCollide(i,null,r,n)).indexOf("left")>-1&&(r=(a=this.callFit(i,!0,!1,n,r)).left)}else if(t.Browser.isDevice)n=Number(this.element.style.top.replace("px","")),r=Number(this.element.style.left.replace("px",""));else{var o=this.enableRtl?"left":"right",a=s.calculatePosition(e,o,"top");n=a.top,r=a.left;var d=s.isCollide(i,null,this.enableRtl?r-i.offsetWidth:r,n),h=d.indexOf("left")>-1||d.indexOf("right")>-1;h&&(r=(a=s.calculatePosition(e,this.enableRtl?"right":"left","top")).left),(this.enableRtl||h)&&(r=this.enableRtl&&h?r:r-i.offsetWidth),d.indexOf("bottom")>-1&&(n=(a=this.callFit(i,!1,!0,n,r)).top)}this.toggleVisiblity(i,!1),i.style.top=n+"px",i.style.left=r+"px"},n.prototype.toggleVisiblity=function(e,t){void 0===t&&(t=!0),e.style.visibility=t?"hidden":"",e.style.display=t?"block":"none"},n.prototype.createItems=function(e){var s=this,n=this.navIdx?this.navIdx.length:0,r=this.getFields(n);if(t.isBlazor()&&this.template&&e.length&&e[0].properties){var l=[];e.forEach(function(e,i){l.push({}),l[i][r.text]=e[r.text],e[r.id]||(e[r.id]=t.getUniqueID("menuitem")),l[i][r.id]=e[r.id],l[i][r.iconCss]=e[r.iconCss],l[i][r.url]=e[r.url],l[i][r.child]=e[r.child],l[i][r.separator]=e[r.separator]}),e=l}var o=this.hasField(e,this.getField("iconCss",n)),a={showIcon:o,moduleName:"menu",fields:r,template:this.template,itemNavigable:!0,itemCreating:function(e){e.curData[e.fields[r.id]]||(e.curData[e.fields[r.id]]=t.getUniqueID("menuitem")),e.curData.htmlAttributes={role:"menuitem",tabindex:"-1"},s.isMenu&&!e.curData[s.getField("separator",n)]&&(e.curData.htmlAttributes["aria-label"]=e.curData[e.fields.text]),""===e.curData[e.fields[r.iconCss]]&&(e.curData[e.fields[r.iconCss]]=null)},itemCreated:function(e){if(e.curData[s.getField("separator",n)]&&(e.item.classList.add("e-separator"),e.item.removeAttribute("role")),!o||e.curData[e.fields.iconCss]||e.curData[s.getField("separator",n)]||e.item.classList.add("e-blankicon"),e.curData[e.fields.child]&&e.curData[e.fields.child].length){var t=s.createElement("span",{className:"e-icons e-caret"});e.item.appendChild(t),e.item.setAttribute("aria-haspopup","true"),e.item.setAttribute("aria-expanded","false"),s.isMenu||e.item.removeAttribute("role"),e.item.classList.add("e-menu-caret-icon")}s.isMenu&&s.template&&(e.item.setAttribute("id",e.curData[e.fields.id].toString()),e.item.removeAttribute("data-uid"),e.item.classList.contains("e-level-1")&&e.item.classList.remove("e-level-1"),e.item.classList.contains("e-has-child")&&e.item.classList.remove("e-has-child"));var i={item:e.curData,element:e.item};s.trigger("beforeItemRender",i)}};this.setProperties({items:this.items},!0),this.isMenu&&(a.templateID=this.element.id+"Template");var d=i.ListBase.createList(this.createElement,e,a,!this.template,this);return d.setAttribute("tabindex","0"),this.isMenu&&d.setAttribute("role","menu"),d},n.prototype.moverHandler=function(e){var i=e.target;this.liTrgt=i;var s=this.getLI(i),n=s?t.closest(s,".e-"+this.getModuleName()+"-wrapper"):this.getWrapper(),r=this.getWrapper(),l=new RegExp("-ej2menu-(.*)-popup"),o=!1;if(n){if((""!==n.id?l.exec(n.id)[1]:n.querySelector("ul").id)!==this.element.id){if(this.removeLIStateByClass([y,C],[this.getWrapper()]),!this.navIdx.length)return;o=!0}s&&t.closest(s,".e-"+this.getModuleName()+"-wrapper")&&!o?(this.removeLIStateByClass([y],this.isMenu?[n].concat(this.getPopups()):[n]),this.removeLIStateByClass([y],this.isMenu?[r].concat(this.getPopups()):[r]),s.classList.add(y),this.showItemOnClick||this.clickHandler(e)):this.isMenu&&this.showItemOnClick&&!o&&this.removeLIStateByClass([y],[n].concat(this.getPopups())),this.isMenu&&(this.showItemOnClick||i.parentElement===n||t.closest(i,".e-"+this.getModuleName()+"-popup")||s&&(!s||this.getIndex(s.id,!0).length)||"Hover"===this.showSubMenuOn?o&&!this.showItemOnClick&&this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e)):(this.removeLIStateByClass([y],[n]),this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e))),this.isClosed||this.removeStateWrapper(),this.isClosed=!1)}},n.prototype.removeStateWrapper=function(){if(this.liTrgt){var e=t.closest(this.liTrgt,".e-menu-vscroll");"DIV"===this.liTrgt.tagName&&e&&this.removeLIStateByClass([y,C],[e])}},n.prototype.removeLIStateByClass=function(e,i){for(var s,n=0;n<i.length;n++)!function(n){e.forEach(function(e){(s=t.select("."+e,i[n]))&&s.classList.remove(e)})}(n)},n.prototype.getField=function(e,t){void 0===t&&(t=0);var i=this.fields[e];return"string"==typeof i?i:i[t]?i[t].toString():i[i.length-1].toString()},n.prototype.getFields=function(e){return void 0===e&&(e=0),{id:this.getField("itemId",e),iconCss:this.getField("iconCss",e),text:this.getField("text",e),url:this.getField("url",e),child:this.getField("children",e),separator:this.getField("separator",e)}},n.prototype.hasField=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][t])return!0;return!1},n.prototype.menuHeaderClickHandler=function(e){t.closest(e.target,".e-menu-wrapper").querySelector("ul.e-menu-parent").id===this.element.id&&(this.element.classList.contains("e-hide-menu")?this.openHamburgerMenu(e):this.closeHamburgerMenu(e))},n.prototype.clickHandler=function(e){if(this.isTapHold)this.isTapHold=!1;else{var i=this.getWrapper(),s=e.target,n=this.cli=this.getLI(s),r=new RegExp("-ej2menu-(.*)-popup"),l=n?t.closest(n,".e-"+this.getModuleName()+"-wrapper"):null,o=n&&l&&(this.isMenu?this.getIndex(n.id,!0).length>0:i.firstElementChild.id===l.firstElementChild.id);if(t.Browser.isDevice&&this.isMenu&&(this.removeLIStateByClass([y],[i].concat(this.getPopups())),this.mouseDownHandler(e)),n&&l&&this.isMenu){var a=l.id?r.exec(l.id)[1]:l.querySelector(".e-menu-parent").id;if(this.element.id!==a)return}if(o&&"click"===e.type&&!n.classList.contains(b)){this.setLISelected(n);var d=this.getIndex(n.id,!0),h={element:n,item:this.getItem(d),event:e};this.trigger("select",h)}if(o&&("mouseover"===e.type||t.Browser.isDevice||this.showItemOnClick)){var c=void 0;if(n.classList.contains(b))c=i.children[this.navIdx.length-1],this.toggleAnimation(c),(f=this.getLIByClass(c,C))&&f.classList.remove(C),t.detach(n.parentNode),this.navIdx.pop();else if(!n.classList.contains("e-separator")){this.showSubMenu=!0;var p=n.parentNode;if(this.cliIdx=this.getIdx(p,n),this.isMenu||!t.Browser.isDevice){var u=this.isMenu?Array.prototype.indexOf.call([i].concat(this.getPopups()),t.closest(p,".e-"+this.getModuleName()+"-wrapper")):this.getIdx(i,p);if(this.navIdx[u]===this.cliIdx&&(this.showSubMenu=!1),u!==this.navIdx.length&&("mouseover"!==e.type||this.showSubMenu)){var f=this.getLIByClass(p,C);f&&f.classList.remove(C),this.isClosed=!0,this.keyType="click",this.showItemOnClick&&this.setLISelected(n),this.closeMenu(u+1,e),this.showItemOnClick&&this.setLISelected(n)}}this.isClosed||this.afterCloseMenu(e),this.isClosed=!1}}else if(this.isMenu&&"DIV"===s.tagName&&this.navIdx.length&&t.closest(s,".e-menu-vscroll")){var m=t.closest(s,"."+x),v=Array.prototype.indexOf.call(this.getPopups(),m)+1;v<this.navIdx.length&&(this.closeMenu(v+1,e),m&&this.removeLIStateByClass([y,C],[m]))}else this.isMenu&&this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):"UL"===s.tagName&&(this.isMenu?!s.parentElement.classList.contains("e-menu-wrapper")||this.getIndex(s.querySelector("."+N).id,!0).length:s.parentElement===i)||(n||this.removeLIStateByClass([C],[i]),n&&n.querySelector(".e-caret")||this.closeMenu(null,e))}},n.prototype.afterCloseMenu=function(e){var i;if(this.showSubMenu){i=this.showItemOnClick&&0===this.navIdx.length?t.closest(e.target,".e-menu-parent.e-control"):t.closest(this.element,".e-menu-parent.e-control");var s=this.navIdx.concat(this.cliIdx),n=this.getItem(s);if(n&&n[this.getField("children",s.length-1)]&&n[this.getField("children",s.length-1)].length?(("mouseover"===e.type||t.Browser.isDevice&&this.isMenu)&&this.setLISelected(this.cli),(!this.hamburgerMode&&i||this.hamburgerMode&&"false"===this.cli.getAttribute("aria-expanded"))&&(this.cli.setAttribute("aria-expanded","true"),this.navIdx.push(this.cliIdx),this.openMenu(this.cli,n,null,null,e))):"mouseover"!==e.type&&this.closeMenu(null,e),!i){var r=this.getUlByNavIdx(),l=this.getLIByClass(r,C);l&&(l.setAttribute("aria-expanded","false"),l.classList.remove(C))}}this.keyType=""},n.prototype.setLISelected=function(e){var t=this.getLIByClass(e.parentElement,C);t&&t.classList.remove(C),this.isMenu||e.classList.remove(y),e.classList.add(C)},n.prototype.getLIByClass=function(e,t){for(var i=0,s=e.children.length;i<s;i++)if(e.children[i].classList.contains(t))return e.children[i];return null},n.prototype.getItemIndex=function(e,t){var i;i="string"==typeof e?e:e.id;var s=!1!==t;return this.getIndex(i,s)},n.prototype.setItem=function(e,t,i){var s=t||e.id,n=!1!==i,r=this.getIndex(s,n),l=this.getItem(r);l.iconCss=e.iconCss,l.id=e.id,l.text=e.text,l.url=e.url,l.separator=e.separator,l.items=e.items},n.prototype.getItem=function(e){var t=(e=e.slice()).pop();return this.getItems(e)[t]},n.prototype.getItems=function(e){for(var t=this.items,i=0;i<e.length;i++)t=t[e[i]][this.getField("children",i)];return t},n.prototype.setItems=function(e,t){var i=this.getItems(t);i.splice(0,i.length);for(var s=0;s<e.length;s++)i.splice(s,0,e[s])},n.prototype.getIdx=function(e,i,s){void 0===s&&(s=!0);var n=Array.prototype.indexOf.call(e.querySelectorAll("li"),i);return n=this.isMenu&&this.template&&t.isBlazor()?Array.prototype.indexOf.call(e.querySelectorAll(i.tagName),i):Array.prototype.indexOf.call(e.children,i),s&&e.children[0].classList.contains(b)&&n--,n},n.prototype.getLI=function(e){return"LI"===e.tagName&&e.classList.contains("e-menu-item")?e:t.closest(e,"li.e-menu-item")},n.prototype.updateItemsByNavIdx=function(){for(var e=this.items,t=0,i=0;i<this.navIdx.length&&(e=e[i].items);i++){t++;var s=this.getUlByNavIdx(t);if(!s)break;this.updateItem(s,e)}},n.prototype.removeChildElement=function(e){for(;e.firstElementChild;)e.removeChild(e.firstElementChild);return e},n.prototype.onPropertyChanged=function(e,i){for(var s=this,n=this.getWrapper(),r=this,l=0,a=Object.keys(e);l<a.length;l++)!function(l){switch(l){case"cssClass":i.cssClass&&t.removeClass([n],i.cssClass.split(" ")),e.cssClass&&t.addClass([n],e.cssClass.split(" "));break;case"enableRtl":n.classList.toggle("e-rtl");break;case"showItemOnClick":r.unWireEvents(),r.showItemOnClick=e.showItemOnClick,r.wireEvents();break;case"enableScrolling":if(e.enableScrolling){var a;r.element.classList.contains("e-vertical")?o(r.createElement,n,r.element,"vscroll",r.enableRtl):o(r.createElement,n,r.element,"hscroll",r.enableRtl),r.getPopups().forEach(function(e){a=t.select(".e-ul",e),o(s.createElement,e,a,"vscroll",s.enableRtl)})}else{var h=n.children[0];r.element.classList.contains("e-vertical")?d(t.getInstance(h,m),h):d(t.getInstance(h,p),h),n.style.overflow="",n.appendChild(r.element),r.getPopups().forEach(function(e){h=e.children[0],d(t.getInstance(h,m),h),e.style.overflow=""})}break;case"items":var c=void 0,u=void 0,f=void 0;if(Object.keys(i.items).length)for(var v=Object.keys(e.items),g=0;g<v.length;g++)(u=r.getChangedItemIndex(e,[],Number(v[g]))).length<=r.getWrapper().children.length&&(c=u.pop(),f=r.getItems(u),r.insertAfter([f[c]],f[c].text),r.removeItem(f,u,c),r.setItems(f,u)),u.length=0;else{if(r.updateItem(r.element,r.items),!r.hamburgerMode)for(var g=1,y=n.childElementCount;g<y;g++)t.detach(n.lastElementChild);r.isMenu&&t.isBlazor()?r.updateItemsByNavIdx():r.navIdx=[]}}}(a[l])},n.prototype.updateItem=function(e,i){t.isBlazor()?e=this.removeChildElement(e):e.innerHTML="",[].slice.call(this.createItems(i).children).forEach(function(t){e.appendChild(t)})},n.prototype.getChangedItemIndex=function(e,t,i){t.push(i);var s=Object.keys(e.items[i]).pop();if("items"===s){var n=e.items[i],r=Object.keys(n.items).pop();r&&this.getChangedItemIndex(n,t,Number(r))}else"isParentArray"===s&&t.length>1&&t.pop();return t},n.prototype.removeItem=function(e,i,s){e.splice(s,1);var n=this.getWrapper().children;i.length<n.length&&t.detach(n[i.length].children[s])},n.prototype.unWireEvents=function(e){void 0===e&&(e=this.target);var i=this.getWrapper();if(e){for(var n=void 0,r=void 0,l=t.selectAll(e),o=0,a=l.length;o<a;o++)n=l[o],this.isMenu?t.EventHandler.remove(n,"click",this.menuHeaderClickHandler):t.Browser.isIos?(r=t.getInstance(n,t.Touch))&&r.destroy():t.EventHandler.remove(n,"contextmenu",this.cmenuHandler);if(!this.isMenu){t.EventHandler.remove(this.targetElement,"scroll",this.scrollHandler);for(var d=0,h=s.getScrollableParent(this.targetElement);d<h.length;d++){var c=h[d];t.EventHandler.remove(c,"scroll",this.scrollHandler)}}}t.Browser.isDevice||(t.EventHandler.remove(this.isMenu?document:i,"mouseover",this.delegateMoverHandler),t.EventHandler.remove(document,"mousedown",this.delegateMouseDownHandler)),t.EventHandler.remove(document,"click",this.delegateClickHandler),this.unWireKeyboardEvent(i),this.rippleFn()},n.prototype.unWireKeyboardEvent=function(e){var i=t.getInstance(e,t.KeyboardEvents);i&&i.destroy()},n.prototype.toggleAnimation=function(e,t){var i=this;void 0===t&&(t=!0);var s,n;"None"!==this.animationSettings.effect&&t?this.animation.animate(e,{name:this.animationSettings.effect,duration:this.animationSettings.duration,timingFunction:this.animationSettings.easing,begin:function(e){i.hamburgerMode?(n=e.element.parentElement,e.element.style.position="absolute",s=n.offsetHeight,e.element.style.maxHeight=e.element.offsetHeight+"px",n.style.maxHeight=""):(e.element.style.display="block",e.element.style.maxHeight=e.element.getBoundingClientRect().height+"px")},progress:function(e){i.hamburgerMode&&(n.style.minHeight=s+e.element.offsetHeight+"px")},end:function(e){i.hamburgerMode?(e.element.style.position="",e.element.style.maxHeight="",n.style.minHeight="",e.element.style.top="0px",e.element.children[0].focus(),i.triggerOpen(e.element.children[0])):i.end(e.element,t)}}):this.end(e,t)},n.prototype.triggerOpen=function(e){var t=this.navIdx.length?this.getItem(this.navIdx):null,i={element:e,parentItem:t,items:t?t.items:this.items};this.trigger("onOpen",i)},n.prototype.end=function(e,i){if(i)if(e.style.display="block",e.style.maxHeight="",this.triggerOpen(e),e.querySelector("."+y))e.querySelector("."+y).focus();else{var s=this.getWrapper().children[this.getIdx(this.getWrapper(),e)-1];s?s.querySelector("."+C).focus():this.element.focus()}else if(e===this.element){var n=this.getLIByClass(this.element,y);n&&n.classList.remove(y);var r=this.getLIByClass(this.element,C);r&&r.classList.remove(C),e.style.display="none"}else t.detach(e)},n.prototype.getPersistData=function(){return""},n.prototype.getWrapper=function(){return t.closest(this.element,".e-"+this.getModuleName()+"-wrapper")},n.prototype.getIndex=function(e,t,i,s,n,r){void 0===i&&(i=this.items),void 0===s&&(s=[]),void 0===n&&(n=!1),void 0===r&&(r=0);var l;r=n?r+1:0;for(var o=0,a=i.length;o<a;o++){if(l=i[o],(t?l[this.getField("itemId",r)]:l[this.getField("text",r)])===e){s.push(o);break}if(l[this.getField("children",r)]&&l[this.getField("children",r)].length){if(-1!==(s=this.getIndex(e,t,l[this.getField("children",r)],s,!0,r))[s.length-1]){s.unshift(o);break}o!==a-1&&s.pop()}else o===a-1&&s.push(-1)}return n||-1!==s[0]?s:[]},n.prototype.enableItems=function(e,i,s){void 0===i&&(i=!0);for(var n,r,l,o,a="e-disabled",d=0;d<e.length;d++){if(l=this.getIndex(e[d],s),this.navIdx.length){if(1!==l.length){o=!1;for(var h=0,c=l.length-1;h<c;h++)if(l[h]!==this.navIdx[h]){o=!0;break}if(o)continue}}else if(1!==l.length)continue;r=l.pop(),(n=this.getUlByNavIdx(l.length))&&(i?this.isMenu?(n.children[r].classList.remove(a),n.children[r].removeAttribute("aria-disabled")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[r+1].classList.remove(a):n.children[r].classList.remove(a):this.isMenu?(n.children[r].classList.add(a),n.children[r].setAttribute("aria-disabled","true")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[r+1].classList.add(a):n.children[r].classList.add(a))}},n.prototype.showItems=function(e,t){this.showHideItems(e,!1,t)},n.prototype.hideItems=function(e,t){this.showHideItems(e,!0,t)},n.prototype.showHideItems=function(e,i,s){for(var n,r,l,o=0;o<e.length;o++)r=(l=this.getIndex(e[o],s)).pop(),(n=this.getUlByNavIdx(l.length))&&(i?t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[r+1].classList.add(E):n.children[r].classList.add(E):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[r+1].classList.remove(E):n.children[r].classList.remove(E))},n.prototype.removeItems=function(e,t){for(var i,s,n,r=0;r<e.length;r++)i=(s=this.getIndex(e[r],t)).pop(),n=this.getItems(s),this.removeItem(n,s,i)},n.prototype.insertAfter=function(e,t,i){this.insertItems(e,t,i)},n.prototype.insertBefore=function(e,t,i){this.insertItems(e,t,i,!1)},n.prototype.insertItems=function(e,i,s,n){void 0===n&&(n=!0);for(var r,l,o,a,d,h=0;h<e.length;h++){l=(o=this.getIndex(i,s)).pop(),a=this.getItems(o),d=new S(a[0],"items",e[h],!0),a.splice(n?l+1:l,0,d);var c=this.isMenu?[this.getWrapper()].concat(this.getPopups()):[].slice.call(this.getWrapper().children);if(o.length<c.length){l=n?l+1:l,r=this.createItems(a).children[l];var p=this.isMenu?t.select(".e-menu-parent",c[o.length]):c[o.length];p.insertBefore(r,p.children[l])}}},n.prototype.removeAttributes=function(){var e=this;["top","left","display","z-index"].forEach(function(t){e.element.style.removeProperty(t)}),["role","tabindex","class","style"].forEach(function(t){"class"===t&&e.element.classList.contains("e-menu-parent")&&e.element.classList.remove("e-menu-parent"),-1!==["class","style"].indexOf(t)&&e.element.getAttribute(t)||e.element.removeAttribute(t),e.isMenu&&"class"===t&&e.element.classList.contains("e-vertical")&&e.element.classList.remove("e-vertical")})},n.prototype.destroy=function(){var i=this.getWrapper();if(i){if(this.unWireEvents(),this.isMenu)this.closeMenu(),t.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",this.removeAttributes(),i.parentNode.insertBefore(this.element,i),this.clonedElement=null;else{if(this.clonedElement.style.display="","EJS-CONTEXTMENU"===this.clonedElement.tagName)t.addClass([this.clonedElement],["e-control","e-lib","e-"+this.getModuleName()]),this.element=this.clonedElement;else if(this.refreshing&&this.clonedElement.childElementCount&&"LI"===this.clonedElement.children[0].tagName&&this.setProperties({items:[]},!0),document.getElementById(this.clonedElement.id)){var s=this.clonedElement.nextElementSibling;s&&s!==i?this.clonedElement.parentElement.insertBefore(this.element,s):this.clonedElement.parentElement.appendChild(this.element),t.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",t.append([].slice.call(this.clonedElement.children),this.element),t.detach(this.clonedElement),this.removeAttributes()}this.clonedElement=null}this.isMenu&&this.clonedElement?(t.detach(this.element),i.style.display="",i.classList.remove("e-"+this.getModuleName()+"-wrapper"),i.removeAttribute("data-ripple")):t.detach(i),e.prototype.destroy.call(this),this.template&&this.clearTemplate(["template"])}},g([t.Event()],n.prototype,"beforeItemRender",void 0),g([t.Event()],n.prototype,"beforeOpen",void 0),g([t.Event()],n.prototype,"onOpen",void 0),g([t.Event()],n.prototype,"beforeClose",void 0),g([t.Event()],n.prototype,"onClose",void 0),g([t.Event()],n.prototype,"select",void 0),g([t.Event()],n.prototype,"created",void 0),g([t.Property("")],n.prototype,"cssClass",void 0),g([t.Property(0)],n.prototype,"hoverDelay",void 0),g([t.Property(!1)],n.prototype,"showItemOnClick",void 0),g([t.Property("")],n.prototype,"target",void 0),g([t.Property("")],n.prototype,"filter",void 0),g([t.Property(null)],n.prototype,"template",void 0),g([t.Property(!1)],n.prototype,"enableScrolling",void 0),g([t.Property(!1)],n.prototype,"enableHtmlSanitizer",void 0),g([t.Complex({itemId:"id",text:"text",parentId:"parentId",iconCss:"iconCss",url:"url",separator:"separator",children:"items"},O)],n.prototype,"fields",void 0),g([t.Collection([],S)],n.prototype,"items",void 0),g([t.Complex({duration:400,easing:"ease",effect:"SlideDown"},w)],n.prototype,"animationSettings",void 0),n=g([t.NotifyPropertyChanges],n)}(t.Component),k=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),L=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},A="e-toolbar-items",D="e-toolbar-item",P="e-toolbar-popup",T=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return k(i,e),L([t.Property("")],i.prototype,"id",void 0),L([t.Property("")],i.prototype,"text",void 0),L([t.Property("auto")],i.prototype,"width",void 0),L([t.Property("")],i.prototype,"cssClass",void 0),L([t.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),L([t.Property(!1)],i.prototype,"disabled",void 0),L([t.Property("")],i.prototype,"prefixIcon",void 0),L([t.Property("")],i.prototype,"suffixIcon",void 0),L([t.Property(!0)],i.prototype,"visible",void 0),L([t.Property("None")],i.prototype,"overflow",void 0),L([t.Property("")],i.prototype,"template",void 0),L([t.Property("Button")],i.prototype,"type",void 0),L([t.Property("Both")],i.prototype,"showTextOn",void 0),L([t.Property(null)],i.prototype,"htmlAttributes",void 0),L([t.Property("")],i.prototype,"tooltipText",void 0),L([t.Property("Left")],i.prototype,"align",void 0),L([t.Event()],i.prototype,"click",void 0),i}(t.ChildProperty),M=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.resizeContext=s.resize.bind(s),s.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},s}return k(i,e),i.prototype.destroy=function(){var i=this;this.isReact&&this.clearTemplate();var s=this.element.querySelectorAll(".e-control.e-btn");for([].slice.call(s).forEach(function(e){t.isNullOrUndefined(e)||t.isNullOrUndefined(e.ej2_instances[0])||e.ej2_instances[0].isDestroyed||e.ej2_instances[0].destroy()}),e.prototype.destroy.call(this),this.unwireEvents(),this.tempId.forEach(function(e){t.isNullOrUndefined(i.element.querySelector(e))||(document.body.appendChild(i.element.querySelector(e)).style.display="none")});this.element.lastElementChild;)this.element.removeChild(this.element.lastElementChild);this.trgtEle&&this.element.appendChild(this.ctrlTem),this.clearProperty(),this.popObj=null,this.tbarAlign=null,this.remove(this.element,"e-toolpop"),this.cssClass&&t.removeClass([this.element],this.cssClass.split(" ")),this.element.removeAttribute("style"),["aria-disabled","aria-orientation","aria-haspopup","role"].forEach(function(e){return i.element.removeAttribute(e)})},i.prototype.preRender=function(){var e={enableCollision:this.enableCollision,scrollStep:this.scrollStep};this.trigger("beforeCreate",e),this.enableCollision=e.enableCollision,this.scrollStep=e.scrollStep,this.scrollModule=null,this.popObj=null,this.tempId=[],this.tbarItemsCol=this.items,this.isVertical=!!this.element.classList.contains("e-vertical"),this.isExtendedOpen=!1,this.popupPriCount=0,this.enableRtl&&this.add(this.element,"e-rtl")},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resizeContext),this.allowKeyboard&&this.wireKeyboardEvent()},i.prototype.wireKeyboardEvent=function(){this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),t.EventHandler.add(this.element,"keydown",this.docKeyDown,this),this.element.setAttribute("tabIndex","0")},i.prototype.unwireKeyboardEvent=function(){this.keyModule&&(t.EventHandler.remove(this.element,"keydown",this.docKeyDown),this.keyModule.destroy(),this.keyModule=null)},i.prototype.docKeyDown=function(e){if("INPUT"!==e.target.tagName){var i=!t.isNullOrUndefined(this.popObj)&&t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode;9===e.keyCode&&!0===e.target.classList.contains("e-hor-nav")&&i&&this.popObj.hide({name:"FadeOut",duration:100}),(40===e.keyCode||38===e.keyCode||35===e.keyCode||36===e.keyCode)&&e.preventDefault()}},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),this.destroyScroll(),this.unwireKeyboardEvent(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(document,"scroll",this.docEvent),t.EventHandler.remove(document,"click",this.docEvent)},i.prototype.clearProperty=function(){this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},i.prototype.docEvent=function(e){var i=t.closest(e.target,".e-popup");this.popObj&&t.isVisible(this.popObj.element)&&!i&&"Popup"===this.overflowMode&&this.popObj.hide({name:"FadeOut",duration:100})},i.prototype.destroyScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,"e-tbar-pos"),this.scrollModule.destroy(),this.scrollModule=null)},i.prototype.destroyItems=function(){this.element&&[].slice.call(this.element.querySelectorAll("."+D)).forEach(function(e){t.detach(e)});var e=this.element.querySelector("."+A);this.tbarAlign&&([].slice.call(e.children).forEach(function(e){t.detach(e)}),this.tbarAlign=!1,this.remove(e,"e-tbar-pos")),this.clearProperty()},i.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,"e-rtl"),this.destroyScroll()),this.remove(this.element,"e-tbar-extended"),this.remove(this.element,"e-extended-toolbar");var e=this.element.querySelector(".e-toolbar-multirow");e&&this.remove(e,"e-toolbar-multirow"),this.popObj&&this.popupRefresh(this.popObj.element,!0)},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.elementFocus=function(e){var t=e.firstElementChild;t?(t.focus(),this.activeEleSwitch(e)):e.focus()},i.prototype.clstElement=function(e,i){return e&&this.popObj&&t.isVisible(this.popObj.element)?this.popObj.element.querySelector("."+D):this.element===i||e?this.element.querySelector("."+D+":not(.e-overlay ):not(.e-separator ):not(.e-hidden )"):t.closest(i,"."+D)},i.prototype.keyHandling=function(e,i,s,n,r){var l,o,a=this.popObj,d=this.element,h={name:"FadeOut",duration:100},c="moveUp"===i.action?"previous":"next";switch(i.action){case"moveRight":if(this.isVertical)return;d===s?this.elementFocus(e):n||this.eleFocus(e,"next");break;case"moveLeft":if(this.isVertical)return;n||this.eleFocus(e,"previous");break;case"home":case"end":if(e){var p=t.closest(e,".e-popup");p?t.isVisible(this.popObj.element)&&(o=[].slice.call(p.children),l="home"===i.action?o[0]:o[o.length-1]):(o=this.element.querySelectorAll("."+A+" ."+D),l="home"===i.action?o[0]:o[o.length-1]),l&&this.elementFocus(l)}break;case"moveUp":case"moveDown":if(this.isVertical)"moveUp"===i.action?this.eleFocus(e,"previous"):this.eleFocus(e,"next");else if(a&&t.closest(s,".e-popup")){var u=a.element,f=u.firstElementChild;if("previous"===c&&f===e||"next"===c&&u.lastElementChild===e)return;this.eleFocus(e,c)}else"moveDown"===i.action&&a&&t.isVisible(a.element)&&this.elementFocus(e);break;case"tab":if(!r&&!n){var m=e.firstElementChild;d===s&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(m),m.focus()),this.element.removeAttribute("tabindex"))}break;case"popupClose":a&&"Extended"!==this.overflowMode&&a.hide(h);break;case"popupOpen":if(!n)return;a&&!t.isVisible(a.element)?(a.element.style.top=d.offsetHeight+"px",a.show({name:"FadeIn",duration:100})):a.hide(h)}},i.prototype.keyActionHandler=function(e){var t=e.target;if("INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!this.element.classList.contains("e-overlay")){e.preventDefault();var i=t.classList.contains("e-hor-nav"),s=t.classList.contains("e-scroll-nav"),n=this.clstElement(i,t);(n||s)&&this.keyHandling(n,e,t,i,s)}},i.prototype.disable=function(e){var i=this.element;e?i.classList.add("e-overlay"):i.classList.remove("e-overlay"),i.setAttribute("tabindex",e?"-1":"0"),this.activeEle&&this.activeEle.setAttribute("tabindex",e?"-1":"0"),this.scrollModule&&this.scrollModule.disable(e),this.popObj&&(t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode&&this.popObj.hide(),i.querySelector("#"+i.id+"_nav").setAttribute("tabindex",e?"-1":"0"))},i.prototype.eleContains=function(e){return e.classList.contains("e-separator")||e.classList.contains("e-overlay")||e.getAttribute("disabled")||e.classList.contains("e-hidden")||!t.isVisible(e)},i.prototype.eleFocus=function(e,i){var s=Object(e)[i+"ElementSibling"];if(s){if(this.eleContains(s))return void this.eleFocus(s,i);this.elementFocus(s)}else if(this.tbarAlign){var n=Object(e.parentElement)[i+"ElementSibling"];if(t.isNullOrUndefined(n)||0!==n.children.length||(n=Object(n)[i+"ElementSibling"]),!t.isNullOrUndefined(n)&&n.children.length>0)if("next"===i){r=n.querySelector("."+D);this.eleContains(r)?this.eleFocus(r,i):(r.firstElementChild.focus(),this.activeEleSwitch(r))}else{var r=n.lastElementChild;this.eleContains(r)?this.eleFocus(r,i):this.elementFocus(r)}}},i.prototype.clickHandler=function(e){var i=this,s=e.target,n=this.element,r=!t.isNullOrUndefined(t.closest(s,".e-toolbar-pop")),l=s.classList,o=t.closest(s,".e-hor-nav");o||(o=s),n.children[0].classList.contains("e-hscroll")||n.children[0].classList.contains("e-vscroll")||!l.contains("e-hor-nav")||(l=s.querySelector(".e-icons").classList),(l.contains("e-popup-up-icon")||l.contains("e-popup-down-icon"))&&this.popupClickHandler(n,o,"e-rtl");var a,d=t.closest(e.target,"."+D);if(!t.isNullOrUndefined(d)&&!d.classList.contains("e-overlay")||o.classList.contains("e-hor-nav")){d&&(a=this.items[this.tbarEle.indexOf(d)]);var h={originalEvent:e,item:a};a&&!t.isNullOrUndefined(a.click)&&this.trigger("items["+this.tbarEle.indexOf(d)+"].click",h),h.cancel||this.trigger("clicked",h,function(e){!t.isNullOrUndefined(i.popObj)&&r&&!e.cancel&&"Popup"===i.overflowMode&&e.item&&"Input"!==e.item.type&&i.popObj.hide({name:"FadeOut",duration:100})})}},i.prototype.popupClickHandler=function(e,i,s){var n=this.popObj;t.isVisible(n.element)?(i.classList.remove("e-nav-active"),n.hide({name:"FadeOut",duration:100})):(e.classList.contains(s)&&(n.enableRtl=!0,n.position={X:"left",Y:"top"}),0!==n.offsetX||e.classList.contains(s)||(n.enableRtl=!1,n.position={X:"right",Y:"top"}),n.dataBind(),n.refreshPosition(),n.element.style.top=this.getElementOffsetY()+"px","Extended"===this.overflowMode&&(n.element.style.minHeight="0px"),i.classList.add("e-nav-active"),n.show({name:"FadeIn",duration:100}))},i.prototype.render=function(){this.initialize(),this.renderControl(),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);"msie"===t.Browser.info.name&&"auto"===this.height&&"MultiRow"!==this.overflowMode||t.setStyleAttribute(this.element,{height:i}),t.setStyleAttribute(this.element,{width:e});var s={role:"toolbar","aria-disabled":"false","aria-haspopup":"false","aria-orientation":this.isVertical?"vertical":"horizontal"};t.attributes(this.element,s),this.cssClass&&t.addClass([this.element],this.cssClass.split(" "))},i.prototype.renderControl=function(){var e=this.element;this.trgtEle=e.children.length>0?e.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderLayout()},i.prototype.renderLayout=function(){this.renderOverflowMode(),this.tbarAlign&&this.itemPositioning(),this.popObj&&this.popObj.element.childElementCount>1&&this.checkPopupRefresh(this.element,this.popObj.element)&&this.popupRefresh(this.popObj.element,!1),this.separator()},i.prototype.itemsAlign=function(e,t){var i,s;this.tbarEle||(this.tbarEle=[]);for(var n=0;n<e.length;n++)i=this.renderSubComponent(e[n],n),-1===this.tbarEle.indexOf(i)&&this.tbarEle.push(i),this.tbarAlign||this.tbarItemAlign(e[n],t,n),(s=t.querySelector(".e-toolbar-"+e[n].align.toLowerCase()))?(e[n].showAlwaysInPopup&&"Show"!==e[n].overflow||this.tbarAlgEle[(e[n].align+"s").toLowerCase()].push(i),s.appendChild(i)):t.appendChild(i);if(this.isReact){this.notify("render-react-toolbar-template",this.portals),this.renderReactTemplates()}},i.prototype.changeOrientation=function(){var e=this.element;this.isVertical?(e.classList.remove("e-vertical"),this.isVertical=!1,"auto"!==this.height&&"100%"!==this.height||(e.style.height=this.height),e.setAttribute("aria-orientation","horizontal")):(e.classList.add("e-vertical"),this.isVertical=!0,e.setAttribute("aria-orientation","vertical"),t.setStyleAttribute(this.element,{height:t.formatUnit(this.height),width:t.formatUnit(this.width)})),this.destroyMode(),this.refreshOverflow()},i.prototype.initScroll=function(e,i){!this.scrollModule&&this.checkOverflow(e,i[0])&&(this.tbarAlign&&this.element.querySelector("."+A+" .e-toolbar-center").removeAttribute("style"),this.isVertical?this.scrollModule=new m({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]):this.scrollModule=new p({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]),this.remove(this.scrollModule.element,"e-tbar-pos"),t.setStyleAttribute(this.element,{overflow:"hidden"}))},i.prototype.itemWidthCal=function(e){var i,s=this,n=0;return[].slice.call(t.selectAll("."+D,e)).forEach(function(e){t.isVisible(e)&&(i=window.getComputedStyle(e),n+=s.isVertical?e.offsetHeight:e.offsetWidth,n+=parseFloat(s.isVertical?i.marginTop:i.marginRight),n+=parseFloat(s.isVertical?i.marginBottom:i.marginLeft))}),n},i.prototype.getScrollCntEle=function(e){var t=this.isVertical?".e-vscroll-content":".e-hscroll-content";return e.querySelector(t)},i.prototype.checkOverflow=function(e,i){if(t.isNullOrUndefined(e)||t.isNullOrUndefined(i)||!t.isVisible(e))return!1;var s=this.isVertical?e.offsetHeight:e.offsetWidth,n=this.isVertical?i.offsetHeight:i.offsetWidth;(this.tbarAlign||this.scrollModule||s===n)&&(n=this.itemWidthCal(this.scrollModule?this.getScrollCntEle(i):i));var r=e.querySelector(".e-hor-nav"),l=e.querySelector(".e-scroll-nav"),o=0;return r?o=this.isVertical?r.offsetHeight:r.offsetWidth:l&&(o=this.isVertical?2*l.offsetHeight:2*l.offsetWidth),n>s-o},i.prototype.refreshOverflow=function(){this.resize()},i.prototype.toolbarAlign=function(e){this.tbarAlign&&(this.add(e,"e-tbar-pos"),this.itemPositioning())},i.prototype.renderOverflowMode=function(){var e=this.element,i=e.querySelector("."+A),s=this.popupPriCount>0;if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.remove(this.element,"e-toolpop"),"msie"===t.Browser.info.name&&"auto"===this.height&&(e.style.height=""),this.overflowMode){case"Scrollable":t.isNullOrUndefined(this.scrollModule)&&this.initScroll(e,[].slice.call(e.getElementsByClassName(A)));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),(this.checkOverflow(e,i)||s)&&this.setOverflowAttributes(e),this.toolbarAlign(i);break;case"MultiRow":this.add(i,"e-toolbar-multirow"),this.checkOverflow(e,i)&&this.tbarAlign&&(this.removePositioning(),this.add(i,"e-multirow-pos")),"hidden"===e.style.overflow&&(e.style.overflow=""),"msie"!==t.Browser.info.name&&"auto"===e.style.height||(e.style.height="auto");break;case"Extended":this.add(this.element,"e-extended-toolbar"),(this.checkOverflow(e,i)||s)&&(this.tbarAlign&&this.removePositioning(),this.setOverflowAttributes(e)),this.toolbarAlign(i)}},i.prototype.setOverflowAttributes=function(e){this.createPopupEle(e,[].slice.call(t.selectAll("."+A+" ."+D,e))),this.element.querySelector(".e-hor-nav").setAttribute("tabIndex","0"),this.element.querySelector(".e-hor-nav").setAttribute("role","list")},i.prototype.separator=function(){var e=this.element,t=[].slice.call(e.querySelectorAll(".e-separator")),i=e.querySelector(".e-multirow-separator"),s=e.querySelector(".e-extended-separator"),n="MultiRow"===this.overflowMode?i:s;null!==n&&("MultiRow"===this.overflowMode?n.classList.remove("e-multirow-separator"):"Extended"===this.overflowMode&&n.classList.remove("e-extended-separator"));for(var r=0;r<=t.length-1;r++)t[r].offsetLeft<30&&0!==t[r].offsetLeft&&("MultiRow"===this.overflowMode?t[r].classList.add("e-multirow-separator"):"Extended"===this.overflowMode&&t[r].classList.add("e-extended-separator"))},i.prototype.createPopupEle=function(e,i){var s=e.querySelector(".e-hor-nav"),n=this.isVertical;s||this.createPopupIcon(e),s=e.querySelector(".e-hor-nav");var r=n?s.offsetHeight:s.offsetWidth,l=(n?e.offsetHeight:e.offsetWidth)-r;this.element.classList.remove("e-rtl"),t.setStyleAttribute(this.element,{direction:"initial"}),this.checkPriority(e,i,l,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.element.style.removeProperty("direction"),this.createPopup()},i.prototype.pushingPoppedEle=function(e,i,s,n,r){var l=e.element,o=[].slice.call(t.selectAll("."+P,l.querySelector("."+A))),a=t.selectAll(".e-overflow-show",s),d=0,h=0;o.forEach(function(l,o){a=t.selectAll(".e-overflow-show",s),l.classList.contains("e-overflow-show")&&a.length>0?e.tbResize&&a.length>o?(s.insertBefore(l,a[o]),++h):(s.insertBefore(l,s.children[a.length]),++h):l.classList.contains("e-overflow-show")?(s.insertBefore(l,s.firstChild),++h):e.tbResize&&l.classList.contains("e-overflow-hide")&&s.children.length>0&&0===a.length?(s.insertBefore(l,s.firstChild),++h):l.classList.contains("e-overflow-hide")?i.push(l):e.tbResize?(s.insertBefore(l,s.childNodes[d+h]),++d):s.appendChild(l),l.classList.contains("e-separator")?t.setStyleAttribute(l,{display:"",height:r+"px"}):t.setStyleAttribute(l,{display:"",height:n+"px"})}),i.forEach(function(e){s.appendChild(e)});for(var c=t.selectAll("."+D,l.querySelector("."+A)),p=c.length-1;p>=0;p--){var u=c[p];if(!u.classList.contains("e-separator")||"Extended"===this.overflowMode)break;t.setStyleAttribute(u,{display:"none"})}},i.prototype.createPopup=function(){var e,i,s=this.element;"Extended"===this.overflowMode&&(i=s.querySelector(".e-separator:not(."+P+")"),e="auto"===s.style.height||""===s.style.height?null:i.offsetHeight);var n,r=s.querySelector("."+D+":not(.e-separator):not(."+P+")"),l="auto"===s.style.height||""===s.style.height?null:r&&r.offsetHeight,o=[];if(t.select("#"+s.id+"_popup.e-toolbar-pop",s))n=t.select("#"+s.id+"_popup.e-toolbar-pop",s);else{var a=this.createElement("div",{id:s.id+"_popup",className:"e-toolbar-pop e-toolbar-extended"}),d=this.createElement("div",{id:s.id+"_popup",className:"e-toolbar-pop"});n="Extended"===this.overflowMode?a:d}this.pushingPoppedEle(this,o,n,l,e),this.popupInit(s,n)},i.prototype.getElementOffsetY=function(){return"Extended"===this.overflowMode&&"border-box"===window.getComputedStyle(this.element).getPropertyValue("box-sizing")?this.element.clientHeight:this.element.offsetHeight},i.prototype.popupInit=function(e,i){if(this.popObj){var n=this.popObj.element;t.setStyleAttribute(n,{maxHeight:"",display:"block"}),t.setStyleAttribute(n,{maxHeight:n.offsetHeight+"px",display:""})}else{e.appendChild(i),t.setStyleAttribute(this.element,{overflow:""});var r=window.getComputedStyle(this.element),l=new s.Popup(null,{relateTo:this.element,offsetY:this.isVertical?0:this.getElementOffsetY(),enableRtl:this.enableRtl,open:this.popupOpen.bind(this),close:this.popupClose.bind(this),collision:{Y:this.enableCollision?"flip":"none"},position:this.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"}});if(l.appendTo(i),"Extended"===this.overflowMode&&(l.width=parseFloat(r.width)+2*parseFloat(r.borderRightWidth),l.offsetX=0),t.EventHandler.add(document,"scroll",this.docEvent.bind(this)),t.EventHandler.add(document,"click ",this.docEvent.bind(this)),l.element.style.maxHeight=l.element.offsetHeight+"px",this.isVertical&&(l.element.style.visibility="hidden"),this.isExtendedOpen){var o=this.element.querySelector(".e-hor-nav");o.classList.add("e-nav-active"),t.classList(o.firstElementChild,["e-popup-up-icon"],["e-popup-down-icon"]),this.element.querySelector(".e-toolbar-extended").classList.add("e-popup-open")}else l.hide();this.popObj=l,this.element.setAttribute("aria-haspopup","true")}},i.prototype.tbarPopupHandler=function(e){"Extended"===this.overflowMode&&(e?this.add(this.element,"e-tbar-extended"):this.remove(this.element,"e-tbar-extended"))},i.prototype.popupOpen=function(e){var i=this.popObj;this.isVertical||(i.offsetY=this.getElementOffsetY(),i.dataBind());var n=this.popObj.element,r=this.popObj.element.parentElement,l=r.querySelector(".e-hor-nav");t.setStyleAttribute(i.element,{height:"auto",maxHeight:""}),i.element.style.maxHeight=i.element.offsetHeight+"px","Extended"===this.overflowMode&&(i.element.style.minHeight="");var o=n.offsetTop+n.offsetHeight+s.calculatePosition(r).top,a=l.firstElementChild;l.classList.add("e-nav-active"),t.classList(a,["e-popup-up-icon"],["e-popup-down-icon"]),this.tbarPopupHandler(!0);var d=t.isNullOrUndefined(window.scrollY)?0:window.scrollY;if(!this.isVertical&&window.innerHeight+d<o&&this.element.offsetTop<n.offsetHeight){var h=n.offsetHeight-(o-window.innerHeight-d+5);i.height=h+"px";for(var c=0;c<=n.childElementCount;c++){var p=n.children[c];if(p.offsetTop+p.offsetHeight>h){h=p.offsetTop;break}}t.setStyleAttribute(i.element,{maxHeight:h+"px"})}else if(this.isVertical){var u=this.element.getBoundingClientRect();t.setStyleAttribute(i.element,{maxHeight:u.top+this.element.offsetHeight+"px",bottom:0,visibility:""})}if(i){var f=n.getBoundingClientRect();f.right>document.documentElement.clientWidth&&f.width>r.getBoundingClientRect().width&&(i.collision={Y:"none"},i.dataBind()),i.refreshPosition()}},i.prototype.popupClose=function(e){var i=this.element.querySelector(".e-hor-nav"),s=i.firstElementChild;i.classList.remove("e-nav-active"),t.classList(s,["e-popup-down-icon"],["e-popup-up-icon"]),this.tbarPopupHandler(!1)},i.prototype.checkPriority=function(e,i,s,n){for(var r,l=this.popupPriCount>0,o=s,a=0,d=0,h=0,c=function(e,t){var i=!1;return t.forEach(function(t){e.classList.contains(t)&&(i=!0)}),i},p=i.length-1;p>=0;p--){var u=void 0,f=window.getComputedStyle(i[p]);this.isVertical?(u=parseFloat(f.marginTop),u+=parseFloat(f.marginBottom)):(u=parseFloat(f.marginRight),u+=parseFloat(f.marginLeft));var m=i[p]===this.tbarEle[0];m&&(this.tbarEleMrgn=u),r=this.isVertical?i[p].offsetHeight:i[p].offsetWidth;var v=m?r+u:r;if(c(i[p],["e-popup-alone"])&&l&&(i[p].classList.add(P),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:v+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:v+"px"}),h++),this.isVertical?i[p].offsetTop+i[p].offsetHeight+u>s:i[p].offsetLeft+i[p].offsetWidth+u>s){if(i[p].classList.contains("e-separator")){if("Extended"===this.overflowMode)d===h&&c(g=i[p],["e-separator","e-ignore"])&&(i[p].classList.add(P),h++),d++;else if("Popup"===this.overflowMode){if(a>0&&d===h){var g=i[p+d+(a-1)];c(g,["e-separator","e-ignore"])&&t.setStyleAttribute(g,{display:"none"})}a++,d=0,h=0}}else d++;i[p].classList.contains("e-overflow-show")&&n?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:c(i[p],["e-separator","e-ignore"])?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:(i[p].classList.add(P),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:v+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:v+"px"}),h++)}}if(n){var y=t.selectAll("."+D+":not(."+P+")",this.element);this.checkPriority(e,y,o,!1)}},i.prototype.createPopupIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav e-hor-nav");s="Extended"===this.overflowMode?s+" e-expended-nav":s;var n=this.createElement("div",{id:i,className:s});"msie"!==t.Browser.info.name&&"edge"!==t.Browser.info.name||n.classList.add("e-ie-align");var r=this.createElement("div",{className:"e-popup-down-icon e-icons"});n.appendChild(r),n.setAttribute("tabindex","0"),n.setAttribute("role","list"),e.appendChild(n)},i.prototype.tbarPriRef=function(e,i,s,n,r,l,o,a){var d=a,h=this.popObj.element,c=t.selectAll("."+P+":not(.e-overflow-show)",h).length,p=function(e,t){return e.classList.contains(t)};if(0===t.selectAll(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)",e).length){var u=e.children[i-(i-s)-1],f=!t.isNullOrUndefined(u)&&p(u,"e-ignore");if(!t.isNullOrUndefined(u)&&p(u,"e-separator")&&!t.isVisible(u)||f){u.style.display="inherit";var m=u.offsetWidth+2*parseFloat(window.getComputedStyle(u).marginRight),v=u.previousElementSibling;l+m<o||r?(e.insertBefore(n,e.children[i+d-(i-s)]),t.isNullOrUndefined(v)||(v.style.display="")):v.classList.contains("e-separator")&&(v.style.display="none"),u.style.display=""}else e.insertBefore(n,e.children[i+d-(i-s)])}else e.insertBefore(n,e.children[i+d-c])},i.prototype.popupRefresh=function(e,i){var s=this,n=this.element,r=this.isVertical,l=n.querySelector("."+A),o=n.querySelector(".e-hor-nav");if(!t.isNullOrUndefined(o)){l.removeAttribute("style"),e.style.display="block";var a;a=r?n.offsetHeight-(o.offsetHeight+l.offsetHeight):n.offsetWidth-(o.offsetWidth+l.offsetWidth);var d=0;[].slice.call(e.children).forEach(function(e){d+=s.popupEleWidth(e),t.setStyleAttribute(e,{position:""})}),a+(r?o.offsetHeight:o.offsetWidth)>d&&0===this.popupPriCount&&(i=!0),this.popupEleRefresh(a,e,i),e.style.display="",0===e.children.length&&o&&this.popObj&&(t.detach(o),o=null,this.popObj.destroy(),t.detach(this.popObj.element),this.popObj=null,n.setAttribute("aria-haspopup","false"))}},i.prototype.ignoreEleFetch=function(e,t){var i=[].slice.call(t.querySelectorAll(".e-ignore")),s=[],n=0;return i.length>0?(i.forEach(function(e){s.push([].slice.call(t.children).indexOf(e))}),s.forEach(function(t){t<=e&&n++}),n):0},i.prototype.checkPopupRefresh=function(e,t){t.style.display="block";var i=this.popupEleWidth(t.firstElementChild);t.firstElementChild.style.removeProperty("Position");var s=e.offsetWidth-e.querySelector(".e-hor-nav").offsetWidth,n=e.querySelector("."+A).offsetWidth;return t.style.removeProperty("display"),s>i+n},i.prototype.popupEleWidth=function(e){e.style.position="absolute";var i=this.isVertical?e.offsetHeight:e.offsetWidth,s=e.querySelector(".e-tbar-btn-text");if(e.classList.contains("e-tbtn-align")||e.classList.contains("e-popup-text")){var n=e.children[0];!t.isNullOrUndefined(s)&&e.classList.contains("e-popup-text")?s.style.display="none":!t.isNullOrUndefined(s)&&e.classList.contains("e-toolbar-text")&&(s.style.display="block"),n.style.minWidth="0%",i=parseFloat(this.isVertical?e.style.minHeight:e.style.minWidth),n.style.minWidth="",n.style.minHeight="",t.isNullOrUndefined(s)||(s.style.display="")}return i},i.prototype.popupEleRefresh=function(e,i,s){for(var n,r,l=this.popupPriCount>0,o=this.tbarEle,a=this.element.querySelector("."+A),d=0,h=this,c=0,p=[].slice.call(i.children);c<p.length&&"break"!==function(i){if(i.classList.contains("e-popup-alone")&&l&&!s)return"continue";var c=h.popupEleWidth(i);if(i===h.tbarEle[0]&&(c+=h.tbarEleMrgn),i.style.position="",!(c<e||s))return"break";if(t.setStyleAttribute(i,{minWidth:"",height:"",minHeight:""}),i.classList.contains("e-overflow-hide")||i.classList.remove(P),r=h.tbarEle.indexOf(i),h.tbarAlign){var p=h.items[r].align;r=h.tbarAlgEle[(p+"s").toLowerCase()].indexOf(i),o=h.tbarAlgEle[(p+"s").toLowerCase()],a=h.element.querySelector("."+A+" .e-toolbar-"+p.toLowerCase())}var u=0;"Extended"!==h.overflowMode&&o.slice(0,r).forEach(function(t){(t.classList.contains("e-overflow-show")||t.classList.contains("e-separator"))&&(t.classList.contains("e-separator")&&(t.style.display="",e-=t.offsetWidth),u++)}),d=h.ignoreEleFetch(r,a),i.classList.contains("e-overflow-show")?(h.tbarPriRef(a,r,u,i,s,c,e,d),e-=i.offsetWidth):0===r?(a.insertBefore(i,a.firstChild),e-=i.offsetWidth):(n=t.selectAll(".e-overflow-show",h.popObj.element).length,a.insertBefore(i,a.children[r+d-n]),e-=i.offsetWidth),i.style.height=""}(p[c]);c++);this.checkOverflow(this.element,this.element.getElementsByClassName(A)[0])&&!s&&this.renderOverflowMode()},i.prototype.removePositioning=function(){var e=this.element.querySelector("."+A);if(!t.isNullOrUndefined(e)&&e.classList.contains("e-tbar-pos")){this.remove(e,"e-tbar-pos");var i=[].slice.call(e.childNodes);i[1].removeAttribute("style"),i[2].removeAttribute("style")}},i.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+A);this.add(e,"e-tbar-pos"),this.itemPositioning()},i.prototype.itemPositioning=function(){var e,i=this.element.querySelector("."+A);if(!t.isNullOrUndefined(i)&&i.classList.contains("e-tbar-pos")){var s,n=this.element.querySelector(".e-hor-nav");if(this.scrollModule){var r=this.isVertical?"e-vscroll-content":"e-hscroll-content";s=[].slice.call(i.querySelector("."+r).children)}else s=[].slice.call(i.childNodes);e=this.isVertical?s[0].offsetHeight+s[2].offsetHeight:s[0].offsetWidth+s[2].offsetWidth;var l=this.isVertical?this.element.offsetHeight:this.element.offsetWidth;if(n){l-=this.isVertical?n.offsetHeight:n.offsetWidth;var o=(this.isVertical?n.offsetHeight:n.offsetWidth)+"px";s[2].removeAttribute("style"),this.isVertical?this.enableRtl?s[2].style.top=o:s[2].style.bottom=o:this.enableRtl?s[2].style.left=o:s[2].style.right=o}if(!(l<=e)){var a=(l-e-(this.isVertical?s[1].offsetHeight:s[1].offsetWidth))/2;s[1].removeAttribute("style");var d=(this.isVertical?s[0].offsetHeight:s[0].offsetWidth)+a+"px";this.isVertical?this.enableRtl?s[1].style.marginBottom=d:s[1].style.marginTop=d:this.enableRtl?s[1].style.marginRight=d:s[1].style.marginLeft=d}}},i.prototype.tbarItemAlign=function(e,t,i){var s=this;if(!e.showAlwaysInPopup||"Show"===e.overflow){var n=[];if(n.push(this.createElement("div",{className:"e-toolbar-left"})),n.push(this.createElement("div",{className:"e-toolbar-center"})),n.push(this.createElement("div",{className:"e-toolbar-right"})),0===i&&"Left"!==e.align)n.forEach(function(e){t.appendChild(e)}),this.tbarAlign=!0,this.add(t,"e-tbar-pos");else if("Left"!==e.align){var r=t.childNodes,l=n[0];[].slice.call(r).forEach(function(e){s.tbarAlgEle.lefts.push(e),l.appendChild(e)}),t.appendChild(l),t.appendChild(n[1]),t.appendChild(n[2]),this.tbarAlign=!0,this.add(t,"e-tbar-pos")}}},i.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,A),this.tbarEle=[],[].slice.call(this.trgtEle.children).forEach(function(t){"DIV"===t.tagName&&(e.tbarEle.push(t),t.setAttribute("aria-disabled","false"),e.add(t,D))})},i.prototype.renderItems=function(){var e=this.element,t=this.items;if(null!=this.trgtEle)this.ctrlTemplate();else if(e&&t.length>0){var i=void 0;e&&e.children.length>0&&(i=e.querySelector("."+A)),i||(i=this.createElement("div",{className:A})),this.itemsAlign(t,i),e.appendChild(i)}},i.prototype.setAttr=function(e,t){for(var i,s=Object.keys(e),n=0;n<s.length;n++)"class"===(i=s[n])?this.add(t,e[i]):t.setAttribute(i,e[i])},i.prototype.enableItems=function(e,i){var s,n=e,r=n.length;t.isNullOrUndefined(i)&&(i=!0);var l=function(e,t){e?(t.classList.remove("e-overlay"),t.setAttribute("aria-disabled","false")):(t.classList.add("e-overlay"),t.setAttribute("aria-disabled","true"))};if(!t.isNullOrUndefined(r)&&r>=1){for(var o=0,a=[].slice.call(n);o<r;o++){var d=a[o];if("number"==typeof d){if(s=this.getElementByIndex(d),t.isNullOrUndefined(s))return;n[o]=s}else s=d;l(i,s)}i?t.removeClass(n,"e-overlay"):t.addClass(n,"e-overlay")}else{if("number"==typeof n){if(s=this.getElementByIndex(n),t.isNullOrUndefined(s))return}else s=e;l(i,s)}},i.prototype.getElementByIndex=function(e){return this.tbarEle[e]?this.tbarEle[e]:null},i.prototype.addItems=function(e,i){var s;this.extendedOpen();var n=this.element.querySelector("."+A);if(t.isNullOrUndefined(n))return void this.itemsRerender(e);var r,l="Left";t.isNullOrUndefined(i)&&(i=0),e.forEach(function(e){t.isNullOrUndefined(e.align)||"Left"===e.align||"Left"!==l||(l=e.align)});for(var o=0,a=e;o<a.length;o++){var d=a[o];if(t.isNullOrUndefined(d.type)&&(d.type="Button"),s=t.selectAll("."+D,this.element),d.align=l,r=this.renderSubComponent(d,i),this.tbarEle.length>=i&&s.length>=0){t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var h="L"===d.align[0]?0:"C"===d.align[0]?1:2,c=void 0;this.tbarAlign||"Left"===l?this.tbarAlign?((c=t.closest(s[0],"."+A).children[h]).insertBefore(r,c.children[i]),this.tbarAlgEle[(d.align+"s").toLowerCase()].splice(i,0,r),this.refreshPositioning()):0===s.length?(s=t.selectAll("."+A,this.element))[0].appendChild(r):s[0].parentNode.insertBefore(r,s[i]):(this.tbarItemAlign(d,n,1),this.tbarAlign=!0,(c=t.closest(s[0],"."+A).children[h]).appendChild(r),this.tbarAlgEle[(d.align+"s").toLowerCase()].push(r),this.refreshPositioning()),this.items.splice(i,0,d),this.tbarEle.splice(i,0,r),i++,this.offsetWid=n.offsetWidth}}n.style.width="",this.renderOverflowMode(),this.isReact&&this.renderReactTemplates()},i.prototype.removeItems=function(e){var i,s=e,n=[].slice.call(t.selectAll("."+D,this.element));if("number"==typeof s)i=parseInt(e.toString(),10),this.removeItemByIndex(i,n);else if(s&&s.length>1)for(var r=0,l=[].slice.call(s);r<l.length;r++){o=l[r];i=this.tbarEle.indexOf(o),this.removeItemByIndex(i,n),n=t.selectAll("."+D,this.element)}else{var o=s&&s.length&&1===s.length?s[0]:e;i=n.indexOf(o),this.removeItemByIndex(i,n)}this.resize()},i.prototype.removeItemByIndex=function(e,i){if(this.tbarEle[e]&&i[e]){var s=this.tbarEle.indexOf(i[e]);if(this.tbarAlign){var n=this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].indexOf(this.tbarEle[s]);this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].splice(n,1)}this.isReact&&this.clearTemplate();var r=i[e].querySelector(".e-control.e-btn");t.isNullOrUndefined(r)||t.isNullOrUndefined(r.ej2_instances[0])||r.ej2_instances[0].isDestroyed||r.ej2_instances[0].destroy(),t.detach(i[e]),this.items.splice(s,1),this.tbarEle.splice(s,1)}},i.prototype.templateRender=function(e,i,s,n){var r,l=s.type,o=e;if("object"==typeof e&&(r="function"==typeof o.appendTo),"string"!=typeof e&&r){if("Input"===l){var a=this.createElement("input");s.id?a.id=s.id:a.id=t.getUniqueID("tbr-ipt"),i.appendChild(a),o.appendTo(a)}}else{var d=void 0,h=e;h="string"==typeof e?e.trim():e;try{if("object"!=typeof e||t.isNullOrUndefined(e.tagName)){if(document.querySelectorAll(h).length){var c=(a=document.querySelector(h)).outerHTML.trim();i.appendChild(a),a.style.display="",t.isNullOrUndefined(c)||this.tempId.push(h)}}else i.appendChild(e)}catch(e){d=t.compile(h)}var p=void 0;t.isNullOrUndefined(d)||(p=d({},this,"template",this.element.id+n+"_template",this.isStringTemplate)),!t.isNullOrUndefined(p)&&p.length>0&&[].slice.call(p).forEach(function(e){t.isNullOrUndefined(e.tagName)||(e.style.display=""),i.appendChild(e)})}this.add(i,"e-template"),this.tbarEle.push(i)},i.prototype.buttonRendering=function(e,i){var s=this.createElement("button",{className:"e-tbar-btn"});s.setAttribute("type","button");var r,l,o=e.text;e.id?s.id=e.id:s.id=t.getUniqueID("e-tbr-btn");var a=this.createElement("span",{className:"e-tbar-btn-text"});o?(a.innerHTML=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(o):o,s.appendChild(a),s.classList.add("e-tbtn-txt")):this.add(i,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(r=e.prefixIcon+" e-icons",l="Left"):(r=e.suffixIcon+" e-icons",l="Right"));var d=new n.Button({iconCss:r,iconPosition:l});return d.createElement=this.createElement,d.appendTo(s),e.width&&t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),s},i.prototype.renderSubComponent=function(e,i){var s,n=this.createElement("div",{className:D});n.setAttribute("aria-disabled","false");var r=this.createElement("div",{innerHTML:this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(e.tooltipText):e.tooltipText});if(this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,n),e.tooltipText&&n.setAttribute("title",r.textContent),e.cssClass&&(n.className=n.className+" "+e.cssClass),e.template)this.templateRender(e.template,n,e,i);else switch(e.type){case"Button":(s=this.buttonRendering(e,n)).setAttribute("tabindex","-1"),s.setAttribute("aria-label",e.text||e.tooltipText),n.appendChild(s),n.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(n,"e-separator")}if(e.showTextOn){var l=e.showTextOn;"Toolbar"===l?(this.add(n,"e-toolbar-text"),this.add(n,"e-tbtn-align")):"Overflow"===l&&this.add(n,"e-popup-text")}if(e.overflow){var o=e.overflow;"Show"===o?this.add(n,"e-overflow-show"):"Hide"===o&&(n.classList.contains("e-separator")||this.add(n,"e-overflow-hide"))}return"Show"!==e.overflow&&e.showAlwaysInPopup&&!n.classList.contains("e-separator")&&(this.add(n,"e-popup-alone"),this.popupPriCount++),e.disabled&&this.add(n,"e-overlay"),!1===e.visible&&this.add(n,"e-hidden"),n},i.prototype.itemClick=function(e){this.activeEleSwitch(e.currentTarget)},i.prototype.activeEleSwitch=function(e){this.activeEleRemove(e.firstElementChild),this.activeEle.focus()},i.prototype.activeEleRemove=function(e){t.isNullOrUndefined(this.activeEle)||this.activeEle.setAttribute("tabindex","-1"),this.activeEle=e,t.isNullOrUndefined(this.trgtEle)&&!e.parentElement.classList.contains("e-template")?e.removeAttribute("tabindex"):this.activeEle.setAttribute("tabindex","0")},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.getModuleName=function(){return"toolbar"},i.prototype.itemsRerender=function(e){this.items=this.tbarItemsCol,this.isReact&&this.clearTemplate(),this.destroyMode(),this.destroyItems(),this.items=e,this.tbarItemsCol=this.items,this.renderItems(),this.renderOverflowMode(),this.isReact&&this.renderReactTemplates()},i.prototype.resize=function(){var e=this.element;this.tbResize=!0,this.tbarAlign&&this.itemPositioning(),this.popObj&&"Popup"===this.overflowMode&&this.popObj.hide();var i=this.checkOverflow(e,e.getElementsByClassName(A)[0]);if(!i){this.destroyScroll();var s=e.querySelector("."+A);t.isNullOrUndefined(s)||(this.remove(s,"e-multirow-pos"),this.tbarAlign&&this.add(s,"e-tbar-pos"))}if(!i||!this.scrollModule||this.offsetWid!==e.offsetWidth){if((this.offsetWid>e.offsetWidth||i)&&this.renderOverflowMode(),this.popObj){if("Extended"===this.overflowMode){var n=window.getComputedStyle(this.element);this.popObj.width=parseFloat(n.width)+2*parseFloat(n.borderRightWidth)}this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()}this.element.querySelector(".e-hscroll-bar")&&(this.scrollStep=this.element.querySelector(".e-hscroll-bar").offsetWidth),this.offsetWid=e.offsetWidth,this.tbResize=!1,this.separator()}},i.prototype.extendedOpen=function(){var e=this.element.querySelector(".e-toolbar-extended");"Extended"===this.overflowMode&&e&&(this.isExtendedOpen=e.classList.contains("e-popup-open"))},i.prototype.onPropertyChanged=function(e,i){var s=this.element,n=s.offsetWidth;this.extendedOpen();for(var r=0,l=Object.keys(e);r<l.length;r++)switch(l[r]){case"items":if(e.items instanceof Array&&i.items instanceof Array||this.isServerRendered)this.itemsRerender(e.items);else for(var o=Object.keys(e.items),a=0;a<o.length;a++){var d=parseInt(Object.keys(e.items)[a],10),h=Object.keys(e.items[d])[0],c=Object(e.items[d])[h];if("function"!=typeof c){if(this.tbarAlign||"align"===h){this.refresh(),this.trigger("created");break}var p="showAlwaysInPopup"===h&&!c,u="overflow"===h&&0!==this.popupPriCount;(p||this.items[d].showAlwaysInPopup&&u)&&--this.popupPriCount,t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var f=[].slice.call(t.selectAll("."+A+" ."+D,s));this.isReact&&this.clearTemplate(),t.detach(f[d]),this.tbarEle.splice(d,1),this.addItems([this.items[d]],d),this.items.splice(d,1),this.items[d].template&&this.tbarEle.splice(this.items.length,1)}}break;case"width":t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),this.renderOverflowMode(),this.popObj&&n<s.offsetWidth&&this.popupRefresh(this.popObj.element,!1);break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(s,"e-rtl"),this.refreshOverflow();break;case"enableRtl":e.enableRtl?this.add(s,"e-rtl"):this.remove(s,"e-rtl"),t.isNullOrUndefined(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,"e-rtl"):this.remove(this.scrollModule.element,"e-rtl")),t.isNullOrUndefined(this.popObj)||(e.enableRtl?this.add(this.popObj.element,"e-rtl"):this.remove(this.popObj.element,"e-rtl")),this.tbarAlign&&this.itemPositioning();break;case"scrollStep":this.scrollModule&&(this.scrollModule.scrollStep=this.scrollStep);break;case"enableCollision":this.popObj&&(this.popObj.collision={Y:this.enableCollision?"flip":"none"});break;case"cssClass":i.cssClass&&t.removeClass([this.element],i.cssClass.split(" ")),e.cssClass&&t.addClass([this.element],e.cssClass.split(" "));break;case"allowKeyboard":this.unwireKeyboardEvent(),e.allowKeyboard&&this.wireKeyboardEvent()}},i.prototype.hideItem=function(e,i){var s,n,r="object"==typeof e,l=e,o=[].slice.call(t.selectAll("."+D,this.element));if(r?n=e:this.tbarEle[l]&&(n=[].slice.call(t.selectAll("."+D,this.element))[l]),n){if(i?n.classList.add("e-hidden"):n.classList.remove("e-hidden"),i&&t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains("e-separator")){if(t.isNullOrUndefined(n.firstElementChild.getAttribute("tabindex"))){n.firstElementChild.setAttribute("tabindex","-1");var a=[].slice.call(t.selectAll("."+D,this.element));r&&(l=a.indexOf(n));for(var d=a[++l];d;){if(!(u=this.eleContains(d))){d.firstElementChild.removeAttribute("tabindex");break}d=a[++l]}}}else if(t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains("e-separator"))for(var h=!1,c=!1,p=o[s=0];p;)if(p.classList.contains("e-separator"))p=o[++s];else if(t.isNullOrUndefined(p.firstElementChild.getAttribute("tabindex")))p.firstElementChild.setAttribute("tabindex","-1"),h=!0;else{if(h&&c)break;var u=this.eleContains(p);u||(p.firstElementChild.removeAttribute("tabindex"),c=!0),p=o[++s]}this.refreshOverflow()}},L([t.Collection([],T)],i.prototype,"items",void 0),L([t.Property("auto")],i.prototype,"width",void 0),L([t.Property("auto")],i.prototype,"height",void 0),L([t.Property("")],i.prototype,"cssClass",void 0),L([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),L([t.Property()],i.prototype,"scrollStep",void 0),L([t.Property(!0)],i.prototype,"enableCollision",void 0),L([t.Property(!0)],i.prototype,"enableHtmlSanitizer",void 0),L([t.Property(!0)],i.prototype,"allowKeyboard",void 0),L([t.Event()],i.prototype,"clicked",void 0),L([t.Event()],i.prototype,"created",void 0),L([t.Event()],i.prototype,"destroyed",void 0),L([t.Event()],i.prototype,"beforeCreate",void 0),i=L([t.NotifyPropertyChanges],i)}(t.Component),U=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),H=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},B="e-acrdn-item",R="e-acrdn-header",j="e-acrdn-panel",q="e-acrdn-content",F=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),H([t.Property("SlideDown")],i.prototype,"effect",void 0),H([t.Property(400)],i.prototype,"duration",void 0),H([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),H([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},F)],i.prototype,"collapse",void 0),H([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},F)],i.prototype,"expand",void 0),i}(t.ChildProperty),V=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),H([t.Property(null)],i.prototype,"content",void 0),H([t.Property(null)],i.prototype,"header",void 0),H([t.Property(null)],i.prototype,"cssClass",void 0),H([t.Property(null)],i.prototype,"iconCss",void 0),H([t.Property(!1)],i.prototype,"expanded",void 0),H([t.Property(!0)],i.prototype,"visible",void 0),H([t.Property(!1)],i.prototype,"disabled",void 0),H([t.Property()],i.prototype,"id",void 0),i}(t.ChildProperty),W=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.keyConfigs={moveUp:"uparrow",moveDown:"downarrow",enter:"enter",space:"space",home:"home",end:"end"},s}return U(i,e),i.prototype.destroy=function(){var i=this;this.isReact&&this.clearTemplate();var s=this.element;if(e.prototype.destroy.call(this),this.unwireEvents(),this.isDestroy=!0,this.restoreContent(null),[].slice.call(s.children).forEach(function(e){s.removeChild(e)}),this.trgtEle)for(;this.ctrlTem.firstElementChild;)s.appendChild(this.ctrlTem.firstElementChild);s.classList.remove("e-acrdn-root"),s.removeAttribute("style"),["aria-disabled","aria-multiselectable","role","data-ripple"].forEach(function(e){i.element.removeAttribute(e)}),!this.isNested&&t.isRippleEnabled&&this.removeRippleEffect()},i.prototype.preRender=function(){var e=t.closest(this.element,"."+j);this.isNested=!1,this.templateEle=[],this.isDestroy||(this.isDestroy=!1),t.isNullOrUndefined(e)?this.element.classList.add("e-acrdn-root"):(e.classList.add("e-nested"),this.isNested=!0),this.enableRtl&&this.add(this.element,"e-rtl")},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.render=function(){this.isServerRendered?this.wireFocusEvents():(this.initializeheaderTemplate(),this.initializeItemTemplate(),this.initialize(),this.renderControl()),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);t.setStyleAttribute(this.element,{width:e,height:i});var s={"aria-disabled":"false",role:"presentation","aria-multiselectable":"true"};t.isNullOrUndefined(this.initExpand)&&(this.initExpand=[]),this.expandedIndices.length>0&&(this.initExpand=this.expandedIndices),t.attributes(this.element,s),"Single"===this.expandMode&&this.element.setAttribute("aria-multiselectable","false")},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?t.select("div",this.element):null,this.renderItems(),this.initItemExpand()},i.prototype.wireFocusEvents=function(){for(var e=0,i=[].slice.call(this.element.querySelectorAll("."+B));e<i.length;e++){var s=i[e],n=s.querySelector("."+R);s.childElementCount>0&&n&&(t.EventHandler.clearEvents(n),t.EventHandler.add(n,"focus",this.focusIn,this),t.EventHandler.add(n,"blur",this.focusOut,this))}},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),t.isNullOrUndefined(this.keyModule)||this.keyModule.destroy()},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),this.isNested||this.isDestroy||(this.removeRippleEffect=t.rippleEffect(this.element,{selector:"."+R})),this.isNested||(this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}))},i.prototype.templateParser=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}},i.prototype.initializeheaderTemplate=function(){this.headerTemplate&&(this.headerTemplateFn=this.templateParser(this.headerTemplate))},i.prototype.initializeItemTemplate=function(){this.itemTemplate&&(this.itemTemplateFn=this.templateParser(this.itemTemplate))},i.prototype.getheaderTemplate=function(){return this.headerTemplateFn},i.prototype.getItemTemplate=function(){return this.itemTemplateFn},i.prototype.focusIn=function(e){e.target.parentElement.classList.add("e-item-focus")},i.prototype.focusOut=function(e){e.target.parentElement.classList.remove("e-item-focus")},i.prototype.ctrlTemplate=function(){this.ctrlTem=this.element.cloneNode(!0);var e,i=t.select(".e-accordion-container",this.element);e=i?i.children:this.element.children;var s=[];[].slice.call(e).forEach(function(e){s.push({header:e.childElementCount>0&&e.children[0]?e.children[0]:"",content:e.childElementCount>1&&e.children[1]?e.children[1]:""}),e.parentNode.removeChild(e)}),i&&this.element.removeChild(i),this.setProperties({items:s},!0)},i.prototype.toggleIconGenerate=function(){var e=this.createElement("div",{className:"e-toggle-icon"}),t=this.createElement("span",{className:"e-tgl-collapse-icon e-icons"});return e.appendChild(t),e},i.prototype.initItemExpand=function(){var e=this.initExpand.length;if(0!==e){if("Single"===this.expandMode)this.expandItem(!0,this.initExpand[e-1]);else for(var t=0;t<e;t++)this.expandItem(!0,this.initExpand[t]);this.isReact&&this.renderReactTemplates()}},i.prototype.renderItems=function(){var e,i,s=this,n=this.element;if(t.isNullOrUndefined(this.trgtEle)||this.ctrlTemplate(),this.dataSource.length>0)this.dataSource.forEach(function(e,r){i=s.renderInnerItem(e,r),n.appendChild(i),i.childElementCount>0&&(t.EventHandler.add(i.querySelector("."+R),"focus",s.focusIn,s),t.EventHandler.add(i.querySelector("."+R),"blur",s.focusOut,s))});else{var r=this.items;n&&r.length>0&&r.forEach(function(i,r){e=s.renderInnerItem(i,r),n.appendChild(e),e.childElementCount>0&&(t.EventHandler.add(e.querySelector("."+R),"focus",s.focusIn,s),t.EventHandler.add(e.querySelector("."+R),"blur",s.focusOut,s))})}this.isReact&&this.renderReactTemplates()},i.prototype.clickHandler=function(e){var i,s=this,n=e.target,r=this.getItems(),l={};if(t.closest(n,".e-accordion")===this.element){n.classList.add("e-target");var o=t.closest(n,"."+B),a=t.closest(n,"."+R),d=t.closest(n,"."+j);o&&(t.isNullOrUndefined(a)||t.isNullOrUndefined(d))&&(a=o.children[0],d=o.children[1]),a&&(i=t.select(".e-toggle-icon",a));var h;a?h=t.closest(a,"."+B):d&&(h=t.closest(d,"."+B));var c=this.getIndexByItem(o);if(h&&(l.item=r[this.getIndexByItem(h)]),l.originalEvent=e,!(!t.isNullOrUndefined(i)&&o.childElementCount<=1)||!t.isNullOrUndefined(d)&&t.isNullOrUndefined(t.select(".e-acrdn-header .e-toggle-icon",h)))this.afterContentRender(n,l,o,a,d,h);else if(this.isServerRendered){var p=o.id;this.items.length>0?this.interopAdaptor.invokeMethodAsync("OnItemClick",c).then(function(){s.isDestroyed||s.afterContentRender(n,l,o,a,d,h)}):this.interopAdaptor.invokeMethodAsync("OnDataClick",p).then(function(){s.isDestroyed||s.afterContentRender(n,l,o,a,d,h)})}else o.appendChild(this.contentRendering(c)),this.ariaAttrUpdate(o),this.afterContentRender(n,l,o,a,d,h);this.isReact&&this.renderReactTemplates()}},i.prototype.afterContentRender=function(e,i,s,n,r,l){var o=this,a=[];this.trigger("clicked",i);var d=r&&!t.isNullOrUndefined(t.select(".e-target",r)),h=r&&!t.isNullOrUndefined(t.select(".e-accordion",r))&&t.isNullOrUndefined(t.closest(e,".e-acrdn-panel .e-accordion")),c=r&&t.isNullOrUndefined(t.select(".e-accordion",r))||!(t.closest(e,".e-accordion")===this.element);if(d=d&&(h||c),e.classList.remove("e-target"),!(e.classList.contains(j)||e.classList.contains(q)||d)){var p=this.element.querySelector(".e-accordion-container"),u=p?p.children:this.element.children;[].slice.call(u).forEach(function(e){e.classList.contains("e-active")&&a.push(e)});var f=[].slice.call(this.element.querySelectorAll(".e-acrdn-item [e-animate]"));if(f.length>0)for(var m=0,v=f;m<v.length;m++){var g=v[m];a.push(g.parentElement)}var y=-1!==a.indexOf(l)&&"true"===r.getAttribute("e-animate"),b=!1;if(!t.isNullOrUndefined(s)&&!t.isNullOrUndefined(n)){var C=t.select("."+j,s),N=t.closest(s,".e-acrdn-root").querySelector(".e-expand-state");if(t.isNullOrUndefined(C))return;b=N===s,!t.isVisible(C)||y&&!l.classList.contains("e-selected")?(a.length>0&&"Single"===this.expandMode&&!y&&a.forEach(function(e){o.collapse(t.select("."+j,e)),e.classList.remove("e-expand-state")}),this.expand(C)):this.collapse(C),t.isNullOrUndefined(N)||b||N.classList.remove("e-expand-state")}}},i.prototype.eleMoveFocus=function(e,i,s){var n,r=t.closest(s,"."+B);s===i?n=("moveUp"===e?s.lastElementChild:s).querySelector("."+R):s.classList.contains(R)&&(r="moveUp"===e?r.previousElementSibling:r.nextElementSibling)&&(n=t.select("."+R,r)),n&&n.focus()},i.prototype.keyActionHandler=function(e){var i=e.target,s=t.closest(e.target,R);if(!t.isNullOrUndefined(s)||i.classList.contains("e-accordion")||i.classList.contains(R)){var n,r=this.element;switch(e.action){case"moveUp":case"moveDown":this.eleMoveFocus(e.action,r,i);break;case"space":case"enter":n=i.nextElementSibling,!t.isNullOrUndefined(n)&&n.classList.contains(j)?"true"!==n.getAttribute("e-animate")&&i.click():i.click();break;case"home":case"end":("home"===e.action?r.firstElementChild.children[0]:r.lastElementChild.children[0]).focus()}}},i.prototype.headerEleGenerate=function(){var e=this.createElement("div",{className:R,id:t.getUniqueID("acrdn_header")}),i={tabindex:"0",role:"heading","aria-selected":"false","aria-label":"collapsed","aria-disabled":"false","aria-level":this.getItems().length.toString()};return t.attributes(e,i),e},i.prototype.renderInnerItem=function(e,i){var s=this.createElement("div",{className:B});if(s.id=t.getUniqueID("acrdn_item"),t.isNullOrUndefined(e.id)&&(e.id=s.id),t.attributes(s,{"aria-expanded":"false"}),this.headerTemplate){var n=this.headerEleGenerate(),r=this.createElement("div",{className:"e-acrdn-header-content"});return n.appendChild(r),t.append(this.getheaderTemplate()(e,this,"headerTemplate",this.element.id+"_headerTemplate",!1),r),s.appendChild(n),n.appendChild(this.toggleIconGenerate()),this.add(s,"e-select"),s}if(e.header&&this.angularnativeCondiCheck(e,"header")){this.enableHtmlSanitizer&&"string"==typeof e.header&&(e.header=t.SanitizeHtmlHelper.sanitize(e.header));var n=this.headerEleGenerate(),r=this.createElement("div",{className:"e-acrdn-header-content"});n.appendChild(r),n.appendChild(this.fetchElement(r,e.header,i,!0)),s.appendChild(n)}var l=t.select("."+R,s);if(!e.expanded||t.isNullOrUndefined(i)||this.enablePersistence||-1===this.initExpand.indexOf(i)&&this.initExpand.push(i),e.cssClass&&t.addClass([s],e.cssClass.split(" ")),e.disabled&&t.addClass([s],"e-overlay"),!1===e.visible&&t.addClass([s],"e-hide"),e.iconCss){var o=this.createElement("div",{className:"e-acrdn-header-icon"}),a=this.createElement("span",{className:e.iconCss+" e-icons"});o.appendChild(a),t.isNullOrUndefined(l)?((l=this.headerEleGenerate()).appendChild(o),s.appendChild(l)):l.insertBefore(o,l.childNodes[0])}if(e.content&&this.angularnativeCondiCheck(e,"content")){var d=this.toggleIconGenerate();t.isNullOrUndefined(l)&&(l=this.headerEleGenerate(),s.appendChild(l)),l.appendChild(d),this.add(s,"e-select")}return s},i.prototype.angularnativeCondiCheck=function(e,i){var s="content"===i?e.content:e.header;if(this.isAngular&&!t.isNullOrUndefined(s.elementRef)){var n=s.elementRef.nativeElement.data;if(t.isNullOrUndefined(n)||""===n||-1===n.indexOf("bindings="))return!0;var r=JSON.parse(s.elementRef.nativeElement.data.replace("bindings=",""));return!(!t.isNullOrUndefined(r)&&"false"===r["ng-reflect-ng-if"])}return!0},i.prototype.fetchElement=function(e,i,s,n){var r,l;try{if(document.querySelectorAll(i).length&&"Button"!==i){var o=document.querySelector(i);l=o.outerHTML.trim(),e.appendChild(o),o.style.display=""}}catch(s){"string"==typeof i?e.innerHTML=t.SanitizeHtmlHelper.sanitize(i):!t.isNullOrUndefined(this.trgtEle)&&i instanceof HTMLElement?(e.appendChild(i),e.firstElementChild.style.display=""):r=t.compile(i)}var a;if(!t.isNullOrUndefined(r)){this.isReact&&this.renderReactTemplates();var d=void 0,h=void 0;e.classList.contains("e-acrdn-header-content")?(d=this.element.id+s+"_header",h="header"):e.classList.contains(q)&&(d=this.element.id+s+"_content",h="content"),a=r({},this,h,d,this.isStringTemplate)}return t.isNullOrUndefined(a)||!(a.length>0)||t.isNullOrUndefined(a[0].tagName)&&1===a.length?0===e.childElementCount&&(e.innerHTML=t.SanitizeHtmlHelper.sanitize(i)):[].slice.call(a).forEach(function(i){t.isNullOrUndefined(i.tagName)||(i.style.display=""),e.appendChild(i)}),t.isNullOrUndefined(l)||-1===this.templateEle.indexOf(i)&&this.templateEle.push(i),e},i.prototype.ariaAttrUpdate=function(e){var i=t.select("."+R,e),s=t.select("."+j,e);i.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",i.id),s.setAttribute("role","definition")},i.prototype.contentRendering=function(e){var i=this.createElement("div",{className:j+" e-content-hide",id:t.getUniqueID("acrdn_panel")});t.attributes(i,{"aria-hidden":"true"});var s=this.createElement("div",{className:q});return this.dataSource.length>0?(this.isReact&&this.renderReactTemplates(),t.append(this.getItemTemplate()(this.dataSource[e],this,"itemTemplate",this.element.id+"_itemTemplate",!1),s),i.appendChild(s)):(this.enableHtmlSanitizer&&(this.items[e].content,!0)&&(this.items[e].content=t.SanitizeHtmlHelper.sanitize(this.items[e].content)),i.appendChild(this.fetchElement(s,this.items[e].content,e,!1))),i},i.prototype.expand=function(e){var i=this,s=this.getItems(),n=t.closest(e,"."+B);if(!(t.isNullOrUndefined(e)||t.isVisible(e)&&"true"!==e.getAttribute("e-animate")||n.classList.contains("e-overlay"))){var r=t.closest(n,".e-acrdn-root").querySelector(".e-expand-state"),l={name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing},o=t.select(".e-toggle-icon",n).firstElementChild,a={element:n,item:s[this.getIndexByItem(n)],index:this.getIndexByItem(n),content:n.querySelector("."+j),isExpanded:!0};this.trigger("expanding",a,function(s){s.cancel||(o.classList.add("e-toggle-animation"),i.expandedItemsPush(n),t.isNullOrUndefined(r)||r.classList.remove("e-expand-state"),n.classList.add("e-expand-state"),"None"===l.name?(i.expandProgress("begin",o,e,n,s),i.expandProgress("end",o,e,n,s)):i.expandAnimation(l.name,o,e,n,l,s))})}},i.prototype.expandAnimation=function(e,i,s,n,r,l){var o,a=this;this.lastActiveItemId=n.id,"SlideDown"===e?(r.begin=function(){a.expandProgress("begin",i,s,n,l),s.style.position="absolute",o=n.offsetHeight,s.style.maxHeight=s.offsetHeight+"px",n.style.maxHeight=""},r.progress=function(){n.style.minHeight=o+s.offsetHeight+"px"},r.end=function(){t.setStyleAttribute(s,{position:"",maxHeight:""}),n.style.minHeight="",a.expandProgress("end",i,s,n,l)}):(r.begin=function(){a.expandProgress("begin",i,s,n,l)},r.end=function(){a.expandProgress("end",i,s,n,l)}),new t.Animation(r).animate(s)},i.prototype.expandProgress=function(e,i,s,n,r){this.remove(s,"e-content-hide"),this.add(n,"e-selected"),this.add(i,"e-expand-icon"),"end"===e&&(this.add(n,"e-active"),s.setAttribute("aria-hidden","false"),t.attributes(n,{"aria-expanded":"true"}),t.attributes(s.previousElementSibling,{"aria-selected":"true","aria-label":"expanded"}),i.classList.remove("e-toggle-animation"),this.trigger("expanded",r))},i.prototype.expandedItemsPush=function(e){var t=this.getIndexByItem(e);if(-1===this.expandedIndices.indexOf(t)){var i=[].slice.call(this.expandedIndices);i.push(t),this.setProperties({expandedIndices:i},!0)}},i.prototype.getIndexByItem=function(e){var t=this.getItemElements();return[].slice.call(t).indexOf(e)},i.prototype.getItemElements=function(){var e=[],t=this.element.children;return[].slice.call(t).forEach(function(t){t.classList.contains(B)&&e.push(t)}),e},i.prototype.expandedItemsPop=function(e){var t=this.getIndexByItem(e),i=[].slice.call(this.expandedIndices);i.splice(i.indexOf(t),1),this.setProperties({expandedIndices:i},!0)},i.prototype.collapse=function(e){var i=this,s=this.getItems(),n=t.closest(e,"."+B);if(!t.isNullOrUndefined(e)&&t.isVisible(e)&&!n.classList.contains("e-overlay")){var r={name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing},l=t.select(".e-toggle-icon",n).firstElementChild,o={element:n,item:s[this.getIndexByItem(n)],index:this.getIndexByItem(n),content:n.querySelector("."+j),isExpanded:!1};this.trigger("expanding",o,function(t){t.cancel||(i.expandedItemsPop(n),n.classList.add("e-expand-state"),l.classList.add("e-toggle-animation"),"None"===r.name?(i.collapseProgress("begin",l,e,n,t),i.collapseProgress("end",l,e,n,t)):i.collapseAnimation(r.name,e,n,l,r,t))})}},i.prototype.collapseAnimation=function(e,i,s,n,r,l){var o,a,d,h,c=this;this.lastActiveItemId=s.id,"SlideUp"===e?(r.begin=function(){d=s.offsetHeight,s.style.minHeight=d+"px",i.style.position="absolute",o=s.offsetHeight,a=i.offsetHeight,i.style.maxHeight=a+"px",c.collapseProgress("begin",n,i,s,l)},r.progress=function(){(h=o-(a-i.offsetHeight))<d&&(s.style.minHeight=h+"px")},r.end=function(){i.style.display="none",c.collapseProgress("end",n,i,s,l),s.style.minHeight="",t.setStyleAttribute(i,{position:"",maxHeight:"",display:""})}):(r.begin=function(){c.collapseProgress("begin",n,i,s,l)},r.end=function(){c.collapseProgress("end",n,i,s,l)}),new t.Animation(r).animate(i)},i.prototype.collapseProgress=function(e,i,s,n,r){this.remove(i,"e-expand-icon"),this.remove(n,"e-selected"),"end"===e&&(this.add(s,"e-content-hide"),i.classList.remove("e-toggle-animation"),this.remove(n,"e-active"),s.setAttribute("aria-hidden","true"),t.attributes(n,{"aria-expanded":"false"}),t.attributes(s.previousElementSibling,{"aria-selected":"false","aria-label":"collapsed"}),this.trigger("expanded",r))},i.prototype.getModuleName=function(){return"accordion"},i.prototype.itemAttribUpdate=function(){var e=this.getItems(),i=this.getItemElements(),s=e.length;i.forEach(function(e){t.select("."+R,e).setAttribute("aria-level",""+s)})},i.prototype.getItems=function(){return this.itemTemplate&&this.headerTemplate?this.dataSource:this.items},i.prototype.addItem=function(e,i){var s=this,n=this.element,r=this.getItemElements(),l=this.getItems();t.isNullOrUndefined(i)&&(i=l.length),n.childElementCount>=i&&(e instanceof Array?e:[e]).forEach(function(e,o){var a=i+o;l.splice(a,0,e);var d=s.renderInnerItem(e,a);n.childElementCount===a?n.appendChild(d):n.insertBefore(d,r[a]),t.EventHandler.add(d.querySelector("."+R),"focus",s.focusIn,s),t.EventHandler.add(d.querySelector("."+R),"blur",s.focusOut,s),s.itemAttribUpdate(),s.expandedIndices=[],s.expandedItemRefresh(n),e&&e.expanded&&s.expandItem(!0,a)}),this.isReact&&this.renderReactTemplates()},i.prototype.expandedItemRefresh=function(e){var t=this,i=this.getItemElements();[].slice.call(i).forEach(function(e){e.classList.contains("e-selected")&&t.expandedItemsPush(e)})},i.prototype.removeItem=function(e){this.isReact&&this.clearTemplate(["headerTemplate","itemTemplate"],e);var i=this.getItemElements()[e],s=this.getItems();t.isNullOrUndefined(i)||(this.restoreContent(e),t.detach(i),s.splice(e,1),this.itemAttribUpdate(),this.expandedIndices=[],this.expandedItemRefresh(this.element))},i.prototype.select=function(e){var i=this.getItemElements()[e];t.isNullOrUndefined(i)||t.isNullOrUndefined(t.select("."+R,i))||i.children[0].focus()},i.prototype.hideItem=function(e,i){var s=this.getItemElements()[e];t.isNullOrUndefined(s)||(t.isNullOrUndefined(i)&&(i=!0),i?this.add(s,"e-hide"):this.remove(s,"e-hide"))},i.prototype.enableItem=function(e,i){var s=this.getItemElements()[e];if(!t.isNullOrUndefined(s)){var n=s.firstElementChild;i?(this.remove(s,"e-overlay"),t.attributes(n,{tabindex:"0","aria-disabled":"false"}),n.focus()):(s.classList.contains("e-active")&&(this.expandItem(!1,e),this.eleMoveFocus("movedown",this.element,n)),this.add(s,"e-overlay"),n.setAttribute("aria-disabled","true"),n.removeAttribute("tabindex"))}},i.prototype.refresh=function(){this.isServerRendered||e.prototype.refresh.call(this)},i.prototype.expandItem=function(e,i){var s=this,n=this.getItemElements();if(t.isNullOrUndefined(i))if("Single"===this.expandMode&&e){o=n[n.length-1];this.itemExpand(e,o,this.getIndexByItem(o))}else{var r=t.select("#"+this.lastActiveItemId,this.element);[].slice.call(n).forEach(function(t){s.itemExpand(e,t,s.getIndexByItem(t)),t.classList.remove("e-expand-state")});var l=t.select(".e-expand-state",this.element);l&&l.classList.remove("e-expand-state"),r&&r.classList.add("e-expand-state")}else{var o=n[i];if(t.isNullOrUndefined(o)||!o.classList.contains("e-select")||o.classList.contains("e-active")&&e)return;"Single"===this.expandMode&&this.expandItem(!1),this.itemExpand(e,o,i)}},i.prototype.itemExpand=function(e,i,s){var n=this,r=i.children[1];if(!i.classList.contains("e-overlay")){if(t.isNullOrUndefined(r)&&e)if(this.isServerRendered){var l=i.id;this.items.length>0?this.interopAdaptor.invokeMethodAsync("OnItemClick",s).then(function(){n.isDestroyed||(r=i.children[1],n.expand(r))}):this.interopAdaptor.invokeMethodAsync("OnDataClick",l).then(function(){n.isDestroyed||(r=i.children[1],n.expand(r))})}else r=this.contentRendering(s),i.appendChild(r),this.ariaAttrUpdate(i),this.expand(r);else t.isNullOrUndefined(r)||(e?this.expand(r):this.collapse(r));this.isReact&&this.renderReactTemplates()}},i.prototype.destroyItems=function(){this.restoreContent(null),this.isReact&&this.clearTemplate(),[].slice.call(this.element.querySelectorAll("."+B)).forEach(function(e){t.detach(e)})},i.prototype.restoreContent=function(e){var i;i=t.isNullOrUndefined(e)?this.element:this.element.querySelectorAll("."+B)[e],this.templateEle.forEach(function(e){t.isNullOrUndefined(i.querySelector(e))||(document.body.appendChild(i.querySelector(e)).style.display="none")})},i.prototype.updateItem=function(e,i){if(!t.isNullOrUndefined(e)){var s=this.getItems(),n=s[i];s.splice(i,1),this.restoreContent(i),t.detach(e),this.addItem(n,i)}},i.prototype.setTemplate=function(e,t,i){t.innerHTML="",this.templateCompile(t,e,i),this.isReact&&this.renderReactTemplates()},i.prototype.templateCompile=function(e,t,i){var s=this.createElement("div");this.fetchElement(s,t,i,!1),0!==s.childNodes.length&&[].slice.call(s.childNodes).forEach(function(t){e.appendChild(t)})},i.prototype.getPersistData=function(){var e=["expandedIndices"];return this.addOnPersist(e)},i.prototype.onPropertyChanged=function(e,i){for(var s=this.element,n=!1,r=0,l=Object.keys(e);r<l.length;r++)switch(l[r]){case"items":if(this.isServerRendered){this.wireFocusEvents();break}if(e.items instanceof Array&&i.items instanceof Array)n=!0;else for(var o=Object.keys(e.items),a=0;a<o.length;a++){var d=parseInt(Object.keys(e.items)[a],10),h=Object.keys(e.items[d])[0],c=t.selectAll("."+B,this.element)[d],p=Object(i.items[d])[h],u=Object(e.items[d])[h],f=h;if(("header"===f||"iconCss"===f||"expanded"===f||"content"===f&&""===p)&&this.updateItem(c,d),"cssClass"!==h||t.isNullOrUndefined(c)||(c.classList.remove(p),c.classList.add(u)),"visible"!==h||t.isNullOrUndefined(c)||(!1===Object(e.items[d])[h]?c.classList.add("e-hide"):c.classList.remove("e-hide")),"disabled"!==h||t.isNullOrUndefined(c)||this.enableItem(d,!u),"content"===h&&!t.isNullOrUndefined(c)&&2===c.children.length)if("function"==typeof u){var m=c.querySelector("."+q);m.innerHTML="",this.setTemplate(u,m,d)}else c.classList.contains("e-selected")&&this.expandItem(!1,d),t.detach(c.querySelector("."+j))}break;case"dataSource":case"expandedIndices":null===this.expandedIndices&&(this.expandedIndices=[]),n=!0;break;case"headerTemplate":this.initializeheaderTemplate(),n=!0;break;case"itemTemplate":this.initializeItemTemplate(),n=!0;break;case"enableRtl":e.enableRtl?this.add(s,"e-rtl"):this.remove(s,"e-rtl");break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"expandMode":"Single"===e.expandMode?(this.element.setAttribute("aria-multiselectable","false"),this.expandedIndices.length>1&&this.expandItem(!1)):this.element.setAttribute("aria-multiselectable","true")}n&&!this.isServerRendered&&(this.initExpand=[],this.expandedIndices.length>0&&(this.initExpand=this.expandedIndices),this.destroyItems(),this.renderItems(),this.initItemExpand())},H([t.Collection([],V)],i.prototype,"items",void 0),H([t.Property([])],i.prototype,"dataSource",void 0),H([t.Property()],i.prototype,"itemTemplate",void 0),H([t.Property()],i.prototype,"headerTemplate",void 0),H([t.Property("100%")],i.prototype,"width",void 0),H([t.Property("auto")],i.prototype,"height",void 0),H([t.Property([])],i.prototype,"expandedIndices",void 0),H([t.Property("Multiple")],i.prototype,"expandMode",void 0),H([t.Property(!1)],i.prototype,"enableHtmlSanitizer",void 0),H([t.Complex({},z)],i.prototype,"animation",void 0),H([t.Event()],i.prototype,"clicked",void 0),H([t.Event()],i.prototype,"expanding",void 0),H([t.Event()],i.prototype,"expanded",void 0),H([t.Event()],i.prototype,"created",void 0),H([t.Event()],i.prototype,"destroyed",void 0),i=H([t.NotifyPropertyChanges],i)}(t.Component),_=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),K=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},Y=function(e){function i(t,i){return e.call(this,t,i)||this}return _(i,e),i.prototype.preRender=function(){this.isMenu=!1,this.element.id=this.element.id||t.getUniqueID("ej2-contextmenu"),e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menubar",tabindex:"0"}),this.element.style.zIndex=s.getZindexPartial(this.element).toString()},i.prototype.open=function(t,i,s){e.prototype.openMenu.call(this,null,null,t,i,null,s)},i.prototype.close=function(){e.prototype.closeMenu.call(this)},i.prototype.onPropertyChanged=function(t,i){e.prototype.onPropertyChanged.call(this,t,i);for(var s=0,n=Object.keys(t);s<n.length;s++)switch(n[s]){case"filter":this.close(),this.filter=t.filter;break;case"target":this.unWireEvents(i.target),this.wireEvents()}},i.prototype.getModuleName=function(){return"contextmenu"},K([t.Property("")],i.prototype,"target",void 0),K([t.Property("")],i.prototype,"filter",void 0),K([t.Collection([],S)],i.prototype,"items",void 0),i=K([t.NotifyPropertyChanges],i)}(I),X=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),G=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},Q="e-vertical",J=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.tempItems=[],s}return X(i,e),i.prototype.getModuleName=function(){return"menu"},i.prototype.preRender=function(){if(this.isMenu=!0,this.element.id=this.element.id||t.getUniqueID("ej2-menu"),this.template)try{document.querySelectorAll(this.template).length&&(this.template=document.querySelector(this.template).innerHTML.trim(),this.clearChanges())}catch(e){}else this.updateMenuItems(this.items);e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menubar",tabindex:"0"}),"Vertical"===this.orientation?(this.element.classList.add(Q),this.hamburgerMode&&!this.target&&this.element.previousElementSibling.classList.add(Q),this.element.setAttribute("aria-orientation","vertical")):t.Browser.isDevice&&!this.enableScrolling&&this.element.parentElement.classList.add("e-scrollable"),this.hamburgerMode&&(this.element.parentElement.classList.add("e-hamburger"),"Horizontal"===this.orientation&&this.element.classList.add("e-hide-menu"))},i.prototype.updateMenuItems=function(e){this.tempItems=e,this.items=[],this.tempItems.map(this.createMenuItems,this),this.setProperties({items:this.items},!0),this.tempItems=[]},i.prototype.onPropertyChanged=function(i,s){for(var n=this,r=0,l=Object.keys(i);r<l.length;r++)switch(l[r]){case"orientation":"Vertical"===i.orientation?(this.element.classList.add(Q),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.add(Q),this.element.classList.remove("e-hide-menu")),this.element.setAttribute("aria-orientation","vertical")):(this.element.classList.remove(Q),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.remove(Q),this.element.classList.add("e-hide-menu")),this.element.removeAttribute("aria-orientation"));break;case"items":Object.keys(s.items).length||this.updateMenuItems(i.items);break;case"hamburgerMode":this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),i.hamburgerMode?(this.element.parentElement.classList.add("e-hamburger"),[].slice.call(this.element.getElementsByClassName("e-blankicon")).forEach(function(e){e.style[n.enableRtl?"paddingRight":"paddingLeft"]=""})):(this.element.parentElement.classList.remove("e-hamburger"),"Vertical"===this.orientation&&this.setBlankIconStyle(this.element)),"Vertical"===this.orientation?(this.target||this.element.previousElementSibling.classList.add(Q),this.element.classList.remove("e-hide-menu")):(this.target?this.element.previousElementSibling.classList.add(Q):this.element.previousElementSibling.classList.remove(Q),this.element.classList[i.hamburgerMode?"add":"remove"]("e-hide-menu"));break;case"title":this.hamburgerMode&&this.element.previousElementSibling&&(i.title=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(i.title):i.title,this.element.previousElementSibling.querySelector(".e-menu-title").innerHTML=i.title);break;case"target":this.hamburgerMode&&(this.unWireEvents(s.target),this.wireEvents(),"Horizontal"===this.orientation&&(i.target?this.element.previousElementSibling.classList.add(Q):(this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),this.element.previousElementSibling.classList.remove(Q)),this.element.classList.add("e-hide-menu")))}e.prototype.onPropertyChanged.call(this,i,s)},i.prototype.createMenuItems=function(e){var t,i,s=this.items,n=this.getField("parentId");if(e[n]){for(t=this.getIndex(e[n].toString(),!0),i=0;i<t.length;i++)s[t[i]].items||(s[t[i]].items=[]),s=s[t[i]].items;s.push(e)}else this.items.push(e)},i.prototype.open=function(){e.prototype.openHamburgerMenu.call(this)},i.prototype.close=function(){e.prototype.closeHamburgerMenu.call(this)},G([t.Property("Horizontal")],i.prototype,"orientation",void 0),G([t.Property("")],i.prototype,"target",void 0),G([t.Property(null)],i.prototype,"template",void 0),G([t.Property(!1)],i.prototype,"enableScrolling",void 0),G([t.Property(!1)],i.prototype,"hamburgerMode",void 0),G([t.Property("Menu")],i.prototype,"title",void 0),G([t.Property(!1)],i.prototype,"enableHtmlSanitizer",void 0),G([t.Complex({itemId:"id",text:"text",parentId:"parentId",iconCss:"iconCss",url:"url",separator:"separator",children:"items"},O)],i.prototype,"fields",void 0),i=G([t.NotifyPropertyChanges],i)}(I),Z=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),$=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},ee="e-tab-header",te="e-tab-wrap",ie="e-toolbar-items",se="e-toolbar-item",ne="e-toolbar-popup",re="e-vertical-tab",le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Z(i,e),$([t.Property("SlideLeftIn")],i.prototype,"effect",void 0),$([t.Property(600)],i.prototype,"duration",void 0),$([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Z(i,e),$([t.Complex({effect:"SlideLeftIn",duration:600,easing:"ease"},le)],i.prototype,"previous",void 0),$([t.Complex({effect:"SlideRightIn",duration:600,easing:"ease"},le)],i.prototype,"next",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Z(i,e),$([t.Property("")],i.prototype,"text",void 0),$([t.Property("")],i.prototype,"iconCss",void 0),$([t.Property("left")],i.prototype,"iconPosition",void 0),i}(t.ChildProperty),de=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Z(i,e),$([t.Complex({},ae)],i.prototype,"header",void 0),$([t.Property(null)],i.prototype,"headerTemplate",void 0),$([t.Property("")],i.prototype,"content",void 0),$([t.Property("")],i.prototype,"cssClass",void 0),$([t.Property(!1)],i.prototype,"disabled",void 0),$([t.Property(!0)],i.prototype,"visible",void 0),$([t.Property()],i.prototype,"id",void 0),i}(t.ChildProperty),he=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.show={},s.hide={},s.maxHeight=0,s.title="Close",s.lastIndex=0,s.isAdd=!1,s.isIconAlone=!1,s.draggableItems=[],s.resizeContext=s.refreshActElePosition.bind(s),s.keyConfigs={tab:"tab",home:"home",end:"end",enter:"enter",space:"space",delete:"delete",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow"},s}return Z(i,e),i.prototype.destroy=function(){var i=this;if(this.isReact&&this.clearTemplate(),t.isNullOrUndefined(this.tbObj)||this.tbObj.destroy(),this.unWireEvents(),["role","aria-disabled","aria-activedescendant","tabindex","aria-orientation"].forEach(function(e){i.element.removeAttribute(e)}),this.expTemplateContent(),this.isTemplate){var s=t.select(".e-tab > .e-content",this.element);this.element.classList.remove("e-template"),t.isNullOrUndefined(s)||(s.innerHTML=this.cnt)}else for(;this.element.firstElementChild;)t.remove(this.element.firstElementChild);e.prototype.destroy.call(this),this.trigger("destroyed")},i.prototype.refresh=function(){this.isReact&&this.clearTemplate(),this.isServerRendered?this.isServerRendered&&"Dynamic"!==this.loadOn&&this.setActiveBorder():e.prototype.refresh.call(this),this.isReact&&this.renderReactTemplates()},i.prototype.preRender=function(){var e=t.closest(this.element,".e-content");this.prevIndex=0,this.isNested=!1,this.isPopup=!1,this.initRender=!0,this.isSwipeed=!1,this.itemIndexArray=[],this.templateEle=[],t.isNullOrUndefined(e)||(e.parentElement.classList.add("e-nested"),this.isNested=!0);var i=t.Browser.info.name,s="msie"===i?"e-ie":"edge"===i?"e-edge":"safari"===i?"e-safari":"";t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.setCssClass(this.element,this.cssClass,!0),t.attributes(this.element,{role:"tablist","aria-disabled":"false","aria-activedescendant":""}),this.setCssClass(this.element,s,!0),this.updatePopAnimationConfig()},i.prototype.render=function(){this.btnCls=this.createElement("span",{className:"e-icons e-close-icon",attrs:{title:this.title}}),this.tabId=this.element.id.length>0?"-"+this.element.id:t.getRandomId(),this.renderContainer(),this.wireEvents(),this.initRender=!1},i.prototype.renderContainer=function(){if(this.isServerRendered)return void(this.isTemplate=!1);var e=this.element;if(this.items.forEach(function(e,i){t.isNullOrUndefined(e.id)&&!t.isNullOrUndefined(e.setProperties)&&e.setProperties({id:"tabitem_"+i.toString()},!0)}),this.items.length>0&&0===e.children.length)e.appendChild(this.createElement("div",{className:"e-content"})),this.setOrientation(this.headerPlacement,this.createElement("div",{className:ee})),this.isTemplate=!1;else if(this.element.children.length>0){this.isTemplate=!0,e.classList.add("e-template");var i=e.querySelector(".e-tab-header");i&&"Bottom"===this.headerPlacement&&this.setOrientation(this.headerPlacement,i)}if(!t.isNullOrUndefined(t.select(".e-tab-header",this.element))&&!t.isNullOrUndefined(t.select(".e-content",this.element))){if(this.renderHeader(),this.tbItems=t.select(".e-tab-header ."+ie,this.element),t.isNullOrUndefined(this.tbItems)||t.rippleEffect(this.tbItems,{selector:".e-tab-wrap"}),this.renderContent(),t.selectAll("."+se,this.element).length>0){this.tbItems=t.select(".e-tab-header ."+ie,this.element),this.bdrLine=this.createElement("div",{className:"e-indicator e-hidden e-ignore"});var s=t.select("."+this.scrCntClass,this.tbItems);t.isNullOrUndefined(s)?this.tbItems.insertBefore(this.bdrLine,this.tbItems.firstChild):s.insertBefore(this.bdrLine,s.firstChild),this.setContentHeight(!0),this.select(this.selectedItem)}if(!t.isNullOrUndefined(this.tbItem))for(var n=0;n<this.items.length;n++){var r=this.items[n].id;this.tbItem[n].setAttribute("data-id",r)}this.setRTL(this.enableRtl)}},i.prototype.serverItemsChanged=function(){if(this.enableAnimation=!1,this.setActive(this.selectedItem,!0),"Dynamic"!==this.loadOn&&!t.isNullOrUndefined(this.cntEle)){var e=[].slice.call(this.cntEle.children),i="e-content"+this.tabId+"_"+this.selectedItem;e.forEach(function(e){e.classList.contains("e-active")&&e.id!==i&&e.classList.remove("e-active"),e.id===i&&e.classList.add("e-active")}),this.prevIndex=this.selectedItem,this.triggerAnimation("e-item"+this.tabId+"_"+this.selectedItem,!1)}this.enableAnimation=!0},i.prototype.headerReady=function(){if(this.initRender=!0,this.hdrEle=this.getTabHeader(),this.setOrientation(this.headerPlacement,this.hdrEle),t.isNullOrUndefined(this.hdrEle)||(this.tbObj=this.hdrEle&&this.hdrEle.ej2_instances[0]),this.tbObj.clicked=this.clickHandler.bind(this),this.tbObj.on("onItemsChanged",this.serverItemsChanged.bind(this)),this.tbItems=t.select(".e-tab-header ."+ie,this.element),t.isNullOrUndefined(this.tbItems)||t.rippleEffect(this.tbItems,{selector:".e-tab-wrap"}),t.selectAll("."+se,this.element).length>0){this.bdrLine=t.select(".e-indicator.e-ignore",this.element);var e=t.select("."+this.scrCntClass,this.tbItems);t.isNullOrUndefined(e)?this.tbItems.insertBefore(this.bdrLine,this.tbItems.firstElementChild):e.insertBefore(this.bdrLine,e.firstElementChild),this.select(this.selectedItem)}if(this.cntEle=t.select(".e-tab > .e-content",this.element),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)})),"Demand"===this.loadOn){var i=this.setActiveContent();this.triggerAnimation(i,!1)}this.initRender=!1,this.renderComplete()},i.prototype.setActiveContent=function(){var e="e-item"+this.tabId+"_"+this.selectedItem,i=this.getTrgContent(this.cntEle,this.extIndex(e));return t.isNullOrUndefined(i)||i.classList.add("e-active"),e},i.prototype.renderHeader=function(){var e=this,i=this.headerPlacement,s=[];if(this.hdrEle=this.getTabHeader(),this.addVerticalClass(),this.isTemplate){this.element.children.length>1&&this.element.children[1].classList.contains(ee)&&this.setProperties({headerPlacement:"Bottom"},!0);for(var n=this.hdrEle.children.length,r=[],l=0;l<n;l++)r.push(this.hdrEle.children.item(l).innerHTML);if(n>0){for(;this.hdrEle.firstElementChild;)t.detach(this.hdrEle.firstElementChild);var o=this.createElement("div",{className:"e-items"});this.hdrEle.appendChild(o),r.forEach(function(i,s){e.lastIndex=s;var n={className:"e-item",id:"e-item"+e.tabId+"_"+s,attrs:{role:"tab","aria-controls":"e-content"+e.tabId+"_"+s,"aria-selected":"false"}},r=e.createElement("span",{className:"e-tab-text",innerHTML:i,attrs:{role:"presentation"}}).outerHTML,l=e.createElement("div",{className:"e-text-wrap",innerHTML:r+e.btnCls.outerHTML}).outerHTML,a=e.createElement("div",{className:te,innerHTML:l,attrs:{tabIndex:"-1"}});o.appendChild(e.createElement("div",n)),t.selectAll(".e-item",o)[s].appendChild(a)})}}else s=this.parseObject(this.items,0);this.tbObj=new M({width:"Left"===i||"Right"===i?"auto":"100%",height:"Left"===i||"Right"===i?"100%":"auto",overflowMode:this.overflowMode,items:0!==s.length?s:[],clicked:this.clickHandler.bind(this),scrollStep:this.scrollStep,enableHtmlSanitizer:this.enableHtmlSanitizer}),this.tbObj.isStringTemplate=!0,this.tbObj.createElement=this.createElement,this.tbObj.appendTo(this.hdrEle),t.attributes(this.hdrEle,{"aria-label":"tab-header"}),this.updateOrientationAttribute(),this.setCloseButton(this.showCloseButton)},i.prototype.renderContent=function(){this.cntEle=t.select(".e-content",this.element);var e=t.selectAll("."+se,this.element);if(this.isTemplate){this.cnt=this.cntEle.children.length>0?this.cntEle.innerHTML:"";for(var i=this.cntEle.children,s=0;s<e.length;s++)i.length-1>=s&&(i.item(s).className+="e-item",t.attributes(i.item(s),{role:"tabpanel","aria-labelledby":"e-item"+this.tabId+"_"+s}),i.item(s).id="e-content"+this.tabId+"_"+s)}},i.prototype.reRenderItems=function(){this.renderContainer(),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)}))},i.prototype.parseObject=function(e,i){var s,n=this,r=t.selectAll("."+se,this.element).length,l=[],o=[];return e.forEach(function(e,a){var d=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconPosition)?"":e.header.iconPosition,h=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconCss)?"":e.header.iconCss;if(t.isNullOrUndefined(e.headerTemplate)&&(t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.text)||0===e.header.text.length&&""===h))return void o.push(a);var c=e.headerTemplate||e.header.text;"string"==typeof c&&n.enableHtmlSanitizer&&(c=t.SanitizeHtmlHelper.sanitize(c)),n.lastIndex=0===r?a:n.isReplace?i+a:n.lastIndex+1;var p=e.disabled?" e-disable e-overlay":"",u=!1===e.visible?" e-hidden":"";s=n.createElement("div",{className:"e-tab-text",attrs:{role:"presentation"}});var f=c instanceof Object?c.outerHTML:c,m=!t.isNullOrUndefined(f)&&""!==f;t.isNullOrUndefined(c.tagName)?n.headerTextCompile(s,c,a):s.appendChild(c);var v=n.createElement("span",{className:"e-icons e-tab-icon e-icon-"+d+" "+h}),g=n.createElement("div",{className:"e-text-wrap"});g.appendChild(s),""!==c&&void 0!==c&&""!==h?("left"===d||"top"===d?g.insertBefore(v,g.firstElementChild):g.appendChild(v),s,n.isIconAlone=!1):(""===h?s:v)===v&&(t.detach(s),g.appendChild(v),n.isIconAlone=!0);var y=e.disabled?{}:{tabIndex:"-1"};g.appendChild(n.btnCls.cloneNode(!0));var b=n.createElement("div",{className:te,attrs:y});b.appendChild(g),n.itemIndexArray===[]?n.itemIndexArray.push("e-item"+n.tabId+"_"+n.lastIndex):n.itemIndexArray.splice(i+a,0,"e-item"+n.tabId+"_"+n.lastIndex);var C={htmlAttributes:{id:"e-item"+n.tabId+"_"+n.lastIndex,role:"tab","aria-selected":"false"},template:b};C.cssClass=(void 0!==e.cssClass?e.cssClass:" ")+" "+p+" "+u+(""!==h?"e-i"+d:"")+" "+(m?"":"e-icon"),"top"!==d&&"bottom"!==d||n.element.classList.add("e-vertical-icon"),l.push(C),a++}),this.isAdd||o.forEach(function(e){n.items.splice(e,1)}),this.isIconAlone?this.element.classList.add("e-icon-tab"):this.element.classList.remove("e-icon-tab"),l},i.prototype.removeActiveClass=function(){var e=this.getTabHeader();if(e){var i=t.selectAll(".e-toolbar-item.e-active",e);[].slice.call(i).forEach(function(e){return e.classList.remove("e-active")})}},i.prototype.checkPopupOverflow=function(e){this.tbPop=t.select(".e-toolbar-pop",this.element);var i=t.select(".e-hor-nav",this.element),s=t.select("."+ie,this.element),n=s.lastChild,r=!1;return!this.isVertical()&&(this.enableRtl&&i.offsetLeft+i.offsetWidth>s.offsetLeft||!this.enableRtl&&i.offsetLeft<s.offsetWidth)?r=!0:this.isVertical()&&i.offsetTop<n.offsetTop+n.offsetHeight&&(r=!0),r&&(e.classList.add(ne),this.tbPop.insertBefore(e,t.selectAll("."+ne,this.tbPop)[0])),!0},i.prototype.popupHandler=function(e){var i=e.querySelector(".e-ripple-element");t.isNullOrUndefined(i)||(i.outerHTML="",e.querySelector("."+te).classList.remove("e-ripple")),this.tbItem=t.selectAll(".e-toolbar-items ."+se,this.hdrEle);var s=this.tbItem[this.tbItem.length-1];if(0!==this.tbItem.length){if(e.classList.remove(ne),e.removeAttribute("style"),this.tbItems.appendChild(e),this.actEleId=e.id,this.checkPopupOverflow(s)){var n=this.tbItems.lastChild.previousElementSibling;this.checkPopupOverflow(n)}this.isPopup=!0}return t.selectAll("."+se,this.tbItems).length-1},i.prototype.updateOrientationAttribute=function(){t.attributes(this.element,{"aria-orientation":this.isVertical()?"vertical":"horizontal"})},i.prototype.setCloseButton=function(e){var i=t.select(".e-tab-header",this.element);!0===e?i.classList.add("e-close-show"):i.classList.remove("e-close-show"),this.tbObj.refreshOverflow(),this.refreshActElePosition()},i.prototype.prevCtnAnimation=function(e,t){this.enableRtl||this.element.classList.contains("e-rtl");return this.isPopup||e<=t?"SlideLeftIn"===this.animation.previous.effect?{name:"SlideLeftOut",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}:null:"SlideRightIn"===this.animation.next.effect?{name:"SlideRightOut",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}:null},i.prototype.triggerPrevAnimation=function(e,i){var s=this,n=this.prevCtnAnimation(i,this.selectedItem);t.isNullOrUndefined(n)?e.classList.remove("e-active"):(n.begin=function(){t.setStyleAttribute(e,{position:"absolute"}),e.classList.add("e-progress"),e.classList.add("e-view")},n.end=function(){e.style.display="none",e.classList.remove("e-active"),e.classList.remove("e-progress"),e.classList.remove("e-view"),t.setStyleAttribute(e,{display:"",position:""}),0!==e.childNodes.length||s.isTemplate||t.detach(e)},new t.Animation(n).animate(e))},i.prototype.triggerAnimation=function(e,i){var s,n,r=this,l=this.prevIndex;if(!this.isServerRendered||this.isServerRendered&&"Dynamic"!==this.loadOn){[].slice.call(this.element.querySelector(".e-content").children).forEach(function(e){e.id===r.prevActiveEle&&(s=e)});var o=this.tbItem[l];if(n=this.getTrgContent(this.cntEle,this.extIndex(e)),t.isNullOrUndefined(s)&&!t.isNullOrUndefined(o)){var a=this.extIndex(o.id);s=this.getTrgContent(this.cntEle,a)}}else n=this.cntEle.firstElementChild;if(t.isNullOrUndefined(n)||(this.prevActiveEle=n.id),this.initRender||!1===i||this.animation==={}||t.isNullOrUndefined(this.animation))return void(s&&s!==n&&s.classList.remove("e-active"));var d,h=t.select(".e-content",this.element);if(this.prevIndex>this.selectedItem&&!this.isPopup){var c=this.animation.previous.effect;d={name:"None"===c?"":"SlideLeftIn"!==c?c:"SlideLeftIn",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}}else if(this.isPopup||this.prevIndex<this.selectedItem||this.prevIndex===this.selectedItem){var p=this.animation.next.effect;d={name:"None"===p?"":"SlideRightIn"!==p?p:"SlideRightIn",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}}d.progress=function(){h.classList.add("e-progress"),r.setActiveBorder()},d.end=function(){h.classList.remove("e-progress"),n.classList.add("e-active")},this.initRender||t.isNullOrUndefined(s)||this.triggerPrevAnimation(s,l),this.isPopup=!1,""===d.name?n.classList.add("e-active"):new t.Animation(d).animate(n)},i.prototype.keyPressed=function(e){var i=t.closest(e,".e-tab-header ."+se),s=this.getEleIndex(i);!t.isNullOrUndefined(this.popEle)&&e.classList.contains("e-hor-nav")?this.popEle.classList.contains("e-popup-open")?this.popObj.hide(this.hide):this.popObj.show(this.show):e.classList.contains("e-scroll-nav")?e.click():t.isNullOrUndefined(i)||!1!==i.classList.contains("e-active")||(this.select(s),t.isNullOrUndefined(this.popEle)||this.popObj.hide(this.hide))},i.prototype.getTabHeader=function(){if(!t.isNullOrUndefined(this.element)){var e=[].slice.call(this.element.children).filter(function(e){return e.classList.contains(ee)});if(e.length>0)return e[0];var i=[].slice.call(this.element.children).filter(function(e){return!e.classList.contains("blazor-template")})[0];if(i)return[].slice.call(i.children).filter(function(e){return e.classList.contains(ee)})[0]}},i.prototype.getEleIndex=function(e){return Array.prototype.indexOf.call(t.selectAll("."+se,this.getTabHeader()),e)},i.prototype.extIndex=function(e){return e.replace("e-item"+this.tabId+"_","")},i.prototype.expTemplateContent=function(){var e=this;this.templateEle.forEach(function(i){t.isNullOrUndefined(e.element.querySelector(i))||(document.body.appendChild(e.element.querySelector(i)).style.display="none")})},i.prototype.templateCompile=function(e,t,i){var s=this.createElement("div");this.compileElement(s,t,"content",i),0!==s.childNodes.length&&e.appendChild(s),this.isReact&&this.renderReactTemplates()},i.prototype.compileElement=function(e,i,s,n){var r;"string"==typeof i?(i=i.trim(),e.innerHTML=t.SanitizeHtmlHelper.sanitize(i)):r=t.compile(i);var l;t.isNullOrUndefined(r)||(l=r({},this,s)),!t.isNullOrUndefined(r)&&l.length>0&&[].slice.call(l).forEach(function(t){e.appendChild(t)})},i.prototype.headerTextCompile=function(e,t,i){this.compileElement(e,t,"headerTemplate",i)},i.prototype.getContent=function(e,i,s,n){var r;if("string"==typeof i||t.isNullOrUndefined(i.innerHTML))if("string"==typeof i&&this.enableHtmlSanitizer&&(i=t.SanitizeHtmlHelper.sanitize(i)),"."===i[0]||"#"===i[0])if(document.querySelectorAll(i).length){var l=document.querySelector(i);r=l.outerHTML.trim(),"clone"===s?e.appendChild(l.cloneNode(!0)):(e.appendChild(l),l.style.display="")}else this.templateCompile(e,i,n);else this.templateCompile(e,i,n);else e.appendChild(i);t.isNullOrUndefined(r)||-1===this.templateEle.indexOf(i.toString())&&this.templateEle.push(i.toString())},i.prototype.getTrgContent=function(e,i){return this.element.classList.contains("e-nested")?t.select(".e-nested> .e-content > #e-content"+this.tabId+"_"+i,this.element):this.findEle(e.children,"e-content"+this.tabId+"_"+i)},i.prototype.findEle=function(e,t){for(var i,s=0;s<e.length;s++)if(e[s].id===t){i=e[s];break}return i},i.prototype.isVertical=function(){var e="Left"===this.headerPlacement||"Right"===this.headerPlacement;return this.scrCntClass=e?"e-vscroll-content":"e-hscroll-content",e},i.prototype.addVerticalClass=function(){if(this.isVertical()){var e="Left"===this.headerPlacement?"e-vertical-left":"e-vertical-right";t.addClass([this.hdrEle],["e-vertical",e]),this.element.classList.contains("e-nested")?t.addClass([this.hdrEle],[re,e]):t.addClass([this.element],[re,e])}"Bottom"===this.headerPlacement&&t.addClass([this.hdrEle],["e-horizontal-bottom"])},i.prototype.updatePopAnimationConfig=function(){this.show={name:this.isVertical()?"FadeIn":"SlideDown",duration:100},this.hide={name:this.isVertical()?"FadeOut":"SlideUp",duration:100}},i.prototype.changeOrientation=function(e){this.setOrientation(e,this.hdrEle);var i=this.hdrEle.querySelector(".e-active"),s=!!this.hdrEle.classList.contains("e-vertical");t.removeClass([this.element],[re]),t.removeClass([this.hdrEle],["e-vertical","e-vertical-left","e-vertical-right"]),s!==this.isVertical()&&(this.changeToolbarOrientation(),!t.isNullOrUndefined(i)&&i.classList.contains(ne)&&this.popupHandler(i)),this.addVerticalClass(),this.updateOrientationAttribute(),this.setActiveBorder(),this.focusItem()},i.prototype.focusItem=function(){var e=t.select(" #e-item"+this.tabId+"_"+this.selectedItem,this.hdrEle);t.isNullOrUndefined(e)||e.firstElementChild.focus()},i.prototype.serverChangeOrientation=function(e,i){this.setOrientation(e,this.hdrEle),t.removeClass([this.element],[re]),("Left"===e||"Right"===e)!==("Left"===i||"Right"===i)&&this.changeToolbarOrientation(),this.isVertical()&&t.addClass([this.element],[re]),this.updateOrientationAttribute(),this.setActiveBorder(),this.focusItem()},i.prototype.changeToolbarOrientation=function(){this.tbObj.setProperties({height:this.isVertical()?"100%":"auto",width:this.isVertical()?"auto":"100%"},!0),this.tbObj.changeOrientation(),this.updatePopAnimationConfig()},i.prototype.setOrientation=function(e,i){var s=Array.prototype.indexOf.call(this.element.children,i),n=Array.prototype.indexOf.call(this.element.children,this.element.querySelector(".e-content"));"Bottom"===e&&n>s?this.element.appendChild(i):(t.removeClass([i],["e-horizontal-bottom"]),this.element.insertBefore(i,t.select(".e-content",this.element)))},i.prototype.setCssClass=function(e,t,i){if(""!==t)for(var s=t.split(" "),n=0;n<s.length;n++)i?e.classList.add(s[n]):e.classList.remove(s[n])},i.prototype.setContentHeight=function(e){if(this.element.classList.contains("e-fill-mode")&&t.removeClass([this.element],["e-fill-mode"]),!t.isNullOrUndefined(this.cntEle)){var i=this.getTabHeader();if("None"===this.heightAdjustMode){if("auto"===this.height)return;this.isVertical()||t.setStyleAttribute(this.cntEle,{height:this.element.offsetHeight-i.offsetHeight+"px"})}else if("Fill"===this.heightAdjustMode)t.addClass([this.element],["e-fill-mode"]),t.setStyleAttribute(this.element,{height:"100%"}),t.setStyleAttribute(this.cntEle,{height:this.element.offsetHeight-i.offsetHeight+"px"});else if("Auto"===this.heightAdjustMode){if(!0===this.isTemplate)for(var s=t.selectAll(".e-content > .e-item",this.element),n=0;n<s.length;n++)s[n].setAttribute("style","display:block; visibility: visible"),this.maxHeight=Math.max(this.maxHeight,this.getHeight(s[n])),s[n].style.removeProperty("display"),s[n].style.removeProperty("visibility");else{this.cntEle=t.select(".e-content",this.element),!0===e&&this.cntEle.appendChild(this.createElement("div",{id:"e-content"+this.tabId+"_0",className:"e-item e-active",attrs:{role:"tabpanel","aria-labelledby":"e-item"+this.tabId+"_0"}}));for(var r=this.cntEle.children.item(0),n=0;n<this.items.length;n++)for(this.getContent(r,this.items[n].content,"clone",n),this.maxHeight=Math.max(this.maxHeight,this.getHeight(r));r.firstChild;)r.removeChild(r.firstChild);this.clearTemplate(["content"]),this.templateEle=[],this.getContent(r,this.items[0].content,"render",0),r.classList.remove("e-active")}t.setStyleAttribute(this.cntEle,{height:this.maxHeight+"px"})}else t.setStyleAttribute(this.cntEle,{height:"auto"})}},i.prototype.getHeight=function(e){var t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.getPropertyValue("padding-top"))+parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))},i.prototype.setActiveBorder=function(){var e=this.getTabHeader(),i=t.select(".e-toolbar-item.e-active",e);if(null!==i){this.isServerRendered&&i.classList.contains(ne)&&this.popupHandler(i);var s=t.closest(i,".e-tab");if(this.element===s){this.tbItems=t.select("."+ie,e);var n=t.select(".e-indicator",e),r=t.select(".e-toolbar-items ."+this.scrCntClass,e);if(this.isVertical())t.setStyleAttribute(n,{left:"",right:""}),0!==(t.isNullOrUndefined(r)?this.tbItems.offsetHeight:r.offsetHeight)?t.setStyleAttribute(n,{top:i.offsetTop+"px",height:i.offsetHeight+"px"}):t.setStyleAttribute(n,{top:0,height:0});else{if("MultiRow"===this.overflowMode){var l=t.select(".e-indicator",this.element);t.setStyleAttribute(l,{top:i.offsetHeight+i.offsetTop+"px",height:""})}else t.setStyleAttribute(n,{top:"",height:""});var o=t.isNullOrUndefined(r)?this.tbItems.offsetWidth:r.offsetWidth;0!==o?t.setStyleAttribute(n,{left:i.offsetLeft+"px",right:o-(i.offsetLeft+i.offsetWidth)+"px"}):t.setStyleAttribute(n,{left:"auto",right:"auto"})}t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.remove("e-hidden")}}},i.prototype.setActive=function(e,i){void 0===i&&(i=!1),this.tbItem=t.selectAll("."+se,this.getTabHeader());var s=this.tbItem[e];if(this.isServerRendered&&s&&(e=parseInt(s.getAttribute("data-index"),10)),!(e<0||isNaN(e)||0===this.tbItem.length)){if(e>=0&&!i&&(this.allowServerDataBinding=!1,this.setProperties({selectedItem:e},!0),this.allowServerDataBinding=!0,this.initRender||this.serverDataBind()),s.classList.contains("e-active"))return void this.setActiveBorder();if(!this.isTemplate){var n=this.tbItem[this.prevIndex];t.isNullOrUndefined(n)||n.removeAttribute("aria-controls"),t.attributes(s,{"aria-controls":"e-content"+this.tabId+"_"+e})}var r=s.id;this.removeActiveClass(),s.classList.add("e-active"),this.tbItem[this.prevIndex].setAttribute("aria-selected","false"),s.setAttribute("aria-selected","true");var l=Number(this.extIndex(r));if(t.isNullOrUndefined(this.prevActiveEle)&&(this.prevActiveEle="e-content"+this.tabId+"_"+l),t.attributes(this.element,{"aria-activedescendant":r}),this.isTemplate){if(t.select(".e-content",this.element).children.length>0){var o=this.findEle(t.select(".e-content",this.element).children,"e-content"+this.tabId+"_"+l);t.isNullOrUndefined(o)||o.classList.add("e-active"),this.triggerAnimation(r,this.enableAnimation)}}else if(!this.isServerRendered||this.isServerRendered&&"Init"===this.loadOn){this.cntEle=t.select(".e-tab > .e-content",this.element);var a=this.getTrgContent(this.cntEle,this.extIndex(r));if(t.isNullOrUndefined(a)){this.cntEle.appendChild(this.createElement("div",{id:"e-content"+this.tabId+"_"+this.extIndex(r),className:"e-item e-active",attrs:{role:"tabpanel","aria-labelledby":"e-item"+this.tabId+"_"+this.extIndex(r)}}));var d=this.getTrgContent(this.cntEle,this.extIndex(r)),h=Array.prototype.indexOf.call(this.itemIndexArray,r);this.getContent(d,this.items[h].content,"render",h)}else a.classList.add("e-active");this.triggerAnimation(r,this.enableAnimation)}if(this.setActiveBorder(),this.refreshItemVisibility(s),!this.initRender&&!i){s.firstElementChild.focus();var c={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:s,selectedIndex:e,selectedContent:t.select("#e-content"+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwipeed};this.trigger("selected",c)}}},i.prototype.contentReady=function(){var e=this.setActiveContent();this.triggerAnimation(e,this.enableAnimation)},i.prototype.setItems=function(e){this.isReplace=!0,this.tbItems=t.select("."+ie,this.getTabHeader()),this.tbObj.items=this.parseObject(e,0),this.tbObj.dataBind(),this.isReplace=!1},i.prototype.setRTL=function(e){this.tbObj.enableRtl=e,this.tbObj.dataBind(),this.setCssClass(this.element,"e-rtl",e),this.refreshActiveBorder()},i.prototype.refreshActiveBorder=function(){t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add("e-hidden"),this.setActiveBorder()},i.prototype.showPopup=function(e){var i=t.select(".e-popup.e-toolbar-pop",this.hdrEle);if(i.classList.contains("e-popup-close")){var s=i&&i.ej2_instances[0];s.position.X="Left"===this.headerPlacement?"left":"right",s.dataBind(),s.show(e)}},i.prototype.bindDraggable=function(){var e=this;this.allowDragAndDrop&&this.element.querySelectorAll("."+se).forEach(function(t){e.initializeDrag(t)})},i.prototype.wireEvents=function(){this.bindDraggable(),window.addEventListener("resize",this.resizeContext),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"keydown",this.spaceKeyDown,this),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)})),this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:this.keyConfigs}),this.tabKeyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:{openPopup:"shift+f10",tab:"tab",shiftTab:"shift+tab"},eventName:"keydown"})},i.prototype.unWireEvents=function(){t.isNullOrUndefined(this.keyModule)||this.keyModule.destroy(),t.isNullOrUndefined(this.tabKeyModule)||this.tabKeyModule.destroy(),t.isNullOrUndefined(this.cntEle)||t.isNullOrUndefined(this.touchModule)||this.touchModule.destroy(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"keydown",this.spaceKeyDown),this.element.classList.remove("e-rtl"),this.element.classList.remove("e-focused")},i.prototype.clickHandler=function(e){this.element.classList.remove("e-focused");var i=e.originalEvent.target,s=t.closest(i,"."+se),n=this.getEleIndex(s);i.classList.contains("e-close-icon")?this.removeTab(n):this.isVertical()&&t.closest(i,".e-hor-nav")?this.showPopup(this.show):(this.isPopup=!1,this.isServerRendered&&!t.isNullOrUndefined(s)?parseInt(s.getAttribute("data-index"),10)!==this.selectedItem&&this.select(n):t.isNullOrUndefined(s)||n===this.selectedItem&&n===this.prevIndex||this.select(n,e.originalEvent))},i.prototype.swipeHandler=function(e){if(!(e.velocity<3&&t.isNullOrUndefined(e.originalEvent.changedTouches))){if(e.originalEvent&&e.originalEvent.stopPropagation(),this.isSwipeed=!0,"Right"===e.swipeDirection&&0!==this.selectedItem){for(var i=this.selectedItem-1;i>=0;i--)if(!this.tbItem[i].classList.contains("e-hidden")){this.select(i);break}}else if("Left"===e.swipeDirection&&this.selectedItem!==t.selectAll("."+se,this.element).length-1)for(var s=this.selectedItem+1;s<this.tbItem.length;s++)if(!this.tbItem[s].classList.contains("e-hidden")){this.select(s);break}this.isSwipeed=!1}},i.prototype.spaceKeyDown=function(e){if(32===e.keyCode&&32===e.which||35===e.keyCode&&35===e.which){var i=t.closest(e.target,".e-tab-header");t.isNullOrUndefined(i)||e.preventDefault()}},i.prototype.keyHandler=function(e){if(!this.element.classList.contains("e-disable")){this.element.classList.add("e-focused");var i=e.target,s=this.getTabHeader(),n=t.select(".e-active",s);this.popEle=t.select(".e-toolbar-pop",s),t.isNullOrUndefined(this.popEle)||(this.popObj=this.popEle.ej2_instances[0]);var r=t.closest(document.activeElement,"."+se),l=t.closest(i,"."+se);switch(e.action){case"space":case"enter":if(i.parentElement.classList.contains("e-disable"))return;if("enter"===e.action&&i.classList.contains("e-hor-nav")){this.showPopup(this.show);break}this.keyPressed(i);break;case"tab":case"shiftTab":i.classList.contains(te)&&!1===t.closest(i,"."+se).classList.contains("e-active")&&i.setAttribute("tabindex","-1"),this.popObj&&t.isVisible(this.popObj.element)&&this.popObj.hide(this.hide),n.children.item(0).setAttribute("tabindex","0");break;case"moveLeft":case"moveRight":t.isNullOrUndefined(r)||this.refreshItemVisibility(r);break;case"openPopup":e.preventDefault(),!t.isNullOrUndefined(this.popEle)&&this.popEle.classList.contains("e-popup-close")&&this.popObj.show(this.show);break;case"delete":if(!0===this.showCloseButton&&!t.isNullOrUndefined(l)){var o=l.nextSibling;!t.isNullOrUndefined(o)&&o.classList.contains(se)&&o.firstElementChild.focus(),this.removeTab(this.getEleIndex(l))}this.setActiveBorder()}}},i.prototype.refreshActElePosition=function(){var e=t.select(".e-toolbar-item.e-toolbar-popup.e-active",this.element);t.isNullOrUndefined(e)||this.select(this.getEleIndex(e)),this.refreshActiveBorder()},i.prototype.refreshItemVisibility=function(e){var i=t.select("."+this.scrCntClass,this.tbItems);if(!this.isVertical()&&!t.isNullOrUndefined(i)){var s=t.select(".e-hscroll-bar",this.tbItems),n=s.scrollLeft,r=n+s.offsetWidth,l=e.offsetLeft,o=e.offsetWidth,a=e.offsetLeft+e.offsetWidth;if(n<l&&r<a){d=r-l;s.scrollLeft=n+(o-d)}else if(n>l&&r>a){var d=a-n;s.scrollLeft=n-(o-d)}}},i.prototype.hoverHandler=function(e){var i=e.target;!t.isNullOrUndefined(i.classList)&&i.classList.contains("e-close-icon")&&i.setAttribute("title",new t.L10n("tab",{closeButtonTitle:this.title},this.locale).getConstant("closeButtonTitle"))},i.prototype.evalOnPropertyChangeItems=function(e,i){if(e.items instanceof Array&&i.items instanceof Array)if(this.lastIndex=0,t.isNullOrUndefined(this.tbObj))this.reRenderItems();else{this.isRect&&this.clearTemplate(),this.setItems(e.items),this.templateEle.length>0&&this.expTemplateContent(),this.templateEle=[];for(var s=t.select(".e-tab > .e-content",this.element);s.firstElementChild&&!t.isBlazor();)t.detach(s.firstElementChild);this.select(this.selectedItem)}else for(var n=Object.keys(e.items),r=0;r<n.length;r++){var l=parseInt(Object.keys(e.items)[r],10),o=Object.keys(e.items[l])[0],a=Object(i.items[l])[o],d=Object(e.items[l])[o],h=t.select(".e-toolbar-items #e-item"+this.tabId+"_"+l,this.element),c=t.select(".e-content #e-content"+this.tabId+"_"+l,this.element);if("header"===o||"headerTemplate"===o){var p=t.isNullOrUndefined(this.items[l].header)||t.isNullOrUndefined(this.items[l].header.iconCss)?"":this.items[l].header.iconCss;if(""===(this.items[l].headerTemplate||this.items[l].header.text)&&""===p)this.removeTab(l);else{var u=[];u.push(this.items[l]),this.items.splice(l,1),this.itemIndexArray.splice(l,1),this.tbObj.items.splice(l,1);var f=h.classList.contains("e-hidden");t.detach(h),this.isReplace=!0,this.addTab(u,l),f&&this.hideTab(l),this.isReplace=!1}}if("content"===o&&!t.isNullOrUndefined(c))if(("string"==typeof d||t.isNullOrUndefined(d.innerHTML))&&("."===d[0]||"#"===d[0])&&d.length){var m=document.querySelector(d);c.appendChild(m),m.style.display=""}else""===d&&"#"===a[0]?(document.body.appendChild(this.element.querySelector(a)).style.display="none",c.innerHTML=d):this.isReact&&"object"==typeof d?(c.innerHTML="",this.templateCompile(c,d,l)):"function"!=typeof d&&(c.innerHTML=d);"cssClass"===o&&(t.isNullOrUndefined(h)||(h.classList.remove(a),h.classList.add(d)),t.isNullOrUndefined(c)||(c.classList.remove(a),c.classList.add(d))),"disabled"===o&&this.enableTab(l,!0!==d),"visible"===o&&this.hideTab(l,!0!==d)}},i.prototype.initializeDrag=function(e){var i=this;this.dragArea=t.isNullOrUndefined(this.dragArea)?"#"+this.element.id+" .e-tab-header":this.dragArea;var s=new t.Draggable(e,{dragArea:this.dragArea,dragTarget:"."+se,clone:!0,helper:this.helper.bind(this),dragStart:this.itemDragStart.bind(this),drag:function(e){var s,n,r=i.getEleIndex(i.dragItem),l={draggedItem:i.dragItem,event:e.event,target:e.target,droppedItem:e.target.closest("."+se),clonedElement:i.cloneElement,index:r};if(t.isNullOrUndefined(e.target.closest(".e-tab"))||e.target.closest(".e-tab").isEqualNode(i.element)||".e-tab-header"===i.dragArea){if(e.target.closest(i.dragArea)||"Popup"===i.overflowMode?(document.body.style.cursor="",i.dragItem.querySelector("."+te).style.visibility="hidden",i.cloneElement.classList.contains("e-hidden")&&t.removeClass([i.cloneElement],"e-hidden")):(document.body.style.cursor="not-allowed",t.addClass([i.cloneElement],"e-hidden"),i.dragItem.classList.contains("e-hidden")&&t.removeClass([i.dragItem],"e-hidden"),i.dragItem.querySelector("."+te).style.visibility="visible"),"Scrollable"===i.overflowMode&&!t.isNullOrUndefined(i.element.querySelector(".e-hscroll"))){var o=i.element.querySelector(".e-scroll-right-nav"),a=i.element.querySelector(".e-scroll-left-nav"),d=i.element.querySelector(".e-hscroll-bar");!t.isNullOrUndefined(o)&&Math.abs(o.offsetWidth/2+o.offsetLeft)>i.cloneElement.offsetLeft+i.cloneElement.offsetWidth&&(d.scrollLeft-=10),!t.isNullOrUndefined(a)&&Math.abs(a.offsetLeft+a.offsetWidth-i.cloneElement.offsetLeft)>a.offsetWidth/2&&(d.scrollLeft+=10)}i.cloneElement.style.pointerEvents="none";var h=i.cloneElement.getBoundingClientRect().left,c=i.cloneElement.getBoundingClientRect().top,p=document.elementFromPoint(h,c);n=t.closest(p,"."+se);var u=0;"Scrollable"!==i.overflowMode||t.isNullOrUndefined(i.element.querySelector(".e-hscroll"))||(u=i.element.querySelector(".e-hscroll-content").offsetWidth),null!=n&&!n.isSameNode(i.dragItem)&&n.closest(".e-tab").isSameNode(i.dragItem.closest(".e-tab"))&&((s=i.getEleIndex(n))<r&&Math.abs(n.offsetLeft+n.offsetWidth-i.cloneElement.offsetLeft)>n.offsetWidth/2&&i.dragAction(n,r,s),s>r&&Math.abs(n.offsetWidth/2)+n.offsetLeft-u<i.cloneElement.offsetLeft+i.cloneElement.offsetWidth&&i.dragAction(n,r,s)),i.droppedIndex=i.getEleIndex(i.dragItem),i.trigger("dragging",l)}else i.trigger("dragging",l)},dragStop:this.itemDragStop.bind(this)});this.draggableItems.push(s)},i.prototype.helper=function(e){return this.cloneElement=this.createElement("div"),e.element&&(this.cloneElement=e.element.cloneNode(!0),t.addClass([this.cloneElement],"e-tab-clone-element"),this.element.querySelector(".e-tab-header").classList.contains("e-close-show")&&t.addClass([this.cloneElement],"e-close-show"),t.removeClass([this.cloneElement.querySelector("."+te)],"e-ripple"),t.isNullOrUndefined(this.cloneElement.querySelector(".e-ripple-element"))||t.remove(this.cloneElement.querySelector(".e-ripple-element")),document.body.appendChild(this.cloneElement)),this.cloneElement},i.prototype.itemDragStart=function(e){var i=this;this.draggingItems=this.items.map(function(e){return e}),this.dragItem=e.element;var s={draggedItem:e.element,event:e.event,target:e.target,droppedItem:null,index:this.getEleIndex(this.dragItem),clonedElement:this.cloneElement,cancel:!1};this.trigger("onDragStart",s,function(s){s.cancel?t.detach(i.cloneElement):(i.removeActiveClass(),t.addClass([i.tbItems.querySelector(".e-indicator")],"e-hidden"),i.dragItem.querySelector("."+te).style.visibility="hidden"),t.isBlazor()&&e.bindEvents(t.getElement(e.dragElement))})},i.prototype.dragAction=function(e,t,i){if(this.items.length>0){var s=this.draggingItems[t];this.draggingItems.splice(t,1),this.draggingItems.splice(i,0,s)}if("MultiRow"===this.overflowMode&&e.parentNode.insertBefore(this.dragItem,e.nextElementSibling),t>i)if(this.dragItem.parentElement.isSameNode(e.parentElement))this.dragItem.parentNode.insertBefore(this.dragItem,e);else if("Extended"===this.overflowMode)if(e.isSameNode(e.parentElement.lastChild)){r=this.dragItem.parentNode;e.parentNode.insertBefore(this.dragItem,e),r.insertBefore(e.parentElement.lastChild,r.childNodes[0])}else this.dragItem.parentNode.insertBefore(e.parentElement.lastChild,this.dragItem.parentElement.childNodes[0]),e.parentNode.insertBefore(this.dragItem,e);else{var n=e.parentElement.lastChild;if(e.isSameNode(n)){var r=this.dragItem.parentNode;e.parentNode.insertBefore(this.dragItem,e),r.insertBefore(n,r.childNodes[0])}else this.dragItem.parentNode.insertBefore(e.parentElement.lastChild,this.dragItem.parentElement.childNodes[0]),e.parentNode.insertBefore(this.dragItem,e)}t<i&&(this.dragItem.parentElement.isSameNode(e.parentElement)?this.dragItem.parentNode.insertBefore(e,this.dragItem):"Extended"===this.overflowMode?(this.dragItem.parentElement.appendChild(e.parentElement.firstElementChild),e.parentNode.insertBefore(this.dragItem,e.nextSibling)):(this.dragItem.parentNode.insertBefore(e.parentElement.lastChild,this.dragItem.parentElement.childNodes[0]),e.parentNode.insertBefore(this.dragItem,e)))},i.prototype.itemDragStop=function(e){var i=this;t.detach(this.cloneElement),this.dragItem.querySelector("."+te).style.visibility="visible",document.body.style.cursor="";var s={draggedItem:this.dragItem,event:e.event,target:e.target,droppedItem:this.tbItem[this.droppedIndex],clonedElement:null,index:this.droppedIndex,cancel:!1};this.trigger("dragged",s,function(e){e.cancel?i.refresh():i.items.length>0&&i.draggingItems.length>0?(i.items=i.draggingItems,i.selectedItem=i.droppedIndex,i.refresh()):(i.dragItem.querySelector("."+te).style.visibility="",t.removeClass([i.tbItems.querySelector(".e-indicator")],"e-hidden"),i.select(i.droppedIndex))})},i.prototype.enableTab=function(e,i){var s=t.selectAll("."+se,this.element)[e];t.isNullOrUndefined(s)||(!0===i?(s.classList.remove("e-disable","e-overlay"),s.firstElementChild.setAttribute("tabindex","-1")):(s.classList.add("e-disable","e-overlay"),s.firstElementChild.removeAttribute("tabindex"),s.classList.contains("e-active")&&this.select(e+1)),t.isNullOrUndefined(this.items[e])||(this.items[e].disabled=!i,this.dataBind()),s.setAttribute("aria-disabled",!0===i?"false":"true"))},i.prototype.addTab=function(e,t){var i=this,s={addedItems:e,cancel:!1};this.isReplace?this.addingTabContent(e,t):this.trigger("adding",s,function(s){s.cancel||i.addingTabContent(e,t)}),this.isReact&&this.renderReactTemplates()},i.prototype.addingTabContent=function(e,i){var s=this,n=0;if(this.hdrEle=t.select(".e-tab-header",this.element),t.isNullOrUndefined(this.hdrEle))this.items=e,this.reRenderItems();else{var r=t.selectAll("."+se,this.element).length;if(0!==r&&(n=this.lastIndex+1),t.isNullOrUndefined(i)&&(i=r-1),r<i||i<0||isNaN(i))return;0!==r||t.isNullOrUndefined(this.hdrEle)||(this.hdrEle.style.display=""),t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add("e-hidden"),this.tbItems=t.select("."+ie,this.getTabHeader()),this.isAdd=!0;var l=this.parseObject(e,i);this.isAdd=!1;var o,a=0;e.forEach(function(e,r){if(o=e.headerTemplate||e.header.text,t.isNullOrUndefined(e.headerTemplate||e.header)||t.isNullOrUndefined(o)||0===o.length&&t.isNullOrUndefined(e.header.iconCss)||(s.items.splice(i+a,0,e),a++),s.isTemplate&&!t.isNullOrUndefined(e.header)&&!t.isNullOrUndefined(e.header.text)){var l=n+r,d=s.createElement("div",{id:"e-content"+s.tabId+"_"+l,className:"e-item",attrs:{role:"tabpanel","aria-labelledby":"e-item_"+l}});s.cntEle.insertBefore(d,s.cntEle.children[i+r]);var h=s.getTrgContent(s.cntEle,l.toString());s.getContent(h,e.content,"render",i)}}),this.tbObj.addItems(l,i),this.isReplace||this.trigger("added",{addedItems:e}),this.selectedItem===i?this.select(i):this.setActiveBorder(),this.bindDraggable()}},i.prototype.removeTab=function(e){var i=this,s=t.selectAll("."+se,this.element)[e];if(!t.isNullOrUndefined(s)){var n={removedItem:s,removedIndex:e,cancel:!1};this.trigger("removing",n,function(n){if(!n.cancel){i.tbObj.removeItems(e),i.allowDragAndDrop&&e!==Array.prototype.indexOf.call(i.itemIndexArray,s.id)&&(e=Array.prototype.indexOf.call(i.itemIndexArray,s.id)),i.items.splice(e,1),i.itemIndexArray.splice(e,1),i.refreshActiveBorder();var r=t.select("#e-content"+i.tabId+"_"+i.extIndex(s.id),t.select(".e-content",i.element));t.isNullOrUndefined(r)||t.detach(r),i.trigger("removed",n),s.classList.contains("e-active")&&(e=e>t.selectAll(".e-toolbar-item:not(.e-toolbar-popup)",i.element).length-1?e-1:e,i.enableAnimation=!1,i.selectedItem=e,i.select(e)),0===t.selectAll("."+se,i.element).length&&(i.hdrEle.style.display="none"),i.enableAnimation=!0}})}},i.prototype.hideTab=function(e,i){var s,n=t.selectAll("."+se,this.element)[e];if(!t.isNullOrUndefined(n)){if(t.isNullOrUndefined(i)&&(i=!0),this.bdrLine.classList.add("e-hidden"),!0===i)if(n.classList.add("e-hidden"),0!==(s=t.selectAll(".e-toolbar-item:not(.e-hidden)",this.tbItems)).length&&n.classList.contains("e-active")){if(0!==e)for(var r=e-1;r>=0;r--){if(!this.tbItem[r].classList.contains("e-hidden")){this.select(r);break}if(0===r)for(l=e+1;l<this.tbItem.length;l++)if(!this.tbItem[l].classList.contains("e-hidden")){this.select(l);break}}else for(var l=e+1;l<this.tbItem.length;l++)if(!this.tbItem[l].classList.contains("e-hidden")){this.select(l);break}}else 0===s.length&&this.element.classList.add("e-hidden");else this.element.classList.remove("e-hidden"),s=t.selectAll(".e-toolbar-item:not(.e-hidden)",this.tbItems),n.classList.remove("e-hidden"),0===s.length&&this.select(e);this.setActiveBorder(),n.setAttribute("aria-hidden",""+i),!this.isServerRendered&&"Popup"===this.overflowMode&&this.tbObj&&this.tbObj.refreshOverflow()}},i.prototype.select=function(e,i){var s=this,n=this.getTabHeader();this.tbItems=t.select("."+ie,n),this.tbItem=t.selectAll("."+se,n),this.content=t.select(".e-content",this.element),this.prevItem=this.tbItem[this.prevIndex],t.isNullOrUndefined(this.selectedItem)||this.selectedItem<0||this.tbItem.length<=this.selectedItem||isNaN(this.selectedItem)?this.selectedItem=0:this.selectedID=this.extIndex(this.tbItem[this.selectedItem].id);var r=this.tbItem[e];t.isNullOrUndefined(r)?this.selectedID="0":this.selectingID=this.extIndex(r.id),t.isNullOrUndefined(this.prevItem)||this.prevItem.classList.contains("e-disable")||this.prevItem.children.item(0).setAttribute("tabindex","-1");var l={event:i,previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:this.tbItem[this.selectedItem],selectedIndex:this.selectedItem,selectedContent:t.isNullOrUndefined(this.content)?null:t.select("#e-content"+this.tabId+"_"+this.selectedID,this.content),selectingItem:r,selectingIndex:e,selectingContent:t.isNullOrUndefined(this.content)?null:t.select("#e-content"+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwipeed,cancel:!1};this.initRender?this.selectingContent(e):this.trigger("selecting",l,function(t){t.cancel||s.selectingContent(e)})},i.prototype.selectingContent=function(e){if("number"==typeof e){if(!t.isNullOrUndefined(this.tbItem[e])&&(this.tbItem[e].classList.contains("e-disable")||this.tbItem[e].classList.contains("e-hidden")))for(var i=e+1;i<this.items.length;i++){if(!1===this.items[i].disabled&&!0===this.items[i].visible){e=i;break}e=0}if(this.tbItem.length>e&&e>=0&&!isNaN(e))if(this.prevIndex=this.selectedItem,this.tbItem[e].classList.contains(ne)){if(this.setActive(this.popupHandler(this.tbItem[e])),!t.isNullOrUndefined(this.items)&&this.items.length>0&&this.allowDragAndDrop){this.tbItem=t.selectAll(".e-toolbar-items ."+se,this.hdrEle);var s=this.items[e];this.items.splice(e,1),this.items.splice(this.tbItem.length-1,0,s)}}else this.setActive(e);else this.setActive(0)}else e instanceof HTMLElement&&this.setActive(this.getEleIndex(e))},i.prototype.getItemIndex=function(e){for(var t,i=0;i<this.tbItem.length;i++)if(e===this.tbItem[i].getAttribute("data-id")){t=i;break}return t},i.prototype.disable=function(e){this.setCssClass(this.element,"e-disable",e),this.element.setAttribute("aria-disabled",""+e)},i.prototype.getPersistData=function(){return this.addOnPersist(["selectedItem","actEleId"])},i.prototype.getModuleName=function(){return"tab"},i.prototype.onPropertyChanged=function(e,i){for(var s=this,n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)}),this.isServerRendered||this.setContentHeight(!1);break;case"cssClass":""!==i.cssClass?(this.setCssClass(this.element,i.cssClass,!1),this.setCssClass(this.element,e.cssClass,!0)):this.setCssClass(this.element,e.cssClass,!0);break;case"items":this.isServerRendered||this.evalOnPropertyChangeItems(e,i);break;case"showCloseButton":this.setCloseButton(e.showCloseButton);break;case"selectedItem":this.isServerRendered||(this.selectedItem=i.selectedItem,this.select(e.selectedItem));break;case"headerPlacement":this.isServerRendered?this.serverChangeOrientation(e.headerPlacement,i.headerPlacement):this.changeOrientation(e.headerPlacement);break;case"enableRtl":this.setRTL(e.enableRtl);break;case"overflowMode":this.tbObj.overflowMode=e.overflowMode,this.tbObj.dataBind(),this.refreshActElePosition();break;case"heightAdjustMode":this.isServerRendered||(this.setContentHeight(!1),this.select(this.selectedItem));break;case"scrollStep":this.tbObj&&(this.tbObj.scrollStep=this.scrollStep);break;case"allowDragAndDrop":this.bindDraggable();break;case"dragArea":this.allowDragAndDrop&&(this.draggableItems.forEach(function(e){e.dragArea=s.dragArea}),this.refresh())}},i.prototype.refreshActiveTab=function(){if(this.isReact&&this.clearTemplate(),this.isTemplate){var e=this.element.querySelector("."+ie),i=this.element.querySelector(".e-toolbar-item.e-active"),s=i.id,n=s.indexOf("_"),r=parseInt(s.substring(n+1),10),l=i.innerText,o=this.element.querySelector(".e-content").querySelector(".e-active").children[0],a=o.innerHTML;t.detach(i),t.detach(o);var d={className:se+" e-template e-active",id:"e-item"+this.tabId+"_"+r,attrs:{role:"tab","aria-controls":"e-content"+this.tabId+"_"+r,"aria-disabled":"false","aria-selected":"true"}},h=this.createElement("span",{className:"e-tab-text",innerHTML:l,attrs:{role:"presentation"}}).outerHTML,c=this.createElement("div",{className:"e-text-wrap",innerHTML:h+this.btnCls.outerHTML}).outerHTML,p=this.createElement("div",{className:te,innerHTML:c,attrs:{tabIndex:"-1"}});e.insertBefore(this.createElement("div",d),e.children[r+1]),this.element.querySelector(".e-toolbar-item.e-active").appendChild(p);E=this.createElement("div",{innerHTML:a});this.element.querySelector(".e-content").querySelector(".e-active").appendChild(E)}else if(this.element.querySelector(".e-toolbar-item.e-active")){t.detach(this.element.querySelector(".e-toolbar-item.e-active").children[0]),t.detach(this.element.querySelector(".e-content").querySelector(".e-active").children[0]);var u=this.items[this.selectedItem],f=t.isNullOrUndefined(u.header)||t.isNullOrUndefined(u.header.iconPosition)?"":u.header.iconPosition,m=t.isNullOrUndefined(u.header)||t.isNullOrUndefined(u.header.iconCss)?"":u.header.iconCss,v=u.headerTemplate||u.header.text,g=this.createElement("div",{className:"e-tab-text",attrs:{role:"presentation"}});t.isNullOrUndefined(v.tagName)?this.headerTextCompile(g,v,this.selectedItem):g.appendChild(v);var y=this.createElement("span",{className:"e-icons e-tab-icon e-icon-"+f+" "+m}),b=this.createElement("div",{className:"e-text-wrap"});b.appendChild(g),""!==v&&void 0!==v&&""!==m?("left"===f||"top"===f?b.insertBefore(y,b.firstElementChild):b.appendChild(y),g,this.isIconAlone=!1):(""===m?g:y)===y&&(t.detach(g),b.appendChild(y),this.isIconAlone=!0);var C=u.disabled?{}:{tabIndex:"-1"};b.appendChild(this.btnCls.cloneNode(!0));var N=this.createElement("div",{className:te,attrs:C});N.appendChild(b),"top"!==f&&"bottom"!==f||this.element.classList.add("e-vertical-icon"),this.element.querySelector(".e-toolbar-item.e-active").appendChild(N);var E=this.createElement("div"),x=u.content,O=void 0;if("string"==typeof x||t.isNullOrUndefined(x.innerHTML))if("string"==typeof x&&this.enableHtmlSanitizer&&(x=t.SanitizeHtmlHelper.sanitize(x)),"."===x[0]||"#"===x[0])if(document.querySelectorAll(x).length){var S=document.querySelector(x);O=S.outerHTML.trim(),E.appendChild(S),S.style.display=""}else this.compileElement(E,x,"content",this.selectedItem);else this.compileElement(E,x,"content",this.selectedItem);else E.appendChild(x);t.isNullOrUndefined(O)||-1===this.templateEle.indexOf(x.toString())&&this.templateEle.push(x.toString()),this.element.querySelector(".e-item.e-active").appendChild(E)}this.isReact&&this.renderReactTemplates()},$([t.Collection([],de)],i.prototype,"items",void 0),$([t.Property("100%")],i.prototype,"width",void 0),$([t.Property("auto")],i.prototype,"height",void 0),$([t.Property("")],i.prototype,"cssClass",void 0),$([t.Property(0)],i.prototype,"selectedItem",void 0),$([t.Property("Top")],i.prototype,"headerPlacement",void 0),$([t.Property("Content")],i.prototype,"heightAdjustMode",void 0),$([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),$([t.Property("Dynamic")],i.prototype,"loadOn",void 0),$([t.Property(!1)],i.prototype,"enablePersistence",void 0),$([t.Property(!1)],i.prototype,"enableHtmlSanitizer",void 0),$([t.Property(!1)],i.prototype,"showCloseButton",void 0),$([t.Property()],i.prototype,"scrollStep",void 0),$([t.Property()],i.prototype,"dragArea",void 0),$([t.Property(!1)],i.prototype,"allowDragAndDrop",void 0),$([t.Complex({},oe)],i.prototype,"animation",void 0),$([t.Event()],i.prototype,"created",void 0),$([t.Event()],i.prototype,"adding",void 0),$([t.Event()],i.prototype,"added",void 0),$([t.Event()],i.prototype,"selecting",void 0),$([t.Event()],i.prototype,"selected",void 0),$([t.Event()],i.prototype,"removing",void 0),$([t.Event()],i.prototype,"removed",void 0),$([t.Event()],i.prototype,"onDragStart",void 0),$([t.Event()],i.prototype,"dragging",void 0),$([t.Event()],i.prototype,"dragged",void 0),$([t.Event()],i.prototype,"destroyed",void 0),i=$([t.NotifyPropertyChanges],i)}(t.Component),ce=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),pe=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},ue="e-treeview",fe="e-icon-collapsible",me="e-icon-expandable",ve="e-list-item",ge="e-list-text",ye="e-list-parent",be="e-hover",Ce="e-active",Ne="e-icons-spinner",Ee="e-process",xe="e-icons",Oe="e-text-content",Se="e-drop-in",we="e-drop-next",Ie="e-fullrow",ke="e-check",Le="e-checkbox-wrapper",Ae="e-node-focus",De={treeRole:"tree",itemRole:"treeitem",listRole:"group",itemText:"",wrapperRole:""},Pe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ce(i,e),pe([t.Property("child")],i.prototype,"child",void 0),pe([t.Property([])],i.prototype,"dataSource",void 0),pe([t.Property("expanded")],i.prototype,"expanded",void 0),pe([t.Property("hasChildren")],i.prototype,"hasChildren",void 0),pe([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),pe([t.Property("iconCss")],i.prototype,"iconCss",void 0),pe([t.Property("id")],i.prototype,"id",void 0),pe([t.Property("imageUrl")],i.prototype,"imageUrl",void 0),pe([t.Property("isChecked")],i.prototype,"isChecked",void 0),pe([t.Property("parentID")],i.prototype,"parentID",void 0),pe([t.Property(null)],i.prototype,"query",void 0),pe([t.Property("selected")],i.prototype,"selected",void 0),pe([t.Property(null)],i.prototype,"tableName",void 0),pe([t.Property("text")],i.prototype,"text",void 0),pe([t.Property("tooltip")],i.prototype,"tooltip",void 0),pe([t.Property("navigateUrl")],i.prototype,"navigateUrl",void 0),i}(t.ChildProperty),Te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ce(i,e),pe([t.Property("SlideDown")],i.prototype,"effect",void 0),pe([t.Property(400)],i.prototype,"duration",void 0),pe([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),Me=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ce(i,e),pe([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},Te)],i.prototype,"collapse",void 0),pe([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},Te)],i.prototype,"expand",void 0),i}(t.ChildProperty),Ue=function(e){function o(t,i){var s=e.call(this,t,i)||this;return s.isRefreshed=!1,s.preventExpand=!1,s.checkedElement=[],s.disableNode=[],s.validArr=[],s.validNodes=[],s.expandChildren=[],s.isFieldChange=!1,s.changeDataSource=!1,s.isBlazorExpandedNodes=[],s.hasTemplate=!1,s.mouseDownStatus=!1,s}ce(o,e),a=o,o.prototype.getModuleName=function(){return"treeview"},o.prototype.preRender=function(){var e=this;this.isBlazorPlatform=t.isBlazor()&&this.isServerRendered,this.checkActionNodes=[],this.parentNodeCheck=[],this.dragStartAction=!1,this.isAnimate=!1,this.keyConfigs={escape:"escape",end:"end",enter:"enter",f2:"f2",home:"home",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlDown:"ctrl+downarrow",ctrlUp:"ctrl+uparrow",ctrlEnter:"ctrl+enter",ctrlHome:"ctrl+home",ctrlEnd:"ctrl+end",ctrlA:"ctrl+A",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",shiftEnter:"shift+enter",shiftHome:"shift+home",shiftEnd:"shift+end",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",csEnter:"ctrl+shift+enter",csHome:"ctrl+shift+home",csEnd:"ctrl+shift+end",space:"space"},this.listBaseOption={expandCollapse:!0,showIcon:!0,expandIconClass:me,ariaAttributes:De,expandIconPosition:"Left",itemCreated:function(t){e.beforeNodeCreate(t)},enableHtmlSanitizer:this.enableHtmlSanitizer,itemNavigable:this.fullRowNavigable},this.updateListProp(this.fields),this.aniObj=new t.Animation({}),this.treeList=[],this.isLoaded=!1,this.isInitalExpand=!1,this.expandChildren=[],this.index=0,this.setTouchClass(),t.isNullOrUndefined(this.selectedNodes)&&this.setProperties({selectedNodes:[]},!0),t.isNullOrUndefined(this.checkedNodes)&&this.setProperties({checkedNodes:[]},!0),t.isNullOrUndefined(this.expandedNodes)?this.setProperties({expandedNodes:[]},!0):this.isInitalExpand=!0},o.prototype.getPersistData=function(){var e=["selectedNodes","checkedNodes","expandedNodes"];return this.addOnPersist(e)},o.prototype.render=function(){this.initialRender=!0,this.blazorInitialRender=!1,this.initialize(),this.setDataBinding(!1),this.setDisabledMode(),this.setExpandOnType(),this.disabled||this.setRipple(),this.wireEditingEvents(this.allowEditing),this.setDragAndDrop(this.allowDragAndDrop),this.disabled||this.wireEvents(),this.isBlazorPlatform||(this.initialRender=!1),this.renderComplete()},o.prototype.initialize=function(){this.isBlazorPlatform||(this.element.setAttribute("role","tree"),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active"),this.setCssClass(null,this.cssClass),this.setEnableRtl(),this.setFullRow(this.fullRowSelect)),this.nodeTemplateFn=this.templateComplier(this.nodeTemplate)},o.prototype.setDisabledMode=function(){this.disabled?this.element.classList.add("e-disabled"):this.element.classList.remove("e-disabled")},o.prototype.setEnableRtl=function(){(this.enableRtl?t.addClass:t.removeClass)([this.element],"e-rtl")},o.prototype.setRipple=function(){var e={selector:".e-fullrow,.e-text-content",ignore:"."+Oe+" > ."+xe+",.e-input-group,.e-input, ."+Le};this.rippleFn=t.rippleEffect(this.element,e);var i={selector:"."+Oe+" > ."+xe,isCenterRipple:!0};this.rippleIconFn=t.rippleEffect(this.element,i)},o.prototype.setFullRow=function(e){(e?t.addClass:t.removeClass)([this.element],"e-fullrow-wrap")},o.prototype.setMultiSelect=function(e){var i=t.select("."+ye,this.element);e?i.setAttribute("aria-multiselectable","true"):i.removeAttribute("aria-multiselectable")},o.prototype.templateComplier=function(e){if(e){this.hasTemplate=!0,this.element.classList.add("e-interaction");try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}}this.element.classList.remove("e-interaction")},o.prototype.setDataBinding=function(e){var i=this;this.treeList.push("false"),this.fields.dataSource instanceof r.DataManager?(this.isOffline=this.isBlazorPlatform?this.fields.dataSource.offline:this.fields.dataSource.dataSource.offline,this.fields.dataSource.ready?this.fields.dataSource.ready.then(function(e){i.isOffline=i.isBlazorPlatform?i.fields.dataSource.offline:i.fields.dataSource.dataSource.offline,i.fields.dataSource instanceof r.DataManager&&i.isOffline&&(i.treeList.pop(),i.treeData=e.result,i.isNumberTypeId=i.getType(),i.setRootData(),i.renderItems(!0),0!==i.treeList.length||i.isLoaded||i.finalize())}).catch(function(e){i.trigger("actionFailure",{error:e})}):this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function(t){i.treeList.pop(),i.treeData=t.result,i.isNumberTypeId=i.getType(),i.setRootData(),e&&(i.changeDataSource=!0),i.renderItems(!0),i.changeDataSource=!1,0!==i.treeList.length||i.isLoaded||i.finalize()}).catch(function(e){i.trigger("actionFailure",{error:e})})):(this.treeList.pop(),t.isNullOrUndefined(this.fields.dataSource)?this.rootData=this.treeData=[]:(this.treeData=JSON.parse(JSON.stringify(this.fields.dataSource)),this.setRootData()),this.isNumberTypeId=this.getType(),this.renderItems(!1)),0!==this.treeList.length||this.isLoaded||this.finalize()},o.prototype.getQuery=function(e,s){void 0===s&&(s=null);var n,l=[];if(e.query)n=e.query.clone();else{n=new r.Query;for(var o=this.getActualProperties(e),a=0,d=Object.keys(o);a<d.length;a++){var h=d[a];"dataSource"!==h&&"tableName"!==h&&"child"!==h&&e[h]&&"url"!==h&&-1===l.indexOf(e[h])&&l.push(e[h])}n.select(l),o.hasOwnProperty("tableName")&&n.from(e.tableName)}return i.ListBase.addSorting(this.sortOrder,e.text,n),t.isNullOrUndefined(s)||t.isNullOrUndefined(e.parentID)||n.where(e.parentID,"equal",this.isNumberTypeId?parseFloat(s):s),n},o.prototype.getType=function(){return!!this.treeData[0]&&"number"==typeof t.getValue(this.fields.id,this.treeData[0])},o.prototype.setRootData=function(){if(this.dataType=this.getDataType(this.treeData,this.fields),1===this.dataType){this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID);var e=this.getChildNodes(this.treeData,void 0,!0);t.isNullOrUndefined(e)?this.rootData=[]:this.rootData=e}else this.rootData=this.treeData},o.prototype.renderItems=function(e){if(!this.isBlazorPlatform||this.isBlazorPlatform&&this.fields.dataSource instanceof r.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName||this.changeDataSource){this.listBaseOption.ariaAttributes.level=1;var s=this.getSortedData(this.rootData);this.ulElement=i.ListBase.createList(this.createElement,e?this.rootData:s,this.listBaseOption),this.element.appendChild(this.ulElement);var n=this.ulElement.querySelectorAll(".e-list-item");if(!1===this.loadOnDemand)for(var l=0;l<n.length;)this.renderChildNodes(n[l],!0,null,!0),l++;(1===t.selectAll("."+ye,this.element).length&&n&&0!==n.length||this.loadOnDemand)&&this.finalizeNode(this.element)}this.updateTemplateForBlazor(),this.parentNodeCheck=[],this.parentCheckData=[],this.updateCheckedStateFromDS(),this.autoCheck&&this.showCheckBox&&!this.isLoaded&&this.updateParentCheckState()},o.prototype.updateTemplateForBlazor=function(){this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate()},o.prototype.updateCheckedStateFromDS=function(e){if(this.validNodes=[],this.treeData&&this.showCheckBox){if(1===this.dataType){for(var i=this.fields,s=new r.DataManager(this.treeData).executeLocal((new r.Query).where(i.isChecked,"equal",!0,!1)),n=0;n<s.length;n++){var l=s[n][this.fields.id]?s[n][this.fields.id].toString():null;s[n][this.fields.parentID]&&s[n][this.fields.parentID].toString();if(-1!==this.checkedNodes.indexOf(l)||this.isLoaded||this.checkedNodes.push(l),s[n][this.fields.hasChildren])for(var o=s[n][this.fields.id],a=new r.DataManager(this.treeData).executeLocal((new r.Query).where(i.parentID,"equal",o,!1)),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(h)&&this.autoCheck&&this.checkedNodes.push(h)}}for(n=0;n<this.checkedNodes.length;n++){var c=this.fields,p=new r.DataManager(this.treeData).executeLocal((new r.Query).where(c.id,"equal",this.checkedNodes[n],!0));if(p[0]&&this.autoCheck&&(this.getCheckedNodeDetails(c,p),this.checkIndeterminateState(p[0])),p.length>0){m=p[0][this.fields.id]?p[0][this.fields.id].toString():null;this.checkedNodes.indexOf(m)>-1&&-1===this.validNodes.indexOf(m)&&this.validNodes.push(m)}for(var u=new r.DataManager(this.treeData).executeLocal((new r.Query).where(c.parentID,"equal",this.checkedNodes[n],!0)),f=0;f<u.length;f++){var m=u[f][this.fields.id]?u[f][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(m)&&this.autoCheck&&this.checkedNodes.push(m),this.checkedNodes.indexOf(m)>-1&&-1===this.validNodes.indexOf(m)&&this.validNodes.push(m)}}}else if(2===this.dataType||this.fields.dataSource instanceof r.DataManager&&this.isOffline)for(f=0;f<this.treeData.length;f++){var v=this.treeData[f][this.fields.id]?this.treeData[f][this.fields.id].toString():"";this.treeData[f][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(v)&&this.checkedNodes.push(v),this.checkedNodes.indexOf(v)>-1&&-1===this.validNodes.indexOf(v)&&this.validNodes.push(v);var g=t.getValue(this.fields.child.toString(),this.treeData[f]);g&&this.updateChildCheckState(g,this.treeData[f])}this.setProperties({checkedNodes:this.validNodes},!0)}},o.prototype.getCheckedNodeDetails=function(e,i){var s=i[0][this.fields.parentID]?i[0][this.fields.parentID].toString():null,n=0,l=this.element.querySelector('[data-uid="'+i[0][this.fields.id]+'"]'),o=this.element.querySelector('[data-uid="'+i[0][this.fields.parentID]+'"]');if(l||o)o&&(t.select("."+ke,o)||this.changeState(o,"indeterminate",null,!0,!0));else{this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(s)&&this.parentNodeCheck.push(s);for(var a=this.getChildNodes(this.treeData,s),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(h)&&n++,n===a.length&&-1===this.checkedNodes.indexOf(s)&&this.checkedNodes.push(s)}var c=new r.DataManager(this.treeData).executeLocal((new r.Query).where(e.id,"equal",s,!0));this.getCheckedNodeDetails(e,c)}},o.prototype.updateParentCheckState=function(){for(var e,i=t.selectAll(".e-stop",this.element),s=0;s<i.length;s++){var n=t.closest(i[s],"."+ve),l=n.getAttribute("data-uid").toString(),o=0;if(e=1===this.dataType?new r.DataManager(this.treeData).executeLocal((new r.Query).where(this.fields.parentID,"equal",l,!0)):this.getChildNodes(this.treeData,l)){for(var a=0;a<e.length;a++){var d=e[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&o++}if(o===e.length){var h=n.getAttribute("data-uid");-1===this.checkedNodes.indexOf(h)&&this.checkedNodes.push(h),this.changeState(n,"check",null,!0,!0)}else 0===o&&0===this.checkedNodes.length&&this.changeState(n,"uncheck",null,!0,!0)}}},o.prototype.checkIndeterminateState=function(e){var t;if(t=1===this.dataType?this.element.querySelector('[data-uid="'+e[this.fields.parentID]+'"]'):this.element.querySelector('[data-uid="'+e[this.fields.id]+'"]'))"true"!==t.querySelector("."+Le).getAttribute("aria-checked")&&this.changeState(t,"indeterminate",null,!0,!0);else if(2===this.dataType){this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(e[this.fields.id].toString())&&this.parentNodeCheck.push(e[this.fields.id].toString())}},o.prototype.updateChildCheckState=function(e,i){for(var s=0,n=i[this.fields.id]?i[this.fields.id].toString():"",r=0;r<e.length;r++){var l=e[r][this.fields.id]?e[r][this.fields.id].toString():"";e[r][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(l)&&this.checkedNodes.push(l),-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(l)&&this.autoCheck&&this.checkedNodes.push(l),-1!==this.checkedNodes.indexOf(l)&&this.autoCheck&&s++,this.checkedNodes.indexOf(l)>-1&&-1===this.validNodes.indexOf(l)&&this.validNodes.push(l);var o=t.getValue(this.fields.child.toString(),e[r]);o&&(this.parentCheckData.push(i),this.updateChildCheckState(o,e[r])),s===e.length&&this.autoCheck&&-1===this.checkedNodes.indexOf(n)&&this.checkedNodes.push(n)}if(0!==s&&this.autoCheck){this.checkIndeterminateState(i);for(var a=0;a<this.parentCheckData.length;a++)i!==this.parentCheckData[a]&&this.parentCheckData[a]&&this.checkIndeterminateState(this.parentCheckData[a])}this.parentCheckData=[]},o.prototype.beforeNodeCreate=function(e){if(this.showCheckBox){var i=n.createCheckBox(this.createElement,!0,{cssClass:this.touchClass});i.setAttribute("role","checkbox");var s=t.select("div."+xe,e.item),r=e.item.getAttribute("data-uid");e.item.childNodes[0].insertBefore(i,e.item.childNodes[0].childNodes[t.isNullOrUndefined(s)?0:1]);var l=t.getValue(e.fields.isChecked,e.curData);this.checkedNodes.indexOf(r)>-1?(t.select(".e-frame",i).classList.add(ke),i.setAttribute("aria-checked","true"),this.addCheck(e.item)):t.isNullOrUndefined(l)||"true"!==l.toString()?i.setAttribute("aria-checked","false"):(t.select(".e-frame",i).classList.add(ke),i.setAttribute("aria-checked","true"),this.addCheck(e.item));var o=t.select(".e-frame",i);t.EventHandler.add(o,"mousedown",this.frameMouseHandler,this),t.EventHandler.add(o,"mouseup",this.frameMouseHandler,this)}this.fullRowSelect&&this.createFullRow(e.item),this.allowMultiSelection&&!e.item.classList.contains("e-selected")&&e.item.setAttribute("aria-selected","false");var a=e.fields;if(this.addActionClass(e,a.selected,"e-selected"),this.addActionClass(e,a.expanded,"e-expanded"),!t.isNullOrUndefined(this.nodeTemplateFn)){var d=e.item.querySelector("."+ge),h=e.item.getAttribute("data-uid");d.innerHTML="",this.renderNodeTemplate(e.curData,d,h)}var c={node:e.item,nodeData:e.curData,text:e.text};this.isRefreshed||this.trigger("drawNode",c)},o.prototype.frameMouseHandler=function(e){var i=t.select(".e-ripple-container",e.target.parentElement);n.rippleMouseHandler(e,i)},o.prototype.addActionClass=function(e,i,s){var n=e.curData,r=t.getValue(i,n);t.isNullOrUndefined(r)||"false"===r.toString()||e.item.classList.add(s)},o.prototype.getDataType=function(e,i){if(this.fields.dataSource instanceof r.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName){for(s=0;s<e.length;s++)if(this.isOffline){if("string"==typeof i.child&&t.isNullOrUndefined(t.getValue(i.child,e[s]))&&!t.isNullOrUndefined(t.getValue(i.parentID,e[s])))return 1}else if("string"==typeof i.child&&t.isNullOrUndefined(t.getValue(i.child,e[s])))return 1;return 2}for(var s=0,n=e.length;s<n;s++){if("string"==typeof i.child&&!t.isNullOrUndefined(t.getValue(i.child,e[s])))return 2;if(!t.isNullOrUndefined(t.getValue(i.parentID,e[s]))||!t.isNullOrUndefined(t.getValue(i.hasChildren,e[s])))return 1}return 1},o.prototype.getGroupedData=function(e,t){for(var s=(new r.Query).group(t),n=i.ListBase.getDataSource(e,s),l=[],o=0;o<n.length;o++){var a=n[o].items;l.push(a)}return l},o.prototype.getSortedData=function(e){return e&&"None"!==this.sortOrder&&(e=i.ListBase.getDataSource(e,i.ListBase.addSorting(this.sortOrder,this.fields.text))),e},o.prototype.finalizeNode=function(e){for(var i=t.selectAll(".e-list-img",e),s=0;s<i.length;s++)i[s].setAttribute("alt","e-list-img");if(this.isLoaded){for(var n=t.selectAll(".e-selected",e),r=0;r<n.length;r++){this.selectNode(n[r],null);break}t.removeClass(n,"e-selected")}for(var l=t.selectAll(".e-list-item:not(.e-expanded)",e),o=0;o<l.length;o++){var a=t.select("div."+xe,l[o]);a&&a.classList.contains(me)&&this.disableExpandAttr(l[o])}var d=t.selectAll(".e-expanded",e);if(!this.isInitalExpand)for(r=0;r<d.length;r++)this.renderChildNodes(d[r]);t.removeClass(d,"e-expanded"),this.updateList(),this.isLoaded&&this.updateCheckedProp()},o.prototype.updateCheckedProp=function(){if(this.showCheckBox){var e=[].concat([],this.checkedNodes);this.setProperties({checkedNodes:e},!0)}},o.prototype.ensureIndeterminate=function(){if(this.autoCheck)for(var e=t.selectAll("li",this.element),i=0;i<e.length;i++)e[i].classList.contains(ve)&&(t.select("."+ye,e[i])?this.ensureParentCheckState(e[i]):this.ensureChildCheckState(e[i]));else for(var s=t.selectAll(".e-stop",this.element),i=0;i<s.length;i++)s[i].classList.remove("e-stop")},o.prototype.ensureParentCheckState=function(e){if(!t.isNullOrUndefined(e)){if(e.classList.contains(ue))return;var i=e;e.classList.contains(ve)&&(i=t.select("."+ye,e));var s=t.selectAll("."+ke,i),n=t.selectAll(".e-stop",i),r=t.selectAll("."+ve,i),l=e.getElementsByClassName(Le)[0];r.length===s.length?this.changeState(l,"check",null,!0,!0):s.length>0||n.length>0?this.changeState(l,"indeterminate",null,!0,!0):0===s.length&&this.changeState(l,"uncheck",null,!0,!0);var o=t.closest(e,"."+ye);if(!t.isNullOrUndefined(o)){var a=t.closest(o,"."+ve);this.ensureParentCheckState(a)}}},o.prototype.ensureChildCheckState=function(e,i){if(!t.isNullOrUndefined(e)){var s=t.select("."+ye,e),n=void 0;if(!t.isNullOrUndefined(s)){n=t.selectAll("."+Le,s);for(var r=e.getElementsByClassName("e-frame")[0].classList.contains(ke),l=e.getElementsByClassName("e-frame")[0].classList.contains("e-stop"),o=s.querySelectorAll("li"),a=(s.parentElement.getAttribute("aria-expanded"),void 0),d=0;d<n.length;d++){var h=o[d].getAttribute("data-uid");if(t.isNullOrUndefined(this.currentLoadData)||t.isNullOrUndefined(t.getValue(this.fields.isChecked,this.currentLoadData[d]))){var c=n[d].getElementsByClassName("e-frame")[0].classList.contains(ke);r?a="check":c&&!this.isLoaded?a="check":-1!==this.checkedNodes.indexOf(h)&&this.isLoaded&&(l||r)?a="check":o[d].classList.contains("e-has-child")&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(r||l)&&-1!==this.parentNodeCheck.indexOf(h)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(h),1)):1===this.dataType&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(r||l)&&-1!==this.parentNodeCheck.indexOf(h)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(h),1)):a="uncheck"}else a=t.getValue(this.fields.isChecked,this.currentLoadData[d])?"check":"uncheck",-1!==this.ele&&(a=r?"check":"uncheck"),"uncheck"===a&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&-1!==this.parentNodeCheck.indexOf(h)&&(this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(h),1),a="indeterminate");this.changeState(n[d],a,i,!0,!0)}}this.autoCheck&&this.isLoaded&&this.updateParentCheckState()}},o.prototype.doCheckBoxAction=function(e,i){t.selectAll("."+ve,this.element);if(t.isNullOrUndefined(e)){var s=t.selectAll("."+Le,this.element);if(this.loadOnDemand)for(n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck",null,null,null,i);else for(var n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck")}else for(var r=e.length;r>=0;r--){var l=void 0;if(l=1===e.length?this.getElement(e[r-1]):this.getElement(e[r]),t.isNullOrUndefined(l)){p=void 0;if(""!==(p=e[r-e.length]?e[r-e.length].toString():e[r]?e[r].toString():null)&&i&&p)this.setValidCheckedNode(p),this.dynamicCheckState(p,i);else if(-1!==this.checkedNodes.indexOf(p)&&""!==p&&!i){this.checkedNodes.splice(this.checkedNodes.indexOf(p),1);var o=this.getChildNodes(this.treeData,p);if(o){for(var a=0;a<o.length;a++){var d=o[a][this.fields.id]?o[a][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(d)&&this.checkedNodes.splice(this.checkedNodes.indexOf(d),1)}-1!==this.parentNodeCheck.indexOf(p)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(p),1)}p&&this.dynamicCheckState(p,i),this.updateField(this.treeData,this.fields,p,"isChecked",null)}}else{var h=t.select(".e-list-parent ."+Le,l);this.validateCheckNode(h,!i,l,null)}}if(e)for(var c=0;c<e.length;c++){var p=e[c]?e[c].toString():"";i||this.updateField(this.treeData,this.fields,p,"isChecked",null)}this.autoCheck&&this.updateParentCheckState()},o.prototype.updateFieldChecked=function(e,i){var s=t.closest(e,"."+ve),n=s.getAttribute("data-uid");"true"!==this.getNodeData(s).isChecked||i||this.updateField(this.treeData,this.fields,n,"isChecked",null)},o.prototype.dynamicCheckState=function(e,i){if(1===this.dataType){var s=0,n=new r.DataManager(this.treeData).executeLocal((new r.Query).where(this.fields.id,"equal",e,!0));if(n[0]){var l=n[0][this.fields.id]?n[0][this.fields.id].toString():null,o=n[0][this.fields.parentID]?n[0][this.fields.parentID].toString():null,a=((p=this.element.querySelector('[data-uid="'+o+'"]'))&&t.select(".e-stop",p),p?t.select("."+ke,p):null),d=this.element.querySelector('[data-uid="'+l+'"]'),h=this.getChildNodes(this.treeData,o);if(h)for(u=0;u<h.length;u++){var c=h[u][this.fields.id]?h[u][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(c)&&s++}-1!==this.checkedNodes.indexOf(e)&&p&&l===e&&this.autoCheck?this.changeState(p,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&d&&l===e&&!i?this.changeState(d,"uncheck",null):-1!==this.checkedNodes.indexOf(e)&&d&&l===e&&i?this.changeState(d,"check",null):-1===this.checkedNodes.indexOf(e)&&!d&&p&&l===e&&this.autoCheck&&0!==s?this.changeState(p,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&!d&&p&&l===e&&this.autoCheck&&0===s?this.changeState(p,"uncheck",null):d||p||l!==e||!this.autoCheck||this.updateIndeterminate(e,i)}}else if(2===this.dataType||this.fields.dataSource instanceof r.DataManager&&this.isOffline)for(var l=void 0,p=void 0,a=void 0,u=0;u<this.treeData.length;u++){l=this.treeData[u][this.fields.id]?this.treeData[u][this.fields.id].toString():"",a=(p=this.element.querySelector('[data-uid="'+l+'"]'))?t.select("."+ke,p):null,-1===this.checkedNodes.indexOf(l)&&p&&a&&!i&&this.changeState(p,"uncheck",null);var f=t.getValue(this.fields.child.toString(),this.treeData[u]);f&&this.updateChildIndeterminate(f,l,e,i,l)}},o.prototype.updateIndeterminate=function(e,t){var i,s=this.getTreeData(e),n=0;1===this.dataType&&(i=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null);var r=this.getChildNodes(this.treeData,i);if(r)for(var l=0;l<r.length;l++){var o=r[l][this.fields.id]?r[l][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(o)&&n++}var a=this.element.querySelector('[data-uid="'+i+'"]');a&&t?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0!==n?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0===n?this.changeState(a,"uncheck",null):a||(t||-1!==this.checkedNodes.indexOf(i)||-1===this.parentNodeCheck.indexOf(i)?t&&-1===this.checkedNodes.indexOf(i)&&-1===this.parentNodeCheck.indexOf(i)?this.parentNodeCheck.push(i):t||-1===this.checkedNodes.indexOf(i)||-1!==this.parentNodeCheck.indexOf(i)||0===n||this.parentNodeCheck.push(i):this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i),1),this.updateIndeterminate(i,t),-1===this.checkedNodes.indexOf(i)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(i),1))},o.prototype.updateChildIndeterminate=function(e,i,s,n,r){for(var l=0,o=0;o<e.length;o++){var a=e[o][this.fields.id]?e[o][this.fields.id].toString():"";-1!==this.checkedNodes.indexOf(a)&&l++;var d=this.element.querySelector('[data-uid="'+i+'"]'),h=d?t.select(".e-stop",d):null,c=d?t.select("."+ke,d):null,p=this.element.querySelector('[data-uid="'+a+'"]'),u=p?t.select("."+ke,p):null;if(-1!==this.checkedNodes.indexOf(s)&&d&&a===s&&this.autoCheck)this.changeState(d,"indeterminate",null);else if(-1!==this.checkedNodes.indexOf(s)||!d||p||a!==s||n){if(-1===this.checkedNodes.indexOf(s)&&p&&a===s&&!n)this.changeState(p,"uncheck",null);else if(-1===this.checkedNodes.indexOf(s)&&h&&a===s&&this.autoCheck&&0===l&&!n)h.classList.remove("e-stop");else if(-1===this.checkedNodes.indexOf(s)&&!p&&c&&a===s&&0===l)this.changeState(d,"uncheck",null);else if(-1===this.checkedNodes.indexOf(a)&&p&&u&&0===l)this.changeState(p,"uncheck",null);else if(!p&&!d&&a===s||-1!==this.parentNodeCheck.indexOf(i)&&this.autoCheck){var f=this.element.querySelector('[data-uid="'+r+'"]');n&&0!==l?this.changeState(f,"indeterminate",null):n&&l===e.length&&-1===this.checkedNodes.indexOf(i)?this.checkedNodes.push(i):n||0!==l||-1===this.parentNodeCheck.indexOf(i)||this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i)),-1===this.parentNodeCheck.indexOf(i)&&this.parentNodeCheck.push(i)}}else this.autoCheck?this.changeState(d,"uncheck",null):0!==l?this.changeState(d,"indeterminate",null):this.changeState(d,"uncheck",null);var m=t.getValue(this.fields.child.toString(),e[o]);m&&this.updateChildIndeterminate(m,a,s,n,r)}},o.prototype.changeState=function(e,i,s,n,r,l){var o,a=this,d=t.closest(e,"."+ve);n?this.nodeCheckAction(e,i,d,o,s,n,r,l):(this.checkActionNodes=[],o=this.getCheckEvent(d,i,s),this.trigger("nodeChecking",o,function(t){t.cancel||a.nodeCheckAction(e,i,d,t,s,n,r,l)}))},o.prototype.nodeCheckAction=function(e,i,s,n,r,l,o,a){var d,h=e.getElementsByClassName("e-frame")[0];if("check"!==i||h.classList.contains(ke)?"uncheck"===i&&(h.classList.contains(ke)||h.classList.contains("e-stop"))?(t.removeClass([h],[ke,"e-stop"]),this.removeCheck(s),d="false"):"indeterminate"===i&&this.autoCheck&&(h.classList.remove(ke),h.classList.add("e-stop"),this.removeCheck(s),d="mixed"):(h.classList.remove("e-stop"),h.classList.add(ke),this.addCheck(s),d="true"),d="check"===i?"true":"uncheck"===i?"false":d,t.isNullOrUndefined(d)||e.setAttribute("aria-checked",d),o){var c=[].concat([],this.checkActionNodes);n=this.getCheckEvent(s,i,r),t.isUndefined(l)&&(n.data=c)}void 0!==a&&this.ensureStateChange(s,a),l||t.isNullOrUndefined(d)||(e.setAttribute("aria-checked",d),this.allowServerDataBinding=!0,this.updateServerProperties("check"),this.allowServerDataBinding=!1,n.data[0].checked=d,this.trigger("nodeChecked",n),this.checkActionNodes=[])},o.prototype.addCheck=function(e){var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.checkedNodes.indexOf(i)||this.checkedNodes.push(i)},o.prototype.removeCheck=function(e){var t=this.checkedNodes.indexOf(e.getAttribute("data-uid"));t>-1&&this.checkedNodes.splice(t,1)},o.prototype.getCheckEvent=function(e,i,s){this.checkActionNodes.push(this.getNodeData(e));var n=this.checkActionNodes;return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,data:n}},o.prototype.finalize=function(){var e=t.select("."+ye,this.element);if(!t.isNullOrUndefined(e)){e.setAttribute("role",De.treeRole),this.setMultiSelect(this.allowMultiSelection);var i=t.select("."+ve,this.element);i&&(t.addClass([i],Ae),this.updateIdAttr(null,i)),this.renderReactTemplates(),this.hasPid=!!this.rootData[0]&&this.rootData[0].hasOwnProperty(this.fields.parentID),this.doExpandAction()}},o.prototype.doExpandAction=function(){var e=this.expandedNodes;if(this.isInitalExpand&&e.length>0){if(this.setProperties({expandedNodes:[]},!0),this.isBlazorPlatform&&!this.initialRender)return;if(this.fields.dataSource instanceof r.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName)this.expandGivenNodes(e);else{for(var i=0;i<e.length;i++){var s=t.select('[data-uid="'+e[i]+'"]',this.element);if(t.isNullOrUndefined(s))e[i]&&-1===this.expandChildren.indexOf(e[i])&&this.expandChildren.push(e[i].toString());else{var n=t.select("."+me,t.select("."+Oe,s));t.isNullOrUndefined(n)||this.expandAction(s,n,null)}}this.afterFinalized()}}else this.afterFinalized()},o.prototype.expandGivenNodes=function(e){var t=this;this.expandCallback(e[this.index],function(){++t.index<e.length?t.expandGivenNodes(e):t.afterFinalized()})},o.prototype.expandCallback=function(e,i){var s=t.select('[data-uid="'+e+'"]',this.element);if(t.isNullOrUndefined(s))i();else{var n=t.select("."+me,t.select("."+Oe,s));t.isNullOrUndefined(n)?i():this.expandAction(s,n,null,!1,i)}},o.prototype.afterFinalized=function(){if((!this.isBlazorPlatform||this.isBlazorPlatform&&!this.initialRender)&&this.doSelectionAction(),this.updateCheckedProp(),this.isBlazorPlatform&&(this.initialRender&&this.setCheckedNodes(this.checkedNodes),this.updateInstance(),this.initialRender=!1),this.isAnimate=!0,this.isInitalExpand=!1,!this.isLoaded||this.isFieldChange){var e={data:this.treeData};this.trigger("dataBound",e)}this.isLoaded=!0},o.prototype.doSelectionAction=function(){var e=t.selectAll(".e-selected",this.element),i=this.selectedNodes;if(i.length>0){this.setProperties({selectedNodes:[]},!0);for(var s=0;s<i.length;s++){var n=t.select('[data-uid="'+i[s]+'"]',this.element);if(n&&!n.classList.contains("e-active")?this.selectNode(n,null,!0):this.selectedNodes.push(i[s]),!this.allowMultiSelection)break}}else this.selectGivenNodes(e);t.removeClass(e,"e-selected")},o.prototype.selectGivenNodes=function(e){for(var t=0;t<e.length&&(e[t].classList.contains("e-disable")||this.selectNode(e[t],null,!0),this.allowMultiSelection);t++);},o.prototype.clickHandler=function(e){var i=e.originalEvent.target;if(t.EventHandler.remove(this.element,"contextmenu",this.preventContextMenu),i&&!this.dragStartAction){var s=i.classList,n=t.closest(i,"."+ve);if(n){if(3!==e.originalEvent.which){var r=t.select(".e-ripple-element",n),l=t.select("."+xe,n);if(this.removeHover(),this.setFocusElement(n),this.showCheckBox&&!n.classList.contains("e-disable")){var o=t.closest(i,"."+Le);if(!t.isNullOrUndefined(o)){var a=t.select(".e-frame",o);return this.validateCheckNode(o,a.classList.contains(ke),n,e.originalEvent),void this.triggerClickEvent(e.originalEvent,n)}}s.contains(me)?this.expandAction(n,i,e):s.contains(fe)?this.collapseNode(n,i,e):r&&l?l.classList.contains("e-ripple")&&l.classList.contains(me)?this.expandAction(n,l,e):l.classList.contains("e-ripple")&&l.classList.contains(fe)?this.collapseNode(n,l,e):s.contains(ye)||s.contains(ve)||this.toggleSelect(n,e.originalEvent,!1):s.contains(ye)||s.contains(ve)||this.toggleSelect(n,e.originalEvent,!1)}this.triggerClickEvent(e.originalEvent,n)}}},o.prototype.nodeCheckedEvent=function(e,i,s){t.closest(e,"."+ve);var n=this.getCheckEvent(e,i?"uncheck":"check",s);n.data=n.data.splice(0,n.data.length-1),this.trigger("nodeChecked",n)},o.prototype.triggerClickEvent=function(e,t){var i={event:e,node:t};this.trigger("nodeClicked",i)},o.prototype.expandNode=function(e,i,s){var n=this;if(this.renderReactTemplates(),i.classList.contains(Ne)&&this.hideSpinner(i),this.initialRender||i.classList.add("interaction"),!0!==s||!0===s&&e.classList.contains("e-expanded")){if(!0!==this.preventExpand){t.removeClass([i],me),t.addClass([i],fe);var l=0,o=0,a=this,d=t.select("."+ye,e),h=e;this.setHeight(h,d);var c=t.select(".e-list-item."+Ce,e);this.isAnimate&&!this.isRefreshed?this.aniObj.animate(d,{name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing,begin:function(i){h.style.overflow="hidden",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.add("e-animation-active"),l=h.offsetHeight,o=t.select("."+Oe,e).offsetHeight},progress:function(e){e.element.style.display="block",a.animateHeight(e,l,o)},end:function(e){e.element.style.display="block",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.remove("e-animation-active"),n.expandedNode(h,d,i)}}):this.expandedNode(h,d,i)}}else t.select("."+ye,e).style.display="none",this.fields.dataSource instanceof r.DataManager==!0&&(this.preventExpand=!1);this.initialRender&&i.classList.add("interaction")},o.prototype.expandedNode=function(e,i,s){i.style.display="block",e.style.display="block",e.style.overflow="",e.style.height="",t.removeClass([s],Ee),this.addExpand(e),this.allowServerDataBinding=!0,this.updateServerProperties("expand"),this.allowServerDataBinding=!1,this.isLoaded&&this.expandArgs&&!this.isRefreshed&&(this.expandArgs=this.getExpandEvent(e,null),this.trigger("nodeExpanded",this.expandArgs))},o.prototype.addExpand=function(e){e.setAttribute("aria-expanded","true"),t.removeClass([e],"e-node-collapsed");var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.expandedNodes.indexOf(i)||this.expandedNodes.push(i)},o.prototype.collapseNode=function(e,i,s){var n=this;if(!i.classList.contains(Ee)){t.addClass([i],Ee);var r;this.isLoaded?(r=this.getExpandEvent(e,s),this.trigger("nodeCollapsing",r,function(s){s.cancel?t.removeClass([i],Ee):n.nodeCollapseAction(e,i,s)})):this.nodeCollapseAction(e,i,r)}},o.prototype.nodeCollapseAction=function(e,i,s){var n=this;t.removeClass([i],fe),t.addClass([i],me);var r=0,l=0,o=this,a=t.select("."+ye,e),d=e,h=t.select(".e-list-item."+Ce,e);this.isAnimate?this.aniObj.animate(a,{name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing,begin:function(i){d.style.overflow="hidden",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.add("e-animation-active"),r=t.select("."+Oe,e).offsetHeight,l=d.offsetHeight},progress:function(e){o.animateHeight(e,r,l)},end:function(e){e.element.style.display="none",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.remove("e-animation-active"),n.collapsedNode(d,a,i,s)}}):this.collapsedNode(d,a,i,s)},o.prototype.collapsedNode=function(e,i,s,n){i.style.display="none",e.style.overflow="",e.style.height="",t.removeClass([s],Ee),this.allowServerDataBinding=!0,this.updateServerProperties("expand"),this.allowServerDataBinding=!1,this.removeExpand(e),this.isLoaded&&(n=this.getExpandEvent(e,null),this.trigger("nodeCollapsed",n))},o.prototype.removeExpand=function(e,t){t?e.removeAttribute("aria-expanded"):this.disableExpandAttr(e);var i=this.expandedNodes.indexOf(e.getAttribute("data-uid"));i>-1&&this.expandedNodes.splice(i,1)},o.prototype.disableExpandAttr=function(e){e.setAttribute("aria-expanded","false"),t.addClass([e],"e-node-collapsed")},o.prototype.setHeight=function(e,t){t.style.display="block",t.style.visibility="hidden",e.style.height=e.offsetHeight+"px",t.style.display="none",t.style.visibility=""},o.prototype.animateHeight=function(e,t,i){var s=(i-t)*((e.duration-e.timeStamp)/e.duration)+t;e.element.parentElement.style.height=s+"px"},o.prototype.renderChildNodes=function(e,s,n,l){var o=this,a=t.select("div."+xe,e);if(!t.isNullOrUndefined(a)){this.showSpinner(a);var d;if(this.fields.dataSource instanceof r.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName){var h=this.parents(e,"."+ye).length,c=this.getChildFields(this.fields,h,1);if(t.isNullOrUndefined(c)||t.isNullOrUndefined(c.dataSource))return t.detach(a),void this.removeExpand(e,!0);this.treeList.push("false"),this.fields.dataSource instanceof r.DataManager&&this.isOffline?(this.treeList.pop(),d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.loadChild(d,c,a,e,s,n,l),this.updateTemplateForBlazor()):c.dataSource.executeQuery(this.getQuery(c,e.getAttribute("data-uid"))).then(function(t){o.treeList.pop(),d=t.result,1===o.dataType&&(o.dataType=2),o.loadChild(d,c,a,e,s,n,l),o.updateTemplateForBlazor()}).catch(function(e){o.trigger("actionFailure",{error:e})})}else{if(d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.currentLoadData=this.getSortedData(d),t.isNullOrUndefined(d)||0===d.length)return t.detach(a),void this.removeExpand(e,!0);this.isBlazorPlatform&&this.initialRender||(this.listBaseOption.ariaAttributes.level=parseFloat(e.getAttribute("aria-level"))+1,e.appendChild(i.ListBase.createList(this.createElement,this.currentLoadData,this.listBaseOption))),this.expandNode(e,a,l),this.setSelectionForChildNodes(d),this.ensureCheckNode(e),this.finalizeNode(e),this.loadOnDemand&&this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate(),this.disableTreeNodes(d),this.renderSubChild(e,s,l)}}},o.prototype.loadChild=function(e,s,n,l,o,a,d){if(this.currentLoadData=e,t.isNullOrUndefined(e)||0===e.length)t.detach(n),this.removeExpand(l,!0);else{if(this.updateListProp(s),this.fields.dataSource instanceof r.DataManager&&!this.isOffline){var h=l.getAttribute("data-uid"),c=this.getNodeObject(h);t.setValue("child",e,c)}this.listBaseOption.ariaAttributes.level=parseFloat(l.getAttribute("aria-level"))+1,l.appendChild(i.ListBase.createList(this.createElement,e,this.listBaseOption)),this.expandNode(l,n,d),this.setSelectionForChildNodes(e),this.ensureCheckNode(l),this.finalizeNode(l),this.disableTreeNodes(e),this.renderSubChild(l,o,d)}a&&a(),0!==this.treeList.length||this.isLoaded||this.finalize()},o.prototype.disableTreeNodes=function(e){for(var t=0;t<e.length;){var i=e[t][this.fields.id]?e[t][this.fields.id].toString():null;void 0!==this.disableNode&&-1!==this.disableNode.indexOf(i)&&this.doDisableAction([i]),t++}},o.prototype.setSelectionForChildNodes=function(e){var t;for(t=0;t<e.length;t++){var i=e[t][this.fields.id]?e[t][this.fields.id].toString():null;void 0!==this.selectedNodes&&-1!==this.selectedNodes.indexOf(i)&&this.doSelectionAction()}},o.prototype.ensureCheckNode=function(e){this.showCheckBox&&(this.ele=this.checkedElement?this.checkedElement.indexOf(e.getAttribute("data-uid")):null,this.autoCheck&&(this.ensureChildCheckState(e),this.ensureParentCheckState(e))),this.currentLoadData=null},o.prototype.getFields=function(e,t,i){return t===i?e:this.getFields(this.getChildMapper(e),t,i+1)},o.prototype.getChildFields=function(e,t,i){return t===i?this.getChildMapper(e):this.getChildFields(this.getChildMapper(e),t,i+1)},o.prototype.getChildMapper=function(e){return"string"==typeof e.child||t.isNullOrUndefined(e.child)?e:e.child},o.prototype.getChildNodes=function(e,i,s){void 0===s&&(s=!1);var n;if(t.isNullOrUndefined(e))return n;if(1===this.dataType)return this.getChildGroup(this.groupedData,i,s);if("string"==typeof this.fields.child)for(var r=0,l=e.length;r<l;r++){var o=t.getValue(this.fields.id,e[r]);if(o&&o.toString()===i)return t.getValue(this.fields.child,e[r]);if(!t.isNullOrUndefined(t.getValue(this.fields.child,e[r]))&&void 0!==(n=this.getChildNodes(t.getValue(this.fields.child,e[r]),i)))break}return n},o.prototype.getChildGroup=function(e,i,s){if(!t.isNullOrUndefined(e))for(var n=0,r=e.length;n<r;n++){if(t.isNullOrUndefined(e[n][0])||t.isNullOrUndefined(t.getValue(this.fields.parentID,e[n][0])))return s?e[n]:[];if(t.getValue(this.fields.parentID,e[n][0]).toString()===i)return e[n]}},o.prototype.renderSubChild=function(e,i,s){if(i)for(var n=t.selectAll("."+me,e),r=0,l=n.length;r<l;r++){var o=n[r];if(e.querySelector(".e-icons")!==n[r]){var a=t.closest(o,"."+ve);this.expandArgs=this.getExpandEvent(a,null),!0!==s&&this.trigger("nodeExpanding",this.expandArgs),this.renderChildNodes(a,i,null,s)}}},o.prototype.toggleSelect=function(e,t,i){e.classList.contains("e-disable")||(this.allowMultiSelection&&(t&&t.ctrlKey||i)&&this.isActive(e)?this.unselectNode(e,t):this.selectNode(e,t,i))},o.prototype.isActive=function(e){return!!e.classList.contains(Ce)},o.prototype.selectNode=function(e,i,s){var n=this;if(t.isNullOrUndefined(e)||!this.allowMultiSelection&&this.isActive(e)&&!t.isNullOrUndefined(i))return void this.setFocusElement(e);var r;this.isLoaded?(r=this.getSelectEvent(e,"select",i),this.trigger("nodeSelecting",r,function(t){t.cancel||n.nodeSelectAction(e,i,t,s)})):this.nodeSelectAction(e,i,r,s)},o.prototype.nodeSelectAction=function(e,i,s,n){if(this.allowMultiSelection&&(n||i&&(!i||i.ctrlKey))||this.removeSelectAll(),this.allowMultiSelection&&i&&i.shiftKey){this.startNode||(this.startNode=e);var r=this.liList.indexOf(this.startNode),l=this.liList.indexOf(e);if(r>l){var o=r;r=l,l=o}for(var a=r;a<=l;a++){var d=this.liList[a];t.isVisible(d)&&!d.classList.contains("e-disable")&&this.addSelect(d)}}else this.startNode=e,this.addSelect(e);this.setFocusElement(e),this.isLoaded&&(this.allowServerDataBinding=!0,this.updateServerProperties("select"),this.allowServerDataBinding=!1,s.nodeData=this.getNodeData(e),this.trigger("nodeSelected",s))},o.prototype.unselectNode=function(e,t){var i,s=this;this.isLoaded?(i=this.getSelectEvent(e,"un-select",t),this.trigger("nodeSelecting",i,function(t){t.cancel||(s.allowServerDataBinding=!0,s.updateServerProperties("select"),s.allowServerDataBinding=!1,s.nodeUnselectAction(e,t))})):this.nodeUnselectAction(e,i)},o.prototype.nodeUnselectAction=function(e,t){this.removeSelect(e),this.setFocusElement(e),this.isLoaded&&(this.allowServerDataBinding=!0,this.updateServerProperties("select"),this.allowServerDataBinding=!1,t.nodeData=this.getNodeData(e),this.trigger("nodeSelected",t))},o.prototype.setFocusElement=function(e){if(!t.isNullOrUndefined(e)){var i=this.getFocusedNode();i&&t.removeClass([i],Ae),t.addClass([e],Ae),this.updateIdAttr(i,e)}},o.prototype.addSelect=function(e){e.setAttribute("aria-selected","true"),t.addClass([e],Ce);var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.selectedNodes.indexOf(i)||this.selectedNodes.push(i)},o.prototype.removeSelect=function(e){this.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),t.removeClass([e],Ce);var i=this.selectedNodes.indexOf(e.getAttribute("data-uid"));i>-1&&this.selectedNodes.splice(i,1)},o.prototype.removeSelectAll=function(){for(var e=this.element.querySelectorAll("."+Ce),i=0,s=e;i<s.length;i++){var n=s[i];this.allowMultiSelection?n.setAttribute("aria-selected","false"):n.removeAttribute("aria-selected")}t.removeClass(e,Ce),this.setProperties({selectedNodes:[]},!0)},o.prototype.getSelectEvent=function(e,i,s){var n=this.getNodeData(e);return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,nodeData:n}},o.prototype.setExpandOnType=function(){this.expandOnType="Auto"===this.expandOn?t.Browser.isDevice?"Click":"DblClick":this.expandOn},o.prototype.expandHandler=function(e){var i=e.originalEvent.target;!i||i.classList.contains("e-input")||i.classList.contains(ue)||i.classList.contains(ye)||i.classList.contains(ve)||i.classList.contains(xe)||this.showCheckBox&&t.closest(i,"."+Le)||this.expandCollapseAction(t.closest(i,"."+ve),e)},o.prototype.expandCollapseAction=function(e,i){var s=t.select("div."+xe,e);if(s&&!s.classList.contains(Ee)){var n=s.classList;n.contains(me)?this.expandAction(e,s,i):n.contains(fe)&&this.collapseNode(e,s,i)}},o.prototype.expandAction=function(e,i,s,n,r){var l=this;i.classList.contains(Ee)||(t.addClass([i],Ee),this.isLoaded&&!this.isRefreshed?(this.expandArgs=this.getExpandEvent(e,s),this.trigger("nodeExpanding",this.expandArgs,function(s){s.cancel?t.removeClass([i],Ee):l.nodeExpandAction(e,i,n,r)})):this.nodeExpandAction(e,i,n,r))},o.prototype.nodeExpandAction=function(e,i,s,n){var r=t.select("."+ye,e);if(r&&"UL"===r.nodeName)this.expandNode(e,i);else{this.renderChildNodes(e,s,n);for(var l=t.selectAll("."+ve,e),o=0;o<l.length;o++){var a=this.getId(l[o]);if(-1!==this.expandChildren.indexOf(a)&&void 0!==this.expandChildren){var d=t.select("."+me,t.select("."+Oe,l[o]));t.isNullOrUndefined(d)||this.expandAction(l[o],d,null),this.expandChildren.splice(this.expandChildren.indexOf(a),1)}}}},o.prototype.keyActionHandler=function(e){var i=this,s=e.target,n=this.getFocusedNode();if(s&&s.classList.contains("e-input")){var r=s;return void("enter"===e.action?(r.blur(),this.element.focus(),t.addClass([n],be)):"escape"===e.action&&(r.value=this.oldText,r.blur(),this.element.focus(),t.addClass([n],be)))}e.preventDefault();var l={cancel:!1,event:e,node:n};this.trigger("keyPress",l,function(s){if(!s.cancel)switch(e.action){case"space":i.showCheckBox&&i.checkNode(e);break;case"moveRight":i.openNode(!i.enableRtl,e);break;case"moveLeft":i.openNode(!!i.enableRtl,e);break;case"shiftDown":i.shiftKeySelect(!0,e);break;case"moveDown":case"ctrlDown":case"csDown":i.navigateNode(!0);break;case"shiftUp":i.shiftKeySelect(!1,e);break;case"moveUp":case"ctrlUp":case"csUp":i.navigateNode(!1);break;case"home":case"shiftHome":case"ctrlHome":case"csHome":i.navigateRootNode(!0);break;case"end":case"shiftEnd":case"ctrlEnd":case"csEnd":i.navigateRootNode(!1);break;case"enter":case"ctrlEnter":case"shiftEnter":case"csEnter":i.toggleSelect(n,e);break;case"f2":i.allowEditing&&!n.classList.contains("e-disable")&&i.createTextbox(n,e);break;case"ctrlA":if(i.allowMultiSelection){var r=t.selectAll(".e-list-item:not(.e-active)",i.element);i.selectGivenNodes(r)}}})},o.prototype.navigateToFocus=function(e){var i=this.getFocusedNode().querySelector("."+Oe),s=i.getBoundingClientRect(),n=this.getScrollParent(this.element);if(!t.isNullOrUndefined(n)){var r=n.getBoundingClientRect();s.bottom>r.bottom?n.scrollTop+=s.bottom-r.bottom:s.top<r.top&&(n.scrollTop-=r.top-s.top)}this.isVisibleInViewport(i)||i.scrollIntoView(e)},o.prototype.isVisibleInViewport=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},o.prototype.getScrollParent=function(e){return t.isNullOrUndefined(e)?null:e.scrollHeight>e.clientHeight?e:this.getScrollParent(e.parentElement)},o.prototype.shiftKeySelect=function(e,t){if(this.allowMultiSelection){var i=this.getFocusedNode(),s=e?this.getNextNode(i):this.getPrevNode(i);this.removeHover(),this.setFocusElement(s),this.toggleSelect(s,t,!1),this.navigateToFocus(!e)}else this.navigateNode(e)},o.prototype.checkNode=function(e){var i=this.getFocusedNode(),s=t.select("."+Le,i),n=t.select(" .e-frame",s).classList.contains(ke);i.classList.contains("e-disable")||0==i.getElementsByClassName("e-checkbox-disabled").length&&this.validateCheckNode(s,n,i,e)},o.prototype.validateCheckNode=function(e,i,s,n){var r=this,l=t.closest(e,"."+ve);this.checkActionNodes=[];var o=i?"false":"true";t.isNullOrUndefined(o)||e.setAttribute("aria-checked",o);var a=this.getCheckEvent(l,i?"uncheck":"check",n);this.trigger("nodeChecking",a,function(t){t.cancel||r.nodeCheckingAction(e,i,s,t,n)})},o.prototype.nodeCheckingAction=function(e,i,s,n,r){if(-1===this.checkedElement.indexOf(s.getAttribute("data-uid"))){this.checkedElement.push(s.getAttribute("data-uid"));var l=this.getChildNodes(this.treeData,s.getAttribute("data-uid"));null!==l?this.allCheckNode(l,this.checkedElement,null,null,!1):l=null}if(this.changeState(e,i?"uncheck":"check",r,!0),this.autoCheck){this.ensureChildCheckState(s),this.ensureParentCheckState(t.closest(t.closest(s,"."+ye),"."+ve));var o=void 0;"check"===n.action?o=!0:"uncheck"===n.action&&(o=!1),this.ensureStateChange(s,o)}this.allowServerDataBinding=!0,this.updateServerProperties("check"),this.allowServerDataBinding=!1,this.nodeCheckedEvent(e,i,r)},o.prototype.ensureStateChange=function(e,i){var s=t.select("."+ye,e),n=e.getAttribute("data-uid"),l=this.fields;if(1===this.dataType&&this.autoCheck)for(var o=new r.DataManager(this.treeData).executeLocal((new r.Query).where(l.parentID,"equal",n,!0)),a=0;a<o.length;a++){var d=o[a][this.fields.id]?o[a][this.fields.id].toString():null,h=o[a][this.fields.isChecked]?o[a][this.fields.isChecked].toString():null;if(-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(d)){this.checkedNodes.push(d);p=this.getChildNodes(this.treeData,d);this.getChildItems(p,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}else if(-1===this.checkedNodes.indexOf(n)&&null===s&&-1!==this.checkedNodes.indexOf(d)){if(this.checkedNodes.splice(this.checkedNodes.indexOf(d),1),"true"===h&&this.updateField(this.treeData,this.fields,d,"isChecked",null),-1===this.checkedNodes.indexOf(n)&&null===s||-1!==this.parentNodeCheck.indexOf(d)){var c=this.getChildNodes(this.treeData,d);this.getChildItems(c,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}}else{var p=this.getChildNodes(this.treeData,d);this.getChildItems(p,i)}}else if(1!==this.dataType||this.autoCheck)(p=this.getChildNodes(this.treeData,n))&&this.childStateChange(p,n,s,i);else if(i)for(a=0;a<this.treeData.length;a++){var u=this.treeData[a][this.fields.id]?this.treeData[a][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(u)&&this.checkedNodes.push(u)}else{for(var f=new r.DataManager(this.treeData).executeLocal((new r.Query).where(l.isChecked,"equal",!0,!1)),a=0;a<f.length;a++){var m=f[a][this.fields.id]?f[a][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(m)&&this.checkedNodes.splice(this.checkedNodes.indexOf(m),1),this.updateField(this.treeData,this.fields,m,"isChecked",null)}this.checkedNodes=[]}},o.prototype.getChildItems=function(e,t){for(var i=0;i<e.length;i++){var s=e[i][this.fields.id]?e[i][this.fields.id].toString():null,n=e[i][this.fields.isChecked]?e[i][this.fields.isChecked].toString():null;-1===this.checkedNodes.indexOf(s)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(s),1),-1===this.checkedNodes.indexOf(s)&&t&&this.checkedNodes.push(s),"true"!==n||t||this.updateField(this.treeData,this.fields,s,"isChecked",null);var r=this.getChildNodes(this.treeData,s);r.length>0&&this.getChildItems(r,t)}},o.prototype.childStateChange=function(e,t,i,s){for(var n=0;n<e.length;n++){var r=e[n][this.fields.id]?e[n][this.fields.id].toString():"",l=e[n][this.fields.isChecked]?e[n][this.fields.isChecked].toString():null;this.autoCheck?-1!==this.checkedNodes.indexOf(t)&&-1===this.checkedNodes.indexOf(r)?(this.checkedNodes.push(r),-1!==this.parentNodeCheck.indexOf(r)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(r),1)):-1!==this.checkedNodes.indexOf(t)||-1===this.checkedNodes.indexOf(r)||s||(this.checkedNodes.splice(this.checkedNodes.indexOf(r),1),"true"===l&&this.updateField(this.treeData,this.fields,r,"isChecked",null)):this.autoCheck||(s?-1===this.checkedNodes.indexOf(r)&&this.checkedNodes.push(r):(-1!==this.checkedNodes.indexOf(r)&&this.checkedNodes.splice(this.checkedNodes.indexOf(r),1),this.updateField(this.treeData,this.fields,r,"isChecked",null),this.checkedNodes=[]));var o=this.getChildNodes([e[n]],r);o&&this.childStateChange(o,t,i,s)}},o.prototype.allCheckNode=function(e,i,s,n,r){if(e)for(var l=0;l<e.length;l++){var o=t.getValue(this.fields.id,e[l]),a=this.element.querySelector('[data-uid="'+o+'"]');if(!1!==r&&-1===this.checkedElement.indexOf(o.toString())&&(null===a&&!t.isNullOrUndefined(e[l][this.fields.isChecked])&&-1===i.indexOf(o.toString())||0===n||2===s)&&(!1!==e[l][this.fields.isChecked]||2===s?i.push(o.toString()):n=null,n=!1!==e[l][this.fields.isChecked]||2===s?0:null),-1===i.indexOf(o.toString())&&t.isNullOrUndefined(s)&&i.push(o.toString()),!0===t.getValue(this.fields.hasChildren,e[l])||t.getValue(this.fields.child.toString(),e[l])){var d=t.getValue(this.fields.id,e[l]),h=this.getChildNodes(this.treeData,d.toString());h&&(t.isNullOrUndefined(r)?this.allCheckNode(h,i,s,n):this.allCheckNode(h,i,s,n,r),n=null)}n=null}},o.prototype.openNode=function(e,i){var s=this.getFocusedNode(),n=t.select("div."+xe,s);if(e){if(!n)return;n.classList.contains(me)?this.expandAction(s,n,i):this.focusNextNode(s,!0)}else if(n&&n.classList.contains(fe))this.collapseNode(s,n,i);else{var r=t.closest(t.closest(s,"."+ye),"."+ve);if(!r)return;r.classList.contains("e-disable")||(this.setFocus(s,r),this.navigateToFocus(!0))}},o.prototype.navigateNode=function(e){var t=this.getFocusedNode();this.focusNextNode(t,e)},o.prototype.navigateRootNode=function(e){var t=this.getFocusedNode(),i=e?this.getRootNode():this.getEndNode();i.classList.contains("e-disable")||(this.setFocus(t,i),this.navigateToFocus(e))},o.prototype.getFocusedNode=function(){var e,i=t.select(".e-list-item."+Ae,this.element);return t.isNullOrUndefined(i)&&(e=t.select("."+ve,this.element)),t.isNullOrUndefined(i)?t.isNullOrUndefined(e)?this.element.firstElementChild:e:i},o.prototype.focusNextNode=function(e,t){var i=t?this.getNextNode(e):this.getPrevNode(e);if(this.setFocus(e,i),this.navigateToFocus(!t),i.classList.contains("e-disable")){var s=i.lastChild;null==i.previousSibling&&i.classList.contains("e-level-1")?this.focusNextNode(i,!0):null==i.nextSibling&&i.classList.contains("e-node-collapsed")?this.focusNextNode(i,!1):null==i.nextSibling&&s.classList.contains(Oe)?this.focusNextNode(i,!1):this.focusNextNode(i,t)}},o.prototype.getNextNode=function(e){var i,s=this.liList.indexOf(e);do{if(s++,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},o.prototype.getPrevNode=function(e){var i,s=this.liList.indexOf(e);do{if(s--,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},o.prototype.getRootNode=function(){var e,i=0;do{e=this.liList[i],i++}while(!t.isVisible(e));return e},o.prototype.getEndNode=function(){var e,i=this.liList.length-1;do{e=this.liList[i],i--}while(!t.isVisible(e));return e},o.prototype.setFocus=function(e,i){t.removeClass([e],[be,Ae]),i.classList.contains("e-disable")||(t.addClass([i],[be,Ae]),this.updateIdAttr(e,i))},o.prototype.updateIdAttr=function(e,t){this.element.removeAttribute("aria-activedescendant"),e&&e.removeAttribute("id"),t.setAttribute("id",this.element.id+"_active"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active")},o.prototype.focusIn=function(){this.mouseDownStatus||t.addClass([this.getFocusedNode()],be),this.mouseDownStatus=!1},o.prototype.focusOut=function(){t.removeClass([this.getFocusedNode()],be)},o.prototype.onMouseOver=function(e){var i=e.target,s=i.classList,n=t.closest(i,"."+ve);if(!n||s.contains(ye)||s.contains(ve))return void this.removeHover();n&&!n.classList.contains("e-disable")&&this.setHover(n)},o.prototype.setHover=function(e){e.classList.contains(be)||(this.removeHover(),t.addClass([e],be))},o.prototype.onMouseLeave=function(e){this.removeHover()},o.prototype.removeHover=function(){var e=t.selectAll("."+be,this.element);e&&e.length&&t.removeClass(e,be)},o.prototype.getNodeData=function(e,i){if(!t.isNullOrUndefined(e)&&e.classList.contains(ve)&&!t.isNullOrUndefined(t.closest(e,".e-control"))&&t.closest(e,".e-control").classList.contains(ue)){var s=e.getAttribute("data-uid"),n=this.getText(e,i),r=t.closest(e.parentNode,"."+ve),l=r?r.getAttribute("data-uid"):null,o=e.classList.contains(Ce),a="true"===e.getAttribute("aria-expanded"),d=null!==e.getAttribute("aria-expanded")||null!=(t.select("."+me,e)||t.select("."+fe,e)),h=null;return this.showCheckBox&&(h=t.select("."+Le,e).getAttribute("aria-checked")),{id:s,text:n,parentID:l,selected:o,expanded:a,isChecked:h,hasChildren:d}}return{id:"",text:"",parentID:"",selected:!1,expanded:!1,isChecked:"",hasChildren:!1}},o.prototype.getText=function(e,i){if(i){var s=this.getNodeObject(e.getAttribute("data-uid")),n=parseFloat(e.getAttribute("aria-level")),r=this.getFields(this.fields,n,1);return t.getValue(r.text,s)}return t.select("."+ge,e).textContent},o.prototype.getExpandEvent=function(e,i){var s=this.getNodeData(e);return{cancel:!1,isInteracted:!t.isNullOrUndefined(i),node:e,nodeData:s,event:i}},o.prototype.renderNodeTemplate=function(e,i,s){var n=this.nodeTemplateFn(e,this,"nodeTemplate"+s,this.element.id+"nodeTemplate",this.isStringTemplate,void 0,i);n&&(n=Array.prototype.slice.call(n),t.append(n,i))},o.prototype.destroyTemplate=function(e){this.clearTemplate(["nodeTemplate"+e.getAttribute("data-uid")])},o.prototype.reRenderNodes=function(){this.updateListProp(this.fields),t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),t.Browser.isIE?(this.ulElement=this.element.querySelector(".e-list-parent.e-ul"),this.ulElement.parentElement.removeChild(this.ulElement)):this.element.innerHTML="",t.isNullOrUndefined(this.nodeTemplateFn)||this.clearTemplate(),this.setTouchClass(),this.setProperties({selectedNodes:[],checkedNodes:[],expandedNodes:[]},!0),this.checkedElement=[],this.isLoaded=!1,this.setDataBinding(!0)},o.prototype.setCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},o.prototype.editingHandler=function(e){var i=e.target;if(!(!i||i.classList.contains(ue)||i.classList.contains(ye)||i.classList.contains(ve)||i.classList.contains(xe)||i.classList.contains("e-input")||i.classList.contains("e-input-group"))){var s=t.closest(i,"."+ve);this.createTextbox(s,e)}},o.prototype.createTextbox=function(e,i){var s=this,n=t.select(".e-tree-input",this.element);n&&n.blur();var r=t.select("."+ge,e);this.updateOldText(e);var o=this.createElement("input",{className:"e-tree-input",attrs:{value:this.oldText}}),a=this.getEditEvent(e,null,o.outerHTML);this.trigger("nodeEditing",a,function(i){if(!i.cancel){var n="width:"+(r.offsetWidth+5)+"px";t.addClass([e],"e-editing"),t.isNullOrUndefined(s.nodeTemplateFn)||s.destroyTemplate(e),r.innerHTML=a.innerHtml;var o=t.select(".e-tree-input",r);s.inputObj=l.Input.createInput({element:o,properties:{enableRtl:s.enableRtl}},s.createElement),s.inputObj.container.setAttribute("style",n),o.focus();var d=o;d.setSelectionRange(0,d.value.length),s.wireInputEvents(o)}})},o.prototype.updateOldText=function(e){var i=e.getAttribute("data-uid");this.editData=this.getNodeObject(i);var s=parseFloat(e.getAttribute("aria-level"));this.editFields=this.getFields(this.fields,s,1),this.oldText=t.getValue(this.editFields.text,this.editData)},o.prototype.inputFocusOut=function(e){if(t.select(".e-tree-input",this.element)){var i=e.target,s=i.value,n=t.closest(i,"."+ge),l=t.closest(i,"."+ve);t.detach(this.inputObj.container),this.fields.dataSource instanceof r.DataManager&&!this.isOffline&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName?this.crudOperation("update",null,l,s,null,null,!0):this.appendNewText(l,n,s,!0)}},o.prototype.appendNewText=function(e,t,i,s){var n=this,r=this.getEditEvent(e,i,null);this.trigger("nodeEdited",r,function(r){i=r.cancel?r.oldText:r.newText,n.updateText(e,t,i,s),r.oldText!==i&&n.triggerEvent()})},o.prototype.updateText=function(e,i,s,n){var r=t.setValue(this.editFields.text,s,this.editData);if(t.isNullOrUndefined(this.nodeTemplateFn))i.innerText=s;else{i.innerText="";var l=e.getAttribute("data-uid");this.renderNodeTemplate(r,i,l),this.updateBlazorTemplate(),this.renderReactTemplates()}n&&(t.removeClass([e],"e-editing"),i.focus())},o.prototype.getElement=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?this.element.querySelector('[data-uid="'+e+'"]'):"object"==typeof e?t.getElement(e):null},o.prototype.getId=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?e:"object"==typeof e?t.getElement(e).getAttribute("data-uid"):null},o.prototype.getEditEvent=function(e,t,i){return{cancel:!1,newText:t,node:e,nodeData:this.getNodeData(e),oldText:this.oldText,innerHtml:i}},o.prototype.getNodeObject=function(e){if(!t.isNullOrUndefined(e)){if(1!==this.dataType)return this.getChildNodeObject(this.treeData,this.fields,e);for(var i=0,s=this.treeData.length;i<s;i++){var n=t.getValue(this.fields.id,this.treeData[i]);if(!t.isNullOrUndefined(this.treeData[i])&&!t.isNullOrUndefined(n)&&n.toString()===e)return this.treeData[i]}}},o.prototype.getChildNodeObject=function(e,i,s){var n;if(t.isNullOrUndefined(e))return n;for(var l=0,o=e.length;l<o;l++){var a=t.getValue(i.id,e[l]);if(e[l]&&a&&a.toString()===s)return e[l];if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[l]))){if(this.fields.dataSource instanceof r.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[l]))){if(void 0!==(n=this.getChildNodeObject(t.getValue("child",e[l]),this.getChildMapper(i),s)))break}}else{var d=t.getValue(i.child,e[l]);if(void 0!==(n=this.getChildNodeObject(d,this.getChildMapper(i),s)))break}}return n},o.prototype.setDragAndDrop=function(e){e&&!this.disabled?this.initializeDrag():this.destroyDrag()},o.prototype.initializeDrag=function(){var e,i=this,s=this;this.dragObj=new t.Draggable(this.element,{enableTailMode:!0,enableAutoScroll:!0,dragArea:this.dragArea,dragTarget:"."+Oe,helper:function(n){i.dragTarget=n.sender.target;var r=t.closest(i.dragTarget,"."+ue),l=t.closest(i.dragTarget,"."+Oe);if(i.dragLi=t.closest(i.dragTarget,"."+ve),i.fullRowSelect&&!l&&i.dragTarget.classList.contains(Ie)&&(l=i.dragTarget.nextElementSibling),!i.dragTarget||!n.element.isSameNode(r)||!l||i.dragTarget.classList.contains(ue)||i.dragTarget.classList.contains(ye)||i.dragTarget.classList.contains(ve)||i.dragLi.classList.contains("e-disable"))return!1;var o=l.cloneNode(!0);if(t.isNullOrUndefined(t.select("div."+xe,o))){var a=s.createElement("div",{className:xe+" "+me});o.insertBefore(a,o.children[0])}var d="e-drag-item "+ue+" "+i.cssClass+" "+(i.enableRtl?"e-rtl":"");(e=s.createElement("div",{className:d})).appendChild(o);var h=i.selectedNodes.length;if(h>1&&i.allowMultiSelection&&i.dragLi.classList.contains(Ce)){var c=s.createElement("span",{className:"e-drop-count",innerHTML:""+h});e.appendChild(c)}return document.body.appendChild(e),document.body.style.cursor="",i.dragData=i.getNodeData(i.dragLi),e},dragStart:function(s){t.addClass([i.element],"e-dragging");var n,r=t.closest(s.target,".e-list-item");r&&(n=parseInt(r.getAttribute("aria-level"),10));var l=i.getDragEvent(s.event,i,null,s.target,null,e,n);l.draggedNode.classList.contains("e-editing")?(i.dragObj.intDestroy(s.event),i.dragCancelAction(e)):i.trigger("nodeDragStart",l,function(n){n.cancel?(i.dragObj.intDestroy(s.event),i.dragCancelAction(e)):i.dragStartAction=!0,t.isBlazor()&&s.bindEvents(t.getElement(s.dragElement))})},drag:function(s){i.dragObj.setProperties({cursorAt:{top:!t.isNullOrUndefined(s.event.targetTouches)||t.Browser.isDevice?60:-20}}),i.dragAction(s,e)},dragStop:function(e){t.removeClass([i.element],"e-dragging"),i.removeVirtualEle();var s=e.target,n=t.closest(s,".e-droppable"),r=!0;s&&n||(t.detach(e.helper),document.body.style.cursor="",r=!1);var l,o=t.closest(s,".e-list-item");o&&(l=parseInt(o.getAttribute("aria-level"),10));var a=i.getDragEvent(e.event,i,s,s,null,e.helper,l);a.preventTargetExpand=!1,(i.isBlazorPlatform&&i.dragStartAction||!i.isBlazorPlatform)&&i.trigger("nodeDragStop",a,function(s){i.dragParent=s.draggedParentNode,i.preventExpand=s.preventTargetExpand,s.cancel&&(e.helper.parentNode&&t.detach(e.helper),document.body.style.cursor="",r=!1),i.dragStartAction=!1,i.isBlazorPlatform&&r&&i.dropAction(e,!0)})}}),this.dropObj=new t.Droppable(this.element,{out:function(e){t.isNullOrUndefined(e)||e.target.classList.contains("e-sibling")||(document.body.style.cursor="not-allowed")},over:function(e){document.body.style.cursor=""},drop:function(e){i.isBlazorPlatform||i.dropAction(e)}})},o.prototype.dragCancelAction=function(e){t.detach(e),t.removeClass([this.element],"e-dragging"),this.dragStartAction=!1},o.prototype.dragAction=function(e,i){var s=t.closest(e.target,".e-droppable"),n=t.closest(e.target,"."+Oe),r=t.select("div."+xe,i);t.removeClass([r],[Se,we,"e-drop-out","e-no-drop"]),this.removeVirtualEle(),document.body.style.cursor="";var l=e.target.classList;if(this.fullRowSelect&&!n&&!t.isNullOrUndefined(l)&&l.contains(Ie)&&(n=e.target.nextElementSibling),s){var o=t.closest(e.target,"."+ve),a=t.closest(e.target,"."+Le),d=t.closest(e.target,"."+fe),h=t.closest(e.target,"."+me);if(!s.classList.contains(ue)||n&&!o.isSameNode(this.dragLi)&&!this.isDescendant(this.dragLi,o))if(this.hasTemplate&&o){var c=t.select(this.fullRowSelect?"."+Ie:"."+Oe,o);if(e&&!h&&!d&&e.event.offsetY<7&&!a||h&&e.event.offsetY<5||d&&e.event.offsetX<3){p=this.fullRowSelect?1:0;this.appendIndicator(o,r,p)}else if(e&&!h&&!d&&!a&&c&&e.event.offsetY>c.offsetHeight-10||h&&e.event.offsetY>19||d&&e.event.offsetX>19){p=this.fullRowSelect?2:1;this.appendIndicator(o,r,p)}else t.addClass([r],Se)}else if(o&&e&&!h&&!d&&e.event.offsetY<7&&!a||h&&e.event.offsetY<5||d&&e.event.offsetX<3){p=this.fullRowSelect?1:0;this.appendIndicator(o,r,p)}else if(o&&e&&!h&&!d&&e.target.offsetHeight>0&&e.event.offsetY>e.target.offsetHeight-10&&!a||h&&e.event.offsetY>19||d&&e.event.offsetX>19){var p=this.fullRowSelect?2:1;this.appendIndicator(o,r,p)}else t.addClass([r],Se);else"LI"!==e.target.nodeName||o.isSameNode(this.dragLi)||this.isDescendant(this.dragLi,o)?e.target.classList.contains("e-sibling")?t.addClass([r],we):t.addClass([r],"e-drop-out"):(t.addClass([r],we),this.renderVirtualEle(e))}else t.addClass([r],"e-no-drop"),document.body.style.cursor="not-allowed";var u,f=t.closest(e.target,".e-list-item");f&&(u=parseInt(f.getAttribute("aria-level"),10));var m=this.getDragEvent(e.event,this,e.target,e.target,null,i,u);m.dropIndicator&&t.removeClass([r],m.dropIndicator),this.trigger("nodeDragging",m),m.dropIndicator&&t.addClass([r],m.dropIndicator)},o.prototype.appendIndicator=function(e,i,s){t.addClass([i],we);var n=this.createElement("div",{className:"e-sibling"});e.insertBefore(n,e.children[s])},o.prototype.dropAction=function(e,i){var s,n,l,o=e.event.offsetY,d=e.target,h=!1;l=i?e.element:e.dragData.draggable;for(m=0;m<l.ej2_instances.length;m++)if(l.ej2_instances[m]instanceof a){s=l.ej2_instances[m];break}if(s&&s.dragTarget){var c=s.dragTarget,p=t.closest(c,"."+ve),u=t.closest(d,"."+ve);if(null==u&&d.classList.contains(ue)&&(u=d.firstElementChild),i?t.detach(e.helper):t.detach(e.droppedElement),document.body.style.cursor="",!u||u.isSameNode(p)||this.isDescendant(p,u))return void(this.fields.dataSource instanceof r.DataManager==!1&&(this.preventExpand=!1));if(s.allowMultiSelection&&p.classList.contains(Ce)){var f=t.selectAll("."+Ce,s.element);if(e.target.offsetHeight<=33&&o>e.target.offsetHeight-10&&o>6)for(m=f.length-1;m>=0;m--)u.isSameNode(f[m])||this.isDescendant(f[m],u)||this.appendNode(d,f[m],u,e,s,o);else for(var m=0;m<f.length;m++)u.isSameNode(f[m])||this.isDescendant(f[m],u)||this.appendNode(d,f[m],u,e,s,o)}else this.appendNode(d,p,u,e,s,o);n=parseInt(p.getAttribute("aria-level"),10),h=!0}this.fields.dataSource instanceof r.DataManager==!1&&(this.preventExpand=!1),i?this.trigger("nodeDropped",this.getDragEvent(e.event,s,d,e.target,e.element,null,n,h)):this.trigger("nodeDropped",this.getDragEvent(e.event,s,d,e.target,e.dragData.draggedElement,null,n,h)),s.element.id!==this.element.id&&s.triggerEvent(),this.triggerEvent()},o.prototype.appendNode=function(e,i,s,n,r,l){var o=t.closest(e,"."+Le),a=t.closest(n.target,"."+fe),d=t.closest(n.target,"."+me);i.classList.contains("e-disable")||o||!(d&&n.event.offsetY<5||a&&n.event.offsetX<3||d&&n.event.offsetY>19||a&&n.event.offsetX>19||!d&&!a)?this.dropAsChildNode(i,s,r,null,n,l,!0):"LI"===e.nodeName?this.dropAsSiblingNode(i,s,n,r):e.firstElementChild&&e.classList.contains(ue)?"UL"===e.firstElementChild.nodeName&&this.dropAsSiblingNode(i,s,n,r):e.classList.contains("e-icon-collapsible")||e.classList.contains("e-icon-expandable")?this.dropAsSiblingNode(i,s,n,r):this.dropAsChildNode(i,s,r,null,n,l)},o.prototype.dropAsSiblingNode=function(e,i,s,n){var r,l=t.closest(i,"."+ye),o=t.closest(e,"."+ye),a=t.closest(o,"."+ve);if(s.target.offsetHeight>0&&s.event.offsetY>s.target.offsetHeight-2?r=!1:s.event.offsetY<2?r=!0:(s.target.classList.contains("e-icon-expandable")||s.target.classList.contains("e-icon-collapsible"))&&(s.event.offsetY<5||s.event.offsetX<3?r=!0:(s.event.offsetY>15||s.event.offsetX>17)&&(r=!1)),s.target.classList.contains("e-icon-expandable")||s.target.classList.contains("e-icon-collapsible")){var d=s.target.closest("li");l.insertBefore(e,r?d:d.nextElementSibling)}else l.insertBefore(e,r?s.target:s.target.nextElementSibling);this.moveData(e,i,l,r,n),this.updateElement(o,a),this.updateAriaLevel(e),n.element.id===this.element.id?this.updateList():(n.updateInstance(),this.updateInstance())},o.prototype.dropAsChildNode=function(e,i,s,n,r,l,o){var a,d=t.closest(e,"."+ye),h=t.closest(d,"."+ve),c=t.closest(i,"."+ye);if(r&&r.target&&(a=t.select(this.fullRowSelect?"."+Ie:"."+Oe,i)),r&&l<7&&!o)c.insertBefore(e,i),this.moveData(e,i,c,!0,s);else if(r&&r.target.offsetHeight>0&&l>r.target.offsetHeight-10&&!o&&!this.hasTemplate)c.insertBefore(e,i.nextElementSibling),this.moveData(e,i,c,!1,s);else if(this.hasTemplate&&a&&l>a.offsetHeight-10&&!o)c.insertBefore(e,i.nextElementSibling),this.moveData(e,i,c,!1,s);else{var p=this.expandParent(i),u=p.childNodes[n];p.insertBefore(e,u),this.moveData(e,u,p,!0,s)}this.updateElement(d,h),this.updateAriaLevel(e),s.element.id===this.element.id?this.updateList():(s.updateInstance(),this.updateInstance())},o.prototype.moveData=function(e,i,s,n,r){var l=t.closest(s,"."+ve),o=this.getId(e),a=r.updateChildField(r.treeData,r.fields,o,null,null,!0),d=this.getId(i),h=this.getDataPos(this.treeData,this.fields,d),c=this.getId(l);if(1===this.dataType){this.updateField(this.treeData,this.fields,c,"hasChildren",!0);var p=t.isNullOrUndefined(h)?this.treeData.length:n?h:h+1;if(t.isNullOrUndefined(c)&&!this.hasPid)delete a[0][this.fields.parentID];else{var u=this.isNumberTypeId?parseFloat(c):c;t.setValue(this.fields.parentID,u,a[0])}if(this.treeData.splice(p,0,a[0]),r.element.id!==this.element.id){var f=r.removeChildNodes(o);p++;for(var m=0,v=f.length;m<v;m++)this.treeData.splice(p,0,f[m]),p++;r.groupedData=r.getGroupedData(r.treeData,r.fields.parentID)}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.addChildData(this.treeData,this.fields,c,a,n?h:h+1)},o.prototype.expandParent=function(e){var s=t.select("div."+xe,e);s&&s.classList.contains(me)&&!0!==this.preventExpand&&this.expandAction(e,s,null);var n=t.select("."+ye,e);if(!0===this.preventExpand&&!n&&s&&this.renderChildNodes(e),n=t.select("."+ye,e),t.isNullOrUndefined(n)||!0!==this.preventExpand||(n.style.display="none"),t.isNullOrUndefined(n)||!1!==this.preventExpand||(n.style.display="block"),t.isNullOrUndefined(n)&&!0===this.preventExpand&&(t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,me,this.listBaseOption),(r=t.select("div."+xe,e))&&r.classList.add("e-icon-expandable"),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),r?t.removeClass([r],fe):i.ListBase.generateIcon(this.createElement,e,me,this.listBaseOption),e.setAttribute("aria-expanded","false"),n.style.display="none"),t.isNullOrUndefined(n)){this.trigger("nodeExpanding",this.getExpandEvent(e,null)),t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,fe,this.listBaseOption);var r=t.select("div."+xe,e);r?t.removeClass([r],me):(i.ListBase.generateIcon(this.createElement,e,fe,this.listBaseOption),r=t.select("div."+xe,e),t.removeClass([r],me)),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),this.addExpand(e),this.trigger("nodeExpanded",this.getExpandEvent(e,null))}return n},o.prototype.updateElement=function(e,i){if(i&&0===e.childElementCount){var s=t.select("div."+xe,i);t.detach(e),t.detach(s);var n=this.getId(i);this.updateField(this.treeData,this.fields,n,"hasChildren",!1),this.removeExpand(i,!0)}},o.prototype.updateAriaLevel=function(e){var i=this.parents(e,"."+ye).length;e.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+ye,e),i+1)},o.prototype.updateChildAriaLevel=function(e,i){if(!t.isNullOrUndefined(e))for(var s=e.childNodes,n=0,r=s.length;n<r;n++){var l=s[n];l.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+ye,l),i+1)}},o.prototype.renderVirtualEle=function(e){var t;e.event.offsetY>e.target.offsetHeight-2?t=!1:e.event.offsetY<2&&(t=!0);var i=this.createElement("div",{className:"e-sibling"}),s=this.fullRowSelect?t?1:2:t?0:1;e.target.insertBefore(i,e.target.children[s])},o.prototype.removeVirtualEle=function(){var e=t.select(".e-sibling");e&&t.detach(e)},o.prototype.destroyDrag=function(){this.dragObj&&this.dropObj&&(this.dragObj.destroy(),this.dropObj.destroy())},o.prototype.getDragEvent=function(e,i,s,n,l,o,a,d){var h=s?t.closest(s,"."+ve):null,c=h?this.getNodeData(h):null,p=i?i.dragLi:l,u=i?i.dragData:null,f=s?this.parents(s,"."+ve):null,m=i.dragLi.parentElement,v=i.dragLi?t.closest(m,"."+ve):null,g=null,y=null,b=[we,Se,"e-drop-out","e-no-drop"],C=null,N=!0===d?p:h,E=N?t.closest(N,".e-list-parent"):null,x=0,O=null;if(v=i.dragLi&&null===v?t.closest(m,"."+ue):v,v=!0===d?this.dragParent:v,o)for(;x<4;){if(t.select("."+xe,o).classList.contains(b[x])){C=b[x];break}x++}if(E){var S=0;for(x=0;x<E.childElementCount;x++){if(S=!0!==d&&E.children[x]===p&&h!==p?++S:S,!0!==d&&E.children[x].classList.contains("e-hover")){y=e.offsetY>=23?x+1:x;break}if(E.children[x]===N){e.offsetY,y=x;break}}y=0!==S?--y:y,O="e-drop-in"==C?"Inside":e.offsetY<7?"Before":"After"}if(s&&(g=0===f.length?null:s.classList.contains(ve)?f[0]:f[1]),h===p&&(g=h),s&&n.offsetHeight<=33&&e.offsetY<n.offsetHeight-10&&e.offsetY>6&&(g=h,!0!==d)){a=++a;var w=g?t.select(".e-list-parent",g):null;if(y=w?w.children.length:0,!(this.fields.dataSource instanceof r.DataManager)&&null===w&&g){var I=g.hasAttribute("data-uid")?this.getChildNodes(this.fields.dataSource,g.getAttribute("data-uid").toString()):null;y=I?I.length:0}}return{cancel:!1,clonedNode:o,event:e,draggedNode:p,draggedNodeData:u,droppedNode:h,droppedNodeData:c,dropIndex:y,dropLevel:a,draggedParentNode:v,dropTarget:g,dropIndicator:C,target:n,position:O}},o.prototype.addFullRow=function(e){var i=this.liList.length;if(e)for(s=0;s<i;s++)this.createFullRow(this.liList[s]);else for(var s=0;s<i;s++){var n=t.select("."+Ie,this.liList[s]);t.detach(n)}},o.prototype.createFullRow=function(e){var t=this.createElement("div",{className:Ie});e.insertBefore(t,e.childNodes[0])},o.prototype.addMultiSelect=function(e){if(e)for(var i=0,s=n=t.selectAll('.e-list-item:not([aria-selected="true"])',this.element);i<s.length;i++)(o=s[i]).setAttribute("aria-selected","false");else for(var n=t.selectAll('.e-list-item[aria-selected="false"]',this.element),r=0,l=n;r<l.length;r++){var o=l[r];o.removeAttribute("aria-selected")}},o.prototype.collapseByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),r=0,l=n.length;r<l;r++){var o=n[r],a=t.select("."+fe,t.select("."+Oe,o));t.isNullOrUndefined(a)||this.collapseNode(o,a,null),this.collapseByLevel(t.select("."+ye,o),i-1,s)}},o.prototype.collapseAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+fe,this.element)),s=0,n=i.length;s<n;s++){var r=i[s],l=t.closest(r,"."+ve);this.collapseNode(l,r,null)}},o.prototype.expandByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),r=0,l=n.length;r<l;r++){var o=n[r],a=t.select("."+me,t.select("."+Oe,o));t.isNullOrUndefined(a)||this.expandAction(o,a,null),this.expandByLevel(t.select("."+ye,o),i-1,s)}},o.prototype.expandAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+me,this.element)),s=0,n=i.length;s<n;s++){var r=i[s],l=t.closest(r,"."+ve);this.expandAction(l,r,null,!0)}},o.prototype.getVisibleNodes=function(e,i){var s=Array.prototype.slice.call(i);if(e)for(var n=0;n<s.length;n++)t.isVisible(s[n])||(s.splice(n,1),n--);return s},o.prototype.removeNode=function(e){var i=t.closest(e,"."+ye),s=t.closest(i,"."+ve);t.isNullOrUndefined(this.nodeTemplateFn)||this.destroyTemplate(e),t.detach(e),this.updateElement(i,s),this.updateInstance(),this.removeData(e)},o.prototype.updateInstance=function(){this.updateList(),this.updateSelectedNodes(),this.updateExpandedNodes(),this.allowServerDataBinding=!1,this.updateServerProperties("expand"),this.updateServerProperties("check"),this.updateServerProperties("select"),this.allowServerDataBinding=!0},o.prototype.updateServerProperties=function(e){this.isBlazorPlatform&&("expand"==e?(this.isBlazorExpandedNodes=this.expandedNodes,this.setProperties({expandedNodes:[]},!0)):"check"==e?this.setProperties({checkedNodes:this.checkedNodes},!0):this.setProperties({selectedNodes:this.selectedNodes},!0))},o.prototype.updateList=function(){this.liList=Array.prototype.slice.call(t.selectAll("."+ve,this.element))},o.prototype.updateSelectedNodes=function(){if(!this.isBlazorPlatform||this.isBlazorPlatform&&!this.initialRender){this.setProperties({selectedNodes:[]},!0);e=t.selectAll("."+Ce,this.element);this.selectGivenNodes(e)}else if(this.isBlazorPlatform&&this.initialRender)for(var e=t.selectAll("."+Ce,this.element),i=0;i<e.length;i++){var s=e[i].getAttribute("data-uid").toString();t.isNullOrUndefined(s)||-1!==this.selectedNodes.indexOf(s)||this.selectedNodes.push(s)}},o.prototype.updateExpandedNodes=function(){if(!this.isBlazorPlatform||this.isBlazorPlatform&&!this.initialRender){this.setProperties({expandedNodes:[]},!0);for(var e=0,i=(s=t.selectAll('[aria-expanded="true"]',this.element)).length;e<i;e++)this.addExpand(s[e])}else if(this.isBlazorPlatform&&this.initialRender)for(var s=t.selectAll('[aria-expanded="true"]',this.element),n=0;n<s.length;n++){var r=s[n].getAttribute("data-uid").toString();t.isNullOrUndefined(r)||-1!==this.expandedNodes.indexOf(r)||this.expandedNodes.push(r)}},o.prototype.removeData=function(e){if(1===this.dataType){var t=new r.DataManager(this.treeData),i=this.getId(e),s={},n=this.isNumberTypeId?parseFloat(i):i;s[this.fields.id]=n,t.remove(this.fields.id,s),this.removeChildNodes(i)}else{i=this.getId(e);this.updateChildField(this.treeData,this.fields,i,null,null,!0)}},o.prototype.removeChildNodes=function(e){var i=this.getChildGroup(this.groupedData,e,!1),s=[];if(i)for(var n=0,l=i.length;n<l;n++){var o=new r.DataManager(this.treeData),a=t.getValue(this.fields.id,i[n]).toString(),d={},h=this.isNumberTypeId?parseFloat(a):a;d[this.fields.id]=h;var c=o.remove(this.fields.id,d);s.push(c[0]),this.removeChildNodes(a)}return s},o.prototype.doGivenAction=function(e,i,s){for(var n=0,r=e.length;n<r;n++){var l=this.getElement(e[n]);if(!t.isNullOrUndefined(l)){var o=t.select("."+i,t.select("."+Oe,l));t.isNullOrUndefined(o)||(s?this.expandAction(l,o,null):this.collapseNode(l,o,null))}}},o.prototype.addGivenNodes=function(e,s,n,r,l){if(0!==e.length){var o=this.getSortedData(e),a=s?parseFloat(s.getAttribute("aria-level"))+1:1;r&&this.updateMapper(a);for(var d,h=i.ListBase.createListItemFromJson(this.createElement,o,this.listBaseOption,a),c=(d=l||(s?this.expandParent(s):t.select("."+ye,this.element))).childNodes[n],p=0;p<h.length;p++)d.insertBefore(h[p],c);this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate();var u=this.getId(s);if(1===this.dataType){this.updateField(this.treeData,this.fields,u,"hasChildren",!0);for(var f=this.getId(c),m=t.isNullOrUndefined(f)?this.treeData.length:this.getDataPos(this.treeData,this.fields,f),v=0;v<e.length;v++){if(!t.isNullOrUndefined(u)){var g=this.isNumberTypeId?parseFloat(u):u;t.setValue(this.fields.parentID,g,e[v])}this.treeData.splice(m,0,e[v]),m++}}else this.addChildData(this.treeData,this.fields,u,e,n);this.finalizeNode(d)}},o.prototype.updateMapper=function(e){var t=1===e?this.fields:this.getChildFields(this.fields,e-1,1);this.updateListProp(t)},o.prototype.updateListProp=function(e){var t=this.getActualProperties(e);this.listBaseOption.fields=t,this.listBaseOption.fields.url=t.hasOwnProperty("navigateUrl")?t.navigateUrl:"navigateUrl"},o.prototype.getDataPos=function(e,i,s){for(var n=null,l=0,o=e.length;l<o;l++){var a=t.getValue(i.id,e[l]);if(e[l]&&a&&a.toString()===s)return l;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[l]))){if(this.fields.dataSource instanceof r.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[l]))){var d=t.getValue("child",e[l]);if(null!==(n=this.getDataPos(d,this.getChildMapper(i),s)))break}}else{var h=t.getValue(i.child,e[l]);if(null!==(n=this.getDataPos(h,this.getChildMapper(i),s)))break}}return n},o.prototype.addChildData=function(e,i,s,n,l){var o;if(t.isNullOrUndefined(s)){l=t.isNullOrUndefined(l)?e.length:l;for(var a=0,d=n.length;a<d;a++)e.splice(l,0,n[a]),l++;return o}for(var h=0,c=e.length;h<c;h++){var p=t.getValue(i.id,e[h]);if(e[h]&&p&&p.toString()===s){if("string"==typeof i.child&&e[h].hasOwnProperty(i.child)&&null!==e[h][i.child]||this.fields.dataSource instanceof r.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName&&e[h].hasOwnProperty("child")){var u="string"==typeof i.child?i.child:"child",f=t.getValue(u,e[h]);t.isNullOrUndefined(f)&&(f=[]),l=t.isNullOrUndefined(l)?f.length:l;for(var a=0,d=n.length;a<d;a++)f.splice(l,0,n[a]),l++}else{u="string"==typeof i.child?i.child:"child";e[h][u]=n}return!0}if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[h]))){if(this.fields.dataSource instanceof r.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName&&!t.isNullOrUndefined(t.getValue("child",e[h]))){f=t.getValue("child",e[h]);if(void 0!==(o=this.addChildData(f,this.getChildMapper(i),s,n,l)))break}}else{var m=t.getValue(i.child,e[h]);if(void 0!==(o=this.addChildData(m,this.getChildMapper(i),s,n,l)))break}}return o},o.prototype.doDisableAction=function(e){var i=this.nodeType(e),s=this.checkValidId(i);this.validArr=[];for(var n=0,r=s.length;n<r;n++){var l=s[n][this.fields.id].toString();l&&-1===this.disableNode.indexOf(l)&&this.disableNode.push(l);var o=this.getElement(l);o&&(o.setAttribute("aria-disabled","true"),t.addClass([o],"e-disable"))}},o.prototype.doEnableAction=function(e){for(var i=this.nodeType(e),s=0,n=i.length;s<n;s++){var r=this.getElement(i[s]),l=i[s];l&&-1!==this.disableNode.indexOf(l)&&this.disableNode.splice(this.disableNode.indexOf(l),1),r&&(r.removeAttribute("aria-disabled"),t.removeClass([r],"e-disable"))}},o.prototype.nodeType=function(e){for(var t=[],i=0,s=e.length;i<s;i++){var n=void 0;"string"==typeof e[i]?n=e[i]?e[i].toString():null:"object"==typeof e[i]&&(n=e[i]?e[i].getAttribute("data-uid").toString():null),-1==t.indexOf(n)&&t.push(n)}return t},o.prototype.checkValidId=function(e){var i=this;if(1===this.dataType)this.validArr=this.treeData.filter(function(t){return-1!==e.indexOf(t[i.fields.id]?t[i.fields.id].toString():null)});else if(2===this.dataType)for(var s=0;s<this.treeData.length;s++){var n=this.treeData[s][this.fields.id]?this.treeData[s][this.fields.id].toString():null;-1!==e.indexOf(n)&&this.validArr.push(this.treeData[s]);var r=t.getValue(this.fields.child.toString(),this.treeData[s]);r&&this.filterNestedChild(r,e)}return this.validArr},o.prototype.filterNestedChild=function(e,i){for(var s=0;s<e.length;s++){var n=e[s][this.fields.id]?e[s][this.fields.id].toString():null;-1!==i.indexOf(n)&&this.validArr.push(e[s]);var r=t.getValue(this.fields.child.toString(),e[s]);r&&this.filterNestedChild(r,i)}},o.prototype.setTouchClass=function(){var e=t.closest(this.element,".e-bigger");this.touchClass=t.isNullOrUndefined(e)?"":"e-small"},o.prototype.updatePersistProp=function(){this.removeField(this.treeData,this.fields,["selected","expanded"]);for(var e=this.selectedNodes,t=0,i=e.length;t<i;t++)this.updateField(this.treeData,this.fields,e[t],"selected",!0);var s=this.expandedNodes;this.isBlazorPlatform&&(s=this.isBlazorExpandedNodes);for(var n=0,r=s.length;n<r;n++)this.updateField(this.treeData,this.fields,s[n],"expanded",!0);if(this.showCheckBox){this.removeField(this.treeData,this.fields,["isChecked"]);for(var l=this.checkedNodes,o=0,r=l.length;o<r;o++)this.updateField(this.treeData,this.fields,l[o],"isChecked",!0)}},o.prototype.removeField=function(e,i,s){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i))for(var n=0,l=e.length;n<l;n++){for(var o=0;o<s.length;o++){var a=this.getMapperProp(i,s[o]);t.isNullOrUndefined(e[n][a])||delete e[n][a]}"string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[n]))?this.fields.dataSource instanceof r.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[n]))&&this.removeField(t.getValue("child",e[n]),this.getChildMapper(i),s):this.removeField(t.getValue(i.child,e[n]),this.getChildMapper(i),s)}},o.prototype.getMapperProp=function(e,i){switch(i){case"selected":return t.isNullOrUndefined(e.selected)?"selected":e.selected;case"expanded":return t.isNullOrUndefined(e.expanded)?"expanded":e.expanded;case"isChecked":return t.isNullOrUndefined(e.isChecked)?"isChecked":e.isChecked;case"hasChildren":return t.isNullOrUndefined(e.hasChildren)?"hasChildren":e.hasChildren;default:return i}},o.prototype.updateField=function(e,i,s,n,l){if(!t.isNullOrUndefined(s))if(1===this.dataType){var o=this.isNumberTypeId?parseFloat(s):s,a=new r.DataManager(this.treeData).executeLocal((new r.Query).where(i.id,"equal",o,!1));t.setValue(this.getMapperProp(i,n),l,a[0])}else this.updateChildField(e,i,s,n,l)},o.prototype.updateChildField=function(e,i,s,n,l,o){var a;if(t.isNullOrUndefined(e))return a;for(var d=0,h=e.length;d<h;d++){var c=t.getValue(i.id,e[d]);if(e[d]&&c&&c.toString()===s)return o?a=e.splice(d,1):(t.setValue(this.getMapperProp(i,n),l,e[d]),a=[]),a;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[d]))){if(this.fields.dataSource instanceof r.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[d]))){var p=t.getValue("child",e[d]);if(void 0!==(a=this.updateChildField(p,this.getChildMapper(i),s,n,l,o)))break}}else{var u=t.getValue(i.child,e[d]);if(void 0!==(a=this.updateChildField(u,this.getChildMapper(i),s,n,l,o)))break}}return a},o.prototype.triggerEvent=function(){this.updateTemplateForBlazor(),this.renderReactTemplates();var e={data:this.treeData};this.trigger("dataSourceChanged",e)},o.prototype.updateBlazorTemplate=function(){t.updateBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate",this,!1)},o.prototype.clientUpdateInitial=function(){this.blazorInitialRender=!0},o.prototype.wireInputEvents=function(e){t.EventHandler.add(e,"blur",this.inputFocusOut,this)},o.prototype.wireEditingEvents=function(e){var i=this;if(e&&!this.disabled){var s=this;this.touchEditObj=new t.Touch(this.element,{tap:function(e){i.isDoubleTapped(e)&&2===e.tapCount&&(e.originalEvent.preventDefault(),s.editingHandler(e.originalEvent))}})}else this.touchEditObj&&this.touchEditObj.destroy()},o.prototype.wireClickEvent=function(e){if(e){var i=this;this.touchClickObj=new t.Touch(this.element,{tap:function(e){i.clickHandler(e)}})}else this.touchClickObj&&this.touchClickObj.destroy()},o.prototype.wireExpandOnEvent=function(e){var i=this;if(e){var s=this;this.touchExpandObj=new t.Touch(this.element,{tap:function(e){("Click"===i.expandOnType||"DblClick"===i.expandOnType&&i.isDoubleTapped(e)&&2===e.tapCount)&&3!==e.originalEvent.which&&s.expandHandler(e)}})}else this.touchExpandObj&&this.touchExpandObj.destroy()},o.prototype.mouseDownHandler=function(e){this.mouseDownStatus=!0,(e.shiftKey||e.ctrlKey)&&e.preventDefault(),e.ctrlKey&&this.allowMultiSelection&&t.EventHandler.add(this.element,"contextmenu",this.preventContextMenu,this)},o.prototype.preventContextMenu=function(e){e.preventDefault()},o.prototype.wireEvents=function(){t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this),this.wireClickEvent(!0),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0),t.EventHandler.add(this.element,"focus",this.focusIn,this),t.EventHandler.add(this.element,"blur",this.focusOut,this),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.element,"mouseout",this.onMouseLeave,this),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},o.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler),this.wireClickEvent(!1),this.wireExpandOnEvent(!1),t.EventHandler.remove(this.element,"focus",this.focusIn),t.EventHandler.remove(this.element,"blur",this.focusOut),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),t.EventHandler.remove(this.element,"mouseout",this.onMouseLeave),this.disabled||this.keyboardModule.destroy()},o.prototype.parents=function(e,i){for(var s=[],n=e.parentNode;!t.isNullOrUndefined(n);)t.matches(n,i)&&s.push(n),n=n.parentNode;return s},o.prototype.isDoubleTapped=function(e){var i,s=e.originalEvent.target;return s&&e.tapCount&&(1===e.tapCount?this.firstTap=t.closest(s,"."+ve):2===e.tapCount&&(i=t.closest(s,"."+ve))),this.firstTap===i},o.prototype.isDescendant=function(e,i){for(var s=i.parentNode;!t.isNullOrUndefined(s);){if(s===e)return!0;s=s.parentNode}return!1},o.prototype.showSpinner=function(e){t.addClass([e],Ne),s.createSpinner({target:e,width:t.Browser.isDevice?16:14},this.createElement),s.showSpinner(e)},o.prototype.hideSpinner=function(e){s.hideSpinner(e),e.innerHTML="",t.removeClass([e],Ne)},o.prototype.setCheckedNodes=function(e){e=JSON.parse(JSON.stringify(e)),this.uncheckAll(this.checkedNodes),this.setIndeterminate(e),e.length>0&&this.checkAll(e)},o.prototype.setValidCheckedNode=function(e){if(1===this.dataType){var i=this.fields,s=new r.DataManager(this.treeData).executeLocal((new r.Query).where(i.id,"equal",e,!0));if(s[0]&&(this.setChildCheckState(s,e,s[0]),this.autoCheck)){for(var n=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null,l=this.getChildNodes(this.treeData,n),o=0,a=0;a<l.length;a++){var d=l[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&o++}o===l.length&&-1===this.checkedNodes.indexOf(n)&&n&&this.checkedNodes.push(n)}}else if(2===this.dataType)for(var h=0;h<this.treeData.length;h++){if((this.treeData[h][this.fields.id]?this.treeData[h][this.fields.id].toString():"")===e&&-1===this.checkedNodes.indexOf(e)){this.checkedNodes.push(e);break}var c=t.getValue(this.fields.child.toString(),this.treeData[h]);c&&this.setChildCheckState(c,e,this.treeData[h])}},o.prototype.setChildCheckState=function(e,i,s){var n,r=0;if(1===this.dataType){s&&(n=s[this.fields.id]?s[this.fields.id].toString():null);for(o=0;o<e.length;o++){var l=e[o][this.fields.id]?e[o][this.fields.id].toString():null;s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(l)&&this.checkedNodes.push(l),l===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i),(d=this.getChildNodes(this.treeData,l))&&this.setChildCheckState(d,i,s)}}else{s&&(n=s[this.fields.id]?s[this.fields.id].toString():"");for(var o=0;o<e.length;o++){var a=e[o][this.fields.id]?e[o][this.fields.id].toString():"";s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(a)&&this.checkedNodes.push(a),a===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i);var d=t.getValue(this.fields.child.toString(),e[o]);d&&this.setChildCheckState(d,i,e[o]),-1!==this.checkedNodes.indexOf(a)&&this.autoCheck&&r++,r===e.length&&-1===this.checkedNodes.indexOf(n)&&this.autoCheck&&this.checkedNodes.push(n)}}},o.prototype.setIndeterminate=function(e){for(var t=0;t<e.length;t++)this.setValidCheckedNode(e[t])},o.prototype.updatePosition=function(e,t,i,s){if(1===this.dataType){var n=this.getDataPos(this.treeData,this.fields,e);if(this.treeData.splice(n,1,t),i){this.removeChildNodes(e);for(var r=0;r<s.length;r++)this.treeData.splice(n,0,s[r]),n++}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.updateChildPosition(this.treeData,this.fields,e,[t],void 0)},o.prototype.updateChildPosition=function(e,i,s,n,l){for(var o,a=0,d=e.length;a<d;a++){var h=t.getValue(i.id,e[a]);if(e[a]&&h&&h.toString()===s)return e[a]=n[0],!0;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[a]))){if(this.fields.dataSource instanceof r.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[a]))){var c=t.getValue("child",e[a]);if(void 0!==(o=this.updateChildPosition(c,this.getChildMapper(i),s,n,l)))break}}else{var p=t.getValue(i.child,e[a]);if(void 0!==(o=this.updateChildPosition(p,this.getChildMapper(i),s,n,l)))break}}return o},o.prototype.dynamicState=function(){this.setDragAndDrop(this.allowDragAndDrop),this.wireEditingEvents(this.allowEditing),this.disabled?(this.unWireEvents(),this.rippleFn(),this.rippleIconFn()):(this.wireEvents(),this.setRipple())},o.prototype.crudOperation=function(e,i,s,n,r,l,o){var a,d=this,h=this.fields.dataSource,c=[],p=this.getQuery(this.fields),u=this.fields.id,f={addedRecords:[],deletedRecords:[],changedRecords:[]},m=[];i?m=this.nodeType(i):s&&("string"==typeof s?m[0]=s.toString():"object"==typeof s&&(m[0]=s.getAttribute("data-uid").toString()));for(var v=0,g=m.length;v<g;v++){var y=this.getElement(m[v]);if(!t.isNullOrUndefined(y)){var b=this.getNodeObject(m[v]);c.push(b)}}switch(e){case"delete":1==i.length?a=h.remove(u,c[0],p.fromTable,p):(f.deletedRecords=c,a=h.saveChanges(f,u,p.fromTable,p)),a.then(function(e){return d.deleteSuccess(m)}).catch(function(e){return d.dmFailure(e)});break;case"update":c[0][this.fields.text]=n,(a=h.update(u,c[0],p.fromTable,p)).then(function(e){return d.editSucess(s,n,o)}).catch(function(e){return d.dmFailure(e,s,o)});break;case"insert":if(1==r.length)a=h.insert(r[0],p.fromTable,p);else{for(var C=[],v=0,g=r.length;v<g;v++)C.push(r[v]);f.addedRecords=C,a=h.saveChanges(f,u,p.fromTable,p)}a.then(function(e){var t=d.getElement(s);d.addSuccess(r,t,l),d.preventExpand=!1}).catch(function(e){return d.dmFailure(e)})}},o.prototype.deleteSuccess=function(e){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);t.isNullOrUndefined(n)||this.removeNode(n)}1===this.dataType&&(this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)),this.triggerEvent()},o.prototype.editSucess=function(e,i,s){var n=this.getElement(e),r=t.select("."+ge,n);this.appendNewText(n,r,i,s)},o.prototype.addSuccess=function(e,t,i){var s,n=t?t.querySelector("."+xe):null,r=this;t&&n&&n.classList.contains(me)&&null===t.querySelector("."+ye)?r.renderChildNodes(t,null,function(){s=t.querySelector("."+ye),r.addGivenNodes(e,t,i,!0,s),r.triggerEvent()}):(this.addGivenNodes(e,t,i,!0),this.triggerEvent())},o.prototype.dmFailure=function(e,t,i){t&&this.updatePreviousText(t,i),this.trigger("actionFailure",{error:e})},o.prototype.updatePreviousText=function(e,i){var s=this.getElement(e),n=t.select("."+ge,s);this.updateText(s,n,this.oldText,i)},o.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"allowDragAndDrop":this.setDragAndDrop(this.allowDragAndDrop);break;case"dragArea":this.allowDragAndDrop&&(this.dragObj.dragArea=this.dragArea);break;case"allowEditing":this.wireEditingEvents(this.allowEditing);break;case"allowMultiSelection":if(this.selectedNodes.length>1){var r=this.getElement(this.selectedNodes[0]);this.isLoaded=!1,this.removeSelectAll(),this.selectNode(r,null),this.isLoaded=!0}this.setMultiSelect(this.allowMultiSelection),this.addMultiSelect(this.allowMultiSelection);break;case"checkedNodes":this.showCheckBox&&(this.checkedNodes=i.checkedNodes,this.setCheckedNodes(e.checkedNodes));break;case"autoCheck":this.showCheckBox&&(this.autoCheck=e.autoCheck,this.ensureIndeterminate());break;case"cssClass":this.setCssClass(i.cssClass,e.cssClass);break;case"enableRtl":this.setEnableRtl();break;case"expandedNodes":this.isAnimate=!1,this.isBlazorPlatform||this.setProperties({expandedNodes:[]},!0),this.collapseAll(),this.isInitalExpand=!0,this.isBlazorPlatform||this.setProperties({expandedNodes:t.isNullOrUndefined(e.expandedNodes)?[]:e.expandedNodes},!0),this.doExpandAction(),this.isInitalExpand=!1,this.isAnimate=!0;break;case"expandOn":this.wireExpandOnEvent(!1),this.setExpandOnType(),"None"===this.expandOnType||this.disabled||this.wireExpandOnEvent(!0);break;case"disabled":this.setDisabledMode(),this.dynamicState();break;case"fields":this.isAnimate=!1,this.isFieldChange=!0,this.initialRender=!0,this.blazorInitialRender||this.reRenderNodes(),this.blazorInitialRender=!1,this.initialRender=!1,this.isAnimate=!0,this.isFieldChange=!1;break;case"fullRowSelect":this.setFullRow(this.fullRowSelect),this.addFullRow(this.fullRowSelect);break;case"loadOnDemand":if(!1===this.loadOnDemand&&!this.onLoaded){for(var l=this.element.querySelectorAll("li"),o=0;o<l.length;)"true"!==l[o].getAttribute("aria-expanded")&&this.renderChildNodes(l[o],!0,null,!0),o++;this.onLoaded=!0}break;case"nodeTemplate":this.hasTemplate=!1,this.nodeTemplateFn=this.templateComplier(this.nodeTemplate),this.reRenderNodes();break;case"selectedNodes":this.removeSelectAll(),this.setProperties({selectedNodes:e.selectedNodes},!0),this.doSelectionAction();break;case"showCheckBox":case"sortOrder":this.reRenderNodes();break;case"fullRowNavigable":this.setProperties({fullRowNavigable:e.fullRowNavigable},!0),this.listBaseOption.itemNavigable=e.fullRowNavigable,this.reRenderNodes()}},o.prototype.destroy=function(){t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),this.clearTemplate(),this.element.removeAttribute("aria-activedescendant"),this.element.removeAttribute("tabindex"),this.unWireEvents(),this.wireEditingEvents(!1),this.disabled||(this.rippleFn(),this.rippleIconFn()),this.setCssClass(this.cssClass,null),this.setDragAndDrop(!1),this.setFullRow(!1),this.isBlazorPlatform&&(this.ulElement=this.element.querySelector(".e-list-parent.e-ul")),this.ulElement&&this.ulElement.parentElement&&this.ulElement.parentElement.removeChild(this.ulElement),this.isBlazorPlatform||e.prototype.destroy.call(this)},o.prototype.addNodes=function(e,i,s,n){if(!t.isNullOrUndefined(e)){e=JSON.parse(JSON.stringify(e));var l=this.getElement(i);if(this.preventExpand=n,this.fields.dataSource instanceof r.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName)this.isOffline?this.addSuccess(e,l,s):this.crudOperation("insert",null,i,null,e,s,this.preventExpand);else if(2===this.dataType)this.addGivenNodes(e,l,s);else{if(l)this.addGivenNodes(e,l,s);else{e=this.getSortedData(e);for(var o=0;o<e.length;o++){var a=t.getValue(this.fields.parentID,e[o]);l=a?this.getElement(a.toString()):a,this.addGivenNodes([e[o]],l,s)}}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}this.updateCheckedStateFromDS(),this.showCheckBox&&l&&this.ensureParentCheckState(l),(this.fields.dataSource instanceof r.DataManager==!1||this.fields.dataSource instanceof r.DataManager&&"BlazorAdaptor"===this.fields.dataSource.adaptorName)&&(this.preventExpand=!1,this.triggerEvent())}},o.prototype.beginEdit=function(e){var i=this.getElement(e);t.isNullOrUndefined(i)||this.disabled||this.createTextbox(i,null)},o.prototype.checkAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!0)},o.prototype.collapseAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.collapseByLevel(t.select("."+ye,this.element),i,s):this.collapseAllNodes(s):this.doGivenAction(e,fe,!1)},o.prototype.disableNodes=function(e){t.isNullOrUndefined(e)||this.doDisableAction(e)},o.prototype.enableNodes=function(e){t.isNullOrUndefined(e)||this.doEnableAction(e)},o.prototype.ensureVisible=function(e){var i=this.getElement(e);if(!t.isNullOrUndefined(i)){var s=this.parents(i,"."+ve);this.expandAll(s),setTimeout(function(){i.scrollIntoView(!0)},450)}},o.prototype.expandAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.expandByLevel(t.select("."+ye,this.element),i,s):this.expandAllNodes(s):this.doGivenAction(e,me,!0)},o.prototype.getAllCheckedNodes=function(){return this.checkedNodes},o.prototype.getDisabledNodes=function(){return this.disableNode},o.prototype.getNode=function(e){var t=this.getElement(e);return this.getNodeData(t,!0)},o.prototype.getTreeData=function(e){var i=this.getId(e);if(this.updatePersistProp(),t.isNullOrUndefined(i))return this.treeData;var s=this.getNodeObject(i);return t.isNullOrUndefined(s)?[]:[s]},o.prototype.moveNodes=function(e,i,s,n){var l=this.getElement(i);if(!t.isNullOrUndefined(l)){for(var o=0;o<e.length;o++){var a=this.getElement(e[o]);t.isNullOrUndefined(a)||l.isSameNode(a)||this.isDescendant(a,l)||(this.preventExpand=n,this.dropAsChildNode(a,l,this,s))}this.fields.dataSource instanceof r.DataManager==!1&&(this.preventExpand=!1),this.triggerEvent()}},o.prototype.refreshNode=function(e,s){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(s)){var n,r=!1;if(1==this.dataType&&s.length>1)r=!0;else if(2==this.dataType&&1===s.length){var l=t.getValue(this.fields.child.toString(),s[0]);t.isNullOrUndefined(l)||(r=!0)}var o=this.getElement(e);n=o?o.getAttribute("data-uid"):e?e.toString():null,this.refreshData=this.getNodeObject(n),s=JSON.parse(JSON.stringify(s));var a,d;if(1==this.dataType&&r){for(var h=0;h<s.length;h++)if(t.isNullOrUndefined(s[h][this.fields.parentID])){d=s[h],s.splice(h,1);break}a=t.extend({},this.refreshData,d)}else a=t.extend({},this.refreshData,s[0]);if(t.isNullOrUndefined(o))return void this.updatePosition(n,a,r,s);this.isRefreshed=!0;var c=parseFloat(o.getAttribute("aria-level")),p=i.ListBase.createListItemFromJson(this.createElement,[a],this.listBaseOption,c),u=t.select("."+ye,o),f=t.getValue(this.fields.child.toString(),a);if(r&&u||r&&!t.isNullOrUndefined(f)){var m=o.parentElement,v=Array.prototype.indexOf.call(m.childNodes,o);t.remove(o),m.insertBefore(p[0],m.childNodes[v]),this.updatePosition(n,a,r,s),r&&u&&this.expandAll([n])}else{var g=t.select("."+Oe,o),y=t.select("."+Oe,p[0]),b=t.select("div."+xe,g),C=t.select("div."+xe,y);b&&C&&(C.classList.contains(me)&&b.classList.contains(fe)?(t.removeClass([C],me),t.addClass([C],fe)):C.classList.contains(fe)&&b.classList.contains(me)?(t.removeClass([C],fe),t.addClass([C],me)):b.classList.contains("interaction")&&t.addClass([C],"interaction")),t.remove(g);var N=t.select("."+Ie,o);N.parentNode.insertBefore(y,N.nextSibling),this.updatePosition(n,a,r,s)}if(o=this.getElement(e),a[this.fields.tooltip]&&o.setAttribute("title",a[this.fields.tooltip]),a.hasOwnProperty(this.fields.htmlAttributes)&&a[this.fields.htmlAttributes]){var E={};t.merge(E,a[this.fields.htmlAttributes]),E.class?(t.addClass([o],E.class.split(" ")),delete E.class):t.attributes(o,E)}-1!==this.selectedNodes.indexOf(n)&&(o.setAttribute("aria-selected","true"),t.addClass([o],Ce)),this.isRefreshed=!1,this.triggerEvent()}},o.prototype.removeNodes=function(e){t.isNullOrUndefined(e)||(this.fields.dataSource instanceof r.DataManager&&!this.isOffline&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName?this.crudOperation("delete",e):this.deleteSuccess(e))},o.prototype.updateNode=function(e,i){var s=this;if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i)&&this.allowEditing){var n=this.getElement(e);if(!t.isNullOrUndefined(n)){var l=t.select("."+ge,n);this.updateOldText(n);var o=this.getEditEvent(n,null,null);this.trigger("nodeEditing",o,function(t){t.cancel||(s.fields.dataSource instanceof r.DataManager&&!s.isOffline&&"BlazorAdaptor"!==s.fields.dataSource.adaptorName?s.crudOperation("update",null,e,i,null,null,!1):s.appendNewText(n,l,i,!1))})}}},o.prototype.uncheckAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!1)};var a;return pe([t.Property(!1)],o.prototype,"allowDragAndDrop",void 0),pe([t.Property(!1)],o.prototype,"allowEditing",void 0),pe([t.Property(!1)],o.prototype,"allowMultiSelection",void 0),pe([t.Complex({},Me)],o.prototype,"animation",void 0),pe([t.Property()],o.prototype,"checkedNodes",void 0),pe([t.Property("")],o.prototype,"cssClass",void 0),pe([t.Property(!1)],o.prototype,"disabled",void 0),pe([t.Property(null)],o.prototype,"dragArea",void 0),pe([t.Property(!1)],o.prototype,"enableHtmlSanitizer",void 0),pe([t.Property(!1)],o.prototype,"enablePersistence",void 0),pe([t.Property()],o.prototype,"expandedNodes",void 0),pe([t.Property("Auto")],o.prototype,"expandOn",void 0),pe([t.Complex({},Pe)],o.prototype,"fields",void 0),pe([t.Property(!0)],o.prototype,"fullRowSelect",void 0),pe([t.Property(!0)],o.prototype,"loadOnDemand",void 0),pe([t.Property()],o.prototype,"locale",void 0),pe([t.Property()],o.prototype,"nodeTemplate",void 0),pe([t.Property()],o.prototype,"selectedNodes",void 0),pe([t.Property("None")],o.prototype,"sortOrder",void 0),pe([t.Property(!1)],o.prototype,"showCheckBox",void 0),pe([t.Property(!0)],o.prototype,"autoCheck",void 0),pe([t.Property(!1)],o.prototype,"fullRowNavigable",void 0),pe([t.Event()],o.prototype,"actionFailure",void 0),pe([t.Event()],o.prototype,"created",void 0),pe([t.Event()],o.prototype,"dataBound",void 0),pe([t.Event()],o.prototype,"dataSourceChanged",void 0),pe([t.Event()],o.prototype,"drawNode",void 0),pe([t.Event()],o.prototype,"destroyed",void 0),pe([t.Event()],o.prototype,"keyPress",void 0),pe([t.Event()],o.prototype,"nodeChecked",void 0),pe([t.Event()],o.prototype,"nodeChecking",void 0),pe([t.Event()],o.prototype,"nodeClicked",void 0),pe([t.Event()],o.prototype,"nodeCollapsed",void 0),pe([t.Event()],o.prototype,"nodeCollapsing",void 0),pe([t.Event()],o.prototype,"nodeDragging",void 0),pe([t.Event()],o.prototype,"nodeDragStart",void 0),pe([t.Event()],o.prototype,"nodeDragStop",void 0),pe([t.Event()],o.prototype,"nodeDropped",void 0),pe([t.Event()],o.prototype,"nodeEdited",void 0),pe([t.Event()],o.prototype,"nodeEditing",void 0),pe([t.Event()],o.prototype,"nodeExpanded",void 0),pe([t.Event()],o.prototype,"nodeExpanding",void 0),pe([t.Event()],o.prototype,"nodeSelected",void 0),pe([t.Event()],o.prototype,"nodeSelecting",void 0),o=a=pe([t.NotifyPropertyChanges],o)}(t.Component),He=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Be=function(e,t,i,s){var n,r=arguments.length,l=r<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(l=(r<3?n(l):r>3?n(t,i,l):n(t,i))||l);return r>3&&l&&Object.defineProperty(t,i,l),l},Re="e-close",je="e-open",qe="e-right",Fe="e-left",ze="e-over",Ve="e-push",We="e-sidebar-context",_e=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.isBlazor=!1,s}return He(i,e),i.prototype.preRender=function(){this.isBlazor=t.isBlazor()&&this.isServerRendered,this.isBlazor||this.setWidth()},i.prototype.render=function(){this.initialize(),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){this.setTarget(),this.addClass(),this.isBlazor||this.setZindex(),this.enableDock&&this.setDock(),this.isOpen?this.show():this.setMediaQuery(),this.checkType(!0),this.setType(this.type),this.setCloseOnDocumentClick(),this.isBlazor||this.setEnableRTL(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.setEnableRTL=function(){(this.enableRtl?t.addClass:t.removeClass)([this.element],"e-rtl")},i.prototype.setTarget=function(){this.targetEle=this.element.nextElementSibling,this.sidebarEleCopy=this.element.cloneNode(!0),"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),this.target&&(this.target.insertBefore(this.element,this.target.children[0]),t.addClass([this.element],"e-sidebar-absolute"),t.addClass([this.target],We),this.targetEle=this.getTargetElement())},i.prototype.getTargetElement=function(){for(var e=this.element.nextElementSibling;!t.isNullOrUndefined(e)&&e.classList.contains("e-sidebar");)e=e.nextElementSibling;return e},i.prototype.setCloseOnDocumentClick=function(){this.closeOnDocumentClick?t.EventHandler.add(document,"mousedown touchstart",this.documentclickHandler,this):t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler)},i.prototype.setWidth=function(){this.enableDock&&"Left"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock&&"Right"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock||t.setStyleAttribute(this.element,{width:this.setDimension(this.width)})},i.prototype.setDimension=function(e){return e="number"==typeof e?t.formatUnit(e):"string"==typeof e?e.match(/px|%|em/)?e:t.formatUnit(e):"100%"},i.prototype.setZindex=function(){t.setStyleAttribute(this.element,{"z-index":""+this.zIndex})},i.prototype.addClass=function(){var e=document.querySelector(".e-main-content");t.isNullOrUndefined(e||this.targetEle)||t.addClass([e||this.targetEle],["e-content-animation"]),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.isBlazor||(this.enableDock||"Auto"===this.type||t.addClass([this.element],["e-visibility"]),t.removeClass([this.element],[je,Re,qe,Fe,"e-slide",Ve,ze]),this.element.classList.add("e-sidebar"),t.addClass([this.element],"Right"===this.position?qe:Fe),this.enableDock&&t.addClass([this.element],"e-dock"),this.element.setAttribute("tabindex",this.tabIndex)),"Auto"!==this.type||t.Browser.isDevice?this.isOpen||t.addClass([this.element],Re):this.show()},i.prototype.checkType=function(e){"Push"!==this.type&&"Over"!==this.type&&"Slide"!==this.type?this.type="Auto":this.element.classList.contains(Re)||e||this.hide()},i.prototype.transitionEnd=function(e){this.setDock(),t.isNullOrUndefined(e)||this.triggerChange(),t.EventHandler.remove(this.element,"transitionend",this.transitionEnd)},i.prototype.destroyBackDrop=function(){var e=document.querySelector(".e-main-content")||this.targetEle;this.target&&this.showBackdrop&&e?t.removeClass([e],"e-backdrop"):this.showBackdrop&&this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},i.prototype.hide=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("close",s,function(e){if(!e.cancel){if(i.element.classList.contains(Re))return;i.element.classList.contains(je)&&!i.animate&&i.triggerChange(),t.addClass([i.element],Re),t.removeClass([i.element],je),t.setStyleAttribute(i.element,{width:t.formatUnit(i.enableDock?i.dockSize:i.width)}),i.setType(i.type);var s=document.querySelector(".e-main-content")||i.targetEle;!i.enableDock&&s&&(s.style.transform="translateX(0px)",s.style["Left"===i.position?"marginLeft":"marginRight"]="0px"),i.destroyBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.remove("e-sidebar-overflow"),i.setProperties({isOpen:!1},!0),i.enableDock&&setTimeout(function(){return i.setTimeOut()},50),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setTimeOut=function(){var e=document.querySelector(".e-main-content")||this.targetEle,t=this.element.getBoundingClientRect().width;this.element.classList.contains(je)&&e?"Left"===this.position?e.style.marginLeft=this.setDimension("auto"===this.width?t:this.width):e.style.marginRight=this.setDimension("auto"===this.width?t:this.width):this.element.classList.contains(Re)&&e&&("Left"===this.position?e.style.marginLeft=this.setDimension("auto"===this.dockSize?t:this.dockSize):e.style.marginRight=this.setDimension("auto"===this.dockSize?t:this.dockSize))},i.prototype.show=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("open",s,function(e){if(!e.cancel){if(t.removeClass([i.element],"e-visibility"),i.element.classList.contains(je))return;i.element.classList.contains(Re)&&!i.animate&&i.triggerChange(),t.addClass([i.element],[je,"e-transition"]),t.setStyleAttribute(i.element,{transform:""}),t.removeClass([i.element],Re),t.setStyleAttribute(i.element,{width:t.formatUnit(i.width)}),i.setType(i.type),i.createBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.add("e-sidebar-overflow"),i.setProperties({isOpen:!0},!0),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setAnimation=function(){this.animate?t.removeClass([this.element],"e-disable-animation"):t.addClass([this.element],"e-disable-animation")},i.prototype.triggerChange=function(){var e={name:"change",element:this.element};this.trigger("change",e)},i.prototype.setDock=function(){this.enableDock&&"Left"===this.position&&!this.getState()?t.setStyleAttribute(this.element,{transform:"translateX(-100%) translateX("+this.setDimension(this.dockSize)+")"}):this.enableDock&&"Right"===this.position&&!this.getState()&&t.setStyleAttribute(this.element,{transform:"translateX(100%) translateX(-"+this.setDimension(this.dockSize)+")"}),this.element.classList.contains(Re)&&this.enableDock&&t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)})},i.prototype.createBackDrop=function(){if(this.target&&this.showBackdrop&&this.getState()){var e=document.querySelector(".e-main-content")||this.targetEle;t.addClass([e],"e-backdrop")}else this.showBackdrop&&!this.modal&&this.getState()&&(this.modal=this.createElement("div"),this.modal.className="e-sidebar-overlay",this.modal.style.display="block",document.body.appendChild(this.modal))},i.prototype.getPersistData=function(){return this.addOnPersist(["type","position","isOpen"])},i.prototype.getModuleName=function(){return"sidebar"},i.prototype.toggle=function(){this.element.classList.contains(je)?this.hide():this.show()},i.prototype.getState=function(){return!!this.element.classList.contains(je)},i.prototype.setMediaQuery=function(){if(this.mediaQuery){("string"==typeof this.mediaQuery?window.matchMedia(this.mediaQuery).matches:this.mediaQuery.matches)&&this.windowWidth!==window.innerWidth?this.show():this.getState()&&this.windowWidth!==window.innerWidth&&this.hide()}},i.prototype.resize=function(){"Auto"===this.type&&(t.Browser.isDevice?t.addClass([this.element],ze):t.addClass([this.element],Ve)),this.setMediaQuery(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.documentclickHandler=function(e){t.closest(e.target,".e-control.e-sidebar")||this.hide(e)},i.prototype.enableGestureHandler=function(e){!this.isOpen&&"Left"===this.position&&"Right"===e.swipeDirection&&e.startX<=20&&e.distanceX>=50&&e.velocity>=.5?this.show():this.isOpen&&"Left"===this.position&&"Left"===e.swipeDirection?this.hide():this.isOpen&&"Right"===this.position&&"Right"===e.swipeDirection?this.hide():!this.isOpen&&"Right"===this.position&&"Left"===e.swipeDirection&&window.innerWidth-e.startX<=20&&e.distanceX>=50&&e.velocity>=.5&&this.show()},i.prototype.setEnableGestures=function(){this.enableGestures?(this.mainContentEle=new t.Touch(document.body,{swipe:this.enableGestureHandler.bind(this)}),this.sidebarEle=new t.Touch(this.element,{swipe:this.enableGestureHandler.bind(this)})):this.mainContentEle&&this.sidebarEle&&(this.mainContentEle.destroy(),this.sidebarEle.destroy())},i.prototype.wireEvents=function(){this.setEnableGestures(),window.addEventListener("resize",this.resize.bind(this))},i.prototype.unWireEvents=function(){window.removeEventListener("resize",this.resize.bind(this)),t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler),this.mainContentEle&&this.mainContentEle.destroy(),this.sidebarEle&&this.sidebarEle.destroy()},i.prototype.onPropertyChanged=function(i,s){for(var n=document.querySelector(".e-main-content")||this.targetEle,r=this.isServerRendered,l=0,o=Object.keys(i);l<o.length;l++)switch(o[l]){case"isOpen":this.isOpen?this.show():this.hide();break;case"width":this.setWidth(),this.getState()||this.setDock();break;case"animate":this.setAnimation();break;case"type":this.checkType(!1),t.removeClass([this.element],["e-visibility"]),this.addClass(),t.addClass([this.element],"Auto"===this.type?t.Browser.isDevice?["e-over"]:["e-push"]:["e-"+this.type.toLowerCase()]);break;case"position":this.element.style.transform="",this.setDock(),n&&(n.style["Left"===this.position?"marginRight":"marginLeft"]="0px"),"Right"===this.position?(t.removeClass([this.element],Fe),t.addClass([this.element],qe)):(t.removeClass([this.element],qe),t.addClass([this.element],Fe)),this.setType(this.type);break;case"showBackdrop":this.showBackdrop?this.createBackDrop():this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null);break;case"target":"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),t.isNullOrUndefined(this.target)&&(t.removeClass([this.element],"e-sidebar-absolute"),t.removeClass([s.target],We),t.setStyleAttribute(n,{"margin-left":0,"margin-right":0}),document.body.insertAdjacentElement("afterbegin",this.element)),this.isServerRendered=!1,e.prototype.refresh.call(this),this.isServerRendered=r;break;case"closeOnDocumentClick":this.setCloseOnDocumentClick();break;case"enableDock":this.getState()||this.setDock();break;case"zIndex":this.setZindex();break;case"mediaQuery":this.setMediaQuery();break;case"enableGestures":this.setEnableGestures();break;case"enableRtl":this.setEnableRTL()}},i.prototype.setType=function(e){var i=this.element.getBoundingClientRect().width;this.setZindex();var s=document.querySelector(".e-main-content")||this.targetEle;s&&(s.style.transform="translateX(0px)",t.Browser.isDevice||"Auto"===this.type||(s.style["Left"===this.position?"marginLeft":"marginRight"]="0px"));var n=(this.position,i+"px"),r="Left"===this.position?i:-i;switch(t.removeClass([this.element],[Ve,ze,"e-slide"]),e){case"Push":t.addClass([this.element],[Ve]),s&&(this.enableDock||this.element.classList.contains(je))&&(s.style["Left"===this.position?"marginLeft":"marginRight"]=n);break;case"Slide":t.addClass([this.element],["e-slide"]),s&&(this.enableDock||this.element.classList.contains(je))&&(s.style.transform="translateX("+r+"px)");break;case"Over":t.addClass([this.element],[ze]),this.enableDock&&this.element.classList.contains(Re)&&s&&(s.style["Left"===this.position?"marginLeft":"marginRight"]=n);break;case"Auto":t.addClass([this.element],["e-transition"]),t.Browser.isDevice?s&&this.enableDock&&!this.getState()?(s.style["Left"===this.position?"marginLeft":"marginRight"]=n,t.addClass([this.element],Ve)):t.addClass([this.element],ze):(t.addClass([this.element],Ve),s&&(this.enableDock||this.element.classList.contains(je))&&(s.style["Left"===this.position?"marginLeft":"marginRight"]=n)),this.createBackDrop()}},i.prototype.destroy=function(){e.prototype.destroy.call(this),this.target&&t.removeClass([this.target],We),this.destroyBackDrop(),this.element&&(t.removeClass([this.element],[je,Re,Ve,"e-slide",ze,Fe,qe,"e-transition"]),t.removeClass([this.element],"e-sidebar-absolute"),this.element.style.width="",this.element.style.zIndex="",this.element.style.transform="",t.isNullOrUndefined(this.sidebarEleCopy.getAttribute("tabindex"))?this.element.removeAttribute("tabindex"):this.element.setAttribute("tabindex",this.tabIndex)),this.windowWidth=null;var i=document.querySelector(".e-main-content")||this.targetEle;t.isNullOrUndefined(i)||(i.style.margin="",i.style.transform=""),this.unWireEvents()},Be([t.Property("auto")],i.prototype,"dockSize",void 0),Be([t.Property(null)],i.prototype,"mediaQuery",void 0),Be([t.Property(!1)],i.prototype,"enableDock",void 0),Be([t.Property("en-US")],i.prototype,"locale",void 0),Be([t.Property(!1)],i.prototype,"enablePersistence",void 0),Be([t.Property(!0)],i.prototype,"enableGestures",void 0),Be([t.Property(!1)],i.prototype,"isOpen",void 0),Be([t.Property(!1)],i.prototype,"enableRtl",void 0),Be([t.Property(!0)],i.prototype,"animate",void 0),Be([t.Property("auto")],i.prototype,"height",void 0),Be([t.Property(!1)],i.prototype,"closeOnDocumentClick",void 0),Be([t.Property("Left")],i.prototype,"position",void 0),Be([t.Property(null)],i.prototype,"target",void 0),Be([t.Property(!1)],i.prototype,"showBackdrop",void 0),Be([t.Property("Auto")],i.prototype,"type",void 0),Be([t.Property("auto")],i.prototype,"width",void 0),Be([t.Property(1e3)],i.prototype,"zIndex",void 0),Be([t.Event()],i.prototype,"created",void 0),Be([t.Event()],i.prototype,"close",void 0),Be([t.Event()],i.prototype,"open",void 0),Be([t.Event()],i.prototype,"change",void 0),Be([t.Event()],i.prototype,"destroyed",void 0),i=Be([t.NotifyPropertyChanges],i)}(t.Component);return e.MenuAnimationSettings=w,e.MenuItem=S,e.HScroll=p,e.VScroll=m,e.addScrolling=o,e.destroyScroll=d,e.Item=T,e.Toolbar=M,e.AccordionActionSettings=F,e.AccordionAnimationSettings=z,e.AccordionItem=V,e.Accordion=W,e.ContextMenu=Y,e.Menu=J,e.TabActionSettings=le,e.TabAnimationSettings=oe,e.Header=ae,e.TabItem=de,e.Tab=he,e.FieldsSettings=Pe,e.ActionSettings=Te,e.NodeAnimationSettings=Me,e.TreeView=Ue,e.Sidebar=_e,e}({},ej.base,ej.lists,ej.popups,ej.buttons,ej.data,ej.inputs),this.ejs=ej;
- /*!
- * filename: ej2-calendars.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.calendars=function(e,t,i,s,a,n){"use strict";var r=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),l=function(e,t,i,s){var a,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(n<3?a(r):n>3?a(t,i,r):a(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},o="e-other-month",h="e-calendar",u="e-disabled",d="e-overlay",p="e-selected",c="e-focused-date",m=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r(i,e),l([t.Property("day")],i.prototype,"day",void 0),l([t.Property("month")],i.prototype,"month",void 0),l([t.Property("year")],i.prototype,"year",void 0),l([t.Property("hour")],i.prototype,"hour",void 0),l([t.Property("minute")],i.prototype,"minute",void 0),l([t.Property("second")],i.prototype,"second",void 0),l([t.Property("day of the week")],i.prototype,"dayOfTheWeek",void 0),i}(t.ChildProperty),v=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.effect="",s.isPopupClicked=!1,s.isDateSelected=!0,s.isTodayClicked=!1,s.preventChange=!1,s.isAngular=!1,s}return r(i,e),i.prototype.render=function(){this.rangeValidation(this.min,this.max),this.calendarEleCopy=this.element.cloneNode(!0),"Islamic"===this.calendarMode&&(+this.min.setSeconds(0)==+new Date(1900,0,1,0,0,0)&&(this.min=new Date(1944,2,18)),+this.max==+new Date(2099,11,31)&&(this.max=new Date(2069,10,16))),this.globalize=new t.Internationalization(this.locale),(t.isNullOrUndefined(this.firstDayOfWeek)||this.firstDayOfWeek>6||this.firstDayOfWeek<0)&&this.setProperties({firstDayOfWeek:this.globalize.getFirstDayOfWeek()},!0),this.todayDisabled=!1,this.todayDate=new Date((new Date).setHours(0,0,0,0)),"calendar"===this.getModuleName()?(this.element.classList.add(h),this.enableRtl&&this.element.classList.add("e-rtl"),t.Browser.isDevice&&this.element.classList.add("e-device"),t.attributes(this.element,{"data-role":"calendar"}),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.setAttribute("tabindex",this.tabIndex)):(this.calendarElement=this.createElement("div"),this.calendarElement.classList.add(h),this.enableRtl&&this.calendarElement.classList.add("e-rtl"),t.Browser.isDevice&&this.calendarElement.classList.add("e-device"),t.attributes(this.calendarElement,{role:"calendar"})),this.createHeader(),this.createContent(),this.wireEvents()},i.prototype.rangeValidation=function(e,i){t.isNullOrUndefined(e)&&this.setProperties({min:new Date(1900,0,1)},!0),t.isNullOrUndefined(i)&&this.setProperties({max:new Date(2099,11,31)},!0)},i.prototype.getDefaultKeyConfig=function(){return this.defaultKeyConfigs={controlUp:"ctrl+38",controlDown:"ctrl+40",moveDown:"downarrow",moveUp:"uparrow",moveLeft:"leftarrow",moveRight:"rightarrow",select:"enter",home:"home",end:"end",pageUp:"pageup",pageDown:"pagedown",shiftPageUp:"shift+pageup",shiftPageDown:"shift+pagedown",controlHome:"ctrl+home",controlEnd:"ctrl+end",altUpArrow:"alt+uparrow",spacebar:"space",altRightArrow:"alt+rightarrow",altLeftArrow:"alt+leftarrow"},this.defaultKeyConfigs},i.prototype.validateDate=function(e){this.setProperties({min:this.checkDateValue(new Date(this.checkValue(this.min)))},!0),this.setProperties({max:this.checkDateValue(new Date(this.checkValue(this.max)))},!0),this.currentDate=this.currentDate?this.currentDate:new Date((new Date).setHours(0,0,0,0)),!t.isNullOrUndefined(e)&&this.min<=this.max&&e>=this.min&&e<=this.max&&(this.currentDate=new Date(this.checkValue(e)))},i.prototype.setOverlayIndex=function(e,i,s,a){if(a&&!t.isNullOrUndefined(i)&&!t.isNullOrUndefined(s)&&!t.isNullOrUndefined(e)){var n=parseInt(i.style.zIndex,10)?parseInt(i.style.zIndex,10):1e3;s.style.zIndex=(n-1).toString(),e.style.zIndex=n.toString()}},i.prototype.minMaxUpdate=function(e){+this.min<=+this.max?t.removeClass([this.element],d):(this.setProperties({min:this.min},!0),t.addClass([this.element],d)),this.min=t.isNullOrUndefined(this.min)||!+this.min?this.min=new Date(1900,0,1):this.min,this.max=t.isNullOrUndefined(this.max)||!+this.max?this.max=new Date(2099,11,31):this.max,+this.min<=+this.max&&e&&+e<=+this.max&&+e>=+this.min?this.currentDate=new Date(this.checkValue(e)):+this.min<=+this.max&&!e&&+this.currentDate>+this.max?this.currentDate=new Date(this.checkValue(this.max)):+this.currentDate<+this.min&&(this.currentDate=new Date(this.checkValue(this.min)))},i.prototype.createHeader=function(){var e={"aria-disabled":"false","aria-label":"previous month"},i={"aria-disabled":"false","aria-label":"next month"},s={"aria-atomic":"true","aria-live":"assertive","aria-label":"title"};this.headerElement=this.createElement("div",{className:"e-header"});var a=this.createElement("div",{className:"e-icon-container"});this.previousIcon=this.createElement("button",{className:"e-prev",attrs:{type:"button"}}),t.rippleEffect(this.previousIcon,{duration:400,selector:".e-prev",isCenterRipple:!0}),t.attributes(this.previousIcon,e),this.nextIcon=this.createElement("button",{className:"e-next",attrs:{type:"button"}}),t.rippleEffect(this.nextIcon,{selector:".e-next",duration:400,isCenterRipple:!0}),t.attributes(this.nextIcon,i),this.headerTitleElement=this.createElement("div",{className:"e-day e-title"}),t.attributes(this.headerTitleElement,s),this.headerElement.appendChild(this.headerTitleElement),this.previousIcon.appendChild(this.createElement("span",{className:"e-date-icon-prev e-icons"})),this.nextIcon.appendChild(this.createElement("span",{className:"e-date-icon-next e-icons"})),a.appendChild(this.previousIcon),a.appendChild(this.nextIcon),this.headerElement.appendChild(a),"calendar"===this.getModuleName()?this.element.appendChild(this.headerElement):this.calendarElement.appendChild(this.headerElement),this.adjustLongHeaderSize()},i.prototype.createContent=function(){this.contentElement=this.createElement("div",{className:"e-content"}),this.table=this.createElement("table",{attrs:{tabIndex:"0",role:"grid","aria-activedescendant":""}}),"calendar"===this.getModuleName()?this.element.appendChild(this.contentElement):this.calendarElement.appendChild(this.contentElement),this.contentElement.appendChild(this.table),this.createContentHeader(),this.createContentBody(),this.showTodayButton&&this.createContentFooter()},i.prototype.getCultureValues=function(){var e,i=[],s=(t.isBlazor()?"days.":"days.stand-alone.")+this.dayHeaderFormat.toLowerCase();e="en"===this.locale||"en-US"===this.locale?t.getValue(s,t.getDefaultDateObject()):this.getCultureObjects(t.cldrData,""+this.locale);for(var a=0,n=Object.keys(e);a<n.length;a++){var r=n[a];i.push(t.getValue(r,e))}return i},i.prototype.toCapitalize=function(e){return!t.isNullOrUndefined(e)&&e.length?e[0].toUpperCase()+e.slice(1):e},i.prototype.createContentHeader=function(){"calendar"===this.getModuleName()?t.isNullOrUndefined(this.element.querySelectorAll(".e-content .e-week-header")[0])||t.detach(this.element.querySelectorAll(".e-content .e-week-header")[0]):t.isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content .e-week-header")[0])||t.detach(this.calendarElement.querySelectorAll(".e-content .e-week-header")[0]);var e="";(this.firstDayOfWeek>6||this.firstDayOfWeek<0)&&this.setProperties({firstDayOfWeek:0},!0),this.tableHeadElement=this.createElement("thead",{className:"e-week-header"}),this.weekNumber&&(e+='<th class="e-week-number"></th>',"calendar"===this.getModuleName()?t.addClass([this.element],"e-week-number"):t.addClass([this.calendarElement],"e-week-number"));for(var i=this.shiftArray(this.getCultureValues().length>0&&this.getCultureValues(),this.firstDayOfWeek),s=0;s<=6;s++)e+='<th class="">'+this.toCapitalize(i[s])+"</th>";e="<tr>"+e+"</tr>",this.tableHeadElement.innerHTML=e,this.table.appendChild(this.tableHeadElement)},i.prototype.createContentBody=function(){switch("calendar"===this.getModuleName()?t.isNullOrUndefined(this.element.querySelectorAll(".e-content tbody")[0])||t.detach(this.element.querySelectorAll(".e-content tbody")[0]):t.isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content tbody")[0])||t.detach(this.calendarElement.querySelectorAll(".e-content tbody")[0]),this.start){case"Year":this.renderYears();break;case"Decade":this.renderDecades();break;default:this.renderMonths()}},i.prototype.updateFooter=function(){this.todayElement.textContent=this.l10.getConstant("today"),this.todayElement.setAttribute("aria-label",this.l10.getConstant("today"))},i.prototype.createContentFooter=function(){if(this.showTodayButton){var e=new Date(+this.min),i=new Date(+this.max),s={today:"Today"};this.globalize=new t.Internationalization(this.locale),this.l10=new t.L10n(this.getModuleName(),s,this.locale),this.todayElement=this.createElement("button",{attrs:{role:"button"}}),t.rippleEffect(this.todayElement),this.updateFooter(),t.addClass([this.todayElement],["e-btn","e-today","e-flat","e-primary","e-css"]),+new Date(e.setHours(0,0,0,0))<=+this.todayDate&&+this.todayDate<=+new Date(i.setHours(0,0,0,0))&&!this.todayDisabled||t.addClass([this.todayElement],u),this.footer=this.createElement("div",{className:"e-footer-container"}),this.footer.appendChild(this.todayElement),"calendar"===this.getModuleName()&&this.element.appendChild(this.footer),"datepicker"===this.getModuleName()&&this.calendarElement.appendChild(this.footer),"datetimepicker"===this.getModuleName()&&this.calendarElement.appendChild(this.footer),this.todayElement.classList.contains(u)||t.EventHandler.add(this.todayElement,"click",this.todayButtonClick,this)}},i.prototype.wireEvents=function(e,i,s,a){t.isBlazor()&&i?(this.element=document.getElementById(e),this.defaultKeyConfigs=this.getDefaultKeyConfig(),this.defaultKeyConfigs=t.extend(this.defaultKeyConfigs,s),this.blazorRef=i,this.serverModuleName=a):(t.EventHandler.add(this.headerTitleElement,"click",this.navigateTitle,this),this.defaultKeyConfigs=t.extend(this.defaultKeyConfigs,this.keyConfigs)),"calendar"===this.getModuleName()?this.keyboardModule=new t.KeyboardEvents(this.element,{eventName:"keydown",keyAction:this.keyActionHandle.bind(this),keyConfigs:this.defaultKeyConfigs}):this.keyboardModule=new t.KeyboardEvents(this.calendarElement,{eventName:"keydown",keyAction:this.keyActionHandle.bind(this),keyConfigs:this.defaultKeyConfigs})},i.prototype.dateWireEvents=function(e,i,s,a){this.defaultKeyConfigs=this.getDefaultKeyConfig(),this.defaultKeyConfigs=t.extend(this.defaultKeyConfigs,s),this.blazorRef=i,this.serverModuleName=a},i.prototype.todayButtonClick=function(e,t,i){this.showTodayButton&&(this.currentView()===this.depth?this.effect="":this.effect="e-zoomin",this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.navigateTo(this.depth,new Date(this.checkValue(t)),i):this.navigateTo("Month",new Date(this.checkValue(t)),i))},i.prototype.resetCalendar=function(){this.calendarElement&&t.detach(this.calendarElement),this.tableBodyElement&&t.detach(this.tableBodyElement),this.table&&t.detach(this.table),this.tableHeadElement&&t.detach(this.tableHeadElement),this.nextIcon&&t.detach(this.nextIcon),this.previousIcon&&t.detach(this.previousIcon),this.footer&&t.detach(this.footer),this.todayElement=null,this.renderDayCellArgs=null,this.calendarElement=this.tableBodyElement=this.footer=this.tableHeadElement=this.nextIcon=this.previousIcon=this.table=null},i.prototype.checkDeviceMode=function(e){t.Browser.isDevice&&t.isBlazor()&&e&&e.invokeMethodAsync("OnDevice",!0)},i.prototype.keyActionHandle=function(e,i,s){t.isBlazor()&&this.blazorRef&&(e.preventDefault(),this.tableBodyElement||(this.element=t.closest(e.target,".e-calendar"),this.tableBodyElement=this.element.querySelector("tbody")),s=!1);var a,n=this.tableBodyElement.querySelector("tr td.e-focused-date");if(a=s?t.isNullOrUndefined(n)||+i!==parseInt(n.getAttribute("id").split("_")[0],10)?this.tableBodyElement.querySelector("tr td.e-selected"):n:this.tableBodyElement.querySelector("tr td.e-selected"),t.isBlazor()&&this.blazorRef){this.tableBodyElement.focus();var r=e.target,l={Action:e.action,Key:e.key,Events:e,SelectDate:a?a.id:null,FocusedDate:n?n.id:null,classList:a?a.classList.toString():n?n.classList.toString():"e-cell",Id:n?n.id:a?a.id:null,TargetClassList:r.classList.toString()};this.blazorRef.invokeMethodAsync("OnCalendarKeyboardEvent",l),r.classList.contains("e-today")&&(r.blur(),this.tableBodyElement.focus()),"sf.calendars.Calendar"===this.serverModuleName&&(this.tableBodyElement=null)}else{var o=this.getViewNumber(this.currentView()),h=this.getViewNumber(this.depth),d=o===h&&this.getViewNumber(this.start)>=h;switch(this.effect="",e.action){case"moveLeft":this.keyboardNavigate(-1,o,e,this.max,this.min),e.preventDefault();break;case"moveRight":this.keyboardNavigate(1,o,e,this.max,this.min),e.preventDefault();break;case"moveUp":0===o?this.keyboardNavigate(-7,o,e,this.max,this.min):this.keyboardNavigate(-4,o,e,this.max,this.min),e.preventDefault();break;case"moveDown":0===o?this.keyboardNavigate(7,o,e,this.max,this.min):this.keyboardNavigate(4,o,e,this.max,this.min),e.preventDefault();break;case"select":if(e.target===this.todayElement)this.todayButtonClick(e,i);else{var p=t.isNullOrUndefined(n)?a:n;if(!t.isNullOrUndefined(p)&&!p.classList.contains(u))if(d){var c=new Date(parseInt(""+p.id,0));this.selectDate(e,c,p)}else this.contentClick(null,--o,p,i)}break;case"controlUp":this.title(),e.preventDefault();break;case"controlDown":t.isNullOrUndefined(n)&&(t.isNullOrUndefined(a)||d)||this.contentClick(null,--o,n||a,i),e.preventDefault();break;case"home":this.currentDate=this.firstDay(this.currentDate),t.detach(this.tableBodyElement),0===o?this.renderMonths(e):1===o?this.renderYears(e):this.renderDecades(e),e.preventDefault();break;case"end":this.currentDate=this.lastDay(this.currentDate,o),t.detach(this.tableBodyElement),0===o?this.renderMonths(e):1===o?this.renderYears(e):this.renderDecades(e),e.preventDefault();break;case"pageUp":this.addMonths(this.currentDate,-1),this.navigateTo("Month",this.currentDate),e.preventDefault();break;case"pageDown":this.addMonths(this.currentDate,1),this.navigateTo("Month",this.currentDate),e.preventDefault();break;case"shiftPageUp":this.addYears(this.currentDate,-1),this.navigateTo("Month",this.currentDate),e.preventDefault();break;case"shiftPageDown":this.addYears(this.currentDate,1),this.navigateTo("Month",this.currentDate),e.preventDefault();break;case"controlHome":this.navigateTo("Month",new Date(this.currentDate.getFullYear(),0,1)),e.preventDefault();break;case"controlEnd":this.navigateTo("Month",new Date(this.currentDate.getFullYear(),11,31)),e.preventDefault()}"calendar"===this.getModuleName()&&this.table.focus()}},i.prototype.keyboardNavigate=function(e,i,s,a,n){var r=new Date(this.checkValue(this.currentDate));switch(i){case 2:this.addYears(this.currentDate,e),this.isMonthYearRange(this.currentDate)?(t.detach(this.tableBodyElement),this.renderDecades(s)):this.currentDate=r;break;case 1:this.addMonths(this.currentDate,e),this.calendarMode,this.isMonthYearRange(this.currentDate)?(t.detach(this.tableBodyElement),this.renderYears(s)):this.currentDate=r;break;case 0:this.addDay(this.currentDate,e,s,a,n),this.isMinMaxRange(this.currentDate)?(t.detach(this.tableBodyElement),this.renderMonths(s)):this.currentDate=r}},i.prototype.preRender=function(e){var t=this;this.navigatePreviousHandler=this.navigatePrevious.bind(this),this.navigateNextHandler=this.navigateNext.bind(this),this.defaultKeyConfigs=this.getDefaultKeyConfig(),this.navigateHandler=function(e){t.triggerNavigate(e)}},i.prototype.minMaxDate=function(e){var t=new Date(new Date(+e).setHours(0,0,0,0)),i=new Date(new Date(+this.min).setHours(0,0,0,0)),s=new Date(new Date(+this.max).setHours(0,0,0,0));return+t!=+i&&+t!=+s||(+e<+this.min&&(e=new Date(+this.min)),+e>+this.max&&(e=new Date(+this.max))),e},i.prototype.renderMonths=function(e,t,i){var s,a=this.weekNumber?8:7;s="Gregorian"===this.calendarMode?this.renderDays(this.currentDate,t,null,null,i):this.islamicModule.islamicRenderDays(this.currentDate,t),this.createContentHeader(),"Gregorian"===this.calendarMode?this.renderTemplate(s,a,"e-month",e,t):this.islamicModule.islamicRenderTemplate(s,a,"e-month",e,t)},i.prototype.renderDays=function(e,i,s,a,n){var r,l=[],h=n?new Date(+e):this.getDate(new Date,this.timezone),c=new Date(this.checkValue(e)),m=c.getMonth();this.titleUpdate(e,"days");var v=c;for(c=new Date(v.getFullYear(),v.getMonth(),0,v.getHours(),v.getMinutes(),v.getSeconds(),v.getMilliseconds());c.getDay()!==this.firstDayOfWeek;)this.setStartDate(c,-864e5);for(var f=0;f<42;++f){var y=this.createElement("td",{className:"e-cell"}),g=this.createElement("span");if(f%7==0&&this.weekNumber){var b="FirstDay"===this.weekRule?6:"FirstFourDayWeek"===this.weekRule?3:0,D=new Date(c.getFullYear(),c.getMonth(),c.getDate()+b);g.textContent=""+this.getWeek(D),y.appendChild(g),t.addClass([y],"e-week-number"),l.push(y)}r=new Date(+c),c=this.minMaxDate(c);var E={type:"dateTime",skeleton:t.isBlazor()?"D":"full"},C=this.globalize.parseDate(this.globalize.formatDate(c,E),E),k=this.dayCell(c),M=this.globalize.formatDate(c,{type:"date",skeleton:t.isBlazor()?"D":"full"}),w=this.createElement("span");w.textContent=this.globalize.formatDate(c,{format:"d",type:"date",skeleton:t.isBlazor()?"d":"yMd"});var V=this.min>c||this.max<c;V?(t.addClass([k],u),t.addClass([k],d)):w.setAttribute("title",""+M),m!==c.getMonth()&&t.addClass([k],o),0!==c.getDay()&&6!==c.getDay()||t.addClass([k],"e-weekend"),k.appendChild(w),this.renderDayCellArgs={date:c,isDisabled:!1,element:k,isOutOfRange:V};var O=this.renderDayCellArgs;if(this.renderDayCellEvent(O),O.isDisabled){var N=new Date(this.checkValue(i)),I=new Date(this.checkValue(O.date));if(s){if(!t.isNullOrUndefined(a)&&a.length>0)for(var S=0;S<a.length;S++)(H=+new Date(this.globalize.formatDate(O.date,{type:"date",skeleton:t.isBlazor()?"d":"yMd"})))===(B=+new Date(this.globalize.formatDate(a[S],{type:"date",skeleton:t.isBlazor()?"d":"yMd"})))&&(a.splice(S,1),S=-1)}else N&&+N==+I&&this.setProperties({value:null},!0)}this.renderDayCellArgs.isDisabled&&!k.classList.contains(p)&&(t.addClass([k],u),t.addClass([k],d),+this.renderDayCellArgs.date==+this.todayDate&&(this.todayDisabled=!0));var A=k.classList.contains(o),x=k.classList.contains(u);if(x||t.EventHandler.add(k,"click",this.clickHandler,this),!s||t.isNullOrUndefined(a)||x)!x&&this.getDateVal(c,i)&&t.addClass([k],p);else{for(var T=0;T<a.length;T++){var P="Gregorian"===this.calendarMode?"gregorian":"islamic",U={format:this.getFromatStringValue(),type:"date",skeleton:"short",calendar:P},H=this.globalize.formatDate(c,U),B=this.globalize.formatDate(a[T],U);H===B&&this.getDateVal(c,a[T])||this.getDateVal(c,i)?t.addClass([k],p):this.updateFocus(A,x,c,k,e)}a.length<=0&&this.updateFocus(A,x,c,k,e)}this.updateFocus(A,x,c,k,e),C.getFullYear()===h.getFullYear()&&C.getMonth()===h.getMonth()&&C.getDate()===h.getDate()&&t.addClass([k],"e-today"),l.push(this.renderDayCellArgs.element),c=new Date(+r),this.addDay(c,1,null,this.max,this.min)}return l},i.prototype.updateFocus=function(e,i,s,a,n){n.getDate()!==s.getDate()||e||i?(n>=this.max&&parseInt(a.id,0)===+this.max&&!e&&!i&&t.addClass([a],c),n<=this.min&&parseInt(a.id,0)===+this.min&&!e&&!i&&t.addClass([a],c)):t.addClass([a],c)},i.prototype.renderYears=function(e,i){this.removeTableHeadElement();var s=[],a=t.isNullOrUndefined(i),n=new Date(this.checkValue(this.currentDate)),r=n.getMonth(),l=n.getFullYear(),o=n,h=o.getFullYear(),d=new Date(this.checkValue(this.min)).getFullYear(),m=new Date(this.checkValue(this.min)).getMonth(),v=new Date(this.checkValue(this.max)).getFullYear(),f=new Date(this.checkValue(this.max)).getMonth();o.setMonth(0),this.titleUpdate(this.currentDate,"months"),o.setDate(1);for(var y=0;y<12;++y){var g=this.dayCell(o),b=this.createElement("span"),D=i&&i.getMonth()===o.getMonth(),E=i&&i.getFullYear()===l&&D;b.textContent=this.toCapitalize(this.globalize.formatDate(o,{format:t.isBlazor()?"MMM":null,type:"dateTime",skeleton:"MMM"})),this.min&&(h<d||y<m&&h===d)||this.max&&(h>v||y>f&&h>=v)?t.addClass([g],u):!a&&E?t.addClass([g],p):o.getMonth()===r&&this.currentDate.getMonth()===r&&t.addClass([g],c),o.setDate(1),o.setMonth(o.getMonth()+1),g.classList.contains(u)||t.EventHandler.add(g,"click",this.clickHandler,this),g.appendChild(b),s.push(g)}this.renderTemplate(s,4,"e-year",e,i)},i.prototype.renderDecades=function(e,i){this.removeTableHeadElement();var s=[],a=new Date(this.checkValue(this.currentDate));a.setMonth(0),a.setDate(1);var n=a.getFullYear(),r=new Date(a.setFullYear(n-n%10)),l=new Date(a.setFullYear(n-n%10+9)),o=r.getFullYear(),h=l.getFullYear(),d=this.globalize.formatDate(r,{format:t.isBlazor()?"yyyy":null,type:"dateTime",skeleton:"y"}),m=this.globalize.formatDate(l,{format:t.isBlazor()?"yyyy":null,type:"dateTime",skeleton:"y"});this.headerTitleElement.textContent=d+" - "+m;for(var v=new Date(n-n%10-1,0,1).getFullYear(),f=0;f<12;++f){var y=v+f;a.setFullYear(y);var g=this.dayCell(a);t.attributes(g,{role:"gridcell"});var b=this.createElement("span");b.textContent=this.globalize.formatDate(a,{format:t.isBlazor()?"yyyy":null,type:"dateTime",skeleton:"y"}),y<o||y>h?(t.addClass([g],"e-other-year"),t.isNullOrUndefined(i)||a.getFullYear()!==i.getFullYear()||t.addClass([g],p),(y<new Date(this.checkValue(this.min)).getFullYear()||y>new Date(this.checkValue(this.max)).getFullYear())&&t.addClass([g],u)):y<new Date(this.checkValue(this.min)).getFullYear()||y>new Date(this.checkValue(this.max)).getFullYear()?t.addClass([g],u):t.isNullOrUndefined(i)||a.getFullYear()!==i.getFullYear()?a.getFullYear()!==this.currentDate.getFullYear()||g.classList.contains(u)||t.addClass([g],c):t.addClass([g],p),g.classList.contains(u)||t.EventHandler.add(g,"click",this.clickHandler,this),g.appendChild(b),s.push(g)}this.renderTemplate(s,4,"e-decade",e,i)},i.prototype.dayCell=function(e){var i="Gregorian"===this.calendarMode?"gregorian":"islamic",s={skeleton:t.isBlazor()?"F":"full",type:"dateTime",calendar:i},a=this.globalize.parseDate(this.globalize.formatDate(e,s),s).valueOf(),n={className:"e-cell",attrs:{id:""+t.getUniqueID(""+a),"aria-selected":"false",role:"gridcell"}};return this.createElement("td",n)},i.prototype.firstDay=function(e){var t="Decade"!==this.currentView()?this.tableBodyElement.querySelectorAll("td:not(."+o):this.tableBodyElement.querySelectorAll("td:not(.e-other-year");if(t.length)for(var i=0;i<t.length;i++)if(!t[i].classList.contains(u)){e=new Date(parseInt(t[i].id,0));break}return e},i.prototype.lastDay=function(e,t){var i=new Date(e.getFullYear(),e.getMonth()+1,0);if(2!==t){var s=Math.abs(i.getTimezoneOffset()-this.firstDay(e).getTimezoneOffset());return s&&i.setHours(this.firstDay(e).getHours()+s/60),this.findLastDay(i)}return this.findLastDay(this.firstDay(i))},i.prototype.checkDateValue=function(e){return!t.isNullOrUndefined(e)&&e instanceof Date&&!isNaN(+e)?e:null},i.prototype.findLastDay=function(e){var t="Decade"===this.currentView()?this.tableBodyElement.querySelectorAll("td:not(.e-other-year"):this.tableBodyElement.querySelectorAll("td:not(."+o);if(t.length)for(var i=t.length-1;i>=0;i--)if(!t[i].classList.contains(u)){e=new Date(parseInt(t[i].id,0));break}return e},i.prototype.removeTableHeadElement=function(){"calendar"===this.getModuleName()?t.isNullOrUndefined(this.element.querySelectorAll(".e-content table thead")[0])||t.detach(this.tableHeadElement):t.isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content table thead")[0])||t.detach(this.tableHeadElement)},i.prototype.renderTemplate=function(e,i,s,a,n){var r,l=this.getViewNumber(this.currentView());this.tableBodyElement=this.createElement("tbody"),this.table.appendChild(this.tableBodyElement),t.removeClass([this.contentElement,this.headerElement],["e-month","e-decade","e-year"]),t.addClass([this.contentElement,this.headerElement],[s]);for(var h=i,u=0,d=0;d<e.length/i;++d){for(r=this.createElement("tr",{attrs:{role:"row"}}),u=0+u;u<h;u++)e[u].classList.contains("e-week-number")||t.isNullOrUndefined(e[u].children[0])||(t.addClass([e[u].children[0]],["e-day"]),t.rippleEffect(e[u].children[0],{duration:600,isCenterRipple:!0})),r.appendChild(e[u]),this.weekNumber&&7===u&&e[7].classList.contains(o)&&t.addClass([r],"e-month-hide"),!this.weekNumber&&6===u&&e[6].classList.contains(o)&&t.addClass([r],"e-month-hide"),this.weekNumber?41===u&&e[41].classList.contains(o)&&t.addClass([r],"e-month-hide"):35===u&&e[35].classList.contains(o)&&t.addClass([r],"e-month-hide");h+=i,u+=0,this.tableBodyElement.appendChild(r)}this.table.querySelector("tbody").className=this.effect,"Gregorian"===this.calendarMode?this.iconHandler():this.islamicModule.islamicIconHandler(),(l!==this.getViewNumber(this.currentView())||0===l&&l!==this.getViewNumber(this.currentView()))&&this.navigateHandler(a),this.setAriaActiveDescendant()},i.prototype.clickHandler=function(e,t){this.clickEventEmitter(e);var i=e.currentTarget,s=this.getViewNumber(this.currentView());i.classList.contains(o)?this.contentClick(e,0,null,t):s===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?this.contentClick(e,1,null,t):2===s?this.contentClick(e,1,null,t):i.classList.contains(o)||0!==s?this.contentClick(e,0,i,t):this.selectDate(e,this.getIdValue(e,null),null),"calendar"===this.getModuleName()&&this.table.focus()},i.prototype.clickEventEmitter=function(e){e.preventDefault()},i.prototype.contentClick=function(e,i,s,a){var n=this.getViewNumber(this.currentView()),r=this.getIdValue(e,s);switch(i){case 0:n===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth)?(t.detach(this.tableBodyElement),this.currentDate=r,this.effect="e-zoomin",this.renderMonths(e)):("Gregorian"===this.calendarMode?(this.currentDate.setMonth(r.getMonth()),r.getMonth()>0&&this.currentDate.getMonth()!==r.getMonth()&&this.currentDate.setDate(0),this.currentDate.setFullYear(r.getFullYear())):this.currentDate=r,this.effect="e-zoomin",t.detach(this.tableBodyElement),this.renderMonths(e));break;case 1:if(n===this.getViewNumber(this.depth)&&this.getViewNumber(this.start)>=this.getViewNumber(this.depth))this.selectDate(e,r,null);else{if("Gregorian"===this.calendarMode)this.currentDate.setFullYear(r.getFullYear());else{var l=this.islamicModule.getIslamicDate(r);this.currentDate=this.islamicModule.toGregorian(l.year,l.month,1)}this.effect="e-zoomin",t.detach(this.tableBodyElement),this.renderYears(e)}}},i.prototype.switchView=function(e,i,s,a){switch(e){case 0:t.detach(this.tableBodyElement),this.renderMonths(i,null,a),s&&!t.isNullOrUndefined(this.tableBodyElement.querySelectorAll("."+c)[0])&&this.tableBodyElement.querySelectorAll("."+c)[0].classList.remove(c);break;case 1:t.detach(this.tableBodyElement),this.renderYears(i);break;case 2:t.detach(this.tableBodyElement),this.renderDecades(i)}},i.prototype.getModuleName=function(){return"calendar"},i.prototype.requiredModules=function(){var e=[];return this&&e.push({args:[this],member:"islamic"}),e},i.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},i.prototype.onPropertyChanged=function(e,i,s,a){this.effect="";for(var n=0,r=Object.keys(e);n<r.length;n++){var l=r[n];switch(l){case"enableRtl":e.enableRtl?"calendar"===this.getModuleName()?this.element.classList.add("e-rtl"):this.calendarElement.classList.add("e-rtl"):"calendar"===this.getModuleName()?this.element.classList.remove("e-rtl"):this.calendarElement.classList.remove("e-rtl");break;case"dayHeaderFormat":this.getCultureValues(),"datepicker"!==this.getModuleName()?this.createContentHeader():this.calendarElement&&this.createContentHeader(),this.adjustLongHeaderSize();break;case"min":case"max":this.rangeValidation(this.min,this.max),"min"===l?this.setProperties({min:this.checkDateValue(new Date(this.checkValue(e.min)))},!0):this.setProperties({max:this.checkDateValue(new Date(this.checkValue(e.max)))},!0),this.setProperties({start:this.currentView()},!0),this.tableBodyElement&&t.detach(this.tableBodyElement),this.minMaxUpdate(),s&&this.validateValues(s,a),"datepicker"!==this.getModuleName()?this.createContentBody():this.calendarElement&&this.createContentBody(),(this.todayDate<this.min||this.max<this.todayDate)&&this.footer&&this.todayElement?(t.detach(this.todayElement),t.detach(this.footer),this.todayElement=this.footer=null,this.createContentFooter()):this.footer&&this.todayElement&&this.todayElement.classList.contains("e-disabled")&&(t.removeClass([this.todayElement],u),t.detach(this.todayElement),t.detach(this.footer),this.todayElement=this.footer=null,this.createContentFooter());break;case"start":case"depth":case"weekNumber":case"firstDayOfWeek":case"weekRule":this.checkView(),"datepicker"!==this.getModuleName()?(this.createContentHeader(),this.createContentBody()):this.calendarElement&&(this.createContentHeader(),this.createContentBody());break;case"locale":this.globalize=new t.Internationalization(this.locale),"datepicker"!==this.getModuleName()?(this.createContentHeader(),this.createContentBody()):this.calendarElement&&(this.createContentHeader(),this.createContentBody()),this.l10.setLocale(this.locale),this.updateFooter();break;case"showTodayButton":e.showTodayButton?this.createContentFooter():t.isNullOrUndefined(this.todayElement)||t.isNullOrUndefined(this.footer)||(t.detach(this.todayElement),t.detach(this.footer),this.todayElement=this.footer=void 0),this.setProperties({showTodayButton:e.showTodayButton},!0)}}},i.prototype.validateValues=function(e,i){if(e&&!t.isNullOrUndefined(i)&&i.length>0){for(var s=this.copyValues(i),a=0;a<s.length;a++){var n=s[a],r="Gregorian"===this.calendarMode?"gregorian":"islamic",l=void 0;l="Gregorian"===this.calendarMode?this.globalize.formatDate(n,{type:"date",skeleton:t.isBlazor()?"d":"yMd"}):this.globalize.formatDate(n,{type:"dateTime",skeleton:"full",calendar:"islamic"});var o={type:"date",skeleton:t.isBlazor()?"d":"yMd",calendar:r},h=this.globalize.formatDate(this.min,o),u={type:"date",skeleton:t.isBlazor()?"d":"yMd",calendar:r},d=this.globalize.formatDate(this.max,u);(+new Date(l)<+new Date(h)||+new Date(l)>+new Date(d))&&(s.splice(a,1),a=-1)}this.setProperties({values:s},!0)}},i.prototype.setValueUpdate=function(){t.isNullOrUndefined(this.tableBodyElement)||(t.detach(this.tableBodyElement),this.setProperties({start:this.currentView()},!0),this.createContentBody())},i.prototype.copyValues=function(e){var i=[];if(!t.isNullOrUndefined(e)&&e.length>0)for(var s=0;s<e.length;s++)i.push(new Date(+e[s]));return i},i.prototype.titleUpdate=function(e,i){var s,a,n=new t.Internationalization(this.locale),r="Gregorian"===this.calendarMode?"gregorian":"islamic";switch("Gregorian"===this.calendarMode?(s=n.formatDate(e,{type:"dateTime",skeleton:t.isBlazor()?"y":"yMMMM",calendar:r}),a=n.formatDate(e,{format:t.isBlazor()?"yyyy":null,type:"dateTime",skeleton:"y",calendar:r})):(s=n.formatDate(e,{type:"dateTime",format:"MMMM y",calendar:r}),a=n.formatDate(e,{type:"dateTime",format:"y",calendar:r})),i){case"days":this.headerTitleElement.textContent=this.toCapitalize(s);break;case"months":this.headerTitleElement.textContent=a}},i.prototype.setActiveDescendant=function(){var e,i,s=this.tableBodyElement.querySelector("tr td.e-focused-date"),a=this.tableBodyElement.querySelector("tr td.e-selected"),n="Gregorian"===this.calendarMode?"gregorian":"islamic",r=this.currentView();return i="Month"===r?this.globalize.formatDate(this.currentDate,{type:"date",skeleton:t.isBlazor()?"D":"full",calendar:n}):"Year"===r?"islamic"!==n?this.globalize.formatDate(this.currentDate,{type:"date",skeleton:t.isBlazor()?"y":"yMMMM",calendar:n}):this.globalize.formatDate(this.currentDate,{type:"date",skeleton:"GyMMM",calendar:n}):this.globalize.formatDate(this.currentDate,{format:t.isBlazor()?"yyyy":null,type:"date",skeleton:"y",calendar:n}),(a||s)&&(t.isNullOrUndefined(a)||a.setAttribute("aria-selected","true"),(s||a).setAttribute("aria-label",i),e=(s||a).getAttribute("id")),e},i.prototype.iconHandler=function(){switch(new Date(this.checkValue(this.currentDate)).setDate(1),this.currentView()){case"Month":this.previousIconHandler(this.compareMonth(new Date(this.checkValue(this.currentDate)),this.min)<1),this.nextIconHandler(this.compareMonth(new Date(this.checkValue(this.currentDate)),this.max)>-1);break;case"Year":this.previousIconHandler(this.compareYear(new Date(this.checkValue(this.currentDate)),this.min)<1),this.nextIconHandler(this.compareYear(new Date(this.checkValue(this.currentDate)),this.max)>-1);break;case"Decade":this.previousIconHandler(this.compareDecade(new Date(this.checkValue(this.currentDate)),this.min)<1),this.nextIconHandler(this.compareDecade(new Date(this.checkValue(this.currentDate)),this.max)>-1)}},i.prototype.destroy=function(){"calendar"===this.getModuleName()&&this.element?t.removeClass([this.element],[h]):this.calendarElement&&this.element&&t.removeClass([this.element],[h]),"calendar"===this.getModuleName()&&this.element&&(t.EventHandler.remove(this.headerTitleElement,"click",this.navigateTitle),this.todayElement&&t.EventHandler.remove(this.todayElement,"click",this.todayButtonClick),this.previousIconHandler(!0),this.nextIconHandler(!0),this.keyboardModule.destroy(),this.element.removeAttribute("data-role"),t.isNullOrUndefined(this.calendarEleCopy.getAttribute("tabindex"))?this.element.removeAttribute("tabindex"):this.element.setAttribute("tabindex",this.tabIndex)),this.element&&(this.element.innerHTML=""),e.prototype.destroy.call(this)},i.prototype.title=function(e){var t=this.getViewNumber(this.currentView());this.effect="e-zoomin",this.switchView(++t,e)},i.prototype.getViewNumber=function(e){return"Month"===e?0:"Year"===e?1:2},i.prototype.navigateTitle=function(e){e.preventDefault(),this.title(e),"calendar"===this.getModuleName()&&this.table.focus()},i.prototype.previous=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"Month":this.addMonths(this.currentDate,-1),this.switchView(e);break;case"Year":this.addYears(this.currentDate,-1),this.switchView(e);break;case"Decade":this.addYears(this.currentDate,-10),this.switchView(e)}},i.prototype.navigatePrevious=function(e){e.preventDefault(),"Gregorian"===this.calendarMode?this.previous():this.islamicModule.islamicPrevious(),this.triggerNavigate(e),"calendar"===this.getModuleName()&&this.table.focus()},i.prototype.next=function(){this.effect="";var e=this.getViewNumber(this.currentView());switch(this.currentView()){case"Month":this.addMonths(this.currentDate,1),this.switchView(e);break;case"Year":this.addYears(this.currentDate,1),this.switchView(e);break;case"Decade":this.addYears(this.currentDate,10),this.switchView(e)}},i.prototype.navigateNext=function(e){e.preventDefault(),"Gregorian"===this.calendarMode?this.next():this.islamicModule.islamicNext(),this.triggerNavigate(e),"calendar"===this.getModuleName()&&this.table.focus()},i.prototype.navigateTo=function(e,t,i){+t>=+this.min&&+t<=+this.max&&(this.currentDate=t),+t<=+this.min&&(this.currentDate=new Date(this.checkValue(this.min))),+t>=+this.max&&(this.currentDate=new Date(this.checkValue(this.max))),this.getViewNumber(this.depth)>=this.getViewNumber(e)&&(this.getViewNumber(this.depth)<=this.getViewNumber(this.start)||this.getViewNumber(this.depth)===this.getViewNumber(e))&&(e=this.depth),this.switchView(this.getViewNumber(e),null,null,i)},i.prototype.currentView=function(){return this.contentElement.classList.contains("e-year")?"Year":this.contentElement.classList.contains("e-decade")?"Decade":"Month"},i.prototype.getDateVal=function(e,i){return!t.isNullOrUndefined(i)&&e.getDate()===i.getDate()&&e.getMonth()===i.getMonth()&&e.getFullYear()===i.getFullYear()},i.prototype.getCultureObjects=function(e,i){var s=(t.isBlazor()?".dates.days.":".dates.calendars.gregorian.days.format.")+this.dayHeaderFormat.toLowerCase(),a=(t.isBlazor()?".dates.days.":".dates.calendars.islamic.days.format.")+this.dayHeaderFormat.toLowerCase(),n=t.isBlazor()?"":"main.";return"Gregorian"===this.calendarMode?t.getValue(n+""+this.locale+s,e):t.getValue("main."+this.locale+a,e)},i.prototype.getWeek=function(e){var t=new Date(this.checkValue(e)).valueOf(),i=new Date(e.getFullYear(),0,1).valueOf();return Math.ceil((t-i+864e5)/864e5/7)},i.prototype.setStartDate=function(e,t){var i=e.getTimezoneOffset(),s=new Date(e.getTime()+t),a=s.getTimezoneOffset()-i;e.setTime(s.getTime()+6e4*a)},i.prototype.addMonths=function(e,t){if("Gregorian"===this.calendarMode){var i=e.getDate();e.setDate(1),e.setMonth(e.getMonth()+t),e.setDate(Math.min(i,this.getMaxDays(e)))}else{var s=this.islamicModule.getIslamicDate(e);this.currentDate=this.islamicModule.toGregorian(s.year,s.month+t,1)}},i.prototype.addYears=function(e,t){if("Gregorian"===this.calendarMode){var i=e.getDate();e.setDate(1),e.setFullYear(e.getFullYear()+t),e.setDate(Math.min(i,this.getMaxDays(e)))}else{var s=this.islamicModule.getIslamicDate(e);this.currentDate=this.islamicModule.toGregorian(s.year+t,s.month,1)}},i.prototype.getIdValue=function(e,i){var s;s=e?e.currentTarget:i;var a="Gregorian"===this.calendarMode?"gregorian":"islamic",n={type:"dateTime",skeleton:t.isBlazor()?"F":"full",calendar:a},r=this.globalize.formatDate(new Date(parseInt(""+s.getAttribute("id"),0)),n),l=this.globalize.parseDate(r,n),o=l.valueOf()-l.valueOf()%1e3;return new Date(o)},i.prototype.adjustLongHeaderSize=function(){t.removeClass([this.element],"e-calendar-day-header-lg"),"Wide"===this.dayHeaderFormat&&t.addClass(["calendar"===this.getModuleName()?this.element:this.calendarElement],"e-calendar-day-header-lg")},i.prototype.selectDate=function(e,i,s,a,n){var r=s||e.currentTarget;if(this.isDateSelected=!1,"Decade"===this.currentView())this.setDateDecade(this.currentDate,i.getFullYear());else if("Year"===this.currentView())this.setDateYear(this.currentDate,i);else{if(a&&!this.checkPresentDate(i,n)){o=this.copyValues(n);!t.isNullOrUndefined(n)&&o.length>0?(o.push(new Date(this.checkValue(i))),this.setProperties({values:o},!0),this.setProperties({value:n[n.length-1]},!0)):this.setProperties({values:[new Date(this.checkValue(i))]},!0)}else this.setProperties({value:new Date(this.checkValue(i))},!0);this.currentDate=new Date(this.checkValue(i))}var l=t.closest(r,"."+h);if(t.isNullOrUndefined(l)&&(l=this.tableBodyElement),a||t.isNullOrUndefined(l.querySelector("."+p))||t.removeClass([l.querySelector("."+p)],p),a||t.isNullOrUndefined(l.querySelector("."+c))||t.removeClass([l.querySelector("."+c)],c),a){for(var o=this.copyValues(n),u=Array.prototype.slice.call(this.tableBodyElement.querySelectorAll("td")),d=0;d<u.length;d++){var m=l.querySelectorAll("td."+c)[0],v=l.querySelectorAll("td."+p)[0];u[d]===m&&t.removeClass([u[d]],c),u[d]!==v||this.checkPresentDate(new Date(parseInt(v.getAttribute("id").split("_")[0],10)),n)||t.removeClass([u[d]],p)}if(r.classList.contains(p)){t.removeClass([r],p);for(var f=0;f<o.length;f++){var y="Gregorian"===this.calendarMode?"gregorian":"islamic",g={format:this.getFromatStringValue(),type:"date",skeleton:"short",calendar:y};if(this.globalize.formatDate(i,g)===this.globalize.formatDate(o[f],g)){d=o.indexOf(o[f]);o.splice(d,1),t.addClass([r],c)}}this.setProperties({values:o},!0)}else t.addClass([r],p)}else t.addClass([r],p);this.isDateSelected=!0},i.prototype.getFromatStringValue=function(){return t.isBlazor()?"M"+t.getDefaultDateObject().dateSeperator+"d"+t.getDefaultDateObject().dateSeperator+"yy":null},i.prototype.checkPresentDate=function(e,i){var s=!1;if(!t.isNullOrUndefined(i))for(var a=0;a<i.length;a++){var n="Gregorian"===this.calendarMode?"gregorian":"islamic";this.globalize.formatDate(e,{format:this.getFromatStringValue(),type:"date",skeleton:"short",calendar:n})===this.globalize.formatDate(i[a],{format:this.getFromatStringValue(),type:"date",skeleton:"short",calendar:n})&&(s=!0)}return s},i.prototype.setAriaActiveDescendant=function(){t.attributes(this.table,{"aria-activedescendant":""+this.setActiveDescendant()})},i.prototype.previousIconHandler=function(e){e?(t.EventHandler.remove(this.previousIcon,"click",this.navigatePreviousHandler),t.addClass([this.previousIcon],""+u),t.addClass([this.previousIcon],""+d),this.previousIcon.setAttribute("aria-disabled","true")):(t.EventHandler.add(this.previousIcon,"click",this.navigatePreviousHandler),t.removeClass([this.previousIcon],""+u),t.removeClass([this.previousIcon],""+d),this.previousIcon.setAttribute("aria-disabled","false"))},i.prototype.renderDayCellEvent=function(e){t.extend(this.renderDayCellArgs,{name:"renderDayCell"}),this.trigger("renderDayCell",e)},i.prototype.navigatedEvent=function(e){t.extend(this.navigatedArgs,{name:"navigated",event:e}),this.trigger("navigated",this.navigatedArgs)},i.prototype.triggerNavigate=function(e){this.navigatedArgs={view:this.currentView(),date:this.currentDate},this.navigatedEvent(e)},i.prototype.nextIconHandler=function(e){e?(t.EventHandler.remove(this.nextIcon,"click",this.navigateNextHandler),t.addClass([this.nextIcon],u),t.addClass([this.nextIcon],d),this.nextIcon.setAttribute("aria-disabled","true")):(t.EventHandler.add(this.nextIcon,"click",this.navigateNextHandler),t.removeClass([this.nextIcon],u),t.removeClass([this.nextIcon],d),this.nextIcon.setAttribute("aria-disabled","false"))},i.prototype.compare=function(e,t,i){var s,a,n=t.getFullYear();return s=n,a=0,i&&(s=(n-=n%i)-n%i+i-1),e.getFullYear()>s?a=1:e.getFullYear()<n&&(a=-1),a},i.prototype.isMinMaxRange=function(e){return+e>=+this.min&&+e<=+this.max},i.prototype.isMonthYearRange=function(e){if("Gregorian"===this.calendarMode)return e.getMonth()>=this.min.getMonth()&&e.getFullYear()>=this.min.getFullYear()&&e.getMonth()<=this.max.getMonth()&&e.getFullYear()<=this.max.getFullYear();var t=this.islamicModule.getIslamicDate(e);return t.month>=this.islamicModule.getIslamicDate(new Date(1944,1,18)).month&&t.year>=this.islamicModule.getIslamicDate(new Date(1944,1,18)).year&&t.month<=this.islamicModule.getIslamicDate(new Date(2069,1,16)).month&&t.year<=this.islamicModule.getIslamicDate(new Date(2069,1,16)).year},i.prototype.compareYear=function(e,t){return this.compare(e,t,0)},i.prototype.compareDecade=function(e,t){return this.compare(e,t,10)},i.prototype.shiftArray=function(e,t){return e.slice(t).concat(e.slice(0,t))},i.prototype.addDay=function(e,i,s,a,n){var r=i,l=new Date(+e);if(!t.isNullOrUndefined(this.tableBodyElement)&&!t.isNullOrUndefined(s)){for(;this.findNextTD(new Date(+e),r,a,n);)r+=i;var o=new Date(l.setDate(l.getDate()+r));r=+o>+a||+o<+n?r===i?i-i:i:r}e.setDate(e.getDate()+r)},i.prototype.findNextTD=function(e,i,s,a){var n=new Date(e.setDate(e.getDate()+i)),r=[],l=!1;if((!t.isNullOrUndefined(n)&&n.getMonth())===(!t.isNullOrUndefined(this.currentDate)&&this.currentDate.getMonth())){r=("Gregorian"===this.calendarMode?this.renderDays(n):this.islamicModule.islamicRenderDays(this.currentDate,n)).filter(function(e){return e.classList.contains(u)})}else r=this.tableBodyElement.querySelectorAll("td."+u);if(+n<=+s&&+n>=+a&&r.length)for(var o=0;o<r.length&&!(l=+n==+new Date(parseInt(r[o].id,0)));o++);return l},i.prototype.getMaxDays=function(e){var t,i=new Date(this.checkValue(e));t=28;for(var s=i.getMonth();i.getMonth()===s;)++t,i.setDate(t);return t-1},i.prototype.setDateDecade=function(e,t){e.setFullYear(t),this.setProperties({value:new Date(this.checkValue(e))},!0)},i.prototype.setDateYear=function(e,t){e.setFullYear(t.getFullYear(),t.getMonth(),e.getDate()),t.getMonth()!==e.getMonth()&&(e.setDate(0),this.currentDate=new Date(this.checkValue(t))),this.setProperties({value:new Date(this.checkValue(e))},!0)},i.prototype.compareMonth=function(e,t){return e.getFullYear()>t.getFullYear()?1:e.getFullYear()<t.getFullYear()?-1:e.getMonth()===t.getMonth()?0:e.getMonth()>t.getMonth()?1:-1},i.prototype.checkValue=function(e){return e instanceof Date?e.toUTCString():""+e},i.prototype.checkView=function(){"Decade"!==this.start&&"Year"!==this.start&&this.setProperties({start:"Month"},!0),"Decade"!==this.depth&&"Year"!==this.depth&&this.setProperties({depth:"Month"},!0),this.getViewNumber(this.depth)>this.getViewNumber(this.start)&&this.setProperties({depth:"Month"},!0)},i.prototype.getDate=function(e,t){return t&&(e=new Date(e.toLocaleString("en-US",{timeZone:t}))),e},l([t.Property(new Date(1900,0,1))],i.prototype,"min",void 0),l([t.Property(!0)],i.prototype,"enabled",void 0),l([t.Property(null)],i.prototype,"cssClass",void 0),l([t.Property(new Date(2099,11,31))],i.prototype,"max",void 0),l([t.Property(null)],i.prototype,"firstDayOfWeek",void 0),l([t.Property("Gregorian")],i.prototype,"calendarMode",void 0),l([t.Property("Month")],i.prototype,"start",void 0),l([t.Property("Month")],i.prototype,"depth",void 0),l([t.Property(!1)],i.prototype,"weekNumber",void 0),l([t.Property("FirstDay")],i.prototype,"weekRule",void 0),l([t.Property(!0)],i.prototype,"showTodayButton",void 0),l([t.Property("Short")],i.prototype,"dayHeaderFormat",void 0),l([t.Property(!1)],i.prototype,"enablePersistence",void 0),l([t.Property(null)],i.prototype,"keyConfigs",void 0),l([t.Property(null)],i.prototype,"serverTimezoneOffset",void 0),l([t.Event()],i.prototype,"created",void 0),l([t.Event()],i.prototype,"destroyed",void 0),l([t.Event()],i.prototype,"navigated",void 0),l([t.Event()],i.prototype,"renderDayCell",void 0),i=l([t.NotifyPropertyChanges],i)}(t.Component),f=function(e){function i(t,i){return e.call(this,t,i)||this}return r(i,e),i.prototype.render=function(){if("Islamic"===this.calendarMode&&void 0===this.islamicModule&&t.throwError("Requires the injectable Islamic modules to render Calendar in Islamic mode"),this.isMultiSelection&&"object"==typeof this.values&&!t.isNullOrUndefined(this.values)&&this.values.length>0){for(var i=[],s=[],a=0;a<this.values.length;a++)-1===i.indexOf(+this.values[a])&&(i.push(+this.values[a]),s.push(this.values[a]));this.setProperties({values:s},!0);for(var n=0;n<this.values.length;n++)if(!this.checkDateValue(this.values[n]))if("string"==typeof this.values[n]&&this.checkDateValue(new Date(this.checkValue(this.values[n])))){var r=new Date(this.checkValue(this.values[n]));this.values.splice(n,1),this.values.splice(n,0,r)}else this.values.splice(n,1);this.setProperties({value:this.values[this.values.length-1]},!0),this.previousValues=this.values.length}if(this.validateDate(),this.minMaxUpdate(),this.setEnable(this.enabled),"calendar"===this.getModuleName()&&this.setClass(this.cssClass),e.prototype.render.call(this),"calendar"===this.getModuleName()){var l=t.closest(this.element,"form");l&&t.EventHandler.add(l,"reset",this.formResetHandler.bind(this)),this.setTimeZone(this.serverTimezoneOffset)}this.renderComplete()},i.prototype.setEnable=function(e){e?t.removeClass([this.element],u):t.addClass([this.element],u)},i.prototype.setClass=function(e,i){t.isNullOrUndefined(i)||(i=i.replace(/\s+/g," ").trim()),t.isNullOrUndefined(e)||(e=e.replace(/\s+/g," ").trim()),t.isNullOrUndefined(i)||""===i||t.removeClass([this.element],i.split(" ")),t.isNullOrUndefined(e)||t.addClass([this.element],e.split(" "))},i.prototype.isDayLightSaving=function(){var e=new Date(this.value.getFullYear(),6,1).getTimezoneOffset(),t=new Date(this.value.getFullYear(),0,1).getTimezoneOffset();return this.value.getTimezoneOffset()<Math.max(t,e)},i.prototype.setTimeZone=function(e){if(!t.isNullOrUndefined(this.serverTimezoneOffset)&&this.value){var i=e+(new Date).getTimezoneOffset()/60;i=this.isDayLightSaving()?i--:i,this.value=new Date(this.value.getTime()+60*i*60*1e3)}},i.prototype.formResetHandler=function(){this.setProperties({value:null},!0)},i.prototype.validateDate=function(){"string"==typeof this.value&&this.setProperties({value:this.checkDateValue(new Date(this.checkValue(this.value)))},!0),e.prototype.validateDate.call(this,this.value),!t.isNullOrUndefined(this.value)&&this.min<=this.max&&this.value>=this.min&&this.value<=this.max&&(this.currentDate=new Date(this.checkValue(this.value))),isNaN(+this.value)&&this.setProperties({value:null},!0)},i.prototype.minMaxUpdate=function(){"calendar"===this.getModuleName()&&(!t.isNullOrUndefined(this.value)&&this.value<=this.min&&this.min<=this.max?(this.setProperties({value:this.min},!0),this.changedArgs={value:this.value}):!t.isNullOrUndefined(this.value)&&this.value>=this.max&&this.min<=this.max&&(this.setProperties({value:this.max},!0),this.changedArgs={value:this.value})),"calendar"===this.getModuleName()||t.isNullOrUndefined(this.value)?e.prototype.minMaxUpdate.call(this,this.value):!t.isNullOrUndefined(this.value)&&this.value<this.min&&this.min<=this.max?e.prototype.minMaxUpdate.call(this,this.min):!t.isNullOrUndefined(this.value)&&this.value>this.max&&this.min<=this.max&&e.prototype.minMaxUpdate.call(this,this.max)},i.prototype.generateTodayVal=function(i){var s=new Date;return t.isNullOrUndefined(this.timezone)||(s=e.prototype.getDate.call(this,s,this.timezone)),i&&t.isNullOrUndefined(this.timezone)?(s.setHours(i.getHours()),s.setMinutes(i.getMinutes()),s.setSeconds(i.getSeconds()),s.setMilliseconds(i.getMilliseconds())):s=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0,0),s},i.prototype.todayButtonClick=function(t){if(this.showTodayButton){var i=this.generateTodayVal(this.value);if(this.setProperties({value:i},!0),this.isTodayClicked=!0,this.todayButtonEvent=t,this.isMultiSelection){var s=this.copyValues(this.values);e.prototype.checkPresentDate.call(this,i,this.values)||(s.push(i),this.setProperties({values:s}))}e.prototype.todayButtonClick.call(this,t,new Date(+this.value))}},i.prototype.keyActionHandle=function(t){e.prototype.keyActionHandle.call(this,t,this.value,this.isMultiSelection)},i.prototype.preRender=function(){var t=this;this.changeHandler=function(e){t.triggerChange(e)},this.checkView(),e.prototype.preRender.call(this,this.value)},i.prototype.createContent=function(){this.previousDate=this.value,this.previousDateTime=this.value,e.prototype.createContent.call(this)},i.prototype.minMaxDate=function(t){return e.prototype.minMaxDate.call(this,t)},i.prototype.renderMonths=function(t,i,s){e.prototype.renderMonths.call(this,t,this.value,s)},i.prototype.renderDays=function(t,i,s,a,n){var r=e.prototype.renderDays.call(this,t,this.value,this.isMultiSelection,this.values,n);return this.isMultiSelection&&e.prototype.validateValues.call(this,this.isMultiSelection,this.values),r},i.prototype.renderYears=function(t){"Gregorian"===this.calendarMode?e.prototype.renderYears.call(this,t,this.value):this.islamicModule.islamicRenderYears(t,this.value)},i.prototype.renderDecades=function(t){"Gregorian"===this.calendarMode?e.prototype.renderDecades.call(this,t,this.value):this.islamicModule.islamicRenderDecade(t,this.value)},i.prototype.renderTemplate=function(t,i,s,a){"Gregorian"===this.calendarMode?e.prototype.renderTemplate.call(this,t,i,s,a,this.value):this.islamicModule.islamicRenderTemplate(t,i,s,a,this.value),this.changedArgs={value:this.value,values:this.values},this.changeHandler()},i.prototype.clickHandler=function(i){var s=i.currentTarget;if(this.isPopupClicked=!0,s.classList.contains(o))if(this.isMultiSelection){var a=this.copyValues(this.values);a.push(this.getIdValue(i,null)),this.setProperties({values:a},!0),this.setProperties({value:this.values[this.values.length-1]},!0)}else this.setProperties({value:this.getIdValue(i,null)},!0);var n=this.currentView();e.prototype.clickHandler.call(this,i,this.value),this.isMultiSelection&&this.currentDate!==this.value&&!t.isNullOrUndefined(this.tableBodyElement.querySelectorAll("."+c)[0])&&"Year"===n&&this.tableBodyElement.querySelectorAll("."+c)[0].classList.remove(c)},i.prototype.switchView=function(t,i,s,a){e.prototype.switchView.call(this,t,i,this.isMultiSelection,a)},i.prototype.getModuleName=function(){return e.prototype.getModuleName.call(this),"calendar"},i.prototype.getPersistData=function(){e.prototype.getPersistData.call(this);var t=["value","values"];return this.addOnPersist(t)},i.prototype.onPropertyChanged=function(t,i){this.effect="",this.rangeValidation(this.min,this.max);for(var s=0,a=Object.keys(t);s<a.length;s++)switch(a[s]){case"value":this.isDateSelected&&("string"==typeof t.value?this.setProperties({value:new Date(this.checkValue(t.value))},!0):t.value=new Date(this.checkValue(t.value)),isNaN(+this.value)&&this.setProperties({value:i.value},!0),this.update());break;case"values":if(this.isDateSelected){if("string"==typeof t.values||"number"==typeof t.values)this.setProperties({values:null},!0);else{for(var n=this.copyValues(this.values),r=0;r<n.length;r++){var l=n[r];this.checkDateValue(l)&&!e.prototype.checkPresentDate.call(this,l,n)&&n.push(l)}this.setProperties({values:n},!0),this.values.length>0&&this.setProperties({value:t.values[t.values.length-1]},!0)}this.validateValues(this.isMultiSelection,this.values),this.update()}break;case"isMultiSelection":this.isDateSelected&&(this.setProperties({isMultiSelection:t.isMultiSelection},!0),this.update());break;case"enabled":this.setEnable(this.enabled);break;case"cssClass":"calendar"===this.getModuleName()&&this.setClass(t.cssClass,i.cssClass);break;default:e.prototype.onPropertyChanged.call(this,t,i,this.isMultiSelection,this.values)}this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange},i.prototype.destroy=function(){if(e.prototype.destroy.call(this),"calendar"===this.getModuleName()){var i=t.closest(this.element,"form");i&&t.EventHandler.remove(i,"reset",this.formResetHandler.bind(this))}},i.prototype.navigateTo=function(t,i,s){this.minMaxUpdate(),e.prototype.navigateTo.call(this,t,i,s)},i.prototype.currentView=function(){return e.prototype.currentView.call(this)},i.prototype.addDate=function(i){if("string"!=typeof i&&"number"!=typeof i){var s=this.copyValues(this.values);if("object"==typeof i&&i.length>0)for(var a=i,n=0;n<a.length;n++)this.checkDateValue(a[n])&&!e.prototype.checkPresentDate.call(this,a[n],s)&&(!t.isNullOrUndefined(s)&&s.length>0?s.push(a[n]):s=[new Date(+a[n])]);else this.checkDateValue(i)&&!e.prototype.checkPresentDate.call(this,i,s)&&(!t.isNullOrUndefined(s)&&s.length>0?s.push(i):s=[new Date(+i)]);this.setProperties({values:s},!0),this.isMultiSelection&&this.setProperties({value:this.values[this.values.length-1]},!0),this.validateValues(this.isMultiSelection,s),this.update(),this.changedArgs={value:this.value,values:this.values},this.changeHandler()}},i.prototype.removeDate=function(e){if("string"!=typeof e&&"number"!=typeof e&&!t.isNullOrUndefined(this.values)&&this.values.length>0){var i=this.copyValues(this.values);if("object"==typeof e&&e.length>0)for(var s=e,a=0;a<s.length;a++)for(n=0;n<i.length;n++)+i[n]==+s[a]&&i.splice(n,1);else for(var n=0;n<i.length;n++)+i[n]==+e&&i.splice(n,1);this.setProperties({values:i},!1),this.update(),this.isMultiSelection&&this.setProperties({value:this.values[this.values.length-1]},!0),this.changedArgs={value:this.value,values:this.values},this.changeHandler()}},i.prototype.setTodayDate=function(t){var i=new Date(+t);this.setProperties({value:i},!0),e.prototype.todayButtonClick.call(this,null,i,!0)},i.prototype.update=function(){this.validateDate(),this.minMaxUpdate(),e.prototype.setValueUpdate.call(this)},i.prototype.selectDate=function(i,s,a){e.prototype.selectDate.call(this,i,s,a,this.isMultiSelection,this.values),this.isMultiSelection&&!t.isNullOrUndefined(this.values)&&this.values.length>0&&this.setProperties({value:this.values[this.values.length-1]},!0),this.changedArgs={value:this.value,values:this.values},this.changeHandler(i)},i.prototype.changeEvent=function(e){((this.value&&this.value.valueOf())!==(this.previousDate&&+this.previousDate.valueOf())||this.isMultiSelection)&&(this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",this.changedArgs),this.previousDate=new Date(+this.value))},i.prototype.triggerChange=function(e){!t.isNullOrUndefined(this.todayButtonEvent)&&this.isTodayClicked&&(e=this.todayButtonEvent,this.isTodayClicked=!1),this.changedArgs.event=e||null,this.changedArgs.isInteracted=!t.isNullOrUndefined(e),t.isNullOrUndefined(this.value)||this.setProperties({value:this.value},!0),this.isMultiSelection||+this.value===Number.NaN||+this.value==+this.previousDate&&(null!=this.previousDate||isNaN(+this.value))?t.isNullOrUndefined(this.values)||this.previousValues===this.values.length||(this.changeEvent(e),this.previousValues=this.values.length):this.changeEvent(e)},l([t.Property(null)],i.prototype,"value",void 0),l([t.Property(null)],i.prototype,"values",void 0),l([t.Property(!1)],i.prototype,"isMultiSelection",void 0),l([t.Event()],i.prototype,"change",void 0),i=l([t.NotifyPropertyChanges],i)}(v),y=function(){function e(e){this.calendarInstance=e}return e.prototype.getModuleName=function(){return"islamic"},e.prototype.islamicTitleUpdate=function(e,i){var s=new t.Internationalization(this.calendarInstance.locale);switch(i){case"days":this.calendarInstance.headerTitleElement.textContent=s.formatDate(e,{type:"dateTime",format:"MMMMyyyy",calendar:"islamic"});break;case"months":this.calendarInstance.headerTitleElement.textContent=s.formatDate(e,{type:"dateTime",format:"yyyy",calendar:"islamic"})}},e.prototype.islamicRenderDays=function(e,i,s,a){var n,r=[],l=new Date(this.islamicInValue(e));this.islamicTitleUpdate(e,"days");var o=this.getIslamicDate(l),h=this.toGregorian(o.year,o.month,1),u=o.month;for(l=h;l.getDay()!==this.calendarInstance.firstDayOfWeek;)this.calendarInstance.setStartDate(l,-864e5);for(var d=0;d<42;++d){var p=this.calendarInstance.createElement("td",{className:"e-cell"}),c=this.calendarInstance.createElement("span");d%7==0&&this.calendarInstance.weekNumber&&(c.textContent=""+this.calendarInstance.getWeek(l),p.appendChild(c),t.addClass([p],"e-week-number"),r.push(p)),n=new Date(+l),l=this.calendarInstance.minMaxDate(l);var m={type:"dateTime",skeleton:"full",calendar:"islamic"},v=this.calendarInstance.globalize.parseDate(this.calendarInstance.globalize.formatDate(l,m),m),f=this.islamicDayCell(l),y=this.calendarInstance.globalize.formatDate(l,{type:"date",skeleton:"full",calendar:"islamic"}),g=this.calendarInstance.createElement("span");g.textContent=this.calendarInstance.globalize.formatDate(l,{type:"date",skeleton:"d",calendar:"islamic"});var b=this.calendarInstance.min>l||this.calendarInstance.max<l;b?(t.addClass([f],"e-disabled"),t.addClass([f],"e-overlay")):g.setAttribute("title",""+y),u!==this.getIslamicDate(l).month&&t.addClass([f],"e-other-month"),0!==l.getDay()&&6!==l.getDay()||t.addClass([f],"e-weekend"),f.appendChild(g),this.calendarInstance.renderDayCellArgs={date:l,isDisabled:!1,element:f,isOutOfRange:b};var D=this.calendarInstance.renderDayCellArgs;if(this.calendarInstance.renderDayCellEvent(D),D.isDisabled)if(this.calendarInstance.isMultiSelection){if(!t.isNullOrUndefined(this.calendarInstance.values)&&this.calendarInstance.values.length>0)for(var E=0;E<a.length;E++)(w=+new Date(this.calendarInstance.globalize.formatDate(D.date,{type:"date",skeleton:"yMd",calendar:"islamic"})))===(V=+new Date(this.calendarInstance.globalize.formatDate(this.calendarInstance.values[E],{type:"date",skeleton:"yMd",calendar:"islamic"})))&&(this.calendarInstance.values.splice(E,1),E=-1)}else i&&+i==+D.date&&this.calendarInstance.setProperties({value:null},!0);this.calendarInstance.renderDayCellArgs.isDisabled&&!f.classList.contains("e-selected")&&(t.addClass([f],"e-disabled"),t.addClass([f],"e-overlay"),+this.calendarInstance.renderDayCellArgs.date==+this.calendarInstance.todayDate&&(this.calendarInstance.todayDisabled=!0));var C=f.classList.contains("e-other-month"),k=f.classList.contains("e-disabled");if(k||t.EventHandler.add(f,"click",this.calendarInstance.clickHandler,this.calendarInstance),!this.calendarInstance.isMultiSelection||t.isNullOrUndefined(this.calendarInstance.values)||C||k)C||k||!this.calendarInstance.getDateVal(l,i)?this.calendarInstance.updateFocus(C,k,l,f,e):t.addClass([f],"e-selected");else{for(var M=0;M<this.calendarInstance.values.length;M++){var w=this.calendarInstance.globalize.formatDate(l,{type:"date",skeleton:"short",calendar:"islamic"}),V=this.calendarInstance.globalize.formatDate(this.calendarInstance.values[M],{type:"date",skeleton:"short",calendar:"islamic"});w===V&&this.calendarInstance.getDateVal(l,this.calendarInstance.values[M])?t.addClass([f],"e-selected"):this.calendarInstance.updateFocus(C,k,l,f,e)}this.calendarInstance.values.length<=0&&this.calendarInstance.updateFocus(C,k,l,f,e)}v.getDate()===(new Date).getDate()&&v.getMonth()===(new Date).getMonth()&&v.getFullYear()===(new Date).getFullYear()&&t.addClass([f],"e-today"),l=new Date(+n),r.push(this.calendarInstance.renderDayCellArgs.element),this.calendarInstance.addDay(l,1,null,this.calendarInstance.max,this.calendarInstance.min)}return r},e.prototype.islamicIconHandler=function(){new Date(this.islamicInValue(this.calendarInstance.currentDate)).setDate(1);var e=new Date(this.islamicInValue(this.calendarInstance.currentDate));switch(this.calendarInstance.currentView()){case"Month":var t=this.islamicCompareMonth(e,this.calendarInstance.min)<1,i=this.islamicCompareMonth(e,this.calendarInstance.max)>-1;this.calendarInstance.previousIconHandler(t),this.calendarInstance.nextIconHandler(i);break;case"Year":var s=this.hijriCompareYear(e,this.calendarInstance.min)<1,a=this.hijriCompareYear(e,this.calendarInstance.max)>-1;this.calendarInstance.previousIconHandler(s),this.calendarInstance.nextIconHandler(a);break;case"Decade":var n=this.hijriCompareDecade(e,this.calendarInstance.min)<1,r=this.hijriCompareDecade(e,this.calendarInstance.max)>-1;this.calendarInstance.previousIconHandler(n),this.calendarInstance.nextIconHandler(r)}},e.prototype.islamicNext=function(){this.calendarInstance.effect="";var e=this.calendarInstance.getViewNumber(this.calendarInstance.currentView()),t=this.getIslamicDate(this.calendarInstance.currentDate);switch(this.calendarInstance.currentView()){case"Year":this.calendarInstance.currentDate=this.toGregorian(t.year+1,t.month,1),this.calendarInstance.switchView(e);break;case"Month":this.calendarInstance.currentDate=this.toGregorian(t.year,t.month+1,1),this.calendarInstance.switchView(e);break;case"Decade":this.calendarInstance.currentDate=this.toGregorian(t.year+10,t.month,1),this.calendarInstance.switchView(e)}},e.prototype.islamicPrevious=function(){var e=this.calendarInstance.getViewNumber(this.calendarInstance.currentView());this.calendarInstance.effect="";var t=this.getIslamicDate(this.calendarInstance.currentDate);switch(this.calendarInstance.currentView()){case"Month":this.calendarInstance.currentDate=this.toGregorian(t.year,t.month-1,1),this.calendarInstance.switchView(e);break;case"Year":this.calendarInstance.currentDate=this.toGregorian(t.year-1,t.month,1),this.calendarInstance.switchView(e);break;case"Decade":this.calendarInstance.currentDate=this.toGregorian(t.year-10,t.month-1,1),this.calendarInstance.switchView(e)}},e.prototype.islamicRenderYears=function(e,i){this.calendarInstance.removeTableHeadElement();var s=[],a=t.isNullOrUndefined(i),n=new Date(this.islamicInValue(this.calendarInstance.currentDate)),r=this.getIslamicDate(n);n=t.HijriParser.toGregorian(r.year,1,1);var l=r.month,o=r.year,h=r.year,u=this.getIslamicDate(this.calendarInstance.min).year,d=this.getIslamicDate(this.calendarInstance.min).month,p=this.getIslamicDate(this.calendarInstance.max).year,c=this.getIslamicDate(this.calendarInstance.max).month;this.islamicTitleUpdate(this.calendarInstance.currentDate,"months");for(var m=1;m<=12;++m){var v=this.getIslamicDate(n);n=t.HijriParser.toGregorian(v.year,m,1);var f=this.islamicDayCell(n),y=this.calendarInstance.createElement("span"),g=i&&this.getIslamicDate(i).month===this.getIslamicDate(n).month,b=i&&this.getIslamicDate(i).year===o&&g;y.textContent=this.calendarInstance.globalize.formatDate(n,{type:"dateTime",format:"MMM",calendar:"islamic"}),this.calendarInstance.min&&(h<u||m<d&&h===u)||this.calendarInstance.max&&(h>p||m>c&&h>=p)?t.addClass([f],"e-disabled"):!a&&b?t.addClass([f],"e-selected"):this.getIslamicDate(n).month===l&&this.getIslamicDate(this.calendarInstance.currentDate).month===l&&t.addClass([f],"e-focused-date"),f.classList.contains("e-disabled")||t.EventHandler.add(f,"click",this.calendarInstance.clickHandler,this.calendarInstance),f.appendChild(y),s.push(f)}this.islamicRenderTemplate(s,4,"e-year",e,i)},e.prototype.islamicRenderDecade=function(e,i){this.calendarInstance.removeTableHeadElement();var s=[],a=new Date(this.islamicInValue(this.calendarInstance.currentDate)),n=this.getIslamicDate(a),r=(a=t.HijriParser.toGregorian(n.year,1,1)).getFullYear(),l=new Date(this.islamicInValue(r-r%10)),o=new Date(this.islamicInValue(r-r%10+9)),h=l.getFullYear(),u=o.getFullYear(),d=this.calendarInstance.globalize.formatDate(l,{type:"dateTime",format:"y",calendar:"islamic"}),p=this.calendarInstance.globalize.formatDate(o,{type:"dateTime",format:"y",calendar:"islamic"});this.calendarInstance.headerTitleElement.textContent=d+" - "+p;for(var c=new Date(r-r%10-2,0,1).getFullYear(),m=1;m<=12;++m){var v=c+m;a.setFullYear(v),a.setDate(1),a.setMonth(0);var f=this.getIslamicDate(a);a=t.HijriParser.toGregorian(f.year,1,1);var y=this.islamicDayCell(a);t.attributes(y,{role:"gridcell"});var g=this.calendarInstance.createElement("span");g.textContent=this.calendarInstance.globalize.formatDate(a,{type:"dateTime",format:"y",calendar:"islamic"}),v<h||v>u?t.addClass([y],"e-other-month"):v<new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()||v>new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()?t.addClass([y],"e-disabled"):t.isNullOrUndefined(i)||this.getIslamicDate(a).year!==this.getIslamicDate(i).year?a.getFullYear()!==this.calendarInstance.currentDate.getFullYear()||y.classList.contains("e-disabled")||t.addClass([y],"e-focused-date"):t.addClass([y],"e-selected"),y.classList.contains("e-disabled")||t.EventHandler.add(y,"click",this.calendarInstance.clickHandler,this.calendarInstance),y.appendChild(g),s.push(y)}this.islamicRenderTemplate(s,4,"e-decade",e,i)},e.prototype.islamicDayCell=function(e){var i={skeleton:"full",type:"dateTime",calendar:"islamic"},s=this.calendarInstance.globalize.formatDate(e,i),a=this.calendarInstance.globalize.parseDate(s,i).valueOf(),n={className:"e-cell",attrs:{id:""+t.getUniqueID(""+a),"aria-selected":"false",role:"gridcell"}};return this.calendarInstance.createElement("td",n)},e.prototype.islamicRenderTemplate=function(e,i,s,a,n){var r,l=this.calendarInstance.getViewNumber(this.calendarInstance.currentView());this.calendarInstance.tableBodyElement=this.calendarInstance.createElement("tbody"),this.calendarInstance.table.appendChild(this.calendarInstance.tableBodyElement),t.removeClass([this.calendarInstance.contentElement,this.calendarInstance.headerElement],["e-month","e-decade","e-year"]),t.addClass([this.calendarInstance.contentElement,this.calendarInstance.headerElement],[s]);for(var o=i,h=0,u=0;u<e.length/i;++u){for(r=this.calendarInstance.createElement("tr",{attrs:{role:"row"}}),h=0+h;h<o;h++)e[h].classList.contains("e-week-number")||t.isNullOrUndefined(e[h].children[0])||(t.addClass([e[h].children[0]],["e-day"]),t.rippleEffect(e[h].children[0],{duration:600,isCenterRipple:!0})),r.appendChild(e[h]),this.calendarInstance.weekNumber&&7===h&&e[7].classList.contains("e-other-month")&&t.addClass([r],"e-month-hide"),!this.calendarInstance.weekNumber&&6===h&&e[6].classList.contains("e-other-month")&&t.addClass([r],"e-month-hide"),this.calendarInstance.weekNumber?41===h&&e[41].classList.contains("e-other-month")&&t.addClass([r],"e-month-hide"):35===h&&e[35].classList.contains("e-other-month")&&t.addClass([r],"e-month-hide");o+=i,h+=0,this.calendarInstance.tableBodyElement.appendChild(r)}this.calendarInstance.table.querySelector("tbody").className=this.calendarInstance.effect,this.islamicIconHandler(),(l!==this.calendarInstance.getViewNumber(this.calendarInstance.currentView())||0===l&&l!==this.calendarInstance.getViewNumber(this.calendarInstance.currentView()))&&this.calendarInstance.navigateHandler(a),this.calendarInstance.setAriaActiveDescendant(),this.calendarInstance.changedArgs={value:this.calendarInstance.value,values:this.calendarInstance.values},this.calendarInstance.changeHandler()},e.prototype.islamicCompareMonth=function(e,t){var i=this.getIslamicDate(e),s=this.getIslamicDate(t);return i.year>s.year?1:i.year<s.year?-1:i.month===s.month?0:i.month>s.month?1:-1},e.prototype.islamicCompare=function(e,t,i){var s,a,n=this.getIslamicDate(e),r=this.getIslamicDate(t).year;return s=r,a=0,i&&(s=(r-=r%i)-r%i+i-1),n.year>s?a=1:"Decade"===this.calendarInstance.currentView()&&n.year<r&&!(e.getFullYear()>=2060&&e.getFullYear()<=2069)?a=-1:n.year<r&&"Year"===this.calendarInstance.currentView()&&(a=-1),a},e.prototype.getIslamicDate=function(e){return t.HijriParser.getHijriDate(e)},e.prototype.toGregorian=function(e,i,s){return t.HijriParser.toGregorian(e,i,s)},e.prototype.hijriCompareYear=function(e,t){return this.islamicCompare(e,t,0)},e.prototype.hijriCompareDecade=function(e,t){return this.islamicCompare(e,t,10)},e.prototype.destroy=function(){this.calendarInstance=null},e.prototype.islamicInValue=function(e){return e instanceof Date?e.toUTCString():""+e},e}(),g=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),b=function(e,t,i,s){var a,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(n<3?a(r):n>3?a(t,i,r):a(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},D="e-datepicker",E=["title","class","style"],C=function(e){function a(t,i){var s=e.call(this,t,i)||this;return s.previousElementValue="",s.isDateIconClicked=!1,s.isAltKeyPressed=!1,s.isInteracted=!0,s.isBlazorServer=!1,s.invalidValueString=null,s.checkPreviousValue=null,s.maskedDateValue="",s.isAngular=!1,s.preventChange=!1,s.isIconClicked=!1,s.isDynamicValueChanged=!1,s.moduleName=s.getModuleName(),s.datepickerOptions=t,s}return g(a,e),a.prototype.render=function(){this.initialize(),this.bindEvents(),this.renderComplete(),this.isBlazorServer||this.setTimeZone(this.serverTimezoneOffset)},a.prototype.setTimeZone=function(e){if(!t.isNullOrUndefined(this.serverTimezoneOffset)&&this.value){var i=e+(new Date).getTimezoneOffset()/60;i=this.isDayLightSaving()?i--:i,this.value=new Date(this.value.getTime()+60*i*60*1e3),this.updateInput()}},a.prototype.isDayLightSaving=function(){var e=new Date(this.value.getFullYear(),0,1).getTimezoneOffset(),t=new Date(this.value.getFullYear(),6,1).getTimezoneOffset();return this.value.getTimezoneOffset()<Math.max(e,t)},a.prototype.setAllowEdit=function(){this.allowEdit?this.readonly||this.inputElement.removeAttribute("readonly"):t.attributes(this.inputElement,{readonly:""}),this.updateIconState()},a.prototype.updateIconState=function(){this.allowEdit||!this.inputWrapper||this.readonly?this.inputWrapper&&t.removeClass([this.inputWrapper.container],["e-non-edit"]):""===this.inputElement.value?t.removeClass([this.inputWrapper.container],["e-non-edit"]):t.addClass([this.inputWrapper.container],["e-non-edit"])},a.prototype.initialize=function(){if(this.isBlazorServer){var e=this.element.parentElement;this.inputWrapper={container:e,clearButton:e.querySelector(".e-clear-icon"),buttons:[e.querySelector(".e-date-icon")]},s.Input.bindInitialEvent({element:this.inputElement,floatLabelType:this.floatLabelType}),this.showClearButton&&this.inputWrapper.clearButton&&s.Input.wireClearBtnEvents(this.inputElement,this.inputWrapper.clearButton,this.inputWrapper.container),this.setAllowEdit()}else this.enableMask&&this.notify("createMask",{module:"MaskedDateTime"}),this.checkInvalidValue(this.value),this.createInput(),this.updateHtmlAttributeToWrapper(),this.setAllowEdit(),this.updateInput(),!this.enableMask||this.value||!this.maskedDateValue||"Always"!=this.floatLabelType&&this.floatLabelType&&this.placeholder||this.updateInputValue(this.maskedDateValue);this.previousElementValue=this.inputElement.value,this.previousDate=t.isNullOrUndefined(this.value)?null:new Date(+this.value),this.inputElement.setAttribute("value",this.inputElement.value),this.inputValueCopy=this.value},a.prototype.createInput=function(){var e={"aria-live":"assertive","aria-atomic":"true","aria-haspopup":"true","aria-activedescendant":"null","aria-owns":this.element.id+"_options","aria-expanded":"false",role:"combobox",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false","aria-invalid":"false"};if("datepicker"===this.getModuleName()){var i={placeholder:this.placeholder};this.globalize=new t.Internationalization(this.locale),this.l10n=new t.L10n("datepicker",i,this.locale),this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0)}var a=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(a=this.cssClass.replace(/\s+/g," ").trim());var n=!this.enableMask;this.inputWrapper=s.Input.createInput({element:this.inputElement,floatLabelType:this.floatLabelType,bindClearAction:n,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:a,enabled:this.enabled,enableRtl:this.enableRtl,showClearButton:this.showClearButton},buttons:["e-input-group-icon e-date-icon e-icons"]},this.createElement),this.setWidth(this.width),""!==this.inputElement.name?this.inputElement.setAttribute("name",""+this.inputElement.getAttribute("name")):this.inputElement.setAttribute("name",""+this.element.id),t.attributes(this.inputElement,e),this.enabled?(this.inputElement.setAttribute("aria-disabled","false"),this.inputElement.setAttribute("tabindex",this.tabIndex)):(this.inputElement.setAttribute("aria-disabled","true"),this.inputElement.tabIndex=-1),s.Input.addAttributes({"aria-label":"select"},this.inputWrapper.buttons[0]),t.addClass([this.inputWrapper.container],"e-date-wrapper")},a.prototype.updateInput=function(i){void 0===i&&(i=!1);var s;if(!this.value||this.isCalendar()||i||this.isBlazorServer||this.disabledDates(),isNaN(+new Date(this.checkValue(this.value)))&&this.setProperties({value:null},!0),this.strictMode&&(e.prototype.validateDate.call(this),this.minMaxUpdates(),e.prototype.minMaxUpdate.call(this)),!t.isNullOrUndefined(this.value)){var a=this.value,n=void 0,r=t.isNullOrUndefined(this.formatString)?this.dateTimeFormat:this.formatString;if("datetimepicker"===this.getModuleName()?n="Gregorian"===this.calendarMode?this.globalize.formatDate(this.value,{format:r,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}):this.globalize.formatDate(this.value,{format:r,type:"dateTime",skeleton:"yMd",calendar:"islamic"}):(s="Gregorian"===this.calendarMode?{format:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"},n=this.globalize.formatDate(this.value,s)),+a<=+this.max&&+a>=+this.min)this.updateInputValue(n);else{var l=+a>=+this.max||!+this.value||!+this.value||+a<=+this.min;!this.strictMode&&l&&this.updateInputValue(n)}}t.isNullOrUndefined(this.value)&&this.strictMode&&(this.enableMask?(this.updateInputValue(this.maskedDateValue),this.notify("createMask",{module:"MaskedDateTime"})):this.updateInputValue("")),!this.strictMode&&t.isNullOrUndefined(this.value)&&this.invalidValueString&&this.updateInputValue(this.invalidValueString),this.changedArgs={value:this.value},this.errorClass(),this.updateIconState()},a.prototype.minMaxUpdates=function(){!t.isNullOrUndefined(this.value)&&this.value<this.min&&this.min<=this.max&&this.strictMode?(this.setProperties({value:this.min},!0),this.changedArgs={value:this.value}):!t.isNullOrUndefined(this.value)&&this.value>this.max&&this.min<=this.max&&this.strictMode&&(this.setProperties({value:this.max},!0),this.changedArgs={value:this.value})},a.prototype.checkStringValue=function(e){var i=null,s=null,a=null;if("datetimepicker"===this.getModuleName()){var n=new t.Internationalization(this.locale);"Gregorian"===this.calendarMode?(s={format:this.dateTimeFormat,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"},a={format:n.getDatePattern({skeleton:t.isBlazor()?"d":"yMd"}),type:"dateTime"}):(s={format:this.dateTimeFormat,type:"dateTime",skeleton:"yMd",calendar:"islamic"},a={format:n.getDatePattern({skeleton:"yMd"}),type:"dateTime",calendar:"islamic"})}else s="Gregorian"===this.calendarMode?{format:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"};return i=this.checkDateValue(this.globalize.parseDate(e,s)),t.isNullOrUndefined(i)&&"datetimepicker"===this.getModuleName()&&(i=this.checkDateValue(this.globalize.parseDate(e,a))),i},a.prototype.checkInvalidValue=function(e){if(!(e instanceof Date||t.isNullOrUndefined(e))){var i=null,s=e;"number"==typeof e&&(s=e.toString());if("datetimepicker"===this.getModuleName()){var a=new t.Internationalization(this.locale);"Gregorian"===this.calendarMode?({format:this.dateTimeFormat,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"},{format:a.getDatePattern({skeleton:t.isBlazor()?"d":"yMd"}),type:"dateTime"}):({format:this.dateTimeFormat,type:"dateTime",skeleton:"yMd",calendar:"islamic"},{format:a.getDatePattern({skeleton:"yMd"}),type:"dateTime",calendar:"islamic"})}else"Gregorian"===this.calendarMode?{format:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"};var n=!1;if("string"!=typeof s)s=null,n=!0;else if("string"==typeof s&&(s=s.trim()),!(i=this.checkStringValue(s))){var r=null;r=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,!/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/.test(s)&&!r.test(s)||/^[a-zA-Z0-9- ]*$/.test(s)||isNaN(+new Date(this.checkValue(s)))?n=!0:i=new Date(s)}n?(this.strictMode||(this.invalidValueString=s),this.setProperties({value:null},!0)):this.setProperties({value:i},!0)}},a.prototype.bindInputEvent=function(){t.isNullOrUndefined(this.formatString)&&!this.enableMask||(this.enableMask||-1===this.formatString.indexOf("y")?t.EventHandler.add(this.inputElement,"input",this.inputHandler,this):t.EventHandler.remove(this.inputElement,"input",this.inputHandler))},a.prototype.bindEvents=function(){t.EventHandler.add(this.inputWrapper.buttons[0],"mousedown touchstart",this.isBlazorServer?this.preventEventBubbling:this.dateIconHandler,this),t.EventHandler.add(this.inputElement,"mouseup",this.mouseUpHandler,this),t.EventHandler.add(this.inputElement,"focus",this.inputFocusHandler,this),t.EventHandler.add(this.inputElement,"blur",this.inputBlurHandler,this),this.enableMask&&t.EventHandler.add(this.inputElement,"keydown",this.keydownHandler,this),this.bindInputEvent(),t.EventHandler.add(this.inputElement,"change",this.inputChangeHandler,this),this.showClearButton&&(this.inputWrapper.clearButton||this.isBlazorServer)&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.resetFormHandler,this),this.defaultKeyConfigs=t.extend(this.defaultKeyConfigs,this.keyConfigs),this.keyboardModules=new t.KeyboardEvents(this.inputElement,{eventName:"keydown",keyAction:this.inputKeyActionHandle.bind(this),keyConfigs:this.defaultKeyConfigs})},a.prototype.keydownHandler=function(e){switch(e.code){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":case"Home":case"End":case"Delete":!this.enableMask||this.popupObj||this.readonly||("Delete"!==e.code&&e.preventDefault(),this.notify("keyDownHandler",{module:"MaskedDateTime",e:e}))}},a.prototype.unBindEvents=function(){t.EventHandler.remove(this.inputWrapper.buttons[0],"mousedown touchstart",this.isBlazorServer?this.preventEventBubbling:this.dateIconHandler),t.EventHandler.remove(this.inputElement,"mouseup",this.mouseUpHandler),t.EventHandler.remove(this.inputElement,"focus",this.inputFocusHandler),t.EventHandler.remove(this.inputElement,"blur",this.inputBlurHandler),t.EventHandler.remove(this.inputElement,"change",this.inputChangeHandler),this.enableMask&&t.EventHandler.remove(this.inputElement,"keydown",this.keydownHandler),this.showClearButton&&(this.inputWrapper.clearButton||this.isBlazorServer)&&t.EventHandler.remove(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.resetFormHandler)},a.prototype.resetFormHandler=function(){if(this.enabled&&!this.inputElement.disabled){var e=this.inputElement.getAttribute("value");"EJS-DATEPICKER"!==this.element.tagName&&"EJS-DATETIMEPICKER"!==this.element.tagName||(e="",this.inputValueCopy=null,this.inputElement.setAttribute("value","")),this.isBlazorServer||(this.setProperties({value:this.inputValueCopy},!0),this.restoreValue(),this.inputElement&&(this.updateInputValue(e),this.errorClass()))}},a.prototype.restoreValue=function(){this.currentDate=this.value?this.value:new Date,this.previousDate=this.value,this.previousElementValue=t.isNullOrUndefined(this.inputValueCopy)?"":this.globalize.formatDate(this.inputValueCopy,{format:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"})},a.prototype.inputChangeHandler=function(e){this.enabled&&e.stopPropagation()},a.prototype.bindClearEvent=function(){this.showClearButton&&this.inputWrapper.clearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this)},a.prototype.resetHandler=function(e){this.enabled&&(e.preventDefault(),this.clear(e))},a.prototype.mouseUpHandler=function(e){this.enableMask&&(e.preventDefault(),this.notify("setMaskSelection",{module:"MaskedDateTime"}))},a.prototype.clear=function(e){this.isBlazorServer||this.setProperties({value:null},!0),this.enableMask||this.updateInputValue("");var t={event:e};this.trigger("cleared",t),this.invalidValueString="",this.isBlazorServer||(this.updateInput(),this.popupUpdate(),this.changeEvent(e),this.enableMask&&this.notify("clearHandler",{module:"MaskedDateTime"})),this.isBlazorServer&&this.interopAdaptor.invokeMethodAsync("OnValueCleared")},a.prototype.preventEventBubbling=function(e){e.preventDefault(),this.interopAdaptor.invokeMethodAsync("OnDateIconClick")},a.prototype.updateInputValue=function(e){s.Input.setValue(e,this.inputElement,this.floatLabelType,this.showClearButton)},a.prototype.dateIconHandler=function(e){this.enabled&&(this.isIconClicked=!0,t.Browser.isDevice&&(this.inputElement.setAttribute("readonly",""),this.inputElement.blur()),this.isBlazorServer||e.preventDefault(),this.readonly||(this.isCalendar()&&!this.isBlazorServer?this.hide(e):(!this.isBlazorServer||this.isBlazorServer&&this.inputWrapper.container.nextElementSibling)&&(this.isDateIconClicked=!0,this.show(null,e),"datetimepicker"===this.getModuleName()&&this.inputElement.focus(),this.inputElement.focus(),t.addClass([this.inputWrapper.container],["e-input-focus"]),t.addClass(this.inputWrapper.buttons,"e-active"))),this.isIconClicked=!1)},a.prototype.updateHtmlAttributeToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(!t.isNullOrUndefined(this.htmlAttributes[s])&&E.indexOf(s)>-1)if("class"===s){var a=this.htmlAttributes[s].replace(/\s+/g," ").trim();""!==a&&t.addClass([this.inputWrapper.container],a.split(" "))}else if("style"===s){var n=this.inputWrapper.container.getAttribute(s);t.isNullOrUndefined(n)?n=this.htmlAttributes[s]:";"===n.charAt(n.length-1)?n+=this.htmlAttributes[s]:n=n+";"+this.htmlAttributes[s],this.inputWrapper.container.setAttribute(s,n)}else this.inputWrapper.container.setAttribute(s,this.htmlAttributes[s])}},a.prototype.updateHtmlAttributeToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];E.indexOf(s)<0&&this.inputElement.setAttribute(s,this.htmlAttributes[s])}},a.prototype.updateCssClass=function(e,i){t.isNullOrUndefined(i)||(i=i.replace(/\s+/g," ").trim()),t.isNullOrUndefined(e)||(e=e.replace(/\s+/g," ").trim()),s.Input.setCssClass(e,[this.inputWrapper.container],i),this.popupWrapper&&s.Input.setCssClass(e,[this.popupWrapper],i)},a.prototype.calendarKeyActionHandle=function(e){switch(e.action){case"escape":this.isCalendar()?this.hide(e):this.inputWrapper.container.children[this.index].blur();break;case"enter":this.isCalendar()?+this.value==+this.currentDate||this.isCalendar()||this.inputWrapper.container.children[this.index].focus():this.show(null,e),"datetimepicker"===this.getModuleName()&&this.inputElement.focus();break;case"tab":this.hide(e)}},a.prototype.inputFocusHandler=function(){if(this.enabled){this.enableMask&&!this.inputElement.value&&this.placeholder&&(!this.maskedDateValue||this.value||"Auto"!=this.floatLabelType&&"Never"!=this.floatLabelType&&!this.placeholder||(this.updateInputValue(this.maskedDateValue),this.inputElement.selectionStart=0,this.inputElement.selectionEnd=this.inputElement.value.length));var e={model:t.isBlazor()&&this.isServerRendered?null:this};this.isDateIconClicked=!1,this.trigger("focus",e),this.updateIconState(),this.openOnFocus&&!this.isIconClicked&&this.show()}},a.prototype.inputHandler=function(){this.isPopupClicked=!1,this.enableMask&&this.notify("inputHandler",{module:"MaskedDateTime"})},a.prototype.inputBlurHandler=function(e){if(this.enabled){if(this.isBlazorServer?this.interopAdaptor.invokeMethodAsync("OnStrictModeUpdate",this.inputElement.value):(this.strictModeUpdate(),""===this.inputElement.value&&t.isNullOrUndefined(this.value)&&(this.invalidValueString=null,this.updateInputValue("")),this.updateInput(),this.popupUpdate(),this.changeTrigger(e),this.enableMask&&this.maskedDateValue&&this.placeholder&&"Always"!==this.floatLabelType&&(this.inputElement.value!=this.maskedDateValue||this.value||"Auto"!=this.floatLabelType&&"Never"!=this.floatLabelType&&!this.placeholder||this.updateInputValue("")),this.errorClass()),this.isCalendar()&&document.activeElement===this.inputElement&&this.hide(e),"datepicker"===this.getModuleName()){var i={model:t.isBlazor()&&this.isServerRendered?null:this};this.trigger("blur",i)}this.isCalendar()&&(this.defaultKeyConfigs=t.extend(this.defaultKeyConfigs,this.keyConfigs),this.calendarKeyboardModules=new t.KeyboardEvents(this.calendarElement.children[1].firstElementChild,{eventName:"keydown",keyAction:this.calendarKeyActionHandle.bind(this),keyConfigs:this.defaultKeyConfigs})),this.isPopupClicked=!1}},a.prototype.documentHandler=function(i){!t.isNullOrUndefined(this.popupObj)&&(this.inputWrapper.container.contains(i.target)||this.popupObj.element&&this.popupObj.element.contains(i.target))&&"touchstart"!==i.type&&i.preventDefault();var s=i.target;t.closest(s,".e-datepicker.e-popup-wrapper")||t.closest(s,".e-input-group")===this.inputWrapper.container||s.classList.contains("e-day")?t.closest(s,".e-datepicker.e-popup-wrapper")&&(s.classList.contains("e-day")&&!t.isNullOrUndefined(i.target.parentElement)&&i.target.parentElement.classList.contains("e-selected")&&t.closest(s,".e-content")&&t.closest(s,".e-content").classList.contains("e-"+this.depth.toLowerCase())?this.hide(i):t.closest(s,".e-footer-container")&&s.classList.contains("e-today")&&s.classList.contains("e-btn")&&+new Date(+this.value)==+e.prototype.generateTodayVal.call(this,this.value)&&!this.isBlazorServer&&this.hide(i)):(this.hide(i),this.focusOut())},a.prototype.inputKeyActionHandle=function(e){var t=this.currentView();switch(e.action){case"altUpArrow":this.isAltKeyPressed=!1,this.hide(e),this.inputElement.focus();break;case"altDownArrow":this.isAltKeyPressed=!0,this.isBlazorServer?this.interopAdaptor.invokeMethodAsync("OnStrictModeUpdate",this.inputElement.value):(this.strictModeUpdate(),this.updateInput(),this.changeTrigger(e)),"datepicker"===this.getModuleName()&&(this.isBlazorServer?this.interopAdaptor.invokeMethodAsync("OnPopupHide",!0):this.show(null,e));break;case"escape":this.hide(e);break;case"enter":this.isBlazorServer?this.interopAdaptor.invokeMethodAsync("OnStrictModeUpdate",this.inputElement.value):(this.strictModeUpdate(),this.updateInput(),this.popupUpdate(),this.changeTrigger(e),this.errorClass()),this.isCalendar()||document.activeElement!==this.inputElement||this.hide(e),this.isCalendar()&&(e.preventDefault(),e.stopPropagation());break;case"tab":case"shiftTab":var i=this.inputElement.selectionStart,s=this.inputElement.selectionEnd;if(this.enableMask&&!this.popupObj&&!this.readonly){var a=this.inputElement.value.length;(0==i&&s==a||s!==a&&"tab"==e.action||0!==i&&"shiftTab"==e.action)&&e.preventDefault(),this.notify("keyDownHandler",{module:"MaskedDateTime",e:e}),i=this.inputElement.selectionStart,s=this.inputElement.selectionEnd}this.isBlazorServer?this.interopAdaptor.invokeMethodAsync("OnStrictModeUpdate",this.inputElement.value):(this.strictModeUpdate(),this.updateInput(),this.popupUpdate(),this.changeTrigger(e),this.errorClass()),this.enableMask&&(this.inputElement.selectionStart=i,this.inputElement.selectionEnd=s),this.hide(e);break;default:this.defaultAction(e),"select"===e.action&&t===this.depth&&this.hide(e)}},a.prototype.defaultAction=function(i){this.previousDate=!t.isNullOrUndefined(this.value)&&new Date(+this.value)||null,this.isCalendar()&&(e.prototype.keyActionHandle.call(this,i),!this.isBlazorServer&&this.isCalendar()&&t.attributes(this.inputElement,{"aria-activedescendant":""+this.setActiveDescendant()}))},a.prototype.popupUpdate=function(){if((t.isNullOrUndefined(this.value)&&!t.isNullOrUndefined(this.previousDate)||+this.value!=+this.previousDate)&&(this.popupObj&&this.popupObj.element.querySelectorAll(".e-selected").length>0&&t.removeClass(this.popupObj.element.querySelectorAll(".e-selected"),["e-selected"]),!t.isNullOrUndefined(this.value)&&!this.isBlazorServer&&+this.value>=+this.min&&+this.value<=+this.max)){var i=new Date(this.checkValue(this.value));e.prototype.navigateTo.call(this,"Month",i)}},a.prototype.strictModeUpdate=function(){var e,i;e="datetimepicker"===this.getModuleName()?t.isNullOrUndefined(this.formatString)?this.dateTimeFormat:this.formatString:t.isNullOrUndefined(this.formatString)?this.formatString:this.formatString.replace("dd","d"),t.isNullOrUndefined(e)||e.split("M").length-1<3&&(e=e.replace("MM","M"));var s;s="datetimepicker"===this.getModuleName()?"Gregorian"===this.calendarMode?{format:t.isNullOrUndefined(this.formatString)?this.dateTimeFormat:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:t.isNullOrUndefined(this.formatString)?this.dateTimeFormat:this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"}:i="Gregorian"===this.calendarMode?{format:e,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:e,type:"dateTime",skeleton:"yMd",calendar:"islamic"};var a;"string"==typeof this.inputElement.value&&(this.inputElement.value=this.inputElement.value.trim()),"datetimepicker"===this.getModuleName()?this.checkDateValue(this.globalize.parseDate(this.inputElement.value,s))?a=this.globalize.parseDate(this.inputElement.value,s):(i="Gregorian"===this.calendarMode?{type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{type:"dateTime",skeleton:"yMd",calendar:"islamic"},a=this.globalize.parseDate(this.inputElement.value,i)):(a=this.globalize.parseDate(this.inputElement.value,s),a=!t.isNullOrUndefined(a)&&isNaN(+a)?null:a,!t.isNullOrUndefined(this.formatString)&&""!==this.inputElement.value&&this.strictMode&&(this.isPopupClicked||!this.isPopupClicked&&this.inputElement.value===this.previousElementValue)&&-1===this.formatString.indexOf("y")&&a.setFullYear(this.value.getFullYear())),"datepicker"===this.getModuleName()&&this.value&&!isNaN(+this.value)&&a&&a.setHours(this.value.getHours(),this.value.getMinutes(),this.value.getSeconds(),this.value.getMilliseconds()),this.strictMode&&a?(this.updateInputValue(this.globalize.formatDate(a,s)),this.inputElement.value!==this.previousElementValue&&this.setProperties({value:a},!0)):this.strictMode||this.inputElement.value!==this.previousElementValue&&this.setProperties({value:a},!0),this.strictMode&&!a&&""===this.inputElement.value&&this.setProperties({value:null},!0),isNaN(+this.value)&&this.setProperties({value:null},!0),t.isNullOrUndefined(this.value)&&(this.currentDate=new Date((new Date).setHours(0,0,0,0)))},a.prototype.createCalendar=function(){var e=this;this.isBlazorServer?(this.popupWrapper=this.inputWrapper.container.nextElementSibling,this.calendarElement=this.popupWrapper.firstElementChild,this.tableBodyElement=t.select("tbody",this.calendarElement),this.contentElement=t.select(".e-content",this.calendarElement)):(this.popupWrapper=this.createElement("div",{className:D+" e-popup-wrapper"}),t.isNullOrUndefined(this.cssClass)||(this.popupWrapper.className+=" "+this.cssClass)),t.Browser.isDevice&&(this.modelHeader(),this.modal=this.createElement("div"),this.modal.className=D+" e-date-modal",document.body.className+=" e-date-overflow",this.modal.style.display="block",document.body.appendChild(this.modal)),this.calendarElement.querySelector("table tbody").className="",this.popupObj=new i.Popup(this.popupWrapper,{content:this.isBlazorServer?null:this.calendarElement,relateTo:t.Browser.isDevice?document.body:this.inputWrapper.container,position:t.Browser.isDevice?{X:"center",Y:"center"}:{X:"left",Y:"bottom"},offsetY:4,targetType:"container",enableRtl:this.enableRtl,zIndex:this.zIndex,collision:t.Browser.isDevice?{X:"fit",Y:"fit"}:{X:"flip",Y:"flip"},open:function(){"datetimepicker"!==e.getModuleName()&&document.activeElement!==e.inputElement&&(e.defaultKeyConfigs=t.extend(e.defaultKeyConfigs,e.keyConfigs),e.calendarElement.children[1].firstElementChild.focus(),e.calendarKeyboardModules=new t.KeyboardEvents(e.calendarElement.children[1].firstElementChild,{eventName:"keydown",keyAction:e.calendarKeyActionHandle.bind(e),keyConfigs:e.defaultKeyConfigs}),e.calendarKeyboardModules=new t.KeyboardEvents(e.inputWrapper.container.children[e.index],{eventName:"keydown",keyAction:e.calendarKeyActionHandle.bind(e),keyConfigs:e.defaultKeyConfigs}))},close:function(){e.isDateIconClicked&&e.inputWrapper.container.children[e.index].focus(),e.value&&!e.isBlazorServer&&e.disabledDates(),e.popupObj&&e.popupObj.destroy(),e.resetCalendar(),t.detach(e.popupWrapper),e.popupObj=e.popupWrapper=null,e.preventArgs=null,e.calendarKeyboardModules=null,e.setAriaAttributes()},targetExitViewport:function(){t.Browser.isDevice||e.hide()}}),this.isBlazorServer||(this.popupObj.element.className+=" "+this.cssClass),this.setAriaAttributes()},a.prototype.setAriaDisabled=function(){this.enabled?(this.inputElement.setAttribute("aria-disabled","false"),this.inputElement.setAttribute("tabindex",this.tabIndex)):(this.inputElement.setAttribute("aria-disabled","true"),this.inputElement.tabIndex=-1)},a.prototype.modelHeader=function(){var e,t=this.createElement("div",{className:"e-model-header"}),i=this.createElement("h1",{className:"e-model-year"}),s=this.createElement("div"),a=this.createElement("span",{className:"e-model-day"}),n=this.createElement("span",{className:"e-model-month"});e="Gregorian"===this.calendarMode?{format:"y",skeleton:"dateTime"}:{format:"y",skeleton:"dateTime",calendar:"islamic"},i.textContent=""+this.globalize.formatDate(this.value||new Date,e),e="Gregorian"===this.calendarMode?{format:"E",skeleton:"dateTime"}:{format:"E",skeleton:"dateTime",calendar:"islamic"},a.textContent=this.globalize.formatDate(this.value||new Date,e)+", ",e="Gregorian"===this.calendarMode?{format:"MMM d",skeleton:"dateTime"}:{format:"MMM d",skeleton:"dateTime",calendar:"islamic"},n.textContent=""+this.globalize.formatDate(this.value||new Date,e),t.appendChild(i),s.appendChild(a),s.appendChild(n),t.appendChild(s),this.calendarElement.insertBefore(t,this.calendarElement.firstElementChild)},a.prototype.changeTrigger=function(e){this.inputElement.value!==this.previousElementValue&&(this.previousDate&&this.previousDate.valueOf())!==(this.value&&this.value.valueOf())&&(this.isDynamicValueChanged&&this.isCalendar()&&this.popupUpdate(),this.changedArgs.value=this.value,this.changedArgs.event=e||null,this.changedArgs.element=this.element,this.changedArgs.isInteracted=!t.isNullOrUndefined(e),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",this.changedArgs),this.previousElementValue=this.inputElement.value,this.previousDate=isNaN(+new Date(this.checkValue(this.value)))?null:new Date(this.checkValue(this.value)),this.isInteracted=!0)},a.prototype.navigatedEvent=function(){this.trigger("navigated",this.navigatedArgs)},a.prototype.changeEvent=function(e){(this.previousDate&&this.previousDate.valueOf())!==(this.value&&this.value.valueOf())&&(this.selectCalendar(e),this.changedArgs.event=e||null,this.changedArgs.element=this.element,this.changedArgs.isInteracted=this.isInteracted,this.isDynamicValueChanged||this.trigger("change",this.changedArgs),this.previousDate=this.value&&new Date(+this.value),this.isDynamicValueChanged||this.hide(e),this.previousElementValue=this.inputElement.value,this.errorClass())},a.prototype.requiredModules=function(){var e=[];return this&&e.push({args:[this],member:"islamic"}),this.enableMask&&e.push({args:[this],member:"MaskedDateTime"}),e},a.prototype.selectCalendar=function(e){var i,s,a;s="datetimepicker"===this.getModuleName()&&t.isNullOrUndefined(this.formatString)?this.dateTimeFormat:this.formatString,this.value&&("datetimepicker"===this.getModuleName()?(a="Gregorian"===this.calendarMode?{format:s,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:s,type:"dateTime",skeleton:"yMd",calendar:"islamic"},i=this.globalize.formatDate(this.changedArgs.value,a)):(a="Gregorian"===this.calendarMode?{format:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"},i=this.globalize.formatDate(this.changedArgs.value,a)),this.enableMask&&this.notify("createMask",{module:"MaskedDateTime"})),t.isNullOrUndefined(i)||(this.updateInputValue(i),this.enableMask&&this.notify("setMaskSelection",{module:"MaskedDateTime"}))},a.prototype.isCalendar=function(){return!(!this.popupWrapper||!this.popupWrapper.classList.contains("e-popup-wrapper"))},a.prototype.setWidth=function(e){this.inputWrapper.container.style.width="number"==typeof e?t.formatUnit(this.width):"string"==typeof e?e.match(/px|%|em/)?this.width:t.formatUnit(this.width):"100%"},a.prototype.show=function(i,s){var a=this;if(!(this.enabled&&this.readonly||!this.enabled||this.popupObj)){var n=!0,r=void 0;t.isNullOrUndefined(this.value)||+this.value>=+this.min&&+this.value<=+this.max?r=this.value||null:(r=new Date(this.checkValue(this.value)),this.isBlazorServer||this.setProperties({value:null},!0)),this.isCalendar()||(this.isBlazorServer||(e.prototype.render.call(this),this.setProperties({value:r||null},!0)),this.previousDate=r,this.createCalendar()),t.Browser.isDevice&&(this.mobilePopupWrapper=this.createElement("div",{className:"e-datepick-mob-popup-wrap"}),document.body.appendChild(this.mobilePopupWrapper)),this.preventArgs={preventDefault:function(){n=!1},popup:t.isBlazor()&&this.isServerRendered?null:this.popupObj,event:s||null,cancel:!1,appendTo:t.Browser.isDevice?this.mobilePopupWrapper:document.body};var l=this.preventArgs;this.trigger("open",l,function(i){if(a.preventArgs=i,n&&!a.preventArgs.cancel){a.isBlazorServer&&(a.popupWrapper.style.visibility="",a.popupWrapper.style.width="auto",a.popupWrapper.style.height="auto"),t.addClass(a.inputWrapper.buttons,"e-active"),a.preventArgs.appendTo.appendChild(a.popupWrapper),a.popupObj.refreshPosition(a.inputElement);var s={name:"FadeIn",duration:t.Browser.isDevice?0:300};1e3===a.zIndex?a.popupObj.show(new t.Animation(s),a.element):a.popupObj.show(new t.Animation(s),null),a.isBlazorServer||e.prototype.setOverlayIndex.call(a,a.mobilePopupWrapper,a.popupObj.element,a.modal,t.Browser.isDevice),a.setAriaAttributes()}else a.popupObj.destroy(),a.isBlazorServer&&a.interopAdaptor.invokeMethodAsync("OnPopupHide",!1),a.popupWrapper=a.popupObj=null;t.isNullOrUndefined(a.inputElement)||""!==a.inputElement.value||!t.isNullOrUndefined(a.tableBodyElement)&&a.tableBodyElement.querySelectorAll("td.e-selected").length>0&&(t.addClass([a.tableBodyElement.querySelector("td.e-selected")],"e-focused-date"),t.removeClass(a.tableBodyElement.querySelectorAll("td.e-selected"),"e-selected")),t.EventHandler.add(document,"mousedown touchstart",a.documentHandler,a)})}},a.prototype.hide=function(e){var i=this;if(t.isNullOrUndefined(this.popupWrapper))t.Browser.isDevice&&this.allowEdit&&!this.readonly&&this.inputElement.removeAttribute("readonly"),this.setAllowEdit();else{var s=!0;this.preventArgs={preventDefault:function(){s=!1},popup:t.isBlazor()&&this.isServerRendered?null:this.popupObj,event:e||null,cancel:!1},t.removeClass(this.inputWrapper.buttons,"e-active"),t.removeClass([document.body],"e-date-overflow");var a=this.preventArgs;this.isCalendar()?this.trigger("close",a,function(e){i.closeEventCallback(s,e)}):this.closeEventCallback(s,a)}},a.prototype.closeEventCallback=function(e,i){this.preventArgs=i,this.isCalendar()&&e&&!this.preventArgs.cancel&&(this.isBlazorServer?(this.interopAdaptor.invokeMethodAsync("OnPopupHide",!1),this.isAltKeyPressed=!1,this.popupWrapper=this.popupObj=null):(this.popupObj.hide(),this.isAltKeyPressed=!1,this.keyboardModule.destroy()),t.removeClass(this.inputWrapper.buttons,"e-active")),this.setAriaAttributes(),t.Browser.isDevice&&this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null),t.Browser.isDevice&&(t.isNullOrUndefined(this.mobilePopupWrapper)||(this.mobilePopupWrapper.remove(),this.mobilePopupWrapper=null)),t.EventHandler.remove(document,"mousedown touchstart",this.documentHandler),t.Browser.isDevice&&this.allowEdit&&!this.readonly&&this.inputElement.removeAttribute("readonly"),this.setAllowEdit()},a.prototype.focusIn=function(e){document.activeElement!==this.inputElement&&this.enabled&&(this.inputElement.focus(),t.addClass([this.inputWrapper.container],["e-input-focus"]))},a.prototype.focusOut=function(){document.activeElement===this.inputElement&&(t.removeClass([this.inputWrapper.container],["e-input-focus"]),this.inputElement.blur())},a.prototype.currentView=function(){var t;return this.calendarElement&&(t=e.prototype.currentView.call(this)),t},a.prototype.navigateTo=function(t,i){this.calendarElement&&e.prototype.navigateTo.call(this,t,i)},a.prototype.destroy=function(){this.unBindEvents(),this.isBlazorServer||(e.prototype.destroy.call(this),this.keyboardModules.destroy(),this.popupObj&&this.popupObj.element.classList.contains("e-popup")&&e.prototype.destroy.call(this));var i={"aria-live":"assertive","aria-atomic":"true","aria-disabled":"true","aria-haspopup":"true","aria-activedescendant":"null","aria-owns":this.element.id+"_options","aria-expanded":"false",role:"combobox",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false"};this.inputElement&&(s.Input.removeAttributes(i,this.inputElement),t.isNullOrUndefined(this.inputElementCopy.getAttribute("tabindex"))?this.inputElement.removeAttribute("tabindex"):this.inputElement.setAttribute("tabindex",this.tabIndex),t.EventHandler.remove(this.inputElement,"blur",this.inputBlurHandler),t.EventHandler.remove(this.inputElement,"focus",this.inputFocusHandler),this.ensureInputAttribute()),this.isCalendar()&&(this.popupWrapper&&t.detach(this.popupWrapper),this.popupObj=this.popupWrapper=null,this.isBlazorServer||this.keyboardModule.destroy()),null===this.ngTag&&(this.inputElement&&(this.inputWrapper.container.insertAdjacentElement("afterend",this.inputElement),t.removeClass([this.inputElement],["e-input"])),t.removeClass([this.element],[D]),t.detach(this.inputWrapper.container)),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.resetFormHandler)},a.prototype.ensureInputAttribute=function(){for(var e=[],i=0;i<this.inputElement.attributes.length;i++)e[i]=this.inputElement.attributes[i].name;for(i=0;i<e.length;i++)t.isNullOrUndefined(this.inputElementCopy.getAttribute(e[i]))?("value"===e[i].toLowerCase()&&(this.inputElement.value=""),this.inputElement.removeAttribute(e[i])):("value"===e[i].toLowerCase()&&(this.inputElement.value=this.inputElementCopy.getAttribute(e[i])),this.inputElement.setAttribute(e[i],this.inputElementCopy.getAttribute(e[i])))},a.prototype.preRender=function(){this.inputElementCopy=this.element.cloneNode(!0),t.removeClass([this.inputElementCopy],[D,"e-control","e-lib"]),this.inputElement=this.element,this.formElement=t.closest(this.inputElement,"form"),this.index=this.showClearButton?2:1,this.isBlazorServer=!(!t.isBlazor()||!this.isServerRendered||"datepicker"!==this.getModuleName()),this.isBlazorServer||(this.ngTag=null,"EJS-DATEPICKER"!==this.element.tagName&&"EJS-DATETIMEPICKER"!==this.element.tagName||(this.ngTag=this.element.tagName,this.inputElement=this.createElement("input"),this.element.appendChild(this.inputElement)),this.element.getAttribute("id")?null!==this.ngTag&&(this.inputElement.id=this.element.getAttribute("id")+"_input"):"datetimepicker"===this.getModuleName()?(this.element.id=t.getUniqueID("ej2-datetimepicker"),null!==this.ngTag&&t.attributes(this.inputElement,{id:this.element.id+"_input"})):(this.element.id=t.getUniqueID("ej2-datepicker"),null!==this.ngTag&&t.attributes(this.inputElement,{id:this.element.id+"_input"})),null!==this.ngTag&&this.validationAttribute(this.element,this.inputElement),this.updateHtmlAttributeToElement()),this.defaultKeyConfigs=this.getDefaultKeyConfig(),this.checkHtmlAttributes(!1),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.isBlazorServer||(this.element.removeAttribute("tabindex"),e.prototype.preRender.call(this))},a.prototype.getDefaultKeyConfig=function(){return this.defaultKeyConfigs={altUpArrow:"alt+uparrow",altDownArrow:"alt+downarrow",escape:"escape",enter:"enter",controlUp:"ctrl+38",controlDown:"ctrl+40",moveDown:"downarrow",moveUp:"uparrow",moveLeft:"leftarrow",moveRight:"rightarrow",select:"enter",home:"home",end:"end",pageUp:"pageup",pageDown:"pagedown",shiftPageUp:"shift+pageup",shiftPageDown:"shift+pagedown",controlHome:"ctrl+home",controlEnd:"ctrl+end",shiftTab:"shift+tab",tab:"tab"},this.defaultKeyConfigs},a.prototype.validationAttribute=function(e,i){var s=e.getAttribute("name")?e.getAttribute("name"):e.getAttribute("id");i.setAttribute("name",s),e.removeAttribute("name");for(var a=["required","aria-required","form"],n=0;n<a.length;n++)if(!t.isNullOrUndefined(e.getAttribute(a[n]))){var r=e.getAttribute(a[n]);i.setAttribute(a[n],r),e.removeAttribute(a[n])}},a.prototype.checkFormat=function(){var e=new t.Internationalization(this.locale);if(this.format)if("string"==typeof this.format)this.formatString=t.isBlazor()?this.format.replace(/tt/,"a"):this.format;else if(""===this.format.skeleton||t.isNullOrUndefined(this.format.skeleton))"datetimepicker"===this.getModuleName()?this.formatString=this.dateTimeFormat:this.formatString=null;else{var i=this.format.skeleton;"datetimepicker"===this.getModuleName()?this.formatString=e.getDatePattern({skeleton:i,type:"dateTime"}):this.formatString=e.getDatePattern({skeleton:i,type:"date"})}else this.formatString=null},a.prototype.checkHtmlAttributes=function(e){this.globalize=new t.Internationalization(this.locale),this.checkFormat(),this.checkView();var i,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["value","min","max","disabled","readonly","style","name","placeholder","type"];i="datetimepicker"===this.getModuleName()?"Gregorian"===this.calendarMode?{format:t.isNullOrUndefined(this.formatString)?this.dateTimeFormat:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:t.isNullOrUndefined(this.formatString)?this.dateTimeFormat:this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"}:"Gregorian"===this.calendarMode?{format:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"};for(var a=0,n=s;a<n.length;a++){var r=n[a];if(!t.isNullOrUndefined(this.inputElement.getAttribute(r)))switch(r){case"disabled":if((t.isNullOrUndefined(this.datepickerOptions)||void 0===this.datepickerOptions.enabled||e)&&!this.isBlazorServer){var l="disabled"!==this.inputElement.getAttribute(r)&&""!==this.inputElement.getAttribute(r)&&"true"!==this.inputElement.getAttribute(r);this.setProperties({enabled:l},!e)}break;case"readonly":if((t.isNullOrUndefined(this.datepickerOptions)||void 0===this.datepickerOptions.readonly||e)&&!this.isBlazorServer){var o="readonly"===this.inputElement.getAttribute(r)||""===this.inputElement.getAttribute(r)||"true"===this.inputElement.getAttribute(r);this.setProperties({readonly:o},!e)}break;case"placeholder":!t.isNullOrUndefined(this.datepickerOptions)&&void 0!==this.datepickerOptions.placeholder&&!e||this.isBlazorServer||this.setProperties({placeholder:this.inputElement.getAttribute(r)},!e);break;case"style":this.isBlazorServer||this.inputElement.setAttribute("style",""+this.inputElement.getAttribute(r));break;case"name":this.isBlazorServer||this.inputElement.setAttribute("name",""+this.inputElement.getAttribute(r));break;case"value":if((t.isNullOrUndefined(this.datepickerOptions)||void 0===this.datepickerOptions.value||e)&&!this.isBlazorServer){var h=this.inputElement.getAttribute(r);this.setProperties(t.setValue(r,this.globalize.parseDate(h,i),{}),!e)}break;case"min":if(+this.min==+new Date(1900,0,1)||e){var u=this.inputElement.getAttribute(r);this.setProperties(t.setValue(r,this.globalize.parseDate(u),{}),!e)}break;case"max":if(+this.max==+new Date(2099,11,31)||e){var d=this.inputElement.getAttribute(r);this.setProperties(t.setValue(r,this.globalize.parseDate(d),{}),!e)}break;case"type":"text"===this.inputElement.getAttribute(r)||this.isBlazorServer||this.inputElement.setAttribute("type","text")}}},a.prototype.getModuleName=function(){return"datepicker"},a.prototype.disabledDates=function(){var i,s=this.checkDateValue(this.value)?new Date(+this.value):new Date(this.checkValue(this.value)),a=this.previousDate;this.minMaxUpdates(),this.isBlazorServer||e.prototype.render.call(this),this.previousDate=a;var n=s&&+s,r='*[id^="/id"]'.replace("/id",""+n);this.strictMode||("string"==typeof this.value||"object"==typeof this.value&&+this.value!=+s)&&this.setProperties({value:s},!0),t.isNullOrUndefined(this.calendarElement.querySelectorAll(r)[0])||this.calendarElement.querySelectorAll(r)[0].classList.contains("e-disabled")&&(this.strictMode||(this.currentDate=new Date((new Date).setHours(0,0,0,0))));var l;"datetimepicker"===this.getModuleName()?l="Gregorian"===this.calendarMode?this.globalize.formatDate(s,{format:t.isNullOrUndefined(this.formatString)?this.dateTimeFormat:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}):this.globalize.formatDate(s,{format:t.isNullOrUndefined(this.formatString)?this.dateTimeFormat:this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"}):(i="Gregorian"===this.calendarMode?{format:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"},l=this.globalize.formatDate(s,i)),this.popupObj||(this.updateInputValue(l),this.enableMask&&(this.updateInputValue(this.maskedDateValue),this.notify("createMask",{module:"MaskedDateTime"})))},a.prototype.setAriaAttributes=function(){if(this.isBlazorServer)if(this.isCalendar()){var e=this.tableBodyElement.querySelector("tr td.e-focused-date"),i=this.tableBodyElement.querySelector("tr td.e-selected"),a=e||i?(e||i).getAttribute("id"):"null";t.attributes(this.inputElement,{"aria-activedescendant":""+a})}else t.attributes(this.inputElement,{"aria-activedescendant":"null"});else this.isCalendar()?(s.Input.addAttributes({"aria-expanded":"true"},this.inputElement),t.attributes(this.inputElement,{"aria-activedescendant":""+this.setActiveDescendant()})):(s.Input.addAttributes({"aria-expanded":"false"},this.inputElement),t.attributes(this.inputElement,{"aria-activedescendant":"null"}))},a.prototype.errorClass=function(){var e='*[id^="/id"]'.replace("/id",""+ +this.value),i=this.calendarElement&&this.calendarElement.querySelectorAll(e)[0]&&this.calendarElement.querySelectorAll(e)[0].classList.contains("e-disabled");!t.isNullOrUndefined(this.value)&&!(+new Date(+this.value).setMilliseconds(0)>=+this.min&&+new Date(+this.value).setMilliseconds(0)<=+this.max)||!this.strictMode&&""!==this.inputElement.value&&this.inputElement.value!==this.maskedDateValue&&t.isNullOrUndefined(this.value)||i?(t.addClass([this.inputWrapper.container],"e-error"),t.attributes(this.inputElement,{"aria-invalid":"true"})):(t.removeClass([this.inputWrapper.container],"e-error"),t.attributes(this.inputElement,{"aria-invalid":"false"}))},a.prototype.onPropertyChanged=function(i,a){for(var n=0,r=Object.keys(i);n<r.length;n++){switch(r[n]){case"value":this.isDynamicValueChanged=!0,this.isInteracted=!1,this.invalidValueString=null,this.isBlazorServer||this.checkInvalidValue(i.value),i.value=this.value,this.previousElementValue=this.inputElement.value,this.isBlazorServer||(t.isNullOrUndefined(this.value)&&(this.updateInputValue(""),this.currentDate=new Date((new Date).setHours(0,0,0,0))),this.updateInput(!0),+this.previousDate!=+this.value&&this.changeTrigger(null)),this.isInteracted=!0,this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange,this.enableMask&&this.notify("createMask",{module:"MaskedDateTime"});break;case"format":this.checkFormat(),this.bindInputEvent(),this.isBlazorServer||(this.updateInput(),this.enableMask&&(this.notify("createMask",{module:"MaskedDateTime"}),this.value||this.updateInputValue(this.maskedDateValue)));break;case"allowEdit":this.setAllowEdit();break;case"placeholder":s.Input.setPlaceholder(this.placeholder,this.inputElement);break;case"readonly":s.Input.setReadonly(this.readonly,this.inputElement);break;case"enabled":s.Input.setEnabled(this.enabled,this.inputElement),this.setAriaDisabled();break;case"htmlAttributes":this.updateHtmlAttributeToElement(),this.updateHtmlAttributeToWrapper(),this.checkHtmlAttributes(!0);break;case"locale":this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),s.Input.setPlaceholder(this.placeholder,this.inputElement),this.isBlazorServer||(this.updateInput(),this.enableMask&&this.notify("createMask",{module:"MaskedDateTime"}));break;case"enableRtl":s.Input.setEnableRtl(this.enableRtl,[this.inputWrapper.container]);break;case"start":case"depth":this.checkView(),this.calendarElement&&!this.isBlazorServer&&e.prototype.onPropertyChanged.call(this,i,a);break;case"zIndex":this.setProperties({zIndex:i.zIndex},!0);break;case"cssClass":this.updateCssClass(i.cssClass,a.cssClass);break;case"showClearButton":s.Input.setClearButton(this.showClearButton,this.inputElement,this.inputWrapper),this.bindClearEvent(),this.index=this.showClearButton?2:1;break;case"strictMode":this.invalidValueString=null,this.isBlazorServer||this.updateInput();break;case"width":this.setWidth(i.width);break;case"floatLabelType":this.floatLabelType=i.floatLabelType,s.Input.removeFloating(this.inputWrapper),s.Input.addFloating(this.inputElement,this.floatLabelType,this.placeholder);break;case"enableMask":this.enableMask?(this.notify("createMask",{module:"MaskedDateTime"}),this.updateInputValue(this.maskedDateValue),this.bindInputEvent()):this.inputElement.value===this.maskedDateValue&&this.updateInputValue("");break;default:this.calendarElement&&!this.isBlazorServer&&this.isCalendar()&&e.prototype.onPropertyChanged.call(this,i,a)}this.isDynamicValueChanged||this.hide(null),this.isDynamicValueChanged=!1}},b([t.Property(null)],a.prototype,"width",void 0),b([t.Property(null)],a.prototype,"value",void 0),b([t.Property(null)],a.prototype,"cssClass",void 0),b([t.Property(!1)],a.prototype,"strictMode",void 0),b([t.Property(null)],a.prototype,"format",void 0),b([t.Property(!0)],a.prototype,"enabled",void 0),b([t.Property({})],a.prototype,"htmlAttributes",void 0),b([t.Property(null)],a.prototype,"values",void 0),b([t.Property(!1)],a.prototype,"isMultiSelection",void 0),b([t.Property(!0)],a.prototype,"showClearButton",void 0),b([t.Property(!0)],a.prototype,"allowEdit",void 0),b([t.Property(null)],a.prototype,"keyConfigs",void 0),b([t.Property(!1)],a.prototype,"enablePersistence",void 0),b([t.Property(1e3)],a.prototype,"zIndex",void 0),b([t.Property(!1)],a.prototype,"readonly",void 0),b([t.Property(null)],a.prototype,"placeholder",void 0),b([t.Property("Never")],a.prototype,"floatLabelType",void 0),b([t.Property(null)],a.prototype,"serverTimezoneOffset",void 0),b([t.Property(!1)],a.prototype,"openOnFocus",void 0),b([t.Property(!1)],a.prototype,"enableMask",void 0),b([t.Property({day:"day",month:"month",year:"year",hour:"hour",minute:"minute",second:"second",dayOfTheWeek:"day of the week"})],a.prototype,"maskPlaceholder",void 0),b([t.Event()],a.prototype,"open",void 0),b([t.Event()],a.prototype,"cleared",void 0),b([t.Event()],a.prototype,"close",void 0),b([t.Event()],a.prototype,"blur",void 0),b([t.Event()],a.prototype,"focus",void 0),b([t.Event()],a.prototype,"created",void 0),b([t.Event()],a.prototype,"destroyed",void 0),a=b([t.NotifyPropertyChanges],a)}(f),k=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),M=function(e,t,i,s){var a,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(n<3?a(r):n>3?a(t,i,r):a(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},w="e-left-calendar",V="e-right-calendar",O="e-daterangepicker",N="e-active",I="e-start-date",S="e-end-date",A="e-range-hover",x="e-disabled",T="e-calendar",P="e-focused-date",U="e-day-span",H="e-date-disabled",B="e-icon-disabled",W="e-overlay",z="e-list-item",L="e-hover",F=["title","class","style"],j=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return k(i,e),M([t.Property()],i.prototype,"label",void 0),M([t.Property()],i.prototype,"start",void 0),M([t.Property()],i.prototype,"end",void 0),i}(t.ChildProperty),R=function(e){function r(t,i){var s=e.call(this,t,i)||this;return s.isCustomRange=!1,s.isCustomWindow=!1,s.presetsItem=[],s.liCollections=[],s.previousEleValue="",s.isKeyPopup=!1,s.dateDisabled=!1,s.isRangeIconClicked=!1,s.isMaxDaysClicked=!1,s.disabledDays=[],s.preventBlur=!1,s.preventFocus=!1,s.invalidValueString=null,s.isAngular=!1,s.preventChange=!1,s.dateRangeOptions=t,s}return k(r,e),r.prototype.render=function(){this.initialize(),this.setProperties({startDate:this.startValue},!0),this.setProperties({endDate:this.endValue},!0),this.setModelValue(),this.setDataAttribute(!1),this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),this.renderComplete()},r.prototype.preRender=function(){if(this.keyInputConfigs={altDownArrow:"alt+downarrow",escape:"escape",enter:"enter",tab:"tab",altRightArrow:"alt+rightarrow",altLeftArrow:"alt+leftarrow",moveUp:"uparrow",moveDown:"downarrow",spacebar:"space"},this.defaultConstant={placeholder:this.placeholder,startLabel:"Start Date",endLabel:"End Date",customRange:"Custom Range",applyText:"Apply",cancelText:"Cancel",selectedDays:"Selected Days",days:"days"},this.isMobile=window.matchMedia("(max-width:550px)").matches,this.inputElement=this.element,this.angularTag=null,"EJS-DATERANGEPICKER"===this.element.tagName&&(this.angularTag=this.element.tagName,this.inputElement=this.createElement("input"),this.element.appendChild(this.inputElement)),this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],[O,"e-control","e-lib"]),this.updateHtmlAttributeToElement(),this.element.getAttribute("id")?null!==this.angularTag&&(this.inputElement.id=this.element.getAttribute("id")+"_input"):(this.element.id=t.getUniqueID("ej2-datetimepicker"),null!==this.angularTag&&t.attributes(this.inputElement,{id:this.element.id+"_input"})),this.checkInvalidRange(this.value),!this.invalidValueString&&"string"==typeof this.value){var i=this.value.split(" "+this.separator+" ");this.value=[new Date(i[0]),new Date(i[1])]}this.initProperty(),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.removeAttribute("tabindex"),e.prototype.preRender.call(this),this.navNextFunction=this.navNextMonth.bind(this),this.navPrevFunction=this.navPrevMonth.bind(this),this.deviceNavNextFunction=this.deviceNavNext.bind(this),this.deviceNavPrevFunction=this.deviceNavPrevious.bind(this),this.initStartDate=this.checkDateValue(this.startValue),this.initEndDate=this.checkDateValue(this.endValue),this.formElement=t.closest(this.element,"form")},r.prototype.updateValue=function(){this.value&&this.value.length>0?(this.value[0]instanceof Date&&!isNaN(+this.value[0])?(this.setProperties({startDate:this.value[0]},!0),this.startValue=this.value[0]):"string"==typeof this.value[0]?0==+this.value[0]||isNaN(+new Date(this.checkValue(this.value[0])))?(this.startValue=null,this.setValue()):(this.setProperties({startDate:new Date(this.checkValue(this.value[0]))},!0),this.startValue=new Date(this.checkValue(this.value[0]))):(this.startValue=null,this.setValue()),this.value[1]instanceof Date&&!isNaN(+this.value[1])?(this.setProperties({endDate:this.value[1]},!0),this.endValue=this.value[1]):"string"==typeof this.value[1]?0==+this.value[0]||isNaN(+new Date(this.checkValue(this.value[0])))?(this.setProperties({endDate:null},!0),this.endValue=null,this.setValue()):(this.setProperties({endDate:new Date(this.checkValue(this.value[1]))},!0),this.endValue=new Date(this.checkValue(this.value[1])),this.setValue()):(this.setProperties({endDate:null},!0),this.endValue=null,this.setValue())):this.value&&this.value.start?(this.value.start instanceof Date&&!isNaN(+this.value.start)?(this.setProperties({startDate:this.value.start},!0),this.startValue=this.value.start):"string"==typeof this.value.start?(this.setProperties({startDate:new Date(this.checkValue(this.value.start))},!0),this.startValue=new Date(this.checkValue(this.value.start))):(this.startValue=null,this.setValue()),this.value.end instanceof Date&&!isNaN(+this.value.end)?(this.setProperties({endDate:this.value.end},!0),this.endValue=this.value.end):"string"==typeof this.value.end?(this.setProperties({endDate:new Date(this.checkValue(this.value.end))},!0),this.endValue=new Date(this.checkValue(this.value.end)),this.setValue()):(this.setProperties({endDate:null},!0),this.endValue=null,this.setValue())):t.isNullOrUndefined(this.value)&&(this.endValue=this.checkDateValue(new Date(this.checkValue(this.endDate))),this.startValue=this.checkDateValue(new Date(this.checkValue(this.startDate))),this.setValue())},r.prototype.initProperty=function(){this.globalize=new t.Internationalization(this.locale),this.checkFormat(),this.checkView(),(t.isNullOrUndefined(this.firstDayOfWeek)||this.firstDayOfWeek>6||this.firstDayOfWeek<0)&&this.setProperties({firstDayOfWeek:this.globalize.getFirstDayOfWeek()},!0),this.updateValue()},r.prototype.checkFormat=function(){if(this.format)if("string"==typeof this.format)this.formatString=this.format;else if(""===this.format.skeleton||t.isNullOrUndefined(this.format.skeleton))this.formatString=null;else{var e=this.format.skeleton;this.formatString=this.globalize.getDatePattern({skeleton:e,type:"date"})}else this.formatString=null},r.prototype.initialize=function(){null!==this.angularTag&&this.validationAttribute(this.element,this.inputElement),this.checkHtmlAttributes(!1),t.merge(this.defaultKeyConfigs,{shiftTab:"shift+tab"});var e=this.checkDateValue(new Date(this.checkValue(this.startValue)));this.setProperties({startDate:e},!0),this.setProperties({endValue:this.checkDateValue(new Date(this.checkValue(this.endValue)))},!0),this.setValue(),this.setProperties({min:this.checkDateValue(new Date(this.checkValue(this.min)))},!0),this.setProperties({max:this.checkDateValue(new Date(this.checkValue(this.max)))},!0),this.l10n=new t.L10n("daterangepicker",this.defaultConstant,this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.processPresets(),this.createInput(),this.updateHtmlAttributeToWrapper(),this.setRangeAllowEdit(),this.bindEvents()},r.prototype.setDataAttribute=function(e){var t={};if(e)t=this.htmlAttributes;else for(var i=0;i<this.element.attributes.length;i++)t[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name);for(var s=0,a=Object.keys(t);s<a.length;s++){var n=a[s];0===n.indexOf("data")&&(this.firstHiddenChild.setAttribute(n,t[n]),this.secondHiddenChild.setAttribute(n,t[n]))}},r.prototype.setRangeAllowEdit=function(){this.allowEdit?this.readonly||this.inputElement.removeAttribute("readonly"):t.attributes(this.inputElement,{readonly:""}),this.updateClearIconState()},r.prototype.updateClearIconState=function(){this.allowEdit||!this.inputWrapper||this.readonly?this.inputWrapper&&t.removeClass([this.inputWrapper.container],["e-non-edit"]):""===this.inputElement.value?t.removeClass([this.inputWrapper.container],["e-non-edit"]):t.addClass([this.inputWrapper.container],["e-non-edit"])},r.prototype.validationAttribute=function(e,i){var s=e.getAttribute("name")?e.getAttribute("name"):e.getAttribute("id");i.setAttribute("name",s),e.removeAttribute("name");for(var a=["required","aria-required","form"],n=0;n<a.length;n++)if(!t.isNullOrUndefined(e.getAttribute(a[n]))){var r=e.getAttribute(a[n]);i.setAttribute(a[n],r),e.removeAttribute(a[n])}},r.prototype.updateHtmlAttributeToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(F.indexOf(s)>-1)if("class"===s){var a=this.htmlAttributes[s].replace(/\s+/g," ").trim();""!==a&&t.addClass([this.inputWrapper.container],a.split(" "))}else if("style"===s){var n=this.inputWrapper.container.getAttribute(s);n=t.isNullOrUndefined(n)?this.htmlAttributes[s]:n+this.htmlAttributes[s],this.inputWrapper.container.setAttribute(s,n)}else this.inputWrapper.container.setAttribute(s,this.htmlAttributes[s])}},r.prototype.updateHtmlAttributeToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];F.indexOf(s)<0&&this.inputElement.setAttribute(s,this.htmlAttributes[s])}},r.prototype.updateCssClass=function(e,i){t.isNullOrUndefined(i)||(i=i.replace(/\s+/g," ").trim()),t.isNullOrUndefined(e)||(e=e.replace(/\s+/g," ").trim()),s.Input.setCssClass(e,[this.inputWrapper.container],i),this.popupWrapper&&s.Input.setCssClass(e,[this.popupWrapper],i)},r.prototype.processPresets=function(){this.presetsItem=[];var e=0;if(!t.isUndefined(this.presets[0].start&&this.presets[0].end&&this.presets[0].label)){for(var i=0,s=this.presets;i<s.length;i++){var a=s[i],n=a.label.replace(/\s+/g,"")+"_"+ ++e;"string"==typeof a.end?this.presetsItem.push({id:n,text:a.label,end:new Date(this.checkValue(a.end)),start:new Date(this.checkValue(a.start))}):this.presetsItem.push({id:n,text:a.label,start:a.start,end:a.end})}var r=t.isNullOrUndefined(this.startValue)?null:new Date(+this.startValue),l=t.isNullOrUndefined(this.endValue)?null:new Date(+this.endValue);this.presetsItem.push({id:"custom_range",text:this.l10n.getConstant("customRange"),start:r,end:l}),t.isNullOrUndefined(this.startValue)||t.isNullOrUndefined(this.endValue)||(this.isCustomRange=!0,this.activeIndex=this.presetsItem.length-1)}},r.prototype.bindEvents=function(){t.EventHandler.add(this.inputWrapper.buttons[0],"mousedown",this.rangeIconHandler,this),t.EventHandler.add(this.inputElement,"focus",this.inputFocusHandler,this),t.EventHandler.add(this.inputElement,"blur",this.inputBlurHandler,this),t.EventHandler.add(this.inputElement,"change",this.inputChangeHandler,this),this.showClearButton&&this.inputWrapper.clearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown",this.resetHandler,this),this.isMobile||(this.keyInputConfigs=t.extend(this.keyInputConfigs,this.keyConfigs),this.inputKeyboardModule=new t.KeyboardEvents(this.inputElement,{eventName:"keydown",keyAction:this.inputHandler.bind(this),keyConfigs:this.keyInputConfigs})),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),this.enabled?this.inputElement.setAttribute("tabindex",this.tabIndex):this.inputElement.tabIndex=-1},r.prototype.unBindEvents=function(){t.EventHandler.remove(this.inputWrapper.buttons[0],"mousedown",this.rangeIconHandler),t.EventHandler.remove(this.inputElement,"blur",this.inputBlurHandler),t.EventHandler.remove(this.inputElement,"focus",this.inputFocusHandler),t.EventHandler.remove(this.inputElement,"change",this.inputChangeHandler),this.showClearButton&&this.inputWrapper.clearButton&&t.EventHandler.remove(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler),this.isMobile||t.isNullOrUndefined(this.inputKeyboardModule)||this.inputKeyboardModule.destroy(),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler),this.inputElement.tabIndex=-1},r.prototype.updateHiddenInput=function(){if(this.firstHiddenChild&&this.secondHiddenChild){var e={type:"datetime",skeleton:t.isBlazor()?"d":"yMd"};"string"==typeof this.startDate&&(this.startDate=this.globalize.parseDate(this.startDate,e)),"string"==typeof this.endDate&&(this.endDate=this.globalize.parseDate(this.endDate,e)),this.firstHiddenChild.value=this.startDate&&this.globalize.formatDate(this.startDate,e)||this.inputElement.value,this.secondHiddenChild.value=this.endDate&&this.globalize.formatDate(this.endDate,e)||this.inputElement.value,this.dispatchEvent(this.firstHiddenChild,"focusout"),this.dispatchEvent(this.firstHiddenChild,"change")}},r.prototype.inputChangeHandler=function(e){this.enabled&&(e.stopPropagation(),this.updateHiddenInput())},r.prototype.bindClearEvent=function(){this.showClearButton&&this.inputWrapper.clearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown",this.resetHandler,this)},r.prototype.resetHandler=function(e){if(this.enabled){this.valueType=this.value,e.preventDefault(),this.clear();var t={event:e};this.setProperties({endDate:this.checkDateValue(this.endValue)},!0),this.setProperties({startDate:this.checkDateValue(this.startValue)},!0),this.trigger("cleared",t),this.changeTrigger(e),this.clearRange(),this.hide(e)}},r.prototype.restoreValue=function(){this.previousEleValue=this.inputElement.value,this.previousStartValue=this.startValue,this.previousEndValue=this.endValue,this.valueType=null,this.initStartDate=this.checkDateValue(this.startValue),this.initEndDate=this.checkDateValue(this.endValue),this.setValue(),this.setModelValue()},r.prototype.formResetHandler=function(e){if(this.enabled&&this.formElement&&e.target===this.formElement&&!this.inputElement.disabled){var i=this.inputElement.getAttribute("value");t.isNullOrUndefined(this.startCopy)?(this.setProperties({value:null,startDate:null,endDate:null},!0),this.startValue=this.endValue=null):(t.isNullOrUndefined(this.value)||t.isNullOrUndefined(this.value.start)?(this.setProperties({value:[this.startCopy,this.endCopy]},!0),this.startValue=this.value[0],this.endValue=this.value[1]):(this.setProperties({value:{start:this.startCopy,end:this.endCopy}},!0),this.startValue=this.value.start,this.endValue=this.value.end),this.setProperties({startDate:this.startValue,endDate:this.endValue},!0)),"EJS-DATERANGEPICKER"===this.element.tagName&&(this.setProperties({value:null,startDate:null,endDate:null},!0),i="",this.startValue=this.endValue=null,this.inputElement.setAttribute("value","")),this.restoreValue(),this.inputElement&&(s.Input.setValue(i,this.inputElement,this.floatLabelType,this.showClearButton),this.errorClass())}},r.prototype.clear=function(){null!==this.startValue&&(this.startValue=null),null!==this.endValue&&(this.endValue=null),this.value&&this.value.start&&this.setProperties({value:{start:null,end:null}},!0),null!==this.value&&this.value.length>0&&this.setProperties({value:null},!0),s.Input.setValue("",this.inputElement,this.floatLabelType,this.showClearButton),t.isNullOrUndefined(this.applyButton)||(this.applyButton.disabled=this.applyButton.element.disabled=!0),this.removeSelection()},r.prototype.rangeIconHandler=function(e){this.enabled&&(this.isMobile&&this.inputElement.setAttribute("readonly",""),e.preventDefault(),this.targetElement=null,this.isPopupOpen()&&document.body.contains(this.popupObj.element)?this.applyFunction(e):(this.isRangeIconClicked=!0,this.inputWrapper.container.children[0].focus(),this.show(null,e),this.isMobile||t.isNullOrUndefined(this.leftCalendar)||(this.isRangeIconClicked=!1,this.calendarFocus(),this.isRangeIconClicked=!0),t.addClass([this.inputWrapper.container],["e-input-focus"])))},r.prototype.checkHtmlAttributes=function(e){this.globalize=new t.Internationalization(this.locale);for(var i=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["startDate","endDate","minDays","maxDays","min","max","disabled","readonly","style","name","placeholder","type","value"],s={format:this.formatString,type:"date",skeleton:t.isBlazor()?"d":"yMd"},a=0,n=i;a<n.length;a++){var r=n[a];if(!t.isNullOrUndefined(this.inputElement.getAttribute(r)))switch(r){case"disabled":if(t.isNullOrUndefined(this.dateRangeOptions)||void 0===this.dateRangeOptions.enabled||e){var l="disabled"===this.inputElement.getAttribute(r)||""===this.inputElement.getAttribute(r)||"true"===this.inputElement.getAttribute(r);this.setProperties({enabled:!l},!e)}break;case"readonly":if(t.isNullOrUndefined(this.dateRangeOptions)||void 0===this.dateRangeOptions.readonly||e){var o="readonly"===this.inputElement.getAttribute(r)||"true"===this.inputElement.getAttribute(r)||""===this.inputElement.getAttribute(r);this.setProperties({readonly:o},!e)}break;case"placeholder":(t.isNullOrUndefined(this.dateRangeOptions)||void 0===this.dateRangeOptions.placeholder||e)&&this.setProperties({placeholder:this.inputElement.getAttribute(r)},!e);break;case"value":if(t.isNullOrUndefined(this.dateRangeOptions)||void 0===this.dateRangeOptions.value||e){var h=this.inputElement.getAttribute(r);this.setProperties(t.setValue(r,h,{}),!e)}break;case"style":this.inputElement.setAttribute("style",""+this.inputElement.getAttribute(r));break;case"min":if(t.isNullOrUndefined(this.min)||+this.min==+new Date(1900,0,1)||e){u=this.globalize.parseDate(this.inputElement.getAttribute(r),s);this.setProperties(t.setValue(r,u,{}),!e)}break;case"name":this.inputElement.setAttribute("name",""+this.inputElement.getAttribute(r));break;case"max":if(t.isNullOrUndefined(this.max)||+this.max==+new Date(2099,11,31)||e){u=this.globalize.parseDate(this.inputElement.getAttribute(r),s);this.setProperties(t.setValue(r,u,{}),!e)}break;case"startDate":if(t.isNullOrUndefined(this.startDate)){u=this.globalize.parseDate(this.inputElement.getAttribute(r),s);this.startValue=u,this.setValue()}break;case"endDate":if(t.isNullOrUndefined(this.endDate)){var u=this.globalize.parseDate(this.inputElement.getAttribute(r),s);this.endValue=u,this.setValue()}break;case"minDays":t.isNullOrUndefined(this.minDays)&&this.setProperties(t.setValue(r,parseInt(this.inputElement.getAttribute(r),10),{}),!0);break;case"maxDays":t.isNullOrUndefined(this.maxDays)&&this.setProperties(t.setValue(r,parseInt(this.inputElement.getAttribute(r),10),{}),!0);break;case"type":"text"!==this.inputElement.getAttribute(r)&&this.inputElement.setAttribute("type","text")}}},r.prototype.createPopup=function(){for(e=0;e<this.presetsItem.length;e++)e!==this.presetsItem.length-1&&"custom_range"===this.presetsItem[e].id&&this.presetsItem.splice(e,1);this.activeIndex=this.presetsItem.length-1,this.isCustomRange=!0;for(var e=0;e<=this.presetsItem.length-2;e++){var i=this.presetsItem[e].start,s=this.presetsItem[e].end;this.startValue&&this.endValue&&+new Date(i.setHours(0,0,0,0))==+new Date(this.startValue.setHours(0,0,0,0))&&+new Date(s.setHours(0,0,0,0))==+new Date(this.endValue.setHours(0,0,0,0))&&(this.activeIndex=e,this.isCustomRange=!1)}this.popupWrapper=t.createElement("div",{id:this.element.id+"_popup",className:O+" e-popup"}),this.adjustLongHeaderWidth();var a=!this.isCustomRange||this.isMobile;!t.isUndefined(this.presets[0].start&&this.presets[0].end&&this.presets[0].label)&&a?(this.isCustomWindow=!1,this.createPresets(),this.listRippleEffect(),this.renderPopup()):(this.isCustomWindow=!0,this.renderControl())},r.prototype.renderControl=function(){this.createControl(),this.bindCalendarEvents(),this.updateRange(this.isMobile?[this.calendarElement]:[this.leftCalendar,this.rightCalendar]),t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)||this.disabledDateRender(),this.updateHeader()},r.prototype.clearCalendarEvents=function(){t.EventHandler.clearEvents(this.leftCalPrevIcon),t.EventHandler.clearEvents(this.leftCalNextIcon),t.EventHandler.clearEvents(this.rightCalPrevIcon),t.EventHandler.clearEvents(this.rightCalNextIcon)},r.prototype.updateNavIcons=function(){e.prototype.iconHandler.call(this)},r.prototype.calendarIconEvent=function(){this.clearCalendarEvents(),this.leftCalPrevIcon&&!this.leftCalPrevIcon.classList.contains(x)&&t.EventHandler.add(this.leftCalPrevIcon,"mousedown",this.navPrevFunction),this.leftCalNextIcon&&!this.leftCalNextIcon.classList.contains(x)&&t.EventHandler.add(this.leftCalNextIcon,"mousedown",this.navNextFunction),this.rightCalPrevIcon&&!this.rightCalPrevIcon.classList.contains(x)&&t.EventHandler.add(this.rightCalPrevIcon,"mousedown",this.navPrevFunction),this.rightCalNextIcon&&!this.rightCalNextIcon.classList.contains(x)&&t.EventHandler.add(this.rightCalNextIcon,"mousedown",this.navNextFunction)},r.prototype.bindCalendarEvents=function(){this.isMobile?(this.deviceCalendarEvent(),t.EventHandler.add(this.startButton.element,"click",this.deviceHeaderClick,this),t.EventHandler.add(this.endButton.element,"click",this.deviceHeaderClick,this)):(this.updateNavIcons(),this.calendarIconEvent(),this.calendarIconRipple(),this.headerTitleElement=this.popupObj.element.querySelector(".e-right-calendar .e-header .e-title"),this.headerTitleElement=this.popupObj.element.querySelector(".e-left-calendar .e-header .e-title"),this.defaultKeyConfigs=t.extend(this.defaultKeyConfigs,this.keyConfigs),this.leftKeyboardModule=new t.KeyboardEvents(this.leftCalendar,{eventName:"keydown",keyAction:this.keyInputHandler.bind(this),keyConfigs:this.defaultKeyConfigs}),this.rightKeyboardModule=new t.KeyboardEvents(this.rightCalendar,{eventName:"keydown",keyAction:this.keyInputHandler.bind(this),keyConfigs:this.defaultKeyConfigs})),this.start===this.depth&&this.bindCalendarCellEvents(),this.removeFocusedDate()},r.prototype.calendarIconRipple=function(){t.rippleEffect(this.leftCalPrevIcon,{selector:".e-prev",duration:400,isCenterRipple:!0}),t.rippleEffect(this.leftCalNextIcon,{selector:".e-next",duration:400,isCenterRipple:!0}),t.rippleEffect(this.rightCalPrevIcon,{selector:".e-prev",duration:400,isCenterRipple:!0}),t.rippleEffect(this.rightCalNextIcon,{selector:".e-next",duration:400,isCenterRipple:!0})},r.prototype.deviceCalendarEvent=function(){t.EventHandler.clearEvents(this.nextIcon),t.EventHandler.clearEvents(this.previousIcon),t.rippleEffect(this.nextIcon,{selector:".e-prev",duration:400,isCenterRipple:!0}),t.rippleEffect(this.previousIcon,{selector:".e-next",duration:400,isCenterRipple:!0}),this.nextIcon&&!this.nextIcon.classList.contains(x)&&t.EventHandler.add(this.nextIcon,"mousedown",this.deviceNavNextFunction),this.previousIcon&&!this.previousIcon.classList.contains(x)&&t.EventHandler.add(this.previousIcon,"mousedown",this.deviceNavPrevFunction)},r.prototype.deviceNavNext=function(e){var i=t.closest(e.target,"."+T);this.updateDeviceCalendar(i),this.navigateNext(e),this.deviceNavigation()},r.prototype.deviceNavPrevious=function(e){var i=t.closest(e.target,"."+T);this.updateDeviceCalendar(i),this.navigatePrevious(e),this.deviceNavigation()},r.prototype.updateDeviceCalendar=function(e){e&&(this.previousIcon=e.querySelector(".e-prev"),this.nextIcon=e.querySelector(".e-next"),this.calendarElement=e,this.deviceCalendar=e,this.contentElement=e.querySelector(".e-content"),this.tableBodyElement=t.select(".e-content tbody",e),this.table=e.querySelector(".e-content").getElementsByTagName("table")[0],this.headerTitleElement=e.querySelector(".e-header .e-title"),this.headerElement=e.querySelector(".e-header"))},r.prototype.deviceHeaderClick=function(e){if(e.currentTarget.classList.contains("e-start-btn")&&!t.isNullOrUndefined(this.startValue)){this.endButton.element.classList.remove(N),this.startButton.element.classList.add(N);i=this.popupObj.element.querySelector("."+T);this.updateDeviceCalendar(i),t.isNullOrUndefined(this.calendarElement.querySelector(".e-start-date:not(.e-other-month)"))&&(this.currentDate=new Date(+this.startValue),t.remove(this.tableBodyElement),this.createContentBody(),this.deviceNavigation()),this.removeClassDisabled()}else if(!t.isNullOrUndefined(this.startValue)&&!t.isNullOrUndefined(this.endValue)){this.startButton.element.classList.remove(N),this.endButton.element.classList.add(N);var i=this.popupObj.element.querySelector("."+T);this.updateDeviceCalendar(i),t.isNullOrUndefined(this.calendarElement.querySelector(".e-end-date:not(.e-other-month)"))&&(this.currentDate=new Date(+this.endValue),t.remove(this.tableBodyElement),this.createContentBody(),this.deviceNavigation()),this.updateMinMaxDays(this.popupObj.element.querySelector("."+T)),this.selectableDates()}},r.prototype.inputFocusHandler=function(){if(this.enabled){this.preventBlur=!1;var e={model:t.isBlazor()&&this.isServerRendered?null:this};this.preventFocus||this.trigger("focus",e),this.updateClearIconState(),this.updateHiddenInput(),this.openOnFocus&&!this.preventFocus?(this.preventFocus=!0,this.show()):this.preventFocus=!0}},r.prototype.inputBlurHandler=function(e){if(this.enabled){if(!this.preventBlur){var i=this.inputElement.value;if(t.isNullOrUndefined(this.presetsItem)||this.presetsItem.length>0&&this.previousEleValue!==this.inputElement.value&&(this.activeIndex=this.presetsItem.length-1,this.isCustomRange=!0),!t.isNullOrUndefined(i)&&""!==i.trim()){var a=i.split(" "+this.separator+" ");if(a.length>1){this.invalidValueString=null;var n={format:this.formatString,type:"date",skeleton:t.isBlazor()?"d":"yMd"},r=this.globalize.parseDate(a[0].trim(),n),l=this.globalize.parseDate(a[1].trim(),n);if(!(t.isNullOrUndefined(r)||isNaN(+r)||t.isNullOrUndefined(l)||isNaN(+l))){var o=this.startValue;this.startValue=r;var h=this.endValue;if(this.endValue=l,this.setValue(),this.refreshControl(),i!==this.previousEleValue&&this.changeTrigger(e),!this.preventBlur&&document.activeElement!==this.inputElement){this.preventFocus=!1;u={model:t.isBlazor()&&this.isServerRendered?null:this};this.trigger("blur",u)}return this.updateHiddenInput(),void(this.isMobile&&this.isPopupOpen()&&(this.startValue=o,this.endValue=h))}this.strictMode||(this.startValue=null,this.endValue=null,this.setValue())}else this.strictMode||(this.startValue=null,this.endValue=null,this.setValue())}if(this.strictMode?(t.isNullOrUndefined(i)||""!==i.trim()||(this.startValue=null,this.endValue=null),s.Input.setValue("",this.inputElement,this.floatLabelType,this.showClearButton),this.updateInput()):(t.isNullOrUndefined(this.popupObj)&&(this.currentDate=null),this.previousStartValue=this.previousEndValue=null,this.startValue=null,this.endValue=null,this.setValue()),this.errorClass(),this.changeTrigger(e),!this.preventBlur&&document.activeElement!==this.inputElement){this.preventFocus=!1;var u={model:t.isBlazor()&&this.isServerRendered?null:this};this.trigger("blur",u)}}this.updateHiddenInput()}},r.prototype.clearRange=function(){this.previousStartValue=this.previousEndValue=null,this.currentDate=null},r.prototype.errorClass=function(){var e=this.inputElement.value.trim();(t.isNullOrUndefined(this.endValue)&&t.isNullOrUndefined(this.startValue)&&""!==e||!t.isNullOrUndefined(this.startValue)&&+this.startValue<+this.min||!t.isNullOrUndefined(this.startValue)&&!t.isNullOrUndefined(this.endValue)&&+this.startValue>+this.endValue||!t.isNullOrUndefined(this.endValue)&&+this.endValue>+this.max||this.startValue&&this.isDateDisabled(this.startValue)||this.endValue&&this.isDateDisabled(this.endValue))&&""!==e?(t.addClass([this.inputWrapper.container],"e-error"),t.attributes(this.inputElement,{"aria-invalid":"true"})):this.inputWrapper&&(t.removeClass([this.inputWrapper.container],"e-error"),t.attributes(this.inputElement,{"aria-invalid":"false"}))},r.prototype.keyCalendarUpdate=function(e,t){return this.removeFocusedDate(),e?(this.leftCalCurrentDate=new Date(+this.currentDate),t=this.leftCalendar):(this.rightCalCurrentDate=new Date(+this.currentDate),t=this.rightCalendar),this.updateCalendarElement(t),this.table.focus(),t},r.prototype.navInCalendar=function(e,i,s,a,n){var r,l,o=this.getViewNumber(this.currentView()),h=this.min;switch(l=t.isNullOrUndefined(this.maxDays)||!this.isMaxDaysClicked||t.isNullOrUndefined(this.startValue)?this.max:new Date(new Date(+this.startValue).setDate(this.startValue.getDate()+(this.maxDays-1))),e.action){case"moveRight":r=new Date(+this.currentDate),this.addDay(r,1,e,l,h),i&&+r==+a&&(n=this.keyCalendarUpdate(!1,n)),this.keyboardNavigate(1,o,e,l,h),this.keyNavigation(n,e);break;case"moveLeft":r=new Date(+this.currentDate),this.addDay(r,-1,e,l,h),i||+r==+s&&(n=this.keyCalendarUpdate(!0,n)),this.keyboardNavigate(-1,o,e,l,h),this.keyNavigation(n,e);break;case"moveUp":0===o?(r=new Date(+this.currentDate),this.addDay(r,-7,e,l,h),+r<=+s&&!i&&(n=this.keyCalendarUpdate(!0,n)),this.keyboardNavigate(-7,o,e,l,h)):this.keyboardNavigate(-4,o,e,this.max,this.min),this.keyNavigation(n,e);break;case"moveDown":0===o?(r=new Date(+this.currentDate),this.addDay(r,7,e,l,h),i&&+r>=+a&&(n=this.keyCalendarUpdate(!1,n)),this.keyboardNavigate(7,o,e,l,h)):this.keyboardNavigate(4,o,e,this.max,this.min),this.keyNavigation(n,e);break;case"home":this.currentDate=this.firstDay(this.currentDate),t.remove(this.tableBodyElement),0===o?this.renderMonths(e):1===o?this.renderYears(e):this.renderDecades(e),this.keyNavigation(n,e);break;case"end":this.currentDate=this.lastDay(this.currentDate,o),t.remove(this.tableBodyElement),0===o?this.renderMonths(e):1===o?this.renderYears(e):this.renderDecades(e),this.keyNavigation(n,e)}},r.prototype.keyInputHandler=function(i,s){var a,n=this.getViewNumber(this.currentView()),r=new Date(this.rightCalCurrentDate.getFullYear(),this.rightCalCurrentDate.getMonth(),1),l=new Date(this.leftCalCurrentDate.getFullYear(),this.leftCalCurrentDate.getMonth()+1,0),o=t.closest(i.target,"."+V),h=(o=t.isNullOrUndefined(o)?this.leftCalendar:o).classList.contains(w);this.updateCalendarElement(o);var u=this.tableBodyElement.querySelector("tr td.e-selected"),d=o.querySelector("tr td."+P),p=o.querySelector("tr td."+I),c=o.querySelector("tr td."+S),m=this.getViewNumber(this.depth),v=n===m&&this.getViewNumber(this.start)>=m,f=t.closest(i.target,"."+w),y=t.closest(i.target,"."+V),g=t.closest(i.target,".e-presets");switch(t.isNullOrUndefined(d)?t.isNullOrUndefined(c)||this.dateDisabled?t.isNullOrUndefined(p)||this.dateDisabled?this.dateDisabled||this.currentDate.setDate(1):this.currentDate=new Date(+this.startValue):this.currentDate=new Date(+this.endValue):this.currentDate=this.currentDate,this.effect="",i.action){case"altUpArrow":this.isPopupOpen()&&(this.hide(i),this.preventFocus=!0,this.inputElement.focus(),t.addClass([this.inputWrapper.container],["e-input-focus"]));break;case"select":if(v){var b=t.isNullOrUndefined(d)?p:d;t.isNullOrUndefined(b)||b.classList.contains(x)||this.selectRange(null,b)}else(t.isNullOrUndefined(u)||v)&&t.isNullOrUndefined(d)||(t.isNullOrUndefined(this.value)||(s=this.calendarElement.classList.contains(w)?this.startDate:this.endDate),this.controlDown=i,this.contentClick(null,--n,d||u,s));i.preventDefault();break;case"controlHome":D=new Date(this.currentDate.getFullYear(),0,1);!h&&+D<+l&&(o=this.keyCalendarUpdate(!0,o)),e.prototype.navigateTo.call(this,"Month",new Date(this.currentDate.getFullYear(),0,1)),this.keyNavigation(o,i);break;case"altRightArrow":t.isNullOrUndefined(f)?t.isNullOrUndefined(y)?t.isNullOrUndefined(g)||this.cancelButton.element.focus():t.isNullOrUndefined(this.presetElement)?this.cancelButton.element.focus():(this.presetElement.focus(),this.removeFocusedDate()):this.rightCalendar.children[1].firstElementChild.focus(),i.preventDefault();break;case"altLeftArrow":t.isNullOrUndefined(f)?t.isNullOrUndefined(y)||this.leftCalendar.children[1].firstElementChild.focus():!0!==this.applyButton.element.disabled?this.applyButton.element.focus():this.cancelButton.element.focus(),i.preventDefault();break;case"controlUp":this.calendarElement.classList.contains(w),this.calendarNavigation(i,this.calendarElement),i.preventDefault();break;case"controlDown":t.isNullOrUndefined(u)&&t.isNullOrUndefined(d)||v||(t.isNullOrUndefined(this.value)||(s=this.calendarElement.classList.contains(w)?this.startDate:this.endDate),this.controlDown=i,this.contentClick(null,--n,u||d,s)),i.preventDefault();break;case"controlEnd":var D=new Date(this.currentDate.getFullYear(),11,31);h&&+D>+r&&(o=this.keyCalendarUpdate(!1,o)),e.prototype.navigateTo.call(this,"Month",new Date(this.currentDate.getFullYear(),11,31)),this.keyNavigation(o,i);break;case"pageUp":a=new Date(+this.currentDate),this.addMonths(a,-1),!h&&+a<=+l&&(o=this.keyCalendarUpdate(!0,o)),this.addMonths(this.currentDate,-1),e.prototype.navigateTo.call(this,"Month",this.currentDate),this.keyNavigation(o,i);break;case"pageDown":a=new Date(+this.currentDate),this.addMonths(a,1),h&&+a>=+r&&(o=this.keyCalendarUpdate(!1,o)),this.addMonths(this.currentDate,1),e.prototype.navigateTo.call(this,"Month",this.currentDate),this.keyNavigation(o,i);break;case"shiftPageUp":a=new Date(+this.currentDate),this.addYears(a,-1),!h&&+a<=+l&&(o=this.keyCalendarUpdate(!0,o)),this.addYears(this.currentDate,-1),e.prototype.navigateTo.call(this,"Month",this.currentDate),this.keyNavigation(o,i);break;case"shiftPageDown":a=new Date(+this.currentDate),this.addYears(a,1),h&&+a>=+r&&(o=this.keyCalendarUpdate(!1,o)),this.addYears(this.currentDate,1),e.prototype.navigateTo.call(this,"Month",this.currentDate),this.keyNavigation(o,i);break;case"shiftTab":t.isNullOrUndefined(this.presetElement)||(this.presetElement.setAttribute("tabindex","0"),this.presetElement.focus(),this.removeFocusedDate()),i.preventDefault();break;case"spacebar":this.applyButton&&!this.applyButton.disabled&&this.applyFunction(i);break;default:this.navInCalendar(i,h,l,r,o),this.checkMinMaxDays()}this.presetHeight()},r.prototype.keyNavigation=function(e,t){this.bindCalendarCellEvents(e),e.classList.contains(w)?this.leftCalCurrentDate=new Date(+this.currentDate):this.rightCalCurrentDate=new Date(+this.currentDate),this.updateNavIcons(),this.calendarIconEvent(),this.updateRange([e]),this.dateDisabled=this.isDateDisabled(this.currentDate),t.preventDefault()},r.prototype.inputHandler=function(e){switch(e.action){case"altDownArrow":this.isPopupOpen()||(""===this.inputElement.value&&(this.clear(),this.changeTrigger(e),this.clearRange()),this.show(null,e),this.isRangeIconClicked=!1,this.isMobile||t.isNullOrUndefined(this.leftCalendar)||this.calendarFocus(),this.isKeyPopup=!0);break;case"escape":this.isPopupOpen()&&this.hide(e);break;case"enter":document.activeElement===this.inputElement&&(this.inputBlurHandler(e),this.hide(e));break;case"tab":document.activeElement===this.inputElement&&this.isPopupOpen()&&(this.hide(e),e.preventDefault())}},r.prototype.bindCalendarCellEvents=function(e){for(var i,s=0,a=i=e?e.querySelectorAll(".e-calendar td"):this.popupObj.element.querySelectorAll(".e-calendar td");s<a.length;s++){var n=a[s];t.EventHandler.clearEvents(n),n.classList.contains(x)||n.classList.contains(H)||n.classList.contains("e-week-number")||(this.isMobile||t.EventHandler.add(n,"mouseover",this.hoverSelection,this),t.EventHandler.add(n,"mousedown",this.selectRange,this))}},r.prototype.removeFocusedDate=function(){for(var e=!t.isNullOrUndefined(this.startValue)||!t.isNullOrUndefined(this.endValue),i=0,s=this.popupObj.element.querySelectorAll(".e-calendar ."+P);i<s.length;i++){var a=s[i],n=new Date,r=this.getIdValue(null,a);("Month"===this.depth&&"Month"===this.currentView()&&(!a.classList.contains("e-today")||a.classList.contains("e-today")&&e)||"Year"===this.depth&&"Year"===this.currentView()&&(!this.isSameMonth(n,r)&&!this.isSameYear(n,r)||e)||"Decade"===this.depth&&"Decade"===this.currentView()&&(!this.isSameYear(n,r)||e))&&(a.classList.remove(P),a.classList.contains(I)||a.classList.contains(S)||a.removeAttribute("aria-label"))}},r.prototype.hoverSelection=function(e,i){var s=i||e.currentTarget,a=this.getIdValue(null,s);if(!t.isNullOrUndefined(this.startValue)&&+this.startValue>=+this.min&&+this.startValue<=+this.max&&(!this.isDateDisabled(this.endValue)&&!this.isDateDisabled(this.startValue)&&t.isNullOrUndefined(this.endValue)&&t.isNullOrUndefined(this.startValue)||!t.isNullOrUndefined(this.startValue)&&t.isNullOrUndefined(this.endValue)))for(var n=0,r=this.popupObj.element.querySelectorAll(".e-calendar td");n<r.length;n++){var l=r[n],o=!l.classList.contains(x)||l.classList.contains(H);if(!l.classList.contains("e-week-number")&&o){var h=this.getIdValue(null,l),u=new Date(+this.startValue);new Date(+h).setHours(0,0,0,0)>=u.setHours(0,0,0,0)&&+h<=+a?t.addClass([l],A):t.removeClass([l],[A])}}},r.prototype.isSameStartEnd=function(e,t){var i=!1;return"Month"===this.depth?e.setHours(0,0,0,0)===t.setHours(0,0,0,0)&&(i=!0):"Year"===this.depth?e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&(i=!0):"Decade"===this.depth&&e.getFullYear()===t.getFullYear()&&(i=!0),i},r.prototype.updateRange=function(e){if(!t.isNullOrUndefined(this.startValue))for(var i=0,s=e;i<s.length;i++)for(var a=0,n=s[i].querySelectorAll(".e-calendar td");a<n.length;a++){var r=n[a];if(!r.classList.contains("e-week-number")&&!r.classList.contains(x)){var l=this.getIdValue(null,r),o=this.getIdValue(null,r);if(t.isNullOrUndefined(this.endValue)?t.removeClass([r],[A]):this.currentView()===this.depth&&+o.setHours(0,0,0,0)>=+new Date(+this.startValue).setHours(0,0,0,0)&&+o.setHours(0,0,0,0)<=+new Date(+this.endValue).setHours(0,0,0,0)&&!this.isSameStartEnd(new Date(+this.startValue),new Date(+this.endValue))&&+new Date(+this.startValue).setHours(0,0,0,0)>=+this.min&&+new Date(+this.endValue).setHours(0,0,0,0)<=+this.max&&!this.isDateDisabled(this.startValue)&&!this.isDateDisabled(this.endValue)&&t.addClass([r],A),r.classList.contains("e-selected")&&r.classList.contains(S)&&+o!=+this.endValue&&(t.removeClass([r],["e-selected"]),t.removeClass([r],[S])),r.classList.contains(A)&&+o>+this.endValue&&t.removeClass([r],[A]),!r.classList.contains("e-other-month")){var h=new Date(+this.startValue),u=new Date(+l);this.currentView()===this.depth&&+u.setHours(0,0,0,0)==+h.setHours(0,0,0,0)&&+u.setHours(0,0,0,0)>=+h.setHours(0,0,0,0)&&+this.startValue>=+this.min&&!this.inputWrapper.container.classList.contains("e-error")&&!this.isDateDisabled(this.startValue)&&!this.isDateDisabled(this.endValue)&&(t.addClass([r],[I,"e-selected"]),this.addSelectedAttributes(r,this.startValue,!0));var d=new Date(+this.endValue);"Year"===this.currentView()?u=new Date(u.getFullYear(),u.getMonth()+1,0):"Decade"===this.currentView()&&(u=new Date(u.getFullYear(),11,31)),this.currentView()===this.depth&&!t.isNullOrUndefined(this.endValue)&&+u.setHours(0,0,0,0)==+d.setHours(0,0,0,0)&&+u.setHours(0,0,0,0)<=+d.setHours(0,0,0,0)&&+this.startValue>=+this.min&&!this.inputWrapper.container.classList.contains("e-error")&&!this.isDateDisabled(this.startValue)&&!this.isDateDisabled(this.endValue)&&(t.addClass([r],[S,"e-selected"]),this.addSelectedAttributes(r,this.startValue,!1)),+l!=+this.startValue||t.isNullOrUndefined(this.endValue)||+l!=+this.endValue||this.addSelectedAttributes(r,this.endValue,!1,!0)}}}},r.prototype.checkMinMaxDays=function(){(!t.isNullOrUndefined(this.minDays)&&this.minDays>0||!t.isNullOrUndefined(this.maxDays)&&this.maxDays>0)&&(this.isMobile?this.updateMinMaxDays(this.popupObj.element.querySelector("."+T)):(this.updateMinMaxDays(this.popupObj.element.querySelector("."+w)),this.updateMinMaxDays(this.popupObj.element.querySelector("."+V))))},r.prototype.rangeArgs=function(e){var i,s,a=t.isNullOrUndefined(this.startValue)?null:this.globalize.formatDate(this.startValue,{format:this.formatString,type:"date",skeleton:t.isBlazor()?"d":"yMd"}),n=t.isNullOrUndefined(this.endValue)?null:this.globalize.formatDate(this.endValue,{format:this.formatString,type:"date",skeleton:t.isBlazor()?"d":"yMd"});return t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)?(i="",s=0):(i=a+" "+this.separator+" "+n,s=Math.round(Math.abs((this.removeTimeValueFromDate(this.startValue).getTime()-this.removeTimeValueFromDate(this.endValue).getTime())/864e5))+1),{value:this.value,startDate:this.startValue,endDate:this.endValue,daySpan:s,event:e||null,element:this.element,isInteracted:!t.isNullOrUndefined(e),text:i}},r.prototype.otherMonthSelect=function(e,i,s){var a=+this.getIdValue(null,e),n='*[id^="/id"]:not(.e-other-month)'.replace("/id",""+a),r=this.popupObj&&this.popupObj.element.querySelector(n);t.isNullOrUndefined(r)||(i?(t.addClass([r],[I,"e-selected"]),this.addSelectedAttributes(r,this.startValue,!0)):(t.addClass([r],[S,"e-selected"]),this.addSelectedAttributes(r,this.endValue,!0)),s&&this.addSelectedAttributes(e,this.endValue,!1,!0))},r.prototype.selectRange=function(e,i){var s,a;e&&e.preventDefault();var n=t.isNullOrUndefined(e)?this.getIdValue(null,i):this.getIdValue(e,null),r=n.getFullYear(),l=n.getMonth(),o=new Date(r,l,1),h=new Date(r,l+1,0),u=new Date(r,0,1),d=new Date(r,11,31);t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)?this.isMobile&&this.startButton.element.classList.contains(N)&&this.removeSelection():(!this.isMobile||this.isMobile&&!this.endButton.element.classList.contains(N))&&this.removeSelection();var p=i||e.currentTarget;if(t.isNullOrUndefined(this.startValue))t.isNullOrUndefined(this.previousStartValue)||(n.setHours(this.previousStartValue.getHours()),n.setMinutes(this.previousStartValue.getMinutes()),n.setSeconds(this.previousStartValue.getSeconds())),this.startValue="Month"===this.depth?new Date(this.checkValue(n)):"Year"===this.depth?o:u,this.endValue=null,this.setValue(),t.addClass([p],I),this.addSelectedAttributes(p,this.startValue,!0),p.classList.contains("e-other-month")&&this.otherMonthSelect(p,!0),this.checkMinMaxDays(),this.applyButton.disabled=!0,this.applyButton.element.disabled=!0,this.isMobile&&(this.endButton.element.classList.add(N),this.startButton.element.classList.remove(N),this.endButton.element.removeAttribute("disabled"),this.selectableDates()),this.trigger("select",this.rangeArgs(e));else if(+n==+this.startValue||+n>+this.startValue){if(+n==+this.startValue&&!t.isNullOrUndefined(this.minDays)&&this.minDays>1)return;this.endValue=null,this.setValue(),(this.isMobile||i)&&this.hoverSelection(e,i),t.isNullOrUndefined(this.previousEndValue)||(n.setHours(this.previousEndValue.getHours()),n.setMinutes(this.previousEndValue.getMinutes()),n.setSeconds(this.previousEndValue.getSeconds())),this.endValue="Month"===this.depth?new Date(this.checkValue(n)):"Year"===this.depth?h:d,this.setValue();var c=this.popupObj.element.querySelectorAll("."+S);if(this.isMobile){this.startButton.element.classList.remove(N),this.endButton.element.classList.add(N);for(var m=0,v=c;m<v.length;m++){var f=v[m];f.removeAttribute("aria-label"),f.classList.contains(I)?(this.addSelectedAttributes(f,this.startValue,!0),t.removeClass([f],[S])):(f.setAttribute("aria-selected","false"),t.removeClass([f],[S,"e-selected"]))}}t.addClass([p],S),+this.endValue==+this.startValue?this.addSelectedAttributes(p,this.endValue,!1,!0):this.addSelectedAttributes(p,this.endValue,!1),p.classList.contains("e-other-month")&&(+this.endValue==+this.startValue?this.otherMonthSelect(p,!1,!0):this.otherMonthSelect(p,!1));for(var y=0,g=c=this.popupObj.element.querySelectorAll("."+S);y<g.length;y++){var b=g[y];b.classList.contains(I)&&t.removeClass([b],[A])}this.applyButton.disabled=!1,this.applyButton.element.disabled=!1,this.isMobile||this.removeClassDisabled(),this.disabledDateRender(),this.trigger("select",this.rangeArgs(e))}else+n<+this.startValue&&(this.removeClassDisabled(),this.startValue="Month"===this.depth?new Date(this.checkValue(n)):"Year"===this.depth?o:u,this.setValue(),this.removeSelectedAttributes(),t.removeClass(this.popupObj.element.querySelectorAll("."+I),[I,"e-selected"]),t.addClass([p],I),this.addSelectedAttributes(p,this.startValue,!0),p.classList.contains("e-other-month")&&this.otherMonthSelect(p,!0),this.checkMinMaxDays());e&&(s=t.closest(e.target,"."+w)),t.isNullOrUndefined(s)?(e&&(a=e&&t.closest(e.target,"."+V)),t.isNullOrUndefined(a)||this.rightCalendar.children[1].firstElementChild.focus()):this.leftCalendar.children[1].firstElementChild.focus(),t.addClass([p],"e-selected"),this.updateHeader(),this.removeFocusedDate()},r.prototype.selectableDates=function(){if(!t.isNullOrUndefined(this.startValue)){var e=this.calendarElement.querySelectorAll(".e-calendar td"),i=!1;if(this.currentView()===this.depth){for(var s=0,a=e;s<a.length;s++){if(!(l=a[s]).classList.contains(I)&&!l.classList.contains("e-week-number")&&!l.classList.contains(x)){if(+this.getIdValue(null,l)<+this.startValue){t.addClass([l],[H,x,W]),t.EventHandler.clearEvents(l);continue}break}if(l.classList.contains(I)&&!l.classList.contains("e-other-month")){i=!0;break}}i&&(this.previousIcon.classList.contains(x)||t.addClass([this.previousIcon],[B,x,W]))}else{for(var n=0,r=e;n<r.length;n++){var l=r[n],o=this.startValue.getMonth(),h=this.startValue.getFullYear(),u=this.getIdValue(null,l);if(this.startButton.element.classList.contains(N)||!("Year"===this.currentView()&&u.getMonth()<o&&u.getFullYear()<=h||"Decade"===this.currentView()&&u.getMonth()<=o&&u.getFullYear()<h))break;t.addClass([l],[x])}e[0].classList.contains(x)?this.previousIconHandler(!0):e[e.length-1].classList.contains(x)&&this.nextIconHandler(!0)}}},r.prototype.updateMinMaxDays=function(e){if(!t.isNullOrUndefined(this.startValue)&&t.isNullOrUndefined(this.endValue)||this.isMobile&&this.endButton.element.classList.contains(N)){if(!t.isNullOrUndefined(this.minDays)&&this.minDays>0||!t.isNullOrUndefined(this.maxDays)&&this.maxDays>0){var i=this.removeTimeValueFromDate(this.startValue),s=new Date(new Date(+i).setDate(i.getDate()+(this.minDays-1))),a=new Date(new Date(+i).setDate(i.getDate()+(this.maxDays-1)));s=!t.isNullOrUndefined(this.minDays)&&this.minDays>0?s:null,a=!t.isNullOrUndefined(this.maxDays)&&this.maxDays>0?a:null,"Year"===this.currentView()?(s=t.isNullOrUndefined(s)?null:new Date(s.getFullYear(),s.getMonth(),0),a=t.isNullOrUndefined(a)?null:new Date(a.getFullYear(),a.getMonth(),1)):"Decade"===this.currentView()&&(s=t.isNullOrUndefined(s)?null:new Date(s.getFullYear()-1,11,1),a=t.isNullOrUndefined(a)?null:new Date(a.getFullYear(),0,1));for(var n=void 0,r=0,l=e.querySelectorAll(".e-calendar td");r<l.length;r++){var o=l[r];if(!o.classList.contains(I)&&!o.classList.contains("e-week-number")){var h=this.getIdValue(null,o);if(h=this.removeTimeValueFromDate(h),!t.isNullOrUndefined(s)&&+h==+s&&o.classList.contains(x)&&s.setDate(s.getDate()+1),!o.classList.contains(x)){if(+h<=+i)continue;!t.isNullOrUndefined(s)&&+h<+s&&(t.addClass([o],[H,x,W]),t.EventHandler.clearEvents(o)),!t.isNullOrUndefined(a)&&+h>+a&&(t.addClass([o],[H,x,W]),this.isMaxDaysClicked=!0,t.EventHandler.clearEvents(o),t.isNullOrUndefined(n)&&!o.classList.contains("e-other-month")&&(n=o))}}}if(!t.isNullOrUndefined(n))if(this.isMobile)this.nextIcon.classList.contains(x)||t.addClass([this.nextIcon],[B,x,W]);else{var u=t.closest(n,"."+V);(u=t.isNullOrUndefined(u)?this.leftCalendar:u).classList.contains(w)?(this.rightCalNextIcon.classList.contains(x)||t.addClass([this.rightCalNextIcon],[B,x,W]),this.leftCalNextIcon.classList.contains(x)||t.addClass([this.leftCalNextIcon],[B,x,W]),this.rightCalPrevIcon.classList.contains(x)||t.addClass([this.rightCalPrevIcon],[B,x,W])):this.rightCalNextIcon.classList.contains(x)||t.addClass([this.rightCalNextIcon],[B,x,W])}}}else this.isMaxDaysClicked=!1},r.prototype.removeTimeValueFromDate=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())},r.prototype.removeClassDisabled=function(){for(var e=0,i=this.popupObj.element.querySelectorAll(".e-calendar td."+H);e<i.length;e++){var s=i[e];s.classList.contains(H)&&(t.removeClass([s],[H,x,W]),t.EventHandler.add(s,"click",this.selectRange,this),this.isMobile||t.EventHandler.add(s,"mouseover",this.hoverSelection,this))}this.isMobile?(this.nextIcon.classList.contains(B)&&t.removeClass([this.nextIcon],[B,x,W]),this.previousIcon.classList.contains(B)&&t.removeClass([this.previousIcon],[B,x,W])):(this.rightCalNextIcon.classList.contains(B)&&t.removeClass([this.rightCalNextIcon],[B,x,W]),this.rightCalPrevIcon.classList.contains(B)&&t.removeClass([this.rightCalPrevIcon],[B,x,W]),this.leftCalNextIcon.classList.contains(B)&&t.removeClass([this.leftCalNextIcon],[B,x,W]))},r.prototype.updateHeader=function(){var e={type:"date",skeleton:t.isBlazor()?"D":"yMMMd"};if(t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue))this.popupObj.element.querySelector("."+U).textContent=this.l10n.getConstant("selectedDays");else{var i=Math.round(Math.abs((this.removeTimeValueFromDate(this.startValue).getTime()-this.removeTimeValueFromDate(this.endValue).getTime())/864e5))+1;t.isNullOrUndefined(this.disabledDayCnt)||(i-=this.disabledDayCnt,this.disabledDayCnt=null),this.popupObj.element.querySelector("."+U).textContent=i.toString()+" "+this.l10n.getConstant("days")}this.isMobile?(t.isNullOrUndefined(this.startValue)?this.startButton.element.textContent=this.l10n.getConstant("startLabel"):this.startButton.element.textContent=this.globalize.formatDate(this.startValue,e),t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)?this.endButton.element.textContent=this.l10n.getConstant("endLabel"):this.endButton.element.textContent=this.globalize.formatDate(this.endValue,e)):(t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)?this.popupObj.element.querySelector(".e-end-label").textContent=this.l10n.getConstant("endLabel"):this.popupObj.element.querySelector(".e-end-label").textContent=this.globalize.formatDate(this.endValue,e),t.isNullOrUndefined(this.startValue)?this.popupObj.element.querySelector(".e-start-label").textContent=this.l10n.getConstant("startLabel"):this.popupObj.element.querySelector(".e-start-label").textContent=this.globalize.formatDate(this.startValue,e)),(this.isDateDisabled(this.startValue)||this.isDateDisabled(this.endValue)||!t.isNullOrUndefined(this.startValue)&&+this.startValue<+this.min||!t.isNullOrUndefined(this.endValue)&&+this.endValue>+this.max||!t.isNullOrUndefined(this.startValue)&&!t.isNullOrUndefined(this.endValue)&&+this.startValue>+this.endValue)&&(this.isMobile?(this.startButton.element.textContent=this.l10n.getConstant("startLabel"),this.endButton.element.textContent=this.l10n.getConstant("endLabel"),this.popupObj.element.querySelector("."+U).textContent=this.l10n.getConstant("selectedDays")):(this.popupObj.element.querySelector("."+U).textContent=this.l10n.getConstant("selectedDays"),this.popupObj.element.querySelector(".e-start-label").textContent=this.l10n.getConstant("startLabel"),this.popupObj.element.querySelector(".e-end-label").textContent=this.l10n.getConstant("endLabel"))),this.popupObj.element.querySelector("#custom_range")&&(this.popupObj.element.querySelector("#custom_range").textContent=""!==this.l10n.getConstant("customRange")?this.l10n.getConstant("customRange"):"Custom Range")},r.prototype.removeSelection=function(){this.startValue=null,this.endValue=null,this.setValue(),this.removeSelectedAttributes(),this.popupObj&&(this.popupObj.element.querySelectorAll(".e-selected").length>0&&t.removeClass(this.popupObj.element.querySelectorAll(".e-selected"),[I,S,"e-selected"]),this.popupObj.element.querySelectorAll("."+P).length>0&&t.removeClass(this.popupObj.element.querySelectorAll("."+P),P),this.popupObj.element.querySelectorAll("."+A).length>0&&t.removeClass(this.popupObj.element.querySelectorAll("."+A),[A]))},r.prototype.addSelectedAttributes=function(e,i,s,a){if(e){var n=this.globalize.formatDate(i,{type:"date",skeleton:t.isBlazor()?"D":"full"});!t.isNullOrUndefined(a)&&a?e.setAttribute("aria-label","The current start and end date is "+n):e.setAttribute("aria-label","The current "+(s?"start":"end")+" date is "+n),e.setAttribute("aria-selected","true")}},r.prototype.removeSelectedAttributes=function(){if(this.popupObj){for(var e=0,t=this.popupObj.element.querySelectorAll("."+I);e<t.length;e++)(a=t[e]).setAttribute("aria-selected","false"),a.removeAttribute("aria-label");for(var i=0,s=this.popupObj.element.querySelectorAll("."+S);i<s.length;i++){var a=s[i];a.setAttribute("aria-selected","false"),a.removeAttribute("aria-label")}}},r.prototype.updateCalendarElement=function(e){e.classList.contains(w)?(this.calendarElement=this.leftCalendar,this.currentDate=this.leftCalCurrentDate,this.previousIcon=this.leftCalPrevIcon,this.nextIcon=this.leftCalNextIcon):(this.calendarElement=this.rightCalendar,this.currentDate=this.rightCalCurrentDate,this.previousIcon=this.rightCalPrevIcon,this.nextIcon=this.rightCalNextIcon),this.contentElement=e.querySelector(".e-content"),this.tableBodyElement=t.select(".e-content tbody",e),this.table=e.querySelector(".e-content").getElementsByTagName("table")[0],this.headerTitleElement=e.querySelector(".e-header .e-title"),this.headerElement=e.querySelector(".e-header")},r.prototype.navPrevMonth=function(e){e.preventDefault();var i=t.closest(e.target,"."+w);i=t.isNullOrUndefined(i)?t.closest(e.target,"."+V):i,this.updateCalendarElement(i),this.navigatePrevious(e),!t.isNullOrUndefined(this.startValue)&&t.isNullOrUndefined(this.endValue)&&this.updateMinMaxDays(i),this.updateControl(i)},r.prototype.deviceNavigation=function(e){this.deviceCalendarEvent(),this.updateRange([this.popupObj.element.querySelector("."+T)]),this.endButton.element.classList.contains(N)&&this.updateMinMaxDays(this.popupObj.element.querySelector("."+T)),this.endButton.element.classList.contains(N)&&this.selectableDates(),this.currentView()===this.depth&&this.bindCalendarCellEvents(),this.removeFocusedDate()},r.prototype.updateControl=function(e){e.classList.contains(V)?this.rightCalCurrentDate=new Date(+this.currentDate):this.leftCalCurrentDate=new Date(+this.currentDate),this.calendarIconEvent(),("Month"===this.depth&&this.leftCalendar.querySelector(".e-content").classList.contains("e-month")&&this.rightCalendar.querySelector(".e-content").classList.contains("e-month")||"Year"===this.depth&&this.leftCalendar.querySelector(".e-content").classList.contains("e-year")&&this.rightCalendar.querySelector(".e-content").classList.contains("e-year")||"Decade"===this.depth&&this.leftCalendar.querySelector(".e-content").classList.contains("e-decade")&&this.rightCalendar.querySelector(".e-content").classList.contains("e-decade")||this.isMobile)&&this.bindCalendarCellEvents(),this.removeFocusedDate(),this.updateRange([e])},r.prototype.navNextMonth=function(e){e.preventDefault();var i=t.closest(e.target,"."+w);i=t.isNullOrUndefined(i)?t.closest(e.target,"."+V):i,this.updateCalendarElement(i),this.navigateNext(e),!t.isNullOrUndefined(this.startValue)&&t.isNullOrUndefined(this.endValue)&&this.updateMinMaxDays(i),this.updateControl(i)},r.prototype.isPopupOpen=function(){return!(t.isNullOrUndefined(this.popupObj)||!this.popupObj.element.classList.contains("e-popup"))},r.prototype.createRangeHeader=function(){var e=this.createElement("div",{className:"e-start-end"});if(this.isMobile){var i=this.createElement("button",{className:"e-end-btn"}),s=this.createElement("button",{className:"e-start-btn"});this.startButton=new a.Button({content:this.l10n.getConstant("startLabel")},s),this.endButton=new a.Button({content:this.l10n.getConstant("endLabel")},i),e.appendChild(s),e.appendChild(i)}else{var n=this.createElement("a",{className:"e-start-label"}),r=this.createElement("a",{className:"e-end-label"}),l=this.createElement("span",{className:"e-change-icon e-icons"});t.attributes(n,{"aria-atomic":"true","aria-live":"assertive","aria-label":"Start Date",role:"button"}),t.attributes(r,{"aria-atomic":"true","aria-live":"assertive","aria-label":"End Date",role:"button"}),e.appendChild(n),e.appendChild(l),e.appendChild(r),n.textContent=this.l10n.getConstant("startLabel"),r.textContent=this.l10n.getConstant("endLabel")}return e},r.prototype.disableInput=function(){this.strictMode?t.isNullOrUndefined(this.previousStartValue)||t.isNullOrUndefined(this.previousEndValue)||(this.startValue=this.previousStartValue,this.endValue=this.previousEndValue,this.setValue(),this.updateInput()):(this.updateInput(),this.clearRange(),this.setProperties({startDate:null},!0),this.setProperties({endDate:null},!0),this.startValue=null,this.endValue=null,this.setValue(),this.errorClass()),this.setProperties({enabled:!1},!0),s.Input.setEnabled(this.enabled,this.inputElement),this.bindEvents()},r.prototype.validateMinMax=function(){if(this.min=t.isNullOrUndefined(this.min)||!+this.min?this.min=new Date(1900,0,1):this.min,this.max=t.isNullOrUndefined(this.max)||!+this.max?this.max=new Date(2099,11,31):this.max,!(this.min<=this.max))return void this.disableInput();t.isNullOrUndefined(this.minDays)||t.isNullOrUndefined(this.maxDays)||this.maxDays>0&&this.minDays>0&&this.minDays>this.maxDays&&(this.maxDays=null),!t.isNullOrUndefined(this.minDays)&&this.minDays<0&&(this.minDays=null),!t.isNullOrUndefined(this.maxDays)&&this.maxDays<0&&(this.maxDays=null)},r.prototype.validateRangeStrict=function(){t.isNullOrUndefined(this.startValue)||(+this.startValue<=+this.min?(this.startValue=this.min,this.setValue()):+this.startValue>=+this.min&&+this.startValue>=+this.max&&(this.startValue=this.max)),t.isNullOrUndefined(this.endValue)||(+this.endValue>+this.max?(this.endValue=this.max,this.setValue()):+this.endValue<+this.min&&(this.endValue=this.min,this.setValue())),this.validateMinMaxDays()},r.prototype.validateRange=function(){this.validateMinMaxDays()},r.prototype.validateMinMaxDays=function(){if(!t.isNullOrUndefined(this.startValue)&&!t.isNullOrUndefined(this.endValue)){var e=Math.round(Math.abs((this.removeTimeValueFromDate(this.startValue).getTime()-this.removeTimeValueFromDate(this.endValue).getTime())/864e5))+1;if(!t.isNullOrUndefined(this.minDays)&&this.minDays>0&&!(e>=this.minDays))if(this.strictMode){var i=new Date(+this.startValue);i.setDate(i.getDate()+(this.minDays-1)),+i>+this.max?(this.endValue=this.max,this.setValue()):(this.endValue=i,this.setValue())}else this.startValue=null,this.endValue=null,this.setValue();t.isNullOrUndefined(this.maxDays)||!(this.maxDays>0)||e<=this.maxDays||(this.strictMode?(this.endValue=new Date(+this.startValue),this.endValue.setDate(this.endValue.getDate()+(this.maxDays-1)),this.setValue()):(this.startValue=null,this.endValue=null,this.setValue()))}},r.prototype.renderCalendar=function(){this.calendarElement=this.createElement("div"),this.calendarElement.classList.add(T),this.enableRtl&&this.calendarElement.classList.add("e-rtl"),t.attributes(this.calendarElement,{role:"calendar"}),e.prototype.createHeader.call(this),e.prototype.createContent.call(this)},r.prototype.isSameMonth=function(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()},r.prototype.isSameYear=function(e,t){return e.getFullYear()===t.getFullYear()},r.prototype.isSameDecade=function(e,t){var i=e.getFullYear(),s=t.getFullYear();return i-i%10==s-s%10},r.prototype.startMonthCurrentDate=function(){this.isSameMonth(this.min,this.max)||+this.currentDate>+this.max||this.isSameMonth(this.currentDate,this.max)?(this.currentDate=new Date(+this.max),this.currentDate.setDate(1),this.currentDate.setMonth(this.currentDate.getMonth()-1)):this.currentDate<this.min&&(this.currentDate=new Date(this.checkValue(this.min)))},r.prototype.selectNextMonth=function(){if(t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)||this.isSameMonth(this.endValue,this.currentDate)||this.isDateDisabled(this.endValue)||this.isDateDisabled(this.startValue))return this.currentDate.setDate(1),void this.currentDate.setMonth(this.currentDate.getMonth()+1);if(this.currentDate=new Date(+this.endValue),!t.isNullOrUndefined(this.startValue)&&+this.startValue<+this.min||!t.isNullOrUndefined(this.endValue)&&+this.endValue>+this.max||!t.isNullOrUndefined(this.startValue)&&!t.isNullOrUndefined(this.endValue)&&+this.startValue>+this.endValue){this.currentDate=new Date((new Date).setHours(0,0,0,0)),this.currentDate.setDate(1);var e=this.currentDate.getMonth()+1;this.currentDate.setMonth(e)}},r.prototype.selectNextYear=function(){if(t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)||this.isSameYear(this.endValue,this.currentDate)||this.isDateDisabled(this.endValue)||this.isDateDisabled(this.startValue)){this.currentDate.setMonth(0);var e=this.currentDate.getFullYear()+1;return void this.currentDate.setFullYear(e)}this.currentDate=new Date(+this.endValue),(!t.isNullOrUndefined(this.endValue)&&+this.endValue>+this.max||!t.isNullOrUndefined(this.startValue)&&!t.isNullOrUndefined(this.endValue)&&+this.startValue>+this.endValue||!t.isNullOrUndefined(this.startValue)&&+this.startValue<+this.min)&&(this.currentDate=new Date((new Date).setHours(0,0,0,0)),this.currentDate.setMonth(0),this.currentDate.setFullYear(this.currentDate.getFullYear()+1))},r.prototype.selectNextDecade=function(){if(t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)||this.isSameDecade(this.endValue,this.currentDate)||this.isDateDisabled(this.endValue)||this.isDateDisabled(this.startValue)){var e=this.currentDate.getFullYear()+10;return void this.currentDate.setFullYear(e)}this.currentDate=new Date(+this.endValue),(!t.isNullOrUndefined(this.startValue)&&!t.isNullOrUndefined(this.endValue)&&+this.startValue>+this.endValue||!t.isNullOrUndefined(this.endValue)&&+this.endValue>+this.max||!t.isNullOrUndefined(this.startValue)&&+this.startValue<+this.min)&&(this.currentDate=new Date((new Date).setHours(0,0,0,0)),this.currentDate.setFullYear(this.currentDate.getFullYear()+10))},r.prototype.selectStartMonth=function(){t.isNullOrUndefined(this.startValue)?(this.currentDate=new Date((new Date).setHours(0,0,0,0)),this.startMonthCurrentDate()):!t.isNullOrUndefined(this.max)&&this.isSameMonth(this.startValue,this.max)?(this.currentDate=new Date(+this.max),this.currentDate.setDate(1),this.currentDate.setMonth(this.currentDate.getMonth()-1)):this.startValue>=this.min&&this.startValue<=this.max&&!this.isDateDisabled(this.startValue)?this.currentDate=new Date(+this.startValue):this.currentDate=new Date((new Date).setHours(0,0,0,0)),(!t.isNullOrUndefined(this.endValue)&&+this.endValue>+this.max||!t.isNullOrUndefined(this.startValue)&&+this.startValue<+this.min||!t.isNullOrUndefined(this.startValue)&&!t.isNullOrUndefined(this.endValue)&&+this.startValue>+this.endValue)&&(this.currentDate=new Date((new Date).setHours(0,0,0,0))),this.startMonthCurrentDate()},r.prototype.createCalendar=function(){var i=this.createElement("div",{className:"e-calendar-container"});if(this.isMobile){t.isNullOrUndefined(this.startValue)||(this.currentDate=new Date(+this.startValue)),e.prototype.validateDate.call(this),e.prototype.minMaxUpdate.call(this),e.prototype.render.call(this);var s=this.calendarElement.querySelector(".e-calendar .e-prev"),a=this.calendarElement.querySelector(".e-calendar .e-next");t.remove(this.calendarElement.querySelector(".e-calendar .e-icon-container")),this.calendarElement.querySelector(".e-calendar .e-header").appendChild(a),this.calendarElement.querySelector(".e-calendar .e-header").appendChild(s),t.prepend([s],this.calendarElement.querySelector(".e-calendar .e-header")),this.deviceCalendar=this.calendarElement,i.appendChild(this.calendarElement),this.headerTitleElement=this.calendarElement.querySelector(".e-calendar .e-header .e-title")}else{this.selectStartMonth(),this.renderCalendar(),this.leftCalCurrentDate=new Date(+this.currentDate),this.calendarElement.classList.add(w),this.leftCalPrevIcon=this.calendarElement.querySelector(".e-left-calendar .e-prev"),this.leftCalNextIcon=this.calendarElement.querySelector(".e-left-calendar .e-next"),this.leftTitle=this.calendarElement.querySelector(".e-left-calendar .e-title"),t.remove(this.calendarElement.querySelector(".e-left-calendar .e-icon-container")),this.calendarElement.querySelector(".e-left-calendar .e-header").appendChild(this.leftCalNextIcon),this.calendarElement.querySelector(".e-left-calendar .e-header").appendChild(this.leftCalPrevIcon),t.prepend([this.leftCalPrevIcon],this.calendarElement.querySelector(".e-left-calendar .e-header")),this.leftCalendar=this.calendarElement;var n=this.createElement("div",{className:"e-left-container"}),r=this.createElement("div",{className:"e-right-container"});n.appendChild(this.leftCalendar),i.appendChild(n),this.isMobile||t.EventHandler.add(this.leftTitle,"click",this.leftNavTitle,this),"Month"===this.start&&this.selectNextMonth(),"Year"===this.start&&this.selectNextYear(),"Decade"===this.start&&this.selectNextDecade(),this.renderCalendar(),this.rightCalCurrentDate=new Date(+this.currentDate),t.addClass([this.calendarElement],V),this.rightCalendar=this.calendarElement,t.removeClass([this.leftCalendar&&this.leftCalendar.querySelector(".e-content tbody")],"e-zoomin"),t.removeClass([this.rightCalendar&&this.rightCalendar.querySelector(".e-content tbody")],"e-zoomin"),this.rightCalPrevIcon=this.calendarElement.querySelector(".e-right-calendar .e-prev"),this.rightCalNextIcon=this.calendarElement.querySelector(".e-right-calendar .e-next"),this.rightTitle=this.calendarElement.querySelector(".e-right-calendar .e-title"),t.remove(this.calendarElement.querySelector(".e-right-calendar .e-icon-container")),this.calendarElement.querySelector("table").setAttribute("tabindex","-1"),this.calendarElement.querySelector(".e-right-calendar .e-header").appendChild(this.rightCalNextIcon),this.calendarElement.querySelector(".e-right-calendar .e-header").appendChild(this.rightCalPrevIcon),t.prepend([this.rightCalPrevIcon],this.calendarElement.querySelector(".e-right-calendar .e-header")),r.appendChild(this.rightCalendar),i.appendChild(r),this.isMobile||t.EventHandler.add(this.rightTitle,"click",this.rightNavTitle,this)}return i},r.prototype.leftNavTitle=function(e){this.isPopupOpen()&&(this.calendarElement=this.leftCalendar,this.calendarNavigation(e,this.calendarElement))},r.prototype.calendarNavigation=function(t,i){this.table=i.querySelector("table"),this.headerTitleElement=i.querySelector(".e-title"),this.tableBodyElement=i.querySelector("tbody"),this.tableHeadElement=i.querySelector("thead"),this.contentElement=i.querySelector(".e-content"),this.updateCalendarElement(i),e.prototype.navigateTitle.call(this,t),this.updateNavIcons()},r.prototype.rightNavTitle=function(e){this.isPopupOpen()&&(this.calendarElement=this.rightCalendar,this.calendarNavigation(e,this.calendarElement))},r.prototype.clickEventEmitter=function(e){this.isMobile||(t.closest(e.target,".e-calendar.e-left-calendar")?(this.calendarElement=this.leftCalendar,this.updateCalendarElement(this.leftCalendar)):(this.calendarElement=this.rightCalendar,this.updateCalendarElement(this.rightCalendar)))},r.prototype.currentView=function(){return e.prototype.currentView.call(this)},r.prototype.getCalendarView=function(e){return"Year"===e?"Year":"Decade"===e?"Decade":"Month"},r.prototype.navigatedEvent=function(i){if(this.trigger("navigated",this.navigatedArgs),!t.isNullOrUndefined(this.popupObj)){var s=this.getCalendarView(this.currentView());this.isMobile?s===this.depth?(this.bindCalendarCellEvents(),this.deviceNavigation(),this.removeFocusedDate(),this.checkMinMaxDays()):this.selectableDates():this.isMobile||s!==this.depth?(this.updateNavIcons(),this.calendarIconEvent()):((this.calendarElement.classList.contains("e-left-calendar")?this.leftCalendar:this.rightCalendar)!==this.leftCalendar||(!i||i.currentTarget.children[0].classList.contains("e-icons"))&&t.isNullOrUndefined(this.controlDown)?(i&&!i.currentTarget.children[0].classList.contains("e-icons")||!t.isNullOrUndefined(this.controlDown))&&(this.rightCalCurrentDate=new Date(+this.currentDate),this.effect="",this.currentDate=this.rightCalCurrentDate,this.updateCalendarElement(this.rightCalendar),this.updateControl(this.rightCalendar),this.updateCalendarElement(this.leftCalendar),this.startValue&&t.isNullOrUndefined(this.endValue)?"Month"===s&&this.startValue.getMonth()<this.rightCalCurrentDate.getMonth()&&this.startValue.getFullYear()<=this.rightCalCurrentDate.getFullYear()?e.prototype.navigateTo.call(this,s,new Date(+this.startValue)):"Year"===s&&this.startValue.getFullYear()<this.rightCalCurrentDate.getFullYear()?e.prototype.navigateTo.call(this,s,new Date(+this.startValue)):e.prototype.navigateTo.call(this,s,this.leftCalCurrentDate):e.prototype.navigateTo.call(this,s,this.leftCalCurrentDate),this.updateControl(this.leftCalendar),this.updateNavIcons(),this.calendarIconEvent(),this.calendarIconRipple(),this.controlDown=null):(this.leftCalCurrentDate=new Date(+this.currentDate),this.effect="",this.currentDate=this.leftCalCurrentDate,this.updateCalendarElement(this.leftCalendar),this.updateControl(this.leftCalendar),this.updateCalendarElement(this.rightCalendar),e.prototype.navigateTo.call(this,s,this.rightCalCurrentDate),this.updateControl(this.rightCalendar),this.updateNavIcons(),this.calendarIconEvent(),this.calendarIconRipple(),this.controlDown=null),this.checkMinMaxDays())}},r.prototype.createControl=function(){var e=this.createElement("div",{className:"e-date-range-container"}),i=this.createElement("div",{className:"e-range-header"}),s=this.createRangeHeader();i.appendChild(s);var n=this.createElement("div",{className:U});t.attributes(n,{"aria-label":"Selected Days"}),n.textContent=this.l10n.getConstant("selectedDays"),i.appendChild(n);var r=this.createElement("div",{className:"e-separator"}),l=this.createCalendar();e.appendChild(i),e.appendChild(r),e.appendChild(l);var o=this.createElement("div",{className:"e-footer"}),h=this.createElement("button",{className:"e-cancel e-flat e-css"}),u=this.createElement("button");t.addClass([u],["e-apply","e-flat","e-primary","e-css"]),o.appendChild(u),o.appendChild(h);var d=!t.isNullOrUndefined(this.startValue)&&!t.isNullOrUndefined(this.endValue);this.cancelButton=new a.Button({content:this.l10n.getConstant("cancelText")},h),this.applyButton=new a.Button({content:this.l10n.getConstant("applyText"),disabled:!d},u),t.EventHandler.add(u,"click",this.applyFunction,this),t.EventHandler.add(h,"click",this.cancelFunction,this),this.popupWrapper.appendChild(e),this.isMobile||t.isUndefined(this.presets[0].start&&this.presets[0].end&&this.presets[0].label)||(this.createPresets(),this.listRippleEffect(),t.addClass([e],"e-range-border"),t.addClass([this.popupWrapper],"e-preset-wrapper"),this.popupWrapper.querySelector(".e-presets").style.height=this.popupWrapper.querySelector(".e-date-range-container").getBoundingClientRect().height+"px"),this.popupWrapper.appendChild(o),this.isMobile&&this.deviceHeaderUpdate(),this.renderPopup()},r.prototype.cancelFunction=function(e){document.activeElement!==this.inputElement&&(this.preventFocus=!0,this.inputElement.focus(),t.addClass([this.inputWrapper.container],["e-input-focus"])),e.preventDefault(),this.isKeyPopup&&(this.inputElement.focus(),this.isKeyPopup=!1),this.startValue=null,this.endValue=null,this.removeSelection(),this.hide(e)},r.prototype.deviceHeaderUpdate=function(){t.isNullOrUndefined(this.startValue)&&t.isNullOrUndefined(this.endValue)?(this.endButton.element.setAttribute("disabled",""),this.startButton.element.classList.add(N)):t.isNullOrUndefined(this.startValue)||this.startButton.element.classList.add(N)},r.prototype.applyFunction=function(e){var i=!1;"touchstart"!==e.type&&e.preventDefault(),this.closeEventArgs&&this.closeEventArgs.cancel&&(this.startValue=this.popupWrapper.querySelector(".e-start-date")&&this.getIdValue(null,this.popupWrapper.querySelector(".e-start-date")),this.endValue=this.popupWrapper.querySelector(".e-end-date")&&this.getIdValue(null,this.popupWrapper.querySelector(".e-end-date")),this.setValue()),document.activeElement!==this.inputElement&&(this.preventFocus=!0,this.inputElement.focus(),t.addClass([this.inputWrapper.container],["e-input-focus"])),"touchstart"!==e.type&&this.closeEventArgs&&!this.closeEventArgs.cancel&&e.preventDefault(),t.isNullOrUndefined(this.startValue)||t.isNullOrUndefined(this.endValue)?this.hide(e||null):(this.previousStartValue=new Date(+this.startValue),this.previousEndValue=new Date(+this.endValue),this.previousEleValue=this.inputElement.value,s.Input.setValue(this.rangeArgs(e).text,this.inputElement,this.floatLabelType,this.showClearButton),+this.initStartDate==+this.startValue&&+this.initEndDate==+this.endValue||(i=!0),this.changeTrigger(e),this.hide(e||null),this.errorClass(),i=!0),t.closest(e.target,".e-input-group")||i||this.focusOut(),this.isMobile||(this.isKeyPopup=!1,this.isRangeIconClicked&&(this.inputWrapper.container.children[1].focus(),this.keyInputConfigs=t.extend(this.keyInputConfigs,this.keyConfigs),this.popupKeyboardModule=new t.KeyboardEvents(this.inputWrapper.container.children[1],{eventName:"keydown",keyConfigs:this.keyInputConfigs,keyAction:this.popupKeyActionHandle.bind(this)})))},r.prototype.onMouseClick=function(e,i){if("touchstart"!==e.type){var s=i||e.target,a=t.closest(s,"."+z),n=a&&a.classList.contains(N);a&&a.classList.contains(z)&&this.setListSelection(a,e),this.preventFocus=!0,this.inputElement.focus(),this.isMobile||(this.preventFocus=!0,a&&a.classList.contains(z)&&"custom_range"===a.getAttribute("id")?this.leftCalendar.children[1].firstElementChild.focus():n||"keydown"!==e.type||this.inputElement.focus())}},r.prototype.onMouseOver=function(e){var i=t.closest(e.target,"."+z);i&&i.classList.contains(z)&&!i.classList.contains(L)&&t.addClass([i],L)},r.prototype.onMouseLeave=function(e){var i=t.closest(e.target,"."+L);t.isNullOrUndefined(i)||t.removeClass([i],L)},r.prototype.setListSelection=function(e,i){if(e&&(!e.classList.contains(N)||this.isMobile&&e.classList.contains(N))){if(this.isMobile&&e.classList.contains(N)){if(this.activeIndex=Array.prototype.slice.call(this.liCollections).indexOf(e),"custom_range"===this.presetsItem[this.activeIndex].id)return void this.renderCustomPopup();return}this.removeListSelection(),this.activeIndex=Array.prototype.slice.call(this.liCollections).indexOf(e),t.addClass([e],N),e.setAttribute("aria-selected","true");var s=this.presetsItem[this.activeIndex];"custom_range"===s.id?this.renderCustomPopup():this.applyPresetRange(s,i)}},r.prototype.removeListSelection=function(){var e=this.presetElement.querySelector(".e-active");t.isNullOrUndefined(e)||(t.removeClass([e],N),e.removeAttribute("aria-selected"))},r.prototype.setValue=function(){this.modelValue=[this.startValue,this.endValue]},r.prototype.applyPresetRange=function(e,t){this.hide(null),this.presetsItem[this.presetsItem.length-1].start=null,this.presetsItem[this.presetsItem.length-1].end=null,this.startValue=e.start,this.endValue=e.end,this.setValue(),this.refreshControl(),this.trigger("select",this.rangeArgs(t)),this.changeTrigger(t),this.previousEleValue=this.inputElement.value,this.isCustomRange=!1,this.leftCalendar=this.rightCalendar=null,this.isKeyPopup&&(this.isRangeIconClicked=!1,this.inputElement.focus())},r.prototype.showPopup=function(e,t){this.presetHeight(),1e3===this.zIndex?this.popupObj.show(null,this.element):this.popupObj.show(null,null),this.isMobile&&this.popupObj.refreshPosition()},r.prototype.renderCustomPopup=function(){this.isCustomWindow=!0,this.popupObj.hide(),this.popupWrapper=this.createElement("div",{id:this.element.id+"_popup",className:O+" e-popup"}),this.renderControl(),this.openEventArgs.appendTo.appendChild(this.popupWrapper),this.showPopup(),this.isCustomRange=!0,this.isMobile||this.calendarFocus()},r.prototype.listRippleEffect=function(){for(var e=0,i=this.liCollections;e<i.length;e++){var s=i[e];t.rippleEffect(s)}},r.prototype.createPresets=function(){if(!t.isUndefined(this.presets[0].start&&this.presets[0].end&&this.presets[0].label)){this.presetElement=this.createElement("div",{className:"e-presets",attrs:{tabindex:"0"}});var e=n.ListBase.createList(this.createElement,this.presetsItem,null,!0);t.attributes(e,{role:"listbox","aria-hidden":"false",id:this.element.id+"_options"}),this.presetElement.appendChild(e),this.popupWrapper.appendChild(this.presetElement);var i=this.presetElement.querySelector("#custom_range");t.isNullOrUndefined(i)||(i.textContent=""!==this.l10n.getConstant("customRange")?this.l10n.getConstant("customRange"):"Custom Range"),this.liCollections=this.presetElement.querySelectorAll("."+z),this.wireListEvents(),this.isMobile&&(this.presetElement.style.width=this.inputWrapper.container.getBoundingClientRect().width+"px"),!t.isNullOrUndefined(this.activeIndex)&&this.activeIndex>-1&&t.addClass([this.liCollections[this.activeIndex]],N)}},r.prototype.wireListEvents=function(){t.EventHandler.add(this.presetElement,"click",this.onMouseClick,this),this.isMobile||(t.EventHandler.add(this.presetElement,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.presetElement,"mouseout",this.onMouseLeave,this))},r.prototype.unWireListEvents=function(){t.isNullOrUndefined(this.presetElement)||(t.EventHandler.remove(this.presetElement,"click touchstart",this.onMouseClick),this.isMobile||(t.EventHandler.remove(this.presetElement,"mouseover",this.onMouseOver),t.EventHandler.remove(this.presetElement,"mouseout",this.onMouseLeave)))},r.prototype.renderPopup=function(){var e=this;this.popupWrapper.classList.add("e-control");var s=this.popupWrapper.getBoundingClientRect().width;t.isNullOrUndefined(this.cssClass)||""===this.cssClass.trim()||(this.popupWrapper.className+=" "+this.cssClass),this.isMobile&&this.isCustomWindow&&(this.modal=this.createElement("div"),document.body.appendChild(this.modal)),this.popupObj=new i.Popup(this.popupWrapper,{relateTo:this.isMobile&&this.isCustomWindow?document.body:t.isNullOrUndefined(this.targetElement)?this.inputWrapper.container:this.targetElement,position:this.isMobile?t.isUndefined(this.presets[0].start&&this.presets[0].end&&this.presets[0].label)||this.isCustomWindow?{X:"center",Y:"center"}:{X:"left",Y:"bottom"}:this.enableRtl?{X:"left",Y:"bottom"}:{X:"right",Y:"bottom"},offsetX:this.isMobile||this.enableRtl?0:-s,offsetY:4,collision:this.isMobile?t.isUndefined(this.presets[0].start&&this.presets[0].end&&this.presets[0].label)||this.isCustomWindow?{X:"fit",Y:"fit"}:{X:"fit"}:{X:"fit",Y:"flip"},targetType:this.isMobile&&this.isCustomWindow?"container":"relative",enableRtl:this.enableRtl,zIndex:this.zIndex,open:function(){t.attributes(e.inputElement,{"aria-expanded":"true"}),t.addClass([e.inputWrapper.buttons[0]],N),e.isMobile||(e.cancelButton&&(e.btnKeyboardModule=new t.KeyboardEvents(e.cancelButton.element,{eventName:"keydown",keyAction:e.popupKeyActionHandle.bind(e),keyConfigs:{tab:"tab",altRightArrow:"alt+rightarrow",altLeftArrow:"alt+leftarrow"}}),e.btnKeyboardModule=new t.KeyboardEvents(e.applyButton.element,{eventName:"keydown",keyAction:e.popupKeyActionHandle.bind(e),keyConfigs:{altRightArrow:"alt+rightarrow",altLeftArrow:"alt+leftarrow"}})),t.isNullOrUndefined(e.leftCalendar)||e.isRangeIconClicked||e.calendarFocus(),t.isNullOrUndefined(e.presetElement)||(e.keyInputConfigs=t.extend(e.keyInputConfigs,e.keyConfigs),e.presetKeyboardModule=new t.KeyboardEvents(e.presetElement,{eventName:"keydown",keyAction:e.presetKeyActionHandler.bind(e),keyConfigs:e.keyInputConfigs}),e.presetKeyboardModule=new t.KeyboardEvents(e.presetElement,{eventName:"keydown",keyAction:e.popupKeyActionHandle.bind(e),keyConfigs:{altRightArrow:"alt+rightarrow",altLeftArrow:"alt+leftarrow"}}),t.isNullOrUndefined(e.leftCalendar)?(e.preventBlur=!0,e.presetElement.focus()):e.presetElement.setAttribute("tabindex","-1")),e.popupKeyBoardHandler()),e.isMobile&&!t.Browser.isDevice&&t.EventHandler.add(document,"keydown",e.popupCloseHandler,e)},close:function(){t.attributes(e.inputElement,{"aria-expanded":"false"}),t.removeClass([e.inputWrapper.buttons[0]],N),e.isRangeIconClicked&&e.inputWrapper.container.children[1].focus(),t.isUndefined(e.presets[0].start&&e.presets[0].end&&e.presets[0].label)||e.unWireListEvents(),t.isNullOrUndefined(e.popupObj)||(t.isNullOrUndefined(e.popupObj.element.parentElement)||t.detach(e.popupObj.element),e.popupObj.destroy(),e.popupObj=null),e.isMobile&&!t.Browser.isDevice&&t.EventHandler.remove(document,"keydown",e.popupCloseHandler)},targetExitViewport:function(){t.Browser.isDevice||e.hide()}}),this.isMobile&&(this.popupObj.element.classList.add("e-device"),this.isMobile||this.popupObj.element.classList.add("e-bigger")),this.isMobile&&this.isCustomWindow&&(t.addClass([this.modal],["e-device",O,"e-range-modal"]),document.body.className+=" e-range-overflow",this.modal.style.display="block"),t.EventHandler.add(document,"mousedown touchstart",this.documentHandler,this)},r.prototype.popupCloseHandler=function(e){switch(e.keyCode){case 27:this.hide(e)}},r.prototype.calendarFocus=function(){var e=this.popupObj&&this.popupObj.element.querySelector("."+I);if(e){var i=t.closest(e,"."+V);i=t.isNullOrUndefined(i)?this.leftCalendar:i,this.isRangeIconClicked?this.inputWrapper.container.focus():(this.preventBlur=!0,i.children[1].firstElementChild.focus()),t.addClass([e],P)}else this.isRangeIconClicked?this.inputWrapper.container.focus():(this.preventBlur=!0,this.leftCalendar.children[1].firstElementChild.focus())},r.prototype.presetHeight=function(){var e=this.popupObj&&this.popupObj.element.querySelector(".e-presets"),i=this.popupObj&&this.popupObj.element.querySelector(".e-date-range-container");t.isNullOrUndefined(e)||t.isNullOrUndefined(i)||(e.style.height=i.getBoundingClientRect().height+"px")},r.prototype.presetKeyActionHandler=function(e){switch(e.action){case"moveDown":this.listMoveDown(e),this.setScrollPosition(),e.preventDefault();break;case"moveUp":this.listMoveUp(e),this.setScrollPosition(),e.preventDefault();break;case"enter":var i=this.getHoverLI(),s=this.getActiveLI();if(!t.isNullOrUndefined(this.leftCalendar)&&!t.isNullOrUndefined(s)&&(t.isNullOrUndefined(i)||!t.isNullOrUndefined(s)&&s===i)&&(this.activeIndex=Array.prototype.slice.call(this.liCollections).indexOf(s),"custom_range"===this.presetsItem[this.activeIndex].id))return this.calendarFocus(),s.classList.remove(L),void e.preventDefault();t.isNullOrUndefined(i)&&t.isNullOrUndefined(s)||this.onMouseClick(e,i||s),e.preventDefault();break;case"tab":if(this.leftCalendar){var a=this.getHoverLI();t.isNullOrUndefined(a)||a.classList.remove(L)}else this.hide(e),e.preventDefault()}},r.prototype.listMoveDown=function(e){var i=this.getHoverLI(),s=this.getActiveLI();if(t.isNullOrUndefined(i))if(t.isNullOrUndefined(s))t.addClass([this.liCollections[0]],L);else{a=s.nextElementSibling;!t.isNullOrUndefined(a)&&a.classList.contains(z)&&t.addClass([a],L)}else{var a=i.nextElementSibling;!t.isNullOrUndefined(a)&&a.classList.contains(z)&&(t.removeClass([i],L),t.addClass([a],L))}},r.prototype.listMoveUp=function(e){var i=this.getHoverLI(),s=this.getActiveLI();if(t.isNullOrUndefined(i)){if(!t.isNullOrUndefined(s)){a=s.previousElementSibling;!t.isNullOrUndefined(a)&&a.classList.contains(z)&&t.addClass([a],L)}}else{var a=i.previousElementSibling;!t.isNullOrUndefined(a)&&a.classList.contains(z)&&(t.removeClass([i],L),t.addClass([a],L))}},r.prototype.getHoverLI=function(){return this.presetElement.querySelector("."+L)},r.prototype.getActiveLI=function(){return this.presetElement.querySelector(".e-active")},r.prototype.popupKeyBoardHandler=function(){this.popupKeyboardModule=new t.KeyboardEvents(this.popupWrapper,{eventName:"keydown",keyAction:this.popupKeyActionHandle.bind(this),keyConfigs:{escape:"escape"}}),this.keyInputConfigs=t.extend(this.keyInputConfigs,this.keyConfigs),this.popupKeyboardModule=new t.KeyboardEvents(this.inputWrapper.container.children[1],{eventName:"keydown",keyAction:this.popupKeyActionHandle.bind(this),keyConfigs:this.keyInputConfigs})},r.prototype.setScrollPosition=function(){var e=this.presetElement.getBoundingClientRect().height,i=this.presetElement.querySelector("."+L),s=this.presetElement.querySelector(".e-active"),a=t.isNullOrUndefined(i)?s:i;if(!t.isNullOrUndefined(a)){var n=a.nextElementSibling,r=n?n.offsetTop:a.offsetTop,l=a.getBoundingClientRect().height;r+a.offsetTop>e?this.presetElement.scrollTop=n?r-(e/2+l/2):r:this.presetElement.scrollTop=0}},r.prototype.popupKeyActionHandle=function(e){var i=t.closest(e.target,".e-presets");switch(e.action){case"escape":this.isPopupOpen()?(this.isKeyPopup&&(this.inputElement.focus(),this.isKeyPopup=!1),this.hide(e)):this.inputWrapper.container.children[1].blur();break;case"enter":this.isPopupOpen()?this.inputWrapper.container.children[1].focus():this.show(null,e);break;case"tab":this.hide(e);break;case"altRightArrow":t.isNullOrUndefined(i)?document.activeElement===this.cancelButton.element&&!0!==this.applyButton.element.disabled?this.applyButton.element.focus():this.leftCalendar.children[1].firstElementChild.focus():this.cancelButton.element.focus(),e.preventDefault();break;case"altLeftArrow":t.isNullOrUndefined(i)?document.activeElement===this.applyButton.element&&!0!==this.applyButton.element.disabled?this.cancelButton.element.focus():t.isNullOrUndefined(this.presetElement)||document.activeElement!==this.cancelButton.element?this.rightCalendar.children[1].firstElementChild.focus():this.presetElement.focus():this.rightCalendar.children[1].firstElementChild.focus(),e.preventDefault()}},r.prototype.documentHandler=function(e){if(!t.isNullOrUndefined(this.popupObj)){var i=e.target;this.inputWrapper.container.contains(i)&&(t.isNullOrUndefined(this.popupObj)||t.closest(i,'[id="'+this.popupWrapper.id+'"]'))||"touchstart"!==e.type&&("mousedown"===e.type||this.closeEventArgs&&!this.closeEventArgs.cancel)&&e.preventDefault(),!t.isNullOrUndefined(this.targetElement)&&(t.isNullOrUndefined(this.targetElement)||i===this.targetElement)||t.closest(i,'[id="'+this.popupWrapper.id+'"]')||t.closest(i,".e-input-group")===this.inputWrapper.container||t.closest(i,".e-daterangepicker.e-popup")&&!i.classList.contains("e-day")||(this.preventBlur=!1,this.isPopupOpen()&&document.body.contains(this.popupObj.element)&&(this.applyFunction(e),this.isMobile||(this.isRangeIconClicked=!1)))}},r.prototype.createInput=function(){var e=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(e=this.cssClass.replace(/\s+/g," ").trim()),this.inputWrapper=s.Input.createInput({floatLabelType:this.floatLabelType,element:this.inputElement,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:e,enabled:this.enabled,enableRtl:this.enableRtl,showClearButton:this.showClearButton},buttons:["e-input-group-icon e-range-icon e-icons"]},this.createElement),t.attributes(this.inputElement,{"aria-readonly":this.readonly?"true":"false",tabindex:"0","aria-haspopup":"true","aria-activedescendant":"null","aria-owns":this.element.id+"_popup","aria-expanded":"false",role:"combobox",autocomplete:"off","aria-disabled":this.enabled?"false":"true",autocorrect:"off",autocapitalize:"off",spellcheck:"false"}),s.Input.addAttributes({"aria-label":"select"},this.inputWrapper.buttons[0]),t.isNullOrUndefined(this.placeholder)||""===this.placeholder.trim()||s.Input.addAttributes({"aria-placeholder":this.placeholder},this.inputElement),this.setEleWidth(this.width),t.addClass([this.inputWrapper.container],"e-date-range-wrapper"),t.isNullOrUndefined(this.inputElement.getAttribute("name"))&&t.attributes(this.inputElement,{name:this.element.id}),"hidden"===this.inputElement.type&&(this.inputWrapper.container.style.display="none"),this.refreshControl(),this.previousEleValue=this.inputElement.value,this.inputElement.setAttribute("value",this.inputElement.value),this.startCopy=this.startDate,this.endCopy=this.endDate},r.prototype.setEleWidth=function(e){this.inputWrapper.container.style.width="string"==typeof e?this.width:"number"==typeof e?t.formatUnit(this.width):"100%"},r.prototype.adjustLongHeaderWidth=function(){"Wide"===this.dayHeaderFormat&&t.addClass([this.popupWrapper],"e-daterange-day-header-lg")},r.prototype.refreshControl=function(){this.validateMinMax(),this.strictMode&&this.validateRangeStrict();var e=this.disabledDates();this.strictMode&&e&&(this.startValue=this.previousStartValue,this.setProperties({startDate:this.startValue},!0),this.endValue=this.previousEndValue,this.setProperties({endDate:this.endValue},!0),this.setValue()),this.updateInput(),this.strictMode||this.validateRange(),!this.strictMode&&e&&this.clearRange(),t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)||e||this.disabledDateRender(),this.errorClass(),this.previousStartValue=t.isNullOrUndefined(this.startValue)||isNaN(+this.startValue)?null:new Date(+this.startValue),this.previousEndValue=t.isNullOrUndefined(this.endValue)||isNaN(+this.endValue)?null:new Date(+this.endValue)},r.prototype.updateInput=function(){if(!t.isNullOrUndefined(this.endValue)&&!t.isNullOrUndefined(this.startValue)){var e={format:this.formatString,type:"date",skeleton:t.isBlazor()?"d":"yMd"},i=this.globalize.formatDate(this.startValue,e),a=this.globalize.formatDate(this.endValue,e);s.Input.setValue(i+" "+this.separator+" "+a,this.inputElement,this.floatLabelType,this.showClearButton),this.previousStartValue=new Date(+this.startValue),this.previousEndValue=new Date(+this.endValue)}!this.strictMode&&t.isNullOrUndefined(this.value)&&this.invalidValueString&&s.Input.setValue(this.invalidValueString,this.inputElement,this.floatLabelType,this.showClearButton)},r.prototype.checkInvalidRange=function(e){if(!t.isNullOrUndefined(e)){var i=!1,s=void 0,a=void 0,n=null,r=null,l=null,o=!1,h=!1,u=!1;if("string"==typeof e){var d=e.split(" "+this.separator+" ");2===d.length?(n=d[0],r=d[1]):(i=!0,l=e)}else e.length>0?(s=e[0],a=e[1]):(s=e.start,a=e.end),s instanceof Date||"object"==typeof s?s instanceof Date?o=!0:t.isNullOrUndefined(s)||(u=!0):n=this.getstringvalue(s),a instanceof Date||"object"==typeof a?a instanceof Date?h=!0:t.isNullOrUndefined(a)||(u=!0):r=this.getstringvalue(a);(t.isNullOrUndefined(n)&&!o&&!t.isNullOrUndefined(r)||!t.isNullOrUndefined(n)&&!h&&t.isNullOrUndefined(r))&&(i=!0),u&&(n=r=l=null,i=!0),n&&(i=i||this.checkInvalidValue(n)),r&&(i=i||this.checkInvalidValue(r)),i&&(o&&!u&&(n=s.toLocaleDateString()),h&&!u&&(r=a.toLocaleDateString()),t.isNullOrUndefined(n)||t.isNullOrUndefined(r)?t.isNullOrUndefined(n)?t.isNullOrUndefined(r)||(l=r):l=n:l=n+" "+this.separator+" "+r,this.invalidValueString=l,this.setProperties({value:null},!0),this.setProperties({startValue:null},!0),this.setProperties({endValue:null},!0),this.startDate=null,this.endDate=null)}},r.prototype.getstringvalue=function(e){var i=null;return t.isNullOrUndefined(e)||"number"!=typeof e?t.isNullOrUndefined(e)||"string"!=typeof e||(i=""+e):i=e.toString(),i},r.prototype.checkInvalidValue=function(e){var i=e,s=!1,a=null;if(a={format:this.formatString,type:"date",skeleton:t.isBlazor()?"d":"yMd"},"string"!=typeof i)s=!0;else{var n=new t.Internationalization(this.locale);if(!this.checkDateValue(n.parseDate(i,a))){var r=null;r=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,(!/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/.test(i)&&!r.test(i)||/^[a-zA-Z0-9- ]*$/.test(i)||isNaN(+new Date(this.checkValue(i))))&&(s=!0)}}return s},r.prototype.isDateDisabled=function(e){if(t.isNullOrUndefined(e))return!1;var i=new Date(+e);if(+i<+this.min||+i>+this.max)return!0;this.virtualRenderCellArgs={date:i,isDisabled:!1};var s=this.virtualRenderCellArgs;return this.virtualRenderCellEvent(s),!!s.isDisabled},r.prototype.disabledDateRender=function(){this.disabledDays=[],this.disabledDayCnt=null;for(var e=new Date(+this.startValue),t=0;+e<=+this.endValue;){this.virtualRenderCellArgs={date:e,isDisabled:!1};var i=this.virtualRenderCellArgs;this.virtualRenderCellEvent(i),i.isDisabled&&(this.disabledDays.push(new Date(+i.date)),+e>+this.startValue&&+e<+this.endValue&&t++),this.addDay(e,1,null,this.max,this.min)}this.disabledDayCnt=t},r.prototype.virtualRenderCellEvent=function(e){t.extend(this.virtualRenderCellArgs,{name:"renderDayCell"}),this.trigger("renderDayCell",e)},r.prototype.disabledDates=function(){var e=!1,i=!1;return t.isNullOrUndefined(this.endValue)||t.isNullOrUndefined(this.startValue)||(e=this.isDateDisabled(this.startValue),i=this.isDateDisabled(this.endValue),this.isPopupOpen()||(this.currentDate=null),this.setValue()),e||i},r.prototype.setModelValue=function(){this.value||null!==this.startDate||null!==this.endDate?null===this.value||null===this.value.start?null===this.value?this.setProperties({value:[this.startDate,this.endDate]},!0):null===this.value.start&&this.setProperties({value:{start:this.startDate,end:this.endDate}},!0):this.value&&this.value.length>0||this.valueType&&this.valueType.length>0?(+this.startDate==+this.value[0]&&+this.endDate==+this.value[1]||this.setProperties({value:[this.startDate,this.endDate]},!0),this.value&&null==this.value[0]&&null==this.value[1]&&this.setProperties({value:null},!0)):this.value&&this.value.start&&this.setProperties({value:{start:this.startDate,end:this.endDate}},!0):this.setProperties({value:null},!0),this.createHiddenInput()},r.prototype.dispatchEvent=function(e,t){var i=document.createEvent("HTMLEvents");i.initEvent(t,!1,!0),e.dispatchEvent(i),this.firstHiddenChild.dispatchEvent(i)},r.prototype.changeTrigger=function(e){+this.initStartDate==+this.startValue&&+this.initEndDate==+this.endValue||(this.setProperties({endDate:this.checkDateValue(this.endValue)},!0),this.setProperties({startDate:this.checkDateValue(this.startValue)},!0),this.setModelValue(),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",this.rangeArgs(e))),this.previousEleValue=this.inputElement.value,this.initStartDate=this.checkDateValue(this.startValue),this.initEndDate=this.checkDateValue(this.endValue)},r.prototype.navigateTo=function(t,i){if(this.isPopupOpen()){if("month"===t.toLowerCase())t="Month";else if("year"===t.toLowerCase())t="Year";else{if("decade"!==t.toLowerCase())return;t="Decade"}this.getViewNumber(t)<this.getViewNumber(this.depth)&&(t=this.depth),this.isMobile?e.prototype.navigateTo.call(this,t,i):(i<this.min?i=new Date(+this.min):i>=this.max&&(i=new Date(+this.max)),"Month"===t&&this.isSameMonth(i,this.max)?i=new Date(this.max.getFullYear(),this.max.getMonth()-1,this.min.getDate()):"Year"===t&&this.isSameYear(i,this.max)?i=new Date(this.max.getFullYear()-1,this.max.getMonth(),this.max.getDate()):"Decade"===t&&this.isSameDecade(i,this.max)&&(i=new Date(this.max.getFullYear()-10,this.max.getMonth(),this.max.getDate())),this.leftCalCurrentDate=i,this.navigate(this.leftCalendar,this.leftCalCurrentDate,t),i="Month"===t?new Date(this.currentDate.setMonth(this.currentDate.getMonth()+1)):"Year"===t?new Date(this.currentDate.setFullYear(this.currentDate.getFullYear()+1)):new Date(this.currentDate.setFullYear(this.currentDate.getFullYear()+10)),this.rightCalCurrentDate=i,this.navigate(this.rightCalendar,this.rightCalCurrentDate,t),this.leftKeyboardModule=this.rightKeyboardModule=null,this.updateNavIcons()),this.currentView()===this.depth&&this.bindCalendarCellEvents(),this.removeFocusedDate(),this.updateRange(this.isMobile?[this.calendarElement]:[this.leftCalendar,this.rightCalendar])}},r.prototype.navigate=function(t,i,s){this.calendarElement=t,this.table=t.querySelector("table"),this.tableBodyElement=t.querySelector("tbody"),this.headerTitleElement=t.querySelector(".e-title"),this.tableHeadElement=t.querySelector("thead"),this.contentElement=t.querySelector(".e-content"),this.previousIcon=t.querySelector(".e-prev"),this.nextIcon=t.querySelector(".e-next"),this.effect="e-zoomin",e.prototype.navigateTo.call(this,s,i)},r.prototype.focusIn=function(){document.activeElement!==this.inputElement&&this.enabled&&(t.addClass([this.inputWrapper.container],["e-input-focus"]),this.inputElement.focus())},r.prototype.focusOut=function(){var e=this.preventBlur;document.activeElement===this.inputElement&&(t.removeClass([this.inputWrapper.container],["e-input-focus"]),this.preventBlur=!1,this.inputElement.blur(),this.preventBlur=e)},r.prototype.destroy=function(){this.unBindEvents(),this.hide(null);var i={"aria-readonly":this.readonly?"true":"false",tabindex:"0","aria-haspopup":"true","aria-activedescendant":"null","aria-owns":this.element.id+"_popup","aria-expanded":"false",role:"combobox",autocomplete:"off","aria-disabled":this.enabled?"false":"true",autocorrect:"off",autocapitalize:"off","aria-invalid":"false",spellcheck:"false"};this.inputElement&&(t.removeClass([this.inputElement],[O]),t.EventHandler.remove(this.inputElement,"blur",this.inputBlurHandler),s.Input.removeAttributes(i,this.inputElement),t.isNullOrUndefined(this.cloneElement.getAttribute("tabindex"))?this.inputElement.removeAttribute("tabindex"):this.inputElement.setAttribute("tabindex",this.tabIndex),this.ensureInputAttribute(),this.inputElement.classList.remove("e-input"),t.isNullOrUndefined(this.inputWrapper)||(t.EventHandler.remove(this.inputWrapper.buttons[0],"mousedown",this.rangeIconHandler),null===this.angularTag&&this.inputWrapper.container.parentElement.appendChild(this.inputElement),t.detach(this.inputWrapper.container))),t.isNullOrUndefined(this.inputKeyboardModule)||this.isMobile||this.inputKeyboardModule.destroy(),this.popupObj&&(this.isMobile||this.clearCalendarEvents()),e.prototype.destroy.call(this),this.inputWrapper=this.popupWrapper=this.popupObj=this.cloneElement=this.presetElement=null,this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler),t.isNullOrUndefined(this.firstHiddenChild)||t.isNullOrUndefined(this.secondHiddenChild)||(t.detach(this.firstHiddenChild),t.detach(this.secondHiddenChild),this.firstHiddenChild=this.secondHiddenChild=null,this.inputElement.setAttribute("name",this.element.getAttribute("data-name")),this.inputElement.removeAttribute("data-name"))},r.prototype.ensureInputAttribute=function(){for(var e=[],i=0;i<this.inputElement.attributes.length;i++)e[i]=this.inputElement.attributes[i].name;for(i=0;i<e.length;i++)t.isNullOrUndefined(this.cloneElement.getAttribute(e[i]))?("value"===e[i].toLowerCase()&&(this.inputElement.value=""),this.inputElement.removeAttribute(e[i])):("value"===e[i].toLowerCase()&&(this.inputElement.value=this.cloneElement.getAttribute(e[i])),this.inputElement.setAttribute(e[i],this.cloneElement.getAttribute(e[i])))},r.prototype.getModuleName=function(){return"daterangepicker"},r.prototype.getPersistData=function(){var e=["startDate","endDate","value"];return this.addOnPersist(e)},r.prototype.getSelectedRange=function(){var e;return t.isNullOrUndefined(this.startValue)||t.isNullOrUndefined(this.endValue)?e=0:(e=Math.round(Math.abs((this.removeTimeValueFromDate(this.startValue).getTime()-this.removeTimeValueFromDate(this.endValue).getTime())/864e5))+1,this.disabledDateRender(),t.isNullOrUndefined(this.disabledDayCnt)||(e-=this.disabledDayCnt,this.disabledDayCnt=null)),{startDate:this.startValue,endDate:this.endValue,daySpan:e}},r.prototype.show=function(i,s){var a=this;if(this.isMobile&&this.popupObj&&this.popupObj.refreshPosition(),!(this.enabled&&this.readonly||!this.enabled||this.popupObj||this.isPopupOpen())){i&&(this.targetElement=i),this.createPopup(),(this.isMobile||t.Browser.isDevice)&&(this.mobileRangePopupWrap=this.createElement("div",{className:"e-daterangepick-mob-popup-wrap"}),document.body.appendChild(this.mobileRangePopupWrap)),this.openEventArgs={popup:t.isBlazor()&&this.isServerRendered?null:this.popupObj||null,cancel:!1,date:this.inputElement.value,model:t.isBlazor()&&this.isServerRendered?null:this,event:s||null,appendTo:this.isMobile||t.Browser.isDevice?this.mobileRangePopupWrap:document.body};var n=this.openEventArgs;this.trigger("open",n,function(n){if(a.openEventArgs=n,!a.openEventArgs.cancel){a.openEventArgs.appendTo.appendChild(a.popupWrapper),a.showPopup(i,s);var r=!a.isCustomRange||a.isMobile&&a.isCustomRange;!t.isUndefined(a.presets[0].start&&a.presets[0].end&&a.presets[0].label)&&r&&a.setScrollPosition(),a.checkMinMaxDays(),a.isMobile&&!t.isNullOrUndefined(a.startDate)&&t.isNullOrUndefined(a.endDate)&&(a.endButton.element.classList.add(N),a.startButton.element.classList.remove(N),a.endButton.element.removeAttribute("disabled"),a.selectableDates()),e.prototype.setOverlayIndex.call(a,a.mobileRangePopupWrap,a.popupObj.element,a.modal,a.isMobile||t.Browser.isDevice)}})}},r.prototype.hide=function(e){var i=this;if(this.popupObj){if(t.isNullOrUndefined(this.previousEndValue)&&t.isNullOrUndefined(this.previousStartValue)?this.clearRange():(t.isNullOrUndefined(this.previousStartValue)?(this.startValue=null,this.setValue()):(this.startValue=new Date(this.checkValue(this.previousStartValue)),this.setValue(),this.currentDate=new Date(this.checkValue(this.startValue))),t.isNullOrUndefined(this.previousEndValue)?(this.endValue=null,this.setValue()):(this.endValue=new Date(this.checkValue(this.previousEndValue)),this.setValue())),this.isPopupOpen()){this.closeEventArgs={cancel:!1,popup:t.isBlazor()&&this.isServerRendered?null:this.popupObj,date:this.inputElement.value,model:t.isBlazor()&&this.isServerRendered?null:this,event:e||null};var s=this.closeEventArgs;this.trigger("close",s,function(e){i.closeEventArgs=e,i.closeEventArgs.cancel?t.removeClass([i.inputWrapper.buttons[0]],N):(i.isMobile&&(t.isNullOrUndefined(i.startButton)||t.isNullOrUndefined(i.endButton)||(t.EventHandler.remove(i.startButton.element,"click touchstart",i.deviceHeaderClick),t.EventHandler.remove(i.endButton.element,"click touchstart",i.deviceHeaderClick))),i.popupObj&&(i.popupObj.hide(),i.preventBlur&&(i.inputElement.focus(),t.addClass([i.inputWrapper.container],["e-input-focus"]))),i.isMobile||(t.isNullOrUndefined(i.leftKeyboardModule)||t.isNullOrUndefined(i.rightKeyboardModule)||(i.leftKeyboardModule.destroy(),i.rightKeyboardModule.destroy()),t.isNullOrUndefined(i.presetElement)||i.presetKeyboardModule.destroy(),t.isNullOrUndefined(i.cancelButton)||i.btnKeyboardModule.destroy()),i.targetElement=null,t.removeClass([document.body],"e-range-overflow"),t.EventHandler.remove(document,"mousedown touchstart",i.documentHandler),i.isMobile&&i.modal&&(i.modal.style.display="none",i.modal.outerHTML="",i.modal=null),(i.isMobile||t.Browser.isDevice)&&(t.isNullOrUndefined(i.mobileRangePopupWrap)||(i.mobileRangePopupWrap.remove(),i.mobileRangePopupWrap=null)),i.isKeyPopup=i.dateDisabled=!1),i.updateClearIconState(),i.updateHiddenInput(),i.isMobile&&i.allowEdit&&!i.readonly&&i.inputElement.removeAttribute("readonly")})}}else this.updateClearIconState(),this.updateHiddenInput(),this.isMobile&&this.allowEdit&&!this.readonly&&this.inputElement.removeAttribute("readonly")},r.prototype.setLocale=function(){this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),s.Input.setPlaceholder(this.placeholder,this.inputElement),this.updateInput(),this.updateHiddenInput(),this.changeTrigger()},r.prototype.refreshChange=function(){this.checkView(),this.refreshControl(),this.changeTrigger()},r.prototype.setDate=function(){s.Input.setValue("",this.inputElement,this.floatLabelType,this.showClearButton),this.refreshChange()},r.prototype.enableInput=function(){+this.min<=+this.max&&(this.setProperties({enabled:!0},!0),s.Input.setEnabled(this.enabled,this.inputElement),this.element.hasAttribute("disabled")&&this.bindEvents())},r.prototype.clearModelvalue=function(e,t){this.setProperties({startDate:null},!0),this.setProperties({endDate:null},!0),t.value&&t.value.length>0?this.setProperties({value:null},!0):t.value&&t.value.start?this.setProperties({value:{start:null,end:null}},!0):t.value&&!t.value.start&&this.setProperties({value:{start:null,end:null}},!0),this.updateValue(),this.setDate()},r.prototype.createHiddenInput=function(){t.isNullOrUndefined(this.firstHiddenChild)&&t.isNullOrUndefined(this.secondHiddenChild)&&(this.firstHiddenChild=this.createElement("input"),this.secondHiddenChild=this.createElement("input")),t.isNullOrUndefined(this.inputElement.getAttribute("name"))||(this.inputElement.setAttribute("data-name",this.inputElement.getAttribute("name")),this.inputElement.removeAttribute("name")),t.attributes(this.firstHiddenChild,{type:"text",name:this.inputElement.getAttribute("data-name"),class:"e-daterange-hidden"}),t.attributes(this.secondHiddenChild,{type:"text",name:this.inputElement.getAttribute("data-name"),class:"e-daterange-hidden"});var e={type:"datetime",skeleton:t.isBlazor()?"d":"yMd"};this.firstHiddenChild.value=this.startDate&&this.globalize.formatDate(this.startDate,e),this.secondHiddenChild.value=this.endDate&&this.globalize.formatDate(this.endDate,e),this.inputElement.parentElement.appendChild(this.firstHiddenChild),this.inputElement.parentElement.appendChild(this.secondHiddenChild)},r.prototype.setMinMaxDays=function(){this.isPopupOpen()&&(this.removeClassDisabled(),this.checkMinMaxDays(),this.isMobile&&this.selectableDates(),!this.strictMode&&t.isNullOrUndefined(this.startValue)&&t.isNullOrUndefined(this.endValue)?this.removeSelection():this.updateRange(this.isMobile?[this.calendarElement]:[this.leftCalendar,this.rightCalendar]),this.updateHeader())},r.prototype.onPropertyChanged=function(e,i){for(var a={format:this.formatString,type:"date",skeleton:t.isBlazor()?"d":"yMd"},n=0,r=Object.keys(e);n<r.length;n++){var l=r[n];switch(["maxDays","minDays","value"].indexOf(l)<0&&this.hide(null),l){case"width":this.setEleWidth(this.width);break;case"separator":this.previousEleValue=this.inputElement.value,this.setProperties({separator:e.separator},!0),this.updateInput(),this.changeTrigger();break;case"placeholder":s.Input.setPlaceholder(e.placeholder,this.inputElement),this.setProperties({placeholder:e.placeholder},!0);break;case"readonly":s.Input.setReadonly(this.readonly,this.inputElement),this.inputElement.setAttribute("aria-readonly",""+this.readonly),this.setRangeAllowEdit();break;case"cssClass":this.updateCssClass(e.cssClass,i.cssClass);break;case"enabled":this.setProperties({enabled:e.enabled},!0),s.Input.setEnabled(this.enabled,this.inputElement),this.enabled?this.inputElement.setAttribute("tabindex",this.tabIndex):this.inputElement.tabIndex=-1;break;case"allowEdit":this.setRangeAllowEdit();break;case"enableRtl":this.setProperties({enableRtl:e.enableRtl},!0),s.Input.setEnableRtl(this.enableRtl,[this.inputWrapper.container]);break;case"zIndex":this.setProperties({zIndex:e.zIndex},!0);break;case"format":this.setProperties({format:e.format},!0),this.checkFormat(),this.updateInput(),this.changeTrigger();break;case"locale":this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),s.Input.setPlaceholder(this.placeholder,this.inputElement),this.setLocale();break;case"htmlAttributes":this.updateHtmlAttributeToElement(),this.updateHtmlAttributeToWrapper(),this.setDataAttribute(!0),this.checkHtmlAttributes(!0);break;case"showClearButton":s.Input.setClearButton(this.showClearButton,this.inputElement,this.inputWrapper),this.bindClearEvent();break;case"startDate":"string"==typeof e.startDate&&(e.startDate=this.globalize.parseDate(e.startDate,a)),+this.initStartDate!=+e.startDate&&(this.startValue=this.checkDateValue(new Date(this.checkValue(e.startDate))),this.setDate(),this.setValue());break;case"endDate":"string"==typeof e.endDate&&(e.endDate=this.globalize.parseDate(e.endDate,a)),+this.initEndDate!=+e.endDate&&(this.endValue=this.checkDateValue(new Date(this.checkValue(e.endDate))),this.setDate(),this.setValue());break;case"value":if(this.invalidValueString=null,this.checkInvalidRange(e.value),"string"==typeof e.value)if(this.invalidValueString)this.clearModelvalue(e,i);else{var o=e.value.split(" "+this.separator+" ");this.value=[new Date(o[0]),new Date(o[1])],this.updateValue(),this.setDate()}else!t.isNullOrUndefined(e.value)&&e.value.length>0||!t.isNullOrUndefined(e.value)&&e.value.start?(this.valueType=e.value,null===e.value[0]||null===e.value.start?1===e.value.length||e.value.start?this.clearModelvalue(e,i):null!==e.value[1]&&null!==e.value.start||this.clearModelvalue(e,i):+this.initStartDate==+e.value[0]&&+this.initEndDate==+e.value[1]&&+this.initStartDate==+(e.value.start||+this.initEndDate!=+e.value.start)||(1===e.value.length?this.modelValue=e.value:e.value.start&&(this.modelValue=e.value),this.updateValue(),this.setDate())):(t.isNullOrUndefined(this.value)||null==e.value.start)&&(this.valueType=e.value,this.startValue=null,this.endValue=null,this.clearModelvalue(e,i));if(this.isPopupOpen()){if(t.isNullOrUndefined(this.startValue)&&t.isNullOrUndefined(this.endValue))return this.removeSelection(),void(this.isMobile&&this.deviceHeaderUpdate());this.isMobile?(this.navigate(this.deviceCalendar,this.startValue,this.currentView()),this.deviceHeaderUpdate()):(this.navigate(this.leftCalendar,this.startValue,this.currentView()),this.updateControl(this.leftCalendar),this.navigate(this.rightCalendar,this.endValue,this.currentView()),this.updateControl(this.rightCalendar)),this.updateRange(this.isMobile?[this.calendarElement]:[this.leftCalendar,this.rightCalendar]),this.updateHeader(),this.applyButton.disabled=this.applyButton.element.disabled=!1}this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange;break;case"minDays":this.setProperties({minDays:e.minDays},!0),this.refreshChange(),this.setMinMaxDays();break;case"maxDays":this.setProperties({maxDays:e.maxDays},!0),this.refreshChange(),this.setMinMaxDays();break;case"min":this.setProperties({min:this.checkDateValue(new Date(this.checkValue(e.min)))},!0),this.previousEleValue=this.inputElement.value,this.enableInput(),this.refreshChange();break;case"max":this.setProperties({max:this.checkDateValue(new Date(this.checkValue(e.max)))},!0),this.enableInput(),this.refreshChange();break;case"strictMode":this.invalidValueString=null,this.setProperties({strictMode:e.strictMode},!0),this.refreshChange();break;case"presets":this.setProperties({presets:e.presets},!0),this.processPresets();break;case"floatLabelType":this.floatLabelType=e.floatLabelType,s.Input.removeFloating(this.inputWrapper),s.Input.addFloating(this.inputElement,this.floatLabelType,this.placeholder);break;case"start":this.setProperties({start:e.start},!0),this.refreshChange();break;case"depth":this.setProperties({depth:e.depth},!0),this.refreshChange()}}},M([t.Property(null)],r.prototype,"value",void 0),M([t.Property(!1)],r.prototype,"enablePersistence",void 0),M([t.Property(new Date(1900,0,1))],r.prototype,"min",void 0),M([t.Property(new Date(2099,11,31))],r.prototype,"max",void 0),M([t.Property(null)],r.prototype,"locale",void 0),M([t.Property(null)],r.prototype,"firstDayOfWeek",void 0),M([t.Property(!1)],r.prototype,"weekNumber",void 0),M([t.Property("Gregorian")],r.prototype,"calendarMode",void 0),M([t.Property(!1)],r.prototype,"openOnFocus",void 0),M([t.Event()],r.prototype,"created",void 0),M([t.Event()],r.prototype,"destroyed",void 0),M([t.Event()],r.prototype,"change",void 0),M([t.Event()],r.prototype,"cleared",void 0),M([t.Event()],r.prototype,"navigated",void 0),M([t.Event()],r.prototype,"renderDayCell",void 0),M([t.Property(null)],r.prototype,"startDate",void 0),M([t.Property(null)],r.prototype,"endDate",void 0),M([t.Collection([{}],j)],r.prototype,"presets",void 0),M([t.Property("")],r.prototype,"width",void 0),M([t.Property(1e3)],r.prototype,"zIndex",void 0),M([t.Property(!0)],r.prototype,"showClearButton",void 0),M([t.Property(!0)],r.prototype,"showTodayButton",void 0),M([t.Property("Month")],r.prototype,"start",void 0),M([t.Property("Month")],r.prototype,"depth",void 0),M([t.Property("")],r.prototype,"cssClass",void 0),M([t.Property("-")],r.prototype,"separator",void 0),M([t.Property(null)],r.prototype,"minDays",void 0),M([t.Property(null)],r.prototype,"maxDays",void 0),M([t.Property(!1)],r.prototype,"strictMode",void 0),M([t.Property(null)],r.prototype,"keyConfigs",void 0),M([t.Property(null)],r.prototype,"format",void 0),M([t.Property(!0)],r.prototype,"enabled",void 0),M([t.Property(!1)],r.prototype,"readonly",void 0),M([t.Property(!0)],r.prototype,"allowEdit",void 0),M([t.Property("Never")],r.prototype,"floatLabelType",void 0),M([t.Property(null)],r.prototype,"placeholder",void 0),M([t.Property({})],r.prototype,"htmlAttributes",void 0),M([t.Event()],r.prototype,"open",void 0),M([t.Event()],r.prototype,"close",void 0),M([t.Event()],r.prototype,"select",void 0),M([t.Event()],r.prototype,"focus",void 0),M([t.Event()],r.prototype,"blur",void 0),r=M([t.NotifyPropertyChanges],r)}(v),Y=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),q=function(e,t,i,s){var a,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(n<3?a(r):n>3?a(t,i,r):a(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},K=(new Date).getDate(),_=(new Date).getMonth(),G=(new Date).getFullYear(),X="e-timepicker",Z="e-input-focus",J=["title","class","style"];!function(e){function t(e,t,i,s,a,r){this.calendarMode;var l,o=6e4*r,h=[],u=[];l=+t.setMilliseconds(0);for(var d=+i.setMilliseconds(0);d>=l;)u.push(l),h.push(s.formatDate(new Date(l),{format:a,type:"time"})),l+=o;return{collection:u,list:n.ListBase.createList(e,h,null,!0)}}e.createListItems=t}(e.TimePickerBase||(e.TimePickerBase={}));var $=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Y(i,e),q([t.Property("day")],i.prototype,"day",void 0),q([t.Property("month")],i.prototype,"month",void 0),q([t.Property("year")],i.prototype,"year",void 0),q([t.Property("day of the week")],i.prototype,"dayOfTheWeek",void 0),q([t.Property("hour")],i.prototype,"hour",void 0),q([t.Property("minute")],i.prototype,"minute",void 0),q([t.Property("second")],i.prototype,"second",void 0),i}(t.ChildProperty),Q=function(e){function a(t,i){var s=e.call(this,t,i)||this;return s.liCollections=[],s.timeCollections=[],s.blazorTimeCollections=[],s.disableItemCollection=[],s.invalidValueString=null,s.isBlazorServer=!1,s.isAngular=!1,s.preventChange=!1,s.maskedDateValue="",s.moduleName=s.getModuleName(),s.timeOptions=t,s}return Y(a,e),a.prototype.preRender=function(){this.keyConfigure={enter:"enter",escape:"escape",end:"end",tab:"tab",home:"home",down:"downarrow",up:"uparrow",left:"leftarrow",right:"rightarrow",open:"alt+downarrow",close:"alt+uparrow"},this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],[X,"e-control","e-lib"]),this.inputElement=this.element,this.angularTag=null,this.formElement=t.closest(this.element,"form"),this.isBlazorServer=!(!t.isBlazor()||!this.isServerRendered||"timepicker"!==this.getModuleName()),this.isBlazorServer||("EJS-TIMEPICKER"===this.element.tagName&&(this.angularTag=this.element.tagName,this.inputElement=this.createElement("input"),this.element.appendChild(this.inputElement)),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.removeAttribute("tabindex"),this.openPopupEventArgs={appendTo:document.body})},a.prototype.render=function(){if(this.isBlazorServer){this.globalize=new t.Internationalization(this.locale),this.defaultCulture=new t.Internationalization("en"),this.checkTimeFormat();var e=this.element.parentElement;this.inputWrapper={container:e,clearButton:e.querySelector(".e-clear-icon"),buttons:[e.querySelector(".e-time-icon")]},s.Input.bindInitialEvent({element:this.inputElement,floatLabelType:this.floatLabelType}),this.showClearButton&&this.inputWrapper.clearButton&&s.Input.wireClearBtnEvents(this.inputElement,this.inputWrapper.clearButton,this.inputWrapper.container)}else this.initialize(),this.createInputElement(),this.updateHtmlAttributeToWrapper(),this.setTimeAllowEdit(),this.setEnable(),this.validateInterval();this.bindEvents(),this.isBlazorServer||(this.validateDisable(),this.setValue(this.getFormattedValue(this.value)),!this.enableMask||this.value||!this.maskedDateValue||"Always"!=this.floatLabelType&&this.floatLabelType&&this.placeholder||(this.updateInputValue(this.maskedDateValue),this.checkErrorState(this.maskedDateValue))),this.anchor=this.inputElement,this.inputElement.setAttribute("value",this.inputElement.value),this.isBlazorServer||(this.inputEleValue=this.getDateObject(this.inputElement.value)),this.renderComplete()},a.prototype.setTimeAllowEdit=function(){this.allowEdit?this.readonly||this.inputElement.removeAttribute("readonly"):t.attributes(this.inputElement,{readonly:""}),this.clearIconState()},a.prototype.clearIconState=function(){this.allowEdit||!this.inputWrapper||this.readonly?this.inputWrapper&&t.removeClass([this.inputWrapper.container],["e-non-edit"]):""===this.inputElement.value?t.removeClass([this.inputWrapper.container],["e-non-edit"]):t.addClass([this.inputWrapper.container],["e-non-edit"])},a.prototype.validateDisable=function(){this.setMinMax(this.initMin,this.initMax),this.popupCreation(),this.popupObj.destroy(),this.popupWrapper=this.popupObj=null,isNaN(+this.value)||null===this.value||this.valueIsDisable(this.value)||(this.strictMode&&this.resetState(),this.initValue=null,this.initMax=this.getDateObject(this.initMax),this.initMin=this.getDateObject(this.initMin),this.timeCollections=this.liCollections=[],this.setMinMax(this.initMin,this.initMax))},a.prototype.validationAttribute=function(e,i){var s=e.getAttribute("name")?e.getAttribute("name"):e.getAttribute("id");i.setAttribute("name",s),e.removeAttribute("name");for(var a=["required","aria-required","form"],n=0;n<a.length;n++)if(!t.isNullOrUndefined(e.getAttribute(a[n]))){var r=e.getAttribute(a[n]);i.setAttribute(a[n],r),e.removeAttribute(a[n])}},a.prototype.initialize=function(){this.globalize=new t.Internationalization(this.locale),this.defaultCulture=new t.Internationalization("en"),this.checkTimeFormat(),this.checkInvalidValue(this.value),this.setProperties({value:this.checkDateValue(new Date(this.checkInValue(this.value)))},!0),this.setProperties({min:this.checkDateValue(new Date(this.checkInValue(this.min)))},!0),this.setProperties({max:this.checkDateValue(new Date(this.checkInValue(this.max)))},!0),this.setProperties({scrollTo:this.checkDateValue(new Date(this.checkInValue(this.scrollTo)))},!0),null!==this.angularTag&&this.validationAttribute(this.element,this.inputElement),this.updateHtmlAttributeToElement(),this.checkAttributes(!1);var e={placeholder:this.placeholder};this.l10n=new t.L10n("timepicker",e,this.locale),this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.initValue=this.checkDateValue(this.value),this.initMin=this.checkDateValue(this.min),this.initMax=this.checkDateValue(this.max),this.isNavigate=this.isPreventBlur=this.isTextSelected=!1,this.activeIndex=this.valueWithMinutes=this.prevDate=null,t.isNullOrUndefined(this.element.getAttribute("id"))?(this.element.id=t.getUniqueID("ej2_timepicker"),null!==this.angularTag&&t.attributes(this.inputElement,{id:this.element.id+"_input"})):null!==this.angularTag&&(this.inputElement.id=this.element.getAttribute("id")+"_input"),t.isNullOrUndefined(this.inputElement.getAttribute("name"))&&t.attributes(this.inputElement,{name:this.element.id}),this.enableMask&&this.notify("createMask",{module:"MaskedDateTime"})},a.prototype.checkTimeFormat=function(){if(this.format)if("string"==typeof this.format)this.formatString=this.format;else if(t.isNullOrUndefined(this.format.skeleton)||""===this.format.skeleton)this.formatString=this.globalize.getDatePattern({type:"time",skeleton:"short"});else{var e=this.format.skeleton;this.formatString=this.globalize.getDatePattern({type:"time",skeleton:e})}else this.formatString=null},a.prototype.checkDateValue=function(e){return!t.isNullOrUndefined(e)&&e instanceof Date&&!isNaN(+e)?e:null},a.prototype.createInputElement=function(){var e=this.cssClass,i=!this.enableMask;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(e=this.cssClass.replace(/\s+/g," ").trim()),this.inputWrapper=s.Input.createInput({element:this.inputElement,bindClearAction:i,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:e,enabled:this.enabled,enableRtl:this.enableRtl,showClearButton:this.showClearButton},buttons:[" e-input-group-icon e-time-icon e-icons"]},this.createElement),this.inputWrapper.container.style.width=this.setWidth(this.width),t.attributes(this.inputElement,{"aria-haspopup":"true","aria-autocomplete":"list",tabindex:"0","aria-activedescendant":"null","aria-owns":this.element.id+"_options","aria-expanded":"false",role:"combobox",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false","aria-disabled":"false","aria-invalid":"false"}),this.isNullOrEmpty(this.inputStyle)||s.Input.addAttributes({style:this.inputStyle},this.inputElement),t.addClass([this.inputWrapper.container],"e-time-wrapper")},a.prototype.getCldrDateTimeFormat=function(){var e=new t.Internationalization(this.locale).getDatePattern({skeleton:t.isBlazor()?"d":"yMd"});return this.isNullOrEmpty(this.formatString)?e+" "+this.cldrFormat("time"):this.formatString},a.prototype.checkInvalidValue=function(e){var i=!1;if("object"!=typeof e&&!t.isNullOrUndefined(e)){var s=e;"string"==typeof s&&(s=s.trim());var a=null,n=null;if("number"==typeof e?s=e.toString():"string"==typeof e&&(/^[a-zA-Z0-9- ]*$/.test(e)||(a=this.setCurrentDate(this.getDateObject(e)),t.isNullOrUndefined(a)&&(a=this.checkDateValue(this.globalize.parseDate(s,{format:this.getCldrDateTimeFormat(),type:"datetime"})),t.isNullOrUndefined(a)&&(a=this.checkDateValue(this.globalize.parseDate(s,{format:this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"})))))),n=this.globalize.parseDate(s,{format:this.getCldrDateTimeFormat(),type:"datetime"}),a=!t.isNullOrUndefined(n)&&n instanceof Date&&!isNaN(+n)?n:null,t.isNullOrUndefined(a)&&s.replace(/\s/g,"").length){var r=null;r=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,!/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/.test(s)&&!r.test(s)||/^[a-zA-Z0-9- ]*$/.test(e)||isNaN(+new Date(""+s))?i=!0:a=new Date(""+s)}i?(this.strictMode||(this.invalidValueString=s),this.setProperties({value:null},!0),this.initValue=null):(this.setProperties({value:a},!0),this.initValue=this.value)}},a.prototype.requiredModules=function(){var e=[];return this.enableMask&&e.push({args:[this],member:"MaskedDateTime"}),e},a.prototype.cldrFormat=function(e){return"en"===this.locale||"en-US"===this.locale?t.isBlazor()?this.getBlazorCultureFormat("t"):t.getValue("timeFormats.short",t.getDefaultDateObject()):this.getCultureTimeObject(t.cldrData,""+this.locale)},a.prototype.destroy=function(){if(this.isBlazorServer)this.unBindEvents();else{this.hide(),this.unBindEvents();var i={"aria-haspopup":"true","aria-autocomplete":"list",tabindex:"0","aria-activedescendant":"null","aria-owns":this.element.id+"_options","aria-expanded":"false",role:"combobox",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false","aria-disabled":"true","aria-invalid":"false"};this.inputElement&&(s.Input.removeAttributes(i,this.inputElement),null===this.angularTag&&this.inputWrapper.container.parentElement.appendChild(this.inputElement),t.isNullOrUndefined(this.cloneElement.getAttribute("tabindex"))?this.inputElement.removeAttribute("tabindex"):this.inputElement.setAttribute("tabindex",this.tabIndex),this.ensureInputAttribute(),this.enableElement([this.inputElement]),this.inputElement.classList.remove("e-input"),t.isNullOrUndefined(this.cloneElement.getAttribute("disabled"))&&s.Input.setEnabled(!0,this.inputElement,this.floatLabelType)),this.inputWrapper.container&&t.detach(this.inputWrapper.container),this.inputWrapper=this.popupWrapper=this.cloneElement=void 0,this.liCollections=this.timeCollections=this.disableItemCollection=[],t.isNullOrUndefined(this.rippleFn)||this.rippleFn(),e.prototype.destroy.call(this),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)}},a.prototype.ensureInputAttribute=function(){for(var e=[],i=0;i<this.inputElement.attributes.length;i++)e[i]=this.inputElement.attributes[i].name;for(i=0;i<e.length;i++)t.isNullOrUndefined(this.cloneElement.getAttribute(e[i]))?(this.inputElement.removeAttribute(e[i]),"value"===e[i].toLowerCase()&&(this.inputElement.value="")):(this.inputElement.setAttribute(e[i],this.cloneElement.getAttribute(e[i])),"value"===e[i].toLowerCase()&&(this.inputElement.value=this.cloneElement.getAttribute(e[i])))},a.prototype.popupCreation=function(){this.isBlazorServer?(this.popupWrapper=this.inputWrapper.container.nextElementSibling,this.generateList()):(this.popupWrapper=this.createElement("div",{className:X+" e-popup",attrs:{id:this.element.id+"_popup",style:"visibility:hidden"}}),t.isNullOrUndefined(this.cssClass)||(this.popupWrapper.className+=" "+this.cssClass),!t.isNullOrUndefined(this.step)&&this.step>0&&(this.generateList(),t.append([this.listWrapper],this.popupWrapper)),this.openPopupEventArgs.appendTo.appendChild(this.popupWrapper)),this.addSelection(),this.renderPopup(),t.detach(this.popupWrapper)},a.prototype.getPopupHeight=function(){var e=parseInt("240px",10),t=this.popupWrapper.getBoundingClientRect().height;return t>e?e:t},a.prototype.generateList=function(){this.isBlazorServer?this.listWrapper=this.popupWrapper.querySelector(".e-content"):this.createListItems(),this.wireListEvents();var e={duration:300,selector:".e-list-item"};if(this.rippleFn=t.rippleEffect(this.listWrapper,e),this.liCollections=this.listWrapper.querySelectorAll(".e-list-item"),this.isBlazorServer){this.blazorTimeCollections=[];for(var i=0;i<this.liCollections.length;i++)this.blazorTimeCollections.push(this.liCollections[i].getAttribute("data-value"))}},a.prototype.renderPopup=function(){var e=this;this.containerStyle=this.inputWrapper.container.getBoundingClientRect(),this.popupObj=new i.Popup(this.popupWrapper,{width:this.setPopupWidth(this.width),zIndex:this.zIndex,targetType:"relative",position:t.Browser.isDevice?{X:"center",Y:"center"}:{X:"left",Y:"bottom"},collision:t.Browser.isDevice?{X:"fit",Y:"fit"}:{X:"flip",Y:"flip"},enableRtl:this.enableRtl,relateTo:t.Browser.isDevice?document.body:this.inputWrapper.container,offsetY:4,open:function(){e.popupWrapper.style.visibility="visible",t.addClass([e.inputWrapper.buttons[0]],"e-active")},close:function(){t.removeClass([e.inputWrapper.buttons[0]],"e-active"),e.unWireListEvents(),e.inputElement.setAttribute("aria-activedescendant","null"),e.isBlazorServer||(t.remove(e.popupObj.element),e.popupObj.destroy(),e.popupWrapper.innerHTML=""),e.listWrapper=e.popupWrapper=e.listTag=void 0},targetExitViewport:function(){t.Browser.isDevice||e.hide()}}),t.Browser.isDevice||(this.popupObj.collision={X:"none",Y:"flip"}),this.popupObj.element.style.maxHeight="240px"},a.prototype.getFormattedValue=function(e){return t.isNullOrUndefined(this.checkDateValue(e))?null:this.globalize.formatDate(e,{skeleton:t.isBlazor()?"t":"medium",type:"time"})},a.prototype.getDateObject=function(e){if(!this.isNullOrEmpty(e)){var t=this.createDateObj(e),i=!this.isNullOrEmpty(this.initValue);if(this.checkDateValue(t)){var s=i?this.initValue.getDate():K,a=i?this.initValue.getMonth():_,n=i?this.initValue.getFullYear():G;return new Date(n,a,s,t.getHours(),t.getMinutes(),t.getSeconds())}}return null},a.prototype.updateHtmlAttributeToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(J.indexOf(s)>-1)if("class"===s){var a=this.htmlAttributes[s].replace(/\s+/g," ").trim();""!==a&&t.addClass([this.inputWrapper.container],a.split(" "))}else if("style"===s){var n=this.inputWrapper.container.getAttribute(s);n=t.isNullOrUndefined(n)?this.htmlAttributes[s]:n+this.htmlAttributes[s],this.inputWrapper.container.setAttribute(s,n)}else this.inputWrapper.container.setAttribute(s,this.htmlAttributes[s])}},a.prototype.updateHtmlAttributeToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];J.indexOf(s)<0&&this.inputElement.setAttribute(s,this.htmlAttributes[s])}},a.prototype.updateCssClass=function(e,i){t.isNullOrUndefined(i)||(i=i.replace(/\s+/g," ").trim()),t.isNullOrUndefined(e)||(e=e.replace(/\s+/g," ").trim()),s.Input.setCssClass(e,[this.inputWrapper.container],i),this.popupWrapper&&s.Input.setCssClass(e,[this.popupWrapper],i)},a.prototype.removeErrorClass=function(){t.removeClass([this.inputWrapper.container],"e-error"),t.attributes(this.inputElement,{"aria-invalid":"false"})},a.prototype.checkErrorState=function(e){var i=this.getDateObject(e);this.validateState(i)&&!this.invalidValueString||this.enableMask&&this.inputElement.value===this.maskedDateValue?this.removeErrorClass():(t.addClass([this.inputWrapper.container],"e-error"),t.attributes(this.inputElement,{"aria-invalid":"true"}))},a.prototype.validateInterval=function(){!t.isNullOrUndefined(this.step)&&this.step>0?this.enableElement([this.inputWrapper.buttons[0]]):this.disableTimeIcon()},a.prototype.disableTimeIcon=function(){this.disableElement([this.inputWrapper.buttons[0]]),this.hide()},a.prototype.disableElement=function(e){t.addClass(e,"e-disabled")},a.prototype.enableElement=function(e){t.removeClass(e,"e-disabled")},a.prototype.selectInputText=function(){this.inputElement.setSelectionRange(0,this.inputElement.value.length)},a.prototype.setCursorToEnd=function(){this.inputElement.setSelectionRange(this.inputElement.value.length,this.inputElement.value.length)},a.prototype.getMeridianText=function(){var e;if("en"===this.locale||"en-US"===this.locale)e=t.getValue(t.isBlazor()?"dayPeriods.wide":"dayPeriods.format.wide",t.getDefaultDateObject());else{var i=t.isBlazor()?".dates.dayPeriods.abbreviated":".dates.calendars.gregorian.dayPeriods.format.abbreviated",s=t.isBlazor()?"":"main.";e=t.getValue(s+""+this.locale+i,t.cldrData)}return e},a.prototype.getCursorSelection=function(){var e=this.inputElement,t=0,i=0;return isNaN(e.selectionStart)||(t=e.selectionStart,i=e.selectionEnd),{start:Math.abs(t),end:Math.abs(i)}},a.prototype.getActiveElement=function(){return t.isNullOrUndefined(this.popupWrapper)?null:this.popupWrapper.querySelectorAll(".e-active")},a.prototype.isNullOrEmpty=function(e){return!!(t.isNullOrUndefined(e)||"string"==typeof e&&""===e.trim())},a.prototype.setWidth=function(e){return e="number"==typeof e?t.formatUnit(e):"string"==typeof e?e.match(/px|%|em/)?e:t.formatUnit(e):"100%"},a.prototype.setPopupWidth=function(e){return(e=this.setWidth(e)).indexOf("%")>-1&&(e=(this.containerStyle.width*parseFloat(e)/100).toString()+"px"),e},a.prototype.setScrollPosition=function(){var e=this.selectedElement;t.isNullOrUndefined(e)?this.popupWrapper&&this.checkDateValue(this.scrollTo)&&this.setScrollTo():this.findScrollTop(e)},a.prototype.findScrollTop=function(e){var t=this.getPopupHeight(),i=e.nextElementSibling,s=i?i.offsetTop:e.offsetTop,a=e.getBoundingClientRect().height;s+e.offsetTop>t?this.popupWrapper.scrollTop=i?s-(t/2+a/2):s:this.popupWrapper.scrollTop=0},a.prototype.setScrollTo=function(){var e;if(t.isNullOrUndefined(this.popupWrapper))this.popupWrapper.scrollTop=0;else{var i=this.popupWrapper.querySelectorAll(".e-list-item");if(i.length){var s=this.isBlazorServer?new Date((new Date).toDateString()+" "+this.blazorTimeCollections[0]).setMilliseconds(0):this.timeCollections[0],a=this.isBlazorServer?new Date((new Date).toDateString()+" "+this.scrollTo.toLocaleTimeString()).setMilliseconds(0):this.getDateObject(this.checkDateValue(this.scrollTo)).getTime();e=i[Math.round((a-s)/(6e4*this.step))]}}t.isNullOrUndefined(e)?this.popupWrapper.scrollTop=0:this.findScrollTop(e)},a.prototype.getText=function(){return t.isNullOrUndefined(this.checkDateValue(this.value))?"":this.getValue(this.value)},a.prototype.getValue=function(e){return t.isNullOrUndefined(this.checkDateValue(e))?null:this.globalize.formatDate(e,{format:this.cldrTimeFormat(),type:"time"})},a.prototype.cldrDateFormat=function(){return"en"===this.locale||"en-US"===this.locale?t.isBlazor()?t.getValue("d",t.getValue(this.locale,t.blazorCultureFormats)):t.getValue("dateFormats.short",t.getDefaultDateObject()):this.getCultureDateObject(t.cldrData,""+this.locale)},a.prototype.getBlazorCultureFormat=function(e){return t.getValue(e,t.getValue(this.locale,t.blazorCultureFormats)).replace(/tt/,"a")},a.prototype.cldrTimeFormat=function(){return this.isNullOrEmpty(this.formatString)?"en"===this.locale||"en-US"===this.locale?t.isBlazor()?this.getBlazorCultureFormat("t"):t.getValue("timeFormats.short",t.getDefaultDateObject()):this.getCultureTimeObject(t.cldrData,""+this.locale):this.formatString},a.prototype.dateToNumeric=function(){return"en"===this.locale||"en-US"===this.locale?t.isBlazor()?this.getBlazorCultureFormat("T"):t.getValue("timeFormats.medium",t.getDefaultDateObject()):t.isBlazor()?this.getBlazorCultureFormat("T"):t.getValue("main."+this.locale+".dates.calendars.gregorian.timeFormats.medium",t.cldrData)},a.prototype.getExactDateTime=function(e){return t.isNullOrUndefined(this.checkDateValue(e))?null:this.globalize.formatDate(e,{format:this.dateToNumeric(),type:"time"})},a.prototype.setValue=function(e){var t=this.checkValue(e);this.strictMode||this.validateState(t)?this.isNullOrEmpty(t)?(this.initValue=null,this.validateMinMax(this.value,this.min,this.max)):this.initValue=this.compareFormatChange(t):(null===this.checkDateValue(this.valueWithMinutes)&&(this.initValue=this.valueWithMinutes=null),this.validateMinMax(this.value,this.min,this.max)),this.updateInput(!0,this.initValue)},a.prototype.compareFormatChange=function(e){return t.isNullOrUndefined(e)?null:e!==this.getText()?this.getDateObject(e):this.getDateObject(this.value)},a.prototype.updatePlaceHolder=function(){s.Input.setPlaceholder(this.l10n.getConstant("placeholder"),this.inputElement)},a.prototype.updateInputValue=function(e){s.Input.setValue(e,this.inputElement,this.floatLabelType,this.showClearButton)},a.prototype.preventEventBubbling=function(e){e.preventDefault(),this.interopAdaptor.invokeMethodAsync("OnTimeIconClick")},a.prototype.updateBlazorTimeCollections=function(e){this.blazorTimeCollections=e},a.prototype.popupHandler=function(e){this.enabled&&(t.Browser.isDevice&&this.inputElement.setAttribute("readonly",""),this.isBlazorServer||e.preventDefault(),this.isPopupOpen()&&!this.isBlazorServer?this.closePopup(0,e):(this.inputElement.focus(),this.show(e)))},a.prototype.mouseDownHandler=function(){this.enabled&&(this.readonly||(this.inputElement.setSelectionRange(0,0),t.EventHandler.add(this.inputElement,"mouseup",this.mouseUpHandler,this)))},a.prototype.mouseUpHandler=function(e){if(!this.readonly){if(e.preventDefault(),this.enableMask)return e.preventDefault(),void this.notify("setMaskSelection",{module:"MaskedDateTime"});t.EventHandler.remove(this.inputElement,"mouseup",this.mouseUpHandler);var i=this.getCursorSelection();0===i.start&&i.end===this.inputElement.value.length||(this.inputElement.value.length>0&&(this.cursorDetails=this.focusSelection()),this.inputElement.setSelectionRange(this.cursorDetails.start,this.cursorDetails.end))}},a.prototype.focusSelection=function(){var e=new RegExp("^[a-zA-Z0-9]+$"),t=this.inputElement.value.split("");t.push(" ");var i=this.getCursorSelection(),s=0,a=0,n=!1;if(this.isTextSelected)s=i.start,a=i.end,this.isTextSelected=!1;else for(var r=0;r<t.length;r++)if(e.test(t[r])||(a=r,n=!0),n){if(i.start>=s&&i.end<=a){a=a,this.isTextSelected=!0;break}s=r+1,n=!1}return{start:s,end:a}},a.prototype.inputHandler=function(e){if(!this.readonly&&this.enabled)switch("right"!==e.action&&"left"!==e.action&&"tab"!==e.action&&e.preventDefault(),e.action){case"home":case"end":case"up":case"down":!this.enableMask||this.readonly||this.isPopupOpen()||(e.preventDefault(),this.notify("keyDownHandler",{module:"MaskedDateTime",e:e})),this.enableMask&&!this.isPopupOpen()||this.keyHandler(e);break;case"enter":this.isNavigate?(this.selectedElement=this.liCollections[this.activeIndex],this.isBlazorServer?(this.inputElement.setAttribute("value",this.selectedElement.getAttribute("data-value")),this.interopAdaptor.invokeMethodAsync("OnListItemClick",this.activeIndex,!0)):(this.valueWithMinutes=new Date(this.timeCollections[this.activeIndex]),this.updateValue(this.valueWithMinutes,e))):this.isBlazorServer?this.interopAdaptor.invokeMethodAsync("OnStrictMode",this.inputElement.value):this.updateValue(this.inputElement.value,e),this.hide(),this.isNavigate=!1,this.isPopupOpen()&&e.stopPropagation();break;case"open":this.isBlazorServer?this.interopAdaptor.invokeMethodAsync("OnPopupHide",!0):this.show(e);break;case"escape":this.isBlazorServer||(this.updateInputValue(this.objToString(this.value)),this.enableMask&&(this.value||this.updateInputValue(this.maskedDateValue),this.createMask()),this.previousState(this.value)),this.hide();break;case"close":this.hide();break;case"right":case"left":case"tab":case"shiftTab":this.isPopupOpen()||!this.enableMask||this.readonly||((0==this.inputElement.selectionStart&&this.inputElement.selectionEnd==this.inputElement.value.length||this.inputElement.selectionEnd!==length&&"tab"==e.action||0!==this.inputElement.selectionStart&&"shiftTab"==e.action||"left"==e.action||"right"==e.action)&&e.preventDefault(),this.notify("keyDownHandler",{module:"MaskedDateTime",e:e}));break;default:this.isNavigate=!1}},a.prototype.onMouseClick=function(e){var i=e.target,s=this.selectedElement=t.closest(i,".e-list-item");this.setSelection(s,e),s&&s.classList.contains("e-list-item")&&this.hide()},a.prototype.closePopup=function(e,i){var s=this;if(this.isPopupOpen()&&this.popupWrapper){var a={popup:this.isBlazorServer?null:this.popupObj,event:i||null,cancel:!1,name:"open"};t.removeClass([document.body],"e-time-overflow"),this.trigger("close",a,function(i){if(!i.cancel){var a={name:"FadeOut",duration:50,delay:e||0};s.popupObj.hide(new t.Animation(a)),t.removeClass([s.inputWrapper.container],["e-icon-anim"]),t.attributes(s.inputElement,{"aria-expanded":"false"}),t.EventHandler.remove(document,"mousedown touchstart",s.documentClickHandler),s.isBlazorServer&&(s.disposeServerPopup(),s.inputWrapper.container.parentElement.insertBefore(s.popupWrapper,s.inputWrapper.container.nextElementSibling),s.interopAdaptor.invokeMethodAsync("OnPopupHide",!1),s.popupWrapper=s.popupObj=null)}t.Browser.isDevice&&s.modal&&(s.modal.style.display="none",s.modal.outerHTML="",s.modal=null),t.Browser.isDevice&&(t.isNullOrUndefined(s.mobileTimePopupWrap)||(s.mobileTimePopupWrap.remove(),s.mobileTimePopupWrap=null)),t.Browser.isDevice&&s.allowEdit&&!s.readonly&&s.inputElement.removeAttribute("readonly")})}else t.Browser.isDevice&&this.allowEdit&&!this.readonly&&this.inputElement.removeAttribute("readonly")},a.prototype.disposeServerPopup=function(){this.popupWrapper&&(this.popupWrapper.style.visibility="hidden",this.popupWrapper.style.top="-9999px",this.popupWrapper.style.left="-9999px",this.popupWrapper.style.width="0px",this.popupWrapper.style.height="0px")},a.prototype.checkValueChange=function(e,i){if(this.strictMode||this.validateState(this.valueWithMinutes))if(i){var s=this.getDateObject(new Date(this.timeCollections[this.activeIndex]));+this.prevDate!=+s&&this.valueProcess(e,s)}else(this.prevValue!==this.inputElement.value||t.isNullOrUndefined(this.checkDateValue(this.value)))&&this.valueProcess(e,this.compareFormatChange(this.inputElement.value));else null===this.checkDateValue(this.valueWithMinutes)&&(this.initValue=this.valueWithMinutes=null),this.setProperties({value:this.compareFormatChange(this.inputElement.value)},!0),this.initValue=this.valueWithMinutes=this.compareFormatChange(this.inputElement.value),this.prevValue=this.inputElement.value,+this.prevDate!=+this.value&&this.changeEvent(e)},a.prototype.onMouseOver=function(e){var i=t.closest(e.target,".e-list-item");this.setHover(i,"e-hover")},a.prototype.setHover=function(e,i){this.enabled&&this.isValidLI(e)&&!e.classList.contains(i)&&(this.removeHover(i),t.addClass([e],i),"e-navigation"===i&&e.setAttribute("aria-selected","true"))},a.prototype.setSelection=function(e,i){this.isValidLI(e)&&!e.classList.contains("e-active")&&(this.isBlazorServer?(this.selectedElement=e,this.activeIndex=Array.prototype.slice.call(this.liCollections).indexOf(e),t.addClass([this.selectedElement],"e-active"),this.selectedElement.setAttribute("aria-selected","true"),this.inputElement.setAttribute("value",e.getAttribute("data-value")),this.interopAdaptor.invokeMethodAsync("OnListItemClick",this.activeIndex,!1),this.addSelection()):(this.checkValue(e.getAttribute("data-value")),this.enableMask&&this.notify("setMaskSelection",{module:"MaskedDateTime"}),this.selectedElement=e,this.activeIndex=Array.prototype.slice.call(this.liCollections).indexOf(e),this.valueWithMinutes=new Date(this.timeCollections[this.activeIndex]),t.addClass([this.selectedElement],"e-active"),this.selectedElement.setAttribute("aria-selected","true"),this.checkValueChange(i,!0)))},a.prototype.onMouseLeave=function(){this.removeHover("e-hover")},a.prototype.scrollHandler=function(){"timepicker"===this.getModuleName()&&t.Browser.isDevice||this.hide()},a.prototype.setMinMax=function(e,i){t.isNullOrUndefined(this.checkDateValue(e))&&(this.initMin=this.getDateObject("12:00:00 AM")),t.isNullOrUndefined(this.checkDateValue(i))&&(this.initMax=this.getDateObject("11:59:59 PM"))},a.prototype.validateMinMax=function(e,i,s){var a=e instanceof Date?e:this.getDateObject(e);return t.isNullOrUndefined(this.checkDateValue(a))?+this.createDateObj(this.getFormattedValue(this.initMin))>+this.createDateObj(this.getFormattedValue(this.initMax))&&this.disableTimeIcon():e=this.strictOperation(this.initMin,this.initMax,e,a),this.strictMode&&(e=this.valueIsDisable(e)?e:null),this.checkErrorState(e),e},a.prototype.valueIsDisable=function(e){if(this.disableItemCollection.length>0){if(this.disableItemCollection.length===this.timeCollections.length)return!1;for(var t=e instanceof Date?this.objToString(e):e,i=0;i<this.disableItemCollection.length;i++)if(t===this.disableItemCollection[i])return!1}return!0},a.prototype.validateState=function(e){if(!this.strictMode){if(!this.valueIsDisable(e))return!1;var i=this.setCurrentDate(this.getDateObject(e)),s=this.setCurrentDate(this.getDateObject(this.initMax)),a=this.setCurrentDate(this.getDateObject(this.initMin));if(t.isNullOrUndefined(this.checkDateValue(i))){if(+s<+a||""!==this.inputElement.value)return!1}else if(+i>+s||+i<+a)return!1}return!0},a.prototype.strictOperation=function(e,t,i,s){var a=this.createDateObj(this.getFormattedValue(t)),n=this.createDateObj(this.getFormattedValue(e)),r=this.createDateObj(this.getFormattedValue(s));if(this.strictMode){if(+n>+a)return this.disableTimeIcon(),this.initValue=this.getDateObject(a),this.updateInputValue(this.getValue(this.initValue)),this.enableMask&&this.createMask(),this.inputElement.value;if(+n>=+r)return this.getDateObject(n);if(+r>=+a||+n==+a)return this.getDateObject(a)}else if(+n>+a&&(this.disableTimeIcon(),!isNaN(+this.createDateObj(i))))return i;return i},a.prototype.bindEvents=function(){t.EventHandler.add(this.inputWrapper.buttons[0],"mousedown",this.isBlazorServer?this.preventEventBubbling:this.popupHandler,this),t.EventHandler.add(this.inputElement,"blur",this.inputBlurHandler,this),t.EventHandler.add(this.inputElement,"focus",this.inputFocusHandler,this),t.EventHandler.add(this.inputElement,"change",this.inputChangeHandler,this),t.EventHandler.add(this.inputElement,"input",this.inputEventHandler,this),this.enableMask&&t.EventHandler.add(this.inputElement,"keydown",this.keydownHandler,this),this.showClearButton&&this.inputWrapper.clearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown",this.clearHandler,this),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this),t.Browser.isDevice||(this.keyConfigure=t.extend(this.keyConfigure,this.keyConfigs),this.inputEvent=new t.KeyboardEvents(this.inputWrapper.container,{keyAction:this.inputHandler.bind(this),keyConfigs:this.keyConfigure,eventName:"keydown"}),this.showClearButton&&this.inputElement&&t.EventHandler.add(this.inputElement,"mousedown",this.mouseDownHandler,this))},a.prototype.keydownHandler=function(e){switch(e.code){case"Delete":!this.enableMask||this.popupObj||this.readonly||this.notify("keyDownHandler",{module:"MaskedDateTime",e:e})}},a.prototype.formResetHandler=function(){if(this.enabled&&!this.inputElement.disabled){var e=this.inputElement.getAttribute("value"),t=this.isBlazorServer?this.inputEleValue:this.checkDateValue(this.inputEleValue);"EJS-TIMEPICKER"===this.element.tagName&&(t=null,e="",this.inputElement.setAttribute("value","")),this.isBlazorServer||(this.setProperties({value:t},!0),this.prevDate=this.value,this.valueWithMinutes=this.value,this.initValue=this.value),this.inputElement&&(this.updateInputValue(e),this.enableMask&&(e||this.updateInputValue(this.maskedDateValue),this.createMask()),this.isBlazorServer||this.checkErrorState(e),this.prevValue=this.inputElement.value)}},a.prototype.inputChangeHandler=function(e){this.enabled&&e.stopPropagation()},a.prototype.inputEventHandler=function(){this.enableMask&&this.notify("inputHandler",{module:"MaskedDateTime"})},a.prototype.unBindEvents=function(){this.inputWrapper&&t.EventHandler.remove(this.inputWrapper.buttons[0],"mousedown touchstart",this.isBlazorServer?this.preventEventBubbling:this.popupHandler),t.EventHandler.remove(this.inputElement,"blur",this.inputBlurHandler),t.EventHandler.remove(this.inputElement,"focus",this.inputFocusHandler),t.EventHandler.remove(this.inputElement,"change",this.inputChangeHandler),t.EventHandler.remove(this.inputElement,"input",this.inputEventHandler),this.inputEvent&&this.inputEvent.destroy(),t.EventHandler.remove(this.inputElement,"mousedown touchstart",this.mouseDownHandler),this.showClearButton&&!t.isNullOrUndefined(this.inputWrapper.clearButton)&&t.EventHandler.remove(this.inputWrapper.clearButton,"mousedown touchstart",this.clearHandler),this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},a.prototype.bindClearEvent=function(){this.showClearButton&&this.inputWrapper.clearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown",this.clearHandler,this)},a.prototype.raiseClearedEvent=function(e){var t={event:e};this.trigger("cleared",t)},a.prototype.clearHandler=function(e){this.enabled&&(e.preventDefault(),t.isNullOrUndefined(this.value)?(this.resetState(),this.raiseClearedEvent(e)):this.clear(e),this.isBlazorServer&&this.interopAdaptor.invokeMethodAsync("OnValueCleared"),this.popupWrapper&&(this.popupWrapper.scrollTop=0),this.enableMask&&this.notify("clearHandler",{module:"MaskedDateTime"}))},a.prototype.clear=function(e){this.isBlazorServer||this.setProperties({value:null},!0),this.initValue=null,this.resetState(),this.raiseClearedEvent(e),this.isBlazorServer||this.changeEvent(e)},a.prototype.setZIndex=function(){this.popupObj&&(this.popupObj.zIndex=this.zIndex,this.popupObj.dataBind())},a.prototype.checkAttributes=function(e){for(var i,s=0,a=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["step","disabled","readonly","style","name","value","min","max","placeholder"];s<a.length;s++){var n=a[s];if(!t.isNullOrUndefined(this.inputElement.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.timeOptions)||void 0===this.timeOptions.enabled||e){var r="disabled"!==this.inputElement.getAttribute(n)&&""!==this.inputElement.getAttribute(n)&&"true"!==this.inputElement.getAttribute(n);this.setProperties({enabled:r},!e)}break;case"style":this.inputStyle=this.inputElement.getAttribute(n);break;case"readonly":if(t.isNullOrUndefined(this.timeOptions)||void 0===this.timeOptions.readonly||e){var l="readonly"===this.inputElement.getAttribute(n)||""===this.inputElement.getAttribute(n)||"true"===this.inputElement.getAttribute(n);this.setProperties({readonly:l},!e)}break;case"name":this.inputElement.setAttribute("name",this.inputElement.getAttribute(n));break;case"step":this.step=parseInt(this.inputElement.getAttribute(n),10);break;case"placeholder":(t.isNullOrUndefined(this.timeOptions)||void 0===this.timeOptions.placeholder||e)&&this.setProperties({placeholder:this.inputElement.getAttribute(n)},!e);break;case"min":this.isBlazorServer||(t.isNullOrUndefined(this.timeOptions)||void 0===this.timeOptions.min||e)&&(i=new Date(this.inputElement.getAttribute(n)),t.isNullOrUndefined(this.checkDateValue(i))||this.setProperties({min:i},!e));break;case"max":this.isBlazorServer||(t.isNullOrUndefined(this.timeOptions)||void 0===this.timeOptions.max||e)&&(i=new Date(this.inputElement.getAttribute(n)),t.isNullOrUndefined(this.checkDateValue(i))||this.setProperties({max:i},!e));break;case"value":this.isBlazorServer||(t.isNullOrUndefined(this.timeOptions)||void 0===this.timeOptions.value||e)&&(i=new Date(this.inputElement.getAttribute(n)),t.isNullOrUndefined(this.checkDateValue(i))||(this.initValue=i,this.updateInput(!1,this.initValue),this.setProperties({value:i},!e)))}}},a.prototype.setCurrentDate=function(e){return t.isNullOrUndefined(this.checkDateValue(e))?null:new Date(G,_,K,e.getHours(),e.getMinutes(),e.getSeconds())},a.prototype.getTextFormat=function(){var e=0;if("a"===this.cldrTimeFormat().split(" ")[0]||0===this.cldrTimeFormat().indexOf("a"))e=1;else if(this.cldrTimeFormat().indexOf("a")<0)for(var t=this.cldrTimeFormat().split(" "),i=0;i<t.length;i++)if(t[i].toLowerCase().indexOf("h")>=0){e=i;break}return e},a.prototype.updateValue=function(e,t){var i;if(this.isNullOrEmpty(e))this.resetState();else if(i=this.checkValue(e),this.strictMode){var s=null===i&&e.trim().length>0?this.previousState(this.prevDate):this.inputElement.value;this.updateInputValue(s),this.enableMask&&(s||this.updateInputValue(this.maskedDateValue),this.createMask())}this.checkValueChange(t,"string"!=typeof e)},a.prototype.previousState=function(e){for(var t=this.getDateObject(e),i=0;i<this.timeCollections.length;i++)if(+t===this.timeCollections[i]){this.activeIndex=i,this.selectedElement=this.liCollections[i],this.valueWithMinutes=new Date(this.timeCollections[i]);break}return this.prevValue},a.prototype.resetState=function(){this.removeSelection(),s.Input.setValue("",this.inputElement,this.floatLabelType,!1),this.valueWithMinutes=this.activeIndex=null,this.strictMode||this.isBlazorServer||this.checkErrorState(null)},a.prototype.objToString=function(e){return t.isNullOrUndefined(this.checkDateValue(e))?null:this.globalize.formatDate(e,{format:this.cldrTimeFormat(),type:"time"})},a.prototype.checkValue=function(e){if(!this.isNullOrEmpty(e)){var t=e instanceof Date?e:this.getDateObject(e);return this.validateValue(t,e)}return this.resetState(),this.valueWithMinutes=null},a.prototype.validateValue=function(e,i){var s,a=this.validateMinMax(i,this.min,this.max),n=this.createDateObj(a);if(this.getFormattedValue(n)!==this.getFormattedValue(this.value)?(this.valueWithMinutes=t.isNullOrUndefined(n)?null:n,s=this.objToString(this.valueWithMinutes)):(this.strictMode&&(e=n),this.valueWithMinutes=this.checkDateValue(e),s=this.objToString(this.valueWithMinutes)),!this.strictMode&&t.isNullOrUndefined(s)){var r=a.trim().length>0?a:"";this.updateInputValue(r),this.enableMask&&(r||this.updateInputValue(this.maskedDateValue))}else this.updateInputValue(s),this.enableMask&&(""==s&&this.updateInputValue(this.maskedDateValue),this.createMask());return s},a.prototype.createMask=function(){this.notify("createMask",{module:"MaskedDateTime"})},a.prototype.findNextElement=function(e){var i=this.inputElement.value,s=t.isNullOrUndefined(this.valueWithMinutes)||this.isBlazorServer?this.createDateObj(i):this.getDateObject(this.valueWithMinutes),a=null,n=this.liCollections.length,r=this.isBlazorServer?t.isNullOrUndefined(this.blazorTimeCollections)?[]:this.blazorTimeCollections:this.timeCollections;if(t.isNullOrUndefined(this.checkDateValue(s))&&t.isNullOrUndefined(this.activeIndex))this.selectNextItem(e);else{if("home"===e.action){o=this.validLiElement(0);this.isBlazorServer||(a=+this.createDateObj(new Date(this.timeCollections[o]))),this.activeIndex=o}else if("end"===e.action){o=this.validLiElement(r.length-1,!0);this.isBlazorServer||(a=+this.createDateObj(new Date(this.timeCollections[o]))),this.activeIndex=o}else if("down"===e.action)for(l=0;l<n;l++){if(this.isBlazorServer?+s<+this.createDateObj(this.blazorTimeCollections[l]):+s<this.timeCollections[l]){o=this.validLiElement(l);this.isBlazorServer||(a=+this.createDateObj(new Date(this.timeCollections[o]))),this.activeIndex=o;break}if(l===n-1){o=this.validLiElement(0);this.isBlazorServer||(a=+this.createDateObj(new Date(this.timeCollections[o]))),this.activeIndex=o;break}}else for(var l=n-1;l>=0;l--){if(this.isBlazorServer?+s>+this.createDateObj(this.blazorTimeCollections[l]):+s>this.timeCollections[l]){o=this.validLiElement(l,!0);this.isBlazorServer||(a=+this.createDateObj(new Date(this.timeCollections[o]))),this.activeIndex=o;break}if(0===l){var o=this.validLiElement(n-1);this.isBlazorServer||(a=+this.createDateObj(new Date(this.timeCollections[o]))),this.activeIndex=o;break}}this.selectedElement=this.liCollections[this.activeIndex],this.isBlazorServer?(this.inputElement.setAttribute("value",this.selectedElement.getAttribute("data-value")),this.interopAdaptor.invokeMethodAsync("OnListItemClick",this.activeIndex,!0)):this.elementValue(t.isNullOrUndefined(a)?null:new Date(a))}},a.prototype.selectNextItem=function(e){var t=this.validLiElement(0,"down"!==e.action);this.activeIndex=t,this.selectedElement=this.liCollections[t],this.isBlazorServer?(this.inputElement.setAttribute("value",this.selectedElement.getAttribute("data-value")),this.interopAdaptor.invokeMethodAsync("OnListItemClick",t,!0)):this.elementValue(new Date(this.timeCollections[t]))},a.prototype.findNextInBlazor=function(e){var i=t.isNullOrUndefined(this.blazorTimeCollections)?0:this.blazorTimeCollections.length,s=0,a=this.createDateObj(this.inputElement.value);switch(e.action){case"home":this.activeIndex=s;break;case"end":s=i-1,this.activeIndex=s;break;case"down":for(l=0;l<i;l++){if(this.isBlazorServer?+a<+this.createDateObj(this.blazorTimeCollections[l]):+a<this.timeCollections[l]){var n=this.validLiElement(l);this.activeIndex=n;break}if(l===i-1){var r=this.validLiElement(0);this.activeIndex=r;break}}break;case"up":for(var l=i-1;l>=0;l--){if(this.isBlazorServer?+a>+this.createDateObj(this.blazorTimeCollections[l]):+a>this.timeCollections[l]){var o=this.validLiElement(l,!0);this.activeIndex=o;break}if(0===l){var h=this.validLiElement(i-1);this.activeIndex=h;break}}}this.interopAdaptor.invokeMethodAsync("OnListItemClick",this.activeIndex,!0)},a.prototype.elementValue=function(e){t.isNullOrUndefined(this.checkDateValue(e))||this.checkValue(e)},a.prototype.validLiElement=function(e,i){var s=null;if(this.isBlazorServer&&t.isNullOrUndefined(this.popupWrapper)){if((a=this.blazorTimeCollections).length)if(i)for(r=e;r>=0;r--){s=r;break}else for(r=e;r<=a.length-1;r++){s=r;break}}else{var a=t.isNullOrUndefined(this.popupWrapper)?this.liCollections:this.popupWrapper.querySelectorAll(".e-list-item"),n=!0;if(a.length)if(i)for(r=e;r>=0;r--){if(!a[r].classList.contains("e-disabled")){s=r;break}0===r&&n&&(e=r=a.length,n=!1)}else for(var r=e;r<=a.length-1;r++){if(!a[r].classList.contains("e-disabled")){s=r;break}r===a.length-1&&n&&(e=r=-1,n=!1)}}return s},a.prototype.keyHandler=function(e){if(!(t.isNullOrUndefined(this.step)||this.step<=0||this.inputWrapper.buttons[0].classList.contains("e-disabled"))){var i=this.isBlazorServer?t.isNullOrUndefined(this.blazorTimeCollections)?0:this.blazorTimeCollections.length:this.timeCollections.length;if(t.isNullOrUndefined(this.getActiveElement())||0===this.getActiveElement().length)if(t.isNullOrUndefined(this.popupObj)&&this.isBlazorServer)if(t.isNullOrUndefined(this.activeIndex)){a=this.validLiElement(0,"down"!==e.action);this.activeIndex=a,this.interopAdaptor.invokeMethodAsync("OnListItemClick",a,!0)}else this.findNextInBlazor(e);else this.liCollections.length>0&&(this.isBlazorServer?t.isNullOrUndefined(this.activeIndex):t.isNullOrUndefined(this.value)&&t.isNullOrUndefined(this.activeIndex))?this.selectNextItem(e):this.findNextElement(e);else{var s=void 0;if(e.keyCode>=37&&e.keyCode<=40){a=40===e.keyCode||39===e.keyCode?++this.activeIndex:--this.activeIndex;this.activeIndex=a=this.activeIndex===i?0:this.activeIndex,this.activeIndex=a=this.activeIndex<0?i-1:this.activeIndex,this.activeIndex=a=this.validLiElement(this.activeIndex,40!==e.keyCode&&39!==e.keyCode),this.isBlazorServer||(s=t.isNullOrUndefined(this.timeCollections[a])?this.timeCollections[0]:this.timeCollections[a])}else if("home"===e.action){a=this.validLiElement(0);this.activeIndex=a,this.isBlazorServer||(s=this.timeCollections[a])}else if("end"===e.action){var a=this.validLiElement(i-1,!0);this.activeIndex=a,this.isBlazorServer||(s=this.timeCollections[a])}this.selectedElement=this.liCollections[this.activeIndex],this.isBlazorServer?(this.inputElement.setAttribute("value",this.selectedElement.getAttribute("data-value")),this.interopAdaptor.invokeMethodAsync("OnListItemClick",this.activeIndex,!0)):this.elementValue(new Date(s))}this.isNavigate=!0,this.setHover(this.selectedElement,"e-navigation"),this.setActiveDescendant(),this.isBlazorServer||this.selectInputText(),!this.isPopupOpen()||null===this.selectedElement||e&&"click"===e.type||this.setScrollPosition()}},a.prototype.getCultureTimeObject=function(e,i){return t.isBlazor()?t.getValue("t",t.getValue(i,t.blazorCultureFormats)).replace(/tt/,"a"):t.getValue("main."+i+".dates.calendars.gregorian.timeFormats.short",e)},a.prototype.getCultureDateObject=function(e,i){return t.isBlazor()?t.getValue("d",t.getValue(i,t.blazorCultureFormats)):t.getValue("main."+i+".dates.calendars.gregorian.dateFormats.short",e)},a.prototype.wireListEvents=function(){t.EventHandler.add(this.listWrapper,"click",this.onMouseClick,this),t.Browser.isDevice||(t.EventHandler.add(this.listWrapper,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.listWrapper,"mouseout",this.onMouseLeave,this))},a.prototype.unWireListEvents=function(){this.listWrapper&&(t.EventHandler.remove(this.listWrapper,"click",this.onMouseClick),t.Browser.isDevice||(t.EventHandler.remove(this.listWrapper,"mouseover",this.onMouseOver),t.EventHandler.remove(this.listWrapper,"mouseout",this.onMouseLeave)))},a.prototype.valueProcess=function(e,i){var s=t.isNullOrUndefined(this.checkDateValue(i))?null:i;+this.prevDate!=+s&&(this.initValue=s,this.changeEvent(e))},a.prototype.changeEvent=function(e){this.addSelection(),this.updateInput(!0,this.initValue);var i={event:e||null,value:this.value,text:this.inputElement.value,isInteracted:!t.isNullOrUndefined(e),element:this.element};i.value=this.valueWithMinutes||this.getDateObject(this.inputElement.value),this.prevDate=this.valueWithMinutes||this.getDateObject(this.inputElement.value),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",i),this.invalidValueString=null,this.checkErrorState(this.value)},a.prototype.updateInput=function(e,i){e&&(this.prevValue=this.getValue(i)),this.prevDate=this.valueWithMinutes=i,"number"==typeof i&&(this.value&&+new Date(+this.value).setMilliseconds(0))===+i||(this.setProperties({value:i},!0),this.enableMask&&this.createMask()),!this.strictMode&&t.isNullOrUndefined(this.value)&&this.invalidValueString&&(this.checkErrorState(this.invalidValueString),this.updateInputValue(this.invalidValueString)),this.clearIconState()},a.prototype.setActiveDescendant=function(){t.isNullOrUndefined(this.selectedElement)?t.attributes(this.inputElement,{"aria-activedescendant":"null"}):t.attributes(this.inputElement,{"aria-activedescendant":this.selectedElement.getAttribute("id")})},a.prototype.removeSelection=function(){if(this.removeHover("e-hover"),!t.isNullOrUndefined(this.popupWrapper)){var e=this.popupWrapper.querySelectorAll(".e-active");e.length&&(t.removeClass(e,"e-active"),e[0].removeAttribute("aria-selected"))}},a.prototype.removeHover=function(e){var i=this.getHoverItem(e);i&&i.length&&(t.removeClass(i,e),"e-navigation"===e&&i[0].removeAttribute("aria-selected"))},a.prototype.getHoverItem=function(e){var i;return t.isNullOrUndefined(this.popupWrapper)||(i=this.popupWrapper.querySelectorAll("."+e)),i},a.prototype.setActiveClass=function(){if(!t.isNullOrUndefined(this.popupWrapper)){var e=this.popupWrapper.querySelectorAll(".e-list-item");if(e.length)for(var i=0;i<e.length;i++)if(!this.isBlazorServer&&this.timeCollections[i]===+this.getDateObject(this.valueWithMinutes)||this.isBlazorServer&&this.blazorTimeCollections[i]===this.blazorTimeCollections[this.activeIndex]){e[i].setAttribute("aria-selected","true"),this.selectedElement=e[i],this.activeIndex=i;break}}},a.prototype.addSelection=function(){this.selectedElement=null,this.removeSelection(),this.setActiveClass(),t.isNullOrUndefined(this.selectedElement)||(t.addClass([this.selectedElement],"e-active"),this.selectedElement.setAttribute("aria-selected","true"))},a.prototype.isValidLI=function(e){return e&&e.classList.contains("e-list-item")&&!e.classList.contains("e-disabled")},a.prototype.createDateObj=function(e){var i=t.isBlazor()?"M"+t.getDefaultDateObject().dateSeperator+"d"+t.getDefaultDateObject().dateSeperator+"yy":null,s=this.globalize.formatDate(new Date,{format:i,skeleton:"short",type:"date"}),a=null;return"string"==typeof e?e.toUpperCase().indexOf("AM")>-1||e.toUpperCase().indexOf("PM")>-1?(s=this.defaultCulture.formatDate(new Date,{format:i,skeleton:"short",type:"date"}),a=isNaN(+new Date(s+" "+e))?null:new Date(new Date(s+" "+e).setMilliseconds(0)),t.isNullOrUndefined(a)&&(a=this.timeParse(s,e))):a=this.timeParse(s,e):e instanceof Date&&(a=e),a},a.prototype.timeParse=function(e,i){var s;return s=this.globalize.parseDate(e+" "+i,{format:this.cldrDateFormat()+" "+this.cldrTimeFormat(),type:"datetime"}),s=t.isNullOrUndefined(s)?this.globalize.parseDate(e+" "+i,{format:this.cldrDateFormat()+" "+this.dateToNumeric(),type:"datetime"}):s,s=t.isNullOrUndefined(s)?s:new Date(s.setMilliseconds(0))},a.prototype.createListItems=function(){var e=this;this.listWrapper=this.createElement("div",{className:"e-content",attrs:{tabindex:"0"}});var i,s=6e4*this.step,a=[];this.timeCollections=[],this.disableItemCollection=[],i=+this.getDateObject(this.initMin).setMilliseconds(0);for(var r=+this.getDateObject(this.initMax).setMilliseconds(0);r>=i;)this.timeCollections.push(i),a.push(this.globalize.formatDate(new Date(i),{format:this.cldrTimeFormat(),type:"time"})),i+=s;var l={itemCreated:function(t){var i={element:t.item,text:t.text,value:e.getDateObject(t.text),isDisabled:!1};e.trigger("itemRender",i,function(t){t.isDisabled&&t.element.classList.add("e-disabled"),t.element.classList.contains("e-disabled")&&e.disableItemCollection.push(t.element.getAttribute("data-value"))})}};this.listTag=n.ListBase.createList(this.createElement,a,l,!0),t.attributes(this.listTag,{role:"listbox","aria-hidden":"false",id:this.element.id+"_options"}),t.append([this.listTag],this.listWrapper)},a.prototype.documentClickHandler=function(e){var i=e.target;!t.isNullOrUndefined(this.popupObj)&&(this.inputWrapper.container.contains(i)||this.popupObj.element&&this.popupObj.element.contains(i))&&"touchstart"!==e.type&&e.preventDefault(),t.closest(i,'[id="'+this.popupObj.element.id+'"]')||i===this.inputElement||i===(this.inputWrapper&&this.inputWrapper.buttons[0])||i===(this.inputWrapper&&this.inputWrapper.clearButton)||i===(this.inputWrapper&&this.inputWrapper.container)?i!==this.inputElement&&(t.Browser.isDevice||(this.isPreventBlur=(t.Browser.isIE||"edge"===t.Browser.info.name)&&document.activeElement===this.inputElement&&i===this.popupWrapper)):this.isPopupOpen()&&(this.hide(),this.focusOut())},a.prototype.setEnableRtl=function(){s.Input.setEnableRtl(this.enableRtl,[this.inputWrapper.container]),this.popupObj&&(this.popupObj.enableRtl=this.enableRtl,this.popupObj.dataBind())},a.prototype.setEnable=function(){s.Input.setEnabled(this.enabled,this.inputElement,this.floatLabelType),this.enabled?(t.removeClass([this.inputWrapper.container],"e-disabled"),t.attributes(this.inputElement,{"aria-disabled":"false"}),this.inputElement.setAttribute("tabindex",this.tabIndex)):(this.hide(),t.addClass([this.inputWrapper.container],"e-disabled"),t.attributes(this.inputElement,{"aria-disabled":"true"}),this.inputElement.tabIndex=-1)},a.prototype.getProperty=function(e,t){"min"===t?(this.initMin=this.checkDateValue(new Date(this.checkInValue(e.min))),this.setProperties({min:this.initMin},!0)):(this.initMax=this.checkDateValue(new Date(this.checkInValue(e.max))),this.setProperties({max:this.initMax},!0)),""===this.inputElement.value?this.validateMinMax(this.value,this.min,this.max):this.checkValue(this.inputElement.value),this.checkValueChange(null,!1)},a.prototype.inputBlurHandler=function(e){if(this.enabled){if(this.isPreventBlur&&this.isPopupOpen())return void this.inputElement.focus();this.closePopup(0,e),this.enableMask&&this.maskedDateValue&&this.placeholder&&"Always"!==this.floatLabelType&&(this.inputElement.value!=this.maskedDateValue||this.value||"Auto"!=this.floatLabelType&&"Never"!=this.floatLabelType&&!this.placeholder||this.updateInputValue("")),t.removeClass([this.inputWrapper.container],[Z]);var i={model:this.isBlazorServer?null:this};this.trigger("blur",i),this.isBlazorServer||this.getText()===this.inputElement.value?0===this.inputElement.value.trim().length&&this.resetState():this.updateValue(this.inputElement.value,e),this.isBlazorServer&&this.interopAdaptor.invokeMethodAsync("OnStrictMode",this.inputElement.value),this.cursorDetails=null,this.isNavigate=!1,""===this.inputElement.value&&(this.invalidValueString=null)}},a.prototype.focusOut=function(){if(document.activeElement===this.inputElement){this.inputElement.blur(),t.removeClass([this.inputWrapper.container],[Z]);var e={model:this.isBlazorServer?null:this};this.trigger("blur",e)}},a.prototype.isPopupOpen=function(){return!(!this.popupWrapper||!this.popupWrapper.classList.contains(""+X))},a.prototype.inputFocusHandler=function(){if(this.enabled){var e={model:this.isBlazorServer?null:this};this.readonly||t.Browser.isDevice||this.enableMask||this.selectInputText(),this.enableMask&&!this.inputElement.value&&this.placeholder&&(!this.maskedDateValue||this.value||"Auto"!=this.floatLabelType&&"Never"!=this.floatLabelType&&!this.placeholder||(this.updateInputValue(this.maskedDateValue),this.inputElement.selectionStart=0,this.inputElement.selectionEnd=this.inputElement.value.length)),this.trigger("focus",e),this.clearIconState(),this.openOnFocus&&this.show()}},a.prototype.focusIn=function(){document.activeElement!==this.inputElement&&this.enabled&&this.inputElement.focus()},a.prototype.hide=function(){this.closePopup(100,null),this.clearIconState()},a.prototype.show=function(e){var i=this;if(!(this.enabled&&this.readonly||!this.enabled||this.popupWrapper)){this.popupCreation(),t.Browser.isDevice&&this.listWrapper&&(this.modal=this.createElement("div"),this.modal.className=X+" e-time-modal",document.body.className+=" e-time-overflow",document.body.appendChild(this.modal)),t.Browser.isDevice&&(this.mobileTimePopupWrap=this.createElement("div",{className:"e-timepicker-mob-popup-wrap"}),document.body.appendChild(this.mobileTimePopupWrap)),this.openPopupEventArgs={popup:this.isBlazorServer?null:this.popupObj||null,cancel:!1,event:e||null,name:"open",appendTo:t.Browser.isDevice?this.mobileTimePopupWrap:document.body};var s=this.openPopupEventArgs;this.trigger("open",s,function(e){if(t.isBlazor()&&i.isServerRendered&&(e.popup=i.popupObj||null),i.openPopupEventArgs=e,i.openPopupEventArgs.cancel||i.inputWrapper.buttons[0].classList.contains("e-disabled"))i.popupObj.destroy(),i.isBlazorServer&&(i.disposeServerPopup(),i.inputWrapper.container.parentElement.insertBefore(i.popupWrapper,i.inputWrapper.container.nextElementSibling),i.interopAdaptor.invokeMethodAsync("OnPopupHide",!1)),i.popupWrapper=i.listTag=void 0,i.liCollections=i.timeCollections=i.disableItemCollection=[],i.popupObj=null;else{i.isBlazorServer&&(i.popupWrapper.style.visibility="",i.popupWrapper.style.width=i.inputWrapper.container.offsetWidth+"px",i.popupWrapper.style.height="auto"),i.isBlazorServer&&(i.openPopupEventArgs.popup=i.popupObj),i.openPopupEventArgs.appendTo.appendChild(i.popupWrapper),i.popupAlignment(i.openPopupEventArgs),i.setScrollPosition(),t.Browser.isDevice||i.inputElement.focus();var s={name:"FadeIn",duration:50};i.popupObj.refreshPosition(i.anchor),1e3===i.zIndex?i.popupObj.show(new t.Animation(s),i.element):i.popupObj.show(new t.Animation(s),null),i.setActiveDescendant(),t.attributes(i.inputElement,{"aria-expanded":"true"}),t.addClass([i.inputWrapper.container],Z),t.EventHandler.add(document,"mousedown touchstart",i.documentClickHandler,i),i.setOverlayIndex(i.mobileTimePopupWrap,i.popupObj.element,i.modal,t.Browser.isDevice)}})}},a.prototype.setOverlayIndex=function(e,i,s,a){if(a&&!t.isNullOrUndefined(i)&&!t.isNullOrUndefined(s)&&!t.isNullOrUndefined(e)){var n=parseInt(i.style.zIndex,10)?parseInt(i.style.zIndex,10):1e3;s.style.zIndex=(n-1).toString(),e.style.zIndex=n.toString()}},a.prototype.formatValues=function(e){var i;return"number"==typeof e?i=t.formatUnit(e):"string"==typeof e&&(i=e.match(/px|%|em/)?e:isNaN(parseInt(e,10))?e:t.formatUnit(e)),i},a.prototype.popupAlignment=function(e){if(e.popup.position.X=this.formatValues(e.popup.position.X),e.popup.position.Y=this.formatValues(e.popup.position.Y),isNaN(parseFloat(e.popup.position.X))&&isNaN(parseFloat(e.popup.position.Y))||(this.popupObj.relateTo=this.anchor=document.body,this.popupObj.targetType="container"),isNaN(parseFloat(e.popup.position.X))||(this.popupObj.offsetX=parseFloat(e.popup.position.X)),isNaN(parseFloat(e.popup.position.Y))||(this.popupObj.offsetY=parseFloat(e.popup.position.Y)),t.Browser.isDevice)"center"===e.popup.position.X&&"center"===e.popup.position.Y&&(this.popupObj.relateTo=this.anchor=document.body,this.popupObj.offsetY=0,this.popupObj.targetType="container",this.popupObj.collision={X:"fit",Y:"fit"});else{switch(e.popup.position.X){case"left":break;case"right":e.popup.offsetX=this.containerStyle.width;break;case"center":e.popup.offsetX=-this.containerStyle.width/2}switch(e.popup.position.Y){case"top":case"bottom":break;case"center":e.popup.offsetY=-this.containerStyle.height/2}"center"===e.popup.position.X&&"center"===e.popup.position.Y&&(this.popupObj.relateTo=this.inputWrapper.container,this.anchor=this.inputElement,this.popupObj.targetType="relative")}},a.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},a.prototype.getModuleName=function(){return"timepicker"},a.prototype.onPropertyChanged=function(e,i){for(var a=0,n=Object.keys(e);a<n.length;a++){var r=n[a];switch(r){case"placeholder":s.Input.setPlaceholder(e.placeholder,this.inputElement),this.inputElement.setAttribute("aria-placeholder",e.placeholder);break;case"readonly":s.Input.setReadonly(this.readonly,this.inputElement,this.floatLabelType),this.readonly&&this.hide(),this.setTimeAllowEdit();break;case"enabled":this.setProperties({enabled:e.enabled},!0),this.setEnable();break;case"allowEdit":this.setTimeAllowEdit();break;case"enableRtl":this.isBlazorServer||(this.setProperties({enableRtl:e.enableRtl},!0),this.setEnableRtl());break;case"cssClass":this.updateCssClass(e.cssClass,i.cssClass);break;case"zIndex":this.setProperties({zIndex:e.zIndex},!0),this.setZIndex();break;case"htmlAttributes":this.updateHtmlAttributeToElement(),this.updateHtmlAttributeToWrapper(),this.checkAttributes(!0);break;case"min":case"max":this.isBlazorServer||this.getProperty(e,r);break;case"showClearButton":s.Input.setClearButton(this.showClearButton,this.inputElement,this.inputWrapper),this.bindClearEvent();break;case"locale":this.setProperties({locale:e.locale},!0),this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.updatePlaceHolder(),this.isBlazorServer||(this.setValue(this.value),this.enableMask&&this.notify("createMask",{module:"MaskedDateTime"}));break;case"width":t.setStyleAttribute(this.inputWrapper.container,{width:this.setWidth(e.width)}),this.containerStyle=this.inputWrapper.container.getBoundingClientRect();break;case"format":this.setProperties({format:e.format},!0),this.checkTimeFormat(),this.isBlazorServer||(this.setValue(this.value),this.enableMask&&(this.createMask(),this.value||this.updateInputValue(this.maskedDateValue)));break;case"value":this.isBlazorServer||(this.invalidValueString=null,this.checkInvalidValue(e.value),e.value=this.value,this.invalidValueString?(this.updateInputValue(this.invalidValueString),this.checkErrorState(this.invalidValueString)):("string"==typeof e.value?(this.setProperties({value:this.checkDateValue(new Date(e.value))},!0),e.value=this.value):(e.value&&+new Date(+e.value).setMilliseconds(0))!==+this.value&&(e.value=this.checkDateValue(new Date(""+e.value))),this.initValue=e.value,e.value=this.compareFormatChange(this.checkValue(e.value))),this.checkValueChange(null,!1),this.isPopupOpen()&&this.setScrollPosition(),this.isAngular&&this.preventChange&&(this.preventChange=!1),this.enableMask&&this.notify("createMask",{module:"MaskedDateTime"}));break;case"floatLabelType":this.floatLabelType=e.floatLabelType,s.Input.removeFloating(this.inputWrapper),s.Input.addFloating(this.inputElement,this.floatLabelType,this.placeholder);break;case"strictMode":this.isBlazorServer||(this.invalidValueString=null,e.strictMode&&this.checkErrorState(null),this.setProperties({strictMode:e.strictMode},!0),this.checkValue(this.inputElement.value),this.checkValueChange(null,!1));break;case"scrollTo":this.isBlazorServer?this.popupWrapper&&this.setScrollTo():this.checkDateValue(new Date(this.checkInValue(e.scrollTo)))?(this.popupWrapper&&this.setScrollTo(),this.setProperties({scrollTo:this.checkDateValue(new Date(this.checkInValue(e.scrollTo)))},!0)):this.setProperties({scrollTo:null},!0);break;case"enableMask":this.enableMask?(this.notify("createMask",{module:"MaskedDateTime"}),this.updateInputValue(this.maskedDateValue)):this.inputElement.value===this.maskedDateValue&&this.updateInputValue("")}}},a.prototype.checkInValue=function(e){return e instanceof Date?e.toUTCString():""+e},q([t.Property(null)],a.prototype,"width",void 0),q([t.Property(null)],a.prototype,"cssClass",void 0),q([t.Property(!1)],a.prototype,"strictMode",void 0),q([t.Property(null)],a.prototype,"keyConfigs",void 0),q([t.Property(null)],a.prototype,"format",void 0),q([t.Property(!0)],a.prototype,"enabled",void 0),q([t.Property(!1)],a.prototype,"readonly",void 0),q([t.Property({})],a.prototype,"htmlAttributes",void 0),q([t.Property("Never")],a.prototype,"floatLabelType",void 0),q([t.Property(null)],a.prototype,"placeholder",void 0),q([t.Property(1e3)],a.prototype,"zIndex",void 0),q([t.Property(!1)],a.prototype,"enablePersistence",void 0),q([t.Property(!0)],a.prototype,"showClearButton",void 0),q([t.Property(30)],a.prototype,"step",void 0),q([t.Property(null)],a.prototype,"scrollTo",void 0),q([t.Property(null)],a.prototype,"value",void 0),q([t.Property(null)],a.prototype,"min",void 0),q([t.Property(null)],a.prototype,"max",void 0),q([t.Property(!0)],a.prototype,"allowEdit",void 0),q([t.Property(!1)],a.prototype,"openOnFocus",void 0),q([t.Property(!1)],a.prototype,"enableMask",void 0),q([t.Property({day:"day",month:"month",year:"year",hour:"hour",minute:"minute",second:"second",dayOfTheWeek:"day of the week"})],a.prototype,"maskPlaceholder",void 0),q([t.Event()],a.prototype,"change",void 0),q([t.Event()],a.prototype,"created",void 0),q([t.Event()],a.prototype,"destroyed",void 0),q([t.Event()],a.prototype,"open",void 0),q([t.Event()],a.prototype,"itemRender",void 0),q([t.Event()],a.prototype,"close",void 0),q([t.Event()],a.prototype,"cleared",void 0),q([t.Event()],a.prototype,"blur",void 0),q([t.Event()],a.prototype,"focus",void 0),a=q([t.NotifyPropertyChanges],a)}(t.Component),ee=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),te=function(e,t,i,s){var a,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(n<3?a(r):n>3?a(t,i,r):a(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r},ie=(new Date).getDate(),se=(new Date).getMonth(),ae=(new Date).getFullYear(),ne=(new Date).getHours(),re=(new Date).getMinutes(),le=(new Date).getSeconds(),oe=(new Date).getMilliseconds(),he="e-datetimepicker",ue=function(a){function n(e,t){var i=a.call(this,e,t)||this;return i.valueWithMinutes=null,i.scrollInvoked=!1,i.moduleName=i.getModuleName(),i.dateTimeOptions=e,i}return ee(n,a),n.prototype.focusHandler=function(){this.enabled&&t.addClass([this.inputWrapper.container],"e-input-focus")},n.prototype.focusIn=function(){a.prototype.focusIn.call(this)},n.prototype.focusOut=function(){document.activeElement===this.inputElement&&(this.inputElement.blur(),t.removeClass([this.inputWrapper.container],["e-input-focus"]))},n.prototype.blurHandler=function(e){if(this.enabled){if(this.isTimePopupOpen()&&this.isPreventBlur)return void this.inputElement.focus();t.removeClass([this.inputWrapper.container],"e-input-focus");var i={model:t.isBlazor()&&this.isServerRendered?null:this};this.isTimePopupOpen()&&this.hide(e),this.trigger("blur",i)}},n.prototype.destroy=function(){this.popupObject&&this.popupObject.element.classList.contains("e-popup")&&(this.popupObject.destroy(),t.detach(this.dateTimeWrapper),this.dateTimeWrapper=void 0,this.liCollections=this.timeCollections=[],t.isNullOrUndefined(this.rippleFn)||this.rippleFn());var e={"aria-live":"assertive","aria-atomic":"true","aria-invalid":"false","aria-haspopup":"true","aria-activedescendant":"null",autocorrect:"off",autocapitalize:"off",spellcheck:"false","aria-owns":this.element.id+"_options","aria-expanded":"false",role:"combobox",autocomplete:"off"};this.inputElement&&(s.Input.removeAttributes(e,this.inputElement),this.inputElement.removeAttribute("aria-placeholder")),this.isCalendar()&&(this.popupWrapper&&t.detach(this.popupWrapper),this.popupObject=this.popupWrapper=null,this.keyboardHandler.destroy()),this.unBindInputEvents(),a.prototype.destroy.call(this)},n.prototype.render=function(){this.timekeyConfigure={enter:"enter",escape:"escape",end:"end",tab:"tab",home:"home",down:"downarrow",up:"uparrow",left:"leftarrow",right:"rightarrow",open:"alt+downarrow",close:"alt+uparrow"},this.valueWithMinutes=null,this.previousDateTime=null,this.isPreventBlur=!1,this.cloneElement=this.element.cloneNode(!0),this.dateTimeFormat=this.cldrDateTimeFormat(),this.initValue=this.value,a.prototype.updateHtmlAttributeToElement.call(this),this.checkAttributes(!1);var e={placeholder:this.placeholder};this.l10n=new t.L10n("datetimepicker",e,this.locale),this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),a.prototype.render.call(this),this.createInputElement(),a.prototype.updateHtmlAttributeToWrapper.call(this),this.bindInputEvents(),this.enableMask&&this.notify("createMask",{module:"MaskedDateTime"}),this.setValue(),!this.enableMask||this.value||!this.maskedDateValue||"Always"!=this.floatLabelType&&this.floatLabelType&&this.placeholder||s.Input.setValue(this.maskedDateValue,this.inputElement,this.floatLabelType,this.showClearButton),this.setProperties({scrollTo:this.checkDateValue(new Date(this.checkValue(this.scrollTo)))},!0),this.previousDateTime=this.value&&new Date(+this.value),"EJS-DATETIMEPICKER"===this.element.tagName&&(this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.removeAttribute("tabindex"),this.enabled||(this.inputElement.tabIndex=-1)),this.renderComplete()},n.prototype.setValue=function(){if(this.initValue=this.validateMinMaxRange(this.value),!this.strictMode&&this.isDateObject(this.initValue)){var e=this.validateMinMaxRange(this.initValue);s.Input.setValue(this.getFormattedValue(e),this.inputElement,this.floatLabelType,this.showClearButton),this.setProperties({value:e},!0)}else t.isNullOrUndefined(this.value)&&(this.initValue=null,this.setProperties({value:null},!0));this.valueWithMinutes=this.value,a.prototype.updateInput.call(this)},n.prototype.validateMinMaxRange=function(e){var t=e;return this.isDateObject(e)?t=this.validateValue(e):+this.min>+this.max&&this.disablePopupButton(!0),this.checkValidState(t),t},n.prototype.checkValidState=function(e){this.isValidState=!0,this.strictMode||(+e>+this.max||+e<+this.min)&&(this.isValidState=!1),this.checkErrorState()},n.prototype.checkErrorState=function(){this.isValidState?t.removeClass([this.inputWrapper.container],"e-error"):t.addClass([this.inputWrapper.container],"e-error"),t.attributes(this.inputElement,{"aria-invalid":this.isValidState?"false":"true"})},n.prototype.validateValue=function(e){var t=e;return this.strictMode?+this.min>+this.max?(this.disablePopupButton(!0),t=this.max):+e<+this.min?t=this.min:+e>+this.max&&(t=this.max):+this.min>+this.max&&(this.disablePopupButton(!0),t=e),t},n.prototype.disablePopupButton=function(e){e?(t.addClass([this.inputWrapper.buttons[0],this.timeIcon],"e-disabled"),this.hide()):t.removeClass([this.inputWrapper.buttons[0],this.timeIcon],"e-disabled")},n.prototype.getFormattedValue=function(e){var i;return t.isNullOrUndefined(e)?null:(i="Gregorian"===this.calendarMode?{format:this.cldrDateTimeFormat(),type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}:{format:this.cldrDateTimeFormat(),type:"dateTime",skeleton:"yMd",calendar:"islamic"},this.globalize.formatDate(e,i))},n.prototype.isDateObject=function(e){return!t.isNullOrUndefined(e)&&!isNaN(+e)},n.prototype.createInputElement=function(){t.removeClass([this.inputElement],"e-datepicker"),t.removeClass([this.inputWrapper.container],"e-date-wrapper"),t.addClass([this.inputWrapper.container],"e-datetime-wrapper"),t.addClass([this.inputElement],he),this.renderTimeIcon()},n.prototype.renderTimeIcon=function(){this.timeIcon=s.Input.appendSpan("e-input-group-icon e-time-icon e-icons",this.inputWrapper.container)},n.prototype.bindInputEvents=function(){t.EventHandler.add(this.timeIcon,"mousedown",this.timeHandler,this),t.EventHandler.add(this.inputWrapper.buttons[0],"mousedown",this.dateHandler,this),t.EventHandler.add(this.inputElement,"blur",this.blurHandler,this),t.EventHandler.add(this.inputElement,"focus",this.focusHandler,this),this.defaultKeyConfigs=t.extend(this.defaultKeyConfigs,this.keyConfigs),this.keyboardHandler=new t.KeyboardEvents(this.inputElement,{eventName:"keydown",keyAction:this.inputKeyAction.bind(this),keyConfigs:this.defaultKeyConfigs})},n.prototype.unBindInputEvents=function(){t.EventHandler.remove(this.timeIcon,"mousedown touchstart",this.timeHandler),t.EventHandler.remove(this.inputWrapper.buttons[0],"mousedown touchstart",this.dateHandler),this.inputElement&&(t.EventHandler.remove(this.inputElement,"blur",this.blurHandler),t.EventHandler.remove(this.inputElement,"focus",this.focusHandler)),this.keyboardHandler&&this.keyboardHandler.destroy()},n.prototype.cldrTimeFormat=function(){return this.isNullOrEmpty(this.timeFormat)?"en"===this.locale||"en-US"===this.locale?t.isBlazor()?t.getValue("t",t.getValue(this.locale,t.blazorCultureFormats)).replace(/tt/,"a"):t.getValue("timeFormats.short",t.getDefaultDateObject()):this.getCultureTimeObject(t.cldrData,""+this.locale):this.timeFormat},n.prototype.cldrDateTimeFormat=function(){var e=new t.Internationalization(this.locale).getDatePattern({skeleton:t.isBlazor()?"d":"yMd"});return this.isNullOrEmpty(this.formatString)?e+" "+this.getCldrFormat("time"):this.formatString},n.prototype.getCldrFormat=function(e){return"en"===this.locale||"en-US"===this.locale?t.isBlazor()?t.getValue("t",t.getValue(this.locale,t.blazorCultureFormats)).replace(/tt/,"a"):t.getValue("timeFormats.short",t.getDefaultDateObject()):this.getCultureTimeObject(t.cldrData,""+this.locale)},n.prototype.isNullOrEmpty=function(e){return!!(t.isNullOrUndefined(e)||"string"==typeof e&&""===e.trim())},n.prototype.getCultureTimeObject=function(e,i){return"Gregorian"===this.calendarMode?t.isBlazor()?t.getValue("t",t.getValue(this.locale,t.blazorCultureFormats)).replace(/tt/,"a"):t.getValue("main."+this.locale+".dates.calendars.gregorian.timeFormats.short",e):t.getValue("main."+this.locale+".dates.calendars.islamic.timeFormats.short",e)},n.prototype.timeHandler=function(e){this.enabled&&(this.isIconClicked=!0,t.Browser.isDevice&&this.inputElement.setAttribute("readonly",""),e.currentTarget===this.timeIcon&&e.preventDefault(),this.enabled&&!this.readonly&&(this.isDatePopupOpen()&&a.prototype.hide.call(this,e),this.isTimePopupOpen()?this.closePopup(e):(this.inputElement.focus(),this.popupCreation("time",e),t.addClass([this.inputWrapper.container],["e-input-focus"]))),this.isIconClicked=!1)},n.prototype.dateHandler=function(e){this.enabled&&(e.currentTarget===this.inputWrapper.buttons[0]&&e.preventDefault(),this.enabled&&!this.readonly&&(this.isTimePopupOpen()&&this.closePopup(e),t.isNullOrUndefined(this.popupWrapper)||this.popupCreation("date",e)))},n.prototype.show=function(e,t){this.enabled&&this.readonly||!this.enabled||("time"!==e||this.dateTimeWrapper?this.popupObj||(this.isTimePopupOpen()&&this.hide(t),a.prototype.show.call(this),this.popupCreation("date",t)):(this.isDatePopupOpen()&&this.hide(t),this.popupCreation("time",t)))},n.prototype.toggle=function(e){this.isDatePopupOpen()?(a.prototype.hide.call(this,e),this.show("time",null)):this.isTimePopupOpen()?(this.hide(e),a.prototype.show.call(this,null,e),this.popupCreation("date",null)):this.show(null,e)},n.prototype.listCreation=function(){var i;i="Gregorian"===this.calendarMode?this.globalize.parseDate(this.inputElement.value,{format:this.cldrDateTimeFormat(),type:"datetime"}):this.globalize.parseDate(this.inputElement.value,{format:this.cldrDateTimeFormat(),type:"datetime",calendar:"islamic"});var s=t.isNullOrUndefined(this.value)?""!==this.inputElement.value?i:new Date:this.value;this.valueWithMinutes=s,this.listWrapper=t.createElement("div",{className:"e-content",attrs:{tabindex:"0"}});var a=this.startTime(s),n=this.endTime(s),r=e.TimePickerBase.createListItems(this.createElement,a,n,this.globalize,this.cldrTimeFormat(),this.step);this.timeCollections=r.collection,this.listTag=r.list,t.attributes(this.listTag,{role:"listbox","aria-hidden":"false",id:this.element.id+"_options"}),t.append([r.list],this.listWrapper),this.wireTimeListEvents();var l={duration:300,selector:".e-list-item"};this.rippleFn=t.rippleEffect(this.listWrapper,l),this.liCollections=this.listWrapper.querySelectorAll(".e-list-item")},n.prototype.popupCreation=function(e,i){t.Browser.isDevice&&this.element.setAttribute("readonly","readonly"),"date"===e?!this.readonly&&this.popupWrapper&&(t.addClass([this.popupWrapper],"e-datetimepopup-wrapper"),t.attributes(this.popupWrapper,{id:this.element.id+"_datepopup"})):this.readonly||(this.dateTimeWrapper=t.createElement("div",{className:he+" e-popup",attrs:{id:this.element.id+"_timepopup",style:"visibility:hidden ; display:block"}}),t.isNullOrUndefined(this.cssClass)||(this.dateTimeWrapper.className+=" "+this.cssClass),!t.isNullOrUndefined(this.step)&&this.step>0&&(this.listCreation(),t.append([this.listWrapper],this.dateTimeWrapper)),document.body.appendChild(this.dateTimeWrapper),this.addTimeSelection(),this.renderPopup(),this.setTimeScrollPosition(),this.openPopup(i),this.popupObject.refreshPosition(this.inputElement))},n.prototype.openPopup=function(e){var i=this;this.preventArgs={cancel:!1,popup:t.isBlazor()&&this.isServerRendered?null:this.popupObject,event:e||null};var s=this.preventArgs;this.trigger("open",s,function(e){if(i.preventArgs=e,!i.preventArgs.cancel&&!i.readonly){var s={name:"FadeIn",duration:100};1e3===i.zIndex?i.popupObject.show(new t.Animation(s),i.element):i.popupObject.show(new t.Animation(s),null),t.addClass([i.inputWrapper.container],["e-icon-anim"]),t.attributes(i.inputElement,{"aria-expanded":"true"}),t.EventHandler.add(document,"mousedown touchstart",i.documentClickHandler,i)}})},n.prototype.documentClickHandler=function(e){var i=e.target;!t.isNullOrUndefined(this.popupObject)&&(this.inputWrapper.container.contains(i)||this.popupObject.element&&this.popupObject.element.contains(i))&&"touchstart"!==e.type&&e.preventDefault(),t.closest(i,'[id="'+(this.popupObject&&this.popupObject.element.id+'"]'))||i===this.inputElement||i===this.timeIcon||i===this.inputWrapper.container?i!==this.inputElement&&(t.Browser.isDevice||(this.isPreventBlur=document.activeElement===this.inputElement&&(t.Browser.isIE||"edge"===t.Browser.info.name)&&i===this.popupObject.element)):this.isTimePopupOpen()&&(this.hide(e),this.focusOut())},n.prototype.isTimePopupOpen=function(){return!(!this.dateTimeWrapper||!this.dateTimeWrapper.classList.contains(""+he))},n.prototype.isDatePopupOpen=function(){return!(!this.popupWrapper||!this.popupWrapper.classList.contains("e-datetimepopup-wrapper"))},n.prototype.renderPopup=function(){var e=this;this.containerStyle=this.inputWrapper.container.getBoundingClientRect(),t.Browser.isDevice&&(this.timeModal=t.createElement("div"),this.timeModal.className=he+" e-time-modal",document.body.className+=" e-time-overflow",this.timeModal.style.display="block",document.body.appendChild(this.timeModal));this.popupObject=new i.Popup(this.dateTimeWrapper,{width:this.setPopupWidth(),zIndex:this.zIndex,targetType:"container",collision:t.Browser.isDevice?{X:"fit",Y:"fit"}:{X:"flip",Y:"flip"},relateTo:t.Browser.isDevice?document.body:this.inputWrapper.container,position:t.Browser.isDevice?{X:"center",Y:"center"}:{X:"left",Y:"bottom"},enableRtl:this.enableRtl,offsetY:4,open:function(){e.dateTimeWrapper.style.visibility="visible",t.addClass([e.timeIcon],"e-active"),t.Browser.isDevice||(e.timekeyConfigure=t.extend(e.timekeyConfigure,e.keyConfigs),e.inputEvent=new t.KeyboardEvents(e.inputWrapper.container,{keyAction:e.timeKeyActionHandle.bind(e),keyConfigs:e.timekeyConfigure,eventName:"keydown"}))},close:function(){t.removeClass([e.timeIcon],"e-active"),e.unWireTimeListEvents(),e.inputElement.setAttribute("aria-activedescendant","null"),t.remove(e.popupObject.element),e.popupObject.destroy(),e.dateTimeWrapper.innerHTML="",e.listWrapper=e.dateTimeWrapper=void 0,e.inputEvent&&e.inputEvent.destroy()},targetExitViewport:function(){t.Browser.isDevice||e.hide()}}),this.popupObject.element.style.maxHeight="250px"},n.prototype.setDimension=function(e){return e="number"==typeof e?t.formatUnit(e):"string"==typeof e?e:"100%"},n.prototype.setPopupWidth=function(){var e=this.setDimension(this.width);return e.indexOf("%")>-1&&(e=(this.containerStyle.width*parseFloat(e)/100).toString()+"px"),e},n.prototype.wireTimeListEvents=function(){t.EventHandler.add(this.listWrapper,"click",this.onMouseClick,this),t.Browser.isDevice||(t.EventHandler.add(this.listWrapper,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.listWrapper,"mouseout",this.onMouseLeave,this))},n.prototype.unWireTimeListEvents=function(){this.listWrapper&&(t.EventHandler.remove(this.listWrapper,"click",this.onMouseClick),t.EventHandler.remove(document,"mousedown touchstart",this.documentClickHandler),t.Browser.isDevice||(t.EventHandler.add(this.listWrapper,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.listWrapper,"mouseout",this.onMouseLeave,this)))},n.prototype.onMouseOver=function(e){var i=t.closest(e.target,".e-list-item");this.setTimeHover(i,"e-hover")},n.prototype.onMouseLeave=function(){this.removeTimeHover("e-hover")},n.prototype.setTimeHover=function(e,i){this.enabled&&this.isValidLI(e)&&!e.classList.contains(i)&&(this.removeTimeHover(i),t.addClass([e],i))},n.prototype.getPopupHeight=function(){var e=parseInt("250px",10),t=this.dateTimeWrapper.getBoundingClientRect().height;return t>e?e:t},n.prototype.changeEvent=function(e){(this.value&&this.value.valueOf())!==(this.previousDateTime&&+this.previousDateTime.valueOf())&&(a.prototype.changeEvent.call(this,e),this.valueWithMinutes=this.value,this.setInputValue("date"),this.previousDateTime=this.value&&new Date(+this.value))},n.prototype.updateValue=function(e){this.setInputValue("time"),+this.previousDateTime!=+this.value&&(this.changedArgs={value:this.value,event:e||null,isInteracted:!t.isNullOrUndefined(e),element:this.element},this.addTimeSelection(),this.trigger("change",this.changedArgs),this.previousDateTime=this.value)},n.prototype.setTimeScrollPosition=function(){var e=this.selectedElement;t.isNullOrUndefined(e)?this.dateTimeWrapper&&this.checkDateValue(this.scrollTo)&&this.setScrollTo():this.findScrollTop(e)},n.prototype.findScrollTop=function(e){var t=this.getPopupHeight(),i=e.nextElementSibling,s=i?i.offsetTop:e.offsetTop,a=e.getBoundingClientRect().height;s+e.offsetTop>t?this.dateTimeWrapper.scrollTop=i?s-(t/2+a/2):s:this.dateTimeWrapper.scrollTop=0},n.prototype.setScrollTo=function(){var e,i=this.dateTimeWrapper.querySelectorAll(".e-list-item");if(i.length>=0){this.scrollInvoked=!0;var s=this.timeCollections[0],a=this.getDateObject(this.checkDateValue(this.scrollTo)).getTime();e=i[Math.round((a-s)/(6e4*this.step))]}else this.dateTimeWrapper.scrollTop=0;t.isNullOrUndefined(e)?this.dateTimeWrapper.scrollTop=0:this.findScrollTop(e)},n.prototype.setInputValue=function(e){if("date"===e)this.inputElement.value=this.previousElementValue=this.getFormattedValue(this.getFullDateTime()),this.setProperties({value:this.getFullDateTime()},!0);else{var t=this.getFormattedValue(new Date(this.timeCollections[this.activeIndex]));s.Input.setValue(t,this.inputElement,this.floatLabelType,this.showClearButton),this.previousElementValue=this.inputElement.value,this.setProperties({value:new Date(this.timeCollections[this.activeIndex])},!0),this.enableMask&&this.createMask()}this.updateIconState()},n.prototype.getFullDateTime=function(){var e=null;return e=this.isDateObject(this.valueWithMinutes)?this.combineDateTime(this.valueWithMinutes):this.previousDate,this.validateMinMaxRange(e)},n.prototype.createMask=function(){this.notify("createMask",{module:"MaskedDateTime"})},n.prototype.combineDateTime=function(e){if(this.isDateObject(e)){var t=this.previousDate.getDate(),i=this.previousDate.getMonth(),s=this.previousDate.getFullYear(),a=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return new Date(s,i,t,a,n,r)}return this.previousDate},n.prototype.onMouseClick=function(e){var i=e.target,s=this.selectedElement=t.closest(i,".e-list-item");s&&s.classList.contains("e-list-item")&&(this.timeValue=s.getAttribute("data-value"),this.hide(e)),this.setSelection(s,e)},n.prototype.setSelection=function(e,i){if(this.isValidLI(e)&&!e.classList.contains("e-active")){this.selectedElement=e;var s=Array.prototype.slice.call(this.liCollections).indexOf(e);this.activeIndex=s,this.valueWithMinutes=new Date(this.timeCollections[this.activeIndex]),t.addClass([this.selectedElement],"e-active"),this.selectedElement.setAttribute("aria-selected","true"),this.updateValue(i)}},n.prototype.setTimeActiveClass=function(){var e=t.isNullOrUndefined(this.dateTimeWrapper)?this.listWrapper:this.dateTimeWrapper;if(!t.isNullOrUndefined(e)){var i=e.querySelectorAll(".e-list-item");if(i.length)for(var s=0;s<i.length;s++)if(this.timeCollections[s]===+this.valueWithMinutes){i[s].setAttribute("aria-selected","true"),this.selectedElement=i[s],this.activeIndex=s,this.setTimeActiveDescendant();break}}},n.prototype.setTimeActiveDescendant=function(){t.isNullOrUndefined(this.selectedElement)?t.attributes(this.inputElement,{"aria-activedescendant":"null"}):t.attributes(this.inputElement,{"aria-activedescendant":this.selectedElement.getAttribute("id")})},n.prototype.addTimeSelection=function(){this.selectedElement=null,this.removeTimeSelection(),this.setTimeActiveClass(),t.isNullOrUndefined(this.selectedElement)||(t.addClass([this.selectedElement],"e-active"),this.selectedElement.setAttribute("aria-selected","true"))},n.prototype.removeTimeSelection=function(){if(this.removeTimeHover("e-hover"),!t.isNullOrUndefined(this.dateTimeWrapper)){var e=this.dateTimeWrapper.querySelectorAll(".e-active");e.length&&(t.removeClass(e,"e-active"),e[0].removeAttribute("aria-selected"))}},n.prototype.removeTimeHover=function(e){var i=this.getTimeHoverItem(e);i&&i.length&&t.removeClass(i,e)},n.prototype.getTimeHoverItem=function(e){var i,s=t.isNullOrUndefined(this.dateTimeWrapper)?this.listWrapper:this.dateTimeWrapper;return t.isNullOrUndefined(s)||(i=s.querySelectorAll("."+e)),i},n.prototype.isValidLI=function(e){return e&&e.classList.contains("e-list-item")&&!e.classList.contains("e-disabled")},n.prototype.calculateStartEnd=function(e,t,i){var s=e.getDate(),a=e.getMonth(),n=e.getFullYear(),r=e.getHours(),l=e.getMinutes(),o=e.getSeconds(),h=e.getMilliseconds();return t?"starttime"===i?new Date(n,a,s,0,0,0):new Date(n,a,s,23,59,59):new Date(n,a,s,r,l,o,h)},n.prototype.startTime=function(e){var t,i,s=this.min,a=null===e?new Date:e;return+a.getDate()==+s.getDate()&&+a.getMonth()==+s.getMonth()&&+a.getFullYear()==+s.getFullYear()||+new Date(a.getFullYear(),a.getMonth(),a.getDate())<=+new Date(s.getFullYear(),s.getMonth(),s.getDate())?(i=!1,t=this.min):+a<+this.max&&+a>+this.min?(i=!0,t=a):+a>=+this.max&&(i=!0,t=this.max),this.calculateStartEnd(t,i,"starttime")},n.prototype.endTime=function(e){var t,i,s=this.max,a=null===e?new Date:e;return+a.getDate()==+s.getDate()&&+a.getMonth()==+s.getMonth()&&+a.getFullYear()==+s.getFullYear()||+new Date(a.getUTCFullYear(),a.getMonth(),a.getDate())>=+new Date(s.getFullYear(),s.getMonth(),s.getDate())?(i=!1,t=this.max):+a<+this.max&&+a>+this.min?(i=!0,t=a):+a<=+this.min&&(i=!0,t=this.min),this.calculateStartEnd(t,i,"endtime")},n.prototype.hide=function(e){var i=this;if(this.popupObj||this.dateTimeWrapper){this.preventArgs={cancel:!1,popup:t.isBlazor()&&this.isServerRendered?null:this.popupObj||this.popupObject,event:e||null};var s=this.preventArgs;t.isNullOrUndefined(this.popupObj)?this.trigger("close",s,function(t){i.dateTimeCloseEventCallback(e,t)}):this.dateTimeCloseEventCallback(e,s)}else t.Browser.isDevice&&this.allowEdit&&!this.readonly&&this.inputElement.removeAttribute("readonly"),this.setAllowEdit()},n.prototype.dateTimeCloseEventCallback=function(e,i){this.preventArgs=i,this.preventArgs.cancel||(this.isDatePopupOpen()?a.prototype.hide.call(this,e):this.isTimePopupOpen()&&(this.closePopup(e),t.removeClass([document.body],"e-time-overflow"),t.Browser.isDevice&&this.timeModal&&(this.timeModal.style.display="none",this.timeModal.outerHTML="",this.timeModal=null),this.setTimeActiveDescendant())),t.Browser.isDevice&&this.allowEdit&&!this.readonly&&this.inputElement.removeAttribute("readonly"),this.setAllowEdit()},n.prototype.closePopup=function(e){if(this.isTimePopupOpen()&&this.popupObject){var i={name:"FadeOut",duration:100,delay:0};this.popupObject.hide(new t.Animation(i)),this.inputWrapper.container.classList.remove("e-icon-anim"),t.attributes(this.inputElement,{"aria-expanded":"false"}),t.EventHandler.remove(document,"mousedown touchstart",this.documentClickHandler)}},n.prototype.preRender=function(){this.checkFormat(),this.dateTimeFormat=this.cldrDateTimeFormat(),a.prototype.preRender.call(this),t.removeClass([this.inputElementCopy],[he])},n.prototype.getProperty=function(e,t){"min"===t?this.setProperties({min:this.validateValue(e.min)},!0):this.setProperties({max:this.validateValue(e.max)},!0)},n.prototype.checkAttributes=function(e){for(var i,s=0,a=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["style","name","step","disabled","readonly","value","min","max","placeholder","type"];s<a.length;s++){var n=a[s];if(!t.isNullOrUndefined(this.inputElement.getAttribute(n)))switch(n){case"name":this.inputElement.setAttribute("name",this.inputElement.getAttribute(n));break;case"step":this.step=parseInt(this.inputElement.getAttribute(n),10);break;case"readonly":if(t.isNullOrUndefined(this.dateTimeOptions)||void 0===this.dateTimeOptions.readonly||e){var r="disabled"===this.inputElement.getAttribute(n)||""===this.inputElement.getAttribute(n)||"true"===this.inputElement.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.dateTimeOptions)||void 0===this.dateTimeOptions.placeholder||e)&&this.setProperties({placeholder:this.inputElement.getAttribute(n)},!e);break;case"min":(t.isNullOrUndefined(this.dateTimeOptions)||void 0===this.dateTimeOptions.min||e)&&(i=new Date(this.inputElement.getAttribute(n)),this.isNullOrEmpty(i)||isNaN(+i)||this.setProperties({min:i},!e));break;case"disabled":if(t.isNullOrUndefined(this.dateTimeOptions)||void 0===this.dateTimeOptions.enabled||e){var l="disabled"!==this.inputElement.getAttribute(n)&&"true"!==this.inputElement.getAttribute(n)&&""!==this.inputElement.getAttribute(n);this.setProperties({enabled:l},!e)}break;case"value":(t.isNullOrUndefined(this.dateTimeOptions)||void 0===this.dateTimeOptions.value||e)&&(i=new Date(this.inputElement.getAttribute(n)),this.isNullOrEmpty(i)||isNaN(+i)||this.setProperties({value:i},!e));break;case"max":(t.isNullOrUndefined(this.dateTimeOptions)||void 0===this.dateTimeOptions.max||e)&&(i=new Date(this.inputElement.getAttribute(n)),this.isNullOrEmpty(i)||isNaN(+i)||this.setProperties({max:i},!e))}}},n.prototype.requiredModules=function(){var e=[];return this&&e.push({args:[this],member:"islamic"}),this.enableMask&&e.push(this.maskedDateModule()),e},n.prototype.maskedDateModule=function(){return{args:[this],member:"MaskedDateTime"}},n.prototype.getTimeActiveElement=function(){return t.isNullOrUndefined(this.dateTimeWrapper)?null:this.dateTimeWrapper.querySelectorAll(".e-active")},n.prototype.createDateObj=function(e){return e instanceof Date?e:null},n.prototype.getDateObject=function(e){if(!this.isNullOrEmpty(e)){var i=this.createDateObj(e),s=this.valueWithMinutes,a=!t.isNullOrUndefined(s);if(this.checkDateValue(i)){var n=a?s.getDate():ie,r=a?s.getMonth():se,l=a?s.getFullYear():ae,o=a?s.getHours():ne,h=a?s.getMinutes():re,u=a?s.getSeconds():le,d=a?s.getMilliseconds():oe;return this.scrollInvoked?(this.scrollInvoked=!1,new Date(l,r,n,i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds())):new Date(l,r,n,o,h,u,d)}}return null},n.prototype.findNextTimeElement=function(e){var i=this.inputElement.value,s=t.isNullOrUndefined(this.valueWithMinutes)?this.createDateObj(i):this.getDateObject(this.valueWithMinutes),a=null,n=this.liCollections.length;if(!t.isNullOrUndefined(this.activeIndex)||!t.isNullOrUndefined(this.checkDateValue(s))){if("home"===e.action)a=+this.createDateObj(new Date(this.timeCollections[0])),this.activeIndex=0;else if("end"===e.action)a=+this.createDateObj(new Date(this.timeCollections[this.timeCollections.length-1])),this.activeIndex=this.timeCollections.length-1;else if("down"===e.action){for(r=0;r<n;r++)if(+s<this.timeCollections[r]){a=+this.createDateObj(new Date(this.timeCollections[r])),this.activeIndex=r;break}}else for(var r=n-1;r>=0;r--)if(+s>this.timeCollections[r]){a=+this.createDateObj(new Date(this.timeCollections[r])),this.activeIndex=r;break}this.selectedElement=this.liCollections[this.activeIndex],this.timeElementValue(t.isNullOrUndefined(a)?null:new Date(a))}},n.prototype.setTimeValue=function(e,i){var a,n,r=this.validateMinMaxRange(i),l=this.createDateObj(r);return this.getFormattedValue(l)!==(t.isNullOrUndefined(this.value)?null:this.getFormattedValue(this.value))?(this.valueWithMinutes=t.isNullOrUndefined(l)?null:l,n=new Date(+this.valueWithMinutes)):(this.strictMode&&(e=l),this.valueWithMinutes=this.checkDateValue(e),n=new Date(+this.valueWithMinutes)),a="Gregorian"===this.calendarMode?this.globalize.formatDate(n,{format:t.isNullOrUndefined(this.formatString)?this.cldrDateTimeFormat():this.formatString,type:"dateTime",skeleton:t.isBlazor()?"d":"yMd"}):this.globalize.formatDate(n,{format:t.isNullOrUndefined(this.formatString)?this.cldrDateTimeFormat():this.formatString,type:"dateTime",skeleton:"yMd",calendar:"islamic"}),!this.strictMode&&t.isNullOrUndefined(n),s.Input.setValue(a,this.inputElement,this.floatLabelType,this.showClearButton),n},n.prototype.timeElementValue=function(e){if(!t.isNullOrUndefined(this.checkDateValue(e))&&!this.isNullOrEmpty(e)){var i=e instanceof Date?e:this.getDateObject(e);return this.setTimeValue(i,e)}return null},n.prototype.timeKeyHandler=function(e){if(!(t.isNullOrUndefined(this.step)||this.step<=0)){var i=this.timeCollections.length;if(t.isNullOrUndefined(this.getTimeActiveElement())||0===this.getTimeActiveElement().length)this.liCollections.length>0&&(t.isNullOrUndefined(this.value)&&t.isNullOrUndefined(this.activeIndex)?(this.activeIndex=0,this.selectedElement=this.liCollections[0],this.timeElementValue(new Date(this.timeCollections[0]))):this.findNextTimeElement(e));else{var s=void 0;if(e.keyCode>=37&&e.keyCode<=40){var a=40===e.keyCode||39===e.keyCode?++this.activeIndex:--this.activeIndex;this.activeIndex=a=this.activeIndex===i?0:this.activeIndex,this.activeIndex=a=this.activeIndex<0?i-1:this.activeIndex,s=t.isNullOrUndefined(this.timeCollections[a])?this.timeCollections[0]:this.timeCollections[a]}else"home"===e.action?(this.activeIndex=0,s=this.timeCollections[0]):"end"===e.action&&(this.activeIndex=i-1,s=this.timeCollections[i-1]);this.selectedElement=this.liCollections[this.activeIndex],this.timeElementValue(new Date(s))}this.isNavigate=!0,this.setTimeHover(this.selectedElement,"e-navigation"),this.setTimeActiveDescendant(),!this.isTimePopupOpen()||null===this.selectedElement||e&&"click"===e.type||this.setTimeScrollPosition()}},n.prototype.timeKeyActionHandle=function(e){if(this.enabled)switch("right"!==e.action&&"left"!==e.action&&"tab"!==e.action&&e.preventDefault(),e.action){case"up":case"down":case"home":case"end":this.timeKeyHandler(e);break;case"enter":this.isNavigate?(this.selectedElement=this.liCollections[this.activeIndex],this.valueWithMinutes=new Date(this.timeCollections[this.activeIndex]),this.setInputValue("time"),+this.previousDateTime!=+this.value&&(this.changedArgs.value=this.value,this.addTimeSelection(),this.previousDateTime=this.value)):this.updateValue(e),this.hide(e),t.addClass([this.inputWrapper.container],"e-input-focus"),this.isNavigate=!1,e.stopPropagation();break;case"escape":this.hide(e);break;default:this.isNavigate=!1}},n.prototype.inputKeyAction=function(e){switch(e.action){case"altDownArrow":this.strictModeUpdate(),this.updateInput(),this.toggle(e)}},n.prototype.onPropertyChanged=function(e,i){for(var n=0,r=Object.keys(e);n<r.length;n++){var l=r[n];switch(l){case"value":this.isDynamicValueChanged=!0,this.invalidValueString=null,this.checkInvalidValue(e.value),e.value=this.value,e.value=this.validateValue(e.value),s.Input.setValue(this.getFormattedValue(e.value),this.inputElement,this.floatLabelType,this.showClearButton),this.valueWithMinutes=e.value,this.setProperties({value:e.value},!0),this.popupObj&&this.popupUpdate(),this.previousDateTime=new Date(this.inputElement.value),this.updateInput(),this.changeTrigger(null),this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange,this.enableMask&&this.value&&this.notify("createMask",{module:"MaskedDateTime"});break;case"min":case"max":this.getProperty(e,l),this.updateInput();break;case"enableRtl":s.Input.setEnableRtl(this.enableRtl,[this.inputWrapper.container]);break;case"cssClass":t.isNullOrUndefined(i.cssClass)||(i.cssClass=i.cssClass.replace(/\s+/g," ").trim()),t.isNullOrUndefined(e.cssClass)||(e.cssClass=e.cssClass.replace(/\s+/g," ").trim()),s.Input.setCssClass(e.cssClass,[this.inputWrapper.container],i.cssClass),this.dateTimeWrapper&&s.Input.setCssClass(e.cssClass,[this.dateTimeWrapper],i.cssClass);break;case"locale":this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),s.Input.setPlaceholder(this.l10n.getConstant("placeholder"),this.inputElement),this.dateTimeFormat=this.cldrDateTimeFormat(),a.prototype.updateInput.call(this);break;case"htmlAttributes":this.updateHtmlAttributeToElement(),this.updateHtmlAttributeToWrapper(),this.checkAttributes(!0);break;case"format":this.setProperties({format:e.format},!0),this.checkFormat(),this.dateTimeFormat=this.formatString,this.setValue(),this.enableMask&&(this.notify("createMask",{module:"MaskedDateTime"}),this.value||s.Input.setValue(this.maskedDateValue,this.inputElement,this.floatLabelType,this.showClearButton));break;case"placeholder":s.Input.setPlaceholder(e.placeholder,this.inputElement),this.inputElement.setAttribute("aria-placeholder",e.placeholder);break;case"enabled":s.Input.setEnabled(this.enabled,this.inputElement),this.enabled||(this.inputElement.tabIndex=-1);break;case"strictMode":this.invalidValueString=null,this.updateInput();break;case"width":this.setWidth(e.width);break;case"readonly":s.Input.setReadonly(this.readonly,this.inputElement);break;case"floatLabelType":this.floatLabelType=e.floatLabelType,s.Input.removeFloating(this.inputWrapper),s.Input.addFloating(this.inputElement,this.floatLabelType,this.placeholder);break;case"scrollTo":this.checkDateValue(new Date(this.checkValue(e.scrollTo)))?(this.dateTimeWrapper&&this.setScrollTo(),this.setProperties({scrollTo:this.checkDateValue(new Date(this.checkValue(e.scrollTo)))},!0)):this.setProperties({scrollTo:null},!0);break;case"enableMask":this.enableMask?(this.notify("createMask",{module:"MaskedDateTime"}),s.Input.setValue(this.maskedDateValue,this.inputElement,this.floatLabelType,this.showClearButton)):this.inputElement.value===this.maskedDateValue&&(this.maskedDateValue="",s.Input.setValue(this.maskedDateValue,this.inputElement,this.floatLabelType,this.showClearButton));break;default:a.prototype.onPropertyChanged.call(this,e,i)}this.isDynamicValueChanged||this.hide(null),this.isDynamicValueChanged=!1}},n.prototype.getModuleName=function(){return"datetimepicker"},n.prototype.restoreValue=function(){this.previousDateTime=this.previousDate,this.currentDate=this.value?this.value:new Date,this.valueWithMinutes=this.value,this.previousDate=this.value,this.previousElementValue=this.previousElementValue=t.isNullOrUndefined(this.inputValueCopy)?"":this.getFormattedValue(this.inputValueCopy)},te([t.Property(null)],n.prototype,"timeFormat",void 0),te([t.Property(30)],n.prototype,"step",void 0),te([t.Property(null)],n.prototype,"scrollTo",void 0),te([t.Property(1e3)],n.prototype,"zIndex",void 0),te([t.Property(null)],n.prototype,"value",void 0),te([t.Property(null)],n.prototype,"keyConfigs",void 0),te([t.Property({})],n.prototype,"htmlAttributes",void 0),te([t.Property(!1)],n.prototype,"enablePersistence",void 0),te([t.Property(!0)],n.prototype,"allowEdit",void 0),te([t.Property(!1)],n.prototype,"isMultiSelection",void 0),te([t.Property(null)],n.prototype,"values",void 0),te([t.Property(!0)],n.prototype,"showClearButton",void 0),te([t.Property(null)],n.prototype,"placeholder",void 0),te([t.Property(!1)],n.prototype,"strictMode",void 0),te([t.Property(null)],n.prototype,"serverTimezoneOffset",void 0),te([t.Property(new Date(1900,0,1))],n.prototype,"min",void 0),te([t.Property(new Date(2099,11,31))],n.prototype,"max",void 0),te([t.Property(null)],n.prototype,"firstDayOfWeek",void 0),te([t.Property("Gregorian")],n.prototype,"calendarMode",void 0),te([t.Property("Month")],n.prototype,"start",void 0),te([t.Property("Month")],n.prototype,"depth",void 0),te([t.Property(!1)],n.prototype,"weekNumber",void 0),te([t.Property(!0)],n.prototype,"showTodayButton",void 0),te([t.Property("Short")],n.prototype,"dayHeaderFormat",void 0),te([t.Property(!1)],n.prototype,"openOnFocus",void 0),te([t.Property(!1)],n.prototype,"enableMask",void 0),te([t.Property({day:"day",month:"month",year:"year",hour:"hour",minute:"minute",second:"second",dayOfTheWeek:"day of the week"})],n.prototype,"maskPlaceholder",void 0),te([t.Event()],n.prototype,"open",void 0),te([t.Event()],n.prototype,"close",void 0),te([t.Event()],n.prototype,"cleared",void 0),te([t.Event()],n.prototype,"blur",void 0),te([t.Event()],n.prototype,"focus",void 0),te([t.Event()],n.prototype,"created",void 0),te([t.Event()],n.prototype,"destroyed",void 0),n=te([t.NotifyPropertyChanges],n)}(C),de=function(){function e(e){this.mask="",this.defaultConstant={day:"day",month:"month",year:"year",hour:"hour",minute:"minute",second:"second",dayOfTheWeek:"day of the week"},this.hiddenMask="",this.validCharacters="dMyhmHfasz",this.isDayPart=!1,this.isMonthPart=!1,this.isYearPart=!1,this.isHourPart=!1,this.isMinutePart=!1,this.isSecondsPart=!1,this.isMilliSecondsPart=!1,this.monthCharacter="",this.periodCharacter="",this.isHiddenMask=!1,this.isComplete=!1,this.isNavigate=!1,this.formatRegex=/EEEEE|EEEE|EEE|EE|E|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g,this.isDeletion=!1,this.isShortYear=!1,this.isDeleteKey=!1,this.parent=e,this.dateformat=this.getCulturedFormat(),this.value=null!=this.parent.value?this.parent.value:new Date,this.value.setMonth(0),this.value.setHours(0),this.value.setMinutes(0),this.value.setSeconds(0),this.previousDate=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),this.value.getSeconds()),this.removeEventListener(),this.addEventListener()}return e.prototype.getModuleName=function(){return"MaskedDateTime"},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("createMask",this.createMask,this),this.parent.on("setMaskSelection",this.validCharacterCheck,this),this.parent.on("inputHandler",this.maskInputHandler,this),this.parent.on("keyDownHandler",this.maskKeydownHandler,this),this.parent.on("clearHandler",this.clearHandler,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("createMask",this.createMask),this.parent.off("setMaskSelection",this.validCharacterCheck),this.parent.off("inputHandler",this.maskInputHandler),this.parent.off("keyDownHandler",this.maskKeydownHandler),this.parent.off("clearHandler",this.clearHandler))},e.prototype.createMask=function(e){this.isDayPart=this.isMonthPart=this.isYearPart=this.isHourPart=this.isMinutePart=this.isSecondsPart=!1,this.dateformat=this.getCulturedFormat(),this.parent.maskPlaceholder.day&&(this.defaultConstant.day=this.parent.maskPlaceholder.day),this.parent.maskPlaceholder.month&&(this.defaultConstant.month=this.parent.maskPlaceholder.month),this.parent.maskPlaceholder.year&&(this.defaultConstant.year=this.parent.maskPlaceholder.year),this.parent.maskPlaceholder.hour&&(this.defaultConstant.hour=this.parent.maskPlaceholder.hour),this.parent.maskPlaceholder.minute&&(this.defaultConstant.minute=this.parent.maskPlaceholder.minute),this.parent.maskPlaceholder.second&&(this.defaultConstant.second=this.parent.maskPlaceholder.second),this.parent.maskPlaceholder.dayOfTheWeek&&(this.defaultConstant.dayOfTheWeek=this.parent.maskPlaceholder.dayOfTheWeek.toString()),this.getCUltureMaskFormat();var t=this.dateformat.replace(this.formatRegex,this.formatCheck());this.isHiddenMask=!0,this.hiddenMask=this.dateformat.replace(this.formatRegex,this.formatCheck()),this.isHiddenMask=!1,this.previousHiddenMask=this.hiddenMask,this.mask=this.previousValue=t,this.parent.maskedDateValue=this.mask,this.parent.value&&this.setDynamicValue()},e.prototype.getCUltureMaskFormat=function(){this.l10n=new t.L10n(this.parent.moduleName,this.defaultConstant,this.parent.locale),this.objectString=Object.keys(this.defaultConstant);for(var e=0;e<this.objectString.length;e++)this.defaultConstant[this.objectString[e].toString()]=this.l10n.getConstant(this.objectString[e].toString())},e.prototype.validCharacterCheck=function(){for(var e=this.parent.inputElement.selectionStart,t=e,i=e-1;t<this.hiddenMask.length||i>=0;t++,i--){if(t<this.hiddenMask.length&&-1!==this.validCharacters.indexOf(this.hiddenMask[t]))return void this.setSelection(this.hiddenMask[t]);if(i>=0&&-1!==this.validCharacters.indexOf(this.hiddenMask[i]))return void this.setSelection(this.hiddenMask[i])}},e.prototype.setDynamicValue=function(){this.value=this.parent.value,this.isDayPart=this.isMonthPart=this.isYearPart=this.isHourPart=this.isMinutePart=this.isSecondsPart=!0,this.updateValue()},e.prototype.setSelection=function(e){for(var t=-1,i=0,s=0;s<this.hiddenMask.length;s++)this.hiddenMask[s]===e&&(i=s+1,-1===t&&(t=s));t<0&&(t=0),this.parent.inputElement.setSelectionRange(t,i)},e.prototype.maskKeydownHandler=function(e){if("Delete"===e.e.key)return void(this.isDeleteKey=!0);if(!(e.e.altKey||e.e.ctrlKey||"ArrowLeft"!==e.e.key&&"ArrowRight"!==e.e.key&&"shiftTab"!==e.e.key&&"Tab"!==e.e.key&&"shiftTab"!==e.e.action&&"End"!==e.e.key&&"Home"!==e.e.key)){var t=this.parent.inputElement.selectionStart,i=this.parent.inputElement.selectionEnd,s=this.parent.inputElement.value.length;if(0==t&&i==s&&("Tab"===e.e.key||"shiftTab"===e.e.action)){var a="shiftTab"===e.e.action?i:0;this.parent.inputElement.selectionStart=this.parent.inputElement.selectionEnd=a}if("End"===e.e.key||"Home"===e.e.key){var n="End"===e.e.key?s:0;this.parent.inputElement.selectionStart=this.parent.inputElement.selectionEnd=n}this.navigateSelection("ArrowLeft"===e.e.key||"shiftTab"===e.e.action||"End"===e.e.key)}if(!(e.e.altKey||e.e.ctrlKey||"ArrowUp"!==e.e.key&&"ArrowDown"!==e.e.key)){t=this.parent.inputElement.selectionStart;this.dateAlteration("ArrowDown"===e.e.key);var r=this.dateformat.replace(this.formatRegex,this.formatCheck());this.isHiddenMask=!0,this.hiddenMask=this.dateformat.replace(this.formatRegex,this.formatCheck()),this.isHiddenMask=!1,this.previousHiddenMask=this.hiddenMask,this.previousValue=r,this.parent.inputElement.value=r,this.parent.inputElement.selectionStart=t,this.validCharacterCheck()}},e.prototype.differenceCheck=function(){var e=this.parent.inputElement.selectionStart,t=this.parent.inputElement.value,i=this.previousValue.substring(0,e+this.previousValue.length-t.length),s=t.substring(0,e),a=this.value,n=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();if(0===i.indexOf(s)&&(0===s.length||this.previousHiddenMask[s.length-1]!==this.previousHiddenMask[s.length])){for(u=s.length;u<i.length;u++)""!==this.previousHiddenMask[u]&&this.validCharacters.indexOf(this.previousHiddenMask[u])>=0&&(this.isDeletion=this.handleDeletion(this.previousHiddenMask[u],!1));if(this.isDeletion)return}switch(this.previousHiddenMask[e-1]){case"d":var r=(this.isDayPart&&a.getDate().toString().length<2?10*a.getDate():0)+parseInt(s[e-1],10);if(isNaN(r))return;for(u=0;r>n;u++)r=parseInt(r.toString().slice(1),10);if(r>=1){if(a.setDate(r),this.isNavigate=2===r.toString().length,this.previousDate=new Date(a.getFullYear(),a.getMonth(),a.getDate()),a.getMonth()!==this.value.getMonth())return;this.isDayPart=!0}else this.isDayPart=!1;break;case"M":var l=void 0;if(l=a.getMonth().toString().length<2?(this.isMonthPart?10*(a.getMonth()+1):0)+parseInt(s[e-1],10):parseInt(s[e-1],10),isNaN(l)){var o=this.getCulturedValue("months[stand-alone].wide"),h=Object.keys(o);for(this.monthCharacter+=s[e-1].toLowerCase();this.monthCharacter.length>0;){for(var u=1,d=0,p=h;d<p.length;d++){p[d];if(0===o[u].toLowerCase().indexOf(this.monthCharacter))return a.setMonth(u-1),this.isMonthPart=!0,void(this.value=a);u++}this.monthCharacter=this.monthCharacter.substring(1,this.monthCharacter.length)}}else{for(;l>12;)l=parseInt(l.toString().slice(1),10);if(l>=1){if(a.setMonth(l-1),this.isNavigate=2===l.toString().length,a.getMonth()!==l-1&&(a.setDate(1),a.setMonth(l-1)),this.isDayPart){var c=new Date(this.previousDate.getFullYear(),this.previousDate.getMonth()+1,0).getDate(),m=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();this.previousDate.getDate()==c&&m<=c&&a.setDate(m)}this.previousDate=new Date(a.getFullYear(),a.getMonth(),a.getDate()),this.isMonthPart=!0}else a.setMonth(0),this.isMonthPart=!1}break;case"y":var v=(this.isYearPart&&a.getFullYear().toString().length<4&&!this.isShortYear?10*a.getFullYear():0)+parseInt(s[e-1],10);if(this.isShortYear=!1,isNaN(v))return;for(;v>9999;)v=parseInt(v.toString().slice(1),10);v<1?this.isYearPart=!1:(a.setFullYear(v),4===v.toString().length&&(this.isNavigate=!0),this.previousDate=new Date(a.getFullYear(),a.getMonth(),a.getDate()),this.isYearPart=!0);break;case"h":if(this.hour=(this.isHourPart&&(a.getHours()%12||12).toString().length<2?10*(a.getHours()%12||12):0)+parseInt(s[e-1],10),isNaN(this.hour))return;for(;this.hour>12;)this.hour=parseInt(this.hour.toString().slice(1),10);a.setHours(12*Math.floor(a.getHours()/12)+this.hour%12),this.isNavigate=2===this.hour.toString().length,this.isHourPart=!0;break;case"H":if(this.hour=(this.isHourPart&&a.getHours().toString().length<2?10*a.getHours():0)+parseInt(s[e-1],10),isNaN(this.hour))return;for(u=0;this.hour>23;u++)this.hour=parseInt(this.hour.toString().slice(1),10);a.setHours(this.hour),this.isNavigate=2===this.hour.toString().length,this.isHourPart=!0;break;case"m":var f=(this.isMinutePart&&a.getMinutes().toString().length<2?10*a.getMinutes():0)+parseInt(s[e-1],10);if(isNaN(f))return;for(u=0;f>59;u++)f=parseInt(f.toString().slice(1),10);a.setMinutes(f),this.isNavigate=2===f.toString().length,this.isMinutePart=!0;break;case"s":var y=(this.isSecondsPart&&a.getSeconds().toString().length<2?10*a.getSeconds():0)+parseInt(s[e-1],10);if(isNaN(y))return;for(u=0;y>59;u++)y=parseInt(y.toString().slice(1),10);a.setSeconds(y),this.isNavigate=2===y.toString().length,this.isSecondsPart=!0;break;case"a":this.periodCharacter+=s[e-1].toLowerCase();for(var g=this.getCulturedValue("dayPeriods.format.wide"),b=Object.keys(g),u=0;this.periodCharacter.length>0;u++)(0===g[b[0]].toLowerCase().indexOf(this.periodCharacter)&&a.getHours()>=12||0===g[b[1]].toLowerCase().indexOf(this.periodCharacter)&&a.getHours()<12)&&(a.setHours((a.getHours()+12)%24),this.value=a),this.periodCharacter=this.periodCharacter.substring(1,this.periodCharacter.length)}this.value=a},e.prototype.formatCheck=function(){function e(e){var i,s,a,n=t.getCulturedValue("days[stand-alone].abbreviated"),r=Object.keys(n),l=t.getCulturedValue("days[stand-alone].wide"),o=Object.keys(l),h=t.getCulturedValue("days[stand-alone].narrow"),u=Object.keys(h),d=t.getCulturedValue("months[stand-alone].abbreviated"),p=t.getCulturedValue("months[stand-alone].wide"),c=t.getCulturedValue("dayPeriods.format.wide"),m=Object.keys(c);switch(e){case"ddd":case"dddd":case"d":i=t.isDayPart?t.value.getDate().toString():t.defaultConstant.day.toString();break;case"dd":i=t.isDayPart?t.roundOff(t.value.getDate(),2):t.defaultConstant.day.toString();break;case"E":case"EE":case"EEE":i=t.isDayPart&&t.isMonthPart&&t.isYearPart?n[r[t.value.getDay()]].toString():t.defaultConstant.dayOfTheWeek.toString();break;case"EEEE":i=t.isDayPart&&t.isMonthPart&&t.isYearPart?l[o[t.value.getDay()]].toString():t.defaultConstant.dayOfTheWeek.toString();break;case"EEEEE":i=t.isDayPart&&t.isMonthPart&&t.isYearPart?h[u[t.value.getDay()]].toString():t.defaultConstant.dayOfTheWeek.toString();break;case"M":i=t.isMonthPart?(t.value.getMonth()+1).toString():t.defaultConstant.month.toString();break;case"MM":i=t.isMonthPart?t.roundOff(t.value.getMonth()+1,2):t.defaultConstant.month.toString();break;case"MMM":i=t.isMonthPart?d[t.value.getMonth()+1]:t.defaultConstant.month.toString();break;case"MMMM":i=t.isMonthPart?p[t.value.getMonth()+1]:t.defaultConstant.month.toString();break;case"yy":i=t.isYearPart?t.roundOff(t.value.getFullYear()%100,2):t.defaultConstant.year.toString(),t.isYearPart&&(t.isNavigate=t.isShortYear=2===(t.value.getFullYear()%100).toString().length);break;case"y":case"yyyy":i=t.isYearPart?t.roundOff(t.value.getFullYear(),4):t.defaultConstant.year.toString();break;case"h":i=t.isHourPart?(t.value.getHours()%12||12).toString():t.defaultConstant.hour.toString();break;case"hh":i=t.isHourPart?t.roundOff(t.value.getHours()%12||12,2):t.defaultConstant.hour.toString();break;case"H":i=t.isHourPart?t.value.getHours().toString():t.defaultConstant.hour.toString();break;case"HH":i=t.isHourPart?t.roundOff(t.value.getHours(),2):t.defaultConstant.hour.toString();break;case"m":i=t.isMinutePart?t.value.getMinutes().toString():t.defaultConstant.minute.toString();break;case"mm":i=t.isMinutePart?t.roundOff(t.value.getMinutes(),2):t.defaultConstant.minute.toString();break;case"s":i=t.isSecondsPart?t.value.getSeconds().toString():t.defaultConstant.second.toString();break;case"ss":i=t.isSecondsPart?t.roundOff(t.value.getSeconds(),2):t.defaultConstant.second.toString();break;case"f":i=Math.floor(t.value.getMilliseconds()/100).toString();break;case"ff":s=t.value.getMilliseconds(),t.value.getMilliseconds()>99&&(s=Math.floor(t.value.getMilliseconds()/10)),i=t.roundOff(s,2);break;case"fff":i=t.roundOff(t.value.getMilliseconds(),3);break;case"a":case"aa":i=t.value.getHours()<12?c[m[0]]:c[m[1]];break;case"z":case"zz":case"zzz":case"zzzz":a={format:e,type:"dateTime",skeleton:"yMd",calendar:t.parent.calendarMode},i=t.parent.globalize.formatDate(t.value,a)}if(i=void 0!==i?i:e.slice(1,e.length-1),t.isHiddenMask){for(var v="",f=0;f<i.length;f++)v+=e[0];return v}return i}var t=this;return e},e.prototype.maskInputHandler=function(){var e,t=this.parent.inputElement.selectionStart;this.previousHiddenMask[t-1];if(this.differenceCheck(),e=this.dateformat.replace(this.formatRegex,this.formatCheck()),this.isHiddenMask=!0,this.hiddenMask=this.dateformat.replace(this.formatRegex,this.formatCheck()),this.isHiddenMask=!1,this.previousHiddenMask=this.hiddenMask,this.previousValue=e,this.parent.inputElement.value=e,this.parent.inputElement.selectionStart=t,this.validCharacterCheck(),(this.isNavigate||this.isDeletion)&&!this.isDeleteKey){var i=!this.isNavigate;this.isNavigate=this.isDeletion=!1,this.navigateSelection(i)}this.isDeleteKey=!1},e.prototype.navigateSelection=function(e){for(var t=this.parent.inputElement.selectionStart,i=this.parent.inputElement.selectionEnd,s=e?t-1:i+1;s<this.hiddenMask.length&&s>=0;){if(this.validCharacters.indexOf(this.hiddenMask[s])>=0){this.setSelection(this.hiddenMask[s]);break}s+=e?-1:1}},e.prototype.roundOff=function(e,t){for(var i=e.toString(),s=t-i.length,a="",n=0;n<s;n++)a+="0";return a+i},e.prototype.handleDeletion=function(e,t){switch(e){case"d":this.isDayPart=t;break;case"M":this.isMonthPart=t,t||(this.value.setMonth(0),this.monthCharacter="");break;case"y":this.isYearPart=t;break;case"H":case"h":this.isHourPart=t,t||(this.periodCharacter="");break;case"m":this.isMinutePart=t;break;case"s":this.isSecondsPart=t;break;default:return!1}return!0},e.prototype.dateAlteration=function(e){var t=this.parent.inputElement.selectionStart,i="";if(-1!==this.validCharacters.indexOf(this.hiddenMask[t])){i=this.hiddenMask[t];var s=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),this.value.getSeconds());this.previousDate=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),this.value.getSeconds());var a=e?-1:1;switch(i){case"d":s.setDate(s.getDate()+a);break;case"M":var n=s.getMonth()+a;if(s.setDate(1),s.setMonth(n),this.isDayPart){var r=new Date(this.previousDate.getFullYear(),this.previousDate.getMonth()+1,0).getDate(),l=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();this.previousDate.getDate()==r&&l<=r?s.setDate(l):s.setDate(this.previousDate.getDate())}else s.setDate(this.previousDate.getDate());this.previousDate=new Date(s.getFullYear(),s.getMonth(),s.getDate());break;case"y":s.setFullYear(s.getFullYear()+a);break;case"H":case"h":s.setHours(s.getHours()+a);break;case"m":s.setMinutes(s.getMinutes()+a);break;case"s":s.setSeconds(s.getSeconds()+a);break;case"a":s.setHours((s.getHours()+12)%24)}this.value=s.getFullYear()>0?s:this.value,-1!==this.validCharacters.indexOf(this.hiddenMask[t])&&this.handleDeletion(this.hiddenMask[t],!0)}},e.prototype.getCulturedValue=function(e){var i=this.parent.locale;return"en"===i||"en-US"===i?t.getValue(e,t.getDefaultDateObject()):t.getValue("main."+i+".dates.calendars.gregorian."+e,t.cldrData)},e.prototype.getCulturedFormat=function(){var e=this.getCulturedValue("dateTimeFormats[availableFormats].yMd").toString();return"datepicker"==this.parent.moduleName&&(e=this.getCulturedValue("dateTimeFormats[availableFormats].yMd").toString(),this.parent.format&&this.parent.formatString&&(e=this.parent.formatString)),"datetimepicker"==this.parent.moduleName&&(e=this.getCulturedValue("dateTimeFormats[availableFormats].yMd").toString(),this.parent.dateTimeFormat&&(e=this.parent.dateTimeFormat)),"timepicker"==this.parent.moduleName&&(e=this.parent.cldrTimeFormat()),e},e.prototype.clearHandler=function(){this.isDayPart=this.isMonthPart=this.isYearPart=this.isHourPart=this.isMinutePart=this.isSecondsPart=!1,this.updateValue()},e.prototype.updateValue=function(){this.monthCharacter=this.periodCharacter="";var e=this.dateformat.replace(this.formatRegex,this.formatCheck());this.isHiddenMask=!0,this.hiddenMask=this.dateformat.replace(this.formatRegex,this.formatCheck()),this.isHiddenMask=!1,this.previousHiddenMask=this.hiddenMask,this.previousValue=e,this.parent.updateInputValue(e)},e.prototype.destroy=function(){this.removeEventListener()},e}();return f.Inject(y),C.Inject(y,de),Q.Inject(de),ue.Inject(y,de),e.MaskPlaceholder=m,e.CalendarBase=v,e.Calendar=f,e.Islamic=y,e.DatePicker=C,e.Presets=j,e.DateRangePicker=R,e.TimeMaskPlaceholder=$,e.TimePicker=Q,e.DateTimePicker=ue,e.MaskedDateTime=de,e}({},ej.base,ej.popups,ej.inputs,ej.buttons,ej.lists),this.ejs=ej;
- /*!
- * filename: ej2-compression.min.js
- * version : 19.2.44
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.compression=function(t,e){"use strict";var i=new Int16Array(286),r=new Uint8Array(286),n=new Int16Array(30),s=new Uint8Array(30),h=function(){function t(e){this.pendingBuffer=new Uint8Array(65536),this.pendingBufLength=0,this.pendingBufCache=0,this.pendingBufBitsInCache=0,this.bufferPosition=0,this.extraBits=0,this.currentHash=0,this.matchStart=0,this.matchLength=0,this.matchPrevAvail=!1,this.blockStart=0,this.stringStart=0,this.lookAhead=0,this.totalBytesIn=0,this.inputOffset=0,this.inputEnd=0,this.windowSize=32768,this.windowMask=this.windowSize-1,this.hashSize=32768,this.hashMask=this.hashSize-1,this.hashShift=Math.floor(17/3),this.maxDist=this.windowSize-262,this.checkSum=1,this.noWrap=!1,t.isHuffmanTreeInitiated||(t.initHuffmanTree(),t.isHuffmanTreeInitiated=!0),this.treeLiteral=new o(this,286,257,15),this.treeDistances=new o(this,30,1,15),this.treeCodeLengths=new o(this,19,4,7),this.arrDistances=new Uint16Array(16384),this.arrLiterals=new Uint8Array(16384),this.stream=[],this.dataWindow=new Uint8Array(2*this.windowSize),this.hashHead=new Int16Array(this.hashSize),this.hashPrevious=new Int16Array(this.windowSize),this.blockStart=this.stringStart=1,this.noWrap=e,e||this.writeZLibHeader()}return Object.defineProperty(t.prototype,"compressedData",{get:function(){return this.stream},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getCompressedString",{get:function(){var t="";if(void 0!==this.stream)for(var e=0;e<this.stream.length;e++)t+=String.fromCharCode.apply(null,this.stream[e]);return t},enumerable:!0,configurable:!0}),t.prototype.write=function(t,i,r){if(void 0===t||null===t)throw new Error("ArgumentException: data cannot null or undefined");var n=i+r;if(0>i||i>n||n>t.length)throw new Error("ArgumentOutOfRangeException: Offset or length is incorrect");if("string"==typeof t){var s=new e.Encoding(!1);s.type="Utf8",n=i+(t=new Uint8Array(s.getBytes(t,0,t.length))).length}for(this.inputBuffer=t,this.inputOffset=i,this.inputEnd=n,this.noWrap||(this.checkSum=a.checksumUpdate(this.checkSum,this.inputBuffer,this.inputOffset,n));this.inputEnd!==this.inputOffset||0!==this.pendingBufLength;)this.pendingBufferFlush(),this.compressData(!1)},t.prototype.writeZLibHeader=function(){var t=30720;t|=64,t+=31-t%31,this.pendingBufferWriteShortBytes(t)},t.prototype.pendingBufferWriteShortBytes=function(t){this.pendingBuffer[this.pendingBufLength++]=t>>8,this.pendingBuffer[this.pendingBufLength++]=t},t.prototype.compressData=function(t){var e;do{this.fillWindow();var i=t&&this.inputEnd===this.inputOffset;e=this.compressSlow(i,t)}while(0===this.pendingBufLength&&e);return e},t.prototype.compressSlow=function(t,e){if(this.lookAhead<262&&!t)return!1;for(;this.lookAhead>=262||t;){if(0===this.lookAhead)return this.lookAheadCompleted(e);this.stringStart>=2*this.windowSize-262&&this.slideWindow();var i=this.matchStart,r=this.matchLength;if(this.lookAhead>=3&&this.discardMatch(),r>=3&&this.matchLength<=r?r=this.matchPreviousBest(i,r):this.matchPreviousAvailable(),this.bufferPosition>=16384)return this.huffmanIsFull(e)}return!0},t.prototype.discardMatch=function(){var t=this.insertString();0!==t&&this.stringStart-t<=this.maxDist&&this.findLongestMatch(t)&&this.matchLength<=5&&3===this.matchLength&&this.stringStart-this.matchStart>4096&&(this.matchLength=2)},t.prototype.matchPreviousAvailable=function(){this.matchPrevAvail&&this.huffmanTallyLit(255&this.dataWindow[this.stringStart-1]),this.matchPrevAvail=!0,this.stringStart++,this.lookAhead--},t.prototype.matchPreviousBest=function(t,e){this.huffmanTallyDist(this.stringStart-1-t,e),e-=2;do{this.stringStart++,--this.lookAhead>=3&&this.insertString()}while(--e>0);return this.stringStart++,this.lookAhead--,this.matchPrevAvail=!1,this.matchLength=2,e},t.prototype.lookAheadCompleted=function(t){return this.matchPrevAvail&&this.huffmanTallyLit(255&this.dataWindow[this.stringStart-1]),this.matchPrevAvail=!1,this.huffmanFlushBlock(this.dataWindow,this.blockStart,this.stringStart-this.blockStart,t),this.blockStart=this.stringStart,!1},t.prototype.huffmanIsFull=function(t){var e=this.stringStart-this.blockStart;this.matchPrevAvail&&e--;var i=t&&0===this.lookAhead&&!this.matchPrevAvail;return this.huffmanFlushBlock(this.dataWindow,this.blockStart,e,i),this.blockStart+=e,!i},t.prototype.fillWindow=function(){for(this.stringStart>=this.windowSize+this.maxDist&&this.slideWindow();this.lookAhead<262&&this.inputOffset<this.inputEnd;){var t=2*this.windowSize-this.lookAhead-this.stringStart;t>this.inputEnd-this.inputOffset&&(t=this.inputEnd-this.inputOffset),this.dataWindow.set(this.inputBuffer.subarray(this.inputOffset,this.inputOffset+t),this.stringStart+this.lookAhead),this.inputOffset+=t,this.totalBytesIn+=t,this.lookAhead+=t}this.lookAhead>=3&&this.updateHash()},t.prototype.slideWindow=function(){this.dataWindow.set(this.dataWindow.subarray(this.windowSize,this.windowSize+this.windowSize),0),this.matchStart-=this.windowSize,this.stringStart-=this.windowSize,this.blockStart-=this.windowSize;for(t=0;t<this.hashSize;++t){e=65535&this.hashHead[t];this.hashHead[t]=e>=this.windowSize?e-this.windowSize:0}for(var t=0;t<this.windowSize;t++){var e=65535&this.hashPrevious[t];this.hashPrevious[t]=e>=this.windowSize?e-this.windowSize:0}},t.prototype.insertString=function(){var t,e=(this.currentHash<<this.hashShift^this.dataWindow[this.stringStart+2])&this.hashMask;return this.hashPrevious[this.stringStart&this.windowMask]=t=this.hashHead[e],this.hashHead[e]=this.stringStart,this.currentHash=e,65535&t},t.prototype.findLongestMatch=function(t){var e,i=4096,r=258,n=this.stringStart,s=this.stringStart+this.matchLength,h=Math.max(this.matchLength,2),o=Math.max(this.stringStart-this.maxDist,0),a=this.stringStart+258-1,f=this.dataWindow[s-1],u=this.dataWindow[s],d=this.dataWindow;h>=32&&(i>>=2),r>this.lookAhead&&(r=this.lookAhead);do{if(d[t+h]===u&&d[t+h-1]===f&&d[t]===d[n]&&d[t+1]===d[n+1]){for(e=t+2,n+=2;d[++n]===d[++e]&&d[++n]===d[++e]&&d[++n]===d[++e]&&d[++n]===d[++e]&&d[++n]===d[++e]&&d[++n]===d[++e]&&d[++n]===d[++e]&&d[++n]===d[++e]&&n<a;);if(n>s){if(this.matchStart=t,s=n,(h=n-this.stringStart)>=r)break;f=d[s-1],u=d[s]}n=this.stringStart}}while((t=65535&this.hashPrevious[t&this.windowMask])>o&&0!=--i);return this.matchLength=Math.min(h,this.lookAhead),this.matchLength>=3},t.prototype.updateHash=function(){this.currentHash=this.dataWindow[this.stringStart]<<this.hashShift^this.dataWindow[this.stringStart+1]},t.prototype.huffmanTallyLit=function(t){return this.arrDistances[this.bufferPosition]=0,this.arrLiterals[this.bufferPosition++]=t,this.treeLiteral.codeFrequencies[t]++,this.bufferPosition>=16384},t.prototype.huffmanTallyDist=function(t,e){this.arrDistances[this.bufferPosition]=t,this.arrLiterals[this.bufferPosition++]=e-3;var i=this.huffmanLengthCode(e-3);this.treeLiteral.codeFrequencies[i]++,i>=265&&i<285&&(this.extraBits+=Math.floor((i-261)/4));var r=this.huffmanDistanceCode(t-1);return this.treeDistances.codeFrequencies[r]++,r>=4&&(this.extraBits+=Math.floor(r/2-1)),this.bufferPosition>=16384},t.prototype.huffmanFlushBlock=function(t,e,h,a){this.treeLiteral.codeFrequencies[256]++,this.treeLiteral.buildTree(),this.treeDistances.buildTree(),this.treeLiteral.calculateBLFreq(this.treeCodeLengths),this.treeDistances.calculateBLFreq(this.treeCodeLengths),this.treeCodeLengths.buildTree();for(var f=4,u=18;u>f;u--)this.treeCodeLengths.codeLengths[o.huffCodeLengthOrders[u]]>0&&(f=u+1);for(var d=14+3*f+this.treeCodeLengths.getEncodedLength()+this.treeLiteral.getEncodedLength()+this.treeDistances.getEncodedLength()+this.extraBits,c=this.extraBits,u=0;u<286;u++)c+=this.treeLiteral.codeFrequencies[u]*r[u];for(u=0;u<30;u++)c+=this.treeDistances.codeFrequencies[u]*s[u];d>=c&&(d=c),e>=0&&h+4<d>>3?this.huffmanFlushStoredBlock(t,e,h,a):d==c?(this.pendingBufferWriteBits(2+(a?1:0),3),this.treeLiteral.setStaticCodes(i,r),this.treeDistances.setStaticCodes(n,s),this.huffmanCompressBlock(),this.huffmanReset()):(this.pendingBufferWriteBits(4+(a?1:0),3),this.huffmanSendAllTrees(f),this.huffmanCompressBlock(),this.huffmanReset())},t.prototype.huffmanFlushStoredBlock=function(t,e,i,r){this.pendingBufferWriteBits(0+(r?1:0),3),this.pendingBufferAlignToByte(),this.pendingBufferWriteShort(i),this.pendingBufferWriteShort(~i),this.pendingBufferWriteByteBlock(t,e,i),this.huffmanReset()},t.prototype.huffmanLengthCode=function(t){if(255===t)return 285;for(var e=257;t>=8;)e+=4,t>>=1;return e+t},t.prototype.huffmanDistanceCode=function(t){for(var e=0;t>=4;)e+=2,t>>=1;return e+t},t.prototype.huffmanSendAllTrees=function(t){this.treeCodeLengths.buildCodes(),this.treeLiteral.buildCodes(),this.treeDistances.buildCodes(),this.pendingBufferWriteBits(this.treeLiteral.treeLength-257,5),this.pendingBufferWriteBits(this.treeDistances.treeLength-1,5),this.pendingBufferWriteBits(t-4,4);for(var e=0;e<t;e++)this.pendingBufferWriteBits(this.treeCodeLengths.codeLengths[o.huffCodeLengthOrders[e]],3);this.treeLiteral.writeTree(this.treeCodeLengths),this.treeDistances.writeTree(this.treeCodeLengths)},t.prototype.huffmanReset=function(){this.bufferPosition=0,this.extraBits=0,this.treeLiteral.reset(),this.treeDistances.reset(),this.treeCodeLengths.reset()},t.prototype.huffmanCompressBlock=function(){for(var t=0;t<this.bufferPosition;t++){var e=255&this.arrLiterals[t],i=this.arrDistances[t];if(0!=i--){var r=this.huffmanLengthCode(e);this.treeLiteral.writeCodeToStream(r);var n=Math.floor((r-261)/4);n>0&&n<=5&&this.pendingBufferWriteBits(e&(1<<n)-1,n);var s=this.huffmanDistanceCode(i);this.treeDistances.writeCodeToStream(s),(n=Math.floor(s/2-1))>0&&this.pendingBufferWriteBits(i&(1<<n)-1,n)}else this.treeLiteral.writeCodeToStream(e)}this.treeLiteral.writeCodeToStream(256)},t.prototype.pendingBufferWriteBits=function(t,e){var i=new Uint32Array(1);i[0]=this.pendingBufCache|t<<this.pendingBufBitsInCache,this.pendingBufCache=i[0],this.pendingBufBitsInCache+=e,this.pendingBufferFlushBits()},t.prototype.pendingBufferFlush=function(t){if(this.pendingBufferFlushBits(),this.pendingBufLength>0){var e=new Uint8Array(this.pendingBufLength);e.set(this.pendingBuffer.subarray(0,this.pendingBufLength),0),this.stream.push(e)}this.pendingBufLength=0},t.prototype.pendingBufferFlushBits=function(){for(var t=0;this.pendingBufBitsInCache>=8&&this.pendingBufLength<65536;)this.pendingBuffer[this.pendingBufLength++]=this.pendingBufCache,this.pendingBufCache>>=8,this.pendingBufBitsInCache-=8,t++;return t},t.prototype.pendingBufferWriteByteBlock=function(t,e,i){var r=t.subarray(e,e+i);this.pendingBuffer.set(r,this.pendingBufLength),this.pendingBufLength+=i},t.prototype.pendingBufferWriteShort=function(t){this.pendingBuffer[this.pendingBufLength++]=t,this.pendingBuffer[this.pendingBufLength++]=t>>8},t.prototype.pendingBufferAlignToByte=function(){this.pendingBufBitsInCache>0&&(this.pendingBuffer[this.pendingBufLength++]=this.pendingBufCache),this.pendingBufCache=0,this.pendingBufBitsInCache=0},t.initHuffmanTree=function(){for(var t=0;t<144;)i[t]=o.bitReverse(48+t<<8),r[t++]=8;for(;t<256;)i[t]=o.bitReverse(256+t<<7),r[t++]=9;for(;t<280;)i[t]=o.bitReverse(-256+t<<9),r[t++]=7;for(;t<286;)i[t]=o.bitReverse(-88+t<<8),r[t++]=8;for(t=0;t<30;t++)n[t]=o.bitReverse(t<<11),s[t]=5},t.prototype.close=function(){do{this.pendingBufferFlush(!0),this.compressData(!0)||(this.pendingBufferFlush(!0),this.pendingBufferAlignToByte(),this.noWrap||(this.pendingBufferWriteShortBytes(this.checkSum>>16),this.pendingBufferWriteShortBytes(65535&this.checkSum)),this.pendingBufferFlush(!0))}while(this.inputEnd!==this.inputOffset||0!==this.pendingBufLength)},t.prototype.destroy=function(){this.stream=[],this.stream=void 0,this.pendingBuffer=void 0,this.treeLiteral=void 0,this.treeDistances=void 0,this.treeCodeLengths=void 0,this.arrLiterals=void 0,this.arrDistances=void 0,this.hashHead=void 0,this.hashPrevious=void 0,this.dataWindow=void 0,this.inputBuffer=void 0,this.pendingBufLength=void 0,this.pendingBufCache=void 0,this.pendingBufBitsInCache=void 0,this.bufferPosition=void 0,this.extraBits=void 0,this.currentHash=void 0,this.matchStart=void 0,this.matchLength=void 0,this.matchPrevAvail=void 0,this.blockStart=void 0,this.stringStart=void 0,this.lookAhead=void 0,this.totalBytesIn=void 0,this.inputOffset=void 0,this.inputEnd=void 0,this.windowSize=void 0,this.windowMask=void 0,this.hashSize=void 0,this.hashMask=void 0,this.hashShift=void 0,this.maxDist=void 0,this.checkSum=void 0,this.noWrap=void 0},t.isHuffmanTreeInitiated=!1,t}(),o=function(){function t(t,e,i,r){this.writer=t,this.codeMinCount=i,this.maxLength=r,this.codeFrequency=new Uint16Array(e),this.lengthCount=new Int32Array(r)}return Object.defineProperty(t.prototype,"treeLength",{get:function(){return this.codeCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"codeLengths",{get:function(){return this.codeLength},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"codeFrequencies",{get:function(){return this.codeFrequency},enumerable:!0,configurable:!0}),t.prototype.setStaticCodes=function(t,e){var i=new Int16Array(t.length);i.set(t,0),this.codes=i;var r=new Uint8Array(e.length);r.set(e,0),this.codeLength=r},t.prototype.reset=function(){for(var t=0;t<this.codeFrequency.length;t++)this.codeFrequency[t]=0;this.codes=void 0,this.codeLength=void 0},t.prototype.writeCodeToStream=function(t){this.writer.pendingBufferWriteBits(65535&this.codes[t],this.codeLength[t])},t.prototype.buildCodes=function(){var e=new Int32Array(this.maxLength);this.codes=new Int16Array(this.codeCount);for(var i=0,r=0;r<this.maxLength;r++)e[r]=i,i+=this.lengthCount[r]<<15-r;for(var n=0;n<this.codeCount;n++){var s=this.codeLength[n];s>0&&(this.codes[n]=t.bitReverse(e[s-1]),e[s-1]+=1<<16-s)}},t.bitReverse=function(e){return t.reverseBits[15&e]<<12|t.reverseBits[e>>4&15]<<8|t.reverseBits[e>>8&15]<<4|t.reverseBits[e>>12]},t.prototype.getEncodedLength=function(){for(var t=0,e=0;e<this.codeFrequency.length;e++)t+=this.codeFrequency[e]*this.codeLength[e];return t},t.prototype.calculateBLFreq=function(t){for(var e,i,r,n=-1,s=0;s<this.codeCount;){r=1;var h=this.codeLength[s];for(0===h?(e=138,i=3):(e=6,i=3,n!==h&&(t.codeFrequency[h]++,r=0)),n=h,s++;s<this.codeCount&&n===this.codeLength[s]&&(s++,!(++r>=e)););r<i?t.codeFrequency[n]+=r:0!==n?t.codeFrequency[16]++:r<=10?t.codeFrequency[17]++:t.codeFrequency[18]++}},t.prototype.writeTree=function(t){for(var e,i,r,n=-1,s=0;s<this.codeCount;){r=1;var h=this.codeLength[s];for(0===h?(e=138,i=3):(e=6,i=3,n!==h&&(t.writeCodeToStream(h),r=0)),n=h,s++;s<this.codeCount&&n===this.codeLength[s]&&(s++,!(++r>=e)););if(r<i)for(;r-- >0;)t.writeCodeToStream(n);else 0!==n?(t.writeCodeToStream(16),this.writer.pendingBufferWriteBits(r-3,2)):r<=10?(t.writeCodeToStream(17),this.writer.pendingBufferWriteBits(r-3,3)):(t.writeCodeToStream(18),this.writer.pendingBufferWriteBits(r-11,7))}},t.prototype.buildTree=function(){for(var t=this.codeFrequency.length,e=new Int32Array(t),i=0,r=0,n=0;n<t;n++){var s=this.codeFrequency[n];if(0!==s){for(var h=i++,o=0;h>0&&this.codeFrequency[e[o=Math.floor((h-1)/2)]]>s;)e[h]=e[o],h=o;e[h]=n,r=n}}for(;i<2;)e[i++]=r<2?++r:0;this.codeCount=Math.max(r+1,this.codeMinCount);for(var a=i,f=new Int32Array(4*i-2),u=new Int32Array(2*i-1),d=0;d<i;d++){var c=e[d],p=2*d;f[p]=c,f[p+1]=-1,u[d]=this.codeFrequency[c]<<8,e[d]=d}this.constructHuffmanTree(e,i,u,a,f),this.buildLength(f)},t.prototype.constructHuffmanTree=function(t,e,i,r,n){do{for(var s=t[0],h=t[--e],o=i[h],a=0,f=1;f<e;)f+1<e&&i[t[f]]>i[t[f+1]]&&f++,t[a]=t[f],f=2*(a=f)+1;for(;(f=a)>0&&i[t[a=Math.floor((f-1)/2)]]>o;)t[f]=t[a];t[f]=h;var u=t[0];n[2*(h=r++)]=s,n[2*h+1]=u;var d=Math.min(255&i[s],255&i[u]);for(i[h]=o=i[s]+i[u]-d+1,a=0,f=1;f<e;)f+1<e&&i[t[f]]>i[t[f+1]]&&f++,t[a]=t[f],f=2*(a=f)+1;for(;(f=a)>0&&i[t[a=Math.floor((f-1)/2)]]>o;)t[f]=t[a];t[f]=h}while(e>1)},t.prototype.buildLength=function(t){this.codeLength=new Uint8Array(this.codeFrequency.length);for(var e=Math.floor(t.length/2),i=Math.floor((e+1)/2),r=0,n=0;n<this.maxLength;n++)this.lengthCount[n]=0;if(0!==(r=this.calculateOptimalCodeLength(t,r,e))){var s=this.maxLength-1;do{for(;0===this.lengthCount[--s];);do{this.lengthCount[s]--,this.lengthCount[++s]++,r-=1<<this.maxLength-1-s}while(r>0&&s<this.maxLength-1)}while(r>0);this.recreateTree(t,r,i)}},t.prototype.recreateTree=function(t,e,i){this.lengthCount[this.maxLength-1]+=e,this.lengthCount[this.maxLength-2]-=e;for(var r=2*i,n=this.maxLength;0!==n;n--)for(var s=this.lengthCount[n-1];s>0;){var h=2*t[r++];-1===t[h+1]&&(this.codeLength[t[h]]=n,s--)}},t.prototype.calculateOptimalCodeLength=function(t,e,i){var r=new Int32Array(i);r[i-1]=0;for(var n=i-1;n>=0;n--){var s=2*n+1;if(-1!==t[s])(h=r[n]+1)>this.maxLength&&(h=this.maxLength,e++),r[t[s-1]]=r[t[s]]=h;else{var h=r[n];this.lengthCount[h-1]++,this.codeLength[t[s-1]]=r[n]}}return e},t.reverseBits=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],t.huffCodeLengthOrders=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],t}(),a=function(){function t(){}return t.checksumUpdate=function(e,i,r,n){var s=new Uint32Array(1);s[0]=e;for(var h=s[0],o=s[0]=65535&h,a=s[0]=h>>t.checkSumBitOffset;n>0;){var f=Math.min(n,t.checksumIterationCount);for(n-=f;--f>=0;)a+=o+=s[0]=255&i[r++];o%=t.checksumBase,a%=t.checksumBase}return h=a<<t.checkSumBitOffset|o},t.checkSumBitOffset=16,t.checksumBase=65521,t.checksumIterationCount=3800,t}(),f=[],u=function(){function t(){0===f.length&&t.initCrc32Table(),this.files=[],this.level="Normal",e.Save.isMicrosoftBrowser=!!navigator.msSaveBlob}return Object.defineProperty(t.prototype,"compressionLevel",{get:function(){return this.level},set:function(t){this.level=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return void 0===this.files?0:this.files.length},enumerable:!0,configurable:!0}),t.prototype.addItem=function(t){if(null===t||void 0===t)throw new Error("ArgumentException: item cannot be null or undefined");for(var e=0;e<this.files.length;e++){var i=this.files[e];if(i instanceof d&&i.name===t.name)throw new Error("item with same name already exist")}this.files.push(t)},t.prototype.addDirectory=function(t){if(null===t||void 0===t)throw new Error("ArgumentException: string cannot be null or undefined");if(0===t.length)throw new Error("ArgumentException: string cannot be empty");if("/"!==t.slice(-1)&&(t+="/"),-1!==this.files.indexOf(t))throw new Error("item with same name already exist");this.files.push(t)},t.prototype.getItem=function(t){if(t>=0&&t<this.files.length)return this.files[t]},t.prototype.contains=function(t){return-1!==this.files.indexOf(t)},t.prototype.save=function(t){if(null===t||void 0===t||0===t.length)throw new Error("ArgumentException: fileName cannot be null or undefined");if(0===this.files.length)throw new Error("InvalidOperation");var e=this;return new Promise(function(i,r){e.saveInternal(t,!1).then(function(){i(e)})})},t.prototype.saveAsBlob=function(){var t=this;return new Promise(function(e,i){t.saveInternal("",!0).then(function(t){e(t)})})},t.prototype.saveInternal=function(t,e){var i=this,r=this;return new Promise(function(n,s){for(var h=[],o=0,a=0;a<r.files.length;a++)i.getCompressedData(i.files[a]).then(function(i){if(o=r.constructZippedObject(h,i,o,i.isDirectory),h.length===r.files.length){var s=r.writeZippedContent(t,h,o,e);n(s)}})})},t.prototype.destroy=function(){if(void 0!==this.files&&this.files.length>0){for(var t=0;t<this.files.length;t++){var e=this.files[t];e instanceof d&&e.destroy(),e=void 0}this.files=[]}this.files=void 0,this.level=void 0},t.prototype.getCompressedData=function(t){var e=this;return new Promise(function(i,r){if(t instanceof d){var n=new FileReader;n.onload=function(){var r=new Uint8Array(n.result),s={fileName:t.name,crc32Value:0,compressedData:[],compressedSize:void 0,uncompressedDataSize:r.length,compressionType:void 0,isDirectory:!1};if("Normal"===e.level){e.compressData(r,s,f);for(var h=0,o=0;o<s.compressedData.length;o++)h+=s.compressedData[o].length;s.compressedSize=h,s.compressionType="\b\0"}else s.compressedSize=r.length,s.crc32Value=e.calculateCrc32Value(0,r,f),s.compressionType="\0\0",s.compressedData.push(r);i(s)},n.readAsArrayBuffer(t.data)}else i({fileName:t,crc32Value:0,compressedData:"",compressedSize:0,uncompressedDataSize:0,compressionType:"\0\0",isDirectory:!0})})},t.prototype.compressData=function(t,e,i){var r=new h(!0),n=0,s=0;do{if(n>=t.length){r.close();break}s=Math.min(t.length,n+16384);var o=t.subarray(n,s);e.crc32Value=this.calculateCrc32Value(e.crc32Value,o,i),r.write(o,0,s-n),n=s}while(n<=t.length);e.compressedData=r.compressedData,r.destroy()},t.prototype.constructZippedObject=function(t,e,i,r){var n=0,s=new Date;r&&(n|=16),n|=0;var h=this.writeHeader(e,s),o="PK"+h+e.fileName,a=this.writeCentralDirectory(e,h,i,n);return t.push({localHeader:o,centralDir:a,compressedData:e}),i+o.length+e.compressedSize},t.prototype.writeHeader=function(t,e){var i="";return i+="\n\0\0\0",i+=t.compressionType,i+=this.getBytes(this.getModifiedTime(e),2),i+=this.getBytes(this.getModifiedDate(e),2),i+=this.getBytes(t.crc32Value,4),i+=this.getBytes(t.compressedSize,4),i+=this.getBytes(t.uncompressedDataSize,4),i+=this.getBytes(t.fileName.length,2),i+=this.getBytes(0,2)},t.prototype.writeZippedContent=function(t,i,r,n){for(var s=0,h=[],o=0;o<i.length;o++){var a=i[o];for(s+=a.centralDir.length,h.push(this.getArrayBuffer(a.localHeader));a.compressedData.compressedData.length;)h.push(a.compressedData.compressedData.shift().buffer)}for(o=0;o<i.length;o++)h.push(this.getArrayBuffer(i[o].centralDir));h.push(this.getArrayBuffer(this.writeFooter(i,s,r)));var f=new Blob(h,{type:"application/zip"});return n||e.Save.save(t,f),f},t.prototype.writeCentralDirectory=function(t,e,i,r){return"PK"+this.getBytes(20,2)+e+this.getBytes(0,2)+"\0\0\0\0"+this.getBytes(r,4)+this.getBytes(i,4)+t.fileName},t.prototype.writeFooter=function(t,e,i){return"PK\0\0\0\0"+this.getBytes(t.length,2)+this.getBytes(t.length,2)+this.getBytes(e,4)+this.getBytes(i,4)+this.getBytes(0,2)},t.prototype.getArrayBuffer=function(t){for(var e=new Uint8Array(t.length),i=0;i<t.length;++i)e[i]=255&t.charCodeAt(i);return e.buffer},t.prototype.getBytes=function(t,e){for(var i="",r=0;r<e;r++)i+=String.fromCharCode(255&t),t>>>=8;return i},t.prototype.getModifiedTime=function(t){var e=t.getHours();return e<<=6,e|=t.getMinutes(),e<<=5,e|=t.getSeconds()/2},t.prototype.getModifiedDate=function(t){var e=t.getFullYear()-1980;return e<<=4,e|=t.getMonth()+1,e<<=5,e|=t.getDate()},t.prototype.calculateCrc32Value=function(t,e,i){t^=-1;for(var r=0;r<e.length;r++)t=t>>>8^i[255&(t^e[r])];return-1^t},t.initCrc32Table=function(){for(var t,e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;f[e]=t}},t}(),d=function(){function t(t,e){if(null===t||void 0===t)throw new Error("ArgumentException: data cannot be null or undefined");if(null===e||void 0===e)throw new Error("ArgumentException: string cannot be null or undefined");if(0===e.length)throw new Error("string cannot be empty");this.data=t,this.name=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.fileName},set:function(t){this.fileName=t},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.fileName=void 0,this.data=void 0},t}();return t.ZipArchive=u,t.ZipArchiveItem=d,t.CompressedStreamWriter=h,t.CompressorHuffmanTree=o,t.ChecksumCalculator=a,t}({},ej.fileutils),this.ejs=ej;
- /*!
- * filename: ej2-file-utils.min.js
- * version : 19.2.44
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.fileutils=function(t){"use strict";function e(t,e){if(null===t||void 0===t)throw new Error("ArgumentException: "+e+" cannot be null or undefined")}var n=function(){function t(){}return t.save=function(t,e){if(null===t||void 0===t||""===t)throw new Error("ArgumentException: fileName cannot be undefined, null or empty");var n=t.substring(t.lastIndexOf(".")+1,t.length),i=this.getMimeType(n);if(""!==i&&(e=new Blob([e],{type:i})),this.isMicrosoftBrowser)navigator.msSaveBlob(e,t);else{var r=document.createElementNS("http://www.w3.org/1999/xhtml","a");this.saveInternal(t,n,e,r,"download"in r)}},t.saveInternal=function(t,e,n,i,r){if(r){i.download=t;var o=window.URL.createObjectURL(n);i.href=o;var s=document.createEvent("MouseEvent");s.initEvent("click",!0,!0),i.dispatchEvent(s),setTimeout(function(){window.URL.revokeObjectURL(o),o=void 0})}else if("docx"!==e&&"xlsx"!==e){var a=window.URL.createObjectURL(n);window.open(a,"_blank")||(window.location.href=a)}else{var h=new FileReader;h.onloadend=function(){window.open(h.result,"_blank")||(window.location.href=h.result)},h.readAsDataURL(n)}},t.getMimeType=function(t){var e="";switch(t){case"html":e="text/html";break;case"pdf":e="application/pdf";break;case"docx":e="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"xlsx":e="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;case"txt":e="text/plain"}return e},t}(),i=function(){function t(){this.contentPos=0,this.bufferText="",this.bufferBlob=new Blob([""],{type:"text/plain"}),this.currentState="Initial",this.namespaceStack=[],this.namespaceStack.push(new r),this.namespaceStack[0].set("xmlns","http://www.w3.org/2000/xmlns/","Special"),this.namespaceStack.push(new r),this.namespaceStack[1].set("xml","http://www.w3.org/XML/1998/namespace","Special"),this.namespaceStack.push(new r),this.namespaceStack[2].set("","","Implied"),this.elementStack=[],this.elementStack.push(new o),this.elementStack[0].set("","","",this.namespaceStack.length-1),this.attributeStack=[],n.isMicrosoftBrowser=!!navigator.msSaveBlob}return Object.defineProperty(t.prototype,"buffer",{get:function(){return this.flush(),this.bufferBlob},enumerable:!0,configurable:!0}),t.prototype.writeProcessingInstruction=function(t,e){if(void 0===t||null===t||0===t.length)throw new Error("ArgumentException: name should not be undefined, null or empty");if(this.checkName(t),void 0!==e&&null!==e||(e=""),3===t.length&&"xml"===t&&"Initial"!==this.currentState)throw new Error("InvalidArgumentException: Cannot write XML declaration.WriteStartDocument method has already written it");if("Initial"!==this.currentState||void 0===this.bufferBlob)throw new Error("InvalidOperationException: Wrong Token");this.writeStartDocument(),this.writeProcessingInstructionInternal(t,e)},t.prototype.writeStartDocument=function(t){if("Initial"!==this.currentState||void 0===this.bufferBlob)throw new Error("InvalidOperationException: Wrong Token");this.currentState="StartDocument",this.rawText('<?xml version="1.0" encoding="utf-8'),null!==t&&void 0!==t&&(this.rawText('" standalone="'),this.rawText(t?"yes":"no")),this.rawText('"?>')},t.prototype.writeEndDocument=function(){for(;this.elementStack.length-1>0;)this.writeEndElement();this.currentState="EndDocument",this.flush()},t.prototype.writeStartElement=function(t,e,n){if(void 0===this.bufferBlob)throw new Error("InvalidOperationException: Wrong Token");if(void 0===e||null===e||0===e.length)throw new Error("ArgumentException: localName cannot be undefined, null or empty");if(this.checkName(e),"Initial"===this.currentState&&this.writeStartDocument(),"StartElement"===this.currentState&&this.startElementContent(),this.currentState="StartElement",void 0===t||null===t)void 0!==n&&null!==n&&(t=this.lookupPrefix(n)),void 0!==t&&null!==t||(t="");else if(t.length>0&&(void 0!==n&&null!==n||(n=this.lookupNamespace(t)),void 0===n||null===n||void 0!==n&&0===n.length))throw new Error("ArgumentException: Cannot use a prefix with an empty namespace");void 0!==n&&null!==n||(n=this.lookupNamespace(t)),this.writeStartElementInternal(t,e,n)},t.prototype.writeEndElement=function(){"StartElement"===this.currentState?(this.startElementContent(),this.currentState="ElementContent"):"ElementContent"===this.currentState&&(this.currentState="ElementContent"),this.currentState="EndElement";var t=this.elementStack.length-1;this.writeEndElementInternal(this.elementStack[t].prefix,this.elementStack[t].localName),this.namespaceStack.splice(this.elementStack[t].previousTop+1),this.elementStack.splice(t),this.bufferText.length>10240&&this.flush()},t.prototype.writeElementString=function(t,e,n,i){this.writeStartElement(t,e,n),void 0!==i&&null!==i&&0!==i.length&&this.writeString(i),this.writeEndElement()},t.prototype.writeAttributeString=function(t,e,n,i){this.writeStartAttribute(t,e,n,i),this.writeStringInternal(i,!0),this.writeEndAttribute()},t.prototype.writeString=function(t){this.writeInternal(t,!1)},t.prototype.writeRaw=function(t){this.writeInternal(t,!0)},t.prototype.writeInternal=function(t,e){if(void 0!==t&&null!==t){if("StartElement"!==this.currentState&&"ElementContent"!==this.currentState)throw new Error("InvalidOperationException: Wrong Token");"StartElement"===this.currentState&&this.startElementContent(),this.currentState="ElementContent",e?this.rawText(t):this.writeStringInternal(t,!1)}},t.prototype.save=function(t){for(;this.elementStack.length-1>0;)this.writeEndElement();""!==this.bufferText&&this.flush(),n.save(t,this.buffer)},t.prototype.destroy=function(){this.bufferBlob=void 0;for(t=0;t<this.namespaceStack.length;t++)this.namespaceStack[t].destroy();this.namespaceStack=[];for(var t=0;t<this.elementStack.length;t++)this.elementStack[t].destroy();this.elementStack=[],this.bufferText="",this.contentPos=0},t.prototype.flush=function(){void 0!==this.bufferBlob&&(this.bufferBlob=new Blob([this.bufferBlob,this.bufferText],{type:"text/plain"}),this.bufferText="")},t.prototype.writeProcessingInstructionInternal=function(t,e){this.bufferText+="<?",this.rawText(t),e.length>0&&(this.bufferText+=" ",e=e.replace(/\?\>/g,"? >"),this.bufferText+=e),this.bufferText+="?",this.bufferText+=">"},t.prototype.writeStartAttribute=function(t,e,n,i){if(void 0===e||null===e||0===e.length){if("xmlns"!==t)throw new Error("ArgumentException: localName cannot be undefined, null or empty");e="xmlns",t=""}if("StartElement"!==this.currentState)throw new Error("InvalidOperationException: Wrong Token");this.checkName(e),this.writeStartAttributePrefixAndNameSpace(t,e,n,i)},t.prototype.writeStartAttributePrefixAndNameSpace=function(t,e,n,i){void 0!==t&&null!==t||(void 0!==n&&null!==n&&("xmlns"===e&&"http://www.w3.org/2000/xmlns/"===n||(t=this.lookupPrefix(n))),void 0!==t&&null!==t||(t="")),void 0!==n&&null!==n||(void 0!==t&&null!==t&&t.length>0&&(n=this.lookupNamespace(t)),void 0!==n&&null!==n||(n="")),this.writeStartAttributeSpecialAttribute(t,e,n,i)},t.prototype.writeStartAttributeSpecialAttribute=function(t,e,n,i){if(0===t.length){if("x"===e[0]&&"xmlns"===e)return this.skipPushAndWrite(t,e,n),void this.pushNamespaceExplicit("",i);n.length>0&&(t=this.lookupPrefix(n))}else{if("x"===t[0]){if("xmlns"===t)return this.skipPushAndWrite(t,e,n),void this.pushNamespaceExplicit(e,i);if("xml"===t&&("space"===e||"lang"===e))return void this.skipPushAndWrite(t,e,n)}0===n.length&&(t="")}void 0!==t&&null!==t&&0!==t.length&&this.pushNamespaceImplicit(t,n),this.skipPushAndWrite(t,e,n)},t.prototype.writeEndAttribute=function(){this.currentState="StartElement",this.bufferText+='"'},t.prototype.writeStartElementInternal=function(t,e,n){this.bufferText+="<",t.length>0&&(this.rawText(t),this.bufferText+=":"),this.rawText(e);var i=this.elementStack.length;this.elementStack.push(new o),this.elementStack[i].set(t,e,n,this.namespaceStack.length-1),this.pushNamespaceImplicit(t,n);for(var r=0;r<this.attributeStack.length;r++)this.attributeStack[r].destroy();this.attributeStack=[]},t.prototype.writeEndElementInternal=function(t,e){this.contentPos!==this.bufferText.length+1?(this.bufferText+="</",void 0!==t&&null!==t&&0!==t.length&&(this.rawText(t),this.bufferText+=":"),this.rawText(e),this.bufferText+=">"):(this.bufferText=this.bufferText.substring(0,this.bufferText.length-1),this.bufferText+=" />")},t.prototype.writeStartAttributeInternal=function(t,e,n){this.bufferText+=" ",void 0!==t&&null!==t&&t.length>0&&(this.rawText(t),this.bufferText+=":"),this.rawText(e),this.bufferText+="=",this.bufferText+='"'},t.prototype.writeNamespaceDeclaration=function(t,e){this.writeStartNamespaceDeclaration(t),this.writeStringInternal(e,!0),this.bufferText+='"'},t.prototype.writeStartNamespaceDeclaration=function(t){void 0===t||null===t||0===t.length?this.rawText(' xmlns="'):(this.rawText(" xmlns:"),this.rawText(t),this.bufferText+="=",this.bufferText+='"')},t.prototype.writeStringInternal=function(t,e){null!==t&&void 0!==t||(t=""),t=(t=(t=t.replace(/\&/g,"&")).replace(/\</g,"<")).replace(/\>/g,">"),e&&(t=t.replace(/\"/g,""")),this.bufferText+=t,e||(this.contentPos=0)},t.prototype.startElementContent=function(){for(var t=this.elementStack[this.elementStack.length-1].previousTop,e=this.namespaceStack.length-1;e>t;e--)"NeedToWrite"===this.namespaceStack[e].kind&&this.writeNamespaceDeclaration(this.namespaceStack[e].prefix,this.namespaceStack[e].namespaceUri);this.bufferText+=">",this.contentPos=this.bufferText.length+1},t.prototype.rawText=function(t){this.bufferText+=t},t.prototype.addNamespace=function(t,e,n){var i=this.namespaceStack.length;this.namespaceStack.push(new r),this.namespaceStack[i].set(t,e,n)},t.prototype.lookupPrefix=function(t){for(var e=this.namespaceStack.length-1;e>=0;e--)if(this.namespaceStack[e].namespaceUri===t)return this.namespaceStack[e].prefix},t.prototype.lookupNamespace=function(t){for(var e=this.namespaceStack.length-1;e>=0;e--)if(this.namespaceStack[e].prefix===t)return this.namespaceStack[e].namespaceUri},t.prototype.lookupNamespaceIndex=function(t){for(var e=this.namespaceStack.length-1;e>=0;e--)if(this.namespaceStack[e].prefix===t)return e;return-1},t.prototype.pushNamespaceImplicit=function(t,e){var n,i=this.lookupNamespaceIndex(t);if(-1!==i){if(i>this.elementStack[this.elementStack.length-1].previousTop){if(this.namespaceStack[i].namespaceUri!==e)throw new Error("XmlException namespace Uri needs to be the same as the one that is already declared");return}if("Special"===this.namespaceStack[i].kind){if("xml"!==t)throw new Error('InvalidArgumentException: Prefix "xmlns" is reserved for use by XML.');if(e!==this.namespaceStack[i].namespaceUri)throw new Error("InvalidArgumentException: Xml String");n="Implied"}else n=this.namespaceStack[i].namespaceUri===e?"Implied":"NeedToWrite"}else{if("http://www.w3.org/XML/1998/namespace"===e&&"xml"!==t||"http://www.w3.org/2000/xmlns/"===e&&"xmlns"!==t)throw new Error("InvalidArgumentException");n="NeedToWrite"}this.addNamespace(t,e,n)},t.prototype.pushNamespaceExplicit=function(t,e){var n=this.lookupNamespaceIndex(t);if(-1!==n&&n>this.elementStack[this.elementStack.length-1].previousTop)return void(this.namespaceStack[n].kind="Written");this.addNamespace(t,e,"Written")},t.prototype.addAttribute=function(t,e,n){var i=this.attributeStack.length;this.attributeStack.push(new s),this.attributeStack[i].set(t,e,n);for(var r=0;r<i;r++)if(this.attributeStack[r].isDuplicate(t,e,n))throw new Error("XmlException: duplicate attribute name")},t.prototype.skipPushAndWrite=function(t,e,n){this.addAttribute(t,e,n),this.writeStartAttributeInternal(t,e,n)},t.prototype.checkName=function(t){if(/[ !@#$%^&*()+\=\[\]{};':"\\|,<>\/?]/.test(t))throw new Error("InvalidArgumentException: invalid name character")},t}(),r=function(){function t(){}return t.prototype.set=function(t,e,n){this.prefix=t,this.namespaceUri=e,this.kind=n},t.prototype.destroy=function(){this.prefix=void 0,this.namespaceUri=void 0,this.kind=void 0},t}(),o=function(){function t(){}return t.prototype.set=function(t,e,n,i){this.previousTop=i,this.prefix=t,this.namespaceUri=n,this.localName=e},t.prototype.destroy=function(){this.previousTop=void 0,this.prefix=void 0,this.localName=void 0,this.namespaceUri=void 0},t}(),s=function(){function t(){}return t.prototype.set=function(t,e,n){this.prefix=t,this.namespaceUri=n,this.localName=e},t.prototype.isDuplicate=function(t,e,n){return this.localName===e&&(this.prefix===t||this.namespaceUri===n)},t.prototype.destroy=function(){this.prefix=void 0,this.namespaceUri=void 0,this.localName=void 0},t}(),a=function(){function t(t){this.emitBOM=!0,this.encodingType="Ansi",this.initBOM(t)}return Object.defineProperty(t.prototype,"includeBom",{get:function(){return this.emitBOM},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.encodingType},set:function(t){this.encodingType=t},enumerable:!0,configurable:!0}),t.prototype.initBOM=function(t){this.emitBOM=void 0===t||null===t||t},t.prototype.getByteCount=function(t){return e(t,"string"),""===t?this.utf8Len(t.charCodeAt(0)):(null!==this.type&&void 0!==this.type||(this.type="Ansi"),this.getByteCountInternal(t,0,t.length))},t.prototype.utf8Len=function(t){return t<=127?1:t<=2047?2:t<=65535?3:t<=2097151?4:0},t.prototype.isHighSurrogate=function(t){return t>=55296&&t<=56319},t.prototype.toCodepoint=function(t,e){return((t=(1023&t)<<10)|1023&e)+65536},t.prototype.getByteCountInternal=function(t,e,n){var i=0;if("Utf8"===this.encodingType||"Unicode"===this.encodingType){for(var r="Utf8"===this.encodingType,o=0;o<n;o++){var s=t.charCodeAt(r?e:e++);if(this.isHighSurrogate(s))if(r){var a=s,h=t.charCodeAt(++e);i+=this.utf8Len(this.toCodepoint(a,h))}else i+=4,++o;else i+=r?this.utf8Len(s):2;r&&e++}return i}return i=n},t.prototype.getBytes=function(t,n,i){if(e(t,"string"),e(n,"charIndex"),e(i,"charCount"),n<0||i<0)throw new RangeError("Argument Out Of Range Exception: charIndex or charCount is less than zero");if(t.length-n<i)throw new RangeError("Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string");if(""===t)return new ArrayBuffer(0);null!==this.type&&void 0!==this.type||(this.type="Ansi");var r=this.getByteCountInternal(t,n,i);switch(this.type){case"Utf8":return this.getBytesOfUtf8Encoding(r,t,n,i);case"Unicode":return this.getBytesOfUnicodeEncoding(r,t,n,i);default:return this.getBytesOfAnsiEncoding(r,t,n,i)}},t.prototype.getString=function(t,n,i){if(e(t,"bytes"),e(n,"index"),e(i,"count"),n<0||i<0)throw new RangeError("Argument Out Of Range Exception: index or count is less than zero");if(t.byteLength-n<i)throw new RangeError("Argument Out Of Range Exception: index and count do not denote a valid range in bytes");if(0===t.byteLength||0===i)return"";null!==this.type&&void 0!==this.type||(this.type="Ansi");var r="",o=new Uint8Array(t);switch(this.type){case"Utf8":return this.getStringOfUtf8Encoding(o,n,i);case"Unicode":var s=new Uint16Array(t);return r=this.getStringofUnicodeEncoding(s,n,i);default:for(var a=n,h=0;h<i;h++){var c=o[a];r+=String.fromCharCode(c),a++}return r}},t.prototype.getBytesOfAnsiEncoding=function(t,e,n,i){for(var r=new ArrayBuffer(t),o=new Uint8Array(r),s=0,a=0;a<i;a++){var h=e.charCodeAt(n++);o[s]=h<2048?h:63,s++}return r},t.prototype.getBytesOfUtf8Encoding=function(t,e,n,i){for(var r=new ArrayBuffer(t),o=new Uint8Array(r),s=n,a=0,h=0;h<i;h++){var c=e.charCodeAt(s);c<=127?o[a]=c:c<2048?(o[a]=192|c>>6,o[++a]=128|63&c):c<55296||c>=57344?(o[a]=224|c>>12,o[++a]=128|c>>6&63,o[++a]=128|63&c):(o[a]=239,o[++a]=191,o[++a]=189),++a,++s}return r},t.prototype.getBytesOfUnicodeEncoding=function(t,e,n,i){for(var r=new ArrayBuffer(t),o=new Uint16Array(r),s=0;s<i;s++){var a=e.charCodeAt(s);o[s]=a}return r},t.prototype.getStringOfUtf8Encoding=function(t,e,n){var i=0,r=e,o="";for(i;i<n;i++){for(var s=t[r++];r>t.length;)return o;s>127&&(s>191&&s<224&&r<n?s=(31&s)<<6|63&t[r]:s>223&&s<240&&r<t.byteLength?s=(15&s)<<12|(63&t[r])<<6|63&t[++r]:s>239&&s<248&&r<t.byteLength&&(s=(7&s)<<18|(63&t[r])<<12|(63&t[++r])<<6|63&t[++r]),++r),o+=String.fromCharCode(s)}return o},t.prototype.getStringofUnicodeEncoding=function(t,e,n){if(n>t.length)throw new RangeError("ArgumentOutOfRange_Count");for(var i=new Uint16Array(n),r=0;r<n&&r<t.length;r++)i[r]=t[e++];return String.fromCharCode.apply(null,i)},t.prototype.destroy=function(){this.emitBOM=void 0,this.encodingType=void 0},t}(),h=function(){function t(t){this.bufferBlob=new Blob([""]),this.bufferText="",this.init(t),n.isMicrosoftBrowser=!!navigator.msSaveBlob}return Object.defineProperty(t.prototype,"buffer",{get:function(){return this.flush(),this.bufferBlob},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"encoding",{get:function(){return this.enc},enumerable:!0,configurable:!0}),t.prototype.init=function(t){null===t||void 0===t?(this.enc=new a(!1),this.enc.type="Utf8"):(this.enc=t,this.setBomByte())},t.prototype.setBomByte=function(){if(this.encoding.includeBom)switch(this.encoding.type){case"Unicode":var t=new ArrayBuffer(2),e=new Uint8Array(t);e[0]=255,e[1]=254,this.bufferBlob=new Blob([t]);break;case"Utf8":var n=new ArrayBuffer(3),i=new Uint8Array(n);i[0]=239,i[1]=187,i[2]=191,this.bufferBlob=new Blob([n]);break;default:this.bufferBlob=new Blob([""])}},t.prototype.save=function(t){""!==this.bufferText&&this.flush(),n.save(t,this.buffer)},t.prototype.write=function(t){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");e(t,"string"),this.bufferText+=t,this.bufferText.length>=10240&&this.flush()},t.prototype.flush=function(){if(void 0!==this.bufferText&&null!==this.bufferText&&0!==this.bufferText.length){var t=this.encoding.getBytes(this.bufferText,0,this.bufferText.length);this.bufferText="",this.bufferBlob=new Blob([this.bufferBlob,t])}},t.prototype.writeLine=function(t){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");e(t,"string"),this.bufferText=this.bufferText+t+"\r\n",this.bufferText.length>=10240&&this.flush()},t.prototype.destroy=function(){this.bufferBlob=void 0,this.bufferText=void 0,this.enc instanceof a&&this.enc.destroy(),this.enc=void 0},t}();return t.XmlWriter=i,t.Namespace=r,t.XmlElement=o,t.XmlAttribute=s,t.StreamWriter=h,t.Encoding=a,t.validateNullOrUndefined=e,t.Save=n,t}({}),this.ejs=ej;
- /*!
- * filename: ej2-excel-export.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.excelexport=function(e,t,r){"use strict";var o=function(){function e(){this.numFmtId=0,this.backColor="none",this.fontName="Calibri",this.fontSize=10.5,this.fontColor="#000000",this.italic=!1,this.bold=!1,this.underline=!1,this.wrapText=!1,this.hAlign="general",this.vAlign="bottom",this.indent=0,this.rotation=0,this.numberFormat="GENERAL",this.type="datetime",this.borders=new m,this.isGlobalStyle=!1}return e}(),i=function(){function e(){this.sz=10.5,this.name="Calibri",this.u=!1,this.b=!1,this.i=!1,this.color="FF000000"}return e}(),n=function(){function e(){}return e}(),l=function(){function e(){}return e}(),s=function(){function e(){}return e}(),a=function(){function e(){this.name="Normal",this.xfId=0}return e}(),d=function(){function e(e,t){this.numFmtId=e,this.formatCode=t}return e}(),h=function(){function e(e,t){this.lineStyle=e,this.color=t}return e}(),m=function(){function e(){this.left=new h("none","#FFFFFF"),this.right=new h("none","#FFFFFF"),this.top=new h("none","#FFFFFF"),this.bottom=new h("none","#FFFFFF"),this.all=new h("none","#FFFFFF")}return e}(),p=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),u=function(){function e(){}return e}(),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,i=0,n=t;i<n.length;i++)n[i].index===e.index&&(t[o]=e,r=!0),o++;r||t.push(e)},t}return p(t,e),t}(Array),f=function(){function e(){}return e}(),v=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),g=function(){function e(){}return e}(),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.add=function(e){for(var r=!1,o=0,i=0,n=t;i<n.length;i++)n[i].index===e.index&&(t[o]=e,r=!0),o++;r||t.push(e)},t}return v(t,e),t}(Array),x=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return x(t,e),t}(Array),b=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),F=function(){function e(){this.isSummaryRowBelow=!0,this.showGridLines=!0,this.enableRtl=!1}return e}(),S=function(){function e(){}return e}(),C=function(){function e(){}return e}(),I=function(){function e(){}return e}(),k=function(){function e(){}return e}(),T=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.add=function(e){for(var o=!1,i=0,n=0,l=r;n<l.length;n++){var s=l[n];if(t.isIntersecting(s,e)){var a=new k;a.x=Math.min(s.x,e.x),a.y=Math.min(s.Y,e.y),a.width=Math.max(s.Width+s.X,e.width+e.x),a.height=Math.max(s.Height+s.Y,e.height+e.y),a.ref=r[i].ref.split(":")[0]+":"+e.ref.split(":")[1],r[i]=a,e=a,o=!0}i++}return o||r.push(e),e},r}return b(t,e),t.isIntersecting=function(e,t){return e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height},t}(Array),R=function(){function e(){}return e}(),P=function(){function e(e){this.intl=new r.Internationalization}return e.prototype.getFormatFunction=function(e,t){return e.type?(t&&(e.isServerRendered=!0),this.intl.getDateFormat(e)):this.intl.getNumberFormat(e)},e.prototype.toView=function(e,t){var o=e;return r.isNullOrUndefined(t)||r.isNullOrUndefined(e)||(o=t(e)),o},e.prototype.displayText=function(e,t,r){return this.toView(e,this.getFormatFunction(t,r))},e}(),N=function(){function e(e,t){if(this.csvStr="",this.separator=null===t||void 0===t?",":t,this.formatter=new P,this.isMicrosoftBrowser=!!navigator.msSaveBlob,null!==e.isServerRendered&&void 0!==e.isServerRendered&&(this.isServerRendered=e.isServerRendered),null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var r=0;r<e.styles.length;r++)void 0!==e.styles[r].name&&void 0!==e.styles[r].numberFormat&&this.globalStyles.set(e.styles[r].name,e.styles[r].numberFormat)}null!==e.worksheets&&void 0!==e.worksheets&&this.parseWorksheet(e.worksheets[0])}return e.prototype.parseWorksheet=function(e){null!==e.rows&&void 0!==e.rows&&this.parseRows(e.rows)},e.prototype.parseRows=function(e){for(var t=1,r=0,o=e;r<o.length;r++){var i=o[r];if(null===i.index||void 0===i.index)throw Error("Row index is missing.");for(;t<i.index;)this.csvStr+="\n",t++;this.parseRow(i)}},e.prototype.parseRow=function(e){if(null!==e.cells&&void 0!==e.cells)for(var t=1,r=0,o=e.cells;r<o.length;r++){var i=o[r];if(null===i.index||void 0===i.index)throw Error("Cell index is missing.");for(;t<i.index;)this.csvStr+=this.separator,t++;this.parseCell(i)}},e.prototype.parseCell=function(e){var t=this.csvStr;if(void 0!==e.value)if(e.value instanceof Date)if(void 0!==e.style&&void 0!==e.style.numberFormat)try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:e.style.numberFormat},this.isServerRendered))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:e.style.numberFormat},this.isServerRendered))}else if(void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name))try{t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",skeleton:this.globalStyles.get(e.style.name)},this.isServerRendered))}catch(r){t+=this.parseCellValue(this.formatter.displayText(e.value,{type:"dateTime",format:this.globalStyles.get(e.style.name)},this.isServerRendered))}else t+=e.value;else"boolean"==typeof e.value?t+=e.value?"TRUE":"FALSE":"number"==typeof e.value?void 0!==e.style&&void 0!==e.style.numberFormat?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:e.style.numberFormat},this.isServerRendered)):void 0!==e.style&&void 0!==e.style.name&&this.globalStyles.has(e.style.name)?t+=this.parseCellValue(this.formatter.displayText(e.value,{format:this.globalStyles.get(e.style.name)},this.isServerRendered)):t+=e.value:t+=this.parseCellValue(e.value);this.csvStr=t},e.prototype.parseCellValue=function(e){for(var t="",r=e.length,o=0;o<r;o++)'"'===e[o]?t+=e[o].replace('"','""'):t+=e[o];return e=t,-1!==e.indexOf(this.separator)||-1!==e.indexOf("\n")?e='"'+e+'"':e},e.prototype.save=function(e){if(this.buffer=new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"}),this.isMicrosoftBrowser)navigator.msSaveBlob(this.buffer,e);else{var t=window.URL.createObjectURL(this.buffer),r=document.createElementNS("http://www.w3.org/1999/xhtml","a");r.download=e,r.href=t;var o=document.createEvent("MouseEvent");o.initEvent("click",!0,!0),r.dispatchEvent(o),setTimeout(function(){window.URL.revokeObjectURL(t)})}},e.prototype.saveAsBlob=function(){return new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"})},e}(),A=function(){function e(){this.parts=[]}return e.prototype.append=function(e){this.parts.push(e),this.blob=void 0},e.prototype.getBlob=function(){return new Blob(this.parts,{type:"text/plain"})},e}(),O=function(){function e(){}return e}(),B=function(){function e(e,n,l,s,d){if(this.sharedStringCount=0,this.unitsProportions=[1.28,.32,96,96/25.4,96/2.54,1,96/72,96/72/12700],this.hyperlinkStyle={fontColor:"#0000FF",underline:!0},this.culture=void 0!==l?l:"en-US",this.currency=void 0!==s?s:"USD",this.intl=new r.Internationalization(this.culture),this.mSaveType=n,"xlsx"===n){if(this.mArchive=new t.ZipArchive,this.sharedString=[],this.mFonts=[],this.mBorders=[],this.mStyles=[],this.printTitles=new Map,this.cellStyles=new Map,this.mNumFmt=new Map,this.mFills=new Map,this.mStyles.push(new o),this.mFonts.push(new i),this.cellStyles.set("Normal",new a),this.mCellXfs=[],this.mCellStyleXfs=[],this.drawingCount=0,this.imageCount=0,null!==e.styles&&void 0!==e.styles){this.globalStyles=new Map;for(var h=0;h<e.styles.length;h++)if(void 0!==e.styles[h].name){if(this.cellStyles.has(e.styles[h].name))throw Error("Style name "+e.styles[h].name+" is already existed");var m=new o;m.isGlobalStyle=!0,this.parserCellStyle(e.styles[h],m,"none");var p=new a;p.name=m.name,p.xfId=m.index-1,this.cellStyles.set(p.name,p);var u={};void 0!==e.styles[h].numberFormat&&(u.format=e.styles[h].numberFormat),void 0!==e.styles[h].type?u.type=e.styles[h].type:u.type="datetime",void 0!==u.format&&this.globalStyles.set(e.styles[h].name,u)}}if(null===e.worksheets||void 0===e.worksheets)throw Error("Worksheet is expected.");this.parserWorksheets(e.worksheets),null!==e.builtInProperties&&void 0!==e.builtInProperties&&(this.builtInProperties=new D,this.parserBuiltInProperties(e.builtInProperties,this.builtInProperties))}else this.csvHelper=new N(e,d)}return e.prototype.parserBuiltInProperties=function(e,t){null!==e.author&&void 0!==e.author&&(t.author=e.author),null!==e.comments&&void 0!==e.comments&&(t.comments=e.comments),null!==e.category&&void 0!==e.category&&(t.category=e.category),null!==e.company&&void 0!==e.company&&(t.company=e.company),null!==e.manager&&void 0!==e.manager&&(t.manager=e.manager),null!==e.subject&&void 0!==e.subject&&(t.subject=e.subject),null!==e.title&&void 0!==e.title&&(t.title=e.title),null!==e.createdDate&&void 0!==e.createdDate&&(t.createdDate=e.createdDate),null!==e.modifiedDate&&void 0!==e.modifiedDate&&(t.modifiedDate=e.modifiedDate),null!==e.tags&&void 0!==e.tags&&(t.tags=e.tags),null!==e.status&&void 0!==e.status&&(t.status=e.status)},e.prototype.parserWorksheets=function(e){this.worksheets=new w;for(var t=e.length,r=0;r<t;r++){var o=e[r],i=new F;this.mergeCells=new T,this.mergedCellsStyle=new Map,this.mHyperLinks=[],null!==o.name&&void 0!==o.name?i.name=o.name:i.name="Sheet"+(r+1).toString(),null!==o.enableRtl&&void 0!==o.enableRtl&&(i.enableRtl=o.enableRtl),i.index=r+1,null!==o.columns&&void 0!==o.columns&&this.parserColumns(o.columns,i),null!==o.rows&&void 0!==o.rows&&this.parserRows(o.rows,i),null!==o.showGridLines&&void 0!==o.showGridLines&&(i.showGridLines=o.showGridLines),null!==o.freeze&&void 0!==o.freeze&&this.parserFreezePanes(o.freeze,i),null!==o.printTitle&&void 0!==o.printTitle&&this.parserPrintTitle(o.printTitle,i),void 0!==o.pageSetup&&void 0!==o.pageSetup.isSummaryRowBelow&&(i.isSummaryRowBelow=o.pageSetup.isSummaryRowBelow),void 0!==o.images&&this.parserImages(o.images,i),null!==o.autoFilters&&void 0!==o.autoFilters&&this.parseFilters(o.autoFilters,i),i.index=r+1,i.mergeCells=this.mergeCells,i.hyperLinks=this.mHyperLinks,this.worksheets.push(i)}},e.prototype.mergeOptions=function(e,t){var r={};return this.applyProperties(e,r),this.applyProperties(t,r),r},e.prototype.applyProperties=function(e,t){for(var r=Object.keys(e),o=0;o<r.length;o++)"name"!==r[o]&&(t[r[o]]=e[r[o]])},e.prototype.getCellName=function(e,t){return this.getColumnName(t)+e.toString()},e.prototype.getColumnName=function(e){e--;var t="";do{var r=e%26;e=e/26-1,t=String.fromCharCode(65+r)+t}while(e>=0);return t},e.prototype.parserPrintTitle=function(e,t){var r,o="";if(null!==e.fromRow&&void 0!==e.fromRow){r="$"+e.fromRow+":$"+(null!==e.toRow&&void 0!==e.toRow?e.toRow:e.fromRow)}var i;if(null!==e.fromColumn&&void 0!==e.fromColumn){var n=e.fromColumn,l=void 0;l=null!==e.toColumn&&void 0!==e.toColumn?e.toColumn:e.fromColumn,i="$"+this.getColumnName(n)+":$"+this.getColumnName(l)}void 0!==r&&(o+=t.name+"!"+r),void 0!==i&&void 0!==r?o+=","+t.name+"!"+i:void 0!==i&&(o+=t.name+"!"+i),""!==o&&this.printTitles.set(t.index-1,o)},e.prototype.parserFreezePanes=function(e,t){t.freezePanes=new I,null!==e.row&&void 0!==e.row?t.freezePanes.row=e.row:t.freezePanes.row=0,null!==e.column&&void 0!==e.column?t.freezePanes.column=e.column:t.freezePanes.column=0,t.freezePanes.leftCell=this.getCellName(t.freezePanes.row+1,t.freezePanes.column+1)},e.prototype.parserColumns=function(e,t){var r=e.length;t.columns=[];for(var o=0;o<r;o++){var i=new f;if(null===e[o].index||void 0===e[o].index)throw Error("Column index is missing.");i.index=e[o].index,null!==e[o].width&&void 0!==e[o].width&&(i.width=e[o].width),t.columns.push(i)}},e.prototype.parserRows=function(e,t){var r=e.length;t.rows=new y;for(var o=0,i=0;i<r;i++){var n=this.parserRow(e[i],o);o=n.index,t.rows.add(n)}this.insertMergedCellsStyle(t)},e.prototype.insertMergedCellsStyle=function(e){var t=this;this.mergeCells.length>0&&this.mergedCellsStyle.forEach(function(o,i){var n=e.rows.filter(function(e){return e.index===o.y})[0];if(r.isNullOrUndefined(n)){var l=e.rows.filter(function(e){return e.index<=o.y}),s=new g;s.index=o.y,s.cells=new c,s.cells.add(t.createCell(o,i));h=0;l.length>0&&(h=e.rows.indexOf(l[l.length-1])+1),e.rows.splice(h,0,s)}else{var a=n.cells.filter(function(e){return e.index===o.x})[0];if(r.isNullOrUndefined(a)){var d=n.cells.filter(function(e){return e.index<=o.x}),h=0;d.length>0&&(h=n.cells.indexOf(d[d.length-1])+1),n.cells.splice(h,0,t.createCell(o,i))}else a.styleIndex=o.styleIndex}})},e.prototype.createCell=function(e,t){var r=new u;return r.refName=t,r.index=e.x,r.cellStyle=new o,r.styleIndex=e.styleIndex,r},e.prototype.parserRow=function(e,t){var r=new g;if(null!==e.height&&void 0!==e.height&&(r.height=e.height),null===e.index||void 0===e.index)throw Error("Row index is missing.");return r.index=e.index,null!==e.grouping&&void 0!==e.grouping&&this.parseGrouping(e.grouping,r),this.parseCells(e.cells,r),r},e.prototype.parseGrouping=function(e,t){t.grouping=new C,void 0!==e.outlineLevel&&(t.grouping.outlineLevel=e.outlineLevel),void 0!==e.isCollapsed&&(t.grouping.isCollapsed=e.isCollapsed),void 0!==e.isHidden&&(t.grouping.isHidden=e.isHidden)},e.prototype.parseCells=function(e,t){t.cells=new c;for(var r=void 0!==e?e.length:0,i=1,n=1,l=0;l<r;l++){var s=e[l],a=new u;if(null===s.index||void 0===s.index)throw Error("Cell index is missing.");if(a.index=s.index,a.index<i?i=a.index:a.index>n&&(n=a.index),a.refName=this.getCellName(t.index,a.index),null!==s.rowSpan&&void 0!==s.rowSpan?a.rowSpan=s.rowSpan-1:a.rowSpan=0,null!==s.colSpan&&void 0!==s.colSpan?a.colSpan=s.colSpan-1:a.colSpan=0,null!==s.hyperlink&&void 0!==s.hyperlink){var d=new S;void 0!==s.hyperlink.target&&(d.target=s.hyperlink.target,void 0!==s.hyperlink.displayText?a.value=s.hyperlink.displayText:a.value=s.hyperlink.target,a.type=this.getCellValueType(a.value),d.ref=a.refName,d.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(d),a.cellStyle=new o,this.parserCellStyle(void 0!==s.style?this.mergeOptions(s.style,this.hyperlinkStyle):this.hyperlinkStyle,a.cellStyle,"string"),a.styleIndex=a.cellStyle.index)}null!==s.formula&&void 0!==s.formula&&(a.formula=s.formula,a.type="formula"),null!==s.value&&void 0!==s.value&&(void 0!==a.formula?a.value=0:(a.value=s.value,a.type=this.getCellValueType(a.value))),null!==s.style&&void 0!==s.style&&void 0===a.styleIndex?(a.cellStyle=new o,a.value instanceof Date?this.parserCellStyle(s.style,a.cellStyle,a.type,14):this.parserCellStyle(s.style,a.cellStyle,a.type),a.styleIndex=a.cellStyle.index):a.value instanceof Date&&(a.cellStyle=new o,this.parserCellStyle({},a.cellStyle,a.type,14),a.styleIndex=a.cellStyle.index),this.parseCellType(a),this.mergeCells=this.processMergeCells(a,t.index,this.mergeCells),t.cells.add(a)}t.spans=i+":"+n},e.prototype.GetColors=function(){var e;return(e=new Map).set("WHITE","FFFFFFFF"),e.set("SILVER","FFC0C0C0"),e.set("GRAY","FF808080"),e.set("BLACK","FF000000"),e.set("RED","FFFF0000"),e.set("MAROON","FF800000"),e.set("YELLOW","FFFFFF00"),e.set("OLIVE","FF808000"),e.set("LIME","FF00FF00"),e.set("GREEN","FF008000"),e.set("AQUA","FF00FFFF"),e.set("TEAL","FF008080"),e.set("BLUE","FF0000FF"),e.set("NAVY","FF000080"),e.set("FUCHSIA","FFFF00FF"),e.set("PURPLE","FF800080"),e},e.prototype.processColor=function(e){return 0===e.indexOf("#")?e.replace("#","FF"):(e=e.toUpperCase(),this.rgbColors=this.GetColors(),e=this.rgbColors.has(e)?this.rgbColors.get(e):"FF000000")},e.prototype.processCellValue=function(e,t){var r=e;if(-1!==e.indexOf("<font")||-1!==e.indexOf("<a")||-1!==e.indexOf("<b>")||-1!==e.indexOf("<i>")||-1!==e.indexOf("<u>")){var o="",i=e.indexOf("<",0),n=e.indexOf(">",i+1);if(i>=0&&n>=0){for(0!==i&&(o+='<r><t xml:space="preserve">'+e.substring(0,i)+"</t></r>");i>=0&&n>=0;)if((n=e.indexOf(">",i+1))>=0){var l=e.substring(i+1,n);(i=e.indexOf("<",n+1))<0&&(i=r.length);var s=r.substring(n+1,i);if(0!==s.length){var a=l.split(" ");if(a.length>0&&(o+="<r><rPr>"),a.length>1)for(var d=0,h=a;d<h.length;d++){var m=h[d];switch(m.trim().substring(0,5)){case"size=":o+='<sz val="'+m.substring(6,m.length-1)+'"/>';break;case"face=":o+='<rFont val="'+m.substring(6,m.length-1)+'"/>';break;case"color":o+='<color rgb="'+this.processColor(m.substring(7,m.length-1))+'"/>';break;case"href=":var p=new S;p.target=m.substring(6,m.length-1).trim(),p.ref=t.refName,p.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(p),o+='<color rgb="FF0000FF"/><u/><b/>'}}else if(1===a.length)switch(a[0].trim()){case"b":o+="<b/>";break;case"i":o+="<i/>";break;case"u":o+="<u/>"}o+='</rPr><t xml:space="preserve">'+s+"</t></r>"}}return""===o?r:o}return r}return r},e.prototype.applyGlobalStyle=function(e,t){this.cellStyles.has(e.name)&&(t.index=this.mStyles.filter(function(t){return t.name===e.name})[0].index,t.name=e.name)},e.prototype.parserCellStyle=function(e,t,r,o){if(null!==e.name&&void 0!==e.name){if(!t.isGlobalStyle)return void this.applyGlobalStyle(e,t);t.name=e.name}null!==e.backColor&&void 0!==e.backColor&&(t.backColor=e.backColor),t.borders=new m,null!==e.borders&&void 0!==e.borders&&this.parserBorder(e.borders,t.borders.all),null!==e.leftBorder&&void 0!==e.leftBorder&&this.parserBorder(e.leftBorder,t.borders.left),null!==e.rightBorder&&void 0!==e.rightBorder&&this.parserBorder(e.rightBorder,t.borders.right),null!==e.topBorder&&void 0!==e.topBorder&&this.parserBorder(e.topBorder,t.borders.top),null!==e.bottomBorder&&void 0!==e.bottomBorder&&this.parserBorder(e.bottomBorder,t.borders.bottom),null!==e.fontName&&void 0!==e.fontName&&(t.fontName=e.fontName),null!==e.fontSize&&void 0!==e.fontSize&&(t.fontSize=e.fontSize),null!==e.fontColor&&void 0!==e.fontColor&&(t.fontColor=e.fontColor),null!==e.italic&&void 0!==e.italic&&(t.italic=e.italic),null!==e.bold&&void 0!==e.bold&&(t.bold=e.bold),null!==e.hAlign&&void 0!==e.hAlign&&(t.hAlign=e.hAlign.toLowerCase()),null!==e.indent&&void 0!==e.indent&&(t.indent=e.indent,"left"!==t.hAlign&&"right"!==t.hAlign&&(t.hAlign="left")),null!==e.rotation&&void 0!==e.rotation&&(t.rotation=e.rotation),null!==e.vAlign&&void 0!==e.vAlign&&(t.vAlign=e.vAlign.toLowerCase()),null!==e.underline&&void 0!==e.underline&&(t.underline=e.underline),null!==e.wrapText&&void 0!==e.wrapText&&(t.wrapText=e.wrapText),null!==e.numberFormat&&void 0!==e.numberFormat?null!==e.type&&void 0!==e.type?t.numberFormat=this.getNumberFormat(e.numberFormat,e.type):t.numberFormat=this.getNumberFormat(e.numberFormat,r):void 0!==o?(t.numFmtId=14,t.numberFormat="GENERAL"):t.numberFormat="GENERAL",t.index=this.processCellStyle(t)},e.prototype.switchNumberFormat=function(e,t){var r=this.getNumberFormat(e,t);if(r!==e){var o=this.mNumFmt.get(e);if(void 0!==o&&(o.formatCode=r,this.mNumFmt.has(r))){for(var i=0,n=this.mCellStyleXfs;i<n.length;i++){var l=n[i];l.numFmtId===o.numFmtId&&(l.numFmtId=this.mNumFmt.get(r).numFmtId)}for(var s=0,a=this.mCellXfs;s<a.length;s++){var d=a[s];d.numFmtId===o.numFmtId&&(d.numFmtId=this.mNumFmt.get(r).numFmtId)}}}},e.prototype.getNumberFormat=function(e,t){var r;switch(t){case"number":try{r=this.intl.getNumberPattern({format:e,currency:this.currency,useGrouping:!0},!0)}catch(t){r=e}break;case"datetime":try{r=this.intl.getDatePattern({skeleton:e,type:"dateTime"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"dateTime"},!0)}catch(t){r=e}}break;case"date":try{r=this.intl.getDatePattern({skeleton:e,type:"date"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"date"},!0)}catch(t){r=e}}break;case"time":try{r=this.intl.getDatePattern({skeleton:e,type:"time"},!0)}catch(t){try{r=this.intl.getDatePattern({format:e,type:"time"},!0)}catch(t){r=e}}break;default:r=e}return r},e.prototype.parserBorder=function(e,t){null!==e.color&&void 0!==e.color?t.color=e.color:t.color="#000000",null!==e.lineStyle&&void 0!==e.lineStyle?t.lineStyle=e.lineStyle:t.lineStyle="thin"},e.prototype.processCellStyle=function(e){if(e.isGlobalStyle)return this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length;var t=this.compareStyle(e);return t.result?t.index:(this.processNumFormatId(e),this.mStyles.push(e),this.mStyles.length)},e.prototype.processNumFormatId=function(e){if("GENERAL"!==e.numberFormat&&!this.mNumFmt.has(e.numberFormat)){var t=this.mNumFmt.size+164;this.mNumFmt.set(e.numberFormat,new d(t,e.numberFormat))}},e.prototype.isNewFont=function(e){for(var t=!1,r=0,o=0,i=this.mFonts;o<i.length;o++){var n=i[o];r++;var l=void 0;if(void 0!==e.fontColor&&(l="FF"+e.fontColor.replace("#","")),t=n.color===l&&n.b===e.bold&&n.i===e.italic&&n.u===e.underline&&n.name===e.fontName&&n.sz===e.fontSize)break}return r-=1,{index:r,result:t}},e.prototype.isNewBorder=function(e){var t=new o;return this.isAllBorder(e.borders)?t.borders.all.color===e.borders.all.color&&t.borders.all.lineStyle===e.borders.all.lineStyle:t.borders.left.color===e.borders.left.color&&t.borders.left.lineStyle===e.borders.left.lineStyle&&t.borders.right.color===e.borders.right.color&&t.borders.right.lineStyle===e.borders.right.lineStyle&&t.borders.top.color===e.borders.top.color&&t.borders.top.lineStyle===e.borders.top.lineStyle&&t.borders.bottom.color===e.borders.bottom.color&&t.borders.bottom.lineStyle===e.borders.bottom.lineStyle},e.prototype.isAllBorder=function(e){var t=new o;return t.borders.all.color!==e.all.color&&t.borders.all.lineStyle!==e.all.lineStyle},e.prototype.compareStyle=function(e){for(var t=!0,r=0,o=0,i=this.mStyles;o<i.length;o++){var n=i[o];if(t=!n.isGlobalStyle&&(n.backColor===e.backColor&&n.bold===e.bold&&n.numFmtId===e.numFmtId&&n.numberFormat===e.numberFormat&&n.type===e.type&&n.fontColor===e.fontColor&&n.fontName===e.fontName&&n.fontSize===e.fontSize&&n.hAlign===e.hAlign&&n.italic===e.italic&&n.underline===e.underline&&n.vAlign===e.vAlign&&n.indent===e.indent&&n.rotation===e.rotation&&n.wrapText===e.wrapText&&n.borders.all.color===e.borders.all.color&&n.borders.all.lineStyle===e.borders.all.lineStyle&&n.borders.left.color===e.borders.left.color&&n.borders.left.lineStyle===e.borders.left.lineStyle&&n.borders.right.color===e.borders.right.color&&n.borders.right.lineStyle===e.borders.right.lineStyle&&n.borders.top.color===e.borders.top.color&&n.borders.top.lineStyle===e.borders.top.lineStyle&&n.borders.bottom.color===e.borders.bottom.color&&n.borders.bottom.lineStyle===e.borders.bottom.lineStyle)){r=n.index;break}}return{index:r,result:t}},e.prototype.contains=function(e,t){var r=e.indexOf(t);return r>-1&&r<e.length},e.prototype.getCellValueType=function(e){return e instanceof Date?"datetime":"boolean"==typeof e?"boolean":"number"==typeof e?"number":"string"},e.prototype.parseCellType=function(e){var t,r=e.type,o=e.value;switch(r){case"datetime":if(o=this.toOADate(o),void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)){var i=this.globalStyles.get(e.cellStyle.name);this.switchNumberFormat(i.format,i.type)}t="n";break;case"boolean":o=o?1:0,t="b";break;case"number":t="n",void 0!==e.cellStyle&&void 0!==e.cellStyle.name&&this.globalStyles.has(e.cellStyle.name)&&this.switchNumberFormat(this.globalStyles.get(e.cellStyle.name).format,"number");break;case"string":this.sharedStringCount++,t="s";var n=this.processCellValue(o,e);this.contains(this.sharedString,n)||this.sharedString.push(n),o=this.sharedString.indexOf(n)}e.saveType=t,e.value=o},e.prototype.parserImages=function(e,t){var r=e.length;t.images=[];for(var o=0;o<r;o++){var i=this.parserImage(e[o]);t.images.push(i)}},e.prototype.parseFilters=function(e,t){if(t.autoFilters=new O,null===e.row||void 0===e.row)throw new Error("Argument Null Exception: row null or empty");if(t.autoFilters.row=e.row,null===e.lastRow||void 0===e.lastRow)throw new Error("Argument Null Exception: lastRow cannot be null or empty");if(t.autoFilters.lastRow=e.lastRow,null===e.column||void 0===e.column)throw new Error("Argument Null Exception: column cannot be null or empty");if(t.autoFilters.column=e.column,null===e.lastColumn||void 0===e.row)throw new Error("Argument Null Exception: lastColumn cannot be null or empty");t.autoFilters.lastColumn=e.lastColumn},e.prototype.parserImage=function(e){var t=new R;return null!==e.image&&void 0!==e.image&&(t.image=e.image),null!==e.row&&void 0!==e.row&&(t.row=e.row),null!==e.column&&void 0!==e.column&&(t.column=e.column),null!==e.lastRow&&void 0!==e.lastRow&&(t.lastRow=e.lastRow),null!==e.lastColumn&&void 0!==e.lastColumn&&(t.lastColumn=e.lastColumn),null!==e.width&&void 0!==e.width&&(t.width=e.width),null!==e.height&&void 0!==e.height&&(t.height=e.height),null!==e.horizontalFlip&&void 0!==e.horizontalFlip&&(t.horizontalFlip=e.horizontalFlip),null!==e.verticalFlip&&void 0!==e.verticalFlip&&(t.verticalFlip=e.verticalFlip),null!==e.rotation&&void 0!==e.rotation&&(t.rotation=e.rotation),t},e.prototype.saveAsBlob=function(e){var t=this;switch(e){case"text/csv":return new Promise(function(e,r){var o={};o.blobData=t.csvHelper.saveAsBlob(),e(o)});default:return new Promise(function(e,r){t.saveInternal(),t.mArchive.saveAsBlob().then(function(t){var r={};r.blobData=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),e(r)})})}},e.prototype.save=function(e,t){var r=this;if(null===e||void 0===e||""===e)throw new Error("Argument Null Exception: fileName cannot be null or empty");var o=e.match(".xlsx$"),i=e.match(".csv$");if(null!==o&&o[0]==="."+this.mSaveType)this.saveInternal(),this.mArchive.save(e).then(function(){r.mArchive.destroy()});else{if(null===i||i[0]!=="."+this.mSaveType)throw Error("Save type and file extension is different.");this.csvHelper.save(e)}},e.prototype.saveInternal=function(){this.saveWorkbook(),this.saveWorksheets(),this.saveSharedString(),this.saveStyles(),this.saveApp(this.builtInProperties),this.saveCore(this.builtInProperties),this.saveContentType(),this.saveTopLevelRelation(),this.saveWorkbookRelation()},e.prototype.saveWorkbook=function(){for(var e='<?xml version="1.0" encoding="utf-8"?><workbook xmlns:r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns= "http://schemas.openxmlformats.org/spreadsheetml/2006/main"><workbookPr codeName="ThisWorkbook" defaultThemeVersion= "153222"/><bookViews><workbookView activeTab="0"/></bookViews>',t="<sheets>",r=this.worksheets.length,o=0;o<r;o++)t+='<sheet name="'+this.worksheets[o].name+'" sheetId="'+(o+1).toString()+'" r:id ="rId'+(o+1).toString()+'" />';if(t+="</sheets>",e+=t,this.printTitles.size>0){var i="<definedNames>";this.printTitles.forEach(function(e,t){i+='<definedName name="_xlnm.Print_Titles" localSheetId="'+t+'">'+e+"</definedName>"}),e+=i+="</definedNames>"}this.addToArchive(e+"</workbook>","xl/workbook.xml")},e.prototype.saveWorksheets=function(){for(var e=this.worksheets.length,t=0;t<e;t++)this.saveWorksheet(this.worksheets[t],t)},e.prototype.saveWorksheet=function(e,t){var o=new A,i='<?xml version="1.0" encoding="utf-8" standalone="yes"?><worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';if(e.isSummaryRowBelow?i+="<sheetPr />":i+='<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>',i+=this.saveSheetView(e),void 0!==e.columns){for(var n="<cols>",l=0,s=e.columns;l<s.length;l++){var a=s[l];void 0!==a.width?n+='<col min="'+a.index+'" max="'+a.index+'" width="'+this.pixelsToColumnWidth(a.width)+'" customWidth="1" />':n+='<col min="'+a.index+'" max="'+a.index+'" width="8.43" customWidth="1" />'}i+=n+"</cols>"}if(i+="<sheetData>",o.append(i),i="",void 0!==e.rows)for(var d=0,h=e.rows;d<h.length;d++){var m=h[d],p='<row r="'+m.index+'" ';r.isNullOrUndefined(m.spans)||(p+='spans="'+m.spans+'" '),void 0!==m.height&&(p+='ht="'+this.pixelsToRowHeight(m.height)+'" customHeight="1" '),void 0!==m.grouping&&(m.grouping.isHidden&&(p+='hidden="1" '),void 0!==m.grouping.outlineLevel&&(p+='outlineLevel="'+m.grouping.outlineLevel+'" '),m.grouping.isCollapsed&&(p+='collapsed="1" ')),p+=">";for(var u=0,c=m.cells;u<c.length;u++){var f=c[u];void 0===f||void 0===f.value&&void 0===f.cellStyle||(p+='<c r="'+f.refName+'" ',void 0!==f.saveType&&(p+='t="'+f.saveType+'" '),void 0!==f.styleIndex&&(p+='s="'+f.styleIndex+'" '),p+=" >",void 0!==f.formula&&(p+="<f>"+f.formula+"</f>"),void 0!==f.value?p+="<v>"+f.value+"</v></c>":p+="</c>")}p+="</row>",o.append(p)}if(i+="</sheetData>",null!==e.autoFilters&&void 0!==e.autoFilters&&(i+='<autoFilter ref="'+this.getCellName(e.autoFilters.row,e.autoFilters.column)+":"+this.getCellName(e.autoFilters.lastRow,e.autoFilters.lastColumn)+'"/>'),e.mergeCells.length>0){i+='<mergeCells count="'+e.mergeCells.length+'">';for(var v=0,g=e.mergeCells;v<g.length;v++)i+='<mergeCell ref="'+g[v].ref+'" />';i+="</mergeCells>"}if(e.hyperLinks.length>0){i+="<hyperlinks>";for(var y=0,x=e.hyperLinks;y<x.length;y++){var w=x[y];i+='<hyperlink ref="'+w.ref+'" r:id="rId'+w.rId+'" />'}i+="</hyperlinks>"}i+='<pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5" /><headerFooter scaleWithDoc="1" alignWithMargins="0" differentFirst="0" differentOddEven="0" />',void 0!=e.images&&e.images.length>0&&(this.drawingCount++,this.saveDrawings(e,e.index),i+='<drawing r:id="rId'+(e.hyperLinks.length+1)+'"/>'),this.addToArchive(this.saveSheetRelations(e),"xl/worksheets/_rels/sheet"+e.index+".xml.rels"),o.append(i+"</worksheet>"),this.addToArchive(o.getBlob(),"xl/worksheets/sheet"+(t+1)+".xml")},e.prototype.saveDrawings=function(e,t){var r=new A,o='<xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">';if(void 0!==e.images){for(var i=0,n=0,l=e.images;n<l.length;n++){var s=l[n];void 0!==s.height&&void 0!==s.width?(this.updatelastRowOffset(e,s),this.updatelastColumnOffSet(e,s)):void 0!==s.lastRow&&void 0!==s.lastColumn&&(s.lastRowOffset=0,s.lastColOffset=0),i++,o+='<xdr:twoCellAnchor editAs="oneCell">',o+="<xdr:from><xdr:col>",o+=s.column-1,o+="</xdr:col><xdr:colOff>",o+=0,o+="</xdr:colOff><xdr:row>",o+=s.row-1,o+="</xdr:row><xdr:rowOff>",o+=0,o+="</xdr:rowOff></xdr:from>",o+="<xdr:to><xdr:col>",o+=s.lastColumn,o+="</xdr:col><xdr:colOff>",o+=s.lastColOffset,o+="</xdr:colOff><xdr:row>",o+=s.lastRow,o+="</xdr:row><xdr:rowOff>",o+=s.lastRowOffset,o+="</xdr:rowOff></xdr:to>",o+="<xdr:pic>",o+="<xdr:nvPicPr>",o+='<xdr:cNvPr id="'+i+'" name="Picture '+i+'"> </xdr:cNvPr>',o+='<xdr:cNvPicPr><a:picLocks noChangeAspect="1"/></xdr:cNvPicPr> </xdr:nvPicPr>',o+="<xdr:blipFill>",o+='<a:blip xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:embed="rId'+i+'" cstate="print">',o+="</a:blip><a:stretch><a:fillRect /></a:stretch></xdr:blipFill>",o+="<xdr:spPr>",o+="<a:xfrm",void 0!=s.rotation&&s.rotation<=3600&&s.rotation>=-3600&&(o+=' rot="'+6e4*s.rotation+'"'),void 0!=s.verticalFlip&&0!=s.verticalFlip&&(o+=' flipV="1"'),void 0!=s.horizontalFlip&&0!=s.horizontalFlip&&(o+=' flipH="1"'),o+="/>",o+='<a:prstGeom prst="rect"><a:avLst /></a:prstGeom></xdr:spPr>',o+="</xdr:pic><xdr:clientData /></xdr:twoCellAnchor>";var a=this.convertBase64toImage(s.image);this.imageCount+=1,this.addToArchive(a,"xl/media/image"+this.imageCount+".png")}r.append(o),r.append("</xdr:wsDr>"),this.saveDrawingRelations(e),this.addToArchive(r.getBlob(),"xl/drawings/drawing"+this.drawingCount+".xml")}},e.prototype.updatelastRowOffset=function(e,t){for(var r=t.height,o=t.row,i=0;r>=0;){var n=0,l=(n=void 0!==e.rows&&void 0!==e.rows[o-1]?this.convertToPixels(void 0===e.rows[o-1].height?15:e.rows[o-1].height):this.convertToPixels(15))-i*n/256;if(l>r){t.lastRow=o,t.lastRowOffset=i+256*r/n;var s=0;s=void 0!==e.rows&&void 0!==e.rows[o-1]?this.convertToPixels(void 0===e.rows[o-1].height?15:e.rows[o-1].height):this.convertToPixels(15),t.lastRowOffset=s*t.lastRowOffset/256,t.lastRowOffset=Math.round(t.lastRowOffset/this.unitsProportions[7]);break}r-=l,o++,i=0}},e.prototype.updatelastColumnOffSet=function(e,t){for(var r=t.width,o=t.column,i=0;r>=0;){var n=0,l=(n=void 0!==e.columns&&void 0!==e.columns[o-1]?this.ColumnWidthToPixels(void 0===e.columns[o-1].width?8.43:e.columns[o-1].width):this.ColumnWidthToPixels(8.43))-i*n/1024;if(l>r){t.lastColumn=o,t.lastColOffset=i+1024*r/n;var s=0;s=void 0!==e.columns&&void 0!==e.columns[o-1]?this.ColumnWidthToPixels(void 0===e.columns[o-1].width?8.43:e.columns[o].width):this.ColumnWidthToPixels(8.43),t.lastColOffset=s*t.lastColOffset/1024,t.lastColOffset=Math.round(t.lastColOffset/this.unitsProportions[7]);break}r-=l,o++,i=0}},e.prototype.convertToPixels=function(e){return e*this.unitsProportions[6]},e.prototype.convertBase64toImage=function(e){for(var t=window.atob(e),r=new ArrayBuffer(t.length),o=new Uint8Array(r),i=0;i<t.length;i++)o[i]=t.charCodeAt(i);return new Blob([o],{type:"image/png"})},e.prototype.saveDrawingRelations=function(e){for(var t='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',r=e.images.length,o=this.imageCount-e.images.length,i=1;i<=r;i++)t+='<Relationship Id="rId'+i+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image'+ ++o+'.png" />';this.addToArchive(t+"</Relationships>","xl/drawings/_rels/drawing"+this.drawingCount+".xml.rels")},e.prototype.pixelsToColumnWidth=function(e){var t=e>12?this.trunc((e-5)/7*100+.5)/100:e/12;return t>1?(7*t+5)/7*256/256:12*t/7*256/256},e.prototype.ColumnWidthToPixels=function(e){var t=e>1?(7*e+5)/7*256/256:12*e/7*256/256;return this.trunc((256*t+this.trunc(128/7))/256*7)},e.prototype.trunc=function(e){var t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t},e.prototype.pixelsToRowHeight=function(e){return e*this.unitsProportions[5]/this.unitsProportions[6]},e.prototype.saveSheetRelations=function(e){for(var t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',r=0,o=e.hyperLinks;r<o.length;r++){var i=o[r];t+='<Relationship Id="rId'+i.rId+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+i.target+'" TargetMode="External" />'}return void 0!=e.images&&e.images.length>0&&(t+='<Relationship Id="rId'+(e.hyperLinks.length+1)+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing" Target="../drawings/drawing'+this.drawingCount+'.xml" />'),t+="</Relationships>"},e.prototype.saveSheetView=function(e){var t='<sheetViews><sheetView workbookViewId="0" ';return!0===e.enableRtl&&(t+='rightToLeft="1"'),!1===e.showGridLines?t+='showGridLines="0" >':t+=">",void 0!==e.freezePanes&&(t+='<pane state="frozen" topLeftCell="'+e.freezePanes.leftCell+'" ',0!==e.freezePanes.row&&(t+='ySplit="'+e.freezePanes.row+'" '),0!==e.freezePanes.column&&(t+='xSplit="'+e.freezePanes.column+'" '),t+="/>"),t+="</sheetView></sheetViews > "},e.prototype.saveSharedString=function(){var e=this.sharedString.length;if(e>0){for(var t='<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="'+e+'" count="'+this.sharedStringCount+'" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">',r="",o=0;o<e;o++)0!==this.sharedString[o].indexOf("<r>")?(r+="<si><t>",r+=this.processString(this.sharedString[o]),r+="</t></si>"):(r+="<si>",r+=this.sharedString[o],r+="</si>");r+="</sst>",this.addToArchive(t+r,"xl/sharedStrings.xml")}},e.prototype.processString=function(e){return-1!==e.indexOf("&")&&(e=e.replace(/&/g,"&")),-1!==e.indexOf("<")&&(e=e.replace(/</g,"<")),-1!==e.indexOf(">")&&(e=e.replace(/>/g,">")),e},e.prototype.saveStyles=function(){this.updateCellXfsStyleXfs();var e='<?xml version="1.0" encoding="utf-8"?><styleSheet xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';e+=this.saveNumberFormats(),e+=this.saveFonts(),e+=this.saveFills(),e+=this.saveBorders(),e+=this.saveCellStyleXfs(),e+=this.saveCellXfs(),e+=this.saveCellStyles(),this.addToArchive(e+"</styleSheet>","xl/styles.xml")},e.prototype.updateCellXfsStyleXfs=function(){for(var e=0,t=this.mStyles;e<t.length;e++){var r=t[e],o=void 0;r.isGlobalStyle?(o=new s).xfId=r.index-1:(o=new n).xfId=0;var a=this.isNewFont(r);if(a.result)o.fontId=a.index;else{var h=new i;h.b=r.bold,h.i=r.italic,h.name=r.fontName,h.sz=r.fontSize,h.u=r.underline,h.color="FF"+r.fontColor.replace("#",""),this.mFonts.push(h),o.fontId=this.mFonts.length-1}if("none"!==r.backColor){var m="FF"+r.backColor.replace("#","");if(this.mFills.has(m)){p=this.mFills.get(m);o.fillId=p}else{var p=this.mFills.size+2;this.mFills.set(m,p),o.fillId=p}}else o.fillId=0;if(this.isNewBorder(r)?o.borderId=0:(this.mBorders.push(r.borders),o.borderId=this.mBorders.length),"GENERAL"!==r.numberFormat)if(this.mNumFmt.has(r.numberFormat)){var u=this.mNumFmt.get(r.numberFormat);o.numFmtId=u.numFmtId}else{var c=this.mNumFmt.size+164;this.mNumFmt.set(r.numberFormat,new d(c,r.numberFormat)),o.numFmtId=c}else"GENERAL"===r.numberFormat&&14===r.numFmtId?o.numFmtId=14:o.numFmtId=0;r.isGlobalStyle||(o.applyAlignment=1),o.alignment=new l,o.alignment.indent=r.indent,o.alignment.horizontal=r.hAlign,o.alignment.vertical=r.vAlign,o.alignment.wrapText=r.wrapText?1:0,o.alignment.rotation=r.rotation,r.isGlobalStyle?(this.mCellStyleXfs.push(o),this.mCellXfs.push(o)):this.mCellXfs.push(o)}},e.prototype.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var e='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(t,r){e+='<numFmt numFmtId="'+t.numFmtId+'" formatCode="'+t.formatCode.replace(/"/g,""")+'" />'}),e+="</numFmts>"}return""},e.prototype.saveFonts=function(){var e='<fonts count="'+this.mFonts.length+'">';if(this.mFonts.length>=1)for(var t=0,r=this.mFonts;t<r.length;t++){var o=r[t];e+="<font>",o.b&&(e+="<b />"),o.i&&(e+="<i />"),o.u&&(e+="<u />"),e+='<sz val="'+o.sz+'" />',e+='<color rgb="'+o.color+'" />',e+='<name val="'+o.name+'" /></font>'}return e+"</fonts>"},e.prototype.saveFills=function(){var e='<fills count="'+(this.mFills.size+2)+'"><fill><patternFill patternType="none"></patternFill></fill><fill><patternFill patternType="gray125"></patternFill></fill>';return this.mFills.size>=1&&this.mFills.forEach(function(t,r){e+='<fill><patternFill patternType="solid"><fgColor rgb="'+r+'" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>'}),e+"</fills>"},e.prototype.saveBorders=function(){var e='<borders count="'+(this.mBorders.length+1)+'"><border><left /><right /><top /><bottom /><diagonal /></border>';if(this.mBorders.length>=1)for(var t=0,r=this.mBorders;t<r.length;t++){var o=r[t];if(this.isAllBorder(o)){var i=o.all.color.replace("#",""),n=o.all.lineStyle;e+='<border><left style="'+n+'"><color rgb="FF'+i+'" /></left><right style="'+n+'"><color rgb="FF'+i+'" /></right><top style="'+n+'"><color rgb="FF'+i+'" /></top><bottom style="'+n+'"><color rgb="FF'+i+'" /></bottom></border>'}else e+='<border><left style="'+o.left.lineStyle+'"><color rgb="FF'+o.left.color.replace("#","")+'" /></left><right style="'+o.right.lineStyle+'"><color rgb="FF'+o.right.color.replace("#","")+'" /></right><top style="'+o.top.lineStyle+'"><color rgb="FF'+o.top.color.replace("#","")+'" /></top><bottom style="'+o.bottom.lineStyle+'"><color rgb="FF'+o.bottom.color.replace("#","")+'" /></bottom></border>'}return e+"</borders>"},e.prototype.saveCellStyles=function(){var e=this,t='<cellStyles count="'+this.cellStyles.size+'">';return this.cellStyles.forEach(function(r,o){t+='<cellStyle name="'+o+'" xfId="'+e.cellStyles.get(o).xfId+'"',"Normal"===o&&(t+=' builtinId="0"'),t+=" />"}),t+="</cellStyles>"},e.prototype.saveCellStyleXfs=function(){var e='<cellStyleXfs count="'+(this.mCellStyleXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';if(this.mCellStyleXfs.length>=1)for(var t=0,r=this.mCellStyleXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" ',void 0!==o.alignment?e+=">"+this.saveAlignment(o)+"</xf>":e+=" />"}return e+"</cellStyleXfs>"},e.prototype.saveCellXfs=function(){var e='<cellXfs count="'+(this.mCellXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';if(this.mCellXfs.length>=1)for(var t=0,r=this.mCellXfs;t<r.length;t++){var o=r[t];e+='<xf numFmtId="'+o.numFmtId+'" fontId="'+o.fontId+'" fillId="'+o.fillId+'" borderId="'+o.borderId+'" xfId="'+o.xfId+'" ',1===o.applyAlignment&&(e+='applyAlignment="1"'),e+=">"+this.saveAlignment(o)+"</xf>"}return e+"</cellXfs>"},e.prototype.saveAlignment=function(e){var t="<alignment ";return void 0!==e.alignment.horizontal&&(t+='horizontal="'+e.alignment.horizontal+'" '),void 0!==e.alignment.indent&&0!==e.alignment.indent?t+='indent="'+e.alignment.indent+'" ':void 0!==e.alignment.rotation&&0!==e.alignment.rotation&&(t+='textRotation="'+e.alignment.rotation+'" '),void 0!==e.alignment.vertical&&(t+='vertical="'+e.alignment.vertical+'" '),t+='wrapText="'+e.alignment.wrapText+'" />'},e.prototype.saveApp=function(e){var t='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Essential XlsIO</Application>';void 0!==e&&(void 0!==e.manager&&(t+="<Manager>"+e.manager+"</Manager>"),void 0!==e.company&&(t+="<Company>"+e.company+"</Company>")),this.addToArchive(t+"</Properties>","docProps/app.xml")},e.prototype.saveCore=function(e){var t=new Date,r='<?xml version="1.0" encoding="utf-8" standalone="yes"?><cp:coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">';void 0!==this.builtInProperties?(void 0!==e.author&&(r+="<dc:creator>"+e.author+"</dc:creator>"),void 0!==e.subject&&(r+="<dc:subject>"+e.subject+"</dc:subject>"),void 0!==e.category&&(r+="<cp:category>"+e.category+"</cp:category>"),void 0!==e.comments&&(r+="<dc:description>"+e.comments+"</dc:description>"),void 0!==e.title&&(r+="<dc:title>"+e.title+"</dc:title>"),void 0!==e.tags&&(r+="<cp:keywords>"+e.tags+"</cp:keywords>"),void 0!==e.status&&(r+="<cp:contentStatus>"+e.status+"</cp:contentStatus>"),void 0!==e.createdDate?r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.createdDate.toISOString()+"</dcterms:created>":r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",void 0!==e.modifiedDate?r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.modifiedDate.toISOString()+"</dcterms:modified>":r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"):(r+='<dcterms:created xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:created>",r+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+t.toISOString()+"</dcterms:modified>"),r+="</cp:coreProperties>",this.addToArchive(r,"docProps/core.xml")},e.prototype.saveTopLevelRelation=function(){this.addToArchive('<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" /><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" /><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /></Relationships>',"_rels/.rels")},e.prototype.saveWorkbookRelation=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',t=this.worksheets.length,r=0,o=0;o<t;o++,r++)e+='<Relationship Id="rId'+(o+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(o+1).toString()+'.xml" />';e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(e+='<Relationship Id="rId'+(++r).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />'),this.addToArchive(e+"</Relationships>","xl/_rels/workbook.xml.rels")},e.prototype.saveContentType=function(){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />',t="",r=this.worksheets.length,o=0;o<r;o++)t+='<Override PartName="/xl/worksheets/sheet'+(o+1).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />',void 0!=this.worksheets[o].images&&this.worksheets[o].images.length>0&&(t+='<Override PartName="/xl/drawings/drawing'+(o+1).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.drawing+xml" />');this.imageCount>0&&(t+='<Default Extension="png" ContentType="image/png" />'),this.sharedStringCount>0&&(e+='<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />'),this.addToArchive(e+t+"</Types>","[Content_Types].xml")},e.prototype.addToArchive=function(e,r){if("string"==typeof e){var o=new Blob([e],{type:"text/plain"}),i=new t.ZipArchiveItem(o,r);this.mArchive.addItem(i)}else{i=new t.ZipArchiveItem(e,r);this.mArchive.addItem(i)}},e.prototype.processMergeCells=function(e,t,r){if(0!==e.rowSpan||0!==e.colSpan){var o=new k;o.x=e.index,o.width=e.colSpan,o.y=t,o.height=e.rowSpan;var i=this.getCellName(o.y,o.x),n=this.getCellName(t+o.height,e.index+o.width);o.ref=i+":"+n;r.add(o);var l={x:o.x,y:o.y},s={x:e.index+o.width,y:t+o.height};this.updatedMergedCellStyles(l,s,e)}return r},e.prototype.updatedMergedCellStyles=function(e,t,r){for(var o=e.x;o<=t.x;o++)for(var i=e.y;i<=t.y;i++)this.mergedCellsStyle.set(this.getCellName(i,o),{x:o,y:i,styleIndex:r.styleIndex})},e.prototype.dateToTicks=function(e,t,r){var o=[0,31,59,90,120,151,181,212,243,273,304,334,365],i=[0,31,60,91,121,152,182,213,244,274,305,335,366];if(e>=1&&e<=9999&&t>=1&&t<=12){var n=e-1;return 864e9*(365*n+(n/4|0)-(n/100|0)+(n/400|0)+(this.isLeapYear(e)?i:o)[t-1]+r-1)}throw new Error("Not a valid date")},e.prototype.timeToTicks=function(e,t,r){if(e>=0&&e<24&&t>=0&&t<60&&r>=0&&r<60)return 1e4*(3600*e+60*t+r)*1e3;throw new Error("Not valid time")},e.prototype.isLeapYear=function(e){return e%4==0&&(e%100!=0||e%400==0)},e.prototype.toOADate=function(e){var t=0;if(0===(t=this.dateToTicks(e.getFullYear(),e.getMonth()+1,e.getDate())+this.timeToTicks(e.getHours(),e.getMinutes(),e.getSeconds())))return 0;if(t<31241376e9)throw new Error("Arg_OleAutDateInvalid");return(t-599264352e9)/1e4/864e5},e}(),D=function(){function e(){}return e}();return e.CellStyle=o,e.Font=i,e.CellXfs=n,e.Alignment=l,e.CellStyleXfs=s,e.CellStyles=a,e.NumFmt=d,e.Border=h,e.Borders=m,e.Cell=u,e.Cells=c,e.Column=f,e.Row=g,e.Rows=y,e.Workbook=B,e.BuiltInProperties=D,e.Worksheet=F,e.HyperLink=S,e.Grouping=C,e.FreezePane=I,e.MergeCell=k,e.MergeCells=T,e.Worksheets=w,e.CsvHelper=N,e.ValueFormatter=P,e.BlobHelper=A,e}({},ej.compression,ej.base),this.ejs=ej;
- /*!
- * filename: ej2-pdf-export.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.pdfexport=function(t,e,i){"use strict";function r(t){return"[object String]"===Object.prototype.toString.call(t)?"$s"+t:"$o"+t.toString()}var n=function(){function t(t){this.table={},this.nElements=0,this.toStr=t||r}return t.prototype.getValue=function(t){var e=this.table["$"+this.toStr(t)];if(void 0!==e)return e.value},t.prototype.setValue=function(t,e){var i="$"+this.toStr(t);this.table[i];this.nElements++,this.table[i]={key:t,value:e}},t.prototype.remove=function(t){var e="$"+this.toStr(t),i=this.table[e];return delete this.table[e],this.nElements--,i.value},t.prototype.keys=function(){for(var t=[],e=Object.keys(this.table),i=0;i<e.length;i++){var r=this.table[e[i]];t.push(r.key)}return t},t.prototype.values=function(){for(var t=[],e=Object.keys(this.table),i=0;i<e.length;i++){var r=this.table[e[i]];t.push(r.value)}return t},t.prototype.containsKey=function(t){return!(void 0===this.getValue(t))},t.prototype.clear=function(){this.table={},this.nElements=0},t.prototype.size=function(){return this.nElements},t}(),o=function(){function t(t){this.stringStartMark="/",this.internalValue="",this.isSaving6=!1,this.position6=-1,this.internalValue=this.normalizeValue(t)}return Object.defineProperty(t.prototype,"status",{get:function(){return this.status6},set:function(t){this.status6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving6},set:function(t){this.isSaving6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index6},set:function(t){this.index6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position6},set:function(t){this.position6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.internalValue},set:function(t){var e=t;null!==t&&t.length>0?(e=t,this.internalValue=this.normalizeValue(e)):this.internalValue=e},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.toString())},t.prototype.toString=function(){return this.stringStartMark+this.escapeString(this.value)},t.prototype.clone=function(e){var i=new t;return i.value=this.internalValue,i},t.prototype.escapeString=function(e){for(var i="",r=0,n=e.length;r<n;r++){var o=e[r];t.delimiters.indexOf(o);i+=o}return i},t.prototype.normalizeValue=function(t,e){return t},t.delimiters="()<>[]{}/%}",t.replacements=[" ","\t","\n","\r"],t}(),s=function(){function t(){this.forTest="test",this.forTest=t.obj}return t.obj="obj",t.endObj="endobj",t.r="R",t.whiteSpace=" ",t.slash="/",t.newLine="\r\n",t.stream="stream",t.endStream="endstream",t.xref="xref",t.f="f",t.n="n",t.trailer="trailer",t.startxref="startxref",t.eof="%%EOF",t.header="%PDF-1.5",t.beginText="BT",t.endText="ET",t.beginPath="m",t.appendLineSegment="l",t.stroke="S",t.fill="f",t.fillEvenOdd="f*",t.fillStroke="B",t.fillStrokeEvenOdd="B*",t.appendbeziercurve="c",t.appendRectangle="re",t.saveState="q",t.restoreState="Q",t.paintXObject="Do",t.modifyCtm="cm",t.modifyTM="Tm",t.setLineWidth="w",t.setLineCapStyle="J",t.setLineJoinStyle="j",t.setDashPattern="d",t.setFlatnessTolerance="i",t.closePath="h",t.closeStrokePath="s",t.closeFillStrokePath="b",t.setCharacterSpace="Tc",t.setWordSpace="Tw",t.setHorizontalScaling="Tz",t.setTextLeading="TL",t.setFont="Tf",t.setRenderingMode="Tr",t.setTextRise="Ts",t.setTextScaling="Tz",t.setCoords="Td",t.goToNextLine="T*",t.setText="Tj",t.setTextWithFormatting="TJ",t.setTextOnNewLine="'",t.selectcolorspaceforstroking="CS",t.selectcolorspacefornonstroking="cs",t.setrbgcolorforstroking="RG",t.setrbgcolorfornonstroking="rg",t.setcmykcolorforstroking="K",t.setcmykcolorfornonstroking="k",t.setgraycolorforstroking="G",t.setgraycolorfornonstroking="g",t.clipPath="W",t.clipPathEvenOdd="W*",t.endPath="n",t.setGraphicsState="gs",t.comment="%",t.evenOdd="*",t.setMiterLimit="M",t.setColorAndPattern="scn",t.setColorAndPatternStroking="SCN",t}(),a=function(){function t(){this.pages="Pages",this.kids="Kids",this.count="Count",this.resources="Resources",this.type="Type",this.size="Size",this.mediaBox="MediaBox",this.parent="Parent",this.root="Root",this.decodeParms="DecodeParms",this.filter="Filter",this.font="Font",this.type1="Type1",this.baseFont="BaseFont",this.encoding="Encoding",this.subtype="Subtype",this.contents="Contents",this.procset="ProcSet",this.colorSpace="ColorSpace",this.extGState="ExtGState",this.pattern="Pattern",this.xObject="XObject",this.length="Length",this.width="Width",this.height="Height",this.bitsPerComponent="BitsPerComponent",this.image="Image",this.dctdecode="DCTDecode",this.columns="Columns",this.blackIs1="BlackIs1",this.k="K",this.s="S",this.predictor="Predictor",this.deviceRgb="DeviceRGB",this.next="Next",this.action="Action",this.link="Link",this.a="A",this.annot="Annot",this.p="P",this.c="C",this.rect="Rect",this.uri="URI",this.annots="Annots",this.ca="ca",this.CA="CA",this.xyz="XYZ",this.fit="Fit",this.dest="Dest",this.BM="BM",this.flatedecode="FlateDecode",this.rotate="Rotate",this.bBox="BBox",this.form="Form",this.w="W",this.cIDFontType2="CIDFontType2",this.cIDToGIDMap="CIDToGIDMap",this.identity="Identity",this.dw="DW",this.fontDescriptor="FontDescriptor",this.cIDSystemInfo="CIDSystemInfo",this.fontName="FontName",this.flags="Flags",this.fontBBox="FontBBox",this.missingWidth="MissingWidth",this.stemV="StemV",this.italicAngle="ItalicAngle",this.capHeight="CapHeight",this.ascent="Ascent",this.descent="Descent",this.leading="Leading",this.avgWidth="AvgWidth",this.fontFile2="FontFile2",this.maxWidth="MaxWidth",this.xHeight="XHeight",this.stemH="StemH",this.registry="Registry",this.ordering="Ordering",this.supplement="Supplement",this.type0="Type0",this.identityH="Identity-H",this.toUnicode="ToUnicode",this.descendantFonts="DescendantFonts",this.background="Background",this.shading="Shading",this.matrix="Matrix",this.antiAlias="AntiAlias",this.function="Function",this.extend="Extend",this.shadingType="ShadingType",this.coords="Coords",this.domain="Domain",this.range="Range",this.functionType="FunctionType",this.bitsPerSample="BitsPerSample",this.patternType="PatternType",this.paintType="PaintType",this.tilingType="TilingType",this.xStep="XStep",this.yStep="YStep"}return t}(),h=function(){function t(t){if(this.position7=-1,this.primitiveItems=new n,this.prefix="<<",this.suffix=">>",this.resources=[],this.object=null,this.archive=!0,this.isFont=!1,void 0===t)this.primitiveItems=new n,this.encrypt=!0,this.dictionaryProperties=new a;else{this.primitiveItems=new n;for(var e=t.items.keys(),i=t.items.values(),r=0;r<t.items.size();r++)this.primitiveItems.setValue(e[r],i[r]);this.status=t.status,this.freezeChanges(this),this.encrypt=!0,this.dictionaryProperties=new a}}return Object.defineProperty(t.prototype,"items",{get:function(){return this.primitiveItems},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status7},set:function(t){this.status7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving7},set:function(t){this.isSaving7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index7},set:function(t){this.index7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return this.object},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position7},set:function(t){this.position7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Count",{get:function(){return this.primitiveItems.size()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Dictionary",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.getArchive=function(){return this.archive},t.prototype.setArchive=function(t){this.archive=t},t.prototype.setEncrypt=function(t){this.encrypt=t,this.modify()},t.prototype.getEncrypt=function(){return this.encrypt},t.prototype.freezeChanges=function(t){this.bChanged=!1},t.prototype.clone=function(e){return new t},t.prototype.modify=function(){this.bChanged=!0},t.prototype.remove=function(t){"string"!=typeof t?(this.primitiveItems.remove(t.value),this.modify()):this.remove(new o(t))},t.prototype.containsKey=function(t){return this.primitiveItems.containsKey(t.toString())},t.prototype.onBeginSave=function(){this.beginSave.sender.beginSave()},t.prototype.onFontDictionaryBeginSave=function(){this.fontDictionaryBeginSave.sender.fontDictionaryBeginSave()},t.prototype.onDescendantFontBeginSave=function(){this.descendantFontBeginSave.sender.descendantFontBeginSave()},t.prototype.onTemplateBeginSave=function(){this.pageBeginDrawTemplate.sender.pageBeginSave()},t.prototype.onBeginAnnotationSave=function(){this.annotationBeginSave.sender.beginSave()},t.prototype.onSectionBeginSave=function(t){var e=this.sectionBeginSave;e.sender.beginSave(e.state,t)},t.prototype.save=function(t,e){void 0===e?this.save(t,!0):(t.write(this.prefix),void 0!==this.beginSave&&this.onBeginSave(),void 0!==this.descendantFontBeginSave&&this.onDescendantFontBeginSave(),void 0!==this.fontDictionaryBeginSave&&this.onFontDictionaryBeginSave(),void 0!==this.annotationBeginSave&&this.onBeginAnnotationSave(),void 0!==this.sectionBeginSave&&this.onSectionBeginSave(t),void 0!==this.pageBeginDrawTemplate&&this.onTemplateBeginSave(),this.Count>0&&this.saveItems(t),t.write(this.suffix),t.write(s.newLine))},t.prototype.saveItems=function(t){t.write(s.newLine);for(var e=this.primitiveItems.keys(),i=this.primitiveItems.values(),r=0;r<e.length;r++){var n=e[r];new o(n).save(t),t.write(s.whiteSpace),i[r].save(t),t.write(s.newLine)}},t}(),l=function(){function t(t){this.sender=t}return t}(),u=function(){function t(t){this.sender=t}return t}(),c=function(){function t(t){this.sender=t}return t}(),p=function(){function t(t){this.sender=t}return t}(),d=function(){function t(t,e){this.sender=t,this.state=e}return t}(),f=function(){function t(t){this.sender=t}return t}(),g=function(){function t(t){this.position5=-1,this.value=t}return Object.defineProperty(t.prototype,"intValue",{get:function(){return this.value},set:function(t){this.value=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInteger",{get:function(){return this.integer},set:function(t){this.integer=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status5},set:function(t){this.status5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving5},set:function(t){this.isSaving5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index5},set:function(t){this.index5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position5},set:function(t){this.position5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.intValue.toString())},t.prototype.clone=function(e){return new t(this.value)},t.floatToString=function(t){var e=t.toFixed(2);return"0.00"===e&&(e=".00"),e},t.min=function(t,e,i){var r=Math.min(t,e);return Math.min(i,r)},t}(),m=function(){function t(e){if(this.startMark="[",this.endMark="]",this.position9=-1,this.clonedObject9=null,this.isFont=!1,void 0===e)this.internalElements=[];else if(void 0===e||e instanceof t){var i=e;this.internalElements=[];for(n=0;n<i.elements.length;n++)this.internalElements.push(i.elements[n])}else for(var r=e,n=0;n<r.length;n++){var o=new g(r[n]);this.add(o)}}return t.prototype.items=function(t){return this.internalElements[t]},Object.defineProperty(t.prototype,"count",{get:function(){return this.internalElements.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status9},set:function(t){this.status9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving9},set:function(t){this.isSaving9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return this.clonedObject9},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position9},set:function(t){this.position9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index9},set:function(t){this.index9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CrossTable",{get:function(){return this.pdfCrossTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elements",{get:function(){return this.internalElements},enumerable:!0,configurable:!0}),t.prototype.add=function(t){void 0===this.internalElements&&(this.internalElements=[]),this.internalElements.push(t),this.markedChange()},t.prototype.markedChange=function(){this.bChanged=!0},t.prototype.contains=function(t){for(var e=0;e<this.internalElements.length;e++){var i=this.internalElements[e],r=t;if(null!=i&&void 0!==i&&null!=r&&void 0!==r&&i.value===r.value)return!0}return!1},t.prototype.getItems=function(t){return this.internalElements[t]},t.prototype.save=function(t){t.write(this.startMark);for(var e=0,i=this.count;e<i;e++)this.getItems(e).save(t),e+1!==i&&t.write(s.whiteSpace);t.write(this.endMark)},t.prototype.clone=function(e){this.clonedObject9=null;for(var i=new t,r=0;r<this.internalElements.length;r++){var n=this.internalElements[r];i.add(n.clone(e))}return i.pdfCrossTable=e,this.clonedObject9=i,i},t.fromRectangle=function(e){return new t([e.x,e.y,e.width,e.height])},t.prototype.insert=function(t,e){if(t<this.internalElements.length&&t>0){for(var i=[],r=0;r<t;r++)i.push(this.internalElements[r]);i.push(e);for(r=t;r<this.internalElements.length;r++)i.push(this.internalElements[r]);this.internalElements=i}else this.internalElements.push(e);this.markChanged()},t.prototype.indexOf=function(t){return this.internalElements.indexOf(t)},t.prototype.remove=function(t){var e=this.internalElements.indexOf(t);this.internalElements[e]=null,this.markChanged()},t.prototype.removeAt=function(t){if(this.internalElements.length>t){for(var e=[],i=0;i<t;i++)e.push(this.internalElements[i]);for(i=t+1;i<this.internalElements.length;i++)e.push(this.internalElements[i]);this.internalElements=e}this.markChanged()},t.prototype.clear=function(){this.internalElements=[],this.markChanged()},t.prototype.markChanged=function(){this.bChanged=!0},t}(),y=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),b=function(t){function i(e,i){var r=t.call(this,e)||this;return r.dicPrefix="stream",r.dicSuffix="endstream",r.clonedObject2=null,r.bCompress=!0,r.isImageStream=!1,r.isFontStream=!1,void 0!==e||void 0!==i?(r.dataStream2=[],r.dataStream2=i,r.bCompress2=!1):(r.dataStream2=[],r.bCompress2=!0),r}return y(i,t),Object.defineProperty(i.prototype,"internalStream",{get:function(){return this.dataStream2},set:function(t){this.dataStream2=[],this.dataStream2=t,this.modify()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isImage",{get:function(){return this.isImageStream},set:function(t){this.isImageStream=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFont",{get:function(){return this.isFontStream},set:function(t){this.isFontStream=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"compress",{get:function(){return this.bCompress},set:function(t){this.bCompress=t,this.modify()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"data",{get:function(){return this.dataStream2},set:function(t){this.dataStream2=[],this.dataStream2=t,this.modify()},enumerable:!0,configurable:!0}),i.prototype.clearStream=function(){this.internalStream=[],this.items.containsKey(this.dictionaryProperties.filter)&&this.remove(this.dictionaryProperties.filter),this.bCompress=!0,this.modify()},i.prototype.write=function(t){if(null==t)throw new Error("ArgumentNullException:text");if(t.length<=0)throw new Error("ArgumentException: Can not write an empty string, text");this.dataStream2.push(t),this.modify()},i.prototype.writeBytes=function(t){if(null===t)throw new Error("ArgumentNullException:data");if(t.length<=0)throw new Error("ArgumentException: Can not write an empty bytes, data");for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);this.dataStream2.push(e),this.modify()},i.prototype.onCmapBeginSave=function(){this.cmapBeginSave.sender.cmapBeginSave()},i.prototype.onFontProgramBeginSave=function(){this.fontProgramBeginSave.sender.fontProgramBeginSave()},i.prototype.compressContent=function(t,i){if(this.bCompress){for(var r=[],n=0;n<t.length;n++)r.push(t.charCodeAt(n));var o=new Uint8Array(r),s=new e.CompressedStreamWriter;s.write(o,0,o.length),s.close(),t=s.getCompressedString,this.addFilter(this.dictionaryProperties.flatedecode)}return t},i.prototype.addFilter=function(t){var e=this.items.getValue(this.dictionaryProperties.filter);e instanceof C&&(e=e.object);var i=e,r=e;null!=r&&((i=new m).insert(0,r),this.items.setValue(this.dictionaryProperties.filter,i)),r=new o(t),null==i?this.items.setValue(this.dictionaryProperties.filter,r):i.insert(0,r)},i.prototype.save=function(e){void 0!==this.cmapBeginSave&&this.onCmapBeginSave(),void 0!==this.fontProgramBeginSave&&this.onFontProgramBeginSave();for(var i="",r=0;r<this.data.length;r++)i+=this.data[r];i.length>1&&!this.isImage&&!this.isFont&&(i="q\r\n"+i+"Q\r\n");var n=(i=this.compressContent(i,e)).length;this.items.setValue(this.dictionaryProperties.length,new g(n)),t.prototype.save.call(this,e,!1),e.write(this.dicPrefix),e.write(s.newLine),i.length>0&&e.write(i),e.write(s.newLine),e.write(this.dicSuffix),e.write(s.newLine)},i.bytesToString=function(t){for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return e},i}(h),w=function(){function t(t){this.sender=t}return t}(),S=function(){function t(t){this.sender=t}return t}();!function(t){!function(t){t[t.None=0]="None",t[t.Ascii=1]="Ascii",t[t.Unicode=2]="Unicode"}(t.ForceEncoding||(t.ForceEncoding={}));var e;!function(t){t[t.StringValue=0]="StringValue",t[t.ByteBuffer=1]="ByteBuffer"}(e||(e={}))}(t.InternalEnum||(t.InternalEnum={}));var P=function(){function e(t){if(this.bHex=!1,this.position1=-1,this.clonedObject1=null,this.bDecrypted=!1,this.isParentDecrypted=!1,this.isPacked=!1,this.isFormField=!1,this.isColorSpace=!1,this.isHexString=!0,void 0===t)this.bHex=!1;else if(!(t.length>0&&"0xfeff"===t[0])){this.stringValue=t,this.data=[];for(var e=0;e<t.length;++e)this.data.push(t.charCodeAt(e))}}return Object.defineProperty(e.prototype,"hex",{get:function(){return this.bHex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.stringValue},set:function(t){this.stringValue=t,this.data=null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.status1},set:function(t){this.status1=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSaving",{get:function(){return this.isSaving1},set:function(t){this.isSaving1=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"objectCollectionIndex",{get:function(){return this.index1},set:function(t){this.index1=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clonedObject",{get:function(){return this.clonedObject1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.position1},set:function(t){this.position1=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"CrossTable",{get:function(){return this.crossTable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"converted",{get:function(){return this.bConverted},set:function(t){this.bConverted=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"encode",{get:function(){return this.bForceEncoding},set:function(t){this.bForceEncoding=t},enumerable:!0,configurable:!0}),e.bytesToHex=function(t){if(null==t)return"";return""},e.prototype.save=function(i){if(null===i)throw new Error("ArgumentNullException : writer");void 0!==this.encode&&this.encode===t.InternalEnum.ForceEncoding.Ascii?i.write(this.pdfEncode()):i.write(e.stringMark[0]+this.value+e.stringMark[1])},e.prototype.pdfEncode=function(){var i="";if(void 0!==this.encode&&this.encode===t.InternalEnum.ForceEncoding.Ascii){for(var r=this.escapeSymbols(this.value),n=0;n<r.length;n++)i+=String.fromCharCode(r[n]);i=e.stringMark[0]+i+e.stringMark[1]}else i=this.value;return i},e.prototype.escapeSymbols=function(t){for(var e=[],i=0;i<t.length;i++){var r=t.charCodeAt(i);switch(r){case 40:case 41:e.push(92),e.push(r);break;case 13:e.push(92),e.push(114);break;case 92:e.push(92),e.push(r);break;default:e.push(r)}}return e},e.prototype.clone=function(t){if(null!==this.clonedObject1&&this.clonedObject1.CrossTable===t)return this.clonedObject1;this.clonedObject1=null;var i=new e(this.stringValue);return i.bHex=this.bHex,i.crossTable=t,i.isColorSpace=this.isColorSpace,this.clonedObject1=i,i},e.toUnicodeArray=function(t,e){if(null==t)throw new Error("Argument Null Exception : value");for(var i=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);i.push(n/256>>>0),i.push(255&n)}return i},e.byteToString=function(t){if(null==t)throw new Error("Argument Null Exception : stream");for(var e="",i=0;i<t.length;++i)e+=String.fromCharCode(t[i]);return e},e.stringMark="()",e.hexStringMark="<>",e.hexFormatPattern="{0:X2}",e}(),v=function(){function t(t,e){this.index3=-1,this.position3=-1,this.objNumber=0,this.genNumber=0,"number"==typeof t&&"number"==typeof e?(this.objNumber=t,this.genNumber=e):(this.objNumber=Number(t),this.genNumber=Number(e))}return Object.defineProperty(t.prototype,"status",{get:function(){return this.status3},set:function(t){this.status3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving3},set:function(t){this.isSaving3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index3},set:function(t){this.index3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position3},set:function(t){this.position3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.toString())},t.prototype.toString=function(){return this.objNumber.toString()+" "+this.genNumber.toString()+" R"},t.prototype.clone=function(t){return null},t}(),C=function(){function t(t,e){this.index4=-1,this.position4=-1,this.objectIndex=-1,this.dictionaryProperties=new a,this.initialize(t)}return Object.defineProperty(t.prototype,"status",{get:function(){return this.status4},set:function(t){this.status4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving4},set:function(t){this.isSaving4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index4},set:function(t){this.index4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position4},set:function(t){this.position4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"object",{get:function(){return this.primitiveObject},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reference",{get:function(){return this.pdfReference},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.objectIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.primitiveObject},enumerable:!0,configurable:!0}),t.prototype.initialize=function(t){if(t instanceof m||t instanceof h||t instanceof o||t instanceof g||t instanceof b||t instanceof v||t instanceof P)this.primitiveObject=t;else{var e=t;this.initialize(e.element)}},t.prototype.save=function(t){t.position;var e=t.document.crossTable;this.object.isSaving=!0;e.getReference(this.object).save(t)},t.prototype.clone=function(t){return null},t}(),B=function(){function t(){this.action=null,this.dictionaryProperties=new a,this.initialize()}return Object.defineProperty(t.prototype,"next",{get:function(){return this.action},set:function(t){this.action=t,this.dictionary.items.setValue(this.dictionaryProperties.next,new C(this.action))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return void 0===this.pdfDictionary&&(this.pdfDictionary=new h),this.pdfDictionary},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.dictionary.items.setValue(this.dictionaryProperties.type,new o(this.dictionaryProperties.action))},Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),O=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),x=function(t){function e(e){var i=t.call(this)||this;return i.uniformResourceIdentifier="",i}return O(e,t),Object.defineProperty(e.prototype,"uri",{get:function(){return this.uniformResourceIdentifier},set:function(t){this.uniformResourceIdentifier=t,this.dictionary.items.setValue(this.dictionaryProperties.uri,new P(this.uniformResourceIdentifier))},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.s,new o(this.dictionaryProperties.uri))},e}(B);!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right"}(t.PdfHorizontalAlignment||(t.PdfHorizontalAlignment={})),function(t){t[t.Top=0]="Top",t[t.Middle=1]="Middle",t[t.Bottom=2]="Bottom"}(t.PdfVerticalAlignment||(t.PdfVerticalAlignment={})),function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Justify=3]="Justify"}(t.PdfTextAlignment||(t.PdfTextAlignment={})),function(t){t[t.Fill=0]="Fill",t[t.Stroke=1]="Stroke",t[t.FillStroke=2]="FillStroke",t[t.None=3]="None",t[t.ClipFlag=4]="ClipFlag",t[t.ClipFill=4]="ClipFill",t[t.ClipStroke=5]="ClipStroke",t[t.ClipFillStroke=6]="ClipFillStroke",t[t.Clip=7]="Clip"}(t.TextRenderingMode||(t.TextRenderingMode={})),function(t){t[t.Miter=0]="Miter",t[t.Round=1]="Round",t[t.Bevel=2]="Bevel"}(t.PdfLineJoin||(t.PdfLineJoin={})),function(t){t[t.Flat=0]="Flat",t[t.Round=1]="Round",t[t.Square=2]="Square"}(t.PdfLineCap||(t.PdfLineCap={})),function(t){t[t.Solid=0]="Solid",t[t.Dash=1]="Dash",t[t.Dot=2]="Dot",t[t.DashDot=3]="DashDot",t[t.DashDotDot=4]="DashDotDot",t[t.Custom=5]="Custom"}(t.PdfDashStyle||(t.PdfDashStyle={})),function(t){t[t.Winding=0]="Winding",t[t.Alternate=1]="Alternate"}(t.PdfFillMode||(t.PdfFillMode={})),function(t){t[t.Rgb=0]="Rgb",t[t.Cmyk=1]="Cmyk",t[t.GrayScale=2]="GrayScale",t[t.Indexed=3]="Indexed"}(t.PdfColorSpace||(t.PdfColorSpace={})),function(t){t[t.Normal=0]="Normal",t[t.Multiply=1]="Multiply",t[t.Screen=2]="Screen",t[t.Overlay=3]="Overlay",t[t.Darken=4]="Darken",t[t.Lighten=5]="Lighten",t[t.ColorDodge=6]="ColorDodge",t[t.ColorBurn=7]="ColorBurn",t[t.HardLight=8]="HardLight",t[t.SoftLight=9]="SoftLight",t[t.Difference=10]="Difference",t[t.Exclusion=11]="Exclusion",t[t.Hue=12]="Hue",t[t.Saturation=13]="Saturation",t[t.Color=14]="Color",t[t.Luminosity=15]="Luminosity"}(t.PdfBlendMode||(t.PdfBlendMode={})),function(t){t[t.Centimeter=0]="Centimeter",t[t.Pica=1]="Pica",t[t.Pixel=2]="Pixel",t[t.Point=3]="Point",t[t.Inch=4]="Inch",t[t.Document=5]="Document",t[t.Millimeter=6]="Millimeter"}(t.PdfGraphicsUnit||(t.PdfGraphicsUnit={})),function(t){t[t.Fit=0]="Fit",t[t.Center=1]="Center",t[t.Stretch=2]="Stretch",t[t.Tile=3]="Tile"}(t.PdfGridImagePosition||(t.PdfGridImagePosition={})),function(t){t[t.None=0]="None",t[t.LeftToRight=1]="LeftToRight",t[t.RightToLeft=2]="RightToLeft"}(t.PdfTextDirection||(t.PdfTextDirection={}));var L=function(){function e(t,i,r,n){void 0===t?void 0!==i&&void 0!==r&&void 0!==n?this.assignRGB(i,r,n):this.filled=!1:t instanceof e?(this.redColor=t.r,this.greenColor=t.g,this.blueColor=t.b,this.grayColor=t.gray,this.alpha=t.alpha,this.filled=0!==this.alpha):"number"==typeof t&&void 0===i&&void 0===r&&void 0===n?(t<0&&(t=0),t>1&&(t=1),this.redColor=t*e.maxColourChannelValue,this.greenColor=t*e.maxColourChannelValue,this.blueColor=t*e.maxColourChannelValue,this.cyanColor=t,this.magentaColor=t,this.yellowColor=t,this.blackColor=t,this.grayColor=t,this.alpha=e.maxColourChannelValue,this.filled=!0):void 0===n?this.assignRGB(t,i,r):this.assignRGB(i,r,n,t)}return e.prototype.assignRGB=function(t,i,r,n){void 0===t||void 0===i||void 0===r?this.filled=!1:(this.cyanColor=0,this.magentaColor=0,this.yellowColor=0,this.blackColor=0,this.grayColor=0,this.redColor=t,this.greenColor=i,this.blueColor=r,this.alpha=void 0===n?e.maxColourChannelValue:n,this.filled=!0,this.assignCMYK(t,i,r))},e.prototype.assignCMYK=function(t,i,r){var n=t/e.maxColourChannelValue,o=i/e.maxColourChannelValue,s=r/e.maxColourChannelValue,a=g.min(1-n,1-o,1-s),h=1===a?0:(1-n-a)/(1-a),l=1===a?0:(1-o-a)/(1-a),u=1===a?0:(1-s-a)/(1-a);this.blackColor=a,this.cyanColor=h,this.magentaColor=l,this.yellowColor=u},Object.defineProperty(e.prototype,"r",{get:function(){return this.redColor},set:function(t){this.redColor=t,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"red",{get:function(){return this.r/e.maxColourChannelValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"b",{get:function(){return this.blueColor},set:function(t){this.blueColor=t,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blue",{get:function(){return this.b/e.maxColourChannelValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"c",{get:function(){return this.cyanColor},set:function(t){this.cyanColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"k",{get:function(){return this.blackColor},set:function(t){this.blackColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"m",{get:function(){return this.magentaColor},set:function(t){this.magentaColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.yellowColor},set:function(t){this.yellowColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"g",{get:function(){return this.greenColor},set:function(t){this.greenColor=t,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"green",{get:function(){return this.g/e.maxColourChannelValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gray",{get:function(){return(this.redColor+this.greenColor+this.blueColor)/(3*e.maxColourChannelValue)},set:function(t){this.grayColor=t<0?0:t>1?1:t,this.r=this.grayColor*e.maxColourChannelValue,this.g=this.grayColor*e.maxColourChannelValue,this.b=this.grayColor*e.maxColourChannelValue,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return!this.filled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"a",{get:function(){return this.alpha},set:function(t){this.alpha=t<0?0:t,this.filled=!0},enumerable:!0,configurable:!0}),e.prototype.toString=function(e,i){if(this.isEmpty)return"";var r="";switch(e){case t.PdfColorSpace.Rgb:r=this.rgbToString(i);break;case t.PdfColorSpace.GrayScale:r=this.grayScaleToString(i);break;case t.PdfColorSpace.Cmyk:r=this.cmykToString(i)}return r},e.prototype.grayScaleToString=function(t){var i=this.gray,r="",n=null;return n=t?e.grayStringsSroke.containsKey(i)?e.grayStringsSroke.getValue(i):null:e.grayStringsFill.containsKey(i)?e.grayStringsFill.getValue(i):null,null==n?t&&(r=i.toString()+" G",e.grayStringsSroke.setValue(i,r)):r=n.toString(),r+s.newLine},e.prototype.rgbToString=function(t){var i=this.r,r=this.g,n=this.b,o=(i<<16)+(r<<8)+n;t&&(o+=1<<24);var a="",h=null;if(e.rgbStrings.containsKey(o)&&(h=e.rgbStrings.getValue(o)),null==h){var l=i/e.maxColourChannelValue,u=r/e.maxColourChannelValue,c=n/e.maxColourChannelValue;a=t?l.toString()+" "+u.toString()+" "+c.toString()+" RG":l.toString()+" "+u.toString()+" "+c.toString()+" rg",e.rgbStrings.setValue(o,a)}else a=h.toString();return a+s.newLine},e.prototype.cmykToString=function(t){var e=this.c,i=this.m,r=this.y,n=this.b;return e.toString()+" "+i.toString()+" "+r.toString()+" "+n.toString()+" K"+s.newLine},e.prototype.toArray=function(e){var i=new m;switch(e){case t.PdfColorSpace.Rgb:i.add(new g(this.red)),i.add(new g(this.green)),i.add(new g(this.blue))}return i},e.rgbStrings=new n,e.grayStringsSroke=new n,e.grayStringsFill=new n,e.maxColourChannelValue=255,e}(),T=function(){function t(t,e){void 0===t?(this.x=0,this.y=0):(this.x=null!==t?t:0,this.y=null!==e?e:0)}return t}(),j=function(){function t(t,e){void 0===e?(this.height=0,this.width=0):(this.height=null!==e?e:0,this.width=null!==t?t:0)}return t}(),k=function(){function t(t,e,i,r){if(typeof t==typeof t&&void 0===t)this.x=0,this.y=0,this.height=0,this.width=0;else if(t instanceof T&&e instanceof j&&void 0===i){var n=t;this.x=n.x,this.y=n.y;var o=e;this.height=o.height,this.width=o.width}else{var s=t,a=e,h=i,l=r;this.x=s,this.y=a,this.height=l,this.width=h}}return t}(),V=function(){function t(t,e,i,r){this.left=t,this.top=e,this.right=i,this.bottom=r}return Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topLeft",{get:function(){return new T(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return new j(this.width,this.height)},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.topLeft+"x"+this.size},t}(),R=function(){function t(){}return t.prototype.clone=function(){return this},t}(),N=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),A=function(e){function i(t){var i=e.call(this)||this;return i.pdfColor=t,i}return N(i,e),Object.defineProperty(i.prototype,"color",{get:function(){return this.pdfColor},set:function(t){this.pdfColor=t},enumerable:!0,configurable:!0}),i.prototype.monitorChanges=function(t,e,i,r,n){if(null==e)throw new Error("ArgumentNullException:streamWriter");var o=!1;return o=!0,e.setColorAndSpace(this.pdfColor,n,!1),o},i.prototype.resetChanges=function(e){e.setColorAndSpace(new L(0,0,0),t.PdfColorSpace.Rgb,!1)},i}(R);!function(t){t[t.Regular=0]="Regular",t[t.Bold=1]="Bold",t[t.Italic=2]="Italic",t[t.Underline=4]="Underline",t[t.Strikeout=8]="Strikeout"}(t.PdfFontStyle||(t.PdfFontStyle={})),function(t){t[t.Helvetica=0]="Helvetica",t[t.Courier=1]="Courier",t[t.TimesRoman=2]="TimesRoman",t[t.Symbol=3]="Symbol",t[t.ZapfDingbats=4]="ZapfDingbats"}(t.PdfFontFamily||(t.PdfFontFamily={})),function(t){t[t.Standard=0]="Standard",t[t.TrueType=1]="TrueType",t[t.TrueTypeEmbedded=2]="TrueTypeEmbedded"}(t.PdfFontType||(t.PdfFontType={})),function(t){t[t.None=0]="None",t[t.Word=1]="Word",t[t.WordOnly=2]="WordOnly",t[t.Character=3]="Character"}(t.PdfWordWrapType||(t.PdfWordWrapType={})),function(t){t[t.None=0]="None",t[t.SuperScript=1]="SuperScript",t[t.SubScript=2]="SubScript"}(t.PdfSubSuperScript||(t.PdfSubSuperScript={})),function(t){t[t.Unknown=0]="Unknown",t[t.StandardEncoding=1]="StandardEncoding",t[t.MacRomanEncoding=2]="MacRomanEncoding",t[t.MacExpertEncoding=3]="MacExpertEncoding",t[t.WinAnsiEncoding=4]="WinAnsiEncoding",t[t.PdfDocEncoding=5]="PdfDocEncoding",t[t.IdentityH=6]="IdentityH"}(t.FontEncoding||(t.FontEncoding={})),function(t){t[t.Apple=0]="Apple",t[t.Microsoft=4]="Microsoft",t[t.Trimmed=6]="Trimmed"}(t.TtfCmapFormat||(t.TtfCmapFormat={})),function(t){t[t.Unknown=0]="Unknown",t[t.Symbol=1]="Symbol",t[t.Unicode=2]="Unicode",t[t.Macintosh=3]="Macintosh"}(t.TtfCmapEncoding||(t.TtfCmapEncoding={})),function(t){t[t.AppleUnicode=0]="AppleUnicode",t[t.Macintosh=1]="Macintosh",t[t.Iso=2]="Iso",t[t.Microsoft=3]="Microsoft"}(t.TtfPlatformID||(t.TtfPlatformID={})),function(t){t[t.Undefined=0]="Undefined",t[t.Unicode=1]="Unicode"}(t.TtfMicrosoftEncodingID||(t.TtfMicrosoftEncodingID={})),function(t){t[t.Roman=0]="Roman",t[t.Japanese=1]="Japanese",t[t.Chinese=2]="Chinese"}(t.TtfMacintoshEncodingID||(t.TtfMacintoshEncodingID={})),function(t){t[t.FixedPitch=1]="FixedPitch",t[t.Serif=2]="Serif",t[t.Symbolic=4]="Symbolic",t[t.Script=8]="Script",t[t.Nonsymbolic=32]="Nonsymbolic",t[t.Italic=64]="Italic",t[t.ForceBold=262144]="ForceBold"}(t.FontDescriptorFlags||(t.FontDescriptorFlags={})),function(t){t[t.Arg1And2AreWords=1]="Arg1And2AreWords",t[t.ArgsAreXyValues=2]="ArgsAreXyValues",t[t.RoundXyToGrid=4]="RoundXyToGrid",t[t.WeHaveScale=8]="WeHaveScale",t[t.Reserved=16]="Reserved",t[t.MoreComponents=32]="MoreComponents",t[t.WeHaveAnXyScale=64]="WeHaveAnXyScale",t[t.WeHaveTwoByTwo=128]="WeHaveTwoByTwo",t[t.WeHaveInstructions=256]="WeHaveInstructions",t[t.UseMyMetrics=512]="UseMyMetrics"}(t.TtfCompositeGlyphFlags||(t.TtfCompositeGlyphFlags={}));var D=function(){function e(e,i){this.scalingFactor=100,this.wordWrapType=t.PdfWordWrapType.Word,this.internalLineLimit=!0,this.wordWrapType=t.PdfWordWrapType.Word,void 0!==e&&"string"!=typeof e&&(this.textAlignment=e),void 0!==i&&(this.verticalAlignment=i)}return Object.defineProperty(e.prototype,"alignment",{get:function(){return this.textAlignment},set:function(t){this.textAlignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textDirection",{get:function(){return this.direction},set:function(t){this.direction=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineAlignment",{get:function(){return void 0===this.verticalAlignment||null==this.verticalAlignment?t.PdfVerticalAlignment.Top:this.verticalAlignment},set:function(t){this.verticalAlignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightToLeft",{get:function(){return void 0!==this.isRightToLeft&&null!=this.isRightToLeft&&this.isRightToLeft},set:function(t){this.isRightToLeft=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"characterSpacing",{get:function(){return void 0===this.internalCharacterSpacing||null==this.internalCharacterSpacing?0:this.internalCharacterSpacing},set:function(t){this.internalCharacterSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wordSpacing",{get:function(){return void 0===this.internalWordSpacing||null==this.internalWordSpacing?0:this.internalWordSpacing},set:function(t){this.internalWordSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineSpacing",{get:function(){return void 0===this.leading||null==this.leading?0:this.leading},set:function(t){this.leading=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clipPath",{get:function(){return void 0!==this.clip&&null!=this.clip&&this.clip},set:function(t){this.clip=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"subSuperScript",{get:function(){return void 0===this.pdfSubSuperScript||null==this.pdfSubSuperScript?t.PdfSubSuperScript.None:this.pdfSubSuperScript},set:function(t){this.pdfSubSuperScript=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paragraphIndent",{get:function(){return void 0===this.internalParagraphIndent||null==this.internalParagraphIndent?0:this.internalParagraphIndent},set:function(t){this.internalParagraphIndent=t,this.firstLineIndent=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineLimit",{get:function(){return this.internalLineLimit},set:function(t){this.internalLineLimit=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"measureTrailingSpaces",{get:function(){return void 0!==this.trailingSpaces&&null!=this.trailingSpaces&&this.trailingSpaces},set:function(t){this.trailingSpaces=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"noClip",{get:function(){return void 0!==this.isNoClip&&null!=this.isNoClip&&this.isNoClip},set:function(t){this.isNoClip=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wordWrap",{get:function(){return this.wordWrapType},set:function(t){this.wordWrapType=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontalScalingFactor",{get:function(){return this.scalingFactor},set:function(t){if(t<=0)throw new Error("ArgumentOutOfRangeException:The scaling factor cant be less of equal to zero, ScalingFactor");this.scalingFactor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstLineIndent",{get:function(){return void 0===this.initialLineIndent||null==this.initialLineIndent?0:this.initialLineIndent},set:function(t){this.initialLineIndent=t},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return this},e}(),M=function(){function t(t){if(this.currentPosition=0,null==t)throw new Error("ArgumentNullException:text");this.text=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this.text.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.currentPosition===this.text.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.currentPosition},set:function(t){this.currentPosition=t},enumerable:!0,configurable:!0}),t.getCharsCount=function(t,e){if("string"==typeof e){if(null==t)throw new Error("ArgumentNullException:wholeText");for(var i=0,r=0;-1!==(r=t.indexOf(e,r));)i++,r++;return i}if(null==t)throw new Error("ArgumentNullException:text");if(null==e)throw new Error("ArgumentNullException:symbols");for(var n=0,o=0,s=t.length;o<s;o++){var a=t[o];this.contains(e,a)&&n++}return n},t.prototype.readLine=function(){for(var t=this.currentPosition;t<this.length;){var e=this.text[t];switch(e){case"\r":case"\n":var i=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t+1,"\r"===e&&this.currentPosition<this.length&&"\n"===this.text[this.currentPosition]&&this.currentPosition++,i}t++}if(t>this.currentPosition){var r=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t,r}return null},t.prototype.peekLine=function(){var t=this.currentPosition,e=this.readLine();return this.currentPosition=t,e},t.prototype.readWord=function(){for(var t=this.currentPosition;t<this.length;){var e=this.text[t];switch(e){case"\r":case"\n":var i=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t+1,"\r"===e&&this.currentPosition<this.length&&"\n"===this.text[this.currentPosition]&&this.currentPosition++,i;case" ":case"\t":t===this.currentPosition&&t++;var r=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t,r}t++}if(t>this.currentPosition){var n=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t,n}return null},t.prototype.peekWord=function(){var t=this.currentPosition,e=this.readWord();return this.currentPosition=t,e},t.prototype.read=function(t){if(void 0===t){var e="0";return this.end||(e=this.text[this.currentPosition],this.currentPosition++),e}for(var i=0,r="";!this.end&&i<t;)r+=e=this.read(),i++;return r},t.prototype.peek=function(){var t="0";return this.end||(t=this.text[this.currentPosition]),t},t.prototype.close=function(){this.text=null},t.prototype.readToEnd=function(){var t;return t=0===this.currentPosition?this.text:this.text.substr(this.length,this.currentPosition),this.currentPosition=this.length,t},t.contains=function(t,e){for(var i=!1,r=0;r<t.length;r++)if(t[r]===e){i=!0;break}return i},t.whiteSpace=" ",t.tab="\t",t.spaces=[t.whiteSpace,t.tab],t.whiteSpacePattern="^[ \t]+$",t}(),I=function(){function e(){this.isOverloadWithPosition=!1}return e.prototype.layout=function(t,e,i,r,n,o,s){if(r instanceof k){this.initialize(t,e,i,r,n),this.isOverloadWithPosition=o,this.clientSize=s;a=this.doLayout();return this.clear(),a}this.initialize(t,e,i,r),this.isOverloadWithPosition=n,this.clientSize=o;var a=this.doLayout();return this.clear(),a},e.prototype.initialize=function(t,e,i,r,n){if("number"==typeof n){if(null==t)throw new Error("ArgumentNullException:text");if(null==e)throw new Error("ArgumentNullException:font");this.text=t,this.font=e,this.format=i,this.size=new j(r.width,r.height),this.rectangle=r,this.pageHeight=n,this.reader=new M(t)}else this.initialize(t,e,i,new k(new T(0,0),r),0)},e.prototype.clear=function(){this.font=null,this.format=null,this.reader.close(),this.reader=null,this.text=null},e.prototype.doLayout=function(){for(var t=new F,e=new F,i=[],r=this.reader.peekLine(),n=this.getLineIndent(!0);null!=r;){if(null!==(e=this.layoutLine(r,n))||void 0!==e){var o=0,s=this.copyToResult(t,e,i,o),a=s.success;if(o=s.numInserted,!a){this.reader.read(o);break}}this.reader.readLine(),r=this.reader.peekLine(),n=this.getLineIndent(!1)}return this.finalizeResult(t,i),t},e.prototype.getLineIndent=function(t){var e=0;return null!=this.format&&(e=t?this.format.firstLineIndent:this.format.paragraphIndent,e=this.size.width>0?Math.min(this.size.width,e):e),e},e.prototype.getLineHeight=function(){var t=this.font.height;return null!=this.format&&0!==this.format.lineSpacing&&(t=this.format.lineSpacing+this.font.height),t},e.prototype.getLineWidth=function(t){return this.font.getLineWidth(t,this.format)},e.prototype.layoutLine=function(e,i){var r=new F;r.layoutLineHeight=this.getLineHeight();var n=[],o=this.size.width,s=this.getLineWidth(e)+i,a=t.LineType.FirstParagraphLine,h=!0;if(o<=0||Math.round(s)<=Math.round(o))this.addToLineResult(r,n,e,s,t.LineType.NewLineBreak|a);else{var l="",u="";s=i;var c=i,p=new M(e),d=p.peekWord();for(d.length!==p.length&&" "===d&&(u+=d,l+=d,p.position+=1,d=p.peekWord());null!=d;){u+=d;var f=this.getLineWidth(u.toString())+c;if(" "===u.toString()&&(u="",f=0),f>o){if(this.getWrapType()===t.PdfWordWrapType.None)break;if(u.length===d.length){if(this.getWrapType()===t.PdfWordWrapType.WordOnly){r.textRemainder=e.substring(p.position);break}if(1===u.length){l+=d;break}h=!1,u="",d=p.peek().toString();continue}this.getLineWidth(d.toString())>o?this.format.wordWrap=t.PdfWordWrapType.Character:void 0!==this.format&&null!==this.format&&(this.format.wordWrap=t.PdfWordWrapType.Word),this.getWrapType()===t.PdfWordWrapType.Character&&h?(h=!1,u="",u+=l.toString(),d=p.peek().toString()):(" "!==(g=l.toString())&&this.addToLineResult(r,n,g,s,t.LineType.LayoutBreak|a),this.isOverloadWithPosition&&(o=this.clientSize.width),u="",l="",s=0,c=0,f=0,a=t.LineType.None,d=h?d:p.peekWord(),h=!0)}else l+=d,s=f,h?(p.readWord(),d=p.peekWord()):(p.read(),d=p.peek().toString())}if(l.length>0){var g=l.toString();this.addToLineResult(r,n,g,s,t.LineType.NewLineBreak|t.LineType.LastParagraphLine)}p.close()}r.layoutLines=[];for(var m=0;m<n.length;m++)r.layoutLines.push(n[m]);return n=[],r},e.prototype.addToLineResult=function(t,e,i,r,n){var o=new E;o.text=i,o.width=r,o.lineType=n,e.push(o);var s=t.actualSize;s.height+=this.getLineHeight(),s.width=Math.max(s.width,r),t.size=s},e.prototype.copyToResult=function(t,e,i,r){var n=!0,o=null!=this.format&&!this.format.lineLimit,s=t.actualSize.height,a=this.size.height;if(this.pageHeight>0&&a+this.rectangle.y>this.pageHeight&&(a=this.rectangle.y-this.pageHeight,a=Math.max(a,-a)),r=0,null!=e.lines)for(var h=0,l=e.lines.length;h<l;h++){var u=s+e.lineHeight;if(!(u<=a||a<=0||o)){n=!1;break}var c=e.lines[h];r+=c.text.length,c=this.trimLine(c,0===i.length),i.push(c);var p=t.actualSize;p.width=Math.max(p.width,c.width),t.size=p,s=u}if(s!=t.size.height){var d=t.actualSize;d.height=s,t.size=d}return{success:n,numInserted:r}},e.prototype.finalizeResult=function(t,e){t.layoutLines=[];for(var i=0;i<e.length;i++)t.layoutLines.push(e[i]);t.layoutLineHeight=this.getLineHeight(),this.reader.end||(t.textRemainder=this.reader.readToEnd()),e=[]},e.prototype.trimLine=function(e,i){var r=e.text,n=e.width;e.lineType,t.LineType.FirstParagraphLine,null==this.format||this.format.rightToLeft;return(r=r.trim()).length!==e.text.length&&(n=this.getLineWidth(r),(e.lineType&t.LineType.FirstParagraphLine)>0&&(n+=this.getLineIndent(i))),e.text=r,e.width=n,e},e.prototype.getWrapType=function(){return null!=this.format?this.format.wordWrap:t.PdfWordWrapType.Word},e}(),F=function(){function t(){}return Object.defineProperty(t.prototype,"remainder",{get:function(){return this.textRemainder},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actualSize",{get:function(){return void 0===this.size&&(this.size=new j(0,0)),this.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lines",{get:function(){return this.layoutLines},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this.layoutLineHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return null==this.layoutLines||0===this.layoutLines.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.empty?0:this.layoutLines.length},enumerable:!0,configurable:!0}),t}(),E=function(){function t(){}return Object.defineProperty(t.prototype,"lineType",{get:function(){return this.type},set:function(t){this.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this.content},set:function(t){this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.lineWidth},set:function(t){this.lineWidth=t},enumerable:!0,configurable:!0}),t}();!function(t){t[t.None=0]="None",t[t.NewLineBreak=1]="NewLineBreak",t[t.LayoutBreak=2]="LayoutBreak",t[t.FirstParagraphLine=4]="FirstParagraphLine",t[t.LastParagraphLine=8]="LastParagraphLine"}(t.LineType||(t.LineType={}));var G=function(){function e(e,i){this.fontStyle=t.PdfFontStyle.Regular,"number"==typeof e&&void 0===i?this.fontSize=e:(this.fontSize=e,this.setStyle(i))}return Object.defineProperty(e.prototype,"name",{get:function(){return this.metrics.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.fontSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.metrics.getHeight(null)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this.fontStyle},set:function(t){this.fontStyle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bold",{get:function(){return(this.style&t.PdfFontStyle.Bold)>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"italic",{get:function(){return(this.style&t.PdfFontStyle.Italic)>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strikeout",{get:function(){return(this.style&t.PdfFontStyle.Strikeout)>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"underline",{get:function(){return(this.style&t.PdfFontStyle.Underline)>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metrics",{get:function(){return this.fontMetrics},set:function(t){this.fontMetrics=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.pdfFontInternals},enumerable:!0,configurable:!0}),e.prototype.measureString=function(t,e,i,r,n){if("string"==typeof t&&void 0===e)return this.measureString(t,null);if("string"==typeof t&&(e instanceof D||null==e)&&void 0===i&&void 0===r){a=e;return this.measureString(t,a,0,0)}if("string"==typeof t&&(e instanceof D||null==e)&&"number"==typeof i&&"number"==typeof r){a=e;return this.measureString(t,0,a,i,r)}if("string"==typeof t&&"number"==typeof e&&(i instanceof D||null==i)&&"number"==typeof r&&"number"==typeof n){var o=new j(e,0),s=i;return this.measureString(t,o,s,r,n)}if(null==t)throw Error('ArgumentNullException("text")');var a=e,s=i,h=(new I).layout(t,this,s,a,!1,new j(0,0));return r=t.length,n=h.empty?0:h.lines.length,h.actualSize},e.prototype.equalsTo=function(t){return this.equalsToFont(t)},e.prototype.getInternals=function(){return this.pdfFontInternals},e.prototype.setInternals=function(t){if(null==t)throw new Error("ArgumentNullException:internals");this.pdfFontInternals=t},e.prototype.setStyle=function(t){this.fontStyle=t},e.prototype.applyFormatSettings=function(t,e,i){var r=i;if(null!=e&&i>0&&(0!==e.characterSpacing&&(r+=(t.length-1)*e.characterSpacing),0!==e.wordSpacing)){var n=M.spaces;r+=M.getCharsCount(t,n)*e.wordSpacing}return r},e.charSizeMultiplier=.001,e.syncObject=new Object,e}(),z=function(){function t(t){this.streamWriter=t}return Object.defineProperty(t.prototype,"document",{get:function(){return this.pdfDocument},set:function(t){this.pdfDocument=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.streamWriter.buffer.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.streamWriter.buffer.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stream",{get:function(){return this.streamWriter},enumerable:!0,configurable:!0}),t.prototype.write=function(t){var e=t;this.streamWriter.write(e)},t}();!function(t){t[t.None=0]="None",t[t.Registered=1]="Registered"}(t.ObjectStatus||(t.ObjectStatus={}));var W=function(){function e(){this.objectCollections=[],this.mainObjectCollection=new n,this.primitiveObjectCollection=new n}return Object.defineProperty(e.prototype,"count",{get:function(){return this.objectCollections.length},enumerable:!0,configurable:!0}),e.prototype.items=function(t){return this.objectCollections[t]},Object.defineProperty(e.prototype,"outIsNew",{get:function(){return this.isNew},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var i=new H(e);this.objectCollections.push(i),this.primitiveObjectCollection.containsKey(e)||this.primitiveObjectCollection.setValue(e,this.objectCollections.length-1),e.position=this.index=this.objectCollections.length-1,e.status=t.ObjectStatus.Registered},e.prototype.lookFor=function(t){var e=-1;if(-1!==t.position)return t.position;if(this.primitiveObjectCollection.containsKey(t)&&this.count===this.primitiveObjectCollection.size())e=this.primitiveObjectCollection.getValue(t);else for(var i=this.count-1;i>=0;i--)if(this.objectCollections[i].object===t){e=i;break}return e},e.prototype.getReference=function(t,e){this.index=this.lookFor(t);return this.isNew=!1,{reference:this.objectCollections[this.index].reference,wasNew:e}},e.prototype.trySetReference=function(t,e,i){return!0,this.index=this.lookFor(t),this.objectCollections[this.index].setReference(e),!0},e.prototype.destroy=function(){for(var t=0,e=this.objectCollections;t<e.length;t++){var i=e[t];void 0!==i&&(i.pdfObject.position=-1,i.pdfObject.isSaving=void 0,i.pdfObject.objectCollectionIndex=void 0,i.pdfObject.position=void 0)}this.objectCollections=[],this.mainObjectCollection=new n,this.primitiveObjectCollection=new n},e}(),H=function(){function t(t,e){this.pdfObject=t,this.pdfReference=e}return Object.defineProperty(t.prototype,"object",{get:function(){return this.pdfObject},set:function(t){this.pdfObject=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reference",{get:function(){return this.pdfReference},enumerable:!0,configurable:!0}),t.prototype.setReference=function(t){this.pdfReference=t},t}(),_=function(){function t(t){this.isStreamCopied=!1,t instanceof Ce&&(this.document=t)}return Object.defineProperty(t.prototype,"pdfObjects",{get:function(){return this.objects},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"crossTable",{get:function(){return this.pdfCrossTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentSavingObj",{get:function(){return this.currentSavingObject},set:function(t){this.currentSavingObject=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"catalog",{get:function(){return this.pdfCatalog},set:function(t){this.pdfCatalog=t},enumerable:!0,configurable:!0}),t.prototype.setMainObjectCollection=function(t){this.objects=t},t.prototype.setCrossTable=function(t){this.pdfCrossTable=t},t.prototype.setCatalog=function(t){this.pdfCatalog=t},t.prototype.save=function(t){var e=this,r=new i.Encoding(!0),n=new i.StreamWriter(r);if(void 0===t){var o=new i.Encoding(!0),s=new i.StreamWriter(o);return new Promise(function(t,i){var r={};r.blobData=new Blob([e.document.docSave(s,!0)],{type:"application/pdf"}),t(r)})}this.document.docSave(n,t,!0)},t.prototype.clone=function(){return this.document},t}();!function(t){t[t.Free=0]="Free",t[t.Normal=1]="Normal",t[t.Packed=2]="Packed"}(t.ObjectType||(t.ObjectType={}));var K=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),U=function(t){function e(){var e=t.call(this)||this;return e.sections=null,e.tempDictionaryProperties=new a,e.items.setValue((new a).type,new o("Catalog")),e}return K(e,t),Object.defineProperty(e.prototype,"pages",{get:function(){return this.sections},set:function(t){t.element;this.sections=t,this.items.setValue(this.tempDictionaryProperties.pages,new C(t))},enumerable:!0,configurable:!0}),e}(h),q=function(){function e(){this.objects=new n,this.maxGenNumIndex=0,this.objectCount=0,this.dictionaryProperties=new a}return Object.defineProperty(e.prototype,"isMerging",{get:function(){return this.merging},set:function(t){this.merging=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trailer",{get:function(){return null==this.internalTrailer&&(this.internalTrailer=new b),this.internalTrailer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"document",{get:function(){return this.pdfDocument},set:function(t){this.pdfDocument=t,this.items=this.pdfDocument.pdfObjects},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pdfObjects",{get:function(){return this.items},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"objectCollection",{get:function(){return this.pdfDocument.pdfObjects},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this.objectCount},set:function(t){this.objectCount=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextObjNumber",{get:function(){return this.count=this.count+1,this.count},enumerable:!0,configurable:!0}),e.prototype.save=function(t,e){this.saveHead(t),this.mappedReferences=null,this.objects.clear(),this.markTrailerReferences(),this.saveObjects(t);var i=this.count,r=t.position;this.registerObject(0,new v(0,-1),!0);t.write(s.xref),t.write(s.newLine),this.saveSections(t),this.saveTrailer(t,this.count,0),this.saveTheEndess(t,r),this.count=i;for(var n=0;n<this.objectCollection.count;++n)this.objectCollection.items(n).object.isSaving=!1;if(void 0===e)return t.stream.buffer;t.stream.save(e)},e.prototype.saveTheEndess=function(t,e){t.write(s.newLine+s.startxref+s.newLine),t.write(e.toString()+s.newLine),t.write(s.eof+s.newLine)},e.prototype.saveTrailer=function(t,e,i){t.write(s.trailer+s.newLine);var r=this.trailer;r.items.setValue(this.dictionaryProperties.size,new g(this.objectCount+1)),(r=new h(r)).setEncrypt(!1),r.save(t)},e.prototype.saveSections=function(t){var e=0,i=0;do{i=this.prepareSubsection(e),this.saveSubsection(t,e,i),e+=i}while(0!==i)},e.prototype.saveSubsection=function(e,i,r){if(!(r<=0||i>=this.count)){e.write(i+" "+(r+1)+s.newLine);for(var n=i;n<=i+r;++n){var o=this.objects.getValue(n),a="";a=o.type===t.ObjectType.Free?this.getItem(o.offset,65535,!0):this.getItem(o.offset,o.generation,!1),e.write(a)}}},e.prototype.getItem=function(t,e,i){var r="",n=10-t.toString().length;e<=0&&(e=0);for(var o=5-e.toString().length<=0?0:5-e.toString().length,a=0;a<n;a++)r+="0";r=r+t.toString()+" ";for(a=0;a<o;a++)r+="0";return r=r+e.toString()+" ",r=r+(i?s.f:s.n)+s.newLine},e.prototype.prepareSubsection=function(t){for(var e,i=0,r=this.count,n=0;n<this.document.pdfObjects.count;n++)this.document.pdfObjects.items(n).reference.toString().split(" ");if(t>=r)return i;for(e=t;e<r;++e)break;for(t=e;e<r;++e)++i;return i},e.prototype.markTrailerReferences=function(){this.trailer.items.keys(),this.trailer.items.values()},e.prototype.saveHead=function(t){var e=this.generateFileVersion(t.document);t.write("%PDF-"+e),t.write(s.newLine)},e.prototype.generateFileVersion=function(t){return"1."+4..toString()},e.prototype.getReference=function(t,e){if(void 0===e){return this.getReference(t,!1)}return this.getSubReference(t,e)},e.prototype.getSubReference=function(e,i){var r,n=!1,o=null;if(this.items.count>0&&e.objectCollectionIndex>0&&this.items.count>e.objectCollectionIndex-1){var s=this.document.pdfObjects.getReference(e,r);o=s.reference,r=s.wasNew}if(r=null==o&&e.status!==t.ObjectStatus.Registered,null==o){var a=this.nextObjNumber;o=new v(a,0);if(r){this.document.pdfObjects.add(e),this.document.pdfObjects.trySetReference(e,o,void 0);var h=this.document.pdfObjects.count-1,l=this.document.pdfObjects.objectCollections[h].reference.objNumber,u=this.document.pdfObjects.objectCollections[this.document.pdfObjects.count-1];this.document.pdfObjects.mainObjectCollection.setValue(l,u),e.position=-1}else this.document.pdfObjects.trySetReference(e,o,void 0);e.objectCollectionIndex=o.objNumber,e.status=t.ObjectStatus.None,n=!0}return n||this.bForceNew,o},e.prototype.saveObjects=function(t){for(var e=this.objectCollection,i=0;i<e.count;++i){var r=e.items(i).object;r.isSaving=!0,this.saveIndirectObject(r,t)}},e.prototype.saveIndirectObject=function(t,e){var i=this.getReference(t);t instanceof U&&this.trailer.items.setValue(this.dictionaryProperties.root,i),this.pdfDocument.currentSavingObj=i;t.getArchive(),this.registerObject(e.position,i),this.doSaveObject(t,i,e)},e.prototype.doSaveObject=function(t,e,i){i.length;i.write(e.objNumber.toString()),i.write(s.whiteSpace),i.write(e.genNumber.toString()),i.write(s.whiteSpace),i.write(s.obj),i.write(s.newLine),t.save(i);i.stream;i.write(s.endObj),i.write(s.newLine)},e.prototype.registerObject=function(t,e,i){"boolean"==typeof i?(this.objects.setValue(e.objNumber,new Y(t,e,i)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber)):void 0===i&&(this.objects.setValue(e.objNumber,new Y(t,e)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber))},e.dereference=function(t){var e=t;return null!=e&&(t=e.object),t},e}(),Y=function(){function e(e,i,r){var n=e;this.offsetNumber=n;var o=i;this.generation=o.genNumber,this.object=o.objNumber,this.type=void 0===r?t.ObjectType.Normal:t.ObjectType.Free}return Object.defineProperty(e.prototype,"objectNumber",{get:function(){return this.object},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offset",{get:function(){return this.offsetNumber},enumerable:!0,configurable:!0}),e}(),X=function(){function t(){}return t.letter=new j(612,792),t.note=new j(540,720),t.legal=new j(612,1008),t.a0=new j(2380,3368),t.a1=new j(1684,2380),t.a2=new j(1190,1684),t.a3=new j(842,1190),t.a4=new j(595,842),t.a5=new j(421,595),t.a6=new j(297,421),t.a7=new j(210,297),t.a8=new j(148,210),t.a9=new j(105,148),t.a10=new j(74,105),t.b0=new j(2836,4008),t.b1=new j(2004,2836),t.b2=new j(1418,2004),t.b3=new j(1002,1418),t.b4=new j(709,1002),t.b5=new j(501,709),t.archE=new j(2592,3456),t.archD=new j(1728,2592),t.archC=new j(1296,1728),t.archB=new j(864,1296),t.archA=new j(648,864),t.flsa=new j(612,936),t.halfLetter=new j(396,612),t.letter11x17=new j(792,1224),t.ledger=new j(1224,792),t}();!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}(t.PdfPageOrientation||(t.PdfPageOrientation={})),function(t){t[t.RotateAngle0=0]="RotateAngle0",t[t.RotateAngle90=1]="RotateAngle90",t[t.RotateAngle180=2]="RotateAngle180",t[t.RotateAngle270=3]="RotateAngle270"}(t.PdfPageRotateAngle||(t.PdfPageRotateAngle={})),function(t){t[t.None=0]="None",t[t.Numeric=1]="Numeric",t[t.LowerLatin=2]="LowerLatin",t[t.LowerRoman=3]="LowerRoman",t[t.UpperLatin=4]="UpperLatin",t[t.UpperRoman=5]="UpperRoman"}(t.PdfNumberStyle||(t.PdfNumberStyle={})),function(t){t[t.None=0]="None",t[t.Bottom=1]="Bottom",t[t.Top=2]="Top",t[t.Left=3]="Left",t[t.Right=4]="Right",t[t.Fill=5]="Fill"}(t.PdfDockStyle||(t.PdfDockStyle={})),function(t){t[t.None=0]="None",t[t.TopLeft=1]="TopLeft",t[t.TopCenter=2]="TopCenter",t[t.TopRight=3]="TopRight",t[t.MiddleLeft=4]="MiddleLeft",t[t.MiddleCenter=5]="MiddleCenter",t[t.MiddleRight=6]="MiddleRight",t[t.BottomLeft=7]="BottomLeft",t[t.BottomCenter=8]="BottomCenter",t[t.BottomRight=9]="BottomRight"}(t.PdfAlignmentStyle||(t.PdfAlignmentStyle={})),function(t){t[t.None=0]="None",t[t.Top=1]="Top",t[t.Bottom=2]="Bottom",t[t.Left=3]="Left",t[t.Right=4]="Right"}(t.TemplateType||(t.TemplateType={}));var J=function(){function t(){this.pdfMargin=40,this.setMargins(this.pdfMargin)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftMargin},set:function(t){this.leftMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topMargin},set:function(t){this.topMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightMargin},set:function(t){this.rightMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomMargin},set:function(t){this.bottomMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"all",{set:function(t){this.setMargins(t)},enumerable:!0,configurable:!0}),t.prototype.setMargins=function(t,e,i,r){void 0===e?this.leftMargin=this.topMargin=this.rightMargin=this.bottomMargin=t:void 0===i?(this.leftMargin=this.rightMargin=t,this.bottomMargin=this.topMargin=e):(this.leftMargin=t,this.topMargin=e,this.rightMargin=i,this.bottomMargin=r)},t.prototype.clone=function(){return this},t}(),Z=function(){function e(e){this.pageMargins=new J,this.pageSize=X.a4,this.rotateAngle=t.PdfPageRotateAngle.RotateAngle0,this.pageOrientation=t.PdfPageOrientation.Portrait,this.pageOrigin=new T(0,0),this.isRotation=!1,"number"==typeof e&&this.pageMargins.setMargins(e)}return Object.defineProperty(e.prototype,"size",{get:function(){return this.pageSize},set:function(t){this.setSize(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this.pageOrientation},set:function(t){this.pageOrientation!==t&&(this.pageOrientation=t,this.updateSize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"margins",{get:function(){return this.pageMargins},set:function(t){this.pageMargins=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.pageSize.width},set:function(t){this.pageSize.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.pageSize.height},set:function(t){this.pageSize.height=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"origin",{get:function(){return this.pageOrigin},set:function(t){this.pageOrigin=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this.rotateAngle},set:function(t){this.rotateAngle=t,this.isRotation=!0},enumerable:!0,configurable:!0}),e.prototype.updateSize=function(e){var i=Math.min(this.pageSize.width,this.pageSize.height),r=Math.max(this.pageSize.width,this.pageSize.height);switch(e){case t.PdfPageOrientation.Portrait:this.pageSize=new j(i,r);break;case t.PdfPageOrientation.Landscape:this.pageSize=new j(r,i)}},e.prototype.clone=function(){var t=this;return t.pageMargins=this.pageMargins.clone(),t},e.prototype.getActualSize=function(){var t=this.width-(this.margins.left+this.margins.right),e=this.height-(this.margins.top+this.margins.bottom);return new j(t,e)},e.prototype.setSize=function(e){var i=Math.min(e.width,e.height),r=Math.max(e.width,e.height);this.orientation===t.PdfPageOrientation.Portrait?this.pageSize=new j(i,r):this.pageSize=new j(r,i)},e}(),$=function(){function t(t){if(null==t)throw new Error("ArgumentNullException:stream");this.stream=t}return t.prototype.clear=function(){this.stream.clearStream()},t.prototype.setGraphicsState=function(t){t instanceof o?(this.stream.write(t.toString()),this.stream.write(s.whiteSpace),this.writeOperator(s.setGraphicsState)):(this.stream.write(s.slash),this.stream.write(t),this.stream.write(s.whiteSpace),this.writeOperator(s.setGraphicsState))},t.prototype.executeObject=function(t){this.stream.write(t.toString()),this.stream.write(s.whiteSpace),this.writeOperator(s.paintXObject),this.stream.write(s.newLine)},t.prototype.closePath=function(){this.writeOperator(s.closePath)},t.prototype.clipPath=function(t){this.stream.write(s.clipPath),t&&this.stream.write(s.evenOdd),this.stream.write(s.whiteSpace),this.stream.write(s.endPath),this.stream.write(s.newLine)},t.prototype.closeFillStrokePath=function(t){this.stream.write(s.closeFillStrokePath),t?(this.stream.write(s.evenOdd),this.stream.write(s.newLine)):this.stream.write(s.newLine)},t.prototype.fillStrokePath=function(t){this.stream.write(s.fillStroke),t?(this.stream.write(s.evenOdd),this.stream.write(s.newLine)):this.stream.write(s.newLine)},t.prototype.fillPath=function(t){this.stream.write(s.fill),t?(this.stream.write(s.evenOdd),this.stream.write(s.newLine)):this.stream.write(s.newLine)},t.prototype.endPath=function(){this.writeOperator(s.n)},t.prototype.closeFillPath=function(t){this.writeOperator(s.closePath),this.stream.write(s.fill),t?(this.stream.write(s.evenOdd),this.stream.write(s.newLine)):this.stream.write(s.newLine)},t.prototype.closeStrokePath=function(){this.writeOperator(s.closeStrokePath)},t.prototype.setTextScaling=function(t){this.stream.write(g.floatToString(t)),this.stream.write(s.whiteSpace),this.writeOperator(s.setTextScaling)},t.prototype.strokePath=function(){this.writeOperator(s.stroke)},t.prototype.restoreGraphicsState=function(){this.writeOperator(s.restoreState)},t.prototype.saveGraphicsState=function(){this.writeOperator(s.saveState)},t.prototype.startNextLine=function(t,e){void 0===t?this.writeOperator(s.goToNextLine):t instanceof T?(this.writePoint(t),this.writeOperator(s.setCoords)):(this.writePoint(t,e),this.writeOperator(s.setCoords))},t.prototype.showText=function(t){this.checkTextParam(t),this.writeText(t),this.writeOperator(s.setText)},t.prototype.setLeading=function(t){this.stream.write(g.floatToString(t)),this.stream.write(s.whiteSpace),this.writeOperator(s.setTextLeading)},t.prototype.beginPath=function(t,e){this.writePoint(t,e),this.writeOperator(s.beginPath)},t.prototype.beginText=function(){this.writeOperator(s.beginText)},t.prototype.endText=function(){this.writeOperator(s.endText)},t.prototype.appendRectangle=function(t,e,i,r){t instanceof k?this.appendRectangle(t.x,t.y,t.width,t.height):(this.writePoint(t,e),this.writePoint(i,r),this.writeOperator(s.appendRectangle))},t.prototype.appendLineSegment=function(t,e){t instanceof T?this.appendLineSegment(t.x,t.y):(this.writePoint(t,e),this.writeOperator(s.appendLineSegment))},t.prototype.setTextRenderingMode=function(t){this.stream.write(t.toString()),this.stream.write(s.whiteSpace),this.writeOperator(s.setRenderingMode)},t.prototype.setCharacterSpacing=function(t){this.stream.write(g.floatToString(t)),this.stream.write(s.whiteSpace),this.stream.write(s.setCharacterSpace),this.stream.write(s.newLine)},t.prototype.setWordSpacing=function(t){this.stream.write(g.floatToString(t)),this.stream.write(s.whiteSpace),this.writeOperator(s.setWordSpace)},t.prototype.showNextLineText=function(t,e){t instanceof P?(this.checkTextParam(t),this.writeText(t),this.writeOperator(s.setTextOnNewLine)):(this.checkTextParam(t),this.writeText(t,e),this.writeOperator(s.setTextOnNewLine))},t.prototype.setColorSpace=function(t,e){if(t instanceof o&&"boolean"==typeof e){var i=t,r=(n=e)?s.selectcolorspaceforstroking:s.selectcolorspacefornonstroking;this.stream.write(i.toString()),this.stream.write(s.whiteSpace),this.stream.write(r),this.stream.write(s.newLine)}else{var i=t,n=e;this.setColorSpace(new o(i),n)}},t.prototype.modifyCtm=function(t){if(null==t)throw new Error("ArgumentNullException:matrix");this.stream.write(t.toString()),this.stream.write(s.whiteSpace),this.writeOperator(s.modifyCtm)},t.prototype.setFont=function(t,e,i){if("string"==typeof e)this.setFont(t,new o(e),i);else{if(null==t)throw new Error("ArgumentNullException:font");this.stream.write(e.toString()),this.stream.write(s.whiteSpace),this.stream.write(g.floatToString(i)),this.stream.write(s.whiteSpace),this.writeOperator(s.setFont)}},t.prototype.writeOperator=function(t){this.stream.write(t),this.stream.write(s.newLine)},t.prototype.checkTextParam=function(t){if(null==t)throw new Error("ArgumentNullException:text");if("string"==typeof t&&""===t)throw new Error("ArgumentException:The text can not be an empty string, text")},t.prototype.writeText=function(t,e){if(t instanceof P&&void 0===e)this.stream.write(t.pdfEncode());else{var i=void 0,r=void 0;e?(i=P.hexStringMark[0],r=P.hexStringMark[1]):(i=P.stringMark[0],r=P.stringMark[1]),this.stream.write(i),this.stream.write(t),this.stream.write(r)}},t.prototype.writePoint=function(t,e){if(t instanceof T&&void 0===e)this.writePoint(t.x,t.y);else{var i=t;this.stream.write(g.floatToString(i)),this.stream.write(s.whiteSpace),e=this.updateY(e),this.stream.write(g.floatToString(e)),this.stream.write(s.whiteSpace)}},t.prototype.updateY=function(t){return-t},t.prototype.write=function(t){var e="";e+=t,e+=s.newLine,this.writeOperator(e)},t.prototype.writeComment=function(t){if(!(null!=t&&t.length>0))throw new Error("Invalid comment");var e="";e+=s.comment,e+=s.whiteSpace,e+=t,this.writeOperator(e)},t.prototype.setColorAndSpace=function(t,e,i){t.isEmpty||(this.stream.write(t.toString(e,i)),this.stream.write(s.newLine))},t.prototype.setLineDashPattern=function(t,e){this.setLineDashPatternHelper(t,e)},t.prototype.setLineDashPatternHelper=function(t,e){var i="[";if(t.length>1)for(var r=0;r<t.length;r++)r===t.length-1?i+=t[r].toString():i+=t[r].toString()+" ";i+="] ",i+=e.toString(),i+=" "+s.setDashPattern,this.stream.write(i),this.stream.write(s.newLine)},t.prototype.setMiterLimit=function(t){this.stream.write(g.floatToString(t)),this.stream.write(s.whiteSpace),this.writeOperator(s.setMiterLimit)},t.prototype.setLineWidth=function(t){this.stream.write(g.floatToString(t)),this.stream.write(s.whiteSpace),this.writeOperator(s.setLineWidth)},t.prototype.setLineCap=function(t){this.stream.write(t.toString()),this.stream.write(s.whiteSpace),this.writeOperator(s.setLineCapStyle)},t.prototype.setLineJoin=function(t){this.stream.write(t.toString()),this.stream.write(s.whiteSpace),this.writeOperator(s.setLineJoinStyle)},Object.defineProperty(t.prototype,"position",{get:function(){return this.stream.position},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){var t=0;if(0!==this.stream.data.length&&-1!==this.stream.data.length)for(var e=0;e<this.stream.data.length;e++)t+=this.stream.data[e].length;return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.appendBezierSegment=function(t,e,i,r,n,o){t instanceof T&&e instanceof T&&i instanceof T?(this.writePoint(t.x,t.y),this.writePoint(e.x,e.y),this.writePoint(i.x,i.y)):(this.writePoint(t,e),this.writePoint(i,r),this.writePoint(n,o)),this.writeOperator(s.appendbeziercurve)},t.prototype.setColourWithPattern=function(t,e,i){if(null!=t){var r=t.length,n=0;for(n=0;n<r;++n)this.stream.write(t[n].toString()),this.stream.write(s.whiteSpace)}null!=e&&(this.stream.write(e.toString()),this.stream.write(s.whiteSpace)),i?this.writeOperator(s.setColorAndPatternStroking):this.writeOperator(s.setColorAndPattern)},t}(),Q=function(){function e(e,i){this.pdfColor=new L(0,0,0),this.dashOffsetValue=0,this.penDashPattern=[0],this.pdfDashStyle=t.PdfDashStyle.Solid,this.pdfLineCap=0,this.pdfLineJoin=0,this.penWidth=1,this.internalMiterLimit=0,this.colorSpace=t.PdfColorSpace.Rgb,e instanceof R?this.setBrush(e):e instanceof L&&(this.color=e),"number"==typeof i&&(this.width=i)}return Object.defineProperty(e.prototype,"color",{get:function(){return this.pdfColor},set:function(t){this.pdfColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dashOffset",{get:function(){return void 0===this.dashOffsetValue||null==this.dashOffsetValue?0:this.dashOffsetValue},set:function(t){this.dashOffsetValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dashPattern",{get:function(){return this.penDashPattern},set:function(t){this.penDashPattern=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dashStyle",{get:function(){return this.pdfDashStyle},set:function(e){if(this.pdfDashStyle!==e)switch(this.pdfDashStyle=e,this.pdfDashStyle){case t.PdfDashStyle.Custom:break;case t.PdfDashStyle.Dash:this.penDashPattern=[3,1];break;case t.PdfDashStyle.Dot:this.penDashPattern=[1,1];break;case t.PdfDashStyle.DashDot:this.penDashPattern=[3,1,1,1];break;case t.PdfDashStyle.DashDotDot:this.penDashPattern=[3,1,1,1,1,1];break;case t.PdfDashStyle.Solid:break;default:this.pdfDashStyle=t.PdfDashStyle.Solid,this.penDashPattern=[0]}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineCap",{get:function(){return this.pdfLineCap},set:function(t){this.pdfLineCap=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lineJoin",{get:function(){return this.pdfLineJoin},set:function(t){this.pdfLineJoin=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"miterLimit",{get:function(){return this.internalMiterLimit},set:function(t){this.internalMiterLimit=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.penWidth},set:function(t){this.penWidth=t},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return this},e.prototype.setBrush=function(t){var e=t;null!=e&&e instanceof A&&(this.color=e.color,this.pdfBrush=e),this.color=e.color,this.pdfBrush=e},e.prototype.monitorChanges=function(t,e,i,r,n,o){r=!0,this.dashControl(t,r,e),e.setLineWidth(this.width),e.setLineJoin(this.lineJoin),e.setLineCap(this.lineCap);var s=this.miterLimit;s>0&&e.setMiterLimit(s);this.pdfBrush;return e.setColorAndSpace(this.color,n,!0),!0},e.prototype.dashControl=function(t,e,i){e=!0;var r=this.width,n=this.getPattern();return i.setLineDashPattern(n,this.dashOffset*r),e},e.prototype.getPattern=function(){for(var t=this.dashPattern,e=0;e<t.length;++e)t[e]*=this.width;return t},e}(),tt=function(){function t(t){this.radDegFactor=180/Math.PI,this.transformationMatrix=void 0===t?new et(1,0,0,1,0,0):new et(1,0,0,-1,0,0)}return Object.defineProperty(t.prototype,"matrix",{get:function(){return this.transformationMatrix},set:function(t){this.transformationMatrix=t},enumerable:!0,configurable:!0}),t.prototype.translate=function(t,e){this.transformationMatrix.translate(t,e)},t.prototype.scale=function(t,e){this.transformationMatrix.elements[0]=t,this.transformationMatrix.elements[3]=e},t.prototype.rotate=function(t){t=t*Math.PI/180,this.transformationMatrix.elements[0]=Math.cos(t),this.transformationMatrix.elements[1]=Math.sin(t),this.transformationMatrix.elements[2]=-Math.sin(t),this.transformationMatrix.elements[3]=Math.cos(t)},t.prototype.toString=function(){for(var t="",e=0,i=this.transformationMatrix.elements.length;e<i;e++){this.matrix.elements[e];t+=g.floatToString(this.transformationMatrix.elements[e]),t+=" "}return t},t.prototype.multiply=function(t){this.transformationMatrix.multiply(t.matrix)},t.degreesToRadians=function(t){return this.degRadFactor*t},t.prototype.radiansToDegrees=function(t){return this.radDegFactor*t},t.prototype.clone=function(){return this},t.degRadFactor=Math.PI/180,t}(),et=function(){function t(t,e,i,r,n,o){void 0===t?this.metrixElements=[]:"number"==typeof t?(this.metrixElements=[],this.metrixElements.push(t),this.metrixElements.push(e),this.metrixElements.push(i),this.metrixElements.push(r),this.metrixElements.push(n),this.metrixElements.push(o)):this.metrixElements=t}return Object.defineProperty(t.prototype,"elements",{get:function(){return this.metrixElements},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){return this.metrixElements[4]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this.metrixElements[5]},enumerable:!0,configurable:!0}),t.prototype.translate=function(t,e){this.metrixElements[4]=t,this.metrixElements[5]=e},t.prototype.transform=function(t){var e=t.x,i=t.y,r=e*this.elements[0]+i*this.elements[2]+this.offsetX,n=e*this.elements[1]+i*this.elements[3]+this.offsetY;return new T(r,n)},t.prototype.multiply=function(t){var e=[];e.push(this.elements[0]*t.elements[0]+this.elements[1]*t.elements[2]),e[1]=this.elements[0]*t.elements[1]+this.elements[1]*t.elements[3],e[2]=this.elements[2]*t.elements[0]+this.elements[3]*t.elements[2],e[3]=this.elements[2]*t.elements[1]+this.elements[3]*t.elements[3],e[4]=this.offsetX*t.elements[0]+this.offsetY*t.elements[2]+t.offsetX,e[5]=this.offsetX*t.elements[1]+this.offsetY*t.elements[3]+t.offsetY;for(var i=0;i<e.length;i++)this.elements[i]=e[i]},t.prototype.dispose=function(){this.metrixElements=null},t.prototype.clone=function(){return new t(this.metrixElements)},t}(),it=function(){function t(){this.pdf="PDF",this.text="Text",this.imageB="ImageB",this.imageC="ImageC",this.imageI="ImageI"}return t}(),rt=function(){function t(){this.mKeys=[],this.mValues=[]}return t.prototype.size=function(){return this.mKeys.length},t.prototype.add=function(t,e){if(void 0===t||null===t||void 0===e||null===e)throw new ReferenceError("Provided key or value is not valid.");if(this.mKeys.indexOf(t)<0)return this.mKeys.push(t),this.mValues.push(e),1;throw new RangeError("An item with the same key has already been added.")},t.prototype.keys=function(){return this.mKeys},t.prototype.values=function(){return this.mValues},t.prototype.getValue=function(t){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");var e=this.mKeys.indexOf(t);if(e<0)throw new RangeError("No item with the specified key has been added.");return this.mValues[e]},t.prototype.setValue=function(t,e){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");var i=this.mKeys.indexOf(t);i<0?(this.mKeys.push(t),this.mValues.push(e)):this.mValues[i]=e},t.prototype.remove=function(t){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");var e=this.mKeys.indexOf(t);if(e<0)throw new RangeError("No item with the specified key has been added.");return this.mKeys.splice(e,1),this.mValues.splice(e,1),!0},t.prototype.containsKey=function(t){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");return!(this.mKeys.indexOf(t)<0)},t.prototype.clear=function(){this.mKeys=[],this.mValues=[]},t}(),nt=function(){function t(t,e,i){this.dictionary=new h,this.dictionaryProperties=new a,this.dictionary.items.setValue(this.dictionaryProperties.CA,new g(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new g(e)),this.dictionary.items.setValue(this.dictionaryProperties.BM,new o(i.toString()))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),ot=function(){function t(){this.automaticFieldsInformation=[]}return Object.defineProperty(t.prototype,"automaticFields",{get:function(){return this.automaticFieldsInformation},enumerable:!0,configurable:!0}),t.prototype.add=function(t){return this.automaticFields.push(t)},t}(),st=function(){function t(){}return t.prototype.drawHelper=function(t,e,i){var r=0!==e||0!==i,n=null;r&&(n=t.save(),t.translateTransform(e,i)),this.drawInternal(t),r&&t.restore(n)},t}(),at=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ht=function(t){function e(){var e=t.call(this)||this;return e.internalBounds=new k(0,0,0,0),e.internalTemplateSize=new j(0,0),e}return at(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.internalBounds},set:function(t){this.internalBounds=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return new j(this.bounds.width,this.bounds.height)},set:function(t){this.bounds.width=t.width,this.bounds.height=t.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return new T(this.bounds.x,this.bounds.y)},set:function(t){this.bounds.x=t.x,this.bounds.y=t.y},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.internalFont},set:function(t){this.internalFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brush",{get:function(){return this.internalBrush},set:function(t){this.internalBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pen",{get:function(){return this.internalPen},set:function(t){this.internalPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return this.internalStringFormat},set:function(t){this.internalStringFormat=t},enumerable:!0,configurable:!0}),e.prototype.performDrawHelper=function(t,e,i,r){if(0===this.bounds.height||0===this.bounds.width){var n=this.getValue(t);this.internalTemplateSize=this.getFont().measureString(n,this.size,this.stringFormat)}},e.prototype.draw=function(t,e,i){if(void 0===e){var r=new T(0,0);this.draw(t,r)}else if(e instanceof T)this.draw(t,e.x,e.y);else{this.drawHelper(t,e,i);var n=new lt(this,new T(e,i));t.automaticFields.add(n)}},e.prototype.getSize=function(){return 0===this.bounds.height||0===this.bounds.width?this.internalTemplateSize:this.size},e.prototype.drawInternal=function(t){},e.prototype.getBrush=function(){return void 0===this.internalBrush||null==this.internalBrush?new A(new L(0,0,0)):this.internalBrush},e.prototype.getFont=function(){return void 0===this.internalFont||null==this.internalFont?Ce.defaultFont:this.internalFont},e.prototype.getPageFromGraphics=function(t){if(void 0!==t.page&&null!==t.page)return e=t.page;var e=t.currentPage;return e},e}(st),lt=function(){function t(e,i,r,n){this.pageNumberFieldLocation=new T,this.pageNumberField=null,this.scaleX=1,this.scaleY=1,void 0===i&&e instanceof t?(this.pageNumberField=e.field,this.pageNumberFieldLocation=e.location,this.scaleX=e.scalingX,this.scaleY=e.scalingY):void 0===r&&i instanceof T&&e instanceof ht?(this.pageNumberField=e,this.pageNumberFieldLocation=i):(this.pageNumberField=e,this.pageNumberFieldLocation=i,this.scaleX=r,this.scaleY=n)}return Object.defineProperty(t.prototype,"location",{get:function(){return this.pageNumberFieldLocation},set:function(t){this.pageNumberFieldLocation=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"field",{get:function(){return this.pageNumberField},set:function(t){this.pageNumberField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingX",{get:function(){return this.scaleX},set:function(t){this.scaleX=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingY",{get:function(){return this.scaleY},set:function(t){this.scaleY=t},enumerable:!0,configurable:!0}),t}(),ut=function(){function t(t){this.mPosition=0,this.buffer=new Uint8Array(t),this.dataView=new DataView(this.buffer.buffer)}return Object.defineProperty(t.prototype,"position",{get:function(){return this.mPosition},set:function(t){this.mPosition=t},enumerable:!0,configurable:!0}),t.prototype.read=function(t,e,i){for(var r=e;r<i;r++){var n=this.position;t.buffer[r]=this.readByte(n),this.position++}},t.prototype.getBuffer=function(t){return this.buffer[t]},t.prototype.writeFromBase64String=function(t){var e=this.encodedString(t);this.buffer=e},t.prototype.encodedString=function(t){var e,i,r,n,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,h=0,l=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;t.charAt(t.length-1)===s.charAt(64)&&l--;for(var u=new Uint8Array(0|l);a<t.length;)e=s.indexOf(t.charAt(a++))<<2|(n=s.indexOf(t.charAt(a++)))>>4,i=(15&n)<<4|(o=s.indexOf(t.charAt(a++)))>>2,r=(3&o)<<6|s.indexOf(t.charAt(a++)),u[h++]=e,u[h++]=i,u[h++]=r;return u},t.prototype.readByte=function(t){return this.buffer[t]},Object.defineProperty(t.prototype,"internalBuffer",{get:function(){return this.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.buffer.byteLength},enumerable:!0,configurable:!0}),t.prototype.readNextTwoBytes=function(t){var e=t.readByte(this.position);return this.position++,e<<=8,e|=t.readByte(this.position),this.position++,e},t}(),ct=function(){function t(t){this.currentPosition=-1,this.value=t}return Object.defineProperty(t.prototype,"status",{get:function(){return this.objectStatus},set:function(t){this.objectStatus=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.saving},set:function(t){this.saving=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index},set:function(t){this.index=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.currentPosition},set:function(t){this.currentPosition=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.boolToStr(this.value))},t.prototype.clone=function(e){return new t(this.value)},t.prototype.boolToStr=function(t){return t?"true":"false"},t}();!function(t){t[t.Unknown=0]="Unknown",t[t.Bmp=1]="Bmp",t[t.Emf=2]="Emf",t[t.Gif=3]="Gif",t[t.Jpeg=4]="Jpeg",t[t.Png=5]="Png",t[t.Wmf=6]="Wmf",t[t.Icon=7]="Icon"}(t.ImageFormat||(t.ImageFormat={}));var pt=function(){function e(e){this.sof1Marker=193,this.sof2Marker=194,this.sof3Marker=195,this.sof5Marker=197,this.sof6Marker=198,this.sof7Marker=199,this.sof9Marker=201,this.sof10Marker=202,this.sof11Marker=203,this.sof13Marker=205,this.sof14Marker=206,this.sof15Marker=207,this.mFormat=t.ImageFormat.Unknown,this.mbitsPerComponent=8,this.dictionaryProperties=new a,this.mStream=e,this.initialize()}return Object.defineProperty(e.prototype,"height",{get:function(){return this.mHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.mWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bitsPerComponent",{get:function(){return this.mbitsPerComponent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.mImageData.count},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageData",{get:function(){return this.mImageData},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"imageDataAsNumberArray",{get:function(){return this.mImageData.internalBuffer.buffer},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){this.mFormat===t.ImageFormat.Unknown&&this.checkIfJpeg()&&(this.mFormat=t.ImageFormat.Jpeg,this.parseJpegImage()),this.reset(),this.mImageData=new ut(this.mStream.count),this.mStream.read(this.mImageData,0,this.mImageData.count)},e.prototype.reset=function(){this.mStream.position=0},e.prototype.parseJpegImage=function(){this.reset();var t=new ut(this.mStream.count);this.mStream.read(t,0,t.count);for(var e=4,i=!1,r=256*t.getBuffer(e)+t.getBuffer(e+1);e<t.count;){if(!((e+=r)<t.count)){i=!0;break}if(192===t.getBuffer(e+1))return this.mHeight=256*t.getBuffer(e+5)+t.getBuffer(e+6),void(this.mWidth=256*t.getBuffer(e+7)+t.getBuffer(e+8));e+=2,r=256*t.getBuffer(e)+t.getBuffer(e+1)}i&&(this.mStream.position=0,this.skip(this.mStream,2),this.readExceededJPGImage(this.mStream))},Object.defineProperty(e.prototype,"format",{get:function(){return this.mFormat},enumerable:!0,configurable:!0}),e.prototype.checkIfJpeg=function(){this.reset();for(var t=0;t<e.mJpegHeader.length;t++){if(e.mJpegHeader[t]!==this.mStream.readByte(t))return!1;this.mStream.position++}return!0},e.prototype.getImageDictionary=function(){if(this.mFormat===t.ImageFormat.Jpeg){this.imageData.internalBuffer.length;this.imageStream=new b,this.imageStream.isImage=!0;for(var e="",i="",r=0;r<this.imageDataAsNumberArray.byteLength;r++)e+=String.fromCharCode(null,this.mStream.readByte(r));for(r=0;r<e.length;r++)r%2!=0&&(i+=e[r]);return this.imageStream.data=[i],this.imageStream.compress=!1,this.imageStream.items.setValue(this.dictionaryProperties.type,new o(this.dictionaryProperties.xObject)),this.imageStream.items.setValue(this.dictionaryProperties.subtype,new o(this.dictionaryProperties.image)),this.imageStream.items.setValue(this.dictionaryProperties.width,new g(this.width)),this.imageStream.items.setValue(this.dictionaryProperties.height,new g(this.height)),this.imageStream.items.setValue(this.dictionaryProperties.bitsPerComponent,new g(this.bitsPerComponent)),this.imageStream.items.setValue(this.dictionaryProperties.filter,new o(this.dictionaryProperties.dctdecode)),this.imageStream.items.setValue(this.dictionaryProperties.colorSpace,new o(this.getColorSpace())),this.imageStream.items.setValue(this.dictionaryProperties.decodeParms,this.getDecodeParams()),this.imageStream}return this.imageStream},e.prototype.getColorSpace=function(){return this.dictionaryProperties.deviceRgb},e.prototype.getDecodeParams=function(){var t=new h;return t.items.setValue(this.dictionaryProperties.columns,new g(this.width)),t.items.setValue(this.dictionaryProperties.blackIs1,new ct(!0)),t.items.setValue(this.dictionaryProperties.k,new g(-1)),t.items.setValue(this.dictionaryProperties.predictor,new g(15)),t.items.setValue(this.dictionaryProperties.bitsPerComponent,new g(this.bitsPerComponent)),t},e.prototype.readExceededJPGImage=function(t){this.mStream=t;for(var e=!0;e;)switch(this.getMarker(t)){case this.sof1Marker:case this.sof2Marker:case this.sof3Marker:case this.sof5Marker:case this.sof6Marker:case this.sof7Marker:case this.sof9Marker:case this.sof10Marker:case this.sof11Marker:case this.sof13Marker:case this.sof14Marker:case this.sof15Marker:t.position+=3,this.mHeight=this.mStream.readNextTwoBytes(t),this.mWidth=this.mStream.readNextTwoBytes(t),e=!1;break;default:this.skipStream(t)}},e.prototype.skip=function(t,e){this.mStream=t;var i=new ut(e);this.mStream.read(i,0,i.count)},e.prototype.getMarker=function(t){var e=32;for(e=t.readByte(this.mStream.position),t.position++;255!==e;)e=t.readByte(this.mStream.position),t.position++;do{e=t.readByte(this.mStream.position),t.position++}while(255===e);return e},e.prototype.skipStream=function(t){var e=this.mStream.readNextTwoBytes(t)-2;e>0&&(t.position+=e)},e.mPngHeader=[137,80,78,71,13,10,26,10],e.mJpegHeader=[255,216],e.GIF_HEADER="G,I,F,8",e.BMP_HEADER="B,M",e}(),dt=function(){function t(t){this.updateProportionsHelper(t)}return t.prototype.convertUnits=function(t,e,i){return this.convertFromPixels(this.convertToPixels(t,e),i)},t.prototype.convertToPixels=function(t,e){var i=e;return t*this.proportions[i]},t.prototype.convertFromPixels=function(t,e){var i=e;return t/this.proportions[i]},t.prototype.updateProportionsHelper=function(t){this.proportions=[t/2.54,t/6,1,t/72,t,t/300,t/25.4]},t.horizontalResolution=96,t.verticalResolution=96,t}(),ft=function(){function e(){}return Object.defineProperty(e.prototype,"width",{get:function(){return this.imageWidth},set:function(t){this.imageWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.imageHeight},set:function(t){this.imageHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{set:function(t){this.width=t.width,this.height=t.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"physicalDimension",{get:function(){return this.imagePhysicalDimension=this.getPointSize(this.width,this.height,this.horizontalResolution,this.verticalResolution),new j(this.width,this.height)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.imageStream},enumerable:!0,configurable:!0}),e.prototype.getPointSize=function(e,i,r,n){if(void 0===r){var o=dt.horizontalResolution,s=dt.verticalResolution;return c=this.getPointSize(e,i,o,s)}var a=new dt(r),h=new dt(n),l=a.convertUnits(e,t.PdfGraphicsUnit.Pixel,t.PdfGraphicsUnit.Point),u=h.convertUnits(i,t.PdfGraphicsUnit.Pixel,t.PdfGraphicsUnit.Point),c=new j(l,u);return c},e}(),gt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mt=function(t){function e(e){var i=t.call(this)||this;return i.imageStatus=!0,i.dictionaryProperties=new a,i.loadImage(e),i}return gt(e,t),e.prototype.loadImage=function(t){this.initializeAsync(t)},e.prototype.initializeAsync=function(t){var e=new ut(t.length);e.writeFromBase64String(t),this.decoder=new pt(e),this.height=this.decoder.height,this.width=this.decoder.width,this.bitsPerComponent=this.decoder.bitsPerComponent},e.prototype.save=function(){this.imageStatus=!0,this.imageStream=this.decoder.getImageDictionary()},e}(ft),yt=function(){function t(){}return Object.defineProperty(t.prototype,"empty",{get:function(){return this.offset===this.length&&this.length===this.checksum&&0===this.checksum},enumerable:!0,configurable:!0}),t}(),bt=function(){function t(){}return t}(),wt=function(){function t(){}return t}(),St=function(){function t(){}return t}(),Pt=function(){function t(){}return Object.defineProperty(t.prototype,"isItalic",{get:function(){return 0!=(2&this.macStyle)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBold",{get:function(){return 0!=(1&this.macStyle)},enumerable:!0,configurable:!0}),t}(),vt=function(){function t(){}return t}(),Ct=function(){function t(){}return t}(),Bt=function(){function t(){}return t}(),Ot=function(){function t(){}return t}(),xt=function(){function t(){}return t}(),Lt=function(){function t(){}return t}(),Tt=function(){function t(){}return Object.defineProperty(t.prototype,"empty",{get:function(){return this.index===this.width&&this.width===this.charCode&&0===this.charCode},enumerable:!0,configurable:!0}),t.prototype.compareTo=function(t){var e=t;return this.index-e.index},t}(),jt=function(){function t(){}return t}(),kt=function(){function t(){}return t}(),Vt=function(){function t(){}return t}(),Rt=function(){function t(){}return t}(),Nt=function(){function t(){}return t}(),At=function(){function t(t){this.int32Size=4,this.int16Size=2,this.int64Size=8,this.bufferLength=t,this.buffer=[]}return Object.defineProperty(t.prototype,"data",{get:function(){if(this.buffer.length<this.bufferLength)for(var t=this.bufferLength-this.buffer.length,e=0;e<t;e++)this.buffer.push(0);return this.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return void 0!==this.internalPosition&&null!==this.internalPosition||(this.internalPosition=0),this.internalPosition},enumerable:!0,configurable:!0}),t.prototype.writeShort=function(t){var e=[(65280&t)>>8,255&t];this.flush(e)},t.prototype.writeInt=function(t){var e=[(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t];this.flush(e)},t.prototype.writeUInt=function(t){var e=[(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t];this.flush(e)},t.prototype.writeString=function(t){if(null==t)throw new Error("Argument Null Exception : value");for(var e=[],i=0;i<t.length;i++)e.push(t.charCodeAt(i));this.flush(e)},t.prototype.writeBytes=function(t){this.flush(t)},t.prototype.flush=function(t){if(null===t)throw new Error("Argument Null Exception : buff");for(var e=this.position,i=0;i<t.length;i++)this.buffer[e]=t[i],e++;this.internalPosition+=t.length},t}(),Dt=function(){function e(t){this.int32Size=4,this.isTtcFont=!1,this.isMacTtf=!1,this.metricsName="",this.isMacTTF=!1,this.missedGlyphs=0,this.tableNames=["cvt ","fpgm","glyf","head","hhea","hmtx","loca","maxp","prep"],this.entrySelectors=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4],this.fontData=t,this.initialize()}return Object.defineProperty(e.prototype,"macintosh",{get:function(){return null!==this.macintoshDictionary&&void 0!==this.macintoshDictionary||(this.macintoshDictionary=new n),this.macintoshDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"microsoft",{get:function(){return null!==this.microsoftDictionary&&void 0!==this.microsoftDictionary||(this.microsoftDictionary=new n),this.microsoftDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"macintoshGlyphs",{get:function(){return null!==this.internalMacintoshGlyphs&&void 0!==this.internalMacintoshGlyphs||(this.internalMacintoshGlyphs=new n),this.internalMacintoshGlyphs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"microsoftGlyphs",{get:function(){return null!==this.internalMicrosoftGlyphs&&void 0!==this.internalMicrosoftGlyphs||(this.internalMicrosoftGlyphs=new n),this.internalMicrosoftGlyphs},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){void 0===this.metrics&&(this.metrics=new Pt),this.readFontDictionary();var t=this.readNameTable(),e=this.readHeadTable();this.initializeFontName(t),this.metrics.macStyle=e.macStyle},e.prototype.readFontDictionary=function(){this.offset=0;this.checkPreambula();var t=this.readInt16(this.offset);this.readInt16(this.offset),this.readInt16(this.offset),this.readInt16(this.offset);void 0===this.tableDirectory&&(this.tableDirectory=new n);for(var e=0;e<t;++e){var i=new yt,r=this.readString(this.int32Size);i.checksum=this.readInt32(this.offset),i.offset=this.readInt32(this.offset),i.length=this.readInt32(this.offset),this.tableDirectory.setValue(r,i)}this.lowestPosition=this.offset,this.isTtcFont||this.fixOffsets()},e.prototype.fixOffsets=function(){for(var t=Number.MAX_VALUE,e=this.tableDirectory.keys(),i=0;i<e.length;i++){var r=(a=this.tableDirectory.getValue(e[i])).offset;if(t>r&&(t=r)<=this.lowestPosition)break}var o=t-this.lowestPosition;if(0!==o){for(var s=new n,i=0;i<e.length;i++){var a=this.tableDirectory.getValue(e[i]);a.offset-=o,s.setValue(e[i],a)}this.tableDirectory=s}},e.prototype.checkPreambula=function(){var t=this.readInt32(this.offset);if(this.isMacTtf=1953658213===t,65536!==t&&1953658213!==t&&1330926671!==t){if(this.isTtcFont=!0,this.offset=0,"ttcf"!==this.readString(4))throw new Error("Can not read TTF font data");if(this.offset+=4,this.readInt32(this.offset)<0)throw new Error("Can not read TTF font data");this.offset=this.readInt32(this.offset),t=this.readInt32(this.offset)}return t},e.prototype.readNameTable=function(){var t=this.getTable("name");this.offset=t.offset;var e=new bt;e.formatSelector=this.readUInt16(this.offset),e.recordsCount=this.readUInt16(this.offset),e.offset=this.readUInt16(this.offset),e.nameRecords=[];for(var i=this.offset,r=0;r<e.recordsCount;r++){this.offset=i;var n=new wt;n.platformID=this.readUInt16(this.offset),n.encodingID=this.readUInt16(this.offset),n.languageID=this.readUInt16(this.offset),n.nameID=this.readUInt16(this.offset),n.length=this.readUInt16(this.offset),n.offset=this.readUInt16(this.offset),this.offset=t.offset+e.offset+n.offset;var o=0===n.platformID||3===n.platformID;n.name=this.readString(n.length,o),e.nameRecords[r]=n,i+=12}return e},e.prototype.readHeadTable=function(){var t=this.getTable("head");this.offset=t.offset;var e=new St;return e.version=this.readFixed(this.offset),e.fontRevision=this.readFixed(this.offset),e.checkSumAdjustment=this.readUInt32(this.offset),e.magicNumber=this.readUInt32(this.offset),e.flags=this.readUInt16(this.offset),e.unitsPerEm=this.readUInt16(this.offset),e.created=this.readInt64(this.offset),e.modified=this.readInt64(this.offset),e.xMin=this.readInt16(this.offset),e.yMin=this.readInt16(this.offset),e.xMax=this.readInt16(this.offset),e.yMax=this.readInt16(this.offset),e.macStyle=this.readUInt16(this.offset),e.lowestReadableSize=this.readUInt16(this.offset),e.fontDirectionHint=this.readInt16(this.offset),e.indexToLocalFormat=this.readInt16(this.offset),e.glyphDataFormat=this.readInt16(this.offset),e},e.prototype.readHorizontalHeaderTable=function(){var t=this.getTable("hhea");this.offset=t.offset;var e=new vt;return e.version=this.readFixed(this.offset),e.ascender=this.readInt16(this.offset),e.descender=this.readInt16(this.offset),e.lineGap=this.readInt16(this.offset),e.advanceWidthMax=this.readUInt16(this.offset),e.minLeftSideBearing=this.readInt16(this.offset),e.minRightSideBearing=this.readInt16(this.offset),e.xMaxExtent=this.readInt16(this.offset),e.caretSlopeRise=this.readInt16(this.offset),e.caretSlopeRun=this.readInt16(this.offset),this.offset+=10,e.metricDataFormat=this.readInt16(this.offset),e.numberOfHMetrics=this.readUInt16(this.offset),e},e.prototype.readOS2Table=function(){var t=this.getTable("OS/2");this.offset=t.offset;var e=new Ct;return e.version=this.readUInt16(this.offset),e.xAvgCharWidth=this.readInt16(this.offset),e.usWeightClass=this.readUInt16(this.offset),e.usWidthClass=this.readUInt16(this.offset),e.fsType=this.readInt16(this.offset),e.ySubscriptXSize=this.readInt16(this.offset),e.ySubscriptYSize=this.readInt16(this.offset),e.ySubscriptXOffset=this.readInt16(this.offset),e.ySubscriptYOffset=this.readInt16(this.offset),e.ySuperscriptXSize=this.readInt16(this.offset),e.ySuperscriptYSize=this.readInt16(this.offset),e.ySuperscriptXOffset=this.readInt16(this.offset),e.ySuperscriptYOffset=this.readInt16(this.offset),e.yStrikeoutSize=this.readInt16(this.offset),e.yStrikeoutPosition=this.readInt16(this.offset),e.sFamilyClass=this.readInt16(this.offset),e.panose=this.readBytes(10),e.ulUnicodeRange1=this.readUInt32(this.offset),e.ulUnicodeRange2=this.readUInt32(this.offset),e.ulUnicodeRange3=this.readUInt32(this.offset),e.ulUnicodeRange4=this.readUInt32(this.offset),e.vendorIdentifier=this.readBytes(4),e.fsSelection=this.readUInt16(this.offset),e.usFirstCharIndex=this.readUInt16(this.offset),e.usLastCharIndex=this.readUInt16(this.offset),e.sTypoAscender=this.readInt16(this.offset),e.sTypoDescender=this.readInt16(this.offset),e.sTypoLineGap=this.readInt16(this.offset),e.usWinAscent=this.readUInt16(this.offset),e.usWinDescent=this.readUInt16(this.offset),e.ulCodePageRange1=this.readUInt32(this.offset),e.ulCodePageRange2=this.readUInt32(this.offset),e.version>1?(e.sxHeight=this.readInt16(this.offset),e.sCapHeight=this.readInt16(this.offset),e.usDefaultChar=this.readUInt16(this.offset),e.usBreakChar=this.readUInt16(this.offset),e.usMaxContext=this.readUInt16(this.offset)):(e.sxHeight=0,e.sCapHeight=0,e.usDefaultChar=0,e.usBreakChar=0,e.usMaxContext=0),e},e.prototype.readPostTable=function(){var t=this.getTable("post");this.offset=t.offset;var e=new Bt;return e.formatType=this.readFixed(this.offset),e.italicAngle=this.readFixed(this.offset),e.underlinePosition=this.readInt16(this.offset),e.underlineThickness=this.readInt16(this.offset),e.isFixedPitch=this.readUInt32(this.offset),e.minType42=this.readUInt32(this.offset),e.maxType42=this.readUInt32(this.offset),e.minType1=this.readUInt32(this.offset),e.maxType1=this.readUInt32(this.offset),e},e.prototype.readWidthTable=function(t,e){var i=this.getTable("hmtx");this.offset=i.offset;for(var r=[],n=0;n<t;n++){var o=new Ot;o.advanceWidth=this.readUInt16(this.offset),o.lsb=this.readInt16(this.offset);var s=1e3*o.advanceWidth/e;r.push(Math.floor(s))}return r},e.prototype.readCmapTable=function(){var t=this.getTable("cmap");this.offset=t.offset;var e=new Lt;e.version=this.readUInt16(this.offset),e.tablesCount=this.readUInt16(this.offset);for(var i=this.offset,r=[],n=0;n<e.tablesCount;n++){this.offset=i;var o=new xt;o.platformID=this.readUInt16(this.offset),o.encodingID=this.readUInt16(this.offset),o.offset=this.readUInt32(this.offset),i=this.offset,this.readCmapSubTable(o),r[n]=o}return r},e.prototype.readCmapSubTable=function(e){var i=this.getTable("cmap");this.offset=i.offset+e.offset;var r=this.readUInt16(this.offset),n=this.getCmapEncoding(e.platformID,e.encodingID);n===t.TtfCmapEncoding.Macintosh?t.TtfPlatformID.Macintosh:t.TtfPlatformID.Microsoft;if(n!==t.TtfCmapEncoding.Unknown)switch(r){case t.TtfCmapFormat.Apple:this.readAppleCmapTable(e,n);break;case t.TtfCmapFormat.Microsoft:this.readMicrosoftCmapTable(e,n);break;case t.TtfCmapFormat.Trimmed:this.readTrimmedCmapTable(e,n)}},e.prototype.readAppleCmapTable=function(t,e){var i=this.getTable("cmap");this.offset=i.offset+t.offset;var r=new kt;r.format=this.readUInt16(this.offset),r.length=this.readUInt16(this.offset),r.version=this.readUInt16(this.offset),null!==this.maxMacIndex&&void 0!==this.maxMacIndex||(this.maxMacIndex=0);for(var n=0;n<256;++n){var o=new Tt;o.index=this.readByte(this.offset),o.width=this.getWidth(o.index),o.charCode=n,this.macintosh.setValue(n,o),this.addGlyph(o,e),this.maxMacIndex=Math.max(n,this.maxMacIndex)}},e.prototype.readMicrosoftCmapTable=function(e,i){var r=this.getTable("cmap");this.offset=r.offset+e.offset;var n=i===t.TtfCmapEncoding.Unicode?this.microsoft:this.macintosh,o=new Vt;o.format=this.readUInt16(this.offset),o.length=this.readUInt16(this.offset),o.version=this.readUInt16(this.offset),o.segCountX2=this.readUInt16(this.offset),o.searchRange=this.readUInt16(this.offset),o.entrySelector=this.readUInt16(this.offset),o.rangeShift=this.readUInt16(this.offset);var s=o.segCountX2/2;o.endCount=this.readUshortArray(s),o.reservedPad=this.readUInt16(this.offset),o.startCount=this.readUshortArray(s),o.idDelta=this.readUshortArray(s),o.idRangeOffset=this.readUshortArray(s);var a=o.length/2-8-4*s;o.glyphID=this.readUshortArray(a);for(var h=0,l=0,u=0;u<s;u++)for(var c=o.startCount[u];c<=o.endCount[u]&&65535!==c;c++){if(0===o.idRangeOffset[u])h=c+o.idDelta[u]&65535;else{if((l=u+o.idRangeOffset[u]/2-s+c-o.startCount[u])>=o.glyphID.length)continue;h=o.glyphID[l]+o.idDelta[u]&65535}var p=new Tt;p.index=h,p.width=this.getWidth(p.index);var d=i===t.TtfCmapEncoding.Symbol&&61440==(65280&c)?255&c:c;p.charCode=d,n.setValue(d,p),this.addGlyph(p,i)}},e.prototype.readTrimmedCmapTable=function(t,e){var i=this.getTable("cmap");this.offset=i.offset+t.offset;var r=new Rt;r.format=this.readUInt16(this.offset),r.length=this.readUInt16(this.offset),r.version=this.readUInt16(this.offset),r.firstCode=this.readUInt16(this.offset),r.entryCount=this.readUInt16(this.offset);for(var n=0;n<r.entryCount;++n){var o=new Tt;o.index=this.readUInt16(this.offset),o.width=this.getWidth(o.index),o.charCode=n+r.firstCode,this.macintosh.setValue(n,o),this.addGlyph(o,e),this.maxMacIndex=Math.max(n,this.maxMacIndex)}},e.prototype.initializeFontName=function(t){for(var e=0;e<t.recordsCount;e++){var i=t.nameRecords[e];if(1===i.nameID?this.metrics.fontFamily=i.name:6===i.nameID&&(this.metrics.postScriptName=i.name),null!==this.metrics.fontFamily&&void 0!==this.metrics.fontFamily&&null!==this.metrics.postScriptName&&void 0!==this.metrics.postScriptName)break}},e.prototype.getTable=function(t){var e,i=new yt;return this.tableDirectory.containsKey(t)&&(e=this.tableDirectory.getValue(t)),null!==e&&void 0!==e&&(i=e),i},e.prototype.getWidth=function(t){return t=t<this.width.length?t:this.width.length-1,this.width[t]},e.prototype.getCmapEncoding=function(e,i){var r=t.TtfCmapEncoding.Unknown;return e==t.TtfPlatformID.Microsoft&&i==t.TtfMicrosoftEncodingID.Undefined?r=t.TtfCmapEncoding.Symbol:e==t.TtfPlatformID.Microsoft&&i==t.TtfMicrosoftEncodingID.Unicode?r=t.TtfCmapEncoding.Unicode:e==t.TtfPlatformID.Macintosh&&i==t.TtfMacintoshEncodingID.Roman&&(r=t.TtfCmapEncoding.Macintosh),r},e.prototype.addGlyph=function(e,i){var r=null;switch(i){case t.TtfCmapEncoding.Unicode:r=this.microsoftGlyphs;break;case t.TtfCmapEncoding.Macintosh:case t.TtfCmapEncoding.Symbol:r=this.macintoshGlyphs}r.setValue(e.index,e)},e.prototype.initializeMetrics=function(e,i,r,n,o,s){this.initializeFontName(e);for(var a=!1,h=0;h<s.length;h++){var l=s[h];if(this.getCmapEncoding(l.platformID,l.encodingID)===t.TtfCmapEncoding.Symbol){a=!0;break}}this.metrics.isSymbol=a,this.metrics.macStyle=i.macStyle,this.metrics.isFixedPitch=0!==o.isFixedPitch,this.metrics.italicAngle=o.italicAngle;var u=1e3/i.unitsPerEm;this.metrics.winAscent=n.sTypoAscender*u,this.metrics.macAscent=r.ascender*u,this.metrics.capHeight=0!==n.sCapHeight?n.sCapHeight:.7*i.unitsPerEm*u,this.metrics.winDescent=n.sTypoDescender*u,this.metrics.macDescent=r.descender*u,this.metrics.leading=(n.sTypoAscender-n.sTypoDescender+n.sTypoLineGap)*u,this.metrics.lineGap=Math.ceil(r.lineGap*u);var c=i.xMin*u,p=Math.ceil(this.metrics.macAscent+this.metrics.lineGap),d=i.xMax*u,f=this.metrics.macDescent;this.metrics.fontBox=new V(c,p,d,f),this.metrics.stemV=80,this.metrics.widthTable=this.updateWidth(),this.metrics.contains=this.tableDirectory.containsKey("CFF"),this.metrics.subScriptSizeFactor=i.unitsPerEm/n.ySubscriptYSize,this.metrics.superscriptSizeFactor=i.unitsPerEm/n.ySuperscriptYSize},e.prototype.updateWidth=function(){var t=[];if(this.metrics.isSymbol)for(n=0;n<256;n++){var e=this.getGlyph(String.fromCharCode(n));t[n]=e.empty?0:e.width}else for(var i=[],r=String.fromCharCode(32),n=0;n<256;n++){i[0]=n;var o=this.getString(i,0,i.length),s=o.length>0?o[0]:"?";(e=this.getGlyph(s)).empty?(e=this.getGlyph(r),t[n]=e.empty?0:e.width):t[n]=e.width}return t},e.prototype.getDefaultGlyph=function(){return this.getGlyph(M.whiteSpace)},e.prototype.getString=function(t,e,i){for(var r="",n=0;n<i;n++)r+=String.fromCharCode(t[n+e]);return r},e.prototype.readLocaTable=function(t){var e=this.getTable("loca");this.offset=e.offset;var i=new jt,r=null;if(t){n=e.length/2;r=[];for(o=0;o<n;o++)r[o]=2*this.readUInt16(this.offset)}else{var n=e.length/4;r=[];for(var o=0;o<n;o++)r[o]=this.readUInt32(this.offset)}return i.offsets=r,i},e.prototype.updateGlyphChars=function(t,e){t.containsKey(0)||t.setValue(0,0);for(var i=new n,r=t.keys(),o=0;o<r.length;o++)i.setValue(r[o],t.getValue(r[o]));for(o=0;o<r.length;o++){var s=r[o];this.processCompositeGlyph(t,s,e)}},e.prototype.processCompositeGlyph=function(e,i,r){if(i<r.offsets.length-1){var n=r.offsets[i];if(n!==r.offsets[i+1]){var o=this.getTable("glyf");this.offset=o.offset+n;var s=new Nt;if(s.numberOfContours=this.readInt16(this.offset),s.xMin=this.readInt16(this.offset),s.yMin=this.readInt16(this.offset),s.xMax=this.readInt16(this.offset),s.yMax=this.readInt16(this.offset),s.numberOfContours<0)for(var a=0;;){var h=this.readUInt16(this.offset),l=this.readUInt16(this.offset);if(e.containsKey(l)||e.setValue(l,0),0==(h&t.TtfCompositeGlyphFlags.MoreComponents))break;a=0!=(h&t.TtfCompositeGlyphFlags.Arg1And2AreWords)?4:2,0!=(h&t.TtfCompositeGlyphFlags.WeHaveScale)?a+=2:0!=(h&t.TtfCompositeGlyphFlags.WeHaveAnXyScale)?a+=4:0!=(h&t.TtfCompositeGlyphFlags.WeHaveTwoByTwo)&&(a+=8),this.offset+=a}}}},e.prototype.generateGlyphTable=function(t,e,i,r){i=[];var n=t.keys();n.sort(function(t,e){return t-e});for(var o=0,s=0;s<n.length;s++){var a=n[s];e.offsets.length>0&&(o+=e.offsets[a+1]-e.offsets[a])}var h=this.align(o);r=[];for(s=0;s<h;s++)r.push(0);for(var l=0,u=0,c=this.getTable("glyf"),s=0;s<e.offsets.length;s++)if(i.push(l),u<n.length&&n[u]===s){++u,i[s]=l;var p=e.offsets[s],d=e.offsets[s+1]-p;d>0&&(this.offset=c.offset+p,r=this.read(r,l,d).buffer,l+=d)}return{glyphTableSize:o,newLocaTable:i,newGlyphTable:r}},e.prototype.updateLocaTable=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : newLocaTable");for(var r=e?2*t.length:4*t.length,n=this.align(r),o=new At(n),s=0;s<t.length;s++){var a=t[s];e?(a/=2,o.writeShort(a)):o.writeInt(a)}return{newLocaUpdated:o.data,newLocaSize:r}},e.prototype.align=function(t){return t+3&-4},e.prototype.getFontProgram=function(t,e,i,r){if(null===t)throw new Error("Argument Null Exception : newLocaTableOut");if(null===e)throw new Error("Argument Null Exception : newGlyphTable");this.tableNames;var n=this.getFontProgramLength(t,e,0),o=n.fontProgramLength,s=n.numTables,a=new At(o);a.writeInt(65536),a.writeShort(s);var h=this.entrySelectors[s];return a.writeShort(16*(1<<(31&h))),a.writeShort(h),a.writeShort(16*(s-(1<<(31&h)))),this.writeCheckSums(a,s,t,e,i,r),this.writeGlyphs(a,t,e),a.data},e.prototype.getFontProgramLength=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : newLocaTableOut");if(null===e)throw new Error("Argument Null Exception : newGlyphTable");i=2;for(var r=this.tableNames,n=0,o=0;o<r.length;o++){var s=r[o];if("glyf"!==s&&"loca"!==s){var a=this.getTable(s);a.empty||(++i,n+=this.align(a.length))}}return n+=t.length,n+=e.length,n+=16*i+12,{fontProgramLength:n,numTables:i}},e.prototype.writeCheckSums=function(t,e,i,r,n,o){if(null===t)throw new Error("Argument Null Exception : writer");if(null===i)throw new Error("Argument Null Exception : newLocaTableOut");if(null===r)throw new Error("Argument Null Exception : newGlyphTable");for(var s=this.tableNames,a=16*e+12,h=0,l=0;l<s.length;l++){var u=s[l],c=this.getTable(u);if(!c.empty){if(t.writeString(u),"glyf"===u){p=this.calculateCheckSum(r);t.writeInt(p),h=n}else if("loca"===u){var p=this.calculateCheckSum(i);t.writeInt(p),h=o}else t.writeInt(c.checksum),h=c.length;t.writeUInt(a),t.writeUInt(h),a+=this.align(h)}}},e.prototype.calculateCheckSum=function(t){if(null===t)throw new Error("Argument Null Exception : bytes");for(var e=0,i=0,r=0,n=0,o=0,s=0;s<(t.length+1)/4;s++)o+=255&t[e++],n+=255&t[e++],r+=255&t[e++],i+=255&t[e++];var a=i;return a+=r<<8,a+=n<<16,a+=o<<24},e.prototype.writeGlyphs=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : writer");if(null===e)throw new Error("Argument Null Exception : newLocaTableOut");if(null===i)throw new Error("Argument Null Exception : newGlyphTable");for(var r=this.tableNames,n=0;n<r.length;n++){var o=r[n],s=this.getTable(o);if(!s.empty)if("glyf"===o)t.writeBytes(i);else if("loca"===o)t.writeBytes(e);else{for(var a=this.align(s.length),h=[],l=0;l<a;l++)h.push(0);this.offset=s.offset;var u=this.read(h,0,s.length);t.writeBytes(u.buffer)}}},e.prototype.setOffset=function(t){this.offset=t},e.prototype.createInternals=function(){this.metrics=new Pt;var t=this.readNameTable(),e=this.readHeadTable();this.bIsLocaShort=0===e.indexToLocalFormat;var i=this.readHorizontalHeaderTable(),r=this.readOS2Table(),n=this.readPostTable();this.width=this.readWidthTable(i.numberOfHMetrics,e.unitsPerEm);var o=this.readCmapTable();this.initializeMetrics(t,e,i,r,n,o)},e.prototype.getGlyph=function(t){if("number"==typeof t){var e=null;return this.metrics.isSymbol||null==this.microsoftGlyphs?this.metrics.isSymbol&&null!=this.macintoshGlyphs&&this.macintoshGlyphs.containsKey(t)&&(e=this.macintoshGlyphs.getValue(t)):this.microsoftGlyphs.containsKey(t)&&(e=this.microsoftGlyphs.getValue(t)),n=null!=e?e:this.getDefaultGlyph()}var i=null,r=t.charCodeAt(0);this.metrics.isSymbol||null===this.microsoft?(this.metrics.isSymbol&&null!==this.macintosh||this.isMacTTF)&&(0!==this.maxMacIndex?r%=this.maxMacIndex+1:r=61440==(65280&r)?255&r:r,this.macintosh.containsKey(r)&&(i=this.macintosh.getValue(r),this.isFontPresent=!0)):this.microsoft.containsKey(r)?(i=this.microsoft.getValue(r),r!==M.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!0)):r!==M.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!1),t===M.whiteSpace&&null===i&&(i=new Tt);var n=null!==i?i:this.getDefaultGlyph();return n},e.prototype.getGlyphChars=function(t){if(null===t||void 0===t)throw new Error("Argument Null Exception : chars");for(var e=new n,i=t.keys(),r=0;r<i.length;r++){var o=i[r],s=this.getGlyph(o);s.empty||e.setValue(s.index,o.charCodeAt(0))}return e},e.prototype.getAllGlyphs=function(){for(var t=[],e=new Tt,i=0,r=0;r<this.width.length;r++){var n=this.width[r];e.index=i,e.width=n,t.push(e),i++}return t},e.prototype.readFontProgram=function(t){var e=this.getGlyphChars(t),i=this.readLocaTable(this.bIsLocaShort);e.size()<t.size()&&(this.missedGlyphs=t.size()-e.size()),this.updateGlyphChars(e,i);var r=this.generateGlyphTable(e,i,null,null),n=r.glyphTableSize,o=r.newLocaTable,s=r.newGlyphTable,a=this.updateLocaTable(o,this.bIsLocaShort,null),h=a.newLocaSize,l=a.newLocaUpdated;return this.getFontProgram(l,s,n,h)},e.prototype.convertString=function(t){if(null===t)throw new Error("Argument Null Exception : text");for(var e="",i=0;i<t.length;i++){var r=t[i],n=this.getGlyph(r);n.empty||(e+=String.fromCharCode(n.index))}return e},e.prototype.getCharWidth=function(t){var e=this.getGlyph(t);return(e=e.empty?this.getDefaultGlyph():e).empty?0:e.width},e.prototype.readString=function(t,e){if(void 0===e)return this.readString(t,!1);var i="";if(e)for(r=0;r<t;r++)r%2!=0&&(i+=String.fromCharCode(this.fontData[this.offset])),this.offset+=1;else for(var r=0;r<t;r++)i+=String.fromCharCode(this.fontData[this.offset]),this.offset+=1;return i},e.prototype.readFixed=function(t){return this.readInt16(t)+this.readInt16(t+2)/16384},e.prototype.readInt32=function(t){var e=this.fontData[t+3],i=this.fontData[t+2],r=this.fontData[t+1],n=this.fontData[t];return this.offset+=4,e+(i<<8)+(r<<16)+(n<<24)},e.prototype.readUInt32=function(t){var e=this.fontData[t+3],i=this.fontData[t+2],r=this.fontData[t+1],n=this.fontData[t];return this.offset+=4,e|i<<8|r<<16|n<<24},e.prototype.readInt16=function(t){var e=(this.fontData[t]<<8)+this.fontData[t+1];return e=32768&e?e-65536:e,this.offset+=2,e},e.prototype.readInt64=function(t){var e=this.readInt32(t+4),i=4294967296*this.readInt32(t)+e;return e<0&&(i+=4294967296),i},e.prototype.readUInt16=function(t){var e=this.fontData[t]<<8|this.fontData[t+1];return this.offset+=2,e},e.prototype.readUshortArray=function(t){for(var e=[],i=0;i<t;i++)e[i]=this.readUInt16(this.offset);return e},e.prototype.readBytes=function(t){for(var e=[],i=0;i<t;i++)e.push(this.fontData[this.offset]),this.offset+=1;return e},e.prototype.readByte=function(t){var e=this.fontData[t];return this.offset+=1,e},e.prototype.read=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : buffer");var r=0,n=0;do{for(var o=0;o<i-r&&this.offset+o<this.fontData.length;o++)t[e+o]=this.fontData[this.offset+o];n=i-r,this.offset+=n,r+=n}while(r<i);return{buffer:t,written:r}},e}(),Mt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),It=function(){function e(){this.lineGap=0}return e.prototype.getAscent=function(t){return this.ascent*G.charSizeMultiplier*this.getSize(t)},e.prototype.getDescent=function(t){return this.descent*G.charSizeMultiplier*this.getSize(t)},e.prototype.getLineGap=function(t){return this.lineGap*G.charSizeMultiplier*this.getSize(t)},e.prototype.getHeight=function(t){for(var e=["cambria","candara","constantia","corbel","cariadings"],i=[],r=0;r<e.length;r++){var n=e[r];i.push(n)}return this.getDescent(t)<0?this.getAscent(t)-this.getDescent(t)+this.getLineGap(t):this.getAscent(t)+this.getDescent(t)+this.getLineGap(t)},e.prototype.getSize=function(e){var i=this.size;if(null!=e)switch(e.subSuperScript){case t.PdfSubSuperScript.SubScript:i/=this.subScriptSizeFactor;break;case t.PdfSubSuperScript.SuperScript:i/=this.superscriptSizeFactor}return i},e.prototype.clone=function(){var t=this;return t.widthTable=Ft.clone(),t},Object.defineProperty(e.prototype,"widthTable",{get:function(){return this.internalWidthTable},set:function(t){this.internalWidthTable=t},enumerable:!0,configurable:!0}),e}(),Ft=function(){function t(){}return t.clone=function(){return null},t}(),Et=function(t){function e(e){var i=t.call(this)||this;if(null==e)throw new Error("ArgumentNullException:widths");return i.widths=e,i}return Mt(e,t),e.prototype.items=function(t){if(t<0||t>=this.widths.length)throw new Error("ArgumentOutOfRangeException:index, The character is not supported by the font.");return this.widths[t]},Object.defineProperty(e.prototype,"length",{get:function(){return this.widths.length},enumerable:!0,configurable:!0}),e.prototype.clone=function(){var t=this;return t.widths=this.widths,t},e.prototype.toArray=function(){return new m(this.widths)},e}(Ft),Gt=function(){function e(t,e){if(this.nameString="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.dictionaryProperties=new a,this.isCompress=!1,this.isEmbedFont=!1,this.cmapPrefix="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap"+s.newLine+"/CIDSystemInfo << /Registry (Adobe)/Ordering (UCS)/Supplement 0>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange"+s.newLine,this.cmapEndCodespaceRange="endcodespacerange"+s.newLine,this.cmapBeginRange="beginbfrange"+s.newLine,this.cmapEndRange="endbfrange"+s.newLine,this.cmapSuffix="endbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend end"+s.newLine,null===t||void 0===t)throw new Error("ArgumentNullException:base64String");this.fontSize=e,this.fontString=t,this.Initialize()}return e.prototype.getCharWidth=function(t){return this.ttfReader.getCharWidth(t)},e.prototype.getLineWidth=function(t){for(var e=0,i=0,r=t.length;i<r;i++){var n=t[i];e+=this.getCharWidth(n)}return e},e.prototype.Initialize=function(){var t=new ut(this.fontString.length);t.writeFromBase64String(this.fontString),this.fontData=t.internalBuffer,this.ttfReader=new Dt(this.fontData),this.ttfMetrics=this.ttfReader.metrics},e.prototype.createInternals=function(){this.fontDictionary=new h,this.fontProgram=new b,this.cmap=new b,this.descendantFont=new h,this.metrics=new It,this.ttfReader.createInternals(),this.ttfMetrics=this.ttfReader.metrics,this.initializeMetrics(),this.subsetName=this.getFontName(),this.createDescendantFont(),this.createCmap(),this.createFontDictionary(),this.createFontProgram()},e.prototype.getInternals=function(){return this.fontDictionary},e.prototype.initializeMetrics=function(){var t=this.ttfReader.metrics;this.metrics.ascent=t.macAscent,this.metrics.descent=t.macDescent,this.metrics.height=t.macAscent-t.macDescent+t.lineGap,this.metrics.name=t.fontFamily,this.metrics.postScriptName=t.postScriptName,this.metrics.size=this.fontSize,this.metrics.widthTable=new Et(t.widthTable),this.metrics.lineGap=t.lineGap,this.metrics.subScriptSizeFactor=t.subScriptSizeFactor,this.metrics.superscriptSizeFactor=t.superscriptSizeFactor,this.metrics.isBold=t.isBold},e.prototype.getFontName=function(){for(var t,e="",i=0;i<6;i++){var r=Math.floor(26*Math.random())+0;e+=this.nameString[r]}return e+="+",e+=this.ttfReader.metrics.postScriptName,t=e.toString(),t=this.formatName(t)},e.prototype.formatName=function(t){var e=t.replace("(","#28");return e=e.replace(")","#29"),e=e.replace("[","#5B"),e=e.replace("]","#5D"),e=e.replace("<","#3C"),e=e.replace(">","#3E"),e=e.replace("{","#7B"),e=e.replace("}","#7D"),e=e.replace("/","#2F"),(e=e.replace("%","#25")).replace(" ","#20")},e.prototype.createDescendantFont=function(){this.descendantFont.isFont=!0,this.descendantFont.descendantFontBeginSave=new u(this),this.descendantFont.items.setValue(this.dictionaryProperties.type,new o(this.dictionaryProperties.font)),this.descendantFont.items.setValue(this.dictionaryProperties.subtype,new o(this.dictionaryProperties.cIDFontType2)),this.descendantFont.items.setValue(this.dictionaryProperties.baseFont,new o(this.subsetName)),this.descendantFont.items.setValue(this.dictionaryProperties.cIDToGIDMap,new o(this.dictionaryProperties.identity)),this.descendantFont.items.setValue(this.dictionaryProperties.dw,new g(1e3)),this.fontDescriptor=this.createFontDescriptor(),this.descendantFont.items.setValue(this.dictionaryProperties.fontDescriptor,new C(this.fontDescriptor));var t=this.createSystemInfo();this.descendantFont.items.setValue(this.dictionaryProperties.cIDSystemInfo,t)},e.prototype.createFontDescriptor=function(){var t=new h,e=this.ttfReader.metrics;return t.isFont=!0,t.items.setValue(this.dictionaryProperties.type,new o(this.dictionaryProperties.fontDescriptor)),t.items.setValue(this.dictionaryProperties.fontName,new o(this.subsetName)),t.items.setValue(this.dictionaryProperties.flags,new g(this.getDescriptorFlags())),t.items.setValue(this.dictionaryProperties.fontBBox,m.fromRectangle(this.getBoundBox())),t.items.setValue(this.dictionaryProperties.missingWidth,new g(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.stemV,new g(e.stemV)),t.items.setValue(this.dictionaryProperties.italicAngle,new g(e.italicAngle)),t.items.setValue(this.dictionaryProperties.capHeight,new g(e.capHeight)),t.items.setValue(this.dictionaryProperties.ascent,new g(e.winAscent)),t.items.setValue(this.dictionaryProperties.descent,new g(e.winDescent)),t.items.setValue(this.dictionaryProperties.leading,new g(e.leading)),t.items.setValue(this.dictionaryProperties.avgWidth,new g(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.fontFile2,new C(this.fontProgram)),t.items.setValue(this.dictionaryProperties.maxWidth,new g(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.xHeight,new g(0)),t.items.setValue(this.dictionaryProperties.stemH,new g(0)),t},e.prototype.createCmap=function(){this.cmap.cmapBeginSave=new w(this)},e.prototype.createFontDictionary=function(){this.fontDictionary.isFont=!0,this.fontDictionary.fontDictionaryBeginSave=new c(this),this.fontDictionary.items.setValue(this.dictionaryProperties.type,new o(this.dictionaryProperties.font)),this.fontDictionary.items.setValue(this.dictionaryProperties.baseFont,new o(this.subsetName)),this.fontDictionary.items.setValue(this.dictionaryProperties.subtype,new o(this.dictionaryProperties.type0)),this.fontDictionary.items.setValue(this.dictionaryProperties.encoding,new o(this.dictionaryProperties.identityH));var t=new m,e=new C(this.descendantFont);t.isFont=!0,t.add(e),this.fontDictionary.items.setValue(this.dictionaryProperties.descendantFonts,t)},e.prototype.createFontProgram=function(){this.fontProgram.fontProgramBeginSave=new S(this)},e.prototype.createSystemInfo=function(){var t=new h;return t.items.setValue(this.dictionaryProperties.registry,new P("Adobe")),t.items.setValue(this.dictionaryProperties.ordering,new P(this.dictionaryProperties.identity)),t.items.setValue(this.dictionaryProperties.supplement,new g(0)),t},e.prototype.descendantFontBeginSave=function(){if(null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0){var t=this.getDescendantWidth();null!==t&&this.descendantFont.items.setValue(this.dictionaryProperties.w,t)}},e.prototype.cmapBeginSave=function(){this.generateCmap()},e.prototype.fontDictionaryBeginSave=function(){null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0&&!this.fontDictionary.containsKey(this.dictionaryProperties.toUnicode)&&this.fontDictionary.items.setValue(this.dictionaryProperties.toUnicode,new C(this.cmap))},e.prototype.fontProgramBeginSave=function(){this.isCompress=!0,this.generateFontProgram()},e.prototype.getDescendantWidth=function(){var t=new m;if(null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0){for(var e=[],i=this.usedChars.keys(),r=0;r<i.length;r++){var n=i[r];(l=this.ttfReader.getGlyph(n)).empty||e.push(l)}e.sort(function(t,e){return t.index-e.index});for(var o=0,s=0,a=!1,h=new m,r=0;r<e.length;r++){var l=e[r];a||(a=!0,o=l.index,s=l.index-1),(s+1!==l.index||r+1===e.length)&&e.length>1&&(t.add(new g(o)),0!==r&&t.add(h),o=l.index,h=new m),h.add(new g(l.width)),r+1===e.length&&(t.add(new g(o)),t.add(h)),s=l.index}}return t},e.prototype.generateCmap=function(){if(null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0){var t=this.ttfReader.getGlyphChars(this.usedChars);if(t.size()>0){var e=t.keys().sort(),i=e[0],r=e[e.length-1],n=this.toHexString(i,!1)+this.toHexString(r,!1)+s.newLine,o="";o+=this.cmapPrefix,o+=n,o+=this.cmapEndCodespaceRange;for(var a=0,h=0;h<e.length;h++){0===a&&(0!==h&&(o+=this.cmapEndRange),o+=a=Math.min(100,e.length-h),o+=s.whiteSpace,o+=this.cmapBeginRange),a-=1;var l=e[h];o+=this.toHexString(l,!0)+this.toHexString(l,!0)+this.toHexString(t.getValue(l),!0)+"\n"}o+=this.cmapSuffix,this.cmap.clearStream(),this.cmap.isFont=!0,this.cmap.write(o)}}},e.prototype.generateFontProgram=function(){var t=null;this.usedChars=null===this.usedChars||void 0===this.usedChars?new n:this.usedChars,this.ttfReader.setOffset(0),t=this.ttfReader.readFontProgram(this.usedChars),this.fontProgram.clearStream(),this.fontProgram.isFont=!0,this.fontProgram.writeBytes(t)},e.prototype.getDescriptorFlags=function(){var e=0,i=this.ttfReader.metrics;return i.isFixedPitch&&(e|=t.FontDescriptorFlags.FixedPitch),i.isSymbol?e|=t.FontDescriptorFlags.Symbolic:e|=t.FontDescriptorFlags.Nonsymbolic,i.isItalic&&(e|=t.FontDescriptorFlags.Italic),i.isBold&&(e|=t.FontDescriptorFlags.ForceBold),e},e.prototype.getBoundBox=function(){var t=this.ttfReader.metrics.fontBox,e=Math.abs(t.right-t.left),i=Math.abs(t.top-t.bottom);return new k(t.left,t.bottom,e,i)},e.prototype.toHexString=function(t,e){var i=t.toString(16);return e&&(i=i.toUpperCase()),"<0000".substring(0,5-i.length)+i+">"},e.prototype.setSymbols=function(t){if(null===t)throw new Error("Argument Null Exception : text");null!==this.usedChars&&void 0!==this.usedChars||(this.usedChars=new n);for(var e=0;e<t.length;e++){var i=t[e];this.usedChars.setValue(i,String.fromCharCode(0))}!1===this.isEmbedFont&&this.getDescendantWidth()},e}(),zt=function(){function t(){this.arabicCharTable=[["ء","ﺀ"],["آ","ﺁ","ﺂ"],["أ","ﺃ","ﺄ"],["ؤ","ﺅ","ﺆ"],["إ","ﺇ","ﺈ"],["ئ","ﺉ","ﺊ","ﺋ","ﺌ"],["ا","ﺍ","ﺎ"],["ب","ﺏ","ﺐ","ﺑ","ﺒ"],["ة","ﺓ","ﺔ"],["ت","ﺕ","ﺖ","ﺗ","ﺘ"],["ث","ﺙ","ﺚ","ﺛ","ﺜ"],["ج","ﺝ","ﺞ","ﺟ","ﺠ"],["ح","ﺡ","ﺢ","ﺣ","ﺤ"],["خ","ﺥ","ﺦ","ﺧ","ﺨ"],["د","ﺩ","ﺪ"],["ذ","ﺫ","ﺬ"],["ر","ﺭ","ﺮ"],["ز","ﺯ","ﺰ"],["س","ﺱ","ﺲ","ﺳ","ﺴ"],["ش","ﺵ","ﺶ","ﺷ","ﺸ"],["ص","ﺹ","ﺺ","ﺻ","ﺼ"],["ض","ﺽ","ﺾ","ﺿ","ﻀ"],["ط","ﻁ","ﻂ","ﻃ","ﻄ"],["ظ","ﻅ","ﻆ","ﻇ","ﻈ"],["ع","ﻉ","ﻊ","ﻋ","ﻌ"],["غ","ﻍ","ﻎ","ﻏ","ﻐ"],["ـ","ـ","ـ","ـ","ـ"],["ف","ﻑ","ﻒ","ﻓ","ﻔ"],["ق","ﻕ","ﻖ","ﻗ","ﻘ"],["ك","ﻙ","ﻚ","ﻛ","ﻜ"],["ل","ﻝ","ﻞ","ﻟ","ﻠ"],["م","ﻡ","ﻢ","ﻣ","ﻤ"],["ن","ﻥ","ﻦ","ﻧ","ﻨ"],["ه","ﻩ","ﻪ","ﻫ","ﻬ"],["و","ﻭ","ﻮ"],["ى","ﻯ","ﻰ","ﯨ","ﯩ"],["ي","ﻱ","ﻲ","ﻳ","ﻴ"],["ٱ","ﭐ","ﭑ"],["ٹ","ﭦ","ﭧ","ﭨ","ﭩ"],["ٺ","ﭞ","ﭟ","ﭠ","ﭡ"],["ٻ","ﭒ","ﭓ","ﭔ","ﭕ"],["پ","ﭖ","ﭗ","ﭘ","ﭙ"],["ٿ","ﭢ","ﭣ","ﭤ","ﭥ"],["ڀ","ﭚ","ﭛ","ﭜ","ﭝ"],["ڃ","ﭶ","ﭷ","ﭸ","ﭹ"],["ڄ","ﭲ","ﭳ","ﭴ","ﭵ"],["چ","ﭺ","ﭻ","ﭼ","ﭽ"],["ڇ","ﭾ","ﭿ","ﮀ","ﮁ"],["ڈ","ﮈ","ﮉ"],["ڌ","ﮄ","ﮅ"],["ڍ","ﮂ","ﮃ"],["ڎ","ﮆ","ﮇ"],["ڑ","ﮌ","ﮍ"],["ژ","ﮊ","ﮋ"],["ڤ","ﭪ","ﭫ","ﭬ","ﭭ"],["ڦ","ﭮ","ﭯ","ﭰ","ﭱ"],["ک","ﮎ","ﮏ","ﮐ","ﮑ"],["ڭ","ﯓ","ﯔ","ﯕ","ﯖ"],["گ","ﮒ","ﮓ","ﮔ","ﮕ"],["ڱ","ﮚ","ﮛ","ﮜ","ﮝ"],["ڳ","ﮖ","ﮗ","ﮘ","ﮙ"],["ں","ﮞ","ﮟ"],["ڻ","ﮠ","ﮡ","ﮢ","ﮣ"],["ھ","ﮪ","ﮫ","ﮬ","ﮭ"],["ۀ","ﮤ","ﮥ"],["ہ","ﮦ","ﮧ","ﮨ","ﮩ"],["ۅ","ﯠ","ﯡ"],["ۆ","ﯙ","ﯚ"],["ۇ","ﯗ","ﯘ"],["ۈ","ﯛ","ﯜ"],["ۉ","ﯢ","ﯣ"],["ۋ","ﯞ","ﯟ"],["ی","ﯼ","ﯽ","ﯾ","ﯿ"],["ې","ﯤ","ﯥ","ﯦ","ﯧ"],["ے","ﮮ","ﮯ"],["ۓ","ﮰ","ﮱ"]],this.alef="ا",this.alefHamza="أ",this.alefHamzaBelow="إ",this.alefMadda="آ",this.lam="ل",this.hamza="ء",this.zeroWidthJoiner="",this.hamzaAbove="ٔ",this.hamzaBelow="ٕ",this.wawHamza="ؤ",this.yehHamza="ئ",this.waw="و",this.alefMaksura="ى",this.yeh="ي",this.farsiYeh="ی",this.shadda="ّ",this.madda="ٓ",this.lwa="ﻻ",this.lwawh="ﻷ",this.lwawhb="ﻹ",this.lwawm="ﻵ",this.bwhb="ۓ",this.fathatan="ً",this.superScriptalef="ٰ",this.vowel=1,this.arabicMapTable=new n;for(var t=0;t<this.arabicCharTable.length;t++)this.arabicMapTable.setValue(this.arabicCharTable[t][0],this.arabicCharTable[t])}return t.prototype.getCharacterShape=function(t,e){if(t>=this.hamza&&t<=this.bwhb){if(this.arabicMapTable.getValue(t))return this.arabicMapTable.getValue(t)[e+1]}else if(t>=this.lwawm&&t<=this.lwa)return t;return t},t.prototype.shape=function(t,e){for(var i="",r="",n=0;n<t.length;n++){var o=t[n];o>=""&&o<="ۿ"?r+=o:(r.length>0&&(i+=s=this.doShape(r.toString(),0),r=""),i+=o)}if(r.length>0){var s=this.doShape(r.toString(),0);i+=s}return i.toString()},t.prototype.doShape=function(t,e){for(var i="",r=0,n=0,o="",s=new Wt,a=new Wt;n<t.length;)if(o=t[n++],0===this.ligature(o,a)){var h=this.getShapeCount(o);r=1===h?0:2,s.Shapes>2&&(r+=1),r%=a.Shapes,a.Value=this.getCharacterShape(a.Value,r),i=this.append(i,s,e),s=a,(a=new Wt).Value=o,a.Shapes=h,a.Ligature++}return r=s.Shapes>2?1:0,r%=a.Shapes,a.Value=this.getCharacterShape(a.Value,r),i=this.append(i,s,e),(i=this.append(i,a,e)).toString()},t.prototype.append=function(t,e,i){return""!==e.Value&&(t+=e.Value,e.Ligature-=1,""!==e.Type&&(0==(i&this.vowel)?(t+=e.Type,e.Ligature-=1):e.Ligature-=1),""!==e.vowel&&(0==(i&this.vowel)?(t+=e.vowel,e.Ligature-=1):e.Ligature-=1)),t},t.prototype.ligature=function(t,e){if(""!==e.Value){var i=0;if(t>=this.fathatan&&t<=this.hamzaBelow||t===this.superScriptalef){if(i=1,""!==e.vowel&&t!==this.shadda&&(i=2),t===this.shadda){if(null!=e.Type)return 0;e.Type=this.shadda}else t===this.hamzaBelow?e.Value===this.alef?(e.Value=this.alefHamzaBelow,i=2):t===this.lwa?(e.Value=this.lwawhb,i=2):e.Type=this.hamzaBelow:t===this.hamzaAbove?e.Value===this.alef?(e.Value=this.alefHamza,i=2):e.Value===this.lwa?(e.Value=this.lwawh,i=2):e.Value===this.waw?(e.Value=this.wawHamza,i=2):e.Value===this.yeh||e.Value===this.alefMaksura||e.Value===this.farsiYeh?(e.Value=this.yehHamza,i=2):e.Type=this.hamzaAbove:t===this.madda?e.Value===this.alef&&(e.Value=this.alefMadda,i=2):e.vowel=t;return 1===i&&e.Ligature++,i}return""!==e.vowel?0:(e.Value===this.lam&&(t===this.alef?(e.Value=this.lwa,e.Shapes=2,i=3):t===this.alefHamza?(e.Value=this.lwawh,e.Shapes=2,i=3):t===this.alefHamzaBelow?(e.Value=this.lwawhb,e.Shapes=2,i=3):t===this.alefMadda&&(e.Value=this.lwawm,e.Shapes=2,i=3)),i)}return 0},t.prototype.getShapeCount=function(t){if(t>=this.hamza&&t<=this.bwhb&&!(t>=this.fathatan&&t<=this.hamzaBelow||t===this.superScriptalef)){if(this.arabicMapTable.getValue(t))return this.arabicMapTable.getValue(t).length-1}else if(t===this.zeroWidthJoiner)return 4;return 1},t}(),Wt=function(){function t(){this.shapeValue="",this.shapeType="",this.shapeVowel="",this.shapeLigature=0,this.shapeShapes=1}return Object.defineProperty(t.prototype,"Value",{get:function(){return this.shapeValue},set:function(t){this.shapeValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Type",{get:function(){return this.shapeType},set:function(t){this.shapeType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vowel",{get:function(){return this.shapeVowel},set:function(t){this.shapeVowel=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Ligature",{get:function(){return this.shapeLigature},set:function(t){this.shapeLigature=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Shapes",{get:function(){return this.shapeShapes},set:function(t){this.shapeShapes=t},enumerable:!0,configurable:!0}),t}(),Ht=function(){function t(){this.indexes=[],this.indexLevels=[],this.mirroringShapeCharacters=new n,this.update()}return t.prototype.doMirrorShaping=function(t){for(var e=[],i=0;i<t.length;i++)1==(1&this.indexLevels[i])&&this.mirroringShapeCharacters.containsKey(t[i].charCodeAt(0))?e[i]=String.fromCharCode(this.mirroringShapeCharacters.getValue(t[i].charCodeAt(0))):e[i]=t[i].toString();for(var r="",n=0;n<e.length;n++)r+=e[n];return r},t.prototype.getLogicalToVisualString=function(t,e){var i=new _t;this.indexLevels=i.getVisualOrder(t,e),this.setDefaultIndexLevel(),this.doOrder(0,this.indexLevels.length-1);for(var r=this.doMirrorShaping(t),n="",o=0;o<this.indexes.length;o++)n+=r[this.indexes[o]];return n.toString()},t.prototype.setDefaultIndexLevel=function(){for(var t=0;t<this.indexLevels.length;t++)this.indexes[t]=t},t.prototype.doOrder=function(t,e){for(var i=this.indexLevels[t],r=i,n=i,o=i,s=t+1;s<=e;++s){var a=this.indexLevels[s];a>i?i=a:a<r&&(r=a),n&=a,o|=a}if(0!=(1&o)){if(1==(1&n))return void this.reArrange(t,e+1);for(r|=1;i>=r;){for(var h=t;;){for(;h<=e&&!(this.indexLevels[h]>=i);)h+=1;if(h>e)break;for(var l=h+1;l<=e&&!(this.indexLevels[l]<i);)l+=1;this.reArrange(h,l),h=l+1}i-=1}}},t.prototype.reArrange=function(t,e){var i=(t+e)/2;for(--e;t<i;++t,--e){var r=this.indexes[t];this.indexes[t]=this.indexes[e],this.indexes[e]=r}},t.prototype.update=function(){this.mirroringShapeCharacters.setValue(40,41),this.mirroringShapeCharacters.setValue(41,40),this.mirroringShapeCharacters.setValue(60,62),this.mirroringShapeCharacters.setValue(62,60),this.mirroringShapeCharacters.setValue(91,93),this.mirroringShapeCharacters.setValue(93,91),this.mirroringShapeCharacters.setValue(123,125),this.mirroringShapeCharacters.setValue(125,123),this.mirroringShapeCharacters.setValue(171,187),this.mirroringShapeCharacters.setValue(187,171),this.mirroringShapeCharacters.setValue(8249,8250),this.mirroringShapeCharacters.setValue(8250,8249),this.mirroringShapeCharacters.setValue(8261,8262),this.mirroringShapeCharacters.setValue(8262,8261),this.mirroringShapeCharacters.setValue(8317,8318),this.mirroringShapeCharacters.setValue(8318,8317),this.mirroringShapeCharacters.setValue(8333,8334),this.mirroringShapeCharacters.setValue(8334,8333),this.mirroringShapeCharacters.setValue(8712,8715),this.mirroringShapeCharacters.setValue(8713,8716),this.mirroringShapeCharacters.setValue(8714,8717),this.mirroringShapeCharacters.setValue(8715,8712),this.mirroringShapeCharacters.setValue(8716,8713),this.mirroringShapeCharacters.setValue(8717,8714),this.mirroringShapeCharacters.setValue(8725,10741),this.mirroringShapeCharacters.setValue(8764,8765),this.mirroringShapeCharacters.setValue(8765,8764),this.mirroringShapeCharacters.setValue(8771,8909),this.mirroringShapeCharacters.setValue(8786,8787),this.mirroringShapeCharacters.setValue(8787,8786),this.mirroringShapeCharacters.setValue(8788,8789),this.mirroringShapeCharacters.setValue(8789,8788),this.mirroringShapeCharacters.setValue(8804,8805),this.mirroringShapeCharacters.setValue(8805,8804),this.mirroringShapeCharacters.setValue(8806,8807),this.mirroringShapeCharacters.setValue(8807,8806),this.mirroringShapeCharacters.setValue(8808,8809),this.mirroringShapeCharacters.setValue(8809,8808),this.mirroringShapeCharacters.setValue(8810,8811),this.mirroringShapeCharacters.setValue(8811,8810),this.mirroringShapeCharacters.setValue(8814,8815),this.mirroringShapeCharacters.setValue(8815,8814),this.mirroringShapeCharacters.setValue(8816,8817),this.mirroringShapeCharacters.setValue(8817,8816),this.mirroringShapeCharacters.setValue(8818,8819),this.mirroringShapeCharacters.setValue(8819,8818),this.mirroringShapeCharacters.setValue(8820,8821),this.mirroringShapeCharacters.setValue(8821,8820),this.mirroringShapeCharacters.setValue(8822,8823),this.mirroringShapeCharacters.setValue(8823,8822),this.mirroringShapeCharacters.setValue(8824,8825),this.mirroringShapeCharacters.setValue(8825,8824),this.mirroringShapeCharacters.setValue(8826,8827),this.mirroringShapeCharacters.setValue(8827,8826),this.mirroringShapeCharacters.setValue(8828,8829),this.mirroringShapeCharacters.setValue(8829,8828),this.mirroringShapeCharacters.setValue(8830,8831),this.mirroringShapeCharacters.setValue(8831,8830),this.mirroringShapeCharacters.setValue(8832,8833),this.mirroringShapeCharacters.setValue(8833,8832),this.mirroringShapeCharacters.setValue(8834,8835),this.mirroringShapeCharacters.setValue(8835,8834),this.mirroringShapeCharacters.setValue(8836,8837),this.mirroringShapeCharacters.setValue(8837,8836),this.mirroringShapeCharacters.setValue(8838,8839),this.mirroringShapeCharacters.setValue(8839,8838),this.mirroringShapeCharacters.setValue(8840,8841),this.mirroringShapeCharacters.setValue(8841,8840),this.mirroringShapeCharacters.setValue(8842,8843),this.mirroringShapeCharacters.setValue(8843,8842),this.mirroringShapeCharacters.setValue(8847,8848),this.mirroringShapeCharacters.setValue(8848,8847),this.mirroringShapeCharacters.setValue(8849,8850),this.mirroringShapeCharacters.setValue(8850,8849),this.mirroringShapeCharacters.setValue(8856,10680),this.mirroringShapeCharacters.setValue(8866,8867),this.mirroringShapeCharacters.setValue(8867,8866),this.mirroringShapeCharacters.setValue(8870,10974),this.mirroringShapeCharacters.setValue(8872,10980),this.mirroringShapeCharacters.setValue(8873,10979),this.mirroringShapeCharacters.setValue(8875,10981),this.mirroringShapeCharacters.setValue(8880,8881),this.mirroringShapeCharacters.setValue(8881,8880),this.mirroringShapeCharacters.setValue(8882,8883),this.mirroringShapeCharacters.setValue(8883,8882),this.mirroringShapeCharacters.setValue(8884,8885),this.mirroringShapeCharacters.setValue(8885,8884),this.mirroringShapeCharacters.setValue(8886,8887),this.mirroringShapeCharacters.setValue(8887,8886),this.mirroringShapeCharacters.setValue(8905,8906),this.mirroringShapeCharacters.setValue(8906,8905),this.mirroringShapeCharacters.setValue(8907,8908),this.mirroringShapeCharacters.setValue(8908,8907),this.mirroringShapeCharacters.setValue(8909,8771),this.mirroringShapeCharacters.setValue(8912,8913),this.mirroringShapeCharacters.setValue(8913,8912),this.mirroringShapeCharacters.setValue(8918,8919),this.mirroringShapeCharacters.setValue(8919,8918),this.mirroringShapeCharacters.setValue(8920,8921),this.mirroringShapeCharacters.setValue(8921,8920),this.mirroringShapeCharacters.setValue(8922,8923),this.mirroringShapeCharacters.setValue(8923,8922),this.mirroringShapeCharacters.setValue(8924,8925),this.mirroringShapeCharacters.setValue(8925,8924),this.mirroringShapeCharacters.setValue(8926,8927),this.mirroringShapeCharacters.setValue(8927,8926),this.mirroringShapeCharacters.setValue(8928,8929),this.mirroringShapeCharacters.setValue(8929,8928),this.mirroringShapeCharacters.setValue(8930,8931),this.mirroringShapeCharacters.setValue(8931,8930),this.mirroringShapeCharacters.setValue(8932,8933),this.mirroringShapeCharacters.setValue(8933,8932),this.mirroringShapeCharacters.setValue(8934,8935),this.mirroringShapeCharacters.setValue(8935,8934),this.mirroringShapeCharacters.setValue(8936,8937),this.mirroringShapeCharacters.setValue(8937,8936),this.mirroringShapeCharacters.setValue(8938,8939),this.mirroringShapeCharacters.setValue(8939,8938),this.mirroringShapeCharacters.setValue(8940,8941),this.mirroringShapeCharacters.setValue(8941,8940),this.mirroringShapeCharacters.setValue(8944,8945),this.mirroringShapeCharacters.setValue(8945,8944),this.mirroringShapeCharacters.setValue(8946,8954),this.mirroringShapeCharacters.setValue(8947,8955),this.mirroringShapeCharacters.setValue(8948,8956),this.mirroringShapeCharacters.setValue(8950,8957),this.mirroringShapeCharacters.setValue(8951,8958),this.mirroringShapeCharacters.setValue(8954,8946),this.mirroringShapeCharacters.setValue(8955,8947),this.mirroringShapeCharacters.setValue(8956,8948),this.mirroringShapeCharacters.setValue(8957,8950),this.mirroringShapeCharacters.setValue(8958,8951),this.mirroringShapeCharacters.setValue(8968,8969),this.mirroringShapeCharacters.setValue(8969,8968),this.mirroringShapeCharacters.setValue(8970,8971),this.mirroringShapeCharacters.setValue(8971,8970),this.mirroringShapeCharacters.setValue(9001,9002),this.mirroringShapeCharacters.setValue(9002,9001),this.mirroringShapeCharacters.setValue(10088,10089),this.mirroringShapeCharacters.setValue(10089,10088),this.mirroringShapeCharacters.setValue(10090,10091),this.mirroringShapeCharacters.setValue(10091,10090),this.mirroringShapeCharacters.setValue(10092,10093),this.mirroringShapeCharacters.setValue(10093,10092),this.mirroringShapeCharacters.setValue(10094,10095),this.mirroringShapeCharacters.setValue(10095,10094),this.mirroringShapeCharacters.setValue(10096,10097),this.mirroringShapeCharacters.setValue(10097,10096),this.mirroringShapeCharacters.setValue(10098,10099),this.mirroringShapeCharacters.setValue(10099,10098),this.mirroringShapeCharacters.setValue(10100,10101),this.mirroringShapeCharacters.setValue(10101,10100),this.mirroringShapeCharacters.setValue(10197,10198),this.mirroringShapeCharacters.setValue(10198,10197),this.mirroringShapeCharacters.setValue(10205,10206),this.mirroringShapeCharacters.setValue(10206,10205),this.mirroringShapeCharacters.setValue(10210,10211),this.mirroringShapeCharacters.setValue(10211,10210),this.mirroringShapeCharacters.setValue(10212,10213),this.mirroringShapeCharacters.setValue(10213,10212),this.mirroringShapeCharacters.setValue(10214,10215),this.mirroringShapeCharacters.setValue(10215,10214),this.mirroringShapeCharacters.setValue(10216,10217),this.mirroringShapeCharacters.setValue(10217,10216),this.mirroringShapeCharacters.setValue(10218,10219),this.mirroringShapeCharacters.setValue(10219,10218),this.mirroringShapeCharacters.setValue(10627,10628),this.mirroringShapeCharacters.setValue(10628,10627),this.mirroringShapeCharacters.setValue(10629,10630),this.mirroringShapeCharacters.setValue(10630,10629),this.mirroringShapeCharacters.setValue(10631,10632),this.mirroringShapeCharacters.setValue(10632,10631),this.mirroringShapeCharacters.setValue(10633,10634),this.mirroringShapeCharacters.setValue(10634,10633),this.mirroringShapeCharacters.setValue(10635,10636),this.mirroringShapeCharacters.setValue(10636,10635),this.mirroringShapeCharacters.setValue(10637,10640),this.mirroringShapeCharacters.setValue(10638,10639),this.mirroringShapeCharacters.setValue(10639,10638),this.mirroringShapeCharacters.setValue(10640,10637),this.mirroringShapeCharacters.setValue(10641,10642),this.mirroringShapeCharacters.setValue(10642,10641),this.mirroringShapeCharacters.setValue(10643,10644),this.mirroringShapeCharacters.setValue(10644,10643),this.mirroringShapeCharacters.setValue(10645,10646),this.mirroringShapeCharacters.setValue(10646,10645),this.mirroringShapeCharacters.setValue(10647,10648),this.mirroringShapeCharacters.setValue(10648,10647),this.mirroringShapeCharacters.setValue(10680,8856),this.mirroringShapeCharacters.setValue(10688,10689),this.mirroringShapeCharacters.setValue(10689,10688),this.mirroringShapeCharacters.setValue(10692,10693),this.mirroringShapeCharacters.setValue(10693,10692),this.mirroringShapeCharacters.setValue(10703,10704),this.mirroringShapeCharacters.setValue(10704,10703),this.mirroringShapeCharacters.setValue(10705,10706),this.mirroringShapeCharacters.setValue(10706,10705),this.mirroringShapeCharacters.setValue(10708,10709),this.mirroringShapeCharacters.setValue(10709,10708),this.mirroringShapeCharacters.setValue(10712,10713),this.mirroringShapeCharacters.setValue(10713,10712),this.mirroringShapeCharacters.setValue(10714,10715),this.mirroringShapeCharacters.setValue(10715,10714),this.mirroringShapeCharacters.setValue(10741,8725),this.mirroringShapeCharacters.setValue(10744,10745),this.mirroringShapeCharacters.setValue(10745,10744),this.mirroringShapeCharacters.setValue(10748,10749),this.mirroringShapeCharacters.setValue(10749,10748),this.mirroringShapeCharacters.setValue(10795,10796),this.mirroringShapeCharacters.setValue(10796,10795),this.mirroringShapeCharacters.setValue(10797,10796),this.mirroringShapeCharacters.setValue(10798,10797),this.mirroringShapeCharacters.setValue(10804,10805),this.mirroringShapeCharacters.setValue(10805,10804),this.mirroringShapeCharacters.setValue(10812,10813),this.mirroringShapeCharacters.setValue(10813,10812),this.mirroringShapeCharacters.setValue(10852,10853),this.mirroringShapeCharacters.setValue(10853,10852),this.mirroringShapeCharacters.setValue(10873,10874),this.mirroringShapeCharacters.setValue(10874,10873),this.mirroringShapeCharacters.setValue(10877,10878),this.mirroringShapeCharacters.setValue(10878,10877),this.mirroringShapeCharacters.setValue(10879,10880),this.mirroringShapeCharacters.setValue(10880,10879),this.mirroringShapeCharacters.setValue(10881,10882),this.mirroringShapeCharacters.setValue(10882,10881),this.mirroringShapeCharacters.setValue(10883,10884),this.mirroringShapeCharacters.setValue(10884,10883),this.mirroringShapeCharacters.setValue(10891,10892),this.mirroringShapeCharacters.setValue(10892,10891),this.mirroringShapeCharacters.setValue(10897,10898),this.mirroringShapeCharacters.setValue(10898,10897),this.mirroringShapeCharacters.setValue(10899,10900),this.mirroringShapeCharacters.setValue(10900,10899),this.mirroringShapeCharacters.setValue(10901,10902),this.mirroringShapeCharacters.setValue(10902,10901),this.mirroringShapeCharacters.setValue(10903,10904),this.mirroringShapeCharacters.setValue(10904,10903),this.mirroringShapeCharacters.setValue(10905,10906),this.mirroringShapeCharacters.setValue(10906,10905),this.mirroringShapeCharacters.setValue(10907,10908),this.mirroringShapeCharacters.setValue(10908,10907),this.mirroringShapeCharacters.setValue(10913,10914),this.mirroringShapeCharacters.setValue(10914,10913),this.mirroringShapeCharacters.setValue(10918,10919),this.mirroringShapeCharacters.setValue(10919,10918),this.mirroringShapeCharacters.setValue(10920,10921),this.mirroringShapeCharacters.setValue(10921,10920),this.mirroringShapeCharacters.setValue(10922,10923),this.mirroringShapeCharacters.setValue(10923,10922),this.mirroringShapeCharacters.setValue(10924,10925),this.mirroringShapeCharacters.setValue(10925,10924),this.mirroringShapeCharacters.setValue(10927,10928),this.mirroringShapeCharacters.setValue(10928,10927),this.mirroringShapeCharacters.setValue(10931,10932),this.mirroringShapeCharacters.setValue(10932,10931),this.mirroringShapeCharacters.setValue(10939,10940),this.mirroringShapeCharacters.setValue(10940,10939),this.mirroringShapeCharacters.setValue(10941,10942),this.mirroringShapeCharacters.setValue(10942,10941),this.mirroringShapeCharacters.setValue(10943,10944),this.mirroringShapeCharacters.setValue(10944,10943),this.mirroringShapeCharacters.setValue(10945,10946),this.mirroringShapeCharacters.setValue(10946,10945),this.mirroringShapeCharacters.setValue(10947,10948),this.mirroringShapeCharacters.setValue(10948,10947),this.mirroringShapeCharacters.setValue(10949,10950),this.mirroringShapeCharacters.setValue(10950,10949),this.mirroringShapeCharacters.setValue(10957,10958),this.mirroringShapeCharacters.setValue(10958,10957),this.mirroringShapeCharacters.setValue(10959,10960),this.mirroringShapeCharacters.setValue(10960,10959),this.mirroringShapeCharacters.setValue(10961,10962),this.mirroringShapeCharacters.setValue(10962,10961),this.mirroringShapeCharacters.setValue(10963,10964),this.mirroringShapeCharacters.setValue(10964,10963),this.mirroringShapeCharacters.setValue(10965,10966),this.mirroringShapeCharacters.setValue(10966,10965),this.mirroringShapeCharacters.setValue(10974,8870),this.mirroringShapeCharacters.setValue(10979,8873),this.mirroringShapeCharacters.setValue(10980,8872),this.mirroringShapeCharacters.setValue(10981,8875),this.mirroringShapeCharacters.setValue(10988,10989),this.mirroringShapeCharacters.setValue(10989,10988),this.mirroringShapeCharacters.setValue(10999,11e3),this.mirroringShapeCharacters.setValue(11e3,10999),this.mirroringShapeCharacters.setValue(11001,11002),this.mirroringShapeCharacters.setValue(11002,11001),this.mirroringShapeCharacters.setValue(12296,12297),this.mirroringShapeCharacters.setValue(12297,12296),this.mirroringShapeCharacters.setValue(12298,12299),this.mirroringShapeCharacters.setValue(12299,12298),this.mirroringShapeCharacters.setValue(12300,12301),this.mirroringShapeCharacters.setValue(12301,12300),this.mirroringShapeCharacters.setValue(12302,12303),this.mirroringShapeCharacters.setValue(12303,12302),this.mirroringShapeCharacters.setValue(12304,12305),this.mirroringShapeCharacters.setValue(12305,12304),this.mirroringShapeCharacters.setValue(12308,12309),this.mirroringShapeCharacters.setValue(12309,12308),this.mirroringShapeCharacters.setValue(12310,12311),this.mirroringShapeCharacters.setValue(12311,12310),this.mirroringShapeCharacters.setValue(12312,12313),this.mirroringShapeCharacters.setValue(12313,12312),this.mirroringShapeCharacters.setValue(12314,12315),this.mirroringShapeCharacters.setValue(12315,12314),this.mirroringShapeCharacters.setValue(65288,65289),this.mirroringShapeCharacters.setValue(65289,65288),this.mirroringShapeCharacters.setValue(65308,65310),this.mirroringShapeCharacters.setValue(65310,65308),this.mirroringShapeCharacters.setValue(65339,65341),this.mirroringShapeCharacters.setValue(65341,65339),this.mirroringShapeCharacters.setValue(65371,65373),this.mirroringShapeCharacters.setValue(65373,65371),this.mirroringShapeCharacters.setValue(65375,65376),this.mirroringShapeCharacters.setValue(65376,65375),this.mirroringShapeCharacters.setValue(65378,65379),this.mirroringShapeCharacters.setValue(65379,65378)},t}(),_t=function(){function t(){this.types=[],this.textOrder=-1,this.rtlCharacterTypes=new Array(65536),this.L=0,this.LRE=1,this.LRO=2,this.R=3,this.AL=4,this.RLE=5,this.RLO=6,this.PDF=7,this.EN=8,this.ES=9,this.ET=10,this.AN=11,this.CS=12,this.NSM=13,this.BN=14,this.B=15,this.S=16,this.WS=17,this.ON=18,this.charTypes=[this.L,this.EN,this.BN,this.ES,this.ES,this.S,this.ET,this.ET,this.B,this.AN,this.AN,this.S,this.CS,this.CS,this.WS,this.NSM,this.NSM,this.B,this.BN,27,this.BN,28,30,this.B,31,31,this.S,32,32,this.WS,33,34,this.ON,35,37,this.ET,38,42,this.ON,43,43,this.ET,44,44,this.CS,45,45,this.ET,46,46,this.CS,47,47,this.CS,48,57,this.EN,58,58,this.CS,59,64,this.ON,65,90,this.L,91,96,this.ON,97,122,this.L,123,126,this.ON,127,132,this.BN,133,133,this.B,134,159,this.BN,160,160,this.CS,161,161,this.ON,162,165,this.ET,166,169,this.ON,170,170,this.L,171,175,this.ON,176,177,this.ET,178,179,this.EN,180,180,this.ON,181,181,this.L,182,184,this.ON,185,185,this.EN,186,186,this.L,187,191,this.ON,192,214,this.L,215,215,this.ON,216,246,this.L,247,247,this.ON,248,696,this.L,697,698,this.ON,699,705,this.L,706,719,this.ON,720,721,this.L,722,735,this.ON,736,740,this.L,741,749,this.ON,750,750,this.L,751,767,this.ON,768,855,this.NSM,856,860,this.L,861,879,this.NSM,880,883,this.L,884,885,this.ON,886,893,this.L,894,894,this.ON,895,899,this.L,900,901,this.ON,902,902,this.L,903,903,this.ON,904,1013,this.L,1014,1014,this.ON,1015,1154,this.L,1155,1158,this.NSM,1159,1159,this.L,1160,1161,this.NSM,1162,1417,this.L,1418,1418,this.ON,1419,1424,this.L,1425,1441,this.NSM,1442,1442,this.L,1443,1465,this.NSM,1466,1466,this.L,1467,1469,this.NSM,1470,1470,this.R,1471,1471,this.NSM,1472,1472,this.R,1473,1474,this.NSM,1475,1475,this.R,1476,1476,this.NSM,1477,1487,this.L,1488,1514,this.R,1515,1519,this.L,1520,1524,this.R,1525,1535,this.L,1536,1539,this.AL,1540,1547,this.L,1548,1548,this.CS,1549,1549,this.AL,1550,1551,this.ON,1552,1557,this.NSM,1558,1562,this.L,1563,1563,this.AL,1564,1566,this.L,1567,1567,this.AL,1568,1568,this.L,1569,1594,this.AL,1595,1599,this.L,1600,1610,this.AL,1611,1624,this.NSM,1625,1631,this.L,1632,1641,this.AN,1642,1642,this.ET,1643,1644,this.AN,1645,1647,this.AL,1648,1648,this.NSM,1649,1749,this.AL,1750,1756,this.NSM,1757,1757,this.AL,1758,1764,this.NSM,1765,1766,this.AL,1767,1768,this.NSM,1769,1769,this.ON,1770,1773,this.NSM,1774,1775,this.AL,1776,1785,this.EN,1786,1805,this.AL,1806,1806,this.L,1807,1807,this.BN,1808,1808,this.AL,1809,1809,this.NSM,1810,1839,this.AL,1840,1866,this.NSM,1867,1868,this.L,1869,1871,this.AL,1872,1919,this.L,1920,1957,this.AL,1958,1968,this.NSM,1969,1969,this.AL,1970,2304,this.L,2305,2306,this.NSM,2307,2363,this.L,2364,2364,this.NSM,2365,2368,this.L,2369,2376,this.NSM,2377,2380,this.L,2381,2381,this.NSM,2382,2384,this.L,2385,2388,this.NSM,2389,2401,this.L,2402,2403,this.NSM,2404,2432,this.L,2433,2433,this.NSM,2434,2491,this.L,2492,2492,this.NSM,2493,2496,this.L,2497,2500,this.NSM,2501,2508,this.L,2509,2509,this.NSM,2510,2529,this.L,2530,2531,this.NSM,2532,2545,this.L,2546,2547,this.ET,2548,2560,this.L,2561,2562,this.NSM,2563,2619,this.L,2620,2620,this.NSM,2621,2624,this.L,2625,2626,this.NSM,2627,2630,this.L,2631,2632,this.NSM,2633,2634,this.L,2635,2637,this.NSM,2638,2671,this.L,2672,2673,this.NSM,2674,2688,this.L,2689,2690,this.NSM,2691,2747,this.L,2748,2748,this.NSM,2749,2752,this.L,2753,2757,this.NSM,2758,2758,this.L,2759,2760,this.NSM,2761,2764,this.L,2765,2765,this.NSM,2766,2785,this.L,2786,2787,this.NSM,2788,2800,this.L,2801,2801,this.ET,2802,2816,this.L,2817,2817,this.NSM,2818,2875,this.L,2876,2876,this.NSM,2877,2878,this.L,2879,2879,this.NSM,2880,2880,this.L,2881,2883,this.NSM,2884,2892,this.L,2893,2893,this.NSM,2894,2901,this.L,2902,2902,this.NSM,2903,2945,this.L,2946,2946,this.NSM,2947,3007,this.L,3008,3008,this.NSM,3009,3020,this.L,3021,3021,this.NSM,3022,3058,this.L,3059,3064,this.ON,3065,3065,this.ET,3066,3066,this.ON,3067,3133,this.L,3134,3136,this.NSM,3137,3141,this.L,3142,3144,this.NSM,3145,3145,this.L,3146,3149,this.NSM,3150,3156,this.L,3157,3158,this.NSM,3159,3259,this.L,3260,3260,this.NSM,3261,3275,this.L,3276,3277,this.NSM,3278,3392,this.L,3393,3395,this.NSM,3396,3404,this.L,3405,3405,this.NSM,3406,3529,this.L,3530,3530,this.NSM,3531,3537,this.L,3538,3540,this.NSM,3541,3541,this.L,3542,3542,this.NSM,3543,3632,this.L,3633,3633,this.NSM,3634,3635,this.L,3636,3642,this.NSM,3643,3646,this.L,3647,3647,this.ET,3648,3654,this.L,3655,3662,this.NSM,3663,3760,this.L,3761,3761,this.NSM,3762,3763,this.L,3764,3769,this.NSM,3770,3770,this.L,3771,3772,this.NSM,3773,3783,this.L,3784,3789,this.NSM,3790,3863,this.L,3864,3865,this.NSM,3866,3892,this.L,3893,3893,this.NSM,3894,3894,this.L,3895,3895,this.NSM,3896,3896,this.L,3897,3897,this.NSM,3898,3901,this.ON,3902,3952,this.L,3953,3966,this.NSM,3967,3967,this.L,3968,3972,this.NSM,3973,3973,this.L,3974,3975,this.NSM,3976,3983,this.L,3984,3991,this.NSM,3992,3992,this.L,3993,4028,this.NSM,4029,4037,this.L,4038,4038,this.NSM,4039,4140,this.L,4141,4144,this.NSM,4145,4145,this.L,4146,4146,this.NSM,4147,4149,this.L,4150,4151,this.NSM,4152,4152,this.L,4153,4153,this.NSM,4154,4183,this.L,4184,4185,this.NSM,4186,5759,this.L,5760,5760,this.WS,5761,5786,this.L,5787,5788,this.ON,5789,5905,this.L,5906,5908,this.NSM,5909,5937,this.L,5938,5940,this.NSM,5941,5969,this.L,5970,5971,this.NSM,5972,6001,this.L,6002,6003,this.NSM,6004,6070,this.L,6071,6077,this.NSM,6078,6085,this.L,6086,6086,this.NSM,6087,6088,this.L,6089,6099,this.NSM,6100,6106,this.L,6107,6107,this.ET,6108,6108,this.L,6109,6109,this.NSM,6110,6127,this.L,6128,6137,this.ON,6138,6143,this.L,6144,6154,this.ON,6155,6157,this.NSM,6158,6158,this.WS,6159,6312,this.L,6313,6313,this.NSM,6314,6431,this.L,6432,6434,this.NSM,6435,6438,this.L,6439,6443,this.NSM,6444,6449,this.L,6450,6450,this.NSM,6451,6456,this.L,6457,6459,this.NSM,6460,6463,this.L,6464,6464,this.ON,6465,6467,this.L,6468,6469,this.ON,6470,6623,this.L,6624,6655,this.ON,6656,8124,this.L,8125,8125,this.ON,8126,8126,this.L,8127,8129,this.ON,8130,8140,this.L,8141,8143,this.ON,8144,8156,this.L,8157,8159,this.ON,8160,8172,this.L,8173,8175,this.ON,8176,8188,this.L,8189,8190,this.ON,8191,8191,this.L,8192,8202,this.WS,8203,8205,this.BN,8206,8206,this.L,8207,8207,this.R,8208,8231,this.ON,8232,8232,this.WS,8233,8233,this.B,8234,8234,this.LRE,8235,8235,this.RLE,8236,8236,this.PDF,8237,8237,this.LRO,8238,8238,this.RLO,8239,8239,this.WS,8240,8244,this.ET,8245,8276,this.ON,8277,8278,this.L,8279,8279,this.ON,8280,8286,this.L,8287,8287,this.WS,8288,8291,this.BN,8292,8297,this.L,8298,8303,this.BN,8304,8304,this.EN,8305,8307,this.L,8308,8313,this.EN,8314,8315,this.ET,8316,8318,this.ON,8319,8319,this.L,8320,8329,this.EN,8330,8331,this.ET,8332,8334,this.ON,8335,8351,this.L,8352,8369,this.ET,8370,8399,this.L,8400,8426,this.NSM,8427,8447,this.L,8448,8449,this.ON,8450,8450,this.L,8451,8454,this.ON,8455,8455,this.L,8456,8457,this.ON,8458,8467,this.L,8468,8468,this.ON,8469,8469,this.L,8470,8472,this.ON,8473,8477,this.L,8478,8483,this.ON,8484,8484,this.L,8485,8485,this.ON,8486,8486,this.L,8487,8487,this.ON,8488,8488,this.L,8489,8489,this.ON,8490,8493,this.L,8494,8494,this.ET,8495,8497,this.L,8498,8498,this.ON,8499,8505,this.L,8506,8507,this.ON,8508,8511,this.L,8512,8516,this.ON,8517,8521,this.L,8522,8523,this.ON,8524,8530,this.L,8531,8543,this.ON,8544,8591,this.L,8592,8721,this.ON,8722,8723,this.ET,8724,9013,this.ON,9014,9082,this.L,9083,9108,this.ON,9109,9109,this.L,9110,9168,this.ON,9169,9215,this.L,9216,9254,this.ON,9255,9279,this.L,9280,9290,this.ON,9291,9311,this.L,9312,9371,this.EN,9372,9449,this.L,9450,9450,this.EN,9451,9751,this.ON,9752,9752,this.L,9753,9853,this.ON,9854,9855,this.L,9856,9873,this.ON,9874,9887,this.L,9888,9889,this.ON,9890,9984,this.L,9985,9988,this.ON,9989,9989,this.L,9990,9993,this.ON,9994,9995,this.L,9996,10023,this.ON,10024,10024,this.L,10025,10059,this.ON,10060,10060,this.L,10061,10061,this.ON,10062,10062,this.L,10063,10066,this.ON,10067,10069,this.L,10070,10070,this.ON,10071,10071,this.L,10072,10078,this.ON,10079,10080,this.L,10081,10132,this.ON,10133,10135,this.L,10136,10159,this.ON,10160,10160,this.L,10161,10174,this.ON,10175,10191,this.L,10192,10219,this.ON,10220,10223,this.L,10224,11021,this.ON,11022,11903,this.L,11904,11929,this.ON,11930,11930,this.L,11931,12019,this.ON,12020,12031,this.L,12032,12245,this.ON,12246,12271,this.L,12272,12283,this.ON,12284,12287,this.L,12288,12288,this.WS,12289,12292,this.ON,12293,12295,this.L,12296,12320,this.ON,12321,12329,this.L,12330,12335,this.NSM,12336,12336,this.ON,12337,12341,this.L,12342,12343,this.ON,12344,12348,this.L,12349,12351,this.ON,12352,12440,this.L,12441,12442,this.NSM,12443,12444,this.ON,12445,12447,this.L,12448,12448,this.ON,12449,12538,this.L,12539,12539,this.ON,12540,12828,this.L,12829,12830,this.ON,12831,12879,this.L,12880,12895,this.ON,12896,12923,this.L,12924,12925,this.ON,12926,12976,this.L,12977,12991,this.ON,12992,13003,this.L,13004,13007,this.ON,13008,13174,this.L,13175,13178,this.ON,13179,13277,this.L,13278,13279,this.ON,13280,13310,this.L,13311,13311,this.ON,13312,19903,this.L,19904,19967,this.ON,19968,42127,this.L,42128,42182,this.ON,42183,64284,this.L,64285,64285,this.R,64286,64286,this.NSM,64287,64296,this.R,64297,64297,this.ET,64298,64310,this.R,64311,64311,this.L,64312,64316,this.R,64317,64317,this.L,64318,64318,this.R,64319,64319,this.L,64320,64321,this.R,64322,64322,this.L,64323,64324,this.R,64325,64325,this.L,64326,64335,this.R,64336,64433,this.AL,64434,64466,this.L,64467,64829,this.AL,64830,64831,this.ON,64832,64847,this.L,64848,64911,this.AL,64912,64913,this.L,64914,64967,this.AL,64968,65007,this.L,65008,65020,this.AL,65021,65021,this.ON,65022,65023,this.L,65024,65039,this.NSM,65040,65055,this.L,65056,65059,this.NSM,65060,65071,this.L,65072,65103,this.ON,65104,65104,this.CS,65105,65105,this.ON,65106,65106,this.CS,65107,65107,this.L,65108,65108,this.ON,65109,65109,this.CS,65110,65118,this.ON,65119,65119,this.ET,65120,65121,this.ON,65122,65123,this.ET,65124,65126,this.ON,65127,65127,this.L,65128,65128,this.ON,65129,65130,this.ET,65131,65131,this.ON,65132,65135,this.L,65136,65140,this.AL,65141,65141,this.L,65142,65276,this.AL,65277,65278,this.L,65279,65279,this.BN,65280,65280,this.L,65281,65282,this.ON,65283,65285,this.ET,65286,65290,this.ON,65291,65291,this.ET,65292,65292,this.CS,65293,65293,this.ET,65294,65294,this.CS,65295,65295,this.ES,65296,65305,this.EN,65306,65306,this.CS,65307,65312,this.ON,65313,65338,this.L,65339,65344,this.ON,65345,65370,this.L,65371,65381,this.ON,65382,65503,this.L,65504,65505,this.ET,65506,65508,this.ON,65509,65510,this.ET,65511,65511,this.L,65512,65518,this.ON,65519,65528,this.L,65529,65531,this.BN,65532,65533,this.ON,65534,65535,this.L];for(var t=0;t<this.charTypes.length;++t)for(var e=this.charTypes[t],i=this.charTypes[++t],r=this.charTypes[++t];e<=i;)this.rtlCharacterTypes[e++]=r}return t.prototype.getVisualOrder=function(t,e){this.types=this.getCharacterCode(t),this.textOrder=e?this.LRE:this.L,this.doVisualOrder();for(var i=[],r=0;r<this.levels.length;r++)i[r]=this.levels[r];return i},t.prototype.getCharacterCode=function(t){for(var e=[],i=0;i<t.length;i++)e[i]=this.rtlCharacterTypes[t[i].charCodeAt(0)];return e},t.prototype.setDefaultLevels=function(){for(var t=0;t<this.length;t++)this.levels[t]=this.textOrder},t.prototype.setLevels=function(){this.setDefaultLevels();for(var t=0;t<this.length;++t){var e=this.levels[t];0!=(128&e)&&(e&=127,this.result[t]=0==(1&e)?this.L:this.R),this.levels[t]=e}},t.prototype.updateLevels=function(t,e,i){if(0==(1&e))for(r=t;r<i;++r)this.result[r]===this.R?this.levels[r]+=1:this.result[r]!==this.L&&(this.levels[r]+=2);else for(var r=t;r<i;++r)this.result[r]!==this.R&&(this.levels[r]+=1)},t.prototype.doVisualOrder=function(){this.length=this.types.length,this.result=this.types,this.levels=[],this.setLevels(),this.length=this.getEmbeddedCharactersLength();for(var t=this.textOrder,e=0;e<this.length;){for(var i=this.levels[e],r=0==(1&Math.max(t,i))?this.L:this.R,n=e+1;n<this.length&&this.levels[n]===i;)++n;var o=n<this.length?this.levels[n]:this.textOrder,s=0==(1&Math.max(o,i))?this.L:this.R;this.checkNSM(e,n,i,r,s),this.updateLevels(e,i,n),t=i,e=n}this.checkEmbeddedCharacters(this.length)},t.prototype.getEmbeddedCharactersLength=function(){for(var t=0,e=0;e<this.length;++e)this.types[e]!==this.LRE&&this.types[e]!==this.RLE&&this.types[e]!==this.LRO&&this.types[e]!==this.RLO&&this.types[e]!==this.PDF&&this.types[e]!==this.BN&&(this.result[t]=this.result[e],this.levels[t]=this.levels[e],t++);return t},t.prototype.checkEmbeddedCharacters=function(t){for(e=this.types.length-1;e>=0;--e)this.types[e]===this.LRE||this.types[e]===this.RLE||this.types[e]===this.LRO||this.types[e]===this.RLO||this.types[e]===this.PDF||this.types[e]===this.BN?(this.result[e]=this.types[e],this.levels[e]=-1):(t-=1,this.result[e]=this.result[t],this.levels[e]=this.levels[t]);for(var e=0;e<this.types.length;e++)-1===this.levels[e]&&(this.levels[e]=0===e?this.textOrder:this.levels[e-1])},t.prototype.checkNSM=function(t,e,i,r,n){for(var o=r,s=t;s<e;++s)this.result[s]===this.NSM?this.result[s]=o:o=this.result[s];this.checkEuropeanDigits(t,e,i,r,n)},t.prototype.checkEuropeanDigits=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.EN)for(var s=o-1;s>=t;--s)if(this.result[s]===this.L||this.result[s]===this.R||this.result[s]===this.AL){this.result[s]===this.AL&&(this.result[o]=this.AN);break}this.checkArabicCharacters(t,e,i,r,n)},t.prototype.checkArabicCharacters=function(t,e,i,r,n){for(var o=t;o<e;++o)this.result[o]===this.AL&&(this.result[o]=this.R);this.checkEuropeanNumberSeparator(t,e,i,r,n)},t.prototype.checkEuropeanNumberSeparator=function(t,e,i,r,n){for(var o=t+1;o<e-1;++o)if(this.result[o]===this.ES||this.result[o]===this.CS){var s=this.result[o-1],a=this.result[o+1];s===this.EN&&a===this.EN?this.result[o]=this.EN:this.result[o]===this.CS&&s===this.AN&&a===this.AN&&(this.result[o]=this.AN)}this.checkEuropeanNumberTerminator(t,e,i,r,n)},t.prototype.checkEuropeanNumberTerminator=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.ET){var s=o,a=[];a.push(this.ET);var h=this.getLength(s,e,a),l=s===t?r:this.result[s-1];if(l!==this.EN&&(l=h===e?n:this.result[h]),l===this.EN)for(var u=s;u<h;++u)this.result[u]=this.EN;o=h}this.checkOtherNeutrals(t,e,i,r,n)},t.prototype.checkOtherNeutrals=function(t,e,i,r,n){for(var o=t;o<e;++o)this.result[o]!==this.ES&&this.result[o]!==this.ET&&this.result[o]!==this.CS||(this.result[o]=this.ON);this.checkOtherCharacters(t,e,i,r,n)},t.prototype.checkOtherCharacters=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.EN){for(var s=r,a=o-1;a>=t;--a)if(this.result[a]===this.L||this.result[a]===this.R){s=this.result[a];break}s===this.L&&(this.result[o]=this.L)}this.checkCommanCharacters(t,e,i,r,n)},t.prototype.getLength=function(t,e,i){for(--t;++t<e;){for(var r=this.result[t],n=0;n<i.length;++n)r===i[n]&&(t=this.getLength(++t,e,i));return t}return e},t.prototype.checkCommanCharacters=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.WS||this.result[o]===this.ON||this.result[o]===this.B||this.result[o]===this.S){var s=o,a=[this.B,this.S,this.WS,this.ON],h=this.getLength(s,e,a),l=0,u=0,c=0;s===t?l=r:(l=this.result[s-1])===this.AN?l=this.R:l===this.EN&&(l=this.R),h===e?u=n:(u=this.result[h])===this.AN?u=this.R:u===this.EN&&(u=this.R),c=l===u?l:0==(1&i)?this.L:this.R;for(var p=s;p<h;++p)this.result[p]=c;o=h}},t}(),Kt=function(){function e(){this.openBracket="(",this.closeBracket=")"}return e.prototype.layout=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");var o=[];return e.Unicode?o=this.customLayout(t,i,n,e,r):(o=[])[0]=t,o},e.prototype.splitLayout=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");return this.customSplitLayout(t,e,i,r,n)},e.prototype.getGlyphIndex=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");if(r=null,0===t.length)return{success:!1,glyphs:r};var o=(new zt).shape(t,0),s=e.fontInternal.ttfReader;r=new Uint16Array(o.length);for(var a=0,h=0,l=o.length;h<l;h++){var u=o[h],c=s.getGlyph(u);null!==c&&void 0!==c&&(r[a++]=c.index)}return{success:!0,glyphs:r}},e.prototype.customLayout=function(e,i,r,n,o){if(null===o||void 0===o){if(null==e)throw new Error("ArgumentNullException : line");h=null;return null!==r&&void 0!==r&&r.textDirection!==t.PdfTextDirection.None&&(h=(new Ht).getLogicalToVisualString(e,i)),h}if(null==e)throw new Error("ArgumentNullException : line");if(null==n)throw new Error("ArgumentNullException : font");var s=null;if(null!==r&&void 0!==r&&r.textDirection!==t.PdfTextDirection.None){var a=(new zt).shape(e,0);s=this.customLayout(a,i,r)}var h=[];if(o){for(var l=s.split(""),u=l.length,c=0;c<u;c++)l[c]=this.addChars(n,l[c]);h=l}else(h=[])[0]=this.addChars(n,s);return h},e.prototype.addChars=function(t,e){var i=e;if(null==t)throw new Error("ArgumentNullException : font");if(null==i)throw new Error("ArgumentNullException : line");var r=i,n=t.fontInternal.ttfReader;t.setSymbols(r),r=n.convertString(r);var o=P.toUnicodeArray(r,!1);return r=P.byteToString(o)},e.prototype.customSplitLayout=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");return this.customLayout(t,i,n).split("")},e}();!function(t){t[t.Paginate=0]="Paginate",t[t.OnePage=1]="OnePage"}(t.PdfLayoutType||(t.PdfLayoutType={})),function(t){t[t.FitPage=0]="FitPage",t[t.FitElement=1]="FitElement",t[t.FitColumnsToPage=2]="FitColumnsToPage"}(t.PdfLayoutBreakType||(t.PdfLayoutBreakType={})),function(t){t[t.Start=0]="Start",t[t.Line=1]="Line",t[t.Bezier3=3]="Bezier3",t[t.Bezier=3]="Bezier",t[t.PathTypeMask=7]="PathTypeMask",t[t.DashMode=16]="DashMode",t[t.PathMarker=32]="PathMarker",t[t.CloseSubpath=128]="CloseSubpath"}(t.PathPointType||(t.PathPointType={}));var Ut=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qt=function(e){function i(i){var r=e.call(this)||this;return r.mbackground=new L(255,255,255),r.mbStroking=!1,r.mfunction=null,r.dictionaryProperties=new a,r.mpatternDictionary=new h,r.mpatternDictionary.items.setValue(r.dictionaryProperties.type,new o(r.dictionaryProperties.pattern)),r.mpatternDictionary.items.setValue(r.dictionaryProperties.patternType,new g(2)),r.shading=i,r.colorSpace=t.PdfColorSpace.Rgb,r}return Ut(i,e),Object.defineProperty(i.prototype,"background",{get:function(){return this.mbackground},set:function(t){this.mbackground=t;var e=this.shading;t.isEmpty?e.remove(this.dictionaryProperties.background):e.items.setValue(this.dictionaryProperties.background,t.toArray(this.colorSpace))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"antiAlias",{get:function(){return this.shading.items.getValue(this.dictionaryProperties.antiAlias).value},set:function(t){var e=this.shading,i=e.items.getValue(this.dictionaryProperties.antiAlias);null==i&&void 0===i?(i=new ct(t),e.items.setValue(this.dictionaryProperties.antiAlias,i)):i.value=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"function",{get:function(){return this.mfunction},set:function(t){this.mfunction=t,null!=t&&void 0!==t?this.shading.items.setValue(this.dictionaryProperties.function,new C(this.mfunction)):this.shading.remove(this.dictionaryProperties.function)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bBox",{get:function(){return this.shading.items.getValue(this.dictionaryProperties.bBox)},set:function(t){var e=this.shading;null==t&&void 0===t?e.remove(this.dictionaryProperties.bBox):e.items.setValue(this.dictionaryProperties.bBox,t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"colorSpace",{get:function(){return this.mcolorSpace},set:function(t){var e=this.shading.items.getValue(this.dictionaryProperties.colorSpace);if(t!==this.mcolorSpace||null==e){this.mcolorSpace=t;var i=this.colorSpaceToDeviceName(t);this.shading.items.setValue(this.dictionaryProperties.colorSpace,new o(i))}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"stroking",{get:function(){return this.mbStroking},set:function(t){this.mbStroking=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"patternDictionary",{get:function(){return null==this.mpatternDictionary&&(this.mpatternDictionary=new h),this.mpatternDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"shading",{get:function(){return this.mshading},set:function(t){if(null==t)throw new Error("ArgumentNullException : Shading");t!==this.mshading&&(this.mshading=t,this.patternDictionary.items.setValue(this.dictionaryProperties.shading,new C(this.mshading)))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"matrix",{get:function(){return this.mmatrix},set:function(t){if(null==t)throw new Error("ArgumentNullException : Matrix");if(t!==this.mmatrix){this.mmatrix=t.clone();var e=new m(this.mmatrix.matrix.elements);this.mpatternDictionary.items.setValue(this.dictionaryProperties.matrix,e)}},enumerable:!0,configurable:!0}),i.prototype.monitorChanges=function(t,e,r,n,o){var s=!1;if(t instanceof i){this.colorSpace!==o&&(this.colorSpace=o,this.resetFunction()),e.setColorSpace("Pattern",this.mbStroking);var a=r.getResources().getName(this);e.setColourWithPattern(null,a,this.mbStroking),s=!0}return s},i.prototype.resetChanges=function(t){},i.prototype.colorSpaceToDeviceName=function(e){var i;switch(e){case t.PdfColorSpace.Rgb:i="DeviceRGB"}return i},i.prototype.resetPatternDictionary=function(t){this.mpatternDictionary=t},i.prototype.cloneAntiAliasingValue=function(t){if(null==t)throw new Error("ArgumentNullException : brush");var e=this.shading.items.getValue(this.dictionaryProperties.antiAlias);null!=e&&t.shading.items.setValue(this.dictionaryProperties.antiAlias,new ct(e.value))},i.prototype.cloneBackgroundValue=function(t){var e=this.background;e.isEmpty||(t.background=e)},Object.defineProperty(i.prototype,"element",{get:function(){return this.patternDictionary},enumerable:!0,configurable:!0}),i}(R),Yt=function(){function t(t,e){if(this.dictionaryProperties=new a,this.writeTransformation=!0,void 0===t);else if(t instanceof j&&void 0===e){this.content=new b;var i=new j(t.width,t.height);this.setSize(i),this.initialize()}else this.content=new b,this.setSize(new j(t,e)),this.initialize()}return Object.defineProperty(t.prototype,"size",{get:function(){return this.templateSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.size.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.size.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){if(null==this.pdfGraphics||void 0===this.pdfGraphics){var t=new ee(this),e=new te(this.size,t,this.content);this.pdfGraphics=e,this.pdfGraphics.initializeCoordinates()}return this.pdfGraphics},enumerable:!0,configurable:!0}),t.prototype.getResources=function(){return null==this.resources&&(this.resources=new Jt,this.content.items.setValue(this.dictionaryProperties.resources,this.resources)),this.resources},t.prototype.initialize=function(){this.addType(),this.addSubType()},t.prototype.addType=function(){var t=new o(this.dictionaryProperties.xObject);this.content.items.setValue(this.dictionaryProperties.type,t)},t.prototype.addSubType=function(){var t=new o(this.dictionaryProperties.form);this.content.items.setValue(this.dictionaryProperties.subtype,t)},t.prototype.reset=function(t){void 0===t?(null!=this.resources&&(this.resources=null,this.content.remove(this.dictionaryProperties.resources)),null!=this.graphics&&this.graphics.reset(this.size)):(this.setSize(t),this.reset())},t.prototype.setSize=function(t){var e=new k(new T(0,0),t),i=m.fromRectangle(e);this.content.items.setValue(this.dictionaryProperties.bBox,i),this.templateSize=t},Object.defineProperty(t.prototype,"element",{get:function(){return this.content},enumerable:!0,configurable:!0}),t}(),Xt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jt=function(t){function e(e){var i=t.call(this,e)||this;return i.properties=new h,i}return Xt(e,t),Object.defineProperty(e.prototype,"names",{get:function(){return this.getNames()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"document",{get:function(){return this.pdfDocument},set:function(t){this.pdfDocument=t},enumerable:!0,configurable:!0}),e.prototype.getName=function(t){var e=t.element,i=null;if(this.names.containsKey(e)&&(i=this.names.getValue(e)),null==i){var r=this.generateName();i=new o(r),this.names.setValue(e,i),t instanceof G?this.add(t,i):t instanceof Yt?this.add(t,i):t instanceof qt||t instanceof Qt?this.add(t,i):t instanceof nt?this.add(t,i):(t instanceof ft||t instanceof mt)&&this.add(t,i)}return i},e.prototype.getNames=function(){null==this.pdfNames&&(this.pdfNames=new rt);var t=this.items.getValue(this.dictionaryProperties.font);if(null!=t){q.dereference(t)}return this.pdfNames},e.prototype.requireProcedureSet=function(t){if(null==t)throw new Error("ArgumentNullException:procedureSetName");var e=this.items.getValue(this.dictionaryProperties.procset);null==e&&(e=new m,this.items.setValue(this.dictionaryProperties.procset,e));var i=new o(t);e.contains(i)||e.add(i)},e.prototype.removeFont=function(t){for(var e=null,i=this.pdfNames.keys(),r=0;r<this.pdfNames.size();r++)if(this.pdfNames.getValue(i[r])===new o(t)){e=i[r];break}null!=e&&this.pdfNames.remove(e)},e.prototype.generateName=function(){return Zt.getNewGuidString()},e.prototype.add=function(t,e){if(t instanceof G){var i=null,r=this.items.getValue(this.dictionaryProperties.font);if(null!=r){f=r;i=r,i=r}else i=new h,this.items.setValue(this.dictionaryProperties.font,i);i.items.setValue(e.value,new C(t.element))}else if(t instanceof Yt){a=void 0;null==(a=this.items.getValue(this.dictionaryProperties.xObject))&&(a=new h,this.items.setValue(this.dictionaryProperties.xObject,a)),a.items.setValue(e.value,new C(t.element))}else if(t instanceof R){if((t instanceof qt||t instanceof Qt)&&null!=(o=t.element)){var n=this.items.getValue(this.dictionaryProperties.pattern);null==n&&(n=new h,this.items.setValue(this.dictionaryProperties.pattern,n)),n.items.setValue(e.value,new C(o))}}else if(t instanceof nt){var o=t.element,s=null;null==(s=this.items.getValue(this.dictionaryProperties.extGState))&&(s=new h,this.items.setValue(this.dictionaryProperties.extGState,s)),s.items.setValue(e.value,new C(o))}else{var a=this.Dictionary.items.getValue(this.dictionaryProperties.xObject),l=void 0;void 0!==this.pdfDocument&&(l=this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.getValue(this.dictionaryProperties.xObject));this.Dictionary.items.values();var u=!1,c=void 0;if(void 0===this.pdfDocument||void 0!==typeof l&&null!=l){if(void 0!==this.pdfDocument)for(var p=l.items.values(),d=0;d<p.length;d++)void 0!==p[d]&&void 0!==p[d].element&&p[d].element.data[0]===t.element.data[0]&&(c=p[d],u=!0)}else l=new h,this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.setValue(this.dictionaryProperties.xObject,l);if(null==a&&(a=new h,this.Dictionary.items.setValue(this.dictionaryProperties.xObject,a)),u&&void 0!==c)a.items.setValue(e.value,c);else{var f=new C(t.element);a.items.setValue(e.value,f),void 0!==this.pdfDocument&&l.items.setValue(e.value,f)}}},e}(h),Zt=function(){function t(){}return t.getNewGuidString=function(){return"aaaaaaaa-aaaa-4aaa-baaa-aaaaaaaaaaaa".replace(/[ab]/g,function(t){var e=16*Math.random()|0;return("a"===t?e:3&e|8).toString(16)})},t}(),$t=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qt=function(t){function e(e,i){var r=t.call(this)||this;r.mStroking=!1,r.mLocation=new T(0,0),r.mDictionaryProperties=new a;var n=null;return e instanceof V?n=e:e instanceof j&&(n=new V(0,0,e.width,e.height)),null!==i&&i instanceof ce&&(r.mPage=i),r.brushStream=new b,r.mResources=new Jt,r.brushStream.items.setValue(r.mDictionaryProperties.resources,r.mResources),r.setBox(n),r.setObligatoryFields(),null!==i&&i instanceof ce&&(r.mPage=i,r.graphics.colorSpace=i.document.colorSpace),r}return $t(e,t),e.prototype.initialize=function(t,e,i,r){this.mPage=e,this.mLocation=i,this.mTransformationMatrix=r,this.tempBrushStream=this.brushStream,this.brushStream=new b;var n=new Jt;return this.brushStream.items.setValue(this.mDictionaryProperties.resources,n),this.setBox(t),this.setObligatoryFields(),this},Object.defineProperty(e.prototype,"location",{get:function(){return this.mLocation},set:function(t){this.mLocation=t},enumerable:!0,configurable:!0}),e.prototype.setObligatoryFields=function(){if(this.brushStream.items.setValue(this.mDictionaryProperties.patternType,new g(1)),this.brushStream.items.setValue(this.mDictionaryProperties.paintType,new g(1)),this.brushStream.items.setValue(this.mDictionaryProperties.tilingType,new g(1)),this.brushStream.items.setValue(this.mDictionaryProperties.xStep,new g(this.mBox.right-this.mBox.left)),this.brushStream.items.setValue(this.mDictionaryProperties.yStep,new g(this.mBox.bottom-this.mBox.top)),null!=this.mPage&&null!=this.mLocation)if(null==this.mTransformationMatrix&&void 0===this.mTransformationMatrix){t=this.mPage.size.height%this.rectangle.size.height-this.mLocation.y;this.brushStream.items.setValue(this.mDictionaryProperties.matrix,new m([1,0,0,1,this.mLocation.x,t]))}else{var t=0,e=this.mTransformationMatrix.matrix.elements;t=this.mPage.size.height>this.rectangle.size.height?this.mTransformationMatrix.matrix.offsetY-this.mPage.size.height%this.rectangle.size.height:this.mPage.size.height%this.rectangle.size.height+this.mTransformationMatrix.matrix.offsetY,this.brushStream.items.setValue(this.mDictionaryProperties.matrix,new m([e[0],e[1],e[2],e[3],e[4],t]))}},e.prototype.setBox=function(t){this.mBox=t;var e=new k(this.mBox.left,this.mBox.top,this.mBox.right,this.mBox.bottom);this.brushStream.items.setValue(this.mDictionaryProperties.bBox,m.fromRectangle(e))},Object.defineProperty(e.prototype,"rectangle",{get:function(){return this.mBox},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.mBox.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){if(null==this.mGraphics&&void 0===this.mGraphics){var t=new ee(this),e=new te(this.size,t,this.brushStream);this.mGraphics=e,this.mResources=this.getResources(),this.mGraphics.initializeCoordinates()}return this.mGraphics},enumerable:!0,configurable:!0}),e.prototype.getResources=function(){return this.mResources},Object.defineProperty(e.prototype,"stroking",{get:function(){return this.mStroking},set:function(t){this.mStroking=t},enumerable:!0,configurable:!0}),e.prototype.clone=function(){var t=this.initialize(this.rectangle,this.mPage,this.location,this.mTransformationMatrix);return null!=this.mTransformationMatrix&&null!=this.mTransformationMatrix.matrix&&t.brushStream.items.setValue(this.mDictionaryProperties.matrix,new m(this.mTransformationMatrix.matrix.elements)),t.brushStream.data=this.tempBrushStream.data,t.mResources=new Jt(this.mResources),t.brushStream.items.setValue(this.mDictionaryProperties.resources,t.mResources),t},e.prototype.monitorChanges=function(t,i,r,n,o){var s=!1;if(t!==this){i.setColorSpace("Pattern",this.mStroking);var a=r.getResources().getName(this);i.setColourWithPattern(null,a,this.mStroking),s=!0}else if(t instanceof e){i.setColorSpace("Pattern",this.mStroking);var h=r.getResources().getName(this);i.setColourWithPattern(null,h,this.mStroking),s=!0}return s},e.prototype.resetChanges=function(t){},Object.defineProperty(e.prototype,"element",{get:function(){return this.brushStream},enumerable:!0,configurable:!0}),e}(R),te=function(){function e(e,i,r){this.currentColorSpace=t.PdfColorSpace.Rgb,this.previousTextRenderingMode=t.TextRenderingMode.Fill,this.previousCharacterSpacing=0,this.previousWordSpacing=0,this.previousTextScaling=100,this.procedureSets=new it,this.isNormalRender=!0,this.isUseFontSize=!1,this.isItalic=!1,this.isEmfTextScaled=!1,this.isEmf=!1,this.isEmfPlus=!1,this.isBaselineFormat=!0,this.emfScalingFactor=new j(0,0),this.colorSpaceChanged=!1,this.dictionaryProperties=new a,this.isOverloadWithPosition=!1,this.isPointOverload=!1,this.currentColorSpaces=["RGB","CMYK","GrayScale","Indexed"],this.isImageOptimized=!1,this.graphicsState=[],this.istransparencySet=!1,this.internalAutomaticFields=null,this.startCutIndex=-1,this.getResources=i,this.canvasSize=e,this.pdfStreamWriter=r instanceof $?r:new $(r),this.initialize()}return Object.defineProperty(e.prototype,"stringLayoutResult",{get:function(){return this.pdfStringLayoutResult},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.canvasSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mediaBoxUpperRightBound",{get:function(){return void 0===this.internalMediaBoxUpperRightBound&&(this.internalMediaBoxUpperRightBound=0),this.internalMediaBoxUpperRightBound},set:function(t){this.internalMediaBoxUpperRightBound=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clientSize",{get:function(){return new j(this.clipBounds.width,this.clipBounds.height)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorSpace",{get:function(){return this.currentColorSpace},set:function(t){this.currentColorSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"streamWriter",{get:function(){return this.pdfStreamWriter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matrix",{get:function(){return null==this.transformationMatrix&&(this.transformationMatrix=new tt),this.transformationMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layer",{get:function(){return this.pageLayer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this.pageLayer.page},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"automaticFields",{get:function(){return null!=this.internalAutomaticFields&&void 0!==this.internalAutomaticFields||(this.internalAutomaticFields=new ot),this.internalAutomaticFields},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){this.bStateSaved=!1,this.currentPen=null,this.currentBrush=null,this.currentFont=null,this.currentColorSpace=t.PdfColorSpace.Rgb,this.bCSInitialized=!1,this.transformationMatrix=null,this.previousTextRenderingMode=-1,this.previousCharacterSpacing=-1,this.previousWordSpacing=-1,this.previousTextScaling=-100,this.currentStringFormat=null,this.clipBounds=new k(new T(0,0),this.size),this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf)},e.prototype.drawPdfTemplate=function(t,e,i){if(void 0===i){if(null==t)throw Error("ArgumentNullException-template");this.drawPdfTemplate(t,e,t.size)}else{if(null==t)throw Error("ArgumentNullException-template");var r=t.width>0?i.width/t.width:1,n=t.height>0?i.height/t.height:1,o=!(1===r&&1===n),s=this.save(),a=new tt;null!=this.pageLayer&&this.getTranslateTransform(e.x,e.y+i.height,a),o&&this.getScaleTransform(r,n,a),this.pdfStreamWriter.modifyCtm(a);var h=this.getResources.getResources().getName(t);this.pdfStreamWriter.executeObject(h),this.restore(s);var l=t.graphics;if(null!=l)for(var u=0;u<l.automaticFields.automaticFields.length;u++){var c=l.automaticFields.automaticFields[u],p=new T(c.location.x+e.x,c.location.y+e.y),d=0==t.size.width?0:i.width/t.size.width,f=0==t.size.height?0:i.height/t.size.height;this.automaticFields.add(new lt(c.field,p,d,f)),this.page.dictionary.modify()}this.getResources.getResources().requireProcedureSet(this.procedureSets.imageB),this.getResources.getResources().requireProcedureSet(this.procedureSets.imageC),this.getResources.getResources().requireProcedureSet(this.procedureSets.imageI),this.getResources.getResources().requireProcedureSet(this.procedureSets.text)}},e.prototype.drawString=function(t,e,i,r,n,o,s,a,h){if("string"==typeof t&&e instanceof G&&(i instanceof Q||null===i)&&(r instanceof R||null===r)&&"number"==typeof n&&"number"==typeof o&&(s instanceof D||null===s)&&void 0===a)this.isOverloadWithPosition=!0,this.drawString(t,e,i,r,n,o,this.clientSize.width-n,0,s);else{var l=i,u=r,c=n,p=o,d=s,f=a,g=h,m=(new I).layout(t,e,g,new j(d,f),this.isOverloadWithPosition,this.clientSize);if(!m.empty){var y=this.checkCorrectLayoutRectangle(m.actualSize,c,p,g);d<=0&&(c=y.x,d=y.width),f<=0&&(p=y.y,f=y.height),this.drawStringLayoutResult(m,e,l,u,new k(c,p,d,f),g),this.isEmfTextScaled=!1,this.emfScalingFactor=new j(0,0)}this.getResources.getResources().requireProcedureSet(this.procedureSets.text),this.isNormalRender=!0,this.pdfStringLayoutResult=m,this.isUseFontSize=!1}},e.prototype.drawLine=function(t,e,i,r,n){if(e instanceof T){var o=e,s=i;this.drawLine(t,o.x,o.y,s.x,s.y)}else{var o=e,s=i,a=r,h=n;this.stateControl(t,null,null);var l=this.streamWriter;l.beginPath(o,s),l.appendLineSegment(a,h),l.strokePath(),this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf)}},e.prototype.drawRectangle=function(t,e,i,r,n,o){if(t instanceof Q&&"number"==typeof e){s=i;this.drawRectangle(t,null,e,s,r,n)}else if(t instanceof R&&"number"==typeof e){s=i;this.drawRectangle(null,t,e,s,r,n)}else{var s=i,a=r,h=n,l=o;if(e instanceof Qt){this.bCSInitialized=!1;var u=this.matrix.matrix.offsetX+s,c=void 0;c=null!=this.layer&&null!=this.layer.page?this.layer.page.size.height-this.matrix.matrix.offsetY+a:this.clientSize.height-this.matrix.matrix.offsetY+a,e.location=new T(u,c),e.graphics.colorSpace=this.colorSpace}else e instanceof qt&&(e.colorSpace=this.colorSpace);e instanceof A&&e.color.isEmpty&&(e=null);var p=t,d=e;this.stateControl(p,d,null),this.streamWriter.appendRectangle(s,a,h,l),this.drawPathHelper(p,d,!1)}},e.prototype.drawPathHelper=function(e,i,r,n){if("boolean"==typeof r){var o=r;this.drawPathHelper(e,i,t.PdfFillMode.Winding,o)}else{var s=null!=e,a=null!=i,h=(o=r)===t.PdfFillMode.Alternate;s&&a?this.streamWriter.fillStrokePath(h):s||a?s?this.streamWriter.strokePath():this.streamWriter.fillPath(h):this.streamWriter.endPath()}},e.prototype.drawImage=function(t,e,i,r,n){if("number"==typeof e&&"number"==typeof i&&void 0===r){var o=t.physicalDimension;this.drawImage(t,e,i,o.width,o.height)}else{var a=e,h=i,l=n;t.save();var u=new tt;this.getTranslateTransform(a,h+l,u),this.getScaleTransform(r,n,u),this.pdfStreamWriter.write("q"),this.pdfStreamWriter.modifyCtm(u);var c=this.getResources.getResources();void 0!==this.pageLayer&&null!=this.page&&(c.document=this.page.document);var p=c.getName(t);void 0!==this.pageLayer&&this.page.setResources(c),this.pdfStreamWriter.executeObject(p),this.pdfStreamWriter.write(s.restoreState),this.pdfStreamWriter.write(s.newLine);var d=this.getResources.getResources();d.requireProcedureSet(this.procedureSets.imageB),d.requireProcedureSet(this.procedureSets.imageC),d.requireProcedureSet(this.procedureSets.imageI),d.requireProcedureSet(this.procedureSets.text)}},e.prototype.getLineBounds=function(t,e,i,r,n){var o;if(!e.empty&&t<e.lineCount&&t>=0){var s=e.lines[t],a=this.getTextVerticalAlignShift(e.actualSize.height,r.height,n)+r.y+e.lineHeight*t,h=s.width,l=this.getHorizontalAlignShift(h,r.width,n),u=this.getLineIndent(s,n,r,0===t);l+=this.rightToLeft(n)?0:u;var c=r.x+l,p=this.shouldJustify(s,r.width,n)?r.width-u:h-u,d=e.lineHeight;o=new k(c,a,p,d)}else o=new k(0,0,0,0);return o},e.prototype.checkCorrectLayoutRectangle=function(e,i,r,n){var o=new k(i,r,e.width,e.width);if(null!=n){switch(n.alignment){case t.PdfTextAlignment.Center:o.x-=o.width/2;break;case t.PdfTextAlignment.Right:o.x-=o.width}switch(n.lineAlignment){case t.PdfVerticalAlignment.Middle:o.y-=o.height/2;break;case t.PdfVerticalAlignment.Bottom:o.y-=o.height}}return o},e.prototype.setLayer=function(t){this.pageLayer=t;var e=t.page;null!=e&&void 0!==e&&(e.beginSave=this.pageSave)},e.prototype.pageSave=function(t){if(null!=t.graphics.automaticFields)for(var e=0;e<t.graphics.automaticFields.automaticFields.length;e++){var i=t.graphics.automaticFields.automaticFields[e];i.field.performDraw(t.graphics,i.location,i.scalingX,i.scalingY)}},e.prototype.drawStringLayoutResult=function(e,i,r,n,o,s){if(e.empty)throw new Error("ArgumentNullException:result");this.applyStringSettings(i,r,n,s,o);var a=null!=s?s.horizontalScalingFactor:100;a===this.previousTextScaling||this.isEmfTextScaled||(this.pdfStreamWriter.setTextScaling(a),this.previousTextScaling=a);var h=null==s||0===s.lineSpacing?i.height:s.lineSpacing+i.height,l=0;l=null!=s&&s.subSuperScript===t.PdfSubSuperScript.SubScript?h-(i.height+i.metrics.getDescent(s)):h-i.metrics.getAscent(s),this.shift=l,this.pdfStreamWriter.startNextLine(o.x,o.y-l),this.pdfStreamWriter.setLeading(+h);for(var u=0,c="",p=0;p<e.lines.length;p++)if(u+=e.lineHeight,o.y+u>this.clientSize.height){this.startCutIndex=p;break}for(var d=this.startCutIndex;d<e.lines.length&&d>=0;d++)c+=e.lines[d].text;var f=new k(o.x,o.y,o.width,o.height);this.drawLayoutResult(e,i,s,o),this.underlineStrikeoutText(r,n,e,i,f,s),this.isEmfPlus=!1,this.isUseFontSize=!1,-1!==this.startCutIndex&&this.getNextPage().graphics.drawString(c,i,r,n,o.x,0,o.width,0,s)},e.prototype.getNextPage=function(){var t=this.currentPage.section,e=t.indexOf(this.currentPage);return e===t.count-1?t.add():t.getPages()[e+1]},e.prototype.setClip=function(e,i){void 0===i?this.setClip(e,t.PdfFillMode.Winding):(this.pdfStreamWriter.appendRectangle(e),this.pdfStreamWriter.clipPath(i===t.PdfFillMode.Alternate))},e.prototype.applyStringSettings=function(t,e,i,r,n){i instanceof Qt?(this.bCSInitialized=!1,i.graphics.colorSpace=this.colorSpace):i instanceof qt&&(this.bCSInitialized=!1,i.colorSpace=this.colorSpace);var o=this.getTextRenderingMode(e,i,r);this.stateControl(e,i,t,r),this.pdfStreamWriter.beginText(),o!==this.previousTextRenderingMode&&(this.pdfStreamWriter.setTextRenderingMode(o),this.previousTextRenderingMode=o);var s=null!=r?r.characterSpacing:0;s===this.previousCharacterSpacing||this.isEmfTextScaled||(this.pdfStreamWriter.setCharacterSpacing(s),this.previousCharacterSpacing=s);var a=null!=r?r.wordSpacing:0;a!==this.previousWordSpacing&&(this.pdfStreamWriter.setWordSpacing(a),this.previousWordSpacing=a)},e.prototype.getTextVerticalAlignShift=function(e,i,r){var n=0;if(i>=0&&null!=r&&r.lineAlignment!==t.PdfVerticalAlignment.Top)switch(r.lineAlignment){case t.PdfVerticalAlignment.Middle:n=(i-e)/2;break;case t.PdfVerticalAlignment.Bottom:n=i-e}return n},e.prototype.drawLayoutResult=function(t,e,i,r){var n=this.getTextVerticalAlignShift(t.actualSize.height,r.height,i);0!==n&&this.pdfStreamWriter.startNextLine(0,n);for(var o=e,s=null!=o&&o.isUnicode,a=(null!=o&&o.isEmbedFont,t.lines),h=0,l=a.length;h<l&&h!==this.startCutIndex;h++){var u=a[h],c=(u.text,u.width),p=this.getHorizontalAlignShift(c,r.width,i),d=this.getLineIndent(u,i,r,0===h);0===(p+=this.rightToLeft(i)?0:d)||this.isEmfTextScaled||this.pdfStreamWriter.startNextLine(p,0),s?this.drawUnicodeLine(u,r,e,i):this.drawAsciiLine(u,r,e,i),0===p||this.isEmfTextScaled||this.pdfStreamWriter.startNextLine(-p,0),this.isOverloadWithPosition&&a.length>1&&(this.pdfStreamWriter.startNextLine(-r.x,0),r.x=0,r.width=this.clientSize.width,this.isOverloadWithPosition=!1,this.isPointOverload=!0)}this.getResources.getResources().requireProcedureSet(this.procedureSets.text),0!==n&&this.pdfStreamWriter.startNextLine(0,-(n-t.lineHeight)),this.pdfStreamWriter.endText()},e.prototype.drawAsciiLine=function(t,e,i,r){this.justifyLine(t,e.width,r);var n="";if(-1!==t.text.indexOf("(")||-1!==t.text.indexOf(")"))for(var o=0;o<t.text.length;o++)"("===t.text[o]?n+="\\(":")"===t.text[o]?n+="\\)":n+=t.text[o];""===n&&(n=t.text);var s="("+n+")";this.pdfStreamWriter.showNextLineText(new P(s))},e.prototype.drawUnicodeLine=function(e,i,r,n){var o=e.text,s=(e.width,null!==n&&void 0!==n&&n.rightToLeft),a=null!==n&&void 0!==n&&(0!==n.wordSpacing||n.alignment===t.PdfTextAlignment.Justify),h=r,l=this.justifyLine(e,i.width,n),u=new Kt;if(s||null!==n&&void 0!==n&&n.textDirection!==t.PdfTextDirection.None){var c=null,p=null!==n&&void 0!==n&&n.alignment===t.PdfTextAlignment.Right,d=null;d=(c=null!==n&&void 0!==n&&n.textDirection!==t.PdfTextDirection.None?u.layout(o,h,n.textDirection===t.PdfTextDirection.RightToLeft,a,n):u.layout(o,h,p,a,n)).length>1?null!==n&&void 0!==n&&n.textDirection!==t.PdfTextDirection.None?u.splitLayout(o,h,n.textDirection===t.PdfTextDirection.RightToLeft,a,n):u.splitLayout(o,h,p,a,n):[o],this.drawUnicodeBlocks(c,d,h,n,l)}else if(a){var f=this.breakUnicodeLine(o,h,null),c=f.tokens,d=f.words;this.drawUnicodeBlocks(c,d,h,n,l)}else{var g=this.convertToUnicode(o,h),m=this.getUnicodeString(g);this.streamWriter.showNextLineText(m)}},e.prototype.drawUnicodeBlocks=function(t,e,i,r,n){if(null==t)throw new Error("Argument Null Exception : blocks");if(null==e)throw new Error("Argument Null Exception : words");if(null==i)throw new Error("Argument Null Exception : font");this.streamWriter.startNextLine();var o=0,s=0,a=0,h=0;try{null!==r&&void 0!==r&&(a=r.firstLineIndent,h=r.paragraphIndent,r.firstLineIndent=0,r.paragraphIndent=0);var l=i.getCharWidth(M.whiteSpace,r)+n,u=null!=r?r.characterSpacing:0;l+=u+(null!==r&&void 0!==r&&0===n?r.wordSpacing:0);for(var c=0;c<t.length;c++){var p=t[c],d=e[c],f=0;if(0!==o&&this.streamWriter.startNextLine(o,0),d.length>0){f+=i.measureString(d,r).width,f+=u;var g=this.getUnicodeString(p);this.streamWriter.showText(g)}c!==t.length-1&&(s+=o=f+l)}s>0&&this.streamWriter.startNextLine(-s,0)}finally{null!==r&&void 0!==r&&(r.firstLineIndent=a,r.paragraphIndent=h)}},e.prototype.breakUnicodeLine=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : line");i=t.split(null);for(var r=[],n=0;n<i.length;n++){var o=i[n],s=this.convertToUnicode(o,e);r[n]=s}return{tokens:r,words:i}},e.prototype.getUnicodeString=function(e){if(null===e)throw new Error("Argument Null Exception : token");var i=new P(e);return i.converted=!0,i.encode=t.InternalEnum.ForceEncoding.Ascii,i},e.prototype.convertToUnicode=function(t,e){var i=null;if(null==t)throw new Error("Argument Null Exception : text");if(null==e)throw new Error("Argument Null Exception : ttfFont");if(e.fontInternal instanceof Gt){var r=e.fontInternal.ttfReader;e.setSymbols(t),i=r.convertString(t);var n=P.toUnicodeArray(i,!1);i=P.byteToString(n)}return i},e.prototype.justifyLine=function(t,e,i){var r=t.text,n=t.width,o=this.shouldJustify(t,e,i),s=null!=i&&0!==i.wordSpacing,a=M.spaces,h=M.getCharsCount(r,a),l=0;return o?(s&&(n-=h*i.wordSpacing),l=(e-n)/h,this.pdfStreamWriter.setWordSpacing(l)):s?this.pdfStreamWriter.setWordSpacing(i.wordSpacing):this.pdfStreamWriter.setWordSpacing(0),l},e.prototype.reset=function(t){this.canvasSize=t,this.streamWriter.clear(),this.initialize(),this.initializeCoordinates()},e.prototype.shouldJustify=function(e,i,r){var n=e.text,o=e.width,s=null!=r&&r.alignment===t.PdfTextAlignment.Justify,a=i>=0&&o<i,h=M.spaces,l=M.getCharsCount(n,h)>0&&n[0]!==M.whiteSpace,u=(e.lineType&t.LineType.LayoutBreak)>0;return s&&a&&l&&(u||r.alignment===t.PdfTextAlignment.Justify)},e.prototype.underlineStrikeoutText=function(t,e,i,r,n,o){if(r.underline||r.strikeout){var s=this.createUnderlineStikeoutPen(t,e,r,o);if(null!=s){var a=this.getTextVerticalAlignShift(i.actualSize.height,n.height,o),h=0;h=n.y+a+r.metrics.getAscent(o)+1.5*s.width;for(var l=n.y+a+r.metrics.getHeight(o)/2+1.5*s.width,u=i.lines,c=0,p=i.lineCount;c<p;c++){var d=u[c],f=(d.text,d.width),g=this.getHorizontalAlignShift(f,n.width,o),m=this.getLineIndent(d,o,n,0===c);g+=this.rightToLeft(o)?0:m;var y=n.x+g,b=this.shouldJustify(d,n.width,o)?y+n.width-m:y+f-m;if(r.underline){w=h;this.drawLine(s,y,w,b,w),h+=i.lineHeight}if(r.strikeout){var w=l;this.drawLine(s,y,w,b,w),l+=i.lineHeight}this.isPointOverload&&u.length>1&&(n.x=0,n.width=this.clientSize.width)}this.isPointOverload=!1}}},e.prototype.createUnderlineStikeoutPen=function(t,e,i,r){var n=i.metrics.getSize(r)/20,o=null;return null!=t?o=new Q(t.color,n):null!=e&&(o=new Q(e,n)),o},e.prototype.getTextRenderingMode=function(e,i,r){var n=t.TextRenderingMode.None;return n=null!=e&&null!=i?t.TextRenderingMode.FillStroke:null!=e?t.TextRenderingMode.Stroke:t.TextRenderingMode.Fill,null!=r&&r.clipPath&&(n|=t.TextRenderingMode.ClipFlag),n},e.prototype.getLineIndent=function(e,i,r,n){var o=0,s=(e.lineType&t.LineType.FirstParagraphLine)>0;return null!=i&&s&&(o=n?i.firstLineIndent:i.paragraphIndent,o=r.width>0?Math.min(r.width,o):o),o},e.prototype.getHorizontalAlignShift=function(e,i,r){var n=0;if(i>=0&&null!=r&&r.alignment!==t.PdfTextAlignment.Left)switch(r.alignment){case t.PdfTextAlignment.Center:n=(i-e)/2;break;case t.PdfTextAlignment.Right:n=i-e}return n},e.prototype.rightToLeft=function(e){var i=null!==e&&void 0!==e&&e.rightToLeft;return null!==e&&void 0!==e&&e.textDirection!==t.PdfTextDirection.None&&void 0!==e.textDirection&&(i=!0),i},e.prototype.stateControl=function(t,e,i,r){if(void 0===r)this.stateControl(t,e,i,null);else{e instanceof qt&&(this.bCSInitialized=!1,e.colorSpace=this.colorSpace),e instanceof Qt&&(this.bCSInitialized=!1,e.graphics.colorSpace=this.colorSpace);null!==e?(void 0!==this.pageLayer&&null!=this.pageLayer&&!1===this.colorSpaceChanged&&(this.lastDocumentCS=this.pageLayer.page.document.colorSpace,this.lastGraphicsCS=this.pageLayer.page.graphics.colorSpace,this.colorSpace=this.pageLayer.page.document.colorSpace,this.currentColorSpace=this.pageLayer.page.document.colorSpace,this.colorSpaceChanged=!0),this.initCurrentColorSpace(this.currentColorSpace)):null!=t&&(void 0!==this.pageLayer&&null!=this.pageLayer&&(this.colorSpace=this.pageLayer.page.document.colorSpace,this.currentColorSpace=this.pageLayer.page.document.colorSpace),this.initCurrentColorSpace(this.currentColorSpace)),this.penControl(t,!1),this.brushControl(e,!1),this.fontControl(i,r,!1)}},e.prototype.initCurrentColorSpace=function(e){this.getResources.getResources();this.bCSInitialized||(this.currentColorSpace!=t.PdfColorSpace.GrayScale?(this.pdfStreamWriter.setColorSpace("Device"+this.currentColorSpaces[this.currentColorSpace],!0),this.pdfStreamWriter.setColorSpace("Device"+this.currentColorSpaces[this.currentColorSpace],!1),this.bCSInitialized=!0):(this.pdfStreamWriter.setColorSpace("DeviceGray",!0),this.pdfStreamWriter.setColorSpace("DeviceGray",!1),this.bCSInitialized=!0))},e.prototype.penControl=function(t,e){null!=t&&(this.currentPen=t,t.monitorChanges(this.currentPen,this.pdfStreamWriter,this.getResources,e,this.colorSpace,this.matrix.clone()),this.currentPen=t.clone())},e.prototype.brushControl=function(t,e){if(null!=t&&void 0!==t){var i=t.clone(),r=i;if(!(null===r||void 0===r||t instanceof A||t instanceof Qt)){var n=r.matrix,o=this.matrix.clone();null!=n&&(n.multiply(o),o=n),r.matrix=o}this.currentBrush=r,i.monitorChanges(this.currentBrush,this.pdfStreamWriter,this.getResources,e,this.colorSpace),this.currentBrush=t,t=null}},e.prototype.fontControl=function(e,i,r){if(null!=e){var n=null!=i?i.subSuperScript:t.PdfSubSuperScript.None,o=null!=this.currentStringFormat?this.currentStringFormat.subSuperScript:t.PdfSubSuperScript.None;if(r||e!==this.currentFont||n!==o){var s=this.getResources.getResources();this.currentFont=e,this.currentStringFormat=i;var a=e.metrics.getSize(i);this.isEmfTextScaled=!1;var h=s.getName(e);this.pdfStreamWriter.setFont(e,h,a)}}},e.prototype.setTransparency=function(e,i,r){if(void 0===i)this.istransparencySet=!0,this.setTransparency(e,e,t.PdfBlendMode.Normal);else if("number"==typeof i&&void 0===r)this.setTransparency(e,i,t.PdfBlendMode.Normal);else{null==this.trasparencies&&(this.trasparencies=new rt);var n=null,o=new re(e,i,r);this.trasparencies.containsKey(o)&&(n=this.trasparencies.getValue(o)),null==n&&(n=new nt(e,i,r),this.trasparencies.setValue(o,n));var s=this.getResources.getResources().getName(n);this.streamWriter.setGraphicsState(s)}},e.prototype.clipTranslateMargins=function(t,e,i,r,n,o){if(t instanceof k&&void 0===e)this.clipBounds=t,this.pdfStreamWriter.writeComment("Clip margins."),this.pdfStreamWriter.appendRectangle(t),this.pdfStreamWriter.closePath(),this.pdfStreamWriter.clipPath(!1),this.pdfStreamWriter.writeComment("Translate co-ordinate system."),this.translateTransform(t.x,t.y);else if("number"==typeof t){var s=new k(i,r,this.size.width-i-n,this.size.height-r-o);this.clipBounds=s,this.pdfStreamWriter.writeComment("Clip margins."),this.pdfStreamWriter.appendRectangle(s),this.pdfStreamWriter.closePath(),this.pdfStreamWriter.clipPath(!1),this.pdfStreamWriter.writeComment("Translate co-ordinate system."),this.translateTransform(t,e)}},e.prototype.updateY=function(t){return-t},e.prototype.translateTransform=function(t,e){var i=new tt;this.getTranslateTransform(t,e,i),this.pdfStreamWriter.modifyCtm(i),this.matrix.multiply(i)},e.prototype.getTranslateTransform=function(t,e,i){return i.translate(t,this.updateY(e)),i},e.prototype.scaleTransform=function(t,e){var i=new tt;this.getScaleTransform(t,e,i),this.pdfStreamWriter.modifyCtm(i),this.matrix.multiply(i)},e.prototype.getScaleTransform=function(t,e,i){return null==i&&(i=new tt),i.scale(t,e),i},e.prototype.rotateTransform=function(t){var e=new tt;this.getRotateTransform(t,e),this.pdfStreamWriter.modifyCtm(e),this.matrix.multiply(e)},e.prototype.initializeCoordinates=function(){this.pdfStreamWriter.writeComment("Change co-ordinate system to left/top."),this.mediaBoxUpperRightBound!==-this.size.height&&null==this.cropBox&&(this.mediaBoxUpperRightBound===this.size.height||0===this.mediaBoxUpperRightBound?this.translateTransform(0,this.updateY(this.size.height)):this.translateTransform(0,this.updateY(this.mediaBoxUpperRightBound)))},e.prototype.getRotateTransform=function(t,e){return null!=e&&void 0!==e||(e=new tt),e.rotate(this.updateY(t)),e},e.prototype.save=function(){var t=new ie(this,this.matrix.clone());return t.brush=this.currentBrush,t.pen=this.currentPen,t.font=this.currentFont,t.colorSpace=this.currentColorSpace,t.characterSpacing=this.previousCharacterSpacing,t.wordSpacing=this.previousWordSpacing,t.textScaling=this.previousTextScaling,t.textRenderingMode=this.previousTextRenderingMode,this.graphicsState.push(t),this.pdfStreamWriter.saveGraphicsState(),t},e.prototype.restore=function(t){if(void 0===t)this.graphicsState.length>0&&this.doRestoreState();else if(-1!==this.graphicsState.indexOf(t))for(;0!==this.graphicsState.length&&this.doRestoreState()!==t;);},e.prototype.doRestoreState=function(){var t=this.graphicsState.pop();return this.transformationMatrix=t.matrix,this.currentBrush=t.brush,this.currentPen=t.pen,this.currentFont=t.font,this.currentColorSpace=t.colorSpace,this.previousCharacterSpacing=t.characterSpacing,this.previousWordSpacing=t.wordSpacing,this.previousTextScaling=t.textScaling,this.previousTextRenderingMode=t.textRenderingMode,this.pdfStreamWriter.restoreGraphicsState(),t},e.prototype.drawPath=function(t,e,i){e instanceof Qt?(this.bCSInitialized=!1,e.graphics.colorSpace=this.colorSpace):e instanceof qt&&(this.bCSInitialized=!1,e.colorSpace=this.colorSpace),this.stateControl(t,e,null),this.buildUpPath(i.pathPoints,i.pathTypes),this.drawPathHelper(t,e,i.fillMode,!1)},e.prototype.drawArc=function(t,e,i,r,n,o,s){e instanceof k?this.drawArc(t,e.x,e.y,e.width,e.height,i,r):0!==s&&(this.stateControl(t,null,null),this.constructArcPath(e,i,e+r,i+n,o,s),this.drawPathHelper(t,null,!1))},e.prototype.buildUpPath=function(i,r){for(var n=i.length,o=0;o<n;++o){var s=0,a=i[o];switch(r[o]&e.pathTypesValuesMask){case t.PathPointType.Start:this.pdfStreamWriter.beginPath(a.x,a.y);break;case t.PathPointType.Bezier3:var h=new T(0,0),l=new T(0,0),u=this.getBezierPoints(i,r,o,h,l);this.pdfStreamWriter.appendBezierSegment(a,u.p2,u.p3),o=u.i;break;case t.PathPointType.Line:this.pdfStreamWriter.appendLineSegment(a);break;default:throw new Error("ArithmeticException - Incorrect path formation.")}s=r[o],this.checkFlags(s)}},e.prototype.getBezierPoints=function(i,r,n,o,s){if(++n,(r[n]&e.pathTypesValuesMask)!==t.PathPointType.Bezier3)throw new Error("ArgumentException : errorMsg");if(o=i[n],++n,(r[n]&e.pathTypesValuesMask)!==t.PathPointType.Bezier3)throw new Error("ArgumentException : errorMsg");return s=i[n],{i:n,p2:o,p3:s}},e.prototype.checkFlags=function(e){(e&t.PathPointType.CloseSubpath)===t.PathPointType.CloseSubpath&&this.pdfStreamWriter.closePath()},e.prototype.constructArcPath=function(t,e,i,r,n,o){var s=this.getBezierArc(t,e,i,r,n,o);if(0!==s.length){var a=[s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7]];this.pdfStreamWriter.beginPath(a[0],a[1]);var h=0;for(h=0;h<s.length;h+=8)a=[s[h],s[h+1],s[h+2],s[h+3],s[h+4],s[h+5],s[h+6],s[h+7]],this.pdfStreamWriter.appendBezierSegment(a[2],a[3],a[4],a[5],a[6],a[7])}},e.prototype.getBezierArc=function(t,e,i,r,n,o){if(t>i){s=void 0;s=t,t=i,i=s}if(r>e){var s=void 0;s=e,e=r,r=s}var a,h;Math.abs(o)<=90?(a=o,h=1):a=o/(h=Math.ceil(Math.abs(o)/90));for(var l=(t+i)/2,u=(e+r)/2,c=(i-t)/2,p=(r-e)/2,d=a*(Math.PI/360),f=Math.abs(4/3*(1-Math.cos(d))/Math.sin(d)),g=[],m=0;m<h;m++){var y=(n+m*a)*(Math.PI/180),b=(n+(m+1)*a)*(Math.PI/180),w=Math.cos(y),S=Math.cos(b),P=Math.sin(y),v=Math.sin(b);a>0?g.push(l+c*w,u-p*P,l+c*(w-f*P),u-p*(P+f*w),l+c*(S+f*v),u-p*(v-f*S),l+c*S,u-p*v):g.push(l+c*w,u-p*P,l+c*(w+f*P),u-p*(P-f*w),l+c*(S-f*v),u-p*(v+f*S),l+c*S,u-p*v)}return g},e.pathTypesValuesMask=15,e.transparencyObject=!1,e}(),ee=function(){function t(t){this.sender=t}return t.prototype.getResources=function(){return this.sender.getResources()},t}(),ie=function(){function e(e,i){this.internalTextRenderingMode=t.TextRenderingMode.Fill,this.internalCharacterSpacing=0,this.internalWordSpacing=0,this.internalTextScaling=100,this.pdfColorSpace=t.PdfColorSpace.Rgb,void 0!==e&&(this.pdfGraphics=e,this.transformationMatrix=i)}return Object.defineProperty(e.prototype,"graphics",{get:function(){return this.pdfGraphics},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matrix",{get:function(){return this.transformationMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"characterSpacing",{get:function(){return this.internalCharacterSpacing},set:function(t){this.internalCharacterSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wordSpacing",{get:function(){return this.internalWordSpacing},set:function(t){this.internalWordSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textScaling",{get:function(){return this.internalTextScaling},set:function(t){this.internalTextScaling=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pen",{get:function(){return this.pdfPen},set:function(t){this.pdfPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brush",{get:function(){return this.pdfBrush},set:function(t){this.pdfBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.pdfFont},set:function(t){this.pdfFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorSpace",{get:function(){return this.pdfColorSpace},set:function(t){this.pdfColorSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textRenderingMode",{get:function(){return this.internalTextRenderingMode},set:function(t){this.internalTextRenderingMode=t},enumerable:!0,configurable:!0}),e}(),re=function(){function t(t,e,i){this.alphaPen=t,this.alphaBrush=e,this.blendMode=i}return t}(),ne=function(){function e(e,i){if(this.pdfColorSpace=t.PdfColorSpace.Rgb,this.isVisible=!0,this.sublayer=!1,this.contentLength=0,this.dictionaryProperties=new a,null===e)throw new Error("ArgumentNullException:page");if(this.pdfPage=e,this.clipPageTemplates=!0,void 0===i)this.content=new b;else if(i instanceof b||null===i){if(null===i)throw new Error("ArgumentNullException:stream");this.content=i}else this.content=new b,this.clipPageTemplates=i}return Object.defineProperty(e.prototype,"colorSpace",{get:function(){return this.pdfColorSpace},set:function(t){this.pdfColorSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layerId",{get:function(){return this.layerid},set:function(t){this.layerid=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.layerName},set:function(t){this.layerName=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this.isVisible},set:function(t){this.isVisible=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){return null==this.pdfGraphics&&this.initializeGraphics(this.page),this.pdfGraphics},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"layers",{get:function(){return null==this.layer?(this.layer=new ae(this.page),this.layer.sublayer=!0,this.layer):this.layer},enumerable:!0,configurable:!0}),e.prototype.add=function(){var t=new e(this.pdfPage);return t.name="",t},e.prototype.sign=function(t){return 0===t?0:t>0?1:-1},e.prototype.initializeGraphics=function(t){var e=t,i=new ee(this.page);if(this.pdfGraphics=new te(t.size,i,this.content),this.pdfGraphics.mediaBoxUpperRightBound=0,null!=e){var r=e.section.parent;null!=r&&(this.pdfGraphics.colorSpace=r.document.colorSpace,this.colorSpace=r.document.colorSpace)}var n=this.sign(t.origin.y)===this.sign(t.origin.x);(t.origin.x>=0&&t.origin.y>=0||!n)&&this.pdfGraphics.initializeCoordinates();var o=e.section.getActualBounds(e,!0),s=e.section.pageSettings.margins;this.clipPageTemplates?t.origin.x>=0&&t.origin.y>=0&&this.pdfGraphics.clipTranslateMargins(o):this.graphics.clipTranslateMargins(o.x,o.y,s.left,s.top,s.right,s.bottom),this.pdfGraphics.setLayer(this)},Object.defineProperty(e.prototype,"element",{get:function(){return this.content},enumerable:!0,configurable:!0}),e}(),oe=function(){function t(){}return Object.defineProperty(t.prototype,"count",{get:function(){return void 0===this.collection&&(this.collection=[]),this.collection.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return void 0===this.collection&&(this.collection=[]),this.collection},enumerable:!0,configurable:!0}),t}(),se=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ae=function(t){function e(e){var i=t.call(this)||this;if(i.parentLayerCount=0,i.sublayer=!1,i.optionalContent=new h,e instanceof he){i.page=e;var r=e;i.parseLayers(r)}return i}return se(e,t),e.prototype.items=function(t,e){if("number"==typeof t&&void 0===e)return this.list[t];if(null==e)throw new Error("ArgumentNullException: layer");if(e.page!==this.page)throw new Error("ArgumentException: The layer belongs to another page")},e.prototype.add=function(t,e){if(void 0===t){var i=new ne(this.page);return i.name="",this.add(i),i}if(t instanceof ne){var r=this.list.push(t);return this.addLayer(r,t),r}return 0},e.prototype.addLayer=function(t,e){var i=new C(e);this.page.contents.add(i)},e.prototype.insert=function(t,e){for(var i=[],r=this.list.length,n=t;n<r;n++)i.push(this.list.pop());this.list.push(e);for(n=0;n<i.length;n++)this.list.push(i[n]);this.insertLayer(t,e)},e.prototype.insertLayer=function(t,e){if(null==e)throw new Error("ArgumentNullException:layer");var i=new C(e);this.page.contents.insert(t,i)},e.prototype.parseLayers=function(t){var e=this.page.contents;this.page.getResources();t.crossTable;var i=new b,r=new b,n=[];n.push("q"),i.data=n,e.insert(0,new C(i)),(n=[]).push("Q"),r.data=n,e.insert(e.count,new C(r))},e.prototype.indexOf=function(t){if(null==t)throw new Error("ArgumentNullException: layer");return this.list.indexOf(t)},e}(oe),he=function(){function t(t){this.defLayerIndex=-1,this.modified=!1,this.dictionaryProperties=new a,this.pageDictionary=t}return Object.defineProperty(t.prototype,"section",{get:function(){return this.pdfSection},set:function(t){this.pdfSection=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return this.pageDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.pageDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultLayer",{get:function(){var t=this.layers,e=this.defaultLayerIndex;return t.items(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultLayerIndex",{get:function(){if(0===this.layerCollection.count||-1===this.defLayerIndex){var t=this.layerCollection.add();this.defLayerIndex=this.layerCollection.indexOf(t)}return this.defLayerIndex},set:function(t){if(t<0||t>this.layers.count-1)throw new Error("ArgumentOutOfRangeException : value, Index can not be less 0 and greater Layers.Count - 1");this.defLayerIndex=t,this.modified=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layers",{get:function(){return null!=this.layerCollection&&void 0!==this.layerCollection||(this.layerCollection=new ae(this)),this.layerCollection},enumerable:!0,configurable:!0}),t.prototype.getResources=function(){return null==this.resources&&(this.resources=new Jt,this.dictionary.items.setValue(this.dictionaryProperties.resources,this.resources)),this.resources},Object.defineProperty(t.prototype,"contents",{get:function(){var t=this.pageDictionary.items.getValue(this.dictionaryProperties.contents);return null==t&&(t=new m,this.pageDictionary.items.setValue(this.dictionaryProperties.contents,t)),t},enumerable:!0,configurable:!0}),t.prototype.setResources=function(t){this.resources=t,this.dictionary.items.setValue(this.dictionaryProperties.resources,this.resources),this.modified=!0},t}(),le=function(){function e(t){this.alreadyExistsAnnotationError="This annotatation had been already added to page",this.missingAnnotationException="Annotation is not contained in collection.",this.dictionaryProperties=new a,this.internalAnnotations=new m,this.lists=[],void 0!==t&&(this.page=t)}return Object.defineProperty(e.prototype,"annotations",{get:function(){return this.internalAnnotations},set:function(t){this.internalAnnotations=t},enumerable:!0,configurable:!0}),e.prototype.add=function(t){this.doAdd(t)},e.prototype.doAdd=function(t){if(void 0===t.destination)return t.setPage(this.page),this.internalAnnotations.add(new C(t)),this.lists.push(t);var e=(new I).layout(t.text,t.font,t.stringFormat,new j(t.bounds.width,0),!1,new j(0,0)),i=t.bounds.y;if(1===e.lines.length){n=t.font.measureString(e.lines[0].text);t.bounds=new k(new T(t.bounds.x,i),n),t.text=e.lines[0].text,this.page.graphics.drawString(t.text,t.font,null,t.brush,t.bounds.x,t.bounds.y,t.bounds.width,t.bounds.height,null),t.setPage(this.page),this.setColor(t),this.internalAnnotations.add(new C(t)),this.lists.push(t)}else for(var r=0;r<e.lines.length;r++){var n=t.font.measureString(e.lines[r].text);if(0===r)t.bounds=new k(t.bounds.x,i,n.width,n.height),t.text=e.lines[r].text,this.page.graphics.drawString(t.text,t.font,null,t.brush,t.bounds.x,i,n.width,n.height,null),t.setPage(this.page),this.setColor(t),this.internalAnnotations.add(new C(t)),this.lists.push(t),i+=t.bounds.height;else{var o=t.clone();o.bounds=new k(new T(t.bounds.x,i),n),o.text=e.lines[r].text,this.page.graphics.drawString(o.text,o.font,null,o.brush,o.bounds.x,o.bounds.y,o.bounds.width,o.bounds.height,null),o.setPage(this.page),this.setColor(o),this.internalAnnotations.add(new C(o)),this.lists.push(o),i+=o.bounds.height}}},e.prototype.setColor=function(e){var i=t.PdfColorSpace.Rgb,r=e.color.toArray(i);e.dictionary.items.setValue(this.dictionaryProperties.c,r)},Object.defineProperty(e.prototype,"element",{get:function(){return this.internalAnnotations},enumerable:!0,configurable:!0}),e}(),ue=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ce=function(t){function e(){var e=t.call(this,new h)||this;return e.annotationCollection=null,e.beginSave=null,e.initialize(),e}return ue(e,t),Object.defineProperty(e.prototype,"document",{get:function(){return null!==this.section&&null!==this.section.parent?this.section.parent.document:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){var t=this.defaultLayer.graphics;return t.currentPage=this,t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"crossTable",{get:function(){if(null===this.section)throw new Error("PdfDocumentException : Page is not created");return null===this.section.parent?this.section.parentDocument.crossTable:this.section.parent.document.crossTable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.section.pageSettings.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"origin",{get:function(){return this.section.pageSettings.origin},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"annotations",{get:function(){return null==this.annotationCollection&&(this.annotationCollection=new le(this),this.dictionary.items.setValue(this.dictionaryProperties.annots,this.annotationCollection.element),this.annotationCollection.annotations=this.dictionary.items.getValue(this.dictionaryProperties.annots)),this.annotationCollection},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){this.dictionary.items.setValue(this.dictionaryProperties.type,new o("Page")),this.dictionary.pageBeginDrawTemplate=new f(this)},e.prototype.setSection=function(t){this.section=t,this.dictionary.items.setValue(this.dictionaryProperties.parent,new C(t))},e.prototype.resetProgress=function(){this.isProgressOn=!1},e.prototype.getClientSize=function(){var t=this.section.getActualBounds(this,!0);return new j(t.width,t.height)},e.prototype.pageBeginSave=function(){var t=this.document;void 0!==typeof t&&null!=t&&this.drawPageTemplates(t),null!=this.beginSave&&void 0!==this.beginSave&&this.beginSave(this)},e.prototype.drawPageTemplates=function(t){if(this.section.containsTemplates(t,this,!1)){var e=new ne(this,!1);if(this.layers.insert(0,e),this.section.drawTemplates(this,e,t,!1),null!==e.graphics&&void 0!==e.graphics)for(var i=0;i<e.graphics.automaticFields.automaticFields.length;i++){var r=e.graphics.automaticFields.automaticFields[i];r.field.performDraw(e.graphics,r.location,r.scalingX,r.scalingY)}}if(this.section.containsTemplates(t,this,!0)){var n=new ne(this,!1);this.layers.add(n),this.section.drawTemplates(this,n,t,!0)}},e}(he),pe=function(){function t(t){this.pdfPage=void 0!==t?t:null}return Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),t}(),de=function(){function t(t){if(this.pdfSection=null,null==t)throw Error('ArgumentNullException("section")');this.section=t}return Object.defineProperty(t.prototype,"section",{get:function(){return this.pdfSection},set:function(t){this.pdfSection=t},enumerable:!0,configurable:!0}),t.prototype.contains=function(t){return this.section.contains(t)},t.prototype.remove=function(t){this.section.remove(t)},t.prototype.add=function(){return this.section.add()},t}(),fe=function(){function e(){}return Object.defineProperty(e.prototype,"left",{get:function(){return this.leftTemplate},set:function(e){this.leftTemplate=this.checkElement(e,t.TemplateType.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.topTemplate},set:function(e){this.topTemplate=this.checkElement(e,t.TemplateType.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.rightTemplate},set:function(e){this.rightTemplate=this.checkElement(e,t.TemplateType.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.bottomTemplate},set:function(e){this.bottomTemplate=this.checkElement(e,t.TemplateType.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"EvenLeft",{get:function(){return this.evenLeft},set:function(e){this.evenLeft=this.checkElement(e,t.TemplateType.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"EvenTop",{get:function(){return this.evenTop},set:function(e){this.evenTop=this.checkElement(e,t.TemplateType.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"EvenRight",{get:function(){return this.evenRight},set:function(e){this.evenRight=this.checkElement(e,t.TemplateType.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"EvenBottom",{get:function(){return this.evenBottom},set:function(e){this.evenBottom=this.checkElement(e,t.TemplateType.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OddLeft",{get:function(){return this.oddLeft},set:function(e){this.oddLeft=this.checkElement(e,t.TemplateType.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OddTop",{get:function(){return this.oddTop},set:function(e){this.oddTop=this.checkElement(e,t.TemplateType.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OddRight",{get:function(){return this.oddRight},set:function(e){this.oddRight=this.checkElement(e,t.TemplateType.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"OddBottom",{get:function(){return this.oddBottom},set:function(e){this.oddBottom=this.checkElement(e,t.TemplateType.Bottom)},enumerable:!0,configurable:!0}),e.prototype.getLeft=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenLeft?this.EvenLeft:this.left:null!=this.OddLeft?this.OddLeft:this.left},e.prototype.getTop=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenTop?this.EvenTop:this.top:null!=this.OddTop?this.OddTop:this.top},e.prototype.getRight=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenRight?this.EvenRight:this.right:null!=this.OddRight?this.OddRight:this.right},e.prototype.getBottom=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenBottom?this.EvenBottom:this.bottom:null!=this.OddBottom?this.OddBottom:this.bottom},e.prototype.isEven=function(t){var e=t.section.document.pages;return(e.pageCollectionIndex.containsKey(t)?e.pageCollectionIndex.getValue(t)+1:e.indexOf(t)+1)%2==0},e.prototype.checkElement=function(e,i){if(null!=e){if(void 0!==e.type&&e.type!==t.TemplateType.None)throw new Error("NotSupportedException:Can not reassign the template element. Please, create new one.");e.type=i}return e},e}(),ge=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),me=function(t){function e(){var e=t.call(this)||this;return e.leftValue=e.topValue=e.rightValue=e.bottomValue=e.stampValue=!0,e}return ge(e,t),Object.defineProperty(e.prototype,"applyDocumentLeftTemplate",{get:function(){return this.leftValue},set:function(t){this.leftValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentTopTemplate",{get:function(){return this.topValue},set:function(t){this.topValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentRightTemplate",{get:function(){return this.rightValue},set:function(t){this.rightValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentBottomTemplate",{get:function(){return this.bottomValue},set:function(t){this.bottomValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentStamps",{get:function(){return this.stampValue},set:function(t){this.stampValue=t},enumerable:!0,configurable:!0}),e}(fe),ye=function(){function t(t,e){this.pageAdded=new pe,this.pdfPages=[],this.dictionaryProperties=new a,this.pdfDocument=t,void 0===e?(this.settings=t.pageSettings.clone(),this.initialSettings=this.settings.clone()):(this.settings=e.clone(),this.initialSettings=this.settings.clone()),this.initialize()}return Object.defineProperty(t.prototype,"parent",{get:function(){return this.sectionCollection},set:function(t){this.sectionCollection=t,this.section.items.setValue(this.dictionaryProperties.parent,new C(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentDocument",{get:function(){return this.pdfDocument},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageSettings",{get:function(){return this.settings},set:function(t){if(null==t)throw Error("Value can not be null.");this.settings=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.section},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.pagesReferences.count},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"template",{get:function(){return null==this.pageTemplate&&(this.pageTemplate=new me),this.pageTemplate},set:function(t){this.pageTemplate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this.sectionCollection.document},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pages",{get:function(){return null!=this.pagesCollection&&void 0!==this.pagesCollection||(this.pagesCollection=new de(this)),this.pagesCollection},enumerable:!0,configurable:!0}),t.prototype.getPages=function(){return this.pdfPages},t.prototype.pointToNativePdf=function(t,e){var i=this.getActualBounds(t,!0);return e.x+=i.x,e.y=this.pageSettings.height-e.y,e},t.prototype.setPageSettings=function(t){this.settings=t,this.state.orientation=t.orientation,this.state.rotate=t.rotate,this.state.size=t.size,this.state.origin=t.origin},t.prototype.initialize=function(){this.pagesReferences=new m,this.section=new h,this.state=new be(this.pdfDocument),this.section.sectionBeginSave=new d(this,this.state),this.pageCount=new g(0),this.section.items.setValue(this.dictionaryProperties.count,this.pageCount),this.section.items.setValue(this.dictionaryProperties.type,new o(this.dictionaryProperties.pages)),this.section.items.setValue(this.dictionaryProperties.kids,this.pagesReferences)},t.prototype.containsTemplates=function(t,e,i){var r=this.getDocumentTemplates(t,e,i),n=this.getSectionTemplates(e,i);return r.length>0||n.length>0},t.prototype.getDocumentTemplates=function(t,e,i){var r=[];return this.template.applyDocumentTopTemplate&&null!=t.template.getTop(e)&&(!t.template.getTop(e).foreground&&!i||t.template.getTop(e).foreground&&i)&&r.push(t.template.getTop(e)),this.template.applyDocumentBottomTemplate&&null!=t.template.getBottom(e)&&(!t.template.getBottom(e).foreground&&!i||t.template.getBottom(e).foreground&&i)&&r.push(t.template.getBottom(e)),this.template.applyDocumentLeftTemplate&&null!=t.template.getLeft(e)&&(!t.template.getLeft(e).foreground&&!i||t.template.getLeft(e).foreground&&i)&&r.push(t.template.getLeft(e)),this.template.applyDocumentRightTemplate&&null!=t.template.getRight(e)&&(!t.template.getRight(e).foreground&&!i||t.template.getRight(e).foreground&&i)&&r.push(t.template.getRight(e)),r},t.prototype.getSectionTemplates=function(t,e){var i=[];if(null!=this.template.getTop(t)&&(!(r=this.template.getTop(t)).foreground&&!e||r.foreground&&e)&&i.push(r),null!=this.template.getBottom(t)&&(!(r=this.template.getBottom(t)).foreground&&!e||r.foreground&&e)&&i.push(r),null!=this.template.getLeft(t)&&(!(r=this.template.getLeft(t)).foreground&&!e||r.foreground&&e)&&i.push(r),null!=this.template.getRight(t)){var r=this.template.getRight(t);(!r.foreground&&!e||r.foreground&&e)&&i.push(r)}return i},t.prototype.add=function(t){if(void 0===t){var e=new ce;return this.add(e),e}var i=this.checkPresence(t);this.pdfPages.push(t),this.pagesReferences.add(i),t.setSection(this),t.resetProgress(),this.pageAddedMethod(t)},t.prototype.checkPresence=function(t){for(var e=new C(t),i=!1,r=this.parent,n=0;n<r.section.length;n++){var o=r.section[n];i=i||o.contains(t)}return e},t.prototype.contains=function(t){return 0<=this.indexOf(t)},t.prototype.indexOf=function(t){for(var e=0;e<this.pdfPages.length;e++)if(this.pdfPages[e]===t)return this.pdfPages.indexOf(t);var i=new C(t);return this.pagesReferences.indexOf(i)},t.prototype.pageAddedMethod=function(t){var e=new pe(t);this.onPageAdded(e),this.parent.document.pages.onPageAdded(e),this.pageCount.intValue=this.count},t.prototype.onPageAdded=function(t){},t.prototype.getActualBounds=function(t,e,i){if(t instanceof ce&&"boolean"==typeof e){var r=this.parent.document;return this.getActualBounds(r,t,e)}t=t,e=e,i=i;var n=new k(0,0,0,0);n.height=i?this.pageSettings.size.height:this.pageSettings.getActualSize().height,n.width=i?this.pageSettings.size.width:this.pageSettings.getActualSize().width;var o=this.getLeftIndentWidth(t,e,i),s=this.getTopIndentHeight(t,e,i),a=this.getRightIndentWidth(t,e,i),h=this.getBottomIndentHeight(t,e,i);return n.x+=o,n.y+=s,n.width-=o+a,n.height-=s+h,n},t.prototype.getLeftIndentWidth=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.left:0,n=null!=this.template.getLeft(e)?this.template.getLeft(e).width:0,o=null!=t.template.getLeft(e)?t.template.getLeft(e).width:0;return r+=this.template.applyDocumentLeftTemplate?Math.max(n,o):n},t.prototype.getTopIndentHeight=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.top:0,n=null!=this.template.getTop(e)?this.template.getTop(e).height:0,o=null!=t.template.getTop(e)?t.template.getTop(e).height:0;return r+=this.template.applyDocumentTopTemplate?Math.max(n,o):n},t.prototype.getRightIndentWidth=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.right:0,n=null!=this.template.getRight(e)?this.template.getRight(e).width:0,o=null!=t.template.getRight(e)?t.template.getRight(e).width:0;return r+=this.template.applyDocumentRightTemplate?Math.max(n,o):n},t.prototype.getBottomIndentHeight=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.bottom:0,n=null!=this.template.getBottom(e)?this.template.getBottom(e).height:0,o=null!=t.template.getBottom(e)?t.template.getBottom(e).height:0;return r+=this.template.applyDocumentBottomTemplate?Math.max(n,o):n},t.prototype.remove=function(t){if(null==t)throw Error('ArgumentNullException("page")');var e=this.pdfPages.indexOf(t);this.pagesReferences.removeAt(e);for(var i=[],r=0;r<e;r++)i.push(this.pdfPages[r]);for(r=e+1;r<this.pdfPages.length;r++)i.push(this.pdfPages[r]);this.pdfPages=i},t.prototype.applyPageSettings=function(t,e,i){var r=new k(i.origin,i.size);t.items.setValue(this.dictionaryProperties.mediaBox,m.fromRectangle(r));var n=0;n=we.rotateFactor*i.rotate;var o=new g(n);t.items.setValue(this.dictionaryProperties.rotate,o)},t.prototype.beginSave=function(t,e){var i=e.document;this.applyPageSettings(this.section,i.pageSettings,t)},t.prototype.drawTemplates=function(t,e,i,r){var n=this.getDocumentTemplates(i,t,r),o=this.getSectionTemplates(t,r);this.drawTemplatesHelper(e,i,n),this.drawTemplatesHelper(e,i,o)},t.prototype.drawTemplatesHelper=function(t,e,i){if(null!=i&&i.length>0)for(var r=i.length,n=0;n<r;n++)i[n].draw(t,e)},t}(),be=function(){function t(t){this.pageOrientation=t.pageSettings.orientation,this.pageRotate=t.pageSettings.rotate,this.pageSize=t.pageSettings.size,this.pageOrigin=t.pageSettings.origin}return Object.defineProperty(t.prototype,"orientation",{get:function(){return this.pageOrientation},set:function(t){this.pageOrientation=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this.pageRotate},set:function(t){this.pageRotate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.pageSize},set:function(t){this.pageSize=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"origin",{get:function(){return this.pageOrigin},set:function(t){this.pageOrigin=t},enumerable:!0,configurable:!0}),t}(),we=function(){function t(t){this.sections=[],this.dictionaryProperties=new a,this.pdfDocument=t.clone(),this.initialize()}return Object.defineProperty(t.prototype,"section",{get:function(){return this.sections},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this.pdfDocument},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.sections.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.pages},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.sectionCount=new g(0),this.sectionCollection=new m,this.pages=new h,this.pages.beginSave=new l(this),this.pages.items.setValue(this.dictionaryProperties.type,new o("Pages")),this.pages.items.setValue(this.dictionaryProperties.kids,this.sectionCollection),this.pages.items.setValue(this.dictionaryProperties.count,this.sectionCount),this.pages.items.setValue(this.dictionaryProperties.resources,new h),this.setPageSettings(this.pages,this.pdfDocument.pageSettings)},t.prototype.pdfSectionCollection=function(t){if(t<0||t>=this.count)throw new Error("IndexOutOfRangeException()");return this.sections[t]},t.prototype.setPageSettings=function(t,e){var i=new k(new T,e.size);t.items.setValue(this.dictionaryProperties.mediaBox,m.fromRectangle(i))},t.prototype.add=function(t){if(void 0===t){var e=new ye(this.pdfDocument);return this.add(e),e}var i=this.checkSection(t);return this.sections.push(t),t.parent=this,this.sectionCollection.add(i),this.sections.indexOf(t)},t.prototype.checkSection=function(t){var e=new C(t);this.sectionCollection.contains(e);return e},t.prototype.countPages=function(){var t=0;return this.sections.forEach(function(e){return t+=e.count}),t},t.prototype.beginSave=function(){this.sectionCount.intValue=this.countPages()},t.rotateFactor=90,t}(),Se=function(){function t(t){this.pdfPageCollectionIndex=new n,this.document=t}return Object.defineProperty(t.prototype,"count",{get:function(){return this.countPages()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageCollectionIndex",{get:function(){return this.pdfPageCollectionIndex},enumerable:!0,configurable:!0}),t.prototype.add=function(t){if(void 0===t){var e=new ce;return this.add(e),e}this.getLastSection().add(t)},t.prototype.getLastSection=function(){var t=this.document.sections;return 0===t.section.length&&t.add(),t.section[t.section.length-1]},t.prototype.onPageAdded=function(t){},t.prototype.countPages=function(){for(var t=this.document.sections,e=0,i=0;i<t.section.length;i++)e+=t.section[i].count;return e},t.prototype.getPageByIndex=function(t){return this.getPage(t)},t.prototype.getPage=function(t){if(t<0||t>=this.count)throw Error('ArgumentOutOfRangeException("index", "Value can not be less 0")');for(var e=null,i=0,r=0,n=0,o=this.document.sections.count,s=0;s<o;s++){var a=this.document.sections.section[s];if(r=a.count,n=t-i,t>=i&&n<r){e=a.getPages()[n];break}i+=r}return e},t.prototype.indexOf=function(t){var e=-1;if(null==t)throw new Error("ArgumentNullException: page");for(var i=0,r=0,n=this.document.sections.count;r<n;r++){var o=this.document.sections.pdfSectionCollection(r);if((e=o.indexOf(t))>=0){e+=i;break}e=-1,i+=o.count}return e},t.prototype.remove=function(t){if(null==t)throw Error('ArgumentNullException("page")');for(var e=null,i=0,r=this.document.sections.count;i<r;i++)if((e=this.document.sections.pdfSectionCollection(i)).pages.contains(t)){e.pages.remove(t);break}return e},t}(),Pe=function(){function t(){this.referenceObjects=[],this.pdfFontCollection=new n}return t.prototype.search=function(t){var e=null,i=this.getGroup(t);return null==i?i=this.createNewGroup():i.length>0&&(e=i[0]),i.push(t),e},t.prototype.createNewGroup=function(){var t=[];return this.referenceObjects.push(t),t},t.prototype.getGroup=function(t){var e=null;if(null!==t)for(var i=this.referenceObjects.length,r=0;r<i;r++){if(this.referenceObjects.length>0){var n=this.referenceObjects[r];if(n.length>0){var o=n[0];if(t.equalsTo(o)){e=n;break}}else this.removeGroup(n)}i=this.referenceObjects.length}return e},t.prototype.removeGroup=function(t){if(null!==t){var e=this.referenceObjects.indexOf(t);this.referenceObjects.slice(e,e+1)}},t.prototype.destroy=function(){this.pdfFontCollection=void 0,this.referenceObjects=void 0},t}(),ve=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ce=function(e){function i(t){var r=e.call(this)||this;r.defaultMargin=40,r.streamWriter=null,r.document=r;var n=!1;void 0===t?(i.cacheCollection=new Pe,n=!1):n=t;var o=new W;r.setMainObjectCollection(o);var s=new q;s.isMerging=n,s.document=r,r.setCrossTable(s);var a=new U;return r.setCatalog(a),o.add(a),a.position=-1,r.sectionCollection=new we(r),r.documentPageCollection=new Se(r),a.pages=r.sectionCollection,r}return ve(i,e),Object.defineProperty(i,"defaultFont",{get:function(){return null==this.defaultStandardFont&&(this.defaultStandardFont=new xe(t.PdfFontFamily.Helvetica,8)),this.defaultStandardFont},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sections",{get:function(){return this.sectionCollection},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pageSettings",{get:function(){return null==this.settings&&(this.settings=new Z(this.defaultMargin)),this.settings},set:function(t){this.settings=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pages",{get:function(){return this.documentPageCollection},enumerable:!0,configurable:!0}),Object.defineProperty(i,"cache",{get:function(){return void 0===i.cacheCollection||null==i.cacheCollection?new Pe:i.cacheCollection},set:function(t){this.cacheCollection=t},enumerable:!0,configurable:!0}),Object.defineProperty(i,"enableCache",{get:function(){return this.isCacheEnabled},set:function(t){this.isCacheEnabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"colorSpace",{get:function(){return this.pdfColorSpace===t.PdfColorSpace.Rgb||this.pdfColorSpace===t.PdfColorSpace.Cmyk||this.pdfColorSpace===t.PdfColorSpace.GrayScale?this.pdfColorSpace:t.PdfColorSpace.Rgb},set:function(e){e===t.PdfColorSpace.Rgb||e===t.PdfColorSpace.Cmyk||e===t.PdfColorSpace.GrayScale?this.pdfColorSpace=e:this.pdfColorSpace=t.PdfColorSpace.Rgb},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"template",{get:function(){return null==this.pageTemplate&&(this.pageTemplate=new fe),this.pageTemplate},set:function(t){this.pageTemplate=t},enumerable:!0,configurable:!0}),i.prototype.docSave=function(t,e,i){if(this.checkPagesPresence(),null===t)throw new Error("ArgumentNullException : stream");this.streamWriter=t;var r=new z(t);if(r.document=this,"boolean"==typeof e&&void 0===i)return this.crossTable.save(r);this.crossTable.save(r,e)},i.prototype.checkPagesPresence=function(){0===this.pages.count&&this.pages.add()},i.prototype.destroy=function(){this.catalog=void 0,this.colorSpace=void 0,this.currentSavingObj=void 0,this.documentPageCollection=void 0,this.isStreamCopied=void 0,this.pageSettings=void 0,this.pageTemplate=void 0,this.pdfColorSpace=void 0,this.sectionCollection=void 0,i.cache.destroy(),this.crossTable.pdfObjects.destroy(),i.cache=void 0,this.streamWriter.destroy()},i.defaultStandardFont=null,i.isCacheEnabled=!0,i}(_),Be=function(){function e(){}return e.getMetrics=function(e,i,r){var n=null;switch(e){case t.PdfFontFamily.Helvetica:n=this.getHelveticaMetrics(e,i,r);break;case t.PdfFontFamily.Courier:n=this.getCourierMetrics(e,i,r);break;case t.PdfFontFamily.TimesRoman:n=this.getTimesMetrics(e,i,r);break;case t.PdfFontFamily.Symbol:n=this.getSymbolMetrics(e,i,r);break;case t.PdfFontFamily.ZapfDingbats:n=this.getZapfDingbatsMetrics(e,i,r);break;default:n=this.getHelveticaMetrics(t.PdfFontFamily.Helvetica,i,r)}return n.name=e.toString(),n.subScriptSizeFactor=this.subSuperScriptFactor,n.superscriptSizeFactor=this.subSuperScriptFactor,n},e.getHelveticaMetrics=function(e,i,r){var n=new It;return(i&t.PdfFontStyle.Bold)>0&&(i&t.PdfFontStyle.Italic)>0?(n.ascent=this.helveticaBoldItalicAscent,n.descent=this.helveticaBoldItalicDescent,n.postScriptName=this.helveticaBoldItalicName,n.size=r,n.widthTable=new Et(this.arialBoldWidth),n.height=n.ascent-n.descent):(i&t.PdfFontStyle.Bold)>0?(n.ascent=this.helveticaBoldAscent,n.descent=this.helveticaBoldDescent,n.postScriptName=this.helveticaBoldName,n.size=r,n.widthTable=new Et(this.arialBoldWidth),n.height=n.ascent-n.descent):(i&t.PdfFontStyle.Italic)>0?(n.ascent=this.helveticaItalicAscent,n.descent=this.helveticaItalicDescent,n.postScriptName=this.helveticaItalicName,n.size=r,n.widthTable=new Et(this.arialWidth),n.height=n.ascent-n.descent):(n.ascent=this.helveticaAscent,n.descent=this.helveticaDescent,n.postScriptName=this.helveticaName,n.size=r,n.widthTable=new Et(this.arialWidth),n.height=n.ascent-n.descent),n},e.getCourierMetrics=function(e,i,r){var n=new It;return(i&t.PdfFontStyle.Bold)>0&&(i&t.PdfFontStyle.Italic)>0?(n.ascent=this.courierBoldItalicAscent,n.descent=this.courierBoldItalicDescent,n.postScriptName=this.courierBoldItalicName,n.size=r,n.widthTable=new Et(this.fixedWidth),n.height=n.ascent-n.descent):(i&t.PdfFontStyle.Bold)>0?(n.ascent=this.courierBoldAscent,n.descent=this.courierBoldDescent,n.postScriptName=this.courierBoldName,n.size=r,n.widthTable=new Et(this.fixedWidth),n.height=n.ascent-n.descent):(i&t.PdfFontStyle.Italic)>0?(n.ascent=this.courierItalicAscent,n.descent=this.courierItalicDescent,n.postScriptName=this.courierItalicName,n.size=r,n.widthTable=new Et(this.fixedWidth),n.height=n.ascent-n.descent):(n.ascent=this.courierAscent,n.descent=this.courierDescent,n.postScriptName=this.courierName,n.size=r,n.widthTable=new Et(this.fixedWidth),n.height=n.ascent-n.descent),n},e.getTimesMetrics=function(e,i,r){var n=new It;return(i&t.PdfFontStyle.Bold)>0&&(i&t.PdfFontStyle.Italic)>0?(n.ascent=this.timesBoldItalicAscent,n.descent=this.timesBoldItalicDescent,n.postScriptName=this.timesBoldItalicName,n.size=r,n.widthTable=new Et(this.timesRomanBoldItalicWidths),n.height=n.ascent-n.descent):(i&t.PdfFontStyle.Bold)>0?(n.ascent=this.timesBoldAscent,n.descent=this.timesBoldDescent,n.postScriptName=this.timesBoldName,n.size=r,n.widthTable=new Et(this.timesRomanBoldWidth),n.height=n.ascent-n.descent):(i&t.PdfFontStyle.Italic)>0?(n.ascent=this.timesItalicAscent,n.descent=this.timesItalicDescent,n.postScriptName=this.timesItalicName,n.size=r,n.widthTable=new Et(this.timesRomanItalicWidth),n.height=n.ascent-n.descent):(n.ascent=this.timesAscent,n.descent=this.timesDescent,n.postScriptName=this.timesName,n.size=r,n.widthTable=new Et(this.timesRomanWidth),n.height=n.ascent-n.descent),n},e.getSymbolMetrics=function(t,e,i){var r=new It;return r.ascent=this.symbolAscent,r.descent=this.symbolDescent,r.postScriptName=this.symbolName,r.size=i,r.widthTable=new Et(this.symbolWidth),r.height=r.ascent-r.descent,r},e.getZapfDingbatsMetrics=function(t,e,i){var r=new It;return r.ascent=this.zapfDingbatsAscent,r.descent=this.zapfDingbatsDescent,r.postScriptName=this.zapfDingbatsName,r.size=i,r.widthTable=new Et(this.zapfDingbatsWidth),r.height=r.ascent-r.descent,r},e.subSuperScriptFactor=1.52,e.helveticaAscent=931,e.helveticaDescent=-225,e.helveticaName="Helvetica",e.helveticaBoldAscent=962,e.helveticaBoldDescent=-228,e.helveticaBoldName="Helvetica-Bold",e.helveticaItalicAscent=931,e.helveticaItalicDescent=-225,e.helveticaItalicName="Helvetica-Oblique",e.helveticaBoldItalicAscent=962,e.helveticaBoldItalicDescent=-228,e.helveticaBoldItalicName="Helvetica-BoldOblique",e.courierAscent=805,e.courierDescent=-250,e.courierName="Courier",e.courierBoldAscent=801,e.courierBoldDescent=-250,e.courierBoldName="Courier-Bold",e.courierItalicAscent=805,e.courierItalicDescent=-250,e.courierItalicName="Courier-Oblique",e.courierBoldItalicAscent=801,e.courierBoldItalicDescent=-250,e.courierBoldItalicName="Courier-BoldOblique",e.timesAscent=898,e.timesDescent=-218,e.timesName="Times-Roman",e.timesBoldAscent=935,e.timesBoldDescent=-218,e.timesBoldName="Times-Bold",e.timesItalicAscent=883,e.timesItalicDescent=-217,e.timesItalicName="Times-Italic",e.timesBoldItalicAscent=921,e.timesBoldItalicDescent=-218,e.timesBoldItalicName="Times-BoldItalic",e.symbolAscent=1010,e.symbolDescent=-293,e.symbolName="Symbol",e.zapfDingbatsAscent=820,e.zapfDingbatsDescent=-143,e.zapfDingbatsName="ZapfDingbats",e.arialWidth=[278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,0,556,0,222,556,333,1e3,556,556,333,1e3,667,333,1e3,0,611,0,0,222,222,333,333,350,556,1e3,333,1e3,500,333,944,0,500,667,0,333,556,556,556,556,260,556,333,737,370,556,584,0,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500],e.arialBoldWidth=[278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,0,556,0,278,556,500,1e3,556,556,333,1e3,667,333,1e3,0,611,0,0,278,278,500,500,350,556,1e3,333,1e3,556,333,944,0,500,667,0,333,556,556,556,556,280,556,333,737,370,556,584,0,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556],e.fixedWidth=[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600],e.timesRomanWidth=[250,333,408,500,500,833,778,180,333,333,500,564,250,333,250,278,500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444,921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722,556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500,333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500,500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,0,500,0,333,500,444,1e3,500,500,333,1e3,556,333,889,0,611,0,0,333,333,444,444,350,500,1e3,333,980,389,333,722,0,444,722,0,333,500,500,500,500,200,500,333,760,276,500,564,0,760,333,400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444,722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333,722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500,444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500],e.timesRomanBoldWidth=[250,333,555,500,500,1e3,833,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778,611,778,722,556,667,722,722,1e3,722,722,667,333,278,333,581,500,333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500,556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,0,500,0,333,500,500,1e3,500,500,333,1e3,556,333,1e3,0,667,0,0,333,333,500,500,350,500,1e3,333,1e3,389,333,722,0,444,722,0,333,500,500,500,500,220,500,333,747,300,500,570,0,747,333,400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500,722,722,722,722,722,722,1e3,722,667,667,667,667,389,389,389,389,722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500],e.timesRomanItalicWidth=[250,333,420,500,500,833,778,214,333,333,500,675,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500,920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722,611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500,333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500,500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,0,500,0,333,500,556,889,500,500,333,1e3,500,333,944,0,556,0,0,333,333,556,556,350,500,889,333,980,389,333,667,0,389,556,0,389,500,500,500,500,275,500,333,760,276,500,675,0,760,333,400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500,611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333,722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500,500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444],e.timesRomanBoldItalicWidths=[250,389,555,500,500,833,778,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722,611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500,333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500,500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,0,500,0,333,500,500,1e3,500,500,333,1e3,556,333,944,0,611,0,0,333,333,500,500,350,500,1e3,333,1e3,389,333,722,0,389,611,0,389,500,500,500,500,220,500,333,747,266,500,606,0,747,333,400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500,667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389,722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444],e.symbolWidth=[250,333,713,500,549,833,778,439,333,333,500,549,250,549,250,278,500,500,500,500,500,500,500,500,500,500,278,278,549,549,549,444,549,722,667,722,612,611,763,603,722,333,631,722,686,889,722,722,768,741,556,592,611,690,439,768,645,795,611,333,863,333,658,500,500,631,549,549,494,439,521,411,603,329,603,549,549,576,521,549,549,521,549,603,439,576,713,686,493,686,494,480,200,480,549,750,620,247,549,167,713,500,753,753,753,753,1042,987,603,987,603,400,549,411,549,549,713,494,460,549,549,549,549,1e3,603,1e3,658,823,686,795,987,768,768,823,768,768,713,713,713,713,713,713,713,768,713,790,790,890,823,549,250,713,603,603,1042,987,603,987,603,494,329,790,790,786,713,384,384,384,384,384,384,494,494,494,494,329,274,686,686,686,384,384,384,384,384,384,494,494,494,-1],e.zapfDingbatsWidth=[278,974,961,974,980,719,789,790,791,690,960,939,549,855,911,933,911,945,974,755,846,762,761,571,677,763,760,759,754,494,552,537,577,692,786,788,788,790,793,794,816,823,789,841,823,833,816,831,923,744,723,749,790,792,695,776,768,792,759,707,708,682,701,826,815,789,789,707,687,696,689,786,787,713,791,785,791,873,761,762,762,759,759,892,892,788,784,438,138,277,415,392,392,668,668,390,390,317,317,276,276,509,509,410,410,234,234,334,334,732,544,544,910,667,760,760,776,595,694,626,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,894,838,1016,458,748,924,748,918,927,928,928,834,873,828,924,924,917,930,931,463,883,836,836,867,867,696,696,874,874,760,946,771,865,771,888,967,888,831,873,927,970,918],e}(),Oe=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xe=function(e){function i(r,n,o){var s=e.call(this,n,void 0===o?r instanceof i?r.style:t.PdfFontStyle.Regular:o)||this;return s.dictionaryProperties=new a,s.encodings=["Unknown","StandardEncoding","MacRomanEncoding","MacExpertEncoding","WinAnsiEncoding","PDFDocEncoding","IdentityH"],s.pdfFontFamily=void 0===r?t.PdfFontFamily.Helvetica:r instanceof i?r.fontFamily:r,s.checkStyle(),s.initializeInternals(),s}return Oe(i,e),Object.defineProperty(i.prototype,"fontFamily",{get:function(){return this.pdfFontFamily},enumerable:!0,configurable:!0}),i.prototype.checkStyle=function(){if(this.fontFamily===t.PdfFontFamily.Symbol||this.fontFamily===t.PdfFontFamily.ZapfDingbats){var e=this.style;e&=~(t.PdfFontStyle.Bold|t.PdfFontStyle.Italic),this.setStyle(e)}},i.prototype.getLineWidth=function(t,e){if(null==t)throw new Error("ArgumentNullException:line");for(var r=0,n=(this.name,0),o=(t=i.convert(t)).length;n<o;n++){var s=t[n];r+=this.getCharWidthInternal(s,e)}var a=this.metrics.getSize(e);return r*=G.charSizeMultiplier*a,r=this.applyFormatSettings(t,e,r)},i.prototype.equalsToFont=function(e){var i=!1,r=e;if(null!=r){var n=this.fontFamily===r.fontFamily,o=~(t.PdfFontStyle.Underline|t.PdfFontStyle.Strikeout),s=(this.style&o)==(r.style&o);i=n&&s}return i},i.prototype.initializeInternals=function(){Ce.cache.search(this);var t=null,e=Be.getMetrics(this.pdfFontFamily,this.style,this.size);this.metrics=e,t=this.createInternals(),this.setInternals(t)},i.prototype.createInternals=function(){var e=new h;if(e.items.setValue(this.dictionaryProperties.type,new o(this.dictionaryProperties.font)),e.items.setValue(this.dictionaryProperties.subtype,new o(this.dictionaryProperties.type1)),e.items.setValue(this.dictionaryProperties.baseFont,new o(this.metrics.postScriptName)),this.fontFamily!==t.PdfFontFamily.Symbol&&this.fontFamily!==t.PdfFontFamily.ZapfDingbats){var i=this.encodings[t.FontEncoding.WinAnsiEncoding];e.items.setValue(this.dictionaryProperties.encoding,new o(i))}return e},i.prototype.getCharWidthInternal=function(t,e){var r=0;return r=t.charCodeAt(0),"0"!==this.name&&"1"!==this.name&&"2"!==this.name&&"3"!==this.name&&"4"!==this.name||(r-=i.charOffset),r=r>=0&&128!==r?r:0,this.metrics.widthTable.items(r)},i.convert=function(t){return t},i.charOffset=32,i}(G),Le=function(){function e(e){this.dictionaryProperties=new a,this.pdfColor=new L(255,255,255),this.rectangle=new k(0,0,0,0),this.pdfPage=null,this.textBrush=new A(new L(0,0,0)),this.textFont=new xe(t.PdfFontFamily.TimesRoman,10),this.format=new D(t.PdfTextAlignment.Left),this.content="",this.pdfDictionary=new h,this.internalColor=new L,this.darkness=1,void 0===e?this.initialize():(this.initialize(),this.bounds=e)}return Object.defineProperty(e.prototype,"color",{get:function(){return this.pdfColor},set:function(t){this.pdfColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerColor",{get:function(){return this.internalColor},set:function(t){this.internalColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.rectangle},set:function(t){this.rectangle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.textFont},set:function(t){this.textFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brush",{get:function(){return this.textBrush},set:function(t){this.textBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this.content},set:function(t){this.content=t,this.dictionary.items.setValue(this.dictionaryProperties.contents,new P(this.content))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dictionary",{get:function(){return this.pdfDictionary},set:function(t){this.pdfDictionary=t},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){this.pdfDictionary.annotationBeginSave=new p(this),this.pdfDictionary.items.setValue(this.dictionaryProperties.type,new o(this.dictionaryProperties.annot))},e.prototype.setPage=function(t){this.pdfPage=t,this.pdfDictionary.items.setValue(this.dictionaryProperties.p,new C(this.pdfPage))},e.prototype.beginSave=function(){this.save()},e.prototype.save=function(){var t=new k(this.rectangle.x,this.rectangle.y,this.rectangle.width,this.rectangle.height),e=this.pdfPage.section,i=t.height,r=e.pointToNativePdf(this.page,new T(t.x,t.y));t.x=r.x,t.width=r.x+t.width,t.y=r.y-this.page.document.pageSettings.margins.top,t.height=t.y-i,this.pdfDictionary.items.setValue(this.dictionaryProperties.rect,m.fromRectangle(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new g(this.darkness))},Object.defineProperty(e.prototype,"element",{get:function(){return this.pdfDictionary},enumerable:!0,configurable:!0}),e}(),Te=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),je=function(t){function e(e){return t.call(this,e)||this}return Te(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.subtype,new o(this.dictionaryProperties.link))},e}(Le),ke=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ve=function(t){function e(e){var i=t.call(this,e)||this;return i.pdfAction=null,i}return ke(e,t),e.prototype.getSetAction=function(t){if(void 0===t)return this.pdfAction;this.pdfAction=t},e}(je),Re=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ne=function(t){function e(e,i){var r=t.call(this,e)||this;return r.pdfDestination=null,void 0!==i&&(r.destination=i),r}return Re(e,t),Object.defineProperty(e.prototype,"destination",{get:function(){return this.pdfDestination},set:function(t){this.pdfDestination=t},enumerable:!0,configurable:!0}),e.prototype.save=function(){t.prototype.save.call(this),null!=this.pdfDestination&&this.dictionary.items.setValue(this.dictionaryProperties.dest,this.pdfDestination.element)},e.prototype.clone=function(){var t=new e(this.bounds,this.destination);return t.color=this.color,t.brush=this.brush,t.destination=this.destination,t.font=this.font,t},e}(je),Ae=function(){function t(t){this.layoutElement=t}return Object.defineProperty(t.prototype,"elements",{get:function(){return this.layoutElement},enumerable:!0,configurable:!0}),t.prototype.getElement=function(){return this.layoutElement},t.prototype.layout=function(t){return this.layoutInternal(t)},t.prototype.Layouter=function(t){return this.layoutInternal(t)},t.prototype.getNextPage=function(t){return t.section.add()},t.prototype.getPaginateBounds=function(t){if(null==t)throw new Error("ArgumentNullException : param");return t.format.usePaginateBounds?t.format.paginateBounds:new k(t.bounds.x,0,t.bounds.width,t.bounds.height)},t}(),De=function(){function t(t){void 0===t||(this.break=t.break,this.layout=t.layout,this.paginateBounds=t.paginateBounds,this.boundsSet=t.usePaginateBounds)}return Object.defineProperty(t.prototype,"layout",{get:function(){return this.layoutType},set:function(t){this.layoutType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"break",{get:function(){return this.breakType},set:function(t){this.breakType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paginateBounds",{get:function(){return void 0===this.layoutPaginateBounds&&null==this.layoutPaginateBounds&&(this.layoutPaginateBounds=new k(0,0,0,0)),this.layoutPaginateBounds},set:function(t){this.layoutPaginateBounds=t,this.boundsSet=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"usePaginateBounds",{get:function(){return this.boundsSet},enumerable:!0,configurable:!0}),t}(),Me=function(){function t(){}return Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},set:function(t){this.pdfPage=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return new k(this.layoutBounds.x,this.layoutBounds.y,this.layoutBounds.width,this.layoutBounds.height)},set:function(t){this.layoutBounds=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return this.layoutFormat},set:function(t){this.layoutFormat=t},enumerable:!0,configurable:!0}),t}(),Ie=function(){function t(t,e){this.pdfPage=t,this.layoutBounds=e}return Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.layoutBounds},enumerable:!0,configurable:!0}),t}(),Fe=function(){function e(){var e=new Q(new L(0,0,0));e.dashStyle=t.PdfDashStyle.Solid;var i=new Q(new L(0,0,0));i.dashStyle=t.PdfDashStyle.Solid;var r=new Q(new L(0,0,0));r.dashStyle=t.PdfDashStyle.Solid;var n=new Q(new L(0,0,0));n.dashStyle=t.PdfDashStyle.Solid,this.leftPen=e,this.rightPen=i,this.topPen=r,this.bottomPen=n}return Object.defineProperty(e.prototype,"left",{get:function(){return this.leftPen},set:function(t){this.leftPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.rightPen},set:function(t){this.rightPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.topPen},set:function(t){this.topPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.bottomPen},set:function(t){this.bottomPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"all",{set:function(t){this.leftPen=this.rightPen=this.topPen=this.bottomPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAll",{get:function(){return this.leftPen===this.rightPen&&this.leftPen===this.topPen&&this.leftPen===this.bottomPen},enumerable:!0,configurable:!0}),Object.defineProperty(e,"default",{get:function(){return new e},enumerable:!0,configurable:!0}),e}(),Ee=function(){function t(t,e,i,r){this.hasLeftPad=!1,this.hasRightPad=!1,this.hasTopPad=!1,this.hasBottomPad=!1,void 0===t?(this.leftPad=this.rightPad=5.76,this.bottomPad=this.topPad=.5):(this.leftPad=t,this.rightPad=e,this.topPad=i,this.bottomPad=r,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftPad},set:function(t){this.leftPad=t,this.hasLeftPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightPad},set:function(t){this.rightPad=t,this.hasRightPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topPad},set:function(t){this.topPad=t,this.hasTopPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomPad},set:function(t){this.bottomPad=t,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"all",{set:function(t){this.leftPad=this.rightPad=this.topPad=this.bottomPad=t,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),t}(),Ge=function(){function t(){}return Object.defineProperty(t.prototype,"raiseBeginPageLayout",{get:function(){return void 0!==this.beginPageLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"raiseEndPageLayout",{get:function(){return void 0!==this.endPageLayout},enumerable:!0,configurable:!0}),t.prototype.onBeginPageLayout=function(t){this.beginPageLayout&&this.beginPageLayout(this,t)},t.prototype.onEndPageLayout=function(t){this.endPageLayout&&this.endPageLayout(this,t)},t.prototype.drawHelper=function(t,e,i,r){if(e instanceof T&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof k&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof T&&void 0===e.width&&i instanceof De)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof De||null==r)){var n=t.graphics.clientSize.width-e,o=new k(e,i,n,0);return this.drawHelper(t,o,r)}if(e instanceof k&&void 0!==e.width&&"boolean"==typeof i)return this.bEmbedFonts=i,this.drawHelper(t,e,null);var s=new Me,a=e,h=i;if(s.page=t,s.bounds=a,null!=s){var l=s.bounds.x,u=s.bounds.y;0===s.bounds.x&&(l=Fe.default.right.width/2),0===s.bounds.y&&(u=Fe.default.top.width/2);var c=new k(l,u,s.bounds.width,s.bounds.height);s.bounds=c}return s.format=null!=h?h:new De,this.layout(s)},t}(),ze=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),We=function(e){function i(t){return e.call(this,t)||this}return ze(i,e),Object.defineProperty(i.prototype,"element",{get:function(){return e.prototype.getElement.call(this)},enumerable:!0,configurable:!0}),i.prototype.layoutInternal=function(t){this.format=null!==this.element.stringFormat&&void 0!==this.element.stringFormat?this.element.stringFormat:null;var e=t.page,i=t.bounds,r=this.element.value,n=null,o=new He;for(o.page=e,o.remainder=r;;){o=this.layoutOnPage(r,e,i,t),n=this.getLayoutResult(o);break}return n},i.prototype.getLayoutResult=function(t){return new _e(t.page,t.bounds,t.remainder,t.lastLineBounds)},i.prototype.layoutOnPage=function(e,i,r,n){var o=new He;o.remainder=e,o.page=i,r=this.checkCorrectBounds(i,r);var s=(new I).layout(e,this.element.font,this.format,r,i.getClientSize().height,!1,new j(0,0)),a=null==s.remainder,h=(n.format.break===t.PdfLayoutBreakType.FitElement||s.empty,i.graphics),l=this.element.getBrush();this.element instanceof Je&&(l.color=new L(0,0,255)),h.drawStringLayoutResult(s,this.element.font,this.element.pen,l,r,this.format);s.lines[s.lineCount-1];return o.lastLineBounds=h.getLineBounds(s.lineCount-1,s,this.element.font,r,this.format),o.bounds=this.getTextPageBounds(i,r,s),o.remainder=s.remainder,o.end=a,o},i.prototype.checkCorrectBounds=function(t,e){var i=t.graphics.clientSize;return e.height=e.height>0?e.height:i.height-e.y,e},i.prototype.getTextPageBounds=function(t,e,i){var r=i.actualSize,n=e.x,o=e.y,s=e.width>0?e.width:r.width,a=r.height;n=t.graphics.checkCorrectLayoutRectangle(r,e.x,e.y,this.format).x;var h=t.graphics.getTextVerticalAlignShift(r.height,e.height,this.format);return new k(n,o+=h,s,a)},i}(Ae),He=function(){function t(){}return t}(),_e=function(t){function e(e,i,r,n){var o=t.call(this,e,i)||this;return o.remainderText=r,o.lastLineTextBounds=n,o}return ze(e,t),Object.defineProperty(e.prototype,"remainder",{get:function(){return this.remainderText},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastLineBounds",{get:function(){return this.lastLineTextBounds},enumerable:!0,configurable:!0}),e}(Ie),Ke=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ue=function(e){function i(t,i,r,n,o){var s=e.call(this)||this;return s.content="",s.elementValue="",s.hasPointOverload=!1,s.isPdfTextElement=!1,void 0===t||("string"==typeof t&&void 0===i?(s.content=t,s.elementValue=t):"string"==typeof t&&i instanceof G&&void 0===r?(s.content=t,s.elementValue=t,s.pdfFont=i):"string"==typeof t&&i instanceof G&&r instanceof Q&&void 0===n?(s.content=t,s.elementValue=t,s.pdfFont=i,s.pdfPen=r):"string"==typeof t&&i instanceof G&&r instanceof R&&void 0===n?(s.content=t,s.elementValue=t,s.pdfFont=i,s.pdfBrush=r):(s.content=t,s.elementValue=t,s.pdfFont=i,s.pdfPen=r,s.pdfBrush=n,s.format=o)),s}return Ke(i,e),Object.defineProperty(i.prototype,"text",{get:function(){return this.content},set:function(t){this.elementValue=t,this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this.elementValue},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pen",{get:function(){return this.pdfPen},set:function(t){this.pdfPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"brush",{get:function(){return this.pdfBrush},set:function(t){this.pdfBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"font",{get:function(){return this.pdfFont},set:function(t){this.pdfFont=t,this.pdfFont instanceof xe&&null!=this.content?this.elementValue=xe.convert(this.content):this.elementValue=this.content},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"stringFormat",{get:function(){return this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),i.prototype.getBrush=function(){return null==this.pdfBrush||void 0===this.pdfBrush?new A(new L(0,0,0)):this.pdfBrush},i.prototype.layout=function(t){return new We(this).layout(t)},i.prototype.drawText=function(t,e,i,r){if(e instanceof T&&void 0===e.width&&void 0===i)return this.hasPointOverload=!0,this.drawText(t,e.x,e.y);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.hasPointOverload=!0,this.drawText(t,e,i,null);if(e instanceof k&&void 0!==e.width&&void 0===i)return this.drawText(t,e,null);if(e instanceof T&&void 0===e.width&&i instanceof De)return this.hasPointOverload=!0,this.drawText(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof De||null==r)){this.hasPointOverload=!0;var n=t.graphics.clientSize.width-e,o=new k(e,i,n,0);return this.drawText(t,o,r)}if(e instanceof k&&void 0!==e.width&&"boolean"==typeof i)return this.drawText(t,e,null);var s=new I;if(this.hasPointOverload){var a=s.layout(this.value,this.font,this.stringFormat,new j(t.graphics.clientSize.width-e.x,0),!0,t.graphics.clientSize),h=void 0,l=e,u=i;if((f=new Me).page=t,f.bounds=l,f.format=null!=u?u:new De,a.lines.length>1){if(this.text=a.layoutLines[0].text,f.bounds.y<=f.page.graphics.clientSize.height){g=new T(f.bounds.x,f.bounds.y);h=this.layout(f);for(var c=new k(0,h.bounds.y+a.lineHeight,t.graphics.clientSize.width,a.lineHeight),p=1;p<a.lines.length;p++)if(f.page=h.page,f.bounds=new k(new T(c.x,c.y),new j(c.width,c.height)),this.text=a.layoutLines[p].text,c.y+a.lineHeight>h.page.graphics.clientSize.height&&(f.page=f.page.graphics.getNextPage(),c=g.y>h.page.graphics.clientSize.height-h.bounds.height?new k(0,h.bounds.height,h.page.graphics.clientSize.width,a.lineHeight):new k(0,0,h.page.graphics.clientSize.width,a.lineHeight),f.bounds=c),h=this.layout(f),p!==a.lines.length-1)c=new k(0,h.bounds.y+a.lineHeight,h.page.graphics.clientSize.width,a.lineHeight);else{m=this.font.measureString(this.text,this.format).width;h=this.calculateResultBounds(h,m,h.page.graphics.clientSize.width,0)}}return h}y=this.font.measureString(this.text,this.format);return f.bounds.y<=f.page.graphics.clientSize.height&&(h=this.layout(f),h=this.calculateResultBounds(h,y.width,h.page.graphics.clientSize.width,0)),h}var h=s.layout(this.value,this.font,this.stringFormat,new j(e.width,0),!1,t.graphics.clientSize),d=void 0,f=new Me,l=e,u=i;if(f.page=t,f.bounds=l,f.format=null!=u?u:new De,h.lines.length>1){if(this.text=h.layoutLines[0].text,f.bounds.y<=f.page.graphics.clientSize.height){var g=new T(f.bounds.x,f.bounds.y);d=this.layout(f);for(var c=new k(l.x,d.bounds.y+h.lineHeight,l.width,h.lineHeight),p=1;p<h.lines.length;p++)if(f.page=d.page,f.bounds=new k(c.x,c.y,c.width,c.height),this.text=h.layoutLines[p].text,c.y+h.lineHeight>d.page.graphics.clientSize.height&&(f.page=f.page.graphics.getNextPage(),c=g.y>d.page.graphics.clientSize.height-d.bounds.height?new k(l.x,h.lineHeight,l.width,h.lineHeight):new k(l.x,0,l.width,h.lineHeight),f.bounds=c),d=this.layout(f),p!==h.lines.length-1)c=new k(l.x,d.bounds.y+h.lineHeight,l.width,h.lineHeight);else{var m=this.font.measureString(this.text,this.format).width;d=this.calculateResultBounds(d,m,l.width,l.x)}}return d}var y=this.font.measureString(this.text,this.format);return f.bounds.y<=f.page.graphics.clientSize.height&&(d=this.layout(f),d=this.calculateResultBounds(d,y.width,l.width,l.x)),d},i.prototype.calculateResultBounds=function(e,i,r,n){return null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===t.PdfTextAlignment.Center?(e.bounds.x=n+(r-i)/2,e.bounds.width=i):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===t.PdfTextAlignment.Right?(e.bounds.x=n+(r-i),e.bounds.width=i):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===t.PdfTextAlignment.Justify?(e.bounds.x=n,e.bounds.width=r):(e.bounds.width=n,e.bounds.width=i),e},i}(Ge),qe=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ye=function(t){function e(e,i){var r=t.call(this,e)||this;return void 0!==i&&(r.uri=i),r}return qe(e,t),Object.defineProperty(e.prototype,"uriAction",{get:function(){return void 0===this.pdfUriAction&&(this.pdfUriAction=new x),this.pdfUriAction},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this.uriAction.uri},set:function(t){this.uriAction.uri!==t&&(this.uriAction.uri=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"action",{get:function(){return this.getSetAction()},set:function(t){this.getSetAction(t),this.uriAction.next=t},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.subtype,new o(this.dictionaryProperties.link));this.uriAction.element;this.dictionary.items.setValue(this.dictionaryProperties.a,this.uriAction.element)},e}(Ve),Xe=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Je=function(e){function i(){var t=e.call(this)||this;t.uniformResourceLocator="",t.uriAnnotation=null,t.recalculateBounds=!1,t.defaultBorder=new m;for(var i=0;i<3;i++)t.defaultBorder.add(new g(0));return t}return Xe(i,e),Object.defineProperty(i.prototype,"url",{get:function(){return this.uniformResourceLocator},set:function(t){if(0===t.length)throw new Error("ArgumentException : Url - string can not be empty");this.uniformResourceLocator=t},enumerable:!0,configurable:!0}),i.prototype.draw=function(e,i){if(e instanceof ce){var r=new I,n=this.font.style;if(i instanceof T){if(this.recalculateBounds=!0,this.font.style=t.PdfFontStyle.Underline,1===(h=r.layout(this.value,this.font,this.stringFormat,new j(e.graphics.clientSize.width-i.x,0),!0,e.graphics.clientSize)).lines.length){var o=this.font.measureString(this.value),s=new k(i,o);s=this.calculateBounds(s,o.width,e.graphics.clientSize.width,i.x),this.uriAnnotation=new Ye(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation);a=this.drawText(e,i);return this.font.style=n,a}var a=this.drawMultipleLineWithPoint(h,e,i);return this.font.style=n,a}var h=r.layout(this.value,this.font,this.stringFormat,new j(i.width,0),!1,new j(0,0));if(this.font.style=t.PdfFontStyle.Underline,1===h.lines.length){var o=this.font.measureString(this.value),s=new k(new T(i.x,i.y),o);s=this.calculateBounds(s,o.width,i.width,i.x),this.uriAnnotation=new Ye(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation);l=this.drawText(e,i);return this.font.style=n,l}var l=this.drawMultipleLineWithBounds(h,e,i);return this.font.style=n,l}var u=new ce;return u=e.page,this.draw(u,i)},i.prototype.drawMultipleLineWithPoint=function(t,e,i){for(var r,n=0;n<t.layoutLines.length;n++){var o=this.font.measureString(t.lines[n].text),s=new k(i,o);if(0!==n&&(s.x=0),this.text=t.lines[n].text,s.y+o.height>e.graphics.clientSize.height){if(0===n)break;e=e.graphics.getNextPage(),s=new k(0,0,e.graphics.clientSize.width,o.height),i.y=0}s=this.calculateBounds(s,o.width,e.graphics.clientSize.width,s.x),this.uriAnnotation=new Ye(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation),r=0!==n?this.drawText(e,new T(0,s.y)):this.drawText(e,s.x,s.y),i.y+=o.height}return r},i.prototype.drawMultipleLineWithBounds=function(t,e,i){for(var r,n=0;n<t.layoutLines.length;n++){var o=this.font.measureString(t.lines[n].text),s=new k(new T(i.x,i.y),o);if(s=this.calculateBounds(s,o.width,i.width,i.x),this.text=t.lines[n].text,i.y+o.height>e.graphics.clientSize.height){if(0===n)break;e=e.graphics.getNextPage(),i=new k(i.x,0,i.width,o.height),s.y=0}this.uriAnnotation=new Ye(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation),r=this.drawText(e,i),i.y+=o.height}return r},i.prototype.calculateBounds=function(e,i,r,n){return null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===t.PdfTextAlignment.Center?(e.x=n+(r-i)/2,e.width=i):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===t.PdfTextAlignment.Right?(e.x=n+(r-i),e.width=i):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===t.PdfTextAlignment.Justify?(e.x=n,e.width=r):(e.width=n,e.width=i),e},i}(Ue),Ze=function(){function e(){}return e.convert=function(e,i){var r="";switch(i){case t.PdfNumberStyle.None:r="";break;case t.PdfNumberStyle.Numeric:r=e.toString();break;case t.PdfNumberStyle.LowerLatin:r=this.arabicToLetter(e).toLowerCase();break;case t.PdfNumberStyle.LowerRoman:r=this.arabicToRoman(e).toLowerCase();break;case t.PdfNumberStyle.UpperLatin:r=this.arabicToLetter(e);break;case t.PdfNumberStyle.UpperRoman:r=this.arabicToRoman(e)}return r},e.arabicToRoman=function(t){var e="",i=this.generateNumber(t,1e3,"M");e+=i.returnValue,t=i.intArabic;var r=this.generateNumber(t,900,"CM");e+=r.returnValue,t=r.intArabic;var n=this.generateNumber(t,500,"D");e+=n.returnValue,t=n.intArabic;var o=this.generateNumber(t,400,"CD");e+=o.returnValue,t=o.intArabic;var s=this.generateNumber(t,100,"C");e+=s.returnValue,t=s.intArabic;var a=this.generateNumber(t,90,"XC");e+=a.returnValue,t=a.intArabic;var h=this.generateNumber(t,50,"L");e+=h.returnValue,t=h.intArabic;var l=this.generateNumber(t,40,"XL");e+=l.returnValue,t=l.intArabic;var u=this.generateNumber(t,10,"X");e+=u.returnValue,t=u.intArabic;var c=this.generateNumber(t,9,"IX");e+=c.returnValue,t=c.intArabic;var p=this.generateNumber(t,5,"V");e+=p.returnValue,t=p.intArabic;var d=this.generateNumber(t,4,"IV");e+=d.returnValue,t=d.intArabic;var f=this.generateNumber(t,1,"I");return e+=f.returnValue,t=f.intArabic,e.toString()},e.arabicToLetter=function(t){for(var e=this.convertToLetter(t),i="";e.length>0;){var r=e.pop();i=this.appendChar(i,r)}return i.toString()},e.generateNumber=function(t,e,i){for(var r="";t>=e;)t-=e,r+=i;return{returnValue:r.toString(),intArabic:t}},e.convertToLetter=function(t){if(t<=0)throw Error("ArgumentOutOfRangeException-arabic, Value can not be less 0");for(var e=[];t>this.letterLimit;){var i=t%this.letterLimit;0===i?(t=t/this.letterLimit-1,i=this.letterLimit):t/=this.letterLimit,e.push(i)}return e.push(t),e},e.appendChar=function(t,i){return t+=String.fromCharCode(e.acsiiStartIndex+i)},e.letterLimit=26,e.acsiiStartIndex=64,e}(),$e=function(){function t(t,e){this.pdfTemplate=null,this.content="",void 0===t||(this.template=t,this.value=e)}return Object.defineProperty(t.prototype,"template",{get:function(){return this.pdfTemplate},set:function(t){this.pdfTemplate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.content},set:function(t){this.content=t},enumerable:!0,configurable:!0}),t}(),Qe=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ti=function(t){function e(){var e=t.call(this)||this;return e.list=new rt,e}return Qe(e,t),e.prototype.performDraw=function(e,i,r,n){t.prototype.performDrawHelper.call(this,e,i,r,n);var o=this.getValue(e),s=new Yt(this.getSize());this.list.setValue(e,new $e(s,o));var a=this.getSize();s.graphics.drawString(o,this.getFont(),this.pen,this.getBrush(),0,0,a.width,a.height,this.stringFormat);var h=new T(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(s,h,new j(s.width*r,s.height*n))},e}(ht),ei=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ii=function(e){function i(i,r){var n=e.call(this)||this;return n.internalNumberStyle=t.PdfNumberStyle.Numeric,void 0===r?n.font=i:r instanceof R?(n.font=i,n.brush=r):(n.font=i,n.bounds=r),n}return ei(i,e),Object.defineProperty(i.prototype,"numberStyle",{get:function(){return this.internalNumberStyle},set:function(t){this.internalNumberStyle=t},enumerable:!0,configurable:!0}),i.prototype.getValue=function(t){var e=this.getPageFromGraphics(t);return this.internalGetValue(e)},i.prototype.internalGetValue=function(t){var e=t.document.pages.indexOf(t)+1;return Ze.convert(e,this.numberStyle)},i}(ti),ri=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ni=function(t){function e(e,i,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];var s=t.call(this)||this;return s.internalAutomaticFields=null,s.internalText="",s.font=e,s.brush=i,s.text=r,s.automaticFields=n,s}return ri(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this.internalText},set:function(t){this.internalText=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"automaticFields",{get:function(){return this.internalAutomaticFields},set:function(t){this.internalAutomaticFields=t},enumerable:!0,configurable:!0}),e.prototype.getValue=function(t){var e=this.text.toString();if(void 0!==this.automaticFields&&null!=this.automaticFields&&this.automaticFields.length>0)for(var i=0;i<this.automaticFields.length;i++){var r=this.automaticFields[i];e=e.replace("{"+i+"}",r.getValue(t))}return e},e}(ti),oi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),si=function(t){function e(){var e=t.call(this)||this;return e.list=new rt,e.painterGraphics=[],e}return oi(e,t),e.prototype.performDraw=function(e,i,r,n){t.prototype.performDrawHelper.call(this,e,i,r,n);var o=this.getPageFromGraphics(e).document,s=this.getValue(e);if(this.list.containsKey(o)){var a=this.list.getValue(o),h=new T(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(a.template,h,new j(a.template.width*r,a.template.height*n)),this.painterGraphics.push(e)}else{var l=this.getSize(),u=new Yt(l);this.list.setValue(o,new $e(u,s)),u.graphics.drawString(s,this.getFont(),this.pen,this.getBrush(),0,0,l.width,l.height,this.stringFormat);h=new T(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(u,h,new j(u.width*r,u.height*n)),this.painterGraphics.push(e)}},e}(ht),ai=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),hi=function(e){function i(i,r){var n=e.call(this)||this;return n.internalNumberStyle=t.PdfNumberStyle.Numeric,void 0===r?n.font=i:r instanceof R?(n.font=i,n.brush=r):(n.font=i,n.bounds=r),n}return ai(i,e),Object.defineProperty(i.prototype,"numberStyle",{get:function(){return this.internalNumberStyle},set:function(t){this.internalNumberStyle=t},enumerable:!0,configurable:!0}),i.prototype.getValue=function(t){var e=this.getPageFromGraphics(t).section.parent.document.pages.count;return Ze.convert(e,this.numberStyle)},i}(si);!function(t){t[t.Location=0]="Location",t[t.FitToPage=1]="FitToPage",t[t.FitR=2]="FitR"}(t.PdfDestinationMode||(t.PdfDestinationMode={}));var li,ui=function(){function e(e,i){this.dictionaryProperties=new a,this.destinationMode=t.PdfDestinationMode.Location,this.zoomFactor=0,this.destinationLocation=new T(0,0),this.bounds=new k,this.array=new m;t.PdfPageRotateAngle.RotateAngle0;this.destinationLocation=new T(0,this.destinationLocation.y),this.pdfPage=e,i instanceof T?this.destinationLocation=i:this.bounds=i}return Object.defineProperty(e.prototype,"zoom",{get:function(){return this.zoomFactor},set:function(t){this.zoomFactor=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this.pdfPage},set:function(t){this.pdfPage=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mode",{get:function(){return this.destinationMode},set:function(t){this.destinationMode=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return this.destinationLocation},set:function(t){this.destinationLocation=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),e.prototype.pointToNativePdf=function(t,e){return t.section.pointToNativePdf(t,e)},e.prototype.initializePrimitive=function(){switch(this.array.clear(),this.array.add(new C(this.pdfPage)),this.destinationMode){case t.PdfDestinationMode.Location:var e=this.pdfPage,i=new T;i=this.pointToNativePdf(e,this.destinationLocation),this.array.add(new o(this.dictionaryProperties.xyz)),this.array.add(new g(i.x)),this.array.add(new g(i.y)),this.array.add(new g(this.zoomFactor));break;case t.PdfDestinationMode.FitToPage:this.array.add(new o(this.dictionaryProperties.fit))}},Object.defineProperty(e.prototype,"element",{get:function(){return this.initializePrimitive(),this.array},enumerable:!0,configurable:!0}),e}(),ci=function(){function t(t){this.mDictionary=null,this.mDictionaryProperties=new a,this.mDictionary=t}return Object.defineProperty(t.prototype,"domain",{get:function(){return this.mDictionary.items.getValue(this.mDictionaryProperties.domain)},set:function(t){this.mDictionary.items.setValue(this.mDictionaryProperties.domain,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"range",{get:function(){return this.mDictionary.items.getValue(this.mDictionaryProperties.range)},set:function(t){this.mDictionary.items.setValue(this.mDictionaryProperties.range,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return this.mDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.mDictionary},enumerable:!0,configurable:!0}),t}(),pi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),di=function(t){function e(e,i,r,n){var o=t.call(this,new b)||this;return void 0===e?o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new g(0)):(o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new g(0)),o.checkParams(e,i,r,n),o.setDomainAndRange(e,i),o.setSizeAndValues(r,n)),o}return pi(e,t),e.prototype.checkParams=function(t,e,i,r){e.length,t.length,r.length},e.prototype.setDomainAndRange=function(t,e){this.domain=new m(t),this.range=new m(e)},e.prototype.setSizeAndValues=function(t,e){var i=this.dictionary;this.dictionary.items.setValue(this.mDictionaryProperties.size,new m(t)),this.dictionary.items.setValue(this.mDictionaryProperties.bitsPerSample,new g(8)),i.writeBytes(e)},e}(ci);!function(t){t[t.None=0]="None",t[t.Start=1]="Start",t[t.End=2]="End",t[t.Both=3]="Both"}(li||(li={}));var fi;!function(t){t[t.BackwardDiagonal=0]="BackwardDiagonal",t[t.ForwardDiagonal=1]="ForwardDiagonal",t[t.Horizontal=2]="Horizontal",t[t.Vertical=3]="Vertical"}(fi||(fi={}));var gi;!function(t){t[t.Function=1]="Function",t[t.Axial=2]="Axial",t[t.Radial=3]="Radial"}(gi||(gi={}));var mi;!function(t){t[t.ActiveBorder=1]="ActiveBorder",t[t.ActiveCaption=2]="ActiveCaption",t[t.ActiveCaptionText=3]="ActiveCaptionText",t[t.AppWorkspace=4]="AppWorkspace",t[t.Control=5]="Control",t[t.ControlDark=6]="ControlDark",t[t.ControlDarkDark=7]="ControlDarkDark",t[t.ControlLight=8]="ControlLight",t[t.ControlLightLight=9]="ControlLightLight",t[t.ControlText=10]="ControlText",t[t.Desktop=11]="Desktop",t[t.GrayText=12]="GrayText",t[t.Highlight=13]="Highlight",t[t.HighlightText=14]="HighlightText",t[t.HotTrack=15]="HotTrack",t[t.InactiveBorder=16]="InactiveBorder",t[t.InactiveCaption=17]="InactiveCaption",t[t.InactiveCaptionText=18]="InactiveCaptionText",t[t.Info=19]="Info",t[t.InfoText=20]="InfoText",t[t.Menu=21]="Menu",t[t.MenuText=22]="MenuText",t[t.ScrollBar=23]="ScrollBar",t[t.Window=24]="Window",t[t.WindowFrame=25]="WindowFrame",t[t.WindowText=26]="WindowText",t[t.Transparent=27]="Transparent",t[t.AliceBlue=28]="AliceBlue",t[t.AntiqueWhite=29]="AntiqueWhite",t[t.Aqua=30]="Aqua",t[t.Aquamarine=31]="Aquamarine",t[t.Azure=32]="Azure",t[t.Beige=33]="Beige",t[t.Bisque=34]="Bisque",t[t.Black=35]="Black",t[t.BlanchedAlmond=36]="BlanchedAlmond",t[t.Blue=37]="Blue",t[t.BlueViolet=38]="BlueViolet",t[t.Brown=39]="Brown",t[t.BurlyWood=40]="BurlyWood",t[t.CadetBlue=41]="CadetBlue",t[t.Chartreuse=42]="Chartreuse",t[t.Chocolate=43]="Chocolate",t[t.Coral=44]="Coral",t[t.CornflowerBlue=45]="CornflowerBlue",t[t.Cornsilk=46]="Cornsilk",t[t.Crimson=47]="Crimson",t[t.Cyan=48]="Cyan",t[t.DarkBlue=49]="DarkBlue",t[t.DarkCyan=50]="DarkCyan",t[t.DarkGoldenrod=51]="DarkGoldenrod",t[t.DarkGray=52]="DarkGray",t[t.DarkGreen=53]="DarkGreen",t[t.DarkKhaki=54]="DarkKhaki",t[t.DarkMagenta=55]="DarkMagenta",t[t.DarkOliveGreen=56]="DarkOliveGreen",t[t.DarkOrange=57]="DarkOrange",t[t.DarkOrchid=58]="DarkOrchid",t[t.DarkRed=59]="DarkRed",t[t.DarkSalmon=60]="DarkSalmon",t[t.DarkSeaGreen=61]="DarkSeaGreen",t[t.DarkSlateBlue=62]="DarkSlateBlue",t[t.DarkSlateGray=63]="DarkSlateGray",t[t.DarkTurquoise=64]="DarkTurquoise",t[t.DarkViolet=65]="DarkViolet",t[t.DeepPink=66]="DeepPink",t[t.DeepSkyBlue=67]="DeepSkyBlue",t[t.DimGray=68]="DimGray",t[t.DodgerBlue=69]="DodgerBlue",t[t.Firebrick=70]="Firebrick",t[t.FloralWhite=71]="FloralWhite",t[t.ForestGreen=72]="ForestGreen",t[t.Fuchsia=73]="Fuchsia",t[t.Gainsboro=74]="Gainsboro",t[t.GhostWhite=75]="GhostWhite",t[t.Gold=76]="Gold",t[t.Goldenrod=77]="Goldenrod",t[t.Gray=78]="Gray",t[t.Green=79]="Green",t[t.GreenYellow=80]="GreenYellow",t[t.Honeydew=81]="Honeydew",t[t.HotPink=82]="HotPink",t[t.IndianRed=83]="IndianRed",t[t.Indigo=84]="Indigo",t[t.Ivory=85]="Ivory",t[t.Khaki=86]="Khaki",t[t.Lavender=87]="Lavender",t[t.LavenderBlush=88]="LavenderBlush",t[t.LawnGreen=89]="LawnGreen",t[t.LemonChiffon=90]="LemonChiffon",t[t.LightBlue=91]="LightBlue",t[t.LightCoral=92]="LightCoral",t[t.LightCyan=93]="LightCyan",t[t.LightGoldenrodYellow=94]="LightGoldenrodYellow",t[t.LightGray=95]="LightGray",t[t.LightGreen=96]="LightGreen",t[t.LightPink=97]="LightPink",t[t.LightSalmon=98]="LightSalmon",t[t.LightSeaGreen=99]="LightSeaGreen",t[t.LightSkyBlue=100]="LightSkyBlue",t[t.LightSlateGray=101]="LightSlateGray",t[t.LightSteelBlue=102]="LightSteelBlue",t[t.LightYellow=103]="LightYellow",t[t.Lime=104]="Lime",t[t.LimeGreen=105]="LimeGreen",t[t.Linen=106]="Linen",t[t.Magenta=107]="Magenta",t[t.Maroon=108]="Maroon",t[t.MediumAquamarine=109]="MediumAquamarine",t[t.MediumBlue=110]="MediumBlue",t[t.MediumOrchid=111]="MediumOrchid",t[t.MediumPurple=112]="MediumPurple",t[t.MediumSeaGreen=113]="MediumSeaGreen",t[t.MediumSlateBlue=114]="MediumSlateBlue",t[t.MediumSpringGreen=115]="MediumSpringGreen",t[t.MediumTurquoise=116]="MediumTurquoise",t[t.MediumVioletRed=117]="MediumVioletRed",t[t.MidnightBlue=118]="MidnightBlue",t[t.MintCream=119]="MintCream",t[t.MistyRose=120]="MistyRose",t[t.Moccasin=121]="Moccasin",t[t.NavajoWhite=122]="NavajoWhite",t[t.Navy=123]="Navy",t[t.OldLace=124]="OldLace",t[t.Olive=125]="Olive",t[t.OliveDrab=126]="OliveDrab",t[t.Orange=127]="Orange",t[t.OrangeRed=128]="OrangeRed",t[t.Orchid=129]="Orchid",t[t.PaleGoldenrod=130]="PaleGoldenrod",t[t.PaleGreen=131]="PaleGreen",t[t.PaleTurquoise=132]="PaleTurquoise",t[t.PaleVioletRed=133]="PaleVioletRed",t[t.PapayaWhip=134]="PapayaWhip",t[t.PeachPuff=135]="PeachPuff",t[t.Peru=136]="Peru",t[t.Pink=137]="Pink",t[t.Plum=138]="Plum",t[t.PowderBlue=139]="PowderBlue",t[t.Purple=140]="Purple",t[t.Red=141]="Red",t[t.RosyBrown=142]="RosyBrown",t[t.RoyalBlue=143]="RoyalBlue",t[t.SaddleBrown=144]="SaddleBrown",t[t.Salmon=145]="Salmon",t[t.SandyBrown=146]="SandyBrown",t[t.SeaGreen=147]="SeaGreen",t[t.SeaShell=148]="SeaShell",t[t.Sienna=149]="Sienna",t[t.Silver=150]="Silver",t[t.SkyBlue=151]="SkyBlue",t[t.SlateBlue=152]="SlateBlue",t[t.SlateGray=153]="SlateGray",t[t.Snow=154]="Snow",t[t.SpringGreen=155]="SpringGreen",t[t.SteelBlue=156]="SteelBlue",t[t.Tan=157]="Tan",t[t.Teal=158]="Teal",t[t.Thistle=159]="Thistle",t[t.Tomato=160]="Tomato",t[t.Turquoise=161]="Turquoise",t[t.Violet=162]="Violet",t[t.Wheat=163]="Wheat",t[t.White=164]="White",t[t.WhiteSmoke=165]="WhiteSmoke",t[t.Yellow=166]="Yellow",t[t.YellowGreen=167]="YellowGreen",t[t.ButtonFace=168]="ButtonFace",t[t.ButtonHighlight=169]="ButtonHighlight",t[t.ButtonShadow=170]="ButtonShadow",t[t.GradientActiveCaption=171]="GradientActiveCaption",t[t.GradientInactiveCaption=172]="GradientInactiveCaption",t[t.MenuBar=173]="MenuBar",t[t.MenuHighlight=174]="MenuHighlight"}(mi||(mi={}));var yi=function(){function t(){}return Object.defineProperty(t,"AliceBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.AliceBlue)&&(t=this.sBrushes.getValue(mi.AliceBlue)),null==t&&(t=this.getBrush(mi.AliceBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"AntiqueWhite",{get:function(){var t=null;return this.sBrushes.containsKey(mi.AntiqueWhite)&&(t=this.sBrushes.getValue(mi.AntiqueWhite)),null==t&&(t=this.getBrush(mi.AntiqueWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aqua",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Aqua)&&(t=this.sBrushes.getValue(mi.Aqua)),null==t&&(t=this.getBrush(mi.Aqua)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Aquamarine)&&(t=this.sBrushes.getValue(mi.Aquamarine)),null==t&&(t=this.getBrush(mi.Aquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Azure",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Azure)&&(t=this.sBrushes.getValue(mi.Azure)),null==t&&(t=this.getBrush(mi.Azure)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Beige",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Beige)&&(t=this.sBrushes.getValue(mi.Beige)),null==t&&(t=this.getBrush(mi.Beige)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Bisque",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Bisque)&&(t=this.sBrushes.getValue(mi.Bisque)),null==t&&(t=this.getBrush(mi.Bisque)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Black",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Black)&&(t=this.sBrushes.getValue(mi.Black)),null==t&&(t=this.getBrush(mi.Black)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlanchedAlmond",{get:function(){var t=null;return this.sBrushes.containsKey(mi.BlanchedAlmond)&&(t=this.sBrushes.getValue(mi.BlanchedAlmond)),null==t&&(t=this.getBrush(mi.BlanchedAlmond)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Blue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Blue)&&(t=this.sBrushes.getValue(mi.Blue)),null==t&&(t=this.getBrush(mi.Blue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlueViolet",{get:function(){var t=null;return this.sBrushes.containsKey(mi.BlueViolet)&&(t=this.sBrushes.getValue(mi.BlueViolet)),null==t&&(t=this.getBrush(mi.BlueViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Brown",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Brown)&&(t=this.sBrushes.getValue(mi.Brown)),null==t&&(t=this.getBrush(mi.Brown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BurlyWood",{get:function(){var t=null;return this.sBrushes.containsKey(mi.BurlyWood)&&(t=this.sBrushes.getValue(mi.BurlyWood)),null==t&&(t=this.getBrush(mi.BurlyWood)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CadetBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.CadetBlue)&&(t=this.sBrushes.getValue(mi.CadetBlue)),null==t&&(t=this.getBrush(mi.CadetBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chartreuse",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Chartreuse)&&(t=this.sBrushes.getValue(mi.Chartreuse)),null==t&&(t=this.getBrush(mi.Chartreuse)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chocolate",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Chocolate)&&(t=this.sBrushes.getValue(mi.Chocolate)),null==t&&(t=this.getBrush(mi.Chocolate)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Coral",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Coral)&&(t=this.sBrushes.getValue(mi.Coral)),null==t&&(t=this.getBrush(mi.Coral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CornflowerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.CornflowerBlue)&&(t=this.sBrushes.getValue(mi.CornflowerBlue)),null==t&&(t=this.getBrush(mi.CornflowerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cornsilk",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Cornsilk)&&(t=this.sBrushes.getValue(mi.Cornsilk)),null==t&&(t=this.getBrush(mi.Cornsilk)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Crimson",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Crimson)&&(t=this.sBrushes.getValue(mi.Crimson)),null==t&&(t=this.getBrush(mi.Crimson)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cyan",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Cyan)&&(t=this.sBrushes.getValue(mi.Cyan)),null==t&&(t=this.getBrush(mi.Cyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkBlue)&&(t=this.sBrushes.getValue(mi.DarkBlue)),null==t&&(t=this.getBrush(mi.DarkBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkCyan",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkCyan)&&(t=this.sBrushes.getValue(mi.DarkCyan)),null==t&&(t=this.getBrush(mi.DarkCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkGoldenrod)&&(t=this.sBrushes.getValue(mi.DarkGoldenrod)),null==t&&(t=this.getBrush(mi.DarkGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGray",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkGray)&&(t=this.sBrushes.getValue(mi.DarkGray)),null==t&&(t=this.getBrush(mi.DarkGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkGreen)&&(t=this.sBrushes.getValue(mi.DarkGreen)),null==t&&(t=this.getBrush(mi.DarkGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkKhaki",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkKhaki)&&(t=this.sBrushes.getValue(mi.DarkKhaki)),null==t&&(t=this.getBrush(mi.DarkKhaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkMagenta",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkMagenta)&&(t=this.sBrushes.getValue(mi.DarkMagenta)),null==t&&(t=this.getBrush(mi.DarkMagenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOliveGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkOliveGreen)&&(t=this.sBrushes.getValue(mi.DarkOliveGreen)),null==t&&(t=this.getBrush(mi.DarkOliveGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrange",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkOrange)&&(t=this.sBrushes.getValue(mi.DarkOrange)),null==t&&(t=this.getBrush(mi.DarkOrange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkOrchid)&&(t=this.sBrushes.getValue(mi.DarkOrchid)),null==t&&(t=this.getBrush(mi.DarkOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkRed",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkRed)&&(t=this.sBrushes.getValue(mi.DarkRed)),null==t&&(t=this.getBrush(mi.DarkRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkSalmon)&&(t=this.sBrushes.getValue(mi.DarkSalmon)),null==t&&(t=this.getBrush(mi.DarkSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkSeaGreen)&&(t=this.sBrushes.getValue(mi.DarkSeaGreen)),null==t&&(t=this.getBrush(mi.DarkSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkSlateBlue)&&(t=this.sBrushes.getValue(mi.DarkSlateBlue)),null==t&&(t=this.getBrush(mi.DarkSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkSlateGray)&&(t=this.sBrushes.getValue(mi.DarkSlateGray)),null==t&&(t=this.getBrush(mi.DarkSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkTurquoise)&&(t=this.sBrushes.getValue(mi.DarkTurquoise)),null==t&&(t=this.getBrush(mi.DarkTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkViolet",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DarkViolet)&&(t=this.sBrushes.getValue(mi.DarkViolet)),null==t&&(t=this.getBrush(mi.DarkViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepPink",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DeepPink)&&(t=this.sBrushes.getValue(mi.DeepPink)),null==t&&(t=this.getBrush(mi.DeepPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DeepSkyBlue)&&(t=this.sBrushes.getValue(mi.DeepSkyBlue)),null==t&&(t=this.getBrush(mi.DeepSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DimGray",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DimGray)&&(t=this.sBrushes.getValue(mi.DimGray)),null==t&&(t=this.getBrush(mi.DimGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DodgerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.DodgerBlue)&&(t=this.sBrushes.getValue(mi.DodgerBlue)),null==t&&(t=this.getBrush(mi.DodgerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Firebrick",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Firebrick)&&(t=this.sBrushes.getValue(mi.Firebrick)),null==t&&(t=this.getBrush(mi.Firebrick)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"FloralWhite",{get:function(){var t=null;return this.sBrushes.containsKey(mi.FloralWhite)&&(t=this.sBrushes.getValue(mi.FloralWhite)),null==t&&(t=this.getBrush(mi.FloralWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ForestGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.ForestGreen)&&(t=this.sBrushes.getValue(mi.ForestGreen)),null==t&&(t=this.getBrush(mi.ForestGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Fuchsia",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Fuchsia)&&(t=this.sBrushes.getValue(mi.Fuchsia)),null==t&&(t=this.getBrush(mi.Fuchsia)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gainsboro",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Gainsboro)&&(t=this.sBrushes.getValue(mi.Gainsboro)),null==t&&(t=this.getBrush(mi.Gainsboro)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GhostWhite",{get:function(){var t=null;return this.sBrushes.containsKey(mi.GhostWhite)&&(t=this.sBrushes.getValue(mi.GhostWhite)),null==t&&(t=this.getBrush(mi.GhostWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gold",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Gold)&&(t=this.sBrushes.getValue(mi.Gold)),null==t&&(t=this.getBrush(mi.Gold)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Goldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Goldenrod)&&(t=this.sBrushes.getValue(mi.Goldenrod)),null==t&&(t=this.getBrush(mi.Goldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gray",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Gray)&&(t=this.sBrushes.getValue(mi.Gray)),null==t&&(t=this.getBrush(mi.Gray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Green",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Green)&&(t=this.sBrushes.getValue(mi.Green)),null==t&&(t=this.getBrush(mi.Green)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GreenYellow",{get:function(){var t=null;return this.sBrushes.containsKey(mi.GreenYellow)&&(t=this.sBrushes.getValue(mi.GreenYellow)),null==t&&(t=this.getBrush(mi.GreenYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Honeydew",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Honeydew)&&(t=this.sBrushes.getValue(mi.Honeydew)),null==t&&(t=this.getBrush(mi.Honeydew)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"HotPink",{get:function(){var t=null;return this.sBrushes.containsKey(mi.HotPink)&&(t=this.sBrushes.getValue(mi.HotPink)),null==t&&(t=this.getBrush(mi.HotPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"IndianRed",{get:function(){var t=null;return this.sBrushes.containsKey(mi.IndianRed)&&(t=this.sBrushes.getValue(mi.IndianRed)),null==t&&(t=this.getBrush(mi.IndianRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Indigo",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Indigo)&&(t=this.sBrushes.getValue(mi.Indigo)),null==t&&(t=this.getBrush(mi.Indigo)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Ivory",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Ivory)&&(t=this.sBrushes.getValue(mi.Ivory)),null==t&&(t=this.getBrush(mi.Ivory)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Khaki",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Khaki)&&(t=this.sBrushes.getValue(mi.Khaki)),null==t&&(t=this.getBrush(mi.Khaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lavender",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Lavender)&&(t=this.sBrushes.getValue(mi.Lavender)),null==t&&(t=this.getBrush(mi.Lavender)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LavenderBlush",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LavenderBlush)&&(t=this.sBrushes.getValue(mi.LavenderBlush)),null==t&&(t=this.getBrush(mi.LavenderBlush)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LawnGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LawnGreen)&&(t=this.sBrushes.getValue(mi.LawnGreen)),null==t&&(t=this.getBrush(mi.LawnGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LemonChiffon",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LemonChiffon)&&(t=this.sBrushes.getValue(mi.LemonChiffon)),null==t&&(t=this.getBrush(mi.LemonChiffon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightBlue)&&(t=this.sBrushes.getValue(mi.LightBlue)),null==t&&(t=this.getBrush(mi.LightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCoral",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightCoral)&&(t=this.sBrushes.getValue(mi.LightCoral)),null==t&&(t=this.getBrush(mi.LightCoral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCyan",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightCyan)&&(t=this.sBrushes.getValue(mi.LightCyan)),null==t&&(t=this.getBrush(mi.LightCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGoldenrodYellow",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightGoldenrodYellow)&&(t=this.sBrushes.getValue(mi.LightGoldenrodYellow)),null==t&&(t=this.getBrush(mi.LightGoldenrodYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGray",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightGray)&&(t=this.sBrushes.getValue(mi.LightGray)),null==t&&(t=this.getBrush(mi.LightGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightGreen)&&(t=this.sBrushes.getValue(mi.LightGreen)),null==t&&(t=this.getBrush(mi.LightGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightPink",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightPink)&&(t=this.sBrushes.getValue(mi.LightPink)),null==t&&(t=this.getBrush(mi.LightPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightSalmon)&&(t=this.sBrushes.getValue(mi.LightSalmon)),null==t&&(t=this.getBrush(mi.LightSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightSeaGreen)&&(t=this.sBrushes.getValue(mi.LightSeaGreen)),null==t&&(t=this.getBrush(mi.LightSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightSkyBlue)&&(t=this.sBrushes.getValue(mi.LightSkyBlue)),null==t&&(t=this.getBrush(mi.LightSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightSlateGray)&&(t=this.sBrushes.getValue(mi.LightSlateGray)),null==t&&(t=this.getBrush(mi.LightSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightSteelBlue)&&(t=this.sBrushes.getValue(mi.LightSteelBlue)),null==t&&(t=this.getBrush(mi.LightSteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightYellow",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LightYellow)&&(t=this.sBrushes.getValue(mi.LightYellow)),null==t&&(t=this.getBrush(mi.LightYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lime",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Lime)&&(t=this.sBrushes.getValue(mi.Lime)),null==t&&(t=this.getBrush(mi.Lime)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LimeGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.LimeGreen)&&(t=this.sBrushes.getValue(mi.LimeGreen)),null==t&&(t=this.getBrush(mi.LimeGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Linen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Linen)&&(t=this.sBrushes.getValue(mi.Linen)),null==t&&(t=this.getBrush(mi.Linen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Magenta",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Magenta)&&(t=this.sBrushes.getValue(mi.Magenta)),null==t&&(t=this.getBrush(mi.Magenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Maroon",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Maroon)&&(t=this.sBrushes.getValue(mi.Maroon)),null==t&&(t=this.getBrush(mi.Maroon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumAquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MediumAquamarine)&&(t=this.sBrushes.getValue(mi.MediumAquamarine)),null==t&&(t=this.getBrush(mi.MediumAquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MediumBlue)&&(t=this.sBrushes.getValue(mi.MediumBlue)),null==t&&(t=this.getBrush(mi.MediumBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MediumOrchid)&&(t=this.sBrushes.getValue(mi.MediumOrchid)),null==t&&(t=this.getBrush(mi.MediumOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumPurple",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MediumPurple)&&(t=this.sBrushes.getValue(mi.MediumPurple)),null==t&&(t=this.getBrush(mi.MediumPurple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MediumSeaGreen)&&(t=this.sBrushes.getValue(mi.MediumSeaGreen)),null==t&&(t=this.getBrush(mi.MediumSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MediumSlateBlue)&&(t=this.sBrushes.getValue(mi.MediumSlateBlue)),null==t&&(t=this.getBrush(mi.MediumSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MediumSpringGreen)&&(t=this.sBrushes.getValue(mi.MediumSpringGreen)),null==t&&(t=this.getBrush(mi.MediumSpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MediumTurquoise)&&(t=this.sBrushes.getValue(mi.MediumTurquoise)),null==t&&(t=this.getBrush(mi.MediumTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MediumVioletRed)&&(t=this.sBrushes.getValue(mi.MediumVioletRed)),null==t&&(t=this.getBrush(mi.MediumVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MidnightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MidnightBlue)&&(t=this.sBrushes.getValue(mi.MidnightBlue)),null==t&&(t=this.getBrush(mi.MidnightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MintCream",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MintCream)&&(t=this.sBrushes.getValue(mi.MintCream)),null==t&&(t=this.getBrush(mi.MintCream)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MistyRose",{get:function(){var t=null;return this.sBrushes.containsKey(mi.MistyRose)&&(t=this.sBrushes.getValue(mi.MistyRose)),null==t&&(t=this.getBrush(mi.MistyRose)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Moccasin",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Moccasin)&&(t=this.sBrushes.getValue(mi.Moccasin)),null==t&&(t=this.getBrush(mi.Moccasin)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"NavajoWhite",{get:function(){var t=null;return this.sBrushes.containsKey(mi.NavajoWhite)&&(t=this.sBrushes.getValue(mi.NavajoWhite)),null==t&&(t=this.getBrush(mi.NavajoWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Navy",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Navy)&&(t=this.sBrushes.getValue(mi.Navy)),null==t&&(t=this.getBrush(mi.Navy)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OldLace",{get:function(){var t=null;return this.sBrushes.containsKey(mi.OldLace)&&(t=this.sBrushes.getValue(mi.OldLace)),null==t&&(t=this.getBrush(mi.OldLace)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Olive",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Olive)&&(t=this.sBrushes.getValue(mi.Olive)),null==t&&(t=this.getBrush(mi.Olive)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OliveDrab",{get:function(){var t=null;return this.sBrushes.containsKey(mi.OliveDrab)&&(t=this.sBrushes.getValue(mi.OliveDrab)),null==t&&(t=this.getBrush(mi.OliveDrab)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orange",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Orange)&&(t=this.sBrushes.getValue(mi.Orange)),null==t&&(t=this.getBrush(mi.Orange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OrangeRed",{get:function(){var t=null;return this.sBrushes.containsKey(mi.OrangeRed)&&(t=this.sBrushes.getValue(mi.OrangeRed)),null==t&&(t=this.getBrush(mi.OrangeRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orchid",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Orchid)&&(t=this.sBrushes.getValue(mi.Orchid)),null==t&&(t=this.getBrush(mi.Orchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(mi.PaleGoldenrod)&&(t=this.sBrushes.getValue(mi.PaleGoldenrod)),null==t&&(t=this.getBrush(mi.PaleGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.PaleGreen)&&(t=this.sBrushes.getValue(mi.PaleGreen)),null==t&&(t=this.getBrush(mi.PaleGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(mi.PaleTurquoise)&&(t=this.sBrushes.getValue(mi.PaleTurquoise)),null==t&&(t=this.getBrush(mi.PaleTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(mi.PaleVioletRed)&&(t=this.sBrushes.getValue(mi.PaleVioletRed)),null==t&&(t=this.getBrush(mi.PaleVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PapayaWhip",{get:function(){var t=null;return this.sBrushes.containsKey(mi.PapayaWhip)&&(t=this.sBrushes.getValue(mi.PapayaWhip)),null==t&&(t=this.getBrush(mi.PapayaWhip)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PeachPuff",{get:function(){var t=null;return this.sBrushes.containsKey(mi.PeachPuff)&&(t=this.sBrushes.getValue(mi.PeachPuff)),null==t&&(t=this.getBrush(mi.PeachPuff)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Peru",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Peru)&&(t=this.sBrushes.getValue(mi.Peru)),null==t&&(t=this.getBrush(mi.Peru)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Pink",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Pink)&&(t=this.sBrushes.getValue(mi.Pink)),null==t&&(t=this.getBrush(mi.Pink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Plum",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Plum)&&(t=this.sBrushes.getValue(mi.Plum)),null==t&&(t=this.getBrush(mi.Plum)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PowderBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.PowderBlue)&&(t=this.sBrushes.getValue(mi.PowderBlue)),null==t&&(t=this.getBrush(mi.PowderBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Purple",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Purple)&&(t=this.sBrushes.getValue(mi.Purple)),null==t&&(t=this.getBrush(mi.Purple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Red",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Red)&&(t=this.sBrushes.getValue(mi.Red)),null==t&&(t=this.getBrush(mi.Red)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RosyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(mi.RosyBrown)&&(t=this.sBrushes.getValue(mi.RosyBrown)),null==t&&(t=this.getBrush(mi.RosyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RoyalBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.RoyalBlue)&&(t=this.sBrushes.getValue(mi.RoyalBlue)),null==t&&(t=this.getBrush(mi.RoyalBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SaddleBrown",{get:function(){var t=null;return this.sBrushes.containsKey(mi.SaddleBrown)&&(t=this.sBrushes.getValue(mi.SaddleBrown)),null==t&&(t=this.getBrush(mi.SaddleBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Salmon",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Salmon)&&(t=this.sBrushes.getValue(mi.Salmon)),null==t&&(t=this.getBrush(mi.Salmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SandyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(mi.SandyBrown)&&(t=this.sBrushes.getValue(mi.SandyBrown)),null==t&&(t=this.getBrush(mi.SandyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.SeaGreen)&&(t=this.sBrushes.getValue(mi.SeaGreen)),null==t&&(t=this.getBrush(mi.SeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaShell",{get:function(){var t=null;return this.sBrushes.containsKey(mi.SeaShell)&&(t=this.sBrushes.getValue(mi.SeaShell)),null==t&&(t=this.getBrush(mi.SeaShell)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Sienna",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Sienna)&&(t=this.sBrushes.getValue(mi.Sienna)),null==t&&(t=this.getBrush(mi.Sienna)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Silver",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Silver)&&(t=this.sBrushes.getValue(mi.Silver)),null==t&&(t=this.getBrush(mi.Silver)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.SkyBlue)&&(t=this.sBrushes.getValue(mi.SkyBlue)),null==t&&(t=this.getBrush(mi.SkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.SlateBlue)&&(t=this.sBrushes.getValue(mi.SlateBlue)),null==t&&(t=this.getBrush(mi.SlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(mi.SlateGray)&&(t=this.sBrushes.getValue(mi.SlateGray)),null==t&&(t=this.getBrush(mi.SlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Snow",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Snow)&&(t=this.sBrushes.getValue(mi.Snow)),null==t&&(t=this.getBrush(mi.Snow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.SpringGreen)&&(t=this.sBrushes.getValue(mi.SpringGreen)),null==t&&(t=this.getBrush(mi.SpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(mi.SteelBlue)&&(t=this.sBrushes.getValue(mi.SteelBlue)),null==t&&(t=this.getBrush(mi.SteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tan",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Tan)&&(t=this.sBrushes.getValue(mi.Tan)),null==t&&(t=this.getBrush(mi.Tan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Teal",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Teal)&&(t=this.sBrushes.getValue(mi.Teal)),null==t&&(t=this.getBrush(mi.Teal)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Thistle",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Thistle)&&(t=this.sBrushes.getValue(mi.Thistle)),null==t&&(t=this.getBrush(mi.Thistle)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tomato",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Tomato)&&(t=this.sBrushes.getValue(mi.Tomato)),null==t&&(t=this.getBrush(mi.Tomato)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Transparent",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Transparent)&&(t=this.sBrushes.getValue(mi.Transparent)),null==t&&(t=this.getBrush(mi.Transparent)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Turquoise",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Turquoise)&&(t=this.sBrushes.getValue(mi.Turquoise)),null==t&&(t=this.getBrush(mi.Turquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Violet",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Violet)&&(t=this.sBrushes.getValue(mi.Violet)),null==t&&(t=this.getBrush(mi.Violet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Wheat",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Wheat)&&(t=this.sBrushes.getValue(mi.Wheat)),null==t&&(t=this.getBrush(mi.Wheat)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"White",{get:function(){var t=null;return this.sBrushes.containsKey(mi.White)&&(t=this.sBrushes.getValue(mi.White)),null==t&&(t=this.getBrush(mi.White)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WhiteSmoke",{get:function(){var t=null;return this.sBrushes.containsKey(mi.WhiteSmoke)&&(t=this.sBrushes.getValue(mi.WhiteSmoke)),null==t&&(t=this.getBrush(mi.WhiteSmoke)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Yellow",{get:function(){var t=null;return this.sBrushes.containsKey(mi.Yellow)&&(t=this.sBrushes.getValue(mi.Yellow)),null==t&&(t=this.getBrush(mi.Yellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"YellowGreen",{get:function(){var t=null;return this.sBrushes.containsKey(mi.YellowGreen)&&(t=this.sBrushes.getValue(mi.YellowGreen)),null==t&&(t=this.getBrush(mi.YellowGreen)),t},enumerable:!0,configurable:!0}),t.getBrush=function(t){var e=this.getColorValue(t),i=new A(e);return this.sBrushes.setValue(t,i),i},t.getColorValue=function(t){var e=new L;switch(t){case mi.Transparent:e=new L(0,255,255,255);break;case mi.AliceBlue:e=new L(255,240,248,255);break;case mi.AntiqueWhite:e=new L(255,250,235,215);break;case mi.Aqua:e=new L(255,0,255,255);break;case mi.Aquamarine:e=new L(255,127,255,212);break;case mi.Azure:e=new L(255,240,255,255);break;case mi.Beige:e=new L(255,245,245,220);break;case mi.Bisque:e=new L(255,255,228,196);break;case mi.Black:e=new L(255,0,0,0);break;case mi.BlanchedAlmond:e=new L(255,255,235,205);break;case mi.Blue:e=new L(255,0,0,255);break;case mi.BlueViolet:e=new L(255,138,43,226);break;case mi.Brown:e=new L(255,165,42,42);break;case mi.BurlyWood:e=new L(255,222,184,135);break;case mi.CadetBlue:e=new L(255,95,158,160);break;case mi.Chartreuse:e=new L(255,127,255,0);break;case mi.Chocolate:e=new L(255,210,105,30);break;case mi.Coral:e=new L(255,255,127,80);break;case mi.CornflowerBlue:e=new L(255,100,149,237);break;case mi.Cornsilk:e=new L(255,255,248,220);break;case mi.Crimson:e=new L(255,220,20,60);break;case mi.Cyan:e=new L(255,0,255,255);break;case mi.DarkBlue:e=new L(255,0,0,139);break;case mi.DarkCyan:e=new L(255,0,139,139);break;case mi.DarkGoldenrod:e=new L(255,184,134,11);break;case mi.DarkGray:e=new L(255,169,169,169);break;case mi.DarkGreen:e=new L(255,0,100,0);break;case mi.DarkKhaki:e=new L(255,189,183,107);break;case mi.DarkMagenta:e=new L(255,139,0,139);break;case mi.DarkOliveGreen:e=new L(255,85,107,47);break;case mi.DarkOrange:e=new L(255,255,140,0);break;case mi.DarkOrchid:e=new L(255,153,50,204);break;case mi.DarkRed:e=new L(255,139,0,0);break;case mi.DarkSalmon:e=new L(255,233,150,122);break;case mi.DarkSeaGreen:e=new L(255,143,188,139);break;case mi.DarkSlateBlue:e=new L(255,72,61,139);break;case mi.DarkSlateGray:e=new L(255,47,79,79);break;case mi.DarkTurquoise:e=new L(255,0,206,209);break;case mi.DarkViolet:e=new L(255,148,0,211);break;case mi.DeepPink:e=new L(255,255,20,147);break;case mi.DeepSkyBlue:e=new L(255,0,191,255);break;case mi.DimGray:e=new L(255,105,105,105);break;case mi.DodgerBlue:e=new L(255,30,144,255);break;case mi.Firebrick:e=new L(255,178,34,34);break;case mi.FloralWhite:e=new L(255,255,250,240);break;case mi.ForestGreen:e=new L(255,34,139,34);break;case mi.Fuchsia:e=new L(255,255,0,255);break;case mi.Gainsboro:e=new L(255,220,220,220);break;case mi.GhostWhite:e=new L(255,248,248,255);break;case mi.Gold:e=new L(255,255,215,0);break;case mi.Goldenrod:e=new L(255,218,165,32);break;case mi.Gray:e=new L(255,128,128,128);break;case mi.Green:e=new L(255,0,128,0);break;case mi.GreenYellow:e=new L(255,173,255,47);break;case mi.Honeydew:e=new L(255,240,255,240);break;case mi.HotPink:e=new L(255,255,105,180);break;case mi.IndianRed:e=new L(255,205,92,92);break;case mi.Indigo:e=new L(255,75,0,130);break;case mi.Ivory:e=new L(255,255,255,240);break;case mi.Khaki:e=new L(255,240,230,140);break;case mi.Lavender:e=new L(255,230,230,250);break;case mi.LavenderBlush:e=new L(255,255,240,245);break;case mi.LawnGreen:e=new L(255,124,252,0);break;case mi.LemonChiffon:e=new L(255,255,250,205);break;case mi.LightBlue:e=new L(255,173,216,230);break;case mi.LightCoral:e=new L(255,240,128,128);break;case mi.LightCyan:e=new L(255,224,255,255);break;case mi.LightGoldenrodYellow:e=new L(255,250,250,210);break;case mi.LightGreen:e=new L(255,144,238,144);break;case mi.LightGray:e=new L(255,211,211,211);break;case mi.LightPink:e=new L(255,255,182,193);break;case mi.LightSalmon:e=new L(255,255,160,122);break;case mi.LightSeaGreen:e=new L(255,32,178,170);break;case mi.LightSkyBlue:e=new L(255,135,206,250);break;case mi.LightSlateGray:e=new L(255,119,136,153);break;case mi.LightSteelBlue:e=new L(255,176,196,222);break;case mi.LightYellow:e=new L(255,255,255,224);break;case mi.Lime:e=new L(255,0,255,0);break;case mi.LimeGreen:e=new L(255,50,205,50);break;case mi.Linen:e=new L(255,250,240,230);break;case mi.Magenta:e=new L(255,255,0,255);break;case mi.Maroon:e=new L(255,128,0,0);break;case mi.MediumAquamarine:e=new L(255,102,205,170);break;case mi.MediumBlue:e=new L(255,0,0,205);break;case mi.MediumOrchid:e=new L(255,186,85,211);break;case mi.MediumPurple:e=new L(255,147,112,219);break;case mi.MediumSeaGreen:e=new L(255,60,179,113);break;case mi.MediumSlateBlue:e=new L(255,123,104,238);break;case mi.MediumSpringGreen:e=new L(255,0,250,154);break;case mi.MediumTurquoise:e=new L(255,72,209,204);break;case mi.MediumVioletRed:e=new L(255,199,21,133);break;case mi.MidnightBlue:e=new L(255,25,25,112);break;case mi.MintCream:e=new L(255,245,255,250);break;case mi.MistyRose:e=new L(255,255,228,225);break;case mi.Moccasin:e=new L(255,255,228,181);break;case mi.NavajoWhite:e=new L(255,255,222,173);break;case mi.Navy:e=new L(255,0,0,128);break;case mi.OldLace:e=new L(255,253,245,230);break;case mi.Olive:e=new L(255,128,128,0);break;case mi.OliveDrab:e=new L(255,107,142,35);break;case mi.Orange:e=new L(255,255,165,0);break;case mi.OrangeRed:e=new L(255,255,69,0);break;case mi.Orchid:e=new L(255,218,112,214);break;case mi.PaleGoldenrod:e=new L(255,238,232,170);break;case mi.PaleGreen:e=new L(255,152,251,152);break;case mi.PaleTurquoise:e=new L(255,175,238,238);break;case mi.PaleVioletRed:e=new L(255,219,112,147);break;case mi.PapayaWhip:e=new L(255,255,239,213);break;case mi.PeachPuff:e=new L(255,255,218,185);break;case mi.Peru:e=new L(255,205,133,63);break;case mi.Pink:e=new L(255,255,192,203);break;case mi.Plum:e=new L(255,221,160,221);break;case mi.PowderBlue:e=new L(255,176,224,230);break;case mi.Purple:e=new L(255,128,0,128);break;case mi.Red:e=new L(255,255,0,0);break;case mi.RosyBrown:e=new L(255,188,143,143);break;case mi.RoyalBlue:e=new L(255,65,105,225);break;case mi.SaddleBrown:e=new L(255,139,69,19);break;case mi.Salmon:e=new L(255,250,128,114);break;case mi.SandyBrown:e=new L(255,244,164,96);break;case mi.SeaGreen:e=new L(255,46,139,87);break;case mi.SeaShell:e=new L(255,255,245,238);break;case mi.Sienna:e=new L(255,160,82,45);break;case mi.Silver:e=new L(255,192,192,192);break;case mi.SkyBlue:e=new L(255,135,206,235);break;case mi.SlateBlue:e=new L(255,106,90,205);break;case mi.SlateGray:e=new L(255,112,128,144);break;case mi.Snow:e=new L(255,255,250,250);break;case mi.SpringGreen:e=new L(255,0,255,127);break;case mi.SteelBlue:e=new L(255,70,130,180);break;case mi.Tan:e=new L(255,210,180,140);break;case mi.Teal:e=new L(255,0,128,128);break;case mi.Thistle:e=new L(255,216,191,216);break;case mi.Tomato:e=new L(255,255,99,71);break;case mi.Turquoise:e=new L(255,64,224,208);break;case mi.Violet:e=new L(255,238,130,238);break;case mi.Wheat:e=new L(255,245,222,179);break;case mi.White:e=new L(255,255,255,255);break;case mi.WhiteSmoke:e=new L(255,245,245,245);break;case mi.Yellow:e=new L(255,255,255,0);break;case mi.YellowGreen:e=new L(255,154,205,50)}return e},t.sBrushes=new n,t}(),bi=function(){function e(t){this.precision=1e3}return Object.defineProperty(e.prototype,"factors",{get:function(){return this.mFactors},set:function(t){if(null==t)throw new Error("ArgumentNullException : Factors");this.mFactors=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"positions",{get:function(){return this.mPositions},set:function(t){for(var e=t,i=0;i<e.length;i++)(e[i]<0||e[i]>1)&&(e[i]=0);this.mPositions=e,this.mPositions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this.mCount},enumerable:!0,configurable:!0}),e.prototype.generateColorBlend=function(t,e){if(null==t)throw new Error("ArgumentNullException : colours");null==this.positions&&(this.positions=[0]);var i=new Si(this.count),r=this.positions,n=null;if(1===r.length)(r=[3])[0]=0,r[1]=this.positions[0],r[2]=1,(n=new Array(3))[0]=t[0],n[1]=t[0],n[2]=t[1];else{var o=t[0],s=t[1];n=new Array(this.count);var a=0,h=this.count;for(a=0;a<h;++a)n[a]=this.interpolate(this.mFactors[a],o,s,e)}return i.positions=r,i.colors=n,i},e.prototype.clonePdfBlend=function(){var t=this;return null!=this.mFactors&&(t.factors=this.mFactors),null!=this.positions&&(t.positions=this.positions),t},e.prototype.gcd=function(t,e){if("number"==typeof t&&"number"==typeof e&&void 0!==e){if(t<0||t>1)throw new Error("ArgumentOutOfRangeException : u");if(e<0||e>1)throw new Error("ArgumentOutOfRangeException : v");var i=Math.max(1,t*this.precision),r=Math.max(1,e*this.precision);return this.gcdInt(i,r)/this.precision}var n=t;if(null==n)throw new Error("ArgumentNullException : values");if(n.length<1)throw new Error("ArgumentException : Not enough values in the array. - values");var o=n[0];if(n.length>1)for(var s=n.length,a=1;a<s&&(o=this.gcd(n[a],o))!==1/this.precision;++a);return o},e.prototype.gcdInt=function(t,e){if(t<=0)throw new Error("ArgumentOutOfRangeException"+t+"The arguments cannot be less or equal to zero.");if(e<=0)throw new Error("ArgumentOutOfRangeException"+e+"The arguments cannot be less or equal to zero.");if(1===t||1===e)return 1;for(var i=0;this.isEven(t,e);)++i,t>>=1,e>>=1;for(;(1&t)<=0;)t>>=1;do{for(;(1&e)<=0;)e>>=1;if(t>e){var r=e;e=t,t=r}e-=t}while(0!==e);return t<<i},e.prototype.isEven=function(t,e){if("number"==typeof e&&void 0!==e){var i=!0;return i=i&&(1&t)<=0,i=i&&(1&e)<=0}return(1&t)<=0},e.prototype.interpolate=function(e,i,r,n){if(i instanceof L){var o=new L;switch(n){case t.PdfColorSpace.Rgb:var s=this.interpolate(e,i.red,r.red),a=this.interpolate(e,i.green,r.green),h=this.interpolate(e,i.blue,r.blue);o=new L(s,a,h);break;case t.PdfColorSpace.GrayScale:var l=this.interpolate(e,i.gray,r.gray);o=new L(l);break;case t.PdfColorSpace.Cmyk:var u=this.interpolate(e,i.c,r.c),c=this.interpolate(e,i.m,r.m),p=this.interpolate(e,i.y,r.y),d=this.interpolate(e,i.k,r.k);o=new L(u,c,p,d)}return o}return 0===e?i:1===e?r:i+(r-i)/1*(e-0)},e}(),wi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Si=function(e){function i(t){var i=e.call(this)||this;return"number"==typeof t&&(i=e.call(this,t)||this),i}return wi(i,e),Object.defineProperty(i.prototype,"colors",{get:function(){return this.mcolors},set:function(t){if(null==t)throw new Error("ArgumentNullException : Colors");this.mcolors=t},enumerable:!0,configurable:!0}),i.prototype.getFunction=function(t){var e=[0,1],i=this.getColorComponentsCount(t),r=this.getMaxComponentValue(t),n=this.setRange(i,r),o=null;if(null==this.mbrush&&void 0===this.mbrush){var s=[1],a=void 0,h=1;if(2===this.positions.length)a=2;else{var l=this.positions,u=this.getIntervals(l),c=this.gcd(u);h=c,a=1/c+1}s[0]=a;var p=this.getSamplesValues(t,a,r,h);return o=new di(e,n,s,p)}return o},i.prototype.cloneColorBlend=function(){var t=this;return null!=this.mcolors&&void 0!==this.mcolors&&(t.colors=this.mcolors),null!=this.positions&&void 0!==this.positions&&(t.positions=this.positions),t},i.prototype.setRange=function(t,e){for(var i=[2*t],r=0;r<t;++r)i[2*r]=0,i[2*r+1]=1;return i},i.prototype.getColorComponentsCount=function(e){var i=0;switch(e){case t.PdfColorSpace.Rgb:i=3;break;case t.PdfColorSpace.Cmyk:i=4;break;case t.PdfColorSpace.GrayScale:i=1;break;default:throw new Error("ArgumentException - Unsupported color space: "+e+" colorSpace")}return i},i.prototype.getSamplesValues=function(e,i,r,n){var o;switch(e){case t.PdfColorSpace.GrayScale:o=this.getGrayscaleSamples(i,r,n);break;case t.PdfColorSpace.Cmyk:o=this.getCmykSamples(i,r,n);break;case t.PdfColorSpace.Rgb:o=this.getRgbSamples(i,r,n);break;default:throw new Error("ArgumentException - Unsupported color space: "+e+" colorSpace")}return o},i.prototype.getGrayscaleSamples=function(e,i,r){for(var n=[2*e],o=0;o<e;++o)this.getNextColor(o,r,t.PdfColorSpace.GrayScale);return n},i.prototype.getRgbSamples=function(e,i,r){for(var n=[3*e],o=0;o<e;++o){var s=this.getNextColor(o,r,t.PdfColorSpace.Rgb),a=3*o;n[a]=s.r,n[a+1]=s.g,n[a+2]=s.b}return n},i.prototype.getCmykSamples=function(e,i,r){for(var n=[4*e],o=0;o<e;o++){var s=this.getNextColor(o,r,t.PdfColorSpace.Cmyk),a=4*o;n[a]=s.c*i,n[a+1]=s.m*i,n[a+2]=s.y*i,n[a+3]=s.k*i}return n},i.prototype.getNextColor=function(t,e,i){var r,n,o,s=e*t,a=this.getIndices(s,n,r);if((n=a.indexLow)===(r=a.indexHi))o=this.mcolors[n];else{var h=this.positions[n],l=this.positions[r],u=this.mcolors[n],c=this.mcolors[r],p=(s-h)/(l-h);o=this.interpolate(p,u,c,i)}return o},i.prototype.getIndices=function(t,e,i){var r=this.positions;e=0,i=0;for(var n=0;n<this.mcolors.length;++n){var o=r[n];if(o===t){i=n,e=n;break}if(o>t){i=n;break}e=n,i=n}return{indexLow:e,indexHi:i}},i.prototype.getMaxComponentValue=function(e){var i=0;switch(e){case t.PdfColorSpace.Cmyk:case t.PdfColorSpace.Rgb:i=255;break;case t.PdfColorSpace.GrayScale:i=65535;break;default:throw new Error("ArgumentException - Unsupported color space: "+e+"colorSpace")}return i},i.prototype.getIntervals=function(t){for(var e=t.length,i=[e-1],r=t[0],n=1;n<e;++n){var o=t[n];i[n-1]=o-r,r=o}return i},i}(bi),Pi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vi=function(e){function i(t,i,r,n){var o=e.call(this,new h)||this;if(o.mDictionaryProperties=new a,t instanceof T&&i instanceof T&&r instanceof L&&n instanceof L)o.initialize(r,n),o.mPointStart=t,o.mPointEnd=i,o.setPoints(o.mPointStart,o.mPointEnd);else if(t instanceof V)if(o.initialize(i,r),n===fi.BackwardDiagonal||n===fi.ForwardDiagonal||n===fi.Horizontal||n===fi.Vertical){switch(o.mBoundaries=t,n){case fi.BackwardDiagonal:o.mPointStart=new T(t.right,t.top),o.mPointEnd=new T(t.left,t.bottom);break;case fi.ForwardDiagonal:o.mPointStart=new T(t.left,t.top),o.mPointEnd=new T(t.right,t.bottom);break;case fi.Horizontal:o.mPointStart=new T(t.left,t.top),o.mPointEnd=new T(t.right,t.top);break;case fi.Vertical:o.mPointStart=new T(t.left,t.top),o.mPointEnd=new T(t.left,t.bottom);break;default:throw new Error("ArgumentException -- Unsupported linear gradient mode: "+n+" mode")}o.setPoints(o.mPointStart,o.mPointEnd)}else if("number"==typeof n&&void 0!==n){if(o.mBoundaries=t,0===(n%=360))o.mPointStart=new T(t.left,t.top),o.mPointEnd=new T(t.right,t.top);else if(90===n)o.mPointStart=new T(t.left,t.top),o.mPointEnd=new T(t.left,t.bottom);else if(180===n)o.mPointEnd=new T(t.left,t.top),o.mPointStart=new T(t.right,t.top);else if(270===n)o.mPointEnd=new T(t.left,t.top),o.mPointStart=new T(t.left,t.bottom);else{var s=n*(Math.PI/180),l=Math.tan(s),u=o.mBoundaries.left+(o.mBoundaries.right-o.mBoundaries.left)/2,c=o.mBoundaries.top+(o.mBoundaries.bottom-o.mBoundaries.top)/2,p=new T(u,c);c=l*(u=o.mBoundaries.width/(2*Math.cos(s))),u+=p.x,c+=p.y;var d=new T(u,c),f=o.subPoints(d,p),g=o.choosePoint(n),m=o.mulPoints(o.subPoints(g,p),f)/o.mulPoints(f,f);o.mPointEnd=o.addPoints(p,o.mulPoint(f,m)),o.mPointStart=o.addPoints(p,o.mulPoint(f,-1*m))}o.setPoints(o.mPointEnd,o.mPointStart)}return o}return Pi(i,e),i.prototype.initialize=function(t,e){this.mColours=[t,e],this.mColourBlend=new Si(2),this.mColourBlend.positions=[0,1],this.mColourBlend.colors=this.mColours,this.initShading()},Object.defineProperty(i.prototype,"blend",{get:function(){return this.mBlend},set:function(t){if(null==t)throw new Error("ArgumentNullException : Blend");if(null==this.mColours)throw new Error("NotSupportedException : There is no starting and ending colours specified.");this.mBlend=t,this.mColourBlend=this.mBlend.generateColorBlend(this.mColours,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"interpolationColors",{get:function(){return this.mColourBlend},set:function(t){if(null==t)throw new Error("ArgumentNullException : InterpolationColors");this.mBlend=null,this.mColours=null,this.mColourBlend=t,this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"linearColors",{get:function(){return this.mColours},set:function(t){if(null==t)throw new Error("ArgumentNullException : LinearColors");if(t.length<2)throw new Error("ArgumentException : The array is too small - LinearColors");null==this.mColours&&void 0===this.mColours?this.mColours=[t[0],t[1]]:(this.mColours[0]=t[0],this.mColours[1]=t[1]),null==this.mBlend&&void 0===this.mBlend?(this.mColourBlend=new Si(2),this.mColourBlend.colors=this.mColours,this.mColourBlend.positions=[0,1]):this.mColourBlend=this.mBlend.generateColorBlend(this.mColours,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rectangle",{get:function(){return this.mBoundaries},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extend",{get:function(){var t=li.None,e=this.shading.items.getValue(this.mDictionaryProperties.extend);if(null!=e){var i=e.items(0),r=e.items(1);i.value&&(t|=li.Start),r.value&&(t|=li.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r?(e=new ct(!1),i=new ct(!1),(r=new m).add(e),r.add(i),this.shading.items.setValue(this.mDictionaryProperties.extend,r)):(e=r.items(0),i=r.items(1))},enumerable:!0,configurable:!0}),i.prototype.addPoints=function(t,e){var i=t.x+e.x,r=t.y+e.y;return new T(i,r)},i.prototype.subPoints=function(t,e){var i=t.x-e.x,r=t.y-e.y;return new T(i,r)},i.prototype.mulPoints=function(t,e){return t.x*e.x+t.y*e.y},i.prototype.mulPoint=function(t,e){return t.x=t.x*e,t.y=t.y*e,t},i.prototype.choosePoint=function(t){var e=new T(0,0);if(t<90&&t>0)e=new T(this.mBoundaries.right,this.mBoundaries.bottom);else if(t<180&&t>90)e=new T(this.mBoundaries.left,this.mBoundaries.bottom);else if(t<270&&t>180)e=new T(this.mBoundaries.left,this.mBoundaries.top);else{if(!(t>270))throw new Error("PdfException - Internal error.");e=new T(this.mBoundaries.right,this.mBoundaries.top)}return e},i.prototype.setPoints=function(t,e){var i=new m;i.add(new g(t.x)),i.add(new g(this.updateY(t.y))),i.add(new g(e.x)),i.add(new g(this.updateY(e.y))),this.shading.items.setValue(this.mDictionaryProperties.coords,i)},i.prototype.updateY=function(t){return 0!==t?-t:t},i.prototype.initShading=function(){this.colorSpace=t.PdfColorSpace.Rgb,this.function=this.mColourBlend.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new g(gi.Axial))},i.prototype.clone=function(){var t=this;return t.resetPatternDictionary(new h(this.patternDictionary)),t.shading=new h,t.initShading(),t.setPoints(t.mPointStart,t.mPointEnd),null!==t&&t instanceof i&&null!=this.matrix&&void 0!==this.matrix&&(t.matrix=this.matrix.clone()),null!=this.mColours&&void 0!==this.mColours&&(t.mColours=this.mColours),null!=this.blend&&void 0!==this.blend?t.blend=this.blend.clonePdfBlend():null!=this.interpolationColors&&void 0!==this.interpolationColors&&(t.interpolationColors=this.interpolationColors.cloneColorBlend()),t.extend=this.extend,this.cloneBackgroundValue(t),this.cloneAntiAliasingValue(t),t},i.prototype.resetFunction=function(){this.function=this.mColourBlend.getFunction(this.colorSpace)},i}(qt),Ci=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bi=function(e){function i(t,i,r,n,o,s){var l=e.call(this,new h)||this;if(l.mDictionaryProperties=new a,l.initialize(o,s),i<0)throw new Error("ArgumentOutOfRangeException : radiusStart - The radius cannot be less then zero.");if(n<0)throw new Error("ArgumentOutOfRangeException : radiusEnd - The radius cannpt be less then zero.");return l.mPointEnd=r,l.mPointStart=t,l.mRadiusStart=i,l.mRadiusEnd=n,l.setPoints(l.mPointStart,l.mPointEnd,l.mRadiusStart,l.mRadiusEnd),l}return Ci(i,e),i.prototype.initialize=function(t,e){this.mColour=[t,e],this.mColourBlends=new Si(2),this.mColourBlends.positions=[0,1],this.mColourBlends.colors=this.mColour,this.initShading()},Object.defineProperty(i.prototype,"blend",{get:function(){return this.mBlend},set:function(t){if(null==t)throw new Error("ArgumentNullException : Blend");if(null==this.mColour&&void 0===this.mColour)throw new Error("NotSupportedException : There is no starting and ending colours specified.");this.mBlend=t,this.mColourBlends=this.mBlend.generateColorBlend(this.mColour,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"interpolationColors",{get:function(){return this.mColourBlends},set:function(t){if(null==t)throw new Error("ArgumentNullException : InterpolationColors");this.mBlend=null,this.mColour=null,this.mColourBlends=t,this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"linearColors",{get:function(){return this.mColour},set:function(t){if(null==t)throw new Error("ArgumentNullException : radial LinearColors");if(t.length<2)throw new Error("ArgumentException : The array is too small LinearColors");null==this.mColour&&void 0===this.mColour?this.mColour=[t[0],t[1]]:(this.mColour[0]=t[0],this.mColour[1]=t[1]),null==this.mBlend&&void 0===this.mBlend?(this.mColourBlends=new Si(2),this.mColourBlends.colors=this.mColour,this.mColourBlends.positions=[0,1]):this.mColourBlends=this.mBlend.generateColorBlend(this.mColour,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rectangle",{get:function(){return this.mBoundaries},set:function(t){this.mBoundaries=t,this.bBox=m.fromRectangle(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"extend",{get:function(){var t=li.None,e=this.shading.items.getValue(this.mDictionaryProperties.extend);if(null!==e&&void 0!==e){var i=e.items(0),r=e.items(1);i.value&&(t|=li.Start),r.value&&(t|=li.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r&&void 0===r?(e=new ct(!1),i=new ct(!1),(r=new m).add(e),r.add(i),this.shading.items.setValue(this.mDictionaryProperties.extend,r)):(e=r.items(0),i=r.items(1))},enumerable:!0,configurable:!0}),i.prototype.setPoints=function(t,e,i,r){var n=new m;n.add(new g(t.x)),n.add(new g(this.updateY(t.y))),n.add(new g(i)),n.add(new g(e.x)),n.add(new g(this.updateY(e.y))),i!==r?n.add(new g(r)):n.add(new g(0)),this.shading.items.setValue(this.mDictionaryProperties.coords,n)},i.prototype.updateY=function(t){return 0!==t?-t:t},i.prototype.initShading=function(){this.colorSpace=t.PdfColorSpace.Rgb,this.function=this.mColourBlends.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new g(gi.Radial))},i.prototype.clone=function(){var t=this;return t.resetPatternDictionary(new h(this.patternDictionary)),t.shading=new h,t.initShading(),t.setPoints(this.mPointStart,this.mPointEnd,this.mRadiusStart,this.mRadiusEnd),t instanceof i&&null!==this.matrix&&void 0!==this.matrix&&(t.matrix=this.matrix.clone()),null!==this.mColour&&void 0!==this.mColour&&(t.mColour=this.mColour),null!==this.blend&&void 0!==this.blend?t.blend=this.blend.clonePdfBlend():null!==this.interpolationColors&&void 0!==this.interpolationColors&&(t.interpolationColors=this.interpolationColors.cloneColorBlend()),t.extend=this.extend,this.cloneBackgroundValue(t),this.cloneAntiAliasingValue(t),t},i.prototype.resetFunction=function(){this.function=this.mColourBlends.getFunction(this.colorSpace)},i}(qt);!function(t){t[t.Overlap=0]="Overlap",t[t.Inside=1]="Inside"}(t.PdfBorderOverlapStyle||(t.PdfBorderOverlapStyle={}));var Oi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xi=function(){function t(){}return Object.defineProperty(t.prototype,"backgroundBrush",{get:function(){return this.gridBackgroundBrush},set:function(t){this.gridBackgroundBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textBrush",{get:function(){return this.gridTextBrush},set:function(t){this.gridTextBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textPen",{get:function(){return this.gridTextPen},set:function(t){this.gridTextPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"font",{get:function(){return this.gridFont},set:function(t){this.gridFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backgroundImage",{get:function(){return this.gridBackgroundImage},set:function(t){this.gridBackgroundImage=t},enumerable:!0,configurable:!0}),t}(),Li=function(e){function i(){var i=e.call(this)||this;return i.gridBorderOverlapStyle=t.PdfBorderOverlapStyle.Overlap,i.bAllowHorizontalOverflow=!1,i.gridHorizontalOverflowType=t.PdfHorizontalOverflowType.LastPage,i}return Oi(i,e),Object.defineProperty(i.prototype,"cellSpacing",{get:function(){return void 0===this.gridCellSpacing&&(this.gridCellSpacing=0),this.gridCellSpacing},set:function(t){this.gridCellSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"horizontalOverflowType",{get:function(){return this.gridHorizontalOverflowType},set:function(t){this.gridHorizontalOverflowType=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"allowHorizontalOverflow",{get:function(){return this.bAllowHorizontalOverflow},set:function(t){this.bAllowHorizontalOverflow=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cellPadding",{get:function(){return void 0===this.gridCellPadding&&(this.gridCellPadding=new Ee),this.gridCellPadding},set:function(t){void 0===this.gridCellPadding?(this.gridCellPadding=new Ee,this.gridCellPadding=t):this.gridCellPadding=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"borderOverlapStyle",{get:function(){return this.gridBorderOverlapStyle},set:function(t){this.gridBorderOverlapStyle=t},enumerable:!0,configurable:!0}),i}(xi),Ti=function(t){function e(){var e=t.call(this)||this;return e.gridCellBorders=Fe.default,e}return Oi(e,t),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borders",{get:function(){return this.gridCellBorders},set:function(t){this.gridCellBorders=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cellPadding",{get:function(){return this.gridCellPadding},set:function(t){null!=this.gridCellPadding&&void 0!==this.gridCellPadding||(this.gridCellPadding=new Ee),this.gridCellPadding=t},enumerable:!0,configurable:!0}),e}(xi),ji=function(){function t(){}return Object.defineProperty(t.prototype,"backgroundBrush",{get:function(){return this.gridRowBackgroundBrush},enumerable:!0,configurable:!0}),t.prototype.setBackgroundBrush=function(t){if(this.gridRowBackgroundBrush=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.backgroundBrush=t},Object.defineProperty(t.prototype,"textBrush",{get:function(){return this.gridRowTextBrush},enumerable:!0,configurable:!0}),t.prototype.setTextBrush=function(t){if(this.gridRowTextBrush=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.textBrush=t},Object.defineProperty(t.prototype,"textPen",{get:function(){return this.gridRowTextPen},enumerable:!0,configurable:!0}),t.prototype.setTextPen=function(t){if(this.gridRowTextPen=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.textPen=t},Object.defineProperty(t.prototype,"font",{get:function(){return this.gridRowFont},enumerable:!0,configurable:!0}),t.prototype.setFont=function(t){if(this.gridRowFont=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.font=t},Object.defineProperty(t.prototype,"border",{get:function(){return void 0===this.gridRowBorder&&this.setBorder(new Fe),this.gridRowBorder},enumerable:!0,configurable:!0}),t.prototype.setBorder=function(t){if(this.gridRowBorder=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.borders=t},t.prototype.setParent=function(t){this.parent=t},Object.defineProperty(t.prototype,"backgroundImage",{get:function(){return this.gridRowBackgroundImage},enumerable:!0,configurable:!0}),t}();!function(t){t[t.NextPage=0]="NextPage",t[t.LastPage=1]="LastPage"}(t.PdfHorizontalOverflowType||(t.PdfHorizontalOverflowType={}));var ki=function(){function e(t){this.cellWidth=0,this.cellHeight=0,this.tempval=0,this.fontSpilt=!1,this.finsh=!0,this.rowSpanRemainingHeight=0,this.hasRowSpan=!1,this.hasColSpan=!1,this.isFinish=!0,this.present=!1,this.gridRowSpan=1,this.colSpan=1,void 0!==t&&(this.gridRow=t)}return Object.defineProperty(e.prototype,"isCellMergeContinue",{get:function(){return this.internalIsCellMergeContinue},set:function(t){this.internalIsCellMergeContinue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRowMergeContinue",{get:function(){return this.internalIsRowMergeContinue},set:function(t){this.internalIsRowMergeContinue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCellMergeStart",{get:function(){return this.internalIsCellMergeStart},set:function(t){this.internalIsCellMergeStart=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRowMergeStart",{get:function(){return this.internalIsRowMergeStart},set:function(t){this.internalIsRowMergeStart=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"remainingString",{get:function(){return this.remaining},set:function(t){this.remaining=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"FinishedDrawingCell",{get:function(){return this.isFinish},set:function(t){this.isFinish=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return null==this.format&&(this.format=new D),this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"row",{get:function(){return this.gridRow},set:function(t){this.gridRow=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.objectValue},set:function(t){if(this.objectValue=t,this.objectValue instanceof Fi){this.row.grid.isSingleGrid=!1,this.objectValue.ParentCell=this,this.objectValue.isChildGrid=!0;for(var e=this.row.grid.rows.count,i=0;i<e;i++)for(var r=this.row.grid.rows.getRow(i),n=r.cells.count,o=0;o<n;o++)r.cells.getCell(o).parent=this}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowSpan",{get:function(){return this.gridRowSpan},set:function(t){if(t<1)throw new Error("ArgumentException : Invalid span specified, must be greater than or equal to 1");this.gridRowSpan=t,this.row.rowSpanExists=!0,this.row.grid.hasRowSpanSpan=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return null==this.cellStyle&&(this.cellStyle=new Ti),this.cellStyle},set:function(t){this.cellStyle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return 0===this.cellHeight&&(this.cellHeight=this.measureHeight()),this.cellHeight},set:function(t){this.cellHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnSpan",{get:function(){return this.colSpan},set:function(t){if(t<1)throw Error("Invalid span specified, must be greater than or equal to 1");this.colSpan=t,this.row.columnSpanExists=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return(0===this.cellWidth||this.row.grid.isComplete)&&(this.cellWidth=this.measureWidth()),Math.round(this.cellWidth)},set:function(t){this.cellWidth=t},enumerable:!0,configurable:!0}),e.prototype.measureWidth=function(){var t=0,e=new I;if("string"==typeof this.objectValue)t+=e.layout(this.objectValue,this.getTextFont(),this.stringFormat,new j(Number.MAX_VALUE,Number.MAX_VALUE),!1,new j(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width);else if(this.objectValue instanceof Fi)t=this.objectValue.size.width;else if(this.objectValue instanceof ft||this.objectValue instanceof mt)t+=this.objectValue.width;else if(this.objectValue instanceof Je){var i=this.objectValue;t+=e.layout(i.text,i.font,i.stringFormat,new j(0,0),!1,new j(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width)}return this.objectValue instanceof Fi?null!=this.style.cellPadding||void 0!==this.style.cellPadding?(void 0!==this.style.cellPadding.left&&this.style.cellPadding.hasLeftPad&&(t+=this.style.cellPadding.left),void 0!==this.style.cellPadding.right&&this.style.cellPadding.hasRightPad&&(t+=this.style.cellPadding.right)):(void 0!==this.row.grid.style.cellPadding.left&&this.row.grid.style.cellPadding.hasLeftPad&&(t+=this.row.grid.style.cellPadding.left),void 0!==this.row.grid.style.cellPadding.right&&this.row.grid.style.cellPadding.hasRightPad&&(t+=this.row.grid.style.cellPadding.right)):null!=this.style.cellPadding?t+=this.style.cellPadding.left+this.style.cellPadding.right:t+=this.row.grid.style.cellPadding.left+this.row.grid.style.cellPadding.right,t+=this.row.grid.style.cellSpacing},e.prototype.drawCellBackground=function(t,e){var i=this.getBackgroundBrush();if(null!=i&&(t.save(),t.drawRectangle(i,e.x,e.y,e.width,e.height),t.restore()),null!=this.style.backgroundImage){this.getBackgroundImage();t.drawImage(this.style.backgroundImage,e.x,e.y,e.width,e.height)}},e.prototype.adjustContentLayoutArea=function(t){var e=new k(t.x,t.y,t.width,t.height);return this.objectValue instanceof Fi?(null==this.style.cellPadding||void 0===this.style.cellPadding?(void 0!==this.gridRow.grid.style.cellPadding.left&&this.gridRow.grid.style.cellPadding.hasLeftPad&&(e.x+=this.gridRow.grid.style.cellPadding.left+this.cellStyle.borders.left.width,e.width-=this.gridRow.grid.style.cellPadding.left),void 0!==this.gridRow.grid.style.cellPadding.top&&this.gridRow.grid.style.cellPadding.hasTopPad&&(e.y+=this.gridRow.grid.style.cellPadding.top+this.cellStyle.borders.top.width,e.height-=this.gridRow.grid.style.cellPadding.top),void 0!==this.gridRow.grid.style.cellPadding.right&&this.gridRow.grid.style.cellPadding.hasRightPad&&(e.width-=this.gridRow.grid.style.cellPadding.right),void 0!==this.gridRow.grid.style.cellPadding.bottom&&this.gridRow.grid.style.cellPadding.hasBottomPad&&(e.height-=this.gridRow.grid.style.cellPadding.bottom)):(void 0!==this.style.cellPadding.left&&this.style.cellPadding.hasLeftPad&&(e.x+=this.style.cellPadding.left+this.cellStyle.borders.left.width,e.width-=this.style.cellPadding.left),void 0!==this.style.cellPadding.top&&this.style.cellPadding.hasTopPad&&(e.y+=this.style.cellPadding.top+this.cellStyle.borders.top.width,e.height-=this.style.cellPadding.top),void 0!==this.style.cellPadding.right&&this.style.cellPadding.hasRightPad&&(e.width-=this.style.cellPadding.right),void 0!==this.style.cellPadding.bottom&&this.style.cellPadding.hasBottomPad&&(e.height-=this.style.cellPadding.bottom)),e.width-=this.cellStyle.borders.left.width+this.cellStyle.borders.right.width,e.height-=this.cellStyle.borders.top.width+this.cellStyle.borders.bottom.width):void 0===this.style.cellPadding||null==this.style.cellPadding?(e.x+=this.gridRow.grid.style.cellPadding.left+this.cellStyle.borders.left.width,e.y+=this.gridRow.grid.style.cellPadding.top+this.cellStyle.borders.top.width,e.width-=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left,e.height-=this.gridRow.grid.style.cellPadding.bottom+this.gridRow.grid.style.cellPadding.top,e.height-=this.cellStyle.borders.top.width+this.cellStyle.borders.bottom.width):(e.x+=this.style.cellPadding.left+this.cellStyle.borders.left.width,e.y+=this.style.cellPadding.top+this.cellStyle.borders.top.width,e.width-=this.style.cellPadding.right+this.style.cellPadding.left,e.width-=this.cellStyle.borders.left.width+this.cellStyle.borders.right.width,e.height-=this.style.cellPadding.bottom+this.style.cellPadding.top,e.height-=this.cellStyle.borders.top.width+this.cellStyle.borders.bottom.width,1===this.rowSpan&&(e.width-=this.style.borders.left.width)),e},e.prototype.draw=function(e,i,r){var n=null;if(this.internalIsCellMergeContinue||this.internalIsRowMergeContinue){if(!this.internalIsCellMergeContinue||!this.row.grid.style.allowHorizontalOverflow)return n;if(this.row.rowOverflowIndex>0&&this.row.cells.indexOf(this)!=this.row.rowOverflowIndex+1||0==this.row.rowOverflowIndex&&this.internalIsCellMergeContinue)return n}i=this.adjustOuterLayoutArea(i,e),this.drawCellBackground(e,i);var o=this.getTextPen(),s=this.getTextBrush();void 0===o&&void 0===s&&(s=new A(new L(0,0,0)));var a=this.getTextFont(),h=this.getStringFormat(),l=i;if(l.height>=e.clientSize.height&&this.row.grid.allowRowBreakAcrossPages&&(l.height-=l.y),l=this.adjustContentLayoutArea(l),"string"==typeof this.objectValue||"string"==typeof this.remaining){var u=void 0,c=void 0;if(c=l.height<a.height?new k(l.x,l.y,l.width,a.height):l,l.height<a.height&&this.row.grid.isChildGrid&&null!=this.row.grid.ParentCell){var p=c.height-this.row.grid.ParentCell.row.grid.style.cellPadding.bottom-this.row.grid.style.cellPadding.bottom;-1!=this.row.grid.splitChildRowIndex&&(this.fontSpilt=!0,this.row.rowFontSplit=!0),p>0&&p<a.height&&(c.height=p)}0!=this.gridRow.grid.style.cellSpacing&&(c.width-=this.gridRow.grid.style.cellSpacing,i.width-=this.gridRow.grid.style.cellSpacing),this.isFinish?(u=""===this.remaining?this.remaining:this.objectValue,e.drawString(u,a,o,s,c.x,c.y,c.width,c.height,h),-1==this.row.grid.splitChildRowIndex||this.row.grid.isChildGrid||void 0!==this.remaining||(this.remaining="")):(void 0!==this.remaining&&null!==this.remaining||(this.remaining=""),this.row.repeatFlag&&e.drawString(this.remaining,a,o,s,c.x,c.y,c.width,c.height,h),this.isFinish=!0),n=e.stringLayoutResult}else if(this.objectValue instanceof Fi){var d=this.objectValue;d.isChildGrid=!0,d.ParentCell=this;var f=void 0;f=l,0!=this.gridRow.grid.style.cellSpacing&&(i.width-=this.gridRow.grid.style.cellSpacing);var g=new Gi(d),m=new Wi;null!=this.row.grid.LayoutFormat?m=this.row.grid.LayoutFormat:m.layout=t.PdfLayoutType.Paginate;var y=new Me;if(null!=e.layer){y.page=e.page,y.bounds=f,y.format=m,d.setSpan(),d.checkSpan();var b=g.Layouter(y);this.value=d,-1!==this.row.grid.splitChildRowIndex&&(this.height=this.row.rowBreakHeightValue),y.page!=b.page&&(b.bounds.height=this.row.rowBreakHeightValue,0==this.row.rowBreakHeight?this.row.NestedGridLayoutResult=b:this.row.rowBreakHeight=this.row.rowBreakHeightValue)}}else if(this.objectValue instanceof ft||this.objectValue instanceof mt){var w=void 0;w=this.objectValue.width<=l.width?new k(l.x,l.y,this.objectValue.width,l.height):l,e.drawImage(this.objectValue,w.x,w.y,w.width,w.height)}else this.objectValue instanceof Je?this.objectValue.draw(e.currentPage,l):void 0===this.objectValue&&(this.objectValue="",e.drawString(this.objectValue,a,o,s,l.x,l.y,l.width,l.height,h),null!=this.style.cellPadding&&0==this.style.cellPadding.bottom&&0==this.style.cellPadding.left&&0==this.style.cellPadding.right&&0==this.style.cellPadding.top&&(i.width-=this.style.borders.left.width+this.style.borders.right.width),0!=this.gridRow.grid.style.cellSpacing&&(i.width-=this.gridRow.grid.style.cellSpacing));return null!=this.style.borders&&(this.fontSpilt?-1!=this.row.grid.ParentCell.row.grid.splitChildRowIndex&&(this.row.rowFontSplit=!1,this.drawCellBorders(e,i)):this.drawCellBorders(e,i)),n},e.prototype.drawCellBorders=function(e,i){this.row.grid.style.borderOverlapStyle===t.PdfBorderOverlapStyle.Inside&&(i.x+=this.style.borders.left.width,i.y+=this.style.borders.top.width,i.width-=this.style.borders.right.width,i.height-=this.style.borders.bottom.width);var r=new T(i.x,i.y+i.height),n=new T(i.x,i.y),o=this.cellStyle.borders.left;this.cellStyle.borders.left.dashStyle===t.PdfDashStyle.Solid&&(o.lineCap=t.PdfLineCap.Square),0!==o.width&&e.drawLine(o,r,n),r=new T(i.x+i.width,i.y),n=new T(i.x+i.width,i.y+i.height),o=this.cellStyle.borders.right,i.x+i.width>e.clientSize.width-o.width/2&&(r=new T(e.clientSize.width-o.width/2,i.y),n=new T(e.clientSize.width-o.width/2,i.y+i.height)),this.cellStyle.borders.right.dashStyle===t.PdfDashStyle.Solid&&(o.lineCap=t.PdfLineCap.Square),0!==o.width&&e.drawLine(o,r,n),r=new T(i.x,i.y),n=new T(i.x+i.width,i.y),o=this.cellStyle.borders.top,this.cellStyle.borders.top.dashStyle===t.PdfDashStyle.Solid&&(o.lineCap=t.PdfLineCap.Square),0!==o.width&&e.drawLine(o,r,n),r=new T(i.x+i.width,i.y+i.height),n=new T(i.x,i.y+i.height),o=this.cellStyle.borders.bottom,i.y+i.height>e.clientSize.height-o.width/2&&(r=new T(i.x+i.width,e.clientSize.height-o.width/2),n=new T(i.x,e.clientSize.height-o.width/2)),this.cellStyle.borders.bottom.dashStyle===t.PdfDashStyle.Solid&&(o.lineCap=t.PdfLineCap.Square),0!==o.width&&e.drawLine(o,r,n)},e.prototype.adjustOuterLayoutArea=function(t,e){var i=!1,r=this.row.grid.style.cellSpacing;r>0&&(t=new k(t.x+r,t.y+r,t.width-r,t.height-r));var n=this.row.cells.indexOf(this);if(this.columnSpan>1||this.row.rowOverflowIndex>0&&n==this.row.rowOverflowIndex+1&&this.isCellMergeContinue){if(1==(l=this.columnSpan)&&this.isCellMergeContinue)for(var o=n+1;o<this.row.grid.columns.count&&this.row.cells.getCell(o).isCellMergeContinue;o++)l++;for(var s=0,a=n;a<n+l;a++){if(this.row.grid.style.allowHorizontalOverflow){var h=this.row.grid.size.width<e.clientSize.width?this.row.grid.size.width:e.clientSize.width;if((this.row.grid.size.width>e.clientSize.width?t.x+s+this.row.grid.columns.getColumn(a).width:s+this.row.grid.columns.getColumn(a).width)>h)break}s+=this.row.grid.columns.getColumn(a).width}s-=this.row.grid.style.cellSpacing,t.width=s}if(this.rowSpan>1||this.row.rowSpanExists){var l=this.rowSpan,u=this.row.grid.rows.rowCollection.indexOf(this.row);-1==u&&-1!=(u=this.row.grid.headers.indexOf(this.row))&&(i=!0);for(var c=0,a=u;a<u+l;a++){c+=i?this.row.grid.headers.getHeader(a).height:this.row.grid.rows.getRow(a).height;var p=this.row.grid.rows.getRow(a);this.row.grid.rows.rowCollection.indexOf(p)}this.row.cells.indexOf(this);c-=this.row.grid.style.cellSpacing,t.height=c,this.row.rowMergeComplete||(t.height=c)}return t},e.prototype.getTextFont=function(){return void 0!==this.style.font&&null!=this.style.font?this.style.font:void 0!==this.row.style.font&&null!=this.row.style.font?this.row.style.font:void 0!==this.row.grid.style.font&&null!=this.row.grid.style.font?this.row.grid.style.font:Ce.defaultFont},e.prototype.getTextBrush=function(){return void 0!==this.style.textBrush&&null!=this.style.textBrush?this.style.textBrush:void 0!==this.row.style.textBrush&&null!=this.row.style.textBrush?this.row.style.textBrush:this.row.grid.style.textBrush},e.prototype.getTextPen=function(){return void 0!==this.style.textPen&&null!=this.style.textPen?this.style.textPen:void 0!==this.row.style.textPen&&null!=this.row.style.textPen?this.row.style.textPen:this.row.grid.style.textPen},e.prototype.getBackgroundBrush=function(){return void 0!==this.style.backgroundBrush&&null!=this.style.backgroundBrush?this.style.backgroundBrush:void 0!==this.row.style.backgroundBrush&&null!=this.row.style.backgroundBrush?this.row.style.backgroundBrush:this.row.grid.style.backgroundBrush},e.prototype.getBackgroundImage=function(){return void 0!==this.style.backgroundImage&&null!=this.style.backgroundImage?this.style.backgroundImage:void 0!==this.row.style.backgroundImage&&null!=this.row.style.backgroundImage?this.row.style.backgroundImage:this.row.grid.style.backgroundImage},e.prototype.getStringFormat=function(){return void 0!==this.style.stringFormat&&null!=this.style.stringFormat?this.style.stringFormat:this.stringFormat},e.prototype.measureHeight=function(){var t=this.calculateWidth();null==this.style.cellPadding||void 0===this.style.cellPadding?t-=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left:(t-=this.style.cellPadding.right+this.style.cellPadding.left,t-=this.style.borders.left.width+this.style.borders.right.width);var e=0,i=new I;if("string"==typeof this.objectValue||"string"==typeof this.remaining){var r=this.objectValue;this.isFinish||(r=null!==this.remaining&&""!==this.remaining&&void 0!==this.remaining?this.remaining:this.objectValue);n=this.row.cells.indexOf(this);0!=this.gridRow.grid.style.cellSpacing&&(t-=2*this.gridRow.grid.style.cellSpacing),this.row.cells.getCell(n).hasColSpan||this.row.cells.getCell(n).hasRowSpan||(this.gridRow.grid.isChildGrid?(t<0?(this.tempval=t,null==this.style.cellPadding||void 0===this.style.cellPadding?this.tempval+=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left:(this.tempval+=this.style.cellPadding.right+this.style.cellPadding.left,this.tempval+=this.style.borders.left.width+this.style.borders.right.width)):this.tempval=t,e+=i.layout(r,this.getTextFont(),this.stringFormat,new j(this.tempval,0),!1,new j(0,0)).actualSize.height):e+=i.layout(r,this.getTextFont(),this.stringFormat,new j(t,0),!1,new j(0,0)).actualSize.height),e+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}else if(this.objectValue instanceof Fi){var n=this.row.cells.indexOf(this),o=0;null!=this.style.cellPadding||void 0!==this.style.cellPadding?(o=this.calculateWidth(),void 0!==this.style.cellPadding.left&&this.style.cellPadding.hasLeftPad&&(o-=this.style.cellPadding.left),void 0!==this.style.cellPadding.right&&this.style.cellPadding.hasRightPad&&(o-=this.style.cellPadding.right)):null!=this.row.grid.style.cellPadding||void 0!==this.row.grid.style.cellPadding?(o=this.calculateWidth(),void 0!==this.row.grid.style.cellPadding.left&&this.row.grid.style.cellPadding.hasLeftPad&&(o-=this.row.grid.style.cellPadding.left),void 0!==this.row.grid.style.cellPadding.right&&this.row.grid.style.cellPadding.hasRightPad&&(o-=this.row.grid.style.cellPadding.right)):o=this.calculateWidth(),this.objectValue.tempWidth=o,this.row.cells.getCell(n).hasColSpan||this.row.cells.getCell(n).hasRowSpan?e+=2*(this.style.borders.top.width+this.style.borders.bottom.width):e=this.objectValue.size.height,0!==this.gridRow.grid.style.cellSpacing&&(t-=2*this.gridRow.grid.style.cellSpacing),null==this.style.cellPadding&&void 0===this.style.cellPadding||(void 0!==this.row.grid.style.cellPadding.top&&this.row.grid.style.cellPadding.hasTopPad&&(e+=this.row.grid.style.cellPadding.top),this.row.grid.style.cellPadding.hasBottomPad&&void 0!==this.row.grid.style.cellPadding.bottom&&(e+=this.row.grid.style.cellPadding.bottom)),e+=this.objectValue.style.cellSpacing}else if(this.objectValue instanceof ft||this.objectValue instanceof mt)e+=this.objectValue.height;else if(this.objectValue instanceof Je){var s=this.objectValue;e+=i.layout(s.text,s.font,s.stringFormat,new j(t,0),!1,new j(0,0)).actualSize.height,e+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}else void 0===this.objectValue&&(null==this.style.cellPadding||void 0===this.style.cellPadding?t-=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left:(t-=this.style.cellPadding.right+this.style.cellPadding.left,t-=this.style.borders.left.width+this.style.borders.right.width),e+=2*(this.style.borders.top.width+this.style.borders.bottom.width));return this.objectValue instanceof Fi?null==this.style.cellPadding||void 0===this.style.cellPadding?(void 0!==this.row.grid.style.cellPadding.top&&this.row.grid.style.cellPadding.hasTopPad&&(e+=this.row.grid.style.cellPadding.top),void 0!==this.row.grid.style.cellPadding.bottom&&this.row.grid.style.cellPadding.hasBottomPad&&(e+=this.row.grid.style.cellPadding.bottom)):(void 0!==this.style.cellPadding.top&&this.style.cellPadding.hasTopPad&&(e+=this.style.cellPadding.top),void 0!==this.style.cellPadding.bottom&&this.style.cellPadding.hasBottomPad&&(e+=this.style.cellPadding.bottom)):null==this.style.cellPadding||void 0===this.style.cellPadding?e+=this.row.grid.style.cellPadding.top+this.row.grid.style.cellPadding.bottom:e+=this.style.cellPadding.top+this.style.cellPadding.bottom,e+=this.row.grid.style.cellSpacing},e.prototype.calculateWidth=function(){var t=this.row.cells.indexOf(this),e=(this.row.grid.rows.rowCollection.indexOf(this.row),this.columnSpan),i=0;if(1===e)for(r=0;r<e;r++)i+=this.row.grid.columns.getColumn(t+r).width;else if(e>1)for(var r=0;r<e;r++)i+=this.row.grid.columns.getColumn(t+r).width,r+1<e&&(this.row.cells.getCell(t+r+1).hasColSpan=!0);if(null!=this.parent&&this.parent.row.width>0&&this.row.grid.isChildGrid&&null!=this.parent&&this.row.width>this.parent.row.width){i=0;for(var n=0;n<this.parent.columnSpan;n++)i+=this.parent.row.grid.columns.getColumn(n).width;i/=this.row.cells.count}return i},e}(),Vi=function(){function t(t){this.cells=[],this.gridRow=t}return t.prototype.getCell=function(t){if(t<0||t>=this.count)throw new Error("IndexOutOfRangeException");return this.cells[t]},Object.defineProperty(t.prototype,"count",{get:function(){return this.cells.length},enumerable:!0,configurable:!0}),t.prototype.add=function(t){if(void 0===t){var e=new ki;return this.add(e),t}t.row=this.gridRow,this.cells.push(t)},t.prototype.indexOf=function(t){return this.cells.indexOf(t)},t}(),Ri=function(){function t(t){this.columnWidth=0,this.grid=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.columnWidth},set:function(t){this.isCustomWidth=!0,this.columnWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return null==this.stringFormat&&(this.stringFormat=new D),this.stringFormat},set:function(t){this.stringFormat=t},enumerable:!0,configurable:!0}),t}(),Ni=function(){function t(t){this.internalColumns=[],this.columnWidth=0,this.grid=t,this.internalColumns=[]}return t.prototype.add=function(t){for(var e=0;e<t;e++){this.internalColumns.push(new Ri(this.grid));for(var i=0;i<this.grid.rows.count;i++){var r=this.grid.rows.getRow(i),n=new ki;n.value="",r.cells.add(n)}}},Object.defineProperty(t.prototype,"count",{get:function(){return this.internalColumns.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return 0===this.columnWidth&&(this.columnWidth=this.measureColumnsWidth()),0===this.grid.initialWidth||this.columnWidth===this.grid.initialWidth||this.grid.style.allowHorizontalOverflow||(this.columnWidth=this.grid.initialWidth,this.grid.isPageWidth=!0),this.columnWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columns",{get:function(){return this.internalColumns},enumerable:!0,configurable:!0}),t.prototype.getColumn=function(t){if(t>=0&&t<=this.columns.length)return this.columns[t];throw Error("can not get the column from the index: "+t)},t.prototype.measureColumnsWidth=function(){var t=0;this.grid.measureColumnsWidth();for(var e=0,i=this.internalColumns.length;e<i;e++)t+=this.internalColumns[e].width;return t},t.prototype.getDefaultWidths=function(t){for(var e=[],i=this.count,r=0;r<this.count;r++)this.grid.isPageWidth&&t>=0&&!this.internalColumns[r].isCustomWidth?this.internalColumns[r].width=0:(e[r]=this.internalColumns[r].width,this.internalColumns[r].width>0&&this.internalColumns[r].isCustomWidth?(t-=this.internalColumns[r].width,i--):e[r]=0);for(r=0;r<this.count;r++){var n=t/i;e[r]<=0&&(e[r]=n)}return e},t}(),Ai=function(){function t(t){this.gridRowOverflowIndex=0,this.rowHeight=0,this.rowWidth=0,this.isrowFinish=!1,this.isRowSpanRowHeightSet=!1,this.noOfPageCount=0,this.isRowHeightSet=!1,this.isPageBreakRowSpanApplied=!1,this.isRowMergeComplete=!0,this.repeatFlag=!1,this.rowFontSplit=!1,this.pdfGrid=t}return Object.defineProperty(t.prototype,"rowSpanExists",{get:function(){return this.bRowSpanExists},set:function(t){this.bRowSpanExists=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cells",{get:function(){return null==this.gridCells&&(this.gridCells=new Vi(this)),this.gridCells},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"grid",{get:function(){return this.pdfGrid},set:function(t){this.pdfGrid=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return void 0===this.rowStyle&&(this.rowStyle=new ji,this.rowStyle.setParent(this)),this.rowStyle},set:function(t){this.rowStyle=t;for(var e=0;e<this.cells.count;e++)this.cells.getCell(e).style.borders=t.border,void 0!==t.font&&(this.cells.getCell(e).style.font=t.font),void 0!==t.backgroundBrush&&(this.cells.getCell(e).style.backgroundBrush=t.backgroundBrush),void 0!==t.backgroundImage&&(this.cells.getCell(e).style.backgroundImage=t.backgroundImage),void 0!==t.textBrush&&(this.cells.getCell(e).style.textBrush=t.textBrush),void 0!==t.textPen&&(this.cells.getCell(e).style.textPen=t.textPen)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowBreakHeight",{get:function(){return void 0===this.gridRowBreakHeight&&(this.gridRowBreakHeight=0),this.gridRowBreakHeight},set:function(t){this.gridRowBreakHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowOverflowIndex",{get:function(){return this.gridRowOverflowIndex},set:function(t){this.gridRowOverflowIndex=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.isRowHeightSet||(this.rowHeight=this.measureHeight()),this.rowHeight},set:function(t){this.rowHeight=t,this.isRowHeightSet=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return 0!==this.rowWidth&&void 0!==this.rowWidth||(this.rowWidth=this.measureWidth()),this.rowWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"NestedGridLayoutResult",{get:function(){return this.gridResult},set:function(t){this.gridResult=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnSpanExists",{get:function(){return this.bColumnSpanExists},set:function(t){this.bColumnSpanExists=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowMergeComplete",{get:function(){return this.isRowMergeComplete},set:function(t){this.isRowMergeComplete=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowIndex",{get:function(){return this.grid.rows.rowCollection.indexOf(this)},enumerable:!0,configurable:!0}),t.prototype.measureHeight=function(){var t,e=0,i=0;t=this.cells.getCell(0).rowSpan>1?0:this.cells.getCell(0).height;for(var r=0;r<this.cells.count;r++){var n=this.cells.getCell(r);if(n.rowSpanRemainingHeight>e&&(e=n.rowSpanRemainingHeight),this.rowMergeComplete=!1,n.rowSpan>1){for(var o=r,s=this.grid.rows.rowCollection.indexOf(this),a=0;a<n.rowSpan;a++)a+1<n.rowSpan&&(this.grid.rows.getRow(s+a+1).cells.getCell(o).hasRowSpan=!0);i<n.height&&(i=n.height)}else t=Math.max(t,n.height)}return i>t&&(t=i),0===t?t=i:e>0&&(t+=e),t},t.prototype.measureWidth=function(){for(var t=0,e=0;e<this.grid.columns.count;e++)t+=this.grid.columns.getColumn(e).width;return t},t}(),Di=function(){function t(t){this.rows=[],this.grid=t}return Object.defineProperty(t.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowCollection",{get:function(){return this.rows},enumerable:!0,configurable:!0}),t.prototype.addRow=function(t){if(void 0===t){var e=new Ai(this.grid);return this.addRow(e),e}if(t.style.setBackgroundBrush(this.grid.style.backgroundBrush),t.style.setFont(this.grid.style.font),t.style.setTextBrush(this.grid.style.textBrush),t.style.setTextPen(this.grid.style.textPen),0===t.cells.count)for(var i=0;i<this.grid.columns.count;i++)t.cells.add(new ki);this.rows.push(t)},t.prototype.getRow=function(t){return this.rows[t]},t}(),Mi=function(){function t(t){this.rows=[],this.grid=t,this.rows=[]}return t.prototype.getHeader=function(t){return this.rows[t]},Object.defineProperty(t.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),t.prototype.add=function(t){if("number"==typeof t){for(var e=void 0,i=0;i<t;i++){e=new Ai(this.grid);for(var r=0;r<this.grid.columns.count;r++)e.cells.add(new ki);this.rows.push(e)}return this.rows}this.rows.push(t)},t.prototype.indexOf=function(t){return this.rows.indexOf(t)},t}(),Ii=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Fi=function(t){function e(){var e=t.call(this)||this;return e.gridSize=new j(0,0),e.isGridSplit=!1,e.isRearranged=!1,e.pageBounds=new k,e.listOfNavigatePages=[],e.parentCellIndex=0,e.tempWidth=0,e.breakRow=!0,e.splitChildRowIndex=-1,e.hasRowSpanSpan=!1,e.hasColumnSpan=!1,e.isSingleGrid=!0,e}return Ii(e,t),Object.defineProperty(e.prototype,"raiseBeginCellDraw",{get:function(){return void 0!==this.beginCellDraw&&null!==typeof this.beginCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"raiseEndCellDraw",{get:function(){return void 0!==this.endCellDraw&&null!==typeof this.endCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"repeatHeader",{get:function(){return null!=this.bRepeatHeader&&void 0!==this.bRepeatHeader||(this.bRepeatHeader=!1),this.bRepeatHeader},set:function(t){this.bRepeatHeader=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allowRowBreakAcrossPages",{get:function(){return this.breakRow},set:function(t){this.breakRow=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return null!=this.gridColumns&&void 0!==this.gridColumns||(this.gridColumns=new Ni(this)),this.gridColumns},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return null==this.gridRows&&(this.gridRows=new Di(this)),this.gridRows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){return null!=this.gridHeaders&&void 0!==this.gridHeaders||(this.gridHeaders=new Mi(this)),this.gridHeaders},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initialWidth",{get:function(){return this.gridInitialWidth},set:function(t){this.gridInitialWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return null==this.gridStyle&&(this.gridStyle=new Li),this.gridStyle},set:function(t){null==this.gridStyle&&(this.gridStyle=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPageWidth",{get:function(){return this.ispageWidth},set:function(t){this.ispageWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isChildGrid",{get:function(){return this.ischildGrid},set:function(t){this.ischildGrid=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return 0!==this.gridSize.width&&void 0!==this.gridSize.width||0!==this.gridSize.height||(this.gridSize=this.measure()),this.gridSize},set:function(t){this.gridSize=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ParentCell",{get:function(){return this.parentCell},set:function(t){this.parentCell=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"LayoutFormat",{get:function(){return this.layoutFormat},enumerable:!0,configurable:!0}),e.prototype.draw=function(t,e,i,r){if(e instanceof T&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof k&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof T&&void 0===e.width&&i instanceof De)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof De||null==r)){var n=t.graphics.clientSize.width-e,o=new k(e,i,n,0);return this.drawHelper(t,o,r)}return e instanceof k&&void 0!==e.width&&"boolean"==typeof i?this.drawHelper(t,e,null):this.drawHelper(t,e,i)},e.prototype.measure=function(){for(var t=0,e=this.columns.width,i=0;i<this.headers.count;i++)t+=(r=this.headers.getHeader(i)).height;for(i=0;i<this.rows.count;i++){var r=this.rows.getRow(i);t+=r.height}return new j(e,t)},e.prototype.onBeginCellDraw=function(t){this.raiseBeginCellDraw&&this.beginCellDraw(this,t)},e.prototype.onEndCellDraw=function(t){this.raiseEndCellDraw&&this.endCellDraw(this,t)},e.prototype.layout=function(t){if(0!==this.rows.count){var e=this.rows.getRow(0).cells.getCell(0).style;if(null!=e.borders&&(null!=e.borders.left&&1!==e.borders.left.width||null!=e.borders.top&&1!==e.borders.top.width)){var i=e.borders.left.width/2,r=e.borders.top.width/2;if(t.bounds.x===Fe.default.right.width/2&&t.bounds.y===Fe.default.right.width/2){var n=new k(i,r,this.gridSize.width,this.gridSize.height);t.bounds=n}}}return this.setSpan(),this.checkSpan(),this.layoutFormat=t.format,this.gridLocation=t.bounds,new Gi(this).Layouter(t)},e.prototype.setSpan=function(){for(var t=1,e=1,i=0,r=0,n=0,o=this.headers.count,s=0;s<o;s++){var a=this.headers.getHeader(s);n=0;for(var h=a.cells.count,l=0;l<h;l++){var u=a.cells.getCell(l);if(n=Math.max(n,u.rowSpan),!u.isCellMergeContinue&&!u.isRowMergeContinue&&(u.columnSpan>1||u.rowSpan>1)){if(u.columnSpan+l>a.cells.count)throw new Error("Invalid span specified at row "+l.toString()+" column "+s.toString());if(u.rowSpan+s>this.headers.count)throw new Error("Invalid span specified at Header "+l.toString()+" column "+s.toString());if(u.columnSpan>1&&u.rowSpan>1){for(t=u.columnSpan,e=u.rowSpan,i=l,r=s,u.isCellMergeStart=!0,u.isRowMergeStart=!0;t>1;)i++,a.cells.getCell(i).isCellMergeContinue=!0,a.cells.getCell(i).isRowMergeContinue=!0,a.cells.getCell(i).rowSpan=e,t--;for(i=l,t=u.columnSpan;e>1;){for(r++,this.headers.getHeader(r).cells.getCell(l).isRowMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,e--;t>1;)i++,this.headers.getHeader(r).cells.getCell(i).isCellMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,t--;t=u.columnSpan,i=l}}else if(u.columnSpan>1&&1===u.rowSpan)for(t=u.columnSpan,i=l,u.isCellMergeStart=!0;t>1;)i++,a.cells.getCell(i).isCellMergeContinue=!0,t--;else if(1===u.columnSpan&&u.rowSpan>1)for(e=u.rowSpan,r=s;e>1;)r++,this.headers.getHeader(r).cells.getCell(l).isRowMergeContinue=!0,e--}}a.maximumRowSpan=n}},e.prototype.checkSpan=function(){var t,e,i=1,r=0,n=0;if(t=i=1,e=n=0,this.hasRowSpanSpan||this.hasColumnSpan)for(var o=this.rows.count,s=0;s<o;s++){var a=this.rows.getRow(s);r=0;for(var h=a.cells.count,l=0;l<h;l++){var u=a.cells.getCell(l);if(r=Math.max(r,u.rowSpan),!u.isCellMergeContinue&&!u.isRowMergeContinue&&(u.columnSpan>1||u.rowSpan>1)){if(u.columnSpan+l>a.cells.count)throw new Error("Invalid span specified at row "+l.toString()+" column "+s.toString());if(u.rowSpan+s>this.rows.count)throw new Error("Invalid span specified at row "+l.toString()+" column "+s.toString());if(u.columnSpan>1&&u.rowSpan>1){for(t=u.columnSpan,i=u.rowSpan,e=l,n=s,u.isCellMergeStart=!0,u.isRowMergeStart=!0;t>1;)e++,a.cells.getCell(e).isCellMergeContinue=!0,a.cells.getCell(e).isRowMergeContinue=!0,t--;for(e=l,t=u.columnSpan;i>1;){for(n++,this.rows.getRow(n).cells.getCell(l).isRowMergeContinue=!0,this.rows.getRow(n).cells.getCell(e).isRowMergeContinue=!0,i--;t>1;)e++,this.rows.getRow(n).cells.getCell(e).isCellMergeContinue=!0,this.rows.getRow(n).cells.getCell(e).isRowMergeContinue=!0,t--;t=u.columnSpan,e=l}}else if(u.columnSpan>1&&1===u.rowSpan)for(t=u.columnSpan,e=l,u.isCellMergeStart=!0;t>1;)e++,a.cells.getCell(e).isCellMergeContinue=!0,t--;else if(1===u.columnSpan&&u.rowSpan>1)for(i=u.rowSpan,n=s;i>1;)n++,this.rows.getRow(n).cells.getCell(l).isRowMergeContinue=!0,i--}}a.maximumRowSpan=r}},e.prototype.measureColumnsWidth=function(t){if(void 0!==t){this.isPageWidth=!1;for(var e=this.columns.getDefaultWidths(t.width-t.x),i=0,r=this.columns.count;i<r;i++)this.columns.getColumn(i).columnWidth=e[i],this.tempWidth=e[i];if(null!=this.ParentCell&&0==this.style.allowHorizontalOverflow&&0==this.ParentCell.row.grid.style.allowHorizontalOverflow){var n=0,o=0,s=this.columns.count,a=0;null==this.ParentCell.style.cellPadding&&void 0===this.ParentCell.style.cellPadding||(void 0!==this.ParentCell.style.cellPadding.left&&this.ParentCell.style.cellPadding.hasLeftPad&&(n+=this.ParentCell.style.cellPadding.left),void 0!==this.ParentCell.style.cellPadding.right&&this.ParentCell.style.cellPadding.hasRightPad&&(n+=this.ParentCell.style.cellPadding.right));for(i=0;i<this.ParentCell.columnSpan;i++)o+=this.ParentCell.row.grid.columns.getColumn(this.parentCellIndex+i).width;for(d=0;d<this.columns.count;d++)this.gridColumns.getColumn(d).width>0&&this.gridColumns.getColumn(d).isCustomWidth&&(o-=this.gridColumns.getColumn(d).width,s--);if(null==this.ParentCell.row.grid.style.cellPadding&&void 0===this.ParentCell.row.grid.style.cellPadding||(void 0!==this.ParentCell.row.grid.style.cellPadding.top&&this.ParentCell.row.grid.style.cellPadding.hasTopPad&&(n+=this.ParentCell.row.grid.style.cellPadding.top),void 0!==this.ParentCell.row.grid.style.cellPadding.bottom&&this.ParentCell.row.grid.style.cellPadding.hasBottomPad&&(n+=this.ParentCell.row.grid.style.cellPadding.bottom)),0!=this.ParentCell.row.grid.style.cellSpacing&&(o-=2*this.ParentCell.row.grid.style.cellSpacing),o>n&&(a=(o-n)/s,this.tempWidth=a,null!=this.ParentCell))for(d=0;d<this.columns.count;d++)this.columns.getColumn(d).isCustomWidth||(this.columns.getColumn(d).columnWidth=a)}}else{for(var e=[this.columns.count],h=0;h<this.columns.count;h++)e[h]=0;var l=0;if((void 0===this.isChildGrid&&void 0!==this.gridLocation||null===this.isChildGrid&&void 0!==this.gridLocation)&&(this.initialWidth=this.gridLocation.width),this.headers.count>0)for(var u=this.headers.getHeader(0).cells.count,c=this.headers.count,i=0;i<u;i++){l=0;for(d=0;d<c;d++){f=Math.min(this.initialWidth,this.headers.getHeader(d).cells.getCell(i).width);l=Math.max(l,f)}e[i]=l}l=0;for(var i=0,p=this.columns.count;i<p;i++){for(var d=0,c=this.rows.count;d<c;d++)if(1==this.rows.getRow(d).cells.getCell(i).columnSpan&&!this.rows.getRow(d).cells.getCell(i).isCellMergeContinue||null!=this.rows.getRow(d).cells.getCell(i).value){if(null!=this.rows.getRow(d).cells.getCell(i).value&&!this.rows.getRow(d).grid.style.allowHorizontalOverflow)this.rows.getRow(d).grid.style.cellPadding.right,this.rows.getRow(d).grid.style.cellPadding.left,this.rows.getRow(d).cells.getCell(i).style.borders.left.width;var f=0;f=this.initialWidth>0?Math.min(this.initialWidth,this.rows.getRow(d).cells.getCell(i).width):this.rows.getRow(d).cells.getCell(i).width,l=Math.max(e[i],Math.max(l,f)),l=Math.max(this.columns.getColumn(i).width,l)}0!=this.rows.count&&(e[i]=l),l=0}for(var i=0,g=this.rows.count;i<g;i++)for(var d=0,m=this.columns.count;d<m;d++)if(this.rows.getRow(i).cells.getCell(d).columnSpan>1)for(var y=e[d],b=1;b<this.rows.getRow(i).cells.getCell(d).columnSpan;b++)y+=e[d+b];for(var i=0,r=this.columns.count;i<r;i++)this.columns.getColumn(i).width<=0?this.columns.getColumn(i).columnWidth=e[i]:this.columns.getColumn(i).width>0&&!this.columns.getColumn(i).isCustomWidth&&(this.columns.getColumn(i).columnWidth=e[i]);var n=0,w=0,S=this.columns.count,P=0;w=this.tempWidth;for(d=0;d<this.columns.count;d++)this.gridColumns.getColumn(d).width>0&&this.gridColumns.getColumn(d).isCustomWidth&&(w-=this.gridColumns.getColumn(d).width,S--);if(w>0&&0!=this.ParentCell.row.grid.style.cellSpacing&&(w-=2*this.ParentCell.row.grid.style.cellSpacing),w>n&&(P=w/S,null!=this.ParentCell))for(d=0;d<this.columns.count;d++)this.columns.getColumn(d).isCustomWidth||(this.columns.getColumn(d).columnWidth=P)}},e}(Ge),Ei=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Gi=function(e){function i(t){var i=e.call(this,t)||this;return i.gridInitialWidth=0,i.gridSize=new j(0,0),i.parentCellIndex=0,i.tempWidth=0,i.childheight=0,i.isChildGrid=!1,i.hasRowSpanSpan=!1,i.isRearranged=!1,i.pageBounds=new k,i.listOfNavigatePages=[],i.flag=!0,i.columnRanges=[],i.currentLocation=new T(0,0),i.breakRow=!0,i.isOverloadWithPosition=!1,i}return Ei(i,e),Object.defineProperty(i.prototype,"Grid",{get:function(){return this.elements},enumerable:!0,configurable:!0}),i.prototype.getFormat=function(t){return t},i.prototype.layoutInternal=function(e){var i=this.getFormat(e.format);if(this.gridLayoutFormat=this.getFormat(e.format),this.currentPage=e.page,null===this.currentPage)throw Error("Can not set page as null");this.currentPage.getClientSize().height,this.currentPage.getClientSize().width;this.currentPageBounds=this.currentPage.getClientSize(),this.currentGraphics=this.currentPage.graphics;var r=0;if(r=this.currentGraphics.page.section.indexOf(this.currentGraphics.page),this.listOfNavigatePages.push(r),null!=i&&i.break===t.PdfLayoutBreakType.FitColumnsToPage?this.currentBounds=new k(new T(e.bounds.x,e.bounds.y),new j(this.Grid.columns.width,this.currentGraphics.clientSize.height)):this.currentBounds=new k(new T(e.bounds.x,e.bounds.y),this.currentGraphics.clientSize),0!==this.Grid.rows.count)this.currentBounds.width=e.bounds.width>0?e.bounds.width:this.currentBounds.width-this.Grid.rows.getRow(0).cells.getCell(0).style.borders.left.width/2;else{if(0===this.Grid.headers.count)throw Error("Please add row or header into grid");this.currentBounds.width=e.bounds.width}if(this.startLocation=new T(e.bounds.x,e.bounds.y),e.bounds.height>0&&!this.Grid.isChildGrid&&(this.currentBounds.height=e.bounds.height),this.Grid.isChildGrid||(this.hType=this.Grid.style.horizontalOverflowType),this.Grid.style.allowHorizontalOverflow?(this.Grid.measureColumnsWidth(),this.determineColumnDrawRanges()):(this.columnRanges=[],this.Grid.measureColumnsWidth(this.currentBounds),this.columnRanges.push([0,this.Grid.columns.count-1])),this.Grid.hasRowSpanSpan)for(var n=0;n<this.Grid.rows.count;n++)-1===this.Grid.rows.getRow(n).height||this.Grid.rows.getRow(n).isRowHeightSet||(this.Grid.rows.getRow(n).isRowHeightSet=!0);return this.layoutOnPage(e)},i.prototype.determineColumnDrawRanges=function(){for(var t=0,e=0,i=0,r=this.currentGraphics.clientSize.width-this.currentBounds.x,n=0;n<this.Grid.columns.count;n++)if((i+=this.Grid.columns.getColumn(n).width)>=r){for(var o=0,s=t;s<=n&&!((o+=this.Grid.columns.getColumn(s).width)>r);s++)e=s;this.columnRanges.push([t,e]),i=(e=t=e+1)<=n?this.Grid.columns.getColumn(n).width:0}this.columnRanges.push([t,this.Grid.columns.count-1])},i.prototype.layoutOnPage=function(e){this.pageBounds.x=e.bounds.x,this.pageBounds.y=e.bounds.y,this.pageBounds.height=e.bounds.height;for(var r=this.getFormat(e.format),n=null,o=new rt,s=e.page,a=[],h=0;h<this.columnRanges.length;h++){var l=this.columnRanges[h];this.cellStartIndex=l[0],this.cellEndIndex=l[1];var u=this.raiseBeforePageLayout(this.currentPage,this.currentBounds,this.currentRowIndex);this.currentBounds=u.currentBounds,this.currentRowIndex=u.currentRowIndex;for(var c=0;c<this.Grid.headers.count;c++)m=this.Grid.headers.getHeader(c),this.currentBounds.y,this.drawRow(m);var p=0,d=(this.Grid.rows.count,void 0),f=!0;a=[];for(var g=0;g<this.Grid.rows.count;g++){var m=this.Grid.rows.getRow(g);p++,this.currentRowIndex=p-1;var y=this.currentBounds.y;s=this.currentPage,i.repeatRowIndex=-1,f&&m.grid.isChildGrid&&(f=!1);var b=null;if(-1==this.Grid.splitChildRowIndex)b=this.drawRow(m),m.isrowFinish=!0;else{if(!(m.grid.ParentCell.row.grid.isGridSplit&&this.Grid.splitChildRowIndex<=m.rowIndex)){if(m.isrowFinish)continue;break}b=this.drawRow(m),m.isrowFinish=!0}for(a.push(b.bounds.width),y===this.currentBounds.y?(d=!0,i.repeatRowIndex=this.Grid.rows.rowCollection.indexOf(m)):(d=!1,i.repeatRowIndex=-1);!b.isFinish&&null!=s;){var w=this.getLayoutResult();if(this.raisePageLayouted(w).cancel||d)break;if(this.Grid.allowRowBreakAcrossPages){this.currentPage=this.getNextPageformat(r),y=this.currentBounds.y;var S=new T(Fe.default.right.width/2,Fe.default.top.width/2);if(0===r.paginateBounds.x&&0===r.paginateBounds.y&&0===r.paginateBounds.width&&0===r.paginateBounds.height&&this.startLocation.x===S.x&&this.startLocation.y===S.y&&(this.currentBounds.x+=this.startLocation.x,this.currentBounds.y+=this.startLocation.y),this.Grid.isChildGrid&&null!=m.grid.ParentCell&&null!=this.Grid.ParentCell.row.grid.style.cellPadding&&m.rowBreakHeight+this.Grid.ParentCell.row.grid.style.cellPadding.top<this.currentBounds.height&&(this.currentBounds.y=this.Grid.ParentCell.row.grid.style.cellPadding.top),null!=m.grid.ParentCell){m.grid.ParentCell.row.isRowBreaksNextPage=!0,m.grid.ParentCell.row.rowBreakHeightValue=m.rowBreakHeight+this.Grid.ParentCell.row.grid.style.cellPadding.top+this.Grid.ParentCell.row.grid.style.cellPadding.bottom;for(var P=m.rowIndex+1;P<m.grid.rows.count;P++)m.grid.ParentCell.row.rowBreakHeightValue+=m.grid.rows.getRow(P).height}if(m.grid.isChildGrid){m.isrowFinish=!1,m.grid.splitChildRowIndex=m.rowIndex,m.grid.ParentCell.row.grid.splitChildRowIndex=m.grid.ParentCell.row.rowIndex,m.grid.ParentCell.row.grid.isGridSplit&&(m.grid.ParentCell.row.noOfPageCount+=1,m.grid.ParentCell.row.grid.isGridSplit=!1);break}if(m.noOfPageCount<1){if(-1!=m.grid.splitChildRowIndex&&(m.grid.isGridSplit=!0),null!=m.style.border&&(null!=m.style.border.left&&1!==m.style.border.left.width||null!=m.style.border.top&&1!==m.style.border.top.width)){var v=m.style.border.left.width/2,C=m.style.border.top.width/2;if(this.currentBounds.x===Fe.default.right.width/2&&this.currentBounds.y===Fe.default.right.width/2){var B=new k(v,C,this.currentBounds.width,this.currentBounds.height);this.currentBounds=B}}if(this.Grid.repeatHeader)for(var O=0;O<this.Grid.headers.count;O++){var x=this.Grid.headers.getHeader(O);this.drawRow(x)}if(b=this.drawRow(m),m.noOfPageCount>=1){m.rowBreakHeightValue;for(var L=0;L<m.noOfPageCount;L++){var V=this.getLayoutResult();if(this.raisePageLayouted(V),this.currentPage=this.getNextPageformat(r),y=this.currentBounds.y,-1!=m.grid.splitChildRowIndex&&(m.grid.isGridSplit=!0),this.currentBounds.y=.5,this.Grid.repeatHeader)for(var R=0;R<this.Grid.headers.count;R++){D=this.Grid.headers.getHeader(R);this.drawRow(D)}this.drawRow(m)}}m.grid.splitChildRowIndex=-1,m.grid.isGridSplit=!1,b.isFinish=!0;for(var N=0;N<m.cells.count;N++)m.cells.getCell(N).value instanceof Fi&&(m.cells.getCell(N).value.splitChildRowIndex=-1)}}}if(!b.isFinish&&null!==s&&r.layout!==t.PdfLayoutType.OnePage&&d){if(this.startLocation.x=this.currentBounds.x,this.currentPage=this.getNextPageformat(r),null!==e.format&&!e.format.usePaginateBounds&&null!==e.bounds&&e.bounds.height>0&&!this.Grid.isChildGrid&&(this.currentBounds.height=e.bounds.height),null!==e.format&&!e.format.usePaginateBounds&&null!==e.bounds&&e.bounds.y>0&&!this.Grid.isChildGrid&&(this.currentBounds.y=e.bounds.y),this.startLocation.y=this.currentBounds.y,r.paginateBounds.x===r.paginateBounds.y&&r.paginateBounds.y===r.paginateBounds.height&&r.paginateBounds.height===r.paginateBounds.width&&0===r.paginateBounds.width&&(this.currentBounds.x+=this.startLocation.x),this.currentBounds.x===Fe.default.left.width/2&&(this.currentBounds.y+=this.startLocation.x),this.Grid.repeatHeader)for(var A=0;A<this.Grid.headers.count;A++){var D=this.Grid.headers.getHeader(A);this.drawRow(D)}this.drawRow(m),null===this.currentPage||o.containsKey(this.currentPage)||o.add(this.currentPage,l)}if(null!=m.NestedGridLayoutResult){this.currentPage=m.NestedGridLayoutResult.page,this.currentGraphics=this.currentPage.graphics,this.startLocation=new T(m.NestedGridLayoutResult.bounds.x,m.NestedGridLayoutResult.bounds.y);var M=this.ReCalculateHeight(m,m.NestedGridLayoutResult.bounds.height);if(this.currentBounds.y=M,s!=this.currentPage){for(var I=this.currentPage.section,F=I.indexOf(s)+1,E=I.indexOf(this.currentPage),G=F;G<E+1;G++){var z=this.currentPage.graphics,W=new T(r.paginateBounds.x,r.paginateBounds.y),H=G==E?m.NestedGridLayoutResult.bounds.height-e.bounds.y:this.currentBounds.height-W.y;H<=z.clientSize.height&&(H+=e.bounds.y),W.y=null==r?.5:r.paginateBounds.y;for(Z=0;Z<m.cells.count;Z++){var _=m.cells.getCell(Z),K=0,U=0;if(_.value instanceof Fi)for(var q=0;q<_.value.columns.count;q++)U+=_.value.columns.getColumn(q).columnWidth;else U=_.width;K=Math.max(U,m.grid.columns.getColumn(Z).width),_.drawCellBorders(z,new k(W,new j(K,H))),W.x+=K,Z+=_.columnSpan-1}}s=this.currentPage}}}var Y=!1,X=0;a.length>0&&(X=a[0]);for(var J=[[1,2]],Z=0;Z<this.Grid.rows.count;Z++)if(-1!=this.cellEndIndex&&this.Grid.rows.getRow(Z).cells.getCell(this.cellEndIndex).value instanceof Fi){var $=this.Grid.rows.getRow(Z).cells.getCell(this.cellEndIndex).value;this.rowLayoutBoundsWidth=$.rowLayoutBoundsWidth,Y=!0}if(!Y&&a.length>0){for(Z=0;Z<p-1;Z++)X<a[Z]&&(X=a[Z]);this.rowLayoutBoundsWidth=X}else this.rowLayoutBoundsWidth=J[0][1];if(this.columnRanges.indexOf(l)<this.columnRanges.length-1&&null!=s&&r.layout!=t.PdfLayoutType.OnePage)if(this.Grid.isChildGrid,0!=J[0][0]){this.currentPage.section.indexOf(this.currentPage);this.currentGraphics=this.currentPage.graphics,this.currentBounds=new k(new T(0,0),this.currentPage.getClientSize());this.currentGraphics.page.section.indexOf(this.currentGraphics.page)}else this.currentPage=this.getNextPageformat(r);this.columnRanges.length-1!==h&&this.columnRanges.length>1&&r.layout!==t.PdfLayoutType.OnePage&&(this.currentPage=this.getNextPageformat(r),r.paginateBounds.x===r.paginateBounds.y&&r.paginateBounds.y===r.paginateBounds.height&&r.paginateBounds.height===r.paginateBounds.width&&0===r.paginateBounds.width&&(this.currentBounds.x+=this.startLocation.x,this.currentBounds.y+=this.startLocation.y))}return n=this.getLayoutResult(),this.Grid.style.allowHorizontalOverflow&&this.Grid.style.horizontalOverflowType==t.PdfHorizontalOverflowType.NextPage&&this.reArrangePages(o),this.raisePageLayouted(n),n},i.prototype.getNextPageformat=function(t){var e=this.currentPage.section,i=null,r=e.indexOf(this.currentPage);this.flag=!1,i=r===e.count-1?e.add():e.getPages()[r+1],this.currentGraphics=i.graphics;var n=this.currentGraphics.page.section.indexOf(this.currentGraphics.page);return-1===this.listOfNavigatePages.indexOf(n)&&this.listOfNavigatePages.push(n),this.currentBounds=new k(new T(0,0),i.getClientSize()),i},i.prototype.CheckIfDefaultFormat=function(t){var e=new D;return t.alignment===e.alignment&&t.characterSpacing===e.characterSpacing&&t.clipPath===e.clipPath&&t.firstLineIndent===e.firstLineIndent&&t.horizontalScalingFactor===e.horizontalScalingFactor&&t.lineAlignment===e.lineAlignment&&t.lineLimit===e.lineLimit&&t.lineSpacing===e.lineSpacing&&t.measureTrailingSpaces===e.measureTrailingSpaces&&t.noClip===e.noClip&&t.paragraphIndent===e.paragraphIndent&&t.rightToLeft===e.rightToLeft&&t.subSuperScript===e.subSuperScript&&t.wordSpacing===e.wordSpacing&&t.wordWrap===e.wordWrap},i.prototype.RaiseBeforeCellDraw=function(t,e,i,r,n,o){var s=null;return this.Grid.raiseBeginCellDraw&&(s=new _i(t,e,i,r,n,o),this.Grid.onBeginCellDraw(s),o=s.style),o},i.prototype.raiseAfterCellDraw=function(t,e,i,r,n,o){var s=null;this.Grid.raiseEndCellDraw&&(s=new Ki(t,e,i,r,n,o),this.Grid.onEndCellDraw(s))},i.prototype.reArrangePages=function(t){for(var e=this.currentPage.document,i=[],r=t.keys(),n=(t.values(),0);n<r.length;n++)(a=r[n]).section=null,i.push(a),e.pages.remove(a);for(n=0;n<t.size();n++)for(var o=n,s=t.size()/this.columnRanges.length;o<t.size();o+=s){var a=i[o];-1===e.pages.indexOf(a)&&e.pages.add(a)}},i.prototype.getLayoutResult=function(){if(this.Grid.isChildGrid&&this.Grid.allowRowBreakAcrossPages)for(var t=0;t<this.Grid.rows.count;t++){var e=this.Grid.rows.getRow(t);e.rowBreakHeight>0&&e.repeatFlag&&(this.startLocation.y=this.currentPage.origin.y)}var i;return this.isChanged||(i=new k(this.startLocation,new j(this.currentBounds.width,this.currentBounds.y-this.startLocation.y))),new zi(this.currentPage,i)},i.prototype.ReCalculateHeight=function(t,e){for(var i=0,r=this.cellStartIndex;r<=this.cellEndIndex;r++)null!==t.cells.getCell(r).remainingString&&""!==t.cells.getCell(r).remainingString&&void 0!==t.cells.getCell(r).remainingString&&(i=Math.max(i,t.cells.getCell(r).measureHeight()));return Math.max(e,i)},i.prototype.raiseBeforePageLayout=function(t,e,i){var r=!1;if(this.Grid.raiseBeginPageLayout){var n=new Xi(e,t,i);this.Grid.onBeginPageLayout(n),r=n.cancel,e=n.bounds,i=n.startRowIndex}return{returnValue:r,currentBounds:e,currentRowIndex:i}},i.prototype.raisePageLayouted=function(t){var e=new Ji(t);return this.Grid.raiseEndPageLayout&&this.Grid.onEndPageLayout(e),e},i.prototype.drawRow=function(e,r,n){if(void 0===r){var o=new Zi,s=0,a=new j(0,0),h=!1;if(e.rowSpanExists){var l=0,u=this.Grid.rows.rowCollection.indexOf(e);-1===u&&-1!==(u=this.Grid.headers.indexOf(e))&&(h=!0);for(f=0;f<e.cells.count;f++){var c=e.cells.getCell(f);l=Math.max(l,c.rowSpan)}for(f=u;f<u+l;f++)s+=h?this.Grid.headers.getHeader(f).height:this.Grid.rows.getRow(f).height}var p=e.rowBreakHeight>0?e.rowBreakHeight:e.height;return this.Grid.isChildGrid&&null!=this.Grid.ParentCell?this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+p>this.currentPageBounds.height||this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+p>this.currentBounds.height||this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+s>this.currentPageBounds.height?(this.Grid.ParentCell.row.grid.LayoutFormat.break===t.PdfLayoutBreakType.FitPage&&(i.repeatRowIndex=this.Grid.rows.rowCollection.indexOf(e),this.Grid.splitChildRowIndex=this.Grid.rows.rowCollection.indexOf(e)),i.repeatRowIndex>-1&&i.repeatRowIndex===e.rowIndex&&this.Grid.allowRowBreakAcrossPages&&(o.isFinish=!0,o.bounds=this.currentBounds,this.drawRowWithBreak(o,e,p),e.repeatFlag=!0,e.repeatRowNumber=i.repeatRowIndex)):(o.isFinish=!0,e.grid.ParentCell.row.rowBreakHeightValue>0?e.repeatFlag=!0:(e.repeatFlag=!1,p=e.height),this.Grid.isChildGrid&&e.rowBreakHeight>0&&null!=this.Grid.ParentCell.row.grid.style.cellPadding&&(p+=this.Grid.ParentCell.row.grid.style.cellPadding.bottom),this.drawRow(e,o,p)):p>this.currentPageBounds.height?this.Grid.allowRowBreakAcrossPages&&(o.isFinish=!0,this.drawRowWithBreak(o,e,p),e.isrowFinish=!0,e.repeatFlag=!0,-1!==e.grid.splitChildRowIndex&&(o.isFinish=!1)):this.currentBounds.y+p>this.currentPageBounds.height||this.currentBounds.y+p>this.currentBounds.height+this.startLocation.y||this.currentBounds.y+s>this.currentPageBounds.height?(this.Grid.LayoutFormat.break===t.PdfLayoutBreakType.FitPage&&(i.repeatRowIndex=this.Grid.rows.rowCollection.indexOf(e)),i.repeatRowIndex>-1&&i.repeatRowIndex===e.rowIndex?this.Grid.allowRowBreakAcrossPages&&(o.isFinish=!0,this.drawRowWithBreak(o,e,p),e.repeatFlag=!0,e.repeatRowNumber=i.repeatRowIndex,-1!==e.grid.splitChildRowIndex&&(o.isFinish=!1)):o.isFinish=!1):(o.isFinish=!0,this.drawRow(e,o,p),e.repeatFlag=!1),o}var d=new T(this.currentBounds.x,this.currentBounds.y);r.bounds=new k(d,new j(0,0)),n=this.ReCalculateHeight(e,n);for(var f=this.cellStartIndex;f<=this.cellEndIndex;f++){var g=f>this.cellEndIndex+1&&e.cells.getCell(f).columnSpan>1;if(!g)for(var m=1;m<e.cells.getCell(f).columnSpan;m++)e.cells.getCell(f+m).isCellMergeContinue=!0;a=new j(this.Grid.columns.getColumn(f).width,n);!this.CheckIfDefaultFormat(this.Grid.columns.getColumn(f).format)&&this.CheckIfDefaultFormat(e.cells.getCell(f).stringFormat)&&(e.cells.getCell(f).stringFormat=this.Grid.columns.getColumn(f).format);var y=e.cells.getCell(f).style,b="string"==typeof e.cells.getCell(f).value&&null!==e.cells.getCell(f).value?e.cells.getCell(f).value:"";e.cells.getCell(f).style=this.RaiseBeforeCellDraw(this.currentGraphics,this.currentRowIndex,f,new k(d,a),b,y),e.cells.getCell(f).value instanceof Fi&&((S=e.cells.getCell(f).value).parentCellIndex=f);var w=e.cells.getCell(f).draw(this.currentGraphics,new k(d,a),g);if(e.grid.style.allowHorizontalOverflow&&(e.cells.getCell(f).columnSpan>this.cellEndIndex||f+e.cells.getCell(f).columnSpan>this.cellEndIndex+1)&&this.cellEndIndex<e.cells.count-1&&(e.rowOverflowIndex=this.cellEndIndex),e.grid.style.allowHorizontalOverflow&&e.rowOverflowIndex>0&&(e.cells.getCell(f).columnSpan>this.cellEndIndex||f+e.cells.getCell(f).columnSpan>this.cellEndIndex+1)&&e.cells.getCell(f).columnSpan-this.cellEndIndex+f-1>0&&(e.cells.getCell(e.rowOverflowIndex+1).value=null!==w&&void 0!==w.remainder?w.remainder:"",e.cells.getCell(e.rowOverflowIndex+1).stringFormat=e.cells.getCell(f).stringFormat,e.cells.getCell(e.rowOverflowIndex+1).style=e.cells.getCell(f).style,e.cells.getCell(e.rowOverflowIndex+1).columnSpan=e.cells.getCell(f).columnSpan-this.cellEndIndex+f-1),b="string"==typeof e.cells.getCell(f).value&&null!==e.cells.getCell(f).value?e.cells.getCell(f).value:"",g||this.raiseAfterCellDraw(this.currentGraphics,this.currentRowIndex,f,new k(d,a),b,e.cells.getCell(f).style),e.cells.getCell(f).value instanceof Fi){var S=e.cells.getCell(f).value;this.Grid.columns.getColumn(f).width>=this.currentGraphics.clientSize.width?(d.x=S.rowLayoutBoundsWidth,d.x+=S.style.cellSpacing):d.x+=this.Grid.columns.getColumn(f).width}else d.x+=this.Grid.columns.getColumn(f).width}e.rowMergeComplete&&!e.isRowHeightSet||(this.currentBounds.y+=n),r.bounds=new k(new T(r.bounds.x,r.bounds.y),new j(d.x,d.y))},i.prototype.drawRowWithBreak=function(t,e,i){var r=new T(this.currentBounds.x,this.currentBounds.y);e.grid.isChildGrid&&e.grid.allowRowBreakAcrossPages&&this.startLocation.x!==this.currentBounds.x&&(r.x=this.startLocation.x),t.bounds=new k(r,new j(0,0)),this.gridHeight=e.rowBreakHeight>0?this.currentPageBounds.height:0,e.grid.style.cellPadding.top+this.currentBounds.y+e.grid.style.cellPadding.bottom<this.currentPageBounds.height&&(e.rowBreakHeight=this.currentBounds.y+i-this.currentPageBounds.height);for(o=0;o<e.cells.count;o++){var n=e.cells.getCell(o);n.measureHeight()===i&&n.value instanceof Fi&&(e.rowBreakHeight=0)}for(var o=this.cellStartIndex;o<=this.cellEndIndex;o++){var s=e.cells.getCell(o).columnSpan+o>this.cellEndIndex+1&&e.cells.getCell(o).columnSpan>1,a=new j(this.Grid.columns.getColumn(o).width,this.gridHeight>0?this.gridHeight:this.currentPageBounds.height),h=e.cells.getCell(o).style;e.cells.getCell(o).style=h;var l=null;if(l=e.cells.getCell(o).draw(this.currentGraphics,new k(r,a),s),e.rowBreakHeight>0&&null!=l&&(e.cells.getCell(o).FinishedDrawingCell=!1,e.cells.getCell(o).remainingString=null==l.remainder?" ":l.remainder,e.grid.isChildGrid&&(e.rowBreakHeight=i-l.actualSize.height)),t.isFinish=t.isFinish?e.cells.getCell(o).FinishedDrawingCell:t.isFinish,e.cells.getCell(o).value instanceof Fi){var u=e.cells.getCell(o).value;this.rowBreakPageHeightCellIndex=o,this.Grid.columns.getColumn(o).width>=this.currentGraphics.clientSize.width?(r.x=this.rowLayoutBoundsWidth,r.x+=u.style.cellSpacing):r.x+=this.Grid.columns.getColumn(o).width}else r.x+=this.Grid.columns.getColumn(o).width}this.currentBounds.y+=this.gridHeight>0?this.gridHeight:i,t.bounds=new k(new T(t.bounds.x,t.bounds.y),new j(r.x,r.y))},i.repeatRowIndex=-1,i}(Ae),zi=function(t){function e(e,i){return t.call(this,e,i)||this}return Ei(e,t),e}(Ie),Wi=function(t){function e(e){return t.call(this,e)||this}return Ei(e,t),e}(De),Hi=function(){function t(t,e,i,r,n){this.gridRowIndex=e,this.gridCellIndex=i,this.internalValue=n,this.gridBounds=r,this.pdfGraphics=t}return Object.defineProperty(t.prototype,"rowIndex",{get:function(){return this.gridRowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cellIndex",{get:function(){return this.gridCellIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.internalValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.gridBounds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){return this.pdfGraphics},enumerable:!0,configurable:!0}),t}(),_i=function(t){function e(e,i,r,n,o,s){var a=t.call(this,e,i,r,n,o)||this;return a.style=s,a}return Ei(e,t),Object.defineProperty(e.prototype,"skip",{get:function(){return this.bSkip},set:function(t){this.bSkip=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this.cellStyle},set:function(t){this.cellStyle=t},enumerable:!0,configurable:!0}),e}(Hi),Ki=function(t){function e(e,i,r,n,o,s){var a=t.call(this,e,i,r,n,o)||this;return a.cellStyle=s,a}return Ei(e,t),Object.defineProperty(e.prototype,"style",{get:function(){return this.cellStyle},enumerable:!0,configurable:!0}),e}(Hi),Ui=function(){function t(){}return Object.defineProperty(t.prototype,"cancel",{get:function(){return this.isCancel},set:function(t){this.isCancel=t},enumerable:!0,configurable:!0}),t}(),qi=function(t){function e(e,i){var r=t.call(this)||this;return r.bounds=e,r.pdfPage=i,r}return Ei(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.cellBounds},set:function(t){this.cellBounds=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),e}(Ui),Yi=function(t){function e(e){var i=t.call(this)||this;return i.layoutResult=e,i}return Ei(e,t),Object.defineProperty(e.prototype,"result",{get:function(){return this.layoutResult},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextPage",{get:function(){return this.nextPdfPage},set:function(t){this.nextPdfPage=t},enumerable:!0,configurable:!0}),e}(Ui),Xi=function(t){function e(e,i,r){var n=t.call(this,e,i)||this;return n.startRow=r,n}return Ei(e,t),Object.defineProperty(e.prototype,"startRowIndex",{get:function(){return this.startRow},enumerable:!0,configurable:!0}),e}(qi),Ji=function(t){function e(e){return t.call(this,e)||this}return Ei(e,t),e}(Yi),Zi=function(){function t(){this.layoutedBounds=new k(0,0,0,0)}return Object.defineProperty(t.prototype,"isFinish",{get:function(){return this.bIsFinished},set:function(t){this.bIsFinished=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.layoutedBounds},set:function(t){this.layoutedBounds=t},enumerable:!0,configurable:!0}),t}(),$i=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qi=function(e){function i(t){var i=e.call(this,t)||this;return i.olderPdfForm=0,i.shapeBounds=new k,i.totalPageSize=0,i}return $i(i,e),Object.defineProperty(i.prototype,"element",{get:function(){return this.elements},enumerable:!0,configurable:!0}),i.prototype.layoutInternal=function(t){var e=t.page,i=t.bounds,r=this.element.getBounds();r.x=0,r.y=0;var n=this.shapeBounds.x===this.shapeBounds.y&&this.shapeBounds.y===this.shapeBounds.width&&this.shapeBounds.width===this.shapeBounds.height&&0===this.shapeBounds.height;this.isPdfGrid&&!n&&(r=this.shapeBounds);var o=null,s=new tr;for(s.page=e;;){var a=this.raiseBeforePageLayout(e,i);i=a.currentBounds;var h=null;if(a.cancel||(s=this.layoutOnPage(e,i,r,t),h=this.raiseEndPageLayout(s),a.cancel=null!==h&&h.cancel),s.end||a.cancel){o=this.getLayoutResult(s);break}if(i=this.getPaginateBounds(t),r=this.getNextShapeBounds(r,s),e=null===h||null===h.nextPage?this.getNextPage(e):h.nextPage,this.isPdfGrid){o=this.getLayoutResult(s);break}}return o},i.prototype.raiseBeforePageLayout=function(t,e){var i=!1;if(this.element.raiseBeginPageLayout){var r=new qi(e,t);this.element.onBeginPageLayout(r),i=r.cancel,e=r.bounds}return{currentBounds:e,cancel:i}},i.prototype.raiseEndPageLayout=function(t){var e=null;if(this.element.raiseEndPageLayout){var i=this.getLayoutResult(t);e=new Yi(i),this.element.onEndPageLayout(e)}return e},i.prototype.getLayoutResult=function(t){return new Ie(t.page,t.bounds)},i.prototype.getNextShapeBounds=function(t,e){var i=e.bounds;return t.y=t.y+i.height,t.height=t.height-i.height,t},i.prototype.layoutOnPage=function(e,i,r,n){var o=new tr;i=this.checkCorrectCurrentBounds(e,i,n);var s=this.fitsToBounds(i,r),a=!1;if(!(n.format.break===t.PdfLayoutBreakType.FitElement&&!s&&e===n.page)){var h=this.getDrawBounds(i,r);this.drawShape(e.graphics,i,h),o.bounds=this.getPageResultBounds(i,r),a=i.height>=r.height}return o.end=a||n.format.layout===t.PdfLayoutType.OnePage,o.page=e,o},i.prototype.getDrawBounds=function(t,e){var i=t;return i.y=i.y-e.y,i.height=i.height+e.y,i},i.prototype.drawShape=function(t,e,i){var r=t.save();try{t.setClip(e),this.element.drawGraphicsHelper(t,new T(i.x,i.y))}finally{t.restore(r)}},i.prototype.checkCorrectCurrentBounds=function(t,e,i){var r=t.graphics.clientSize;return e.width=e.width>0?e.width:r.width-e.x,e.height=e.height>0?e.height:r.height-e.y,this.isPdfGrid&&(e.height=e.height-this.bottomCellPadding),e},i.prototype.getPageResultBounds=function(t,e){var i=t;return i.height=Math.min(i.height,e.height),i},i.prototype.fitsToBounds=function(t,e){return e.height<=t.height},i.index=0,i.splitDiff=0,i.last=!1,i.borderWidth=0,i}(Ae),tr=function(){function t(){}return t}(),er=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ir=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return er(e,t),e.prototype.getBounds=function(){return this.getBoundsInternal()},e.prototype.drawGraphicsHelper=function(t,e){if(null==t)throw new Error("ArgumentNullException :graphics");this.drawShapeHelper(t,e.x,e.y)},e.prototype.drawShapeHelper=function(t,e,i){var r=.5!==e||.5!==i,n=null;r&&(n=t.save(),t.translateTransform(e,i)),this.drawInternal(t),r&&t.restore(n)},e.prototype.layout=function(t){return new Qi(this).layout(t)},e}(Ge),rr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),nr=function(t){function e(e){var i=t.call(this)||this;return void 0!==e&&(i.mpen=e),i}return rr(e,t),Object.defineProperty(e.prototype,"pen",{get:function(){return this.mpen},set:function(t){this.mpen=t},enumerable:!0,configurable:!0}),e}(ir),or=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sr=function(t){function e(e,i){var r=t.call(this)||this;return r.mbrush=null,void 0===e||(e instanceof Q?r=t.call(this,e)||this:r.mbrush=i),r}return or(e,t),Object.defineProperty(e.prototype,"brush",{get:function(){return this.mbrush},set:function(t){this.mbrush=t},enumerable:!0,configurable:!0}),e.prototype.obtainPen=function(){return null==this.mbrush&&null==this.pen?new Q(new L(0,0,0)):this.pen},e}(nr),ar=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),hr=function(e){function i(i,r,n,o){var s=e.call(this)||this;return s.mpoints=null,s.mpathTypes=null,s.mStartFigure=!0,s.mfillMode=t.PdfFillMode.Alternate,s.isBeziers3=!1,s.isXps=!1,void 0===i||(i instanceof Q?(s=e.call(this,i)||this,r instanceof R?(s=e.call(this,i,r)||this).fillMode=n:null!==r&&void 0!==r&&null!==n&&void 0!==n&&s.addPath(r,n)):i instanceof R?(s=e.call(this,i)||this,null!==r&&void 0!==r&&(s.fillMode=r),null!==n&&void 0!==n&&null!==o&&void 0!==o&&s.addPath(n,o)):s.addPath(i,r)),s}return ar(i,e),Object.defineProperty(i.prototype,"fillMode",{get:function(){return this.mfillMode},set:function(t){this.mfillMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pathPoints",{get:function(){return this.points},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pathTypes",{get:function(){return this.types},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pointCount",{get:function(){var t=0;return null!=this.mpoints&&(t=this.mpoints.length),t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"lastPoint",{get:function(){return this.getLastPoint()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"points",{get:function(){return null==this.mpoints&&(this.mpoints=[]),this.mpoints},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"types",{get:function(){return null==this.mpathTypes&&(this.mpathTypes=[]),this.mpathTypes},enumerable:!0,configurable:!0}),i.prototype.draw=function(t,e,i,r){if(e instanceof T&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof k&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof T&&i instanceof De)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof De||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new k(e,i,n,0);return this.drawHelper(t,o,r)}return this.drawHelper(t,e,i)},i.prototype.addArc=function(e,i,r,n,o,s){if(e instanceof k)this.addArc(e.x,e.y,e.width,e.height,i,r);else for(var a=this.getBezierArcPoints(e,i,i+r,i+n,o,s),h=0;h<a.length;h+=8){var l=[a[h],a[h+1],a[h+2],a[h+3],a[h+4],a[h+5],a[h+6],a[h+7]];this.addPoints(l,t.PathPointType.Bezier3)}},i.prototype.addBezier=function(e,i,r,n,o,s,a,h){if(e instanceof T&&i instanceof T&&r instanceof T&&n instanceof T)this.addBezier(e.x,e.y,i.x,i.y,r.x,r.y,n.x,n.y);else{var l=[];l.push(e),l.push(i),l.push(r),l.push(n),l.push(o),l.push(s),l.push(a),l.push(h),this.addPoints(l,t.PathPointType.Bezier3)}},i.prototype.addEllipse=function(t,e,i,r){t instanceof k?this.addEllipse(t.x,t.y,t.width,t.height):(this.startFigure(),this.addArc(t,e,i,r,0,360),this.closeFigure())},i.prototype.addLine=function(e,i,r,n){if(e instanceof T&&i instanceof T)this.addLine(e.x,e.y,i.x,i.y);else{var o=[];o.push(e),o.push(i),o.push(r),o.push(n),this.addPoints(o,t.PathPointType.Line)}},i.prototype.addPath=function(t,e){if(t instanceof i)this.addPath(t.pathPoints,t.pathTypes);else{if(null==t)throw new Error("ArgumentNullException:pathPoints");if(null==e)throw new Error("ArgumentNullException:pathTypes");if(t.length!==e.length)throw new Error("The argument arrays should be of equal length.")}},i.prototype.addPie=function(e,i,r,n,o,s){e instanceof k?this.addPie(e.x,e.y,e.width,e.height,i,r):(this.startFigure(),this.addArc(e,i,r,n,o,s),this.addPoint(new T(e+r/2,i+n/2),t.PathPointType.Line),this.closeFigure())},i.prototype.addPolygon=function(e){e.length;var i=[];this.startFigure();for(var r=0;r<e.length;r++)i.push(e[r].x),i.push(e[r].y);this.addPoints(i,t.PathPointType.Line),this.closeFigure()},i.prototype.addRectangle=function(e,i,r,n){if(e instanceof k)this.addRectangle(e.x,e.y,e.width,e.height);else{var o=[];this.startFigure(),o.push(e),o.push(i),o.push(e+r),o.push(i),o.push(e+r),o.push(i+n),o.push(e),o.push(i+n),this.addPoints(o,t.PathPointType.Line),this.closeFigure()}},i.prototype.startFigure=function(){this.mStartFigure=!0},i.prototype.closeAllFigures=function(){for(var e=this.pathPoints[0],i=0;i<this.mpathTypes.length;i++){var r=this.types[i],n=!1;0!==i&&r===t.PathPointType.Start?(this.closeFigure(i-1),n=!0):i===this.mpathTypes.length-1&&!n&&this.isXps&&e.x===this.pathPoints[i].y&&this.closeFigure(i)}},i.prototype.getLastPoint=function(){var t=new T(0,0),e=this.pointCount;return e>0&&null!=this.mpoints&&(t.x=this.mpoints[e-1].x,t.y=this.mpoints[e-1].y),t},i.prototype.getBezierArcPoints=function(t,e,i,r,n,o){if(t>i){s=void 0;s=t,t=i,i=s}if(r>e){var s=void 0;s=e,e=r,r=s}var a,h;Math.abs(o)<=90?(a=o,h=1):a=o/(h=Math.ceil(Math.abs(o)/90));for(var l=(t+i)/2,u=(e+r)/2,c=(i-t)/2,p=(r-e)/2,d=a*(Math.PI/360),f=Math.abs(4/3*(1-Math.cos(d))/Math.sin(d)),g=[],m=0;m<h;m++){var y=(n+m*a)*(Math.PI/180),b=(n+(m+1)*a)*(Math.PI/180),w=Math.cos(y),S=Math.cos(b),P=Math.sin(y),v=Math.sin(b);a>0?g.push(l+c*w,u-p*P,l+c*(w-f*P),u-p*(P+f*w),l+c*(S+f*v),u-p*(v-f*S),l+c*S,u-p*v):g.push(l+c*w,u-p*P,l+c*(w+f*P),u-p*(P-f*w),l+c*(S-f*v),u-p*(v+f*S),l+c*S,u-p*v)}return g},i.prototype.getBoundsInternal=function(){var t=this.pathPoints,e=new k(0,0,0,0);if(t.length>0){for(var i=t[0].x,r=t[0].x,n=t[0].y,o=t[0].y,s=1;s<t.length;s++){var a=t[s];i=Math.min(a.x,i),r=Math.max(a.x,r),n=Math.min(a.y,n),o=Math.max(a.y,o)}e=new k(i,n,r-i,o-n)}return e},i.prototype.drawInternal=function(t){if(null==t)throw new Error("ArgumentNullException :graphics");t.drawPath(this.obtainPen(),this.brush,this)},i.prototype.addPoints=function(e,i,r,n){if(void 0===r&&void 0===n)this.addPoints(e,i,0,e.length);else for(var o=r;o<n;o++){var s=new T(e[o],e[o+1]);o===r?this.pointCount<=0||this.mStartFigure?(this.addPoint(s,t.PathPointType.Start),this.mStartFigure=!1):s.x===this.lastPoint.x||s.y===this.lastPoint.y||this.isBeziers3?s.x!==this.lastPoint.x&&s.y!==this.lastPoint.y&&this.addPoint(s,t.PathPointType.Bezier3):this.addPoint(s,t.PathPointType.Line):this.addPoint(s,i),o++}},i.prototype.addPoint=function(t,e){this.points.push(t),this.types.push(e)},i.prototype.closeFigure=function(e){if(void 0===e)this.pointCount>0&&this.closeFigure(this.pointCount-1),this.startFigure();else{if(e<0)throw new Error("IndexOutOfRangeException()");var i=this.types[e];i|=t.PathPointType.CloseSubpath,this.types[e]=i}},i}(sr),lr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ur=function(t){function e(e,i,r,n,o,s){var a=t.call(this)||this;return a.bounds=new k(0,0,0,0),void 0===e||(e instanceof Q?(a=t.call(this,e,i)||this).bounds=r instanceof k?r:new k(r,n,o,s):a.bounds=e instanceof k?e:new k(e,i,r,n)),a}return lr(e,t),Object.defineProperty(e.prototype,"x",{get:function(){return this.bounds.x},set:function(t){this.bounds.x=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.bounds.y},set:function(t){this.bounds.y=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.bounds.width},set:function(t){this.bounds.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.bounds.height},set:function(t){this.bounds.height=t},enumerable:!0,configurable:!0}),e.prototype.getBoundsInternal=function(){return this.bounds},e}(sr),cr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),pr=function(t){function e(e,i,r,n,o,s,a,h){var l=t.call(this)||this;return l.startAngle=0,l.sweepAngle=0,void 0===e||(e instanceof k&&void 0!==i&&void 0!==r?((l=t.call(this,e)||this).startAngle=i,l.sweepAngle=r):e instanceof Q?r instanceof k?((l=t.call(this,e,i,r)||this).startAngle=n,l.sweepAngle=o):((l=t.call(this,e,i,r,n,o,s)||this).startAngle=a,l.sweepAngle=h):((l=t.call(this,e,i,r,n)||this).startAngle=o,l.sweepAngle=s)),l}return cr(e,t),e}(ur),dr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fr=function(t){function e(e,i,r,n,o,s,a){var h=this;return void 0===e?h=t.call(this)||this:e instanceof k?h=t.call(this,e,i,r)||this:e instanceof Q?i instanceof k?h=t.call(this,e,null,i,r,n)||this:void 0===s&&void 0===a?h=t.call(this,e,null,0,0,i,r,n,o)||this:void 0!==s&&void 0!==a&&(h=t.call(this,e,null,i,r,n,o,s,a)||this):void 0!==e&&void 0===o&&void 0===s?h=t.call(this,0,0,e,i,r,n)||this:void 0!==e&&void 0!==o&&void 0!==s&&(h=t.call(this,e,i,r,n,o,s)||this),h}return dr(e,t),e.prototype.draw=function(t,e,i,r){if(e instanceof T&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof k&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof T&&i instanceof De)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof De||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new k(e,i,n,0);return this.drawHelper(t,o,r)}return this.drawHelper(t,e,i)},e.prototype.drawInternal=function(t){if(null==t)throw new Error("ArgumentNullException : graphics");t.drawArc(this.obtainPen(),this.bounds,this.startAngle,this.sweepAngle)},e}(pr),gr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mr=function(e){function i(i,r,n){var o=e.call(this,r)||this;return o.isEmbedFont=!1,o.isUnicode=!0,void 0!==n?o.createFontInternal(i,n):o.createFontInternal(i,t.PdfFontStyle.Regular),o}return gr(i,e),i.prototype.equalsToFont=function(t){return!1},i.prototype.getLineWidth=function(e,i){var r=0;r=null!==i&&void 0!==i&&i.textDirection!==t.PdfTextDirection.None?this.getUnicodeLineWidth(e,r,i).width:this.fontInternal.getLineWidth(e);var n=this.metrics.getSize(i);return r*=G.charSizeMultiplier*n,r=this.applyFormatSettings(e,i,r)},i.prototype.getCharWidth=function(t,e){var i=this.fontInternal.getCharWidth(t);return i*=.001*this.metrics.getSize(e)},i.prototype.createFontInternal=function(t,e){this.fontInternal=new Gt(t,this.size),this.calculateStyle(e),this.initializeInternals()},i.prototype.calculateStyle=function(e){var i=this.fontInternal.ttfMetrics.macStyle;0!=(e&t.PdfFontStyle.Underline)&&(i|=t.PdfFontStyle.Underline),0!=(e&t.PdfFontStyle.Strikeout)&&(i|=t.PdfFontStyle.Strikeout),this.setStyle(i)},i.prototype.initializeInternals=function(){var t=null;Ce.enableCache&&(t=Ce.cache.search(this));var e=null;if(null!==t&&void 0!==t){e=t.getInternals();var i=t.metrics;(i=i.clone()).size=this.size,this.metrics=i,this.fontInternal=t.fontInternal}else null==t&&(this.fontInternal instanceof Gt&&(this.fontInternal.isEmbed=this.isEmbedFont),this.fontInternal.createInternals(),e=this.fontInternal.getInternals(),this.metrics=this.fontInternal.metrics);this.metrics.isUnicodeFont=!0,this.setInternals(e)},i.prototype.setSymbols=function(t){var e=this.fontInternal;null!=e&&e.setSymbols(t)},Object.defineProperty(i.prototype,"Unicode",{get:function(){return this.isUnicode},enumerable:!0,configurable:!0}),i.prototype.getUnicodeLineWidth=function(e,i,r){i=0;var n=null,o=(new Kt).getGlyphIndex(e,this,r.textDirection===t.PdfTextDirection.RightToLeft,n,!0),s=o.success;if(n=o.glyphs,s&&null!==n)for(var a=this.fontInternal.ttfReader,h=0,l=n.length;h<l;h++){var u=n[h],c=a.getGlyph(u);null!==c&&void 0!==c&&(i+=c.width)}return{success:s,width:i}},i}(G),yr=function(){function e(t,e,i,r,n){t instanceof k&&void 0===e?this.InitiateBounds(t.x,t.y,t.width,t.height,null):t instanceof k&&e instanceof ce&&void 0===i?this.InitiateBounds(t.x,t.y,t.width,t.height,e):t instanceof T&&e instanceof j&&void 0===i?this.InitiateBounds(t.x,t.y,e.width,e.height,null):t instanceof T&&e instanceof j&&i instanceof ce&&void 0===r?this.InitiateBounds(t.x,t.y,e.width,e.height,i):t instanceof j&&void 0===e?this.InitiateBounds(0,0,t.width,t.height,null):"number"==typeof t&&"number"==typeof e&&void 0===i?this.InitiateBounds(0,0,t,e,null):"number"==typeof t&&"number"==typeof e&&i instanceof ce&&void 0===r?this.InitiateBounds(0,0,t,e,i):this.InitiateBounds(t,e,i,r,null)}return Object.defineProperty(e.prototype,"dock",{get:function(){return this.dockStyle},set:function(t){this.dockStyle=t,this.resetAlignment()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alignment",{get:function(){return this.alignmentStyle},set:function(t){this.setAlignment(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"foreground",{get:function(){return this.isForeground},set:function(t){this.isForeground=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"background",{get:function(){return!this.isForeground},set:function(t){this.isForeground=!t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return this.currentLocation},set:function(e){this.type===t.TemplateType.None&&(this.currentLocation=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return void 0!==this.currentLocation?this.currentLocation.x:0},set:function(e){this.type===t.TemplateType.None&&(this.currentLocation.x=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return void 0!==this.currentLocation?this.currentLocation.y:0},set:function(e){this.type===t.TemplateType.None&&(this.currentLocation.y=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.template.size},set:function(e){this.type===t.TemplateType.None&&this.template.reset(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.template.width},set:function(e){if(this.template.width!==e&&this.type===t.TemplateType.None){var i=this.template.size;i.width=e,this.template.reset(i)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.template.height},set:function(e){if(this.template.height!==e&&this.type===t.TemplateType.None){var i=this.template.size;i.height=e,this.template.reset(i)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){return this.template.graphics},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"template",{get:function(){return this.pdfTemplate},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.templateType},set:function(t){this.updateDocking(t),this.templateType=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bounds",{get:function(){return new k(new T(this.x,this.y),this.size)},set:function(e){this.type===t.TemplateType.None&&(this.location=new T(e.x,e.y),this.size=new j(e.width,e.height))},enumerable:!0,configurable:!0}),e.prototype.InitiateBounds=function(t,e,i,r,n){this.x=t,this.y=e,this.pdfTemplate=new Yt(i,r)},e.prototype.updateDocking=function(e){if(e!==t.TemplateType.None){switch(e){case t.TemplateType.Top:this.dock=t.PdfDockStyle.Top;break;case t.TemplateType.Bottom:this.dock=t.PdfDockStyle.Bottom;break;case t.TemplateType.Left:this.dock=t.PdfDockStyle.Left;break;case t.TemplateType.Right:this.dock=t.PdfDockStyle.Right}this.resetAlignment()}},e.prototype.resetAlignment=function(){this.alignment=t.PdfAlignmentStyle.None},e.prototype.setAlignment=function(e){if(this.dock===t.PdfDockStyle.None)this.alignmentStyle=e;else{var i=!1;switch(this.dock){case t.PdfDockStyle.Left:i=e===t.PdfAlignmentStyle.TopLeft||e===t.PdfAlignmentStyle.MiddleLeft||e===t.PdfAlignmentStyle.BottomLeft||e===t.PdfAlignmentStyle.None;break;case t.PdfDockStyle.Top:i=e===t.PdfAlignmentStyle.TopLeft||e===t.PdfAlignmentStyle.TopCenter||e===t.PdfAlignmentStyle.TopRight||e===t.PdfAlignmentStyle.None;break;case t.PdfDockStyle.Right:i=e===t.PdfAlignmentStyle.TopRight||e===t.PdfAlignmentStyle.MiddleRight||e===t.PdfAlignmentStyle.BottomRight||e===t.PdfAlignmentStyle.None;break;case t.PdfDockStyle.Bottom:i=e===t.PdfAlignmentStyle.BottomLeft||e===t.PdfAlignmentStyle.BottomCenter||e===t.PdfAlignmentStyle.BottomRight||e===t.PdfAlignmentStyle.None;break;case t.PdfDockStyle.Fill:i=e===t.PdfAlignmentStyle.MiddleCenter||e===t.PdfAlignmentStyle.None}i&&(this.alignmentStyle=e)}},e.prototype.draw=function(t,e){var i=t.page,r=this.calculateBounds(i,e);-0===r.x&&(r.x=0),t.graphics.drawPdfTemplate(this.template,new T(r.x,r.y),new j(r.width,r.height))},e.prototype.calculateBounds=function(e,i){var r=this.bounds;return this.alignmentStyle!==t.PdfAlignmentStyle.None?r=this.getAlignmentBounds(e,i):this.dockStyle!==t.PdfDockStyle.None&&(r=this.getDockBounds(e,i)),r},e.prototype.getAlignmentBounds=function(e,i){this.bounds;return this.type===t.TemplateType.None?this.getSimpleAlignmentBounds(e,i):this.getTemplateAlignmentBounds(e,i)},e.prototype.getSimpleAlignmentBounds=function(e,i){var r=this.bounds,n=e.section.getActualBounds(i,e,!1),o=this.x,s=this.y;switch(this.alignmentStyle){case t.PdfAlignmentStyle.TopLeft:o=0,s=0;break;case t.PdfAlignmentStyle.TopCenter:o=(n.width-this.width)/2,s=0;break;case t.PdfAlignmentStyle.TopRight:o=n.width-this.width,s=0;break;case t.PdfAlignmentStyle.MiddleLeft:o=0,s=(n.height-this.height)/2;break;case t.PdfAlignmentStyle.MiddleCenter:o=(n.width-this.width)/2,s=(n.height-this.height)/2;break;case t.PdfAlignmentStyle.MiddleRight:o=n.width-this.width,s=(n.height-this.height)/2;break;case t.PdfAlignmentStyle.BottomLeft:o=0,s=n.height-this.height;break;case t.PdfAlignmentStyle.BottomCenter:o=(n.width-this.width)/2,s=n.height-this.height;break;case t.PdfAlignmentStyle.BottomRight:o=n.width-this.width,s=n.height-this.height}return r.x=o,r.y=s,r},e.prototype.getTemplateAlignmentBounds=function(e,i){var r=this.bounds,n=e.section,o=n.getActualBounds(i,e,!1),s=this.x,a=this.y;switch(this.alignmentStyle){case t.PdfAlignmentStyle.TopLeft:this.type===t.TemplateType.Left?(s=-o.x,a=0):this.type===t.TemplateType.Top&&(s=-o.x,a=-o.y);break;case t.PdfAlignmentStyle.TopCenter:s=(o.width-this.width)/2,a=-o.y;break;case t.PdfAlignmentStyle.TopRight:this.type===t.TemplateType.Right?(s=o.width+n.getRightIndentWidth(i,e,!1)-this.width,a=0):this.type===t.TemplateType.Top&&(s=o.width+n.getRightIndentWidth(i,e,!1)-this.width,a=-o.y);break;case t.PdfAlignmentStyle.MiddleLeft:s=-o.x,a=(o.height-this.height)/2;break;case t.PdfAlignmentStyle.MiddleCenter:s=(o.width-this.width)/2,a=(o.height-this.height)/2;break;case t.PdfAlignmentStyle.MiddleRight:s=o.width+n.getRightIndentWidth(i,e,!1)-this.width,a=(o.height-this.height)/2;break;case t.PdfAlignmentStyle.BottomLeft:this.type===t.TemplateType.Left?(s=-o.x,a=o.height-this.height):this.type===t.TemplateType.Bottom&&(s=-o.x,a=o.height+n.getBottomIndentHeight(i,e,!1)-this.height);break;case t.PdfAlignmentStyle.BottomCenter:s=(o.width-this.width)/2,a=o.height+n.getBottomIndentHeight(i,e,!1)-this.height;break;case t.PdfAlignmentStyle.BottomRight:this.type===t.TemplateType.Right?(s=o.width+n.getRightIndentWidth(i,e,!1)-this.width,a=o.height-this.height):this.type===t.TemplateType.Bottom&&(s=o.width+n.getRightIndentWidth(i,e,!1)-this.width,a=o.height+n.getBottomIndentHeight(i,e,!1)-this.height)}return r.x=s,r.y=a,r},e.prototype.getDockBounds=function(e,i){this.bounds;return this.type===t.TemplateType.None?this.getSimpleDockBounds(e,i):this.getTemplateDockBounds(e,i)},e.prototype.getSimpleDockBounds=function(e,i){this.bounds;var r=e.section.getActualBounds(i,e,!1),n=this.x,o=this.y,s=this.width,a=this.height;switch(this.dockStyle){case t.PdfDockStyle.Left:n=0,o=0,s=this.width,a=r.height;break;case t.PdfDockStyle.Top:n=0,o=0,s=r.width,a=this.height;break;case t.PdfDockStyle.Right:n=r.width-this.width,o=0,s=this.width,a=r.height;break;case t.PdfDockStyle.Bottom:n=0,o=r.height-this.height,s=r.width,a=this.height;break;case t.PdfDockStyle.Fill:n=0,n=0,s=r.width,a=r.height}return new k(n,o,s,a)},e.prototype.getTemplateDockBounds=function(e,i){this.bounds;var r=e.section,n=r.getActualBounds(i,e,!1),o=r.pageSettings.getActualSize(),s=this.x,a=this.y,h=this.width,l=this.height;switch(this.dockStyle){case t.PdfDockStyle.Left:s=-n.x,a=0,h=this.width,l=n.height;break;case t.PdfDockStyle.Top:s=-n.x,a=-n.y,h=o.width,l=this.height,n.height<0&&(a=-n.y+o.height);break;case t.PdfDockStyle.Right:s=n.width+r.getRightIndentWidth(i,e,!1)-this.width,a=0,h=this.width,l=n.height;break;case t.PdfDockStyle.Bottom:s=-n.x,a=n.height+r.getBottomIndentHeight(i,e,!1)-this.height,h=o.width,l=this.height,n.height<0&&(a-=o.height);break;case t.PdfDockStyle.Fill:s=0,s=0,h=n.width,l=n.height}return new k(s,a,h,l)},e}();return t.PdfAction=B,t.PdfUriAction=x,t.PdfActionLinkAnnotation=Ve,t.PdfAnnotation=Le,t.PdfAnnotationCollection=le,t.PdfDocumentLinkAnnotation=Ne,t.PdfLinkAnnotation=je,t.PdfTextWebLink=Je,t.PdfUriAnnotation=Ye,t.Dictionary=n,t.defaultToString=r,t.PdfCatalog=U,t.PdfDocument=Ce,t.PdfDocumentBase=_,t.PdfDocumentTemplate=fe,t.PdfPageNumberField=ii,t.PdfCompositeField=ni,t.PdfPageCountField=hi,t.PointF=T,t.SizeF=j,t.RectangleF=k,t.Rectangle=V,t.PdfCacheCollection=Pe,t.PdfCollection=oe,t.PdfDestination=ui,t.PdfFunction=ci,t.PdfSampledFunction=di,t.ProcedureSets=it,t.PdfColor=L,t.PdfGraphics=te,t.GetResourceEventHandler=ee,t.PdfGraphicsState=ie,t.PdfMargins=J,t.PdfPen=Q,t.PdfResources=Jt,t.Guid=Zt,t.PdfTransformationMatrix=tt,t.Matrix=et,t.PdfBrush=R,t.PdfBrushes=yi,t.PdfSolidBrush=A,t.PdfLinearGradientBrush=vi,t.PdfRadialGradientBrush=Bi,t.PdfTilingBrush=Qt,t.PdfGradientBrush=qt,t.PdfColorBlend=Si,t.PdfBlend=bi,t.PdfTemplate=Yt,t.PdfLayoutElement=Ge,t.PdfPath=hr,t.PdfArc=fr,t.PdfTextElement=Ue,t.ElementLayouter=Ae,t.PdfLayoutFormat=De,t.PdfLayoutParams=Me,t.PdfLayoutResult=Ie,t.TextLayouter=We,t.TextPageLayoutResult=He,t.PdfTextLayoutResult=_e,t.PdfFont=G,t.PdfFontMetrics=It,t.WidthTable=Ft,t.StandardWidthTable=Et,t.PdfStandardFont=xe,t.PdfStandardFontMetricsFactory=Be,t.PdfStringFormat=D,t.PdfStringLayouter=I,t.PdfStringLayoutResult=F,t.LineInfo=E,t.StringTokenizer=M,t.PdfTrueTypeFont=mr,t.RtlRenderer=Kt,t.ArabicShapeRenderer=zt,t.ArabicShape=Wt,t.Bidi=Ht,t.RtlCharacters=_t,t.ByteArray=ut,t.ImageDecoder=pt,t.PdfBitmap=mt,t.PdfImage=ft,t.PdfTransparency=nt,t.PdfCrossTable=q,t.RegisteredObject=Y,t.DictionaryProperties=a,t.PdfMainObjectCollection=W,t.ObjectInfo=H,t.Operators=s,t.PdfStreamWriter=$,t.PdfWriter=z,t.PageAddedEventArgs=pe,t.PdfDocumentPageCollection=Se,t.PdfPage=ce,t.PdfPageBase=he,t.PdfPageLayer=ne,t.PdfPageLayerCollection=ae,t.PdfPageSettings=Z,t.PdfPageSize=X,t.PdfPageTemplateElement=yr,t.PdfSection=ye,t.PageSettingsState=be,t.PdfSectionCollection=we,t.PdfSectionPageCollection=de,t.PdfSectionTemplate=me,t.PdfArray=m,t.PdfDictionary=h,t.SaveSectionCollectionEventHandler=l,t.SaveDescendantFontEventHandler=u,t.SaveFontDictionaryEventHandler=c,t.SaveAnnotationEventHandler=p,t.SaveSectionEventHandler=d,t.SaveTemplateEventHandler=f,t.PdfName=o,t.PdfNumber=g,t.PdfReference=v,t.PdfReferenceHolder=C,t.PdfStream=b,t.SaveCmapEventHandler=w,t.SaveFontProgramEventHandler=S,t.PdfString=P,t.PdfGridStyleBase=xi,t.PdfGridStyle=Li,t.PdfGridCellStyle=Ti,t.PdfGridRowStyle=ji,t.PdfBorders=Fe,t.PdfPaddings=Ee,t.PdfGridLayouter=Gi,t.PdfGridLayoutResult=zi,t.PdfGridLayoutFormat=Wi,t.GridCellEventArgs=Hi,t.PdfGridBeginCellDrawEventArgs=_i,t.PdfGridEndCellDrawEventArgs=Ki,t.PdfCancelEventArgs=Ui,t.BeginPageLayoutEventArgs=qi,t.EndPageLayoutEventArgs=Yi,t.PdfGridBeginPageLayoutEventArgs=Xi,t.PdfGridEndPageLayoutEventArgs=Ji,t.RowLayoutResult=Zi,t.PdfGrid=Fi,t.PdfGridColumn=Ri,t.PdfGridColumnCollection=Ni,t.PdfGridRow=Ai,t.PdfGridRowCollection=Di,t.PdfGridHeaderCollection=Mi,t.PdfGridCell=ki,t.PdfGridCellCollection=Vi,t}({},ej.compression,ej.fileutils),this.ejs=ej;
- /*!
- * filename: ej2-grids.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.grids=function(e,t,i,r,n,o,s,l,a,h,d){"use strict";function c(e,t,i,r){if(r&&e)return void e.removeAttribute(t);e&&e.setAttribute(t,i)}function p(){return["aggregates","allowGrouping","allowFiltering","allowMultiSorting","allowReordering","allowSorting","allowTextWrap","childGrid","columns","currentViewData","dataSource","detailTemplate","enableAltRow","enableColumnVirtualization","filterSettings","gridLines","groupSettings","height","locale","pageSettings","printMode","query","queryString","enableRtl","rowHeight","rowTemplate","sortSettings","textWrapSettings","allowPaging","hierarchyPrintMode","searchSettings","queryCellInfo","beforeDataBound"]}function u(e,t){return e.prototype&&t in e.prototype}function g(e,r,n){return t.isNullOrUndefined(e)||""===e?"":i.DataUtil.getObject(e,r)}function f(e,r){return t.isNullOrUndefined(e)||""===e?"":i.DataUtil.getObject(e,r)}function m(e,t){requestAnimationFrame(function(){try{t(null,e())}catch(e){t(e)}})}function y(e){return!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(e.columns)&&e.columns.length>0}function v(e,t){for(var i=e.columns,r=t.columns,n=0;n<i.length;n++)if(r.length-1>=n)if(r[n].columns)for(var o=0;o<r[n].columns.length;o++)i[n].columns[o].type=r[n].columns[o].type;else i[n].type=r[n].type}function C(e){for(var t=[],i=e.vRows,r=0;r<i.length;r++)i[r].isDataRow?t.push(i[r]):i[r].isDataRow||(t.push(i[r]),!i[r].isExpand&&i[r].isCaptionRow&&(r+=w(i[r],e)));e.vcRows=t}function w(e,i){vn=0;var r=i.groupSettings.columns.length,n="items",o=e.gSummary,s=0,l="aggregatesCount";if(o===e.data.count)return i.groupSettings.columns.length&&!t.isNullOrUndefined(e[l])&&e[l]?1!==i.groupSettings.columns.length?vn+=0!==e.indent&&o<2?e.gSummary*(r-e.indent+(r-e.indent)*e[l]):e.gSummary*(r-e.indent+(r-e.indent-1)*e[l])+e[l]:1===i.groupSettings.columns.length&&(vn+=e.gSummary*(r-e.indent)+e[l]):i.groupSettings.columns.length&&(1!==i.groupSettings.columns.length?vn+=e.gSummary*(i.groupSettings.columns.length-e.indent):vn+=e.gSummary),vn;for(var a=0,h=e.data[n].length;a<h;a++){var d=e.data[n][a];vn+=d[n].length+(r===i.columns.length||t.isNullOrUndefined(d[n].records)?0:d[n].records.length),s+=t.isNullOrUndefined(d[n].records)||t.isNullOrUndefined(e[l])?d[n].length:d[n].records.length,d[n].GroupGuid&&0!==d[n].childLevels&&b(d)}return vn+=e.data[n].length,t.isNullOrUndefined(e[l])||e[l]&&vn&&0!==s&&(vn+=(vn-s)*e[l]+e[l]),vn}function b(e){for(var t=0,i=e.items.length;t<i;t++){var r=e.items[t];vn+=r.count,0!==r.items.childLevels&&b(r)}}function S(e,i){for(var r=[],n=0,o=e.length;n<o;n++){var s=i(e[n],n);t.isNullOrUndefined(s)||r.push(s)}return r}function R(e){for(var i=[],r=0;r<e.length;r++)i.push(t.extend({},M(e[r]),{},!0));return i}function x(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}}function F(e,i){var r={},n=["style","class"];t.extend(r,i,{}),"style"in r&&(t.setStyleAttribute(e,r[n[0]]),delete r[n[0]]),"class"in r&&(t.addClass([e],r[n[1]]),delete r[n[1]]),t.attributes(e,r)}function E(e,i,r,n){for(var o=t.extend(e,i,r),s=Object.keys(o),l=0;l<s.length;l++)n&&-1!==n.indexOf(s[l])&&delete o[s[l]];return o}function I(e,i){void 0===i&&(i=0);for(var r=0,n=e.length;r<n;r++)e[r].columns?(e[r].index=t.isNullOrUndefined(e[r].index)?i:e[r].index,i++,i=I(e[r].columns,i)):(e[r].index=t.isNullOrUndefined(e[r].index)?i:e[r].index,i++);return i}function T(e,i,r){for(var n=0,o=e.length;n<o;n++){var s=void 0;"string"==typeof e[n]?s=new Ct({field:e[n]},r):e[n]instanceof Ct?s=e[n]:e[n].columns?(e[n].columns=T(e[n].columns,null,r),s=new Ct(e[n],r)):s=new Ct(e[n],r),s.type&&"checkbox"===s.type.toLowerCase()&&(s.allowReordering=!1),s.headerText=t.isNullOrUndefined(s.headerText)?s.foreignKeyValue||s.field||"":s.headerText,s.foreignKeyField=s.foreignKeyField||s.field,s.valueAccessor=("string"==typeof s.valueAccessor?t.getValue(s.valueAccessor,window):s.valueAccessor)||g,s.width=i&&t.isNullOrUndefined(s.width)?200:s.width,t.isNullOrUndefined(s.visible)&&(s.visible=!0),e[n]=s}return e}function z(e,i,r){var n=e.querySelector("span"),o=e.parentElement.getBoundingClientRect(),s=i.target.getBoundingClientRect();n.className=r,e.style.display="";var l=(t.isNullOrUndefined(i.clientY)?i.changedTouches[0].clientY:i.clientY)>e.offsetHeight+10;e.style.top=s.top-o.top+(l?-(e.offsetHeight+10):e.offsetHeight+10)+"px",e.style.left=D(e,i,s,o.left)+"px",l?(e.querySelector(".e-downtail").style.display="",e.querySelector(".e-uptail").style.display="none"):(e.querySelector(".e-downtail").style.display="none",e.querySelector(".e-uptail").style.display="")}function D(e,t,i,r){var n=e.offsetWidth/2,o=N(t).x;return o-i.left<n?i.left-r:i.right-o<n?i.right-r-2*n:o-r-n}function M(e){return e instanceof t.ChildProperty?t.getValue("properties",e):e}function O(e,t,i){for(var r=e;r&&(i?r.id!==t:!r.classList.contains(t));)r=r.parentElement;return r}function k(e,t){for(var i=-1,r=0,n=t.length;r<n;r++)if(t[r].isEqualNode(e)){i=r;break}return i}function A(e,t){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}function B(e){for(var t=[],i=0,r=e.length;i<r;i++)e[i].hasOwnProperty("properties")?t.push(e[i].properties):t.push(e[i]);return t}function P(e,i){for(var r=[].slice.call(e.querySelectorAll(i)),n=0;n<r.length;n++)t.remove(r[n])}function N(e){var i={};return i.x=t.isNullOrUndefined(e.clientX)?e.changedTouches[0].clientX:e.clientX,i.y=t.isNullOrUndefined(e.clientY)?e.changedTouches[0].clientY:e.clientY,i}function L(e){return e+Cn++}function q(e,t){for(var i=0,r=t.length;i<r;i++)r===t.length?e.appendChild(t[i]):e.appendChild(t[0]);return e}function H(e,t,i){for(var r=e,n=[];r;)(i?r.id===t:r.classList.contains(t))&&n.push(r),r=r.parentElement;return n}function U(e,r,n,o){if("Custom"===e){var s=n.customAggregate;return"string"==typeof s&&(s=t.getValue(s,window)),s?s.call(o,r,n):""}return n.field in r||r instanceof Array?i.DataUtil.aggregates[e.toLowerCase()](r,n.field):null}function j(){if(null!==wn)return wn;var e=document.createElement("div"),t=0;return e.style.cssText="width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth|0,document.body.removeChild(e),wn=t}function V(e){if(void 0!==fi)return fi;var i=t.createElement("table",{className:Mi,styles:"visibility: hidden"});i.innerHTML='<tr><td class="e-rowcell">A<td></tr>',e.appendChild(i);var r=i.querySelector("td").getBoundingClientRect();return e.removeChild(i),fi=Math.ceil(r.height)}function G(e){if(void 0!==mi)return fi;var i=t.createElement("table",{className:Mi,styles:"visibility: hidden"});i.innerHTML='<tr><td class="e-rowcell">A<td></tr>',e.appendChild(i);var r=i.querySelector("tr").getBoundingClientRect();return e.removeChild(i),r.height}function _(e){return e.split(".").length>1}function W(e){return void 0===e&&(e=""),e.replace(/\./g,"___")}function K(e){return void 0===e&&(e=""),e.replace(/___/g,".")}function Q(e,t,i){var r=O(i,Oi),n=!r||r&&!r.classList.contains("e-insertedrow");return"beginEdit"===t&&n?!(e.isIdentity||e.isPrimaryKey||!e.allowEditing):("add"!==t||!e.isIdentity)&&!(n&&!e.allowEditing&&!e.isIdentity&&!e.isPrimaryKey)}function X(e){var i=t.select("#"+e.element.id+"EditConfirm",e.element);return"Batch"===e.editSettings.mode&&t.selectAll(".e-updatedtd",e.element).length&&e.editSettings.showConfirmDialog&&(!i||i.classList.contains("e-popup-close"))}function J(e,t){e=e instanceof Array?e:[e];for(var i=0;i<e.length;i++)t?e[i].classList.add("e-wrap"):e[i].classList.remove("e-wrap")}function Y(e,i,r){var n,o=e.getService("valueFormatter");if("date"===i.type||"datetime"===i.type){if(n={type:i.type,skeleton:i.format},t.isBlazor()&&r){n.isServerRendered=r}"string"==typeof i.format&&"yMd"!==i.format&&(n.format=i.format)}switch(i.type){case"date":case"datetime":i.setFormatter(o.getFormatFunction(n)),i.setParser(o.getParserFunction(n));break;case"number":i.setFormatter(o.getFormatFunction({format:i.format})),i.setParser(o.getParserFunction({format:i.format}))}}function Z(e,i){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];for(var o=0,s=e.length;o<s;o++)i?(t.classList(e[o],r.slice(),[]),e[o].setAttribute("aria-selected","true")):(t.classList(e[o],[],r.slice()),e[o].removeAttribute("aria-selected"))}function $(e){for(var t={},i=[],r=0;r<e.length;r++)e[r]in t||(i.push(e[r].toString()),t[e[r]]=1);return i}function ee(e,t){var i=t.element.style.display;t.element.style.display="block";var n=t.width,o=r.calculateRelativeBasedPosition(e,t.element);t.element.style.display=i,t.element.style.top=o.top+e.getBoundingClientRect().height-5+"px";var s=o.left-n+e.clientWidth;t.element.style.left=s<1?n+s-16+"px":s+-4+"px"}function te(e,t){e.popup.element.style.zIndex=(t.zIndex+1).toString()}function ie(e){var i=e.querySelector(".e-frame"),r=i.previousSibling;i.classList.contains("e-check")?(r.checked=!1,t.classList(i,["e-uncheck"],["e-check"])):(r.checked=!0,t.classList(i,["e-check"],["e-uncheck"]))}function re(e,t){e.checked=t}function ne(e,i,r){var n=t.createElement("div",{className:r});return n.appendChild(i),n.setAttribute("uid",e),n}function oe(e,i){t.removeClass([e],["e-check","e-stop","e-uncheck"]),i?e.classList.add("e-check"):e.classList.add("e-uncheck")}function se(e,i,r){for(o=0;o<i.length;o++)t.setValue(i[o].field,le(i[o],r),e.foreignKeyData);for(var n=e.cells,o=0;o<n.length;o++)n[o].isForeignKey&&t.setValue("foreignKeyData",t.getValue(n[o].column.field,e.foreignKeyData),n[o])}function le(e,r,n,o){var s=e.foreignKeyField,l=t.isNullOrUndefined(n)?g(e.field,r,e):n;l=t.isNullOrUndefined(l)?"":l;var a=new i.Query,h=o||(e.dataSource instanceof i.DataManager&&e.dataSource.dataSource.json.length?e.dataSource.dataSource.json:e.columnData);return l.getDay?a.where(he({field:s,operator:"equal",value:l,matchCase:!1})):a.where(s,"==",l,!1),new i.DataManager(h).executeLocal(a)}function ae(e,t){var i;return t.some(function(t){return i=t,t.foreignKeyValue===e})&&i}function he(e,r){var n,o,s,l=t.extend({},M(e)),a=t.extend({},M(e));if(t.isNullOrUndefined(e.value))return n=new i.Predicate(l.field,l.operator,l.value,!1);var h=new Date(e.value);if("equal"===e.operator||"notequal"===e.operator){"datetime"===r?(o=new Date(h.setSeconds(h.getSeconds()-1)),s=new Date(h.setSeconds(h.getSeconds()+2)),e.value=new Date(h.setSeconds(s.getSeconds()-1))):(o=new Date(h.setHours(0)-1),s=new Date(h.setHours(24))),l.value=o,a.value=s,"equal"===e.operator?(l.operator="greaterthan",a.operator="lessthan"):"notequal"===e.operator&&(l.operator="lessthanorequal",a.operator="greaterthanorequal");var d=new i.Predicate(l.field,l.operator,l.value,!1),c=new i.Predicate(a.field,a.operator,a.value,!1);n="equal"===e.operator?d.and(c):d.or(c)}else"string"==typeof l.value&&(l.value=new Date(l.value)),n=new i.Predicate(l.field,l.operator,l.value,!1);return e.setProperties?e.setProperties({ejpredicate:n},!0):e.ejpredicate=n,n}function de(e,t,i){t=t&&i&&i.isRowDragable()?t+1:t;for(var r=e.cloneNode(!0),n=0;n<t;n++)r.removeChild(r.children[0]);for(var n=t,o=e.childElementCount;n<o;n++)e.removeChild(e.children[e.childElementCount-1]);return r}function ce(e){return e.enableVirtualization&&e.groupSettings.columns.length>0&&e.isVirtualAdaptive}function pe(e,i){if(void 0===e&&(e=""),e){for(var r=i,n=e.split("."),o=0;o<n.length&&!t.isNullOrUndefined(r);o++)r=r[n[o]];return r}}function ue(e,i){var r=new t.Internationalization;return"date"===i?"object"==typeof e?r.getDatePattern({type:e.type?e.type:"date",format:e.format},!1):t.isBlazor()?r.getDatePattern({type:"dateTime",format:e},!1):r.getDatePattern({type:"dateTime",skeleton:e},!1):"object"==typeof e?r.getDatePattern({type:e.type?e.type:"dateTime",format:e.format},!1):t.isBlazor()?r.getDatePattern({type:"dateTime",format:e},!1):r.getDatePattern({type:"dateTime",skeleton:e},!1)}function ge(e,t){for(var i={},r=0,n=e.getRowsObject();r<n.length;r++){var o=n[r];if(o.isExpand&&!o.isDetailRow){var s=e.allowPaging&&"AllPages"===e.printMode?o.index+e.pageSettings.currentPage*e.pageSettings.pageSize-e.pageSettings.pageSize:o.index;i[s]={},i[s].isExpand=!0,i[s].gridModel=fe(o.childGrid,t),i[s].gridModel.query=e.childGrid.query}}return i}function fe(e,t){void 0===t&&(t="Expanded");var i={};if(!e)return i;for(var r=e.isFrozenGrid()&&!e.getFrozenColumns(),n=0,o=yn.printGridProp;n<o.length;n++){var s=o[n];i[s]="columns"===s?B(r?e.getColumns():e[s]):"allowPaging"===s?"CurrentPage"===e.printMode:M(e[s])}return i.enableHover=!1,e.childGrid&&"None"!==t&&(i.expandedRows=ge(e,t)),i}function me(e,i,r,n){var o=e||{},s=arguments.length;n&&(s-=1);for(var l=1;l<s;l++)if(arguments[l])for(var a=arguments[l],h=Object.keys(Object.getPrototypeOf(a)).length?Object.keys(a).concat(ye(a)):Object.keys(a),d=0;d<h.length;d++){var c=o[h[d]],p=a[h[d]],u=void 0;n&&(t.isObject(p)||Array.isArray(p))?t.isObject(p)?(u=c||{},o[h[d]]=t.extend({},u,p,n)):(u=c||[],o[h[d]]=t.extend([],u,p,n)):o[h[d]]=p}return o}function ye(e){for(var t=[];Object.getPrototypeOf(e)&&Object.keys(Object.getPrototypeOf(e)).length;)t=t.concat(Object.keys(Object.getPrototypeOf(e))),e=Object.getPrototypeOf(e);return t}function ve(e){for(var t=0,i=0;i<e.length;i++){var r=Ce(e[i],0);t<r&&(t=r)}return t+1}function Ce(e,t){var i=t,r=[];if(e.columns){t++;for(var n=0;n<e.columns.length;n++)r[n]=Ce(e.columns[n],t);for(var o=0;o<r.length;o++)i<r[o]&&(i=r[o]);t=i}return t}function we(e,t){for(var i=0;i<t.length;i++){var r=e.enableColumnVirtualization?Ze(e,t[i].field).uid:e.getColumnByField(t[i].field).uid;t[i].uid=t[i].isForeignKey?ae(t[i].field,e.getForeignKeyColumns()).uid:r}}function be(e){var t=document.defaultView.getComputedStyle(e,null).getPropertyValue("transform").replace(/,/g,"");return{width:parseFloat(t.split(" ")[4]),height:parseFloat(t.split(" ")[5])}}function Se(e,t){e.classList.contains("e-bigger")&&t.classList.add("e-bigger")}function Re(e,i){if(e&&i){var r=t.closest(e,"."+Oi).getBoundingClientRect().height,n=t.closest(i,"."+Oi).getBoundingClientRect().height;r>n?i.style.height=r+"px":e.style.height=n+"px"}}function xe(e,t){var i=t.getContent().firstElementChild.offsetHeight;return e&&e.getBoundingClientRect().top>i}function Fe(e,t){return e&&e.getBoundingClientRect().top<t}function Ee(e,t){var i=t.getRowHeight(),r=t.getContent().firstElementChild.scrollTop/i;return e<r+t.getContent().firstElementChild.offsetHeight/i&&e>r}function Ie(e,t){var i,r=e.getPrimaryKeyFieldNames()[0];return e.getCurrentViewRecords().filter(function(e,n){e[r]===t[r]&&(i=n)}),i}function Te(e,t){var r=ze(t),n=new i.Deferred;return r.dataSource=n.resolve,r.action=e,{state:r,deffered:n}}function ze(e){var t=new i.UrlAdaptor,r=new i.DataManager({url:"",adaptor:new i.UrlAdaptor}),n=t.processQuery(r,e);return JSON.parse(n.data)}function De(e){for(var i=e.getVisibleColumns(),r=0,n=0,o=0;o<i.length;o++)t.isUndefined(i[o].width)?n++:-1!==i[o].width.toString().indexOf("%")&&r++;return("auto"===e.width||"string"==typeof e.width&&-1!==e.width.indexOf("%"))&&"chrome"!==t.Browser.info.name&&!e.groupSettings.showGroupedColumn&&e.groupSettings.columns.length&&r&&!n}function Me(e,t,i,r){for(var n=r||0,o=0;o<t.length;o++)if(t[o].isDataRow){t[o].index=n,t[o].isAltRow=!!e.enableAltRow&&n%2!=0,i[o].setAttribute(Hi,n.toString()),t[o].isAltRow?i[o].classList.add("e-altrow"):i[o].classList.remove("e-altrow");for(var s=0;s<i[o].cells.length;s++)i[o].cells[s].setAttribute("index",n.toString());n++}t.length||e.renderModule.emptyRow(!0)}function Oe(e,t,i,r){var n=e.dataToBeUpdated[i].concat(t[i]).reduce(function(e,t){return e[t[r]]=void 0===e[t[r]]?t:Object.assign(e[t[r]],t),e},{});e.dataToBeUpdated[i]=Object.keys(n).map(function(e){return n[e]})}function ke(e){if(e.isFrozenGrid()){e.contentModule.rowElements=[].slice.call(e.element.querySelectorAll(".e-movableheader .e-row, .e-movablecontent .e-row"));var t=e.getFrozenMode()===Pi?".e-frozen-left-header .e-row, .e-frozen-left-content .e-row":".e-frozenheader .e-row, .e-frozencontent .e-row";e.contentModule.freezeRowElements=[].slice.call(e.element.querySelectorAll(t)),e.getFrozenMode()===Pi&&(e.contentModule.frozenRightRowElements=[].slice.call(e.element.querySelectorAll(".e-frozen-right-header .e-row, .e-frozen-right-content .e-row")))}else e.contentModule.rowElements=[].slice.call(e.element.querySelectorAll(".e-row:not(.e-addedrow)"))}function Ae(e,t,i){var r=e.getFrozenLeftCount(),n=e.getMovableColumnsCount(),o=e.getFrozenRightColumnsCount(),s=e.getFrozenMode(),l=e.isRowDragable()?1:0,a="Right"===s?r+n:r+n+l,h="Right"===s?r:r+l,d="Right"===s?t.length-o-l:o?t.length-o:t.length;return i===Li?t=t.slice(0,r?r+l:t.length):i===Ni?t=t.slice(a,t.length):"movable"===i&&(t=t.slice(h,d)),t}function Be(e,t,i,r,n){(i[0].length||r)&&(n?t(Li,i[0],n[0]):t(Li,i[0])),e.isFrozenGrid()&&(i[1].length||r)&&(n?t("movable",i[1],n[1]):t("movable",i[1])),e.getFrozenMode()!==Pi&&"Right"!==e.getFrozenMode()||!i[2].length&&!r||(n?t(Ni,i[2],n[2]):t(Ni,i[2]))}function Pe(e){return["Right"!==e.getFrozenMode()?e.getRowsObject():[],e.getMovableRowsObject(),e.getFrozenRightRowsObject()]}function Ne(e){return["Right"!==e.getFrozenMode()?e.getAllDataRows(!0):[],e.getAllMovableDataRows(!0),e.getAllFrozenRightDataRows(!0)]}function Le(e,t,i){for(var r=e.children.length,n=0,o=0;o<r;o++,n++)o>=t&&o<i||(e.removeChild(e.children[n]),n--)}function qe(e,t,i){return"movable"===t.getFreezeTableName()?[].slice.call(e.getMovableDataRows()[i].getElementsByClassName(bi)):t.getFreezeTableName()===Ni?[].slice.call(e.getFrozenRightDataRows()[i].getElementsByClassName(bi)):[].slice.call(e.getDataRows()[i].getElementsByClassName(bi))}function He(e,t,i,r){var n=e.getFrozenLeftCount(),o=e.getMovableColumnsCount();return r="movable"===t.getFreezeTableName()?r-n:t.getFreezeTableName()===Ni?r-(n+o):r,qe(e,t,i)[r]}function Ue(e,t,i,r,n,o,s){s?i[W(e.field)]=e.validationRules:e.getFreezeTableName()===Li||!t&&e.getFreezeTableName()===Ni||1===o?i[W(e.field)]=e.validationRules:"movable"!==e.getFreezeTableName()&&e.getFreezeTableName()?e.getFreezeTableName()===Ni&&(n[W(e.field)]=e.validationRules):r[W(e.field)]=e.validationRules}function je(e){var t;return e.isFrozenGrid()&&(t=e.frozenRows&&"Top"===e.editSettings.newRowPosition?e.getMovableHeaderTbody():e.getMovableContentTbody()),t}function Ve(e){var t;return e.getFrozenMode()===Pi&&(t=e.frozenRows&&"Top"===e.editSettings.newRowPosition?e.getFrozenRightHeaderTbody():e.getFrozenRightContentTbody()),t}function Ge(e,t,i,r,n,o,s){e&&r&&s(e,r),t&&n&&s(t,n),i&&o&&s(i,o)}function _e(e,i,r){var n,o=new t.Internationalization;if("number"===i)try{n=o.getNumberPattern({format:e,currency:this.currency,useGrouping:!0},!0)}catch(t){n=e}else if("date"===i||"time"===i||"datetime"===i)try{if(n=o.getDatePattern({skeleton:e,type:i},r),t.isNullOrUndefined(n))throw"error"}catch(t){try{n=o.getDatePattern({format:e,type:i},r)}catch(t){n=e}}else n=e;if("number"!==i){var s={G:"",H:"h",c:"d","'":'"'," a":" AM/PM",yy:"yy",y:"yyyy",EEEE:"dddd",E:"ddd"};n=n.replace(/G|H|c|'| a|yy|y|EEEE|E/g,function(e){return s[e]})}return n}function We(e){if(e.enableAdaptiveUI)for(var t=document.getElementsByClassName("e-responsive-dialog"),i=0;i<t.length;i++)t[i].classList.add("e-bigger")}function Ke(e,t){for(var i,r=e.split(".").length,n=e.split("."),o=t,s=0;s<r;s++)o=i=o[n[s]];return i}function Qe(e,i,r,n,o,s){for(var l=Object.keys(e),a=0;a<l.length;a++){var h=e[l[a]].querySelectorAll("td.e-rowcell")[i];if(e[l[a]].querySelectorAll("td.e-rowcell").length&&h)if(t.setStyleAttribute(e[l[a]].querySelectorAll("td.e-rowcell")[i],{display:r}),e[l[a]].querySelectorAll("td.e-rowcell")[i].classList.contains("e-hide")&&t.removeClass([e[l[a]].querySelectorAll("td.e-rowcell")[i]],["e-hide"]),s&&o.isRowDragable()){var d=o.getFrozenColumns()?i:i+1;n[l[a]].cells[d].visible=""===r}else n[l[a]].cells[i].visible=""===r}}function Xe(e,t,i,r){for(var n=0,o=t;n<o.length;n++){var s=o[n];i?e.on(s.event,s.handler,r):e.off(s.event,s.handler)}}function Je(e,t,i,r){var n=W(t.field);return r=Object.assign(r,{id:e.element.id+n,name:n,"e-mappinguid":t.uid}),e.createElement("input",{className:i,attrs:r})}function Ye(e,t){for(var i,r=0,n=e.columnModel;r<n.length;r++){var o=n[r];if(o.uid===t){i=o;break}}return i}function Ze(e,t){for(var i,r=0,n=e.columnModel;r<n.length;r++){var o=n[r];if(o.field===t){i=o;break}}return i}function $e(e,t){for(var i=0;i<e.length;i++)for(var r=0;r<e[i].columns.length;r++)t(e[i].columns[r],e[i])}function et(e,t,i){var r="Dialog"!==t,n=ue(e.column.format,e.column.type),o=pe(e.column.field,e.rowData);return o=o?new Date(o):null,{floatLabelType:r?"Never":"Always",value:o,format:n,placeholder:r?"":e.column.headerText,enableRtl:i,enabled:Q(e.column,e.requestType,e.element)}}function tt(e,t,i,r,n,o,s,l){r.clearSelection(),e.startIndex=0;var a=new Vi(o,null,r),h=n.generateRows(t,e);e.renderMovableContent?(s.vgenerator.movableCache[1]=h,h=r.getMovableRowsObject()):e.renderFrozenRightContent||e.renderMovableContent?e.renderFrozenRightContent&&(s.vgenerator.frozenRightCache[1]=h,h=r.getFrozenRightRowsObject()):(s.vgenerator.cache[1]=h,h=r.getRowsObject());var d=e.renderMovableContent||e.renderFrozenRightContent?e.renderMovableContent?r.getHeaderContent().querySelector("."+Ii).querySelector(Ui):r.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(Ui):r.getHeaderContent().querySelector("."+zi).querySelector(Ui);d.innerHTML="";for(var c=0;c<r.frozenRows;c++)if(d.appendChild(a.render(h[c],r.getColumns())),i.indexOf(c)>-1){h[c].isSelected=!0;for(var p=0;p<h[c].cells.length;p++)h[c].cells[p].isSelected=!0}e.renderMovableContent?l.mvblRows=s.vgenerator.movableCache[1]:e.renderMovableContent||e.renderFrozenRightContent?e.renderFrozenRightContent&&(l.frRows=s.vgenerator.frozenRightCache[1]):l.frzRows=s.vgenerator.cache[1],e.renderMovableContent=!e.renderMovableContent&&!e.renderFrozenRightContent,e.renderFrozenRightContent=r.getFrozenMode()===Pi&&!e.renderMovableContent&&!e.renderFrozenRightContent,(e.renderMovableContent||e.renderFrozenRightContent)&&(tt(e,t,i,r,n,o,s,l),e.renderMovableContent||e.renderFrozenRightContent||(e.isFrozenRowsRender=!1))}function it(e,i,r){for(var n=[],o=0;o<e.length;o++)n.push(t.extend({},e[o])),n[o].cells=Ae(r,n[o].cells,i);return n}function rt(e,t,i){var r,n=[];e===Li?r=t.vgenerator.cache:"movable"===e?r=t.vgenerator.movableCache:e===Ni&&(r="Right"===i.getFrozenMode()?t.vgenerator.cache:t.vgenerator.frozenRightCache);for(var o=Object.keys(r),s=0;s<o.length;s++)n=n.concat(it(r[o[s]],e,i));return n}function nt(e,t){for(var i=Object.keys(t.vgenerator.cache),r=Object.keys(t.vgenerator.movableCache),n=Object.keys(t.vgenerator.frozenRightCache),o=0;o<i.length;o++)ot(e,t.vgenerator.cache[i[o]]);for(o=0;o<r.length;o++)ot(e,t.vgenerator.movableCache[r[o]]);for(o=0;o<n.length;o++)ot(e,t.vgenerator.frozenRightCache[n[o]])}function ot(e,t){for(var i=t.filter(function(t){return e.clearAll||e.uid===t.uid}),r=0;r<i.length;r++){i[r].isSelected=e.set;for(var n=i[r].cells,o=0;o<n.length;o++)n[o].isSelected=e.set}}function st(e,t,i,r,n){e.appendContent(i,r,n),t.refreshFrozenScrollbar()}function lt(e,i,r,n,o){var s=[];s=e.vgenerator.generateRows(i,r).map(function(e){return t.extend({},e)});var l=n.generateRows(i,r,s);return o.frozenRows&&"delete"===r.requestType&&1===o.pageSettings.currentPage&&(l=l.slice(o.frozenRows)),l}function at(e,t,i,r,n){var o=e.virtualInfo.blockIndexes,s=e.virtualInfo.columnIndexes,l=e.virtualInfo.page;e.virtualInfo.blockIndexes=[1,2],e.virtualInfo.page=1,e.renderMovableContent||(e.virtualInfo.columnIndexes=[]);var a=i.getCurrentViewRecords().length;n=i.renderModule.data.dataManager.dataSource.json.slice(0,a);var h=ht(t.vgenerator.generateRows(n,e),i,e,r);return e.virtualInfo.blockIndexes=o,e.virtualInfo.columnIndexes=s,e.virtualInfo.page=l,h.splice(0,i.frozenRows)}function ht(e,t,i,r){var n;n=i.renderMovableContent?"movable":i.renderFrozenRightContent?"frozen-right":"frozen-left";for(var o=0,s=e.length;o<s;o++)e[o].cells=Ae(t,e[o].cells,n);return e}function dt(e){var t=!1;return e&&(t="virtualscroll"===e.requestType&&"X"===e.currentInfo.sentinelInfo.axis),t}function ct(e,t){var i=dt(e)?t.getMovableVirtualHeader():t.getHeaderContent();return i?[].slice.call(i.querySelectorAll(".e-headercell:not(.e-stackedheadercell)")):[]}function pt(e,t){return dt(e)?t.getMovableVirtualHeader().querySelector("."+Mi):t.getFrozenVirtualHeader().querySelector("."+Mi)}function ut(e,t){return e=t.columns.slice(0,t.getFrozenColumns()).concat(e)}function gt(e,i,r){return dt(i)||(t.isNullOrUndefined(e)||(e.id="content-"+e.id),r.colgroup=e),r.colgroup}function ft(e,t){e.virtualRenderer.vgenerator.cache[1]?e.virtualRenderer.vgenerator.cache[1][t]=e.frzRows[t]:e.virtualRenderer.vgenerator.cache[1]=e.frzRows,e.virtualRenderer.vgenerator.movableCache[1]?e.virtualRenderer.vgenerator.movableCache[1][t]=e.mvblRows[t]:e.virtualRenderer.vgenerator.movableCache[1]=e.mvblRows}function mt(e,t,r,n){var o=e.dataSource instanceof i.DataManager&&!e.dataSource.dataSource.offline,s={container:t.content,pageHeight:2*t.getBlockHeight(),debounceEvent:o,axes:e.enableColumnVirtualization?["X","Y"]:["Y"],scrollbar:r,movableContainer:n};t.observer=new no(t.virtualEle.wrapper,s,t.virtualEle.movableWrapper)}var yt=function(){function e(e){this.intl=new t.Internationalization,t.isNullOrUndefined(e)||(this.intl.culture=e)}return e.prototype.getFormatFunction=function(e){return e.type?this.intl.getDateFormat(e):this.intl.getNumberFormat(e)},e.prototype.getParserFunction=function(e){return e.type?this.intl.getDateParser(e):this.intl.getNumberParser(e)},e.prototype.fromView=function(e,i,r){return"date"!==r&&"datetime"!==r&&"number"!==r||t.isNullOrUndefined(i)?e:i(e)},e.prototype.toView=function(e,i){var r=e;return t.isNullOrUndefined(i)||t.isNullOrUndefined(e)||(r=i(e)),r},e.prototype.setCulture=function(e){t.isNullOrUndefined(e)||t.setCulture(e)},e}(),vt=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},Ct=function(){function e(e,r){var n=this;this.disableHtmlEncode=!0,this.allowSorting=!0,this.allowResizing=!0,this.allowFiltering=!0,this.allowGrouping=!0,this.allowReordering=!0,this.showColumnMenu=!0,this.enableGroupByFormat=!1,this.allowEditing=!0,this.filter={},this.showInColumnChooser=!0,this.edit={},this.allowSearching=!0,this.autoFit=!1,this.sortDirection="Descending",this.getEditTemplate=function(){return n.editTemplateFn},this.getFilterTemplate=function(){return n.filterTemplateFn},t.merge(this,e),this.parent=r,"none"===this.type?this.type=t.isBlazor()&&!t.isNullOrUndefined(this.template)&&t.isNullOrUndefined(this.field)?"none":null:this.type&&(this.type="string"==typeof this.type?this.type.toLowerCase():void 0),this.editType&&(this.editType=this.editType.toLowerCase()),t.isNullOrUndefined(this.uid)&&(this.uid=L("grid-column"));var o=new yt;if(e.format&&(e.format.skeleton||e.format.format)&&(this.setFormatter(o.getFormatFunction(t.extend({},e.format))),this.setParser(o.getParserFunction(e.format))),this.toJSON=function(){for(var e={},i=["filter","dataSource",t.isBlazor()?" ":"headerText","template","headerTemplate","edit","editTemplate","filterTemplate","commandsTemplate","parent"],r=Object.keys(n),o=0;o<r.length;o++)if("columns"===r[o]){e[r[o]]=[];for(var s=0;s<n[r[o]].length;s++)e[r[o]].push(n[r[o]][s].toJSON())}else i.indexOf(r[o])<0&&(e[r[o]]=n[r[o]]);return e},this.field||(this.allowFiltering=!1,this.allowGrouping=!1,this.allowSorting=!1,this.columns&&(this.allowResizing=this.columns.some(function(e){return e.allowResizing}))),this.commands&&!this.textAlign&&(this.textAlign="Right"),(this.template||this.commandsTemplate)&&(this.templateFn=x(this.template||this.commandsTemplate)),this.headerTemplate&&(this.headerTemplateFn=x(this.headerTemplate)),!t.isNullOrUndefined(this.filter)&&this.filter.itemTemplate&&(this.fltrTemplateFn=x(this.filter.itemTemplate)),this.editTemplate&&(this.editTemplateFn=x(this.editTemplate)),this.filterTemplate&&(this.filterTemplateFn=x(this.filterTemplate)),this.isForeignColumn()&&(t.isNullOrUndefined(this.editType)||"dropdownedit"===this.editType||"defaultedit"===this.editType)&&(this.editType="dropdownedit",this.edit.params=t.extend({dataSource:this.dataSource,query:new i.Query,fields:{value:this.foreignKeyField||this.field,text:this.foreignKeyValue}},this.edit.params)),this.sortComparer){var s=this.sortComparer;this.sortComparer=function(e,t,i,r){if("string"==typeof s&&(s=pe(s,window)),"Descending"===this.sortDirection){var n=e;e=t,t=n;var o=i;i=r,r=o}return s(e,t,i,r)}}!this.sortComparer&&this.isForeignColumn()&&(this.sortComparer=function(e,t){return e=pe(n.foreignKeyValue,le(n,{},e)[0]),t=pe(n.foreignKeyValue,le(n,{},t)[0]),"Descending"===n.sortDirection?i.DataUtil.fnDescending(e,t):i.DataUtil.fnAscending(e,t)})}return e.prototype.getSortDirection=function(){return this.sortDirection},e.prototype.setSortDirection=function(e){this.sortDirection=e},e.prototype.getFreezeTableName=function(){return this.freezeTable},e.prototype.setProperties=function(e){for(var t=Object.keys(e),i=0;i<t.length;i++)this[t[i]]=e[t[i]],this.parent&&this.parent.isReact&&"template"===t[i]&&this.parent.refreshReactColumnTemplateByUid(this.uid)},e.prototype.isForeignColumn=function(){return!(!this.dataSource||!this.foreignKeyValue)},e.prototype.getFormatter=function(){return this.formatFn},e.prototype.setFormatter=function(e){this.formatFn=e},e.prototype.getParser=function(){return this.parserFn},e.prototype.setParser=function(e){this.parserFn=e},e.prototype.getColumnTemplate=function(){return this.templateFn},e.prototype.getHeaderTemplate=function(){return this.headerTemplateFn},e.prototype.getFilterItemTemplate=function(){return this.fltrTemplateFn},e.prototype.getDomSetter=function(){return this.disableHtmlEncode?"textContent":"innerHTML"},e}(),wt=function(){function e(){}return vt([t.Property()],e.prototype,"title",void 0),vt([t.Property()],e.prototype,"type",void 0),vt([t.Property()],e.prototype,"buttonOption",void 0),e}(),bt="actionBegin",St="actionComplete",Rt="dataBound",xt="columnDragStart",Ft="columnDrag",Et="columnDrop",It="rowDragStartHelper",Tt="rowDragStart",zt="rowDrag",Dt="rowDrop",Mt="initial-load",Ot="initial-end",kt="data-ready",At="content-ready",Bt="ui-update",Pt="on-empty",Nt="inbound-model-changed",Lt="model-changed",qt="colgroup-refresh",Ht="header-refreshed",Ut="reorder-complete",jt="beforecellfocused",Vt="key-pressed",Gt="click",_t="destroy",Wt="column-visible-changed",Kt="column-position-changed",Qt="rows-added",Xt="rows-removed",Jt="column-drag-stop",Yt="header-drop",Zt="datasource-modified",$t="refresh-virtual-block",ei="auto-col",ti="update-data",ii="prevent-batch",ri="dialog-destroy",ni="add-delete-Action",oi="freezerender",si="hierarchyprint",li="expandchildgrid",ai="row-position-changed",hi="columns-prepared",di="cbox-filter-complete",ci="filter-Prevent",pi="get-virtual-data",ui="refresh-infinite-mode-blocks",gi="refreshResizeHandlers";!function(e){e[e.Data=0]="Data",e[e.Header=1]="Header",e[e.Summary=2]="Summary",e[e.GroupSummary=3]="GroupSummary",e[e.CaptionSummary=4]="CaptionSummary",e[e.Filter=5]="Filter",e[e.Indent=6]="Indent",e[e.GroupCaption=7]="GroupCaption",e[e.GroupCaptionEmpty=8]="GroupCaptionEmpty",e[e.Expand=9]="Expand",e[e.HeaderIndent=10]="HeaderIndent",e[e.StackedHeader=11]="StackedHeader",e[e.DetailHeader=12]="DetailHeader",e[e.DetailExpand=13]="DetailExpand",e[e.CommandColumn=14]="CommandColumn",e[e.DetailFooterIntent=15]="DetailFooterIntent",e[e.RowDragIcon=16]="RowDragIcon",e[e.RowDragHIcon=17]="RowDragHIcon"}(e.CellType||(e.CellType={})),function(e){e[e.Header=0]="Header",e[e.Content=1]="Content",e[e.Summary=2]="Summary"}(e.RenderType||(e.RenderType={})),function(e){e[e.Add=0]="Add",e[e.Edit=1]="Edit",e[e.Update=2]="Update",e[e.Delete=3]="Delete",e[e.Cancel=4]="Cancel",e[e.Print=5]="Print",e[e.Search=6]="Search",e[e.ColumnChooser=7]="ColumnChooser",e[e.PdfExport=8]="PdfExport",e[e.ExcelExport=9]="ExcelExport",e[e.CsvExport=10]="CsvExport",e[e.WordExport=11]="WordExport"}(e.ToolbarItem||(e.ToolbarItem={})),function(e){e[e.isEdit=0]="isEdit",e[e.isAdd=1]="isAdd",e[e.isSort=2]="isSort",e[e.isFilter=3]="isFilter"}(e.ResponsiveDialogAction||(e.ResponsiveDialogAction={})),function(e){e[e.isInitial=0]="isInitial",e[e.isSearch=1]="isSearch"}(e.ResponsiveToolbarAction||(e.ResponsiveToolbarAction={}));var fi,mi,yi=function(){function e(e,t){this.dataState={isPending:!1,resolver:null,group:[]},this.foreignKeyDataState={isPending:!1,resolver:null},this.parent=e,this.serviceLocator=t,this.initDataManager(),this.parent.isDestroyed||"foreignKey"===this.getModuleName()||(this.parent.on(Qt,this.addRows,this),this.parent.on(ai,this.reorderRows,this),this.parent.on(Xt,this.removeRows,this),this.parent.on(Zt,this.initDataManager,this),this.parent.on(_t,this.destroy,this),this.parent.on(ti,this.crudActions,this),this.parent.on(ni,this.getData,this),this.parent.on(ei,this.refreshFilteredCols,this),this.parent.on(hi,this.refreshFilteredCols,this))}return e.prototype.reorderRows=function(e){this.dataManager.dataSource.json.splice(e.toIndex,0,this.dataManager.dataSource.json.splice(e.fromIndex,1)[0])},e.prototype.getModuleName=function(){return"data"},e.prototype.initDataManager=function(){var e=this.parent;this.dataManager=e.dataSource instanceof i.DataManager?e.dataSource:t.isNullOrUndefined(e.dataSource)?new i.DataManager:new i.DataManager(e.dataSource),!e.isAngular||e.query instanceof i.Query?(this.isQueryInvokedFromData=!0,e.query=e.query instanceof i.Query?e.query:new i.Query):e.setProperties({query:new i.Query},!0)},e.prototype.generateQuery=function(e){var t=this.parent.getQuery().clone();if("ExcludeHidden"===this.parent.columnQueryMode)t.select(this.parent.getColumns().filter(function(e){return!(!0!==e.isPrimaryKey&&!1===e.visible||void 0===e.field)}).map(function(e){return e.field}));else if("Schema"===this.parent.columnQueryMode){for(var i=[],r=this.parent.columns,n=0;n<r.length;n++)i.push(r[n].field);t.select(i)}return this.filterQuery(t),this.searchQuery(t),this.aggregateQuery(t),this.sortQuery(t),ce(this.parent)?this.virtualGroupPageQuery(t):this.pageQuery(t,e),this.groupQuery(t),t},e.prototype.aggregateQuery=function(e){for(var t=this.parent.aggregates,i=0;i<t.length;i++)for(var r=t[i],n=0;n<r.columns.length;n++)for(var o=r.columns[n],s=o.type instanceof Array?o.type:[o.type],l=0;l<s.length;l++)e.aggregate(s[l].toLowerCase(),o.field);return e},e.prototype.virtualGroupPageQuery=function(e){if(e.queries.length)for(var t=0;t<e.queries.length;t++)"onPage"===e.queries[t].fn&&e.queries.splice(t,1);return e},e.prototype.pageQuery=function(e,i){var r=this.parent,n={query:e,skipPage:!1};if(r.notify("set-virtual-page-query",n),n.skipPage)return e;if((r.allowPaging||r.enableVirtualization||r.enableInfiniteScrolling)&&!0!==i){if(r.pageSettings.currentPage=Math.max(1,r.pageSettings.currentPage),r.pageSettings.pageCount<=0&&(r.pageSettings.pageCount=8),r.pageSettings.pageSize<=0&&(r.pageSettings.pageSize=12),e.queries.length)for(var o=0;o<e.queries.length;o++)"onPage"===e.queries[o].fn&&e.queries.splice(o,1);!t.isNullOrUndefined(r.infiniteScrollModule)&&r.enableInfiniteScrolling?this.parent.notify("infinite-page-query",e):e.page(r.pageSettings.currentPage,r.pageSettings.pageSize)}return e},e.prototype.groupQuery=function(e){var t=this.parent;if(t.allowGrouping&&t.groupSettings.columns.length){this.parent.groupSettings.enableLazyLoading&&e.lazyLoad.push({key:"isLazyLoad",value:this.parent.groupSettings.enableLazyLoading});for(var i=t.groupSettings.columns,r=0,n=i.length;r<n;r++){var o=this.getColumnByField(i[r]);o||this.parent.log("initial_action",{moduleName:"group",columnName:i[r]});var s=o.enableGroupByFormat,l=o.format;s?e.group(i[r],this.formatGroupColumn.bind(this),l):e.group(i[r],null)}}return e},e.prototype.sortQuery=function(e){var t=this.parent;if((t.allowSorting||t.allowGrouping)&&t.sortSettings.columns.length){for(var i=t.sortSettings.columns,r=[],n=i.length-1;n>-1;n--){if(!(l=this.getColumnByField(i[n].field)))return this.parent.log("initial_action",{moduleName:"sort",columnName:i[n].field}),e;l.setSortDirection(i[n].direction);var o=i[n].direction;l.sortComparer&&(this.parent.log("grid_sort_comparer"),o=this.isRemote()?i[n].direction:l.sortComparer.bind(l)),-1===t.groupSettings.columns.indexOf(i[n].field)?l.isForeignColumn()||l.sortComparer?e.sortByForeignKey(l.field,o,void 0,i[n].direction.toLowerCase()):e.sortBy(l.field,o):r.push({direction:o,field:l.field})}for(var n=0,s=r.length;n<s;n++)if("string"==typeof r[n].direction)e.sortBy(r[n].field,r[n].direction);else{var l=this.getColumnByField(r[n].field);e.sortByForeignKey(r[n].field,r[n].direction,void 0,l.getSortDirection().toLowerCase())}}return e},e.prototype.searchQuery=function(e,t,r){var n=this.parent.searchSettings,o=n.fields.length?n.fields:this.getSearchColumnFieldNames(),s=[],l=!1;if(this.parent.searchSettings.key.length){l=this.parent.getForeignKeyColumns().some(function(e){return o.indexOf(e.field)>-1});var a=r?t.dataSource.adaptor:this.dataManager.adaptor;if(l||a.getModuleName&&"ODataV4Adaptor"===a.getModuleName()){o=r?[t.foreignKeyValue]:o;for(var h=0;h<o.length;h++){var d=r?t:this.getColumnByField(o[h]);d.isForeignColumn()&&!r?s=this.fGeneratePredicate(d,s):s.push(new i.Predicate(o[h],n.operator,n.key,n.ignoreCase,n.ignoreAccent))}var c=i.Predicate.or(s);c.key=n.key,e.where(c)}else e.search(n.key,o,n.operator,n.ignoreCase,n.ignoreAccent)}return e},e.prototype.filterQuery=function(e,r,n){var o,s=this.parent,l=[],a=[],h=this.parent.getForeignKeyColumns();if(s.allowFiltering&&s.filterSettings.columns.length){for(var d=r||s.filterSettings.columns,c={},p=0,u=s.getColumns();p<u.length;p++)c[(v=u[p]).field]=v.filter.type?v.filter.type:s.filterSettings.type;for(var g=[],f=[],m=0,y=d;m<y.length;m++){var v=y[m],C=s.getColumnByField(v.field);t.isNullOrUndefined(v.type)&&C&&("date"===C.type||"datetime"===C.type)&&(v.type=s.getColumnByField(v.field).type),v.isForeignKey?g.push(v):f.push(v)}if(f.length){for(var w=0,b=f.length;w<b;w++)f[w].uid=f[w].uid||this.parent.grabColumnByFieldFromAllCols(f[w].field).uid;for(var S=bn.getPredicate(f),R=0,x=Object.keys(S);R<x.length;R++){D=x[R];l.push(S[D])}}if(g.length)for(var F=0,E=g;F<E.length;F++){(v=E[F]).uid=v.uid||this.parent.grabColumnByFieldFromAllCols(v.field).uid;var I=this.parent.grabColumnByUidFromAllCols(v.uid);if(I||this.parent.log("initial_action",{moduleName:"filter",columnName:v.field}),I.isForeignColumn()&&ae(v.field,h)&&!n)a.push(v),I.columnData.length||(o=!0),l=this.fGeneratePredicate(I,l);else for(var S=bn.getPredicate(d),T=0,z=Object.keys(S);T<z.length;T++){var D=z[T];l.push(S[D])}}l.length&&!o?e.where(i.Predicate.and(l)):this.parent.notify("showEmptyGrid",{})}return e},e.prototype.fGeneratePredicate=function(e,t){var i={};return e&&(this.parent.notify("generateQuery",{predicate:i,column:e}),i.predicate.predicates.length&&t.push(i.predicate)),t},e.prototype.getData=function(e,i){var r=this;void 0===e&&(e={requestType:""});var n=this.getKey(e.foreignKeyData&&Object.keys(e.foreignKeyData).length?e.foreignKeyData:this.parent.getPrimaryKeyFieldNames());if(this.parent.log("datasource_syntax_mismatch",{dataState:this.parent}),this.parent.dataSource&&"result"in this.parent.dataSource)return this.eventPromise(e,i,n).promise;var o=void 0;switch(e.requestType){case"delete":if(i=i||this.generateQuery(),1===Object.keys(e.data).length)o=this.dataManager.remove(n,e.data[0],i.fromTable,i);else{var s={addedRecords:[],deletedRecords:[],changedRecords:[]};s.deletedRecords=e.data,o=this.dataManager.saveChanges(s,n,i.fromTable,i.requiresCount())}break;case"save":i=i||this.generateQuery(),e.index=t.isNullOrUndefined(e.index)?0:e.index,o=this.dataManager.insert(e.data,i.fromTable,i,e.index)}return e.promise=o,!o||Array.isArray(o)||o.hasOwnProperty("deletedRecords")?this.insert(i,e):o.then(function(){return r.insert(i,e)})},e.prototype.insert=function(e,t){return"save"===t.requestType&&this.parent.notify("recordAdded",t),this.executeQuery(e)},e.prototype.executeQuery=function(e){var t=this;if(this.dataManager.ready){var r=new i.Deferred;return this.dataManager.ready.then(function(){t.dataManager.executeQuery(e).then(function(e){r.resolve(e)})}).catch(function(e){r.reject(e)}),r.promise}return this.dataManager.executeQuery(e)},e.prototype.formatGroupColumn=function(e,i){var r=this.serviceLocator,n=this.getColumnByField(i),o=e;return n.type||(n.type=o.getDay?o.getHours()>0||o.getMinutes()>0||o.getSeconds()>0||o.getMilliseconds()>0?"datetime":"date":typeof e),t.isNullOrUndefined(n.getFormatter())&&Y(r,n),yt.prototype.toView(e,n.getFormatter())},e.prototype.crudActions=function(e){var t=this.generateQuery(),i=null,r="promise",n=this.getKey(e.foreignKeyData&&Object.keys(e.foreignKeyData).length?e.foreignKeyData:this.parent.getPrimaryKeyFieldNames());switch(this.parent.dataSource&&"result"in this.parent.dataSource&&this.eventPromise(e,t,n),e.requestType){case"save":i=this.dataManager.update(n,e.data,t.fromTable,t,e.previousData)}e[r]=i||e[r],this.parent.notify("crud-Action",e)},e.prototype.saveChanges=function(e,t,r,n){if(void 0===n&&(n=this.generateQuery()),n.requiresCount(),"result"in this.parent.dataSource){var o=new i.Deferred,s={requestType:"batchsave",changes:e,key:t,query:n,endEdit:o.resolve};return this.setState({isPending:!0,resolver:o.resolve}),this.parent.trigger("dataSourceChanged",s),o.promise}return this.dataManager.saveChanges(e,t,n.fromTable,n,r)},e.prototype.getKey=function(e){if(e&&e.length)return e[0]},e.prototype.isRemote=function(){return!0!==this.dataManager.dataSource.offline&&void 0!==this.dataManager.dataSource.url&&""!==this.dataManager.dataSource.url},e.prototype.addRows=function(e){for(var t=e.records.length;t>0;t--)this.dataManager.dataSource.json.splice(e.toIndex,0,e.records[t-1])},e.prototype.removeRows=function(e){var t=this.dataManager.dataSource.json;this.dataManager.dataSource.json=t.filter(function(t){return-1===e.records.indexOf(t)})},e.prototype.getColumnByField=function(e){var t;return this.parent.columnModel.some(function(i){return t=i,i.field===e})&&t},e.prototype.destroy=function(){this.parent.isDestroyed||(this.parent.off(Qt,this.addRows),this.parent.off(Xt,this.removeRows),this.parent.off(Zt,this.initDataManager),this.parent.off(_t,this.destroy),this.parent.off(ti,this.crudActions),this.parent.off(ni,this.getData),this.parent.off(ei,this.refreshFilteredCols),this.parent.off(hi,this.refreshFilteredCols))},e.prototype.getState=function(){return this.dataState},e.prototype.setState=function(e){return this.dataState=e},e.prototype.getForeignKeyDataState=function(){return this.foreignKeyDataState},e.prototype.setForeignKeyDataState=function(e){this.foreignKeyDataState=e},e.prototype.getStateEventArgument=function(e){var r=new i.UrlAdaptor,n=new i.DataManager({url:"",adaptor:new i.UrlAdaptor}),o=r.processQuery(n,e),s=JSON.parse(o.data);return t.extend(s,o.pvtData)},e.prototype.eventPromise=function(e,t,r){var n=this,o=e,s=this.getStateEventArgument(t),l=new i.Deferred,a=new i.Deferred;if(void 0!==e.requestType&&!1!==this.dataState.isDataChanged)if(s.action=e,"save"===e.requestType||"delete"===e.requestType){var h=e;h.key=r;h.promise=a.promise,h.state=s,this.setState({isPending:!0,resolver:a.resolve}),o.endEdit=a.resolve,o.cancelEdit=a.reject,this.parent.trigger("dataSourceChanged",h),a.promise.then(function(){n.setState({isPending:!0,resolver:l.resolve,group:s.group,aggregates:s.aggregates}),"save"===h.requestType&&n.parent.notify("recordAdded",h),n.parent.trigger("dataStateChange",s)}).catch(function(){})}else this.setState({isPending:!0,resolver:l.resolve,group:s.group,aggregates:s.aggregates}),this.parent.trigger("dataStateChange",s);else this.setState({}),l.resolve(this.parent.dataSource);return l},e.prototype.getSearchColumnFieldNames=function(){for(var e=[],i=0,r=this.parent.getColumns();i<r.length;i++){var n=r[i];n.allowSearching&&!t.isNullOrUndefined(n.field)&&e.push(n.field)}return e},e.prototype.refreshFilteredCols=function(){this.parent.allowFiltering&&this.parent.filterSettings.columns.length&&we(this.parent,this.parent.filterSettings.columns)},e}(),vi=function(){function e(e,i){t.merge(this,e),this.parent=i}return e.prototype.clone=function(){var i=new e({});return t.merge(i,this),i.cells=this.cells.map(function(e){return e.clone()}),i},e.prototype.setRowValue=function(e){if(this.parent){var t=this.data[this.parent.getPrimaryKeyFieldNames()[0]];this.parent.setRowData(t,e)}},e.prototype.setCellValue=function(e,t){if(this.parent&&!(this.data[e].toString()===t.toString())){var i=this.parent.getPrimaryKeyFieldNames()[0],r=this.data[i];this.parent.setCellValue(r,e,t),this.makechanges(i,this.data)}},e.prototype.makechanges=function(e,t){this.parent&&this.parent.getDataModule().dataManager.update(e,t)},e}(),Ci=function(){function e(e){this.isSpanned=!1,this.isRowSpanned=!1,t.merge(this,e)}return e.prototype.clone=function(){var i=new e({});return t.merge(i,this),i},e}(),wi=function(){function i(e,t){this.serviceLocator=e,this.parent=t}return i.prototype.render=function(i,r,n,o){var s,l=this.serviceLocator.getService("cellRendererFactory").getCellRenderer(r.cells[n].cellType||e.CellType.Data),a=r.cells[n].cellSpan?r.cells[n].cellSpan:i.colSpan+n<=r.cells.length?i.colSpan:r.cells.length-n,h=i.rowSpan,d=0;if(r.index>0){var c=this.parent.groupSettings.columns.length>0&&!this.parent.getRowsObject()[r.index-1].isDataRow?this.parent.getRowsObject()[r.index].cells:this.parent.getRowsObject()[r.index-1].cells,p=r.cells[n];s=c.filter(function(e){return e.column.uid===p.column.uid})[0]}for(var u=s&&s.colSpanRange>1&&s.rowSpanRange>1?s.colSpanRange:a,g=n+1;g<n+u&&g<r.cells.length;g++)!1===r.cells[g].visible?d++:r.cells[g].isSpanned=!0;if(d>0){for(g=n+a;g<n+a+d&&g<r.cells.length;g++)r.cells[g].isSpanned=!0;n+a+d>=r.cells.length&&(a-=n+a+d-r.cells.length)}return r.cells[n].cellSpan&&(r.data[i.column.field]=r.cells[n].spanText,o=l.render(r.cells[n],r.data,{index:t.isNullOrUndefined(r.index)?"":r.index.toString()})),a>1&&t.attributes(o,{colSpan:a.toString(),"aria-colSpan":a.toString()}),h>1&&(t.attributes(o,{rowspan:h.toString(),"aria-rowspan":h.toString()}),r.cells[n].isRowSpanned=!0,r.cells[n].rowSpanRange=Number(h),a>1&&(r.cells[n].colSpanRange=Number(a))),r.index>0&&s.rowSpanRange>1&&(r.cells[n].isSpanned=!0,r.cells[n].rowSpanRange=Number(s.rowSpanRange-1),r.cells[n].colSpanRange=s.rowSpanRange>0?s.colSpanRange:1),!this.parent.enableColumnVirtualization||r.cells[n].cellSpan||this.containsKey(i.column.field,i.data[i.column.field])||this.backupMergeCells(i.column.field,i.data[i.column.field],i.colSpan),o},i.prototype.backupMergeCells=function(e,t,i){this.setMergeCells(this.generteKey(e,t),i)},i.prototype.generteKey=function(e,t){return e+"__"+t.toString()},i.prototype.splitKey=function(e){return e.split("__")},i.prototype.containsKey=function(e,t){return this.getMergeCells().hasOwnProperty(this.generteKey(e,t))},i.prototype.getMergeCells=function(){return this.parent.mergeCells},i.prototype.setMergeCells=function(e,t){this.parent.mergeCells[e]=t},i.prototype.updateVirtualCells=function(e){for(var t=this.getMergeCells(),i=0,r=Object.keys(t);i<r.length;i++){var n=r[i],o=t[n],s=this.splitKey(n),l=this.getIndexFromAllColumns(s[0]),a=this.parent.getColumnIndexesInView(),h=o-(a[0]-l);if(l<a[0]&&h>1)for(var d=0,c=e;d<c.length;d++){var p=c[d];if(p.data[s[0]].toString()===s[1].toString()){p.cells[0].cellSpan=h,p.cells[0].spanText=s[1];break}}}return e},i.prototype.getIndexFromAllColumns=function(e){return S(this.parent.getVisibleColumns(),function(t,i){if(t.field===e)return i})[0]},i}(),bi="e-rowcell",Si="e-gridheader",Ri="e-gridcontent",xi="e-gridfooter",Fi="e-headercontent",Ei="e-movablecontent",Ii="e-movableheader",Ti="e-frozencontent",zi="e-frozenheader",Di="e-content",Mi="e-table",Oi="e-row",ki="e-gridchkbox",Ai="e-editedrow",Bi="e-addedrow",Pi="Left-Right",Ni="frozen-right",Li="frozen-left",qi="aria-colindex",Hi="aria-rowindex",Ui="tbody",ji="colgroup",Vi=function(){function i(e,t,i){this.isSpan=!1,this.cellType=t,this.serviceLocator=e,this.parent=i,this.element=this.parent.createElement("tr",{attrs:{role:"row"}})}return i.prototype.render=function(e,t,i,r,n){return this.refreshRow(e,t,i,r,n)},i.prototype.refresh=function(e,t,i,r,n){i&&(e.data=me({},e.changes),this.refreshMergeCells(e));var o=this.parent.element.querySelector("[data-uid="+e.uid+"]"),s=this.refreshRow(e,t,r,n,null,i),l=[].slice.call(s.cells);o.innerHTML="";for(var a=0,h=l;a<h.length;a++){var d=h[a];o.appendChild(d)}},i.prototype.refreshRow=function(i,r,n,o,s,l){var a=t.isNullOrUndefined(s)?this.element.cloneNode():s,h={data:i.data},d={data:i.data},c=this.parent.getColumns().filter(function(e){return"checkbox"===e.type&&e.field})[0],p=!1;c&&(p=pe(c.field,h.data));var u=this.parent.getSelectedRowIndexes();i.isDataRow&&(i.isSelected=u.indexOf(i.index)>-1||p),i.isDataRow&&this.parent.isCheckBoxSelection&&"Check"===this.parent.checkAllRows&&this.parent.enableVirtualization&&(i.isSelected=!0,-1===u.indexOf(i.index)&&u.push(i.index)),this.buildAttributeFromRow(a,i),t.attributes(a,t.extend({},n,{})),F(a,i.attributes);for(var g=this.serviceLocator.getService("cellRendererFactory"),f=this,m=0,y=i.cells.length;m<y;m++)!function(r,n){var o=i.cells[r];o.isSelected=i.isSelected,o.isColumnSelected=o.column.isSelected;var s=g.getCellRenderer(i.cells[r].cellType||e.CellType.Data),h={index:t.isNullOrUndefined(i.index)?"":i.index.toString()};i.isExpand&&i.cells[r].cellType===e.CellType.DetailExpand&&(h.class=f.parent.isPrinting?"e-detailrowcollapse":"e-detailrowexpand");var c=s.render(i.cells[r],i.data,h,i.isExpand,l);if(i.cells[r].cellType!==e.CellType.Filter){if(i.cells[r].cellType===e.CellType.Data||i.cells[r].cellType===e.CellType.CommandColumn){f.parent.trigger("queryCellInfo",t.extend(d,{cell:c,column:o.column,colSpan:1,rowSpan:1,foreignKeyData:i.cells[r].foreignKeyData,requestType:f.parent.requestTypeAction}));var p=!1;if(i.index>0&&f.isSpan){var u=(f.parent.groupSettings.columns.length>0&&!f.parent.getRowsObject()[i.index-1].isDataRow?f.parent.getRowsObject()[i.index].cells:f.parent.getRowsObject()[i.index-1].cells).filter(function(e){return e.column.uid===i.cells[r].column.uid})[0];p=u.isRowSpanned?u.isRowSpanned:u.rowSpanRange>1}(d.colSpan>1||i.cells[r].cellSpan>1||d.rowSpan>1||p)&&(f.isSpan=!0,c=new wi(f.serviceLocator,f.parent).render(d,i,r,c))}i.cells[r].isSpanned||a.appendChild(c)}}(m);var v={row:a,rowHeight:this.parent.rowHeight};if(i.isDataRow&&(this.parent.trigger("rowDataBound",t.extend(h,v)),this.parent.childGrid||this.parent.isRowDragable()||this.parent.detailTemplate)){var C=a.querySelectorAll(".e-rowcell:not(.e-hide)")[0];C&&C.classList.add("e-detailrowvisible")}if(this.parent.enableVirtualization&&(h.rowHeight=this.parent.rowHeight),h.rowHeight?a.style.height=h.rowHeight+"px":this.parent.rowHeight&&(a.querySelector(".e-headercell")||a.querySelector(".e-groupcaption"))&&(a.style.height=this.parent.rowHeight+"px"),i.cssClass&&a.classList.add(i.cssClass),i.lazyLoadCssClass&&a.classList.add(i.lazyLoadCssClass),!(this.parent.enableColumnVirtualization&&0!==this.parent.frozenColumns)&&this.parent.element.scrollHeight>this.parent.height&&this.parent.aggregates.length)for(m=0;m<this.parent.aggregates.length;m++){if(this.parent.aggregates[m].properties.columns[0].footerTemplate){var w=[].slice.call(a.getElementsByClassName("e-summarycell"));if(w.length){var b=w[w.length-1];t.addClass([b],["e-lastsummarycell"]);var S=w[0];t.addClass([S],["e-firstsummarycell"])}}}return a},i.prototype.refreshMergeCells=function(e){for(var t=0,i=e.cells;t<i.length;t++)i[t].isSpanned=!1;return e},i.prototype.buildAttributeFromRow=function(e,i){var r={},n={rowindex:Hi,dataUID:"data-uid",ariaSelected:"aria-selected"},o=[];i.isDataRow&&o.push(Oi),i.isAltRow&&o.push("e-altrow"),t.isNullOrUndefined(i.index)||(r[n.rowindex]=i.index),i.rowSpan&&(r.rowSpan=i.rowSpan),i.uid&&(r[n.dataUID]=i.uid),i.isSelected&&(r[n.ariaSelected]=!0),!1===i.visible&&o.push("e-hide"),r.class=o,F(e,r)},i}(),Gi=function(){function i(e){this.parent=e}return i.prototype.generateRows=function(e,t){var i=[],r=this.parent.enableVirtualization&&t?t.startIndex:0;r=this.parent.enableInfiniteScrolling&&t?this.getInfiniteIndex(t):r;for(var n=0,o=Object.keys(e).length;n<o;n++,r++)i[n]=this.generateRow(e[n],r);return i},i.prototype.ensureColumns=function(){var t=[];if(this.parent.detailTemplate||this.parent.childGrid){var i={};this.parent.notify("detail-indentcell-info",i),t.push(this.generateCell(i,null,e.CellType.DetailExpand))}return this.parent.isRowDragable()&&t.push(this.generateCell({},null,e.CellType.RowDragIcon)),t},i.prototype.generateRow=function(e,t,i,r,n,o,s){var l={};l.foreignKeyData={},l.uid=L("grid-row"),l.data=e,l.index=t,l.indent=r,l.tIndex=o,l.isDataRow=!0,l.parentGid=n,l.parentUid=s,this.parent.isPrinting&&("All"===this.parent.hierarchyPrintMode?l.isExpand=!0:"Expanded"===this.parent.hierarchyPrintMode&&this.parent.expandedRows&&this.parent.expandedRows[t]&&(l.isExpand=this.parent.expandedRows[t].isExpand)),l.cssClass=i,l.isAltRow=!!this.parent.enableAltRow&&t%2!=0,l.isAltRow=!!this.parent.enableAltRow&&t%2!=0,l.isSelected=this.parent.getSelectedRowIndexes().indexOf(t)>-1,this.refreshForeignKeyRow(l);var a=this.ensureColumns(),h=new vi(l,this.parent);return h.cells="Right"===this.parent.getFrozenMode()?this.generateCells(l).concat(a):a.concat(this.generateCells(l)),h},i.prototype.refreshForeignKeyRow=function(e){for(var i=this.parent.getForeignKeyColumns(),r=0;r<i.length;r++)t.setValue(i[r].field,le(i[r],e.data),e.foreignKeyData)},i.prototype.generateCells=function(i){for(var r=this.parent.getColumns(),n=[],o=0;o<r.length;o++)n.push(this.generateCell(r[o],i.uid,t.isNullOrUndefined(r[o].commands)?void 0:e.CellType.CommandColumn,null,o,i.foreignKeyData));return n},i.prototype.generateCell=function(i,r,n,o,s,l){var a={visible:i.visible,isDataCell:!t.isNullOrUndefined(i.field||i.template),isTemplate:!t.isNullOrUndefined(i.template),rowID:r,column:i,cellType:t.isNullOrUndefined(n)?e.CellType.Data:n,colSpan:o,commands:i.commands,isForeignKey:i.isForeignColumn&&i.isForeignColumn(),foreignKeyData:i.isForeignColumn&&i.isForeignColumn()&&t.getValue(i.field,l)};return(a.isDataCell||"checkbox"===a.column.type||a.commands)&&(a.index=s),new Ci(a)},i.prototype.refreshRows=function(e){for(var t=0;t<e.length;t++)this.refreshForeignKeyRow(e[t]),e[t].cells=this.generateCells(e[t]);return e},i.prototype.getInfiniteIndex=function(e){return"infiniteScroll"===e.requestType||"delete"===e.requestType||"add"===e.action?e.startIndex:0},i}(),_i=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wi=function(){function i(e){this.parent=e}return i.prototype.getData=function(){for(var e=this,t=[],i=this.parent.aggregates.slice(),r=0;r<i.length;r++){var n=i[r].columns.filter(function(t){return!(t.footerTemplate||t.groupFooterTemplate||t.groupCaptionTemplate)||e.columnSelector(t)});n.length&&t.push({columns:n})}return t},i.prototype.columnSelector=function(e){return void 0!==e.footerTemplate},i.prototype.getColumns=function(e,i){var r=[];if(this.parent.allowGrouping)for(var n=0;n<this.parent.groupSettings.columns.length;n++)r.push(new Ct({}));return!this.parent.detailTemplate&&t.isNullOrUndefined(this.parent.childGrid)||r.push(new Ct({})),this.parent.isRowDragable()&&!e&&r.push(new Ct({})),r.push.apply(r,this.parent.getColumns()),i=i&&!e?i+this.parent.getIndentCount():i,t.isNullOrUndefined(e)?r:r.slice(e,i)},i.prototype.generateRows=function(e,t,i,r,n){if(0===e.length&&(void 0===t||!t.count))return[];for(var o=this.buildSummaryData(e,t),s=[],l=this.getData(),a=0;a<l.length;a++)s.push(this.getGeneratedRow(l[a],o[a],t?t.level:void 0,i,r,t?t.parentUid:void 0,n));return s},i.prototype.getGeneratedRow=function(i,r,n,o,s,l,a){var h=[],d=this.getIndentByLevel(),c=!t.isNullOrUndefined(this.parent.childGrid),p=o?0:this.parent.getIndentCount();this.parent.isRowDragable()&&!o&&(d=["e-indentcelltop"]);for(var u=a||this.getColumns(o,s),g=0;g<u.length;g++)h.push(this.getGeneratedCell(u[g],i,g>=p?this.getCellType():g<this.parent.groupSettings.columns.length?e.CellType.Indent:e.CellType.DetailFooterIntent,d[g],c));var f=new vi({data:r,attributes:{class:"e-summaryrow"}});return f.cells=h,f.uid=L("grid-row"),f.parentUid=l,f.visible=h.some(function(e){return e.isDataCell&&e.visible}),f},i.prototype.getGeneratedCell=function(e,i,r,n,o){var s=i.columns.filter(function(t){return t.columnName===e.field})[0],l={style:{textAlign:e.textAlign},"e-mappinguid":e.uid,index:e.index};n&&(l.class=n),t.isNullOrUndefined(n)&&o&&(l.class="e-detailindentcelltop");var a={visible:e.visible,isDataCell:!t.isNullOrUndefined(s),isTemplate:s&&!t.isNullOrUndefined(s.footerTemplate||s.groupFooterTemplate||s.groupCaptionTemplate),column:s||{},attributes:l,cellType:r};return a.column.headerText=e.headerText,new Ci(a)},i.prototype.buildSummaryData=function(e,t){for(var i=[],r=this.getData(),n={},o=0;o<r.length;o++){n={};for(var s=r[o].columns,l=0;l<s.length;l++)n=this.setTemplate(s[l],t&&t.aggregates?t:e,n);i.push(n)}return i},i.prototype.getIndentByLevel=function(){return this.parent.groupSettings.columns.map(function(){return"e-indentcelltop"})},i.prototype.setTemplate=function(e,i,r){var n=e.type,o={},s=e.getFormatter()||function(){return function(e){return e}}(),l=i;n instanceof Array||(n=[e.type]);for(var a=0;a<n.length;a++){var h=e.field+" - "+n[a].toLowerCase(),d=e.columnName,c="Custom"!==n[a]&&l.aggregates&&h in l.aggregates?l.aggregates[h]:U(n[a],l.aggregates?l:i,e,this.parent);r[d]=r[d]||{},r[d][h]=c,r[d][n[a]]=t.isNullOrUndefined(c)?" ":s(c),l.field&&(r[d].field=l.field,r[d].key=l.key)}return o.format=e.getFormatter(),e.setTemplate(o),r},i.prototype.getCellType=function(){return e.CellType.Summary},i}(),Ki=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return _i(i,t),i.prototype.columnSelector=function(e){return void 0!==e.groupFooterTemplate},i.prototype.getIndentByLevel=function(e){return void 0===e&&(e=this.parent.groupSettings.columns.length),this.parent.groupSettings.columns.map(function(t,i){return i<=e-1?"":"e-indentcelltop"})},i.prototype.getCellType=function(){return e.CellType.GroupSummary},i}(Wi),Qi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return _i(i,t),i.prototype.columnSelector=function(e){return void 0!==e.groupCaptionTemplate},i.prototype.getData=function(){var e={columns:[]};return[t.prototype.getData.call(this).reduce(function(e,t){return e.columns=e.columns.concat(t.columns),e},e)]},i.prototype.isEmpty=function(){return 0===(this.getData()[0].columns||[]).length},i.prototype.getCellType=function(){return e.CellType.CaptionSummary},i}(Wi),Xi=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ji=function(i){function r(e){var t=i.call(this,e)||this;return t.rows=[],t.index=0,t.parent=e,t.summaryModelGen=new Ki(e),t.captionModelGen=new Qi(e),t}return Xi(r,i),r.prototype.generateRows=function(e,t){if(0===this.parent.groupSettings.columns.length)return i.prototype.generateRows.call(this,e,t);this.isInfiniteScroll="infiniteScroll"===t.requestType,this.rows=[],this.index=this.parent.enableVirtualization||this.isInfiniteScroll?t.startIndex:0;for(var r=0,n=e.length;r<n;r++)this.getGroupedRecords(0,e[r],e.level,r,void 0,this.rows.length);return this.index=0,this.parent.isCollapseStateEnabled()&&this.ensureRowVisibility(),this.rows},r.prototype.getGroupedRecords=function(e,i,r,n,o,s,l){var a,h=this.isInfiniteScroll&&this.prevKey===i.key,d=r;if(t.isNullOrUndefined(i.items))if(t.isNullOrUndefined(i.GroupGuid))this.rows=this.rows.concat(this.generateDataRows(i,e,n,this.rows.length,l));else for(var c=0,p=i.length;c<p;c++)this.getGroupedRecords(e,i[c],i.level,n,e,this.rows.length,l);else{var u=this.generateCaptionRow(i,e,n,o,s,l);if(h||(this.rows=this.rows.concat(u)),i.items&&i.items.length&&this.getGroupedRecords(e+1,i.items,i.items.level,n,e+1,this.rows.length,u.uid),this.parent.aggregates.length){var g=this.rows.length;(a=this.rows).push.apply(a,this.summaryModelGen.generateRows(i,{level:d,parentUid:u.uid}));for(var f=g-1;f>=0;f--)if(this.rows[f].isCaptionRow)this.rows[f].aggregatesCount=this.rows.length-g;else if(!this.rows[f].isCaptionRow&&!this.rows[f].isDataRow)break}}this.prevKey=i.key},r.prototype.getCaptionRowCells=function(i,r,n){var o=[],s=[],l=this.parent.getColumnByField(i),a=this.parent.getColumnIndexesInView();this.parent.enableColumnVirtualization&&(l=this.parent.columns.filter(function(e){return e.field===i})[0]);var h=this.parent.groupSettings.columns.length,d=this.parent;if(!this.parent.enableColumnVirtualization||-1!==a.indexOf(r)){for(var c=0;c<r;c++)o.push(this.generateIndentCell());o.push(this.generateCell({},null,e.CellType.Expand))}if(r=this.parent.enableColumnVirtualization?1:this.parent.getVisibleColumns().length+h+(d.detailTemplate||d.childGrid?1:0)-r+(this.parent.getVisibleColumns().length?-1:0),this.parent.aggregates.length&&!this.captionModelGen.isEmpty()){var p=this.captionModelGen.generateRows(n)[0];t.extend(n,p.data);var u=0;p.cells.some(function(e,t){return u=t,e.visible&&e.isDataCell}),s=p.cells.slice(u).filter(function(e){return e.visible}),p.visible&&s[0].column.field===this.parent.getVisibleColumns()[0].field&&(s=s.slice(1)),1===this.parent.getVisibleColumns().length&&(s=[]),r-=s.length}for(var g=this.parent.enableColumnVirtualization?this.parent.getColumns():[l],f=!0,m=0;m<g.length;m++){var y=f&&-1!==a.indexOf(r);y&&(f=!1);var v=!this.parent.enableColumnVirtualization||y?e.CellType.GroupCaption:e.CellType.GroupCaptionEmpty;r=this.parent.enableColumnVirtualization&&v===e.CellType.GroupCaption?r+h:r,d.isRowDragable()&&r++,o.push(this.generateCell(l,null,v,r))}return o.push.apply(o,s),o},r.prototype.generateCaptionRow=function(e,i,r,n,o,s){var l={},a=this.parent.getColumnByField(e.field);l.data=t.extend({},e),a&&(l.data.field=e.field),l.isDataRow=!1,l.isExpand=!this.parent.groupSettings.enableLazyLoading&&!this.parent.isCollapseStateEnabled(),l.parentGid=r,l.childGid=n,l.tIndex=o,l.isCaptionRow=!0,l.parentUid=s,l.gSummary=t.isNullOrUndefined(e.items.records)?e.items.length:e.items.records.length,l.uid=L("grid-row");var h=new vi(l);return h.indent=i,this.getForeignKeyData(h),h.cells=this.getCaptionRowCells(e.field,i,h.data),h},r.prototype.getForeignKeyData=function(e){var i=e.data,r=this.parent.getColumnByField(i.field);if(r&&r.isForeignColumn&&r.isForeignColumn()){var n=t.isNullOrUndefined(i.key)?"":r.valueAccessor(r.foreignKeyValue,le(r,{},i.key)[0],r);t.setValue("foreignKey",n,e.data)}},r.prototype.generateDataRows=function(e,t,i,r,n){for(var o=[],s=this.parent.getColumnIndexesInView(),l=0,a=e.length;l<a;l++,r++){o[l]=this.generateRow(e[l],this.index,l?void 0:"e-firstchildrow",t,i,r,n);for(var h=0;h<t;h++)this.parent.enableColumnVirtualization&&-1===s.indexOf(t)||o[l].cells.unshift(this.generateIndentCell());this.index++}return o},r.prototype.generateIndentCell=function(){return this.generateCell({},null,e.CellType.Indent)},r.prototype.refreshRows=function(e){for(var t=this.parent.getColumnIndexesInView(),i=0;i<e.length;i++)if(e[i].isDataRow){e[i].cells=this.generateCells(e[i]);for(var r=0;r<e[i].indent;r++)this.parent.enableColumnVirtualization&&-1===t.indexOf(e[i].indent)||e[i].cells.unshift(this.generateIndentCell())}else{var n=this.generateCaptionRow(e[i].data,e[i].indent);e[i].cells=n.cells}return e},r.prototype.ensureRowVisibility=function(){for(var e=0;e<this.rows.length;e++){var t=this.rows[e];if(t.isCaptionRow)for(var i=e+1;i<this.rows.length;i++){var r=this.rows[i];t.uid===r.parentUid&&(this.rows[i].visible=t.isExpand)}}},r}(Gi),Yi=function(){function e(e,i){var r=this;this.rows=[],this.freezeRows=[],this.movableRows=[],this.freezeRowElements=[],this.currentInfo={},this.prevCurrentView=[],this.isLoaded=!0,this.viewColIndexes=[],this.drop=function(e){r.parent.notify(Et,{target:e.target,droppedElement:e.droppedElement}),t.remove(e.droppedElement)},this.infiniteCache={},this.isRemove=!1,this.visibleRows=[],this.visibleFrozenRows=[],this.rightFreezeRows=[],this.isAddRows=!1,this.isInfiniteFreeze=!1,this.useGroupCache=!1,this.mutableData=!1,this.rafCallback=function(e){var t=e;return function(){if(r.parent.isFrozenGrid()&&r.parent.enableVirtualization){var i=e.tableName;if(r.isLoaded=r.parent.getFrozenMode()===Pi?"frozen-right"===i:"movable"===i,r.parent.enableColumnVirtualization&&"virtualscroll"===e.requestType&&r.isLoaded){var n=[].slice.call(r.parent.getMovableVirtualHeader().getElementsByClassName(Oi)),o=[].slice.call(r.parent.getFrozenVirtualHeader().getElementsByClassName(Oi));r.isLoaded=n.length===o.length}}if(r.ariaService.setBusy(r.getPanel().querySelector("."+Di),!1),!r.parent.isDestroyed){var s=r.rows.slice(0);if(r.parent.isFrozenGrid()&&(s=e.isFrozen?r.freezeRows:e.renderFrozenRightContent?r.parent.getFrozenRightRowsObject():r.movableRows),r.parent.notify(At,{rows:s,args:t}),r.isLoaded&&(r.parent.isManualRefresh=!1,r.parent.trigger(Rt,{},function(){r.parent.allowTextWrap&&r.parent.notify(oi,{case:"textwrap"})})),t){var l=(t.requestType||"").toLowerCase()+"-complete";r.parent.notify(l,t),"batchsave"===e.requestType&&(e.cancel=!1,r.parent.trigger(St,e))}r.isLoaded&&r.parent.hideSpinner()}}},this.parent=e,this.serviceLocator=i,this.ariaService=this.serviceLocator.getService("ariaService"),this.mutableData=this.parent.getDataModule().isRemote(),this.generator=this.getModelGenerator(),this.parent.isDestroyed||(this.parent.enableColumnVirtualization||this.parent.enableVirtualization||this.parent.groupSettings.enableLazyLoading||this.parent.on(Wt,this.setVisible,this),this.parent.on(qt,this.colGroupRefresh,this),this.parent.on(Bt,this.enableAfterRender,this),this.parent.on(ui,this.refreshContentRows,this),this.parent.on(jt,this.beforeCellFocused,this),this.parent.on(_t,this.droppableDestroy,this))}return e.prototype.beforeCellFocused=function(e){!e.byKey||"upArrow"!==e.keyArgs.action&&"downArrow"!==e.keyArgs.action?this.pressedKey=void 0:this.pressedKey=e.keyArgs.action},e.prototype.renderPanel=function(){var e=this.parent,t=this.parent.element.querySelector("."+Ri);if(t)return this.ariaService.setOptions(this.parent.element.querySelector("."+Di),{busy:!1}),void this.setPanel(t);t=this.parent.createElement("div",{className:Ri});var i=this.parent.createElement("div",{className:Di});this.ariaService.setOptions(i,{busy:!1}),t.appendChild(i),this.setPanel(t),e.element.appendChild(t)},e.prototype.renderTable=function(){var e=this.getPanel(),i=e.querySelector(".e-virtualtable"),r=e.querySelector(".e-virtualtrack");!this.parent.enableVirtualization||t.isNullOrUndefined(i)||t.isNullOrUndefined(r)||(t.remove(i),t.remove(r)),e.appendChild(this.createContentTable("_content_table")),this.setTable(e.querySelector("."+Mi)),this.ariaService.setOptions(this.getTable(),{multiselectable:"Multiple"===this.parent.selectionSettings.type}),this.initializeContentDrop(),this.parent.frozenRows&&this.parent.getHeaderContent().classList.add("e-frozenhdrcont")},e.prototype.createContentTable=function(e){var i=this.getPanel().firstElementChild;this.getTable()&&t.remove(this.getTable());var r=i.querySelector("."+Mi)?i.querySelector("."+Mi):this.parent.createElement("table",{className:Mi,attrs:{cellspacing:"0.25px",role:"grid",id:this.parent.element.id+e}});return this.setColGroup(this.parent.getHeaderTable().querySelector(ji).cloneNode(!0)),r.appendChild(this.getColGroup()),r.appendChild(this.parent.createElement(Ui)),i.appendChild(r),i},e.prototype.refreshContentRows=function(e){var i=this;void 0===e&&(e={});var r=this.parent;if(0!==r.currentViewData.length){var n=this.currentMovableRows||r.currentViewData,o=this.parent.contentModule,s=r.isReact&&!t.isNullOrUndefined(r.rowTemplate),l=s?r.createElement(Ui):document.createDocumentFragment();this.initialPageRecords||(this.initialPageRecords=t.extend([],n));var a,h,d,c=s?r.createElement(Ui):document.createDocumentFragment(),p=r.getColumns(),u=r.getFrozenColumns(),g=this.parent.isFrozenGrid(),f=new Vi(this.serviceLocator,null,this.parent),y=this.parent.enableInfiniteScrolling&&"infiniteScroll"===e.requestType;this.rowElements=[],this.rows=[];var v,C,w=this.getPanel().querySelector("."+Ti),b=this.getPanel().querySelector("."+Ei),S=this.getPanel().querySelector("."+Di);ce(r)&&["sorting","filtering","searching","grouping","ungrouping","reorder"].some(function(t){return e.requestType===t})&&this.emptyVcRows();var R;this.parent.enableVirtualization&&this.parent.isFrozenGrid()?(this.parent.enableColumnVirtualization&&"virtualscroll"===e.requestType&&"X"===e.virtualInfo.sentinelInfo.axis&&(R=this.parent.contentModule.generateRows(n,e),e.renderMovableContent=!0),R=this.parent.contentModule.generateRows(n,e)):(R=this.checkCache(R,e),this.isAddRows||this.useGroupCache||(R=this.generator.generateRows(n,e))),this.setGroupCache(R,e),this.parent.notify("set-infinite-cache",{isInfiniteScroll:y,modelData:R,args:e});var x=R[0].cells[0].index;g&&(C=o.setTbody(R,e),v=o.getTbody(C));var F=this.parent.getFrozenMode()===Pi&&C===Ni;if("infiniteScroll"!==e.requestType&&this.parent.registeredTemplate&&this.parent.registeredTemplate.template&&!e.isFrozen&&!F){for(var E=[],I=0;I<this.parent.registeredTemplate.template.length;I++)for(W=0;W<this.parent.registeredTemplate.template[I].rootNodes.length;W++)t.isNullOrUndefined(this.parent.registeredTemplate.template[I].rootNodes[W].parentNode)&&E.push(this.parent.registeredTemplate.template[I]);this.parent.destroyTemplate(["template"],E)}this.parent.isReact&&"infiniteScroll"!==e.requestType&&!e.isFrozen&&(this.parent.destroyTemplate(["columnTemplate","rowTemplate","detailTemplate","captionTemplate","commandsTemplate"]),this.parent.renderTemplates()),this.parent.enableColumnVirtualization&&new wi(this.serviceLocator,this.parent).updateVirtualCells(R),g||(this.tbody=this.getTable().querySelector(Ui));var T=0,z=!0;if(ce(r)&&r.vcRows.length){var D=t.isNullOrUndefined(e.virtualInfo.offsets)?t.isNullOrUndefined(e.scrollTop)?0:e.scrollTop.top:e.virtualInfo.offsets.top;if(0!==D){for(var M=r.vGroupOffsets,O=r.pageSettings.pageSize/2,k=Object.keys(M).map(function(e){return M[e]}),A=0;A<k.length;A++)if(D<k[A]){if(t.isNullOrUndefined(e.virtualInfo)||"up"!==e.virtualInfo.direction){e.virtualInfo.blockIndexes=0===A||1===A?[1,2]:[A,A+1],T=0===A||1===A?0:A*O;break}e.virtualInfo.blockIndexes=0===A||1===A?[1,2]:[A,A+1],T=0===A||1===A?0:A*O;break}Math.round(D+this.contentPanel.firstElementChild.offsetHeight)>=this.contentPanel.firstElementChild.scrollHeight&&!e.rowObject&&(z=!1)}}var B=r.frozenRows&&!r.isFrozenGrid()&&this.parent.enableVirtualization&&"reorder"===e.requestType;if(r.frozenRows&&"virtualscroll"===e.requestType&&"X"===e.virtualInfo.sentinelInfo.axis||B){var P=e.virtualInfo.blockIndexes,N=e.virtualInfo.page;e.virtualInfo.blockIndexes=[1,2],B&&(e.virtualInfo.page=1);var L=B?this.initialPageRecords:n,H=this.vgenerator.generateRows(L,e);H.splice(this.parent.frozenRows);for(I=0;I<this.parent.frozenRows;I++)H[I].cells.splice(0,this.parent.getFrozenColumns()),a=f.render(H[I],p),c.appendChild(a);e.virtualInfo.blockIndexes=P,e.virtualInfo.page=N,B&&1===e.virtualInfo.page&&R.splice(0,this.parent.frozenRows)}this.virtualFrozenHdrRefresh(c,R,f,e,n,p);for(var I=T,U=R.length;I<U;I++)if(this.rows.push(R[I]),!this.parent.groupSettings.enableLazyLoading||this.useGroupCache||!this.parent.groupSettings.columns.length||(this.setRowsInLazyGroup(R[I],I),!t.isNullOrUndefined(R[I].indent))){if(this.setInfiniteVisibleRows(e,R[I],C),ce(r)&&this.rows.length>=r.pageSettings.pageSize&&z)break;if(r.rowTemplate){var j=r.element.id+"rowTemplate",V=void 0;if(r.isReact){var G=r.frozenRows&&I<r.frozenRows,_=t.extend({index:I},n[I]);r.getRowTemplate()(_,r,"rowTemplate",j,null,null,G?c:l),r.renderTemplates()}else V=r.getRowTemplate()(t.extend({index:I},n[I]),r,"rowTemplate",j);if(r.isReact||"TBODY"!==V[0].tagName)r.frozenRows&&I<r.frozenRows?a=r.isReact?c.lastElementChild:q(c,V):(r.isReact||(a=q(l,V)),d=r.isReact?l.lastElementChild:a.lastElementChild);else{for(var W=0;W<V.length;W++){var K="tr"===V[W].nodeName.toLowerCase();(K||V[W].querySelectorAll&&V[W].querySelectorAll("tr").length)&&(a=K?V[W]:V[W].querySelector("tr"))}r.frozenRows&&I<r.frozenRows?c.appendChild(a):l.appendChild(a)}var Q={data:R[I].data,row:d||a};this.parent.trigger("rowDataBound",Q)}else{a=f.render(R[I],p);var X=this.ensureFrozenHeaderRender(e);r.frozenRows&&I<r.frozenRows&&!y&&"virtualscroll"!==e.requestType&&X&&this.ensureVirtualFrozenHeaderRender(e)?c.appendChild(a):l.appendChild(a),R[I].isExpand&&r.notify(li,a.cells[r.groupSettings.columns.length])}R[I].isDataRow&&this.rowElements.push(a),this.ariaService.setOptions(this.getTable(),{colcount:r.getColumns().length.toString()})}if(g&&o.splitRows(C),r.frozenRows&&"virtualscroll"!==e.requestType&&!y&&this.ensureVirtualFrozenHeaderRender(e)||"virtualscroll"===e.requestType&&e.virtualInfo.sentinelInfo&&"X"===e.virtualInfo.sentinelInfo.axis)if(h=g?o.getFrozenHeader(C):r.getHeaderTable().querySelector(Ui),s){var J=h.parentElement;t.remove(h),J.appendChild(c)}else h.innerHTML="",h.appendChild(c);!r.enableVirtualization&&r.frozenRows&&0===x&&S.offsetHeight===Number(r.height)&&(S.style.height=S.offsetHeight-h.offsetHeight+"px"),e.rows=this.rows.slice(0),g&&o.setIsFrozen(e,C),this.index=x,m(function(){i.parent.notify("beforeFragAppend",e);var n=i.parent.enableVirtualization&&i.parent.isFrozenGrid();if(i.parent.enableVirtualization||y||(i.parent.isFrozenGrid()?(t.remove(o.getTbody(C)),v=i.parent.createElement(Ui)):(t.remove(i.tbody),i.tbody=i.parent.createElement(Ui))),!g||n||i.parent.enableInfiniteScrolling)if(r.rowTemplate&&t.updateBlazorTemplate(r.element.id+"rowTemplate","RowTemplate",r),n){if(e.renderFrozenRightContent){var s=r.getContent().querySelector(".e-frozen-right-content").querySelector(Ui);i.appendContent(s,l,e)}else e.renderMovableContent?(i.appendContent(b.querySelector(Ui),l,e),e.renderMovableContent=!1):i.appendContent(w.querySelector(Ui),l,e);i.parent.getFrozenColumns()||o.renderNextFrozentPart(e,C)}else!t.isNullOrUndefined(i.parent.infiniteScrollModule)&&i.parent.enableInfiniteScrolling?(i.isAddRows=!1,i.parent.notify("remove-infinite-rows",{args:e}),i.parent.notify("append-infinite-content",{tbody:v||i.tbody,frag:l,args:e,rows:i.rows,rowElements:i.rowElements,visibleRows:i.visibleRows,tableName:C}),!u&&g&&((r.getFrozenMode()===Pi||C!==Li&&C!==Ni)&&(r.getFrozenMode()!==Pi||C!==Li&&"movable"!==C)||i.refreshContentRows(t.extend({},e)))):(i.useGroupCache=!1,i.appendContent(i.tbody,l,e));else i.appendContent(v,l,e,C);u&&o.renderNextFrozentPart(e,C),l=null},this.rafCallback(t.extend({},e)))}},e.prototype.emptyVcRows=function(){this.parent.vcRows=[],this.parent.vRows=[]},e.prototype.appendContent=function(e,i,r,n){this.parent.isReact&&!t.isNullOrUndefined(this.parent.rowTemplate)?this.getTable().appendChild(i):(e.appendChild(i),this.getTable().appendChild(e))},e.prototype.setRowsInLazyGroup=function(e,t){this.parent.groupSettings.enableLazyLoading&&!this.useGroupCache&&this.parent.groupSettings.columns.length&&this.parent.contentModule.maintainRows(e,t)},e.prototype.setGroupCache=function(e,t){!this.useGroupCache&&this.parent.groupSettings.enableLazyLoading&&this.parent.notify("group-cache",{args:t,data:e})},e.prototype.ensureFrozenHeaderRender=function(e){return!(this.parent.enableVirtualization&&("reorder"===e.requestType||"refresh"===e.requestType)||this.parent.infiniteScrollSettings.enableCache&&this.parent.frozenRows&&"delete"===this.parent.infiniteScrollModule.requestType&&1!==this.parent.pageSettings.currentPage)},e.prototype.ensureVirtualFrozenHeaderRender=function(e){return!(this.parent.enableVirtualization&&"delete"===e.requestType)},e.prototype.checkCache=function(e,i){if(this.parent.infiniteScrollSettings.enableCache&&"infiniteScroll"===i.requestType){var r=i.isFrozen?1:0,n=this.parent.isFrozenGrid();if(this.isAddRows=!t.isNullOrUndefined(this.infiniteCache[this.parent.pageSettings.currentPage]),n&&!t.isNullOrUndefined(this.infiniteCache[this.parent.pageSettings.currentPage])&&(this.isAddRows=0!==this.infiniteCache[this.parent.pageSettings.currentPage][r].length),this.isAddRows){var o=n?this.infiniteCache[this.parent.pageSettings.currentPage][r]:this.infiniteCache[this.parent.pageSettings.currentPage];e=1===this.parent.pageSettings.currentPage?o.slice(this.parent.frozenRows):o}return e}return this.parent.groupSettings.enableLazyLoading&&this.parent.groupSettings.columns.length&&("paging"===i.requestType||"columnstate"===i.requestType||"reorder"===i.requestType)&&this.parent.contentModule.getGroupCache()[this.parent.pageSettings.currentPage]?(this.useGroupCache=!0,this.parent.contentModule.initialGroupRows("reorder"===i.requestType)):null},e.prototype.setInfiniteVisibleRows=function(e,t,i){var r=this.parent.isFrozenGrid();this.parent.enableInfiniteScrolling&&!this.parent.infiniteScrollSettings.enableCache&&(r?i===Li||"Right"===this.parent.getFrozenMode()&&i===Ni?this.visibleFrozenRows.push(t):"movable"===i?this.visibleRows.push(t):this.rightFreezeRows.push(t):this.parent.infiniteScrollSettings.enableCache||this.visibleRows.push(t))},e.prototype.getCurrentBlockInfiniteRecords=function(e){var t=[];if(this.parent.infiniteScrollSettings.enableCache){if(!Object.keys(this.infiniteCache).length)return[];var i=this.parent.isFrozenGrid(),r=this.parent.getRows(),n=parseInt(r[this.parent.frozenRows].getAttribute(Hi),10),o=Math.ceil((n+1)/this.parent.pageSettings.pageSize);n=parseInt(r[r.length-1].getAttribute(Hi),10);var s=Math.ceil(n/this.parent.pageSettings.pageSize);if(i){for(var l=e?0:1,a=o;a<=s;a++)t=t.length?t.concat(this.infiniteCache[a][l]):this.infiniteCache[a][l];this.parent.frozenRows&&this.parent.pageSettings.currentPage>1&&(t=this.infiniteCache[1][l].slice(0,this.parent.frozenRows).concat(t))}else{for(a=o;a<=s;a++)t=t.length?t.concat(this.infiniteCache[a]):this.infiniteCache[a];this.parent.frozenRows&&this.parent.pageSettings.currentPage>1&&(t=this.infiniteCache[1].slice(0,this.parent.frozenRows).concat(t))}}return t},e.prototype.getReorderedVFRows=function(e){return this.parent.contentModule.getReorderedFrozenRows(e)},e.prototype.getReorderedRows=function(e){return this.parent.contentModule.getReorderedFrozenRows(e)},e.prototype.virtualFrozenHdrRefresh=function(e,t,i,r,n,o){if(this.parent.frozenRows&&this.parent.enableVirtualization&&("reorder"===r.requestType||"refresh"===r.requestType)){var s=void 0,l=[];this.parent.isFrozenGrid()?(this.currentMovableRows=n,l=this.getReorderedVFRows(r)):l=this.getReorderedRows(r);for(var a=0;a<l.length;a++)s=i.render(l[a],o),e.appendChild(s);1===r.virtualInfo.page&&t.splice(0,this.parent.frozenRows),r.renderMovableContent&&(this.parent.currentViewData=this.currentMovableRows,this.currentMovableRows=null)}},e.prototype.getInfiniteRows=function(){var e=[],t=this.parent.isFrozenGrid();if(this.parent.enableInfiniteScrolling)if(this.parent.infiniteScrollSettings.enableCache)for(var i=Object.keys(this.infiniteCache),r=0;r<i.length;r++)e=t?e.concat(this.infiniteCache[i[r]][0]):e.concat(this.infiniteCache[i[r]]);else e=t?this.visibleFrozenRows:this.visibleRows;return e},e.prototype.getInfiniteMovableRows=function(){var e=this.getCurrentBlockInfiniteRecords();return this.parent.enableInfiniteScrolling?e.length?e:this.visibleRows:[]},e.prototype.getPanel=function(){return this.contentPanel},e.prototype.setPanel=function(e){this.contentPanel=e},e.prototype.getTable=function(){return this.contentTable},e.prototype.setTable=function(e){this.contentTable=e},e.prototype.getRows=function(){var e=this.getInfiniteRows();return e.length?e:this.parent.getFrozenColumns()?this.freezeRows:this.rows},e.prototype.getMovableRows=function(){var e=this.getInfiniteMovableRows();return e.length?e:this.movableRows},e.prototype.getRowElements=function(){return this.parent.getFrozenColumns()?this.freezeRowElements:this.rowElements},e.prototype.getMovableRowElements=function(){return this.rowElements},e.prototype.setRowElements=function(e){this.rowElements=e},e.prototype.getColGroup=function(){return this.colgroup},e.prototype.setColGroup=function(e){return t.isNullOrUndefined(e)||(e.id="content-"+e.id),this.colgroup=e},e.prototype.setVisible=function(e){var i=this.parent,r=this.parent.isFrozenGrid(),n=i.getFrozenColumns(),o=[];if(r){var s=this.freezeRows,l=this.movableRows,a=s.length,h=void 0,d=[];i.getFrozenMode()===Pi&&(d=i.getFrozenRightRowsObject());for(var c=0,p=void 0;c<a;c++){h=l[c].cells.length;var u=d.length?d[c].cells.length:0;p=s[c].clone();for(var g=0;g<h;g++)p.cells.push(l[c].cells[g]);for(var f=0;f<u;f++)p.cells.push(d[c].cells[f]);o.push(p)}}else o=this.getRows();var m;o.some(function(e){return e.isDataRow&&(m=e),e.isDataRow});var y=!0;!i.groupSettings.columns.length&&m&&(y=!1);for(var v=i.getDataRows(),C={},w=this.infiniteRowVisibility(),b=w||this.rows.filter(function(e){return!e.isDetailRow}),S=0,R=e.length;S<R;S++){var x=e[S],F=this.parent.getNormalizedColumnIndex(x.uid),E=this.parent.getColumnIndexByUid(x.uid),I=!0===x.visible?"":"none";if(-1!==F&&m&&F<m.cells.length)if(r)if("movable"!==x.getFreezeTableName())if(x.getFreezeTableName()===Ni){E=F-=this.parent.getFrozenLeftColumnsCount()+this.parent.getMovableColumnsCount();var T=this.parent.getContent().querySelector(".e-frozen-right-content").querySelector(ji);t.setStyleAttribute(T.childNodes[F],{display:I}),b=i.getFrozenRightRowsObject(),v=i.getFrozenRightDataRows()}else{t.setStyleAttribute(this.getColGroup().childNodes[F],{display:I});var z=this.infiniteRowVisibility(!0);b=z||this.freezeRows,v=i.getDataRows()}else{var D=i.getContent().querySelector("."+Ei).querySelector(ji);E=F=F-n-this.parent.getFrozenLeftColumnsCount(),t.setStyleAttribute(D.childNodes[F],{display:I}),v=i.getMovableDataRows();var M=this.infiniteRowVisibility();b=M||this.movableRows}else t.setStyleAttribute(this.getColGroup().childNodes[F],{display:I});y||this.setDisplayNone(v,E,I,b),!this.parent.invokedFromMedia&&x.hideAtMedia&&this.parent.updateMediaColumns(x),this.parent.invokedFromMedia=!1}y?this.refreshContentRows({requestType:"refresh"}):this.parent.getFrozenColumns()?(this.parent.notify("partial-refresh",{rows:this.freezeRows,args:{isFrozen:!0,rows:this.freezeRows}}),this.parent.notify("partial-refresh",{rows:this.movableRows,args:{isFrozen:!1,rows:this.movableRows}})):this.parent.notify("partial-refresh",{rows:b,args:C})},e.prototype.setDisplayNone=function(e,t,i,r){Qe(e,t,i,r,this.parent,this.parent.isRowDragable()),this.parent.notify("infinite-show-hide",{visible:i,index:t,isFreeze:this.isInfiniteFreeze})},e.prototype.infiniteRowVisibility=function(e){var t;return this.parent.enableInfiniteScrolling&&(this.isInfiniteFreeze=e,t=this.parent.infiniteScrollSettings.enableCache?e?this.getCurrentBlockInfiniteRecords(!0):this.getCurrentBlockInfiniteRecords():e?this.visibleFrozenRows:this.visibleRows),t},e.prototype.colGroupRefresh=function(){if(this.getColGroup()){var e=void 0;e=this.parent.enableColumnVirtualization&&this.parent.getFrozenColumns()&&this.parent.contentModule.isXaxis()?this.parent.getMovableVirtualHeader().querySelector(ji).cloneNode(!0):this.getHeaderColGroup(),this.getTable().replaceChild(e,this.getColGroup()),this.setColGroup(e)}},e.prototype.getHeaderColGroup=function(){return this.parent.element.querySelector("."+Si).querySelector(ji).cloneNode(!0)},e.prototype.initializeContentDrop=function(){var e=this.parent;this.droppable=new t.Droppable(e.element,{accept:".e-dragclone",drop:this.drop})},e.prototype.droppableDestroy=function(){this.droppable&&!this.droppable.isDestroyed&&this.droppable.destroy()},e.prototype.canSkip=function(e,i,r){return t.isNullOrUndefined(i)||t.isNullOrUndefined(e.visible)||i.cells[r].visible===e.visible},e.prototype.getModelGenerator=function(){return this.generator=this.parent.allowGrouping?new Ji(this.parent):new Gi(this.parent)},e.prototype.renderEmpty=function(e){this.getTable().appendChild(e),this.parent.frozenRows&&(this.parent.getHeaderContent().querySelector(Ui).innerHTML="")},e.prototype.setSelection=function(e,t,i){this.parent.notify("set-freeze-selection",{uid:e,set:t,clearAll:i});var r=this.parent.isFrozenGrid();if(!r||!this.parent.enableVirtualization){if(r)for(var n=this.getMovableRows().filter(function(t){return i||e===t.uid}),o=0;o<n.length;o++)n[o].isSelected=t;for(var s=this.getRows().filter(function(t){return i||e===t.uid}),l=0;l<s.length;l++){s[l].isSelected=t;for(var a=s[l].cells,h=0;h<a.length;h++)a[h].isSelected=t}}},e.prototype.getRowByIndex=function(e){return e=this.getInfiniteRowIndex(e),this.parent.getDataRows()[e]},e.prototype.getInfiniteRowIndex=function(e){if(this.parent.infiniteScrollSettings.enableCache){var t=this.parent.frozenRows,i=t>e?0:t,r=parseInt(this.parent.getRows()[i].getAttribute(Hi),10);e=t>e?e:e-r+t}return e},e.prototype.getVirtualRowIndex=function(e){return e},e.prototype.getMovableRowByIndex=function(e){return e=this.getInfiniteRowIndex(e),this.parent.getMovableDataRows()[e]},e.prototype.enableAfterRender=function(e){"group"===e.module&&e.enable&&(this.generator=this.getModelGenerator())},e.prototype.setRowObjects=function(e){this.rows=e},e.prototype.immutableModeRendering=function(e){var i=this;void 0===e&&(e={});var r=this.parent;r.hideSpinner();var n=r.getPrimaryKeyFieldNames()[0],o={},s={},l=[],a={},h=r.getRowsObject().slice(),d=this.getBatchEditedRecords(n,h),c={},p=0!==Object.keys(d).length;if(r.getContent().querySelector(".e-emptyrow")||"reorder"===e.requestType||this.parent.groupSettings.columns.length)this.refreshContentRows(e);else{if(0===r.currentViewData.length)return;var u={},g=r.createElement(Ui),f=r.currentViewData,m=[].slice.call(this.getTable().querySelector(Ui).children);if(this.prevCurrentView.length){var y=this.prevCurrentView.length,v=f.length;if(y===v)for(C=0;C<v;C++)"Batch"===this.parent.editSettings.mode&&m[C].classList.contains("e-insertedrow")?(m.splice(C,1),--C):(s[f[C][n]]=o[this.prevCurrentView[C][n]]=C,c[C]=f[C][n],u[h[C].uid]=m[C],a[C]=this.prevCurrentView[C][n]);else{for(C=0;C<v;C++)s[f[C][n]]=C,c[C]=f[C][n];for(C=0;C<y;C++)"Batch"===this.parent.editSettings.mode&&m[C].classList.contains("e-insertedrow")?(m.splice(C,1),--C):(u[h[C].uid]=m[C],o[this.prevCurrentView[C][n]]=C,a[C]=this.prevCurrentView[C][n])}}for(var C=0;C<f.length;C++){var w=o[f[C][n]];if(t.isNullOrUndefined(w)){var b=new Vi(this.serviceLocator,null,r),S=this.generator.generateRows([f[C]]);l.push(S[0]);x=b.render(S[0],r.getColumns());g.appendChild(x),this.refreshImmutableContent(C,x,l[C])}else{var R=!1;this.mutableData&&(R=this.objectEqualityChecker(this.prevCurrentView[w],f[C]));var x=u[h[w].uid];if(l.push(h[w]),this.rowElements[w]&&this.rowElements[w].getAttribute("data-uid")===l[C].uid&&(p&&t.isNullOrUndefined(d[c[C]])||!p&&(R||this.prevCurrentView[w]===f[C]))){w!==C&&this.refreshImmutableContent(C,x,l[C]),g.appendChild(x);continue}(p&&!t.isNullOrUndefined(d[c[C]])||!this.mutableData&&f[C]!==this.prevCurrentView[w]||this.mutableData&&!R)&&h[w].setRowValue(f[C]),g.appendChild(x),this.refreshImmutableContent(C,x,l[C])}}if(this.rows=l,this.rowElements=[].slice.call(g.children),t.remove(this.getTable().querySelector(Ui)),this.getTable().appendChild(g),this.parent.trigger(Rt,{},function(){i.parent.allowTextWrap&&i.parent.notify(oi,{case:"textwrap"})}),e){var F=(e.requestType||"").toLowerCase()+"-complete";this.parent.notify(F,e)}}},e.prototype.objectEqualityChecker=function(e,t){for(var i=Object.keys(e),r=!0,n=0;n<i.length;n++)if(!(e[i[n]]===t[i[n]]||e[i[n]]instanceof Date&&t[i[n]]instanceof Date&&e[i[n]].getTime()===t[i[n]].getTime())){r=!1;break}return r},e.prototype.getBatchEditedRecords=function(e,t){var i={},r=this.parent.getBatchChanges(),n=[],o=[];Object.keys(r).length&&(n=r.changedRecords,o=r.addedRecords);var s={cancel:!1};this.parent.notify("immutable-batch-cancel",{rows:t,args:s}),o.length&&("Bottom"===this.parent.editSettings.newRowPosition?t.splice(t.length-1,o.length):s.cancel||t.splice(0,o.length));for(var l=0;l<n.length;l++)i[n[l][e]]=l;return i},e.prototype.refreshImmutableContent=function(e,t,i){i.isAltRow=!!this.parent.enableAltRow&&e%2!=0,i.isAltRow?t.classList.add("e-altrow"):t.classList.remove("e-altrow"),i.index=e,i.edit=void 0,i.isDirty=!1,t.setAttribute(Hi,e.toString()),this.updateCellIndex(t,e)},e.prototype.updateCellIndex=function(e,t){for(var i=0;i<e.cells.length;i++)e.cells[i].setAttribute("index",t.toString())},e}(),Zi=function(){function i(e,i){var r=this;this.frzIdx=0,this.notfrzIdx=0,this.isFirstCol=!1,this.isReplaceDragEle=!0,this.helper=function(e){var i=r.parent,n=r.draggable.currentStateTarget,o=O(n,"e-headercell");if(!i.allowReordering&&!i.allowGrouping||!t.isNullOrUndefined(o)&&o.getElementsByClassName("e-checkselectall").length>0)return!1;var s=r.parent.createElement("div",{className:"e-cloneproperties e-dragclone e-headerclone"}),l=n.classList.contains("e-headercell")?n:o;if(!l||!i.allowReordering&&l.classList.contains("e-stackedheadercell"))return!1;var a,h=l.offsetHeight,d=l.querySelector(".e-headercelldiv")||l.querySelector(".e-stackedheadercelldiv");if(d){if(a=l.querySelector(".e-stackedheadercelldiv")?i.getStackedHeaderColumnByHeaderText(d.innerText.trim(),i.columns):i.getColumnByUid(d.getAttribute("e-mappinguid")),r.column=a,r.column.lockColumn)return!1;s.setAttribute("e-mappinguid",r.column.uid)}if(a&&!t.isNullOrUndefined(a.headerTemplate))if(t.isNullOrUndefined(a.headerTemplate))s.innerHTML=a.headerTemplate;else{var c=i.getColumnIndexByField(a.field);q(s,a.getHeaderTemplate()(t.extend({index:c},a),i,"headerTemplate"))}else s.innerHTML=d?a.headerText:l.firstElementChild.innerHTML;return s.style.width=l.offsetWidth+"px",s.style.height=l.offsetHeight+"px",s.style.lineHeight=(h-6).toString()+"px",i.element.appendChild(s),s},this.dragStart=function(e){var t=r.parent;t.element.querySelector(".e-gridpopup").style.display="none",t.notify(xt,{target:r.draggable.currentStateTarget,column:r.column,event:e.event})},this.drag=function(e){var i=r.parent,n=e.target;if(n){var o=t.closest(n,".e-grid"),s=r.parent.element.querySelector(".e-cloneproperties");if(!(o&&o.getAttribute("id")===i.element.getAttribute("id")||(t.classList(s,["e-notallowedcur"],["e-defaultcur"]),i.allowReordering&&(i.element.querySelector(".e-reorderuparrow").style.display="none",i.element.querySelector(".e-reorderdownarrow").style.display="none"),i.groupSettings.allowReordering)))return;i.notify(Ft,{target:e.target,column:r.column,event:e.event})}},this.dragStop=function(e){var i,n=r.parent;n.element.querySelector(".e-gridpopup").style.display="none",(!O(e.target,"e-headercell")&&!O(e.target,"e-groupdroparea")||!n.allowReordering&&O(e.target,"e-headercell")||!e.helper.getAttribute("e-mappinguid")&&O(e.target,"e-groupdroparea"))&&(t.remove(e.helper),i=!0),n.notify(Jt,{target:e.target,event:e.event,column:r.column,cancel:i})},this.drop=function(e){var i=r.parent,n=e.droppedElement.getAttribute("e-mappinguid"),o=t.closest(e.target,".e-grid");t.remove(e.droppedElement),o&&o.getAttribute("id")!==i.element.getAttribute("id")||!i.allowReordering&&!i.allowGrouping||i.notify(Yt,{target:e.target,uid:n,droppedElement:e.droppedElement})},this.parent=e,this.serviceLocator=i,this.ariaService=this.serviceLocator.getService("ariaService"),this.widthService=this.serviceLocator.getService("widthService"),this.parent.isDestroyed||(this.parent.enableColumnVirtualization||this.parent.getFrozenLeftColumnsCount()||this.parent.getFrozenRightColumnsCount()||this.parent.on(Wt,this.setVisible,this),this.parent.on(Kt,this.colPosRefresh,this),this.parent.on(Ot,this.renderCustomToolbar,this),"Vertical"===this.parent.rowRenderingMode&&this.parent.on(Bt,this.updateCustomResponsiveToolbar,this))}return i.prototype.renderPanel=function(){var e=this.parent.element.querySelector("."+Si),t=null!=e;e=t?e:this.parent.createElement("div",{className:"e-gridheader"});var i=t?e.querySelector("."+Fi):this.parent.createElement("div",{className:Fi});this.toggleStackClass(e),e.appendChild(i),this.setPanel(e),t||this.parent.element.appendChild(e)},i.prototype.renderTable=function(){var e=this.getPanel();e.appendChild(this.createHeaderTable()),this.setTable(e.querySelector("."+Mi)),this.parent.getFrozenColumns()||this.parent.getFrozenRightColumnsCount()||this.parent.getFrozenLeftColumnsCount()||(this.initializeHeaderDrag(),this.initializeHeaderDrop()),this.parent.notify(Ht,{rows:this.rows,args:{isFrozen:this.parent.isFrozenGrid()}})},i.prototype.getPanel=function(){return this.headerPanel},i.prototype.setPanel=function(e){this.headerPanel=e},i.prototype.getTable=function(){return this.headerTable},i.prototype.setTable=function(e){this.headerTable=e},i.prototype.getColGroup=function(){return this.colgroup},i.prototype.setColGroup=function(e){return this.colgroup=e},i.prototype.getRows=function(){return this.getTable().tHead.rows},i.prototype.createHeaderTable=function(){var e=this.createTable(),t=this.getPanel().querySelector("."+Fi);return t.appendChild(e),t},i.prototype.createHeader=function(e,i){void 0===e&&(e=null);var r=this.parent,n=r.isFrozenGrid();this.getTable()&&!n&&t.remove(this.getTable());var o=this.parent.createElement("table",{className:Mi,attrs:{cellspacing:"0.25px",role:"grid"}}),s=i||(r.getFrozenLeftCount()?"frozen-left":"frozen-right"),l=this.createHeaderContent(s),a=l.thead,h=this.parent.createElement(Ui,{className:this.parent.frozenRows?"":"e-hide"});this.caption=this.parent.createElement("caption",{innerHTML:this.parent.element.id+"_header_table",className:"e-hide"});for(var d,c=this.parent.createElement(ji),p=this.parent.createElement("tr"),u=this.rows=l.rows,g=0,f=u.length;g<f;g++)for(var m=0,y=u[g].cells.length;m<y;m++)d=this.parent.createElement("td"),p.appendChild(d);return(r.allowFiltering||r.allowSorting||r.allowGrouping)&&o.classList.add("e-sortfilter"),this.updateColGroup(c),h.appendChild(p),o.appendChild(this.setColGroup(c)),o.appendChild(a),o.appendChild(h),o.appendChild(this.caption),this.ariaService.setOptions(o,{colcount:r.getColumns().length.toString()}),o},i.prototype.createTable=function(e){return void 0===e&&(e=null),this.createHeader(e)},i.prototype.createHeaderContent=function(t){var i=this.parent,r=1,n=i.getFrozenMode(),o=i.getColumns(),s=this.parent.createElement("thead"),l=this.parent.createElement("tr",{className:"e-columnheader"}),a=new Vi(this.serviceLocator,e.CellType.Header,i);a.element=l;var h,d=[];this.colDepth=ve(i.columns);for(var c=0,p=this.colDepth;c<p;c++)d[c]=this.generateRow(c),d[c].cells=[];"Right"!==n&&(d=this.ensureColumns(d)),d=this.getHeaderCells(d,t),"Right"===n&&(r=0,d=this.ensureColumns(d));var u=this.parent.getFrozenColumns();if(this.parent.isRowDragable()&&this.parent.isFrozenGrid()&&d[0].cells[r]){var g=d[0].cells[r].column.getFreezeTableName();"movable"===g||n===Pi&&g===Ni?"Right"===n?d[0].cells.pop():d[0].cells.shift():u||g!==Li?"Right"===n&&g===Ni&&(d[0].cells[d[0].cells.length-1].column.freeze="Right"):d[0].cells[0].column.freeze=g===Li?"Left":"Right"}for(var c=0,p=this.colDepth;c<p;c++)h=a.render(d[c],o),this.parent.rowHeight&&h.querySelector(".e-headercell")&&(h.style.height=this.parent.rowHeight+"px"),s.appendChild(h);return{thead:s,rows:d}},i.prototype.updateColGroup=function(e){var i,r=this.parent.getColumns(),n=this.parent.getColumnIndexesInView();if(this.parent.enableColumnVirtualization&&this.parent.getFrozenColumns()&&this.parent.contentModule.isXaxis()&&(r=t.extend([],this.parent.getColumns())).splice(0,this.parent.getFrozenColumns()),e.id=this.parent.element.id+ji,this.parent.allowGrouping)for(var o=0,s=this.parent.groupSettings.columns.length;o<s;o++)this.parent.enableColumnVirtualization&&-1===n.indexOf(o)||(i=this.parent.createElement("col",{className:"e-group-intent"}),e.appendChild(i));(this.parent.detailTemplate||this.parent.childGrid)&&(i=this.parent.createElement("col",{className:"e-detail-intent"}),e.appendChild(i)),this.parent.isRowDragable()&&"Right"!==this.parent.getFrozenMode()&&(i=this.parent.createElement("col",{className:"e-drag-intent"}),e.appendChild(i));for(var o=0,s=r.length;o<s;o++)i=this.parent.createElement("col"),!1===r[o].visible&&t.setStyleAttribute(i,{display:"none"}),e.appendChild(i);return this.parent.isRowDragable()&&"Right"===this.parent.getFrozenMode()&&(i=this.parent.createElement("col",{className:"e-drag-intent"}),e.appendChild(i)),e},i.prototype.ensureColumns=function(t){for(var i=this.parent,r=this.parent.getColumnIndexesInView(),n=0,o=t.length;n<o;n++){if(i.allowGrouping)for(var s=0,l=i.groupSettings.columns.length;s<l;s++)this.parent.enableColumnVirtualization&&-1===r.indexOf(s)||t[n].cells.push(this.generateCell({},e.CellType.HeaderIndent));if(i.detailTemplate||i.childGrid){var a={};this.parent.notify("detail-indentcell-info",a),t[n].cells.push(this.generateCell(a,e.CellType.DetailHeader))}i.isRowDragable()&&t[n].cells.push(this.generateCell({},e.CellType.RowDragHIcon))}return t},i.prototype.getHeaderCells=function(e,t){var i=this.parent.getHeaderTable()&&this.parent.getHeaderTable().querySelector("thead"),r=this.parent.enableColumnVirtualization?this.parent.getColumns(this.parent.enablePersistence):this.parent.columns;if(this.frzIdx=0,this.notfrzIdx=0,this.parent.lockcolPositionCount)for(n=0;n<r.length;n++)this.lockColsRendered=!1,e=this.appendCells(r[n],e,0,0===n,!1,n===r.length-1,i,t);for(var n=0,o=r.length;n<o;n++)this.notfrzIdx=0,this.lockColsRendered=!0,e=this.appendCells(r[n],e,0,0===n,!1,n===o-1,i,t);return e},i.prototype.appendCells=function(t,i,r,n,o,s,l,a){var h,d=s?"e-lastcell":"",c=this.parent.isFrozenGrid(),p=!this.parent.lockcolPositionCount||t.lockColumn&&!this.lockColsRendered||!t.lockColumn&&this.lockColsRendered,u=!this.parent.lockcolPositionCount||t.lockColumn&&!this.lockColsRendered||!t.lockColumn&&this.lockColsRendered,g=this.parent.getContent().querySelector(".e-movablescrollbar");if(c&&g&&this.parent.enableColumnVirtualization&&(h=g.scrollLeft),t.columns){this.isFirstCol=!1;var f=this.getCellCnt(t,0);if(f){var m=this.getStackedLockColsCount(t,0),y=0===this.parent.lockcolPositionCount||!this.lockColsRendered&&0!==m||this.lockColsRendered&&f-m!=0,v=c&&this.ensureStackedFrozen(t.columns,a,!1);(!c&&y||v)&&i[r].cells.push(new Ci({cellType:e.CellType.StackedHeader,column:t,colSpan:this.getColSpan(f,m,t.columns,a,c)}))}if(this.parent.lockcolPositionCount&&!this.lockColsRendered)for(C=0;C<t.columns.length;C++)i=this.appendCells(t.columns[C],i,r+1,n,0===C,C===t.columns.length-1&&s,l,a);if(this.lockColsRendered)for(var C=0,w=t.columns.length;C<w;C++){var b=this.isFirstCol=t.columns[C].visible&&!this.isFirstCol&&1!==w,S=C===w-1;i=this.appendCells(t.columns[C],i,r+1,n,b,S&&s,l,a)}}else h&&h>0&&this.parent.contentModule.isXaxis()&&0!==this.parent.inViewIndexes[0]&&"movable"===t.getFreezeTableName()?i[r].cells.push(this.generateCell(t,e.CellType.Header,this.colDepth-r,(n?"":o?"e-firstcell":"")+d,r,this.parent.getColumnIndexByUid(t.uid))):(!c&&p||c&&t.getFreezeTableName()===a&&u)&&i[r].cells.push(this.generateCell(t,e.CellType.Header,this.colDepth-r,(n?"":o?"e-firstcell":"")+d,r,this.parent.getColumnIndexByUid(t.uid))),this.parent.lockcolPositionCount?this.frzIdx+this.notfrzIdx<this.parent.frozenColumns&&(t.lockColumn&&!this.lockColsRendered||!t.lockColumn&&this.lockColsRendered)?this.frzIdx++:this.notfrzIdx++:this.frzIdx++;return i},i.prototype.ensureStackedFrozen=function(e,t,i){for(var r=e.length,n=0;n<r;n++)if(e[n].columns)i=this.ensureStackedFrozen(e[n].columns,t,i);else if(e[n].getFreezeTableName()===t){i=!0;break}return i},i.prototype.getStackedLockColsCount=function(e,t){if(e.columns)for(var i=0;i<e.columns.length;i++)t=this.getStackedLockColsCount(e.columns[i],t);else e.lockColumn&&t++;return t},i.prototype.getColSpan=function(e,t,i,r,n){return n?e=this.getFrozenColSpan(i,r,0):this.parent.lockcolPositionCount&&(e=this.lockColsRendered?e-t:t),e},i.prototype.getFrozenColSpan=function(e,t,i){for(var r=e.length,n=0;n<r;n++)e[n].columns?i=this.getFrozenColSpan(e[n].columns,t,i):e[n].getFreezeTableName()===t&&e[n].visible&&i++;return i},i.prototype.generateRow=function(e){return new vi({})},i.prototype.generateCell=function(e,i,r,n,o,s){var l={visible:e.visible,isDataCell:!1,isTemplate:!t.isNullOrUndefined(e.headerTemplate),rowID:"",column:e,cellType:i,rowSpan:r,className:n,index:o,colIndex:s};return(!l.rowSpan||l.rowSpan<2)&&delete l.rowSpan,new Ci(l)},i.prototype.setVisible=function(e){for(var i,r,n=this.parent,o=n.getFrozenColumns(),s=0,l=e.length;s<l;s++){var a=e[s];if(r=n.getNormalizedColumnIndex(a.uid),i=a.visible?"":"none",o){var h=this.parent.isRowDragable()?o+1:o;if(r<h)t.setStyleAttribute(this.getColGroup().children[r],{display:i});else{var d=n.getHeaderContent().querySelector("."+Ii).querySelector(ji);t.setStyleAttribute(d.children[r-h],{display:i})}}else t.setStyleAttribute(this.getColGroup().children[r],{display:i})}this.refreshUI()},i.prototype.colPosRefresh=function(){this.refreshUI()},i.prototype.refreshUI=function(){var e=this.parent.isFrozenGrid(),i=this.parent.enableColumnVirtualization&&e,r=this.getPanel();this.toggleStackClass(r);var n=this.freezeReorder?this.headerPanel.querySelector("."+Ii).querySelector("."+Mi):this.getTable(),o=this.parent.isFrozenGrid()?this.parent.getFrozenLeftCount()?"frozen-left":"frozen-right":void 0;if(i&&(n=this.parent.contentModule.getVirtualFreezeHeader(),o=this.parent.contentModule.isXaxis()?"movable":o),n){t.remove(n),n.removeChild(n.firstChild),n.removeChild(n.childNodes[0]);var s=this.parent.createElement(ji),l=this.createHeaderContent(o);this.rows=l.rows,n.insertBefore(l.thead,n.firstChild),this.updateColGroup(s),n.insertBefore(this.setColGroup(s),n.firstChild),i||this.setTable(n),this.appendContent(n),this.parent.notify(qt,{}),this.widthService.setWidthToColumns(),this.parent.updateDefaultCursor(),(!e||this.parent.enableColumnVirtualization&&e)&&this.initializeHeaderDrag();for(var a=[].slice.call(r.querySelectorAll("tr.e-columnheader")),h=0,d=a;h<d.length;h++){var c=d[h],p=[].slice.call(c.getElementsByClassName("e-grouptopleftcell"));p.length&&p[p.length-1].classList.add("e-lastgrouptopleftcell")}e||this.parent.notify(Ht,{rows:this.rows,args:{isFrozen:e}}),this.parent.enableColumnVirtualization&&O(n,Ii)&&this.parent.notify(Ht,{rows:this.rows,args:{isFrozen:!1,isXaxis:!0}}),this.parent.allowTextWrap&&"Header"===this.parent.textWrapSettings.wrapMode&&J(a,!0)}},i.prototype.toggleStackClass=function(e){this.parent.columns.some(function(e){return!t.isNullOrUndefined(e.columns)})?e.classList.add("e-stackedheader"):e.classList.remove("e-stackedheader")},i.prototype.appendContent=function(e){this.getPanel().querySelector("."+Fi).appendChild(e)},i.prototype.getCellCnt=function(e,t){if(e.columns)for(var i=0,r=e.columns.length;i<r;i++)t=this.getCellCnt(e.columns[i],t);else e.visible&&t++;return t},i.prototype.initializeHeaderDrag=function(){var e=this.parent;(this.parent.allowReordering||this.parent.allowGrouping&&this.parent.groupSettings.showDropArea)&&(this.draggable=new t.Draggable(e.getHeaderContent(),{dragTarget:".e-headercell",distance:5,helper:this.helper,dragStart:this.dragStart,drag:this.drag,dragStop:this.dragStop,abort:".e-rhandler",isReplaceDragEle:this.isReplaceDragEle}))},i.prototype.initializeHeaderDrop=function(){var e=this.parent;new t.Droppable(e.getHeaderContent(),{accept:".e-dragclone",drop:this.drop})},i.prototype.renderCustomToolbar=function(){var e=this,t=this.parent;if("Vertical"===t.rowRenderingMode&&!t.toolbar&&(t.allowSorting||t.allowFiltering&&"FilterBar"!==t.filterSettings.type)){for(var i=t.createElement("div",{className:"e-res-toolbar e-toolbar"}),r=t.createElement("div",{className:"e-toolbar-items"}),o=t.createElement("div",{className:"e-toolbar-left"}),s=this.parent.allowFiltering&&this.parent.allowSorting?2:1,l=0;l<s;l++){var a=t.createElement("div",{className:"e-toolbar-item e-gridresponsiveicons e-icons e-tbtn-align"}),h=1===s?this.parent.allowSorting?"sort":"filter":1===l?"sort":"filter",d=t.createElement("button",{className:"e-tbar-btn e-control e-btn e-lib e-icon-btn"}),c=t.createElement("span",{className:"e-btn-icon e-res"+h+"-icon e-icons"});d.appendChild(c),new n.Button({}).appendTo(d),d.onclick=function(t){t.target.classList.contains("e-ressort-btn")||t.target.classList.contains("e-ressort-icon")?e.parent.showResponsiveCustomSort():e.parent.showResponsiveCustomFilter()},a.appendChild(d),o.appendChild(a)}r.appendChild(o),i.appendChild(r),t.element.insertBefore(i,this.parent.element.querySelector("."+Si))}else t.toolbar||t.getContent().classList.add("e-responsive-header")},i.prototype.updateCustomResponsiveToolbar=function(e){var i=this.parent.element.querySelector(".e-responsive-toolbar");"toolbar"===e.module&&(i?t.remove(i):this.renderCustomToolbar())},i}(),$i=function(){function i(e,t){this.localizer=t.getService("localization"),this.formatter=t.getService("valueFormatter"),this.parent=e,this.element=this.parent.createElement("TD",{className:bi,attrs:{role:"gridcell",tabindex:"-1"}}),this.rowChkBox=this.parent.createElement("input",{className:"e-checkselect",attrs:{type:"checkbox"}})}return i.prototype.getGui=function(){return""},i.prototype.format=function(e,i,r){return t.isNullOrUndefined(e.format)||("number"===e.type&&isNaN(parseInt(i,10))&&(i=null),i=this.formatter.toView(i,e.getFormatter())),t.isNullOrUndefined(i)?"":i.toString()},i.prototype.evaluate=function(e,i,r,n,o,s){var l,a;if(i.column.template){var h=this.parent.isReact&&"string"!=typeof i.column.template,d=["index"],c=me({},r,(l={},l.foreignKeyData=o,l.column=i.column,l)),p=this.parent.element.id+i.column.uid,u="isStringTemplate";if(h){var g={index:n[d[0]]};i.column.getColumnTemplate()(t.extend(g,c),this.parent,"columnTemplate",p,this.parent[u],null,e),this.parent.renderTemplates()}else a=i.column.getColumnTemplate()(t.extend({index:n[d[0]]},c),this.parent,"template",p,this.parent[u]);return h||q(e,a),this.parent.notify("template-result",{template:a}),a=null,e.setAttribute("aria-label",e.innerText+" is template cell column header "+i.column.headerText),!1}return!0},i.prototype.invokeFormatter=function(e,i,r){return t.isNullOrUndefined(e.formatter)||(i=u(e.formatter,"getValue")?(new(0,e.formatter)).getValue(e,r):"function"==typeof e.formatter?e.formatter(e,r):e.formatter.getValue(e,r)),i},i.prototype.render=function(e,t,i,r,n){return this.refreshCell(e,t,i,n)},i.prototype.refreshTD=function(e,i,r,n){var o="Batch"===this.parent.editSettings.mode&&e.classList.contains("e-editedbatchcell");if(this.parent.isReact){e.innerHTML="";var s=e.cellIndex,l=e.parentElement;t.remove(e);var a=this.refreshCell(i,r,n,o);this.cloneAttributes(a,e),l.cells.length!==s-1?l.insertBefore(a,l.cells[s]):l.appendChild(a)}else{var h=this.refreshCell(i,r,n,o);e.innerHTML="",e.setAttribute("aria-label",h.getAttribute("aria-label"));for(var d=0,c=[].slice.call(h.childNodes);d<c.length;d++){var p=c[d];e.appendChild(p)}}},i.prototype.cloneAttributes=function(e,t){for(var i,r=t.attributes,n=r.length;n--;)i=r[n],e.setAttribute(i.name,i.value)},i.prototype.refreshCell=function(e,i,r,o){var s,l,a=this.element.cloneNode(),h=e.column;e.isForeignKey&&(l=e.foreignKeyData[0]||(s={},s[h.foreignKeyValue]=h.format?null:"",s));var d=this.getGui(),c=e.isForeignKey?this.getValue(h.foreignKeyValue,l,h):this.getValue(h.field,i,h);if("date"!==h.type&&"datetime"!==h.type||t.isNullOrUndefined(c)||(c=new Date(c)),c=this.format(h,c,i),d=c.toString(),"boolean"===h.type&&!h.displayAsCheckBox){var p="true"!==c&&"false"!==c?null:"true"===c?"True":"False";d=p?this.localizer.getConstant(p):d}var u=this.invokeFormatter(h,c,i);if(d=t.isNullOrUndefined(h.formatter)?d:t.isNullOrUndefined(u)?"":u.toString(),a.setAttribute("aria-label",d+" column header "+e.column.headerText),this.evaluate(a,e,i,r,l,o)&&"checkbox"!==h.type?this.appendHtml(a,d,h.getDomSetter?h.getDomSetter():"innerHTML"):"checkbox"===h.type&&(a.classList.add(ki),a.setAttribute("aria-label","checkbox"),c=!!this.parent.selectionSettings.persistSelection&&"true"===c,(f=n.createCheckBox(this.parent.createElement,!1,{checked:c,label:" "})).insertBefore(this.rowChkBox.cloneNode(),f.firstChild),a.appendChild(f)),"Check"===this.parent.checkAllRows&&this.parent.enableVirtualization&&(e.isSelected=!0),this.setAttributes(a,e,r),"boolean"===h.type&&h.displayAsCheckBox){var g=isNaN(parseInt(c.toString(),10))?"true"===c:parseInt(c.toString(),10)>0,f=n.createCheckBox(this.parent.createElement,!1,{checked:g,label:" "});a.innerHTML="",f.classList.add("e-checkbox-disabled"),a.appendChild(f),a.setAttribute("aria-label",g+" column header "+e.column.headerText)}return a},i.prototype.appendHtml=function(e,t,i){return void 0===i&&(i="innerHTML"),e[i]=t,e},i.prototype.setAttributes=function(e,t,i){var r=t.column;this.buildAttributeFromCell(e,t,"checkbox"===r.type),F(e,i),F(e,t.attributes),r.customAttributes&&F(e,r.customAttributes),"Vertical"===this.parent.rowRenderingMode&&F(e,{"data-cell":r.headerText}),r.textAlign&&(e.style.textAlign=r.textAlign),"Clip"===r.clipMode||!r.clipMode&&"Clip"===this.parent.clipMode?e.classList.add("e-gridclip"):("EllipsisWithTooltip"===r.clipMode||!r.clipMode&&"EllipsisWithTooltip"===this.parent.clipMode)&&"checkbox"!==r.type&&e.classList.add("e-ellipsistooltip")},i.prototype.buildAttributeFromCell=function(i,r,n){var o={},s={colindex:qi},l=[];r.colSpan&&(o.colSpan=r.colSpan),r.rowSpan&&(o.rowSpan=r.rowSpan),r.isTemplate&&l.push("e-templatecell"),r.isSelected&&(l.push.apply(l,["e-selectionbackground","e-active"]),n&&i.querySelector(".e-frame").classList.add("e-check")),r.isColumnSelected&&l.push.apply(l,["e-columnselection"]),r.cellType===e.CellType.Header?o[s.colindex]=r.colIndex:t.isNullOrUndefined(r.index)||(o[s.colindex]=r.index),r.visible||l.push("e-hide"),o.class=l,F(i,o)},i.prototype.getValue=function(e,t,i){return i.valueAccessor(e,t,i)},i}(),er=function(){function e(){}return e.prototype.setOptions=function(e,t){for(var i=Object.keys(t),r=0;r<i.length;r++)c(e,tr[i[r]],t[i[r]])},e.prototype.setExpand=function(e,t){c(e,tr.expand,t)},e.prototype.setSort=function(e,t){c(e,tr.sort,t,"boolean"==typeof t)},e.prototype.setBusy=function(e,t){c(e,tr.busy,t),c(e,tr.invalid,null,!0)},e.prototype.setGrabbed=function(e,t,i){c(e,tr.grabbed,t,i)},e.prototype.setDropTarget=function(e,t){c(e,tr.dropeffect,"copy",!t)},e}(),tr={expand:"aria-expanded",role:"role",selected:"aria-selected",multiselectable:"aria-multiselectable",sort:"aria-sort",busy:"aria-busy",invalid:"aria-invalid",grabbed:"aria-grabbed",dropeffect:"aria-dropeffect",haspopup:"aria-haspopup",level:"aria-level",colcount:"aria-colcount",rowcount:"aria-rowcount"},ir=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rr=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TH",{className:"e-headercell",attrs:{role:"columnheader",tabindex:"-1"}}),t.ariaService=new er,t.hTxtEle=t.parent.createElement("span",{className:"e-headertext"}),t.sortEle=t.parent.createElement("div",{className:"e-sortfilterdiv e-icons"}),t.gui=t.parent.createElement("div"),t.chkAllBox=t.parent.createElement("input",{className:"e-checkselectall",attrs:{type:"checkbox"}}),t}return ir(i,e),i.prototype.getGui=function(){return this.gui.cloneNode()},i.prototype.render=function(e,t,i){var r=this.element.cloneNode(),n=this.parent.createElement("div",{className:"e-filtermenudiv e-icons e-icon-filter"});return this.prepareHeader(e,r,n)},i.prototype.refresh=function(e,t){this.clean(t);var i=this.parent.createElement("div",{className:"e-filtermenudiv e-icons e-icon-filter"});return this.prepareHeader(e,t,i)},i.prototype.clean=function(e){e.innerHTML=""},i.prototype.prepareHeader=function(e,i,r){var o,s=e.column,l={},a=this.getGui();if(t.attributes(a,{"e-mappinguid":s.uid,class:"e-headercelldiv"}),t.isNullOrUndefined(s.headerValueAccessor)||(o=this.getValue(s.headerText,s)),"checkbox"!==s.type){var h=s.headerText;t.isNullOrUndefined(o)||(h=o);var d=this.hTxtEle.cloneNode();d[s.getDomSetter()]=h,a.appendChild(d)}else{s.editType="booleanedit";var c=n.createCheckBox(this.parent.createElement,!1,{checked:!1,label:" "});c.insertBefore(this.chkAllBox.cloneNode(),c.firstChild),a.appendChild(c),a.classList.add("e-headerchkcelldiv")}if(this.buildAttributeFromCell(i,e),this.appendHtml(i,a),i.appendChild(this.sortEle.cloneNode()),this.parent.allowFiltering&&"FilterBar"!==this.parent.filterSettings.type&&s.allowFiltering&&!t.isNullOrUndefined(s.field)&&(!this.parent.showColumnMenu||!s.showColumnMenu)){t.attributes(r,{"e-mappinguid":"e-flmenu-"+s.uid}),i.classList.add("e-fltr-icon");var p=[];if(this.parent.filterSettings.columns.length&&this.parent.filterSettings.columns.length!==p.length)for(var u=this.parent.getForeignKeyColumns(),g=0;g<this.parent.columns.length;g++)for(var f=0;f<this.parent.filterSettings.columns.length;f++)if(this.parent.filterSettings.columns[f].field===s.field||u.length&&s.foreignKeyValue===this.parent.filterSettings.columns[f].field){r.classList.add("e-filtered"),p.push(s.field);break}i.appendChild(r.cloneNode())}e.className&&i.classList.add(e.className),s.customAttributes&&F(i,s.customAttributes),s.allowSorting&&(l.sort="none"),s.allowGrouping&&(l.grabbed=!1),i=this.extendPrepareHeader(s,i);var m,y=this.parent,v=y.getColumnIndexByField(s.field);if(!t.isNullOrUndefined(s.headerTemplate)){var C=y.element.id+s.uid+"headerTemplate",w="isStringTemplate",b=s;if(this.parent.isReact&&"string"!=typeof s.headerTemplate){var S={index:v};i.firstElementChild.innerHTML="",s.getHeaderTemplate()(t.extend(S,b),y,"headerTemplate",C,this.parent[w],null,i.firstElementChild),this.parent.renderTemplates()}else m=s.getHeaderTemplate()(t.extend({index:v},b),y,"headerTemplate",C,this.parent[w]),i.firstElementChild.innerHTML="",q(i.firstElementChild,m)}if(this.ariaService.setOptions(i,l),!t.isNullOrUndefined(s.headerTextAlign)||!t.isNullOrUndefined(s.textAlign)){var R=s.headerTextAlign||s.textAlign;a.style.textAlign=R,"Right"===R||"Left"===R?i.classList.add("Right"===R?"e-rightalign":"e-leftalign"):"Center"===R&&i.classList.add("e-centeralign")}return"Clip"===s.clipMode||!s.clipMode&&"Clip"===this.parent.clipMode?i.classList.add("e-gridclip"):("EllipsisWithTooltip"===s.clipMode||!s.clipMode&&"EllipsisWithTooltip"===this.parent.clipMode)&&"checkbox"!==s.type&&i.classList.add("e-ellipsistooltip"),i.setAttribute("aria-rowspan",(t.isNullOrUndefined(e.rowSpan)?1:e.rowSpan).toString()),i.setAttribute("aria-colspan","1"),this.parent.trigger("headerCellInfo",{cell:e,node:i}),i},i.prototype.getValue=function(e,t){return t.headerValueAccessor(e,t)},i.prototype.extendPrepareHeader=function(e,i){if(this.parent.showColumnMenu&&e.showColumnMenu&&!t.isNullOrUndefined(e.field)){var r=this.parent.createElement("div",{className:"e-icons e-columnmenu"}),n=[];if(this.parent.filterSettings.columns.length&&this.parent.filterSettings.columns.length!==n.length)for(var o=0;o<this.parent.columns.length;o++)for(var s=0;s<this.parent.filterSettings.columns.length;s++)if(this.parent.filterSettings.columns[s].field===e.field){r.classList.add("e-filtered"),n.push(e.field);break}i.classList.add("e-fltr-icon"),i.appendChild(r)}if(this.parent.allowResizing){var l=this.parent.createElement("div");l.className=e.allowResizing?"e-rhandler e-rcursor":"e-rsuppress",i.appendChild(l)}return i},i.prototype.appendHtml=function(e,t){return e.appendChild(t),e},i}($i),nr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),or=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TH",{className:"e-headercell e-stackedheadercell",attrs:{role:"columnheader",tabindex:"-1"}}),t}return nr(i,e),i.prototype.render=function(e,i,r){var n=this.element.cloneNode(),o=this.parent.createElement("div",{className:"e-stackedheadercelldiv",attrs:{"e-mappinguid":e.column.uid}}),s=e.column;if(n.appendChild(o),t.isNullOrUndefined(s.headerTemplate)?this.appendHtml(o,s.headerText,s.getDomSetter()):q(o,s.getHeaderTemplate()(s,this.parent,"headerTemplate")),e.column.toolTip&&n.setAttribute("title",e.column.toolTip),"Clip"===s.clipMode||!s.clipMode&&"Clip"===this.parent.clipMode?n.classList.add("e-gridclip"):("EllipsisWithTooltip"===s.clipMode||!s.clipMode&&"EllipsisWithTooltip"===this.parent.clipMode)&&n.classList.add("e-ellipsistooltip"),t.isNullOrUndefined(e.column.textAlign)||(o.style.textAlign=e.column.textAlign),e.column.customAttributes&&F(n,e.column.customAttributes),n.setAttribute("colspan",e.colSpan.toString()),n.setAttribute("aria-colspan",e.colSpan.toString()),n.setAttribute("aria-rowspan","1"),this.parent.allowResizing){var l=this.parent.createElement("div");l.className=e.column.allowResizing?"e-rhandler e-rcursor":"e-rsuppress",n.appendChild(l)}return this.parent.trigger("headerCellInfo",{cell:e,node:n}),n},i}($i),sr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TD",{className:"e-indentcell"}),t}return sr(t,e),t.prototype.render=function(e,t){var i=this.element.cloneNode();return F(i,e.attributes),i},t}($i),ar=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),hr=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TD",{className:"e-groupcaption",attrs:{id:t.parent.element.id+"captioncell",role:"gridcell",tabindex:"-1"}}),t}return ar(i,e),i.prototype.render=function(e,i){var r,n,o=this.element.cloneNode(),s=this.parent;i.headerText=e.column.headerText,e.isForeignKey&&(n=this.format(e.column,e.column.valueAccessor("foreignKey",i,e.column)));var l=e.isForeignKey?n:e.column.enableGroupByFormat?i.key:this.format(e.column,e.column.valueAccessor("key",i,e.column));if(t.isNullOrUndefined(s.groupSettings.captionTemplate))s.groupSettings.enableLazyLoading?o.innerHTML=e.column.headerText+": "+l:o.innerHTML=e.column.headerText+": "+l+" - "+i.count+" "+(i.count<2?this.localizer.getConstant("Item"):this.localizer.getConstant("Items"));else{var a=this.parent.isReact&&"string"!=typeof s.groupSettings.captionTemplate;if(a){var h=s.element.id+"captionTemplate";x(s.groupSettings.captionTemplate)(i,this.parent,"captionTemplate",h,null,null,o),this.parent.renderTemplates()}else r=this.parent.isVue?x(s.groupSettings.captionTemplate)(i,this.parent):x(s.groupSettings.captionTemplate)(i);a||q(o,r)}return o.setAttribute("colspan",e.colSpan.toString()),o.setAttribute("aria-label",o.innerHTML+" is groupcaption cell"),o.setAttribute("title",o.innerHTML),o},i}($i),dr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TD",{className:"e-groupcaption"}),t}return ar(t,e),t.prototype.render=function(e,t){var i=this.element.cloneNode();return i.innerHTML=" ",i.setAttribute("colspan",e.colSpan.toString()),i},t}($i),cr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),pr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cr(t,e),t.prototype.render=function(e,t,i,r){var n=this.element.cloneNode();return n.className=r?"e-recordplusexpand":"e-recordpluscollapse",n.setAttribute("ej-mappingname",t.field),n.setAttribute("ej-mappingvalue",t.key),n.setAttribute("aria-expanded",r?"true":"false"),n.setAttribute("tabindex","-1"),n.appendChild(this.parent.createElement("div",{className:r?"e-icons e-gdiagonaldown e-icon-gdownarrow":"e-icons e-gnextforward e-icon-grightarrow"})),n},t}(lr),ur=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),gr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TH",{className:"e-grouptopleftcell"}),t}return ur(t,e),t.prototype.render=function(e,t){var i=this.element.cloneNode();return i.appendChild(this.parent.createElement("div",{className:"e-headercelldiv e-emptycell",innerHTML:""})),i},t}($i),fr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TH",{className:"e-detailheadercell"}),t}return fr(t,e),t.prototype.render=function(e,t){var i=this.element.cloneNode();return i.appendChild(this.parent.createElement("div",{className:"e-emptycell"})),i},t}($i),yr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vr=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TD",{className:"e-detailrowcollapse",attrs:{"aria-expanded":"false",role:"gridcell",tabindex:"-1"}}),t}return yr(i,e),i.prototype.render=function(e,i,r){var n=this.element.cloneNode();return r&&!t.isNullOrUndefined(r.class)?(n.className="",n.className=r.class,n.appendChild(this.parent.createElement("div",{className:"e-icons e-dtdiagonaldown e-icon-gdownarrow"}))):n.appendChild(this.parent.createElement("div",{className:"e-icons e-dtdiagonalright e-icon-grightarrow"})),n},i}($i),Cr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),wr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TD",{className:"e-rowdragdrop",attrs:{role:"gridcell",tabindex:"-1"}}),t}return Cr(t,e),t.prototype.render=function(e,t){var i=this.element.cloneNode();return i.appendChild(this.parent.createElement("div",{className:"e-icons e-rowcelldrag e-dtdiagonalright e-icon-rowdragicon"})),e.isSelected&&(i.classList.add("e-selectionbackground"),i.classList.add("e-active")),i},t}($i),br=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Sr=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TH",{className:"e-rowdragheader"}),t}return br(i,e),i.prototype.render=function(e,i){var r=this.element.cloneNode();return r.appendChild(t.createElement("div",{className:"e-emptycell"})),r},i}($i),Rr=function(){function r(e,t){this.emptyGrid=!1,this.counter=0,this.parent=e,this.locator=t,this.data=new yi(e,t),this.l10n=t.getService("localization"),this.ariaService=this.locator.getService("ariaService"),this.renderer=this.locator.getService("rendererFactory"),this.addEventListener()}return r.prototype.render=function(){var t=this.parent;this.headerRenderer=this.renderer.getRenderer(e.RenderType.Header),this.contentRenderer=this.renderer.getRenderer(e.RenderType.Content),this.headerRenderer.renderPanel(),this.contentRenderer.renderPanel(),t.getColumns().length&&(this.isLayoutRendered=!0,this.headerRenderer.renderTable(),this.contentRenderer.renderTable(),this.emptyRow(!1)),this.parent.scrollModule.setWidth(),this.parent.scrollModule.setHeight(),"auto"!==this.parent.height&&this.parent.scrollModule.setPadding(),this.refreshDataManager()},r.prototype.refresh=function(e){var t=this;void 0===e&&(e={requestType:"refresh"});var i=this.parent;i.notify(e.requestType+"-begin",e),i.trigger(bt,e,function(e){if(void 0===e&&(e={requestType:"refresh"}),e.cancel)return void i.notify("cancel-Begin",e);if("delete"===e.requestType&&i.allowPaging){var r=e.data.length,n=i.pageSettings.totalRecordsCount-r;i.getCurrentViewRecords().length-r||!n||(i.pageSettings.currentPage-1)*i.pageSettings.pageSize!==n||(i.prevPageMoving=!0,i.setProperties({pageSettings:{totalRecordsCount:n,currentPage:Math.ceil(n/i.pageSettings.pageSize)}},!0),i.pagerModule.pagerObj.totalRecordsCount=n)}"reorder"===e.requestType&&t.parent.dataSource&&"result"in t.parent.dataSource?t.contentRenderer.refreshContentRows(e):("paging"===e.requestType||"columnstate"===e.requestType||"reorder"===e.requestType)&&t.parent.groupSettings.enableLazyLoading&&t.parent.groupSettings.columns.length&&t.parent.contentModule.getGroupCache()[t.parent.pageSettings.currentPage]?t.contentRenderer.refreshContentRows(e):t.refreshDataManager(e)})},r.prototype.resetTemplates=function(){var e=this.parent,i=e.getColumns();if(e.detailTemplate){var r=e.element.id+"detailTemplate";t.blazorTemplates[r]=[],t.resetBlazorTemplate(r,"DetailTemplate")}e.groupSettings.captionTemplate&&t.resetBlazorTemplate(e.element.id+"captionTemplate","CaptionTemplate"),e.rowTemplate&&t.resetBlazorTemplate(e.element.id+"rowTemplate","RowTemplate"),e.toolbarTemplate&&t.resetBlazorTemplate(e.element.id+"toolbarTemplate","ToolbarTemplate"),e.pageSettings.template&&t.resetBlazorTemplate(e.element.id+"_template","pageSettings");for(var n=0;n<i.length;n++)i[n].template&&(t.blazorTemplates[e.element.id+i[n].uid]=[],t.resetBlazorTemplate(e.element.id+i[n].uid,"Template")),i[n].headerTemplate&&t.resetBlazorTemplate(e.element.id+i[n].uid+"headerTemplate","HeaderTemplate"),i[n].filterTemplate&&t.resetBlazorTemplate(e.element.id+i[n].uid+"filterTemplate","FilterTemplate");for(var o=0;o<e.aggregates.length;o++)for(var s=0;s<e.aggregates[o].columns.length;s++){if(e.aggregates[o].columns[s].footerTemplate){l=e.element.id+e.aggregates[o].columns[s].guid+"footerTemplate";t.resetBlazorTemplate(l,"FooterTemplate")}if(e.aggregates[o].columns[s].groupFooterTemplate){l=e.element.id+e.aggregates[o].columns[s].guid+"groupFooterTemplate";t.resetBlazorTemplate(l,"GroupFooterTemplate")}if(e.aggregates[o].columns[s].groupCaptionTemplate){var l=e.element.id+e.aggregates[o].columns[s].guid+"groupCaptionTemplate";t.resetBlazorTemplate(l,"GroupCaptionTemplate")}}},r.prototype.refreshComplete=function(e){this.parent.trigger(St,e)},r.prototype.refreshDataManager=function(e){var t=this;void 0===e&&(e={}),"virtualscroll"!==e.requestType&&this.parent.showSpinner(),this.parent.notify("reset-infinite-blocks",e),this.emptyGrid=!1;var r,n=this.isNeedForeignAction();if(this.ariaService.setBusy(this.parent.getContent().querySelector("."+Di),!0),n){var o=new i.Deferred;r=this.getFData(o,e)}if(r=r?r.then(function(r){var n=t.data.generateQuery().requiresCount();if(t.emptyGrid){var o=new i.Deferred;return o.resolve({result:[],count:0}),o.promise}return t.data.getData(e,n)}):this.data.getData(e,this.data.generateQuery().requiresCount()),this.parent.getForeignKeyColumns().length&&(!n||this.parent.searchSettings.key.length)){var s=new i.Deferred;r=r.then(function(i){return t.parent.notify("getForeignKeyData",{dataManager:r,result:i,promise:s,action:e}),s.promise})}this.parent.groupSettings.disablePageWiseAggregates&&this.parent.groupSettings.columns.length&&(r=r.then(function(e){return t.validateGroupRecords(e)})),r.then(function(i){return t.dataManagerSuccess(i,e)}).catch(function(i){return t.dataManagerFailure(i,e)})},r.prototype.getFData=function(e,t){return this.parent.notify("getForeignKeyData",{isComplex:!0,promise:e,action:t}),e.promise},r.prototype.isNeedForeignAction=function(){var e=this.parent;return!!(e.allowFiltering&&e.filterSettings.columns.length||e.searchSettings.key.length)&&this.foreignKey(this.parent.getForeignKeyColumns())},r.prototype.foreignKey=function(e){var t=this;return e.some(function(e){return!(!t.parent.filterSettings.columns.some(function(t){return e.uid===t.uid})&&!t.parent.searchSettings.key.length)})},r.prototype.sendBulkRequest=function(e){var t=this;e.requestType="batchsave";var i=this.data.saveChanges(e.changes,this.parent.getPrimaryKeyFieldNames()[0],e.original),r=this.data.generateQuery().requiresCount();if(this.data.dataManager.dataSource.offline)return void this.refreshDataManager({requestType:"batchsave"});i.then(function(i){t.data.getData(e,r).then(function(i){return t.dmSuccess(i,e)}).catch(function(i){return t.dmFailure(i,e)})}).catch(function(i){return t.dmFailure(i,e)})},r.prototype.dmSuccess=function(e,t){this.dataManagerSuccess(e,t)},r.prototype.dmFailure=function(e,t){this.dataManagerFailure(e,t)},r.prototype.renderEmptyRow=function(){this.emptyRow(!0)},r.prototype.emptyRow=function(e){var i=this.parent,r=this.contentRenderer.getTable().querySelector(Ui);t.isNullOrUndefined(r)||t.remove(r),r=this.parent.createElement(Ui);var n=0;(i.detailTemplate||i.childGrid)&&++n;var o=this.parent.createElement("tr",{className:"e-emptyrow"});o.appendChild(this.parent.createElement("td",{innerHTML:this.l10n.getConstant("EmptyRecord"),attrs:{colspan:(i.getVisibleColumns().length+n).toString()}})),r.appendChild(o),this.contentRenderer.renderEmpty(r),e&&(this.parent.trigger(Rt,{}),this.parent.notify(Pt,{rows:[new vi({isDataRow:!0,cells:[new Ci({isDataCell:!0,visible:!0})]})]}))},r.prototype.dynamicColumnChange=function(){this.parent.getCurrentViewRecords().length&&this.updateColumnType(this.parent.getCurrentViewRecords()[0])},r.prototype.updateColumnType=function(e){for(var i,r=this.parent.getColumns(),n=e&&e.items?e.items[0]:e,o=this.locator.getService("valueFormatter"),s=0,l=r.length;s<l;s++){i=pe(r[s].field||"",n),t.isNullOrUndefined(r[s].customFormat)||(r[s].format=r[s].customFormat),t.isNullOrUndefined(r[s].validationRules)||t.isNullOrUndefined(r[s].validationRules.equalTo)||(r[s].validationRules.equalTo[0]=this.parent.element.id+r[s].validationRules.equalTo[0]),r[s].isForeignColumn()&&r[s].columnData&&(i=pe(r[s].foreignKeyValue||"",r[s].columnData[0])),t.isNullOrUndefined(i)?r[s].type=r[s].type||null:(this.isColTypeDef=!0,r[s].type||(r[s].type=i.getDay?i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0||i.getMilliseconds()>0?"datetime":"date":typeof i));var a=new yt;if(r[s].format&&(r[s].format.skeleton||r[s].format.format)&&(r[s].setFormatter(a.getFormatFunction(t.extend({},r[s].format))),r[s].setParser(a.getParserFunction(r[s].format))),"string"==typeof r[s].format){var h=this.parent.isServerRendered||this.parent.printModule.isPrintGrid();Y(this.locator,r[s],h)}else r[s].format||"number"!==r[s].type||r[s].setParser(o.getParserFunction({format:"n2"}))}},r.prototype.dataManagerSuccess=function(i,r){var n=this,o=this.parent;this.contentRenderer=this.renderer.getRenderer(e.RenderType.Content),this.headerRenderer=this.renderer.getRenderer(e.RenderType.Header),i.actionArgs=r;var s=this.parent.enableInfiniteScrolling&&!this.parent.infiniteScrollSettings.enableCache&&("delete"===r.requestType||"save"===r.requestType&&"add"===this.parent.infiniteScrollModule.requestType);o.trigger("beforeDataBound",i,function(e){if(!e.cancel){e.result=t.isNullOrUndefined(e.result)?[]:e.result;var l=Object.keys(e.result).length;if(!n.parent.isDestroyed){if(!(o.getColumns().length||l||o.columns.length&&o.columns[0]instanceof Ct))return void o.hideSpinner();if(n.isInfiniteEnd(r)&&!l)return void n.parent.notify("infinite-edit-handler",{e:r,result:i.result,count:i.count,agg:i.aggregates});if(n.parent.isEdit=!1,n.parent.notify("edit-reset",{}),n.parent.notify("tooltip-destroy",{}),n.contentRenderer.prevCurrentView=n.parent.currentViewData.slice(),o.currentViewData=e.result,o.notify("refresh-infinite-current-view-data",{args:r,data:e.result}),!l&&e.count&&o.allowPaging&&r&&"delete"!==r.requestType)return!n.parent.groupSettings.enableLazyLoading||"grouping"!==r.requestType&&"ungrouping"!==r.requestType||n.parent.notify("grouping-complete",r),o.prevPageMoving=!0,o.pageSettings.totalRecordsCount=e.count,"paging"!==r.requestType&&(o.pageSettings.currentPage=Math.ceil(e.count/o.pageSettings.pageSize)),void o.dataBind();if((o.getColumns().length||!l)&&n.isLayoutRendered||ce(o)||n.updatesOnInitialRender(e),!n.isColTypeDef&&o.getCurrentViewRecords()&&(n.data.dataManager.dataSource.offline&&o.dataSource&&o.dataSource.length?n.updateColumnType(o.dataSource[0]):n.updateColumnType(o.getCurrentViewRecords()[0])),n.parent.isInitialLoad||!n.parent.groupSettings.disablePageWiseAggregates||n.parent.groupSettings.columns.length||(e.result=n.parent.dataSource instanceof Array?n.parent.dataSource:n.parent.currentViewData),n.parent.notify(kt,t.extend({count:e.count,result:e.result,aggregates:e.aggregates},r)),(o.groupSettings.columns.length||r&&"ungrouping"===r.requestType)&&r&&"filtering"!==r.requestType&&n.headerRenderer.refreshUI(),l){if(ce(o)){r.scrollTop={top:n.contentRenderer.content.scrollTop}}s?n.parent.notify("infinite-edit-handler",{e:r,result:i.result,count:i.count,agg:i.aggregates}):n.parent.enableImmutableMode?n.contentRenderer.immutableModeRendering(r):n.contentRenderer.refreshContentRows(r)}else{if(!o.getColumns().length)return o.element.innerHTML="",void alert(n.l10n.getConstant("EmptyDataSourceError"));if(n.contentRenderer.setRowElements([]),n.contentRenderer.setRowObjects([]),n.ariaService.setBusy(n.parent.getContent().querySelector("."+Di),!1),n.renderEmptyRow(),r){var a=(r.requestType||"").toLowerCase()+"-complete";n.parent.notify(a,r),"batchsave"===r.requestType&&(r.cancel=!1,r.rows=[],r.isFrozen=0!==n.parent.getFrozenColumns()&&!r.isFrozen,n.parent.trigger(St,r))}n.parent.hideSpinner()}n.parent.notify("toolbar-refresh",{}),n.setRowCount(n.parent.getCurrentViewRecords().length),n.parent.getDataModule().isQueryInvokedFromData=!1}}})},r.prototype.dataManagerFailure=function(e,t){this.ariaService.setOptions(this.parent.getContent().querySelector("."+Di),{busy:!1,invalid:!0}),this.setRowCount(1),this.parent.trigger("actionFailure",{error:e}),this.parent.hideSpinner(),"save"!==t.requestType&&"delete"!==t.requestType&&"bulk-save"!==t.name&&(this.parent.currentViewData=[],this.renderEmptyRow(),this.parent.log("actionfailure",{error:e}))},r.prototype.setRowCount=function(e){this.ariaService.setOptions(this.parent.getHeaderTable(),{rowcount:e?e.toString():"1"})},r.prototype.isInfiniteEnd=function(e){return this.parent.enableInfiniteScrolling&&!this.parent.infiniteScrollSettings.enableCache&&"delete"===e.requestType},r.prototype.updatesOnInitialRender=function(e){this.isLayoutRendered=!0,this.parent.columns.length<1&&this.buildColumns(e.result[0]),T(this.parent.columns,null,this.parent),this.headerRenderer.renderTable(),this.contentRenderer.renderTable(),this.parent.isAutoGen=!0,this.parent.notify(ei,{})},r.prototype.iterateComplexColumns=function(e,t,i){for(var r=Object.keys(e),n=0;n<r.length;n++)("object"!=typeof e[r[n]]||!e[r[n]]||e[r[n]]instanceof Date?[]:Object.keys(e[r[n]])).length?this.iterateComplexColumns(e[r[n]],t+(r[n]+"."),i):(i[this.counter]=t+r[n],this.counter++)},r.prototype.buildColumns=function(e){var i=[],r={};this.iterateComplexColumns(e,"",r);for(var n=Object.keys(r).filter(function(e){return"BlazId"!==r[e]}).map(function(e){return r[e]}),o=0,s=n.length;o<s;o++)i[o]={field:n[o]},this.parent.enableColumnVirtualization&&(i[o].width=t.isNullOrUndefined(i[o].width)?200:i[o].width);this.parent.setProperties({columns:i},!0)},r.prototype.instantiateRenderer=function(){this.renderer.addRenderer(e.RenderType.Header,new Zi(this.parent,this.locator)),this.renderer.addRenderer(e.RenderType.Content,new Yi(this.parent,this.locator));var t=this.locator.getService("cellRendererFactory");t.addCellRenderer(e.CellType.Header,new rr(this.parent,this.locator)),t.addCellRenderer(e.CellType.Data,new $i(this.parent,this.locator)),t.addCellRenderer(e.CellType.StackedHeader,new or(this.parent,this.locator)),t.addCellRenderer(e.CellType.Indent,new lr(this.parent,this.locator)),t.addCellRenderer(e.CellType.GroupCaption,new hr(this.parent,this.locator)),t.addCellRenderer(e.CellType.GroupCaptionEmpty,new dr(this.parent,this.locator)),t.addCellRenderer(e.CellType.Expand,new pr(this.parent,this.locator)),t.addCellRenderer(e.CellType.HeaderIndent,new gr(this.parent,this.locator)),t.addCellRenderer(e.CellType.StackedHeader,new or(this.parent,this.locator)),t.addCellRenderer(e.CellType.DetailHeader,new mr(this.parent,this.locator)),t.addCellRenderer(e.CellType.RowDragHIcon,new Sr(this.parent,this.locator)),t.addCellRenderer(e.CellType.DetailExpand,new vr(this.parent,this.locator)),t.addCellRenderer(e.CellType.DetailFooterIntent,new lr(this.parent,this.locator)),t.addCellRenderer(e.CellType.RowDragIcon,new wr(this.parent,this.locator))},r.prototype.addEventListener=function(){var e=this;this.parent.isDestroyed||(this.parent.on(Mt,this.instantiateRenderer,this),this.parent.on("refreshdataSource",this.dataManagerSuccess,this),this.parent.on(Lt,this.refresh,this),this.parent.on("refresh-complete",this.refreshComplete,this),this.parent.on("bulk-save",this.sendBulkRequest,this),this.parent.on("showEmptyGrid",function(){e.emptyGrid=!0},this),this.parent.on(ei,this.dynamicColumnChange,this))},r.prototype.validateGroupRecords=function(e){var t=this,r=e.result.length-1;if(r<0)return Promise.resolve(e);var n=e.result[0],o=e.result[r],s=[],l=function(e){for(var r=[n,o],l=0;l<r.length;l++)s.push(new i.Predicate("field","==",r[l].field).and(t.getPredicate("key","equal",r[l].key)));e.where(i.Predicate.or(s))},a=new i.Query;l(a);var h=new i.DataManager(e.result).executeLocal(a),d=this.data.generateQuery(!0),c=[];if(this.data.isRemote()){for(var p=[n,o],u=0;u<p.length;u++)c.push(this.getPredicate(p[u].field,"equal",p[u].key));d.where(i.Predicate.or(c))}else l(d);var g=new i.Deferred;return this.data.getData({},d).then(function(i){t.updateGroupInfo(h,i.result),g.resolve(e)}).catch(function(e){return g.reject(e)}),g.promise},r.prototype.getPredicate=function(e,t,r){return r instanceof Date?he({field:e,operator:t,value:r}):new i.Predicate(e,t,r)},r.prototype.updateGroupInfo=function(e,t){for(var r=new i.DataManager(t),n=e,o=0;o<n.length;o++){var s=r.executeLocal((new i.Query).where(new i.Predicate("field","==",n[o].field).and(this.getPredicate("key","equal",n[o].key))))[0];n[o].count=s.count;var l=n[o].items,a=s.items;l.GroupGuid&&(n[o].items=this.updateGroupInfo(n[o].items,s.items));for(var h=this.parent.aggregates,d=0;d<h.length;d++)for(var c=h[d],p=0;p<c.columns.length;p++)for(var u=c.columns[p].type instanceof Array?c.columns[p].type:[c.columns[p].type],g=0;g<u.length;g++){var f=c.columns[p].field+" - "+u[g].toLowerCase(),m=l.level?a.records:s.items,y=this.parent;if("Custom"===u[g]){var v=l.level?a:s;n[o].aggregates[f]=c.columns[p].customAggregate?c.columns[p].customAggregate.call(y,v,c.columns[p]):""}else n[o].aggregates[f]=i.DataUtil.aggregates[u[g].toLowerCase()](m,c.columns[p].field)}}return e},r}(),xr=function(){function i(){this.cellRenderMap={}}return i.prototype.addCellRenderer=function(i,r){i="string"==typeof i?i:t.getEnumValue(e.CellType,i),t.isNullOrUndefined(this.cellRenderMap[i])&&(this.cellRenderMap[i]=r)},i.prototype.getCellRenderer=function(i){if(i="string"==typeof i?i:t.getEnumValue(e.CellType,i),t.isNullOrUndefined(this.cellRenderMap[i]))throw"The cellRenderer "+i+" is not found";return this.cellRenderMap[i]},i}(),Fr=function(){function i(e,t){this.sortedCols=[],this.sortPredicate=[],this.isCustomDialog=!1,this.parent=e,this.serviceLocator=t,this.addEventListener()}return i.prototype.addEventListener=function(){this.evtHandlers=[{event:"filter-dialog-close",handler:this.closeCustomDialog},{event:"refresh-cutsom-filter-ok-button",handler:this.refreshCustomFilterOkBtn},{event:"render-responsive-cmenu",handler:this.renderResponsiveContextMenu},{event:"filter-cmenu-select",handler:this.renderCustomFilterDiv},{event:"custom-filter-close",handler:this.customExFilterClose},{event:"refresh-cutsom-filter-clear-button",handler:this.refreshCustomFilterClearBtn}],Xe(this.parent,this.evtHandlers,!0,this),this.onActionCompleteFn=this.editComplate.bind(this),this.parent.addEventListener(St,this.onActionCompleteFn)},i.prototype.customExFilterClose=function(){this.isCustomDlgRender=!1},i.prototype.renderCustomFilterDiv=function(){var e=this.customResponsiveDlg.element.querySelector(".e-dlg-header-content"),t=e.querySelector(".e-dlg-custom-header"),i=e.querySelector(".e-dlg-closeicon-btn");this.isCustomDlgRender=!0,this.parent.filterModule.filterModule.closeDialog(),this.saveBtn.element.style.display="",this.refreshCustomFilterOkBtn({disabled:!1}),this.backBtn.element.style.display="none",i.style.display="",t.innerHTML=this.parent.localeObj.getConstant("CustomFilter");var r=this.customResponsiveDlg.element.querySelector(".e-dlg-content");this.customExcelFilterParent=this.parent.createElement("div",{className:"e-xl-customfilterdiv e-default-filter"}),r.appendChild(this.customExcelFilterParent)},i.prototype.renderResponsiveContextMenu=function(i){if(this.action===e.ResponsiveDialogAction.isFilter){var r=this.customResponsiveDlg.element.querySelector(".e-dlg-content"),o=this.customResponsiveDlg.element.querySelector(".e-dlg-header-content"),s=o.querySelector(".e-dlg-closeicon-btn"),l=o.querySelector(".e-dlg-custom-header");if(i.isOpen){r.firstChild.style.display="none",r.appendChild(i.target),s.style.display="none",this.saveBtn.element.style.display="none",this.filterClearBtn.element.style.display="none",l.innerHTML=i.header;var a=this.parent.createElement("button"),h=this.parent.createElement("span",{className:"e-btn-icon e-resfilterback e-icons"});a.appendChild(h),this.backBtn=new n.Button({cssClass:"e-res-back-btn"}),this.backBtn.appendTo(a),l.parentElement.insertBefore(a,l)}else this.backBtn&&!this.isCustomDlgRender&&(r.firstChild.style.display="",t.remove(this.backBtn.element),s.style.display="",this.saveBtn.element.style.display="",this.isFiltered&&(this.filterClearBtn.element.style.display=""),l.innerHTML=this.getHeaderTitle({action:e.ResponsiveDialogAction.isFilter},i.col))}},i.prototype.refreshCustomFilterClearBtn=function(e){this.filterClearBtn&&(this.isFiltered=e.isFiltered,this.filterClearBtn.element.style.display=e.isFiltered?"":"none")},i.prototype.refreshCustomFilterOkBtn=function(e){this.saveBtn&&(this.saveBtn.disabled=e.disabled)},i.prototype.renderResponsiveContent=function(i){var r=this,o=this.parent;if(i)return this.filterParent=this.parent.createElement("div",{className:"e-mainfilterdiv e-default-filter",id:i.uid+"-main-filter"}),this.filterParent;var s=o.getColumns();this.customColumnDiv=o.createElement("div",{className:"columndiv",styles:"width: 100%"});var l=o.createElement("div",{className:"e-ressortbutton-parent"}),a=[],h=this.action===e.ResponsiveDialogAction.isSort,d=this.action===e.ResponsiveDialogAction.isFilter;if(d)for(c=0;c<o.filterSettings.columns.length;c++)a.push(o.filterSettings.columns[c].field);for(var c=0;c<s.length;c++)if(!(!s[c].visible||!s[c].allowSorting&&h||!s[c].allowFiltering&&d)){var p=o.createElement("div",{className:"e-responsivecoldiv"});p.setAttribute("data-e-mappingname",s[c].field),p.setAttribute("data-e-mappinguid",s[c].uid);var u=o.createElement("span",{innerHTML:s[c].headerText,className:"e-res-header-text"});if(p.appendChild(u),this.customColumnDiv.appendChild(p),h){var g=this.getSortedFieldsAndDirections("field").indexOf(s[c].field),f=o.createElement("button",{id:o.element.id+s[c].field+"sortbutton"}),m=l.cloneNode();m.appendChild(f),p.appendChild(m),new n.Button({cssClass:"e-ressortbutton"}).appendTo(f),f.innerHTML=g>-1?this.parent.sortSettings.columns[g].direction:"None",f.onclick=function(e){r.sortButtonClickHandler(e.target)}}if(d&&a.indexOf(s[c].field)>-1){var y=o.createElement("div",{className:"e-icons e-res-icon e-filtersetdiv"}),v=o.createElement("span",{className:"e-icons e-res-icon e-filterset"});v.setAttribute("colType",s[c].type),y.appendChild(v),p.appendChild(y)}}return t.EventHandler.add(this.customColumnDiv,"click",this.customFilterColumnClickHandler,this),this.customColumnDiv},i.prototype.getSortedFieldsAndDirections=function(e){for(var t=[],i=0;i<this.parent.sortSettings.columns.length;i++)t.push(this.parent.sortSettings.columns[i][e]);return t},i.prototype.sortButtonClickHandler=function(e){if(e){var t=O(e,"e-responsivecoldiv").getAttribute("data-e-mappingname");this.parent.allowMultiSorting||(this.sortPredicate=[],this.sortedCols=[],this.isSortApplied=!1,this.resetSortButtons(e));var i=e.textContent,r="None"===i?"Ascending":"Ascending"===i?"Descending":"None";e.innerHTML=r,this.setSortedCols(t,r)}},i.prototype.resetSortButtons=function(e){for(var t=[].slice.call(this.customColumnDiv.getElementsByClassName("e-ressortbutton")),i=0;i<t.length;i++)t[i]!==e&&(t[i].innerHTML="None")},i.prototype.setSortedCols=function(e,t){var i=this.getCurrentSortedFields().indexOf(e);this.parent.allowMultiSorting&&i>-1&&(this.sortedCols.splice(i,1),this.sortPredicate.splice(i,1)),this.isSortApplied=!0,"None"!==t&&(this.sortedCols.push(e),this.sortPredicate.push({field:e,direction:t}))},i.prototype.getCurrentSortedFields=function(){for(var e=[],t=0;t<this.sortedCols.length;t++)e.push(this.sortedCols[t]);return e},i.prototype.customFilterColumnClickHandler=function(t){if(this.action===e.ResponsiveDialogAction.isFilter){var i=this.parent,r=t.target;if("FilterBar"!==i.filterSettings.type)if(r.classList.contains("e-responsivecoldiv")||r.parentElement.classList.contains("e-responsivecoldiv")){if((s=r.getAttribute("data-e-mappingname"))||(s=r.parentElement.getAttribute("data-e-mappingname")),s){var n=i.getColumnByField(s);this.isRowResponsive=!0,this.showResponsiveDialog(n)}}else if(r.classList.contains("e-filterset")||r.parentElement.classList.contains("e-filtersetdiv")){var o=O(r,"e-responsivecoldiv");if(o){var s=o.getAttribute("data-e-mappingname");("Menu"===(n=i.getColumnByField(s)).filter.type||!n.filter.type&&"Menu"===i.filterSettings.type)&&(this.isDialogClose=!0),this.parent.filterModule.filterModule.clearCustomFilter(n),this.removeCustomDlgFilterEle(r)}}}},i.prototype.showResponsiveDialog=function(t){if(this.isCustomDialog&&this.action===e.ResponsiveDialogAction.isFilter&&!this.isRowResponsive)this.renderCustomFilterDialog();else{if(this.filteredCol=t,this.renderResponsiveDialog(t),this.parent.enableAdaptiveUI&&t&&(this.parent.filterModule.setFilterModel(t),this.parent.filterModule.filterModule.openDialog(this.parent.filterModule.createOptions(t,void 0))),this.action===e.ResponsiveDialogAction.isSort){var i={cancel:!1,dialogObj:this.customResponsiveDlg,requestType:"beforeOpenAptiveSortDialog"};if(this.parent.trigger("beforeOpenAdaptiveDialog",i),i.cancel)return}this.customResponsiveDlg.show(!0),this.customResponsiveDlg.element.style.maxHeight="100%",this.setTopToChildDialog(this.customResponsiveDlg.element)}},i.prototype.setTopToChildDialog=function(e){var t=e.querySelector(".e-dialog");if(t){var i=e.querySelector(".e-dlg-header-content").getBoundingClientRect().height;t.style.top=i+"px"}},i.prototype.renderCustomFilterDialog=function(t){var i=this.parent;if(this.action!==e.ResponsiveDialogAction.isFilter||"FilterBar"!==i.filterSettings.type){var r=this.parent.createElement("div",{id:i.element.id+"customfilter",className:"e-customfilterdiv e-responsive-dialog"});this.parent.element.appendChild(r),this.customFilterDlg=this.getDialogOptions(t,!0);var n={cancel:!1,dialogObj:this.customFilterDlg,requestType:"beforeOpenAptiveFilterDialog"};this.parent.trigger("beforeOpenAdaptiveDialog",n),n.cancel||(this.customFilterDlg.appendTo(r),this.customFilterDlg.show(!0),this.customFilterDlg.element.style.maxHeight="100%")}},i.prototype.getDialogOptions=function(t,i,n){var o=new r.Dialog({isModal:!0,showCloseIcon:!0,closeOnEscape:!1,locale:this.parent.locale,target:this.parent.adaptiveDlgTarget?this.parent.adaptiveDlgTarget:document.body,visible:!1,enableRtl:this.parent.enableRtl,content:this.renderResponsiveContent(t),open:this.dialogOpen.bind(this),created:this.dialogCreated.bind(this),close:this.beforeDialogClose.bind(this),width:"100%",height:"100%",animationSettings:{effect:"None"}});return o.isStringTemplate=!0,i?(o.header=this.renderResponsiveHeader(t,void 0,!0),o.cssClass="e-customfilter"):(o.header=this.renderResponsiveHeader(t),o.cssClass="Vertical"===this.parent.rowRenderingMode&&this.action===e.ResponsiveDialogAction.isFilter?"e-res"+n+" e-row-responsive-filter":"e-res"+n),o},i.prototype.renderResponsiveDialog=function(t){var i=this.parent;if(this.action!==e.ResponsiveDialogAction.isFilter||"FilterBar"!==i.filterSettings.type){var r=this.action===e.ResponsiveDialogAction.isFilter?"filter":"sort",n=this.parent.createElement("div",{id:i.element.id+"responsive"+r,className:"e-res"+r+"div e-responsive-dialog"});this.parent.element.appendChild(n),this.customResponsiveDlg=this.getDialogOptions(t,!1,r),this.customResponsiveDlg.appendTo(n)}},i.prototype.dialogCreated=function(){We(this.parent)},i.prototype.dialogOpen=function(){if(this.action===e.ResponsiveDialogAction.isSort&&this.parent.allowMultiSorting)for(var t=0;t<this.parent.sortSettings.columns.length;t++){this.sortedCols.push(this.parent.sortSettings.columns[t].field);var i=this.parent.sortSettings.columns[t].field,r=this.parent.sortSettings.columns[t].direction;this.sortPredicate.push({field:i,direction:r})}},i.prototype.beforeDialogClose=function(t){this.isDialogClose=t.element&&!t.element.querySelector(".e-xl-customfilterdiv")&&t.element.classList.contains("e-resfilterdiv"),this.action===e.ResponsiveDialogAction.isFilter?t.element.classList.contains("e-resfilterdiv")?this.parent.filterModule.filterModule.closeResponsiveDialog(this.isCustomDlgRender):t.element.classList.contains("e-customfilterdiv")&&this.closeCustomFilter():this.action===e.ResponsiveDialogAction.isSort&&this.closeCustomDialog(),this.parent.off("enter-key-handler",this.keyHandler)},i.prototype.sortColumn=function(){if(!this.isSortApplied)return void this.closeCustomDialog();this.sortPredicate.length&&this.parent.setProperties({sortSettings:{columns:[]}},!0);for(var e=0;e<this.sortPredicate.length;e++)this.parent.sortColumn(this.sortPredicate[e].field,this.sortPredicate[e].direction,this.parent.allowMultiSorting);this.sortPredicate.length||this.parent.clearSorting(),this.closeCustomDialog()},i.prototype.getHeaderTitle=function(t,i){var r,n=this.parent;return this.action===e.ResponsiveDialogAction.isEdit?r=n.localeObj.getConstant("EditFormTitle")+t.primaryKeyValue[0]:this.action===e.ResponsiveDialogAction.isAdd?r=n.localeObj.getConstant("AddFormTitle"):this.action===e.ResponsiveDialogAction.isFilter?r=i?i.headerText||i.field:n.localeObj.getConstant("FilterButton"):this.action===e.ResponsiveDialogAction.isSort&&(r=n.localeObj.getConstant("Sort")),r},i.prototype.getDialogName=function(t){var i;return t===e.ResponsiveDialogAction.isAdd||t===e.ResponsiveDialogAction.isEdit?i="dialogEdit_wrapper_title":t===e.ResponsiveDialogAction.isFilter&&(i="responsive_filter_dialog_wrapper"),i},i.prototype.getButtonText=function(t){var i;return t===e.ResponsiveDialogAction.isAdd||t===e.ResponsiveDialogAction.isEdit?i="Save":t!==e.ResponsiveDialogAction.isFilter&&this.action!==e.ResponsiveDialogAction.isSort||(i="OKButton"),i},i.prototype.renderResponsiveHeader=function(t,i,r){var o=this,s=this.parent;s.on("enter-key-handler",this.keyHandler,this);var l=s.element.id+this.getDialogName(this.action),a=s.createElement("div",{className:"e-res-custom-element"}),h=s.createElement("div",{className:"e-dlg-custom-header",id:l});h.innerHTML=this.getHeaderTitle(i,t),a.appendChild(h);var d=s.createElement("button");r||(this.saveBtn=new n.Button({cssClass:"e-primary e-flat e-res-apply-btn"}),d.innerHTML=s.localeObj.getConstant(this.getButtonText(this.action)),this.saveBtn.appendTo(d),d.onclick=function(e){o.dialogHdrBtnClickHandler()});var c=this.action===e.ResponsiveDialogAction.isSort,p=this.action===e.ResponsiveDialogAction.isFilter;if(p||c){var u=c?"sort":"filter",g=s.createElement("button");if(this.filterClearBtn=new n.Button({cssClass:"e-primary e-flat e-res-"+u+"-clear-btn"}),p){var f=s.createElement("span",{className:"e-btn-icon e-icon-filter-clear e-icons"});g.appendChild(f)}else g.innerHTML=s.localeObj.getConstant("Clear");a.appendChild(g),this.filterClearBtn.appendTo(g),g.onclick=function(e){O(e.target,"e-customfilter")?(o.parent.filterModule.clearFiltering(),o.removeCustomDlgFilterEle()):p?o.filterClear():(o.resetSortButtons(),o.sortedCols=[],o.sortPredicate=[],o.isSortApplied=!0)},a.appendChild(g)}return r||a.appendChild(d),a},i.prototype.filterClear=function(){this.parent.filterModule.filterModule.clearCustomFilter(this.filteredCol),this.parent.filterModule.filterModule.closeResponsiveDialog()},i.prototype.dialogHdrBtnClickHandler=function(){this.action===e.ResponsiveDialogAction.isEdit||this.action===e.ResponsiveDialogAction.isAdd?this.parent.endEdit():this.action===e.ResponsiveDialogAction.isFilter?this.parent.filterModule.filterModule.applyCustomFilter({col:this.filteredCol,isCustomFilter:this.isCustomDlgRender}):this.action===e.ResponsiveDialogAction.isSort&&this.sortColumn()},i.prototype.closeCustomDialog=function(){if(this.isCustomDlgRender){var e=this.customResponsiveDlg.element.querySelector(".e-mainfilterdiv");return void t.remove(e)}this.isRowResponsive=!1,this.isCustomDlgRender=!1,this.destroyCustomFilterDialog()},i.prototype.destroyCustomFilterDialog=function(){if(this.customResponsiveDlg){var i=document.getElementById(this.customResponsiveDlg.element.id);this.customResponsiveDlg&&!this.customResponsiveDlg.isDestroyed&&i&&(this.customResponsiveDlg.destroy(),t.remove(i)),this.closeCustomFilter(),this.action===e.ResponsiveDialogAction.isSort&&(this.sortPredicate=[],this.sortedCols=[],this.isSortApplied=!1)}},i.prototype.closeCustomFilter=function(){if(!this.isDialogClose&&this.customFilterDlg){var e=document.getElementById(this.customFilterDlg.element.id);this.customFilterDlg&&!this.customFilterDlg.isDestroyed&&e&&(this.customFilterDlg.destroy(),t.remove(e))}this.isCustomDialog=!1,this.isDialogClose=!1},i.prototype.removeCustomDlgFilterEle=function(e){if(e)e.parentElement.classList.contains("e-filtersetdiv")?t.remove(e.parentElement):t.remove(e);else for(var i=this.customColumnDiv.children,r=0;r<i.length;r++)(e=i[r].querySelector(".e-filtersetdiv"))&&(t.remove(e),r--)},i.prototype.keyHandler=function(t){13===t.keyCode&&(this.action===e.ResponsiveDialogAction.isFilter&&t.target.classList.contains("e-searchinput")||this.action===e.ResponsiveDialogAction.isEdit||this.action===e.ResponsiveDialogAction.isAdd)&&this.dialogHdrBtnClickHandler()},i.prototype.editComplate=function(e){"save"!==e.requestType&&"cancel"!==e.requestType||this.parent.off("enter-key-handler",this.keyHandler)},i.prototype.removeEventListener=function(){this.customColumnDiv&&t.EventHandler.remove(this.customColumnDiv,"click",this.customFilterColumnClickHandler),Xe(this.parent,this.evtHandlers,!0,this),this.parent.removeEventListener(St,this.onActionCompleteFn)},i}(),Er=function(){function e(){this.services={}}return e.prototype.register=function(e,i){t.isNullOrUndefined(this.services[e])&&(this.services[e]=i)},e.prototype.getService=function(e){if(t.isNullOrUndefined(this.services[e]))throw"The service "+e+" is not registered";return this.services[e]},e.prototype.registerAdaptiveService=function(e,t,i){t?(e.responsiveDialogRenderer=new Fr(e.parent,e.serviceLocator),e.responsiveDialogRenderer.action=i):e.responsiveDialogRenderer&&(e.responsiveDialogRenderer.removeEventListener(),e.responsiveDialogRenderer=void 0)},e}(),Ir=function(){function i(){this.rendererMap={}}return i.prototype.addRenderer=function(i,r){var n=t.getEnumValue(e.RenderType,i);t.isNullOrUndefined(this.rendererMap[n])&&(this.rendererMap[n]=r)},i.prototype.getRenderer=function(i){var r=t.getEnumValue(e.RenderType,i);if(t.isNullOrUndefined(this.rendererMap[r]))throw"The renderer "+r+" is not found";return this.rendererMap[r]},i}(),Tr=function(){function e(e){this.parent=e}return e.prototype.setWidthToColumns=function(){var e=0,t=this.parent.getColumnIndexesInView(),i=!0,r=0;if(this.parent.allowGrouping)for(var n=this.parent.groupSettings.columns.length;e<n;e++)this.parent.enableColumnVirtualization&&-1===t.indexOf(e)?i=!1:this.setColumnWidth(new Ct({width:"30px"}),e);(this.parent.detailTemplate||this.parent.childGrid)&&(this.setColumnWidth(new Ct({width:"30px"}),e),e++),this.parent.isRowDragable()&&"Right"!==this.parent.getFrozenMode()&&(this.setColumnWidth(new Ct({width:"30px"}),e),e++);for(var o=this.parent.getColumns(),s=0;s<o.length;s++)this.setColumnWidth(o[s],i&&this.parent.enableColumnVirtualization?void 0:s+e);this.parent.isRowDragable()&&"Right"===this.parent.getFrozenMode()&&this.setColumnWidth(new Ct({width:"30px"}),o.length),r=this.getTableWidth(this.parent.getColumns()),"auto"!==this.parent.width&&-1===this.parent.width.toString().indexOf("%")&&this.setMinwidthBycalculation(r)},e.prototype.setMinwidthBycalculation=function(e){var i=0,r=this.parent.getColumns().filter(function(e){return t.isNullOrUndefined(e.width)||"auto"===e.width});if(r.length){i=t.isNullOrUndefined(this.parent.width)||"auto"===this.parent.width||"string"!=typeof this.parent.width||-1!==this.parent.width.indexOf("%")?this.parent.element.getBoundingClientRect().width-e:("string"==typeof this.parent.width?parseInt(this.parent.width,10):this.parent.width)-e;for(var n=0,o=0,s=r;o<s.length;o++){var l=s[o];n+=t.isNullOrUndefined(l.minWidth)?0:"string"==typeof l.minWidth?parseInt(l.minWidth,10):l.minWidth}for(var a=0;a<r.length;a++){0===e&&this.parent.allowResizing&&this.isWidthUndefined()&&a!==r.length-1&&this.setUndefinedColumnWidth(r);var h=this.parent.getColumnIndexByField(r[a].field)+this.parent.getIndentCount();0!==e&&i<n?this.setWidth(r[a].minWidth,h):0!==e&&i>n&&this.setWidth("",h,!0)}}},e.prototype.setUndefinedColumnWidth=function(e){for(var t=0;t<e.length;t++)t!==e.length-1&&(e[t].width=200,this.setWidth(200,this.parent.getColumnIndexByField(e[t].field)))},e.prototype.setColumnWidth=function(e,i,r){if(!(this.parent.getColumns().length<1)){var n=t.isNullOrUndefined(i)?this.parent.getNormalizedColumnIndex(e.uid):i,o=this.getWidth(e),s=this.getTableWidth(this.parent.getColumns());null!==o&&(this.setWidth(o,n),"auto"!==this.parent.width&&-1===this.parent.width.toString().indexOf("%")&&this.setMinwidthBycalculation(s),(this.parent.allowResizing&&"resize"===r||this.parent.getFrozenColumns()&&this.parent.allowResizing)&&this.setWidthToTable(),this.parent.notify("column-width-changed",{index:n,width:o,column:e,module:r}))}},e.prototype.setWidth=function(e,i,r){this.parent.groupSettings.columns.length>i&&De(this.parent)&&(e=(30/this.parent.element.offsetWidth*100).toFixed(1)+"%");var n,o=this.parent.getHeaderTable(),s=this.parent.getContentTable(),l=t.formatUnit(e),a=this.parent.getFrozenColumns(),h=this.parent.isRowDragable();a=a&&h?a+1:a;var d=this.parent.getHeaderContent().querySelector("."+Ii),c=this.parent.getContent().querySelector("."+Ei),p=this.parent.getFrozenLeftColumnsCount(),u=this.parent.getFrozenRightColumnsCount(),g=this.parent.getMovableColumnsCount(),f=0!==p||0!==u;if(a&&i>=a){if(!d||!d.querySelector(ji))return;n=d.querySelector(ji).children[i-a]}else if(this.parent.enableColumnVirtualization&&a&&this.parent.contentModule.isXaxis()&&d.scrollLeft>0)n=(v=d.querySelector(ji)).children[v.children.length-1-i];else if(f){C=void 0;if(p&&!u)C=(i=h?i-1:i)<p?o:d;else if(!p&&u)C=i>=g?o:d;else if(p&&u){i=h?i-1:i;var m=this.parent.getFrozenRightHeader();C=i<p?o:i<p+g?d:m}if(!(n=this.getColumnLevelFrozenColgroup(i,p,g,C)))return}else n=o.querySelector(ji).children[i];n&&!r?n.style.width=l:n&&r&&(n.style.width="");var y;if(a&&i>=a)y=this.parent.getContent().querySelector("."+Ei).querySelector(ji).children[i-a];else if(this.parent.enableColumnVirtualization&&a&&this.parent.contentModule.isXaxis()&&c.scrollLeft>0){var v=this.parent.getContent().querySelector("."+Ei).querySelector(ji);y=v.children[v.children.length-1-i]}else if(f){var C=void 0;if(p&&!u&&(C=i<p?s:c),!p&&u&&(C=i>=g?s:c),p&&u){var w=this.parent.getContent().querySelector(".e-frozen-right-content");C=i<p?s:i<p+g?c:w}y=this.getColumnLevelFrozenColgroup(i,p,g,C)}else y=s.querySelector(ji).children[i];if(y&&!r?y.style.width=l:y&&r&&(y.style.width=""),!this.parent.enableColumnVirtualization){for(var b=this.parent.element.querySelectorAll(".e-table.e-inline-edit"),S=[],R=0;R<b.length;R++)if(O(b[R],"e-grid").id===this.parent.element.id)for(var x=0;x<b[R].querySelector("colgroup").children.length;x++)S.push(b[R].querySelector("colgroup").children[x]);b.length&&S.length&&(S[i].style.width=l)}this.parent.isFrozenGrid()&&this.refreshFrozenScrollbar()},e.prototype.getColumnLevelFrozenColgroup=function(e,t,i,r){if(!r||!r.querySelector(ji))return null;var n=this.parent.getColumns(),o=this.parent.isRowDragable(),s=this.parent.getFrozenMode(),l=[].slice.call(r.querySelector(ji).children);return"Right"===s&&o&&e===i+this.parent.getFrozenRightColumnsCount()?l[l.length-1]:o&&-1===e?l[0]:"Left"===n[e].freeze?l[o?e+1:e]:"Right"===n[e].freeze?l[e-(t+i)]:l[e-t]},e.prototype.refreshFrozenScrollbar=function(){var e={cancel:!1};if(this.parent.notify("prevent-frozen-scroll-refresh",e),!e.cancel){var t=j(),i=this.parent.element.querySelector(".e-frozenscrollbar"),r=this.parent.element.querySelector(".e-movablescrollbar"),n=this.parent.getContent().querySelector("."+Ti),o=this.parent.getContent().querySelector("."+Ei),s=n.firstElementChild.getBoundingClientRect().width,l=o.firstElementChild.getBoundingClientRect().width;if("Right"===this.parent.getFrozenMode()&&(s+=t),i.style.width=s+"px",this.parent.getFrozenMode()===Pi){var a=this.parent.element.querySelector(".e-frozen-right-scrollbar"),h=this.parent.getContent().querySelector(".e-frozen-right-content").firstElementChild.getBoundingClientRect().width;"auto"!==this.parent.height&&(h+=t),a.style.width=h+"px"}else{if(this.parent.enableColumnVirtualization){var d=this.parent.getMovableVirtualContent().querySelector(".e-virtualtrack");d&&(l=d.scrollWidth)}"Right"!==this.parent.getFrozenMode()&&"auto"!==this.parent.height&&(l+=t)}r.firstElementChild.style.width=l+"px"}},e.prototype.getSiblingsHeight=function(e){return this.getHeightFromDirection(e,"previous")+this.getHeightFromDirection(e,"next")},e.prototype.getHeightFromDirection=function(e,t){for(var i=e[t+"ElementSibling"],r=0,n=[Si,xi,"e-groupdroparea","e-gridpager","e-toolbar"];i;)n.some(function(e){return i.classList.contains(e)})&&(r+=i.offsetHeight),i=i[t+"ElementSibling"];return r},e.prototype.isWidthUndefined=function(){var e=this.parent.getColumns().filter(function(e){return t.isNullOrUndefined(e.width)&&t.isNullOrUndefined(e.minWidth)}).length;return this.parent.getColumns().length===e},e.prototype.getWidth=function(e){if(t.isNullOrUndefined(e.width)&&this.parent.allowResizing&&t.isNullOrUndefined(e.minWidth)&&!this.isWidthUndefined()&&(e.width=200),this.parent.isFrozenGrid()&&t.isNullOrUndefined(e.width)&&(e.getFreezeTableName()===Li||e.getFreezeTableName()===Ni)&&(e.width=200),!e.width)return null;var i=parseInt(e.width.toString(),10);return e.minWidth&&i<parseInt(e.minWidth.toString(),10)?e.minWidth:e.maxWidth&&i>parseInt(e.maxWidth.toString(),10)?e.maxWidth:e.width},e.prototype.getTableWidth=function(e){for(var t=0,i=0,r=e;i<r.length;i++){var n=r[i],o=this.getWidth(n);"auto"===n.width&&(o=0),!1!==n.visible&&null!==o&&(t+=parseInt(o.toString(),10))}return t},e.prototype.calcMovableOrFreezeColWidth=function(e){var i=this.parent.getColumns().slice(),r=this.parent.getFrozenLeftColumnsCount()||this.parent.getFrozenColumns(),n=this.parent.getMovableColumnsCount(),o=this.parent.getFrozenRightColumnsCount();return"movable"===e?(o&&i.splice(r+n,i.length),r&&i.splice(0,r)):"freeze-left"===e?i.splice(r,i.length):"freeze-right"===e&&i.splice(0,r+n),t.formatUnit(this.getTableWidth(i))},e.prototype.setWidthToFrozenRightTable=function(){var e=this.calcMovableOrFreezeColWidth("freeze-right");e=this.isAutoResize()?"100%":e;var t=this.parent.getHeaderContent().querySelector(".e-frozen-right-header").querySelector("."+Mi),i=this.parent.getContent().querySelector(".e-frozen-right-content").querySelector("."+Mi);t.style.width=e,i.style.width=e},e.prototype.setWidthToFrozenLeftTable=function(){var e=this.calcMovableOrFreezeColWidth("freeze-left");e=this.isAutoResize()?"100%":e,this.parent.getHeaderTable().style.width=e,this.parent.getContentTable().style.width=e},e.prototype.setWidthToMovableTable=function(){var e="",i=this.parent.getColumns().filter(function(e){return t.isNullOrUndefined(e.width)}).length>=1,r=this.parent.getColumns().filter(function(e){return"auto"===e.width}).length>=1;"number"!=typeof this.parent.width||i||r?i||r||(e=this.calcMovableOrFreezeColWidth("movable")):e=t.formatUnit(this.parent.width-parseInt(this.calcMovableOrFreezeColWidth("freeze").split("px")[0],10)-5),e=this.isAutoResize()?"100%":e,this.parent.getHeaderContent().querySelector("."+Ii).firstElementChild&&(this.parent.getHeaderContent().querySelector("."+Ii).firstElementChild.style.width=e),this.parent.getContent().querySelector("."+Ei).firstElementChild.style.width=e},e.prototype.setWidthToFrozenEditTable=function(){var e=this.calcMovableOrFreezeColWidth("freeze");e=this.isAutoResize()?"100%":e,this.parent.element.querySelectorAll(".e-table.e-inline-edit")[0].style.width=e},e.prototype.setWidthToMovableEditTable=function(){var e=this.calcMovableOrFreezeColWidth("movable");e=this.isAutoResize()?"100%":e,this.parent.element.querySelectorAll(".e-table.e-inline-edit")[1].style.width=e},e.prototype.setWidthToTable=function(){var e=t.formatUnit(this.getTableWidth(this.parent.getColumns()));this.parent.isFrozenGrid()?((this.parent.getFrozenColumns()||this.parent.getFrozenLeftColumnsCount())&&this.setWidthToFrozenLeftTable(),this.setWidthToMovableTable(),this.parent.getFrozenRightColumnsCount()&&this.setWidthToFrozenRightTable()):((this.parent.detailTemplate||this.parent.childGrid)&&this.setColumnWidth(new Ct({width:"30px"})),e=this.isAutoResize()?"100%":e,this.parent.getHeaderTable().style.width=e,this.parent.getContentTable().style.width=e);var i=this.parent.element.querySelector(".e-table.e-inline-edit");i&&this.parent.getFrozenColumns()?(this.setWidthToFrozenEditTable(),this.setWidthToMovableEditTable()):i&&(i.style.width=e)},e.prototype.isAutoResize=function(){return this.parent.allowResizing&&"Auto"===this.parent.resizeSettings.mode},e}(),zr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Dr=function(){function e(e){this.currentInfo={},this.oneTime=!0,this.swap={},this.forget=!1,this.skipFocus=!0,this.focusByClick=!1,this.prevIndexes={},this.refMatrix=this.refreshMatrix(!0),this.actions=["downArrow","upArrow"],this.isVirtualScroll=!1,this.parent=e,this.rowModelGen=new Gi(this.parent),this.addEventListener()}return e.prototype.focusCheck=function(e){var t=e.target;this.focusByClick=!0,this.skipFocus=t.classList.contains("e-grid")},e.prototype.onFocus=function(){if(!(this.parent.isDestroyed||t.Browser.isDevice||this.parent.enableVirtualization)){this.setActive(!this.parent.enableHeaderFocus&&0===this.parent.frozenRows,this.parent.isFrozenGrid()),this.parent.enableHeaderFocus||this.parent.getCurrentViewRecords().length||"Batch"===this.parent.editSettings.mode&&("Batch"!==this.parent.editSettings.mode||this.parent.editModule.getBatchChanges().addedRecords.length)||this.getContent().matrix.generate(this.rowModelGen.generateRows({rows:[new vi({isDataRow:!0})]}),this.getContent().selector,!1);var e=this.getContent().matrix.get(0,-1,[0,1],null,this.getContent().validator());this.getContent().matrix.select(e[0],e[1]),this.skipFocus&&(this.focus(),this.skipFocus=!1)}},e.prototype.passiveFocus=function(e){this.parent.isDestroyed||e.target&&e.target.classList.contains("e-detailcell")&&(this.currentInfo.skipAction=!1,t.addClass([this.currentInfo.element],["e-focused","e-focus"]))},e.prototype.onBlur=function(e){this.parent.isEdit||e&&(!e.relatedTarget||t.closest(e.relatedTarget,".e-grid"))||(this.removeFocus(),this.skipFocus=!1,this.currentInfo.skipAction=!1,this.getContent().getFocusInfo().elementToFocus&&(this.getContent().getFocusInfo().elementToFocus.tabIndex=0))},e.prototype.onClick=function(e,i){if(!O(e.target,"e-filterbarcell")||!e.target.classList.contains("e-input-group-icon")){var r=!t.isNullOrUndefined(t.closest(e.target,"."+Ri)),n=!t.isNullOrUndefined(t.closest(e.target,"."+Si));r=r&&n?!r:r;var o=!t.isNullOrUndefined(t.closest(e.target,"."+Ti))||!t.isNullOrUndefined(t.closest(e.target,"."+zi)),s=!1;if(this.parent.getFrozenMode()===Pi&&(s=!t.isNullOrUndefined(t.closest(e.target,".e-frozen-right-content"))||!t.isNullOrUndefined(t.closest(e.target,".e-frozen-right-header")),o=o&&!s),!(!r&&t.isNullOrUndefined(t.closest(e.target,"."+Si))||e.target.classList.contains(Di))&&t.isNullOrUndefined(t.closest(e.target,".e-unboundcell"))){if(this.setActive(r,o,s),!r&&t.isNullOrUndefined(t.closest(e.target,"."+Si)))return void this.clearOutline();var l={cancel:!1,byKey:!1,byClick:!t.isNullOrUndefined(e.target),clickArgs:e};if(this.parent.notify(jt,l),!l.cancel&&!t.closest(e.target,".e-inline-edit")&&(this.setActive(r,o,s),this.getContent())){if(!1===this.getContent().onClick(e,i))return;this.focus()}}}},e.prototype.onKeyPress=function(e){if(!this.skipOn(e)){this.activeKey=e.action;var t={cancel:!1,byKey:!0,byClick:!1,keyArgs:e};if(this.parent.notify(jt,t),!t.cancel){var i=this.getContent().matrix.current;this.currentInfo.outline=!0;var r=this.getContent().jump(e.action,i);if(this.swap=r,r.swap&&(this.setActive(!r.toHeader,r.toFrozen,r.toFrozenRight),this.getContent().matrix.current=this.getContent().getNextCurrent(i,r,this.active,e.action),this.prevIndexes={}),this.setActiveByKey(e.action,this.getContent()),!1===(!this.content.lastIdxCell&&this.getContent().onKeyPress(e)))return void this.clearIndicator();e.preventDefault(),this.focus(e)}}},e.prototype.skipOn=function(e){var i=e.target;if(!i)return!1;if(this.currentInfo.skipAction)return this.clearIndicator(),!0;if(["pageUp","pageDown","altDownArrow"].indexOf(e.action)>-1)return this.clearIndicator(),!0;var r=t.closest(i,"th")&&!t.closest(i,"th").tabIndex;!e.target.classList.contains("e-filterbaroperator")||13!==e.keyCode&&27!==e.keyCode||t.closest(e.target,".e-filterbarcell").querySelector("input").focus(),r&&null!==t.closest(document.activeElement,".e-filterbarcell")&&this.removeFocus();var n=null!==t.closest(document.activeElement,".e-filterbarcell");if(this.parent.enableHeaderFocus&&n){var o=this.active.matrix,s=o.current;n=o.matrix[s[0]].lastIndexOf(1)!==s[1]}return"delete"===e.action||"Batch"!==this.parent.editSettings.mode&&(this.parent.isEdit||["insert","f2"].indexOf(e.action)>-1)||n||null!==t.closest(document.activeElement,"#"+this.parent.element.id+"_searchbar")&&["enter","leftArrow","rightArrow","shiftLeft","shiftRight","ctrlPlusA"].indexOf(e.action)>-1||null===t.closest(i,"."+Ri)&&null===t.closest(i,"."+Si)||"space"===e.action&&!i.classList.contains(ki)&&null===t.closest(i,"."+ki)&&null===t.closest(i,".e-headerchkcelldiv")||null!==t.closest(i,".e-filter-popup")},e.prototype.focusVirtualElement=function(e){var t=this;if(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling){var i={virtualData:{},isAdd:!1,isCancel:!1};this.parent.notify(pi,i);var r=this.actions.some(function(e){return e===t.activeKey}),n=!!this.parent.contentModule&&this.parent.contentModule.selectedRowIndex>-1;i.isAdd||Object.keys(i.virtualData).length||r||i.isCancel||n?(this.parent.notify("reset-virtual-focus",{isCancel:!1}),i.isCancel=!1,this.parent.contentModule.selectedRowIndex=-1,r&&(this.activeKey=this.empty,this.parent.notify("virtaul-key-handler",e)),this.currentInfo.elementToFocus.focus({preventScroll:!0})):this.isVirtualScroll?this.currentInfo.elementToFocus.focus({preventScroll:!0}):this.currentInfo.elementToFocus.focus()}this.isVirtualScroll=!1},e.prototype.getFocusedElement=function(){return this.currentInfo.elementToFocus},e.prototype.getContent=function(){return this.active||this.content},e.prototype.setActive=function(e,t,i){this.active=e?t?this.fContent:i?this.frContent:this.content:t?this.fHeader:i?this.frHeader:this.header},e.prototype.setFocusedElement=function(e,i){var r=this;this.currentInfo.elementToFocus=e,setTimeout(function(){t.isNullOrUndefined(r.currentInfo.elementToFocus)||(r.parent.enableVirtualization||r.parent.enableInfiniteScrolling?r.focusVirtualElement(i):r.currentInfo.elementToFocus.focus())},0)},e.prototype.focus=function(e){this.parent.notify("virtaul-cell-focus",e),this.removeFocus(),this.addFocus(this.getContent().getFocusInfo(),e)},e.prototype.removeFocus=function(e){this.currentInfo.element&&(t.removeClass([this.currentInfo.element,this.currentInfo.elementToFocus],["e-focused","e-focus"]),this.currentInfo.element.tabIndex=-1)},e.prototype.addOutline=function(){var e=this.getContent().getFocusInfo();e.element&&(t.addClass([e.element],["e-focused"]),t.addClass([e.elementToFocus],["e-focus"]))},e.prototype.focusHeader=function(){this.setActive(!1,this.parent.isFrozenGrid()),this.resetFocus()},e.prototype.focusContent=function(){this.setActive(!0,this.parent.isFrozenGrid()),this.resetFocus()},e.prototype.resetFocus=function(){var e=this.getContent().matrix.get(0,-1,[0,1],null,this.getContent().validator());this.getContent().matrix.select(e[0],e[1]),this.focus()},e.prototype.addFocus=function(e,i){if(this.currentInfo=e,this.currentInfo.outline=e.outline&&!t.isNullOrUndefined(i),e.element){var r=e.elementToFocus.classList.contains("e-focus");if(!r){this.currentInfo.outline&&t.addClass([e.element],["e-focused"]),t.addClass([e.elementToFocus],["e-focus"]),e.element.tabIndex=0,r||this.setFocusedElement(e.elementToFocus,i),this.parent.notify("cellfocused",{element:e.elementToFocus,parent:e.element,indexes:this.getContent().matrix.current,byKey:!t.isNullOrUndefined(i),byClick:t.isNullOrUndefined(i),keyArgs:i,isJump:this.swap.swap,container:this.getContent().getInfo(i),outline:!t.isNullOrUndefined(i),swapInfo:this.swap});var n=this.getContent().matrix.current,o=n[0],s=n[1];this.prevIndexes={rowIndex:o,cellIndex:s},this.focusedColumnUid=this.parent.getColumnByIndex(s).uid,this.focusByClick=!1}}},e.prototype.refreshMatrix=function(e){var i=this;return function(r){e&&r.args&&r.args.isFrozen&&!i.fContent?i.fContent=new Ar(i.parent):e&&!i.frContent&&r.args&&r.args.renderFrozenRightContent?i.frContent=new Nr(i.parent):e&&!i.content&&(i.content=new Or(i.parent)),!e&&r.args&&r.args.isFrozen&&!i.fHeader?i.fHeader=new Br(i.parent):!e&&r.args&&r.args.renderFrozenRightContent&&!i.frHeader?i.frHeader=new Lr(i.parent):e||i.header||(i.header=new kr(i.parent));var n=e?r.args&&r.args.isFrozen?i.fContent:r.args&&r.args.renderFrozenRightContent?i.frContent:i.content:r.args&&r.args.isFrozen?i.fHeader:r.args&&r.args.renderFrozenRightContent?i.frHeader:i.header,o=e?r.rows.slice(i.parent.frozenRows):r.rows,s=e?r.rows.slice(0,i.parent.frozenRows):r.rows;i.parent.isCollapseStateEnabled()&&e&&(o=o.filter(function(e){return!1!==e.visible}));var l=!t.isNullOrUndefined(i.parent.rowTemplate),a=n.matrix.generate(s,n.selector,l);if("batchAdd"===r.name&&i.parent.isFrozenGrid()){var h=i.parent.getMovableRowsObject().map(function(e){return e.clone()}),d=o.map(function(e){return e.clone()});if(i.fContent.matrix.generate(d,i.fContent.selector,l),i.content.matrix.generate(h,i.content.selector,l),i.parent.getFrozenMode()===Pi){var c=i.parent.getFrozenRightRowsObject().map(function(e){return e.clone()});i.frContent.matrix.generate(c,i.frContent.selector,l)}}else n.matrix.generate(o,n.selector,l);if(n.generateRows(s,{matrix:a,handlerInstance:r.args&&r.args.isFrozen?i.fHeader:r.args&&r.args.renderFrozenRightContent?i.frHeader:i.header}),!t.Browser.isDevice&&r&&r.args&&(i.focusByClick||"paging"!==r.args.requestType||(i.skipFocus=!1,i.parent.element.focus()),"grouping"===r.args.requestType&&(i.skipFocus=!0)),r&&r.args&&"virtualscroll"===r.args.requestType)if(i.currentInfo.uid){var p;if(r.rows.some(function(e,t){return p=t,e.uid===i.currentInfo.uid})&&(i.content.matrix.current[0]=p,i.content.matrix.current[1]=i.parent.getColumnIndexByUid(i.focusedColumnUid)||0,f=i.getContent().getFocusInfo().elementToFocus)){var u=f.getBoundingClientRect(),g=i.parent.element.getBoundingClientRect();u.top>=0&&u.left>=0&&u.right<=Math.min(g.right,window.innerWidth||document.documentElement.clientWidth)&&u.bottom<=Math.min(g.bottom,window.innerHeight||document.documentElement.clientHeight)&&(i.isVirtualScroll=!0,i.focus())}}else if(r.args.focusElement&&r.args.focusElement.classList.contains("e-filtertext")){var f=i.parent.element.querySelector("#"+r.args.focusElement.id);f&&f.focus()}}},e.prototype.addEventListener=function(){var e=this;this.parent.isDestroyed||(t.EventHandler.add(this.parent.element,"mousedown",this.focusCheck,this),t.EventHandler.add(this.parent.element,"focus",this.onFocus,this),this.parent.element.addEventListener("focus",this.passiveHandler=function(t){return e.passiveFocus(t)},!0),t.EventHandler.add(this.parent.element,"focusout",this.onBlur,this),this.evtHandlers=[{event:Vt,handler:this.onKeyPress},{event:Gt,handler:this.onClick},{event:At,handler:this.refMatrix},{event:"partial-refresh",handler:this.refMatrix},{event:"refresh-Expand-and-Collapse",handler:this.refMatrix},{event:Ht,handler:this.refreshMatrix()},{event:"close-edit",handler:this.restoreFocus},{event:"restore-Focus",handler:this.restoreFocus},{event:"start-edit",handler:this.clearIndicator},{event:"start-add",handler:this.clearIndicator},{event:"sorting-complete",handler:this.restoreFocus},{event:"filtering-complete",handler:this.filterfocus},{event:"grouping-complete",handler:this.restoreFocusWithAction},{event:"ungrouping-complete",handler:this.restoreFocusWithAction},{event:"batchAdd",handler:this.refMatrix},{event:"batchCancel",handler:this.refMatrix},{event:"batchDelete",handler:this.refMatrix},{event:"detailDataBound",handler:this.refMatrix},{event:Pt,handler:this.refMatrix},{event:"cellfocused",handler:this.internalCellFocus}],Xe(this.parent,this.evtHandlers,!0,this))},e.prototype.filterfocus=function(){"FilterBar"!==this.parent.filterSettings.type&&this.restoreFocus()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(t.EventHandler.remove(this.parent.element,"mousedown",this.focusCheck),t.EventHandler.remove(this.parent.element,"focus",this.onFocus),t.EventHandler.remove(this.parent.element,"focusout",this.onBlur),this.parent.element.removeEventListener("focus",this.passiveHandler,!0),Xe(this.parent,this.evtHandlers,!1))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.restoreFocus=function(){this.addFocus(this.getContent().getFocusInfo())},e.prototype.restoreFocusWithAction=function(e){if(!this.parent.enableInfiniteScrolling){var i=this.getContent().matrix,r=i.current;switch(e.requestType){case"grouping":case"ungrouping":r[1]=!r.length||this.parent.groupSettings.showGroupedColumn||t.isNullOrUndefined(i.matrix[r[0]])?"grouping"===e.requestType?r[1]+1:r[1]-1:i.matrix[r[0]].indexOf(1)}this.getContent().matrix.current=r,this.addFocus(this.getContent().getFocusInfo())}},e.prototype.clearOutline=function(){this.getContent().matrix.current=this.getContent().matrix.get(0,-1,[0,1],"downArrow",this.getContent().validator()),this.clearIndicator()},e.prototype.clearIndicator=function(){this.currentInfo.element&&this.currentInfo.elementToFocus&&t.removeClass([this.currentInfo.element,this.currentInfo.elementToFocus],["e-focus","e-focused"])},e.prototype.getPrevIndexes=function(){var e=this.forget;return this.forget=!1,e||!Object.keys(this.prevIndexes).length?{rowIndex:null,cellIndex:null}:this.prevIndexes},e.prototype.forgetPrevious=function(){this.forget=!0},e.prototype.setActiveByKey=function(e,t){var i=this;if(this.parent.isFrozenGrid()||0!==this.parent.frozenRows){var r,n={home:function(){return{toHeader:!r.isContent,toFrozen:!0}},end:function(){return{toHeader:!r.isContent,toFrozen:!1}},ctrlHome:function(){return{toHeader:!0,toFrozen:i.parent.isFrozenGrid()}},ctrlEnd:function(){return{toHeader:!1,toFrozen:!1}}};if(e in n){r=t.getInfo();var o=n[e]();this.setActive(!o.toHeader,o.toFrozen),this.getContent().matrix.current=t.matrix.current}}},e.prototype.internalCellFocus=function(e){if(e.byKey&&e.container.isContent&&"enter"===e.keyArgs.action&&(e.parent.classList.contains("e-detailcell")||e.parent.classList.contains("e-unboundcell")||e.parent.classList.contains("e-templatecell"))){this.clearIndicator();var t=this.getContent().getFocusable(this.getFocusedElement());this.setFocusedElement(t),this.currentInfo.skipAction=!0}},e}(),Mr=function(){function e(){this.matrix=[],this.current=[]}return e.prototype.set=function(e,t,i){e=Math.max(0,Math.min(e,this.rows)),t=Math.max(0,Math.min(t,this.columns)),this.matrix[e]=this.matrix[e]||[],this.matrix[e][t]=i?1:0},e.prototype.get=function(e,i,r,n,o){var s=i;if(e+r[0]<0)return[e,i];e=Math.max(0,Math.min(e+r[0],this.rows));var l=!0;if(t.isNullOrUndefined(this.matrix[e]))return null;if(i=Math.max(0,Math.min(i+r[1],this.matrix[e].length-1)),s+r[1]>this.matrix[e].length-1&&o(e,i,n))return[e,s];var a=this.first(this.matrix[e],i,r,!0,n);i=null===a?s:a;var h=t.getValue(e+"."+i,this.matrix);if(e!==this.rows||"downArrow"!==n&&"enter"!==n||(r[0]=-1),null===a){for(var d=0;d<this.rows;d++)if(this.matrix[d].some(function(e){return 1===e})){l=!1;break}if(l)return e=this.current[0],[e,i]}return this.inValid(h)||!o(e,i,n)?this.get(e,s,r,n,o):[e,i]},e.prototype.first=function(e,t,i,r,n){return(t<0||t===e.length)&&this.inValid(e[t])&&"upArrow"!==n&&"downArrow"!==n||!e.some(function(e){return 1===e})?null:this.inValid(e[t])?this.first(e,-1!==["upArrow","downArrow","shiftUp","shiftDown"].indexOf(n)?r?0:++t:t+i[1],i,!1,n):t},e.prototype.select=function(e,t){e=Math.max(0,Math.min(e,this.rows)),t=Math.max(0,Math.min(t,this.matrix[e].length-1)),this.current=[e,t]},e.prototype.generate=function(e,t,i){this.rows=e.length-1,this.matrix=[];for(var r=0;r<e.length;r++){var n=e[r].cells.filter(function(e){return!0!==e.isSpanned});this.columns=Math.max(n.length-1,0|this.columns);for(var o=0;o<n.length;o++)this.set(r,o,!1!==e[r].visible&&t(e[r],n[o],i))}return this.matrix},e.prototype.inValid=function(e){return 0===e||void 0===e},e}(),Or=function(){function i(e){var t=this;this.matrix=new Mr,this.lastIdxCell=!1,this.parent=e,this.keyActions={rightArrow:[0,1],tab:[0,1],leftArrow:[0,-1],shiftTab:[0,-1],upArrow:[-1,0],downArrow:[1,0],shiftUp:[-1,0],shiftDown:[1,0],shiftRight:[0,1],shiftLeft:[0,-1],enter:[1,0],shiftEnter:[-1,0]},this.indexesByKey=function(e){return{home:[t.matrix.current[0],-1,0,1],end:[t.matrix.current[0],t.matrix.columns+1,0,-1],ctrlHome:[0,-1,0,1],ctrlEnd:[t.matrix.rows,t.matrix.columns+1,0,-1]}[e]||null}}return i.prototype.getTable=function(){return this.parent.isFrozenGrid()?this.parent.getContent().querySelector(".e-movablecontent .e-table"):this.parent.getContentTable()},i.prototype.onKeyPress=function(e){var t=this.keyActions[e.action],i=this.getCurrentFromAction(e.action,t,e.action in this.keyActions,e);if(i){if((["tab","shiftTab"].indexOf(e.action)>-1&&this.matrix.current||[]).toString()===i.toString()){if(i.toString()===[this.matrix.rows,this.matrix.columns].toString()||i.toString()===[0,0].toString()||this.matrix.current[0]===this.matrix.rows&&this.matrix.current.toString()===i.toString())return!1;i=this.editNextRow(i[0],i[1],e.action)}this.matrix.select(i[0],i[1])}},i.prototype.editNextRow=function(e,t,i){var r=this.parent,n=r.editSettings.allowNextRowEdit&&(r.isEdit||r.isLastCellPrimaryKey),o=r.getColumnIndexByField(r.getVisibleColumns()[0].field),s=this.getTable().rows[e].cells[t];return"tab"===i&&n&&(e++,t=o+(this.getTable().rows[e].getElementsByClassName("e-indentcell").length+this.getTable().rows[e].getElementsByClassName("e-detailrowcollapse").length)),"shiftTab"===i&&n&&(e--,t=r.getColumnIndexByField(r.getVisibleColumns()[r.getVisibleColumns().length-1].field)),s.classList.contains(bi)||s.classList.contains("e-headercell")||s.classList.contains("e-groupcaption")?[e,t]:this.editNextRow(e,t,i)},i.prototype.getCurrentFromAction=function(e,t,i,r){if(void 0===t&&(t=[0,0]),!i&&!this.indexesByKey(e)||0===this.matrix.current.length)return null;if(!this.shouldFocusChange(r))return this.matrix.current;var n=this.indexesByKey(e)||this.matrix.current.concat(t),o=n[0],s=n[1],l=n[2],a=n[3];return this.matrix.get(o,s,[l,a],e,this.validator())},i.prototype.onClick=function(e,i){var r=e.target;if(this.target=r,r=r.classList.contains(bi)?r:t.closest(r,"td"),r=r||(t.closest(e.target,"td.e-detailrowcollapse")||t.closest(e.target,"td.e-detailrowexpand")),r=t.closest(e.target,"td.e-detailcell")&&t.isNullOrUndefined(t.closest(t.closest(e.target,".e-grid"),"td.e-detailcell"))?null:r,!(r=r&&t.closest(r,"table").classList.contains(Mi)?r:null))return!1;var n=[r.parentElement.rowIndex,r.cellIndex],o=n[0],s=n[1],l=this.matrix.current,a=l[0],h=l[1],d=t.getValue(o+"."+s,this.matrix.matrix);if(this.matrix.inValid(d)||!i&&a===o&&h===s||!O(e.target,bi)&&!O(e.target,"e-groupcaption"))return!1;this.matrix.select(o,s)},i.prototype.getFocusInfo=function(){var e={},i=this.matrix.current,r=i[0],n=void 0===r?0:r,o=i[1],s=void 0===o?0:o;return this.matrix.current=[n,s],e.element=t.isNullOrUndefined(this.getTable().rows[n])?null:this.getTable().rows[n].cells[s],e.element?(e.elementToFocus=e.element.classList.contains("e-unboundcell")||e.element.classList.contains("e-detailcell")?e.element:this.getFocusable(e.element),e.outline=!0,e.uid=e.element.parentElement.getAttribute("data-uid"),e):e},i.prototype.getFocusable=function(e){var i='button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])',r=!t.isNullOrUndefined(t.closest(e,".e-templatecell"));this.parent.isEdit&&(i='input:not([type="hidden"]), select:not([aria-hidden="true"]), textarea');var n=[].slice.call(e.querySelectorAll(i));return n.length?r&&n.length>1?this.target:n[0]:e},i.prototype.selector=function(i,r,n){var o=[e.CellType.Expand,e.CellType.GroupCaption,e.CellType.CaptionSummary,e.CellType.GroupSummary];return(i.isDataRow&&r.visible&&(r.isDataCell||r.isTemplate)||i.isDataRow&&r.cellType===e.CellType.DetailExpand&&t.isNullOrUndefined(r.visible)||!i.isDataRow&&o.indexOf(r.cellType)>-1||r.column&&"checkbox"===r.column.type||r.cellType===e.CellType.CommandColumn||i.isDataRow&&n)&&!("delete"===i.edit&&i.isDirty)},i.prototype.nextRowFocusValidate=function(e){for(var t=e,i=e,r=this.matrix.rows;i<r;i++){if(-1!==this.matrix.matrix[e].indexOf(1))return e;e+=1}return this.lastIdxCell=!0,t},i.prototype.previousRowFocusValidate=function(e){for(var t=e,i=e;i>=0;i--){if(-1!==this.matrix.matrix[e].indexOf(1))return e;if((e-=1)<0)return this.lastIdxCell=!0,t}return t},i.prototype.jump=function(e,t){var i=this.parent.getFrozenLeftCount()&&("leftArrow"===e||"shiftTab"===e)&&0===t[1],r=("rightArrow"===e||"tab"===e)&&t[1]===this.matrix.columns,n=this.parent.getFrozenMode()===Pi&&r;"Right"===this.parent.getFrozenMode()&&(i=r),this.lastIdxCell=!1;var o=0!==this.parent.frozenRows&&"shiftEnter"===e;"tab"!==e||this.parent.isEdit||t[1]!==this.matrix.matrix[t[0]].lastIndexOf(1)||this.matrix.matrix.length-1===t[0]||(this.matrix.current[0]=this.nextRowFocusValidate(this.matrix.current[0]+1),this.matrix.current[1]=-1,i=this.parent.isFrozenGrid()),"shiftTab"!==e||this.parent.isEdit||0===t[0]||this.matrix.matrix[t[0]].indexOf(1)!==t[1]||(this.matrix.current[0]=this.previousRowFocusValidate(this.matrix.current[0]-1),this.matrix.current[1]=this.matrix.matrix[t[0]].length);var s=!1,l=document.activeElement.parentElement;return(this.parent.enableVirtualization||this.parent.infiniteScrollSettings.enableCache)&&l.classList.contains(Oi)&&(s=parseInt(l.getAttribute(Hi),10)>0),{swap:!s&&(("upArrow"===e||o)&&0===t[0]||i||n),toHeader:("upArrow"===e||o)&&0===t[0],toFrozen:i,toFrozenRight:n}},i.prototype.getNextCurrent=function(e,t,i,r){void 0===e&&(e=[]);var n=[];return"Right"===this.parent.getFrozenMode()||this.parent.getFrozenMode()===Pi?("leftArrow"!==r&&"shiftTab"!==r||(n[0]=e[0],n[1]=i.matrix.columns+1),this.parent.getFrozenMode()!==Pi||"rightArrow"!==r&&"tab"!==r||(n[0]=e[0],n[1]=-1)):"rightArrow"!==r&&"tab"!==r||(n[0]=e[0],n[1]=-1),"downArrow"!==r&&"enter"!==r||(n[0]=-1,n[1]=e[1]),n},i.prototype.generateRows=function(e,t){var i,r=t.matrix,n=t.handlerInstance,o=n.matrix.matrix.length,s=this.parent.allowFiltering&&"FilterBar"===this.parent.filterSettings.type?o+1:o;n.matrix.matrix=n.matrix.matrix.slice(0,s),n.matrix.rows=s,(i=n.matrix.matrix).push.apply(i,r),n.matrix.rows+=r.length},i.prototype.getInfo=function(e){var t=this.getFocusInfo(),i=this.matrix.current,r=i[0],n=i[1],o=t.element.classList.contains(bi),s=o||e&&"enter"!==e.action&&(t.element.classList.contains("e-detailrowcollapse")||t.element.classList.contains("e-detailrowexpand")),l=[Math.min(parseInt(t.element.parentElement.getAttribute(Hi),10),r),Math.min(parseInt(t.element.getAttribute(qi),10),n)];return{isContent:!0,isDataCell:o,indexes:[l[0],l[1]],isSelectable:s}},i.prototype.validator=function(){var e=this.getTable();return function(i,r,n){if(!t.isNullOrUndefined(e.rows[i])){var o=void 0;r=e.querySelector(".e-emptyrow")?0:r;var s=0!==(o=e.rows[i].cells[0].classList.contains("e-editcell")?e.rows[i].cells[0].querySelectorAll("td")[r]:e.rows[i].cells[r]).getBoundingClientRect().width;if("enter"===n||"shiftEnter"===n)return s&&o.classList.contains(bi);if(("shiftUp"===n||"shiftDown"===n)&&o.classList.contains(bi))return s;if("shiftUp"!==n&&"shiftDown"!==n)return s}return!1}},i.prototype.shouldFocusChange=function(e){var i=this.matrix.current,r=i[0],n=void 0===r?-1:r,o=i[1],s=void 0===o?-1:o;if(n<0||s<0)return!0;var l=t.getValue(n+".cells."+s,this.getTable().rows);return!l||("enter"!==e.action&&"shiftEnter"!==e.action||l.classList.contains(bi)&&!l.classList.contains("e-unboundcell")&&(!l.classList.contains("e-templatecell")||l.classList.contains("e-editedbatchcell"))&&!l.classList.contains("e-detailcell"))},i.prototype.getGridSeletion=function(){return this.parent.allowSelection&&this.parent.selectionSettings.allowColumnSelection},i}(),kr=function(i){function r(e){return i.call(this,e)||this}return zr(r,i),r.prototype.getTable=function(){return this.parent.isFrozenGrid()?this.parent.getHeaderContent().querySelector(".e-movableheader .e-table"):this.parent.getHeaderTable()},r.prototype.onClick=function(e){var i=e.target;if(this.target=i,(i=i.classList.contains("e-headercell")?i:t.closest(i,"th"))||0===this.parent.frozenRows||(i=e.target.classList.contains(bi)?e.target:t.closest(e.target,"td")),e.target.classList.contains("e-columnheader")||e.target.querySelector(".e-stackedheadercell"))return!1;if(i){var r=[i.parentElement.rowIndex,i.cellIndex],n=r[0],o=r[1],s=t.getValue(n+"."+o,this.matrix.matrix);if(this.matrix.inValid(s))return!1;this.matrix.select(i.parentElement.rowIndex,i.cellIndex)}},r.prototype.getFocusInfo=function(){var e={},i=this.matrix.current,r=i[0],n=void 0===r?0:r,o=i[1],s=void 0===o?0:o;return e.element=this.getTable().rows[n].cells[s],t.isNullOrUndefined(e.element)||(e.elementToFocus=this.getFocusable(e.element),e.outline=!e.element.classList.contains("e-filterbarcell")),e},r.prototype.selector=function(i,r){return r.visible&&(void 0!==r.column.field||r.isTemplate||!t.isNullOrUndefined(r.column.template))||"checkbox"===r.column.type||r.cellType===e.CellType.StackedHeader},r.prototype.jump=function(e,i){var r=this.parent.getFrozenLeftCount()&&("leftArrow"===e||"shiftLeft"===e&&this.getGridSeletion()||"shiftTab"===e)&&0===i[1],n=("rightArrow"===e||"shiftRight"===e&&this.getGridSeletion()||"tab"===e)&&i[1]===this.matrix.columns,o=this.parent.getFrozenMode()===Pi&&n;"Right"===this.parent.getFrozenMode()&&(r=n);var s,l,a=0!==this.parent.frozenRows&&"enter"===e,h=r||o,d=this.parent.focusModule.fHeader&&this.parent.focusModule.fHeader.matrix.matrix,c=d&&!t.isNullOrUndefined(d[i[0]]);return this.parent.enableHeaderFocus&&"tab"===e&&(l=this.matrix.matrix.length-1===i[0],(s=i[1]===this.matrix.matrix[i[0]].lastIndexOf(1))&&(this.matrix.current[0]=l?0:this.matrix.current[0]+1,this.matrix.current[1]=-1),this.parent.isFrozenGrid()&&l&&s&&(r=!0,h=!1)),{swap:("downArrow"===e||a)&&i[0]===this.matrix.matrix.length-1||c&&(r||o)||"tab"===e&&l&&s,toHeader:h,toFrozen:r,toFrozenRight:o}},r.prototype.getNextCurrent=function(e,t,i,r){void 0===e&&(e=[]);var n=[];return"Right"===this.parent.getFrozenMode()||this.parent.getFrozenMode()===Pi?(("leftArrow"===r||"shiftLeft"===r&&this.getGridSeletion()||"shiftTab"===r)&&(n[0]=e[0],n[1]=i.matrix.columns+1),this.parent.getFrozenMode()===Pi&&("rightArrow"===r||"shiftRight"===r&&this.getGridSeletion()||"tab"===r)&&(n[0]=e[0],n[1]=-1)):("rightArrow"===r||"shiftRight"===r&&this.getGridSeletion()||"tab"===r)&&(n[0]=e[0],n[1]=-1),"upArrow"!==r&&"shiftEnter"!==r||(n[0]=this.matrix.matrix.length,n[1]=e[1]),n},r.prototype.generateRows=function(e){var t=this.matrix.matrix.length;if(this.parent.allowFiltering&&"FilterBar"===this.parent.filterSettings.type){this.matrix.rows=++this.matrix.rows;for(var i=e[0].cells,r=0;r<i.length;r++)this.matrix.set(t,r,i[r].visible&&!1!==i[r].column.allowFiltering)}},r.prototype.getInfo=function(e){return t.extend(i.prototype.getInfo.call(this,e),{isContent:!1,isHeader:!0})},r.prototype.validator=function(){return function(){return!0}},r.prototype.shouldFocusChange=function(e){var i=this.matrix.current,r=i[0],n=i[1];if(r<0||n<0)return!0;var o=t.getValue(r+".cells."+n,this.getTable().rows);return!o||("enter"!==e.action&&"altDownArrow"!==e.action||!o.classList.contains("e-headercell"))},r}(Or),Ar=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zr(t,e),t.prototype.getTable=function(){return this.parent.getContent().querySelector(".e-frozencontent .e-table")},t.prototype.jump=function(e,t){var i=0!==this.parent.frozenRows&&"shiftEnter"===e,r=("upArrow"===e||i)&&0===t[0];return"Right"===this.parent.getFrozenMode()?{swap:r||("shiftTab"===e||"leftArrow"===e)&&0===t[1],toHeader:r,toFrozen:r}:{swap:r||("tab"===e||"rightArrow"===e)&&t[1]===this.matrix.columns,toHeader:r,toFrozen:r}},t.prototype.getNextCurrent=function(e,t,i,r){void 0===e&&(e=[]);var n=[];return"Right"===this.parent.getFrozenMode()?"rightArrow"!==r&&"tab"!==r||(n[0]=e[0],n[1]=-1):("tab"===r&&this.parent.enableHeaderFocus&&(n[0]=e[0],n[1]=-1),"leftArrow"!==r&&"shiftTab"!==r||(n[0]=e[0],n[1]=i.matrix.columns+1)),"downArrow"!==r&&"enter"!==r||(n[0]=-1,n[1]=e[1]),n},t}(Or),Br=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return zr(i,e),i.prototype.jump=function(e,i){var r=0!==this.parent.frozenRows&&"enter"===e,n=this.parent.focusModule.header&&this.parent.focusModule.header.matrix.matrix,o=n&&!t.isNullOrUndefined(n[i[0]]);if("Right"===this.parent.getFrozenMode()){var s=("leftArrow"===e||"shiftLeft"===e&&this.getGridSeletion()||"shiftTab"===e)&&0===i[1];return{swap:("downArrow"===e||r)&&i[0]===this.matrix.matrix.length-1||o&&s,toHeader:s,toFrozen:("downArrow"===e||r)&&i[0]===this.matrix.matrix.length-1}}return{swap:("downArrow"===e||r)&&i[0]===this.matrix.matrix.length-1||("rightArrow"===e||"shiftRight"===e&&this.getGridSeletion()||"tab"===e)&&i[1]===this.matrix.columns&&o,toHeader:("rightArrow"===e||"shiftRight"===e&&this.getGridSeletion()||"tab"===e)&&i[1]===this.matrix.columns,toFrozen:("downArrow"===e||r)&&i[0]===this.matrix.matrix.length-1}},i.prototype.getTable=function(){return this.parent.getHeaderContent().querySelector(".e-frozenheader .e-table")},i.prototype.getNextCurrent=function(e,t,i,r){void 0===e&&(e=[]);var n=[];return"Right"===this.parent.getFrozenMode()?("rightArrow"===r||"shiftRight"===r&&this.getGridSeletion()||"tab"===r)&&(n[0]=e[0],n[1]=-1):("leftArrow"===r||"shiftLeft"===r&&this.getGridSeletion()||"shiftTab"===r)&&(n[0]=e[0],n[1]=i.matrix.columns+1),"upArrow"!==r&&"shiftEnter"!==r||(n[0]=this.matrix.matrix.length,n[1]=e[1]),n},i}(kr),Pr=function(){function e(e){this.searchBox=e}return e.prototype.searchFocus=function(e){e.target.parentElement.classList.add("e-input-focus")},e.prototype.searchBlur=function(e){e.target.parentElement.classList.remove("e-input-focus")},e.prototype.wireEvent=function(){this.searchBox&&(t.EventHandler.add(this.searchBox,"focus",this.searchFocus,this),t.EventHandler.add(this.searchBox,"blur",this.searchBlur,this))},e.prototype.unWireEvent=function(){this.searchBox&&(t.EventHandler.remove(this.searchBox,"focus",this.searchFocus),t.EventHandler.remove(this.searchBox,"blur",this.searchBlur))},e}(),Nr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zr(t,e),t.prototype.getTable=function(){return this.parent.getContent().querySelector(".e-frozen-right-content .e-table")},t.prototype.jump=function(e,t){var i=0!==this.parent.frozenRows&&"shiftEnter"===e,r=("upArrow"===e||i)&&0===t[0];return{swap:r||("shiftTab"===e||"leftArrow"===e)&&0===t[1],toHeader:r,toFrozenRight:r}},t.prototype.getNextCurrent=function(e,t,i,r){void 0===e&&(e=[]);var n=[];return"rightArrow"!==r&&"tab"!==r||(n[0]=e[0],n[1]=-1),"downArrow"!==r&&"enter"!==r||(n[0]=-1,n[1]=e[1]),n},t}(Or),Lr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return zr(i,e),i.prototype.jump=function(e,i){var r=this.parent.focusModule.header&&this.parent.focusModule.header.matrix.matrix,n=r&&!t.isNullOrUndefined(r[i[0]]),o=0!==this.parent.frozenRows&&"enter"===e,s=("leftArrow"===e||"shiftLeft"===e&&this.getGridSeletion()||"shiftTab"===e)&&0===i[1];return{swap:("downArrow"===e||o)&&i[0]===this.matrix.matrix.length-1||n&&s,toHeader:s,toFrozenRight:("downArrow"===e||o)&&i[0]===this.matrix.matrix.length-1}},i.prototype.getTable=function(){return this.parent.getHeaderContent().querySelector(".e-frozen-right-header .e-table")},i.prototype.getNextCurrent=function(e,t,i,r){void 0===e&&(e=[]);var n=[];return("rightArrow"===r||"shiftRight"===r&&this.getGridSeletion()||"tab"===r)&&(n[0]=e[0],n[1]=0),"upArrow"!==r&&"shiftEnter"!==r||(n[0]=this.matrix.matrix.length,n[1]=e[1]),n},i}(kr),qr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Hr=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},Ur=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qr(i,e),Hr([t.Property(12)],i.prototype,"pageSize",void 0),Hr([t.Property(8)],i.prototype,"pageCount",void 0),Hr([t.Property(1)],i.prototype,"currentPage",void 0),Hr([t.Property()],i.prototype,"totalRecordsCount",void 0),Hr([t.Property(!1)],i.prototype,"enableQueryString",void 0),Hr([t.Property(!1)],i.prototype,"pageSizes",void 0),Hr([t.Property(null)],i.prototype,"template",void 0),i}(t.ChildProperty),jr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Vr=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},Gr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return jr(i,e),Vr([t.Property("startsWith")],i.prototype,"operator",void 0),Vr([t.Property(!1)],i.prototype,"ignoreAccent",void 0),i}(t.ChildProperty),_r=function(){return(_r=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)},Wr=function(){function r(e,t,i){this.selectedRowIndexes=[],this.selectedRowCellIndexes=[],this.selectedRecords=[],this.preventFocus=!1,this.selectedColumnsIndexes=[],this.checkBoxState=!1,this.isMultiShiftRequest=!1,this.isMultiCtrlRequest=!1,this.enableSelectMultiTouch=!1,this.clearRowCheck=!1,this.selectRowCheck=!1,this.selectedRowState={},this.totalRecordsCount=0,this.chkAllCollec=[],this.isCheckedOnAdd=!1,this.persistSelectedData=[],this.deSelectedData=[],this.needColumnSelection=!1,this.isCancelDeSelect=!1,this.isPreventCellSelect=!1,this.disableUI=!1,this.isPersisted=!1,this.cmdKeyPressed=!1,this.cellselected=!1,this.isMultiSelection=!1,this.isAddRowsToSelection=!1,this.initialRowSelection=!1,this.isPrevRowSelection=!1,this.isKeyAction=!1,this.autoFillRLselection=!0,this.bottom="0 0 2px 0",this.top="2px 0 0 0",this.right_bottom="0 2px 2px 0",this.bottom_left="0 0 2px 2px",this.top_right="2px 2px 0 0",this.top_left="2px 0 0 2px",this.top_bottom="2px 0 2px 0",this.top_right_bottom="2px 2px 2px 0",this.top_bottom_left="2px 0 2px 2px",this.top_right_left="2px 2px 0 2px",this.right_bottom_left="0 2px 2px 2px",this.all_border="2px",this.parent=e,this.selectionSettings=t,this.factory=i.getService("rendererFactory"),this.focus=i.getService("focus"),this.addEventListener(),this.wireEvents()}return r.prototype.initializeSelection=function(){this.parent.log("selection_key_missing"),this.render()},r.prototype.onActionBegin=function(e,t){this.parent.trigger(t,this.fDataUpdate(e))},r.prototype.fDataUpdate=function(e){if(!(this.isMultiSelection||t.isNullOrUndefined(e.cellIndex)&&t.isNullOrUndefined(e.rowIndex))){var i=this.getRowObj(t.isNullOrUndefined(e.rowIndex)?t.isNullOrUndefined(e.cellIndex)?this.currentIndex:e.cellIndex.rowIndex:e.rowIndex);e.foreignKeyData=i.foreignKeyData}return e},r.prototype.onActionComplete=function(e,t){this.parent.trigger(t,this.fDataUpdate(e)),this.isMultiSelection=!1},r.prototype.getModuleName=function(){return"selection"},r.prototype.destroy=function(){var e=this.parent.element;e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.hidePopUp(),this.clearSelection(),this.removeEventListener(),this.unWireEvents(),t.EventHandler.remove(this.parent.getContent(),"mousedown",this.mouseDownHandler),t.EventHandler.remove(this.parent.getHeaderContent(),"mousedown",this.mouseDownHandler))},r.prototype.isEditing=function(){return("Normal"===this.parent.editSettings.mode||"Batch"===this.parent.editSettings.mode&&this.parent.editModule&&this.parent.editModule.formObj&&!this.parent.editModule.formObj.validate())&&this.parent.isEdit&&!this.parent.isPersistSelection},r.prototype.getSelectedMovableRow=function(e){var t=this.parent;return t.isFrozenGrid()&&this.parent.getContent().querySelector("."+Ei)?t.getMovableRowByIndex(e):null},r.prototype.getSelectedFrozenRightRow=function(e){var t=this.parent;return t.isFrozenGrid()&&t.getFrozenMode()===Pi&&t.getFrozenRightContent()?t.getFrozenRightRowByIndex(e):null},r.prototype.getCurrentBatchRecordChanges=function(){var e=this.parent;if("Batch"===e.editSettings.mode&&e.editModule){var t=R(this.parent.getCurrentViewRecords());t="Bottom"===e.editSettings.newRowPosition?t.concat(this.parent.editModule.getBatchChanges().addedRecords):this.parent.editModule.getBatchChanges().addedRecords.concat(t);for(var i=this.parent.editModule.getBatchChanges().deletedRecords,r=this.parent.getPrimaryKeyFieldNames()[0],n=0;n<i.length;n++)for(var o=0;o<t.length;o++)if(i[n][r]===t[o][r]){t.splice(o,1);break}return t}return e.getCurrentViewRecords()},r.prototype.selectRow=function(e,t){if(this.selectedRowIndexes.length&&this.selectionSettings.enableSimpleMultiRowSelection)return void this.addRowsToSelection([e]);var i,r=this.parent,n=r.getRowByIndex(e),o=this.getSelectedMovableRow(e),s=this.getSelectedFrozenRightRow(e);if(r.enableVirtualization&&e>-1){var l={selectedIndex:e,isAvailable:!0};this.parent.notify("select-virtual-Row",l);var a=r.isFrozenGrid()?r.contentModule.getRowObjectByIndex(e):null;if(!n||!r.getRowObjectFromUID(n.getAttribute("data-uid"))&&!a)return void(l.isAvailable&&!r.selectionSettings.persistSelection&&this.parent.getSelectedRecords().length>0&&this.clearRowSelection());i=a||r.getRowObjectFromUID(n.getAttribute("data-uid")).data}else i=this.getCurrentBatchRecordChanges()[e];if(this.isRowType()&&n&&!this.isEditing()){var h=n.hasAttribute("aria-selected");this.activeTarget(),t=t?!!this.selectedRowIndexes.length&&(1===this.selectedRowIndexes.length&&((!this.isKeyAction||!this.parent.isCheckBoxSelection)&&e===this.selectedRowIndexes[0])):t,this.isKeyAction=!1;var d;t?this.rowSelectingCallBack(d,t,e,i,!1,h,"cancel")(d):(d={data:i,rowIndex:e,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest,row:n,previousRow:r.getRowByIndex(this.prevRowIndex),previousRowIndex:this.prevRowIndex,target:this.actualTarget,cancel:!1,isInteracted:this.isInteracted,isHeaderCheckboxClicked:this.isHeaderCheckboxClicked},d=this.addMovableArgs(d,o,s),this.parent.trigger("rowSelecting",this.fDataUpdate(d),this.rowSelectingCallBack(d,t,e,i,!1,h,"cancel")))}},r.prototype.rowSelectingCallBack=function(e,i,r,n,o,s,l){var a=this;return function(e){if(!t.isNullOrUndefined(e)&&!0===e[l])return void a.disableInteracted();a.index=r,a.toggle=i,a.data=n,a.removed=o,s&&a.selectionSettings.persistSelection&&"ResetOnRowClick"!==a.selectionSettings.checkboxMode?(a.clearSelectedRow(r),a.selectRowCallBack()):!s&&a.selectionSettings.persistSelection&&"ResetOnRowClick"!==a.selectionSettings.checkboxMode&&a.selectRowCallBack(),"ResetOnRowClick"===a.selectionSettings.checkboxMode&&a.clearSelection(),(!a.selectionSettings.persistSelection||"ResetOnRowClick"===a.selectionSettings.checkboxMode||!a.parent.isCheckBoxSelection&&a.selectionSettings.persistSelection)&&(a.selectRowCheck=!0,a.clearRow())}},r.prototype.selectRowCallBack=function(){var e,t=this.parent,i=this.index,r=this.toggle,n=this.data,o=this.removed,s=t.getRowByIndex(i),l=this.getSelectedMovableRow(i),a=this.getSelectedFrozenRightRow(i);r||o||(this.selectedRowIndexes.indexOf(i)<=-1&&(this.updateRowSelection(s,i),this.selectMovableRow(l,a,i)),this.selectRowIndex(i)),r||(e={data:n,rowIndex:i,row:s,previousRow:t.getRowByIndex(this.prevRowIndex),previousRowIndex:this.prevRowIndex,target:this.actualTarget,isInteracted:this.isInteracted,isHeaderCheckBoxClicked:this.isHeaderCheckboxClicked},e=this.addMovableArgs(e,l,a),this.onActionComplete(e,"rowSelected")),this.isInteracted=!1,this.updateRowProps(i)},r.prototype.selectMovableRow=function(e,t,i){this.parent.isFrozenGrid()&&(this.updateRowSelection(e,i),this.parent.getFrozenMode()===Pi&&t&&this.updateRowSelection(t,i))},r.prototype.addMovableArgs=function(e,t,i){if(this.parent.isFrozenGrid()){var r={mRow:t,previousMovRow:this.parent.getMovableRows()[this.prevRowIndex]};this.parent.getFrozenMode()===Pi&&i&&(r.frozenRightRow=i,r.previousFrozenRightRow=this.parent.getFrozenRightDataRows()[this.prevRowIndex]),e=_r({},e,r)}return e},r.prototype.selectRowsByRange=function(e,t){this.selectRows(this.getCollectionFromIndexes(e,t)),this.selectRowIndex(t)},r.prototype.selectRows=function(e){var i=this,r=this.parent,n=this.isSingleSel()?e[e.length-1]:e[0];this.isMultiSelection=!0;var o=[],s=[],l=this.getSelectedMovableRow(n),a=this.getSelectedFrozenRightRow(n),h=[];if(this.isRowType()&&!this.isEditing()){for(var d=0,c=e.length;d<c;d++){var p=this.parent.getDataRows()[e[d]],u=this.getRowObj(p);u&&(h.push(u.data),o.push(p),s.push(u.foreignKeyData))}this.activeTarget();var g;!t.isBlazor()||this.parent.isJsComponent||this.parent.isHybrid?(g={cancel:!1,rowIndexes:e,row:o,rowIndex:n,target:this.actualTarget,prevRow:r.getRows()[this.prevRowIndex],previousRowIndex:this.prevRowIndex,isInteracted:this.isInteracted,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest,data:h,isHeaderCheckboxClicked:this.isHeaderCheckboxClicked,foreignKeyData:s},g=this.addMovableArgs(g,l,a)):g={cancel:!1,rowIndexes:e,rowIndex:n,previousRowIndex:this.prevRowIndex,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest,data:h,isHeaderCheckboxClicked:this.isHeaderCheckboxClicked,foreignKeyData:s},this.parent.trigger("rowSelecting",this.fDataUpdate(g),function(h){if(!t.isNullOrUndefined(h)&&!0===h.cancel)return void i.disableInteracted();i.clearRow(),i.selectRowIndex(e.slice(-1)[0]);var d=function(e){if(i.updateRowSelection(r.getRowByIndex(e),e),r.isFrozenGrid()){var t=i.parent.getFrozenMode()===Pi?r.getFrozenRightRowByIndex(e):void 0;i.selectMovableRow(r.getMovableRowByIndex(e),t,e)}i.updateRowProps(n)};if(i.isSingleSel())d(n);else for(var c=0,p=e;c<p.length;c++)d(p[c]);!t.isBlazor()||i.parent.isJsComponent||i.parent.isHybrid?(h={rowIndexes:e,row:o,rowIndex:n,target:i.actualTarget,prevRow:r.getRows()[i.prevRowIndex],previousRowIndex:i.prevRowIndex,data:i.getSelectedRecords(),isInteracted:i.isInteracted,isHeaderCheckboxClicked:i.isHeaderCheckboxClicked,foreignKeyData:s},h=i.addMovableArgs(h,l,a)):h={rowIndexes:e,rowIndex:n,previousRowIndex:i.prevRowIndex,row:o,prevRow:r.getRows()[i.prevRowIndex],data:i.getSelectedRecords(),isInteracted:i.isInteracted,isHeaderCheckboxClicked:i.isHeaderCheckboxClicked,foreignKeyData:s},i.isRowSelected&&i.onActionComplete(h,"rowSelected"),i.isInteracted=!1})}},r.prototype.addRowsToSelection=function(e){var i=this.parent,r=this.target;this.isMultiSelection=!0;var n=i.getSelectedRowIndexes().concat(e),o=this.isSingleSel()?i.getRowByIndex(e[e.length-1]):i.getRowByIndex(e[0]),s=this.isSingleSel()?this.getSelectedMovableRow(e[e.length-1]):this.getSelectedMovableRow(e[0]),l=this.isSingleSel()?this.getSelectedFrozenRightRow(e[e.length-1]):this.getSelectedFrozenRightRow(e[0]);if(this.isRowType()&&!this.isEditing()||this.selectionSettings.checkboxOnly)for(var a,h=this.parent.getColumns().filter(function(e){return"checkbox"===e.type}),d=0,c=e;d<c.length;d++){var p=c[d],u=this.getRowObj(p),g=this.selectedRowIndexes.indexOf(p)>-1;if(this.selectRowIndex(p),g&&(h.length||this.selectionSettings.enableToggle||this.isMultiCtrlRequest)){if(this.isAddRowsToSelection=!0,this.rowDeselect("rowDeselecting",[p],[u.data],[o],[u.foreignKeyData],r),this.isCancelDeSelect)return;this.selectedRowIndexes.splice(this.selectedRowIndexes.indexOf(p),1),this.selectedRecords.splice(this.selectedRecords.indexOf(o),1),this.selectRowIndex(this.selectedRowIndexes.length?this.selectedRowIndexes[this.selectedRowIndexes.length-1]:-1),o.removeAttribute("aria-selected"),this.addRemoveClassesForRow(o,!1,null,"e-selectionbackground","e-active"),s&&(this.selectedRecords.splice(this.selectedRecords.indexOf(s),1),s.removeAttribute("aria-selected"),this.addRemoveClassesForRow(s,!1,null,"e-selectionbackground","e-active")),l&&(this.selectedRecords.splice(this.selectedRecords.indexOf(l),1),l.removeAttribute("aria-selected"),this.addRemoveClassesForRow(l,!1,null,"e-selectionbackground","e-active")),this.rowDeselect("rowDeselected",[p],[u.data],[o],[u.foreignKeyData],r,[s],void 0,[l]),this.isInteracted=!1,this.isMultiSelection=!1,this.isAddRowsToSelection=!1}else{f="isHybrid";if(this.activeTarget(),!t.isBlazor()||this.parent.isJsComponent||this.parent[f]?(a={cancel:!1,data:u.data,rowIndex:p,row:o,target:this.actualTarget,prevRow:i.getRows()[this.prevRowIndex],previousRowIndex:this.prevRowIndex,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest,foreignKeyData:u.foreignKeyData,isInteracted:this.isInteracted,isHeaderCheckboxClicked:this.isHeaderCheckboxClicked,rowIndexes:n},a=this.addMovableArgs(a,s,l)):a={cancel:!1,data:u.data,rowIndex:p,previousRowIndex:this.prevRowIndex,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest,foreignKeyData:u.foreignKeyData,isInteracted:this.isInteracted,isHeaderCheckboxClicked:this.isHeaderCheckboxClicked,rowIndexes:n},this.parent.trigger("rowSelecting",this.fDataUpdate(a)),!t.isNullOrUndefined(a)&&!0===a.cancel)return void this.disableInteracted();this.isSingleSel()&&this.clearRow(),this.updateRowSelection(o,p),this.selectMovableRow(s,l,p)}if(!g){var f="isHybrid";!t.isBlazor()||this.parent.isJsComponent||this.parent[f]?(a={data:u.data,rowIndex:p,row:o,target:this.actualTarget,prevRow:i.getRows()[this.prevRowIndex],previousRowIndex:this.prevRowIndex,foreignKeyData:u.foreignKeyData,isInteracted:this.isInteracted,isHeaderCheckboxClicked:this.isHeaderCheckboxClicked,rowIndexes:n},a=this.addMovableArgs(a,s,l)):a={data:u.data,rowIndex:p,previousRowIndex:this.prevRowIndex,row:o,prevRow:i.getRows()[this.prevRowIndex],foreignKeyData:u.foreignKeyData,isInteracted:this.isInteracted,isHeaderCheckboxClicked:this.isHeaderCheckboxClicked,rowIndexes:n},this.onActionComplete(a,"rowSelected")}if(this.isInteracted=!1,this.updateRowProps(p),this.isSingleSel())break}},r.prototype.getCollectionFromIndexes=function(e,t){for(var i=[],r=e<=t?{i:e,max:t}:{i:t,max:e},n=r.i,o=r.max;n<=o;n++)i.push(n);return e>t&&i.reverse(),i},r.prototype.clearRow=function(){this.clearRowCheck=!0,this.clearRowSelection()},r.prototype.clearRowCallBack=function(){this.isCancelDeSelect&&"Check"!==this.parent.checkAllRows||(this.selectedRowIndexes=[],this.selectedRecords=[],this.selectRowIndex(-1),this.isSingleSel()&&this.parent.isPersistSelection&&(this.selectedRowState={}))},r.prototype.clearSelectedRow=function(e){if(this.toggle){var t=this.parent.getRowByIndex(e);this.disableUI||(t.removeAttribute("aria-selected"),this.addRemoveClassesForRow(t,!1,!0,"e-selectionbackground","e-active")),this.removed=!0,this.updatePersistCollection(t,!1),this.updateCheckBoxes(t),this.selectedRowIndexes.splice(this.selectedRowIndexes.indexOf(e),1),this.selectedRecords.splice(this.selectedRecords.indexOf(this.parent.getRowByIndex(e)),1)}},r.prototype.updateRowProps=function(e){this.prevRowIndex=e,this.isRowSelected=this.selectedRowIndexes.length&&!0},r.prototype.updatePersistCollection=function(e,i){var r=this;if((this.parent.isPersistSelection||this.parent.selectionSettings.persistSelection&&this.parent.getPrimaryKeyFieldNames().length>0)&&!t.isNullOrUndefined(e)){this.parent.isPersistSelection||this.ensureCheckboxFieldSelection();var n=this.getRowObj(e),o=n.data?n.data[this.primaryKey]:null;if(null===o)return;n.isSelected=i,i?(this.selectedRowState[o]=i,this.persistSelectedData.some(function(e){return e[r.primaryKey]===o})||this.persistSelectedData.push(n.data)):this.updatePersistDelete(o)}},r.prototype.updatePersistDelete=function(e){var t=this;delete this.selectedRowState[e];var i;this.persistSelectedData.some(function(r,n){return i=n,r[t.primaryKey]===e})&&this.persistSelectedData.splice(i,1)},r.prototype.updateCheckBoxes=function(e,i,r){if(!t.isNullOrUndefined(e)){var n=e.querySelector(".e-checkselect");t.isNullOrUndefined(n)||(oe(n.nextElementSibling,i),re(n,i),(t.isNullOrUndefined(this.checkedTarget)||!t.isNullOrUndefined(this.checkedTarget)&&!this.checkedTarget.classList.contains("e-checkselectall"))&&this.setCheckAllState(r))}},r.prototype.updateRowSelection=function(e,t){if(e){this.selectedRowIndexes.push(t);var i=this.selectedRowIndexes.length;if(this.parent.isFrozenGrid()&&i>1&&this.selectedRowIndexes[i-2]===this.selectedRowIndexes[i-1]&&this.selectedRowIndexes.pop(),this.selectedRecords.push(e),e.setAttribute("aria-selected","true"),this.updatePersistCollection(e,!0),this.updateCheckBoxes(e,!0),this.addRemoveClassesForRow(e,!0,null,"e-selectionbackground","e-active"),!this.preventFocus){var r=this.focus.getPrevIndexes().cellIndex?e.cells[this.focus.getPrevIndexes().cellIndex]:e.querySelector(".e-selectionbackground:not(.e-hide):not(.e-detailrowcollapse):not(.e-detailrowexpand)");if(this.parent.contextMenuModule&&2===this.mouseButton&&(r=this.parent.contextMenuModule.cell),!r)return;this.focus.onClick({target:r},!0)}}},r.prototype.clearSelection=function(){if(this.checkSelectAllClicked=!0,this.selectionSettings.persistSelection&&this.persistSelectedData.length&&(this.deSelectedData=R(this.persistSelectedData)),!this.parent.isPersistSelection||this.parent.isPersistSelection&&!this.parent.isEdit||!t.isNullOrUndefined(this.checkedTarget)&&this.checkedTarget.classList.contains("e-checkselectall")){var e=this.parent.element.querySelector(".e-gridpopup").querySelector("span");e.classList.contains("e-rowselect")&&e.classList.remove("e-spanclicked"),this.parent.isPersistSelection&&(this.persistSelectedData=[],this.selectedRowState={}),this.clearRowSelection(),this.clearCellSelection(),this.clearColumnSelection(),this.prevRowIndex=void 0,this.enableSelectMultiTouch=!1,this.isInteracted=!1,this.checkSelectAllClicked=!1}},r.prototype.clearRowSelection=function(){var e=this;if(this.isRowSelected){for(var i=this.parent,r=this.parent.getDataRows(),n=[],o=[],s=[],l=[],a=[],h=[],d=this.target,c=0,p=this.selectedRowIndexes.length;c<p;c++){var u="Batch"===this.parent.editSettings.mode?this.parent.getRows()[this.selectedRowIndexes[c]]:this.parent.getDataRows()[this.selectedRowIndexes[c]],g=this.getRowObj(u);g&&(n.push(g.data),o.push(u),a.push(this.selectedRowIndexes[c]),h.push(g.foreignKeyData)),i.isFrozenGrid()&&(s.push(i.getMovableRows()[this.selectedRowIndexes[c]]),i.getFrozenMode()===Pi&&l.push(i.getFrozenRightRows()[this.selectedRowIndexes[c]]))}this.selectionSettings.persistSelection&&"ResetOnRowClick"!==this.selectionSettings.checkboxMode&&(this.isRowClicked=!!this.checkSelectAllClicked),this.rowDeselect("rowDeselecting",a,n,o,h,d,s,function(){if(e.isCancelDeSelect&&(e.isRowClicked||e.checkSelectAllClicked||e.isInteracted&&!e.parent.isPersistSelection)){if(e.parent.isPersistSelection)if("Intermediate"===e.getCheckAllStatus(e.parent.element.querySelector(".e-checkselectall")))for(p=0;p<e.selectedRecords.length;p++)e.updatePersistCollection(e.selectedRecords[p],!0);else e.parent.checkAllRows="Check",e.updatePersistSelectedData(!0);return void(e.clearRowCheck&&(e.clearRowCallBack(),e.clearRowCheck=!1,e.selectRowCheck&&(e.selectRowCallBack(),e.selectRowCheck=!1)))}for(var i=[].slice.call(r.filter(function(e){return e.hasAttribute("aria-selected")})),c=0;c<i.length;c++)e.disableUI&&!t.isBlazor()||(i[c].removeAttribute("aria-selected"),e.addRemoveClassesForRow(i[c],!1,!0,"e-selectionbackground","e-active")),e.isPrevRowSelection||e.updatePersistCollection(i[c],!1),e.updateCheckBoxes(i[c]);for(var p=0,u=e.selectedRowIndexes.length;p<u;p++){var g=e.getSelectedMovableRow(e.selectedRowIndexes[p]);g&&(e.disableUI&&!t.isBlazor()||(g.removeAttribute("aria-selected"),e.addRemoveClassesForRow(g,!1,!0,"e-selectionbackground","e-active")),e.updateCheckBoxes(g),e.isPrevRowSelection||e.updatePersistCollection(g,!1));var f=e.getSelectedFrozenRightRow(e.selectedRowIndexes[p]);f&&(e.disableUI||(f.removeAttribute("aria-selected"),e.addRemoveClassesForRow(f,!1,!0,"e-selectionbackground","e-active")),e.updateCheckBoxes(f),e.isPrevRowSelection||e.updatePersistCollection(f,!1))}e.selectedRowIndexes=[],e.selectedRecords=[],e.isRowSelected=!1,e.selectRowIndex(-1),e.isPrevRowSelection=!1,e.rowDeselect("rowDeselected",a,n,o,h,d,s,void 0,l),e.clearRowCheck&&(e.clearRowCallBack(),e.clearRowCheck=!1,e.selectRowCheck&&(e.selectRowCallBack(),e.selectRowCheck=!1))},l)}else this.clearRowCheck&&(this.clearRowCallBack(),this.clearRowCheck=!1,this.selectRowCheck&&(this.selectRowCallBack(),this.selectRowCheck=!1))},r.prototype.rowDeselect=function(e,i,r,n,o,s,l,a,h){var d=this;if(this.selectionSettings.persistSelection&&(this.isRowClicked||this.checkSelectAllClicked)||!this.selectionSettings.persistSelection){var c=1===i.length&&1===this.deSelectedData.length,p={rowIndex:i[0],data:this.selectionSettings.persistSelection&&"Uncheck"===this.parent.checkAllRows&&!c&&"ResetOnRowClick"!==this.selectionSettings.checkboxMode?this.deSelectedData:r,foreignKeyData:o,cancel:!1,isInteracted:this.isInteracted,isHeaderCheckboxClicked:this.isHeaderCheckboxClicked};"rowDeselected"===e&&delete p.cancel;if(!t.isBlazor()||this.parent.isJsComponent||this.parent.isHybrid){p.row=n,p.target=this.actualTarget,this.actualTarget&&!t.isNullOrUndefined(t.closest(this.actualTarget,"thead"))||i.length>1?(p.rowIndex=i[0],p.rowIndexes=i):1===i.length&&(p.data=p.data[0],p.row=p.row[0],p.foreignKeyData=p.foreignKeyData[0],this.isAddRowsToSelection&&(p.rowIndexes=i))}else{p.rowIndex=p.rowIndex[p.rowIndex.length-1],p.data=p.data[p.data.length-1]}this.parent.trigger(e,t.isBlazor()&&!this.parent.isJsComponent||!this.parent.isFrozenGrid()?p:_r({},p,{mRow:l,frozenRightRow:h}),function(e){d.isCancelDeSelect=e.cancel,d.isCancelDeSelect&&(d.isRowClicked||d.isInteracted||d.checkSelectAllClicked)||(d.updatePersistCollection(n[0],!1),d.updateCheckBoxes(n[0],void 0,i[0]),l&&d.updateCheckBoxes(l[0],void 0,i[0]),h&&d.updateCheckBoxes(h[0],void 0,i[0])),void 0!==a&&a()})}else this.selectionSettings.persistSelection&&!this.isInteracted&&void 0!==a&&a()},r.prototype.getRowObj=function(e){return void 0===e&&(e=this.currentIndex),t.isNullOrUndefined(e)?{}:("number"==typeof e&&(e=this.parent.getRowByIndex(e)),e?this.parent.getRowObjectFromUID(e.getAttribute("data-uid"))||{}:{})},r.prototype.getSelectedMovableCell=function(e){var t=this.parent,i=t.getColumnByIndex(e.cellIndex);return t.isFrozenGrid()&&"movable"===i.getFreezeTableName()?t.getMovableCellFromIndex(e.rowIndex,this.getColIndex(e.rowIndex,e.cellIndex)):null},r.prototype.selectCell=function(e,i){if(this.isCellType()){var r,n=this.parent,o=this.getSelectedMovableCell(e);o||(o=n.getCellFromIndex(e.rowIndex,this.getColIndex(e.rowIndex,e.cellIndex))),this.currentIndex=e.rowIndex;var s=this.getCurrentBatchRecordChanges()[this.currentIndex];if(this.isCellType()&&o&&!this.isEditing()){var l=o.classList.contains("e-cellselectionbackground");if(i=i?!t.isUndefined(this.prevCIdxs)&&e.rowIndex===this.prevCIdxs.rowIndex&&e.cellIndex===this.prevCIdxs.cellIndex&&l:i)this.successCallBack(r,i,e,o,s)(r);else{if(r={data:s,cellIndex:e,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest,previousRowCell:this.prevECIdxs?this.getCellIndex(this.prevECIdxs.rowIndex,this.prevECIdxs.cellIndex):void 0,cancel:!1},!t.isBlazor()||this.parent.isJsComponent){r.currentCell=o;r.previousRowCellIndex=this.prevECIdxs}this.parent.trigger("cellSelecting",this.fDataUpdate(r),this.successCallBack(r,i,e,o,s)),this.cellselected=!0}}}},r.prototype.successCallBack=function(e,i,r,n,o){var s=this;return function(e){if((t.isNullOrUndefined(e)||!0!==e.cancel)&&(i||(e.currentCell=e.currentCell?e.currentCell:n),s.clearCell(),i||s.updateCellSelection(n,r.rowIndex,r.cellIndex),!i)){var l=void 0;if(!t.isBlazor()||s.parent.isJsComponent||s.parent.isHybrid){(l={data:o,cellIndex:r,currentCell:n,selectedRowCellIndex:s.selectedRowCellIndexes,previousRowCell:s.prevECIdxs?s.getCellIndex(s.prevECIdxs.rowIndex,s.prevECIdxs.cellIndex):void 0}).previousRowCellIndex=s.prevECIdxs}else l={data:o,cellIndex:r,selectedRowCellIndex:s.selectedRowCellIndexes};s.updateCellProps(r,r),s.onActionComplete(l,"cellSelected")}}},r.prototype.getCellIndex=function(e,t){return this.parent.getFrozenColumns()&&t>=this.parent.getFrozenColumns()?this.parent.getMovableCellFromIndex(e,t):this.parent.getCellFromIndex(e,t)},r.prototype.selectCellsByRange=function(e,i){var r=this;if(this.isCellType()){var n=this.parent,o=this.getSelectedMovableCell(e),s=n.getFrozenColumns();o||(o=n.getCellFromIndex(e.rowIndex,e.cellIndex));var l,a,h,d=e,c=i=i||e;this.currentIndex=e.rowIndex;var p=this.getCurrentBatchRecordChanges()[this.currentIndex];if(!this.isSingleSel()&&this.isCellType()&&!this.isEditing()){var u={data:p,cellIndex:e,currentCell:o,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest,previousRowCell:this.prevECIdxs?this.getCellIndex(this.prevECIdxs.rowIndex,this.prevECIdxs.cellIndex):void 0};if(!t.isBlazor()){u.previousRowCellIndex=this.prevECIdxs}this.parent.trigger("cellSelecting",this.fDataUpdate(u),function(u){if(t.isNullOrUndefined(u)||!0!==u.cancel){if(r.clearCell(),e.rowIndex>i.rowIndex){var g=e;e=i,i=g}for(var f=e.rowIndex;f<=i.rowIndex;f++){r.selectionSettings.cellSelectionMode.indexOf("Box")<0?(l=f===e.rowIndex?e.cellIndex:0,a=f===i.rowIndex?i.cellIndex:r.getLastColIndex(f)):(l=e.cellIndex,a=i.cellIndex),h=[];for(var m=l<a?l:a,y=l>a?l:a;m<=y;m++)(o=s?m<s?n.getCellFromIndex(f,m):n.getMovableCellFromIndex(f,m):n.getCellFromIndex(f,m))&&(h.push(m),r.updateCellSelection(o),r.addAttribute(o));r.selectedRowCellIndexes.push({rowIndex:f,cellIndexes:h})}var v;if(!t.isBlazor()||r.parent.isJsComponent||r.parent.isHybrid){(v={data:p,cellIndex:c,currentCell:n.getCellFromIndex(c.rowIndex,c.cellIndex),selectedRowCellIndex:r.selectedRowCellIndexes,previousRowCell:r.prevECIdxs?r.getCellIndex(r.prevECIdxs.rowIndex,r.prevECIdxs.cellIndex):void 0}).previousRowCellIndex=r.prevECIdxs}else v={data:p,cellIndex:c,selectedRowCellIndex:r.selectedRowCellIndexes};r.isDragged||(r.onActionComplete(v,"cellSelected"),r.cellselected=!0),r.updateCellProps(d,c)}})}}},r.prototype.selectCells=function(e){if(this.isCellType()){var i=this.parent,r=this.getSelectedMovableCell(e[0]),n=i.getFrozenColumns();r||(r=i.getCellFromIndex(e[0].rowIndex,e[0].cellIndexes[0])),this.currentIndex=e[0].rowIndex;var o=this.getCurrentBatchRecordChanges()[this.currentIndex];if(!this.isSingleSel()&&this.isCellType()&&!this.isEditing()){var s;!t.isBlazor()||this.parent.isJsComponent||this.parent.isHybrid?(s={data:o,cellIndex:e[0].cellIndexes[0],currentCell:r,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest,previousRowCell:this.prevECIdxs?this.getCellIndex(this.prevECIdxs.rowIndex,this.prevECIdxs.cellIndex):void 0})[p="previousRowCellIndex"]=this.prevECIdxs:s={data:o,cellIndex:e[0].cellIndexes[0],isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest},this.onActionBegin(s,"cellSelecting");for(var l=0,a=e.length;l<a;l++)for(var h=0,d=e[l].cellIndexes.length;h<d;h++)(r=n?e[l].cellIndexes[h]<n?i.getCellFromIndex(e[l].rowIndex,e[l].cellIndexes[h]):i.getMovableCellFromIndex(e[l].rowIndex,e[l].cellIndexes[h]):i.getCellFromIndex(e[l].rowIndex,e[l].cellIndexes[h]))&&(this.updateCellSelection(r),this.addAttribute(r),this.addRowCellIndex({rowIndex:e[l].rowIndex,cellIndex:e[l].cellIndexes[h]}));this.updateCellProps({rowIndex:e[0].rowIndex,cellIndex:e[0].cellIndexes[0]},{rowIndex:e[0].rowIndex,cellIndex:e[0].cellIndexes[0]});var c;if(!t.isBlazor()||this.parent.isJsComponent||this.parent.isHybrid){var p="previousRowCellIndex";(c={data:o,cellIndex:e[0].cellIndexes[0],currentCell:r,selectedRowCellIndex:this.selectedRowCellIndexes,previousRowCell:this.prevECIdxs?this.getCellIndex(this.prevECIdxs.rowIndex,this.prevECIdxs.cellIndex):void 0})[p]=this.prevECIdxs}else c={data:o,cellIndex:e[0].cellIndexes[0],selectedRowCellIndex:this.selectedRowCellIndexes};this.onActionComplete(c,"cellSelected")}}},r.prototype.addCellsToSelection=function(e){if(this.isCellType()){var i,r,n=this.parent;this.currentIndex=e[0].rowIndex;var o=this.getCurrentBatchRecordChanges()[this.currentIndex],s=n.getFrozenLeftCount(),l=n.getMovableColumnsCount();if(!this.isSingleSel()&&this.isCellType()&&!this.isEditing()){this.hideAutoFill();var a,h=n.getColumnByIndex(e[0].cellIndex);Be(this.parent,function(t,i){a=i[e[0].rowIndex]},[h.getFreezeTableName()&&h.getFreezeTableName()!==Li?[]:n.getRowsObject(),"movable"===h.getFreezeTableName()?n.getMovableRowsObject():[],h.getFreezeTableName()===Ni?n.getFrozenRightRowsObject():[]]);for(var d=[],c=0,p=e;c<p.length;c++){for(var u=p[c],g=0,f=this.selectedRowCellIndexes.length;g<f;g++)if(this.selectedRowCellIndexes[g].rowIndex===u.rowIndex){r=g;break}(i=this.getSelectedMovableCell(u))||(i=n.getCellFromIndex(u.rowIndex,this.getColIndex(u.rowIndex,u.cellIndex)));var m="movable"===h.getFreezeTableName()?u.cellIndex-s:h.getFreezeTableName()===Ni?u.cellIndex-(s+l):u.cellIndex;d.push(a.cells[m].foreignKeyData);var y=void 0;!t.isBlazor()||this.parent.isJsComponent||this.parent.isHybrid?(y={cancel:!1,data:o,cellIndex:e[0],isShiftPressed:this.isMultiShiftRequest,currentCell:i,isCtrlPressed:this.isMultiCtrlRequest,previousRowCell:this.prevECIdxs?n.getCellFromIndex(this.prevECIdxs.rowIndex,this.prevECIdxs.cellIndex):void 0})[b="previousRowCellIndex"]=this.prevECIdxs:y={cancel:!1,data:o,cellIndex:e[0],isShiftPressed:this.isMultiShiftRequest,isCtrlPressed:this.isMultiCtrlRequest};var v=r>-1;if(v){var C=this.selectedRowCellIndexes[r].cellIndexes;C.indexOf(u.cellIndex)>-1?(this.cellDeselect("cellDeselecting",[{rowIndex:u.rowIndex,cellIndexes:[u.cellIndex]}],o,[i],d),C.splice(C.indexOf(u.cellIndex),1),0===C.length&&this.selectedRowCellIndexes.splice(r,1),i.classList.remove("e-cellselectionbackground"),i.removeAttribute("aria-selected"),this.cellDeselect("cellDeselected",[{rowIndex:u.rowIndex,cellIndexes:[u.cellIndex]}],o,[i],d)):(v=!1,this.onActionBegin(y,"cellSelecting"),this.addRowCellIndex({rowIndex:u.rowIndex,cellIndex:u.cellIndex}),this.updateCellSelection(i),this.addAttribute(i))}else{if(this.onActionBegin(y,"cellSelecting"),!t.isNullOrUndefined(y)&&!0===y.cancel)return;this.updateCellSelection(i,u.rowIndex,u.cellIndex)}if(!v){var w=void 0;if(!t.isBlazor()||this.parent.isJsComponent||this.parent.isHybrid){var b="previousRowCellIndex";(w={data:o,cellIndex:e[0],currentCell:i,previousRowCell:this.prevECIdxs?this.getCellIndex(this.prevECIdxs.rowIndex,this.prevECIdxs.cellIndex):void 0,selectedRowCellIndex:this.selectedRowCellIndexes})[b]=this.prevECIdxs}else w={data:o,cellIndex:e[0],selectedRowCellIndex:this.selectedRowCellIndexes};this.onActionComplete(w,"cellSelected"),this.cellselected=!0}this.updateCellProps(u,u)}}}},r.prototype.getColIndex=function(e,t){var i=this.parent.isFrozenGrid(),r=this.parent.getColumnByIndex(t),n=qe(this.parent,r,e);if(n)for(var o=0;o<n.length;o++)if(parseInt(n[o].getAttribute(qi),10)===t)return i&&("movable"===r.getFreezeTableName()?o+=this.parent.getFrozenLeftCount():r.getFreezeTableName()===Ni&&(o+=this.parent.getFrozenLeftColumnsCount()+this.parent.getMovableColumnsCount())),o;return-1},r.prototype.getLastColIndex=function(e){var t=this.parent.getFrozenColumns()?this.parent.getMovableDataRows()[e].querySelectorAll("td.e-rowcell"):this.parent.getDataRows()[e].querySelectorAll("td.e-rowcell");return parseInt(t[t.length-1].getAttribute(qi),10)},r.prototype.clearCell=function(){this.clearCellSelection()},r.prototype.cellDeselect=function(e,i,r,n,o){n[0]&&n[0].classList.contains(ki)&&this.updateCheckBoxes(t.closest(n[0],"tr"));var s={cells:n,data:r,cellIndexes:i,foreignKeyData:o,cancel:!1};this.parent.trigger(e,s),this.isPreventCellSelect=s.cancel},r.prototype.updateCellSelection=function(e,i,r){t.isNullOrUndefined(i)||this.addRowCellIndex({rowIndex:i,cellIndex:r}),e.classList.add("e-cellselectionbackground"),e.classList.contains(ki)&&this.updateCheckBoxes(t.closest(e,"tr"),!0),this.addAttribute(e)},r.prototype.addAttribute=function(e){this.target=e,t.isNullOrUndefined(e)||(e.setAttribute("aria-selected","true"),this.preventFocus||this.focus.onClick({target:e},!0))},r.prototype.updateCellProps=function(e,t){this.prevCIdxs=e,this.prevECIdxs=t,this.isCellSelected=this.selectedRowCellIndexes.length&&!0},r.prototype.addRowCellIndex=function(e){for(var t,i,r=0,n=this.selectedRowCellIndexes.length;r<n;r++)if(this.selectedRowCellIndexes[r].rowIndex===e.rowIndex){t=!0,i=r;break}t?this.selectedRowCellIndexes[i].cellIndexes.indexOf(e.cellIndex)<0&&this.selectedRowCellIndexes[i].cellIndexes.push(e.cellIndex):this.selectedRowCellIndexes.push({rowIndex:e.rowIndex,cellIndexes:[e.cellIndex]})},r.prototype.clearCellSelection=function(){if(this.isCellSelected){var e=this.parent,t=this.getSelectedCellsElement(),i=this.selectedRowCellIndexes,r=[],n=[],o=[],s=this.getCurrentBatchRecordChanges(),l=e.isFrozenGrid();this.hideAutoFill();for(var a=0,h=i.length;a<h;a++){r.push(s[i[a].rowIndex]);for(var d=this.getRowObj(i[a].rowIndex),c=0,p=i[a].cellIndexes.length;c<p;c++)if(l){var u=e.getColumnByIndex(i[a].cellIndexes[c]);n.push(He(this.parent,u,i[a].rowIndex,i[a].cellIndexes[c]))}else d.cells&&o.push(d.cells[i[a].cellIndexes[c]].foreignKeyData),n.push(e.getCellFromIndex(i[a].rowIndex,i[a].cellIndexes[c]))}if(this.cellDeselect("cellDeselecting",i,r,n,o),!0===this.isPreventCellSelect)return;for(var a=0,h=t.length;a<h;a++)t[a].classList.remove("e-cellselectionbackground"),t[a].removeAttribute("aria-selected");this.bdrElement&&this.showHideBorders("none"),this.selectedRowCellIndexes=[],this.isCellSelected=!1,!this.isDragged&&this.cellselected&&this.cellDeselect("cellDeselected",i,r,n,o)}},r.prototype.getSelectedCellsElement=function(){var e,t=this.parent,i=t.getDataRows();t.isFrozenGrid()&&(e=t.getMovableDataRows(),i=t.addMovableRows(i,e),t.getFrozenMode()===Pi&&(i=t.addMovableRows(i,t.getFrozenRightDataRows())));for(var r=[],n=0,o=i.length;n<o;n++)r=r.concat([].slice.call(i[n].getElementsByClassName("e-cellselectionbackground")));return r},r.prototype.mouseMoveHandler=function(e){e.preventDefault();var i,r=this.parent.element.getBoundingClientRect(),n=this.x,o=this.y,s=N(e),l=s.x-r.left,a=s.y-r.top,h=t.closest(e.target,"tr");if(this.isDragged=!0,this.isCellDrag||(h||(h=t.closest(document.elementFromPoint(this.parent.element.offsetLeft+2,e.clientY),"tr")),n>l&&(i=l,l=n,n=i),o>a&&(i=a,a=o,o=i),this.element.style.left=n+"px",this.element.style.top=o+"px",this.element.style.width=l-n+"px",this.element.style.height=a-o+"px"),h&&!e.ctrlKey&&!e.shiftKey){var d=parseInt(h.getAttribute(Hi),10);if(this.isCellDrag){var c=O(e.target,bi);c&&(this.startAFCell=this.startCell,this.endAFCell=O(e.target,bi),this.selectLikeExcel(e,d,parseInt(c.getAttribute(qi),10)))}else this.hideAutoFill(),this.selectRowsByRange(this.startDIndex,d)}},r.prototype.selectLikeExcel=function(e,t,i){this.isAutoFillSel?(this.showAFBorders(),this.selectLikeAutoFill(e)):(this.clearCellSelection(),this.selectCellsByRange({rowIndex:this.startDIndex,cellIndex:this.startDCellIndex},{rowIndex:t,cellIndex:i}),this.drawBorders())},r.prototype.drawBorders=function(){"BoxWithBorder"===this.selectionSettings.cellSelectionMode&&this.selectedRowCellIndexes.length&&!this.parent.isEdit?(this.parent.element.classList.add("e-enabledboxbdr"),this.bdrElement||this.createBorders(),this.positionBorders()):this.showHideBorders("none")},r.prototype.isLastCell=function(e){var t=[].slice.call(e.parentElement.querySelectorAll(".e-rowcell:not(.e-hide)"));return t[t.length-1]===e},r.prototype.isLastRow=function(e){var i=[].slice.call(t.closest(e,Ui).querySelectorAll(".e-row:not(.e-hiddenrow)"));return e.parentElement===i[i.length-1]},r.prototype.isFirstRow=function(e){var i=[].slice.call(t.closest(e,Ui).querySelectorAll(".e-row:not(.e-hiddenrow)"));return e.parentElement===i[0]},r.prototype.isFirstCell=function(e){return[].slice.call(e.parentElement.querySelectorAll(".e-rowcell:not(.e-hide)"))[0]===e},r.prototype.setBorders=function(e,t,i){var r=[].slice.call(e.getElementsByClassName("e-cellselectionbackground")).filter(function(e){return""===e.style.display});if(r.length){var n=this.parent.isFrozenGrid(),o=r[0],s=r[r.length-1],l=o.getBoundingClientRect(),a=s.getBoundingClientRect(),h=o.offsetParent.getBoundingClientRect(),d=!this.isLastRow(s)||"1"!==i&&"2"!==i&&"5"!==i?0:2,c=this.parent.frozenRows&&("1"===i||"2"===i)&&this.isFirstRow(o)?1.5:0,p=n&&("2"===i||"4"===i)&&this.isFirstCell(o)?1:0,u=("Right"!==this.parent.getFrozenMode()||"1"!==i&&"3"!==i)&&(this.parent.getFrozenMode()!==Pi||"5"!==i&&"6"!==i)||!this.isFirstCell(o)?0:1;this.parent.enableRtl?(t.style.right=h.right-l.right-p+"px",t.style.width=l.right-a.left+p+1+"px"):(t.style.left=l.left-h.left-p-u+"px",t.style.width=a.right-l.left+p-u+1+"px"),t.style.top=l.top-h.top-c+"px",t.style.height=a.top-l.top>0?a.top-h.top+a.height+1-(l.top-h.top)-d+c+"px":a.height+c-d+1+"px",this.selectDirection+=i}else t.style.display="none"},r.prototype.positionBorders=function(){this.updateStartEndCells(),this.startCell&&this.bdrElement&&this.selectedRowCellIndexes.length&&(this.selectDirection="",this.showHideBorders(""),this.setBorders(this.parent.getContentTable(),this.bdrElement,"1"),this.parent.isFrozenGrid()&&(this.setBorders(this.parent.contentModule.getMovableContent(),this.mcBdrElement,"2"),this.parent.getFrozenMode()===Pi&&this.setBorders(this.parent.contentModule.getFrozenRightContent(),this.frcBdrElement,"5")),this.parent.frozenRows&&(this.setBorders(this.parent.getHeaderTable(),this.fhBdrElement,"3"),this.parent.isFrozenGrid()&&(this.setBorders(this.parent.headerModule.getMovableHeader(),this.mhBdrElement,"4"),this.parent.getFrozenMode()===Pi&&this.setBorders(this.parent.headerModule.getFrozenRightHeader(),this.frhBdrElement,"6"))),this.applyBorders(this.selectDirection))},r.prototype.applyBothFrozenBorders=function(e){var t=this.parent.enableRtl;switch(e.length){case 6:this.bdrElement.style.borderWidth=t?this.right_bottom:this.bottom_left,this.mcBdrElement.style.borderWidth=this.bottom,this.fhBdrElement.style.borderWidth=t?this.top_right:this.top_left,this.mhBdrElement.style.borderWidth=this.top,this.frcBdrElement.style.borderWidth=t?this.bottom_left:this.right_bottom,this.frhBdrElement.style.borderWidth=t?this.top_left:this.top_right;break;case 4:e.includes("1")&&e.includes("2")&&e.includes("3")&&e.includes("4")&&(this.fhBdrElement.style.borderWidth=t?this.top_right:this.top_left,this.mhBdrElement.style.borderWidth=t?this.top_left:this.top_right,this.bdrElement.style.borderWidth=t?this.right_bottom:this.bottom_left,this.mcBdrElement.style.borderWidth=t?this.bottom_left:this.right_bottom),e.includes("2")&&e.includes("4")&&e.includes("5")&&e.includes("6")&&(this.mcBdrElement.style.borderWidth=t?this.right_bottom:this.bottom_left,this.mhBdrElement.style.borderWidth=t?this.top_right:this.top_left,this.frcBdrElement.style.borderWidth=t?this.bottom_left:this.right_bottom,this.frhBdrElement.style.borderWidth=t?this.top_left:this.top_right);break;case 3:this.bdrElement.style.borderWidth=t?this.top_right_bottom:this.top_bottom_left,this.mcBdrElement.style.borderWidth=this.top_bottom,this.frcBdrElement.style.borderWidth=t?this.top_bottom_left:this.top_right_bottom,this.parent.frozenRows&&(this.fhBdrElement.style.borderWidth=t?this.top_right_bottom:this.top_bottom_left,this.mhBdrElement.style.borderWidth=this.top_bottom,this.frcBdrElement.style.borderWidth=t?this.top_bottom_left:this.top_right_bottom);break;case 2:e.includes("1")&&(this.mcBdrElement.style.borderWidth=t?this.top_bottom_left:this.top_right_bottom,this.parent.frozenRows&&(this.fhBdrElement.style.borderWidth=this.top_right_left)),e.includes("2")&&(this.bdrElement.style.borderWidth=t?this.top_right_bottom:this.top_bottom_left,this.frcBdrElement.style.borderWidth=t?this.top_bottom_left:this.top_right_bottom,this.parent.frozenRows&&(this.mhBdrElement.style.borderWidth=this.top_right_left)),e.includes("3")&&(this.mhBdrElement.style.borderWidth=t?this.top_bottom_left:this.top_right_bottom,this.bdrElement.style.borderWidth=this.right_bottom_left),e.includes("4")&&(this.fhBdrElement.style.borderWidth=t?this.top_right_bottom:this.top_bottom_left,this.frhBdrElement.style.borderWidth=t?this.top_bottom_left:this.top_right_bottom,this.mcBdrElement.style.borderWidth=this.right_bottom_left),e.includes("5")&&(this.mcBdrElement.style.borderWidth=t?this.top_right_bottom:this.top_bottom_left,this.parent.frozenRows&&(this.frhBdrElement.style.borderWidth=this.top_right_left)),e.includes("6")&&(this.mhBdrElement.style.borderWidth=t?this.top_right_bottom:this.top_bottom_left,this.frcBdrElement.style.borderWidth=this.right_bottom_left);break;default:this.bdrElement.style.borderWidth=this.all_border,this.mcBdrElement.style.borderWidth=this.all_border,this.frcBdrElement.style.borderWidth=this.all_border,this.parent.frozenRows&&(this.fhBdrElement.style.borderWidth=this.all_border,this.mhBdrElement.style.borderWidth=this.all_border,this.frhBdrElement.style.borderWidth=this.all_border)}},r.prototype.applyBorders=function(e){var t=this.parent.enableRtl;if(this.parent.getFrozenMode()===Pi)this.applyBothFrozenBorders(e);else switch(e.length){case 4:"Right"===this.parent.getFrozenMode()?(this.bdrElement.style.borderWidth=t?this.bottom_left:this.right_bottom,this.mcBdrElement.style.borderWidth=t?this.right_bottom:this.bottom_left,this.fhBdrElement.style.borderWidth=t?this.top_left:this.top_right,this.mhBdrElement.style.borderWidth=t?this.top_right:this.top_left):(this.bdrElement.style.borderWidth=t?this.right_bottom:this.bottom_left,this.mcBdrElement.style.borderWidth=t?this.bottom_left:this.right_bottom,this.fhBdrElement.style.borderWidth=t?this.top_right:this.top_left,this.mhBdrElement.style.borderWidth=t?this.top_left:this.top_right);break;case 2:"Right"===this.parent.getFrozenMode()?(this.bdrElement.style.borderWidth=e.includes("2")?t?this.top_bottom_left:this.top_right_bottom:this.right_bottom_left,this.mcBdrElement.style.borderWidth=e.includes("1")?t?this.top_right_bottom:this.top_bottom_left:this.right_bottom_left,this.parent.frozenRows&&(this.fhBdrElement.style.borderWidth=e.includes("1")?this.top_right_left:t?this.top_bottom_left:this.top_right_bottom,this.mhBdrElement.style.borderWidth=e.includes("2")?this.top_right_left:t?this.top_right_bottom:this.top_bottom_left)):(this.bdrElement.style.borderWidth=e.includes("2")?t?this.top_right_bottom:this.top_bottom_left:this.right_bottom_left,this.parent.isFrozenGrid()&&(this.mcBdrElement.style.borderWidth=e.includes("1")?t?this.top_bottom_left:this.top_right_bottom:this.right_bottom_left),this.parent.frozenRows&&(this.fhBdrElement.style.borderWidth=e.includes("1")?this.top_right_left:t?this.top_right_bottom:this.top_bottom_left,this.parent.isFrozenGrid()&&(this.mhBdrElement.style.borderWidth=e.includes("2")?this.top_right_left:t?this.top_bottom_left:this.top_right_bottom)));break;default:this.bdrElement.style.borderWidth=this.all_border,this.parent.isFrozenGrid()&&(this.mcBdrElement.style.borderWidth=this.all_border),this.parent.frozenRows&&(this.fhBdrElement.style.borderWidth=this.all_border,this.parent.isFrozenGrid()&&(this.mhBdrElement.style.borderWidth=this.all_border))}},r.prototype.createBorders=function(){this.bdrElement||(this.bdrElement=this.parent.getContentTable().parentElement.appendChild(t.createElement("div",{className:"e-xlsel",id:this.parent.element.id+"_bdr",styles:"width: 2px; border-width: 0;"})),this.parent.isFrozenGrid()&&(this.mcBdrElement=this.parent.contentModule.getMovableContent().appendChild(t.createElement("div",{className:"e-xlsel",id:this.parent.element.id+"_mcbdr",styles:"height: 2px; border-width: 0;"})),this.parent.getFrozenMode()===Pi&&(this.frcBdrElement=this.parent.contentModule.getFrozenRightContent().appendChild(t.createElement("div",{className:"e-xlsel",id:this.parent.element.id+"_frcbdr",styles:"height: 2px; border-width: 0;"})))),this.parent.frozenRows&&(this.fhBdrElement=this.parent.getHeaderTable().parentElement.appendChild(t.createElement("div",{className:"e-xlsel",id:this.parent.element.id+"_fhbdr",styles:"height: 2px;"}))),this.parent.frozenRows&&this.parent.isFrozenGrid()&&(this.mhBdrElement=this.parent.headerModule.getMovableHeader().appendChild(t.createElement("div",{className:"e-xlsel",id:this.parent.element.id+"_mhbdr",styles:"height: 2px;"})),this.parent.getFrozenMode()===Pi&&(this.frhBdrElement=this.parent.headerModule.getFrozenRightHeader().appendChild(t.createElement("div",{className:"e-xlsel",id:this.parent.element.id+"_frhbdr",styles:"height: 2px;"})))))},r.prototype.showHideBorders=function(e){this.bdrElement&&(this.bdrElement.style.display=e,this.parent.isFrozenGrid()&&(this.mcBdrElement.style.display=e,this.parent.getFrozenMode()===Pi&&(this.frcBdrElement.style.display=e)),this.parent.frozenRows&&(this.fhBdrElement.style.display=e),this.parent.frozenRows&&this.parent.isFrozenGrid()&&(this.mhBdrElement.style.display=e,this.parent.getFrozenMode()===Pi&&(this.frhBdrElement.style.display=e)))},r.prototype.drawAFBorders=function(){this.bdrAFBottom||this.createAFBorders(),this.positionAFBorders()},r.prototype.positionAFBorders=function(){if(this.startCell&&this.bdrAFLeft){var e=this.startAFCell.getBoundingClientRect(),t=this.endAFCell.getBoundingClientRect(),i=t.top-e.top>0?1:0,r=t.top-e.top>=0&&(O(this.startAFCell,Ei)||O(this.startAFCell,"e-frozencontent"))&&this.isFirstRow(this.startAFCell)?1.5:0,n=(O(this.startAFCell,Ei)||O(this.startAFCell,Ii))&&this.isFirstCell(this.startAFCell)?1:0,o=this.isLastRow(this.endAFCell)&&(O(this.endAFCell,Ei)||O(this.endAFCell,"e-frozencontent"))?2:0,s=this.startAFCell.offsetParent.getBoundingClientRect(),l=this.parent.element.getBoundingClientRect(),a=this.startAFCell.offsetParent.parentElement.scrollTop,h=this.startAFCell.offsetParent.parentElement.scrollLeft,d=a-this.startAFCell.offsetTop,c=h-this.startAFCell.offsetLeft,p=this.parent.element.clientHeight,u=this.parent.element.clientWidth;d=d>0?Math.floor(d)-1:0,c=c>0?c:0;var g=e.left-l.left;if(this.parent.enableRtl){var f=O(this.startAFCell,Ei)||O(this.startAFCell,Ii)?e.right-this.startAFCell.offsetParent.parentElement.getBoundingClientRect().width-l.left:0;this.bdrAFLeft.style.right=l.right-t.right-2+t.width+"px",this.bdrAFLeft.style.width=u<=parseInt(this.bdrAFLeft.style.right,10)?"0px":"2px",this.bdrAFRight.style.right=l.right-e.right-n+f-1+"px",this.bdrAFTop.style.left=t.left-l.left-.5+"px",this.bdrAFTop.style.width=parseInt(this.bdrAFLeft.style.right,10)-parseInt(this.bdrAFRight.style.right,10)-n+1+"px",parseInt(this.bdrAFTop.style.left,10)<0&&(this.bdrAFTop.style.width=parseInt(this.bdrAFTop.style.width,10)+parseInt(this.bdrAFTop.style.left,10)+"px",this.bdrAFTop.style.left="0px")}else if(this.bdrAFLeft.style.left=g-n+c-1+"px",this.bdrAFRight.style.left=t.left-l.left-2+t.width+"px",this.bdrAFRight.style.width=u<=parseInt(this.bdrAFRight.style.left,10)?"0px":"2px",this.bdrAFTop.style.left=g+c-.5+"px",this.bdrAFTop.style.width=parseInt(this.bdrAFRight.style.left,10)-parseInt(this.bdrAFLeft.style.left,10)-n+1+"px",u<=parseInt(this.bdrAFTop.style.width,10)+parseInt(this.bdrAFTop.style.left,10)){var m=parseInt(this.bdrAFTop.style.width,10)+parseInt(this.bdrAFTop.style.left,10)-u;this.bdrAFTop.style.width=parseInt(this.bdrAFTop.style.width,10)-m+"px"}if(this.bdrAFLeft.style.top=e.top-l.top-r+d+"px",this.bdrAFLeft.style.height=t.top-e.top>0?t.top-s.top+t.height+1-(e.top-s.top)+r-o-d+"px":t.height+r-o-d+"px",this.bdrAFRight.style.top=this.bdrAFLeft.style.top,this.bdrAFRight.style.height=parseInt(this.bdrAFLeft.style.height,10)+"px",this.bdrAFTop.style.top=this.bdrAFRight.style.top,this.bdrAFBottom.style.left=this.bdrAFTop.style.left,this.bdrAFBottom.style.top=parseFloat(this.bdrAFLeft.style.top)+parseFloat(this.bdrAFLeft.style.height)-i-1+"px",this.bdrAFBottom.style.width=p<=parseFloat(this.bdrAFBottom.style.top)?"0px":this.bdrAFTop.style.width,p<=parseInt(this.bdrAFLeft.style.height,10)+parseInt(this.bdrAFLeft.style.top,10)){var y=parseInt(this.bdrAFLeft.style.height,10)+parseInt(this.bdrAFLeft.style.top,10)-p;this.bdrAFLeft.style.height=parseInt(this.bdrAFLeft.style.height,10)-y+"px",this.bdrAFRight.style.height=parseInt(this.bdrAFLeft.style.height,10)+"px"}}},r.prototype.createAFBorders=function(){this.bdrAFLeft||(this.bdrAFLeft=this.parent.element.appendChild(t.createElement("div",{className:"e-xlselaf",id:this.parent.element.id+"_bdrafleft",styles:"width: 2px;"})),this.bdrAFRight=this.parent.element.appendChild(t.createElement("div",{className:"e-xlselaf",id:this.parent.element.id+"_bdrafright",styles:"width: 2px;"})),this.bdrAFBottom=this.parent.element.appendChild(t.createElement("div",{className:"e-xlselaf",id:this.parent.element.id+"_bdrafbottom",styles:"height: 2px;"})),this.bdrAFTop=this.parent.element.appendChild(t.createElement("div",{className:"e-xlselaf",id:this.parent.element.id+"_bdraftop",styles:"height: 2px;"})))},r.prototype.showAFBorders=function(){this.bdrAFLeft&&(this.bdrAFLeft.style.display="",this.bdrAFRight.style.display="",this.bdrAFBottom.style.display="",this.bdrAFTop.style.display="")},r.prototype.hideAFBorders=function(){this.bdrAFLeft&&(this.bdrAFLeft.style.display="none",this.bdrAFRight.style.display="none",this.bdrAFBottom.style.display="none",this.bdrAFTop.style.display="none")},r.prototype.updateValue=function(e,t,i){var r=this.createBeforeAutoFill(e,t,i);if(!r.cancel){var n=this.parent.getColumnByIndex(t);this.parent.editModule&&i&&("number"===n.type?this.parent.editModule.updateCell(e,n.field,parseInt(r.value,10)):this.parent.editModule.updateCell(e,n.field,r.value))}},r.prototype.createBeforeAutoFill=function(e,t,i){var r={column:this.parent.getColumnByIndex(t),value:i.innerText};return this.parent.trigger("beforeAutoFill",r),r},r.prototype.getAutoFillCells=function(e,t){var i=".e-cellselectionbackground",r=[].slice.call(this.parent.getDataRows()[e].querySelectorAll(i));return this.parent.isFrozenGrid()&&(r=r.concat([].slice.call(this.parent.getMovableDataRows()[e].querySelectorAll(i))),this.parent.getFrozenMode()===Pi&&(r=r.concat([].slice.call(this.parent.getFrozenRightDataRows()[e].querySelectorAll(i))))),r},r.prototype.selectLikeAutoFill=function(e,t){var i=parseInt(O(this.startAFCell,Oi).getAttribute(Hi),10),r=parseInt(this.startAFCell.getAttribute(qi),10),n=parseInt(O(this.endAFCell,Oi).getAttribute(Hi),10),o=parseInt(this.endAFCell.getAttribute(qi),10),s=this.selectedRowCellIndexes.length-1,l=this.selectedRowCellIndexes[0].cellIndexes.length-1;switch(!0){case!t&&this.endAFCell.classList.contains("e-cellselectionbackground")&&!!O(e.target,bi):this.startAFCell=this.parent.getCellFromIndex(i,r),this.endAFCell=this.parent.getCellFromIndex(i+s,r+l),this.drawAFBorders();break;case this.autoFillRLselection&&r+l<o&&o-r-l+1>n-i-s&&o-r-l+1>i-n:if(this.endAFCell=this.parent.getCellFromIndex(i+s,o),n=parseInt(O(this.endAFCell,Oi).getAttribute(Hi),10),o=parseInt(this.endAFCell.getAttribute(qi),10),t){for(var a=parseInt(this.endCell.getAttribute(qi),10),h=i;h<=n;h++)for(var d=this.getAutoFillCells(h,r),c=0,p=a+1;p<=o;p++)c>l&&(c=0),this.updateValue(h,p,d[c]),c++;this.selectCellsByRange({rowIndex:i,cellIndex:this.startCellIndex},{rowIndex:n,cellIndex:o})}else this.drawAFBorders();break;case this.autoFillRLselection&&r>o&&r-o+1>n-i-s&&r-o+1>i-n:if(this.startAFCell=this.parent.getCellFromIndex(i,o),this.endAFCell=this.endCell,t){for(h=i;h<=i+s;h++){(d=this.getAutoFillCells(h,r)).reverse();for(var c=0,p=this.startCellIndex-1;p>=o;p--)c>l&&(c=0),this.updateValue(h,p,d[c]),c++}this.selectCellsByRange({rowIndex:i,cellIndex:o},{rowIndex:i+s,cellIndex:this.startCellIndex+l})}else this.drawAFBorders();break;case i>n:if(this.startAFCell=this.parent.getCellFromIndex(n,r),this.endAFCell=this.endCell,t){for(var u=g=parseInt(this.endCell.parentElement.getAttribute(Hi),10),h=i-1;h>=n;h--){u===this.startIndex-1&&(u=g);var d=this.getAutoFillCells(u,r),c=0;u--;for(p=this.startCellIndex;p<=this.startCellIndex+l;p++)this.updateValue(h,p,d[c]),c++}this.selectCellsByRange({rowIndex:n,cellIndex:r+l},{rowIndex:i+s,cellIndex:r})}else this.drawAFBorders();break;default:if(this.endAFCell=this.parent.getCellFromIndex(n,r+l),t){for(var g=parseInt(this.endCell.parentElement.getAttribute(Hi),10),u=this.startIndex,h=g+1;h<=n;h++){u===g+1&&(u=this.startIndex);d=this.getAutoFillCells(u,r);u++;for(var c=0,f=this.startCellIndex;f<=this.startCellIndex+l;f++)this.updateValue(h,f,d[c]),c++}this.selectCellsByRange({rowIndex:g-s,cellIndex:r},{rowIndex:n,cellIndex:r+l})}else this.drawAFBorders()}},r.prototype.mouseUpHandler=function(e){if(document.body.classList.remove("e-disableuserselect"),this.element&&t.remove(this.element),this.isDragged&&1===this.selectedRowCellIndexes.length&&1===this.selectedRowCellIndexes[0].cellIndexes.length?this.mUPTarget=O(e.target,bi):this.mUPTarget=null,this.isDragged&&!this.isAutoFillSel&&"Cell"===this.selectionSettings.mode){var i=e.target,r=parseInt(i.parentElement.getAttribute(Hi),10),n=parseInt(i.getAttribute(qi),10);this.isDragged=!1,this.clearCellSelection(),this.selectCellsByRange({rowIndex:this.startDIndex,cellIndex:this.startDCellIndex},{rowIndex:r,cellIndex:n})}if(this.isDragged=!1,this.updateAutoFillPosition(),this.isAutoFillSel){var o=O(e.target,bi);this.endAFCell=o||(this.endCell===this.endAFCell?this.startAFCell:this.endAFCell),this.startAFCell=this.startCell,this.updateStartCellsIndex(),this.selectLikeAutoFill(e,!0),this.updateAutoFillPosition(),this.hideAFBorders(),this.positionBorders(),this.isAutoFillSel=!1}t.EventHandler.remove(this.parent.getContent(),"mousemove",this.mouseMoveHandler),this.parent.frozenRows&&t.EventHandler.remove(this.parent.getHeaderContent(),"mousemove",this.mouseMoveHandler),t.EventHandler.remove(document,"mouseup",this.mouseUpHandler)},r.prototype.hideAutoFill=function(){this.autofill&&(this.autofill.style.display="none")},r.prototype.updateAutoFillPosition=function(){if(this.parent.enableAutoFill&&!this.parent.isEdit&&this.selectionSettings.cellSelectionMode.indexOf("Box")>-1&&!this.isRowType()&&!this.isSingleSel()&&this.selectedRowCellIndexes.length){var e=parseInt(this.target.getAttribute(qi),10),i=parseInt(this.target.getAttribute("index"),10),r=this.selectedRowCellIndexes[this.selectedRowCellIndexes.length-1].rowIndex,n=this.getAutoFillCells(r,e).filter(function(e){return""===e.style.display}),o=this.parent.getColumnByIndex(e),s="movable"===o.getFreezeTableName(),l=i<this.parent.frozenRows,a=this.parent.getFrozenMode()===Pi&&o.getFreezeTableName()===Ni;t.select("#"+this.parent.element.id+"_autofill",O(this.target,Mi))||(t.select("#"+this.parent.element.id+"_autofill",this.parent.element)&&t.select("#"+this.parent.element.id+"_autofill",this.parent.element).remove(),this.autofill=t.createElement("div",{className:"e-autofill",id:this.parent.element.id+"_autofill"}),this.autofill.style.display="none",l?s?this.parent.headerModule.getMovableHeader().appendChild(this.autofill):this.parent.getHeaderTable().parentElement.appendChild(this.autofill):s?this.parent.contentModule.getMovableContent().appendChild(this.autofill):this.parent.getContentTable().parentElement.appendChild(this.autofill),a&&(l?this.parent.getFrozenRightHeader().appendChild(this.autofill):this.parent.getFrozenRightContent().appendChild(this.autofill)));var h=n[n.length-1];if(h&&h.offsetParent){var d=h.getBoundingClientRect(),c=h.offsetParent.getBoundingClientRect(),p=this.isLastCell(h)?4:0,u=this.isLastRow(h)?3:0;this.parent.enableRtl?this.autofill.style.right=c.right-d.right+d.width-4-p+"px":this.autofill.style.left=d.left-c.left+d.width-4-p+"px",this.autofill.style.top=d.top-c.top+d.height-5-u+"px"}this.autofill.style.display=""}else this.hideAutoFill()},r.prototype.mouseDownHandler=function(e){this.mouseButton=e.button;var i,r=e.target,n=this.parent,o=O(r,"e-grid");if(!(o&&o.id!==n.element.id||O(r,Fi)&&!this.parent.frozenRows||O(r,"e-editedbatchcell")||O(r,Ai))){if((e.shiftKey||e.ctrlKey)&&e.preventDefault(),O(r,bi)&&!e.shiftKey&&!e.ctrlKey){if(n.selectionSettings.cellSelectionMode.indexOf("Box")>-1&&!this.isRowType()&&!this.isSingleSel())this.isCellDrag=!0,i=!0;else if(n.allowRowDragAndDrop&&!n.isEdit&&!this.parent.selectionSettings.checkboxOnly){if(!this.isRowType()||this.isSingleSel()||t.closest(r,"td").classList.contains("e-selectionbackground"))return void(this.isDragged=!1);i=!0,this.element=this.parent.createElement("div",{className:"e-griddragarea"}),n.getContent().appendChild(this.element)}i&&this.enableDrag(e,!0)}this.updateStartEndCells(),(r.classList.contains("e-autofill")||r.classList.contains("e-xlsel"))&&(this.isCellDrag=!0,this.isAutoFillSel=!0,this.enableDrag(e))}},r.prototype.updateStartEndCells=function(){var e=[].slice.call(this.parent.element.getElementsByClassName("e-cellselectionbackground"));this.startCell=e[0],this.endCell=e[e.length-1],this.startCell&&(this.startIndex=parseInt(this.startCell.parentElement.getAttribute(Hi),10),this.startCellIndex=parseInt(O(this.startCell,bi).getAttribute(qi),10))},r.prototype.updateStartCellsIndex=function(){this.startCell&&(this.startIndex=parseInt(this.startCell.parentElement.getAttribute(Hi),10),this.startCellIndex=parseInt(O(this.startCell,bi).getAttribute(qi),10))},r.prototype.enableDrag=function(e,i){var r=this.parent;if(i){var n=t.closest(e.target,"tr");this.startDIndex=parseInt(n.getAttribute(Hi),10),this.startDCellIndex=parseInt(O(e.target,bi).getAttribute(qi),10)}document.body.classList.add("e-disableuserselect");var o=r.element.getBoundingClientRect(),s=N(e);this.x=s.x-o.left,this.y=s.y-o.top,t.EventHandler.add(r.getContent(),"mousemove",this.mouseMoveHandler,this),this.parent.frozenRows&&t.EventHandler.add(r.getHeaderContent(),"mousemove",this.mouseMoveHandler,this),t.EventHandler.add(document,"mouseup",this.mouseUpHandler,this)},r.prototype.clearSelAfterRefresh=function(e){var t=this.parent.enableInfiniteScrolling&&"infiniteScroll"===e.requestType;"virtualscroll"===e.requestType||this.parent.isPersistSelection||t||this.clearSelection()},r.prototype.addEventListener=function(){this.parent.isDestroyed||(this.evtHandlers=[{event:Bt,handler:this.enableAfterRender},{event:Ot,handler:this.initializeSelection},{event:"rowselected",handler:this.onActionComplete},{event:"cellselected",handler:this.onActionComplete},{event:Nt,handler:this.onPropertyChanged},{event:"cellfocused",handler:this.onCellFocused},{event:"beforeFragAppend",handler:this.clearSelAfterRefresh},{event:Kt,handler:this.columnPositionChanged},{event:At,handler:this.initialEnd},{event:Xt,handler:this.rowsRemoved},{event:Ht,handler:this.refreshHeader}],Xe(this.parent,this.evtHandlers,!0,this),this.actionBeginFunction=this.actionBegin.bind(this),this.actionCompleteFunction=this.actionComplete.bind(this),this.parent.addEventListener(bt,this.actionBeginFunction),this.parent.addEventListener(St,this.actionCompleteFunction),this.addEventListener_checkbox())},r.prototype.removeEventListener=function(){this.parent.isDestroyed||(Xe(this.parent,this.evtHandlers,!1),this.parent.removeEventListener(bt,this.actionBeginFunction),this.parent.removeEventListener(St,this.actionCompleteFunction),this.removeEventListener_checkbox())},r.prototype.wireEvents=function(){this.isMacOS=-1!==navigator.userAgent.indexOf("Mac OS"),this.isMacOS&&(t.EventHandler.add(this.parent.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.parent.element,"keyup",this.keyUpHandler,this))},r.prototype.unWireEvents=function(){this.isMacOS&&(t.EventHandler.remove(this.parent.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.parent.element,"keyup",this.keyUpHandler))},r.prototype.columnPositionChanged=function(){this.parent.isPersistSelection||this.clearSelection()},r.prototype.refreshHeader=function(){this.setCheckAllState()},r.prototype.rowsRemoved=function(e){for(var t=0;t<e.records.length;t++)delete this.selectedRowState[e.records[t][this.primaryKey]],--this.totalRecordsCount;this.setCheckAllState()},r.prototype.beforeFragAppend=function(e){"virtualscroll"===e.requestType||this.parent.isPersistSelection||this.clearSelection()},r.prototype.getCheckAllBox=function(){return this.parent.getHeaderContent().querySelector(".e-checkselectall")},r.prototype.enableAfterRender=function(e){e.module===this.getModuleName()&&e.enable&&(this.render(),this.initPerisistSelection())},r.prototype.render=function(e){t.EventHandler.add(this.parent.getContent(),"mousedown",this.mouseDownHandler,this),t.EventHandler.add(this.parent.getHeaderContent(),"mousedown",this.mouseDownHandler,this)},r.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()){var i=this.parent;t.isNullOrUndefined(e.properties.type)||"Single"!==this.selectionSettings.type||(this.selectedRowCellIndexes.length>1&&(this.clearCellSelection(),this.prevCIdxs=void 0),this.selectedRowIndexes.length>1&&(this.clearRowSelection(),this.prevRowIndex=void 0),this.selectedColumnsIndexes.length>1&&(this.clearColumnSelection(),this.prevColIndex=void 0),this.enableSelectMultiTouch=!1,this.hidePopUp()),t.isNullOrUndefined(e.properties.mode)&&t.isNullOrUndefined(e.properties.cellSelectionMode)||(this.clearSelection(),this.prevRowIndex=void 0,this.prevCIdxs=void 0,this.prevColIndex=void 0),this.isPersisted=!0,this.checkBoxSelectionChanged(),this.isPersisted=!1,this.initPerisistSelection(),this.parent.getColumns().filter(function(e){return"checkbox"===e.type}).length&&(i.isCheckBoxSelection=!("ResetOnRowClick"===this.selectionSettings.checkboxMode)),this.drawBorders()}},r.prototype.hidePopUp=function(){this.parent.element.querySelector(".e-gridpopup").getElementsByClassName("e-rowselect").length&&(this.parent.element.querySelector(".e-gridpopup").style.display="none")},r.prototype.initialEnd=function(e){var t=this.parent.isFrozenGrid(),i=this.parent.getFrozenMode()===Pi;(!t||t&&!i&&!e.args.isFrozen||i&&e.args.renderFrozenRightContent)&&(this.parent.off(At,this.initialEnd),this.selectRow(this.parent.selectedRowIndex))},r.prototype.checkBoxSelectionChanged=function(){var e=this.parent;e.off(At,this.checkBoxSelectionChanged);var i=e.getColumns().filter(function(e){return"checkbox"===e.type});i.length>0&&(e.isCheckBoxSelection=!0,this.chkField=i[0].field,this.totalRecordsCount=this.parent.pageSettings.totalRecordsCount,t.isNullOrUndefined(this.totalRecordsCount)&&(this.totalRecordsCount=this.getCurrentBatchRecordChanges().length),this.isSingleSel()?(e.selectionSettings.type="Multiple",e.dataBind()):this.initPerisistSelection()),e.isCheckBoxSelection||this.isPersisted||(this.chkField=null,this.initPerisistSelection())},r.prototype.initPerisistSelection=function(){var e=this.parent;this.parent.selectionSettings.persistSelection&&this.parent.getPrimaryKeyFieldNames().length>0?(e.isPersistSelection=!0,this.ensureCheckboxFieldSelection()):this.parent.getPrimaryKeyFieldNames().length>0?(e.isPersistSelection=!1,this.ensureCheckboxFieldSelection()):(e.isPersistSelection=!1,this.selectedRowState={})},r.prototype.ensureCheckboxFieldSelection=function(){var e=this.parent;if(this.primaryKey=this.parent.getPrimaryKeyFieldNames()[0],!e.enableVirtualization&&this.chkField&&(e.isPersistSelection&&0===Object.keys(this.selectedRowState).length||!e.isPersistSelection)){var t=this.parent.getDataModule(),r=(new i.Query).where(this.chkField,"equal",!0);r.params||(r.params=this.parent.query.params);var n=t.getData({},r),o=this;this.parent.showSpinner(),n.then(function(e){o.dataSuccess(e.result),o.refreshPersistSelection(),o.parent.hideSpinner()})}},r.prototype.dataSuccess=function(e){for(var i=0;i<e.length;i++)t.isNullOrUndefined(this.selectedRowState[e[i][this.primaryKey]])&&e[i][this.chkField]&&(this.selectedRowState[e[i][this.primaryKey]]=e[i][this.chkField]);this.persistSelectedData=e},r.prototype.setRowSelection=function(e){if(!this.parent.getDataModule().isRemote()&&!t.isBlazor())if(e)if(this.parent.groupSettings.columns.length)for(var i=0,r=this.getData().records;i<r.length;i++){s=r[i];this.selectedRowState[s[this.primaryKey]]=!0}else for(var n=0,o=this.getData();n<o.length;n++){var s=o[n];this.selectedRowState[s[this.primaryKey]]=!0}else this.selectedRowState={}},r.prototype.getData=function(){return this.parent.getDataModule().dataManager.executeLocal(this.parent.getDataModule().generateQuery(!0))},r.prototype.refreshPersistSelection=function(){var e=this.parent.getRows();if(this.parent.isCheckBoxSelection&&this.parent.isFrozenGrid()&&(this.parent.getMovableContentTbody().querySelector(".e-checkselect")&&(e=this.parent.getMovableRows()),this.parent.getFrozenMode()===Pi&&this.parent.getFrozenRightContentTbody().querySelector(".e-checkselect")&&(e=this.parent.getFrozenRightRows())),this.totalRecordsCount=this.parent.getCurrentViewRecords().length,this.parent.allowPaging&&(this.totalRecordsCount=this.parent.pageSettings.totalRecordsCount),null!==e&&e.length>0&&(this.parent.isPersistSelection||this.chkField)){for(var i=[],r=0;r<e.length;r++){var n=this.getRowObj(e[r]),o=n&&n.data?n.data[this.primaryKey]:null;if(null===o)return;var s=void 0,l=e[r].querySelector(".e-checkselect");this.selectedRowState[o]||"Check"===this.parent.checkAllRows&&this.totalRecordsCount===Object.keys(this.selectedRowState).length&&this.chkAllCollec.indexOf(o)<0||"Uncheck"===this.parent.checkAllRows&&this.chkAllCollec.indexOf(o)>0||"Intermediate"===this.parent.checkAllRows&&!t.isNullOrUndefined(this.chkField)&&n.data[this.chkField]?(i.push(parseInt(e[r].getAttribute(Hi),10)),s=!0):(s=!1,this.checkedTarget!==l&&this.parent.isCheckBoxSelection&&oe(l.nextElementSibling,s)),this.updatePersistCollection(e[r],s)}this.isSingleSel()&&i.length>0?this.selectRow(i[0],!0):this.selectRows(i)}this.parent.isCheckBoxSelection&&this.getCurrentBatchRecordChanges().length>0&&this.setCheckAllState()},r.prototype.actionBegin=function(e){if("save"===e.requestType&&this.parent.isPersistSelection){var i=this.parent.element.querySelector(".e-edit-checkselect");if(!t.isNullOrUndefined(i)){var r=t.closest(i,"."+Ai);if(r){"Dialog"===this.parent.editSettings.mode&&(r=this.parent.element.querySelector(".e-dlgeditrow"));var n=this.getRowObj(r);if(!n)return;this.selectedRowState[n.data[this.primaryKey]]=n.isSelected=i.checked}else this.isCheckedOnAdd=i.checked}}},r.prototype.actionComplete=function(e){if("save"===e.requestType&&this.parent.isPersistSelection){if("add"===e.action&&this.isCheckedOnAdd){var i=this.parent.getRowObjectFromUID(this.parent.getRows()[e.selectedRow].getAttribute("data-uid"));this.selectedRowState[i.data[this.primaryKey]]=i.isSelected=this.isCheckedOnAdd}this.refreshPersistSelection()}if("delete"===e.requestType&&this.parent.isPersistSelection){for(var r=e.data.slice(),n=0;n<r.length;n++)t.isNullOrUndefined(r[n][this.primaryKey])||this.updatePersistDelete(r[n][this.primaryKey]);this.setCheckAllState(),this.totalRecordsCount=this.parent.pageSettings.totalRecordsCount}"paging"===e.requestType&&(this.prevRowIndex=void 0,this.prevCIdxs=void 0,this.prevECIdxs=void 0)},r.prototype.onDataBound=function(){if(!this.parent.enableVirtualization&&this.parent.isPersistSelection&&(this.selectedRecords.length&&(this.isPrevRowSelection=!0),this.refreshPersistSelection()),this.parent.enableVirtualization&&this.setCheckAllState(),this.initialRowSelection=!!(this.isRowType()&&this.parent.element.querySelectorAll(".e-selectionbackground")&&this.parent.getSelectedRows().length),this.parent.isCheckBoxSelection&&!this.initialRowSelection){for(var e=this.parent.getRowsObject(),t=[],i=0;i<e.length;i++)e[i].isSelected&&t.push(i);t.length&&this.selectRows(t),this.initialRowSelection=!0}},r.prototype.updatePersistSelectedData=function(e){if(this.parent.isPersistSelection){for(var i=this.parent.getRows(),r=0;r<i.length;r++)this.updatePersistCollection(i[r],e);"Uncheck"===this.parent.checkAllRows?(this.setRowSelection(!1),this.persistSelectedData=this.parent.getDataModule().isRemote()?this.persistSelectedData:[]):"Check"===this.parent.checkAllRows&&(this.setRowSelection(!0),this.persistSelectedData=this.parent.getDataModule().isRemote()||t.isBlazor()?this.persistSelectedData:this.parent.groupSettings.columns.length?this.getData().records.slice():this.getData().slice())}},r.prototype.checkSelectAllAction=function(e){var i=this.getRenderer(),r=this.parent.element.querySelector(".e-gridform");if(this.checkedTarget=this.getCheckAllBox(),e&&this.getCurrentBatchRecordChanges().length?(this.parent.checkAllRows="Check",this.updatePersistSelectedData(e),this.selectRowsByRange(i.getVirtualRowIndex(0),i.getVirtualRowIndex(this.getCurrentBatchRecordChanges().length-1))):(this.parent.checkAllRows="Uncheck",this.updatePersistSelectedData(e),this.clearSelection()),this.chkAllCollec=[],!t.isNullOrUndefined(r)){var n=r.querySelector(".e-edit-checkselect");t.isNullOrUndefined(n)||oe(n.nextElementSibling,e)}},r.prototype.checkSelectAll=function(e){var t=this,i=this.getCheckAllStatus(e),r="Check"===i;this.isHeaderCheckboxClicked=!0,"Intermediate"===i&&(r=this.getCurrentBatchRecordChanges().some(function(e){return e[t.primaryKey]in t.selectedRowState})),this.parent.isPersistSelection&&this.parent.allowPaging&&(this.totalRecordsCount=this.parent.pageSettings.totalRecordsCount),this.checkSelectAllAction(!r),this.target=null,this.getCurrentBatchRecordChanges().length>0&&this.setCheckAllState(),this.triggerChkChangeEvent(e,!r)},r.prototype.getCheckAllStatus=function(e){var t=e?e.nextElementSibling.classList:this.getCheckAllBox().nextElementSibling.classList;return t.contains("e-check")?"Check":t.contains("e-uncheck")?"Uncheck":t.contains("e-stop")?"Intermediate":"None"},r.prototype.checkSelect=function(e){var i=t.closest(this.checkedTarget,"."+bi),r=this.parent;this.isMultiCtrlRequest=!0;var n=0;if(this.isHeaderCheckboxClicked=!1,ce(r)){var o=i.parentElement.getAttribute("data-uid");n=r.getRows().map(function(e){return e.getAttribute("data-uid")}).indexOf(o)}else n=parseInt(i.parentElement.getAttribute(Hi),10);this.parent.isPersistSelection&&this.parent.element.getElementsByClassName(Bi).length>0&&"Top"===this.parent.editSettings.newRowPosition&&++n,this.rowCellSelectionHandler(n,parseInt(i.getAttribute(qi),10)),this.moveIntoUncheckCollection(t.closest(i,"."+Oi)),this.setCheckAllState(),this.isMultiCtrlRequest=!1,this.triggerChkChangeEvent(e,e.nextElementSibling.classList.contains("e-check"))},r.prototype.moveIntoUncheckCollection=function(e){if("Check"===this.parent.checkAllRows||"Uncheck"===this.parent.checkAllRows){var t=this.getRowObj(e),i=t&&t.data?t.data[this.primaryKey]:null;if(!i)return;this.chkAllCollec.indexOf(i)<0?this.chkAllCollec.push(i):this.chkAllCollec.splice(this.chkAllCollec.indexOf(i),1)}},r.prototype.triggerChkChangeEvent=function(e,t){this.parent.trigger("checkBoxChange",{checked:t,selectedRowIndexes:this.parent.getSelectedRowIndexes(),target:e}),this.parent.isEdit||(this.checkedTarget=null)},r.prototype.updateSelectedRowIndex=function(e){if(this.parent.isCheckBoxSelection&&(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)&&!this.parent.getDataModule().isRemote()&&(!t.isBlazor()||!this.parent.isServerRendered))if("Check"===this.parent.checkAllRows){this.selectedRowIndexes=[];for(var i=this.getData().length,r=0;r<i;r++)this.selectedRowIndexes.push(r)}else if("Uncheck"===this.parent.checkAllRows)this.selectedRowIndexes=[];else{var n=this.parent.getRowByIndex(e);if(e&&n&&"false"===n.getAttribute("aria-selected")){var o=this.selectedRowIndexes.indexOf(e);this.selectedRowIndexes.splice(o,1)}}},r.prototype.setCheckAllState=function(e,i){if(this.parent.isCheckBoxSelection||"ResetOnRowClick"===this.parent.selectionSettings.checkboxMode){var r=Object.keys(this.selectedRowState).length;this.parent.isPersistSelection||(r=this.selectedRowIndexes.length,this.totalRecordsCount=this.getCurrentBatchRecordChanges().length);var n=this.getCheckAllBox();if(n){var o=n.nextElementSibling;t.removeClass([o],["e-check","e-stop","e-uncheck"]),re(n,!1),n.indeterminate=!1,r===this.totalRecordsCount&&this.totalRecordsCount||(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)&&!this.parent.allowPaging&&!this.parent.getDataModule().isRemote()&&(!t.isBlazor()||!this.parent.isServerRendered)&&this.getData().length&&r===this.getData().length?(t.addClass([o],["e-check"]),re(n,!0),i&&this.getRenderer().setSelection(null,!0,!0),this.parent.checkAllRows="Check"):!this.selectedRowIndexes.length||0===r&&0===this.getCurrentBatchRecordChanges().length?(t.addClass([o],["e-uncheck"]),i&&this.getRenderer().setSelection(null,!1,!0),this.parent.checkAllRows="Uncheck",0===r&&0===this.getCurrentBatchRecordChanges().length?t.addClass([o.parentElement],["e-checkbox-disabled"]):t.removeClass([o.parentElement],["e-checkbox-disabled"])):(t.addClass([o],["e-stop"]),this.parent.checkAllRows="Intermediate",n.indeterminate=!0),!this.parent.enableVirtualization&&!this.parent.enableInfiniteScrolling||this.parent.allowPaging||this.parent.getDataModule().isRemote()||this.updateSelectedRowIndex(e)}}},r.prototype.keyDownHandler=function(e){(("chrome"===t.Browser.info.name||"safari"===t.Browser.info.name)&&(91===e.keyCode||93===e.keyCode)||"opera"===t.Browser.info.name&&17===e.keyCode||"mozilla"===t.Browser.info.name&&224===e.keyCode)&&(this.cmdKeyPressed=!0)},r.prototype.keyUpHandler=function(e){(("chrome"===t.Browser.info.name||"safari"===t.Browser.info.name)&&(91===e.keyCode||93===e.keyCode)||"opera"===t.Browser.info.name&&17===e.keyCode||"mozilla"===t.Browser.info.name&&224===e.keyCode)&&(this.cmdKeyPressed=!1)},r.prototype.clickHandler=function(e){var i=e.target;this.actualTarget=i,this.selectionSettings.persistSelection&&(this.deSelectedData=R(this.persistSelectedData)),(O(i,Oi)||O(i,"e-headerchkcelldiv")||this.selectionSettings.allowColumnSelection&&i.classList.contains("e-headercell"))&&(this.isInteracted=!0),this.isMultiCtrlRequest=e.ctrlKey||this.enableSelectMultiTouch||this.isMacOS&&this.cmdKeyPressed,this.isMultiShiftRequest=e.shiftKey,this.popUpClickHandler(e);var r=!1;this.preventFocus=!0;var n,o=O(i,"e-checkbox-wrapper");if(this.checkSelectAllClicked=!!(o&&o.getElementsByClassName("e-checkselectall")||this.selectionSettings.persistSelection&&O(i,Oi)),o&&o.querySelectorAll(".e-checkselect,.e-checkselectall").length>0&&(n=o.querySelector('input[type="checkbox"]'),r=!0),this.drawBorders(),this.updateAutoFillPosition(),(i=O(i,bi))&&i.parentElement.classList.contains(Oi)&&!this.parent.selectionSettings.checkboxOnly||r){if(this.parent.isCheckBoxSelection&&(this.isMultiCtrlRequest=!0),this.target=i,t.isNullOrUndefined(n)){var s=this.parent,l=0;if(ce(s)){a=i.parentElement.getAttribute("data-uid");l=s.getRows().map(function(e){return e.getAttribute("data-uid")}).indexOf(a)}else l=parseInt(i.parentElement.getAttribute(Hi),10);this.parent.isPersistSelection&&this.parent.element.getElementsByClassName(Bi).length>0&&++l,this.mUPTarget&&this.mUPTarget.isEqualNode(i)||this.rowCellSelectionHandler(l,parseInt(i.getAttribute(qi),10)),this.parent.hoverFrozenRows(e),this.parent.isCheckBoxSelection&&(this.moveIntoUncheckCollection(t.closest(i,"."+Oi)),this.setCheckAllState())}else this.checkedTarget=n,n.classList.contains("e-checkselectall")?this.checkSelectAll(n):this.checkSelect(n);this.parent.isCheckBoxSelection||!t.Browser.isDevice||this.isSingleSel()||this.showPopup(e)}else if(e.target.classList.contains("e-headercell")&&!e.target.classList.contains("e-stackedheadercell")){var a=e.target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid");this.headerSelectionHandler(this.parent.getColumnIndexByUid(a))}this.isMultiCtrlRequest=!1,this.isMultiShiftRequest=!1,t.isNullOrUndefined(t.closest(e.target,".e-unboundcell"))&&(this.preventFocus=!1)},r.prototype.popUpClickHandler=function(e){var i=e.target;t.closest(i,".e-headercell")||e.target.classList.contains(bi)||t.closest(i,".e-gridpopup")?i.classList.contains("e-rowselect")&&(i.classList.contains("e-spanclicked")?(i.classList.remove("e-spanclicked"),this.enableSelectMultiTouch=!1,this.parent.element.querySelector(".e-gridpopup").style.display="none"):(i.classList.add("e-spanclicked"),this.enableSelectMultiTouch=!0)):this.parent.element.querySelector(".e-gridpopup").style.display="none"},r.prototype.showPopup=function(e){this.selectionSettings.enableSimpleMultiRowSelection||z(this.parent.element.querySelector(".e-gridpopup"),e,"e-rowselect e-icons e-icon-rowselect"+(!this.isSingleSel()&&(this.selectedRecords.length>(this.parent.getFrozenColumns()?2:1)||this.selectedRowCellIndexes.length>1)?" e-spanclicked":""))},r.prototype.rowCellSelectionHandler=function(e,i){!this.isMultiCtrlRequest&&!this.isMultiShiftRequest||this.isSingleSel()?(this.isDragged||this.selectRow(e,this.selectionSettings.enableToggle),this.selectCell({rowIndex:e,cellIndex:i},this.selectionSettings.enableToggle),this.selectedRowCellIndexes.length&&this.updateAutoFillPosition(),this.drawBorders()):this.isMultiShiftRequest?(this.parent.isCheckBoxSelection||!this.parent.isCheckBoxSelection&&!t.closest(this.target,"."+bi).classList.contains(ki)?this.selectRowsByRange(t.isUndefined(this.prevRowIndex)?e:this.prevRowIndex,e):this.addRowsToSelection([e]),this.selectCellsByRange(t.isUndefined(this.prevCIdxs)?{rowIndex:e,cellIndex:i}:this.prevCIdxs,{rowIndex:e,cellIndex:i}),this.updateAutoFillPosition(),this.drawBorders()):(this.addRowsToSelection([e]),this.addCellsToSelection([{rowIndex:e,cellIndex:i}]),this.showHideBorders("none")),this.isDragged=!1},r.prototype.onCellFocused=function(e){if(this.parent.frozenRows&&e.container.isHeader&&e.byKey)if("upArrow"===e.keyArgs.action)this.parent.allowFiltering?e.isJump="INPUT"===e.element.tagName:e.isJump="TH"===e.element.tagName;else if("downArrow"===e.keyArgs.action){var i=Number(e.element.parentElement.getAttribute(Hi));e.isJump=0===i}else"ctrlHome"===e.keyArgs.action&&(e.isJump=!0);var r=this.parent.isFrozenGrid()?(e.container.isHeader&&"TD"!==e.element.tagName&&e.isJump&&!this.selectionSettings.allowColumnSelection||(e.container.isContent||"TD"===e.element.tagName)&&!(e.container.isSelectable||"TD"===e.element.tagName))&&!(e.byKey&&"space"===e.keyArgs.action):(e.container.isHeader&&e.isJump||e.container.isContent&&!e.container.isSelectable)&&!(e.byKey&&"space"===e.keyArgs.action)&&!(e.element.classList.contains("e-detailrowexpand")||e.element.classList.contains("e-detailrowcollapse")),n=e.container.isHeader&&"TD"!==e.element.tagName&&!t.closest(e.element,"."+bi)&&!(e.byKey&&"space"===e.keyArgs.action);if(!e.byKey||r)return void(r&&!this.parent.isCheckBoxSelection&&this.clearSelection());var o=e.container.isContent?e.container.indexes:e.indexes,s=o[0],l=o[1],a=this.focus.getPrevIndexes();if(this.parent.frozenRows)if(e.container.isHeader&&("TD"===e.element.tagName||t.closest(e.element,"."+bi))){var h=this.parent.getHeaderTable().querySelector("thead").childElementCount;s-=h,a.rowIndex=t.isNullOrUndefined(a.rowIndex)?null:a.rowIndex-h}else s+=this.parent.frozenRows,a.rowIndex=0!==a.rowIndex&&t.isNullOrUndefined(a.rowIndex)?null:a.rowIndex+this.parent.frozenRows;if(this.parent.isFrozenGrid()){var d=Number(e.element.getAttribute(qi)),c=this.parent.getSelectedRowCellIndexes();c.length&&0===a.cellIndex&&(a.cellIndex=c[c.length-1].cellIndexes[0]),a.cellIndex=t.isNullOrUndefined(a.cellIndex)?null:a.cellIndex===l?d:d-1,l=d}if(!(n||-1===["ctrlPlusA","escape"].indexOf(e.keyArgs.action)&&"space"!==e.keyArgs.action&&s===a.rowIndex&&l===a.cellIndex)||this.selectionSettings.allowColumnSelection){this.preventFocus=!0;var p=this.getKeyColIndex(e);switch(this.needColumnSelection&&(l=p),e.keyArgs.action){case"downArrow":case"upArrow":case"enter":case"shiftEnter":this.target=e.element,this.isKeyAction=!0,this.applyDownUpKey(s,l);break;case"rightArrow":case"leftArrow":this.applyRightLeftKey(s,l);break;case"shiftDown":case"shiftUp":this.shiftDownKey(s,l);break;case"shiftLeft":case"shiftRight":this.applyShiftLeftRightKey(s,l);break;case"home":case"end":l="end"===e.keyArgs.action?this.getLastColIndex(s):0,this.applyHomeEndKey(s,l);break;case"ctrlHome":case"ctrlEnd":this.applyCtrlHomeEndKey(s,l);break;case"escape":this.clearSelection();break;case"ctrlPlusA":this.ctrlPlusA();break;case"space":this.applySpaceSelection(e.element);break;case"tab":this.parent.editSettings.allowNextRowEdit&&this.selectRow(s)}this.needColumnSelection=!1,this.preventFocus=!1,this.positionBorders(),this.updateAutoFillPosition()}},r.prototype.getKeyColIndex=function(e){var t,i=null,r=e.element.querySelector(".e-stackedheadercelldiv");if(this.selectionSettings.allowColumnSelection&&O(e.element,"e-columnheader"))if(this.needColumnSelection=!!e.container.isHeader,r){if("rightArrow"===e.keyArgs.action||"leftArrow"===e.keyArgs.action)return i;t=r.getAttribute("e-mappinguid");var n=this.getstackedColumns(this.parent.getColumnByUid(t).columns),o=this.parent.getColumnIndexByUid(n[n.length-1].uid),s=this.parent.getColumnIndexByUid(n[0].uid);i=this.prevColIndex>=o?s:o}else i=this.parent.getColumnIndexByUid(e.element.querySelector(".e-headercelldiv").getAttribute("e-mappinguid"));return i},r.prototype.ctrlPlusA=function(){this.isRowType()&&!this.isSingleSel()&&this.selectRowsByRange(0,this.getCurrentBatchRecordChanges().length-1),this.isCellType()&&!this.isSingleSel()&&this.selectCellsByRange({rowIndex:0,cellIndex:0},{rowIndex:this.parent.getRows().length-1,cellIndex:this.parent.getColumns().length-1})},r.prototype.applySpaceSelection=function(e){e.classList.contains("e-checkselectall")?(this.checkedTarget=e,this.checkSelectAll(this.checkedTarget)):e.classList.contains("e-checkselect")&&(this.checkedTarget=e,this.checkSelect(this.checkedTarget))},r.prototype.applyDownUpKey=function(e,t){var i=this.parent;this.parent.isCheckBoxSelection&&"Check"===this.parent.checkAllRows&&!this.selectionSettings.persistSelection&&(this.checkSelectAllAction(!1),this.checkedTarget=null),this.isRowType()&&(this.parent.frozenRows,this.selectRow(e,!0),this.applyUpDown(i.selectedRowIndex)),this.isCellType()&&this.selectCell({rowIndex:e,cellIndex:t},!0),this.selectionSettings.allowColumnSelection&&this.needColumnSelection&&this.selectColumn(t)},r.prototype.applyUpDown=function(e){if(!(e<0)){this.target||(this.target=this.parent.getRows()[0].children[this.parent.groupSettings.columns.length||0]);var t=parseInt(this.target.getAttribute(qi),10),i=this.parent.getFrozenColumns();this.target=i&&t>=i?this.contentRenderer.getMovableRowByIndex(e).getElementsByClassName(bi)[t-i]:this.contentRenderer.getRowByIndex(e).getElementsByClassName(bi)[t],this.addAttribute(this.target)}},r.prototype.applyRightLeftKey=function(e,t){this.selectionSettings.allowColumnSelection&&this.needColumnSelection?this.selectColumn(t):this.isCellType()&&(this.selectCell({rowIndex:e,cellIndex:t},!0),this.addAttribute(this.target))},r.prototype.applyHomeEndKey=function(e,t){this.isCellType()?this.selectCell({rowIndex:e,cellIndex:t},!0):this.addAttribute(this.parent.getCellFromIndex(e,t))},r.prototype.shiftDownKey=function(e,i){this.isMultiShiftRequest=!0,this.isRowType()&&!this.isSingleSel()&&(t.isUndefined(this.prevRowIndex)?this.selectRow(0,!0):(this.selectRowsByRange(this.prevRowIndex,e),this.applyUpDown(e))),this.isCellType()&&!this.isSingleSel()&&this.selectCellsByRange(this.prevCIdxs||{rowIndex:0,cellIndex:0},{rowIndex:e,cellIndex:i}),this.isMultiShiftRequest=!1},r.prototype.applyShiftLeftRightKey=function(e,t){this.isMultiShiftRequest=!0,this.selectionSettings.allowColumnSelection&&this.needColumnSelection?this.selectColumnsByRange(this.prevColIndex,t):this.selectCellsByRange(this.prevCIdxs,{rowIndex:e,cellIndex:t}),this.isMultiShiftRequest=!1},r.prototype.getstackedColumns=function(e){for(var t=[],i=0,r=e.length;i<r;i++)e[i].columns?this.getstackedColumns(e[i].columns):t.push(e[i]);return t},r.prototype.applyCtrlHomeEndKey=function(e,t){this.isRowType()&&(this.selectRow(e,!0),this.addAttribute(this.parent.getCellFromIndex(e,t))),this.isCellType()&&this.selectCell({rowIndex:e,cellIndex:t},!0)},r.prototype.addRemoveClassesForRow=function(e,t,i){for(var r=[],n=3;n<arguments.length;n++)r[n-3]=arguments[n];if(e){var o=[].slice.call(e.getElementsByClassName(bi)),s=e.querySelector(".e-detailrowcollapse")||e.querySelector(".e-detailrowexpand"),l=e.querySelector(".e-rowdragdrop");s&&o.push(s),l&&o.push(l),Z.apply(void 0,[o,t].concat(r))}this.getRenderer().setSelection(e?e.getAttribute("data-uid"):null,t,i)},r.prototype.isRowType=function(){return"Row"===this.selectionSettings.mode||"Both"===this.selectionSettings.mode},r.prototype.isCellType=function(){return"Cell"===this.selectionSettings.mode||"Both"===this.selectionSettings.mode},r.prototype.isSingleSel=function(){return"Single"===this.selectionSettings.type},r.prototype.getRenderer=function(){return t.isNullOrUndefined(this.contentRenderer)&&(this.contentRenderer=this.factory.getRenderer(e.RenderType.Content)),this.contentRenderer},r.prototype.getSelectedRecords=function(){return this.selectionSettings.persistSelection?this.persistSelectedData:this.parent.getRowsObject().filter(function(e){return e.isSelected}).map(function(e){return e.data})},r.prototype.selectColumn=function(e){var i=this.parent;if(!t.isNullOrUndefined(i.getColumns()[e])){var r=i.getColumnByIndex(e),n=i.getColumnHeaderByUid(r.uid),o=n.classList.contains("e-columnselection");if(i.selectionSettings.allowColumnSelection){var s=this.selectedColumnsIndexes.length>1&&this.selectedColumnsIndexes.indexOf(e)>-1;if(this.clearColDependency(),!o||!this.selectionSettings.enableToggle||s){var l={columnIndex:e,headerCell:n,column:r,cancel:!1,target:this.actualTarget,isInteracted:this.isInteracted,previousColumnIndex:this.prevColIndex,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest};if(this.onActionBegin(l,"columnSelecting"),l.cancel)return void this.disableInteracted();i.selectionSettings.enableToggle&&e===this.prevColIndex&&o&&!s||this.updateColSelection(n,e);var a={columnIndex:e,headerCell:n,column:r,target:this.actualTarget,isInteracted:this.isInteracted,previousColumnIndex:this.prevColIndex};this.onActionComplete(a,"columnSelected")}this.updateColProps(e)}}},r.prototype.selectColumnsByRange=function(e,i){var r=this.parent;if(!t.isNullOrUndefined(r.getColumns()[e])){var n=[];if("Single"===r.selectionSettings.type||t.isNullOrUndefined(i))n[0]=e;else for(var o=e<i,s=e;o?s<=i:s>=i;o?s++:s--)n.push(s);this.selectColumns(n)}},r.prototype.selectColumns=function(e){var t=this.parent,i=this.getselectedCols();if("Single"===t.selectionSettings.type&&(e=[e[0]]),t.selectionSettings.allowColumnSelection){this.clearColDependency();var r={columnIndex:e[0],headerCell:i,columnIndexes:e,column:t.getColumnByIndex(e[0]),cancel:!1,target:this.actualTarget,isInteracted:this.isInteracted,previousColumnIndex:this.prevColIndex,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest};if(this.onActionBegin(r,"columnSelecting"),r.cancel)return void this.disableInteracted();for(var n=0,o=e.length;n<o;n++)this.updateColSelection(t.getColumnHeaderByUid(t.getColumnByIndex(e[n]).uid),e[n]);i=this.getselectedCols();var s={columnIndex:e[0],headerCell:i,columnIndexes:e,column:t.getColumnByIndex(e[0]),target:this.actualTarget,isInteracted:this.isInteracted,previousColumnIndex:this.prevColIndex};this.onActionComplete(s,"columnSelected"),this.updateColProps(e[0])}},r.prototype.selectColumnWithExisting=function(e){var i=this.parent;if(!t.isNullOrUndefined(i.getColumns()[e])){var r=i.getColumnHeaderByUid(i.getColumnByIndex(e).uid),n=this.getselectedCols();if("Single"===i.selectionSettings.type&&this.clearColDependency(),i.selectionSettings.allowColumnSelection){if(this.selectedColumnsIndexes.indexOf(e)>-1)this.clearColumnSelection(e);else{var o={columnIndex:e,headerCell:n,columnIndexes:this.selectedColumnsIndexes,column:i.getColumnByIndex(e),cancel:!1,target:this.actualTarget,isInteracted:this.isInteracted,previousColumnIndex:this.prevColIndex,isCtrlPressed:this.isMultiCtrlRequest,isShiftPressed:this.isMultiShiftRequest};if(this.onActionBegin(o,"columnSelecting"),o.cancel)return void this.disableInteracted();this.updateColSelection(r,e);var s={columnIndex:e,headerCell:n=this.getselectedCols(),column:i.getColumnByIndex(e),columnIndexes:this.selectedColumnsIndexes,target:this.actualTarget,isInteracted:this.isInteracted,previousColumnIndex:this.prevColIndex};this.onActionComplete(s,"columnSelected")}this.updateColProps(e)}}},r.prototype.clearColumnSelection=function(e){if(this.isColumnSelected){var i=this.parent;if(!t.isNullOrUndefined(e)&&-1===this.selectedColumnsIndexes.indexOf(e))return;var r=t.isNullOrUndefined(e)?this.selectedColumnsIndexes[this.selectedColumnsIndexes.length-1]:e,n=i.getColumnByIndex(r),o=void 0,s=i.getColumnByIndex(r),l={columnIndex:r,headerCell:o=n.getFreezeTableName()===Ni?i.getFrozenRightColumnHeaderByIndex(r):"movable"===n.getFreezeTableName()?i.getMovableColumnHeaderByIndex(r):i.getColumnHeaderByUid(s.uid),columnIndexes:this.selectedColumnsIndexes,column:s,cancel:!1,target:this.actualTarget,isInteracted:this.isInteracted};if(this.columnDeselect(l,"columnDeselecting"))return void this.disableInteracted();for(var a=t.isNullOrUndefined(e)?[].slice.call(i.getHeaderContent().getElementsByClassName("e-columnselection")):[o],h=this.getSelectedColumnCells(e),d=0,c=a.length;d<c;d++)Z([a[d]],!1,"e-columnselection");for(var d=0,c=h.length;d<c;d++)Z([h[d]],!1,"e-columnselection");t.isNullOrUndefined(e)?(this.columnDeselect(l,"columnDeselected"),this.selectedColumnsIndexes=[],this.isColumnSelected=!1,this.parent.getColumns().filter(function(e){return e.isSelected=!1})):(this.selectedColumnsIndexes.splice(this.selectedColumnsIndexes.indexOf(e),1),this.parent.getColumns()[e].isSelected=!1)}},r.prototype.getselectedCols=function(){var e,t=this.parent;if(this.selectedColumnsIndexes.length>1){e=[];for(var i=0;i<this.selectedColumnsIndexes.length;i++)e.push(t.getColumnHeaderByUid(t.getColumnByIndex(this.selectedColumnsIndexes[i]).uid))}else e=t.getColumnHeaderByUid(t.getColumnByIndex(this.selectedColumnsIndexes[0]).uid);return e},r.prototype.getSelectedColumnCells=function(e){var i,r,n=this.parent,o=!t.isNullOrUndefined(this.parent.rowTemplate),s=o?n.getRows():n.getDataRows();n.isFrozenGrid()&&n.getContent().querySelector("."+Ei)&&(i=o?n.getMovableRows():n.getMovableDataRows(),s=n.addMovableRows(s,i),n.getFrozenMode()===Pi&&(r=o?n.getFrozenRightRows():n.getFrozenRightDataRows(),s=n.addMovableRows(s,r)));for(var l=[],a=t.isNullOrUndefined(e)?".e-columnselection":'[aria-colindex="'+e+'"]',h=0,d=s.length;h<d;h++)l=l.concat([].slice.call(s[h].querySelectorAll(a)));return l},r.prototype.columnDeselect=function(e,t){return"columnDeselected"===t&&delete e.cancel,this.onActionComplete(e,t),e.cancel},r.prototype.updateColProps=function(e){this.prevColIndex=e,this.isColumnSelected=this.selectedColumnsIndexes.length&&!0},r.prototype.clearColDependency=function(){this.clearColumnSelection(),this.selectedColumnsIndexes=[]},r.prototype.updateColSelection=function(e,i){if(!t.isNullOrUndefined(this.parent.getColumns()[i])){var r,n=this.parent.getFrozenLeftCount(),o=this.parent.getMovableColumnsCount(),s=this.parent.getColumnByIndex(i),l=!t.isNullOrUndefined(this.parent.rowTemplate);this.selectedColumnsIndexes.push(i),this.parent.getColumns()[i].isSelected=!0,s.getFreezeTableName()===Ni?(i-=n+o,r=l?this.parent.getFrozenRightRows():this.parent.getFrozenRightDataRows()):"movable"===s.getFreezeTableName()?(i-=n,r=l?this.parent.getMovableRows():this.parent.getMovableDataRows()):(i+=this.parent.getIndentCount(),r=l?this.parent.getRows():this.parent.getDataRows()),Z([e],!0,"e-columnselection");for(var a=0,h=r.length;a<h;a++)r[a].classList.contains(Oi)&&(!r[a].classList.contains(Ai)&&!r[a].classList.contains(Bi)||"Normal"!==this.parent.editSettings.mode||t.isNullOrUndefined(r[a].querySelector("tr").childNodes[i])?t.isNullOrUndefined(r[a].childNodes[i])||Z([r[a].childNodes[i]],!0,"e-columnselection"):Z([r[a].querySelector("tr").childNodes[i]],!0,"e-columnselection"))}},r.prototype.headerSelectionHandler=function(e){!this.isMultiCtrlRequest&&!this.isMultiShiftRequest||this.isSingleSel()?this.selectColumn(e):this.isMultiShiftRequest?this.selectColumnsByRange(t.isUndefined(this.prevColIndex)?e:this.prevColIndex,e):this.selectColumnWithExisting(e)},r.prototype.addEventListener_checkbox=function(){var e=this;this.parent.on(kt,this.dataReady,this),this.onDataBoundFunction=this.onDataBound.bind(this),this.parent.addEventListener(Rt,this.onDataBoundFunction),this.parent.on(At,this.checkBoxSelectionChanged,this),this.parent.on("before-refresh-on-data-change",this.initPerisistSelection,this),this.parent.on(Pt,this.setCheckAllForEmptyGrid,this),this.actionCompleteFunc=this.actionCompleteHandler.bind(this),this.parent.addEventListener(St,this.actionCompleteFunc),this.parent.on(Gt,this.clickHandler,this),this.resizeEndFn=function(){e.updateAutoFillPosition(),e.drawBorders()},this.resizeEndFn.bind(this),this.parent.addEventListener("resizeStop",this.resizeEndFn)},r.prototype.removeEventListener_checkbox=function(){this.parent.off(kt,this.dataReady),this.parent.removeEventListener(Rt,this.onDataBoundFunction),this.parent.removeEventListener(St,this.actionCompleteFunc),this.parent.off(Pt,this.setCheckAllForEmptyGrid),this.parent.off(Gt,this.clickHandler),this.parent.off("before-refresh-on-data-change",this.initPerisistSelection)},r.prototype.setCheckAllForEmptyGrid=function(){var e=this.getCheckAllBox();if(e){this.parent.isCheckBoxSelection=!0;var i=e.nextElementSibling;t.removeClass([i],["e-check","e-stop","e-uncheck"])}},r.prototype.dataReady=function(e){this.isHeaderCheckboxClicked=!1;var t=this.parent.enableInfiniteScrolling&&"infiniteScroll"===e.requestType;"virtualscroll"===e.requestType||this.parent.isPersistSelection||t||(this.disableUI=!this.parent.enableImmutableMode,this.clearSelection(),this.setCheckAllState(),this.disableUI=!1)},r.prototype.actionCompleteHandler=function(e){"save"===e.requestType&&this.parent.isPersistSelection&&this.refreshPersistSelection()},r.prototype.selectRowIndex=function(e){this.parent.isSelectedRowIndexUpdating=!0,this.parent.selectedRowIndex=e},r.prototype.disableInteracted=function(){this.isInteracted=!1},r.prototype.activeTarget=function(){this.actualTarget=this.isInteracted?this.actualTarget:null},r}(),Kr=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.search=function(e){var i=this.parent;if(e=t.isNullOrUndefined(e)?"":e,X(i))return void i.notify(ii,{instance:this,handler:this.search,arg1:e});e!==i.searchSettings.key?(i.searchSettings.key=e.toString(),i.dataBind()):this.refreshSearch&&i.refresh()},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Nt,this.onPropertyChanged,this),this.parent.on("searching-complete",this.onSearchComplete,this),this.parent.on(_t,this.destroy,this),this.actionCompleteFunc=this.onActionComplete.bind(this),this.parent.addEventListener(St,this.actionCompleteFunc),this.parent.on("cancel-Begin",this.cancelBeginEvent,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Nt,this.onPropertyChanged),this.parent.off("searching-complete",this.onSearchComplete),this.parent.off(_t,this.destroy),this.parent.removeEventListener(St,this.actionCompleteFunc),this.parent.off("cancel-Begin",this.cancelBeginEvent))},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.onPropertyChanged=function(e){e.module===this.getModuleName()&&(t.isNullOrUndefined(e.properties.key)?this.parent.notify(Lt,{requestType:"searching",type:bt}):this.parent.notify(Lt,{requestType:"searching",type:bt,searchString:this.parent.searchSettings.key}))},e.prototype.onSearchComplete=function(e){this.parent.trigger(St,t.extend(e,{searchString:this.parent.searchSettings.key,requestType:"searching",type:St}))},e.prototype.onActionComplete=function(e){this.refreshSearch="searching"!==e.requestType},e.prototype.cancelBeginEvent=function(e){"searching"===e.requestType&&this.parent.setProperties({searchSettings:{key:""}},!0)},e.prototype.getModuleName=function(){return"search"},e}(),Qr=function(){function e(e){this.parent=e}return e.prototype.show=function(e,t){var i=this.getToggleFields(e),r=this.getColumns(i,t);this.parent.notify("tooltip-destroy",{module:"edit"});for(var n=0;n<r.length;n++)r[n].visible=!0;this.setVisible(r)},e.prototype.hide=function(e,t){var i=this.getToggleFields(e),r=this.getColumns(i,t);this.parent.notify("tooltip-destroy",{module:"edit"});for(var n=0;n<r.length;n++)r[n].visible=!1;this.setVisible(r)},e.prototype.getToggleFields=function(e){return"string"==typeof e?[e]:e},e.prototype.getColumns=function(e,t){var i=this;return S(e,function(e){return S(i.parent.columnModel,function(i){if(i[t]===e)return i})[0]})},e.prototype.setVisible=function(e,i){var r=this;void 0===i&&(i=[]);var n={requestType:"columnstate",cancel:!1,columns:i=i.length>0?i:e};this.parent.trigger(bt,n,function(n){var o=r.parent.getColumns();if(e=t.isNullOrUndefined(e)?o:e,n.cancel)return r.parent.notify("reset-columns",{showHideArgs:n}),void(e.length>0&&(e[0].visible=!0));ce(r.parent)&&r.parent.contentModule.emptyVcRows(),r.parent.allowSelection&&r.parent.getSelectedRecords().length&&!r.parent.selectionSettings.persistSelection&&r.parent.clearSelection(),r.parent.enableColumnVirtualization?e.filter(function(e){return o.some(function(t){return e.field===t.field})}).length&&r.parent.notify(Wt,e):r.parent.notify(Wt,e);var s={requestType:"columnstate",columns:i};r.parent.trigger(St,s),"All"!==r.parent.columnQueryMode&&r.parent.refresh()})},e}(),Xr=function(){function e(e){this.previousValues={top:0,left:0},this.oneTimeReady=!0,this.parent=e,this.widthService=new Tr(e),this.addEventListener()}return e.prototype.getModuleName=function(){return"scroll"},e.prototype.setWidth=function(e){this.parent.element.style.width=t.formatUnit(this.parent.width),e&&this.widthService.setWidthToColumns(),this.parent.toolbarModule&&this.parent.toolbarModule.toolbar&&this.parent.toolbarModule.toolbar.element&&this.parent.toolbarModule.toolbar.refreshOverflow()},e.prototype.setHeight=function(){var i=0,r=this.parent.getContent().querySelector("."+Di),n=this.parent.height;if(this.parent.isFrozenGrid()&&"auto"!==this.parent.height&&this.parent.height.toString().indexOf("%")<0&&(n=parseInt(n,10)-e.getScrollBarWidth()),!this.parent.enableVirtualization&&this.parent.frozenRows&&"auto"!==this.parent.height){var o=this.parent.getHeaderContent().querySelector(Ui);i=o?o.offsetHeight:0,o&&i&&(i-=o.getElementsByClassName(Bi).length*this.parent.getRowHeight()),r.style.height=t.formatUnit(n-i)}else r.style.height=t.formatUnit(n);this.ensureOverflow(r),this.parent.isFrozenGrid()&&this.refresh()},e.prototype.setPadding=function(){var t=this.parent.getHeaderContent(),i=e.getScrollBarWidth()-this.getThreshold(),r=this.getCssProperties(),n="Right"===this.parent.getFrozenMode()||this.parent.getFrozenMode()===Pi?"0.5px":"1px";t.querySelector("."+Fi).style[r.border]=i>0?n:"0px",t.style[r.padding]=i>0?i+"px":"0px"},e.prototype.removePadding=function(e){var t=this.getCssProperties(e),i=this.parent.getHeaderContent().querySelector("."+Fi);i.style[t.border]="",i.parentElement.style[t.padding]="";var r=this.parent.getFooterContent();r&&r.classList.contains("e-footerpadding")&&r.classList.remove("e-footerpadding")},e.prototype.refresh=function(){if("100%"===this.parent.height){var e=this.parent.getContent();this.parent.element.style.height="100%";var t=this.widthService.getSiblingsHeight(e);e.style.height="calc(100% - "+t+"px)",this.parent.isFrozenGrid()&&(e.firstElementChild.style.height="calc(100% - "+j()+"px)")}},e.prototype.getThreshold=function(){return"mozilla"===t.Browser.info.name?.5:1},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Pt,this.wireEvents,this),this.parent.on(At,this.wireEvents,this),this.parent.on(Bt,this.onPropertyChanged,this),this.parent.on("textWrapRefresh",this.wireEvents,this),this.parent.on(Ht,this.setScrollLeft,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Pt,this.wireEvents),this.parent.off(At,this.wireEvents),this.parent.off(Bt,this.onPropertyChanged),this.parent.off("textWrapRefresh",this.wireEvents),this.parent.off(Ht,this.setScrollLeft))},e.prototype.setScrollLeft=function(){this.parent.isFrozenGrid()?this.parent.headerModule.getMovableHeader().scrollLeft=this.previousValues.left:this.parent.getHeaderContent().querySelector("."+Fi).scrollLeft=this.previousValues.left},e.prototype.onFrozenContentScroll=function(){var e=this;return function(i){null===e.content.querySelector(Ui)||e.parent.isPreventScrollEvent||(!t.isNullOrUndefined(e.parent.infiniteScrollModule)&&e.parent.enableInfiniteScrolling&&e.parent.notify("infinite-scroll-handler",i),e.previousValues.top=i.target.scrollTop)}},e.prototype.onContentScroll=function(e){var i=this,r=e,n=r.classList.contains(Fi);return function(e){if(null!==i.content.querySelector(Ui)&&!i.parent.isPreventScrollEvent){var o=e.target,s=o.scrollLeft;if(!t.isNullOrUndefined(i.parent.infiniteScrollModule)&&i.parent.enableInfiniteScrolling&&i.parent.notify("infinite-scroll-handler",{target:e.target,isLeft:i.previousValues.left!==s}),i.parent.groupSettings.columns.length&&i.parent.groupSettings.enableLazyLoading){var l=i.previousValues.top<i.parent.getContent().firstElementChild.scrollTop;i.parent.notify("lazy-load-scroll-handler",{scrollDown:l})}i.parent.notify("virtual-scroll-edit",{});var a=o.classList.contains("e-summarycontent");if(i.previousValues.left===s)return void(i.previousValues.top=n?o.scrollTop:i.previousValues.top);i.parent.notify("close-filter-dialog",e),r.scrollLeft=s,a&&(i.header.scrollLeft=s),i.previousValues.left=s,i.parent.notify("scroll",{left:s})}}},e.prototype.onCustomScrollbarScroll=function(e,t){var i=this,r=e,n=t;return function(e){if(null!==i.content.querySelector(Ui)){var t=e.target.scrollLeft;i.previousValues.left!==t&&(r.scrollLeft=t,n.scrollLeft=t,i.previousValues.left=t,i.parent.notify("scroll",{left:t}),i.parent.isDestroyed)}}},e.prototype.onTouchScroll=function(e){var t=this,i=e;return function(e){if("mouse"!==e.pointerType){var r=t.parent.isFrozenGrid(),n=t.getPointXY(e),o=i.scrollLeft+(t.pageXY.x-n.x),s=r?t.parent.getHeaderContent().querySelector("."+Ii):t.parent.getHeaderContent().querySelector("."+Fi),l=r?t.parent.getContent().querySelector("."+Ei):t.parent.getContent().querySelector("."+Di);t.previousValues.left===o||o<0||s.scrollWidth-s.clientWidth<o||(e.preventDefault(),s.scrollLeft=o,l.scrollLeft=o,r&&(t.parent.getContent().querySelector(".e-movablescrollbar").scrollLeft=o),t.pageXY.x=n.x,t.previousValues.left=o)}}},e.prototype.setPageXY=function(){var e=this;return function(t){"mouse"!==t.pointerType&&(e.pageXY=e.getPointXY(t))}},e.prototype.getPointXY=function(e){var t={x:0,y:0};return e.touches&&e.touches.length?(t.x=e.touches[0].pageX,t.y=e.touches[0].pageY):(t.x=e.pageX,t.y=e.pageY),t},e.prototype.wireEvents=function(){var e=this;if(this.oneTimeReady){var i=this.parent.isFrozenGrid();this.content=this.parent.getContent().querySelector("."+Di),this.header=this.parent.getHeaderContent().querySelector("."+Fi);var r=this.content.querySelector("."+Ei),n=this.header.querySelector("."+Ii),o=this.parent.getContent().querySelector(".e-movablescrollbar");this.parent.frozenRows&&(t.EventHandler.add(i?n:this.header,"touchstart pointerdown",this.setPageXY(),this),t.EventHandler.add(i?n:this.header,"touchmove pointermove",this.onTouchScroll(i?r:this.content),this)),this.parent.isFrozenGrid()?(t.EventHandler.add(o,"scroll",this.onCustomScrollbarScroll(r,n),this),t.EventHandler.add(r,"scroll",this.onCustomScrollbarScroll(o,n),this),t.EventHandler.add(n,"scroll",this.onCustomScrollbarScroll(o,r),this),t.EventHandler.add(this.content,"scroll",this.onFrozenContentScroll(),this),t.EventHandler.add(n,"touchstart pointerdown",this.setPageXY(),this),t.EventHandler.add(n,"touchmove pointermove",this.onTouchScroll(r),this),t.EventHandler.add(r,"touchstart pointerdown",this.setPageXY(),this),t.EventHandler.add(r,"touchmove pointermove",this.onTouchScroll(n),this)):(t.EventHandler.add(this.content,"scroll",this.onContentScroll(this.header),this),t.EventHandler.add(this.header,"scroll",this.onContentScroll(this.content),this)),this.parent.aggregates.length&&t.EventHandler.add(this.parent.getFooterContent().firstChild,"scroll",this.onContentScroll(this.content),this),this.refresh(),this.oneTimeReady=!1}var s,l,a,h=this.parent.getContentTable();m(function(){s=e.header.scrollLeft,l=h.scrollHeight,a=e.parent.getContent().clientHeight},function(){var i={cancel:!1};e.parent.notify("check-scroll-reset",i),e.parent.enableVirtualization||e.parent.enableInfiniteScrolling||(l<a&&(t.addClass(h.querySelectorAll("tr:last-child td"),"e-lastrowcell"),e.parent.isFrozenGrid()&&t.addClass(e.parent.getContent().querySelector("."+Ei).querySelectorAll("tr:last-child td"),"e-lastrowcell")),i.cancel||((e.parent.frozenRows>0||e.parent.isFrozenGrid())&&e.header.querySelector("."+Ii)?e.header.querySelector("."+Ii).scrollLeft=e.previousValues.left:e.header.scrollLeft=e.previousValues.left,e.content.scrollLeft=e.previousValues.left,e.content.scrollTop=e.previousValues.top)),e.parent.enableColumnVirtualization||(e.content.scrollLeft=s),e.parent.isFrozenGrid()&&e.header.querySelector("."+Ii)&&(e.header.querySelector("."+Ii).scrollLeft=e.content.querySelector("."+Ei).scrollLeft)}),this.parent.isPreventScrollEvent=!1},e.prototype.getCssProperties=function(e){var i={},r=t.isNullOrUndefined(e)?this.parent.enableRtl:e;return i.border=r?"borderLeftWidth":"borderRightWidth",i.padding=r?"paddingLeft":"paddingRight",i},e.prototype.ensureOverflow=function(e){e.style.overflowY="auto"===this.parent.height?"auto":"scroll"},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()){this.setPadding(),this.oneTimeReady=!0,"auto"===this.parent.height&&this.removePadding(),this.wireEvents(),this.setHeight();this.setWidth(!t.isNullOrUndefined(e.properties.width))}},e.prototype.destroy=function(){var e=this.parent.element;if(e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))){this.removeEventListener(),this.removePadding();var i=this.parent.getContent().querySelector("."+Di);t.removeClass([this.parent.getHeaderContent().querySelector("."+Fi)],Fi),t.removeClass([i],Di),i.style.height="",this.parent.element.style.width="",t.EventHandler.remove(i,"scroll",this.onContentScroll)}},e.getScrollBarWidth=function(){return j()},e}(),Jr=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Yr=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},Zr=function(i){function r(){var e=null!==i&&i.apply(this,arguments)||this;return e.templateFn={},e}return Jr(r,i),r.prototype.setFormatter=function(e){this.formatFn=e},r.prototype.getFormatter=function(){return this.formatFn},r.prototype.setTemplate=function(i){void 0===i&&(i={}),void 0!==this.footerTemplate&&(this.templateFn[t.getEnumValue(e.CellType,e.CellType.Summary)]={fn:t.compile(this.footerTemplate,i),property:"footerTemplate"}),void 0!==this.groupFooterTemplate&&(this.templateFn[t.getEnumValue(e.CellType,e.CellType.GroupSummary)]={fn:t.compile(this.groupFooterTemplate,i),property:"groupFooterTemplate"}),void 0!==this.groupCaptionTemplate&&(this.templateFn[t.getEnumValue(e.CellType,e.CellType.CaptionSummary)]={fn:t.compile(this.groupCaptionTemplate,i),property:"groupCaptionTemplate"})},r.prototype.getTemplate=function(i){return this.templateFn[t.getEnumValue(e.CellType,i)]},r.prototype.setPropertiesSilent=function(e){this.setProperties(e,!0)},Yr([t.Property()],r.prototype,"type",void 0),Yr([t.Property()],r.prototype,"field",void 0),Yr([t.Property()],r.prototype,"columnName",void 0),Yr([t.Property()],r.prototype,"format",void 0),Yr([t.Property()],r.prototype,"footerTemplate",void 0),Yr([t.Property()],r.prototype,"groupFooterTemplate",void 0),Yr([t.Property()],r.prototype,"groupCaptionTemplate",void 0),Yr([t.Property()],r.prototype,"customAggregate",void 0),r}(t.ChildProperty),$r=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Jr(i,e),Yr([t.Collection([],Zr)],i.prototype,"columns",void 0),i}(t.ChildProperty),en=function(){function e(e){this.copyContent="",this.isSelect=!1,this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(At,this.initialEnd,this),this.parent.on(Vt,this.keyDownHandler,this),this.parent.on(Gt,this.clickHandler,this),t.EventHandler.add(this.parent.element,"keydown",this.pasteHandler,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Vt,this.keyDownHandler),this.parent.off(At,this.initialEnd),this.parent.off(Gt,this.clickHandler),t.EventHandler.remove(this.parent.element,"keydown",this.pasteHandler))},e.prototype.clickHandler=function(e){var t=e.target;t=O(t,"e-rowcell")},e.prototype.pasteHandler=function(e){var i=this,r=this.parent,n=/(Mac)/i.test(navigator.platform);if(86===e.keyCode&&(e.ctrlKey||n&&e.metaKey)&&!r.isEdit){if(!t.closest(document.activeElement,"."+bi)||!r.editSettings.allowEditing||"Batch"!==r.editSettings.mode||"Cell"!==r.selectionSettings.mode||"Flow"===r.selectionSettings.cellSelectionMode)return;this.activeElement=document.activeElement,this.clipBoardTextArea.value="";var o=window.scrollX,s=window.scrollY;this.clipBoardTextArea.focus(),setTimeout(function(){i.activeElement.focus(),window.scrollTo(o,s),i.paste(i.clipBoardTextArea.value,i.parent.getSelectedRowCellIndexes()[0].rowIndex,i.parent.getSelectedRowCellIndexes()[0].cellIndexes[0])},10)}},e.prototype.paste=function(e,i,r){var n,o,s,l=this.parent,a=r,h=i;if(l.editSettings.allowEditing&&"Batch"===l.editSettings.mode&&"Cell"===l.selectionSettings.mode&&"Flow"!==l.selectionSettings.cellSelectionMode){var d,c,p,u=e.split("\n"),g=l.getDataRows(),f=this.parent.isFrozenGrid();f&&(c=l.getMovableDataRows(),l.getFrozenRightColumnsCount()&&(p=l.getFrozenRightDataRows()));for(var m=0;m<u.length;m++){if(d=u[m].split("\t"),a=r,m===u.length-1&&""===u[m]||t.isUndefined(l.getRowByIndex(h))){a++;break}for(var y=0;y<d.length;y++){if(s=l.getCellFromIndex(h,a),f){var v=g[h],C=c[h];s=!!v.querySelector('[aria-colindex="'+a+'"]')||C.querySelector('[aria-colindex="'+a+'"]'),p&&!s&&(s=p[h].querySelector('[aria-colindex="'+a+'"]'))}if(!s){a++;break}if(n=l.getColumnByIndex(a),o=n.getParser()?n.getParser()(d[y]):d[y],n.allowEditing&&!n.isPrimaryKey&&!n.template){var w={column:n,data:o,rowIndex:h};this.parent.trigger("beforePaste",w),h=w.rowIndex,w.cancel||l.editModule&&("number"===n.type?this.parent.editModule.updateCell(h,n.field,parseFloat(w.data)):l.editModule.updateCell(h,n.field,w.data))}a++}h++}l.selectionModule.selectCellsByRange({rowIndex:i,cellIndex:r},{rowIndex:h-1,cellIndex:a-1});var b=this.parent.getCellFromIndex(h-1,a-1);b&&t.classList(b,["e-focus","e-focused"],[])}},e.prototype.initialEnd=function(){this.parent.off(At,this.initialEnd),this.clipBoardTextArea=this.parent.createElement("textarea",{className:"e-clipboard",styles:"opacity: 0",attrs:{tabindex:"-1","aria-label":"clipboard"}}),this.parent.element.appendChild(this.clipBoardTextArea)},e.prototype.keyDownHandler=function(e){"ctrlPlusC"===e.action?this.copy():"ctrlShiftPlusH"===e.action&&this.copy(!0)},e.prototype.setCopyData=function(e){if(""===window.getSelection().toString()){var i=this.parent.isFrozenGrid();this.clipBoardTextArea.value=this.copyContent="";var r=void 0,n=void 0,o=this.parent.getRows();if(i&&(r=this.parent.getMovableDataRows(),this.parent.getFrozenMode()===Pi&&(n=this.parent.getFrozenRightRows())),"Cell"!==this.parent.selectionSettings.mode){var s=this.parent.getSelectedRowIndexes().sort(function(e,t){return e-t});if(e){for(var l=[],a=0;a<this.parent.getVisibleColumns().length;a++)l[a]=this.parent.getVisibleColumns()[a].headerText;this.getCopyData(l,!1,"\t",e),this.copyContent+="\n"}for(a=0;a<s.length;a++){a>0&&(this.copyContent+="\n");c=[].slice.call(o[s[a]].querySelectorAll(".e-rowcell:not(.e-hide)"));i&&(c.push.apply(c,[].slice.call(r[s[a]].querySelectorAll(".e-rowcell:not(.e-hide)"))),n&&c.push.apply(c,[].slice.call(n[s[a]].querySelectorAll(".e-rowcell:not(.e-hide)")))),this.getCopyData(c,!1,"\t",e)}}else{var h=this.checkBoxSelection();if(h.status){if(e){for(var d=[],a=0;a<h.colIndexes.length;a++)d.push(this.parent.getColumnHeaderByIndex(h.colIndexes[a]));this.getCopyData(d,!1,"\t",e),this.copyContent+="\n"}for(a=0;a<h.rowIndexes.length;a++){a>0&&(this.copyContent+="\n");var c=[].slice.call(o[h.rowIndexes[a]].getElementsByClassName("e-cellselectionbackground"));i&&(c.push.apply(c,[].slice.call(r[h.rowIndexes[a]].getElementsByClassName("e-cellselectionbackground"))),n&&c.push.apply(c,[].slice.call(n[h.rowIndexes[a]].getElementsByClassName("e-cellselectionbackground")))),this.getCopyData(c,!1,"\t",e)}}else this.getCopyData([].slice.call(this.parent.element.getElementsByClassName("e-cellselectionbackground")),!0,"\n",e)}var p={data:this.copyContent,cancel:!1};if(this.parent.trigger("beforeCopy",p),p.cancel)return;this.clipBoardTextArea.value=this.copyContent=p.data,t.Browser.userAgent.match(/ipad|ipod|iphone/i)?this.clipBoardTextArea.setSelectionRange(0,this.clipBoardTextArea.value.length):this.clipBoardTextArea.select(),this.isSelect=!0}},e.prototype.getCopyData=function(e,t,i,r){for(var n="string"!=typeof e[0],o=0;o<e.length;o++){if(r&&t){var s=parseInt(e[o].getAttribute(qi),10);this.copyContent+=this.parent.getColumns()[s].headerText+"\n"}n?e[o].classList.contains("e-hide")||(this.copyContent+=e[o].innerText):this.copyContent+=e[o],o<e.length-1&&(this.copyContent+=i)}},e.prototype.copy=function(e){document.queryCommandSupported("copy")&&(this.setCopyData(e),document.execCommand("copy"),this.clipBoardTextArea.blur()),this.isSelect&&(window.getSelection().removeAllRanges(),this.isSelect=!1)},e.prototype.getModuleName=function(){return"clipboard"},e.prototype.destroy=function(){this.removeEventListener(),this.clipBoardTextArea&&t.remove(this.clipBoardTextArea)},e.prototype.checkBoxSelection=function(){var e=this.parent,t={status:!1};if("Cell"===e.selectionSettings.mode){var i=e.getSelectedRowCellIndexes(),r=void 0,n=[],o=void 0;for(o=0;o<i.length&&(i[o].cellIndexes.length&&n.push(i[o].rowIndex),!i[o].cellIndexes.length||(r||(r=JSON.stringify(i[o].cellIndexes.sort())),r===JSON.stringify(i[o].cellIndexes.sort())));o++);n.sort(function(e,t){return e-t}),o===i.length&&n[n.length-1]-n[0]==n.length-1&&(t={status:!0,rowIndexes:n,colIndexes:i[0].cellIndexes})}return t},e}(),tn=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rn=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},nn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property()],i.prototype,"field",void 0),rn([t.Property()],i.prototype,"direction",void 0),rn([t.Property(!1)],i.prototype,"isFromGroup",void 0),i}(t.ChildProperty),on=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Collection([],nn)],i.prototype,"columns",void 0),rn([t.Property(!0)],i.prototype,"allowUnsort",void 0),i}(t.ChildProperty),sn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property()],i.prototype,"field",void 0),rn([t.Property()],i.prototype,"operator",void 0),rn([t.Property()],i.prototype,"value",void 0),rn([t.Property()],i.prototype,"matchCase",void 0),rn([t.Property(!1)],i.prototype,"ignoreAccent",void 0),rn([t.Property()],i.prototype,"predicate",void 0),rn([t.Property({})],i.prototype,"actualFilterValue",void 0),rn([t.Property({})],i.prototype,"actualOperator",void 0),rn([t.Property()],i.prototype,"type",void 0),rn([t.Property()],i.prototype,"ejpredicate",void 0),rn([t.Property()],i.prototype,"uid",void 0),rn([t.Property()],i.prototype,"isForeignKey",void 0),i}(t.ChildProperty),ln=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property(!1)],i.prototype,"enableCache",void 0),rn([t.Property(3)],i.prototype,"maxBlocks",void 0),rn([t.Property(3)],i.prototype,"initialBlocks",void 0),i}(t.ChildProperty),an=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Collection([],sn)],i.prototype,"columns",void 0),rn([t.Property("FilterBar")],i.prototype,"type",void 0),rn([t.Property()],i.prototype,"mode",void 0),rn([t.Property(!0)],i.prototype,"showFilterBarStatus",void 0),rn([t.Property(1500)],i.prototype,"immediateModeDelay",void 0),rn([t.Property()],i.prototype,"operators",void 0),rn([t.Property(!1)],i.prototype,"ignoreAccent",void 0),rn([t.Property(!1)],i.prototype,"enableCaseSensitivity",void 0),rn([t.Property(!1)],i.prototype,"showFilterBarOperator",void 0),i}(t.ChildProperty),hn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property("Row")],i.prototype,"mode",void 0),rn([t.Property("Flow")],i.prototype,"cellSelectionMode",void 0),rn([t.Property("Single")],i.prototype,"type",void 0),rn([t.Property(!1)],i.prototype,"checkboxOnly",void 0),rn([t.Property(!1)],i.prototype,"persistSelection",void 0),rn([t.Property("Default")],i.prototype,"checkboxMode",void 0),rn([t.Property(!1)],i.prototype,"enableSimpleMultiRowSelection",void 0),rn([t.Property(!0)],i.prototype,"enableToggle",void 0),rn([t.Property(!1)],i.prototype,"allowColumnSelection",void 0),i}(t.ChildProperty),dn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property([])],i.prototype,"fields",void 0),rn([t.Property("")],i.prototype,"key",void 0),rn([t.Property("contains")],i.prototype,"operator",void 0),rn([t.Property(!0)],i.prototype,"ignoreCase",void 0),rn([t.Property(!1)],i.prototype,"ignoreAccent",void 0),i}(t.ChildProperty),cn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property()],i.prototype,"targetID",void 0),i}(t.ChildProperty),pn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property("Both")],i.prototype,"wrapMode",void 0),i}(t.ChildProperty),un=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property("Normal")],i.prototype,"mode",void 0),i}(t.ChildProperty),gn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property(!0)],i.prototype,"showDropArea",void 0),rn([t.Property(!1)],i.prototype,"allowReordering",void 0),rn([t.Property(!1)],i.prototype,"showToggleButton",void 0),rn([t.Property(!1)],i.prototype,"showGroupedColumn",void 0),rn([t.Property(!0)],i.prototype,"showUngroupButton",void 0),rn([t.Property(!1)],i.prototype,"disablePageWiseAggregates",void 0),rn([t.Property([])],i.prototype,"columns",void 0),rn([t.Property()],i.prototype,"captionTemplate",void 0),rn([t.Property(!1)],i.prototype,"enableLazyLoading",void 0),i}(t.ChildProperty),fn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return tn(i,e),rn([t.Property(!1)],i.prototype,"allowAdding",void 0),rn([t.Property(!1)],i.prototype,"allowEditing",void 0),rn([t.Property(!1)],i.prototype,"allowDeleting",void 0),rn([t.Property("Normal")],i.prototype,"mode",void 0),rn([t.Property(!0)],i.prototype,"allowEditOnDblClick",void 0),rn([t.Property(!0)],i.prototype,"showConfirmDialog",void 0),rn([t.Property(!1)],i.prototype,"showDeleteConfirmDialog",void 0),rn([t.Property("")],i.prototype,"template",void 0),rn([t.Property("")],i.prototype,"headerTemplate",void 0),rn([t.Property("")],i.prototype,"footerTemplate",void 0),rn([t.Property("Top")],i.prototype,"newRowPosition",void 0),rn([t.Property({})],i.prototype,"dialog",void 0),rn([t.Property(!1)],i.prototype,"allowNextRowEdit",void 0),i}(t.ChildProperty),mn=function(n){function o(e,i){var r=n.call(this,e,i)||this;return r.isPreventScrollEvent=!1,r.inViewIndexes=[],r.keyA=!1,r.frozenRightCount=0,r.frozenLeftCount=0,r.tablesCount=1,r.movableCount=0,r.visibleFrozenLeft=0,r.visibleFrozenRight=0,r.visibleMovable=0,r.frozenLeftColumns=[],r.frozenRightColumns=[],r.movableColumns=[],r.media={},r.isFreezeRefresh=!1,r.tableIndex=0,r.componentRefresh=t.Component.prototype.refresh,r.isVirtualAdaptive=!1,r.vRows=[],r.vcRows=[],r.vGroupOffsets={},r.rowUid=0,r.currentViewData=[],r.isManualRefresh=!1,r.lockcolPositionCount=0,r.prevPageMoving=!1,r.pageTemplateChange=!1,r.isAutoGen=!1,r.mediaBindInstance={},r.commandDelIndex=void 0,r.asyncTimeOut=50,r.isExportGrid=!1,r.enableLogger=!0,r.needsID=!0,s.Inject(Wr),t.setValue("mergePersistData",r.mergePersistGridData,r),r}tn(o,n),s=o,o.prototype.getPersistData=function(){for(var e=["pageSettings","sortSettings","filterSettings","groupSettings","columns","searchSettings","selectedRowIndex","scrollPosition"],i={pageSettings:["template","pageSizes","enableQueryString","totalRecordsCount","pageCount"],filterSettings:["type","mode","showFilterBarStatus","immediateModeDelay","ignoreAccent"],groupSettings:["showDropArea","showToggleButton","showGroupedColumn","showUngroupButton","disablePageWiseAggregates","hideCaptionCount"],searchSettings:["fields","operator","ignoreCase"],sortSettings:[],columns:[],selectedRowIndex:[],scrollPosition:[]},r=0;r<e.length;r++)for(var n=this[e[r]],o=0,s=i[e[r]];o<s.length;o++)delete n[s[o]];var l=this.pageSettings.template,a=Object.assign({template:void 0},this.pageSettings);this.setProperties({pageSettings:a},!0),this.isAngular&&delete this.groupSettings.properties.captionTemplate,this.pageTemplateChange=!t.isNullOrUndefined(this.pagerTemplate);var h=this.addOnPersist(e);return a.template=l,this.setProperties({pageSettings:a},!0),h},o.prototype.requiredModules=function(){this.setFrozenCount();var e=[];return this.isDestroyed?e:(this.allowFiltering&&e.push({member:"filter",args:[this,this.filterSettings,this.serviceLocator]}),this.allowExcelExport&&e.push({member:"ExcelExport",args:[this,this.serviceLocator]}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this]}),this.allowSorting&&e.push({member:"sort",args:[this,this.sortSettings,this.sortedColumns,this.serviceLocator]}),this.allowPaging&&e.push({member:"pager",args:[this,this.pageSettings]}),this.allowSelection&&e.push({member:"selection",args:[this,this.selectionSettings,this.serviceLocator]}),e.push({member:"resize",args:[this]}),this.allowReordering&&e.push({member:"reorder",args:[this]}),this.allowRowDragAndDrop&&e.push({member:"rowDragAndDrop",args:[this]}),this.allowGrouping&&e.push({member:"group",args:[this,this.groupSettings,this.sortedColumns,this.serviceLocator]}),this.aggregates.length&&e.push({member:"aggregate",args:[this,this.serviceLocator]}),this.isDetail()&&e.push({member:"detailRow",args:[this,this.serviceLocator]}),(this.toolbar||this.toolbarTemplate)&&e.push({member:"toolbar",args:[this,this.serviceLocator]}),(this.enableVirtualization||this.enableColumnVirtualization)&&e.push({member:"virtualscroll",args:[this,this.serviceLocator]}),(this.getFrozenColumns()||this.frozenRows||this.frozenRightCount||this.frozenLeftCount)&&e.push({member:"freeze",args:[this,this.serviceLocator]}),this.isCommandColumn(this.columns)&&e.push({member:"commandColumn",args:[this,this.serviceLocator]}),(this.editSettings.allowAdding||this.editSettings.allowDeleting||this.editSettings.allowEditing)&&e.push({member:"edit",args:[this,this.serviceLocator]}),this.extendRequiredModules(e),e)},o.prototype.extendRequiredModules=function(e){this.enableInfiniteScrolling&&e.push({member:"infiniteScroll",args:[this,this.serviceLocator]}),this.groupSettings.enableLazyLoading&&e.push({member:"lazyLoadGroup",args:[this,this.serviceLocator]}),this.contextMenuItems&&e.push({member:"contextMenu",args:[this,this.serviceLocator]}),this.showColumnMenu&&e.push({member:"columnMenu",args:[this,this.serviceLocator]}),this.showColumnChooser&&e.push({member:"columnChooser",args:[this,this.serviceLocator]}),this.isForeignKeyEnabled(this.columns)&&e.push({member:"foreignKey",args:[this,this.serviceLocator]}),this.enableLogger&&e.push({member:"logger",args:[this]})},o.prototype.preRender=function(){this.serviceLocator=new Er,this.initProperties(),this.initializeServices()},o.prototype.initProperties=function(){this.isInitial=!0,this.sortedColumns=[],this.inViewIndexes=[],this.mediaCol=[],this.isInitialLoad=!1,this.allowServerDataBinding=!1,this.ignoreCollectionWatch=!0,this.mergeCells={},this.isEdit=!1,this.checkAllRows="None",this.isCheckBoxSelection=!1,this.isPersistSelection=!1,this.componentRefresh=t.Component.prototype.refresh,this.filterOperators={contains:"contains",endsWith:"endswith",equal:"equal",greaterThan:"greaterthan",greaterThanOrEqual:"greaterthanorequal",lessThan:"lessthan",lessThanOrEqual:"lessthanorequal",notEqual:"notequal",startsWith:"startswith"},this.defaultLocale={EmptyRecord:"No records to display",True:"true",False:"false",InvalidFilterMessage:"Invalid Filter Data",GroupDropArea:"Drag a column header here to group its column",UnGroup:"Click here to ungroup",UnGroupButton:"Click here to ungroup",GroupDisable:"Grouping is disabled for this column",FilterbarTitle:"'s filter bar cell",EmptyDataSourceError:"DataSource must not be empty at initial load since columns are generated from dataSource in AutoGenerate Column Grid",Add:"Add",Edit:"Edit",Cancel:"Cancel",Update:"Update",Delete:"Delete",Print:"Print",Pdfexport:"PDF Export",Excelexport:"Excel Export",Wordexport:"Word Export",Csvexport:"CSV Export",Search:"Search",Columnchooser:"Columns",Save:"Save",Item:"item",Items:"items",EditOperationAlert:"No records selected for edit operation",DeleteOperationAlert:"No records selected for delete operation",SaveButton:"Save",OKButton:"OK",CancelButton:"Cancel",EditFormTitle:"Details of ",AddFormTitle:"Add New Record",BatchSaveConfirm:"Are you sure you want to save changes?",BatchSaveLostChanges:"Unsaved changes will be lost. Are you sure you want to continue?",ConfirmDelete:"Are you sure you want to Delete Record?",CancelEdit:"Are you sure you want to Cancel the changes?",ChooseColumns:"Choose Column",SearchColumns:"search columns",Matchs:"No matches found",FilterButton:"Filter",ClearButton:"Clear",StartsWith:"Starts With",EndsWith:"Ends With",Contains:"Contains",Equal:"Equal",NotEqual:"Not Equal",LessThan:"Less Than",LessThanOrEqual:"Less Than Or Equal",GreaterThan:"Greater Than",GreaterThanOrEqual:"Greater Than Or Equal",ChooseDate:"Choose a Date",EnterValue:"Enter the value",Copy:"Copy",Group:"Group by this column",Ungroup:"Ungroup by this column",autoFitAll:"Autofit all columns",autoFit:"Autofit this column",AutoFitAll:"Autofit all columns",AutoFit:"Autofit this column",Export:"Export",FirstPage:"First Page",LastPage:"Last Page",PreviousPage:"Previous Page",NextPage:"Next Page",SortAscending:"Sort Ascending",SortDescending:"Sort Descending",EditRecord:"Edit Record",DeleteRecord:"Delete Record",FilterMenu:"Filter",SelectAll:"Select All",Blanks:"Blanks",FilterTrue:"True",FilterFalse:"False",NoResult:"No matches found",ClearFilter:"Clear Filter",Clear:"Clear",NumberFilter:"Number Filters",TextFilter:"Text Filters",DateFilter:"Date Filters",DateTimeFilter:"DateTime Filters",MatchCase:"Match Case",Between:"Between",CustomFilter:"Custom Filter",CustomFilterPlaceHolder:"Enter the value",CustomFilterDatePlaceHolder:"Choose a date",AND:"AND",OR:"OR",ShowRowsWhere:"Show rows where:",FilterMenuDialogARIA:"Filter menu dialog",ExcelFilterDialogARIA:"Excel filter dialog",DialogEditARIA:"Edit dialog",ColumnChooserDialogARIA:"Column chooser dialog",ColumnMenuDialogARIA:"Column menu dialog",CustomFilterDialogARIA:"Customer filter dialog",SortAtoZ:"Sort A to Z",SortZtoA:"Sort Z to A",SortByOldest:"Sort by Oldest",SortByNewest:"Sort by Newest",SortSmallestToLargest:"Sort Smallest to Largest",SortLargestToSmallest:"Sort Largest to Smallest",Sort:"Sort"},this.keyConfigs={downArrow:"downarrow",upArrow:"uparrow",rightArrow:"rightarrow",leftArrow:"leftarrow",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",shiftRight:"shift+rightarrow",shiftLeft:"shift+leftarrow",home:"home",end:"end",escape:"escape",ctrlHome:"ctrl+home",ctrlEnd:"ctrl+end",pageUp:"pageup",pageDown:"pagedown",ctrlAltPageUp:"ctrl+alt+pageup",ctrlAltPageDown:"ctrl+alt+pagedown",altPageUp:"alt+pageup",altPageDown:"alt+pagedown",altDownArrow:"alt+downarrow",altUpArrow:"alt+uparrow",ctrlDownArrow:"ctrl+downarrow",ctrlUpArrow:"ctrl+uparrow",ctrlPlusA:"ctrl+A",ctrlPlusP:"ctrl+P",insert:"insert",delete:"delete",f2:"f2",enter:"enter",ctrlEnter:"ctrl+enter",shiftEnter:"shift+enter",tab:"tab",shiftTab:"shift+tab",space:"space",ctrlPlusC:"ctrl+C",ctrlShiftPlusH:"ctrl+shift+H",ctrlSpace:"ctrl+space",ctrlLeftArrow:"ctrl+leftarrow",ctrlRightArrow:"ctrl+rightarrow"}},o.prototype.render=function(){this.log(["module_missing","promise_enabled","locale_missing","check_datasource_columns"]),this.ariaService.setOptions(this.element,{role:"grid"}),r.createSpinner({target:this.element},this.createElement),this.renderModule=new Rr(this,this.serviceLocator),this.searchModule=new Kr(this),this.scrollModule=new Xr(this),this.notify(Mt,{}),!0!==this.getDataModule().dataManager.dataSource.offline&&void 0!==this.getDataModule().dataManager.dataSource.url||(this.isVirtualAdaptive=!0),this.trigger("load"),T(this.columns,this.enableColumnVirtualization,this),this.enablePersistence&&this.notify(hi,{}),this.getMediaColumns(),I(this.columns),this.checkLockColumns(this.columns),this.getColumns(),this.processModel(),this.gridRender(),this.wireEvents(),this.addListener(),this.updateDefaultCursor(),this.updateStackedFilter(),this.showSpinner(),this.notify(Ot,{})},o.prototype.showSpinner=function(){this.isExportGrid||r.showSpinner(this.element)},o.prototype.hideSpinner=function(){this.isExportGrid||r.hideSpinner(this.element)},o.prototype.updateStackedFilter=function(){this.allowFiltering&&"FilterBar"===this.filterSettings.type&&this.getHeaderContent().getElementsByClassName("e-stackedheadercell").length?this.getHeaderContent().classList.add("e-stackedfilter"):this.getHeaderContent().classList.remove("e-stackedfilter")},o.prototype.getMediaColumns=function(){if(!this.enableColumnVirtualization){var e=this.getColumns();if(this.getShowHideService=this.serviceLocator.getService("showHideService"),!t.isNullOrUndefined(e))for(var i=0;i<e.length;i++)t.isNullOrUndefined(e[i].hideAtMedia)||!t.isNullOrUndefined(e[i].visible)&&!e[i].visible||this.pushMediaColumn(e[i],i)}},o.prototype.pushMediaColumn=function(e,t){this.mediaCol.push(e),this.media[e.uid]=window.matchMedia(e.hideAtMedia),this.mediaQueryUpdate(t,this.media[e.uid]),this.mediaBindInstance[t]=this.mediaQueryUpdate.bind(this,t),this.media[e.uid].addListener(this.mediaBindInstance[t])},o.prototype.updateMediaColumns=function(e){if(!this.enableColumnVirtualization){for(var t=this.getColumnIndexByUid(e.uid),i=0;i<this.mediaCol.length;i++)if(e.uid===this.mediaCol[i].uid)return void this.mediaCol.splice(i,1);this.pushMediaColumn(e,t)}},o.prototype.mediaQueryUpdate=function(e,t){var i=this.getColumns()[e];this.mediaCol.some(function(e){return e.uid===i.uid})&&(i.visible=t.matches,this.isInitialLoad&&(this.invokedFromMedia=!0,i.visible?this.showHider.show(i.headerText,"headerText"):this.showHider.hide(i.headerText,"headerText")))},o.prototype.refreshMediaCol=function(){this.isInitialLoad=!0;var e=this.element.querySelector("."+xi);this.aggregates.length&&this.element.scrollHeight>this.height&&e&&t.addClass([e],["e-footerpadding"]),this.getColumns().filter(function(e){return"checkbox"===e.type}).length&&"ResetOnRowClick"===this.selectionSettings.checkboxMode&&(this.isCheckBoxSelection=!1),"Vertical"===this.rowRenderingMode&&this.enableHover&&(this.setProperties({enableAdaptiveUI:!0,enableHover:!1},!0),t.removeClass([this.element],"e-gridhover"))},o.prototype.removeMediaListener=function(){for(var e=0;e<this.mediaCol.length;e++)this.media[this.mediaCol[e].uid].removeListener(this.mediaBindInstance[this.mediaCol[e].index])},o.prototype.eventInitializer=function(){},o.prototype.destroy=function(){var e=this.element;if(e){var i=!(!e.querySelector("."+Si)||!e.querySelector("."+Ri));i&&this.unwireEvents(),this.removeListener(),this.removeMediaListener(),this.notify(_t,{}),this.destroyDependentModules(),i&&n.prototype.destroy.call(this),this.toolTipObj.destroy();for(var r=["renderModule","headerModule","contentModule","valueFormatterService","serviceLocator","ariaService","keyboardModule","widthService","searchModule","showHider","scrollModule","printModule","clipboardModule","focusModule"],o=0;o<r.length;o++)this[r[o]]&&(this[r[o]]=null);this.element.innerHTML="",t.classList(this.element,[],["e-rtl","e-gridhover","e-responsive","e-default","e-device","e-grid-min-height"]),this.isAngular&&!this.isFreezeRefresh&&(this.element=null),this.isFreezeRefresh=!1}},o.prototype.destroyDependentModules=function(){var e=this.element;e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.scrollModule.destroy(),this.keyboardModule.destroy(),this.focusModule.destroy())},o.prototype.getModuleName=function(){return"grid"},o.prototype.enableBoxSelection=function(){this.enableAutoFill?(this.selectionSettings.cellSelectionMode="BoxWithBorder",this.element.classList.add("e-afenabled")):this.element.classList.remove("e-afenabled")},o.prototype.onPropertyChanged=function(e,i){var r,n=!1,o=!1,s=!1,l={requestType:"refresh"};if(!this.isDestroyed){this.log("module_missing"),this.isEllipsisTooltip()&&this.toolTipObj.close();var a=Object.keys(e);a.indexOf("columns")>-1&&(this.updateColumnObject(),o=!0);for(var h=0,d=a;h<d.length;h++){var c=d[h];switch(c){case"allowPaging":this.notify(Bt,{module:"pager",enable:this.allowPaging}),n=!0;break;case"pageSettings":if(this.pageTemplateChange){this.pageTemplateChange=!1,this.notify(Nt,{module:"pager",properties:e.pageSettings});break}this.notify(Nt,{module:"pager",properties:e.pageSettings}),(t.isNullOrUndefined(e.pageSettings.currentPage)&&t.isNullOrUndefined(e.pageSettings.pageSize)&&t.isNullOrUndefined(e.pageSettings.totalRecordsCount)||!t.isNullOrUndefined(i.pageSettings)&&e.pageSettings.currentPage!==i.pageSettings.currentPage&&!this.enableColumnVirtualization&&!this.enableVirtualization&&this.pageSettings.totalRecordsCount<=this.pageSettings.pageSize)&&(n=!0);break;case"allowSorting":this.notify(Bt,{module:"sort",enable:this.allowSorting}),n=!0,r=!0;break;case"allowFiltering":this.updateStackedFilter(),this.notify(Bt,{module:"filter",enable:this.allowFiltering}),n=!0,"FilterBar"!==this.filterSettings.type&&this.refreshHeader();break;case"height":case"width":this.notify(Bt,{module:"scroll",properties:{width:e.width,height:e.height}});break;case"allowReordering":this.headerModule.refreshUI(),r=!0;break;case"allowRowDragAndDrop":this.notify(Bt,{module:"rowDragAndDrop",enable:this.allowRowDragAndDrop}),this.renderModule.refresh(),this.headerModule.refreshUI();break;case"allowSelection":this.notify(Bt,{module:"selection",enable:this.allowSelection});break;case"enableAutoFill":this.selectionModule&&(this.enableBoxSelection(),this.selectionModule.updateAutoFillPosition());break;case"rowTemplate":this.rowTemplateFn=x(this.rowTemplate),n=!0;break;case"detailTemplate":this.detailTemplateFn=x(this.detailTemplate),n=!0;break;case"allowGrouping":this.notify(Bt,{module:"group",enable:this.allowGrouping}),this.headerModule.refreshUI(),n=!0,r=!0;break;case"enableInfiniteScrolling":case"childGrid":n=!0;break;case"toolbar":this.notify(Bt,{module:"toolbar"});break;case"groupSettings":this.notify(Nt,{module:"group",properties:e.groupSettings,oldProperties:i.groupSettings});break;case"aggregates":!this.aggregates.length&&this.allowGrouping&&this.groupSettings.columns.length&&(n=!0),this.notify(Bt,{module:"aggregate",properties:e});break;case"frozenColumns":case"frozenRows":case"enableVirtualization":case"currencyCode":case"locale":this.log("frozen_rows_columns"),s=!0,o=!0;break;case"query":this.getDataModule().isQueryInvokedFromData||(n=!0),this.getDataModule().isQueryInvokedFromData=!1;break;default:this.extendedPropertyChange(c,e,o)}}r&&this.updateDefaultCursor(),o?s||this.getFrozenColumns()||this.frozenRows?t.isBlazor()&&this.isServerRendered||this.freezeRefresh():this.refresh():n&&(this.notify(Lt,l),n=!1,this.maintainSelection(e.selectedRowIndex))}},o.prototype.extendedPropertyChange=function(e,r,n){switch(e){case"enableRtl":this.updateRTL(),this.allowPaging&&(this.element.querySelector(".e-gridpager").ej2_instances[0].enableRtl=r.enableRtl,this.element.querySelector(".e-gridpager").ej2_instances[0].dataBind()),"auto"!==this.height&&(this.scrollModule.removePadding(!r.enableRtl),this.scrollModule.setPadding()),this.toolbar&&this.toolbarModule&&(this.toolbarModule.getToolbar().ej2_instances[0].enableRtl=r.enableRtl,this.toolbarModule.getToolbar().ej2_instances[0].dataBind()),this.contextMenuItems&&this.contextMenuModule&&(this.contextMenuModule.getContextMenu().ej2_instances[0].enableRtl=r.enableRtl,this.contextMenuModule.getContextMenu().ej2_instances[0].dataBind()),this.showColumnMenu&&this.columnMenuModule&&(this.columnMenuModule.getColumnMenu().ej2_instances[0].enableRtl=r.enableRtl,this.columnMenuModule.getColumnMenu().ej2_instances[0].dataBind()),"FilterBar"===this.filterSettings.type&&this.filterSettings.showFilterBarOperator&&this.refreshHeader(),this.notify("rtl-updated",{});break;case"enableAltRow":this.renderModule.refresh();break;case"allowResizing":this.headerModule.refreshUI(),this.updateResizeLines();break;case"rowHeight":this.rowHeight?t.addClass([this.element],"e-grid-min-height"):t.removeClass([this.element],"e-grid-min-height"),this.renderModule.refresh(),this.headerModule.refreshUI();break;case"gridLines":this.updateGridLines();break;case"showColumnMenu":this.headerModule.refreshUI(),this.notify(Bt,{module:"columnMenu",enable:!0});break;case"columnMenuItems":this.notify(Bt,{module:"columnMenu",enable:this.columnMenuItems});break;case"contextMenuItems":this.notify(Bt,{module:"contextMenu",enable:this.contextMenuItems});break;case"showColumnChooser":this.notify(Bt,{module:"columnChooser",enable:this.showColumnChooser});break;case"filterSettings":this.updateStackedFilter(),this.notify(Nt,{module:"filter",properties:r.filterSettings});break;case"searchSettings":this.notify(Nt,{module:"search",properties:r.searchSettings});break;case"sortSettings":this.notify(Nt,{module:"sort"});break;case"selectionSettings":this.notify(Nt,{module:"selection",properties:r.selectionSettings});break;case"editSettings":this.notify(Nt,{module:"edit",properties:r.editSettings});break;case"allowTextWrap":case"textWrapSettings":this.allowTextWrap?this.applyTextWrap():this.removeTextWrap(),this.notify(oi,{case:"textwrap",isModeChg:"textWrapSettings"===e});break;case"dataSource":var o=this.getDataModule().getState();if(Object.getPrototypeOf(r).deepWatch)for(var s=this.getPrimaryKeyFieldNames()[0],l=0,a=Object.keys(r.dataSource);l<a.length;l++)this.setRowData(t.getValue(s,this.dataSource[a[l]]),this.dataSource[a[l]]);else if(o.isPending){for(var h=t.isNullOrUndefined(this.dataSource)?[]:this.dataSource.result,d=o.group||[],l=0;l<d.length;l++)h=i.DataUtil.group(h,d[l],o.aggregates||[]);this.dataSource={result:h,count:this.dataSource.count,aggregates:this.dataSource.aggregates},this.getDataModule().setState({}),o.resolver(this.dataSource)}else this.getDataModule().setState({isDataChanged:!1}),this.notify(Zt,{}),n||(this.renderModule.refresh(),this.isCheckBoxSelection&&this.notify("before-refresh-on-data-change",{}));this.scrollRefresh();break;case"enableHover":(r.enableHover?t.addClass:t.removeClass)([this.element],"e-gridhover");break;case"selectedRowIndex":this.isSelectedRowIndexUpdating||this.selectRow(r.selectedRowIndex),this.isSelectedRowIndexUpdating=!1;break;case"resizeSettings":this.widthService.setWidthToTable();break;case"enableAdaptiveUI":this.notify("set-fullscreen-dialog",{});break;case"rowRenderingMode":this.enableVerticalRendering(),this.notify("row-mode-change",{}),this.refresh()}},o.prototype.maintainSelection=function(e){var t=this;if(-1!==e){var i=function(){t.selectRow(e),t.off(At,i)};this.on(At,i,this)}},o.prototype.setProperties=function(e,t){n.prototype.setProperties.call(this,e,t);e.filterSettings&&this.filterModule&&t&&this.filterModule.refreshFilter()},o.prototype.setTablesCount=function(){var e=this.getFrozenColumns(),t=this.getFrozenLeftColumnsCount(),i=this.getFrozenRightColumnsCount();!e||t||i?e||!t&&!i||(t&&!i||i&&!t?this.tablesCount=2:t&&i&&(this.tablesCount=3)):this.tablesCount=2},o.prototype.getTablesCount=function(){return this.tablesCount},o.prototype.updateDefaultCursor=function(){var e=[].slice.call(this.getHeaderContent().querySelectorAll(".e-headercell:not(.e-stackedheadercell)")),t=[].slice.call(this.getHeaderContent().getElementsByClassName("e-stackedheadercell")),i=this.getColumns();if(this.enableColumnVirtualization&&this.getFrozenColumns()){var r=this.contentModule.getHeaderCells();e=r.length?r:e}for(var n=0;n<e.length;n++){var o=e[n];(this.allowGrouping||this.allowReordering||this.allowSorting)&&(i[n].allowReordering&&i[n].allowSorting&&i[n].allowGrouping?o.classList.add("e-mousepointer"):o.classList.add("e-defaultcursor"))}for(var s=0;s<t.length;s++)this.allowReordering&&t[s].classList.add("e-mousepointer")},o.prototype.updateColumnModel=function(e){for(var t=0,i=e.length;t<i;t++)e[t].columns?this.updateColumnModel(e[t].columns):this.columnModel.push(e[t]);this.updateColumnLevelFrozen(),this.updateFrozenColumns(),this.updateLockableColumns()},o.prototype.updateColumnLevelFrozen=function(){var e=this.columnModel,t=[],i=[],r=[];if(this.frozenLeftCount||this.frozenRightCount){for(var n=0,o=e.length;n<o;n++){var s=e[n];"Left"===s.freeze?(s.freezeTable=Li,t.push(s)):"Right"===s.freeze?(s.freezeTable=Ni,i.push(s)):(s.freezeTable="movable",r.push(s))}this.columnModel=t.concat(r).concat(i)}},o.prototype.updateFrozenColumns=function(){if(!this.frozenLeftCount&&!this.frozenRightCount)for(var e=this.columnModel,t=this.frozenColumns,i=this.getFrozenColumns(),r=0,n=0,o=e.length;n<o;n++){var s=e[n];t&&(s.freezeTable=n<t?Li:"movable"),s.isFrozen&&n>=t?(s.freezeTable=Li,e.splice(this.frozenColumns+r,0,e.splice(n,1)[0]),r++):i&&!t&&(s.freezeTable="movable")}},o.prototype.getFrozenLeftCount=function(){return this.getFrozenColumns()||this.getFrozenLeftColumnsCount()},o.prototype.isFrozenGrid=function(){return 0!==this.getFrozenColumns()||0!==this.getFrozenLeftColumnsCount()||0!==this.getFrozenRightColumnsCount()},o.prototype.getFrozenMode=function(){return this.frozenName},o.prototype.updateLockableColumns=function(){for(var e=this.columnModel,t=0,i=0,r=this.getFrozenColumns(),n=0;n<e.length;n++)e[n].lockColumn&&(n<r?(e.splice(t,0,e.splice(n,1)[0]),t++):(e.splice(r+i,0,e.splice(n,1)[0]),i++))},o.prototype.checkLockColumns=function(e){for(var t=0;t<e.length;t++)e[t].columns?this.checkLockColumns(e[t].columns):e[t].lockColumn&&this.lockcolPositionCount++},o.prototype.getColumns=function(e){var i=this,r=this.inViewIndexes.map(function(e){return e-i.groupSettings.columns.length}).filter(function(e){return e>-1}),n=r.length;(!this.enableColumnVirtualization||t.isNullOrUndefined(this.columnModel)||0===this.columnModel.length||e)&&(this.columnModel=[],this.updateColumnModel(this.columns));var o=0===n?this.columnModel:this.columnModel.slice(r[0],r[n-1]+1);return this.contentModule&&this.enableColumnVirtualization&&this.isFrozenGrid()&&r.length&&r[0]>0&&(o=this.contentModule.ensureFrozenCols(o)),o},o.prototype.getStackedHeaderColumnByHeaderText=function(e,t){for(var i=0;i<t.length;i++){var r=t[i];if(r.field===e||r.headerText===e){this.stackedColumn=r;break}r.columns&&this.getStackedHeaderColumnByHeaderText(e,r.columns)}return this.stackedColumn},o.prototype.getColumnIndexesInView=function(){return this.inViewIndexes},o.prototype.getQuery=function(){return this.query},o.prototype.getLocaleConstants=function(){return this.defaultLocale},o.prototype.setColumnIndexesInView=function(e){this.inViewIndexes=e},o.prototype.getVisibleColumns=function(){return this.getCurrentVisibleColumns()},o.prototype.getHeaderContent=function(){return this.headerModule.getPanel()},o.prototype.setGridHeaderContent=function(e){this.headerModule.setPanel(e)},o.prototype.getContentTable=function(){return this.contentModule.getTable()},o.prototype.setGridContentTable=function(e){this.contentModule.setTable(e)},o.prototype.getContent=function(){return this.contentModule.getPanel()},o.prototype.setGridContent=function(e){this.contentModule.setPanel(e)},o.prototype.getHeaderTable=function(){return this.headerModule.getTable()},o.prototype.setGridHeaderTable=function(e){this.headerModule.setTable(e)},o.prototype.getFooterContent=function(){return this.footerElement=this.element.getElementsByClassName(xi)[0],this.footerElement},o.prototype.getFooterContentTable=function(){return this.footerElement=this.element.getElementsByClassName(xi)[0],this.footerElement.firstChild.firstChild},o.prototype.getPager=function(){return this.gridPager},o.prototype.setGridPager=function(e){this.gridPager=e},o.prototype.getRowByIndex=function(e){return this.contentModule.getRowByIndex(e)},o.prototype.getMovableRowByIndex=function(e){return this.contentModule.getMovableRowByIndex(e)},o.prototype.getFrozenRowByIndex=function(e){return this.getFrozenDataRows()[e]},o.prototype.getRows=function(){return this.contentModule.getRowElements()},o.prototype.getFrozenRightRowByIndex=function(e){return this.contentModule.getFrozenRightRowByIndex(e)},o.prototype.getRowInfo=function(e){var i=e,r={target:e};if(!t.isNullOrUndefined(e)&&t.isNullOrUndefined(O(i,"e-detailrowcollapse")&&t.isNullOrUndefined(O(i,"e-recordplusexpand")))){var n=t.closest(i,"."+bi);if(!n){var o=t.closest(i,"."+Oi);if(!t.isNullOrUndefined(o)){var s=this.getRowObjectFromUID(o.getAttribute("data-uid")),l=parseInt(o.getAttribute(Hi),10);r={row:o,rowData:s.data,rowIndex:l}}return r}var a=parseInt(n.getAttribute(qi),10);if(!t.isNullOrUndefined(n)&&!isNaN(a)){var h=t.closest(n,"."+Oi),l=parseInt(h.getAttribute(Hi),10),d=this.getFrozenColumns(),c=this.columnModel[a].getFreezeTableName(),p=this.contentModule.getRows(),u=a+this.getIndentCount();this.isFrozenGrid()&&(c===Li?p=this.contentModule.getRows():"movable"===c?(u=a-d-this.frozenLeftCount,p=this.contentModule.getMovableRows()):c===Ni&&(u=a-(this.frozenLeftCount+this.movableCount),p=this.contentModule.getFrozenRightRows()));var g=p.filter(function(e){return e.uid===h.getAttribute("data-uid")}),f={},m=void 0;Object.keys(g).length&&(f=g[0].data,m=g[0].cells[u].column),r={cell:n,cellIndex:a,row:h,rowIndex:l,rowData:f,column:m,target:e}}}return r},o.prototype.getMovableRows=function(){return this.contentModule.getMovableRowElements()},o.prototype.getFrozenRightRows=function(){return this.contentModule.getFrozenRightRowElements()},o.prototype.getDataRows=function(){return this.getAllDataRows()},o.prototype.getAllDataRows=function(e){if(t.isNullOrUndefined(this.getContentTable().querySelector(Ui)))return[];var i=this.isFrozenGrid()?this.getFrozenLeftContentTbody():this.getContentTable().querySelector(Ui),r=[].slice.call(i.children);if(this.frozenRows){var n=this.isFrozenGrid()?this.getHeaderContent().querySelector("."+zi).querySelector(Ui):this.getHeaderTable().querySelector(Ui),o=[].slice.call(n.children);r=this.addMovableRows(o,r)}return this.generateDataRows(r,e)},o.prototype.addMovableRows=function(e,t){for(var i=0,r=t.length;i<r;i++)e.push(t[i]);return e},o.prototype.generateDataRows=function(e,t){for(var i=[],r=0,n=e.length;r<n;r++)!e[r].classList.contains(Oi)||e[r].classList.contains("e-hiddenrow")&&!t||(this.isCollapseStateEnabled()?i[parseInt(e[r].getAttribute("aria-rowindex"),10)]=e[r]:i.push(e[r]));return i},o.prototype.getMovableDataRows=function(){return this.getAllMovableDataRows()},o.prototype.getAllMovableDataRows=function(e){if(!this.isFrozenGrid())return[];var t=[].slice.call(this.getContent().querySelector("."+Ei).querySelector(Ui).children);if(this.frozenRows){var i=[].slice.call(this.getHeaderContent().querySelector("."+Ii).querySelector(Ui).children);t=this.addMovableRows(i,t)}return this.generateDataRows(t,e)},o.prototype.getFrozenDataRows=function(){return this.getAllFrozenDataRows()},o.prototype.getAllFrozenDataRows=function(e){var t=[].slice.call(this.getContent().querySelector("."+Ti).querySelector(Ui).children);if(this.frozenRows){var i=[].slice.call(this.getHeaderContent().querySelector("."+zi).querySelector(Ui).children);t=this.addMovableRows(i,t)}return this.generateDataRows(t,e)},o.prototype.getFrozenRightDataRows=function(){return this.getAllFrozenRightDataRows()},o.prototype.getAllFrozenRightDataRows=function(e){if("Right"!==this.getFrozenMode()&&"Left-Right"!==this.getFrozenMode())return[];var t=[].slice.call(this.getContent().querySelector(".e-frozen-right-content").querySelector(Ui).children);if(this.frozenRows){var i=[].slice.call(this.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(Ui).children);t=this.addMovableRows(i,t)}return this.generateDataRows(t,e)},o.prototype.setCellValue=function(e,i,r){var n="Right"===this.getFrozenMode(),o=this.getPrimaryKeyFieldNames()[0],s=new $i(this,this.serviceLocator),l=this.getColumnIndexByField(i),a=this.getColumnByField(i),h=("movable"===a.getFreezeTableName()?this.contentModule.getMovableRows():"frozen-right"===a.getFreezeTableName()?this.getFrozenRightRowsObject():this.contentModule.getRows()).filter(function(i){return t.getValue(o,i.data)===e})[0],d=h?this.element.querySelector("[data-uid="+h.uid+"]"):null;if(!t.isNullOrUndefined(d)){t.setValue(i,r,h.data);var c=this.getFrozenLeftColumnsCount()||this.getFrozenColumns(),p=this.getMovableColumnsCount();this.isRowDragable()&&!n&&c++;var u=c+p,g=this.getCellFromIndex(h.index,l);if(!t.isNullOrUndefined(g)){var f="movable"===a.getFreezeTableName()?c:"frozen-right"===a.getFreezeTableName()?u:0;this.groupSettings.columns.length&&(l+=this.groupSettings.columns.length),(this.childGrid||this.detailTemplate)&&l++,this.isRowDragable()&&!n&&l++;var m=h.cells[l-f];s.refreshTD(g,m,h.data,{index:h.index}),this.aggregates.length>0&&(this.notify("refresh-footer-rendered",{}),this.groupSettings.columns.length>0&&this.notify("group-aggregates",{})),t.isNullOrUndefined(h)||t.isNullOrUndefined(h.changes)||(h.changes[i]=r),this.trigger("queryCellInfo",{cell:g,column:a,data:h.data})}}},o.prototype.refreshReactColumnTemplateByUid=function(e){var i=this;this.isReact&&this.clearTemplate(["columnTemplate"],void 0,function(){for(var r=i.getRowsObject(),n=i.getIndentCount(),o=i.getNormalizedColumnIndex(e),s=0;s<r.length;s++)if(r[s].isDataRow&&!t.isNullOrUndefined(r[s].index)){var l=r[s].cells[o],a=new $i(i,i.serviceLocator),h=i.getCellFromIndex(r[s].index,o-n);a.refreshTD(h,l,r[s].data,{index:r[s].index})}})},o.prototype.setRowData=function(e,i){var r=this.contentModule.getRows(),n=this.getPrimaryKeyFieldNames()[0],o=new Vi(this.serviceLocator,null,this);this.groupSettings.columns.length>0&&this.aggregates.length>0&&(r=r.filter(function(e){return e.isDataRow}));var s=r.filter(function(i){return t.getValue(n,i.data)===e})[0];!t.isNullOrUndefined(s)&&this.element.querySelectorAll("[data-uid="+s.uid+"]").length&&(s.changes=i,se(s,this.getForeignKeyColumns(),s.changes),o.refresh(s,this.getColumns(),!0),this.aggregates.length>0&&(this.notify("refresh-footer-rendered",{}),this.groupSettings.columns.length>0&&this.notify("group-aggregates",{})))},o.prototype.getCellFromIndex=function(e,t){return He(this,this.getColumnByIndex(t),e,t)},o.prototype.getMovableCellFromIndex=function(e,t){if(!("Left-Right"===this.frozenName&&t>=this.movableCount)){var i=this.getFrozenColumns()||this.getFrozenLeftColumnsCount();return this.getMovableDataRows()[e]&&this.getMovableDataRows()[e].getElementsByClassName(bi)[t-i]}},o.prototype.getFrozenRightCellFromIndex=function(e,t){var i=this.getFrozenLeftColumnsCount()+this.getMovableColumnsCount(),r=this.getFrozenRightDataRows();return r[e]&&r[e].getElementsByClassName(bi)[t-i]},o.prototype.getColumnHeaderByIndex=function(e){return this.getHeaderTable().getElementsByClassName("e-headercell")[e]},o.prototype.getMovableColumnHeaderByIndex=function(e){var t=this.getFrozenColumns()||this.getFrozenLeftColumnsCount();return this.getMovableVirtualHeader().getElementsByClassName("e-headercell")[e-t]},o.prototype.getFrozenRightColumnHeaderByIndex=function(e){var t=this.getFrozenLeftColumnsCount()+this.getMovableColumnsCount();return this.getFrozenRightHeader().getElementsByClassName("e-headercell")[e-t]},o.prototype.getFrozenLeftColumnHeaderByIndex=function(e){return this.getFrozenVirtualHeader().getElementsByClassName("e-headercell")[e]},o.prototype.getRowObjectFromUID=function(e,i,r){var n=this.contentModule.getRows(),o=this.rowObject(n,e);return this.isFrozenGrid()&&(!o||i||r)?((!(o=this.rowObject(this.contentModule.getMovableRows(),e))&&"Left-Right"===this.getFrozenMode()||r)&&(o=this.rowObject(this.contentModule.getFrozenRightRows(),e)),o):t.isNullOrUndefined(o)&&this.enableVirtualization&&this.groupSettings.columns.length>0?o=this.rowObject(this.vRows,e):o},o.prototype.rowObject=function(e,t){for(var i=0,r=e;i<r.length;i++){var n=r[i];if(n.uid===t)return n}return null},o.prototype.getRowsObject=function(){return this.contentModule.getRows()},o.prototype.getMovableRowsObject=function(){var e=[];return this.isFrozenGrid()&&(e=this.contentModule.getMovableRows()),e},o.prototype.getFrozenRightRowsObject=function(){var e=[];return"Right"!==this.getFrozenMode()&&"Left-Right"!==this.getFrozenMode()||(e=this.contentModule.getFrozenRightRows()),e},o.prototype.getColumnHeaderByField=function(e){var t=this.getColumnByField(e);return t?this.getColumnHeaderByUid(t.uid):void 0},o.prototype.getColumnHeaderByUid=function(e){var t=this.getHeaderContent().querySelector("[e-mappinguid="+e+"]");return t?t.parentElement:void 0},o.prototype.getColumnByIndex=function(e){var t;return this.getColumns().some(function(i,r){return t=i,r===e}),t},o.prototype.getColumnByField=function(e){return S(this.getColumns(),function(t){if(t.field===e)return t})[0]},o.prototype.getColumnIndexByField=function(e){for(var t=this.getColumns(),i=0;i<t.length;i++)if(t[i].field===e)return i;return-1},o.prototype.getColumnByUid=function(e){return S(this.getColumns().concat(this.getStackedColumns(this.columns)),function(t){if(t.uid===e)return t})[0]},o.prototype.getStackedColumns=function(e,t){void 0===t&&(t=[]);for(var i=0,r=e;i<r.length;i++){var n=r[i];n.columns&&(t.push(n),this.getStackedColumns(n.columns,t))}return t},o.prototype.getColumnIndexByUid=function(e){var i=S(this.getColumns(),function(t,i){if(t.uid===e)return i})[0];return t.isNullOrUndefined(i)?-1:i},o.prototype.getUidByColumnField=function(e){return S(this.getColumns(),function(t){if(t.field===e)return t.uid})[0]},o.prototype.getNormalizedColumnIndex=function(e){return this.getColumnIndexByUid(e)+this.getIndentCount()},o.prototype.getIndentCount=function(){var e=0;return this.allowGrouping&&(e+=this.groupSettings.columns.length),this.isDetail()&&e++,this.isRowDragable()&&t.isNullOrUndefined(this.rowDropSettings.targetID)&&e++,e},o.prototype.getColumnFieldNames=function(){for(var e,t=[],i=0,r=this.getColumns().length;i<r;i++)(e=this.getColumns()[i]).visible&&t.push(e.field);return t},o.prototype.getRowTemplate=function(){return this.rowTemplateFn},o.prototype.getDetailTemplate=function(){return this.detailTemplateFn},o.prototype.getEditTemplate=function(){return this.editTemplateFn},o.prototype.getEditHeaderTemplate=function(){return this.editHeaderTemplateFn},o.prototype.getEditFooterTemplate=function(){return this.editFooterTemplateFn},o.prototype.getPrimaryKeyFieldNames=function(){for(var e=[],t=0;t<this.columnModel.length;t++)this.columnModel[t].isPrimaryKey&&e.push(this.columnModel[t].field);return e},o.prototype.refresh=function(){this.isDestroyed||(this.isManualRefresh=!0,this.headerModule.refreshUI(),this.updateStackedFilter(),this.renderModule.refresh())},o.prototype.refreshHeader=function(){this.headerModule.refreshUI()},o.prototype.getSelectedRows=function(){return this.selectionModule?this.selectionModule.selectedRecords:[]},o.prototype.getSelectedRowIndexes=function(){return this.selectionModule?this.selectionModule.selectedRowIndexes:[]},o.prototype.getSelectedRowCellIndexes=function(){return this.selectionModule?this.selectionModule.selectedRowCellIndexes:[]},o.prototype.getSelectedRecords=function(){return this.selectionModule?this.selectionModule.getSelectedRecords():[]},o.prototype.getSelectedColumnsUid=function(){var e=this,t=[];return this.selectionModule&&this.selectionModule.selectedColumnsIndexes.filter(function(i){return t.push(e.getColumns()[i].uid)}),t},o.prototype.getDataModule=function(){return this.renderModule.data},o.prototype.showColumns=function(e,t){t=t||"headerText",this.showHider.show(e,t)},o.prototype.hideColumns=function(e,t){t=t||"headerText",this.showHider.hide(e,t)},o.prototype.getFrozenColumns=function(){return this.frozenColumns+this.getFrozenCount(this.columns,0,0)},o.prototype.getFrozenRightColumnsCount=function(){return this.frozenRightCount},o.prototype.getFrozenLeftColumnsCount=function(){return this.frozenLeftCount},o.prototype.getMovableColumnsCount=function(){return this.movableCount},o.prototype.setFrozenCount=function(){this.frozenLeftCount=this.frozenRightCount=this.movableCount=0,this.visibleFrozenLeft=this.visibleFrozenRight=this.visibleMovable=0,this.frozenLeftColumns=[],this.frozenRightColumns=[],this.movableColumns=[],this.splitFrozenCount(this.columns),this.frozenColumns&&(this.frozenLeftCount||this.frozenRightCount)&&this.setProperties({frozenColumns:0},!0),this.setTablesCount(),this.frozenLeftCount&&!this.frozenRightCount?this.frozenName="Left":this.frozenRightCount&&!this.frozenLeftCount?this.frozenName="Right":this.frozenLeftCount&&this.frozenRightCount&&(this.frozenName="Left-Right")},o.prototype.getVisibleFrozenLeftCount=function(){return this.visibleFrozenLeft},o.prototype.getVisibleFrozenRightCount=function(){return this.visibleFrozenRight},o.prototype.getVisibleMovableCount=function(){return this.visibleMovable},o.prototype.getFrozenRightColumns=function(){return this.frozenRightColumns},o.prototype.getFrozenLeftColumns=function(){return this.frozenLeftColumns},o.prototype.getMovableColumns=function(){return this.movableColumns},o.prototype.splitFrozenCount=function(e){for(var t=0;t<e.length;t++)e[t].columns?this.splitFrozenCount(e[t].columns):"Right"===e[t].freeze?(!1!==e[t].visible&&this.visibleFrozenRight++,this.frozenRightColumns.push(e[t]),this.frozenRightCount++):"Left"===e[t].freeze?(!1!==e[t].visible&&this.visibleFrozenLeft++,this.frozenLeftColumns.push(e[t]),this.frozenLeftCount++):(!1!==e[t].visible&&this.visibleMovable++,this.movableColumns.push(e[t]),this.movableCount++)},o.prototype.getVisibleFrozenColumns=function(){return this.getVisibleFrozenColumnsCount()+this.getVisibleFrozenCount(this.columns,0)},o.prototype.getFilterUIInfo=function(){return this.filterModule?this.filterModule.getFilterUIInfo():{}},o.prototype.getVisibleFrozenColumnsCount=function(){for(var e=0,t=this.columnModel,i=0;i<this.frozenColumns;i++)t[i].visible&&e++;if(this.frozenLeftCount||this.frozenRightCount)for(i=0;i<t.length;i++)!t[i].visible||"Left"!==t[i].freeze&&"Right"!==t[i].freeze||e++;return e},o.prototype.getVisibleFrozenCount=function(e,t){if(!this.frozenLeftCount&&!this.frozenRightCount)for(var i=0,r=e.length;i<r;i++)e[i].columns?t=this.getVisibleFrozenCount(e[i].columns,t):e[i].isFrozen&&e[i].visible&&t++;return t},o.prototype.getFrozenCount=function(e,t,i){for(var r=0,n=e.length;r<n;r++)e[r].columns?t=this.getFrozenCount(e[r].columns,t,i):(e[r].isFrozen&&i>this.frozenColumns-1&&t++,i++);return t},o.prototype.goToPage=function(e){this.pagerModule&&this.pagerModule.goToPage(e)},o.prototype.updateExternalMessage=function(e){this.pagerModule&&this.pagerModule.updateExternalMessage(e)},o.prototype.sortColumn=function(e,t,i){this.sortModule&&this.sortModule.sortColumn(e,t,i)},o.prototype.clearSorting=function(){this.sortModule&&this.sortModule.clearSorting()},o.prototype.removeSortColumn=function(e){this.sortModule&&this.sortModule.removeSortColumn(e)},o.prototype.filterByColumn=function(e,t,i,r,n,o,s,l){this.filterModule&&this.filterModule.filterByColumn(e,t,i,r,n,o,s,l)},o.prototype.clearFiltering=function(e){this.filterModule&&this.filterModule.clearFiltering(e)},o.prototype.removeFilteredColsByField=function(e,t){this.filterModule&&this.filterModule.removeFilteredColsByField(e,t)},o.prototype.selectRow=function(e,t){this.selectionModule&&this.selectionModule.selectRow(e,t)},o.prototype.selectRows=function(e){this.selectionModule&&this.selectionModule.selectRows(e)},o.prototype.clearSelection=function(){this.selectionModule&&this.selectionModule.clearSelection()},o.prototype.selectCell=function(e,t){this.selectionModule&&this.selectionModule.selectCell(e,t)},o.prototype.selectCellsByRange=function(e,t){this.selectionModule.selectCellsByRange(e,t)},o.prototype.search=function(e){this.searchModule&&this.searchModule.search(e)},o.prototype.print=function(){this.printModule&&this.printModule.print()},o.prototype.deleteRecord=function(e,t){this.editModule&&this.editModule.deleteRecord(e,t)},o.prototype.startEdit=function(){this.editModule&&this.editModule.startEdit()},o.prototype.endEdit=function(){this.editModule&&this.editModule.endEdit()},o.prototype.closeEdit=function(){this.editModule&&this.editModule.closeEdit()},o.prototype.addRecord=function(e,t){this.editModule&&this.editModule.addRecord(e,t)},o.prototype.deleteRow=function(e){this.editModule&&this.editModule.deleteRow(e)},o.prototype.editCell=function(e,t){this.editModule&&this.editModule.editCell(e,t)},o.prototype.saveCell=function(){this.editModule&&this.editModule.saveCell()},o.prototype.updateCell=function(e,t,i){this.editModule&&this.editModule.updateCell(e,t,i)},o.prototype.updateRow=function(e,t){this.editModule&&this.editModule.updateRow(e,t)},o.prototype.getBatchChanges=function(){return this.editModule?this.editModule.getBatchChanges():{}},o.prototype.enableToolbarItems=function(e,t){this.toolbarModule&&this.toolbarModule.enableItems(e,t)},o.prototype.copy=function(e){this.clipboardModule&&this.clipboardModule.copy(e)},o.prototype.recalcIndentWidth=function(){var e=this;if(this.getHeaderTable().querySelector(".e-emptycell")&&(this.groupSettings.columns.length||this.isDetail()||this.isRowDragable())&&!this.getHeaderTable().querySelector(".e-emptycell").getAttribute("indentRefreshed")&&this.getContentTable()){var t=this.getHeaderTable().querySelector(".e-emptycell").parentElement.offsetWidth,i=[].slice.call(this.getHeaderTable().querySelector(ji).childNodes),r=[].slice.call(this.getContentTable().querySelector(ji).childNodes),n=t/30,o="Right"===this.getFrozenMode()?this.frozenRightCount:0,s=this.element.offsetWidth,l=function(t,n){if(De(e)){var o=(n/s*100).toFixed(1)+"%";i[t].style.width=o,r[t].style.width=o}else i[t].style.width=n+"px",r[t].style.width=n+"px";e.notify("column-width-changed",{index:t,width:n})};for(n>=1&&(t=30/n),t<1&&(t=1),(this.enableColumnVirtualization||this.isAutoGen)&&(t=30);o<this.groupSettings.columns.length;)l(o,t),o++;this.isDetail()&&(l(o,t),o++),this.isRowDragable()&&l(o,t),this.isAutoGen=!1,this.getHeaderTable().querySelector(".e-emptycell").setAttribute("indentRefreshed","true")}},o.prototype.resetIndentWidth=function(){if(De(this)&&(this.getHeaderTable().querySelector(".e-emptycell").removeAttribute("indentRefreshed"),this.widthService.setWidthToColumns(),this.recalcIndentWidth()),("auto"===this.width||"string"==typeof this.width&&-1!==this.width.indexOf("%"))&&this.getColumns().filter(function(e){return(!e.width||"auto"===e.width)&&e.minWidth}).length>0){var e=this.widthService.getTableWidth(this.getColumns());this.widthService.setMinwidthBycalculation(e)}this.isFrozenGrid()&&this.widthService&&this.widthService.refreshFrozenScrollbar(),this.allowTextWrap&&"Content"!==this.textWrapSettings.wrapMode&&this.notify(gi,{})},o.prototype.isRowDragable=function(){return this.allowRowDragAndDrop&&!this.rowDropSettings.targetID},o.prototype.reorderColumns=function(e,t){this.reorderModule&&this.reorderModule.reorderColumns(e,t)},o.prototype.reorderColumnByIndex=function(e,t){this.reorderModule&&this.reorderModule.reorderColumnByIndex(e,t)},o.prototype.reorderColumnByTargetIndex=function(e,t){this.reorderModule&&this.reorderModule.reorderColumnByTargetIndex(e,t)},o.prototype.reorderRows=function(e,t){this.rowDragAndDropModule&&this.rowDragAndDropModule.reorderRows(e,t)},o.prototype.refreshDataSource=function(e){this.notify("refreshdataSource",e)},o.prototype.disableRowDD=function(e){var i=this.getHeaderTable(),r=this.getContentTable(),n=i.querySelectorAll("th.e-rowdragheader, th.e-mastercell"),o=this.getRows(),s=e?"none":"";t.setStyleAttribute(i.querySelector(ji).childNodes[0],{display:s}),t.setStyleAttribute(r.querySelector(ji).childNodes[0],{display:s});for(var l=0;l<this.getRows().length;l++){h=o[l].firstElementChild;e?t.addClass([h],"e-hide"):t.removeClass([h],["e-hide"])}for(var a=0;a<i.querySelectorAll("th.e-rowdragheader, th.e-mastercell").length;a++){var h=n[a];e?t.addClass([h],"e-hide"):t.removeClass([h],["e-hide"])}},o.prototype.autoFitColumns=function(e){this.resizeModule&&this.resizeModule.autoFitColumns(e)},o.prototype.createColumnchooser=function(e,t,i){this.columnChooserModule&&this.columnChooserModule.renderColumnChooser(e,t,i)},o.prototype.initializeServices=function(){this.serviceLocator.register("widthService",this.widthService=new Tr(this)),this.serviceLocator.register("cellRendererFactory",new xr),this.serviceLocator.register("rendererFactory",new Ir),this.serviceLocator.register("localization",this.localeObj=new t.L10n(this.getModuleName(),this.defaultLocale,this.locale)),this.serviceLocator.register("valueFormatter",this.valueFormatterService=new yt(this.locale)),this.serviceLocator.register("showHideService",this.showHider=new Qr(this)),this.serviceLocator.register("ariaService",this.ariaService=new er),this.serviceLocator.register("focus",this.focusModule=new Dr(this))},o.prototype.processModel=function(){var e,i,r=this.groupSettings.columns,n=this.sortSettings.columns;if(this.allowGrouping)for(var o=this,s=0,l=r.length;s<l;s++)!function(t,s){i=0;for(var l=n.length;i<l;i++)if(n[i].field===r[t]){e=!0;break}if(e?o.allowSorting?o.sortedColumns.push(n[i].field):n[i].direction="Ascending":n.push({field:r[t],direction:"Ascending",isFromGroup:!0}),!o.groupSettings.showGroupedColumn){var a=o.enableColumnVirtualization?o.columns.filter(function(e){return e.field===r[t]})[0]:o.getColumnByField(r[t]);a?a.visible=!1:o.log("initial_action",{moduleName:"group",columnName:r[t]})}}(s);if(!r.length)for(s=0;s<n.length;s++)this.sortedColumns.push(n[s].field);if(this.rowTemplateFn=x(this.rowTemplate),this.detailTemplateFn=x(this.detailTemplate),this.editTemplateFn=x(this.editSettings.template),this.editHeaderTemplateFn=x(this.editSettings.headerTemplate),this.editFooterTemplateFn=x(this.editSettings.footerTemplate),!t.isNullOrUndefined(this.parentDetails)){var a=t.isNullOrUndefined(this.parentDetails.parentKeyFieldValue)?"undefined":this.parentDetails.parentKeyFieldValue;this.query.where(this.queryString,"equal",a,!0)}this.initForeignColumn()},o.prototype.initForeignColumn=function(){this.isForeignKeyEnabled(this.getColumns())&&this.notify("initForeignKeyColumn",this.getForeignKeyColumns())},o.prototype.enableVerticalRendering=function(){"Vertical"===this.rowRenderingMode?this.element.classList.add("e-row-responsive"):this.element.classList.remove("e-row-responsive")},o.prototype.gridRender=function(){this.updateRTL(),"Vertical"===this.rowRenderingMode&&this.element.classList.add("e-row-responsive"),this.enableHover&&this.element.classList.add("e-gridhover"),t.Browser.isDevice&&this.element.classList.add("e-device"),this.rowHeight&&this.element.classList.add("e-grid-min-height"),t.classList(this.element,["e-responsive","e-default"],[]);var i=this.serviceLocator.getService("rendererFactory");this.headerModule=i.getRenderer(e.RenderType.Header),this.contentModule=i.getRenderer(e.RenderType.Content),this.printModule=new yn(this,this.scrollModule),this.clipboardModule=new en(this),this.renderModule.render(),this.eventInitializer(),this.createGridPopUpElement(),this.widthService.setWidthToColumns(),this.updateGridLines(),this.applyTextWrap(),this.createTooltip(),this.enableBoxSelection()},o.prototype.dataReady=function(){this.scrollModule.setWidth(),this.scrollModule.setHeight(),"auto"!==this.height&&this.scrollModule.setPadding()},o.prototype.updateRTL=function(){this.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")},o.prototype.createGridPopUpElement=function(){var e=this.createElement("div",{className:"e-gridpopup",styles:"display:none;"}),i=this.createElement("div",{className:Di,attrs:{tabIndex:"-1"}});t.append([i,this.createElement("div",{className:"e-uptail e-tail"})],e),i.appendChild(this.createElement("span")),t.append([i,this.createElement("div",{className:"e-downtail e-tail"})],e),this.element.appendChild(e)},o.prototype.updateGridLines=function(){switch(t.classList(this.element,[],["e-verticallines","e-horizontallines","e-hidelines","e-bothlines"]),this.gridLines){case"Horizontal":this.element.classList.add("e-horizontallines");break;case"Vertical":this.element.classList.add("e-verticallines");break;case"None":this.element.classList.add("e-hidelines");break;case"Both":this.element.classList.add("e-bothlines")}this.updateResizeLines()},o.prototype.updateResizeLines=function(){this.allowResizing&&"Vertical"!==this.gridLines&&"Both"!==this.gridLines?this.element.classList.add("e-resize-lines"):this.element.classList.remove("e-resize-lines")},o.prototype.applyTextWrap=function(){if(this.allowTextWrap){var e=[].slice.call(this.element.getElementsByClassName("e-columnheader"));switch(this.textWrapSettings.wrapMode){case"Header":J(this.element,!1),J(this.getContent(),!1),J(e,!0);break;case"Content":J(this.getContent(),!0),J(this.element,!1),J(e,!1);break;default:J(this.element,!0),J(this.getContent(),!1),J(e,!1)}"Content"!==this.textWrapSettings.wrapMode&&this.notify(gi,{})}},o.prototype.removeTextWrap=function(){J(this.element,!1),J([].slice.call(this.element.getElementsByClassName("e-columnheader")),!1),J(this.getContent(),!1),"Content"!==this.textWrapSettings.wrapMode&&this.notify(gi,{})},o.prototype.createTooltip=function(){this.toolTipObj=new r.Tooltip({opensOn:"custom",content:""},this.element)},o.prototype.freezeRefresh=function(){this.isFreezeRefresh=!0,this.enableVirtualization&&(this.pageSettings.currentPage=1),this.componentRefresh()},o.prototype.getTooltipStatus=function(e){var t=this.getHeaderTable(),i=this.createTable(t,"e-gridheader","header"),r=this.createTable(t,"e-gridheader","content"),n=e.classList.contains("e-headercell")?i:r,o=e.classList.contains("e-headercell")?"th":"tr";n.querySelector(o).className=e.className,n.querySelector(o).innerHTML=e.innerHTML;var s=n.querySelector(o).getBoundingClientRect().width;return document.body.removeChild(i),document.body.removeChild(r),s>e.getBoundingClientRect().width},o.prototype.mouseMoveHandler=function(e){if(this.isEllipsisTooltip()){var i=O(e.target,"e-ellipsistooltip");this.prevElement===i&&"mouseout"!==e.type||this.toolTipObj.close();var r=e.target.tagName,n=["A","BUTTON","INPUT"];if(i&&"mouseout"!==e.type&&(!t.Browser.isDevice||-1===n.indexOf(r))){if(i.getAttribute("aria-describedby"))return;this.getTooltipStatus(i)&&(i.getElementsByClassName("e-headertext").length?this.toolTipObj.content=i.getElementsByClassName("e-headertext")[0].innerText:this.toolTipObj.content=i.innerText,this.prevElement=i,this.toolTipObj.open(i))}}this.hoverFrozenRows(e)},o.prototype.hoverFrozenRows=function(e){if(this.isFrozenGrid()){var t=O(e.target,Oi);if([].slice.call(this.element.getElementsByClassName("e-frozenhover")).length&&"mouseout"===e.type)for(var i=[].slice.call(this.element.getElementsByClassName("e-frozenhover")),r=0;r<i.length;r++)i[r].classList.remove("e-frozenhover");else if(t){(i=[].slice.call(this.element.querySelectorAll('tr[aria-rowindex="'+t.getAttribute(Hi)+'"]'))).splice(i.indexOf(t),1);for(r=0;r<i.length;r++)"true"!==t.getAttribute("aria-selected")&&i[r]?i[r].classList.add("e-frozenhover"):i[r]&&i[r].classList.remove("e-frozenhover")}}},o.prototype.isEllipsisTooltip=function(){var e=this.getColumns();if("EllipsisWithTooltip"===this.clipMode)return!0;for(var t=0;t<e.length;t++)if("EllipsisWithTooltip"===e[t].clipMode)return!0;return!1},o.prototype.scrollHandler=function(){this.isEllipsisTooltip()&&this.toolTipObj.close()},o.prototype.createTable=function(e,t,i){var r=this.createElement("div");r.className=this.element.className,r.style.cssText="display: inline-block;visibility:hidden;position:absolute";var n=this.createElement("div");n.className=t;var o=this.createElement("table");o.className=e.className,o.style.cssText="table-layout: auto;width: auto";var s="header"===i?"th":"td",l=this.createElement("tr"),a=this.createElement(s);return l.appendChild(a),o.appendChild(l),n.appendChild(o),r.appendChild(n),document.body.appendChild(r),r},o.prototype.onKeyPressed=function(e){"tab"!==e.action&&"shiftTab"!==e.action||this.toolTipObj.close()},o.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.mouseClickHandler,this),t.EventHandler.add(this.element,"touchend",this.mouseClickHandler,this),t.EventHandler.add(this.element,"focusout",this.focusOutHandler,this),t.EventHandler.add(this.element,"dblclick",this.dblClickHandler,this),t.EventHandler.add(this.element,"keydown",this.keyPressHandler,this),t.EventHandler.add(window,"resize",this.resetIndentWidth,this),this.allowKeyboard&&(this.element.tabIndex=-1===this.element.tabIndex?0:this.element.tabIndex),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.getContent().firstElementChild,"scroll",this.scrollHandler,this),t.EventHandler.add(this.element,"mousemove",this.mouseMoveHandler,this),t.EventHandler.add(this.element,"mouseout",this.mouseMoveHandler,this),t.EventHandler.add(this.getContent(),"touchstart",this.tapEvent,this),t.EventHandler.add(document.body,"keydown",this.keyDownHandler,this)},o.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.mouseClickHandler),t.EventHandler.remove(this.element,"touchend",this.mouseClickHandler),t.EventHandler.remove(this.element,"focusout",this.focusOutHandler),t.EventHandler.remove(this.element,"dblclick",this.dblClickHandler),t.EventHandler.remove(this.getContent().firstElementChild,"scroll",this.scrollHandler),t.EventHandler.remove(this.element,"mousemove",this.mouseMoveHandler),t.EventHandler.remove(this.element,"mouseout",this.mouseMoveHandler),t.EventHandler.remove(this.element,"keydown",this.keyPressHandler),t.EventHandler.remove(this.getContent(),"touchstart",this.tapEvent),t.EventHandler.remove(document.body,"keydown",this.keyDownHandler),t.EventHandler.remove(window,"resize",this.resetIndentWidth)},o.prototype.addListener=function(){this.isDestroyed||(this.on(kt,this.dataReady,this),this.on(At,this.recalcIndentWidth,this),this.on(Ht,this.recalcIndentWidth,this),this.dataBoundFunction=this.refreshMediaCol.bind(this),this.addEventListener(Rt,this.dataBoundFunction),this.on(Vt,this.onKeyPressed,this))},o.prototype.removeListener=function(){this.isDestroyed||(this.off(kt,this.dataReady),this.off(At,this.recalcIndentWidth),this.off(Ht,this.recalcIndentWidth),this.removeEventListener(Rt,this.dataBoundFunction),this.off(Vt,this.onKeyPressed))},o.prototype.getCurrentViewRecords=function(){return ce(this)?t.isNullOrUndefined(this.currentViewData.records)?this.currentViewData:this.currentViewData.records:this.groupSettings.enableLazyLoading?this.currentViewData:this.allowGrouping&&this.groupSettings.columns.length&&this.currentViewData.length&&this.currentViewData.records?this.currentViewData.records:this.currentViewData},o.prototype.mouseClickHandler=function(e){if(!(this.isChildGrid(e)||O(e.target,"e-gridpopup")&&e.touches||this.element.getElementsByClassName("e-cloneproperties").length||this.checkEdit(e))&&((this.allowRowDragAndDrop||!O(e.target,Ri)&&"TD"!==e.target.tagName)&&(this.allowGrouping||this.allowReordering||!O(e.target,"e-gridheader"))||!e.touches)){O(e.target,"e-gridheader")&&this.allowRowDragAndDrop&&!O(e.target,"e-filterbarcell")&&e.preventDefault();var i=this.getRowInfo(e.target);i.cancel=!1;var r=!1,n=t.closest(e.target,"tr");if(n&&n.getAttribute("data-uid")){var o=this.getRowObjectFromUID(n.getAttribute("data-uid"));r=!!o&&o.isDataRow}r&&this.trigger("recordClick",i),this.notify(Gt,e)}},o.prototype.checkEdit=function(e){var t=O(e.target,Oi),i="Batch"!==this.editSettings.mode&&this.isEdit&&t&&(t.classList.contains(Ai)||t.classList.contains(Bi));return!O(e.target,"e-unboundcelldiv")&&(i||O(e.target,bi)&&O(e.target,bi).classList.contains("e-editedbatchcell"))},o.prototype.dblClickHandler=function(e){var i=O(e.target,"e-grid");if(!t.isNullOrUndefined(i)&&i.id===this.element.id&&!t.closest(e.target,".e-unboundcelldiv")){var r=!1,n=t.closest(e.target,"tr");if(n&&n.getAttribute("data-uid")){var o=this.getRowObjectFromUID(n.getAttribute("data-uid"));r=!!o&&o.isDataRow}var s=this.getRowInfo(e.target);s.target=e.target,r&&this.trigger("recordDoubleClick",s),this.notify("dblclick",e)}},o.prototype.focusOutHandler=function(e){if(!this.isChildGrid(e)){O(e.target,"e-grid")||(this.element.querySelector(".e-gridpopup").style.display="None");var i=this.element.querySelector(".e-cancel:not(.e-hide)");i&&i.classList.add("e-hide");var r=e.relatedTarget,n=r?r.getAttribute("aria-owns"):null;r&&(O(r,"e-grid")||(!t.isNullOrUndefined(n)&&n)===e.target.getAttribute("aria-owns"))||this.keyPress||!this.isEdit||t.Browser.isDevice||("Batch"===this.editSettings.mode&&(this.editModule.saveCell(),this.notify("editNextValCell",{})),"Normal"===this.editSettings.mode&&this.editModule.editFormValidate()),this.keyPress=!1}},o.prototype.isChildGrid=function(e){var t=O(e.target,"e-grid");return!(!t||t.id===this.element.id)},o.prototype.mergePersistGridData=function(e){var i=this.getLocalData();if(!t.isNullOrUndefined(i)&&""!==i||!t.isNullOrUndefined(e)){var r=t.isNullOrUndefined(e)?JSON.parse(i):e;this.enableVirtualization&&(r.pageSettings.currentPage=1);var n=Object.keys(r);this.isProtectedOnChange=!0;for(var o=0,s=n;o<s.length;o++){var l=s[o];"object"!=typeof this[l]||t.isNullOrUndefined(this[l])?this[l]=r[l]:Array.isArray(this[l])&&"columns"===l?(I(this[l]),this.mergeColumns(r[l],this[l]),this[l]=r[l]):t.extend(this[l],r[l])}this.isProtectedOnChange=!1}},o.prototype.mergeColumns=function(e,i){for(var r=e,n=this,o=0;o<r.length;o++)!function(e){var o=i.filter(function(t){return t.index===r[e].index})[0];t.isNullOrUndefined(o)||(o.columns&&o.columns.length?(n.mergeColumns(r[e].columns,o.columns),r[e]=t.extend(o,r[e],{},!0)):r[e]=t.extend(o,r[e],{},!0))}(o)},o.prototype.isDetail=function(){return!t.isNullOrUndefined(this.detailTemplate)||!t.isNullOrUndefined(this.childGrid)},o.prototype.isCommandColumn=function(e){var t=this;return e.some(function(e){return e.columns?t.isCommandColumn(e.columns):!(!e.commands&&!e.commandsTemplate)})},o.prototype.isForeignKeyEnabled=function(e){var t=this;return e.some(function(e){return e.columns?t.isForeignKeyEnabled(e.columns):!(!e.dataSource||!e.foreignKeyValue)})},o.prototype.keyPressHandler=function(e){var i=t.extend(e,{cancel:!1});this.trigger("keyPressed",i),!0===i.cancel&&e.stopImmediatePropagation()},o.prototype.keyDownHandler=function(e){e.altKey&&(74===e.keyCode&&(this.keyA?(this.notify("group-collapse",{target:e.target,collapse:!1}),this.keyA=!1):(this.focusModule.focusHeader(),this.focusModule.addOutline())),87===e.keyCode&&(this.focusModule.focusContent(),this.focusModule.addOutline()),65===e.keyCode&&(this.keyA=!0),72===e.keyCode&&this.keyA&&(this.notify("group-collapse",{target:e.target,collapse:!0}),this.keyA=!1)),13===e.keyCode&&this.notify("enter-key-handler",e)},o.prototype.keyActionHandler=function(e){this.isChildGrid(e)||this.isEdit&&"escape"!==e.action&&"enter"!==e.action&&"shiftEnter"!==e.action&&"tab"!==e.action&&"shiftTab"!==e.action||(this.keyPress=!0,this.allowKeyboard&&("ctrlPlusP"===e.action&&(e.preventDefault(),this.print()),this.notify(Vt,e)))},o.prototype.setInjectedModules=function(e){this.injectedModules=e},o.prototype.updateColumnObject=function(){T(this.columns,this.enableColumnVirtualization,this),I(this.columns),this.initForeignColumn(),this.notify(ei,{})},o.prototype.getForeignKeyColumns=function(){return this.getColumns().filter(function(e){return e.isForeignColumn()})},o.prototype.getRowHeight=function(){return this.rowHeight?this.rowHeight:V(this.element)},o.prototype.refreshColumns=function(){this.setFrozenCount();var e=this.getContent().querySelector(".e-frozen-left-content"),i=this.getContent().querySelector(".e-frozen-right-content"),r=!this.frozenRightCount&&!this.frozenLeftCount;if(!(0!==this.getFrozenColumns())&&(!e&&this.frozenLeftCount||!i&&this.frozenRightCount||e&&!this.frozenLeftCount||i&&!this.frozenRightCount))this.tableIndex=0,this.tablesCount=1,this.enableColumnVirtualization&&(this.columnModel=[],this.updateColumnModel(this.columns)),this.freezeRefresh();else if(r&&(1===this.getFrozenColumns()&&!e||0===this.getFrozenColumns()&&e))this.tableIndex=0,this.tablesCount=1,this.enableColumnVirtualization&&(this.columnModel=[],this.updateColumnModel(this.columns)),this.freezeRefresh();else if(this.isPreventScrollEvent=!0,this.updateColumnObject(),this.checkLockColumns(this.getColumns()),this.refresh(),this.isFrozenGrid()){var n=this.contentModule.getMovableContent().querySelector("."+Mi);t.remove(n.querySelector(ji));var o=this.getHeaderContent().querySelector("."+Ii).querySelector(ji).cloneNode(!0);if(n.insertBefore(o,n.querySelector(Ui)),"Left-Right"===this.getFrozenMode()){var s=this.contentModule.getFrozenRightContent().querySelector("."+Mi);t.remove(s.querySelector(ji));var l=this.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(ji).cloneNode(!0);s.insertBefore(l,s.querySelector(Ui))}}if(this.isFrozenGrid()){var a=this.getContent().querySelector(".e-movablescrollbar").scrollLeft;this.headerModule.getMovableHeader().scrollLeft=a,this.contentModule.getMovableContent().scrollLeft=a}},o.prototype.excelExport=function(e,t,i,r){return this.excelExportModule?this.excelExportModule.Map(this,e,t,i,!1,r):null},o.prototype.csvExport=function(e,t,i,r){return this.excelExportModule?this.excelExportModule.Map(this,e,t,i,!0,r):null},o.prototype.pdfExport=function(e,t,i,r){return this.pdfExportModule?this.pdfExportModule.Map(this,e,t,i,r):null},o.prototype.groupColumn=function(e){this.groupModule&&this.groupModule.groupColumn(e)},o.prototype.groupExpandAll=function(){this.groupModule&&this.groupModule.expandAll()},o.prototype.groupCollapseAll=function(){this.groupModule&&this.groupModule.collapseAll()},o.prototype.clearGrouping=function(){this.groupModule&&this.groupModule.clearGrouping()},o.prototype.ungroupColumn=function(e){this.groupModule&&this.groupModule.ungroupColumn(e)},o.prototype.openColumnChooser=function(e,t){this.columnChooserModule&&this.columnChooserModule.openColumnChooser(e,t)},o.prototype.scrollRefresh=function(){var e=this,t=function(){e.scrollModule.refresh(),e.off(At,t)};this.on(At,t,this)},o.prototype.detailCollapseAll=function(){this.detailRowModule&&this.detailRowModule.collapseAll()},o.prototype.detailExpandAll=function(){this.detailRowModule&&this.detailRowModule.expandAll()},o.prototype.clearCellSelection=function(){this.selectionModule&&this.selectionModule.clearCellSelection()},o.prototype.clearRowSelection=function(){this.selectionModule&&this.selectionModule.clearRowSelection()},o.prototype.selectCells=function(e){this.selectionModule&&this.selectionModule.selectCells(e)},o.prototype.selectRowsByRange=function(e,t){this.selectionModule&&this.selectionModule.selectRowsByRange(e,t)},o.prototype.isContextMenuOpen=function(){return this.contextMenuModule&&this.contextMenuModule.isOpen},o.prototype.ensureModuleInjected=function(e){return this.getInjectedModules().indexOf(e)>=0},o.prototype.destroyTemplate=function(e,t){this.clearTemplate(e,t)},o.prototype.log=function(e,t){this.loggerModule&&this.loggerModule.log(e,t)},o.prototype.applyBiggerTheme=function(e){this.element.classList.contains("e-bigger")&&e.classList.add("e-bigger")},o.prototype.getPreviousRowData=function(){return this.getRowsObject()[this.getRows().length-1].data},o.prototype.hideScroll=function(){var e=this.getContent().querySelector("."+Di),t=this.getContent().querySelector(".e-scrollbar");if(e.scrollHeight<=e.clientHeight&&(this.scrollModule.removePadding(),e.style.overflowY="auto"),this.isFrozenGrid()&&t){var i=this.getContent().querySelector(".e-movablescrollbar"),r=this.getContent().querySelector(".e-movablechild");t.style.display="flex",i.offsetWidth>=r.offsetWidth&&(t.style.display="none",this.notify("frozenHeight",0))}},o.prototype.getRowIndexByPrimaryKey=function(e){var t=this.getPrimaryKeyFieldNames()[0];e="object"==typeof e?e[t]:e;for(var i=this.getRowsObject(),r=0;r<i.length;r++)if(!i[r].isDetailRow&&!i[r].isCaptionRow){var n=i[r].data[t];if(t.split(".").length>1&&(n=Ke(t,i[r].data)),n===e)return i[r].index}return-1},o.prototype.grabColumnByFieldFromAllCols=function(e){var t;this.columnModel=[],this.updateColumnModel(this.columns);for(var i=this.columnModel,r=0;r<i.length;r++)e===i[r].field&&(t=i[r]);return t},o.prototype.grabColumnByUidFromAllCols=function(e){var t;this.columnModel=[],this.updateColumnModel(this.columns);for(var i=this.columnModel,r=0;r<i.length;r++)e===i[r].uid&&(t=i[r]);return t},o.prototype.getFilteredRecords=function(){if(this.allowFiltering&&this.filterSettings.columns.length){var e=this.renderModule.data.generateQuery(!0);return this.dataSource&&this.renderModule.data.isRemote()&&this.dataSource instanceof i.DataManager?this.renderModule.data.getData(this.dataSource,e):this.dataSource instanceof i.DataManager?this.dataSource.executeLocal(e):new i.DataManager(this.dataSource,e).executeLocal(e)}return[]},o.prototype.getUserAgent=function(){var e=t.Browser.userAgent.toLowerCase();return/iphone|ipod|ipad/.test(e)},o.prototype.tapEvent=function(t){this.getUserAgent()&&(e.Global.timer?(clearTimeout(e.Global.timer),e.Global.timer=null,this.dblClickHandler(t),this.notify("double-tap",t)):e.Global.timer=setTimeout(function(){e.Global.timer=null},300))},o.prototype.getRowUid=function(e){return""+e+this.rowUid++},o.prototype.getMovableVirtualContent=function(){return this.getContent().querySelector("."+Ei)},o.prototype.getFrozenVirtualContent=function(){return this.getContent().querySelector("."+Ti)},o.prototype.getMovableVirtualHeader=function(){return this.getHeaderContent().querySelector("."+Ii)},o.prototype.getFrozenVirtualHeader=function(){return this.getHeaderContent().querySelector("."+zi)},o.prototype.getRowElementByUID=function(e){var t,i=[];if(this.isFrozenGrid()){var r=[].slice.call(this.getFrozenVirtualContent().querySelector(Ui).children),n=[].slice.call(this.getMovableVirtualContent().querySelector(Ui).children),o=[];if(3===this.tablesCount&&(o=[].slice.call(this.getContent().querySelector(".e-frozen-right-content").querySelector(Ui).children)),this.frozenRows){if(i=[].slice.call(this.getFrozenVirtualHeader().querySelector(Ui).children),i=i.concat([].slice.call(this.getMovableVirtualHeader().querySelector(Ui).children)),3===this.tablesCount){var s=this.getHeaderContent().querySelector(".e-frozen-right-header");i=i.concat([].slice.call(s.querySelector(Ui).children)).concat(o)}i=i.concat(r).concat(n)}else i=r.concat(n).concat(o)}else{var l=[].slice.call(this.getContent().querySelector(Ui).children);i=this.frozenRows?(i=[].slice.call(this.getHeaderContent().querySelector(Ui).children)).concat(l):l}for(var a=0,h=i;a<h.length;a++){var d=h[a];if(d.getAttribute("data-uid")===e){t=d;break}}return t},o.prototype.getHiddenColumns=function(){for(var e=[],t=0,i=this.columnModel;t<i.length;t++){var r=i[t];!1===r.visible&&e.push(r)}return e},o.prototype.calculatePageSizeByParentHeight=function(e){if(this.allowPaging&&(this.allowTextWrap&&"Header"===this.textWrapSettings.wrapMode||!this.allowTextWrap)){var t=0;if(-1!==e.indexOf("%")&&(e=parseInt(e,10)/100*this.element.clientHeight),e>this.getNoncontentHeight()+this.getRowHeight()){t=(e-this.getNoncontentHeight())/this.getRowHeight()}if(t>0)return Math.floor(t)}return 0},o.prototype.getNoncontentHeight=function(){var e=0;if(t.isNullOrUndefined(this.getHeaderContent().clientHeight)||(e+=this.getHeaderContent().clientHeight),this.toolbar&&!t.isNullOrUndefined(this.element.querySelector(".e-toolbar").clientHeight)&&(e+=this.element.querySelector(".e-toolbar").clientHeight),this.allowPaging&&!t.isNullOrUndefined(this.element.querySelector(".e-gridpager").clientHeight)&&(e+=this.element.querySelector(".e-gridpager").clientHeight),this.showColumnChooser&&!t.isNullOrUndefined(this.element.querySelector(".e-columnheader").clientHeight)&&(e+=this.element.querySelector(".e-columnheader").clientHeight),this.allowGrouping&&this.groupSettings.showDropArea&&!t.isNullOrUndefined(this.element.querySelector(".e-groupdroparea").clientHeight)&&(e+=this.element.querySelector(".e-groupdroparea").clientHeight),this.aggregates.length>0&&!t.isNullOrUndefined(this.element.querySelector(".e-summaryrow").clientHeight))for(var i=0;i<this.element.getElementsByClassName("e-summaryrow").length;i++)e+=this.element.getElementsByClassName("e-summaryrow")[i].clientHeight;return e},o.prototype.getSummaryValues=function(e,t){return i.DataUtil.aggregates[e.type.toLowerCase()](t,e.field)},o.prototype.serverExcelExport=function(e){this.isExcel=!0,this.exportGrid(e)},o.prototype.serverPdfExport=function(e){this.isExcel=!1,this.exportGrid(e)},o.prototype.serverCsvExport=function(e){this.isExcel=!0,this.exportGrid(e)},o.prototype.exportGrid=function(e){var t=this.getDataModule().generateQuery(!0),r=(new i.UrlAdaptor).processQuery(new i.DataManager({url:""}),t),n=JSON.parse(r.data),o=JSON.parse(this.addOnPersist(["allowGrouping","allowPaging","pageSettings","sortSettings","allowPdfExport","allowExcelExport","aggregates","filterSettings","groupSettings","columns","locale","searchSettings"])),s=["field","headerText","type","format","visible","foreignKeyValue","foreignKeyField","template","index","width","textAlign","headerTextAlign","columns"];o.filterSettings.columns=n.where,o.searchSettings.fields=n.search&&n.search[0].fields||[],o.sortSettings.columns=n.sorted,o.columns=this.setHeaderText(o.columns,s);var l=this.createElement("form",{id:"ExportForm",styles:"display:none;"}),a=this.createElement("input",{id:"gridInput",attrs:{name:"gridModel"}});a.value=JSON.stringify(o),l.method="POST",l.action=e,l.appendChild(a),document.body.appendChild(l),l.submit(),l.remove()},o.prototype.setHeaderText=function(e,i){for(var r=0;r<e.length;r++){var n=this.getColumnByUid(e[r].uid);e[r].headerText=n.headerText,t.isNullOrUndefined(n.template)||(e[r].template="true"),e[r].format&&(e[r].format=_e(this.getFormat(e[r].format),e[r].type,this.isExcel)),e[r].columns&&this.setHeaderText(e[r].columns,i);for(var o=Object.keys(e[r]),s=0;s<o.length;s++)i.indexOf(o[s])<0&&delete e[r][o[s]]}return e},o.prototype.getFormat=function(e){return"object"==typeof e?t.isNullOrUndefined(e.format)?e.skeleton:e.format:e},o.prototype.isCollapseStateEnabled=function(){return!1===this.isExpanded},o.prototype.updateRowValue=function(e,t){var i={requestType:"save",data:t};this.showSpinner(),this.notify(ti,i),this.refresh()},o.prototype.setForeignKeyData=function(){this.dataBind();var e=this.getDataModule().getForeignKeyDataState();e.isPending?(this.getDataModule().setForeignKeyDataState({}),e.resolver()):(this.getDataModule().setForeignKeyDataState({isDataChanged:!1}),(this.contentModule||this.headerModule)&&this.renderModule.render())},o.prototype.resetFilterDlgPosition=function(e){var t=this.getColumnHeaderByField(e);if(t){var i=t.querySelector(".e-filtermenudiv"),r=this.element.querySelector(".e-filter-popup");if(i&&r){var n=this.element.getBoundingClientRect(),o=i.getBoundingClientRect();r&&(r.style.left=(o.right-n.left).toString()+"px")}}},o.prototype.renderTemplates=function(){this.notify("reactTemplateRender",this.portals),this.renderReactTemplates()},o.prototype.batchUpdate=function(e){this.processRowChanges(e)},o.prototype.batchAsyncUpdate=function(e){this.processBulkRowChanges(e)},o.prototype.processBulkRowChanges=function(e){var t=this;if(this.dataToBeUpdated)for(var i=["addedRecords","changedRecords","deletedRecords"],r=this.getPrimaryKeyFieldNames()[0],n=0;n<i.length;n++)e[i[n]]&&Oe(this,e,i[n],r);else this.dataToBeUpdated=Object.assign({addedRecords:[],changedRecords:[],deletedRecords:[]},e),setTimeout(function(){t.processRowChanges(t.dataToBeUpdated),t.dataToBeUpdated=null},this.asyncTimeOut)},o.prototype.processRowChanges=function(e){var t=this,i=this.getPrimaryKeyFieldNames()[0];e=Object.assign({addedRecords:[],changedRecords:[],deletedRecords:[]},e);var r=this.getDataModule().saveChanges(e,i,{},this.getDataModule().generateQuery().requiresCount());this.getDataModule().isRemote()?r.then(function(){t.setNewData()}):this.setNewData()},o.prototype.setNewData=function(){var e=this,t=JSON.parse(JSON.stringify(this.getCurrentViewRecords()));this.getDataModule().getData({},this.getDataModule().generateQuery().requiresCount()).then(function(i){e.bulkRefresh(i.result,t,i.count)})},o.prototype.deleteRowElement=function(e){var i=this.getRowElementByUID(e.uid),r=parseInt(i.getAttribute(Hi),10);if(t.remove(i),this.getFrozenColumns()){var n=this.getMovableRows()[r];t.remove(n)}},o.prototype.bulkRefresh=function(e,t,i){for(var r,n=this,o=this.getRowsObject(),s=this.getPrimaryKeyFieldNames()[0],l=this,a=0;a<o.length;a++)!function(t){e.filter(function(e){return e[s]===o[t].data[s]}).length||(l.deleteRowElement(o[t]),o.splice(t,1),t--),r=t}(a),a=r;for(var h=this,a=0;a<e.length;a++)!function(i){var r;t.filter(function(t){t[s]===e[i][s]&&(t!==e[i]&&n.setRowData(e[i][s],e[i]),r=!0)}),r||h.renderRowElement(e[i],i)}(a);this.currentViewData=e;var d=[].slice.call(this.getContentTable().getElementsByClassName(Oi));Me(this,this.getRowsObject(),d),ke(this),this.allowPaging&&this.notify(Nt,{module:"pager",properties:{totalRecordsCount:i}})},o.prototype.renderRowElement=function(e,t){var i,r=new Vi(this.serviceLocator,null,this),n=new Gi(this).generateRows([e]),o=r.render(n[0],this.getColumns());this.addRowObject(n[0],t);var s=this.getContentTable().querySelector(Ui);if(s.querySelector(".e-emptyrow")){var l=s.querySelector(".e-emptyrow");if(l.parentNode.removeChild(l),this.getFrozenColumns()){var a=this.getContent().querySelector("."+Ei).querySelector(Ui);a.firstElementChild.parentNode.removeChild(a.firstElementChild)}}this.getFrozenColumns()&&(i=de(o,this.getFrozenColumns(),this),(this.frozenRows&&t<this.frozenRows?this.getHeaderContent().querySelector("."+Ii).querySelector(Ui):this.getContent().querySelector("."+Ei).querySelector(Ui)).appendChild(i),"auto"===this.height&&this.notify("frozenHeight",{})),s=this.frozenRows&&t<this.frozenRows?this.getHeaderContent().querySelector(Ui):this.getContent().querySelector(Ui),(s=this.getContent().querySelector(Ui)).appendChild(o)},o.prototype.addRowObject=function(e,t){var i=this.getFrozenColumns();if(i){var r=this.getMovableRowsObject(),n=e.clone();n.cells=n.cells.slice(i),e.cells=e.cells.slice(0,i),r.splice(t,1,n)}this.getRowsObject().splice(t,1,e)},o.prototype.getHeight=function(e){return e=Number.isInteger(e)||-1===e.indexOf("%")?Number.isInteger(e)||"auto"===this.height?this.height:parseInt(e,10):parseInt(e,10)/100*this.element.clientHeight},o.prototype.getFrozenRightContent=function(){return this.getContent().querySelector(".e-frozen-right-content")},o.prototype.getFrozenRightHeader=function(){return this.getHeaderContent().querySelector(".e-frozen-right-header")},o.prototype.getMovableHeaderTbody=function(){return this.getMovableVirtualHeader().querySelector(Ui)},o.prototype.getMovableContentTbody=function(){return this.getMovableVirtualContent().querySelector(Ui)},o.prototype.getFrozenHeaderTbody=function(){return this.getFrozenVirtualHeader().querySelector(Ui)},o.prototype.getFrozenLeftContentTbody=function(){return this.getFrozenVirtualContent().querySelector(Ui)},o.prototype.getFrozenRightHeaderTbody=function(){return this.getFrozenRightHeader().querySelector(Ui)},o.prototype.getFrozenRightContentTbody=function(){var e;return this.getFrozenRightContent()&&(e=this.getFrozenRightContent().querySelector(Ui)),e},o.prototype.showResponsiveCustomFilter=function(e){this.filterModule&&this.filterModule.showCustomFilter(e||"Vertical"===this.rowRenderingMode)},o.prototype.showResponsiveCustomSort=function(e){this.sortModule&&this.sortModule.showCustomSort(e||"Vertical"===this.rowRenderingMode)},o.prototype.showAdaptiveFilterDialog=function(){this.enableAdaptiveUI&&this.showResponsiveCustomFilter(!0)},o.prototype.showAdaptiveSortDialog=function(){this.enableAdaptiveUI&&this.showResponsiveCustomSort(!0)},o.prototype.getCurrentVisibleColumns=function(e){for(var t=[],i=0,r=e?this.getColumns():this.columnModel;i<r.length;i++){var n=r[i];n.visible&&t.push(n)}return t};var s;return rn([t.Property()],o.prototype,"parentDetails",void 0),rn([t.Property([])],o.prototype,"columns",void 0),rn([t.Property(!0)],o.prototype,"enableAltRow",void 0),rn([t.Property(!0)],o.prototype,"enableHover",void 0),rn([t.Property(!1)],o.prototype,"enableAutoFill",void 0),rn([t.Property(!0)],o.prototype,"allowKeyboard",void 0),rn([t.Property(!1)],o.prototype,"allowTextWrap",void 0),rn([t.Complex({},pn)],o.prototype,"textWrapSettings",void 0),rn([t.Complex({},un)],o.prototype,"resizeSettings",void 0),rn([t.Property(!1)],o.prototype,"allowPaging",void 0),rn([t.Complex({},Ur)],o.prototype,"pageSettings",void 0),rn([t.Property(!1)],o.prototype,"enableVirtualization",void 0),rn([t.Property(!1)],o.prototype,"enableColumnVirtualization",void 0),rn([t.Property(!1)],o.prototype,"enableInfiniteScrolling",void 0),rn([t.Complex({},dn)],o.prototype,"searchSettings",void 0),rn([t.Property(!1)],o.prototype,"allowSorting",void 0),rn([t.Property("Ellipsis")],o.prototype,"clipMode",void 0),rn([t.Property(!0)],o.prototype,"allowMultiSorting",void 0),rn([t.Property(!1)],o.prototype,"allowExcelExport",void 0),rn([t.Property(!1)],o.prototype,"allowPdfExport",void 0),rn([t.Complex({},on)],o.prototype,"sortSettings",void 0),rn([t.Complex({},ln)],o.prototype,"infiniteScrollSettings",void 0),rn([t.Property(!0)],o.prototype,"allowSelection",void 0),rn([t.Property(-1)],o.prototype,"selectedRowIndex",void 0),rn([t.Complex({},hn)],o.prototype,"selectionSettings",void 0),rn([t.Property(!1)],o.prototype,"allowFiltering",void 0),rn([t.Property("Horizontal")],o.prototype,"rowRenderingMode",void 0),rn([t.Property(!1)],o.prototype,"enableAdaptiveUI",void 0),rn([t.Property(!1)],o.prototype,"allowReordering",void 0),rn([t.Property(!1)],o.prototype,"allowResizing",void 0),rn([t.Property(!1)],o.prototype,"allowRowDragAndDrop",void 0),rn([t.Complex({},cn)],o.prototype,"rowDropSettings",void 0),rn([t.Complex({},an)],o.prototype,"filterSettings",void 0),rn([t.Property(!1)],o.prototype,"allowGrouping",void 0),rn([t.Property(!1)],o.prototype,"enableImmutableMode",void 0),rn([t.Property(!1)],o.prototype,"showColumnMenu",void 0),rn([t.Complex({},gn)],o.prototype,"groupSettings",void 0),rn([t.Complex({},fn)],o.prototype,"editSettings",void 0),rn([t.Collection([],$r)],o.prototype,"aggregates",void 0),rn([t.Property(!1)],o.prototype,"showColumnChooser",void 0),rn([t.Complex({},Gr)],o.prototype,"columnChooserSettings",void 0),rn([t.Property(!1)],o.prototype,"enableHeaderFocus",void 0),rn([t.Property("auto")],o.prototype,"height",void 0),rn([t.Property("auto")],o.prototype,"width",void 0),rn([t.Property("Default")],o.prototype,"gridLines",void 0),rn([t.Property()],o.prototype,"rowTemplate",void 0),rn([t.Property()],o.prototype,"detailTemplate",void 0),rn([t.Property()],o.prototype,"childGrid",void 0),rn([t.Property()],o.prototype,"queryString",void 0),rn([t.Property("AllPages")],o.prototype,"printMode",void 0),rn([t.Property("Expanded")],o.prototype,"hierarchyPrintMode",void 0),rn([t.Property([])],o.prototype,"dataSource",void 0),rn([t.Property(null)],o.prototype,"rowHeight",void 0),rn([t.Property()],o.prototype,"query",void 0),rn([t.Property("USD")],o.prototype,"currencyCode",void 0),rn([t.Property()],o.prototype,"toolbar",void 0),rn([t.Property()],o.prototype,"contextMenuItems",void 0),rn([t.Property()],o.prototype,"columnMenuItems",void 0),rn([t.Property()],o.prototype,"toolbarTemplate",void 0),rn([t.Property()],o.prototype,"pagerTemplate",void 0),rn([t.Property(0)],o.prototype,"frozenRows",void 0),rn([t.Property(0)],o.prototype,"frozenColumns",void 0),rn([t.Property("All")],o.prototype,"columnQueryMode",void 0),rn([t.Property({})],o.prototype,"currentAction",void 0),rn([t.Property("19.2.46")],o.prototype,"ej2StatePersistenceVersion",void 0),rn([t.Event()],o.prototype,"created",void 0),rn([t.Event()],o.prototype,"destroyed",void 0),rn([t.Event()],o.prototype,"load",void 0),rn([t.Event()],o.prototype,"rowDataBound",void 0),rn([t.Event()],o.prototype,"queryCellInfo",void 0),rn([t.Event()],o.prototype,"headerCellInfo",void 0),rn([t.Event()],o.prototype,"actionBegin",void 0),rn([t.Event()],o.prototype,"actionComplete",void 0),rn([t.Event()],o.prototype,"actionFailure",void 0),rn([t.Event()],o.prototype,"dataBound",void 0),rn([t.Event()],o.prototype,"recordDoubleClick",void 0),rn([t.Event()],o.prototype,"recordClick",void 0),rn([t.Event()],o.prototype,"rowSelecting",void 0),rn([t.Event()],o.prototype,"rowSelected",void 0),rn([t.Event()],o.prototype,"rowDeselecting",void 0),rn([t.Event()],o.prototype,"rowDeselected",void 0),rn([t.Event()],o.prototype,"cellSelecting",void 0),rn([t.Event()],o.prototype,"cellSelected",void 0),rn([t.Event()],o.prototype,"cellDeselecting",void 0),rn([t.Event()],o.prototype,"cellDeselected",void 0),rn([t.Event()],o.prototype,"columnSelecting",void 0),rn([t.Event()],o.prototype,"columnSelected",void 0),rn([t.Event()],o.prototype,"columnDeselecting",void 0),rn([t.Event()],o.prototype,"columnDeselected",void 0),rn([t.Event()],o.prototype,"columnDragStart",void 0),rn([t.Event()],o.prototype,"columnDrag",void 0),rn([t.Event()],o.prototype,"columnDrop",void 0),rn([t.Event()],o.prototype,"printComplete",void 0),rn([t.Event()],o.prototype,"beforePrint",void 0),rn([t.Event()],o.prototype,"pdfQueryCellInfo",void 0),rn([t.Event()],o.prototype,"pdfHeaderQueryCellInfo",void 0),rn([t.Event()],o.prototype,"pdfAggregateQueryCellInfo",void 0),rn([t.Event()],o.prototype,"excelAggregateQueryCellInfo",void 0),rn([t.Event()],o.prototype,"exportDetailDataBound",void 0),rn([t.Event()],o.prototype,"excelQueryCellInfo",void 0),rn([t.Event()],o.prototype,"excelHeaderQueryCellInfo",void 0),rn([t.Event()],o.prototype,"beforeExcelExport",void 0),rn([t.Event()],o.prototype,"excelExportComplete",void 0),rn([t.Event()],o.prototype,"beforePdfExport",void 0),rn([t.Event()],o.prototype,"pdfExportComplete",void 0),rn([t.Event()],o.prototype,"rowDragStartHelper",void 0),rn([t.Event()],o.prototype,"detailDataBound",void 0),rn([t.Event()],o.prototype,"rowDragStart",void 0),rn([t.Event()],o.prototype,"rowDrag",void 0),rn([t.Event()],o.prototype,"rowDrop",void 0),rn([t.Event()],o.prototype,"toolbarClick",void 0),rn([t.Event()],o.prototype,"beforeOpenColumnChooser",void 0),rn([t.Event()],o.prototype,"beforeOpenAdaptiveDialog",void 0),rn([t.Event()],o.prototype,"batchAdd",void 0),rn([t.Event()],o.prototype,"batchDelete",void 0),rn([t.Event()],o.prototype,"batchCancel",void 0),rn([t.Event()],o.prototype,"beforeBatchAdd",void 0),rn([t.Event()],o.prototype,"beforeBatchDelete",void 0),rn([t.Event()],o.prototype,"beforeBatchSave",void 0),rn([t.Event()],o.prototype,"beginEdit",void 0),rn([t.Event()],o.prototype,"commandClick",void 0),rn([t.Event()],o.prototype,"cellEdit",void 0),rn([t.Event()],o.prototype,"cellSave",void 0),rn([t.Event()],o.prototype,"cellSaved",void 0),rn([t.Event()],o.prototype,"resizeStart",void 0),rn([t.Event()],o.prototype,"resizing",void 0),rn([t.Event()],o.prototype,"resizeStop",void 0),rn([t.Event()],o.prototype,"keyPressed",void 0),rn([t.Event()],o.prototype,"beforeDataBound",void 0),rn([t.Event()],o.prototype,"contextMenuOpen",void 0),rn([t.Event()],o.prototype,"contextMenuClick",void 0),rn([t.Event()],o.prototype,"columnMenuOpen",void 0),rn([t.Event()],o.prototype,"columnMenuClick",void 0),rn([t.Event()],o.prototype,"checkBoxChange",void 0),rn([t.Event()],o.prototype,"beforeCopy",void 0),rn([t.Event()],o.prototype,"beforePaste",void 0),rn([t.Event()],o.prototype,"beforeAutoFill",void 0),rn([t.Event()],o.prototype,"columnDataStateChange",void 0),rn([t.Event()],o.prototype,"dataStateChange",void 0),rn([t.Event()],o.prototype,"dataSourceChanged",void 0),rn([t.Event()],o.prototype,"exportGroupCaption",void 0),rn([t.Event()],o.prototype,"lazyLoadGroupExpand",void 0),rn([t.Event()],o.prototype,"lazyLoadGroupCollapse",void 0),o=s=rn([t.NotifyPropertyChanges],o)}(t.Component),yn=function(){function e(e,t){this.isAsyncPrint=!1,this.defered=new i.Deferred,this.parent=e,this.parent.isDestroyed||(this.parent.on(At,this.isContentReady(),this),this.parent.addEventListener(bt,this.actionBegin.bind(this)),this.parent.on(Pt,this.onEmpty.bind(this)),this.parent.on(si,this.hierarchyPrint,this),this.scrollModule=t)}return e.prototype.isContentReady=function(){var e=this;return!this.isPrintGrid()||"None"!==this.parent.hierarchyPrintMode&&this.parent.childGrid?function(){e.defered.promise.then(function(){e.contentReady()}),e.isPrintGrid()&&e.hierarchyPrint()}:this.contentReady},e.prototype.hierarchyPrint=function(){this.removeColGroup(this.parent);var e=window.printGridObj;e&&!e.element.querySelector("[aria-busy=true")&&e.printModule.defered.resolve()},e.prototype.print=function(){this.renderPrintGrid(),this.printWind=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWind.moveTo(0,0),this.printWind.resizeTo(screen.availWidth,screen.availHeight)},e.prototype.onEmpty=function(){this.isPrintGrid()&&this.contentReady()},e.prototype.actionBegin=function(){this.isPrintGrid()&&(this.isAsyncPrint=!0)},e.prototype.renderPrintGrid=function(){var e=this.parent,i=t.createElement("div",{id:this.parent.element.id+"_print",className:e.element.className+" e-print-grid"});i.classList.remove("e-gridhover"),document.body.appendChild(i);var r=new mn(fe(e,e.hierarchyPrintMode));if(e.isFrozenGrid()&&!e.getFrozenColumns())for(var n=0;n<r.columns.length;n++)r.columns[n]=t.extend({},r.columns[n]),r.columns[n].freeze=void 0;this.parent.isAngular&&(r.viewContainerRef=this.parent.viewContainerRef),r.load=function(){},r.query=e.getQuery().clone(),window.printGridObj=r,r.isPrinting=!0;var o=r.getInjectedModules(),s=e.getInjectedModules();o&&o.length===s.length||r.setInjectedModules(s),e.notify("printGrid-Init",{element:i,printgrid:r}),this.parent.log("exporting_begin",this.getModuleName()),r.registeredTemplate=this.parent.registeredTemplate,r.appendTo(i),r.trigger=e.trigger},e.prototype.contentReady=function(){if(this.isPrintGrid()){var e=this.parent;if(this.isAsyncPrint)return void this.printGrid();var i={requestType:"print",element:e.element,selectedRows:e.getContentTable().querySelectorAll('tr[aria-selected="true"]'),cancel:!1,hierarchyPrintMode:e.hierarchyPrintMode};if(this.isAsyncPrint||e.trigger("beforePrint",i),i.cancel)return void t.detach(e.element);this.isAsyncPrint||this.printGrid()}},e.prototype.printGrid=function(){var e=this.parent;if("auto"!==e.height){var i=this.scrollModule.getCssProperties(),r=e.element.querySelector("."+Di),n=e.element.querySelector("."+Si);r.style.height="auto",r.style.overflowY="auto",n.style[i.padding]="",n.firstElementChild.style[i.border]=""}e.allowGrouping&&(e.groupSettings.columns.length?this.removeColGroup(e):e.element.querySelector(".e-groupdroparea").style.display="none");for(var o=0,s=[].slice.call(e.element.getElementsByClassName(Di));o<s.length;o++)(d=s[o]).style.overflowX="hidden";for(var l=[].slice.call(e.element.getElementsByClassName("e-spin-show")),a=0,h=[].slice.call(l);a<h.length;a++){var d=h[a];t.classList(d,["e-spin-hide"],["e-spin-show"])}this.printGridElement(e),e.isPrinting=!1,delete window.printGridObj;var c={element:e.element};e.trigger("printComplete",c),this.parent.log("exporting_complete",this.getModuleName())},e.prototype.printGridElement=function(e){t.classList(e.element,["e-print-grid-layout"],["e-print-grid"]),e.isPrinting&&t.detach(e.element),this.printWind=t.print(e.element,this.printWind)},e.prototype.removeColGroup=function(e){var i=e.groupSettings.columns.length,r=e.element,n="#"+e.element.id;if(i){for(var o=t.selectAll(n+"captioncell.e-groupcaption",r),s=o[i-1].getAttribute("colspan"),l=0;l<o.length;l++)o[l].setAttribute("colspan",s);var a=t.selectAll("colgroup"+n+"colGroup",r),h=t.selectAll(".e-content colgroup",r);this.hideColGroup(a,i),this.hideColGroup(h,i)}},e.prototype.hideColGroup=function(e,t){for(var i=0;i<e.length;i++)for(var r=0;r<t;r++)e[i].children[r].style.display="none"},e.prototype.isPrintGrid=function(){return this.parent.element.id.indexOf("_print")>0&&this.parent.isPrinting},e.prototype.destroy=function(){this.parent.isDestroyed||(this.parent.off(At,this.contentReady.bind(this)),this.parent.removeEventListener(bt,this.actionBegin.bind(this)),this.parent.off(Pt,this.onEmpty.bind(this)),this.parent.off(si,this.hierarchyPrint))},e.prototype.getModuleName=function(){return"print"},e.printGridProp=["aggregates","allowGrouping","allowFiltering","allowMultiSorting","allowReordering","allowSorting","allowTextWrap","childGrid","columns","currentViewData","dataSource","detailTemplate","enableAltRow","enableColumnVirtualization","filterSettings","gridLines","groupSettings","height","locale","pageSettings","printMode","query","queryString","enableRtl","rowHeight","rowTemplate","sortSettings","textWrapSettings","allowPaging","hierarchyPrintMode","searchSettings","queryCellInfo","beforeDataBound"].concat(["beforePrint","printComplete","load"]),e}(),vn=0,Cn=0,wn=null;!function(e){e.timer=null}(e.Global||(e.Global={}));var bn=function(){function e(e){this.existingPredicate={},this.foreignKeyQuery=new i.Query,this.filterState=!0,this.values={},this.renderEmpty=!1,this.parent=e,this.id=this.parent.element.id,this.valueFormatter=new yt(this.parent.locale),this.cBoxTrue=n.createCheckBox(this.parent.createElement,!1,{checked:!0,label:" "}),this.cBoxFalse=n.createCheckBox(this.parent.createElement,!1,{checked:!1,label:" "}),this.cBoxTrue.insertBefore(this.parent.createElement("input",{className:"e-chk-hidden",attrs:{type:"checkbox"}}),this.cBoxTrue.firstChild),this.cBoxFalse.insertBefore(this.parent.createElement("input",{className:"e-chk-hidden",attrs:{type:"checkbox"}}),this.cBoxFalse.firstChild),this.cBoxFalse.querySelector(".e-frame").classList.add("e-uncheck"),this.parent.enableRtl&&t.addClass([this.cBoxTrue,this.cBoxFalse],["e-rtl"])}return e.prototype.destroy=function(){this.closeDialog()},e.prototype.wireEvents=function(){t.EventHandler.add(this.dlg,"click",this.clickHandler,this),t.EventHandler.add(this.dlg,"keyup",this.keyupHandler,this),this.searchHandler=t.debounce(this.searchBoxKeyUp,200);var e=this.dialogObj.element.querySelector(".e-searchinput");e&&t.EventHandler.add(e,"keyup",this.searchHandler,this)},e.prototype.unWireEvents=function(){t.EventHandler.remove(this.dlg,"click",this.clickHandler),t.EventHandler.remove(this.dlg,"keyup",this.keyupHandler);var e=this.dialogObj.element.querySelector(".e-searchinput");e&&t.EventHandler.remove(e,"keyup",this.searchHandler)},e.prototype.foreignKeyFilter=function(e,t,i){var r=this,n={},o=[],s=this.foreignKeyQuery.clone();this.options.column.dataSource.executeQuery(s.where(i)).then(function(i){r.options.column.columnData=i.result,r.parent.notify("generateQuery",{predicate:n,column:r.options.column}),e.ejpredicate=n.predicate.predicates;for(var s=n.predicate.predicates,l=0;l<s.length;l++)o.push({field:s[l].field,predicate:"or",matchCase:s[l].ignoreCase,ignoreAccent:s[l].ignoreAccent,operator:s[l].operator,value:s[l].value,type:r.options.type});e.filterCollection=o.length?o:t.filter(function(e){return e.field=r.options.field}),r.options.handler(e)})},e.prototype.foreignFilter=function(e,t){var r=this.options.isRemote?"string"===this.options.column.type?"contains":"equal":this.options.column.type?"contains":"equal",n=new i.Predicate(this.options.column.foreignKeyValue,r,t,!0,this.options.ignoreAccent);this.foreignKeyFilter(e,[e.filterCollection],n)},e.prototype.searchBoxClick=function(e){e.target.classList.contains("e-searchclear")&&(this.sInput.value="",this.refreshCheckboxes(),this.updateSearchIcon(),this.sInput.focus())},e.prototype.searchBoxKeyUp=function(e){this.refreshCheckboxes(),this.updateSearchIcon()},e.prototype.updateSearchIcon=function(){this.sInput.value.length?t.classList(this.sIcon,["e-chkcancel-icon"],["e-search-icon"]):t.classList(this.sIcon,["e-search-icon"],["e-chkcancel-icon"])},e.prototype.getLocalizedLabel=function(e){return this.localeObj.getConstant(e)},e.prototype.updateDataSource=function(){var e=this.options.dataSource;if(!(e instanceof i.DataManager))for(var t=0;t<e.length;t++)if("object"!=typeof e){var r={};r[this.options.field]=e[t],e[t]=r}},e.prototype.updateModel=function(e){this.options=e,this.existingPredicate=e.actualPredicate||{},this.options.dataSource=e.dataSource,this.options.dataManager=e.dataManager?e.dataManager:e.dataSource,this.updateDataSource(),this.options.type=e.type,this.options.format=e.format||"",this.options.ignoreAccent=e.ignoreAccent||!1,this.options.filteredColumns=e.filteredColumns||this.parent.filterSettings.columns,this.options.query=e.query||new i.Query,this.options.allowCaseSensitive=e.allowCaseSensitive||!1,this.options.uid=e.column.uid,this.values={},this.localeObj=e.localeObj,this.isFiltered=e.filteredColumns.length},e.prototype.getAndSetChkElem=function(e){if(this.dlg=this.parent.createElement("div",{id:this.id+this.options.type+"_excelDlg",attrs:{uid:this.options.column.uid},className:"e-checkboxfilter e-filter-popup"}),this.sBox=this.parent.createElement("div",{className:"e-searchcontainer"}),!e.hideSearchbox){this.sInput=this.parent.createElement("input",{id:this.id+"_SearchBox",className:"e-searchinput"}),this.sIcon=this.parent.createElement("span",{className:"e-searchclear e-search-icon e-icons e-input-group-icon",attrs:{type:"text",title:this.getLocalizedLabel("Search")}}),this.searchBox=this.parent.createElement("span",{className:"e-searchbox e-fields"}),this.searchBox.appendChild(this.sInput),this.sBox.appendChild(this.searchBox);var t={element:this.sInput,floatLabelType:"Never",properties:{placeholder:this.getLocalizedLabel("Search")}};o.Input.createInput(t,this.parent.createElement),this.searchBox.querySelector(".e-input-group").appendChild(this.sIcon)}return this.spinner=this.parent.createElement("div",{className:"e-spinner"}),this.cBox=this.parent.createElement("div",{id:this.id+this.options.type+"_CheckBoxList",className:"e-checkboxlist e-fields"}),this.spinner.appendChild(this.cBox),this.sBox.appendChild(this.spinner),this.sBox},e.prototype.showDialog=function(e){var i={requestType:"filterbeforeopen",columnName:this.options.field,columnType:this.options.type,cancel:!1};if(i.filterModel=this,this.parent.notify("cbox-filter-begin",i),!i.cancel){this.dialogObj=new r.Dialog({visible:!1,content:this.sBox,close:this.closeDialog.bind(this),enableRtl:this.parent.enableRtl,width:!t.isNullOrUndefined(O(e.target,"e-bigger"))||this.parent.element.classList.contains("e-device")?260:255,target:this.parent.element,animationSettings:{effect:"None"},buttons:[{click:this.btnClick.bind(this),buttonModel:{content:this.getLocalizedLabel(this.isExcel?"OKButton":"FilterButton"),cssClass:"e-primary",isPrimary:!0}},{click:this.btnClick.bind(this),buttonModel:{cssClass:"e-flat",content:this.getLocalizedLabel(this.isExcel?"CancelButton":"ClearButton")}}],created:this.dialogCreated.bind(this),open:this.dialogOpen.bind(this)});this.dialogObj.isStringTemplate=!0,this.renderResponsiveFilter(e),this.dlg.setAttribute("aria-label",this.getLocalizedLabel("ExcelFilterDialogARIA")),e.isResponsiveFilter?document.querySelector(".e-responsive-dialog > .e-dlg-content > .e-mainfilterdiv").appendChild(this.dlg):this.parent.element.appendChild(this.dlg),this.dialogObj.appendTo(this.dlg),this.dialogObj.element.style.maxHeight=e.isResponsiveFilter?"none":this.options.height+"px",this.dialogObj.show(),this.dialogObj.element.querySelector(".e-dlg-content").appendChild(this.sBox),this.wireEvents(),r.createSpinner({target:this.spinner},this.parent.createElement),r.showSpinner(this.spinner),this.getAllData()}},e.prototype.renderResponsiveFilter=function(e){e.isResponsiveFilter&&(this.dialogObj.buttons=[{}],this.dialogObj.position={X:"",Y:""},this.dialogObj.target=document.querySelector(".e-resfilter > .e-dlg-content > .e-mainfilterdiv"),this.dialogObj.width="100%")},e.prototype.dialogCreated=function(e){this.options.isResponsiveFilter?this.dialogObj.element.style.left="0px":t.Browser.isDevice?this.dialogObj.position={X:"center",Y:"center"}:ee(this.options.target,this.dialogObj),this.parent.notify("filterDialogCreated",e)},e.prototype.openDialog=function(e){this.updateModel(e),this.getAndSetChkElem(e),this.showDialog(e)},e.prototype.closeDialog=function(){if(this.dialogObj&&!this.dialogObj.isDestroyed){var e=this.options.columns.filter(function(e){return e.getFilterItemTemplate()}),i=this.parent.registeredTemplate;e.length&&!t.isNullOrUndefined(i)&&i.filterItemTemplate&&this.parent.destroyTemplate(["filterItemTemplate"]),this.parent.isReact&&void 0!==this.parent.destroyTemplate&&(this.parent.destroyTemplate(["filterItemTemplate"]),this.parent.renderTemplates()),this.parent.notify("filter-menu-close",{field:this.options.field}),this.dialogObj.destroy(),this.unWireEvents(),t.remove(this.dlg),this.dlg=null,this.parent.notify("filter-dialog-close",{})}},e.prototype.clearFilter=function(e){var t={instance:this,handler:this.clearFilter,cancel:!1};this.parent.notify(ci,t),t.cancel||this.options.handler({action:"clear-filter",field:e?e.field:this.options.field})},e.prototype.btnClick=function(e){if(this.filterState){if("input"===e.target.tagName.toLowerCase()&&e.target.classList.contains("e-searchinput")){var t=e.target.value;"boolean"===this.options.column.type&&(""!==t&&-1!==this.getLocalizedLabel("FilterTrue").toLowerCase().indexOf(t.toLowerCase())?t=!0:""!==t&&-1!==this.getLocalizedLabel("FilterFalse").toLowerCase().indexOf(t.toLowerCase())&&(t=!1));var i={action:"filtering",filterCollection:{field:this.options.field,operator:this.options.isRemote?"string"===this.options.column.type?"contains":"equal":"date"===this.options.column.type||"datetime"===this.options.column.type||"boolean"===this.options.column.type?"equal":"contains",value:t,matchCase:!1,type:this.options.column.type,ignoreAccent:this.options.ignoreAccent},field:this.options.field};void 0!==t&&null!==t&&""!==t?this.isForeignColumn(this.options.column)?this.foreignFilter(i,t):this.options.handler(i):this.closeDialog()}else if(13===e.keyCode)this.fltrBtnHandler();else{var r=e.target.firstChild.textContent.toLowerCase();this.getLocalizedLabel(this.isExcel?"OKButton":"FilterButton").toLowerCase()===r?this.fltrBtnHandler():this.getLocalizedLabel("ClearButton").toLowerCase()===r&&this.clearFilter()}this.closeDialog()}else"input"!==e.target.tagName.toLowerCase()&&(this.clearFilter(),this.closeDialog())},e.prototype.fltrBtnHandler=function(){var i=[].slice.call(this.cBox.querySelectorAll(".e-check:not(.e-selectall)")),r=i,n="equal",o=this.dialogObj.element.querySelector(".e-dropdownlist");o&&(this.options.operator=n=o.ej2_instances[0].value),this.isMenuNotEqual="notequal"===this.options.operator;var s;this.options.hideSearchbox||(s=this.searchBox.querySelector(".e-searchinput"));var l=this.options.allowCaseSensitive,a={field:this.options.field,predicate:this.isMenuNotEqual?"and":"or",uid:this.options.uid,operator:n,type:this.options.type,matchCase:l,ignoreAccent:this.options.ignoreAccent},h=this.itemsCnt!==i.length&&this.itemsCnt-i.length<i.length;h&&s&&""===s.value&&(n=this.isMenuNotEqual?"equal":"notequal",i=[].slice.call(this.cBox.querySelectorAll(".e-uncheck:not(.e-selectall)")),a.predicate=this.isMenuNotEqual?"or":"and",a.operator=n);var d,c,p,u,g=[];if(i.length!==this.itemsCnt||s&&s.value&&""!==s.value){for(var f=0;f<i.length;f++){d=this.values[O(i[f],"e-ftrchk").getAttribute("uid")],u=t.extend({},{value:d},a),d&&!d.toString().length&&(u.operator=h?"notequal":"equal"),""===d||t.isNullOrUndefined(d)?g=g.concat(e.generateNullValuePredicates(a)):g.push(u);var m={instance:this,handler:this.fltrBtnHandler,arg1:u.field,arg2:u.predicate,arg3:u.operator,arg4:u.matchCase,arg5:u.ignoreAccent,arg6:u.value,cancel:!1};if(this.parent.notify(ci,m),m.cancel)return}"date"!==this.options.type&&"datetime"!==this.options.type||(p=r.length-1,c=this.values[O(r[p],"e-ftrchk").getAttribute("uid")],t.isNullOrUndefined(c)&&h&&g.push({field:a.field,matchCase:a.matchCase,operator:"equal",predicate:"and",value:null})),this.initiateFilter(g)}else this.clearFilter()},e.generateNullValuePredicates=function(e){var t=[];return"string"===e.type&&t.push({field:e.field,ignoreAccent:e.ignoreAccent,matchCase:e.matchCase,operator:e.operator,predicate:e.predicate,value:""}),t.push({field:e.field,matchCase:e.matchCase,operator:e.operator,predicate:e.predicate,value:null}),t.push({field:e.field,matchCase:e.matchCase,operator:e.operator,predicate:e.predicate,value:void 0}),t},e.prototype.initiateFilter=function(e){var r,n=e[0];if(!t.isNullOrUndefined(n)){r=n.ejpredicate?n.ejpredicate:new i.Predicate(n.field,n.operator,n.value,!n.matchCase,n.ignoreAccent);for(var o=1;o<e.length;o++)r=void 0!==e[o].ejpredicate?r[e[o].predicate](e[o].ejpredicate):r[e[o].predicate](e[o].field,e[o].operator,e[o].value,!e[o].matchCase,e[o].ignoreAccent);var s={action:"filtering",filterCollection:e,field:this.options.field,ejpredicate:i.Predicate.or(r)};this.options.handler(s)}},e.prototype.isForeignColumn=function(e){return!!e.isForeignColumn&&e.isForeignColumn()},e.prototype.refreshCheckboxes=function(){var e=this,n=this.sInput.value,o=this.options.column,s=this.isForeignColumn(o)?this.foreignKeyQuery.clone():this.options.query.clone(),l=this.options.query.clone(),a=s.queries.filter(function(e){return e&&"onWhere"===e.fn})[0];s.queries=[],l.queries=[];var h="string"!==this.options.type&&parseFloat(n)?parseFloat(n):n,d=this.options.isRemote?"string"===this.options.type?"contains":"equal":this.options.type?"contains":"equal",c=this.options.ignoreAccent,p=this.isForeignColumn(o)?o.foreignKeyValue:o.field;h=""===h||void 0===h?void 0:h;var u,g=this.options.dataManager.adaptor.getModuleName;"boolean"===this.options.type&&(void 0!==h&&-1!==this.getLocalizedLabel("FilterTrue").toLowerCase().indexOf(h.toLowerCase())?h="true":void 0!==h&&-1!==this.getLocalizedLabel("FilterFalse").toLowerCase().indexOf(h.toLowerCase())&&(h="false"),void 0!==h&&-1!==this.getLocalizedLabel("FilterTrue").toLowerCase().indexOf(h.toLowerCase())&&g?(g(),h=!0):void 0!==h&&-1!==this.getLocalizedLabel("FilterFalse").toLowerCase().indexOf(h.toLowerCase())&&g&&(g(),h=!1),d="equal"),"date"!==this.options.type&&"datetime"!==this.options.type||(h=this.valueFormatter.fromView(n,this.options.parserFn,this.options.type)),this.addDistinct(s);var f={requestType:"filtersearchbegin",filterModel:this,columnName:p,column:o,operator:d,matchCase:!0,ignoreAccent:c,filterChoiceCount:null,query:s,value:h};this.parent.trigger(bt,f,function(g){if(g.operator=g.operator,u=new i.Predicate(p,g.operator,h,g.matchCase,g.ignoreAccent),"date"===e.options.type||"datetime"===e.options.type){if(d="equal",t.isNullOrUndefined(h)&&n.length)return;u=he({field:p,operator:d,value:h,matchCase:!0,ignoreAccent:c},e.options.type)}n.length?(u=t.isNullOrUndefined(a)?u:u.and(a.e),s.where(u)):t.isNullOrUndefined(a)||s.where(a.e),g.filterChoiceCount=t.isNullOrUndefined(g.filterChoiceCount)?1e3:g.filterChoiceCount;var f={};r.showSpinner(e.spinner),e.renderEmpty=!1,e.isForeignColumn(o)&&n.length?("result"in o.dataSource?new i.DataManager(o.dataSource.result):o.dataSource).executeQuery(s).then(function(t){var i=e.options.column.columnData;e.options.column.columnData=t.result,e.parent.notify("generateQuery",{predicate:f,column:o}),f.predicate.predicates.length?l.where(f.predicate):e.renderEmpty=!0,e.options.column.columnData=i,l.take(g.filterChoiceCount),e.search(g,l)}):(s.take(g.filterChoiceCount),e.search(g,s))})},e.prototype.search=function(e,t){this.parent.dataSource&&"result"in this.parent.dataSource?this.filterEvent(e,t):this.processSearch(t)},e.prototype.getPredicateFromCols=function(t){for(var r=e.getPredicate(t),n=[],o={},s=void 0!==this.parent.getForeignKeyColumns,l=s?this.parent.getForeignKeyColumns():[],a=0,h=Object.keys(r);a<h.length;a++){var d=h[a],c=void 0;s&&this.parent.getColumnByField(d).isForeignColumn()&&(c=ae(d,l)),c?(this.parent.notify("generateQuery",{predicate:o,column:c}),o.predicate.predicates.length&&n.push(i.Predicate.or(o.predicate.predicates))):n.push(r[d])}return n.length&&i.Predicate.and(n)},e.prototype.getQuery=function(){return this.parent.getQuery?this.parent.getQuery().clone():new i.Query},e.prototype.getAllData=function(){var e=this,i=this.getQuery();i.requiresCount(),this.addDistinct(i);var r={requestType:"filterchoicerequest",query:i,filterChoiceCount:null};r.filterModel=this,this.parent.trigger(bt,r,function(r){r.filterChoiceCount=t.isNullOrUndefined(r.filterChoiceCount)?1e3:r.filterChoiceCount,i.take(r.filterChoiceCount),e.parent.dataSource&&"result"in e.parent.dataSource?e.filterEvent(r,i):e.processDataOperation(i,!0)})},e.prototype.addDistinct=function(e){var t=i.DataUtil.distinct(this.options.filteredColumns,"field");return t.indexOf(this.options.column.field)<=-1&&(t=t.concat(this.options.column.field)),e.distinct(t),e},e.prototype.filterEvent=function(e,t){var i=this,r=Te(e,t);this.parent.trigger("dataStateChange",r.state),r.deffered.promise.then(function(e){i.dataSuccess(e)})},e.prototype.processDataOperation=function(e,t){var r=this;this.options.dataSource=this.options.dataSource instanceof i.DataManager?this.options.dataSource:new i.DataManager(this.options.dataSource);var n=[],o=[];if(this.isForeignColumn(this.options.column)&&t){var s="result"in this.options.column.dataSource?new i.DataManager(this.options.column.dataSource.result):this.options.column.dataSource;this.foreignKeyQuery.params=e.params,n.push(s.executeQuery(this.foreignKeyQuery)),o.push(function(e){return r.foreignKeyData=e})}n.push(this.options.dataSource.executeQuery(e)),o.push(this.dataSuccess.bind(this));var l=0;Promise.all(n).then(function(e){for(var t=0;t<e.length;t++)o[l++](e[t].result)})},e.prototype.dataSuccess=function(t){this.fullData=t;var r={dataSource:this.fullData,executeQuery:!0,field:this.options.field};if(this.parent.notify("beforeCheckboxRenderer",r),r.executeQuery){var n=new i.Query;if(this.parent.searchSettings&&this.parent.searchSettings.key.length){var o=this.parent.searchSettings,s=o.fields.length?o.fields:this.options.columns.map(function(e){return e.field});n.search(o.key,s,o.operator,o.ignoreCase,o.ignoreAccent)}if(this.options.filteredColumns.length){for(var l=[],a=0;a<this.options.filteredColumns.length;a++){var h=this.options.filteredColumns[a];this.options.uid?(h.uid=h.uid||this.parent.getColumnByField(h.field).uid,h.uid!==this.options.uid&&l.push(this.options.filteredColumns[a])):h.field!==this.options.field&&l.push(this.options.filteredColumns[a])}var d=this.getPredicateFromCols(l);d&&n.where(d)}var c=new i.DataManager(r.dataSource).executeLocal(n),p=this.options.column;this.filteredData=e.getDistinct(c,this.options.field,p,this.foreignKeyData).records||[]}var u=r.executeQuery?this.filteredData:r.dataSource;this.processDataSource(null,!0,u,r),this.sInput&&this.sInput.focus();var g={requestType:"filterafteropen",columnName:this.options.field,columnType:this.options.type};g.filterModel=this,this.parent.notify(di,g)},e.prototype.processDataSource=function(e,t,i,n){r.showSpinner(this.spinner),this.updateResult(),this.createFilterItems(i,t,n)},e.prototype.processSearch=function(e){this.processDataOperation(e)},e.prototype.updateResult=function(){this.result={};var e=this.getPredicateFromCols(this.options.filteredColumns),t=new i.Query;e&&t.where(e),this.parent.notify("before-checkbox-renderer-query",{query:t});for(var r=0,n=new i.DataManager(this.fullData).executeLocal(t);r<n.length;r++){var o=n[r];this.result[pe(this.options.field,o)]=!0}},e.prototype.clickHandler=function(e){var t=e.target,i=O(t,"e-checkbox-wrapper");if(O(t,"e-searchbox")&&this.searchBoxClick(e),i){var r=i.querySelector(".e-selectall");r?this.updateAllCBoxes(!r.classList.contains("e-check")):ie(i.parentElement),this.updateIndeterminatenBtn(),i.querySelector(".e-chk-hidden").focus()}this.setFocus(O(i,"e-ftrchk"))},e.prototype.keyupHandler=function(e){this.setFocus(O(e.target,"e-ftrchk"))},e.prototype.setFocus=function(e){var t=this.dlg.querySelector(".e-chkfocus");t&&t.classList.remove("e-chkfocus"),e&&e.classList.add("e-chkfocus")},e.prototype.updateAllCBoxes=function(e){for(var t=0,i=[].slice.call(this.cBox.getElementsByClassName("e-frame"));t<i.length;t++){var r=i[t];oe(r,e),re(r.previousSibling,e)}},e.prototype.dialogOpen=function(){this.parent.element.classList.contains("e-device")&&(this.dialogObj.element.querySelector(".e-input-group").classList.remove("e-input-focus"),this.options.isResponsiveFilter||this.dialogObj.element.querySelector(".e-btn").focus())},e.prototype.createCheckbox=function(e,i,r){var n=i?this.cBoxTrue.cloneNode(!0):this.cBoxFalse.cloneNode(!0);re(n.querySelector("input"),i);var o=n.querySelector(".e-label"),s=me({},r,{column:this.options.column,parent:this.parent});return o.innerHTML=!t.isNullOrUndefined(e)&&e.toString().length?e:this.getLocalizedLabel("Blanks"),"boolean"==typeof e&&(o.innerHTML=!0===e?this.getLocalizedLabel("FilterTrue"):this.getLocalizedLabel("FilterFalse")),t.addClass([o],["e-checkboxfiltertext"]),this.options.template&&r[this.options.column.field]!==this.getLocalizedLabel("SelectAll")&&(o.innerHTML="",this.parent.isReact&&this.options.column.filter&&"string"!=typeof this.options.column.filter.itemTemplate?(this.options.template(s,this.parent,"filterItemTemplate",null,null,null,o),this.parent.renderTemplates()):q(o,this.options.template(s,this.parent,"filterItemTemplate"))),n},e.prototype.updateIndeterminatenBtn=function(){var e,i=this.cBox.children.length-1,r=[],n=!1,o=this.cBox.querySelector(".e-selectall"),s=this.cBox.querySelectorAll(".e-check:not(.e-selectall)").length;this.options.isResponsiveFilter||((e=this.dialogObj.btnObj[0]).disabled=!1);var l=o.previousSibling;re(l,!1),l.indeterminate=!1,i===s?(r=["e-check"],re(l,!0)):s?(r=["e-stop"],l.indeterminate=!0):(r=["e-uncheck"],n=!0,e&&(e.disabled=!0)),e&&(this.filterState=!e.disabled,e.dataBind()),t.removeClass([o],["e-check","e-stop","e-uncheck"]),t.addClass([o],r),this.parent.notify("refresh-cutsom-filter-ok-button",{disabled:n})},e.prototype.createFilterItems=function(e,n,o){var s,l,a=this.parent.createElement("div"),h=!1;this.options.isResponsiveFilter||(l=this.dialogObj.btnObj[0]);var d=-1,c="ejValue";o.executeQuery||(c=o.field);for(C=0;C<e.length;C++){var p=t.getValue(c,e[C]);(""===p||t.isNullOrUndefined(p))&&(d+=1)}if(this.itemsCnt=-1!==d?e.length-d:e.length,e.length&&!this.renderEmpty){var u=this.getLocalizedLabel("SelectAll"),g=this.createCheckbox(u,!1,(s={},s[this.options.field]=u,s)),f=ne(L("cbox"),g,"e-ftrchk");f.querySelector(".e-frame").classList.add("e-selectall"),a.appendChild(f);var m=new i.Predicate("field","equal",this.options.field);this.options.foreignKeyValue&&(m=m.or("field","equal",this.options.foreignKeyValue));for(var y=new i.DataManager(this.options.filteredColumns).executeLocal((new i.Query).where(m)).length,v=void 0,C=0;C<e.length;C++){var w=L("cbox");this.values[w]=t.getValue(c,e[C]);var b=t.getValue(this.options.field,e[C]);this.options.formatFn&&(b=this.valueFormatter.toView(b,this.options.formatFn));var S={value:b,column:this.options.column,data:e[C]};if(this.parent.notify("filter-cbox-value",S),""===(b=S.value)||t.isNullOrUndefined(b)){if(v)continue;v=!0}var R=this.createCheckbox(b,this.getCheckedState(y,this.values[w]),t.getValue("dataObj",e[C]));a.appendChild(ne(w,R,"e-ftrchk"))}this.cBox.innerHTML="",q(this.cBox,[].slice.call(a.children)),this.updateIndeterminatenBtn(),l&&(l.disabled=!1),h=!1}else a.appendChild(this.parent.createElement("span",{innerHTML:this.getLocalizedLabel("NoResult")})),this.cBox.innerHTML="",q(this.cBox,[].slice.call(a.children)),l&&(l.disabled=!0),h=!0;l&&(this.filterState=!l.disabled,l.dataBind());var x={requestType:"filterchoicerequest",dataSource:this.renderEmpty?[]:e};x.filterModel=this,this.parent.notify(di,x),this.parent.notify("refresh-cutsom-filter-ok-button",{disabled:h}),r.hideSpinner(this.spinner)},e.prototype.getCheckedState=function(e,t){if(this.isFiltered&&e){var i=this.result[t];return"notequal"===this.options.operator?!i:i}return!0},e.getDistinct=function(e,r,n,o){for(var s,l=e.length,a=[],h={},d=!(!n||!n.isForeignColumn)&&n.isForeignColumn();l--;)if(s=e[l],!((s=pe(r,s))in h)){var c={};if(c.ejValue=s,h[s]=!0,d){var p=le(n,{},s,o)[0];t.setValue("foreignKeyData",p,e[l]),s=t.getValue(n.foreignKeyValue,p)}t.setValue(r,t.isNullOrUndefined(s)?null:s,c),t.setValue("dataObj",e[l],c),a.push(c)}return i.DataUtil.group(i.DataUtil.sort(a,r,i.DataUtil.fnAscending),"ejValue")},e.getPredicate=function(t){for(var r=i.DataUtil.distinct(t,"field",!0)||[],n=[],o={},s=0;s<r.length;s++)0!==(n=new i.DataManager(t).executeLocal((new i.Query).where("field","equal",r[s].field))).length&&(o[r[s].field]=e.generatePredicate(n));return o},e.generatePredicate=function(r){var n,o=r?r.length:0,s=e.updateDateFilter(r[0]);s.ignoreAccent=!t.isNullOrUndefined(s.ignoreAccent)&&s.ignoreAccent,n="date"===s.type||"datetime"===s.type?he(s,s.type):s.ejpredicate?s.ejpredicate:new i.Predicate(s.field,s.operator,s.value,!e.getCaseValue(s),s.ignoreAccent);for(var l=1;l<o;l++)r[l]=e.updateDateFilter(r[l]),o>2&&l>1&&"or"===r[l].predicate?"date"===r[l].type||"datetime"===r[l].type?n.predicates.push(he(r[l],r[l].type)):n.predicates.push(new i.Predicate(r[l].field,r[l].operator,r[l].value,!e.getCaseValue(r[l]),r[l].ignoreAccent)):n="date"===r[l].type||"datetime"===r[l].type?"and"===r[l].predicate&&"equal"===r[l].operator?n.or(he(r[l],r[l].type),r[l].type,r[l].ignoreAccent):n[r[l].predicate](he(r[l],r[l].type),r[l].type,r[l].ignoreAccent):r[l].ejpredicate?n[r[l].predicate](r[l].ejpredicate):n[r[l].predicate](r[l].field,r[l].operator,r[l].value,!e.getCaseValue(r[l]),r[l].ignoreAccent);return n||null},e.getCaseValue=function(e){return t.isNullOrUndefined(e.matchCase)?!("string"===e.type||t.isNullOrUndefined(e.type)&&"string"==typeof e.value):e.matchCase},e.updateDateFilter=function(e){return("date"===e.type||"datetime"===e.type||e.value instanceof Date)&&(e.type=e.type||"date"),e},e}(),Sn=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rn=function(e){function h(t,i){var r=e.call(this,t)||this;return r.customFilterOperators=i,r.isExcel=!0,r}return Sn(h,e),h.prototype.getCMenuDS=function(e,t){var i={number:["Equal","NotEqual","","LessThan","LessThanOrEqual","GreaterThan","GreaterThanOrEqual","Between","","CustomFilter"],string:["Equal","NotEqual","","StartsWith","EndsWith","","Contains","","CustomFilter"]};i.date=i.number,i.datetime=i.number;for(var r=[],n=0;n<i[e].length;n++)i[e][n].length?t?r.push({text:this.getLocalizedLabel(i[e][n])+"...",iconCss:"e-icons e-icon-check "+(t===i[e][n].toLowerCase()?"":"e-emptyicon")}):r.push({text:this.getLocalizedLabel(i[e][n])+"..."}):r.push({separator:!0});return r},h.prototype.destroy=function(){this.dlg&&(this.unwireExEvents(),e.prototype.destroy.call(this)),this.cmenu&&this.cmenu.parentElement&&t.remove(this.cmenu)},h.prototype.createMenu=function(e,t,i,r){var n={string:"TextFilter",date:"DateFilter",datetime:"DateTimeFilter",number:"NumberFilter"};this.menu=this.parent.createElement("div",{className:"e-contextmenu-wrapper"}),this.parent.enableRtl?this.menu.classList.add("e-rtl"):this.menu.classList.remove("e-rtl");var o=this.parent.createElement("ul"),s=t?"e-excl-filter-icon e-filtered":"e-excl-filter-icon";if(this.parent.allowSorting&&"grid"===this.parent.getModuleName()&&!this.options.isResponsiveFilter){var l=this.parent.getColumnHeaderByUid(r.uid).getAttribute("aria-sort"),a=this.parent.getColumnByField(r.field).allowSorting,h=a&&"Ascending"!==l?"e-excel-ascending":"e-disabled e-excel-ascending",d=a&&"Descending"!==l?"e-excel-descending":"e-disabled e-excel-descending",c="string"===e?this.getLocalizedLabel("SortAtoZ"):"datetime"===e||"date"===e?this.getLocalizedLabel("SortByOldest"):this.getLocalizedLabel("SortSmallestToLargest"),p="string"===e?this.getLocalizedLabel("SortZtoA"):"datetime"===e||"date"===e?this.getLocalizedLabel("SortByNewest"):this.getLocalizedLabel("SortLargestToSmallest");o.appendChild(this.createMenuElem(c,h,"e-sortascending")),o.appendChild(this.createMenuElem(p,d,"e-sortdescending"));var u=this.parent.createElement("li",{className:"e-separator e-menu-item e-excel-separator"});o.appendChild(u)}this.options.isResponsiveFilter||o.appendChild(this.createMenuElem(this.getLocalizedLabel("ClearFilter"),t?"":"e-disabled",s)),"boolean"!==e&&o.appendChild(this.createMenuElem(this.getLocalizedLabel(n[e]),"e-submenu",i&&this.ensureTextFilter()?"e-icon-check":s+" e-emptyicon",!0)),this.menu.appendChild(o),this.parent.notify("before-filter-cmenu-open",{element:this.menu}),this.parent.notify("refresh-cutsom-filter-clear-button",{isFiltered:t})},h.prototype.createMenuElem=function(e,t,i,r){var n=this.parent.createElement("li",{className:t+" e-menu-item"});return n.innerHTML=e,n.insertBefore(this.parent.createElement("span",{className:"e-menu-icon e-icons "+i}),n.firstChild),r&&n.appendChild(this.parent.createElement("span",{className:"e-icons e-caret"})),n},h.prototype.wireExEvents=function(){t.EventHandler.add(this.dlg,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.dlg,"click",this.clickExHandler,this)},h.prototype.unwireExEvents=function(){t.EventHandler.remove(this.dlg,"mouseover",this.hoverHandler),t.EventHandler.remove(this.dlg,"click",this.clickExHandler)},h.prototype.clickExHandler=function(e){var t={string:"TextFilter",date:"DateFilter",datetime:"DateTimeFilter",number:"NumberFilter"},i=O(e.target,"e-menu-item");i&&(this.getLocalizedLabel("ClearFilter")===i.innerText.trim()?(this.clearFilter(),this.closeDialog()):this.options.isResponsiveFilter&&this.getLocalizedLabel(t[this.options.type])===i.innerText.trim()&&this.hoverHandler(e))},h.prototype.destroyCMenu=function(){this.isCMenuOpen=!1,this.menuObj&&!this.menuObj.isDestroyed&&(this.menuObj.destroy(),t.remove(this.cmenu),this.parent.notify("render-responsive-cmenu",{target:null,header:"",isOpen:!1,col:this.options.column}))},h.prototype.hoverHandler=function(e){if(!this.options.isResponsiveFilter||"mouseover"!==e.type){var i,r=e.target.querySelector(".e-contextmenu"),n=O(e.target,"e-menu-item"),o=this.menu.querySelector(".e-focused");if(o&&o.classList.remove("e-focused"),n&&(n.classList.add("e-focused"),i=n.classList.contains("e-submenu")),!r){if(!i){var s=this.menu.querySelector(".e-submenu");t.isNullOrUndefined(s)||s.classList.remove("e-selected"),this.destroyCMenu()}var l=this.ensureTextFilter();if(!this.isCMenuOpen&&i){n.classList.add("e-selected"),this.isCMenuOpen=!0;var h={items:this.getCMenuDS(this.options.type,l?l.replace(/\s/g,""):void 0),select:this.selectHandler.bind(this),onClose:this.destroyCMenu.bind(this),enableRtl:this.parent.enableRtl,beforeClose:this.preventClose.bind(this),cssClass:this.options.isResponsiveFilter?"e-res-contextmenu-wrapper":""};this.parent.element.appendChild(this.cmenu),this.menuObj=new a.ContextMenu(h,this.cmenu);var d=this.menu.querySelector(".e-submenu").getBoundingClientRect(),c={top:0,left:0};if(this.options.isResponsiveFilter){var p={string:"TextFilter",date:"DateFilter",datetime:"DateTimeFilter",number:"NumberFilter"},u=document.querySelector(".e-responsive-dialog > .e-dlg-header-content").offsetHeight+4;this.menuObj.element.style.height="calc(100% - "+u+"px)",this.menuObj.open(u,0,document.body);var g=this.getLocalizedLabel(p[this.options.type]);this.parent.notify("render-responsive-cmenu",{target:this.menuObj.element.parentElement,header:g,isOpen:!0})}else{if(t.Browser.isDevice){var f=this.getContextBounds();c.top=(window.innerHeight-f.height)/2,c.left=(window.innerWidth-f.width)/2,this.closeDialog()}else c.top=t.Browser.isIE?window.pageYOffset+d.top:window.scrollY+d.top,c.left=this.getCMenuYPosition(this.dlg);this.menuObj.open(c.top,c.left,e.target)}Se(this.parent.element,this.menuObj.element.parentElement)}}}},h.prototype.ensureTextFilter=function(){var e,t=this.existingPredicate[this.options.field];return t&&2===t.length?e="greaterthanorequal"===t[0].operator&&"lessthanorequal"===t[1].operator?"between":"customfilter":t&&1===t.length&&(this.optrData=this.customFilterOperators[this.options.type+"Operator"],e=t[0].operator),e},h.prototype.preventClose=function(e){if(this.options&&this.options.isResponsiveFilter&&e.event){var t=e.event.target,i=t.classList.contains("e-resfilterback")||t.classList.contains("e-res-back-btn")||t.classList.contains("e-menu-item");e.cancel=!i}else e.event instanceof MouseEvent&&e.event.target.classList.contains("e-submenu")&&(e.cancel=!0)},h.prototype.getContextBounds=function(){return this.menuObj.element.style.display="block",this.menuObj.element.getBoundingClientRect()},h.prototype.getCMenuYPosition=function(e){var t=this.getContextBounds().width,i=e.getBoundingClientRect(),r=i.right+t-this.parent.element.clientWidth,n=e.offsetWidth-e.clientWidth;return n=n?n+1:0,r<1?i.right+1-n:i.left-t-1+n},h.prototype.openDialog=function(e){var t=this;this.updateModel(e),this.getAndSetChkElem(e),this.showDialog(e),this.dialogObj.dataBind();var i=this.existingPredicate[e.field]&&this.existingPredicate[e.field].length||this.options.filteredColumns.filter(function(e){return t.options.field===e.field}).length;this.createMenu(e.type,i>0,1===i||2===i,e),this.dlg.insertBefore(this.menu,this.dlg.firstChild),this.dlg.classList.add("e-excelfilter"),this.parent.enableRtl&&this.dlg.classList.add("e-rtl"),this.dlg.classList.remove("e-checkboxfilter"),this.cmenu=this.parent.createElement("ul",{className:"e-excel-menu"}),this.parent.notify("filterDialogCreated",{}),this.wireExEvents()},h.prototype.closeDialog=function(){e.prototype.closeDialog.call(this)},h.prototype.selectHandler=function(e){e.item&&(this.parent.notify("filter-cmenu-select",{}),this.menuItem=e.item,this.renderDialogue(e))},h.prototype.renderDialogue=function(e){var i=this,n=e?e.element:void 0,o=this.options.field,s=!t.isNullOrUndefined(o)&&_(o),l=!t.isNullOrUndefined(o)&&W(o),a=this.parent.createElement("div",{className:"e-xlfl-maindiv",id:s?l+"-xlflmenu":o+"-xlflmenu"});this.dlgDiv=this.parent.createElement("div",{className:"e-xlflmenu",id:s?l+"-xlfldlg":o+"-xlfldlg"}),this.options.isResponsiveFilter?document.querySelector(".e-resfilter > .e-dlg-content > .e-xl-customfilterdiv").appendChild(this.dlgDiv):this.parent.element.appendChild(this.dlgDiv),this.dlgObj=new r.Dialog({header:this.getLocalizedLabel("CustomFilter"),isModal:!0,overlayClick:this.removeDialog.bind(this),showCloseIcon:!0,closeOnEscape:!1,target:document.body,visible:!1,enableRtl:this.parent.enableRtl,open:function(){var e=i.dlgObj.element.querySelector("table.e-xlfl-table>tr");i.options.column.filterTemplate&&e.querySelector("#"+i.options.column.field+"-xlfl-frstvalue").focus()},close:this.removeDialog.bind(this),created:this.createdDialog.bind(this,n,o),buttons:[{click:this.filterBtnClick.bind(this,o),buttonModel:{content:this.getLocalizedLabel("OKButton"),isPrimary:!0,cssClass:"e-xlfl-okbtn"}},{click:this.removeDialog.bind(this),buttonModel:{content:this.getLocalizedLabel("CancelButton"),cssClass:"e-xlfl-cancelbtn"}}],content:a,width:430,animationSettings:{effect:"None"}});this.dlgObj.isStringTemplate=!0,this.renderResponsiveDialog(),this.dlgDiv.setAttribute("aria-label",this.getLocalizedLabel("CustomFilterDialogARIA")),this.dlgObj.appendTo(this.dlgDiv)},h.prototype.renderResponsiveDialog=function(){if(this.options.isResponsiveFilter){var e=document.querySelector(".e-row-responsive-filter");e&&e.classList.remove("e-row-responsive-filter"),this.dlgObj.buttons=[{}],this.dlgObj.header=void 0,this.dlgObj.position={X:"",Y:""},this.dlgObj.target=document.querySelector(".e-resfilter > .e-dlg-content > .e-xl-customfilterdiv"),this.dlgObj.width="100%",this.dlgObj.isModal=!1,this.dlgObj.showCloseIcon=!1}},h.prototype.removeDialog=function(){this.parent.notify("custom-filter-close",{}),this.parent.isReact&&void 0!==this.parent.destroyTemplate&&(this.parent.destroyTemplate(["filterTemplate"]),this.parent.renderTemplates()),this.removeObjects([this.dropOptr,this.datePicker,this.dateTimePicker,this.actObj,this.numericTxtObj,this.dlgObj]),t.remove(this.dlgDiv),this.parent.notify("filter-dialog-close",{})},h.prototype.createdDialog=function(e,i){if(this.renderCustomFilter(e,i),this.dlgObj.element.style.left="0px",this.options.isResponsiveFilter){var r=document.querySelector(".e-responsive-dialog > .e-dlg-header-content").offsetHeight+4;this.dlgObj.element.style.top=r+"px"}else this.dlgObj.element.style.top="0px";!this.options.isResponsiveFilter&&t.Browser.isDevice&&window.innerWidth<440&&(this.dlgObj.element.style.width="90%"),this.parent.notify("beforeCustomFilterOpen",{column:i,dialog:this.dialogObj}),this.dlgObj.show(),Se(this.parent.element,this.dlgObj.element.parentElement)},h.prototype.renderCustomFilter=function(e,t){var i=this.dlgObj.element.querySelector(".e-xlfl-maindiv"),r=this.parent.createElement("div",{innerHTML:this.getLocalizedLabel("ShowRowsWhere"),className:"e-xlfl-dlgfields"});i.appendChild(r);var n=this.parent.createElement("div",{innerHTML:this.options.displayName,className:"e-xlfl-fieldset"});i.appendChild(n),this.renderFilterUI(t,i)},h.prototype.filterBtnClick=function(e){var i,r=!t.isNullOrUndefined(e)&&_(e),n=!t.isNullOrUndefined(e)&&W(e),o=r?n:e,s=this.dlgDiv.querySelector("#"+o+"-xlfl-frstvalue").ej2_instances[0],l=this.dlgDiv.querySelector("#"+o+"-xlfl-frstoptr").ej2_instances[0],a=this.dlgDiv.querySelector("#"+o+"-xlfl-secndvalue").ej2_instances[0],h=this.dlgDiv.querySelector("#"+o+"-xlfl-secndoptr").ej2_instances[0];"string"===this.options.type&&(i=this.dlgDiv.querySelector("#"+o+"-xlflmtcase").ej2_instances[0].checked);var d=this.dlgDiv.querySelector("#"+o+"e-xlfl-frstpredicate").ej2_instances[0].checked?"and":"or";null===a.value&&(d="or"),this.filterByColumn(this.options.field,l.value,s.value,d,i,this.options.ignoreAccent,h.value,a.value),this.removeDialog()},h.prototype.filterByColumn=function(e,r,n,o,s,l,a,h){var d,c=this.parent.getColumnByField?this.parent.getColumnByField(e):this.options.column,p=this.isForeignColumn(c)?c.foreignKeyValue:e,u=[];u.push({field:p,predicate:o,matchCase:s,ignoreAccent:l,operator:r,value:n,type:this.options.type});var g={instance:this,handler:this.filterByColumn,arg1:e,arg2:r,arg3:n,arg4:o,arg5:s,arg6:l,arg7:a,arg8:h,cancel:!1};if(this.parent.notify(ci,g),!g.cancel){d=new i.Predicate(p,r.toLowerCase(),n,!s,l),t.isNullOrUndefined(h)||t.isNullOrUndefined(a)||(u.push({field:p,predicate:o,matchCase:s,ignoreAccent:l,operator:a,value:h,type:this.options.type}),d=d[o](p,a.toLowerCase(),h,!s,l));var f={action:"filtering",filterCollection:u,field:this.options.field,ejpredicate:d,actualPredicate:u};this.isForeignColumn(c)?this.foreignKeyFilter(f,u,d):this.options.handler(f)}},h.prototype.renderOperatorUI=function(e,i,r,n,o){var l=this.parent.createElement("tr",{className:"e-xlfl-fields"});i.appendChild(l);var a=this.parent.createElement("td",{className:"e-xlfl-optr"});l.appendChild(a);var h=this.parent.createElement("div",{className:"e-xlfl-optrdiv"}),d=!t.isNullOrUndefined(e)&&_(e),c=!t.isNullOrUndefined(e)&&W(e),p=this.parent.createElement("input",{id:d?c+r:e+r});h.appendChild(p),a.appendChild(h);var u=this.options.type+"Operator",g=this.customFilterOperators[u];this.optrData=g;var f=this.dropSelectedVal(this.options.column,n,o),m="";this.menuItem&&((m=this.menuItem.text.slice(0,-3))!==this.getLocalizedLabel("CustomFilter")&&(f=o?m:void 0),m===this.getLocalizedLabel("Between")&&(f=this.getLocalizedLabel(o?"GreaterThanOrEqual":"LessThanOrEqual")));var y=this.options.column;return this.dropOptr=new s.DropDownList(E({dataSource:g,fields:{text:"text",value:"value"},text:f,open:this.dropDownOpen.bind(this),enableRtl:this.parent.enableRtl,change:this.dropDownValueChange.bind(this)},y.filter.params)),this.dropOptr.appendTo(p),{fieldElement:l,operator:this.getSelectedValue(f)}},h.prototype.dropDownOpen=function(e){e.popup.element.style.zIndex=(this.dialogObj.zIndex+1).toString()},h.prototype.dropDownValueChange=function(e){e.element.id.includes("-xlfl-frstoptr")?this.firstOperator=e.value.toString():this.secondOperator=e.value.toString()},h.prototype.getFilterUIInfo=function(){return{firstOperator:this.firstOperator,secondOperator:this.secondOperator,field:this.options.field}},h.prototype.getSelectedValue=function(e){var r=new i.DataManager(this.optrData).executeLocal((new i.Query).where("text","equal",e));return t.isNullOrUndefined(r[0])?"":r[0].value},h.prototype.dropSelectedVal=function(e,t,i){var r;return r=t&&t.length>0?2===t.length?i?t[0].operator:t[1].operator:i?t[0].operator:void 0:i&&"string"===e.type&&!e.filter.operator?"startswith":i?e.filter.operator||"equal":void 0,this.getSelectedText(r)},h.prototype.getSelectedText=function(e){var r=new i.DataManager(this.optrData).executeLocal((new i.Query).where("value","equal",e));return t.isNullOrUndefined(r[0])?"":r[0].text},h.prototype.renderFilterUI=function(e,t){var i=this.existingPredicate[e],r=this.parent.createElement("table",{className:"e-xlfl-table"});t.appendChild(r);var n=this.parent.createElement(ji);n.innerHTML='<col style="width: 50%"></col><col style="width: 50%"></col>',r.appendChild(n);var o=this.renderOperatorUI(e,r,"-xlfl-frstoptr",i,!0);this.firstOperator=o.operator,this.renderFlValueUI(e,o,"-xlfl-frstvalue",i,!0);var s=this.parent.createElement("tr",{className:"e-xlfl-predicate"});r.appendChild(s),this.renderRadioButton(e,s,i),o=this.renderOperatorUI(e,r,"-xlfl-secndoptr",i,!1),this.secondOperator=o.operator,this.renderFlValueUI(e,o,"-xlfl-secndvalue",i,!1)},h.prototype.renderRadioButton=function(e,i,r){var o=this.parent.createElement("td",{className:"e-xlfl-radio",attrs:{colSpan:"2"}});i.appendChild(o);var s=this.parent.createElement("div",{className:"e-xlfl-radiodiv",attrs:{style:"display: inline-block"}}),l=!t.isNullOrUndefined(e)&&_(e),a=!t.isNullOrUndefined(e)&&W(e),h=this.parent.createElement("input",{id:l?a+"e-xlfl-frstpredicate":e+"e-xlfl-frstpredicate",attrs:{type:"radio"}}),d=this.parent.createElement("input",{id:l?a+"e-xlfl-secndpredicate":e+"e-xlfl-secndpredicate",attrs:{type:"radio"}});s.appendChild(h),s.appendChild(d),o.appendChild(s),"string"===this.options.type&&this.renderMatchCase(e,i,o,"-xlflmtcase",r);var c=new n.RadioButton({label:this.getLocalizedLabel("AND"),name:"default",cssClass:"e-xlfl-radio-and",checked:!0,enableRtl:this.parent.enableRtl}),p=new n.RadioButton({label:this.getLocalizedLabel("OR"),name:"default",cssClass:"e-xlfl-radio-or",enableRtl:this.parent.enableRtl});"and"===(r&&2===r.length?r[1].predicate:"and")?(c.checked=!0,p.checked=!1):(p.checked=!0,c.checked=!1),c.appendTo(h),p.appendTo(d)},h.prototype.removeObjects=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];r&&!r.isDestroyed&&r.destroy()}},h.prototype.renderFlValueUI=function(e,i,r,n,o){var s=this.parent.createElement("td",{className:"e-xlfl-value"});i.fieldElement.appendChild(s);var l=!t.isNullOrUndefined(e)&&_(e),a=!t.isNullOrUndefined(e)&&W(e),h=this.parent.createElement("div",{className:"e-xlfl-valuediv"}),d=this.options.filteredColumns.some(function(t){return e===t.field}),c=this.options.filteredColumns.filter(function(t){return t.field===e});if(this.options.column.filterTemplate){var p={},u=this.options.column;d&&r&&(p=this.getExcelFilterData(r,p,u,n,c));var g=this.parent.isReact&&"string"!=typeof this.options.column.filterTemplate,f=this.parent.element.id+u.uid+"filterTemplate";g?(this.options.column.getFilterTemplate()(p,this.parent,"filterTemplate",f,null,null,h),this.parent.renderTemplates()):q(h,this.options.column.getFilterTemplate()(p,this.parent,"filterTemplate",f)),(this.parent.isAngular?h.children[0]:h.querySelector("input")).id=l?a+r:e+r,s.appendChild(h)}else{var m=this.parent.createElement("input",{id:l?a+r:e+r});h.appendChild(m),s.appendChild(h);var y=void 0,v=void 0;n&&n.length>0&&(y=(v=2===n.length?o?n[0]:n[1]:o?n[0]:void 0)&&v.operator===i.operator?v.value:void 0,t.isNullOrUndefined(y)&&(y=void 0)),{string:this.renderAutoComplete.bind(this),number:this.renderNumericTextBox.bind(this),date:this.renderDate.bind(this),datetime:this.renderDateTime.bind(this)}[this.options.type](this.options,e,m,y,this.parent.enableRtl)}},h.prototype.getExcelFilterData=function(e,t,i,r,n){var o="-xlfl-frstvalue"===e?0:1;if("-xlfl-frstvalue"===e||n.length>1){t={column:r instanceof Array?r[o]:r};var s=this.options.column.columnData&&n.length>1?1===this.options.column.columnData.length?0:1:o;t[this.options.field]=i.foreignKeyValue?this.options.column.columnData[s][i.foreignKeyValue]:n[s].value,this.options.foreignKeyValue&&(t[this.options.foreignKeyValue]=this.options.column.columnData[s][i.foreignKeyValue])}return t},h.prototype.renderMatchCase=function(e,i,r,o,s){var l=this.parent.createElement("div",{className:"e-xlfl-matchcasediv",attrs:{style:"display: inline-block"}}),a=!t.isNullOrUndefined(e)&&_(e),h=!t.isNullOrUndefined(e)&&W(e),d=this.parent.createElement("input",{id:a?h+o:e+o,attrs:{type:"checkbox"}});l.appendChild(d),r.appendChild(l);var c=!!(s&&s.length>0)&&(s&&2===s.length?s[1].matchCase:s[0].matchCase);new n.CheckBox({label:this.getLocalizedLabel("MatchCase"),enableRtl:this.parent.enableRtl,checked:c}).appendTo(d)},h.prototype.renderDate=function(e,t,i,r,n){var o=ue(e.format,e.type);this.datePicker=new l.DatePicker(E({format:o,cssClass:"e-popup-flmenu",placeholder:this.getLocalizedLabel("CustomFilterDatePlaceHolder"),width:"100%",enableRtl:n,value:new Date(r),locale:this.parent.locale},e.column.filter.params)),this.datePicker.appendTo(i)},h.prototype.renderDateTime=function(e,t,i,r,n){var o=ue(e.format,e.type);this.dateTimePicker=new l.DateTimePicker(E({format:o,cssClass:"e-popup-flmenu",placeholder:this.getLocalizedLabel("CustomFilterDatePlaceHolder"),width:"100%",enableRtl:n,value:new Date(r),locale:this.parent.locale},e.column.filter.params)),this.dateTimePicker.appendTo(i)},h.prototype.completeAction=function(e){e.result=$(e.result)},h.prototype.renderNumericTextBox=function(e,t,i,r,n){this.numericTxtObj=new o.NumericTextBox(E({format:e.format,placeholder:this.getLocalizedLabel("CustomFilterPlaceHolder"),enableRtl:n,value:r,locale:this.parent.locale},e.column.filter.params)),this.numericTxtObj.appendTo(i)},h.prototype.renderAutoComplete=function(e,r,n,o,l){var a=this,h=this.options.column,d=this.isForeignColumn(h),c=d?h.dataSource:e.dataSource,p={value:d?h.foreignKeyValue:r},u=new s.AutoComplete(E({dataSource:c instanceof i.DataManager?c:new i.DataManager(c),fields:p,query:this.getQuery(),sortOrder:"Ascending",locale:this.parent.locale,cssClass:"e-popup-flmenu",autofill:!0,focus:function(){var i=!t.isNullOrUndefined(r)&&_(r),o=!t.isNullOrUndefined(r)&&W(r),s=i?o:r;u.filterType=a.dlgDiv.querySelector("#"+s+(n.id===s+"-xlfl-frstvalue"?"-xlfl-frstoptr":"-xlfl-secndoptr")).ej2_instances[0].value,u.ignoreCase="string"!==e.type||!a.dlgDiv.querySelector("#"+s+"-xlflmtcase").ej2_instances[0].checked,u.filterType=t.isNullOrUndefined(u.filterType)?"equal":u.filterType},placeholder:this.getLocalizedLabel("CustomFilterPlaceHolder"),enableRtl:l,actionComplete:function(e){var i=!t.isNullOrUndefined(r)&&_(r);e.result=e.result.filter(function(e,t,r){return r.map(function(e){return i?Ke(u.fields.value,e):e[u.fields.value]}).indexOf(i?Ke(u.fields.value,e):e[a.actObj.fields.value])===t})},text:o},h.filter.params));if(c&&"result"in c){var g=Te({requestType:"stringfilterrequest"},this.getQuery());this.parent.trigger("dataStateChange",g.state),g.deffered.promise.then(function(e){u.dataSource=new i.DataManager(e)})}u.appendTo(n),this.actObj=u},h}(bn),xn=function(){function i(e,t,i,r){this.contentRefresh=!0,this.isModelChanged=!0,this.aria=new er,this.currentTarget=null,this.parent=e,this.sortSettings=t,this.sortedColumns=i,this.serviceLocator=r,this.focus=r.getService("focus"),this.addEventListener(),this.setFullScreenDialog()}return i.prototype.updateModel=function(){var e,t={field:this.columnName,direction:this.direction},i=this.parent.groupSettings.columns,r=!1;if(this.isMultiSort)(e=this.getSortedColsIndexByField(this.columnName))>-1&&this.sortSettings.columns.splice(e,1),this.sortSettings.columns.push(t),this.sortSettings.columns=this.sortSettings.columns;else if(i.length){for(var n=[],o=0,s=i.length;o<s;o++)if(e=this.getSortedColsIndexByField(i[o],n),this.columnName===i[o])r=!0,n.push(t);else{var l=this.getSortColumnFromField(i[o]);n.push({field:l.field,direction:l.direction,isFromGroup:l.isFromGroup})}r||n.push(t),this.sortSettings.columns=n}else this.sortSettings.columns=[t];this.parent.dataBind(),this.lastSortedCol=this.columnName},i.prototype.onActionComplete=function(e){var i=this.isRemove?{requestType:"sorting",type:St}:{columnName:this.columnName,direction:this.direction,requestType:"sorting",type:St};this.isRemove=!1,this.parent.trigger(St,t.extend(e,i))},i.prototype.sortColumn=function(e,t,i){var r=this.parent;return!1===this.parent.getColumnByField(e).allowSorting||this.parent.isContextMenuOpen()?void this.parent.log("action_disabled_column",{moduleName:this.getModuleName(),columnName:e}):(r.allowMultiSorting||(i=r.allowMultiSorting),this.isActionPrevent()?void r.notify(ii,{instance:this,handler:this.sortColumn,arg1:e,arg2:t,arg3:i}):(this.backupSettings(),this.columnName=e,this.direction=t,this.isMultiSort=i,this.removeSortIcons(),this.updateSortedCols(e,i),void this.updateModel()))},i.prototype.setFullScreenDialog=function(){this.serviceLocator&&this.serviceLocator.registerAdaptiveService(this,this.parent.enableAdaptiveUI,e.ResponsiveDialogAction.isSort)},i.prototype.backupSettings=function(){this.lastSortedCols=R(this.sortSettings.columns),this.lastCols=this.sortedColumns},i.prototype.restoreSettings=function(){this.isModelChanged=!1,this.isMultiSort=!0,this.parent.setProperties({sortSettings:{columns:this.lastSortedCols}},!0),this.sortedColumns=this.lastCols,this.isModelChanged=!0},i.prototype.updateSortedCols=function(e,t){if(!t)if(this.parent.allowGrouping)for(var i=0,r=this.sortedColumns.length;i<r;i++)this.parent.groupSettings.columns.indexOf(this.sortedColumns[i])<0&&(this.sortedColumns.splice(i,1),r--,i--);else this.sortedColumns.splice(0,this.sortedColumns.length);this.sortedColumns.indexOf(e)<0&&this.sortedColumns.push(e)},i.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()){if(this.contentRefresh){var t=this.sortSettings.columns.length?{columnName:this.columnName,direction:this.direction,requestType:"sorting",type:bt,target:this.currentTarget,cancel:!1}:{requestType:"sorting",type:bt,cancel:!1,target:this.currentTarget};this.parent.notify(Lt,t)}this.refreshSortSettings(),this.removeSortIcons(),this.addSortIcons()}},i.prototype.refreshSortSettings=function(){this.sortedColumns.length=0;for(var e=this.sortSettings.columns,t=0;t<e.length;t++)e[t].isFromGroup||this.sortedColumns.push(e[t].field)},i.prototype.clearSorting=function(){var e=B(this.sortSettings.columns);if(this.isActionPrevent())return void this.parent.notify(ii,{instance:this,handler:this.clearSorting});for(var t=0,i=e.length;t<i;t++)this.removeSortColumn(e[t].field)},i.prototype.isActionPrevent=function(){return X(this.parent)},i.prototype.removeSortColumn=function(e){var t=this.parent,i=this.sortSettings.columns;if(!(0===i.length&&this.sortedColumns.indexOf(e)<0)){if(this.isActionPrevent())return void this.parent.notify(ii,{instance:this,handler:this.removeSortColumn,arg1:e});this.backupSettings(),this.removeSortIcons();for(var r=0,n=i.length;r<n;r++)if(i[r].field===e){if(t.allowGrouping&&t.groupSettings.columns.indexOf(i[r].field)>-1)continue;this.sortedColumns.splice(this.sortedColumns.indexOf(i[r].field),1),i.splice(r,1),this.isRemove=!0,this.isModelChanged&&this.parent.notify(Lt,{requestType:"sorting",type:bt,target:this.currentTarget});break}this.addSortIcons()}},i.prototype.getSortedColsIndexByField=function(e,t){for(var i=t||this.sortSettings.columns,r=0,n=i.length;r<n;r++)if(i[r].field===e)return r;return-1},i.prototype.getModuleName=function(){return"sort"},i.prototype.initialEnd=function(){if(this.parent.off(At,this.initialEnd),this.parent.getColumns().length&&this.sortSettings.columns.length){var e=this.parent;this.contentRefresh=!1,this.isMultiSort=this.sortSettings.columns.length>1;for(var t=0,i=e.sortSettings.columns.slice();t<i.length;t++){var r=i[t];this.sortedColumns.indexOf(r.field)>-1&&this.sortColumn(r.field,r.direction,!0)}this.isMultiSort=!1,this.contentRefresh=!0}},i.prototype.addEventListener=function(){this.parent.isDestroyed||(this.evtHandlers=[{event:"set-fullscreen-dialog",handler:this.setFullScreenDialog},{event:At,handler:this.initialEnd},{event:"sorting-complete",handler:this.onActionComplete},{event:Nt,handler:this.onPropertyChanged},{event:Gt,handler:this.clickHandler},{event:Ht,handler:this.refreshSortIcons},{event:Vt,handler:this.keyPressed},{event:"cancel-Begin",handler:this.cancelBeginEvent}],Xe(this.parent,this.evtHandlers,!0,this))},i.prototype.removeEventListener=function(){this.parent.isDestroyed||Xe(this.parent,this.evtHandlers,!1)},i.prototype.destroy=function(){this.isModelChanged=!1;var e=this.parent.element;e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.parent.element.querySelector(".e-gridpopup").getElementsByClassName("e-sortdirect").length&&(this.parent.element.querySelector(".e-gridpopup").style.display="none"),this.parent.refreshing||this.clearSorting(),this.isModelChanged=!0,this.removeEventListener())},i.prototype.cancelBeginEvent=function(e){"sorting"===e.requestType&&(this.restoreSettings(),this.refreshSortIcons(),this.isMultiSort=!0)},i.prototype.clickHandler=function(e){var i=this.parent;this.currentTarget=null,this.popUpClickHandler(e);var r=t.closest(e.target,".e-headercell");if(r&&!e.target.classList.contains("e-grptogglebtn")&&!r.classList.contains("e-resized")&&!e.target.classList.contains("e-rhandler")&&!e.target.classList.contains("e-columnmenu")&&!e.target.classList.contains("e-filtermenudiv")&&!O(e.target,"e-stackedheadercell")&&!(i.allowSelection&&i.selectionSettings.allowColumnSelection&&e.target.classList.contains("e-headercell"))){var n=this.parent.getColumnByUid(r.querySelector(".e-headercelldiv").getAttribute("e-mappinguid"));"checkbox"!==n.type&&(this.initiateSort(r,e,n),t.Browser.isDevice&&this.showPopUp(e))}if(r&&r.classList.remove("e-resized"),O(e.target,"e-excel-ascending")||O(e.target,"e-excel-descending")){var o=t.closest(e.target,".e-filter-popup").getAttribute("uid"),s=t.isNullOrUndefined(O(e.target,"e-excel-descending"))?"Ascending":"Descending";this.sortColumn(i.getColumnByUid(o).field,s,!1)}},i.prototype.keyPressed=function(e){var i=e.target;if(!this.parent.isEdit&&("enter"===e.action||"ctrlEnter"===e.action||"shiftEnter"===e.action)&&t.closest(i,".e-headercell")){var r=this.focus.getFocusedElement();if(t.isNullOrUndefined(r)||!r.classList.contains("e-headercell")||!r.querySelector(".e-headercelldiv"))return;var n=this.parent.getColumnByUid(r.querySelector(".e-headercelldiv").getAttribute("e-mappinguid"));this.initiateSort(r,e,n)}},i.prototype.initiateSort=function(e,t,i){var r=this.parent,n=i.field;this.currentTarget=t.target;var o=e.getElementsByClassName("e-ascending").length?"Descending":"Ascending";t.shiftKey||this.sortSettings.allowUnsort&&e.getElementsByClassName("e-descending").length&&!(r.groupSettings.columns.indexOf(n)>-1)?this.removeSortColumn(n):this.sortColumn(n,o,t.ctrlKey||this.enableSortMultiTouch||-1!==navigator.userAgent.indexOf("Mac OS")&&t.metaKey)},i.prototype.showPopUp=function(e){var i=t.closest(e.target,".e-headercell");!this.parent.allowMultiSorting||t.isNullOrUndefined(i)&&!this.parent.isContextMenuOpen()||z(this.parent.element.querySelector(".e-gridpopup"),e,"e-sortdirect e-icons e-icon-sortdirect"+(this.sortedColumns.length>1?" e-spanclicked":""))},i.prototype.popUpClickHandler=function(e){var i=e.target;t.closest(i,".e-headercell")||e.target.classList.contains(bi)||t.closest(i,".e-gridpopup")?i.classList.contains("e-sortdirect")&&(i.classList.contains("e-spanclicked")?(i.classList.remove("e-spanclicked"),this.enableSortMultiTouch=!1,this.parent.element.querySelector(".e-gridpopup").style.display="none"):(i.classList.add("e-spanclicked"),this.enableSortMultiTouch=!0)):this.parent.element.querySelector(".e-gridpopup").style.display="none"},i.prototype.addSortIcons=function(){for(var e,i,r=this.parent,n=this.sortSettings.columns,o=this.parent.getColumns().map(function(e){return e.field}),s=0,l=n.length;s<l;s++)e=r.getColumnHeaderByField(n[s].field),-1===o.indexOf(n[s].field)||t.isNullOrUndefined(e)||(this.aria.setSort(e,n[s].direction),this.isMultiSort&&n.length>1&&e.querySelector(".e-headercelldiv").insertBefore(this.parent.createElement("span",{className:"e-sortnumber",innerHTML:(s+1).toString()}),e.querySelector(".e-headertext")),i=e.querySelector(".e-sortfilterdiv"),"Ascending"===n[s].direction?t.classList(i,["e-ascending","e-icon-ascending"],[]):t.classList(i,["e-descending","e-icon-descending"],[]))},i.prototype.removeSortIcons=function(e){for(var i,r=this.parent,n=this.sortSettings.columns,o=this.parent.getColumns().map(function(e){return e.field}),s=e||0,l=t.isNullOrUndefined(e)?n.length:e+1;s<l;s++)i=r.getColumnHeaderByField(n[s].field),t.isNullOrUndefined(i)||r.allowGrouping&&r.groupSettings.columns.indexOf(n[s].field)>-1&&!i.querySelector(".e-sortfilterdiv")||-1!==o.indexOf(n[s].field)&&(this.aria.setSort(i,"none"),t.classList(i.querySelector(".e-sortfilterdiv"),[],["e-descending","e-icon-descending","e-ascending","e-icon-ascending"]),i.querySelector(".e-sortnumber")&&i.querySelector(".e-headercelldiv").removeChild(i.querySelector(".e-sortnumber")))},i.prototype.getSortColumnFromField=function(e){for(var t=0,i=this.sortSettings.columns.length;t<i;t++)if(this.sortSettings.columns[t].field===e)return this.sortSettings.columns[t];return!1},i.prototype.updateAriaAttr=function(){for(var e=this.parent.getColumns().map(function(e){return e.field}),t=0,i=this.sortedColumns;t<i.length;t++){var r=i[t];if(-1!==e.indexOf(r)){var n=this.parent.getColumnHeaderByField(r);this.aria.setSort(n,this.getSortColumnFromField(r).direction)}}},i.prototype.refreshSortIcons=function(e){void 0===e&&(e={args:{isFrozen:!1}}),e.args.isFrozen||(this.removeSortIcons(),this.isMultiSort=!0,this.removeSortIcons(),this.addSortIcons(),this.isMultiSort=!1,this.updateAriaAttr())},i.prototype.showCustomSort=function(e){this.responsiveDialogRenderer.isCustomDialog=e,this.responsiveDialogRenderer.showResponsiveDialog()},i}(),Fn=function(){function e(e){this.pagerModule=e}return e.prototype.render=function(){this.pagerElement=this.pagerModule.element,this.renderNumericContainer(),this.refreshNumericLinks(),this.wireEvents()},e.prototype.refresh=function(){this.pagerModule.updateTotalPages(),this.links.length&&this.updateLinksHtml(),this.updateStyles()},e.prototype.refreshNumericLinks=function(){var e,i=this.pagerModule,r=i.element.querySelector(".e-numericcontainer"),n=document.createDocumentFragment();r.innerHTML="";for(var o=1;o<=i.pageCount;o++)e=t.createElement("a",{className:"e-link e-numericitem e-spacing e-pager-default",attrs:{role:"link",tabindex:"-1","aria-label":"Goto Page "+o,href:"javascript:void(0);",name:"Goto page"+o}}),i.currentPage===o&&t.classList(e,["e-currentitem","e-active"],["e-pager-default"]),n.appendChild(e);r.appendChild(n),this.links=[].slice.call(r.childNodes)},e.prototype.wireEvents=function(){t.EventHandler.add(this.pagerElement,"click",this.clickHandler,this)},e.prototype.unwireEvents=function(){t.EventHandler.remove(this.pagerModule.element,"click",this.clickHandler)},e.prototype.destroy=function(){this.unwireEvents()},e.prototype.renderNumericContainer=function(){this.element=t.createElement("div",{className:"e-pagercontainer",attrs:{role:"navigation"}}),this.renderFirstNPrev(this.element),this.renderPrevPagerSet(this.element),this.element.appendChild(t.createElement("div",{className:"e-numericcontainer"})),this.renderNextPagerSet(this.element),this.renderNextNLast(this.element),this.pagerModule.element.appendChild(this.element)},e.prototype.renderFirstNPrev=function(e){this.first=t.createElement("div",{className:"e-first e-icons e-icon-first",attrs:{title:t.isBlazor()?this.pagerModule.getLocalizedLabel("FirstPageTooltip"):this.pagerModule.getLocalizedLabel("firstPageTooltip"),"aria-label":t.isBlazor()?this.pagerModule.getLocalizedLabel("FirstPageTooltip"):this.pagerModule.getLocalizedLabel("firstPageTooltip"),tabindex:"-1"}}),this.prev=t.createElement("div",{className:"e-prev e-icons e-icon-prev",attrs:{title:t.isBlazor()?this.pagerModule.getLocalizedLabel("PreviousPageTooltip"):this.pagerModule.getLocalizedLabel("previousPageTooltip"),"aria-label":t.isBlazor()?this.pagerModule.getLocalizedLabel("PreviousPageTooltip"):this.pagerModule.getLocalizedLabel("previousPageTooltip"),tabindex:"-1"}}),t.append([this.first,this.prev],e)},e.prototype.renderPrevPagerSet=function(e){var i=t.createElement("div");this.PP=t.createElement("a",{className:"e-link e-pp e-spacing",innerHTML:"...",attrs:{title:t.isBlazor()?this.pagerModule.getLocalizedLabel("PreviousPagerTooltip"):this.pagerModule.getLocalizedLabel("previousPagerTooltip"),role:"link","aria-label":t.isBlazor()?this.pagerModule.getLocalizedLabel("PreviousPagerTooltip"):this.pagerModule.getLocalizedLabel("previousPagerTooltip"),tabindex:"-1",name:t.isBlazor()?this.pagerModule.getLocalizedLabel("PreviousPagerTooltip"):this.pagerModule.getLocalizedLabel("previousPagerTooltip"),href:"javascript:void(0);"}}),i.appendChild(this.PP),e.appendChild(i)},e.prototype.renderNextPagerSet=function(e){var i=t.createElement("div");this.NP=t.createElement("a",{className:"e-link e-np e-spacing",innerHTML:"...",attrs:{title:t.isBlazor()?this.pagerModule.getLocalizedLabel("NextPagerTooltip"):this.pagerModule.getLocalizedLabel("nextPagerTooltip"),role:"link","aria-label":t.isBlazor()?this.pagerModule.getLocalizedLabel("NextPagerTooltip"):this.pagerModule.getLocalizedLabel("nextPagerTooltip"),tabindex:"-1",name:t.isBlazor()?this.pagerModule.getLocalizedLabel("NextPagerTooltip"):this.pagerModule.getLocalizedLabel("nextPagerTooltip"),href:"javascript:void(0);"}}),i.appendChild(this.NP),e.appendChild(i)},e.prototype.renderNextNLast=function(e){this.next=t.createElement("div",{className:"e-next e-icons e-icon-next",attrs:{title:t.isBlazor()?this.pagerModule.getLocalizedLabel("NextPageTooltip"):this.pagerModule.getLocalizedLabel("nextPageTooltip"),"aria-label":t.isBlazor()?this.pagerModule.getLocalizedLabel("NextPageTooltip"):this.pagerModule.getLocalizedLabel("nextPageTooltip"),tabindex:"-1"}}),this.last=t.createElement("div",{className:"e-last e-icons e-icon-last",attrs:{title:t.isBlazor()?this.pagerModule.getLocalizedLabel("LastPageTooltip"):this.pagerModule.getLocalizedLabel("lastPageTooltip"),"aria-label":t.isBlazor()?this.pagerModule.getLocalizedLabel("LastPageTooltip"):this.pagerModule.getLocalizedLabel("lastPageTooltip"),tabindex:"-1"}}),t.append([this.next,this.last],e)},e.prototype.clickHandler=function(e){var i=this.pagerModule,r=e.target;return i.previousPageNo=i.currentPage,r.classList.contains("e-disable")||t.isNullOrUndefined(r.getAttribute("index"))||(i.currentPage=parseInt(r.getAttribute("index"),10),i.dataBind()),!1},e.prototype.updateLinksHtml=function(){var e,i,r=this.pagerModule;r.currentPage=1===r.totalPages?1:r.currentPage,r.currentPage>r.totalPages&&r.totalPages&&(r.currentPage=r.totalPages),e=parseInt((r.currentPage/r.pageCount).toString(),10),r.currentPage%r.pageCount==0&&e>0&&(e-=1);for(var n=0;n<r.pageCount;n++)(i=e*r.pageCount+1+n)<=r.totalPages?(this.links[n].style.display="",this.links[n].setAttribute("index",i.toString()),this.links[n].innerHTML=r.customText?r.customText+i:i.toString(),r.currentPage!==i?this.links[n].classList.add("e-pager-default"):this.links[n].classList.remove("e-pager-default")):(this.links[n].innerHTML=r.customText?r.customText+i:i.toString(),this.links[n].style.display="none"),t.classList(this.links[n],[],["e-currentitem","e-active"]);this.first.setAttribute("index","1"),this.last.setAttribute("index",r.totalPages.toString()),this.prev.setAttribute("index",(r.currentPage-1).toString()),this.next.setAttribute("index",(r.currentPage+1).toString()),this.pagerElement.querySelector(".e-mfirst").setAttribute("index","1"),this.pagerElement.querySelector(".e-mlast").setAttribute("index",r.totalPages.toString()),this.pagerElement.querySelector(".e-mprev").setAttribute("index",(r.currentPage-1).toString()),this.pagerElement.querySelector(".e-mnext").setAttribute("index",(r.currentPage+1).toString()),this.PP.setAttribute("index",(parseInt(this.links[0].getAttribute("index"),10)-r.pageCount).toString()),this.NP.setAttribute("index",(parseInt(this.links[this.links.length-1].getAttribute("index"),10)+1).toString())},e.prototype.updateStyles=function(){this.updateFirstNPrevStyles(),this.updatePrevPagerSetStyles(),this.updateNextPagerSetStyles(),this.updateNextNLastStyles(),this.links.length&&t.classList(this.links[(this.pagerModule.currentPage-1)%this.pagerModule.pageCount],["e-currentitem","e-active"],[])},e.prototype.updateFirstNPrevStyles=function(){var e=["e-firstpage","e-pager-default"],i=["e-firstpagedisabled","e-disable"],r=["e-prevpage","e-pager-default"],n=["e-prevpagedisabled","e-disable"];this.pagerModule.totalPages>0&&this.pagerModule.currentPage>1?(t.classList(this.prev,r,n),t.classList(this.first,e,i),t.classList(this.pagerElement.querySelector(".e-mfirst"),e,i),t.classList(this.pagerElement.querySelector(".e-mprev"),r,n)):(t.classList(this.prev,n,r),t.classList(this.first,i,e),t.classList(this.pagerElement.querySelector(".e-mprev"),n,r),t.classList(this.pagerElement.querySelector(".e-mfirst"),i,e))},e.prototype.updatePrevPagerSetStyles=function(){this.pagerModule.currentPage>this.pagerModule.pageCount?t.classList(this.PP,["e-numericitem","e-pager-default"],["e-nextprevitemdisabled","e-disable"]):t.classList(this.PP,["e-nextprevitemdisabled","e-disable"],["e-numericitem","e-pager-default"])},e.prototype.updateNextPagerSetStyles=function(){var e=this.pagerModule,i=this.links[0].innerHTML.replace(e.customText,"");!i.length||!this.links.length||parseInt(i,10)+e.pageCount>e.totalPages?t.classList(this.NP,["e-nextprevitemdisabled","e-disable"],["e-numericitem","e-pager-default"]):t.classList(this.NP,["e-numericitem","e-pager-default"],["e-nextprevitemdisabled","e-disable"])},e.prototype.updateNextNLastStyles=function(){var e=["e-lastpage","e-pager-default"],i=["e-lastpagedisabled","e-disable"],r=["e-nextpage","e-pager-default"],n=["e-nextpagedisabled","e-disable"],o=this.pagerModule;o.currentPage===o.totalPages||0===o.totalRecordsCount?(t.classList(this.last,i,e),t.classList(this.next,n,r),t.classList(this.pagerElement.querySelector(".e-mlast"),i,e),t.classList(this.pagerElement.querySelector(".e-mnext"),n,r)):(t.classList(this.last,e,i),t.classList(this.next,r,n),t.classList(this.pagerElement.querySelector(".e-mlast"),e,i),t.classList(this.pagerElement.querySelector(".e-mnext"),r,n))},e}(),En=function(){function e(e){this.pagerModule=e}return e.prototype.render=function(){var e=t.createElement("div",{className:"e-parentmsgbar",attrs:{"aria-label":"Pager Information"}});this.pageNoMsgElem=t.createElement("span",{className:"e-pagenomsg",styles:"textalign:right"}),this.pageCountMsgElem=t.createElement("span",{className:"e-pagecountmsg",styles:"textalign:right"}),t.append([this.pageNoMsgElem,this.pageCountMsgElem],e),this.pagerModule.element.appendChild(e),this.refresh()},e.prototype.refresh=function(){var e=this.pagerModule;t.isBlazor()?(this.pageNoMsgElem.textContent=this.format(e.getLocalizedLabel("CurrentPageInfo"),[0===e.totalRecordsCount?0:e.currentPage,e.totalPages||0])+" ",this.pageCountMsgElem.textContent=this.format(e.getLocalizedLabel("TotalItemsInfo"),[e.totalRecordsCount||0])):(this.pageNoMsgElem.textContent=this.format(e.getLocalizedLabel("currentPageInfo"),[0===e.totalRecordsCount?0:e.currentPage,e.totalPages||0,e.totalRecordsCount||0])+" ",this.pageCountMsgElem.textContent=this.format(e.getLocalizedLabel(e.totalRecordsCount<=1?"totalItemInfo":"totalItemsInfo"),[e.totalRecordsCount||0,e.totalRecordsCount?e.pageSize*(e.currentPage-1)+1:0,e.pageSize*e.currentPage>e.totalRecordsCount?e.totalRecordsCount:e.pageSize*e.currentPage])),this.pageNoMsgElem.parentElement.setAttribute("aria-label",this.pageNoMsgElem.textContent+this.pageCountMsgElem.textContent)},e.prototype.hideMessage=function(){this.pageNoMsgElem&&(this.pageNoMsgElem.style.display="none"),this.pageCountMsgElem&&(this.pageCountMsgElem.style.display="none")},e.prototype.showMessage=function(){this.pageNoMsgElem||this.render(),this.pageNoMsgElem.style.display="",this.pageCountMsgElem.style.display=""},e.prototype.destroy=function(){},e.prototype.format=function(e,t){for(var i,r=0;r<t.length;r++)i=new RegExp("\\{"+r+"\\}","gm"),e=e.replace(i,t[r].toString());return e},e}(),In=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Tn=function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(s=(o<3?n(s):o>3?n(t,i,s):n(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},zn=function(e){function i(t,i){var r=e.call(this,t,i)||this;return r.hasParent=!1,r.pageRefresh="pager-refresh",r}return In(i,e),i.prototype.requiredModules=function(){var e=[];return this.enableExternalMessage&&e.push({member:"externalMessage",args:[this]}),this.checkpagesizes()&&e.push({member:"pagerdropdown",args:[this]}),e},i.prototype.preRender=function(){this.defaultConstants={currentPageInfo:"{0} of {1} pages",totalItemsInfo:"({0} items)",totalItemInfo:"({0} item)",firstPageTooltip:"Go to first page",lastPageTooltip:"Go to last page",nextPageTooltip:"Go to next page",previousPageTooltip:"Go to previous page",nextPagerTooltip:"Go to next pager",previousPagerTooltip:"Go to previous pager",pagerDropDown:"Items per page",pagerAllDropDown:"Items",CurrentPageInfo:"{0} of {1} pages",TotalItemsInfo:"({0} items)",FirstPageTooltip:"Go to first page",LastPageTooltip:"Go to last page",NextPageTooltip:"Go to next page",PreviousPageTooltip:"Go to previous page",NextPagerTooltip:"Go to next pager",PreviousPagerTooltip:"Go to previous pager",PagerDropDown:"Items per page",PagerAllDropDown:"Items",All:"All"},this.containerModule=new Fn(this),this.pagerMessageModule=new En(this)},i.prototype.render=function(){this.template?this.isReactTemplate()?(this.on(this.pageRefresh,this.pagerTemplate,this),this.notify(this.pageRefresh,{})):this.pagerTemplate():(this.initLocalization(),this.updateRTL(),this.totalRecordsCount=this.totalRecordsCount||0,this.renderFirstPrevDivForDevice(),this.containerModule.render(),this.enablePagerMessage&&this.pagerMessageModule.render(),this.renderNextLastDivForDevice(),this.checkpagesizes()&&this.pagerdropdownModule&&this.pagerdropdownModule.render(),this.addAriaLabel(),this.enableExternalMessage&&this.externalMessageModule&&this.externalMessageModule.render(),this.refresh(),this.trigger("created",{currentPage:this.currentPage,totalRecordsCount:this.totalRecordsCount}))},i.prototype.getPersistData=function(){var e=["currentPage","pageSize"];return this.addOnPersist(e)},i.prototype.destroy=function(){this.isReactTemplate()&&(this.off(this.pageRefresh,this.pagerTemplate),this.hasParent||this.destroyTemplate(["template"])),e.prototype.destroy.call(this),this.containerModule.destroy(),this.pagerMessageModule.destroy(),this.isReactTemplate()||(this.element.innerHTML="")},i.prototype.destroyTemplate=function(e,t){this.clearTemplate(e,t)},i.prototype.getModuleName=function(){return"pager"},i.prototype.onPropertyChanged=function(e,t){if(!this.isDestroyed){e.pageCount!==t.pageCount&&(this.containerModule.refreshNumericLinks(),this.containerModule.refresh());for(var i=0,r=Object.keys(e);i<r.length;i++)switch(r[i]){case"currentPage":this.checkGoToPage(e.currentPage,t.currentPage)&&this.currentPageChanged(e,t);break;case"pageSize":case"totalRecordsCount":case"customText":this.checkpagesizes()&&this.pagerdropdownModule&&(t.pageSize!==e.pageSize&&(this.currentPage=1),this.pagerdropdownModule.setDropDownValue("value",this.pageSize)),e.pageSize!==t.pageSize?(this.pageSize=e.pageSize,this.currentPageChanged(e,t)):this.refresh();break;case"pageSizes":this.checkpagesizes()&&this.pagerdropdownModule&&(this.pagerdropdownModule.destroy(),this.pagerdropdownModule.render()),this.refresh();break;case"template":this.templateFn=this.compile(this.template),this.refresh();break;case"locale":this.initLocalization(),this.refresh();break;case"enableExternalMessage":this.enableExternalMessage&&this.externalMessageModule&&this.externalMessageModule.render();break;case"externalMessage":this.externalMessageModule&&this.externalMessageModule.refresh();break;case"enableRtl":this.updateRTL();break;case"enablePagerMessage":this.enablePagerMessage?this.pagerMessageModule.showMessage():this.pagerMessageModule.hideMessage()}}},i.prototype.getLocalizedLabel=function(e){return this.localeObj.getConstant(e)},i.prototype.goToPage=function(e){this.checkGoToPage(e)&&(this.currentPage=e,this.dataBind())},i.prototype.setPageSize=function(e){this.pageSize=e,this.dataBind()},i.prototype.checkpagesizes=function(){return!(!0!==this.pageSizes&&!this.pageSizes.length)},i.prototype.checkGoToPage=function(e,i){return e!==this.currentPage&&(this.previousPageNo=this.currentPage),t.isNullOrUndefined(i)||(this.previousPageNo=i),this.previousPageNo!==e&&e>=1&&e<=this.totalPages},i.prototype.currentPageChanged=function(e,t){if(this.enableQueryString&&this.updateQueryString(this.currentPage),e.currentPage!==t.currentPage||e.pageSize!==t.pageSize){var i={currentPage:this.currentPage,newProp:e,oldProp:t,cancel:!1};this.trigger("click",i),i.cancel||this.refresh()}},i.prototype.pagerTemplate=function(){if(!this.isReactTemplate()||!this.hasParent){var e;this.element.classList.add("e-pagertemplate"),this.compile(this.template);var i={currentPage:this.currentPage,pageSize:this.pageSize,pageCount:this.pageCount,totalRecordsCount:this.totalRecordsCount,totalPages:this.totalPages},r=this.element.parentElement.id+"_template";this.isReactTemplate()?(this.getPagerTemplate()(i,this,"template",r,null,null,this.element),this.renderReactTemplates()):(e=t.isBlazor()?this.getPagerTemplate()(i,this,"template",r,this.isStringTemplate):this.isVue?this.getPagerTemplate()(i,this):this.getPagerTemplate()(i),q(this.element,e))}},i.prototype.updateTotalPages=function(){this.totalPages=this.totalRecordsCount%this.pageSize==0?this.totalRecordsCount/this.pageSize:parseInt((this.totalRecordsCount/this.pageSize).toString(),10)+1},i.prototype.getPagerTemplate=function(){return this.templateFn},i.prototype.compile=function(e){if(e)try{document.querySelectorAll(e).length&&(this.templateFn=t.compile(document.querySelector(e).innerHTML.trim()))}catch(i){this.templateFn=t.compile(e)}},i.prototype.refresh=function(){this.template?this.isReactTemplate()?(this.updateTotalPages(),this.notify(this.pageRefresh,{})):(this.element.innerHTML="",this.updateTotalPages(),this.pagerTemplate()):(this.updateRTL(),this.containerModule.refresh(),this.enablePagerMessage&&this.pagerMessageModule.refresh(),this.pagerdropdownModule&&this.pagerdropdownModule.refresh(),this.enableExternalMessage&&this.externalMessageModule&&this.externalMessageModule.refresh())},i.prototype.updateRTL=function(){this.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")},i.prototype.initLocalization=function(){this.localeObj=new t.L10n(this.getModuleName(),this.defaultConstants,this.locale)},i.prototype.updateQueryString=function(e){var t=this.getUpdatedURL(window.location.href,"page",e.toString());window.history.pushState({path:t},"",t)},i.prototype.getUpdatedURL=function(e,t,i){var r=new RegExp("([?|&])"+t+"=.*?(&|#|$)","i");if(e.match(r))return e.replace(r,"$1"+t+"="+i+"$2");var n="";return-1!==e.indexOf("#")&&(n=e.replace(/.*#/,"#"),e=e.replace(/#.*/,"")),e+(-1!==e.indexOf("?")?"&":"?")+t+"="+i+n},i.prototype.renderFirstPrevDivForDevice=function(){this.element.appendChild(t.createElement("div",{className:"e-mfirst e-icons e-icon-first",attrs:{title:t.isBlazor()?this.getLocalizedLabel("FirstPageTooltip"):this.getLocalizedLabel("firstPageTooltip"),tabindex:"-1"}})),this.element.appendChild(t.createElement("div",{className:"e-mprev e-icons e-icon-prev",attrs:{title:t.isBlazor()?this.getLocalizedLabel("PreviousPageTooltip"):this.getLocalizedLabel("previousPageTooltip"),tabindex:"-1"}}))},i.prototype.renderNextLastDivForDevice=function(){this.element.appendChild(t.createElement("div",{className:"e-mnext e-icons e-icon-next",attrs:{title:t.isBlazor()?this.getLocalizedLabel("NextPageTooltip"):this.getLocalizedLabel("nextPageTooltip"),tabindex:"-1"}})),this.element.appendChild(t.createElement("div",{className:"e-mlast e-icons e-icon-last",attrs:{title:t.isBlazor()?this.getLocalizedLabel("LastPageTooltip"):this.getLocalizedLabel("lastPageTooltip"),tabindex:"-1"}}))},i.prototype.addAriaLabel=function(){var e=[".e-mfirst",".e-mprev",".e-mnext",".e-mlast"];if(!t.Browser.isDevice)for(var i=0;i<e.length;i++){var r=this.element.querySelector(e[i]);r.setAttribute("aria-label",r.getAttribute("title"))}},i.prototype.isReactTemplate=function(){return this.isReact&&this.template&&"string"!=typeof this.template},Tn([t.Property(!1)],i.prototype,"enableQueryString",void 0),Tn([t.Property(!1)],i.prototype,"enableExternalMessage",void 0),Tn([t.Property(!0)],i.prototype,"enablePagerMessage",void 0),Tn([t.Property(12)],i.prototype,"pageSize",void 0),Tn([t.Property(10)],i.prototype,"pageCount",void 0),Tn([t.Property(1)],i.prototype,"currentPage",void 0),Tn([t.Property()],i.prototype,"totalRecordsCount",void 0),Tn([t.Property()],i.prototype,"externalMessage",void 0),Tn([t.Property(!1)],i.prototype,"pageSizes",void 0),Tn([t.Property()],i.prototype,"template",void 0),Tn([t.Property("")],i.prototype,"customText",void 0),Tn([t.Event()],i.prototype,"click",void 0),Tn([t.Event()],i.prototype,"dropDownChanged",void 0),Tn([t.Event()],i.prototype,"created",void 0),i=Tn([t.NotifyPropertyChanges],i)}(t.Component),Dn=function(){function e(e){this.pagerModule=e}return e.prototype.getModuleName=function(){return"pagerdropdown"},e.prototype.render=function(){var e=this.pagerModule;this.pagerDropDownDiv=t.createElement("div",{className:"e-pagesizes"});var i=t.createElement("div",{className:"e-pagerdropdown"}),r=t.createElement("div",{className:"e-pagerconstant"}),n=t.createElement("input",{attrs:{type:"text",tabindex:"1"}});this.pagerCons=t.createElement("span",{className:"e-constant",innerHTML:t.isBlazor()?this.pagerModule.getLocalizedLabel("PagerDropDown"):this.pagerModule.getLocalizedLabel("pagerDropDown")}),i.appendChild(n),r.appendChild(this.pagerCons),this.pagerDropDownDiv.appendChild(i),this.pagerDropDownDiv.appendChild(r),this.pagerModule.element.appendChild(this.pagerDropDownDiv);var o=this.pagerModule.pageSizes,l=o.length?this.convertValue(o):[this.pagerModule.getLocalizedLabel("All"),"5","10","12","20"],a=this.pagerModule.pageSize;this.dropDownListObject=new s.DropDownList({dataSource:l,value:a.toString(),change:this.onChange.bind(this),cssClass:"e-alldrop"}),this.dropDownListObject.appendTo(n),o.length&&(this.dropDownListObject.element.value=this.pagerModule.pageSize.toString()),e.pageSize=a,e.dataBind(),e.trigger("dropDownChanged",{pageSize:a}),this.addEventListener()},e.prototype.onChange=function(e){this.dropDownListObject.value===this.pagerModule.getLocalizedLabel("All")?(this.pagerModule.pageSize=this.pagerModule.totalRecordsCount,this.refresh(),e.value=this.pagerModule.pageSize,document.getElementsByClassName("e-popup-open e-alldrop").length&&(document.getElementsByClassName("e-popup-open e-alldrop")[0].style.display="none")):(this.pagerModule.pageSize=parseInt(this.dropDownListObject.value,10),this.pagerCons.innerHTML!==this.pagerModule.getLocalizedLabel("pagerDropDown")&&this.refresh()),this.pagerModule.dataBind(),this.pagerModule.trigger("dropDownChanged",{pageSize:parseInt(this.dropDownListObject.value,10)})},e.prototype.refresh=function(){this.pagerCons&&(this.pagerModule.pageSize===this.pagerModule.totalRecordsCount?this.pagerCons.innerHTML=t.isBlazor()?this.pagerModule.getLocalizedLabel("PagerAllDropDown"):this.pagerModule.getLocalizedLabel("pagerAllDropDown"):this.pagerCons.innerHTML=t.isBlazor()?this.pagerModule.getLocalizedLabel("PagerDropDown"):this.pagerModule.getLocalizedLabel("pagerDropDown"))},e.prototype.beforeValueChange=function(e){if("number"==typeof e.newProp.value){var t=e.newProp.value.toString();e.newProp.value=t}},e.prototype.convertValue=function(e){for(var t=e,i=0;i<t.length;i++)t[i]=parseInt(t[i],10)?t[i].toString():""!==this.pagerModule.getLocalizedLabel(t[i])?this.pagerModule.getLocalizedLabel(t[i]):t[i];return t},e.prototype.setDropDownValue=function(e,t){this.dropDownListObject&&(this.dropDownListObject[e]=t)},e.prototype.addEventListener=function(){this.dropDownListObject.on("beforeValueChange",this.beforeValueChange,this)},e.prototype.removeEventListener=function(){this.dropDownListObject.off("beforeValueChange",this.beforeValueChange)},e.prototype.destroy=function(e){this.dropDownListObject&&!this.dropDownListObject.isDestroyed&&(this.removeEventListener(),this.dropDownListObject.destroy(),t.remove(this.pagerDropDownDiv))},e}(),Mn=function(){function e(e){this.pagerModule=e}return e.prototype.getModuleName=function(){return"externalMessage"},e.prototype.render=function(){this.element=t.createElement("div",{className:"e-pagerexternalmsg",attrs:{"aria-label":"Pager external message"}}),this.pagerModule.element.appendChild(this.element),this.refresh()},e.prototype.refresh=function(){this.pagerModule.externalMessage&&this.pagerModule.externalMessage.toString().length?(this.showMessage(),this.element.innerHTML=this.pagerModule.externalMessage):this.hideMessage()},e.prototype.hideMessage=function(){t.isNullOrUndefined(this.element)||(this.element.style.display="none")},e.prototype.showMessage=function(){this.element.style.display=""},e.prototype.destroy=function(){t.remove(this.element)},e}(),On=function(){function e(e,t){this.isInitialRender=!0,zn.Inject(Mn,Dn),this.parent=e,this.pageSettings=t,this.addEventListener()}return e.prototype.getModuleName=function(){return"pager"},e.prototype.render=function(){var e=this.parent;this.pagerDestroy(),t.isNullOrUndefined(this.parent.pagerTemplate)||(this.pageSettings.template=this.parent.pagerTemplate,this.parent.pageTemplateChange=!0),this.element=this.parent.createElement("div",{className:"e-gridpager"});var i=E({},t.extend({},M(this.pageSettings)),{click:this.clickHandler.bind(this),dropDownChanged:this.onSelect.bind(this),enableRtl:e.enableRtl,locale:e.locale,created:this.addAriaAttr.bind(this)},["parentObj","propName"]);this.pagerObj=new zn(i),this.pagerObj.hasParent=!0,this.pagerObj.on("pager-refresh",this.renderReactPagerTemplate,this),this.pagerObj.allowServerDataBinding=!1},e.prototype.onSelect=function(e){this.pageSettings.pageSize=e.pageSize,this.isInitialLoad||(this.pageSettings.currentPage=1)},e.prototype.addAriaAttr=function(){if(!this.pageSettings.template){for(var e=this.parent.createElement("div",{className:"e-numericcontainer"}),t=this.element.querySelector(".e-pagercontainer"),i=document.createDocumentFragment(),r=this.element.querySelector(".e-numericcontainer"),n=r.querySelectorAll("a"),o=0;o<n.length;o++){this.parent.getContentTable()?n[o].setAttribute("aria-owns",this.parent.getContentTable().id):n[o].setAttribute("aria-owns",this.parent.element.getAttribute("id")+"_content_table");var s=this.parent.createElement("div");s.appendChild(n[o]),i.appendChild(s)}e.appendChild(i),t.replaceChild(e,r);for(var l=[".e-mfirst",".e-mprev",".e-first",".e-prev",".e-next",".e-last",".e-mnext",".e-mlast"],a=0;a<l.length;a++){var h=this.element.querySelector(l[a]);this.parent.getContentTable()&&h.setAttribute("aria-owns",this.parent.getContentTable().id)}}},e.prototype.dataReady=function(e){this.updateModel(e)},e.prototype.refresh=function(){this.pagerObj.refresh()},e.prototype.goToPage=function(e){this.pagerObj.goToPage(e)},e.prototype.setPageSize=function(e){this.pagerObj.setPageSize(e)},e.prototype.updateModel=function(e){this.parent.pageSettings.totalRecordsCount=e.count,this.parent.dataBind()},e.prototype.onActionComplete=function(e){this.parent.trigger(St,t.extend(e,{currentPage:this.parent.pageSettings.currentPage,requestType:"paging",type:St}))},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()){for(var t=e.properties,i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];this.pagerObj[n]=t[n]}this.pagerObj.dataBind()}},e.prototype.clickHandler=function(e){var i=this.parent;if(this.isForceCancel||X(i)&&!i.prevPageMoving)return this.isForceCancel?this.isForceCancel=!1:(t.isNullOrUndefined(e.newProp)||t.isNullOrUndefined(e.newProp.pageSize)?e.currentPage&&(i.notify(ii,{instance:this,handler:this.goToPage,arg1:e.currentPage}),this.pagerObj.currentPage=i.pageSettings.currentPage===this.pagerObj.currentPage?this.pagerObj.previousPageNo:i.pageSettings.currentPage):(i.notify(ii,{instance:this,handler:this.setPageSize,arg1:e.newProp.pageSize}),this.pagerObj.pageSize=e.oldProp.pageSize,i.pageSettings.pageSize=e.newProp.pageSize),this.isForceCancel=!0,this.pagerObj.dataBind()),void(e.cancel=!0);i.pageSettings.pageSize=this.pagerObj.pageSize,i.prevPageMoving=!1;var r=this.pageSettings.currentPage;this.pageSettings.currentPage=e.currentPage;var n={cancel:!1,requestType:"paging",previousPage:r,currentPage:e.currentPage,type:bt};this.parent.notify(Lt,n),n.cancel&&(e.cancel=!0),this.parent.requestTypeAction="paging"},e.prototype.keyPressHandler=function(e){e.action in kn&&(e.preventDefault(),this.element.querySelector(kn[e.action]).click())},e.prototype.updateExternalMessage=function(e){this.pagerObj.enableExternalMessage||(this.pagerObj.enableExternalMessage=!0,this.pagerObj.dataBind()),this.pagerObj.externalMessage=e,this.pagerObj.dataBind()},e.prototype.appendToElement=function(){this.isInitialLoad=!0,this.parent.element.appendChild(this.element),this.parent.setGridPager(this.element),this.pagerObj.isReact=this.parent.isReact,this.pagerObj.isVue=this.parent.isVue,this.pagerObj.appendTo(this.element),this.isInitialLoad=!1},e.prototype.enableAfterRender=function(e){e.module===this.getModuleName()&&e.enable&&(this.render(),this.appendToElement(),this.isReactTemplate()&&(this.pagerObj.updateTotalPages(),this.created()))},e.prototype.addEventListener=function(){this.handlers={load:this.render,end:this.appendToElement,ready:this.dataReady,complete:this.onActionComplete,updateLayout:this.enableAfterRender,inboundChange:this.onPropertyChanged,keyPress:this.keyPressHandler,created:this.created},this.parent.isDestroyed||(this.parent.isReact&&this.parent.addEventListener("create",this.handlers.created.bind(this)),this.evtHandlers=[{event:Mt,handler:this.handlers.load},{event:Ot,handler:this.handlers.end},{event:kt,handler:this.handlers.ready},{event:"paging-complete",handler:this.handlers.complete},{event:Bt,handler:this.handlers.updateLayout},{event:Nt,handler:this.handlers.inboundChange},{event:Vt,handler:this.handlers.keyPress}],Xe(this.parent,this.evtHandlers,!0,this))},e.prototype.created=function(){this.isInitialRender&&this.isReactTemplate()&&(this.isInitialRender=!1,this.renderReactPagerTemplate())},e.prototype.isReactTemplate=function(){return this.parent.isReact&&this.pagerObj.template&&"string"!=typeof this.pagerObj.template},e.prototype.renderReactPagerTemplate=function(){if(!this.isInitialRender&&this.isReactTemplate()){this.parent.destroyTemplate(["pagerTemplate"]),this.element.classList.add("e-pagertemplate"),this.pagerObj.compile(this.pagerObj.template);var e=this.parent.pageSettings,t={currentPage:e.currentPage,pageSize:e.pageSize,pageCount:e.pageCount,totalRecordsCount:e.totalRecordsCount,totalPages:this.pagerObj.totalPages},i=this.parent.id+"_pagertemplate";this.pagerObj.templateFn(t,this.parent,"pagerTemplate",i,null,null,this.pagerObj.element),this.parent.renderTemplates()}},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.isReact&&this.parent.removeEventListener("create",this.handlers.created),this.parent.off("pager-refresh",this.renderReactPagerTemplate),Xe(this.parent,this.evtHandlers,!1))},e.prototype.destroy=function(){this.removeEventListener(),this.isReactTemplate()&&this.parent.destroyTemplate(["pagerTemplate"]),this.pagerObj.destroy()},e.prototype.pagerDestroy=function(){this.pagerObj&&!this.pagerObj.isDestroyed&&(this.pagerObj.destroy(),t.remove(this.element))},e}(),kn={pageUp:".e-prev",pageDown:".e-next",ctrlAltPageDown:".e-last",ctrlAltPageUp:".e-first",altPageUp:".e-pp",altPageDown:".e-np"},An=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bn=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TH",{className:"e-filterbarcell"}),t}return An(i,e),i.prototype.getGui=function(){return this.parent.createElement("div")},i.prototype.render=function(e,i){var r,n=this.parent.element.querySelector(".e-filterbar"),s=this.element.cloneNode(),l=this.getGui(),a=e.column;if(n.appendChild(s),s.setAttribute("e-mappinguid",a.uid),a.filterTemplate){var h={};i&&(h[a.field]=i[a.field]);if(h.column=a,a.visible){var d=this.parent.isReact&&"string"!=typeof a.filterTemplate,c=this.parent.element.id+a.uid+"filterTemplate";d?(a.getFilterTemplate()(h,this.parent,"filterTemplate",c,null,null,s),this.parent.renderTemplates()):q(s,a.getFilterTemplate()(h,this.parent,"filterTemplate",c))}else s.classList.add("e-hide")}else if("checkbox"!==a.type){if(!t.isNullOrUndefined(a.allowFiltering)&&!a.allowFiltering||t.isNullOrUndefined(a.filterBarTemplate)){t.attributes(l,{class:"e-filterdiv e-fltrinputdiv"}),r=this.parent.createElement("input",{id:a.field+"_filterBarcell",className:"e-filtertext",attrs:{type:"search",title:a.headerText+e.attributes.title,value:i[e.column.field]?i[e.column.field]:"",role:"search"}}),l.appendChild(r);p={element:r,floatLabelType:"Never",properties:{enableRtl:this.parent.enableRtl,showClearButton:!0}};o.Input.createInput(p,this.parent.createElement)}else if(s.classList.add("e-fltrtemp"),t.attributes(l,{class:"e-fltrtempdiv"}),t.isNullOrUndefined(a.filterBarTemplate.create))r=this.parent.createElement("input",{id:a.field+"_filterBarcell",className:"e-filterUi_input e-filtertext e-fltrTemp",attrs:{type:"search",title:a.headerText}}),l.appendChild(r);else{var p={column:a,node:Element},u=a.filterBarTemplate.create;if("string"==typeof u&&(u=t.getValue(u,window)),"string"==typeof(r=u(p))){var g=this.parent.createElement("div");g.innerHTML=r,r=g.firstChild}t.attributes(l,{class:"e-filterUi_input e-filtertext e-fltrTemp",title:a.headerText,id:a.field+"_filterBarcell"}),l.appendChild(r)}if((!1===a.allowFiltering||""===a.field||t.isNullOrUndefined(a.field))&&(r.setAttribute("disabled","true"),r.classList.add("e-disable")),a.visible||s.classList.add("e-hide"),this.appendHtml(s,l),this.parent.filterSettings.showFilterBarOperator&&"FilterBar"===this.parent.filterSettings.type&&!this.parent.isPrinting&&t.isNullOrUndefined(a.filterTemplate)&&this.operatorIconRender(l,a,e),(t.isNullOrUndefined(a.allowFiltering)||a.allowFiltering)&&!t.isNullOrUndefined(a.filterBarTemplate)){var f=a.filterBarTemplate.write,p={element:r,column:a};"string"==typeof f&&(f=t.getValue(f,window)),f.call(this,p)}}return s},i.prototype.appendHtml=function(e,t){return e.appendChild(t),e},i.prototype.operatorIconRender=function(e,i,r){var n=this.parent,o=this.parent.createElement("input",{className:" e-filterbaroperator e-icons e-icon-filter",id:r.column.uid});e.querySelector("span").appendChild(o);var l=i.filter&&i.filter.operator?i.filter.operator:"equal";t.isNullOrUndefined(n.filterModule.operators[i.field])||(l=n.filterModule.operators[i.field]),this.dropOptr=new s.DropDownList({fields:{text:"text",value:"value"},popupHeight:"auto",value:l,width:"0px",enabled:i.allowFiltering,popupWidth:"auto",enableRtl:this.parent.enableRtl,change:this.internalEvent.bind(this),beforeOpen:function(){var e=n.filterModule.customOperators;this.dataSource=e[n.getColumnByUid(this.element.id).type+"Operator"];for(var r=0;r<this.dataSource.length;r++)i.filter&&i.filter.operator&&t.isNullOrUndefined(n.filterModule.operators[i.field])&&this.dataSource[r].value===i.filter.operator&&(this.value=i.filter.operator)}}),this.dropOptr.appendTo(o);var a=t.closest(this.dropOptr.element,"span");a.classList.add("e-filterbardropdown"),a.removeAttribute("tabindex")},i.prototype.internalEvent=function(e){var t=this.parent,i=t.getColumnByUid(e.element.getAttribute("id"));e.column=i,t.filterModule.operators[i.field]=e.value,t.notify("get-filterbar-operator",e)},i}($i),Pn=function(){function e(e,t,i,r){this.parent=e,this.serviceLocator=i,this.filterSettings=r,this.customFilterOperators=t}return e.prototype.renderOperatorUI=function(e,i,r,n,o){this.dialogObj=n;var l=r.type+"Operator";this.optrData=this.customOptr=t.isNullOrUndefined(o)?t.isNullOrUndefined(this.parent.filterSettings.operators)||t.isNullOrUndefined(this.parent.filterSettings.operators[l])?this.customFilterOperators[l]:this.parent.filterSettings.operators[l]:o;var a=this.customOptr,h=this.dropSelectedVal(r,l),d=this.parent.createElement("div",{className:"e-flm_optrdiv"});e.appendChild(d);var c=this.parent.createElement("input",{id:r.uid+"-floptr"});d.appendChild(c),this.dropOptr=new s.DropDownList({dataSource:a,fields:{text:"text",value:"value"},open:this.dropDownOpen.bind(this),cssClass:"e-popup-flmenu",enableRtl:this.parent.enableRtl,text:h}),this.dropOptr.appendTo("#"+r.uid+"-floptr")},e.prototype.renderResponsiveDropDownList=function(e){e.popup.element.style.width="100%"},e.prototype.dropDownOpen=function(e){e.popup.element.style.zIndex=(this.dialogObj.zIndex+1).toString(),this.parent.enableAdaptiveUI&&this.renderResponsiveDropDownList(e)},e.prototype.dropSelectedVal=function(e,r){for(var n="",o=0,s=this.parent.filterSettings.columns;o<s.length;o++){var l=s[o];if(e.field===l.field||e.isForeignColumn()&&e.foreignKeyValue===l.field){var a=new i.DataManager(this.optrData).executeLocal((new i.Query).where("value","equal",l.operator));n=t.isNullOrUndefined(a[0])?"":a[0].text}}if(""===n)if(e.filter.operator)for(var h=Object.keys(this.optrData).length,d=0;d<h;d++)this.optrData[d].value===e.filter.operator&&(n=this.optrData[d].text);else n=this.optrData[0].text;return n},e.prototype.getFlOperator=function(){return this.dropOptr.value},e}(),Nn=function(){function e(e,t,i){this.parent=e,this.serLocator=t,this.filterSettings=i}return e.prototype.create=function(e){this.instance=this.parent.createElement("input",{className:"e-flmenu-input",id:"strui-"+e.column.uid}),e.target.appendChild(this.instance),this.dialogObj=e.dialogObj,this.actObj=this.getAutoCompleteOptions(e),this.actObj.appendTo(this.instance)},e.prototype.getAutoCompleteOptions=function(e){var r,n=this,o=e.column.isForeignColumn();o&&((r=new i.Query).params=this.parent.query.params);var l=o?e.column.dataSource:this.parent.dataSource,a={value:o?e.column.foreignKeyValue:e.column.field},h=new s.AutoComplete(t.extend({dataSource:l instanceof i.DataManager?l:new i.DataManager(l),fields:a,locale:this.parent.locale,enableRtl:this.parent.enableRtl,query:o?r:this.parent.query.clone(),sortOrder:"Ascending",open:this.openPopup.bind(this),cssClass:"e-popup-flmenu",focus:function(){n.actObj.filterType=e.getOptrInstance.getFlOperator()},autofill:!0,placeholder:e.localizeText.getConstant("EnterValue"),actionComplete:function(e){e.result=e.result.filter(function(e,i,r){return r.map(function(e){return t.getValue(n.actObj.fields.value,e)}).indexOf(t.getValue(n.actObj.fields.value,e))===i})}},e.column.filter.params));if(l&&"result"in l){var d=Te({requestType:"stringfilterrequest"},this.parent.getQuery?this.parent.getQuery().clone():new i.Query);this.parent.trigger("dataStateChange",d.state),d.deffered.promise.then(function(e){h.dataSource=new i.DataManager(e)})}return h},e.prototype.write=function(e){""===e.filteredValue||t.isNullOrUndefined(e.filteredValue)||(document.querySelector("#strui-"+e.column.uid).ej2_instances[0].value=e.filteredValue)},e.prototype.read=function(e,i,r,n){var o=document.querySelector("#strui-"+i.uid).ej2_instances[0];t.Browser.isDevice&&(o.hidePopup(),o.focusOut());var s=o.value;(t.isNullOrUndefined(s)||""===s)&&(s=null),n.filterByColumn(i.field,r,s,"and",this.parent.filterSettings.enableCaseSensitivity)},e.prototype.openPopup=function(e){te(e,this.dialogObj)},e}(),Ln=function(){function e(e,t,i){this.filterSettings=i,this.parent=e,this.serviceLocator=t}return e.prototype.keyEventHandler=function(e){if(13===e.keyCode||9===e.keyCode){var t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0),this.dispatchEvent(t)}},e.prototype.create=function(e){this.instance=this.parent.createElement("input",{className:"e-flmenu-input",id:"numberui-"+e.column.uid}),e.target.appendChild(this.instance),this.numericTxtObj=new o.NumericTextBox(t.extend({format:"string"==typeof e.column.format||t.isUndefined(e.column.format)?e.column.format:e.column.format.format,locale:this.parent.locale,cssClass:"e-popup-flmenu",placeholder:e.localizeText.getConstant("EnterValue"),enableRtl:this.parent.enableRtl},e.column.filter.params)),this.numericTxtObj.appendTo(this.instance)},e.prototype.write=function(e){var t=document.querySelector("#numberui-"+e.column.uid).ej2_instances[0];t.element.addEventListener("keydown",this.keyEventHandler),t.value=e.filteredValue},e.prototype.read=function(e,t,i,r){var n=document.querySelector("#numberui-"+t.uid).ej2_instances[0].value;r.filterByColumn(t.field,i,n,"and",!0)},e}(),qn=function(){function e(e,t,i){this.parent=e,this.serviceLocator=t,this.filterSettings=i}return e.prototype.create=function(e){var r=e.column.isForeignColumn(),n=r?e.column.dataSource:this.parent.dataSource,o=r?e.column.foreignKeyValue:e.column.field;this.elem=this.parent.createElement("input",{className:"e-flmenu-input",id:"bool-ui-"+e.column.uid}),e.target.appendChild(this.elem),this.dialogObj=e.dialogObj,this.dropInstance=new s.DropDownList(t.extend({dataSource:n instanceof i.DataManager?n:new i.DataManager(n),query:(new i.Query).select(o),fields:{text:o,value:o},placeholder:e.localizeText.getConstant("SelectValue"),cssClass:"e-popup-flmenu",locale:this.parent.locale,enableRtl:this.parent.enableRtl,open:this.openPopup.bind(this),actionComplete:function(e){e.result=i.DataUtil.distinct(e.result,o,!0)}},e.column.filter.params)),this.dropInstance.appendTo(this.elem)},e.prototype.write=function(e){var i=document.querySelector("#bool-ui-"+e.column.uid).ej2_instances[0];t.isNullOrUndefined(e.filteredValue)||(i.text=e.filteredValue)},e.prototype.read=function(e,t,i,r){var n=document.querySelector("#bool-ui-"+t.uid).ej2_instances[0].value;r.filterByColumn(t.field,i,n,"and",!1)},e.prototype.openPopup=function(e){te(e,this.dialogObj)},e}(),Hn=function(){function e(e,t,i){this.parent=e,this.locator=t,this.fltrSettings=i}return e.prototype.create=function(e){var i=ue(e.column.format,e.column.type);this.dialogObj=e.dialogObj,this.inputElem=this.parent.createElement("input",{className:"e-flmenu-input",id:"dateui-"+e.column.uid}),e.target.appendChild(this.inputElem),"date"===e.column.type?this.datePickerObj=new l.DatePicker(t.extend({format:i,cssClass:"e-popup-flmenu",placeholder:e.localizeText.getConstant("ChooseDate"),width:"100%",locale:this.parent.locale,enableRtl:this.parent.enableRtl,open:this.openPopup.bind(this)},e.column.filter.params)):"datetime"===e.column.type&&(this.datePickerObj=new l.DateTimePicker(t.extend({format:i,cssClass:"e-popup-flmenu",placeholder:e.localizeText.getConstant("ChooseDate"),width:"100%",locale:this.parent.locale,enableRtl:this.parent.enableRtl,open:this.openPopup.bind(this)},e.column.filter.params))),this.datePickerObj.appendTo(this.inputElem)},e.prototype.write=function(e){document.querySelector("#dateui-"+e.column.uid).ej2_instances[0].value=t.isNullOrUndefined(e.filteredValue)?null:new Date(e.filteredValue)},e.prototype.read=function(e,i,r,n){var o=document.querySelector("#dateui-"+i.uid).ej2_instances[0].value;o=t.isNullOrUndefined(o)?null:o,n.filterByColumn(i.field,r,o,"and",!0)},e.prototype.openPopup=function(e){e.popup.element.style.zIndex=(this.dialogObj.zIndex+1).toString()},e}(),Un=function(){function e(e,t,i,r,n){this.isDialogOpen=!1,this.maxHeight="350px",this.isMenuCheck=!1,this.colTypes={string:Nn,number:Ln,date:Hn,boolean:qn,datetime:Hn},this.parent=e,this.filterSettings=t,this.serviceLocator=i,this.customFilterOperators=r,this.filterObj=n,this.flMuiObj=new Pn(this.parent,this.customFilterOperators,this.serviceLocator),this.l10n=this.serviceLocator.getService("localization"),this.menuFilterBase=new bn(e)}return e.prototype.clearCustomFilter=function(e){this.clearBtnClick(e)},e.prototype.applyCustomFilter=function(e){this.filterBtnClick(e.col)},e.prototype.openDialog=function(e){this.options=e,this.col=this.parent.getColumnByField(e.field),(t.isNullOrUndefined(this.col.filter)||t.isNullOrUndefined(this.col.filter.type)||"Menu"===this.col.filter.type)&&this.renderDlgContent(e.target,this.col)},e.prototype.closeDialog=function(e){if(this.dlgObj){this.parent.isReact&&(this.parent.destroyTemplate(["filterTemplate"]),this.parent.renderTemplates());var i=document.getElementById(this.dlgObj.element.id);if(this.dlgObj&&!this.dlgObj.isDestroyed&&i){var r={cancel:!1,column:this.col,target:e,element:i};if(this.parent.notify("filter-menu-close",r),r.cancel)return;this.isDialogOpen=!1,this.isMenuCheck&&(this.menuFilterBase.unWireEvents(),this.parent.off(di,this.actionComplete),this.isMenuCheck=!1),this.dlgObj.destroy(),t.remove(i)}this.parent.notify("filter-dialog-close",{})}},e.prototype.renderDlgContent=function(e,i){var n={requestType:"filterbeforeopen",columnName:i.field,columnType:i.type};n.filterModel=this,this.parent.trigger(bt,n);var o=this.parent.createElement("div",{className:"e-flmenu-maindiv",id:i.uid+"-flmenu"});this.dlgDiv=this.parent.createElement("div",{className:"e-flmenu",id:i.uid+"-flmdlg"}),this.dlgDiv.setAttribute("aria-label",this.l10n.getConstant("FilterMenuDialogARIA")),this.parent.enableAdaptiveUI?document.querySelector(".e-resfilter > .e-dlg-content > .e-mainfilterdiv").appendChild(this.dlgDiv):this.parent.element.appendChild(this.dlgDiv),this.dlgObj=new r.Dialog({showCloseIcon:!1,closeOnEscape:!1,locale:this.parent.locale,visible:!1,enableRtl:this.parent.enableRtl,created:this.dialogCreated.bind(this,e,i),position:this.parent.element.classList.contains("e-device")?{X:"center",Y:"center"}:{X:"",Y:""},target:this.parent.element.classList.contains("e-device")?document.body:this.parent.element,buttons:[{click:this.filterBtnClick.bind(this,i),buttonModel:{content:this.l10n.getConstant("FilterButton"),isPrimary:!0,cssClass:"e-flmenu-okbtn"}},{click:this.clearBtnClick.bind(this,i),buttonModel:{content:this.l10n.getConstant("ClearButton"),cssClass:"e-flmenu-cancelbtn"}}],content:o,width:!t.isNullOrUndefined(O(e,"e-bigger"))||this.parent.element.classList.contains("e-device")?260:250,animationSettings:{effect:"None"},cssClass:"e-filter-popup"});this.dlgObj.isStringTemplate=!0,this.renderResponsiveDialog(),this.dlgObj.appendTo(this.dlgDiv)},e.prototype.renderResponsiveDialog=function(){this.parent.enableAdaptiveUI&&(this.dlgObj.position={X:"",Y:""},this.dlgObj.target=document.querySelector(".e-resfilter > .e-dlg-content > .e-mainfilterdiv"),this.dlgObj.width="100%",this.dlgObj.isModal=!1,this.dlgObj.buttons=[{}])},e.prototype.dialogCreated=function(e,i){!t.Browser.isDevice&&e&&ee(e,this.dlgObj),this.renderFilterUI(e,i),this.parent.notify("filterDialogCreated",{}),this.parent.enableAdaptiveUI?(this.dlgObj.element.style.left="0px",this.dlgObj.element.style.maxHeight="none"):this.dlgObj.element.style.maxHeight=this.maxHeight,this.dlgObj.show(),i.filterTemplate||this.writeMethod(i,this.dlgObj.element.querySelector("#"+i.uid+"-flmenu"));var r={requestType:"filterafteropen",columnName:i.field,columnType:i.type};r.filterModel=this,this.isDialogOpen=!0,this.isMenuCheck||this.parent.trigger(St,r)},e.prototype.renderFilterUI=function(e,t){var i=this.dlgObj.element.querySelector(".e-flmenu-maindiv");this.parent.log("column_type_missing",{column:t}),this.renderOperatorUI(i,e,t),this.renderFlValueUI(i,e,t)},e.prototype.renderOperatorUI=function(e,t,i){this.flMuiObj.renderOperatorUI(e,t,i,this.dlgObj,this.filterObj.menuOperator)},e.prototype.renderFlValueUI=function(e,i,r){var n=this.parent.createElement("div",{className:"e-flmenu-valuediv"}),o=this.filterObj;e.appendChild(n);var s=new this.colTypes[r.type](this.parent,this.serviceLocator,this.parent.filterSettings);if(r.filterTemplate){var l={};l[r.field]=l.value=o.values[r.field],r.foreignKeyValue&&(l[r.foreignKeyValue]=o.values[r.field],l[r.field]=void 0);l.column=r;var a=this.parent.isReact&&"string"!=typeof r.filterTemplate,h=this.parent.element.id+r.uid+"filterTemplate";if(a)r.getFilterTemplate()(l,this.parent,"filterTemplate",h,null,null,n),this.parent.renderTemplates();else{var d=r.getFilterTemplate()(l,this.parent,"filterTemplate",h);t.updateBlazorTemplate(h,"FilterTemplate",r),q(n,d)}this.isMenuCheck&&(this.menuFilterBase.cBox=this.dlgObj.element.querySelector(".e-checkboxlist.e-fields"),this.menuFilterBase.wireEvents(),this.parent.on(di,this.actionComplete,this),this.menuFilterBase.getAllData())}else if(t.isNullOrUndefined(r.filter)||t.isNullOrUndefined(r.filter.ui)||t.isNullOrUndefined(r.filter.ui.create))s.create({column:r,target:n,getOptrInstance:this.flMuiObj,localizeText:this.l10n,dialogObj:this.dlgObj});else{var c=r.filter.ui.create;"string"==typeof c&&(c=t.getValue(c,window)),c({column:r,target:n,getOptrInstance:this.flMuiObj,dialogObj:this.dlgObj})}},e.prototype.writeMethod=function(e,i){for(var r,n=i.querySelector(".e-flmenu-valinput"),o=new this.colTypes[e.type](this.parent,this.serviceLocator,this.parent.filterSettings),s=0,l=this.filterSettings.columns;s<l.length;s++){var a=l[s];e.uid===a.uid&&(r=a.value)}if(t.isNullOrUndefined(e.filter)||t.isNullOrUndefined(e.filter.ui)||t.isNullOrUndefined(e.filter.ui.write))o.write({column:e,target:n,parent:this.parent,filteredValue:r});else{var h=e.filter.ui.write;"string"==typeof h&&(h=t.getValue(h,window)),h({column:e,target:n,parent:this.parent,filteredValue:r})}},e.prototype.filterBtnClick=function(e){var i=this.dlgObj.element.querySelector(".e-flmenu-valuediv input"),r=this.flMuiObj.getFlOperator(),n=new this.colTypes[e.type](this.parent,this.serviceLocator,this.parent.filterSettings);if(e.filterTemplate){var o=this.dlgDiv.querySelector(".e-flmenu-valuediv"),s=void 0;if(o.children[0].value)s=o.children[0].value;else if(t.isBlazor()||t.isNullOrUndefined(o.children[0].ej2_instances)){var l=o.querySelector(".e-control");s="boolean"===e.type?l.checked:t.isNullOrUndefined(l.ej2_instances)?l.value:l.ej2_instances[0].value}else s=(this.parent.isAngular?o.children[0]:o.querySelector("input")).ej2_instances[0].value;this.filterObj.filterByColumn(e.field,r,s)}else if(t.isNullOrUndefined(e.filter)||t.isNullOrUndefined(e.filter.ui)||t.isNullOrUndefined(e.filter.ui.read))n.read(i,e,r,this.filterObj);else{var a=e.filter.ui.read;"string"==typeof a&&(a=t.getValue(a,window)),a({element:i,column:e,operator:r,fltrObj:this.filterObj})}this.closeDialog()},e.prototype.closeResponsiveDialog=function(){this.closeDialog()},e.prototype.clearBtnClick=function(e){this.filterObj.removeFilteredColsByField(e.field),this.closeDialog();var t=this.parent.showColumnMenu?".e-columnmenu":".e-icon-filter",i=this.parent.element.querySelector('[e-mappinguid="'+e.uid+'"]').parentElement.querySelector(t);i&&i.classList.remove("e-filtered")},e.prototype.destroy=function(){this.closeDialog()},e.prototype.getFilterUIInfo=function(){return{field:this.col.field,operator:this.flMuiObj.getFlOperator()}},e.prototype.renderCheckBoxMenu=function(){return this.isMenuCheck=!0,this.menuFilterBase.updateModel(this.options),this.menuFilterBase.getAndSetChkElem(this.options),this.dlgObj.buttons=[{click:this.menuFilterBase.btnClick.bind(this.menuFilterBase),buttonModel:{content:this.menuFilterBase.getLocalizedLabel("FilterButton"),cssClass:"e-primary",isPrimary:!0}},{click:this.menuFilterBase.btnClick.bind(this.menuFilterBase),buttonModel:{cssClass:"e-flat",content:this.menuFilterBase.getLocalizedLabel("ClearButton")}}],this.menuFilterBase.dialogObj=this.dlgObj,this.menuFilterBase.dlg=this.dlgObj.element,this.menuFilterBase.dlg.classList.add("e-menucheckbox"),this.menuFilterBase.dlg.classList.remove("e-checkboxfilter"),this.maxHeight="800px",this.menuFilterBase.sBox.innerHTML},e.prototype.actionComplete=function(e){this.isMenuCheck&&this.parent.trigger(St,e)},e}(),jn=function(){function e(e,t,i){this.parent=e,this.isresetFocus=!0,this.checkBoxBase=new bn(e),this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.checkBoxBase.closeDialog()},e.prototype.openDialog=function(e){this.checkBoxBase.openDialog(e),this.parent.log("column_type_missing",{column:e.column})},e.prototype.closeDialog=function(){this.destroy(),this.isresetFocus&&this.parent.notify("restore-Focus",{})},e.prototype.closeResponsiveDialog=function(){this.checkBoxBase.closeDialog()},e.prototype.getModuleName=function(){return"checkboxFilter"},e.prototype.actionBegin=function(e){this.parent.trigger(bt,e)},e.prototype.actionComplete=function(e){this.parent.trigger(St,e)},e.prototype.actionPrevent=function(e){X(this.parent)&&(this.parent.notify(ii,e),e.cancel=!0)},e.prototype.clearCustomFilter=function(e){this.checkBoxBase.clearFilter(e)},e.prototype.applyCustomFilter=function(){this.checkBoxBase.fltrBtnHandler(),this.checkBoxBase.closeDialog()},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("cbox-filter-begin",this.actionBegin,this),this.parent.on(di,this.actionComplete,this),this.parent.on(ci,this.actionPrevent,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("cbox-filter-begin",this.actionBegin),this.parent.off(di,this.actionComplete),this.parent.off(ci,this.actionPrevent))},e}(),Vn=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Gn=function(e){function t(t,i,r,n){var o=e.call(this,t,i,r)||this;return o.parent=t,o.isresetFocus=!0,o.excelFilterBase=new Rn(t,n),o}return Vn(t,e),t.prototype.destroy=function(){this.excelFilterBase.closeDialog()},t.prototype.openDialog=function(e){this.excelFilterBase.openDialog(e)},t.prototype.closeDialog=function(){this.excelFilterBase.closeDialog(),this.isresetFocus&&this.parent.notify("restore-Focus",{})},t.prototype.clearCustomFilter=function(e){this.excelFilterBase.clearFilter(e)},t.prototype.closeResponsiveDialog=function(e){e?this.excelFilterBase.removeDialog():this.closeDialog()},t.prototype.applyCustomFilter=function(e){e.isCustomFilter?this.excelFilterBase.filterBtnClick(e.col.field):(this.excelFilterBase.fltrBtnHandler(),this.excelFilterBase.closeDialog())},t.prototype.filterByColumn=function(e,t,i,r,n,o,s,l){this.excelFilterBase.filterByColumn(e,t,i,r,n,o,s,l)},t.prototype.getFilterUIInfo=function(){return this.excelFilterBase.getFilterUIInfo()},t.prototype.getModuleName=function(){return"excelFilter"},t}(jn),_n=function(){function r(e,t,i){this.predicate="and",this.contentRefresh=!0,this.filterByMethod=!0,this.refresh=!0,this.values={},this.operators={},this.cellText={},this.nextFlMenuOpen="",this.type={Menu:Un,CheckBox:jn,Excel:Gn},this.filterOperators={contains:"contains",endsWith:"endswith",equal:"equal",greaterThan:"greaterthan",greaterThanOrEqual:"greaterthanorequal",lessThan:"lessthan",lessThanOrEqual:"lessthanorequal",notEqual:"notequal",startsWith:"startswith"},this.fltrDlgDetails={field:"",isOpen:!1},this.skipNumberInput=["="," ","!"],this.skipStringInput=[">","<","="],this.actualPredicate={},this.parent=e,this.filterSettings=t,this.serviceLocator=i,this.addEventListener(),this.setFullScreenDialog()}return r.prototype.render=function(r){if(!(i.DataUtil.getObject("args.isFrozen",r)||this.parent.getFrozenMode()===Pi&&i.DataUtil.getObject("args.renderFrozenRightContent",r))){var n=this.parent;if(this.l10n=this.serviceLocator.getService("localization"),this.getLocalizedCustomOperators(),"FilterBar"===this.parent.filterSettings.type&&n.columns.length){var o=this.parent.element.querySelector(".e-filterbar");o&&t.remove(o);var s=new Vi(this.serviceLocator,e.CellType.Filter,n);this.serviceLocator.getService("cellRendererFactory").addCellRenderer(e.CellType.Filter,new Bn(this.parent,this.serviceLocator)),this.valueFormatter=this.serviceLocator.getService("valueFormatter"),s.element=this.parent.createElement("tr",{className:"e-filterbar"});var l=this.generateRow();l.data=this.values,"Right"===n.getFrozenMode()?n.getFrozenRightHeader().querySelector("thead").appendChild(s.element):this.parent.getHeaderContent().querySelector("thead").appendChild(s.element);var a=this.parent.element.querySelector(".e-rowdragheader");this.element=s.render(l,n.getColumns(),null,null,s.element);var h=this.element.querySelector(".e-detailheadercell");h&&(h.className="e-filterbarcell e-mastercell"),a&&(a.className="e-dragheadercell e-mastercell");var d=[].slice.call(this.element.getElementsByClassName("e-grouptopleftcell"));d.length&&d[d.length-1].classList.add("e-lastgrouptopleftcell"),this.wireEvents(),this.parent.notify(oi,{case:"filter"})}}},r.prototype.showCustomFilter=function(e){this.responsiveDialogRenderer.isCustomDialog=e,this.responsiveDialogRenderer.showResponsiveDialog(this.column)},r.prototype.setFilterModel=function(e){var t=e.filter.type||this.parent.filterSettings.type;this.filterModule=new this.type[t](this.parent,this.parent.filterSettings,this.serviceLocator,this.customOperators,this)},r.prototype.destroy=function(){var e=this.parent.element;if(e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))){if(this.filterModule&&this.filterModule.destroy(),this.parent.refreshing||(this.filterSettings.columns=[]),this.updateFilterMsg(),this.removeEventListener(),this.unWireEvents(),"FilterBar"===this.filterSettings.type&&this.filterSettings.showFilterBarOperator)for(var i=[].slice.call(this.element.getElementsByClassName("e-filterbaroperator")),r=0;r<i.length;r++)i[r].ej2_instances[0].destroy();if(this.element){t.remove(this.element);var n=this.parent.getHeaderContent().querySelector(".e-filterbar");this.parent.isFrozenGrid()&&n&&t.remove(n)}}},r.prototype.setFullScreenDialog=function(){this.serviceLocator&&this.serviceLocator.registerAdaptiveService(this,this.parent.enableAdaptiveUI,e.ResponsiveDialogAction.isFilter)},r.prototype.generateRow=function(){var e=new vi({});return e.cells=this.generateCells(),e},r.prototype.generateCells=function(){var t=[];if(this.parent.allowGrouping)for(var i=0,r=this.parent.groupSettings.columns.length;i<r;i++)t.push(this.generateCell({},e.CellType.HeaderIndent));(this.parent.detailTemplate||this.parent.childGrid)&&t.push(this.generateCell({},e.CellType.DetailHeader)),this.parent.isRowDragable()&&"Right"!==this.parent.getFrozenMode()&&t.push(this.generateCell({},e.CellType.RowDragHIcon));for(var n=0,o=this.parent.getColumns();n<o.length;n++){var s=o[n];t.push(this.generateCell(s))}return"Right"===this.parent.getFrozenMode()&&t.push(this.generateCell({},e.CellType.RowDragHIcon)),t},r.prototype.generateCell=function(t,i){var r={visible:t.visible,isDataCell:!1,rowId:"",column:t,cellType:i||e.CellType.Filter,attributes:{title:this.l10n.getConstant("FilterbarTitle")}};return new Ci(r)},r.prototype.updateModel=function(){var e=this.parent.getColumnByField(this.fieldName);this.filterObjIndex=this.getFilteredColsIndexByField(e),this.prevFilterObject=this.filterSettings.columns[this.filterObjIndex];for(var t=Array.isArray(this.value)?this.value:[this.value],i=0,r=t.length;i<r;i++){var n=e.isForeignColumn()?e.foreignKeyValue:this.fieldName;this.currentFilterObject={field:n,uid:e.uid,isForeignKey:e.isForeignColumn(),operator:this.operator,value:t[i],predicate:this.predicate,matchCase:this.matchCase,ignoreAccent:this.ignoreAccent,actualFilterValue:{},actualOperator:{}};var o=this.getFilteredColsIndexByField(e);o>-1&&!Array.isArray(this.value)?this.filterSettings.columns[o]=this.currentFilterObject:this.filterSettings.columns.push(this.currentFilterObject)}this.filterSettings.columns=this.filterSettings.columns,this.parent.dataBind()},r.prototype.getFilteredColsIndexByField=function(e){for(var t=this.filterSettings.columns,i=0,r=t.length;i<r;i++)if(t[i].uid===e.uid||e.isForeignColumn()&&this.parent.getColumnByUid(e.uid).field===e.foreignKeyValue)return i;return-1},r.prototype.onActionComplete=function(e){var i=this.isRemove?{requestType:"filtering",type:St}:{currentFilterObject:this.currentFilterObject,currentFilteringColumn:t.isNullOrUndefined(this.column)?void 0:this.column.field,columns:this.filterSettings.columns,requestType:"filtering",type:St};this.parent.trigger(St,t.extend(e,i)),this.isRemove=!1},r.prototype.wireEvents=function(){t.EventHandler.add(this.parent.getHeaderContent(),"keyup",this.keyUpHandlerImmediate,this)},r.prototype.unWireEvents=function(){t.EventHandler.remove(this.parent.getHeaderContent(),"keyup",this.keyUpHandlerImmediate)},r.prototype.enableAfterRender=function(e){e.module===this.getModuleName()&&e.enable&&(this.parent.getHeaderTable().classList.add("e-sortfilter"),this.render())},r.prototype.refreshFilterValue=function(){"FilterBar"===this.filterSettings.type&&this.filterSettings.columns.length&&!this.parent.getCurrentViewRecords().length&&this.parent.enablePersistence&&(this.initialEnd(),this.parent.removeEventListener("beforeDataBound",this.refreshFilterValueFn))},r.prototype.initialEnd=function(){if(this.parent.off(At,this.initialEnd),this.parent.getColumns().length&&this.filterSettings.columns.length){var e=this.parent;this.contentRefresh=!1,this.initialLoad=!0;for(var t=0,i=e.filterSettings.columns;t<i.length;t++){var r=i[t];this.filterByColumn(r.field,r.operator,r.value,r.predicate,r.matchCase,r.ignoreAccent,r.actualFilterValue,r.actualOperator)}this.initialLoad=!1,this.updateFilterMsg(),this.contentRefresh=!0}},r.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("set-fullscreen-dialog",this.setFullScreenDialog,this),this.parent.on(Bt,this.enableAfterRender,this),this.parent.on("filtering-complete",this.onActionComplete,this),this.parent.on(Nt,this.onPropertyChanged,this),this.parent.on(Vt,this.keyUpHandler,this),this.parent.on(Kt,this.columnPositionChanged,this),this.parent.on(Ht,this.render,this),this.parent.on(At,this.initialEnd,this),this.parent.on("filter-menu-close",this.filterMenuClose,this),this.docClickHandler=this.clickHandler.bind(this),t.EventHandler.add(document,"click",this.docClickHandler,this),this.parent.on("filterOpen",this.columnMenuFilter,this),this.parent.on(Gt,this.filterIconClickHandler,this),this.parent.on("persist-data-changed",this.initialEnd,this),this.parent.on("close-filter-dialog",this.clickHandler,this),this.refreshFilterValueFn=this.refreshFilterValue.bind(this),this.parent.addEventListener("beforeDataBound",this.refreshFilterValueFn))},r.prototype.removeEventListener=function(){t.EventHandler.remove(document,"click",this.docClickHandler),this.parent.isDestroyed||(this.parent.off("set-fullscreen-dialog",this.setFullScreenDialog),this.parent.off(Bt,this.enableAfterRender),this.parent.off("filtering-complete",this.onActionComplete),this.parent.off(Nt,this.onPropertyChanged),this.parent.off(Vt,this.keyUpHandler),this.parent.off(Kt,this.columnPositionChanged),this.parent.off(Ht,this.render),this.parent.off("filterOpen",this.columnMenuFilter),this.parent.off("filter-menu-close",this.filterMenuClose),this.parent.off(Gt,this.filterIconClickHandler),this.parent.off("close-filter-dialog",this.clickHandler))},r.prototype.filterMenuClose=function(){this.fltrDlgDetails.isOpen=!1},r.prototype.filterByColumn=function(e,i,r,n,o,s,l,a){var h,d=this,c=this.parent;if(this.column=c.grabColumnByFieldFromAllCols(e),"FilterBar"===this.filterSettings.type&&this.filterSettings.showFilterBarOperator&&(i=this.getOperatorName(e)),this.column){if("FilterBar"===this.filterSettings.type&&(h=c.getHeaderContent().querySelector("[id='"+this.column.field+"_filterBarcell']")),!t.isNullOrUndefined(this.column.allowFiltering)&&!this.column.allowFiltering)return void this.parent.log("action_disabled_column",{moduleName:this.getModuleName(),columnName:this.column.headerText});if(X(c))return void c.notify(ii,{instance:this,handler:this.filterByColumn,arg1:e,arg2:i,arg3:r,arg4:n,arg5:o,arg6:s,arg7:l,arg8:a});if(this.predicate=n||(Array.isArray(r)?"or":"and"),this.value=r,this.matchCase=o||!1,this.ignoreAccent=this.ignoreAccent=t.isNullOrUndefined(s)?this.parent.filterSettings.ignoreAccent:s,this.fieldName=e,this.operator=i,r=!t.isNullOrUndefined(r)&&r.toString(),"number"!==this.column.type&&"date"!==this.column.type||(this.matchCase=!0),c.getColumnHeaderByField(e).setAttribute("aria-filtered","true"),h&&"FilterBar"===this.filterSettings.type){if(r.length<1||!this.filterByMethod&&this.checkForSkipInput(this.column,r))return this.filterStatusMsg=r.length<1?"":this.l10n.getConstant("InvalidFilterMessage"),void this.updateFilterMsg();h.value!==r&&(h.value=r)}t.isNullOrUndefined(this.column.format)?this.values[this.column.field]=r:(this.applyColumnFormat(r),this.initialLoad&&"FilterBar"===this.filterSettings.type&&(h.value=this.values[this.column.field]));var p={field:this.fieldName,predicate:n,matchCase:o,ignoreAccent:s,operator:this.operator,value:this.value,type:this.column.type};this.parent.filterSettings.columns.filter(function(e){return e.field===d.fieldName}).length>1&&!t.isNullOrUndefined(this.actualPredicate[this.fieldName])?this.actualPredicate[this.fieldName].push(p):this.actualPredicate[this.fieldName]=[p],this.checkAlreadyColFiltered(this.column.field)||this.updateModel()}},r.prototype.applyColumnFormat=function(e){var t="date"===this.column.type||"datetime"===this.column.type?new Date(e):parseFloat(e);this.values[this.column.field]=this.setFormatForFlColumn(t,this.column)},r.prototype.skipUid=function(e){for(var t=!0,i=Object.keys(e),r=0;r<i.length;r++){var n=Object.keys(e[i[r]]);1===n.length&&"uid"===n[0]&&(t=!1)}return t},r.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName())for(var i=0,r=Object.keys(e.properties);i<r.length;i++){var n=r[i];switch(n){case"columns":var o={currentFilterObject:this.currentFilterObject,currentFilteringColumn:this.column?this.column.field:void 0,action:"filter",columns:this.filterSettings.columns,requestType:"filtering",type:bt,cancel:!1};if(this.contentRefresh&&this.skipUid(e.properties.columns)){if(this.parent.notify(Lt,o),o.cancel)return void(t.isNullOrUndefined(this.prevFilterObject)?this.filterSettings.columns.splice(this.filterSettings.columns.length-1,1):this.filterSettings.columns[this.filterObjIndex]=this.prevFilterObject);this.addFilteredClass(o.currentFilteringColumn),this.updateFilterIcon(),this.refreshFilterSettings(),this.updateFilterMsg(),this.updateFilter()}break;case"showFilterBarStatus":e.properties[n]?this.updateFilterMsg():this.parent.allowPaging&&this.parent.updateExternalMessage("");break;case"showFilterBarOperator":case"type":this.parent.refreshHeader(),this.refreshFilterSettings()}}},r.prototype.refreshFilterSettings=function(){if("FilterBar"===this.filterSettings.type){for(n=0;n<this.filterSettings.columns.length;n++){this.column=this.parent.grabColumnByUidFromAllCols(this.filterSettings.columns[n].uid);var e=this.filterSettings.columns[n].value;if(e=!t.isNullOrUndefined(e)&&e.toString(),t.isNullOrUndefined(this.column.format)){var i=this.filterSettings.columns[n].field;this.values[i]=this.filterSettings.columns[n].value}else this.applyColumnFormat(e);(o=this.getFilterBarElement(this.column.field))&&(""===this.cellText[this.filterSettings.columns[n].field]||t.isNullOrUndefined(this.cellText[this.filterSettings.columns[n].field])?o.value=this.filterSettings.columns[n].value:o.value=this.cellText[this.column.field])}if(0===this.filterSettings.columns.length)for(var r=this.parent.getColumns(),n=0;n<r.length;n++){var o=this.getFilterBarElement(r[n].field);o&&""!==o.value&&(o.value="",delete this.values[r[n].field])}}},r.prototype.updateFilterIcon=function(){if(0===this.filterSettings.columns.length&&this.parent.element.querySelector(".e-filtered"))for(var e=[].slice.call(this.parent.element.getElementsByClassName("e-filtered")),t=0,i=e.length;t<i;t++)e[t].removeAttribute("aria-filtered"),e[t].classList.remove("e-filtered")},r.prototype.getFilterBarElement=function(e){var i,r="[id='"+e+"_filterBarcell']";return r&&!t.isNullOrUndefined(this.element)&&(i=this.element.querySelector(r)),i},r.prototype.refreshFilter=function(){this.refreshFilterSettings(),this.updateFilterMsg()},r.prototype.clearFiltering=function(e){var i=this,r=B(this.filterSettings.columns);if(!t.isNullOrUndefined(e))return this.refresh=!1,e.forEach(function(e){i.removeFilteredColsByField(e,!1)}),this.parent.setProperties({filterSettings:{columns:this.filterSettings.columns}},!0),this.parent.renderModule.refresh(),void(this.refresh=!0);if(X(this.parent))return void this.parent.notify(ii,{instance:this,handler:this.clearFiltering});for(s=0;s<r.length;s++)r[s].uid=r[s].uid||this.parent.getColumnByField(r[s].field).uid;var n=r.map(function(e){return e.uid}),o=n.filter(function(e,t){return n.indexOf(e)===t});this.refresh=!1;for(var s=0,l=o.length;s<l;s++)this.removeFilteredColsByField(this.parent.getColumnByUid(o[s]).field,!1);if(this.refresh=!0,o.length&&this.parent.renderModule.refresh(),0===this.parent.filterSettings.columns.length&&this.parent.element.querySelector(".e-filtered"))for(var a=[].slice.call(this.parent.element.getElementsByClassName("e-filtered")),s=0,l=a.length;s<l;s++)a[0].removeAttribute("aria-filtered"),a[0].classList.remove("e-filtered");this.isRemove=!0,this.filterStatusMsg="",this.updateFilterMsg()},r.prototype.checkAlreadyColFiltered=function(e){for(var t=0,i=this.filterSettings.columns;t<i.length;t++){var r=i[t];if(r.field===e&&r.value===this.value&&r.operator===this.operator&&r.predicate===this.predicate)return!0}return!1},r.prototype.columnMenuFilter=function(e){this.column=e.col;var i=t.closest(e.target,"#"+e.id);e.isClose&&!i?this.filterModule.closeDialog():i&&this.filterDialogOpen(this.column,e.target)},r.prototype.filterDialogOpen=function(e,t,i,r){this.filterModule&&this.filterModule.closeDialog(),this.setFilterModel(e),this.filterModule.openDialog(this.createOptions(e,t,i,r))},r.prototype.createOptions=function(e,i,r,n){var o=this.parent,s=e.filter.dataSource||o.dataSource&&"result"in o.dataSource?o.dataSource:o.getDataModule().dataManager,l=e.filter.type||this.parent.filterSettings.type;return{type:e.type,field:e.field,displayName:e.headerText,dataSource:s,format:e.format,height:800,columns:o.getColumns(),filteredColumns:o.filterSettings.columns,target:i,dataManager:o.getDataModule().dataManager,formatFn:e.getFormatter(),ignoreAccent:o.filterSettings.ignoreAccent,parserFn:e.getParser(),query:o.query,template:e.getFilterItemTemplate(),hideSearchbox:!t.isNullOrUndefined(e.filter.hideSearchbox)&&e.filter.hideSearchbox,handler:this.filterHandler.bind(this),localizedStrings:o.getLocaleConstants(),position:{X:r,Y:n},column:e,foreignKeyValue:e.foreignKeyValue,actualPredicate:this.actualPredicate,localeObj:o.localeObj,isRemote:o.getDataModule().isRemote(),allowCaseSensitive:this.filterSettings.enableCaseSensitivity,isResponsiveFilter:this.parent.enableAdaptiveUI,operator:this.actualPredicate[e.field]&&"Menu"===l?this.actualPredicate[e.field][0].operator:"equal"}},r.prototype.removeFilteredColsByField=function(e,t){var i,r=this.filterSettings.columns;if(X(this.parent)){var n={instance:this,handler:this.removeFilteredColsByField,arg1:e,arg2:t};return void this.parent.notify(ii,n)}for(var o=r.map(function(e){return e.uid}),s=o.filter(function(e,t){return o.indexOf(e)===t}),l=this,a=0,h=s.length;a<h&&"break"!==function(n,o){r[n].uid=r[n].uid||l.parent.getColumnByField(r[n].field).uid;var a=r.length,h=l.parent.grabColumnByUidFromAllCols(s[n]);if(h.field===e||h.field===h.foreignKeyValue&&h.isForeignColumn()){var d=l.filterSettings.columns.filter(function(e){return e.uid===h.uid})[0];if("FilterBar"===l.filterSettings.type&&!t){var c="[id='"+h.field+"_filterBarcell']";(i=l.parent.getHeaderContent().querySelector(c))&&(i.value="",delete l.values[e])}for(;a--;)r[a].uid===h.uid&&r.splice(a,1);var p=l.parent.getColumnHeaderByField(h.field);if(p.removeAttribute("aria-filtered"),"FilterBar"!==l.filterSettings.type){var u=l.parent.showColumnMenu?".e-columnmenu":".e-icon-filter";p.querySelector(u).classList.remove("e-filtered")}return l.isRemove=!0,l.actualPredicate[e]&&delete l.actualPredicate[e],l.values[e]&&delete l.values[e],l.refresh&&l.parent.notify(Lt,{requestType:"filtering",type:bt,currentFilterObject:d,currentFilterColumn:h,action:"clearFilter"}),"break"}}(a);a++);this.updateFilterMsg()},r.prototype.getModuleName=function(){return"filter"},r.prototype.keyUpHandlerImmediate=function(e){13!==e.keyCode&&this.keyUpHandler(e)},r.prototype.keyUpHandler=function(e){var i=this.parent,r=e.target;if(r&&t.matches(r,".e-filterbar input")){var n=t.closest(r,"th.e-filterbarcell");if(this.column=i.getColumnByUid(n.getAttribute("e-mappinguid")),!this.column)return;if("altDownArrow"===e.action&&this.parent.filterSettings.showFilterBarOperator){var o=t.closest(r,"span").querySelector(".e-filterbaroperator");o.ej2_instances[0].showPopup(),o.focus()}"Immediate"!==this.filterSettings.mode&&(13!==e.keyCode||e.target.classList.contains("e-filterbaroperator"))||9===e.keyCode||this.column.filterTemplate||(this.value=r.value.trim(),this.processFilter(e))}if("altDownArrow"===e.action&&"FilterBar"!==this.filterSettings.type){var s=i.focusModule.currentInfo.element;if(s&&s.classList.contains("e-headercell")){var l=i.getColumnByUid(s.firstElementChild.getAttribute("e-mappinguid"));this.openMenuByField(l.field),this.parent.focusModule.clearIndicator()}}"escape"===e.action&&"Menu"===this.filterSettings.type&&this.filterModule&&(this.filterModule.closeDialog(),i.notify("restore-Focus",{}))},r.prototype.updateCrossIcon=function(e){e.value.length&&e.nextElementSibling.classList.remove("e-hide")},r.prototype.updateFilterMsg=function(){if("FilterBar"===this.filterSettings.type){var e=this.parent,i=void 0,r=this.filterSettings.columns,n=void 0;if(!this.filterSettings.showFilterBarStatus)return;if(r.length>0&&this.filterStatusMsg!==this.l10n.getConstant("InvalidFilterMessage")){this.filterStatusMsg="";for(var o=0;o<r.length;o++)if(n=e.grabColumnByUidFromAllCols(r[o].uid)||e.grabColumnByFieldFromAllCols(r[o].field),o&&(this.filterStatusMsg+=" && "),t.isNullOrUndefined(n.format))this.filterStatusMsg+=n.headerText+": "+this.values[n.field];else{var s="date"===n.type||"datetime"===n.type?this.valueFormatter.fromView(this.values[n.field],n.getParser(),n.type):this.values[n.field];i="date"!==n.type&&"datetime"!==n.type?this.serviceLocator.getService("valueFormatter").toView(s,n.getParser()).toString():this.setFormatForFlColumn(s,n),this.filterStatusMsg+=n.headerText+": "+i}}e.allowPaging&&e.updateExternalMessage(this.filterStatusMsg),this.filterStatusMsg=""}},r.prototype.setFormatForFlColumn=function(e,t){return this.serviceLocator.getService("valueFormatter").toView(e,t.getFormatter()).toString()},r.prototype.checkForSkipInput=function(e,t){var r;if("number"===e.type)(i.DataUtil.operatorSymbols[t]||this.skipNumberInput.indexOf(t)>-1)&&(r=!0);else if("string"===e.type)for(var n=0,o=t;n<o.length;n++){var s=o[n];this.skipStringInput.indexOf(s)>-1&&(r=!0)}return r},r.prototype.processFilter=function(e){this.stopTimer(),this.startTimer(e)},r.prototype.startTimer=function(e){var t=this;this.timer=window.setInterval(function(){t.onTimerTick()},13===e.keyCode?0:this.filterSettings.immediateModeDelay)},r.prototype.stopTimer=function(){window.clearInterval(this.timer)},r.prototype.onTimerTick=function(){var e="[id='"+this.column.field+"_filterBarcell']",i=this.element.querySelector(e);!i&&this.parent.isFrozenGrid()&&(i=this.parent.getHeaderContent().querySelector(e));var r;if(this.cellText[this.column.field]=i.value,this.stopTimer(),t.isNullOrUndefined(this.column.filterBarTemplate))r=JSON.parse(JSON.stringify(i.value));else{var n=this.column.filterBarTemplate.read;"string"==typeof n&&(n=t.getValue(n,window)),t.isNullOrUndefined(n)||(this.value=n.call(this,i))}if(t.isNullOrUndefined(this.value)||""===this.value)return void this.removeFilteredColsByField(this.column.field);this.validateFilterValue(this.value),this.filterByMethod=!1,this.filterByColumn(this.column.field,this.operator,this.value,this.predicate,this.filterSettings.enableCaseSensitivity,this.ignoreAccent),this.filterByMethod=!0,i.value=r,this.updateFilterMsg()},r.prototype.validateFilterValue=function(e){var i,r;switch(this.matchCase=this.filterSettings.enableCaseSensitivity,this.column.type){case"number":this.column.filter.operator?this.operator=this.column.filter.operator:this.operator=this.filterOperators.equal,i=[">","<","=","!"];for(var n=0;n<e.length;n++)if(i.indexOf(e[n])>-1){r=n;break}this.getOperator(e.substring(r)),0!==r&&(this.value=e.substring(0,r)),""!==this.value&&e.length>=1&&(this.value=this.valueFormatter.fromView(this.value,this.column.getParser(),this.column.type)),isNaN(this.value)&&(this.filterStatusMsg=this.l10n.getConstant("InvalidFilterMessage"));break;case"date":case"datetime":this.operator=this.filterOperators.equal,""===this.value||this.value instanceof Date||(this.getOperator(e),this.value=this.valueFormatter.fromView(this.value,this.column.getParser(),this.column.type),t.isNullOrUndefined(this.value)&&(this.filterStatusMsg=this.l10n.getConstant("InvalidFilterMessage")));break;case"string":this.matchCase=!1,"*"===e.charAt(0)?(this.value=this.value.slice(1),this.operator=this.filterOperators.startsWith):"%"===e.charAt(e.length-1)?(this.value=this.value.slice(0,-1),this.operator=this.filterOperators.startsWith):"%"===e.charAt(0)?(this.value=this.value.slice(1),this.operator=this.filterOperators.endsWith):this.column.filter.operator?this.operator=this.column.filter.operator:this.operator=this.filterOperators.startsWith;break;case"boolean":"true"===e.toLowerCase()||"1"===e?this.value=!0:"false"===e.toLowerCase()||"0"===e?this.value=!1:e.length&&(this.filterStatusMsg=this.l10n.getConstant("InvalidFilterMessage")),this.operator=this.filterOperators.equal;break;default:this.column.filter.operator?this.operator=this.column.filter.operator:this.operator=this.filterOperators.equal}},r.prototype.getOperator=function(e){var r=e.charAt(0),n=e.slice(0,2),o=t.extend({"=":this.filterOperators.equal,"!":this.filterOperators.notEqual},i.DataUtil.operatorSymbols);(o.hasOwnProperty(r)||o.hasOwnProperty(n))&&(this.operator=o[r],this.value=e.substring(1),this.operator||(this.operator=o[n],this.value=e.substring(2))),this.operator!==this.filterOperators.lessThan&&this.operator!==this.filterOperators.greaterThan||"="===this.value.charAt(0)&&(this.operator=this.operator+"orequal",this.value=this.value.substring(1))},r.prototype.columnPositionChanged=function(){this.parent.filterSettings.type},r.prototype.getLocalizedCustomOperators=function(){var e=[{value:"equal",text:this.l10n.getConstant("Equal")},{value:"greaterthan",text:this.l10n.getConstant("GreaterThan")},{value:"greaterthanorequal",text:this.l10n.getConstant("GreaterThanOrEqual")},{value:"lessthan",text:this.l10n.getConstant("LessThan")},{value:"lessthanorequal",text:this.l10n.getConstant("LessThanOrEqual")},{value:"notequal",text:this.l10n.getConstant("NotEqual")}];this.customOperators={stringOperator:[{value:"startswith",text:this.l10n.getConstant("StartsWith")},{value:"endswith",text:this.l10n.getConstant("EndsWith")},{value:"contains",text:this.l10n.getConstant("Contains")},{value:"equal",text:this.l10n.getConstant("Equal")},{value:"notequal",text:this.l10n.getConstant("NotEqual")}],numberOperator:e,dateOperator:e,datetimeOperator:e,booleanOperator:[{value:"equal",text:this.l10n.getConstant("Equal")},{value:"notequal",text:this.l10n.getConstant("NotEqual")}]}},r.prototype.openMenuByField=function(e){var t=this.parent;if(t.enableAdaptiveUI)return void this.showCustomFilter(!1);var i=t.getColumnByField(e),r=t.getColumnHeaderByField(e).querySelector(".e-filtermenudiv");if(r){var n=t.element.getBoundingClientRect(),o=r.getBoundingClientRect();this.filterDialogOpen(i,r,o.right-n.left,o.bottom-n.top)}},r.prototype.filterIconClickHandler=function(e){var t=e.target;if(t.classList.contains("e-filtermenudiv")&&("Menu"===this.parent.filterSettings.type||"CheckBox"===this.parent.filterSettings.type||"Excel"===this.parent.filterSettings.type)){var i=this.parent.getColumnByUid(O(t,"e-headercell").firstElementChild.getAttribute("e-mappinguid"));if(this.column=i,this.fltrDlgDetails.field===i.field&&this.fltrDlgDetails.isOpen)return;this.filterModule&&this.filterModule.closeDialog(),this.fltrDlgDetails={field:i.field,isOpen:!0},this.openMenuByField(i.field)}},r.prototype.clickHandler=function(e){if("FilterBar"===this.filterSettings.type&&this.filterSettings.showFilterBarOperator&&(O(e.target,"e-filterbarcell")&&e.target.classList.contains("e-input-group-icon")&&t.closest(e.target,"div").querySelector(".e-filterbaroperator").focus(),e.target.classList.contains("e-list-item"))){var i=document.querySelector(".e-popup-open").getAttribute("id").replace("_popup","");-1!==i.indexOf("grid-column")&&t.closest(document.getElementById(i),"div").querySelector(".e-filtertext").focus()}if("Immediate"===this.filterSettings.mode||"Menu"===this.parent.filterSettings.type||"CheckBox"===this.parent.filterSettings.type||"Excel"===this.parent.filterSettings.type){var r=e.target,n=r.classList.contains("e-day"),o=O(this.parent.element,"e-dialog"),s=!1,l=O(r,"e-popup"),a=this.parent.element.querySelector(".e-filter-popup");if(o&&l&&(s=o.id===l.id),a&&(O(r,"e-excel-ascending")||O(r,"e-excel-descending"))&&this.filterModule.closeDialog(r),O(r,"e-filter-popup")||r.classList.contains("e-filtermenudiv"))return;if(!this.filterModule||O(r,"e-popup-wrapper")||t.closest(r,".e-filter-item.e-menu-item")||n||(s&&!O(r,"e-filter-popup")&&!O(r,"e-popup-flmenu")||!l&&a)&&(this.filterModule.isresetFocus=O(r,"e-grid")&&O(r,"e-grid").id===this.parent.element.id,this.filterModule.closeDialog(r)),"Immediate"===this.filterSettings.mode&&r.classList.contains("e-clear-icon")){var h=r.previousElementSibling;this.removeFilteredColsByField(h.id.slice(0,-14))}}},r.prototype.filterHandler=function(e){this.actualPredicate[e.field]=e.actualPredicate;for(var t=new i.DataManager(this.filterSettings.columns),r=(new i.Query).where("field",this.filterOperators.equal,e.field),n=t.executeLocal(r),o=0;o<n.length;o++){for(var s=-1,l=0;l<this.filterSettings.columns.length;l++)if(n[o].field===this.filterSettings.columns[l].field){s=l;break}-1!==s&&this.filterSettings.columns.splice(s,1)}this.values[e.field]&&delete this.values[e.field];var a=this.parent.showColumnMenu?".e-columnmenu":".e-icon-filter",h=this.parent.getColumnHeaderByField(e.field).querySelector(a);"filtering"===e.action?(this.filterSettings.columns=this.filterSettings.columns.concat(e.filterCollection),this.filterSettings.columns.length&&h&&h.classList.add("e-filtered")):(h&&h.classList.remove("e-filtered"),e.requestType="filtering",this.parent.renderModule.refresh(e)),this.parent.dataBind()},r.prototype.updateFilter=function(){var e=this.filterSettings.columns;this.actualPredicate={};for(var t=0;t<e.length;t++){this.column=this.parent.getColumnByField(e[t].field)||ae(e[t].field,this.parent.getForeignKeyColumns());var i=e[t].field;this.parent.getColumnByField(e[t].field)||(i=ae(e[t].field,this.parent.getForeignKeyColumns()).field),this.refreshFilterIcon(i,e[t].operator,e[t].value,e[t].type,e[t].predicate,e[t].matchCase,e[t].ignoreAccent,e[t].uid)}},r.prototype.refreshFilterIcon=function(e,t,i,r,n,o,s,l){var a={field:e,predicate:n,matchCase:o,ignoreAccent:s,operator:t,value:i,type:r};this.actualPredicate[e]?this.actualPredicate[e].push(a):this.actualPredicate[e]=[a];var h=l?this.parent.grabColumnByUidFromAllCols(l).field:e;this.addFilteredClass(h)},r.prototype.addFilteredClass=function(e){var t;this.parent.showColumnMenu?t=this.parent.getColumnHeaderByField(e).querySelector(".e-columnmenu"):this.parent.getColumnByField(e)&&(t=this.parent.getColumnHeaderByField(e).querySelector(".e-icon-filter")),t&&t.classList.add("e-filtered")},r.prototype.getFilterUIInfo=function(){return this.filterModule?this.filterModule.getFilterUIInfo():{}},r.prototype.getOperatorName=function(e){return document.getElementById(this.parent.getColumnByField(e).uid).ej2_instances[0].value},r.prototype.renderCheckboxOnFilterMenu=function(){return this.filterModule.renderCheckBoxMenu()},r}(),Wn={root:"e-rhandler",suppress:"e-rsuppress",icon:"e-ricon",helper:"e-rhelper",header:"th.e-headercell",cursor:"e-rcursor"},Kn=function(){function i(e){this.tapped=!1,this.isDblClk=!0,this.parent=e,this.parent.isDestroyed||(this.widthService=new Tr(e),this.addEventListener())}return i.prototype.autoFitColumns=function(e){var t=void 0===e||null===e||e.length<=0?this.parent.getColumns().map(function(e){return e.field}):"string"==typeof e?[e]:e;this.findColumn(t)},i.prototype.autoFit=function(){var e=this.parent.getColumns().filter(function(e){return!0===e.autoFit}).map(function(e){return e.field||e.headerText});e.length>0&&this.autoFitColumns(e),"Auto"===this.parent.resizeSettings.mode&&this.widthService.setWidthToTable()},i.prototype.resizeColumn=function(e,i,r){var n,o,s,l,a,h,d=this.parent,c=0,p=Ri,u=0,g=r||this.parent.getUidByColumnField(e),f=this.parent.getNormalizedColumnIndex(g),m=this.parent.getColumnIndexByField(e),y=d.getFrozenColumns()||d.getFrozenLeftColumnsCount(),v=d.getMovableColumnsCount();if(t.isNullOrUndefined(d.getFooterContent())||(s=d.getFooterContentTable()),d.isFrozenGrid()){var C=d.getColumnByField(e);C.getFreezeTableName()===Li?(n=d.getHeaderTable(),o=d.getContentTable(),l=n.querySelector('[e-mappinguid="'+g+'"]').parentElement.cloneNode(!0),a=o.querySelectorAll("td:nth-child("+(f+1)+")"),s&&(h=s.querySelectorAll("td:nth-child("+(f+1)+")"))):"movable"===C.getFreezeTableName()?(n=d.getHeaderContent().querySelector("."+Ii).children[0],o=d.getContent().querySelector("."+Ei).children[0],l=n.querySelector('[e-mappinguid="'+g+'"]').parentElement.cloneNode(!0),a=o.querySelectorAll("td:nth-child("+(f-y+1)+")"),s&&(h=(s=d.getFooterContent().querySelector(".e-movablefootercontent").children[0]).querySelectorAll("td:nth-child("+(f-y+1)+")"))):C.getFreezeTableName()===Ni&&(n=d.getHeaderContent().querySelector(".e-frozen-right-header").children[0],o=d.getContent().querySelector(".e-frozen-right-content").children[0],l=n.querySelector('[e-mappinguid="'+g+'"]').parentElement.cloneNode(!0),a=o.querySelectorAll("td:nth-child("+(f-(y+v)+1)+")"),s&&(h=(s=d.getFooterContent().querySelector(".e-movablefootercontent").children[0]).querySelectorAll("td:nth-child("+(f-(y+v)+1)+")")))}else n=d.getHeaderTable(),o=d.getContentTable(),l=n.querySelector('[e-mappinguid="'+g+'"]').parentElement.cloneNode(!0),a=o.querySelectorAll("td:nth-child("+(f+1)+"):not(.e-groupcaption)"),s&&(h=s.querySelectorAll("td:nth-child("+(f+1)+"):not(.e-groupcaption)"));var w=[].slice.call(n.querySelector("tr").getElementsByClassName("e-grouptopleftcell"));if(w.length>0)for(O=0;O<w.length;O++)u+=w[O].offsetWidth;var b=o.querySelector(".e-detailrowcollapse")||o.querySelector(".e-detailrowexpand");(this.parent.detailTemplate||this.parent.childGrid)&&b&&(u+=b.offsetWidth);var S=[l],R=[],x=[];if(s)for(O=0;O<h.length;O++)x[O]=h[O].cloneNode(!0);for(O=0;O<a.length;O++)R[O]=a[O].cloneNode(!0);var F=this.createTable(n,S,"e-gridheader"),E=this.createTable(o,R,p),I=null;x.length&&(I=this.createTable(s,x,"e-gridfooter"));var T=d.getColumns()[m],z=T.width=t.formatUnit(Math.max(F,E,I)),D=T.maxWidth&&parseFloat(T.maxWidth.toString());if(parseInt(z,10)>D&&(T.width=D),this.widthService.setColumnWidth(d.getColumns()[m]),!1===d.getColumns().some(function(e){return null===e.width||void 0===e.width||e.width.length<=0}))for(var M=d.getColumns(),O=0;O<M.length;O++)M[O].visible&&(c+=parseFloat(M[O].width));var k=c+u;c>0&&!d.isFrozenGrid()&&((this.parent.detailTemplate||this.parent.childGrid)&&this.widthService.setColumnWidth(new Ct({width:"30px"})),"Auto"===this.parent.resizeSettings.mode&&(k="100%"),n.style.width=t.formatUnit(k),o.style.width=t.formatUnit(k),t.isNullOrUndefined(s)||(s.style.width=t.formatUnit(k)));var A=n.offsetWidth;d.getContent().scrollWidth>A?(n.classList.add("e-tableborder"),o.classList.add("e-tableborder")):(n.classList.remove("e-tableborder"),o.classList.remove("e-tableborder")),t.isNullOrUndefined(s)||s.classList.add("e-tableborder")},i.prototype.destroy=function(){var e=this.parent.element;e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.widthService=null,this.unwireEvents(),this.removeEventListener())},i.prototype.getModuleName=function(){return"resize"},i.prototype.findColumn=function(e){for(var i=0;i<e.length;i++){var r=e[i],n=this.parent.getColumnIndexByField(r),o=this.parent.getColumns()[n];n>-1&&!t.isNullOrUndefined(o)&&!0===o.visible&&this.resizeColumn(r,n)}},i.prototype.createTable=function(e,t,i){var r=this.parent.createElement("div");r.className=this.parent.element.className,r.style.cssText="display: inline-block;visibility:hidden;position:absolute";var n=this.parent.createElement("div");n.className=i;var o=this.parent.createElement("table");o.className=e.className,o.classList.add("e-resizetable"),o.style.cssText="table-layout: auto;width: auto";for(var s=this.parent.createElement("tr"),l=0;l<t.length;l++){var a=s.cloneNode();a.className=e.querySelector("tr").className,a.appendChild(t[l]),o.appendChild(a)}n.appendChild(o),r.appendChild(n),document.body.appendChild(r);var h=o.getBoundingClientRect().width;return document.body.removeChild(r),Math.ceil(h)},i.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Ht,this.refreshHeight,this),this.parent.on(Ot,this.wireEvents,this),this.parent.on(At,this.autoFit,this),this.parent.on(gi,this.refreshHeight,this))},i.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Ht,this.refreshHeight),this.parent.off(Ot,this.wireEvents),this.parent.off(gi,this.refreshHeight))},i.prototype.render=function(){this.unwireEvents(),this.wireEvents(),this.setHandlerHeight()},i.prototype.refreshHeight=function(){for(var e=this.getResizeHandlers(),t=0;t<e.length;t++)e[t].parentElement.offsetHeight>0&&(e[t].style.height=e[t].parentElement.offsetHeight+"px");this.setHandlerHeight()},i.prototype.wireEvents=function(){t.EventHandler.add(this.parent.getHeaderContent(),t.Browser.touchStartEvent,this.touchResizeStart,this),t.EventHandler.add(this.parent.getHeaderContent(),"dblclick",this.callAutoFit,this)},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.parent.getHeaderContent(),t.Browser.touchStartEvent,this.touchResizeStart),t.EventHandler.remove(this.parent.getHeaderContent(),"dblclick",this.callAutoFit)},i.prototype.getResizeHandlers=function(){return this.parent.isFrozenGrid()?[].slice.call(this.parent.getHeaderContent().getElementsByClassName(Wn.root)):[].slice.call(this.parent.getHeaderTable().getElementsByClassName(Wn.root))},i.prototype.setHandlerHeight=function(){for(var e=[].slice.call(this.parent.getHeaderTable().getElementsByClassName(Wn.suppress)),t=0;t<e.length;t++)e[t].style.height=e[t].parentElement.offsetHeight+"px"},i.prototype.callAutoFit=function(e){if(e.target.classList.contains("e-rhandler")){var i=this.getTargetColumn(e);if(i.columns)return;this.resizeColumn(i.field,this.parent.getNormalizedColumnIndex(i.uid),i.uid),t.closest(e.target,Wn.header).classList.add("e-resized")}},i.prototype.touchResizeStart=function(t){if(!e.Global.timer)return e.Global.timer=setTimeout(function(){e.Global.timer=null},300),this.resizeStart(t);clearTimeout(e.Global.timer),e.Global.timer=null,this.callAutoFit(t)},i.prototype.resizeStart=function(e){var i=this;if(e.target.classList.contains("e-rhandler")){if(!this.helper){if(0===this.getScrollBarWidth()){if(this.parent.allowGrouping)for(u=0;u<this.parent.groupSettings.columns.length;u++)this.widthService.setColumnWidth(new Ct({width:"30px"}),u);for(var r=0,n=this.refreshColumnWidth();r<n.length;r++){var o=n[r];this.widthService.setColumnWidth(o)}this.widthService.setWidthToTable()}if(this.refreshStackedColumnWidth(),this.element=e.target,this.parent.getVisibleFrozenColumns()){var s=this.parent.getMovableContentTbody(),l=this.parent.getFrozenLeftContentTbody(),a=this.parent.getFrozenRightContentTbody(),h=[].slice.call(s.querySelectorAll("tr")),d=[].slice.call(l.querySelectorAll("tr")),c=[];this.parent.getFrozenMode()===Pi&&a&&(c=[].slice.call(a.querySelectorAll("tr")));for(var p=this,u=0;u<h.length;u++)!function(e){Be(p.parent,function(t,r){i.parent.rowHeight?r[e].style.height=i.parent.rowHeight+"px":r[e].style.removeProperty("height")},[d,h,c])}(u)}this.parentElementWidth=this.parent.element.getBoundingClientRect().width,this.appendHelper(),this.column=this.getTargetColumn(e),this.pageX=this.getPointX(e),this.column.getFreezeTableName()===Ni?this.parent.enableRtl?this.minMove=(this.column.minWidth?parseFloat(this.column.minWidth.toString()):0)-parseFloat(t.isNullOrUndefined(this.column.width)?"":this.column.width.toString()):this.minMove=parseFloat(t.isNullOrUndefined(this.column.width)?"":this.column.width.toString())-(this.column.minWidth?parseFloat(this.column.minWidth.toString()):0):this.parent.enableRtl?this.minMove=parseFloat(this.column.width.toString())-(this.column.minWidth?parseFloat(this.column.minWidth.toString()):0):this.minMove=(this.column.minWidth?parseFloat(this.column.minWidth.toString()):0)-parseFloat(t.isNullOrUndefined(this.column.width)?"":this.column.width.toString()),this.minMove+=this.pageX}if(t.Browser.isDevice&&!this.helper.classList.contains(Wn.icon))this.helper.classList.add(Wn.icon),t.EventHandler.add(document,t.Browser.touchStartEvent,this.removeHelper,this),t.EventHandler.add(this.helper,t.Browser.touchStartEvent,this.resizeStart,this);else{var g={e:e,column:this.column};this.parent.trigger("resizeStart",g,function(e){if(e.cancel||i.parent.isEdit)return void i.cancelResizeAction();t.EventHandler.add(document,t.Browser.touchEndEvent,i.resizeEnd,i),t.EventHandler.add(i.parent.element,t.Browser.touchMoveEvent,i.resizing,i),i.updateCursor("add")})}}},i.prototype.cancelResizeAction=function(e){e&&(t.EventHandler.remove(this.parent.element,t.Browser.touchMoveEvent,this.resizing),t.EventHandler.remove(document,t.Browser.touchEndEvent,this.resizeEnd),this.updateCursor("remove")),t.Browser.isDevice&&(t.EventHandler.remove(document,t.Browser.touchStartEvent,this.removeHelper),t.EventHandler.remove(this.helper,t.Browser.touchStartEvent,this.resizeStart)),t.detach(this.helper),this.refresh()},i.prototype.getWidth=function(e,t,i){return t&&e<t?t:i&&e>i?i:e},i.prototype.updateResizeEleHeight=function(){for(var e=[].slice.call(this.parent.getHeaderContent().getElementsByClassName("e-rhandler")),t=0;t<e.length;t++)e[t].style.height=this.element.parentElement.offsetHeight+"px"},i.prototype.getColData=function(e,i){return{width:parseFloat(t.isNullOrUndefined(this.widthService.getWidth(e))||"auto"===this.widthService.getWidth(e)?"0":this.widthService.getWidth(e).toString())+i,minWidth:e.minWidth?parseFloat(e.minWidth.toString()):null,maxWidth:e.maxWidth?parseFloat(e.maxWidth.toString()):null}},i.prototype.resizing=function(e){if(!t.isNullOrUndefined(this.column)){var i=0;t.isNullOrUndefined(this.column)&&(i=O(this.element,"th").offsetWidth),this.parent.allowTextWrap&&(this.updateResizeEleHeight(),this.setHelperHeight());var r=this.getPointX(e),n=this.parent.enableRtl?-(r-this.pageX):r-this.pageX;this.column.getFreezeTableName()===Ni&&(n=this.parent.enableRtl?r-this.pageX:this.pageX-r);var o=this.getColData(this.column,n);o.width||(o.width=t.closest(this.element,"th").offsetWidth);var s=this.getWidth(o.width,o.minWidth,o.maxWidth);if(this.parent.log("resize_min_max",{column:this.column,width:s}),this.column.getFreezeTableName()===Ni&&(this.parent.enableRtl&&this.minMove>=r||!this.parent.enableRtl&&this.minMove<=r)&&(s=this.column.minWidth?parseFloat(this.column.minWidth.toString()):10,this.pageX=r=this.minMove),(this.column.getFreezeTableName()!==Ni&&(!this.parent.enableRtl&&this.minMove>=r||this.parent.enableRtl&&this.minMove<=r)||this.column.getFreezeTableName()===Ni&&(this.parent.enableRtl&&this.minMove>=r||!this.parent.enableRtl&&this.minMove<=r))&&(s=this.column.minWidth?parseFloat(this.column.minWidth.toString()):10,this.pageX=r=this.minMove),s!==parseFloat(t.isNullOrUndefined(this.column.width)||"auto"===this.column.width?i.toString():this.column.width.toString())){this.pageX=r,this.column.width=t.formatUnit(s);var l={e:e,column:this.column};if(this.parent.trigger("resizing",l),l.cancel)return void this.cancelResizeAction(!0);var a=[this.column],h=[this.column];this.column.columns&&(a=this.getSubColumns(this.column,[]),a=this.calulateColumnsWidth(a,!1,n),h=this.calulateColumnsWidth(a,!0,n));for(var d=0,c=h;d<c.length;d++){var p=c[d];this.widthService.setColumnWidth(p,null,"resize")}this.updateHelper()}this.isDblClk=!1}},i.prototype.calulateColumnsWidth=function(e,i,r){for(var n=[],o=0,s=e;o<s.length;o++){for(var l=s[o],a=0,h=0;h<e.length;h++)a+=parseFloat(e[h].width.toString());var d=this.getColData(l,parseFloat(l.width)*r/a),c=this.getWidth(d.width,d.minWidth,d.maxWidth);c!==parseFloat(l.width.toString())&&(i&&(l.width=t.formatUnit(c<1?1:c)),n.push(l))}return n},i.prototype.getSubColumns=function(e,t){for(var i=0,r=e.columns;i<r.length;i++){var n=r[i];!1!==n.visible&&n.allowResizing&&(n.columns?this.getSubColumns(n,t):t.push(n))}return t},i.prototype.resizeEnd=function(e){if(this.helper&&!this.parent.isDestroyed){t.EventHandler.remove(this.parent.element,t.Browser.touchMoveEvent,this.resizing),t.EventHandler.remove(document,t.Browser.touchEndEvent,this.resizeEnd),this.updateCursor("remove"),t.detach(this.helper);var i={e:e,column:this.column},r=this.parent.getContent().querySelector("."+Di),n=r.querySelector("."+Ei)?r.querySelector("."+Ei):r;n.scrollHeight>n.clientHeight&&(this.parent.scrollModule.setPadding(),n.style.overflowY="scroll"),this.parent.trigger("resizeStop",i),t.closest(this.element,".e-headercell").classList.add("e-resized"),O(this.element,"e-frozenheader")?this.isFrozenColResized=!0:this.isFrozenColResized=!1,this.parent.isFrozenGrid()&&this.parent.notify(oi,{case:"textwrap"}),this.parent.allowTextWrap&&(this.updateResizeEleHeight(),this.parent.notify("textWrapRefresh",{case:"textwrap"})),this.refresh(),this.doubleTapEvent(e),this.isDblClk=!0}},i.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].pageX:e.pageX},i.prototype.refreshColumnWidth=function(){for(var e=this.parent.getColumns(),t=0,i=[].slice.apply(this.parent.getHeaderContent().querySelectorAll("th.e-headercell"));t<i.length;t++)for(var r=i[t],n=0,o=e;n<o.length;n++){var s=o[n];if(r.querySelector("[e-mappinguid]")&&r.querySelector("[e-mappinguid]").getAttribute("e-mappinguid")===s.uid&&s.visible){s.width=r.getBoundingClientRect().width;break}}return e},i.prototype.refreshStackedColumnWidth=function(){for(var e=0,t=this.parent.getStackedColumns(this.parent.columns);e<t.length;e++){var i=t[e];i.width=this.getStackedWidth(i,0)}},i.prototype.getStackedWidth=function(e,t){for(var i=0,r=e.columns;i<r.length;i++){var n=r[i];!1!==n.visible&&(n.columns?this.getStackedWidth(n,t):t+=n.width)}return t},i.prototype.getTargetColumn=function(e){var i=t.closest(e.target,Wn.header),r=(i=i.querySelector(".e-headercelldiv")||i.querySelector(".e-stackedheadercelldiv")).getAttribute("e-mappinguid");return this.parent.getColumnByUid(r)},i.prototype.updateCursor=function(e){var t=[].slice.call(this.parent.getHeaderContent().querySelectorAll("th"));t.push(this.parent.element);for(var i=0,r=t;i<r.length;i++)r[i].classList[e](Wn.cursor)},i.prototype.refresh=function(){this.column=null,this.pageX=null,this.element=null,this.helper=null},i.prototype.appendHelper=function(){this.helper=this.parent.createElement("div",{className:Wn.helper}),this.parent.element.appendChild(this.helper),this.setHelperHeight()},i.prototype.setHelperHeight=function(){var e=this.parent.isFrozenGrid(),i=e?this.parent.getContent().querySelector("."+Di).offsetHeight:this.parent.getContent().offsetHeight-this.getScrollBarWidth(),r=t.closest(this.element,Wn.header),n=[].slice.call(this.parent.getHeaderContent().querySelectorAll("tr")),o=this.parent.getFrozenRightColumnsCount();e&&(n=O(r,Ii)?[].slice.call(this.parent.getHeaderContent().querySelector("."+Ii).querySelectorAll("tr")):o&&O(r,"e-frozen-right-header")?[].slice.call(this.parent.getHeaderContent().querySelector(".e-frozen-right-header").querySelectorAll("tr")):[].slice.call(this.parent.getHeaderContent().querySelector(".e-frozen-left-header").querySelectorAll("tr")));for(var s=n.indexOf(r.parentElement);s<n.length&&s>-1;s++)i+=n[s].offsetHeight;var l=this.calcPos(r);O(r,"e-frozen-right-header")?l.left+=this.parent.enableRtl?r.offsetWidth-2:-1:l.left+=this.parent.enableRtl?-1:r.offsetWidth-2,this.helper.style.cssText="height: "+i+"px; top: "+l.top+"px; left:"+Math.floor(l.left)+"px;",this.parent.enableVirtualization&&this.helper.classList.add("e-virtual-rhandler")},i.prototype.getScrollBarWidth=function(e){var t=this.parent.getContent().firstChild;return t.scrollHeight>t.clientHeight&&e||t.scrollWidth>t.clientWidth?j():0},i.prototype.removeHelper=function(e){var i=e.target.classList;i.contains(Wn.root)||i.contains(Wn.icon)||!this.helper||(t.EventHandler.remove(document,t.Browser.touchStartEvent,this.removeHelper),t.EventHandler.remove(this.helper,t.Browser.touchStartEvent,this.resizeStart),t.detach(this.helper),this.refresh())},i.prototype.updateHelper=function(){var e,i=t.closest(this.element,Wn.header);if((e=O(i,"e-frozen-right-header")?Math.floor(this.calcPos(i).left+(this.parent.enableRtl?i.offsetWidth-2:-1)):Math.floor(this.calcPos(i).left+(this.parent.enableRtl?-1:i.offsetWidth-2)))>this.parentElementWidth&&(e=this.parentElementWidth-2),this.parent.isFrozenGrid()){var r=t.closest(i,"."+Mi).offsetLeft;e<r&&(e=r)}this.helper.style.left=e+"px"},i.prototype.calcPos=function(e){for(var t={top:0,left:0},i=e.getBoundingClientRect(),r=e.ownerDocument,n=O(e,"e-grid")||r.documentElement;n&&(n===r.body||n===r.documentElement)&&"static"===n.style.position;)n=n.parentNode;return n&&n!==e&&1===n.nodeType&&(t=n.getBoundingClientRect()),{top:i.top-t.top,left:i.left-t.left}},i.prototype.doubleTapEvent=function(e){var t=this;this.getUserAgent()&&this.isDblClk&&(this.tapped?(clearTimeout(this.tapped),this.callAutoFit(e),this.tapped=null):this.tapped=setTimeout(function(){t.tapped=null},300))},i.prototype.getUserAgent=function(){var e=t.Browser.userAgent.toLowerCase();return/iphone|ipod|ipad/.test(e)},i.prototype.timeoutHandler=function(){this.tapped=null},i}(),Qn=function(){function e(e){this.parent=e,this.parent.isDestroyed||(this.parent.on(Yt,this.headerDrop,this),this.parent.on(Bt,this.enableAfterRender,this),this.parent.on(Ut,this.onActionComplete,this),this.parent.on(Ft,this.drag,this),this.parent.on(xt,this.dragStart,this),this.parent.on(Jt,this.dragStop,this),this.parent.on(Yt,this.headerDrop,this),this.parent.on(Ht,this.createReorderElement,this),this.parent.on(Vt,this.keyPressHandler,this))}return e.prototype.chkDropPosition=function(e,i){var r=this.parent.getColumnByUid(i.firstElementChild.getAttribute("e-mappinguid")),n=!r||!r.lockColumn;return(e.parentElement.isEqualNode(i.parentElement)||this.parent.enableColumnVirtualization||this.parent.isFrozenGrid()&&Array.prototype.indexOf.call(t.closest(e,"thead").children,e.parentElement)===Array.prototype.indexOf.call(t.closest(i,"thead").children,i.parentElement))&&this.targetParentContainerIndex(e,i)>-1&&n},e.prototype.chkDropAllCols=function(e,t){for(var i,r=this.getHeaderCells();!i&&r.length>0;)i=e!==r.pop()&&this.targetParentContainerIndex(e,t)>-1;return i},e.prototype.findColParent=function(e,t,i){i=i;for(var r=0,n=t.length;r<n;r++){if(e===t[r])return!0;if(t[r].columns){var o=i.length;if(i.push(t[r]),this.findColParent(e,t[r].columns,i))return!0;i.splice(o,i.length-o)}}return!1},e.prototype.getColumnsModel=function(e){var t=[],i=[];if(!this.parent.getFrozenColumns()&&this.parent.isFrozenGrid())return this.parent.getColumns();for(var r=0,n=e.length;r<n;r++)t.push(e[r]),e[r].columns&&(i=i.concat(e[r].columns));return i.length&&(t=t.concat(this.getColumnsModel(i))),t},e.prototype.headerDrop=function(e){var i=this.parent,r=(this.element.querySelector(".e-headercelldiv")||this.element.querySelector(".e-stackedheadercelldiv")).getAttribute("e-mappinguid"),n=i.getColumnByUid(r);if(!t.closest(e.target,"th")||!t.isNullOrUndefined(n)&&(!n.allowReordering||n.lockColumn))return void this.parent.log("action_disabled_column",{moduleName:this.getModuleName(),column:n});var o=t.closest(e.target,".e-headercell"),s=(o.querySelector(".e-headercelldiv")||o.querySelector(".e-stackedheadercelldiv")).getAttribute("e-mappinguid");if(!t.isNullOrUndefined(s)){var l=i.getColumnByUid(s);if(t.isNullOrUndefined(l)||!l.allowReordering||l.lockColumn)return void this.parent.log("action_disabled_column",{moduleName:this.getModuleName(),column:n,destColumn:l})}if(o&&this.chkDropPosition(this.element,o)&&this.chkDropAllCols(this.element,o))if(this.parent.enableColumnVirtualization){var a=this.parent.columns,h=this.element.querySelector(".e-headercelldiv").getAttribute("e-mappinguid"),d=null,c=this.parent.columns.filter(function(e){return e.uid===h})[0],p=o.querySelector(".e-headercelldiv").getAttribute("e-mappinguid");a.some(function(e,t){return e.uid===p&&(d=t,e.uid===p)}),t.isNullOrUndefined(d)||this.moveColumns(d,c)}else{var u=this.targetParentContainerIndex(this.element,o),g=this.element.firstElementChild.getAttribute("e-mappinguid");if(this.destElement=o,this.parent.notify("set-reorder-destination-element",{ele:o}),g)this.moveColumns(u,this.parent.getColumnByUid(g));else{var f=this.getHeaderCells(),m=k(this.element,f),a=this.getColumnsModel(this.parent.columns);this.moveColumns(u,a[m])}}},e.prototype.isActionPrevent=function(e){return X(e)},e.prototype.moveColumns=function(e,t,i,r){var n=this.parent;if(this.isActionPrevent(n))return void n.notify(ii,{instance:this,handler:this.moveColumns,arg1:e,arg2:t});var o=!n.getFrozenColumns()&&n.isFrozenGrid(),s=this.getColParent(t,this.parent.columns),l=s?s.columns:o?this.parent.getColumns():this.parent.columns,a=A(t,l);if((this.parent.isFrozenGrid()&&s||this.parent.lockcolPositionCount)&&!i){for(d=0;d<l.length;d++)if(l[d].field===t.field){a=d;break}var h=this.parent.getColumnByUid(this.destElement.firstElementChild.getAttribute("e-mappinguid"));if(h){for(d=0;d<l.length;d++)if(l[d].field===h.field){e=d;break}}else for(var d=0;d<l.length;d++)l[d].headerText===this.destElement.innerText.trim()&&(e=d)}if(n.allowReordering&&a!==e&&-1!==a&&-1!==e){l.splice(e,0,l.splice(a,1)[0]);var c={column:t,destIndex:e,columns:l,parent:s,cancel:!1};n.notify("refresh-frozen-columns",c),c.cancel||(n.getColumns(!0),n.notify(Kt,{fromIndex:e,toIndex:a}),!1!==r&&n.notify(Lt,{type:bt,requestType:"reorder",fromIndex:e,toIndex:a,toColumnUid:t.uid}))}},e.prototype.targetParentContainerIndex=function(e,t){var i=!this.parent.getFrozenColumns()&&this.parent.isFrozenGrid()?this.parent.getColumns():this.parent.columns,r=this.getHeaderCells(),n=this.getColumnsModel(i),o=this.getColParent(n[k(e,r)],i);return i=o?o.columns:i,A(n[k(t,r)],i)},e.prototype.getHeaderCells=function(){var e=this.parent.getFrozenColumns();if(e||this.parent.lockcolPositionCount){var t=void 0,i=void 0,r=[],n=[].slice.call(this.parent.getHeaderTable().getElementsByClassName("e-columnheader"));if(e)for(var o=[].slice.call(this.parent.getHeaderContent().querySelector("."+Ii).getElementsByClassName("e-columnheader")),s=0;s<n.length;s++){t=[].slice.call(n[s].getElementsByClassName("e-headercell")),i=[].slice.call(o[s].getElementsByClassName("e-headercell"));for(var l=void 0,a=0;a<t.length;a++){for(h=0;h<i.length;h++)if(i[h].innerText===t[a].innerText){l=!0;break}l||(r=r.concat([t[a]]))}for(h=0;h<i.length;h++)r.push(i[h])}else for(s=0;s<n.length;s++){i=[].slice.call(n[s].getElementsByClassName("e-headercell"));for(a=0;a<i.length;a++){for(var l=void 0,h=a+1;h<i.length;h++)if(i[h].innerText===i[a].innerText){l=!0;break}l||(r=r.concat([i[a]]))}}return r}return[].slice.call(this.parent.element.getElementsByClassName("e-headercell"))},e.prototype.getColParent=function(e,t){var i=[];return this.findColParent(e,t,i),i[i.length-1]},e.prototype.reorderSingleColumn=function(e,i){var r=this.parent.enableColumnVirtualization?this.parent.columns.filter(function(t){return t.field===e})[0]:this.parent.getColumnByField(e),n=this.parent.enableColumnVirtualization?this.parent.columns.filter(function(e){return e.field===i})[0]:this.parent.getColumnByField(i);if(!t.isNullOrUndefined(r)&&(!r.allowReordering||r.lockColumn)||!t.isNullOrUndefined(n)&&(!n.allowReordering||r.lockColumn))return void this.parent.log("action_disabled_column",{moduleName:this.getModuleName(),column:r,destColumn:n});var o=n,s=this.getColParent(o,this.parent.columns),l=A(o,s?s.columns:this.parent.columns);l>-1&&this.moveColumns(l,r,!0)},e.prototype.reorderMultipleColumns=function(e,i){var r=this.parent.getColumnIndexByField(i),n=this.parent.getColumnByField(i);if(!(r<0)&&(t.isNullOrUndefined(n)||n.allowReordering&&!n.lockColumn)){for(o=0;o<e.length;o++){s=this.parent.getColumnByField(e[o]);if(!t.isNullOrUndefined(s)&&(!s.allowReordering||s.lockColumn))return}for(var o=0;o<e.length;o++){var s=this.parent.getColumnByIndex(r),l=this.getColParent(s,this.parent.columns),a=A(s,l?l.columns:this.parent.columns);a>-1&&this.moveColumns(a,this.parent.getColumnByField(e[o]),!0,!0),this.parent.getColumnIndexByField(e[o+1])>=a&&r++}}},e.prototype.moveTargetColumn=function(e,t){t>-1&&this.moveColumns(t,e,!0)},e.prototype.reorderSingleColumnByTarget=function(e,t){this.moveTargetColumn(this.parent.getColumnByField(e),t)},e.prototype.reorderMultipleColumnByTarget=function(e,t){for(var i=0;i<e.length;i++)this.reorderSingleColumnByTarget(e[i],t)},e.prototype.reorderColumns=function(e,t){"string"==typeof e?(this.reorderSingleColumn(e,t),this.fromCol=e):(this.reorderMultipleColumns(e,t),this.fromCol=e[0])},e.prototype.reorderColumnByIndex=function(e,t){this.moveTargetColumn(this.parent.getColumnByIndex(e),t)},e.prototype.reorderColumnByTargetIndex=function(e,t){"string"==typeof e?this.reorderSingleColumnByTarget(e,t):this.reorderMultipleColumnByTarget(e,t)},e.prototype.enableAfterRender=function(e){e.module===this.getModuleName()&&e.enable&&this.createReorderElement()},e.prototype.createReorderElement=function(e){e&&e.args.isXaxis&&this.setDisplay("none");var t=this.parent.element.querySelector("."+Fi);this.upArrow=t.appendChild(this.parent.createElement("div",{className:"e-icons e-icon-reorderuparrow e-reorderuparrow",attrs:{style:"display:none"}})),this.downArrow=t.appendChild(this.parent.createElement("div",{className:"e-icons e-icon-reorderdownarrow e-reorderdownarrow",attrs:{style:"display:none"}}))},e.prototype.onActionComplete=function(e){this.parent.trigger(St,t.extend(e,{type:St}));var i=this.fromCol&&this.parent.getColumnHeaderByField(this.fromCol);i&&this.parent.focusModule.onClick({target:i},!0)},e.prototype.destroy=function(){var e=this.parent.element;!this.parent.isDestroyed&&e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(t.remove(this.upArrow),t.remove(this.downArrow),this.parent.off(Yt,this.headerDrop),this.parent.off(Bt,this.enableAfterRender),this.parent.off(Ut,this.onActionComplete),this.parent.off(Ft,this.drag),this.parent.off(xt,this.dragStart),this.parent.off(Jt,this.dragStop),this.parent.off(Ht,this.createReorderElement),this.parent.off(Vt,this.keyPressHandler))},e.prototype.keyPressHandler=function(e){var t=this.parent;switch(e.action){case"ctrlLeftArrow":case"ctrlRightArrow":var i=t.focusModule.currentInfo.element;if(i&&i.classList.contains("e-headercell")){var r=t.getColumnByUid(i.firstElementChild.getAttribute("e-mappinguid")),n=t.getVisibleColumns(),o=n.indexOf(r),s="ctrlLeftArrow"===e.action?n[o-1]:n[o+1];s&&s.field&&r.field&&this.reorderColumns(r.field,s.field)}}},e.prototype.drag=function(e){var i=this.parent,r=e.target;if(e.column.allowReordering&&!e.column.lockColumn){var n=t.closest(r,".e-headercell:not(.e-stackedHeaderCell)"),o=i.element.querySelector(".e-cloneproperties"),s=i.isFrozenGrid()?i.getMovableVirtualContent():i.getContent().firstElementChild,l=this.x>N(e.event).x+s.scrollLeft;t.removeClass([].slice.call(i.getHeaderTable().getElementsByClassName("e-reorderindicate")),["e-reorderindicate"]),this.setDisplay("none"),this.stopTimer(),t.classList(o,["e-defaultcur"],["e-notallowedcur"]),this.updateScrollPostion(e.event),n&&!n.isEqualNode(this.element)&&(r=n,this.chkDropPosition(this.element,r)&&this.chkDropAllCols(this.element,r)?(this.updateArrowPosition(r,l),t.classList(r,["e-allowDrop","e-reorderindicate"],[])):i.allowGrouping&&O(e.target,"e-groupdroparea")||t.classList(o,["e-notallowedcur"],["e-defaultcur"])),i.trigger(Ft,{target:r,draggableType:"headercell",column:e.column})}},e.prototype.updateScrollPostion=function(e){var t=this,i=N(e).x,r=this.parent.element.getBoundingClientRect(),n=r.right;if(this.parent.isFrozenGrid())this.updateFrozenScrollPosition(i,r);else{var o=r.left,s=this.parent.getContent().firstElementChild;i>o&&i<o+35?this.timer=window.setInterval(function(){t.setScrollLeft(s,!0)},50):i<n&&i>n-35&&(this.timer=window.setInterval(function(){t.setScrollLeft(s,!1)},50))}},e.prototype.updateFrozenScrollPosition=function(e,t){var i=this,r=this.parent.getContent().querySelector("."+Ei),n=this.parent.element.querySelector("."+Ii).getBoundingClientRect(),o=this.parent.getFrozenLeftCount(),s=this.parent.getFrozenRightColumnsCount()?n.right:t.right,l=o?n.left:t.left;e>l&&e<l+35?this.timer=window.setInterval(function(){i.setScrollLeft(r,!0)},50):e<s&&e>s-35&&(this.timer=window.setInterval(function(){i.setScrollLeft(r,!1)},50))},e.prototype.setScrollLeft=function(e,t){var i=e.scrollLeft;e.scrollLeft=e.scrollLeft+(t?-5:5),i!==e.scrollLeft&&this.setDisplay("none")},e.prototype.stopTimer=function(){window.clearInterval(this.timer)},e.prototype.updateArrowPosition=function(e,t){var i=e.getBoundingClientRect(),r=this.parent.element.getBoundingClientRect();if(!(t&&i.left<r.left||!t&&i.right>r.right)){if(this.parent.isFrozenGrid()&&e.classList.contains("e-headercell")){var n=this.parent.getFrozenLeftCount(),o=this.parent.getFrozenRightColumnsCount(),s=this.element.querySelector(".e-headercelldiv"),l=s?this.parent.getColumnByUid(s.getAttribute("data-uid")):null,a=this.parent.getColumnByUid(e.firstElementChild.getAttribute("e-mappinguid")),h=Math.round(this.parent.getFrozenVirtualHeader().getBoundingClientRect().right),d=Math.round(this.parent.getMovableVirtualHeader().getBoundingClientRect().right);if(a){if(n&&!o&&this.parent.getNormalizedColumnIndex(a.uid)>=n&&(t&&Math.round(i.left)<h||!t&&d<i.right))return;if(!n&&o&&l&&l.getFreezeTableName()!==a.getFreezeTableName()&&!t&&Math.round(i.right)<h)return}}this.upArrow.style.top=i.top+i.height-r.top+"px",this.downArrow.style.top=i.top-r.top-7+"px",this.upArrow.style.left=this.downArrow.style.left=(t?i.left:i.right)-r.left-4+"px",this.setDisplay("")}},e.prototype.dragStart=function(e){var t=this.parent,i=e.target;if(this.element=i.classList.contains("e-headercell")?i:O(i,"e-headercell"),e.column.allowReordering&&!e.column.lockColumn){var r=t.isFrozenGrid()?t.getMovableVirtualContent():t.getContent().firstElementChild;this.x=N(e.event).x+r.scrollLeft,t.trigger(xt,{target:i,draggableType:"headercell",column:e.column})}},e.prototype.dragStop=function(e){var i=this.parent;this.setDisplay("none"),this.stopTimer(),e.cancel||i.trigger(Et,{target:e.target,draggableType:"headercell",column:e.column}),t.removeClass([].slice.call(i.getHeaderTable().getElementsByClassName("e-reorderindicate")),["e-reorderindicate"])},e.prototype.setDisplay=function(e){this.upArrow.style.display=e,this.downArrow.style.display=e},e.prototype.getModuleName=function(){return"reorder"},e}(),Xn=function(){function e(e){var i=this;this.selectedRows=[],this.isOverflowBorder=!0,this.selectedRowColls=[],this.isRefresh=!0,this.isReplaceDragEle=!0,this.istargetGrid=!1,this.helper=function(e){var r=i.parent,n=i.draggable.currentStateTarget,o=i.parent.createElement("div",{className:"e-cloneproperties e-draganddrop e-grid e-dragclone",styles:'height:"auto", z-index:2, width:'+r.element.offsetWidth}),s=i.parent.createElement("table",{styles:"width:"+r.element.offsetWidth}),l=i.parent.createElement(Ui);if(document.getElementsByClassName("e-griddragarea").length||r.rowDropSettings.targetID&&(!n.classList.contains("e-selectionbackground")&&"Single"!==r.selectionSettings.type||!O(n,"e-rowcell"))||!r.rowDropSettings.targetID&&!O(n,"e-rowdragdrop"))return!1;r.rowDropSettings.targetID&&"Row"===r.selectionSettings.mode&&"Single"===r.selectionSettings.type&&r.selectRow(parseInt(i.draggable.currentStateTarget.parentElement.getAttribute(Hi),10)),i.startedRow=t.closest(n,"tr").cloneNode(!0);var a=i.parent.isFrozenGrid();if(a){var h=parseInt(t.closest(n,"tr").getAttribute(Hi),10);i.startedRow.innerHTML="",i.startedRow.innerHTML+=r.getRowByIndex(h).innerHTML,i.startedRow.innerHTML+=r.getMovableRowByIndex(h).innerHTML,r.getFrozenMode()===Pi&&(i.startedRow.innerHTML+=r.getFrozenRightRowByIndex(h).innerHTML)}i.processArgs(n);var d={selectedRow:i.rows,dragelement:n,cloneElement:o,cancel:!1,data:i.rowData},c=r.getSelectedRows();r.trigger(It,d);if(d.cancel)return!1;P(i.startedRow,".e-indentcell"),P(i.startedRow,".e-detailrowcollapse"),P(i.startedRow,".e-detailrowexpand"),i.removeCell(i.startedRow,ki);var p=new RegExp("e-active","g");if(i.startedRow.innerHTML=i.startedRow.innerHTML.replace(p,""),l.appendChild(i.startedRow),r.getSelectedRowIndexes().length>1&&i.startedRow.hasAttribute("aria-selected")){var u=r.getFrozenMode()===Pi?3:2,g=i.parent.createElement("span",{className:"e-dropitemscount",innerHTML:a?""+c.length/u:""+c.length});o.appendChild(g)}var f=t.closest(n,"tr").querySelector(".e-icon-rowdragicon");return f&&f.classList.add("e-dragstartrow"),s.appendChild(l),o.appendChild(s),r.element.appendChild(o),o},this.dragStart=function(e){var t=i.parent;if(!document.getElementsByClassName("e-griddragarea").length){var r=e.target,n=i.parent.element.querySelector(".e-dropitemscount");i.parent.getSelectedRecords().length>1&&n&&(n.style.left=i.parent.element.querySelector(".e-cloneproperties table").offsetWidth-5+"px"),i.processArgs(r),t.trigger(Tt,{rows:i.rows,target:e.target,draggableType:"rows",fromIndex:parseInt(i.rows[0].getAttribute(Hi),10),data:Object.keys(i.rowData[0]).length>0?i.rowData:i.currentViewData()}),i.dragStartData=i.rowData;var o=document.getElementById(t.rowDropSettings.targetID);t.rowDropSettings.targetID&&o&&o.ej2_instances&&"grid"===o.ej2_instances[0].getModuleName()&&o.ej2_instances[0].getContent().classList.add("e-allowRowDrop")}},this.drag=function(e){var r=i.parent;if(i.isDropGrid=i.parent,i.istargetGrid=!1,i.parent.rowDropSettings.targetID){var n=document.getElementById(r.rowDropSettings.targetID);i.isDropGrid=n.ej2_instances[0],O(e.target,"e-grid")&&(i.istargetGrid=i.parent.rowDropSettings.targetID===O(e.target,"e-grid").id)}var o=i.parent.element.querySelector(".e-cloneproperties"),s=i.getElementFromPosition(o,e.event);t.classList(o,["e-defaultcur"],["e-notallowedcur","e-movecur"]),i.isOverflowBorder=!0,i.hoverState=r.enableHover;var l=O(s,"e-grid")?t.closest(e.target,"tr"):null;if(r.enableHover=!1,e.target){i.processArgs(s);var a={rows:i.rows,target:s,draggableType:"rows",data:i.rowData,originalEvent:e,cancel:!1};if(r.trigger(zt,a),i.stopTimer(),!a.cancel){if(r.element.classList.add("e-rowdrag"),i.dragTarget=l&&O(s,"e-grid").id===o.parentElement.id?parseInt(l.getAttribute(Hi),10):parseInt(i.startedRow.getAttribute(Hi),10),r.rowDropSettings.targetID)O(s,"e-grid")&&O(o.parentElement,"e-grid").id!==O(s,"e-grid").id?t.classList(o,["e-defaultcur"],["e-notallowedcur"]):t.classList(o,["e-notallowedcur"],["e-defaultcur"]);else{var h=O(s,"e-grid");h&&h.id===o.parentElement.id?t.classList(o,["e-movecur"],["e-defaultcur"]):t.classList(o,["e-notallowedcur"],["e-movecur"])}if(O(i.isDropGrid.element,"e-grid")){if((!i.isDropGrid.groupSettings.columns.length||e.target.classList.contains("e-selectionbackground"))&&!i.isDropGrid.element.querySelector(".e-emptyrow"))if(O(s,"e-grid")&&O(s,"e-grid").id===i.isDropGrid.element.id&&i.updateScrollPostion(e.event),(i.isOverflowBorder||i.parent.frozenRows>i.dragTarget)&&(parseInt(i.startedRow.getAttribute(Hi),10)!==i.dragTarget||i.istargetGrid)||i.istargetGrid&&l&&i.isDropGrid.getRowByIndex(i.isDropGrid.getCurrentViewRecords().length-1).getAttribute("data-uid")===l.getAttribute("data-uid"))i.moveDragRows(e,i.startedRow,l);else{var d=void 0;if(i.parent.enableVirtualization)d=l&&parseInt(l.getAttribute(Hi),10)===i.parent.renderModule.data.dataManager.dataSource.json.length-1;else{var c=i.parent.getRowByIndex(i.parent.getCurrentViewRecords().length-1).getAttribute("data-uid");d=l&&c===l.getAttribute("data-uid")&&c!==i.startedRow.getAttribute("data-uid")}if(d&&!i.parent.rowDropSettings.targetID){var p=i.parent.createElement("div",{className:"e-lastrow-dragborder"}),u=i.parent.getContent();p.style.width=i.parent.element.offsetWidth-i.getScrollWidth()+"px",i.parent.enableVirtualization&&(p.style.zIndex="1"),u.getElementsByClassName("e-lastrow-dragborder").length||(u.classList.add("e-grid-relative"),u.appendChild(p),p.style.bottom=i.getScrollWidth()+"px")}i.removeBorder(l)}if(s&&s.classList.contains(Di)&&!i.isDropGrid.element.querySelector(".e-emptyrow")&&i.istargetGrid){i.removeBorder(l);var g=i.isDropGrid.getCurrentViewRecords().length-1,f=".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse",m=[];m=[].slice.call(i.isDropGrid.getRowByIndex(g).querySelectorAll(f)),i.isDropGrid.isFrozenGrid()&&(m=i.borderRowElement(g,f)),m.length>0&&Z(m,!0,"e-dragborder")}}}}},this.dragStop=function(e){X(i.parent)?i.parent.notify(ii,{instance:i,handler:i.processDragStop,arg1:e}):i.processDragStop(e)},this.processDragStop=function(e){var r=i.parent;if(!i.parent.isDestroyed){var n=i.getElementFromPosition(e.helper,e.event),o=n&&!n.classList.contains("e-dlg-overlay")?n:e.target;r.element.classList.remove("e-rowdrag");var s=document.getElementById(r.rowDropSettings.targetID);if(r.rowDropSettings.targetID&&s&&s.ej2_instances&&"grid"===s.ej2_instances[0].getModuleName()&&s.ej2_instances[0].getContent().classList.remove("e-allowRowDrop"),O(i.isDropGrid.element,"e-grid")){i.stopTimer(),i.isDropGrid.enableHover=i.hoverState,i.isDropGrid.getContent().classList.remove("e-grid-relative"),i.removeBorder(n);var l=i.isDropGrid.element.querySelector(".e-dragstartrow");l&&l.classList.remove("e-dragstartrow")}i.processArgs(o);var a={target:o,draggableType:"rows",cancel:!1,fromIndex:parseInt(i.rows[0].getAttribute(Hi),10),dropIndex:i.dragTarget,rows:i.rows,data:Object.keys(i.dragStartData[0]).length>0?i.dragStartData:i.currentViewData()};r.trigger(Dt,a,function(){if(!(O(o,Oi)||O(o,"e-emptyrow")||O(o,Ri))||a.cancel)return i.dragTarget=null,void t.remove(e.helper);i.isRefresh=!1;var n=i.parent.getSelectedRowIndexes();r.isRowDragable()&&(!i.parent.rowDropSettings.targetID&&i.startedRow.querySelector("td.e-selectionbackground")&&n.length>1&&n.length!==i.parent.getCurrentViewRecords().length?i.reorderRows(n,a.dropIndex):i.reorderRows([parseInt(i.startedRow.getAttribute(Hi),10)],i.dragTarget),i.dragTarget=null,r.rowDropSettings.targetID||(t.remove(e.helper),r.enableVirtualization?r.refresh():i.rowOrder(a))),i.isRefresh=!0})}},this.removeCell=function(e,t){return[].slice.call(e.querySelectorAll("td")).filter(function(i){i.classList.contains(t)&&e.deleteCell(i.cellIndex)})},this.parent=e,this.parent.isDestroyed||(this.parent.on(Ot,this.initializeDrag,this),this.parent.on(Et,this.columnDrop,this),this.onDataBoundFn=this.onDataBound.bind(this),this.parent.addEventListener(Rt,this.onDataBoundFn),this.parent.on(Bt,this.enableAfterRender,this))}return e.prototype.refreshRow=function(e,t,i,r,n,o,s){var l,a,h,d,c=this.parent,p=c.isFrozenGrid(),u=c.getFrozenMode()===Pi,g=c.getContentTable().querySelector(Ui),f=c.getHeaderTable().querySelector(Ui);p&&(l=c.getMovableHeaderTbody(),a=c.getMovableContentTbody(),u&&(h=c.getFrozenRightHeaderTbody(),d=c.getFrozenRightContentTbody()));for(var m=c.getFrozenMode()===Pi?3:2,y=0,v=e.rows.length;y<v;y++)p?y%m==0?t.insertBefore(e.rows[y],n):y%m==1?i.insertBefore(e.rows[y],o):r.insertBefore(e.rows[y],s):t.insertBefore(e.rows[y],n);var C,w,b=[].slice.call(t.getElementsByClassName(Oi));if(p&&(C=[].slice.call(i.getElementsByClassName(Oi)),u&&(w=[].slice.call(r.getElementsByClassName(Oi)))),this.refreshData(b,C,w),this.parent.frozenRows)for(var S=this,y=0,v=b.length;y<v;y++)!function(e,t){e<S.parent.frozenRows?Ge(f,l,h,b,C,w,function(t,i){t.appendChild(i[e])}):Ge(g,a,d,b,C,w,function(t,i){t.appendChild(i[e])})}(y)},e.prototype.updateFrozenRowreOrder=function(e){var t,i,r,n,o=this.parent,s=this.parent.isFrozenGrid(),l=o.getFrozenMode()===Pi,a=o.getContentTable().querySelector(Ui),h=o.getHeaderTable().querySelector(Ui);s&&(t=o.getMovableHeaderTbody(),i=o.getMovableContentTbody(),l&&(r=o.getFrozenRightHeaderTbody(),n=o.getFrozenRightContentTbody()));var d,c,p=[].slice.call(h.getElementsByClassName(Oi)).concat([].slice.call(a.getElementsByClassName(Oi)));s&&(d=[].slice.call(t.getElementsByClassName(Oi)).concat([].slice.call(i.getElementsByClassName(Oi))),l&&(c=[].slice.call(r.getElementsByClassName(Oi)).concat([].slice.call(n.getElementsByClassName(Oi)))));var u=o.createElement(Ui),g=o.createElement(Ui),f=o.createElement(Ui);this.parent.clearSelection();for(var m=this.refreshRowTarget(e),y=0,v=p.length;y<v;y++)u.appendChild(p[y]),s&&(g.appendChild(d[y]),l&&f.appendChild(c[y]));this.refreshRow(e,u,g,f,m.target,m.mTarget,m.frTarget)},e.prototype.refreshRowTarget=function(e){var t,i,r=this.parent,n=parseInt(e.target.parentElement.getAttribute(Hi),10);(e.fromIndex<e.dropIndex||e.fromIndex===e.dropIndex)&&(n+=1);var o=r.getRowByIndex(n);return r.isFrozenGrid()&&(t=r.getMovableRowByIndex(n),r.getFrozenMode()===Pi&&(i=r.getFrozenRightRowByIndex(n))),{target:o,mTarget:t,frTarget:i}},e.prototype.updateFrozenColumnreOrder=function(e){var t,i,r=this.parent,n=this.parent.isFrozenGrid(),o=r.getContentTable().querySelector(Ui);n&&(t=r.getMovableContentTbody(),r.getFrozenMode()===Pi&&(i=r.getFrozenRightContentTbody())),this.parent.clearSelection();var s=this.refreshRowTarget(e);this.refreshRow(e,o,t,i,s.target,s.mTarget,s.frTarget)},e.prototype.refreshData=function(e,t,i){for(var r={},n={},o={},s={},l=this.parent.getRowsObject(),a=this.parent.getMovableRowsObject(),h=this.parent.getFrozenRightRowsObject(),d=this.parent.getCurrentViewRecords(),c=0,p=e.length;c<p;c++){var u=parseInt(e[c].getAttribute(Hi),10);r[c]=l[u],s[c]=d[u],this.parent.isFrozenGrid()&&(n[c]=a[u],i&&(o[c]=h[u]))}var g,f,m=this.parent.getRows();this.parent.isFrozenGrid()&&(g=this.parent.getMovableRows(),i&&(f=this.parent.getFrozenRightRows()));for(var c=0,p=e.length;c<p;c++)m[c]=e[c],l[c]=r[c],d[c]=s[c],this.parent.isFrozenGrid()&&(g[c]=t[c],a[c]=n[c],i&&(f[c]=i[c],h[c]=o[c]));Me(this.parent,l,e),this.parent.isFrozenGrid()&&(Me(this.parent,a,t),i&&Me(this.parent,h,i))},e.prototype.rowOrder=function(e){if(e.dropIndex!==e.fromIndex&&!isNaN(e.dropIndex)){if(this.parent.childGrid){this.parent.detailCollapseAll();var t=[].slice.call(this.parent.getContentTable().querySelector(Ui).children),i=this.parent.getRowsObject();t.filter(function(e){e.classList.contains("e-detailrow")&&e.remove()});for(var r=0,n=i.length;r<n&&i[r];r++)i[r].isDetailRow&&(this.parent.getRowsObject().splice(r,1),r--)}if(e.target.classList.contains("e-rowcelldrag")&&(e.target=e.target.parentElement),this.parent.frozenRows?this.updateFrozenRowreOrder(e):this.updateFrozenColumnreOrder(e),this.selectedRowColls.length>0){this.parent.selectRows(this.selectedRowColls);var o=[];if(this.parent.filterSettings.columns.length||this.parent.sortSettings.columns.length){for(var r=0,n=e.rows.length;r<n;r++)o.push(parseInt(e.rows[r].getAttribute(Hi),10));this.selectedRowColls=o}this.selectedRowColls=[]}}},e.prototype.currentViewData=function(){for(var e=this.parent.getSelectedRowIndexes(),t=[],i=parseInt(this.startedRow.getAttribute(Hi),10),r=0,n=e.length;r<n;r++){t[r]=this.parent.currentViewData[e[r]]}return this.parent.rowDropSettings.targetID||0!==e.length||(t[0]=this.parent.currentViewData[i]),t},e.prototype.saveChange=function(e,i){var r=this;this.parent.getDataModule().saveChanges(e,this.parent.getPrimaryKeyFieldNames()[0],{},i).then(function(){r.parent.notify(Lt,{type:bt,requestType:"rowdraganddrop"})}).catch(function(e){t.isNullOrUndefined(e.error)||t.isNullOrUndefined(e.error.message)||(e.error=e.error.message),r.parent.trigger("actionFailure",e)})},e.prototype.reorderRows=function(e,t){for(var i=this.parent.getSelectedRowIndexes(),r=[],n=[],o=this.parent.renderModule.data.dataManager.dataSource.json,s=this.parent.allowPaging?this.parent.pageSettings.currentPage*this.parent.pageSettings.pageSize-this.parent.pageSettings.pageSize:0,l=t+s,a=e[0]+s,h=0,d=e.length;h<d;h++)n[h]=o[e[h]+s];for(var h=0,d=i.length;h<d;h++)r[h]=o[i[h]+s];for(var h=0,d=n.length;h<d;h++){if(0!==h){for(var c=0,p=o.length;c<p;c++)if(JSON.stringify(this.parent.renderModule.data.dataManager.dataSource.json[c])===JSON.stringify(n[h])){a=c;break}for(var c=0,p=o.length;c<p;c++)if(JSON.stringify(this.parent.renderModule.data.dataManager.dataSource.json[c])===JSON.stringify(n[h-1])){a>c&&(l=c+1);break}}this.reorderRow(a-s,l-s)}this.isRefresh&&this.parent.notify(Lt,{type:bt,requestType:"rowdraganddrop"});for(var h=0,d=r.length;h<d;h++)for(var c=0,p=o.length;c<p;c++)if(JSON.stringify(this.parent.renderModule.data.dataManager.dataSource.json[c])===JSON.stringify(r[h])){i[h]=c-s;break}this.selectedRowColls=i},e.prototype.stopTimer=function(){window.clearInterval(this.timer)},e.prototype.initializeDrag=function(){var e=this.parent;this.draggable=new t.Draggable(e.element,{dragTarget:".e-rowcelldrag, .e-rowdragdrop, .e-rowcell",distance:5,helper:this.helper,dragStart:this.dragStart,drag:this.drag,dragStop:this.dragStop,isReplaceDragEle:this.isReplaceDragEle})},e.prototype.updateScrollPostion=function(e){var t=this,i=N(e).y,r=this.isDropGrid.getContent().getBoundingClientRect(),n=this.isDropGrid.getRowHeight()-15,o=this.isDropGrid.getContent().firstElementChild,s=this.parent.enableVirtualization?20:0;if(r.top>=i){var l=-this.isDropGrid.getRowHeight();this.isOverflowBorder=!1,this.timer=window.setInterval(function(){t.setScrollDown(o,l)},200)}else if(r.top+this.isDropGrid.getContent().clientHeight-n-33-s<=i){var a=this.isDropGrid.getRowHeight();this.isOverflowBorder=!1,this.timer=window.setInterval(function(){t.setScrollDown(o,a)},200)}},e.prototype.setScrollDown=function(e,t){e.scrollTop=e.scrollTop+t},e.prototype.moveDragRows=function(e,i,r){var n=this.parent.element.querySelector(".e-cloneproperties"),o=t.closest(e.target,"tr");if(O(o,"e-grid")&&(O(n.parentElement,"e-grid").id===O(o,"e-grid").id||this.istargetGrid)){var s=o||this.startedRow;this.setBorder(s,e.event,i,r)}},e.prototype.setBorder=function(e,i,r,n){var o=this.parent.element;this.istargetGrid&&(o=this.isDropGrid.element);var s=this.parent.element.querySelector(".e-cloneproperties");if(this.removeFirstRowBorder(e),this.removeLastRowBorder(e),O(e,"e-grid")&&!this.parent.rowDropSettings.targetID&&e.classList.contains(Oi)&&O(s.parentElement,"e-grid").id===O(e,"e-grid").id||this.istargetGrid){t.removeClass(o.querySelectorAll(".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse"),["e-dragborder"]);var l=[],a=parseInt(n.getAttribute(Hi),10);if(n&&0===a){var h=this.parent.createElement("div",{className:"e-firstrow-dragborder"}),d=this.isDropGrid.getHeaderContent();d.classList.add("e-grid-relative"),h.style.width=o.offsetWidth-this.getScrollWidth()+"px",d.getElementsByClassName("e-firstrow-dragborder").length||d.appendChild(h)}else this.parent.rowDropSettings.targetID&&n?(e=this.isDropGrid.getRowByIndex(a-1),l=[].slice.call(e.querySelectorAll(".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse"))):n&&parseInt(r.getAttribute(Hi),10)>a?(e=this.parent.getRowByIndex(a-1),l=[].slice.call(e.querySelectorAll(".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse"))):l=[].slice.call(e.querySelectorAll(".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse"));var c=this.parent.isFrozenGrid();if(n&&0!==a&&c){var p=parseInt(e.getAttribute(Hi),10);l=this.borderRowElement(p,".e-rowcell,.e-rowdragdrop,.e-detailrowcollapse")}l.length>0&&Z(l,!0,"e-dragborder")}},e.prototype.borderRowElement=function(e,t){var i=[];return i=[].slice.call(this.isDropGrid.getRowByIndex(e).querySelectorAll(t)).concat([].slice.call(this.isDropGrid.getMovableRowByIndex(e).querySelectorAll(t))),this.isDropGrid.getFrozenMode()===Pi&&(i=i.concat([].slice.call(this.isDropGrid.getFrozenRightRowByIndex(e).querySelectorAll(t)))),i},e.prototype.getScrollWidth=function(){var e=this.parent.getContent().firstElementChild;return e.scrollWidth>e.offsetWidth?Xr.getScrollBarWidth():0},e.prototype.removeFirstRowBorder=function(e){this.isDropGrid.element.getElementsByClassName("e-firstrow-dragborder").length>0&&e&&0!==e.rowIndex&&t.remove(this.isDropGrid.element.getElementsByClassName("e-firstrow-dragborder")[0])},e.prototype.removeLastRowBorder=function(e){var i;i=this.parent.enableVirtualization?e&&parseInt(e.getAttribute(Hi),10)!==this.parent.renderModule.data.dataManager.dataSource.json.length-1:e&&this.parent.getRowByIndex(this.parent.getCurrentViewRecords().length-1).getAttribute("data-uid")!==e.getAttribute("data-uid"),this.parent.element.getElementsByClassName("e-lastrow-dragborder").length>0&&e&&i&&t.remove(this.parent.element.getElementsByClassName("e-lastrow-dragborder")[0])},e.prototype.removeBorder=function(e){if(this.removeFirstRowBorder(e),this.parent.rowDropSettings.targetID||this.removeLastRowBorder(e),e=(this.isDropGrid.isFrozenGrid()?this.isDropGrid.getMovableRows():this.isDropGrid.getRows()).filter(function(e){return e.querySelector("td.e-dragborder")})[0]){var t=[].slice.call(e.getElementsByClassName("e-dragborder"));if(this.parent.isFrozenGrid()){var i=parseInt(e.getAttribute(Hi),10);t=this.borderRowElement(i,".e-dragborder")}Z(t,!1,"e-dragborder")}},e.prototype.getElementFromPosition=function(e,t){var i=N(t);e.style.display="none";var r=document.elementFromPoint(i.x,i.y);return e.style.display="",r},e.prototype.onDataBound=function(){this.selectedRowColls.length>0&&this.parent.enableVirtualization&&(this.parent.selectRows(this.selectedRowColls),this.selectedRowColls=[])},e.prototype.getTargetIdx=function(e){return e?parseInt(e.getAttribute(Hi),10):0},e.prototype.singleRowDrop=function(e){var i=t.closest(e.target,"tr"),r=e.droppedElement.parentElement.ej2_instances[0],n=i?i.rowIndex:r.currentViewData.length-1;this.reorderRow(this.startedRowIndex,n)},e.prototype.columnDrop=function(e){var i=this.parent;if("grouping"!==e.droppedElement.getAttribute("action")&&(O(e.target,Oi)||O(e.target,"e-emptyrow")||O(e.target,Ri))){var r=t.closest(e.target,"tr"),n=void 0,o=void 0;if("true"!==e.droppedElement.querySelector("tr").getAttribute("single-dragrow")&&e.droppedElement.parentElement.id===i.element.id||"true"===e.droppedElement.querySelector("tr").getAttribute("single-dragrow")&&e.droppedElement.parentElement.id!==i.element.id)return;if(e.droppedElement.parentElement.id!==i.element.id)n=e.droppedElement.parentElement.ej2_instances[0];else if(this.isSingleRowDragDrop||"true"===e.droppedElement.querySelector("tr").getAttribute("single-dragrow"))return void this.singleRowDrop(e);if(n.element.id!==i.element.id&&n.rowDropSettings.targetID!==i.element.id)return;var s=n.getSelectedRecords(),l=o=this.getTargetIdx(r);isNaN(l)&&(l=o=0),i.allowPaging&&(l=l+i.pageSettings.currentPage*i.pageSettings.pageSize-i.pageSettings.pageSize),i.notify(Qt,{toIndex:l,records:s}),i.notify(Lt,{type:bt,requestType:"rowdraganddrop"});var a=n.getSelectedRowIndexes(),h=n.allowPaging?n.pageSettings.currentPage*n.pageSettings.pageSize-n.pageSettings.pageSize:0;this.selectedRows=[];for(var d=0,c=s.length;d<c;d++)this.selectedRows.push(h+a[d]);n.notify(Xt,{indexes:this.selectedRows,records:s}),n.notify(Lt,{type:bt,requestType:"rowdraganddrop"})}},e.prototype.reorderRow=function(e,t){var i=this.parent;if(!i.sortSettings.columns.length&&!i.groupSettings.columns.length&&!i.filterSettings.columns.length){var r=i.allowPaging?i.pageSettings.currentPage*i.pageSettings.pageSize-i.pageSettings.pageSize:0;t+=r,this.selectedRows=i.getSelectedRowIndexes(),i.notify(ai,{fromIndex:e+r,toIndex:t})}},e.prototype.enableAfterRender=function(e){e.module===this.getModuleName()&&e.enable&&this.initializeDrag()},e.prototype.destroy=function(){var e=this.parent.element;!this.parent.isDestroyed&&e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.draggable.destroy(),this.parent.off(Ot,this.initializeDrag),this.parent.off(Et,this.columnDrop),this.parent.removeEventListener(Rt,this.onDataBoundFn),this.parent.off(Bt,this.enableAfterRender))},e.prototype.getModuleName=function(){return"rowDragAndDrop"},e.prototype.processArgs=function(e){var t=this.parent,i=parseInt(this.startedRow.getAttribute(Hi),10);t.getSelectedRecords().length>0&&!1===this.startedRow.cells[0].classList.contains("e-selectionbackground")||0===t.getSelectedRecords().length?(this.parent.enableVirtualization?this.rows=[this.startedRow]:(this.rows=[this.parent.getRowByIndex(i)],t.isFrozenGrid()&&(this.rows=[t.getRowByIndex(i),t.getMovableRowByIndex(i)],t.getFrozenMode()===Pi&&(this.rows=[t.getRowByIndex(i),t.getMovableRowByIndex(i),t.getFrozenRightRowByIndex(i)]))),this.rowData=[this.parent.getRowInfo(this.startedRow.querySelector("."+bi)).rowData]):(this.rows=t.getSelectedRows(),this.rowData=t.getSelectedRecords())},e}(),Jn=function(){function e(e,i,r,n){var o=this;this.sortRequired=!0,this.isAppliedGroup=!1,this.isAppliedUnGroup=!1,this.reorderingColumns=[],this.visualElement=t.createElement("div",{className:"e-cloneproperties e-dragclone e-gdclone",styles:"line-height:23px",attrs:{action:"grouping"}}),this.helper=function(e){var t=o.parent,i=e.sender.target,r=i.classList.contains("e-groupheadercell")?i:O(i,"e-groupheadercell");return!(!r||!i.classList.contains("e-drag")&&o.groupSettings.allowReordering)&&(o.column=t.getColumnByField(r.firstElementChild.getAttribute("ej-mappingname")),o.visualElement.textContent=r.textContent,o.visualElement.style.width=r.offsetWidth+2+"px",o.visualElement.style.height=r.offsetHeight+2+"px",o.visualElement.setAttribute("e-mappinguid",o.column.uid),t.element.appendChild(o.visualElement),o.visualElement)},this.dragStart=function(e){o.parent.element.classList.add("e-ungroupdrag")},this.drag=function(e){o.groupSettings.allowReordering&&o.animateDropper(e);var i=e.target,r=o.parent.element.querySelector(".e-cloneproperties");o.parent.trigger(Ft,{target:i,draggableType:"headercell",column:o.column}),o.groupSettings.allowReordering||(t.classList(r,["e-defaultcur"],["e-notallowedcur"]),O(i,Ri)||O(i,"e-headercell")||t.classList(r,["e-notallowedcur"],["e-defaultcur"]))},this.dragStop=function(e){o.parent.element.classList.remove("e-ungroupdrag");var i=!(O(e.target,Ri)||O(e.target,"e-gridheader"));if(o.groupSettings.allowReordering&&i){if(t.remove(e.helper),O(e.target,"e-groupdroparea"))o.rearrangeGroup();else if(!O(e.target,"e-grid")){var r=o.parent.getColumnByUid(e.helper.getAttribute("e-mappinguid")).field;-1!==o.groupSettings.columns.indexOf(r)&&o.ungroupColumn(r)}}else if(i)return void t.remove(e.helper)},this.animateDropper=function(e){var t=o.parent.element.querySelector(".e-cloneproperties").getAttribute("e-mappinguid"),i=o.parent.getColumnByUid(t).field,r=O(e.target,"e-groupdroparea"),n=O(e.target,"e-group-animator"),s=[].slice.call(o.element.getElementsByClassName("e-groupheadercell")).map(function(e){return e.querySelector("div").getAttribute("ej-mappingname")}),l=JSON.parse(JSON.stringify(s));if(n||r){if(n){var a=n.querySelector("div[ej-mappingname]").getAttribute("ej-mappingname"),h=+n.getAttribute("index");if(a!==i){var d=l.indexOf(i);-1!==d&&l.splice(d,1);var c=-1!==h&&d===h;l.splice(h+(c?1:0),0,i)}}else r&&-1===l.indexOf(i)&&l.push(i);o.element.innerHTML="",l.length&&!o.element.classList.contains("e-grouped")&&o.element.classList.add("e-grouped"),o.reorderingColumns=l;for(var p=0;p<l.length;p++)o.addColToGroupDrop(l[p])}else o.addLabel(),o.removeColFromGroupDrop(i)},this.drop=function(e){var i=o.parent,r=i.getColumnByUid(e.droppedElement.getAttribute("e-mappinguid"));if(o.element.classList.remove("e-hover"),t.remove(e.droppedElement),o.aria.setDropTarget(o.parent.element.querySelector(".e-groupdroparea"),!1),o.aria.setGrabbed(o.parent.getHeaderTable().querySelector("[aria-grabbed=true]"),!1),t.isNullOrUndefined(r)||!1===r.allowGrouping||O(i.getColumnHeaderByUid(r.uid),"e-grid").getAttribute("id")!==i.element.getAttribute("id"))return void o.parent.log("action_disabled_column",{moduleName:o.getModuleName(),columnName:r.headerText});o.groupColumn(r.field)},this.contentRefresh=!0,this.aria=new er,this.parent=e,this.groupSettings=i,this.serviceLocator=n,this.sortedColumns=r,this.focus=n.getService("focus"),this.addEventListener(),this.groupGenerator=new Ji(this.parent)}return e.prototype.addLabel=function(){if(!this.element.getElementsByClassName("e-group-animator").length){var e=this.l10n.getConstant("GroupDropArea");this.element.innerHTML=e,this.element.classList.remove("e-grouped")}},e.prototype.rearrangeGroup=function(){this.sortRequired=!1,this.updateModel()},e.prototype.columnDrag=function(e){this.groupSettings.allowReordering&&e.column.allowGrouping&&this.animateDropper(e);var i=this.parent.element.querySelector(".e-cloneproperties");t.classList(i,["e-defaultcur"],["e-notallowedcur"]),O(e.target,"e-groupdroparea")||this.parent.allowReordering&&O(e.target,"e-headercell")||t.classList(i,["e-notallowedcur"],["e-defaultcur"]),e.target.classList.contains("e-groupdroparea")?this.element.classList.add("e-hover"):this.element.classList.remove("e-hover")},e.prototype.columnDragStart=function(e){if(!e.target.classList.contains("e-stackedheadercell")){var t=this.parent.element.querySelector(".e-groupdroparea");this.aria.setDropTarget(t,e.column.allowGrouping);var i=e.target.classList.contains("e-headercell")?e.target:O(e.target,"e-headercell");this.aria.setGrabbed(i,!0,!e.column.allowGrouping)}},e.prototype.columnDrop=function(e){var i=this.parent;if("grouping"===e.droppedElement.getAttribute("action")){var r=i.getColumnByUid(e.droppedElement.getAttribute("e-mappinguid"));if(t.isNullOrUndefined(r)||!1===r.allowGrouping||O(i.getColumnHeaderByUid(r.uid),"e-grid").getAttribute("id")!==i.element.getAttribute("id"))return;this.ungroupColumn(r.field)}},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Bt,this.enableAfterRender,this),this.parent.on("grouping-complete",this.onActionComplete,this),this.parent.on("ungrouping-complete",this.onActionComplete,this),this.parent.on(Nt,this.onPropertyChanged,this),this.parent.on(Gt,this.clickHandler,this),this.parent.on(Ft,this.columnDrag,this),this.parent.on(xt,this.columnDragStart,this),this.parent.on(Yt,this.columnDrop,this),this.parent.on(Et,this.columnDrop,this),this.parent.on(Ht,this.refreshSortIcons,this),this.parent.on("sorting-complete",this.refreshSortIcons,this),this.parent.on(Vt,this.keyPressHandler,this),this.parent.on(At,this.initialEnd,this),this.parent.on(Pt,this.initialEnd,this),this.parent.on(Ot,this.render,this),this.parent.on("group-aggregates",this.onGroupAggregates,this),this.parent.on("blazor-action-begin",this.blazorActionBegin,this),this.parent.on("group-expand-collapse",this.updateExpand,this),this.parent.on("persist-data-changed",this.initialEnd,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Ot,this.render),this.parent.off(Bt,this.enableAfterRender),this.parent.off("grouping-complete",this.onActionComplete),this.parent.off("ungrouping-complete",this.onActionComplete),this.parent.off(Nt,this.onPropertyChanged),this.parent.off(Gt,this.clickHandler),this.parent.off(Ft,this.columnDrag),this.parent.off(xt,this.columnDragStart),this.parent.off(Et,this.columnDrop),this.parent.off(Yt,this.columnDrop),this.parent.off(Ht,this.refreshSortIcons),this.parent.off("sorting-complete",this.refreshSortIcons),this.parent.off(Vt,this.keyPressHandler),this.parent.off("group-aggregates",this.onGroupAggregates),this.parent.off("blazor-action-begin",this.blazorActionBegin),this.parent.off("group-expand-collapse",this.updateExpand))},e.prototype.blazorActionBegin=function(){this.parent.allowGrouping&&!this.parent.isCollapseStateEnabled()&&this.expandAll()},e.prototype.initialEnd=function(){var e=this.parent;if(this.parent.off(At,this.initialEnd),this.parent.off(Pt,this.initialEnd),this.parent.getColumns().length&&this.groupSettings.columns.length){this.contentRefresh=!1;for(var t=0,i=e.groupSettings.columns;t<i.length;t++){var r=i[t];this.groupColumn(r)}this.contentRefresh=!0}},e.prototype.keyPressHandler=function(e){var i=this.parent;if("ctrlSpace"===e.action||this.groupSettings.columns.length&&-1!==["altDownArrow","altUpArrow","ctrlDownArrow","ctrlUpArrow","enter"].indexOf(e.action))switch(e.preventDefault(),e.action){case"altDownArrow":case"altUpArrow":var r=i.allowSelection?i.getSelectedRowIndexes():[];if(r.length){for(var n=i.getContentTable().querySelector(Ui).children,o=void 0,s=i.getDataRows()[r[r.length-1]].rowIndex;s>=0;s--)if(!n[s].classList.contains(Oi)&&!n[s].classList.contains("e-detailrow")){o=n[s];break}this.expandCollapseRows(o.querySelector("altUpArrow"===e.action?".e-recordplusexpand":".e-recordpluscollapse"))}break;case"ctrlDownArrow":this.expandAll();break;case"ctrlUpArrow":this.collapseAll();break;case"enter":if(this.parent.isEdit||null!==t.closest(e.target,"#"+this.parent.element.id+"_searchbar"))return;var l=this.focus.getFocusedElement(),a=l?l.parentElement.querySelector('[class^="e-record"]'):null;if(!a)break;this.expandCollapseRows(a);break;case"ctrlSpace":var h=i.focusModule.currentInfo.element;if(h&&h.classList.contains("e-headercell")){var d=i.getColumnByUid(h.firstElementChild.getAttribute("e-mappinguid"));d.field&&i.groupSettings.columns.indexOf(d.field)<0?this.groupColumn(d.field):this.ungroupColumn(d.field)}}},e.prototype.clickHandler=function(e){this.expandCollapseRows(e.target),this.applySortFromTarget(e.target),this.unGroupFromTarget(e.target),this.toogleGroupFromHeader(e.target)},e.prototype.unGroupFromTarget=function(e){e.classList.contains("e-ungroupbutton")&&this.ungroupColumn(e.parentElement.getAttribute("ej-mappingname"))},e.prototype.toogleGroupFromHeader=function(e){this.groupSettings.showToggleButton&&(e.classList.contains("e-grptogglebtn")?e.classList.contains("e-toggleungroup")?this.ungroupColumn(this.parent.getColumnByUid(e.parentElement.getAttribute("e-mappinguid")).field):this.groupColumn(this.parent.getColumnByUid(e.parentElement.getAttribute("e-mappinguid")).field):e.classList.contains("e-toggleungroup")&&this.ungroupColumn(e.parentElement.getAttribute("ej-mappingname")))},e.prototype.applySortFromTarget=function(e){var i=this.parent,r=t.closest(e,".e-groupheadercell");if(i.allowSorting&&r&&!e.classList.contains("e-ungroupbutton")&&!e.classList.contains("e-toggleungroup")){var n=r.firstElementChild.getAttribute("ej-mappingname");i.getColumnHeaderByField(n).getElementsByClassName("e-ascending").length?i.sortColumn(n,"Descending",!0):i.sortColumn(n,"Ascending",!0)}},e.prototype.expandCollapseRows=function(e){var i=O(e,"e-recordplusexpand")||O(e,"e-recordpluscollapse");if(i){var r=i.cellIndex,n=i.parentElement.rowIndex,o=this.parent.getContentTable().querySelector(Ui).children,s=[].slice.call(o).slice(n+1,o.length),l=void 0,a=void 0,h=[],d=this.parent,c=i.parentElement.getElementsByClassName("e-indentcell").length,p=!1;if(i.classList.contains("e-recordpluscollapse")?(t.addClass([i],"e-recordplusexpand"),t.removeClass([i],"e-recordpluscollapse"),i.firstElementChild.className="e-icons e-gdiagonaldown e-icon-gdownarrow",p=!0,ce(d)&&this.updateVirtualRows(d,e,p,void 0,void 0),this.parent.groupSettings.enableLazyLoading&&this.parent.contentModule.captionExpand(i.parentElement)):(l=!0,t.removeClass([i],"e-recordplusexpand"),t.addClass([i],"e-recordpluscollapse"),i.firstElementChild.className="e-icons e-gnextforward e-icon-grightarrow",ce(d)&&this.updateVirtualRows(d,e,!l,void 0,void 0),this.parent.groupSettings.enableLazyLoading&&this.parent.contentModule.captionCollapse(i.parentElement)),this.aria.setExpand(i,p),!ce(d)&&!this.parent.groupSettings.enableLazyLoading){for(var u=0,g=s.length;u<g&&(s[u].querySelectorAll("td")[r]&&s[u].querySelectorAll("td")[r].classList.contains("e-indentcell")&&s);u++)l?s[u].style.display="none":s[u].getElementsByClassName("e-indentcell").length===c+1&&(s[u].style.display="",(a=s[u].querySelector(".e-recordplusexpand"))&&h.push(a),s[u].classList.contains("e-detailrow")&&s[u-1].getElementsByClassName("e-detailrowcollapse").length&&(s[u].style.display="none"));this.updateVisibleexpandCollapseRows(),this.parent.notify("refresh-Expand-and-Collapse",{rows:this.parent.getRowsObject()})}for(var u=0,g=h.length;u<g;u++)t.removeClass([h[u]],"e-recordplusexpand"),t.addClass([h[u]],"e-recordpluscollapse"),h[u].firstElementChild.className="e-icons e-gnextforward e-icon-grightarrow",this.expandCollapseRows(h[u])}},e.prototype.updateVisibleexpandCollapseRows=function(){for(var e=this.parent.getRowsObject(),t=0,i=e.length;t<i;t++)e[t].isDataRow&&"none"===this.parent.getRowElementByUID(e[t].uid).style.display&&(e[t].visible=!1)},e.prototype.updateVirtualRows=function(e,t,i,r,n){var o=e.getRowObjectFromUID(t.closest("tr").getAttribute("data-uid"));o.isExpand=i,C(e),this.parent.notify("refresh-virtual-max-page",{}),(r=e.getDataModule().generateQuery(!1)).queries=e.getDataModule().aggregateQuery(e.getQuery().clone()).queries;var s={requestType:"virtualscroll",rowObject:o};e.getDataModule().getData(s,r.requiresCount()).then(function(t){return e.renderModule.dataManagerSuccess(t,s)})},e.prototype.expandCollapse=function(e){e||this.parent.notify("initial-collapse",e);for(var t,i=this.parent.getContentTable().querySelector(Ui).children,r=0,n=i.length;r<n;r++)i[r].querySelectorAll(".e-recordplusexpand, .e-recordpluscollapse").length?((t=i[r].querySelector(e?".e-recordpluscollapse":".e-recordplusexpand"))&&(t.className=e?"e-recordplusexpand":"e-recordpluscollapse",t.firstElementChild.className=e?"e-icons e-gdiagonaldown e-icon-gdownarrow":"e-icons e-gnextforward e-icon-grightarrow"),i[r].firstElementChild.classList.contains("e-recordplusexpand")||i[r].firstElementChild.classList.contains("e-recordpluscollapse")||(i[r].style.display=e?"":"none")):i[r].style.display=e?"":"none";this.updateVisibleexpandCollapseRows(),this.parent.notify("refresh-Expand-and-Collapse",{rows:this.parent.getRowsObject()})},e.prototype.expandAll=function(){this.expandCollapse(!0)},e.prototype.collapseAll=function(){this.expandCollapse(!1)},e.prototype.render=function(){this.l10n=this.serviceLocator.getService("localization"),this.renderGroupDropArea(),this.initDragAndDrop(),this.refreshToggleBtn()},e.prototype.renderGroupDropArea=function(){var e=this.parent.element.querySelector(".e-groupdroparea");e&&t.remove(e),this.element=this.parent.createElement("div",{className:"e-groupdroparea",attrs:{tabindex:"-1"}}),this.groupSettings.allowReordering&&this.element.classList.add("e-group-animate"),this.updateGroupDropArea(),this.parent.element.insertBefore(this.element,this.parent.element.firstChild),this.groupSettings.showDropArea||(this.element.style.display="none")},e.prototype.updateGroupDropArea=function(e){if(this.groupSettings.showDropArea&&!this.groupSettings.columns.length){var t=this.l10n.getConstant("GroupDropArea");this.element.innerHTML=t,this.element.classList.remove("e-grouped")}else(this.element.innerHTML===this.l10n.getConstant("GroupDropArea")&&(1===this.groupSettings.columns.length||!this.isAppliedGroup&&!this.isAppliedUnGroup)||e)&&(this.element.innerHTML=""),this.element.classList.add("e-grouped")},e.prototype.initDragAndDrop=function(){this.initializeGHeaderDrop(),this.initializeGHeaderDrag()},e.prototype.initializeGHeaderDrag=function(){new t.Draggable(this.element,{dragTarget:this.groupSettings.allowReordering?".e-drag":".e-groupheadercell",distance:this.groupSettings.allowReordering?-10:5,helper:this.helper,dragStart:this.dragStart,drag:this.drag,dragStop:this.dragStop})},e.prototype.initializeGHeaderDrop=function(){new t.Droppable(this.element,{accept:".e-dragclone",drop:this.drop})},e.prototype.groupColumn=function(e){var i=this.parent,r=i.getColumnByField(e);return t.isNullOrUndefined(r)||!1===r.allowGrouping||this.contentRefresh&&this.groupSettings.columns.indexOf(e)>-1?void this.parent.log("action_disabled_column",{moduleName:this.getModuleName(),columnName:r.headerText}):X(i)?void i.notify(ii,{instance:this,handler:this.groupColumn,arg1:e}):(r.visible=i.groupSettings.showGroupedColumn,this.colName=e,this.isAppliedGroup=!0,this.contentRefresh?this.updateModel():this.addColToGroupDrop(e),this.updateGroupDropArea(),void(this.isAppliedGroup=!1))},e.prototype.ungroupColumn=function(e){var i=this.parent,r=this.parent.enableColumnVirtualization?this.parent.columns.filter(function(t){return t.field===e})[0]:i.getColumnByField(e);if(!(t.isNullOrUndefined(r)||!1===r.allowGrouping||this.groupSettings.columns.indexOf(e)<0)){if(X(i))return void i.notify(ii,{instance:this,handler:this.ungroupColumn,arg1:e});r.visible=!0,this.colName=r.field;var n=JSON.parse(JSON.stringify(this.groupSettings.columns));if(n.splice(n.indexOf(this.colName),1),this.sortedColumns.indexOf(e)<0)for(var o=0,s=i.sortSettings.columns.length;o<s;o++)if(e===i.sortSettings.columns[o].field){i.sortSettings.columns.splice(o,1);break}this.groupSettings.allowReordering&&(this.reorderingColumns=n),this.groupSettings.columns=n,i.allowGrouping&&(this.isAppliedUnGroup=!0,this.parent.dataBind())}},e.prototype.updateModel=function(){var e=JSON.parse(JSON.stringify(this.groupSettings.columns));e=this.reorderingColumns.length?JSON.parse(JSON.stringify(this.reorderingColumns)):e,this.sortRequired&&(-1===e.indexOf(this.colName)&&e.push(this.colName),this.groupAddSortingQuery(this.colName)),this.sortRequired=!0,this.parent.groupSettings.columns=e,this.parent.dataBind()},e.prototype.onActionComplete=function(e){"grouping"===e.requestType?this.addColToGroupDrop(this.colName):this.removeColFromGroupDrop(this.colName);var i=this.groupSettings.columns.indexOf(this.colName)>-1?{columnName:this.colName,requestType:"grouping",type:St}:{requestType:"ungrouping",type:St};this.parent.trigger(St,t.extend(e,i)),this.colName=null},e.prototype.groupAddSortingQuery=function(e){for(var t=0;t<this.parent.sortSettings.columns.length&&this.parent.sortSettings.columns[t].field!==e;)t++;this.parent.sortSettings.columns.length===t?this.parent.sortSettings.columns.push({field:e,direction:"Ascending",isFromGroup:!0}):this.parent.allowSorting||(this.parent.sortSettings.columns[t].direction="Ascending")},e.prototype.createElement=function(e){var t=this.parent,i="Ascending",r=this.parent.createElement("div",{className:"e-grid-icon e-group-animator"}),n=this.parent.createElement("div",{className:"e-grid-icon e-groupheadercell"}),o=this.parent.createElement("div",{attrs:{"ej-mappingname":e}});_(e)&&o.setAttribute("ej-complexname",W(e));var s=this.parent.getColumnByField(e),l=t.getColumnHeaderByUid(s.uid);return this.groupSettings.allowReordering&&o.appendChild(this.parent.createElement("span",{className:"e-drag e-icons e-icon-drag",innerHTML:" ",attrs:{title:"Drag",tabindex:"-1","aria-label":"Drag the grouped column"}})),o.appendChild(this.parent.createElement("span",{className:"e-grouptext",innerHTML:s.headerText,attrs:{tabindex:"-1","aria-label":"sort the grouped column"}})),this.groupSettings.showToggleButton&&o.appendChild(this.parent.createElement("span",{className:"e-togglegroupbutton e-icons e-icon-ungroup e-toggleungroup",innerHTML:" ",attrs:{tabindex:"-1","aria-label":"ungroup button"}})),l.querySelectorAll(".e-ascending,.e-descending").length&&(i=l.querySelector(".e-ascending")?"Ascending":"Descending"),o.appendChild(this.parent.createElement("span",{className:"e-groupsort e-icons e-"+i.toLowerCase()+" e-icon-"+i.toLowerCase(),innerHTML:" ",attrs:{tabindex:"-1","aria-label":"sort the grouped column"}})),o.appendChild(this.parent.createElement("span",{className:"e-ungroupbutton e-icons e-icon-hide",innerHTML:" ",attrs:{title:this.l10n.getConstant("UnGroup"),tabindex:"-1","aria-label":"ungroup the grouped column"},styles:this.groupSettings.showUngroupButton?"":"display:none"})),n.appendChild(o),this.groupSettings.allowReordering&&(r.appendChild(n),r.appendChild(this.createSeparator()),n=r),n},e.prototype.addColToGroupDrop=function(e){var i=_(e)?this.parent.element.querySelector(".e-groupdroparea div[ej-complexname="+W(e)+"]"):this.parent.element.querySelector(".e-groupdroparea div[ej-mappingname="+e+"]");if(!this.groupSettings.allowReordering||!i){var r=this.parent.getColumnByField(e);if(!t.isNullOrUndefined(r)){var n=this.createElement(e);if(this.groupSettings.allowReordering){var o=this.element.getElementsByClassName("e-group-animator").length;n.setAttribute("index",o.toString())}this.element.appendChild(n)}}},e.prototype.createSeparator=function(){return this.parent.createElement("span",{className:"e-nextgroup e-icons e-icon-next",innerHTML:" ",attrs:{tabindex:"-1","aria-label":"Separator for the grouped columns"},styles:this.groupSettings.showUngroupButton?"":"display:none"})},e.prototype.refreshToggleBtn=function(e){if(this.groupSettings.showToggleButton)for(var i=[].slice.call(this.parent.getHeaderTable().getElementsByClassName("e-headercelldiv")),r=0,n=i.length;r<n;r++)if(!i[r].classList.contains("e-emptycell")&&!i[r].classList.contains("e-headerchkcelldiv")){var o=this.parent.getColumnByUid(i[r].getAttribute("e-mappinguid"));(!this.parent.showColumnMenu||this.parent.showColumnMenu&&!o.showColumnMenu)&&(i[r].getElementsByClassName("e-grptogglebtn").length&&t.remove(i[r].querySelectorAll(".e-grptogglebtn")[0]),e||i[r].appendChild(this.parent.createElement("span",{className:"e-grptogglebtn e-icons "+(this.groupSettings.columns.indexOf(o.field)>-1?"e-toggleungroup e-icon-ungroup":"e-togglegroup e-icon-group"),attrs:{tabindex:"-1","aria-label":"Group button"}})))}},e.prototype.removeColFromGroupDrop=function(e){if(!t.isNullOrUndefined(this.getGHeaderCell(e))){var i=this.getGHeaderCell(e);if(this.groupSettings.allowReordering){var r=O(i,"e-group-animator");t.remove(r)}else t.remove(i);this.updateGroupDropArea()}this.isAppliedUnGroup=!1},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName())for(var t=0,i=Object.keys(e.properties);t<i.length;t++){var r=i[t];switch(r){case"columns":var n=void 0;if(this.contentRefresh){if(this.isAppliedUnGroup)n={columnName:this.colName,requestType:"ungrouping",type:bt};else{if(!this.isAppliedGroup){this.updateGroupDropArea(!0);for(var o=0;o<this.parent.sortSettings.columns.length;o++)this.parent.sortSettings.columns[o].isFromGroup&&(this.parent.sortSettings.columns.splice(o,1),o--);for(l=0;l<this.groupSettings.columns.length;l++)this.colName=this.groupSettings.columns[l],this.parent.getColumnByField(this.colName).visible=this.parent.groupSettings.showGroupedColumn,this.groupAddSortingQuery(this.colName),l<this.groupSettings.columns.length-1&&this.addColToGroupDrop(this.groupSettings.columns[l])}n={columnName:this.colName,requestType:e.properties[r].length?"grouping":"ungrouping",type:bt}}if(!this.groupSettings.showGroupedColumn)for(var s=e.oldProperties[r],l=0;l<s.length;l++)-1===e.properties[r].indexOf(s[l])&&(this.parent.getColumnByField(s[l]).visible=!0);this.parent.notify(Lt,n)}break;case"showDropArea":this.updateGroupDropArea(),this.groupSettings.showDropArea?this.element.style.display="":this.element.style.display="none";break;case"showGroupedColumn":this.updateGroupedColumn(this.groupSettings.showGroupedColumn),this.parent.notify(Lt,{requestType:"refresh"});break;case"showUngroupButton":this.updateButtonVisibility(this.groupSettings.showUngroupButton,"e-ungroupbutton");break;case"showToggleButton":this.updateButtonVisibility(this.groupSettings.showToggleButton,"e-togglegroupbutton "),this.parent.refreshHeader();break;case"enableLazyLoading":this.parent.freezeRefresh()}}},e.prototype.updateGroupedColumn=function(e){for(var t=0;t<this.groupSettings.columns.length;t++)this.parent.getColumnByField(this.groupSettings.columns[t]).visible=e},e.prototype.updateButtonVisibility=function(e,t){for(var i=[].slice.call(this.element.getElementsByClassName(t)),r=0;r<i.length;r++)i[r].style.display=e?"":"none"},e.prototype.enableAfterRender=function(e){e.module===this.getModuleName()&&e.enable&&this.render()},e.prototype.destroy=function(){var e=this.parent.element;e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.parent.isDestroyed||this.parent.refreshing||this.clearGrouping(),this.removeEventListener(),this.refreshToggleBtn(!0),t.remove(this.element))},e.prototype.clearGrouping=function(){var e=JSON.parse(JSON.stringify(this.groupSettings.columns));this.contentRefresh=!1;for(var t=0,i=e.length;t<i;t++)t===i-1&&(this.contentRefresh=!0),this.ungroupColumn(e[t]);this.contentRefresh=!0},e.prototype.getModuleName=function(){return"group"},e.prototype.refreshSortIcons=function(){var e,i=this.parent,r=i.sortSettings.columns,n=i.groupSettings.columns,o=this.parent.getColumns().map(function(e){return e.field});this.refreshToggleBtn();for(var s=0,l=r.length;s<l;s++)-1!==o.indexOf(r[s].field)&&(e=i.getColumnHeaderByField(r[s].field),!i.allowSorting&&(this.sortedColumns.indexOf(r[s].field)>-1||this.groupSettings.columns.indexOf(r[s].field)>-1)?(t.classList(e.querySelector(".e-sortfilterdiv"),["e-ascending","e-icon-ascending"],[]),r.length>1&&e.querySelector(".e-headercelldiv").appendChild(this.parent.createElement("span",{className:"e-sortnumber",innerHTML:(s+1).toString()}))):this.getGHeaderCell(r[s].field)&&this.getGHeaderCell(r[s].field).getElementsByClassName("e-groupsort").length&&("Ascending"===r[s].direction?t.classList(this.getGHeaderCell(r[s].field).querySelector(".e-groupsort"),["e-ascending","e-icon-ascending"],["e-descending","e-icon-descending"]):t.classList(this.getGHeaderCell(r[s].field).querySelector(".e-groupsort"),["e-descending","e-icon-descending"],["e-ascending","e-icon-ascending"])));for(var s=0,l=n.length;s<l;s++)-1!==o.indexOf(n[s])&&i.getColumnHeaderByField(n[s]).setAttribute("aria-grouped","true")},e.prototype.getGHeaderCell=function(e){return this.element&&this.element.querySelector('[ej-mappingname="'+e+'"]')?this.element.querySelector('[ej-mappingname="'+e+'"]').parentElement:null},e.prototype.onGroupAggregates=function(e){var t=this.iterateGroupAggregates(e),i=this.groupGenerator.generateRows(t,{}),r=this.parent.getRowsObject().filter(function(e){return!e.isDataRow}),n=i.filter(function(e){return!e.isDataRow});this.parent.isReact&&this.parent.destroyTemplate(["groupFooterTemplate","groupCaptionTemplate","footerTemplate"]);for(var o=0;o<n.length;o++){var s=n[o],l={cells:s.cells.filter(function(e){return e.isDataCell}),data:s.data,dataUid:r[o]?r[o].uid:""};this.parent.notify("refresh-aggregate-cell",l)}},e.prototype.iterateGroupAggregates=function(e){var t=e instanceof Array?e:[],r=this.parent.getRowsObject(),n=this.parent.getCurrentViewRecords(),o=[],s=r.map(function(e){return"delete"===e.edit&&o.push(e.data),e.changes instanceof Object?e.changes:e.data}),l=this.parent.getPrimaryKeyFieldNames()[0];s=0===t.length?s:t;var a=n.map(function(e){var t,r=i.DataUtil.getObject(l,e);return s.some(function(e){return t=e,r===i.DataUtil.getObject(l,e)})?t:e}),h=e;if((!h.type||"cancel"!==h.type)&&o.length>0)for(var d=0;d<o.length;d++){var c=a.indexOf(o[d]);a.splice(c,1)}for(var p=[],u=this.parent.aggregates,g=0;g<u.length;g++)for(var f=u[g],m=0;m<f.columns.length;m++){var y={};y={type:f.columns[m].type.toString().toLowerCase(),field:f.columns[m].field},p.push(y)}for(var v,C,w=this.parent.groupSettings.columns,b=0;b<w.length;b++)C=v||a,v=i.DataUtil.group(C,w[b],p,null,null);return v},e.prototype.updateExpand=function(e){for(var i=e.uid,r=e.isExpand,n=this.parent.getRowsObject(),o=0;o<n.length;o++){var s=n[o];if(s.uid===i||t.isNullOrUndefined(i)){s.isExpand=r;for(var l=o+1;l<n.length&&"break"!==function(e){var r=n[e],o=void 0;if(r.parentUid!==s.uid&&(o=n.filter(function(e){return e.uid===r.parentUid})[0]),r.parentUid===s.uid?r.visible=s.isExpand:t.isNullOrUndefined(o)||r.parentUid!==o.uid||(o.isExpand&&!0===o.visible?r.visible=!0:o.isExpand&&!1===o.visible&&(r.visible=!1)),t.isNullOrUndefined(i))return"break"}(l);l++);}}this.parent.notify(At,{rows:n,args:{isFrozen:!1,rows:n}})},e}(),Yn=function(){function i(e,t){this.aria=new er,this.parent=e,this.parent.isDestroyed||(this.focus=t.getService("focus"),this.parent.on(Gt,this.clickHandler,this),this.parent.on(_t,this.destroy,this),this.parent.on(Vt,this.keyPressHandler,this),this.parent.on(li,this.expand,this),this.parent.on(Wt,this.refreshColSpan,this))}return i.prototype.clickHandler=function(e){this.toogleExpandcollapse(t.closest(e.target,"td"))},i.prototype.toogleExpandcollapse=function(i){var r,n=this.parent,o=this.parent.getContentTable(),s=this.parent.getCurrentViewRecords().length-1,l=i&&i.classList.contains("e-detailrowcollapse");if(i&&(i.classList.contains("e-detailrowcollapse")||i.classList.contains("e-detailrowexpand"))){var a=i.parentElement,h=a.getAttribute("data-uid"),d=n.getRowObjectFromUID(h),c=this.parent.getContentTable().querySelector(Ui).children[a.rowIndex+1];if(i.classList.contains("e-detailrowcollapse")){var p=d.data;if(this.isDetailRow(c))c.style.display="",n.notify("detail-state-change",{data:p,childGrid:n.childGrid,detailElement:i,isExpanded:l});else if(n.getDetailTemplate()||n.childGrid){var u=L("grid-row"),g=this.parent.createElement("tr",{className:"e-detailrow",attrs:{"data-uid":u}}),f=this.parent.createElement("td",{className:"e-detailcell"}),m=this.parent.getVisibleColumns().length;this.parent.allowRowDragAndDrop&&m++,f.setAttribute("colspan",m.toString());for(var y=new vi({isDataRow:!0,isExpand:!0,uid:u,isDetailRow:!0,cells:[new Ci({cellType:e.CellType.Indent}),new Ci({isDataCell:!0,visible:!0})]}),v=0,C=n.groupSettings.columns.length;v<C;v++)g.appendChild(this.parent.createElement("td",{className:"e-indentcell"})),y.cells.unshift(new Ci({cellType:e.CellType.Indent}));if(g.appendChild(this.parent.createElement("td",{className:"e-detailindentcell"})),g.appendChild(f),a.parentNode.insertBefore(g,a.nextSibling),n.detailTemplate){var w=this.parent.isReact&&"string"!=typeof n.detailTemplate,b=n.element.id+"detailTemplate";w?(n.getDetailTemplate()(p,n,"detailTemplate",b,null,null,f),this.parent.renderTemplates()):q(f,n.getDetailTemplate()(p,n,"detailTemplate",b))}else{(r=new mn(this.getGridModel(n,d,n.printMode))).query&&(r.query=r.query.clone()),r.parentDetails={parentID:n.element.id,parentPrimaryKeys:n.getPrimaryKeyFieldNames(),parentKeyField:n.childGrid.queryString,parentKeyFieldValue:p[n.childGrid.queryString],parentRowData:p},r.isLegacyTemplate=n.isReact||n.isLegacyTemplate,n.isPrinting&&(r.isPrinting=!0,r.on(At,this.promiseResolve(r),this),r.on(Pt,this.promiseResolve(r),this)),d.childGrid=r;var S=r.getInjectedModules(),R=n.getInjectedModules();S&&S.length===R.length||r.setInjectedModules(R);var x=this.parent.createElement("div",{id:"child"+H(a,"e-grid").length+"_grid"+a.rowIndex+L("")});f.appendChild(x),r.appendTo(x)}g.appendChild(f),a.nextSibling?a.parentNode.insertBefore(g,a.nextSibling):a.parentNode.appendChild(g),n.getRows().splice(a.rowIndex+1,0,g),n.getRowsObject().splice(d.index+1,0,y),n.trigger("detailDataBound",{detailElement:f,data:p,childGrid:r}),n.notify("detailDataBound",{rows:n.getRowsObject()})}if(t.classList(i,["e-detailrowexpand"],["e-detailrowcollapse"]),t.classList(i.firstElementChild,["e-dtdiagonaldown","e-icon-gdownarrow"],["e-dtdiagonalright","e-icon-grightarrow"]),d.isExpand=!0,i.classList.contains("e-lastrowcell")&&this.parent.getContent().clientHeight>o.scrollHeight){t.removeClass(i.parentElement.querySelectorAll("td"),"e-lastrowcell");var F=o.querySelector(Ui).getElementsByClassName("e-detailrow").length-1;t.addClass(o.querySelector(Ui).getElementsByClassName("e-detailrow")[F].childNodes,["e-lastrowcell"]),this.lastrowcell=!0}this.aria.setExpand(i,!0)}else this.isDetailRow(c)&&(c.style.display="none",n.notify("detail-state-change",{data:d.data,childGrid:n.childGrid,detailElement:i,isExpanded:l})),t.classList(i,["e-detailrowcollapse"],["e-detailrowexpand"]),t.classList(i.firstElementChild,["e-dtdiagonalright","e-icon-grightarrow"],["e-dtdiagonaldown","e-icon-gdownarrow"]),parseInt(a.getAttribute(Hi),10)===s&&this.lastrowcell&&(t.addClass(i.parentElement.querySelectorAll("td"),"e-lastrowcell"),this.lastrowcell=!1),d.isExpand=!1,this.aria.setExpand(i,!1)}},i.prototype.getGridModel=function(e,i,r){var n;return e.isPrinting&&i.isExpand&&e.expandedRows&&e.expandedRows[i.index]&&e.expandedRows[i.index].gridModel?(e.expandedRows[i.index].gridModel.hierarchyPrintMode=e.childGrid.hierarchyPrintMode,n=e.expandedRows[i.index].gridModel):(e.isPrinting&&e.childGrid.allowPaging&&(e.childGrid.allowPaging="CurrentPage"===r),n=t.extend({},{},e.childGrid,!0)),n},i.prototype.promiseResolve=function(e){var t=this;return function(){e.off(At,t.promiseResolve),e.off(Pt,t.promiseResolve),e.notify(si,{})}},i.prototype.isDetailRow=function(e){return e&&e.classList.contains("e-detailrow")},i.prototype.destroy=function(){var e=this.parent.element;!this.parent.isDestroyed&&e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.parent.off(Gt,this.clickHandler),this.parent.off(_t,this.destroy),this.parent.off(Vt,this.keyPressHandler),this.parent.off(li,this.expand),this.parent.off(Wt,this.refreshColSpan))},i.prototype.getTDfromIndex=function(e,t){var i=this.parent.getDataRows()[e];return i&&i.querySelector(t)?i.querySelector(t):null},i.prototype.expand=function(e){isNaN(e)||(e=this.getTDfromIndex(e,".e-detailrowcollapse")),e&&e.classList.contains("e-detailrowcollapse")&&this.toogleExpandcollapse(e)},i.prototype.collapse=function(e){isNaN(e)||(e=this.getTDfromIndex(e,".e-detailrowexpand")),e&&e.classList.contains("e-detailrowexpand")&&this.toogleExpandcollapse(e)},i.prototype.expandAll=function(){this.expandCollapse(!0),this.parent.trigger(St,{requestType:"expandAllComplete",type:St,moduleObj:this})},i.prototype.collapseAll=function(){this.expandCollapse(!1),this.parent.trigger(St,{requestType:"collapseAllComplete",type:St,moduleObj:this})},i.prototype.expandCollapse=function(e){for(var t,i=this.parent.getDataRows(),r=0,n=i.length;r<n;r++)t=i[r].querySelector(".e-detailrowcollapse, .e-detailrowexpand"),e?this.expand(t):this.collapse(t)},i.prototype.keyPressHandler=function(e){var t=this.parent;switch(e.action){case"ctrlDownArrow":this.expandAll();break;case"ctrlUpArrow":this.collapseAll();break;case"altUpArrow":case"altDownArrow":var i=t.allowSelection?t.getSelectedRowIndexes():[];if(i.length){var r=t.getDataRows()[i[i.length-1]].querySelector(".e-detailrowcollapse, .e-detailrowexpand");"altDownArrow"===e.action?this.expand(r):this.collapse(r)}break;case"enter":if(this.parent.isEdit)return;var n=this.focus.getFocusedElement();if(!e.target.classList.contains("e-detailrowcollapse")&&!e.target.classList.contains("e-detailrowexpand"))break;this.toogleExpandcollapse(n)}},i.prototype.refreshColSpan=function(){for(var e=this.parent.contentModule.getTable().querySelectorAll("tr.e-detailrow"),t=this.parent.getVisibleColumns().length,i=0;i<e.length;i++)e[i].querySelector(".e-detailcell").setAttribute("colspan",t+"")},i.prototype.getModuleName=function(){return"detailRow"},i}(),Zn=function(){function i(e,t){this.predefinedItems={},this.items=["Add","Edit","Update","Delete","Cancel","Print","Search","ColumnChooser","PdfExport","ExcelExport","CsvExport","WordExport"],this.parent=e,this.gridID=e.element.id,this.serviceLocator=t,this.addEventListener()}return i.prototype.render=function(){this.l10n=this.serviceLocator.getService("localization");for(var e=["Add","Edit","Update","Delete","Cancel","Print","PdfExport","ExcelExport","WordExport","CsvExport"],t=this.parent.enableAdaptiveUI,i=["Edit","Delete","Update","Cancel"],r=0,n=e;r<n.length;r++){var o=n[r],s=o.toLowerCase(),l=s[0].toUpperCase()+s.slice(1);this.predefinedItems[o]={id:this.gridID+"_"+s,prefixIcon:"e-"+s,text:this.l10n.getConstant(l),tooltipText:this.l10n.getConstant(l)},t&&(this.predefinedItems[o].text="",this.predefinedItems[o].visible=-1===i.indexOf(o))}this.predefinedItems.Search={id:this.gridID+"_search",tooltipText:this.l10n.getConstant("Search"),align:"Right",cssClass:"e-search-wrapper",type:"Input"},this.predefinedItems.ColumnChooser={id:this.gridID+"_columnchooser",cssClass:"e-cc e-ccdiv e-cc-toolbar",suffixIcon:"e-columnchooser-btn",text:t?"":this.l10n.getConstant("Columnchooser"),tooltipText:this.l10n.getConstant("Columnchooser"),align:"Right"},"Vertical"===this.parent.rowRenderingMode&&(this.parent.allowFiltering&&"FilterBar"!==this.parent.filterSettings.type&&(this.predefinedItems.responsiveFilter={id:this.gridID+"_responsivefilter",cssClass:"e-gridresponsiveicons e-icons",suffixIcon:"e-resfilter-icon",tooltipText:this.l10n.getConstant("FilterButton")}),this.parent.allowSorting&&(this.predefinedItems.responsiveSort={id:this.gridID+"_responsivesort",cssClass:"e-gridresponsiveicons e-icons",suffixIcon:"e-ressort-icon",tooltipText:this.l10n.getConstant("Sort")})),this.parent.enableAdaptiveUI&&this.parent.toolbar.indexOf("Search")>-1&&(this.predefinedItems.responsiveBack={id:this.gridID+"_responsiveback",cssClass:"e-gridresponsiveicons e-icons",suffixIcon:"e-resback-icon",visible:!1}),this.createToolbar()},i.prototype.getToolbar=function(){return this.toolbar.element},i.prototype.destroy=function(){this.toolbar&&!this.toolbar.isDestroyed&&(this.toolbar.element?(this.toolbar.off("render-react-toolbar-template",this.addReactToolbarPortals),this.toolbar.destroy()):(this.parent.destroyTemplate(["toolbarTemplate"]),this.parent.isReact&&this.parent.renderTemplates()),this.unWireEvent(),this.removeEventListener(),t.remove(this.element))},i.prototype.bindSearchEvents=function(){this.searchElement=t.select("#"+this.gridID+"_searchbar",this.element),this.wireEvent(),this.refreshToolbarItems(),this.parent.searchSettings&&this.updateSearchBox()},i.prototype.toolbarCreated=function(e){this.element.querySelector(".e-search-wrapper")&&(!this.parent.enableAdaptiveUI||e?this.element.querySelector(".e-search-wrapper").innerHTML='<div class="e-input-group e-search" role="search"> <input id="'+this.gridID+'_searchbar" class="e-input" name="input" type="search" placeholder= "'+this.l10n.getConstant("Search")+'"/> <span id="'+this.gridID+'_searchbutton" class="e-input-group-icon e-search-icon e-icons" tabindex="-1" title="'+this.l10n.getConstant("Search")+'" aria-label= "search"></span> </div>':this.element.querySelector(".e-search-wrapper").innerHTML='<span id="'+this.gridID+'_searchbutton" class="e-input-group-icon e-search-icon e-icons" tabindex="-1" title="'+this.l10n.getConstant("Search")+'" aria-label= "search"></span> </div>'),this.bindSearchEvents()},i.prototype.createToolbar=function(){var e=this.getItems();this.toolbar=new a.Toolbar({items:e,clicked:this.toolbarClickHandler.bind(this),enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,created:this.toolbarCreated.bind(this)}),this.toolbar.isReact=this.parent.isReact,this.toolbar.on("render-react-toolbar-template",this.addReactToolbarPortals,this);this.toolbar.isStringTemplate=!0;var i="viewContainerRef";if(this.parent[i]&&(this.toolbar.registeredTemplate={},this.toolbar[i]=this.parent[i]),this.element=this.parent.createElement("div",{id:this.gridID+"_toolbarItems"}),this.parent.enableAdaptiveUI&&this.element.classList.add("e-res-toolbar"),this.parent.toolbarTemplate)if(t.isBlazor()||"string"!=typeof this.parent.toolbarTemplate){var r=this.parent.isReact&&"string"!=typeof this.parent.toolbarTemplate,n=this.parent.element.id+"toolbarTemplate";r?(x(this.parent.toolbarTemplate)({},this.parent,"toolbarTemplate",n,null,null,this.element),this.parent.renderTemplates()):q(this.element,x(this.parent.toolbarTemplate)({},this.parent,"toolbarTemplate"))}else this.toolbar.appendTo(this.parent.toolbarTemplate),this.element=this.toolbar.element;else this.toolbar.appendTo(this.element);this.parent.element.insertBefore(this.element,this.parent.getHeaderContent())},i.prototype.addReactToolbarPortals=function(e){this.parent.isReact&&e&&(this.parent.portals=this.parent.portals.concat(e),this.parent.renderTemplates())},i.prototype.renderResponsiveSearch=function(i){i?(this.toolbarCreated(!0),this.refreshResponsiveToolbarItems(e.ResponsiveToolbarAction.isSearch),this.searchElement=t.select("#"+this.gridID+"_searchbar",this.element),O(this.searchElement,"e-toolbar-right").classList.add("e-responsive-right"),this.parent.searchSettings&&this.updateSearchBox(),this.searchBoxObj.searchFocus({target:this.searchElement}),this.searchElement.focus()):this.refreshResponsiveToolbarItems(e.ResponsiveToolbarAction.isInitial)},i.prototype.refreshResponsiveToolbarItems=function(t){if(t===e.ResponsiveToolbarAction.isInitial){for(var i=this.parent.element.id,r=[i+"_edit",i+"_delete"],n=this.parent.getSelectedRowIndexes(),o=[i+"_responsiveback",i+"_update",i+"_cancel"],s=0,l=this.toolbar.items;s<l.length;s++){d=l[s];(c=this.toolbar.element.querySelector("#"+d.id))&&(r.indexOf(d.id)>-1?n.length?c.parentElement.classList.remove("e-hidden"):c.parentElement.classList.add("e-hidden"):-1===o.indexOf(d.id)?c.parentElement.classList.remove("e-hidden"):c.parentElement.classList.add("e-hidden"))}this.searchElement&&(O(this.searchElement,"e-toolbar-right").classList.remove("e-responsive-right"),this.toolbarCreated(!1),this.unWireEvent(),this.searchElement=void 0)}if(t===e.ResponsiveToolbarAction.isSearch)for(var r=[this.parent.element.id+"_responsiveback",this.parent.element.id+"_search"],a=0,h=this.toolbar.items;a<h.length;a++){var d=h[a],c=this.toolbar.element.querySelector("#"+d.id);c&&(r.indexOf(d.id)>-1?c.parentElement.classList.remove("e-hidden"):c.parentElement.classList.add("e-hidden"))}},i.prototype.refreshToolbarItems=function(e){var t=this.parent,i=[],r=[],n=t.editSettings,o=t.currentViewData&&t.currentViewData.length;n.allowAdding?i.push(this.gridID+"_add"):r.push(this.gridID+"_add"),n.allowEditing&&o?i.push(this.gridID+"_edit"):r.push(this.gridID+"_edit"),n.allowDeleting&&o?i.push(this.gridID+"_delete"):r.push(this.gridID+"_delete"),"Batch"===t.editSettings.mode?t.element.getElementsByClassName("e-updatedtd").length&&(n.allowAdding||n.allowEditing)?(i.push(this.gridID+"_update"),i.push(this.gridID+"_cancel")):(r.push(this.gridID+"_update"),r.push(this.gridID+"_cancel")):t.isEdit&&(n.allowAdding||n.allowEditing)?(i=[this.gridID+"_update",this.gridID+"_cancel"],r=[this.gridID+"_add",this.gridID+"_edit",this.gridID+"_delete"]):(r.push(this.gridID+"_update"),r.push(this.gridID+"_cancel")),this.enableItems(i,!0),this.enableItems(r,!1)},i.prototype.getItems=function(){var e=[],t=this.parent.toolbar||[];if("string"==typeof this.parent.toolbar)return[];"Vertical"===this.parent.rowRenderingMode&&(this.parent.allowFiltering&&"FilterBar"!==this.parent.filterSettings.type&&e.push(this.getItemObject("responsiveFilter")),this.parent.allowSorting&&e.push(this.getItemObject("responsiveSort")));for(var i=0,r=t;i<r.length;i++){var n=r[i];switch(typeof n){case"number":e.push(this.getItemObject(this.items[n]));break;case"string":e.push(this.getItemObject(n));break;default:e.push(this.getItem(n))}}return this.parent.enableAdaptiveUI&&this.parent.toolbar.indexOf("Search")>-1&&e.push(this.getItemObject("responsiveBack")),e},i.prototype.getItem=function(e){var i=this.predefinedItems[e.text];return i?t.extend(i,i,e):e},i.prototype.getItemObject=function(e){return this.predefinedItems[e]||{text:e,id:this.gridID+"_"+e}},i.prototype.enableItems=function(e,i){for(var r=0,n=e;r<n.length;r++){var o=n[r],s=t.select("#"+o,this.element);s&&this.toolbar.enableItems(s.parentElement,i)}},i.prototype.toolbarClickHandler=function(e){var i=this,r=this.parent,n=this.gridID;t.extend(e,{cancel:!1});var o=e,s=e.originalEvent;r.trigger("toolbarClick",o,function(e){if(e.originalEvent=e.originalEvent?e.originalEvent:s,!e.cancel)switch(!t.isNullOrUndefined(e.item)&&e.item.id){case n+"_print":r.print();break;case n+"_edit":r.startEdit();break;case n+"_update":r.endEdit();break;case n+"_cancel":r.closeEdit();break;case n+"_add":r.addRecord();break;case n+"_delete":r.deleteRecord();break;case n+"_search":e.originalEvent.target.id===n+"_searchbutton"&&i.searchElement?i.search():!r.enableAdaptiveUI||i.searchElement||!e.originalEvent.target.classList.contains("e-search-wrapper")&&e.originalEvent.target.id!==n+"_searchbutton"||i.renderResponsiveSearch(!0);break;case n+"_columnchooser":var o=i.parent.element.querySelector(".e-ccdiv"),l=o.getBoundingClientRect().top,a=o.getBoundingClientRect().left,h=e.originalEvent.target;l=o.getBoundingClientRect().top+o.offsetTop,r.createColumnchooser(a,l,h);break;case n+"_responsivefilter":r.showResponsiveCustomFilter();break;case n+"_responsivesort":r.showResponsiveCustomSort();break;case n+"_responsiveback":i.renderResponsiveSearch(!1)}})},i.prototype.modelChanged=function(e){"edit"===e.module&&this.refreshToolbarItems()},i.prototype.onPropertyChanged=function(e){e.module===this.getModuleName()&&this.parent.toolbar&&(this.element&&t.remove(this.element),this.render())},i.prototype.keyUpHandler=function(e){13===e.keyCode&&this.search()},i.prototype.search=function(){this.parent.search(this.searchElement.value)},i.prototype.updateSearchBox=function(){this.searchElement&&(this.searchElement.value=this.parent.searchSettings.key)},i.prototype.wireEvent=function(){this.searchElement&&(this.searchBoxObj=new Pr(this.searchElement),t.EventHandler.add(this.searchElement,"keyup",this.keyUpHandler,this),this.searchBoxObj.wireEvent())},i.prototype.unWireEvent=function(){this.searchElement&&(t.EventHandler.remove(this.searchElement,"keyup",this.keyUpHandler),this.searchBoxObj.unWireEvent())},i.prototype.reRenderToolbar=function(){this.element&&t.remove(this.element),this.render()},i.prototype.addEventListener=function(){this.parent.isDestroyed||(this.evtHandlers=[{event:"set-fullscreen-dialog",handler:this.reRenderToolbar},{event:Ot,handler:this.render},{event:Bt,handler:this.onPropertyChanged},{event:Nt,handler:this.updateSearchBox.bind(this)},{event:Lt,handler:this.refreshToolbarItems},{event:"toolbar-refresh",handler:this.refreshToolbarItems},{event:Nt,handler:this.modelChanged},{event:Rt,handler:this.refreshToolbarItems},{event:Gt,handler:this.removeResponsiveSearch},{event:"row-mode-change",handler:this.reRenderToolbar}],Xe(this.parent,this.evtHandlers,!0,this),this.rowSelectedFunction=this.rowSelected.bind(this),this.rowDeSelectedFunction=this.rowSelected.bind(this),this.parent.addEventListener("rowSelected",this.rowSelectedFunction),this.parent.addEventListener("rowDeselected",this.rowDeSelectedFunction))},i.prototype.removeEventListener=function(){this.parent.isDestroyed||(Xe(this.parent,this.evtHandlers,!1),this.parent.removeEventListener("rowSelected",this.rowSelectedFunction),this.parent.removeEventListener("rowDeselected",this.rowDeSelectedFunction))},i.prototype.removeResponsiveSearch=function(e){var t=e.target,i=t.classList.contains("e-search-icon")||t.classList.contains("e-search-wrapper");this.parent.enableAdaptiveUI&&!i&&this.searchElement&&!O(e.target,"e-res-toolbar")&&this.renderResponsiveSearch(!1)},i.prototype.rowSelected=function(){this.parent.enableAdaptiveUI&&this.refreshResponsiveToolbarItems(e.ResponsiveToolbarAction.isInitial)},i.prototype.getModuleName=function(){return"toolbar"},i}(),$n=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),eo=function(e){function r(t,i){var r=e.call(this,t,i)||this;return r.aggregates={},r.parent=t,r.locator=i,r.modelGenerator=new Wi(r.parent),r.addEventListener(),r}return $n(r,e),r.prototype.renderPanel=function(){var e=this.parent.createElement("div",{className:xi}),i=this.parent.createElement("div",{className:"e-summarycontent"}),r=i;if(this.parent.isFrozenGrid()){var n=this.parent.createElement("div",{className:"e-frozenfootercontent e-frozen-left-footercontent"}),o=this.parent.createElement("div",{className:"e-movablefootercontent"}),s=this.parent.createElement("div",{className:"e-frozenfootercontent e-frozen-right-footercontent"});(this.parent.getFrozenColumns()||this.parent.getFrozenLeftColumnsCount())&&(i.appendChild(n),this.frozenContent=n),i.appendChild(o),this.movableContent=o,r=o,this.parent.getFrozenRightColumnsCount()&&(i.appendChild(s),this.frozenRightContent=s)}t.Browser.isDevice&&(r.style.overflowX="scroll"),e.appendChild(i),this.setPanel(e),null!=this.parent.getPager()?this.parent.element.insertBefore(e,this.parent.getPager()):this.parent.element.appendChild(e)},r.prototype.renderTable=function(){var e=this.parent.getFrozenColumns()||this.parent.getFrozenLeftColumnsCount(),i=this.createContentTable("_footer_table").querySelector("."+Mi),r=this.parent.createElement("tfoot");if(i.appendChild(r),this.parent.isFrozenGrid()){var n=i.cloneNode(!0),o=i.cloneNode(!0);if(e&&(this.frozenContent.appendChild(n),this.freezeTable=n),this.parent.getFrozenRightColumnsCount()){t.remove(o.querySelector(ji));var s=this.parent.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(ji).cloneNode(!0);o.insertBefore(s,o.querySelector(Ui)),this.frozenRightContent.appendChild(o),this.frTable=o}this.movableContent.appendChild(i),t.remove(i.querySelector(ji));var l=this.parent.getHeaderContent().querySelector("."+Ii).querySelector(ji).cloneNode(!0);i.insertBefore(l,i.querySelector(Ui)),this.setColGroup(l)}this.setTable(i)},r.prototype.renderSummaryContent=function(e,i,r,n){var o=this.parent.dataSource instanceof Array?this.parent.dataSource:this.parent.currentViewData,s=this.modelGenerator.getData(),l=t.isNullOrUndefined(r)?this.modelGenerator.getColumns():this.modelGenerator.getColumns(r,n),a=t.isNullOrUndefined(r)?this.modelGenerator.generateRows(o,e||this.aggregates):this.modelGenerator.generateRows(o,e||this.aggregates,r,n),h=document.createDocumentFragment(),d=new Vi(this.locator,null,this.parent);d.element=this.parent.createElement("TR",{className:"e-summaryrow"});for(var c=0,p=s.length;c<p;c++){var u=a[c];if(u){var g=d.render(u,l);h.appendChild(g)}}i.tFoot.appendChild(h),this.aggregates=t.isNullOrUndefined(e)?this.aggregates:e},r.prototype.refresh=function(e){var i=this.parent.getFrozenColumns()||this.parent.getFrozenLeftColumnsCount(),r=this.parent.getMovableColumnsCount(),n=this.parent.getFrozenRightColumnsCount();if(this.parent.isFrozenGrid()&&(t.remove(this.getPanel()),this.renderPanel(),this.renderTable(),i&&(this.freezeTable.tFoot.innerHTML="",this.renderSummaryContent(e,this.freezeTable,0,i))),this.getTable().tFoot.innerHTML="",this.renderSummaryContent(e,this.getTable(),i,n?i+r:void 0),this.parent.getFrozenRightColumnsCount()){this.frTable.tFoot.innerHTML="",this.renderSummaryContent(e,this.frTable,i+r,i+r+n);var o=[].slice.call(this.getTable().getElementsByClassName("e-lastsummarycell"));if(o.length)for(var s=0;s<o.length;s++)o[s].style.borderRight="0px"}if(this.parent.isFrozenGrid()){var l=[].slice.call(this.parent.element.querySelector(".e-movablefootercontent").getElementsByClassName("e-summaryrow")),a=void 0;if(i){a=[].slice.call(this.parent.element.querySelector(".e-frozen-left-footercontent").getElementsByClassName("e-summaryrow")),this.refreshHeight(a,l);var h=this.frozenContent;h.offsetHeight||(h.style.height=this.getTable().offsetHeight+"px")}if(n){var d=[].slice.call(this.parent.element.querySelector(".e-frozen-right-footercontent").getElementsByClassName("e-summaryrow"));this.refreshHeight(d,l),a&&this.refreshHeight(d,a);var c=this.frTable;c.offsetHeight||(c.style.height=this.getTable().offsetHeight+"px")}this.parent.allowResizing&&this.updateFooterTableWidth(this.getTable())}this.onScroll()},r.prototype.refreshHeight=function(e,t){for(var i=0;i<e.length;i++){var r=e[i].getBoundingClientRect().height,n=t[i].getBoundingClientRect().height;r<n?(e[i].classList.remove("e-hide"),e[i].style.height=n+"px"):r>n&&(t[i].classList.remove("e-hide"),t[i].style.height=r+"px")}},r.prototype.refreshCol=function(){var e,t=e=this.parent.element.querySelector("."+Si).querySelector(ji).cloneNode(!0);this.parent.getFrozenColumns()&&(this.parent.enableColumnVirtualization&&this.parent.contentModule.isXaxis()?e=this.parent.getMovableVirtualHeader().querySelector(ji).cloneNode(!0):(e=de(t,this.parent.getFrozenColumns(),this.parent),this.freezeTable.replaceChild(t,this.freezeTable.querySelector(ji)))),this.getTable().replaceChild(e,this.getColGroup()),this.setColGroup(e)},r.prototype.onWidthChange=function(e){this.getColFromIndex(e.index).style.width=t.formatUnit(e.width),this.parent.allowResizing&&"resize"===e.module&&this.updateFooterTableWidth(this.getTable())},r.prototype.onScroll=function(e){void 0===e&&(e={left:this.parent.isFrozenGrid()?this.parent.getContent().querySelector("."+Ei).scrollLeft:this.parent.getContent().firstChild.scrollLeft}),this.getTable().parentElement.scrollLeft=e.left},r.prototype.getColFromIndex=function(e){var t=this.parent.getVisibleFrozenLeftCount()||this.parent.getFrozenColumns(),i=this.parent.getVisibleMovableCount(),r=this.parent.getVisibleFrozenRightCount(),n=this.parent.isRowDragable()&&"Right"!==this.parent.getFrozenMode()?1:0;return t&&e<t+n?this.freezeTable.querySelector(ji).children[e]:r&&e>=t+i+n?this.frTable.querySelector(ji).children[e-(t?t+i+n:t+i)]:this.getColGroup().children[e-(t?t+n:t)]},r.prototype.columnVisibilityChanged=function(){this.refresh()},r.prototype.addEventListener=function(){this.evtHandlers=[{event:qt,handler:this.refreshCol},{event:"column-width-changed",handler:this.onWidthChange},{event:"scroll",handler:this.onScroll},{event:Wt,handler:this.columnVisibilityChanged},{event:"refresh-footer-rendered",handler:this.refreshFooterRenderer}],Xe(this.parent,this.evtHandlers,!0,this)},r.prototype.removeEventListener=function(){Xe(this.parent,this.evtHandlers,!1)},r.prototype.updateFooterTableWidth=function(e){var t=this.parent.getHeaderTable();t&&e&&(e.style.width=t.style.width)},r.prototype.refreshFooterRenderer=function(e){var t=this.onAggregates(e);this.refresh(t)},r.prototype.getIndexByKey=function(e,t){for(var i=this.parent.getPrimaryKeyFieldNames()[0],r=0;r<t.length;r++)if(t[r][i]===e[i])return r;return-1},r.prototype.onAggregates=function(e){e=e instanceof Array?e:[];var t=this.parent.getPrimaryKeyFieldNames()[0],r=[],n=!1,o={},s=!1;!this.parent.renderModule.data.isRemote()&&this.parent.allowFiltering&&this.parent.filterSettings.columns.length&&(s=!0);var l=this.parent.dataSource instanceof Array?s?this.parent.getFilteredRecords():this.parent.dataSource:this.parent.dataSource.dataSource.json.length?this.parent.dataSource.dataSource.json:this.parent.getCurrentViewRecords();if(this.parent.editModule&&(o=this.parent.editModule.getBatchChanges()),Object.keys(o).length){for(p=0;p<l.length;p++)n=!1,o.changedRecords.length&&this.getIndexByKey(l[p],o.changedRecords)>-1&&(n=!0,r.push(o.changedRecords[this.getIndexByKey(l[p],o.changedRecords)])),o.deletedRecords.length&&this.getIndexByKey(l[p],o.deletedRecords)>-1?n=!0:n||r.push(l[p]);if(o.addedRecords.length)for(p=0;p<o.addedRecords.length;p++)r.push(o.addedRecords[p])}else r=e.length?R(l).map(function(r){var n,o=i.DataUtil.getObject(t,r);return e.some(function(e){return n=e,o===i.DataUtil.getObject(t,e)})?n:r}):l;var a=e;a.type&&"cancel"===a.type&&(r=l);for(var h,d={},c=this.parent.aggregates,p=0;p<c.length;p++)for(var u=0;u<c[p].columns.length;u++){var g=c[p].columns[u].type.toString();h=U(g,r,c[p].columns[u],this.parent),d[c[p].columns[u].field+" - "+g.toLowerCase()]=h}return{result:r,count:r.length,aggregates:d}},r}(Yi),to=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),io=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=t.parent.createElement("TD",{className:"e-summarycell",attrs:{role:"gridcell",tabindex:"-1"}}),t}return to(i,e),i.prototype.getValue=function(e,i,r){var n=t.isNullOrUndefined(r.type)?r.columnName:r.field+" - "+("string"==typeof r.type?r.type.toLowerCase():"");return i[r.columnName]?i[r.columnName][n]:""},i.prototype.evaluate=function(e,i,r,n){var o=i.column;if(this.parent.on("refresh-aggregate-cell",this.refreshWithAggregate(e,i),this),!(o.footerTemplate||o.groupFooterTemplate||o.groupCaptionTemplate))return"Vertical"===this.parent.rowRenderingMode&&(e.style.display="none"),!0;"Vertical"===this.parent.rowRenderingMode&&e.classList.add("e-lastsummarycell");var s=o.getTemplate(i.cellType),l=this.parent.getColumnByField(r[o.columnName].field);if(!t.isNullOrUndefined(l)&&(r[o.columnName].headerText=l.headerText,l.isForeignColumn())){var a=l.columnData.filter(function(e){return e[l.foreignKeyField]===r[o.columnName].key})[0];a&&(r[o.columnName].foreignKey=a[l.foreignKeyValue])}if(this.parent.isReact&&(o.footerTemplate?"string"!=typeof o.footerTemplate:o.groupFooterTemplate?"string"!=typeof o.groupFooterTemplate:!!o.groupCaptionTemplate&&"string"!=typeof o.groupCaptionTemplate)){var h=r[o.columnName];if("groupCaptionTemplate"===s.property||"groupFooterTemplate"===s.property){h.groupKey=h.key}s.fn(h,this.parent,s.property,"",null,null,e),this.parent.renderTemplates()}else q(e,s.fn(r[o.columnName],this.parent,s.property,""));return!1},i.prototype.refreshWithAggregate=function(e,i){var r=this,n=i;return function(i){var o=n,s=o.column.columnName?o.column.columnName:null,l=t.isNullOrUndefined(s)?null:i.cells.filter(function(e){return e.column.columnName===s})[0];e.parentElement&&e.parentElement.getAttribute("data-uid")===i.dataUid&&s&&s===l.column.columnName&&r.refreshTD(e,l,i.data)}},i}($i),ro=function(){function i(e,t){this.parent=e,this.locator=t,this.addEventListener()}return i.prototype.getModuleName=function(){return"aggregate"},i.prototype.initiateRender=function(){for(var i=this,r=this.locator.getService("cellRendererFactory"),n=new io(this.parent,this.locator),o=[e.CellType.Summary,e.CellType.CaptionSummary,e.CellType.GroupSummary],s=0;s<o.length;s++)r.addCellRenderer(o[s],n);this.footerRenderer=new eo(this.parent,this.locator),this.footerRenderer.renderPanel(),this.footerRenderer.renderTable();var l=this.footerRenderer.getPanel();this.parent.element.scrollHeight>=this.parent.getHeight(this.parent.height)&&l&&t.addClass([l],["e-footerpadding"]),this.locator.register("footerRenderer",this.footerRenderer);var a=function(){i.prepareSummaryInfo(),i.parent.off(kt,a)};this.parent.on(kt,a,this),this.parent.on(kt,this.footerRenderer.refresh,this.footerRenderer)},i.prototype.prepareSummaryInfo=function(){var e=this;$e(this.parent.aggregates,function(i){var r=t.getValue("customFormat",i);if(t.isNullOrUndefined(r)||i.setPropertiesSilent({format:r}),"object"==typeof i.format){var n=new yt;i.setFormatter(n.getFormatFunction(t.extend({},i.format)))}else if("string"==typeof i.format){var o=e.locator.getService("valueFormatter");i.setFormatter(o.getFormatFunction({format:i.format}))}i.setPropertiesSilent({columnName:i.columnName||i.field})})},i.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()){t.isNullOrUndefined(this.footerRenderer)&&this.initiateRender(),this.prepareSummaryInfo(),this.footerRenderer.refresh();var i=new Qi(this.parent);0===new Ki(this.parent).getData().length&&i.isEmpty()||this.parent.notify(Lt,{})}},i.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Ot,this.initiateRender,this),this.parent.on(Bt,this.onPropertyChanged,this),this.parent.on("refresh-aggregates",this.refresh,this))},i.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.footerRenderer.removeEventListener(),this.parent.off(Ot,this.initiateRender),this.parent.off(kt,this.footerRenderer.refresh),this.parent.off(Bt,this.onPropertyChanged),this.parent.off("refresh-aggregates",this.refresh))},i.prototype.destroy=function(){this.removeEventListener(),t.remove(this.parent.element.querySelector("."+xi))},i.prototype.refresh=function(e){var t=e instanceof Array?e:[e];this.parent.notify("refresh-footer-rendered",t),this.parent.groupSettings.columns.length>0&&this.parent.notify("group-aggregates",t)},i}(),no=function(){function e(e,t,i){var r=this;this.fromWheel=!1,this.touchMove=!1,this.options={},this.sentinelInfo={up:{check:function(e,t){var i=e.top-r.containerRect.top;return t.entered=i>=0,i+r.options.pageHeight/2>=0},axis:"Y"},down:{check:function(e,t){var i=e.bottom;return t.entered=e.bottom<=r.containerRect.bottom,i-r.options.pageHeight/2<=r.options.pageHeight/2},axis:"Y"},right:{check:function(e,t){var i=e.right;return r.movableEle?(t.entered=i<r.movableContainerRect.right,i-r.movableContainerRect.width<=r.movableContainerRect.right):(t.entered=i<r.containerRect.right,i-r.containerRect.width<=r.containerRect.right)},axis:"X"},left:{check:function(e,t){var i=e.left;return t.entered=i>0,r.movableEle?i+r.movableContainerRect.width>=r.movableContainerRect.left:i+r.containerRect.width>=r.containerRect.left},axis:"X"}},this.element=e,this.options=t,this.movableEle=i}return e.prototype.observe=function(e,i){var r=this;this.containerRect=this.options.container.getBoundingClientRect(),t.EventHandler.add(this.options.container,"wheel",function(){return r.fromWheel=!0},this),t.EventHandler.add(this.options.container,"scroll",this.virtualScrollHandler(e,i),this),this.options.movableContainer&&(this.movableContainerRect=this.options.movableContainer.getBoundingClientRect(),t.EventHandler.add(this.options.scrollbar,"wheel",function(){return r.fromWheel=!0},this),t.EventHandler.add(this.options.scrollbar,"scroll",this.virtualScrollHandler(e,i),this))},e.prototype.check=function(e){var t=this.sentinelInfo[e];return!this.movableContainerRect||"left"!==e&&"right"!==e?t.check(this.element.getBoundingClientRect(),t):t.check(this.movableEle.getBoundingClientRect(),t)},e.prototype.virtualScrollHandler=function(e,i){var r=this,n="chrome"===t.Browser.info.name?200:100,o=t.debounce(e,n),s=t.debounce(e,50);return this.options.prevTop=this.options.prevLeft=0,function(e){var t=r.options.movableContainer?r.options.container.scrollTop:e.target.scrollTop,n=r.options.movableContainer?r.options.scrollbar.scrollLeft:e.target.scrollLeft,l=r.options.prevTop<t?"down":"up";l=r.options.prevLeft===n?l:r.options.prevLeft<n?"right":"left",r.options.prevTop=t,r.options.prevLeft=n;var a=r.sentinelInfo[l];if(-1!==r.options.axes.indexOf(a.axis)){var h=r.check(l);if(a.entered&&(!r.movableEle||"right"!==l&&"left"!==l?i(r.element,a,l,{top:t,left:n},r.fromWheel,h):i(r.movableEle,a,l,{top:t,left:n},r.fromWheel,h)),h){var d=o;"X"===a.axis&&(d=s),d({direction:l,sentinel:a,offset:{top:t,left:n},focusElement:document.activeElement})}r.fromWheel=!1}}},e.prototype.setPageHeight=function(e){this.options.pageHeight=e},e}(),oo=function(){function e(e){this.cOffsets={},this.cache={},this.movableCache={},this.frozenRightCache={},this.rowCache={},this.data={},this.groups={},this.currentInfo={},this.parent=e,this.model=this.parent.pageSettings,this.rowModelGenerator=this.parent.allowGrouping?new Ji(this.parent):new Gi(this.parent)}return e.prototype.generateRows=function(e,i){var r=this.parent.isFrozenGrid(),n=!1,o=i.virtualInfo=i.virtualInfo||this.getData(),s=o.sentinelInfo&&"X"===o.sentinelInfo.axis,l=s||!o.loadNext||o.loadSelf?o.page:o.nextInfo.page,a=[],h=this.getBlockIndexes(l),d=[];if(this.currentInfo.blockIndexes&&(h=o.blockIndexes=i.virtualInfo.blockIndexes=this.includePrevPage?this.currentInfo.blockIndexes.slice(1):this.currentInfo.blockIndexes.slice(0,this.currentInfo.blockIndexes.length-1),n=!0),(r&&this.parent.getFrozenMode()!==Pi&&!i.renderMovableContent||this.parent.getFrozenMode()===Pi&&!i.renderMovableContent&&!i.renderFrozenRightContent||!r)&&this.checkAndResetCache(i.requestType),ce(this.parent)&&this.parent.vcRows.length)return a=this.parent.vcRows;if(this.parent.enableColumnVirtualization)for(p=0;p<o.blockIndexes.length;p++)this.isBlockAvailable(o.blockIndexes[p])&&(this.cache[o.blockIndexes[p]]=this.rowModelGenerator.refreshRows(this.cache[o.blockIndexes[p]])),(i.renderMovableContent&&this.isMovableBlockAvailable(o.blockIndexes[p])||i.renderFrozenRightContent&&this.isFrozenRightBlockAvailable(o.blockIndexes[p]))&&((f=i.renderMovableContent?this.movableCache:this.frozenRightCache)[o.blockIndexes[p]]=this.rowModelGenerator.refreshRows(f[o.blockIndexes[p]]));for(var c=o.blockIndexes,p=0;p<c.length;p++){if(!this.isBlockAvailable(c[p])){var u=t.isNullOrUndefined(this.startIndex)?this.getStartIndex(c[p],e):this.startIndex,g=this.rowModelGenerator.generateRows(e,{virtualInfo:o,startIndex:u});ce(this.parent)&&!this.parent.vcRows.length&&(this.parent.vRows=g,this.parent.vcRows=g,this.parent.notify("refresh-virtual-max-page",{}));m=void 0;ce(this.parent)?(m=this.model.pageSize/2,this.isBlockAvailable(h[0])||(this.cache[h[0]]=g.slice(0,m)),this.isBlockAvailable(h[1])||(this.cache[h[1]]=g.slice(m,this.model.pageSize))):n?this.setBlockForManualRefresh(this.cache,h,g):(m=~~Math.max(g.length,this.model.pageSize)/2,this.isBlockAvailable(h[0])||(this.cache[h[0]]=g.slice(0,m)),this.isBlockAvailable(h[1])||(this.cache[h[1]]=g.slice(m)))}if(this.parent.groupSettings.columns.length&&!s&&this.cache[c[p]]&&(this.cache[c[p]]=this.updateGroupRow(this.cache[c[p]],c[p])),i.renderMovableContent&&!this.isMovableBlockAvailable(c[p])||i.renderFrozenRightContent&&!this.isFrozenRightBlockAvailable(c[p])){var f=i.renderMovableContent?this.movableCache:this.frozenRightCache,u=t.isNullOrUndefined(this.startIndex)?this.getStartIndex(c[p],e):this.startIndex,g=this.rowModelGenerator.generateRows(e,{virtualInfo:o,startIndex:u});if(n)this.setBlockForManualRefresh(f,h,g);else{var m=~~Math.max(g.length,this.model.pageSize)/2;(i.renderFrozenRightContent&&!this.isFrozenRightBlockAvailable(h[0])||i.renderMovableContent&&!this.isMovableBlockAvailable(h[0]))&&(f[h[0]]=g.slice(0,m)),(i.renderFrozenRightContent&&!this.isFrozenRightBlockAvailable(h[1])||i.renderMovableContent&&!this.isMovableBlockAvailable(h[1]))&&(f[h[1]]=g.slice(m))}}i.renderMovableContent||i.renderFrozenRightContent||!this.cache[c[p]]?(f=i.renderMovableContent?this.movableCache:this.frozenRightCache)[c[p]]&&a.push.apply(a,f[c[p]]):a.push.apply(a,this.cache[c[p]]),this.isBlockAvailable(c[p])&&d.push(c[p])}o.blockIndexes=d;return this.parent.allowGrouping&&this.parent.groupSettings.columns.length?this.parent.currentViewData.records=a.map(function(e){return e.data}):r?(i.renderMovableContent&&("Left"===this.parent.getFrozenMode()||"Right"===this.parent.getFrozenMode()||this.parent.getFrozenColumns())||i.renderFrozenRightContent)&&(this.parent.currentViewData=a.map(function(e){return e.data})):this.parent.currentViewData=a.map(function(e){return e.data}),a},e.prototype.setBlockForManualRefresh=function(e,t,i){var r=this.model.pageSize/2;this.includePrevPage?(e[t[0]-1]=i.slice(0,r),e[t[0]]=i.slice(r,2*r),e[t[1]]=i.slice(2*r,3*r),e[t[2]]=i.slice(3*r,4*r)):(e[t[0]]=i.slice(0,r),e[t[1]]=i.slice(r,2*r),e[t[2]]=i.slice(2*r,3*r),e[t[2]+1]=i.slice(3*r,4*r))},e.prototype.getBlockIndexes=function(e){return[e+(e-1),2*e]},e.prototype.getPage=function(e){return e%2==0?e/2:(e+1)/2},e.prototype.isBlockAvailable=function(e){return e in this.cache},e.prototype.isMovableBlockAvailable=function(e){return e in this.movableCache},e.prototype.isFrozenRightBlockAvailable=function(e){return e in this.frozenRightCache},e.prototype.getData=function(){return{page:this.model.currentPage,blockIndexes:this.getBlockIndexes(this.model.currentPage),direction:"down",columnIndexes:this.parent.getColumnIndexesInView()}},e.prototype.getStartIndex=function(e,t,i){void 0===i&&(i=!0);var r=e%2==0,n=(this.getPage(e)-1)*this.model.pageSize;return i||!r?n:n+~~(this.model.pageSize/2)},e.prototype.getColumnIndexes=function(e){var i=this;void 0===e&&(e=this.parent.getHeaderContent().querySelector("."+Fi)),this.parent.isFrozenGrid()&&(e=e.querySelector("."+Ii));var r=[],n=0|e.scrollLeft,o=Object.keys(this.cOffsets),s=e.getBoundingClientRect().width;n=Math.min(this.cOffsets[o.length-1]-s,n);var l=t.Browser.isDevice?2*s:s/2,a=n+s+(0===n?l:0);return o.some(function(e){var t=Number(e),o=i.cOffsets[e];return n-l<=o&&a+l>=o&&r.push(t),a+l<o}),this.addFrozenIndex(r),r},e.prototype.addFrozenIndex=function(e){if(this.parent.getFrozenColumns()&&this.parent.enableColumnVirtualization&&0===e[0])for(var t=0;t<this.parent.getFrozenColumns();t++)e.push(e[e.length-1]+1)},e.prototype.checkAndResetCache=function(e){var t=["paging","refresh","sorting","filtering","searching","grouping","ungrouping","reorder","save","delete"];this.parent.getFrozenColumns()&&this.parent.frozenRows&&this.parent.enableColumnVirtualization&&"reorder"===e&&t.splice(t.indexOf(e),1);var i=t.some(function(t){return e===t});return i&&(this.cache={},this.data={},this.groups={},this.movableCache={},this.frozenRightCache={}),i},e.prototype.refreshColOffsets=function(){var e=this,t=0;this.cOffsets={};for(var i=this.parent.groupSettings.columns.length,r=this.parent.columns,n=r.length,o=this.parent.groupSettings.columns,s=0;s<o.length;s++)this.cOffsets[s]=30+(0|this.cOffsets[s-1]);for(var l=Array.apply(null,Array(n)).map(function(){return t++}),a=0;a<l.length;a++)l[a]=l[a]+i,this.cOffsets[l[a]]=(0|this.cOffsets[l[a]-1])+(function(t){return t.visible&&(e.parent.groupSettings.showGroupedColumn?t.visible:e.parent.groupSettings.columns.indexOf(t.field)<0)}(r[a])?parseInt(r[a].width,10):0)},e.prototype.updateGroupRow=function(e,t){for(var i=e[0],r=[],n=Object.keys(this.cache),o=0;o<n.length;o++)Number(n[o])<t&&(r=r.concat(this.cache[n[o]]));return i&&i.isDataRow||t%2==0?e:this.iterateGroup(e,r)},e.prototype.iterateGroup=function(e,t){var i=e[0],r=0;return i&&i.isDataRow?e:(e.some(function(e){return t.some(function(t,i){var n=t&&void 0!==t.data.field&&t.data.field===e.data.field&&t.data.key===e.data.key;return n&&(r=i),n})})&&(e.shift(),e=this.iterateGroup(e,t.slice(r))),e)},e.prototype.getRows=function(){for(var e=[],t=Object.keys(this.cache),i=0;i<t.length;i++)e=e.concat(this.cache[t[i]]);return e},e.prototype.generateCells=function(){for(var e=[],t=this.parent.columnModel,i=0;i<t.length;i++)e.push(this.rowModelGenerator.generateCell(t[i]));return e},e}(),so=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lo=function(r){function n(e,t){var i=r.call(this,e,t)||this;return i.prevHeight=0,i.startIndex=0,i.preStartIndex=0,i.preventEvent=!1,i.actions=["filtering","searching","grouping","ungrouping"],i.offsets={},i.tmpOffsets={},i.virtualEle=new ho,i.offsetKeys=[],i.isFocused=!1,i.isSelection=!1,i.isBottom=!1,i.rndrCount=0,i.empty=void 0,i.isCancel=!1,i.requestTypes=["beginEdit","cancel","delete","add","save"],i.isNormaledit="Normal"===i.parent.editSettings.mode,i.virtualData={},i.emptyRowData={},i.vfColIndex=[],i.frzIdx=1,i.isContextMenuOpen=!1,i.isSelectionScroll=!1,i.validationCheck=!1,i.locator=t,i.eventListener("on"),i.parent.on(Wt,i.setVisible,i),i.vgenerator=i.generator,i}return so(n,r),n.prototype.renderTable=function(){this.header=this.locator.getService("rendererFactory").getRenderer(e.RenderType.Header),r.prototype.renderTable.call(this),this.virtualEle.table=this.getTable(),this.virtualEle.content=this.content=this.getPanel().querySelector("."+Di),this.virtualEle.renderWrapper(this.parent.height),this.virtualEle.renderPlaceHolder(),this.virtualEle.wrapper.style.position="absolute";var t=this.parent.dataSource instanceof i.DataManager&&!this.parent.dataSource.dataSource.offline,n={container:this.content,pageHeight:2*this.getBlockHeight(),debounceEvent:t,axes:this.parent.enableColumnVirtualization?["X","Y"]:["Y"]};this.observer=new no(this.virtualEle.wrapper,n)},n.prototype.renderEmpty=function(e){this.getTable().appendChild(e),this.virtualEle.adjustTable(0,0)},n.prototype.getReorderedFrozenRows=function(e){var t=e.virtualInfo.blockIndexes,i=e.virtualInfo.columnIndexes,r=e.virtualInfo.page;e.virtualInfo.blockIndexes=[1,2],e.virtualInfo.page=1,e.renderMovableContent||(e.virtualInfo.columnIndexes=[]);var n=this.parent.getCurrentViewRecords().length,o=this.parent.renderModule.data.dataManager.dataSource.json.slice(0,n),s=this.vgenerator.generateRows(o,e);return e.virtualInfo.blockIndexes=t,e.virtualInfo.columnIndexes=i,e.virtualInfo.page=r,s.splice(0,this.parent.frozenRows)},n.prototype.scrollListener=function(e){if(this.scrollAfterEdit(),this.parent.enablePersistence&&(this.parent.scrollPosition=e.offset),this.preventEvent||this.parent.isDestroyed)return void(this.preventEvent=!1);t.isNullOrUndefined(document.activeElement)?this.isFocused=!1:this.isFocused=this.content===t.closest(document.activeElement,"."+Di)||this.content===document.activeElement;var i=e.sentinel,r=this.currentInfo=this.getInfoFromView(e.direction,i,e.offset);return ce(this.parent)?"Y"===i.axis&&r.blockIndexes&&this.prevInfo.blockIndexes.toString()===r.blockIndexes.toString()&&"up"===e.direction&&2!==r.blockIndexes[r.blockIndexes.length-1]?void 0:(r.event="refresh-virtual-block",t.isNullOrUndefined(r.offsets)||(r.offsets.top=this.content.scrollTop),void this.parent.notify(r.event,{requestType:"virtualscroll",virtualInfo:r,focusElement:e.focusElement})):this.prevInfo&&("Y"===i.axis&&this.prevInfo.blockIndexes.toString()===r.blockIndexes.toString()||"X"===i.axis&&this.prevInfo.columnIndexes.toString()===r.columnIndexes.toString())?(t.Browser.isIE&&this.parent.hideSpinner(),this.requestType="virtualscroll"===this.requestType?this.empty:this.requestType,void("Y"===i.axis&&this.restoreEdit())):(this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization?r.columnIndexes:[]),this.parent.pageSettings.currentPage=r.loadNext&&!r.loadSelf?r.nextInfo.page:r.page,this.requestType="virtualscroll",void this.parent.notify(r.event,{requestType:"virtualscroll",virtualInfo:r,focusElement:e.focusElement}))},n.prototype.block=function(e){return this.vgenerator.isBlockAvailable(e)},n.prototype.getInfoFromView=function(e,t,i){var r=!1,n=[],o={direction:e,sentinelInfo:t,offsets:i,startIndex:this.preStartIndex,endIndex:this.preEndIndex};o.page=this.getPageFromTop(i.top,o),o.blockIndexes=n=this.vgenerator.getBlockIndexes(o.page),o.loadSelf=!this.vgenerator.isBlockAvailable(n[o.block]);var s=this.ensureBlocks(o);if("upArrow"===this.activeKey&&o.blockIndexes.toString()!==s.toString()){var l=s[s.length-1];-1===o.blockIndexes.indexOf(l)&&(r=!0)}if(o.blockIndexes=s,o.loadNext=!s.filter(function(e){return-1===n.indexOf(e)}).every(this.block.bind(this)),o.event=o.loadNext||o.loadSelf?Lt:$t,o.nextInfo=o.loadNext?{page:Math.max(1,o.page+("down"===e?1:-1))}:{},r&&(o.blockIndexes=[o.blockIndexes[0]-1,o.blockIndexes[0],o.blockIndexes[0]+1]),"downArrow"===this.activeKey){var a=Math.ceil(this.rowIndex/this.getBlockSize());1!==a&&(o.blockIndexes[1]!==a||o.blockIndexes.length<3)&&(o.blockIndexes=[a-1,a,a+1])}return o.columnIndexes="X"===t.axis?this.vgenerator.getColumnIndexes():this.parent.getColumnIndexesInView(),this.parent.enableColumnVirtualization&&"X"===t.axis&&(o.event=$t),o},n.prototype.setKeyboardNavIndex=function(){this.blazorDataLoad=!0,"downArrow"!==this.activeKey&&"upArrow"!==this.activeKey||(this.blzRowIndex="downArrow"===this.activeKey?this.rowIndex+1:this.rowIndex-1,document.activeElement.blur())},n.prototype.ensureBlocks=function(e){var t,i=this,r=e.blockIndexes[e.block],n=r,o=Math.max,s="down"===e.direction?[o(r,1),++r,++r]:[o(r-1,1),r,r+1];return this.parent.enableColumnVirtualization&&this.parent.isFrozenGrid()&&("X"===e.sentinelInfo.axis||"Y"===e.sentinelInfo.axis&&e.page===this.prevInfo.page)&&(s=this.prevInfo.blockIndexes),s=s.filter(function(e,t){return s.indexOf(e)===t}),this.prevInfo.blockIndexes.toString()===s.toString()?s:((e.loadSelf||"down"===e.direction&&this.isEndBlock(n))&&(s=this.vgenerator.getBlockIndexes(e.page)),s.some(function(e,r){var n=e===(ce(i.parent)?i.getGroupedTotalBlocks():i.getTotalBlocks());return n&&(t=r),n}),void 0!==t&&(s=s.slice(0,t+1),0===e.block&&1===s.length&&this.vgenerator.isBlockAvailable(s[0]-1)&&(s=[s[0]-1,s[0]])),s)},n.prototype.appendContent=function(e,i,r){var n=this,o=this.parent.isFrozenGrid(),s=this.parent.getFrozenColumns()||this.parent.getFrozenLeftColumnsCount(),l=this.parent.enableColumnVirtualization&&o;this.checkFirstBlockColIndexes(r);var a=r.virtualInfo.sentinelInfo&&"Y"===r.virtualInfo.sentinelInfo.axis&&this.currentInfo.page&&this.currentInfo.page!==r.virtualInfo.page?this.currentInfo:r.virtualInfo;this.prevInfo=this.prevInfo||r.virtualInfo;var h=a.columnIndexes[0]-1;l&&a.columnIndexes[0]===s&&(h=a.columnIndexes[0]-s-1);var d,c=this.getColumnOffset(h),p=a.blockIndexes;this.parent.groupSettings.columns.length&&this.refreshOffsets(),"100%"===this.parent.height&&(this.parent.element.style.height="100%");var u=this.parent.height.toString().indexOf("%")<0?this.content.getBoundingClientRect().height:this.parent.element.getBoundingClientRect().height;if(!this.requestTypes.some(function(e){return e===n.requestType})){var g=this.getTranslateY(this.content.scrollTop,u,a);this.virtualEle.adjustTable(l?0:c,g),l&&this.virtualEle.adjustMovableTable(c,0)}if(this.parent.enableColumnVirtualization&&(this.header.virtualEle.adjustTable(l?0:c,0),l&&this.header.virtualEle.adjustMovableTable(c,0)),this.parent.enableColumnVirtualization){var f=a.columnIndexes;d=this.getColumnOffset(f[f.length-1])-this.getColumnOffset(f[0]-1)+"",l?this.header.virtualEle.setMovableWrapperWidth(d):this.header.virtualEle.setWrapperWidth(d)}l?this.virtualEle.setMovableWrapperWidth(d,t.Browser.isIE||"edge"===t.Browser.info.name):this.virtualEle.setWrapperWidth(d,t.Browser.isIE||"edge"===t.Browser.info.name),t.isNullOrUndefined(e.parentNode)||t.remove(e);var m;if(o?r.renderFrozenRightContent?m=this.parent.getContent().querySelector(".e-frozen-right-content").querySelector(Ui):r.renderMovableContent?r.renderMovableContent&&(m=this.parent.getMovableVirtualContent().querySelector(Ui)):m=this.parent.getFrozenVirtualContent().querySelector(Ui):m=this.parent.element.querySelector("."+Di).querySelector(Ui),m&&(t.remove(m),e=null),this.parent.isReact&&!t.isNullOrUndefined(this.parent.rowTemplate)?e=i:(e=this.parent.createElement(Ui)).appendChild(i),this.parent.frozenRows&&"virtualscroll"===r.requestType&&1===this.parent.pageSettings.currentPage)for(var y=0;y<this.parent.frozenRows;y++)e.children[0].remove();if(o?(r.renderFrozenRightContent?(this.parent.getContent().querySelector(".e-frozen-right-content").querySelector("."+Mi).appendChild(e),this.requestType="virtualscroll"===this.requestType?this.empty:this.requestType):r.renderMovableContent?r.renderMovableContent&&(this.parent.getMovableVirtualContent().querySelector("."+Mi).appendChild(e),this.parent.getFrozenMode()!==Pi&&(this.requestType="virtualscroll"===this.requestType?this.empty:this.requestType)):this.parent.getFrozenVirtualContent().querySelector("."+Mi).appendChild(e),this.vfColIndex.length&&(r.virtualInfo.columnIndexes=a.columnIndexes=t.extend([],this.vfColIndex),this.vfColIndex=r.renderMovableContent?[]:this.vfColIndex)):(this.getTable().appendChild(e),this.requestType="virtualscroll"===this.requestType?this.empty:this.requestType),this.parent.groupSettings.columns.length){if(!ce(this.parent)&&"up"===a.direction){var v=this.offsets[this.getTotalBlocks()]-this.prevHeight;this.preventEvent=!0;var C=this.content.scrollTop;this.content.scrollTop=C+v}this.setVirtualHeight(),this.observer.setPageHeight(this.getOffset(p[p.length-1])-this.getOffset(p[0]-1))}this.prevInfo=a,this.isFocused&&"downArrow"!==this.activeKey&&"upArrow"!==this.activeKey&&this.content.focus();var w=Math.ceil(this.getTotalBlocks()/2);if(this.isBottom&&(this.isBottom=!1,this.parent.getContent().firstElementChild.scrollTop=this.offsets[this.offsetKeys.length-1]),this.parent.pageSettings.currentPage===w&&1===p.length&&(this.isBottom=!0,this.parent.getContent().firstElementChild.scrollTop=this.offsets[this.offsetKeys.length-2]),"virtualscroll"===r.requestType&&"X"===r.virtualInfo.sentinelInfo.axis&&this.parent.notify(ei,{}),this.focusCell(r),this.restoreEdit(r),this.restoreAdd(r),this.ensureSelectedRowPosition(),this.validationScrollLeft(r,o),!this.initialRowTop){var b=this.parent.element.getBoundingClientRect().top;this.initialRowTop=this.parent.getRowByIndex(0).getBoundingClientRect().top-b}var S=r.tableName,R="Left-Right"===this.parent.getFrozenMode()?"frozen-right"===S:"movable"===S;o&&!R||(this.vgenerator.startIndex=null,this.vgenerator.currentInfo={},this.vgenerator.includePrevPage=null)},n.prototype.validationScrollLeft=function(e,t){var i=this.parent.getFrozenColumns(),r=this.parent.getFrozenMode(),n=!t||e&&(i||"Left"===r||"Right"===r?e.renderMovableContent:e.renderFrozenRightContent);if(this.validationCheck&&n)if(this.validationCol){var o=this.vgenerator.cOffsets[this.validationCol.index-this.parent.getVisibleFrozenColumns()-1];this.validationCol=null,this.parent.isFrozenGrid()?this.movableContent.scrollLeft=o:this.content.scrollLeft=o}else this.validationCheck=!1,this.parent.editModule.editFormValidate()},n.prototype.ensureSelectedRowPosition=function(){if(!this.isSelection&&this.isSelectionScroll&&!t.isNullOrUndefined(this.selectRowIndex)){this.isSelectionScroll=!1;var e=this.parent.getRowByIndex(this.selectRowIndex);e&&!this.isRowInView(e)&&this.rowSelected({rowIndex:this.selectRowIndex,row:e},!0)}},n.prototype.checkFirstBlockColIndexes=function(e){if(this.parent.enableColumnVirtualization&&this.parent.isFrozenGrid()&&0===e.virtualInfo.columnIndexes[0]){var i=[],r=this.parent.getFrozenColumns()||this.parent.getFrozenLeftColumnsCount();if(!e.renderMovableContent&&e.virtualInfo.columnIndexes.length>r){this.vfColIndex=e.virtualInfo.columnIndexes;for(var n=0;n<r;n++)i.push(n);e.virtualInfo.columnIndexes=i}else e.renderMovableContent&&(this.vfColIndex.length||(this.vfColIndex=t.extend([],e.virtualInfo.columnIndexes)),e.virtualInfo.columnIndexes=t.extend([],this.vfColIndex),e.virtualInfo.columnIndexes.splice(0,r))}},n.prototype.focusCell=function(e){if("upArrow"===this.activeKey||"downArrow"===this.activeKey){var t=this.parent.getRowByIndex(this.rowIndex);t.cells[this.cellIndex].focus({preventScroll:!0}),this.parent.selectRow(parseInt(t.getAttribute(Hi),10)),this.activeKey=this.empty}},n.prototype.restoreEdit=function(e){if(this.isNormaledit){var i=this.parent.getFrozenColumns(),r=e&&this.parent.isFrozenGrid(),n=this.parent.getFrozenMode(),o=e&&(i||"Left"===n||"Right"===n?e.renderMovableContent:e.renderFrozenRightContent);if((!r||r&&o)&&this.parent.editSettings.allowEditing&&this.parent.editModule&&!t.isNullOrUndefined(this.editedRowIndex)){var s=this.getRowByIndex(this.editedRowIndex),l=this.content,a=Object.keys(this.virtualData),h=e&&e.virtualInfo&&"X"===e.virtualInfo.sentinelInfo.axis;if(r&&h&&(s=this.parent.getMovableRowByIndex(this.editedRowIndex),l=this.movableContent),a.length&&s&&!l.querySelector("."+Ai)){var d=s.getBoundingClientRect().top;(h||d<this.content.offsetHeight&&d>this.parent.getRowHeight())&&(this.parent.isEdit=!1,this.parent.editModule.startEdit(s))}if(s&&this.content.querySelector("."+Ai)&&!a.length){var c=t.extend({},this.getRowObjectByIndex(this.editedRowIndex));this.virtualData=this.getVirtualEditedData(c)}}this.restoreAdd(e)}},n.prototype.getVirtualEditedData=function(e){var t=[].slice.call(this.parent.element.getElementsByClassName("e-gridform"));if(!(this.parent.editModule&&this.parent.editModule.formObj&&this.parent.editModule.formObj.isDestroyed))for(var i=0;i<t.length;i++)e=this.parent.editModule.getCurrentEditedData(t[i],e);return e},n.prototype.restoreAdd=function(e){var t=this.parent.getFrozenColumns(),i=e&&this.parent.isFrozenGrid(),r=this.parent.getFrozenMode(),n=e&&e.virtualInfo&&e.virtualInfo.sentinelInfo&&"X"===e.virtualInfo.sentinelInfo.axis&&i?!(this.parent.getMovableVirtualHeader().querySelector("."+Bi)||this.parent.getMovableVirtualContent().querySelector("."+Bi)):!this.parent.element.querySelector("."+Bi),o=e&&(t||"Left"===r||"Right"===r?e.renderMovableContent:e.renderFrozenRightContent);if((!i||i&&o)&&this.isNormaledit&&this.isAdd&&n){var s="Top"===this.parent.editSettings.newRowPosition&&this.content.scrollTop<this.parent.getRowHeight(),l="Bottom"===this.parent.editSettings.newRowPosition&&this.parent.pageSettings.currentPage===this.maxPage;(s||l)&&(this.parent.isEdit=!1,this.parent.addRecord())}},n.prototype.onDataReady=function(e){t.isNullOrUndefined(e.count)||(this.count=e.count,this.maxPage=Math.ceil(e.count/this.parent.pageSettings.pageSize)),this.vgenerator.checkAndResetCache(e.requestType),["refresh","filtering","searching","grouping","ungrouping","reorder",void 0].some(function(t){return e.requestType===t})&&this.refreshOffsets(),this.setVirtualHeight(),this.resetScrollPosition(e.requestType)},n.prototype.setVirtualHeight=function(e){var t=this.parent.enableColumnVirtualization?this.getColumnOffset(this.parent.columns.length+this.parent.groupSettings.columns.length-1)+"px":"100%";if(this.parent.isFrozenGrid()){var i=1===this.parent.pageSettings.currentPage&&Object.keys(this.offsets).length<=2?this.offsets[1]:this.offsets[this.getTotalBlocks()-2];i=i>this.content.clientHeight?i:0,this.virtualEle.setVirtualHeight(i,t)}else{var r=this.offsets[ce(this.parent)?this.getGroupedTotalBlocks():this.getTotalBlocks()];this.virtualEle.setVirtualHeight(r,t)}this.parent.enableColumnVirtualization&&(this.header.virtualEle.setVirtualHeight(1,t),this.parent.isFrozenGrid()&&(this.virtualEle.setMovableVirtualHeight(1,t),this.header.virtualEle.setMovableVirtualHeight(1,t)))},n.prototype.getPageFromTop=function(e,t){var i=this,r=ce(this.parent)?this.getGroupedTotalBlocks():this.getTotalBlocks(),n=0;return this.offsetKeys.some(function(o){var s=Number(o),l=e<=i.offsets[o]||s===r&&e>i.offsets[o];return l&&(i.offsetKeys.length%2!=0&&s.toString()===i.offsetKeys[i.offsetKeys.length-2]&&e<=i.offsets[i.offsetKeys.length-1]&&(s+=1),t.block=s%2==0?1:0,n=Math.max(1,Math.min(i.vgenerator.getPage(s),i.maxPage))),l}),n},n.prototype.getTranslateY=function(e,t,i,r){void 0===i&&((i={page:this.getPageFromTop(e,{})}).blockIndexes=this.vgenerator.getBlockIndexes(i.page));var n=(i.blockIndexes[0]||1)-1,o=this.getOffset(n),s=this.getOffset(i.blockIndexes[i.blockIndexes.length-1]);r&&(i=this.prevInfo);var l=o>e?this.getOffset(n-1):s<e+t?this.getOffset(n+1):o,a=this.offsets[i.blockIndexes[i.blockIndexes.length-1]]-this.tmpOffsets[i.blockIndexes[0]],h=ce(this.parent)?this.getGroupedTotalBlocks():this.getTotalBlocks();return l+a>this.offsets[h]&&(l-=l+a-this.offsets[h]),l},n.prototype.getOffset=function(e){return Math.min(0|this.offsets[e],0|this.offsets[this.maxBlock])},n.prototype.onEntered=function(){var e=this;return function(i,r,n,o,s,l){t.Browser.isIE&&!s&&l&&!e.preventEvent&&e.parent.showSpinner();var a=e.parent.enableColumnVirtualization&&e.parent.isFrozenGrid(),h="X"===r.axis,d=e.prevInfo.offsets?e.prevInfo.offsets.top:null,c=e.content.getBoundingClientRect().height,p=e.getColumnOffset(h?e.vgenerator.getColumnIndexes()[0]-1:e.prevInfo.columnIndexes[0]-1);if(h&&!a){var u=Object.keys(e.vgenerator.cOffsets).length-e.prevInfo.columnIndexes.length,g=e.vgenerator.cOffsets[u-1];p=p>g?g:p}var f=e.getTranslateY(o.top,c,h&&d===o.top?e.prevInfo:void 0,!0);e.virtualEle.adjustTable(a?0:p,Math.min(f,e.offsets[e.maxBlock])),a&&e.virtualEle.adjustMovableTable(p,0),e.parent.enableColumnVirtualization&&(e.header.virtualEle.adjustTable(a?0:p,0),a&&e.header.virtualEle.adjustMovableTable(p,0))}},n.prototype.dataBound=function(){this.parent.notify("refresh-virtual-frozen-height",{}),this.isSelection&&"upArrow"!==this.activeKey&&"downArrow"!==this.activeKey?this.parent.selectRow(this.selectedRowIndex):this.activeKey=this.empty},n.prototype.rowSelected=function(e,t){if((this.isSelection||t)&&!this.isLastBlockRow(e.rowIndex)){var i=be(this.content.firstElementChild),r=this.parent.element.getBoundingClientRect().top,n=e.row.getBoundingClientRect().top-r,o=this.content.getBoundingClientRect().height,s=o<n,l=s?n-o:this.initialRowTop-n,a=s?i.height-l:i.height+l;this.virtualEle.adjustTable(i.width,a),this.content.querySelector("tbody").lastElementChild.getBoundingClientRect().top-r<o&&(a+=o-(e.row.getBoundingClientRect().top-r),this.virtualEle.adjustTable(i.width,a-this.parent.getRowHeight()/2))}this.isSelection=!1},n.prototype.isLastBlockRow=function(e){var t=this.parent.getContent().firstElementChild,i=Math.floor(t.offsetHeight/this.parent.getRowHeight())-1;return e>=this.maxPage*this.parent.pageSettings.pageSize-i},n.prototype.refreshMaxPage=function(){this.parent.groupSettings.columns.length&&this.parent.vcRows.length&&(this.maxPage=Math.ceil(this.parent.vcRows.length/this.parent.pageSettings.pageSize))},n.prototype.setVirtualPageQuery=function(e){var i=this.parent.getContent().querySelector(".e-row");if(i&&this.parent.isManualRefresh&&this.currentInfo.blockIndexes&&3===this.currentInfo.blockIndexes.length){this.vgenerator.startIndex=parseInt(i.getAttribute("aria-rowindex"),10),this.vgenerator.currentInfo=t.extend({},this.currentInfo),this.vgenerator.currentInfo.blockIndexes=this.currentInfo.blockIndexes.slice(),(this.vgenerator.includePrevPage=this.currentInfo.blockIndexes[0]%2==0)?(this.vgenerator.startIndex=this.vgenerator.startIndex-this.getBlockSize(),this.vgenerator.currentInfo.blockIndexes.unshift(this.currentInfo.blockIndexes[0]-1)):this.vgenerator.currentInfo.blockIndexes.push(this.currentInfo.blockIndexes[this.currentInfo.blockIndexes.length-1]+1);var r=(this.vgenerator.currentInfo.blockIndexes[0]-1)*this.getBlockSize(),n=this.vgenerator.currentInfo.blockIndexes.length*this.getBlockSize();e.query.skip(r),e.query.take(n),e.skipPage=!0}},n.prototype.eventListener=function(e){var t=this;this.parent[e](kt,this.onDataReady,this),this.parent.addEventListener(Rt,this.dataBound.bind(this)),this.parent.addEventListener(bt,this.actionBegin.bind(this)),this.parent.addEventListener(St,this.actionComplete.bind(this)),this.parent.addEventListener("rowSelected",this.rowSelected.bind(this)),this.parent[e]($t,this.refreshContentRows,this),this.parent[e]("select-virtual-Row",this.selectVirtualRow,this),this.parent[e]("virtaul-cell-focus",this.virtualCellFocus,this),this.parent[e]("virtual-scroll-edit-action-begin",this.editActionBegin,this),this.parent[e]("virtual-scroll-add-action-begin",this.addActionBegin,this),this.parent[e]("virtual-scroll-edit",this.restoreEdit,this),this.parent[e]("virtual-scroll-edit-success",this.editSuccess,this),this.parent[e]("refresh-virtual-cache",this.refreshCache,this),this.parent[e]("edit-reset",this.resetIsedit,this),this.parent[e](pi,this.getVirtualData,this),this.parent[e]("virtual-scroll-edit-cancel",this.editCancel,this),this.parent[e]("refresh-virtual-max-page",this.refreshMaxPage,this),this.parent[e]("set-virtual-page-query",this.setVirtualPageQuery,this),this.parent[e]("select-row-on-context-open",this.selectRowOnContextOpen,this),this.parent[e]("reset-virtual-focus",this.resetVirtualFocus,this),this.parent[e]("refresh-virtual-editform-cells",this.refreshCells,this),this.parent[e]("scroll-to-edit",this.scrollToEdit,this);for(var i=this.actions,r=0;r<i.length;r++)this.parent[e](i[r]+"-begin",this.onActionBegin,this);var n=function(){t.observer.observe(function(e){return t.scrollListener(e)},t.onEntered());var e=t.parent;if(e.enablePersistence&&e.scrollPosition){t.content.scrollTop=e.scrollPosition.top;var i={direction:"down",sentinel:t.observer.sentinelInfo.down,offset:e.scrollPosition,focusElement:e.element};t.scrollListener(i),e.enableColumnVirtualization&&(t.content.scrollLeft=e.scrollPosition.left)}t.parent.off(At,n)};this.parent.on(At,n,this)},n.prototype.scrollToEdit=function(e){var i=this.parent.isFrozenGrid(),r=!0;if(this.validationCheck=!0,this.isAdd&&this.content.scrollTop>0){r=!1;var n=Object.keys(this.offsets);this.content.scrollTop="Top"===this.parent.editSettings.newRowPosition?0:this.offsets[n.length-1]}var o=this.parent.getRowByIndex(this.editedRowIndex);if(!(o||t.isNullOrUndefined(this.editedRowIndex)||o&&this.isRowInView(o))){var s=this.parent.getRowHeight(),l=this.editedRowIndex*s;t.isNullOrUndefined(l)||(r=!1,this.content.scrollTop=l)}if(e&&r){var a=this.vgenerator.cOffsets[e.index-this.parent.getVisibleFrozenColumns()-1];if(!this.parent.enableColumnVirtualization){var h=this.parent.getHeaderContent().querySelector('.e-headercelldiv[e-mappinguid="'+e.uid+'"]');a=i?h.parentElement.offsetLeft-this.parent.getFrozenVirtualHeader().offsetWidth:h.parentElement.offsetLeft}i?this.parent.getMovableVirtualContent().scrollLeft=this.parent.enableRtl?-Math.abs(a):a:this.content.scrollLeft=this.parent.enableRtl?-Math.abs(a):a}e&&!r&&(this.validationCol=e)},n.prototype.refreshCells=function(e){e.cells=this.vgenerator.generateCells()},n.prototype.resetVirtualFocus=function(e){this.isCancel=e.isCancel},n.prototype.getVirtualData=function(e){if(this.isNormaledit){var t=this.parent.element.querySelector('.e-griderror:not([style*="display: none"])'),i=Object.keys(this.virtualData);if(e.isScroll=0!==i.length&&this.currentInfo.sentinelInfo&&"X"===this.currentInfo.sentinelInfo.axis,t)return;this.virtualData=i.length?this.virtualData:e.virtualData,this.getVirtualEditedData(this.virtualData),e.virtualData=this.virtualData,e.isAdd=this.isAdd,e.isCancel=this.isCancel}},n.prototype.selectRowOnContextOpen=function(e){this.isContextMenuOpen=e.isOpen},n.prototype.editCancel=function(e){var i=Ie(this.parent,e.data);t.isNullOrUndefined(i)||(e.data=this.parent.getCurrentViewRecords()[i])},n.prototype.editSuccess=function(e){this.isNormaledit&&(!this.isAdd&&e.data&&this.updateCurrentViewData(e.data),this.isAdd=!1)},n.prototype.updateCurrentViewData=function(e){var i=Ie(this.parent,e);t.isNullOrUndefined(i)||(this.parent.getCurrentViewRecords()[i]=e)},n.prototype.actionBegin=function(e){"virtualscroll"!==e.requestType&&(this.requestType=e.requestType),e.cancel||this.parent.notify("refresh-virtual-frozenrows",e)},n.prototype.virtualCellFocus=function(e){var i=document.activeElement;if(i.classList.contains(bi)&&e&&("upArrow"===e.action||"downArrow"===e.action)){var r=parseInt(i.parentElement.getAttribute(Hi),10);if(e&&("downArrow"===e.action||"upArrow"===e.action)){var n=this.parent.getContent().firstElementChild;"downArrow"===e.action?r+=1:r-=1,this.rowIndex=r,this.cellIndex=parseInt(i.getAttribute(qi),10);var o=this.parent.getRowByIndex(r),s=this.parent.pageSettings.currentPage,l=Math.floor(n.offsetHeight/this.parent.getRowHeight())-1,a=!1;t.isNullOrUndefined(o)&&(a=!0,("downArrow"===e.action&&s===this.maxPage-1||"upArrow"===e.action&&1===s)&&(a=!1)),a||xe(o,this.parent)&&"downArrow"===e.action||Fe(o,2*this.parent.getRowHeight())&&"upArrow"===e.action?(this.activeKey=e.action,n.scrollTop="downArrow"===e.action?(r-l)*this.parent.getRowHeight():r*this.parent.getRowHeight()):this.activeKey=this.empty,this.parent.selectRow(r)}}},n.prototype.editActionBegin=function(e){this.editedRowIndex=e.index;var i=t.extend({},this.getRowObjectByIndex(e.index)),r=Object.keys(this.virtualData);e.data=r.length?this.virtualData:i,e.isScroll=0!==r.length&&this.currentInfo.sentinelInfo&&"X"===this.currentInfo.sentinelInfo.axis},n.prototype.refreshCache=function(e){var t=Math.ceil((this.editedRowIndex+1)/this.getBlockSize()),i=this.editedRowIndex-(t-1)*this.getBlockSize();this.vgenerator.cache[t][i].data=e,this.vgenerator.movableCache[t]&&(this.vgenerator.movableCache[t][i].data=e),this.vgenerator.frozenRightCache[t]&&(this.vgenerator.frozenRightCache[t][i].data=e)},n.prototype.actionComplete=function(e){var t=["delete","save","cancel"],i=["sorting","filtering","grouping","refresh","searching","ungrouping","reorder"];t.some(function(t){return t===e.requestType})&&(this.refreshOffsets(),this.parent.isFrozenGrid()?(this.vgenerator.refreshColOffsets(),this.parent.contentModule.virtualRenderer.virtualEle.setVirtualHeight()):this.refreshVirtualElement()),this.isNormaledit&&(i.some(function(t){return t===e.requestType})||t.some(function(t){return t===e.requestType}))&&(this.isCancel=!0,this.isAdd=!1,this.editedRowIndex=this.empty,this.virtualData={},this.parent.editModule&&(this.parent.editModule.editModule.previousData=void 0)),this.parent.enableColumnVirtualization&&"filterafteropen"===e.requestType&&this.currentInfo.columnIndexes&&this.currentInfo.columnIndexes[0]>0&&this.parent.resetFilterDlgPosition(e.columnName)},n.prototype.resetIsedit=function(){this.parent.enableVirtualization&&this.isNormaledit&&(this.parent.editSettings.allowEditing&&Object.keys(this.virtualData).length||this.parent.editSettings.allowAdding&&this.isAdd)&&(this.parent.isEdit=!0)},n.prototype.scrollAfterEdit=function(){if(this.parent.editModule&&this.parent.editSettings.allowEditing&&this.isNormaledit&&this.parent.element.querySelector(".e-gridform")){var e=this.parent.element.querySelector("."+Ai),i=this.parent.element.querySelector("."+Bi);if(e||i){var r=e?t.extend({},this.getRowObjectByIndex(this.editedRowIndex)):t.extend({},this.emptyRowData),n=Object.keys(this.virtualData);this.virtualData=n.length?this.getVirtualEditedData(this.virtualData):this.getVirtualEditedData(r)}}},n.prototype.createEmptyRowdata=function(){var e=this;this.parent.columnModel.filter(function(t){e.emptyRowData[t.field]=e.empty})},n.prototype.addActionBegin=function(e){if(this.isNormaledit){Object.keys(this.emptyRowData).length||this.createEmptyRowdata(),this.isAdd=!0;var t=this.parent.pageSettings.currentPage;!this.parent.frozenRows&&this.content.scrollTop>0&&"Top"===this.parent.editSettings.newRowPosition&&(this.isAdd=!0,this.onActionBegin(),e.startEdit=!1,this.content.scrollTop=0),t<this.maxPage-1&&"Bottom"===this.parent.editSettings.newRowPosition&&(this.isAdd=!0,this.parent.setProperties({pageSettings:{currentPage:this.maxPage-1}},!0),e.startEdit=!1,this.content.scrollTop=this.offsets[this.offsetKeys.length])}},n.prototype.getRowObjectByIndex=function(e){return this.getRowCollection(e,!1,!0)},n.prototype.getBlockSize=function(){return this.parent.pageSettings.pageSize>>1},n.prototype.getBlockHeight=function(){return this.getBlockSize()*this.parent.getRowHeight()},n.prototype.isEndBlock=function(e){var t=this.getTotalBlocks();return e>=t||e===t-1},n.prototype.getGroupedTotalBlocks=function(){var e=this.parent.vcRows;return Math.floor(e.length/this.getBlockSize()<1?1:e.length/this.getBlockSize())},n.prototype.getTotalBlocks=function(){return Math.ceil(this.count/this.getBlockSize())},n.prototype.getColumnOffset=function(e){return 0|this.vgenerator.cOffsets[e]},n.prototype.getModelGenerator=function(){return new oo(this.parent)},n.prototype.resetScrollPosition=function(e){this.actions.some(function(t){return t===e})&&(this.preventEvent=0!==this.content.scrollTop,this.content.scrollTop=0),"virtualscroll"!==e&&(this.isAdd=!1)},n.prototype.onActionBegin=function(e){this.parent.setProperties({pageSettings:{currentPage:1}},!0)},n.prototype.getRows=function(){return this.vgenerator.getRows()},n.prototype.getRowByIndex=function(e){var t;return ce(this.parent)&&(t=this.parent.getDataRows()[e]),this.prevInfo&&(t=this.getRowCollection(e,!1)),t},n.prototype.getMovableVirtualRowByIndex=function(e){return this.getRowCollection(e,!0)},n.prototype.getFrozenRightVirtualRowByIndex=function(e){return this.getRowCollection(e,!1,!1,!0)},n.prototype.getRowCollection=function(e,t,i,r){var n=(this.prevInfo.blockIndexes[0]-1)*this.getBlockSize(),o=t?this.parent.getMovableDataRows():this.parent.getDataRows();o=r?this.parent.getFrozenRightDataRows():o;var s=(i?this.parent.getCurrentViewRecords():o)[e-n];return this.parent.frozenRows&&this.parent.pageSettings.currentPage>1&&(s=i?e<=this.parent.frozenRows?this.parent.getRowsObject()[e].data:s:e<=this.parent.frozenRows?o[e]:o[e-n+this.parent.frozenRows]),s},n.prototype.getVirtualRowIndex=function(e){return(this.prevInfo.blockIndexes[0]-1)*this.getBlockSize()+e},n.prototype.refreshOffsets=function(){var e=this.parent,t=0,i=this.getBlockSize(),r=ce(this.parent)?this.getGroupedTotalBlocks():this.getTotalBlocks();this.prevHeight=this.offsets[r],this.maxBlock=r%2==0?r-2:r-1,this.offsets={};for(var n=Array.apply(null,Array(r)).map(function(){return++t}),o=0;o<n.length;o++){var s=(this.vgenerator.cache[n[o]]||[]).length,l=ce(this.parent)?e.vcRows.length%i:this.count%i,a=!ce(this.parent)&&n[o]in this.vgenerator.cache?s*this.parent.getRowHeight():l&&n[o]===r?l*this.parent.getRowHeight():this.getBlockHeight();this.offsets[n[o]]=(0|this.offsets[n[o]-1])+a,this.tmpOffsets[n[o]]=0|this.offsets[n[o]-1]}this.offsetKeys=Object.keys(this.offsets),ce(this.parent)&&(this.parent.vGroupOffsets=this.offsets),this.parent.enableColumnVirtualization&&this.vgenerator.refreshColOffsets()},n.prototype.refreshVirtualElement=function(){this.vgenerator.refreshColOffsets(),this.setVirtualHeight()},n.prototype.setVisible=function(e){var i,r,n=this.parent,o=this.parent.getFrozenColumns();o&&(i=[].slice.call(this.parent.getFrozenVirtualContent().querySelectorAll("col")),r=[].slice.call(this.parent.getMovableVirtualContent().querySelectorAll("col")));var s,l=[];(l=this.getRows()).some(function(e){return e.isDataRow&&(s=e),e.isDataRow});var a=!0;!n.groupSettings.columns.length&&s&&(a=!1);for(var h=n.getDataRows(),d=0,c=e.length;d<c;d++){var p=e[d],u=n.getNormalizedColumnIndex(p.uid),g=!0===p.visible?"":"none",f=void 0;if(i&&r?u>=o?(f=r,h=this.parent.getMovableRows(),u-=o):f=i:f=this.getColGroup().children,-1!==u&&s&&u<s.cells.length&&t.setStyleAttribute(f[u],{display:g}),!a){var m=void 0;(m=p.visible?this.virtualEle.wrapper.offsetWidth+parseInt(p.width.toString(),10):this.virtualEle.wrapper.offsetWidth-parseInt(p.width.toString(),10))>n.width?(this.setDisplayNone(h,u,g,l),this.parent.enableColumnVirtualization&&this.virtualEle.setWrapperWidth(m+""),this.refreshVirtualElement()):a=!0}!this.parent.invokedFromMedia&&p.hideAtMedia&&this.parent.updateMediaColumns(p),this.parent.invokedFromMedia=!1}a||o?this.refreshContentRows({requestType:"refresh"}):this.parent.notify("partial-refresh",{rows:l,args:{isFrozen:!1,rows:l}})},n.prototype.selectVirtualRow=function(e){var i=this;if(e.isAvailable=e.selectedIndex<this.count,e.isAvailable&&!this.isContextMenuOpen&&"upArrow"!==this.activeKey&&"downArrow"!==this.activeKey&&!this.isSelection&&!this.requestTypes.some(function(e){return e===i.requestType})&&!this.parent.selectionModule.isInteracted){var r=this.parent.getRowByIndex(e.selectedIndex),n=this.parent.getRowHeight();if(!r||!this.isRowInView(r)){this.isSelection=!0,this.selectedRowIndex=e.selectedIndex;var o=(e.selectedIndex+1)*n;if(!t.isNullOrUndefined(o)){var s=this.content.scrollTop<o?"down":"up";this.selectRowIndex=e.selectedIndex,this.content.scrollTop=o,this.isSelectionScroll=this.observer.check(s)}}}this.parent.isFrozenGrid()&&this.requestType?this.parent.getTablesCount()===this.frzIdx?(this.requestType=this.empty,this.frzIdx=1):this.frzIdx++:this.requestType=this.empty},n.prototype.isRowInView=function(e){var t=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;return t>=this.content.getBoundingClientRect().top&&i<=this.content.getBoundingClientRect().bottom},n}(Yi),ao=function(e){function i(t,i){var r=e.call(this,t,i)||this;return r.virtualEle=new ho,r.isMovable=!1,r.gen=new oo(r.parent),r.parent.on(Wt,r.setVisible,r),r.parent.on($t,function(e){return"X"===e.virtualInfo.sentinelInfo.axis?r.refreshUI():null},r),r}return so(i,e),i.prototype.renderTable=function(){this.gen.refreshColOffsets(),this.parent.setColumnIndexesInView(this.gen.getColumnIndexes(this.getPanel().querySelector("."+Fi))),e.prototype.renderTable.call(this),this.virtualEle.table=this.getTable(),this.virtualEle.content=this.getPanel().querySelector("."+Fi),this.virtualEle.content.style.position="relative",this.virtualEle.renderWrapper(),this.virtualEle.renderPlaceHolder("absolute")},i.prototype.appendContent=function(e){this.isMovable?(this.virtualEle.movableWrapper.appendChild(e),this.isMovable=!1):this.virtualEle.wrapper.appendChild(e)},i.prototype.refreshUI=function(){this.isMovable=this.parent.isFrozenGrid(),this.setFrozenTable(this.parent.getMovableVirtualContent()),this.gen.refreshColOffsets(),this.parent.setColumnIndexesInView(this.gen.getColumnIndexes(this.getPanel().querySelector("."+Fi))),e.prototype.refreshUI.call(this),this.setFrozenTable(this.parent.getFrozenVirtualContent())},i.prototype.setVisible=function(e){var i,r,n,o,s,l=this.parent,a=this.parent.getFrozenColumns();a&&(o=[].slice.call(this.parent.getFrozenVirtualHeader().querySelectorAll("col")),s=[].slice.call(this.parent.getMovableVirtualHeader().querySelectorAll("col")));for(var h=0,d=e.length;h<d;h++){var c=e[h];r=l.getNormalizedColumnIndex(c.uid),i=c.visible?"":"none";var p=void 0;if(o&&s?r>=a?(p=s,r-=a):p=o:p=this.getColGroup().children,t.setStyleAttribute(p[r],{display:i}),l.enableColumnVirtualization&&!l.groupSettings.columns.length){var u=void 0;(u=c.visible?this.virtualEle.wrapper.offsetWidth+parseInt(c.width.toString(),10):this.virtualEle.wrapper.offsetWidth-parseInt(c.width.toString(),10))>l.width?(this.setDisplayNone(c,i),this.virtualEle.setWrapperWidth(u+""),this.gen.refreshColOffsets()):n=!0}else n=!0;n&&!a&&this.refreshUI()}a&&this.parent.notify(Kt,{})},i.prototype.setFrozenTable=function(e){this.parent.isFrozenGrid()&&this.parent.enableColumnVirtualization&&this.parent.contentModule.isXaxis()&&this.parent.contentModule.setTable(e.querySelector("."+Mi))},i.prototype.setDisplayNone=function(e,i){var r=this.parent.isFrozenGrid(),n=this.getTable();r&&"movable"===e.getFreezeTableName()&&(n=this.parent.getMovableVirtualHeader().querySelector("."+Mi));for(var o=0,s=[].slice.apply(n.querySelectorAll("th.e-headercell"));o<s.length;o++){var l=s[o];if(l.querySelector("[e-mappinguid]")&&l.querySelector("[e-mappinguid]").getAttribute("e-mappinguid")===e.uid){t.setStyleAttribute(l,{display:i}),""===i&&t.removeClass([l],"e-hide");break}}},i}(Zi),ho=function(){function e(){}return e.prototype.renderWrapper=function(e){this.wrapper=t.createElement("div",{className:"e-virtualtable",styles:"min-height:"+t.formatUnit(e)}),this.wrapper.appendChild(this.table),this.content.appendChild(this.wrapper)},e.prototype.renderPlaceHolder=function(e){void 0===e&&(e="relative"),this.placeholder=t.createElement("div",{className:"e-virtualtrack",styles:"position:"+e}),this.content.appendChild(this.placeholder)},e.prototype.renderFrozenWrapper=function(e){this.wrapper=t.createElement("div",{className:"e-virtualtable",styles:"min-height:"+t.formatUnit(e)+"; display: flex"}),this.content.appendChild(this.wrapper)},e.prototype.renderFrozenPlaceHolder=function(){this.placeholder=t.createElement("div",{className:"e-virtualtrack"}),this.content.appendChild(this.placeholder)},e.prototype.renderMovableWrapper=function(e){this.movableWrapper=t.createElement("div",{className:"e-virtualtable",styles:"min-height:"+t.formatUnit(e)}),this.movableContent.appendChild(this.movableWrapper)},e.prototype.renderMovablePlaceHolder=function(){this.movablePlaceholder=t.createElement("div",{className:"e-virtualtrack"}),this.movableContent.appendChild(this.movablePlaceholder)},e.prototype.adjustTable=function(e,t){this.wrapper.style.transform="translate("+e+"px, "+t+"px)"},e.prototype.adjustMovableTable=function(e,t){this.movableWrapper.style.transform="translate("+e+"px, "+t+"px)"},e.prototype.setMovableWrapperWidth=function(e,t){this.movableWrapper.style.width=e?e+"px":t?"100%":""},e.prototype.setMovableVirtualHeight=function(e,t){this.movablePlaceholder.style.height=e+"px",this.movablePlaceholder.style.width=t},e.prototype.setWrapperWidth=function(e,t){this.wrapper.style.width=e?e+"px":t?"100%":""},e.prototype.setVirtualHeight=function(e,t){this.placeholder.style.height=e+"px",this.placeholder.style.width=t},e.prototype.setFreezeWrapperWidth=function(e,t,i){e.style.width=t?t+"px":i?"100%":""},e}(),co=function(){function i(e,t){this.parent=e,this.locator=t,this.addEventListener()}return i.prototype.getModuleName=function(){return"virtualscroll"},i.prototype.instantiateRenderer=function(){this.parent.log(["limitation","virtual_height"],"virtualization");var t=this.locator.getService("rendererFactory");this.parent.isFrozenGrid()||(this.parent.enableColumnVirtualization&&t.addRenderer(e.RenderType.Header,new ao(this.parent,this.locator)),t.addRenderer(e.RenderType.Content,new lo(this.parent,this.locator))),this.ensurePageSize()},i.prototype.ensurePageSize=function(){var e=this.parent.getRowHeight(),t=this.parent.height.toString().indexOf("%")<0?this.parent.height:this.parent.element.getBoundingClientRect().height;this.blockSize=~~(t/e);var i=2*this.blockSize,r=this.parent.pageSettings.pageSize;this.parent.setProperties({pageSettings:{pageSize:r<i?i:r}},!0)},i.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Mt,this.instantiateRenderer,this),this.parent.on("column-width-changed",this.refreshVirtualElement,this),this.parent.on("create-virtual-validation-form",this.createVirtualValidationForm,this),this.parent.on("validate-virtual-form",this.virtualEditFormValidation,this))},i.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Mt,this.instantiateRenderer),this.parent.off("column-width-changed",this.refreshVirtualElement),this.parent.off("create-virtual-validation-form",this.createVirtualValidationForm),this.parent.off("validate-virtual-form",this.virtualEditFormValidation))},i.prototype.getCurrentEditedData=function(e){var i={virtualData:t.extend({},{},e,!0),isAdd:!1,isScroll:!1,endEdit:!0};return this.parent.notify(pi,i),i.virtualData},i.prototype.createVirtualValidationForm=function(e){var i=this.parent;if(i.enableVirtualization&&"Normal"===i.editSettings.mode){var r=i.columns,n=new Vi(this.locator,null,this.parent),o=t.extend({},{},i.getRowObjectFromUID(e.uid),!0);i.notify("refresh-virtual-editform-cells",o);var s=e.argsCreator(this.getCurrentEditedData(e.prevData),{},!1);s.isCustomFormValidation=!0,s.row=n.render(o,r),e.renderer.update(s);for(var l={},a=0;a<r.length;a++)r[a].visible&&r[a].validationRules&&Ue(r[a],0,l,{},{},r.length,!0);s.form.classList.add("e-virtual-validation"),i.editModule.virtualFormObj=i.editModule.createFormObj(s.form,l)}},i.prototype.virtualEditFormValidation=function(e){var i=this.parent,r=i.element.querySelector('.e-griderror:not([style*="display: none"])');if(i.editModule.virtualFormObj)if(r&&"none"!==r.style.display){var n=r.getBoundingClientRect(),o=i.element.querySelectorAll(".e-gridform"),s=o[0],l=i.getContent().getBoundingClientRect().left;if(o.length>1&&(s="Right"!==i.getFrozenMode()?o[1]:o[0],l=i.getMovableVirtualContent().getBoundingClientRect().left),n.left<l||n.right>i.element.offsetWidth){d=s.querySelector('.e-tooltip-wrap:not([style*="display: none"])');this.scrollToEdit(d,{editIdx:e.editIdx,addIdx:e.addIdx},!0)}}else if(i.editModule.virtualFormObj&&(!r||"none"===r.style.display)){for(var a=i.editModule.virtualFormObj.element.querySelectorAll('.e-tooltip-wrap:not([style*="display: none"])'),h=0;h<a.length;h++)t.remove(a[h]);if(this.setEditedDataToValidationForm(i.editModule.virtualFormObj.element,this.getCurrentEditedData(e.prevData)),e.isValid=i.editModule.virtualFormObj.validate(),!e.isValid){var d=i.editModule.virtualFormObj.element.querySelector('.e-tooltip-wrap:not([style*="display: none"])');this.scrollToEdit(d,{editIdx:e.editIdx,addIdx:e.addIdx})}}},i.prototype.scrollToEdit=function(e,i,r){var n=this.parent;if(e){var o=n.columnModel,s=K(e.id).split("_")[0],l=n.getColumnByField(s),a=this.parent.getContent().firstElementChild.scrollTop,h=n.getRowByIndex(i.editIdx);if(r||!l||!t.isNullOrUndefined(i.addIdx)&&a>0||!t.isNullOrUndefined(i.editIdx)&&!h){for(var d=void 0,c=0;c<o.length&&!l;c++)if(o[c].field===s){d=o[c];break}r&&(d=l),this.parent.notify("scroll-to-edit",d)}}},i.prototype.setEditedDataToValidationForm=function(e,i){this.parent;for(var r=[].slice.call(e.getElementsByClassName("e-field")),n=0,o=r.length;n<o;n++){var s=Ye(this.parent,r[n].getAttribute("e-mappinguid")),l=t.getValue(s.field,i);l=t.isNullOrUndefined(l)?"":l,r[n].value=l}},i.prototype.refreshVirtualElement=function(t){this.parent.enableColumnVirtualization&&"resize"===t.module&&this.locator.getService("rendererFactory").getRenderer(e.RenderType.Content).refreshVirtualElement()},i.prototype.destroy=function(){this.removeEventListener()},i}(),po=function(){function e(e){this.parent=e}return e.prototype.addNew=function(e,t){this.isEdit=!1;var i,r=je(this.parent),n=Ve(this.parent),o=this.parent.isFrozenGrid(),s=o&&this.parent.enableColumnVirtualization&&t.isScroll;if(i=this.parent.frozenRows&&"Top"===this.parent.editSettings.newRowPosition?s?this.parent.getMovableHeaderTbody():this.parent.getHeaderTable().querySelector(Ui):s?this.parent.getMovableContentTbody():this.parent.getContentTable().querySelector(Ui),t.row=this.parent.createElement("tr",{className:"e-row e-addedrow"}),i.querySelector(".e-emptyrow")){var l=i.querySelector(".e-emptyrow");if(l.parentNode.removeChild(l),o&&!s){var a=this.parent.getContent().querySelector("."+Ei).querySelector(Ui);if(a.firstElementChild.parentNode.removeChild(a.firstElementChild),this.parent.getFrozenMode()===Pi){var h=this.parent.getContent().querySelector(".e-frozen-right-content").querySelector(Ui);h.firstElementChild.parentNode.removeChild(h.firstElementChild)}}}if("Top"===this.parent.editSettings.newRowPosition?i.insertBefore(t.row,i.firstChild):i.appendChild(t.row),t.row.appendChild(this.getEditElement(e,!1,void 0,t,!0)),this.parent.editModule.checkLastRow(t.row,t),o&&!s){var d=this.renderMovableform(t.row,t);if("Top"===this.parent.editSettings.newRowPosition?r.insertBefore(d,r.firstChild):r.appendChild(d),t.row.querySelector(".e-normaledit").setAttribute("colspan",this.parent.getVisibleFrozenColumns()+""),d.setAttribute("colspan",""+(this.parent.getVisibleColumns().length-this.parent.getVisibleFrozenColumns())),n){var c=this.renderFrozenRightForm(t.row,t);"Top"===this.parent.editSettings.newRowPosition?n.insertBefore(c,n.firstChild):n.appendChild(c);var p=this.parent.getVisibleFrozenColumns()-this.parent.getFrozenRightColumnsCount();t.row.querySelector(".e-normaledit").setAttribute("colspan",p+""),c.querySelector(".e-normaledit").setAttribute("colspan",""+this.parent.getFrozenRightColumnsCount())}"auto"===this.parent.height&&this.parent.notify("frozenHeight",{})}},e.prototype.renderFrozenRightForm=function(e,t){var i=e.cloneNode(!0),r=t.frozenRightForm=i.querySelector("form");return this.parent.editSettings.template?(r.innerHTML="",this.appendChildren(r,t.rowData,!1),i):(this.renderRightFrozen(e,i),i.querySelector(ji).innerHTML=this.parent.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(ji).innerHTML,i)},e.prototype.renderMovableform=function(e,t){var i=e.cloneNode(!0),r=t.movableForm=i.querySelector("form");return this.parent.editSettings.template?(r.innerHTML="",this.appendChildren(r,t.rowData,!1),i):(this.renderMovable(e,i),i.querySelector(ji).innerHTML=this.parent.getHeaderContent().querySelector("."+Ii).querySelector(ji).innerHTML,i)},e.prototype.updateFreezeEdit=function(e,t){return t=t.concat([].slice.call(this.getFreezeRow(e).querySelectorAll("td.e-rowcell"))),this.parent.getFrozenMode()===Pi&&(t=t.concat([].slice.call(this.getFreezeRightRow(e).querySelectorAll("td.e-rowcell")))),t},e.prototype.getFreezeRightRow=function(e){var t=parseInt(e.getAttribute(Hi),10),i=this.parent.getFrozenLeftContentTbody(),r=this.parent.getFrozenHeaderTbody(),n=this.parent.getFrozenRightHeaderTbody(),o=this.parent.getFrozenRightContentTbody();return i.contains(e)||r.contains(e)?this.parent.getFrozenRightRowByIndex(t):o.contains(e)||n.contains(e)?this.parent.getRowByIndex(t):e},e.prototype.getFreezeRow=function(e){if(this.parent.isFrozenGrid()){var t=parseInt(e.getAttribute(Hi),10),i=this.parent.getFrozenLeftContentTbody(),r=this.parent.getMovableContentTbody(),n=this.parent.getFrozenHeaderTbody(),o=this.parent.getMovableHeaderTbody();if(i.contains(e)||n.contains(e))return this.parent.getMovableRowByIndex(t);if(r.contains(e)||o.contains(e))return this.parent.getRowByIndex(t)}return e},e.prototype.update=function(e,i){this.isEdit=!0;var r=i.isCustomFormValidation,n=i.isScroll;n||!t.closest(i.row,"."+Ei)&&!t.closest(i.row,"."+Ii)||(i.row=this.getFreezeRow(i.row)),(t.closest(i.row,".e-frozen-right-content")||t.closest(i.row,".e-frozen-right-header"))&&(i.row=this.getFreezeRightRow(i.row));var o=this.parent.isFrozenGrid()&&this.parent.enableColumnVirtualization&&n,s=[].slice.call(i.row.querySelectorAll("td.e-rowcell"));i.row.innerHTML="",o||r||(s=this.updateFreezeEdit(i.row,s)),i.row.appendChild(this.getEditElement(e,!0,s,i,!0)),i.row.classList.add(Ai),this.parent.editModule.checkLastRow(i.row,i),o||r||this.refreshFreezeEdit(i.row,i)},e.prototype.refreshFreezeEdit=function(e,i){var r=e.firstChild;this.parent.getVisibleFrozenColumns()&&this.parent.editSettings.template&&(r.querySelector(ji).innerHTML=this.parent.getHeaderContent().querySelector("."+zi).querySelector(ji).innerHTML);var n,o,s=parseInt(e.getAttribute(Hi),10);if(this.parent.isFrozenGrid()){s<this.parent.frozenRows?(o=this.parent.getHeaderContent(),n="."+zi):(o=this.parent.getContent(),n="."+Ti);var l=r.cloneNode(!0),a=r.cloneNode(!0),h=i.movableForm=l.querySelector("form");this.parent.editSettings.template&&this.refreshEditForm(h,i.rowData);var d=void 0,c=void 0;o.querySelector(n).contains(e)?(d=this.parent.getMovableRowByIndex(s),this.updateFrozenCont(d,r,l),this.parent.getFrozenMode()===Pi&&(i.frozenRightForm=a.querySelector("form"),this.refreshEditForm(i.frozenRightForm,i.rowData),c=this.parent.getFrozenRightRowByIndex(s),this.updateFrozenRightCont(c,r,a))):(d=this.parent.getRowByIndex(s),this.updateFrozenCont(d,l,r),this.parent.getFrozenMode()===Pi&&(i.frozenRightForm=a.querySelector("form"),this.refreshEditForm(i.frozenRightForm,i.rowData),c=this.parent.getFrozenRightRowByIndex(s),this.updateFrozenRightCont(c,a,r))),t.isBlazor()&&this.parent.isServerRendered?(i.cloneFrozen.appendChild(l),i.cloneFrozen.classList.add(Ai)):(d.appendChild(l),d.classList.add(Ai),this.parent.getFrozenMode()===Pi&&(c.appendChild(a),c.classList.add(Ai),Re(i.frozenRightForm.querySelector("td:not(.e-hide)"),i.form.querySelector("td:not(.e-hide)")))),Re(i.movableForm.querySelector("td:not(.e-hide)"),i.form.querySelector("td:not(.e-hide)"))}},e.prototype.refreshEditForm=function(e,t){this.parent.editSettings.template&&(e.innerHTML="",this.appendChildren(e,t,!1))},e.prototype.updateFrozenRightCont=function(e,t,i){e.innerHTML="",this.renderRightFrozen(t,i),i.querySelector(ji).innerHTML=this.parent.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(ji).innerHTML,t.setAttribute("colspan",this.parent.getVisibleFrozenColumns()-this.parent.getFrozenRightColumnsCount()+""),i.setAttribute("colspan",this.parent.getFrozenRightColumnsCount()+"")},e.prototype.updateFrozenCont=function(e,t,i){e.innerHTML="",this.renderMovable(t,i),i.querySelector(ji).innerHTML=this.parent.getHeaderContent().querySelector("."+Ii).querySelector(ji).innerHTML,t.setAttribute("colspan",this.parent.getVisibleFrozenColumns()+""),i.setAttribute("colspan",this.parent.getCurrentVisibleColumns(this.parent.enableColumnVirtualization).length-this.parent.getVisibleFrozenColumns()+"")},e.prototype.renderRightFrozen=function(e,t){t.querySelector("tr").innerHTML="";for(var i=this.parent.getColumns(),r=0,n=0;n<i.length;n++,r++)if(i[n].getFreezeTableName()===Ni){var o=r-this.parent.getMovableColumnsCount();t.querySelector("tr").appendChild(e.querySelector("tr").removeChild(e.querySelector("tr").children[o])),r--}},e.prototype.renderMovable=function(e,t){t.querySelector("tr").innerHTML="";for(var i=this.parent.getColumns(),r=0,n=0;n<i.length;n++,r++)"movable"===i[n].getFreezeTableName()&&(t.querySelector("tr").appendChild(e.querySelector("tr").removeChild(e.querySelector("tr").children[r])),r--)},e.prototype.getEditElement=function(e,i,r,n,o){var s=this.parent,l=0,a=t.isNullOrUndefined(s.detailTemplate)&&t.isNullOrUndefined(s.childGrid)?0:1;s.allowGrouping&&(l=s.groupSettings.columns.length);var h=this.parent.createElement("td",{className:"e-editcell e-normaledit",attrs:{colspan:(s.getCurrentVisibleColumns(this.parent.enableColumnVirtualization).length-s.getVisibleFrozenColumns()+this.parent.getIndentCount()).toString()}}),d=n.form=this.parent.createElement("form",{id:s.element.id+"EditForm",className:"e-gridform"});if(this.parent.editSettings.template)return this.appendChildren(d,n.rowData,o),h.appendChild(d),h;var c=this.parent.createElement("table",{className:"e-table e-inline-edit",attrs:{cellspacing:"0.25"}});c.appendChild(s.getContentTable().querySelector(ji).cloneNode(!0));var p=this.parent.createElement(Ui),u=this.parent.createElement("tr"),g=0;for(a&&u.insertBefore(this.parent.createElement("td",{className:"e-detailrowcollapse"}),u.firstChild),s.isRowDragable()&&u.appendChild(this.parent.createElement("td",{className:"e-dragindentcell"}));g<l;)u.appendChild(this.parent.createElement("td",{className:"e-indentcell"})),g++;var f=0;g=0;for(var m=s.isFrozenGrid()&&s.enableColumnVirtualization&&n.isScroll,y=n.isCustomFormValidation?this.parent.columnModel:s.getColumns();i&&f<r.length&&g<y.length||g<y.length;){var v=i?r[f].getAttribute("colspan"):null,C=y[g];if(m&&"movable"!==C.getFreezeTableName()||n.isCustomFormValidation&&(C.commands||C.commandsTemplate||!C.field))g++;else{var w=this.parent.createElement("td",{className:bi,attrs:{style:"text-align:"+(C.textAlign?C.textAlign:""),colspan:v||""}});C.visible?(w.appendChild(e[C.uid]),"Vertical"===this.parent.rowRenderingMode&&(F(w,{"data-cell":C.headerText}),0===g&&w.classList.add("e-responsive-editcell")),"booleanedit"===C.editType?w.classList.add("e-boolcell"):(C.commands||C.commandsTemplate)&&t.addClass([w],"e-unboundcell")):w.classList.add("e-hide"),u.appendChild(w),g=v?g+parseInt(v,10):g+1,f++}}return p.appendChild(u),c.appendChild(p),d.appendChild(c),h.appendChild(d),h},e.prototype.removeEventListener=function(){},e.prototype.appendChildren=function(e,i,r){var n=this,o=t.extend({},i,{isAdd:!this.isEdit,isFrozen:r},!0),s=this.parent.element.id+"editSettingsTemplate";this.parent.isReact&&"string"!=typeof this.parent.editSettings.template?(this.parent.getEditTemplate()(o,this.parent,"editSettingsTemplate",s,null,null,e),this.parent.renderTemplates()):q(e,this.parent.getEditTemplate()(o,this.parent,"editSettingsTemplate",s));var l=function(){for(var e=n.parent.getColumns(),t=0;t<e.length;t++)e[t].validationRules&&(n.parent.editModule.formObj.rules[e[t].field]=e[t].validationRules)};t.updateBlazorTemplate(s,"Template",this.parent.editSettings,!0,l)},e}(),uo=function(){function e(e){this.parent=e}return e.prototype.update=function(e,i){if(this.parent.isReact&&i.columnObject&&i.columnObject.template){var r=i.cell.parentElement,n=i.cell.cloneNode(!0);r.insertBefore(n,r.children[parseInt(i.cell.getAttribute(qi),10)]),n.focus(),i.cell.remove(),i.cell=n}i.cell.innerHTML="",i.cell.appendChild(this.getEditElement(e,i)),i.cell.classList.remove("e-ellipsistooltip"),i.cell.classList.add("e-editedbatchcell"),t.classList(i.row,[Ai,"e-batchrow"],[])},e.prototype.getEditElement=function(e,t){var i=this.parent,r=this.parent.createElement("form",{id:i.element.id+"EditForm",className:"e-gridform"});return r.appendChild(e[t.columnObject.uid]),"booleanedit"===t.columnObject.editType&&t.cell.classList.add("e-boolcell"),t.columnObject.editType||t.cell.classList.add("e-inputbox"),r},e.prototype.removeEventListener=function(){},e}(),go=function(){function i(e,t){this.parent=e,this.serviceLocator=t,this.parent.isDestroyed||(this.parent.on(ri,this.destroy,this),this.parent.on(_t,this.destroy,this))}return i.prototype.setLocaleObj=function(){this.l10n=this.serviceLocator.getService("localization")},i.prototype.addNew=function(e,t){this.isEdit=!1,this.createDialog(e,t)},i.prototype.update=function(e,t){this.isEdit=!0,this.createDialog(e,t)},i.prototype.createDialogHeader=function(t){var i=this.parent;if(this.parent.enableAdaptiveUI){var r=new Fr(this.parent,this.serviceLocator);return r.action=this.isEdit?e.ResponsiveDialogAction.isEdit:e.ResponsiveDialogAction.isAdd,r.renderResponsiveHeader(void 0,t)}return i.editSettings.headerTemplate?this.getDialogEditTemplateElement("HeaderTemplate",t):this.isEdit?this.l10n.getConstant("EditFormTitle")+t.primaryKeyValue[0]:this.l10n.getConstant("AddFormTitle")},i.prototype.createDialog=function(e,i){var n=this.parent;this.dialog=this.parent.createElement("div",{id:n.element.id+"_dialogEdit_wrapper",styles:"width: auto"}),n.enableAdaptiveUI&&this.dialog.classList.add("e-responsive-dialog"),this.dialog.setAttribute("aria-label","Dialog edit"),n.element.appendChild(this.dialog),this.setLocaleObj(),this.dialogObj=new r.Dialog(t.extend({header:this.createDialogHeader(i),isModal:!0,visible:!0,cssClass:"e-edit-dialog",content:this.getEditElement(e,i),showCloseIcon:!0,allowDragging:!0,close:this.dialogClose.bind(this),created:this.dialogCreated.bind(this),closeOnEscape:!0,width:n.editSettings.template?"auto":"330px",target:i.target?i.target:document.body,animationSettings:{effect:"None"},footerTemplate:n.editSettings.footerTemplate?this.getDialogEditTemplateElement("FooterTemplate",i):null,buttons:[{click:this.btnClick.bind(this),buttonModel:{content:this.l10n.getConstant("SaveButton"),cssClass:"e-primary",isPrimary:!0}},{click:this.btnClick.bind(this),buttonModel:{cssClass:"e-flat",content:this.l10n.getConstant("CancelButton")}}]},n.editSettings.dialog?n.editSettings.dialog.params||{}:{})),i.dialog=this.dialogObj;this.dialogObj.isStringTemplate=!0,this.renderResponsiveDialog(),this.dialogObj.appendTo(this.dialog),Se(this.parent.element,this.dialogObj.element.parentElement),n.enableAdaptiveUI&&this.dialogObj.show(!0)},i.prototype.dialogCreated=function(){We(this.parent)},i.prototype.renderResponsiveDialog=function(){var e=this;this.parent.enableAdaptiveUI&&(this.parent.adaptiveDlgTarget&&(this.dialogObj.target=this.parent.adaptiveDlgTarget),this.dialogObj.buttons=[{}],this.dialogObj.showCloseIcon=!0,this.dialogObj.visible=!1,this.dialogObj.width="100%",this.dialogObj.open=function(){e.dialogObj.element.style.maxHeight="100%"})},i.prototype.btnClick=function(e){this.l10n.getConstant("CancelButton").toLowerCase()===e.target.innerText.trim().toLowerCase()?this.dialogClose():this.parent.endEdit()},i.prototype.dialogClose=function(){this.parent.closeEdit()},i.prototype.destroy=function(e){for(var i=["template","headerTemplate","footerTemplate"],r=0;r<i.length;r++)if(this.parent.editSettings[i[r]]){var n=i[r].charAt(0).toUpperCase()+i[r].slice(1),o=this.parent.element.id+"editSettings"+n;t.updateBlazorTemplate(o,n,this.parent.editSettings)}this.parent.notify("destroy-form",{}),this.parent.isEdit=!1,this.parent.notify("toolbar-refresh",{}),this.dialog&&!this.dialogObj.isDestroyed&&(this.dialogObj.destroy(),t.remove(this.dialog))},i.prototype.getDialogEditTemplateElement=function(e,i){var r=this.parent.createElement("div",{className:"e-dialog"+e}),n=t.extend({},i.rowData,{isAdd:!this.isEdit},!0),o=this.parent.element.id+"editSettings"+e;return q(r,("HeaderTemplate"===e?this.parent.getEditHeaderTemplate():this.parent.getEditFooterTemplate())(n,this.parent,"editSettings"+e,o)),t.updateBlazorTemplate(o,e,this.parent.editSettings),r},i.prototype.getEditElement=function(e,i){var r=this,n=this.parent,o=this.parent.createElement("div",{className:this.isEdit?Ai:"e-insertedrow"}),s=i.form=this.parent.createElement("form",{id:n.element.id+"EditForm",className:"e-gridform"});if(this.parent.editSettings.template){var l=this.parent.element.id+"editSettingsTemplate",a=t.extend({},i.rowData,{isAdd:!this.isEdit},!0);this.parent.isReact&&"string"!=typeof this.parent.editSettings.template?(this.parent.getEditTemplate()(a,this.parent,"editSettingsTemplate",l,null,null,s),this.parent.renderTemplates()):q(s,this.parent.getEditTemplate()(a,this.parent,"editSettingsTemplate",l));var h=function(){for(var e=r.parent.getColumns(),t=0;t<e.length;t++)e[t].validationRules&&(r.parent.editModule.formObj.rules[e[t].field]=e[t].validationRules)};return t.updateBlazorTemplate(l,"Template",this.parent.editSettings,!0,h),o.appendChild(s),o}for(var d=this.parent.createElement("table",{className:Mi,attrs:{cellspacing:"6px"}}),c=this.parent.createElement(Ui),p=n.getColumns(),u=0;u<p.length;u++)if(!(this.parent.editModule.checkColumnIsGrouped(p[u])||p[u].commands||p[u].commandsTemplate||"checkbox"===p[u].type)){var g=this.parent.createElement("tr"),f=this.parent.createElement("td",{className:bi,attrs:{style:"text-align:"+(this.parent.enableRtl?"right":"left")+";width:190px"}});e[p[u].uid].classList.remove("e-input"),f.appendChild(e[p[u].uid]),g.appendChild(f),c.appendChild(g)}return d.appendChild(c),s.appendChild(d),o.appendChild(s),o},i.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(ri,this.destroy),this.parent.off(_t,this.destroy))},i}(),fo=function(){function i(e,t){this.editType={Inline:po,Normal:po,Batch:uo,Dialog:go},this.parent=e,this.serviceLocator=t,this.renderer=new this.editType[this.parent.editSettings.mode](e,t),this.focus=t.getService("focus")}return i.prototype.addNew=function(e){this.renderer.addNew(this.getEditElements(e),e),this.convertWidget(e)},i.prototype.update=function(e){this.renderer.update(this.getEditElements(e),e),e.isCustomFormValidation||(this.parent.notify("edit-form",e),this.convertWidget(e))},i.prototype.convertWidget=function(e){var i,r,n,o,s=this.parent,l=s.isFrozenGrid(),a="Right"===s.getFrozenMode()&&"Normal"===s.editSettings.mode?1:0,h="Dialog"===s.editSettings.mode?t.select("#"+s.element.id+"_dialogEdit_wrapper .e-gridform",document):s.element.getElementsByClassName("e-gridform")[a],d=l&&this.parent.enableColumnVirtualization&&e.isScroll;if(l&&"Normal"===s.editSettings.mode){var c=parseInt(e.row.getAttribute(Hi),10);s.frozenRows&&("add"===e.requestType&&"Top"===s.editSettings.newRowPosition||c<s.frozenRows)?(n=s.element.querySelector("."+Ii).querySelector(".e-gridform"),this.parent.getFrozenMode()===Pi&&(o=e.frozenRightForm)):(n=s.element.querySelector("."+Ei).querySelector(".e-gridform"),this.parent.getFrozenMode()===Pi&&(o=e.frozenRightForm))}for(var p=0,u="Batch"!==s.editSettings.mode?s.getColumns():[s.getColumnByField(e.columnName)];p<u.length;p++){var g=u[p];if(!d||"movable"===g.getFreezeTableName())if(!this.parent.editSettings.template||t.isNullOrUndefined(g.field)){if(!this.parent.editModule.checkColumnIsGrouped(g)&&!g.commands){g.valueAccessor(g.field,e.rowData,g),r="movable"===g.getFreezeTableName()&&"Normal"===s.editSettings.mode?n.querySelector("[e-mappinguid="+g.uid+"]"):o&&g.getFreezeTableName()===Ni&&"Normal"===s.editSettings.mode?o.querySelector("[e-mappinguid="+g.uid+"]"):h.querySelector("[e-mappinguid="+g.uid+"]");var f=g.edit.write;t.isNullOrUndefined(r)||("string"==typeof f?(f=pe(f,window))({rowData:e.rowData,element:r,column:g,requestType:e.requestType,row:e.row,foreignKeyData:g.isForeignColumn()&&pe(g.field,e.foreignKeyData)}):g.edit.write({rowData:e.rowData,element:r,column:g,requestType:e.requestType,row:e.row,foreignKeyData:g.isForeignColumn()&&pe(g.field,e.foreignKeyData)}),i||r.getAttribute("disabled")||O(r,"e-checkbox-disabled")||(this.focusElement(r,e.type),i=!0))}}else{var m=t.extend({},e);m.element=h.querySelector("[name="+W(g.field)+"]"),t.isNullOrUndefined(m.element)&&l&&(m.element=n.querySelector("[name="+W(g.field)+"]")),"string"==typeof g.edit.write?pe(g.edit.write,window)(m):g.edit.write(m)}}if(l&&!this.parent.allowTextWrap&&("add"===e.requestType||"beginEdit"===e.requestType)&&"Dialog"!==this.parent.editSettings.mode&&!t.isNullOrUndefined(h)&&!t.isNullOrUndefined(n)){var y=n.querySelector("tr").children[0],v=h.querySelector("tr").children[0];if(v.offsetHeight>y.offsetHeight)y.style.height=v.offsetHeight+"px",o&&((C=n.querySelector("tr").children[0]).style.height=v.offsetHeight+"px");else if(v.style.height=y.offsetHeight+"px",o){var C=n.querySelector("tr").children[0];C.style.height=y.offsetHeight+"px"}}},i.prototype.focusElement=function(e,i){var r=this.parent.element.querySelector(".e-edit-checkselect");t.isNullOrUndefined(r)||r.nextElementSibling.classList.add("e-focus"),"Batch"===this.parent.editSettings.mode?this.focus.onClick({target:t.closest(e,"td")},!0):!this.parent.enableVirtualization||"Normal"!==this.parent.editSettings.mode||this.parent.enableVirtualization&&"Bottom"===this.parent.editSettings.newRowPosition&&O(e,Bi)?e.focus():e.focus({preventScroll:!0}),e.classList.contains("e-defaultcell")&&e.setSelectionRange(e.value.length,e.value.length)},i.prototype.getEditElements=function(i){var r=this.parent,n={},o="Batch"!==r.editSettings.mode?r.getColumns():[r.getColumnByField(i.columnName)];if(i.isCustomFormValidation&&(o=this.parent.columnModel),this.parent.editSettings.template)return{};for(var s=r.isFrozenGrid()&&r.enableColumnVirtualization&&i.isScroll,l=0,a=o.length;l<a;l++){var h=o[l];if(!(this.parent.editModule.checkColumnIsGrouped(h)||s&&"movable"!==o[l].getFreezeTableName()||i.isCustomFormValidation&&(h.commands||h.commandsTemplate||!h.field)))if(h.commands||h.commandsTemplate){var d=this.serviceLocator.getService("cellRendererFactory"),c=new Gi(this.parent),p=d.getCellRenderer(e.CellType.CommandColumn),u=c.generateRows(i.rowData)[0].cells.filter(function(e){return e.rowID}),g=p.render(u[l],i.rowData,{index:i.row?i.row.getAttribute(Hi):0},this.parent.enableVirtualization);(w=g.firstElementChild).setAttribute("textAlign",g.getAttribute("textAlign")),n[h.uid]=w}else{var f={column:h,value:h.valueAccessor(h.field,i.rowData,h),type:i.requestType,data:i.rowData},m=h.edit.create,y=void 0;if(h.editTemplate){y=this.parent.createElement("span",{attrs:{"e-mappinguid":h.uid}});var v=this.parent.element.id+h.uid+"editTemplate",C=me({},i.rowData,{column:h});this.parent.isReact&&"string"!=typeof h.editTemplate?(h.getEditTemplate()(t.extend({index:i.rowIndex},C),this.parent,"editTemplate",v,null,null,y),this.parent.renderTemplates()):q(y,h.getEditTemplate()(t.extend({index:i.rowIndex},C),this.parent,"editTemplate",v))}else{if("string"==typeof(y="string"==typeof m?(m=pe(m,window))(f):h.edit.create(f))){var w=this.parent.createElement("div");w.innerHTML=y,y=w.firstChild}var b="input"!==y.tagName&&y.querySelectorAll("input").length,S=W(h.field);t.attributes(b?y.querySelector("input"):y,{name:S,"e-mappinguid":h.uid,id:r.element.id+S}),t.classList(y,["e-input","e-field"],[]),"Right"===h.textAlign&&y.classList.add("e-ralign"),((h.isPrimaryKey||h.isIdentity)&&"beginEdit"===i.requestType||h.isIdentity&&"add"===i.requestType)&&y.setAttribute("disabled","")}n[h.uid]=y}}return n},i.prototype.destroy=function(){this.renderer.removeEventListener()},i}(),mo=function(){function e(e){this.parent=e}return e.prototype.create=function(e){return Je(this.parent,e.column,"e-field",{type:"text"})},e.prototype.read=function(e){return e.ej2_instances[0].value},e.prototype.destroy=function(){this.obj&&this.obj.destroy()},e}(),yo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vo=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.activeClasses=["e-selectionbackground","e-active"],t}return yo(i,e),i.prototype.create=function(e){var t="e-field e-boolcell";return"checkbox"===e.column.type&&(t="e-field e-boolcell e-edit-checkselect"),Je(this.parent,e.column,t,{type:"checkbox",value:e.value})},i.prototype.read=function(e){return e.checked},i.prototype.write=function(e){var i,r;if(t.isNullOrUndefined(e.row)||(i=e.row.querySelector(".e-edit-checkselect")),pe(e.column.field,e.rowData)&&(r=JSON.parse(pe(e.column.field,e.rowData).toString().toLowerCase())),!t.isNullOrUndefined(i)&&"checkbox"===e.column.type){if(this.editType=this.parent.editSettings.mode,this.editRow=e.row,"add"!==e.requestType){var o=this.parent.getRowObjectFromUID(e.row.getAttribute("data-uid"));r=!!o&&o.isSelected}Z.apply(void 0,[[].slice.call(e.row.getElementsByClassName(bi)),r].concat(this.activeClasses))}this.obj=new n.CheckBox(t.extend({label:"Dialog"!==this.parent.editSettings.mode?" ":e.column.headerText,checked:r,disabled:!Q(e.column,e.requestType,e.element),enableRtl:this.parent.enableRtl,change:this.checkBoxChange.bind(this)},e.column.edit.params)),this.obj.appendTo(e.element)},i.prototype.checkBoxChange=function(e){if(this.editRow&&"Dialog"!==this.editType){var t=!1;e.checked?(t=!0,this.editRow.setAttribute("aria-selected",t.toString())):this.editRow.removeAttribute("aria-selected"),Z.apply(void 0,[[].slice.call(this.editRow.getElementsByClassName(bi)),t].concat(this.activeClasses))}},i}(mo),Co=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),wo=function(e){function r(t){var i=e.call(this)||this;return i.parent=t,i.flag=!1,i}return Co(r,e),r.prototype.write=function(e){var r="Dialog"!==this.parent.editSettings.mode;this.column=e.column;var n=new i.Predicate(e.column.field,"notequal",null,!0,!1),o={};if(e.column.edit.params)for(var l=Object.keys(e.column.edit.params),a=0;a<l.length;a++)o[l[a]]="query"===l[a]?e.column.edit.params[l[a]].clone():e.column.edit.params[l[a]];this.obj=new s.DropDownList(t.extend({dataSource:this.parent.dataSource instanceof i.DataManager?this.parent.dataSource:new i.DataManager(this.parent.dataSource),query:(new i.Query).where(n).select(e.column.field),enabled:Q(e.column,e.requestType,e.element),fields:{value:e.column.field},value:pe(e.column.field,e.rowData),enableRtl:this.parent.enableRtl,actionComplete:this.ddActionComplete.bind(this),created:this.dropdownCreated.bind(this),placeholder:r?"":e.column.headerText,popupHeight:"200px",floatLabelType:r?"Never":"Always",open:this.dropDownOpen.bind(this),sortOrder:"Ascending",beforeOpen:this.dropdownBeforeOpen.bind(this)},o)),this.parent.enableVirtualization&&(this.obj.dataSource=[e.rowData]),this.obj.query.params=this.parent.query.params,this.obj.appendTo(e.element),e.element.setAttribute("name",W(e.column.field))},r.prototype.dropdownCreated=function(e){this.flag=!0},r.prototype.dropdownBeforeOpen=function(){this.parent.enableVirtualization&&(this.obj.dataSource=this.parent.dataSource instanceof i.DataManager?this.parent.dataSource:new i.DataManager(this.parent.dataSource))},r.prototype.ddActionComplete=function(e){e.result=i.DataUtil.distinct(e.result,this.obj.fields.value,!0),this.flag&&this.column.dataSource&&("result"in this.column.dataSource?this.column.dataSource.result=e.result:this.column.dataSource instanceof i.DataManager&&(this.column.dataSource.dataSource.json=e.result)),this.flag=!1},r.prototype.dropDownOpen=function(e){var i=O(this.obj.element,"e-dialog");if("Dialog"===this.parent.editSettings.mode&&!t.isNullOrUndefined(i)){var r=t.select("#"+i.id,document).ej2_instances[0];e.popup.element.style.zIndex=(r.zIndex+1).toString()}},r}(mo),bo=function(){function e(e){this.parent=e}return e.prototype.keyEventHandler=function(e){if(13===e.keyCode||9===e.keyCode){var t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0),this.dispatchEvent(t)}},e.prototype.create=function(e){return this.instances=new t.Internationalization(this.parent.locale),Je(this.parent,e.column,"e-field",{})},e.prototype.read=function(e){return this.obj.value},e.prototype.write=function(e){var i=e.column,r="Dialog"!==this.parent.editSettings.mode;this.obj=new o.NumericTextBox(t.extend({value:parseFloat(pe(e.column.field,e.rowData)),enableRtl:this.parent.enableRtl,placeholder:r?"":e.column.headerText,enabled:Q(e.column,e.requestType,e.element),floatLabelType:"Dialog"!==this.parent.editSettings.mode?"Never":"Always",locale:this.parent.locale},i.edit.params)),e.element.setAttribute("name",W(e.column.field)),this.obj.appendTo(e.element),this.obj.element.addEventListener("keydown",this.keyEventHandler)},e.prototype.destroy=function(){this.obj&&!this.obj.isDestroyed&&(this.obj.element.removeEventListener("keydown",this.keyEventHandler),this.obj.destroy())},e}(),So=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ro=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return So(i,e),i.prototype.create=function(e){var i={type:"text",value:t.isNullOrUndefined(e.value)?"":e.value,style:"text-align:"+e.column.textAlign};return Je(this.parent,e.column,"e-field e-input e-defaultcell",i)},i.prototype.read=function(e){return e.value},i.prototype.write=function(e){var i=e.column,r="Dialog"!==this.parent.editSettings.mode;this.obj=new o.TextBox(t.extend({element:e.element,floatLabelType:"Dialog"!==this.parent.editSettings.mode?"Never":"Always",enableRtl:this.parent.enableRtl,enabled:Q(e.column,e.requestType,e.element),placeholder:r?"":e.column.headerText},i.edit.params)),this.obj.appendTo(e.element)},i}(mo),xo=function(){function e(e,t,i){this.args={},this.currentVirtualData={},this.parent=e,this.renderer=i,this.serviceLocator=t,this.addEventListener()}return e.prototype.clickHandler=function(e){var t=e.target,i=this.parent;(O(t,Ri)&&O(O(t,Ri),"e-grid").id===i.element.id||i.frozenRows&&O(t,Fi))&&!O(t,"e-unboundcelldiv")&&(this.rowIndex=O(t,bi)?parseInt(t.parentElement.getAttribute(Hi),10):-1,i.isEdit&&i.editModule.endEdit())},e.prototype.dblClickHandler=function(e){O(e.target,bi)&&this.parent.editSettings.allowEditOnDblClick&&this.parent.editModule.startEdit(O(e.target,Oi))},e.prototype.editComplete=function(e){this.parent.isEdit=!1;switch(e.requestType){case"save":(this.parent.isCheckBoxSelection||"Multiple"===this.parent.selectionSettings.type)&&this.parent.isPersistSelection||"edit"!==e.action&&this.parent.selectRow(0),this.parent.trigger(St,t.extend(e,{requestType:"save",type:St}));break;case"delete":this.parent.trigger(St,t.extend(e,{requestType:"delete",type:St})),this.parent.isCheckBoxSelection||this.parent.selectRow(this.editRowIndex)}},e.prototype.getEditArgs=function(e,t,i){for(var r=this.parent.getPrimaryKeyFieldNames(),n=[],o=0;o<r.length;o++)n.push(pe(r[o],e));return{primaryKey:r,primaryKeyValue:n,requestType:"beginEdit",rowData:e,rowIndex:this.rowIndex,type:"edit",cancel:!1,foreignKeyData:t&&t.foreignKeyData,target:void 0,isScroll:i}},e.prototype.startEdit=function(e){var i=this,r=this.parent;if(this.rowIndex=this.editRowIndex=parseInt(e.getAttribute(Hi),10),r.enableVirtualization||r.enableInfiniteScrolling){var n='.e-row[aria-rowindex="'+this.rowIndex+'"]';if(!this.parent.element.querySelector(n))return}var o={data:void 0,index:this.rowIndex,isScroll:!1};if(this.parent.notify("virtual-scroll-edit-action-begin",o),ce(r)){var s=r.getRowObjectFromUID(e.getAttribute("data-uid"));this.previousData=s.data}else this.previousData||!this.parent.enableVirtualization&&!this.parent.enableInfiniteScrolling?this.parent.enableVirtualization||(this.previousData=t.extend({},{},r.getCurrentViewRecords()[this.rowIndex],!0)):this.previousData=o.data;var l=t.extend({},{},o.data||this.previousData,!0);this.uid=e.getAttribute("data-uid");var a=r.getRowObjectFromUID(this.uid),h=this.getEditArgs(l,a,o.isScroll);h.row=e,h.isScroll?this.inlineEditHandler(h,e):(this.parent.notify("create-virtual-validation-form",{uid:this.uid,prevData:this.previousData,argsCreator:this.getEditArgs.bind(this),renderer:this.renderer}),r.trigger("beginEdit",h,function(t){t.type="actionBegin",r.trigger(bt,t,function(t){t.cancel||i.inlineEditHandler(t,e)})}))},e.prototype.inlineEditHandler=function(e,t){var i=this.parent;i.isEdit=!0,e.row=e.row?e.row:t,"Dialog"!==i.editSettings.mode&&i.clearSelection(),"Dialog"===i.editSettings.mode&&i.selectionModule&&(i.selectionModule.preventFocus=!0,e.row.classList.add("e-dlgeditrow")),this.renderer.update(e),this.uid=t.getAttribute("data-uid"),i.editModule.applyFormValidation(),e.type="actionComplete",i.trigger(St,e),this.args=e,this.parent.allowTextWrap&&this.parent.notify(oi,{case:"textwrap"})},e.prototype.updateRow=function(e,t){var i=this,r=this.parent;this.editRowIndex=e;var n={requestType:"save",action:"edit",type:bt,data:t,cancel:!1,previousData:r.getCurrentViewRecords()[e],row:r.getRowByIndex(e)};r.showSpinner(),r.notify(ti,n),n.promise?n.promise.then(function(){return r.refresh()}).catch(function(e){return i.edFail(e)}):r.refresh()},e.prototype.editFormValidate=function(){var e=this.parent,t=e.editModule.editFormValidate(),i={prevData:this.previousData,isValid:!0,editIdx:this.editRowIndex,addIdx:this.addedRowIndex};return e.notify("validate-virtual-form",i),t&&i.isValid},e.prototype.endEdit=function(){var e=this.parent;if(this.parent.isEdit&&this.editFormValidate()){var i=t.extend({},{},this.previousData,!0),r=t.extend(this.args,{requestType:"save",type:bt,data:i,cancel:!1,previousData:this.previousData,selectedRow:e.selectedRowIndex,foreignKeyData:{}}),n="Right"===e.getFrozenMode()?1:0,o="Dialog"===e.editSettings.mode,s=t.select("#"+e.element.id+"_dialogEdit_wrapper",document),l=o?s.querySelector(".e-gridform"):e.element.getElementsByClassName("e-gridform")[n],a={virtualData:t.extend({},{},this.previousData,!0),isAdd:!1,isScroll:!1,endEdit:!0};if(this.parent.notify(pi,a),(this.parent.enableVirtualization||this.parent.enableInfiniteScrolling)&&"Normal"===this.parent.editSettings.mode&&Object.keys(a.virtualData).length?this.parent.isEdit&&(this.currentVirtualData=i=r.data=a.virtualData):i=e.editModule.getCurrentEditedData(l,i),e.isFrozenGrid()&&"Normal"===e.editSettings.mode){var h=e.getMovableVirtualHeader().querySelector(".e-gridform"),d=e.getMovableVirtualContent().querySelector(".e-gridform"),c=[h||d],p=void 0,u=void 0,g=[];e.getFrozenMode()===Pi&&(p=e.getFrozenRightHeader().querySelector(".e-gridform"),u=e.getFrozenRightContent().querySelector(".e-gridform"),g=[p||u]),Be(this.parent,function(t,r){for(var n=0,o=r;n<o.length;n++){var s=o[n];s&&(i=e.editModule.getCurrentEditedData(s,i))}},[[],c,g])}var f=[].slice.call(e.element.getElementsByClassName(Ai)).length;if(a.isAdd||!Object.keys(this.currentVirtualData).length||f||(f=1),o?s.getElementsByClassName(Ai).length:f)r.action="edit",e.trigger(bt,r,function(t){t.cancel||(e.showSpinner(),e.notify(ti,t))});else if(r.action="add",r.selectedRow=0,r.index=this.addedRowIndex,e.notify("virtual-scroll-edit-success",{}),e.notify(Lt,r),this.addedRowIndex=null,r.cancel)return}},e.prototype.destroyElements=function(){var e=this.parent;e.editModule.destroyWidgets(),e.editModule.destroyForm(),this.parent.notify(ri,{})},e.prototype.editHandler=function(e){var t=this;e.promise?e.promise.then(function(i){return t.edSucc(i,e)}).catch(function(e){return t.edFail(e)}):this.editSuccess(e.data,e)},e.prototype.edSucc=function(e,t){this.editSuccess(e,t)},e.prototype.edFail=function(e){this.editFailure(e)},e.prototype.updateCurrentViewData=function(e){this.parent.enableVirtualization||this.parent.enableInfiniteScrolling||(this.parent.getCurrentViewRecords()[this.editRowIndex]=e)},e.prototype.requestSuccess=function(e){this.parent.editModule.formObj&&!this.parent.editModule.formObj.isDestroyed&&(this.destroyElements(),this.stopEditStatus(),"Dialog"===this.parent.editSettings.mode&&"add"!==e.action&&this.parent.selectionModule&&this.parent.element.querySelector(".e-dlgeditrow").classList.remove("e-dlgeditrow"))},e.prototype.editSuccess=function(e,i){if(!(t.isNullOrUndefined(e)||e instanceof Array)){i.data=t.extend({},t.extend({},i.rowData,i.data),e)}this.requestSuccess(i),this.parent.trigger("beforeDataBound",i),i.type=St,this.parent.isEdit=!1,this.refreshRow(i.data),this.parent.notify("virtual-scroll-edit-success",i),this.parent.editModule.checkLastRow(i.row),this.parent.editModule.isLastRow=!1,this.updateCurrentViewData(i.data),this.blazorTemplate(),this.editRowIndex=null,this.parent.trigger(St,i),(!this.parent.isCheckBoxSelection&&"Multiple"!==this.parent.selectionSettings.type||!this.parent.isPersistSelection&&!this.parent.selectionSettings.checkboxOnly)&&"Dialog"!==this.parent.editSettings.mode&&this.parent.selectRow(this.rowIndex>-1?this.rowIndex:this.editRowIndex),this.parent.hideSpinner()},e.prototype.closeForm=function(){!this.cloneRow&&this.parent.isEdit&&this.stopEditStatus(),this.cloneRow&&(this.cloneRow.remove(),this.cloneRow=null,this.originalRow.classList.remove("e-hiddenrow")),this.parent.isFrozenGrid()&&this.cloneFrozen&&(this.cloneFrozen.remove(),this.frozen.classList.remove("e-hiddenrow"))},e.prototype.blazorTemplate=function(){var e=this.parent.getColumns();this.parent.editSettings.template&&"Normal"===this.parent.editSettings.mode&&t.updateBlazorTemplate(this.parent.element.id+"editSettingsTemplate","Template",this.parent.editSettings);for(var i=0;i<e.length;i++){var r=e[i];r.template&&t.updateBlazorTemplate(this.parent.element.id+r.uid,"Template",r,!1),r.editTemplate&&t.updateBlazorTemplate(this.parent.element.id+r.uid+"editTemplate","EditTemplate",r)}},e.prototype.editFailure=function(e){this.parent.trigger("actionFailure",{error:e}),this.parent.hideSpinner(),this.parent.log("actionfailure",{error:e})},e.prototype.needRefresh=function(){var e=!0,t=this.parent.element.querySelector(".e-gridform");return!this.parent.enableVirtualization&&!this.parent.infiniteScrollSettings.enableCache||"Normal"!==this.parent.editSettings.mode||t||(e=!1),e},e.prototype.refreshRow=function(e){var t=this.parent.isFrozenGrid(),i=new Vi(this.serviceLocator,null,this.parent),r=this.parent.getRowObjectFromUID(this.uid);if(r){r.changes=e,this.parent.notify("refresh-virtual-cache",e),se(r,this.parent.getForeignKeyColumns(),r.changes),this.needRefresh()&&i.refresh(r,this.parent.getColumns(),!0);var n=[].slice.call(this.parent.element.querySelectorAll('[aria-rowindex="'+r.index+'"]'));if(t&&n.length)for(var o=0;o<n.length;o++){var s=n[o].getAttribute("data-uid");s!==this.uid&&((r=this.parent.getRowObjectFromUID(s)).changes=e,i.refresh(r,this.parent.getColumns(),!0),this.parent.editModule.checkLastRow(n[o]))}}},e.prototype.closeEdit=function(){var e=this;if(this.parent.isEdit){var i=this.parent,r=t.extend(this.args,{requestType:"cancel",type:bt,cancel:!1,data:this.previousData,selectedRow:i.selectedRowIndex});i.notify("virtual-scroll-edit-cancel",r),this.blazorTemplate(),i.trigger(bt,r,function(t){if(!t.cancel){"Dialog"===e.parent.editSettings.mode&&e.parent.notify(ri,{}),i.isEdit=!1,e.stopEditStatus(),t.type=St,"Dialog"!==i.editSettings.mode&&e.refreshRow(t.data);var r=i.groupSettings.enableLazyLoading&&i.groupSettings.columns.length&&!i.getContentTable().querySelector("tr.e-emptyrow");i.getContentTable().querySelector("tr.e-emptyrow")||i.getContentTable().querySelector("tr.e-row")||r||i.renderModule.emptyRow(),"Dialog"!==i.editSettings.mode&&i.selectRow(e.rowIndex),i.trigger(St,t)}})}},e.prototype.addRecord=function(e,r){var n=this,o=this.parent;if(this.addedRowIndex=r=t.isNullOrUndefined(r)?0:r,e)return void o.notify(Lt,{requestType:"save",type:bt,data:e,selectedRow:0,action:"add",index:r});if(!o.isEdit){this.previousData={},this.uid="";var s=o.getColumns(),l={virtualData:{},isScroll:!1};this.parent.notify(pi,l);for(var a=0;a<s.length;a++)l.isScroll&&"movable"!==s[a].getFreezeTableName()||s[a].field&&i.DataUtil.setValue(s[a].field,s[a].defaultValue,this.previousData);var h={cancel:!1,foreignKeyData:{},requestType:"add",data:this.previousData,type:bt,index:r,rowData:this.previousData,target:void 0,isScroll:l.isScroll};(this.parent.enableVirtualization||this.parent.infiniteScrollSettings.enableCache)&&Object.keys(l.virtualData).length&&(h.data=h.rowData=l.virtualData),h.isScroll?this.inlineAddHandler(h):(this.parent.notify("create-virtual-validation-form",{uid:this.uid,prevData:this.previousData,argsCreator:this.getEditArgs.bind(this),renderer:this.renderer}),o.trigger(bt,h,function(e){e.cancel||n.inlineAddHandler(e)}))}},e.prototype.inlineAddHandler=function(e){var t=this.parent;t.isEdit=!0,"Dialog"!==t.editSettings.mode&&t.clearSelection(),this.renderer.addNew(e),t.editModule.applyFormValidation(),e.type=St,e.row=t.element.querySelector("."+Bi),t.trigger(St,e),this.args=e},e.prototype.deleteRecord=function(e,i){if(this.editRowIndex=this.parent.selectedRowIndex,i){i=i instanceof Array?i:[i];var r=this.parent,n=Object.keys(i).length;e=e||this.parent.getPrimaryKeyFieldNames()[0];for(var o=0;o<n;o++)!function(t){var n,o,s=r.currentViewData.some(function(r){return o=r,i[t]===pe(e,r)||i[t]===r});i[t]=s?o:i[t][e]?i[t]:(n={},n[e]=i[t],n)}(o)}var s={requestType:"delete",type:bt,foreignKeyData:{},data:i||this.parent.getSelectedRecords(),tr:this.parent.getSelectedRows(),cancel:!1};if(t.isNullOrUndefined(this.parent.commandDelIndex)||(s.data[0]=this.parent.getRowObjectFromUID(this.parent.getRowByIndex(this.parent.commandDelIndex).getAttribute("data-uid")).data),this.parent.enableVirtualization&&s.data.length>1){var l=this.parent.getSelectedRows()[0].getAttribute("data-uid");s.data=[this.parent.getRowObjectFromUID(l).data]}this.parent.notify(Lt,s)},e.prototype.stopEditStatus=function(){for(var e=this.parent,i=[].slice.call(e.element.getElementsByClassName(Bi)),r=[].slice.call(e.element.getElementsByClassName(Ai)),n=0;n<i.length;n++)t.remove(i[n]);for(n=0;n<r.length;n++)r[n].classList.remove(Ai)},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.evtHandlers=[{event:"crud-Action",handler:this.editHandler},{event:"double-tap",handler:this.dblClickHandler},{event:Gt,handler:this.clickHandler},{event:"recordAdded",handler:this.requestSuccess},{event:"dblclick",handler:this.dblClickHandler},{event:"delete-complete",handler:this.editComplete},{event:"save-complete",handler:this.editComplete},{event:"row-mode-change",handler:this.closeEdit},{event:"closeinline",handler:this.closeForm}],Xe(this.parent,this.evtHandlers,!0,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||Xe(this.parent,this.evtHandlers,!1)},e.prototype.destroy=function(){this.removeEventListener(),this.renderer.destroy()},e}(),Fo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Eo=function(e){function t(t,i,r){var n=e.call(this,t,i)||this;return n.parent=t,n.serviceLocator=i,n.renderer=r,n}return Fo(t,e),t.prototype.closeEdit=function(){e.prototype.closeEdit.call(this)},t.prototype.addRecord=function(t,i){e.prototype.addRecord.call(this,t,i)},t.prototype.endEdit=function(){e.prototype.endEdit.call(this)},t.prototype.updateRow=function(t,i){e.prototype.updateRow.call(this,t,i)},t.prototype.deleteRecord=function(t,i){e.prototype.deleteRecord.call(this,t,i)},t.prototype.startEdit=function(t){e.prototype.startEdit.call(this,t)},t}(xo),Io=function(){function r(e,t,i){this.cellDetails={},this.originalCell={},this.cloneCell={},this.editNext=!1,this.preventSaveCell=!1,this.parent=e,this.serviceLocator=t,this.renderer=i,this.focus=t.getService("focus"),this.addEventListener()}return r.prototype.addEventListener=function(){this.parent.isDestroyed||(this.evtHandlers=[{event:Gt,handler:this.clickHandler},{event:"dblclick",handler:this.dblClickHandler},{event:jt,handler:this.onBeforeCellFocused},{event:"cellfocused",handler:this.onCellFocused},{event:"double-tap",handler:this.dblClickHandler},{event:Vt,handler:this.keyDownHandler},{event:"editNextValCell",handler:this.editNextValCell},{event:"closebatch",handler:this.closeForm}],Xe(this.parent,this.evtHandlers,!0,this),this.dataBoundFunction=this.dataBound.bind(this),this.batchCancelFunction=this.batchCancel.bind(this),this.parent.addEventListener(Rt,this.dataBoundFunction),this.parent.addEventListener("batchCancel",this.batchCancelFunction))},r.prototype.removeEventListener=function(){this.parent.isDestroyed||(Xe(this.parent,this.evtHandlers,!1),this.parent.removeEventListener(Rt,this.dataBoundFunction),this.parent.removeEventListener("batchCancel",this.batchCancelFunction))},r.prototype.batchCancel=function(){this.parent.focusModule.restoreFocus()},r.prototype.dataBound=function(){this.parent.notify("toolbar-refresh",{})},r.prototype.destroy=function(){this.removeEventListener()},r.prototype.clickHandler=function(e){O(e.target,this.parent.element.id+"_add",!0)||(this.parent.isEdit&&t.closest(this.form,"td")!==t.closest(e.target,"td")&&(this.saveCell(),this.editNextValCell()),O(e.target,bi)&&!this.parent.isEdit&&this.setCellIdx(e.target))},r.prototype.dblClickHandler=function(e){var i=O(e.target,bi),r=O(e.target,Oi),n=r&&parseInt(r.getAttribute(Hi),10),o=i&&parseInt(i.getAttribute(qi),10);t.isNullOrUndefined(i)||t.isNullOrUndefined(n)||isNaN(o)||i.parentElement.classList.contains(Ai)||this.editCell(n,this.parent.getColumns()[o].field,this.isAddRow(n))},r.prototype.onBeforeCellFocused=function(e){this.parent.isEdit&&this.validateFormObj()&&(e.byClick||["tab","shiftTab","enter","shiftEnter"].indexOf(e.keyArgs.action)>-1)&&(e.cancel=!0,e.byClick?e.clickArgs.preventDefault():e.keyArgs.preventDefault())},r.prototype.onCellFocused=function(e){var t=this.parent.getFrozenLeftCount(),i=this.parent.getFrozenRightColumnsCount(),r=this.parent.getContent().querySelector("."+Ei),n=this.parent.getHeaderContent().querySelector("."+Ii),o=!(e.container.isContent&&e.container.isDataCell||this.parent.frozenRows&&e.container.isHeader);if(!e.byKey||o)return void(this.parent.isEdit&&o&&this.saveCell());var s=e.container.indexes,l=s[0],a=s[1];if(t&&(r.contains(e.element)||this.parent.frozenRows&&n.contains(e.element))&&(a+=t),i){var h=this.parent.getHeaderContent().querySelector(".e-frozen-right-header");(this.parent.getContent().querySelector(".e-frozen-right-content").contains(e.element)||this.parent.frozenRows&&h.contains(e.element))&&(a+=t+this.parent.getMovableColumnsCount())}this.parent.frozenRows&&e.container.isContent&&(l+=this.parent.frozenRows);var d=this.parent.isEdit;if(!this.parent.element.getElementsByClassName("e-popup-open").length)switch(d=d&&!this.validateFormObj(),e.keyArgs.action){case"tab":case"shiftTab":var c=this.parent.getColumns()[e.indexes[1]];c&&!this.parent.isEdit&&this.editCell(e.indexes[0],c.field),(d||this.parent.isLastCellPrimaryKey)&&this.editCellFromIndex(l,a);break;case"enter":case"shiftEnter":e.keyArgs.preventDefault();var p={cancel:!1,keyArgs:e.keyArgs};this.parent.notify("beforeFocusCellEdit",p),!p.cancel&&d&&this.editCell(l,this.cellDetails.column.field);break;case"f2":this.editCellFromIndex(l,a),this.focus.focus()}},r.prototype.isAddRow=function(e){return this.parent.getDataRows()[e].classList.contains("e-insertedrow")},r.prototype.editCellFromIndex=function(e,t){this.cellDetails.rowIndex=e,this.cellDetails.cellIndex=t,this.editCell(e,this.parent.getColumns()[t].field,this.isAddRow(e))},r.prototype.closeEdit=function(){var e=this,t=this.parent,i=this.parent.getRowsObject(),r={cancel:!1,batchChanges:this.getBatchChanges()};if(t.notify("before-batch-cancel",r),!r.cancel){t.isEdit&&this.saveCell(!0),this.isAdded=!1,t.clearSelection();for(var n,o=Pe(this.parent),s=this,l=0;l<i.length;l++)!function(t){var r=!1,l=i[t].isDirty;Be(s.parent,function(i,n){(r=e.removeBatchElementChanges(n[t],l))&&n.splice(t,1)},o),r&&t--,n=t}(l),l=n;t.getContentTable().querySelector("tr.e-row")||t.renderModule.renderEmptyRow();var a={requestType:"batchCancel",rows:this.parent.getRowsObject()};t.notify("batchCancel",{rows:this.parent.getRowsObject().length?this.parent.getRowsObject():[new vi({isDataRow:!0,cells:[new Ci({isDataCell:!0,visible:!0})]})]}),t.selectRow(this.cellDetails.rowIndex),this.refreshRowIdx(),t.notify("toolbar-refresh",{}),this.parent.notify("tooltip-destroy",{}),a={requestType:"batchCancel",rows:this.parent.getRowsObject()},t.trigger("batchCancel",a)}},r.prototype.removeBatchElementChanges=function(e,i){var r=this.parent,n=new Vi(this.serviceLocator,null,this.parent),o=!1;if(i){e.isDirty=i;var s=r.getRowElementByUID(e.uid);if(s&&(s.classList.contains("e-insertedrow")?(t.remove(s),o=!0):(se(e,this.parent.getForeignKeyColumns(),e.data),delete e.changes,delete e.edit,e.isDirty=!1,t.classList(s,[],["e-hiddenrow","e-updatedtd"]),n.refresh(e,r.getColumns(),!1)),this.parent.aggregates.length>0)){var l=[];l.type="cancel",this.parent.notify("refresh-footer-rendered",l),this.parent.groupSettings.columns.length>0&&this.parent.notify("group-aggregates",l)}}return o},r.prototype.removeHideAndSelection=function(e){if(e.classList.contains("e-hiddenrow")){e.removeAttribute("aria-selected");for(var i=[].slice.call(e.getElementsByClassName("e-selectionbackground")),r=0;r<i.length;r++)t.removeClass([i[r]],["e-selectionbackground","e-active"])}t.classList(e,[],["e-hiddenrow","e-updatedtd"])},r.prototype.deleteRecord=function(e,t){this.saveCell(),this.validateFormObj()&&this.saveCell(!0),this.isAdded=!1,this.bulkDelete(e,t),this.parent.aggregates.length>0&&(this.parent.notify("refresh-footer-rendered",{}),this.parent.groupSettings.columns.length>0&&this.parent.notify("group-aggregates",{}))},r.prototype.addRecord=function(e){this.bulkAddRow(e)},r.prototype.endEdit=function(){this.parent.isEdit&&this.validateFormObj()||this.batchSave()},r.prototype.closeForm=function(){for(var e=0;e<Object.keys(this.originalCell).length;e++)for(var t=0;t<Object.keys(this.cloneCell).length;t++)Object.keys(this.originalCell)[e]===Object.keys(this.cloneCell)[t]&&(this.cloneCell[Object.keys(this.cloneCell)[t]].replaceWith(this.originalCell[Object.keys(this.originalCell)[e]]),this.originalCell[Object.keys(this.originalCell)[e]].classList.contains("e-selectionbackground")&&this.originalCell[Object.keys(this.originalCell)[e]].classList.remove("e-selectionbackground","e-cellselectionbackground","e-active"));this.cloneCell={},this.originalCell={}},r.prototype.validateFormObj=function(){return this.parent.editModule.formObj&&!this.parent.editModule.formObj.validate()},r.prototype.batchSave=function(){var e=this.parent;if(e.isCheckBoxSelection){var i=e.element.querySelector(".e-checkselectall").parentElement;i.classList.contains("e-checkbox-disabled")&&e.pageSettings.totalRecordsCount>e.currentViewData.length&&t.removeClass([i],["e-checkbox-disabled"])}if(this.saveCell(),!(e.isEdit||this.editNextValCell()||e.isEdit)){var r=this.getBatchChanges();"Multiple"===this.parent.selectionSettings.type&&r.deletedRecords.length&&this.parent.selectionSettings.persistSelection&&(r.deletedRecords=this.removeSelectedData,this.removeSelectedData=[]);var n={changedRecords:this.parent.getRowsObject().filter(function(e){return e.isDirty&&-1===["add","delete"].indexOf(e.edit)}).map(function(e){return e.data})},o={batchChanges:r,cancel:!1};e.trigger("beforeBatchSave",o,function(t){t.cancel||(e.showSpinner(),e.notify("bulk-save",{changes:r,original:n}))})}},r.prototype.getBatchChanges=function(){for(var e={addedRecords:[],deletedRecords:[],changedRecords:[]},t=0,i=this.parent.getRowsObject();t<i.length;t++){var r=i[t];if(r.isDirty)switch(r.edit){case"add":e.addedRecords.push(r.changes);break;case"delete":e.deletedRecords.push(r.data);break;default:e.changedRecords.push(r.changes)}}return e},r.prototype.removeRowObjectFromUID=function(e){for(var t=this.parent.getRowsObject(),i=0,r=t.length;i<r&&t[i].uid!==e;i++);Be(this.parent,function(e,t){t.splice(i,1)},Pe(this.parent))},r.prototype.addRowObject=function(e){var t=this.parent,i="Top"===t.editSettings.newRowPosition;Be(this.parent,function(r,n){var o=e.clone();o.cells=Ae(t,o.cells,r),i?n.unshift(o):n.push(o)},Pe(this.parent),!0)},r.prototype.bulkDelete=function(e,i){var r=this;this.removeSelectedData=[];var n=this.parent,o=n.selectedRowIndex,s=n.getSelectedRows(),l={primaryKey:this.parent.getPrimaryKeyFieldNames(),rowIndex:o,rowData:i||n.getSelectedRecords()[0],cancel:!1};(t.isBlazor()&&!this.parent.isJsComponent||(l.row=i?n.editModule.deleteRowUid?n.getRowElementByUID(n.editModule.deleteRowUid):n.getRows()[n.getCurrentViewRecords().indexOf(i)]:i?n.getRows()[o]:s[0],l.row))&&n.trigger("beforeBatchDelete",l,function(e){if(!e.cancel){if(r.removeSelectedData=n.getSelectedRecords(),n.clearSelection(),e.row=e.row?e.row:i?n.getRows()[o]:s[0],r.parent.isFrozenGrid()){i&&(o=parseInt(e.row.getAttribute(Hi),10),(s=[]).push(n.getRowByIndex(o)),s.push(n.getMovableRowByIndex(o)),n.getFrozenMode()===Pi&&s.push(n.getFrozenRightRowByIndex(o)));for(l=0;l<s.length;l++){d=s[l].getAttribute("data-uid");s[l].classList.contains("e-insertedrow")?(r.removeRowObjectFromUID(d),t.remove(s[l])):((c=n.getRowObjectFromUID(d)).isDirty=!0,c.edit="delete",t.classList(s[l],["e-hiddenrow","e-updatedtd"],[]),n.frozenRows&&o<n.frozenRows&&n.getMovableDataRows().length>=n.frozenRows&&(n.getMovableHeaderTbody().appendChild(n.getMovableRowByIndex(n.frozenRows-1)),n.getFrozenHeaderTbody().appendChild(n.getRowByIndex(n.frozenRows-1)),n.getFrozenMode()===Pi&&n.getFrozenRightHeaderTbody().appendChild(n.getFrozenRightRowByIndex(n.frozenRows-1))),n.frozenRows&&o<n.frozenRows&&n.getDataRows().length>=n.frozenRows&&n.getHeaderTable().querySelector(Ui).appendChild(n.getRowByIndex(n.frozenRows-1))),delete s[l]}}else if(r.parent.isFrozenGrid()||1!==s.length&&!i)for(var l=0;l<s.length;l++){var a=s[l].getAttribute("data-uid");if(s[l].classList.contains("e-insertedrow"))r.removeRowObjectFromUID(a),t.remove(s[l]);else{t.classList(s[l],["e-hiddenrow","e-updatedtd"],[]);var h=n.getRowObjectFromUID(a);h.isDirty=!0,h.edit="delete",delete s[l]}}else{var d=e.row.getAttribute("data-uid");if(d=i&&r.parent.editModule.deleteRowUid?d=r.parent.editModule.deleteRowUid:d,e.row.classList.contains("e-insertedrow"))r.removeRowObjectFromUID(d),t.remove(e.row);else{var c=n.getRowObjectFromUID(d);c.isDirty=!0,c.edit="delete",t.classList(e.row,["e-hiddenrow","e-updatedtd"],[])}delete e.row}r.refreshRowIdx(),i&&(n.editModule.deleteRowUid=void 0,n.getSelectedRows().length&&(o=parseInt(n.getSelectedRows()[0].getAttribute(Hi),10))),n.isCheckBoxSelection||n.selectRow(o),n.trigger("batchDelete",e),n.notify("batchDelete",{rows:r.parent.getRowsObject()}),n.notify("toolbar-refresh",{})}})},r.prototype.refreshRowIdx=function(){for(var e,t=this.parent.getAllDataRows(!0),i=Ne(this.parent),r=Pe(this.parent),n=this,o=0,s=0,l=t.length;o<l;o++)!function(o,s,l){t[o].classList.contains(Oi)&&!t[o].classList.contains("e-hiddenrow")?(Be(n.parent,function(e,t,i){t[o].setAttribute(Hi,s.toString()),i[o].index=s},i,null,r),s++):Be(n.parent,function(e,t,i){t[o].removeAttribute(Hi),i[o].index=-1},i,null,r),e=s}(o,s),s=e},r.prototype.getIndexFromData=function(e){return A(e,this.parent.getCurrentViewRecords())},r.prototype.bulkAddRow=function(i){var r=this,n=this.parent;if(n.editSettings.allowAdding&&(n.isEdit&&(this.saveCell(),this.parent.notify("editNextValCell",{})),!n.isEdit)){this.parent.element.classList.add("e-editing");var o={defaultData:i||this.getDefaultData(),primaryKey:n.getPrimaryKeyFieldNames(),cancel:!1};n.trigger("beforeBatchAdd",o,function(o){if(!o.cancel){r.isAdded=!0,n.clearSelection();for(var s,l,a,h,d=new Vi(r.serviceLocator,null,r.parent),c=new Gi(r.parent).generateRows([o.defaultData]),p=d.render(c[0],n.getColumns()),u=0;u<r.parent.groupSettings.columns.length;u++)p.insertBefore(r.parent.createElement("td",{className:"e-indentcell"}),p.firstChild),c[0].cells.unshift(new Ci({cellType:e.CellType.Indent}));var g=n.getContentTable().querySelector(Ui);if(p.classList.add("e-insertedrow"),g.querySelector(".e-emptyrow")){var f=g.querySelector(".e-emptyrow");f.parentNode.removeChild(f),r.removeFrozenTbody()}n.isFrozenGrid()&&(l=p.cloneNode(!0),s=r.renderMovable(p,l),p="Right"===n.getFrozenMode()?l:p,r.renderFrozenAddRow(p,s,l)),g=n.frozenRows&&"Top"===n.editSettings.newRowPosition?n.getHeaderTable().querySelector(Ui):n.getContentTable().querySelector(Ui),"Top"===r.parent.editSettings.newRowPosition?g.insertBefore(p,g.firstChild):g.appendChild(p),t.addClass([].slice.call(p.getElementsByClassName(bi)),["e-updatedtd"]),c[0].isDirty=!0,c[0].changes=t.extend({},{},c[0].data,!0),c[0].edit="add",r.addRowObject(c[0]),r.refreshRowIdx(),r.focus.forgetPrevious(),n.notify("batchAdd",{rows:r.parent.getRowsObject(),args:{isFrozen:r.parent.isFrozenGrid()}});var m=r.getBatchChanges(),y=r.getBottomIndex();"Top"===r.parent.editSettings.newRowPosition?n.selectRow(0):n.selectRow(y),i||(h=r.findNextEditableCell(0,!0),a=n.getColumns()[h],"Top"===r.parent.editSettings.newRowPosition?r.editCell(0,a.field,!0):r.editCell(y,a.field,!0)),r.parent.aggregates.length>0&&(i||m.addedRecords.length)&&r.parent.notify("refresh-footer-rendered",{});var v={defaultData:o.defaultData,row:p,columnObject:a,columnIndex:h,primaryKey:o.primaryKey,cell:p.cells[h]};n.trigger("batchAdd",v),n.isFrozenGrid()&&Re(s.querySelector("td:not(.e-hide)"),p.querySelector("td:not(.e-hide)"))}})}},r.prototype.renderFrozenAddRow=function(e,i,r){var n=this.parent,o=je(this.parent),s=Ve(this.parent);"Top"===n.editSettings.newRowPosition?o.insertBefore(i,o.firstChild):o.appendChild(i),t.addClass([].slice.call(i.getElementsByClassName(bi)),["e-updatedtd"]),s&&r&&("Top"===n.editSettings.newRowPosition?s.insertBefore(r,s.firstChild):s.appendChild(r),t.addClass([].slice.call(r.getElementsByClassName(bi)),["e-updatedtd"]),Re(r.querySelector("td:not(.e-hide)"),e.querySelector("td:not(.e-hide)"))),"auto"===n.height&&n.notify("frozenHeight",{})},r.prototype.removeFrozenTbody=function(){var e=this.parent;if(e.isFrozenGrid()){var t=e.getContent().querySelector("."+Ei).querySelector(Ui);if(t.firstElementChild.parentNode.removeChild(t.firstElementChild),e.getFrozenMode()===Pi){var i=e.getContent().querySelector(".e-frozen-right-content").querySelector(Ui);i.firstElementChild.parentNode.removeChild(i.firstElementChild)}}},r.prototype.renderMovable=function(e,t){var i=e.cloneNode(!0),r=this.parent.getMovableColumnsCount(),n=this.parent.getFrozenLeftCount(),o=this.parent.getFrozenRightColumnsCount();return Le(e,0,n),Le(i,n,o?i.children.length-o:i.children.length),Le(t,n+r,t.children.length),i},r.prototype.findNextEditableCell=function(e,i,r){for(var n,o=this.parent.getColumns(),s=o.length,l=e;l<s;l++){if(n=!!r&&t.isNullOrUndefined(o[l].validationRules),!i&&this.checkNPCell(o[l]))return l;if(i&&!o[l].template&&o[l].visible&&o[l].allowEditing&&(!o[l].isIdentity||!o[l].isPrimaryKey)&&!n)return l}return-1},r.prototype.checkNPCell=function(e){return!e.template&&e.visible&&!e.isPrimaryKey&&!e.isIdentity&&e.allowEditing},r.prototype.getDefaultData=function(){for(var e={},i={number:0,string:null,boolean:!1,date:null,datetime:null},r=0,n=this.parent.columnModel;r<n.length;r++){var o=n[r];o.field&&t.setValue(o.field,Object.keys(o).indexOf("defaultValue")>=0?o.defaultValue:i[o.type],e)}return e},r.prototype.setCellIdx=function(e){var t=0;this.parent.allowGrouping&&(t=this.parent.groupSettings.columns.length),this.cellDetails.cellIndex=e.cellIndex-t,this.cellDetails.rowIndex=parseInt(e.getAttribute("index"),10)},r.prototype.editCell=function(e,t,i){var r=this.parent,n=r.getColumnByField(t);this.index=e,this.field=t,this.isAdd=i;var o=r.isEdit&&!(this.cellDetails.column.field===t&&this.cellDetails.rowIndex===e&&this.parent.getDataRows().length-1!==e);r.editSettings.allowEditing&&(!o&&n.allowEditing?this.editCellExtend(e,t,i):o&&(this.editNext=!0,this.saveCell()))},r.prototype.editCellExtend=function(e,i,r){var n=this,o=this.parent,s=o.getColumnByField(i),l=o.getPrimaryKeyFieldNames();if(!o.isEdit){var a,h,d=t.extend({},{},this.getDataByIndex(e),!0);if("movable"===s.getFreezeTableName()||s.getFreezeTableName()===Ni?(a="movable"===s.getFreezeTableName()?o.getMovableDataRows()[e]:o.getFrozenRightDataRows()[e],h=this.parent.getRowObjectFromUID(a.getAttribute("data-uid")),d=h.changes?t.extend({},{},h.changes,!0):d):(a=o.getDataRows()[e],d=t.extend({},{},this.getDataByIndex(e),!0)),l[0]===s.field&&!a.classList.contains("e-insertedrow")||s.columns||s.isPrimaryKey&&s.isIdentity)return void(this.parent.isLastCellPrimaryKey=!0);this.parent.isLastCellPrimaryKey=!1,this.parent.element.classList.add("e-editing");var c=o.getRowObjectFromUID(a.getAttribute("data-uid")),p=[].slice.apply(a.cells),u={columnName:s.field,isForeignKey:!t.isNullOrUndefined(s.foreignKeyValue),primaryKey:l,rowData:d,validationRules:t.extend({},s.validationRules?s.validationRules:{}),value:pe(s.field,d),type:r?"add":"edit",cancel:!1,foreignKeyData:c&&c.foreignKeyData};(t.isBlazor()&&!this.parent.isJsComponent||(u.cell=p[this.getColIndex(p,this.getCellIdx(s.uid))],u.row=a,u.columnObject=s,u.cell))&&o.trigger("cellEdit",u,function(i){i.cancel||(i.cell=i.cell?i.cell:p[n.getColIndex(p,n.getCellIdx(s.uid))],i.row=i.row?i.row:a,i.columnObject=i.columnObject?i.columnObject:s,i.columnObject.index=t.isNullOrUndefined(i.columnObject.index)?0:i.columnObject.index,n.cellDetails={rowData:d,column:s,value:i.value,isForeignKey:i.isForeignKey,rowIndex:e,cellIndex:parseInt(i.cell.getAttribute(qi),10),foreignKeyData:i.foreignKeyData},i.cell.classList.contains("e-updatedtd")&&(n.isColored=!0,i.cell.classList.remove("e-updatedtd")),o.isEdit=!0,o.clearSelection(),o.isCheckBoxSelection&&o.isPersistSelection||o.selectRow(n.cellDetails.rowIndex,!0),n.renderer.update(i),n.parent.notify("batcheditform-rendered",i),n.form=t.select("#"+o.element.id+"EditForm",o.element),o.editModule.applyFormValidation([s]),n.parent.element.querySelector(".e-gridpopup").style.display="none")})}},r.prototype.updateCell=function(e,t,i){var r=this.parent,n=r.getColumnByField(t),o=r.getColumnIndexByField(t);if(n&&!n.isPrimaryKey&&n.allowEditing){var s=He(this.parent,n,e,o),l="movable"===n.getFreezeTableName()?this.parent.getMovableRowsObject()[e]:n.getFreezeTableName()===Ni?r.getFrozenRightRowsObject()[e]:r.getRowObjectFromUID(s.parentElement.getAttribute("data-uid"));this.refreshTD(s,n,l,i),this.parent.trigger("queryCellInfo",{cell:this.newReactTd||s,column:n,data:l.changes})}},r.prototype.setChanges=function(e,r,n){var o;if(this.parent.isFrozenGrid()){var s=this.parent.getRowElementByUID(e.uid),l=parseInt(s.getAttribute(Hi),10);(o=this.parent.getRowsObject()[l]).changes||(o.changes=t.extend({},{},e.data,!0)),t.isNullOrUndefined(r)||t.setValue(r,n,o.changes);var a=this.parent.getMovableRowsObject()[l];if(a.changes=t.extend({},{},o.changes,!0),e.data[r]!==n&&(a.isDirty=!0,o.isDirty=!0),this.parent.getFrozenMode()===Pi){var h=this.parent.getFrozenRightRowsObject()[l];h.changes=t.extend({},{},o.changes,!0),e.data[r]!==n&&(h.isDirty=!0)}}else if(e.changes||(e.changes=t.extend({},{},e.data,!0)),t.isNullOrUndefined(r)||i.DataUtil.setValue(r,n,e.changes),e.data[r]!==n){var d=this.parent.getColumnByField(r).type;"date"===d||"datetime"===d?new Date(e.data[r]).toString()!==new Date(n).toString()&&(e.isDirty=!0):e.isDirty=!0}},r.prototype.updateRow=function(e,t){for(var i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];this.updateCell(e,n,t[n])}},r.prototype.getCellIdx=function(e){var i=this.parent.getColumnIndexByUid(e)+this.parent.groupSettings.columns.length;return t.isNullOrUndefined(this.parent.detailTemplate)&&t.isNullOrUndefined(this.parent.childGrid)||i++,this.parent.isRowDragable()&&i++,i},r.prototype.refreshTD=function(e,i,r,n){var o,s=new $i(this.parent,this.serviceLocator);n="number"!==i.type||t.isNullOrUndefined(n)?n:parseFloat(n),this.setChanges(r,i.field,n);var l=this.parent.getFrozenColumns()||this.parent.getFrozenLeftColumnsCount()||this.parent.getFrozenRightColumnsCount();l=l&&this.parent.isRowDragable()?l+1:l,se(r,this.parent.getForeignKeyColumns(),r.changes),o=l&&"movable"===i.getFreezeTableName()&&this.parent.getColumns().length===r.cells.length?r.cells.slice(l,r.cells.length):r.cells;var a,h;this.parent.isReact&&(a=e.parentElement,h=e.cellIndex);var d=0;l&&(d="movable"===i.getFreezeTableName()&&"Right"!==this.parent.getFrozenMode()?l:i.getFreezeTableName()===Ni?this.parent.getFrozenLeftColumnsCount()+this.parent.getMovableColumnsCount():d),s.refreshTD(e,o[this.getCellIdx(i.uid)-d],r.changes,{index:this.getCellIdx(i.uid)}),this.parent.isReact?(this.newReactTd=a.cells[h],a.cells[h].classList.add("e-updatedtd")):e.classList.add("e-updatedtd"),e.classList.add("e-updatedtd"),this.parent.notify("toolbar-refresh",{})},r.prototype.getColIndex=function(e,i){var r=0;this.parent.allowGrouping&&this.parent.groupSettings.columns&&(r=this.parent.groupSettings.columns.length),t.isNullOrUndefined(this.parent.detailTemplate)&&t.isNullOrUndefined(this.parent.childGrid)||r++,this.parent.isRowDragable()&&r++;for(var n=0;n<e.length;n++)if(parseInt(e[n].getAttribute(qi),10)===i-r)return n;return-1},r.prototype.editNextValCell=function(){var e=this.parent,t=this.getBottomIndex();if(this.isAdded&&!e.isEdit){for(var i=this.cellDetails.cellIndex;i<e.getColumns().length;i++){if(e.isEdit)return;var r=this.findNextEditableCell(this.cellDetails.cellIndex+1,!0,!0),n=e.getColumns()[r];if(n){if("Bottom"===this.parent.editSettings.newRowPosition)this.editCell(t,n.field,!0);else{var o={index:0,column:n};this.parent.notify("next-cell-index",o),this.editCell(o.index,n.field,!0)}this.saveCell()}}e.isEdit||(this.isAdded=!1)}},r.prototype.escapeCellEdit=function(){var e=this.generateCellArgs();e.value=e.previousValue,this.successCallBack(e,e.cell.parentElement,e.column,!0)(e)},r.prototype.generateCellArgs=function(){var e=this.parent;this.parent.element.classList.remove("e-editing");var i=this.cellDetails.column,r={};r[i.field]=pe(i.field,this.cellDetails.rowData);var n=e.editModule.getCurrentEditedData(this.form,r),o=t.extend({},n);n=t.extend({},n,this.cellDetails.rowData);var s=pe(i.field,o);t.isNullOrUndefined(i.field)||t.isUndefined(s)||t.setValue(i.field,s,n);var l={columnName:i.field,value:pe(i.field,n),rowData:this.cellDetails.rowData,column:i,previousValue:this.cellDetails.value,isForeignKey:this.cellDetails.isForeignKey,cancel:!1};return t.isBlazor()&&!this.parent.isJsComponent||(l.cell=this.form.parentElement,l.columnObject=i),l},r.prototype.saveCell=function(e){if(!this.preventSaveCell&&this.form){var t=this.parent;if(e||t.isEdit&&!this.validateFormObj()){this.preventSaveCell=!0;var i=this.generateCellArgs(),r=i.cell.parentElement,n=i.column;e?this.successCallBack(i,r,n)(i):(t.trigger("cellSave",i,this.successCallBack(i,r,n)),t.notify("batchedit-form",{formObj:this.form}))}}},r.prototype.successCallBack=function(e,i,r,n){var o=this;return function(e){var s=o.parent;if(e.cell=e.cell?e.cell:o.form.parentElement,e.columnObject=e.columnObject?e.columnObject:r,e.columnObject.index=t.isNullOrUndefined(e.columnObject.index)?0:e.columnObject.index,e.cancel){if(o.preventSaveCell=!1,o.editNext){if(o.editNext=!1,o.cellDetails.rowIndex===o.index&&o.cellDetails.column.field===o.field)return;o.editCellExtend(o.index,o.field,o.isAdd)}}else{s.editModule.destroyWidgets([r]),s.isEdit=!1,s.editModule.destroyForm(),o.parent.notify("tooltip-destroy",{});var l=O(e.cell,Ei)||O(e.cell,Ii)?s.getRowObjectFromUID(i.getAttribute("data-uid"),!0):s.getRowObjectFromUID(i.getAttribute("data-uid"));if(s.getFrozenMode()===Pi&&(O(e.cell,"e-frozen-right-header")||O(e.cell,"e-frozen-right-content"))&&(l=s.getRowObjectFromUID(i.getAttribute("data-uid"),!1,!0)),o.refreshTD(e.cell,r,l,e.value),o.parent.isReact&&(e.cell=o.newReactTd),t.removeClass([i],[Ai,"e-batchrow"]),t.removeClass([e.cell],["e-editedbatchcell","e-boolcell"]),(!t.isNullOrUndefined(e.value)&&e.value.toString()===(t.isNullOrUndefined(o.cellDetails.value)?"":o.cellDetails.value).toString()&&!o.isColored||t.isNullOrUndefined(e.value)&&t.isNullOrUndefined(l.data[r.field])&&t.isNullOrUndefined(o.cellDetails.value)&&!e.cell.parentElement.classList.contains("e-insertedrow"))&&e.cell.classList.remove("e-updatedtd"),t.isNullOrUndefined(n)&&s.trigger("cellSaved",e),s.notify("toolbar-refresh",{}),o.isColored=!1,o.parent.aggregates.length>0&&(o.parent.notify("refresh-footer-rendered",{}),o.parent.groupSettings.columns.length>0&&!o.isAddRow(o.cellDetails.rowIndex)&&o.parent.notify("group-aggregates",{})),o.preventSaveCell=!1,o.editNext){if(o.editNext=!1,o.cellDetails.rowIndex===o.index&&o.cellDetails.column.field===o.field)return;var a=s.getColumnByField(o.field);a&&a.allowEditing&&o.editCellExtend(o.index,o.field,o.isAdd)}n&&s.notify("restore-Focus",{})}}},r.prototype.getDataByIndex=function(e){var t=this.parent.getRowObjectFromUID(this.parent.getDataRows()[e].getAttribute("data-uid"));return t.changes?t.changes:t.data},r.prototype.keyDownHandler=function(e){if(("tab"===e.action||"shiftTab"===e.action)&&this.parent.isEdit){var t=this.parent,i=this.getBottomIndex(),r=O(e.target,bi);if(r){var n=r.querySelector(".e-field");if(n){var o=this.parent.getVisibleColumns();o["tab"===e.action?o.length-1:0].field===n.getAttribute("id").slice(this.parent.element.id.length)&&(this.cellDetails.rowIndex===i&&"tab"===e.action?"Top"===t.editSettings.newRowPosition?(t.editSettings.newRowPosition="Bottom",this.addRecord(),t.editSettings.newRowPosition="Top"):this.addRecord():this.saveCell())}}}},r.prototype.addCancelWhilePaging=function(){this.validateFormObj()&&(this.parent.notify("destroy-form",{}),this.parent.isEdit=!1,this.isColored=!1)},r.prototype.getBottomIndex=function(){var e=this.getBatchChanges();return this.parent.getCurrentViewRecords().length+e.addedRecords.length-e.deletedRecords.length-1},r}(),To=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zo=function(e){function t(t,i,r){var n=e.call(this,t,i)||this;return n.parent=t,n.serviceLocator=i,n.renderer=r,n}return To(t,e),t.prototype.closeEdit=function(){e.prototype.closeEdit.call(this)},t.prototype.addRecord=function(t,i){e.prototype.addRecord.call(this,t,i)},t.prototype.endEdit=function(){e.prototype.endEdit.call(this)},t.prototype.updateRow=function(t,i){e.prototype.updateRow.call(this,t,i)},t.prototype.deleteRecord=function(t,i){e.prototype.deleteRecord.call(this,t,i)},t.prototype.startEdit=function(t){e.prototype.startEdit.call(this,t)},t}(xo),Do=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mo=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Do(i,e),i.prototype.write=function(e){"datepickeredit"===e.column.editType?this.obj=new l.DatePicker(t.extend(et(e,this.parent.editSettings.mode,this.parent.enableRtl),e.column.edit.params)):"datetimepickeredit"===e.column.editType&&(this.obj=new l.DateTimePicker(t.extend(et(e,this.parent.editSettings.mode,this.parent.enableRtl),e.column.edit.params))),this.obj.appendTo(e.element)},i}(mo),Oo=function(){function e(e){this.parent=e}return e.prototype.read=function(e,t){return t},e.prototype.write=function(){},e.prototype.destroy=function(){},e}(),ko=function(){function e(e,t){this.editType={Inline:Eo,Normal:Eo,Batch:Io,Dialog:zo},this.parent=e,this.serviceLocator=t,this.l10n=this.serviceLocator.getService("localization"),this.addEventListener(),this.updateEditObj(),this.createAlertDlg(),this.createConfirmDlg()}return e.prototype.updateColTypeObj=function(){for(var i=this.parent.columnModel,r=0;r<i.length;r++)if(this.parent.editSettings.template||i[r].editTemplate){i[r].edit=t.extend(new e.editCellType.templateedit(this.parent),i[r].edit||{})}else i[r].edit=t.extend(new e.editCellType[i[r].editType&&e.editCellType[i[r].editType]?i[r].editType:"defaultedit"](this.parent,this.serviceLocator),i[r].edit||{});this.parent.log("primary_column_missing")},e.prototype.getModuleName=function(){return"edit"},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName())for(var t=this.parent,i=0,r=Object.keys(e.properties);i<r.length;i++)switch(r[i]){case"allowAdding":case"allowDeleting":case"allowEditing":(t.editSettings.allowAdding||t.editSettings.allowEditing||t.editSettings.allowDeleting)&&this.initialEnd();break;case"mode":this.updateEditObj(),t.isEdit=!1,t.refresh()}},e.prototype.updateEditObj=function(){this.editModule&&this.editModule.destroy(),this.renderer=new fo(this.parent,this.serviceLocator),this.editModule=new this.editType[this.parent.editSettings.mode](this.parent,this.serviceLocator,this.renderer)},e.prototype.initialEnd=function(){this.updateColTypeObj()},e.prototype.startEdit=function(e){var t=this.parent;if(t.editSettings.allowEditing&&!t.isEdit&&"Batch"!==t.editSettings.mode){if(this.parent.element.classList.add("e-editing"),t.getSelectedRows().length)e||(e=t.getSelectedRows()[0]);else if(!e)return void this.showDialog("EditOperationAlert",this.alertDObj);this.isLastRow=e.rowIndex===this.parent.getContent().querySelector("tr:last-child").rowIndex,"none"!==e.style.display&&(this.editModule.startEdit(e),this.refreshToolbar(),t.element.querySelector(".e-gridpopup").style.display="none",this.parent.notify("start-edit",{}))}},e.prototype.checkLastRow=function(e,i){var r=this.isLastRow;"auto"!==this.parent.height&&"Bottom"===this.parent.editSettings.newRowPosition&&i&&"add"===i.requestType&&this.parent.height>this.parent.getContentTable().scrollHeight?t.addClass([].slice.call(e.getElementsByClassName(bi)),"e-lastrowadded"):r&&e&&e.classList&&t.addClass([].slice.call(e.getElementsByClassName(bi)),"e-lastrowcell")},e.prototype.closeEdit=function(){if("Batch"===this.parent.editSettings.mode&&this.parent.editSettings.showConfirmDialog&&this.parent.element.getElementsByClassName("e-updatedtd").length)return void this.showDialog("CancelEdit",this.dialogObj);this.parent.element.classList.remove("e-editing"),this.editModule.closeEdit(),this.refreshToolbar(),this.parent.notify("close-edit",{})},e.prototype.refreshToolbar=function(){this.parent.notify("toolbar-refresh",{})},e.prototype.addRecord=function(e,t){if(this.parent.editSettings.allowAdding){var i={startEdit:!0};e||this.parent.notify("virtual-scroll-add-action-begin",i),i.startEdit&&(this.parent.element.classList.add("e-editing"),this.editModule.addRecord(e,t),this.refreshToolbar(),this.parent.notify("start-add",{}))}},e.prototype.deleteRecord=function(e,i){var r=this.parent;if(r.editSettings.allowDeleting)return i||r.getSelectedRecords().length||!t.isNullOrUndefined(r.commandDelIndex)?r.editSettings.showDeleteConfirmDialog?void this.showDialog("ConfirmDelete",this.dialogObj):void this.editModule.deleteRecord(e,i):void this.showDialog("DeleteOperationAlert",this.alertDObj)},e.prototype.deleteRow=function(e){this.deleteRowUid=e.getAttribute("data-uid");var i=this.parent.getRowObjectFromUID(this.deleteRowUid);t.isNullOrUndefined(i)||this.deleteRecord(null,i.data)},e.prototype.endEdit=function(){if("Batch"===this.parent.editSettings.mode&&this.parent.editSettings.showConfirmDialog&&(t.isNullOrUndefined(this.formObj)||this.formObj.validate())&&(this.parent.editModule.saveCell(),this.parent.notify("editNextValCell",{}),t.isNullOrUndefined(this.formObj)||this.formObj.validate()))return void this.showDialog("BatchSaveConfirm",this.dialogObj);this.endEditing()},e.prototype.updateCell=function(e,t,i){this.editModule.updateCell(e,t,i)},e.prototype.updateRow=function(e,t){this.editModule.updateRow(e,t)},e.prototype.batchCancel=function(){this.closeEdit()},e.prototype.batchSave=function(){this.endEdit()},e.prototype.editCell=function(e,t){this.editModule.editCell(e,t)},e.prototype.editFormValidate=function(){var e=!this.formObj||this.formObj.validate(),t=!this.mFormObj||this.mFormObj.validate(),i=!this.frFormObj||this.frFormObj.validate();return e&&t&&i},e.prototype.getBatchChanges=function(){return this.editModule.getBatchChanges?this.editModule.getBatchChanges():{}},e.prototype.getCurrentEditCellData=function(){var e=this.getCurrentEditedData(this.formObj.element,{});return e[Object.keys(e)[0]]},e.prototype.saveCell=function(){this.editModule.saveCell()},e.prototype.endEditing=function(){this.parent.element.classList.remove("e-editing"),this.editModule.endEdit(),this.refreshToolbar()},e.prototype.showDialog=function(e,t){t.content="<div>"+this.l10n.getConstant(e)+"</div>",t.dataBind(),t.show()},e.prototype.getValueFromType=function(e,t){var i=t;switch(e.type){case"number":i=isNaN(parseFloat(t))?null:parseFloat(t);break;case"boolean":"booleanedit"!==e.editType&&(i=t===this.l10n.getConstant("True")||!0===t);break;case"date":case"datetime":"datepickeredit"!==e.editType&&"datetimepickeredit"!==e.editType&&t&&t.length?i=new Date(t):""===t&&(i=null)}return i},e.prototype.destroyToolTip=function(){for(var e=0,i=[].slice.call(this.parent.element.getElementsByClassName("e-griderror"));e<i.length;e++){var r=i[e];t.remove(r)}this.parent.getContent().firstElementChild.style.position="relative"},e.prototype.createConfirmDlg=function(){this.dialogObj=this.dlgWidget([{click:this.dlgOk.bind(this),buttonModel:{content:this.l10n.getConstant("OKButton"),cssClass:"e-primary",isPrimary:!0}},{click:this.dlgCancel.bind(this),buttonModel:{cssClass:"e-flat",content:this.l10n.getConstant("CancelButton")}}],"EditConfirm")},e.prototype.createAlertDlg=function(){this.alertDObj=this.dlgWidget([{click:this.alertClick.bind(this),buttonModel:{content:this.l10n.getConstant("OKButton"),cssClass:"e-flat",isPrimary:!0}}],"EditAlert")},e.prototype.alertClick=function(){this.alertDObj.hide()},e.prototype.dlgWidget=function(e,t){var i=this.parent.createElement("div",{id:this.parent.element.id+t});this.parent.element.appendChild(i);var n={showCloseIcon:!1,isModal:!0,visible:!1,closeOnEscape:!0,target:this.parent.element,width:"320px",animationSettings:{effect:"None"}};n.buttons=e;var o=new r.Dialog(n);return o.isStringTemplate=!0,o.appendTo(i),o},e.prototype.dlgCancel=function(){this.parent.focusModule.clearIndicator(),this.parent.focusModule.restoreFocus(),this.dialogObj.hide()},e.prototype.dlgOk=function(){switch(this.dialogObj.element.querySelector(".e-dlg-content").firstElementChild.innerText){case this.l10n.getConstant("ConfirmDelete"):this.editModule.deleteRecord();break;case this.l10n.getConstant("CancelEdit"):this.editModule.closeEdit();break;case this.l10n.getConstant("BatchSaveConfirm"):this.endEditing();break;case this.l10n.getConstant("BatchSaveLostChanges"):"Batch"===this.parent.editSettings.mode&&this.editModule.addCancelWhilePaging(),this.executeAction()}this.dlgCancel()},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.eventDetails=[{event:Nt,handler:this.onPropertyChanged},{event:Ot,handler:this.initialEnd},{event:Vt,handler:this.keyPressHandler},{event:ei,handler:this.updateColTypeObj},{event:"tooltip-destroy",handler:this.destroyToolTip},{event:ii,handler:this.preventBatch},{event:"destroy-form",handler:this.destroyForm}],Xe(this.parent,this.eventDetails,!0,this),this.actionBeginFunction=this.onActionBegin.bind(this),this.actionCompleteFunction=this.actionComplete.bind(this),this.parent.addEventListener(bt,this.actionBeginFunction),this.parent.addEventListener(St,this.actionCompleteFunction))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(Xe(this.parent,this.eventDetails,!1),this.parent.removeEventListener(St,this.actionCompleteFunction),this.parent.removeEventListener(bt,this.actionBeginFunction))},e.prototype.actionComplete=function(e){["add","beginEdit","save","delete","cancel"].indexOf(e.requestType)<0&&(this.parent.isEdit=!1),"batchsave"===e.requestType&&this.parent.focusModule.restoreFocus(),this.refreshToolbar()},e.prototype.getCurrentEditedData=function(e,r){var n=this.parent;if(n.editSettings.template){for(var o=[].slice.call(e.elements),s=0;s<o.length;s++)if((o[s].hasAttribute("name")&&"e-multi-hidden"!==o[s].className||o[s].classList.contains("e-multiselect"))&&("hidden"!==o[s].type||!O(o[s],"e-switch-wrapper")&&!O(o[s],"e-checkbox-wrapper"))){var l=K(o[s].hasAttribute("name")?o[s].getAttribute("name"):o[s].getAttribute("id")),a=n.getColumnByField(l)||{field:l,type:o[s].getAttribute("type")},h=void 0;"checkbox"===a.type||"boolean"===a.type?h=o[s].checked:o[s].value?(h=o[s].value,o[s].ej2_instances&&o[s].ej2_instances.length&&!t.isNullOrUndefined(o[s].ej2_instances[0].value)&&(o[s].blur(),h=o[s].ej2_instances[0].value,"date"!==a.type&&"dateTime"!==a.type&&"datetime"!==a.type||!o[s].ej2_instances[0].isServerRendered||(h=o[s].value))):o[s].ej2_instances&&(h=o[s].ej2_instances[0].value),a.edit&&"string"==typeof a.edit.read?h=t.getValue(a.edit.read,window)(o[s],h):a.edit&&a.edit.read&&(h=a.edit.read(o[s],h)),h=n.editModule.getValueFromType(a,h),"radio"===o[s].type?o[s].checked&&i.DataUtil.setValue(a.field,h,r):i.DataUtil.setValue(a.field,h,r)}return r}for(var d=n.columnModel.filter(function(e){return e.editTemplate}),c=0;c<d.length;c++)if(e[W(d[c].field)]){var p=[].slice.call(e[W(d[c].field)]),u=(p=p.length?p:[e[W(d[c].field)]]).filter(function(e){return!t.isNullOrUndefined(e.ej2_instances)});0===u.length&&(u=p.filter(function(e){return e.hasAttribute("name")}));for(s=0;s<u.length;s++){h=this.getValue(d[c],u[s],r);i.DataUtil.setValue(d[c].field,h,r)}}for(var g=[].slice.call(e.getElementsByClassName("e-field")),f=0,m=g.length;f<m;f++){var y=n.getColumnByUid(g[f].getAttribute("e-mappinguid"));if(y&&y.field){h=this.getValue(y,g[f],r);i.DataUtil.setValue(y.field,h,r)}}return r},e.prototype.getValue=function(e,i,r){var n=i.ej2_instances?i.ej2_instances[0].value:i.value,o=this.parent,s=e.edit.read;return"checkbox"!==e.type&&"boolean"!==e.type||(n=i.checked),"string"==typeof s?(s=t.getValue(s,window),n=o.editModule.getValueFromType(e,s(i,n))):n=o.editModule.getValueFromType(e,e.edit.read(i,n)),t.isNullOrUndefined(r[e.field])&&""===n&&(n=r[e.field]),n},e.prototype.onActionBegin=function(e){if("columnstate"===e.requestType&&this.parent.isEdit&&"Batch"!==this.parent.editSettings.mode)this.closeEdit();else{var t=this.parent.element.querySelector("."+Ai),i=this.parent.element.querySelector("."+Bi);if(t&&this.parent.frozenRows&&"virtualscroll"===e.requestType&&parseInt(O(t,Oi).getAttribute(Hi),10)<this.parent.frozenRows)return;var r=-1===["filterafteropen","filterbeforeopen","filterchoicerequest","save","infiniteScroll","virtualscroll"].indexOf(e.requestType),n=this.parent.enableVirtualization&&this.formObj&&!this.formObj.isDestroyed&&(t||i||"cancel"===e.requestType)&&r;(!this.parent.enableVirtualization&&"Batch"!==this.parent.editSettings.mode&&this.formObj&&!this.formObj.isDestroyed&&r&&!e.cancel||n)&&(this.destroyWidgets(),this.destroyForm())}},e.prototype.destroyWidgets=function(e){this.parent.editSettings.template&&(this.parent.destroyTemplate(["editSettingsTemplate"]),this.parent.isReact&&this.parent.renderTemplates()),(e=e||this.parent.getCurrentVisibleColumns(this.parent.enableColumnVirtualization)).some(function(e){return!t.isNullOrUndefined(e.editTemplate)})&&(this.parent.destroyTemplate(["editTemplate"]),this.parent.isReact&&this.parent.renderTemplates());for(var i=0,r=e;i<r.length;i++){var n=r[i],o=n.edit.destroy;n.edit.destroy&&("string"==typeof o?(o=t.getValue(o,window))():n.edit.destroy())}for(var s=[].slice.call(this.formObj.element.elements),l=0;l<s.length;l++)s[l].hasAttribute("name")&&s[l].ej2_instances&&s[l].ej2_instances.length&&!s[l].ej2_instances[0].isDestroyed&&s[l].ej2_instances[0].destroy()},e.prototype.destroyForm=function(){this.destroyToolTip();for(var e=[this.formObj,this.mFormObj,this.frFormObj,this.virtualFormObj],t=0;t<e.length;t++)e[t]&&e[t].element&&!e[t].isDestroyed&&e[t].destroy();this.destroyToolTip()},e.prototype.destroy=function(){var e=this.parent.element;if(e){var i=!(!e.querySelector("."+Si)||!e.querySelector("."+Ri));i&&this.destroyForm(),this.removeEventListener();var r=this.dialogObj.element;r.childElementCount>0&&(this.dialogObj.destroy(),t.remove(r)),(r=this.alertDObj.element).childElementCount>0&&(this.alertDObj.destroy(),t.remove(r)),i&&this.editModule&&this.editModule.destroy()}},e.prototype.keyPressHandler=function(e){switch(e.action){case"insert":this.addRecord();break;case"delete":"INPUT"===e.target.tagName&&!e.target.classList.contains("e-checkselect")||document.querySelector(".e-popup-open")||this.deleteRecord();break;case"f2":this.startEdit();break;case"enter":O(e.target,"e-unboundcelldiv")||"Batch"===this.parent.editSettings.mode||!(O(e.target,Ri)||this.parent.frozenRows&&O(e.target,Fi))||document.getElementsByClassName("e-popup-open").length||(e.preventDefault(),this.endEdit());break;case"escape":this.parent.isEdit&&("Batch"===this.parent.editSettings.mode?this.editModule.escapeCellEdit():this.closeEdit())}},e.prototype.preventBatch=function(e){this.preventObj=e,this.showDialog("BatchSaveLostChanges",this.dialogObj)},e.prototype.executeAction=function(){this.preventObj.handler.call(this.preventObj.instance,this.preventObj.arg1,this.preventObj.arg2,this.preventObj.arg3,this.preventObj.arg4,this.preventObj.arg5,this.preventObj.arg6,this.preventObj.arg7,this.preventObj.arg8)},e.prototype.applyFormValidation=function(e){var i=this.parent,r=i.isFrozenGrid(),n="Normal"===this.parent.editSettings.mode,o="Right"===this.parent.getFrozenMode()&&n?1:0,s="Dialog"!==this.parent.editSettings.mode?i.element.getElementsByClassName("e-gridform")[o]:t.select("#"+i.element.id+"_dialogEdit_wrapper .e-gridform",document),l="Right"===this.parent.getFrozenMode()&&n?0:1,a=i.element.getElementsByClassName("e-gridform")[l],h={},d={},c={};e=e||i.getColumns();for(var p=0;p<e.length;p++)(e[p].visible||"Dialog"===i.editSettings.mode&&(-1!==i.groupSettings.columns.indexOf(e[p].field)||"Dialog"!==i.editSettings.mode))&&e[p].validationRules&&Ue(e[p],l,h,d,c,e.length);if(r&&"Dialog"!==this.parent.editSettings.mode){if(this.parent.editModule.mFormObj=this.createFormObj(a,d),this.parent.getFrozenMode()===Pi){var u=i.element.getElementsByClassName("e-gridform")[2];this.parent.editModule.frFormObj=this.createFormObj(u,c)}}else h=t.extend(h,d,c);this.parent.editModule.formObj=this.createFormObj(s,h)},e.prototype.createFormObj=function(e,t){var i=this;return new o.FormValidator(e,{rules:t,locale:this.parent.locale,validationComplete:function(e){i.validationComplete(e)},customPlacement:function(e,t){var r=e.getAttribute("e-mappinguid"),n={column:i.parent.getColumnByUid(r),error:t,inputElement:e,value:e.value};i.valErrorPlacement(e,t),i.parent.notify("validation-custom-placement",n)}})},e.prototype.valErrorPlacement=function(e,t){if(this.parent.isEdit){var i=t.getAttribute("for"),r=this.getElemTable(e).querySelector("#"+i+"_Error");r?r.querySelector(".e-tip-content").innerHTML=t.outerHTML:this.createTooltip(e,t,i,"")}},e.prototype.getElemTable=function(e){var i,r,n=this.parent;if("Dialog"!==n.editSettings.mode){i=n.frozenRows&&n.frozenRows>(parseInt(t.closest(e,"."+Oi).getAttribute(Hi),10)||0);var o=e.name,s=void 0;o&&(s=Ze(this.parent,K(o))),s&&n.isFrozenGrid()?"frozen-left"===s.getFreezeTableName()?r=i?n.getFrozenVirtualHeader().querySelector("table"):n.getFrozenVirtualContent().querySelector("table"):"frozen-right"===s.getFreezeTableName()?r=i?n.getFrozenRightHeader().querySelector("table"):n.getFrozenRightContent().querySelector("table"):"movable"===s.getFreezeTableName()&&(r=i?n.getMovableVirtualHeader().querySelector("table"):n.getMovableVirtualContent().querySelector("table")):r=i?n.getHeaderTable():n.getContentTable()}else r=t.select("#"+n.element.id+"_dialogEdit_wrapper",document);return r},e.prototype.resetElemPosition=function(e,t){var i=O(t.element,bi);if(i){var r=i.getBoundingClientRect().right,n=e.getBoundingClientRect().right;if(n>r){var o=n-r;e.style.left=e.offsetLeft-o+"px"}}},e.prototype.validationComplete=function(e){if(this.parent.isEdit){var t=this.getElemTable(e.element).querySelector("#"+e.inputName+"_Error");t&&("failure"===e.status?(t.style.display="",this.resetElemPosition(t,e)):t.style.display="none")}},e.prototype.createTooltip=function(e,i,n,o){var s=this.parent.getColumnByField(n),l=this.parent.getFrozenMode()===Pi&&"Normal"===this.parent.editSettings.mode&&s.getFreezeTableName()===Ni?this.frFormObj.element:this.formObj.element,a=O(e,"e-virtual-validation");a&&(l=this.virtualFormObj.element);var h=this.parent.getContent().firstElementChild,d=this.parent.getFrozenColumns()||this.parent.getFrozenLeftColumnsCount()||this.parent.getFrozenRightColumnsCount();d&&(h=this.parent.getMovableVirtualContent());var c,p,u=h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth,g="Dialog"!==this.parent.editSettings.mode,f=t.closest(e,"."+bi),m=t.closest(e,"."+Oi),y=this.parent.getContent().querySelector("."+Ti),v=!1,C=!1,w=Math.round(this.parent.getContent().clientHeight/this.parent.getRowHeight())-1,b=y?[].slice.call(this.parent.getFrozenVirtualContent().getElementsByClassName(Oi)):[].slice.call(this.parent.getContent().getElementsByClassName(Oi));if("Batch"===this.parent.editSettings.mode&&w>1&&b.length>=w&&b[b.length-1].getAttribute(Hi)===m.getAttribute(Hi)&&(C=!0),g){if(this.parent.frozenRows){var S=d?this.parent.getFrozenVirtualHeader().querySelector(Ui).children:this.parent.getHeaderTable().querySelector(Ui).children;v=(c=S.length>(parseInt(m.getAttribute(Hi),10)||0))&&parseInt(m.getAttribute(Hi),10)===S.length-1}(v||w>1&&b.length>=w&&("Bottom"===this.parent.editSettings.newRowPosition&&this.editModule.args&&"add"===this.editModule.args.requestType||f.classList.contains("e-lastrowcell")&&!m.classList.contains(Bi))||C)&&(p=!0)}var R=g?c?this.parent.getHeaderTable():this.parent.getContentTable():t.select("#"+this.parent.element.id+"_dialogEdit_wrapper .e-dlg-content",document),x=R.getBoundingClientRect(),F=g?this.parent.element.getBoundingClientRect().left:x.left,E=t.closest(e,"td"),I=E?E.getBoundingClientRect():e.parentElement.getBoundingClientRect(),T=this.parent.createElement("div",{className:"e-tooltip-wrap e-lib e-control e-popup e-griderror",id:n+"_Error",styles:"display:"+o+";top:"+((c?I.top+I.height:I.bottom-x.top-(d?y.scrollTop:0))+R.scrollTop+9)+"px;left:"+(I.left-F+R.scrollLeft+I.width/2)+"px;max-width:"+I.width+"px;text-align:center;"});g&&x.left<F&&(T.style.left=parseInt(T.style.left,10)-x.left+F+"px");var z=this.parent.createElement("div",{className:"e-tip-content"});z.appendChild(i);var D;p?((D=this.parent.createElement("div",{className:"e-arrow-tip e-tip-bottom"})).appendChild(this.parent.createElement("div",{className:"e-arrow-tip-outer e-tip-bottom"})),D.appendChild(this.parent.createElement("div",{className:"e-arrow-tip-inner e-tip-bottom"}))):((D=this.parent.createElement("div",{className:"e-arrow-tip e-tip-top"})).appendChild(this.parent.createElement("div",{className:"e-arrow-tip-outer e-tip-top"})),D.appendChild(this.parent.createElement("div",{className:"e-arrow-tip-inner e-tip-top"}))),T.appendChild(z),T.appendChild(D),a||!d&&!this.parent.frozenRows||"Dialog"===this.parent.editSettings.mode?a?this.virtualFormObj.element.appendChild(T):this.formObj.element.appendChild(T):(("Normal"===this.parent.editSettings.mode?t.closest(e,".e-editcell"):t.closest(e,"."+Mi)).style.position="relative",T.style.position="absolute","Batch"===this.parent.editSettings.mode||t.closest(e,"."+Ti)||t.closest(e,"."+zi)||this.parent.frozenRows&&!d?l.appendChild(T):this.mFormObj.element.appendChild(T)),!p&&g&&h.getBoundingClientRect().bottom<I.bottom+I.height&&(h.scrollTop=h.scrollTop+T.offsetHeight+D.scrollHeight);var M=parseInt(document.defaultView.getComputedStyle(T,null).getPropertyValue("font-size"),10);if(T.getBoundingClientRect().width<I.width&&T.querySelector("label").getBoundingClientRect().height/(1.2*M)>=2&&(T.style.width=T.style.maxWidth),(d||this.parent.frozenRows)&&"Dialog"!==this.parent.editSettings.mode?T.style.left=E.offsetLeft+(E.offsetWidth/2-T.offsetWidth/2)+"px":T.style.left=parseInt(T.style.left,10)-T.offsetWidth/2+"px",g&&!u&&!this.parent.allowPaging||d||this.parent.frozenRows){h.style.position="static";var k=r.calculateRelativeBasedPosition(E,T);T.style.top=k.top+I.height+9+"px"}if(p){if(!u||d||"auto"===this.parent.height||this.parent.frozenRows||this.parent.enableVirtualization)T.style.bottom=I.height+9+"px";else{var A=h.scrollWidth>h.offsetWidth?j():0;T.style.bottom=this.parent.height-h.querySelector("table").offsetHeight-A+I.height+9+"px"}if(b.length<w&&"Bottom"===this.parent.editSettings.newRowPosition&&this.editModule.args&&"add"===this.editModule.args.requestType){var B=(this.parent.frozenRows?this.parent.frozenRows+(b.length-1):b.length-1)*this.parent.getRowHeight(),P=this.parent.getContent().clientHeight-B;T.style.bottom=P+9+"px"}T.style.top=null}},e.prototype.checkColumnIsGrouped=function(e){return!(e.visible||this.parent.groupSettings.columns.indexOf(e.field)>-1)},e.AddEditors=function(i){e.editCellType=t.extend(e.editCellType,i)},e.editCellType={dropdownedit:wo,numericedit:bo,datepickeredit:Mo,datetimepickeredit:Mo,booleanedit:vo,defaultedit:Ro,templateedit:Oo},e}(),Ao=function(){function e(e,i){this.showColumn=[],this.hideColumn=[],this.changedColumns=[],this.unchangedColumns=[],this.isDlgOpen=!1,this.initialOpenDlg=!0,this.stateChangeColumns=[],this.changedStateColumns=[],this.isInitialOpen=!1,this.isCustomizeOpenCC=!1,this.searchOperator="startswith",this.prevShowedCols=[],this.parent=e,this.serviceLocator=i,this.addEventListener(),this.cBoxTrue=n.createCheckBox(this.parent.createElement,!0,{checked:!0,label:" "}),this.cBoxFalse=n.createCheckBox(this.parent.createElement,!0,{checked:!1,label:" "}),this.cBoxTrue.insertBefore(this.parent.createElement("input",{className:"e-chk-hidden e-cc e-cc-chbox",attrs:{type:"checkbox"}}),this.cBoxTrue.firstChild),this.cBoxFalse.insertBefore(this.parent.createElement("input",{className:"e-chk-hidden e-cc e-cc-chbox",attrs:{type:"checkbox"}}),this.cBoxFalse.firstChild),this.cBoxFalse.querySelector(".e-frame").classList.add("e-uncheck"),this.parent.enableRtl&&t.addClass([this.cBoxTrue,this.cBoxFalse],["e-rtl"])}return e.prototype.destroy=function(){var e=this.parent.element;e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.removeEventListener(),this.unWireEvents(),t.isNullOrUndefined(this.dlgObj)||!this.dlgObj.element||this.dlgObj.isDestroyed||this.dlgObj.destroy())},e.prototype.rtlUpdate=function(){this.parent.enableRtl?t.addClass([].slice.call(this.innerDiv.getElementsByClassName("e-checkbox-wrapper")),["e-rtl"]):t.removeClass([].slice.call(this.innerDiv.getElementsByClassName("e-checkbox-wrapper")),["e-rtl"])},e.prototype.addEventListener=function(){this.parent.isDestroyed||(t.EventHandler.add(document,"click",this.clickHandler,this),this.parent.on(Bt,this.enableAfterRenderEle,this),this.parent.on(Ot,this.render,this),this.parent.addEventListener(Rt,this.hideDialog.bind(this)),this.parent.on(_t,this.destroy,this),this.parent.on("rtl-updated",this.rtlUpdate,this),this.parent.on(Vt,this.keyUpHandler,this),this.parent.on("reset-columns",this.onResetColumns,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(t.EventHandler.remove(document,"click",this.clickHandler),this.parent.off(Ot,this.render),this.parent.off(_t,this.destroy),this.parent.off(Bt,this.enableAfterRenderEle),this.parent.off("rtl-updated",this.rtlUpdate),this.parent.on(Vt,this.keyUpHandler,this),this.parent.off("reset-columns",this.onResetColumns))},e.prototype.render=function(){this.l10n=this.serviceLocator.getService("localization"),this.renderDlgContent(),this.getShowHideService=this.serviceLocator.getService("showHideService")},e.prototype.clickHandler=function(e){var i=e.target;if(!this.isCustomizeOpenCC){if(t.isNullOrUndefined(t.closest(i,".e-cc"))&&t.isNullOrUndefined(t.closest(i,".e-cc-toolbar")))t.isNullOrUndefined(this.dlgObj)||!this.dlgObj.visible||i.classList.contains("e-toolbar-items")||(this.dlgObj.hide(),this.clearActions(),this.refreshCheckboxState(),this.isDlgOpen=!1);else if(i.classList.contains("e-columnchooser-btn")||i.classList.contains("e-cc-toolbar")){if(this.initialOpenDlg&&this.dlgObj.visible||!this.isDlgOpen)return void(this.isDlgOpen=!0)}else i.classList.contains("e-cc-cancel")&&(i.parentElement.querySelector(".e-ccsearch").value="",this.columnChooserSearch(""),this.removeCancelIcon(),this.refreshCheckboxButton());(this.parent.detailTemplate||this.parent.childGrid)&&(this.targetdlg=e.target)}this.isCustomizeOpenCC&&e.target.classList.contains("e-cc-cancel")&&this.refreshCheckboxState(),this.rtlUpdate()},e.prototype.hideDialog=function(){!t.isNullOrUndefined(this.dlgObj)&&this.dlgObj.visible&&(this.dlgObj.hide(),this.isDlgOpen=!1)},e.prototype.renderColumnChooser=function(e,i,n){if(this.dlgObj.visible||!this.parent.detailTemplate&&!this.parent.childGrid||this.hideOpenedDialog(),this.dlgObj.visible)this.hideDialog(),this.addcancelIcon(),this.clearActions(),this.refreshCheckboxState();else{if(this.beforeOpenColumnChooserEvent().cancel)return;n&&(this.targetdlg=n),this.refreshCheckboxState(),this.dlgObj.dataBind(),this.dlgObj.element.style.maxHeight="430px";var o=this.dlgObj.element.style.display;this.dlgObj.element.style.display="block";var s=r.calculateRelativeBasedPosition(t.closest(n,".e-toolbar-item"),this.dlgObj.element);this.dlgObj.element.style.display=o,this.dlgObj.element.style.top=s.top+t.closest(n,".e-cc-toolbar").getBoundingClientRect().height+"px";t.isNullOrUndefined(t.closest(n,".e-bigger"))||(this.dlgObj.width=258),t.Browser.isDevice?(this.dlgObj.target=document.body,this.dlgObj.position={X:"center",Y:"center"},this.dlgObj.refreshPosition(),this.dlgObj.open=this.mOpenDlg.bind(this)):this.parent.enableRtl?this.dlgObj.element.style.left=n.offsetLeft+"px":this.dlgObj.element.style.left=s.left-250+t.closest(n,".e-cc-toolbar").clientWidth+2+"px",this.removeCancelIcon(),this.dlgObj.show(),this.parent.notify("columnChooserOpened",{dialog:this.dlgObj})}this.rtlUpdate()},e.prototype.openColumnChooser=function(e,i){if(this.isCustomizeOpenCC=!0,this.dlgObj.visible)return void this.hideDialog();this.beforeOpenColumnChooserEvent().cancel||(this.isInitialOpen?this.refreshCheckboxState():(this.dlgObj.content=this.renderChooserList(),this.updateIntermediateBtn()),this.dlgObj.dataBind(),this.dlgObj.position={X:"center",Y:"center"},t.isNullOrUndefined(e)?(this.dlgObj.position={X:"center",Y:"center"},this.dlgObj.refreshPosition()):(this.dlgObj.element.style.top="",this.dlgObj.element.style.left="",this.dlgObj.element.style.top=i+"px",this.dlgObj.element.style.left=e+"px"),this.dlgObj.beforeOpen=this.customDialogOpen.bind(this),this.dlgObj.show(),this.isInitialOpen=!0,this.dlgObj.beforeClose=this.customDialogClose.bind(this))},e.prototype.enableAfterRenderEle=function(e){e.module===this.getModuleName()&&e.enable&&this.render()},e.prototype.keyUpHandler=function(e){"escape"===e.action&&this.hideDialog()},e.prototype.customDialogOpen=function(){var e=this.dlgObj.content.querySelector("input.e-ccsearch");t.EventHandler.add(e,"keyup",this.columnChooserManualSearch,this)},e.prototype.customDialogClose=function(){var e=this.dlgObj.content.querySelector("input.e-ccsearch");t.EventHandler.remove(e,"keyup",this.columnChooserManualSearch)},e.prototype.getColumns=function(){return this.parent.getColumns().filter(function(e){return"checkbox"!==e.type&&!0===e.showInColumnChooser||"checkbox"===e.type&&void 0!==e.field})},e.prototype.renderDlgContent=function(){this.dlgDiv=this.parent.createElement("div",{className:"e-ccdlg e-cc",id:this.parent.element.id+"_ccdlg"}),this.dlgDiv.setAttribute("aria-label",this.l10n.getConstant("ColumnChooserDialogARIA")),this.parent.element.appendChild(this.dlgDiv),this.dlgObj=new r.Dialog({header:this.l10n.getConstant("ChooseColumns"),showCloseIcon:!1,closeOnEscape:!1,locale:this.parent.locale,visible:!1,enableRtl:this.parent.enableRtl,target:document.getElementById(this.parent.element.id),buttons:[{click:this.confirmDlgBtnClick.bind(this),buttonModel:{content:this.l10n.getConstant("OKButton"),isPrimary:!0,cssClass:"e-cc e-cc_okbtn"}},{click:this.clearBtnClick.bind(this),buttonModel:{cssClass:"e-flat e-cc e-cc-cnbtn",content:this.l10n.getConstant("CancelButton")}}],content:this.renderChooserList(),width:250,cssClass:"e-cc",animationSettings:{effect:"None"}});this.dlgObj.isStringTemplate=!0,this.dlgObj.appendTo(this.dlgDiv),this.wireEvents()},e.prototype.renderChooserList=function(){this.mainDiv=this.parent.createElement("div",{className:"e-main-div e-cc"});var e=this.parent.createElement("div",{className:"e-cc-searchdiv e-cc e-input-group"}),t=this.parent.createElement("input",{className:"e-ccsearch e-cc e-input",attrs:{placeholder:this.l10n.getConstant("Search")}}),i=this.parent.createElement("span",{className:"e-ccsearch-icon e-icons e-cc e-input-group-icon",attrs:{title:this.l10n.getConstant("Search")}}),r=this.parent.createElement("div",{className:"e-cc-contentdiv"});this.innerDiv=this.parent.createElement("div",{className:"e-innerdiv e-cc"}),e.appendChild(t),e.appendChild(i),this.searchBoxObj=new Pr(t);var n=this.refreshCheckboxList(this.parent.getColumns());return this.innerDiv.appendChild(n),r.appendChild(this.innerDiv),this.mainDiv.appendChild(e),this.mainDiv.appendChild(r),this.mainDiv},e.prototype.confirmDlgBtnClick=function(e){this.stateChangeColumns=[],this.changedStateColumns=[],this.changedColumns=this.changedColumns.length>0?this.changedColumns:this.unchangedColumns,this.changedColumnState(this.changedColumns);var i=this.ulElement.querySelector(".e-uncheck")&&this.ulElement.querySelectorAll(".e-uncheck:not(.e-selectall)").length;t.isNullOrUndefined(e)||i<this.parent.getColumns().length&&(this.hideColumn.length&&this.columnStateChange(this.hideColumn,!1),this.showColumn.length&&this.columnStateChange(this.showColumn,!0),this.getShowHideService.setVisible(this.stateChangeColumns,this.changedStateColumns),this.clearActions(),this.parent.notify("tooltip-destroy",{module:"edit"}),0===this.parent.getCurrentViewRecords().length&&this.parent.element.querySelector(".e-emptyrow").querySelector("td").setAttribute("colSpan",this.parent.getVisibleColumns().length.toString()))},e.prototype.onResetColumns=function(e){if("columnstate"===e.requestType)return void this.resetColumnState()},e.prototype.resetColumnState=function(){this.showColumn=[],this.hideColumn=[],this.hideDialog()},e.prototype.changedColumnState=function(e){for(var t=0;t<e.length;t++){var i=e[t],r=this.parent.getColumnByUid(i);this.changedStateColumns.push(r)}},e.prototype.columnStateChange=function(e,t){for(var i=0;i<e.length;i++){var r=e[i],n=this.parent.getColumnByUid(r);"checkbox"!==n.type&&(n.visible=t),this.stateChangeColumns.push(n)}},e.prototype.clearActions=function(){this.resetColumnState(),this.addcancelIcon()},e.prototype.clearBtnClick=function(){this.clearActions(),this.parent.notify("columnChooserCancelBtnClick",{dialog:this.dlgObj})},e.prototype.checkstatecolumn=function(e,t,i){void 0===i&&(i=!1),e?(-1!==this.hideColumn.indexOf(t)&&this.hideColumn.splice(this.hideColumn.indexOf(t),1),-1===this.showColumn.indexOf(t)&&this.showColumn.push(t)):(-1!==this.showColumn.indexOf(t)&&this.showColumn.splice(this.showColumn.indexOf(t),1),-1===this.hideColumn.indexOf(t)&&this.hideColumn.push(t)),i?e?this.unchangedColumns.push(t):this.changedColumns.push(t):-1!==this.changedColumns.indexOf(t)?this.changedColumns.splice(this.changedColumns.indexOf(t),1):this.changedColumns.push(t)},e.prototype.columnChooserSearch=function(e){var t,r,n=!1,o=this.dlgDiv.querySelector(".e-footer-content"),s=this.ulElement.querySelector(".e-check")&&this.ulElement.querySelectorAll(".e-check:not(.e-selectall)").length;if(this.isInitialOpen=!0,o&&(r=o.querySelector(".e-btn").ej2_instances[0]),""===e?(this.removeCancelIcon(),t=this.getColumns(),n=!0):t=new i.DataManager(this.getColumns()).executeLocal((new i.Query).where("headerText",this.searchOperator,e,!0,this.parent.columnChooserSettings.ignoreAccent)),t.length)this.innerDiv.innerHTML=" ",this.innerDiv.classList.remove("e-ccnmdiv"),this.innerDiv.appendChild(this.refreshCheckboxList(t)),n?r&&s&&(r.disabled=!1):(this.addcancelIcon(),this.refreshCheckboxButton());else{var l=this.parent.createElement("span",{className:"e-cc e-nmatch"});l.innerHTML=this.l10n.getConstant("Matchs"),this.innerDiv.innerHTML=" ",this.innerDiv.appendChild(l),this.innerDiv.classList.add("e-ccnmdiv"),r&&(r.disabled=!0)}this.flag=!0,this.stopTimer()},e.prototype.wireEvents=function(){t.EventHandler.add(this.dlgObj.element,"click",this.checkBoxClickHandler,this),t.EventHandler.add(this.searchBoxObj.searchBox,"keyup",this.columnChooserManualSearch,this),this.searchBoxObj.wireEvent()},e.prototype.unWireEvents=function(){this.parent.isDestroyed||(this.dlgObj.element&&t.EventHandler.remove(this.dlgObj.element,"click",this.checkBoxClickHandler),t.EventHandler.remove(this.searchBoxObj.searchBox,"keyup",this.columnChooserManualSearch),this.searchBoxObj.unWireEvent())},e.prototype.checkBoxClickHandler=function(e){var t,i=O(e.target,"e-checkbox-wrapper");if(i){if(i.querySelector(".e-selectall")?this.updateSelectAll(!i.querySelector(".e-check")):ie(i.parentElement),i.querySelector(".e-chk-hidden").focus(),i.querySelector(".e-check"))t=!0;else{if(!i.querySelector(".e-uncheck"))return;t=!1}this.updateIntermediateBtn();var r=O(i,"e-ccheck").getAttribute("uid"),n=this.parent.getColumns();if("grid-selectAll"===r){this.changedColumns=[],this.unchangedColumns=[];for(var o=0;o<n.length;o++)n[o].showInColumnChooser&&this.checkstatecolumn(t,n[o].uid,!0)}else this.checkstatecolumn(t,r);this.refreshCheckboxButton()}},e.prototype.updateIntermediateBtn=function(){var e=this.ulElement.children.length-1,i=[],r=this.ulElement.children[0].querySelector(".e-frame"),n=this.ulElement.querySelectorAll(".e-check:not(.e-selectall)").length,o=this.dlgObj.btnObj[0];o.disabled=!1,e===n?i=["e-check"]:n?i=["e-stop"]:(i=["e-uncheck"],o.disabled=!0),o.dataBind(),t.removeClass([r],["e-check","e-stop","e-uncheck"]),t.addClass([r],i)},e.prototype.updateSelectAll=function(e){for(var t=0,i=[].slice.call(this.ulElement.getElementsByClassName("e-frame"));t<i.length;t++)oe(i[t],e)},e.prototype.refreshCheckboxButton=function(){for(var e=this.parent.getVisibleColumns(),t=0;t<e.length;t++){a=e[t].uid;-1===this.prevShowedCols.indexOf(a)&&this.prevShowedCols.push(a)}for(t=0;t<this.hideColumn.length;t++){var i=this.prevShowedCols.indexOf(this.hideColumn[t]);-1!==i&&this.prevShowedCols.splice(i,1)}var r=0!==this.showColumn.length?1:this.prevShowedCols.length,n=this.dlgDiv.querySelector(".e-footer-content").querySelector(".e-btn").ej2_instances[0];n.disabled=!1;for(var o=[],s=[].slice.call(this.parent.element.getElementsByClassName("e-cc-chbox")),t=0,l=s.length;t<l;t++){var a=O(s[t],"e-ccheck").getAttribute("uid");o.push(a)}var h=this.showColumn.filter(function(e){return-1!==o.indexOf(e)});0===r&&0===h.length&&(n.disabled=!0),n.dataBind()},e.prototype.refreshCheckboxList=function(e){this.ulElement=this.parent.createElement("ul",{className:"e-ccul-ele e-cc"});var t=this.l10n.getConstant("SelectAll"),i=this.parent.createElement("li",{className:"e-cclist e-cc e-cc-selectall"}),r=this.createCheckBox(t,!1,"grid-selectAll");e.length&&(r.querySelector(".e-checkbox-wrapper").firstElementChild.classList.add("e-selectall"),r.querySelector(".e-frame").classList.add("e-selectall"),this.checkState(r.querySelector(".e-icons"),!0),i.appendChild(r),this.ulElement.appendChild(i));for(var n=0;n<e.length;n++){var o=e[n];this.renderCheckbox(o)}return this.ulElement},e.prototype.refreshCheckboxState=function(){this.dlgObj.element.querySelector(".e-cc.e-input").value="",this.columnChooserSearch("");for(var e=this.parent,t=this.dlgObj.element.querySelectorAll(".e-cc-chbox:not(.e-selectall)"),i=0,r=t.length;i<r;i++){var n=t[i],o=void 0;o=this.parent.childGrid||this.parent.detailTemplate?O(this.dlgObj.element.querySelectorAll(".e-cc-chbox:not(.e-selectall)")[i],"e-ccheck").getAttribute("uid"):O(n,"e-ccheck").getAttribute("uid");var s=e.getColumnByUid(o),l=[].slice.call(n.parentElement.getElementsByClassName("e-uncheck"));s.visible&&!l.length?(n.checked=!0,this.checkState(n.parentElement.querySelector(".e-icons"),!0)):(n.checked=!1,this.checkState(n.parentElement.querySelector(".e-icons"),!1))}},e.prototype.checkState=function(e,i){i?t.classList(e,["e-check"],["e-uncheck"]):t.classList(e,["e-uncheck"],["e-check"])},e.prototype.createCheckBox=function(e,t,i){var r=t?this.cBoxTrue.cloneNode(!0):this.cBoxFalse.cloneNode(!0);return r.querySelector(".e-label").innerHTML=e,ne(i,r,"e-ccheck")},e.prototype.renderCheckbox=function(e){var t,i,r;if(e.showInColumnChooser){t=this.parent.createElement("li",{className:"e-cclist e-cc",styles:"list-style:None",id:"e-ccli_"+e.uid}),i=-1!==this.hideColumn.indexOf(e.uid),r=-1!==this.showColumn.indexOf(e.uid);var n=this.createCheckBox(e.headerText,e.visible&&!i||r,e.uid);t.appendChild(n),this.ulElement.appendChild(t)}this.isInitialOpen&&this.updateIntermediateBtn()},e.prototype.columnChooserManualSearch=function(e){this.addcancelIcon(),this.searchValue=e.target.value,this.stopTimer(),this.startTimer(e)},e.prototype.startTimer=function(e){var t=this,i=t.flag||13===e.keyCode?0:500;this.timer=window.setInterval(function(){t.columnChooserSearch(t.searchValue)},i)},e.prototype.stopTimer=function(){window.clearInterval(this.timer)},e.prototype.addcancelIcon=function(){this.dlgDiv.querySelector(".e-cc.e-ccsearch-icon").classList.add("e-cc-cancel")},e.prototype.removeCancelIcon=function(){this.dlgDiv.querySelector(".e-cc.e-ccsearch-icon").classList.remove("e-cc-cancel")},e.prototype.mOpenDlg=function(){t.Browser.isDevice&&(this.dlgObj.element.querySelector(".e-cc-searchdiv").classList.remove("e-input-focus"),this.dlgObj.element.querySelectorAll(".e-cc-chbox")[0].focus())},e.prototype.getModuleName=function(){return"columnChooser"},e.prototype.hideOpenedDialog=function(){for(var e=[].slice.call(document.getElementsByClassName("e-ccdlg")).filter(function(e){return e.classList.contains("e-popup-open")}),t=0,i=e.length;t<i;t++)(e[t].classList.contains("e-dialog")||this.parent.element.id+"_ccdlg"!==e[t].id)&&e[t].ej2_instances[0].hide()},e.prototype.beforeOpenColumnChooserEvent=function(){var e={requestType:"beforeOpenColumnChooser",element:this.parent.element,columns:this.getColumns(),cancel:!1,searchOperator:this.parent.columnChooserSettings.operator};return this.parent.trigger("beforeOpenColumnChooser",e),this.searchOperator=e.searchOperator,e},e}(),Bo=function(){function r(e,t){this.hideColumnInclude=!1,this.foreignKeyData={},this.parent=e,!e.parentDetails&&t&&(this.foreignKeyData=t)}return r.getQuery=function(e,t){var i=t.generateQuery(!0).requiresCount();return t.isRemote()&&(e.groupSettings.enableLazyLoading&&e.groupSettings.columns.length?i.lazyLoad=[]:i.take(e.pageSettings.totalRecordsCount)),i},r.prototype.getFData=function(e,t){return le(t,{},e,this.foreignKeyData[t.field])[0]},r.prototype.getGridRowModel=function(e,t,i,r){void 0===r&&(r=0);var n=[],o=t.length;if(o){for(var s=0;s<o;s++,r++){var l={isExpand:!1};l.data=t[s],l.index=r,i.childGrid&&("All"===i.hierarchyPrintMode?l.isExpand=!0:"Expanded"===i.hierarchyPrintMode&&this.parent.expandedRows&&this.parent.expandedRows[r]&&(l.isExpand=i.expandedRows[r].isExpand));var a=new vi(l);a.cells=this.generateCells(e,i),n.push(a)}this.processColumns(n)}return n},r.prototype.generateCells=function(t,i){var r=[];if(i.childGridLevel)for(var n=i.childGridLevel,o=0;n>o;o++)r.push(this.generateCell({},e.CellType.Indent));for(var s=0,l=t;s<l.length;s++){var a=l[s];r.push(this.generateCell(a,e.CellType.Data))}return r},r.prototype.getColumnData=function(e){var t,r=this,n=[],o=e.getForeignKeyColumns();if(o.length){for(var s=0;s<o.length;s++){var l="result"in o[s].dataSource?new i.DataManager(o[s].dataSource.result):o[s].dataSource;n.push(l.executeQuery(new i.Query))}t=Promise.all(n).then(function(e){for(var t=0;t<o.length;t++)r.foreignKeyData[o[t].field]=e[t].result})}return t},r.prototype.getHeaders=function(e,t){this.hideColumnInclude=!!t,this.colDepth=ve(e);for(var i=[],r=0;r<this.colDepth;r++)i[r]=new vi({}),i[r].cells=[];return i=this.processColumns(i),i=this.processHeaderCells(i,e),{rows:i,columns:this.generateActualColumns(e)}},r.prototype.getConvertedWidth=function(e){var t=parseFloat(e);return-1!==e.indexOf("%")?this.parent.element.getBoundingClientRect().width*t/100:t},r.prototype.generateActualColumns=function(e,t){void 0===t&&(t=[]);for(var i=0,r=e;i<r.length;i++){var n=r[i];n.commands||(n.columns?(n.visible||this.hideColumnInclude)&&0!==this.getCellCount(n,0)&&this.generateActualColumns(n.columns,t):(n.visible||this.hideColumnInclude)&&t.push(n))}return t},r.prototype.processHeaderCells=function(e,t){for(var i=t,r=0;r<i.length;r++)i[r].commands||(e=this.appendGridCells(i[r],e,0));return e},r.prototype.appendGridCells=function(t,i,r){if(t.columns||!1===t.visible&&!this.hideColumnInclude||t.commands){if(t.columns){var n=this.getCellCount(t,0);n&&i[r].cells.push(new Ci({cellType:e.CellType.StackedHeader,column:t,colSpan:n}));for(var o=void 0,s=0,l=t.columns.length;s<l;s++)t.columns[s].visible&&!o&&(o=!0),i=this.appendGridCells(t.columns[s],i,r+1)}}else i[r].cells.push(this.generateCell(t,e.CellType.Header,this.colDepth-r,r));return i},r.prototype.generateCell=function(t,i,r,n){var o={visible:t.visible,isDataCell:i===e.CellType.Data,column:t,cellType:i,rowSpan:r,index:n};return(!o.rowSpan||o.rowSpan<2)&&delete o.rowSpan,new Ci(o)},r.prototype.processColumns=function(t){var i=this.parent,r=[];i.enableColumnVirtualization&&(r=i.getColumnIndexesInView());for(var n=0,o=t.length;n<o;n++)if(i.allowGrouping)for(var s=0,l=i.groupSettings.columns.length;s<l;s++)i.enableColumnVirtualization&&-1===r.indexOf(s)||t[n].cells.splice(0,0,this.generateCell({},e.CellType.HeaderIndent));return t},r.prototype.getCellCount=function(e,t){if(e.columns)for(var i=0;i<e.columns.length;i++)t=this.getCellCount(e.columns[i],t);else(e.visible||this.hideColumnInclude)&&t++;return t},r.prototype.checkAndExport=function(e,t){Object.keys(e).some(function(t){return!e[t]})||t()},r.prototype.failureHandler=function(e,t,i){var r=this;return function(){e[t.id]=!0,r.checkAndExport(e,i)}},r.prototype.createChildGrid=function(e,i,r,n){var o=new mn(this.parent.detailRowModule.getGridModel(e,i,r));e.isPrinting=!1;o.parentDetails={parentID:e.element.id,parentPrimaryKeys:e.getPrimaryKeyFieldNames(),parentKeyField:e.childGrid.queryString,parentKeyFieldValue:t.getValue(o.queryString,i.data),parentRowData:i.data};var s=L("child-grid"),l=t.createElement("div",{id:s,styles:"display: none"});return document.body.appendChild(l),o.id=s,n[s]=!1,o.isExportGrid=!0,{childGrid:o,element:l}},r.prototype.getGridExportColumns=function(e){for(var t=[],i=0,r=e;i<r.length;i++)"checkbox"!==r[i].type&&t.push(r[i]);return t},r.prototype.getForeignKeyData=function(){return this.foreignKeyData},r}(),Po=function(){function e(e){this.valueFormatter=new yt(e),this.internationalization=new t.Internationalization(e)}return e.prototype.returnFormattedValue=function(e,i){return!t.isNullOrUndefined(e.value)&&e.value?this.valueFormatter.getFormatFunction(i)(e.value):""},e.prototype.formatCellValue=function(e,i){if(e.isForeignKey&&(e.value=t.getValue(e.column.foreignKeyValue,le(e.column,{},e.value)[0])),"number"===e.column.type&&void 0!==e.column.format&&""!==e.column.format)return e.value||0===e.value?this.internationalization.getNumberFormat({format:e.column.format})(e.value):"";if("boolean"===e.column.type&&""!==e.value)return e.value?"true":"false";if("date"!==e.column.type&&"datetime"!==e.column.type&&"time"!==e.column.type||void 0===e.column.format)return(t.isNullOrUndefined(e.column.type)||t.isNullOrUndefined(e.value))&&t.isNullOrUndefined(e.value)?"":e.value.toString();if("string"==typeof e.value&&(e.value=new Date(e.value)),"string"==typeof e.column.format){var r=void 0,n=e.column.format;return r="date"===e.column.type?i?{type:"date",format:n}:{type:"date",skeleton:n}:"time"===e.column.type?i?{type:"time",format:n}:{type:"time",skeleton:n}:i?{type:"dateTime",format:n}:{type:"dateTime",skeleton:n},this.returnFormattedValue(e,r)}if(e.column.format instanceof Object&&void 0===e.column.format.type)return e.value.toString();var o=void 0;return o="date"===e.column.type?{type:e.column.format.type,format:e.column.format.format,skeleton:e.column.format.skeleton}:"time"===e.column.type?{type:"time",format:e.column.format.format,skeleton:e.column.format.skeleton}:{type:"dateTime",format:e.column.format.format,skeleton:e.column.format.skeleton},this.returnFormattedValue(e,o)},e}(),No=function(){function r(e,t){this.book={},this.workSheet=[],this.rows=[],this.columns=[],this.styles=[],this.rowLength=1,this.expType="AppendToSheet",this.includeHiddenColumn=!1,this.isCsvExport=!1,this.isElementIdChanged=!1,this.gridPool={},this.sheet={},this.parent=e,this.helper=new Bo(e),this.locator=t,this.l10n=this.locator.getService("localization")}return r.prototype.getModuleName=function(){return"ExcelExport"},r.prototype.init=function(e){null!==e.element&&""===e.element.id&&(e.element.id=(new Date).toISOString(),this.isElementIdChanged=!0),this.parent=e,this.parent.isDestroyed||(this.isExporting=void 0,this.book={},this.workSheet=[],this.rows=[],this.columns=[],this.styles=[],this.rowLength=1,this.footer=void 0,this.expType="AppendToSheet",this.includeHiddenColumn=!1,this.exportValueFormatter=new Po(e.locale),e.id=L("main-grid"),this.gridPool[e.id]=!1)},r.prototype.Map=function(e,i,r,n,o,s){var l=e;this.gridPool={},e.childGrid&&(t.isNullOrUndefined(i)||"None"!==i.hierarchyExportMode)&&(e.expandedRows=fe(e).expandedRows);var a={requestType:"beforeExcelExport",gridObject:l,cancel:!1,isMultipleExport:r,workbook:n,isCsv:o,isBlob:s};return l.trigger("beforeExcelExport",a),a.cancel?new Promise(function(e){return e()}):(this.parent.log("exporting_begin",this.getModuleName()),this.data=new yi(l),this.isExporting=!0,this.isBlob=a.isBlob,this.isCsvExport=!!a.isCsv&&a.isCsv,y(i)&&v(i,l),this.processRecords(l,i,a.isMultipleExport,a.workbook))},r.prototype.exportingSuccess=function(e){this.isExporting=!1,this.parent.trigger("excelExportComplete",this.isBlob?{promise:this.blobPromise}:{}),this.parent.log("exporting_complete",this.getModuleName()),e(this.book),this.sheet.images=[]},r.prototype.processRecords=function(e,r,n,o){var s=this;if(!t.isNullOrUndefined(r)&&!t.isNullOrUndefined(r.dataSource)&&r.dataSource instanceof i.DataManager){var l=r.query?r.query:new i.Query;return(t.isNullOrUndefined(l.isCountRequired)||e.aggregates)&&(l.isCountRequired=!0),new Promise(function(t){r.dataSource.executeQuery(l).then(function(i){s.init(e),s.processInnerRecords(e,r,n,o,i).then(function(){s.exportingSuccess(t)})})})}if(t.isNullOrUndefined(r)||"CurrentPage"!==r.exportType){var a=[];return a.push(this.data.getData({},Bo.getQuery(e,this.data))),a.push(this.helper.getColumnData(e)),new Promise(function(t,i){Promise.all(a).then(function(i){s.init(e),s.processInnerRecords(e,r,n,o,i[0]).then(function(){s.exportingSuccess(t)})}).catch(function(e){i(s.book),s.parent.trigger("actionFailure",e)})})}return new Promise(function(t){s.init(e),s.processInnerRecords(e,r,n,o,s.parent.getCurrentViewRecords()),s.exportingSuccess(t)})},r.prototype.processInnerRecords=function(e,i,r,n,o){var s=this;this.groupedColLength=e.groupSettings.columns.length;var l,a=5,d=[],c=ve(e.columns),p=!t.isNullOrUndefined(i);return p&&!t.isNullOrUndefined(i.multipleExport)&&(this.expType=t.isNullOrUndefined(i.multipleExport.type)?"AppendToSheet":i.multipleExport.type,t.isNullOrUndefined(i.multipleExport.blankRows)||(a=i.multipleExport.blankRows)),t.isNullOrUndefined(n)?(this.workSheet=[],this.rows=[],this.columns=[],this.styles=[]):"NewSheet"===this.expType?(this.workSheet=n.worksheets,this.rows=[],this.columns=[],this.styles=n.styles):(this.workSheet=[],this.rows=n.worksheets[0].rows,this.columns=n.worksheets[0].columns,this.styles=n.styles,this.rowLength=this.rows[this.rows.length-1].index+a,this.rowLength++),p&&(t.isNullOrUndefined(r)?(t.isNullOrUndefined(i.header)||this.processExcelHeader(JSON.parse(JSON.stringify(i.header))),t.isNullOrUndefined(i.footer)||(this.footer=JSON.parse(JSON.stringify(i.footer)))):(t.isNullOrUndefined(i.header)||!r&&"NewSheet"!==this.expType||this.processExcelHeader(JSON.parse(JSON.stringify(i.header))),t.isNullOrUndefined(i.footer)||("AppendToSheet"===this.expType?r||(this.footer=JSON.parse(JSON.stringify(i.footer))):this.footer=JSON.parse(JSON.stringify(i.footer))))),this.includeHiddenColumn=!!p&&i.includeHiddenColumn,new Promise(function(t,r){e.childGridLevel=0,d=s.processGridExport(e,i,o),s.globalResolve=t,s.gridPool[e.id]=!0,s.helper.checkAndExport(s.gridPool,s.globalResolve)}).then(function(){var o=[];if(s.organiseRows(d,d[0].index,o),s.rows=s.rows.concat(o),t.isNullOrUndefined(s.footer)||("AppendToSheet"===s.expType&&!r||"NewSheet"===s.expType)&&s.processExcelFooter(s.footer),s.columns.length>0&&(s.sheet.columns=s.columns),s.sheet.rows=s.rows,s.sheet.enableRtl=s.parent.enableRtl,s.parent.allowFiltering&&e.getVisibleColumns().length&&p&&i.enableFilter){var a=i.header?i.header.headerRows||i.header.rows.length:0,u={row:c+a,column:s.groupedColLength?s.groupedColLength+1:s.sheet.columns[0].index,lastRow:s.sheet.rows.length,lastColumn:s.sheet.columns.length};s.sheet.autoFilters=u}if(s.workSheet.push(s.sheet),s.book.worksheets=s.workSheet,s.book.styles=s.styles,e.notify("finalPageSetup",s.book),!r){if(s.isCsvExport){p&&!t.isNullOrUndefined(i.separator)&&","!==i.separator&&(l=i.separator);g=new h.Workbook(s.book,"csv",e.locale,e.currencyCode,l);s.isBlob?s.blobPromise=g.saveAsBlob("text/csv"):p&&i.fileName?g.save(i.fileName):g.save("Export.csv")}else{var g=new h.Workbook(s.book,"xlsx",e.locale,e.currencyCode);s.isBlob?s.blobPromise=g.saveAsBlob("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"):p&&i.fileName?g.save(i.fileName):g.save("Export.xlsx")}s.isElementIdChanged&&(e.element.id=""),delete e.expandedRows}return n})},r.prototype.organiseRows=function(e,t,i){if(!e.length)return t;for(var r=0;r<e.length;r++){var n=e[r],o=n.childRows;o?(n.index=t++,delete n.childRows,i.push(n),t=this.organiseRows(o,t,i)):(n.index=t++,i.push(n))}return t},r.prototype.processGridExport=function(e,r,n){var o=[],s=this.parent.isFrozenGrid()&&!this.parent.getFrozenColumns();t.isNullOrUndefined(r)||t.isNullOrUndefined(r.theme)||(this.theme=r.theme),e.childGrid&&!t.isNullOrUndefined(r)&&(e.hierarchyPrintMode=r.hierarchyExportMode||"Expanded");var l=new Bo(e,this.helper.getForeignKeyData()),a=y(r)?T(r.columns,e.enableColumnVirtualization):l.getGridExportColumns(s?e.getColumns():e.columns),h=l.getHeaders(a,this.includeHiddenColumn),d=e.groupSettings.columns.length;return o=this.processHeaderContent(e,h,d,o),o=t.isNullOrUndefined(r)||t.isNullOrUndefined(r.dataSource)||r.dataSource instanceof i.DataManager?t.isNullOrUndefined(r)||"CurrentPage"!==r.exportType?this.processRecordContent(e,n,h,r,void 0,o,l):this.processRecordContent(e,n,h,r,e.currentViewData,o,l):this.processRecordContent(e,n,h,r,r.dataSource,o,l),e.notify("export-DataBound",{excelRows:o,type:"excel"}),o},r.prototype.processRecordContent=function(e,i,r,n,o,s,l){var a;if(a=!t.isNullOrUndefined(o)&&o.length?o:i.result,t.isNullOrUndefined(a.level)?this.processRecordRows(e,a,r,0,0,n,s,l):this.processGroupedRows(e,a,r,a.level,0,n,s,l),!t.isNullOrUndefined(i.aggregates))if(t.isNullOrUndefined(o)){var h=i.result.GroupGuid?i.result.records:i.result;this.processAggregates(e,h,s)}else this.processAggregates(e,i.result,s,o);return s},r.prototype.processGroupedRows=function(e,i,r,n,o,s,l,a){for(var h=0,d=i;h<d.length;h++){var c=d[h],p=[],u={};u.index=1+n;var g=e.getColumnByField(c.field),f={value:c.key,column:g,style:void 0,isForeignKey:g.isForeignColumn()},m=e.getColumnByField(c.field).headerText+": "+(g.enableGroupByFormat?c.key:this.exportValueFormatter.formatCellValue(f))+" - ";c.count>1?m+=c.count+" items":m+=c.count+" item";var y={captionText:m,type:this.isCsvExport?"CSV":"Excel"};this.parent.trigger("exportGroupCaption",y),u.value=y.captionText,u.style=this.getCaptionThemeStyle(this.theme);var v=new Qi(e).generateRows(c);if(this.fillAggregates(e,v,i.level+i.childLevels,l,this.rowLength),p.push(u),l[l.length-1].cells.length>0){for(var C=i.level+i.childLevels+v[0].cells.length,w=0,b=0,S=l[l.length-1].cells;b<S.length;b++){var R=S[b];R.index<C&&(C=R.index),R.index>w&&(w=R.index),p[p.length-1].index!==R.index&&p.push(R)}for(C-u.index>1&&(u.colSpan=C-u.index);w<r.columns.length+n+i.childLevels;){var x={};x.index=w+1,x.style=this.getCaptionThemeStyle(this.theme),p.push(x),w++}}else{for(var F=0,E=0,I=r.columns;E<I.length;E++)I[E].visible&&F++;u.colSpan=i.childLevels+F}if(l[l.length-1].cells=p,this.rowLength++,this.groupedColLength<8&&n>1){var T={outlineLevel:n-1,isCollapsed:!0};l[l.length-1].grouping=T}!t.isNullOrUndefined(i.childLevels)&&i.childLevels>0?(this.processGroupedRows(e,c.items,r,c.items.level,o,s,l,a),this.processAggregates(e,c,l,void 0,n+i.childLevels,!0)):(o=this.processRecordRows(e,c.items,r,n,o,s,l,a),this.processAggregates(e,c,l,void 0,n,!0))}},r.prototype.processRecordRows=function(i,r,n,o,s,l,a,h){for(var d=1,c=[],p=n.columns,u=0,g=h.getGridRowModel(p,r,i,s);u<g.length;u++){var f=g[u];c=[],s++,d=1;for(var m=void 0,y=0,v=f.cells.length;y<v;y++){var C=f.cells[y];if(C.cellType===e.CellType.Data){var w=C.column,b=w.field,S=t.isNullOrUndefined(b)?"":w.valueAccessor(b,f.data,w),R=t.isNullOrUndefined(S)?"":S,x=void 0;if(w.isForeignColumn&&w.isForeignColumn()&&(x=h.getFData(R,w),R=t.getValue(w.foreignKeyValue,x)),!t.isNullOrUndefined(R)){var F={},E=d+o+i.childGridLevel,I={data:f.data,column:w,foreignKeyData:x,value:R,style:void 0,colSpan:1,cell:F};if(i.trigger("excelQueryCellInfo",I),!t.isNullOrUndefined(I.image)&&!t.isNullOrUndefined(I.image.base64)){t.isNullOrUndefined(this.sheet.images)&&(this.sheet.images=[]);var T={image:I.image.base64,row:this.rowLength,column:E,lastRow:this.rowLength,lastColumn:E};this.sheet.images.push(T),m=I.image.height||50,this.columns[E-1].width=I.image.width||this.columns[E-1].width}if(t.isNullOrUndefined(I.hyperLink)||(I.cell.hyperlink={target:I.hyperLink.target},I.value=I.hyperLink.displayText||I.value),F=I.cell,F.index=E,F.value=I.value,""===I.data&&i.childGridLevel&&1===d){var z={};z.hAlign="left",I={style:z},F.colSpan=i.getVisibleColumns().length,F.value=this.l10n.getConstant("EmptyRecord")}if(I.colSpan>1&&(F.colSpan=I.colSpan),t.isNullOrUndefined(I.style))F.style={name:i.element.id+"column"+(d+o)};else{var D=this.getColumnStyle(i,d+o);F.style=this.mergeOptions(this.styles[D],I.style)}c.push(F)}d++}}var M={index:this.rowLength++,cells:c};if(t.isNullOrUndefined(m)||(M.height=m),this.groupedColLength<8&&o>0?(M.grouping={outlineLevel:o,isCollapsed:!0},a.push(M)):a.push(M),!t.isNullOrUndefined(i.childGrid)){i.isPrinting=!0;var O=!t.isNullOrUndefined(l)&&l.exportType?l.exportType:"AllPages",k=this.helper.createChildGrid(i,f,O,this.gridPool),A=k.childGrid,B=k.element;A.actionFailure=h.failureHandler(this.gridPool,A,this.globalResolve),A.childGridLevel=i.childGridLevel+1;var P={childGrid:A,row:f,exportProperties:l};this.parent.trigger("exportdetaildatabound",P),A.beforeDataBound=this.childGridCell(M,A,l,f),A.appendTo(B)}i.notify("export-RowDataBound",{rowObj:f,type:"excel",excelRows:a})}return s},r.prototype.childGridCell=function(e,i,r,n){var o=this;return function(s){i.beforeDataBound=null,s.cancel=!0,0===s.result.length&&(s.result=[""]),e.childRows=o.processGridExport(i,r,s);for(var l=o.parent.groupSettings.columns.length,a=e.childRows,h=0;h<a.length;h++)a[h].grouping={outlineLevel:l+i.childGridLevel,isCollapsed:!n.isExpand,isHidden:!n.isExpand};return i.destroy(),t.detach(i.element),o.gridPool[i.id]=!0,o.helper.checkAndExport(o.gridPool,o.globalResolve),e}},r.prototype.processAggregates=function(e,i,r,n,o,s){var l=new Wi(e),a=l.getColumns();a=a.filter(function(e){return t.isNullOrUndefined(e.commands)&&"checkbox"!==e.type}),e.aggregates.length&&this.parent!==e&&e.aggregateModule.prepareSummaryInfo();var h=void 0;if(h=t.isNullOrUndefined(n)?i:n,void 0===o&&(o=0),e.groupSettings.columns.length>0&&s){var d=new Ki(e).generateRows(h,{level:h.level});d.length>0&&(r=this.fillAggregates(e,d,o,r))}else{o=e.groupSettings.columns.length>0&&!s?e.groupSettings.columns.length:o;var c=l.generateRows(h,i.aggregates,null,null,a);c.length>0&&!s&&(r=this.fillAggregates(e,c,o,r))}return r},r.prototype.fillAggregates=function(i,r,n,o,s){for(var l=0,a=r;l<a.length;l++){for(var h=a[l],d=[],c=!0,p=0,u=0,g=h.cells;u<g.length;u++){var f=g[u],m={};if(f.cellType!==e.CellType.DetailFooterIntent&&(f.visible||this.includeHiddenColumn))if(p++,f.isDataCell){c=!1;var y=!t.isNullOrUndefined(f.column.footerTemplate),v=!t.isNullOrUndefined(f.column.groupFooterTemplate),C=!t.isNullOrUndefined(f.column.groupCaptionTemplate);if(m.index=p+n+i.childGridLevel,y)m.value=this.getAggreateValue(e.CellType.Summary,f.column.footerTemplate,f,h);else if(v)m.value=this.getAggreateValue(e.CellType.GroupSummary,f.column.groupFooterTemplate,f,h);else if(C)m.value=this.getAggreateValue(e.CellType.CaptionSummary,f.column.groupCaptionTemplate,f,h);else for(var w=0,b=Object.keys(h.data[f.column.field]);w<b.length;w++)b[w]===f.column.type&&(t.isNullOrUndefined(h.data[f.column.field].Sum)?t.isNullOrUndefined(h.data[f.column.field].Average)?t.isNullOrUndefined(h.data[f.column.field].Max)?t.isNullOrUndefined(h.data[f.column.field].Min)?t.isNullOrUndefined(h.data[f.column.field].Count)?t.isNullOrUndefined(h.data[f.column.field].TrueCount)?t.isNullOrUndefined(h.data[f.column.field].FalseCount)?t.isNullOrUndefined(h.data[f.column.field].Custom)||(m.value=h.data[f.column.field].Custom):m.value=h.data[f.column.field][f.column.field+" - falsecount"]:m.value=h.data[f.column.field][f.column.field+" - truecount"]:m.value=h.data[f.column.field][f.column.field+" - count"]:m.value=h.data[f.column.field][f.column.field+" - min"]:m.value=h.data[f.column.field][f.column.field+" - max"]:m.value=h.data[f.column.field][f.column.field+" - average"]:m.value=h.data[f.column.field][f.column.field+" - sum"]);m.style=this.getCaptionThemeStyle(this.theme),this.aggregateStyle(f.column,m.style,f.column.field);var S=f.attributes.style;S.textAlign&&(m.style.hAlign=S.textAlign.toLowerCase());var R={row:h,type:y?"Footer":v?"GroupFooter":"GroupCaption",style:m};this.parent.trigger("excelAggregateQueryCellInfo",R),d.push(m)}else void 0===s&&(m.index=p+n+i.childGridLevel,m.style=this.getCaptionThemeStyle(this.theme),d.push(m))}if(t.isNullOrUndefined(s)){var x={};if(this.groupedColLength<8&&this.groupedColLength>0){var F={outlineLevel:o[o.length-1].grouping.outlineLevel,isCollapsed:!0};x={index:this.rowLength++,cells:d,grouping:F}}else x={index:this.rowLength++,cells:d};c||o.push(x)}else o.push({index:s,cells:d})}return o},r.prototype.aggregateStyle=function(e,i,r){var n=this.parent.getColumnByField(r);if("object"==typeof e.format){var o=e.format;i.numberFormat=t.isNullOrUndefined(o.format)?o.skeleton:o.format,t.isNullOrUndefined(o.type)||(i.type=o.type.toLowerCase())}else i.numberFormat=e.format;!t.isNullOrUndefined(n)&&t.isNullOrUndefined(i.type)&&(i.type=n.type.toLowerCase())},r.prototype.getAggreateValue=function(i,r,n,o){var s={};s[t.getEnumValue(e.CellType,n.cellType)]=t.compile(r);var l,a=o.data[n.column.field?n.column.field:n.column.columnName];return this.parent.isReact||this.parent.isVue?(l=s[t.getEnumValue(e.CellType,n.cellType)](a,this.parent),this.parent.isReact&&this.parent.renderTemplates()):l=s[t.getEnumValue(e.CellType,n.cellType)](a),l[0].textContent},r.prototype.mergeOptions=function(e,t){for(var i={},r=Object.keys(e),n=0;n<r.length;n++)"name"!==r[n]&&(i[r[n]]=e[r[n]]);r=Object.keys(t);for(n=0;n<r.length;n++)"name"!==r[n]&&(i[r[n]]=t[r[n]]);return i},r.prototype.getColumnStyle=function(e,t){for(var i=0,r=0,n=this.styles;r<n.length;r++){if(n[r].name===e.element.id+"column"+t)return i;i++}},r.prototype.processHeaderContent=function(i,r,n,o){var s=r.rows,l=r.columns,a=[];if(n>0)for(var h=0;h!==n;)this.columns.push({index:h+1,width:30}),h++;for(var d=0;d<s.length;d++){for(var c=1+n,p=[],u=0;u<s[d].cells.length;u++){var g={},f={},m=s[d].cells[u];if(m.cellType!==e.CellType.HeaderIndent&&m.cellType!==e.CellType.DetailHeader){for(var y={contains:!0,index:1};y.contains;)if(y=this.getIndex(a,1,c),c=y.index,!y.contains){f.index=y.index+i.childGridLevel;break}if(!t.isNullOrUndefined(m.rowSpan)&&1!==m.rowSpan){f.rowSpan=m.rowSpan;for(var v=1;v<m.rowSpan+1;v++){var C={rowIndex:0,columnIndex:0};C.rowIndex=v,C.columnIndex=c,a.push(C)}}t.isNullOrUndefined(m.colSpan)||1===m.colSpan||(f.colSpan=m.colSpan,c=c+f.colSpan-1),f.value=m.column.headerText,g=this.getHeaderThemeStyle(this.theme),t.isNullOrUndefined(m.column.textAlign)||(g.hAlign=m.column.textAlign.toLowerCase()),t.isNullOrUndefined(m.column.headerTextAlign)||(g.hAlign=m.column.headerTextAlign.toLowerCase());var w={cell:f,gridCell:m,style:g};i.trigger("excelHeaderQueryCellInfo",w),f.style=w.style,p.push(f),c++}}o.push({index:this.rowLength++,cells:p})}for(var b=0;b<l.length;b++)this.parseStyles(i,l[b],this.getRecordThemeStyle(this.theme),n+b+1);return o},r.prototype.getHeaderThemeStyle=function(e){var i={};return i.fontSize=12,i.borders={color:"#E0E0E0"},i.bold=!0,t.isNullOrUndefined(e)||t.isNullOrUndefined(e.header)||(i=this.updateThemeStyle(e.header,i)),i},r.prototype.updateThemeStyle=function(e,i){return t.extend(i,e)},r.prototype.getCaptionThemeStyle=function(e){var i={};return i.fontSize=13,i.backColor="#F6F6F6",t.isNullOrUndefined(e)||t.isNullOrUndefined(e.caption)||(i=this.updateThemeStyle(e.caption,i)),i},r.prototype.getRecordThemeStyle=function(e){var i={};return i.fontSize=13,i.borders={color:"#E0E0E0"},t.isNullOrUndefined(e)||t.isNullOrUndefined(e.record)||(i=this.updateThemeStyle(e.record,i)),i},r.prototype.processExcelHeader=function(e){if(!t.isNullOrUndefined(e.rows)&&("NewSheet"===this.expType||1===this.rowLength)){var i=void 0;void 0===e.headerRows?this.rowLength=e.rows.length:this.rowLength=e.headerRows,i=this.rowLength<e.rows.length?this.rowLength:e.rows.length,this.rowLength++;for(var r=0;r<i;r++){var n=e.rows[r];(null===n.index||t.isNullOrUndefined(n.index))&&(n.index=r+1),this.updatedCellIndex(n)}}},r.prototype.updatedCellIndex=function(e){for(var i=e.cells.length,r=0;r<i;r++){var n=e.cells[r];(null===n.index||t.isNullOrUndefined(n.index))&&(n.index=r+1)}this.rows.push(e)},r.prototype.processExcelFooter=function(e){if(!t.isNullOrUndefined(e.rows)){var i=void 0;void 0===e.footerRows?this.rowLength+=e.rows.length:e.footerRows>e.rows.length?(this.rowLength+=e.footerRows-e.rows.length,i=e.rows.length):i=e.footerRows;for(var r=0;r<i;r++){var n=e.rows[r];null===n.index||void 0===n.index?n.index=this.rowLength++:n.index+=this.rowLength,this.updatedCellIndex(n)}}},r.prototype.getIndex=function(e,t,i){for(var r=0,n=e;r<n.length;r++){var o=n[r];if(o.rowIndex===t&&o.columnIndex===i)return i+=1,{contains:!0,index:i}}return{contains:!1,index:i}},r.prototype.parseStyles=function(e,i,r,n){if(!t.isNullOrUndefined(i.format))if("object"==typeof i.format){var o=i.format;r.numberFormat=t.isNullOrUndefined(o.format)?o.skeleton:o.format,t.isNullOrUndefined(o.type)||(r.type=o.type.toLowerCase())}else r.numberFormat=i.format,r.type=i.type;t.isNullOrUndefined(i.textAlign)||(r.hAlign=i.textAlign.toLowerCase()),Object.keys(r).length>0&&(r.name=e.element.id+"column"+n,this.styles.push(r)),t.isNullOrUndefined(i.width)||"auto"===i.width||this.columns.push({index:n+e.childGridLevel,width:"number"==typeof i.width?i.width:this.helper.getConvertedWidth(i.width)})},r.prototype.destroy=function(){},r}(),Lo=function(){function r(e){this.hideColumnInclude=!1,this.currentViewData=!1,this.customDataSource=!1,this.isGrouping=!1,this.headerOnPages=[],this.drawPosition={xPosition:0,yPosition:0},this.parent=e,this.helper=new Bo(e),this.gridPool={}}return r.prototype.getModuleName=function(){return"PdfExport"},r.prototype.init=function(e){this.exportValueFormatter=new Po(e.locale),this.pdfDocument=void 0,this.hideColumnInclude=!1,this.currentViewData=!1,this.parent=e,this.isGrouping=!1,this.isExporting=!0,e.id=L("main-grid"),this.gridPool[e.id]=!1,this.pdfPageSettings=new d.PdfPageSettings},r.prototype.exportWithData=function(e,i,r,n,o,s,l){var a=this;this.init(e),t.isNullOrUndefined(i)?this.pdfDocument=new d.PdfDocument:this.pdfDocument=i,this.processExport(e,n,o,s).then(function(){a.isExporting=!1,e.trigger("pdfExportComplete",a.isBlob?{promise:a.blobPromise}:{}),a.parent.log("exporting_complete",a.getModuleName()),r(a.pdfDocument)}).catch(function(e){l(a.pdfDocument),a.parent.trigger("actionFailure",e)})},r.prototype.Map=function(e,r,n,o,s){var l=this;this.data=new yi(this.parent),this.isBlob=s,this.gridPool={};var a=new i.Query;e.childGrid&&(t.isNullOrUndefined(r)||"None"!==r.hierarchyExportMode)&&(e.expandedRows=fe(e).expandedRows);var h={requestType:"beforePdfExport",cancel:!1,headerPageNumbers:[],gridDrawPosition:{xPosition:0,yPosition:0},generateQuery:!1};h.gridObject=e;if(e.trigger("beforePdfExport",h),!0===h.cancel)return new Promise(function(e,t){return e()});if(y(r)&&v(r,e),h.generateQuery&&(a=Bo.getQuery(e,this.data)),this.headerOnPages=h.headerPageNumbers,this.drawPosition=h.gridDrawPosition,this.parent.log("exporting_begin",this.getModuleName()),!t.isNullOrUndefined(r)&&!t.isNullOrUndefined(r.dataSource)&&r.dataSource instanceof i.DataManager)return new Promise(function(t,i){r.dataSource.executeQuery(a).then(function(s){l.exportWithData(e,o,t,s,r,n,i)})});if(t.isNullOrUndefined(r)||"CurrentPage"!==r.exportType){var c=[];return c.push(this.data.getData({},Bo.getQuery(e,this.data))),c.push(this.helper.getColumnData(e)),new Promise(function(i,s){Promise.all(c).then(function(a){l.init(e),t.isNullOrUndefined(o)?l.pdfDocument=new d.PdfDocument:l.pdfDocument=o,l.processExport(e,a[0],r,n).then(function(){l.isExporting=!1,e.trigger("pdfExportComplete",l.isBlob?{promise:l.blobPromise}:{}),l.parent.log("exporting_complete",l.getModuleName()),i(l.pdfDocument)}).catch(function(e){s(l.pdfDocument),l.parent.trigger("actionFailure",e)})})})}return new Promise(function(t,i){l.exportWithData(e,o,t,l.parent.getCurrentViewRecords(),r,n,i)})},r.prototype.processExport=function(e,i,r,n){var o,s=this,l=this.pdfDocument.sections.add();this.processSectionExportProperties(l,r);var a=l.pages.add();return new Promise(function(t,n){o=s.processGridExport(e,i,r),s.globalResolve=t,s.gridPool[e.id]=!0,s.helper.checkAndExport(s.gridPool,s.globalResolve)}).then(function(){return o.draw(a,s.drawPosition.xPosition,s.drawPosition.yPosition),s.drawHeader(r),n||(s.isBlob?s.blobPromise=s.pdfDocument.save():!t.isNullOrUndefined(r)&&r.fileName?s.pdfDocument.save(r.fileName):s.pdfDocument.save("Export.pdf"),s.pdfDocument.destroy(),delete e.expandedRows),s.pdfDocument})},r.prototype.processSectionExportProperties=function(e,i){return t.isNullOrUndefined(i)||t.isNullOrUndefined(i.pageOrientation)&&t.isNullOrUndefined(i.pageSize)||(this.pdfPageSettings.orientation="Landscape"===i.pageOrientation?d.PdfPageOrientation.Landscape:d.PdfPageOrientation.Portrait,this.pdfPageSettings.size=this.getPageSize(i.pageSize),e.setPageSettings(this.pdfPageSettings)),e},r.prototype.processGridExport=function(e,i,r){var n=!0,o=this.parent.isFrozenGrid()&&!this.parent.getFrozenColumns();t.isNullOrUndefined(r)||(this.gridTheme=r.theme,n=!!t.isNullOrUndefined(r.allowHorizontalOverflow)||r.allowHorizontalOverflow);var s=new Bo(e,this.helper.getForeignKeyData()),l=this.processExportProperties(r,i.result),a=y(r)?T(r.columns,e.enableColumnVirtualization):s.getGridExportColumns(o?e.getColumns():e.columns);a=a.filter(function(e){return t.isNullOrUndefined(e.commands)});var h=!1;e.groupSettings.columns.length&&(h=!0),e.childGrid&&!t.isNullOrUndefined(r)&&(e.hierarchyPrintMode=r.hierarchyExportMode||"Expanded");var c=new d.PdfGrid,p=this.getHeaderThemeStyle(),u=p.border,g=p.font,f=p.brush,m=s.getHeaders(a,this.hideColumnInclude),v=m.columns;c=this.processGridHeaders(e.groupSettings.columns.length,c,m.rows,v,u,g,f,e,n,a),this.setColumnProperties(v,c,s,e,n);var C=this.getSummaryCaptionThemeStyle();if(!t.isNullOrUndefined(l)&&l.length){if(h?(t.isNullOrUndefined(C.border)||(u=C.border),this.processGroupedRecords(c,l,v,e,u,0,C.font,C.brush,C.backgroundBrush,i,r,s,0)):this.processRecord(u,v,e,l,c,0,r,s,0),!t.isNullOrUndefined(i.aggregates)){var w=new Wi(e),b=void 0,S=w.getColumns();S=S.filter(function(e){return t.isNullOrUndefined(e.commands)&&"checkbox"!==e.type}),e.aggregates.length&&this.parent!==e&&e.aggregateModule.prepareSummaryInfo(),b=this.customDataSource?w.generateRows(l,i.aggregates):this.currentViewData?w.generateRows(this.parent.getCurrentViewRecords(),i.aggregates):h?w.generateRows(l.records,i.aggregates):w.generateRows(i.result,i.aggregates,null,null,S),this.processAggregates(b,c,u,C.font,C.brush,C.backgroundBrush,!1)}}else c.rows.addRow().style.setBorder(u);return c},r.prototype.getSummaryCaptionThemeStyle=function(){if(t.isNullOrUndefined(this.gridTheme)||t.isNullOrUndefined(this.gridTheme.caption))return{font:new d.PdfStandardFont(d.PdfFontFamily.Helvetica,9.75),brush:new d.PdfSolidBrush(new d.PdfColor(0,0,0)),backgroundBrush:new d.PdfSolidBrush(new d.PdfColor(246,246,246))};var e=t.isNullOrUndefined(this.gridTheme.caption.fontSize)?9.75:this.gridTheme.caption.fontSize,i=t.isNullOrUndefined(this.gridTheme.caption.fontName)?d.PdfFontFamily.Helvetica:this.getFontFamily(this.gridTheme.caption.fontName),r=this.getFontStyle(this.gridTheme.caption),n=new d.PdfColor(0,0,0);if(!t.isNullOrUndefined(this.gridTheme.caption.fontColor)){var o=this.hexToRgb(this.gridTheme.caption.fontColor);n=new d.PdfColor(o.r,o.g,o.b)}var s=this.gridTheme.caption.border?this.getBorderStyle(this.gridTheme.caption.border):null,l=new d.PdfStandardFont(i,e,r);return t.isNullOrUndefined(this.gridTheme.caption.font)||(l=this.gridTheme.caption.font),{font:l,brush:new d.PdfSolidBrush(n),backgroundBrush:new d.PdfSolidBrush(new d.PdfColor(246,246,246)),border:s}},r.prototype.getGridPdfFont=function(e){var i=0;if(e.header&&e.header.font){var r=e.header.font.fontFamily,n=e.header.font.fontSize,o=e.header.font.fontStyle;if(i=t.isNullOrUndefined(d.PdfFontStyle[o])?0:d.PdfFontStyle[o],e.header.font.isTrueType)e.header.font=new d.PdfTrueTypeFont(r,n,i);else{var s=t.isNullOrUndefined(r)?d.PdfFontFamily.Helvetica:this.getFontFamily(r);e.header.font=new d.PdfStandardFont(s,n,i)}}if(e.caption&&e.caption.font){var l=e.caption.font.fontFamily,a=e.caption.font.fontSize,h=e.caption.font.fontStyle;if(i=t.isNullOrUndefined(d.PdfFontStyle[h])?0:d.PdfFontStyle[h],e.caption.font.isTrueType)e.caption.font=new d.PdfTrueTypeFont(l,a,i);else{var c=t.isNullOrUndefined(l)?d.PdfFontFamily.Helvetica:this.getFontFamily(l);e.caption.font=new d.PdfStandardFont(c,a,i)}}if(e.record&&e.record.font){var p=e.record.font.fontFamily,u=e.record.font.fontSize,g=e.record.font.fontStyle;if(i=t.isNullOrUndefined(d.PdfFontStyle[g])?0:d.PdfFontStyle[g],e.record.font.isTrueType)e.record.font=new d.PdfTrueTypeFont(p,u,i);else{var f=t.isNullOrUndefined(p)?d.PdfFontFamily.Helvetica:this.getFontFamily(p);e.record.font=new d.PdfStandardFont(f,u,i)}}},r.prototype.getHeaderThemeStyle=function(){var e=new d.PdfBorders;if(t.isNullOrUndefined(this.gridTheme)||t.isNullOrUndefined(this.gridTheme.header))return e.all=new d.PdfPen(new d.PdfColor(234,234,234)),{border:e,font:new d.PdfStandardFont(d.PdfFontFamily.Helvetica,10.5),brush:new d.PdfSolidBrush(new d.PdfColor(102,102,102))};var i=t.isNullOrUndefined(this.gridTheme.header.fontName)?d.PdfFontFamily.Helvetica:this.getFontFamily(this.gridTheme.header.fontName),r=this.getFontStyle(this.gridTheme.header),n=t.isNullOrUndefined(this.gridTheme.header.fontSize)?10.5:this.gridTheme.header.fontSize,o=new d.PdfColor;if(!t.isNullOrUndefined(this.gridTheme.header.fontColor)){var s=this.hexToRgb(this.gridTheme.header.fontColor);o=new d.PdfColor(s.r,s.g,s.b)}var l=new d.PdfStandardFont(i,n,r);return t.isNullOrUndefined(this.gridTheme.header.font)||(l=this.gridTheme.header.font),{border:this.getBorderStyle(this.gridTheme.header.border),font:l,brush:new d.PdfSolidBrush(o)}},r.prototype.processGroupedRecords=function(e,i,r,n,o,s,l,a,h,c,p,u,g){for(var f=this,m=s,y=this,v=0,C=i;v<C.length;v++)!function(s){var v=e.rows.addRow(),C=n.getColumnByField(s.field),w={value:s.key,column:C,style:void 0,isForeignKey:C.isForeignColumn()},b={captionText:y.parent.getColumnByField(s.field).headerText+": "+(C.enableGroupByFormat?s.key:y.exportValueFormatter.formatCellValue(w))+" - "+s.count+(i.count>1?" items":" item"),type:"PDF"};y.parent.trigger("exportGroupCaption",b,function(y){v.cells.getCell(m).value=y.captionText,v.cells.getCell(m+1).style.stringFormat=new d.PdfStringFormat(d.PdfTextAlignment.Left),v.style.setBorder(o),v.style.setFont(l),v.style.setTextBrush(a),v.style.setBackgroundBrush(h);var C,w=new Qi(n);if(C=t.isNullOrUndefined(s.items.records)?w.generateRows(s.items,s):w.generateRows(s.items.records,s),t.isNullOrUndefined(C)||0!==C.length||(v.cells.getCell(m+1).columnSpan=e.columns.count-(m+1)),!t.isNullOrUndefined(i.childLevels)&&i.childLevels>0)f.processAggregates(C,e,o,l,a,h,!0,v,m),f.processGroupedRecords(e,s.items,r,n,o,m+1,l,a,h,c,p,u,g),C=(b=new Ki(n)).generateRows(s.items.records,s),f.processAggregates(C,e,o,l,a,h,!1);else{f.processAggregates(C,e,o,l,a,h,!0,v,m),g=f.processRecord(o,r,n,s.items,e,m+1,p,u,g);var b=new Ki(n);C=b.generateRows(s.items,s);f.processAggregates(C,e,o,l,a,h,!1,null,null,!0)}})}(C[v])},r.prototype.processGridHeaders=function(i,r,n,o,s,l,a,h,d,c){var p=this,u=o.length+i,g=ve(c),f=c,m=0;this.parent.allowGrouping&&(m=this.parent.groupSettings.columns.length),r.columns.add(u),r.headers.add(n.length);var y=function(i,o,h,d,c){var u=r.headers.getHeader(i),g=u.cells.getCell(o),f=n[i].cells[o];t.isNullOrUndefined(h.headerTextAlign)||(g.style.stringFormat=p.getHorizontalAlignment(h.headerTextAlign)),d>0&&(g.rowSpan=d,g.style.stringFormat=p.getVerticalAlignment("Bottom",g.style.stringFormat,h.textAlign)),c>0&&(g.columnSpan=c),u.style.setBorder(s),u.style.setFont(l),u.style.setTextBrush(a),g.value=h.headerText,t.isNullOrUndefined(f)||f.cellType!==e.CellType.HeaderIndent&&f.cellType!==e.CellType.DetailHeader||(g.value="",g.width=20);var m={cell:g,gridCell:f,style:g.style};p.parent.trigger("pdfHeaderQueryCellInfo",m)},v=function(e,t,i,r,n,o){for(var s=0,l=0;l<e.length;l++)if(o&&(r=s=s+i+(0===l?0:-1),i=0),o||e[l].visible||(r-=1),e[l].columns&&e[l].columns.length){var a=v(e[l].columns,t-1,0,l+r,n+1,!1);y(n,l+r+m,e[l],0,a),i+=a,r=r+a-1}else(e[l].visible||p.hideColumnInclude)&&(i++,y(n,l+r+m,e[l],t,0));return i};return v(f,g,0,0,0,!0),r.columns.count>=6&&d&&(r.style.allowHorizontalOverflow=!0),r},r.prototype.processExportProperties=function(e,r){if(t.isNullOrUndefined(e))this.currentViewData=!1,this.customDataSource=!1;else{t.isNullOrUndefined(e.theme)||(this.gridTheme=e.theme);var n=this.pdfPageSettings.size;if(this.drawHeader(e),!t.isNullOrUndefined(e.footer)){var o=e.footer,s=new d.PointF(0,n.width-80-.75*o.fromBottom),l=new d.SizeF(n.width-80,.75*o.height),a=new d.RectangleF(s,l);this.pdfDocument.template.bottom=this.drawPageTemplate(new d.PdfPageTemplateElement(a),o)}t.isNullOrUndefined(e.includeHiddenColumn)||this.isGrouping||(this.hideColumnInclude=e.includeHiddenColumn),t.isNullOrUndefined(e.dataSource)?t.isNullOrUndefined(e.exportType)?(this.currentViewData=!1,this.customDataSource=!1):"CurrentPage"===e.exportType?(r=this.parent.currentViewData,this.currentViewData=!0,this.customDataSource=!1):(this.currentViewData=!1,this.customDataSource=!1):(e.dataSource instanceof i.DataManager||(r=e.dataSource),this.customDataSource=!0,this.currentViewData=!1)}return r},r.prototype.drawHeader=function(e){var i=this,r=this.pdfPageSettings.size;if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(e.header)){var n=e.header,o=new d.PointF(0,n.fromTop),s=new d.SizeF(r.width-80,.75*n.height),l=new d.RectangleF(o,s);if(this.headerOnPages.length){var a=this.drawPageTemplate(new d.PdfPageTemplateElement(l),n);this.headerOnPages.filter(function(e){e-1>=0&&e-1<i.pdfDocument.pages.count-1&&i.pdfDocument.pages.getPageByIndex(e-1).graphics.drawPdfTemplate(a.template,new d.PointF(0,0))})}else this.pdfDocument.template.top=this.drawPageTemplate(new d.PdfPageTemplateElement(l),n)}},r.prototype.drawPageTemplate=function(e,t){for(var i=0,r=t.contents;i<r.length;i++){var n=r[i];switch(this.processContentValidation(n),n.type){case"Text":if(""===n.value||void 0===n.value||null===n.value||"string"!=typeof n.value)throw new Error("please enter the valid input value in text content...");this.drawText(e,n);break;case"PageNumber":this.drawPageNumber(e,n);break;case"Image":if(void 0===n.src||null===n.src||""===n.src)throw new Error("please enter the valid base64 string in image content...");this.drawImage(e,n);break;case"Line":this.drawLine(e,n);break;default:throw new Error("Please set valid content type...")}}return e},r.prototype.processContentValidation=function(e){if(void 0===e.type||null===e.type)throw new Error("please set valid content type...");if("Line"===e.type){if(void 0===e.points||null===e.points)throw new Error("please enter valid points in "+e.type+" content...");if(void 0===e.points.x1||null===e.points.x1||"number"!=typeof e.points.x1)throw new Error("please enter valid x1 co-ordinate in "+e.type+" points...");if(void 0===e.points.y1||null===e.points.y1||"number"!=typeof e.points.y1)throw new Error("please enter valid y1 co-ordinate in "+e.type+" points...");if(void 0===e.points.x2||null===e.points.x2||"number"!=typeof e.points.x2)throw new Error("please enter valid x2 co-ordinate in "+e.type+" points...");if(void 0===e.points.y2||null===e.points.y2||"number"!=typeof e.points.y2)throw new Error("please enter valid y2 co-ordinate in "+e.type+" points...")}else{if(void 0===e.position||null===e.position)throw new Error("please enter valid position in "+e.type+" content...");if(void 0===e.position.x||null===e.position.x||"number"!=typeof e.position.x)throw new Error("please enter valid x co-ordinate in "+e.type+" position...");if(void 0===e.position.y||null===e.position.y||"number"!=typeof e.position.y)throw new Error("please enter valid y co-ordinate in "+e.type+" position...")}},r.prototype.drawText=function(e,i){var r=this.getFont(i),n=this.getBrushFromContent(i),o=null;if(!t.isNullOrUndefined(i.style.textPenColor)){var s=this.hexToRgb(i.style.textPenColor);o=new d.PdfPen(new d.PdfColor(s.r,s.g,s.b))}null==n&&null==o&&(n=new d.PdfSolidBrush(new d.PdfColor(0,0,0)));var l=i.value.toString(),a=.75*i.position.x,h=.75*i.position.y,c=new d.PdfStringFormat,p=this.setContentFormat(i,c);null===p||t.isNullOrUndefined(p.format)||t.isNullOrUndefined(p.size)?e.graphics.drawString(l,r,o,n,a,h,c):e.graphics.drawString(l,r,o,n,a,h,p.size.width,p.size.height,p.format)},r.prototype.drawPageNumber=function(e,i){var r=this.getFont(i),n=null;if(t.isNullOrUndefined(i.style.textBrushColor))n=new d.PdfSolidBrush(new d.PdfColor(0,0,0));else{var o=this.hexToRgb(i.style.textBrushColor);n=new d.PdfSolidBrush(new d.PdfColor(o.r,o.g,o.b))}var s=new d.PdfPageNumberField(r,n);s.numberStyle=this.getPageNumberStyle(i.pageNumberType);var l,a;if(t.isNullOrUndefined(i.format))a="{0}",l=new d.PdfCompositeField(r,n,a,s);else{var h="$total";if(-1!==i.format.indexOf(h)&&-1!==i.format.indexOf("$current"))(c=new d.PdfPageCountField(r)).numberStyle=this.getPageNumberStyle(i.pageNumberType),a=i.format.indexOf(h)>i.format.indexOf("$current")?(a=i.format.replace("$current","0")).replace(h,"1"):(a=i.format.replace("$current","1")).replace(h,"0"),l=new d.PdfCompositeField(r,n,a,s,c);else if(-1!==i.format.indexOf("$current")&&-1===i.format.indexOf(h))a=i.format.replace("$current","0"),l=new d.PdfCompositeField(r,n,a,s);else{var c=new d.PdfPageCountField(r);a=i.format.replace(h,"0"),l=new d.PdfCompositeField(r,n,a,c)}}var p=.75*i.position.x,u=.75*i.position.y,g=this.setContentFormat(i,l.stringFormat);null===g||t.isNullOrUndefined(g.format)||t.isNullOrUndefined(g.size)||(l.stringFormat=g.format,l.bounds=new d.RectangleF(p,u,g.size.width,g.size.height)),l.draw(e.graphics,p,u)},r.prototype.drawImage=function(e,i){var r=.75*i.position.x,n=.75*i.position.y,o=t.isNullOrUndefined(i.size)?void 0:.75*i.size.width,s=t.isNullOrUndefined(i.size)?void 0:.75*i.size.height,l=new d.PdfBitmap(i.src);t.isNullOrUndefined(o)?e.graphics.drawImage(l,r,n):e.graphics.drawImage(l,r,n,o,s)},r.prototype.drawLine=function(e,i){var r=.75*i.points.x1,n=.75*i.points.y1,o=.75*i.points.x2,s=.75*i.points.y2,l=this.getPenFromContent(i);t.isNullOrUndefined(i.style)||null===i.style||(t.isNullOrUndefined(i.style.penSize)||null===i.style.penSize||"number"!=typeof i.style.penSize||(l.width=.75*i.style.penSize),l.dashStyle=this.getDashStyle(i.style.dashStyle)),e.graphics.drawLine(l,r,n,o,s)},r.prototype.processAggregates=function(i,r,n,o,s,l,a,h,d,c){for(var p=0,u=i;p<u.length;p++){for(var g=u[p],f=-1,m=0,y=!0,v=[],C=0;C<r.columns.count;C++){var w=g.cells[m];if(w.cellType!==e.CellType.DetailFooterIntent){if(!this.hideColumnInclude){for(;void 0===w.visible;)if(w.cellType!==e.CellType.DetailFooterIntent){if(t.isNullOrUndefined(h))v.push("");else if(t.isNullOrUndefined(h.cells.getCell(C).value))v.push("");else{E={row:g,type:"GroupCaption",style:h.cells};this.parent.trigger("pdfAggregateQueryCellInfo",E),v.push(""),v.push(h.cells.getCell(C).value),y=!1,a||(C+=1)}C+=1,m+=1,w=g.cells[m]}for(;!t.isNullOrUndefined(w.visible)&&!w.visible;)m+=1,w=g.cells[m]}if(w.isDataCell){var b={};if(t.isNullOrUndefined(w.column.footerTemplate)&&t.isNullOrUndefined(w.column.groupCaptionTemplate)&&t.isNullOrUndefined(w.column.groupFooterTemplate)){var S=this.getSummaryWithoutTemplate(g.data[w.column.field]);t.isNullOrUndefined(S)||v.push(S)}else{b=(S=this.getTemplateFunction(b,C,f,w)).templateFunction,f=S.leastCaptionSummaryIndex;var R=void 0,x=g.data[w.column.field?w.column.field:w.column.columnName];this.parent.isReact||this.parent.isVue?(R=b[t.getEnumValue(e.CellType,w.cellType)](x,this.parent),this.parent.isReact&&this.parent.renderTemplates()):R=b[t.getEnumValue(e.CellType,w.cellType)](x),v.push(R[0].textContent),y=!1}}else v.push("");y&&""!==v[C]&&!t.isNullOrUndefined(v[C])&&null!==v[C]&&(y=!1),m+=1}else C--,m++}if(a)for(C=this.parent.groupSettings.columns.length+1;C<v.length-1;C++)v[C]=v[C+1];if(!y)if(a)for(C=0;C<r.columns.count;C++)h.cells.getCell(C).value=v[C].toString(),C===d+1&&-1!==f&&1!==f?h.cells.getCell(C).columnSpan=f-(d+1):C===d+1&&-1===f&&(h.cells.getCell(C).columnSpan=r.columns.count-(d+1));else{var F=r.rows.addRow();F.style.setBorder(n),F.style.setFont(o),F.style.setTextBrush(s),F.style.setBackgroundBrush(l);var E={row:g,type:c?"GroupFooter":"Footer",style:F.cells};this.parent.trigger("pdfAggregateQueryCellInfo",E);for(C=0;C<r.columns.count;C++)F.cells.getCell(C).value=v[C].toString()}}},r.prototype.getTemplateFunction=function(i,r,n,o){return t.isNullOrUndefined(o.column.footerTemplate)||o.cellType!==e.CellType.Summary?t.isNullOrUndefined(o.column.groupCaptionTemplate)?i[t.getEnumValue(e.CellType,e.CellType.GroupSummary)]=t.compile(o.column.groupFooterTemplate):(-1===n&&(n=r),i[t.getEnumValue(e.CellType,e.CellType.CaptionSummary)]=t.compile(o.column.groupCaptionTemplate)):i[t.getEnumValue(e.CellType,e.CellType.Summary)]=t.compile(o.column.footerTemplate),{templateFunction:i,leastCaptionSummaryIndex:n}},r.prototype.getSummaryWithoutTemplate=function(e){return t.isNullOrUndefined(e.Sum)?t.isNullOrUndefined(e.Average)?t.isNullOrUndefined(e.Max)?t.isNullOrUndefined(e.Min)?t.isNullOrUndefined(e.Count)?t.isNullOrUndefined(e.TrueCount)?t.isNullOrUndefined(e.FalseCount)?t.isNullOrUndefined(e.Custom)?void 0:e.Custom:e.FalseCount:e.TrueCount:e.Count:e.Min:e.Max:e.Average:e.Sum},r.prototype.setColumnProperties=function(e,i,r,n,o){for(var s=n.groupSettings.columns.length,l=0;l<s;l++)i.columns.getColumn(l).width=20;for(l=0;l<e.length;l++)t.isNullOrUndefined(e[l].textAlign)||(i.columns.getColumn(l+s).format=this.getHorizontalAlignment(e[l].textAlign)),i.style.allowHorizontalOverflow&&!t.isNullOrUndefined(e[l].width)&&o&&(i.columns.getColumn(l+s).width="number"==typeof e[l].width?.75*e[l].width:.75*r.getConvertedWidth(e[l].width))},r.prototype.setRecordThemeStyle=function(e,i){if(t.isNullOrUndefined(this.gridTheme)||t.isNullOrUndefined(this.gridTheme.record))e.style.setTextBrush(new d.PdfSolidBrush(new d.PdfColor(0,0,0)));else{var r=t.isNullOrUndefined(this.gridTheme.record.fontName)?d.PdfFontFamily.Helvetica:this.getFontFamily(this.gridTheme.record.fontName),n=t.isNullOrUndefined(this.gridTheme.record.fontSize)?9.75:this.gridTheme.record.fontSize,o=this.getFontStyle(this.gridTheme.record),s=new d.PdfStandardFont(r,n,o);t.isNullOrUndefined(this.gridTheme.record.font)||(s=this.gridTheme.record.font),e.style.setFont(s);var l=new d.PdfColor;if(!t.isNullOrUndefined(this.gridTheme.record.fontColor)){var a=this.hexToRgb(this.gridTheme.record.fontColor);l=new d.PdfColor(a.r,a.g,a.b)}e.style.setTextBrush(new d.PdfSolidBrush(l))}var h=this.gridTheme&&this.gridTheme.record&&this.gridTheme.record.border?this.getBorderStyle(this.gridTheme.record.border):i;return e.style.setBorder(h),e},r.prototype.processRecord=function(i,r,n,o,s,l,a,h,c){for(var p=0,u=h.getGridRowModel(r,o,n,c);p<u.length;p++){var g=u[p];c++;for(var f=this.setRecordThemeStyle(s.rows.addRow(),i),m=g.cells.length,y=0;y<m;y++){var v=g.cells[y];if(v.cellType===e.CellType.Data){var C=v.column,w=C.field,b=t.isNullOrUndefined(w)?"":C.valueAccessor(w,g.data,C),S=t.isNullOrUndefined(b)?"":b,R=void 0;if(C.isForeignColumn&&C.isForeignColumn()&&(R=h.getFData(S,C),S=t.getValue(C.foreignKeyValue,R)),(O={data:g.data,value:S,column:C,style:void 0,colSpan:1,cell:I=f.cells.getCell(y)}).value="boolean"===O.column.type&&"string"==typeof O.value?O.value:this.exportValueFormatter.formatCellValue(O,n.isServerRendered),this.parent.trigger("pdfQueryCellInfo",O),t.isNullOrUndefined(O.image)||(O.value=new d.PdfBitmap(O.image.base64)),I.value=O.value,!t.isNullOrUndefined(O.hyperLink)){var x=new d.PdfTextWebLink;x.url=O.hyperLink.target,x.text=O.hyperLink.displayText||O.hyperLink.target,x.font=new d.PdfStandardFont(d.PdfFontFamily.Helvetica,9.75),x.brush=new d.PdfSolidBrush(new d.PdfColor(51,102,187)),I.value=x}if(t.isNullOrUndefined(O.style)||this.processCellStyle(I,O),O.colSpan>1){y+1+O.colSpan>f.cells.count&&(O.colSpan=f.cells.count-(y+1)),I.columnSpan=O.colSpan;for(var F=1;F<I.columnSpan;F++)f.cells.getCell(y+F).value="";y+=O.colSpan-1}}}if(g.isExpand){var E=this.setRecordThemeStyle(s.rows.addRow(),i),I=E.cells.getCell(l);I.columnSpan=E.cells.count-l,I.style.cellPadding=new d.PdfPaddings(10,10,10,10),n.isPrinting=!0;var T=!t.isNullOrUndefined(a)&&a.exportType?a.exportType:"AllPages",z=this.helper.createChildGrid(n,g,T,this.gridPool),D=z.childGrid,M=z.element;D.actionFailure=h.failureHandler(this.gridPool,D,this.globalResolve);var O={childGrid:D,row:g,cell:I,exportProperties:a};this.parent.trigger("exportdetaildatabound",O),D.beforeDataBound=this.childGridCell(I,D,a),D.appendTo(M)}this.parent.notify("export-RowDataBound",{type:"pdf",rowObj:g})}return c},r.prototype.childGridCell=function(e,i,r){var n=this;return function(o){return i.beforeDataBound=null,o.cancel=!0,e.value=n.processGridExport(i,o,r),i.destroy(),t.detach(i.element),n.gridPool[i.id]=!0,n.helper.checkAndExport(n.gridPool,n.globalResolve),e}},r.prototype.processCellStyle=function(e,i){if(!t.isNullOrUndefined(i.style.backgroundColor)){var r=this.hexToRgb(i.style.backgroundColor);e.style.backgroundBrush=new d.PdfSolidBrush(new d.PdfColor(r.r,r.g,r.b))}if(t.isNullOrUndefined(i.style.textAlignment)||(e.style.stringFormat=this.getHorizontalAlignment(i.style.textAlignment)),t.isNullOrUndefined(i.style.cellPadding)||(e.style.cellPadding=i.style.cellPadding),t.isNullOrUndefined(i.style.verticalAlignment)||(e.style.stringFormat=this.getVerticalAlignment(i.style.verticalAlignment,e.style.stringFormat)),!t.isNullOrUndefined(i.style.textBrushColor)){var n=this.hexToRgb(i.style.textBrushColor);e.style.textBrush=new d.PdfSolidBrush(new d.PdfColor(n.r,n.g,n.b))}if(!t.isNullOrUndefined(i.style.textPenColor)){var o=this.hexToRgb(i.style.textPenColor);e.style.textPen=new d.PdfPen(new d.PdfColor(o.r,o.g,o.b))}if(t.isNullOrUndefined(i.style.fontFamily)&&t.isNullOrUndefined(i.style.fontSize)&&t.isNullOrUndefined(i.style.bold)&&t.isNullOrUndefined(i.style.italic)&&t.isNullOrUndefined(i.style.underline)&&t.isNullOrUndefined(i.style.strikeout)||(e.style.font=this.getFont(i)),!t.isNullOrUndefined(i.style.border)){var s=new d.PdfBorders,l=i.style.border.width,a=t.isNullOrUndefined(l)||"number"!=typeof l?void 0:.75*l,h=new d.PdfColor(196,196,196);if(!t.isNullOrUndefined(i.style.border.color)){var c=this.hexToRgb(i.style.border.color);h=new d.PdfColor(c.r,c.g,c.b)}var p=new d.PdfPen(h,a);t.isNullOrUndefined(i.style.border.dashStyle)||(p.dashStyle=this.getDashStyle(i.style.border.dashStyle)),s.all=p,e.style.borders=s}t.isNullOrUndefined(i.style.paragraphIndent)||(e.style.stringFormat=new d.PdfStringFormat,e.style.stringFormat.paragraphIndent=i.style.paragraphIndent)},r.prototype.getHorizontalAlignment=function(e,t){switch(void 0===t&&(t=new d.PdfStringFormat),e){case"Right":t.alignment=d.PdfTextAlignment.Right;break;case"Center":t.alignment=d.PdfTextAlignment.Center;break;case"Justify":t.alignment=d.PdfTextAlignment.Justify;break;case"Left":t.alignment=d.PdfTextAlignment.Left}return t},r.prototype.getVerticalAlignment=function(e,t,i){switch(void 0===t&&(t=new d.PdfStringFormat,t=this.getHorizontalAlignment(i,t)),e){case"Bottom":t.lineAlignment=d.PdfVerticalAlignment.Bottom;break;case"Middle":t.lineAlignment=d.PdfVerticalAlignment.Middle;break;case"Top":t.lineAlignment=d.PdfVerticalAlignment.Top}return t},r.prototype.getFontFamily=function(e){switch(e){case"TimesRoman":return 2;case"Courier":return 1;case"Symbol":return 3;case"ZapfDingbats":return 4;default:return 0}},r.prototype.getFont=function(e){if(e.font)return e.font;var i=t.isNullOrUndefined(e.style.fontSize)?9.75:.75*e.style.fontSize,r=t.isNullOrUndefined(e.style.fontFamily)?d.PdfFontFamily.TimesRoman:this.getFontFamily(e.style.fontFamily),n=d.PdfFontStyle.Regular;return!t.isNullOrUndefined(e.style.bold)&&e.style.bold&&(n|=d.PdfFontStyle.Bold),!t.isNullOrUndefined(e.style.italic)&&e.style.italic&&(n|=d.PdfFontStyle.Italic),!t.isNullOrUndefined(e.style.underline)&&e.style.underline&&(n|=d.PdfFontStyle.Underline),!t.isNullOrUndefined(e.style.strikeout)&&e.style.strikeout&&(n|=d.PdfFontStyle.Strikeout),new d.PdfStandardFont(r,i,n)},r.prototype.getPageNumberStyle=function(e){switch(e){case"LowerLatin":return 2;case"LowerRoman":return 3;case"UpperLatin":return 4;case"UpperRoman":return 5;default:return 1}},r.prototype.setContentFormat=function(e,i){if(!t.isNullOrUndefined(e.size)){var r=.75*e.size.width,n=.75*e.size.height;if(i=new d.PdfStringFormat(d.PdfTextAlignment.Left,d.PdfVerticalAlignment.Middle),!t.isNullOrUndefined(e.style.hAlign))switch(e.style.hAlign){case"Right":i.alignment=d.PdfTextAlignment.Right;break;case"Center":i.alignment=d.PdfTextAlignment.Center;break;case"Justify":i.alignment=d.PdfTextAlignment.Justify;break;default:i.alignment=d.PdfTextAlignment.Left}return t.isNullOrUndefined(e.style.vAlign)||(i=this.getVerticalAlignment(e.style.vAlign,i)),{format:i,size:new d.SizeF(r,n)}}return null},r.prototype.getPageSize=function(e){switch(e){case"Letter":return new d.SizeF(612,792);case"Note":return new d.SizeF(540,720);case"Legal":return new d.SizeF(612,1008);case"A0":return new d.SizeF(2380,3368);case"A1":return new d.SizeF(1684,2380);case"A2":return new d.SizeF(1190,1684);case"A3":return new d.SizeF(842,1190);case"A5":return new d.SizeF(421,595);case"A6":return new d.SizeF(297,421);case"A7":return new d.SizeF(210,297);case"A8":return new d.SizeF(148,210);case"A9":return new d.SizeF(105,148);case"B0":return new d.SizeF(2836,4008);case"B1":return new d.SizeF(2004,2836);case"B2":return new d.SizeF(1418,2004);case"B3":return new d.SizeF(1002,1418);case"B4":return new d.SizeF(709,1002);case"B5":return new d.SizeF(501,709);case"Archa":return new d.SizeF(648,864);case"Archb":return new d.SizeF(864,1296);case"Archc":return new d.SizeF(1296,1728);case"Archd":return new d.SizeF(1728,2592);case"Arche":return new d.SizeF(2592,3456);case"Flsa":return new d.SizeF(612,936);case"HalfLetter":return new d.SizeF(396,612);case"Letter11x17":return new d.SizeF(792,1224);case"Ledger":return new d.SizeF(1224,792);default:return new d.SizeF(595,842)}},r.prototype.getDashStyle=function(e){switch(e){case"Dash":return 1;case"Dot":return 2;case"DashDot":return 3;case"DashDotDot":return 4;default:return 0}},r.prototype.getPenFromContent=function(e){var i=new d.PdfPen(new d.PdfColor(0,0,0));if(!t.isNullOrUndefined(e.style)&&null!==e.style&&!t.isNullOrUndefined(e.style.penColor)){var r=this.hexToRgb(e.style.penColor);i=new d.PdfPen(new d.PdfColor(r.r,r.g,r.b))}return i},r.prototype.getBrushFromContent=function(e){var i=null;if(!t.isNullOrUndefined(e.style.textBrushColor)){var r=this.hexToRgb(e.style.textBrushColor);i=new d.PdfSolidBrush(new d.PdfColor(r.r,r.g,r.b))}return i},r.prototype.hexToRgb=function(e){if(null===e||""===e||7!==e.length)throw new Error("please set valid hex value for color...");e=e.substring(1);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:255&t}},r.prototype.getFontStyle=function(e){var i=d.PdfFontStyle.Regular;return!t.isNullOrUndefined(e)&&e.bold&&(i|=d.PdfFontStyle.Bold),!t.isNullOrUndefined(e)&&e.italic&&(i|=d.PdfFontStyle.Italic),!t.isNullOrUndefined(e)&&e.underline&&(i|=d.PdfFontStyle.Underline),!t.isNullOrUndefined(e)&&e.strikeout&&(i|=d.PdfFontStyle.Strikeout),i},r.prototype.getBorderStyle=function(e){var i=new d.PdfBorders;if(t.isNullOrUndefined(e))i.all=new d.PdfPen(new d.PdfColor(234,234,234));else{var r=e.width,n=t.isNullOrUndefined(r)||"number"!=typeof r?void 0:.75*r,o=new d.PdfColor(196,196,196);if(!t.isNullOrUndefined(e.color)){var s=this.hexToRgb(e.color);o=new d.PdfColor(s.r,s.g,s.b)}var l=new d.PdfPen(o,n);t.isNullOrUndefined(e.dashStyle)||(l.dashStyle=this.getDashStyle(e.dashStyle)),i.all=l}return i},r.prototype.destroy=function(){},r}(),qo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ho=function(e){function i(t,i){var r=e.call(this,t,i)||this;return r.buttonElement=r.parent.createElement("button",{}),r.unbounDiv=r.parent.createElement("div",{className:"e-unboundcelldiv",styles:"display: inline-block"}),r.element=r.parent.createElement("TD",{className:"e-rowcell e-unboundcell",attrs:{role:"gridcell",tabindex:"-1"}}),r}return qo(i,e),i.prototype.render=function(e,i,r,n){var o=this.element.cloneNode();if(o.appendChild(this.unbounDiv.cloneNode()),o.setAttribute("aria-label","is Command column column header "+e.column.headerText),e.column.commandsTemplate)if(this.parent.isReact&&"string"!=typeof e.column.commandsTemplate){var s=this.parent+"commandsTemplate";e.column.getColumnTemplate()(i,this.parent,"commandsTemplate",s,null,null,o.firstElementChild),this.parent.renderTemplates()}else q(o.firstElementChild,e.column.getColumnTemplate()(i));else for(var l=0,a=e.commands;l<a.length;l++){var h=a[l];o=this.renderButton(o,h,r.index,h.uid)}return this.setAttributes(o,e,r),!this.parent.enableVirtualization&&this.parent.isEdit||n?(t.addClass([].slice.call(o.getElementsByClassName("e-edit-delete")),"e-hide"),t.removeClass([].slice.call(o.getElementsByClassName("e-save-cancel")),"e-hide")):(t.addClass([].slice.call(o.getElementsByClassName("e-save-cancel")),"e-hide"),t.removeClass([].slice.call(o.getElementsByClassName("e-edit-delete")),"e-hide")),o},i.prototype.renderButton=function(e,i,r,o){var s=this.buttonElement.cloneNode();t.attributes(s,{id:this.parent.element.id+(i.type||"")+"_"+r+"_"+o,type:"button",title:t.isNullOrUndefined(i.title)?i.buttonOption.content||this.localizer.getConstant(i.type)||i.type:i.title,"data-uid":o}),s.onclick=i.buttonOption.click;var l=new n.Button(i.buttonOption,s);switch(l.commandType=i.type,e.firstElementChild.appendChild(l.element),i.type){case"Edit":case"Delete":t.addClass([s],["e-edit-delete","e-"+i.type.toLowerCase()+"button"]);break;case"Cancel":case"Save":t.addClass([s],["e-save-cancel","e-"+i.type.toLowerCase()+"button"])}return e},i}($i),Uo=function(){function i(e,t){this.parent=e,this.locator=t,this.initiateRender(),this.addEventListener()}return i.prototype.initiateRender=function(){this.locator.getService("cellRendererFactory").addCellRenderer(e.CellType.CommandColumn,new Ho(this.parent,this.locator))},i.prototype.commandClickHandler=function(e){var i=this.parent,r=t.closest(e.target,"button");if(r&&t.closest(e.target,".e-unboundcell")){for(var n,o=r.ej2_instances[0],s=o.commandType,l=r.getAttribute("data-uid"),a=i.getRowObjectFromUID(t.closest(r,"."+Oi).getAttribute("data-uid")),h=this.parent.columnModel,d=0;d<h.length;d++)if(h[d].commands)for(var c=h[d].commands,p=0;p<c.length;p++){c[p].uid===l&&c[p].type===s&&(n=c[p])}var u={cancel:!1,target:r,commandColumn:n,rowData:t.isNullOrUndefined(a)?void 0:a.data};this.parent.trigger("commandClick",u,function(e){if(!o.disabled&&i.editModule&&!e.cancel)switch(s){case"Edit":i.editModule.endEdit(),i.editModule.startEdit(t.closest(r,"tr"));break;case"Cancel":i.editModule.closeEdit();break;case"Save":i.editModule.endEdit();break;case"Delete":"Batch"!==i.editSettings.mode&&i.editModule.endEdit(),i.commandDelIndex=parseInt(t.closest(r,"tr").getAttribute(Hi),10),i.clearSelection(),i.selectRow(i.commandDelIndex,!1),i.editModule.deleteRecord(),i.commandDelIndex=void 0}})}},i.prototype.getModuleName=function(){return"commandColumn"},i.prototype.destroy=function(){this.parent.isDestroyed||this.removeEventListener()},i.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Gt,this.commandClickHandler),this.parent.off(Vt,this.keyPressHandler),this.parent.off(Ot,this.load))},i.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Gt,this.commandClickHandler,this),this.parent.on(Vt,this.keyPressHandler,this),this.parent.on(Ot,this.load,this))},i.prototype.keyPressHandler=function(e){"enter"===e.action&&t.closest(e.target,".e-unboundcelldiv")&&(this.commandClickHandler(e),e.preventDefault())},i.prototype.load=function(){for(var e=this.parent.columnModel,t=0;t<e.length;t++)if(e[t].commands)for(var i=e[t].commands,r=0;r<i.length;r++)i[r].uid=L("gridcommand")},i}(),jo={header:"."+Si,content:"."+Ri,edit:".e-inline-edit",batchEdit:".e-editedbatchcell",editIcon:"e-edit",pager:".e-gridpager",delete:"e-delete",save:"e-save",cancel:"e-cancel",copy:"e-copy",pdf:"e-pdfexport",group:"e-icon-group",ungroup:"e-icon-ungroup",csv:"e-csvexport",excel:"e-excelexport",fPage:"e-icon-first",nPage:"e-icon-next",lPage:"e-icon-last",pPage:"e-icon-prev",ascending:"e-icon-ascending",descending:"e-icon-descending",groupHeader:"e-groupdroparea",touchPop:"e-gridpopup"},Vo=function(){function e(e,t){this.defaultItems={},this.disableItems=[],this.hiddenItems=[],this.localeText=this.setLocaleKey(),this.parent=e,this.gridID=e.element.id,this.serviceLocator=t,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Bt,this.enableAfterRenderMenu,this),this.parent.on(Mt,this.render,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Mt,this.render),this.parent.off(Bt,this.enableAfterRenderMenu),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler.bind(this)))},e.prototype.keyDownHandler=function(e){"Tab"!==e.code&&9!==e.which||this.contextMenu.close(),"Escape"===e.code&&(this.contextMenu.close(),this.parent.notify("restore-Focus",{}))},e.prototype.render=function(){this.parent.element.classList.add("e-noselect"),this.l10n=this.serviceLocator.getService("localization"),this.element=this.parent.createElement("ul",{id:this.gridID+"_cmenu"}),t.EventHandler.add(this.element,"keydown",this.keyDownHandler.bind(this)),this.parent.element.appendChild(this.element);var e="#"+this.gridID;this.contextMenu=new a.ContextMenu({items:this.getMenuItems(),enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,locale:this.parent.locale,target:e,select:this.contextMenuItemClick.bind(this),beforeOpen:this.contextMenuBeforeOpen.bind(this),onOpen:this.contextMenuOpen.bind(this),onClose:this.contextMenuOnClose.bind(this),cssClass:"e-grid-menu"}),this.contextMenu.appendTo(this.element)},e.prototype.enableAfterRenderMenu=function(e){e.module===this.getModuleName()&&e.enable&&(this.contextMenu&&(this.contextMenu.destroy(),t.remove(this.element),this.parent.element.classList.remove("e-noselect")),this.render())},e.prototype.getMenuItems=function(){for(var e=[],t=[],i=0,r=this.parent.contextMenuItems;i<r.length;i++){var n=r[i];"string"==typeof n&&-1!==this.getDefaultItems().indexOf(n)?-1!==n.toLocaleLowerCase().indexOf("export")?t.push(this.buildDefaultItems(n)):e.push(this.buildDefaultItems(n)):"string"!=typeof n&&e.push(n)}if(t.length>0){var o=this.buildDefaultItems("export");o.items=t,e.push(o)}return e},e.prototype.getLastPage=function(){var e=Math.floor(this.parent.pageSettings.totalRecordsCount/this.parent.pageSettings.pageSize);return this.parent.pageSettings.totalRecordsCount%this.parent.pageSettings.pageSize&&(e+=1),e},e.prototype.contextMenuOpen=function(){this.isOpen=!0},e.prototype.contextMenuItemClick=function(e){switch(this.getKeyFromId(e.item.id)){case"AutoFitAll":this.parent.autoFitColumns([]);break;case"AutoFit":this.parent.autoFitColumns(this.targetColumn.field);break;case"Group":this.parent.groupColumn(this.targetColumn.field);break;case"Ungroup":this.parent.ungroupColumn(this.targetColumn.field);break;case"Edit":this.parent.editModule&&("Batch"===this.parent.editSettings.mode?this.row&&this.cell&&!isNaN(parseInt(this.cell.getAttribute(qi),10))&&this.parent.editModule.editCell(parseInt(this.row.getAttribute(Hi),10),this.parent.getColumns()[parseInt(this.cell.getAttribute(qi),10)].field):(this.parent.editModule.endEdit(),this.parent.editModule.startEdit(this.row)));break;case"Delete":this.parent.editModule&&("Batch"!==this.parent.editSettings.mode&&this.parent.editModule.endEdit(),1===this.parent.getSelectedRecords().length?this.parent.editModule.deleteRow(this.row):this.parent.deleteRecord());break;case"Save":this.parent.editModule&&this.parent.editModule.endEdit();break;case"Cancel":this.parent.editModule&&this.parent.editModule.closeEdit();break;case"Copy":this.parent.copy();break;case"PdfExport":this.parent.pdfExport();break;case"ExcelExport":this.parent.excelExport();break;case"CsvExport":this.parent.csvExport();break;case"SortAscending":this.isOpen=!1,this.parent.sortColumn(this.targetColumn.field,"Ascending");break;case"SortDescending":this.isOpen=!1,this.parent.sortColumn(this.targetColumn.field,"Descending");break;case"FirstPage":this.parent.goToPage(1);break;case"PrevPage":this.parent.goToPage(this.parent.pageSettings.currentPage-1);break;case"LastPage":this.parent.goToPage(this.getLastPage());break;case"NextPage":this.parent.goToPage(this.parent.pageSettings.currentPage+1)}e.column=this.targetColumn,e.rowInfo=this.targetRowdata,this.parent.trigger("contextMenuClick",e)},e.prototype.contextMenuOnClose=function(e){e.items.length>0&&e.items[0].parentObj instanceof a.ContextMenu&&this.updateItemStatus(),this.parent.notify("select-row-on-context-open",{isOpen:!1})},e.prototype.getLocaleText=function(e){return this.l10n.getConstant(this.localeText[e])},e.prototype.updateItemStatus=function(){this.contextMenu.showItems(this.hiddenItems),this.contextMenu.enableItems(this.disableItems),this.hiddenItems=[],this.disableItems=[],this.isOpen=!1},e.prototype.contextMenuBeforeOpen=function(e){var i=t.closest(e.event.target,".e-grid");if(e.event&&i&&i!==this.parent.element)e.cancel=!0;else if(e.event&&(t.closest(e.event.target,"."+jo.groupHeader)||t.closest(e.event.target,"."+jo.touchPop)||t.closest(e.event.target,".e-summarycell")||t.closest(e.event.target,".e-groupcaption")||t.closest(e.event.target,".e-filterbarcell")))e.cancel=!0;else{this.targetColumn=this.getColumn(e.event),this.targetRowdata=this.parent.getRowInfo(e.event.target),t.isNullOrUndefined(e.parentItem)&&this.targetColumn&&this.targetRowdata.cell&&(this.parent.notify("select-row-on-context-open",{isOpen:!0}),this.selectRow(e.event,!this.targetRowdata.cell.classList.contains("e-selectionbackground")||"Multiple"!==this.parent.selectionSettings.type));for(var r=[],n=[],o=0,s=e.items;o<s.length;o++){var l=s[o],a=this.getKeyFromId(l.id),h=this.defaultItems[a];if(-1!==this.getDefaultItems().indexOf(a))if(this.ensureDisabledStatus(a)&&this.disableItems.push(l.text),e.event&&(this.ensureTarget(e.event.target,jo.edit)||this.ensureTarget(e.event.target,jo.batchEdit)))"Save"!==a&&"Cancel"!==a&&this.hiddenItems.push(l.text);else{if(this.parent.editModule&&"Batch"===this.parent.editSettings.mode&&(t.closest(e.event.target,".e-gridform")||this.parent.editModule.getBatchChanges().changedRecords.length||this.parent.editModule.getBatchChanges().addedRecords.length||this.parent.editModule.getBatchChanges().deletedRecords.length)&&("Save"===a||"Cancel"===a))continue;t.isNullOrUndefined(e.parentItem)&&e.event&&!this.ensureTarget(e.event.target,h.target)&&this.hiddenItems.push(l.text)}else l.target&&e.event&&!this.ensureTarget(e.event.target,l.target)?l.separator?r.push(l.id):this.hiddenItems.push(l.text):this.ensureTarget(e.event.target,l.target)&&l.separator&&n.push(l.id)}n.length>0&&this.contextMenu.showItems(n,!0),this.contextMenu.enableItems(this.disableItems,!1),this.contextMenu.hideItems(this.hiddenItems),r.length>0&&this.contextMenu.hideItems(r,!0),this.eventArgs=e.event,e.column=this.targetColumn,e.rowInfo=this.targetRowdata,this.parent.trigger("contextMenuOpen",e),(e.cancel||this.hiddenItems.length===e.items.length&&!e.parentItem)&&(this.updateItemStatus(),e.cancel=!0)}Se(this.parent.element,this.contextMenu.element.parentElement)},e.prototype.ensureTarget=function(e,i){var r=e;return(r=!this.ensureFrozenHeader(e)||i!==jo.header&&i!==jo.content?i===jo.content||i===jo.header?O(t.closest(e,"."+Mi),i.substr(1,i.length)):t.closest(e,i):t.closest(e,i===jo.header?"thead":Ui))&&O(r,"e-grid")===this.parent.element},e.prototype.ensureFrozenHeader=function(e){return!(!this.parent.isFrozenGrid()&&!this.parent.frozenRows||!t.closest(e,jo.header))},e.prototype.ensureDisabledStatus=function(e){var t=!1;switch(e){case"AutoFitAll":case"AutoFit":t=!(this.parent.ensureModuleInjected(Kn)&&!this.parent.isEdit)||this.targetColumn&&!this.targetColumn.field&&"AutoFit"===e;break;case"Group":(!this.parent.allowGrouping||this.parent.ensureModuleInjected(Jn)&&this.targetColumn&&this.parent.groupSettings.columns.indexOf(this.targetColumn.field)>=0||this.targetColumn&&!this.targetColumn.field)&&(t=!0);break;case"Ungroup":(!this.parent.allowGrouping||!this.parent.ensureModuleInjected(Jn)||this.parent.ensureModuleInjected(Jn)&&this.targetColumn&&this.parent.groupSettings.columns.indexOf(this.targetColumn.field)<0)&&(t=!0);break;case"Edit":case"Delete":case"Save":case"Cancel":this.parent.editModule&&0!==this.parent.getDataRows().length||(t=!0);break;case"Copy":0!==this.parent.getSelectedRowIndexes().length&&0!==this.parent.getCurrentViewRecords().length||(t=!0);break;case"export":this.parent.allowExcelExport&&this.parent.excelExport&&(this.parent.ensureModuleInjected(Lo)||this.parent.ensureModuleInjected(No))||(t=!0);break;case"PdfExport":this.parent.allowPdfExport&&this.parent.ensureModuleInjected(Lo)||(t=!0);break;case"ExcelExport":case"CsvExport":this.parent.allowExcelExport&&this.parent.ensureModuleInjected(No)||(t=!0);break;case"SortAscending":case"SortDescending":if(!this.parent.allowSorting||!this.parent.ensureModuleInjected(xn)||this.targetColumn&&!this.targetColumn.field)t=!0;else if(this.parent.ensureModuleInjected(xn)&&this.parent.sortSettings.columns.length>0&&this.targetColumn)for(var i=this.parent.sortSettings.columns,r=0;r<i.length;r++)i[r].field===this.targetColumn.field&&i[r].direction.toLowerCase()===e.toLowerCase().replace("sort","").toLocaleLowerCase()&&(t=!0);break;case"FirstPage":case"PrevPage":(!this.parent.allowPaging||!this.parent.ensureModuleInjected(On)||0===this.parent.getCurrentViewRecords().length||this.parent.ensureModuleInjected(On)&&1===this.parent.pageSettings.currentPage)&&(t=!0);break;case"LastPage":case"NextPage":(!this.parent.allowPaging||!this.parent.ensureModuleInjected(On)||0===this.parent.getCurrentViewRecords().length||this.parent.ensureModuleInjected(On)&&this.parent.pageSettings.currentPage===this.getLastPage())&&(t=!0)}return t},e.prototype.getContextMenu=function(){return this.element},e.prototype.destroy=function(){var e=this.parent.element;e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.contextMenu.destroy(),t.remove(this.element),this.removeEventListener(),this.parent.element.classList.remove("e-noselect"))},e.prototype.getModuleName=function(){return"contextMenu"},e.prototype.generateID=function(e){return this.gridID+"_cmenu_"+e},e.prototype.getKeyFromId=function(e){return e.replace(this.gridID+"_cmenu_","")},e.prototype.buildDefaultItems=function(e){var t;switch(e){case"AutoFitAll":case"AutoFit":t={target:jo.header};break;case"Group":t={target:jo.header,iconCss:jo.group};break;case"Ungroup":t={target:jo.header,iconCss:jo.ungroup};break;case"Edit":t={target:jo.content,iconCss:jo.editIcon};break;case"Delete":t={target:jo.content,iconCss:jo.delete};break;case"Save":t={target:jo.edit,iconCss:jo.save};break;case"Cancel":t={target:jo.edit,iconCss:jo.cancel};break;case"Copy":t={target:jo.content,iconCss:jo.copy};break;case"export":t={target:jo.content};break;case"PdfExport":t={target:jo.content,iconCss:jo.pdf};break;case"ExcelExport":t={target:jo.content,iconCss:jo.excel};break;case"CsvExport":t={target:jo.content,iconCss:jo.csv};break;case"SortAscending":t={target:jo.header,iconCss:jo.ascending};break;case"SortDescending":t={target:jo.header,iconCss:jo.descending};break;case"FirstPage":t={target:jo.pager,iconCss:jo.fPage};break;case"PrevPage":t={target:jo.pager,iconCss:jo.pPage};break;case"LastPage":t={target:jo.pager,iconCss:jo.lPage};break;case"NextPage":t={target:jo.pager,iconCss:jo.nPage}}return this.defaultItems[e]={text:this.getLocaleText(e),id:this.generateID(e),target:t.target,iconCss:t.iconCss?"e-icons "+t.iconCss:""},this.defaultItems[e]},e.prototype.getDefaultItems=function(){return["AutoFitAll","AutoFit","Group","Ungroup","Edit","Delete","Save","Cancel","Copy","export","PdfExport","ExcelExport","CsvExport","SortAscending","SortDescending","FirstPage","PrevPage","LastPage","NextPage"]},e.prototype.setLocaleKey=function(){return{AutoFitAll:"autoFitAll",AutoFit:"autoFit",Copy:"Copy",Group:"Group",Ungroup:"Ungroup",Edit:"EditRecord",Delete:"DeleteRecord",Save:"Save",Cancel:"CancelButton",PdfExport:"Pdfexport",ExcelExport:"Excelexport",CsvExport:"Csvexport",export:"Export",SortAscending:"SortAscending",SortDescending:"SortDescending",FirstPage:"FirstPage",LastPage:"LastPage",PrevPage:"PreviousPage",NextPage:"NextPage"}},e.prototype.getColumn=function(e){var i=t.closest(e.target,"th.e-headercell");if(i){var r=i.querySelector(".e-headercelldiv, .e-stackedheadercelldiv").getAttribute("e-mappinguid");return this.parent.getColumnByUid(r)}return this.parent.getRowInfo(e.target).column||null},e.prototype.selectRow=function(e,i){this.cell=e.target,this.row=t.closest(e.target,"tr.e-row")||this.row,this.row&&i&&!O(e.target,"e-gridpager")&&this.parent.selectRow(parseInt(this.row.getAttribute(Hi),10))},e}(),Go=function(){function e(e){this.parent=e,this.rowModelGenerator=new Gi(this.parent)}return e.prototype.generateRows=function(e,t,i){var r;if(r=t.renderFrozenRightContent||t.renderMovableContent&&!this.parent.enableVirtualization?"frozen-right":t.renderMovableContent||t.isFrozen?"movable":this.parent.getFrozenLeftCount()?"frozen-left":"frozen-right","virtualscroll"===t.requestType&&"X"===t.virtualInfo.sentinelInfo.axis&&"movable"!==r)return null;for(var n=this.parent.enableVirtualization&&!t.isFrozenRowsRender?i:this.rowModelGenerator.generateRows(e,t),o=0,s=n.length;o<s;o++)n[o].cells=Ae(this.parent,n[o].cells,r);return n},e}(),_o=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wo=function(e){function i(t,i){var r=e.call(this,t,i)||this;return r.isInitialRender=!0,r.widthService=i.getService("widthService"),r.addEventListener(),r}return _o(i,e),i.prototype.addEventListener=function(){this.parent.addEventListener(St,this.actionComplete.bind(this)),this.parent.addEventListener("batchAdd",this.batchAdd.bind(this)),this.parent.on("batchCancel",this.batchAdd.bind(this)),this.parent.addEventListener("batchDelete",this.batchAdd.bind(this)),this.parent.on("set-height-to-frozen-element",this.refreshScrollOffset),this.parent.on(Wt,this.widthService.refreshFrozenScrollbar,this)},i.prototype.batchAdd=function(e){var t="batchCancel"!==e.name&&!(this.parent.frozenRows&&"Top"===this.parent.editSettings.newRowPosition);if("auto"!==this.parent.height&&(t||"batchCancel"===e.name||"batchDelete"===e.name)){this.refreshScrollOffset();var i=this.getTable().offsetHeight;"add"===e.name&&"Bottom"===this.parent.editSettings.newRowPosition&&this.parent.getContent().firstChild.scroll(0,i)}},i.prototype.setHeightToContent=function(e){this.getFrozenContent().style.height=e.toString()+"px",this.getMovableContent().style.height=e.toString()+"px"},i.prototype.actionComplete=function(e){if("Dialog"!==this.parent.editSettings.mode&&("add"===e.requestType||"cancel"===e.requestType&&e.row.classList.contains(Bi))&&(!this.parent.frozenRows||"Bottom"===this.parent.editSettings.newRowPosition)&&"auto"!==this.parent.height){this.refreshScrollOffset();var t=this.getTable().offsetHeight;"add"===e.requestType&&"Bottom"===this.parent.editSettings.newRowPosition&&this.parent.getContent().firstChild.scroll(0,t)}},i.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.removeEventListener(St,this.actionComplete),this.parent.removeEventListener("batchAdd",this.batchAdd),this.parent.off(Wt,this.widthService.refreshFrozenScrollbar))},i.prototype.renderPanel=function(){e.prototype.renderPanel.call(this);var i=this.parent.element.querySelector("."+Ti),r=this.parent.element.querySelector("."+Ei);t.isNullOrUndefined(i)&&(i=this.parent.createElement("div",{className:"e-frozencontent e-frozen-left-content"}),r=this.parent.createElement("div",{className:Ei}),this.getPanel().querySelector("."+Di).appendChild(i),this.getPanel().querySelector("."+Di).appendChild(r),r.style.scrollbarWidth="none"),this.setFrozenContent(i),this.setMovableContent(r),t.Browser.userAgent.indexOf("Mac OS")>-1&&"safari"===t.Browser.info.name&&!this.parent.enableVirtualization&&this.getPanel().firstElementChild.classList.add("e-mac-safari")},i.prototype.renderFrozenRigthPanel=function(){e.prototype.renderPanel.call(this)},i.prototype.renderEmpty=function(i){e.prototype.renderEmpty.call(this,i),this.getMovableContent().querySelector(Ui).innerHTML="<tr><td></td></tr>",t.addClass([this.getMovableContent().querySelector(Ui).querySelector("tr")],["e-emptyrow"]),this.getFrozenContent().querySelector(".e-emptyrow").querySelector("td").colSpan=this.parent.getVisibleFrozenColumns(),this.getFrozenContent().style.borderRightWidth="0px",this.parent.frozenRows&&(this.parent.getHeaderContent().querySelector("."+zi).querySelector(Ui).innerHTML="",this.parent.getHeaderContent().querySelector("."+Ii).querySelector(Ui).innerHTML="")},i.prototype.renderFrozenRightEmpty=function(t){e.prototype.renderEmpty.call(this,t)},i.prototype.setFrozenContent=function(e){this.frozenContent=e},i.prototype.setMovableContent=function(e){this.movableContent=e},i.prototype.getFrozenContent=function(){return this.frozenContent},i.prototype.getMovableContent=function(){return this.movableContent},i.prototype.getModelGenerator=function(){return new Go(this.parent)},i.prototype.renderFrozenRightTable=function(){e.prototype.renderTable.call(this)},i.prototype.renderTable=function(){var i;null==this.getFrozenContent().querySelector("."+Mi)?(e.prototype.renderTable.call(this),this.getFrozenContent().appendChild(this.getTable()),i=this.getTable().cloneNode(!0),this.getMovableContent().appendChild(i)):(this.setTable(this.getFrozenContent().querySelector("."+Mi)),this.setColGroup(this.parent.element.querySelector("."+Si).querySelector(ji).cloneNode(!0)),this.getFrozenContent().querySelector("."+Mi).appendChild(this.getColGroup()),i=this.getMovableContent().querySelector("."+Mi),this.parent.frozenRows&&this.parent.getHeaderContent().classList.add("e-frozenhdrcont")),this.getMovableContent().querySelector(ji)&&t.remove(this.getMovableContent().querySelector(ji));var r=this.parent.getHeaderContent().querySelector("."+Ii).querySelector(ji).cloneNode(!0);i.insertBefore(r,i.querySelector(Ui));var n=this.parent.enableVirtualization?"":"flex";this.getPanel().firstChild.style.display=n,this.renderHorizontalScrollbar("e-frozenscrollbar e-frozen-left-scrollbar",this.getScrollbarDisplay())},i.prototype.getScrollbarDisplay=function(){var e="";return(this.parent.getFrozenColumns()&&!this.parent.getVisibleFrozenColumns()||this.parent.getFrozenLeftColumnsCount()&&!this.parent.getVisibleFrozenLeftCount())&&(e="none"),e},i.prototype.renderHorizontalScrollbar=function(e,t,i){var r=this.parent.createElement("div",{className:e,styles:"display:"+t}),n=this.parent.createElement("div",{className:"e-movablescrollbar"}),o=this.parent.createElement("div",{className:"e-movablechild"}),s=j().toString();this.setScrollbarHeight(n,s),this.setScrollbarHeight(o,s),n.appendChild(o),this.appendScrollbar(r,n,i)},i.prototype.appendScrollbar=function(e,t,i){var r=this.parent.createElement("div",{className:"e-scrollbar",styles:"display: flex"});r.appendChild(e),r.appendChild(t),this.parent.getContent().appendChild(r)},i.prototype.setScrollbarHeight=function(e,t){e.style.minHeight=t+"px",e.style.maxHeight=t+"px"},i.prototype.setIsFrozen=function(e,t){e.isFrozen=!e.isFrozen},i.prototype.setTbody=function(e,i){var r;t.isNullOrUndefined(e[0].cells[0])&&(this.getMovableContent().querySelector(Ui).innerHTML="");var n=e[0].cells[0],o=n.index;return t.isUndefined(o)&&this.parent.isRowDragable()&&(o=(n=e[0].cells[1]).index),0===o&&(this.getPanel().firstChild.style.overflowX="hidden",this.parent.enableColumnVirtualization&&(this.getMovableContent().style.overflowX="hidden")),this.parent.enableColumnVirtualization&&i.renderMovableContent&&"virtualscroll"===i.requestType&&this.getMovableContent().scrollLeft>0&&0!==i.virtualInfo.columnIndexes[0]&&(o=this.parent.getFrozenColumns()),n&&n.column&&(r=n.column.getFreezeTableName()),this.setIdx(o),i.tableName=r,r},i.prototype.splitRows=function(e){e===Li?(this.freezeRows=this.rows,this.freezeRowElements=this.rowElements):this.movableRows=this.rows},i.prototype.renderNextFrozentPart=function(e,i){var r=this.parent.enableVirtualization;i===Li&&(r&&(e.renderMovableContent=!0),this.refreshContentRows(t.extend({},e)))},i.prototype.appendContent=function(e,i,r,n){this.parent.isReact&&!t.isNullOrUndefined(this.parent.rowTemplate)?e=i:e.appendChild(i),n===Li?(this.isLoaded=!1,this.getFrozenContent().querySelector("table").appendChild(e)):(this.refreshTbody(e),this.isLoaded=!0,this.getMovableContent().querySelector("table").appendChild(e),this.refreshHeight(),this.refreshScrollOffset(),this.widthService.refreshFrozenScrollbar()),this.isInitialRender&&(this.parent.scrollModule.setHeight(),this.isInitialRender=!1)},i.prototype.refreshScrollOffset=function(){if("auto"!==this.parent.height){var e=this.getTable().offsetHeight+1;this.setHeightToContent(e)}this.parent.notify("refresh-frozen-height",{})},i.prototype.getFrozenHeader=function(e){return e===Li?this.parent.getHeaderContent().querySelector("."+zi).querySelector(Ui):this.parent.getHeaderContent().querySelector("."+Ii).querySelector(Ui)},i.prototype.refreshTbody=function(e){e.childElementCount<1&&e.appendChild(this.parent.createElement("tr").appendChild(this.parent.createElement("td")))},i.prototype.refreshHeight=function(){this.parent.allowTextWrap||this.parent.notify(oi,{case:"refreshHeight"}),this.getFrozenContent().style.borderRightWidth="1px"},i.prototype.setIdx=function(e){this.idx=e},i.prototype.getIdx=function(){return this.idx},i.prototype.getTbody=function(e){return e===Li?this.getTable().querySelector(Ui):this.getMovableContent().querySelector(Ui)},i}(Yi),Ko=function(e){function i(t,i){var r=e.call(this,t,i)||this;return r.addEventListener(),r}return _o(i,e),i.prototype.addEventListener=function(){this.eventHandler=[{event:oi,handler:this.refreshFreeze},{event:"frozenHeight",handler:this.setFrozenHeight},{event:Bt,handler:this.enableAfterRender}],Xe(this.parent,this.eventHandler,!0,this)},i.prototype.removeEventListener=function(){this.parent.isDestroyed||Xe(this.parent,this.eventHandler,!1)},i.prototype.renderTable=function(){e.prototype.renderTable.call(this),this.rfshMovable(),this.updateColgroup(),this.initializeHeaderDrag(),this.initializeHeaderDrop(),this.parent.notify(Ht,{rows:this.rows,args:{isFrozen:!1}})},i.prototype.renderPanel=function(){var i=this.parent.element.querySelector("."+zi),r=this.parent.element.querySelector("."+Ii);e.prototype.renderPanel.call(this),t.isNullOrUndefined(i)&&(i=this.parent.createElement("div",{className:"e-frozenheader e-frozen-left-header"}),r=this.parent.createElement("div",{className:Ii}),this.getPanel().querySelector("."+Fi).appendChild(i),this.getPanel().querySelector("."+Fi).appendChild(r)),this.setFrozenHeader(i),this.setMovableHeader(r)},i.prototype.renderFrozenRightPanel=function(){e.prototype.renderPanel.call(this)},i.prototype.renderFrozenRightTable=function(){e.prototype.renderTable.call(this)},i.prototype.refreshUI=function(){var i=this.getMovableHeader().querySelector(Ui);t.remove(this.getMovableHeader().querySelector("table")),e.prototype.refreshUI.call(this),this.rfshMovable(),this.getMovableHeader().querySelector(Ui).innerHTML=i.innerHTML,this.updateColgroup(),this.widthService.setWidthToColumns(),this.parent.enableVirtualization||this.widthService.setWidthToTable(),this.parent.allowTextWrap&&"Header"===this.parent.textWrapSettings.wrapMode&&J([].slice.call(this.movableHeader.querySelectorAll("tr.e-columnheader")),!0),this.parent.updateDefaultCursor(),de(this.parent.getContentTable().querySelector(ji),this.parent.getFrozenColumns(),this.parent),this.widthService.refreshFrozenScrollbar(),this.initializeHeaderDrag(),this.parent.notify(Ht,{rows:this.rows,args:{isFrozen:!1}})},i.prototype.refreshFrozenLeftUI=function(){e.prototype.refreshUI.call(this)},i.prototype.rfshMovable=function(){this.getFrozenHeader().appendChild(this.getTable()),this.getMovableHeader().appendChild(this.createHeader(void 0,"movable")),this.refreshStackedHdrHgt(),this.addMovableFirstCls()},i.prototype.addMovableFirstCls=function(){if(this.parent.getVisibleFrozenColumns())for(var e=[].slice.call(this.parent.element.querySelector("."+Ii).querySelector("thead").getElementsByClassName("e-columnheader")),i=e.length,r=0;r<i;r++){var n=e[r].cells[0];n&&(t.addClass([n],["e-movablefirst"]),e[r].cells[0].rowSpan>1&&(r+=e[r].cells[0].rowSpan-1))}},i.prototype.refreshFreeze=function(e){if("filter"===e.case){var t=this.getTable().querySelector(".e-filterbar");if(this.parent.allowFiltering&&t&&this.getMovableHeader().querySelector("thead")){this.getMovableHeader().querySelector("thead").appendChild(this.filterRenderer(t,this.parent.getFrozenColumns()));for(var i=0,r=[].slice.call(this.getMovableHeader().querySelectorAll("thead .e-filterbarcell .e-input"));i<r.length;i++){var n={element:r[i],floatLabelType:"Never",properties:{enableRtl:this.parent.enableRtl,showClearButton:!0}};o.Input.bindInitialEvent(n)}}}else"textwrap"!==e.case&&"refreshHeight"!==e.case||(this.refreshHeight(e),this.parent.contentModule.refreshScrollOffset())},i.prototype.refreshHeight=function(e){var t,i,r=this.getFrozenHeader(),n=this.getMovableHeader(),o=this.parent.getContent(),s=this.parent.textWrapSettings.wrapMode,l=this.parent.getHeaderContent().querySelector("."+Fi).classList;"textwrap"===e.case?(("Header"!==s||e.isModeChg)&&(t=o.querySelector("."+Ti).querySelectorAll("tr"),i=o.querySelector("."+Ei).querySelectorAll("tr"),this.setWrapHeight(t,i,e.isModeChg,!0)),"Content"===s&&this.parent.allowTextWrap?l.add("e-wrap"):l.remove("e-wrap"),"Both"===s||e.isModeChg?(t=r.querySelectorAll("tr"),i=n.querySelectorAll("tr")):(i=n.querySelector("Content"===s?Ui:"thead").querySelectorAll("tr"),t=r.querySelector("Content"===s?Ui:"thead").querySelectorAll("tr")),this.parent.getHeaderContent().getElementsByClassName("e-stackedheadercell").length||this.setWrapHeight(t,i,e.isModeChg,!1,this.colDepth>1),this.refreshStackedHdrHgt()):"refreshHeight"===e.case&&(this.setWrapHeight(o.querySelector("."+Ti).querySelectorAll("tr"),o.querySelector("."+Ei).querySelectorAll("tr"),e.isModeChg),this.parent.getHeaderContent().getElementsByClassName("e-stackedheadercell").length||this.setWrapHeight(r.querySelectorAll("tr"),n.querySelectorAll("tr"),e.isModeChg))},i.prototype.enableAfterRender=function(e){"scroll"===e.module&&this.setFrozenHeight()},i.prototype.updateResizeHandler=function(){for(var e=[].slice.call(this.parent.getHeaderContent().getElementsByClassName("e-rhandler")),t=0;t<e.length;t++)e[t].style.height=e[t].parentElement.offsetHeight+"px"},i.prototype.setWrapHeight=function(e,i,r,n,o){for(var s,l,a=this.parent.allowTextWrap,h=this.parent.textWrapSettings.wrapMode,d=this.parent.getHeaderContent().querySelector("thead"),c=this.parent.getHeaderContent().querySelector(Ui),p=[],u=[],g=0,f=e.length;g<f;g++)t.isNullOrUndefined(e[g])||t.isNullOrUndefined(i[g])||(p[g]=e[g].getBoundingClientRect().height,u[g]=i[g].getBoundingClientRect().height);for(var g=0,f=e.length;g<f;g++)(r&&("Header"===h&&n||"Content"===h&&d.contains(e[g])||"Header"===h&&c.contains(e[g]))||o)&&(e[g].style.height=null,i[g].style.height=null),s=p[g],l=u[g],!t.isNullOrUndefined(e[g])&&e[g].childElementCount&&(a&&s<l||!a&&s<l||this.parent.allowResizing&&this.parent.resizeModule&&!1===this.parent.resizeModule.isFrozenColResized)&&(e[g].style.height=l+"px"),i&&!t.isNullOrUndefined(i[g])&&i[g].childElementCount&&(a&&s>l||!a&&s>l||this.parent.allowResizing&&this.parent.resizeModule&&!0===this.parent.resizeModule.isFrozenColResized)&&(i[g].style.height=s+"px");a&&"auto"!==this.parent.height&&this.setFrozenHeight()},i.prototype.setFrozenHeight=function(e){void 0===e&&(e=j());var t=this.parent.element.querySelector("."+Ei).getBoundingClientRect().height,i=this.parent.element.querySelector("."+Ei),r=this.parent.element.querySelector("."+Ti),n=this.parent.getContent().scrollWidth,o=this.parent.element.querySelector(".e-movablecontent table").scrollWidth+this.parent.getContentTable().scrollWidth;i.scrollWidth-i.clientWidth?(r.style.height=t-e+"px",r.style.borderBottom=""):(r.style.height=t+"px",(r.scrollHeight<=r.clientHeight||i.scrollHeight<=i.clientHeight)&&n===o&&this.parent.scrollModule.removePadding(),r.style.borderBottom="0px")},i.prototype.refreshStackedHdrHgt=function(){for(var e,t,i=[].slice.call(this.getFrozenHeader().getElementsByClassName("e-columnheader")),r=[].slice.call(this.getMovableHeader().getElementsByClassName("e-columnheader")),n=0,o=i.length;n<o;n++)e=this.getRowSpan(i[n]),t=this.getRowSpan(r[n]),e.min>1?this.updateStackedHdrRowHgt(n,e.max,i[n],r):t.min>1&&this.updateStackedHdrRowHgt(n,t.max,r[n],i);this.parent.allowResizing&&this.updateResizeHandler()},i.prototype.getRowSpan=function(e){for(var t,i,r,n=0,o=e.childElementCount;n<o;n++)0===n&&(i=e.children[0].rowSpan),t=e.children[n].rowSpan,i=Math.min(t,i),r=Math.max(t,i);return{min:i,max:r}},i.prototype.updateStackedHdrRowHgt=function(e,t,i,r){for(var n=0,o=0;o<t;o++)n+=r[e+o].style.height?parseInt(r[e+o].style.height,10):r[e+o].offsetHeight;i.style.height=n+"px"},i.prototype.setFrozenHeader=function(e){this.frozenHeader=e},i.prototype.setMovableHeader=function(e){this.movableHeader=e},i.prototype.getFrozenHeader=function(){return this.frozenHeader},i.prototype.getMovableHeader=function(){return this.movableHeader},i.prototype.updateColgroup=function(){var e=this.getMovableHeader().querySelector("table");t.remove(this.getMovableHeader().querySelector(ji)),e.insertBefore(de(this.getFrozenHeader().querySelector(ji),this.parent.getFrozenColumns(),this.parent),e.querySelector("thead"))},i.prototype.filterRenderer=function(e,t,i){var r=e.cloneNode(!0);r.innerHTML="";for(var n=i||this.parent.getColumns().length,o=t;o<n;o++)r.appendChild(e.removeChild(e.children[t]));return r},i}(Zi),Qo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Xo=function(e){function i(t,i){var r=e.call(this,t,i)||this;return r.addEventListener(),r}return Qo(i,e),i.prototype.addEventListener=function(){this.evtHandlers=[{event:oi,handler:this.refreshFreeze},{event:"refresh-frozen-columns",handler:this.refreshFrozenColumns},{event:"set-reorder-destination-element",handler:this.setReorderElement},{event:Wt,handler:this.setVisible}],Xe(this.parent,this.evtHandlers,!0,this)},i.prototype.removeEventListener=function(){this.parent.isDestroyed||Xe(this.parent,this.evtHandlers,!1)},i.prototype.setReorderElement=function(e){this.destEle=e.ele},i.prototype.refreshFrozenColumns=function(e){e.parent||this.parent.setProperties({columns:e.columns},!0);var t=O(this.destEle,"e-frozen-left-header"),i=O(this.destEle,"e-frozen-right-header"),r=this.parent.getFrozenLeftColumnsCount(),n=this.parent.getFrozenRightColumnsCount();e.column.freeze=null,t?e.column.freeze="Left":i&&(e.column.freeze="Right"),this.parent.setFrozenCount(),e.cancel=r!==this.parent.getFrozenLeftColumnsCount()||n!==this.parent.getFrozenRightColumnsCount(),e.cancel&&this.parent.refreshColumns()},i.prototype.setWrapHeight=function(e,i,r,n,o,s){for(var l,a,h,d=this.parent.allowTextWrap,c=this.parent.getHeaderContent().querySelector(Ui),p=this.parent.textWrapSettings.wrapMode,u=this.parent.getHeaderContent().querySelector("thead"),g=[],f=[],m=[],y=0,v=e.length;y<v;y++)t.isNullOrUndefined(e[y])||t.isNullOrUndefined(i[y])||(s&&(m[y]=s[y].getBoundingClientRect().height),f[y]=i[y].getBoundingClientRect().height,g[y]=e[y].getBoundingClientRect().height);for(var y=0,v=e.length;y<v;y++){(r&&("Content"===p&&u.contains(e[y])||"Header"===p&&c.contains(e[y])||"Header"===p&&n)||o)&&(s[y]&&(s[y].style.height=null),e[y].style.height=null,i[y].style.height=null),l=g[y],a=f[y],h=m[y]?m[y]:0;var C=Math.max(l,a,h);!t.isNullOrUndefined(e[y])&&e[y].childElementCount&&(d&&l<C||!d&&l<C||this.parent.allowResizing&&this.parent.resizeModule&&!1===this.parent.resizeModule.isFrozenColResized)&&(e[y].style.height=C+"px"),i&&!t.isNullOrUndefined(i[y])&&i[y].childElementCount&&(d&&C>a||!d&&C>a||this.parent.allowResizing&&this.parent.resizeModule&&!0===this.parent.resizeModule.isFrozenColResized)&&(i[y].style.height=C+"px"),s&&!t.isNullOrUndefined(s[y])&&s[y].childElementCount&&(d&&C>h||!d&&C>h||this.parent.allowResizing&&this.parent.resizeModule&&!0===this.parent.resizeModule.isFrozenColResized)&&(s[y].style.height=C+"px")}d&&this.setFrozenHeight()},i.prototype.refreshHeight=function(e){var t,i,r,n=this.parent.getFrozenMode()===Pi,o=this.getFrozenRightHeader(),s=this.parent.getHeaderContent().querySelector("."+zi),l=this.parent.getContent(),a=this.getMovableHeader(),h=this.parent.getHeaderContent().querySelector("."+Fi).classList,d=this.parent.textWrapSettings.wrapMode;"textwrap"===e.case?(("Header"!==d||e.isModeChg)&&(n&&(i=l.querySelector(".e-frozen-right-content").querySelectorAll("tr")),r=l.querySelector("."+Ei).querySelectorAll("tr"),t=l.querySelector("."+Ti).querySelectorAll("tr"),this.setWrapHeight(t,r,e.isModeChg,!0,!1,i)),"Content"===d&&this.parent.allowTextWrap?h.add("e-wrap"):h.remove("e-wrap"),"Both"===d||e.isModeChg?(n&&(i=o.querySelectorAll("tr")),t=s.querySelectorAll("tr"),r=a.querySelectorAll("tr")):(n&&(i=o.querySelector("Content"===d?Ui:"thead").querySelectorAll("tr")),t=s.querySelector("Content"===d?Ui:"thead").querySelectorAll("tr"),r=a.querySelector("Content"===d?Ui:"thead").querySelectorAll("tr")),this.parent.getHeaderContent().getElementsByClassName("e-stackedheadercell").length||this.setWrapHeight(t,r,e.isModeChg,!1,this.colDepth>1,i),this.refreshStackedHdrHgt()):"refreshHeight"===e.case&&(r=l.querySelector("."+Ei).querySelectorAll("tr"),t=l.querySelector("."+Ti).querySelectorAll("tr"),n&&(i=l.querySelector(".e-frozen-right-content").querySelectorAll("tr")),this.setWrapHeight(t,r,e.isModeChg,!1,!1,i),this.parent.getHeaderContent().getElementsByClassName("e-stackedheadercell").length||(n&&(i=o.querySelectorAll("tr")),t=s.querySelectorAll("tr"),r=a.querySelectorAll("tr"),this.setWrapHeight(t,r,e.isModeChg,!1,!1,i)))},i.prototype.setVisible=function(e){for(var i,r,n=this.parent,o=this.parent.getFrozenLeftColumnsCount(),s=this.parent.getFrozenRightColumnsCount(),l=this.parent.getMovableColumnsCount(),a=0,h=e.length;a<h;a++){var d=e[a];if(r=n.getNormalizedColumnIndex(d.uid),i=d.visible?"":"none","Left"===d.freeze||"Right"===d.freeze){if(o&&!s){var c=n.getHeaderContent().querySelector(".e-frozen-left-header").querySelector(ji);t.setStyleAttribute(c.children[r],{display:i})}else if(!o&&s){var p=n.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(ji);t.setStyleAttribute(p.children[r-l],{display:i})}}else{var u=n.getHeaderContent().querySelector("."+Ii).querySelector(ji);t.setStyleAttribute(u.children[r-o],{display:i})}}this.refreshUI()},i.prototype.filterRenderer=function(t,i,r){return e.prototype.filterRenderer.call(this,t,i,r)},i.prototype.refreshUI=function(){var i,r=this.getMovableHeader().querySelector(Ui);t.remove(this.getMovableHeader().querySelector("table")),this.parent.getFrozenMode()===Pi&&(i=this.getFrozenRightHeader().querySelector(Ui),t.remove(this.getFrozenRightHeader().querySelector("table"))),e.prototype.refreshFrozenLeftUI.call(this),this.rfshMovable(),this.getMovableHeader().querySelector(Ui).innerHTML=r.innerHTML,i&&(this.getFrozenRightHeader().querySelector(Ui).innerHTML=i.innerHTML),this.updateColgroup(),this.widthService.setWidthToColumns(),this.parent.notify(qt,{}),this.parent.allowTextWrap&&"Header"===this.parent.textWrapSettings.wrapMode&&J([].slice.call(this.getMovableHeader().querySelectorAll("tr.e-columnheader")),!0),this.parent.updateDefaultCursor();var n=this.parent.getContent().querySelector("."+Ei).querySelector("."+Mi);t.remove(n.querySelector(ji));var o=this.getMovableHeader().querySelector(ji).cloneNode(!0);if(n.insertBefore(o,n.querySelector(Ui)),i){var s=this.parent.getContent().querySelector(".e-frozen-right-content").querySelector("."+Mi);t.remove(s.querySelector(ji));var l=this.getFrozenRightHeader().querySelector(ji).cloneNode(!0);s.insertBefore(l,s.querySelector(Ui))}this.widthService.refreshFrozenScrollbar(),this.initializeHeaderDrag(),this.parent.notify(Ht,{rows:this.rows,args:{isFrozen:!1}})},i.prototype.refreshFreeze=function(e){var t=this.parent.getFrozenLeftColumnsCount(),i=this.parent.getFrozenRightColumnsCount(),r=this.parent.getMovableColumnsCount();if("filter"===e.case){var n=this.getTable().querySelector(".e-filterbar");if(this.parent.allowFiltering&&n&&this.getMovableHeader().querySelector("thead")){var o=this.parent.isRowDragable(),s=t?o?t+1:t:0,l=t+r+(t&&o?1:0);if(this.getMovableHeader().querySelector("thead").appendChild(this.filterRenderer(n,s,l)),this.parent.getFrozenMode()===Pi){var a=[].slice.call(this.getMovableHeader().querySelectorAll("thead .e-filterbarcell .e-input"));this.getFrozenRightHeader().querySelector("thead").appendChild(this.filterRenderer(n,s,s+i)),this.adjudtFilterBarCell(a)}var h=[].slice.call(this.getMovableHeader().querySelectorAll("thead .e-filterbarcell .e-input"));this.adjudtFilterBarCell(h)}}else"textwrap"!==e.case&&"refreshHeight"!==e.case||(this.refreshHeight(e),this.parent.contentModule.refreshScrollOffset())},i.prototype.updateFrozenColGroup=function(e,i){e&&!1===e.visible&&t.setStyleAttribute(i,{display:"none"})},i.prototype.adjudtFilterBarCell=function(e){for(var t=0,i=e;t<i.length;t++){var r={element:i[t],floatLabelType:"Never",properties:{enableRtl:this.parent.enableRtl,showClearButton:!0}};o.Input.bindInitialEvent(r)}},i.prototype.renderPanel=function(){this.parent.getFrozenLeftColumnsCount()?(e.prototype.renderPanel.call(this),this.parent.getFrozenRightColumnsCount()&&this.renderLeftWithRightFrozenPanel()):this.renderRightFrozenPanelAlone(),this.getPanel().firstChild.style.display="flex",this.getMovableHeader().style.flex="1"},i.prototype.renderTable=function(){this.parent.getFrozenLeftColumnsCount()?e.prototype.renderTable.call(this):this.renderFrozenRightTableAlone()},i.prototype.rfshMovable=function(){if(this.parent.getFrozenLeftColumnsCount()){if(e.prototype.rfshMovable.call(this),this.parent.getFrozenRightColumnsCount()){var t=this.rows;this.getFrozenRightHeader().appendChild(this.createHeader(void 0,"frozen-right")),this.refreshStackedHdrHgt(),this.parent.notify(Ht,{rows:this.rows,args:{renderFrozenRightContent:!0}}),this.rows=t}}else this.getFrozenRightHeader().appendChild(this.getTable()),this.getMovableHeader().appendChild(this.createHeader(void 0,"movable")),this.refreshStackedHdrHgt(),this.addMovableFirstCls()},i.prototype.refreshStackedHdrHgt=function(){this.parent.getFrozenLeftColumnsCount()?(e.prototype.refreshStackedHdrHgt.call(this),this.parent.getFrozenRightColumnsCount()&&this.refreshFrozenRightStackedHdrHgt()):this.refreshFrozenRightStackedHdrHgt()},i.prototype.refreshFrozenRightStackedHdrHgt=function(){for(var e,t=[].slice.call(this.getFrozenRightHeader().getElementsByClassName("e-columnheader")),i=[].slice.call(this.getMovableHeader().getElementsByClassName("e-columnheader")),r=0,n=t.length;r<n;r++)(e=this.getRowSpan(t[r])).min>1&&this.updateStackedHdrRowHgt(r,e.max,t[r],i)},i.prototype.updateColgroup=function(){this.updateMovableColGroup(),this.parent.getFrozenLeftColumnsCount()&&this.updateFrozenLeftColGroup(),this.parent.getFrozenRightColumnsCount()&&this.updateFrozenRightColGroup()},i.prototype.renderRightFrozenPanelAlone=function(){var i=this.parent.element.querySelector("."+Ii),r=this.parent.element.querySelector(".e-frozen-right-header");e.prototype.renderFrozenRightPanel.call(this),t.isNullOrUndefined(r)&&(i=this.parent.createElement("div",{className:Ii}),r=this.parent.createElement("div",{className:"e-frozenheader e-frozen-right-header"}),this.getPanel().querySelector("."+Fi).appendChild(i),this.getPanel().querySelector("."+Fi).appendChild(r)),e.prototype.setMovableHeader.call(this,i),this.setFrozenRightHeader(r)},i.prototype.renderLeftWithRightFrozenPanel=function(){var i=this.parent.element.querySelector(".e-frozen-right-header");e.prototype.renderFrozenRightPanel.call(this),t.isNullOrUndefined(i)&&(i=this.parent.createElement("div",{className:"e-frozenheader e-frozen-right-header"}),this.getPanel().querySelector("."+Fi).appendChild(i)),this.setFrozenRightHeader(i)},i.prototype.renderFrozenRightTableAlone=function(){e.prototype.renderFrozenRightTable.call(this),this.rfshMovable(),this.updateColgroup(),this.initializeHeaderDrag(),this.initializeHeaderDrop(),this.parent.notify(Ht,{rows:this.rows,args:{isFrozen:!1}})},i.prototype.updateFrozenLeftColGroup=function(){for(var e=this.getFrozenHeader().querySelector(ji).children,i=this.parent.isRowDragable()?1:0,r=this.parent.isRowDragable()?this.parent.getFrozenLeftColumnsCount()+1:this.parent.getFrozenLeftColumnsCount(),n=i;n<e.length;n++)n>=r&&(t.remove(e[n]),n--)},i.prototype.updateMovableColGroup=function(){var e=this.getMovableHeader().querySelector(ji).children;this.parent.isRowDragable()&&t.remove(e[0]);for(var i=e.length,r=this.parent.getFrozenLeftColumnsCount(),n=this.parent.getMovableColumnsCount(),o=0,s=0;s<i;s++,o++)(s<r||s>=r+n)&&(t.remove(e[o]),o--)},i.prototype.updateFrozenRightColGroup=function(){var e=this.parent.isRowDragable(),i=this.parent.getFrozenRightColumns(),r=this.getFrozenRightHeader().querySelector(ji).children;this.parent.getFrozenMode()===Pi&&e&&t.remove(r[0]);for(var n=r.length,o=this.parent.getFrozenLeftColumnsCount(),s=this.parent.getMovableColumnsCount(),l=0,a=0;a<n;a++)a<o+s?t.remove(r[0]):(this.updateFrozenColGroup(i[l],r[l]),l++)},i.prototype.setFrozenRightHeader=function(e){this.frozenRightHeader=e},i.prototype.getFrozenRightHeader=function(){return this.frozenRightHeader},i}(Ko),Jo=function(e){function i(t,i){var r=e.call(this,t,i)||this;return r.frzCount=0,r.isColGroupRefresh=!1,r.widthService=i.getService("widthService"),r}return Qo(i,e),i.prototype.renderPanel=function(){this.parent.getFrozenLeftColumnsCount()?(e.prototype.renderPanel.call(this),this.parent.getFrozenRightColumnsCount()&&this.renderFrozenLeftWithRightPanel()):this.renderFrozenRightPanelAlone();var t=this.parent.enableVirtualization?"":"flex";this.getPanel().firstChild.style.display=t},i.prototype.renderTable=function(){if(this.parent.getFrozenLeftColumnsCount()){if(e.prototype.renderTable.call(this),this.parent.getFrozenRightColumnsCount()){this.renderFrozenLeftWithRightTable();t=this.parent.getVisibleFrozenRightCount()?"":"none";this.renderHorizontalScrollbar("e-frozenscrollbar e-frozen-right-scrollbar",t,!0)}}else{this.renderFrozenRightTableAlone();var t=this.parent.getVisibleFrozenRightCount()?"":"none";this.renderHorizontalScrollbar("e-frozenscrollbar e-frozen-right-scrollbar",t)}this.getMovableContent().style.flex="1"},i.prototype.appendScrollbar=function(e,t,i){var r=this.parent.createElement("div",{className:"e-scrollbar",styles:"display: flex"});if(this.parent.getFrozenLeftColumnsCount()){if(i)return void this.parent.getContent().querySelector(".e-scrollbar").appendChild(e);r.appendChild(e),r.appendChild(t)}else r.appendChild(t),r.appendChild(e);this.parent.getContent().appendChild(r)},i.prototype.renderFrozenRightPanelAlone=function(){this.renderFrozenRigthPanel();var i=this.parent.element.querySelector("."+Ei),r=this.parent.element.querySelector(".e-frozen-right-content");t.isNullOrUndefined(r)&&(i=this.parent.createElement("div",{className:Ei}),r=this.parent.createElement("div",{className:"e-frozencontent e-frozen-right-content"}),this.getPanel().querySelector("."+Di).appendChild(i),this.getPanel().querySelector("."+Di).appendChild(r)),e.prototype.setMovableContent.call(this,i),this.setFrozenRightContent(r)},i.prototype.renderFrozenLeftWithRightPanel=function(){this.renderFrozenRigthPanel();var e=this.parent.element.querySelector(".e-frozen-right-content");t.isNullOrUndefined(e)&&(e=this.parent.createElement("div",{className:"e-frozencontent e-frozen-right-content"}),this.getPanel().querySelector("."+Di).appendChild(e)),this.setFrozenRightContent(e)},i.prototype.renderFrozenRightTableAlone=function(){var i;null==this.getFrozenRightContent().querySelector("."+Mi)?(e.prototype.renderFrozenRightTable.call(this),this.getFrozenRightContent().appendChild(this.getTable()),i=this.getTable().cloneNode(!0),this.getMovableContent().appendChild(i)):(this.parent.frozenRows&&this.parent.getHeaderContent().classList.add("e-frozenhdrcont"),this.setTable(this.getFrozenRightContent().querySelector("."+Mi)),this.setColGroup(this.getFrozenRightHeaderColGroup()),i=this.getMovableContent().querySelector("."+Mi),this.getFrozenRightContent().querySelector("."+Mi).appendChild(this.getColGroup())),this.getMovableContent().querySelector(ji)&&t.remove(this.getMovableContent().querySelector(ji));var r=this.parent.getHeaderContent().querySelector("."+Ii).querySelector(ji).cloneNode(!0);i.insertBefore(r,i.querySelector(Ui))},i.prototype.renderFrozenLeftWithRightTable=function(){var e=this.getTable().cloneNode(!0);this.getFrozenRightContent().appendChild(e);var i=this.getFrozenRightContent().querySelector(ji);i&&t.remove(i);var r=this.getFrozenRightContent().querySelector("."+Mi);r.insertBefore(this.getFrozenRightHeaderColGroup(),r.querySelector(Ui))},i.prototype.renderFrozenRightEmptyRowAlone=function(i){e.prototype.renderFrozenRightEmpty.call(this,i),this.getMovableContent().querySelector(Ui).innerHTML="<tr><td></td></tr>",t.addClass([this.parent.getMovableContentTbody().querySelector("tr")],["e-emptyrow"]),this.getFrozenRightContent().querySelector(".e-emptyrow").querySelector("td").colSpan=this.parent.getVisibleFrozenRightCount(),this.parent.frozenRows&&(this.parent.getFrozenRightHeaderTbody().innerHTML="",this.parent.getMovableHeaderTbody().innerHTML="")},i.prototype.getFrozenHeader=function(e){return e===Li?this.parent.getHeaderContent().querySelector(".e-frozen-left-header").querySelector(Ui):"movable"===e?this.parent.getHeaderContent().querySelector("."+Ii).querySelector(Ui):this.parent.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(Ui)},i.prototype.renderFrozenLeftWithRightEmptyRow=function(){this.getFrozenRightContent().querySelector(Ui).innerHTML="<tr><td></td></tr>",t.addClass([this.getFrozenRightContent().querySelector(Ui).querySelector("tr")],["e-emptyrow"]),this.parent.frozenRows&&(this.parent.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(Ui).innerHTML="")},i.prototype.setFrozenRightContent=function(e){this.frozenRigthContent=e},i.prototype.getFrozenRightContent=function(){return this.frozenRigthContent},i.prototype.getHeaderColGroup=function(){var e=this.parent.element.querySelector("."+Si).querySelector(ji).cloneNode(!0);if(!this.parent.getFrozenLeftColumnsCount()){var t=this.getFrozenRightHeaderColGroup();e=t&&this.frzCount?t.cloneNode(!0):e,this.frzCount++,this.isColGroupRefresh=!0}return e},i.prototype.getFrozenRightHeaderColGroup=function(){var e=this.parent.getHeaderContent().querySelector(".e-frozen-right-header").querySelector(ji);return e||(e=this.parent.getHeaderContent().querySelector(ji)),e.cloneNode(!0)},i.prototype.setColGroup=function(i){return this.parent.getFrozenLeftColumnsCount()?e.prototype.setColGroup.call(this,i):(i=this.isColGroupRefresh?i:this.getFrozenRightHeaderColGroup(),t.isNullOrUndefined(i)||(i.id="content-"+i.id),this.isColGroupRefresh=!1,2===this.frzCount&&(this.frzCount=0),this.colgroup=i)},i.prototype.renderEmpty=function(t){this.parent.getFrozenLeftColumnsCount()?(e.prototype.renderEmpty.call(this,t),this.getFrozenContent().querySelector(".e-emptyrow").querySelector("td").colSpan=this.parent.getVisibleFrozenLeftCount(),this.parent.getFrozenRightColumnsCount()&&this.renderFrozenLeftWithRightEmptyRow()):this.renderFrozenRightEmptyRowAlone(t),this.parent.notify(oi,{case:"refreshHeight"})},i.prototype.setHeightToContent=function(e){this.parent.getFrozenRightColumnsCount()&&(this.getFrozenRightContent().style.height=e.toString()+"px"),this.parent.getFrozenLeftColumnsCount()&&(this.getFrozenContent().style.height=e.toString()+"px"),this.getMovableContent().style.height=e.toString()+"px"},i.prototype.actionComplete=function(t){e.prototype.actionComplete.call(this,t)},i.prototype.batchAdd=function(t){e.prototype.batchAdd.call(this,t)},i.prototype.getTbody=function(e){var t;return e===Li?t=this.parent.getFrozenLeftContentTbody():"movable"===e?t=this.parent.getMovableContentTbody():e===Ni&&(t=this.parent.getFrozenRightContentTbody()),t},i.prototype.setIsFrozen=function(e,t){e.isFrozen=t===Li||"Right"===this.parent.getFrozenMode()&&t===Ni,e.renderFrozenRightContent=this.parent.getFrozenMode()===Pi&&t===Ni,e.renderMovableContent="movable"===t},i.prototype.appendContent=function(e,i,r,n){!t.isNullOrUndefined(this.parent.rowTemplate)&&this.parent.isReact?e=i:e.appendChild(i),"Left"===this.parent.getFrozenMode()?n===Li?(this.isLoaded=!1,this.getFrozenContent().querySelector("table").appendChild(e),this.refreshContentRows(t.extend({},r))):(this.refreshTbody(e),this.isLoaded=!0,this.getMovableContent().querySelector("table").appendChild(e),this.refreshHeight(),this.refreshScrollOffset()):"Right"===this.parent.getFrozenMode()?"movable"===n?(this.refreshTbody(e),this.isLoaded=!0,this.getMovableContent().querySelector("table").appendChild(e),this.refreshHeight(),this.refreshScrollOffset()):(this.isLoaded=!1,this.getFrozenRightContent().querySelector("table").appendChild(e),this.refreshContentRows(t.extend({},r))):this.parent.getFrozenMode()===Pi&&(n===Li?(this.isLoaded=!1,this.getFrozenContent().querySelector("table").appendChild(e),this.refreshContentRows(t.extend({},r))):"movable"===n?(this.refreshTbody(e),this.isLoaded=!1,this.getMovableContent().querySelector("table").appendChild(e),this.refreshContentRows(t.extend({},r))):(this.isLoaded=!0,this.getFrozenRightContent().querySelector("table").appendChild(e),this.refreshHeight(),this.refreshScrollOffset())),this.isInitialRender&&(this.parent.scrollModule.setHeight(),this.isInitialRender=!1),this.widthService.refreshFrozenScrollbar()},i.prototype.refreshHeight=function(){this.parent.allowTextWrap||this.parent.notify(oi,{case:"refreshHeight"})},i.prototype.splitRows=function(e){var t=this.parent.getFrozenLeftColumnsCount(),i=this.parent.getFrozenRightColumnsCount();t&&!i?e===Li?(this.freezeRows=this.rows,this.freezeRowElements=this.rowElements):this.movableRows=this.rows:!t&&i?"movable"===e?this.movableRows=this.rows:(this.freezeRows=this.rows,this.freezeRowElements=this.rowElements):t&&i&&(e===Li?(this.freezeRows=this.rows,this.freezeRowElements=this.rowElements):"movable"===e?(this.movableRows=this.rows,this.movableRowElements=this.rowElements):(this.frozenRightRows=this.rows,this.frozenRightRowElements=this.rowElements))},i.prototype.getMovableRowElements=function(){return this.parent.getFrozenMode()!==Pi?this.rowElements:this.movableRowElements},i.prototype.getFrozenRightRowElements=function(){return this.parent.getFrozenMode()!==Pi?this.freezeRowElements:this.frozenRightRowElements},i.prototype.getFrozenRightRows=function(){return this.parent.getFrozenMode()===Pi?this.parent.enableInfiniteScrolling?this.rightFreezeRows:this.frozenRightRows:this.getRows()},i.prototype.getFrozenRightRowByIndex=function(e){return this.parent.getFrozenRightDataRows()[e]},i.prototype.getRows=function(){var e=this.getInfiniteRows();return e.length?e:this.freezeRows},i.prototype.getRowElements=function(){return this.freezeRowElements},i}(Wo),Yo=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Zo=function(t){function i(e,i){var r=t.call(this,e,i)||this;return r.frzRows=[],r.mvblRows=[],r.frRows=[],r.serviceLoc=i,r.eventListener("on"),r.rowModelGenerator=new Gi(r.parent),r}return Yo(i,t),i.prototype.eventListener=function(e){this.parent[e](pi,this.getVirtualData,this),this.parent[e]("set-freeze-selection",this.setFreezeSelection,this),this.parent[e]("refresh-virtual-frozenrows",this.refreshVirtualFrozenRows,this),this.parent.addEventListener(St,this.actionComplete.bind(this))},i.prototype.actionComplete=function(e){if("delete"===e.requestType&&this.parent.frozenRows)for(var t=0;t<this.parent.frozenRows;t++)ft(this,t)},i.prototype.refreshVirtualFrozenRows=function(e){var t=this,i=this.parent;if("delete"===e.requestType&&i.frozenRows){e.isFrozenRowsRender=!0;var r=i.renderModule.data.generateQuery(!0).clone();r.page(1,i.pageSettings.pageSize),i.renderModule.data.getData({},r).then(function(r){tt(e,r.result,i.getSelectedRowIndexes(),i,t.rowModelGenerator,t.serviceLoc,t.virtualRenderer,t)})}},i.prototype.getVirtualData=function(e){this.virtualRenderer.getVirtualData(e)},i.prototype.setFreezeSelection=function(e){nt(e,this.virtualRenderer)},i.prototype.renderTable=function(){this.freezeRowGenerator=new Go(this.parent),this.virtualRenderer=new lo(this.parent,this.serviceLoc),this.virtualRenderer.header=this.serviceLoc.getService("rendererFactory").getRenderer(e.RenderType.Header).virtualHdrRenderer,t.prototype.renderTable.call(this),this.virtualRenderer.setPanel(this.parent.getContent()),this.scrollbar=this.parent.getContent().querySelector(".e-movablescrollbar");var i=this.getMovableContent(),r=this.parent.height;if(this.virtualRenderer.virtualEle.content=this.virtualRenderer.content=this.getPanel().querySelector("."+Di),this.virtualRenderer.virtualEle.content.style.overflowX="hidden",this.virtualRenderer.virtualEle.renderFrozenWrapper(r),this.virtualRenderer.virtualEle.renderFrozenPlaceHolder(),this.parent.enableColumnVirtualization){this.virtualRenderer.virtualEle.movableContent=this.virtualRenderer.movableContent=this.getPanel().querySelector("."+Ei),this.virtualRenderer.virtualEle.renderMovableWrapper(r),this.virtualRenderer.virtualEle.renderMovablePlaceHolder();var n=i.querySelector("table");this.virtualRenderer.virtualEle.movableTable=n,this.virtualRenderer.virtualEle.movableWrapper.appendChild(n),i.appendChild(this.virtualRenderer.virtualEle.movableWrapper),i.appendChild(this.virtualRenderer.virtualEle.movablePlaceholder)}this.virtualRenderer.virtualEle.wrapper.appendChild(this.getFrozenContent()),this.virtualRenderer.virtualEle.wrapper.appendChild(i),this.virtualRenderer.virtualEle.table=this.getTable(),mt(this.parent,this.virtualRenderer,this.scrollbar,this.getMovableContent())},i.prototype.appendContent=function(e,t,i){st(this.virtualRenderer,this.widthService,e,t,i)},i.prototype.generateRows=function(e,t){return this.firstPageRecords||(this.firstPageRecords=e),lt(this.virtualRenderer,e,t,this.freezeRowGenerator,this.parent)},i.prototype.getRowByIndex=function(e){return this.virtualRenderer.getRowByIndex(e)},i.prototype.getMovableRowByIndex=function(e){return this.virtualRenderer.getMovableVirtualRowByIndex(e)},i.prototype.collectRows=function(e){return rt(e,this.virtualRenderer,this.parent)},i.prototype.getMovableRows=function(){return this.collectRows("movable")},i.prototype.getRows=function(){return this.collectRows("frozen-left")},i.prototype.getColGroup=function(){var e=this.parent.getMovableVirtualContent();return this.isXaxis()?e.querySelector(ji):this.colgroup},i.prototype.getReorderedFrozenRows=function(e){return at(e,this.virtualRenderer,this.parent,this.freezeRowGenerator,this.firstPageRecords)},i.prototype.isXaxis=function(){return dt(this.virtualRenderer)},i.prototype.getHeaderCells=function(){return ct(this.virtualRenderer,this.parent)},i.prototype.getVirtualFreezeHeader=function(){return pt(this.virtualRenderer,this.parent)},i.prototype.ensureFrozenCols=function(e){return ut(e,this.parent)},i.prototype.getRowObjectByIndex=function(e){return this.virtualRenderer.getRowObjectByIndex(e)},i.prototype.setColGroup=function(e){return gt(e,this.virtualRenderer,this)},i}(Wo),$o=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.serviceLoc=i,r}return Yo(t,e),t.prototype.renderTable=function(){this.virtualHdrRenderer=new ao(this.parent,this.serviceLoc),this.virtualHdrRenderer.gen.refreshColOffsets(),this.parent.setColumnIndexesInView(this.virtualHdrRenderer.gen.getColumnIndexes(this.getPanel().querySelector("."+Fi))),this.virtualHdrRenderer.virtualEle.content=this.getPanel().querySelector("."+Fi),this.virtualHdrRenderer.virtualEle.renderFrozenWrapper(),this.virtualHdrRenderer.virtualEle.renderFrozenPlaceHolder(),this.parent.enableColumnVirtualization&&(this.virtualHdrRenderer.virtualEle.movableContent=this.getPanel().querySelector("."+Ii),this.virtualHdrRenderer.virtualEle.renderMovableWrapper(),this.virtualHdrRenderer.virtualEle.renderMovablePlaceHolder()),e.prototype.renderTable.call(this),this.virtualHdrRenderer.setPanel(this.parent.getHeaderContent())},t.prototype.rfshMovable=function(){this.getFrozenHeader().appendChild(this.getTable()),this.virtualHdrRenderer.virtualEle.wrapper.appendChild(this.getFrozenHeader()),this.parent.enableColumnVirtualization?this.virtualHdrRenderer.virtualEle.movableWrapper.appendChild(this.createHeader(void 0,"movable")):this.getMovableHeader().appendChild(this.createTable()),this.virtualHdrRenderer.virtualEle.wrapper.appendChild(this.getMovableHeader())},t}(Ko),es=function(i){function r(e,t){var r=i.call(this,e,t)||this;return r.frRows=[],r.frzRows=[],r.mvblRows=[],r.serviceLoc=t,r.eventListener("on"),r.rowModelGenerator=new Gi(r.parent),r}return Yo(r,i),r.prototype.actionComplete=function(e){if("delete"===e.requestType&&this.parent.frozenRows)for(var t=0;t<this.parent.frozenRows;t++){if(!this.virtualRenderer.vgenerator.frozenRightCache[1]){this.virtualRenderer.vgenerator.frozenRightCache[1]=this.frRows.length?this.frRows:this.frzRows;break}this.virtualRenderer.vgenerator.frozenRightCache[1][t]=this.frRows.length?this.frRows[t]:this.frzRows[t],ft(this,t)}},r.prototype.eventListener=function(e){this.parent.addEventListener(St,this.actionComplete.bind(this)),this.parent[e]("refresh-virtual-frozenrows",this.refreshVirtualFrozenRows,this),this.parent[e](pi,this.getVirtualData,this),this.parent[e]("set-freeze-selection",this.setFreezeSelection,this)},r.prototype.refreshVirtualFrozenRows=function(e){var t=this;if("delete"===e.requestType&&this.parent.frozenRows){e.isFrozenRowsRender=!0;var i=this.parent.renderModule.data.generateQuery(!0).clone();i.page(1,this.parent.pageSettings.pageSize);var r=this.parent.getSelectedRowIndexes();this.parent.renderModule.data.getData({},i).then(function(i){tt(e,i.result,r,t.parent,t.rowModelGenerator,t.serviceLoc,t.virtualRenderer,t)})}},r.prototype.setFreezeSelection=function(e){nt(e,this.virtualRenderer)},r.prototype.getVirtualData=function(e){this.virtualRenderer.getVirtualData(e)},r.prototype.renderNextFrozentPart=function(e,i){e.renderMovableContent=this.parent.getFrozenLeftCount()?i===Li:i===Ni,e.renderFrozenRightContent=this.parent.getFrozenMode()===Pi&&"movable"===i,(e.renderMovableContent||e.renderFrozenRightContent)&&this.refreshContentRows(t.extend({},e))},r.prototype.renderTable=function(){this.virtualRenderer=new lo(this.parent,this.serviceLoc),this.virtualRenderer.header=this.serviceLoc.getService("rendererFactory").getRenderer(e.RenderType.Header).virtualHdrRenderer,this.freezeRowGenerator=new Go(this.parent),i.prototype.renderTable.call(this),this.virtualRenderer.setPanel(this.parent.getContent()),this.scrollbar=this.parent.getContent().querySelector(".e-movablescrollbar");var t=this.getFrozenRightContent(),r=this.getFrozenContent(),n=this.getMovableContent();"Right"===this.parent.getFrozenMode()&&(r=t),this.virtualRenderer.virtualEle.content=this.virtualRenderer.content=this.getPanel().querySelector("."+Di),this.virtualRenderer.virtualEle.content.style.overflowX="hidden";var o=this.parent.height;this.virtualRenderer.virtualEle.renderFrozenWrapper(o),this.virtualRenderer.virtualEle.renderFrozenPlaceHolder(),this.renderVirtualFrozenLeft(r,n),this.renderVirtualFrozenRight(r,n),this.renderVirtualFrozenLeftRight(r,n,t),this.virtualRenderer.virtualEle.table=this.getTable(),mt(this.parent,this.virtualRenderer,this.scrollbar,this.getMovableContent())},r.prototype.renderVirtualFrozenLeft=function(e,t){"Left"===this.parent.getFrozenMode()&&(this.virtualRenderer.virtualEle.wrapper.appendChild(e),this.virtualRenderer.virtualEle.wrapper.appendChild(t))},r.prototype.renderVirtualFrozenRight=function(e,t){"Right"===this.parent.getFrozenMode()&&(this.virtualRenderer.virtualEle.wrapper.appendChild(t),this.virtualRenderer.virtualEle.wrapper.appendChild(e))},r.prototype.renderVirtualFrozenLeftRight=function(e,t,i){this.parent.getFrozenMode()===Pi&&(this.virtualRenderer.virtualEle.wrapper.appendChild(e),this.virtualRenderer.virtualEle.wrapper.appendChild(t),this.virtualRenderer.virtualEle.wrapper.appendChild(i))},r.prototype.appendContent=function(e,t,i){st(this.virtualRenderer,this.widthService,e,t,i),this.refreshScrollOffset()},r.prototype.generateRows=function(e,t){return this.firstPageRecords||(this.firstPageRecords=e),lt(this.virtualRenderer,e,t,this.freezeRowGenerator,this.parent)},r.prototype.getRowByIndex=function(e){return this.virtualRenderer.getRowByIndex(e)},r.prototype.getFrozenRightRowByIndex=function(e){return this.virtualRenderer.getFrozenRightVirtualRowByIndex(e)},r.prototype.collectRows=function(e){return rt(e,this.virtualRenderer,this.parent)},r.prototype.getMovableRowByIndex=function(e){return this.virtualRenderer.getMovableVirtualRowByIndex(e)},r.prototype.getFrozenRightRows=function(){return this.collectRows("frozen-right")},r.prototype.getMovableRows=function(){return this.collectRows("movable")},r.prototype.getColGroup=function(){var e=this.parent.getMovableVirtualContent();return dt(this.virtualRenderer)?e.querySelector(ji):this.colgroup},r.prototype.getRows=function(){return this.collectRows("Right"===this.parent.getFrozenMode()?"frozen-right":"frozen-left")},r.prototype.getReorderedFrozenRows=function(e){return at(e,this.virtualRenderer,this.parent,this.freezeRowGenerator,this.firstPageRecords)},r.prototype.getHeaderCells=function(){return ct(this.virtualRenderer,this.parent)},r.prototype.isXaxis=function(){return dt(this.virtualRenderer)},r.prototype.getVirtualFreezeHeader=function(){return pt(this.virtualRenderer,this.parent)},r.prototype.getRowObjectByIndex=function(e){return this.virtualRenderer.getRowObjectByIndex(e)},r.prototype.ensureFrozenCols=function(e){return ut(e,this.parent)},r.prototype.setColGroup=function(e){return gt(e,this.virtualRenderer,this)},r}(Jo),ts=function(){function t(e,t){this.parent=e,this.locator=t,this.addEventListener()}return t.prototype.getModuleName=function(){return"freeze"},t.prototype.addEventListener=function(){this.parent.isDestroyed||this.parent.on(Mt,this.instantiateRenderer,this)},t.prototype.instantiateRenderer=function(){this.parent.log("limitation",this.getModuleName());var t=this.locator.getService("rendererFactory");this.parent.getFrozenColumns()&&(this.parent.enableColumnVirtualization?t.addRenderer(e.RenderType.Header,new $o(this.parent,this.locator)):t.addRenderer(e.RenderType.Header,new Ko(this.parent,this.locator)),this.parent.enableVirtualization?t.addRenderer(e.RenderType.Content,new Zo(this.parent,this.locator)):t.addRenderer(e.RenderType.Content,new Wo(this.parent,this.locator))),(this.parent.getFrozenLeftColumnsCount()||this.parent.getFrozenRightColumnsCount())&&(t.addRenderer(e.RenderType.Header,new Xo(this.parent,this.locator)),this.parent.enableVirtualization?t.addRenderer(e.RenderType.Content,new es(this.parent,this.locator)):t.addRenderer(e.RenderType.Content,new Jo(this.parent,this.locator)))},t.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(Mt,this.instantiateRenderer)},t.prototype.destroy=function(){this.removeEventListener()},t}(),is=function(){function e(e,t){this.defaultItems={},this.localeText=this.setLocaleKey(),this.disableItems=[],this.hiddenItems=[],this.isOpen=!1,this.GROUP="e-icon-group",this.UNGROUP="e-icon-ungroup",this.ASCENDING="e-icon-ascending",this.DESCENDING="e-icon-descending",this.ROOT="e-columnmenu",this.FILTER="e-icon-filter",this.POP="e-filter-popup",this.WRAP="e-col-menu",this.CHOOSER="_chooser_",this.parent=e,this.gridID=e.element.id,this.serviceLocator=t,this.addEventListener()}return e.prototype.wireEvents=function(){for(var e=this.getColumnMenuHandlers(),i=0;i<e.length;i++)t.EventHandler.add(e[i],"mousedown",this.columnMenuHandlerDown,this)},e.prototype.unwireEvents=function(){for(var e=this.getColumnMenuHandlers(),i=0;i<e.length;i++)t.EventHandler.remove(e[i],"mousedown",this.columnMenuHandlerDown)},e.prototype.destroy=function(){var e=this.parent.element;e&&(e.querySelector("."+Si)||e.querySelector("."+Ri))&&(this.columnMenu.destroy(),this.removeEventListener(),this.unwireFilterEvents(),this.unwireEvents(),t.remove(this.element))},e.prototype.columnMenuHandlerClick=function(e){e.target.classList.contains("e-columnmenu")&&(this.columnMenu.items=this.getItems(),this.columnMenu.dataBind(),this.isOpen&&this.headerCell!==this.getHeaderCell(e)||document.querySelector(".e-grid-menu .e-menu-parent.e-ul")?(this.columnMenu.close(),this.openColumnMenu(e)):this.isOpen?this.columnMenu.close():this.openColumnMenu(e))},e.prototype.openColumnMenuByField=function(e){this.openColumnMenu({target:this.parent.getColumnHeaderByField(e).querySelector(".e-columnmenu")})},e.prototype.openColumnMenu=function(e){var i={top:0,left:0};this.element.style.cssText="display:block;visibility:hidden";var n=this.element.getBoundingClientRect();this.element.style.cssText="display:none;visibility:visible",this.headerCell=this.getHeaderCell(e),t.Browser.isDevice?(i.top=window.innerHeight/2-n.height/2,i.left=window.innerWidth/2-n.width/2):this.parent.enableRtl?i=r.calculatePosition(this.headerCell,"left","bottom"):(i=r.calculatePosition(this.headerCell,"right","bottom")).left-=n.width,this.columnMenu.open(i.top,i.left),e.preventDefault&&e.preventDefault(),Se(this.parent.element,this.columnMenu.element.parentElement)},e.prototype.columnMenuHandlerDown=function(){this.isOpen=!("none"===this.element.style.display||""===this.element.style.display)},e.prototype.getColumnMenuHandlers=function(){return[].slice.call(this.parent.getHeaderTable().getElementsByClassName(this.ROOT))},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Ht,this.wireEvents,this),this.parent.on(Bt,this.enableAfterRenderMenu,this),this.parent.on(Ot,this.render,this),this.isFilterItemAdded()&&this.parent.on("filterDialogCreated",this.filterPosition,this),this.parent.on(Gt,this.columnMenuHandlerClick,this),this.parent.on(Vt,this.keyPressHandler,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Ht,this.unwireEvents),this.parent.off(Bt,this.enableAfterRenderMenu),this.parent.off(Ot,this.render),this.isFilterItemAdded()&&this.parent.off("filterDialogCreated",this.filterPosition),this.parent.off(Gt,this.columnMenuHandlerClick),this.parent.off(Vt,this.keyPressHandler))},e.prototype.keyPressHandler=function(e){var t=this.parent;if("altDownArrow"===e.action){var i=t.focusModule.currentInfo.element;if(i&&i.classList.contains("e-headercell")){var r=t.getColumnByUid(i.firstElementChild.getAttribute("e-mappinguid"));this.openColumnMenuByField(r.field)}}},e.prototype.enableAfterRenderMenu=function(e){e.module===this.getModuleName()&&e.enable&&(this.columnMenu&&(this.columnMenu.destroy(),t.remove(this.element)),this.render())},e.prototype.render=function(){this.l10n=this.serviceLocator.getService("localization"),this.element=this.parent.createElement("ul",{id:this.gridID+"_columnmenu",className:"e-colmenu"}),this.element.setAttribute("aria-label",this.l10n.getConstant("ColumnMenuDialogARIA")),this.parent.element.appendChild(this.element),this.columnMenu=new a.ContextMenu({cssClass:"e-grid-menu",enableRtl:this.parent.enableRtl,enablePersistence:this.parent.enablePersistence,locale:this.parent.locale,items:this.getItems(),select:this.columnMenuItemClick.bind(this),beforeOpen:this.columnMenuBeforeOpen.bind(this),onOpen:this.columnMenuOnOpen.bind(this),onClose:this.columnMenuOnClose.bind(this),beforeItemRender:this.beforeMenuItemRender.bind(this),beforeClose:this.columnMenuBeforeClose.bind(this)}),this.columnMenu.appendTo(this.element),this.wireFilterEvents()},e.prototype.wireFilterEvents=function(){!t.Browser.isDevice&&this.isFilterItemAdded()&&t.EventHandler.add(this.element,"mouseover",this.appendFilter,this)},e.prototype.unwireFilterEvents=function(){!t.Browser.isDevice&&this.isFilterItemAdded()&&t.EventHandler.remove(this.element,"mouseover",this.appendFilter)},e.prototype.beforeMenuItemRender=function(e){if(this.isChooserItem(e.item)){var t=this.getKeyFromId(e.item.id,this.CHOOSER),i=this.parent.columnModel.filter(function(e){return e.field===t}),r=n.createCheckBox(this.parent.createElement,!1,{label:e.item.text,checked:i[0].visible});this.parent.enableRtl&&r.classList.add("e-rtl"),e.element.innerHTML="",e.element.appendChild(r)}else e.item.id&&"Filter"===this.getKeyFromId(e.item.id)&&(e.element.appendChild(this.parent.createElement("span",{className:"e-icons e-caret"})),e.element.className+="e-filter-item e-menu-caret-icon")},e.prototype.columnMenuBeforeClose=function(e){var i=e.event?t.closest(e.event.target,".e-menu-item"):null;!t.isNullOrUndefined(e.parentItem)&&"ColumnChooser"===this.getKeyFromId(e.parentItem.id)&&i&&this.isChooserItem(i)?e.cancel=!0:e.event&&(t.closest(e.event.target,"."+this.POP)||e.event.currentTarget&&e.event.currentTarget.activeElement&&O(e.event.currentTarget.activeElement,"e-filter-popup")||O(e.event.target,"e-popup")||O(e.event.target,"e-popup-wrapper"))&&!t.Browser.isDevice&&(e.cancel=!0)},e.prototype.isChooserItem=function(e){return e.id&&e.id.indexOf("_colmenu_")>=0&&-1===this.getKeyFromId(e.id,this.CHOOSER).indexOf("_colmenu_")},e.prototype.columnMenuBeforeOpen=function(e){e.column=this.targetColumn=this.getColumn(),this.parent.trigger("columnMenuOpen",e);for(var t=0,i=e.items;t<i.length;t++){var r=i[t],n=this.getKeyFromId(r.id),o=this.defaultItems[n];-1!==this.getDefaultItems().indexOf(n)&&this.ensureDisabledStatus(n)&&!o.hide&&this.disableItems.push(r.text),r.hide&&this.hiddenItems.push(r.text)}this.columnMenu.enableItems(this.disableItems,!1),this.columnMenu.hideItems(this.hiddenItems)},e.prototype.columnMenuOnOpen=function(e){"e-menu-parent e-ul "===e.element.className&&(e.element.offsetHeight>window.innerHeight||this.parent.element.offsetHeight>window.innerHeight)&&(e.element.style.maxHeight=.8*window.innerHeight+"px",e.element.style.overflowY="auto")},e.prototype.ensureDisabledStatus=function(e){var t=!1;switch(e){case"Group":(!this.parent.allowGrouping||this.parent.ensureModuleInjected(Jn)&&this.targetColumn&&this.parent.groupSettings.columns.indexOf(this.targetColumn.field)>=0||this.targetColumn&&!this.targetColumn.allowGrouping)&&(t=!0);break;case"AutoFitAll":case"AutoFit":t=!this.parent.ensureModuleInjected(Kn);break;case"Ungroup":(!this.parent.ensureModuleInjected(Jn)||this.parent.ensureModuleInjected(Jn)&&this.targetColumn&&this.parent.groupSettings.columns.indexOf(this.targetColumn.field)<0)&&(t=!0);break;case"SortDescending":case"SortAscending":if(this.parent.allowSorting&&this.parent.ensureModuleInjected(xn)&&this.parent.sortSettings.columns.length>0&&this.targetColumn&&this.targetColumn.allowSorting)for(var i=this.parent.sortSettings.columns,r=0;r<i.length;r++)i[r].field===this.targetColumn.field&&i[r].direction.toLocaleLowerCase()===e.toLocaleLowerCase().replace("sort","")&&(t=!0);else(!this.parent.allowSorting||!this.parent.ensureModuleInjected(xn)||this.parent.allowSorting&&this.targetColumn&&!this.targetColumn.allowSorting)&&(t=!0);break;case"Filter":this.parent.allowFiltering&&"FilterBar"!==this.parent.filterSettings.type&&this.parent.ensureModuleInjected(_n)&&this.targetColumn&&this.targetColumn.allowFiltering?t=!1:this.parent.ensureModuleInjected(_n)&&this.parent.allowFiltering&&this.targetColumn&&(!this.targetColumn.allowFiltering||"FilterBar"===this.parent.filterSettings.type)&&(t=!0)}return t},e.prototype.columnMenuItemClick=function(e){switch(this.isChooserItem(e.item)?"ColumnChooser":this.getKeyFromId(e.item.id)){case"AutoFit":this.parent.autoFitColumns(this.targetColumn.field);break;case"AutoFitAll":this.parent.autoFitColumns([]);break;case"Ungroup":this.parent.ungroupColumn(this.targetColumn.field);break;case"Group":this.parent.groupColumn(this.targetColumn.field);break;case"SortAscending":this.parent.sortColumn(this.targetColumn.field,"Ascending");break;case"SortDescending":this.parent.sortColumn(this.targetColumn.field,"Descending");break;case"ColumnChooser":var t=this.getKeyFromId(e.item.id,this.CHOOSER),i=e.element.querySelector(".e-checkbox-wrapper .e-frame");i&&i.classList.contains("e-check")?(i.classList.remove("e-check"),this.parent.hideColumns(t,"field")):i&&(this.parent.showColumns(t,"field"),i.classList.add("e-check"));break;case"Filter":this.getFilter(e.element,e.item.id)}e.column=this.targetColumn,this.parent.trigger("columnMenuClick",e)},e.prototype.columnMenuOnClose=function(e){e.items.length>0&&e.items[0].parentObj instanceof a.ContextMenu&&(this.columnMenu.enableItems(this.disableItems,!1),this.disableItems=[],this.columnMenu.showItems(this.hiddenItems),this.hiddenItems=[],this.isFilterPopupOpen()&&this.getFilter(e.element,e.element.id,!0)),this.parent.isFrozenGrid()||this.parent.notify("restore-Focus",{})},e.prototype.getDefaultItems=function(){return["AutoFitAll","AutoFit","SortAscending","SortDescending","Group","Ungroup","ColumnChooser","Filter"]},e.prototype.getItems=function(){for(var e=[],t=0,i=this.parent.columnMenuItems?this.parent.columnMenuItems:this.getDefault();t<i.length;t++){var r=i[t];if("string"==typeof r)if("ColumnChooser"===r){var n=this.getDefaultItem(r);n.items=this.createChooserItems(),e.push(n)}else e.push(this.getDefaultItem(r));else e.push(r)}return e},e.prototype.getDefaultItem=function(e){var t={};switch(e){case"SortAscending":t={iconCss:this.ASCENDING};break;case"SortDescending":t={iconCss:this.DESCENDING};break;case"Group":t={iconCss:this.GROUP};break;case"Ungroup":t={iconCss:this.UNGROUP};break;case"Filter":t={iconCss:this.FILTER}}return this.defaultItems[e]={text:this.getLocaleText(e),id:this.generateID(e),iconCss:t.iconCss?"e-icons "+t.iconCss:null},this.defaultItems[e]},e.prototype.getLocaleText=function(e){return this.l10n.getConstant(this.localeText[e])},e.prototype.generateID=function(e,t){return this.gridID+"_colmenu_"+(t?t+e:e)},e.prototype.getKeyFromId=function(e,t){return e.indexOf("_colmenu_")>0&&e.replace(this.gridID+"_colmenu_"+(t||""),"")},e.prototype.getColumnMenu=function(){return this.element},e.prototype.getModuleName=function(){return"columnMenu"},e.prototype.setLocaleKey=function(){return{AutoFitAll:"autoFitAll",AutoFit:"autoFit",Group:"Group",Ungroup:"Ungroup",SortAscending:"SortAscending",SortDescending:"SortDescending",ColumnChooser:"Columnchooser",Filter:"FilterMenu"}},e.prototype.getHeaderCell=function(e){return t.closest(e.target,"th.e-headercell")},e.prototype.getColumn=function(){if(this.headerCell){var e=this.headerCell.querySelector(".e-headercelldiv").getAttribute("e-mappinguid");return this.parent.getColumnByUid(e)}return null},e.prototype.createChooserItems=function(){for(var e=[],t=0,i=this.parent.columnModel;t<i.length;t++){var r=i[t];r.showInColumnChooser&&r.field&&e.push({id:this.generateID(r.field,this.CHOOSER),text:r.headerText?r.headerText:r.field})}return e},e.prototype.appendFilter=function(e){if(this.defaultItems.Filter){var i=this.defaultItems.Filter.id;t.closest(e.target,"#"+i)&&!this.isFilterPopupOpen()?this.getFilter(e.target,i):!t.closest(e.target,"#"+i)&&this.isFilterPopupOpen()&&this.getFilter(e.target,i,!0)}},e.prototype.getFilter=function(e,i,r){var n=this.getFilterPop();n?n.style.display=!t.Browser.isDevice&&r?"none":"block":this.parent.notify("filterOpen",{col:this.targetColumn,target:e,isClose:r,id:i})},e.prototype.setPosition=function(e,t){var i=this.parent.element.getBoundingClientRect(),r=e.getBoundingClientRect(),n=r.left-i.left,o=r.top-i.top;i.height<o?o=o-t.offsetHeight+r.height:i.height<o+t.offsetHeight&&(o=i.height-t.offsetHeight),window.innerHeight<t.offsetHeight+o+i.top&&(o=window.innerHeight-t.offsetHeight-i.top),o+i.top<0&&(o=0),n+=this.parent.enableRtl?-t.offsetWidth:r.width,i.width<=n+t.offsetWidth?(n-=r.width+t.offsetWidth,r.left<t.offsetWidth&&(n=r.left+t.offsetWidth/2)):n<0&&(n+=t.offsetWidth+r.width),t.style.top=o+"px",t.style.left=n+"px"},e.prototype.filterPosition=function(){var e=this.getFilterPop();if(e.classList.add(this.WRAP),!t.Browser.isDevice){var i=e.style.display;e.style.cssText+="display:block;visibility:hidden";var r=this.element.querySelector("."+this.FILTER);r&&(this.setPosition(r.parentElement,e),e.style.cssText+="display:"+i+";visibility:visible")}},e.prototype.getDefault=function(){var e=[];return this.parent.ensureModuleInjected(Kn)&&(e.push("AutoFitAll"),e.push("AutoFit")),this.parent.allowGrouping&&this.parent.ensureModuleInjected(Jn)&&(e.push("Group"),e.push("Ungroup")),this.parent.allowSorting&&this.parent.ensureModuleInjected(xn)&&(e.push("SortAscending"),e.push("SortDescending")),e.push("ColumnChooser"),this.parent.allowFiltering&&"FilterBar"!==this.parent.filterSettings.type&&this.parent.ensureModuleInjected(_n)&&e.push("Filter"),e},e.prototype.isFilterPopupOpen=function(){var e=this.getFilterPop();return e&&"none"!==e.style.display},e.prototype.getFilterPop=function(){return t.Browser.isDevice&&null!==this.targetColumn&&"Menu"===this.parent.filterSettings.type?document.getElementById(this.targetColumn.uid+"-flmdlg"):this.parent.element.querySelector("."+this.POP)},e.prototype.isFilterItemAdded=function(){return this.parent.columnMenuItems&&this.parent.columnMenuItems.indexOf("Filter")>=0||!this.parent.columnMenuItems},e}(),rs=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ns=function(e){function r(t,i){var r=e.call(this,t,i)||this;return r.parent=t,r.serviceLocator=i,r.initEvent(),r}return rs(r,e),r.prototype.initEvent=function(){this.parent.isDestroyed||(this.parent.on("initForeignKeyColumn",this.initForeignKeyColumns,this),this.parent.on("getForeignKeyData",this.getForeignKeyData,this),this.parent.on("generateQuery",this.generateQueryFormData,this))},r.prototype.initForeignKeyColumns=function(e){for(var r=0;r<e.length;r++)e[r].dataSource=e[r].dataSource instanceof i.DataManager?e[r].dataSource:t.isNullOrUndefined(e[r].dataSource)?new i.DataManager:"result"in e[r].dataSource?e[r].dataSource:new i.DataManager(e[r].dataSource)},r.prototype.eventfPromise=function(e,r,n,o){var s=this.getStateEventArgument(r),l=new i.Deferred,a=new i.Deferred;s.action=e.action;var h=this.parent.getDataModule();return!t.isNullOrUndefined(e.action)&&e.action.requestType&&!1!==h.foreignKeyDataState.isDataChanged?(h.setForeignKeyDataState({isPending:!0,resolver:a.resolve}),a.promise.then(function(){l.resolve(o.dataSource)}),s.setColumnData=this.parent.setForeignKeyData.bind(this.parent),this.parent.trigger("columnDataStateChange",s)):(h.setForeignKeyDataState({}),l.resolve(n)),l},r.prototype.getForeignKeyData=function(e){for(var r=this,n=e.column?[e.column]:this.parent.getForeignKeyColumns(),o=[],s=this,l=0;l<n.length;l++)!function(t){var i=void 0,r=e.isComplex?s.genarateColumnQuery(n[t]):s.genarateQuery(n[t],e.result.result,!1,!0);r.params=s.parent.query.params;var l=n[t].dataSource;i=l&&"result"in l?s.eventfPromise(e,r,l,n[t]).promise:!l.ready||l.dataSource.offline?l.executeQuery(r):l.ready.then(function(){return l.executeQuery(r)}),o.push(i)}(l);Promise.all(o).then(function(r){for(var o=0;o<r.length;o++)n[o].columnData=r[o].result,"dropdownedit"===n[o].editType&&"result"in n[o].dataSource&&(n[o].edit.params=t.extend(n[o].edit.params,{dataSource:r[o].result,query:new i.Query,fields:{value:n[o].foreignKeyField||n[o].field,text:n[o].foreignKeyValue}}));e.promise.resolve(e.result)}).catch(function(t){return r.parent.log(["actionfailure","foreign_key_failure"]),e.promise&&e.promise.reject&&e.promise.reject(t),t})},r.prototype.generateQueryFormData=function(e){e.predicate.predicate=this.genarateQuery(e.column,e.column.columnData,!0)},r.prototype.genarateQuery=function(e,t,r,n){var o=this.parent,s=[],l=new i.Query,a=r?e.foreignKeyField:e.field;if(o.allowPaging||o.enableVirtualization||r){t=new i.DataManager(o.allowGrouping&&o.groupSettings.columns.length&&!r?t.records:t).executeLocal((new i.Query).select(a));var h=i.DataUtil.distinct(t,a,!1);a=r?e.field:e.foreignKeyField;for(var d=0;d<h.length;d++)h[d]&&h[d].getDay?s.push(he({field:a,operator:"equal",value:h[d],matchCase:!1})):s.push(new i.Predicate(a,"equal",h[d],!1))}return n?s.length?l.where(i.Predicate.or(s)):l:s.length?i.Predicate.or(s):{predicates:[]}},r.prototype.genarateColumnQuery=function(e){var t=this.parent,r=new i.Query,n=this.isFiltered(e);if(n.isTrue&&(r=this.filterQuery(r,n.column,!0)),t.searchSettings.key.length){var o=t.searchSettings;e.dataSource instanceof i.DataManager&&e.dataSource.adaptor.getModuleName&&"ODataV4Adaptor"===e.dataSource.adaptor.getModuleName()?r=this.searchQuery(r,e,!0):r.search(o.key,e.foreignKeyValue,o.operator,o.ignoreCase)}return r},r.prototype.isFiltered=function(e){var t=this.parent.filterSettings.columns.filter(function(t){return t.field===e.foreignKeyValue&&t.uid===e.uid});return{column:t,isTrue:!!t.length}},r.prototype.getModuleName=function(){return"foreignKey"},r.prototype.destroy=function(){this.destroyEvent()},r.prototype.destroyEvent=function(){this.parent.isDestroyed||(this.parent.off("initForeignKeyColumn",this.initForeignKeyColumns),this.parent.off("getForeignKeyData",this.getForeignKeyData),this.parent.off("generateQuery",this.generateQueryFormData))},r}(yi),os="https://ej2.syncfusion.com/documentation/grid",ss="https://ej2.syncfusion.com/documentation/",ls="[EJ2Grid.Warning]",as="[EJ2Grid.Error]",hs="[EJ2Grid.Info]",ds=function(){function e(e){this.parent=e,this.parent.on("initial-end",this.patchadaptor,this)}return e.prototype.getModuleName=function(){return"logger"},e.prototype.log=function(e,t){e instanceof Array||(e=[e]);for(var i=e,r=0;r<i.length;r++){var n=cs[i[r]],o=n.check(t,this.parent);o.success&&console[n.logType](n.generateMessage(t,this.parent,o.options))}},e.prototype.patchadaptor=function(){var e=this.parent.getDataModule().dataManager.adaptor,t=e.beforeSend;t&&(e.beforeSend=function(i,r,n){t.call(e,i,r,n)})},e.prototype.destroy=function(){this.parent.isDestroyed||this.parent.off("initial-end",this.patchadaptor)},e}(),cs={module_missing:{type:"module_missing",logType:"warn",check:function(e,t){var i=t.getInjectedModules().map(function(e){return e.prototype.getModuleName()}),r=t.requiredModules().map(function(e){return e.member}).filter(function(e){return-1===i.indexOf(e)});return{success:r.filter(function(e){return"resize"!==e}).length>0,options:r}},generateMessage:function(e,t,i){return i=i.filter(function(e){return"resize"!==e}).reduce(function(e,t){return e+"* "+t+"\n"},""),ls+": MODULES MISSING\nThe following modules are not injected:.\n"+i+"Refer to "+os+"/module.html for documentation on importing feature modules."}},promise_enabled:{type:"promise_enabled",logType:"error",check:function(){return{success:"undefined"==typeof Promise}},generateMessage:function(){return as+": PROMISE UNDEFINED\nPromise object is not present in the global environment,please use polyfil to support Promise object in your environment.\nRefer to "+ss+"/base/browser.html?#required-polyfills for more information."}},primary_column_missing:{type:"primary_column_missing",logType:"warn",check:function(e,t){return{success:0===t.getColumns().filter(function(e){return e.isPrimaryKey}).length}},generateMessage:function(){return ls+": PRIMARY KEY MISSING\nEditing is enabled but primary key column is not specified.\nRefer to "+os+"/api-column.html?#isprimarykey for documentation on providing primary key columns."}},selection_key_missing:{type:"selection_key_missing",logType:"warn",check:function(e,t){return{success:t.selectionSettings.persistSelection&&0===t.getColumns().filter(function(e){return e.isPrimaryKey}).length}},generateMessage:function(){return ls+": PRIMARY KEY MISSING\nselectionSettings.persistSelection property is enabled. It requires one primary key column to persist selection.\nRefer to "+os+"/api-column.html?#isprimarykey for documentation on providing primary key columns."}},actionfailure:{type:"actionfailure",logType:"error",check:function(){return{success:!0}},generateMessage:function(e,t){var i="",r=ps(e,t),n=us(e,t);return i=""!==n?n:""!==r?r:e.error,ls+": "+i}},locale_missing:{type:"locale_missing",logType:"warn",check:function(e,r){var n=i.DataUtil.getObject("locale."+r.locale+".grid",t.L10n);return{success:"en-US"!==r.locale&&t.isNullOrUndefined(n)}},generateMessage:function(e,t){return ls+": LOCALE CONFIG MISSING\nLocale configuration for '"+t.locale+"' is not provided.\nRefer to "+os+"/globalization-and-localization.html?#localization \n for documentation on setting locale configuration."}},limitation:{type:"limitation",logType:"warn",check:function(e,i){var r;switch(e){case"freeze":r={success:i.allowGrouping||!t.isUndefined(i.detailTemplate)||!t.isUndefined(i.childGrid)||!t.isUndefined(i.rowTemplate)||i.enableVirtualization,options:{name:"freeze"}};break;case"virtualization":r={success:!t.isUndefined(i.detailTemplate)||!t.isUndefined(i.childGrid)||0!==i.frozenRows||0!==i.frozenColumns,options:{name:"virtualization"}};break;default:r={success:!1}}return r},generateMessage:function(e,t,i){var r,n=i.name;switch(n){case"freeze":r="Frozen rows and columns do not support the following features:\n* Virtualization\n* Row Template\n* Details Template\n* Hierarchy Grid\n* Grouping";break;case"virtualization":r="Virtualization does not support the following features.\n* Freeze rows and columns.\n* Details Template.\n* Hierarchy Grid.\n";break;default:r=""}return ls+": "+n.toUpperCase()+" LIMITATIONS\n"+r}},check_datasource_columns:{type:"check_datasource_columns",logType:"warn",check:function(e,t){return{success:!(t.columns.length||t.dataSource instanceof i.DataManager||t.dataSource.length)}},generateMessage:function(){return ls+": GRID CONFIG MISSING\ndataSource and columns are not provided in the grid. At least one of either must be provided for grid configuration.\nRefer to "+os+"/columns.html for documentation on configuring the grid data and columns."}},virtual_height:{type:"virtual_height",logType:"error",check:function(e,i){return{success:t.isNullOrUndefined(i.height)||"auto"===i.height}},generateMessage:function(){return as+": GRID HEIGHT MISSING \nheight property is required to use virtualization.\nRefer to "+os+"/virtual.html for documentation on configuring the virtual grid."}},grid_remote_edit:{type:"grid_remote_edit",logType:"error",check:function(e){return{success:Array.isArray(e)||Array.isArray(e.result)}},generateMessage:function(){return as+": RETRUN VALUE MISSING \nRemote service returns invalid data. \nRefer to "+os+"/edit.html for documentation on configuring editing with remote data."}},grid_sort_comparer:{type:"grid_sort_comparer",logType:"warn",check:function(e,t){return{success:t.getDataModule().isRemote()}},generateMessage:function(){return ls+": SORT COMPARER NOT WORKING \nSort comparer will not work with remote data.Refer to "+os+"/sorting/#custom-sort-comparer for documentation on using the sort comparer."}},resize_min_max:{type:"resize_min_max",logType:"info",check:function(e){return{success:e.column.minWidth&&e.column.minWidth>=e.width||e.column.maxWidth&&e.column.maxWidth<=e.width}},generateMessage:function(){return hs+": RESIZING COLUMN REACHED MIN OR MAX \nThe column resizing width is at its min or max."}},action_disabled_column:{type:"action_disabled_column",logType:"info",check:function(e){var i;switch(e.moduleName){case"reorder":i=t.isNullOrUndefined(e.destColumn)?"reordering action is disabled for the "+e.column.headerText+" column":"reordering action is disabled for the "+(e.column.allowReordering?e.destColumn.headerText:e.column.headerText)+" column";break;case"group":i="grouping action is disabled for the "+e.columnName+" column.";break;case"filter":i="filtering action is disabled for the "+e.columnName+" column.";break;case"sort":i="sorting action is disabled for the "+e.columnName+" column."}return{success:!0,options:{fn:i}}},generateMessage:function(e,t,i){return hs+": ACTION DISABLED \n "+i.fn}},exporting_begin:{type:"exporting_begin",logType:"info",check:function(e){return{success:!0,options:{args:e}}},generateMessage:function(e,t,i){return hs+": EXPORTNIG INPROGRESS \n Grid "+i.args+"ing is in progress"}},exporting_complete:{type:"exporting_complete",logType:"info",check:function(e){return{success:!0,options:{args:e}}},generateMessage:function(e,t,i){return hs+": EXPORTNIG COMPLETED \n Grid "+i.args+"ing is complete"}},foreign_key_failure:{type:"foreign_key_failure",logType:"error",check:function(){return{success:!0}},generateMessage:function(){return as+": FOREIGNKEY CONFIG \n Grid foreign key column needs a valid data source/service.Refer to "+os+"/columns/#foreign-key-column for documentation on configuring foreign key columns."}},initial_action:{type:"initial_action",logType:"error",check:function(e){var t;switch(e.moduleName){case"group":t="The "+e.columnName+" column is not available in the grid's column model.Please provide a valid field name to group the column";break;case"filter":t="The "+e.columnName+" column is not available in the grid's column model.Please provide a valid field name to filter the column.";break;case"sort":t="The "+e.columnName+" column is not available in the grid's column model.Please provide a valid field name to sort the column."}return{success:!0,options:{fn:t}}},generateMessage:function(e,t,i){return as+": INITIAL ACTION FAILURE \n "+i.fn}},frozen_rows_columns:{type:"frozen_rows_columns",logType:"error",check:function(e,t){return{success:t.getColumns().length<=t.frozenColumns||t.frozenRows>=t.currentViewData.length}},generateMessage:function(e,t){return as+": OUT OF RANGE ERROR-\n "+(t.getColumns().length<=t.frozenColumns?"FROZEN COLUMNS,":"")+(t.frozenRows>=t.currentViewData.length?"FROZEN ROWS":"")+" invalid"}},column_type_missing:{type:"column_type_missing",logType:"error",check:function(e){return{success:t.isNullOrUndefined(e.column.type),options:e.column.headerText}},generateMessage:function(e,t,i){return as+": COLUMN TYPE MISSING-\n "+i+" column type was invalid or not defined.Please go through below help link: "+ss+"/grid/columns/#column-type"}},datasource_syntax_mismatch:{type:"datasource_syntax_mismatch",logType:"warn",check:function(e){return{success:e.dataState.dataSource&&!(e.dataState.dataSource instanceof i.DataManager||"result"in e.dataState.dataSource||e.dataState.dataSource instanceof Array)&&!t.isNullOrUndefined(e.dataState.dataStateChange)}},generateMessage:function(){return ls+": DATASOURCE SYNTAX WARNING\nDataSource should be in the form of {result: Object[], count: number}when dataStateChangeEvent used"}}},ps=function(e){var t=e.error;return t.indexOf&&0!==t.indexOf("Format options")?"":"INVALID FORMAT\nFor more information, refer to the following documentation links:\nNumber format: "+ss+"/base/intl.html?#supported-format-string.\nDate format: "+ss+"/base/intl.html?#manipulating-datetime.\nMessage: "+t},us=function(e){var r=i.DataUtil.getObject("error.error",e);if(t.isNullOrUndefined(r))return"";var n="";try{n=JSON.parse(r.responseText)}catch(e){n=""}return"XMLHTTPREQUEST FAILED\nUrl: "+r.responseURL+"\nStatus: "+r.status+" - "+r.statusText+"\n"+(""!==n?"Message: "+n:"")},gs=function(){function e(e,t){this.infiniteCache={},this.infiniteCurrentViewData={},this.infiniteFrozenCache={},this.isDownScroll=!1,this.isUpScroll=!1,this.isScroll=!0,this.enableContinuousScroll=!1,this.initialRender=!0,this.isRemove=!1,this.isInitialCollapse=!1,this.prevScrollTop=0,this.actions=["filtering","searching","grouping","ungrouping","reorder","sorting"],this.keys=["downArrow","upArrow","PageUp","PageDown"],this.rowTop=0,this.isInitialMovableRender=!0,this.virtualInfiniteData={},this.isCancel=!1,this.emptyRowData={},this.isNormaledit=!1,this.isInfiniteScroll=!1,this.isLastPage=!1,this.isInitialRender=!0,this.parent=e,this.serviceLocator=t,this.isNormaledit="Normal"===this.parent.editSettings.mode,this.addEventListener(),this.widthService=t.getService("widthService"),this.rowModelGenerator=this.parent.isFrozenGrid()?new Go(this.parent):new Gi(this.parent)}return e.prototype.getModuleName=function(){return"infiniteScroll"},e.prototype.addEventListener=function(){this.parent.on(kt,this.onDataReady,this),this.parent.on(Zt,this.dataSourceModified,this),this.parent.on("infinite-page-query",this.infinitePageQuery,this),this.parent.on("infinite-scroll-handler",this.infiniteScrollHandler,this),this.parent.on(jt,this.infiniteCellFocus,this),this.parent.on("append-infinite-content",this.appendInfiniteRows,this),this.parent.on("remove-infinite-rows",this.removeInfiniteCacheRows,this),this.parent.on("reset-infinite-blocks",this.resetInfiniteBlocks,this),this.parent.on("set-infinite-cache",this.setCache,this),this.parent.on("initial-collapse",this.ensureIntialCollapse,this),this.parent.on(Vt,this.infiniteCellFocus,this),this.parent.on("infinite-show-hide",this.setDisplayNone,this),this.parent.on("virtual-scroll-edit-action-begin",this.editActionBegin,this),this.parent.on(pi,this.getVirtualInfiniteData,this),this.parent.on("edit-reset",this.resetInfiniteEdit,this),this.parent.on("virtual-scroll-edit-success",this.infiniteEditSuccess,this),this.parent.on("refresh-virtual-cache",this.refreshInfiniteCache,this),this.parent.on("infinite-edit-handler",this.infiniteEditHandler,this),this.parent.on("virtual-scroll-add-action-begin",this.infiniteAddActionBegin,this),this.parent.on(Lt,this.modelChanged,this),this.parent.on("refresh-infinite-current-view-data",this.refreshInfiniteCurrentViewData,this),this.actionBeginFunction=this.actionBegin.bind(this),this.actionCompleteFunction=this.actionComplete.bind(this),this.parent.on("delete-complete",this.deleteComplate,this),this.parent.addEventListener(bt,this.actionBeginFunction),this.parent.addEventListener(St,this.actionCompleteFunction)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(kt,this.onDataReady),this.parent.off(Zt,this.dataSourceModified),this.parent.off("infinite-page-query",this.infinitePageQuery),this.parent.off("infinite-scroll-handler",this.infiniteScrollHandler),this.parent.off(jt,this.infiniteCellFocus),this.parent.off("append-infinite-content",this.appendInfiniteRows),this.parent.off("remove-infinite-rows",this.removeInfiniteCacheRows),this.parent.off("reset-infinite-blocks",this.resetInfiniteBlocks),this.parent.off("set-infinite-cache",this.setCache),this.parent.off("initial-collapse",this.ensureIntialCollapse),this.parent.off(Vt,this.infiniteCellFocus),this.parent.off("infinite-show-hide",this.setDisplayNone),this.parent.off("virtual-scroll-edit-action-begin",this.editActionBegin),this.parent.off(pi,this.getVirtualInfiniteData),this.parent.off("edit-reset",this.resetInfiniteEdit),this.parent.off("virtual-scroll-edit-success",this.infiniteEditSuccess),this.parent.off("refresh-virtual-cache",this.refreshInfiniteCache),this.parent.off("infinite-edit-handler",this.infiniteEditHandler),this.parent.off("virtual-scroll-add-action-begin",this.infiniteAddActionBegin),this.parent.off(Lt,this.modelChanged),this.parent.off("refresh-infinite-current-view-data",this.refreshInfiniteCurrentViewData),this.parent.removeEventListener(bt,this.actionBeginFunction),this.parent.removeEventListener(St,this.actionCompleteFunction))},e.prototype.updateCurrentViewData=function(){var e=this.parent;if(!e.groupSettings.columns.length){var t=Object.keys(this.infiniteCurrentViewData);e.currentViewData=[];for(var i=e.pageSettings.currentPage,r=e.infiniteScrollSettings.enableCache,n=e.infiniteScrollSettings.maxBlocks,o=r&&(i>n||this.isUpScroll&&i>1),s=o?this.isUpScroll?i:i-n+1:1,l=o?s+n-1:r?n:t.length,a=s;a<=l;a++)this.infiniteCurrentViewData[a]&&(e.currentViewData=e.currentViewData.concat(this.infiniteCurrentViewData[a]))}},e.prototype.refreshInfiniteCurrentViewData=function(e){var t=this.parent.pageSettings.currentPage,i=this.parent.pageSettings.pageSize,r=this.parent.infiniteScrollSettings.initialBlocks,n=Object.keys(this.infiniteCurrentViewData),o=this.parent.infiniteScrollSettings.enableCache;if(!this.parent.groupSettings.columns.length){var s="save"===e.args.requestType,l="delete"===e.args.requestType;o||!s&&!l?r>1&&e.data.length===r*i?this.setInitialCache(e.data.slice(),{},o&&"delete"===e.args.requestType,!0):this.infiniteCurrentViewData[t]=e.data.slice():s?this.infiniteCurrentViewData[1]=e.data.concat(this.infiniteCurrentViewData[1]):this.infiniteCurrentViewData[n[n.length-1]].push(e.data[0])}},e.prototype.deleteComplate=function(){this.parent.isFrozenGrid()&&!this.parent.infiniteScrollSettings.enableCache&&this.parent.contentModule.refreshScrollOffset()},e.prototype.modelChanged=function(e){var t=this.parent.getRows();if(t.length&&"infiniteScroll"!==e.requestType&&("delete"===e.requestType||"add"===this.requestType)){if(this.firstIndex=parseInt(t[0].getAttribute(Hi),10),this.firstBlock=Math.ceil((this.firstIndex+1)/this.parent.pageSettings.pageSize),this.lastIndex=parseInt(t[t.length-1].getAttribute(Hi),10),"delete"===e.requestType){var i=this.parent.getRowsObject();e.startIndex=this.parent.infiniteScrollSettings.enableCache?(this.firstBlock-1)*this.parent.pageSettings.pageSize:i[i.length-1].index}else e.startIndex=this.firstIndex;this.parent.infiniteScrollSettings.enableCache||this.parent.pageSettings.currentPage!==this.maxPage||"delete"!==e.requestType||(this.isLastPage=!0,this.lastIndex=this.lastIndex-1)}},e.prototype.infiniteAddActionBegin=function(e){this.isNormaledit&&(this.isAdd=!0,this.parent.infiniteScrollSettings.enableCache&&(Object.keys(this.emptyRowData).length||this.createEmptyRowdata(),this.parent.pageSettings.currentPage>1&&(e.startEdit=!1,this.resetInfiniteBlocks({},!0),this.makeRequest({currentPage:1}))))},e.prototype.infiniteEditHandler=function(e){if(!this.parent.infiniteScrollSettings.enableCache&&("delete"===e.e.requestType||"save"===e.e.requestType&&"add"===this.requestType)){var i=this.parent.isFrozenGrid(),r=this.parent.getRows(),n=this.parent.getRowsObject();if(this.ensureRowAvailability(n,e.result[0])){if(r.length&&(this.resetRowIndex(n,e.e,r,"add"===this.requestType,!0),i)){var o=this.parent.getMovableRowsObject();if(this.resetRowIndex(o,e.e,this.parent.getMovableDataRows(),"add"===this.requestType),this.parent.getFrozenMode()===Pi){var s=this.parent.getFrozenRightRowsObject();this.resetRowIndex(s,e.e,this.parent.getFrozenRightRows(),"add"===this.requestType)}}if(this.isLastPage){if(this.isLastPage=!1,this.parent.pageSettings.currentPage=this.maxPage,this.parent.selectionModule.index<this.parent.frozenRows){if(t.remove(r[this.parent.frozenRows-1]),this.createRow([n[this.parent.frozenRows-1]],e,!1,!0),i){var l=this.parent.getMovableDataRows();if(t.remove(l[this.parent.frozenRows]),this.createRow([this.parent.getMovableRowsObject()[this.parent.frozenRows-1]],e,!0,!0),this.parent.getFrozenMode()===Pi){var a=this.parent.getFrozenRightDataRows();t.remove(a[this.parent.frozenRows]),this.createRow([this.parent.getFrozenRightRowsObject()[this.parent.frozenRows-1]],e,!1,!0,!0)}}ke(this.parent)}}else this.createRow(n,e)}this.parent.hideSpinner(),"delete"===this.requestType?this.parent.notify("delete-complete",e.e):this.parent.notify("save-complete",e.e)}this.parent.notify(oi,{case:"refreshHeight"})},e.prototype.createRow=function(e,i,r,n,o){var s,l=n?e:this.generateRows(i.result,i.e),a=new Vi(this.serviceLocator,null,this.parent);s=o?this.parent.element.querySelector(".e-frozen-right-content").querySelector(Ui):this.parent.isFrozenGrid()?r?this.parent.getMovableVirtualContent().querySelector(Ui):this.parent.getFrozenVirtualContent().querySelector(Ui):this.parent.getContent().querySelector(Ui),this.parent.frozenRows&&(s=n&&"add"!==this.requestType||!n&&"add"===this.requestType?this.parent.isFrozenGrid()?r?this.parent.getMovableVirtualHeader().querySelector(Ui):o?this.parent.element.querySelector(".e-frozen-right-header").querySelector(Ui):this.parent.getFrozenVirtualHeader().querySelector(Ui):this.parent.getHeaderContent().querySelector(Ui):s);var h={rows:e,cancel:!1,args:i,isMovable:r,isFrozenRows:n,isFrozenRight:n,row:l};if(this.parent.notify("infinite-crud-cancel",h),!h.cancel)for(var d=l.length-1;d>=0;d--)"delete"===this.requestType?s.appendChild(a.render(l[d],this.parent.getColumns())):s.insertBefore(a.render(l[d],this.parent.getColumns()),s.firstElementChild);if(!n&&this.parent.frozenRows&&(this.parent.selectionModule.index<this.parent.frozenRows||"add"===this.requestType)){var c=r?this.parent.getMovableDataRows():o?this.parent.getFrozenRightDataRows():this.parent.getRows(),p=(r||o)&&"add"===this.requestType?this.parent.frozenRows:this.parent.frozenRows-1;t.remove(c[p]),this.createRow([e[this.parent.frozenRows-1]],i,r,!0,o)}this.parent.infiniteScrollSettings.enableCache||n||(o?(ke(this.parent),this.parent.contentModule.rightFreezeRows="add"===this.requestType?l.concat(e):e.concat(l)):!this.parent.isFrozenGrid()||r?(ke(this.parent),this.parent.contentModule.visibleRows="add"===this.requestType?l.concat(e):e.concat(l),this.parent.getFrozenMode()===Pi&&this.createRow(this.parent.getFrozenRightRowsObject(),i,!1,!1,!0)):(this.parent.contentModule.visibleFrozenRows="add"===this.requestType?l.concat(e):e.concat(l),this.createRow(this.parent.getMovableRowsObject(),i,!0)))},e.prototype.ensureRowAvailability=function(e,t){var i=!0;if(this.parent.frozenRows&&!this.parent.infiniteScrollSettings.enableCache&&this.parent.sortSettings.columns&&"add"===this.requestType)for(var r=this.parent.getPrimaryKeyFieldNames()[0],n=0;n<e.length;n++)if(e[n].data[r]===t[r]){i=!1;break}return i},e.prototype.generateRows=function(e,t){return this.rowModelGenerator.generateRows(e,t)},e.prototype.resetRowIndex=function(e,i,r,n,o){var s=this,l=this.parent.getPrimaryKeyFieldNames()[0],a=!(r.length%this.parent.pageSettings.pageSize);n?a&&(o&&!this.parent.groupSettings.columns.length&&this.swapCurrentViewData(1,!0),t.remove(r[e.length-1]),r.splice(e.length-1,1),e.splice(e.length-1,1)):e.filter(function(n,a){if(n.data[l]===i.data[0][l]){if(o&&!s.parent.groupSettings.columns.length){var h=Math.ceil((a+1)/s.parent.pageSettings.pageSize);s.resetInfiniteCurrentViewData(h,a)}e.splice(a,1),t.remove(r[a]),r.splice(a,1)}});var h=n?1:0;Me(this.parent,e,r,h)},e.prototype.resetInfiniteCurrentViewData=function(e,t){t-=(e-1)*this.parent.pageSettings.pageSize,this.infiniteCurrentViewData[e].splice(t,1),this.swapCurrentViewData(e,!1)},e.prototype.swapCurrentViewData=function(e,t){for(var i=Object.keys(this.infiniteCurrentViewData),r=t?i.length+1:i.length,n=e;n<r;n++)if(this.infiniteCurrentViewData[n+1]){var o=t?n:n+1,s=t?this.infiniteCurrentViewData[n].length-1:0,l=this.infiniteCurrentViewData[o].splice(s,1);t?(this.infiniteCurrentViewData[n+1]=l.concat(this.infiniteCurrentViewData[n+1]),n+1===r-1&&this.infiniteCurrentViewData[n+1].splice(this.infiniteCurrentViewData[n+1].length-1,1)):this.infiniteCurrentViewData[n].push(l[0])}this.updateCurrentViewData()},e.prototype.setDisplayNone=function(e){if(this.parent.infiniteScrollSettings.enableCache){for(var t=this.parent.isFrozenGrid(),i=t?Object.keys(this.infiniteFrozenCache):Object.keys(this.infiniteCache),r=1;r<=i.length;r++)(t?e.isFreeze?this.infiniteFrozenCache[r][0]:this.infiniteFrozenCache[r][1]:this.infiniteCache[r]).filter(function(t){t.cells[e.index].visible=""===e.visible});this.resetContentModuleCache(t?this.infiniteFrozenCache:this.infiniteCache)}},e.prototype.refreshInfiniteCache=function(e){this.getEditedRowObject().data=e},e.prototype.getEditedRowObject=function(){for(var e,t=this.parent.getRowsObject(),i=0;i<t.length;i++)t[i].index===this.editRowIndex&&(e=t[i]);return e},e.prototype.infiniteEditSuccess=function(e){this.isNormaledit&&(!this.isAdd&&e.data&&this.updateCurrentViewRecords(e.data),this.isAdd=!1)},e.prototype.updateCurrentViewRecords=function(e){var i=Ie(this.parent,e);t.isNullOrUndefined(i)||(this.parent.getCurrentViewRecords()[i]=e)},e.prototype.actionBegin=function(e){"add"===e.requestType||"delete"===e.requestType?this.requestType=e.requestType:"add"===e.action&&"save"===e.requestType&&(this.requestType=e.action),(this.parent.isFrozenGrid()&&!e.cancel&&"searching"===e.requestType||"sorting"===e.requestType||"filtering"===e.requestType)&&(this.isInitialRender=!0)},e.prototype.actionComplete=function(e){"delete"!==e.requestType&&"save"!==e.requestType&&"cancel"!==e.requestType||(this.requestType=this.empty,this.isCancel="cancel"===e.requestType||"save"===e.requestType,this.isAdd=this.isEdit=!1,this.isNormaledit&&(this.editRowIndex=this.empty,this.virtualInfiniteData={},this.parent.editModule.previousVirtualData={}))},e.prototype.resetInfiniteEdit=function(){this.parent.enableInfiniteScrolling&&this.isNormaledit&&(this.parent.editSettings.allowEditing&&this.isEdit||this.parent.editSettings.allowAdding&&this.isAdd)&&(this.parent.isEdit=!0)},e.prototype.getVirtualInfiniteData=function(e){e.virtualData=this.virtualInfiniteData,e.isAdd=this.isAdd,e.isCancel=this.isCancel},e.prototype.editActionBegin=function(e){this.isEdit=!0,this.editRowIndex=e.index;var i=t.extend({},this.getEditedRowObject().data);e.data=Object.keys(this.virtualInfiniteData).length?this.virtualInfiniteData:i},e.prototype.dataSourceModified=function(){this.resetInfiniteBlocks({requestType:this.empty},!0)},e.prototype.onDataReady=function(e){t.isNullOrUndefined(e.count)||(this.maxPage=Math.ceil(e.count/this.parent.pageSettings.pageSize))},e.prototype.ensureIntialCollapse=function(e){this.isInitialCollapse=!e},e.prototype.infiniteScrollHandler=function(e){this.restoreInfiniteEdit(),this.restoreInfiniteAdd();var i=e.target;if(i.classList.contains(Di)&&this.parent.enableInfiniteScrolling&&!e.isLeft){var r=this.parent.getContent().firstElementChild;this.prevScrollTop=r.scrollTop;var n=this.parent.getRows(),o=parseInt(n[n.length-1].getAttribute(Hi),10)+1,s=this.parent.pageSettings.currentPage,l=void 0,a=i.scrollHeight-i.scrollTop,h=Math.round(i.scrollHeight-i.scrollTop),d=(a<i.clientHeight?Math.ceil(a):Math.floor(a))===i.clientHeight||h===i.clientHeight;if(this.isScroll&&d&&(this.parent.pageSettings.currentPage<=this.maxPage-1||this.enableContinuousScroll)){this.parent.infiniteScrollSettings.enableCache&&(this.isUpScroll=!1,this.isDownScroll=!0);var c=[].slice.call(r.querySelectorAll(".e-row:not(.e-addedrow)")),p=c[c.length-1],u=parseInt(p.getAttribute(Hi),10);this.parent.pageSettings.currentPage=Math.ceil(u/this.parent.pageSettings.pageSize)+1,l={requestType:"infiniteScroll",currentPage:this.parent.pageSettings.currentPage,prevPage:s,startIndex:o,direction:"down"},this.makeRequest(l)}if(this.isScroll&&this.parent.infiniteScrollSettings.enableCache&&0===i.scrollTop&&1!==this.parent.pageSettings.currentPage){this.parent.infiniteScrollSettings.enableCache&&(this.isDownScroll=!1,this.isUpScroll=!0);var p=[].slice.call(r.getElementsByClassName(Oi)),u=parseInt(p[this.parent.pageSettings.pageSize-1].getAttribute(Hi),10),g=parseInt(p[0].getAttribute(Hi),10)-this.parent.pageSettings.pageSize;this.parent.pageSettings.currentPage=Math.ceil(u/this.parent.pageSettings.pageSize)-1,this.parent.pageSettings.currentPage&&(l={requestType:"infiniteScroll",currentPage:this.parent.pageSettings.currentPage,prevPage:s,startIndex:g,direction:"up"},this.makeRequest(l))}this.parent.infiniteScrollSettings.enableCache&&!this.isScroll&&t.isNullOrUndefined(l)&&(this.isDownScroll||this.isUpScroll)&&(r.scrollTop=this.top)}},e.prototype.makeRequest=function(e){var i=this;this.parent.pageSettings.currentPage!==e.prevPage&&(this.parent.pageSettings.currentPage<=this.maxPage?(this.isInfiniteScroll=!0,t.isNullOrUndefined(this.infiniteCache[e.currentPage])?setTimeout(function(){i.getVirtualInfiniteEditedData(),i.parent.notify("model-changed",e)},100):setTimeout(function(){i.getVirtualInfiniteEditedData(),i.parent.notify(ui,e)},100)):this.parent.pageSettings.currentPage=this.maxPage)},e.prototype.infinitePageQuery=function(e){this.initialRender?(this.initialRender=!1,this.intialPageQuery(e)):this.isInfiniteScroll||"delete"!==this.requestType&&"add"!==this.requestType?e.page(this.parent.pageSettings.currentPage,this.parent.pageSettings.pageSize):this.editPageQuery(e)},e.prototype.editPageQuery=function(e){var t=this.parent.infiniteScrollSettings.initialBlocks;if(this.parent.infiniteScrollSettings.enableCache)this.infiniteCache={},this.infiniteFrozenCache={},this.infiniteCurrentViewData={},e.skip(this.firstIndex),e.take(t*this.parent.pageSettings.pageSize);else{"Dialog"===this.parent.editSettings.mode&&this.parent.clearSelection();var i="delete"===this.requestType?this.lastIndex:this.firstIndex;e.skip(i),e.take(1)}},e.prototype.intialPageQuery=function(e){this.parent.infiniteScrollSettings.enableCache&&this.parent.infiniteScrollSettings.initialBlocks>this.parent.infiniteScrollSettings.maxBlocks&&(this.parent.infiniteScrollSettings.initialBlocks=this.parent.infiniteScrollSettings.maxBlocks);var t=this.parent.pageSettings.pageSize*this.parent.infiniteScrollSettings.initialBlocks;e.page(1,t)},e.prototype.infiniteCellFocus=function(e){if(!e.byKey||"upArrow"!==e.keyArgs.action&&"downArrow"!==e.keyArgs.action)"PageDown"!==e.key&&"PageUp"!==e.key||(this.pressedKey=e.key);else{this.pressedKey=e.keyArgs.action;var t=document.activeElement,i=parseInt(t.parentElement.getAttribute(Hi),10),r=this.parent.getContent().firstElementChild;this.rowIndex="downArrow"===e.keyArgs.action?i+1:i-1,this.cellIndex=parseInt(t.getAttribute(qi),10);var n=this.parent.getRowByIndex(i),o=Math.floor(r.offsetHeight/this.parent.getRowHeight());if(!n||xe(n,this.parent)||Fe(n,this.rowTop)){var s=n?n.getBoundingClientRect().height:this.parent.getRowHeight();if(!this.parent.infiniteScrollSettings.enableCache){if("downArrow"===e.keyArgs.action&&(xe(n,this.parent)||!n)){var l=(this.rowIndex-o)*s,a=r.scrollTop+this.parent.getRowHeight();r.scrollTop=l<a?a:l}"upArrow"===e.keyArgs.action&&Fe(n,this.rowTop)&&(r.scrollTop=this.rowIndex*s)}}else this.pressedKey=this.empty}},e.prototype.createEmptyRowdata=function(){var e=this;this.parent.getColumns().filter(function(t){e.emptyRowData[t.field]=e.empty})},e.prototype.getVirtualInfiniteEditedData=function(){var e=this.parent.element.querySelector("."+Ai),i=this.parent.element.querySelector("."+Bi),r=this.parent.element.querySelector(".e-gridform");if(this.parent.infiniteScrollSettings.enableCache&&(e||i)){var n=e?t.extend({},this.getEditedRowObject().data):t.extend({},this.emptyRowData);this.virtualInfiniteData=this.parent.editModule.getCurrentEditedData(r,n),this.parent.isFrozenGrid()&&(this.virtualInfiniteData=this.parent.editModule.getCurrentEditedData(this.parent.getMovableVirtualContent().querySelector(".e-gridform"),n))}},e.prototype.restoreInfiniteEdit=function(){var e=this.parent.getContent().firstElementChild,i=!this.parent.frozenRows||this.editRowIndex>=this.parent.frozenRows;if(this.isNormaledit&&this.parent.infiniteScrollSettings.enableCache&&i&&this.parent.editSettings.allowEditing&&!t.isNullOrUndefined(this.editRowIndex)){var r=this.parent.getRowByIndex(this.editRowIndex);if(Object.keys(this.virtualInfiniteData).length&&r&&!this.parent.getContent().querySelector("."+Ai)){var n=r.getBoundingClientRect().top;n<e.offsetHeight&&n>this.parent.getRowHeight()&&(this.parent.isEdit=!1,this.parent.editModule.startEdit(r))}}},e.prototype.restoreInfiniteAdd=function(){var e=this.parent.getContent().firstElementChild;this.parent.getCurrentViewRecords().length&&this.parent.getRowByIndex(0)&&this.isNormaledit&&this.parent.infiniteScrollSettings.enableCache&&this.isAdd&&!e.querySelector("."+Bi)&&e.scrollTop<this.parent.getRowHeight()&&(this.parent.isEdit=!1,this.parent.addRecord())},e.prototype.appendInfiniteRows=function(e){var t=this.parent.isFrozenGrid(),i=this.parent.getContent().firstElementChild,r=this.parent.enableInfiniteScrolling&&"infiniteScroll"===e.args.requestType,n=this.parent.getFrozenMode()===Pi&&"movable"===e.tableName;if((!r||e.args.isFrozen||n)&&r||(r&&"up"===e.args.direction?e.tbody.insertBefore(e.frag,e.tbody.firstElementChild):e.tbody.appendChild(e.frag)),t)if(r)if(e.tableName===Li||"Right"===this.parent.getFrozenMode()&&e.tableName===Ni)this.frozenFrag=e.frag;else if(this.parent.getFrozenMode()===Pi&&"movable"===e.tableName)this.movableFrag=e.frag;else{var o=this.parent.getFrozenVirtualContent().querySelector(Ui);"up"===e.args.direction?o.insertBefore(this.frozenFrag,o.firstElementChild):o.appendChild(this.frozenFrag),e.tableName===Ni?(this.parent.getMovableVirtualContent().querySelector(Ui).appendChild(this.movableFrag),this.parent.element.querySelector(".e-frozen-right-content").querySelector(Ui).appendChild(e.frag)):this.parent.getMovableVirtualContent().querySelector("."+Mi).appendChild(e.tbody),this.parent.contentModule.refreshScrollOffset(),this.updateCurrentViewData()}else{var s=void 0;e.tableName===Li?s=this.parent.getFrozenVirtualContent().querySelector("."+Mi):"movable"===e.tableName?(s=this.parent.getMovableVirtualContent().querySelector("."+Mi),this.parent.getFrozenMode()!==Pi&&(this.parent.contentModule.refreshScrollOffset(),this.updateCurrentViewData())):(s=this.parent.element.querySelector(".e-frozen-right-content").querySelector("."+Mi),this.parent.getFrozenMode()===Pi&&(this.parent.contentModule.refreshScrollOffset(),this.updateCurrentViewData())),s.appendChild(e.tbody),this.widthService.refreshFrozenScrollbar()}else this.parent.contentModule.getTable().appendChild(e.tbody),this.updateCurrentViewData();this.isInitialRender&&!e.args.isFrozen&&(this.isInitialRender=!1,this.parent.scrollModule.setHeight()),e.args.isFrozen||(this.rowTop=this.rowTop?this.rowTop:this.parent.getRows()[0].getBoundingClientRect().top,r&&(this.parent.infiniteScrollSettings.enableCache&&this.isRemove&&(i.scrollTop=this.top),ke(this.parent),this.selectNewRow(e.tbody,e.args.startIndex),this.pressedKey=void 0),this.restoreInfiniteAdd(),this.isScroll=!0),this.isInfiniteScroll=!1},e.prototype.selectNewRow=function(e,t){var i=this,r=this.parent.getRowByIndex(this.rowIndex);if(this.keys.some(function(e){return e===i.pressedKey})){if(("downArrow"===this.pressedKey||this.parent.infiniteScrollSettings.enableCache&&"upArrow"===this.pressedKey)&&setTimeout(function(){r.cells[0].focus({preventScroll:!0}),i.parent.selectRow(i.rowIndex),i.parent.getContent().firstElementChild.scrollTop+=i.parent.getRowHeight()},0),"PageDown"===this.pressedKey){var n=this.parent.getRowByIndex(t);n&&n.cells[0].focus()}"PageUp"===this.pressedKey&&e.querySelector("."+Oi).cells[0].focus()}},e.prototype.removeInfiniteCacheRows=function(e){var t=this.parent.enableInfiniteScrolling&&"infiniteScroll"===e.args.requestType;if(!e.args.isFrozen&&t&&this.parent.infiniteScrollSettings.enableCache&&this.isRemove){var i=[].slice.call(this.parent.getContentTable().getElementsByClassName(Oi));if("down"===e.args.direction){if(this.parent.allowGrouping&&this.parent.groupSettings.columns.length){n=[].slice.call(this.parent.getContentTable().querySelectorAll("tr"));this.removeCaptionRows(n,e.args)}var r=this.parent.element.querySelector("."+Bi)?0:1;this.removeTopRows(i,this.parent.pageSettings.pageSize-r)}if("up"===e.args.direction)if(this.parent.allowGrouping&&this.parent.groupSettings.columns.length){var n=[].slice.call(this.parent.getContentTable().querySelectorAll("tr"));this.removeCaptionRows(n,e.args)}else this.removeBottomRows(i,i.length-1,e.args);this.isScroll=!1,this.top=this.calculateScrollTop(e.args)}},e.prototype.calculateScrollTop=function(e){var i=0,r=this.parent.getContent().firstElementChild;if("down"===e.direction){this.parent.allowGrouping&&this.parent.groupSettings.columns.length&&!this.isInitialCollapse&&(i=this.captionRowHeight());var n=[].slice.call(this.parent.getContent().firstElementChild.querySelectorAll("tr:not(.e-row)")),o=0;this.isInitialCollapse&&!t.isNullOrUndefined(n)&&(o=Math.round((n.length-1)/this.parent.groupSettings.columns.length));for(var s=o||this.parent.pageSettings.pageSize*(this.parent.infiniteScrollSettings.maxBlocks-1),l=0,a=0;l<r.clientHeight;)l=++a*this.parent.getRowHeight();i+=(s-(a-=1))*this.parent.getRowHeight()}if("up"===e.direction)if(this.parent.allowGrouping&&this.parent.groupSettings.columns.length&&!this.isInitialCollapse)i=this.infiniteCache[this.parent.pageSettings.currentPage].length*this.parent.getRowHeight();else if(this.isInitialCollapse){for(var h=this.infiniteCache[this.parent.pageSettings.currentPage],d=0,a=0;a<h.length;a++)h[a].isCaptionRow&&d++;i+=Math.round(d/this.parent.groupSettings.columns.length)*this.parent.getRowHeight()}else i+=this.parent.pageSettings.pageSize*this.parent.getRowHeight()+j();return i},e.prototype.captionRowHeight=function(){return[].slice.call(this.parent.getContent().querySelectorAll("tr:not(.e-row)")).length*this.parent.getRowHeight()},e.prototype.removeTopRows=function(e,i){for(var r=this.parent.isFrozenGrid(),n=this.parent.getFrozenMode()===Pi?[].slice.call(this.parent.element.querySelector(".e-frozen-right-content").getElementsByClassName(Oi)):null,o=r?[].slice.call(this.parent.getMovableVirtualContent().getElementsByClassName(Oi)):null,s=0;s<=i;s++)this.parent.frozenRows&&this.parent.pageSettings.currentPage===this.parent.infiniteScrollSettings.maxBlocks+1&&s>i-this.parent.frozenRows||(t.remove(e[s]),o&&t.remove(o[s]),n&&t.remove(n[s]))},e.prototype.removeBottomRows=function(e,i,r){var n=0,o=this.parent.isFrozenGrid(),s=o?[].slice.call(this.parent.getMovableVirtualContent().getElementsByClassName(Oi)):null,l=this.parent.getFrozenMode()===Pi?[].slice.call(this.parent.element.querySelector(".e-frozen-right-content").getElementsByClassName(Oi)):null,a=this.parent.pageSettings.pageSize;!o&&this.infiniteCache[r.prevPage].length<a&&(n=this.parent.pageSettings.pageSize-this.infiniteCache[r.prevPage].length),o&&this.infiniteFrozenCache[r.prevPage][1].length<a&&(n=this.parent.pageSettings.pageSize-this.infiniteFrozenCache[r.prevPage][1].length);for(var h=i;n<a;h--)n++,t.remove(e[h]),s&&t.remove(s[h]),l&&t.remove(l[h])},e.prototype.removeCaptionRows=function(e,i){if("down"===i.direction)for(var r=this.parent.getRows()[this.parent.pageSettings.pageSize],n=parseInt(r.getAttribute(Hi),10)-1,o=0,s=0;o<n;s++)e[s].classList.contains(Oi)?o=parseInt(e[s].getAttribute(Hi),10):t.remove(e[s]);if("up"===i.direction){for(var l=[].slice.call(this.parent.getContent().getElementsByClassName(Oi)),a=parseInt(l[l.length-1].getAttribute(Hi),10),h=Math.ceil(a/this.parent.pageSettings.pageSize),d=0,s=this.parent.pageSettings.currentPage+1;s<h;s++)d+=this.infiniteCache[s].length;for(s=d;s<e.length;s++)t.remove(e[s])}},e.prototype.resetInfiniteBlocks=function(e,i){var r=this.parent.enableInfiniteScrolling&&"infiniteScroll"!==e.requestType;if(!this.initialRender&&!t.isNullOrUndefined(this.parent.infiniteScrollModule)&&r&&(this.actions.some(function(t){return t===e.requestType})||i)){var n=this.parent.getContent().firstElementChild;this.initialRender=!0,n.scrollTop=0,this.parent.pageSettings.currentPage=1,this.infiniteCache=this.infiniteFrozenCache={},this.infiniteCurrentViewData={},this.resetContentModuleCache({}),this.isRemove=!1,this.top=0,this.isInitialMovableRender=!0,this.isInitialCollapse=!1,this.parent.contentModule.isRemove=this.isRemove,this.parent.contentModule.isAddRows=this.isRemove,this.parent.contentModule.visibleRows=[],this.parent.contentModule.visibleFrozenRows=[]}},e.prototype.setCache=function(e){if(this.parent.enableInfiniteScrolling&&this.parent.infiniteScrollSettings.enableCache){var i=this.parent.isFrozenGrid(),r=e.args.isFrozen?1:0,n="infiniteScroll"!==e.args.requestType&&("delete"===this.requestType||"add"===this.requestType),o=this.parent.pageSettings.currentPage;(i&&this.isInitialMovableRender||!i&&!Object.keys(this.infiniteCache).length||n)&&(this.isInitialMovableRender=!e.args.isFrozen,this.setInitialCache(e.modelData,e.args,n)),!i&&t.isNullOrUndefined(this.infiniteCache[this.parent.pageSettings.currentPage])&&(this.infiniteCache[this.parent.pageSettings.currentPage]=e.modelData,this.resetContentModuleCache(this.infiniteCache)),i&&(0===r&&t.isNullOrUndefined(this.infiniteFrozenCache[o])||!this.infiniteFrozenCache[o][r].length)&&(this.createFrozenCache(o),this.infiniteFrozenCache[o][r]=e.modelData,1===r&&this.resetContentModuleCache(this.infiniteFrozenCache)),e.isInfiniteScroll&&!this.isRemove&&(this.isRemove=(o-1)%this.parent.infiniteScrollSettings.maxBlocks==0,this.parent.contentModule.isRemove=this.isRemove)}},e.prototype.setInitialCache=function(e,t,i,r){for(var n=this.parent.isFrozenGrid(),o=t.isFrozen?1:0,s=i?this.firstBlock:1,l=1;l<=this.parent.infiniteScrollSettings.initialBlocks;l++){var a=(l-1)*this.parent.pageSettings.pageSize,h=l*this.parent.pageSettings.pageSize;this.parent.allowGrouping&&this.parent.groupSettings.columns.length&&!r?this.setInitialGroupCache(e,s,a,h):r?this.infiniteCurrentViewData[s]=e.slice(a,h):n?(this.createFrozenCache(s),this.infiniteFrozenCache[s][o]=e.slice(a,h),this.resetContentModuleCache(this.infiniteFrozenCache)):(this.infiniteCache[s]=e.slice(a,h),this.resetContentModuleCache(this.infiniteCache)),s++}},e.prototype.createFrozenCache=function(e){this.infiniteFrozenCache[e]||(this.infiniteFrozenCache[e]=[[],[]])},e.prototype.setInitialGroupCache=function(e,t,i,r){for(var n=[],o=0,s=1;s<=Object.keys(this.infiniteCache).length;s++)o+=this.infiniteCache[s].length;for(var l=i,s=o;s<e.length&&l<r&&((e[s].index<r||e[s].isCaptionRow)&&(l=e[s].isCaptionRow?l:e[s].index,n.push(e[s])),!(e[s].index>=r||e[s].index===r-1));s++);this.infiniteCache[t]=n,this.resetContentModuleCache(this.infiniteCache)},e.prototype.resetContentModuleCache=function(e){this.parent.contentModule.infiniteCache=e},e.prototype.destroy=function(){this.removeEventListener()},e}(),fs=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ms=function(e){function i(t,i){var r=e.call(this,t,i)||this;return r.childCount=0,r.scrollData=[],r.isFirstChildRow=!1,r.groupCache={},r.startIndexes={},r.captionCounts={},r.rowsByUid={},r.objIdxByUid={},r.initialGroupCaptions={},r.requestType=["paging","columnstate","reorder","cancel","save","beginEdit","add","delete"],r.cacheMode=!1,r.cacheBlockSize=5,r.ignoreAccent=!!r.parent.allowFiltering&&r.parent.filterSettings.ignoreAccent,r.allowCaseSensitive=!1,r.locator=i,r.groupGenerator=new Ji(r.parent),r.summaryModelGen=new Ki(r.parent),r.captionModelGen=new Qi(r.parent),r.rowRenderer=new Vi(r.locator,null,r.parent),r.eventListener(),r}return fs(i,e),i.prototype.eventListener=function(){this.parent.addEventListener(bt,this.actionBegin.bind(this)),this.parent.addEventListener(St,this.actionComplete.bind(this)),this.parent.on(Ot,this.setLazyLoadPageSize,this),this.parent.on("group-cache",this.setCache,this),this.parent.on("lazy-load-scroll-handler",this.scrollHandler,this),this.parent.on(Wt,this.setVisible,this),this.parent.on("group-collapse",this.collapseShortcut,this)},i.prototype.captionExpand=function(e){var t=this,i=this.parent.pageSettings.currentPage,r=this.groupCache[i],n=e.getAttribute("data-uid"),o=this.getRowObjectIndexByUid(n),s=!!r[o+1]&&r[o].indent<r[o+1].indent,l=r[o],a=this.getGroupKeysAndFields(o,r),h={captionRowElement:e,groupInfo:l,enableCaching:!0,cancel:!1};this.parent.trigger("lazyLoadGroupExpand",h,function(r){r.cancel||(r.keys=a.keys,r.fields=a.fields,r.rowIndex=e.rowIndex,r.makeRequest=!r.enableCaching||!s,!r.enableCaching&&s&&t.clearCache([n]),r.skip=0,r.take=t.pageSize,l.isExpand=t.rowsByUid[i][l.uid].isExpand=!0,t.captionRowExpand(r))})},i.prototype.captionCollapse=function(e){var t=this,i=this.groupCache[this.parent.pageSettings.currentPage],r=e.rowIndex,n=e.getAttribute("data-uid"),o=this.getRowObjectIndexByUid(n),s={captionRowElement:e,groupInfo:i[o],cancel:!1};this.parent.trigger("lazyLoadGroupCollapse",s,function(e){e.cancel||(e.isExpand=!1,t.removeRows(o,r))})},i.prototype.setLazyLoadPageSize=function(){var e=this.parent.getContent().firstElementChild,t=Math.floor(e.offsetHeight/this.parent.getRowHeight())-1;this.pageSize=this.pageSize?this.pageSize:3*t,this.blockSize=Math.ceil(this.pageSize/2)},i.prototype.clearLazyGroupCache=function(){this.clearCache()},i.prototype.clearCache=function(e){e=e||this.getInitialCaptionIndexes();var t=this.groupCache[this.parent.pageSettings.currentPage];if(e.length)for(var i=0;i<e.length;i++){var r=this.getRowObjectIndexByUid(e[i]),n=t[r];if(n){if(this.captionCounts[this.parent.pageSettings.currentPage][n.uid])for(var o=r+1;o<t.length;o++){if(t[o].indent===n.indent||t[o].indent<n.indent){delete this.captionCounts[this.parent.pageSettings.currentPage][n.uid];break}t[o].isCaptionRow&&delete this.captionCounts[this.parent.pageSettings.currentPage][t[o].uid]}if(n.isExpand){var s=this.parent.getRowElementByUID(n.uid);if(!s)return;this.parent.groupModule.expandCollapseRows(s.querySelector(".e-recordplusexpand"))}var l=this.getNextChilds(r);if(l.length){var a=[];l[l.length-1].isCaptionRow&&(a=this.getChildRowsByParentIndex(t.indexOf(l[l.length-1]),!1,!1,null,!0,!0));var h=t.indexOf(l[0]),d=a.length?t.indexOf(a[a.length-1]):t.indexOf(l[l.length-1]);t.splice(h,d-(h-1)),this.refreshCaches()}}}},i.prototype.refreshCaches=function(){var e=this.parent.pageSettings.currentPage,t=this.groupCache[e];this.rowsByUid={},this.objIdxByUid={};for(var i=0;i<t.length;i++)this.maintainRows(t[i],i)},i.prototype.getInitialCaptionIndexes=function(){for(var e=this.parent.pageSettings.currentPage,t=[],i=0;i<this.initialGroupCaptions[e].length;i++)t.push(this.initialGroupCaptions[e][i].uid);return t},i.prototype.getRowObjectIndexByUid=function(e){return this.objIdxByUid[this.parent.pageSettings.currentPage][e]},i.prototype.collapseShortcut=function(e){if(this.parent.groupSettings.columns.length&&e.target&&O(e.target,Di)&&"TR"===e.target.parentElement.tagName){if(!e.collapse&&O(e.target,Oi))return;var t=e.target.parentElement.getAttribute("data-uid");if(e.collapse){var i=this.getRowByUid(t);if((r=this.getRowByUid(i.parentUid)).isCaptionRow&&r.isExpand){n=this.getRowElementByUid(i.parentUid);this.parent.groupModule.expandCollapseRows(n.cells[i.indent-1])}}else{var r=this.getRowByUid(t);if(r.isCaptionRow&&!r.isExpand){var n=this.getRowElementByUid(t);this.parent.groupModule.expandCollapseRows(n.cells[r.indent])}}}},i.prototype.getRowByUid=function(e){return this.rowsByUid[this.parent.pageSettings.currentPage][e]},i.prototype.actionBegin=function(e){if(!e.cancel){if(this.requestType.some(function(t){return t===e.requestType})||(this.groupCache={},this.resetRowMaintenance()),"reorder"===e.requestType&&this.parent.groupSettings.columns.length)for(var t=Object.keys(this.groupCache),i=0;i<t.length;i++)for(var r=this.groupCache[t[i]],n=0;n<r.length;n++)if(r[n].isCaptionRow&&!this.captionModelGen.isEmpty()&&this.changeCaptionRow(r[n],null,t[i]),r[n].isDataRow){var o=e.fromIndex+r[n].indent,s=e.toIndex+r[n].indent;this.moveCells(r[n].cells,o,s)}("delete"===e.requestType||"add"===e.action&&"save"===e.requestType)&&(this.groupCache={},this.resetRowMaintenance())}},i.prototype.actionComplete=function(e){e.cancel||"columnstate"===e.requestType||"beginEdit"===e.requestType||"delete"===e.requestType||"save"===e.requestType||"reorder"===e.requestType||this.scrollReset()},i.prototype.resetRowMaintenance=function(){this.startIndexes={},this.captionCounts={},this.rowsByUid={},this.objIdxByUid={},this.initialGroupCaptions={}},i.prototype.moveCells=function(e,t,i){if(t>=e.length)for(var r=t-e.length;1+r--;)e.push(void 0);e.splice(t,0,e.splice(i,1)[0])},i.prototype.removeRows=function(e,i){var r,n=this.parent.pageSettings.currentPage,o=this.groupCache[n],s=[].slice.call(this.parent.getContent().querySelectorAll("tr"));if(this.parent.aggregates.length){var l=this.getAggregateByCaptionIndex(e);r=l.length?l[l.length-1].uid:void 0}var a=o[e].indent;this.addClass(this.getNextChilds(e)),o[e].isExpand=this.rowsByUid[n][o[e].uid].isExpand=!1;for(var h,d=e+1;d<o.length;d++){if(o[d].indent===a||o[d].indent<a){h=o[d].uid;break}o[d].isCaptionRow&&o[d].isExpand&&this.addClass(this.getNextChilds(d))}for(d=i+1;d<s.length&&s[d].getAttribute("data-uid")!==h;d++){if(s[d].getAttribute("data-uid")===r){t.remove(s[d]);break}t.remove(s[d])}},i.prototype.addClass=function(e){var t=e[this.blockSize];t&&(t.lazyLoadCssClass="e-lazyload-middle-down")},i.prototype.getNextChilds=function(e,t){for(var i=this.groupCache[this.parent.pageSettings.currentPage],r=t||i,n=i[e].indent+1,o=[],s=t?0:e+1;s<r.length&&!(r[s].indent<n);s++)r[s].indent===n&&o.push(r[s]);return o},i.prototype.lazyLoadHandler=function(e){this.setStartIndexes();var t=this.parent.getContent().querySelectorAll("tr")[e.index].getAttribute("data-uid"),i=this.getRowObjectIndexByUid(t),r=this.groupCache[this.parent.pageSettings.currentPage][i],n=e.isRowExist?e.isScroll?this.scrollData:this.getChildRowsByParentIndex(i,!0,!0,null,!0):[];if(this.scrollData=[],!e.isRowExist)if(this.setRowIndexes(i,r),this.refreshCaptionRowCount(this.groupCache[this.parent.pageSettings.currentPage][i],e.count),-1!==Object.keys(e.data).indexOf("GroupGuid"))for(var o=0;o<e.data.length;o++){var s=this.groupGenerator.generateCaptionRow(e.data[o],e.level,r.parentGid,void 0,0,r.uid);n.push(s),this.parent.aggregates.length&&(n=n.concat(this.summaryModelGen.generateRows(e.data[o],{level:e.level+1,parentUid:s.uid})))}else this.groupGenerator.index=this.getStartIndex(i,e.isScroll),n=this.groupGenerator.generateDataRows(e.data,e.level,r.parentGid,0,r.uid);var l=e.isScroll?this.rowIndex:e.index,a=this.getNextChilds(i,n),h=!!e.up||this.hasLastChildRow(e.isScroll,e.count,a.length);e.isRowExist||h||(a[this.blockSize].lazyLoadCssClass="e-lazyload-middle-down"),h||(a[a.length-1].lazyLoadCssClass="e-not-lazyload-end");var d=e.isScroll||e.isRowExist?[]:this.getAggregateByCaptionIndex(i);e.up||e.isRowExist||this.refreshRowObjects(n,e.isScroll?this.rowObjectIndex:i),this.render(l,n,h,d),this.isFirstChildRow&&!e.up&&(this.parent.getContent().firstElementChild.scrollTop=n.length*this.parent.getRowHeight()),this.isFirstChildRow=!1,this.rowIndex=void 0,this.rowObjectIndex=void 0,this.childCount=0},i.prototype.setRowIndexes=function(e,t){this.captionCounts[this.parent.pageSettings.currentPage]||(this.captionCounts[this.parent.pageSettings.currentPage]={}),t.isCaptionRow&&(this.captionCounts[this.parent.pageSettings.currentPage][t.uid]=t.data.count)},i.prototype.getStartIndex=function(e,t){var i=this.parent.pageSettings.currentPage,r=this.groupCache[i];if(t)return r[this.rowObjectIndex].index+1;var n=0,o=0,s=this.getRowByUid(r[e].parentUid);if(s&&(o=this.prevCaptionCount(s)),r[e].indent>0)for(var l=e-1;l>=0&&!(r[l].indent<r[e].indent);l--)r[l].isCaptionRow&&r[l].indent===r[e].indent&&(n+=r[l].data.count);return n+o+this.startIndexes[i][r[e].parentGid]},i.prototype.prevCaptionCount=function(e){for(var t=this.parent.pageSettings.currentPage,i=this.groupCache[t],r=0,n=i.indexOf(e)-1;n>=0&&0!==i[n].indent&&!(i[n].indent<e.indent);n--)if(i[n].isCaptionRow&&i[n].indent===e.indent){var o=this.captionCounts[t][i[n].uid];r+=o||i[n].data.count}var s=this.getRowByUid(e.parentUid);return s&&(r+=this.prevCaptionCount(s)),r},i.prototype.setStartIndexes=function(){var e=this.groupCache[this.parent.pageSettings.currentPage];if(!this.startIndexes[this.parent.pageSettings.currentPage]){for(var t=[],i=void 0,r=0;r<e.length;r++)e[r].isCaptionRow&&(t.length?t.push(e[i].data.count+t[t.length-1]):t.push(0),i=r);this.startIndexes[this.parent.pageSettings.currentPage]=t}},i.prototype.hasLastChildRow=function(e,t,i){return e?t===this.childCount+i:t===i},i.prototype.refreshCaptionRowCount=function(e,t){e.data.count=t},i.prototype.render=function(e,t,i,r){var n=this.parent.getContent().querySelectorAll("tr")[e];if(n&&r.length)for(o=r.length-1;o>=0;o--)n.insertAdjacentElement("afterend",this.rowRenderer.render(r[o],this.parent.getColumns()));if(n&&t.length)for(var o=t.length-1;o>=0;o--)this.confirmRowRendering(t[o])&&n.insertAdjacentElement("afterend",this.rowRenderer.render(t[o],this.parent.getColumns()))},i.prototype.maintainRows=function(e,t){var i=this.parent.pageSettings.currentPage;this.rowsByUid[i]||(this.rowsByUid[i]={},this.objIdxByUid[i]={}),e.uid&&(this.rowsByUid[i][e.uid]=e),this.objIdxByUid[i][e.uid]=t},i.prototype.confirmRowRendering=function(e){var i=!0;if(t.isNullOrUndefined(e.indent)&&!e.isDataRow&&!e.isCaptionRow){var r=this.getRowByUid(e.parentUid);r.isCaptionRow&&!r.isExpand&&(i=!1)}return i},i.prototype.refreshRowObjects=function(e,i){var r=this.parent.pageSettings.currentPage,n=this.groupCache[r];this.rowsByUid[r]={},this.objIdxByUid[r]={};for(var o=[],s=0,l=0;l<n.length;l++)if(l===i){this.maintainRows(n[l],s),o.push(n[l]),s++;for(var a=0;a<e.length;a++)this.maintainRows(e[a],s),o.push(e[a]),s++}else this.maintainRows(n[l],s),o.push(n[l]),s++;this.groupCache[this.parent.pageSettings.currentPage]=t.extend([],o),this.updateCurrentViewData()},i.prototype.getAggregateByCaptionIndex=function(e){for(var i=this.groupCache[this.parent.pageSettings.currentPage],r=i[e],n=r.indent,o=r.uid,s=[],l=e+1;l<i.length&&i[l].indent!==n;l++)t.isNullOrUndefined(i[l].indent)&&i[l].parentUid===o&&s.push(i[l]);return s},i.prototype.getChildRowsByParentIndex=function(e,i,r,n,o,s){var l=n||this.groupCache[this.parent.pageSettings.currentPage],a=l[e],h=[];if(!a.isCaptionRow||a.isCaptionRow&&!a.isExpand&&!s)return[];o&&this.parent.aggregates.length&&(h=this.getAggregateByCaptionIndex(e));for(var d=a.indent,c=a.uid,p=[],u=0,g=e+1;g<l.length;g++){if(l[g].parentUid===c){if(t.isNullOrUndefined(l[g].indent))continue;if(u++,p.push(l[g]),i&&l[g].isCaptionRow&&(p=p.concat(this.getChildRowsByParentIndex(g,i,r,n,o))),r&&u===this.pageSize)break}if(l[g].indent===d)break}return p.concat(h)},i.prototype.initialGroupRows=function(e){var t=[],i=this.groupCache[this.parent.pageSettings.currentPage];if(e)return this.getRenderedRowsObject();for(var r=0;r<i.length;r++)0===i[r].indent&&(t.push(i[r]),t=t.concat(this.getChildRowsByParentIndex(r,!0,!0,i,!0)));return t},i.prototype.getRenderedRowsObject=function(){for(var e=[],t=[].slice.call(this.parent.getContent().querySelectorAll("tr")),i=0;i<t.length;i++)e.push(this.getRowByUid(t[i].getAttribute("data-uid")));return e},i.prototype.getCacheRowsOnDownScroll=function(e){for(var i=[],r=this.groupCache[this.parent.pageSettings.currentPage],n=e,o=0;o<this.pageSize&&(r[n]&&!(r[n].indent<r[e].indent));o++)r[n].indent===r[e].indent&&(i.push(r[n]),r[n].isCaptionRow&&r[n].isExpand&&(i=i.concat(this.getChildRowsByParentIndex(n,!0,!0,null,!0)))),(r[n].indent>r[e].indent||t.isNullOrUndefined(r[n].indent))&&o--,n++;return i},i.prototype.getCacheRowsOnUpScroll=function(e,t,i){for(var r=[],n=this.groupCache[this.parent.pageSettings.currentPage],o=!1,s=0;s<n.length&&(!o||n[s]&&!(n[s].indent<n[i].indent)&&n[s].uid!==t);s++)o||n[s].uid!==e||(o=!0),o&&n[s].indent===n[i].indent&&(r.push(n[s]),n[s].isCaptionRow&&n[s].isExpand&&(r=r.concat(this.getChildRowsByParentIndex(s,!0,!0,null,!0))));return r},i.prototype.scrollHandler=function(e){if(!this.parent.isDestroyed&&!this.childCount){var t,i=[].slice.call(this.parent.getContent().getElementsByClassName("e-lazyload-middle-down")),r=[].slice.call(this.parent.getContent().getElementsByClassName("e-lazyload-middle-up")),n=[].slice.call(this.parent.getContent().getElementsByClassName("e-not-lazyload-end")),o=!1,s=!1,l=!1;if(e.scrollDown&&i.length&&(t=(c=this.findRowElements(i)).tr,o=c.entered),!e.scrollDown&&n)for(var a=0;a<n.length;a++){var h=n[a].getBoundingClientRect().top,d=this.parent.getContent().scrollHeight;if(h>0&&h<d){t=n[a],l=!0,this.rowIndex=t.rowIndex;break}}if(!e.scrollDown&&r.length&&!l){var c=this.findRowElements(r);t=c.tr,s=c.entered}t&&(o&&e.scrollDown&&o&&t&&this.scrollDownHandler(t),!e.scrollDown&&l&&t&&this.scrollUpEndRowHandler(t),this.cacheMode&&!e.scrollDown&&!l&&s&&t&&this.scrollUpHandler(t))}},i.prototype.scrollUpEndRowHandler=function(e){var t=this.parent.pageSettings.currentPage,i=this.groupCache[t],r=e.getAttribute("data-uid"),n=this.rowObjectIndex=this.getRowObjectIndexByUid(r),o=n,s=i[n],l=this.getRowByUid(s.parentUid),a=this.getRowObjectIndexByUid(l.uid),h=this.parent.getContent().querySelector("tr[data-uid="+l.uid+"]").rowIndex,d=this.getChildRowsByParentIndex(a).indexOf(s),c=Math.ceil(d/this.pageSize);if(1!==c)if(this.childCount=c*this.pageSize,n=this.getCurrentBlockEndIndex(s,n),this.childCount<l.data.count){e.classList.remove("e-not-lazyload-end"),s.lazyLoadCssClass="";var p=!!i[n+1]&&s.indent===i[n+1].indent;this.scrollData=p?this.getCacheRowsOnDownScroll(n+1):[];var u=this.getGroupKeysAndFields(a,i),g={rowIndex:h,makeRequest:!p,groupInfo:l,fields:u.fields,keys:u.keys,skip:this.childCount,take:this.pageSize,isScroll:!0};if(this.cacheMode&&this.childCount>=this.pageSize*this.cacheBlockSize){var f=this.getChildRowsByParentIndex(a),m=Math.ceil(f.indexOf(i[o])/this.pageSize)-(this.cacheBlockSize-1);this.removeBlock(r,p,m,f),g.cachedRowIndex=m*this.pageSize}this.captionRowExpand(g)}else this.childCount=0},i.prototype.scrollDownHandler=function(e){var i=this.parent.pageSettings.currentPage,r=this.groupCache[i],n=e.getAttribute("data-uid"),o=this.getRowObjectIndexByUid(n),s=o,l=r[o],a=this.getRowByUid(l.parentUid),h=this.getRowObjectIndexByUid(a.uid),d=this.getRowElementByUid(a.uid).rowIndex,c=this.getChildRowsByParentIndex(h),p=c.indexOf(l),u=Math.ceil(p/this.pageSize);this.childCount=u*this.pageSize;var g=r[o=this.rowObjectIndex=this.getRowObjectIndexByUid(c[this.childCount-1].uid)],f=this.getRowElementByUid(g.uid);if(this.rowIndex=f.rowIndex,o=this.getCurrentBlockEndIndex(g,o),this.childCount<a.data.count){var m=!!r[o+1]&&l.indent===r[o+1].indent;if(m&&!t.isNullOrUndefined(this.getRowElementByUid(r[o+1].uid)))return void(this.childCount=0);(u>1||!this.cacheMode)&&(e.classList.remove("e-lazyload-middle-down"),f.classList.remove("e-not-lazyload-end"),g.lazyLoadCssClass=""),this.scrollData=m?this.getCacheRowsOnDownScroll(this.rowObjectIndex+1):[];var y=this.getGroupKeysAndFields(h,r),v={rowIndex:d,makeRequest:!m,groupInfo:a,fields:y.fields,keys:y.keys,skip:this.childCount,take:this.pageSize,isScroll:!0};if(this.cacheMode&&this.childCount-this.pageSize>=this.pageSize*this.cacheBlockSize){var C=this.getChildRowsByParentIndex(h),w=Math.ceil(C.indexOf(r[s])/this.pageSize)-1-(this.cacheBlockSize-1)+1;this.removeBlock(n,m,w,C,g),v.cachedRowIndex=w*this.pageSize}this.captionRowExpand(v)}else this.childCount=0},i.prototype.getCurrentBlockEndIndex=function(e,t){var i=this.parent.pageSettings.currentPage,r=this.groupCache[i];if(e.isCaptionRow){if(e.isExpand){var n=this.getChildRowsByParentIndex(t,!0).length;this.rowIndex=this.rowIndex+n}var o=this.getAggregateByCaptionIndex(t);this.rowObjectIndex=this.rowObjectIndex+o.length;for(var s=t,l=s+1;l<r.length;l++){if(r[l].indent===r[t].indent||r[l].indent<r[t].indent){t=s;break}s++}}return t},i.prototype.removeBlock=function(e,t,i,r,n){var o=this.parent.pageSettings.currentPage,s=this.groupCache[o],l=r[(i+1)*this.pageSize-1-this.blockSize].uid,a=r[i*this.pageSize-this.pageSize].uid,h=r[i*this.pageSize].uid;s[this.getRowObjectIndexByUid(l)].lazyLoadCssClass="e-lazyload-middle-up",this.getRowElementByUid(l).classList.add("e-lazyload-middle-up"),n&&(this.getRowElementByUid(h).classList.add("e-not-lazyload-first"),this.getRowByUid(h).lazyLoadCssClass="e-not-lazyload-first",this.getRowByUid(a).lazyLoadCssClass=""),t?this.removeTopRows(n?n.uid:e,a,h):(this.uid1=a,this.uid2=h,this.uid3=n?n.uid:e)},i.prototype.scrollUpHandler=function(e){var i=this.parent.pageSettings.currentPage,r=this.groupCache[i],n=e.getAttribute("data-uid"),o=this.getRowByUid(n),s=this.rowObjectIndex=this.getRowObjectIndexByUid(n),l=this.getRowByUid(o.parentUid),a=this.rowIndex=this.getRowObjectIndexByUid(l.uid),h=this.parent.getRowElementByUID(l.uid).rowIndex,d=this.getChildRowsByParentIndex(a),c=d.indexOf(r[s]),p=Math.floor(c/this.pageSize),u=this.blockSize;2*this.blockSize>this.pageSize&&(u=2*this.blockSize-this.pageSize,u=this.blockSize-u);var g=d[c-(u-1)-this.pageSize].uid,f=d[c-(u-1)].uid;this.scrollData=this.getCacheRowsOnUpScroll(g,f,s-(u-1)),this.isFirstChildRow=p>1,this.isFirstChildRow&&(this.scrollData[0].lazyLoadCssClass="e-not-lazyload-first"),this.getRowByUid(f).lazyLoadCssClass="",this.getRowElementByUid(f).classList.remove("e-not-lazyload-first");var m=p+this.cacheBlockSize;if(d.length!==l.data.count&&m*this.pageSize>d.length)return this.isFirstChildRow=!1,this.scrollData[0].lazyLoadCssClass="",void this.getRowElementByUid(f).classList.add("e-not-lazyload-first");var y=m*this.pageSize>l.data.count?l.data.count:m*this.pageSize,v=m*this.pageSize>l.data.count?this.pageSize-(this.pageSize*m-l.data.count):this.pageSize,C=this.getChildRowsByParentIndex(r.indexOf(d[y-1]),!0,!1,null,!0),w=C.length?C[C.length-1].uid:d[y-1].uid,b=d[y-v].uid,S=d[y-v-1].uid,R=this.objIdxByUid[i][b]-u;if("e-lazyload-middle-down"===r[R].lazyLoadCssClass){var x=this.getRowElementByUid(r[R].uid);x&&x.classList.add("e-lazyload-middle-down")}if(this.getRowByUid(w).lazyLoadCssClass="",this.getRowByUid(S).lazyLoadCssClass="e-not-lazyload-end",this.getRowElementByUid(S).classList.add("e-not-lazyload-end"),this.removeBottomRows(w,b,S),this.rowIndex=e.rowIndex-u,e.classList.length>1?e.classList.remove("e-lazyload-middle-up"):e.removeAttribute("class"),!t.isNullOrUndefined(this.getRowElementByUid(g)))return this.childCount=0,void(this.scrollData=[]);var F=this.getGroupKeysAndFields(this.getRowObjectIndexByUid(l.uid),r),E={rowIndex:h,makeRequest:!1,groupInfo:l,fields:F.fields,keys:F.keys,skip:this.childCount,take:this.pageSize,isScroll:!0,scrollUp:!0};this.captionRowExpand(E)},i.prototype.findRowElements=function(e){for(var t,i=!1,r=0;r<e.length;r++){var n=e[r].rowIndex;if(Ee(n,this.parent)){i=!0,this.rowIndex=n,t=e[r];break}}return{entered:i,tr:t}},i.prototype.getRowElementByUid=function(e){return this.parent.getContent().querySelector("tr[data-uid="+e+"]")},i.prototype.removeTopRows=function(e,i,r){for(var n=[].slice.call(this.parent.getContent().querySelectorAll("tr")),o=!1,s=0;s<n.length;s++){if(n[s].getAttribute("data-uid")===r){var l=this.parent.getContent().querySelector("tr[data-uid="+e+"]");l&&(this.rowIndex=l.rowIndex);break}n[s].getAttribute("data-uid")===i&&(o=!0),o&&t.remove(n[s])}},i.prototype.removeBottomRows=function(e,i,r){for(var n=[].slice.call(this.parent.getContent().querySelectorAll("tr")),o=!1,s=0;s<n.length&&(n[s].getAttribute("data-uid")===i&&(o=!0),!o||(t.remove(n[s]),n[s].getAttribute("data-uid")!==e));s++);},i.prototype.setCache=function(e){var i=this.parent.pageSettings.currentPage;this.groupCache[i]=this.initialGroupCaptions[i]=t.extend([],e.data)},i.prototype.getGroupKeysAndFields=function(e,t){for(var i=[],r=[],n=e;n>=0&&(!t[n].isCaptionRow||-1!==i.indexOf(t[n].data.field)||!(t[n].indent<t[e].indent||n===e)||(i.push(t[n].data.field),r.push(t[n].data.key),0!==t[n].indent));n--);return{fields:i,keys:r}},i.prototype.generateExpandPredicates=function(e,i){for(var r=[],n=0;n<e.length;n++){var o=this.parent.getColumnByField(e[n]),s="null"===i[n]?null:i[n],l={field:e[n],predicate:"or",uid:o.uid,operator:"equal",type:o.type,matchCase:this.allowCaseSensitive,ignoreAccent:this.ignoreAccent};""===s||t.isNullOrUndefined(s)?r=r.concat(bn.generateNullValuePredicates(l)):r.push(t.extend({},{value:s},l))}return bn.getPredicate(r)},i.prototype.getPredicates=function(e){for(var t=[],i=0,r=Object.keys(e);i<r.length;i++){var n=r[i];t.push(e[n])}return t},i.prototype.captionRowExpand=function(e){var t=this,i=e.groupInfo,r=this.parent.groupSettings.columns.indexOf(i.data.field)+1,n=this.generateExpandPredicates(e.fields,e.keys),o=this.getPredicates(n),s={level:r,skip:e.skip,take:e.take,where:o};if(e.makeRequest){var l=this.parent.renderModule.data.generateQuery(!0);l.isCountRequired||(l.isCountRequired=!0),l.lazyLoad.push({key:"onDemandGroupInfo",value:s}),this.parent.showSpinner(),this.parent.renderModule.data.getData({},l).then(function(i){t.parent.hideSpinner(),0!==i.result.length&&(t.cacheMode&&t.uid1&&t.uid2&&(t.removeTopRows(t.uid3,t.uid1,t.uid2),t.uid1=t.uid2=t.uid3=void 0),t.lazyLoadHandler({data:i.result,count:i.count,level:r,index:e.rowIndex,isRowExist:!1,isScroll:e.isScroll,up:!1,rowIndex:e.cachedRowIndex}))}).catch(function(e){return t.parent.renderModule.dataManagerFailure(e,{requestType:"grouping"})})}else this.lazyLoadHandler({data:null,count:e.groupInfo.data.count,level:r,index:e.rowIndex,isRowExist:!0,isScroll:e.isScroll,up:e.scrollUp,rowIndex:e.cachedRowIndex})},i.prototype.scrollReset=function(e){this.parent.getContent().firstElementChild.scrollTop=e?this.parent.getContent().firstElementChild.scrollTop+e:0},i.prototype.updateCurrentViewData=function(){var e=[];this.getRows().filter(function(t){t.isDataRow&&(e[t.index]=t.data)}),this.parent.currentViewData=e.length?e:this.parent.currentViewData},i.prototype.getGroupCache=function(){return this.groupCache},i.prototype.getRows=function(){return this.groupCache[this.parent.pageSettings.currentPage]||[]},i.prototype.getRowElements=function(){return[].slice.call(this.parent.getContent().getElementsByClassName(Oi))},i.prototype.getRowByIndex=function(e){for(var i,r=[].slice.call(this.parent.getContent().getElementsByClassName(Oi)),n=0;!t.isNullOrUndefined(e)&&n<r.length;n++)if(r[n].getAttribute(Hi)===e.toString()){i=r[n];break}return i},i.prototype.setVisible=function(e){var i,r=this.parent;this.getRows().some(function(e){return e.isDataRow&&(i=e),e.isDataRow});for(var n=this.getRows().filter(function(e){return!e.isDetailRow}),o=0;o<e.length;o++){var s=e[o],l=this.parent.getNormalizedColumnIndex(s.uid),a=this.parent.getColumnIndexByUid(s.uid),h=!0===s.visible?"":"none";-1!==l&&i&&l<i.cells.length&&t.setStyleAttribute(this.getColGroup().childNodes[l],{display:h}),this.setDisplayNone(r.getDataRows(),a,h,n,l),!this.parent.invokedFromMedia&&s.hideAtMedia&&this.parent.updateMediaColumns(s),this.parent.invokedFromMedia=!1}},i.prototype.setDisplayNone=function(e,i,r,n,o){if(this.parent.groupSettings.columns.length)for(var s=Object.keys(this.groupCache),l=0;l<s.length;l++)for(var a=this.rowsByUid[s[l]],h=Object.keys(a),d=0;d<h.length;d++){var c=this.parent.getContent().querySelector("tr[data-uid="+h[d]+"]"),p=a[h[d]];p.isCaptionRow&&(this.captionModelGen.isEmpty()?(p.cells[p.indent+1].colSpan=""===r?p.cells[p.indent+1].colSpan+1:p.cells[p.indent+1].colSpan-1,c&&(c.cells[p.indent+1].colSpan=p.cells[p.indent+1].colSpan)):this.changeCaptionRow(p,c,s[l])),p.isDataRow&&(this.showAndHideCells(c,i,r,!1),p.cells[o].visible=""===r),p.isCaptionRow||p.isDataRow||!t.isNullOrUndefined(p.indent)||(p.cells[o].visible=""===r,p.visible=p.cells.some(function(e){return e.isDataCell&&e.visible}),this.showAndHideCells(c,i,r,!0,p))}else Qe(e,i,r,n)},i.prototype.changeCaptionRow=function(e,t,i){var r=e,n=e.data,o=this.groupGenerator.generateCaptionRow(n,r.indent,r.parentGid,void 0,r.tIndex,r.parentUid);o.uid=e.uid,o.isExpand=e.isExpand,o.lazyLoadCssClass=e.lazyLoadCssClass,this.rowsByUid[i][e.uid]=o,this.groupCache[i][this.objIdxByUid[i][e.uid]]=o,t&&this.parent.getContentTable().querySelector(Ui).replaceChild(this.rowRenderer.render(o,this.parent.getColumns()),t)},i.prototype.showAndHideCells=function(e,i,r,n,o){if(e){var s=n?"td.e-summarycell":"td.e-rowcell";t.setStyleAttribute(e.querySelectorAll(s)[i],{display:r}),e.querySelectorAll(s)[i].classList.contains("e-hide")&&t.removeClass([e.querySelectorAll(s)[i]],["e-hide"]),n&&(o.visible&&e.classList.contains("e-hide")?t.removeClass([e],["e-hide"]):o.visible||t.addClass([e],["e-hide"]))}},i}(Yi),ys=function(){function t(e,t){this.parent=e,this.serviceLocator=t,this.addEventListener()}return t.prototype.getModuleName=function(){return"lazyLoadGroup"},t.prototype.addEventListener=function(){this.parent.isDestroyed||this.parent.on(Mt,this.instantiateRenderer,this)},t.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(Mt,this.instantiateRenderer)},t.prototype.instantiateRenderer=function(){"auto"===this.parent.height&&(this.parent.height=this.parent.pageSettings.pageSize*this.parent.getRowHeight());var t=this.serviceLocator.getService("rendererFactory");this.parent.groupSettings.enableLazyLoading&&t.addRenderer(e.RenderType.Content,new ms(this.parent,this.serviceLocator))},t.prototype.destroy=function(){this.removeEventListener()},t}(),vs=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Cs=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return vs(r,e),r.prototype.write=function(e){this.column=e.column;var r="Dialog"!==this.parent.editSettings.mode;this.object=new s.AutoComplete(t.extend({dataSource:this.parent.dataSource instanceof i.DataManager?this.parent.dataSource:new i.DataManager(this.parent.dataSource),query:(new i.Query).select(e.column.field),enabled:Q(e.column,e.requestType,e.element),fields:{value:e.column.field},value:pe(e.column.field,e.rowData),actionComplete:this.selectedValues.bind(this),placeholder:r?"":e.column.headerText,floatLabelType:r?"Never":"Always"},e.column.edit.params)),this.object.appendTo(e.element),e.element.setAttribute("name",W(e.column.field))},r.prototype.selectedValues=function(e){e.result=i.DataUtil.distinct(e.result,this.object.fields.value,!0),this.column.dataSource&&(this.column.dataSource.dataSource.json=e.result)},r}(mo),ws=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),bs=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return ws(r,e),r.prototype.write=function(e){this.column=e.column;var r="Dialog"!==this.parent.editSettings.mode;this.obj=new s.ComboBox(t.extend({dataSource:this.parent.dataSource instanceof i.DataManager?this.parent.dataSource:new i.DataManager(this.parent.dataSource),query:(new i.Query).select(e.column.field),fields:{value:e.column.field},value:pe(e.column.field,e.rowData),enableRtl:this.parent.enableRtl,actionComplete:this.finalValue.bind(this),placeholder:r?"":e.column.headerText,floatLabelType:r?"Never":"Always",enabled:Q(e.column,e.requestType,e.element)},e.column.edit.params)),this.obj.appendTo(e.element)},r.prototype.finalValue=function(e){e.result=i.DataUtil.distinct(e.result,this.obj.fields.value,!0),this.column.dataSource&&(this.column.dataSource.dataSource.json=e.result)},r}(mo),Ss=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rs=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ss(i,e),i.prototype.write=function(e){this.column=e.column;var i="Dialog"!==this.parent.editSettings.mode;this.obj=new s.MultiSelect(t.extend({fields:{text:e.column.field,value:e.column.field},value:t.getValue(e.column.field,e.rowData),enableRtl:this.parent.enableRtl,placeholder:i?"":e.column.headerText,popupHeight:"200px",floatLabelType:i?"Never":"Always"},e.column.edit.params)),this.obj.appendTo(e.element),e.element.setAttribute("name",W(e.column.field))},i}(mo),xs=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Fs=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return xs(i,e),i.prototype.write=function(e){var i="Dialog"!==this.parent.editSettings.mode,r=pe(e.column.field,e.rowData);r=r?new Date(r):null,this.obj=new l.TimePicker(t.extend({floatLabelType:i?"Never":"Always",value:r,placeholder:i?"":e.column.headerText,enableRtl:this.parent.enableRtl,enabled:Q(e.column,e.requestType,e.element)},e.column.edit.params)),this.obj.appendTo(e.element)},i}(mo),Es=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Is=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.activeClasses=["e-selectionbackground","e-active"],t}return Es(i,e),i.prototype.create=function(e){var t="e-field e-boolcell";return"checkbox"===e.column.type&&(t="e-field e-boolcell e-edit-checkselect"),Je(this.parent,e.column,t,{type:"checkbox",value:e.value})},i.prototype.read=function(e){return e.checked},i.prototype.write=function(e){var i=!t.isNullOrUndefined(e.row)&&e.row.querySelector(".e-edit-checkselect"),r=pe(e.column.field,e.rowData),o=r&&JSON.parse(r.toString().toLowerCase());if(!t.isNullOrUndefined(i)){if(this.editType=this.parent.editSettings.mode,this.editRow=e.row,"add"!==e.requestType){var s=this.parent.getRowObjectFromUID(e.row.getAttribute("data-uid"));o=!!s&&s.isSelected}Z.apply(void 0,[[].slice.call(e.row.getElementsByClassName(bi)),o].concat(this.activeClasses))}this.obj=new n.Switch(t.extend({label:"Dialog"!==this.parent.editSettings.mode?" ":e.column.headerText,checked:o,disabled:!Q(e.column,e.requestType,e.element),enableRtl:this.parent.enableRtl,change:this.switchModeChange.bind(this)},e.column.edit.params)),this.obj.appendTo(e.element)},i.prototype.switchModeChange=function(e){if(this.editRow&&"Dialog"!==this.editType){var t=!1;e.checked?(t=!0,this.editRow.setAttribute("aria-selected",t.toString())):this.editRow.removeAttribute("aria-selected"),Z.apply(void 0,[[].slice.call(this.editRow.getElementsByClassName(bi)),t].concat(this.activeClasses))}},i}(mo),Ts=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zs=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ts(i,e),i.prototype.write=function(e){this.column=e.column;var i="Dialog"!==this.parent.editSettings.mode;this.obj=new o.MaskedTextBox(t.extend({fields:{value:e.column.field},value:pe(e.column.field,e.rowData),floatLabelType:i?"Never":"Always",mask:"000-000-0000",enabled:Q(e.column,e.requestType,e.element)},e.column.edit.params)),this.obj.appendTo(e.element)},i}(mo);return mn.Inject(_n,On,Wr,xn,Jn,Qn,Xn,Yn,Zn,ro,Kr,co,ko,Kn,No,Lo,Uo,Vo,ts,is,Ao,ns,gs,ys),e.CheckBoxFilterBase=bn,e.ExcelFilterBase=Rn,e.SortDescriptor=nn,e.SortSettings=on,e.Predicate=sn,e.InfiniteScrollSettings=ln,e.FilterSettings=an,e.SelectionSettings=hn,e.SearchSettings=dn,e.RowDropSettings=cn,e.TextWrapSettings=pn,e.ResizeSettings=un,e.GroupSettings=gn,e.EditSettings=fn,e.Grid=mn,e.doesImplementInterface=u,e.valueAccessor=g,e.headerValueAccessor=f,e.getUpdateUsingRaf=m,e.isExportColumns=y,e.updateColumnTypeForExportColumns=v,e.updatecloneRow=C,e.getCollapsedRowsCount=w,e.recursive=b,e.iterateArrayOrObject=S,e.iterateExtend=R,e.templateCompiler=x,e.setStyleAndAttributes=F,e.extend=E,e.setColumnIndex=I,e.prepareColumns=T,e.setCssInGridPopUp=z,e.getActualProperties=M,e.parentsUntil=O,e.getElementIndex=k,e.inArray=A,e.getActualPropFromColl=B,e.removeElement=P,e.getPosition=N,e.getUid=L,e.appendChildren=q,e.parents=H,e.calculateAggregate=U,e.getScrollBarWidth=j,e.getRowHeight=V,e.getActualRowHeight=G,e.isComplexField=_,e.getComplexFieldID=W,e.setComplexFieldID=K,e.isEditable=Q,e.isActionPrevent=X,e.wrap=J,e.setFormatter=Y,e.addRemoveActiveClasses=Z,e.distinctStringValues=$,e.getFilterMenuPostion=ee,e.getZIndexCalcualtion=te,e.toogleCheckbox=ie,e.setChecked=re,e.createCboxWithWrap=ne,e.removeAddCboxClasses=oe,e.refreshForeignData=se,e.getForeignData=le,e.getColumnByForeignKeyValue=ae,e.getDatePredicate=he,e.renderMovable=de,e.isGroupAdaptive=ce,e.getObject=pe,e.getCustomDateFormat=ue,e.getExpandedState=ge,e.getPrintGridModel=fe,e.extendObjWithFn=me,e.measureColumnDepth=ve,e.checkDepth=Ce,e.refreshFilteredColsUid=we,e.getTransformValues=be,e.applyBiggerTheme=Se,e.alignFrozenEditForm=Re,e.ensureLastRow=xe,e.ensureFirstRow=Fe,e.isRowEnteredInGrid=Ee,e.getEditedDataIndex=Ie,e.eventPromise=Te,e.getStateEventArgument=ze,e.ispercentageWidth=De,e.resetRowIndex=Me,e.compareChanges=Oe,e.setRowElements=ke,e.splitFrozenRowObjectCells=Ae,e.gridActionHandler=Be,e.getGridRowObjects=Pe,e.getGridRowElements=Ne,e.sliceElements=Le,e.getCellsByTableName=qe,e.getCellByColAndRowIndex=He,e.setValidationRuels=Ue,e.getMovableTbody=je,e.getFrozenRightTbody=Ve,e.setRowsInTbody=Ge,e.getNumberFormat=_e,e.addBiggerDialog=We,e.performComplexDataOperation=Ke,e.setDisplayValue=Qe,e.addRemoveEventListener=Xe,e.createEditElement=Je,e.getColumnModelByUid=Ye,e.getColumnModelByFieldName=Ze,e.created="create",e.destroyed="destroy",e.load="load",e.rowDataBound="rowDataBound",e.queryCellInfo="queryCellInfo",e.headerCellInfo="headerCellInfo",e.actionBegin=bt,e.actionComplete=St,e.actionFailure="actionFailure",e.dataBound=Rt,e.rowSelecting="rowSelecting",e.rowSelected="rowSelected",e.rowDeselecting="rowDeselecting",e.rowDeselected="rowDeselected",e.cellSelecting="cellSelecting",e.cellSelected="cellSelected",e.cellDeselecting="cellDeselecting",e.cellDeselected="cellDeselected",e.columnSelecting="columnSelecting",e.columnSelected="columnSelected",e.columnDeselecting="columnDeselecting",e.columnDeselected="columnDeselected",e.columnDragStart=xt,e.columnDrag=Ft,e.columnDrop=Et,e.rowDragStartHelper=It,e.rowDragStart=Tt,e.rowDrag=zt,e.rowDrop=Dt,e.beforePrint="beforePrint",e.printComplete="printComplete",e.detailDataBound="detailDataBound",e.toolbarClick="toolbarClick",e.batchAdd="batchAdd",e.batchCancel="batchCancel",e.batchDelete="batchDelete",e.beforeBatchAdd="beforeBatchAdd",e.beforeBatchDelete="beforeBatchDelete",e.beforeBatchSave="beforeBatchSave",e.beginEdit="beginEdit",e.cellEdit="cellEdit",e.cellSave="cellSave",e.cellSaved="cellSaved",e.endAdd="endAdd",e.endDelete="endDelete",e.endEdit="endEdit",e.recordDoubleClick="recordDoubleClick",e.recordClick="recordClick",e.beforeDataBound="beforeDataBound",e.beforeOpenColumnChooser="beforeOpenColumnChooser",e.beforeOpenAdaptiveDialog="beforeOpenAdaptiveDialog",e.resizeStart="resizeStart",e.onResize="resizing",e.resizeStop="resizeStop",e.checkBoxChange="checkBoxChange",e.beforeCopy="beforeCopy",e.beforePaste="beforePaste",e.beforeAutoFill="beforeAutoFill",e.filterChoiceRequest="filterchoicerequest",e.filterAfterOpen="filterafteropen",e.filterBeforeOpen="filterbeforeopen",e.filterSearchBegin="filtersearchbegin",e.commandClick="commandClick",e.exportGroupCaption="exportGroupCaption",e.lazyLoadGroupExpand="lazyLoadGroupExpand",e.lazyLoadGroupCollapse="lazyLoadGroupCollapse",e.initialLoad=Mt,e.initialEnd=Ot,e.dataReady=kt,e.contentReady=At,e.uiUpdate=Bt,e.onEmpty=Pt,e.inBoundModelChanged=Nt,e.modelChanged=Lt,e.colGroupRefresh=qt,e.headerRefreshed=Ht,e.pageBegin="paging-begin",e.pageComplete="paging-complete",e.sortBegin="sorting-begin",e.sortComplete="sorting-complete",e.filterBegin="filtering-begin",e.filterComplete="filtering-complete",e.searchBegin="searching-begin",e.searchComplete="searching-complete",e.reorderBegin="reorder-begin",e.reorderComplete=Ut,e.rowDragAndDropBegin="rowdraganddrop-begin",e.rowDragAndDropComplete="rowdraganddrop-complete",e.groupBegin="grouping-begin",e.groupComplete="grouping-complete",e.ungroupBegin="ungrouping-begin",e.ungroupComplete="ungrouping-complete",e.groupAggregates="group-aggregates",e.refreshFooterRenderer="refresh-footer-rendered",e.refreshAggregateCell="refresh-aggregate-cell",e.refreshAggregates="refresh-aggregates",e.rowSelectionBegin="rowselecting",e.rowSelectionComplete="rowselected",e.columnSelectionBegin="columnselecting",e.columnSelectionComplete="columnselected",e.cellSelectionBegin="cellselecting",e.cellSelectionComplete="cellselected",e.beforeCellFocused=jt,e.cellFocused="cellfocused",e.keyPressed=Vt,e.click=Gt,e.destroy=_t,e.columnVisibilityChanged=Wt,e.scroll="scroll",e.columnWidthChanged="column-width-changed",e.columnPositionChanged=Kt,e.rowDragAndDrop="row-drag-and-drop",e.rowsAdded=Qt,e.rowsRemoved=Xt,e.columnDragStop=Jt,e.headerDrop=Yt,e.dataSourceModified=Zt,e.refreshComplete="refresh-complete",e.refreshVirtualBlock=$t,e.dblclick="dblclick",e.toolbarRefresh="toolbar-refresh",e.bulkSave="bulk-save",e.autoCol=ei,e.tooltipDestroy="tooltip-destroy",e.updateData=ti,e.editBegin="edit-begin",e.editComplete="edit-complete",e.addBegin="add-begin",e.addComplete="add-complete",e.saveComplete="save-complete",e.deleteBegin="delete-begin",e.deleteComplete="delete-complete",e.preventBatch=ii,e.dialogDestroy=ri,e.crudAction="crud-Action",e.addDeleteAction=ni,e.destroyForm="destroy-form",e.doubleTap="double-tap",e.beforeExcelExport="beforeExcelExport",e.excelExportComplete="excelExportComplete",e.excelQueryCellInfo="excelQueryCellInfo",e.excelHeaderQueryCellInfo="excelHeaderQueryCellInfo",e.exportDetailDataBound="exportdetaildatabound",e.beforePdfExport="beforePdfExport",e.pdfExportComplete="pdfExportComplete",e.pdfQueryCellInfo="pdfQueryCellInfo",e.pdfHeaderQueryCellInfo="pdfHeaderQueryCellInfo",e.accessPredicate="access-predicate",e.contextMenuClick="contextMenuClick",e.freezeRender=oi,e.freezeRefresh="freezerefresh",e.contextMenuOpen="contextMenuOpen",e.columnMenuClick="columnMenuClick",e.columnMenuOpen="columnMenuOpen",e.filterOpen="filterOpen",e.filterDialogCreated="filterDialogCreated",e.filterMenuClose="filter-menu-close",e.initForeignKeyColumn="initForeignKeyColumn",e.getForeignKeyData="getForeignKeyData",e.generateQuery="generateQuery",e.showEmptyGrid="showEmptyGrid",e.foreignKeyData="foreignKeyData",e.columnDataStateChange="columnDataStateChange",e.dataStateChange="dataStateChange",e.dataSourceChanged="dataSourceChanged",e.rtlUpdated="rtl-updated",e.beforeFragAppend="beforeFragAppend",e.frozenHeight="frozenHeight",e.textWrapRefresh="textWrapRefresh",e.recordAdded="recordAdded",e.cancelBegin="cancel-Begin",e.editNextValCell="editNextValCell",e.hierarchyPrint=si,e.expandChildGrid=li,e.printGridInit="printGrid-Init",e.exportRowDataBound="export-RowDataBound",e.exportDataBound="export-DataBound",e.rowPositionChanged=ai,e.columnChooserOpened="columnChooserOpened",e.batchForm="batchedit-form",e.beforeStartEdit="edit-form",e.beforeBatchCancel="before-batch-cancel",e.batchEditFormRendered="batcheditform-rendered",e.partialRefresh="partial-refresh",e.beforeCustomFilterOpen="beforeCustomFilterOpen",e.selectVirtualRow="select-virtual-Row",e.columnsPrepared=hi,e.cBoxFltrBegin="cbox-filter-begin",e.cBoxFltrComplete=di,e.fltrPrevent=ci,e.beforeFltrcMenuOpen="before-filter-cmenu-open",e.valCustomPlacement="validation-custom-placement",e.filterCboxValue="filter-cbox-value",e.componentRendered="component-rendered",e.restoreFocus="restore-Focus",e.detailStateChange="detail-state-change",e.detailIndentCellInfo="detail-indentcell-info",e.virtaulKeyHandler="virtaul-key-handler",e.virtaulCellFocus="virtaul-cell-focus",e.virtualScrollEditActionBegin="virtual-scroll-edit-action-begin",e.virtualScrollEditSuccess="virtual-scroll-edit-success",e.virtualScrollEditCancel="virtual-scroll-edit-cancel",e.virtualScrollEdit="virtual-scroll-edit",e.refreshVirtualCache="refresh-virtual-cache",e.editReset="edit-reset",e.virtualScrollAddActionBegin="virtual-scroll-add-action-begin",e.getVirtualData=pi,e.refreshInfiniteModeBlocks=ui,e.resetInfiniteBlocks="reset-infinite-blocks",e.infiniteScrollHandler="infinite-scroll-handler",e.infinitePageQuery="infinite-page-query",e.infiniteShowHide="infinite-show-hide",e.appendInfiniteContent="append-infinite-content",e.removeInfiniteRows="remove-infinite-rows",e.setInfiniteCache="set-infinite-cache",e.infiniteEditHandler="infinite-edit-handler",e.initialCollapse="initial-collapse",e.getAggregateQuery="get-aggregate-query",e.closeFilterDialog="close-filter-dialog",e.columnChooserCancelBtnClick="columnChooserCancelBtnClick",e.getFilterBarOperator="get-filterbar-operator",e.resetColumns="reset-columns",e.pdfAggregateQueryCellInfo="pdfAggregateQueryCellInfo",e.excelAggregateQueryCellInfo="excelAggregateQueryCellInfo",e.setGroupCache="group-cache",e.lazyLoadScrollHandler="lazy-load-scroll-handler",e.groupCollapse="group-collapse",e.beforeCheckboxRenderer="beforeCheckboxRenderer",e.refreshHandlers=gi,e.refreshFrozenColumns="refresh-frozen-columns",e.setReorderDestinationElement="set-reorder-destination-element",e.refreshVirtualFrozenHeight="refresh-virtual-frozen-height",e.setFreezeSelection="set-freeze-selection",e.setInfiniteFrozenHeight="set-infinite-frozen-height",e.setInfiniteColFrozenHeight="set-infinite-col-frozen-height",e.beforeRefreshOnDataChange="before-refresh-on-data-change",e.immutableBatchCancel="immutable-batch-cancel",e.refreshVirtualFrozenRows="refresh-virtual-frozenrows",e.checkScrollReset="check-scroll-reset",e.refreshFrozenHeight="refresh-frozen-height",e.setHeightToFrozenElement="set-height-to-frozen-element",e.preventFrozenScrollRefresh="prevent-frozen-scroll-refresh",e.nextCellIndex="next-cell-index",e.refreshInfiniteCurrentViewData="refresh-infinite-current-view-data",e.infiniteCrudCancel="infinite-crud-cancel",e.filterDialogClose="filter-dialog-close",e.refreshCustomFilterOkBtn="refresh-cutsom-filter-ok-button",e.refreshCustomFilterClearBtn="refresh-cutsom-filter-clear-button",e.renderResponsiveCmenu="render-responsive-cmenu",e.filterCmenuSelect="filter-cmenu-select",e.customFilterClose="custom-filter-close",e.setFullScreenDialog="set-fullscreen-dialog",e.refreshExpandandCollapse="refresh-Expand-and-Collapse",e.rowModeChange="row-mode-change",e.enterKeyHandler="enter-key-handler",e.refreshVirtualMaxPage="refresh-virtual-max-page",e.setVirtualPageQuery="set-virtual-page-query",e.selectRowOnContextOpen="select-row-on-context-open",e.pagerRefresh="pager-refresh",e.closeInline="closeinline",e.closeBatch="closebatch",e.closeEdit="close-edit",e.resetVirtualFocus="reset-virtual-focus",e.afterContentRender="after-content-renderer",e.refreshVirtualEditFormCells="refresh-virtual-editform-cells",e.scrollToEdit="scroll-to-edit",e.beforeCheckboxRendererQuery="before-checkbox-renderer-query",e.createVirtualValidationForm="create-virtual-validation-form",e.validateVirtualForm="validate-virtual-form",e.rowCell=bi,e.gridHeader=Si,e.gridContent=Ri,e.gridFooter=xi,e.headerContent=Fi,e.movableContent=Ei,e.movableHeader=Ii,e.frozenContent=Ti,e.frozenHeader=zi,e.content=Di,e.table=Mi,e.row=Oi,e.gridChkBox=ki,e.editedRow=Ai,e.addedRow=Bi,e.changedRecords="changedRecords",e.addedRecords="addedRecords",e.deletedRecords="deletedRecords",e.leftRight=Pi,e.frozenRight=Ni,e.frozenLeft=Li,e.ariaColIndex=qi,e.ariaRowIndex=Hi,e.tbody=Ui,e.colGroup=ji,e.Data=yi,e.Sort=xn,e.Page=On,e.Selection=Wr,e.Filter=_n,e.Search=Kr,e.Scroll=Xr,e.resizeClassList=Wn,e.Resize=Kn,e.Reorder=Qn,e.RowDD=Xn,e.Group=Jn,e.getCloneProperties=p,e.Print=yn,e.DetailRow=Yn,e.Toolbar=Zn,e.Aggregate=ro,e.summaryIterator=$e,e.VirtualScroll=co,e.Edit=ko,e.BatchEdit=Io,e.InlineEdit=Eo,e.NormalEdit=xo,e.DialogEdit=zo,e.ColumnChooser=Ao,e.ExcelExport=No,e.PdfExport=Lo,e.ExportHelper=Bo,e.ExportValueFormatter=Po,e.Clipboard=en,e.CommandColumn=Uo,e.CheckBoxFilter=jn,e.menuClass=jo,e.ContextMenu=Vo,e.Freeze=ts,e.ColumnMenu=is,e.ExcelFilter=Gn,e.ForeignKey=ns,e.Logger=ds,e.detailLists=cs,e.InfiniteScroll=gs,e.LazyLoadGroup=ys,e.Column=Ct,e.CommandColumnModel=wt,e.Row=vi,e.Cell=Ci,e.HeaderRender=Zi,e.ContentRender=Yi,e.RowRenderer=Vi,e.CellRenderer=$i,e.HeaderCellRenderer=rr,e.FilterCellRenderer=Bn,e.StackedHeaderCellRenderer=or,e.Render=Rr,e.IndentCellRenderer=lr,e.GroupCaptionCellRenderer=hr,e.GroupCaptionEmptyCellRenderer=dr,e.BatchEditRender=uo,e.DialogEditRender=go,e.InlineEditRender=po,e.EditRender=fo,e.BooleanEditCell=vo,e.DefaultEditCell=Ro,e.DropDownEditCell=wo,e.NumericEditCell=bo,e.DatePickerEditCell=Mo,e.CommandColumnRenderer=Ho,e.FreezeContentRender=Wo,e.FreezeRender=Ko,e.StringFilterUI=Nn,e.NumberFilterUI=Ln,e.DateFilterUI=Hn,e.BooleanFilterUI=qn,e.FlMenuOptrUI=Pn,e.AutoCompleteEditCell=Cs,e.ComboboxEditCell=bs,e.MultiSelectEditCell=Rs,e.TimePickerEditCell=Fs,e.ToggleEditCell=Is,e.MaskedTextBoxCellEdit=zs,e.VirtualContentRenderer=lo,e.VirtualHeaderRenderer=ao,e.VirtualElementHandler=ho,e.GroupLazyLoadRenderer=ms,e.ColumnFreezeHeaderRenderer=Xo,e.ColumnFreezeContentRenderer=Jo,e.ResponsiveDialogRenderer=Fr,e.EditCellBase=mo,e.CellRendererFactory=xr,e.ServiceLocator=Er,e.RowModelGenerator=Gi,e.GroupModelGenerator=Ji,e.FreezeRowModelGenerator=Go,e.ValueFormatter=yt,e.VirtualRowModelGenerator=oo,e.InterSectionObserver=no,e.Pager=zn,e.ExternalMessage=Mn,e.NumericContainer=Fn,e.PagerMessage=En,e.PagerDropDown=Dn,e}({},ej.base,ej.data,ej.popups,ej.buttons,ej.inputs,ej.dropdowns,ej.calendars,ej.navigations,ej.excelexport,ej.pdfexport),this.ejs=ej;
- /*!
- * filename: ej2-dropdowns.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.dropdowns=function(e,t,i,s,l,o,r,n){"use strict";function a(e,t,i,s,l,o){C+=String.fromCharCode(e),setTimeout(function(){C=""},1e3);var r;if(C=s?C.toLowerCase():C,x===l&&b===C){for(p=0;p<S.length;p++)if(S[p].classList.contains(E)){r=p;break}return r+=1,S[r]}var n=t,a=C.length,h=void 0,p=i=i?i+1:0;S=[];do{p===n.length&&(p=-1),h=n[r=-1===p?0:p],(o?s?h.textContent.trim().toLowerCase():h.textContent.trim():s?h.innerText.toLowerCase():h.innerText).substr(0,a)===C&&S.push(n[r]),p++}while(p!==i);return b=C,x=l,S[0]}function h(e,t,i,s){var l=t;s=void 0===s||null===s||s;var o={item:null,index:null};if(e&&e.length){for(var r=e.length,n=s?e.toLocaleLowerCase():e,a=0,h=l;a<h.length;a++){var p=h[a],u=(s?p.textContent.toLocaleLowerCase():p.textContent).replace(/^\s+|\s+$/g,"");if("Equal"===i&&u===n||"StartsWith"===i&&u.substr(0,r)===n)return o.item=p,o.index=a,{item:p,index:a}}return o}return o}function p(e,t,i,s,l){if(""!==t){var o=i?"gim":"gm";t=/^[a-zA-Z0-9- ]*$/.test(t)?t:t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var r="StartsWith"===s?"^("+t+")":"EndsWith"===s?"("+t+")$":"("+t+")";u(e,new RegExp(r,o),l)}}function u(e,t,i){for(var s=0;e.childNodes&&s<e.childNodes.length;s++){if(3===e.childNodes[s].nodeType&&""!==e.childNodes[s].textContent.trim()){if(e=i&&e.classList.contains("e-highlight")?e.parentElement:e,i&&e.getAttribute("data-value"))e.innerHTML=e.getAttribute("data-value").replace(t,'<span class="e-highlight">$1</span>');else{var l=e.childNodes[s].nodeValue.trim().replace(t,'<span class="e-highlight">$1</span>');e.childNodes[s].nodeValue="",e.innerHTML=e.innerHTML.trim()+l}break}u(e.childNodes[s],t,i)}}function c(e){for(var t=e.querySelectorAll(".e-highlight"),i=t.length-1;i>=0;i--){var s=t[i].parentNode,l=document.createTextNode(t[i].textContent);s.replaceChild(l,t[i])}}function d(e,i,s,l,o,r,n){var a=t.createElement("span",{className:ee}),h=t.createElement("label",{className:te});t.isNullOrUndefined(s.id)||""===s.id||(h.id="label_"+s.id.replace(/ /g,"_"),t.attributes(s,{"aria-labelledby":h.id})),t.isNullOrUndefined(l.placeholder)||""===l.placeholder||(h.innerText=t.SanitizeHtmlHelper.sanitize(l.placeholder),l.removeAttribute("placeholder")),h.innerText=t.SanitizeHtmlHelper.sanitize(n),i.appendChild(a),i.appendChild(h),e.classList.add("e-float-input"),m(o,h),"Always"===r&&(h.classList.contains(se)&&t.removeClass([h],se),t.addClass([h],ie))}function m(e,i){e&&e.length>0?(t.addClass([i],ie),t.removeClass([i],se)):(t.removeClass([i],ie),t.addClass([i],se))}function f(e,i,s,l,o,r,n){var a,h=i.querySelector("."+te),p=i.querySelector("."+ee);t.isNullOrUndefined(h)?v(o,l,a=null!==n?n:""):(a=h.innerText,t.detach(s.querySelector("."+te)),v(o,l,a),t.isNullOrUndefined(p)||t.detach(s.querySelector("."+ee))),e.classList.remove("e-float-input")}function v(e,t,i){e&&e.length?t.placeholder="":t.placeholder=i}function y(e,i){e.classList.add("e-input-focus");var s=i.querySelector("."+te);t.isNullOrUndefined(s)||(t.addClass([s],ie),s.classList.contains(se)&&t.removeClass([s],se))}function g(e,i,s,l,o){e.classList.remove("e-input-focus");var r=i.querySelector("."+te);s&&s.length<=0&&"Auto"===l&&!t.isNullOrUndefined(r)&&(r.classList.contains(ie)&&t.removeClass([r],ie),t.addClass([r],se))}var C="",b="",S=[],E="e-active",x="",w=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),O=function(e,t,i,s){var l,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(l=e[n])&&(r=(o<3?l(r):o>3?l(t,i,r):l(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},A=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return w(i,e),O([t.Property()],i.prototype,"text",void 0),O([t.Property()],i.prototype,"value",void 0),O([t.Property()],i.prototype,"iconCss",void 0),O([t.Property()],i.prototype,"groupBy",void 0),O([t.Property()],i.prototype,"htmlAttributes",void 0),i}(t.ChildProperty),k={root:"e-dropdownbase",rtl:"e-rtl",content:"e-content",selected:"e-active",hover:"e-hover",noData:"e-nodata",fixedHead:"e-fixed-head",focus:"e-item-focus",li:"e-list-item",group:"e-list-group-item",disabled:"e-disabled",grouping:"e-dd-group"},B=function(e){function l(t,i){var s=e.call(this,t,i)||this;return s.preventChange=!1,s.isAngular=!1,s.isPreventChange=!1,s}return w(l,e),l.prototype.getPropObject=function(e,t,i){var s=new Object,l=new Object,o=function(e){return e};s[o(e)]=t[o(e)],l[o(e)]=i[o(e)];var r=new Object;return r.newProperty=s,r.oldProperty=l,r},l.prototype.getValueByText=function(e,i,s){var l=null;return t.isNullOrUndefined(this.listData)||(l=i?this.checkValueCase(e,!0,s):this.checkValueCase(e,!1,s)),l},l.prototype.checkValueCase=function(e,i,s,l){var o=this,r=null;l&&(r=e);var n=this.listData,a=this.fields,h=this.typeOfData(n).typeof;if("string"===h||"number"===h||"boolean"===h)for(var p=0,u=n;p<u.length;p++){var c=u[p];t.isNullOrUndefined(c)||(s?r=this.checkingAccent(String(c),e,i):i?this.checkIgnoreCase(String(c),e)&&(r=this.getItemValue(String(c),e,i)):this.checkNonIgnoreCase(String(c),e)&&(r=this.getItemValue(String(c),e,i,l)))}else i?n.filter(function(i){var s=t.getValue(a.value,i);!t.isNullOrUndefined(s)&&o.checkIgnoreCase(t.getValue(a.text,i).toString(),e)&&(r=t.getValue(a.value,i))}):l?n.filter(function(e){var i=t.getValue(a.value,e);t.isNullOrUndefined(i)||t.isNullOrUndefined(r)||i.toString()!==r.toString()||(r=t.getValue(a.text,e))}):n.filter(function(i){o.checkNonIgnoreCase(t.getValue(a.text,i),e)&&(r=t.getValue(a.value,i))});return r},l.prototype.checkingAccent=function(e,t,s){var l=i.DataUtil.ignoreDiacritics(String(e)),o=i.DataUtil.ignoreDiacritics(t.toString()),r=null;return s?this.checkIgnoreCase(l,o)&&(r=this.getItemValue(String(e),t,s)):this.checkNonIgnoreCase(String(e),t)&&(r=this.getItemValue(String(e),t,s)),r},l.prototype.checkIgnoreCase=function(e,t){return String(e).toLowerCase()===t.toString().toLowerCase()},l.prototype.checkNonIgnoreCase=function(e,t){return String(e)===t.toString()},l.prototype.getItemValue=function(e,t,i,s){var l=this.listData,o=this.typeOfData(l).typeof;return s?e.toString():i?"string"===o?String(e):this.getFormattedValue(String(e)):"string"===o?t:this.getFormattedValue(t)},l.prototype.templateCompiler=function(e){var i=!1;if(e)try{i=!!t.selectAll(e,document).length}catch(e){i=!1}return i},l.prototype.l10nUpdate=function(e){var i="listbox"===this.getModuleName()?this.ulElement:this.list;if("No records found"!==this.noRecordsTemplate||"Request failed"!==this.actionFailureTemplate){this.DropDownBaseresetBlazorTemplates(!1,!1,!0,!0);var s=e?this.actionFailureTemplate:this.noRecordsTemplate,l=void 0,o=e?this.actionFailureTemplateId:this.noRecordsTemplateId;i.innerHTML="";var r=(l=this.templateCompiler(s)?t.compile(t.select(s,document).innerHTML.trim()):t.compile(s))({},this,e?"actionFailureTemplate":"noRecordsTemplate",o,this.isStringTemplate,null,i);if(r&&r.length>0)for(var n=0;n<r.length;n++)i.appendChild(r[n]);this.renderReactTemplates(),this.DropDownBaseupdateBlazorTemplates(!1,!1,!e,e,!1,!1,!1,!1)}else{var a={noRecordsTemplate:"No records found",actionFailureTemplate:"Request failed"},h=new t.L10n(this.getLocaleName(),{},this.locale);""!==h.getConstant("actionFailureTemplate")?this.l10n=h:this.l10n=new t.L10n("listbox"===this.getModuleName()?"listbox":"dropdowns",a,this.locale);var p=e?this.l10n.getConstant("actionFailureTemplate"):this.l10n.getConstant("noRecordsTemplate");if("listbox"===this.getModuleName()){var u=this.createElement("li");u.textContent=p,i.appendChild(u),u.classList.add("e-list-nrt")}else i.innerHTML=p}},l.prototype.getLocaleName=function(){return"drop-down-base"},l.prototype.getTextByValue=function(e){return this.checkValueCase(e,!1,!1,!0)},l.prototype.getFormattedValue=function(e){if(this.listData&&this.listData.length){var i=this.typeOfData(this.listData);if(t.isBlazor()&&t.isNullOrUndefined(e)||"null"===e)return null;if("number"==typeof t.getValue(this.fields.value?this.fields.value:"value",i.item)||"number"===i.typeof)return parseFloat(e);if("boolean"==typeof t.getValue(this.fields.value?this.fields.value:"value",i.item)||"boolean"===i.typeof)return"true"===e||""+e=="true"}return e},l.prototype.setEnableRtl=function(){this.list&&this.enableRtlElements.push(this.list),this.enableRtl?t.addClass(this.enableRtlElements,k.rtl):t.removeClass(this.enableRtlElements,k.rtl)},l.prototype.initialize=function(){if(this.bindEvent=!0,this.actionFailureTemplateId=this.element.id+"ActionFailureTemplate","UL"===this.element.tagName){var e=s.ListBase.createJsonFromElement(this.element);this.setProperties({fields:{text:"text",value:"text"}},!0),this.resetList(e,this.fields)}else"SELECT"===this.element.tagName?(this.dataSource instanceof Array?this.dataSource.length>0:!t.isNullOrUndefined(this.dataSource))||this.renderItemsBySelect():this.setListData(this.dataSource,this.fields,this.query)},l.prototype.DropDownBaseupdateBlazorTemplates=function(e,i,s,l,o,r,n,a){this.isStringTemplate||(this.itemTemplate&&e&&t.updateBlazorTemplate(this.itemTemplateId,"ItemTemplate",this,a),this.groupTemplate&&i&&t.updateBlazorTemplate(this.groupTemplateId,"GroupTemplate",this,a),this.noRecordsTemplate&&s&&t.updateBlazorTemplate(this.noRecordsTemplateId,"NoRecordsTemplate",this,a),this.actionFailureTemplate&&l&&t.updateBlazorTemplate(this.actionFailureTemplateId,"ActionFailureTemplate",this,a),o&&t.updateBlazorTemplate(this.valueTemplateId,"ValueTemplate",this,a),r&&t.updateBlazorTemplate(this.headerTemplateId,"HeaderTemplate",this),n&&t.updateBlazorTemplate(this.footerTemplateId,"FooterTemplate",this))},l.prototype.DropDownBaseresetBlazorTemplates=function(e,i,s,l,o,r,n){this.isStringTemplate||(this.itemTemplate&&e&&t.resetBlazorTemplate(this.itemTemplateId,"ItemTemplate"),this.groupTemplate&&i&&t.resetBlazorTemplate(this.groupTemplateId,"GroupTemplate"),this.noRecordsTemplate&&s&&t.resetBlazorTemplate(this.noRecordsTemplateId,"NoRecordsTemplate"),this.actionFailureTemplate&&l&&t.resetBlazorTemplate(this.actionFailureTemplateId,"ActionFailureTemplate"),o&&t.resetBlazorTemplate(this.valueTemplateId,"ValueTemplate"),r&&t.resetBlazorTemplate(this.headerTemplateId,"HeaderTemplate"),n&&t.resetBlazorTemplate(this.footerTemplateId,"FooterTemplate"))},l.prototype.getPersistData=function(){return this.addOnPersist([])},l.prototype.setEnabled=function(){this.element.setAttribute("aria-disabled",this.enabled?"false":"true")},l.prototype.updateDataAttribute=function(e){for(var i=["class","style","id","type"],s={},l=0;l<this.element.attributes.length;l++)-1!==i.indexOf(this.element.attributes[l].name)||"dropdownlist"===this.getModuleName()&&"readonly"===this.element.attributes[l].name||(s[this.element.attributes[l].name]=this.element.getAttribute(this.element.attributes[l].name));t.extend(s,e,s),this.setProperties({htmlAttributes:s},!0)},l.prototype.renderItemsBySelect=function(){var e=this.element,t={value:"value",text:"text"},i=[],s=e.querySelectorAll("select>optgroup"),l=e.querySelectorAll("select>option");if(this.getJSONfromOption(i,l,t),s.length){for(var o=0;o<s.length;o++){var r=s[o],n={};n[t.text]=r.label,n.isHeader=!0;var a=r.querySelectorAll("option");i.push(n),this.getJSONfromOption(i,a,t)}e.querySelectorAll("select>option")}this.updateFields(t.text,t.value,this.fields.groupBy,this.fields.htmlAttributes,this.fields.iconCss),this.resetList(i,t)},l.prototype.updateFields=function(e,i,s,l,o){var r={fields:{text:e,value:i,groupBy:t.isNullOrUndefined(s)?this.fields&&this.fields.groupBy:s,htmlAttributes:t.isNullOrUndefined(l)?this.fields&&this.fields.htmlAttributes:l,iconCss:t.isNullOrUndefined(o)?this.fields&&this.fields.iconCss:o}};this.setProperties(r,!0)},l.prototype.getJSONfromOption=function(e,i,s){for(var l=0,o=i;l<o.length;l++){var r=o[l],n={};n[s.text]=r.innerText,n[s.value]=t.isNullOrUndefined(r.getAttribute(s.value))?r.innerText:r.getAttribute(s.value),e.push(n)}},l.prototype.preRender=function(){this.scrollTimer=-1,this.enableRtlElements=[],this.isRequested=!1,this.isDataFetched=!1,this.itemTemplateId=this.element.id+"ItemTemplate",this.valueTemplateId=this.element.id+"ValueTemplate",this.groupTemplateId=this.element.id+"GroupTemplate",this.headerTemplateId=this.element.id+"HeaderTemplate",this.footerTemplateId=this.element.id+"FooterTemplate",this.noRecordsTemplateId=this.element.id+"NoRecordsTemplate"},l.prototype.setListData=function(e,t,s){var l=this;t=t||this.fields;var o;this.isActive=!0;var r={cancel:!1,data:e,query:s};this.isPreventChange=!(!this.isAngular||!this.preventChange)||this.isPreventChange,this.trigger("actionBegin",r,function(s){if(!s.cancel)if(l.showSpinner(),e instanceof i.DataManager){if(l.isRequested=!0,l.isDataFetched)return void l.emptyDataRequest(t);s.data.executeQuery(l.getQuery(s.query)).then(function(e){l.isPreventChange=!(!l.isAngular||!l.preventChange)||l.isPreventChange,l.trigger("actionComplete",e,function(e){if(!e.cancel){var i=e.result;0===i.length&&(l.isDataFetched=!0),o=l.renderItems(i,t),l.onActionComplete(o,i,e),l.groupTemplate&&l.renderGroupTemplate(o),l.isRequested=!1,l.bindChildItems(i,o,t,e)}})}).catch(function(e){l.isRequested=!1,l.onActionFailure(e),l.hideSpinner()})}else{var r=new i.DataManager(s.data),n={cancel:!1,result:l.getQuery(s.query).executeLocal(r)};l.isPreventChange=!(!l.isAngular||!l.preventChange)||l.isPreventChange,l.trigger("actionComplete",n,function(e){e.cancel||(o=l.renderItems(e.result,t),l.onActionComplete(o,e.result),l.groupTemplate&&l.renderGroupTemplate(o),l.bindChildItems(e.result,o,t))})}})},l.prototype.bindChildItems=function(e,i,s,l){var o=this;e.length>=100&&"autocomplete"===this.getModuleName()?setTimeout(function(){var r=o.remainingItems(o.sortedData,s);t.append(r,i),o.DropDownBaseupdateBlazorTemplates(!0,!1,!1,!1),o.liCollections=o.list.querySelectorAll("."+k.li),o.updateListValues(),o.raiseDataBound(e,l)},0):this.raiseDataBound(e,l)},l.prototype.updateListValues=function(){},l.prototype.findListElement=function(e,t,i,s){var l=null;if(e)for(var o=[].slice.call(e.querySelectorAll(t)),r=0;r<o.length;r++)if(o[r].getAttribute(i)===s+""){l=o[r];break}return l},l.prototype.raiseDataBound=function(e,t){this.hideSpinner();var i={items:e,e:t};this.trigger("dataBound",i)},l.prototype.remainingItems=function(e,t){var l=new i.DataManager(e).executeLocal((new i.Query).skip(100));if(this.itemTemplate){var o=this.templateListItem(l,t);return[].slice.call(o.childNodes)}var r=this.typeOfData(l).typeof;return"string"===r||"number"===r||"boolean"===r?s.ListBase.createListItemFromArray(this.createElement,l,!0,this.listOption(l,t),this):s.ListBase.createListItemFromJson(this.createElement,l,this.listOption(l,t),1,!0,this)},l.prototype.emptyDataRequest=function(e){var t=[];this.onActionComplete(this.renderItems(t,e),t),this.isRequested=!1,this.hideSpinner()},l.prototype.showSpinner=function(){},l.prototype.hideSpinner=function(){},l.prototype.onActionFailure=function(e){this.liCollections=[],this.trigger("actionFailure",e),this.l10nUpdate(!0),t.addClass([this.list],k.noData)},l.prototype.onActionComplete=function(e,i,s){this.listData=i,t.isBlazor()&&this.isServerRendered&&"listbox"===this.getModuleName()?(t.remove(this.list.querySelector(".e-list-parent")),t.remove(this.list.querySelector(".e-hidden-select"))):(this.isReact&&this.clearTemplate(["itemTemplate","groupTemplate","actionFailureTemplate","noRecordsTemplate"]),this.list.innerHTML=""),this.fixedHeaderElement=t.isNullOrUndefined(this.fixedHeaderElement)?this.fixedHeaderElement:null,this.list.appendChild(e),this.liCollections=this.list.querySelectorAll("."+k.li),this.ulElement=this.list.querySelector("ul"),this.postRender(this.list,i,this.bindEvent)},l.prototype.postRender=function(e,i,s){var l=e.querySelector("."+k.li),o=e.querySelector("."+k.selected);l&&!o&&l.classList.add(k.focus),i.length<=0?(this.l10nUpdate(),t.addClass([e],k.noData)):e.classList.remove(k.noData)},l.prototype.getQuery=function(e){return e||(this.query?this.query:new i.Query)},l.prototype.renderGroupTemplate=function(e){if(null!==this.fields.groupBy&&this.dataSource||this.element.querySelector("."+k.group)){var i=this.dataSource,l={groupTemplateID:this.groupTemplateId,isStringTemplate:this.isStringTemplate},o=e.querySelectorAll("."+k.group);if(this.templateCompiler(this.groupTemplate)){var r=t.select(this.groupTemplate,document).innerHTML.trim();s.ListBase.renderGroupTemplate(r,i,this.fields.properties,o,l,this)}else s.ListBase.renderGroupTemplate(this.groupTemplate,i,this.fields.properties,o,l,this);this.DropDownBaseupdateBlazorTemplates(!1,!0,!1,!1,!1,!1,!1,!1)}},l.prototype.createListItems=function(e,l){e&&l.groupBy||this.element.querySelector("optgroup")?(l.groupBy&&("None"!==this.sortOrder&&(e=this.getSortedDataSource(e)),e=s.ListBase.groupDataSource(e,l.properties,this.sortOrder)),t.addClass([this.list],k.grouping)):e=this.getSortedDataSource(e);var o=this.listOption(e,l),r=e.length>100?new i.DataManager(e).executeLocal((new i.Query).take(100)):e;return this.sortedData=e,s.ListBase.createList(this.createElement,"autocomplete"===this.getModuleName()?r:e,o,!0,this)},l.prototype.listOption=function(e,i){var s=!t.isNullOrUndefined(i.iconCss),l=t.isNullOrUndefined(i.properties)?i:i.properties,o=null!==i.text||null!==i.value?{fields:l,showIcon:s,ariaAttributes:{groupItemRole:"presentation"}}:{fields:{value:"text"}};return t.extend({},o,i,!0)},l.prototype.setFloatingHeader=function(e){t.isNullOrUndefined(this.fixedHeaderElement)&&(this.fixedHeaderElement=this.createElement("div",{className:k.fixedHead}),this.list.querySelector("li").classList.contains(k.group)||(this.fixedHeaderElement.style.display="none"),t.prepend([this.fixedHeaderElement],this.list),this.setFixedHeader()),t.isNullOrUndefined(this.fixedHeaderElement)||"0"!==this.fixedHeaderElement.style.zIndex||this.setFixedHeader(),this.scrollStop(e)},l.prototype.scrollStop=function(e){for(var i=t.isNullOrUndefined(e)?this.list:e.target,s=parseInt(getComputedStyle(this.getValidLi(),null).getPropertyValue("height"),10),l=Math.round(i.scrollTop/s),o=this.list.querySelectorAll("li:not(.e-hide-listitem)"),r=l;r>-1;r--){if(!t.isNullOrUndefined(o[r])&&o[r].classList.contains(k.group)){var n=o[r];this.fixedHeaderElement.innerHTML=n.innerHTML,this.fixedHeaderElement.style.top=i.scrollTop+"px",this.fixedHeaderElement.style.display="block";break}this.fixedHeaderElement.style.display="none",this.fixedHeaderElement.style.top="none"}},l.prototype.getValidLi=function(){return this.liCollections[0]},l.prototype.renderItems=function(e,t){var l;if(this.itemTemplate&&e){var o=e;o&&t.groupBy?("None"!==this.sortOrder&&(o=this.getSortedDataSource(o)),o=s.ListBase.groupDataSource(o,t.properties,this.sortOrder)):o=this.getSortedDataSource(o),this.sortedData=o;var r=o.length>100?new i.DataManager(o).executeLocal((new i.Query).take(100)):o;l=this.templateListItem("autocomplete"===this.getModuleName()?r:o,t);var n="listbox"===this.getModuleName();this.DropDownBaseupdateBlazorTemplates(!0,!1,!1,!1,!1,!1,!1,n)}else l=this.createListItems(e,t);return l},l.prototype.templateListItem=function(e,i){this.DropDownBaseresetBlazorTemplates(!0,!1,!1,!1);var l=this.listOption(e,i);if(l.templateID=this.itemTemplateId,l.isStringTemplate=this.isStringTemplate,this.templateCompiler(this.itemTemplate)){var o=t.select(this.itemTemplate,document).innerHTML.trim();return s.ListBase.renderContentTemplate(this.createElement,o,e,i.properties,l,this)}return s.ListBase.renderContentTemplate(this.createElement,this.itemTemplate,e,i.properties,l,this)},l.prototype.typeOfData=function(e){for(var i={typeof:null,item:null},s=0;!t.isNullOrUndefined(e)&&s<e.length;s++)if(!t.isNullOrUndefined(e[s])&&!("string"==typeof e[s]||"number"==typeof e[s]||"boolean"==typeof e[s]?t.isNullOrUndefined(e[s]):t.isNullOrUndefined(t.getValue(this.fields.value?this.fields.value:"value",e[s]))))return i={typeof:typeof e[s],item:e[s]};return i},l.prototype.setFixedHeader=function(){this.list.parentElement.style.display="block";var e=0;this.list&&this.list.parentElement&&(e=parseInt(document.defaultView.getComputedStyle(this.list.parentElement,null).getPropertyValue("border-width"),10),isNaN(e)&&(e=parseInt(document.defaultView.getComputedStyle(this.list.parentElement,null).getPropertyValue("border-top-width"),10)+parseInt(document.defaultView.getComputedStyle(this.list.parentElement,null).getPropertyValue("border-bottom-width"),10)+parseInt(document.defaultView.getComputedStyle(this.list.parentElement,null).getPropertyValue("border-left-width"),10)+parseInt(document.defaultView.getComputedStyle(this.list.parentElement,null).getPropertyValue("border-right-width"),10)));var i=this.getValidLi().offsetWidth-e;this.fixedHeaderElement.style.width=i.toString()+"px",t.setStyleAttribute(this.fixedHeaderElement,{zIndex:10});var s=this.ulElement.querySelector("."+k.group+":not(.e-hide-listitem)");this.fixedHeaderElement.innerHTML=s.innerHTML},l.prototype.getSortedDataSource=function(e){if(e&&"None"!==this.sortOrder){var t=this.fields.text?this.fields.text:"text";"string"!==this.typeOfData(e).typeof&&"number"!==this.typeOfData(e).typeof&&"boolean"!==this.typeOfData(e).typeof||(t=""),e=s.ListBase.getDataSource(e,s.ListBase.addSorting(this.sortOrder,t))}return e},l.prototype.getIndexByValue=function(e){for(var i,s=this.getItems(),l=0;l<s.length;l++)if(!t.isNullOrUndefined(e)&&s[l].getAttribute("data-value")===e.toString()){i=l;break}return i},l.prototype.dispatchEvent=function(e,t){var i=document.createEvent("HTMLEvents");i.initEvent(t,!1,!0),e.dispatchEvent(i)},l.prototype.setFields=function(){this.fields.value&&!this.fields.text?this.updateFields(this.fields.value,this.fields.value):!this.fields.value&&this.fields.text?this.updateFields(this.fields.text,this.fields.text):this.fields.value||this.fields.text||this.updateFields("text","text")},l.prototype.resetList=function(e,i,s){this.list&&(("SELECT"===this.element.tagName&&this.element.options.length>0||"UL"===this.element.tagName&&this.element.childNodes.length>0)&&!(e instanceof Array?e.length>0:!t.isNullOrUndefined(e))&&this.selectData&&this.selectData.length>0&&(e=this.selectData),this.setListData(e,i,s))},l.prototype.updateSelectElementData=function(e){e&&t.isNullOrUndefined(this.selectData)&&this.listData&&this.listData.length>0&&(this.selectData=this.listData)},l.prototype.updateSelection=function(){},l.prototype.renderList=function(){this.render()},l.prototype.updateDataSource=function(e){this.resetList(this.dataSource)},l.prototype.setUpdateInitial=function(e,t){this.isDataFetched=!1;for(var i={},s=0;e.length>s;s++)t[e[s]]&&"fields"===e[s]?(this.setFields(),i[e[s]]=t[e[s]]):t[e[s]]&&(i[e[s]]=t[e[s]]);Object.keys(i).length>0&&(-1===Object.keys(i).indexOf("dataSource")&&(i.dataSource=this.dataSource),this.updateDataSource(i))},l.prototype.onPropertyChanged=function(e,i){"dropdownbase"===this.getModuleName()&&this.setUpdateInitial(["fields","query","dataSource"],e),this.setUpdateInitial(["sortOrder","itemTemplate"],e);for(var s=0,l=Object.keys(e);s<l.length;s++)switch(l[s]){case"query":case"sortOrder":case"dataSource":case"itemTemplate":break;case"enableRtl":this.setEnableRtl();break;case"enabled":this.setEnabled();break;case"groupTemplate":if(this.renderGroupTemplate(this.list),this.ulElement&&this.fixedHeaderElement){var o=this.ulElement.querySelector("."+k.group);this.fixedHeaderElement.innerHTML=o.innerHTML}break;case"locale":this.list&&!t.isNullOrUndefined(this.liCollections)&&0===this.liCollections.length&&this.l10nUpdate();break;case"zIndex":this.setProperties({zIndex:e.zIndex},!0),this.setZIndex()}},l.prototype.render=function(e){this.list=this.createElement("div",{className:k.content,attrs:{tabindex:"0"}}),this.list.classList.add(k.root),this.setFields();var i={duration:300,selector:"."+k.li};this.rippleFun=t.rippleEffect(this.list,i);var s=this.element.querySelector("select>optgroup");if(!this.fields.groupBy&&t.isNullOrUndefined(s)||this.isGroupChecking||t.EventHandler.add(this.list,"scroll",this.setFloatingHeader,this),"dropdownbase"===this.getModuleName()){this.element.getAttribute("tabindex")&&this.list.setAttribute("tabindex",this.element.getAttribute("tabindex")),t.removeClass([this.element],k.root),this.element.style.display="none";var l=this.createElement("div");this.element.parentElement.insertBefore(l,this.element),l.appendChild(this.element),l.appendChild(this.list)}this.setEnableRtl(),this.setEnabled(),e||this.initialize()},l.prototype.getModuleName=function(){return"dropdownbase"},l.prototype.getItems=function(){return this.ulElement.querySelectorAll("."+k.li)},l.prototype.addItem=function(e,i){if((!this.list||this.list.textContent===this.noRecordsTemplate&&"listbox"!==this.getModuleName())&&this.renderList(),"None"!==this.sortOrder&&t.isNullOrUndefined(i)){var l=[].slice.call(this.listData);l.push(e),l=this.getSortedDataSource(l),i=this.fields.groupBy?(l=s.ListBase.groupDataSource(l,this.fields.properties,this.sortOrder)).indexOf(e):l.indexOf(e)}this.DropDownBaseresetBlazorTemplates(!0,!1,!1,!1);var o=this.getItems().length,r=this.list.querySelector("."+k.selected);e=e instanceof Array?e:[e];var n;n=t.isNullOrUndefined(i)||i<0||i>o-1?o:i;var a=this.fields;e&&a.groupBy&&(e=s.ListBase.groupDataSource(e,a.properties));for(var h=[],p=0;p<e.length;p++){var u=e[p],c=u.isHeader,d=this.createElement("li",{className:c?k.group:k.li,id:"option-add-"+p}),m=u instanceof Object?t.getValue(a.text,u):u;if(c&&(d.innerText=m),this.itemTemplate&&!c){var f=t.compile(this.itemTemplate)(u,this,"itemTemplate",this.itemTemplateId,this.isStringTemplate,null,d);f&&t.append(f,d),this.DropDownBaseupdateBlazorTemplates(!0,!1,!1,!1)}else c||d.appendChild(document.createTextNode(m));d.setAttribute("data-value",u instanceof Object?t.getValue(a.value,u):u),d.setAttribute("role","option"),this.notify("addItem",{module:"CheckBoxSelection",item:d}),h.push(d),this.listData.push(u),"None"===this.sortOrder&&t.isNullOrUndefined(i)&&0===n&&(n=null),this.updateActionCompleteData(d,u,n),this.trigger("beforeItemRender",{element:d,item:u})}if(0===o&&t.isNullOrUndefined(this.list.querySelector("ul")))this.list.innerHTML="",this.list.classList.remove(k.noData),this.list.appendChild(this.ulElement),this.liCollections=h,t.append(h,this.ulElement),this.updateAddItemList(this.list,o);else{"listbox"===this.getModuleName()&&0===o&&(this.ulElement.innerHTML="");for(var v=[],p=0;p<e.length;p++){for(var y=this.ulElement.querySelectorAll(".e-list-group-item"),g=0;g<y.length;g++)v[g]=y[g].innerText;if(v.indexOf(h[p].innerText)>-1&&a.groupBy){for(g=0;g<y.length;g++)if(v[g]===h[p].innerText){"None"===this.sortOrder?this.ulElement.insertBefore(h[p+1],y[g+1]):this.ulElement.insertBefore(h[p+1],this.ulElement.childNodes[i]),p+=1;break}}else this.liCollections[n]?this.liCollections[n].parentNode.insertBefore(h[p],this.liCollections[n]):this.ulElement.appendChild(h[p]);var C=[].slice.call(this.liCollections);C.splice(n,0,h[p]),this.liCollections=C,n+=1,"multiselect"===this.getModuleName()&&this.updateDataList()}}(r||0===i)&&this.updateSelection()},l.prototype.validationAttribute=function(e,t){var i=e.getAttribute("name")?e.getAttribute("name"):e.getAttribute("id");t.setAttribute("name",i),e.removeAttribute("name");for(var s=["required","aria-required","form"],l=0;l<s.length;l++)if(e.getAttribute(s[l])){var o=e.getAttribute(s[l]);t.setAttribute(s[l],o),e.removeAttribute(s[l])}},l.prototype.setZIndex=function(){},l.prototype.updateActionCompleteData=function(e,t,i){},l.prototype.updateAddItemList=function(e,t){},l.prototype.updateDataList=function(){},l.prototype.getDataByValue=function(e){if(!t.isNullOrUndefined(this.listData)){var i=this.typeOfData(this.listData).typeof;if("string"===i||"number"===i||"boolean"===i)for(var s=0,l=this.listData;s<l.length;s++){n=l[s];if(!t.isNullOrUndefined(n)&&n===e)return n}else for(var o=0,r=this.listData;o<r.length;o++){var n=r[o];if(!t.isNullOrUndefined(n)&&t.getValue(this.fields.value?this.fields.value:"value",n)===e)return n}}return null},l.prototype.destroy=function(){document.body.contains(this.list)&&(t.EventHandler.remove(this.list,"scroll",this.setFloatingHeader),t.isNullOrUndefined(this.rippleFun)||this.rippleFun(),t.detach(this.list)),e.prototype.destroy.call(this)},O([t.Complex({text:null,value:null,iconCss:null,groupBy:null},A)],l.prototype,"fields",void 0),O([t.Property(!1)],l.prototype,"enablePersistence",void 0),O([t.Property(null)],l.prototype,"itemTemplate",void 0),O([t.Property(null)],l.prototype,"groupTemplate",void 0),O([t.Property("No records found")],l.prototype,"noRecordsTemplate",void 0),O([t.Property("Request failed")],l.prototype,"actionFailureTemplate",void 0),O([t.Property("None")],l.prototype,"sortOrder",void 0),O([t.Property(!0)],l.prototype,"enabled",void 0),O([t.Property([])],l.prototype,"dataSource",void 0),O([t.Property(null)],l.prototype,"query",void 0),O([t.Property("StartsWith")],l.prototype,"filterType",void 0),O([t.Property(!0)],l.prototype,"ignoreCase",void 0),O([t.Property(1e3)],l.prototype,"zIndex",void 0),O([t.Property(!1)],l.prototype,"ignoreAccent",void 0),O([t.Property()],l.prototype,"locale",void 0),O([t.Event()],l.prototype,"actionBegin",void 0),O([t.Event()],l.prototype,"actionComplete",void 0),O([t.Event()],l.prototype,"actionFailure",void 0),O([t.Event()],l.prototype,"select",void 0),O([t.Event()],l.prototype,"dataBound",void 0),O([t.Event()],l.prototype,"created",void 0),O([t.Event()],l.prototype,"destroyed",void 0),l=O([t.NotifyPropertyChanges],l)}(t.Component),D=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),T=function(e,t,i,s){var l,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(l=e[n])&&(r=(o<3?l(r):o>3?l(t,i,r):l(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},I={root:"e-dropdownlist",hover:k.hover,selected:k.selected,rtl:k.rtl,li:k.li,disable:k.disabled,base:k.root,focus:k.focus,input:"e-input-group",inputFocus:"e-input-focus",icon:"e-input-group-icon e-ddl-icon",iconAnimation:"e-icon-anim",value:"e-input-value",device:"e-ddl-device",backIcon:"e-input-group-icon e-back-icon e-icons",filterBarClearIcon:"e-input-group-icon e-clear-icon e-icons",filterInput:"e-input-filter",filterParent:"e-filter-parent",mobileFilter:"e-ddl-device-filter",footer:"e-ddl-footer",header:"e-ddl-header",clearIcon:"e-clear-icon",clearIconHide:"e-clear-icon-hide",popupFullScreen:"e-popup-full-page",disableIcon:"e-ddl-disable-icon",hiddenElement:"e-ddl-hidden"},L={container:null,buttons:[]},N=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.isListSearched=!1,s.preventChange=!1,s.isAngular=!1,s}return D(s,e),s.prototype.preRender=function(){var i=t.isBlazor()&&this.isServerRendered;this.isServerBlazor=!!i,this.valueTempElement=null,this.isServerBlazor?this.initializeData():(this.element.style.opacity="0",this.initializeData(),e.prototype.preRender.call(this)),this.activeIndex=this.index,this.queryString=""},s.prototype.initializeData=function(){this.isPopupOpen=!1,this.isDocumentClick=!1,this.isInteracted=!1,this.isFilterFocus=!1,this.beforePopupOpen=!1,this.initial=!0,this.initRemoteRender=!1,this.isNotSearchList=!1,this.isTyped=!1,this.isSelected=!1,this.preventFocus=!1,this.preventAutoFill=!1,this.isValidKey=!1,this.typedString="",this.isEscapeKey=!1,this.isPreventBlur=!1,this.isTabKey=!1,this.actionCompleteData={isUpdated:!1},this.actionData={isUpdated:!1},this.prevSelectPoints={},this.isSelectCustom=!1,this.isDropDownClick=!1,this.preventAltUp=!1,this.isCustomFilter=!1,this.isSecondClick=!1,this.previousValue=null,this.keyConfigure={tab:"tab",enter:"13",escape:"27",end:"35",home:"36",down:"40",up:"38",pageUp:"33",pageDown:"34",open:"alt+40",close:"shift+tab",hide:"alt+38",space:"32"}},s.prototype.setZIndex=function(){this.popupObj&&this.popupObj.setProperties({zIndex:this.zIndex})},s.prototype.renderList=function(t){this.isServerBlazor?this.interopAdaptor.invokeMethodAsync("OnServerRenderList",this.beforePopupOpen,!1):(e.prototype.render.call(this,t),this.unWireListEvents(),this.wireListEvents())},s.prototype.floatLabelChange=function(){if("dropdownlist"===this.getModuleName()&&"Auto"===this.floatLabelType){var e=this.inputWrapper.container.querySelector(".e-float-text");""!==this.inputElement.value||this.isInteracted?t.classList(e,["e-label-top"],["e-label-bottom"]):t.classList(e,["e-label-bottom"],["e-label-top"])}},s.prototype.resetHandler=function(e){e.preventDefault(),this.clearAll(e)},s.prototype.resetFocusElement=function(){if(this.removeHover(),this.removeSelection(),this.removeFocus(),this.list.scrollTop=0,"autocomplete"!==this.getModuleName()&&!t.isNullOrUndefined(this.ulElement)){var e=this.ulElement.querySelector("."+I.li);e&&e.classList.add(I.focus)}},s.prototype.clearAll=function(e,s){!t.isNullOrUndefined(s)&&(t.isNullOrUndefined(s)||!t.isNullOrUndefined(s.dataSource)&&(s.dataSource instanceof i.DataManager||0!==s.dataSource.length))||(this.isActive=!0,this.resetSelection(s));var l=this.getItemData();this.previousValue!==l.value&&this.onChangeEvent(e)},s.prototype.resetSelection=function(e){this.list&&(t.isNullOrUndefined(e)||!t.isNullOrUndefined(e.dataSource)&&(e.dataSource instanceof i.DataManager||0!==e.dataSource.length)?(!this.allowFiltering||"autocomplete"===this.getModuleName()||t.isNullOrUndefined(this.actionCompleteData.ulElement)||t.isNullOrUndefined(this.actionCompleteData.list)||this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(!0),this.actionCompleteData.list),this.resetFocusElement()):(this.selectedLI=null,this.actionCompleteData.isUpdated=!1,this.actionCompleteData.ulElement=null,this.actionCompleteData.list=null,this.resetList(e.dataSource))),this.isServerBlazor||(this.hiddenElement.innerHTML=""),this.inputElement.value="",this.value=null,this.itemData=null,this.text=null,this.index=null,this.activeIndex=null,this.item=null,this.queryString="",this.valueTempElement&&(t.detach(this.valueTempElement),this.inputElement.style.display="block",this.valueTempElement=null),this.setSelection(null,null),this.isSelectCustom=!1,this.updateIconState(),this.cloneElements()},s.prototype.setHTMLAttributes=function(){if(Object.keys(this.htmlAttributes).length)for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if("class"===s){var l=this.htmlAttributes[s].replace(/\s+/g," ").trim();""!==l&&t.addClass([this.inputWrapper.container],l.split(" "))}else if("disabled"===s&&"disabled"===this.htmlAttributes[s])this.enabled=!1,this.setEnable();else if("readonly"!==s||t.isNullOrUndefined(this.htmlAttributes[s]))if("style"===s)this.inputWrapper.container.setAttribute("style",this.htmlAttributes[s]);else{var r=["title","id","placeholder","aria-placeholder","role","autocorrect","autocomplete","autocapitalize","spellcheck","minlength","maxlength"],n=["name","required"];"autocomplete"!==this.getModuleName()&&"combobox"!==this.getModuleName()||r.push("tabindex"),n.indexOf(s)>-1||0===s.indexOf("data")?this.hiddenElement.setAttribute(s,this.htmlAttributes[s]):r.indexOf(s)>-1?"placeholder"===s?o.Input.setPlaceholder(this.htmlAttributes[s],this.inputElement):this.inputElement.setAttribute(s,this.htmlAttributes[s]):this.inputWrapper.container.setAttribute(s,this.htmlAttributes[s])}else this.readonly=!0,this.dataBind()}"autocomplete"!==this.getModuleName()&&"combobox"!==this.getModuleName()||this.inputWrapper.container.removeAttribute("tabindex")},s.prototype.getAriaAttributes=function(){return{"aria-disabled":"false","aria-owns":this.element.id+"_options",role:"listbox","aria-haspopup":"true","aria-expanded":"false","aria-activedescendant":"null","aria-live":"polite","aria-labelledby":this.hiddenElement.id}},s.prototype.setEnableRtl=function(){o.Input.setEnableRtl(this.enableRtl,[this.inputElement.parentElement]),this.popupObj&&(this.popupObj.enableRtl=this.enableRtl,this.popupObj.dataBind())},s.prototype.setEnable=function(){o.Input.setEnabled(this.enabled,this.inputElement),this.enabled?(t.removeClass([this.inputWrapper.container],I.disable),this.inputElement.setAttribute("aria-disabled","false"),this.targetElement().setAttribute("tabindex",this.tabIndex)):(this.hidePopup(),t.addClass([this.inputWrapper.container],I.disable),this.inputElement.setAttribute("aria-disabled","true"),this.targetElement().tabIndex=-1)},s.prototype.getPersistData=function(){return this.addOnPersist(["value"])},s.prototype.getLocaleName=function(){return"drop-down-list"},s.prototype.preventTabIndex=function(e){"dropdownlist"===this.getModuleName()&&(e.tabIndex=-1)},s.prototype.targetElement=function(){return this.inputWrapper.container},s.prototype.getNgDirective=function(){return"EJS-DROPDOWNLIST"},s.prototype.getElementByText=function(e){return this.getElementByValue(this.getValueByText(e))},s.prototype.getElementByValue=function(e){for(var t,i=0,s=this.getItems();i<s.length;i++){var l=s[i];if(this.getFormattedValue(l.getAttribute("data-value"))===e){t=l;break}}return t},s.prototype.initValue=function(){this.renderList(),this.dataSource instanceof i.DataManager?this.initRemoteRender=!0:this.updateValues()},s.prototype.updateValues=function(){if(t.isNullOrUndefined(this.value))if(this.text&&t.isNullOrUndefined(this.value)){var e=this.getElementByText(this.text);if(t.isNullOrUndefined(e))return void this.setProperties({text:null});this.setSelection(e,null)}else this.setSelection(this.liCollections[this.activeIndex],null);else this.setSelection(this.getElementByValue(this.value),null);this.setHiddenValue(),o.Input.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton)},s.prototype.onBlur=function(e){if(this.enabled){var i=e.relatedTarget,s=e.target,l=this.isPreventBlur;if(this.isPreventBlur=!1,l&&!this.isDocumentClick&&this.isPopupOpen&&(!t.isNullOrUndefined(s)||!this.isFilterLayout()&&t.isNullOrUndefined(i)))return void("dropdownlist"===this.getModuleName()&&this.allowFiltering&&this.isPopupOpen?this.filterInput.focus():this.targetElement().focus());if(this.isDocumentClick||!t.isNullOrUndefined(this.popupObj)&&document.body.contains(this.popupObj.element)&&this.popupObj.element.classList.contains(I.mobileFilter))return void(this.beforePopupOpen||(this.isDocumentClick=!1));("dropdownlist"===this.getModuleName()&&!this.isFilterFocus&&i!==this.inputElement&&(document.activeElement!==i||document.activeElement===i&&s.classList.contains(I.inputFocus))||t.isNullOrUndefined(i)&&"dropdownlist"===this.getModuleName()&&this.allowFiltering&&s!==this.inputWrapper.container||"dropdownlist"!==this.getModuleName()&&!this.inputWrapper.container.contains(i)||this.isTabKey)&&(this.isDocumentClick=!!this.isPopupOpen,this.focusOutAction(e),this.isTabKey=!1),!this.isRequested||this.isPopupOpen||this.isPreventBlur||(this.isActive=!1,this.beforePopupOpen=!1)}},s.prototype.focusOutAction=function(e){this.isInteracted=!1,this.focusOut(e),this.onFocusOut()},s.prototype.onFocusOut=function(){this.enabled&&(this.isSelected&&(this.isSelectCustom=!1,this.onChangeEvent(null)),this.floatLabelChange(),this.dispatchEvent(this.hiddenElement,"change"),"dropdownlist"===this.getModuleName()&&"INPUT"!==this.element.tagName&&this.dispatchEvent(this.inputElement,"blur"),this.inputWrapper.clearButton&&t.addClass([this.inputWrapper.clearButton],I.clearIconHide),this.trigger("blur"))},s.prototype.onFocus=function(e){if(!this.isInteracted){this.isInteracted=!0;var t={isInteracted:!!e,event:e};this.trigger("focus",t)}this.updateIconState()},s.prototype.resetValueHandler=function(e){var i=t.closest(this.inputElement,"form");if(i&&e.target===i){var s=this.element.tagName===this.getNgDirective()?null:this.inputElement.getAttribute("value");this.text=s}},s.prototype.wireEvent=function(){t.EventHandler.add(this.inputWrapper.container,"mousedown",this.dropDownClick,this),t.EventHandler.add(this.inputWrapper.container,"focus",this.focusIn,this),t.EventHandler.add(this.inputWrapper.container,"keypress",this.onSearch,this),this.bindCommonEvent()},s.prototype.bindCommonEvent=function(){t.EventHandler.add(this.targetElement(),"blur",this.onBlur,this);var e=t.closest(this.inputElement,"form");e&&t.EventHandler.add(e,"reset",this.resetValueHandler,this),t.Browser.isDevice?this.keyboardModule=new t.KeyboardEvents(this.targetElement(),{keyAction:this.mobileKeyActionHandler.bind(this),keyConfigs:this.keyConfigure,eventName:"keydown"}):this.keyboardModule=new t.KeyboardEvents(this.targetElement(),{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigure,eventName:"keydown"}),this.bindClearEvent()},s.prototype.bindClearEvent=function(){this.showClearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown",this.resetHandler,this)},s.prototype.unBindCommonEvent=function(){this.targetElement()&&t.EventHandler.remove(this.targetElement(),"blur",this.onBlur);var e=this.inputElement&&t.closest(this.inputElement,"form");e&&t.EventHandler.remove(e,"reset",this.resetValueHandler),t.Browser.isDevice||this.keyboardModule.destroy(),this.showClearButton&&t.EventHandler.remove(this.inputWrapper.clearButton,"mousedown",this.resetHandler)},s.prototype.updateIconState=function(){this.showClearButton&&(""===this.inputElement.value||this.readonly?t.addClass([this.inputWrapper.clearButton],I.clearIconHide):t.removeClass([this.inputWrapper.clearButton],I.clearIconHide))},s.prototype.wireListEvents=function(){t.EventHandler.add(this.list,"click",this.onMouseClick,this),t.EventHandler.add(this.list,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.list,"mouseout",this.onMouseLeave,this)},s.prototype.onSearch=function(e){32!==e.charCode&&13!==e.charCode&&(void 0===this.list&&(this.isServerBlazor?(this.isServerIncrementalSearch=!0,this.interopAdaptor.invokeMethodAsync("OnServerRenderList",!0,!1)):this.renderList()),this.searchKeyEvent=e,this.onServerIncrementalSearch(e))},s.prototype.onServerIncrementalSearch=function(e){this.isRequested||t.isNullOrUndefined(this.list)||t.isNullOrUndefined(this.list.querySelector("li"))||!this.enabled||this.readonly||this.incrementalSearch(e)},s.prototype.onMouseClick=function(e){var i=e.target,s=t.closest(i,"."+k.li);if(this.isValidLI(s))if(this.setSelection(s,e),t.Browser.isDevice&&this.isFilterLayout())history.back();else{this.closePopup(100)}},s.prototype.onMouseOver=function(e){var i=t.closest(e.target,"."+k.li);this.setHover(i)},s.prototype.setHover=function(e){this.enabled&&this.isValidLI(e)&&!e.classList.contains(k.hover)&&(this.removeHover(),t.addClass([e],k.hover))},s.prototype.onMouseLeave=function(){this.removeHover()},s.prototype.removeHover=function(){if(this.list){var e=this.isServerBlazor&&this.popupObj&&this.popupObj.element?this.popupObj.element.querySelectorAll("."+k.hover):this.list.querySelectorAll("."+k.hover);e&&e.length&&t.removeClass(e,k.hover)}},s.prototype.isValidLI=function(e){return e&&e.hasAttribute("role")&&"option"===e.getAttribute("role")},s.prototype.incrementalSearch=function(e){if(this.liCollections.length>0){var i=a(e.charCode,this.liCollections,this.activeIndex,!0,this.element.id,this.isServerBlazor);t.isNullOrUndefined(i)||(this.setSelection(i,e),this.setScrollPosition())}},s.prototype.hideSpinner=function(){t.isNullOrUndefined(this.spinnerElement)||(l.hideSpinner(this.spinnerElement),t.removeClass([this.spinnerElement],I.disableIcon),this.spinnerElement.innerHTML="",this.spinnerElement=null)},s.prototype.showSpinner=function(){t.isNullOrUndefined(this.spinnerElement)&&(this.spinnerElement=t.Browser.isDevice&&!t.isNullOrUndefined(this.filterInputObj)&&this.filterInputObj.buttons[1]||!t.isNullOrUndefined(this.filterInputObj)&&this.filterInputObj.buttons[0]||this.inputWrapper.buttons[0],t.addClass([this.spinnerElement],I.disableIcon),l.createSpinner({target:this.spinnerElement,width:t.Browser.isDevice?"16px":"14px"},this.createElement),l.showSpinner(this.spinnerElement))},s.prototype.keyActionHandler=function(e){if(this.enabled){var i="pageUp"===e.action||"pageDown"===e.action,s="dropdownlist"!==this.getModuleName()&&("home"===e.action||"end"===e.action);this.isEscapeKey="escape"===e.action,this.isTabKey=!this.isPopupOpen&&"tab"===e.action;var l="down"===e.action||"up"===e.action||"home"===e.action||"end"===e.action,o="down"===e.action||"up"===e.action||"pageUp"===e.action||"pageDown"===e.action||"home"===e.action||"end"===e.action;if((!(this.isEditTextBox()||i||s)||this.isPopupOpen)&&!this.readonly){var r="tab"===e.action||"close"===e.action;if(void 0!==this.list||this.isRequested||r||"escape"===e.action||(this.searchKeyEvent=e,this.renderList()),((!this.isServerBlazor||"open"!==e.action&&"space"!==e.action)&&t.isNullOrUndefined(this.list)||!t.isNullOrUndefined(this.liCollections)&&o&&0===this.liCollections.length||this.isRequested)&&(!this.isServerBlazor||!l))return;switch((r&&"autocomplete"!==this.getModuleName()&&this.isPopupOpen||"escape"===e.action)&&e.preventDefault(),this.isSelected="escape"!==e.action&&this.isSelected,this.isTyped=!o&&"escape"!==e.action&&this.isTyped,e.action){case"down":case"up":this.updateUpDownAction(e);break;case"pageUp":this.pageUpSelection(this.activeIndex-this.getPageCount(),e),e.preventDefault();break;case"pageDown":this.pageDownSelection(this.activeIndex+this.getPageCount(),e),e.preventDefault();break;case"home":case"end":this.updateHomeEndAction(e);break;case"space":"dropdownlist"===this.getModuleName()&&(this.beforePopupOpen||this.showPopup());break;case"open":this.showPopup();break;case"hide":this.preventAltUp=this.isPopupOpen,this.hidePopup(e),this.focusDropDown(e);break;case"enter":this.selectCurrentItem(e);break;case"tab":this.selectCurrentValueOnTab(e);break;case"escape":case"close":this.isPopupOpen&&(this.hidePopup(e),this.focusDropDown(e))}}}},s.prototype.updateUpDownAction=function(e){if(this.isServerBlazor&&t.isNullOrUndefined(this.list))this.isServerNavigation=!0,this.interopAdaptor.invokeMethodAsync("OnServerRenderList",!0,!1);else{this.isServerNavigation=!1;var i=this.list.querySelector("."+I.focus);if(this.isSelectFocusItem(i))this.setSelection(i,e);else{var s="down"===e.action?this.activeIndex+1:this.activeIndex-1,l=0;"autocomplete"===this.getModuleName()&&(l="down"===e.action&&t.isNullOrUndefined(this.activeIndex)?0:this.liCollections.length-1,s=s<0?this.liCollections.length-1:s===this.liCollections.length?0:s);var o=t.isNullOrUndefined(this.activeIndex)?this.liCollections[l]:this.liCollections[s];t.isNullOrUndefined(o)||this.setSelection(o,e)}e.preventDefault()}},s.prototype.updateHomeEndAction=function(e){if("dropdownlist"===this.getModuleName())if(this.isServerBlazor&&t.isNullOrUndefined(this.list))this.isServerNavigation=!0,this.interopAdaptor.invokeMethodAsync("OnServerRenderList",!0,!1);else{this.isServerNavigation=!1;var i=0;if(i="home"===e.action?0:this.getItems().length-1,e.preventDefault(),this.activeIndex===i)return;this.setSelection(this.liCollections[i],e)}},s.prototype.selectCurrentValueOnTab=function(e){"autocomplete"===this.getModuleName()?this.selectCurrentItem(e):this.isPopupOpen&&(this.hidePopup(e),this.focusDropDown(e))},s.prototype.mobileKeyActionHandler=function(e){if(this.enabled&&(!this.isEditTextBox()||this.isPopupOpen)&&!this.readonly){if(void 0!==this.list||this.isRequested||(this.searchKeyEvent=e,this.renderList()),t.isNullOrUndefined(this.list)||!t.isNullOrUndefined(this.liCollections)&&0===this.liCollections.length||this.isRequested)return;"enter"===e.action&&this.selectCurrentItem(e)}},s.prototype.selectCurrentItem=function(e){if(this.isPopupOpen){var t=this.list.querySelector("."+I.focus);t&&(this.setSelection(t,e),this.isTyped=!1),this.isSelected&&(this.isSelectCustom=!1,this.onChangeEvent(e)),this.hidePopup(),this.focusDropDown(e)}else this.showPopup()},s.prototype.isSelectFocusItem=function(e){return!t.isNullOrUndefined(e)},s.prototype.getPageCount=function(){var e=this.list.classList.contains(k.noData)?null:getComputedStyle(this.getItems()[0],null).getPropertyValue("height");return Math.round(this.list.getBoundingClientRect().height/parseInt(e,10))},s.prototype.pageUpSelection=function(e,t){var i=e>=0?this.liCollections[e+1]:this.liCollections[0];this.setSelection(i,t)},s.prototype.pageDownSelection=function(e,t){var i=this.getItems(),s=e<=i.length?this.liCollections[e-1]:this.liCollections[i.length-1];this.setSelection(s,t)},s.prototype.unWireEvent=function(){t.EventHandler.remove(this.inputWrapper.container,"mousedown",this.dropDownClick),t.EventHandler.remove(this.inputWrapper.container,"keypress",this.onSearch),t.EventHandler.remove(this.inputWrapper.container,"focus",this.focusIn),this.unBindCommonEvent()},s.prototype.unWireListEvents=function(){t.EventHandler.remove(this.list,"click",this.onMouseClick),t.EventHandler.remove(this.list,"mouseover",this.onMouseOver),t.EventHandler.remove(this.list,"mouseout",this.onMouseLeave)},s.prototype.checkSelector=function(e){return'[id="'+e.replace(/(:|\.|\[|\]|,|=|@|\\|\/|#)/g,"\\$1")+'"]'},s.prototype.onDocumentClick=function(e){var i=e.target;if(!t.isNullOrUndefined(this.popupObj)&&t.closest(i,this.checkSelector(this.popupObj.element.id))||this.inputWrapper.container.contains(e.target))i===this.inputElement||this.allowFiltering&&i===this.filterInput||"combobox"===this.getModuleName()&&!this.allowFiltering&&t.Browser.isDevice&&i===this.inputWrapper.buttons[0]||(this.isPreventBlur=(t.Browser.isIE||"edge"===t.Browser.info.name)&&(document.activeElement===this.targetElement()||document.activeElement===this.filterInput),e.preventDefault());else if(this.inputWrapper.container.classList.contains(I.inputFocus)||this.isPopupOpen){this.isDocumentClick=!0;var s=this.isRequested;this.isInteracted=!1,this.hidePopup(e),s||(this.onFocusOut(),this.inputWrapper.container.classList.remove(I.inputFocus))}},s.prototype.activeStateChange=function(){this.isDocumentClick&&(this.hidePopup(),this.onFocusOut(),this.inputWrapper.container.classList.remove(I.inputFocus))},s.prototype.focusDropDown=function(e){!this.initial&&this.isFilterLayout()&&this.focusIn(e)},s.prototype.dropDownClick=function(e){if(3!==e.which&&2!==e.button&&!this.targetElement().classList.contains(I.disable)&&this.inputWrapper.clearButton!==e.target){var i=e.target;if(i===this.inputElement||this.allowFiltering&&i===this.filterInput||"combobox"===this.getModuleName()||e.preventDefault(),this.readonly)this.focusIn(e);else{this.isPopupOpen?(this.hidePopup(),this.isFilterLayout()&&this.focusDropDown(e)):(this.focusIn(e),this.floatLabelChange(),this.queryString=""===this.inputElement.value.trim()?null:this.inputElement.value,this.isDropDownClick=!0,this.showPopup());var s=this,l=t.isBlazor()?1e3:this.element.tagName===this.getNgDirective()&&this.itemTemplate?500:100;this.isSecondClick||setTimeout(function(){s.cloneElements(),s.isSecondClick=!0},l)}}},s.prototype.cloneElements=function(){if(this.list){var e=this.list.querySelector("ul");e&&(e=e.cloneNode?e.cloneNode(!0):e,this.actionCompleteData.ulElement=e)}},s.prototype.updateSelectedItem=function(e,i,s,l){var o=this;this.removeSelection(),e.classList.add(k.selected),this.removeHover();var r=this.getFormattedValue(e.getAttribute("data-value")),n=this.getDataByValue(r);if(this.initial||s||t.isNullOrUndefined(i))this.selectEventCallback(e,i,s,n,r),this.isServerBlazor&&this.interopAdaptor.invokeMethodAsync("OnServerItemData",this.itemData),l&&this.setSelectOptions(e,i);else{var a=this.detachChanges(n);this.isSelected=!0;var h={e:i,item:e,itemData:a,isInteracted:!!i,cancel:!1};this.trigger("select",h,function(t){t.cancel?e.classList.remove(k.selected):(o.selectEventCallback(e,i,s,n,r),o.isServerBlazor&&o.interopAdaptor.invokeMethodAsync("OnServerItemData",o.itemData),l&&o.setSelectOptions(e,i))})}},s.prototype.selectEventCallback=function(e,i,s,l,o){this.previousItemData=t.isNullOrUndefined(this.itemData)?null:this.itemData,this.item=e,this.itemData=l;var r=this.list.querySelector("."+k.focus);r&&t.removeClass([r],k.focus),e.setAttribute("aria-selected","true"),this.activeIndex=this.getIndexByValue(o)},s.prototype.activeItem=function(e){this.isValidLI(e)&&!e.classList.contains(k.selected)&&(this.removeSelection(),e.classList.add(k.selected),this.removeHover(),e.setAttribute("aria-selected","true"))},s.prototype.setValue=function(e){var i=this.getItemData();null===i.value?t.isBlazor()&&null!==i.text||""!==i.text?o.Input.setValue(i.text,this.inputElement,this.floatLabelType,this.showClearButton):o.Input.setValue(null,this.inputElement,this.floatLabelType,this.showClearButton):o.Input.setValue(i.text,this.inputElement,this.floatLabelType,this.showClearButton),this.isServerBlazor&&this.interopAdaptor.invokeMethodAsync("OnServerValueTemplate",i),this.valueTemplate&&null!==this.itemData&&!this.isServerBlazor?(this.DropDownBaseresetBlazorTemplates(!1,!1,!1,!1,!0),this.setValueTemplate()):this.inputElement.previousSibling===this.valueTempElement&&(t.detach(this.valueTempElement),this.inputElement.style.display="block");var s=I.clearIcon,l=this.isFiltering()&&this.filterInput&&"combobox"===this.getModuleName()&&this.filterInput.parentElement.querySelector("."+s);return this.isFiltering()&&l&&l.style.removeProperty("visibility"),this.previousValue===i.value?(this.isSelected=!1,!0):(this.isSelected=!this.initial,this.isSelectCustom=!1,"dropdownlist"===this.getModuleName()&&this.updateIconState(),!1)},s.prototype.setSelection=function(e,t){this.isValidLI(e)&&(!e.classList.contains(k.selected)||this.isPopupOpen&&this.isSelected&&e.classList.contains(k.selected))?this.updateSelectedItem(e,t,!1,!0):this.setSelectOptions(e,t)},s.prototype.setSelectOptions=function(e,i){this.list&&this.removeHover(),this.previousSelectedLI=t.isNullOrUndefined(this.selectedLI)?null:this.selectedLI,this.selectedLI=e,this.setValue(i)||(this.isPopupOpen&&(t.attributes(this.targetElement(),{"aria-activedescendant":this.selectedLI?this.selectedLI.id:null}),this.isFilterLayout()&&this.filterInput&&t.attributes(this.filterInput,{"aria-activedescendant":this.selectedLI?this.selectedLI.id:null})),(!this.isPopupOpen&&!t.isNullOrUndefined(e)||this.isPopupOpen&&!t.isNullOrUndefined(i)&&("keydown"!==i.type||"keydown"===i.type&&"enter"===i.action))&&(this.isSelectCustom=!1,this.onChangeEvent(i)),!this.isPopupOpen||t.isNullOrUndefined(this.selectedLI)||null===this.itemData||i&&"click"===i.type||this.setScrollPosition(i),"mozilla"!==t.Browser.info.name&&(t.attributes(this.inputElement,{"aria-label":this.inputElement.value}),t.attributes(this.targetElement(),{"aria-describedby":this.inputElement.id}),this.targetElement().removeAttribute("aria-live")))},s.prototype.dropdownCompiler=function(e){var t=!1;if(e)try{t=!!document.querySelectorAll(e).length}catch(e){t=!1}return t},s.prototype.setValueTemplate=function(){var e;this.isReact&&this.clearTemplate(["valueTemplate"]),this.valueTempElement||(this.valueTempElement=this.createElement("span",{className:I.value}),this.inputElement.parentElement.insertBefore(this.valueTempElement,this.inputElement),this.inputElement.style.display="none"),this.valueTempElement.innerHTML="";var i=t.isBlazor()?JSON.parse(JSON.stringify(this.itemData)):this.itemData,s=(e=this.dropdownCompiler(this.valueTemplate)?t.compile(document.querySelector(this.valueTemplate).innerHTML.trim()):t.compile(this.valueTemplate))(i,this,"valueTemplate",this.valueTemplateId,this.isStringTemplate,null,this.valueTempElement);if(s&&s.length>0)for(var l=0;l<s.length;l++)this.valueTempElement.appendChild(s[l]);this.renderReactTemplates(),this.DropDownBaseupdateBlazorTemplates(!1,!1,!1,!1,!0,!0,!0)},s.prototype.removeSelection=function(){if(this.list){var e=this.list.querySelectorAll("."+k.selected);e.length&&(t.removeClass(e,k.selected),e[0].removeAttribute("aria-selected"))}},s.prototype.getItemData=function(){var e=this.fields,i=null;i=this.itemData;var s,l;return t.isNullOrUndefined(i)||(s=t.getValue(e.value,i),l=t.getValue(e.text,i)),{value:t.isNullOrUndefined(i)||t.isUndefined(s)?i:s,text:t.isNullOrUndefined(i)||t.isUndefined(s)?i:l}},s.prototype.onChangeEvent=function(e){var t=this.getItemData(),i=this.isSelectCustom?null:this.activeIndex;this.setProperties({index:i,text:t.text,value:t.value},!0),this.detachChangeEvent(e)},s.prototype.detachChanges=function(e){return"string"==typeof e||"boolean"==typeof e||"number"==typeof e?Object.defineProperties({},{value:{value:e,enumerable:!0},text:{value:e,enumerable:!0}}):e},s.prototype.detachChangeEvent=function(e){if(this.isSelected=!1,this.previousValue=this.value,this.activeIndex=this.index,this.typedString=t.isNullOrUndefined(this.text)?"":this.text,!this.initial){var i=this.detachChanges(this.itemData),s=void 0;s="string"==typeof this.previousItemData||"boolean"==typeof this.previousItemData||"number"==typeof this.previousItemData?Object.defineProperties({},{value:{value:this.previousItemData,enumerable:!0},text:{value:this.previousItemData,enumerable:!0}}):this.previousItemData,this.setHiddenValue();var l={e:e,item:this.item,itemData:i,previousItem:this.previousSelectedLI,previousItemData:s,isInteracted:!!e,value:this.value,element:this.element};this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",l),this.isServerBlazor&&this.enablePersistence&&this.interopAdaptor.invokeMethodAsync("ServerChange")}!t.isNullOrUndefined(this.value)&&""!==this.value||"Always"===this.floatLabelType||t.removeClass([this.inputWrapper.container],"e-valid-input")},s.prototype.setHiddenValue=function(){if(t.isNullOrUndefined(this.value))this.isServerBlazor||(this.hiddenElement.innerHTML="");else if(this.isServerBlazor&&this.hiddenElement.querySelector("option"))(e=this.hiddenElement.querySelector("option")).textContent=this.text,e.setAttribute("value",this.value.toString());else if(!this.isServerBlazor){this.hiddenElement.innerHTML="<option selected>"+this.text+"</option>";var e=this.hiddenElement.querySelector("option");e.setAttribute("value",this.value.toString())}},s.prototype.onFilterUp=function(e){if(e.ctrlKey&&86===e.keyCode||!this.isValidKey&&40!==e.keyCode&&38!==e.keyCode)this.isValidKey=!1;else switch(this.isValidKey=!1,e.keyCode){case 38:case 40:"autocomplete"!==this.getModuleName()||this.isPopupOpen||this.preventAltUp||this.isRequested?this.preventAutoFill=!1:(this.preventAutoFill=!0,this.searchLists(e)),this.preventAltUp=!1,e.preventDefault();break;case 46:case 8:this.typedString=this.filterInput.value,!this.isPopupOpen&&""!==this.typedString||this.isPopupOpen&&this.queryString.length>0?(this.preventAutoFill=!0,this.searchLists(e)):""===this.typedString&&""===this.queryString&&"autocomplete"!==this.getModuleName()?(this.preventAutoFill=!0,this.searchLists(e)):""===this.typedString&&(this.list&&this.resetFocusElement(),this.activeIndex=null,"dropdownlist"!==this.getModuleName()&&(this.preventAutoFill=!0,this.searchLists(e),"autocomplete"===this.getModuleName()&&this.hidePopup())),e.preventDefault();break;default:this.typedString=this.filterInput.value,this.preventAutoFill=!1,this.searchLists(e)}},s.prototype.onFilterDown=function(e){switch(e.keyCode){case 13:break;case 40:case 38:this.queryString=this.filterInput.value,e.preventDefault();break;case 9:this.isPopupOpen&&"autocomplete"!==this.getModuleName()&&e.preventDefault();break;default:this.prevSelectPoints=this.getSelectionPoints(),this.queryString=this.filterInput.value}},s.prototype.removeFillSelection=function(){if(this.isInteracted){var e=this.getSelectionPoints();this.inputElement.setSelectionRange(e.end,e.end)}},s.prototype.getQuery=function(e){var t;if(!this.isCustomFilter&&this.allowFiltering&&this.filterInput){t=e?e.clone():this.query?this.query.clone():new i.Query;var s=""===this.typedString?"contains":this.filterType,l=this.typeOfData(this.dataSource).typeof;if((this.dataSource instanceof i.DataManager||"string"!==l)&&"number"!==l){var o=this.fields.text?this.fields.text:"";t.where(o,s,this.typedString,this.ignoreCase,this.ignoreAccent)}else t.where("",s,this.typedString,this.ignoreCase,this.ignoreAccent)}else t=e?e.clone():this.query?this.query.clone():new i.Query;return t},s.prototype.getSelectionPoints=function(){var e=this.inputElement;return{start:Math.abs(e.selectionStart),end:Math.abs(e.selectionEnd)}},s.prototype.searchLists=function(e){var t=this;if(this.isTyped=!0,this.activeIndex=null,this.isListSearched=!0,this.filterInput.parentElement.querySelector("."+I.clearIcon)&&(this.filterInput.parentElement.querySelector("."+I.clearIcon).style.visibility=""===this.filterInput.value?"hidden":"visible"),this.isDataFetched=!1,this.isFiltering())if(this.isServerBlazor)this.beforePopupOpen="combobox"===this.getModuleName()&&this.isFiltering()&&!this.beforePopupOpen?!this.beforePopupOpen:this.beforePopupOpen,""===this.filterInput.value&&"dropdownlist"!==this.getModuleName()?this.interopAdaptor.invokeMethodAsync("OnServerRenderList",this.beforePopupOpen,!1):this.interopAdaptor.invokeMethodAsync("OnServerFilter",this.filterInput.value);else{var i={preventDefaultAction:!1,text:this.filterInput.value,updateData:function(e,s,l){i.cancel||(t.isCustomFilter=!0,t.filteringAction(e,s,l))},baseEventArgs:e,cancel:!1};this.trigger("filtering",i,function(e){e.cancel||t.isCustomFilter||e.preventDefaultAction||t.filteringAction(t.dataSource,null,t.fields)})}},s.prototype.filter=function(e,t,i){this.isCustomFilter=!0,this.filteringAction(e,t,i)},s.prototype.filteringAction=function(e,i,s){t.isNullOrUndefined(this.filterInput)||(this.beforePopupOpen=!(!this.isPopupOpen&&"combobox"===this.getModuleName()&&""===this.filterInput.value),""!==this.filterInput.value.trim()||this.itemTemplate?(this.isNotSearchList=!1,i=""===this.filterInput.value.trim()?null:i,this.resetList(e,s,i)):(this.actionCompleteData.isUpdated=!1,this.isTyped=!1,t.isNullOrUndefined(this.actionCompleteData.ulElement)||t.isNullOrUndefined(this.actionCompleteData.list)||this.onActionComplete(this.actionCompleteData.ulElement,this.actionCompleteData.list),this.isTyped=!0,t.isNullOrUndefined(this.itemData)||"dropdownlist"!==this.getModuleName()||(this.focusIndexItem(),this.setScrollPosition()),this.isNotSearchList=!0),this.renderReactTemplates())},s.prototype.setSearchBox=function(e){if(this.isFiltering()){var i=e.querySelector("."+I.filterParent)?e.querySelector("."+I.filterParent):this.createElement("span",{className:I.filterParent});this.isServerBlazor&&(i.innerHTML=""),this.filterInput=this.createElement("input",{attrs:{type:"text"},className:I.filterInput}),this.element.parentNode.insertBefore(this.filterInput,this.element);var s=!1;return t.Browser.isDevice&&(s=!0),this.filterInputObj=o.Input.createInput({element:this.filterInput,buttons:s?[I.backIcon,I.filterBarClearIcon]:[I.filterBarClearIcon],properties:{placeholder:this.filterBarPlaceholder}},this.createElement),t.isNullOrUndefined(this.cssClass)||(-1!==this.cssClass.split(" ").indexOf("e-outline")?t.addClass([this.filterInputObj.container],"e-outline"):-1!==this.cssClass.split(" ").indexOf("e-filled")&&t.addClass([this.filterInputObj.container],"e-filled")),t.append([this.filterInputObj.container],i),t.prepend([i],e),t.attributes(this.filterInput,{"aria-disabled":"false","aria-owns":this.element.id+"_options",role:"listbox","aria-activedescendant":this.selectedLI?this.selectedLI.id:null,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false"}),this.clearIconElement=this.filterInput.parentElement.querySelector("."+I.clearIcon),!t.Browser.isDevice&&this.clearIconElement&&(t.EventHandler.add(this.clearIconElement,"click",this.clearText,this),this.clearIconElement.style.visibility="hidden"),t.Browser.isDevice?this.searchKeyModule=new t.KeyboardEvents(this.filterInput,{keyAction:this.mobileKeyActionHandler.bind(this),keyConfigs:this.keyConfigure,eventName:"keydown"}):this.searchKeyModule=new t.KeyboardEvents(this.filterInput,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigure,eventName:"keydown"}),t.EventHandler.add(this.filterInput,"input",this.onInput,this),t.EventHandler.add(this.filterInput,"keyup",this.onFilterUp,this),t.EventHandler.add(this.filterInput,"keydown",this.onFilterDown,this),t.EventHandler.add(this.filterInput,"blur",this.onBlur,this),t.EventHandler.add(this.filterInput,"paste",this.pasteHandler,this),this.filterInputObj}return L},s.prototype.onInput=function(e){this.isValidKey=!0,t.Browser.isDevice&&"mozilla"===t.Browser.info.name&&(this.typedString=this.filterInput.value,this.preventAutoFill=!0,this.searchLists(e))},s.prototype.pasteHandler=function(e){var t=this;setTimeout(function(){t.typedString=t.filterInput.value,t.searchLists(e)})},s.prototype.onActionFailure=function(t){e.prototype.onActionFailure.call(this,t),this.beforePopupOpen&&this.renderPopup()},s.prototype.onActionComplete=function(s,l,o,r){var n=this;if(this.isNotSearchList)return void(this.isNotSearchList=!1);if(this.isActive){var a=this.selectedLI?this.selectedLI.cloneNode(!0):null;if(e.prototype.onActionComplete.call(this,s,l,o),this.updateSelectElementData(this.allowFiltering),this.isRequested&&!t.isNullOrUndefined(this.searchKeyEvent)&&"keydown"===this.searchKeyEvent.type&&(this.isRequested=!1,this.keyActionHandler(this.searchKeyEvent),this.searchKeyEvent=null),this.isRequested&&!t.isNullOrUndefined(this.searchKeyEvent)&&(this.incrementalSearch(this.searchKeyEvent),this.searchKeyEvent=null),this.list.scrollTop=0,t.isNullOrUndefined(s)||t.attributes(s,{id:this.element.id+"_options",role:"listbox","aria-hidden":"false"}),this.initRemoteRender&&(this.initial=!0,this.activeIndex=this.index,this.updateValues(),this.initRemoteRender=!1,this.initial=!1,this.value&&this.dataSource instanceof i.DataManager)){var h=t.isNullOrUndefined(this.fields.value)?this.fields.text:this.fields.value;l.some(function(e){return e[h]===n.value})||this.dataSource.executeQuery(this.getQuery(this.query).where(new i.Predicate(h,"equal",this.value))).then(function(e){e.result.length>0&&(n.addItem(e.result,l.length),n.updateValues())})}"autocomplete"!==this.getModuleName()&&this.isFiltering()&&!this.isTyped&&((!this.actionCompleteData.isUpdated||!this.isCustomFilter&&!this.isFilterFocus||t.isNullOrUndefined(this.itemData)&&this.allowFiltering&&(this.dataSource instanceof i.DataManager||!t.isNullOrUndefined(this.dataSource)&&!t.isNullOrUndefined(this.dataSource.length)&&0!==this.dataSource.length))&&(this.itemTemplate&&"EJS-COMBOBOX"===this.element.tagName&&this.allowFiltering?setTimeout(function(){n.updateActionCompleteDataValues(s,l)},0):this.updateActionCompleteDataValues(s,l)),this.addNewItem(l,a),t.isNullOrUndefined(this.itemData)||this.focusIndexItem()),this.beforePopupOpen&&this.renderPopup()}},s.prototype.updateActionCompleteDataValues=function(e,i){this.actionCompleteData={ulElement:e.cloneNode(!0),list:i,isUpdated:!0},t.isNullOrUndefined(this.actionData.ulElement)&&t.isNullOrUndefined(this.actionData.list)&&(this.actionData=this.actionCompleteData)},s.prototype.addNewItem=function(e,i){var s=this;if(!t.isNullOrUndefined(this.itemData)&&!t.isNullOrUndefined(i)){var l=this.getItemData().value;e.some(function(e){return("string"==typeof e||"number"==typeof e)&&e===l||t.getValue(s.fields.value,e)===l})||this.addItem(this.itemData)}},s.prototype.updateActionCompleteData=function(e,t,i){var s=this;"autocomplete"!==this.getModuleName()&&this.actionCompleteData.ulElement&&(this.itemTemplate&&"EJS-COMBOBOX"===this.element.tagName&&this.allowFiltering?setTimeout(function(){s.actionCompleteDataUpdate(e,t,i)},0):this.actionCompleteDataUpdate(e,t,i))},s.prototype.actionCompleteDataUpdate=function(e,t,i){null!=i?this.actionCompleteData.ulElement.insertBefore(e.cloneNode(!0),this.actionCompleteData.ulElement.childNodes[i]):this.actionCompleteData.ulElement.appendChild(e.cloneNode(!0)),this.isFiltering()&&this.actionCompleteData.list.indexOf(t)<0&&this.actionCompleteData.list.push(t)},s.prototype.focusIndexItem=function(){var e=this.getItemData().value;this.activeIndex=this.getIndexByValue(e);var t=this.findListElement(this.list,"li","data-value",e);this.selectedLI=t,this.activeItem(t),this.removeFocus()},s.prototype.updateSelection=function(){var e=this.list.querySelector("."+k.selected);e?(this.setProperties({index:this.getIndexByValue(e.getAttribute("data-value"))}),this.activeIndex=this.index):(this.removeFocus(),this.list.querySelector("."+k.li).classList.add(I.focus))},s.prototype.removeFocus=function(){var e=this.list.querySelectorAll("."+I.focus);e&&e.length&&t.removeClass(e,I.focus)},s.prototype.renderPopup=function(){var e=this;if(this.popupObj&&document.body.contains(this.popupObj.element))return void this.refreshPopup();var i={cancel:!1};this.trigger("beforeOpen",i,function(i){if(i.cancel)e.beforePopupOpen=!1;else{var s=e.serverPopupEle?e.serverPopupEle:e.createElement("div",{id:e.element.id+"_popup",className:"e-ddl e-popup "+(null!=e.cssClass?e.cssClass:"")}),l=e.setSearchBox(s);if(e.listHeight=t.formatUnit(e.popupHeight),e.headerTemplate&&!e.isServerBlazor&&e.setHeaderTemplate(s),t.append([e.list],s),e.footerTemplate&&!e.isServerBlazor&&e.setFooterTemplate(s),e.isServerRendered&&s&&s.querySelector(".e-ddl-footer")&&s.appendChild(s.querySelector(".e-ddl-footer")),document.body.appendChild(s),e.updateServerPopup(s),s.style.visibility="hidden","auto"!==e.popupHeight){if(e.searchBoxHeight=0,t.isNullOrUndefined(l.container)||(e.searchBoxHeight=l.container.parentElement.getBoundingClientRect().height,e.listHeight=(parseInt(e.listHeight,10)-e.searchBoxHeight).toString()+"px"),e.headerTemplate||e.isServerRendered&&s&&s.querySelector(".e-ddl-header")){e.header=e.header?e.header:s.querySelector(".e-ddl-header");o=Math.round(e.header.getBoundingClientRect().height);e.listHeight=(parseInt(e.listHeight,10)-(o+e.searchBoxHeight)).toString()+"px"}if(e.footerTemplate||e.isServerRendered&&s&&s.querySelector(".e-ddl-footer")){e.footer=e.footer?e.footer:s.querySelector(".e-ddl-footer");var o=Math.round(e.footer.getBoundingClientRect().height);e.listHeight=(parseInt(e.listHeight,10)-(o+e.searchBoxHeight)).toString()+"px"}e.list.style.maxHeight=(parseInt(e.listHeight,10)-2).toString()+"px",s.style.maxHeight=t.formatUnit(e.popupHeight)}else s.style.height="auto";var r=0,n=void 0;if(!t.isNullOrUndefined(e.selectedLI)&&!t.isNullOrUndefined(e.activeIndex)&&e.activeIndex>=0?e.setScrollPosition():e.list.scrollTop=0,t.Browser.isDevice&&!e.allowFiltering&&("dropdownlist"===e.getModuleName()||e.isDropDownClick&&"combobox"===e.getModuleName())){r=e.getOffsetValue(s);var a=e.isEmptyList()?e.list:e.liCollections[0];n=-(parseInt(getComputedStyle(a).textIndent,10)-parseInt(getComputedStyle(e.inputElement).paddingLeft,10)+parseInt(getComputedStyle(e.inputElement.parentElement).borderLeftWidth,10))}e.getFocusElement(),e.createPopup(s,r,n),e.checkCollision(s),t.Browser.isDevice&&(e.popupObj.element.classList.add(I.device),("dropdownlist"===e.getModuleName()||"combobox"===e.getModuleName()&&!e.allowFiltering&&e.isDropDownClick)&&(e.popupObj.collision={X:"fit",Y:"fit"}),e.isFilterLayout()&&(e.popupObj.element.classList.add(I.mobileFilter),e.popupObj.position={X:0,Y:0},e.popupObj.dataBind(),t.attributes(e.popupObj.element,{style:"left:0px;right:0px;top:0px;bottom:0px;"}),t.addClass([document.body,e.popupObj.element],I.popupFullScreen),e.setSearchBoxPosition(),e.backIconElement=l.container.querySelector(".e-back-icon"),e.clearIconElement=l.container.querySelector("."+I.clearIcon),t.EventHandler.add(e.backIconElement,"click",e.clickOnBackIcon,e),t.EventHandler.add(e.clearIconElement,"click",e.clearText,e))),s.style.visibility="visible",t.addClass([s],"e-popup-close");for(var h=0,p=e.popupObj.getScrollableParent(e.inputWrapper.container);h<p.length;h++){var u=p[h];t.EventHandler.add(u,"scroll",e.scrollHandler,e)}t.Browser.isDevice&&e.isFilterLayout()&&t.EventHandler.add(e.list,"scroll",e.listScroll,e),t.isNullOrUndefined(e.list)||(e.unWireListEvents(),e.wireListEvents()),t.attributes(e.targetElement(),{"aria-expanded":"true"});var c=e.isFiltering()?e.filterInput.parentElement:e.inputWrapper.container;t.addClass([c],[I.inputFocus]);var d={name:"FadeIn",duration:100};e.beforePopupOpen=!0;var m={popup:t.isBlazor()&&e.isServerRendered?null:e.popupObj,cancel:!1,animation:d};e.trigger("open",m,function(i){i.cancel?(e.beforePopupOpen=!1,e.destroyPopup()):(e.serverBlazorUpdateSelection(),e.bindServerScrollEvent(),t.addClass([e.inputWrapper.container],[I.iconAnimation]),e.renderReactTemplates(),e.popupObj.show(new t.Animation(i.animation),1e3===e.zIndex?e.element:null))})}})},s.prototype.checkCollision=function(e){(!t.Browser.isDevice||t.Browser.isDevice&&"dropdownlist"!==this.getModuleName()&&!this.isDropDownClick)&&(l.isCollide(e).length>0&&(e.style.marginTop=-parseInt(getComputedStyle(e).marginTop,10)+"px"),this.popupObj.resolveCollision())},s.prototype.serverBlazorUpdateSelection=function(){(this.isServerBlazor&&(null!==this.value||null!==this.index||null!==this.text)||"dropdownlist"!==this.getModuleName()&&!this.isTyped)&&("dropdownlist"===this.getModuleName()&&(this.removeSelection(),this.removeFocus(),this.removeHover(),this.updateValues()),"combobox"===this.getModuleName()&&this.ulElement&&this.findListElement(this.ulElement,"li","data-value",this.value)&&!this.isTyped&&this.updateValues(),this.isServerBlazor&&"dropdownlist"!==this.getModuleName()&&(""===this.text||null===this.text)&&this.ulElement&&(this.ulElement.querySelector("li").classList.contains(k.hover)||t.addClass([this.ulElement.querySelector("li")],k.hover)))},s.prototype.bindServerScrollEvent=function(){this.isServerBlazor&&this.list&&this.fields.groupBy&&!this.isGroupChecking&&(t.EventHandler.remove(this.list,"scroll",this.setFloatingHeader),t.EventHandler.add(this.list,"scroll",this.setFloatingHeader,this))},s.prototype.updateServerPopup=function(e){this.isServerBlazor&&(e&&e.querySelector("li")&&t.removeClass([e.querySelector(".e-content")],["e-nodata"]),this.initial=!1,e.removeAttribute("style"))},s.prototype.getOffsetValue=function(e){var t=getComputedStyle(e),i=parseInt(t.borderTopWidth,10),s=parseInt(t.borderBottomWidth,10);return this.setPopupPosition(i+s)},s.prototype.createPopup=function(e,i,s){var o=this;this.popupObj=new l.Popup(e,{width:this.setWidth(),targetType:"relative",relateTo:this.inputWrapper.container,collision:{X:"flip",Y:"flip"},offsetY:i,enableRtl:this.enableRtl,offsetX:s,position:{X:"left",Y:"bottom"},zIndex:this.zIndex,close:function(){o.isDocumentClick||o.focusDropDown(),o.isReact&&o.clearTemplate(["headerTemplate","footerTemplate"]);var e="autocomplete"===o.getModuleName();o.DropDownBaseresetBlazorTemplates(e,e,!0,!0,!1,!0,!0),o.isNotSearchList=!1,o.isDocumentClick=!1,o.destroyPopup(),o.isFiltering()&&o.actionCompleteData.list&&o.actionCompleteData.list[0]&&(o.isActive=!0,o.onActionComplete(o.actionCompleteData.ulElement,o.actionCompleteData.list,null,!0))},open:function(){t.EventHandler.add(document,"mousedown",o.onDocumentClick,o),o.isPopupOpen=!0;var e=o.actionCompleteData&&o.actionCompleteData.ulElement&&o.actionCompleteData.ulElement.querySelector("li"),i=o.list.querySelector("ul li");o.isFiltering()&&o.itemTemplate&&o.element.tagName===o.getNgDirective()&&e&&i&&e.textContent!==i.textContent&&"EJS-COMBOBOX"!==o.element.tagName&&o.cloneElements(),o.isFilterLayout()&&(t.removeClass([o.inputWrapper.container],[I.inputFocus]),o.isFilterFocus=!0,o.filterInput.focus(),o.inputWrapper.clearButton&&t.addClass([o.inputWrapper.clearButton],I.clearIconHide)),o.activeStateChange()},targetExitViewport:function(){t.Browser.isDevice||o.hidePopup()}})},s.prototype.isEmptyList=function(){return!t.isNullOrUndefined(this.liCollections)&&0===this.liCollections.length},s.prototype.getFocusElement=function(){},s.prototype.isFilterLayout=function(){return"dropdownlist"===this.getModuleName()&&this.allowFiltering},s.prototype.scrollHandler=function(){t.Browser.isDevice&&("dropdownlist"===this.getModuleName()&&!this.isFilterLayout()||"combobox"===this.getModuleName()&&!this.allowFiltering&&this.isDropDownClick)&&this.hidePopup()},s.prototype.setSearchBoxPosition=function(){var e=this.filterInput.parentElement.getBoundingClientRect().height;this.popupObj.element.style.maxHeight="100%",this.popupObj.element.style.width="100%",this.list.style.maxHeight=window.innerHeight-e+"px",this.list.style.height=window.innerHeight-e+"px";var i=this.filterInput.parentElement.querySelector("."+I.clearIcon);t.detach(this.filterInput),i.parentElement.insertBefore(this.filterInput,i)},s.prototype.setPopupPosition=function(e){var i,s=e,l=this.list.querySelector("."+I.focus)||this.selectedLI,o=this.isEmptyList()?this.list:this.liCollections[0],r=this.isEmptyList()?this.list:this.liCollections[this.getItems().length-1],n=o.getBoundingClientRect().height,a=this.list.offsetHeight/2,h=t.isNullOrUndefined(l)?o.offsetTop:l.offsetTop;if(r.offsetTop-a<h&&!t.isNullOrUndefined(this.liCollections)&&this.liCollections.length>0&&!t.isNullOrUndefined(l)){var p=this.list.offsetHeight/n,u=parseInt(getComputedStyle(this.list).paddingBottom,10);i=(p-(this.liCollections.length-this.activeIndex))*n-s+u,this.list.scrollTop=l.offsetTop}else h>a?(i=a-n/2,this.list.scrollTop=h-a+n/2):i=h;return-(i=i+n+s-(n-this.inputWrapper.container.offsetHeight)/2)},s.prototype.setWidth=function(){var e=t.formatUnit(this.popupWidth);if(e.indexOf("%")>-1&&(e=(this.inputWrapper.container.offsetWidth*parseFloat(e)/100).toString()+"px"),t.Browser.isDevice&&!this.allowFiltering&&("dropdownlist"===this.getModuleName()||this.isDropDownClick&&"combobox"===this.getModuleName())){var i=this.isEmptyList()?this.list:this.liCollections[0];e=parseInt(e,10)+2*(parseInt(getComputedStyle(i).textIndent,10)-parseInt(getComputedStyle(this.inputElement).paddingLeft,10)+parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth,10))+"px"}return e},s.prototype.scrollBottom=function(e){if(!t.isNullOrUndefined(this.selectedLI)){var i=this.list.offsetHeight,s=this.selectedLI.offsetTop+this.selectedLI.offsetHeight-this.list.scrollTop,l=this.list.scrollTop+s-i;l=e?l+2*parseInt(getComputedStyle(this.list).paddingTop,10):l;var o=this.selectedLI.offsetTop+this.selectedLI.offsetHeight-this.list.scrollTop;o=this.fields.groupBy&&!t.isNullOrUndefined(this.fixedHeaderElement)?o-this.fixedHeaderElement.offsetHeight:o,0===this.activeIndex?this.list.scrollTop=0:(s>i||!(o>0&&this.list.offsetHeight>o))&&(this.list.scrollTop=l)}},s.prototype.scrollTop=function(){if(!t.isNullOrUndefined(this.selectedLI)){var e=this.selectedLI.offsetTop-this.list.scrollTop;e=this.fields.groupBy&&!t.isNullOrUndefined(this.fixedHeaderElement)?e-this.fixedHeaderElement.offsetHeight:e;var i=this.selectedLI.offsetTop+this.selectedLI.offsetHeight-this.list.scrollTop;0===this.activeIndex?this.list.scrollTop=0:e<0?this.list.scrollTop=this.list.scrollTop+e:i>0&&this.list.offsetHeight>i||(this.list.scrollTop=this.selectedLI.offsetTop-(this.fields.groupBy&&!t.isNullOrUndefined(this.fixedHeaderElement)?this.fixedHeaderElement.offsetHeight:0))}},s.prototype.isEditTextBox=function(){return!1},s.prototype.isFiltering=function(){return this.allowFiltering},s.prototype.isPopupButton=function(){return!0},s.prototype.setScrollPosition=function(e){if(t.isNullOrUndefined(e))this.scrollBottom(!0);else switch(e.action){case"pageDown":case"down":case"end":this.scrollBottom();break;default:this.scrollTop()}},s.prototype.clearText=function(){this.filterInput.value=this.typedString="",this.searchLists(null)},s.prototype.listScroll=function(){this.filterInput.blur()},s.prototype.setEleWidth=function(e){t.isNullOrUndefined(e)||("number"==typeof e?this.inputWrapper.container.style.width=t.formatUnit(e):"string"==typeof e&&(this.inputWrapper.container.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)))},s.prototype.closePopup=function(e){var i=this;if(this.isTyped=!1,this.popupObj&&document.body.contains(this.popupObj.element)&&this.beforePopupOpen){t.EventHandler.remove(document,"mousedown",this.onDocumentClick),this.isActive=!1,this.filterInputObj=null,this.isDropDownClick=!1,this.preventAutoFill=!1;for(var s=0,l=this.popupObj.getScrollableParent(this.inputWrapper.container);s<l.length;s++){var o=l[s];t.EventHandler.remove(o,"scroll",this.scrollHandler)}t.Browser.isDevice&&this.isFilterLayout()&&(t.removeClass([document.body,this.popupObj.element],I.popupFullScreen),t.EventHandler.remove(this.list,"scroll",this.listScroll)),this.isFilterLayout()&&(t.Browser.isDevice||(this.searchKeyModule.destroy(),this.clearIconElement&&t.EventHandler.remove(this.clearIconElement,"click",this.clearText)),this.backIconElement&&(t.EventHandler.remove(this.backIconElement,"click",this.clickOnBackIcon),t.EventHandler.remove(this.clearIconElement,"click",this.clearText)),t.EventHandler.remove(this.filterInput,"input",this.onInput),t.EventHandler.remove(this.filterInput,"keyup",this.onFilterUp),t.EventHandler.remove(this.filterInput,"keydown",this.onFilterDown),t.EventHandler.remove(this.filterInput,"blur",this.onBlur),t.EventHandler.remove(this.filterInput,"paste",this.pasteHandler),this.filterInput=null),t.attributes(this.targetElement(),{"aria-expanded":"false","aria-activedescendant":null}),this.inputWrapper.container.classList.remove(I.iconAnimation),this.isFiltering()&&(this.actionCompleteData.isUpdated=!1),this.beforePopupOpen=!1;var r={name:"FadeOut",duration:100,delay:e||0},n={popup:t.isBlazor()&&this.isServerRendered?null:this.popupObj,cancel:!1,animation:r};this.trigger("close",n,function(e){if(!t.isNullOrUndefined(i.popupObj)&&!t.isNullOrUndefined(i.popupObj.element.querySelector(".e-fixed-head"))){var s=i.popupObj.element.querySelector(".e-fixed-head");s.parentNode.removeChild(s),i.fixedHeaderElement=null}e.cancel||("autocomplete"!==i.getModuleName()||i.isServerBlazor||i.rippleFun(),i.isPopupOpen?i.popupObj.hide(new t.Animation(e.animation)):i.destroyPopup())})}},s.prototype.destroyPopup=function(){var e=t.select("#"+this.element.id+"_popup_holder",document);this.isServerBlazor&&this.serverPopupEle&&e&&(e.appendChild(this.serverPopupEle),this.interopAdaptor.invokeMethodAsync("OnServerClosePopup")),this.isPopupOpen=!1,this.isFilterFocus=!1,this.popupObj.destroy(),t.detach(this.popupObj.element)},s.prototype.clickOnBackIcon=function(){this.hidePopup(),this.focusIn()},s.prototype.render=function(){if(this.isServerBlazor)this.inputElement=this.element,this.inputWrapper={container:this.element.parentElement},this.hiddenElement=this.inputWrapper.container.querySelector("select"),this.inputWrapper.buttons=[this.inputWrapper.container.querySelector(".e-input-group-icon.e-ddl-icon")],this.showClearButton&&(this.inputWrapper.clearButton=this.inputWrapper.container.querySelector(".e-clear-icon"),o.Input.wireClearBtnEvents(this.element,this.inputWrapper.clearButton,this.inputWrapper.container)),"Auto"===this.floatLabelType&&o.Input.wireFloatingEvents(this.element),o.Input.bindInitialEvent({element:this.element,buttons:null,customTag:null,floatLabelType:this.floatLabelType,properties:this.properties}),this.setFields(),this.wireEvent(),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.enabled||(this.targetElement().tabIndex=-1),this.element.hasAttribute("autofocus")&&this.focusIn(),this.initial=!1;else{"INPUT"===this.element.tagName?(this.inputElement=this.element,t.isNullOrUndefined(this.inputElement.getAttribute("role"))&&this.inputElement.setAttribute("role","textbox"),t.isNullOrUndefined(this.inputElement.getAttribute("type"))&&this.inputElement.setAttribute("type","text")):(this.inputElement=this.createElement("input",{attrs:{role:"textbox",type:"text"}}),this.element.tagName!==this.getNgDirective()&&(this.element.style.display="none"),this.element.parentElement.insertBefore(this.inputElement,this.element),this.preventTabIndex(this.inputElement));var e=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(e=this.cssClass.replace(/\s+/g," ").trim()),this.inputWrapper=o.Input.createInput({element:this.inputElement,buttons:this.isPopupButton()?[I.icon]:null,floatLabelType:this.floatLabelType,properties:{readonly:"dropdownlist"===this.getModuleName()||this.readonly,placeholder:this.placeholder,cssClass:e,enabled:this.enabled,enableRtl:this.enableRtl,showClearButton:this.showClearButton}},this.createElement),this.element.tagName===this.getNgDirective()?this.element.appendChild(this.inputWrapper.container):this.inputElement.parentElement.insertBefore(this.element,this.inputElement),this.hiddenElement=this.createElement("select",{attrs:{"aria-hidden":"true",tabindex:"-1",class:I.hiddenElement}}),t.prepend([this.hiddenElement],this.inputWrapper.container),this.validationAttribute(this.element,this.hiddenElement),this.setFields(),this.inputWrapper.container.style.width=t.formatUnit(this.width),this.inputWrapper.container.classList.add("e-ddl"),this.wireEvent(),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.removeAttribute("tabindex");var i=this.element.getAttribute("id")?this.element.getAttribute("id"):t.getUniqueID("ej2_dropdownlist");if(this.element.id=i,this.hiddenElement.id=i+"_hidden",this.targetElement().setAttribute("tabindex",this.tabIndex),t.attributes(this.targetElement(),this.getAriaAttributes()),this.updateDataAttribute(this.htmlAttributes),this.setHTMLAttributes(),null!==this.value||null!==this.activeIndex||null!==this.text)this.initValue();else if("SELECT"===this.element.tagName&&this.element.options[0]){var s=this.element;this.value=s.options[s.selectedIndex].value,this.text=t.isNullOrUndefined(this.value)?null:s.options[s.selectedIndex].textContent,this.initValue()}this.preventTabIndex(this.element),this.enabled||(this.targetElement().tabIndex=-1),this.initial=!1,this.element.style.opacity="",this.inputElement.onselect=function(e){e.stopImmediatePropagation()},this.inputElement.onchange=function(e){e.stopImmediatePropagation()},this.element.hasAttribute("autofocus")&&this.focusIn(),t.isNullOrUndefined(this.text)||this.inputElement.setAttribute("value",this.text)}this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),this.renderComplete()},s.prototype.setFooterTemplate=function(e){var i;this.footer?this.footer.innerHTML="":(this.footer=this.createElement("div"),t.addClass([this.footer],I.footer));var s=(i=this.dropdownCompiler(this.footerTemplate)?t.compile(t.select(this.footerTemplate,document).innerHTML.trim()):t.compile(this.footerTemplate))({},this,"footerTemplate",this.footerTemplateId,this.isStringTemplate,null,this.footer);if(s&&s.length>0)for(var l=0;l<s.length;l++)this.footer.appendChild(s[l]);this.DropDownBaseupdateBlazorTemplates(!1,!1,!1,!1,!1,!1,!0),t.append([this.footer],e)},s.prototype.setHeaderTemplate=function(e){var i;this.header?this.header.innerHTML="":(this.header=this.createElement("div"),t.addClass([this.header],I.header));var s=(i=this.dropdownCompiler(this.headerTemplate)?t.compile(t.select(this.headerTemplate,document).innerHTML.trim()):t.compile(this.headerTemplate))({},this,"headerTemplate",this.headerTemplateId,this.isStringTemplate,null,this.header);if(s&&s.length)for(var l=0;l<s.length;l++)this.header.appendChild(s[l]);this.DropDownBaseupdateBlazorTemplates(!1,!1,!1,!1,!1,!0,!1);var o=e.querySelector("div.e-content");e.insertBefore(this.header,o)},s.prototype.setOldText=function(e){this.text=e},s.prototype.setOldValue=function(e){this.value=e},s.prototype.refreshPopup=function(){t.isNullOrUndefined(this.popupObj)||!document.body.contains(this.popupObj.element)||(!this.allowFiltering||t.Browser.isDevice&&this.isFilterLayout())&&"autocomplete"!==this.getModuleName()||(t.removeClass([this.popupObj.element],"e-popup-close"),this.popupObj.refreshPosition(this.inputWrapper.container),this.popupObj.resolveCollision())},s.prototype.checkData=function(e){!e.dataSource||t.isNullOrUndefined(Object.keys(e.dataSource))||!this.itemTemplate||!this.allowFiltering||this.isListSearched&&e.dataSource instanceof i.DataManager||(this.list=null,this.actionCompleteData={ulElement:null,list:null,isUpdated:!1}),this.isListSearched=!1;var s=-1!==Object.keys(e).indexOf("value")&&t.isNullOrUndefined(e.value),l=-1!==Object.keys(e).indexOf("text")&&t.isNullOrUndefined(e.text);"autocomplete"!==this.getModuleName()&&this.allowFiltering&&(s||l)&&(this.itemData=null),this.allowFiltering&&e.dataSource&&!t.isNullOrUndefined(Object.keys(e.dataSource))?(this.actionCompleteData={ulElement:null,list:null,isUpdated:!1},this.actionData=this.actionCompleteData):this.allowFiltering&&e.query&&!t.isNullOrUndefined(Object.keys(e.query))&&(this.actionData=this.actionCompleteData)},s.prototype.updateDataSource=function(e){""===this.inputElement.value&&(t.isNullOrUndefined(e)||!t.isNullOrUndefined(e.dataSource)&&(e.dataSource instanceof i.DataManager||0!==e.dataSource.length))||this.clearAll(null,e),(t.isNullOrUndefined(e)||!t.isNullOrUndefined(e.dataSource)&&(e.dataSource instanceof i.DataManager||0!==e.dataSource.length)||e.dataSource!==[])&&(this.typedString="",this.resetList(this.dataSource)),this.isCustomFilter||this.isFilterFocus||document.activeElement===this.filterInput||this.checkCustomValue()},s.prototype.checkCustomValue=function(){this.itemData=this.getDataByValue(this.value);var e=this.getItemData();this.setProperties({value:e.value,text:e.text})},s.prototype.updateInputFields=function(){"dropdownlist"===this.getModuleName()&&o.Input.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton)},s.prototype.onPropertyChanged=function(s,l){"dropdownlist"===this.getModuleName()&&(this.isServerBlazor||(this.checkData(s),this.setUpdateInitial(["fields","query","dataSource"],s)));for(var r=0,n=Object.keys(s);r<n.length;r++){var a=n[r];switch(a){case"query":case"dataSource":break;case"htmlAttributes":this.setHTMLAttributes();break;case"width":this.setEleWidth(s.width);break;case"placeholder":o.Input.setPlaceholder(s.placeholder,this.inputElement);break;case"filterBarPlaceholder":this.filterInput&&o.Input.setPlaceholder(s.filterBarPlaceholder,this.filterInput);break;case"readonly":"dropdownlist"!==this.getModuleName()&&o.Input.setReadonly(s.readonly,this.inputElement);break;case"cssClass":this.setCssClass(s.cssClass,l.cssClass);break;case"enableRtl":this.setEnableRtl();break;case"enabled":this.setEnable();break;case"text":if(null===s.text){this.clearAll();break}if(this.list||(this.dataSource instanceof i.DataManager&&(this.initRemoteRender=!0),this.renderList()),!this.initRemoteRender){var h=this.getElementByText(s.text);this.checkValidLi(h)||(this.liCollections&&100===this.liCollections.length&&"autocomplete"===this.getModuleName()&&this.listData.length>100?this.setSelectionData(s.text,l.text,"text"):this.isServerBlazor||this.setOldText(l.text)),this.updateInputFields()}break;case"value":if(null===s.value){this.clearAll();break}if(this.notify("beforeValueChange",{newProp:s}),this.list||(this.dataSource instanceof i.DataManager&&(this.initRemoteRender=!0),this.renderList()),!this.initRemoteRender){var p=this.getElementByValue(s.value);this.checkValidLi(p)||(this.liCollections&&100===this.liCollections.length&&"autocomplete"===this.getModuleName()&&this.listData.length>100?this.setSelectionData(s.value,l.value,"value"):this.isServerBlazor||this.setOldValue(l.value)),this.updateInputFields(),this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange}break;case"index":if(null===s.index){this.clearAll();break}if(this.list||(this.dataSource instanceof i.DataManager&&(this.initRemoteRender=!0),this.renderList()),!this.initRemoteRender&&this.liCollections){var u=this.liCollections[s.index];this.checkValidLi(u)||(this.liCollections&&100===this.liCollections.length&&"autocomplete"===this.getModuleName()&&this.listData.length>100?this.setSelectionData(s.index,l.index,"index"):this.isServerBlazor||(this.index=l.index)),this.updateInputFields()}break;case"footerTemplate":this.popupObj&&this.setFooterTemplate(this.popupObj.element);break;case"headerTemplate":this.popupObj&&this.setHeaderTemplate(this.popupObj.element);break;case"valueTemplate":t.isNullOrUndefined(this.itemData)||null==this.valueTemplate||this.setValueTemplate();break;case"allowFiltering":this.allowFiltering&&(this.actionCompleteData={ulElement:this.ulElement,list:this.listData,isUpdated:!0},this.actionData=this.actionCompleteData,this.updateSelectElementData(this.allowFiltering));break;case"floatLabelType":o.Input.removeFloating(this.inputWrapper),o.Input.addFloating(this.inputElement,s.floatLabelType,this.placeholder,this.createElement);break;case"showClearButton":o.Input.setClearButton(s.showClearButton,this.inputElement,this.inputWrapper,null,this.createElement),this.bindClearEvent();break;default:var c=this.getPropObject(a,s,l);e.prototype.onPropertyChanged.call(this,c.newProperty,c.oldProperty)}}},s.prototype.checkValidLi=function(e){return!!this.isValidLI(e)&&(this.setSelection(e,null),!0)},s.prototype.setSelectionData=function(e,t,i){var s,l=this;this.updateListValues=function(){"text"===i?(s=l.getElementByText(e),l.checkValidLi(s)||l.setOldText(t)):"value"===i?(s=l.getElementByValue(e),l.checkValidLi(s)||l.setOldValue(t)):"index"===i&&(s=l.liCollections[e],l.checkValidLi(s)||(l.index=t))}},s.prototype.setCssClass=function(e,i){t.isNullOrUndefined(i)||(i=i.replace(/\s+/g," ").trim()),t.isNullOrUndefined(e)||(e=e.replace(/\s+/g," ").trim()),o.Input.setCssClass(e,[this.inputWrapper.container],i),this.popupObj&&o.Input.setCssClass(e,[this.popupObj.element],i)},s.prototype.getModuleName=function(){return"dropdownlist"},s.prototype.showPopup=function(){if(this.enabled){if(t.isBlazor()&&this.itemTemplate&&this.DropDownBaseupdateBlazorTemplates(!0,!1,!1,!1),this.isFiltering()&&this.dataSource instanceof i.DataManager&&this.actionData.list!=this.actionCompleteData.list&&this.actionData.list&&this.actionData.ulElement&&(this.actionCompleteData=this.actionData,this.onActionComplete(this.actionCompleteData.ulElement,this.actionCompleteData.list,null,!0)),this.beforePopupOpen)return void this.refreshPopup();this.beforePopupOpen=!0,this.isFiltering()&&!this.isActive&&this.actionCompleteData.list&&this.actionCompleteData.list[0]?(this.isActive=!0,this.onActionComplete(this.actionCompleteData.ulElement,this.actionCompleteData.list,null,!0)):t.isNullOrUndefined(this.list)||!t.isUndefined(this.list)&&(this.list.classList.contains(k.noData)||this.list.querySelectorAll("."+k.li).length<=0)?this.renderList():this.isFiltering()&&this.isServerBlazor&&this.renderList(),this.isServerBlazor||this.invokeRenderPopup();var e=!this.isFiltering()||t.select("#"+this.element.id+"_popup_holder",document),s="dropdownlist"===this.getModuleName()||!this.isFiltering();this.isServerBlazor&&e&&!t.isNullOrUndefined(this.list)&&s&&this.invokeRenderPopup()}},s.prototype.invokeRenderPopup=function(){if(t.Browser.isDevice&&this.isFilterLayout()){var e=this;window.onpopstate=function(){e.hidePopup()},history.pushState({},"")}t.isNullOrUndefined(this.list.children[0])&&!this.list.classList.contains(k.noData)||this.renderPopup(),t.attributes(this.targetElement(),{"aria-activedescendant":this.selectedLI?this.selectedLI.id:null})},s.prototype.clientRenderPopup=function(e,i){i?(this.serverPopupEle=i,this.list=i.querySelector(".e-dropdownbase.e-content")?i.querySelector(".e-dropdownbase.e-content"):this.list,this.ulElement=this.list.querySelector("ul"),t.isNullOrUndefined(this.ulElement)&&!this.list.classList.contains(k.noData)&&t.addClass([this.list],[k.noData]),this.liCollections=this.ulElement?this.ulElement.querySelectorAll("."+k.li):[],this.listData=e,"autocomplete"===this.getModuleName()&&this.liCollections.length>0&&this.renderHightSearch(),this.initRemoteRender=!1,this.isPopupOpen||this.serverBlazorUpdateSelection(),this.unWireListEvents(),this.wireListEvents(),this.isServerIncrementalSearch&&this.searchKeyEvent&&(this.isServerIncrementalSearch=!1,this.initial=!1,this.onServerIncrementalSearch(this.searchKeyEvent)),this.isServerNavigation&&this.searchKeyEvent&&("down"===this.searchKeyEvent.action||"up"===this.searchKeyEvent.action?(this.isServerNavigation=!1,this.updateUpDownAction(this.searchKeyEvent)):"home"!==this.searchKeyEvent.action&&"end"!==this.searchKeyEvent.action||(this.isServerNavigation=!1,this.updateHomeEndAction(this.searchKeyEvent))),this.beforePopupOpen&&this.invokeRenderPopup(),"dropdownlist"!==this.getModuleName()&&this.onActionComplete(this.ulElement,this.listData)):null!=e&&this.listData!==e&&(this.listData=e,this.initRemoteRender=!1)},s.prototype.renderHightSearch=function(){},s.prototype.updateclientItemData=function(e){this.listData=e},s.prototype.initValueItemData=function(e){this.itemData=e,this.previousValue=this.value,this.initial=!1},s.prototype.serverUpdateListElement=function(e,t){this.listData=e,this.ulElement&&(this.liCollections=this.ulElement.querySelectorAll("."+k.li))},s.prototype.hidePopup=function(e){var i=!!this.headerTemplate,s=!!this.headerTemplate;if(this.DropDownBaseresetBlazorTemplates(!1,!1,!1,!1,!1,i,s),this.isEscapeKey&&"dropdownlist"===this.getModuleName())if(o.Input.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton),this.isEscapeKey=!1,t.isNullOrUndefined(this.index))this.resetSelection();else{var l=this.findListElement(this.ulElement,"li","data-value",this.value);this.selectedLI=this.liCollections[this.index]||l,this.selectedLI&&(this.updateSelectedItem(this.selectedLI,null,!0),this.valueTemplate&&null!==this.itemData&&this.setValueTemplate())}this.closePopup();var r=this.getItemData(),n=this.isServerBlazor?!t.isNullOrUndefined(this.value):!t.isNullOrUndefined(this.selectedLI);this.inputElement&&""===this.inputElement.value.trim()&&!this.isInteracted&&(this.isSelectCustom||n&&this.inputElement.value!==r.text)&&(this.isSelectCustom=!1,this.clearAll(e))},s.prototype.focusIn=function(e){if(this.enabled&&!this.targetElement().classList.contains(I.disable)){var i=!1;this.preventFocus&&t.Browser.isDevice&&(this.inputWrapper.container.tabIndex=1,this.inputWrapper.container.focus(),this.preventFocus=!1,i=!0),i||this.targetElement().focus(),t.addClass([this.inputWrapper.container],[I.inputFocus]),this.onFocus(e)}},s.prototype.focusOut=function(e){this.enabled&&(this.isTyped=!0,this.hidePopup(e),this.targetElement()&&this.targetElement().blur(),t.removeClass([this.inputWrapper.container],[I.inputFocus]))},s.prototype.destroy=function(){if(this.isActive=!1,this.isReact&&this.clearTemplate(),(!this.isServerBlazor||this.popupObj&&document.body.contains(this.popupObj.element))&&this.hidePopup(),this.unWireEvent(),this.list&&(this.unWireListEvents(),this.isServerBlazor&&this.fields.groupBy&&!this.isGroupChecking&&t.EventHandler.remove(this.list,"scroll",this.setFloatingHeader)),!this.isServerBlazor){if(this.element&&!this.element.classList.contains("e-"+this.getModuleName()))return;if(this.inputElement){for(var i=["readonly","aria-disabled","aria-placeholder","placeholder","aria-owns","aria-labelledby","aria-haspopup","aria-expanded","aria-activedescendant","autocomplete","aria-readonly","autocorrect","autocapitalize","spellcheck","aria-autocomplete","aria-live","aria-describedby","aria-label"],s=0;s<i.length;s++)this.inputElement.removeAttribute(i[s]);this.inputElement.setAttribute("tabindex",this.tabIndex),this.inputElement.classList.remove("e-input"),o.Input.setValue("",this.inputElement,this.floatLabelType,this.showClearButton)}this.element.style.display="block",this.inputWrapper.container.parentElement.tagName===this.getNgDirective()?t.detach(this.inputWrapper.container):(this.inputWrapper.container.parentElement.insertBefore(this.element,this.inputWrapper.container),t.detach(this.inputWrapper.container)),e.prototype.destroy.call(this)}},s.prototype.getItems=function(){return this.list||(this.dataSource instanceof i.DataManager&&(this.initRemoteRender=!0),this.renderList()),this.ulElement?e.prototype.getItems.call(this):[]},s.prototype.getDataByValue=function(t){return e.prototype.getDataByValue.call(this,t)},s.prototype.clear=function(){this.value=null},T([t.Property(null)],s.prototype,"cssClass",void 0),T([t.Property("100%")],s.prototype,"width",void 0),T([t.Property("300px")],s.prototype,"popupHeight",void 0),T([t.Property("100%")],s.prototype,"popupWidth",void 0),T([t.Property(null)],s.prototype,"placeholder",void 0),T([t.Property(null)],s.prototype,"filterBarPlaceholder",void 0),T([t.Property({})],s.prototype,"htmlAttributes",void 0),T([t.Property(null)],s.prototype,"query",void 0),T([t.Property(null)],s.prototype,"valueTemplate",void 0),T([t.Property(null)],s.prototype,"headerTemplate",void 0),T([t.Property(null)],s.prototype,"footerTemplate",void 0),T([t.Property(!1)],s.prototype,"allowFiltering",void 0),T([t.Property(!1)],s.prototype,"readonly",void 0),T([t.Property(null)],s.prototype,"text",void 0),T([t.Property(null)],s.prototype,"value",void 0),T([t.Property(null)],s.prototype,"index",void 0),T([t.Property("Never")],s.prototype,"floatLabelType",void 0),T([t.Property(!1)],s.prototype,"showClearButton",void 0),T([t.Event()],s.prototype,"filtering",void 0),T([t.Event()],s.prototype,"change",void 0),T([t.Event()],s.prototype,"beforeOpen",void 0),T([t.Event()],s.prototype,"open",void 0),T([t.Event()],s.prototype,"close",void 0),T([t.Event()],s.prototype,"blur",void 0),T([t.Event()],s.prototype,"focus",void 0),s=T([t.NotifyPropertyChanges],s)}(B),P=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),F=function(e,t,i,s){var l,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(l=e[n])&&(r=(o<3?l(r):o>3?l(t,i,r):l(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},W="e-input-group-icon e-ddt-icon e-icons",H="e-show-chip",V="e-show-clear",U="e-chip-input",M="e-input-focus",j="e-icon-hide",R="e-check",q="e-no-data",z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return P(i,e),F([t.Property("child")],i.prototype,"child",void 0),F([t.Property([])],i.prototype,"dataSource",void 0),F([t.Property("expanded")],i.prototype,"expanded",void 0),F([t.Property("hasChildren")],i.prototype,"hasChildren",void 0),F([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),F([t.Property("iconCss")],i.prototype,"iconCss",void 0),F([t.Property("imageUrl")],i.prototype,"imageUrl",void 0),F([t.Property("parentValue")],i.prototype,"parentValue",void 0),F([t.Property(null)],i.prototype,"query",void 0),F([t.Property("selected")],i.prototype,"selected",void 0),F([t.Property(null)],i.prototype,"tableName",void 0),F([t.Property("text")],i.prototype,"text",void 0),F([t.Property("tooltip")],i.prototype,"tooltip",void 0),F([t.Property("value")],i.prototype,"value",void 0),i}(t.ChildProperty),K=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return P(i,e),F([t.Property(!1)],i.prototype,"autoCheck",void 0),F([t.Property("Auto")],i.prototype,"expandOn",void 0),F([t.Property(!1)],i.prototype,"loadOnDemand",void 0),i}(t.ChildProperty),_=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.filterTimer=null,s.isFilteredData=!1,s.isFilterRestore=!1,s.selectedData=[],s.filterDelayTime=300,s}return P(s,e),s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.getLocaleName=function(){return"drop-down-tree"},s.prototype.preRender=function(){this.inputFocus=!1,this.isPopupOpen=!1,this.isFirstRender=!0,this.isInitialized=!1,this.currentText=null,this.currentValue=null,this.oldValue=null,this.removeValue=!1,this.selectedText=[],this.treeItems=[],this.dataValue=null,this.isNodeSelected=!1,this.isDynamicChange=!1,this.clearIconWidth=0,this.isBlazorPlatForm=t.isBlazor(),this.headerTemplateId=this.element.id+"HeaderTemplate",this.footerTemplateId=this.element.id+"FooterTemplate",this.actionFailureTemplateId=this.element.id+"ActionFailureTemplate",this.noRecordsTemplateId=this.element.id+"NoRecordsTemplate",this.keyConfigs={escape:"escape",altUp:"alt+uparrow",altDown:"alt+downarrow",tab:"tab",shiftTab:"shift+tab",end:"end",enter:"enter",home:"home",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlDown:"ctrl+downarrow",ctrlUp:"ctrl+uparrow",ctrlEnter:"ctrl+enter",ctrlHome:"ctrl+home",ctrlEnd:"ctrl+end",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",shiftEnter:"shift+enter",shiftHome:"shift+home",shiftEnd:"shift+end",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",csEnter:"ctrl+shift+enter",csHome:"ctrl+shift+home",csEnd:"ctrl+shift+end",space:"space",ctrlA:"ctrl+A"}},s.prototype.render=function(){this.ensureAutoCheck(),"INPUT"===this.element.tagName?(this.inputEle=this.element,t.isNullOrUndefined(this.inputEle.getAttribute("role"))&&this.inputEle.setAttribute("role","textbox"),t.isNullOrUndefined(this.inputEle.getAttribute("type"))&&this.inputEle.setAttribute("type","text")):(this.inputEle=this.createElement("input",{attrs:{role:"textbox",type:"text"}}),this.element.parentElement.insertBefore(this.inputEle,this.element)),this.inputObj=o.Input.createInput({element:this.inputEle,floatLabelType:this.floatLabelType,buttons:this.showDropDownIcon?[W]:null,properties:{readonly:!0,placeholder:this.placeholder,enabled:this.enabled,cssClass:this.cssClass,enableRtl:this.enableRtl}},this.createElement),this.inputWrapper=this.inputObj.container,this.inputWrapper.classList.contains("e-input-group")||this.inputWrapper.classList.add("e-input-group"),this.showDropDownIcon&&this.inputWrapper.classList.add("e-show-dd-icon"),this.element.tagName===this.getDirective()&&this.element.appendChild(this.inputWrapper),this.createHiddenElement(),this.createClearIcon(),this.inputWrapper.classList.add("e-ddt"),this.setElementWidth(this.width),this.setAttributes(),this.updateDataAttribute(),this.setHTMLAttributes(),this.popupDiv=this.createElement("div",{className:"e-popup-content",attrs:{tabindex:"0"}}),this.popupDiv.classList.add("e-dropdown"),this.tree=this.createElement("div",{id:this.element.id+"_tree"}),this.popupDiv.appendChild(this.tree),document.body.appendChild(this.popupDiv),this.wireTreeEvents(),this.popupDiv.style.display="none",this.renderTree(),this.isRemoteData=this.fields.dataSource instanceof i.DataManager,(this.allowMultiSelection||this.showCheckBox)&&("Delimiter"!==this.mode&&this.createChip(),this.wrapText||(this.overFlowWrapper=this.createElement("span",{className:"e-overflow "+j}),this.inputWrapper.insertBefore(this.overFlowWrapper,this.hiddenElement),"Box"!==this.mode&&t.addClass([this.overFlowWrapper],"e-show-text"))),this.isRemoteData||(this.setTreeValue(),this.setTreeText(),this.updateHiddenValue(),this.setSelectedValue(),this.wrapText||this.updateView()),this.wireEvents();var e=t.select(".e-list-parent",this.treeObj.element);e&&e.getAttribute("aria-multiselectable")&&e.removeAttribute("aria-multiselectable"),this.oldValue=this.value,this.isInitialized=!0,this.hasTemplate=this.itemTemplate||this.headerTemplate||this.footerTemplate||this.actionFailureTemplate||this.noRecordsTemplate,this.renderComplete()},s.prototype.ensureAutoCheck=function(){this.allowFiltering&&this.treeSettings.autoCheck&&this.setProperties({treeSettings:{autoCheck:!1}},!0)},s.prototype.hideCheckAll=function(e){var i=t.isNullOrUndefined(this.popupEle)?null:this.popupEle.querySelector(".e-selectall-parent");t.isNullOrUndefined(i)||(e&&!i.classList.contains("e-hide-selectall")?t.addClass([i],"e-hide-selectall"):!e&&i.classList.contains("e-hide-selectall")&&t.removeClass([i],"e-hide-selectall"))},s.prototype.renderFilter=function(){this.filterContainer=this.createElement("div",{id:this.element.id+"_filter_wrap",className:"e-filter-wrap"});var e=this.createElement("input",{id:this.element.id+"_filter",attrs:{autocomplete:"off","aria-label":this.filterBarPlaceholder}});this.filterContainer.appendChild(e),t.prepend([this.filterContainer],this.popupEle),this.filterObj=new o.TextBox({value:"",showClearButton:!0,placeholder:this.filterBarPlaceholder,input:this.filterChangeHandler.bind(this)}),this.filterObj.appendTo("#"+this.element.id+"_filter")},s.prototype.filterChangeHandler=function(e){var i=this;t.isNullOrUndefined(e.value)||(window.clearTimeout(this.filterTimer),this.filterTimer=window.setTimeout(function(){i.filterHandler(e.value,e.event)},this.filterDelayTime))},s.prototype.filterHandler=function(e,t){var s=this;this.isFilteredData||(this.treeData=this.treeObj.getTreeData());var l=this.cloneFields(this.fields),o={cancel:!1,preventDefaultAction:!1,event:t,text:e,fields:l};this.trigger("filtering",o,function(t){if(!t.cancel){var l=!1,o=void 0;if(s.isFilteredData=!0,""===e?(s.isFilteredData=!1,s.isFilterRestore=!0,o=s.cloneFields(s.fields)):t.preventDefaultAction?o=t.fields:1===s.treeDataType?o=s.selfReferencefilter(e,t.fields):s.fields.dataSource instanceof i.DataManager?l=!0:o=s.nestedFilter(e,t.fields),s.hideCheckAll(s.isFilteredData),l)return;s.treeObj.fields=s.getTreeFields(o),s.treeObj.dataBind()}})},s.prototype.nestedFilter=function(e,i){for(var s=[],l=0;l<this.treeData.length;l++){var o=this.nestedChildFilter(e,this.treeData[l]);t.isNullOrUndefined(o)||s.push(o)}return i.dataSource=s,i},s.prototype.nestedChildFilter=function(e,i){var s=i[this.fields.child];if(t.isNullOrUndefined(s))return this.isMatchedNode(e,i)?i:null;for(var l=[],o=0;o<s.length;o++){var r=this.nestedChildFilter(e,s[o]);t.isNullOrUndefined(r)||l.push(r)}return 0!==l.length?(i[this.fields.child]=l,i):(i[this.fields.child]=null,this.isMatchedNode(e,i)?i:null)},s.prototype.selfReferencefilter=function(e,i){for(var s=[],l=[],o=0;o<this.treeData.length;o++)this.isMatchedNode(e,this.treeData[o])&&s.push(this.treeData[o]);for(o=0;o<s.length;o++)if(-1===l.indexOf(s[o])){l.push(s[o]);for(var r=s[o][this.fields.parentValue];!t.isNullOrUndefined(r);){for(var n=null,a=0;a<this.treeData.length;a++){var h=this.treeData[a][this.fields.value];if(!t.isNullOrUndefined(h)&&h===r){n=this.treeData[a];break}}if(t.isNullOrUndefined(n)||-1!==l.indexOf(n))break;l.push(n),r=n[this.fields.parentValue]}}return i.dataSource=l,i},s.prototype.isMatchedNode=function(e,t){var s=t[this.fields.text];return this.ignoreCase&&(s=s.toLowerCase(),e=e.toLowerCase()),this.ignoreAccent&&(s=i.DataUtil.ignoreDiacritics(s),e=i.DataUtil.ignoreDiacritics(e)),"StartsWith"===this.filterType?s.slice(0,e.length)===e:"EndsWith"===this.filterType?s.slice(-e.length)===e:-1!==s.indexOf(e)},s.prototype.wireEvents=function(){t.EventHandler.add(this.inputWrapper,"mouseup",this.dropDownClick,this),t.EventHandler.add(this.inputWrapper,"focus",this.focusIn,this),t.EventHandler.add(this.inputWrapper,"blur",this.focusOut,this),t.EventHandler.add(this.inputWrapper,"mousemove",this.mouseIn,this),t.EventHandler.add(this.inputWrapper,"mouseout",this.onMouseLeave,this),t.EventHandler.add(this.overAllClear,"mousedown",this.clearAll,this),t.EventHandler.add(window,"resize",this.windowResize,this);var e=t.closest(this.inputWrapper,"form");e&&t.EventHandler.add(e,"reset",this.resetValueHandler,this),this.keyboardModule=new t.KeyboardEvents(this.inputWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},s.prototype.wireTreeEvents=function(){this.keyboardModule=new t.KeyboardEvents(this.tree,{keyAction:this.treeAction.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},s.prototype.wireCheckAllWrapperEvents=function(){this.keyboardModule=new t.KeyboardEvents(this.checkAllParent,{keyAction:this.checkAllAction.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.inputWrapper,"mouseup",this.dropDownClick),t.EventHandler.remove(this.inputWrapper,"focus",this.focusIn),t.EventHandler.remove(this.inputWrapper,"blur",this.focusOut),t.EventHandler.remove(this.inputWrapper,"mousemove",this.mouseIn),t.EventHandler.remove(this.inputWrapper,"mouseout",this.onMouseLeave),t.EventHandler.remove(this.overAllClear,"mousedown",this.clearAll),t.EventHandler.remove(window,"resize",this.windowResize);var e=t.closest(this.inputWrapper,"form");e&&t.EventHandler.remove(e,"reset",this.resetValueHandler)},s.prototype.dropDownClick=function(e){if(this.enabled&&!this.readonly){if(this.isClearButtonClick)return void(this.isClearButtonClick=!1);!this.wrapText&&e.target.classList.contains("e-chips-close")&&this.removeChip(e),this.isPopupOpen?this.hidePopup():(this.focusIn(e),this.renderPopup()),this.showOverAllClear()}},s.prototype.mouseIn=function(){!this.enabled&&this.readonly||this.showOverAllClear()},s.prototype.onMouseLeave=function(){this.inputFocus||(t.addClass([this.overAllClear],j),t.removeClass([this.inputWrapper],V))},s.prototype.getDirective=function(){return"EJS-DROPDOWNTREE"},s.prototype.focusOut=function(e){if(this.enabled&&!this.readonly&&this.inputFocus&&(!t.Browser.isIE&&"edge"!==t.Browser.info.name||e.target!==this.inputWrapper)){var i=e.relatedTarget;i===this.inputEle||!t.isNullOrUndefined(i)||e.target===this.inputWrapper&&this.isPopupOpen||this.onFocusOut(e)}},s.prototype.onFocusOut=function(e){if(this.inputFocus=!1,this.isPopupOpen&&this.hidePopup(),this.isClearButtonClick&&(this.isClearButtonClick=!1),this.showClearButton&&(this.clearIconWidth=t.select(".e-clear-icon",this.inputWrapper).offsetWidth,t.addClass([this.overAllClear],j),t.removeClass([this.inputWrapper],V)),t.removeClass([this.inputWrapper],[M]),this.allowMultiSelection||this.showCheckBox){var i=!!this.value&&!!this.value.length;"Delimiter"!==this.mode&&this.chipWrapper&&"Default"===this.mode&&(t.addClass([this.chipWrapper],j),t.removeClass([this.inputWrapper],H),t.removeClass([this.inputEle],U)),!this.wrapText&&i&&this.updateView()}this.changeOnBlur&&this.triggerChangeEvent(e),this.removeValue=!1,this.oldValue=this.value,this.trigger("blur")},s.prototype.updateView=function(){(this.showCheckBox||this.allowMultiSelection)&&("Box"!==this.mode?t.addClass([this.inputWrapper,this.overFlowWrapper],"e-show-text"):t.addClass([this.inputWrapper],H),this.value&&0!==this.value.length&&(this.inputWrapper.contains(this.chipWrapper)&&t.addClass([this.chipWrapper],j),t.addClass([this.inputEle],U),this.updateOverFlowView(),this.ensurePlaceHolder()))},s.prototype.triggerChangeEvent=function(e){if((!this.ddtCompareValues(this.oldValue,this.value)||this.isChipDelete)&&!this.removeValue){var t={e:e,oldValue:this.oldValue,value:this.value,isInteracted:!!e,element:this.element};this.trigger("change",t),this.oldValue=this.value}},s.prototype.ddtCompareValues=function(e,t){if(null===e||null===t)return null===e?t===e:0===e.length&&t===e;if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},s.prototype.focusIn=function(e){if(this.enabled&&!this.readonly&&!this.inputFocus){this.showOverAllClear(),this.inputFocus=!0,t.addClass([this.inputWrapper],[M]),(this.allowMultiSelection||this.showCheckBox)&&("Delimiter"!==this.mode&&this.inputFocus&&(this.chipWrapper&&this.value&&0!==this.value.length&&(t.removeClass([this.chipWrapper],j),t.addClass([this.inputEle],U)),t.addClass([this.inputWrapper],H),this.popupObj&&this.popupObj.refreshPosition()),this.wrapText||(this.inputWrapper.contains(this.overFlowWrapper)&&t.addClass([this.overFlowWrapper],j),"Delimiter"===this.mode?(t.removeClass([this.inputWrapper],H),t.removeClass([this.inputEle],U)):t.addClass([this.inputWrapper],H),t.removeClass([this.inputWrapper],"e-show-text"),this.ensurePlaceHolder()));var i={isInteracted:!!e,event:e};this.trigger("focus",i)}},s.prototype.treeAction=function(e){var t=this,i={cancel:!1,event:e};this.trigger("keyPress",i,function(i){if(i.cancel)e.stopImmediatePropagation();else switch(e.action){case"escape":case"altUp":t.inputWrapper.focus(),e.preventDefault(),t.isPopupOpen&&t.hidePopup();break;case"tab":case"shiftTab":t.isPopupOpen&&t.hidePopup();break;case"enter":case"ctrlEnter":case"shiftEnter":case"csEnter":t.showCheckBox||(t.isValueChange=!0,t.keyEventArgs=e);break;case"space":t.isValueChange=!0,t.keyEventArgs=e;break;case"ctrlA":t.allowMultiSelection&&t.selectAll(!0)}})},s.prototype.keyActionHandler=function(e){var t=this,i={cancel:!1,event:e};this.trigger("keyPress",i,function(i){if(!i.cancel)switch(e.action){case"escape":case"altUp":case"shiftTab":case"tab":t.isPopupOpen&&t.hidePopup();break;case"altDown":t.isPopupOpen||(t.showPopup(),e.preventDefault());break;case"moveDown":t.showSelectAll&&t.showCheckBox&&t.checkAllParent.focus()}})},s.prototype.checkAllAction=function(e){var t=this,i={cancel:!1,event:e};this.trigger("keyPress",i,function(i){if(!i.cancel)switch(e.action){case"space":t.clickHandler(e);break;case"moveDown":t.treeObj.element.focus()}})},s.prototype.windowResize=function(){this.popupObj&&(this.popupObj.setProperties({width:this.setWidth()}),this.popupObj.refreshPosition())},s.prototype.resetValueHandler=function(e){var i=t.closest(this.inputWrapper,"form");i&&e.target===i&&(this.isDynamicChange=!0,this.setProperties({value:null},!0),this.resetValue(!0),this.isDynamicChange=!1)},s.prototype.getAriaAttributes=function(){return{"aria-disabled":this.enabled?"false":"true","aria-owns":this.element.id+"_options",role:"listbox","aria-haspopup":"true","aria-expanded":"false","aria-activedescendant":"null","aria-labelledby":this.hiddenElement.id}},s.prototype.updateOverFlowView=function(){if(this.overFlowWrapper.classList.remove("e-total-count"),t.removeClass([this.overFlowWrapper],j),this.value&&this.value.length){var e="",i=void 0,s=void 0,l=void 0,o=1,r=void 0,n=void 0,a=0;this.overFlowWrapper.innerHTML="";var h={overflowCountTemplate:"+${count} more..",totalCountTemplate:"${count} selected"};this.l10n=new t.L10n(this.getLocaleName(),h,this.locale);var p=this.l10n.getConstant("overflowCountTemplate"),u=this.createElement("span",{className:"e-remain"}),c=t.compile(p),d=t.compile(this.l10n.getConstant("totalCountTemplate"));u.appendChild(c({count:this.value.length},this,"overflowCountTemplate",null,!this.isStringTemplate)[0]),this.overFlowWrapper.appendChild(u);var m=u.offsetWidth;if(t.remove(u),this.showDropDownIcon&&(a=t.select(".e-ddt-icon",this.inputWrapper).offsetWidth),!t.isNullOrUndefined(this.value))if("Box"!==this.mode)for(var f=0;!t.isNullOrUndefined(this.value[f]);f++){if(e+=0===f?"":this.delimiterChar+" ",s=this.getOverflowVal(f),e+=s,s=this.overFlowWrapper.innerHTML,this.overFlowWrapper.innerHTML=e,r=this.overFlowWrapper.offsetWidth,i=this.inputWrapper.offsetWidth,r+a+this.clearIconWidth>i){for(void 0!==l&&""!==l&&(s=l,f=o+1),this.overFlowWrapper.innerHTML=s,n=this.value.length-f,r=this.overFlowWrapper.offsetWidth;r+m+a+this.clearIconWidth>=i&&0!==r&&""!==this.overFlowWrapper.innerHTML;){var v=this.overFlowWrapper.innerHTML.split(this.delimiterChar);v.pop(),this.overFlowWrapper.innerHTML=v.join(this.delimiterChar),n++,r=this.overFlowWrapper.offsetWidth}break}r+m+a+this.clearIconWidth<=i?(l=e,o=f):0===f&&(l="",o=-1)}else{t.addClass([this.chipWrapper],j);for(var y=this.chipWrapper.cloneNode(!0),g=t.selectAll(".e-chips",y),C=0;C<g.length;C++){if(s=this.overFlowWrapper.innerHTML,this.overFlowWrapper.appendChild(g[C]),e=this.overFlowWrapper.innerHTML,r=this.overFlowWrapper.offsetWidth,i=this.inputWrapper.offsetWidth,r+a+this.clearIconWidth>i){for(void 0!==l&&""!==l&&(s=l,C=o+1),this.overFlowWrapper.innerHTML=s,n=this.value.length-C,r=this.overFlowWrapper.offsetWidth;r+m+a+this.clearIconWidth>=i&&0!==r&&""!==this.overFlowWrapper.innerHTML;)this.overFlowWrapper.removeChild(this.overFlowWrapper.lastChild),n++,r=this.overFlowWrapper.offsetWidth;break}r+m+a+this.clearIconWidth<=i?(l=e,o=C):0===C&&(l="",o=-1)}}n>0&&this.overFlowWrapper.appendChild(this.updateRemainTemplate(u,n,c,d)),"Box"!==this.mode||this.overFlowWrapper.classList.contains("e-total-count")||t.addClass([u],"e-wrap-count")}else this.overFlowWrapper.innerHTML="",t.addClass([this.overFlowWrapper],j);this.updateDelimMode()},s.prototype.updateRemainTemplate=function(e,i,s,l){return this.overFlowWrapper.firstChild&&3===this.overFlowWrapper.firstChild.nodeType&&""===this.overFlowWrapper.firstChild.nodeValue&&this.overFlowWrapper.removeChild(this.overFlowWrapper.firstChild),e.innerHTML="",e.appendChild(!this.overFlowWrapper.firstChild||3!==this.overFlowWrapper.firstChild.nodeType&&"Box"!==this.mode?l({count:i},this,"totalCountTemplate",null,!this.isStringTemplate)[0]:s({count:i},this,"overflowCountTemplate",null,!this.isStringTemplate)[0]),!this.overFlowWrapper.firstChild||3!==this.overFlowWrapper.firstChild.nodeType&&"Box"!==this.mode?(t.addClass([this.overFlowWrapper],"e-total-count"),t.removeClass([this.overFlowWrapper],"e-wrap-count")):t.removeClass([this.overFlowWrapper],"e-total-count"),e},s.prototype.getOverflowVal=function(e){var i=this.getSelectedData(this.value[e]);return t.getValue(this.treeSettings.loadOnDemand?this.fields.text:"text",i)},s.prototype.updateDelimMode=function(){"Box"!==this.mode?t.select(".e-remain",this.overFlowWrapper)&&!this.overFlowWrapper.classList.contains("e-total-count")?(t.addClass([this.overFlowWrapper],"e-wrap-count"),t.addClass([this.overFlowWrapper],"e-show-text")):(this.overFlowWrapper.classList.remove("e-wrap-count"),t.removeClass([this.overFlowWrapper],"e-wrap-count")):t.select(".e-remain",this.overFlowWrapper)&&this.overFlowWrapper.classList.remove("e-wrap-count")},s.prototype.createHiddenElement=function(){this.allowMultiSelection||this.showCheckBox?this.hiddenElement=this.createElement("select",{attrs:{"aria-hidden":"true",class:"e-ddt-hidden",tabindex:"-1",multiple:""}}):this.hiddenElement=this.createElement("select",{attrs:{"aria-hidden":"true",tabindex:"-1",class:"e-ddt-hidden"}}),t.prepend([this.hiddenElement],this.inputWrapper),this.validationAttribute()},s.prototype.createClearIcon=function(){this.overAllClear=this.createElement("span",{className:"e-clear-icon e-icons"}),t.addClass([this.overAllClear],j),t.removeClass([this.inputWrapper],V),this.showClearButton&&this.inputWrapper.insertBefore(this.overAllClear,this.inputObj.buttons[0])},s.prototype.validationAttribute=function(){var e=this.inputEle.getAttribute("name")?this.inputEle.getAttribute("name"):this.inputEle.getAttribute("id");this.hiddenElement.setAttribute("name",e),this.inputEle.removeAttribute("name");for(var t=["required","aria-required","form"],i=0;i<t.length;i++){var s=this.inputEle.getAttribute(t[i]);s&&(this.hiddenElement.setAttribute(t[i],s),this.inputEle.removeAttribute(t[i]))}},s.prototype.createChip=function(){this.inputWrapper.contains(this.chipWrapper)||(this.chipWrapper=this.createElement("span",{className:"e-chips-wrapper"}),this.chipCollection=this.createElement("span",{className:"e-chips-collection"}),this.chipWrapper.appendChild(this.chipCollection),this.inputWrapper.insertBefore(this.chipWrapper,this.hiddenElement),t.addClass([this.inputWrapper],H),this.getValidMode()&&null!==this.value?t.addClass([this.inputEle],U):null===this.value&&t.addClass([this.chipWrapper],j))},s.prototype.getValidMode=function(){return!(!this.allowMultiSelection&&!this.showCheckBox)&&("Box"===this.mode||!("Default"!==this.mode||!this.inputFocus))},s.prototype.createSelectAllWrapper=function(){this.checkAllParent=this.createElement("div",{className:"e-selectall-parent",attrs:{tabindex:"0"}}),this.selectAllSpan=this.createElement("span",{className:"e-all-text"}),this.selectAllSpan.textContent="";var e=t.closest(this.element,".e-bigger"),i=t.isNullOrUndefined(e)?"":"e-small";this.checkBoxElement=r.createCheckBox(this.createElement,!0,{cssClass:i}),this.checkBoxElement.setAttribute("role","checkbox"),this.checkAllParent.appendChild(this.checkBoxElement),this.checkAllParent.appendChild(this.selectAllSpan),this.setLocale(),t.EventHandler.add(this.checkAllParent,"mouseup",this.clickHandler,this),this.wireCheckAllWrapperEvents()},s.prototype.clickHandler=function(e){var i;if(i=e.currentTarget&&e.currentTarget.classList.contains("e-selectall-parent")?e.currentTarget.firstElementChild.lastElementChild:e.target,this.checkWrapper=t.closest(i,".e-checkbox-wrapper"),!t.isNullOrUndefined(this.checkWrapper)){var s=t.select(".e-frame",this.checkWrapper);this.changeState(this.checkWrapper,s.classList.contains(R)?"uncheck":"check",e)}e.preventDefault()},s.prototype.changeState=function(e,i,s){var l,o=e.getElementsByClassName("e-frame")[0];"check"!==i||o.classList.contains(R)?"uncheck"===i&&o.classList.contains(R)&&(o.classList.remove(R),l="false",this.isReverseUpdate||(this.treeObj.uncheckAll(),this.changeOnBlur||this.triggerChangeEvent(s)),this.setLocale(!1)):(o.classList.add(R),l="true",this.isReverseUpdate||(this.treeObj.checkAll(),this.changeOnBlur||this.triggerChangeEvent(s)),this.setLocale(!0)),this.setMultiSelect(),this.ensurePlaceHolder(),l="check"===i?"true":"false",t.isNullOrUndefined(l)||e.setAttribute("aria-checked",l)},s.prototype.setLocale=function(e){if(this.selectAllSpan)if("Select All"!==this.selectAllText||"Unselect All"!==this.unSelectAllText){var i=e?this.unSelectAllText:this.selectAllText;this.selectAllSpan.textContent="";for(var s=0,l=t.compile(i)({},this,e?"unSelectAllText":"selectAllText",null,!this.isStringTemplate);s<l.length;s++){var o=l[s];this.selectAllSpan.textContent=o.textContent}}else this.selectAllSpan.textContent=e?this.unSelectAllText:this.selectAllText},s.prototype.setAttributes=function(){this.element.removeAttribute("tabindex");var e=this.element.getAttribute("id");this.hiddenElement.id=e+"_hidden",this.inputWrapper.setAttribute("tabindex","0"),t.attributes(this.inputWrapper,this.getAriaAttributes())},s.prototype.setHTMLAttributes=function(){if(Object.keys(this.htmlAttributes).length)for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if("class"===s)this.inputWrapper.classList.add(this.htmlAttributes[s]);else if("disabled"===s&&"disabled"===this.htmlAttributes[s])this.setProperties({enabled:!1},!0),this.setEnable();else if("readonly"!==s||t.isNullOrUndefined(this.htmlAttributes[s]))if("style"===s)this.inputWrapper.setAttribute("style",this.htmlAttributes[s]);else{var l=["title","id","placeholder","aria-placeholder","role","autocorrect","autocomplete","autocapitalize","spellcheck","minlength","maxlength"],r=["name","required"];0===s.indexOf("data")||r.indexOf(s)>-1?this.hiddenElement.setAttribute(s,this.htmlAttributes[s]):l.indexOf(s)>-1?"placeholder"===s?o.Input.setPlaceholder(this.htmlAttributes[s],this.inputEle):this.inputEle.setAttribute(s,this.htmlAttributes[s]):this.inputWrapper.setAttribute(s,this.htmlAttributes[s])}else this.setProperties({readonly:!0},!0),this.dataBind()}},s.prototype.updateDataAttribute=function(){for(var e=this.htmlAttributes,i=["class","style","id","type"],s={},l=0;l<this.element.attributes.length;l++)-1===i.indexOf(this.element.attributes[l].name)&&"readonly"!==this.element.attributes[l].name&&(s[this.element.attributes[l].name]=this.element.getAttribute(this.element.attributes[l].name));t.extend(s,e,s),this.setProperties({htmlAttributes:s},!0)},s.prototype.showOverAllClear=function(){this.enabled&&!this.readonly&&this.overAllClear&&(!!this.value&&!!this.value.length&&this.showClearButton?(t.removeClass([this.overAllClear],j),t.addClass([this.inputWrapper],V)):(t.addClass([this.overAllClear],j),t.removeClass([this.inputWrapper],V)))},s.prototype.setTreeValue=function(){if(null!==this.value&&0!==this.value.length){var e=void 0;if(this.showCheckBox||this.allowMultiSelection){for(var i=0;i<this.value.length;i++)e=this.treeObj.getTreeData(this.value[i])[0],t.isNullOrUndefined(e)&&this.value.splice(this.value.indexOf(this.value[i]),1);0!==this.value.length&&this.setValidValue()}else e=this.treeObj.getTreeData(this.value[0])[0],t.isNullOrUndefined(e)?this.setProperties({value:this.currentValue},!0):(this.setProperties({text:e[this.fields.text]},!0),this.setValidValue())}},s.prototype.setTreeText=function(){if((null===this.value||this.isInitialized)&&null!==this.text){var e=void 0,i=[];if(this.showCheckBox||this.allowMultiSelection){for(var s=this.text.split(this.delimiterChar),l=0;l<s.length;l++)e=this.getItems(s[l]),t.isNullOrUndefined(e)||i.push(e[this.fields.value].toString());0!==i.length?(this.oldValue=this.value,this.setProperties({value:i},!0),this.setValidValue()):this.setProperties({text:this.currentText},!0)}else e=this.getItems(this.text),t.isNullOrUndefined(e)?this.setProperties({text:this.currentText},!0):(this.oldValue=this.value,this.setProperties({value:[e[this.fields.value].toString()]},!0),this.setValidValue())}},s.prototype.setSelectedValue=function(){null==this.value&&(this.isInitialized||(this.oldValue=this.value,this.treeObj.selectedNodes.length>0&&!this.showCheckBox?(this.setProperties({value:this.treeObj.selectedNodes},!0),this.allowMultiSelection&&this.updateMode()):this.showCheckBox&&this.treeObj.checkedNodes&&this.treeObj.checkedNodes.length>0&&(this.setProperties({value:this.treeObj.checkedNodes},!0),t.setValue("selectedNodes",[],this.treeObj),this.treeObj.dataBind(),this.updateMode()),this.updateSelectedValues(),this.currentText=this.text,this.currentValue=this.value))},s.prototype.setValidValue=function(){if(this.showCheckBox||this.allowMultiSelection)this.showCheckBox?(this.treeObj.checkedNodes=this.value.slice(),t.setValue("selectedNodes",[],this.treeObj),this.treeObj.dataBind(),this.setMultiSelect()):(this.treeObj.selectedNodes=this.value.slice(),this.selectedText=[],this.updateSelectedValues()),this.treeObj.dataBind();else{o.Input.setValue(this.text,this.inputEle,this.floatLabelType);var e=this.value[0].toString();this.treeObj.selectedNodes[0]!==e&&t.setValue("selectedNodes",[e],this.treeObj)}this.currentText=this.text,this.currentValue=this.value,this.isInitialized&&this.triggerChangeEvent()},s.prototype.getItems=function(e){var i;if(1===this.treeDataType)for(var s=0;s<this.treeItems.length;s++){var l=t.getValue(this.fields.text,this.treeItems[s]);if(!t.isNullOrUndefined(this.treeItems[s])&&!t.isNullOrUndefined(l)&&l===e){i=this.treeItems[s];break}}else i=this.getNestedItems(this.treeItems,this.fields,e);return i},s.prototype.getNestedItems=function(e,s,l){for(var o,r=0,n=e.length;r<n;r++){var a=t.getValue(this.fields.text,e[r]);if(e[r]&&a&&a.toString()===l)return e[r];if("string"!=typeof s.child||t.isNullOrUndefined(t.getValue(s.child,e[r]))){if(this.fields.dataSource instanceof i.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[r]))){if(void 0!==(o=this.getNestedItems(t.getValue("child",e[r]),this.getChildType(s),l)))break}}else{var h=t.getValue(s.child,e[r]);if(void 0!==(o=this.getNestedItems(h,this.getChildType(s),l)))break}}return o},s.prototype.getChildType=function(e){return"string"==typeof e.child||t.isNullOrUndefined(e.child)?e:e.child},s.prototype.renderTree=function(){this.treeObj=new n.TreeView({fields:this.getTreeFields(this.fields),enableRtl:this.enableRtl,nodeSelected:this.onNodeSelected.bind(this),nodeChecked:this.onNodeChecked.bind(this),nodeChecking:this.beforeCheck.bind(this),actionFailure:this.onActionFailure.bind(this),nodeClicked:this.onNodeClicked.bind(this),dataBound:this.OnDataBound.bind(this),allowMultiSelection:this.allowMultiSelection,showCheckBox:this.showCheckBox,autoCheck:this.treeSettings.autoCheck,sortOrder:this.sortOrder,expandOn:this.treeSettings.expandOn,loadOnDemand:this.treeSettings.loadOnDemand,nodeSelecting:this.onBeforeSelect.bind(this),nodeTemplate:this.itemTemplate}),this.treeObj.appendTo("#"+this.tree.id)},s.prototype.renderPopup=function(){var e=this;this.isFilteredData&&(this.filterObj.value="",this.treeObj.fields=this.getTreeFields(this.fields),this.isFilterRestore=!0,this.isFilteredData=!1,this.hideCheckAll(!1));var i=!1,s={cancel:!1};this.trigger("beforeOpen",s,function(s){if(s.cancel?i=!0:(t.addClass([e.inputWrapper],["e-icon-anim"]),e.isFirstRender?(e.popupEle=e.createElement("div",{id:e.element.id+"_popup",className:"e-ddt e-popup "+(null!=e.cssClass?e.cssClass:"")}),document.body.appendChild(e.popupEle),e.createPopup(e.popupEle)):e.popupEle=e.popupObj.element),e.isFirstRender&&!i&&(t.prepend([e.popupDiv],e.popupEle),e.popupDiv.style.display="block",e.allowFiltering&&e.renderFilter(),e.showCheckBox&&e.showSelectAll&&!e.popupDiv.classList.contains(q)&&(e.createSelectAllWrapper(),e.popupEle.insertBefore(e.checkAllParent,e.popupDiv)),e.headerTemplate&&e.setHeaderTemplate(),e.footerTemplate&&e.setFooterTemplate(),e.isFirstRender=!1,e.hasTemplate&&e.portals&&(e.portals=e.portals.concat(e.treeObj.portals),e.renderReactTemplates())),!i){if(t.attributes(e.inputWrapper,{"aria-expanded":"true"}),e.popupObj.show(null,1e3===e.zIndex?e.inputEle:null),e.popupEle.style.display="block",e.updatePopupHeight(),e.popupObj.refreshPosition(),e.showCheckBox&&e.showSelectAll||e.popupDiv.classList.contains(q)||!(e.treeItems.length>0)||e.treeObj.element.focus(),e.checkSelectAll&&e.checkBoxElement){var l=t.closest(e.checkBoxElement,".e-checkbox-wrapper");e.changeState(l,"check"),e.checkSelectAll=!1}e.allowFiltering&&(t.removeClass([e.inputWrapper],[M]),e.filterObj.element.focus());var o={popup:e.popupObj};e.trigger("open",o)}})},s.prototype.updatePopupHeight=function(){if(!this.isFirstRender){var e=this.getHeight();if(this.popupEle.style.maxHeight=e,this.allowFiltering){i=Math.round(this.filterContainer.getBoundingClientRect().height);e=t.formatUnit(parseInt(e,10)-i+"px")}if(this.headerTemplate){i=Math.round(this.header.getBoundingClientRect().height);e=t.formatUnit(parseInt(e,10)-i+"px")}if(this.showCheckBox&&this.showSelectAll){i=Math.round(this.checkAllParent.getBoundingClientRect().height);e=t.formatUnit(parseInt(e,10)-i+"px")}if(this.footerTemplate){var i=Math.round(this.footer.getBoundingClientRect().height);e=t.formatUnit(parseInt(e,10)-i+"px")}var s=parseInt(window.getComputedStyle(this.popupEle).borderTopWidth,10);s+=parseInt(window.getComputedStyle(this.popupEle).borderBottomWidth,10),e=t.formatUnit(parseInt(e,10)-s+"px"),this.popupDiv.style.maxHeight=e}},s.prototype.createPopup=function(e){var i=this;this.isFirstRender&&(this.popupObj=new l.Popup(e,{width:this.setWidth(),targetType:"relative",collision:{X:"flip",Y:"flip"},relateTo:this.inputWrapper,zIndex:this.zIndex,enableRtl:this.enableRtl,position:{X:"left",Y:"bottom"},close:function(){i.isPopupOpen=!1},open:function(){t.EventHandler.add(document,"mousedown",i.onDocumentClick,i),i.isPopupOpen=!0},targetExitViewport:function(){t.Browser.isDevice||i.hidePopup()}}))},s.prototype.setElementWidth=function(e){var i=this.inputWrapper;t.isNullOrUndefined(e)||("number"==typeof e?i.style.width=t.formatUnit(e):"string"==typeof e&&(i.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)))},s.prototype.setWidth=function(){var e=t.formatUnit(this.popupWidth);return e.indexOf("%")>-1?e=(this.inputWrapper.offsetWidth*parseFloat(e)/100).toString()+"px":"string"==typeof this.popupWidth&&(e=this.popupWidth.match(/px|em/)?this.popupWidth:e),e},s.prototype.getHeight=function(){var e=t.formatUnit(this.popupHeight);return e.indexOf("%")>-1?e=(document.documentElement.clientHeight*parseFloat(e)/100).toString()+"px":"string"==typeof this.popupHeight&&(e=this.popupHeight.match(/px|em/)?this.popupHeight:e),e},s.prototype.onDocumentClick=function(e){var i=e.target,s=t.closest(i,".e-list-parent"),l=t.closest(i,".e-filter-wrap"),o=!!i.classList.contains("e-dropdown")||(t.matches(i,".e-ddt .e-popup")||t.matches(i,".e-ddt .e-treeview"));this.isPopupOpen&&(this.inputWrapper.contains(i)||s||l||o)||(this.allowMultiSelection||this.showCheckBox)&&(this.isPopupOpen&&i.classList.contains("e-chips-close")||this.isPopupOpen&&(i.classList.contains("e-selectall-parent")||i.classList.contains("e-all-text")||i.classList.contains("e-frame")))?(this.isDocumentClick=!1,e.preventDefault()):!this.inputWrapper.contains(i)&&this.inputFocus&&this.focusOut(e)},s.prototype.onActionFailure=function(e){this.trigger("actionFailure",e),this.l10nUpdate(!0),t.addClass([this.popupDiv],q)},s.prototype.OnDataBound=function(e){this.treeItems=e.data,this.treeItems.length<=0?(this.l10nUpdate(),t.addClass([this.popupDiv],q),this.hideCheckAll(!0)):this.popupDiv.classList.contains(q)&&this.treeItems.length>=1&&(t.removeClass([this.popupDiv],q),this.hideCheckAll(!1)),this.treeDataType=this.getTreeDataType(this.treeItems,this.fields),this.isFirstRender&&this.isRemoteData&&(this.setTreeValue(),this.setTreeText(),this.updateHiddenValue(),this.setSelectedValue(),this.wrapText||this.updateView(),this.treeObj.element.focus());var i={data:e.data};this.trigger("dataBound",i),this.isFilteredData&&this.treeObj.expandAll(),this.isFilterRestore&&(this.restoreFilterSelection(),this.isFilterRestore=!1)},s.prototype.restoreFilterSelection=function(){this.showCheckBox?this.treeObj.checkedNodes=this.value?this.value:[]:this.treeObj.selectedNodes=this.value?this.value:[]},s.prototype.setCssClass=function(e,i){var s=this.popupObj?[this.inputWrapper,this.popupObj.element]:[this.inputWrapper];t.isNullOrUndefined(i)||""===i||t.removeClass(s,i.split(" ")),t.isNullOrUndefined(e)||""===e||t.addClass(s,e.split(" "))},s.prototype.setEnableRTL=function(e){e?this.inputWrapper.classList.add("e-rtl"):this.inputWrapper.classList.remove("e-rtl"),this.popupObj&&(this.popupObj.enableRtl=e,this.popupObj.dataBind()),this.treeObj&&(this.treeObj.enableRtl=e,this.treeObj.dataBind())},s.prototype.setEnable=function(){o.Input.setEnabled(this.enabled,this.inputEle),this.enabled?(t.removeClass([this.inputWrapper],"e-disabled"),this.inputEle.setAttribute("aria-disabled","false"),this.inputWrapper.setAttribute("aria-disabled","false")):(this.isPopupOpen&&this.hidePopup(),t.addClass([this.inputWrapper],"e-disabled"),this.inputWrapper&&this.inputWrapper.classList.contains(M)&&t.removeClass([this.inputWrapper],[M]),this.inputEle.setAttribute("aria-disabled","true"),this.inputWrapper.setAttribute("aria-disabled","true"))},s.prototype.cloneFields=function(e){return{dataSource:e.dataSource,value:e.value,text:e.text,parentValue:e.parentValue,child:this.cloneChildField(e.child),hasChildren:e.hasChildren,expanded:e.expanded,iconCss:e.iconCss,imageUrl:e.imageUrl,htmlAttributes:e.htmlAttributes,query:e.query,selected:e.selected,tableName:e.tableName,tooltip:e.tooltip}},s.prototype.cloneChildField=function(e){return"string"==typeof e?e:{dataSource:e.dataSource,value:e.value,text:e.text,parentValue:e.parentValue,child:e.child?this.cloneChildField(e.child):null,hasChildren:e.hasChildren,expanded:e.expanded,iconCss:e.iconCss,imageUrl:e.imageUrl,htmlAttributes:e.htmlAttributes,query:e.query,selected:e.selected,tableName:e.tableName,tooltip:e.tooltip}},s.prototype.getTreeFields=function(e){return{dataSource:e.dataSource,id:e.value,text:e.text,parentID:e.parentValue,child:this.getTreeChildren(e.child),hasChildren:e.hasChildren,expanded:e.expanded,iconCss:e.iconCss,imageUrl:e.imageUrl,isChecked:e.selected,htmlAttributes:e.htmlAttributes,query:e.query,selected:e.selected,tableName:e.tableName,tooltip:e.tooltip}},s.prototype.getTreeChildren=function(e){if("string"==typeof e)return e;if(!t.isNullOrUndefined(e)){var i=e=this.getActualProperties(e);return e.value&&(i.id=e.value),e.parentValue&&(i.parentID=e.parentValue),e.child&&(i.child=this.getTreeChildren(e.child)),e.selected&&this.showCheckBox&&(i.isChecked=e.selected),i}return null},s.prototype.getTreeDataType=function(e,s){if(this.fields.dataSource instanceof i.DataManager){for(l=0;l<e.length;l++)if("string"==typeof s.child&&t.isNullOrUndefined(t.getValue(s.child,e[l])))return 1;return 2}for(var l=0,o=e.length;l<o;l++){if("string"==typeof s.child&&!t.isNullOrUndefined(t.getValue(s.child,e[l])))return 2;if(!t.isNullOrUndefined(t.getValue(s.parentValue,e[l]))||!t.isNullOrUndefined(t.getValue(s.hasChildren,e[l])))return 1}return 1},s.prototype.setFields=function(){this.resetValue(),this.hasTemplate&&this.updateTemplate(),this.treeObj.fields=this.getTreeFields(this.fields),this.treeObj.dataBind()},s.prototype.getEventArgs=function(e){var t,i=e.data,s=e.nodeData;return this.showCheckBox&&("check"===e.action?t="select":"uncheck"===e.action&&(t="un-select")),{action:this.showCheckBox?t:e.action,isInteracted:e.isInteracted,item:e.node,itemData:this.showCheckBox?i[0]:s}},s.prototype.onBeforeSelect=function(e){e.isInteracted&&(this.oldValue=this.value?this.value.slice():this.value,null===this.value&&this.setProperties({value:[]},!0))},s.prototype.updateHiddenValue=function(){this.allowMultiSelection||this.showCheckBox||(this.value&&this.value.length?this.hiddenElement.innerHTML='<option selected value ="'+this.value[0]+'">'+this.text+"</option>":this.hiddenElement.innerHTML="")},s.prototype.onNodeSelected=function(e){if(!this.showCheckBox){var i;if(e.isInteracted){var s=t.getValue("id",e.nodeData).toString();this.allowMultiSelection?this.allowMultiSelection&&this.setMultiSelect():(this.hiddenElement.innerHTML="",this.setProperties({value:[s]},!0),i=this.itemTemplate?t.getValue("text",this.treeObj.getNode(s)):t.getValue("text",e.nodeData).toString(),o.Input.setValue(i,this.inputEle,this.floatLabelType),this.setProperties({text:i},!0),this.currentText=this.text,this.currentValue=this.value,t.attributes(this.inputWrapper,{"aria-describedby":this.element.id}),t.attributes(this.inputWrapper,{"aria-activedescendant":s.toString()}),this.updateHiddenValue(),this.showOverAllClear(),this.hidePopup(),this.isNodeSelected=!0)}var l=this.getEventArgs(e);this.trigger("select",l),this.isValueChange&&!this.changeOnBlur&&(this.triggerChangeEvent(this.keyEventArgs),this.isValueChange=!1)}},s.prototype.onNodeClicked=function(e){!this.changeOnBlur&&this.isNodeSelected&&(this.triggerChangeEvent(e.event),this.isNodeSelected=!1);var t=e.event.target;(t.classList.contains("e-fullrow")||t.classList.contains("e-list-text"))&&this.showCheckBox&&("true"===this.treeObj.getNode(e.node).isChecked?this.treeObj.uncheckAll([e.node]):this.treeObj.checkAll([e.node]),this.setMultiSelect(),this.ensurePlaceHolder()),this.changeOnBlur||!this.allowMultiSelection&&!this.showCheckBox||this.triggerChangeEvent(e.event)},s.prototype.onNodeChecked=function(e){var i=this.getEventArgs(e);if(this.trigger("select",i),this.isFilteredData&&"uncheck"===e.action){var s=t.getValue("id",e.data[0]).toString();this.removeSelectedData(s,!0)}if(!this.isChipDelete&&e.isInteracted&&(this.setMultiSelect(),this.ensurePlaceHolder()),this.showSelectAll&&this.checkBoxElement){var l=this.treeObj.element.querySelectorAll("li"),o=this.treeObj.element.querySelectorAll("li .e-checkbox-wrapper[aria-checked=true]"),r=t.closest(this.checkBoxElement,".e-checkbox-wrapper");r&&"uncheck"===e.action?(this.isReverseUpdate=!0,this.changeState(r,"uncheck"),this.isReverseUpdate=!1):r&&"check"===e.action&&o.length===l.length&&(this.isReverseUpdate=!0,this.changeState(r,"check"),this.isReverseUpdate=!1)}},s.prototype.beforeCheck=function(e){e.isInteracted&&(this.oldValue=this.value?this.value.slice():this.value)},s.prototype.updateClearButton=function(e){if(e?this.inputWrapper.contains(this.overAllClear)?(t.removeClass([this.overAllClear],j),t.addClass([this.inputWrapper],V)):this.inputEle.parentElement.insertBefore(this.overAllClear,this.inputEle.nextSibling):(t.addClass([this.overAllClear],j),t.removeClass([this.inputWrapper],V)),(this.allowMultiSelection||this.showCheckBox)&&this.chipWrapper)for(var i=t.selectAll(".e-chips-close",this.chipWrapper),s=0;s<i.length;s++)e?t.removeClass([i[s]],j):t.addClass([i[s]],j)},s.prototype.updateDropDownIconState=function(e){var i=t.select(".e-ddt-icon",this.inputWrapper);e?(i?t.removeClass([i],j):o.Input.appendSpan(W,this.inputWrapper,this.createElement),t.addClass([this.inputWrapper],"e-show-dd-icon")):(t.addClass([i],j),t.removeClass([this.inputWrapper],"e-show-dd-icon"))},s.prototype.updateMode=function(){if("Delimiter"!==this.mode){this.inputWrapper.contains(this.chipWrapper)||this.createChip();var e=this.getValidMode();this.chipWrapper.classList.contains(j)&&e?(t.removeClass([this.chipWrapper],j),t.addClass([this.inputWrapper],H)):e||(t.addClass([this.chipWrapper],j),t.removeClass([this.inputWrapper],H));var i=null!==this.value&&0!==this.value.length;e&&i?t.addClass([this.inputEle],U):t.removeClass([this.inputEle],U)}else this.inputEle.classList.contains(U)&&(t.removeClass([this.inputEle],U),this.chipWrapper&&(t.addClass([this.chipWrapper],j),t.removeClass([this.inputWrapper],H)))},s.prototype.ensurePlaceHolder=function(){this.value&&0===this.value.length&&(t.removeClass([this.inputEle],U),this.chipWrapper&&t.addClass([this.chipWrapper],j))},s.prototype.ensureClearIconPosition=function(e){"Never"!==e&&this.inputWrapper.insertBefore(this.overAllClear,this.inputObj.buttons[0])},s.prototype.setMultiSelectValue=function(e){if(this.isFilteredData){for(var i=t.isNullOrUndefined(this.value)?[]:this.value,s=0;s<e.length;s++)(t.isNullOrUndefined(this.value)||-1===this.value.indexOf(e[s]))&&i.push(e[s]);this.setProperties({value:i},!0)}else this.setProperties({value:e},!0),e&&0!==e.length&&!this.showCheckBox&&(this.treeObj.selectedNodes=this.value.slice(),this.treeObj.dataBind())},s.prototype.setMultiSelect=function(){if(this.showCheckBox&&!this.isDynamicChange)this.setMultiSelectValue(this.treeObj.checkedNodes.slice());else{var e=this.allowMultiSelection?this.showCheckBox?this.treeObj.checkedNodes:this.treeObj.selectedNodes:this.value?this.showCheckBox?this.value:[this.value[0]]:null;this.setMultiSelectValue(e),this.showCheckBox&&null!==this.value&&(this.treeObj.checkedNodes=this.value,this.treeObj.dataBind())}this.selectedText=[];var i=!!this.allowMultiSelection||!!this.showCheckBox;this.inputWrapper.contains(this.chipWrapper)&&!i&&(t.removeClass([this.inputEle],U),t.detach(this.chipWrapper)),this.getValidMode()&&null!==this.value&&(t.addClass([this.inputEle],U),this.chipWrapper&&t.removeClass([this.chipWrapper],j));var s=!!this.value&&!!this.value.length;this.chipWrapper&&"Box"===this.mode&&!s&&(t.addClass([this.chipWrapper],j),t.removeClass([this.inputEle],U)),this.updateSelectedValues()},s.prototype.getSelectedData=function(e){var i=null;if(this.isFilteredData)for(var s=0;s<this.selectedData.length;s++)if(t.getValue(this.treeSettings.loadOnDemand?this.fields.value:"id",this.selectedData[s]).toString()===e){i=this.selectedData[s];break}return t.isNullOrUndefined(i)&&(i=this.treeSettings.loadOnDemand?this.treeObj.getTreeData(e)[0]:this.treeObj.getNode(e),t.isNullOrUndefined(i)||this.selectedData.push(i)),i},s.prototype.removeSelectedData=function(e,i){var s=t.isNullOrUndefined(this.value)?[]:this.value.slice();s.splice(s.indexOf(e),1),this.setProperties({value:s},i);for(var l=0;l<this.selectedData.length;l++)if(t.getValue(this.treeSettings.loadOnDemand?this.fields.value:"id",this.selectedData[l]).toString()===e){this.selectedData.splice(l,1);break}},s.prototype.updateSelectedValues=function(){this.dataValue="";var e,i,s,l="";if(this.hiddenElement.innerHTML="",this.isChipDelete&&!this.treeSettings.autoCheck||!this.inputWrapper.contains(this.chipWrapper)||(this.chipCollection.innerHTML=""),this.isFilteredData||(this.selectedData=[]),!t.isNullOrUndefined(this.value))for(var r=0,n=this.value.length;r<n;r++)s=this.getSelectedData(this.value[r]),i=t.getValue(this.treeSettings.loadOnDemand?this.fields.text:"text",s),this.selectedText.push(i),e=this.selectedText[this.selectedText.length-1],this.selectedText.length>1?(this.dataValue+=this.delimiterChar+" "+e,l+=","+e,this.setProperties({text:l},!0)):(this.dataValue+=e,l+=e),"Delimiter"===this.mode||this.isChipDelete&&!this.treeSettings.autoCheck||!this.allowMultiSelection&&!this.showCheckBox||this.setChipValues(e,this.value[r]),this.hiddenElement.innerHTML+='<option selected value ="'+this.value[r]+'">'+this.selectedText[this.selectedText.length-1]+"</option>";var a=this.getValidMode();"Box"===this.mode||!this.allowMultiSelection&&!this.showCheckBox||a||this.chipWrapper&&(t.addClass([this.chipWrapper],j),t.removeClass([this.inputWrapper],H)),o.Input.setValue(this.dataValue,this.inputEle,this.floatLabelType),""===l?this.setProperties({text:null},!0):this.setProperties({text:l},!0),this.showClearButton&&this.inputFocus&&this.showOverAllClear(),(this.allowMultiSelection||this.showCheckBox)&&this.popupObj&&this.popupObj.refreshPosition(),this.currentText=this.text,this.currentValue=this.value},s.prototype.setChipValues=function(e,i){this.inputWrapper.contains(this.chipWrapper)||this.createChip();var s=this.createElement("span",{className:"e-chips",attrs:{"data-value":i}}),l=this.createElement("span",{className:"e-chipcontent"}),o=this.createElement("span",{className:"e-chips-close e-icons"});l.innerHTML=e,s.appendChild(l),this.chipCollection.appendChild(s),this.showClearButton&&(s.appendChild(o),t.EventHandler.add(o,"mousedown",this.removeChip,this))},s.prototype.setSelectAllWrapper=function(e){this.isFirstRender||(e&&!this.popupEle.contains(this.checkAllParent)&&this.showCheckBox?(this.createSelectAllWrapper(),this.popupEle.insertBefore(this.checkAllParent,this.popupDiv)):this.popupEle.contains(this.checkAllParent)&&(t.detach(this.checkAllParent),this.checkAllParent=null))},s.prototype.setHeaderTemplate=function(){this.header?this.header.innerHTML="":(this.header=this.createElement("div"),t.addClass([this.header],"e-ddt-header"));var e=this.templateComplier(this.headerTemplate)({},this,"headerTemplate",this.headerTemplateId,this.isStringTemplate,void 0,this.header);e&&(e=Array.prototype.slice.call(e),t.append(e,this.header)),this.ddtupdateBlazorTemplates(!1,!1,!0,!1),this.popupEle.insertBefore(this.header,this.checkAllParent?this.checkAllParent:this.popupDiv)},s.prototype.templateComplier=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}return t.compile(e)},s.prototype.setFooterTemplate=function(){this.footer?this.footer.innerHTML="":(this.footer=this.createElement("div"),t.addClass([this.footer],"e-ddt-footer"));var e=this.templateComplier(this.footerTemplate)({},this,"footerTemplate",this.footerTemplateId,this.isStringTemplate,void 0,this.footer);e&&(e=Array.prototype.slice.call(e),t.append(e,this.footer)),this.ddtupdateBlazorTemplates(!1,!1,!1,!0),t.append([this.footer],this.popupEle)},s.prototype.clearAll=function(e){this.enabled&&!this.readonly&&(this.resetValue(),this.showOverAllClear(),(this.allowMultiSelection||this.showCheckBox)&&(this.popupObj&&this.popupObj.refreshPosition(),this.wrapText||this.updateOverflowWrapper(!0)),e&&(this.isClearButtonClick=!0),this.changeOnBlur||this.triggerChangeEvent(e))},s.prototype.removeChip=function(e){if(this.enabled&&!this.readonly){var i=e.target.parentElement,s=i.getAttribute("data-value");this.chipCollection&&i&&t.remove(i),this.isChipDelete=!0,this.isClearButtonClick=!0,this.removeSelectedData(s,!0),this.selectedText=[],this.allowMultiSelection&&(this.treeObj.selectedNodes=this.value.slice(),this.updateSelectedValues()),this.showCheckBox&&(this.treeObj.uncheckAll([s]),this.clearCheckAll(),this.setMultiSelect()),this.triggerChangeEvent(e),this.isChipDelete=!1,this.ensurePlaceHolder()}},s.prototype.resetValue=function(e){o.Input.setValue(null,this.inputEle,this.floatLabelType),e||(this.oldValue=this.value,this.setProperties({value:[]},!0)),this.dataValue=null,this.setProperties({text:null},!0),this.selectedData=[],t.setValue("selectedNodes",[],this.treeObj),this.hiddenElement.innerHTML="",this.showCheckBox&&(this.treeObj.uncheckAll(),this.setMultiSelect(),this.clearCheckAll()),null!==this.oldValue||e?e&&this.triggerChangeEvent():this.removeValue=!0,(this.allowMultiSelection||this.showCheckBox)&&this.chipWrapper&&(this.chipCollection.innerHTML="",this.wrapText||this.updateOverflowWrapper(!0),this.ensurePlaceHolder())},s.prototype.clearCheckAll=function(){this.showSelectAll&&this.value&&0===this.value.length&&this.setLocale(!1)},s.prototype.selectAllItems=function(e){if(this.showCheckBox)e?this.treeObj.checkAll():this.treeObj.uncheckAll(),this.checkSelectAll=!0;else if(this.allowMultiSelection)if(e){for(var i=t.selectAll("li",this.treeObj.element),s=void 0,l=[],o=0;o<i.length;o++)s=i[o].getAttribute("data-uid").toString(),l.push(s);this.treeObj.selectedNodes=l}else this.treeObj.selectedNodes=[];this.updateMode(),this.setMultiSelect(),this.wrapText||(e?this.updateView():this.updateOverflowWrapper(!0))},s.prototype.updateTreeSettings=function(e){var t=Object.keys(e.treeSettings)[0];if("autoCheck"===t)this.ensureAutoCheck(),this.treeObj.autoCheck=this.treeSettings.autoCheck;else if("loadOnDemand"===t)this.treeObj.loadOnDemand=this.treeSettings.loadOnDemand;else if("expandOn"===t)return this.treeObj.expandOn=this.treeSettings.expandOn,void this.treeObj.dataBind();this.treeObj.dataBind(),this.setMultiSelect(),this.updateValue(this.value)},s.prototype.updateCheckBoxState=function(e){this.hasTemplate&&this.updateTemplate(),this.wrapText||this.updateOverflowWrapper(!1),this.treeObj.showCheckBox=e,this.treeObj.dataBind(),this.isDynamicChange=!0,this.setSelectAllWrapper(this.showSelectAll),this.showSelectAll&&this.setLocale(),this.showCheckBox&&this.updateMode(),this.setMultiSelect(),this.isDynamicChange=!1},s.prototype.updateTemplate=function(){this.popupObj&&(this.clearTemplate(),this.portals=[],this.popupObj.destroy(),this.isPopupOpen?(this.hidePopup(),this.isFirstRender=!0,this.renderPopup()):this.isFirstRender=!0)},s.prototype.l10nUpdate=function(e){if(this.noRecord?this.noRecord.innerHTML="":(this.noRecord=this.createElement("div"),t.addClass([this.noRecord],"e-ddt-nodata"),t.prepend([this.noRecord],this.popupDiv)),"No Records Found"!==this.noRecordsTemplate||"The Request Failed"!==this.actionFailureTemplate){var i=e?this.actionFailureTemplate:this.noRecordsTemplate,s=e?this.actionFailureTemplateId:this.noRecordsTemplateId,l=e?"actionFailureTemplate":"noRecordsTemplate",o=this.templateComplier(i)({},this,l,s,this.isStringTemplate,void 0,this.noRecord);o&&(o=Array.prototype.slice.call(o),t.append(o,this.noRecord)),this.ddtupdateBlazorTemplates(!e,e)}else{var r={noRecordsTemplate:"No Records Found",actionFailureTemplate:"The Request Failed"};this.l10n=new t.L10n(this.getLocaleName(),r,this.locale),this.noRecord.innerHTML=e?this.l10n.getConstant("actionFailureTemplate"):this.l10n.getConstant("noRecordsTemplate")}},s.prototype.ddtupdateBlazorTemplates=function(e,i,s,l,o){this.isStringTemplate||(this.noRecordsTemplate&&e&&t.updateBlazorTemplate(this.noRecordsTemplateId,"NoRecordsTemplate",this,o),this.actionFailureTemplate&&i&&t.updateBlazorTemplate(this.actionFailureTemplateId,"ActionFailureTemplate",this,o),s&&t.updateBlazorTemplate(this.headerTemplateId,"HeaderTemplate",this),l&&t.updateBlazorTemplate(this.footerTemplateId,"FooterTemplate",this))},s.prototype.ddtresetBlazorTemplates=function(e,i,s,l){this.isStringTemplate||(this.noRecordsTemplate&&e&&t.resetBlazorTemplate(this.noRecordsTemplateId,"NoRecordsTemplate"),this.actionFailureTemplate&&i&&t.resetBlazorTemplate(this.actionFailureTemplateId,"ActionFailureTemplate"),s&&t.resetBlazorTemplate(this.headerTemplateId,"HeaderTemplate"),l&&t.resetBlazorTemplate(this.footerTemplateId,"FooterTemplate"))},s.prototype.updateRecordTemplate=function(e){this.treeItems&&this.treeItems.length<=0&&(this.l10nUpdate(e),this.hasTemplate&&this.updateTemplate())},s.prototype.updateOverflowWrapper=function(e){e?this.inputWrapper.contains(this.overFlowWrapper)&&e&&(this.overFlowWrapper.innerHTML=""):this.inputWrapper.contains(this.overFlowWrapper)||(this.overFlowWrapper=this.createElement("span",{className:"e-overflow "+j}),this.inputWrapper.insertBefore(this.overFlowWrapper,this.hiddenElement))},s.prototype.updateMultiSelection=function(e){this.wrapText||this.updateOverflowWrapper(!1),this.treeObj.allowMultiSelection=e,this.treeObj.dataBind(),this.updateOption(),this.allowMultiSelection&&this.updateMode(),this.setMultiSelect()},s.prototype.updateAllowFiltering=function(e){this.isFirstRender||(e?this.renderFilter():this.destroyFilter()),this.ensureAutoCheck()},s.prototype.updateFilterPlaceHolder=function(){this.filterObj&&(this.filterObj.placeholder=this.filterBarPlaceholder,this.filterObj.element.setAttribute("aria-label",this.filterBarPlaceholder))},s.prototype.updateValue=function(e){this.isDynamicChange=!0,t.isNullOrUndefined(e)||0===e.length?this.resetValue(!0):(this.setTreeValue(),!this.allowMultiSelection&&!this.showCheckBox||this.wrapText||(this.updateOverflowWrapper(!1),this.updateView())),this.updateHiddenValue(),this.isDynamicChange=!1},s.prototype.updateText=function(e){t.isNullOrUndefined(e)?this.resetValue():(this.setTreeText(),!this.allowMultiSelection&&!this.showCheckBox||this.wrapText||(this.updateOverflowWrapper(!1),this.updateView())),this.updateHiddenValue()},s.prototype.updateModelMode=function(){if(!!this.allowMultiSelection||!!this.showCheckBox){if(!this.wrapText){var e=t.select(".e-overflow",this.inputWrapper);e&&(e.innerHTML="")}this.updateMode(),this.setMultiSelect(),!this.wrapText&&this.value&&0!==this.value.length&&(this.updateOverFlowView(),t.addClass([this.inputEle],U),"Box"===this.mode?t.removeClass([this.overFlowWrapper,this.inputWrapper],"e-show-text"):t.addClass([this.overFlowWrapper,this.inputWrapper],"e-show-text"))}},s.prototype.updateOption=function(){this.hiddenElement.hasAttribute("multiple")||!this.allowMultiSelection&&!this.showCheckBox?!this.hiddenElement.hasAttribute("multiple")||this.allowMultiSelection||this.showCheckBox||this.hiddenElement.removeAttribute("multiple"):this.hiddenElement.setAttribute("multiple","")},s.prototype.onPropertyChanged=function(e,i){for(var s=0,l=Object.keys(e);s<l.length;s++)switch(l[s]){case"width":this.setElementWidth(e.width),this.popupObj&&(this.popupObj.element.style.width=this.setWidth());break;case"placeholder":o.Input.setPlaceholder(e.placeholder,this.inputEle);break;case"cssClass":this.setCssClass(e.cssClass,i.cssClass);break;case"enableRtl":this.setEnableRTL(this.enableRtl);break;case"fields":this.setFields();break;case"readonly":o.Input.setReadonly(e.readonly,this.inputEle);break;case"enabled":this.setEnable();break;case"floatLabelType":o.Input.removeFloating(this.inputObj),o.Input.addFloating(this.inputEle,e.floatLabelType,this.placeholder,this.createElement),this.ensureClearIconPosition(e.floatLabelType);break;case"showClearButton":this.updateClearButton(e.showClearButton);break;case"allowFiltering":this.updateAllowFiltering(e.allowFiltering);break;case"filterBarPlaceholder":this.updateFilterPlaceHolder();break;case"value":this.oldValue=i.value,this.updateValue(e.value);break;case"text":this.updateText(e.text);break;case"allowMultiSelection":this.updateMultiSelection(e.allowMultiSelection);break;case"mode":this.updateModelMode();break;case"delimiterChar":if("Box"===this.mode)return;(this.showCheckBox||this.allowMultiSelection)&&this.setMultiSelect();break;case"selectAllText":this.showCheckBox&&this.showSelectAll&&this.setLocale();break;case"unSelectAllText":this.showCheckBox&&this.showSelectAll&&this.setLocale(!1);break;case"showSelectAll":this.showCheckBox&&(this.setSelectAllWrapper(e.showSelectAll),this.updatePopupHeight());break;case"showCheckBox":this.updateCheckBoxState(e.showCheckBox),this.wrapText||this.updateOverflowWrapper(!0),this.updatePopupHeight(),this.updateOption();break;case"treeSettings":this.updateTreeSettings(e);break;case"sortOrder":this.hasTemplate&&this.updateTemplate(),this.treeObj.sortOrder=e.sortOrder,this.updateValue(this.value),this.treeObj.dataBind();break;case"showDropDownIcon":this.updateDropDownIconState(e.showDropDownIcon);break;case"popupWidth":this.popupObj&&(this.popupObj.element.style.width=this.setWidth());break;case"popupHeight":this.popupObj&&this.updatePopupHeight();break;case"zIndex":this.popupObj&&(this.popupObj.zIndex=e.zIndex,this.popupObj.dataBind());break;case"headerTemplate":case"footerTemplate":this.updateTemplate();break;case"itemTemplate":this.updateTemplate(),this.treeObj.nodeTemplate=e.itemTemplate,this.treeObj.dataBind();break;case"noRecordsTemplate":this.updateRecordTemplate();break;case"actionFailureTemplate":this.updateRecordTemplate(!0);break;case"htmlAttributes":this.setHTMLAttributes();break;case"wrapText":this.updateOverflowWrapper(this.wrapText),!this.allowMultiSelection&&!this.showCheckBox||this.wrapText?(t.addClass([this.overFlowWrapper],j),this.chipWrapper&&"Box"===this.mode?t.removeClass([this.chipWrapper],j):(t.removeClass([this.inputWrapper],H),t.removeClass([this.inputEle],U)),this.ensurePlaceHolder()):this.updateView()}},s.prototype.clear=function(){this.clearAll(),this.inputFocus?this.onFocusOut():(this.changeOnBlur&&this.triggerChangeEvent(),this.removeValue=!1)},s.prototype.destroy=function(){this.ddtresetBlazorTemplates(!0,!0,!0,!0),this.clearTemplate(),this.unWireEvents(),this.setCssClass(null,this.cssClass),this.resetValue(),this.treeObj.destroy(),this.destroyFilter(),this.popupObj&&(this.popupObj.destroy(),t.detach(this.popupObj.element)),this.element.tagName!==this.getDirective()&&this.inputWrapper.parentElement.insertBefore(this.element,this.inputWrapper),t.detach(this.inputWrapper),t.detach(this.popupDiv),this.element.classList.remove("e-input"),e.prototype.destroy.call(this)},s.prototype.destroyFilter=function(){this.filterObj&&(this.filterObj.destroy(),t.detach(this.filterObj.element),t.detach(this.filterContainer),this.filterObj=null)},s.prototype.ensureVisible=function(e){this.treeObj.ensureVisible(e)},s.prototype.getData=function(e){return this.treeObj.getTreeData(e)},s.prototype.hidePopup=function(){var e={popup:this.popupObj};this.inputWrapper.classList.remove("e-icon-anim"),this.popupEle&&(this.popupEle.style.display="none"),t.attributes(this.inputWrapper,{"aria-expanded":"false"}),this.popupObj&&this.isPopupOpen&&(this.popupObj.hide(),this.inputFocus&&(this.inputWrapper.focus(),this.allowFiltering&&t.addClass([this.inputWrapper],[M])),this.trigger("close",e))},s.prototype.selectAll=function(e){this.selectAllItems(e)},s.prototype.showPopup=function(){!this.enabled||this.readonly||this.isPopupOpen||(this.renderPopup(),this.focusIn())},s.prototype.getModuleName=function(){return"dropdowntree"},F([t.Property("The Request Failed")],s.prototype,"actionFailureTemplate",void 0),F([t.Property(!1)],s.prototype,"allowFiltering",void 0),F([t.Property(!1)],s.prototype,"allowMultiSelection",void 0),F([t.Property(!0)],s.prototype,"changeOnBlur",void 0),F([t.Property("")],s.prototype,"cssClass",void 0),F([t.Property(",")],s.prototype,"delimiterChar",void 0),F([t.Property(!0)],s.prototype,"enabled",void 0),F([t.Complex({},z)],s.prototype,"fields",void 0),F([t.Property(null)],s.prototype,"filterBarPlaceholder",void 0),F([t.Property("StartsWith")],s.prototype,"filterType",void 0),F([t.Property("Never")],s.prototype,"floatLabelType",void 0),F([t.Property(null)],s.prototype,"footerTemplate",void 0),F([t.Property(!1)],s.prototype,"ignoreAccent",void 0),F([t.Property(!0)],s.prototype,"ignoreCase",void 0),F([t.Property(null)],s.prototype,"headerTemplate",void 0),F([t.Property({})],s.prototype,"htmlAttributes",void 0),F([t.Property(null)],s.prototype,"itemTemplate",void 0),F([t.Property("Default")],s.prototype,"mode",void 0),F([t.Property("No Records Found")],s.prototype,"noRecordsTemplate",void 0),F([t.Property(null)],s.prototype,"placeholder",void 0),F([t.Property("300px")],s.prototype,"popupHeight",void 0),F([t.Property("100%")],s.prototype,"popupWidth",void 0),F([t.Property(!1)],s.prototype,"readonly",void 0),F([t.Property(!1)],s.prototype,"showSelectAll",void 0),F([t.Property("Select All")],s.prototype,"selectAllText",void 0),F([t.Property(!1)],s.prototype,"showCheckBox",void 0),F([t.Property(!0)],s.prototype,"showClearButton",void 0),F([t.Property(!0)],s.prototype,"showDropDownIcon",void 0),F([t.Property("None")],s.prototype,"sortOrder",void 0),F([t.Property(null)],s.prototype,"text",void 0),F([t.Complex({},K)],s.prototype,"treeSettings",void 0),F([t.Property("Unselect All")],s.prototype,"unSelectAllText",void 0),F([t.Property(null)],s.prototype,"value",void 0),F([t.Property("100%")],s.prototype,"width",void 0),F([t.Property(1e3)],s.prototype,"zIndex",void 0),F([t.Property(!1)],s.prototype,"wrapText",void 0),F([t.Event()],s.prototype,"actionFailure",void 0),F([t.Event()],s.prototype,"beforeOpen",void 0),F([t.Event()],s.prototype,"change",void 0),F([t.Event()],s.prototype,"close",void 0),F([t.Event()],s.prototype,"blur",void 0),F([t.Event()],s.prototype,"created",void 0),F([t.Event()],s.prototype,"dataBound",void 0),F([t.Event()],s.prototype,"destroyed",void 0),F([t.Event()],s.prototype,"filtering",void 0),F([t.Event()],s.prototype,"focus",void 0),F([t.Event()],s.prototype,"keyPress",void 0),F([t.Event()],s.prototype,"open",void 0),F([t.Event()],s.prototype,"select",void 0),s=F([t.NotifyPropertyChanges],s)}(t.Component),G=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Q=function(e,t,i,s){var l,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(l=e[n])&&(r=(o<3?l(r):o>3?l(t,i,r):l(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};I.root="e-combobox";var J={container:null,buttons:[]},X=function(e){function i(t,i){return e.call(this,t,i)||this}return G(i,e),i.prototype.preRender=function(){e.prototype.preRender.call(this)},i.prototype.getLocaleName=function(){return"combo-box"},i.prototype.wireEvent=function(){"combobox"===this.getModuleName()&&(t.EventHandler.add(this.inputWrapper.buttons[0],"mousedown",this.preventBlur,this),t.EventHandler.add(this.inputWrapper.container,"blur",this.onBlur,this)),t.isNullOrUndefined(this.inputWrapper.buttons[0])||t.EventHandler.add(this.inputWrapper.buttons[0],"mousedown",this.dropDownClick,this),t.EventHandler.add(this.inputElement,"focus",this.targetFocus,this),this.readonly||(t.EventHandler.add(this.inputElement,"input",this.onInput,this),t.EventHandler.add(this.inputElement,"keyup",this.onFilterUp,this),t.EventHandler.add(this.inputElement,"keydown",this.onFilterDown,this),t.EventHandler.add(this.inputElement,"paste",this.pasteHandler,this)),this.bindCommonEvent()},i.prototype.preventBlur=function(e){(this.allowFiltering||document.activeElement===this.inputElement||document.activeElement.classList.contains(I.input)||!t.Browser.isDevice)&&t.Browser.isDevice||e.preventDefault()},i.prototype.onBlur=function(i){var s=this.inputElement&&""===this.inputElement.value?null:this.inputElement&&this.inputElement.value;t.isNullOrUndefined(this.listData)||t.isNullOrUndefined(s)||s===this.text||this.customValue(i),e.prototype.onBlur.call(this,i)},i.prototype.targetElement=function(){return this.inputElement},i.prototype.setOldText=function(e){o.Input.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton),this.customValue(),this.removeSelection()},i.prototype.setOldValue=function(e){this.allowCustom?this.valueMuteChange(this.value):this.valueMuteChange(null),this.removeSelection(),this.setHiddenValue()},i.prototype.valueMuteChange=function(e){var i=t.isNullOrUndefined(e)?null:e.toString();o.Input.setValue(i,this.inputElement,this.floatLabelType,this.showClearButton),this.setProperties({value:e,text:e,index:null},!0),this.activeIndex=this.index;var s=this.fields,l={};l[s.text]=t.isNullOrUndefined(e)?null:e.toString(),l[s.value]=t.isNullOrUndefined(e)?null:e.toString(),this.itemData=l,this.item=null,this.previousValue!==this.value&&this.detachChangeEvent(null)},i.prototype.updateValues=function(){if(t.isNullOrUndefined(this.value))if(this.text&&t.isNullOrUndefined(this.value)){var e=this.getElementByText(this.text);e?this.setSelection(e,null):(o.Input.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton),this.customValue())}else this.setSelection(this.liCollections[this.activeIndex],null);else(e=this.getElementByValue(this.value))?this.setSelection(e,null):this.allowCustom?this.valueMuteChange(this.value):this.valueMuteChange(null);this.setHiddenValue(),o.Input.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton)},i.prototype.updateIconState=function(){this.showClearButton&&(this.inputElement&&""!==this.inputElement.value&&!this.readonly?t.removeClass([this.inputWrapper.clearButton],I.clearIconHide):t.addClass([this.inputWrapper.clearButton],I.clearIconHide))},i.prototype.getAriaAttributes=function(){return{"aria-owns":this.element.id+"_options",role:"combobox","aria-autocomplete":"both","aria-labelledby":this.hiddenElement.id,"aria-hasPopup":"true","aria-expanded":"false","aria-readonly":this.readonly.toString(),autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false"}},i.prototype.searchLists=function(t){this.isTyped=!0,this.isFiltering()?(e.prototype.searchLists.call(this,t),this.ulElement&&""===this.filterInput.value.trim()&&this.setHoverList(this.ulElement.querySelector("."+I.li))):(this.ulElement&&""===this.inputElement.value&&this.preventAutoFill&&this.setHoverList(this.ulElement.querySelector("."+I.li)),this.incrementalSearch(t))},i.prototype.getNgDirective=function(){return"EJS-COMBOBOX"},i.prototype.setSearchBox=function(){return this.filterInput=this.inputElement,this.isFiltering()?this.inputWrapper:J},i.prototype.onActionComplete=function(t,i,s,l){this.isServerBlazor||e.prototype.onActionComplete.call(this,t,i,s),this.isSelectCustom&&this.removeSelection(),!this.preventAutoFill&&"combobox"===this.getModuleName()&&this.isTyped&&this.inlineSearch()},i.prototype.getFocusElement=function(){var e=this.isSelectCustom?{text:""}:this.getItemData(),i=this.list.querySelector("."+I.selected);if(e.text===this.inputElement.value&&!t.isNullOrUndefined(i))return i;if((t.Browser.isDevice&&!this.isDropDownClick||!t.Browser.isDevice)&&!t.isNullOrUndefined(this.liCollections)&&this.liCollections.length>0){var s=h(this.inputElement.value,this.liCollections,"StartsWith",!0).item;if(t.isNullOrUndefined(s))this.isSelectCustom&&""!==this.inputElement.value.trim()&&(this.removeFocus(),this.list.scrollTop=0);else{var l=this.getIndexByValue(s.getAttribute("data-value"))-1,o=parseInt(getComputedStyle(this.liCollections[0],null).getPropertyValue("height"),10);if(!isNaN(o)&&"autocomplete"!==this.getModuleName()){this.removeFocus();var r=this.fields.groupBy?this.liCollections[0].offsetHeight:0;this.list.scrollTop=l*o+r,t.addClass([s],I.focus)}}return s}return null},i.prototype.setValue=function(t){return t&&"keydown"===t.type&&"enter"===t.action&&this.removeFillSelection(),this.autofill&&"combobox"===this.getModuleName()&&t&&"keydown"===t.type&&"enter"!==t.action?(this.preventAutoFill=!1,this.inlineSearch(t),!1):e.prototype.setValue.call(this,t)},i.prototype.checkCustomValue=function(){this.itemData=this.getDataByValue(this.value);var e=this.getItemData();this.allowCustom&&t.isNullOrUndefined(e.value)&&t.isNullOrUndefined(e.text)||this.setProperties({value:e.value,text:e.text},!this.allowCustom)},i.prototype.showSpinner=function(){t.isNullOrUndefined(this.spinnerElement)&&(this.spinnerElement="autocomplete"===this.getModuleName()?this.inputWrapper.buttons[0]||this.inputWrapper.clearButton||o.Input.appendSpan("e-input-group-icon e-atc-spinner-icon",this.inputWrapper.container,this.createElement):this.inputWrapper.buttons[0]||this.inputWrapper.clearButton,t.addClass([this.spinnerElement],I.disableIcon),l.createSpinner({target:this.spinnerElement,width:t.Browser.isDevice?"16px":"14px"},this.createElement),l.showSpinner(this.spinnerElement))},i.prototype.hideSpinner=function(){t.isNullOrUndefined(this.spinnerElement)||(l.hideSpinner(this.spinnerElement),t.removeClass([this.spinnerElement],I.disableIcon),this.spinnerElement.classList.contains("e-atc-spinner-icon")?t.detach(this.spinnerElement):this.spinnerElement.innerHTML="",this.spinnerElement=null)},i.prototype.setAutoFill=function(e,t){if(t||this.setHoverList(e),this.autofill&&!this.preventAutoFill){var i=this.getTextByValue(e.getAttribute("data-value")).toString(),s=this.getFormattedValue(e.getAttribute("data-value"));"combobox"===this.getModuleName()&&(this.isSelected||this.previousValue===s?this.updateSelectedItem(e,null,!0):(this.updateSelectedItem(e,null),this.isSelected=!0,this.previousValue=this.getFormattedValue(e.getAttribute("data-value")))),this.isAndroidAutoFill(i)||this.setAutoFillSelection(i)}},i.prototype.isAndroidAutoFill=function(e){if(t.Browser.isAndroid){var i=this.getSelectionPoints(),s=this.prevSelectPoints.end,l=i.end,o=this.prevSelectPoints.start,r=i.start;return 0!==s&&(s===e.length&&o===e.length||o>r&&s>l||s===l&&o===r)}return!1},i.prototype.clearAll=function(i,s){(t.isNullOrUndefined(s)||!t.isNullOrUndefined(s)&&t.isNullOrUndefined(s.dataSource))&&(e.prototype.clearAll.call(this,i),this.isServerBlazor&&this.isFiltering()&&this.isPopupOpen&&i&&this.interopAdaptor.invokeMethodAsync("OnServerRenderList",this.beforePopupOpen,!0)),this.isFiltering()&&!t.isNullOrUndefined(i)&&i.target===this.inputWrapper.clearButton&&this.searchLists(i)},i.prototype.isSelectFocusItem=function(e){return!t.isNullOrUndefined(e)},i.prototype.inlineSearch=function(e){var i=e&&("down"===e.action||"up"===e.action||"home"===e.action||"end"===e.action||"pageUp"===e.action||"pageDown"===e.action),s=i?this.liCollections[this.activeIndex]:this.getFocusElement();if(t.isNullOrUndefined(s))if(""===this.inputElement.value){this.activeIndex=null,this.list.scrollTop=0;var l=this.list.querySelector("."+I.li);this.setHoverList(l)}else this.activeIndex=null,this.removeSelection(),this.liCollections&&this.liCollections.length<0&&this.removeFocus();else{if(!i){var o=this.getFormattedValue(s.getAttribute("data-value"));this.activeIndex=this.getIndexByValue(o),this.activeIndex=t.isNullOrUndefined(this.activeIndex)?null:this.activeIndex}this.preventAutoFill=""!==this.inputElement.value&&this.preventAutoFill,this.setAutoFill(s,i)}},i.prototype.incrementalSearch=function(e){this.showPopup(),t.isNullOrUndefined(this.listData)||(this.inlineSearch(e),e.preventDefault())},i.prototype.setAutoFillSelection=function(e){var t=this.getSelectionPoints(),i=this.inputElement.value.substr(0,t.start);if(i&&i.toLowerCase()===e.substr(0,t.start).toLowerCase()){var s=i+e.substr(i.length,e.length);o.Input.setValue(s,this.inputElement,this.floatLabelType,this.showClearButton),this.inputElement.setSelectionRange(t.start,this.inputElement.value.length)}else o.Input.setValue(e,this.inputElement,this.floatLabelType,this.showClearButton),this.inputElement.setSelectionRange(0,this.inputElement.value.length)},i.prototype.getValueByText=function(t){return e.prototype.getValueByText.call(this,t,!0,this.ignoreAccent)},i.prototype.unWireEvent=function(){"combobox"===this.getModuleName()&&(t.EventHandler.remove(this.inputWrapper.buttons[0],"mousedown",this.preventBlur),t.EventHandler.remove(this.inputWrapper.container,"blur",this.onBlur)),t.isNullOrUndefined(this.inputWrapper.buttons[0])||t.EventHandler.remove(this.inputWrapper.buttons[0],"mousedown",this.dropDownClick),this.inputElement&&(t.EventHandler.remove(this.inputElement,"focus",this.targetFocus),this.readonly||(t.EventHandler.remove(this.inputElement,"input",this.onInput),t.EventHandler.remove(this.inputElement,"keyup",this.onFilterUp),t.EventHandler.remove(this.inputElement,"keydown",this.onFilterDown),t.EventHandler.remove(this.inputElement,"paste",this.pasteHandler))),this.unBindCommonEvent()},i.prototype.setSelection=function(i,s){e.prototype.setSelection.call(this,i,s),t.isNullOrUndefined(i)||this.autofill||this.isDropDownClick||this.removeFocus()},i.prototype.selectCurrentItem=function(e){var i;this.isPopupOpen&&((i=this.isSelected?this.list.querySelector("."+I.selected):this.list.querySelector("."+I.focus))&&(this.setSelection(i,e),this.isTyped=!1),this.isSelected&&(this.isSelectCustom=!1,this.onChangeEvent(e))),"enter"===e.action&&""===this.inputElement.value.trim()?this.clearAll(e):this.isTyped&&!this.isSelected&&t.isNullOrUndefined(i)&&this.customValue(e),this.hidePopup()},i.prototype.setHoverList=function(e){this.removeSelection(),this.isValidLI(e)&&!e.classList.contains(I.selected)&&(this.removeFocus(),e.classList.add(I.focus))},i.prototype.targetFocus=function(e){t.Browser.isDevice&&!this.allowFiltering&&(this.preventFocus=!1),this.onFocus(e)},i.prototype.dropDownClick=function(i){i.preventDefault(),t.Browser.isDevice&&!this.allowFiltering&&(this.preventFocus=!0),e.prototype.dropDownClick.call(this,i)},i.prototype.customValue=function(e){var i=this,s=this.getValueByText(this.inputElement.value);if(this.allowCustom||""===this.inputElement.value)if(""!==this.inputElement.value.trim()){var l=this.value;if(t.isNullOrUndefined(s)){var r=""===this.inputElement.value?null:this.inputElement.value,n={text:r,item:{}};this.initial?this.updateCustomValueCallback(r,n,l):this.trigger("customValueSpecifier",n,function(t){i.updateCustomValueCallback(r,t,l,e)})}else this.isSelectCustom=!1,this.setProperties({value:s}),l!==this.value&&this.onChangeEvent(e)}else this.allowCustom&&(this.isSelectCustom=!0);else{var a=this.previousValue,h=this.value;this.setProperties({value:s}),t.isNullOrUndefined(this.value)&&o.Input.setValue("",this.inputElement,this.floatLabelType,this.showClearButton),this.autofill&&a===this.value&&h!==this.value&&this.onChangeEvent(null)}},i.prototype.updateCustomValueCallback=function(e,i,s,l){var o=this.fields,r=i.item,n={};r&&t.getValue(o.text,r)&&t.getValue(o.value,r)?n=r:(t.setValue(o.text,e,n),t.setValue(o.value,e,n)),this.itemData=n;var a={text:t.getValue(o.text,this.itemData),value:t.getValue(o.value,this.itemData),index:null};this.setProperties(a,!0),this.setSelection(null,null),this.isSelectCustom=!0,s!==this.value&&this.onChangeEvent(l)},i.prototype.onPropertyChanged=function(i,s){"combobox"===this.getModuleName()&&(this.checkData(i),this.setUpdateInitial(["fields","query","dataSource"],i));for(var l=0,r=Object.keys(i);l<r.length;l++){var n=r[l];switch(n){case"readonly":o.Input.setReadonly(this.readonly,this.inputElement),this.readonly?(t.EventHandler.remove(this.inputElement,"input",this.onInput),t.EventHandler.remove(this.inputElement,"keyup",this.onFilterUp),t.EventHandler.remove(this.inputElement,"keydown",this.onFilterDown)):(t.EventHandler.add(this.inputElement,"input",this.onInput,this),t.EventHandler.add(this.inputElement,"keyup",this.onFilterUp,this),t.EventHandler.add(this.inputElement,"keydown",this.onFilterDown,this));break;case"allowFiltering":this.setSearchBox(),this.isFiltering()&&"combobox"===this.getModuleName()&&t.isNullOrUndefined(this.list)&&e.prototype.renderList.call(this);break;case"allowCustom":break;default:var a=this.getPropObject(n,i,s);e.prototype.onPropertyChanged.call(this,a.newProperty,a.oldProperty),this.isFiltering()&&"dataSource"===n&&t.isNullOrUndefined(this.list)&&this.itemTemplate&&"combobox"===this.getModuleName()&&e.prototype.renderList.call(this)}}},i.prototype.render=function(){e.prototype.render.call(this),this.setSearchBox(),this.isFiltering()&&"combobox"===this.getModuleName()&&t.isNullOrUndefined(this.list)&&e.prototype.renderList.call(this),this.renderComplete()},i.prototype.getModuleName=function(){return"combobox"},i.prototype.addItem=function(t,i){e.prototype.addItem.call(this,t,i)},i.prototype.filter=function(t,i,s){e.prototype.filter.call(this,t,i,s)},i.prototype.showPopup=function(){e.prototype.showPopup.call(this)},i.prototype.hidePopup=function(i){var s=this.inputElement&&""===this.inputElement.value?null:this.inputElement&&this.inputElement.value;if(!t.isNullOrUndefined(this.listData)){var l=this.isEscapeKey;this.isEscapeKey&&(o.Input.setValue(this.typedString,this.inputElement,this.floatLabelType,this.showClearButton),this.isEscapeKey=!1),this.autofill&&this.removeFillSelection();var r=this.isSelectCustom?{text:""}:this.getItemData(),n=this.list.querySelector("."+I.selected);if(this.inputElement&&r.text===this.inputElement.value&&!t.isNullOrUndefined(n))return this.isSelected&&(this.onChangeEvent(i),this.isSelectCustom=!1),void e.prototype.hidePopup.call(this,i);if("combobox"===this.getModuleName()&&""!==this.inputElement.value.trim()){var a=h(this.inputElement.value,this.liCollections,"Equal",!0);this.selectedLI=a.item,t.isNullOrUndefined(a.index)&&(a.index=h(this.inputElement.value,this.liCollections,"StartsWith",!0).index),this.activeIndex=a.index,t.isNullOrUndefined(this.selectedLI)?l&&(this.isSelectCustom=!0,this.removeSelection()):this.updateSelectedItem(this.selectedLI,null,!0)}this.isEscapeKey||!this.isTyped||this.isInteracted||this.customValue(i)}t.isNullOrUndefined(this.listData)&&this.allowCustom&&!t.isNullOrUndefined(s)&&s!==this.value&&this.customValue(),e.prototype.hidePopup.call(this,i)},i.prototype.focusIn=function(){this.enabled&&(t.Browser.isDevice&&!this.allowFiltering&&(this.preventFocus=!0),e.prototype.focusIn.call(this))},i.prototype.clear=function(){this.value=null},i.prototype.focusOut=function(t){e.prototype.focusOut.call(this,t)},i.prototype.getItems=function(){return e.prototype.getItems.call(this)},i.prototype.getDataByValue=function(t){return e.prototype.getDataByValue.call(this,t)},i.prototype.renderHightSearch=function(){},Q([t.Property(!1)],i.prototype,"autofill",void 0),Q([t.Property(!0)],i.prototype,"allowCustom",void 0),Q([t.Property({})],i.prototype,"htmlAttributes",void 0),Q([t.Property(!1)],i.prototype,"allowFiltering",void 0),Q([t.Property(null)],i.prototype,"query",void 0),Q([t.Property(null)],i.prototype,"index",void 0),Q([t.Property(!0)],i.prototype,"showClearButton",void 0),Q([t.Property(!1)],i.prototype,"enableRtl",void 0),Q([t.Event()],i.prototype,"customValueSpecifier",void 0),Q([t.Event()],i.prototype,"filtering",void 0),Q([t.Property(null)],i.prototype,"valueTemplate",void 0),Q([t.Property("Never")],i.prototype,"floatLabelType",void 0),Q([t.Property(null)],i.prototype,"filterBarPlaceholder",void 0),Q([t.Property(null)],i.prototype,"cssClass",void 0),Q([t.Property(null)],i.prototype,"headerTemplate",void 0),Q([t.Property(null)],i.prototype,"footerTemplate",void 0),Q([t.Property(null)],i.prototype,"placeholder",void 0),Q([t.Property("100%")],i.prototype,"width",void 0),Q([t.Property("300px")],i.prototype,"popupHeight",void 0),Q([t.Property("100%")],i.prototype,"popupWidth",void 0),Q([t.Property(!1)],i.prototype,"readonly",void 0),Q([t.Property(null)],i.prototype,"text",void 0),Q([t.Property(null)],i.prototype,"value",void 0),i=Q([t.NotifyPropertyChanges],i)}(N),$=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Y=function(e,t,i,s){var l,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(l=e[n])&&(r=(o<3?l(r):o>3?l(t,i,r):l(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};I.root="e-autocomplete",I.icon="e-input-group-icon e-ddl-icon e-search-icon";var Z=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.isFiltered=!1,s.searchList=!1,s}return $(s,e),s.prototype.preRender=function(){e.prototype.preRender.call(this)},s.prototype.getLocaleName=function(){return"auto-complete"},s.prototype.getNgDirective=function(){return"EJS-AUTOCOMPLETE"},s.prototype.getQuery=function(e){var s=e?e.clone():this.query?this.query.clone():new i.Query,l=""!==this.queryString||t.isNullOrUndefined(this.value)?this.filterType:"equal",o=""!==this.queryString||t.isNullOrUndefined(this.value)?this.queryString:this.value;if(this.isFiltered)return s;if(null!==this.queryString&&""!==this.queryString){var r=this.typeOfData(this.dataSource).typeof;if((this.dataSource instanceof i.DataManager||"string"!==r)&&"number"!==r){var n=t.isNullOrUndefined(this.fields.value)?"":this.fields.value;s.where(n,l,o,this.ignoreCase,this.ignoreAccent)}else s.where("",l,o,this.ignoreCase,this.ignoreAccent)}if(!t.isNullOrUndefined(this.suggestionCount)){if(20!==this.suggestionCount)for(var a=0;a<s.queries.length;a++)"onTake"===s.queries[a].fn&&s.queries.splice(a,1);s.take(this.suggestionCount)}return s},s.prototype.searchLists=function(i){var s=this;if(this.isTyped=!0,this.isDataFetched=this.isSelectCustom=!1,this.isServerBlazor)this.beforePopupOpen=this.isFiltering()&&!this.beforePopupOpen?!this.beforePopupOpen:this.beforePopupOpen,this.queryString=this.filterInput.value,""!==this.queryString&&this.queryString.length>=this.minLength?this.interopAdaptor.invokeMethodAsync("OnServerFilter",this.filterInput.value):this.hidePopup();else{if(t.isNullOrUndefined(this.list)&&e.prototype.renderList.call(this,!0),this.queryString=this.filterInput.value,"mousedown"!==i.type&&(40===i.keyCode||38===i.keyCode))return this.queryString=""===this.queryString?null:this.queryString,this.beforePopupOpen=!0,void this.resetList(this.dataSource,this.fields);this.isSelected=!1,this.activeIndex=null;var l={preventDefaultAction:!1,text:this.filterInput.value,updateData:function(e,t,i){l.cancel||(s.isFiltered=!0,s.filterAction(e,t,i))},cancel:!1};this.trigger("filtering",l,function(e){e.cancel||s.isFiltered||e.preventDefaultAction||(s.searchList=!0,s.filterAction(s.dataSource,null,s.fields))})}},s.prototype.filter=function(e,t,i){this.isFiltered=!0,this.filterAction(e,t,i)},s.prototype.filterAction=function(e,t,i){this.beforePopupOpen=!0,""!==this.queryString&&this.queryString.length>=this.minLength?this.resetList(e,i,t):(this.hidePopup(),this.beforePopupOpen=!1),this.renderReactTemplates()},s.prototype.clearAll=function(i,s){(t.isNullOrUndefined(s)||!t.isNullOrUndefined(s)&&t.isNullOrUndefined(s.dataSource))&&e.prototype.clearAll.call(this,i),this.beforePopupOpen&&this.hidePopup()},s.prototype.onActionComplete=function(i,s,l,o){this.fixedHeaderElement=null,e.prototype.onActionComplete.call(this,i,s,l);var r=this.list.querySelector("."+I.li);t.isNullOrUndefined(r)||t.removeClass([r],I.focus),this.postBackAction()},s.prototype.postBackAction=function(){if(this.autofill&&!t.isNullOrUndefined(this.liCollections[0])&&this.searchList){var i=[this.liCollections[0]],s=h(this.inputElement.value,i,"StartsWith",this.ignoreCase);this.searchList=!1,t.isNullOrUndefined(s.item)||e.prototype.setAutoFill.call(this,this.liCollections[0],!0)}},s.prototype.setSelection=function(i,s){if(this.isValidLI(i))if(!t.isNullOrUndefined(s)&&"keydown"===s.type&&"enter"!==s.action&&"tab"!==s.action&&this.isValidLI(i)){var l=this.getFormattedValue(i.getAttribute("data-value"));this.activeIndex=this.getIndexByValue(l),this.isServerBlazor&&this.removeHover(),this.setHoverList(i),this.selectedLI=i,this.setScrollPosition(s),this.autofill&&this.isPopupOpen&&(this.preventAutoFill=!1,e.prototype.setAutoFill.call(this,i)),t.attributes(this.inputElement,{"aria-activedescendant":this.selectedLI?this.selectedLI.id:null})}else e.prototype.setSelection.call(this,i,s)},s.prototype.listOption=function(i,s){var l=this,o=e.prototype.listOption.call(this,i,s);if(t.isNullOrUndefined(o.itemCreated))o.itemCreated=function(e){l.highlight&&(l.element.tagName===l.getNgDirective()&&l.itemTemplate?setTimeout(function(){p(e.item,l.queryString,l.ignoreCase,l.filterType)},0):p(e.item,l.queryString,l.ignoreCase,l.filterType))};else{var r=o.itemCreated;o.itemCreated=function(e){l.highlight&&p(e.item,l.queryString,l.ignoreCase,l.filterType),r.apply(l,[e])}}return o},s.prototype.isFiltering=function(){return!0},s.prototype.renderPopup=function(){this.list.scrollTop=0,e.prototype.renderPopup.call(this)},s.prototype.isEditTextBox=function(){return""!==this.inputElement.value.trim()},s.prototype.isPopupButton=function(){return this.showPopupButton},s.prototype.isSelectFocusItem=function(e){return!1},s.prototype.showPopup=function(){if(this.enabled){if(this.beforePopupOpen&&!this.isServerBlazor)return void this.refreshPopup();this.beforePopupOpen=!0,this.preventAutoFill=!0,t.isNullOrUndefined(this.list)||this.isServerBlazor?this.renderList():this.resetList(this.dataSource,this.fields)}},s.prototype.hidePopup=function(){this.DropDownBaseresetBlazorTemplates(!0,!1,!1,!1),e.prototype.hidePopup.call(this),this.activeIndex=-1},s.prototype.onPropertyChanged=function(i,s){"autocomplete"===this.getModuleName()&&this.setUpdateInitial(["fields","query","dataSource"],i);for(var l=0,r=Object.keys(i);l<r.length;l++){var n=r[l];switch(n){case"showPopupButton":if(this.showPopupButton){if(this.isServerBlazor){if(this.inputWrapper&&this.inputWrapper.container){a=this.inputWrapper.container.querySelector(".e-input-group-icon.e-ddl-icon");this.inputWrapper.buttons[0]=a}}else{var a=o.Input.appendSpan(I.icon,this.inputWrapper.container,this.createElement);this.inputWrapper.buttons[0]=a}this.inputWrapper&&this.inputWrapper.buttons&&this.inputWrapper.buttons[0]&&t.EventHandler.add(this.inputWrapper.buttons[0],"click",this.dropDownClick,this)}else this.isServerBlazor||(t.detach(this.inputWrapper.buttons[0]),this.inputWrapper.buttons[0]=null);break;default:var h=this.getPropObject(n,i,s);e.prototype.onPropertyChanged.call(this,h.newProperty,h.oldProperty)}}},s.prototype.renderHightSearch=function(){if(this.highlight)for(var e=0;e<this.liCollections.length;e++)this.ulElement.querySelector(".e-active")||(c(this.liCollections[e]),p(this.liCollections[e],this.queryString,this.ignoreCase,this.filterType,this.isServerBlazor))},s.prototype.getModuleName=function(){return"autocomplete"},s.prototype.render=function(){e.prototype.render.call(this)},Y([t.Complex({value:null,iconCss:null,groupBy:null},A)],s.prototype,"fields",void 0),Y([t.Property(!0)],s.prototype,"ignoreCase",void 0),Y([t.Property(!1)],s.prototype,"showPopupButton",void 0),Y([t.Property(!1)],s.prototype,"highlight",void 0),Y([t.Property(20)],s.prototype,"suggestionCount",void 0),Y([t.Property({})],s.prototype,"htmlAttributes",void 0),Y([t.Property(null)],s.prototype,"query",void 0),Y([t.Property(1)],s.prototype,"minLength",void 0),Y([t.Property("Contains")],s.prototype,"filterType",void 0),Y([t.Event()],s.prototype,"filtering",void 0),Y([t.Property(null)],s.prototype,"index",void 0),Y([t.Property("Never")],s.prototype,"floatLabelType",void 0),Y([t.Property(null)],s.prototype,"valueTemplate",void 0),Y([t.Property(null)],s.prototype,"filterBarPlaceholder",void 0),Y([t.Property(!1)],s.prototype,"allowFiltering",void 0),Y([t.Property(null)],s.prototype,"text",void 0),s=Y([t.NotifyPropertyChanges],s)}(X),ee="e-float-line",te="e-float-text",ie="e-label-top",se="e-label-bottom",le=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),oe=function(e,t,i,s){var l,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(l=e[n])&&(r=(o<3?l(r):o>3?l(t,i,r):l(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},re="e-input-focus",ne="e-hide-listitem",ae="e-chips",he=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.clearIconWidth=0,s.isValidKey=!1,s.selectAllEventData=[],s.selectAllEventEle=[],s.isDynamicDataChange=!1,s.scrollFocusStatus=!1,s.keyDownStatus=!1,s}return le(s,e),s.prototype.enableRTL=function(e){e?this.overAllWrapper.classList.add("e-rtl"):this.overAllWrapper.classList.remove("e-rtl"),this.popupObj&&(this.popupObj.enableRtl=e,this.popupObj.dataBind())},s.prototype.requiredModules=function(){var e=[];if("CheckBox"===this.mode){if(this.isGroupChecking=this.enableGroupCheckBox,this.enableGroupCheckBox){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.enableSelectionOrder=!1,this.isProtectedOnChange=t}this.allowCustomValue=!1,this.hideSelectedItem=!1,this.closePopupOnSelect=!1,e.push({member:"CheckBoxSelection",args:[this]})}return e},s.prototype.updateHTMLAttribute=function(){if(Object.keys(this.htmlAttributes).length)for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];switch(s){case"class":var l=this.htmlAttributes[s].replace(/\s+/g," ").trim();""!==l&&(t.addClass([this.overAllWrapper],l.split(" ")),t.addClass([this.popupWrapper],l.split(" ")));break;case"disabled":this.enable(!1);break;case"placeholder":this.placeholder||(this.inputElement.setAttribute(s,this.htmlAttributes[s]),this.setProperties({placeholder:this.inputElement.placeholder},!0),this.refreshPlaceHolder());break;default:var o=["name","required","aria-required","form"],r=["title","role","style","class"];["id"].indexOf(s)>-1?this.element.setAttribute(s,this.htmlAttributes[s]):0===s.indexOf("data")||o.indexOf(s)>-1?this.hiddenElement.setAttribute(s,this.htmlAttributes[s]):r.indexOf(s)>-1?this.overAllWrapper.setAttribute(s,this.htmlAttributes[s]):this.inputElement.setAttribute(s,this.htmlAttributes[s])}}},s.prototype.updateReadonly=function(e){e||"CheckBox"===this.mode?this.inputElement.setAttribute("readonly","true"):this.inputElement.removeAttribute("readonly")},s.prototype.updateClearButton=function(e){e?(this.overAllClear.parentNode?this.overAllClear.style.display="":this.componentWrapper.appendChild(this.overAllClear),this.componentWrapper.classList.remove("e-close-icon-hide")):(this.overAllClear.style.display="none",this.componentWrapper.classList.add("e-close-icon-hide"))},s.prototype.updateCssClass=function(){if(!t.isNullOrUndefined(this.cssClass)&&""!==this.cssClass){var e=this.cssClass;""!==(e=this.cssClass.replace(/\s+/g," ").trim())&&(t.addClass([this.overAllWrapper],e.split(" ")),t.addClass([this.popupWrapper],e.split(" ")))}},s.prototype.updateOldPropCssClass=function(e){t.isNullOrUndefined(e)||""===e||""!==(e=e.replace(/\s+/g," ").trim())&&(t.removeClass([this.overAllWrapper],e.split(" ")),t.removeClass([this.popupWrapper],e.split(" ")))},s.prototype.onPopupShown=function(){var e=this;if(t.Browser.isDevice&&"CheckBox"===this.mode&&this.allowFiltering){var i=this;window.onpopstate=function(){i.hidePopup(),i.inputElement.focus()},history.pushState({},"")}var s={name:"FadeIn",duration:100},l={popup:this.popupObj,cancel:!1,animation:s};this.trigger("open",l,function(i){i.cancel||(e.focusAtFirstListItem(),document.body.appendChild(e.popupObj.element),"CheckBox"===e.mode&&e.enableGroupCheckBox&&!t.isNullOrUndefined(e.fields.groupBy)&&e.updateListItems(e.list.querySelectorAll("li.e-list-item"),e.mainList.querySelectorAll("li.e-list-item")),("CheckBox"===e.mode||e.showDropDownIcon)&&t.addClass([e.overAllWrapper],["e-icon-anim"]),e.refreshPopup(),e.renderReactTemplates(),e.popupObj.show(i.animation,1e3===e.zIndex?e.element:null),t.attributes(e.inputElement,{"aria-expanded":"true"}),e.isFirstClick&&e.loadTemplate())})},s.prototype.updateListItems=function(e,t){for(var i=0;i<e.length;i++)this.findGroupStart(e[i]),this.findGroupStart(t[i]);this.deselectHeader()},s.prototype.loadTemplate=function(){var e=this;"CheckBox"===this.mode&&this.itemTemplate&&t.isBlazor()&&this.isServerRendered&&this.mainData&&this.mainData.length>0?setTimeout(function(){e.refreshListItems(null),"CheckBox"===e.mode&&e.removeFocus(),e.notify("reOrder",{module:"CheckBoxSelection",enable:"CheckBox"===e.mode,e:e})},this.mainData.length<100?100:this.mainData.length):(this.refreshListItems(null),"CheckBox"===this.mode&&this.removeFocus(),this.notify("reOrder",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,e:this}))},s.prototype.setScrollPosition=function(){if((!this.hideSelectedItem&&"CheckBox"!==this.mode||"CheckBox"===this.mode&&!this.enableSelectionOrder)&&!t.isNullOrUndefined(this.value)&&this.value.length>0){var e=this.findListElement(this.hideSelectedItem?this.ulElement:this.list,"li","data-value",this.value[this.value.length-1]);t.isNullOrUndefined(e)||this.scrollBottom(e)}},s.prototype.focusAtFirstListItem=function(){if(this.ulElement&&this.ulElement.querySelector("li."+k.li)){var e=void 0;if("CheckBox"===this.mode)return void this.removeFocus();null!==(e=this.ulElement.querySelector("li."+k.li+":not(."+ne+")"))&&(this.removeFocus(),this.addListFocus(e))}},s.prototype.focusAtLastListItem=function(e){var t;e?t=h(e,this.liCollections,"StartsWith",this.ignoreCase):this.value&&this.value.length?h(this.value[this.value.length-1],this.liCollections,"StartsWith",this.ignoreCase):t=null,t&&null!==t.item&&(this.addListFocus(t.item),this.scrollBottom(t.item,t.index))},s.prototype.getAriaAttributes=function(){return{"aria-disabled":"false","aria-owns":this.element.id+"_options",role:"listbox","aria-multiselectable":"true","aria-activedescendant":"null","aria-haspopup":"true","aria-expanded":"false"}},s.prototype.updateListARIA=function(){t.attributes(this.ulElement,{id:this.element.id+"_options",role:"listbox","aria-hidden":"false"});var e=!!this.inputElement.disabled;t.attributes(this.inputElement,this.getAriaAttributes()),e&&t.attributes(this.inputElement,{"aria-disabled":"true"}),this.ensureAriaDisabled(e?"true":"false")},s.prototype.ensureAriaDisabled=function(e){if(this.htmlAttributes&&this.htmlAttributes["aria-disabled"]){var i=this.htmlAttributes;t.extend(i,{"aria-disabled":e},i),this.setProperties({htmlAttributes:i},!0)}},s.prototype.removelastSelection=function(e){var i=this.chipCollectionWrapper.querySelectorAll("span.e-chips"),s=i[i.length-1].getAttribute("data-value");t.isNullOrUndefined(this.value)||(this.tempValues=this.value.slice());var l=this.getFormattedValue(s);this.allowCustomValue&&("false"!==s&&!1===l||!t.isNullOrUndefined(l)&&"NaN"===l.toString())&&(l=s),this.removeValue(l,e),this.removeChipSelection(),this.updateDelimeter(this.delimiterChar,e),this.makeTextBoxEmpty(),this.mainList&&this.listData&&this.refreshSelection(),this.checkPlaceholderSize()},s.prototype.onActionFailure=function(t){e.prototype.onActionFailure.call(this,t),this.renderPopup(),this.onPopupShown()},s.prototype.targetElement=function(){return this.targetInputElement=this.inputElement,"CheckBox"===this.mode&&this.allowFiltering&&this.notify("targetElement",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),this.targetInputElement.value},s.prototype.getForQuery=function(e){for(var s,l=t.isNullOrUndefined(this.fields.value)?this.fields.text:this.fields.value,o=0;o<e.length;o++)s=0===o?new i.Predicate(l,"equal",e[o]):s.or(l,"equal",e[o]);return this.getQuery(this.query).where(s)},s.prototype.onActionComplete=function(s,l,o,r){e.prototype.onActionComplete.call(this,s,l,o),this.updateSelectElementData(this.allowFiltering);var n=this;if(t.isBlazor()&&this.isServerRendered&&this.isDynamicDataChange&&null!==this.value&&this.value.length>0){for(var a=[],h=0;h<this.value.length;h++){var p=this.getDataByValue(this.value[h]);p&&a.push(p[this.fields.value])}0===a.length&&this.setProperties({value:null})}if(!t.isNullOrUndefined(this.value)&&!this.allowCustomValue)for(var u=0;u<this.value.length;u++)this.findListElement(this.allowFiltering&&!t.isNullOrUndefined(this.mainList)?this.mainList:s,"li","data-value",n.value[u])||(this.value.splice(u,1),u-=1);this.updateActionList(s,l,o),t.isBlazor()&&this.isServerRendered&&this.allowFiltering&&"CheckBox"===this.mode&&this.removeFocus(),t.isBlazor()&&this.isServerRendered&&this.isDynamicDataChange&&this.value&&this.value.length>0&&(this.updateVal(this.value,null,"value"),this.addValidInputClass(),this.isDynamicDataChange=!1),!(this.dataSource instanceof i.DataManager&&"CheckBox"===this.mode&&this.allowFiltering)||t.isBlazor()&&this.isServerRendered||this.removeFocus()},s.prototype.updateActionList=function(e,s,l,o){if("CheckBox"===this.mode&&this.showSelectAll&&this.notify("selectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),this.mainList||this.mainData?t.isNullOrUndefined(this.mainData)||0!==this.mainData.length||(this.mainData=s):(this.mainList=e.cloneNode?e.cloneNode(!0):e,this.mainData=s,this.mainListCollection=this.liCollections),(this.remoteCustomValue||s.length<=0)&&this.allowCustomValue&&this.inputFocus&&this.allowFiltering&&this.inputElement.value&&""!==this.inputElement.value)return void this.checkForCustomValue(this.tempQuery,this.fields);this.value&&this.value.length&&("CheckBox"!==this.mode&&""!==this.inputElement.value.trim()||"CheckBox"===this.mode||(8===this.keyCode||46===this.keyCode)&&this.allowFiltering&&this.allowCustomValue&&this.dataSource instanceof i.DataManager&&""===this.inputElement.value)&&this.refreshSelection(),this.updateListARIA(),this.unwireListEvents(),this.wireListEvents(),t.isNullOrUndefined(this.setInitialValue)||this.setInitialValue(),t.isNullOrUndefined(this.selectAllAction)||this.selectAllAction(),this.setDynValue&&(t.isNullOrUndefined(this.text)||!t.isNullOrUndefined(this.value)&&0!==this.value.length||this.initialTextUpdate(),this.initialValueUpdate(),this.initialUpdate(),this.refreshPlaceHolder(),"CheckBox"!==this.mode&&this.changeOnBlur&&this.updateValueState(null,this.value,null)),this.renderPopup(),this.beforePopupOpen&&(this.beforePopupOpen=!1,this.onPopupShown())},s.prototype.refreshSelection=function(){var e,i,s=this.hideSelectedItem?ne:k.selected;if(!t.isNullOrUndefined(this.value))for(var l=0;!t.isNullOrUndefined(this.value[l]);l++)if(e=this.value[l],i=this.findListElement(this.list,"li","data-value",e)){if(t.addClass([i],s),this.hideSelectedItem&&i.previousSibling&&i.previousElementSibling.classList.contains(k.group)&&(!i.nextElementSibling||i.nextElementSibling.classList.contains(k.group))&&t.addClass([i.previousElementSibling],s),this.hideSelectedItem&&this.fields.groupBy&&!i.previousElementSibling.classList.contains(ne)&&this.hideGroupItem(e),this.hideSelectedItem&&i.classList.contains(k.focus)){t.removeClass([i],k.focus);var o=i.parentElement.querySelectorAll("."+k.li+":not(."+ne+")");o.length>0?t.addClass([o[0]],k.focus):(this.ulElement=this.ulElement.cloneNode?this.ulElement.cloneNode(!0):this.ulElement,this.l10nUpdate(),t.addClass([this.list],k.noData))}if(i.setAttribute("aria-selected","true"),"CheckBox"===this.mode&&i.classList.contains("e-active")){var r=i.firstElementChild.getAttribute("aria-checked");if(t.isNullOrUndefined(r)||"false"===r){var n={module:"CheckBoxSelection",enable:"CheckBox"===this.mode,li:i,e:null};this.notify("updatelist",n)}}}this.checkSelectAll(),this.checkMaxSelection()},s.prototype.hideGroupItem=function(e){var i,s,l=this.hideSelectedItem?ne:k.selected;s=i=this.findListElement(this.ulElement,"li","data-value",e);var o=0,r=0,n=!0,a=!0;do{i&&i.previousElementSibling&&!i.previousElementSibling.classList.contains(ne)&&i.previousElementSibling.classList.contains(k.li)&&(n=!1),!n||!i||i.previousElementSibling&&i.previousElementSibling.classList.contains(k.group)?o=10:i=i.previousElementSibling,s&&s.nextElementSibling&&!s.nextElementSibling.classList.contains(ne)&&s.nextElementSibling.classList.contains(k.li)&&(a=!1),!a||!s||s.nextElementSibling&&s.nextElementSibling.classList.contains(k.group)?r=10:s=s.nextElementSibling}while(o<10||r<10);n&&a&&!i.previousElementSibling.classList.contains(ne)?t.addClass([i.previousElementSibling],l):n&&a&&i.previousElementSibling.classList.contains(ne)&&t.removeClass([i.previousElementSibling],l)},s.prototype.getValidLi=function(){var e=this.ulElement.querySelector("li."+k.li+":not(."+ne+")");return t.isNullOrUndefined(e)?this.liCollections[0]:e},s.prototype.checkSelectAll=function(){var e=this.list.querySelectorAll("li.e-list-group-item.e-active").length,i=this.list.querySelectorAll("li.e-list-item"),s=this.list.querySelectorAll("li."+k.li).length,l=this.list.querySelectorAll("li."+k.selected).length;if(this.enableGroupCheckBox&&!t.isNullOrUndefined(this.fields.groupBy)&&(l-=e),s!==l&&l!==this.maximumSelectionLength||"CheckBox"!==this.mode||!this.showSelectAll?s!==l&&"CheckBox"===this.mode&&this.showSelectAll&&this.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"uncheck"}):this.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"check"}),this.enableGroupCheckBox&&this.fields.groupBy&&!this.enableSelectionOrder){for(var o=0;o<i.length;o++)this.findGroupStart(i[o]);this.deselectHeader()}},s.prototype.openClick=function(e){this.openOnClick||"CheckBox"===this.mode?this.openOnClick||"CheckBox"!==this.mode||this.isPopupOpen()||this.showPopup():""!==this.targetElement()?this.showPopup():this.hidePopup()},s.prototype.keyUp=function(e){if("CheckBox"===this.mode&&!this.openOnClick){var i=String.fromCharCode(e.keyCode).match(/\w/);t.isNullOrUndefined(i)||(this.isValidKey=!0)}this.isValidKey=this.isPopupOpen()&&8===e.keyCode||this.isValidKey,this.isValidKey=(!e.ctrlKey||86!==e.keyCode)&&this.isValidKey,this.isValidKey&&(this.isValidKey=!1,this.expandTextbox(),this.showOverAllClear(),e.keyCode,this.search(e))},s.prototype.filter=function(e,t,i){this.isFiltered=!0,this.remoteFilterAction=!0,this.dataUpdater(e,t,i)},s.prototype.getQuery=function(e){var s=e?e.clone():this.query?this.query.clone():new i.Query;if(this.filterAction){if(null!==this.targetElement()){var l=this.typeOfData(this.dataSource).typeof;if((this.dataSource instanceof i.DataManager||"string"!==l)&&"number"!==l){var o=this.fields;s.where(t.isNullOrUndefined(o.text)?"":o.text,this.filterType,this.targetElement(),this.ignoreCase,this.ignoreAccent)}else s.where("",this.filterType,this.targetElement(),this.ignoreCase,this.ignoreAccent)}return s}return e||(this.query?this.query:new i.Query)},s.prototype.dataUpdater=function(e,t,s){if(this.isDataFetched=!1,""===this.targetElement().trim()){var l=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;this.backCommand&&(this.remoteCustomValue=!1,this.onActionComplete(l,this.mainData),this.value&&this.value.length&&this.refreshSelection(),8!==this.keyCode&&this.focusAtFirstListItem(),this.notify("reOrder",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,e:this}))}else this.resetList(e,s,t),this.allowCustomValue&&(e instanceof i.DataManager?(this.remoteCustomValue=!0,this.tempQuery=t):this.checkForCustomValue(t,s));this.refreshPopup(),"CheckBox"===this.mode&&this.removeFocus()},s.prototype.checkForCustomValue=function(e,i){var s=!this.getValueByText(this.inputElement.value,this.ignoreCase);if(this.allowCustomValue&&s){var l=this.inputElement.value,o=i||this.fields,r=!t.isNullOrUndefined(this.mainData)&&this.mainData.length>0?this.mainData[0]:this.mainData;if("string"!=typeof r&&"number"!=typeof r&&"boolean"!=typeof r){var n={};t.setValue(o.text,l,n),"number"==typeof t.getValue(this.fields.value?this.fields.value:"value",r)?t.setValue(o.value,Math.random(),n):t.setValue(o.value,l,n),(a=JSON.parse(JSON.stringify(this.listData))).splice(0,0,n),this.resetList(a,o,e)}else{var a=[this.inputElement.value];a[0]="number"!=typeof r||isNaN(parseFloat(a[0]))?a[0]:parseFloat(a[0]),a[0]="boolean"==typeof r?"true"===a[0]||"false"!==a[0]&&a[0]:a[0],this.resetList(a,o)}}this.value&&this.value.length&&this.refreshSelection()},s.prototype.getNgDirective=function(){return"EJS-MULTISELECT"},s.prototype.wrapperClick=function(e){if(this.setDynValue=!1,this.enabled){if(e.target===this.overAllClear)return void e.preventDefault();if(this.inputFocus||this.inputElement.focus(),!this.readonly){if(e.target&&-1!==e.target.classList.toString().indexOf("e-chips-close"))return void(this.isPopupOpen()&&this.refreshPopup());!this.isPopupOpen()&&(this.openOnClick||this.showDropDownIcon&&e.target&&"e-input-group-icon e-ddl-icon"===e.target.className)?this.showPopup():(this.hidePopup(),"CheckBox"===this.mode&&(this.showOverAllClear(),this.inputFocus=!0,this.overAllWrapper.classList.contains(re)||this.overAllWrapper.classList.add(re)))}this.targetElement()&&""!==this.targetElement()||e.preventDefault()}},s.prototype.enable=function(e){e?(this.overAllWrapper.classList.remove("e-disabled"),this.inputElement.removeAttribute("disabled"),t.attributes(this.inputElement,{"aria-disabled":"false"}),this.ensureAriaDisabled("false")):(this.overAllWrapper.classList.add("e-disabled"),this.inputElement.setAttribute("disabled","true"),t.attributes(this.inputElement,{"aria-disabled":"true"}),this.ensureAriaDisabled("true")),this.enabled!==e&&(this.enabled=e),this.hidePopup()},s.prototype.onBlur=function(e,i){var s;return t.isNullOrUndefined(e)||(s=e.relatedTarget),this.popupObj&&document.body.contains(this.popupObj.element)&&this.popupObj.element.contains(s)?void("CheckBox"!==this.mode?this.inputElement.focus():"Auto"===this.floatLabelType&&(this.overAllWrapper.classList.contains("e-outline")||this.overAllWrapper.classList.contains("e-filled"))&&t.addClass([this.overAllWrapper],"e-valid-input")):("Auto"===this.floatLabelType&&this.overAllWrapper.classList.contains("e-outline")&&"CheckBox"===this.mode&&(t.isNullOrUndefined(this.value)||0===this.value.length)&&t.removeClass([this.overAllWrapper],"e-valid-input"),"CheckBox"!==this.mode||!t.Browser.isIE||t.isNullOrUndefined(e)||i?this.scrollFocusStatus?(t.isNullOrUndefined(e)||e.preventDefault(),this.inputElement.focus(),void(this.scrollFocusStatus=!1)):(this.inputFocus=!1,this.overAllWrapper.classList.remove(re),this.refreshListItems(null),"Box"!==this.mode&&"CheckBox"!==this.mode&&this.updateDelimView(),this.changeOnBlur&&(this.updateValueState(e,this.value,this.tempValues),this.dispatchEvent(this.hiddenElement,"change")),this.overAllClear.style.display="none",this.isPopupOpen()&&(this.DropDownBaseresetBlazorTemplates(!1,!1,!0,!0,!1,!0,!0),this.hidePopup()),this.makeTextBoxEmpty(),this.trigger("blur"),this.focused=!0,t.Browser.isDevice&&"Delimiter"!==this.mode&&"CheckBox"!==this.mode&&this.removeChipFocus(),this.removeChipSelection(),this.refreshInputHight(),g(this.overAllWrapper,this.componentWrapper,this.value,this.floatLabelType,this.placeholder),this.refreshPlaceHolder(),(this.allowFiltering||!0===this.enableSelectionOrder&&"CheckBox"===this.mode)&&!t.isNullOrUndefined(this.mainList)&&(this.ulElement=this.mainList),void this.checkPlaceholderSize()):(this.inputFocus=!1,void this.overAllWrapper.classList.remove(re)))},s.prototype.checkPlaceholderSize=function(){if(this.showDropDownIcon){var e=this.dropIcon.offsetWidth+parseInt(window.getComputedStyle(this.dropIcon).marginRight,10);this.setPlaceholderSize(e)}else t.isNullOrUndefined(this.dropIcon)||this.setPlaceholderSize(this.showDropDownIcon?this.dropIcon.offsetWidth:0)},s.prototype.setPlaceholderSize=function(e){t.isNullOrUndefined(this.value)||0===this.value.length?0!==this.dropIcon.offsetWidth?this.searchWrapper.style.width="calc(100% - "+(e+10)+"px":t.addClass([this.searchWrapper],"e-search-custom-width"):t.isNullOrUndefined(this.value)||(this.searchWrapper.removeAttribute("style"),t.removeClass([this.searchWrapper],"e-search-custom-width"))},s.prototype.refreshInputHight=function(){this.value&&this.value.length||!t.isNullOrUndefined(this.text)&&""!==this.text?this.searchWrapper.classList.add("e-zero-size"):this.searchWrapper.classList.remove("e-zero-size")},s.prototype.validateValues=function(e,t){return JSON.stringify(e.slice().sort())!==JSON.stringify(t.slice().sort())},s.prototype.updateValueState=function(e,t,i){var s=t||[],l=i||[];if(this.initStatus&&this.validateValues(s,l)){var o={e:e,oldValue:i,value:t,isInteracted:!!e,element:this.element};this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",o),this.updateTempValue(),this.changeOnBlur||this.dispatchEvent(this.hiddenElement,"change")}},s.prototype.updateTempValue=function(){this.value?this.tempValues=this.value.slice():this.tempValues=this.value},s.prototype.getPagingCount=function(){var e=this.list.classList.contains(k.noData)?null:getComputedStyle(this.getItems()[0],null).getPropertyValue("height");return Math.round(this.list.offsetHeight/parseInt(e,10))},s.prototype.pageUpSelection=function(e){var t=this.list.querySelectorAll("li."+k.li+":not(."+ne+"):not(.e-reorder-hide)"),i=e>=0?t[e+1]:t[0];this.addListFocus(i),this.scrollBottom(i,this.getIndexByValue(i.getAttribute("data-value")))},s.prototype.pageDownSelection=function(e){this.getItems();var t=this.list.querySelectorAll("li."+k.li+":not(."+ne+"):not(.e-reorder-hide)"),i=e<=t.length?t[e-1]:t[t.length-1];this.addListFocus(i),this.scrollBottom(i,this.getIndexByValue(i.getAttribute("data-value")))},s.prototype.getItems=function(){return this.list||e.prototype.render.call(this),this.ulElement&&this.ulElement.querySelectorAll("."+k.li).length>0?this.ulElement.querySelectorAll("."+k.li+":not(."+ne+")"):[]},s.prototype.focusInHandler=function(e){if(this.enabled){if(this.showOverAllClear(),this.inputFocus=!0,this.value&&this.value.length&&("Delimiter"!==this.mode&&"CheckBox"!==this.mode?this.chipCollectionWrapper.style.display="":this.showDelimWrapper(),"CheckBox"!==this.mode&&(this.viewWrapper.style.display="none")),"CheckBox"!==this.mode&&this.searchWrapper.classList.remove("e-zero-size"),this.checkPlaceholderSize(),this.focused){var t={isInteracted:!!e,event:e};this.trigger("focus",t),this.focused=!1}return this.overAllWrapper.classList.contains(re)||this.overAllWrapper.classList.add(re),y(this.overAllWrapper,this.componentWrapper),this.isPopupOpen()&&this.refreshPopup(),!0}return!1},s.prototype.showDelimWrapper=function(){"CheckBox"===this.mode?this.viewWrapper.style.display="":this.delimiterWrapper.style.display="",this.componentWrapper.classList.add("e-delimiter")},s.prototype.hideDelimWrapper=function(){this.delimiterWrapper.style.display="none",this.componentWrapper.classList.remove("e-delimiter")},s.prototype.expandTextbox=function(){var e=5;this.placeholder&&(e=e>this.inputElement.placeholder.length?e:this.inputElement.placeholder.length),this.inputElement.value.length>e?this.inputElement.size=this.inputElement.value.length:this.inputElement.size=e},s.prototype.isPopupOpen=function(){return null!==this.popupWrapper&&null!==this.popupWrapper.parentElement},s.prototype.refreshPopup=function(){this.popupObj&&this.mobFilter&&(this.popupObj.setProperties({width:this.calcPopupWidth()}),this.popupObj.refreshPosition(this.overAllWrapper),this.popupObj.resolveCollision())},s.prototype.checkTextLength=function(){return this.targetElement().length<1},s.prototype.popupKeyActions=function(e){switch(e.keyCode){case 38:this.hidePopup(),"CheckBox"===this.mode&&this.inputElement.focus(),e.preventDefault();break;case 40:this.isPopupOpen()||(this.showPopup(),e.preventDefault())}},s.prototype.updateAriaAttribute=function(){var e=this.list.querySelector("."+k.focus);t.isNullOrUndefined(e)||this.inputElement.setAttribute("aria-activedescendant",e.id)},s.prototype.homeNavigation=function(e){this.removeFocus();var t=this.ulElement.querySelectorAll("li."+k.li+":not(."+ne+"):not(.e-reorder-hide)");if(t.length>0){var i=t[e?0:t.length-1];i.classList.add(k.focus),this.scrollBottom(i)}},s.prototype.onKeyDown=function(e){if(!this.readonly&&(this.enabled||"CheckBox"===this.mode)&&(this.keyCode=e.keyCode,this.keyDownStatus=!0,!(e.keyCode>111&&e.keyCode<124))){if(e.altKey)return void this.popupKeyActions(e);if(this.isPopupOpen()){var t=this.list.querySelector("."+k.focus);switch(e.keyCode){case 36:case 35:this.homeNavigation(36===e.keyCode);break;case 33:return e.preventDefault(),void(t&&(this.getIndexByValue(t.getAttribute("data-value")),this.pageUpSelection(void 0-this.getPagingCount()),this.updateAriaAttribute()));case 34:return e.preventDefault(),void(t&&(this.getIndexByValue(t.getAttribute("data-value")),this.pageDownSelection(void 0+this.getPagingCount()),this.updateAriaAttribute()));case 38:this.arrowUp(e);break;case 40:this.arrowDown(e);break;case 27:return e.preventDefault(),this.hidePopup(),void("CheckBox"===this.mode&&this.inputElement.focus());case 13:return e.preventDefault(),"CheckBox"!==this.mode&&this.selectByKey(e),void this.checkPlaceholderSize();case 32:return void this.spaceKeySelection(e);case 9:e.preventDefault(),this.hidePopup(),this.inputElement.focus(),this.overAllWrapper.classList.add(re)}}else switch(e.keyCode){case 13:case 9:case 16:case 17:case 20:return;case 40:this.openOnClick&&this.showPopup();break;case 27:return e.preventDefault(),void this.escapeAction()}this.checkTextLength()&&this.keyNavigation(e),"CheckBox"===this.mode&&this.enableSelectionOrder&&this.checkBackCommand(e),this.expandTextbox(),this.refreshPopup()}},s.prototype.arrowDown=function(e){e.preventDefault(),this.moveByList(1),this.keyAction=!0,(document.activeElement.classList.contains("e-input-filter")||"CheckBox"===this.mode&&!this.allowFiltering&&document.activeElement!==this.list)&&(this.list.focus(),t.EventHandler.add(this.list,"keydown",this.onKeyDown,this)),this.updateAriaAttribute()},s.prototype.arrowUp=function(e){e.preventDefault(),this.keyAction=!0;var i=this.list.querySelectorAll("li."+k.li+":not(."+ne+"):not(.e-reorder-hide)");this.enableGroupCheckBox&&"CheckBox"===this.mode&&!t.isNullOrUndefined(this.fields.groupBy)&&(i=this.list.querySelectorAll("li."+k.li+",li."+k.group+":not(."+ne+"):not(.e-reorder-hide)"));var s=this.list.querySelector("li."+k.focus);Array.prototype.slice.call(i).indexOf(s)<=0&&"CheckBox"===this.mode&&this.allowFiltering&&(this.keyAction=!1,this.notify("inputFocus",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"focus"})),this.moveByList(-1),this.updateAriaAttribute()},s.prototype.spaceKeySelection=function(e){"CheckBox"===this.mode&&(document.activeElement.classList.contains("e-input-filter")||(e.preventDefault(),this.keyAction=!0,this.list.focus()),this.selectByKey(e)),this.checkPlaceholderSize()},s.prototype.checkBackCommand=function(e){8===e.keyCode&&""===this.targetElement()?this.backCommand=!1:this.backCommand=!0},s.prototype.keyNavigation=function(e){if("Delimiter"!==this.mode&&"CheckBox"!==this.mode&&this.value&&this.value.length)switch(e.keyCode){case 37:e.preventDefault(),this.moveBy(-1,e);break;case 39:e.preventDefault(),this.moveBy(1,e);break;case 8:this.removelastSelection(e);break;case 46:this.removeSelectedChip(e)}else if(8===e.keyCode&&"Delimiter"===this.mode&&this.value&&this.value.length){e.preventDefault();var t=this.value[this.value.length-1];this.removeValue(t,e),this.updateDelimeter(this.delimiterChar,e),this.focusAtLastListItem(t)}},s.prototype.selectByKey=function(e){this.removeChipSelection(),this.selectListByKey(e),this.hideSelectedItem&&this.focusAtFirstListItem()},s.prototype.escapeAction=function(){var e=this.tempValues?this.tempValues.slice():[];this.value&&this.validateValues(this.value,e)&&("CheckBox"!==this.mode&&(this.value=e,this.initialValueUpdate()),"Delimiter"!==this.mode&&"CheckBox"!==this.mode?this.chipCollectionWrapper.style.display="":this.showDelimWrapper(),this.refreshPlaceHolder(),this.value.length?this.showOverAllClear():this.hideOverAllClear()),this.makeTextBoxEmpty()},s.prototype.scrollBottom=function(e,i){var s=this.list.offsetHeight,l=e.offsetTop+e.offsetHeight-this.list.scrollTop,o=this.list.scrollTop+l-s,r=e.offsetTop+e.offsetHeight-this.list.scrollTop;r=this.fields.groupBy&&!t.isNullOrUndefined(this.fixedHeaderElement)?r-this.fixedHeaderElement.offsetHeight:r,0===i?this.list.scrollTop=0:l>s?this.list.scrollTop=o:r>0&&this.list.offsetHeight>r||(this.list.scrollTop=o)},s.prototype.scrollTop=function(e,i){var s=e.offsetTop-this.list.scrollTop;s=this.fields.groupBy&&!t.isUndefined(this.fixedHeaderElement)?s-this.fixedHeaderElement.offsetHeight:s;var l=e.offsetTop+e.offsetHeight-this.list.scrollTop;0===i?this.list.scrollTop=0:s<0?this.list.scrollTop=this.list.scrollTop+s:l>0&&this.list.offsetHeight>l||(this.list.scrollTop=e.offsetTop-(this.fields.groupBy&&!t.isUndefined(this.fixedHeaderElement)?this.fixedHeaderElement.offsetHeight:0))},s.prototype.selectListByKey=function(e){var i,s=this.list.querySelector("li."+k.focus),l=this.value&&this.value.length?this.value.length:0;null!==s&&(s.classList.contains("e-active")&&(l-=1),this.isValidLI(s)&&l<this.maximumSelectionLength?(this.updateListSelection(s,e),this.addListFocus(s),"CheckBox"===this.mode?(this.updateDelimView(),this.updateDelimeter(this.delimiterChar,e),this.refreshInputHight(),this.checkPlaceholderSize(),this.enableGroupCheckBox&&!t.isNullOrUndefined(this.fields.groupBy)&&(i=s.firstElementChild.lastElementChild,this.findGroupStart(i),this.deselectHeader())):this.updateDelimeter(this.delimiterChar,e),this.makeTextBoxEmpty(),"CheckBox"!==this.mode&&this.refreshListItems(s.textContent),this.changeOnBlur||this.updateValueState(e,this.value,this.tempValues),this.refreshPopup()):!this.isValidLI(s)&&l<this.maximumSelectionLength&&((i=s.firstElementChild.lastElementChild).classList.contains("e-check")?this.selectAllItem(!1,e,s):this.selectAllItem(!0,e,s)),this.refreshSelection(),this.closePopupOnSelect&&this.hidePopup()),this.refreshPlaceHolder()},s.prototype.refreshListItems=function(e){if((this.allowFiltering||"CheckBox"===this.mode&&!0===this.enableSelectionOrder||this.allowCustomValue)&&this.mainList&&this.listData){var t=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;this.onActionComplete(t,this.mainData),this.focusAtLastListItem(e),this.value&&this.value.length&&this.refreshSelection()}},s.prototype.removeSelectedChip=function(e){var i,s=this.chipCollectionWrapper.querySelector("span.e-chip-selected");null!==s&&(t.isNullOrUndefined(this.value)||(this.tempValues=this.value.slice()),null!==(i=s.nextElementSibling)&&(this.removeChipSelection(),this.addChipSelection(i,e)),this.removeValue(s.getAttribute("data-value"),e),this.makeTextBoxEmpty()),this.closePopupOnSelect&&this.hidePopup(),this.checkPlaceholderSize()},s.prototype.moveByTop=function(e){var t,i=this.list.querySelectorAll("li."+k.li);i.length>1&&(this.removeFocus(),t=e?0:i.length-1,this.addListFocus(i[t]),this.scrollBottom(i[t],t)),this.updateAriaAttribute()},s.prototype.moveByList=function(e){if(this.list){var i=this.list.querySelectorAll("li."+k.li+":not(."+ne+"):not(.e-reorder-hide)");"CheckBox"===this.mode&&this.enableGroupCheckBox&&!t.isNullOrUndefined(this.fields.groupBy)&&(i=this.list.querySelectorAll("li."+k.li+",li."+k.group+":not(."+ne+"):not(.e-reorder-hide)"));var s=this.list.querySelector("li."+k.focus),l=-1;if(i.length){for(var o=0;o<i.length;o++)if(i[o]===s){l=o;break}e>0?l<i.length-1&&(this.removeFocus(),this.addListFocus(i[++l]),this.updateCheck(i[l]),this.scrollBottom(i[l],l)):l>0&&(this.removeFocus(),this.addListFocus(i[--l]),this.updateCheck(i[l]),this.scrollTop(i[l],l))}}},s.prototype.updateCheck=function(e){"CheckBox"===this.mode&&this.enableGroupCheckBox&&!t.isNullOrUndefined(this.fields.groupBy)&&(e.firstElementChild.lastElementChild.classList.contains("e-check")?e.classList.add("e-active"):e.classList.remove("e-active"))},s.prototype.moveBy=function(e,t){var i,s=this.chipCollectionWrapper.querySelectorAll("span.e-chips"),l=this.chipCollectionWrapper.querySelector("span.e-chip-selected");null===l?e<0&&this.addChipSelection(s[s.length-1],t):e<0?null!==(i=l.previousElementSibling)&&(this.removeChipSelection(),this.addChipSelection(i,t)):(i=l.nextElementSibling,this.removeChipSelection(),null!==i&&this.addChipSelection(i,t))},s.prototype.chipClick=function(e){if(this.enabled){var i=t.closest(e.target,".e-chips");this.removeChipSelection(),this.addChipSelection(i,e)}},s.prototype.removeChipSelection=function(){this.chipCollectionWrapper&&this.removeChipFocus()},s.prototype.addChipSelection=function(e,i){t.addClass([e],"e-chip-selected"),this.trigger("chipSelection",i)},s.prototype.onChipRemove=function(e){if(3!==e.which&&2!==e.button&&this.enabled&&!this.readonly){var i=e.target.parentElement.getAttribute("data-value"),s=this.getFormattedValue(i);if(this.allowCustomValue&&("false"!==i&&!1===s||!t.isNullOrUndefined(s)&&"NaN"===s.toString())&&(s=i),this.isPopupOpen()&&"CheckBox"!==this.mode&&this.hidePopup(),this.inputFocus||this.inputElement.focus(),this.removeValue(s,e),t.isNullOrUndefined(this.findListElement(this.list,"li","data-value",s))&&this.mainList&&this.listData){var l=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;this.onActionComplete(l,this.mainData)}this.updateDelimeter(this.delimiterChar,e),this.placeholder&&"Never"===this.floatLabelType?(this.makeTextBoxEmpty(),this.checkPlaceholderSize()):this.inputElement.value="",e.preventDefault()}},s.prototype.makeTextBoxEmpty=function(){this.inputElement.value="",this.refreshPlaceHolder()},s.prototype.refreshPlaceHolder=function(){this.placeholder&&"Never"===this.floatLabelType?this.value&&this.value.length||!t.isNullOrUndefined(this.text)&&""!==this.text?this.inputElement.placeholder="":this.inputElement.placeholder=this.placeholder:this.setFloatLabelType(),this.expandTextbox()},s.prototype.removeValue=function(i,s,l,o){var r=this,n=this.value.indexOf(this.getFormattedValue(i));-1===n&&this.allowCustomValue&&!t.isNullOrUndefined(i)&&(n=this.value.indexOf(i.toString()));var a=s&&s.target;o=!!(o||a&&a.classList.contains("e-close-hooker"))||null;var h=this.hideSelectedItem?ne:k.selected;if(-1!==n){var p=this.findListElement(this.list,"li","data-value",i),u=this.getDataByValue(i),c={e:s,item:p,itemData:u,isInteracted:!!s,cancel:!1};this.trigger("removing",c,function(a){if(a.cancel)r.removeIndex++;else{var c=r.value.slice(0);if(c.splice(n,1),t.isBlazor()&&r.isServerRendered){var d=[].concat([],c);r.setProperties({value:0===d.length?null:d},!0)}else r.setProperties({value:[].concat([],c)},!0);if(null!==p){var m=r.findListElement(r.mainList,"li","data-value",i);p.setAttribute("aria-selected","false"),t.removeClass([p],h),m&&(m.setAttribute("aria-selected","false"),t.removeClass([p,m],h)),r.notify("activeList",{module:"CheckBoxSelection",enable:"CheckBox"===r.mode,li:p,e:r,index:n}),r.notify("updatelist",{module:"CheckBoxSelection",enable:"CheckBox"===r.mode,li:p,e:s}),t.attributes(r.inputElement,{"aria-activedescendant":p.id}),r.value&&r.value.length!==r.mainData.length&&"CheckBox"===r.mode&&r.showSelectAll&&!r.isSelectAll&&!o&&r.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===r.mode,value:"uncheck"})}if(r.hideSelectedItem&&r.fields.groupBy&&r.hideGroupItem(i),r.hideSelectedItem&&r.fixedHeaderElement&&r.fields.groupBy&&"CheckBox"!==r.mode&&r.isPopupOpen()&&e.prototype.scrollStop.call(r),r.updateMainList(!0,i),r.removeChip(i),r.updateChipStatus(),(r.value&&r.value.length?r.value.length:0)<r.maximumSelectionLength){var f=r.list.querySelectorAll("li."+k.li+":not(.e-active)");t.removeClass(f,"e-disable")}r.trigger("removed",a);var v=s&&s.currentTarget,y=!(!v||!v.classList.contains("e-selectall-parent"))||null;if(r.changeOnBlur||o||!s||!l||y||r.updateValueState(s,r.value,r.tempValues),l&&(r.selectAllEventData.push(u),r.selectAllEventEle.push(p)),1===l){r.changeOnBlur||r.updateValueState(s,r.value,r.tempValues);var g={event:s,items:r.selectAllEventEle,itemData:r.selectAllEventData,isInteracted:!!s,isChecked:!1};r.trigger("selectedAll",g),r.selectAllEventData=[],r.selectAllEventEle=[]}!o||1!==l&&null!==l||r.clearAllCallback(s,o),t.isBlazor()&&r.isServerRendered&&(t.isNullOrUndefined(r.value)||0===r.value.length)&&r.updatedataValueItems(s)}})}},s.prototype.updateMainList=function(e,i){if(this.allowFiltering||"CheckBox"===this.mode){var s=this.findListElement(this.mainList,"li","data-value",i);s&&(e?(s.setAttribute("aria-selected","false"),t.removeClass([s],this.hideSelectedItem?ne:k.selected),"CheckBox"===this.mode&&(s.firstElementChild.setAttribute("aria-checked","false"),t.removeClass([s.firstElementChild.lastElementChild],"e-check"))):(s.setAttribute("aria-selected","true"),t.addClass([s],this.hideSelectedItem?ne:k.selected),"CheckBox"===this.mode&&(s.firstElementChild.setAttribute("aria-checked","true"),t.addClass([s.firstElementChild.lastElementChild],"e-check"))))}},s.prototype.removeChip=function(e){if(this.chipCollectionWrapper){var i=this.findListElement(this.chipCollectionWrapper,"span","data-value",e);i&&t.remove(i)}},s.prototype.setWidth=function(e){t.isNullOrUndefined(e)||("number"==typeof e?this.overAllWrapper.style.width=t.formatUnit(e):"string"==typeof e&&(this.overAllWrapper.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)))},s.prototype.updateChipStatus=function(){this.value&&this.value.length?(t.isNullOrUndefined(this.chipCollectionWrapper)||(this.chipCollectionWrapper.style.display=""),"Delimiter"!==this.mode&&"CheckBox"!==this.mode||this.showDelimWrapper(),this.showOverAllClear()):(t.isNullOrUndefined(this.chipCollectionWrapper)||(this.chipCollectionWrapper.style.display="none"),t.isNullOrUndefined(this.delimiterWrapper)||(this.delimiterWrapper.style.display="none"),this.hideOverAllClear())},s.prototype.addValue=function(e,t,i){this.value||(this.value=[]),this.value.indexOf(e)<0&&this.setProperties({value:[].concat([],this.value,[e])},!0);var s=this.findListElement(this.list,"li","data-value",e);this.removeFocus(),s&&(this.addListFocus(s),this.addListSelection(s)),"Delimiter"!==this.mode&&"CheckBox"!==this.mode&&this.addChip(t,e,i),this.hideSelectedItem&&this.fields.groupBy&&this.hideGroupItem(e),this.updateChipStatus(),this.checkMaxSelection()},s.prototype.checkMaxSelection=function(){if((this.value&&this.value.length?this.value.length:0)===this.maximumSelectionLength){var e=this.list.querySelectorAll("li."+k.li+":not(.e-active)");t.addClass(e,"e-disable")}},s.prototype.dispatchSelect=function(t,i,s,l,o){var r=this,n=this.listData;if(this.initStatus&&!l){var a=this.getDataByValue(t),h={e:i,item:s,itemData:a,isInteracted:!!i,cancel:!1};this.trigger("select",h,function(l){if(!l.cancel){if(o&&(r.selectAllEventData.push(a),r.selectAllEventEle.push(s)),1===o){var h={event:i,items:r.selectAllEventEle,itemData:r.selectAllEventData,isInteracted:!!i,isChecked:!0};r.trigger("selectedAll",h),r.selectAllEventData=[]}r.allowCustomValue&&r.isServerRendered&&r.listData!==n&&(r.listData=n),r.updateListSelectEventCallback(t,s,i),r.hideSelectedItem&&r.fixedHeaderElement&&r.fields.groupBy&&"CheckBox"!==r.mode&&e.prototype.scrollStop.call(r)}})}},s.prototype.addChip=function(e,t,i){this.chipCollectionWrapper&&this.getChip(e,t,i)},s.prototype.removeChipFocus=function(){var e=this.chipCollectionWrapper.querySelectorAll("span.e-chips"),i=this.chipCollectionWrapper.querySelectorAll("span."+"e-chips-close".split(" ")[0]);if(t.removeClass(e,"e-chip-selected"),t.Browser.isDevice)for(var s=0;s<i.length;s++)i[s].style.display="none"},s.prototype.onMobileChipInteraction=function(e){var i=t.closest(e.target,".e-chips"),s=i.querySelector("span."+"e-chips-close".split(" ")[0]);this.enabled&&!this.readonly&&(i.classList.contains("e-chip-selected")||(this.removeChipFocus(),s.style.display="",i.classList.add("e-chip-selected")),this.refreshPopup(),e.preventDefault())},s.prototype.multiCompiler=function(e){var i=!1;if(e)try{i=!!t.selectAll(e,document).length}catch(e){i=!1}return i},s.prototype.getChip=function(e,i,s){var l,o=this,r={text:i,value:i},n=this.createElement("span",{className:ae,attrs:{"data-value":i,title:e}}),a=this.createElement("span",{className:"e-chipcontent"}),h=this.createElement("span",{className:"e-chips-close"});if(this.mainData&&(r=t.isBlazor()&&this.isServerRendered?JSON.parse(JSON.stringify(this.getDataByValue(i))):this.getDataByValue(i)),this.valueTemplate&&!t.isNullOrUndefined(r)){var p=(l=this.multiCompiler(this.valueTemplate)?t.compile(t.select(this.valueTemplate,document).innerHTML.trim()):t.compile(this.valueTemplate))(r,this,"valueTemplate",this.valueTemplateId,this.isStringTemplate,null,a);if(p&&p.length>0)for(var u=0;u<p.length;u++)a.appendChild(p[u]);this.renderReactTemplates(),this.DropDownBaseupdateBlazorTemplates(!1,!1,!1,!1,!0,!1,!1,!1)}else this.enableHtmlSanitizer?a.innerText=e:a.innerHTML=e;n.appendChild(a);var c={isInteracted:!!s,itemData:r,e:s,setClass:function(e){t.addClass([n],e)},cancel:!1};this.isPreventChange=this.isAngular&&this.preventChange,this.trigger("tagging",c,function(e){e.cancel||(e.setClass&&"string"==typeof e.setClass&&t.isBlazor()&&o.isServerRendered&&t.addClass([n],e.setClass),t.Browser.isDevice?(n.classList.add("e-mob-chip"),t.append([h],n),h.style.display="none",t.EventHandler.add(n,"click",o.onMobileChipInteraction,o)):(t.EventHandler.add(n,"mousedown",o.chipClick,o),o.showClearButton&&n.appendChild(h)),t.EventHandler.add(h,"mousedown",o.onChipRemove,o),o.chipCollectionWrapper.appendChild(n),!o.changeOnBlur&&s&&o.updateValueState(s,o.value,o.tempValues))})},s.prototype.calcPopupWidth=function(){var e=t.formatUnit(this.popupWidth);return e.indexOf("%")>-1&&(e=(this.componentWrapper.offsetWidth*parseFloat(e)/100).toString()+"px"),e},s.prototype.mouseIn=function(){this.enabled&&!this.readonly&&this.showOverAllClear()},s.prototype.mouseOut=function(){this.inputFocus||(this.overAllClear.style.display="none")},s.prototype.listOption=function(e,i){var s=!t.isNullOrUndefined(i.iconCss),l=t.isNullOrUndefined(i.properties)?i:i.properties;return this.listCurrentOptions=null!==i.text||null!==i.value?{fields:l,showIcon:s,ariaAttributes:{groupItemRole:"presentation"}}:{fields:{value:"text"}},t.extend(this.listCurrentOptions,this.listCurrentOptions,i,!0),"CheckBox"===this.mode&&this.notify("listoption",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,dataSource:e,fieldProperty:l}),this.listCurrentOptions},s.prototype.renderPopup=function(){var i=this;if(this.list||e.prototype.render.call(this),!this.popupObj){document.body.appendChild(this.popupWrapper);var s=this.popupWrapper.querySelector(".e-filter-parent");"CheckBox"===this.mode&&!this.allowFiltering&&s&&this.filterParent&&(s.remove(),this.filterParent=null);var o=parseInt(this.popupHeight,10);if(this.popupWrapper.style.visibility="hidden",this.headerTemplate&&(this.setHeaderTemplate(),o-=this.header.offsetHeight),t.append([this.list],this.popupWrapper),this.footerTemplate&&(this.setFooterTemplate(),o-=this.footer.offsetHeight),"CheckBox"===this.mode&&this.showSelectAll?(this.notify("selectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),o-=this.selectAllHeight):"CheckBox"!==this.mode||this.showSelectAll||this.headerTemplate||this.footerTemplate?"CheckBox"!==this.mode||this.showSelectAll||(this.notify("selectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),o=parseInt(this.popupHeight,10),this.headerTemplate&&this.header&&(o-=this.header.offsetHeight),this.footerTemplate&&this.footer&&(o-=this.footer.offsetHeight)):(this.notify("selectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),o=parseInt(this.popupHeight,10)),"CheckBox"===this.mode){var r={module:"CheckBoxSelection",enable:"CheckBox"===this.mode,popupElement:this.popupWrapper};this.allowFiltering&&(this.notify("searchBox",r),o-=this.searchBoxHeight),t.addClass([this.popupWrapper],"e-checkbox")}"auto"!==this.popupHeight?(this.list.style.maxHeight=t.formatUnit(o),this.popupWrapper.style.maxHeight=t.formatUnit(this.popupHeight)):this.list.style.maxHeight=t.formatUnit(this.popupHeight),this.popupObj=new l.Popup(this.popupWrapper,{width:this.calcPopupWidth(),targetType:"relative",position:{X:"left",Y:"bottom"},relateTo:this.overAllWrapper,collision:{X:"flip",Y:"flip"},offsetY:1,enableRtl:this.enableRtl,zIndex:this.zIndex,close:function(){i.popupObj.element.parentElement&&(i.popupObj.unwireScrollEvents(),t.detach(i.popupObj.element))},open:function(){if(i.popupObj.resolveCollision(),!i.isFirstClick){var e=i.list.querySelector("ul");e&&(i.itemTemplate&&t.isBlazor()&&i.isServerRendered?setTimeout(function(){i.mainList=i.ulElement},0):"CheckBox"!==i.mode&&(i.allowFiltering||i.allowCustomValue)&&""!==i.targetElement().trim()||(i.mainList=e.cloneNode?e.cloneNode(!0):e)),i.isFirstClick=!0}i.popupObj.wireScrollEvents(),"CheckBox"!==i.mode&&(i.allowFiltering||i.allowCustomValue)&&""!==i.targetElement().trim()||i.loadTemplate(),i.setScrollPosition(),i.allowFiltering&&i.notify("inputFocus",{module:"CheckBoxSelection",enable:"CheckBox"===i.mode,value:"focus"})},targetExitViewport:function(){t.Browser.isDevice||i.hidePopup()}}),"CheckBox"===this.mode&&t.Browser.isDevice&&this.allowFiltering&&this.notify("deviceSearchBox",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),this.popupObj.close(),this.popupWrapper.style.visibility=""}},s.prototype.setHeaderTemplate=function(){var e;this.header&&this.header.remove(),this.header=this.createElement("div"),t.addClass([this.header],"e-ddl-header");var i=(e=this.multiCompiler(this.headerTemplate)?t.compile(t.select(this.headerTemplate,document).innerHTML.trim()):t.compile(this.headerTemplate))({},this,"headerTemplate",this.headerTemplateId,this.isStringTemplate,null,this.header);if(i&&i.length>0)for(var s=0;s<i.length;s++)this.header.appendChild(i[s]);this.DropDownBaseupdateBlazorTemplates(!1,!1,!1,!1,!1,!0,!1),"CheckBox"===this.mode&&this.showSelectAll?t.prepend([this.header],this.popupWrapper):t.append([this.header],this.popupWrapper),t.EventHandler.add(this.header,"mousedown",this.onListMouseDown,this)},s.prototype.setFooterTemplate=function(){var e;this.footer&&this.footer.remove(),this.footer=this.createElement("div"),t.addClass([this.footer],"e-ddl-footer");var i=(e=this.multiCompiler(this.footerTemplate)?t.compile(t.select(this.footerTemplate,document).innerHTML.trim()):t.compile(this.footerTemplate))({},this,"footerTemplate",this.footerTemplateId,this.isStringTemplate,null,this.footer);if(i&&i.length>0)for(var s=0;s<i.length;s++)this.footer.appendChild(i[s]);this.DropDownBaseupdateBlazorTemplates(!1,!1,!1,!1,!1,!1,!0),t.append([this.footer],this.popupWrapper),t.EventHandler.add(this.footer,"mousedown",this.onListMouseDown,this)},s.prototype.clearAll=function(e){if(this.enabled&&!this.readonly){var i=void 0;if(this.value&&this.value.length>0){var s=this.list&&this.list.querySelectorAll("li.e-list-item");if(s&&s.length>0)this.selectAllItems(!1,e);else for(this.removeIndex=0,i=this.value[this.removeIndex];this.removeIndex<this.value.length&&(this.removeValue(i,e,null,!0),null!==this.value||!t.isBlazor()||!this.isServerRendered);i=this.value[this.removeIndex]);}else this.clearAllCallback(e)}},s.prototype.clearAllCallback=function(e,i){var s=this.value?this.value.slice():[];if(this.mainList&&this.listData&&(this.allowFiltering&&"CheckBox"!==this.mode||this.allowCustomValue)){var l=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;this.onActionComplete(l,this.mainData)}this.focusAtFirstListItem(),this.updateDelimeter(this.delimiterChar,e),"Box"===this.mode||this.inputFocus&&"CheckBox"!==this.mode||this.updateDelimView(),""!==this.inputElement.value&&(this.makeTextBoxEmpty(),this.search(null)),this.checkPlaceholderSize(),this.isPopupOpen()&&this.refreshPopup(),this.inputFocus||(this.changeOnBlur&&this.updateValueState(e,this.value,s),"CheckBox"!==this.mode&&this.inputElement.focus()),"CheckBox"===this.mode&&(this.refreshPlaceHolder(),this.refreshInputHight(),this.changeOnBlur&&i&&(t.isNullOrUndefined(this.value)||0===this.value.length)&&this.updateValueState(e,this.value,this.tempValues)),this.changeOnBlur||!i||!t.isNullOrUndefined(this.value)&&0!==this.value.length||this.updateValueState(e,this.value,this.tempValues),"CheckBox"===this.mode&&this.enableGroupCheckBox&&!t.isNullOrUndefined(this.fields.groupBy)&&this.updateListItems(this.list.querySelectorAll("li.e-list-item"),this.mainList.querySelectorAll("li.e-list-item")),e.preventDefault()},s.prototype.windowResize=function(){this.refreshPopup(),this.inputFocus&&"CheckBox"!==this.mode||!this.viewWrapper||!this.viewWrapper.parentElement||this.updateDelimView()},s.prototype.resetValueHandler=function(e){var i=t.closest(this.inputElement,"form");if(i&&e.target===i){var s=this.element.tagName===this.getNgDirective()?null:this.element.getAttribute("data-initial-value");this.text=s}},s.prototype.wireEvent=function(){t.EventHandler.add(this.componentWrapper,"mousedown",this.wrapperClick,this),t.EventHandler.add(window,"resize",this.windowResize,this),t.EventHandler.add(this.inputElement,"focus",this.focusInHandler,this),t.EventHandler.add(this.inputElement,"keydown",this.onKeyDown,this),t.EventHandler.add(this.inputElement,"keyup",this.keyUp,this),"CheckBox"!==this.mode&&t.EventHandler.add(this.inputElement,"input",this.onInput,this),t.EventHandler.add(this.inputElement,"blur",this.onBlur,this),t.EventHandler.add(this.componentWrapper,"mousemove",this.mouseIn,this);var e=t.closest(this.inputElement,"form");e&&t.EventHandler.add(e,"reset",this.resetValueHandler,this),t.EventHandler.add(this.componentWrapper,"mouseout",this.mouseOut,this),t.EventHandler.add(this.overAllClear,"mouseup",this.clearAll,this),t.EventHandler.add(this.inputElement,"paste",this.pasteHandler,this)},s.prototype.onInput=function(e){this.keyDownStatus?this.isValidKey=!0:this.isValidKey=!1,this.keyDownStatus=!1,t.Browser.isDevice&&"mozilla"===t.Browser.info.name&&this.search(e)},s.prototype.pasteHandler=function(e){var t=this;setTimeout(function(){t.expandTextbox(),t.search(e)})},s.prototype.search=function(e){var s=this;if(t.isNullOrUndefined(e)||(this.keyCode=e.keyCode),!this.isPopupOpen()&&this.openOnClick&&this.showPopup(),this.openClick(e),!this.checkTextLength()||this.allowFiltering||t.isNullOrUndefined(e)||8===e.keyCode){var l=this.targetElement();if(this.allowFiltering){var o={preventDefaultAction:!1,text:this.targetElement(),updateData:function(e,t,i){o.cancel||(s.isFiltered=!0,s.remoteFilterAction=!0,s.dataUpdater(e,t,i))},event:e,cancel:!1};this.trigger("filtering",o,function(e){e.cancel||s.isFiltered||e.preventDefaultAction||(s.filterAction=!0,s.dataUpdater(s.dataSource,null,s.fields))})}else if(this.allowCustomValue){var r=new i.Query;r=""!==l?r.where(this.fields.text,"startswith",l,this.ignoreCase,this.ignoreAccent):r,this.dataUpdater(this.mainData,r,this.fields)}else{var n=this.list.querySelectorAll("li."+k.li+":not(.e-hide-listitem)"),a=h(this.targetElement(),n,"StartsWith",this.ignoreCase);a&&null!==a.item?(this.addListFocus(a.item),this.list.scrollTop=a.item.offsetHeight*a.index):""!==this.targetElement()?this.removeFocus():this.focusAtFirstListItem()}}else this.focusAtFirstListItem()},s.prototype.preRender=function(){null===this.allowFiltering&&(this.allowFiltering="CheckBox"===this.mode),this.initializeData(),this.updateDataAttribute(this.htmlAttributes),e.prototype.preRender.call(this)},s.prototype.getLocaleName=function(){return"multi-select"},s.prototype.initializeData=function(){this.mainListCollection=[],this.beforePopupOpen=!1,this.filterAction=!1,this.remoteFilterAction=!1,this.isFirstClick=!1,this.mobFilter=!0,this.isFiltered=!1,this.focused=!0,this.initial=!0,this.backCommand=!0},s.prototype.updateData=function(e,i){var s,l="",o="Delimiter"===this.mode||"CheckBox"===this.mode,r=[],n=this.listData;if(this.listData=this.mainData,this.hiddenElement.innerHTML="",!t.isNullOrUndefined(this.value))for(var a=0;!t.isNullOrUndefined(this.value[a]);a++){var h=this.findListElement(t.isNullOrUndefined(this.mainList)?this.ulElement:this.mainList,"li","data-value",this.value[a]);t.isBlazor()&&this.isServerRendered||!t.isNullOrUndefined(h)||this.allowCustomValue?(l+=(s=this.listData?this.getTextByValue(this.value[a]):this.value[a])+e+" ",r.push(s)):(this.value.splice(a,1),a-=1),this.hiddenElement.innerHTML+='<option selected value ="'+this.value[a]+'">'+a+"</option>"}this.setProperties({text:r.toString()},!0),o&&(this.updateWrapperText(this.delimiterWrapper,l),this.delimiterWrapper.setAttribute("id",t.getUniqueID("delim_val")),this.inputElement.setAttribute("aria-describedby",this.delimiterWrapper.id),this.inputElement.setAttribute("aria-labelledby",this.delimiterWrapper.id));var p=i&&i.target,u=!(!p||!p.classList.contains("e-close-hooker"))||null;(!this.changeOnBlur&&i&&!u||this.isSelectAll)&&(this.isSelectAll=!1,this.updateValueState(i,this.value,this.tempValues)),this.listData=n,this.addValidInputClass()},s.prototype.initialTextUpdate=function(){if(t.isNullOrUndefined(this.text))this.setProperties({value:null},!0);else{for(var e=this.text.split(this.delimiterChar),i=[],s=0;e.length>s;s++){var l=this.getValueByText(e[s]);t.isNullOrUndefined(l)?this.allowCustomValue&&i.push(e[s]):i.push(l)}i&&i.length&&this.setProperties({value:i},!0)}},s.prototype.renderList=function(t){!t&&this.allowCustomValue&&this.list&&(this.list.textContent===this.noRecordsTemplate||this.list.querySelector(".e-ul")&&0===this.list.querySelector(".e-ul").childElementCount)&&(t=!0),e.prototype.render.call(this,t),this.unwireListEvents(),this.wireListEvents()},s.prototype.initialValueUpdate=function(){if(this.list){var e=void 0,i=void 0,s=void 0;if(this.chipCollectionWrapper&&(this.chipCollectionWrapper.innerHTML=""),this.removeListSelection(),!t.isNullOrUndefined(this.value))for(var l=0;!t.isNullOrUndefined(this.value[l]);l++)if(s=this.value[l],i=this.findListElement(this.hideSelectedItem?this.ulElement:this.list,"li","data-value",s),e=this.getTextByValue(s),i&&"true"!==i.getAttribute("aria-selected")||i&&"true"===i.getAttribute("aria-selected")&&this.hideSelectedItem&&("Box"===this.mode||"Default"===this.mode))this.addChip(e,s),this.addListSelection(i);else if(s&&this.allowCustomValue){var o=this.listData.length,r={};t.setValue(this.fields.text,s,r),t.setValue(this.fields.value,s,r);var n=this.popupWrapper.querySelector("."+k.noData);this.addItem(r,o),this.popupWrapper.contains(n)&&(this.list.setAttribute("style",n.getAttribute("style")),this.popupWrapper.replaceChild(this.list,n),this.wireListEvents()),this.addChip(e,s),this.addListSelection(i)}"CheckBox"===this.mode?(this.updateDelimView(),this.changeOnBlur&&this.updateValueState(null,this.value,this.tempValues),this.updateDelimeter(this.delimiterChar),this.refreshInputHight()):this.updateDelimeter(this.delimiterChar),"CheckBox"!==this.mode||!this.showSelectAll||!t.isNullOrUndefined(this.value)&&this.value.length||this.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"uncheck"}),"Box"===this.mode||"Default"===this.mode&&this.inputFocus?this.chipCollectionWrapper.style.display="":"Delimiter"!==this.mode&&"CheckBox"!==this.mode||this.showDelimWrapper()}},s.prototype.updateActionCompleteData=function(e,i){this.value&&this.value.indexOf(e.getAttribute("data-value"))>-1&&(this.mainList=this.ulElement,t.addClass([e],ne))},s.prototype.updateAddItemList=function(e,i){this.popupObj&&this.popupObj.element&&this.popupObj.element.querySelector("."+k.noData)&&e&&(this.list=e,this.mainList=this.ulElement=e.querySelector("ul"),t.remove(this.popupWrapper.querySelector(".e-content")),this.popupObj=null,this.renderPopup())},s.prototype.updateDataList=function(){this.mainList&&this.ulElement&&this.mainList.childElementCount<this.ulElement.childElementCount&&(this.mainList=this.ulElement.cloneNode?this.ulElement.cloneNode(!0):this.ulElement)},s.prototype.isValidLI=function(e){return e&&!e.classList.contains(k.disabled)&&!e.classList.contains(k.group)&&e.classList.contains(k.li)},s.prototype.updateListSelection=function(e,i,s){var l=e.getAttribute("data-value"),o=this.getFormattedValue(l);this.allowCustomValue&&("false"!==l&&!1===o||!t.isNullOrUndefined(o)&&"NaN"===o.toString())&&(o=l),this.removeHover(),this.value&&-1!==this.value.indexOf(o)?this.removeValue(o,i,s):this.dispatchSelect(o,i,e,"true"===e.getAttribute("aria-selected"),s)},s.prototype.updateListSelectEventCallback=function(e,i,s){var l=this,o=this.getTextByValue(e);if(!this.allowCustomValue&&!this.allowFiltering||this.findListElement(this.mainList,"li","data-value",e))this.remoteCustomValue=!1,this.addValue(e,o,s);else{var r=i.cloneNode(!0),n=this.fields.value?this.fields.value:"value";this.allowCustomValue&&this.mainData.length&&"number"==typeof t.getValue(n,this.mainData[0])&&(e=isNaN(parseFloat(e.toString()))?e:parseFloat(e.toString()));var a=this.getDataByValue(e),h={newData:a,cancel:!1};this.trigger("customValueSelection",h,function(i){i.cancel||(t.append([r],l.mainList),l.mainData.push(a),l.remoteCustomValue=!1,l.addValue(e,o,s),t.isBlazor()&&l.isServerRendered&&(l.checkPlaceholderSize(),l.makeTextBoxEmpty()))})}t.isBlazor()&&this.isServerRendered&&this.value&&this.list&&(this.value.length===this.list.querySelectorAll("li.e-list-item").length||this.value.length===this.maximumSelectionLength)&&(this.updatedataValueItems(s),this.checkPlaceholderSize()),t.isBlazor()&&this.isServerRendered&&(this.checkPlaceholderSize(),this.makeTextBoxEmpty())},s.prototype.removeListSelection=function(){var e=this.hideSelectedItem?ne:k.selected,i=this.list.querySelectorAll("."+e),s=i.length;if(i&&i.length)for(t.removeClass(i,e);s>0;)i[s-1].setAttribute("aria-selected","false"),s--;if(!t.isNullOrUndefined(this.mainList)){var l=this.mainList.querySelectorAll("."+e),o=l.length;if(l&&l.length)for(t.removeClass(l,e);o>0;)l[o-1].setAttribute("aria-selected","false"),"CheckBox"===this.mode&&(i&&i.length>o-1&&(i[o-1].firstElementChild.setAttribute("aria-checked","false"),t.removeClass([i[o-1].firstElementChild.lastElementChild],"e-check")),l[o-1].firstElementChild.setAttribute("aria-checked","false"),t.removeClass([l[o-1].firstElementChild.lastElementChild],"e-check")),o--}},s.prototype.removeHover=function(){var e=this.list.querySelectorAll("."+k.hover);e&&e.length&&t.removeClass(e,k.hover)},s.prototype.removeFocus=function(){if(this.list&&this.mainList){var e=this.list.querySelectorAll("."+k.focus),i=this.mainList.querySelectorAll("."+k.focus);e&&e.length&&(t.removeClass(e,k.focus),t.removeClass(i,k.focus))}},s.prototype.addListHover=function(e){this.enabled&&this.isValidLI(e)?(this.removeHover(),t.addClass([e],k.hover)):null!==e&&e.classList.contains("e-list-group-item")&&this.enableGroupCheckBox&&"CheckBox"===this.mode&&!t.isNullOrUndefined(this.fields.groupBy)&&(this.removeHover(),t.addClass([e],k.hover))},s.prototype.addListFocus=function(e){this.enabled&&this.isValidLI(e)?(this.removeFocus(),t.addClass([e],k.focus)):this.enableGroupCheckBox&&"CheckBox"===this.mode&&!t.isNullOrUndefined(this.fields.groupBy)&&t.addClass([e],k.focus)},s.prototype.addListSelection=function(e){var i=this.hideSelectedItem?ne:k.selected;if(this.isValidLI(e)&&!e.classList.contains(k.hover)){if(t.addClass([e],i),this.updateMainList(!1,e.getAttribute("data-value")),e.setAttribute("aria-selected","true"),"CheckBox"===this.mode){var s=e.firstElementChild.getAttribute("aria-checked");("false"===s||t.isNullOrUndefined(s))&&this.notify("updatelist",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,li:e,e:this})}this.notify("activeList",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,li:e,e:this}),this.chipCollectionWrapper&&this.removeChipSelection(),t.attributes(this.inputElement,{"aria-activedescendant":e.id})}},s.prototype.updateDelimeter=function(e,t){this.updateData(e,t)},s.prototype.onMouseClick=function(e){var i=this;this.keyCode=null,this.scrollFocusStatus=!1;var s=e.target,l=t.closest(s,"."+k.li);if(t.closest(s,"."+k.group)&&this.enableGroupCheckBox&&"CheckBox"===this.mode&&this.fields.groupBy)(s=s.classList.contains("e-list-group-item")?s.firstElementChild.lastElementChild:e.target).classList.contains("e-check")?(this.selectAllItem(!1,e),s.classList.remove("e-check"),s.classList.remove("e-stop"),t.closest(s,".e-list-group-item").classList.remove("e-active"),s.setAttribute("aria-selected","false")):(this.selectAllItem(!0,e),s.classList.remove("e-stop"),s.classList.add("e-check"),t.closest(s,".e-list-group-item").classList.add("e-active"),s.setAttribute("aria-selected","true")),this.refreshSelection(),this.checkSelectAll();else{if(this.isValidLI(l)){var o=this.value&&this.value.length?this.value.length:0;l.classList.contains("e-active")&&(o-=1),o<this.maximumSelectionLength&&(this.updateListSelection(l,e),this.checkPlaceholderSize(),this.addListFocus(l),(this.allowCustomValue||this.allowFiltering)&&this.mainList&&this.listData?"CheckBox"!==this.mode&&(this.focusAtLastListItem(l.getAttribute("data-value")),this.refreshSelection()):this.makeTextBoxEmpty()),"CheckBox"===this.mode?(this.updateDelimView(),this.value&&this.value.length>50?setTimeout(function(){i.updateDelimeter(i.delimiterChar,e)},0):this.updateDelimeter(this.delimiterChar,e),this.refreshInputHight()):this.updateDelimeter(this.delimiterChar,e),this.checkSelectAll(),this.refreshPopup(),this.hideSelectedItem&&this.focusAtFirstListItem(),this.closePopupOnSelect?this.hidePopup():e.preventDefault(),this.makeTextBoxEmpty(),this.findGroupStart(s)}else e.preventDefault();"CheckBox"!==this.mode&&this.refreshListItems(t.isNullOrUndefined(l)?null:l.textContent),this.refreshPlaceHolder(),this.deselectHeader()}},s.prototype.findGroupStart=function(e){if(this.enableGroupCheckBox&&"CheckBox"===this.mode&&!t.isNullOrUndefined(this.fields.groupBy)){var i=void 0;if(this.itemTemplate&&!e.getElementsByClassName("e-frame").length)for(;!e.getElementsByClassName("e-frame").length;)e=e.parentElement;for(e.classList.contains("e-frame")&&(e=e.parentElement.parentElement),i=this.findGroupAttrtibutes(e,0,0,0,0),i=this.findGroupAttrtibutes(e,i[0],i[1],i[2],1);!e.classList.contains("e-list-group-item")&&(e.classList.contains("e-list-icon")&&(e=e.parentElement),null!=(e=e.previousElementSibling)););this.updateCheckBox(e,i[0],i[1],i[2])}},s.prototype.findGroupAttrtibutes=function(e,t,i,s,l){for(;!e.classList.contains("e-list-group-item")&&(e.classList.contains("e-list-icon")&&(e=e.parentElement),e.getElementsByClassName("e-frame")[0].classList.contains("e-check")&&e.classList.contains("e-list-item")?t++:e.classList.contains("e-list-item")&&i++,s++,null!=(e=l?e.nextElementSibling:e.previousElementSibling)););return[t,i,s]},s.prototype.updateCheckBox=function(e,i,s,l){if(null!==e){var o=e.getElementsByClassName("e-frame")[0];l===i?(o.classList.remove("e-stop"),o.classList.add("e-check"),t.closest(o,".e-list-group-item").classList.add("e-active"),e.setAttribute("aria-selected","true")):l===s?(o.classList.remove("e-check"),o.classList.remove("e-stop"),t.closest(o,".e-list-group-item").classList.remove("e-active"),e.setAttribute("aria-selected","false")):this.maximumSelectionLength===i-1?(o.classList.remove("e-stop"),e.setAttribute("aria-selected","true"),t.closest(o,".e-list-group-item").classList.add("e-active"),o.classList.add("e-check")):(o.classList.remove("e-check"),o.classList.add("e-stop"),t.closest(o,".e-list-group-item").classList.add("e-active"),e.setAttribute("aria-selected","false"))}},s.prototype.deselectHeader=function(){var e=this.value&&this.value.length?this.value.length:0,i=this.list.querySelectorAll("li.e-list-group-item:not(.e-active)");e<this.maximumSelectionLength&&t.removeClass(i,"e-disable"),e===this.maximumSelectionLength&&t.addClass(i,"e-disable")},s.prototype.onMouseOver=function(e){var i=t.closest(e.target,"."+k.li);null===i&&"CheckBox"===this.mode&&!t.isNullOrUndefined(this.fields.groupBy)&&this.enableGroupCheckBox&&(i=t.closest(e.target,"."+k.group)),this.addListHover(i)},s.prototype.onMouseLeave=function(){this.removeHover()},s.prototype.onListMouseDown=function(e){e.preventDefault(),this.scrollFocusStatus=!0},s.prototype.onDocumentClick=function(e){if("CheckBox"!==this.mode){var i=e.target;!t.isNullOrUndefined(this.popupObj)&&t.closest(i,'[id="'+this.popupObj.element.id+'"]')||this.overAllWrapper.contains(e.target)?this.scrollFocusStatus=(t.Browser.isIE||"edge"===t.Browser.info.name)&&document.activeElement===this.inputElement:this.scrollFocusStatus=!1}},s.prototype.wireListEvents=function(){t.EventHandler.add(document,"mousedown",this.onDocumentClick,this),t.EventHandler.add(this.list,"mousedown",this.onListMouseDown,this),t.EventHandler.add(this.list,"mouseup",this.onMouseClick,this),t.EventHandler.add(this.list,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.list,"mouseout",this.onMouseLeave,this)},s.prototype.unwireListEvents=function(){t.EventHandler.remove(document,"mousedown",this.onDocumentClick),this.list&&(t.EventHandler.remove(this.list,"mousedown",this.onListMouseDown),t.EventHandler.remove(this.list,"mouseup",this.onMouseClick),t.EventHandler.remove(this.list,"mouseover",this.onMouseOver),t.EventHandler.remove(this.list,"mouseout",this.onMouseLeave))},s.prototype.hideOverAllClear=function(){this.value&&this.value.length&&""!==this.inputElement.value||(this.overAllClear.style.display="none")},s.prototype.showOverAllClear=function(){(this.value&&this.value.length||""!==this.inputElement.value)&&this.showClearButton&&!0!==this.readonly?this.overAllClear.style.display="":this.overAllClear.style.display="none"},s.prototype.focusIn=function(){document.activeElement!==this.inputElement&&this.enabled&&this.inputElement.focus()},s.prototype.focusOut=function(){document.activeElement===this.inputElement&&this.enabled&&this.inputElement.blur()},s.prototype.showSpinner=function(){t.isNullOrUndefined(this.spinnerElement)&&("none"!==this.overAllClear.style.display?this.spinnerElement=this.overAllClear:(this.spinnerElement=this.createElement("span",{className:"e-chips-close e-close-hooker e-ms-spinner-icon"}),this.componentWrapper.appendChild(this.spinnerElement)),l.createSpinner({target:this.spinnerElement,width:t.Browser.isDevice?"16px":"14px"},this.createElement),t.addClass([this.spinnerElement],"e-ddl-disable-icon"),l.showSpinner(this.spinnerElement))},s.prototype.hideSpinner=function(){t.isNullOrUndefined(this.spinnerElement)||(l.hideSpinner(this.spinnerElement),t.removeClass([this.spinnerElement],"e-ddl-disable-icon"),this.spinnerElement.classList.contains("e-ms-spinner-icon")?t.detach(this.spinnerElement):this.spinnerElement.innerHTML="",this.spinnerElement=null)},s.prototype.updateWrapperText=function(e,i){this.valueTemplate||!this.enableHtmlSanitizer?e.innerHTML=i:e.innerText=t.SanitizeHtmlHelper.sanitize(i)},s.prototype.updateDelimView=function(){if(this.delimiterWrapper&&this.hideDelimWrapper(),this.chipCollectionWrapper&&(this.chipCollectionWrapper.style.display="none"),this.viewWrapper.style.display="",this.viewWrapper.style.width="",this.viewWrapper.classList.remove("e-delim-total"),this.value&&this.value.length){var e="",i=void 0,s=void 0,l=1,o=void 0,r=void 0,n=0,a=void 0;this.updateWrapperText(this.viewWrapper,e);var h={noRecordsTemplate:"No records found",actionFailureTemplate:"Request failed",overflowCountTemplate:"+${count} more..",totalCountTemplate:"${count} selected"},p=new t.L10n(this.getLocaleName(),h,this.locale);""===p.getConstant("actionFailureTemplate")&&(p=new t.L10n("dropdowns",h,this.locale)),""===p.getConstant("noRecordsTemplate")&&(p=new t.L10n("dropdowns",h,this.locale));var u=p.getConstant("overflowCountTemplate"),c=this.createElement("span",{className:"e-remain"}),d=t.compile(u),m=t.compile(p.getConstant("totalCountTemplate")),f=d({count:this.value.length},this,"overflowCountTemplate",null,!this.isStringTemplate,null,c);f&&f.length>0&&c.appendChild(f[0]),this.viewWrapper.appendChild(c),this.renderReactTemplates();var v=c.offsetWidth;if(t.remove(c),this.showDropDownIcon&&(n=this.dropIcon.offsetWidth+parseInt(window.getComputedStyle(this.dropIcon).marginRight,10)),this.checkClearIconWidth(),!t.isNullOrUndefined(this.value))for(var y=0;!t.isNullOrUndefined(this.value[y]);y++){if(e+=0===y?"":this.delimiterChar+" ",i=this.getOverflowVal(y),e+=i,i=this.viewWrapper.innerHTML,this.updateWrapperText(this.viewWrapper,e),o=this.viewWrapper.offsetWidth+parseInt(window.getComputedStyle(this.viewWrapper).paddingRight,10),a=this.componentWrapper.offsetWidth-parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft,10)-parseInt(window.getComputedStyle(this.componentWrapper).paddingRight,10),o+n+this.clearIconWidth>a){for(void 0!==s&&""!==s&&(i=s,y=l+1),this.updateWrapperText(this.viewWrapper,i),r=this.value.length-y,o=this.viewWrapper.offsetWidth+parseInt(window.getComputedStyle(this.viewWrapper).paddingRight,10);o+v+n+this.clearIconWidth>a&&0!==o&&""!==this.viewWrapper.innerHTML;){var g=this.viewWrapper.innerHTML.split(this.delimiterChar);g.pop(),this.viewWrapper.innerHTML=g.join(this.delimiterChar),r++,o=this.viewWrapper.offsetWidth+parseInt(window.getComputedStyle(this.viewWrapper).paddingRight,10)}break}o+v+n+this.clearIconWidth<=a?(s=e,l=y):0===y&&(s="",l=-1)}if(r>0){var C=a-n-this.clearIconWidth;this.viewWrapper.appendChild(this.updateRemainTemplate(c,this.viewWrapper,r,d,m,C)),this.updateRemainWidth(this.viewWrapper,C),this.updateRemainingText(c,n,r,d,m)}}else this.viewWrapper.innerHTML="",this.viewWrapper.style.display="none"},s.prototype.checkClearIconWidth=function(){this.showClearButton&&(this.clearIconWidth=this.overAllClear.offsetWidth)},s.prototype.updateRemainWidth=function(e,t){e.classList.contains("e-delim-total")&&t<e.offsetWidth+parseInt(window.getComputedStyle(e).paddingLeft,10)+parseInt(window.getComputedStyle(e).paddingLeft,10)&&(e.style.width=t+"px")},s.prototype.updateRemainTemplate=function(e,t,i,s,l,o){t.firstChild&&3===t.firstChild.nodeType&&""===t.firstChild.nodeValue&&t.removeChild(t.firstChild),e.innerHTML="";var r=s({count:i},this,"overflowCountTemplate",null,!this.isStringTemplate,null,e),n=l({count:i},this,"totalCountTemplate",null,!this.isStringTemplate,null,e);return e.appendChild(t.firstChild&&3===t.firstChild.nodeType?r&&r[0]:n&&n[0]),t.firstChild&&3===t.firstChild.nodeType?t.classList.remove("e-delim-total"):(t.classList.add("e-delim-total"),this.updateRemainWidth(t,o)),e},s.prototype.updateRemainingText=function(e,t,i,s,l){var o=this.componentWrapper.offsetWidth-parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft,10)-parseInt(window.getComputedStyle(this.componentWrapper).paddingRight,10),r=this.viewWrapper.offsetWidth+parseInt(window.getComputedStyle(this.viewWrapper).paddingRight,10);if(r+t>=o&&0!==r&&this.viewWrapper.firstChild&&3===this.viewWrapper.firstChild.nodeType){for(;r+t>o&&0!==r&&this.viewWrapper.firstChild&&3===this.viewWrapper.firstChild.nodeType;){var n=this.viewWrapper.firstChild.nodeValue.split(this.delimiterChar);n.pop(),this.viewWrapper.firstChild.nodeValue=n.join(this.delimiterChar),""===this.viewWrapper.firstChild.nodeValue&&this.viewWrapper.removeChild(this.viewWrapper.firstChild),i++,r=this.viewWrapper.offsetWidth}var a=o-t;this.updateRemainTemplate(e,this.viewWrapper,i,s,l,a)}},s.prototype.getOverflowVal=function(e){var t;if(this.mainData&&this.mainData.length)if("CheckBox"===this.mode){var i=this.listData;this.listData=this.mainData,t=this.getTextByValue(this.value[e]),this.listData=i}else t=this.getTextByValue(this.value[e]);else t=this.value[e];return t},s.prototype.unWireEvent=function(){t.EventHandler.remove(this.componentWrapper,"mousedown",this.wrapperClick),t.EventHandler.remove(window,"resize",this.windowResize),t.EventHandler.remove(this.inputElement,"focus",this.focusInHandler),t.EventHandler.remove(this.inputElement,"keydown",this.onKeyDown),"CheckBox"!==this.mode&&t.EventHandler.remove(this.inputElement,"input",this.onInput),t.EventHandler.remove(this.inputElement,"keyup",this.keyUp);var e=t.closest(this.inputElement,"form");e&&t.EventHandler.remove(e,"reset",this.resetValueHandler),t.EventHandler.remove(this.inputElement,"blur",this.onBlur),t.EventHandler.remove(this.componentWrapper,"mousemove",this.mouseIn),t.EventHandler.remove(this.componentWrapper,"mouseout",this.mouseOut),t.EventHandler.remove(this.overAllClear,"mousedown",this.clearAll),t.EventHandler.remove(this.inputElement,"paste",this.pasteHandler)},s.prototype.selectAllItem=function(e,i,s){var l;if(l=this.list.querySelectorAll(e?'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)':'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)'),this.value&&this.value.length&&i&&i.target&&t.closest(i.target,".e-close-hooker")&&this.allowFiltering&&(l=this.mainList.querySelectorAll(e?'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)':'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)')),this.enableGroupCheckBox&&"CheckBox"===this.mode&&!t.isNullOrUndefined(this.fields.groupBy)){var o=i?i.target:null;if(o=i&&32===i.keyCode?s:o,(o=o&&o.classList.contains("e-frame")?o.parentElement.parentElement:o)&&o.classList.contains("e-list-group-item")){var r=o.nextElementSibling;if(t.isNullOrUndefined(r))return;for(;r.classList.contains("e-list-item");){if(e){if(!r.firstElementChild.lastElementChild.classList.contains("e-check")){var n=this.value&&this.value.length?this.value.length:0;r.classList.contains("e-active")&&(n-=1),n<this.maximumSelectionLength&&this.updateListSelection(r,i)}}else r.firstElementChild.lastElementChild.classList.contains("e-check")&&this.updateListSelection(r,i);if(null==(r=r.nextElementSibling))break}if(o.classList.contains("e-list-group-item")){var a=this.list.getElementsByClassName("e-item-focus")[0];a&&a.classList.remove("e-item-focus"),e?o.classList.add("e-active"):o.classList.remove("e-active"),o.classList.add("e-item-focus")}this.textboxValueUpdate(),this.checkPlaceholderSize(),!this.changeOnBlur&&i&&this.updateValueState(i,this.value,this.tempValues)}else this.updateValue(i,l,e)}else this.updateValue(i,l,e)},s.prototype.updateValue=function(e,i,s){var l=this,o=i.length;if(i&&i.length){var r=0,n=0;for(n=this.enableGroupCheckBox?s?this.maximumSelectionLength-(this.value?this.value.length:0):i.length:s?this.maximumSelectionLength-(this.value?this.value.length:0):this.maximumSelectionLength;r<o&&r<=50&&r<n;)this.updateListSelection(i[r],e,o-r),this.enableGroupCheckBox&&this.findGroupStart(i[r]),r++;o>50&&setTimeout(function(){for(;r<o&&r<n;)l.updateListSelection(i[r],e,o-r),l.enableGroupCheckBox&&l.findGroupStart(i[r]),r++;t.isBlazor()&&l.isServerRendered||(l.updatedataValueItems(e),l.changeOnBlur||(l.updateValueState(e,l.value,l.tempValues),l.isSelectAll=l.isSelectAll?!l.isSelectAll:l.isSelectAll),l.updateHiddenElement())},0)}t.isBlazor()&&this.isServerRendered||(this.updatedataValueItems(e),this.checkPlaceholderSize(),o<=50&&(this.changeOnBlur||(this.updateValueState(e,this.value,this.tempValues),this.isSelectAll=this.isSelectAll?!this.isSelectAll:this.isSelectAll),this.updateHiddenElement()))},s.prototype.updateHiddenElement=function(){var e=this,i="",s="",l="",o=[];"CheckBox"===this.mode&&(this.value.map(function(t,r){i+='<option selected value ="'+t+'">'+r+"</option>",l=e.listData?e.getTextByValue(t):t,s+=l+e.delimiterChar+" ",o.push(l)}),this.hiddenElement.innerHTML=i,this.updateWrapperText(this.delimiterWrapper,s),this.delimiterWrapper.setAttribute("id",t.getUniqueID("delim_val")),this.inputElement.setAttribute("aria-describedby",this.delimiterWrapper.id),this.inputElement.setAttribute("aria-labelledby",this.delimiterWrapper.id),this.setProperties({text:o.toString()},!0),this.refreshInputHight(),this.refreshPlaceHolder())},s.prototype.updatedataValueItems=function(e){this.deselectHeader(),this.textboxValueUpdate(e)},s.prototype.textboxValueUpdate=function(e){var i=e&&e.target&&(t.closest(e.target,".e-selectall-parent")||t.closest(e.target,".e-close-hooker"));"Box"===this.mode||this.isPopupOpen()||"CheckBox"===this.mode&&(this.isSelectAll||i)?this.searchWrapper.classList.remove("e-zero-size"):this.updateDelimView(),"CheckBox"===this.mode?(this.updateDelimView(),i||this.isSelectAll||this.updateDelimeter(this.delimiterChar,e),this.refreshInputHight()):this.updateDelimeter(this.delimiterChar,e),this.refreshPlaceHolder()},s.prototype.setZIndex=function(){this.popupObj&&this.popupObj.setProperties({zIndex:this.zIndex})},s.prototype.updateDataSource=function(e){t.isNullOrUndefined(this.list)?this.renderPopup():this.resetList(this.dataSource),!this.value||!this.value.length||t.isBlazor()&&this.isServerRendered||(this.setProperties({value:this.value}),this.refreshSelection())},s.prototype.onLoadSelect=function(){this.setDynValue=!0,this.renderPopup()},s.prototype.selectAllItems=function(i,s){var l=this;if(t.isNullOrUndefined(this.list))this.selectAllAction=function(){if("CheckBox"===l.mode&&l.showSelectAll){var e={module:"CheckBoxSelection",enable:"CheckBox"===l.mode,value:i?"check":"uncheck"};l.notify("checkSelectAll",e)}l.selectAllItem(i,s),l.selectAllAction=null},e.prototype.render.call(this);else{if(this.selectAllAction=null,"CheckBox"===this.mode&&this.showSelectAll){var o={value:i?"check":"uncheck",enable:"CheckBox"===this.mode,module:"CheckBoxSelection"};this.notify("checkSelectAll",o)}this.selectAllItem(i,s)}},s.prototype.getPersistData=function(){return this.addOnPersist(["value"])},s.prototype.onPropertyChanged=function(i,s){(i.dataSource&&!t.isNullOrUndefined(Object.keys(i.dataSource))||i.query&&!t.isNullOrUndefined(Object.keys(i.query)))&&(this.mainList=null,this.mainData=null,this.isFirstClick=!1,this.isDynamicDataChange=!0),"multiselect"===this.getModuleName()&&(this.filterAction=!1,this.setUpdateInitial(["fields","query","dataSource"],i));for(var l=0,o=Object.keys(i);l<o.length;l++){var r=o[l];switch(r){case"query":case"dataSource":"CheckBox"===this.mode&&this.showSelectAll&&(t.isNullOrUndefined(this.popupObj)||(this.popupObj.destroy(),this.popupObj=null),this.renderPopup());break;case"htmlAttributes":this.updateHTMLAttribute();break;case"showClearButton":this.updateClearButton(i.showClearButton);break;case"text":this.updateVal(this.value,this.value,"text");break;case"value":this.updateVal(this.value,s.value,"value"),this.addValidInputClass(),!this.closePopupOnSelect&&this.isPopupOpen()&&this.refreshPopup(),this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange;break;case"width":this.setWidth(i.width),this.popupObj.setProperties({width:this.calcPopupWidth()});break;case"placeholder":this.refreshPlaceHolder();break;case"filterBarPlaceholder":this.allowFiltering&&this.notify("filterBarPlaceholder",{filterBarPlaceholder:i.filterBarPlaceholder});break;case"delimiterChar":"Box"!==this.mode&&this.updateDelimView(),this.updateData(i.delimiterChar);break;case"cssClass":this.updateOldPropCssClass(s.cssClass),this.updateCssClass();break;case"enableRtl":this.enableRTL(i.enableRtl),e.prototype.onPropertyChanged.call(this,i,s);break;case"readonly":this.updateReadonly(i.readonly),this.hidePopup();break;case"enabled":this.hidePopup(),this.enable(i.enabled);break;case"showSelectAll":this.popupObj&&(this.popupObj.destroy(),this.popupObj=null),this.renderPopup();break;case"showDropDownIcon":this.dropDownIcon();break;case"floatLabelType":this.setFloatLabelType(),this.addValidInputClass();break;case"enableSelectionOrder":break;case"selectAllText":this.notify("selectAllText",!1);break;case"popupHeight":case"headerTemplate":case"footerTemplate":this.reInitializePoup();break;case"allowFiltering":"CheckBox"===this.mode&&this.popupObj&&this.reInitializePoup(),this.updateSelectElementData(this.allowFiltering);break;default:var n=this.getPropObject(r,i,s);e.prototype.onPropertyChanged.call(this,n.newProperty,n.oldProperty)}}},s.prototype.reInitializePoup=function(){this.popupObj&&(this.popupObj.destroy(),this.popupObj=null),this.renderPopup()},s.prototype.updateVal=function(e,s,l){this.list&&(!(this.dataSource instanceof i.DataManager)||this.listData&&this.mainList&&this.mainData)?("text"===l&&(this.initialTextUpdate(),e=this.value),(t.isNullOrUndefined(this.value)||0===this.value.length)&&(this.tempValues=s),this.initialValueUpdate(),"Box"===this.mode||this.inputFocus||this.updateDelimView(),this.inputFocus||this.refreshInputHight(),this.refreshPlaceHolder(),"CheckBox"!==this.mode&&this.changeOnBlur&&this.updateValueState(null,e,s),this.checkPlaceholderSize()):this.onLoadSelect(),this.changeOnBlur||this.updateValueState(null,e,s)},s.prototype.addItem=function(t,i){e.prototype.addItem.call(this,t,i)},s.prototype.hidePopup=function(){var e=this;if(this.isPopupOpen()){var i={name:"FadeOut",duration:100,delay:100},s={popup:this.popupObj,cancel:!1,animation:i};this.trigger("close",s,function(i){i.cancel||(e.fields.groupBy&&"CheckBox"!==e.mode&&e.fixedHeaderElement&&(t.remove(e.fixedHeaderElement),e.fixedHeaderElement=null),e.beforePopupOpen=!1,e.overAllWrapper.classList.remove("e-icon-anim"),e.popupObj.hide(new t.Animation(i.animation)),t.attributes(e.inputElement,{"aria-expanded":"false"}),e.allowFiltering&&e.notify("inputFocus",{module:"CheckBoxSelection",enable:"CheckBox"===e.mode,value:"clear"}),e.popupObj.hide(),t.removeClass([document.body,e.popupObj.element],"e-popup-full-page"),t.EventHandler.remove(e.list,"keydown",e.onKeyDown))})}},s.prototype.showPopup=function(){var i=this;if(this.enabled){var s={cancel:!1};this.trigger("beforeOpen",s,function(s){if(!s.cancel){if(t.isBlazor()&&i.isServerRendered&&i.itemTemplate&&(i.DropDownBaseupdateBlazorTemplates(!0,!1,!1,!1,!1,!1,!1,!1),"CheckBox"!==i.mode&&i.list&&i.refreshSelection()),!i.ulElement)return i.beforePopupOpen=!0,e.prototype.render.call(i),void("CheckBox"===i.mode&&t.Browser.isDevice&&i.allowFiltering&&i.notify("popupFullScreen",{module:"CheckBoxSelection",enable:"CheckBox"===i.mode}));"CheckBox"===i.mode&&t.Browser.isDevice&&i.allowFiltering&&i.notify("popupFullScreen",{module:"CheckBoxSelection",enable:"CheckBox"===i.mode});var l=i.ulElement.querySelectorAll("li.e-list-item").length,o=i.ulElement.querySelectorAll("li."+k.li+"."+ne).length;if(l>0&&l===o&&o===i.mainData.length)return void(i.beforePopupOpen=!1);i.onPopupShown()}})}},s.prototype.selectAll=function(e){this.isSelectAll=!0,this.selectAllItems(e)},s.prototype.getModuleName=function(){return"multiselect"},s.prototype.clear=function(){var e=this;this.selectAll(!1),this.value&&this.value.length?setTimeout(function(){e.setProperties({value:null},!0)},0):this.setProperties({value:null},!0)},s.prototype.render=function(){this.setDynValue=this.initStatus=!1,this.isSelectAll=!1,this.searchWrapper=this.createElement("span",{className:"e-searcher "+("Box"===this.mode?"e-multiselect-box":"")}),this.viewWrapper=this.createElement("span",{className:"e-delim-view e-delim-values",styles:"display:none;"}),this.overAllClear=this.createElement("span",{className:"e-chips-close e-close-hooker",styles:"display:none;"}),this.componentWrapper=this.createElement("div",{className:"e-multi-select-wrapper"}),this.overAllWrapper=this.createElement("div",{className:"e-multiselect e-input-group e-control-wrapper"}),"CheckBox"===this.mode&&t.addClass([this.overAllWrapper],"e-checkbox"),t.Browser.isDevice&&this.componentWrapper.classList.add("e-mob-wrapper"),this.setWidth(this.width),this.overAllWrapper.appendChild(this.componentWrapper),this.popupWrapper=this.createElement("div",{id:this.element.id+"_popup",className:"e-ddl e-popup e-multi-select-list-wrapper"}),"Delimiter"===this.mode||"CheckBox"===this.mode?(this.delimiterWrapper=this.createElement("span",{className:"e-delim-values",styles:"display:none"}),this.componentWrapper.appendChild(this.delimiterWrapper)):(this.chipCollectionWrapper=this.createElement("span",{className:"e-chips-collection",styles:"display:none"}),"Default"===this.mode?this.chipCollectionWrapper.setAttribute("id",t.getUniqueID("chip_default")):"Box"===this.mode&&this.chipCollectionWrapper.setAttribute("id",t.getUniqueID("chip_box")),this.componentWrapper.appendChild(this.chipCollectionWrapper)),"Box"!==this.mode&&this.componentWrapper.appendChild(this.viewWrapper),this.componentWrapper.appendChild(this.searchWrapper),this.showClearButton&&!t.Browser.isDevice?this.componentWrapper.appendChild(this.overAllClear):this.componentWrapper.classList.add("e-close-icon-hide"),this.dropDownIcon(),this.inputElement=this.createElement("input",{className:"e-dropdownbase",attrs:{spellcheck:"false",type:"text",autocomplete:"off",tabindex:"0"}}),"Default"!==this.mode&&"Box"!==this.mode||(this.inputElement.setAttribute("aria-describedby",this.chipCollectionWrapper.id),this.inputElement.setAttribute("aria-labelledby",this.chipCollectionWrapper.id)),this.element.tagName!==this.getNgDirective()&&(this.element.style.display="none"),this.element.tagName===this.getNgDirective()?(this.element.appendChild(this.overAllWrapper),this.searchWrapper.appendChild(this.inputElement)):(this.element.parentElement.insertBefore(this.overAllWrapper,this.element),this.searchWrapper.appendChild(this.inputElement),this.searchWrapper.appendChild(this.element),this.element.removeAttribute("tabindex")),"Never"!==this.floatLabelType?d(this.overAllWrapper,this.searchWrapper,this.element,this.inputElement,this.value,this.floatLabelType,this.placeholder):"Never"===this.floatLabelType&&this.refreshPlaceHolder(),this.addValidInputClass(),this.element.style.opacity="";var e=this.element.getAttribute("id")?this.element.getAttribute("id"):t.getUniqueID("ej2_dropdownlist");this.element.id=e,this.hiddenElement=this.createElement("select",{attrs:{"aria-hidden":"true",class:"e-multi-hidden",tabindex:"-1",multiple:""}}),this.componentWrapper.appendChild(this.hiddenElement),this.validationAttribute(this.element,this.hiddenElement),"CheckBox"!==this.mode&&this.hideOverAllClear(),this.wireEvent(),this.enable(this.enabled),this.enableRTL(this.enableRtl),this.checkInitialValue(),this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),this.renderComplete()},s.prototype.checkInitialValue=function(){var e=this,s=this.dataSource instanceof Array?this.dataSource.length>0:!t.isNullOrUndefined(this.dataSource);if((!this.value||!this.value.length)&&t.isNullOrUndefined(this.text)&&!s&&"SELECT"===this.element.tagName&&this.element.options.length>0){for(var l=this.element.options,o=[],r="",n=0,a=l.length;n<a;n++){var h=l[n];t.isNullOrUndefined(h.getAttribute("selected"))||(h.getAttribute("value")?o.push(h.getAttribute("value")):r+=h.text+this.delimiterChar)}o.length>0?this.setProperties({value:o},!0):""!==r&&this.setProperties({text:r},!0),(o.length>0||""!==r)&&(this.refreshInputHight(),this.refreshPlaceHolder())}(this.value&&this.value.length||!t.isNullOrUndefined(this.text))&&this.renderPopup(),t.isNullOrUndefined(this.text)||!t.isNullOrUndefined(this.value)&&0!==this.value.length||this.initialTextUpdate(),this.value&&this.value.length?(this.dataSource instanceof i.DataManager?this.setInitialValue=function(){e.initStatus=!1,e.initialValueUpdate(),e.initialUpdate(),e.setInitialValue=null,e.initStatus=!0}:(this.initialValueUpdate(),this.initialUpdate()),this.updateTempValue()):this.initialUpdate(),this.initStatus=!0,this.checkAutoFocus(),t.isNullOrUndefined(this.text)||this.element.setAttribute("data-initial-value",this.text)},s.prototype.checkAutoFocus=function(){this.element.hasAttribute("autofocus")&&this.inputElement.focus()},s.prototype.setFloatLabelType=function(){f(this.overAllWrapper,this.componentWrapper,this.searchWrapper,this.inputElement,this.value,this.floatLabelType,this.placeholder),"Never"!==this.floatLabelType&&d(this.overAllWrapper,this.searchWrapper,this.element,this.inputElement,this.value,this.floatLabelType,this.placeholder)},s.prototype.addValidInputClass=function(){!t.isNullOrUndefined(this.value)&&this.value.length||"Always"===this.floatLabelType?t.addClass([this.overAllWrapper],"e-valid-input"):t.removeClass([this.overAllWrapper],"e-valid-input")},s.prototype.dropDownIcon=function(){this.showDropDownIcon?(this.dropIcon=this.createElement("span",{className:"e-input-group-icon e-ddl-icon"}),this.componentWrapper.appendChild(this.dropIcon),t.addClass([this.componentWrapper],["e-down-icon"])):t.isNullOrUndefined(this.dropIcon)||(this.dropIcon.parentElement.removeChild(this.dropIcon),t.removeClass([this.componentWrapper],["e-down-icon"]))},s.prototype.initialUpdate=function(){"Box"===this.mode||this.setDynValue&&"Default"===this.mode&&this.inputFocus||this.updateDelimView(),this.updateCssClass(),this.updateHTMLAttribute(),this.updateReadonly(this.readonly),this.refreshInputHight(),this.checkPlaceholderSize()},s.prototype.destroy=function(){this.isReact&&this.clearTemplate(),this.popupObj&&this.popupObj.hide(),this.notify("destroy",{}),this.unwireListEvents(),this.unWireEvent(),this.list=null,this.popupObj=null,this.mainList=null,this.mainData=null,this.filterParent=null,this.ulElement=null,e.prototype.destroy.call(this);for(var i=["readonly","aria-disabled","aria-placeholder","placeholder"],s=i.length;s>0;)this.inputElement.removeAttribute(i[s-1]),s--;this.element.removeAttribute("data-initial-value"),this.element.style.display="block",this.overAllWrapper.parentElement&&(this.overAllWrapper.parentElement.tagName===this.getNgDirective()?t.remove(this.overAllWrapper):(this.overAllWrapper.parentElement.insertBefore(this.element,this.overAllWrapper),t.remove(this.overAllWrapper)))},oe([t.Complex({text:null,value:null,iconCss:null,groupBy:null},A)],s.prototype,"fields",void 0),oe([t.Property(!1)],s.prototype,"enablePersistence",void 0),oe([t.Property(null)],s.prototype,"groupTemplate",void 0),oe([t.Property("No records found")],s.prototype,"noRecordsTemplate",void 0),oe([t.Property("Request failed")],s.prototype,"actionFailureTemplate",void 0),oe([t.Property("None")],s.prototype,"sortOrder",void 0),oe([t.Property(!0)],s.prototype,"enabled",void 0),oe([t.Property(!1)],s.prototype,"enableHtmlSanitizer",void 0),oe([t.Property([])],s.prototype,"dataSource",void 0),oe([t.Property(null)],s.prototype,"query",void 0),oe([t.Property("StartsWith")],s.prototype,"filterType",void 0),oe([t.Property(1e3)],s.prototype,"zIndex",void 0),oe([t.Property(!1)],s.prototype,"ignoreAccent",void 0),oe([t.Property()],s.prototype,"locale",void 0),oe([t.Property(!1)],s.prototype,"enableGroupCheckBox",void 0),oe([t.Property(null)],s.prototype,"cssClass",void 0),oe([t.Property("100%")],s.prototype,"width",void 0),oe([t.Property("300px")],s.prototype,"popupHeight",void 0),oe([t.Property("100%")],s.prototype,"popupWidth",void 0),oe([t.Property(null)],s.prototype,"placeholder",void 0),oe([t.Property(null)],s.prototype,"filterBarPlaceholder",void 0),oe([t.Property({})],s.prototype,"htmlAttributes",void 0),oe([t.Property(null)],s.prototype,"valueTemplate",void 0),oe([t.Property(null)],s.prototype,"headerTemplate",void 0),oe([t.Property(null)],s.prototype,"footerTemplate",void 0),oe([t.Property(null)],s.prototype,"itemTemplate",void 0),oe([t.Property(null)],s.prototype,"allowFiltering",void 0),oe([t.Property(!0)],s.prototype,"changeOnBlur",void 0),oe([t.Property(!1)],s.prototype,"allowCustomValue",void 0),oe([t.Property(!0)],s.prototype,"showClearButton",void 0),oe([t.Property(1e3)],s.prototype,"maximumSelectionLength",void 0),oe([t.Property(!1)],s.prototype,"readonly",void 0),oe([t.Property(null)],s.prototype,"text",void 0),oe([t.Property(null)],s.prototype,"value",void 0),oe([t.Property(!0)],s.prototype,"hideSelectedItem",void 0),oe([t.Property(!0)],s.prototype,"closePopupOnSelect",void 0),oe([t.Property("Default")],s.prototype,"mode",void 0),oe([t.Property(",")],s.prototype,"delimiterChar",void 0),oe([t.Property(!0)],s.prototype,"ignoreCase",void 0),oe([t.Property(!1)],s.prototype,"showDropDownIcon",void 0),oe([t.Property("Never")],s.prototype,"floatLabelType",void 0),oe([t.Property(!1)],s.prototype,"showSelectAll",void 0),oe([t.Property("Select All")],s.prototype,"selectAllText",void 0),oe([t.Property("Unselect All")],s.prototype,"unSelectAllText",void 0),oe([t.Property(!0)],s.prototype,"enableSelectionOrder",void 0),oe([t.Property(!0)],s.prototype,"openOnClick",void 0),oe([t.Event()],s.prototype,"change",void 0),oe([t.Event()],s.prototype,"removing",void 0),oe([t.Event()],s.prototype,"removed",void 0),oe([t.Event()],s.prototype,"selectedAll",void 0),oe([t.Event()],s.prototype,"beforeOpen",void 0),oe([t.Event()],s.prototype,"open",void 0),oe([t.Event()],s.prototype,"close",void 0),oe([t.Event()],s.prototype,"blur",void 0),oe([t.Event()],s.prototype,"focus",void 0),oe([t.Event()],s.prototype,"chipSelection",void 0),oe([t.Event()],s.prototype,"filtering",void 0),oe([t.Event()],s.prototype,"tagging",void 0),oe([t.Event()],s.prototype,"customValueSelection",void 0),s=oe([t.NotifyPropertyChanges],s)}(B),pe=function(){function e(e){this.activeLi=[],this.activeEle=[],this.parent=e,this.removeEventListener(),this.addEventListener()}return e.prototype.getModuleName=function(){return"CheckBoxSelection"},e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("updatelist",this.listSelection,this),this.parent.on("listoption",this.listOption,this),this.parent.on("selectAll",this.setSelectAll,this),this.parent.on("checkSelectAll",this.checkSelectAll,this),this.parent.on("searchBox",this.setSearchBox,this),this.parent.on("blur",this.onBlur,this),this.parent.on("targetElement",this.targetElement,this),this.parent.on("deviceSearchBox",this.setDeviceSearchBox,this),this.parent.on("inputFocus",this.getFocus,this),this.parent.on("reOrder",this.setReorder,this),this.parent.on("activeList",this.getActiveList,this),this.parent.on("selectAllText",this.setLocale,this),this.parent.on("filterBarPlaceholder",this.setPlaceholder,this),t.EventHandler.add(document,"mousedown",this.onDocumentClick,this),this.parent.on("addItem",this.checboxCreate,this),this.parent.on("popupFullScreen",this.setPopupFullScreen,this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("updatelist",this.listSelection),this.parent.off("listoption",this.listOption),this.parent.off("selectAll",this.setSelectAll),this.parent.off("checkSelectAll",this.checkSelectAll),this.parent.off("searchBox",this.setSearchBox),this.parent.off("blur",this.onBlur),this.parent.off("targetElement",this.targetElement),this.parent.off("deviceSearchBox",this.setDeviceSearchBox),this.parent.off("inputFocus",this.getFocus),this.parent.off("reOrder",this.setReorder),this.parent.off("activeList",this.getActiveList),this.parent.off("selectAllText",this.setLocale),this.parent.off("filterBarPlaceholder",this.setPlaceholder),this.parent.off("addItem",this.checboxCreate),this.parent.off("popupFullScreen",this.setPopupFullScreen))},e.prototype.listOption=function(e){var i=this;if(t.isNullOrUndefined(this.parent.listCurrentOptions.itemCreated))this.parent.listCurrentOptions.itemCreated=function(e){i.checboxCreate(e)};else{var s=this.parent.listCurrentOptions.itemCreated;this.parent.listCurrentOptions.itemCreated=function(e){i.checboxCreate(e),s.apply(i,[e])}}},e.prototype.setPlaceholder=function(e){o.Input.setPlaceholder(e.filterBarPlaceholder,this.filterInput)},e.prototype.checboxCreate=function(e){var i;if(i=t.isNullOrUndefined(e.item)?e:e.item,this.parent.enableGroupCheckBox||"e-list-group-item "!==i.className&&"e-list-group-item"!==i.className){var s=r.createCheckBox(this.parent.createElement,!0),l=t.select("div.e-icons",i);return i.insertBefore(s,i.childNodes[t.isNullOrUndefined(l)?0:1]),t.select(".e-frame",s),this.parent.enableGroupCheckBox&&this.parent.popupWrapper.classList.add("e-multiselect-group"),i}return i},e.prototype.setSelectAll=function(){this.parent.showSelectAll?(t.isNullOrUndefined(this.checkAllParent)&&(this.checkAllParent=this.parent.createElement("div",{className:"e-selectall-parent"}),this.selectAllSpan=this.parent.createElement("span",{className:"e-all-text"}),this.selectAllSpan.textContent="",this.checkAllParent.appendChild(this.selectAllSpan),this.setLocale(),this.checboxCreate(this.checkAllParent),this.parent.headerTemplate&&(t.isNullOrUndefined(this.parent.filterParent)?t.append([this.checkAllParent],this.parent.popupWrapper):t.append([this.checkAllParent],this.parent.filterParent)),this.parent.headerTemplate||(t.isNullOrUndefined(this.parent.filterParent)?t.prepend([this.checkAllParent],this.parent.popupWrapper):this.parent.filterParent.parentNode.insertBefore(this.checkAllParent,this.parent.filterParent.nextSibling)),t.EventHandler.add(this.checkAllParent,"mousedown",this.clickHandler,this)),this.parent.list.classList.contains("e-nodata")||this.parent.listData&&this.parent.listData.length<=1&&(!this.parent.isDynamicDataChange||!t.isBlazor())||this.parent.isDynamicDataChange&&!t.isNullOrUndefined(this.parent.value)&&this.parent.value.length<=1&&t.isBlazor()?this.checkAllParent.style.display="none":this.checkAllParent.style.display="block",this.parent.selectAllHeight=this.checkAllParent.getBoundingClientRect().height):t.isNullOrUndefined(this.checkAllParent)||(this.checkAllParent.parentElement.removeChild(this.checkAllParent),this.checkAllParent=null)},e.prototype.destroy=function(){this.removeEventListener(),t.EventHandler.remove(document,"mousedown",this.onDocumentClick)},e.prototype.listSelection=function(e){var i,s=t.isBlazor()&&e.module&&"listbox"===e.module;if(t.isNullOrUndefined(e.e)){var l=e.li.querySelector(".e-checkbox-wrapper");i=l?s?l.querySelector(".e-frame"):l.childNodes[1]:e.li.lastElementChild.childNodes[1]}else{var o=e.li.querySelector(".e-checkbox-wrapper .e-frame");i=t.isNullOrUndefined(e.e.target)?s?o:e.li.querySelector(".e-checkbox-wrapper").childNodes[1]:e.e.target.classList.contains("e-frame")&&(!this.parent.showSelectAll||this.checkAllParent&&!this.checkAllParent.contains(e.e.target))?e.e.target:s?o:e.li.querySelector(".e-checkbox-wrapper").childNodes[1]}if((this.parent.itemTemplate||this.parent.enableGroupCheckBox)&&(i=e.li.firstElementChild.childNodes[1]),t.isNullOrUndefined(i)||(this.checkWrapper=t.closest(i,".e-checkbox-wrapper")),!t.isNullOrUndefined(this.checkWrapper)){var r=t.select(".e-frame",this.checkWrapper);this.validateCheckNode(this.checkWrapper,r.classList.contains("e-check"),e.li,e.e,!1)}},e.prototype.validateCheckNode=function(e,t,i,s,l){this.changeState(e,t?"uncheck":"check",s,!0,l)},e.prototype.clickHandler=function(e){var i;i=e.currentTarget.classList.contains(this.checkAllParent.className)?e.currentTarget.firstElementChild.lastElementChild:e.currentTarget,this.checkWrapper=t.closest(i,".e-checkbox-wrapper");if(!t.isNullOrUndefined(this.checkWrapper)){var s=t.select(".e-frame",this.checkWrapper);this.validateCheckNode(this.checkWrapper,s.classList.contains("e-check"),null,e,!0)}e.preventDefault()},e.prototype.changeState=function(e,i,s,l,o){var r,n=e.getElementsByClassName("e-frame")[0];"check"!==i||n.classList.contains("e-check")?"uncheck"===i&&(n.classList.contains("e-check")||n.classList.contains("e-stop"))?(t.removeClass([n],["e-check","e-stop"]),r="false",o&&(this.parent.selectAllItems(!1,s),this.setLocale())):"indeterminate"!==i||n.classList.contains("e-stop")||(t.removeClass([n],["e-check"]),n.classList.add("e-stop"),r="false",o&&(this.parent.selectAllItems(!1,s),this.setLocale())):(n.classList.remove("e-stop"),n.classList.add("e-check"),r="true",o&&(this.parent.selectAllItems(!0,s),this.setLocale(!0))),r="check"===i?"true":"uncheck"===i?"false":r,t.isNullOrUndefined(r)||e.setAttribute("aria-checked",r)},e.prototype.setSearchBox=function(e){if(t.isNullOrUndefined(this.parent.filterParent)){this.parent.filterParent=this.parent.createElement("span",{className:"e-filter-parent"}),this.filterInput=this.parent.createElement("input",{attrs:{type:"text"},className:"e-input-filter"}),this.parent.element.parentNode.insertBefore(this.filterInput,this.parent.element);var i=!1;return t.Browser.isDevice&&(i=!0,this.parent.mobFilter=!1),this.filterInputObj=o.Input.createInput({element:this.filterInput,buttons:i?["e-input-group-icon e-back-icon e-icons","e-input-group-icon e-clear-icon e-icons"]:["e-input-group-icon e-clear-icon e-icons"],properties:{placeholder:this.parent.filterBarPlaceholder}},this.parent.createElement),t.isNullOrUndefined(this.parent.cssClass)||(-1!==this.parent.cssClass.split(" ").indexOf("e-outline")?t.addClass([this.filterInputObj.container],"e-outline"):-1!==this.parent.cssClass.split(" ").indexOf("e-filled")&&t.addClass([this.filterInputObj.container],"e-filled")),t.append([this.filterInputObj.container],this.parent.filterParent),t.prepend([this.parent.filterParent],e.popupElement),t.attributes(this.filterInput,{"aria-disabled":"false","aria-owns":this.parent.element.id+"_options",role:"listbox","aria-activedescendant":null,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false"}),this.clearIconElement=this.filterInput.parentElement.querySelector(".e-clear-icon"),!t.Browser.isDevice&&this.clearIconElement&&(t.EventHandler.add(this.clearIconElement,"mousedown",this.clearText,this),this.clearIconElement.style.visibility="hidden"),t.EventHandler.add(this.filterInput,"input",this.parent.onInput,this.parent),t.EventHandler.add(this.filterInput,"keyup",this.parent.keyUp,this.parent),t.EventHandler.add(this.filterInput,"keydown",this.parent.onKeyDown,this.parent),t.EventHandler.add(this.filterInput,"blur",this.onBlur,this),t.EventHandler.add(this.filterInput,"paste",this.parent.pasteHandler,this.parent),this.parent.searchBoxHeight=this.filterInputObj.container.parentElement.getBoundingClientRect().height,this.filterInputObj}},e.prototype.clickOnBackIcon=function(e){this.parent.hidePopup(),t.removeClass([document.body,this.parent.popupObj.element],"e-popup-full-page"),this.parent.inputElement.focus()},e.prototype.clearText=function(e){this.parent.targetInputElement.value="",this.parent.allowFiltering&&""===this.parent.targetInputElement.value&&this.parent.search(null),this.parent.refreshPopup(),this.parent.refreshListItems(null),this.clearIconElement.style.visibility="hidden",this.filterInput.focus(),this.setReorder(e),e.preventDefault()},e.prototype.setDeviceSearchBox=function(){this.parent.popupObj.element.classList.add("e-ddl-device"),this.parent.popupObj.element.classList.add("e-ddl-device-filter"),this.parent.popupObj.position={X:0,Y:0},this.parent.popupObj.dataBind(),this.setSearchBoxPosition(),this.backIconElement=this.filterInputObj.container.querySelector(".e-back-icon"),this.clearIconElement=this.filterInputObj.container.querySelector(".e-clear-icon"),this.clearIconElement.style.visibility="hidden",t.EventHandler.add(this.backIconElement,"click",this.clickOnBackIcon,this),t.EventHandler.add(this.clearIconElement,"click",this.clearText,this)},e.prototype.setSearchBoxPosition=function(){var e=this.filterInput.parentElement.getBoundingClientRect().height,i=0;this.checkAllParent&&(i=this.checkAllParent.getBoundingClientRect().height),this.parent.popupObj.element.style.maxHeight="100%",this.parent.popupObj.element.style.width="100%",this.parent.list.style.maxHeight=window.innerHeight-e-i+"px",this.parent.list.style.height=window.innerHeight-e-i+"px";var s=this.filterInput.parentElement.querySelector(".e-clear-icon");t.detach(this.filterInput),s.parentElement.insertBefore(this.filterInput,s)},e.prototype.setPopupFullScreen=function(){t.attributes(this.parent.popupObj.element,{style:"left:0px;right:0px;top:0px;bottom:0px;"}),t.addClass([document.body,this.parent.popupObj.element],"e-popup-full-page"),this.parent.popupObj.element.style.maxHeight="100%",this.parent.popupObj.element.style.width="100%"},e.prototype.targetElement=function(){return t.isNullOrUndefined(this.clearIconElement)||(this.parent.targetInputElement=this.filterInput,this.clearIconElement.style.visibility=""===this.parent.targetInputElement.value?"hidden":"visible"),this.parent.targetInputElement.value},e.prototype.onBlur=function(e){if(!this.parent.element.classList.contains("e-listbox")){var i=void 0;if(this.parent.keyAction)return;if(t.Browser.isIE&&(i=!t.isNullOrUndefined(e)&&e.target),t.Browser.isIE||(i=!t.isNullOrUndefined(e)&&e.relatedTarget),this.parent.popupObj&&document.body.contains(this.parent.popupObj.element)&&this.parent.popupObj.element.contains(i)&&!t.Browser.isIE&&this.filterInput)return void this.filterInput.focus();if(this.parent.scrollFocusStatus&&this.filterInput)return e.preventDefault(),this.filterInput.focus(),void(this.parent.scrollFocusStatus=!1);this.parent.popupObj&&document.body.contains(this.parent.popupObj.element)&&!this.parent.popupObj.element.classList.contains("e-popup-close")&&(this.parent.inputFocus=!1,this.parent.updateValueState(e,this.parent.value,this.parent.tempValues),this.parent.dispatchEvent(this.parent.hiddenElement,"change")),this.parent.popupObj&&document.body.contains(this.parent.popupObj.element)&&!this.parent.popupObj.element.classList.contains("e-popup-close")&&(this.parent.inputFocus=!1,this.parent.overAllWrapper.classList.remove("e-input-focus"),this.parent.trigger("blur"),this.parent.focused=!0),this.parent.popupObj&&document.body.contains(this.parent.popupObj.element)&&!this.parent.popupObj.element.classList.contains("e-popup-close")&&!t.Browser.isDevice&&this.parent.hidePopup()}},e.prototype.onDocumentClick=function(e){if("listbox"!==this.parent.getLocaleName()){var i=e.target;!t.isNullOrUndefined(this.parent.popupObj)&&t.closest(i,'[id="'+this.parent.popupObj.element.id+'"]')&&(this.filterInput&&""!==this.filterInput.value||e.preventDefault()),!t.isNullOrUndefined(this.parent.popupObj)&&t.closest(i,'[id="'+this.parent.popupObj.element.id+'"]')||this.parent.overAllWrapper.contains(e.target)?this.parent.scrollFocusStatus=(t.Browser.isIE||"edge"===t.Browser.info.name)&&document.activeElement===this.filterInput:(this.parent.overAllWrapper.classList.contains(k.focus)||this.parent.isPopupOpen())&&(this.parent.inputFocus=!1,this.parent.scrollFocusStatus=!1,this.parent.hidePopup(),this.parent.onBlur(e,!0),this.parent.focused=!0),this.parent.overAllWrapper.contains(e.target)||!this.parent.overAllWrapper.classList.contains("e-input-focus")||this.parent.isPopupOpen()||(t.Browser.isIE?this.parent.onBlur():this.parent.onBlur(e)),this.filterInput===i&&this.filterInput.focus()}},e.prototype.getFocus=function(e){if(this.parent.overAllWrapper.classList.remove("e-input-focus"),this.parent.keyAction&&"clear"!==e.value&&"focus"!==e.value)return void(this.parent.keyAction=!1);"focus"===e.value&&(this.filterInput.focus(),this.parent.removeFocus(),t.EventHandler.remove(this.parent.list,"keydown",this.parent.onKeyDown)),"clear"===e.value&&(this.filterInput.value="",this.clearIconElement.style.visibility="hidden")},e.prototype.checkSelectAll=function(e){"check"===e.value&&"true"!==this.checkAllParent.getAttribute("aria-checked")&&(this.changeState(this.checkAllParent,e.value,null,null,!1),this.setLocale(!0)),"uncheck"===e.value&&(this.changeState(this.checkAllParent,e.value,null,null,!1),this.setLocale()),"indeterminate"===e.value&&(this.changeState(this.checkAllParent,e.value,null,null,!1),this.setLocale())},e.prototype.setLocale=function(e){if("Select All"!==this.parent.selectAllText||"Unselect All"!==this.parent.unSelectAllText){var i=e?this.parent.unSelectAllText:this.parent.selectAllText;this.selectAllSpan.textContent="";for(var s=t.compile(i),l=e?"unSelectAllText":"selectAllText",o=0,r=s({},this.parent,l,null,!this.parent.isStringTemplate);o<r.length;o++){var n=r[o];this.selectAllSpan.textContent=n.textContent}}else{var a={selectAllText:"Select All",unSelectAllText:"Unselect All"},h=new t.L10n(this.parent.getLocaleName(),{},this.parent.locale);""===h.getConstant("selectAllText")&&(h=new t.L10n("dropdowns",a,this.parent.locale)),this.selectAllSpan.textContent=e?h.getConstant("unSelectAllText"):h.getConstant("selectAllText")}},e.prototype.getActiveList=function(e){e.li.classList.contains("e-active")?this.activeLi.push(e.li.cloneNode(!0)):this.activeLi.splice(e.index,1)},e.prototype.setReorder=function(e){if(this.parent.enableSelectionOrder&&!t.isNullOrUndefined(this.parent.value)){var i=this.parent.ulElement.querySelectorAll("li.e-active").length,s=void 0,l=this.parent.createElement("ul",{className:"e-list-parent e-ul e-reorder"});i>0&&(t.append(this.parent.ulElement.querySelectorAll("li.e-active"),l),s=this.parent.ulElement.querySelectorAll("li.e-active"),t.addClass(s,"e-reorder-hide"),t.prepend([l],this.parent.list)),this.parent.focusAtFirstListItem()}},e}(),ue=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),ce=function(e,t,i,s){var l,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var n=e.length-1;n>=0;n--)(l=e[n])&&(r=(o<3?l(r):o>3?l(t,i,r):l(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},de=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ue(i,e),ce([t.Property("Multiple")],i.prototype,"mode",void 0),ce([t.Property(!1)],i.prototype,"showCheckbox",void 0),ce([t.Property(!1)],i.prototype,"showSelectAll",void 0),ce([t.Property("Left")],i.prototype,"checkboxPosition",void 0),i}(t.ChildProperty),me=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ue(i,e),ce([t.Property([])],i.prototype,"items",void 0),ce([t.Property("Right")],i.prototype,"position",void 0),i}(t.ChildProperty),fe=function(e){function n(t,i){var s=e.call(this,t,i)||this;return s.isValidKey=!1,s.isDataSourceUpdate=!1,s.keyDownStatus=!1,s}ue(n,e),a=n,n.prototype.addItem=function(t,i){e.prototype.addItem.call(this,t,i)},n.prototype.render=function(){this.inputString="",this.initLoad=!0,this.isCustomFiltering=!1,this.initialSelectedOptions=this.value,t.isBlazor()&&this.isServerRendered?(this.list=this.element.parentElement,this.liCollections=this.list.querySelectorAll("."+s.cssClass.li),this.mainList=this.ulElement=this.list.querySelector("ul"),this.setSelection(this.value),this.allowFiltering&&this.setFiltering(),this.initToolbarAndStyles(),this.updateSelectionSettings(),this.wireEvents(),this.initDraggable(),this.initLoad=!1):e.prototype.render.call(this),this.renderComplete()},n.prototype.updateBlazorListData=function(e,i,l){i&&(this.liCollections=this.list.querySelectorAll("."+s.cssClass.li),this.mainList=this.ulElement=this.list.querySelector("ul"),this.allowDragAndDrop&&!this.ulElement.classList.contains("e-sortable")&&this.initDraggable(),l&&this.selectItems(this.listData,!1)),t.isNullOrUndefined(e)||(this.sortedData=this.jsonData=this.listData=e)},n.prototype.initWrapper=function(){var e=this.createElement("select",{className:"e-hidden-select",attrs:{multiple:""}});this.list.classList.add("e-listbox-wrapper"),this.itemTemplate&&this.list.classList.add("e-list-template"),this.list.classList.add("e-wrapper"),this.list.classList.add("e-lib"),"EJS-LISTBOX"===this.element.tagName?(this.element.setAttribute("tabindex","0"),this.initLoad&&this.element.appendChild(this.list)):(this.initLoad&&this.element.parentElement.insertBefore(this.list,this.element),this.list.insertBefore(this.element,this.list.firstChild),this.element.style.display="none"),this.list.insertBefore(e,this.list.firstChild),this.list.getElementsByClassName("e-list-item")[0]&&this.list.getElementsByClassName("e-list-item")[0].classList.remove(k.focus),this.itemTemplate&&this.renderReactTemplates(),t.removeClass([this.list],[k.content,k.root]),this.validationAttribute(this.element,e),this.list.setAttribute("role","listbox"),t.attributes(this.list,{role:"listbox","aria-multiselectable":"Multiple"===this.selectionSettings.mode?"true":"false"}),this.updateSelectionSettings()},n.prototype.updateSelectionSettings=function(){if(this.selectionSettings.showCheckbox&&this.selectionSettings.showSelectAll&&this.liCollections.length){var e=new t.L10n(this.getModuleName(),{selectAllText:"Select All",unSelectAllText:"Unselect All"},this.locale);this.showSelectAll=!0,this.selectAllText=e.getConstant("selectAllText"),this.unSelectAllText=e.getConstant("unSelectAllText"),this.popupWrapper=this.list,this.checkBoxSelectionModule.checkAllParent=null,this.notify("selectAll",{})}},n.prototype.initDraggable=function(){var e=this;this.ulElement&&(this.ulElement.id=this.element.id+"_parent"),this.allowDragAndDrop&&new s.Sortable(this.ulElement,{scope:this.scope,itemClass:"e-list-item",dragStart:this.triggerDragStart.bind(this),drag:this.triggerDrag.bind(this),beforeDrop:this.beforeDragEnd.bind(this),drop:this.dragEnd.bind(this),placeHolder:function(){return e.createElement("span",{className:"e-placeholder"})},helper:function(t){var i=e.list.cloneNode(),s=t.sender.cloneNode(!0);i.appendChild(s);var o=e.getItems()[0];return i.style.width=o.offsetWidth+"px",i.style.height=o.offsetHeight+"px",(e.value&&e.value.length)>1&&e.isSelected(s)&&s.appendChild(e.createElement("span",{className:"e-list-badge",innerHTML:e.value.length+""})),i.style.zIndex=l.getZindexPartial(e.element)+"",i}})},n.prototype.updateActionCompleteData=function(e,t){this.jsonData.push(t)},n.prototype.initToolbar=function(){var e=this.toolbarSettings.position,i=this.element.getAttribute("data-value");if(this.toolbarSettings.items.length){var s=this.createElement("div",{className:"e-listbox-tool",attrs:{role:"toolbar"}}),l=this.createElement("div",{className:"e-listboxtool-wrapper e-lib e-"+e.toLowerCase()});this.list.parentElement.insertBefore(l,this.list),l.appendChild("Right"===e?this.list:s),l.appendChild("Right"===e?s:this.list),this.createButtons(s),this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.scope?document.querySelector(this.scope).setAttribute("data-value",this.element.id):this.updateToolBarState()}var o=this.element.getAttribute("data-value");i&&o&&i!==o?(this.tBListBox=t.getComponent(document.getElementById(i),this.getModuleName()),this.tBListBox.updateToolBarState()):o&&(this.tBListBox=t.getComponent(document.getElementById(o),this.getModuleName()),this.tBListBox.updateToolBarState())},n.prototype.createButtons=function(e){var i,s,l,o=this,n=new t.L10n(this.getModuleName(),{moveUp:"Move Up",moveDown:"Move Down",moveTo:"Move To",moveFrom:"Move From",moveAllTo:"Move All To",moveAllFrom:"Move All From"},this.locale);this.toolbarSettings.items.forEach(function(t){l=n.getConstant(t),s=o.createElement("button",{attrs:{type:"button","data-value":t,title:l,"aria-label":l}}),e.appendChild(s),(i=new r.Button({iconCss:"e-icons e-"+t.toLowerCase()},s)).createElement=o.createElement})},n.prototype.validationAttribute=function(t,i){e.prototype.validationAttribute.call(this,t,i),i.required=t.required,t.required=!1},n.prototype.setHeight=function(){(this.toolbarSettings.items.length?this.list.parentElement:this.list).style.height=t.formatUnit(this.height),this.allowFiltering&&this.height.toString().indexOf("%")<0?t.addClass([this.list],"e-filter-list"):t.removeClass([this.list],"e-filter-list")},n.prototype.setCssClass=function(){var e=this.toolbarSettings.items.length?this.list.parentElement:this.list;this.cssClass&&t.addClass([e],this.cssClass.split(" ")),this.enableRtl&&t.addClass([e],"e-rtl")},n.prototype.setEnable=function(){var e=this.toolbarSettings.items.length?this.list.parentElement:this.list;this.enabled?t.removeClass([e],s.cssClass.disabled):(t.addClass([e],s.cssClass.disabled),t.isBlazor()&&this.isServerRendered&&this.toolbarSettings.items.length&&t.removeClass([this.list],s.cssClass.disabled))},n.prototype.showSpinner=function(){this.spinner||(this.spinner=this.createElement("div",{className:"e-listbox-wrapper"})),this.spinner.style.height=t.formatUnit(this.height),this.element.parentElement.insertBefore(this.spinner,this.element.nextSibling),l.createSpinner({target:this.spinner},this.createElement),l.showSpinner(this.spinner)},n.prototype.hideSpinner=function(){this.spinner.querySelector(".e-spinner-pane")&&l.hideSpinner(this.spinner),this.spinner.parentElement&&t.detach(this.spinner)},n.prototype.onInput=function(){this.isDataSourceUpdate=!1,this.keyDownStatus?this.isValidKey=!0:this.isValidKey=!1,this.keyDownStatus=!1,this.refreshClearIcon()},n.prototype.clearText=function(){this.filterInput.value="",this.refreshClearIcon();var e=document.createEvent("KeyboardEvent");this.isValidKey=!0,this.KeyUp(e)},n.prototype.refreshClearIcon=function(){this.filterInput.parentElement.querySelector("."+ve.clearIcon)&&(this.filterInput.parentElement.querySelector("."+ve.clearIcon).style.visibility=""===this.filterInput.value?"hidden":"visible")},n.prototype.onActionComplete=function(i,s,l){var o;if(this.allowFiltering&&this.list.getElementsByClassName("e-filter-parent")[0]&&(o=t.isBlazor()&&this.isServerRendered?this.list.getElementsByClassName("e-filter-parent")[0]:this.list.getElementsByClassName("e-filter-parent")[0].cloneNode(!0)),0===s.length){var r=i.getElementsByClassName("e-list-nrt")[0];r&&i.removeChild(r)}if(e.prototype.onActionComplete.call(this,i,s,l),this.allowFiltering&&!t.isNullOrUndefined(o)&&(this.list.insertBefore(o,this.list.firstElementChild),t.isBlazor()||this.isServerRendered||(this.filterParent=this.list.getElementsByClassName("e-filter-parent")[0],this.filterWireEvents(o))),this.initWrapper(),this.setSelection(),this.initDraggable(),this.mainList=this.ulElement,this.initLoad)this.jsonData=[],t.extend(this.jsonData,s,[]),this.initToolbarAndStyles(),this.wireEvents(),this.showCheckbox&&this.setCheckboxPosition(),this.allowFiltering&&this.setFiltering();else if(this.isDataSourceUpdate&&(this.jsonData=[],t.extend(this.jsonData,s,[]),this.isDataSourceUpdate=!1),this.allowFiltering){var n=this.list.getElementsByClassName("e-input-filter")[0],a=this.filterInput.value.length;n.selectionStart=a,n.selectionEnd=a,n.focus()}if(this.toolbarSettings.items.length&&this.scope&&this.scope.indexOf("#")>-1&&!t.isNullOrUndefined(l)){var h=this.scope.replace("#","");t.getComponent(document.getElementById(h),this.getModuleName()).initToolbar()}this.initLoad=!1},n.prototype.initToolbarAndStyles=function(){this.initToolbar(),this.setCssClass(),this.setEnable(),this.setHeight()},n.prototype.triggerDragStart=function(e){var i,s=this;e=t.extend(this.getDragArgs(e),{dragSelected:!0}),t.Browser.isIos&&(this.list.style.overflow="hidden"),this.trigger("dragStart",e,function(l){s.allowDragAll=l.dragSelected,s.allowDragAll||(i=s.ulElement.getElementsByClassName("e-list-badge")[0])&&t.detach(i),t.isBlazor()&&e.bindEvents(e.dragElement)})},n.prototype.triggerDrag=function(e){this.trigger("drag",this.getDragArgs(e));var t=this.getComponent(e.target);if(t&&0===t.listData.length){var i=t.ulElement.getElementsByClassName("e-list-nrt")[0];i&&t.ulElement.removeChild(i)}},n.prototype.beforeDragEnd=function(e){var t=this.getFormattedValue(e.droppedElement.getAttribute("data-value"));this.value.indexOf(t)>-1?e.items=this.getDataByValues(this.value):e.items=this.getDataByValues([t]),this.trigger("beforeDrop",e)},n.prototype.dragEnd=function(e){var i,l,o,r,n,a,h=this,p=this.getFormattedValue(e.droppedElement.getAttribute("data-value")),u=this.getComponent(e.droppedElement),c=this.getDragArgs({target:e.droppedElement},!0),d={previousData:this.dataSource},m={previousData:u.dataSource},f=t.extend({},c,{target:e.target,source:{previousData:this.dataSource},previousIndex:e.previousIndex,currentIndex:e.currentIndex});if(u!==this){T=t.extend(d,{currentData:this.listData});f=t.extend(f,{source:T,destination:m})}if(t.Browser.isIos&&(this.list.style.overflow=""),u===this){var v=this.ulElement;i=[].slice.call(this.listData),l=[].slice.call(this.liCollections),o=[].slice.call(this.jsonData),a=[].slice.call(this.sortedData);var y=e.currentIndex,g=e.currentIndex=this.getCurIdx(this,e.currentIndex),C=i.indexOf(this.getDataByValue(p)),b=o.indexOf(this.getDataByValue(p)),S=a.indexOf(this.getDataByValue(p));if(i.splice(g,0,i.splice(C,1)[0]),a.splice(y,0,a.splice(S,1)[0]),o.splice(g,0,o.splice(b,1)[0]),t.isBlazor()||l.splice(g,0,l.splice(C,1)[0]),this.allowDragAll&&(n=this.value&&Array.prototype.indexOf.call(this.value,p)>-1?this.value:[p]).forEach(function(r){if(r!==p){var n=i.indexOf(h.getDataByValue(r)),u=o.indexOf(h.getDataByValue(r)),c=a.indexOf(h.getDataByValue(r));n>g&&g++,o.splice(g,0,o.splice(u,1)[0]),i.splice(g,0,i.splice(n,1)[0]),a.splice(y,0,a.splice(c,1)[0]),t.isBlazor()||(l.splice(g,0,l.splice(n,1)[0]),v.insertBefore(h.getItems()[h.getIndexByValue(r)],v.getElementsByClassName("e-placeholder")[0]))}else if(t.isBlazor()){var d=[].slice.call(h.ulElement.getElementsByClassName(s.cssClass.li)),m=h.ulElement.removeChild(d[e.currentIndex]);d.splice(e.currentIndex,1),h.ulElement.insertBefore(m,d[e.previousIndex])}}),this.listData=i,this.jsonData=o,this.sortedData=a,this.liCollections=l,t.isBlazor()){var E=this.value;this.interopAdaptor.invokeMethodAsync("UpdateListData",this.listData).then(function(){h.updateBlazorListData(null,!0),h.selectItems(h.listData,!1),h.selectItems(E)})}}else{var x,w=[].slice.call(this.liCollections),O=e.currentIndex=this.getCurIdx(u,e.currentIndex),A=u.ulElement;i=[].slice.call(u.listData),l=[].slice.call(u.liCollections),o=[].slice.call(u.jsonData),a=[].slice.call(u.sortedData),n=this.value&&Array.prototype.indexOf.call(this.value,p)>-1&&this.allowDragAll?this.value:[p];var k=[].slice.call(this.listData),B=[].slice.call(this.sortedData);if(n.forEach(function(n,u){r=h.getDataByValue(n);var c=h.listData.indexOf(r),d=h.jsonData.indexOf(r),m=h.sortedData.indexOf(r);k.splice(c,1),h.jsonData.splice(d,1),B.splice(m,1),h.listData=k,h.sortedData=B;var f=n===p?e.currentIndex:O;if(i.splice(f,0,r),o.splice(f,0,r),a.splice(f,0,r),t.isBlazor()||l.splice(f,0,w.splice(c,1)[0]),n)x=h.getItems()[h.getIndexByValue(n)];else for(var v=h.getItems(),y=0;y<v.length;y++)if(null===v[y].getAttribute("data-value")&&v[y].classList.contains("e-list-item")){x=v[y];break}x||(x=e.helper),h.removeSelected(h,n===p?[e.droppedElement]:[x]),t.isBlazor()?0===u&&h.ulElement.insertBefore(A.getElementsByClassName(s.cssClass.li)[e.currentIndex],h.ulElement.getElementsByClassName(s.cssClass.li)[e.previousIndex]):A.insertBefore(x,A.getElementsByClassName("e-placeholder")[0]),O++}),t.isBlazor())this.interopAdaptor.invokeMethodAsync("UpdateListData",this.listData).then(function(){h.updateSelectedOptions(),h.fields.groupBy&&h.setSelection(),h.updateBlazorListData(null,!0,null==h.value||!h.value.length)}),u.interopAdaptor.invokeMethodAsync("UpdateListData",i).then(function(){("None"!==u.sortOrder||h.selectionSettings.showCheckbox!==u.selectionSettings.showCheckbox||u.fields.groupBy)&&u.setSelection(),u.updateBlazorListData(null,!0,null==u.value||!u.value.length)});else{if(this.fields.groupBy&&(this.ulElement.innerHTML=this.renderItems(this.listData,this.fields).innerHTML,this.setSelection()),"None"!==u.sortOrder||this.selectionSettings.showCheckbox!==u.selectionSettings.showCheckbox||u.fields.groupBy||u.itemTemplate||this.itemTemplate){var D=t.getComponent(A,"sortable");A.innerHTML=u.renderItems(i,u.fields).innerHTML,D.placeHolderElement&&A.appendChild(D.placeHolderElement),A.appendChild(e.helper),u.setSelection()}this.liCollections=w,u.liCollections=l}u.jsonData=t.extend([],[],o,!1),u.listData=t.extend([],[],i,!1),u.sortedData=t.extend([],[],a,!1),0===this.listData.length&&this.l10nUpdate()}if(this===u){var T=t.extend(d,{currentData:i});f=t.extend(f,{source:T})}else{var I=t.extend(m,{currentData:i});f=t.extend(f,{destination:I})}this.trigger("drop",f)},n.prototype.removeSelected=function(e,i){e.selectionSettings.showCheckbox?i.forEach(function(e){e.getElementsByClassName("e-frame")[0].classList.remove("e-check")}):t.removeClass(i,s.cssClass.selected)},n.prototype.getCurIdx=function(e,t){return e.fields.groupBy&&(t-=[].slice.call(e.ulElement.children).slice(0,t).filter(function(e){return e.classList.contains(s.cssClass.group)}).length),t},n.prototype.getComponent=function(e){var i,s="EJS-LISTBOX"===this.element.tagName?t.closest(e,".e-listbox"):t.closest(e,".e-listbox-wrapper")&&t.closest(e,".e-listbox-wrapper").querySelector(".e-listbox");return s&&(i=t.getComponent(s,this.getModuleName())),i},n.prototype.listOption=function(i,s){return this.listCurrentOptions=e.prototype.listOption.call(this,i,s),this.listCurrentOptions=t.extend({},this.listCurrentOptions,{itemCreated:this.triggerBeforeItemRender.bind(this)},!0),this.notify("listoption",{module:"CheckBoxSelection"}),this.listCurrentOptions},n.prototype.triggerBeforeItemRender=function(e){e.item.setAttribute("tabindex","-1"),this.trigger("beforeItemRender",{element:e.item,item:e.curData})},n.prototype.requiredModules=function(){var e=[];return this.selectionSettings.showCheckbox&&e.push({member:"CheckBoxSelection",args:[this]}),e},n.prototype.enableItems=function(e,i,l){var o=this;void 0===i&&(i=!0);var r;e.forEach(function(e){var n;if(t.isBlazor()&&"object"==typeof e){if(n=t.getValue(l?o.fields.value:o.fields.text,e),t.isNullOrUndefined(n))return}else n=e;(r=o.findListElement(o.list,"li","data-value",l?n:o.getValueByText(n)))&&(i?(t.removeClass([r],s.cssClass.disabled),r.removeAttribute("aria-disabled")):(t.addClass([r],s.cssClass.disabled),r.setAttribute("aria-disabled","true")))})},n.prototype.selectItems=function(e,t,i){void 0===t&&(t=!0),this.setSelection(e,t,!i),this.updateSelectedOptions()},n.prototype.selectAll=function(e){void 0===e&&(e=!0),this.selectAllItems(e)},n.prototype.addItems=function(t,i){e.prototype.addItem.call(this,t,i)},n.prototype.removeItems=function(e,t){this.removeItem(e,t)},n.prototype.removeItem=function(e,i){var s=[],l=this.list.querySelectorAll("."+k.li);if(e){e=e instanceof Array?e:[e];var o=this.fields,r=void 0,n=[],a=void 0;t.extend(n,[],this.listData);for(var h=[],p=[],u=0;u<e.length;u++){r=e[u]instanceof Object?t.getValue(o.value,e[u]):e[u].toString();for(var c=0,d=n.length;c<d;c++)(n[c]instanceof Object?t.getValue(o.value,n[c]):n[c].toString())===r&&(a=this.getIndexByValue(r),s.push(l[a]),h.push(c),p.push(a))}for(m=h.length-1;m>=0;m--)this.listData.splice(h[m],1);for(var m=p.length-1;m>=0;m--)this.updateLiCollection(p[m])}else i=i||0,s.push(l[i]),this.listData.splice(i,1),this.updateLiCollection(i);for(c=0;c<s.length;c++)this.ulElement.removeChild(s[c]);0===this.listData.length&&this.l10nUpdate()},n.prototype.getDataByValues=function(e){for(var t=[],i=0;i<e.length;i++)t.push(this.getDataByValue(e[i]));return t},n.prototype.moveUp=function(e){var t=e?this.getElemByValue(e):this.getSelectedItems();this.moveUpDown(!0,!1,t)},n.prototype.moveDown=function(e){var t=e?this.getElemByValue(e):this.getSelectedItems();this.moveUpDown(!1,!1,t)},n.prototype.moveTo=function(e,i,s){var l=e?this.getElemByValue(e):this.getSelectedItems(),o=s?t.getComponent(s,a):this.getScopedListBox();this.moveData(this,o,!1,l,i)},n.prototype.moveAllTo=function(e,i){if(this.listData.length>0){var s=e?t.getComponent(e,a):this.getScopedListBox();this.moveAllData(this,s,!1,i)}},n.prototype.getDataList=function(){return this.jsonData},n.prototype.getSortedList=function(){var e,t;if(e=t=this.sortedData,this.fields.groupBy){e=[];for(var i=0;i<t.length;i++)t[i].isHeader||e.push(t[i])}return e},n.prototype.getElemByValue=function(e){for(var t=[],i=0;i<e.length;i++)t.push(this.ulElement.querySelector('[data-value ="'+e[i]+'"]'));return t},n.prototype.updateLiCollection=function(e){var t=[].slice.call(this.liCollections);t.splice(e,1),this.liCollections=t},n.prototype.selectAllItems=function(e,t){var i=this;if([].slice.call(this.getItems()).forEach(function(t){if(!t.classList.contains(s.cssClass.disabled))if(i.selectionSettings.showCheckbox){var l=t.getElementsByClassName("e-check")[0];(!l&&e||l&&!e)&&(i.notify("updatelist",{li:t,module:"listbox"}),i.maximumSelectionLength>=i.list.querySelectorAll(".e-list-item span.e-check").length&&i.checkMaxSelection())}else e?t.classList.add(s.cssClass.selected):t.classList.remove(s.cssClass.selected)}),this.updateSelectedOptions(),this.allowFiltering&&this.selectionSettings.showCheckbox){var l=this.list.getElementsByTagName("li"),o=0;if(e){var r=this;for(o=0;o<l.length;o++)!function(){var e=r.getFormattedValue(l[o].getAttribute("data-value"));r.value.some(function(t){return t===e})||r.value.push(r.getFormattedValue(l[o].getAttribute("data-value")))}()}else{var n=this;for(o=0;o<l.length;o++)!function(){var e=n.getFormattedValue(l[o].getAttribute("data-value"));n.value=n.value.filter(function(t){return t!==e})}()}document.querySelectorAll("ul").length<2&&this.updateMainList()}this.triggerChange(this.getSelectedItems(),t)},n.prototype.updateMainList=function(){var e=this.mainList.querySelectorAll(".e-list-item"),t=this.ulElement.querySelectorAll(".e-list-item"),i=e.length,s=t.length;if(this.selectionSettings.showCheckbox||document.querySelectorAll("ul").length>1||i!==s){var l=0,o=0,r=0;for(l;l<i;){if(this.value)for(o;o<this.value.length;o++)e[l].getAttribute("data-value")===this.value[o]&&r++;!r&&this.selectionSettings.showCheckbox&&e[l].getElementsByClassName("e-frame")[0].classList.remove("e-check"),document.querySelectorAll("ul").length>1&&r&&i!==s?(this.mainList.removeChild(this.mainList.getElementsByTagName("li")[l]),l=0):l++,r=0,o=0}}},n.prototype.wireEvents=function(){var e=t.closest(this.element,"form"),i="EJS-LISTBOX"===this.element.tagName?this.element:this.list;t.EventHandler.add(this.list,"click",this.clickHandler,this),t.EventHandler.add(i,"keydown",this.keyDownHandler,this),t.EventHandler.add(i,"focusout",this.focusOutHandler,this),this.wireToolbarEvent(),this.selectionSettings.showCheckbox&&t.EventHandler.remove(document,"mousedown",this.checkBoxSelectionModule.onDocumentClick),(this.fields.groupBy||this.element.querySelector("select>optgroup"))&&t.EventHandler.remove(this.list,"scroll",this.setFloatingHeader),e&&t.EventHandler.add(e,"reset",this.formResetHandler,this)},n.prototype.wireToolbarEvent=function(){this.toolbarSettings.items.length&&t.EventHandler.add(this.getToolElem(),"click",this.toolbarClickHandler,this)},n.prototype.unwireEvents=function(){var e=t.closest(this.element,"form"),i="EJS-LISTBOX"===this.element.tagName?this.element:this.list;t.EventHandler.remove(this.list,"click",this.clickHandler),t.EventHandler.remove(i,"keydown",this.keyDownHandler),t.EventHandler.remove(i,"focusout",this.focusOutHandler),this.allowFiltering&&this.clearFilterIconElem&&t.EventHandler.remove(this.clearFilterIconElem,"click",this.clearText),this.toolbarSettings.items.length&&t.EventHandler.remove(this.getToolElem(),"click",this.toolbarClickHandler),e&&t.EventHandler.remove(e,"reset",this.formResetHandler)},n.prototype.clickHandler=function(e){this.selectHandler(e)},n.prototype.checkSelectAll=function(){for(var e=0,t=this.list.querySelectorAll("li."+k.li),i=0;i<t.length;i++)t[i].classList.contains("e-disabled")||e++;var s=this.getSelectedItems().length;this.showSelectAll&&e&&this.notify("checkSelectAll",{module:"CheckBoxSelection",value:e===s?"check":0===s?"uncheck":"indeterminate"})},n.prototype.getQuery=function(e){var t=e?e.clone():this.query?this.query.clone():new i.Query;if(this.allowFiltering){var s=""===this.inputString?"contains":this.filterType,l=this.typeOfData(this.dataSource).typeof;if((this.dataSource instanceof i.DataManager||"string"!==l)&&"number"!==l){var o=this.fields.text?this.fields.text:"";t.where(o,s,this.inputString,this.ignoreCase,this.ignoreAccent)}else t.where("",s,this.inputString,this.ignoreCase,this.ignoreAccent)}else t=e||(this.query?this.query:new i.Query);return t},n.prototype.setFiltering=function(){var e;if(this.initLoad||t.isNullOrUndefined(this.filterParent))return t.isBlazor()&&this.isServerRendered?(this.filterParent=this.list.querySelector(".e-filter-parent"),this.filterInput=this.list.querySelector(".e-input-filter")):(this.filterParent=this.createElement("span",{className:ve.filterParent}),this.filterInput=this.createElement("input",{attrs:{type:"text"},className:ve.filterInput}),this.element.parentNode.insertBefore(this.filterInput,this.element),e=o.Input.createInput({element:this.filterInput,buttons:[ve.filterBarClearIcon],properties:{placeholder:this.filterBarPlaceholder}},this.createElement),t.append([e.container],this.filterParent),t.prepend([this.filterParent],this.list),t.attributes(this.filterInput,{"aria-disabled":"false","aria-owns":this.element.id+"_options",role:"listbox","aria-activedescendant":null,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false"})),this.height.toString().indexOf("%")<0&&t.addClass([this.list],"e-filter-list"),this.inputString=this.filterInput.value,this.filterWireEvents(),e},n.prototype.filterWireEvents=function(e){e&&(this.filterInput=e.querySelector(".e-input-filter")),this.clearFilterIconElem=this.filterInput.parentElement.querySelector("."+ve.clearIcon),this.clearFilterIconElem&&(t.EventHandler.add(this.clearFilterIconElem,"click",this.clearText,this),e||(this.clearFilterIconElem.style.visibility="hidden")),t.EventHandler.add(this.filterInput,"input",this.onInput,this),t.EventHandler.add(this.filterInput,"keyup",this.KeyUp,this),t.EventHandler.add(this.filterInput,"keydown",this.onKeyDown,this)},n.prototype.selectHandler=function(e,i){var l,o=!0,r=t.closest(e.target,".e-list-item"),n=[r];if(r&&r.parentElement){if(l=[].slice.call(r.parentElement.children).indexOf(r),this.selectionSettings.showCheckbox?o=!r.getElementsByClassName("e-frame")[0].classList.contains("e-check"):(e.ctrlKey||t.Browser.isDevice)&&this.isSelected(r)?(r.classList.remove(s.cssClass.selected),r.removeAttribute("aria-selected"),o=!1):"Multiple"===this.selectionSettings.mode&&(e.ctrlKey||t.Browser.isDevice)||(this.getSelectedItems().forEach(function(e){e.removeAttribute("aria-selected")}),t.removeClass(this.getSelectedItems(),s.cssClass.selected)),e.shiftKey&&!this.selectionSettings.showCheckbox&&"Single"!==this.selectionSettings.mode?n=[].slice.call(r.parentElement.children).slice(Math.min(l,this.prevSelIdx),Math.max(l,this.prevSelIdx)+1).filter(function(e){return e.classList.contains("e-list-item")}):this.prevSelIdx=[].slice.call(r.parentElement.children).indexOf(r),o&&(this.selectionSettings.showCheckbox||t.addClass(n,s.cssClass.selected),n.forEach(function(e){e.setAttribute("aria-selected","true")}),this.list.setAttribute("aria-activedescendant",r.id)),i||!(this.maximumSelectionLength>(this.value&&this.value.length))&&o||!(this.maximumSelectionLength>=(this.value&&this.value.length))&&o||this.maximumSelectionLength<(this.value&&this.value.length)||this.notify("updatelist",{li:r,e:e,module:"listbox"}),this.allowFiltering&&!i){var a=this.getFormattedValue(r.getAttribute("data-value"));if(o){var h=[];t.extend(h,this.value),h.push(a),this.value=h}else this.value=this.value.filter(function(e){return e!==a});document.querySelectorAll("ul").length<2&&this.updateMainList()}this.updateSelectedOptions(),this.triggerChange(this.getSelectedItems(),e),this.checkMaxSelection()}},n.prototype.triggerChange=function(e,t){this.trigger("change",{elements:e,items:this.getDataByElements(e),value:this.value,event:t})},n.prototype.getDataByElems=function(e){for(var t=[],i=0,s=e.length;i<s;i++)t.push(this.getDataByValue(this.getFormattedValue(e[i].getAttribute("data-value"))));return t},n.prototype.getDataByElements=function(e){var i,s=[],l=0;if(!t.isNullOrUndefined(this.listData)){var o=this.typeOfData(this.listData).typeof;if("string"===o||"number"===o||"boolean"===o)for(var r=0,n=this.listData;r<n.length;r++){for(var a=n[r],h=l,p=e.length;h<p;h++)if(i=this.getFormattedValue(e[h].getAttribute("data-value")),!t.isNullOrUndefined(a)&&a===i){l=h,s.push(a);break}if(e.length===s.length)break}else for(var u=0,c=this.listData;u<c.length;u++){for(var a=c[u],h=l,p=e.length;h<p;h++)if(i=this.getFormattedValue(e[h].getAttribute("data-value")),!t.isNullOrUndefined(a)&&t.getValue(this.fields.value?this.fields.value:"value",a)===i){l=h,s.push(a);break}if(e.length===s.length)break}return s}return null},n.prototype.checkMaxSelection=function(){var e=this.list.querySelectorAll(".e-list-item span.e-check").length;if(this.selectionSettings.showCheckbox){var t=0,i=this.list.getElementsByClassName("e-list-item");for(t;t<i.length;t++)i[t].querySelector(".e-frame.e-check")||(e===this.maximumSelectionLength?i[t].classList.add("e-disable"):i[t].classList.contains("e-disable")&&i[t].classList.remove("e-disable"))}},n.prototype.toolbarClickHandler=function(e){var i=t.closest(e.target,"button");if(i){if(this.toolbarAction=i.getAttribute("data-value"),i.disabled)return;switch(this.toolbarAction){case"moveUp":this.moveUpDown(!0);break;case"moveDown":this.moveUpDown();break;case"moveTo":this.moveItemTo();break;case"moveFrom":this.moveItemFrom();break;case"moveAllTo":this.moveAllItemTo();break;case"moveAllFrom":this.moveAllItemFrom();break;default:this.trigger("actionBegin",{cancel:!1,items:this.getDataByElems(this.getSelectedItems()),eventName:this.toolbarAction})}}},n.prototype.moveUpDown=function(e,t,i){var l=this,o=this.getSelectedItems();if(i&&(o=i),!(e&&this.isSelected(this.ulElement.firstElementChild)||!e&&this.isSelected(this.ulElement.lastElementChild))||i){var r=this.getDataByElems(o),n={cancel:!1,items:r,eventName:this.toolbarAction};this.trigger("actionBegin",n),n.cancel||((e?o:o.reverse()).forEach(function(t){var i=Array.prototype.indexOf.call(l.ulElement.querySelectorAll(".e-list-item"),t),o=Array.prototype.indexOf.call(l.ulElement.children,t);s.moveTo(l.ulElement,l.ulElement,[o],e?o-1:o+2),l.changeData(o,e?o-1:o+1,e?i-1:i+1,t)}),this.trigger("actionComplete",{items:r,eventName:this.toolbarAction}),o[0].focus(),!t&&this.toolbarSettings.items.length&&this.getToolElem().querySelector("[data-value="+(e?"moveUp":"moveDown")+"]").focus(),this.updateToolBarState())}},n.prototype.moveItemTo=function(){this.moveData(this,this.getScopedListBox())},n.prototype.moveItemFrom=function(){this.moveData(this.getScopedListBox(),this)},n.prototype.moveData=function(e,i,l,o,r){var n=this,a=[],h=[],p=[],u=[],c=[].slice.call(e.listData),d=[].slice.call(i.listData),m=[].slice.call(e.sortedData),f=[].slice.call(i.sortedData),v=[].slice.call(e.liCollections),y=[],g=[].slice.call(i.liCollections),C=[],b=[],S=e.getSelectedItems();o&&(S=o);var E="None"!==i.sortOrder||i.selectionSettings.showCheckbox!==e.selectionSettings.showCheckbox||i.fields.groupBy||i.itemTemplate||e.itemTemplate;if(e.value=[],S.length){this.removeSelected(e,S),S.forEach(function(t){a.push(Array.prototype.indexOf.call(e.ulElement.children,t)),y.push(Array.prototype.indexOf.call(e.ulElement.querySelectorAll(".e-list-item"),t)),h.push(Array.prototype.indexOf.call(e.listData,e.getDataByElems([t])[0])),u.push(Array.prototype.indexOf.call(e.sortedData,e.getDataByElems([t])[0])),p.push(Array.prototype.indexOf.call(e.jsonData,e.getDataByElems([t])[0]))}),"None"!==this.sortOrder?u.forEach(function(t){C.push(e.sortedData[t])}):p.forEach(function(t){C.push(e.jsonData[t])});var x={cancel:!1,items:C,eventName:this.toolbarAction};if(e.trigger("actionBegin",x),x.cancel)return;if(!t.isBlazor()){var w=[];if(y.sort(function(e,t){return e-t}).reverse().forEach(function(e){w.push(v.splice(e,1)[0])}),e.liCollections=v,r){var O=g.splice(0,r);i.liCollections=O.concat(w.reverse()).concat(g)}else i.liCollections=g.concat(w.reverse());if(0===i.listData.length){var A=i.ulElement.getElementsByClassName("e-list-nrt")[0];A&&i.ulElement.removeChild(A)}}h.sort(function(e,t){return t-e}).forEach(function(e){c.splice(e,1)[0]}),u.sort(function(e,t){return t-e}).forEach(function(e){m.splice(e,1)[0]}),p.slice().reverse().forEach(function(t){b.push(e.jsonData.splice(t,1)[0])}),t.isBlazor()||(E?e.fields.groupBy?e.ulElement.innerHTML=e.renderItems(c,e.fields).innerHTML:S.forEach(function(e){t.detach(e)}):(s.moveTo(e.ulElement,i.ulElement,a,r),e.trigger("actionComplete",{items:C,eventName:this.toolbarAction})),i.mainList.childElementCount!==i.jsonData.length&&(i.mainList=i.ulElement),e.updateMainList());var k=[].slice.call(i.jsonData);f=[].slice.call(i.sortedData),t.isBlazor()||this.selectNextList(S,y,h,e),l&&this.list.focus(),e.listData=c,e.sortedData=m,r=r||d.length;for(var B=C.length-1;B>=0;B--)d.splice(r,0,C[B]),k.splice(r,0,C[B]),f.splice(r,0,C[B]);i.listData=d,i.jsonData=k,i.sortedData=f,t.isBlazor()?(e.interopAdaptor.invokeMethodAsync("UpdateListData",e.listData).then(function(){e.updateBlazorListData(null,!0),n.selectNextList(S,y,h,e),e.updateSelectedOptions()}),i.interopAdaptor.invokeMethodAsync("UpdateListData",i.listData).then(function(){E&&i.setSelection(),i.updateBlazorListData(null,!0),e.trigger("actionComplete",{items:C,eventName:n.toolbarAction})})):(E&&(i.ulElement.innerHTML=i.renderItems(d,i.fields).innerHTML,i.setSelection(),e.trigger("actionComplete",{items:C,eventName:this.toolbarAction})),e.updateSelectedOptions()),0===e.listData.length&&e.l10nUpdate()}1===e.value.length&&e.getSelectedItems().length&&(e.value[0]=e.getFormattedValue(e.getSelectedItems()[0].getAttribute("data-value")))},n.prototype.selectNextList=function(e,t,i,l){var o,r,n=l.ulElement.querySelectorAll(".e-list-item").length,a=-1;1===e.length&&n&&!l.selectionSettings.showCheckbox&&(r=n<=t[0]?n-1:t[0],o=l.ulElement.querySelectorAll(".e-list-item")[r],(a=l.getValidIndex(o,r,n===i[0]?38:40))>-1&&l.ulElement.querySelectorAll(".e-list-item")[a].classList.add(s.cssClass.selected))},n.prototype.moveAllItemTo=function(){this.moveAllData(this,this.getScopedListBox())},n.prototype.moveAllItemFrom=function(){this.moveAllData(this.getScopedListBox(),this)},n.prototype.moveAllData=function(e,i,l,o){var r=this,n=[].slice.call(i.listData),a=[].slice.call(i.jsonData),h="None"!==i.sortOrder||i.selectionSettings.showCheckbox!==e.selectionSettings.showCheckbox||i.fields.groupBy||i.itemTemplate||e.itemTemplate;this.removeSelected(e,e.getSelectedItems());var p=[].slice.call(e.jsonData),u={cancel:!1,items:p,eventName:this.toolbarAction};if(e.trigger("actionBegin",u),!u.cancel){if(!t.isBlazor()){if(0===i.listData.length&&(c=i.ulElement.getElementsByClassName("e-list-nrt")[0])&&i.ulElement.removeChild(c),h){var c=e.ulElement.getElementsByClassName("e-list-nrt")[0];c&&e.ulElement.removeChild(c)}s.moveTo(e.ulElement,i.ulElement,Array.apply(null,{length:e.ulElement.childElementCount}).map(Number.call,Number),o),this.trigger("actionComplete",{items:p,eventName:this.toolbarAction})}l&&this.list.focus(),o=o||n.length;for(d=0;d<e.listData.length;d++)n.splice(o+d,0,e.listData[d]);for(var d=0;d<e.jsonData.length;d++)a.splice(o+d,0,e.jsonData[d]);if(!t.isBlazor()){var m=[].slice.call(e.liCollections),f=[].slice.call(i.liCollections);if(e.liCollections=[],o){var v=f.splice(0,o);i.liCollections=v.concat(m).concat(f)}else i.liCollections=f.concat(m)}e.value=[],n=n.filter(function(e){return!0!==e.isHeader}),i.listData=n,i.jsonData=a,e.listData=e.sortedData=e.jsonData=[],t.isBlazor()?(h||(i.sortedData=n),e.interopAdaptor.invokeMethodAsync("UpdateListData",e.listData).then(function(){e.updateBlazorListData(null,!0),e.updateSelectedOptions()}),i.interopAdaptor.invokeMethodAsync("UpdateListData",i.listData).then(function(){i.updateBlazorListData(null,!0),e.updateSelectedOptions(),e.trigger("actionComplete",{items:p,eventName:r.toolbarAction})})):(h?(i.ulElement.innerHTML=i.renderItems(n,i.fields).innerHTML,this.trigger("actionComplete",{items:p,eventName:this.toolbarAction})):i.sortedData=n,e.updateSelectedOptions()),0===e.listData.length&&e.l10nUpdate()}},n.prototype.changeData=function(e,t,i,s){var l=[].slice.call(this.listData),o=[].slice.call(this.jsonData),r=[].slice.call(this.sortedData),n=Array.prototype.indexOf.call(this.jsonData,this.getDataByElems([s])[0]),a=Array.prototype.indexOf.call(this.sortedData,this.getDataByElems([s])[0]),h=[].slice.call(this.liCollections);l.splice(t,0,l.splice(e,1)[0]),o.splice(i,0,o.splice(n,1)[0]),r.splice(t,0,r.splice(a,1)[0]),h.splice(t,0,h.splice(e,1)[0]),this.listData=l,this.jsonData=o,this.liCollections=h,this.sortedData=r},n.prototype.getSelectedItems=function(){var e=[];return this.selectionSettings.showCheckbox?[].slice.call(this.ulElement.getElementsByClassName("e-check")).forEach(function(i){e.push(t.closest(i,".e-list-item"))}):e=[].slice.call(this.ulElement.getElementsByClassName(s.cssClass.selected)),e},n.prototype.getScopedListBox=function(){var e,i=this;return this.scope&&[].slice.call(document.querySelectorAll(this.scope)).forEach(function(s){t.getComponent(s,i.getModuleName())&&(e=t.getComponent(s,i.getModuleName()))}),e},n.prototype.getGrabbedItems=function(){return Array.prototype.slice.call(this.element.querySelectorAll(".e-grabbed"))},n.prototype.getDragArgs=function(e,i){var s=this.getGrabbedItems();return s.length?i&&s.push(e.target):s=[e.target],t.isBlazor()?{elements:s,items:this.getDataByElems(s),bindEvents:e.bindEvents,dragElement:e.dragElement}:{elements:s,items:this.getDataByElems(s)}},n.prototype.onKeyDown=function(e){this.keyDownHandler(e),e.stopPropagation()},n.prototype.keyDownHandler=function(e){if([32,35,36,37,38,39,40,65].indexOf(e.keyCode)>-1&&!this.allowFiltering){if(e.target&&e.target.className.indexOf("e-edit-template")>-1)return;if(e.preventDefault(),32===e.keyCode&&this.ulElement.children.length)this.selectHandler({target:this.ulElement.getElementsByClassName("e-focused")[0],ctrlKey:e.ctrlKey,shiftKey:e.shiftKey});else if(65===e.keyCode&&e.ctrlKey)this.selectAll();else if((38===e.keyCode||40===e.keyCode)&&e.ctrlKey&&e.shiftKey)this.moveUpDown(38===e.keyCode,!0);else if(!this.toolbarSettings.items.length&&!this.tBListBox||39!==e.keyCode&&37!==e.keyCode||!e.ctrlKey)37!==e.keyCode&&39!==e.keyCode&&this.upDownKeyHandler(e);else{var t=this.tBListBox||this.getScopedListBox();39===e.keyCode?e.shiftKey?this.moveAllData(this,t,!0):this.moveData(this,t,!0):e.shiftKey?this.moveAllData(t,this,!0):this.moveData(t,this,!0)}}else this.allowFiltering&&(40!==e.keyCode&&38!==e.keyCode||this.upDownKeyHandler(e))},n.prototype.upDownKeyHandler=function(e){var i=this.ulElement,l=40===e.keyCode||36===e.keyCode?0:i.childElementCount-1,o=i.getElementsByClassName("e-focused")[0]||i.getElementsByClassName(s.cssClass.selected)[0];if(o){if(35!==e.keyCode&&36!==e.keyCode&&(l=Array.prototype.indexOf.call(i.children,o),40===e.keyCode?l++:l--,l<0||l>i.childElementCount-1))return;t.removeClass([o],"e-focused")}var r=i.children[l];if(r){if(-1===(l=this.getValidIndex(r,l,e.keyCode)))return void t.addClass([o],"e-focused");i.children[l].focus(),i.children[l].classList.add("e-focused"),e.ctrlKey||this.selectHandler({target:i.children[l],ctrlKey:e.ctrlKey,shiftKey:e.shiftKey},!0)}},n.prototype.KeyUp=function(e){var s=this,l=String.fromCharCode(e.keyCode).match(/\w/);if(t.isNullOrUndefined(l)||(this.isValidKey=!0),this.isValidKey=8===e.keyCode||46===e.keyCode||this.isValidKey,this.isValidKey&&(this.isValidKey=!1,e.keyCode,this.allowFiltering)){var o={preventDefaultAction:!1,text:this.targetElement(),updateData:function(e,t,i){o.cancel||(s.isFiltered=!0,s.remoteFilterAction=!0,s.dataUpdater(e,t,i))},event:e,cancel:!1};this.trigger("filtering",o,function(e){s.isDataFetched=!1,e.cancel||""!==s.filterInput.value&&s.isFiltered||(e.cancel||s.isCustomFiltering||e.preventDefaultAction||(s.inputString=s.filterInput.value,s.filteringAction(s.jsonData,new i.Query,s.fields)),s.isFiltered||s.isCustomFiltering||e.preventDefaultAction||s.dataUpdater(s.jsonData,new i.Query,s.fields))})}},n.prototype.filter=function(e,t,i){this.isCustomFiltering=!0,this.filteringAction(e,t,i)},n.prototype.filteringAction=function(e,t,i){this.resetList(e,i,t)},n.prototype.targetElement=function(){return this.targetInputElement=this.list.getElementsByClassName("e-input-filter")[0],this.targetInputElement.value},n.prototype.dataUpdater=function(e,t,i){this.isDataFetched=!1;if(""===this.targetElement().trim()){var s=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;this.remoteCustomValue=!1,this.onActionComplete(s,this.jsonData),this.notify("reOrder",{module:"CheckBoxSelection",enable:this.selectionSettings.showCheckbox,e:this})}else this.resetList(e,i,t)},n.prototype.focusOutHandler=function(){var e=this.list.getElementsByClassName("e-focused")[0];e&&e.classList.remove("e-focused"),this.allowFiltering&&this.refreshClearIcon()},n.prototype.getValidIndex=function(e,t,i){var l=this.ulElement;return(e.classList.contains("e-disabled")||e.classList.contains(s.cssClass.group))&&(40===i||36===i?t++:t--),t<0||t===l.childElementCount?-1:(((e=l.querySelectorAll(".e-list-item")[t]).classList.contains("e-disabled")||e.classList.contains(s.cssClass.group))&&(t=this.getValidIndex(e,t,i)),t)},n.prototype.updateSelectedOptions=function(){var e=this,i=[],s=[];if(t.extend(s,this.value),this.getSelectedItems().forEach(function(t){t.classList.contains("e-grabbed")||i.push(e.getFormattedValue(t.getAttribute("data-value")))}),this.mainList.childElementCount===this.ulElement.childElementCount)if(this.allowFiltering&&this.selectionSettings.showCheckbox){for(var l=0;l<i.length;l++)s.indexOf(i[l])>-1||s.push(i[l]);this.setProperties({value:s},!0)}else this.setProperties({value:i},!0);this.updateSelectTag(),this.updateToolBarState(),this.tBListBox&&this.tBListBox.updateToolBarState()},n.prototype.clearSelection=function(e){var t=this;if(void 0===e&&(e=this.value),this.selectionSettings.showCheckbox){var i;this.getSelectedItems().forEach(function(s){i=t.getFormattedValue(s.getAttribute("data-value")),e.indexOf(i)<0&&(s.getElementsByClassName("e-check")[0].classList.remove("e-check"),s.getElementsByClassName("e-checkbox-wrapper")[0].removeAttribute("aria-checked"),s.removeAttribute("aria-selected"))})}},n.prototype.setSelection=function(e,i,l){var o=this;void 0===e&&(e=this.value),void 0===i&&(i=!0),void 0===l&&(l=!1);var r,n;e&&e.forEach(function(e){var a;if(l)if(t.isBlazor()&&"object"==typeof e){if(a=e[o.fields.text||"text"],t.isNullOrUndefined(a))return;a=o.getValueByText(a)}else a=o.getValueByText(e);else a=e;(r=o.list.querySelector('[data-value="'+a+'"]'))&&(n=o.selectionSettings.showCheckbox?r.getElementsByClassName("e-frame")[0].classList.contains("e-check"):r.classList.contains("e-selected"),(!i&&n||i&&!n&&r)&&(o.selectionSettings.showCheckbox?o.notify("updatelist",{li:r,module:"listbox"}):i?(r.classList.add(s.cssClass.selected),r.setAttribute("aria-selected","true")):(r.classList.remove(s.cssClass.selected),r.removeAttribute("aria-selected"))))}),this.updateSelectTag()},n.prototype.updateSelectTag=function(){var e=this.getSelectTag(),t="";if(e.innerHTML="",this.value){for(var i=0,s=this.value.length;i<s;i++)t+='<option selected value="'+this.value[i]+'"></option>';e.innerHTML+=t}this.checkSelectAll()},n.prototype.checkDisabledState=function(e){return 0===e.ulElement.querySelectorAll("."+s.cssClass.li).length},n.prototype.updateToolBarState=function(){var e=this;if(this.toolbarSettings.items.length){var t=this.getScopedListBox(),i=this.list.parentElement.getElementsByClassName("e-listbox-tool")[0];this.toolbarSettings.items.forEach(function(s){var l=i.querySelector('[data-value="'+s+'"]');switch(s){case"moveAllTo":l.disabled=e.checkDisabledState(e);break;case"moveAllFrom":l.disabled=e.checkDisabledState(t);break;case"moveFrom":l.disabled=!t.value||!t.value.length;break;case"moveUp":l.disabled=!(e.value&&e.value.length&&!e.isSelected(e.ulElement.children[0]));break;case"moveDown":l.disabled=!(e.value&&e.value.length&&!e.isSelected(e.ulElement.children[e.ulElement.childElementCount-1]));break;default:l.disabled=!e.value||!e.value.length}})}},n.prototype.setCheckboxPosition=function(){var e=this.list;this.initLoad||"Left"!==this.selectionSettings.checkboxPosition||e.classList.remove("e-right"),"Right"===this.selectionSettings.checkboxPosition&&e.classList.add("e-right")},n.prototype.showCheckbox=function(e){var i=0,s=this.list.lastElementChild.querySelectorAll("li"),l=this.list.lastElementChild.getElementsByClassName("e-list-item").length;if(e){if(t.isBlazor()||(this.ulElement=this.renderItems(this.listData,this.fields),this.mainList=this.ulElement,this.list.removeChild(this.list.getElementsByTagName("ul")[0]),this.list.appendChild(this.ulElement)),this.selectionSettings.showSelectAll&&!this.list.getElementsByClassName("e-selectall-parent")[0]){var o=new t.L10n(this.getModuleName(),{selectAllText:"Select All",unSelectAllText:"Unselect All"},this.locale);this.showSelectAll=!0,this.selectAllText=o.getConstant("selectAllText"),this.unSelectAllText=o.getConstant("unSelectAllText"),this.popupWrapper=this.list,this.checkBoxSelectionModule.checkAllParent=null,this.notify("selectAll",{}),this.checkSelectAll()}}else if(this.list.getElementsByClassName("e-selectall-parent")[0]&&this.list.removeChild(this.list.getElementsByClassName("e-selectall-parent")[0]),!t.isBlazor()){for(i;i<l;i++)s[i].classList.contains("e-list-item")&&s[i].removeChild(s[i].getElementsByClassName("e-checkbox-wrapper")[0]),s[i].hasAttribute("aria-selected")&&s[i].removeAttribute("aria-selected");this.mainList=this.ulElement}this.value=[]},n.prototype.isSelected=function(e){return!t.isNullOrUndefined(e)&&(e.classList.contains(s.cssClass.selected)||null!==e.querySelector(".e-check"))},n.prototype.getSelectTag=function(){return this.list.getElementsByClassName("e-hidden-select")[0]},n.prototype.getToolElem=function(){return this.list.parentElement.getElementsByClassName("e-listbox-tool")[0]},n.prototype.formResetHandler=function(){this.value=this.initialSelectedOptions},n.prototype.getModuleName=function(){return"listbox"},n.prototype.getPersistData=function(){return this.addOnPersist(["value"])},n.prototype.getLocaleName=function(){return"listbox"},n.prototype.destroy=function(){this.itemTemplate&&t.resetBlazorTemplate(this.element.id+"ItemTemplate","ItemTemplate"),this.unwireEvents(),"EJS-LISTBOX"===this.element.tagName?this.element.innerHTML="":(!t.isBlazor()||t.isBlazor()&&!this.isServerRendered)&&(this.element.style.display="inline-block",this.toolbarSettings.items.length&&(this.list.parentElement.parentElement.insertBefore(this.list,this.list.parentElement),t.detach(this.list.nextElementSibling)),this.list.parentElement.insertBefore(this.element,this.list)),(!t.isBlazor()||t.isBlazor()&&!this.isServerRendered)&&e.prototype.destroy.call(this),this.itemTemplate&&this.clearTemplate()},n.prototype.onPropertyChanged=function(i,l){var r=this.toolbarSettings.items.length?this.list.parentElement:this.list;e.prototype.onPropertyChanged.call(this,i,l),this.setUpdateInitial(["fields","query","dataSource"],i);for(var n=0,a=Object.keys(i);n<a.length;n++)switch(a[n]){case"cssClass":l.cssClass&&t.removeClass([r],l.cssClass.split(" ")),i.cssClass&&t.addClass([r],i.cssClass.split(" "));break;case"enableRtl":i.enableRtl?r.classList.add("e-rtl"):r.classList.remove("e-rtl");break;case"value":t.removeClass(this.list.querySelectorAll("."+s.cssClass.selected),s.cssClass.selected),this.clearSelection(this.value),this.setSelection();break;case"height":this.setHeight();break;case"enabled":this.setEnable();break;case"allowDragAndDrop":i.allowDragAndDrop?this.initDraggable():t.getComponent(this.ulElement,"sortable").destroy();break;case"allowFiltering":this.allowFiltering?this.setFiltering():(this.list.removeChild(this.list.getElementsByClassName("e-filter-parent")[0]),this.filterParent=null,t.removeClass([this.list],"e-filter-list"));break;case"filterBarPlaceholder":this.allowFiltering&&this.filterInput&&o.Input.setPlaceholder(i.filterBarPlaceholder,this.filterInput);break;case"scope":this.allowDragAndDrop&&(t.getComponent(this.ulElement,"sortable").scope=i.scope),this.toolbarSettings.items.length&&(l.scope&&(t.getComponent(document.querySelector(l.scope),this.getModuleName()).tBListBox=null),i.scope&&(t.getComponent(document.querySelector(i.scope),this.getModuleName()).tBListBox=this));break;case"toolbarSettings":var h=void 0,p=i.toolbarSettings.position,u=this.getToolElem();p&&(t.removeClass([r],["e-right","e-left"]),r.classList.add("e-"+p.toLowerCase()),"Left"===p?r.insertBefore(u,this.list):r.appendChild(u)),i.toolbarSettings.items&&(l.toolbarSettings.items.length&&((h=this.list.parentElement).parentElement.insertBefore(this.list,h),t.detach(h)),this.initToolbarAndStyles(),this.wireToolbarEvent());break;case"selectionSettings":var c=i.selectionSettings.showSelectAll,d=i.selectionSettings.showCheckbox;if(!t.isNullOrUndefined(c)){if(this.showSelectAll=c,this.showSelectAll){var m=new t.L10n(this.getModuleName(),{selectAllText:"Select All",unSelectAllText:"Unselect All"},this.locale);this.checkBoxSelectionModule.checkAllParent=null,this.showSelectAll=!0,this.selectAllText=m.getConstant("selectAllText"),this.unSelectAllText=m.getConstant("selectAllText"),this.popupWrapper=this.list}this.notify("selectAll",{}),this.checkSelectAll()}t.isNullOrUndefined(d)||this.showCheckbox(d),this.selectionSettings.showCheckbox&&this.setCheckboxPosition();break;case"dataSource":this.isDataSourceUpdate=!0,this.jsonData=[].slice.call(this.dataSource)}};var a;return ce([t.Property("")],n.prototype,"cssClass",void 0),ce([t.Property([])],n.prototype,"value",void 0),ce([t.Property("")],n.prototype,"height",void 0),ce([t.Property(!1)],n.prototype,"allowDragAndDrop",void 0),ce([t.Property(1e3)],n.prototype,"maximumSelectionLength",void 0),ce([t.Property(!1)],n.prototype,"allowFiltering",void 0),ce([t.Property("")],n.prototype,"scope",void 0),ce([t.Property(!0)],n.prototype,"ignoreCase",void 0),ce([t.Property(null)],n.prototype,"filterBarPlaceholder",void 0),ce([t.Event()],n.prototype,"beforeItemRender",void 0),ce([t.Event()],n.prototype,"filtering",void 0),ce([t.Event()],n.prototype,"select",void 0),ce([t.Event()],n.prototype,"change",void 0),ce([t.Event()],n.prototype,"beforeDrop",void 0),ce([t.Event()],n.prototype,"dragStart",void 0),ce([t.Event()],n.prototype,"drag",void 0),ce([t.Event()],n.prototype,"drop",void 0),ce([t.Event()],n.prototype,"dataBound",void 0),ce([t.Property(null)],n.prototype,"groupTemplate",void 0),ce([t.Property("No records found")],n.prototype,"noRecordsTemplate",void 0),ce([t.Property("Request failed")],n.prototype,"actionFailureTemplate",void 0),ce([t.Property(1e3)],n.prototype,"zIndex",void 0),ce([t.Property(!1)],n.prototype,"ignoreAccent",void 0),ce([t.Complex({},me)],n.prototype,"toolbarSettings",void 0),ce([t.Complex({},de)],n.prototype,"selectionSettings",void 0),n=a=ce([t.NotifyPropertyChanges],n)}(B),ve={backIcon:"e-input-group-icon e-back-icon e-icons",filterBarClearIcon:"e-input-group-icon e-clear-icon e-icons",filterInput:"e-input-filter",filterParent:"e-filter-parent",clearIcon:"e-clear-icon"};return he.Inject(pe),fe.Inject(pe),e.incrementalSearch=a,e.Search=h,e.highlightSearch=p,e.revertHighlightSearch=c,e.FieldSettings=A,e.dropDownBaseClasses=k,e.DropDownBase=B,e.dropDownListClasses=I,e.DropDownList=N,e.Fields=z,e.TreeSettings=K,e.DropDownTree=_,e.ComboBox=X,e.AutoComplete=Z,e.MultiSelect=he,e.CheckBoxSelection=pe,e.createFloatLabel=d,e.updateFloatLabelState=m,e.removeFloating=f,e.setPlaceHolder=v,e.floatLabelFocus=y,e.floatLabelBlur=g,e.SelectionSettings=de,e.ToolbarSettings=me,e.ListBox=fe,e}({},ej.base,ej.data,ej.lists,ej.popups,ej.inputs,ej.buttons,ej.navigations),this.ejs=ej;
- /*!
- * filename: ej2-drawings.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.drawings=function(t,e){"use strict";function i(){return new Ct(1,0,0,1,0,0,t.MatrixTypes.Identity)}function r(t,e){var i=c(t,e.x,e.y);return{x:Math.round(100*i.x)/100,y:Math.round(100*i.y)/100}}function o(t,e){for(var i=[],o=0,n=e;o<n.length;o++){var a=n[o];i.push(r(t,a))}return i}function n(t,e,i,r){l(t,d(.017453292519943295*(e%=360),i||0,r||0))}function a(t,e,i,r,o){void 0===r&&(r=0),void 0===o&&(o=0),l(t,h(e,i,r,o))}function s(e,i,r){return e.type&t.MatrixTypes.Identity?(e.type=t.MatrixTypes.Translation,void u(e,1,0,0,1,i,r)):e.type&t.MatrixTypes.Unknown?(e.offsetX+=i,void(e.offsetY+=r)):(e.offsetX+=i,e.offsetY+=r,void(e.type|=t.MatrixTypes.Translation))}function h(e,r,o,n){var a=i();return a.type=o||n?t.MatrixTypes.Scaling|t.MatrixTypes.Translation:t.MatrixTypes.Scaling,u(a,e,0,0,r,o-e*o,n-r*n),a}function d(e,r,o){var n=i(),a=Math.sin(e),s=Math.cos(e),h=r*(1-s)+o*a,d=o*(1-s)-r*a;return n.type=t.MatrixTypes.Unknown,u(n,s,a,-a,s,h,d),n}function c(e,i,r){switch(e.type){case t.MatrixTypes.Identity:break;case t.MatrixTypes.Translation:i+=e.offsetX,r+=e.offsetY;break;case t.MatrixTypes.Scaling:i*=e.m11,r*=e.m22;break;case t.MatrixTypes.Translation|t.MatrixTypes.Scaling:i*=e.m11,i+=e.offsetX,r*=e.m22,r+=e.offsetY;break;default:var o=r*e.m21+e.offsetX,n=i*e.m12+e.offsetY;i*=e.m11,i+=o,r*=e.m22,r+=n}return{x:i,y:r}}function l(e,r){var o=e.type,n=r.type;if(n!==t.MatrixTypes.Identity){if(o===t.MatrixTypes.Identity)return y(e,r),void(e.type=r.type);if(n===t.MatrixTypes.Translation)return e.offsetX+=r.offsetX,e.offsetY+=r.offsetY,void(o!==t.MatrixTypes.Unknown&&(e.type|=t.MatrixTypes.Translation));if(o!==t.MatrixTypes.Translation){var a=o<<4|n;switch(a){case 34:return e.m11*=r.m11,void(e.m22*=r.m22);case 35:return e.m11*=r.m11,e.m22*=r.m22,e.offsetX=r.offsetX,e.offsetY=r.offsetY,void(e.type=t.MatrixTypes.Translation|t.MatrixTypes.Scaling);case 36:break;default:switch(a){case 50:return e.m11*=r.m11,e.m22*=r.m22,e.offsetX*=r.m11,void(e.offsetY*=r.m22);case 51:return e.m11*=r.m11,e.m22*=r.m22,e.offsetX=r.m11*e.offsetX+r.offsetX,void(e.offsetY=r.m22*e.offsetY+r.offsetY);case 52:break;default:switch(a){case 66:case 67:case 68:break;default:return}}}var s=i();return u(s,e.m11*r.m11+e.m12*r.m21,e.m11*r.m12+e.m12*r.m22,e.m21*r.m11+e.m22*r.m21,e.m21*r.m12+e.m22*r.m22,e.offsetX*r.m11+e.offsetY*r.m21+r.offsetX,e.offsetX*r.m12+e.offsetY*r.m22+r.offsetY),s.m21||s.m12?s.type=t.MatrixTypes.Unknown:((s.m11&&1!==s.m11||s.m22&&1!==s.m22)&&(s.type=t.MatrixTypes.Scaling),(s.offsetX||s.offsetY)&&(s.type|=t.MatrixTypes.Translation),(s.type&(t.MatrixTypes.Translation|t.MatrixTypes.Scaling))===t.MatrixTypes.Identity&&(s.type=t.MatrixTypes.Identity),s.type=t.MatrixTypes.Scaling|t.MatrixTypes.Translation),y(e,s),void(e.type=s.type)}var h=e.offsetX,d=e.offsetY;if(e.offsetX=h*r.m11+d*r.m21+r.offsetX,e.offsetY=h*r.m12+d*r.m22+r.offsetY,n===t.MatrixTypes.Unknown)return void(e.type=t.MatrixTypes.Unknown);e.type=t.MatrixTypes.Translation|t.MatrixTypes.Scaling}}function u(t,e,i,r,o,n,a){t.m11=e,t.m12=i,t.m21=r,t.m22=o,t.offsetX=n,t.offsetY=a}function y(t,e){t.m11=e.m11,t.m12=e.m12,t.m21=e.m21,t.m22=e.m22,t.offsetX=e.offsetX,t.offsetY=e.offsetY,t.type=e.type}function f(t){var i,r=[];if("msie"===e.Browser.info.name||"edge"===e.Browser.info.name)for(var o=0;o<t.childNodes.length;o++)1===(i=t.childNodes[o]).nodeType&&r.push(i);else r=t.children;return r}function p(t,e){for(var o=[],a=0,s=e;a<s.length;a++){var h=s[a],d={x:t.offsetX-t.actualSize.width*t.pivot.x+h.x,y:t.offsetY-t.actualSize.height*t.pivot.y+h.y},c=void 0,l=t.rotateAngle+t.parentTransform;l&&n(c=i(),l,t.offsetX,t.offsetY),c&&(d=r(c,d)),o.push(d)}return o}function g(t){var e="pathTable";if(window[e]||(window[e]={}),t){window.measureElement.style.visibility="visible";var i=f(window.measureElement.children[2])[0];i.setAttribute("d",t);var r=void 0;window[e][t]?r=window[e][t]:(window[e][t]=r=i.getBBox(),0!==r.x&&0!==r.y||0!==r.width&&0!==r.height||(window[e][t]=r=m(t)));var o=new Pt(r.x,r.y,r.width,r.height);return window.measureElement.style.visibility="hidden",o}return new Pt(0,0,0,0)}function m(t){var e,i=0,r=0,o=0,n=0,a=t;a=a.replace(/[a-z].*/g," ").replace(/[\sA-Z]+/gi," ").trim().split(" ");for(s=0;s<a.length;s++)a[s].length>1&&(i=r=(e=a[s].split(","))[0],o=n=e[1]);for(var s=0;s<a.length;s++)(e=a[s].split(","))[1]||(e[0]=i,e[1]=o),i=Math.min(i,e[0]),r=Math.max(r,e[0]),o=Math.min(o,e[1]),n=Math.max(n,e[1]);return{x:i,y:o,width:r-i,height:n-o}}function x(t,e){var i={fill:t.style.fill,stroke:t.style.strokeColor,angle:t.rotateAngle+t.parentTransform,pivotX:t.pivot.x,pivotY:t.pivot.y,strokeWidth:t.style.strokeWidth,dashArray:t.style.strokeDashArray,opacity:t.style.opacity,visible:t.visible,id:t.id,width:e||t.actualSize.width,height:t.actualSize.height,x:t.offsetX-t.actualSize.width*t.pivot.x+.5,y:t.offsetY-t.actualSize.height*t.pivot.y+.5};return i.fontSize=t.style.fontSize,i.fontFamily=t.style.fontFamily,i.textOverflow=t.style.textOverflow,i.textDecoration=t.style.textDecoration,i.doWrap=t.doWrap,i.whiteSpace=_(t.style.whiteSpace,t.style.textWrapping),i.content=t.content,i.textWrapping=t.style.textWrapping,i.breakWord=W(t.style.textWrapping),i.textAlign=N(t.style.textAlign),i.color=t.style.color,i.italic=t.style.italic,i.bold=t.style.bold,i.dashArray="",i.strokeWidth=0,i.fill="",i}function v(t,e){var i,r,o=[],n=0,a=e||t.content;if("nowrap"!==t.whiteSpace&&"pre"!==t.whiteSpace)if("breakall"===t.breakWord)for(i="",i+=a[0],n=0;n<a.length;n++)if((r=D(i,t))>=t.width&&i.length>0)o[o.length]={text:i,x:0,dy:0,width:r},i="";else{var s=D(i+=a[n+1]||"",t);(Math.ceil(s)+2>=t.width&&i.length>0||i.indexOf("\n")>-1)&&(o[o.length]={text:i,x:0,dy:0,width:s},i=""),n===a.length-1&&i.length>0&&(o[o.length]={text:i,x:0,dy:0,width:s},i="")}else o=w(t,e);else o[o.length]={text:a,x:0,dy:0,width:D(a,t)};return o}function w(t,e){var i,r,o,n,a=[],s="",h=0,d=0,c="nowrap"!==t.whiteSpace,l=(e||t.content).split("\n");for(h=0;h<l.length;h++)for(i="NoWrap"!==t.textWrapping?l[h].split(" "):l,d=0;d<i.length;d++){var u=D(r=(s+=((0!==d||1===i.length)&&c&&s.length>0?" ":"")+i[d])+(i[d+1]||""),t);Math.floor(u)>t.width-2&&s.length>0?(a[a.length]={text:s,x:0,dy:0,width:r===s?u:s===n?o:D(s,t)},s=""):d===i.length-1&&(a[a.length]={text:s,x:0,dy:0,width:u},s=""),n=r,o=u}return a}function b(t,e){var i,r,o={x:0,width:0},n=0;for(n=0;n<e.length;n++)r=i=e[n].width,i="left"===t.textAlign?0:"center"===t.textAlign?i>t.width&&("Ellipsis"===t.textOverflow||"Clip"===t.textOverflow)?0:-i/2:"right"===t.textAlign?-i:e.length>1?0:-i/2,e[n].dy=1.2*t.fontSize,e[n].x=i,o?(o.x=Math.min(o.x,i),o.width=Math.max(o.width,r)):o={x:i,width:r};return o}function S(t,e,i,r,o){var n,a,s=new zt(0,0),h=x(t,r);return t.childNodes=n=v(h,o),t.wrapBounds=a=b(h,n),s.width=a.width,t.wrapBounds.width>=r&&"Wrap"!==h.textOverflow&&(s.width=r),s.height=n.length*t.style.fontSize*1.2,s}function A(t,e){var i;return e&&(i=document.getElementById(e)),i?i.querySelector("#"+t):document.getElementById(t)}function M(t,i){var r=e.createElement(t);return k(r,i),r}function k(t,e){for(var i=Object.keys(e),r=0;r<i.length;r++)t.setAttribute(i[r],e[i[r]])}function z(t,e){var i=null,r=A(t+e+"_diagramAdornerLayer");return r&&(i=r.getElementsByClassName("e-adorner-layer"+e)[0]),i}function P(t,e){var i=null,r=z(t,e);return r&&(i=r.getElementById(t+"_SelectorElement")),i}function C(){if(window.measureElement)window.measureElement.usageCount+=1;else{var t=M("div",{id:"measureElement",style:"visibility:hidden ; height: 0px ; width: 0px; overflow: hidden;"}),e=M("span",{style:"display:inline-block ; line-height: normal"});t.appendChild(e);var i=void 0;i=M("img",{}),t.appendChild(i);var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("xlink","http://www.w3.org/1999/xlink"),t.appendChild(r);var o=document.createElementNS("http://www.w3.org/2000/svg","path");r.appendChild(o);document.createTextNode("");var n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.appendChild(n),window.measureElement=t,window.measureElement.usageCount=1,document.body.appendChild(t)}}function T(t,e){window.measureElement.style.visibility="visible";var i=window.measureElement.children[1];i.setAttribute("src",t);var r=i.getBoundingClientRect(),o=r.width,n=r.height;return e=new zt(o,n),window.measureElement.style.visibility="hidden",e}function R(){for(var t,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",i="",r=0;r<5;r++){if("crypto"in window&&"getRandomValues"in crypto){var o=new Uint16Array(1);t=(window.msCrypto||window.crypto).getRandomValues(o)[0]%(e.length-1)}else t=Math.floor(Math.random()*e.length);0===r&&t<10?r--:i+=e.substring(t,t+1)}return i}function B(t){new Pt;var e=t.offsetY-t.actualSize.height*t.pivot.y,i=t.offsetY+t.actualSize.height*(1-t.pivot.y),r=t.offsetX-t.actualSize.width*t.pivot.x,o=t.offsetX+t.actualSize.width*(1-t.pivot.x),n={x:r,y:e},a={x:o,y:e},s={x:r,y:i},h={x:o,y:i};return Pt.toBounds([n,a,s,h])}function O(t,e){var o=i();n(o,e,0,0);var a=r(o,{x:0,y:0}),s=r(o,{x:t.width,y:0}),h=r(o,{x:0,y:t.height}),d=r(o,{x:t.width,y:t.height}),c=Math.min(a.x,s.x,h.x,d.x),l=Math.min(a.y,s.y,h.y,d.y),u=Math.max(a.x,s.x,h.x,d.x),y=Math.max(a.y,s.y,h.y,d.y);return new zt(u-c,y-l)}function E(t){var e,o=new Pt,a=(e=B(t)).middleLeft,s=e.topCenter,h=e.bottomCenter,d=e.middleRight,c=e.topLeft,l=e.topRight,u=e.bottomLeft,y=e.bottomRight;if(t.corners={topLeft:c,topCenter:s,topRight:l,middleLeft:a,middleRight:d,bottomLeft:u,bottomCenter:h,bottomRight:y},0!==t.rotateAngle||0!==t.parentTransform){var f=i();n(f,t.rotateAngle+t.parentTransform,t.offsetX,t.offsetY),t.corners.topLeft=c=r(f,c),t.corners.topCenter=s=r(f,s),t.corners.topRight=l=r(f,l),t.corners.middleLeft=a=r(f,a),t.corners.middleRight=d=r(f,d),t.corners.bottomLeft=u=r(f,u),t.corners.bottomCenter=h=r(f,h),t.corners.bottomRight=y=r(f,y)}return o=Pt.toBounds([c,l,u,y]),t.corners.left=o.left,t.corners.right=o.right,t.corners.top=o.top,t.corners.bottom=o.bottom,t.corners.center=o.center,t.corners.width=o.width,t.corners.height=o.height,o}function N(t){var e="";switch(t){case"Center":e="center";break;case"Left":e="left";break;case"Right":e="right"}return e}function W(t){var e="";switch(t){case"Wrap":e="breakall";break;case"NoWrap":e="keepall";break;case"WrapWithOverflow":e="normal";break;case"LineThrough":e="line-through"}return e}function D(t,e){window.measureElement.style.visibility="visible";var i=f(window.measureElement.children[2])[1];i.textContent=t,i.setAttribute("style","font-size:"+e.fontSize+"px; font-family:"+e.fontFamily+";font-weight:"+(e.bold?"bold":"normal"));var r=i.getBBox().width;return window.measureElement.style.visibility="hidden",r}function X(t,e){return(t+e)/2}function _(t,e){if("NoWrap"===e&&"PreserveAll"===t)return"pre";var i="";switch(t){case"CollapseAll":i="nowrap";break;case"CollapseSpace":i="pre-line";break;case"PreserveAll":i="pre-wrap"}return i}function L(t,e,o,a){if(0!==t){var s=i();return n(s,t,e,o),r(s,a)}return a}function Y(t,e){return{x:t.x+e.desiredSize.width*e.pivot.x,y:t.y+e.desiredSize.height*e.pivot.y}}function I(t){var e,i=[],r=j(t);if(r.length>0)for(var o=0;o<r.length;o++){var n=r[o],a="";switch((a=n[0]).toLowerCase()){case"m":for(e=1;e<n.length;e++)i.push({command:a,x:n[e],y:n[e+1]}),e+=1,"m"===a?a="l":"M"===a&&(a="L");break;case"l":case"t":for(e=1;e<n.length;e++)i.push({command:a,x:n[e],y:n[e+1]}),e+=1;break;case"h":for(e=1;e<n.length;e++)i.push({command:a,x:n[e]});break;case"v":for(e=1;e<n.length;e++)i.push({command:a,y:n[e]});break;case"z":i.push({command:a});break;case"c":for(e=1;e<n.length;e++)i.push({command:a,x1:n[e],y1:n[e+1],x2:n[e+2],y2:n[e+3],x:n[e+4],y:n[e+5]}),e+=5;break;case"s":for(e=1;e<n.length;e++)i.push({command:a,x2:n[e],y2:n[e+1],x:n[e+2],y:n[e+3]}),e+=3;break;case"q":for(e=1;e<n.length;e++)i.push({command:a,x1:n[e],y1:n[e+1],x:n[e+2],y:n[e+3]}),e+=3;break;case"a":for(e=1;e<n.length;e++)i.push({command:a,r1:n[e],r2:n[e+1],angle:n[e+2],largeArc:n[e+3],sweep:n[e+4],x:n[e+5],y:n[e+6]}),e+=6}}return i}function j(t){var e=/([a-z]+)|([+-]?(?:\d+\.?\d*|\.\d+))/gi,i=[],r=[],o={};e.lastIndex=0;var n=!1;for(o=e.exec(t);o;)"e"===o[1]?n=!0:o[1]?("zm"===o[1].toLowerCase()?(i.length&&r.push(i),r.push(["Z"]),i=[o[1].substring(1,2)]):(i.length&&r.push(i),i=[o[1]]),n=!1):(i.length||(i=[]),n||i.push(Number(o[2])),n=!1),o=e.exec(t);return i.length&&r.push(i),r}function F(t,e,i){var r,o,n="",a=[{x:0+t,y:0},{x:0+i-t,y:0},{x:0+i,y:0+t},{x:0+i,y:0+e-t},{x:0+i-t,y:0+e},{x:0+t,y:0+e},{x:0,y:0+e-t},{x:0,y:0+t}],s=[{x:0+i,y:0},{x:0+i,y:0+e},{x:0,y:0+e},{x:0,y:0}],h=0;n="M"+a[0].x+" "+a[0].y;var d;for(d=0;d<a.length;d+=2)n+="L"+(r=a[d+1]).x+" "+r.y,o=a[d+2]||a[0],n+="Q"+s[h].x+" "+s[h].y+" "+o.x+" "+o.y,h++;return n}function U(t){var e,i,r,o,n,a,s,h,d,c,l=[];for(s=0,h=0,c=0,d=t.length;c<d;++c){var u=t[c],y="";y=u.command,"y1"in u&&(o=u.y1),"y2"in u&&(a=u.y2),"x1"in u&&(r=u.x1),"x2"in u&&(n=u.x2),"x"in u&&(s=u.x),"y"in u&&(h=u.y);var f=l[l.length-1];switch(y){case"M":l.push({command:"M",x:s,y:h});break;case"L":l.push({command:"L",x0:e,y0:i,x:s,y:h});break;case"H":l.push({command:"L",x0:e,y0:i,x:s,y:i});break;case"V":l.push({command:"L",x0:e,y0:i,x:e,y:h});break;case"C":l.push({command:"C",x0:e,y0:i,x1:r,y1:o,x2:n,y2:a,x:s,y:h});break;case"S":if(f){var p=void 0,g={x:2*e-(p="C"===f.command||"S"===f.command?{x:f.x2,y:f.y2}:{x:e,y:i}).x,y:2*i-p.y};l.push({command:"C",x0:e,y0:i,x1:g.x,y1:g.y,x2:n,y2:a,x:s,y:h})}break;case"Q":l.push({command:"Q",x0:e,y0:i,x1:r,y1:o,x:s,y:h});break;case"T":if(f){var p=void 0,g={x:2*e-(p="Q"===f.command?{x:f.x1,y:f.y1}:{x:e,y:i}).x,y:2*i-p.y};l.push({command:"Q",x0:e,y0:i,x1:g.x,y1:g.y,x:s,y:h})}break;case"A":var m=u;m.command="A",l.push(m);break;case"Z":case"z":l.push({command:"Z"}),s=e,h=i}e=s,i=h}return l}function V(t,e,i,r,o,n,a,s){var h,d,c,l,u,y,f,p,g;for(u=0,y=0,p=0,f=t.length;p<f;++p){var m=t[p],x=m.command;"x"in m&&(u=m.x),"y"in m&&(y=m.y),"y1"in m&&(d=m.y1),"y2"in m&&(l=m.y2),"x1"in m&&(h=m.x1),"x2"in m&&(c=m.x2),r?(void 0!==u&&(u=Z(u,e,o,a)),void 0!==y&&(y=Z(y,i,n,s)),void 0!==h&&(h=Z(h,e,o,a)),void 0!==d&&(d=Z(d,i,n,s)),void 0!==c&&(c=Z(c,e,o,a)),void 0!==l&&(l=Z(l,i,n,s))):(void 0!==u&&(u=Number((u+e).toFixed(2))),void 0!==y&&(y=Number((y+i).toFixed(2))),void 0!==h&&(h=Number((h+e).toFixed(2))),void 0!==d&&(d=Number((d+i).toFixed(2))),void 0!==c&&(c=Number((c+e).toFixed(2))),void 0!==l&&(l=Number((l+i).toFixed(2)))),(g=H(m,x,{x:u,y:y,x1:h,y1:d,x2:c,y2:l,r1:m.r1,r2:m.r2},r,e,i))&&(t[p]=g)}return Q(t)}function H(t,e,i,r,o,n){switch(e){case"M":case"L":t.x=i.x,t.y=i.y;break;case"H":t.x=i.x;break;case"V":t.y=i.y;break;case"C":t.x=i.x,t.y=i.y,t.x1=i.x1,t.y1=i.y1,t.x2=i.x2,t.y2=i.y2;break;case"S":t.x=i.x,t.y=i.y,t.x2=i.x2,t.y2=i.y2;break;case"Q":t.x=i.x,t.y=i.y,t.x1=i.x1,t.y1=i.y1;break;case"T":t.x=i.x,t.y=i.y;break;case"A":var a=i.r1,s=i.r2;r&&(i.r1=a*=o,i.r2=s*=n),t.x=i.x,t.y=i.y,t.r1=i.r1,t.r2=i.r2;break;case"z":case"Z":t={command:"Z"}}return t}function Z(t,e,i,r){return t!==i?t=r!==i?t*e-(Number(i)*e-Number(i))+(r-Number(i)):Number(t)*e-(Number(i)*e-Number(i)):r!==i&&(t=r),Number(t.toFixed(2))}function q(t){var e,i,r,o,n,a,s,h,d,c;for(s=0,h=0,c=0,d=t.length;c<d;++c){var l=t[c],u=l.command;if(/[MLHVCSQTA]/.test(u))"x"in l&&(l.x=s=l.x),"y"in l&&(l.y=h=l.y);else{"x1"in l&&(l.x1=r=s+l.x1),"x2"in l&&(l.x2=n=s+l.x2),"y1"in l&&(l.y1=o=h+l.y1),"y2"in l&&(l.y2=a=h+l.y2),"x"in l&&(l.x=s+=l.x),"y"in l&&(l.y=h+=l.y);var y=void 0;switch(u){case"m":case"M":y={command:"M",x:s,y:h};break;case"l":case"L":y={command:"L",x:s,y:h};break;case"h":case"H":y={command:"H",x:s};break;case"v":case"V":y={command:"V",y:h};break;case"c":case"C":y={command:"C",x:s,y:h,x1:r,y1:o,x2:n,y2:a};break;case"s":case"S":y={command:"S",x:s,y:h,x2:n,y2:a};break;case"q":case"Q":y={command:"Q",x:s,y:h,x1:r,y1:o};break;case"t":case"T":y={command:"T",x:s,y:h};break;case"a":case"A":(y={command:"A",x:s,y:h}).r1=l.r1,y.r2=l.r2,y.angle=l.angle,y.largeArc=l.largeArc,y.sweep=l.sweep;break;case"z":case"Z":y={command:"Z"},s=e,h=i,y=t[c]}y&&(t[c]=y)}"M"!==u&&"m"!==u||(e=s,i=h)}return t}function Q(t){var e,i="";for(e=0;e<t.length;e++)i+=0===e?G(t[e]):" "+G(t[e]);return i}function G(t){var e="";switch(t.command){case"Z":case"z":e=t.command;break;case"M":case"m":case"L":case"l":e=t.command+" "+t.x+" "+t.y;break;case"C":case"c":e=t.command+" "+t.x1+" "+t.y1+" "+t.x2+" "+t.y2+" "+t.x+" "+t.y;break;case"Q":case"q":e=t.command+" "+t.x1+" "+t.y1+" "+t.x+" "+t.y;break;case"A":case"a":var i=t.command,r=t.angle,o=t.largeArc?"1":"0",n=t.sweep?"1":"0";e=i+" "+t.r1+" "+t.r2+" "+r+" "+o+" "+n+" "+t.x+" "+t.y;break;case"H":case"h":e=t.command+" "+t.x;break;case"V":case"v":e=t.command+" "+t.y;break;case"S":case"s":e=t.command+" "+t.x2+" "+t.y2+" "+t.x+" "+t.y;break;case"T":case"t":e=t.command+" "+t.x+" "+t.y}return e}function J(t,e,i){for(var r=0;r<e.length;r++)i.renderElement(e[r],t,void 0)}function K(t,e){for(var i=Object.keys(e),r=0;r<i.length;r++)t.setAttribute(i[r],e[i[r]])}function $(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg",t);return K(i,e),i}function tt(t,e,i){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");return K(r,{id:t,width:e,height:i}),r}function et(t,e,i){return t&&t.id&&e&&"selector"===e?this.pdfViewer.adornerSvgLayer:i}function it(t,e,i){var r;r=jt.findLength(e,t)>jt.findLength(i,t)?i:e;var o=jt.findAngle(e,i),n=jt.findAngle(r,t),a=jt.findLength(r,t),s=n+2*(o-n);return{x:r.x+a*Math.cos(s*Math.PI/180),y:r.y+a*Math.sin(s*Math.PI/180)}}function rt(t,e,i){return ot(t.wrapper,e,i)}function ot(t,e,i){for(var r=t.children.length-1;r>=0;r--){var o=t.children[r];if(o&&o.bounds.containsPoint(e,0)){if(o instanceof Bt){var n=this.findTargetElement(o,e);if(n)return n}if(o.bounds.containsPoint(e,0))return o}}return t.bounds.containsPoint(e,i)&&"none"!==t.style.fill?t:null}function nt(t,e){var i={x:0,y:0},r=t,o=e,n=(o.y2-o.y1)*(r.x2-r.x1)-(o.x2-o.x1)*(r.y2-r.y1),a=(o.x2-o.x1)*(r.y1-o.y1)-(o.y2-o.y1)*(r.x1-o.x1),s=(r.x2-r.x1)*(r.y1-o.y1)-(r.y2-r.y1)*(r.x1-o.x1);if(0===n)return{enabled:!1,intersectPt:i};var h=a/n,d=s/n;return h>=0&&h<=1&&d>=0&&d<=1?(i.x=r.x1+h*(r.x2-r.x1),i.y=r.y1+h*(r.y2-r.y1),{enabled:!0,intersectPt:i}):{enabled:!1,intersectPt:i}}function at(t,e,i,r){var o={x:0,y:0},n=nt(st(t.x,t.y,e.x,e.y),st(i.x,i.y,r.x,r.y));return n.enabled?n.intersectPt:o}function st(t,e,i,r){return{x1:Number(t)||0,y1:Number(e)||0,x2:Number(i)||0,y2:Number(r)||0}}function ht(t,e,i){var r=[];i=i||0;var o={x:e.topLeft.x-i,y:e.topLeft.y},n={x:e.topRight.x+i,y:e.topRight.y},a={x:e.bottomRight.x,y:e.bottomRight.y-i},s={x:e.bottomLeft.x,y:e.bottomLeft.y+i};return r.push(o),r.push(n),r.push(a),r.push(s),r}function dt(t,e){return Math.abs(e.x-t.x)>Math.abs(e.y-t.y)?t.x<e.x?"right":"left":t.y<e.y?"bottom":"top"}function ct(t,e){for(var i=e.style,r=e,o=0,n=Object.keys(t);o<n.length;o++)switch(n[o]){case"fill":i.fill=t.fill,i instanceof Mt&&(i.fill="transparent");break;case"textOverflow":i.textOverflow=t.textOverflow;break;case"opacity":i.opacity=t.opacity;break;case"strokeColor":i.strokeColor=t.strokeColor;break;case"strokeDashArray":i.strokeDashArray=t.strokeDashArray;break;case"strokeWidth":i.strokeWidth=t.strokeWidth;break;case"bold":i.bold=t.bold;break;case"color":i.color=t.color;break;case"textWrapping":i.textWrapping=t.textWrapping;break;case"fontFamily":i.fontFamily=t.fontFamily;break;case"fontSize":i.fontSize=t.fontSize;break;case"italic":i.italic=t.italic;break;case"textAlign":i.textAlign=t.textAlign;break;case"whiteSpace":i.whiteSpace=t.whiteSpace;break;case"textDecoration":i.textDecoration=t.textDecoration}e instanceof Et&&r.refreshTextElement()}function lt(t,e,o,a){if(void 0!==t.width&&void 0!==t.height&&(t.width*=e,t.height*=o),t instanceof Bt){var s=i(),h=a.width||a.actualSize.width,d=a.height||a.actualSize.height;if(void 0!==h&&void 0!==d){var c=a.offsetX-h*a.pivot.x,l=a.offsetY-d*a.pivot.y,u={x:c+h*a.pivot.x,y:l+d*a.pivot.y};u=L(a.rotateAngle,a.offsetX,a.offsetY,u),n(s,-a.rotateAngle,u.x,u.y),n(s,a.rotateAngle,u.x,u.y);for(var y=0,f=t.children;y<f.length;y++){var p=f[y];if(void 0!==p.width&&void 0!==p.height){var g=r(s,{x:p.offsetX,y:p.offsetY});p.offsetX=g.x,p.offsetY=g.y,lt(p,e,o,a)}}}}}function ut(t,e,i){return t.x>=e.x-i&&t.x<=e.x+i&&t.y>=e.y-i&&t.y<=e.y+i}function yt(t,e,o,a,s,h,d,c){var l={x:0,y:0},u=i();switch(n(u,s,h,d),c.x){case 0:switch(c.y){case 0:l=r(u,{x:t,y:e});break;case.5:l=r(u,{x:t,y:e+a/2});break;case 1:l=r(u,{x:t,y:e+a})}break;case.5:switch(c.y){case 0:l=r(u,{x:t+o/2,y:e});break;case.5:l=r(u,{x:t+o/2,y:e+a/2});break;case 1:l=r(u,{x:t+o/2,y:e+a})}break;case 1:switch(c.y){case 0:l=r(u,{x:t+o,y:e});break;case.5:l=r(u,{x:t+o,y:e+a/2});break;case 1:l=r(u,{x:t+o,y:e+a})}}return{x:l.x,y:l.y}}var ft=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),pt=function(t,e,i,r){var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a},gt=function(t){switch(t.type){case"Linear":return bt;case"Radial":return St;default:return bt}},mt=function(){function t(t,e,i,r){this.left=t,this.right=e,this.top=i,this.bottom=r}return t}(),xt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ft(i,t),pt([e.Property(0)],i.prototype,"left",void 0),pt([e.Property(0)],i.prototype,"right",void 0),pt([e.Property(0)],i.prototype,"top",void 0),pt([e.Property(0)],i.prototype,"bottom",void 0),i}(e.ChildProperty),vt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ft(i,t),i.prototype.getClassName=function(){return"Stop"},pt([e.Property("")],i.prototype,"color",void 0),pt([e.Property(0)],i.prototype,"offset",void 0),pt([e.Property(1)],i.prototype,"opacity",void 0),i}(e.ChildProperty),wt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ft(i,t),pt([e.Collection([],vt)],i.prototype,"stops",void 0),pt([e.Property("None")],i.prototype,"type",void 0),pt([e.Property("")],i.prototype,"id",void 0),i}(e.ChildProperty),bt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ft(i,t),pt([e.Property(0)],i.prototype,"x1",void 0),pt([e.Property(0)],i.prototype,"x2",void 0),pt([e.Property(0)],i.prototype,"y1",void 0),pt([e.Property(0)],i.prototype,"y2",void 0),i}(wt),St=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ft(i,t),pt([e.Property(0)],i.prototype,"cx",void 0),pt([e.Property(0)],i.prototype,"cy",void 0),pt([e.Property(0)],i.prototype,"fx",void 0),pt([e.Property(0)],i.prototype,"fy",void 0),pt([e.Property(50)],i.prototype,"r",void 0),i}(wt),At=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ft(i,t),pt([e.Property("white")],i.prototype,"fill",void 0),pt([e.Property("black")],i.prototype,"strokeColor",void 0),pt([e.Property("")],i.prototype,"strokeDashArray",void 0),pt([e.Property(1)],i.prototype,"strokeWidth",void 0),pt([e.Property(1)],i.prototype,"opacity",void 0),pt([e.ComplexFactory(gt)],i.prototype,"gradient",void 0),i}(e.ChildProperty),Mt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ft(i,t),pt([e.Property("transparent")],i.prototype,"fill",void 0),i}(At),kt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ft(i,t),pt([e.Property("black")],i.prototype,"color",void 0),pt([e.Property("Arial")],i.prototype,"fontFamily",void 0),pt([e.Property(12)],i.prototype,"fontSize",void 0),pt([e.Property(!1)],i.prototype,"italic",void 0),pt([e.Property(!1)],i.prototype,"bold",void 0),pt([e.Property("CollapseSpace")],i.prototype,"whiteSpace",void 0),pt([e.Property("WrapWithOverflow")],i.prototype,"textWrapping",void 0),pt([e.Property("Center")],i.prototype,"textAlign",void 0),pt([e.Property("None")],i.prototype,"textDecoration",void 0),pt([e.Property("Wrap")],i.prototype,"textOverflow",void 0),pt([e.Property("transparent")],i.prototype,"fill",void 0),i}(At);!function(t){t[t.Self=1]="Self",t[t.Parent=2]="Parent"}(t.RotateTransform||(t.RotateTransform={})),function(t){t[t.None=0]="None",t[t.ElementIsPort=2]="ElementIsPort",t[t.ElementIsGroup=4]="ElementIsGroup"}(t.ElementAction||(t.ElementAction={})),function(t){t[t.None=1]="None",t[t.Select=2]="Select",t[t.Delete=4]="Delete",t[t.Drag=8]="Drag",t[t.DragSourceEnd=16]="DragSourceEnd",t[t.DragTargetEnd=32]="DragTargetEnd",t[t.DragSegmentThumb=64]="DragSegmentThumb",t[t.AllowDrop=128]="AllowDrop",t[t.Bridging=256]="Bridging",t[t.BridgeObstacle=512]="BridgeObstacle",t[t.InheritBridging=1024]="InheritBridging",t[t.PointerEvents=2048]="PointerEvents",t[t.Tooltip=4096]="Tooltip",t[t.InheritTooltip=8192]="InheritTooltip",t[t.Interaction=4218]="Interaction",t[t.ReadOnly=16384]="ReadOnly",t[t.Default=11838]="Default"}(t.ConnectorConstraints||(t.ConnectorConstraints={})),function(t){t[t.Rotate=2]="Rotate",t[t.ConnectorSource=4]="ConnectorSource",t[t.ConnectorTarget=8]="ConnectorTarget",t[t.ResizeNorthEast=16]="ResizeNorthEast",t[t.ResizeEast=32]="ResizeEast",t[t.ResizeSouthEast=64]="ResizeSouthEast",t[t.ResizeSouth=128]="ResizeSouth",t[t.ResizeSouthWest=256]="ResizeSouthWest",t[t.ResizeWest=512]="ResizeWest",t[t.ResizeNorthWest=1024]="ResizeNorthWest",t[t.ResizeNorth=2048]="ResizeNorth",t[t.Default=4094]="Default"}(t.ThumbsConstraints||(t.ThumbsConstraints={})),function(t){t[t.None=1]="None",t[t.ConnectorSourceThumb=2]="ConnectorSourceThumb",t[t.ConnectorTargetThumb=4]="ConnectorTargetThumb",t[t.ResizeSouthEast=8]="ResizeSouthEast",t[t.ResizeSouthWest=16]="ResizeSouthWest",t[t.ResizeNorthEast=32]="ResizeNorthEast",t[t.ResizeNorthWest=64]="ResizeNorthWest",t[t.ResizeEast=128]="ResizeEast",t[t.ResizeWest=256]="ResizeWest",t[t.ResizeSouth=512]="ResizeSouth",t[t.ResizeNorth=1024]="ResizeNorth",t[t.Rotate=2048]="Rotate",t[t.UserHandle=4096]="UserHandle",t[t.ToolTip=8192]="ToolTip",t[t.ResizeAll=2046]="ResizeAll",t[t.All=16382]="All"}(t.SelectorConstraints||(t.SelectorConstraints={})),function(t){t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Three=3]="Three",t[t.Four=4]="Four",t[t.Five=5]="Five"}(t.NoOfSegments||(t.NoOfSegments={}));var zt=function(){function t(t,e){this.width=t,this.height=e}return t.prototype.clone=function(){return new t(this.width,this.height)},t}(),Pt=function(){function t(t,e,i,r){this.x=Number.MAX_VALUE,this.y=Number.MAX_VALUE,this.width=0,this.height=0,void 0===t||void 0===e?(t=e=Number.MAX_VALUE,i=r=0):(void 0===i&&(i=0),void 0===r&&(r=0)),this.x=t,this.y=e,this.width=i,this.height=r}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topLeft",{get:function(){return{x:this.left,y:this.top}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topRight",{get:function(){return{x:this.right,y:this.top}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomLeft",{get:function(){return{x:this.left,y:this.bottom}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomRight",{get:function(){return{x:this.right,y:this.bottom}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"middleLeft",{get:function(){return{x:this.left,y:this.y+this.height/2}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"middleRight",{get:function(){return{x:this.right,y:this.y+this.height/2}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topCenter",{get:function(){return{x:this.x+this.width/2,y:this.top}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomCenter",{get:function(){return{x:this.x+this.width/2,y:this.bottom}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"center",{get:function(){return{x:this.x+this.width/2,y:this.y+this.height/2}},enumerable:!0,configurable:!0}),t.prototype.equals=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},t.prototype.uniteRect=function(t){var e=Math.max(Number.NaN===this.right||this.x===Number.MAX_VALUE?t.right:this.right,t.right),i=Math.max(Number.NaN===this.bottom||this.y===Number.MAX_VALUE?t.bottom:this.bottom,t.bottom);return this.x=Math.min(this.left,t.left),this.y=Math.min(this.top,t.top),this.width=e-this.x,this.height=i-this.y,this},t.prototype.unitePoint=function(t){if(this.x===Number.MAX_VALUE)return this.x=t.x,void(this.y=t.y);var e=Math.min(this.left,t.x),i=Math.min(this.top,t.y),r=Math.max(this.right,t.x),o=Math.max(this.bottom,t.y);this.x=e,this.y=i,this.width=r-this.x,this.height=o-this.y},t.prototype.intersection=function(e){if(this.intersects(e)){var i=Math.max(this.left,e.left),r=Math.max(this.top,e.top);return new t(i,r,Math.min(this.right,e.right)-i,Math.min(this.bottom,e.bottom)-r)}return t.empty},t.prototype.Inflate=function(t){return this.x-=t,this.y-=t,this.width+=2*t,this.height+=2*t,this},t.prototype.intersects=function(t){return!(this.right<t.left||this.left>t.right||this.top>t.bottom||this.bottom<t.top)},t.prototype.containsRect=function(t){return this.left<=t.left&&this.right>=t.right&&this.top<=t.top&&this.bottom>=t.bottom},t.prototype.containsPoint=function(t,e){return void 0===e&&(e=0),this.left-e<=t.x&&this.right+e>=t.x&&this.top-e<=t.y&&this.bottom+e>=t.y},t.prototype.toPoints=function(){var t=[];return t.push(this.topLeft),t.push(this.topRight),t.push(this.bottomLeft),t.push(this.bottomRight),t},t.toBounds=function(e){for(var i=new t,r=0,o=e;r<o.length;r++){var n=o[r];i.unitePoint(n)}return i},t.prototype.scale=function(t,e){this.width*=t,this.height*=e},t.prototype.offset=function(t,e){this.x+=t,this.y+=e},t.empty=new t(Number.MAX_VALUE,Number.MIN_VALUE,0,0),t}();!function(t){t[t.Identity=0]="Identity",t[t.Translation=1]="Translation",t[t.Scaling=2]="Scaling",t[t.Unknown=4]="Unknown"}(t.MatrixTypes||(t.MatrixTypes={}));var Ct=function(){function t(t,e,i,r,o,n,a){this.m11=t,this.m12=e,this.m21=i,this.m22=r,this.offsetX=o,this.offsetY=n,this.type=a}return t}(),Tt=function(){function e(){this.pivot={x:.5,y:.5},this.rotateValue={x:0,y:0,angle:0},this.isDirt=!0,this.offsetX=0,this.offsetY=0,this.cornerRadius=0,this.minHeight=void 0,this.minWidth=void 0,this.maxWidth=void 0,this.maxHeight=void 0,this.width=void 0,this.height=void 0,this.horizontalAlignment="Auto",this.verticalAlignment="Auto",this.visible=!0,this.rotateAngle=0,this.margin={left:0,right:0,top:0,bottom:0},this.relativeMode="Point",this.transform=t.RotateTransform.Self|t.RotateTransform.Parent,this.style={fill:"white",strokeColor:"black",opacity:1,strokeWidth:1},this.desiredSize=new zt,this.actualSize=new zt,this.parentTransform=0,this.preventContainer=!1,this.bounds=new Pt(0,0,0,0),this.staticSize=!1,this.isRectElement=!1,this.isCalculateDesiredSize=!0,this.elementActions=t.ElementAction.None,this.position=void 0,this.unitMode=void 0,this.float=!1,this.floatingBounds=void 0}return e.prototype.setOffsetWithRespectToBounds=function(t,e,i){this.unitMode=i,this.position={x:t,y:e}},e.prototype.getAbsolutePosition=function(t){if(void 0!==this.position)return"Absolute"===this.unitMode?this.position:{x:this.position.x*t.width,y:this.position.y*t.height}},Object.defineProperty(e.prototype,"outerBounds",{get:function(){return this.floatingBounds||this.bounds},set:function(t){this.floatingBounds=t},enumerable:!0,configurable:!0}),e.prototype.measure=function(t){var e=void 0!==this.width?this.width:(t.width||0)-this.margin.left-this.margin.right,i=void 0!==this.height?this.height:(t.height||0)-this.margin.top-this.margin.bottom;return this.desiredSize=new zt(e,i),this.isCalculateDesiredSize&&(this.desiredSize=this.validateDesiredSize(this.desiredSize,t)),this.desiredSize},e.prototype.arrange=function(t){return this.actualSize=t,this.updateBounds(),this.actualSize},e.prototype.updateBounds=function(){this.bounds=E(this)},e.prototype.validateDesiredSize=function(t,e){return!this.isRectElement||this.width||this.minWidth||this.maxWidth||(t.width=50),!this.isRectElement||this.height||this.minHeight||this.maxHeight||(t.height=50),(void 0===t||void 0!==this.width&&void 0!==this.height)&&((t=t||new zt).width=void 0===this.width?(e.width||0)-this.margin.left-this.margin.right:this.width,t.height=void 0===this.height?(e.height||0)-this.margin.top-this.margin.bottom:this.height),void 0!==this.minWidth&&(t.width=Math.max(t.width,this.minWidth)),void 0!==this.minHeight&&(t.height=Math.max(t.height,this.minHeight)),void 0!==this.maxWidth&&(t.width=Math.min(t.width,this.maxWidth)),void 0!==this.maxHeight&&(t.height=Math.min(t.height,this.maxHeight)),t},e}(),Rt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.desiredBounds=void 0,e.measureChildren=!0,e.prevRotateAngle=0,e}return Rt(e,t),e.prototype.hasChildren=function(){return void 0!==this.children&&this.children.length>0},e.prototype.measure=function(t){this.desiredBounds=void 0;var i,r,o=void 0;if(this.hasChildren()){for(var n=0;n<this.children.length;n++){"Stretch"!==(i=this.children[n]).horizontalAlignment||t.width||(t.width=i.bounds.width),"Stretch"!==i.verticalAlignment||t.height||(t.height=i.bounds.height);var a="Stretch"===i.horizontalAlignment||"Stretch"===i.verticalAlignment;(this.measureChildren||a||i instanceof e&&void 0!==i.measureChildren)&&i.measure(t),r=this.GetChildrenBounds(i),"Stretch"!==i.horizontalAlignment&&"Stretch"!==i.verticalAlignment?void 0===this.desiredBounds?this.desiredBounds=r:this.desiredBounds.uniteRect(r):!this.actualSize||this.actualSize.width||this.actualSize.height||i.preventContainer||"Stretch"!==i.horizontalAlignment||"Stretch"!==i.verticalAlignment||(void 0===this.desiredBounds?this.desiredBounds=i.bounds:this.desiredBounds.uniteRect(i.bounds))}if(void 0!==this.desiredBounds&&0!==this.rotateAngle){var s={x:this.desiredBounds.x+this.desiredBounds.width*this.pivot.x,y:this.desiredBounds.y+this.desiredBounds.height*this.pivot.y},h=L(this.rotateAngle,void 0,void 0,s);this.desiredBounds.x=h.x-this.desiredBounds.width*this.pivot.x,this.desiredBounds.y=h.y-this.desiredBounds.height*this.pivot.y}this.desiredBounds&&(o=new zt(this.desiredBounds.width,this.desiredBounds.height))}return o=this.validateDesiredSize(o,t),this.stretchChildren(o),this.desiredSize=o,o},e.prototype.arrange=function(t){var i,r=this.desiredBounds;if(r){this.offsetX,this.offsetY;if(this.offsetX=r.x+r.width*this.pivot.x,this.offsetY=r.y+r.height*this.pivot.y,this.hasChildren())for(var o=0;o<this.children.length;o++){var n=!1;"Stretch"===(i=this.children[o]).horizontalAlignment&&(i.offsetX=this.offsetX,i.parentTransform=this.parentTransform+this.rotateAngle,n=!0),"Stretch"===i.verticalAlignment&&(i.offsetY=this.offsetY,i.parentTransform=this.parentTransform+this.rotateAngle,n=!0),(n||this.measureChildren||i instanceof e&&void 0!==i.measureChildren)&&i.arrange(i.desiredSize)}}return this.actualSize=t,this.updateBounds(),this.prevRotateAngle=this.rotateAngle,t},e.prototype.stretchChildren=function(t){if(this.hasChildren())for(var i=0,r=this.children;i<r.length;i++){var o=r[i];"Stretch"!==o.horizontalAlignment&&void 0!==o.desiredSize.width||(o.desiredSize.width=t.width-o.margin.left-o.margin.right),"Stretch"!==o.verticalAlignment&&void 0!==o.desiredSize.height||(o.desiredSize.height=t.height-o.margin.top-o.margin.bottom),o instanceof e&&o.stretchChildren(o.desiredSize)}},e.prototype.findChildOffsetFromCenter=function(t,e){var i=Y({x:e.x-t.desiredSize.width/2,y:e.y-t.desiredSize.height/2},t);i=L(t.rotateAngle,e.x,e.y,i),i=L(this.rotateAngle+this.parentTransform,this.offsetX,this.offsetY,i),t.offsetX=i.x,t.offsetY=i.y},e.prototype.GetChildrenBounds=function(t){var e;e=t.desiredSize.clone();t.rotateAngle,this.rotateAngle;var i={x:t.offsetX,y:t.offsetY},r=i.x-e.width*t.pivot.x,o=i.y-e.height*t.pivot.y,n=r+e.width,a=o+e.height,s={x:r,y:o},h={x:n,y:o},d={x:r,y:a},c={x:n,y:a};return s=L(t.rotateAngle,t.offsetX,t.offsetY,s),h=L(t.rotateAngle,t.offsetX,t.offsetY,h),d=L(t.rotateAngle,t.offsetX,t.offsetY,d),c=L(t.rotateAngle,t.offsetX,t.offsetY,c),0!==this.rotateAngle&&(s=L(-this.rotateAngle,void 0,void 0,s),h=L(-this.rotateAngle,void 0,void 0,h),d=L(-this.rotateAngle,void 0,void 0,d),c=L(-this.rotateAngle,void 0,void 0,c)),Pt.toBounds([s,h,d,c])},e}(Tt),Ot=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Et=function(t){function e(){var e=t.call(this)||this;return e.textContent="",e.canMeasure=!0,e.canConsiderBounds=!0,e.doWrap=!0,e.textNodes=[],e.style={color:"black",fill:"transparent",strokeColor:"black",strokeWidth:1,fontFamily:"Arial",fontSize:12,whiteSpace:"CollapseSpace",textWrapping:"WrapWithOverflow",textAlign:"Center",italic:!1,bold:!1,textDecoration:"None",strokeDashArray:"",opacity:1,textOverflow:"Wrap"},e.style.fill="transparent",e.style.strokeColor="transparent",e}return Ot(e,t),Object.defineProperty(e.prototype,"content",{get:function(){return this.textContent},set:function(t){this.textContent!==t&&(this.textContent=t,this.isDirt=!0,this.doWrap=!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.textNodes},set:function(t){this.textNodes=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrapBounds",{get:function(){return this.textWrapBounds},set:function(t){this.textWrapBounds=t},enumerable:!0,configurable:!0}),e.prototype.refreshTextElement=function(){this.isDirt=!0},e.prototype.measure=function(t){var e;return e=this.isDirt&&this.canMeasure?S(this,this.style,this.content,this.width||t.width):this.desiredSize,void 0===this.width||void 0===this.height?this.desiredSize=new zt(e.width,e.height):this.desiredSize=new zt(this.width,this.height),this.desiredSize=this.validateDesiredSize(this.desiredSize,t),this.desiredSize},e.prototype.arrange=function(t){return(t.width!==this.actualSize.width||t.height!==this.actualSize.height||this.isDirt)&&(this.doWrap=!0),this.actualSize=t,this.updateBounds(),this.isDirt=!1,this.actualSize},e}(Tt),Nt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wt=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.measureChildren=void 0,t}return Nt(o,e),o.prototype.measure=function(t){var i=void 0,r=void 0;if(this.hasChildren()){for(var o=0,n=this.children;o<n.length;o++){var a=n[o];if(a instanceof Et){if(!a.canMeasure)break;t.width=t.width||this.maxWidth||this.minWidth,a.measure(t)}else a instanceof Et||a.measure(t);var s=a.desiredSize.clone();0!==a.rotateAngle&&(s=O(s,a.rotateAngle));var h=s.width+a.margin.right,d=s.height+a.margin.bottom,c=new Pt(a.margin.left,a.margin.top,h,d);a.float&&void 0!==a.getAbsolutePosition(s)||(a instanceof Et&&!(a instanceof Et&&a.canConsiderBounds)||(void 0===r?r=c:r.uniteRect(c)))}if(r){var l=0,u=0;l=Math.max(r.left,0),u=Math.max(r.top,0),i=new zt(r.width+l,r.height+u)}}return i=e.prototype.validateDesiredSize.call(this,i,t),e.prototype.stretchChildren.call(this,i),this.desiredSize=i,i},o.prototype.arrange=function(o){if(this.outerBounds=new Pt,this.hasChildren()){var a=void 0,s=void 0;a=this.offsetY-o.height*this.pivot.y,s=this.offsetX-o.width*this.pivot.x;for(var h=0,d=this.children;h<d.length;h++){var c=d[h];if(0!=(c.transform&t.RotateTransform.Parent)){c.parentTransform=this.parentTransform+this.rotateAngle;var l=c.desiredSize.clone(),u=void 0,y={x:0,y:0},f=s,p=a;if("Point"===c.relativeMode){var g=c.getAbsolutePosition(o);void 0!==g&&(f+=g.x,p+=g.y)}if(u="Object"===c.relativeMode?this.alignChildBasedOnParent(c,l,o,f,p):this.alignChildBasedOnaPoint(c,f,p),y={x:u.x+l.width/2,y:u.y+l.height/2},c.rotateValue){var m={x:this.offsetX+(c.rotateValue.x||0),y:this.offsetY+(c.rotateValue.y||0)},x={x:this.offsetX,y:this.offsetY},v=0|c.rotateValue.angle,w=i();n(w,v,x.x,x.y),y=r(w,m)}e.prototype.findChildOffsetFromCenter.call(this,c,y)}"Stretch"===c.horizontalAlignment||"Stretch"===c.verticalAlignment?c.arrange(o):c instanceof Et&&c.canMeasure?(c.arrange(c.desiredSize),this.outerBounds.uniteRect(c.outerBounds)):c instanceof Et||(c.arrange(c.desiredSize),this.outerBounds.uniteRect(c.outerBounds))}}return this.actualSize=o,this.updateBounds(),this.outerBounds.uniteRect(this.bounds),o},o.prototype.alignChildBasedOnParent=function(t,e,i,r,o){switch(t.horizontalAlignment){case"Auto":case"Left":r+=t.margin.left;break;case"Right":r+=i.width-e.width-t.margin.right;break;case"Stretch":case"Center":r+=i.width/2-e.width/2}switch(t.verticalAlignment){case"Auto":case"Top":o+=t.margin.top;break;case"Bottom":o+=i.height-e.height-t.margin.bottom;break;case"Stretch":case"Center":o+=i.height/2-e.height/2}return{x:r,y:o}},o.prototype.alignChildBasedOnaPoint=function(t,e,i){switch(e+=t.margin.left-t.margin.right,i+=t.margin.top-t.margin.bottom,t.horizontalAlignment){case"Auto":case"Left":e=e;break;case"Stretch":case"Center":e-=t.desiredSize.width*t.pivot.x;break;case"Right":e-=t.desiredSize.width}switch(t.verticalAlignment){case"Auto":case"Top":i=i;break;case"Stretch":case"Center":i-=t.desiredSize.height*t.pivot.y;break;case"Bottom":i-=t.desiredSize.height}return{x:e,y:i}},o}(Bt),Dt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Xt=function(t){function e(){var e=t.call(this)||this;return e.imageSource="",e.imageScale="None",e.imageAlign="None",e.stretch="Stretch",e}return Dt(e,t),Object.defineProperty(e.prototype,"source",{get:function(){return this.imageSource},set:function(t){this.imageSource=t,this.isDirt=!0},enumerable:!0,configurable:!0}),e.prototype.measure=function(t){return this.isDirt&&("Stretch"!==this.stretch||void 0===this.width&&void 0===this.height)&&(this.contentSize=T(this.source,this.contentSize),this.isDirt=!1),void 0!==this.width&&void 0!==this.height?(this.desiredSize=new zt(this.width,this.height),this.contentSize=this.desiredSize):this.desiredSize=this.contentSize,this.desiredSize=this.validateDesiredSize(this.desiredSize,t),this.desiredSize},e.prototype.arrange=function(t){return this.actualSize=new zt(this.desiredSize.width,this.desiredSize.height),this.updateBounds(),this.actualSize},e}(Tt),_t=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Lt=function(t){function e(){var e=t.call(this)||this;return e.pathData="",e.transformPath=!0,e.absolutePath="",e.canMeasurePath=!1,e.absoluteBounds=new Pt,e}return _t(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this.pathData},set:function(t){this.pathData!==t&&(this.pathData=t,this.isDirt=!0)},enumerable:!0,configurable:!0}),e.prototype.measure=function(t){return this.staticSize&&void 0!==this.width&&void 0!==this.height?this.absoluteBounds=new Pt(this.offsetX-this.width*this.pivot.x,this.offsetY-this.height*this.pivot.y,this.width,this.height):(!this.isDirt||!this.transformPath&&void 0!==this.width&&void 0!==this.height||this.absoluteBounds&&0!==this.absoluteBounds.height)&&!this.canMeasurePath||(this.absoluteBounds=g(this.data?this.data:"")),void 0===this.width?this.desiredSize=new zt(this.absoluteBounds.width,this.height||this.absoluteBounds.height):void 0===this.height?this.desiredSize=new zt(this.width||this.absoluteBounds.width,this.absoluteBounds.height):this.desiredSize=new zt(this.width,this.height),this.desiredSize=this.validateDesiredSize(this.desiredSize,t),this.canMeasurePath=!1,this.desiredSize},e.prototype.arrange=function(t){return(this.isDirt||this.actualSize.width!==t.width||this.actualSize.height!==t.height)&&(this.isDirt=!0,this.absolutePath=this.updatePath(this.data,this.absoluteBounds,t),this.staticSize||(this.points=null)),this.actualSize=this.desiredSize,this.updateBounds(),this.isDirt=!1,this.actualSize},e.prototype.updatePath=function(t,e,i){var r=!1,o="",n=-e.x,a=-e.y,s=[];return i.width===e.width&&i.height===e.height||(n=i.width/Number(e.width?e.width:1),a=i.height/Number(e.height?e.height:1),r=!0),s=I(t),s=q(s),o=(r||this.isDirt)&&this.transformPath?V(s,n,a,r,e.x,e.y,0,0):Q(s),r=!1,o},e}(Tt),Yt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),It=function(t,e,i,r){var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a},jt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Yt(i,t),i.equals=function(t,e){return t===e||!(!t||!e)&&(!t||!e||t.x===e.x&&t.y===e.y)},i.isEmptyPoint=function(t){return!t.x||!t.y},i.transform=function(t,e,i){var r={x:0,y:0};return r.x=Math.round(100*(t.x+i*Math.cos(e*Math.PI/180)))/100,r.y=Math.round(100*(t.y+i*Math.sin(e*Math.PI/180)))/100,r},i.findLength=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},i.findAngle=function(t,e){var i=Math.atan2(e.y-t.y,e.x-t.x);return i=180*i/Math.PI,(i%=360)<0&&(i+=360),i},i.distancePoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},i.getLengthFromListOfPoints=function(t){for(var e=0,i=0;i<t.length-1;i++)e+=this.distancePoints(t[i],t[i+1]);return e},i.adjustPoint=function(t,e,i,r){var o,n=i?{x:t.x,y:t.y}:{x:e.x,y:e.y};return t.x===e.x?t.y<e.y&&i||t.y>e.y&&!i?n.y+=r:n.y-=r:t.y===e.y?t.x<e.x&&i||t.x>e.x&&!i?n.x+=r:n.x-=r:i?(o=this.findAngle(t,e),n=this.transform(t,o,r)):(o=this.findAngle(e,t),n=this.transform(e,o,r)),n},i.direction=function(t,e){return Math.abs(e.x-t.x)>Math.abs(e.y-t.y)?t.x<e.x?"Right":"Left":t.y<e.y?"Bottom":"Top"},i.prototype.getClassName=function(){return"Point"},It([e.Property(0)],i.prototype,"x",void 0),It([e.Property(0)],i.prototype,"y",void 0),i}(e.ChildProperty),Ft=function(){function t(){}return t.getContext=function(t){return t.getContext("2d")},t.prototype.setStyle=function(e,i){var r=t.getContext(e);"none"===i.fill&&(i.fill="transparent"),"none"===i.stroke&&(i.stroke="transparent"),r.strokeStyle=i.stroke,r.lineWidth=i.strokeWidth,0===i.strokeWidth&&(r.strokeStyle="transparent"),r.globalAlpha=i.opacity;var o=[];i.dashArray&&(o=this.parseDashArray(i.dashArray)),r.setLineDash(o),r.fillStyle=i.fill},t.prototype.rotateContext=function(e,i,r,o){var n=t.getContext(e);n.translate(r,o),n.rotate(i*Math.PI/180),n.translate(-r,-o)},t.prototype.setFontStyle=function(e,i){var r=t.getContext(e),o="";i.italic&&(o+="italic "),i.bold&&(o+="bold "),o+=i.fontSize+"px ",o+=i.fontFamily,r.font=o},t.prototype.parseDashArray=function(t){for(var e=[],i=-1!==t.indexOf(" ")?" ":",",r=0,o=t.split(i);r<o.length;r++){var n=o[r];e.push(Number(n))}return e},t.prototype.drawRectangle=function(e,i){if(!0===i.visible)if(i.cornerRadius)i.data=F(i.cornerRadius,i.height,i.width),this.drawPath(e,i);else{var r=t.getContext(e);r.save(),r.beginPath();i.cornerRadius;var o=i.x+i.width*i.pivotX,n=i.y+i.height*i.pivotY;this.rotateContext(e,i.angle,o,n),this.setStyle(e,i),r.rect(i.x,i.y,i.width,i.height),r.fillRect(i.x,i.y,i.width,i.height),r.fill(),r.stroke(),r.closePath(),r.restore()}},t.prototype.drawPath=function(e,i){var r=[];r=U(r=I(i.data));var o=t.getContext(e);o.save(),o.beginPath();var n=i.y+i.height*i.pivotY,a=i.x+i.width*i.pivotX;this.rotateContext(e,i.angle,a,n),this.setStyle(e,i),o.translate(i.x,i.y),this.renderPath(e,i,r),o.fill(),o.translate(-i.x,-i.y),o.stroke(),o.restore()},t.prototype.renderPath=function(e,i,r){if(!0===i.visible){var o,n=t.getContext(e),a=void 0,s=void 0,h=void 0,d=void 0,c=void 0,l=void 0,u=void 0,y=void 0,f=void 0,p=r;for(u=0,y=0,f=0,o=p.length;f<o;++f){var g=p[f],m=g.command;switch("x1"in g&&(h=g.x1),"x2"in g&&(c=g.x2),"y1"in g&&(d=g.y1),"y2"in g&&(l=g.y2),"x"in g&&(u=g.x),"y"in g&&(y=g.y),m){case"M":n.moveTo(u,y),g.x=u,g.y=y;break;case"L":n.lineTo(u,y),g.x=u,g.y=y;break;case"C":n.bezierCurveTo(h,d,c,l,u,y),g.x=u,g.y=y,g.x1=h,g.y1=d,g.x2=c,g.y2=l;break;case"Q":n.quadraticCurveTo(h,d,u,y),g.x=u,g.y=y,g.x1=h,g.y1=d;break;case"A":var x={x:a,y:s},v=g.r1,w=g.r2,b=g.angle*(Math.PI/180),S=g.largeArc,A=g.sweep,M={x:u,y:y},k={x:Math.cos(b)*(x.x-M.x)/2+Math.sin(b)*(x.y-M.y)/2,y:-Math.sin(b)*(x.x-M.x)/2+Math.cos(b)*(x.y-M.y)/2},z=Math.pow(k.x,2)/Math.pow(v,2)+Math.pow(k.y,2)/Math.pow(w,2);z>1&&(v*=Math.sqrt(z),w*=Math.sqrt(z));var P=Math.pow(w,2)*Math.pow(k.x,2),C=(S===A?-1:1)*Math.sqrt((Math.pow(v,2)*Math.pow(w,2)-Math.pow(v,2)*Math.pow(k.y,2)-P)/(Math.pow(v,2)*Math.pow(k.y,2)+Math.pow(w,2)*Math.pow(k.x,2)));isNaN(C)&&(C=0);var T={x:C*v*k.y/w,y:C*-w*k.x/v},R={x:(x.x+M.x)/2+Math.cos(b)*T.x-Math.sin(b)*T.y,y:(x.y+M.y)/2+Math.sin(b)*T.x+Math.cos(b)*T.y},B=this.a([1,0],[(k.x-T.x)/v,(k.y-T.y)/w]),O=[(k.x-T.x)/v,(k.y-T.y)/w],E=[(-k.x-T.x)/v,(-k.y-T.y)/w],N=this.a(O,E);if(this.r(O,E)<=-1&&(N=Math.PI),this.r(O,E)>=1&&(N=0),g.centp=R,g.xAxisRotation=b,g.rx=v,g.ry=w,g.a1=B,g.ad=N,g.sweep=A,null!=n){var W=v>w?v:w,D=v>w?1:v/w,X=v>w?w/v:1;n.save(),n.translate(R.x,R.y),n.rotate(b),n.scale(D,X),n.arc(0,0,W,B,B+N,!A),n.scale(1/D,1/X),n.rotate(-b),n.translate(-R.x,-R.y),n.restore()}break;case"Z":case"z":n.closePath(),u=a,y=s}a=u,s=y}}},t.prototype.drawText=function(e,i){if(i.content&&!0===i.visible){var r=t.getContext(e);r.save(),this.setStyle(e,i);var o=i.x+i.width*i.pivotX,n=i.y+i.height*i.pivotY;this.rotateContext(e,i.angle,o,n),this.setFontStyle(e,i);var a=0,s=[];s=i.childNodes;var h=i.wrapBounds;if(r.fillStyle=i.color,h){var d=this.labelAlign(i,h,s);for(a=0;a<s.length;a++){var c=s[a],l=d.x+c.x-h.x,u=d.y+c.dy*a+.8*i.fontSize;if(r.fillText(c.text,l,u),"Underline"===i.textDecoration||"Overline"===i.textDecoration||"LineThrough"===i.textDecoration){var y=l,f=void 0,p=l+r.measureText(c.text).width,g=void 0;switch(i.textDecoration){case"Underline":f=u+2,g=u+2;break;case"Overline":f=d.y+c.dy*a,g=d.y+c.dy*a;break;case"LineThrough":f=(u+d.y+c.dy*a)/2+2,g=(u+d.y+c.dy*a)/2+2}r.beginPath(),r.moveTo(y,f),r.lineTo(p,g),r.strokeStyle=i.color,r.lineWidth=.08*i.fontSize,r.globalAlpha=i.opacity,r.stroke()}}}r.restore()}},t.prototype.m=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))},t.prototype.r=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(this.m(t)*this.m(e))},t.prototype.a=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(this.r(t,e))},t.prototype.getMeetOffset=function(t,e,i){var r=Math.max(e,i),o=Math.min(e,i);switch(t){case"min":return 0;case"mid":return(r-o)/2;case"max":return r-o;default:return 0}},t.prototype.getSliceOffset=function(t,e,i,r){switch(t){case"min":return 0;case"mid":return(e-i)/2*r/e;case"max":return(e-i)*r/e;default:return 0}},t.prototype.image=function(t,e,i,r,o,n,a){t.beginPath();var s=e.width,h=e.height,d=o,c=n,l=0,u=0;if(t.globalAlpha=a.opacity,a&&"None"!==a.alignment){var y=a.alignment.toLowerCase().substr(1,3),f=a.alignment.toLowerCase().substr(5,3);if("Slice"===a.scale){var p=function(){l=d,u=h*d/s},g=function(){l=s*c/h,u=c};d>c?(p(),c>u&&g()):d===c?s>h?g():p():(g(),d>l&&p());var m=this.getSliceOffset(y,l,d,s),x=this.getSliceOffset(f,u,c,h),v=s-m,w=h-x,b=l-m*(l/s),S=u-x*(u/h),A=M("canvas",{width:o.toString(),height:n.toString()});A.getContext("2d").drawImage(e,m,x,v,w,0,0,b,S),t.drawImage(A,i,r,o,n)}else if("Meet"===a.scale){var k=h/s,z=c/d;l=z>k?d:c/k,u=z>k?d*k:c,i+=this.getMeetOffset(y,l,d),r+=this.getMeetOffset(f,u,c),t.drawImage(e,0,0,s,h,i,r,l,u)}else t.drawImage(e,i,r,o,n)}else if(e.complete)t.drawImage(e,i,r,o,n);else{var P=t.getTransform();e.onload=function(){t.setTransform(P.a,P.b,P.c,P.d,P.e,P.f),t.drawImage(e,i,r,o,n)}}t.closePath()},t.prototype.loadImage=function(t,e,i,r,o){this.rotateContext(i,e.angle,r,o);var n=new Image;n.src=e.source,this.image(t,n,e.x,e.y,e.width,e.height,e)},t.prototype.drawImage=function(e,i,r,o){var n=this;if(i.visible){var a=t.getContext(e);a.save();var s=i.x+i.width*i.pivotX,h=i.y+i.height*i.pivotY,d=new Image;d.src=i.source;var c=a.canvas.id.split("_");c[c.length-1];o?d.onload=function(){n.loadImage(a,i,e,s,h)}:this.loadImage(a,i,e,s,h),a.restore()}},t.prototype.labelAlign=function(t,e,i){var r=new zt(e.width,i.length*(1.2*t.fontSize)),o={x:0,y:0},n=t.x,a=t.y,s=.5*t.width,h=.5*t.height;return"left"===t.textAlign?s=0:"center"===t.textAlign?s=e.width>t.width&&("Ellipsis"===t.textOverflow||"Clip"===t.textOverflow)?0:.5*t.width:"right"===t.textAlign&&(s=1*t.width),o.x=n+s+(e?e.x:0),o.y=a+h-r.height/2,o},t}(),Ut=function(){function t(t,e){this.renderer=null,this.isSvgMode=!0,this.diagramId=t,this.element=A(this.diagramId),this.isSvgMode=e,this.renderer=new Ft}return t.prototype.renderElement=function(t,e,i,r,o,n,a,s){t instanceof Bt?this.renderContainer(t,e,i,r,o,n,a,s):t instanceof Xt?this.renderImageElement(t,e,r,o,a):t instanceof Lt?this.renderPathElement(t,e,r,o,a):t instanceof Et?this.renderTextElement(t,e,r,o,a):this.renderRect(t,e,r,o)},t.prototype.renderImageElement=function(t,e,i,r,o){var n=this.getBaseAttributes(t,i);n.cornerRadius=0,this.renderer.drawRectangle(e,n);var a,s,h,d;if("Stretch"===t.stretch)a=t.actualSize.width,s=t.actualSize.height;else{var c=t.contentSize.width,l=t.contentSize.height,u=n.width/c,y=n.height/l,f=void 0;switch(t.stretch){case"Meet":a=c*(f=Math.min(u,y)),s=l*f,n.x+=Math.abs(n.width-a)/2,n.y+=Math.abs(n.height-s)/2;break;case"Slice":u=n.width/c,y=n.height/l,a=c*(f=Math.max(u,y)),s=l*f,h=n.width/a*c,d=n.height/s*l;break;case"None":a=c,s=l}}n.width=a,n.height=s,n.sourceWidth=h,n.sourceHeight=d,n.source=t.source,n.alignment=t.imageAlign,n.scale=t.imageScale,this.renderer.drawImage(e,n,r,o)},t.prototype.renderPathElement=function(t,e,i,r,o){var n=this.getBaseAttributes(t,i);n.data=t.absolutePath,n.data=t.absolutePath;t.id;this.isSvgMode||(n.x=n.x,n.y=n.y),this.renderer.drawPath(e,n)},t.prototype.renderTextElement=function(t,e,i,r,o){var n=this.getBaseAttributes(t,i);n.cornerRadius=0,n.whiteSpace=_(t.style.whiteSpace,t.style.textWrapping),n.content=t.content,n.breakWord=W(t.style.textWrapping),n.textAlign=N(t.style.textAlign),n.color=t.style.color,n.italic=t.style.italic,n.bold=t.style.bold,n.fontSize=t.style.fontSize,n.fontFamily=t.style.fontFamily,n.textOverflow=t.style.textOverflow,n.textDecoration=t.style.textDecoration,n.doWrap=t.doWrap,n.wrapBounds=t.wrapBounds,n.childNodes=t.childNodes,n.dashArray="",n.strokeWidth=0,n.fill=t.style.fill;t.content?t.content:t.id;this.renderer.drawRectangle(e,n),this.renderer.drawText(e,n)},t.prototype.renderContainer=function(t,e,i,r,o,n,a,s){if(r={tx:0,ty:0,scale:1},this.diagramId&&(o=o),this.renderRect(t,e,r,o),t.hasChildren())for(var h=0,d=t.children;h<d.length;h++){var c=d[h];this.renderElement(c,e,i,r,o,!0,a,s)}},t.prototype.renderRect=function(t,e,i,r){var o=this.getBaseAttributes(t,i);o.cornerRadius=t.cornerRadius||0;t.id;this.renderer.drawRectangle(e,o)},t.prototype.getBaseAttributes=function(t,e){var i={width:t.actualSize.width,height:t.actualSize.height,x:t.offsetX-t.actualSize.width*t.pivot.x+.5,y:t.offsetY-t.actualSize.height*t.pivot.y+.5,fill:t.style.fill,stroke:t.style.strokeColor,angle:t.rotateAngle+t.parentTransform,pivotX:t.pivot.x,pivotY:t.pivot.y,strokeWidth:t.style.strokeWidth,dashArray:t.style.strokeDashArray||"",opacity:t.style.opacity,visible:t.visible,id:t.id,gradient:t.style.gradient};return e&&(i.x+=e.tx,i.y+=e.ty),i},t}(),Vt=function(){function t(){}return t.prototype.parseDashArray=function(t){return[]},t.prototype.drawRectangle=function(t,e,i,r,o,n,a){var s;s=e.id===t.id?e.id+"_container":e.id;var h;h&&!o||(h=document.createElementNS("http://www.w3.org/2000/svg","rect"),t.appendChild(h));var d={id:s,x:e.x.toString(),y:e.y.toString(),width:e.width.toString(),height:e.height.toString(),visibility:e.visible?"visible":"hidden",transform:"rotate("+e.angle+","+(e.x+e.width*e.pivotX)+","+(e.y+e.height*e.pivotY)+")",rx:e.cornerRadius||0,ry:e.cornerRadius||0,opacity:e.opacity,"aria-label":a||""};e.class&&(d.class=e.class);a||(d["pointer-events"]="none"),K(h,d),this.setSvgStyle(h,e,i)},t.prototype.updateSelectionRegion=function(t,e){var i;i=t.parentNode.getElementById(e.id);var r;r={id:e.id,x:e.x.toString(),y:e.y.toString(),width:e.width.toString(),height:e.height.toString(),transform:"rotate("+e.angle+","+(e.x+e.width*e.pivotX)+","+(e.y+e.height*e.pivotY)+")",class:"e-diagram-selected-region"},i||(i=document.createElementNS("http://www.w3.org/2000/svg","rect"),t.appendChild(i)),this.setSvgStyle(i,e),K(i,r)},t.prototype.createGElement=function(t,e){return $(t,e)},t.prototype.drawCircle=function(t,e,i,r){var o=document.createElementNS("http://www.w3.org/2000/svg","circle");this.setSvgStyle(o,e);var n=e.class||"";i||(n+=" e-disabled");var a={id:e.id,cx:e.centerX,cy:e.centerY,r:e.radius,visibility:e.visible?"visible":"hidden",class:n,"aria-label":r?r["aria-label"]:""};o.style.display=e.visible?"block":"none",K(o,a),t.appendChild(o)},t.prototype.setSvgStyle=function(t,e,i){if(e.canApplyStyle||void 0===e.canApplyStyle){"none"===e.fill&&(e.fill="transparent"),"none"===e.stroke&&(e.stroke="transparent");var r=[],o=void 0;void 0!==e.dashArray&&(r=(new Ft).parseDashArray(e.dashArray)),o=e.fill,e.stroke&&t.setAttribute("stroke",e.stroke),void 0!==e.strokeWidth&&null!==e.strokeWidth&&t.setAttribute("stroke-width",e.strokeWidth.toString()),r&&t.setAttribute("stroke-dasharray",r.toString()),o&&t.setAttribute("fill",o)}},t.prototype.svgLabelAlign=function(t,e,i){var r=new zt(e.width,i.length*(1.2*t.fontSize)),o={x:0,y:0},n=.5*t.width,a=.5*t.height;return"left"===t.textAlign?n=0:"center"===t.textAlign?n=e.width>t.width&&("Ellipsis"===t.textOverflow||"Clip"===t.textOverflow)?0:.5*t.width:"right"===t.textAlign&&(n=1*t.width),o.x=0+n+(e?e.x:0),o.y=1.2+a-r.height/2,o},t.prototype.drawLine=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","line");this.setSvgStyle(i,e);var r=e.x+e.width*e.pivotX,o=e.y+e.height*e.pivotY,n={id:e.id,x1:e.startPoint.x+e.x,y1:e.startPoint.y+e.y,x2:e.endPoint.x+e.x,y2:e.endPoint.y+e.y,stroke:e.stroke,"stroke-width":e.strokeWidth.toString(),opacity:e.opacity.toString(),transform:"rotate("+e.angle+" "+r+" "+o+")",visibility:e.visible?"visible":"hidden"};e.class&&(n.class=e.class),K(i,n),t.appendChild(i)},t.prototype.drawPath=function(t,e,i,r,o,n){var a=Math.floor(10*Math.random()+1);t.id,a.toString();var s=[];s=U(s=I(e.data));var h;o&&(h=o.getElementById(e.id+"_groupElement_shadow"))&&h.parentNode.removeChild(h);var d;o&&(d=o.getElementById(e.id)),d&&!r||(d=document.createElementNS("http://www.w3.org/2000/svg","path"),t.appendChild(d)),this.renderPath(d,e,s);var c={id:e.id,transform:"rotate("+e.angle+","+(e.x+e.width*e.pivotX)+","+(e.y+e.height*e.pivotY)+")translate("+e.x+","+e.y+")",visibility:e.visible?"visible":"hidden",opacity:e.opacity,"aria-label":n||""};e.class&&(c.class=e.class),K(d,c),this.setSvgStyle(d,e,i)},t.prototype.renderPath=function(t,e,i){var r,o,n,a,s,h,d,c,l=i,u="";for(s=0,h=0,c=0,d=l.length;c<d;++c){var y=l[c],f=y.command;switch("x1"in y&&(r=y.x1),"x2"in y&&(n=y.x2),"y1"in y&&(o=y.y1),"y2"in y&&(a=y.y2),"x"in y&&(s=y.x),"y"in y&&(h=y.y),f){case"M":u=u+"M"+s.toString()+","+h.toString()+" ";break;case"L":u=u+"L"+s.toString()+","+h.toString()+" ";break;case"C":u=u+"C"+r.toString()+","+o.toString()+","+n.toString()+","+a.toString()+",",u+=s.toString()+","+h.toString()+" ";break;case"Q":u=u+"Q"+r.toString()+","+o.toString()+","+s.toString()+","+h.toString()+" ";break;case"A":u=u+"A"+y.r1.toString()+","+y.r2.toString()+","+y.angle.toString()+",",u+=y.largeArc.toString()+","+y.sweep+","+s.toString()+","+h.toString()+" ";break;case"Z":case"z":u+="Z "}}t.setAttribute("d",u)},t}();return t.Thickness=mt,t.Margin=xt,t.Stop=vt,t.Gradient=wt,t.LinearGradient=bt,t.RadialGradient=St,t.ShapeStyle=At,t.StrokeStyle=Mt,t.TextStyle=kt,t.Canvas=Wt,t.Container=Bt,t.DrawingElement=Tt,t.ImageElement=Xt,t.PathElement=Lt,t.TextElement=Et,t.Matrix=Ct,t.identityMatrix=i,t.transformPointByMatrix=r,t.transformPointsByMatrix=o,t.rotateMatrix=n,t.scaleMatrix=a,t.translateMatrix=s,t.multiplyMatrix=l,t.Point=jt,t.Rect=Pt,t.Size=zt,t.CanvasRenderer=Ft,t.refreshDiagramElements=J,t.DrawingRenderer=Ut,t.SvgRenderer=Vt,t.setAttributeSvg=K,t.createSvgElement=$,t.createSvg=tt,t.getParentSvg=et,t.randomId=R,t.cornersPointsBeforeRotation=B,t.rotateSize=O,t.getBounds=E,t.textAlignToString=N,t.wordBreakToString=W,t.bBoxText=D,t.middleElement=X,t.whiteSpaceToString=_,t.rotatePoint=L,t.getOffset=Y,t.findNearestPoint=it,t.findElementUnderMouse=rt,t.findTargetElement=ot,t.intersect3=nt,t.intersect2=at,t.getLineSegment=st,t.getPoints=ht,t.getBezierDirection=dt,t.updateStyle=ct,t.scaleElement=lt,t.contains=ut,t.getPoint=yt,t.getChildNode=f,t.translatePoints=p,t.measurePath=g,t.measureText=S,t.getDiagramElement=A,t.createHtmlElement=M,t.setAttributeHtml=k,t.getAdornerLayerSvg=z,t.getSelectorElement=P,t.createMeasureElements=C,t.measureImage=T,t.processPathData=I,t.parsePathData=j,t.getRectanglePath=F,t.pathSegmentCollection=U,t.transformPath=V,t.updatedSegment=H,t.scalePathData=Z,t.splitArrayCollection=q,t.getPathString=Q,t.getString=G,t}({},ej.base),this.ejs=ej;
- /*!
- * filename: ej2-filemanager.min.js
- * version : 19.2.44
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.filemanager=function(e,t,i,n,s,a,r,o,l,h,d){"use strict";function p(e,i,n){var s=t.getValue("name",i),a=e.getAttribute("data-id"),r=t.isNullOrUndefined(a)?s:a;n.setProperties({path:c(e,r,n.hasId)},!0),n.pathId=u(e),n.pathNames=f(e,s)}function c(e,t,i){for(var n=g(e,t,!1,i),s=i?"":"/",a=n.length-(i?1:2);a>=0;a--)s+=n[a]+"/";return s}function u(e){for(var t=g(e,e.getAttribute("data-uid"),!0),i=[],n=t.length-1;n>=0;n--)i.push(t[n]);return i}function f(e,t){for(var i=g(e,t,!1),n=[],s=i.length-1;s>=0;s--)n.push(i[s]);return n}function g(e,i,n,s){for(var a=[i],r=e.parentNode;!t.isNullOrUndefined(r);){if(t.matches(r,"."+hi)){var o=n?r.getAttribute("data-uid"):s?r.getAttribute("data-id"):t.select("."+di,r).textContent;a.push(o)}if((r=r.parentNode).classList.contains(ki))break}return a}function m(e){var i=e.hasId?"id":"name",n=e.hasId?"":"/",s=e.hasId?0:1;for(s;s<e.pathId.length;s++){var a=t.getValue(e.pathId[s],e.feParent);n+=t.getValue(i,a)+"/"}e.setProperties({path:n},!0)}function b(e){e.isCut&&(O(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(vn,{}))}function y(e,i){if(i.isSearchCut=!1,i.actionRecords=[],i.activeElements=[],i.notify(On,{}),0===i.activeElements.length)return!1;O(i);var n=i.activeElements;"navigationpane"!==i.activeModule?i.targetPath=i.path:i.targetPath=Q(i.path);var s=0;if(n&&(w(i,n[0]),"cut"===e))for(;s<n.length;)v(n[s]),s++;for(s=0,i.selectedNodes=[],i.enablePaste=!0,i.notify(yn,{});s<i.activeRecords.length;)i.actionRecords.push(i.activeRecords[s]),i.selectedNodes.push(t.getValue("name",i.activeRecords[s])),s++;if((""!==i.breadcrumbbarModule.searchObj.element.value||i.isFiltered)&&"navigationpane"!==i.activeModule){i.selectedNodes=[],i.isSearchCut=!0;for(var a=0;a<i.selectedItems.length;)i.selectedNodes.push(i.selectedItems[a]),a++}return!0}function v(e){e.classList.add(ui)}function O(e,t){for(var i=t?e.element.querySelectorAll("."+gi):e.element.querySelectorAll("."+ui),n=0;n<i.length;)i[n].classList.remove(t?gi:ui),n++}function w(e,i){i&&(i.classList.contains(vi)?e.activeModule="detailsview":t.closest(i,"."+Ei)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function I(e,t,i){var n;if(0!==t.length||e.isFiltered||e.notify(Cn,{args:e}),n="startsWith"===e.searchSettings.filterType?t+"*":"endsWith"===e.searchSettings.filterType?"*"+t:"*"+t+"*",e.searchWord=n,e.itemData=[x(e)],t.length>0){var s=e.searchSettings.ignoreCase,a=e.showHiddenItems;Ve(e,i?pn:rn,e.path,n,a,!s)}else e.isFiltered?Ce(e,pn):De(e,i?pn:rn,e.path)}function D(e,t){e.setProperties({view:t},!0),(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered)&&(e.layoutSelectedItems=e.selectedItems);var i="";e.breadcrumbbarModule.searchObj.element.value&&(i=e.breadcrumbbarModule.searchObj.element.value),e.isLayoutChange=!0,I(e,i,!0)}function S(e,i){var n="";i&&(n=t.closest(i,".e-gridcontent")?"detailsview":t.closest(i,"."+li)?"largeiconsview":i.classList.contains("e-fullrow")||i.classList.contains("e-icon-expandable")?"navigationpane":t.closest(i,".e-address-list-item")?"breadcrumbbar":""),e.targetModule=n}function C(e){e.itemData=[x(e)],me(e.itemData[0])?De(e,Xi,e.path):fe(e,e.itemData[0],Mn)}function j(e){De(e,ln,e.path)}function x(e){return t.getValue(e.pathId[e.pathId.length-1],e.feParent)}function P(e){y("copy",e)&&(e.fileAction="copy")}function N(e){y("cut",e)&&(e.isCut=!0,e.fileAction="move")}function E(e){if(!t.getValue("isFile",e))return ji;var i=["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"],n=["mp3","wav","aac","ogg","wma","aif","fla","m4a"],s=["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"],a=["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"],r=t.getValue("type",e);-1!==(r=r.toLowerCase()).indexOf(".")&&(r=r.split(".").join(""));return-1!==i.indexOf(r)?xi:-1!==n.indexOf(r)?Pi:-1!==s.indexOf(r)?Ni:-1!==a.indexOf(r)?"e-fe-"+r:"e-fe-unknown e-fe-"+r}function R(e,i){var n,s=e.ajaxSettings.getImageUrl?e.ajaxSettings.getImageUrl:e.ajaxSettings.url,a=t.getValue("name",i),r=t.getValue("filterPath",i);if(e.hasId){var o=t.getValue("id",i);n=s+"?path="+e.path+"&id="+o}else n=t.isNullOrUndefined(r)?s+"?path="+e.path+a:s+"?path="+r.replace(/\\/g,"/")+a;var l={fileDetails:[i],imageUrl:n=n+"&time="+(new Date).getTime().toString()};return e.trigger("beforeImageLoad",l),l.imageUrl}function M(e,i,n){var s=t.getValue(e.hasId?"id":"name",i)+"/",a=t.getValue(e.hasId?"filterId":"filterPath",i);return t.isNullOrUndefined(a)?n+s:a.replace(/\\/g,"/")+s}function k(e,i){var n=t.getValue("name",i),s=t.getValue("filterPath",i);return""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||t.isNullOrUndefined(s)||(n=(s=s.replace(/\\/g,"/")).replace(e.path,"")+n),n}function L(e,i){if(0===i.length)return i;var n;n="None"!==e.sortOrder?(new s.Query).sortBy(e.sortBy,e.sortOrder.toLowerCase(),!0).group("isFile"):(new s.Query).group("isFile");var a=new s.DataManager(i).executeLocal(n);return t.getValue("records",a)}function T(e,i,n){var a=t.getValue(e.pathId[e.pathId.length-1],e.feFiles),r=(new s.Query).where(i,"equal",n);return new s.DataManager(a).executeLocal(r)[0]}function A(e,i,n){var s,a=t.select("#"+e.element.id+Jt,e.element),r=t.select("#"+e.element.id+ni,a).offsetHeight;if(s=a.offsetHeight-r,"Details"===e.view&&(s-=t.select("."+Mi,a).offsetHeight),t.isNullOrUndefined(i.querySelector("."+Oi))){var o=t.createElement("div",{className:Oi}),l=t.createElement("div",{className:Ri}),h=t.createElement("div",{className:wi}),d=t.createElement("div",{className:Ii});"Details"===e.view?i.querySelector("."+Ti).appendChild(o):i.appendChild(o),o.appendChild(l),o.appendChild(h),o.appendChild(d)}i.querySelector("."+Oi)&&(t.isNullOrUndefined(n.error)?e.isFiltered?(i.querySelector("."+wi).innerHTML=V(e,"Filter-Empty"),i.querySelector("."+Ii).innerHTML=V(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(i.querySelector("."+wi).innerHTML=V(e,"Search-Empty"),i.querySelector("."+Ii).innerHTML=V(e,"Search-Key")):(i.querySelector("."+wi).innerHTML=V(e,"Folder-Empty"),i.querySelector("."+Ii).innerHTML=V(e,"File-Upload")):(i.querySelector("."+wi).innerHTML=V(e,"Access-Denied"),i.querySelector("."+Ii).innerHTML=V(e,"Access-Details")));var p=t.select("."+Oi,i);s=(s-p.offsetHeight)/2,p.style.marginTop=s+"px"}function F(e){return new s.DataManager(e).executeLocal((new s.Query).where(zi,"equal",!1,!1))}function U(e,i){for(var n=F(e.files),s=0,a=n.length;s<a;s++)t.setValue("_fm_id",i+"_"+s,n[s])}function _(e){for(var i=0;i<e.length;i++)t.setValue("_fm_created",new Date(t.getValue("dateCreated",e[i])),e[i]),t.setValue("_fm_modified",new Date(t.getValue("dateModified",e[i])),e[i])}function V(e,t){var i=e.localeObj.getConstant(t);return""===i?t:i}function B(e,i){var n=e.cssClass;return n=t.isNullOrUndefined(n)||""===n?i:n+" "+i}function H(e,t){-1!==t.item.id.indexOf("ascending")||-1!==t.item.id.indexOf("descending")||-1!==t.item.id.indexOf("none")?e.sortOrder=z(t.item.id):e.sortBy=z(t.item.id),e.itemData=[x(e)],"Details"===e.view&&(e.isMobile?D(e,"Details"):e.notify(Sn,{module:"detailsview"})),"LargeIcons"===e.view&&D(e,"LargeIcons"),e.notify(cn,{})}function z(e){var t=e.substring(e.lastIndexOf("_")+1),i=t;switch(t){case"date":i="_fm_modified";break;case"ascending":i="Ascending";break;case"descending":i="Descending";break;case"none":i="None"}return i}function q(e,i){for(var n=i.split("/"),s=e.originalPath.split("/"),a=t.getValue(e.pathId[0],e.feParent),r=t.isNullOrUndefined(t.getValue("id",a))?"name":"id",o=n.length-1,l=s.length-1;o<l;o++){var h=""===s[o+1]?Ki:Wi,d=""===s[o]?"/":e.path+s[o]+"/",p=T(e,r,s[o]),c=t.getValue("_fm_id",p);e.setProperties({path:d},!0),e.pathId.push(c),e.itemData=[p],e.pathNames.push(t.getValue("name",p)),De(e,h,e.path);break}}function W(e,t){e.notify(dn,{selectedNode:e.pathId[e.pathId.length-1]}),e.originalPath=M(e,t,e.path),De(e,e.path!==e.originalPath?Wi:Ki,e.path)}function K(e){if(e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste){var t=""===e.folderPath?e.path:e.folderPath;G(e,e.actionRecords,t,e.path)||("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction?(e.notify(wn,{}),xe(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords)):(e.enablePaste=!1,e.notify(vn,{}),O(e)))}}function G(e,i,n,s){for(var a=!1,r=0;r<i.length;r++)if(t.getValue("isFile",i[r])){var o=e.dragNodes[r],l=0;o&&(l=o.lastIndexOf("/"));var h="";if(l>0&&(h=s+o.substring(0,l+1)),h===n){var d={files:null,error:{code:"402",message:V(e,"Same-Folder-Error"),fileExists:null}};ze(e,"Error",d),a=!0;break}}else{var p=M(e,i[r],s);if(0===n.indexOf(p)){ze(e,"Error",d={files:null,error:{code:"402",message:V(e,"Sub-Folder-Error"),fileExists:null}}),a=!0;break}}return a}function Y(e){e.isDragDrop=!0,0!==e.dragData.length&&(e.dragPath=e.dragPath.replace(/\\/g,"/"),e.dropPath=e.dropPath.replace(/\\/g,"/"),G(e,e.dragData,e.dropPath,e.dragPath)||e.dragPath===e.dropPath||(e.itemData=[e.dropData],xe(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(wn,{})))}function Q(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function J(e,i){var n=t.getValue(e.hasId?"id":"name",i.cwd)+"/",s=t.getValue(e.hasId?"filterId":"filterPath",i.cwd);return t.isNullOrUndefined(s)?e.path+n:""===s?e.hasId?n:"/":s.replace(/\\/g,"/")+n}function X(e,t,i){"move"===t&&(e.isDragDrop?e.notify(Pn,i):(e.enablePaste=!1,e.notify(vn,{}),e.notify(Dn,i))),0===e.duplicateItems.length&&(e.pasteNodes=[]);for(var n=0;n<i.files.length;n++)e.pasteNodes.push(i.files[n][e.hasId?"id":"name"]),e.isDragDrop&&e.droppedObjects.push(i.files[n]);e.duplicateItems=[],e.duplicateRecords=[],e.isDragDrop&&!e.isPasteError?e.isDropEnd=!0:e.isDropEnd=!1,!e.isDragDrop||e.path===e.dragPath||e.path===e.dropPath||e.isSearchDrag?(e.isPathDrag=!1,De(e,In,e.path)):$(e),e.trigger("success",{action:t,result:i})}function $(e){var i=t.getValue("_fm_id",e.dropData);e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag?e.notify(Yi,e.itemData):(e.navigationpaneModule&&p(t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element),e.dropData,e),De(e,Nn,e.dropPath))}function Z(e,i){for(var n=null,s=e.isDragDrop?e.dragData:e.actionRecords,a=0;a<s.length;a++)if(t.getValue("name",s[a])===i){n=s[a];break}return n}function ee(e){if(e.isSearchDrag=!1,""!==e.breadcrumbbarModule.searchObj.element.value&&(e.isSearchDrag=!0),"navigationpane"!==e.activeModule){e.dragNodes=[];for(var t=0;t<e.selectedItems.length;)e.dragNodes.push(e.selectedItems[t]),t++;0==e.selectedItems.length&&e.dragData&&1==e.dragData.length&&e.dragNodes.push(le(e,e.dragData[0]))}var i=e.createElement("div",{className:"e-fe-icon "+E(e.dragData[0])}),n=e.createElement("div",{className:"e-fe-name",innerHTML:e.dragData[0].name}),s=e.createElement("div",{className:"e-fe-content"});s.appendChild(i),s.appendChild(n);var a=e.createElement("div",{className:Di});if(a.appendChild(s),e.dragNodes.length>1){var r=e.createElement("span",{className:"e-fe-count",innerHTML:e.dragNodes.length.toString(10)});a.appendChild(r)}e.virtualDragElement=a,e.element.appendChild(e.virtualDragElement)}function te(e,i){var n=i;n.cancel=!1,null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),se(e),e.element.classList.remove("e-fe-drop","e-no-drop"),O(e),e.uploadObj.dropArea=t.select("#"+e.element.id+ii,e.element);var s=t.select("."+Di,e.element);s&&t.detach(s),S(e,i.target),e.notify(xn,i),O(e,"hover"),n.fileDetails=e.dragData,e.trigger("fileDragStop",n,function(i){!i.cancel&&!t.isNullOrUndefined(e.targetModule)&&""!==e.targetModule&&e.dragCount>2&&Y(e),e.dragCount=0})}function ie(e,i,n){var s=i;if(s.cancel=!1,s.fileDetails=e.dragData,e.dragCount=0,e.droppedObjects=[],(!e.allowDragAndDrop||"navigationpane"===e.activeModule&&t.closest(i.element,"li").getAttribute("data-uid")===e.pathId[0])&&(s.cancel=!0),"navigationpane"===e.activeModule&&-1!==e.pathId.indexOf(t.closest(i.element,"li").getAttribute("data-uid"))?e.isPathDrag=!0:e.isPathDrag=!1,O(e),s.cancel)n.intDestroy(i.event),ne(e);else if(!s.cancel){for(var a=0;a<e.activeElements.length;)v(e.activeElements[a]),a++;e.trigger("fileDragStart",s,function(s){s.cancel?(n.intDestroy(i.event),ne(e)):(e.uploadObj.dropArea=null,t.isBlazor()&&s.bindEvents(s.dragElement))})}}function ne(e){O(e);var i=t.select("."+Di,e.element);i&&t.detach(i)}function se(e){ae(e,Si),ae(e,Ci)}function ae(e,t){for(var i=e.element.querySelectorAll("."+t),n=0;n<i.length;n++)i[n].classList.remove(t)}function re(e,i){var n=i;n.fileDetails=e.dragData;var s=!1;S(e,i.target),se(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),O(e,"hover");var a=null;"navigationpane"===e.targetModule?((a=t.closest(i.target,"li")).classList.add(gi,Si),s=!0,e.treeExpandTimer=window.setTimeout(function(){e.notify(En,i)},800)):"detailsview"===e.targetModule?((a=t.closest(i.target,"tr"))&&a.querySelector("."+ji)&&!a.classList.contains(ui)?a.classList.add(Si):!a||a.querySelector("."+ji)||a.classList.contains(ui)||a.classList.add(Ci),s=!0):"largeiconsview"===e.targetModule?((a=t.closest(i.target,"li"))&&a.querySelector("."+ji)&&!a.classList.contains(ui)&&a.classList.add(gi,Si),s=!0):"breadcrumbbar"===e.targetModule&&(s=!0),e.element.classList.remove("e-fe-drop","e-no-drop"),e.element.classList.add(s?"e-fe-drop":"e-no-drop"),e.dragCount=e.dragCount+1,e.trigger("fileDragging",n)}function oe(e){for(var i="",n=Object.keys(e),s=0;s<n.length;s++)"message"!==n[s]&&(i+=(0===s?"":", ")+n[s]+": "+t.getValue(n[s],e));return i}function le(e,i){return e.hasId?t.getValue("id",i):k(e,i)}function he(e,i){e.itemData=[i],e.currentItemText=t.getValue("name",i),e.isFile=t.getValue("isFile",i),e.filterPath=t.getValue("filterPath",i)}function de(e){be(e.itemData[0])?ze(e,"Rename"):fe(e,e.itemData[0],kn)}function pe(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!Oe(t[i]))return void fe(e,t[i],An);e.selectedItems.length>0&&He(e,e.path,e.selectedItems)}function ce(e,t,i){for(var n=0;n<t.length;n++)if(!be(t[n]))return void fe(e,t[n],kn);e.itemData=t,Pe(e,i,e.path,"delete")}function ue(e,t,i){for(var n=0;n<t.length;n++)if(!Oe(t[n]))return void fe(e,t[n],An);e.itemData=t,i.length>0&&He(e,e.path,i)}function fe(e,i,n){var s=t.getValue("message",t.getValue("permission",i));""===s&&(s=V(e,"Access-Message").replace("{0}",t.getValue("name",i)).replace("{1}",n)),ze(e,"Error",{error:{code:"401",fileExists:null,message:s}})}function ge(e){return me(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function me(e){var i=t.getValue("permission",e);return!(i&&!t.getValue("read",i))}function be(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("write",i)}function ye(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("writeContents",i)}function ve(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("upload",i)}function Oe(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("download",i)}function we(e){var t=e.itemData[0];ye(t)?ze(e,"NewFolder"):fe(e,t,Ln)}function Ie(e){var t=e.itemData[0];if(ve(t)){var i="#"+e.element.id+si;document.querySelector(i).click()}else fe(e,t,Tn)}function De(e,i,n){for(var s=e.itemData,a=0;a<s.length;a++)t.isNullOrUndefined(t.getValue("hasChild",s[a]))&&t.setValue("hasChild",!1,s[a]);Ee(e,{action:"read",path:n,showHiddenItems:e.showHiddenItems,data:s},Me,i)}function Se(e,t){Ee(e,{action:"create",path:e.path,name:t,data:e.itemData},Le,t)}function Ce(e,i){var n={action:"filter",path:e.path,showHiddenItems:e.showHiddenItems,data:[x(e)]},s=e.filterData?t.extend(void 0,n,e.filterData):n;Ee(e,void 0,ke,i,t.getValue("action",s))}function je(e,t,i){var n,s;if(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered){var a=e.filterPath;e.hasId?(n=e.currentItemText,s=i):(n=(a=a.replace(/\\/g,"/")).replace(t,"")+e.currentItemText,s=a.replace(t,"")+i)}else n=e.currentItemText,s=i;Ee(e,{action:"rename",path:t,name:n,newName:s,data:e.itemData},Te,t)}function xe(e,t,i,n,s,a,r){var o={action:s,path:t,targetData:e.itemData[0],targetPath:n,names:i,renameFiles:a,data:r};e.destinationPath=n,Ee(e,o,Ae,t,s,n)}function Pe(e,t,i,n){Ee(e,{action:n,path:i,names:t,data:e.itemData},Fe,i)}function Ne(e,t,i,n){Ee(e,{action:n,path:i,names:t,data:e.itemData},Ue,i,n)}function Ee(e,i,n,s,a,r){var o={url:e.ajaxSettings.url,type:"POST",mode:!0,dataType:"json",contentType:"application/json",data:JSON.stringify(i),onSuccess:null,onFailure:null,beforeSend:null},l={action:t.getValue("action",i),ajaxSettings:o,cancel:!1};e.trigger("beforeSend",l,function(o){o.cancel||(e.notify(tn,{}),new t.Ajax({url:t.getValue("url",o.ajaxSettings),type:t.getValue("type",o.ajaxSettings),mode:t.getValue("mode",o.ajaxSettings),dataType:t.getValue("dataType",o.ajaxSettings),contentType:t.getValue("contentType",o.ajaxSettings),data:t.getValue("data",o.ajaxSettings),beforeSend:t.getValue("beforeSend",o.ajaxSettings),onSuccess:function(l){if(t.isNullOrUndefined(l)){var h={error:{fileExists:null,message:V(e,"Server-Error")+" "+e.ajaxSettings.url,code:"406"},files:null};return void Re(e,o,n,h,s,a,r)}"string"==typeof l&&(l=JSON.parse(l)),e.notify(sn,{action:"success"});var d=e.expandedId?e.expandedId:e.pathId[e.pathId.length-1];if(!t.isNullOrUndefined(l.cwd)&&"read"===t.getValue("action",i)&&(l.cwd.name=1===e.pathId.length?e.rootAliasName||l.cwd.name:l.cwd.name,t.setValue("_fm_id",d,l.cwd),t.setValue(d,l.cwd,e.feParent),!t.isNullOrUndefined(l.files)||"401"===l.error.code)){if(("finalize-end"===s||"initial-end"===s)&&0===e.pathNames.length){var p=t.getValue(e.pathId[0],e.feParent);e.pathNames[0]=t.getValue("name",p),e.hasId=!t.isNullOrUndefined(t.getValue("id",p))}"finalize-end"===s&&m(e)}if(!t.isNullOrUndefined(l.files)){_(l.files);for(var c=0,u=l.files.length;c<u;c++){var f=l.files[c];t.setValue("_fm_iconClass",E(f),f)}"read"===t.getValue("action",i)&&(U(l,d),t.setValue(d,l.files,e.feFiles))}if(!t.isNullOrUndefined(l.details)&&!t.isNullOrUndefined(e.rootAliasName)){var g=e.rootAliasName||t.getValue("name",l.details),b=t.getValue("location",l.details).replace(new RegExp("/","g"),"\\");("/"===t.getValue("path",i)||e.hasId&&1===t.getValue("path",i).match(/[\/]/g).length)&&0===t.getValue("names",i).length?(t.setValue("name",g,l.details),b=g):b=b.replace(b.substring(0,b.indexOf("\\")),g),t.setValue("location",b,l.details)}n(e,l,s,a,r),t.isNullOrUndefined(l.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s||e.notify(jn,l),"function"==typeof t.getValue("onSuccess",o.ajaxSettings)&&t.getValue("onSuccess",o.ajaxSettings)()},onFailure:function(){var t={files:null,error:{code:"404",message:V(e,"Network-Error")+" "+e.ajaxSettings.url,fileExists:null}};Re(e,o,n,t,s,a,r)}}).send())})}function Re(e,i,n,s,a,r,o){e.notify(sn,{action:"failure"}),n(e,s,a,r,o),"function"==typeof t.getValue("onFailure",i.ajaxSettings)&&t.getValue("onFailure",i.ajaxSettings)()}function Me(e,i,n){if(t.isNullOrUndefined(i.files))"401"===i.error.code&&(i.files=[],e.notify(n,i),e.notify(hn,{})),_e(e,i,"read");else{e.notify(n,i),e.notify(hn,{});s={action:"read",result:i};e.trigger("success",s)}if(e.isDragDrop&&e.isDropEnd){if(0!==e.droppedObjects.length){var s={fileDetails:e.droppedObjects};e.trigger("fileDropped",s)}e.isDropEnd=e.isDragDrop=!1}}function ke(e,i,n,s){if(t.isNullOrUndefined(i.files))_e(e,i,s);else{e.notify(n,i);var a={action:s,result:i};e.trigger("success",a)}}function Le(e,i,n){if(t.isNullOrUndefined(i.files))if("400"===i.error.code){if(e.dialogObj&&e.dialogObj.visible){var s=t.select("#newname",e.dialogObj.element),a=V(e,"Validation-NewFolder-Exists").replace("{0}",'"'+s.value+'"');s.parentElement.nextElementSibling.innerHTML=a}else ze(e,"Error",{files:null,error:{code:"400",message:V(e,"Validation-NewFolder-Exists").replace("{0}",'"'+n+'"'),fileExists:null}});r={action:"create",error:i.error};e.trigger("failure",r)}else e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),_e(e,i,"create");else{e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),e.createdItem=i.files[0],e.breadcrumbbarModule.searchObj.value="";var r={action:"create",result:i};e.trigger("success",r),e.itemData=[x(e)],De(e,Gi,e.path)}}function Te(e,i,n){if(t.isNullOrUndefined(i.files))if("400"===i.error.code&&e.dialogObj&&e.dialogObj.visible){var s=t.select("#rename",e.dialogObj.element),a=V(e,"Validation-Rename-Exists").replace("{0}",'"'+e.currentItemText+'"');a=a.replace("{1}",'"'+s.value+'"'),s.parentElement.nextElementSibling.innerHTML=a;r={action:"rename",error:i.error};e.trigger("failure",r)}else t.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),_e(e,i,"rename");else{t.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide();var r={action:"rename",result:i};e.trigger("success",r),e.renamedItem=i.files[0],"navigationpane"===e.activeModule?(e.pathId.pop(),e.itemData=[t.getValue(e.pathId[e.pathId.length-1],e.feParent)],De(e,mn,Q(e.path))):(e.itemData=[x(e)],""!==e.breadcrumbbarModule.searchObj.value?Ve(e,bn,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?Ce(e,bn):De(e,bn,e.path))}}function Ae(e,i,n,s){i.error&&i.error.fileExists?(e.fileLength=0,t.isNullOrUndefined(i.files)||(e.isPasteError=!0,X(e,s,i)),qe(e,"DuplicateItems",i.error.fileExists),"404"===i.error.code&&ze(e,"Error",i)):i.error||t.isNullOrUndefined(i.files)?i.error&&!t.isNullOrUndefined(i.files)?(e.isPasteError=!0,X(e,s,i),ze(e,"Error",i)):_e(e,i,s):(e.isPasteError=!1,X(e,s,i))}function Fe(e,i,n){if(t.isNullOrUndefined(i.files))_e(e,i,"delete");else if(e.setProperties({path:n},!0),e.itemData=[x(e)],De(e,Ji,e.path),i.error)_e(e,i,"delete");else{var s={action:"delete",result:i};e.trigger("success",s)}}function Ue(e,i,n,s){if(t.isNullOrUndefined(i.details))_e(e,i,"details");else{ze(e,s,null,i.details);var a={action:"details",result:i};e.trigger("success",a)}}function _e(e,t,i){ze(e,"Error",t);var n={action:i,error:t.error};e.trigger("failure",n)}function Ve(e,t,i,n,s,a){Ee(e,{action:"search",path:i,searchString:n,showHiddenItems:s,caseSensitive:a,data:e.itemData},Be,t)}function Be(e,i,n){if(t.isNullOrUndefined(i.files))_e(e,i,"search");else{e.notify(n,i);var s={action:"search",result:i};e.trigger("success",s)}}function He(e,i,n){var s=e.ajaxSettings.downloadUrl?e.ajaxSettings.downloadUrl:e.ajaxSettings.url,a={data:{action:"download",path:i,names:n,data:e.itemData},cancel:!1};e.trigger("beforeDownload",a,function(i){if(!i.cancel){var n=t.createElement("form",{id:e.element.id+"_downloadForm",attrs:{action:s,method:"post",name:"downloadForm",download:""}}),a=t.createElement("input",{id:e.element.id+"_hiddenForm",attrs:{name:"downloadInput",value:JSON.stringify(i.data),type:"hidden"}});n.appendChild(a),e.element.appendChild(n),document.forms.namedItem("downloadForm").submit(),e.element.removeChild(n)}})}function ze(e,i,s,a,r){var o=rt(e,i,s,a,r);t.isNullOrUndefined(e.dialogObj)?(e.dialogObj=new n.Dialog({beforeOpen:ot.bind(this,e,o.dialogName),beforeClose:function(t){Ke(e,e.dialogObj,t,o.dialogName)},header:o.header,content:o.content,buttons:o.buttons,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,allowDragging:!0,isModal:!0,target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ri:ai),width:"350px",open:o.open,close:o.close,enableRtl:e.enableRtl,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.dialogObj.isStringTemplate=!0,e.dialogObj.appendTo("#"+e.element.id+Zt)):dt(e,o)}function qe(e,i,s,a){var r=Qe(e,i,s,a);e.isApplySame=!1,t.isNullOrUndefined(e.extDialogObj)?(e.extDialogObj=new n.Dialog({beforeOpen:lt.bind(this,e,r.dialogName),beforeClose:function(t){Ke(e,e.extDialogObj,t,r.dialogName)},content:r.content,header:r.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ri:ai),enableRtl:e.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:r.buttons,open:r.open,close:r.close,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.extDialogObj.isStringTemplate=!0,e.extDialogObj.appendTo("#"+e.element.id+ti)):(e.extDialogObj.header=r.header,e.extDialogObj.close=r.close,e.extDialogObj.open=r.open,e.extDialogObj.close=r.close,e.extDialogObj.content=r.content,e.extDialogObj.buttons=r.buttons,e.extDialogObj.enableRtl=e.enableRtl,e.extDialogObj.locale=e.locale,e.extDialogObj.beforeOpen=lt.bind(this,e,r.dialogName),e.extDialogObj.beforeClose=function(t){Ke(e,e.extDialogObj,t,r.dialogName)},e.extDialogObj.dataBind(),e.extDialogObj.show())}function We(e,i,n,s){var a={cancel:n.cancel,popupName:s,popupModule:i};t.isBlazor()&&delete a.popupModule,e.trigger("beforePopupOpen",a,function(e){n.cancel=e.cancel})}function Ke(e,i,n,s){var a={cancel:n.cancel,popupModule:i,popupName:s};t.isBlazor()&&delete a.popupModule,e.trigger("beforePopupClose",a,function(t){n.cancel=t.cancel,n.cancel||!n.isInteracted||"Rename"!==s&&"Create Folder"!==s||e.trigger(an,{})})}function Ge(e,i,n){var s={popupModule:i,element:i.element,popupName:n};t.isBlazor()&&delete s.popupModule,e.trigger("popupOpen",s)}function Ye(e,i,n){var s={popupModule:i,element:i.element,popupName:n};t.isBlazor()&&delete s.popupModule,e.trigger("popupClose",s)}function Qe(e,t,i,n){var s,a,r,o={header:"",content:"",buttons:[],dialogName:""};switch(o.open=function(){Ge(e,e.extDialogObj,o.dialogName)},o.close=function(){Ye(e,e.extDialogObj,o.dialogName)},t){case"Extension":o.header=V(e,"Header-Rename-Confirmation"),o.content="<div>"+V(e,"Content-Rename-Confirmation")+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Yes")},click:function(){e.extDialogObj.hide(),je(e,n,e.renameText)}},{buttonModel:{content:V(e,"Button-No")},click:function(){e.extDialogObj.hide(),e.dialogObj.hide()}}],o.dialogName="Extension Change";break;case"DuplicateItems":o.dialogName="Duplicate Items",e.replaceItems=i,a=-1===(r=(a=e.replaceItems[e.fileLength]).lastIndexOf("/"))?a:a.substring(r),o.header=V(e,"Header-Duplicate"),s="<div>"+V(e,"Content-Duplicate")+"</div>",o.content=s.replace("{0}",a),o.close=function(){if(!e.isDropEnd&&0===e.duplicateItems.length){var t={fileDetails:e.droppedObjects};e.trigger("fileDropped",t),e.isDropEnd=e.isDragDrop=!1}Ye(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Yes")},click:function(){if(e.duplicateItems.push(e.replaceItems[e.fileLength]),e.duplicateRecords.push(Z(e,e.replaceItems[e.fileLength])),e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else{e.extDialogObj.hide();var a=e.isDragDrop?e.dragPath:e.targetPath,r=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath,o=e.isDragDrop?"move":e.fileAction;xe(e,a,e.duplicateItems,r,o,e.duplicateItems,e.duplicateRecords)}}},{buttonModel:{content:V(e,"Button-No")},click:function(){if(e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else if(e.extDialogObj.hide(),0!==e.duplicateItems.length){var a=e.isDragDrop?"move":e.fileAction,r=e.isDragDrop?e.dragPath:e.targetPath,o=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath;xe(e,r,e.duplicateItems,o,a,e.duplicateItems,e.duplicateRecords)}}}];break;case"UploadRetry":o.dialogName="Retry Upload",o.header=V(e,"Header-Retry"),o.content=e.retryFiles[0].name+'<div class="e-fe-retrycontent">'+V(e,"Content-Retry")+"</div>",o.open=$e.bind(this,e),o.close=function(){e.isRetryOpened=!1,Xe(e),Ye(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Keep-Both")},click:function(){Je(e,!0)}},{buttonModel:{isPrimary:!0,content:V(e,"Button-Replace")},click:function(){Je(e,!1)}},{buttonModel:{isPrimary:!0,content:V(e,"Button-Skip")},click:function(){var t=0;e.isApplySame?(t=e.retryFiles.length,e.retryFiles=[],Xe(e)):(t=1,e.retryFiles.splice(0,1),0!==e.retryFiles.length?qe(e,"UploadRetry"):Xe(e)),e.notify(nn,{count:t})}}]}return o}function Je(e,t){e.isApplySame?(t?Ze(e):et(e),Xe(e)):(e.retryArgs.push({action:t?"keepboth":"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1),0!==e.retryFiles.length?qe(e,"UploadRetry"):Xe(e))}function Xe(e){var i=!0;e.isRetryOpened?e.isRetryOpened=!1:i=!1;var n=t.select(".e-dlg-checkbox",e.extDialogObj.element);n&&t.remove(n),i?e.extDialogObj.hide():e.retryFiles=[]}function $e(e,i){e.isRetryOpened=!0;var n=t.getValue("element",i),s=t.select(".e-dlg-content",n),a=e.createElement("div",{className:"e-dlg-checkbox"}),o=e.createElement("input",{id:e.element.id+"_applyall"});a.appendChild(o),s.appendChild(a),new r.CheckBox({label:V(e,"ApplyAll-Label"),change:function(t){e.isApplySame=t.checked}}).appendTo("#"+e.element.id+"_applyall"),Ge(e,e.extDialogObj,"Retry Upload")}function Ze(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"keepboth",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function et(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function tt(e){var i=t.select("#newname",e.dialogObj.element);i.focus(),i.value="";var n=i.value.length;i.setSelectionRange(0,n)}function it(e){var i=t.select("#newname",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||at(i,V(e,"Content-NewFolder")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){ft(e,i)},i.onkeyup=function(t){13===bt(t)&&pt(e)},tt(e),Ge(e,e.dialogObj,"Create Folder")}function nt(e){var i=t.select("#rename",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||at(i,V(e,"Content-Rename")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){ft(e,i)},i.onkeyup=function(t){13===bt(t)&&ct(e)},st(e,i),Ge(e,e.dialogObj,"Rename")}function st(e,t){t.focus();var i="";if(e.isFile&&!e.showFileExtension){var n=e.currentItemText.lastIndexOf(".");i=-1===n?e.currentItemText:e.currentItemText.substring(0,n)}else i=e.currentItemText;t.value=i,e.isFile&&e.showFileExtension&&-1!==t.value.indexOf(".")?t.setSelectionRange(0,t.value.lastIndexOf(".")):t.setSelectionRange(0,t.value.length)}function at(e,t){a.Input.createInput({element:e,properties:{placeholder:t}})}function rt(e,i,n,s,a){var r,o,l,h,d,p={header:"",content:"",buttons:[],dialogName:""};switch(p.open=function(){Ge(e,e.dialogObj,p.dialogName)},p.close=function(){Ye(e,e.dialogObj,p.dialogName)},i=s&&!0===s.multipleFiles?"MultipleFileDetails":i){case"NewFolder":p.dialogName="Create Folder",p.header=V(e,"Header-NewFolder"),p.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Create")},click:function(t){"keydown"!==t.type&&pt(e)}}],p.open=it.bind(this,e);break;case"Delete":p.dialogName="Delete",e.selectedItems.length>1?(p.content=("<div>"+V(e,"Content-Multiple-Delete")+"</div>").replace("{0}",e.selectedItems.length.toString()),p.header=V(e,"Header-Multiple-Delete")):(p.content="<div>"+V(e,e.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",p.header=V(e,e.isFile?"Header-Delete":"Header-Folder-Delete")),p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Yes")},click:function(t){ut(e)}},{buttonModel:{content:V(e,"Button-No")},click:function(){e.dialogObj.hide()}}];break;case"Rename":p.dialogName="Rename",p.header=V(e,"Header-Rename"),p.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Save")},click:function(t){"keydown"!==t.type&&ct(e)}}],p.open=nt.bind(this,e);break;case"details":p.dialogName="File Details",o=new t.Internationalization(e.locale).formatDate(new Date(s.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),r="",t.isNullOrUndefined(s.permission)||(r="<tr><td>"+V(e,"Permission")+'</td><td class="'+Hi+'" >'+oe(s.permission)+"</td></tr>"),p.header=s.name,p.content="<table><tr><td>"+V(e,"Type")+'</td><td class="'+Hi+'" title="'+(s.isFile?"File":"Folder")+'">'+(s.isFile?"File":"Folder")+"</td></tr><tr><td>"+V(e,"Size")+'</td><td><span class="'+Hi+'" title ="'+s.size+'">'+s.size+"</span></td></tr><tr><td>"+V(e,"Location")+'</td><td class="'+Hi+'" title="'+s.location+'">'+s.location+"</td></tr><tr><td>"+V(e,"Modified")+'</td><td class="'+Hi+'" >'+o+"</td></tr>"+r+"</table>",p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}];break;case"MultipleFileDetails":p.dialogName="File Details",h=(l=s.name.split(",").map(function(e){var t=e.indexOf(".")+1;return 0===t?"Folder":e.substr(t).replace(" ","")})).every(function(e,t,i){return e===i[0]})?"Folder"===l[0]?"Folder":l[0].toLocaleUpperCase()+" Type":"Multiple Types",d=s.location,p.header=s.name,p.content="<table><tr><td>"+V(e,"Type")+':</td><td class="'+Hi+'">'+h+"</td></tr><tr><td>"+V(e,"Size")+":</td><td>"+s.size+'<span class="'+Hi+'" title ="'+s.size+'"></span></td></tr><tr><td>'+V(e,"Location")+':</td><td class="'+Hi+'" title="'+d+'">'+d+"</td></tr></table>",p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Ok")},click:function(t){"keydown"!==t.type&&e.dialogObj.hide()}}];break;case"Error":e.notify(an,{}),p.dialogName="Error","401"===n.error.code?p.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+V(e,"Access-Denied")+"</div>":p.header=V(e,"Error"),p.content='<div class="'+_i+'">'+n.error.message+"</div>",p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}]}return p}function ot(e,i,n){ht(t.selectAll(".e-btn",e.dialogObj.element)),We(e,e.dialogObj,n,i)}function lt(e,i,n){ht(t.selectAll(".e-btn",e.extDialogObj.element)),We(e,e.extDialogObj,n,i)}function ht(e){for(var t=0;t<e.length;t++)!function(t){e[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},e[t].onkeyup=function(i){13===i.keyCode&&e[t].click()}}(t)}function dt(e,t){e.dialogObj.header=t.header,e.dialogObj.content=t.content,e.dialogObj.buttons=t.buttons,e.dialogObj.enableRtl=e.enableRtl,e.dialogObj.open=t.open,e.dialogObj.close=t.close,e.dialogObj.beforeOpen=ot.bind(this,e,t.dialogName),e.dialogObj.beforeClose=function(i){Ke(e,e.dialogObj,i,t.dialogName)},e.dialogObj.dataBind(),e.dialogObj.show()}function pt(e){var i=t.select("#newname",e.dialogObj.element);gt(e,i),""===i.parentElement.nextElementSibling.innerHTML&&Se(e,i.value)}function ct(e){var i=t.select("#rename",e.dialogObj.element);if(gt(e,i),""===i.parentElement.nextElementSibling.innerHTML){var n=i.value,s=e.currentItemText.lastIndexOf(".");if(e.isFile&&!e.showFileExtension&&(n+=-1===s?"":e.currentItemText.substr(s)),e.renameText=n,e.currentItemText===n)return void e.dialogObj.hide();var a="navigationpane"===e.activeModule?Q(e.path):e.path;if(e.renamedId=t.getValue("id",e.itemData[0]),e.isFile){var r=-1===s?"":e.currentItemText.substr(s),o=n.lastIndexOf("."),l=-1===o?"":n.substr(o);e.showFileExtension&&r!==l?qe(e,"Extension",null,a):je(e,a,n)}else je(e,a,n)}}function ut(e){e.dialogObj.hide(),e.notify(Qi,{})}function ft(e,t){/[\/\\|*?"<>:]/.test(t.value)?mt(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=V(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function gt(e,t){ft(e,t);var i=t.value.length-1;""===t.value||t.value.lastIndexOf(".")!==i&&t.value.lastIndexOf(" ")!==i||!e.showFileExtension&&-1!==e.currentItemText.lastIndexOf(".")||mt(e,t)}function mt(e,t){var i=V(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');t.parentElement.nextElementSibling.innerHTML=i}function bt(e){return e.keyCode?e.keyCode:e.which?e.which:e.charCode}function yt(e,i,s){var a=t.createElement("div",{className:"e-image-wrap"}),r=t.createElement("img",{className:"e-image",attrs:{src:s,alt:i}});a.appendChild(r),t.isNullOrUndefined(e.viewerObj)?(e.viewerObj=new n.Dialog({header:i,content:a,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,isModal:!0,width:"350px",height:"350px",target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ri:ai),locale:e.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:e.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:e.enableRtl,open:vt.bind(this,e),close:function(){Ye(e,e.viewerObj,"Image Preview")},beforeOpen:function(t){We(e,e.viewerObj,t,"Image Preview")},beforeClose:function(t){Ke(e,e.viewerObj,t,"Image Preview")},resizing:Ot.bind(this,e),resizeStop:Ot.bind(this,e)}),e.viewerObj.isStringTemplate=!0,e.viewerObj.appendTo("#"+e.element.id+ei)):(e.viewerObj.refresh(),e.viewerObj.header=i,e.viewerObj.content=a,e.viewerObj.enableRtl=e.enableRtl,e.viewerObj.dataBind(),e.viewerObj.show())}function vt(e){setTimeout(function(){e.viewerObj&&e.viewerObj.element.focus()}),Ot(e),Ge(e,e.viewerObj,"Image Preview")}function Ot(e){var i=t.select(".e-dlg-content",e.viewerObj.element),n=t.select(".e-image-wrap",e.viewerObj.element),s=window.getComputedStyle(i,null),a=s?2*parseFloat(s.paddingRight):36,r=s?2*parseFloat(s.paddingBottom):20;n.style.width=i.offsetWidth-a+"px",n.style.height=i.offsetHeight-r+"px"}var wt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),It=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Dt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return wt(i,e),It([t.Property(null)],i.prototype,"downloadUrl",void 0),It([t.Property(null)],i.prototype,"getImageUrl",void 0),It([t.Property(null)],i.prototype,"uploadUrl",void 0),It([t.Property(null)],i.prototype,"url",void 0),i}(t.ChildProperty),St=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ct=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},jt=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],xt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return St(i,e),Ct([t.Property(jt)],i.prototype,"items",void 0),Ct([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Pt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Pt(i,e),Nt([t.Property(!0)],i.prototype,"allowSearchOnTyping",void 0),Nt([t.Property("contains")],i.prototype,"filterType",void 0),Nt([t.Property(!0)],i.prototype,"ignoreCase",void 0),i}(t.ChildProperty),Rt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},kt=[{field:"name",headerText:"Name",minWidth:120,template:'<span class="e-fe-text">${name}</span>',customAttributes:{class:"e-fe-grid-name"}},{field:"_fm_modified",headerText:"DateModified",type:"dateTime",format:"MMMM dd, yyyy HH:mm",minWidth:120,width:"190"},{field:"size",headerText:"Size",minWidth:90,width:"110",template:'<span class="e-fe-size">${size}</span>'}],Lt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Rt(i,e),Mt([t.Property(!0)],i.prototype,"columnResizing",void 0),Mt([t.Property(kt)],i.prototype,"columns",void 0),i}(t.ChildProperty),Tt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),At=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ft=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],Ut=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],_t=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],Vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Tt(i,e),At([t.Property(Ft)],i.prototype,"file",void 0),At([t.Property(Ut)],i.prototype,"folder",void 0),At([t.Property(_t)],i.prototype,"layout",void 0),At([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Bt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ht=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bt(i,e),Ht([t.Property("650px")],i.prototype,"maxWidth",void 0),Ht([t.Property("240px")],i.prototype,"minWidth",void 0),Ht([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),qt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qt(i,e),Wt([t.Property("")],i.prototype,"allowedExtensions",void 0),Wt([t.Property(!0)],i.prototype,"autoUpload",void 0),Wt([t.Property(!1)],i.prototype,"autoClose",void 0),Wt([t.Property(0)],i.prototype,"minFileSize",void 0),Wt([t.Property(3e7)],i.prototype,"maxFileSize",void 0),i}(t.ChildProperty),Gt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Gt(i,e),Yt([t.Property("")],i.prototype,"field",void 0),Yt([t.Property("")],i.prototype,"headerText",void 0),Yt([t.Property("")],i.prototype,"width",void 0),Yt([t.Property("")],i.prototype,"minWidth",void 0),Yt([t.Property("")],i.prototype,"maxWidth",void 0),Yt([t.Property("Left")],i.prototype,"textAlign",void 0),Yt([t.Property(null)],i.prototype,"headerTextAlign",void 0),Yt([t.Property(null)],i.prototype,"type",void 0),Yt([t.Property(null)],i.prototype,"format",void 0),Yt([t.Property(null)],i.prototype,"template",void 0),Yt([t.Property(null)],i.prototype,"headerTemplate",void 0),Yt([t.Property(!0)],i.prototype,"allowSorting",void 0),Yt([t.Property(!0)],i.prototype,"allowResizing",void 0),Yt([t.Property(null)],i.prototype,"customAttributes",void 0),Yt([t.Property("")],i.prototype,"hideAtMedia",void 0),Yt([t.Property(null)],i.prototype,"customFormat",void 0),i}(t.ChildProperty),Jt="_layout",Xt="_grid",$t="_largeicons",Zt="_dialog",ei="_img_dialog",ti="_extn_dialog",ii="_content",ni="_breadcrumbbar",si="_upload",ai="e-fe-popup",ri="e-fe-popup e-fe-mobile",oi="e-fe-m-filter",li="e-large-icons",hi="e-list-item",di="e-list-text",pi="e-icons e-fe-tick",ci="e-icons e-fe-dot",ui="e-blur",fi="e-active",gi="e-hover",mi="e-focus",bi="e-check",yi="e-checkbox-wrapper",vi="e-row",Oi="e-empty",wi="e-empty-content",Ii="e-empty-inner-content",Di="e-fe-clone",Si="e-fe-drop-folder",Ci="e-fe-drop-file",ji="e-fe-folder",xi="e-fe-image",Pi="e-fe-music",Ni="e-fe-video",Ei="e-large-icon",Ri="e-empty-icon e-fe-folder",Mi="e-gridheader",ki="e-treeview",Li="e-menu-icon",Ti="e-content",Ai="e-icons e-fe-cut",Fi="e-icons e-fe-grid",Ui="e-icons e-fe-large",_i="e-fe-errorcontent",Vi="e-rtl",Bi="e-display-none",Hi="e-fe-value",zi="isFile",qi="model-changed",Wi="initial-end",Ki="finalize-end",Gi="create-end",Yi="path-drag",Qi="delete-init",Ji="delete-end",Xi="refresh-end",$i="resize-end",Zi="path-changed",en="destroy",tn="before-request",nn="skip-upload",sn="after-request",an="actionFailure",rn="search",on="open-init",ln="open-end",hn="selection-changed",dn="clear-path-init",pn="layout-change",cn="sort-by-change",un="details-init",fn="menu-item-data",gn="rename-init",mn="rename-end-parent",bn="rename-end",yn="show-paste",vn="hide-paste",On="cut-copy-init",wn="paste-init",In="paste-end",Dn="cut-end",Sn="sort-column",Cn="path-column",jn="search-change",xn="drop-init",Pn="drag-end",Nn="drop-path",En="dragging",Rn="method-call",Mn="read",kn="write",Ln="writeContents",Tn="upload",An="download",Fn=function(){function e(e){this.isInteraction=!0,this.uploadOperation=!1,this.count=0,this.isRendered=!0,this.tapCount=0,this.isPasteOperation=!1,this.isInteracted=!0,this.parent=e,this.element=t.select("#"+this.parent.element.id+$t,this.parent.element),t.addClass([this.element],li),this.addEventListener(),this.keyConfigs={end:"end",home:"home",tab:"tab",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",ctrlUp:"ctrl+uparrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftLeft:"shift+leftarrow",shiftRight:"shift+rightarrow",shiftUp:"shift+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csLeft:"ctrl+shift+leftarrow",csRight:"ctrl+shift+rightarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",ctrlA:"ctrl+a",enter:"enter",altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:"ctrl+x",ctrlC:"ctrl+c",ctrlV:"ctrl+v",f2:"f2",shiftdel:"shift+delete",back:"backspace",ctrlD:"ctrl+d"}}return e.prototype.render=function(e){if(this.parent.visitedItem=null,this.startItem=null,n.showSpinner(this.parent.element),"LargeIcons"===this.parent.view){this.resetMultiSelect(),this.element.setAttribute("tabindex","0"),this.listObj&&(this.unWireEvents(),this.removeEventListener()),this.parent.notify("hide-layout",{});var i=t.select("#"+this.parent.element.id+$t,this.parent.element),s=t.select("ul",i);if(s&&t.remove(s),this.listObj={ariaAttributes:{itemRole:"option",listRole:"listbox",itemText:"",groupItemRole:"group",wrapperRole:""},showIcon:!0,fields:{text:"name",iconCss:"_fm_icon",imageUrl:"_fm_imageUrl",htmlAttributes:"_fm_htmlAttr"},sortOrder:this.parent.sortOrder,itemCreated:this.onItemCreated.bind(this),enableHtmlSanitizer:this.parent.enableHtmlSanitizer},this.items=[],this.items=this.renderList(e),this.items=L(this.parent,this.items),this.listElements=o.ListBase.createListFromJson(t.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call(t.selectAll("."+hi,this.listElements)),this.element.appendChild(this.listElements),this.preventImgDrag(),this.createDragObj(),i.classList.remove(Bi),0===this.itemList.length){var a=this.element.querySelector(".e-list-parent");this.element.removeChild(a),A(this.parent,this.element,e)}else 0!==this.itemList.length&&this.element.querySelector("."+Oi)&&this.element.removeChild(this.element.querySelector("."+Oi));!0===this.isPasteOperation&&(this.selectItems(this.parent.pasteNodes),this.isPasteOperation=!1),!0===this.uploadOperation&&(this.selectItems(this.parent.uploadItem),this.parent.setProperties({selectedItems:[]},!0),++this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[]));var r=this.element.querySelectorAll("."+fi);0!==r.length&&(this.parent.activeModule="largeiconsview");for(var l=0;l<r.length;l++)r[l].setAttribute("aria-selected","true");this.adjustHeight(),this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.isRendered=!0,n.hideSpinner(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},e.prototype.preventImgDrag=function(){for(var e=0;e<this.itemList.length;)this.itemList[e].querySelector("img")&&(this.itemList[e].ondragstart=function(){return!1}),e++},e.prototype.createDragObj=function(){var e=this;!this.parent.isMobile&&this.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!0,dragTarget:"."+Ei,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:te.bind(this,this.parent),drag:re.bind(this,this.parent),clone:!0,dragStart:function(t){ie(e.parent,t,e.dragObj)}})):this.dragObj&&!this.parent.allowDragAndDrop&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target,n=t.closest(i,".e-list-item");if(!n)return null;n&&!n.classList.contains("e-active")&&this.setFocus(n);var s=this.element.querySelectorAll("."+fi);this.parent.activeElements=[],this.parent.dragData=[];for(var a=0;a<s.length;a++)this.parent.dragData.push(this.getItemObject(s[a])),this.parent.activeElements.push(s[a]);return w(this.parent,n),this.parent.dragPath=this.parent.path,ee(this.parent),this.parent.virtualDragElement},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.closest(e.target,".e-list-item"),n=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(i){var s=this.getItemObject(i);this.parent.dropPath=s.isFile?this.parent.path:M(this.parent,s,this.parent.path),this.parent.dropData=s.isFile?n:s}else this.parent.dropPath=this.parent.path,this.parent.dropData=n}},e.prototype.getModuleName=function(){return"largeiconsview"},e.prototype.adjustHeight=function(){var e=t.select("#"+this.parent.element.id+ii,this.parent.element),i=t.select("#"+this.parent.element.id+ni,this.parent.element);this.element.style.height=e.offsetHeight-i.offsetHeight+"px"},e.prototype.onItemCreated=function(e){if(e.item.removeAttribute("aria-level"),!this.parent.showFileExtension&&t.getValue("isFile",e.curData)){var i=e.item.querySelector("."+di),n=t.getValue("name",e.curData),s=t.getValue("type",e.curData);i.innerHTML=n.substr(0,n.length-s.length)}this.renderCheckbox(e);var a={element:e.item,fileDetails:e.curData,module:"LargeIconsView"};this.parent.trigger("fileLoad",a)},e.prototype.renderCheckbox=function(e){if(this.parent.allowMultiSelection){var i=r.createCheckBox(t.createElement,!1,{checked:!1,cssClass:"e-small"});i.setAttribute("role","checkbox"),i.setAttribute("aria-checked","false"),e.item.firstElementChild.insertBefore(i,e.item.firstElementChild.childNodes[0])}},e.prototype.onLayoutChange=function(e){if("LargeIcons"===this.parent.view){if(this.destroy(),this.render(e),"layout-change"===t.getValue("name",e)&&"move"===this.parent.fileAction&&this.parent.isCut&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length)for(var i=this.getIndexes(this.parent.selectedNodes),n=0;n<i.length;)v(this.itemList[i[n]]),n++;0!==this.element.querySelectorAll("."+fi).length&&this.element.focus(),this.checkItem(),this.parent.isLayoutChange=!1}else this.element.setAttribute("tabindex","-1")},e.prototype.checkItem=function(){var e=this.element.querySelectorAll("."+fi);if(e)for(var t=0;t<e.length;)this.checkState(e[t],!0),t++},e.prototype.renderList=function(e){for(var i=0,n=JSON.parse(JSON.stringify(e.files));i<n.length;){var s=E(n[i]),a=t.getValue("name",n[i]),r=le(this.parent,n[i]),o=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?Ei+" e-active":Ei;if(be(n[i])||(o+=" "+ge(n[i])),s===xi&&this.parent.showThumbnail&&me(n[i])){var l=R(this.parent,n[i]);t.setValue("_fm_imageUrl",l,n[i]),t.setValue("_fm_imageAttr",{alt:a},n[i])}else t.setValue("_fm_icon",s,n[i]);t.setValue("_fm_htmlAttr",{class:o,title:a},n[i]),i++}return n},e.prototype.onFinalizeEnd=function(e){this.render(e)},e.prototype.onCreateEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.clearSelect(),this.selectItems([t.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null,this.parent.largeiconsviewModule.element.focus())},e.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},e.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&Pe(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.parent.setProperties({selectedItems:[]},!0),this.clearSelect())},e.prototype.onRefreshEnd=function(e){"LargeIcons"===this.parent.view&&this.onLayoutChange(e)},e.prototype.onRenameInit=function(){"largeiconsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value&&(this.parent.searchedItems=[]),"LargeIcons"===this.parent.view&&(O(this.parent),this.parent.setProperties({selectedItems:[]},!0),this.onLayoutChange(e),this.parent.renamedItem&&(this.clearSelect(),this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null))},e.prototype.onOpenInit=function(e){"largeiconsview"===this.parent.activeModule&&this.doOpenAction(e.target)},e.prototype.onHideLayout=function(){"LargeIcons"!==this.parent.view&&this.element&&this.element.classList.add(Bi)},e.prototype.onSelectAllInit=function(){if("LargeIcons"===this.parent.view){this.startItem=this.getFirstItem();var e=this.getLastItem(),t={ctrlKey:!0,shiftKey:!0};this.doSelection(e,t),this.isInteraction=!0,this.isInteracted=!0}},e.prototype.onClearAllInit=function(){"LargeIcons"===this.parent.view&&(this.clearSelection(),this.isInteraction=!0,this.isInteracted=!0)},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onSearch=function(e){"LargeIcons"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(hn,{}),this.parent.searchedItems=e.files,this.onLayoutChange(e))},e.prototype.onLayoutRefresh=function(){"LargeIcons"===this.parent.view&&this.adjustHeight()},e.prototype.onUpdateSelectionData=function(){"LargeIcons"===this.parent.view&&this.updateSelectedData()},e.prototype.onPathColumn=function(){"LargeIcons"!==this.parent.view||t.isNullOrUndefined(this.listObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||"filterPath"!==this.parent.sortBy||(this.parent.sortBy="name",this.parent.notify(cn,{}))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Cn,this.onPathColumn),this.parent.off(Ki,this.onFinalizeEnd),this.parent.off(Gi,this.onCreateEnd),this.parent.off("selected-data",this.onSelectedData),this.parent.off(Qi,this.onDeleteInit),this.parent.off(Ji,this.onDeleteEnd),this.parent.off(Xi,this.onRefreshEnd),this.parent.off(Zi,this.onPathChanged),this.parent.off(pn,this.onLayoutChange),this.parent.off(rn,this.onSearch),this.parent.off(on,this.onOpenInit),this.parent.off(ln,this.onPathChanged),this.parent.off(qi,this.onPropertyChanged),this.parent.off(Rn,this.onMethodCall),this.parent.off(an,this.onActionFailure),this.parent.off(gn,this.onRenameInit),this.parent.off(bn,this.onPathChanged),this.parent.off("hide-layout",this.onHideLayout),this.parent.off("select-all-init",this.onSelectAllInit),this.parent.off("clear-all-init",this.onClearAllInit),this.parent.off(fn,this.onMenuItemData),this.parent.off(tn,this.onBeforeRequest),this.parent.off(sn,this.onAfterRequest),this.parent.off("splitter-resize",this.splitterResizeHandler),this.parent.off($i,this.resizeHandler),this.parent.off(wn,this.onpasteInit),this.parent.off(In,this.onpasteEnd),this.parent.off(On,this.oncutCopyInit),this.parent.off(xn,this.onDropInit),this.parent.off(un,this.onDetailsInit),this.parent.off("layout-refresh",this.onLayoutRefresh),this.parent.off(Nn,this.onDropPath),this.parent.off("update-selection-data",this.onUpdateSelectionData),this.parent.off("filter-end",this.onPathChanged))},e.prototype.addEventListener=function(){this.parent.on(Cn,this.onPathColumn,this),this.parent.on(Ki,this.onFinalizeEnd,this),this.parent.on(Gi,this.onCreateEnd,this),this.parent.on(Xi,this.onRefreshEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(Zi,this.onPathChanged,this),this.parent.on(Qi,this.onDeleteInit,this),this.parent.on(wn,this.onpasteInit,this),this.parent.on(Ji,this.onDeleteEnd,this),this.parent.on(pn,this.onLayoutChange,this),this.parent.on(rn,this.onSearch,this),this.parent.on(on,this.onOpenInit,this),this.parent.on(gn,this.onRenameInit,this),this.parent.on(bn,this.onPathChanged,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on(qi,this.onPropertyChanged,this),this.parent.on(Rn,this.onMethodCall,this),this.parent.on(an,this.onActionFailure,this),this.parent.on("hide-layout",this.onHideLayout,this),this.parent.on("select-all-init",this.onSelectAllInit,this),this.parent.on("clear-all-init",this.onClearAllInit,this),this.parent.on(fn,this.onMenuItemData,this),this.parent.on(tn,this.onBeforeRequest,this),this.parent.on(sn,this.onAfterRequest,this),this.parent.on(xn,this.onDropInit,this),this.parent.on(un,this.onDetailsInit,this),this.parent.on("splitter-resize",this.splitterResizeHandler,this),this.parent.on($i,this.resizeHandler,this),this.parent.on(In,this.onpasteEnd,this),this.parent.on(On,this.oncutCopyInit,this),this.parent.on("layout-refresh",this.onLayoutRefresh,this),this.parent.on(Nn,this.onDropPath,this),this.parent.on("update-selection-data",this.onUpdateSelectionData,this),this.parent.on("filter-end",this.onPathChanged,this)},e.prototype.onActionFailure=function(){this.isInteraction=!0,this.isInteracted=!0},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.itemData=[this.getItemObject(i)]}},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.updateSelectedData():this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""===this.parent.folderPath?[x(this.parent)]:[this.getItemObject(t.select(".e-active",this.element))])},e.prototype.oncutCopyInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.element.querySelectorAll("."+fi);this.parent.activeRecords=[],this.parent.activeElements=[];for(var t=0;t<e.length;t++)this.parent.activeElements.push(e[t]),this.parent.activeRecords.push(this.getItemObject(e[t]))}},e.prototype.onpasteEnd=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==J(this.parent,e)||this.onPathChanged(e))},e.prototype.onDropPath=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.onPropertyChanged=function(e){var i;if(e.module===this.getModuleName()||"common"===e.module)for(var n=0,s=Object.keys(e.newProp);n<s.length;n++)switch(s[n]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"selectedItems":this.isInteraction=!1,this.isInteracted=!1,i=t.isNullOrUndefined(this.parent.selectedItems)?[]:this.parent.selectedItems.slice(0),i=this.parent.allowMultiSelection?i:i.slice(i.length-1),this.parent.setProperties({selectedItems:[]},!0),this.onClearAllInit(),i.length&&this.selectItems(i),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),this.isInteraction=!0,this.isInteracted=!0;break;case"showThumbnail":C(this.parent);break;case"showFileExtension":case"showHiddenItems":De(this.parent,Zi,this.parent.path);break;case"allowMultiSelection":if("LargeIcons"!==this.parent.view)break;C(this.parent);break;case"view":D(this.parent,"LargeIcons")}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents())},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),this.keyboardModule.destroy(),this.keyboardDownModule.destroy()},e.prototype.onMouseOver=function(e){var i=t.closest(e.target,".e-list-item");O(this.parent,"hover"),null!==i&&i.classList.add(gi)},e.prototype.wireClickEvent=function(e){if(e){var i=this;this.clickObj=new t.Touch(this.element,{tap:function(e){e.originalEvent.preventDefault(),i.parent.isDevice?(i.tapCount=e.tapCount,i.tapEvent=e,setTimeout(function(){i.tapCount>0&&i.doTapAction(i.tapEvent),i.tapCount=0},350)):2===e.tapCount&&3!==e.originalEvent.which?i.dblClickHandler(e):i.clickHandler(e)},tapHold:function(e){i.parent.isDevice&&(i.multiSelect=!!i.parent.allowMultiSelection,i.parent.allowMultiSelection&&t.addClass([i.parent.element],"e-fe-m-select"),i.clickHandler(e))}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.doTapAction=function(e){var i=e.originalEvent.target,n=t.closest(i,"."+hi);this.multiSelect||i.classList.contains("e-list-parent")||t.isNullOrUndefined(n)?this.clickHandler(e):(this.parent.isFile=!1,this.updateType(n),this.parent.isFile?2===e.tapCount?(this.clickHandler(e),this.dblClickHandler(e)):this.clickHandler(e):this.dblClickHandler(e))},e.prototype.clickHandler=function(e){var t=e.originalEvent.target;O(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},e.prototype.doSelection=function(e,i){var n=t.closest(e,"."+hi),s=e.classList;this.parent.isFile=!1;var a="select";if(3===i.which&&!t.isNullOrUndefined(n)&&n.classList.contains(fi))return void this.updateType(n);if(t.isNullOrUndefined(n))this.clearSelection();else if(this.parent.allowMultiSelection&&n.classList.contains(fi)&&(i.ctrlKey||e.classList.contains(bi))&&(a="unselect"),!0!==this.triggerSelection(a,n).cancel){if(this.parent.allowMultiSelection&&(this.multiSelect||!i||i.ctrlKey)||s.contains("e-frame")||(this.updateType(n),this.clearSelect()),this.parent.allowMultiSelection&&i.shiftKey){i&&i.ctrlKey||this.clearSelect(),this.startItem||(this.startItem=n);var r=this.itemList.indexOf(this.startItem),o=this.itemList.indexOf(n);if(r>o)for(l=r;l>=o;l--)this.addActive(this.itemList[l]);else for(var l=r;l<=o;l++)this.addActive(this.itemList[l]);this.addFocus(this.itemList[o])}else this.startItem=n,this.parent.allowMultiSelection&&n.classList.contains(fi)?this.removeActive(n):this.addActive(n),this.addFocus(n);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(hn,{}),this.triggerSelect(a,n)}t.isNullOrUndefined(n)||this.updateType(n)},e.prototype.dblClickHandler=function(e){this.parent.activeModule="largeiconsview";var t=e.originalEvent.target;this.doOpenAction(t)},e.prototype.clearSelection=function(){this.clearSelect(),this.resetMultiSelect(),this.parent.notify(hn,{})},e.prototype.resetMultiSelect=function(){this.multiSelect=!1,t.removeClass([this.parent.element],"e-fe-m-select")},e.prototype.doOpenAction=function(e){var i=this;if(!t.isNullOrUndefined(e)){var n=t.closest(e,"."+hi);if(this.parent.isFile=!1,!t.isNullOrUndefined(n)){this.updateType(n);var s=this.getItemObject(n);if(!me(s))return void fe(this.parent,s,Mn);var a={cancel:!1,fileDetails:s,module:"LargeIconsView"};this.parent.trigger("fileOpen",a,function(e){if(!e.cancel){var n=t.getValue("name",s);if(i.parent.isFile){if(E(s)===xi){var a=R(i.parent,s);yt(i.parent,n,a)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)W(i.parent,s);else{var r=t.getValue("id",s),o=i.parent.path+(t.isNullOrUndefined(r)?n:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(n),i.parent.pathId.push(t.getValue("_fm_id",s)),i.parent.itemData=[s],j(i.parent)}i.parent.isFiltered=!1,i.parent.setProperties({selectedItems:[]},!0)}}})}}},e.prototype.updateType=function(e){var i=t.select("."+ji,e);this.parent.isFile=!!t.isNullOrUndefined(i)},e.prototype.keydownActionHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"moveDown":case"moveLeft":case"moveRight":case"moveUp":case"ctrlEnd":case"shiftEnd":case"csEnd":case"ctrlHome":case"shiftHome":case"csHome":case"ctrlDown":case"shiftDown":case"csDown":case"ctrlLeft":case"shiftLeft":case"csLeft":case"ctrlRight":case"shiftRight":case"csRight":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":case"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"ctrlD":e.preventDefault()}},e.prototype.keyActionHandler=function(e){if(this.isRendered){var i=this.getFocusedItem(),n=this.getFirstItem(),s=this.getLastItem();switch(e.action){case"end":this.navigateItem(s);break;case"home":this.navigateItem(n);break;case"tab":t.isNullOrUndefined(i)?t.isNullOrUndefined(n)||this.addFocus(n):this.addFocus(i);break;case"moveDown":this.navigateDown(i,!0);break;case"moveLeft":this.navigateRight(i,!1);break;case"moveRight":this.navigateRight(i,!0);break;case"moveUp":this.navigateDown(i,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(s,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(n,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(i,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(i,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(i,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(i,e);break;case"space":this.spaceKey(i);break;case"ctrlSpace":case"shiftSpace":case"csSpace":t.isNullOrUndefined(i)||this.doSelection(i,e);break;case"ctrlA":this.ctrlAKey(n,s);break;case"enter":this.doOpenAction(this.parent.visitedItem?this.parent.visitedItem:this.getVisitedItem());break;case"altEnter":this.parent.notify(un,{}),Ne(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":b(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"ctrlC":P(this.parent);break;case"ctrlV":this.parent.folderPath="",K(this.parent);break;case"ctrlX":N(this.parent);break;case"f2":this.performRename();break;case"ctrlD":this.doDownload()}}},e.prototype.doDownload=function(){this.updateSelectedData(),pe(this.parent)},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.updateSelectedData();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!be(e[t]))return void fe(this.parent,e[t],kn);ze(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),de(this.parent))},e.prototype.updateRenameData=function(){var e=t.select("."+hi+"."+fi,this.element),i=this.getItemObject(e);he(this.parent,i)},e.prototype.getVisitedItem=function(){var e=this.parent.selectedItems[this.parent.selectedItems.length-1],t=this.getIndexes([e],this.parent.hasId);return this.itemList[t[0]]},e.prototype.getFocusedItem=function(){return t.select("."+hi+"."+mi,this.element)},e.prototype.getActiveItem=function(){return t.select("."+hi+"."+fi,this.element)},e.prototype.getFirstItem=function(){return this.itemList[0]},e.prototype.getLastItem=function(){return this.itemList[this.itemList.length-1]},e.prototype.navigateItem=function(e){this.setFocus(e)},e.prototype.navigateDown=function(e,t){var i=this.getNextItem(e,t,this.perRow);this.setFocus(i)},e.prototype.navigateRight=function(e,t){var i=this.getNextItem(e,t);this.setFocus(i)},e.prototype.getNextItem=function(e,i,n){if(t.isNullOrUndefined(e))return this.getFocusedItem()||this.getActiveItem()||this.getFirstItem();var s,a=this.itemList.indexOf(e);do{if(a=i?n?a+n:a+1:n?a-n:a-1,s=this.itemList[a],t.isNullOrUndefined(s))return e}while(!t.isVisible(s));return s},e.prototype.setFocus=function(e){t.isNullOrUndefined(e)||!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(hn,{}),this.triggerSelect("select",e))},e.prototype.spaceKey=function(e){t.isNullOrUndefined(e)||e.classList.contains(fi)||!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(hn,{}),this.triggerSelect("select",e))},e.prototype.ctrlAKey=function(e,i){if(this.parent.allowMultiSelection&&!t.isNullOrUndefined(e)){this.startItem=e;var n={ctrlKey:!0,shiftKey:!0};this.doSelection(i,n)}},e.prototype.csEndKey=function(e,i){this.parent.allowMultiSelection?t.isNullOrUndefined(e)||("ctrlEnd"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csHomeKey=function(e,i){this.parent.allowMultiSelection?t.isNullOrUndefined(e)||("ctrlHome"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csDownKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0,this.perRow);t.isNullOrUndefined(n)||("ctrlDown"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!0)},e.prototype.csLeftKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1);t.isNullOrUndefined(n)||("ctrlLeft"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!1)},e.prototype.csRightKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0);t.isNullOrUndefined(n)||("ctrlRight"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!0)},e.prototype.csUpKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1,this.perRow);t.isNullOrUndefined(n)||("ctrlUp"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!1)},e.prototype.addActive=function(e){t.isNullOrUndefined(e)||(e.classList.contains(fi)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),t.addClass([e],[fi]),e.setAttribute("aria-selected","true"),this.checkState(e,!0)),this.parent.visitedItem=e)},e.prototype.removeActive=function(e){if(!t.isNullOrUndefined(e)){t.removeClass([e],[fi]),this.parent.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),this.checkState(e,!1);var i=this.parent.selectedItems.indexOf(this.getDataName(e));i>-1&&(this.parent.selectedItems.splice(i,1),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)),this.parent.visitedItem=null}},e.prototype.getDataName=function(e){var t=this.getItemObject(e);return le(this.parent,t)},e.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var i=this.getFocusedItem();i&&(i.removeAttribute("tabindex"),t.removeClass([i],[mi])),t.addClass([e],[mi]),e.setAttribute("tabindex","0"),e.focus()},e.prototype.checkState=function(e,i){if(this.parent.allowMultiSelection){var n=t.select(".e-frame",e);t.isNullOrUndefined(n)||(i?n.classList.contains(bi)||(t.addClass([n],bi),t.closest(n,"."+yi).setAttribute("aria-checked","true")):n.classList.contains(bi)&&(t.removeClass([n],bi),t.closest(n,"."+yi).setAttribute("aria-checked","false")))}},e.prototype.clearSelect=function(){var e=Array.prototype.slice.call(t.selectAll("."+fi,this.listElements));if(0!==e.length){if(!0!==this.triggerSelection("unselect",e[0]).cancel)for(var i=0,n=e.length;i<n;i++)this.removeActive(e[i]);this.triggerSelect("unselect",e[0])}},e.prototype.resizeHandler=function(){this.getItemCount(),t.isNullOrUndefined(this.listObj)||this.adjustHeight()},e.prototype.splitterResizeHandler=function(){this.getItemCount()},e.prototype.getItemCount=function(){var e=1;if(this.itemList)for(var t=0,i=this.itemList.length-1;t<i&&this.itemList[t].getBoundingClientRect().top===this.itemList[t+1].getBoundingClientRect().top;t++)e++;this.perRow=e},e.prototype.triggerSelection=function(e,t){var i={action:e,fileDetails:this.getItemObject(t),isInteracted:this.isInteraction,cancel:!1,target:t};return this.parent.trigger("fileSelection",i),this.isInteraction=!0,i},e.prototype.triggerSelect=function(e,t){var i=this.getItemObject(t);this.parent.visitedData=i;var n={action:e,fileDetails:i,isInteracted:this.isInteracted};this.parent.trigger("fileSelect",n),this.isInteracted=!0},e.prototype.selectItems=function(e){for(var t=this.getIndexes(e,this.parent.hasId),i=0,n=t.length;i<n;i++){var s={ctrlKey:!0,shiftKey:!1};this.doSelection(this.itemList[t[i]],s)}},e.prototype.getIndexes=function(e,i){for(var n=[],s=i?"id":"name",a=0,r=this.items.length;a<r;a++)-1!==e.indexOf(t.getValue(s,this.items[a]))&&n.push(a);return n},e.prototype.getItemObject=function(e){var t=this.itemList.indexOf(e);return this.items[t]},e.prototype.addSelection=function(e){var i=[];if(this.parent.hasId)i=new s.DataManager(this.items).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var n=new s.DataManager(this.items).executeLocal((new s.Query).where("name","equal",t.getValue("name",e),!1));n.length>0&&(i=new s.DataManager(n).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(i.length>0){var a=this.items.indexOf(i[0]),r={ctrlKey:!0,shiftKey:!1};this.doSelection(this.itemList[a],r)}},e.prototype.updateSelectedData=function(){for(var e=[],i=t.selectAll("."+hi+"."+fi,this.element),n=0;n<i.length;n++)e[n]=this.getItemObject(i[n]);this.parent.itemData=e},e.prototype.onMethodCall=function(e){if("LargeIcons"===this.parent.view)switch(t.getValue("action",e)){case"deleteFiles":this.deleteFiles(t.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(t.getValue("ids",e));break;case"openFile":this.openFile(t.getValue("id",e));break;case"renameFile":this.isInteraction=!1,this.isInteracted=!1,this.renameFile(t.getValue("id",e),t.getValue("newName",e));break;case"createFolder":this.isInteraction=!1,this.isInteracted=!1;break;case"clearSelection":this.isInteraction=!1,this.isInteracted=!1,this.onClearAllInit();break;case"selectAll":this.isInteraction=!1,this.isInteracted=!1,this.onSelectAllInit()}},e.prototype.getItemsIndex=function(e){var i=[],n=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),s=this.parent.hasId?"id":"name";if(this.parent.hasId||!n)for(var a=0,r=this.items.length;a<r;a++)-1!==e.indexOf(t.getValue(s,this.items[a]))&&i.push(a);else for(var a=0,r=this.items.length;a<r;a++){var o=t.getValue("filterPath",this.items[a])+t.getValue("name",this.items[a]);-1!==e.indexOf(o)&&i.push(a)}return i},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))return void this.performDelete();var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=this.items[i[a]],s[a]=le(this.parent,n[a]);ce(this.parent,n,s)}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))return void this.doDownload();var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=this.items[i[a]],s[a]=le(this.parent,n[a]);ue(this.parent,n,s)}},e.prototype.openFile=function(e){if(!t.isNullOrUndefined(e)){var i=this.getItemsIndex([e]);i.length>0&&this.doOpenAction(this.itemList[i[0]])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))return void this.performRename();var n=this.getItemsIndex([e]);n.length>0&&(he(this.parent,this.items[n[0]]),t.isNullOrUndefined(i)?de(this.parent):be(this.parent.itemData[0])?je(this.parent,this.parent.path,i):fe(this.parent,this.parent.itemData[0],kn))},e}(),Un=function(){function e(e){this.addressPath="",this.addressBarLink="",this.searchTimer=null,this.searchWrapWidth=null,this.parent=e,this.keyConfigs={enter:"enter"},this.render()}return e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++){var s=n[i],a=e.newProp.searchSettings;switch(s){case"searchSettings":t.isNullOrUndefined(a.allowSearchOnTyping)||this.searchEventBind(a.allowSearchOnTyping),!this.parent.breadcrumbbarModule.searchObj.value||""===this.parent.breadcrumbbarModule.searchObj.value||!t.isNullOrUndefined(a.allowSearchOnTyping)&&t.isNullOrUndefined(a.filterType)&&t.isNullOrUndefined(a.ignoreCase)||I(this.parent,this.parent.breadcrumbbarModule.searchObj.value,!1)}}},e.prototype.render=function(){this.addEventListener()},e.prototype.onPathChange=function(){var e=this.parent.pathNames,i=this.parent.path.split("/"),n=this.parent.createElement("ul",{className:"e-addressbar-ul"}),s=null,a=e.length;if(e.length>0){for(var r="",o=0;o<a;o++){var l=null;s=this.parent.createElement("li",{className:"e-address-list-item"});for(var h=0;h<=o;h++)r=r+i[h]+"/";if(s.setAttribute("data-utext",r),0!==o){var d=t.createElement("span",{className:"e-icons"});s.appendChild(d)}a-o!=1?(l=t.createElement("a",{className:di}),s.setAttribute("tabindex","0")):l=t.createElement("span",{className:di}),r="",l.innerText=e[o],s.appendChild(l),n.appendChild(s)}var p=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul");t.isNullOrUndefined(p)||(t.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),t.remove(p));var c=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");c?this.parent.breadCrumbBarNavigation.appendChild(n):this.parent.breadCrumbBarNavigation.insertBefore(n,c),this.updateBreadCrumbBar(n)}},e.prototype.updateBreadCrumbBar=function(e){for(var i=e.querySelectorAll("li"),n=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),s=window.getComputedStyle(n,null),r=parseFloat(s.getPropertyValue("padding-right")),o=parseFloat(s.getPropertyValue("padding-left")),h=n.offsetWidth-r-o,d=this.parent.createElement("ul",{className:"e-addressbar-ul"}),p=0,c=[],u=0;u<i.length;u++){var f=i[u].clientWidth;c.push(f),p+=f}t.isNullOrUndefined(n)||t.remove(n);var g=this.parent.createElement("div");g.setAttribute("class","e-search-wrap");var m=this.parent.element.id+"_search",b=t.createElement("input",{id:m,attrs:{autocomplete:"off","aria-label":V(this.parent,"Search")}});g.appendChild(b);var y=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap .e-input");if(t.isNullOrUndefined(y)){this.parent.breadCrumbBarNavigation.appendChild(g);var v=t.createElement("span",{className:"e-icons e-fe-search"});t.EventHandler.add(v,"click",this.onShowInput,this),b.parentElement.insertBefore(v,b),this.searchObj=new a.TextBox({value:"",showClearButton:!0,placeholder:V(this.parent,"Search"),focus:this.onFocus.bind(this),blur:this.onBlur.bind(this)}),this.searchObj.appendTo("#"+this.parent.element.id+"_search"),this.searchEventBind(this.parent.searchSettings.allowSearchOnTyping);var O=this.searchObj.element.nextElementSibling;t.EventHandler.add(O,"mousedown",this.searchChangeHandler.bind(this),this),t.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)}var w=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");if(h-=this.searchWrapWidth?this.searchWrapWidth:w.offsetWidth,p>h){for(u=i.length;u--;){var I=h-c[u];if(!(I>40)){for(var D=[],S=0;S<=u;S++){var C=i[S];D.push({text:C.innerText,utext:C.getAttribute("data-utext")})}var j=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),x={className:"e-breadcrumb-submenu"},P=this.parent.createElement("button",x);j.appendChild(P),d.insertBefore(j,d.querySelector("li")),this.subMenuObj=new l.DropDownButton({items:D,cssClass:"e-caret-hide e-submenu",iconCss:"e-icons e-fe-breadcrumb",iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(P);break}d.insertBefore(i[u],d.querySelector("li")),h=I}this.parent.breadCrumbBarNavigation.insertBefore(d,w)}else this.parent.breadCrumbBarNavigation.insertBefore(e,w)},e.prototype.onFocus=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},e.prototype.onKeyUp=function(){this.parent.notify(Cn,{args:this.parent})},e.prototype.onBlur=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.remove("e-focus")},e.prototype.subMenuSelectOperations=function(e){var t={target:e.element};this.addressPathClickHandler(t)},e.prototype.addSubMenuAttributes=function(e){e.element.setAttribute("data-utext",t.getValue("utext",e.item));var i=this.parent.createElement("a",{className:"e-list-text"});e.element.appendChild(i)},e.prototype.searchEventBind=function(e){e?(this.searchObj.input=this.searchChangeHandler.bind(this),this.searchObj.change=null):(this.searchObj.change=this.searchChangeHandler.bind(this),this.searchObj.input=null)},e.prototype.searchChangeHandler=function(e){var i=this;t.isNullOrUndefined(e.value)||(this.parent.isFiltered=!1,this.parent.searchSettings.allowSearchOnTyping?(window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(function(){I(i.parent,e.value,!1)},300)):I(this.parent,e.value,!1))},e.prototype.addressPathClickHandler=function(e){var i=e.target;if("LI"===i.nodeName||"A"===i.nodeName){var n="LI"===i.nodeName?i.children[0]:i;if(!t.isNullOrUndefined(n)){this.parent.isFiltered=!1;var s=this.updatePath(n);this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)],this.triggerFileOpen(this.parent.itemData[0]),De(this.parent,Zi,s);var a=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify("update-tree-selection",{module:"treeview",selectedNode:a})}}},e.prototype.triggerFileOpen=function(e){var t={cancel:!1,fileDetails:e,module:"BreadCrumbBar"};delete t.cancel,this.parent.trigger("fileOpen",t)},e.prototype.onShowInput=function(){if(this.parent.isMobile)if(this.parent.element.classList.contains(oi))t.removeClass([this.parent.element],oi),this.searchWrapWidth=null;else{var e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");this.searchWrapWidth=e.offsetWidth,t.addClass([this.parent.element],oi),this.searchObj.element.focus()}},e.prototype.updatePath=function(e){var i=t.closest(e,"li").getAttribute("data-utext");this.addressBarLink=i;var n=this.addressBarLink.split("/"),s=this.parent.pathId,a=this.parent.pathNames;this.parent.pathId=[],this.parent.pathNames=[];for(var r="",o=0,l=n.length-1;o<l;o++)this.parent.pathId.push(s[o]),this.parent.pathNames.push(a[o]),r+=n[o]+"/";return this.parent.setProperties({path:r},!0),r},e.prototype.onUpdatePath=function(){this.onPathChange(),this.removeSearchValue()},e.prototype.onCreateEnd=function(){this.onPathChange()},e.prototype.onRenameEnd=function(){this.onPathChange()},e.prototype.onDeleteEnd=function(){this.onUpdatePath()},e.prototype.removeSearchValue=function(){this.parent.isFiltered=!1,!this.searchObj||""===this.searchObj.value&&""===this.searchObj.element.value||(this.searchObj.value="",this.searchObj.element.value="",this.searchObj.dataBind())},e.prototype.onResize=function(){this.onPathChange()},e.prototype.onPasteEnd=function(){this.onPathChange()},e.prototype.addEventListener=function(){this.keyboardModule=new t.KeyboardEvents(this.parent.breadCrumbBarNavigation,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.parent.on(qi,this.onPropertyChanged,this),t.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(en,this.destroy,this),this.parent.on(Zi,this.onUpdatePath,this),this.parent.on(Ki,this.onUpdatePath,this),this.parent.on(Xi,this.onUpdatePath,this),this.parent.on(ln,this.onUpdatePath,this),this.parent.on(Gi,this.onCreateEnd,this),this.parent.on(bn,this.onRenameEnd,this),this.parent.on(Ji,this.onDeleteEnd,this),this.parent.on("splitter-resize",this.onResize,this),this.parent.on(In,this.onPasteEnd,this),this.parent.on($i,this.onResize,this),this.parent.on(jn,this.onSearchTextChange,this),this.parent.on(xn,this.onDropInit,this),this.parent.on("layout-refresh",this.onResize,this),this.parent.on(Nn,this.onPathChange,this)},e.prototype.keyActionHandler=function(e){switch(e.action){case"enter":this.addressPathClickHandler(e)}},e.prototype.removeEventListener=function(){this.keyboardModule.destroy(),this.parent.off(Zi,this.onUpdatePath),this.parent.off(Ki,this.onUpdatePath),this.parent.off(Xi,this.onUpdatePath),this.parent.off(ln,this.onUpdatePath),this.parent.off(In,this.onPasteEnd),this.parent.off(Gi,this.onCreateEnd),this.parent.off(bn,this.onRenameEnd),this.parent.off(Ji,this.onDeleteEnd),this.parent.off("splitter-resize",this.onResize),this.parent.off($i,this.onResize),this.parent.off(jn,this.onSearchTextChange),this.parent.off(xn,this.onDropInit),this.parent.off("layout-refresh",this.onResize),this.parent.off(Nn,this.onPathChange)},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=e.target.closest("li");this.parent.dropPath=this.updatePath(i.children[0]),this.parent.dropData=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),this.triggerFileOpen(this.parent.dropData);var n=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify("update-tree-selection",{module:"treeview",selectedNode:n})}},e.prototype.getModuleName=function(){return"breadcrumbbar"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),t.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),t.isNullOrUndefined(this.searchObj)||this.searchObj.destroy())},e.prototype.onSearchTextChange=function(e){this.searchObj.element.placeholder=V(this.parent,"Search")+" "+e.cwd.name},e}(),_n=function(){function e(e){this.currentItems=[],this.currentElement=null,this.disabledItems=[],this.parent=e,this.render()}return e.prototype.render=function(){this.keyConfigs={downarrow:"downarrow",uparrow:"uparrown"},this.contextMenu=new h.ContextMenu({enableRtl:this.parent.enableRtl,locale:this.parent.locale,target:"#"+this.parent.element.id,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.onBeforeItemRender.bind(this),select:this.onSelect.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this),cssClass:B(this.parent,ai)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+"_contextmenu"),this.addEventListener()},e.prototype.onBeforeItemRender=function(e){if(e.item.id===this.getMenuId("largeiconsview")){i=t.createElement("span");(n=e.element).insertBefore(i,"LargeIcons"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",Ui+" "+Li)}if(e.item.id===this.getMenuId("detailsview")){var i=t.createElement("span"),n=e.element;n.insertBefore(i,"Details"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",Fi+" "+Li)}},e.prototype.onBeforeClose=function(){this.menuTarget=null},e.prototype.onBeforeOpen=function(e){var i=this;this.disabledItems=[];var n,s,a=!1,r=!1,o=e.event.target;this.menuTarget=o,this.currentElement=e.element,o.classList.contains("e-spinner-pane")&&(o=this.parent.navigationpaneModule.activeNode.getElementsByClassName("e-fullrow")[0],this.menuTarget=o),o.classList.contains("e-fullrow")&&(this.parent.selectedItems.length=0),this.targetElement="Details"===this.parent.view?t.closest(o,"tr"):o;var l=this.getTargetView(o);if(this.updateActiveModule(),o.classList.contains(ki)||t.closest(o,"th")||t.closest(o,"#"+this.parent.element.id+ni)||t.closest(o,"#"+this.parent.element.id+"_toolbar"))e.cancel=!0;else if("LargeIcons"!==this.parent.view&&this.targetElement&&this.targetElement.classList.contains("e-emptyrow"))this.setLayoutItem(o);else if(t.closest(o,"."+Oi))this.setLayoutItem(o);else if(!o.classList.contains("e-menu-item")&&!o.classList.contains(Li)&&!o.classList.contains("e-caret")){if("LargeIcons"!==this.parent.view||t.isNullOrUndefined(t.closest(o,"li"))||t.closest(o,"#"+this.parent.element.id+"_tree"))t.isNullOrUndefined(t.closest(o,"tr"))?t.closest(o,"#"+this.parent.element.id+"_tree")&&(n=t.closest(o,"li").getAttribute("data-uid"),r=!0):(n=this.targetElement.getAttribute("data-uid"),s=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(n).data,t.isNullOrUndefined(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("aria-rowindex"),10)]),a=!0);else{var h={ctrlKey:!0,shiftKey:!0};t.closest(o,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(o,h),s=this.parent.visitedData,a=!0}a?!0===t.getValue("isFile",s)?this.setFileItem():this.setFolderItem(!1):r?(this.setFolderItem(!0),n===this.parent.pathId[0]&&this.disabledItems.push("Delete","Rename","Cut","Copy")):"TreeView"===l||"GridView"===l||"LargeIcon"===l?this.setLayoutItem(o):e.cancel=!0}var d=t.select("#"+this.getMenuId("Paste"),this.contextMenu.element);if(e.cancel||this.parent.enablePaste||!d||d.classList.contains("e-disabled")||this.disabledItems.push("Paste"),e.cancel)return void(this.menuTarget=this.currentElement=null);this.contextMenu.dataBind();var p=!1;(o.classList.contains("e-menu-item")||o.classList.contains(Li)||o.classList.contains("e-caret"))&&(p=!0),this.menuItemData=p?this.menuItemData:this.getMenuItemData();var c={fileDetails:[this.menuItemData],element:e.element,target:o,items:p?e.items:this.contextMenu.items,menuModule:this.contextMenu,cancel:!1,menuType:this.menuType,isSubMenu:p};t.isBlazor()&&(this.enableItems(this.disabledItems,!1,!0),delete c.menuModule),this.currentItems=c.items,this.parent.trigger("menuOpen",c,function(t){p||(i.contextMenu.dataBind(),i.contextMenu.items=t.items,i.contextMenu.dataBind()),i.enableItems(i.disabledItems,!1,!0),e.cancel=t.cancel,t.cancel&&(i.menuTarget=i.currentElement=null)})},e.prototype.updateActiveModule=function(){this.parent.activeModule=t.closest(this.menuTarget,"#"+this.parent.element.id+"_tree")?"navigationpane":t.closest(this.menuTarget,"#"+this.parent.element.id+Xt)?"detailsview":t.closest(this.menuTarget,"#"+this.parent.element.id+$t)?"largeiconsview":this.parent.activeModule},e.prototype.getTargetView=function(e){return e.classList.contains(ki)?"TreeView":e.classList.contains(Ti)?"GridView":e.classList.contains("e-list-parent")?"LargeIcon":e.classList.contains(li)?"LargeIcon":""},e.prototype.getItemIndex=function(e){for(var t=this.getMenuId(e),i=0;i<this.currentItems.length;i++)if(this.currentItems[i].id===t||this.currentItems[i].id===e)return i;return-1},e.prototype.disableItem=function(e){0!==e.length&&(this.disabledItems=this.disabledItems.concat(e))},e.prototype.enableItems=function(e,t,i){for(var n=0;n<e.length;n++)1===this.checkValidItem(e[n])?this.contextMenu.enableItems([this.getMenuId(e[n])],t,i):2===this.checkValidItem(e[n])&&this.contextMenu.enableItems([e[n]],t,i)},e.prototype.setFolderItem=function(e){this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map(function(e){return e.trim()})),this.contextMenu.dataBind(),e?this.disabledItems.push("Open"):1!==this.parent.selectedItems.length&&this.disabledItems.push("Rename","Paste")},e.prototype.setFileItem=function(){this.menuType="file",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.file.map(function(e){return e.trim()})),this.contextMenu.dataBind(),1!==this.parent.selectedItems.length&&this.disabledItems.push("Rename")},e.prototype.setLayoutItem=function(e){this.menuType="layout",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.layout.map(function(e){return e.trim()})),this.contextMenu.dataBind(),(!this.parent.allowMultiSelection||"LargeIcons"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+$t).getElementsByClassName(Oi).length||"Details"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+Xt).getElementsByClassName(Oi).length)&&this.disabledItems.push("SelectAll"),0===this.parent.selectedNodes.length&&this.disabledItems.push("Paste"),this.contextMenu.dataBind()},e.prototype.checkValidItem=function(e){return t.isNullOrUndefined(t.select("#"+this.getMenuId(e),this.currentElement))?t.isNullOrUndefined(t.select("#"+e,this.currentElement))?-1:2:1},e.prototype.getMenuItemData=function(){if("layout"===this.menuType)return x(this.parent);var e={target:this.menuTarget};return this.parent.notify(fn,e),this.parent.itemData[0]},e.prototype.onSelect=function(e){var i=this;if(!t.isNullOrUndefined(e.item)&&e.item.id){var n,s=e.item.id.substr((this.parent.element.id+"_cm_").length);"refresh"===s||"newfolder"===s||"upload"===s?(n=[x(this.parent)],this.parent.itemData=n):(this.parent.notify("selected-data",{}),n=this.parent.itemData);var a={cancel:!1,element:e.element,fileDetails:n,item:e.item};this.parent.trigger("menuClick",a,function(t){var a;if(!t.cancel)switch(s){case"cut":N(i.parent);break;case"copy":P(i.parent);break;case"paste":"folder"===i.menuType&&("largeiconsview"===i.parent.activeModule||"detailsview"===i.parent.activeModule)?i.parent.folderPath=M(i.parent,i.menuItemData,i.parent.path):i.parent.folderPath="",K(i.parent);break;case"delete":for(var r=0;r<n.length;r++)if(!be(n[r]))return void fe(i.parent,n[r],kn);ze(i.parent,"Delete");break;case"download":for(var o=0;o<n.length;o++)if(!Oe(n[o]))return void fe(i.parent,n[o],An);"navigationpane"===i.parent.activeModule?i.parent.notify("download-init",{}):i.parent.selectedItems.length>0&&He(i.parent,i.parent.path,i.parent.selectedItems);break;case"rename":be(n[0])?(i.parent.notify(gn,{}),ze(i.parent,"Rename")):fe(i.parent,n[0],kn);break;case"selectall":i.parent.notify("select-all-init",{});break;case"refresh":C(i.parent);break;case"open":i.parent.visitedItem&&i.parent.notify(on,{target:i.parent.visitedItem});break;case"details":i.parent.notify(un,{}),a=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(a=[]),Ne(i.parent,a,i.parent.path,"details");break;case"newfolder":we(i.parent);break;case"upload":Ie(i.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":H(i.parent,e);break;case"largeiconsview":D(i.parent,"LargeIcons");break;case"detailsview":D(i.parent,"Details")}})}},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"cssClass":this.contextMenu.cssClass=B(this.parent,ai)}},e.prototype.addEventListener=function(){this.parent.on(en,this.destroy,this),this.parent.on(qi,this.onPropertyChanged,this),this.keyboardModule=new t.KeyboardEvents(this.contextMenu.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.removeEventListener=function(){this.parent.off(en,this.destroy),this.parent.off(qi,this.onPropertyChanged),this.keyboardModule.destroy()},e.prototype.keyActionHandler=function(e){switch(e.action){case"uparrow":case"downarrow":e.preventDefault()}},e.prototype.getModuleName=function(){return"contextmenu"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.contextMenu.destroy())},e.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,s=this.getMenuId(e[i]),a=V(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:s,text:a,iconCss:"e-icons e-fe-open"};break;case"Upload":n={id:s,text:a,iconCss:"e-icons e-fe-upload"};break;case"Cut":n={id:s,text:a,iconCss:Ai};break;case"Copy":n={id:s,text:a,iconCss:"e-icons e-fe-copy"};break;case"Paste":n={id:s,text:a,iconCss:"e-icons e-fe-paste"};break;case"Delete":n={id:s,text:a,iconCss:"e-icons e-fe-delete"};break;case"Rename":n={id:s,text:a,iconCss:"e-icons e-fe-rename"};break;case"NewFolder":n={id:s,text:a,iconCss:"e-icons e-fe-newfolder"};break;case"Details":n={id:s,text:a,iconCss:"e-icons e-fe-details"};break;case"SortBy":n={id:s,text:a,iconCss:"e-icons e-fe-sort",items:[{id:this.getMenuId("Name"),text:V(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?ci:null},{id:this.getMenuId("Size"),text:V(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?ci:null},{id:this.getMenuId("Date"),text:V(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?ci:null},{separator:!0},{id:this.getMenuId("Ascending"),text:V(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?pi:null},{id:this.getMenuId("Descending"),text:V(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?pi:null},{id:this.getMenuId("None"),text:V(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?pi:null}]};break;case"View":n={id:s,text:a,iconCss:"Details"===this.parent.view?Fi:Ui,items:[{id:this.getMenuId("largeiconsview"),text:V(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:pi},{id:this.getMenuId("detailsview"),text:V(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?pi:null}]};break;case"Refresh":n={id:s,text:a,iconCss:"e-icons e-fe-refresh"};break;case"SelectAll":n={id:s,text:a,iconCss:"e-icons e-fe-select"};break;case"Download":n={id:s,text:a,iconCss:"e-icons e-fe-download"};break;default:n={id:s,text:a}}t.push(n)}return t},e.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.toLowerCase()},e}(),Vn={NewFolder:"New folder",Upload:"Upload",Delete:"Delete",Rename:"Rename",Download:"Download",Cut:"Cut",Copy:"Copy",Paste:"Paste",SortBy:"Sort by",Refresh:"Refresh","Item-Selection":"item selected","Items-Selection":"items selected",View:"View",Details:"Details",SelectAll:"Select all",Open:"Open","Tooltip-NewFolder":"New folder","Tooltip-Upload":"Upload","Tooltip-Delete":"Delete","Tooltip-Rename":"Rename","Tooltip-Download":"Download","Tooltip-Cut":"Cut","Tooltip-Copy":"Copy","Tooltip-Paste":"Paste","Tooltip-SortBy":"Sort by","Tooltip-Refresh":"Refresh","Tooltip-Selection":"Clear selection","Tooltip-View":"View","Tooltip-Details":"Details","Tooltip-SelectAll":"Select all",Name:"Name",Size:"Size",DateModified:"Modified",DateCreated:"Date created",Path:"Path",Modified:"Modified",Created:"Created",Location:"Location",Type:"Type",Permission:"Permission",Ascending:"Ascending",Descending:"Descending",None:"None","View-LargeIcons":"Large icons","View-Details":"Details",Search:"Search","Button-Ok":"OK","Button-Cancel":"Cancel","Button-Yes":"Yes","Button-No":"No","Button-Create":"Create","Button-Save":"Save","Header-NewFolder":"Folder","Content-NewFolder":"Enter your folder name","Header-Rename":"Rename","Content-Rename":"Enter your new name","Header-Rename-Confirmation":"Rename Confirmation","Content-Rename-Confirmation":"If you change a file name extension, the file might become unstable. Are you sure you want to change it?","Header-Delete":"Delete File","Content-Delete":"Are you sure you want to delete this file?","Header-Folder-Delete":"Delete Folder","Content-Folder-Delete":"Are you sure you want to delete this folder?","Header-Multiple-Delete":"Delete Multiple Items","Content-Multiple-Delete":"Are you sure you want to delete these {0} items?","Header-Duplicate":"File/Folder exists","Content-Duplicate":"{0} already exists. Do you want to rename and paste?","Header-Upload":"Upload Files",Error:"Error","Validation-Empty":"The file or folder name cannot be empty.","Validation-Invalid":'The file or folder name {0} contains invalid characters. Please use a different name. Valid file or folder names cannot end with a dot or space, and cannot contain any of the following characters: \\/:*?"<>|',"Validation-NewFolder-Exists":"A file or folder with the name {0} already exists.","Validation-Rename-Exists":"Cannot rename {0} to {1}: destination already exists.","Folder-Empty":"This folder is empty","File-Upload":"Drag files here to upload","Search-Empty":"No results found","Search-Key":"Try with different keywords","Filter-Empty":"No results found","Filter-Key":"Try with different filter","Sub-Folder-Error":"The destination folder is the subfolder of the source folder.","Same-Folder-Error":"The destination folder is the same as the source folder.","Access-Denied":"Access Denied","Access-Details":'You don"t have permission to access this folder.',"Header-Retry":"File Already Exists","Content-Retry":"A file with this name already exists in this folder. What would you like to do?","Button-Keep-Both":"Keep both","Button-Replace":"Replace","Button-Skip":"Skip","ApplyAll-Label":"Do this for all current items",KB:"KB","Access-Message":"{0} is not accessible. You need permission to perform the {1} action.","Network-Error":"NetworkError: Failed to send on XMLHTTPRequest: Failed to load","Server-Error":"ServerError: Invalid response from"},Bn=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hn=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},zn=function(e){function s(t,i){var n=e.call(this,t,i)||this;return n.filterData=null,n.selectedNodes=[],n.duplicateItems=[],n.duplicateRecords=[],n.previousPath=[],n.nextPath=[],n.isLayoutChange=!1,n.layoutSelectedItems=[],n.renamedId=null,n.uploadItem=[],n.deleteRecords=[],n.isFile=!1,n.sortBy="name",n.isCut=!1,n.isSearchCut=!1,n.isSearchDrag=!1,n.isPasteError=!1,n.folderPath="",n.isSameAction=!1,n.isFiltered=!1,n.enablePaste=!1,n.persistData=!1,n.retryArgs=[],n.isOpened=!1,n.isRetryOpened=!1,n.isPathDrag=!1,n.searchedItems=[],n.retryFiles=[],n.isApplySame=!1,n.dragData=[],n.dragNodes=[],n.dragPath="",n.dropPath="",n.isDragDrop=!1,n.treeExpandTimer=null,n.dragCursorPosition={left:44,top:18},n.isDropEnd=!1,n.dragCount=0,n.droppedObjects=[],n.uploadingCount=0,n.uploadedCount=0,r.Inject(Un,Fn,_n),n}Bn(s,e),r=s,s.prototype.getModuleName=function(){return"filemanager"},s.prototype.preRender=function(){this.ensurePath(),this.feParent=[],this.feFiles=[],t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.isDevice=t.Browser.isDevice,this.isMobile=this.checkMobile(),this.isMobile&&this.setProperties({navigationPaneSettings:{visible:!1}},!0);var e=t.closest(this.element,".e-bigger");this.isBigger=!!e,this.activeModule="LargeIcons"===this.view?"largeiconsview":"detailsview",n.createSpinner({target:this.element},t.createElement),this.addWrapper(),this.keyConfigs={altN:"alt+n",f5:"f5",ctrlShift1:"ctrl+shift+1",ctrlShift2:"ctrl+shift+2",ctrlU:"ctrl+u"},this.localeObj=new t.L10n(this.getModuleName(),Vn,this.locale)},s.prototype.getPersistData=function(){var e=["view","path","selectedItems"];return this.addOnPersist(e)},s.prototype.requiredModules=function(){var e=[];return e.push({member:"breadcrumbbar",args:[this]}),e.push({member:"largeiconsview",args:[this]}),this.toolbarSettings.visible&&e.push({member:"toolbar",args:[this]}),this.navigationPaneSettings.visible&&e.push({member:"navigationpane",args:[this]}),this.view&&e.push({member:"detailsview",args:[this]}),this.contextMenuSettings.visible&&!this.isDevice&&e.push({member:"contextmenu",args:[this]}),e},s.prototype.render=function(){this.initialize();var e=t.isNullOrUndefined(this.selectedItems)?[]:this.allowMultiSelection?this.selectedItems:this.selectedItems.slice(this.selectedItems.length-1);this.setProperties({selectedItems:e},!0),this.fileView=this.view,this.setRtl(this.enableRtl),this.addEventListeners(),De(this,this.path!==this.originalPath?Wi:Ki,this.path),this.adjustHeight(),t.isNullOrUndefined(this.navigationpaneModule)&&(this.splitterObj.collapse(this.enableRtl?1:0),t.select(".e-split-bar",this.element).classList.add(Bi)),this.wireEvents(),this.renderComplete()},s.prototype.ensurePath=function(){var e=this.path;t.isNullOrUndefined(e)&&(e="/"),e.lastIndexOf("/")!==e.length-1&&(e+="/"),this.originalPath=e;var i=e.split("/");this.setProperties({path:i[0]+"/"},!0),this.pathNames=[],this.pathId=["fe_tree"],this.itemData=[]},s.prototype.initialize=function(){this.isMobile&&t.addClass([this.element],"e-fe-mobile"),this.allowMultiSelection&&t.addClass([this.element],"e-fe-cb-select"),this.addCssClass(null,this.cssClass),this.renderFileUpload()},s.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+"_toolbar"});this.element.appendChild(e);var t=this.createElement("div",{id:this.element.id+Jt,className:"e-layout"});this.element.appendChild(t);var n=this.createElement("div",{id:this.element.id+"_navigation",className:"e-navigation"}),s=this.createElement("div",{id:this.element.id+"_tree"});n.appendChild(s);var a=this.createElement("div",{id:this.element.id+ii,className:"e-layout-content"});this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+ni,className:"e-address"}),a.appendChild(this.breadCrumbBarNavigation);var r=this.createElement("div",{id:this.element.id+Xt});a.appendChild(r);var o=this.createElement("div",{id:this.element.id+$t,className:li,attrs:{role:"group"}});a.appendChild(o);var l=this.createElement("span",{className:"e-fe-overlay"});a.appendChild(l);var h;this.enableRtl?(t.appendChild(a),t.appendChild(n),h=[{size:"75%",min:"270px"},{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()}]):(t.appendChild(n),t.appendChild(a),h=[{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()},{size:"75%",min:"270px"}]),this.splitterObj=new i.Splitter({paneSettings:h,width:"100%",enableRtl:!1,enableHtmlSanitizer:this.enableHtmlSanitizer,resizing:this.splitterResize.bind(this)}),this.splitterObj.isStringTemplate=!0,this.splitterObj.appendTo(t);var d=this.createElement("div",{id:this.element.id+Zt});this.element.appendChild(d);var p=this.createElement("ul",{id:this.element.id+"_contextmenu"});this.element.appendChild(p);var c=this.createElement("div",{id:this.element.id+ei});this.element.appendChild(c);var u=this.createElement("div",{id:this.element.id+ti});this.element.appendChild(u);var f=this.createElement("div",{id:this.element.id+"_upload_dialog"});this.element.appendChild(f)},s.prototype.adjustHeight=function(){var e=t.select("#"+this.element.id+"_toolbar",this.element),i=e?e.offsetHeight:0;this.splitterObj&&(this.splitterObj.height=(this.element.clientHeight-i).toString(),this.splitterObj.dataBind())},s.prototype.splitterResize=function(){this.notify("splitter-resize",{})},s.prototype.splitterAdjust=function(){var e=t.select(".e-split-bar",this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(Bi)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(Bi))},s.prototype.addCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},s.prototype.showSpinner=function(){n.showSpinner(this.element)},s.prototype.hideSpinner=function(){n.hideSpinner(this.element)},s.prototype.onContextMenu=function(e){e.preventDefault()},s.prototype.checkMobile=function(){return/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(t.Browser.userAgent.toLowerCase())&&/mobile/i.test(t.Browser.userAgent.toLowerCase())},s.prototype.renderFileUpload=function(){var e=this.element.id+si,t=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(t),this.uploadDialogObj=new n.Dialog({header:V(this,"Header-Upload"),content:t,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!1,isModal:!0,width:"350px",target:this.popupTarget?this.popupTarget:"#"+this.element.id,cssClass:B(this,this.isMobile?ri:ai),locale:this.locale,allowDragging:!0,position:{X:"center",Y:"center"},enableRtl:this.enableRtl,enableHtmlSanitizer:this.enableHtmlSanitizer,open:this.onOpen.bind(this),close:this.onClose.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this)}),this.uploadDialogObj.appendTo("#"+this.element.id+"_upload_dialog"),this.renderUploadBox()},s.prototype.renderUploadBox=function(){var e=this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url;this.uploadObj=new a.Uploader({dropArea:t.select("#"+this.element.id+ii,this.element),asyncSettings:{saveUrl:e,removeUrl:e},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),removing:this.onRemoving.bind(this),clearing:this.onClearing.bind(this),selected:this.onSelected.bind(this),success:this.onUploadSuccess.bind(this),failure:this.onUploadFailure.bind(this),autoUpload:this.uploadSettings.autoUpload,minFileSize:this.uploadSettings.minFileSize,maxFileSize:this.uploadSettings.maxFileSize,allowedExtensions:this.uploadSettings.allowedExtensions,fileListRendering:this.onFileListRender.bind(this)}),this.uploadObj.appendTo("#"+this.element.id+si)},s.prototype.onFileListRender=function(e){this.trigger("uploadListCreate",e)},s.prototype.updateUploader=function(){this.uploadObj.autoUpload=this.uploadSettings.autoUpload,this.uploadObj.minFileSize=this.uploadSettings.minFileSize,this.uploadObj.maxFileSize=this.uploadSettings.maxFileSize,this.uploadObj.allowedExtensions=this.uploadSettings.allowedExtensions,this.uploadObj.dataBind()},s.prototype.onBeforeOpen=function(e){var i={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};t.isBlazor()&&delete i.popupModule,this.trigger("beforePopupOpen",i,function(t){e.cancel=t.cancel})},s.prototype.onBeforeClose=function(e){var i={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};t.isBlazor()&&delete i.popupModule,this.trigger("beforePopupClose",i,function(t){e.cancel=t.cancel})},s.prototype.onOpen=function(){this.isOpened=!0,this.uploadDialogObj.element.focus();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};t.isBlazor()&&delete e.popupModule,this.trigger("popupOpen",e)},s.prototype.onClose=function(){this.isOpened=!1,this.uploadObj.clearAll();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};t.isBlazor()&&delete e.popupModule,this.trigger("popupClose",e)},s.prototype.onUploading=function(e){var i="save";if(0!==this.retryArgs.length)for(var n=0;n<this.retryArgs.length;n++)e.fileData.name===this.retryArgs[n].file.name&&(i=this.retryArgs[n].action,this.retryArgs.splice(n,1),n=this.retryArgs.length);var s=JSON.stringify(t.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:i},{data:s}];var a={url:this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url,type:"POST",mode:!0,dataType:null,contentType:null,data:JSON.stringify(e.customFormData),onSuccess:null,onFailure:null,beforeSend:null};this.uploadEventArgs={action:"Upload",ajaxSettings:a,cancel:!1},this.trigger("beforeSend",this.uploadEventArgs,function(i){e.customFormData=JSON.parse(t.getValue("data",i.ajaxSettings)),e.cancel=i.cancel;var n={cancel:!1,httpRequest:e.currentRequest};"function"==typeof t.getValue("beforeSend",i.ajaxSettings)&&(t.getValue("beforeSend",i.ajaxSettings)(n),t.getValue("cancel",n)&&(e.cancel=t.getValue("cancel",n)))})},s.prototype.onRemoving=function(){this.onFileUploadSuccess({count:1}),1===this.uploadObj.getFilesData().length&&this.uploadDialogObj.hide()},s.prototype.onClearing=function(){this.isOpened&&this.uploadDialogObj.hide()},s.prototype.onSelected=function(e){if(0!==e.filesData.length){this.uploadingCount=e.filesData.length,this.uploadedCount=0;var t=x(this);if(!ve(t))return e.cancel=!0,void fe(this,t,Tn);this.uploadDialogObj.show()}},s.prototype.onFileUploadSuccess=function(e){this.uploadedCount=this.uploadedCount+e.count,this.uploadSettings.autoClose&&this.uploadingCount===this.uploadedCount&&this.uploadDialogObj.hide()},s.prototype.onUploadSuccess=function(e){var i={action:"Upload",result:e};this.trigger("success",i),this.itemData=[t.getValue(this.pathId[this.pathId.length-1],this.feParent)],De(this,Zi,this.path),this.onFileUploadSuccess({count:1}),"function"==typeof t.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)&&t.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)()},s.prototype.onUploadFailure=function(e){var i=t.getValue("response",e),n=t.getValue("statusText",i);""!==n&&t.setValue("statusText",n,e);var s={action:"Upload",error:e};this.trigger("failure",s),400===t.getValue("statusCode",i)&&(this.retryFiles.push(t.getValue("file",e)),this.isRetryOpened||qe(this,"UploadRetry")),"function"==typeof t.getValue("onFailure",this.uploadEventArgs.ajaxSettings)&&t.getValue("onFailure",this.uploadEventArgs.ajaxSettings)()},s.prototype.onInitialEnd=function(){q(this,this.path)},s.prototype.addEventListeners=function(){this.on(tn,this.showSpinner,this),this.on(sn,this.hideSpinner,this),this.on(Wi,this.onInitialEnd,this),this.on(un,this.onDetailsInit,this),this.on(nn,this.onFileUploadSuccess,this),t.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},s.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(tn,this.showSpinner),this.off(sn,this.hideSpinner),this.off(Wi,this.onInitialEnd),this.off(un,this.onDetailsInit),this.off(nn,this.onFileUploadSuccess),t.EventHandler.remove(this.element,"contextmenu",this.onContextMenu))},s.prototype.onDetailsInit=function(){t.isNullOrUndefined(this.activeModule)&&(this.itemData=[t.getValue(this.pathId[this.pathId.length-1],this.feParent)])},s.prototype.resizeHandler=function(){this.adjustHeight(),this.notify($i,{})},s.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[x(this)],ye(this.itemData[0])?ze(this,"NewFolder"):fe(this,this.itemData[0],Ln);break;case"f5":e.preventDefault(),C(this);break;case"ctrlShift1":e.preventDefault(),this.fileView="Details",this.setProperties({view:"Details"},!0),n.showSpinner(this.element),D(this,"Details");break;case"ctrlShift2":e.preventDefault(),this.fileView="LargeIcons",this.setProperties({view:"LargeIcons"},!0),n.showSpinner(this.element),D(this,"LargeIcons");break;case"ctrlU":e.preventDefault(),t.select("#"+this.element.id+si,this.element).click()}},s.prototype.wireEvents=function(){t.EventHandler.add(window,"resize",this.resizeHandler,this),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},s.prototype.unWireEvents=function(){t.EventHandler.remove(window,"resize",this.resizeHandler),this.keyboardModule.destroy()},s.prototype.setPath=function(){this.setProperties({selectedItems:[]},!0),this.ensurePath(),this.notify(dn,{selectedNode:this.pathId[0]}),De(this,this.path!==this.originalPath?Wi:Ki,this.path)},s.prototype.onPropertyChanged=function(e,i){for(var n,s=0,a=Object.keys(e);s<a.length;s++)switch(a[s]){case"ajaxSettings":this.ajaxSettingSetModel(e);break;case"allowDragAndDrop":this.allowDragAndDrop=e.allowDragAndDrop,this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"allowMultiSelection":this.allowMultiSelection?t.addClass([this.element],"e-fe-cb-select"):(this.selectedItems.length>1&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),t.removeClass([this.element],"e-fe-cb-select")),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"cssClass":this.addCssClass(i.cssClass,e.cssClass),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"detailsViewSettings":this.notify(qi,{module:"detailsview",newProp:e,oldProp:i});break;case"enableRtl":this.enableRtl=e.enableRtl,this.refresh();break;case"rootAliasName":this.rootAliasName=e.rootAliasName,this.refresh();break;case"height":n=t.isNullOrUndefined(e.height)?e.height:t.formatUnit(e.height),t.setStyleAttribute(this.element,{height:n}),this.adjustHeight(),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"locale":t.isNullOrUndefined(e.enableRtl)||this.setProperties({enableRtl:e.enableRtl},!0),this.localeSetModelOption(e);break;case"navigationPaneSettings":this.splitterAdjust(),this.notify(qi,{module:"navigationpane",newProp:e,oldProp:i});break;case"path":this.setPath();break;case"searchSettings":t.isNullOrUndefined(e.searchSettings.allowSearchOnTyping)||this.setProperties({searchSettings:{allowSearchOnTyping:e.searchSettings.allowSearchOnTyping}},!0),t.isNullOrUndefined(e.searchSettings.ignoreCase)&&this.setProperties({searchSettings:{ignoreCase:e.searchSettings.ignoreCase}},!0),t.isNullOrUndefined(e.searchSettings.filterType)&&this.setProperties({searchSettings:{filterType:e.searchSettings.filterType}},!0),this.notify(qi,{module:"breadcrumbbar",newProp:e,oldProp:i});break;case"selectedItems":"Details"===this.view?this.notify(qi,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===this.view&&this.notify(qi,{module:"largeiconsview",newProp:e,oldProp:i});break;case"showFileExtension":case"showHiddenItems":this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"showThumbnail":this.notify(qi,{module:"largeiconsview",newProp:e,oldProp:i});break;case"toolbarSettings":this.adjustHeight(),this.notify(qi,{module:"toolbar",newProp:e,oldProp:i});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify(qi,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===e.view&&this.notify(qi,{module:"largeiconsview",newProp:e,oldProp:i});break;case"width":t.setStyleAttribute(this.element,{width:t.isNullOrUndefined(e.width)?e.width:t.formatUnit(e.width)}),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"sortOrder":C(this),this.notify(cn,{});break;case"popupTarget":this.uploadDialogObj&&(this.uploadDialogObj.target=e.popupTarget),this.dialogObj&&(this.dialogObj.target=e.popupTarget),this.extDialogObj&&(this.extDialogObj.target=e.popupTarget),this.viewerObj&&(this.viewerObj.target=e.popupTarget)}},s.prototype.ajaxSettingSetModel=function(i){t.isNullOrUndefined(i.ajaxSettings.url)||this.setProperties({ajaxSettings:{url:i.ajaxSettings.url}},!0),t.isNullOrUndefined(i.ajaxSettings.uploadUrl)||this.setProperties({ajaxSettings:{uploadUrl:i.ajaxSettings.uploadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.downloadUrl)||this.setProperties({ajaxSettings:{downloadUrl:i.ajaxSettings.downloadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.getImageUrl)||this.setProperties({ajaxSettings:{getImageUrl:i.ajaxSettings.getImageUrl}},!0),this.setProperties({path:"/"},!0),this.setProperties({selectedItems:[]},!0),e.prototype.refresh.call(this)},s.prototype.localeSetModelOption=function(t){this.uploadObj.locale=t.locale,e.prototype.refresh.call(this)},s.prototype.destroy=function(){this.isDestroyed||(this.refreshing||this.notify(en,{}),this.uploadObj.destroy(),this.uploadObj=null,this.uploadDialogObj.destroy(),this.uploadDialogObj=null,this.splitterObj.destroy(),this.splitterObj=null,this.dialogObj&&(this.dialogObj.destroy(),this.dialogObj=null),this.viewerObj&&(this.viewerObj.destroy(),this.viewerObj=null),this.extDialogObj&&(this.extDialogObj.destroy(),this.extDialogObj=null),this.element.removeAttribute("style"),this.element.removeAttribute("tabindex"),this.removeEventListeners(),this.unWireEvents(),this.addCssClass(this.cssClass,null),t.removeClass([this.element],[Vi,"e-fe-mobile","e-fe-cb-select"]),this.element.innerHTML="",e.prototype.destroy.call(this))},s.prototype.createFolder=function(e){this.notify(Rn,{action:"createFolder"});var t=[x(this)];this.itemData=t,e?/[\/\\|*?"<>:]/.test(e)?ze(this,"Error",{files:null,error:{code:"402",message:V(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}}):ye(t[0])?Se(this,e):fe(this,t[0],Ln):we(this)},s.prototype.deleteFiles=function(e){this.notify(Rn,{action:"deleteFiles",ids:e})},s.prototype.disableToolbarItems=function(e){t.isNullOrUndefined(e)||this.toolbarModule.enableItems(e,!1)},s.prototype.downloadFiles=function(e){this.notify(Rn,{action:"downloadFiles",ids:e})},s.prototype.enableToolbarItems=function(e){t.isNullOrUndefined(e)||this.toolbarModule.enableItems(e,!0)},s.prototype.disableMenuItems=function(e){t.isNullOrUndefined(e)||t.isNullOrUndefined(this.contextmenuModule.contextMenu)||this.contextmenuModule.disableItem(e)},s.prototype.getMenuItemIndex=function(e){return this.contextmenuModule?this.contextmenuModule.getItemIndex(e):-1},s.prototype.getToolbarItemIndex=function(e){return this.toolbarModule?this.toolbarModule.getItemIndex(e):-1},s.prototype.filterFiles=function(e){this.filterData=e||null,this.setProperties({selectedItems:[]},!0),this.notify(hn,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),Ce(this,"filter-end")},s.prototype.getSelectedFiles=function(){return this.notify("update-selection-data",{}),this.itemData},s.prototype.openFile=function(e){this.notify(Rn,{action:"openFile",id:e})},s.prototype.refreshFiles=function(){C(this)},s.prototype.refreshLayout=function(){this.adjustHeight(),this.notify("layout-refresh",{})},s.prototype.selectAll=function(){this.notify(Rn,{action:"selectAll"})},s.prototype.clearSelection=function(){this.notify(Rn,{action:"clearSelection"})},s.prototype.renameFile=function(e,t){this.notify(Rn,{action:"renameFile",id:e,newName:t})},s.prototype.uploadFiles=function(){var e=[x(this)];this.itemData=e,Ie(this)},s.prototype.setRtl=function(e){e?this.addCssClass(null,Vi):this.addCssClass(Vi,null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)};var r;return Hn([t.Complex({},Dt)],s.prototype,"ajaxSettings",void 0),Hn([t.Property(!1)],s.prototype,"allowDragAndDrop",void 0),Hn([t.Property(!0)],s.prototype,"allowMultiSelection",void 0),Hn([t.Complex({},Vt)],s.prototype,"contextMenuSettings",void 0),Hn([t.Property("")],s.prototype,"cssClass",void 0),Hn([t.Complex({},Lt)],s.prototype,"detailsViewSettings",void 0),Hn([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),Hn([t.Property(!1)],s.prototype,"enablePersistence",void 0),Hn([t.Property("400px")],s.prototype,"height",void 0),Hn([t.Property("LargeIcons")],s.prototype,"view",void 0),Hn([t.Complex({},zt)],s.prototype,"navigationPaneSettings",void 0),Hn([t.Property("/")],s.prototype,"path",void 0),Hn([t.Property(null)],s.prototype,"popupTarget",void 0),Hn([t.Complex({},Et)],s.prototype,"searchSettings",void 0),Hn([t.Property()],s.prototype,"selectedItems",void 0),Hn([t.Property(!0)],s.prototype,"showFileExtension",void 0),Hn([t.Property(null)],s.prototype,"rootAliasName",void 0),Hn([t.Property(!1)],s.prototype,"showHiddenItems",void 0),Hn([t.Property(!0)],s.prototype,"showThumbnail",void 0),Hn([t.Property("Ascending")],s.prototype,"sortOrder",void 0),Hn([t.Complex({},xt)],s.prototype,"toolbarSettings",void 0),Hn([t.Complex({},Kt)],s.prototype,"uploadSettings",void 0),Hn([t.Property("100%")],s.prototype,"width",void 0),Hn([t.Event()],s.prototype,"fileLoad",void 0),Hn([t.Event()],s.prototype,"fileOpen",void 0),Hn([t.Event()],s.prototype,"beforeDownload",void 0),Hn([t.Event()],s.prototype,"beforeImageLoad",void 0),Hn([t.Event()],s.prototype,"beforePopupClose",void 0),Hn([t.Event()],s.prototype,"beforePopupOpen",void 0),Hn([t.Event()],s.prototype,"beforeSend",void 0),Hn([t.Event()],s.prototype,"created",void 0),Hn([t.Event()],s.prototype,"destroyed",void 0),Hn([t.Event()],s.prototype,"fileDragStart",void 0),Hn([t.Event()],s.prototype,"fileDragging",void 0),Hn([t.Event()],s.prototype,"fileDragStop",void 0),Hn([t.Event()],s.prototype,"fileDropped",void 0),Hn([t.Event()],s.prototype,"fileSelection",void 0),Hn([t.Event()],s.prototype,"fileSelect",void 0),Hn([t.Event()],s.prototype,"menuClick",void 0),Hn([t.Event()],s.prototype,"menuOpen",void 0),Hn([t.Event()],s.prototype,"failure",void 0),Hn([t.Event()],s.prototype,"popupClose",void 0),Hn([t.Event()],s.prototype,"popupOpen",void 0),Hn([t.Event()],s.prototype,"success",void 0),Hn([t.Event()],s.prototype,"toolbarClick",void 0),Hn([t.Event()],s.prototype,"toolbarCreate",void 0),Hn([t.Event()],s.prototype,"uploadListCreate",void 0),s=r=Hn([t.NotifyPropertyChanges],s)}(t.Component),qn=function(){function e(e){this.default=["Delete","Rename","Download","Cut","Copy","Paste"],this.single=["Delete","Rename","Download","Cut","Copy"],this.multiple=["Delete","Download","Cut","Copy","Refresh"],this.selection=["NewFolder","Upload","SortBy","Refresh"],this.parent=e,this.render(),this.addEventListener()}return e.prototype.render=function(){var e=this;this.items=this.toolbarItemData(this.getItems(this.parent.toolbarSettings.items.map(function(e){return e.trim()})));var t={items:this.items};this.parent.trigger("toolbarCreate",t,function(t){e.items=t.items,e.toolbarObj=new h.Toolbar({items:e.items,created:e.toolbarCreateHandler.bind(e),overflowMode:"Popup",clicked:e.onClicked.bind(e),enableHtmlSanitizer:e.parent.enableHtmlSanitizer,enableRtl:e.parent.enableRtl}),e.toolbarObj.isStringTemplate=!0,e.toolbarObj.appendTo("#"+e.parent.element.id+"_toolbar")})},e.prototype.getItemIndex=function(e){for(var t=this.getId(e),i=0;i<this.items.length;i++)if(this.items[i].id===t)return i;return-1},e.prototype.getItems=function(e){var t=e.slice();return this.parent.isDevice&&this.parent.allowMultiSelection&&t.push("SelectAll"),t},e.prototype.onClicked=function(e){var i=this;if(!t.isNullOrUndefined(e.item)&&e.item.id){var n,s=e.item.id.substr((this.parent.element.id+"_tb_").length);"refresh"===s||"newfolder"===s||"upload"===s?(n=[x(this.parent)],this.parent.itemData=n):(this.parent.notify("selected-data",{}),n=this.parent.itemData);var a={cancel:!1,fileDetails:n,item:e.item};this.parent.trigger("toolbarClick",a,function(a){var r,o;if(!a.cancel)switch(s){case"sortby":(o=t.closest(e.originalEvent.target,".e-toolbar-item"))&&o.classList.contains("e-toolbar-popup")&&(e.cancel=!0);break;case"newfolder":we(i.parent);break;case"cut":N(i.parent);break;case"copy":P(i.parent);break;case"delete":for(var l=0;l<n.length;l++)if(!be(n[l]))return void fe(i.parent,n[l],kn);ze(i.parent,"Delete");break;case"details":i.parent.notify(un,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[]),Ne(i.parent,r,i.parent.path,"details");break;case"paste":i.parent.folderPath="",K(i.parent);break;case"refresh":C(i.parent);break;case"download":pe(i.parent);break;case"rename":be(n[0])?(i.parent.notify(gn,{}),ze(i.parent,"Rename")):fe(i.parent,n[0],kn);break;case"upload":Ie(i.parent);break;case"selectall":i.parent.notify("select-all-init",{});break;case"selection":i.parent.notify("clear-all-init",{})}})}},e.prototype.toolbarCreateHandler=function(){if(!t.isNullOrUndefined(t.select("#"+this.getId("SortBy"),this.parent.element))){var e=[{id:this.getPupupId("name"),text:V(this.parent,"Name"),iconCss:ci},{id:this.getPupupId("size"),text:V(this.parent,"Size")},{id:this.getPupupId("date"),text:V(this.parent,"DateModified")},{separator:!0},{id:this.getPupupId("ascending"),text:V(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?pi:""},{id:this.getPupupId("descending"),text:V(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?pi:""},{id:this.getPupupId("none"),text:V(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?pi:""}];this.buttonObj=new l.DropDownButton({items:e,cssClass:B(this.parent,ai),select:H.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:"e-icons e-fe-sort"}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))}if(!t.isNullOrUndefined(t.select("#"+this.getId("View"),this.parent.element))){var i=[{id:this.getPupupId("large"),text:'<span class="e-icons e-fe-large e-menu-icon"></span>'+V(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":pi},{id:this.getPupupId("details"),text:'<span class="e-icons e-fe-grid e-menu-icon"></span>'+V(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?pi:""}];this.layoutBtnObj=new l.DropDownButton({iconCss:"Details"===this.parent.view?Fi:Ui,cssClass:B(this.parent,"e-caret-hide "+ai),items:i,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,content:'<span class="e-tbar-btn-text">'+V(this.parent,"View")+"</span>"}),this.layoutBtnObj.isStringTemplate=!0,this.layoutBtnObj.appendTo("#"+this.getId("View"))}this.hideItems(this.default,!0),this.hideStatus();for(var n=t.selectAll(".e-btn",this.toolbarObj.element),s=0;s<n.length;s++)!function(e){n[e].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},n[e].onkeyup=function(t){13!==t.keyCode||t.target.classList.contains("e-fe-popup")||n[e].click()}}(s);this.parent.refreshLayout()},e.prototype.updateSortByButton=function(){if(this.buttonObj)for(var e=this.buttonObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("name")?e[t].iconCss="name"===this.parent.sortBy?ci:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?ci:"":e[t].id===this.getPupupId("date")?e[t].iconCss="_fm_modified"===this.parent.sortBy?ci:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?pi:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?pi:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?pi:"")},e.prototype.getPupupId=function(e){return this.parent.element.id+"_ddl_"+e.toLowerCase()},e.prototype.layoutChange=function(e){"Details"===this.parent.view?e.item.id===this.getPupupId("large")&&D(this.parent,"LargeIcons"):e.item.id===this.getPupupId("details")&&D(this.parent,"Details")},e.prototype.toolbarItemData=function(e){var t=[],i="Both";this.parent.isMobile&&(i="Overflow");for(var n=0;n<e.length;n++){var s=void 0,a=this.getId(e[n]),r=V(this.parent,e[n]),o=V(this.parent,"Tooltip-"+e[n]),l='<span class="e-tbar-btn-text e-tbar-ddb-text">'+r+"</span>";switch(e[n]){case"|":s={type:"Separator"};break;case"Upload":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-upload",showTextOn:i};break;case"SortBy":s={id:a,tooltipText:o,template:'<button id="'+a+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+l+"</button>"};break;case"Refresh":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-refresh",showTextOn:i};break;case"Selection":s={id:a,text:r,tooltipText:o,suffixIcon:"e-icons e-fe-clear",overflow:"Show",align:"Right"};break;case"View":s={id:a,tooltipText:o,prefixIcon:"Details"===this.parent.view?Fi:Ui,overflow:"Show",align:"Right",text:r,showTextOn:"Overflow",template:'<button id="'+a+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+V(this.parent,"View")+"></button>"};break;case"Details":s={id:a,tooltipText:o,prefixIcon:"e-icons e-fe-details",overflow:"Show",align:"Right",text:r,showTextOn:"Overflow"};break;case"NewFolder":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-newfolder",showTextOn:i};break;case"Cut":s={id:a,text:r,tooltipText:o,prefixIcon:Ai,showTextOn:i};break;case"Copy":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-copy",showTextOn:i};break;case"Paste":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-paste",showTextOn:i};break;case"Delete":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-delete",showTextOn:i};break;case"Rename":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-rename",showTextOn:i};break;case"Download":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-download",showTextOn:i};break;case"SelectAll":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-select",showTextOn:i};break;default:s={id:a,text:r,tooltipText:o}}t.push(s)}return t},e.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},e.prototype.addEventListener=function(){this.parent.on(qi,this.onPropertyChanged,this),this.parent.on(hn,this.onSelectionChanged,this),this.parent.on(pn,this.onLayoutChange,this),this.parent.on(yn,this.showPaste,this),this.parent.on(vn,this.hidePaste,this),this.parent.on(en,this.destroy,this),this.parent.on(cn,this.updateSortByButton,this)},e.prototype.reRenderToolbar=function(e){var t=this;if(void 0!==e.newProp.toolbarSettings.items){this.items=this.toolbarItemData(this.getItems(e.newProp.toolbarSettings.items.map(function(e){return e.trim()})));var i={items:this.items};this.parent.trigger("toolbarCreate",i,function(e){t.buttonObj&&t.buttonObj.destroy(),t.layoutBtnObj&&t.layoutBtnObj.destroy(),t.items=e.items,t.toolbarObj.items=t.items,t.toolbarObj.dataBind(),t.toolbarCreateHandler()})}},e.prototype.onSelectionChanged=function(){this.hideStatus(),this.hideItems(this.single,!0),this.hideItems(this.selection,!1),1===this.parent.selectedItems.length?(this.hideItems(this.single,!1),this.hideItems(this.selection,!0)):this.parent.selectedItems.length>1&&(this.hideItems(this.multiple,!1),this.hideItems(this.selection,!0));var e=t.select("#"+this.getId("Selection"),this.toolbarObj.element);if(this.parent.selectedItems.length>0&&e){var i=void 0;i=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+V(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+V(this.parent,"Items-Selection"),t.select(".e-tbar-btn-text",e).textContent=i,this.toolbarObj.hideItem(e.parentElement,!1)}},e.prototype.hideItems=function(e,i){for(var n=0;n<e.length;n++){var s=t.select("#"+this.getId(e[n]),this.parent.element);s&&this.toolbarObj.hideItem(s.parentElement,i)}},e.prototype.hideStatus=function(){var e=t.select("#"+this.getId("Selection"),this.toolbarObj.element);e&&this.toolbarObj.hideItem(e.parentElement,!0)},e.prototype.showPaste=function(){this.hideItems(["Paste"],!1)},e.prototype.hidePaste=function(){this.hideItems(["Paste"],!0)},e.prototype.onLayoutChange=function(){if(this.layoutBtnObj){this.layoutBtnObj.iconCss="Details"===this.parent.view?Fi:Ui;for(var e=this.layoutBtnObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("large")?e[t].iconCss="LargeIcons"===this.parent.view?pi:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?pi:"")}},e.prototype.removeEventListener=function(){this.parent.off(qi,this.onPropertyChanged),this.parent.off(hn,this.onSelectionChanged),this.parent.off(pn,this.onLayoutChange),this.parent.off(yn,this.showPaste),this.parent.off(vn,this.hidePaste),this.parent.off(en,this.destroy),this.parent.off(cn,this.updateSortByButton)},e.prototype.getModuleName=function(){return"toolbar"},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"cssClass":this.buttonObj&&(this.buttonObj.cssClass=B(this.parent,ai)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=B(this.parent,"e-caret-hide "+ai));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":this.reRenderToolbar(e)}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.buttonObj&&this.buttonObj.destroy(),this.layoutBtnObj&&this.layoutBtnObj.destroy(),this.toolbarObj.destroy(),this.parent.refreshLayout())},e.prototype.enableItems=function(e,i){for(var n=0;n<e.length;n++){var s=t.select("#"+this.getId(e[n]),this.parent.element);s&&this.toolbarObj.enableItems(s.parentElement,i)}},e}(),Wn=function(){function e(e){this.removeNodes=[],this.moveNames=[],this.expandTree=!1,this.isDrag=!1,this.isPathDragged=!1,this.isRenameParent=!1,this.isRightClick=!1,this.renameParent=null,this.parent=e,this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:"ctrl+x",ctrlC:"ctrl+c",ctrlV:"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftF10:"shift+F10",f2:"f2"}}return e.prototype.onInit=function(){if(t.isNullOrUndefined(this.treeObj)){var e=t.getValue(this.parent.pathId[0],this.parent.feParent);t.setValue("_fm_icon","e-fe-folder",e);var i={},n=t.getValue("id",e);t.isNullOrUndefined(n)||t.setValue("data-id",n,i),be(e)||t.setValue("class",ge(e),i),t.isNullOrUndefined(i)||t.setValue("_fm_htmlAttr",i,e),this.treeObj=new h.TreeView({fields:{dataSource:[e],id:"_fm_id",parentID:"_fm_pId",expanded:"_fm_expanded",selected:"_fm_selected",text:"name",hasChildren:"hasChild",iconCss:"_fm_icon",htmlAttributes:"_fm_htmlAttr",tooltip:"name"},enableHtmlSanitizer:this.parent.enableHtmlSanitizer,nodeSelected:this.onNodeSelected.bind(this),nodeExpanding:this.onNodeExpand.bind(this),nodeClicked:this.onNodeClicked.bind(this),allowEditing:!0,nodeEditing:this.onNodeEditing.bind(this),drawNode:this.onDrowNode.bind(this),enableRtl:this.parent.enableRtl,dataBound:this.addDragDrop.bind(this)}),this.treeObj.isStringTemplate=!0,this.treeObj.appendTo("#"+this.parent.element.id+"_tree"),this.wireEvents()}},e.prototype.addDragDrop=function(){var e=this;!this.parent.isMobile&&this.treeObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.treeObj.element,{cursorAt:this.parent.dragCursorPosition,dragTarget:".e-fullrow",distance:5,dragArea:this.parent.element,drag:re.bind(this,this.parent),dragStart:function(t){ie(e.parent,t,e.dragObj)},dragStop:te.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!0,helper:this.dragHelper.bind(this)})):!this.parent.allowDragAndDrop&&this.dragObj&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target;if(!i.classList.contains("e-fullrow"))return null;var n=t.closest(i,"li");return this.parent.dragPath="",this.parent.dragData=[],this.parent.activeElements=[],this.parent.activeElements=[n],this.parent.dragNodes=[],w(this.parent,n),this.parent.dragData=this.getTreeData(n),this.parent.dragPath=this.getDragPath(n,this.parent.dragData[0].name),this.parent.dragNodes.push(this.parent.dragData[0].name),ee(this.parent),this.parent.virtualDragElement},e.prototype.getDragPath=function(e,t){return Q(this.getDropPath(e,t))},e.prototype.getDropPath=function(e,t){var i=e.getAttribute("data-id");return c(e,this.parent.hasId?i:t,this.parent.hasId)},e.prototype.onDrowNode=function(e){var t={element:e.node,fileDetails:e.nodeData,module:"NavigationPane"};this.parent.trigger("fileLoad",t)},e.prototype.addChild=function(e,i,n){var s=F(e);if(s.length>0){for(var a=0,r=s;a<s.length;){r[a]._fm_icon="e-fe-folder";var o={},l=t.getValue("id",r[a]);t.isNullOrUndefined(l)||t.setValue("data-id",l,o),be(r[a])||t.setValue("class",ge(r[a]),o),t.isNullOrUndefined(o)||t.setValue("_fm_htmlAttr",o,r[a]),a++}this.treeObj.addNodes(s,i,null,n)}},e.prototype.onNodeSelected=function(e){if(this.parent.breadcrumbbarModule&&this.parent.breadcrumbbarModule.searchObj&&!this.renameParent&&(this.parent.breadcrumbbarModule.searchObj.element.value="",this.parent.isFiltered=!1),this.parent.searchedItems=[],e.isInteracted||this.isRightClick||this.isPathDragged||this.isRenameParent){this.activeNode=e.node,this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));if(!this.renameParent){var n={cancel:!1,fileDetails:i[0],module:"NavigationPane"};delete n.cancel,this.parent.trigger("fileOpen",n)}this.parent.selectedItems=[],this.parent.itemData=i,p(e.node,this.parent.itemData[0],this.parent),this.expandNodeTarget=null,e.node.querySelector(".e-icons")&&null===e.node.querySelector("."+hi)&&(this.expandNodeTarget="add"),De(this.parent,this.isPathDragged?In:Zi,this.parent.path),this.parent.visitedItem=e.node,this.isPathDragged=this.isRenameParent=this.isRightClick=!1}},e.prototype.onPathDrag=function(e){this.isPathDragged=!0,this.selectResultNode(e[0])},e.prototype.onNodeExpand=function(e){if((e.isInteracted||this.isDrag)&&null===e.node.querySelector("."+hi)){var i=t.getValue("text",e.nodeData),n=e.node.getAttribute("data-id"),s=!t.isNullOrUndefined(n),a=t.isNullOrUndefined(n)?i:n,r=c(e.node,a,s);this.expandNodeTarget=e.node.getAttribute("data-uid"),this.parent.expandedId=this.expandNodeTarget,this.parent.itemData=this.getTreeData(t.getValue("id",e.nodeData)),De(this.parent,"node-expand",r)}},e.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null},e.prototype.onNodeClicked=function(e){if(this.parent.activeModule="navigationpane",this.activeNode=e.node,3===e.event.which&&e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0])this.isRightClick=!0,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")];else if(e.node.getAttribute("data-uid")===this.treeObj.selectedNodes[0]&&0!==this.parent.selectedItems.length){this.parent.setProperties({selectedItems:[]},!0);var t="LargeIcons"===this.parent.view?"largeiconsview":"detailsview";this.parent.notify(qi,{module:t,newProp:{selectedItems:[]}})}},e.prototype.onNodeEditing=function(e){t.isNullOrUndefined(e.innerHtml)||(e.cancel=!0)},e.prototype.onPathChanged=function(e){this.parent.isCut=!1;var i=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feFiles);if("add"===this.expandNodeTarget){var n=t.select('[data-uid="'+this.treeObj.selectedNodes[0]+'"]',this.treeObj.element),s=t.select(".e-list-parent",n);t.isNullOrUndefined(s)&&this.addChild(e.files,this.treeObj.selectedNodes[0],!this.expandTree),this.expandNodeTarget=""}this.expandTree=!1,t.isNullOrUndefined(i)&&t.setValue(this.parent.pathId[this.parent.pathId.length-1],e.files,this.parent.feFiles)},e.prototype.updateTree=function(e){if(this.treeObj){var t=this.treeObj.selectedNodes[0];this.updateTreeNode(e,t)}},e.prototype.updateTreeNode=function(e,t){var i=-1!==this.treeObj.expandedNodes.indexOf(t);this.removeChildNodes(t),this.addChild(e.files,t,!i)},e.prototype.removeChildNodes=function(e){var i=t.select('[data-uid="'+e+'"]',this.treeObj.element),n=t.select(".e-list-parent",i),s=n?Array.prototype.slice.call(n.children):null;s&&this.treeObj.removeNodes(s)},e.prototype.onOpenEnd=function(e){var t=this.parent.pathId[this.parent.pathId.length-1];this.treeObj.expandAll(this.treeObj.selectedNodes),this.treeObj.selectedNodes=[t],this.expandNodeTarget="add",this.onPathChanged(e)},e.prototype.onOpenInit=function(e){"navigationpane"===this.parent.activeModule&&e.target.querySelector(".e-icons")&&this.treeObj.expandAll(this.treeObj.selectedNodes)},e.prototype.onInitialEnd=function(e){this.onInit(),this.addChild(e.files,t.getValue("_fm_id",e.cwd),!1)},e.prototype.onFinalizeEnd=function(e){this.onInit();var i=t.getValue("_fm_id",e.cwd);this.removeChildNodes(i),this.addChild(e.files,i,!1),this.treeObj.selectedNodes=[this.parent.pathId[this.parent.pathId.length-1]]},e.prototype.onCreateEnd=function(e){this.updateTree(e)},e.prototype.onSelectedData=function(){"navigationpane"===this.parent.activeModule&&this.updateItemData()},e.prototype.onDeleteInit=function(){if("navigationpane"===this.parent.activeModule){this.updateActionData();var e=t.getValue("name",this.parent.itemData[0]);Pe(this.parent,[e],this.parent.path,"delete")}},e.prototype.onDeleteEnd=function(e){if("navigationpane"===this.parent.activeModule){var i=this.treeObj.selectedNodes[0],n=t.select('[data-uid="'+i+'"]',this.treeObj.element),s=t.closest(n,".e-list-parent").parentElement;this.treeObj.selectedNodes=[s.getAttribute("data-uid")],this.treeObj.dataBind()}this.updateTree(e)},e.prototype.onRefreshEnd=function(e){this.updateTree(e)},e.prototype.onRenameInit=function(){"navigationpane"===this.parent.activeModule&&this.updateRenameData()},e.prototype.onRenameEndParent=function(e){var i=this.renameParent?this.renameParent:this.parent.pathId[this.parent.pathId.length-1];if(this.expandTree=-1!==this.treeObj.expandedNodes.indexOf(this.treeObj.selectedNodes[0]),this.updateTreeNode(e,i),this.parent.expandedId=null,this.renameParent)this.renameParent=null;else{var n=[];if(this.parent.hasId)n=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",this.parent.renameText,!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("_fm_pId","equal",i,!1)))}if(n.length>0){this.isRenameParent=!0;var r=t.getValue(this.treeObj.fields.id,n[0]);this.treeObj.selectedNodes=[r],this.treeObj.dataBind()}}},e.prototype.onRenameEnd=function(e){if(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered){var i=this.treeObj.getTreeData(),n=[];if(this.parent.hasId)n=new s.DataManager(i).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(i).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",this.parent.currentItemText,!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}n.length>0&&(this.renameParent=t.getValue(this.treeObj.fields.parentID,n[0]),this.parent.expandedId=this.renameParent,this.parent.itemData=this.getTreeData(this.renameParent),De(this.parent,mn,this.parent.filterPath.replace(/\\/g,"/")))}else this.updateTree(e)},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"allowDragAndDrop":this.addDragDrop();break;case"navigationPaneSettings":De(this.parent,Ki,"/")}},e.prototype.onDownLoadInit=function(){this.doDownload()},e.prototype.onSelectionChanged=function(e){this.treeObj.selectedNodes=[e.selectedNode]},e.prototype.onClearPathInit=function(e){this.removeChildNodes(e.selectedNode)},e.prototype.onDragEnd=function(e){var t=[];t=this.parent.isPasteError||this.parent.isSearchDrag?this.getMoveNames(e.files,this.parent.isSearchDrag,this.parent.dragPath):this.moveNames,this.treeObj.removeNodes(t)},e.prototype.getMoveNames=function(e,i,n){for(var a=[],r=0;r<e.length;r++)if(!e[r].isFile&&!this.parent.hasId){var o=e[r].previousName;if(i){var l=(n+=e[r].previousName).lastIndexOf("/");o=n.substring(l+1),n=n.substring(0,l+1)}for(var h=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",o,!1)),d=0;d<h.length;d++){var p=t.getValue("filterPath",h[d]);if((p=p.replace(/\\/g,"/"))===n){a.push(t.getValue(this.treeObj.fields.id,h[d]));break}}}return a},e.prototype.onCutEnd=function(e){var t=[];this.parent.isPasteError||this.parent.isSearchCut?this.moveNames=this.getMoveNames(e.files,this.parent.isSearchCut,this.parent.targetPath):t=this.moveNames,this.treeObj.removeNodes(t)},e.prototype.selectResultNode=function(e){if(this.parent.hasId)this.treeObj.selectedNodes=[t.getValue("_fm_id",e)],this.treeObj.dataBind();else{var i=t.getValue("filterPath",e),n=t.getValue("name",e),a=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",n,!1));if(a.length>0){var r=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",i,!1));if(r.length>0){var o=t.getValue(this.treeObj.fields.id,r[0]);this.treeObj.selectedNodes=[o],this.treeObj.dataBind()}}}},e.prototype.onDropPath=function(e){this.onpasteEnd(e),this.selectResultNode(this.parent.dropData),this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteEnd=function(e){var i=[];if(this.parent.hasId)i=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where("id","equal",t.getValue("id",e.cwd),!1));else{var n=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",t.getValue("name",e.cwd),!1));n.length>0&&(i=new s.DataManager(n).executeLocal((new s.Query).where("filterPath","equal",t.getValue("filterPath",e.cwd),!1)))}if(i.length>0){var a=t.getValue(this.treeObj.fields.id,i[0]),r=-1===this.treeObj.expandedNodes.indexOf(a);this.removeChildNodes(a),this.addChild(e.files,a,r)}this.parent.expandedId=null,this.onPathChanged(e),this.parent.isDragDrop&&this.checkDropPath(e)},e.prototype.checkDropPath=function(e){if(this.parent.hasId)return this.parent.isDropEnd=!this.parent.isPasteError,void $(this.parent);-1===this.parent.dropPath.indexOf(J(this.parent,e))?(this.parent.isDropEnd=!1,$(this.parent)):this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&this.updateItemData(),this.moveNames=[];for(var e=this.parent.isDragDrop?this.parent.dragData:this.parent.actionRecords,i=0;i<e.length;i++)!1===t.getValue("isFile",e[i])&&this.moveNames.push(t.getValue("_fm_id",e[i]))},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.activeElements=[this.activeNode])},e.prototype.addEventListener=function(){this.parent.on(qi,this.onPropertyChanged,this),this.parent.on("download-init",this.onDownLoadInit,this),this.parent.on(Wi,this.onInitialEnd,this),this.parent.on(Ki,this.onFinalizeEnd,this),this.parent.on(Zi,this.onPathChanged,this),this.parent.on(In,this.onpasteEnd,this),this.parent.on(Dn,this.onCutEnd,this),this.parent.on(wn,this.onpasteInit,this),this.parent.on("node-expand",this.onNodeExpanded,this),this.parent.on(Gi,this.onCreateEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(Qi,this.onDeleteInit,this),this.parent.on(Ji,this.onDeleteEnd,this),this.parent.on(Xi,this.onRefreshEnd,this),this.parent.on("update-tree-selection",this.onSelectionChanged,this),this.parent.on(on,this.onOpenInit,this),this.parent.on(ln,this.onOpenEnd,this),this.parent.on(en,this.destroy,this),this.parent.on(gn,this.onRenameInit,this),this.parent.on(bn,this.onRenameEnd,this),this.parent.on(mn,this.onRenameEndParent,this),this.parent.on(dn,this.onClearPathInit,this),this.parent.on(On,this.oncutCopyInit,this),this.parent.on(xn,this.onDropInit,this),this.parent.on(fn,this.onMenuItemData,this),this.parent.on(Pn,this.onDragEnd,this),this.parent.on(En,this.onDragging,this),this.parent.on(Nn,this.onDropPath,this),this.parent.on(un,this.onDetailsInit,this),this.parent.on(Yi,this.onPathDrag,this)},e.prototype.removeEventListener=function(){this.parent.off(Wi,this.onInitialEnd),this.parent.off("download-init",this.onDownLoadInit),this.parent.off(Ki,this.onFinalizeEnd),this.parent.off("selected-data",this.onSelectedData),this.parent.off(qi,this.onPropertyChanged),this.parent.off(Zi,this.onPathChanged),this.parent.off(In,this.onpasteEnd),this.parent.off(Dn,this.onCutEnd),this.parent.off(wn,this.onpasteInit),this.parent.off("update-tree-selection",this.onSelectionChanged),this.parent.off("node-expand",this.onNodeExpanded),this.parent.off(Gi,this.onCreateEnd),this.parent.off(Xi,this.onRefreshEnd),this.parent.off(on,this.onOpenInit),this.parent.off(ln,this.onOpenEnd),this.parent.off(en,this.destroy),this.parent.off(gn,this.onRenameInit),this.parent.off(bn,this.onRenameEnd),this.parent.off(mn,this.onRenameEndParent),this.parent.off(dn,this.onClearPathInit),this.parent.off(Qi,this.onDeleteInit),this.parent.off(Ji,this.onDeleteEnd),this.parent.off(On,this.oncutCopyInit),this.parent.off(xn,this.onDropInit),this.parent.off(Pn,this.onDragEnd),this.parent.off(En,this.onDragging),this.parent.off(Nn,this.onDropPath),this.parent.off(un,this.onDetailsInit),this.parent.off(fn,this.onMenuItemData),this.parent.off(Yi,this.onPathDrag)},e.prototype.onDetailsInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.getTreeData(this.treeObj.selectedNodes[0]);this.parent.itemData=e}},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.itemData=this.getTreeData(i.getAttribute("data-uid"))}},e.prototype.onDragging=function(e){var i=t.closest(e.target,"li");if(i.classList.contains("e-node-collapsed")){this.isDrag=!0;var n=parseInt(i.getAttribute("aria-level"),10);this.treeObj.expandAll([i.getAttribute("data-uid")],n+1),this.isDrag=!1}},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.dropData=this.getTreeData(i)[0],this.parent.dropPath=this.getDropPath(i,t.getValue("name",this.parent.dropData))}},e.prototype.getModuleName=function(){return"navigationpane"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.treeObj&&(this.unWireEvents(),this.treeObj.destroy()))},e.prototype.wireEvents=function(){this.keyboardModule=new t.KeyboardEvents(this.treeObj.element,{keyAction:this.keyDown.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.unWireEvents=function(){this.keyboardModule.destroy()},e.prototype.keyDown=function(e){switch(e.action){case"altEnter":this.parent.notify(un,{}),Ne(this.parent,[],this.parent.path,"details");break;case"esc":b(this.parent);break;case"del":this.updateItemData(),be(this.parent.itemData[0])?(this.removeNodes=[],ze(this.parent,"Delete")):fe(this.parent,this.parent.itemData[0],kn);break;case"ctrlC":P(this.parent);break;case"ctrlV":this.parent.folderPath="",K(this.parent);break;case"ctrlX":N(this.parent);break;case"shiftF10":if(this.updateItemData(),!Oe(this.parent.itemData[0]))return void fe(this.parent,this.parent.itemData[0],An);0!==this.parent.selectedItems.length&&this.doDownload();break;case"f2":if(0===this.parent.selectedItems.length){var t=this.getTreeData(this.treeObj.selectedNodes[0])[0];be(t)?(this.updateRenameData(),ze(this.parent,"Rename")):fe(this.parent,t,kn)}}},e.prototype.getTreeData=function(e){for(var i=this.treeObj.getTreeData(e),n=0;n<i.length;n++)t.isNullOrUndefined(t.getValue("hasChild",i[n]))&&t.setValue("hasChild",!1,i[n]);return i},e.prototype.updateRenameData=function(){this.updateItemData(),this.parent.currentItemText=t.getValue("name",this.parent.itemData[0])},e.prototype.updateItemData=function(){var e=this.getTreeData(this.treeObj.selectedNodes[0])[0];this.parent.itemData=[e],this.parent.isFile=!1},e.prototype.updateActionData=function(){this.updateItemData();var e=Q(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},e.prototype.doDownload=function(){var e=Q(this.parent.path),i=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":t.getValue("name",this.parent.itemData[0]);He(this.parent,e,[i])},e}(),Kn=function(){function e(e){this.isInteracted=!0,this.interaction=!0,this.isPasteOperation=!1,this.isColumnRefresh=!1,this.dragObj=null,this.startIndex=null,this.firstItemIndex=null,this.isSelectionUpdate=!1,this.currentSelectedItem=[],this.count=0,this.isRendered=!0,this.isLoaded=!1,this.isNameWidth=!1,this.pasteOperation=!1,this.uploadOperation=!1,d.Grid.Inject(d.Resize,d.ContextMenu,d.Sort,d.VirtualScroll),this.parent=e,this.element=t.select("#"+this.parent.element.id+Xt,this.parent.element),this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",tab:"tab",moveDown:"downarrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",ctrlUp:"ctrl+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",end:"end",home:"home",moveUp:"uparrow",del:"delete",ctrlX:"ctrl+x",ctrlC:"ctrl+c",ctrlV:"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftdel:"shift+delete",ctrlD:"ctrl+d",f2:"f2",ctrlA:"ctrl+a",enter:"enter"}}return e.prototype.render=function(e){if(n.showSpinner(this.parent.element),"Details"===this.parent.view){t.removeClass([this.parent.element],"e-fe-m-select");var i=L(this.parent,e.files);this.checkNameWidth();var s=this.getColumns(),a=void 0;this.parent.isMobile?a=[]:"None"!==this.parent.sortOrder&&(a=[{direction:this.parent.sortOrder,field:this.parent.sortBy}]),this.gridObj=new d.Grid({dataSource:i,allowSorting:!0,rowSelecting:this.onSelection.bind(this,"select"),rowDeselecting:this.onSelection.bind(this,"unselect"),rowSelected:this.onSelected.bind(this),rowDeselected:this.onDeSelection.bind(this),allowResizing:this.parent.detailsViewSettings.columnResizing,selectionSettings:{type:this.parent.allowMultiSelection?"Multiple":"Single",checkboxMode:"ResetOnRowClick"},enableRtl:this.parent.enableRtl,pageSettings:{pageSize:20},sortSettings:{allowUnsort:!1,columns:a},columns:s,recordDoubleClick:this.DblClickEvents.bind(this),beforeDataBound:this.onBeforeDataBound.bind(this),dataBound:this.onDataBound.bind(this),rowDataBound:this.onRowDataBound.bind(this),actionBegin:this.onActionBegin.bind(this),headerCellInfo:this.onHeaderCellInfo.bind(this),width:"100%",beforeCopy:function(e){e.cancel=!0},load:function(e){this.focusModule.destroy()},locale:this.parent.locale}),this.gridObj.isStringTemplate=!0,this.gridObj.appendTo("#"+this.parent.element.id+Xt),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e}},e.prototype.checkNameWidth=function(){var e=this.parent.detailsViewSettings.columns;this.isNameWidth=!1;for(var i=0;i<e.length;i++)if("name"===e[i].field)return void(this.isNameWidth=!t.isNullOrUndefined(e[i].width))},e.prototype.adjustWidth=function(e,t){if(!this.isNameWidth||"name"!==t)for(var i=0;i<e.length;i++)if(e[i].field===t){var n=void 0;n=""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===t?"120px":"180px":"auto":this.element.clientWidth<=500?"120px":"auto",e[i].width=n}},e.prototype.getColumns=function(){var e;if(this.parent.isMobile)e=[{field:"name",headerText:V(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:'<div class="e-fe-text">${name}</div><div class="e-fe-date">${_fm_modified}</div><span class="e-fe-size">${size}</span>'}];else{e=JSON.parse(JSON.stringify(this.parent.detailsViewSettings.columns)),this.adjustWidth(e,"name");for(var t=0,i=e.length;t<i;t++)e[t].headerText=V(this.parent,e[t].headerText)}var n=this.parent.isMobile||this.parent.isBigger?"54":"46",s={field:"type",width:n,minWidth:n,template:'<span class="e-fe-icon ${_fm_iconClass}"></span>',allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:'<span class="e-fe-icon e-fe-folder"></span>'};if(e.unshift(s),this.parent.allowMultiSelection){var a=this.parent.isBigger?"36":"26",r={type:"checkbox",width:a,minWidth:a,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1};this.parent.isMobile?e.push(r):e.unshift(r)}for(var t=0,i=e.length;t<i;t++)e[t].disableHtmlEncode=!this.parent.enableHtmlSanitizer;return e},e.prototype.adjustHeight=function(){if(this.gridObj){var e=t.select("#"+this.parent.element.id+ii,this.parent.element),i=t.select("#"+this.parent.element.id+ni,this.parent.element),n=t.select("."+Mi,this.parent.element),s=e.offsetHeight-i.offsetHeight-n.offsetHeight;this.gridObj.height=s,this.gridObj.dataBind()}},e.prototype.renderCheckBox=function(){this.gridObj.columns=this.getColumns(),this.isColumnRefresh=!0,this.gridObj.refreshColumns()},e.prototype.onRowDataBound=function(e){var i=t.select(".e-fe-grid-name",e.row);if(!i)for(var n=this.parent.detailsViewSettings.columns,s=0;s<n.length;s++)if("name"===n[s].field){i=e.row.children[this.parent.allowMultiSelection?s+2:s+1];break}if(i&&i.setAttribute("title",t.getValue("name",e.data)),this.parent.isLayoutChange&&this.parent.isCut&&"move"===this.parent.fileAction&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length&&-1!==this.parent.selectedNodes.indexOf(t.getValue("name",e.data))&&v(e.row),!this.parent.showFileExtension&&t.getValue("isFile",e.data)){var a=e.row.querySelector(".e-fe-text");if(a){var r=t.getValue("name",e.data),o=t.getValue("type",e.data);a.innerHTML=r.substr(0,r.length-o.length)}}if(void 0!==t.getValue("size",e.data)&&e.row.querySelector(".e-fe-size")){var l=e.row.querySelector(".e-fe-size"),h=void 0;if(t.getValue("isFile",e.data)){var d=t.getValue("size",e.data);h=(c=new t.Internationalization(this.parent.locale)).formatNumber(d/1024,{format:"n"})+" "+V(this.parent,"KB")}else h="";l.innerHTML=h}if(this.parent.isMobile&&void 0!==t.getValue("_fm_modified",e.data)&&e.row.querySelector(".e-fe-date")){for(var p=e.row.querySelector(".e-fe-date"),c=new t.Internationalization(this.parent.locale),n=this.parent.detailsViewSettings.columns,u=void 0,s=0;s<n.length;s++)if("dateModified"===n[s].field){u=n[s].format;break}var f=c.formatDate(new Date(t.getValue("_fm_modified",e.data)),u);p.innerHTML=f}var g=e.row.querySelector("."+yi);g&&g.classList.add("e-small"),be(e.data)||(e.row.className+=" "+ge(e.data));var m={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",m)},e.prototype.onActionBegin=function(e){if("sorting"===e.requestType){if(this.parent.setProperties({sortOrder:e.direction},!0),this.parent.setProperties({sortBy:e.columnName},!0),0!==this.parent.selectedItems.length){this.sortItem=!0;var i=this.gridObj.getSelectedRowIndexes(),n=i.length;for(this.sortSelectedNodes=[];n>0;){var s=this.gridObj.getRowsObject()[i[n-1]].data;this.sortSelectedNodes.push(t.getValue(this.parent.hasId?"id":"name",s)),n--}}this.parent.notify(cn,{})}},e.prototype.onHeaderCellInfo=function(e){var t=e.node.querySelector("."+yi);t&&t.classList.add("e-small")},e.prototype.onBeforeDataBound=function(e){n.showSpinner(this.parent.element);var t=L(this.parent,this.gridObj.dataSource);e.result=t},e.prototype.onDataBound=function(){if(this.createDragObj(),0!==this.parent.selectedItems.length&&this.selectRecords(this.parent.selectedItems),!0===this.isPasteOperation&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.parent.pasteNodes),this.isPasteOperation=!1)),this.parent.createdItem&&(this.selectRecords([t.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null),this.parent.layoutSelectedItems.length&&this.selectRecords(this.parent.layoutSelectedItems),this.parent.renamedItem&&(this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null),!0===this.sortItem&&(this.selectRecords(this.sortSelectedNodes),this.sortItem=!1),this.isSelectionUpdate&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.currentSelectedItem),this.isSelectionUpdate=!1)),!0===this.uploadOperation&&(this.count++,this.selectRecords(this.parent.uploadItem),this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[])),this.gridObj.currentViewData.length*this.gridObj.getRowHeight()<this.gridObj.height)(e=this.gridObj.getHeaderContent()).style.paddingRight="",e.style.paddingLeft="",t.select(".e-headercontent",e).style.borderRightWidth="0",(i=this.gridObj.getContent().querySelector(".e-content")).style.overflowY="",i.classList.add("e-scrollShow");else{var e=this.gridObj.getHeaderContent();this.parent.enableRtl?e.style.paddingLeft="16px":e.style.paddingRight="16px";var i=this.gridObj.getContent().querySelector(".e-content");i.classList.remove("e-scrollShow")}this.isRendered=!0,this.parent.isLayoutChange=!1,n.hideSpinner(this.parent.element),this.checkEmptyDiv(this.emptyArgs),this.isInteracted=!!this.isLoaded||this.isInteracted,this.isLoaded=!1},e.prototype.selectRecords=function(e){for(var i=this.gridObj.getCurrentViewRecords(),n=[],s=0,a=i.length;s<a;s++){var r=this.parent.hasId?t.getValue("id",i[s]):k(this.parent,i[s]);-1!==e.indexOf(r)&&n.push(s)}0!==n.length&&(this.gridObj.selectRows(n),this.addFocus(this.gridObj.selectedRowIndex))},e.prototype.addSelection=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[];if(this.parent.hasId)n=new s.DataManager(i).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(i).executeLocal((new s.Query).where("name","equal",t.getValue("name",e),!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(n.length>0){var r=i.indexOf(n[0]);this.gridObj.selectRows([r])}},e.prototype.onSortColumn=function(){"None"!==this.parent.sortOrder?this.gridObj.sortModule.sortColumn(this.parent.sortBy,this.parent.sortOrder):this.gridObj.dataSource=L(this.parent,this.gridObj.dataSource)},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++)switch(n[i]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"detailsViewSettings":if(!t.isNullOrUndefined(this.gridObj)){this.checkNameWidth();var s=this.getColumns();this.gridObj.columns=s,this.gridObj.allowResizing=this.parent.detailsViewSettings.columnResizing,this.gridObj.dataBind(),this.gridObj.refreshColumns()}break;case"selectedItems":if(this.interaction=!1,0!==this.parent.selectedItems.length){if(!this.parent.allowMultiSelection){var a=this.parent.selectedItems.slice(this.parent.selectedItems.length-1);this.parent.setProperties({selectedItems:a},!0)}this.selectRecords(this.parent.selectedItems),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)}else t.isNullOrUndefined(this.gridObj)||this.gridObj.clearSelection();break;case"showFileExtension":case"showHiddenItems":De(this.parent,Zi,this.parent.path);break;case"allowMultiSelection":t.isNullOrUndefined(this.gridObj)||(this.currentSelectedItem=this.parent.selectedItems,this.gridObj.selectionSettings.type=e.newProp.allowMultiSelection?"Multiple":"Single",this.isSelectionUpdate=!0,this.renderCheckBox());break;case"view":D(this.parent,"Details");break;case"width":this.onDetailsResize()}},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.gridObj&&(this.parent.searchedItems=[],this.parent.isFiltered?this.updatePathColumn():this.removePathColumn(!1)),O(this.parent),"Details"===this.parent.view&&(this.isInteracted=!1,n.showSpinner(this.parent.element),this.parent.setProperties({selectedItems:[]},!0),this.gridObj.dataSource=L(this.parent,e.files)),this.emptyArgs=e},e.prototype.updatePathColumn=function(){var e=this.gridObj.columns.length,t=JSON.parse(JSON.stringify(this.gridObj.columns));if(t[e-1].field&&"filterPath"!==t[e-1].field&&!this.parent.isMobile){var i={field:"filterPath",headerText:V(this.parent,"Path"),minWidth:180,width:"auto"};this.gridObj.columns.push(i),this.adjustWidth(this.gridObj.columns,"filterPath"),this.adjustWidth(this.gridObj.columns,"name"),this.isColumnRefresh=!0,this.gridObj.refreshColumns()}},e.prototype.checkEmptyDiv=function(e){var i=L(this.parent,e.files);if(0!==i.length||t.isNullOrUndefined(this.element.querySelector("."+Ti))){if(0!==i.length&&this.element.querySelector("."+Oi))if(this.element.querySelector("."+Ti).querySelector("."+Oi)){var n=this.element.querySelector("."+Ti).querySelector("."+Oi);this.element.querySelector("."+Ti).removeChild(n)}else this.element.removeChild(this.element.querySelector("."+Oi))}else A(this.parent,this.element,e)},e.prototype.onOpenInit=function(){if("detailsview"===this.parent.activeModule){var e=this.gridObj.getSelectedRecords()[0];this.openContent(e)}},e.prototype.DblClickEvents=function(e){this.gridObj.selectRows([e.rowIndex]);var t;e.rowData&&(t=JSON.parse(JSON.stringify(e.rowData)),this.openContent(t))},e.prototype.openContent=function(e){var i=this;if(!me(e))return void fe(this.parent,e,Mn);var n={cancel:!1,fileDetails:e,module:"DetailsView"};this.parent.trigger("fileOpen",n,function(n){if(!n.cancel){var s=t.getValue("name",e);if(t.getValue("isFile",e)){if(E(e)===xi){var a=R(i.parent,e);yt(i.parent,s,a)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)W(i.parent,e);else{var r=t.getValue("id",e),o=i.parent.path+(t.isNullOrUndefined(r)?s:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(s),i.parent.pathId.push(t.getValue("_fm_id",e)),i.parent.itemData=[e],j(i.parent)}i.parent.isFiltered=!1}i.element.focus()}})},e.prototype.onLayoutChange=function(e){"Details"===this.parent.view&&(this.gridObj?this.isLoaded=!0:this.render(e),this.parent.isFiltered&&(this.updatePathColumn(),this.parent.setProperties({selectedItems:[]},!0)),this.gridObj.dataSource=L(this.parent,e.files),this.parent.notify("hide-layout",{}),this.gridObj.element.classList.remove(Bi),this.isInteracted=!1,this.gridObj.clearSelection(),""!==this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.onSearchFiles(e),this.adjustHeight(),this.gridObj.sortSettings.columns.length>0&&this.gridObj.sortSettings.columns[0].field!==this.parent.sortBy&&"None"!==this.parent.sortOrder&&this.gridObj.sortColumn(this.parent.sortBy,this.parent.sortOrder))},e.prototype.onSearchFiles=function(e){"Details"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(hn,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},e.prototype.removePathColumn=function(e){var t=this.gridObj.columns.length,i=JSON.parse(JSON.stringify(this.gridObj.columns));i[t-1].field&&"filterPath"===i[t-1].field&&("filterPath"===this.gridObj.sortSettings.columns[0].field&&("None"!==this.parent.sortOrder?this.gridObj.sortColumn("name",this.parent.sortOrder):this.gridObj.dataSource=L(this.parent,this.gridObj.dataSource),this.parent.notify(cn,{})),this.gridObj.columns.pop(),e||(this.isColumnRefresh=!0,this.gridObj.refreshColumns()))},e.prototype.onFinalizeEnd=function(e){"Details"===this.parent.view&&(this.gridObj?this.onPathChanged(e):this.render(e))},e.prototype.onCreateEnd=function(e){"Details"===this.parent.view&&this.onPathChanged(e)},e.prototype.onRenameInit=function(){"detailsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onSelectedData=function(){"detailsview"===this.parent.activeModule&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.onDeleteInit=function(){"detailsview"===this.parent.activeModule&&Pe(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"Details"===this.parent.view&&(this.onPathChanged(e),this.parent.setProperties({selectedItems:[]},!0))},e.prototype.onRefreshEnd=function(e){"Details"===this.parent.view&&(this.isInteracted=!1,this.removePathColumn(!1),this.gridObj.dataSource=L(this.parent,e.files),this.emptyArgs=e)},e.prototype.onHideLayout=function(){"Details"!==this.parent.view&&this.gridObj&&this.gridObj.element.classList.add(Bi)},e.prototype.onSelectAllInit=function(){"Details"===this.parent.view&&(this.isInteracted=!1,this.parent.allowMultiSelection?this.gridObj.selectionModule.selectRowsByRange(0,this.gridObj.getRows().length):this.gridObj.selectRow(this.gridObj.getRows().length-1),this.isInteracted=!0,this.interaction=!0)},e.prototype.onClearAllInit=function(){"Details"===this.parent.view&&(this.removeSelection(),this.interaction=!0)},e.prototype.onSelectionChanged=function(){t.removeClass([this.element],"e-headercheck"),this.parent.selectedItems.length>0&&t.addClass([this.element],"e-headercheck")},e.prototype.onLayoutRefresh=function(){"Details"===this.parent.view&&this.adjustHeight()},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onUpdateSelectionData=function(){"Details"===this.parent.view&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.addEventListener=function(){this.parent.on(Ki,this.onFinalizeEnd,this),this.parent.on(en,this.destroy,this),this.parent.on(pn,this.onLayoutChange,this),this.parent.on(Zi,this.onPathChanged,this),this.parent.on(Gi,this.onCreateEnd,this),this.parent.on(xn,this.onDropInit,this),this.parent.on(un,this.onDetailsInit,this),this.parent.on(Xi,this.onRefreshEnd,this),this.parent.on(rn,this.onSearchFiles,this),this.parent.on(Rn,this.onMethodCall,this),this.parent.on(an,this.onActionFailure,this),this.parent.on(qi,this.onPropertyChanged,this),this.parent.on(Qi,this.onDeleteInit,this),this.parent.on(Ji,this.onDeleteEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(gn,this.onRenameInit,this),this.parent.on(bn,this.onPathChanged,this),this.parent.on(on,this.onOpenInit,this),this.parent.on(Sn,this.onSortColumn,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on("filter-end",this.onPathChanged,this),this.parent.on(wn,this.onPasteInit,this),this.parent.on("hide-layout",this.onHideLayout,this),this.parent.on("select-all-init",this.onSelectAllInit,this),this.parent.on("clear-all-init",this.onClearAllInit,this),this.parent.on(Cn,this.onPathColumn,this),this.parent.on(hn,this.onSelectionChanged,this),this.parent.on(tn,this.onBeforeRequest,this),this.parent.on(sn,this.onAfterRequest,this),this.parent.on(In,this.onpasteEnd,this),this.parent.on(On,this.oncutCopyInit,this),this.parent.on(fn,this.onMenuItemData,this),this.parent.on($i,this.onDetailsResizeHandler,this),this.parent.on("splitter-resize",this.onDetailsResize,this),this.parent.on("layout-refresh",this.onLayoutRefresh,this),this.parent.on(Nn,this.onDropPath,this),this.parent.on("update-selection-data",this.onUpdateSelectionData,this)},e.prototype.removeEventListener=function(){this.parent.off(Ki,this.onFinalizeEnd),this.parent.off(en,this.destroy),this.parent.off(pn,this.onLayoutChange),this.parent.off(Zi,this.onPathChanged),this.parent.off(wn,this.onPasteInit),this.parent.off(Gi,this.onCreateEnd),this.parent.off(Xi,this.onRefreshEnd),this.parent.off(rn,this.onSearchFiles),this.parent.off(Rn,this.onMethodCall),this.parent.off(an,this.onActionFailure),this.parent.off(qi,this.onPropertyChanged),this.parent.off(gn,this.onRenameInit),this.parent.off(bn,this.onPathChanged),this.parent.off("filter-end",this.onPathChanged),this.parent.off(on,this.onOpenInit),this.parent.off(Sn,this.onSortColumn),this.parent.off(ln,this.onPathChanged),this.parent.off("hide-layout",this.onHideLayout),this.parent.off("select-all-init",this.onSelectAllInit),this.parent.off("clear-all-init",this.onClearAllInit),this.parent.off(Qi,this.onDeleteInit),this.parent.off(Ji,this.onDeleteEnd),this.parent.off(Cn,this.onPathColumn),this.parent.off(hn,this.onSelectionChanged),this.parent.off(tn,this.onBeforeRequest),this.parent.off(sn,this.onAfterRequest),this.parent.off(In,this.onpasteEnd),this.parent.off(On,this.oncutCopyInit),this.parent.off(xn,this.onDropInit),this.parent.off("selected-data",this.onSelectedData),this.parent.off(un,this.onDetailsInit),this.parent.off(fn,this.onMenuItemData),this.parent.off($i,this.onDetailsResizeHandler),this.parent.off("splitter-resize",this.onDetailsResize),this.parent.off("layout-refresh",this.onLayoutRefresh),this.parent.off(Nn,this.onDropPath),this.parent.off("update-selection-data",this.onUpdateSelectionData)},e.prototype.onActionFailure=function(){this.interaction=!0},e.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=[this.gridObj.getRowInfo(e.target).rowData])},e.prototype.onPasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""!==this.parent.folderPath?this.gridObj.getSelectedRecords():[x(this.parent)])},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.parent.itemData=this.gridObj.getSelectedRecords():this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.dragHelper=function(e){var t=e.sender.target.closest("tr.e-row");if(!t)return null;var i=t.getElementsByClassName("e-fe-text")[0].innerText;t&&!t.querySelector(".e-active")&&this.selectRecords([i]),w(this.parent,t),this.parent.activeElements=[],this.parent.dragData=[],this.parent.dragData=this.gridObj.getSelectedRecords();var n;return 0==this.parent.dragData.length&&t&&(n=this.gridObj.getRowInfo(t)),n&&this.parent.dragData.push(n.rowData),this.parent.dragPath=this.parent.path,this.parent.activeElements=this.gridObj.getSelectedRows(),ee(this.parent),this.parent.virtualDragElement},e.prototype.onDetailsResize=function(){if("Details"===this.parent.view&&!this.parent.isMobile&&!t.isNullOrUndefined(this.gridObj))for(var e=this.gridObj.getHeaderContent().querySelector(".e-headercontent").firstChild.childNodes[0],i=this.gridObj.getContent().querySelector(".e-content .e-table").children[0],n=this.gridObj.getColumns(),s=0;s<n.length;s++)(!this.isNameWidth&&"name"===n[s].field||"filterPath"===n[s].field)&&(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===n[s].field?(e.children[s].setAttribute("style","width: 120px"),i.children[s].setAttribute("style","width: 120px")):(e.children[s].setAttribute("style","width: 180px"),i.children[s].setAttribute("style","width: 180px")):this.element.clientWidth>680&&(e.children[s].setAttribute("style","width: auto"),i.children[s].setAttribute("style","width: auto")):this.element.clientWidth<=500?(e.children[s].setAttribute("style","width: 120px"),i.children[s].setAttribute("style","width: 120px")):this.element.clientWidth>500&&(e.children[s].setAttribute("style","width: auto"),i.children[s].setAttribute("style","width: auto")))},e.prototype.onDetailsResizeHandler=function(){this.onDetailsResize(),"Details"!==this.parent.view||this.parent.isMobile||t.isNullOrUndefined(this.gridObj)||this.adjustHeight()},e.prototype.createDragObj=function(){var e=this;!this.parent.isMobile&&this.gridObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.gridObj.element,{cursorAt:this.parent.dragCursorPosition,distance:5,enableTailMode:!0,dragArea:this.parent.element,dragTarget:"."+vi,drag:re.bind(this,this.parent),dragStart:function(t){ie(e.parent,t,e.dragObj)},dragStop:te.bind(this,this.parent),enableAutoScroll:!0,helper:this.dragHelper.bind(this)})):!this.parent.allowDragAndDrop&&this.dragObj&&this.dragObj.destroy())},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(e.target.closest("tr")){var n=null;n=this.gridObj.getRowInfo(e.target).rowData,this.parent.dropPath=n.isFile?this.parent.path:M(this.parent,n,this.parent.path),this.parent.dropData=n.isFile?i:n}else this.parent.dropPath=this.parent.path,this.parent.dropData=i}},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.gridObj.getSelectedRecords(),this.parent.activeElements=this.gridObj.getSelectedRows())},e.prototype.onpasteEnd=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==J(this.parent,e)||this.onPathChanged(e))},e.prototype.onDropPath=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.getModuleName=function(){return"detailsview"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.gridObj&&(this.unWireEvents(),this.gridObj.destroy()))},e.prototype.updateType=function(e){var i=t.select("."+ji,e);this.parent.isFile=!!t.isNullOrUndefined(i)},e.prototype.onSelection=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction,cancel:!1,target:t.target};this.parent.trigger("fileSelection",i),t.cancel=i.cancel},e.prototype.onSelected=function(e){this.parent.activeModule="detailsview",this.parent.isLayoutChange&&!this.parent.isFiltered||this.selectedRecords(),this.parent.notify(hn,{}),1===this.gridObj.getSelectedRowIndexes().length&&(this.firstItemIndex=this.gridObj.selectedRowIndex),this.gridObj.element.setAttribute("tabindex","-1"),this.triggerSelect("select",e);var i=this.gridObj.getRowByIndex(this.gridObj.selectedRowIndex);if(this.updateType(i),!t.isNullOrUndefined(i)&&!t.isNullOrUndefined(i.querySelector(".e-checkselect"))){if(1!==this.gridObj.getSelectedRowIndexes().length){var n=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2];this.gridObj.getRowByIndex(n).querySelector(".e-checkselect").setAttribute("tabindex","-1")}i.querySelector(".e-rowcell.e-fe-checkbox").removeAttribute("tabindex")}t.isNullOrUndefined(this.gridObj)||t.isNullOrUndefined(this.gridObj.element.querySelector(".e-checkselectall"))||this.gridObj.element.querySelector(".e-checkselectall").setAttribute("tabindex","-1");var s=this.gridObj.getSelectedRowIndexes();if(!this.parent.allowMultiSelection)for(var a=0;a<s.length;a++)s[a]===this.gridObj.selectedRowIndex?this.gridObj.getRowByIndex(s[a]).setAttribute("tabindex","0"):this.gridObj.getRowByIndex(s[a]).removeAttribute("tabindex");var r=s.length;if(r>0){var o=this.gridObj.getRowsObject()[s[r-1]].data;this.parent.currentItemText=t.getValue("name",o)}var l=t.getValue("rowIndexes",e),h=t.getValue("enableSelectMultiTouch",this.gridObj.selectionModule);this.parent.isDevice&&t.isNullOrUndefined(l)&&e.target&&!h&&!e.target.closest(".e-headercell")&&(this.parent.isFile=t.getValue("isFile",e.data),this.parent.isFile||this.openContent(e.data)),this.parent.visitedItem=e.row,!this.parent.allowMultiSelection||t.isNullOrUndefined(i)||t.isNullOrUndefined(i.querySelector(".e-checkselect"))||i.querySelector(".e-checkselect").focus(),this.addFocus(this.gridObj.selectedRowIndex),this.parent.isLayoutChange||(this.isInteracted=!0)},e.prototype.onPathColumn=function(){"Details"!==this.parent.view||t.isNullOrUndefined(this.gridObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||this.removePathColumn(!1)},e.prototype.selectedRecords=function(){this.parent.setProperties({selectedItems:[]},!0);for(var e=this.gridSelectNodes(),t=0;t<e.length;){var i=e[t],n=le(this.parent,i);this.parent.selectedItems.push(n),t++}this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)},e.prototype.onDeSelection=function(e){if(!this.parent.allowMultiSelection&&t.isNullOrUndefined(e.data))this.gridObj.getRowByIndex(e.rowIndex).removeAttribute("tabindex");else if(this.gridObj.getSelectedRowIndexes().length>1){var i=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2];this.gridObj.getRowByIndex(i).querySelector(".e-checkselect").removeAttribute("tabindex")}if(-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),!this.isInteracted)return void(this.isInteracted=!0);this.selectedRecords(),0===this.parent.selectedItems.length&&(t.setValue("enableSelectMultiTouch",!1,this.gridObj.selectionModule),t.removeClass([this.parent.element],"e-fe-m-select")),this.parent.notify(hn,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null},e.prototype.triggerSelect=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction};this.parent.trigger("fileSelect",i),this.interaction=!0},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.gridObj.element,{keyAction:this.keyupHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.gridObj.element,"blur",this.removeFocus,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),t.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus)},e.prototype.wireClickEvent=function(e){if(e){var i=this,n=this.gridObj.getContent();this.clickObj=new t.Touch(n,{tap:function(e){1===e.tapCount&&e.originalEvent.target.classList.contains("e-content")&&i.onClearAllInit()},tapHold:function(e){if(i.parent.isDevice){e.originalEvent.preventDefault(),i.parent.allowMultiSelection&&(t.setValue("enableSelectMultiTouch",i.parent.allowMultiSelection,i.gridObj.selectionModule),t.addClass([i.parent.element],"e-fe-m-select"));var n=e.originalEvent.target;if(n){var s=t.closest(n,"."+vi),a=i.gridObj.getRows().indexOf(s);i.gridObj.selectRow(a)}}}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.removeSelection=function(){t.removeClass([this.parent.element],"e-fe-m-select"),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(hn,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},e.prototype.removeFocus=function(){this.addFocus(null)},e.prototype.getFocusedItemIndex=function(){return t.isNullOrUndefined(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("aria-rowindex"),10)},e.prototype.keydownHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":case"ctrlEnd":case"shiftEnd":case"csEnd":case"ctrlHome":case"shiftHome":case"csHome":case"ctrlDown":case"shiftDown":case"csDown":case"ctrlLeft":case"shiftLeft":case"csLeft":case"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"moveDown":case"moveUp":e.preventDefault()}},e.prototype.keyupHandler=function(e){if(this.isRendered){e.preventDefault();var i,n,s,a=e.action,r=L(this.parent,this.gridObj.dataSource),o=r.length,l=(this.getFocusedItem(),this.getFocusedItemIndex()),h=this.gridObj.selectedRowIndex,d=this.gridObj.getSelectedRowIndexes();switch(a){case"altEnter":Ne(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":b(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"enter":if(-1===this.gridObj.selectedRowIndex)break;if(i=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data){var p=JSON.parse(JSON.stringify(i));this.openContent(p)}break;case"ctrlC":P(this.parent);break;case"ctrlV":this.parent.folderPath="",K(this.parent);break;case"ctrlX":N(this.parent);break;case"ctrlD":this.doDownload();break;case"f2":this.performRename();break;case"ctrlA":!t.isNullOrUndefined(r[0])&&this.parent.allowMultiSelection&&this.gridObj.selectionModule.selectRowsByRange(0,r.length-1);break;case"ctrlHome":case"tab":if(!t.isNullOrUndefined(r[0]))if(this.parent.allowMultiSelection||"ctrlHome"!==e.action){if(-1!==this.gridObj.selectedRowIndex&&"tab"===e.action)return;this.addFocus(0)}else this.gridObj.selectRow(0);break;case"ctrlEnd":t.isNullOrUndefined(r[0])||(this.parent.allowMultiSelection?this.addFocus(o-1):this.gridObj.selectRow(o-1));break;case"shiftHome":case"shiftEnd":case"csHome":case"csEnd":this.parent.allowMultiSelection?t.isNullOrUndefined(r[0])||(t.isNullOrUndefined(h)||-1===h?"csHome"===e.action||"shiftHome"===e.action?this.gridObj.selectRow(0):this.gridObj.selectionModule.selectRowsByRange(0,r.length-1):this.checkRowsKey(r,h,null,e)):this.gridObj.selectRow("shiftHome"===e.action||"csHome"===e.action?0:r.length-1);break;case"space":case"csSpace":case"shiftSpace":case"ctrlSpace":this.spaceSelection(d,l,h,e);break;case"csUp":case"csDown":case"shiftUp":case"shiftDown":this.shiftMoveMethod(r,h,l,d,e);break;case"ctrlUp":case"ctrlDown":this.parent.allowMultiSelection?this.ctrlMoveFunction(r,e,h):this.moveFunction(r,e,h);break;case"home":n=[t.getValue(this.parent.hasId?"id":"name",r[0])],this.parent.setProperties({selectedItems:n},!0),this.selectRecords(n);break;case"moveUp":case"moveDown":this.moveFunction(r,e,h);break;case"end":s=[t.getValue(this.parent.hasId?"id":"name",r[o-1])],this.parent.setProperties({selectedItems:s},!0),this.selectRecords(s)}}},e.prototype.gridSelectNodes=function(){return this.gridObj.getSelectedRecords()},e.prototype.doDownload=function(){if(0!==this.parent.selectedItems.length){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!Oe(e[t]))return void fe(this.parent,e[t],An);He(this.parent,this.parent.path,this.parent.selectedItems)}},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!be(e[t]))return void fe(this.parent,e[t],kn);ze(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),de(this.parent))},e.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];he(this.parent,e)},e.prototype.shiftMoveMethod=function(e,t,i,n,s){this.parent.allowMultiSelection?-1!==t||"csUp"!==s.action&&"csDown"!==s.action?-1===t||i===t||("csUp"===s.action||"csDown"===s.action)&&this.isSelected(n,i)?this.shiftSelectedItem(t,n,e,s):this.shiftSelectFocusItem(t,i,n,s):this.ctrlMoveFunction(e,s,t):this.moveFunction(e,s,t)},e.prototype.moveFunction=function(e,i,n){!t.isNullOrUndefined(this.getFocusedItem())&&this.parent.allowMultiSelection?"moveDown"===i.action?this.gridObj.selectRow(this.getFocusedItemIndex()+1):this.gridObj.selectRow(this.getFocusedItemIndex()-1):t.isNullOrUndefined(n)||-1===n?t.isNullOrUndefined(e[0])||this.gridObj.selectRow(0):"moveDown"===i.action||"ctrlDown"===i.action||"shiftDown"===i.action||"csDown"===i.action?this.gridObj.selectRow(n+(n!==e.length-1?1:0)):this.gridObj.selectRow(n-(0!==n?1:0))},e.prototype.spaceSelection=function(e,i,n,s){if(this.isSelected(e,i)||-1===n||"shiftSpace"!==s.action&&"csSpace"!==s.action)if(t.isNullOrUndefined(this.getFocusedItem())||i===n)if(-1!==n&&"ctrlSpace"===s.action&&this.parent.allowMultiSelection){var a=n;e.pop(),this.gridObj.selectRows(e),this.addFocus(a)}else"shiftSpace"===s.action&&this.gridObj.selectRow(n);else e.push(this.getFocusedItemIndex()),this.gridObj.selectRows(e);else i<n?this.gridObj.selectionModule.selectRowsByRange(i,n):this.gridObj.selectionModule.selectRowsByRange(n,i)},e.prototype.ctrlMoveFunction=function(e,i,n){var s;if(t.isNullOrUndefined(this.getFocusedItem()))t.isNullOrUndefined(n)||-1===n?t.isNullOrUndefined(e[0])||(s=0):s="ctrlDown"===i.action||"csDown"===i.action?n+(n<e.length?1:0):n-(n<1?0:1);else{var a=this.getFocusedItemIndex();s="ctrlDown"===i.action||"csDown"===i.action?a+(a<e.length-1?1:0):a-(a<1?0:1)}this.addFocus(s)},e.prototype.checkRowsKey=function(e,i,n,s){"Uncheck"===this.gridObj.checkAllRows||"Intermediate"===this.gridObj.checkAllRows?"csHome"!==s.action&&"csEnd"!==s.action?(t.isNullOrUndefined(this.startIndex)&&this.firstItemIndex!==i&&(this.firstItemIndex=i),"shiftEnd"===s.action?this.gridObj.selectionModule.selectRowsByRange(this.firstItemIndex,e.length-1):this.gridObj.selectionModule.selectRowsByRange(0,this.firstItemIndex),this.startIndex=i):"csEnd"===s.action?this.gridObj.selectRows(this.InnerItems(t.isNullOrUndefined(i)?0:i,t.isNullOrUndefined(n)?e.length-1:n,s)):t.isNullOrUndefined(i)?this.gridObj.selectRow(0):this.gridObj.selectRows(this.InnerItems(t.isNullOrUndefined(n)?0:n,i,s)):this.gridObj.selectionModule.selectRow("shiftHome"===s.action||"csHome"===s.action?0:e.length-1)},e.prototype.InnerItems=function(e,t,i){var n=this.gridObj.getSelectedRowIndexes();if("csEnd"===i.action)for(s=e+1;s<=t;s++)n.push(s);else for(var s=t-1;e<=s;s--)n.push(s);return n},e.prototype.shiftSelectFocusItem=function(e,i,n,s){var a=i+("shiftDown"===s.action||"csDown"===s.action?1:-1),r=t.isNullOrUndefined(this.startIndex)?e:n[0];r===a?this.gridObj.selectRow(r):r<a?"shiftDown"===s.action||"csDown"===s.action?this.gridObj.selectionModule.selectRowsByRange(r,a):this.gridObj.selectionModule.selectRowsByRange(a,r):"shiftDown"===s.action||"csDown"===s.action?this.gridObj.selectionModule.selectRowsByRange(a,r):this.gridObj.selectionModule.selectRowsByRange(r,a),this.startIndex=this.gridObj.selectedRowIndex},e.prototype.addFocus=function(e){var i=this.getFocusedItem(),n=this.gridObj.getRowByIndex(e);i&&(i.removeAttribute("tabindex"),t.removeClass([i],[mi,"e-focused"])),t.isNullOrUndefined(n)||(this.gridObj.element.setAttribute("tabindex","-1"),n.setAttribute("tabindex","0"),n.focus(),t.addClass([n],[mi,"e-focused"]))},e.prototype.getFocusedItem=function(){return t.select(".e-focused",this.element)},e.prototype.isSelected=function(e,t){for(var i=!1,n=0;n<=e.length-1;n++)if(e[n]===t){i=!0;break}return i},e.prototype.shiftSelectedItem=function(e,i,n,s){-1===e?this.gridObj.selectRow(0):t.isNullOrUndefined(this.startIndex)&&s.shiftKey?(this.startIndex=this.gridObj.selectedRowIndex,this.gridObj.selectRows([e,"shiftDown"===s.action||"csDown"===s.action?e+(e!==n.length-1?1:0):e-(0!==e?1:0)])):"shiftDown"===s.action||"shiftUp"===s.action?("shiftDown"===s.action&&-1===i.indexOf(e+1)?e!==n.length-1&&i.push(e+1):"shiftUp"===s.action&&-1===i.indexOf(e-1)?0!==e&&i.push(e-1):i.pop(),this.gridObj.selectRows(i)):"csDown"===s.action?this.isSelected(i,this.getFocusedItemIndex()+1)?this.addFocus(this.getFocusedItemIndex()+1):(i.push(this.getFocusedItemIndex()+1),this.gridObj.selectRows(i)):this.isSelected(i,this.getFocusedItemIndex()-1)?this.addFocus(this.getFocusedItemIndex()-1):(i.push(this.getFocusedItemIndex()-1),this.gridObj.selectRows(i))},e.prototype.onMethodCall=function(e){if("Details"===this.parent.view)switch(t.getValue("action",e)){case"deleteFiles":this.deleteFiles(t.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(t.getValue("ids",e));break;case"openFile":this.openFile(t.getValue("id",e));break;case"createFolder":this.interaction=!1;break;case"renameFile":this.interaction=!1,this.renameFile(t.getValue("id",e),t.getValue("newName",e));break;case"selectAll":this.interaction=!1,this.onSelectAllInit();break;case"clearSelection":this.interaction=!1,this.onClearAllInit()}},e.prototype.getRecords=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[],s=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),a=this.parent.hasId?"id":"name";if(this.parent.hasId||!s)for(var r=0,o=i.length;r<o;r++)-1!==e.indexOf(t.getValue(a,i[r]))&&n.push(i[r]);else for(var r=0,o=i.length;r<o;r++){var l=t.getValue("filterPath",i[r])+t.getValue("name",i[r]);-1!==e.indexOf(l)&&n.push(i[r])}return n},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="detailsview",t.isNullOrUndefined(e))return void this.performDelete();var i=this.getRecords(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=i[a],s[a]=le(this.parent,n[a]);ce(this.parent,n,s)}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))return void this.doDownload();var i=this.getRecords(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=i[a],s[a]=le(this.parent,n[a]);ue(this.parent,n,s)}},e.prototype.openFile=function(e){if(!t.isNullOrUndefined(e)){var i=this.getRecords([e]);i.length>0&&this.openContent(i[0])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="detailsview",t.isNullOrUndefined(e))return void this.performRename();var n=this.getRecords([e]);n.length>0&&(he(this.parent,n[0]),t.isNullOrUndefined(i)?de(this.parent):be(this.parent.itemData[0])?je(this.parent,this.parent.path,i):fe(this.parent,this.parent.itemData[0],kn))},e}();return zn.Inject(Kn,Wn,Fn,qn,_n,Un),e.AjaxSettings=Dt,e.toolbarItems=jt,e.ToolbarSettings=xt,e.SearchSettings=Et,e.columnArray=kt,e.DetailsViewSettings=Lt,e.fileItems=Ft,e.folderItems=Ut,e.layoutItems=_t,e.ContextMenuSettings=Vt,e.NavigationPaneSettings=zt,e.UploadSettings=Kt,e.Column=Qt,e.TOOLBAR_ID="_toolbar",e.LAYOUT_ID=Jt,e.NAVIGATION_ID="_navigation",e.TREE_ID="_tree",e.GRID_ID=Xt,e.LARGEICON_ID=$t,e.DIALOG_ID=Zt,e.ALT_DIALOG_ID="_alt_dialog",e.IMG_DIALOG_ID=ei,e.EXTN_DIALOG_ID=ti,e.UPLOAD_DIALOG_ID="_upload_dialog",e.RETRY_DIALOG_ID="_retry_dialog",e.CONTEXT_MENU_ID="_contextmenu",e.SORTBY_ID="_sortby",e.VIEW_ID="_view",e.SPLITTER_ID="_splitter",e.CONTENT_ID=ii,e.BREADCRUMBBAR_ID=ni,e.UPLOAD_ID=si,e.RETRY_ID="_retry",e.SEARCH_ID="_search",e.ROOT="e-filemanager",e.CONTROL="e-control",e.CHECK_SELECT="e-fe-cb-select",e.ROOT_POPUP=ai,e.MOBILE="e-fe-mobile",e.MOB_POPUP=ri,e.MULTI_SELECT="e-fe-m-select",e.FILTER=oi,e.LAYOUT="e-layout",e.NAVIGATION="e-navigation",e.LAYOUT_CONTENT="e-layout-content",e.LARGE_ICONS=li,e.TB_ITEM="e-toolbar-item",e.LIST_ITEM=hi,e.LIST_TEXT=di,e.LIST_PARENT="e-list-parent",e.TB_OPTION_TICK=pi,e.TB_OPTION_DOT=ci,e.BLUR=ui,e.ACTIVE=fi,e.HOVER=gi,e.FOCUS=mi,e.FOCUSED="e-focused",e.CHECK=bi,e.FRAME="e-frame",e.CB_WRAP=yi,e.ROW=vi,e.ROWCELL="e-rowcell",e.EMPTY=Oi,e.EMPTY_CONTENT=wi,e.EMPTY_INNER_CONTENT=Ii,e.CLONE=Di,e.DROP_FOLDER=Si,e.DROP_FILE=Ci,e.FOLDER=ji,e.ICON_IMAGE=xi,e.ICON_MUSIC=Pi,e.ICON_VIDEO=Ni,e.LARGE_ICON=Ei,e.LARGE_EMPTY_FOLDER=Ri,e.LARGE_EMPTY_FOLDER_TWO="e-empty-icon.e-fe-folder",e.LARGE_ICON_FOLDER="e-fe-folder",e.SELECTED_ITEMS="e-items",e.TEXT_CONTENT="e-text-content",e.GRID_HEADER=Mi,e.TEMPLATE_CELL="e-templatecell",e.TREE_VIEW=ki,e.MENU_ITEM="e-menu-item",e.MENU_ICON=Li,e.SUBMENU_ICON="e-caret",e.GRID_VIEW=Ti,e.ICON_VIEW="e-list-parent",e.ICON_OPEN="e-icons e-fe-open",e.ICON_UPLOAD="e-icons e-fe-upload",e.ICON_CUT=Ai,e.ICON_COPY="e-icons e-fe-copy",e.ICON_PASTE="e-icons e-fe-paste",e.ICON_DELETE="e-icons e-fe-delete",e.ICON_RENAME="e-icons e-fe-rename",e.ICON_NEWFOLDER="e-icons e-fe-newfolder",e.ICON_DETAILS="e-icons e-fe-details",e.ICON_SHORTBY="e-icons e-fe-sort",e.ICON_REFRESH="e-icons e-fe-refresh",e.ICON_SELECTALL="e-icons e-fe-select",e.ICON_DOWNLOAD="e-icons e-fe-download",e.ICON_OPTIONS="e-icons e-fe-options",e.ICON_GRID=Fi,e.ICON_LARGE=Ui,e.ICON_BREADCRUMB="e-icons e-fe-breadcrumb",e.ICON_CLEAR="e-icons e-fe-clear",e.ICON_DROP_IN="e-icons e-fe-drop-in",e.ICON_DROP_OUT="e-icons e-fe-drop-out",e.ICON_NO_DROP="e-icons e-fe-no-drop",e.ICONS="e-icons",e.DETAILS_LABEL="e-detailslabel",e.ERROR_CONTENT=_i,e.STATUS="e-status",e.BREADCRUMBS="e-address",e.RTL=Vi,e.DISPLAY_NONE=Bi,e.COLLAPSED="e-node-collapsed",e.FULLROW="e-fullrow",e.ICON_COLLAPSIBLE="e-icon-collapsible",e.SPLIT_BAR="e-split-bar",e.HEADER_CHECK="e-headercheck",e.OVERLAY="e-fe-overlay",e.VALUE=Hi,e.isFile=zi,e.modelChanged=qi,e.initialEnd=Wi,e.finalizeEnd=Ki,e.createEnd=Gi,e.filterEnd="filter-end",e.beforeDelete="before-delete",e.pathDrag=Yi,e.deleteInit=Qi,e.deleteEnd=Ji,e.refreshEnd=Xi,e.resizeEnd=$i,e.splitterResize="splitter-resize",e.pathChanged=Zi,e.destroy=en,e.beforeRequest=tn,e.upload="upload",e.skipUpload=nn,e.afterRequest=sn,e.download="download",e.layoutRefresh="layout-refresh",e.actionFailure=an,e.search=rn,e.openInit=on,e.openEnd=ln,e.selectionChanged=hn,e.selectAllInit="select-all-init",e.clearAllInit="clear-all-init",e.clearPathInit=dn,e.layoutChange=pn,e.sortByChange=cn,e.nodeExpand="node-expand",e.detailsInit=un,e.menuItemData=fn,e.renameInit=gn,e.renameEndParent=mn,e.renameEnd=bn,e.showPaste=yn,e.hidePaste=vn,e.selectedData="selected-data",e.cutCopyInit=On,e.pasteInit=wn,e.pasteEnd=In,e.cutEnd=Dn,e.hideLayout="hide-layout",e.updateTreeSelection="update-tree-selection",e.treeSelect="select-node",e.sortColumn=Sn,e.pathColumn=Cn,e.searchTextChange=jn,e.beforeDownload="before-download",e.downloadInit="download-init",e.dropInit=xn,e.dragEnd=Pn,e.dropPath=Nn,e.dragHelper="drag-helper",e.dragging=En,e.updateSelectionData="update-selection-data",e.methodCall=Rn,e.permissionRead=Mn,e.permissionEdit=kn,e.permissionEditContents=Ln,e.permissionCopy="copy",e.permissionUpload=Tn,e.permissionDownload=An,e.FileManager=zn,e.Toolbar=qn,e.BreadCrumbBar=Un,e.NavigationPane=Wn,e.DetailsView=Kn,e.LargeIconsView=Fn,e.createDialog=ze,e.createExtDialog=qe,e.createImageDialog=yt,e.ContextMenu=_n,e}({},ej.base,ej.layouts,ej.popups,ej.data,ej.inputs,ej.buttons,ej.lists,ej.splitbuttons,ej.navigations,ej.grids),this.ejs=ej;
- /*!
- * filename: ej2-inplace-editor.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.inplaceeditor=function(e,t,i,o,n,s,r,a,l){"use strict";function p(e,i,o){if(t.isNullOrUndefined(i)||""===i)return"";var n,s;switch(e){case"Color":var r=i;n=r.length>7?r.slice(0,-2):r;break;case"Date":s=o.format,n=c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"});break;case"DateRange":s=o.format;var a=i;n=c.formatDate(a[0],{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"})+" - "+c.formatDate(a[1],{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"});break;case"DateTime":s=o.format,n=t.isNullOrUndefined(s)||""===s?c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"})+" "+c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"t":"hm"}):c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"d":"yMd"});break;case"Time":s=o.format,n=c.formatDate(i,{format:s,type:e,skeleton:t.isBlazor()?"t":"hm"});break;case"Numeric":s=t.isNullOrUndefined(o.format)?"n2":o.format;var l=t.isNullOrUndefined(i)?null:"number"==typeof i?i:c.parseNumber(i);n=c.formatNumber(l,{format:s});break;default:n=i.toString()}return n}function d(e,i){if(t.isNullOrUndefined(i)||""===i)return i;if("Date"!==e&&"Time"!==e&&"DateTime"!==e||"string"!=typeof i){if("DateRange"===e)if("object"==typeof i&&"string"==typeof i[0])i=[new Date(i[0]),new Date(i[1])];else if("string"==typeof i){var o=i.split("-");i=[new Date(o[0]),new Date(o[1])]}}else i=new Date(i);return i}function h(e){for(var t=[],i=e.length-1;i>=0;i--)t.unshift(["&#",e[i].charCodeAt(0),";"].join(""));return t.join("")}var c=new t.Internationalization,u=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),m=function(e,t,i,o){var n,s=arguments.length,r=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return u(i,e),m([t.Property("")],i.prototype,"title",void 0),m([t.Property(null)],i.prototype,"model",void 0),i}(t.ChildProperty),f={AutoComplete:"auto-complete",Color:"color-picker",ComboBox:"combo-box",DateRange:"date-range-picker",MultiSelect:"multi-select",RTE:"rte",Slider:"slider",Time:"time-picker"},v={Click:{editAreaClick:"Click to edit"},DblClick:{editAreaDoubleClick:"Double click to edit"},EditIconClick:{editAreaClick:"Click to edit"}},b="e-inplaceeditor",E="e-inplaceeditor-tip",O="e-editable-value-wrapper",g="e-editable-value",C="e-editable-title",w="e-editable-inline",j="e-editable-popup",k="e-editable-form",D="e-editable-component",P="e-editable-action-buttons",M="e-editable-elements",H="e-editable-open",T="e-hide",S="e-rtl",B="e-loading",V=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),N=function(e,t,i,o){var n,s=arguments.length,r=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(s<3?n(r):s>3?n(t,i,r):n(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e){function l(t,i){var o=e.call(this,t,i)||this;return o.initRender=!0,o.isTemplate=!1,o.isVue=!1,o.isExtModule=!1,o.submitBtn=void 0,o.cancelBtn=void 0,o.isClearTarget=!1,o.btnElements=void 0,o.dataManager=void 0,o.divComponents=["RTE","Slider"],o.clearComponents=["AutoComplete","Mask","Text"],o.dateType=["Date","DateTime","Time"],o.inputDataEle=["Date","DateTime","DateRange","Time","Numeric"],o.dropDownEle=["AutoComplete","ComboBox","DropDownList","MultiSelect"],o.moduleList=["AutoComplete","Color","ComboBox","DateRange","MultiSelect","RTE","Slider","Time"],o.needsID=!0,o}return V(l,e),l.prototype.preRender=function(){t.isNullOrUndefined(this.model)&&this.setProperties({model:{}},!0),this.titleEle=this.createElement("div",{className:C}),!t.isNullOrUndefined(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.afterOpenEvent=this.popupSettings.model.afterOpen)},l.prototype.render=function(){t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&this.element.setAttribute("tabindex","0"),this.checkIsTemplate(),this.disable(this.disabled),this.updateAdaptor(),this.appendValueElement(),this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(p(this.type,this.value,this.model))):this.renderInitialValue(),this.wireEvents(),this.setRtl(this.enableRtl),this.enableEditor(this.enableEditMode,!0),this.setClass("add",this.cssClass),this.renderComplete()},l.prototype.setClass=function(e,i){if(!this.isEmpty(i))for(var o=i.split(" "),n=0;n<o.length;n++)""!==o[n].trim()&&("add"===e?t.addClass([this.element],[o[n]]):t.removeClass([this.element],[o[n]]))},l.prototype.appendValueElement=function(){this.valueWrap=this.createElement("div",{id:this.element.id+"_wrap",className:O}),t.isBlazor()||(this.element.innerHTML=""),this.valueEle=this.createElement("span",{className:g}),this.editIcon=this.createElement("span",{className:"e-editable-overlay-icon e-icons",attrs:{title:this.getLocale({editIcon:"Click to edit"},"editIcon")}}),this.valueWrap.appendChild(this.valueEle),this.valueWrap.appendChild(this.editIcon),this.element.appendChild(this.valueWrap)},l.prototype.renderInitialValue=function(){!(["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)>-1)||t.isNullOrUndefined(this.value)||this.isEmpty(this.value.toString())||t.isNullOrUndefined(this.model.fields)||t.isNullOrUndefined(this.model.dataSource)?this.renderValue(this.checkValue(p(this.type,this.value,this.model))):(this.renderValue(this.getLocale({loadingText:"Loading..."},"loadingText")),this.valueWrap.classList.add(B),s.createSpinner({target:this.valueWrap,width:10}),s.showSpinner(this.valueWrap),this.getInitFieldMapValue())},l.prototype.getInitFieldMapValue=function(){var e=this,o=this.model,n=o.fields.text,s=o.fields.value,r=t.isNullOrUndefined(o.query)?new i.Query:o.query;o.dataSource instanceof i.DataManager?o.dataSource.executeQuery(this.getInitQuery(o,r)).then(function(t){e.updateInitValue(n,s,t.result)}):this.updateInitValue(n,s,new i.DataManager(o.dataSource).executeLocal(this.getInitQuery(o,r)))},l.prototype.getInitQuery=function(e,t){var o,n=e.fields.value,s=this.value;if("MultiSelect"!==this.type||"object"!=typeof this.value)o=new i.Predicate(n,"equal",this.value);else for(var r=0,a=0,l=s;a<l.length;a++){var p=l[a];o=0===r?o=new i.Predicate(n,"equal",p):o.or(n,"equal",p),r++}return t.where(o)},l.prototype.updateInitValue=function(e,i,o){if(!(o.length<=0)){if(1===o.length)this.valueEle.innerHTML=this.checkValue(t.getValue(t.isNullOrUndefined(e)?i:e,o[0]));else{for(var n=[],r=0,a=o;r<a.length;r++){var l=a[r];n.push(t.getValue(t.isNullOrUndefined(e)?i:e,l))}this.valueEle.innerHTML=this.checkValue(n.toString())}s.hideSpinner(this.valueWrap),this.valueWrap.classList.remove(B)}},l.prototype.renderValue=function(e){this.enableHtmlSanitizer&&"RTE"!==this.type&&"MultiSelect"!==this.type?this.valueEle.innerText=e:this.valueEle.innerHTML=this.enableHtmlParse?e:h(e),"Color"===this.type&&t.setStyleAttribute(this.valueEle,{color:e}),"Inline"===this.mode&&this.isEditorOpen()&&t.removeClass([this.valueWrap],[T])},l.prototype.isEditorOpen=function(){return!(this.isVue&&(this.enableEditMode||!(t.isNullOrUndefined(this.valueWrap)||this.valueWrap.classList.contains(T)||this.valueWrap.classList.contains("e-tooltip"))))},l.prototype.renderEditor=function(){if(this.prevValue=this.value,this.beginEditArgs={mode:this.mode,cancelFocus:!1,cancel:!1},this.trigger("beginEdit",this.beginEditArgs),!this.beginEditArgs.cancel){var e=void 0,i=t.select("."+O,this.element);if("EditIconClick"!==this.editableOn&&i.parentElement.removeAttribute("title"),!this.valueWrap.classList.contains(H)){if("Inline"===this.mode)t.addClass([this.valueWrap],[T]),this.inlineWrapper=this.createElement("div",{className:w}),this.element.appendChild(this.inlineWrapper),["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)>-1?this.checkRemoteData(this.model):this.renderAndOpen();else{!t.isNullOrUndefined(this.popupSettings.model)&&this.popupSettings.model.afterOpen&&(this.popupSettings.model.afterOpen=this.afterOpenHandler.bind(this));var o=this.createElement("div",{className:j});this.isEmpty(this.popupSettings.title)||(this.titleEle.innerHTML=this.popupSettings.title,o.appendChild(this.titleEle)),e={content:o,opensOn:"Custom",enableRtl:this.enableRtl,cssClass:E,afterOpen:this.afterOpenHandler.bind(this)},o.appendChild(this.renderControl(document.body)),t.extend(e,this.popupSettings.model,e,!0),this.tipObj=new s.Tooltip(e),this.tipObj.appendTo(i),this.tipObj.open(i)}"Ignore"!==this.actionOnBlur&&this.wireDocEvent(),t.addClass([this.valueWrap],[H]),this.setProperties({enableEditMode:!0},!0),this.isReact&&this.renderReactTemplates()}}},l.prototype.renderAndOpen=function(){this.renderControl(this.inlineWrapper),this.afterOpenHandler(null)},l.prototype.checkRemoteData=function(e){var o=this;e.dataSource instanceof i.DataManager?(e.dataBound=function(){o.afterOpenHandler(null)},this.renderControl(this.inlineWrapper),(t.isNullOrUndefined(e.value)&&t.isNullOrUndefined(this.value)||e.value===this.value&&!t.isNullOrUndefined(e.value)&&0===e.value.length)&&this.showDropDownPopup()):this.renderAndOpen()},l.prototype.showDropDownPopup=function(){"DropDownList"===this.type?(this.model.allowFiltering||this.componentObj.focusIn(),this.componentObj.showPopup()):this.isExtModule&&this.notify("MultiSelect"===this.type?"set-focus":"show-popup",{})},l.prototype.setAttribute=function(e,t){var i=this.name&&0!==this.name.length?this.name:this.element.id;t.forEach(function(t){e.setAttribute(t,"id"===t?i+"_editor":i)})},l.prototype.renderControl=function(e){var t;this.containerEle=this.createElement("div",{className:"e-editable-wrapper"}),this.loader=this.createElement("div",{className:"e-editable-loading"}),this.formEle=this.createElement("form",{className:k});var i=this.createElement("div",{className:"e-component-group"}),o=this.createElement("div",{className:D});return e.appendChild(this.containerEle),this.loadSpinner(),this.containerEle.appendChild(this.formEle),this.formEle.appendChild(i),this.isTemplate?this.appendTemplate(o,this.template):(Array.prototype.indexOf.call(this.divComponents,this.type)>-1?(t=this.createElement("div"),this.setAttribute(t,["id"])):(t=this.createElement("input"),this.setAttribute(t,["id","name"])),this.componentRoot=t,o.appendChild(t),o.appendChild(this.loader)),i.appendChild(o),i.appendChild(this.createElement("div",{className:"e-editable-error"})),this.appendButtons(this.formEle),this.isTemplate||this.renderComponent(t),this.removeSpinner(),this.submitOnEnter&&this.wireEditorKeyDownEvent(this.containerEle),this.containerEle},l.prototype.appendButtons=function(e){this.showButtons&&e&&(this.btnElements=this.renderButtons(),e.appendChild(this.btnElements),this.wireBtnEvents())},l.prototype.renderButtons=function(){var e=this.createElement("div",{className:P}),i=t.isNullOrUndefined(this.saveButton.content)||0===this.saveButton.content.length?"":" e-primary";return this.submitBtn=this.createButtons({constant:"save",type:"submit",container:e,title:{save:"Save"},model:this.saveButton,className:"e-btn-save"+i}),this.cancelBtn=this.createButtons({type:"button",constant:"cancel",title:{cancel:"Cancel"},container:e,model:this.cancelButton,className:"e-btn-cancel"}),e},l.prototype.createButtons=function(e){var t=void 0;if(Object.keys(e.model).length>0){var i=this.createElement("button",{className:e.className,attrs:{type:e.type,title:this.getLocale(e.title,e.constant)}});e.container.appendChild(i),t=new o.Button(e.model,i)}return t},l.prototype.renderComponent=function(e){this.isExtModule=Array.prototype.indexOf.call(this.moduleList,this.type)>-1;var i;if(i=t.isNullOrUndefined(this.model.cssClass)?M:this.model.cssClass.indexOf(M)<0?""===this.model.cssClass?M:this.model.cssClass+" "+M:this.model.cssClass,t.extend(this.model,this.model,{cssClass:i,enableRtl:this.enableRtl,locale:this.locale,change:this.changeHandler.bind(this)}),t.isNullOrUndefined(this.value)||this.updateModelValue(),this.isExtModule)this.notify("render",{module:f[this.type],target:e,type:this.type});else{switch(t.isNullOrUndefined(this.model.showClearButton)&&!t.isBlazor()&&(this.model.showClearButton=!0),this.type){case"Date":this.componentObj=new n.DatePicker(this.model);break;case"DateTime":this.componentObj=new n.DateTimePicker(this.model);break;case"DropDownList":this.componentObj=new a.DropDownList(this.model);break;case"Mask":this.componentObj=new r.MaskedTextBox(this.model);break;case"Numeric":this.model.value&&(new RegExp("[eE][-+]?([0-9]+)").test(this.model.value)?this.model.value=this.model.value:this.model.value=this.model.value.toString().replace(/[`~!@#$%^&*()_|\=?;:'",<>\{\}\[\]\\\/]/gi,"")),this.componentObj=new r.NumericTextBox(this.model);break;case"Text":this.componentObj=new r.TextBox(this.model)}this.componentObj.appendTo(e)}},l.prototype.updateAdaptor=function(){switch(this.adaptor){case"UrlAdaptor":this.dataAdaptor=new i.UrlAdaptor;break;case"WebApiAdaptor":this.dataAdaptor=new i.WebApiAdaptor;break;case"ODataV4Adaptor":this.dataAdaptor=new i.ODataV4Adaptor}},l.prototype.loadSpinner=function(e){t.addClass([this.loader],["e-show"]),"validate"!==e||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type?this.spinObj={target:this.loader,width:t.Browser.isDevice?"16px":"14px"}:(t.addClass([this.loader],["e-rte-spin-wrap"]),t.addClass([this.getEditElement()],["e-control-overlay"]),this.spinObj={target:this.loader}),this.formEle&&t.addClass([this.formEle],[B]),this.btnElements&&t.addClass([this.btnElements],[T]),t.setStyleAttribute(this.loader,{width:"100%"}),s.createSpinner(this.spinObj),s.showSpinner(this.spinObj.target)},l.prototype.removeSpinner=function(e){this.loader.removeAttribute("style"),s.hideSpinner(this.spinObj.target),t.detach(this.spinObj.target.firstChild),"submit"!==e||"RTE"!==this.type&&"Color"!==this.type&&"Slider"!==this.type||(t.removeClass([this.loader],["e-rte-spin-wrap"]),t.removeClass([this.getEditElement()],["e-control-overlay"])),this.formEle&&t.removeClass([this.formEle],[B]),this.btnElements&&t.removeClass([this.btnElements],[T]),t.removeClass([this.loader],["e-show"])},l.prototype.getEditElement=function(){return t.select("."+M,this.formEle)},l.prototype.getLocale=function(e,i){return new t.L10n("inplace-editor",e,this.locale).getConstant(i)},l.prototype.checkValue=function(e){return this.isEmpty(e)?this.emptyText:e},l.prototype.extendModelValue=function(e){var i=this.model;t.extend(i,{value:e}),this.setProperties({model:i},!0)},l.prototype.updateValue=function(){var e=this.value;this.enableHtmlSanitizer&&"string"==typeof this.value&&(e=this.sanitizeHelper(this.value)),t.isNullOrUndefined(this.value)||(this.setProperties({value:d(this.type,e)},!0),this.extendModelValue(d(this.type,e)))},l.prototype.updateModelValue=function(){"MultiSelect"!==this.type||this.isEmpty(this.value)?this.model.value=this.value:this.model.value=this.value.slice()},l.prototype.setValue=function(){this.isExtModule?this.notify("update",{type:this.type}):this.componentObj&&("Numeric"===this.type&&null===this.componentObj.value&&this.componentObj.setProperties({value:null},!0),this.setProperties({value:this.componentObj.value},!0),this.extendModelValue(this.componentObj.value))},l.prototype.getDropDownsValue=function(e){var i;return Array.prototype.indexOf.call(this.dropDownEle,this.type)>-1&&"MultiSelect"!==this.type?i=e?t.select(".e-"+this.type.toLocaleLowerCase(),this.containerEle).value:this.value.toString():"MultiSelect"===this.type&&(this.notify("access-value",{type:this.type}),i=e?this.printValue:this.value.join()),i},l.prototype.getSendValue=function(){return this.isEmpty(this.value)?"":Array.prototype.indexOf.call(this.dropDownEle,this.type)>-1?this.getDropDownsValue(!1):Array.prototype.indexOf.call(this.dateType,this.type)>-1?this.value.toISOString():"DateRange"===this.type?this.value[0].toISOString()+" - "+this.value[1].toISOString():this.value.toString()},l.prototype.getRenderValue=function(){return"Mask"===this.type&&0!==this.componentObj.value.length?this.componentObj.getMaskedValue():Array.prototype.indexOf.call(this.inputDataEle,this.type)>-1?this.componentRoot.value:Array.prototype.indexOf.call(this.dropDownEle,this.type)>-1?this.getDropDownsValue(!0):p(this.type,this.value,this.model)},l.prototype.setRtl=function(e){e?t.addClass([this.element],[S]):t.removeClass([this.element],[S])},l.prototype.setFocus=function(){this.isTemplate||(this.isExtModule?this.notify("set-focus",{}):this.componentObj.element.focus())},l.prototype.removeEditor=function(e){t.isBlazor()&&!this.isStringTemplate&&t.resetBlazorTemplate(this.element.id+"template","Template");if(this.tipObj&&this.formEle&&t.closest(this.formEle,"."+E).classList.add(T),this.unWireDocEvent(),this.destroyComponents(),this.formEle=void 0,t.isNullOrUndefined(t.select("."+w,this.element))?this.tipObj&&("MultiSelect"===this.type&&(t.EventHandler.remove(this.containerEle,"mousedown",this.popMouseDown),t.EventHandler.remove(this.containerEle,"click",this.popClickHandler)),this.tipObj.close(),this.tipObj.destroy(),this.tipObj=void 0):(t.detach(this.inlineWrapper),this.inlineWrapper=void 0),this.containerEle=void 0,t.removeClass([this.valueWrap],[H,T]),e||this.setProperties({enableEditMode:!1},!0),"EditIconClick"!==this.editableOn){var i="DblClick"===this.editableOn?"editAreaDoubleClick":"editAreaClick";t.isNullOrUndefined(this.valueWrap.parentElement)||this.valueWrap.parentElement.setAttribute("title",this.getLocale(v[this.editableOn],i))}this.isReact&&this.clearTemplate()},l.prototype.destroyComponents=function(){this.showButtons&&this.destroyButtons(),this.isExtModule?this.notify("destroy-modules",{}):(this.templateEle&&(document.body.appendChild(this.templateEle),this.templateEle.style.display="none",this.templateEle=void 0),t.isNullOrUndefined(this.componentObj)||(this.componentObj.destroy(),this.componentObj=void 0)),this.formValidate&&(this.formValidate=void 0),this.submitOnEnter&&this.containerEle&&this.unWireEditorKeyDownEvent(this.containerEle)},l.prototype.destroyButtons=function(){t.isNullOrUndefined(this.submitBtn)||(t.EventHandler.remove(this.submitBtn.element,"mousedown",this.submitHandler),t.EventHandler.remove(this.submitBtn.element,"click",this.submitPrevent),t.EventHandler.remove(this.submitBtn.element,"keydown",this.btnKeyDownHandler),this.submitBtn.destroy(),this.submitBtn=void 0),t.isNullOrUndefined(this.cancelBtn)||(t.EventHandler.remove(this.cancelBtn.element,"mousedown",this.cancelBtnClick),t.EventHandler.remove(this.cancelBtn.element,"keydown",this.btnKeyDownHandler),this.cancelBtn.destroy(),this.cancelBtn=void 0),this.btnElements=void 0},l.prototype.getQuery=function(e){var t=new i.Query;return Object.keys(e).forEach(function(i){t.addParams(i,e[i])}),t},l.prototype.sendValue=function(){var e=this,t={data:{name:this.name,primaryKey:this.primaryKey,value:this.getSendValue()}};this.trigger("actionBegin",t,function(t){if(t.cancel)e.removeSpinner("submit"),"Popup"===e.mode&&e.updateArrow();else{if(e.isEmpty(e.url)||e.isEmpty(e.primaryKey)||!e.initRender&&(e.initRender||e.prevValue===e.value)){var o={data:{},value:t.data.value};e.triggerSuccess(o)}else e.dataManager=new i.DataManager({url:e.url,adaptor:e.dataAdaptor}),"UrlAdaptor"===e.adaptor?e.dataManager.executeQuery(e.getQuery(t.data),e.successHandler.bind(e),e.failureHandler.bind(e)):e.dataManager.insert(t.data).then(function(t){return e.successHandler(t)}).catch(function(t){return e.failureHandler(t)});e.dataManager=void 0}})},l.prototype.isEmpty=function(e){return!(!t.isNullOrUndefined(e)&&0!==e.length)},l.prototype.checkIsTemplate=function(){this.isTemplate=!t.isNullOrUndefined(this.template)&&""!==this.template},l.prototype.templateCompile=function(e,i){var o;"string"==typeof i&&(i=i.trim());var n=t.compile(i);if(!t.isNullOrUndefined(n)){var s=!(t.isBlazor()&&!this.isStringTemplate&&0===i.indexOf("<div>Blazor"))||this.isStringTemplate;o=n({},this,"template",this.element.id+"template",s)}!t.isNullOrUndefined(n)&&o.length>0&&([].slice.call(o).forEach(function(t){e.appendChild(t)}),t.isBlazor()&&!this.isStringTemplate&&0===i.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+"template","Template",this))},l.prototype.sanitizeHelper=function(e){if(this.enableHtmlSanitizer){var i=t.SanitizeHtmlHelper.beforeSanitize(),o={cancel:!1,helper:null};t.extend(i,i,o),this.trigger("beforeSanitizeHtml",i,function(o){i.cancel&&!t.isNullOrUndefined(i.helper)?e=i.helper(e):i.cancel||(e=t.SanitizeHtmlHelper.serializeValue(i,e))})}return e},l.prototype.appendTemplate=function(e,i){i="string"==typeof i?this.sanitizeHelper(i):i,this.setProperties({template:i},!0),"string"==typeof i||t.isNullOrUndefined(i.innerHTML)?("."===i[0]||"#"===i[0])&&document.querySelectorAll(i).length?(this.templateEle=document.querySelector(i),e.appendChild(this.templateEle),this.templateEle.style.display=""):this.templateCompile(e,i):(this.templateEle=i,e.appendChild(this.templateEle))},l.prototype.disable=function(e){e?t.addClass([this.element],["e-disable"]):t.removeClass([this.element],["e-disable"])},l.prototype.enableEditor=function(e,t){t&&!e||(e?this.renderEditor():this.cancelHandler("cancel"))},l.prototype.checkValidation=function(e,i){var o,n=this;if(this.validationRules){var s=Object.keys(this.validationRules),a=Object.keys(this.validationRules[s[0]]).length;a="validateHidden"in this.validationRules[s[0]]?a-1:a;var l=0;this.formValidate=new r.FormValidator(this.formEle,{rules:this.validationRules,validationComplete:function(s){l+=1,o={errorMessage:s.message,data:{name:n.name,primaryKey:n.primaryKey,value:n.checkValue(n.getSendValue())}},n.trigger("validating",o,function(o){"failure"===s.status?(s.errorElement.innerText=o.errorMessage,n.toggleErrorClass(!0)):n.toggleErrorClass(!1),t.isNullOrUndefined(e)||!e||a!==l&&"failure"!==s.status||(e=!1,n.afterValidation(i),l=0)})},customPlacement:function(e,i){n.formEle&&t.select(".e-editable-error",n.formEle).appendChild(i)}}),l=0,this.formValidate.validate()}else""!==this.template?(o={errorMessage:"",data:{name:this.name,primaryKey:this.primaryKey,value:this.checkValue(this.getSendValue())}},this.trigger("validating",o,function(e){e.errorMessage?(t.select(".e-editable-error",n.formEle).innerHTML=e.errorMessage,n.toggleErrorClass(!0)):n.toggleErrorClass(!1),n.afterValidation(i)})):this.afterValidation(i)},l.prototype.afterValidation=function(e){!this.formEle.classList.contains("e-error")&&e&&(this.loadSpinner("validate"),"Popup"===this.mode&&this.updateArrow(),this.sendValue())},l.prototype.toggleErrorClass=function(e){if(!t.isNullOrUndefined(this.formEle)){var i=t.select(".e-input-group",this.formEle);!function(e,i,o){[].slice.call(e).forEach(function(e){e&&("add"===o?t.addClass([e],[i]):t.removeClass([e],[i]))})}([this.formEle,i],"e-error",e?"add":"remove")}},l.prototype.updateArrow=function(){var e=this.tipObj.tipPointerPosition;this.tipObj.tipPointerPosition="Middle"===e?"Auto":"Middle",this.tipObj.tipPointerPosition=e,this.tipObj.dataBind()},l.prototype.triggerSuccess=function(e){var i=this,o=e.value;this.trigger("actionSuccess",e,function(e){i.removeSpinner("submit"),e.cancel||i.renderValue(i.checkValue(e.value!==o?e.value:i.getRenderValue())),e.cancel&&"Inline"===i.mode&&t.removeClass([i.valueWrap],[T]),i.removeEditor()})},l.prototype.triggerEndEdit=function(e){var t=this,i={cancel:!1,mode:this.mode,action:e};this.trigger("endEdit",i,function(e){e.cancel||t.removeEditor()})},l.prototype.wireEvents=function(){this.wireEditEvent(this.editableOn),t.EventHandler.add(this.editIcon,"click",this.clickHandler,this),t.EventHandler.add(this.element,"keydown",this.valueKeyDownHandler,this),t.EventHandler.add(document,"scroll",this.scrollResizeHandler,this),window.addEventListener("resize",this.scrollResizeHandler.bind(this)),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this)},l.prototype.wireDocEvent=function(){t.EventHandler.add(document,"mousedown",this.docClickHandler,this)},l.prototype.wireEditEvent=function(e){if("EditIconClick"!==e){var i="Click"===e?"editAreaClick":"editAreaDoubleClick";this.element.setAttribute("title",this.getLocale(v[e],i)),t.Browser.isDevice&&t.Browser.isIos&&"DblClick"===e?this.touchModule=new t.Touch(this.valueWrap,{tap:this.doubleTapHandler.bind(this)}):t.EventHandler.add(this.valueWrap,e.toLowerCase(),this.clickHandler,this)}},l.prototype.wireEditorKeyDownEvent=function(e){t.EventHandler.add(e,"keydown",this.enterKeyDownHandler,this)},l.prototype.wireBtnEvents=function(){t.isNullOrUndefined(this.submitBtn)||(t.EventHandler.add(this.submitBtn.element,"mousedown",this.submitHandler,this),t.EventHandler.add(this.submitBtn.element,"click",this.submitPrevent,this),t.EventHandler.add(this.submitBtn.element,"keydown",this.btnKeyDownHandler,this)),t.isNullOrUndefined(this.cancelBtn)||(t.EventHandler.add(this.cancelBtn.element,"mousedown",this.cancelBtnClick,this),t.EventHandler.add(this.cancelBtn.element,"keydown",this.btnKeyDownHandler,this))},l.prototype.cancelBtnClick=function(e){this.cancelHandler("cancel"),this.trigger("cancelClick",e)},l.prototype.unWireEvents=function(){this.unWireEditEvent(this.editableOn),t.EventHandler.remove(this.editIcon,"click",this.clickHandler),t.EventHandler.remove(document,"scroll",this.scrollResizeHandler),window.removeEventListener("resize",this.scrollResizeHandler.bind(this)),t.EventHandler.remove(this.element,"keydown",this.valueKeyDownHandler),Array.prototype.indexOf.call(this.clearComponents,this.type)>-1&&t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler)},l.prototype.unWireDocEvent=function(){t.EventHandler.remove(document,"mousedown",this.docClickHandler)},l.prototype.unWireEditEvent=function(e){"EditIconClick"!==e&&(this.element.removeAttribute("title"),t.Browser.isDevice&&t.Browser.isIos&&"DblClick"===e?(this.touchModule.destroy(),this.touchModule=void 0):t.EventHandler.remove(this.valueWrap,e.toLowerCase(),this.clickHandler))},l.prototype.unWireEditorKeyDownEvent=function(e){t.EventHandler.remove(e,"keydown",this.enterKeyDownHandler)},l.prototype.submitPrevent=function(e){e.preventDefault()},l.prototype.btnKeyDownHandler=function(e){var i=e.target;(13===e.keyCode&&13===e.which||32===e.keyCode&&32===e.which)&&(i.classList.contains("e-btn-save")?this.save():i.classList.contains("e-btn-cancel")&&this.cancelHandler("cancel")),9!==e.keyCode||!1!==e.shiftKey||!t.isNullOrUndefined(e.target.nextElementSibling)&&"BUTTON"===e.target.nextElementSibling.tagName||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel"))},l.prototype.afterOpenHandler=function(e){"Popup"===this.mode&&"MultiSelect"===this.type&&(t.EventHandler.add(this.containerEle,"mousedown",this.popMouseDown,this),t.EventHandler.add(this.containerEle,"click",this.popClickHandler,this)),"Popup"!==this.mode||this.isEmpty(this.titleEle.innerHTML)||e.element.classList.add("e-editable-tip-title"),"RTE"===this.type?(this.rteModule.refresh(),this.setAttribute(t.select(".e-richtexteditor textarea",this.containerEle),["name"])):"Slider"===this.type&&(this.sliderModule.refresh(),this.setAttribute(t.select(".e-slider-input",this.containerEle),["name"])),this.beginEditArgs.cancelFocus||("Inline"===this.mode&&["AutoComplete","ComboBox","DropDownList","MultiSelect"].indexOf(this.type)>-1&&this.model.dataSource instanceof i.DataManager?this.showDropDownPopup():this.setFocus()),this.afterOpenEvent&&(this.tipObj.setProperties({afterOpen:this.afterOpenEvent},!0),this.tipObj.trigger("afterOpen",e))},l.prototype.popMouseDown=function(e){var t=e.target.classList;t.contains("e-chips-close")&&!t.contains("e-close-hooker")&&this.updateArrow()},l.prototype.doubleTapHandler=function(e){e.tapCount>1&&this.clickHandler(e.originalEvent)},l.prototype.clickHandler=function(e){"EditIconClick"!==this.editableOn&&e.stopPropagation(),this.renderEditor()},l.prototype.submitHandler=function(e){e.preventDefault(),this.save(),this.trigger("submitClick",e)},l.prototype.cancelHandler=function(e){this.triggerEndEdit(e)},l.prototype.popClickHandler=function(e){var i=t.select("."+O,this.element);e.target.classList.contains("e-chips-close")&&this.tipObj.refresh(i)},l.prototype.successHandler=function(e){this.initRender=!1;var t={data:e,value:this.getSendValue()};this.triggerSuccess(t)},l.prototype.failureHandler=function(e){var t=this,i={data:e,value:this.getSendValue()};this.trigger("actionFailure",i,function(e){t.removeSpinner("submit"),"Popup"===t.mode&&t.updateArrow()})},l.prototype.enterKeyDownHandler=function(e){t.closest(e.target,"."+D+" .e-richtexteditor")||(13===e.keyCode&&13===e.which&&t.closest(e.target,"."+D)?this.save():27===e.keyCode&&27===e.which&&this.cancelHandler("cancel"))},l.prototype.valueKeyDownHandler=function(e){9===e.keyCode&&!0===e.shiftKey&&"BUTTON"!==e.target.tagName&&("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel")),13!==e.keyCode||13!==e.which||!e.target.classList.contains(b)||this.valueWrap.classList.contains(H)||this.element.classList.contains("e-disable")||(e.preventDefault(),this.renderEditor())},l.prototype.mouseDownHandler=function(e){e.target.classList.contains("e-clear-icon")&&(this.isClearTarget=!0)},l.prototype.scrollResizeHandler=function(){"Popup"===this.mode&&this.tipObj&&!t.Browser.isDevice&&this.triggerEndEdit("cancel")},l.prototype.docClickHandler=function(e){var i=e.target;if(this.isClearTarget)return void(this.isClearTarget=!1);var o=t.closest(i,"."+b),n=t.closest(i,"."+E),s=t.closest(i,"."+M),r=t.closest(i,".e-rte-elements");!t.isNullOrUndefined(o)&&o.isEqualNode(this.element)||!t.isNullOrUndefined(n)&&this.tipObj&&n.id.indexOf(this.valueWrap.id)>-1||!t.isNullOrUndefined(s)||!t.isNullOrUndefined(r)||i.classList.contains("e-chips-close")||("Submit"===this.actionOnBlur?this.save():"Cancel"===this.actionOnBlur&&this.cancelHandler("cancel"))},l.prototype.changeHandler=function(e){var t={previousValue:void 0===this.compPrevValue?this.value:this.compPrevValue,value:e.value};"AutoComplete"!==this.type&&"ComboBox"!==this.type&&"DropDownList"!==this.type||(t.itemData=e.itemData,t.previousItemData=e.previousItemData),this.compPrevValue=t.value,this.trigger("change",t)},l.prototype.validate=function(){this.checkValidation(!0,!1)},l.prototype.save=function(){var e=this;if(this.formEle){this.element.focus(),this.editEle=t.select("."+D,this.formEle);t.select(".e-error",this.editEle),this.isTemplate||this.setValue();var i={cancel:!1,mode:this.mode,action:"submit"};this.trigger("endEdit",i,function(t){t.cancel||e.checkValidation(!0,!0)})}},l.prototype.destroy=function(){var i=this;for(this.removeEditor(t.isBlazor()),this.isExtModule&&this.notify("destroy",{}),this.unWireEvents(),["e-disable",S].forEach(function(e){t.removeClass([i.element],[e])});this.element.firstElementChild;)this.element.removeChild(this.element.firstElementChild);t.isBlazor()&&this.isServerRendered||e.prototype.destroy.call(this),this.isReact&&this.clearTemplate()},l.prototype.getPersistData=function(){return this.addOnPersist(["value"])},l.prototype.requiredModules=function(){var e=[];return e.push({member:f[this.type],args:[this]}),e},l.prototype.getModuleName=function(){return"inplaceeditor"},l.prototype.onPropertyChanged=function(e,t){if(this.isEditorOpen()){var i="enableEditMode"in e;i&&t.enableEditMode&&!e.enableEditMode||!i&&this.enableEditMode?this.triggerEndEdit("cancel"):this.removeEditor()}for(var o=0,n=Object.keys(e);o<n.length;o++)switch(n[o]){case"showButtons":e.showButtons?this.appendButtons(this.formEle):this.destroyButtons();break;case"value":this.updateValue(),"Never"===this.textOption?this.renderValue(this.checkValue(p(this.type,this.value,this.model))):this.renderInitialValue();break;case"emptyText":"Never"===this.textOption?this.renderValue(this.checkValue(p(this.type,this.value,this.model))):this.renderInitialValue();break;case"template":this.checkIsTemplate();break;case"disabled":this.disable(e.disabled);break;case"enableRtl":this.setRtl(e.enableRtl);break;case"cssClass":this.setClass("remove",t.cssClass),this.setClass("add",e.cssClass);break;case"mode":this.enableEditor(this.enableEditMode);break;case"enableEditMode":this.enableEditor(e.enableEditMode);break;case"editableOn":this.unWireEditEvent(t.editableOn),"EditIconClick"!==e.editableOn&&this.wireEditEvent(e.editableOn)}},N([t.Property("")],l.prototype,"name",void 0),N([t.Property(null)],l.prototype,"value",void 0),N([t.Property("")],l.prototype,"template",void 0),N([t.Property(!0)],l.prototype,"enableHtmlSanitizer",void 0),N([t.Property(!0)],l.prototype,"enableHtmlParse",void 0),N([t.Property("")],l.prototype,"cssClass",void 0),N([t.Property("")],l.prototype,"primaryKey",void 0),N([t.Property("Empty")],l.prototype,"emptyText",void 0),N([t.Property("")],l.prototype,"url",void 0),N([t.Property("Popup")],l.prototype,"mode",void 0),N([t.Property("UrlAdaptor")],l.prototype,"adaptor",void 0),N([t.Property("Text")],l.prototype,"type",void 0),N([t.Property("Click")],l.prototype,"editableOn",void 0),N([t.Property("Never")],l.prototype,"textOption",void 0),N([t.Property("Submit")],l.prototype,"actionOnBlur",void 0),N([t.Property(!1)],l.prototype,"enablePersistence",void 0),N([t.Property(!1)],l.prototype,"disabled",void 0),N([t.Property(!0)],l.prototype,"showButtons",void 0),N([t.Property(!1)],l.prototype,"enableEditMode",void 0),N([t.Property(!0)],l.prototype,"submitOnEnter",void 0),N([t.Complex({},y)],l.prototype,"popupSettings",void 0),N([t.Property(null)],l.prototype,"model",void 0),N([t.Property({iconCss:"e-icons e-save-icon"})],l.prototype,"saveButton",void 0),N([t.Property({iconCss:"e-icons e-cancel-icon"})],l.prototype,"cancelButton",void 0),N([t.Property(null)],l.prototype,"validationRules",void 0),N([t.Event()],l.prototype,"created",void 0),N([t.Event()],l.prototype,"beforeSanitizeHtml",void 0),N([t.Event()],l.prototype,"actionBegin",void 0),N([t.Event()],l.prototype,"actionSuccess",void 0),N([t.Event()],l.prototype,"actionFailure",void 0),N([t.Event()],l.prototype,"validating",void 0),N([t.Event()],l.prototype,"beginEdit",void 0),N([t.Event()],l.prototype,"endEdit",void 0),N([t.Event()],l.prototype,"change",void 0),N([t.Event()],l.prototype,"submitClick",void 0),N([t.Event()],l.prototype,"cancelClick",void 0),N([t.Event()],l.prototype,"destroyed",void 0),l=N([t.NotifyPropertyChanges],l)}(t.Component),x=function(){function e(e,t){this.parent=e,this.module=t,this.addEventListener()}return e.prototype.render=function(e){this.module.render(e)},e.prototype.showPopup=function(){this.module.showPopup()},e.prototype.focus=function(){this.module.focus()},e.prototype.update=function(e){this.module.updateValue(e)},e.prototype.getValue=function(){this.module.getRenderValue()},e.prototype.destroyComponent=function(){t.isNullOrUndefined(this.module.compObj)||(this.module.compObj.destroy(),this.module.compObj=void 0)},e.prototype.destroy=function(){this.destroyComponent(),this.removeEventListener()},e.prototype.addEventListener=function(){this.parent.on("render",this.render,this),this.parent.on("set-focus",this.focus,this),this.parent.on("show-popup",this.showPopup,this),this.parent.on("update",this.update,this),this.parent.on("access-value",this.getValue,this),this.parent.on("destroy-modules",this.destroyComponent,this),this.parent.on("destroy",this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("render",this.render),this.parent.off("set-focus",this.focus),this.parent.off("show-popup",this.showPopup),this.parent.off("update",this.update),this.parent.off("access-value",this.getValue),this.parent.off("destroy-modules",this.destroyComponent),this.parent.off("destroy",this.destroy))},e}(),A=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.atcModule=this,this.base=new x(this.parent,this)}return e.prototype.render=function(e){this.compObj=new a.AutoComplete(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"AutoComplete"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"auto-complete"},e}(),L=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.colorModule=this,this.base=new x(this.parent,this)}return e.prototype.render=function(e){this.compObj=new r.ColorPicker(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Color"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"color-picker"},e}(),I=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.comboBoxModule=this,this.base=new x(this.parent,this)}return e.prototype.render=function(e){this.compObj=new a.ComboBox(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.showPopup=function(){this.compObj.focusIn(),this.compObj.showPopup()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.updateValue=function(e){this.compObj&&"ComboBox"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.getModuleName=function(){return"combo-box"},e}(),U=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.dateRangeModule=this,this.base=new x(this.parent,this)}return e.prototype.render=function(e){this.compObj=new n.DateRangePicker(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.getModuleName=function(){return"date-range-picker"},e.prototype.updateValue=function(e){this.compObj&&"DateRange"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.destroy=function(){this.base.destroy()},e}(),W=function(){return(W=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)},z=function(){function e(e){this.isPopOpen=!1,this.compObj=void 0,this.parent=e,this.parent.multiSelectModule=this,this.base=new x(this.parent,this)}return e.prototype.render=function(e){var t=W({},this.parent.model);this.openEvent=t.open,this.closeEvent=t.close,t.open=this.openHandler.bind(this),t.close=this.closeHandler.bind(this),this.compObj=new a.MultiSelect(t),this.compObj.appendTo(e.target)},e.prototype.openHandler=function(e){this.isPopOpen=!0,this.openEvent&&(this.compObj.setProperties({open:this.openEvent},!0),this.compObj.trigger("open",e))},e.prototype.closeHandler=function(e){this.isPopOpen=!1,this.closeEvent&&(this.compObj.setProperties({close:this.closeEvent},!0),this.compObj.trigger("close",e))},e.prototype.focus=function(){if(!this.isPopOpen){var e=document.createEvent("MouseEvent");e.initEvent("mousedown",!0,!0),t.closest(this.compObj.element,".e-multi-select-wrapper").dispatchEvent(e)}},e.prototype.updateValue=function(e){this.compObj&&"MultiSelect"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.getRenderValue=function(){this.parent.printValue=this.compObj.text},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"multi-select"},e}(),_=function(){function e(e){this.compObj=void 0,l.RichTextEditor.Inject(l.HtmlEditor,l.MarkdownEditor,l.Toolbar,l.Link,l.Image,l.QuickToolbar,l.Table,l.FileManager),this.parent=e,this.parent.rteModule=this,this.base=new x(this.parent,this)}return e.prototype.render=function(e){this.compObj=new l.RichTextEditor(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.focusIn()},e.prototype.updateValue=function(e){this.compObj&&"RTE"===e.type&&(this.parent.setProperties({value:this.getRteValue()},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.getRteValue=function(){var e;return"Markdown"===this.compObj.editorMode?(e=this.compObj.contentModule.getEditPanel().value,""===e?"":e):(e=this.compObj.contentModule.getEditPanel().innerHTML,"<p><br></p>"===e||"<p><br></p>"===e||""===e?"":e)},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"rte"},e}(),K=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.sliderModule=this,this.base=new x(this.parent,this)}return e.prototype.render=function(e){this.compObj=new r.Slider(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.element.focus()},e.prototype.updateValue=function(e){this.compObj&&"Slider"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.refresh=function(){this.compObj.refresh()},e.prototype.destroy=function(){this.base.destroy()},e.prototype.getModuleName=function(){return"slider"},e}(),F=function(){function e(e){this.compObj=void 0,this.parent=e,this.parent.timeModule=this,this.base=new x(this.parent,this)}return e.prototype.render=function(e){this.compObj=new n.TimePicker(this.parent.model),this.compObj.appendTo(e.target)},e.prototype.focus=function(){this.compObj.focusIn()},e.prototype.updateValue=function(e){this.compObj&&"Time"===e.type&&(this.parent.setProperties({value:this.compObj.value},!0),this.parent.extendModelValue(this.compObj.value))},e.prototype.getModuleName=function(){return"time-picker"},e.prototype.destroy=function(){this.base.destroy()},e}();return R.Inject(A,L,I,U,z,_,K,F),e.parseValue=p,e.getCompValue=d,e.encode=h,e.render="render",e.update="update",e.destroy="destroy",e.setFocus="set-focus",e.accessValue="access-value",e.destroyModules="destroy-modules",e.showPopup="show-popup",e.PopupSettings=y,e.modulesList=f,e.localeConstant=v,e.ROOT=b,e.ROOT_TIP=E,e.VALUE_WRAPPER=O,e.VALUE=g,e.OVERLAY_ICON="e-editable-overlay-icon",e.TIP_TITLE="e-editable-tip-title",e.TITLE=C,e.INLINE=w,e.POPUP=j,e.WRAPPER="e-editable-wrapper",e.LOADING="e-editable-loading",e.FORM=k,e.CTRL_GROUP="e-component-group",e.INPUT=D,e.BUTTONS=P,e.EDITABLE_ERROR="e-editable-error",e.ELEMENTS=M,e.OPEN=H,e.BTN_SAVE="e-btn-save",e.BTN_CANCEL="e-btn-cancel",e.RTE_SPIN_WRAP="e-rte-spin-wrap",e.CTRL_OVERLAY="e-control-overlay",e.DISABLE="e-disable",e.ICONS="e-icons",e.PRIMARY="e-primary",e.SHOW="e-show",e.HIDE=T,e.RTL=S,e.ERROR="e-error",e.LOAD=B,e.InPlaceEditor=R,e.Base=x,e.AutoComplete=A,e.ColorPicker=L,e.ComboBox=I,e.DateRangePicker=U,e.MultiSelect=z,e.Rte=_,e.Slider=K,e.TimePicker=F,e}({},ej.base,ej.data,ej.buttons,ej.calendars,ej.popups,ej.inputs,ej.dropdowns,ej.richtexteditor),this.ejs=ej;
- /*!
- * filename: ej2-layouts.min.js
- * version : 19.2.44
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.layouts=function(e,t){"use strict";var i=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),s=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},n="e-splitter",a="e-pane",l="e-pane-horizontal",r="e-pane-vertical",o="e-split-bar",h="e-split-bar-horizontal",d="e-static-pane",p="e-resize-handler",c="e-arrow-left",u="e-arrow-up",g="e-arrow-down",m="e-icon-hidden",v=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i(n,e),s([t.Property()],n.prototype,"size",void 0),s([t.Property(!1)],n.prototype,"collapsible",void 0),s([t.Property(!1)],n.prototype,"collapsed",void 0),s([t.Property(!0)],n.prototype,"resizable",void 0),s([t.Property(null)],n.prototype,"min",void 0),s([t.Property(null)],n.prototype,"max",void 0),s([t.Property()],n.prototype,"content",void 0),s([t.Property("")],n.prototype,"cssClass",void 0),n}(t.ChildProperty),f=function(e){function f(t,i){var s=e.call(this,t,i)||this;return s.allPanes=[],s.paneOrder=[],s.separatorOrder=[],s.allBars=[],s.previousCoordinates={},s.currentCoordinates={},s.updatePrePaneInPercentage=!1,s.updateNextPaneInPercentage=!1,s.panesDimensions=[],s.border=0,s.validDataAttributes=["data-size","data-min","data-max","data-collapsible","data-resizable","data-content","data-collapsed"],s.validElementAttributes=["data-orientation","data-width","data-height"],s.iconsDelay=300,s.templateElement=[],s.collapseFlag=!1,s.expandFlag=!0,s}return i(f,e),f.prototype.onPropertyChanged=function(e,i){if(this.element.classList.contains(n))for(var s=0,a=Object.keys(e);s<a.length;s++)switch(a[s]){case"height":this.setSplitterSize(this.element,e.height,"height");break;case"width":this.setSplitterSize(this.element,e.width,"width");break;case"cssClass":this.setCssClass(this.element,e.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"enableReversePanes":this.setReversePane();break;case"separatorSize":this.setSeparatorSize(e.separatorSize);break;case"orientation":this.changeOrientation(e.orientation);break;case"paneSettings":if(e.paneSettings instanceof Array&&i.paneSettings instanceof Array)this.destroyPaneSettings(),this.allBars=[],this.allPanes=[],this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl),this.isCollapsed();else for(var l=Object.keys(e.paneSettings),r=0;r<l.length;r++)for(var o=parseInt(Object.keys(e.paneSettings)[r],10),h=Object.keys(e.paneSettings[o]).length,d=0;d<h;d++){var p=Object.keys(e.paneSettings[o])[d];switch(p){case"content":var c=Object(e.paneSettings[o])[p];t.isNullOrUndefined(c)||(this.allPanes[o].innerHTML="",this.setTemplate(c,this.allPanes[o]));break;case"resizable":var u=Object(e.paneSettings[o])[p];this.resizableModel(o,u);break;case"collapsible":this.collapsibleModelUpdate(o);break;case"collapsed":e.paneSettings[o].collapsed?this.isCollapsed(o):this.collapsedOnchange(o);break;case"cssClass":this.setCssClass(this.allPanes[o],e.paneSettings[o].cssClass);break;case"size":var g=Object(e.paneSettings[o])[p];""===g||t.isNullOrUndefined(g)||this.updatePaneSize(g,o)}}break;case"enableRtl":this.setRTL(e.enableRtl)}},f.prototype.updatePaneSize=function(e,t){this.allPanes[t].style.flexBasis=e;for(var i,s=[],n=0,a=0;a<this.allPanes.length;a++)this.paneSettings[a].size||""===this.allPanes[a].innerText?this.paneSettings[a].size&&(i="Horizontal"===this.orientation?this.allPanes[t].offsetWidth:this.allPanes[t].offsetHeight):(s[n]=a,n++);i="Horizontal"===this.orientation?this.allBars[0].offsetWidth*this.allBars.length+i:this.allBars[0].offsetHeight*this.allBars.length+i;for(var l=(("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)-i-2*this.border)/s.length,r=0;r<s.length;r++)this.allPanes[s[r]].style.flexBasis=l+"px";this.allPanes[t].classList.add(d)},f.prototype.preRender=function(){if(this.onReportWindowSize=this.reportWindowSize.bind(this),this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,!this.checkBlazor()){t.removeClass([this.wrapper],["e-control","e-lib",n]);var e="Horizontal"===this.orientation?"e-splitter-horizontal":"e-splitter-vertical";t.addClass([this.element],e)}var i="msie"===t.Browser.info.name?"e-ie":"";this.setCssClass(this.element,i),t.Browser.isDevice&&t.addClass([this.element],"e-splitter-touch")},f.prototype.getPersistData=function(){return this.addOnPersist(["paneSettings"])},f.prototype.getModuleName=function(){return"splitter"},f.prototype.render=function(){this.checkBlazor()||(this.checkDataAttributes(),this.setCssClass(this.element,this.cssClass),this.isEnabled(this.enabled),this.setDimension(this.getHeight(this.element),this.getWidth(this.element))),this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setPaneSettings(),this.checkBlazor()||this.setRTL(this.enableRtl),this.enableReversePanes&&this.setReversePane(),this.collapseFlag=!0,this.isCollapsed(),this.collapseFlag=!1,t.EventHandler.add(document,"touchstart click",this.onDocumentClick,this),this.renderComplete(),this.element.ownerDocument.defaultView.addEventListener("resize",this.onReportWindowSize,!0),t.EventHandler.add(this.element,"keydown",this.onMove,this)},f.prototype.onDocumentClick=function(e){e.target.classList.contains(o)||t.isNullOrUndefined(this.currentSeparator)||(this.currentSeparator.classList.remove("e-split-bar-hover"),this.currentSeparator.classList.remove("e-split-bar-active"))},f.prototype.checkPaneSize=function(e){var i="Horizontal"===this.orientation?this.previousPane.offsetWidth:this.previousPane.offsetHeight,s="Horizontal"===this.orientation?this.nextPane.offsetWidth:this.nextPane.offsetHeight,n=t.isNullOrUndefined(this.separatorSize)?1:this.separatorSize;if(this.previousPane.style.flexBasis.indexOf("%")>0||this.nextPane.style.flexBasis.indexOf("%")>0){var a=this.updatePaneFlexBasis(this.previousPane),l=this.updatePaneFlexBasis(this.nextPane);this.totalPercent=a+l,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%"),"keydown"!==e.type||t.isNullOrUndefined(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&s>0?(this.previousPane.style.flexBasis=a+1+"%",this.nextPane.style.flexBasis=l-1+"%"):(37===e.keyCode||38===e.keyCode)&&i>0&&(this.previousPane.style.flexBasis=a-1+"%",this.nextPane.style.flexBasis=l+1+"%"))}else this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight,"keydown"!==e.type||t.isNullOrUndefined(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&s>0?(this.addStaticPaneClass(),this.previousPane.style.flexBasis=i+n+"px",this.nextPane.style.flexBasis=s<n?"0px":s-n+"px"):(37===e.keyCode||38===e.keyCode)&&i>0&&(this.addStaticPaneClass(),this.previousPane.style.flexBasis=i<n?"0px":i-n+"px",this.nextPane.style.flexBasis=s+n+"px"))},f.prototype.onMove=function(e){if(this.allPanes.length>1){var i=this.getSeparatorIndex(this.currentSeparator),s=this.previousPane.classList.contains("e-collapsed"),n=this.previousPane.classList.contains("e-expanded"),a=this.nextPane.classList.contains("e-collapsed");("Horizontal"!==this.orientation&&38===e.keyCode||"Horizontal"===this.orientation&&39===e.keyCode||"Horizontal"===this.orientation&&37===e.keyCode||"Horizontal"!==this.orientation&&40===e.keyCode)&&(!n&&!a&&!s||n&&!a)&&document.activeElement.classList.contains(o)&&this.paneSettings[i].resizable&&this.paneSettings[i+1].resizable?(this.checkPaneSize(e),this.triggerResizing(e)):13===e.keyCode&&this.paneSettings[i].collapsible&&document.activeElement.classList.contains(o)&&(this.previousPane.classList.contains("e-collapsed")?(this.expand(i),t.addClass([this.currentSeparator],"e-split-bar-active")):(this.collapse(i),t.addClass([this.currentSeparator],"e-split-bar-active")))}},f.prototype.sanitizeHelper=function(e){if(this.enableHtmlSanitizer){var i=t.SanitizeHtmlHelper.beforeSanitize(),s={cancel:!1,helper:null};t.extend(i,i,s),this.trigger("beforeSanitizeHtml",i),i.cancel&&!t.isNullOrUndefined(i.helper)?e=i.helper(e):i.cancel||(e=t.SanitizeHtmlHelper.serializeValue(i,e))}return e},f.prototype.checkDataAttributes=function(){for(var e,i,s=0;s<this.validElementAttributes.length;s++)i=this.element.getAttribute(this.validElementAttributes[s]),t.isNullOrUndefined(i)||(this[e=this.removeDataPrefix(this.validElementAttributes[s])]=i);for(var n=0;n<this.element.children.length;n++)for(var a=0;a<this.validDataAttributes.length;a++)if(i=this.element.children[n].getAttribute(this.validDataAttributes[a]),!t.isNullOrUndefined(i)){i="collapsible"===(e=this.removeDataPrefix(this.validDataAttributes[a]))||"resizable"===e?"true"===i:i,t.isNullOrUndefined(this.paneSettings[n])&&(this.paneSettings[n]={size:"",min:null,max:null,content:"",resizable:!0,collapsible:!1,collapsed:!1});var l=this.paneSettings[n][e];"resizable"!==e&&"collapsible"!==e&&"collapsed"!==e||(this.paneSettings[n][e]=i),(t.isNullOrUndefined(l)||""===l)&&(this.paneSettings[n][e]=i)}},f.prototype.destroyPaneSettings=function(){[].slice.call(this.element.children).forEach(function(e){t.detach(e)}),this.restoreElem()},f.prototype.checkBlazor=function(){return t.isBlazor()&&this.isServerRendered},f.prototype.setPaneSettings=function(){for(var e=this.allPanes.length,i=[],s={size:"",min:null,max:null,content:"",resizable:!0,collapsed:!1,collapsible:!1,cssClass:""},n=0;n<e;n++)t.isNullOrUndefined(this.paneSettings[n])?i[n]=s:i[n]=this.paneSettings[n];this.setProperties({paneSettings:i},!0)},f.prototype.checkArrow=function(e,t){return this.allBars[e].querySelector(".e-navigate-arrow."+t)},f.prototype.removeDataPrefix=function(e){return e.slice(e.lastIndexOf("-")+1)},f.prototype.setRTL=function(e){e?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},f.prototype.setReversePane=function(){this.allPanes=this.allPanes.reverse(),this.allBars=this.allBars.reverse(),t.addClass([this.allBars[this.allBars.length-1]],"e-last-bar"),t.removeClass([this.allBars[0]],"e-last-bar"),this.setProperties({paneSettings:this.paneSettings.reverse()},!0),this.enableReversePanes?this.element.setAttribute("dir","rtl"):this.element.removeAttribute("dir")},f.prototype.setSplitterSize=function(e,i,s){var n="width"===s?{width:t.formatUnit(i)}:{height:t.formatUnit(i)};t.setStyleAttribute(e,n)},f.prototype.getPanesDimensions=function(){for(var e=0;e<this.allPanes.length;e++)"Horizontal"===this.orientation?this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().width):this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().height)},f.prototype.setCssClass=function(e,i){i&&t.addClass([e],i.split(i.indexOf(",")>-1?",":" "))},f.prototype.hideResizer=function(e){t.addClass([t.select("."+p,e)],"e-hide-handler")},f.prototype.showResizer=function(e){!t.isNullOrUndefined(this.previousPane)&&this.previousPane.classList.contains("e-resizable")&&!t.isNullOrUndefined(this.nextPane)&&this.nextPane.classList.contains("e-resizable")&&t.removeClass([t.select("."+p,e)],"e-hide-handler")},f.prototype.resizableModel=function(e,i){var s=e===this.allBars.length?e-1:e,n=e;t.EventHandler.remove(this.allBars[s],"mousedown",this.onMouseDown),i?(t.EventHandler.add(this.allBars[s],"mousedown",this.onMouseDown,this),this.isResizable()&&(this.showResizer(this.allBars[s]),t.removeClass([t.select("."+p,this.allBars[s])],"e-hide-handler"),this.allBars[s].classList.add("e-resizable-split-bar"),e===this.allBars.length?this.allPanes[e].classList.add("e-resizable"):this.allPanes[s].classList.add("e-resizable"),this.updateResizablePanes(n))):(this.updateResizablePanes(n),this.hideResizer(this.allBars[s]),this.allBars[s].classList.remove("e-resizable-split-bar"),e===this.allBars.length?this.allPanes[e].classList.remove("e-resizable"):this.allPanes[s].classList.remove("e-resizable"))},f.prototype.collapsibleModelUpdate=function(e){var t=e===this.allBars.length?e-1:e,i="Horizontal"===this.orientation?this.checkArrow(t,c):this.checkArrow(t,u),s="Horizontal"===this.orientation?this.checkArrow(t,"e-arrow-right"):this.checkArrow(t,g);this.paneCollapsible(this.allPanes[e],e),this.updateCollapseIcons(t,s,i)},f.prototype.collapseArrow=function(e,i){return t.selectAll("."+i,this.allBars[e])[0]},f.prototype.updateIsCollapsed=function(e,i,s){if(!t.isNullOrUndefined(e)){var n=e===this.allBars.length,a=n?e-1:e;(!n&&this.allPanes[e+1].classList.contains("e-collapsed")&&0!==e?this.collapseArrow(a-1,s):n?this.collapseArrow(a,s):this.collapseArrow(a,i)).click()}},f.prototype.isCollapsed=function(e){var i=this;if(t.isNullOrUndefined(e)||!this.paneSettings[e].collapsed||!t.isNullOrUndefined(this.allPanes[e].classList.contains("e-collapsed"))){if(this.expandFlag=!1,t.isNullOrUndefined(e)){for(s=0;s<this.allPanes.length;s++)!t.isNullOrUndefined(this.paneSettings[s])&&this.paneSettings[s].collapsed&&this.updateIsCollapsed(s,this.targetArrows().collapseArrow,this.targetArrows().lastBarArrow);for(var s=this.allPanes.length-1;s>=0;s--)if(!t.isNullOrUndefined(this.paneSettings[s])&&this.paneSettings[s].collapsed&&!this.allPanes[s].classList.contains("e-collapsed")){var n="Horizontal"===this.orientation?"e-arrow-right":g;0!==s&&(a=this.collapseArrow(s-1,n)).click(),this.nextPane.classList.contains("e-collapsed")||(a=this.collapseArrow(s-1,n)).click()}}else{this.collapseFlag=!0;var a=void 0,l=e===this.allBars.length,r=l?e-1:e,o={target:a=!l&&this.allPanes[e+1].classList.contains("e-collapsed")&&0!==e?this.collapseArrow(r-1,this.targetArrows().lastBarArrow):l?this.collapseArrow(r,this.targetArrows().lastBarArrow):this.collapseArrow(r,this.targetArrows().collapseArrow)},h=this.beforeAction(o);this.trigger("beforeCollapse",h,function(t){if(!t.cancel){var s=[];s[0]=e;for(var n=1,a=0;a<i.allPanes.length;a++)i.allPanes[a].classList.contains("e-collapsed")&&(s[n]=a,n++);s=s.sort(),i.updateIsCollapsed(e,i.targetArrows().collapseArrow,i.targetArrows().lastBarArrow);for(a=0;a<s.length;a++)i.allPanes[s[a]].classList.contains("e-collapsed")||i.updateIsCollapsed(s[a],i.targetArrows().collapseArrow,i.targetArrows().lastBarArrow);for(a=s.length;a>0;a--)if(!i.allPanes[s[a-1]].classList.contains("e-collapsed")){var l=i.targetArrows();i.updateIsCollapsed(s[a-1],l.collapseArrow,l.lastBarArrow)}var r=i.afterAction(o);i.trigger("collapsed",r),i.collapseFlag=!1}})}this.expandFlag=!0}},f.prototype.targetArrows=function(){return this.splitterProperty(),{collapseArrow:"Horizontal"===this.orientation?c:u,lastBarArrow:"Vertical"===this.orientation?g:"e-arrow-right"}},f.prototype.collapsedOnchange=function(e){t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].collapsed)||!this.allPanes[e].classList.contains("e-collapsed")||this.updateIsCollapsed(e,this.targetArrows().lastBarArrow,this.targetArrows().collapseArrow)},f.prototype.isEnabled=function(e){e?t.removeClass([this.element],"e-disabled"):t.addClass([this.element],"e-disabled")},f.prototype.setSeparatorSize=function(e){for(var i=t.isNullOrUndefined(e)?"auto":e+"px",s="Horizontal"===this.orientation?h:"e-split-bar-vertical",n=0;n<this.allBars.length;n++){var a=t.selectAll("."+s,this.element)[n],l=t.selectAll("."+p,a)[0];"Horizontal"===this.orientation?(a.style.width=i,t.isNullOrUndefined(l)||(l.style.width=i)):(a.style.height=i,t.isNullOrUndefined(l)||(l.style.height=i))}},f.prototype.changeOrientation=function(e){var i="Vertical"===e;this.element.classList.remove(i?"e-splitter-horizontal":"e-splitter-vertical"),this.element.classList.add(i?"e-splitter-vertical":"e-splitter-horizontal");for(s=0;s<this.allPanes.length;s++)this.allPanes[s].classList.remove(i?l:r),this.allPanes[s].classList.add(i?r:l);for(var s=0;s<this.allBars.length;s++)t.detach(this.allBars[s]);this.allBars=[],this.addSeparator(this.element)},f.prototype.checkSplitPane=function(e,t){return this.collectPanes(e.parentElement.children)[t]},f.prototype.collectPanes=function(e){for(var t=[],i=0;i<e.length;i++)e[i].classList.contains(a)&&t.push(e[i]);return t},f.prototype.getPrevPane=function(e){return this.enableReversePanes?this.getOrderPane(e+1):this.getOrderPane(e-1)},f.prototype.getNextPane=function(e){return this.enableReversePanes?this.getOrderPane(e-1):this.getOrderPane(e+1)},f.prototype.getOrderPane=function(e){for(var t,i=0;i<this.element.children.length;i++)parseInt(this.element.children[i].style.order,10)===e&&(t=this.element.children[i]);return t},f.prototype.getOrderIndex=function(e,t){var i,s;s="pane"===t?this.allPanes:this.allBars;for(var n=0;n<s.length;n++)parseInt(s[n].style.order,10)===e&&(i=n);return i},f.prototype.updateSeparatorSize=function(e){var i=t.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?e.style.width=i:e.style.height=i},f.prototype.addResizeHandler=function(e){var i=this.createElement("div");t.addClass([i],[p,"e-icons"]),this.updateSeparatorSize(i),e.appendChild(i)},f.prototype.getHeight=function(e){this.height;return""!==e.style.height&&"100%"===this.height?e.style.height:this.height},f.prototype.getWidth=function(e){this.width;return""!==e.style.width&&"100%"===this.width?e.style.width:this.width},f.prototype.setDimension=function(e,i){t.setStyleAttribute(this.element,{height:e,width:i})},f.prototype.updateCollapseIcons=function(e,i,s){t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].collapsible)||(this.paneSettings[e].collapsible?t.removeClass([s],[m]):t.addClass([s],[m]),t.isNullOrUndefined(this.paneSettings[e+1])||(this.paneSettings[e+1].collapsible?t.removeClass([i],[m]):t.addClass([i],[m])),t.isNullOrUndefined(this.paneSettings[e+1])||this.paneSettings[e+1].collapsible&&(this.paneSettings[e+1].collapsible?t.removeClass([i],[m]):t.addClass([i],[m])))},f.prototype.updateIconClass=function(){"Horizontal"===this.orientation?(this.leftArrow=c,this.rightArrow="e-arrow-right"):(this.leftArrow=u,this.rightArrow=g)},f.prototype.createSeparator=function(e){var i=this.createElement("div");this.allBars.push(i);var s=this.createElement("button"),n=this.createElement("button");s.setAttribute("tabindex","-1"),n.setAttribute("tabindex","-1"),s.setAttribute("aria-label","Toggle navigation"),n.setAttribute("aria-label","Toggle navigation"),s.setAttribute("type","button"),n.setAttribute("type","button");var a=t.isNullOrUndefined(this.separatorSize)?"1px":this.separatorSize+"px",l=this;return"Horizontal"===this.orientation?(this.updateIconClass(),t.addClass([n],["e-navigate-arrow",c,m]),t.addClass([s],["e-navigate-arrow","e-arrow-right",m]),t.addClass([i],[o,h]),i.style.width=a):(t.addClass([s],["e-navigate-arrow",g,m]),t.addClass([n],["e-navigate-arrow",u,m]),t.addClass([i],[o,"e-split-bar-vertical"]),this.updateIconClass(),i.style.height=a),this.addMouseActions(i),i.appendChild(n),this.addResizeHandler(i),i.appendChild(s),this.updateCollapseIcons(e,s,n),i.setAttribute("tabindex","0"),this.enableReversePanes?i.setAttribute("dir","ltr"):i.removeAttribute("dir"),i.addEventListener("focus",function(){i.classList.add("e-split-bar-active"),l.currentSeparator=i,l.getPaneDetails()}),i.addEventListener("blur",function(){i.classList.remove("e-split-bar-active")}),i},f.prototype.updateResizablePanes=function(e){this.getPaneDetails(),this.isResizable()?this.allPanes[e].classList.add("e-resizable"):this.allPanes[e].classList.remove("e-resizable")},f.prototype.addSeparator=function(e){var i,s,n=this,a=this.allPanes.length,l=e.children;if(this.checkBlazor())for(var r=0;r<this.element.children.length;r++)this.element.children[r].classList.contains(o)&&this.allBars.push(this.element.children[r]);for(c=0;c<a;c++)if(c<a-1){if(this.checkBlazor()||(i=this.createSeparator(c),t.setStyleAttribute(i,{order:2*c+1}),this.separatorOrder.push(2*c+1),l[c].parentNode.appendChild(i),this.currentSeparator=i,i.setAttribute("role","separator"),i.setAttribute("aria-orientation",this.orientation.toLowerCase())),this.checkBlazor()&&(s=this,i=this.allBars[c],this.updateIconClass()),this.checkBlazor()||this.wireClickEvents(),this.checkBlazor()&&!t.isNullOrUndefined(i)&&(this.currentSeparator=i,this.addMouseActions(i),this.wireClickEvents(),i.addEventListener("focus",function(){document.activeElement.classList.contains("e-split-bar")&&(s.currentSeparator=document.activeElement,s.currentSeparator.classList.add("e-split-bar-active")),n.getPaneDetails()}),i.addEventListener("blur",function(){s.currentSeparator.classList.remove("e-split-bar-active")})),!t.isNullOrUndefined(i))if(this.isResizable()){t.EventHandler.add(i,"mousedown",this.onMouseDown,this);var h="msie"===t.Browser.info.name?"pointerdown":"touchstart";t.EventHandler.add(i,h,this.onMouseDown,this),i.classList.add("e-resizable-split-bar"),this.updateResizablePanes(c)}else t.addClass([t.select("."+p,i)],"e-hide-handler")}else i&&t.addClass([i],"e-last-bar"),a>1&&this.updateResizablePanes(c);if("msie"===t.Browser.info.name)for(var d=this.element.querySelectorAll(".e-splitter .e-resize-handler"),c=0;c<d.length;c++){var u=t.isNullOrUndefined(this.separatorSize)?1:this.separatorSize;d[c].style.paddingLeft=u/2+"px",d[c].style.paddingRight=u/2+"px"}},f.prototype.isResizable=function(){var e=!1;return(!t.isNullOrUndefined(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||t.isNullOrUndefined(this.paneSettings[this.getNextPaneIndex()]))&&(e=!0),e},f.prototype.addMouseActions=function(e){var i,s,n=this;e.addEventListener("mouseenter",function(){i=setTimeout(function(){t.addClass([e],["e-split-bar-hover"])},n.iconsDelay)}),e.addEventListener("mouseleave",function(){clearTimeout(i),t.removeClass([e],["e-split-bar-hover"])}),e.addEventListener("mouseout",function(){clearTimeout(s)}),e.addEventListener("mouseover",function(){s=setTimeout(function(){t.addClass([e],["e-split-bar-hover"])},n.iconsDelay)})},f.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},f.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e.parentElement:e},f.prototype.isSeparator=function(e){return!e.classList.contains(o)},f.prototype.isMouseEvent=function(e){var i=!1;return("mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(i=!0),i},f.prototype.updateCursorPosition=function(e,i){if(this.isMouseEvent(e))this.changeCoordinates({x:e.pageX,y:e.pageY},i);else{var s="msie"!==t.Browser.info.name?e.touches[0]:e;this.changeCoordinates({x:s.pageX,y:s.pageY},i)}},f.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},f.prototype.reportWindowSize=function(){var e=this,i=this.allPanes.length;if(!document.body.contains(this.element))return void document.defaultView.removeEventListener("resize",this.onReportWindowSize);for(var s=0;s<i;s++)t.isNullOrUndefined(this.paneSettings[s].size)&&this.allPanes[s].classList.remove(d),i-1===s&&this.element.querySelectorAll("."+d).length===i&&t.removeClass([this.allPanes[s]],d);i>0&&setTimeout(function(){e.updateSplitterSize(!0)},200)},f.prototype.updateSplitterSize=function(e){for(var t=0,i=[],s=0,n=this.element.children,a=0;a<n.length;a++)t+="Horizontal"===this.orientation?n[a].offsetWidth:n[a].offsetHeight;for(o=0;o<this.allBars.length;o++)t+="Horizontal"===this.orientation?parseInt(getComputedStyle(this.allBars[o]).marginLeft,10)+parseInt(getComputedStyle(this.allBars[o]).marginLeft,10):parseInt(getComputedStyle(this.allBars[o]).marginTop,10)+parseInt(getComputedStyle(this.allBars[o]).marginBottom,10);for(var l="Horizontal"===this.orientation?this.element.offsetWidth-(2*this.border+t):this.element.offsetHeight-(2*this.border+t),a=0;a<this.allPanes.length;a++)this.paneSettings[a].size||""===this.allPanes[a].innerText||(i[s]=a,s++);for(var r=l/i.length,o=0;o<i.length;o++)this.allPanes[i[o]].style.flexBasis="Horizontal"===this.orientation?this.allPanes[i[o]].offsetWidth+r+"px":this.allPanes[i[o]].offsetHeight+r+"px";if(2===this.allPanes.length&&e)for(var h=this.allPanes.length,d=void 0,p=void 0,c=void 0,u=void 0,a=0;a<h;a++)if(null!==this.paneSettings[a].min&&(p=this.convertPixelToNumber(this.paneSettings[a].min.toString()),this.paneSettings[a].min.indexOf("%")>0&&(p=this.convertPercentageToPixel(this.paneSettings[a].min)),d=this.convertPixelToNumber(p.toString()),this.allPanes[a].offsetWidth<d)){0===a?(c=this.allPanes[a],u=this.allPanes[a+1]):(c=this.allPanes[a],u=this.allPanes[a-1]);var g=d-this.allPanes[a].offsetWidth,m=c.style.flexBasis.indexOf("%")>-1;c.style.flexBasis=m?this.convertPixelToPercentage(c.offsetWidth+g)+"%":c.offsetWidth+g+"px",u.style.flexBasis=u.style.flexBasis.indexOf("%")>-1?this.convertPixelToPercentage(u.offsetWidth-g)+"%":u.offsetWidth-g+"px"}},f.prototype.wireResizeEvents=function(){t.EventHandler.add(document,"mousemove",this.onMouseMove,this),t.EventHandler.add(document,"mouseup",this.onMouseUp,this);var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.add(document,e,this.onMouseMove,this),t.EventHandler.add(document,i,this.onMouseUp,this)},f.prototype.unwireResizeEvents=function(){this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize);var e="msie"===t.Browser.info.name?"pointermove":"touchmove",i="msie"===t.Browser.info.name?"pointerup":"touchend";t.EventHandler.remove(document,"mousemove",this.onMouseMove),t.EventHandler.remove(document,"mouseup",this.onMouseUp),t.EventHandler.remove(document,e,this.onMouseMove),t.EventHandler.remove(document,i,this.onMouseUp)},f.prototype.wireClickEvents=function(){t.EventHandler.add(this.currentSeparator,"touchstart click",this.clickHandler,this)},f.prototype.clickHandler=function(e){if(!e.target.classList.contains("e-navigate-arrow")){var i=t.selectAll(".e-splitter > .e-split-bar.e-split-bar-hover");i.length>0&&t.removeClass(i,"e-split-bar-hover"),e.target.classList.add("e-split-bar-hover")}var s=e.target;(s.classList.contains(c)||s.classList.contains(u))&&this.collapseAction(e),(s.classList.contains("e-arrow-right")||s.classList.contains(g))&&this.expandAction(e);for(var n=0,a=this.element.children,l=0;l<a.length;l++)n+="Horizontal"===this.orientation?a[l].offsetWidth:a[l].offsetHeight;n>this.element.offsetWidth&&this.updateSplitterSize()},f.prototype.expandAction=function(e){var t=this;this.splitterDetails(e);var i=this.beforeAction(e);this.expandFlag?this.trigger("beforeExpand",i,function(i){i.cancel||t.expandPane(e);var s=t.afterAction(e);t.trigger("expanded",s)}):this.expandPane(e)},f.prototype.expandPane=function(e){this.removeStaticPanes();var i=this.element.querySelectorAll(".e-collapsed").length,s=!this.previousPane.classList.contains("e-collapsed")&&this.previousPane.classList.contains(d)&&!this.nextPane.classList.contains("e-collapsed")&&!this.nextPane.classList.contains("e-expanded")&&this.nextPane.nextElementSibling.classList.contains(a)&&!this.nextPane.nextElementSibling.classList.contains(d)&&!(i===this.allPanes.length-2),n=["e-collapsed","e-pane-hidden"];this.previousPane.classList.contains("e-collapsed")?(t.removeClass([this.previousPane],n),t.removeClass([this.nextPane],"e-expanded"),this.expandFlag&&this.updatePaneSettings(this.prevPaneIndex,!1)):(t.removeClass([this.nextPane],"e-expanded"),t.removeClass([this.previousPane],n),t.addClass([this.previousPane],"e-expanded"),t.addClass([this.nextPane],n),this.expandFlag&&this.updatePaneSettings(this.nextPaneIndex,!0)),this.updateIconsOnExpand(e),this.previousPane.setAttribute("aria-expanded","true"),this.nextPane.setAttribute("aria-expanded","false"),this.updateFlexGrow(this.checkStaticPanes()),s&&(this.previousPane.classList.remove("e-expanded"),this.previousPane.style.flexGrow="")},f.prototype.checkStaticPanes=function(){for(var e=!0,t=0;t<this.allPanes.length;t++)!this.allPanes[t].classList.contains("e-collapsed")&&e&&(e=!!this.allPanes[t].classList.contains(d));return e},f.prototype.updateFlexGrow=function(e){for(var t=0,i=0;i<this.element.children.length;i++)this.element.children[i].classList.contains("e-collapsed")&&(t+=1);for(var s=t===this.allPanes.length-2,n=this.allPanes,a=0;a<n.length;a++)n[a].classList.contains("e-expanded")?n[a].style.flexGrow="1":n[a].classList.contains("e-collapsed")?n[a].style.flexGrow="0":n[a].style.flexGrow="",e&&!this.nextPane.classList.contains("e-collapsed")&&(this.nextPane.style.flexGrow="1"),s&&!this.allPanes[a].classList.contains("e-collapsed")&&this.paneSettings[a].size&&a!==this.allPanes.length-1&&(n[a].style.flexGrow="")},f.prototype.hideTargetBarIcon=function(e,i){t.addClass([t.select("."+i,e)],m)},f.prototype.showTargetBarIcon=function(e,i){t.removeClass([t.select("."+i,e)],m)},f.prototype.updateIconsOnCollapse=function(e){this.splitterProperty(),this.previousPane.classList.contains("e-collapsed")&&!this.nextPane.classList.contains("e-collapsed")?(t.addClass([e.target],m),this.paneSettings[this.prevPaneIndex].collapsible&&this.showCurrentBarIcon(),this.resizableModel(this.currentBarIndex,!1),!this.previousPane.classList.contains("e-collapsed")||this.nextPane.classList.contains("e-collapsed")||this.paneSettings[this.prevPaneIndex].collapsible||this.hideTargetBarIcon(this.prevBar,this.rightArrow),this.previousPane.previousElementSibling&&!this.previousPane.previousElementSibling.classList.contains("e-collapsed")&&(this.previousPane.classList.contains("e-collapsed")&&this.paneSettings[this.prevPaneIndex].collapsible?this.showTargetBarIcon(this.prevBar,this.leftArrow):this.paneSettings[this.prevPaneIndex].collapsible||this.hideTargetBarIcon(this.prevBar,this.leftArrow)),t.isNullOrUndefined(this.prevBar)||(this.resizableModel(this.currentBarIndex-1,!1),this.hideTargetBarIcon(this.prevBar,this.arrow)),this.paneSettings[this.prevPaneIndex].collapsible||this.hideTargetBarIcon(this.currentSeparator,this.rightArrow)):this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneExpanded||(this.paneSettings[this.currentBarIndex].resizable&&this.resizableModel(this.currentBarIndex,!0),!this.splitInstance.nextPaneNextEle.classList.contains("e-collapsed")&&this.paneSettings[this.currentBarIndex+1].resizable&&this.resizableModel(this.currentBarIndex+1,!0),this.paneSettings[this.currentBarIndex].collapsible||t.addClass([e.target],m),this.previousPane&&0===this.prevPaneIndex&&this.paneSettings[this.prevPaneIndex].collapsible&&this.showTargetBarIcon(this.currentSeparator,this.leftArrow),this.nextPane&&this.nextPaneIndex===this.allPanes.length-1&&this.paneSettings[this.nextPaneIndex].collapsible&&this.showTargetBarIcon(this.getPrevBar(this.nextPaneIndex),this.rightArrow),!this.previousPane.classList.contains("e-collapsed")&&this.paneSettings[this.nextPaneIndex].collapsible&&this.showTargetBarIcon(this.currentSeparator,this.rightArrow),t.isNullOrUndefined(this.nextBar)||(this.nextPane.nextElementSibling&&this.nextPane.nextElementSibling.classList.contains("e-collapsed")&&this.paneSettings[this.nextPaneIndex+1].collapsible||!this.nextPane.nextElementSibling.classList.contains("e-collapsed")&&this.paneSettings[this.nextPaneIndex].collapsible?this.showTargetBarIcon(this.nextBar,this.leftArrow):!this.paneSettings[this.splitInstance.nextPaneIndex+1].collapsible&&this.paneSettings[this.currentBarIndex]&&this.hideTargetBarIcon(this.nextBar,this.arrow)),this.nextPaneIndex===this.allPanes.length-1||!this.nextPane.nextElementSibling||this.nextPane.classList.contains("e-collapsed")||this.nextPane.nextElementSibling.classList.contains("e-collapsed")||this.paneSettings[this.nextPaneIndex+1].collapsible||this.hideTargetBarIcon(this.nextBar,this.rightArrow))},f.prototype.collapseAction=function(e){var t=this;this.splitterDetails(e);var i=this.beforeAction(e);this.collapseFlag?this.collapsePane(e):this.trigger("beforeCollapse",i,function(i){if(!i.cancel){t.collapsePane(e);var s=t.afterAction(e);t.trigger("collapsed",s)}})},f.prototype.collapsePane=function(e){this.removeStaticPanes();var i=this.element.querySelectorAll(".e-collapsed").length,s=this.previousPane.classList.contains(d)&&!this.previousPane.classList.contains("e-collapsed")&&!this.nextPane.classList.contains("e-collapsed")&&this.nextPane.nextElementSibling.classList.contains(a)&&!this.nextPane.nextElementSibling.classList.contains(d)&&!this.nextPane.nextElementSibling.classList.contains("e-collapsed")&&!(i===this.allPanes.length-2)||this.nextPane.classList.contains("e-collapsed")&&!this.previousPane.classList.contains(d)&&this.nextPane.classList.contains(d),n=["e-collapsed","e-pane-hidden"];this.nextPane.classList.contains("e-collapsed")?(t.removeClass([this.previousPane],"e-expanded"),t.removeClass([this.nextPane],n),this.collapseFlag||this.updatePaneSettings(this.nextPaneIndex,!1)):(t.removeClass([this.previousPane],"e-expanded"),t.removeClass([this.nextPane],n),t.addClass([this.nextPane],"e-expanded"),t.addClass([this.previousPane],n),this.collapseFlag||this.updatePaneSettings(this.prevPaneIndex,!0)),this.updateIconsOnCollapse(e),this.previousPane.setAttribute("aria-expanded","false"),this.nextPane.setAttribute("aria-expanded","true"),this.updateFlexGrow(this.checkStaticPanes()),s&&(this.nextPane.classList.remove("e-expanded"),this.nextPane.style.flexGrow="")},f.prototype.removeStaticPanes=function(){for(var e=0;e<this.allPanes.length;e++)t.isNullOrUndefined(this.paneSettings[e].size)&&this.allPanes[e].classList.remove(d)},f.prototype.beforeAction=function(e){return t.isBlazor()?{element:this.element,event:e,index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,cancel:!1}:{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,cancel:!1}},f.prototype.updatePaneSettings=function(e,t){var i=this.paneSettings;i[e].collapsed=t,this.setProperties({paneSettings:i},!0)},f.prototype.splitterProperty=function(){this.splitInstance={currentBarIndex:this.currentBarIndex,nextPaneCollapsible:this.nextPane.classList.contains("e-collapsible"),prevPaneCollapsible:this.previousPane.classList.contains("e-collapsible"),prevPaneExpanded:this.previousPane.classList.contains("e-expanded"),nextPaneExpanded:this.nextPane.classList.contains("e-expanded"),nextPaneCollapsed:this.nextPane.classList.contains("e-collapsed"),prevPaneCollapsed:this.previousPane.classList.contains("e-collapsed"),nextPaneIndex:this.getNextPaneIndex(),prevPaneIndex:this.getPreviousPaneIndex(),nextPaneNextEle:this.nextPane.nextElementSibling,prevPanePreEle:this.previousPane.previousElementSibling}},f.prototype.showCurrentBarIcon=function(){t.removeClass([t.select("."+this.arrow,this.currentSeparator)],m)},f.prototype.updateIconsOnExpand=function(e){this.splitterProperty(),t.addClass([e.target],m),this.splitInstance.prevPaneExpanded||this.splitInstance.nextPaneCollapsed?this.splitInstance.prevPaneExpanded&&this.splitInstance.nextPaneCollapsed&&(this.resizableModel(this.currentBarIndex,!1),this.resizableModel(this.currentBarIndex+1,!1),this.paneSettings[this.nextPaneIndex].collapsible&&this.showCurrentBarIcon(),t.isNullOrUndefined(this.nextBar)||this.hideTargetBarIcon(this.nextBar,this.arrow),this.nextPane&&this.nextPaneIndex===this.allPanes.length-1&&!this.paneSettings[this.nextPaneIndex].collapsible&&this.splitInstance.nextPaneCollapsed&&this.hideTargetBarIcon(this.currentSeparator,this.arrow),this.nextPaneIndex!==this.allPanes.length-1&&this.nextPane.nextElementSibling&&this.nextPane.classList.contains("e-collapsed")&&!this.nextPane.nextElementSibling.classList.contains("e-collapsed")&&this.paneSettings[this.nextPaneIndex].collapsible&&this.showTargetBarIcon(this.nextBar,this.rightArrow)):(this.paneSettings[this.prevPaneIndex].collapsible&&this.showCurrentBarIcon(),this.paneSettings[this.nextPaneIndex].collapsible&&t.removeClass([e.target],m),this.paneSettings[this.currentBarIndex].resizable&&this.resizableModel(this.currentBarIndex,!0),t.isNullOrUndefined(this.prevBar)||this.splitInstance.prevPanePreEle.classList.contains("e-collapsed")?(this.previousPane.previousElementSibling&&this.paneSettings[this.prevPaneIndex].collapsible&&this.previousPane.previousElementSibling.classList.contains("e-collapsed")&&this.paneSettings[this.prevPaneIndex-1].collapsible&&this.showTargetBarIcon(this.prevBar,this.rightArrow),this.paneSettings[this.currentBarIndex+1].collapsible||this.hideTargetBarIcon(this.currentSeparator,this.rightArrow)):(this.paneSettings[this.currentBarIndex-1].resizable&&this.resizableModel(this.currentBarIndex-1,!0),this.paneSettings[this.prevPaneIndex].collapsible&&this.showTargetBarIcon(this.prevBar,this.rightArrow),this.paneSettings[this.currentBarIndex-1].collapsible?this.paneSettings[this.currentBarIndex].collapsible&&!this.paneSettings[this.currentBarIndex+1].collapsible&&this.hideTargetBarIcon(this.currentSeparator,this.rightArrow):(this.hideTargetBarIcon(this.prevBar,this.arrow),this.paneSettings[this.currentBarIndex].collapsible&&!this.paneSettings[this.currentBarIndex+1].collapsible&&this.hideTargetBarIcon(this.currentSeparator,this.rightArrow))))},f.prototype.afterAction=function(e){return t.isBlazor()?{element:this.element,event:e,index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator}:{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator}},f.prototype.currentIndex=function(e){this.currentBarIndex=this.getOrderIndex(parseInt(e.target.parentElement.style.order,10),"splitbar")},f.prototype.getSeparatorIndex=function(e){var i="Horizontal"===this.orientation?h:"e-split-bar-vertical";this.checkBlazor()&&this.allBars.length<1&&(this.allBars=t.selectAll("."+i,this.element));var s=[].slice.call(this.allBars);return(s=this.enableReversePanes?s.reverse():s).indexOf(e)},f.prototype.getPrevBar=function(e){return this.allBars[e-1]},f.prototype.getNextBar=function(e){return this.allBars[e+1]},f.prototype.updateBars=function(e){this.prevBar=this.getPrevBar(e),this.nextBar=this.getNextBar(e)},f.prototype.splitterDetails=function(e){"Horizontal"===this.orientation?this.arrow=e.target.classList.contains(c)?"e-arrow-right":c:this.arrow=e.target.classList.contains(u)?g:u,this.updateCurrentSeparator(e.target),this.currentIndex(e),this.updateBars(this.currentBarIndex),this.getPaneDetails()},f.prototype.triggerResizing=function(e){var i=t.isBlazor()?{element:this.element,event:e,index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator}:{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator};this.trigger("resizing",i)},f.prototype.onMouseDown=function(e){var i=this;e.preventDefault();var s=e.target;if(!s.classList.contains("e-navigate-arrow")){this.updateCurrentSeparator(s),t.addClass([this.currentSeparator],"e-split-bar-active"),this.updateCursorPosition(e,"previous"),this.getPaneDetails();for(var n=t.isBlazor()?{element:this.element,event:e,index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1}:{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1},a=0;a<this.element.querySelectorAll("iframe").length;a++)this.element.querySelectorAll("iframe")[a].style.pointerEvents="none";this.trigger("resizeStart",n,function(t){t.cancel||(i.wireResizeEvents(),i.checkPaneSize(e))})}},f.prototype.updatePaneFlexBasis=function(e){var t;if(e.style.flexBasis.indexOf("%")>0)t=this.removePercentageUnit(e.style.flexBasis);else if(""!==e.style.flexBasis)t=this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis));else{var i="Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight;t=this.convertPixelToPercentage(i)}return t},f.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},f.prototype.convertPercentageToPixel=function(e,i){var s,n=e.toString();if(n.indexOf("%")>-1){s=parseFloat(n.slice(0,n.indexOf("%")));var a=void 0;a=t.isNullOrUndefined(i)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(i)],s=Math.ceil(a*(s/100))}else s=parseInt(n,10);return s},f.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},f.prototype.convertPixelToNumber=function(e){return e.indexOf("p")>-1?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},f.prototype.calcDragPosition=function(e,t){var i;return i=("Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e)/t,(i=i>1?1:i<0?0:i)*t},f.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left:this.element.getBoundingClientRect().top+window.scrollY,i="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(t,i)},f.prototype.getMinMax=function(e,i,s){var n="min"===s?0:null,a=null;return"min"===s?t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(a=this.paneSettings[e].min):t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(a=this.paneSettings[e].max),this.paneSettings.length>0&&!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(a)?(a.indexOf("%")>0&&(a=this.convertPercentageToPixel(a).toString()),this.convertPixelToNumber(a)):n},f.prototype.getPreviousPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)+1:parseInt(this.currentSeparator.style.order,10)-1;return this.getOrderIndex(e,"pane")},f.prototype.getNextPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)-1:parseInt(this.currentSeparator.style.order,10)+1;return this.getOrderIndex(e,"pane")},f.prototype.getPaneDetails=function(){var e=null,t=null;this.order=parseInt(this.currentSeparator.style.order,10),this.allPanes.length>1&&(e=this.getPrevPane(this.order),t=this.getNextPane(this.order)),e&&t&&(this.previousPane=e,this.nextPane=t,this.prevPaneIndex=this.getPreviousPaneIndex(),this.nextPaneIndex=this.getNextPaneIndex())},f.prototype.getPaneHeight=function(e){return"Horizontal"===this.orientation?e.offsetWidth.toString():e.offsetHeight.toString()},f.prototype.isValidSize=function(e){var i=!1;return!t.isNullOrUndefined(this.paneSettings[e])&&!t.isNullOrUndefined(this.paneSettings[e].size)&&this.paneSettings[e].size.indexOf("%")>-1&&(i=!0),i},f.prototype.getPaneDimensions=function(){this.previousPaneHeightWidth=""===this.previousPane.style.flexBasis?this.getPaneHeight(this.previousPane):this.previousPane.style.flexBasis,this.nextPaneHeightWidth=""===this.nextPane.style.flexBasis?this.getPaneHeight(this.nextPane):this.nextPane.style.flexBasis,this.isValidSize(this.prevPaneIndex)&&(this.previousPaneHeightWidth=this.convertPercentageToPixel(this.previousPaneHeightWidth).toString(),this.updatePrePaneInPercentage=!0),this.isValidSize(this.nextPaneIndex)&&(this.nextPaneHeightWidth=this.convertPercentageToPixel(this.nextPaneHeightWidth).toString(),this.updateNextPaneInPercentage=!0),this.prePaneDimenson=this.convertPixelToNumber(this.previousPaneHeightWidth.toString()),this.nextPaneDimension=this.convertPixelToNumber(this.nextPaneHeightWidth.toString())},f.prototype.checkCoordinates=function(e,t){var i=!0;return e!==this.previousCoordinates.x&&t!==this.previousCoordinates.y||(i=!1),i},f.prototype.isCursorMoved=function(e){return"mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType)?this.checkCoordinates(e.pageX,e.pageY):"msie"!==t.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},f.prototype.getBorder=function(){this.border=0;var e="Horizontal"===this.orientation?(this.element.offsetWidth-this.element.clientWidth)/2:(this.element.offsetHeight-this.element.clientHeight)/2;this.border="chrome"!==t.Browser.info.name?this.border:e},f.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions(),this.triggerResizing(e);var t,i=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+i-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+i-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&this.nextPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.prevPaneCurrentWidth=t+this.convertPixelToNumber(this.previousPaneHeightWidth),this.nextPaneCurrentWidth=this.nextPaneHeightWidth-t,this.validateMinMaxValues(),this.nextPaneCurrentWidth<0&&(this.nextPaneCurrentWidth=0),this.prevPaneCurrentWidth<0&&(this.prevPaneCurrentWidth=0),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth>this.totalWidth&&(this.nextPaneCurrentWidth<this.prevPaneCurrentWidth?this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth):this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth)),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth<this.totalWidth){var s=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+s}this.calculateCurrentDimensions(),this.addStaticPaneClass(),this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,this.allPanes.length>2||this.updateSplitterSize()}},f.prototype.validateMinRange=function(e,i,s){var n,a,l=null,r=0;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].min)||(l=this.paneSettings[e].min.toString()),t.isNullOrUndefined(l)||(l.indexOf("%")>0&&(l=this.convertPercentageToPixel(l).toString()),i<(n=this.convertPixelToNumber(l))&&(r=i-n<=0?0:i-n,this.totalWidth=this.totalWidth-r,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),a=n)),t.isNullOrUndefined(a)?i:a},f.prototype.validateMaxRange=function(e,i,s){var n,a,l=null;return t.isNullOrUndefined(this.paneSettings[e])||t.isNullOrUndefined(this.paneSettings[e].max)||(l=this.paneSettings[e].max.toString()),t.isNullOrUndefined(l)||(l.indexOf("%")>0&&(l=this.convertPercentageToPixel(l).toString()),i>(n=this.convertPixelToNumber(l))&&(this.totalWidth=this.totalWidth-(i-n),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),a=n)),t.isNullOrUndefined(a)?i:a},f.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth,this.previousPane),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth,this.nextPane)},f.prototype.equatePaneWidths=function(){var e;this.prevPaneCurrentWidth+this.nextPaneCurrentWidth>this.totalPercent&&(e=this.prevPaneCurrentWidth+this.nextPaneCurrentWidth-this.totalPercent,this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-e/2+"%"),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth<this.totalPercent&&(e=this.totalPercent-(this.prevPaneCurrentWidth+this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e/2+"%")},f.prototype.calculateCurrentDimensions=function(){this.updatePrePaneInPercentage||this.updateNextPaneInPercentage?(this.prevPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.prevPaneCurrentWidth))/10)),this.nextPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.nextPaneCurrentWidth))/10)),0===this.prevPaneCurrentWidth&&(this.nextPaneCurrentWidth=this.totalPercent),0===this.nextPaneCurrentWidth&&(this.prevPaneCurrentWidth=this.totalPercent),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth!==this.totalPercent?this.equatePaneWidths():(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"%"),this.prevPaneCurrentWidth=this.updatePrePaneInPercentage?this.prevPaneCurrentWidth:this.convertPercentageToPixel(this.prevPaneCurrentWidth)+"px",this.nextPaneCurrentWidth=this.updateNextPaneInPercentage?this.nextPaneCurrentWidth:this.convertPercentageToPixel(this.nextPaneCurrentWidth)+"px",this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1):(this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+"px",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+"px")},f.prototype.addStaticPaneClass=function(){this.previousPane.classList.contains(d)||this.previousPane.classList.add(d),this.nextPane.classList.contains(d)||this.nextPane.classList.add(d)},f.prototype.validateDraggedPosition=function(e,i,s){var n="Horizontal"===this.orientation?this.currentSeparator.offsetLeft:this.currentSeparator.offsetTop,a=n-i,l=s+n,r=this.getMinMax(this.prevPaneIndex,this.previousPane,"min"),o=this.getMinMax(this.nextPaneIndex,this.nextPane,"min"),h=this.getMinMax(this.prevPaneIndex,this.previousPane,"max"),d=this.getMinMax(this.nextPaneIndex,this.nextPane,"max"),p=e;return e>l-o?p=l-o:e<a+r&&(p=a+r),t.isNullOrUndefined(h)?t.isNullOrUndefined(d)||e<l-d&&(p=l-d):e>a+h&&(p=a+h),p},f.prototype.onMouseUp=function(e){t.removeClass([this.currentSeparator],"e-split-bar-active"),this.unwireResizeEvents();for(var i=t.isBlazor()?{event:e,element:this.element,index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]}:{event:e,element:this.element,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,paneSize:[this.prePaneDimenson,this.nextPaneDimension]},s=0;s<this.element.querySelectorAll("iframe").length;s++)this.element.querySelectorAll("iframe")[s].style.pointerEvents="auto";if(this.trigger("resizeStop",i),this.enablePersistence){var n=this.paneSettings;n[this.getPreviousPaneIndex()].size=this.allPanes[this.getPreviousPaneIndex()].style.flexBasis,n[this.getNextPaneIndex()].size=this.allPanes[this.getNextPaneIndex()].style.flexBasis,this.setProperties({paneSettings:n},!0)}},f.prototype.panesDimension=function(e,i){var s,n=i.length;parseInt(this.getHeight(this.element),10),t.isNullOrUndefined(this.paneSettings[e])?t.setStyleAttribute(i[e],{order:2*e}):t.isNullOrUndefined(this.paneSettings[e].size)?(this.sizeFlag=!0,t.setStyleAttribute(i[e],{order:2*e})):(s=this.paneSettings[e].size,e<n&&(t.setStyleAttribute(i[e],{"flex-basis":s,order:2*e}),e<n-1&&""!==this.paneSettings[e].size?t.addClass([i[e]],d):this.sizeFlag||(i[e].style.flexBasis=null),e===n-1&&this.sizeFlag&&""!==this.paneSettings[e].size&&t.addClass([i[e]],d))),this.paneOrder.push(2*e)},f.prototype.setTemplate=function(e,t){t.innerHTML="",e="string"==typeof e?this.sanitizeHelper(e):e,this.templateCompile(t,e),this.isReact&&this.renderReactTemplates()},f.prototype.templateCompile=function(e,t){var i=this.createElement("div");this.compileElement(i,t,"content"),0!==i.childNodes.length&&[].slice.call(i.childNodes).forEach(function(t){e.appendChild(t)})},f.prototype.compileElement=function(e,i,s){if("string"==typeof i)if("."===i[0]||"#"===i[0]){var n=document.querySelector(i);if(!t.isNullOrUndefined(n))return this.templateElement.push(n),"none"===n.style.display&&n.style.removeProperty("display"),""===n.getAttribute("style")&&n.removeAttribute("style"),void e.appendChild(n);i=i.trim()}else i=i.trim();var a;a=t.isNullOrUndefined(i.outerHTML)?t.compile(i):t.compile(i.outerHTML);var l;t.isNullOrUndefined(a)||(l=t.isBlazor()&&!this.isStringTemplate?a({},this,s,this.element.id+"content"+this.allPanes.length.toString(),this.isStringTemplate):a({},this,s,this.element.id+"content"+this.allPanes.length.toString(),!0)),!t.isNullOrUndefined(a)&&l&&l.length>0&&[].slice.call(l).forEach(function(t){e.appendChild(t)})},f.prototype.paneCollapsible=function(e,i){this.paneSettings[i].collapsible?t.addClass([e],"e-collapsible"):t.removeClass([e],"e-collapsible")},f.prototype.createSplitPane=function(e){var i=e.children.length;if(!this.checkBlazor())for(o=0;o<this.paneSettings.length;o++)if(i<this.paneSettings.length){var s=this.createElement("div");this.element.appendChild(s),i+=1}i=e.children.length;var n=[].slice.call(e.children);if(this.sizeFlag=!1,i>0)for(var o=0;o<i;o++)"DIV"!==n[o].nodeName&&"SPAN"!==n[o].nodeName||(this.checkBlazor()&&n[o].classList.contains(a)?this.allPanes.push(n[o]):this.checkBlazor()||this.allPanes.push(n[o]),this.checkBlazor()||("Horizontal"===this.orientation?(t.addClass([n[o]],[a,l,"e-scrollable"]),this.panesDimension(o,n)):(t.addClass([n[o]],[a,r,"e-scrollable"]),this.panesDimension(o,n)),t.isNullOrUndefined(this.paneSettings[o])||t.isNullOrUndefined(this.paneSettings[o].content)||this.setTemplate(this.paneSettings[o].content,n[o]),!t.isNullOrUndefined(this.paneSettings[o])&&this.paneSettings[o].cssClass&&this.setCssClass(n[o],this.paneSettings[o].cssClass),t.isNullOrUndefined(this.paneSettings[o])||this.paneCollapsible(n[o],o)))},f.prototype.expand=function(e){this.collapsedOnchange(e),this.updatePaneSettings(e,!1)},f.prototype.collapse=function(e){this.isCollapsed(e),this.updatePaneSettings(e,!0)},f.prototype.destroy=function(){if(!this.isDestroyed){for(this.checkBlazor()||e.prototype.destroy.call(this),t.EventHandler.remove(document,"touchstart click",this.onDocumentClick);this.element.attributes.length>0;)this.element.removeAttribute(this.element.attributes[0].name);if(this.checkBlazor())for(var i=this.element.children,s=i.length-1;s>=0;s--)t.detach(i[s]);else{this.element.innerHTML=this.wrapper.innerHTML;for(s=0;s<this.wrapper.attributes.length;s++)this.element.setAttribute(this.wrapper.attributes[s].name,this.wrapper.attributes[s].value)}this.refreshing&&(t.addClass([this.element],["e-control","e-lib",n]),this.allBars=[],this.allPanes=[]),this.restoreElem(),this.isReact&&this.clearTemplate()}},f.prototype.restoreElem=function(){if(this.templateElement.length>0)for(var e=0;e<this.templateElement.length;e++)this.templateElement[e].style.display="none",document.body.appendChild(this.templateElement[e])},f.prototype.addPaneClass=function(e){return"Horizontal"===this.orientation?t.addClass([e],[a,l,"e-scrollable"]):t.addClass([e],[a,r,"e-scrollable"]),e},f.prototype.removePaneOrders=function(e){for(var t=this.element.childNodes,i=[],s=0;t.length<0;s++)t[s].classList.contains(e)&&i.push(t[s]);for(s=0;s<i.length;s++)i[s].style.removeProperty("order")},f.prototype.setPaneOrder=function(){for(var e=0;e<this.allPanes.length;e++)this.panesDimension(e,this.allPanes)},f.prototype.removeSeparator=function(){for(var e=0;e<this.allBars.length;e++)t.detach(this.allBars[e]);this.allBars=[]},f.prototype.updatePanes=function(){this.setPaneOrder(),this.removeSeparator(),this.addSeparator(this.element)},f.prototype.addPane=function(e,i){var s=this.createElement("div");s=this.addPaneClass(s),i=i>this.allPanes.length+1?this.allPanes.length:i;var n={size:t.isNullOrUndefined(e.size)?"":e.size,min:t.isNullOrUndefined(e.min)?null:e.min,max:t.isNullOrUndefined(e.max)?null:e.max,content:t.isNullOrUndefined(e.content)?"":e.content,resizable:!!t.isNullOrUndefined(e.resizable)||e.resizable,collapsible:!t.isNullOrUndefined(e.collapsible)&&e.collapsible,collapsed:!t.isNullOrUndefined(e.collapsed)&&e.collapsed,cssClass:t.isNullOrUndefined(e.cssClass)?"":e.cssClass};this.paneSettings.splice(i,0,n),this.setProperties({paneSettings:this.paneSettings},!0),"Horizontal"===this.orientation?(this.element.insertBefore(s,this.element.querySelectorAll("."+l)[i]),this.removePaneOrders(l)):(this.element.insertBefore(s,this.element.querySelectorAll("."+r)[i]),this.removePaneOrders(r)),this.allPanes.splice(i,0,s),this.updatePanes(),this.setTemplate(this.paneSettings[i].content,s),this.setCssClass(this.allPanes[i],e.cssClass),this.allPanes[this.allPanes.length-1].classList.remove(d)},f.prototype.removePane=function(e){e=e>this.allPanes.length+1?this.allPanes.length:e;var i="Horizontal"===this.orientation?l:r;t.isNullOrUndefined(this.element.querySelectorAll("."+i)[e])||(t.detach(this.element.querySelectorAll("."+i)[e]),this.allPanes.splice(e,1),this.removePaneOrders(i),this.updatePanes(),this.paneSettings.splice(e,1),this.setProperties({paneSettings:this.paneSettings},!0),this.allPanes.length>0&&this.allPanes[this.allPanes.length-1].classList.remove(d))},s([t.Property("100%")],f.prototype,"height",void 0),s([t.Property(!1)],f.prototype,"enableReversePanes",void 0),s([t.Property("100%")],f.prototype,"width",void 0),s([t.Property(!1)],f.prototype,"enablePersistence",void 0),s([t.Collection([],v)],f.prototype,"paneSettings",void 0),s([t.Property("Horizontal")],f.prototype,"orientation",void 0),s([t.Property("")],f.prototype,"cssClass",void 0),s([t.Property(!0)],f.prototype,"enabled",void 0),s([t.Property(!0)],f.prototype,"enableHtmlSanitizer",void 0),s([t.Property(null)],f.prototype,"separatorSize",void 0),s([t.Event()],f.prototype,"beforeSanitizeHtml",void 0),s([t.Event()],f.prototype,"created",void 0),s([t.Event()],f.prototype,"resizeStart",void 0),s([t.Event()],f.prototype,"resizing",void 0),s([t.Event()],f.prototype,"resizeStop",void 0),s([t.Event()],f.prototype,"beforeCollapse",void 0),s([t.Event()],f.prototype,"beforeExpand",void 0),s([t.Event()],f.prototype,"collapsed",void 0),s([t.Event()],f.prototype,"expanded",void 0),f=s([t.NotifyPropertyChanges],f)}(t.Component),P=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),y=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},C="e-drag",x=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return P(i,e),y([t.Property("")],i.prototype,"id",void 0),y([t.Property("")],i.prototype,"cssClass",void 0),y([t.Property("")],i.prototype,"header",void 0),y([t.Property("")],i.prototype,"content",void 0),y([t.Property(!0)],i.prototype,"enabled",void 0),y([t.Property(0)],i.prototype,"row",void 0),y([t.Property(0)],i.prototype,"col",void 0),y([t.Property(1)],i.prototype,"sizeX",void 0),y([t.Property(1)],i.prototype,"sizeY",void 0),y([t.Property(1)],i.prototype,"minSizeY",void 0),y([t.Property(1)],i.prototype,"minSizeX",void 0),y([t.Property(null)],i.prototype,"maxSizeY",void 0),y([t.Property(null)],i.prototype,"maxSizeX",void 0),y([t.Property(1e3)],i.prototype,"zIndex",void 0),i}(t.ChildProperty),S=function(e){function i(i,s){var n=e.call(this,i,s)||this;return n.rows=1,n.panelID=0,n.movePanelCalled=!1,n.resizeCalled=!1,n.mOffX=0,n.mOffY=0,n.maxTop=9999,n.maxRows=100,n.mouseX=0,n.mouseY=0,n.minTop=0,n.minLeft=0,n.isBlazor=!1,n.isInlineRendering=!1,n.removeAllCalled=!1,n.isPanelRemoved=!1,n.panelsSizeY=0,n.resizeHeight=!1,t.setValue("mergePersistData",n.mergePersistPanelData,n),n}return P(i,e),i.prototype.preRender=function(){this.isBlazor=t.isBlazor()&&this.isServerRendered,this.panelCollection=[],this.sortedArray=[],this.gridPanelCollection=[],this.overlapElement=[],this.overlapElementClone=[],this.overlapSubElementClone=[],this.collisionChecker={},this.dragCollection=[],this.elementRef={top:"",left:"",height:"",width:""},this.dimensions=[],this.allItems=[],this.oldRowCol={},this.availableClasses=[],this.setOldRowCol(),this.calculateCellSize(),this.contentTemplateChild=[].slice.call(this.element.children)},i.prototype.setOldRowCol=function(){for(var e=0;e<this.panels.length;e++)this.panels[e].id||(this.panelPropertyChange(this.panels[e],{id:"layout_"+this.panelID.toString()}),this.panelID=this.panelID+1),this.oldRowCol[this.panels[e].id]={row:this.panels[e].row,col:this.panels[e].col}},i.prototype.createPanelElement=function(e,i){var s=this.createElement("div");return e&&e.length>0&&t.addClass([s],e),i&&s.setAttribute("id",i),s},i.prototype.render=function(){this.initialize(),this.isRenderComplete=!0,this.showGridLines&&!this.checkMediaQuery()&&this.initGridLines(),this.updateDragArea(),this.renderComplete(),this.updateServerPanelData(),this.renderReactTemplates()},i.prototype.updateServerPanelData=function(){t.isBlazor()&&this.isServerRendered&&(this.setProperties({panels:this.panels},!0),this.allowServerDataBinding=!0,this.serverDataBind())},i.prototype.initGridLines=function(){this.table=document.createElement("table");var e=document.createElement("tbody");this.table.classList.add("e-dashboard-gridline-table");for(var t=0;t<this.maxRow();t++){for(var i=document.createElement("tr"),s=0;s<this.columns;s++){var n=document.createElement("td");n.classList.add("e-dashboard-gridline"),this.setAttributes({value:{row:t.toString(),col:s.toString(),sizeX:"1",sizeY:"1"}},n),n.setAttribute("id",""+s),this.setPanelPosition(n,t,s),this.setHeightAndWidth(n,{row:t,col:s,sizeX:1,sizeY:1}),i.appendChild(n)}e.appendChild(i)}this.table.appendChild(e),this.element.appendChild(this.table),this.renderReactTemplates()},i.prototype.initialize=function(){if(this.updateRowHeight(),this.element.childElementCount>0&&this.element.querySelectorAll(".e-panel").length>0&&!(this.isBlazor&&this.panels.length>0)){var e=[];this.setProperties({panels:[]},!0),this.isInlineRendering=!0;for(i=0;i<this.element.querySelectorAll(".e-panel").length;i++)e.push(this.element.querySelectorAll(".e-panel")[i]);for(i=0;i<e.length;i++){s=e[i];this.enableRtl&&t.addClass([s],"e-rtl"),this.getInlinePanels(s),this.maxCol(),this.maxRow()}for(var i=0;i<this.panels.length;i++){var s=this.element.querySelector("#"+this.panels[i].id);if(this.setMinMaxValues(this.panels[i]),this.maxColumnValue<this.panels[i].col||this.maxColumnValue<this.panels[i].col+this.panels[i].sizeX){var n=this.maxColumnValue-this.panels[i].sizeX;this.panelPropertyChange(this.panels[i],{col:n<0?0:n})}this.setXYAttributes(s,this.panels[i]),this.isBlazor=!1;var a=this.renderPanels(s,this.panels[i],this.panels[i].id,!1);this.isBlazor=t.isBlazor()&&this.isServerRendered,this.panelCollection.push(a),this.setHeightAndWidth(s,this.panels[i]),this.tempObject=this,this.mediaQuery&&!window.matchMedia("("+this.mediaQuery+")").matches&&(this.setPanelPosition(s,this.panels[i].row,this.panels[i].col),this.mainElement=s,this.updatePanelLayout(s,this.panels[i]),this.mainElement=null),this.setClasses([s])}this.updateOldRowColumn(),this.checkMediaQuery()&&this.checkMediaQuerySizing()}else this.renderDashBoardCells(this.panels);!this.allowDragging||this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches||this.enableDraggingContent(this.panelCollection),this.sortedPanel(),this.bindEvents(),this.updatePanels(),this.updateCloneArrayObject(),this.checkColumnValue=this.maxColumnValue,this.checkMediaQuery()||this.panelResponsiveUpdate(),this.isBlazor||this.setEnableRtl()},i.prototype.checkMediaQuery=function(){return this.mediaQuery&&window.matchMedia("("+this.mediaQuery+")").matches},i.prototype.calculateCellSize=function(){this.cellSize=[],this.checkMediaQuery()?this.cellSize[1]=this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio:(this.cellSize[0]=this.element.parentElement&&this.element.parentElement.offsetWidth,this.cellSize[0]=this.element.parentElement&&(this.element.parentElement.offsetWidth-(this.maxCol()-1)*this.cellSpacing[0])/this.maxCol(),this.cellSize[1]=this.cellSize[0]/this.cellAspectRatio)},i.prototype.maxRow=function(e){var i=1;if(this.rows>1&&t.isNullOrUndefined(e))return i=this.rows;for(var s=0;s<this.panels.length;s++)this.panels[s].sizeY+this.panels[s].row>i&&(i=this.panels[s].sizeY+this.panels[s].row);return 0===this.panels.length&&(i=this.columns),i},i.prototype.maxCol=function(){var e=1;return e=this.columns,this.maxColumnValue=e,e},i.prototype.updateOldRowColumn=function(){for(var e=0;e<this.panels.length;e++){var t=this.panels[e].id;if(document.getElementById(t)){var i=parseInt(document.getElementById(t).getAttribute("data-row"),10),s=parseInt(document.getElementById(t).getAttribute("data-col"),10);this.oldRowCol[this.panels[e].id]={row:i,col:s}}}},i.prototype.createSubElement=function(e,i,s){var n=this.createElement("div");return s&&t.addClass([n],[s]),e&&e.length>0&&t.addClass([n],e),i&&n.setAttribute("id",i),n},i.prototype.templateParser=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(s){var i=t.SanitizeHtmlHelper.sanitize(e);return t.compile(this.enableHtmlSanitizer&&"string"==typeof e?i:e)}},i.prototype.renderTemplate=function(e,i,s,n,a){var l=this.templateParser(e),r=[];if("."!==e[0]&&"#"!==e[0]||"SCRIPT"===document.querySelector(e).tagName){var o=l({},this,a,s,n,null,i);if(o){for(var h=0,d=o;h<d.length;h++){var p=d[h];r.push(p)}t.append([].slice.call(r),i)}}else{var c=document.querySelector(e);if(!t.isNullOrUndefined(c))return"none"===c.style.display&&c.style.removeProperty("display"),""===c.getAttribute("style")&&c.removeAttribute("style"),void i.appendChild(c);e=e.trim()}},i.prototype.renderPanels=function(e,i,s,n){this.isBlazor||t.addClass([e],["e-panel","e-panel-transition"]);var a=i.cssClass?i.cssClass.split(" "):null;if(this.panelContent=e.querySelector(".e-panel-container")?e.querySelector(".e-panel-container"):this.createSubElement(a,e.id+"_content","e-panel-container"),this.isBlazor||(e.appendChild(this.panelContent),i.enabled||this.disablePanel(e)),i.header){var l=e.querySelector(".e-panel-header")?e.querySelector(".e-panel-header"):this.createSubElement([],e.id+"template","");if(this.isBlazor||t.addClass([l],["e-panel-header"]),!e.querySelector(".e-panel-header")&&!this.isBlazor){h=this.element.id+"HeaderTemplate"+s;this.renderTemplate(i.header,l,h,n,"header"),this.panelContent.appendChild(l),this.renderReactTemplates(),t.updateBlazorTemplate(h,"HeaderTemplate",i)}}if(i.content){var r=i.cssClass?i.cssClass.split(" "):null;this.panelBody=e.querySelector(".e-panel-content")?e.querySelector(".e-panel-content"):this.createSubElement(r,e.id+"_body","e-panel-content");var o="calc( 100% - "+(this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px")+")";if(t.setStyleAttribute(this.panelBody,{height:o}),!e.querySelector(".e-panel-content")&&!this.isBlazor){var h=this.element.id+"ContentTemplate"+s;this.renderTemplate(i.content,this.panelBody,h,n,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates(),t.updateBlazorTemplate(h,"ContentTemplate",i)}}return e},i.prototype.disablePanel=function(e){t.addClass([e],["e-disabled"])},i.prototype.getInlinePanels=function(e){var i={sizeX:e.hasAttribute("data-sizex")?parseInt(e.getAttribute("data-sizex"),10):1,sizeY:e.hasAttribute("data-sizey")?parseInt(e.getAttribute("data-sizey"),10):1,minSizeX:e.hasAttribute("data-minsizex")?parseInt(e.getAttribute("data-minsizex"),10):1,minSizeY:e.hasAttribute("data-minsizey")?parseInt(e.getAttribute("data-minsizey"),10):1,maxSizeX:e.hasAttribute("data-maxsizex")?parseInt(e.getAttribute("data-maxsizex"),10):null,maxSizeY:e.hasAttribute("data-maxsizey")?parseInt(e.getAttribute("data-maxsizey"),10):null,row:e.hasAttribute("data-row")?parseInt(e.getAttribute("data-row"),10):0,col:e.hasAttribute("data-col")?parseInt(e.getAttribute("data-col"),10):0,id:e.getAttribute("id"),zIndex:e.hasAttribute("data-zindex")?parseInt(e.getAttribute("data-zIndex"),10):1e3,header:e.querySelector(".e-panel-header")&&".e-panel-header",content:e.querySelector(".e-panel-content")&&".e-panel-content"};i.id||(i.id="layout_"+this.panelID.toString(),e.setAttribute("id",i.id),this.panelID=this.panelID+1),t.isUndefined(i.enabled)&&(i.enabled=!0),e.style.zIndex=""+i.zIndex;var s=new x(this,"panels",i,!0);this.panels.push(s)},i.prototype.resizeEvents=function(){if(this.allowResizing)for(var e=this.element.querySelectorAll(".e-panel .e-panel-container .e-resize"),i=0;i<e.length;i++){var s="msie"===t.Browser.info.name?"mousedown pointerdown":"mousedown";t.EventHandler.add(e[i],s,this.downResizeHandler,this),"msie"!==t.Browser.info.name&&t.EventHandler.add(e[i],"touchstart",this.touchDownResizeHandler,this)}},i.prototype.bindEvents=function(){this.refreshListener=this.refresh.bind(this),t.EventHandler.add(window,"resize",this.refreshListener),this.resizeEvents()},i.prototype.downResizeHandler=function(e){this.downHandler(e),this.lastMouseX=e.pageX,this.lastMouseY=e.pageY;var i="msie"===t.Browser.info.name?"mousemove pointermove":"mousemove",s="msie"===t.Browser.info.name?"mouseup pointerup":"mouseup";this.isMouseMoveBound||(t.EventHandler.add(document,i,this.moveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(t.EventHandler.add(document,s,this.upResizeHandler,this),this.isMouseUpBound=!0)},i.prototype.downHandler=function(e){this.resizeCalled=!1,this.panelsInitialModel=this.cloneModels(this.panels);var i=t.closest(e.currentTarget,".e-panel"),s={event:e,element:i,isInteracted:!0};this.trigger("resizeStart",s),this.downTarget=e.currentTarget,this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),t.addClass([this.element],["e-prevent"]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.elementX=parseFloat(i.style.left),this.elementY=parseFloat(i.style.top),this.elementWidth=i.offsetWidth,this.elementHeight=i.offsetHeight,this.originalWidth=this.getCellInstance(i.id).sizeX,this.originalHeight=this.getCellInstance(i.id).sizeY,this.previousRow=this.getCellInstance(i.id).row},i.prototype.touchDownResizeHandler=function(e){this.downHandler(e),this.lastMouseX=e.changedTouches[0].pageX,this.lastMouseY=e.changedTouches[0].pageY,this.isMouseMoveBound||(t.EventHandler.add(document,"touchmove",this.touchMoveResizeHandler,this),this.isMouseMoveBound=!0),this.isMouseUpBound||(t.EventHandler.add(document,"touchend",this.upResizeHandler,this),this.isMouseUpBound=!0)},i.prototype.getCellSize=function(){return[this.cellSize[0],this.cellSize[1]]},i.prototype.updateMaxTopLeft=function(e){this.moveTarget=this.downTarget;var i={event:e,element:t.closest(this.moveTarget,".e-panel"),isInteracted:!0};this.trigger("resize",i)},i.prototype.updateResizeElement=function(e){this.maxLeft=this.element.offsetWidth-1,this.maxTop=this.cellSize[1]*this.maxRows-1,t.removeClass([e],"e-panel-transition"),t.addClass([e],["e-dragging"]);for(var i=["e-east","e-west","e-north","e-south","e-south-east","e-north-east","e-north-west","e-south-west"],s=0;s<this.moveTarget.classList.length;s++)-1!==i.indexOf(this.moveTarget.classList[s])&&(this.handleClass=this.moveTarget.classList[s])},i.prototype.moveResizeHandler=function(e){this.updateMaxTopLeft(e);var i=t.closest(this.moveTarget,".e-panel");if(this.lastMouseX!==e.pageX&&this.lastMouseY!==e.pageY){this.updateResizeElement(i);var s=this.getCellInstance(i.getAttribute("id"));this.mouseX=e.pageX,this.mouseY=e.pageY;var n=this.mouseY-this.lastMouseY+this.mOffY,a=this.mouseX-this.lastMouseX+this.mOffX;this.mOffX=this.mOffY=0,this.lastMouseY=this.mouseY,this.lastMouseX=this.mouseX,this.resizingPanel(i,s,a,n)}},i.prototype.touchMoveResizeHandler=function(e){this.updateMaxTopLeft(e);var i=t.closest(this.moveTarget,".e-panel");if(this.lastMouseX!==e.changedTouches[0].pageX&&this.lastMouseY!==e.changedTouches[0].pageY){this.updateResizeElement(i);var s=this.getCellInstance(i.getAttribute("id"));this.mouseX=e.changedTouches[0].pageX,this.mouseY=e.changedTouches[0].pageY;var n=this.mouseX-this.lastMouseX+this.mOffX,a=this.mouseY-this.lastMouseY+this.mOffY;this.mOffX=this.mOffY=0,this.lastMouseX=this.mouseX,this.lastMouseY=this.mouseY,this.resizingPanel(i,s,n,a)}},i.prototype.resizingPanel=function(e,t,i,s){var n=this.getCellInstance(e.id).sizeX,a=this.getCellInstance(e.id).sizeY,l=s,r=i;this.handleClass.indexOf("north")>=0&&(this.elementHeight-l<this.getMinHeight(t)?(s=this.elementHeight-this.getMinHeight(t),this.mOffY=l-s):t.maxSizeY&&this.elementHeight-l>this.getMaxHeight(t)?(s=this.elementHeight-this.getMaxHeight(t),this.mOffY=l-s):this.elementY+l<this.minTop&&(s=this.minTop-this.elementY,this.mOffY=l-s),this.elementY+=s,this.elementHeight-=s),this.handleClass.indexOf("south")>=0&&(this.elementHeight+l<this.getMinHeight(t)?(s=this.getMinHeight(t)-this.elementHeight,this.mOffY=l-s):t.maxSizeY&&this.elementHeight+l>this.getMaxHeight(t)&&(s=this.getMaxHeight(t)-this.elementHeight,this.mOffY=l-s),this.elementHeight+=s),this.handleClass.indexOf("west")>=0&&(this.elementWidth-r<this.getMinWidth(t)?(i=this.elementWidth-this.getMinWidth(t),this.mOffX=r-i):t.maxSizeX&&this.elementWidth-r>this.getMaxWidth(t)?(i=this.elementWidth-this.getMaxWidth(t),this.mOffX=r-i):this.elementX+r<this.minLeft&&(i=this.minLeft-this.elementX,this.mOffX=r-i),this.elementX+=i,this.elementWidth-=i),this.handleClass.indexOf("east")>=0&&(this.elementWidth+r<this.getMinWidth(t)?(i=this.getMinWidth(t)-this.elementWidth,this.mOffX=r-i):t.maxSizeX&&this.elementWidth+r>this.getMaxWidth(t)?(i=this.getMaxWidth(t)-this.elementWidth,this.mOffX=r-i):this.elementX+this.elementWidth+r>this.maxLeft&&(i=this.maxLeft-this.elementX-this.elementWidth,this.mOffX=r-i),this.elementWidth+=i),e.style.top=this.elementY+"px",e.style.left=this.elementX+"px",e.style.width=this.elementWidth+"px",e.style.height=this.elementHeight+"px";var o=this.getResizeRowColumn(t);if(o.col+o.sizeX>this.columns&&this.panelPropertyChange(o,{sizeX:o.sizeX-1}),this.shadowEle.style.top=o.row*this.getCellSize()[1]+o.row*this.cellSpacing[1]+"px",this.shadowEle.style.left=o.col*this.getCellSize()[0]+o.col*this.cellSpacing[0]+"px",this.shadowEle.style.height=o.sizeY*(this.getCellSize()[1]+this.cellSpacing[1])+"px",this.shadowEle.style.width=o.sizeX*(this.getCellSize()[0]+this.cellSpacing[0])+"px",n!==o.sizeX||a!==o.sizeY){n=o.sizeX,a=o.sizeY;var h=this.getCellInstance(e.id),d={attributes:{row:h.row.toString(),col:h.col.toString(),sizeX:h.sizeX.toString(),sizeY:h.sizeY.toString()}};this.setAttributes(d,e),this.mainElement=e,this.updatePanelLayout(e,this.getCellInstance(e.id)),this.updateOldRowColumn(),this.sortedPanel()}},i.prototype.upResizeHandler=function(e){if(!t.isNullOrUndefined(this.downTarget)){this.updateServerPanelData(),this.upTarget=this.downTarget;var i=t.closest(this.upTarget,".e-panel"),s={event:e,element:i,isInteracted:!0};if(i){t.addClass([i],"e-panel-transition");var n="msie"===t.Browser.info.name?"mousemove pointermove":"mousemove",a="msie"===t.Browser.info.name?"mouseup pointerup":"mouseup";t.EventHandler.remove(document,n,this.moveResizeHandler),t.EventHandler.remove(document,a,this.upResizeHandler),"msie"!==t.Browser.info.name&&(t.EventHandler.remove(document,"touchmove",this.touchMoveResizeHandler),t.EventHandler.remove(document,"touchend",this.upResizeHandler)),this.isMouseUpBound=!1,this.isMouseMoveBound=!1,this.shadowEle&&t.detach(this.shadowEle),this.shadowEle=null;var l=this.getCellInstance(i.getAttribute("id"));this.setPanelPosition(i,l.row,l.col),this.setHeightAndWidth(i,l)}t.removeClass([i],["e-dragging"]),this.trigger("resizeStop",s),this.resizeCalled=!1,this.lastMouseX=this.lastMouseY=void 0,this.mOffX=this.mOffY=0,this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.updatePanels(),this.updateCloneArrayObject(),this.checkForChanges(!0)}},i.prototype.getResizeRowColumn=function(e){var t=!1,i=e.col;-1!==["e-west","e-south-west"].indexOf(this.handleClass)&&(i=this.pixelsToColumns(this.elementX,!1));var s=e.row;-1!==["e-north"].indexOf(this.handleClass)&&(s=this.pixelsToRows(this.elementY,!1),this.previousRow!==s&&(this.previousRow=s,t=!0));var n=e.sizeX;-1===["e-north","e-south"].indexOf(this.handleClass)&&(n=this.pixelsToColumns(this.elementWidth-n*this.cellSpacing[1],!0));var a=e.sizeY;return-1===["e-east","e-west"].indexOf(this.handleClass)&&("e-north"!==this.handleClass||t)&&(a=this.pixelsToRows(this.elementHeight-a*this.cellSpacing[0],!0)),e.col+e.sizeX>this.columns&&(e.sizeX=e.sizeX-1),(s>-1&&i>-1&&n+i<=this.maxCol()&&a+s<=this.maxRow()&&0===this.collisions(s,i,n,a,this.getPanelBase(e.id)).length||!1!==this.allowPushing)&&this.panelPropertyChange(e,{row:s,col:i,sizeX:n,sizeY:a}),e},i.prototype.pixelsToColumns=function(e,t){var i=this.cellSize[0];return t?Math.ceil(e/i):Math.floor(e/i)},i.prototype.pixelsToRows=function(e,t){return t?Math.round(e/this.cellSize[1]):Math.round(e/(this.cellSize[1]+this.cellSpacing[0]))},i.prototype.getMinWidth=function(e){return e.minSizeX*this.getCellSize()[0]},i.prototype.getMaxWidth=function(e){return e.maxSizeX*this.getCellSize()[0]},i.prototype.getMinHeight=function(e){return e.minSizeY*this.getCellSize()[1]},i.prototype.getMaxHeight=function(e){return e.maxSizeY*this.getCellSize()[1]},i.prototype.sortedPanel=function(){this.sortedArray=[];for(var e=0,t=this.panelCollection.length;e<t;++e)this.sortItem(this.panelCollection[e])},i.prototype.moveItemsUpwards=function(){if(!1!==this.allowFloating){for(var e=0,t=this.sortedArray.length;e<t;++e){var i=this.sortedArray[e];if(i)for(var s=0,n=i.length;s<n;++s){var a=i[s];a&&this.moveItemUpwards(a)}}this.updateGridLines()}},i.prototype.moveItemUpwards=function(e){if(!1!==this.allowFloating&&e!==this.mainElement){for(var t=this.getCellInstance(e.id).col,i=parseInt(e.getAttribute("data-sizeY"),10),s=parseInt(e.getAttribute("data-sizeX"),10),n=null,a=null,l=parseInt(e.getAttribute("data-row"),10)-1;l>-1&&0===this.collisions(l,t,s,i,e).length;)n=l,a=t,--l;null!==n&&this.sortItem(e,n,a)}},i.prototype.sortItem=function(e,t,i){this.overlapElement=[];var s=parseInt(e.getAttribute("data-col"),10),n=parseInt(e.getAttribute("data-row"),10);if(this.sortedArray[n]||(this.sortedArray[n]=[]),this.sortedArray[n][s]=e,void 0!==e&&void 0!==t&&void 0!==i){if(void 0!==this.oldRowCol[e.id]&&null!==this.oldRowCol[e.id].row&&void 0!==this.oldRowCol[e.id].col){var a=this.sortedArray[this.oldRowCol[e.id].row];this.oldRowCol[e.id]&&a[this.oldRowCol[e.id].col]===e&&(delete a[this.oldRowCol[e.id].col],this.updateOldRowColumn(),this.sortedPanel())}this.oldRowCol[e.id].row=t,this.oldRowCol[e.id].row=i,this.sortedArray[n]||(this.sortedArray[n]=[]),this.sortedArray[n][s]=e,-1===this.allItems.indexOf(e)&&this.allItems.push(e),this.panelPropertyChange(this.getCellInstance(e.id),{row:t,col:i});var l=this.getCellInstance(e.id);this.setAttributes({value:{col:l.col.toString(),row:l.row.toString()}},e),this.updateLayout(e,this.getCellInstance(e.id))}},i.prototype.updateLayout=function(e,t){this.setPanelPosition(e,t.row,t.col),this.setHeightAndWidth(e,t),this.updateRowHeight(),this.sortedPanel()},i.prototype.refresh=function(){if(this.panelsSizeY=0,this.updateDragArea(),this.checkMediaQuery())this.checkMediaQuerySizing();else{if(this.element.classList.contains("e-responsive")){t.removeClass([this.element],["e-responsive"]);for(var e=0;e<this.element.querySelectorAll(".e-panel").length;e++){var i=this.element.querySelectorAll(".e-panel")[e],s=this.getCellInstance(i.id),n=parseInt(i.getAttribute("data-row"),10),a=parseInt(i.getAttribute("data-col"),10);this.panelPropertyChange(s,{row:n,col:a}),this.updatePanelLayout(i,s),this.setHeightAndWidth(i,this.getCellInstance(i.id)),this.setPanelPosition(i,n,a),this.updateRowHeight()}}this.panelResponsiveUpdate(),this.updateGridLines()}this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection),this.resizeEvents(),this.checkDragging(this.dragCollection)},i.prototype.updateGridLines=function(){this.element.querySelector(".e-dashboard-gridline-table")&&(this.table&&t.detach(this.table),this.initGridLines())},i.prototype.checkDragging=function(e){if(this.checkMediaQuery()||!this.allowDragging)for(t=0;t<e.length;t++)e[t].destroy();else{for(var t=0;t<e.length;t++)e[t].destroy();this.enableDraggingContent(this.panelCollection)}},i.prototype.sortPanels=function(){for(var e=[],t=this,i=0;i<=this.rows;i++)!function(i){for(var s=0;s<t.columns;s++)!function(s){t.panels.filter(function(t){t.row===i&&t.col===s&&e.push(t)})}(s)}(i);return e},i.prototype.checkMediaQuerySizing=function(){t.addClass([this.element],["e-responsive"]);var e;e=this.isPanelRemoved&&this.panels?this.panels:this.sortPanels(),this.updatedRows=e.length;for(var i=0;i<e.length;i++){var s=document.getElementById(e[i].id),n=void 0;if(s){if(t.setStyleAttribute(s,{width:"100%"}),s.style.height=" "+(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[i].sizeY+"px",e[i].sizeY>1&&(n=(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)*e[i].sizeY+parseInt((Math.round(e[i].sizeY/2)*this.cellSpacing[1]).toString(),0),s.style.height=n+"px"),this.resizeHeight=!0,this.addPanelCalled&&this.isBlazor){var a=this.getActualProperties(e[i]);a.row=i,a.col=0,this.panelPropertyChange(e[i],a),this.setPanelPosition(s,i,0)}else this.panelPropertyChange(e[i],{row:i,col:0}),this.setPanelPosition(s,e[i].row,e[i].col),this.panelsSizeY=this.panelsSizeY+e[i].sizeY;this.setClasses(this.panelCollection),this.checkDragging(this.dragCollection),this.removeResizeClasses(this.panelCollection)}}this.updateRowHeight()},i.prototype.panelResponsiveUpdate=function(){this.element.classList.add("e-responsive"),this.calculateCellSize();for(i=0;i<this.element.querySelectorAll(".e-panel").length;i++){var e=this.element.querySelectorAll(".e-panel")[i],t=this.getCellInstance(e.id);this.setHeightAndWidth(e,t)}for(var i=0;i<this.panels.length;i++)this.setPanelPosition(document.getElementById(this.panels[i].id),this.panels[i].row,this.panels[i].col);this.updateRowHeight()},i.prototype.updateRowHeight=function(){this.getRowColumn(),this.setHeightWidth()},i.prototype.setHeightWidth=function(){var e,i;e=this.checkMediaQuery()?this.maxRow()*(this.element.parentElement&&this.element.parentElement.offsetWidth/this.cellAspectRatio)+(this.maxRow()-1)*this.cellSpacing[1]+"px":this.maxRow()*(this.cellSize[0]/this.cellAspectRatio)+(this.maxRow()-1)*this.cellSpacing[1]+"px",t.setStyleAttribute(this.element,{height:e}),i=window.getComputedStyle(this.element).width,t.setStyleAttribute(this.element,{width:i})},i.prototype.setHeightAndWidth=function(e,i){t.setStyleAttribute(e,{height:t.formatUnit(this.setXYDimensions(i)[0])}),t.setStyleAttribute(e,{width:t.formatUnit(this.setXYDimensions(i)[1])})},i.prototype.renderCell=function(e,i,s){var n;this.dimensions=this.setXYDimensions(e),t.isUndefined(e.enabled)&&(e.enabled=!0),this.isBlazor?n=document.getElementById(e.id):(this.contentTemplateChild.length>0&&!t.isNullOrUndefined(s)?(n=this.contentTemplateChild[s],e.cssClass&&t.addClass([n],[e.cssClass]),e.id&&n.setAttribute("id",e.id)):n=this.createPanelElement(e.cssClass?e.cssClass.split(" "):null,e.id),n.style.zIndex=""+e.zIndex,this.element.appendChild(n),this.renderReactTemplates());var a=this.renderPanels(n,e,e.id,i);if(this.panelCollection.push(a),this.isBlazor){var l=n.querySelector(".e-panel-content");if(l){var r="calc( 100% - "+(n.querySelector(".e-panel-header")?window.getComputedStyle(n.querySelector(".e-panel-header")).height:"0px")+")";t.setStyleAttribute(l,{height:r})}}else this.setXYAttributes(n,e);return this.setHeightAndWidth(n,e),n},i.prototype.setPanelPosition=function(e,i,s){if(e){this.checkMediaQuery()&&this.calculateCellSize();var n=this.getCellSize()[1],a=this.getCellSize()[0],l=0===s?0:s*(a+this.cellSpacing[0]),r=0===i?0:i*(n+this.cellSpacing[1]);this.checkMediaQuery()&&(r=0===i?0:this.panelsSizeY*(n+this.cellSpacing[1])),t.setStyleAttribute(e,{left:l+"px",top:r+"px"})}},i.prototype.getRowColumn=function(){if(this.rows=null,this.element.querySelectorAll(".e-panel").length>0&&!this.updatedRows)for(var e=this.element.querySelectorAll(".e-panel"),t=0;t<e.length;t++){var i=e[t],s=parseInt(i.getAttribute("data-row"),10),n=parseInt(i.getAttribute("data-sizeY"),10);this.rows=Math.max(this.rows,s+n)}else{this.updatedRows&&(this.rows=this.updatedRows,this.updatedRows=null);for(t=0;t<this.panels.length;t++)this.rows=Math.max(this.rows,this.panels[t].row)}},i.prototype.setMinMaxValues=function(e){!e.sizeX||e.sizeX<e.minSizeX?this.panelPropertyChange(e,{sizeX:e.minSizeX}):e.maxSizeX&&e.sizeX>e.maxSizeX?this.panelPropertyChange(e,{sizeX:e.maxSizeX}):e.sizeX>this.columns?this.panelPropertyChange(e,{sizeX:this.columns}):this.panelPropertyChange(e,{sizeX:e.sizeX}),!e.sizeY||e.sizeY<e.minSizeY?this.panelPropertyChange(e,{sizeY:e.minSizeY}):e.maxSizeY&&e.sizeY>e.maxSizeY?this.panelPropertyChange(e,{sizeY:e.maxSizeY}):this.panelPropertyChange(e,{sizeY:e.sizeY})},i.prototype.checkMinMaxValues=function(e){e.col+e.sizeX>this.columns&&this.panelPropertyChange(e,{sizeX:e.sizeX+(this.columns-(e.col+e.sizeX))})},i.prototype.panelPropertyChange=function(e,t){this.allowServerDataBinding=!1,e.setProperties(t,!0)},i.prototype.renderDashBoardCells=function(e){if(this.element.querySelectorAll(".e-panel").length>0||this.panels.length>0)for(var i=0;i<e.length;i++){this.gridPanelCollection.push(e[i]),this.isBlazor&&this.panels.length>0||this.setMinMaxValues(e[i]),(this.maxColumnValue<e[i].col||this.maxColumnValue<e[i].col+e[i].sizeX)&&this.panelPropertyChange(e[i],{col:this.maxColumnValue-e[i].sizeX});var s=this.renderCell(e[i],!1,i);this.isBlazor||(this.enableRtl&&t.addClass([s],"e-rtl"),this.element.appendChild(s),this.renderReactTemplates()),this.checkMediaQuery()&&i===e.length-1?this.checkMediaQuerySizing():(this.setPanelPosition(s,e[i].row,e[i].col),this.mainElement=s,this.updatePanelLayout(s,e[i]),this.mainElement=null)}this.setClasses(this.panelCollection)},i.prototype.collisions=function(e,t,i,s,n){var a=[];i&&s||(i=s=1),!n||n instanceof Array||(n=[n]);for(var l,r=0;r<s;++r)for(var o=0;o<i;++o)!(l=this.getPanel(e+r,t+o,n))||n&&-1!==n.indexOf(document.getElementById(l.id))||-1!==a.indexOf(document.getElementById(l.id))||a.push(document.getElementById(l.id));return a},i.prototype.rightWardsSpaceChecking=function(e,t,i){var s=this,n=[],a=[];if(e.forEach(function(e){var i=parseInt(e.getAttribute("data-col"),10),a=parseInt(e.getAttribute("data-sizeX"),10);if(t<s.columns&&i>=t)if(a>1)for(var l=i;l<i+a;l++)n.push(l);else n.push(i)}),n.length>0)for(var l=t+1;l<=this.columns-1;l++)-1===n.indexOf(l)&&l!==t&&-1===a.indexOf(l)&&a.push(l);var r=this.getOccupiedColumns(i);return r.forEach(function(e){e>t&&-1!==a.indexOf(e)&&a.splice(a.indexOf(e),1)}),this.getOccupiedColumns(this.checkingElement).forEach(function(e){e>parseInt(i.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===a.indexOf(e)&&a.push(e)}),a=a.sort(function(e,t){return e-t})},i.prototype.getOccupiedColumns=function(e){for(var t=[],i=parseInt(e.getAttribute("data-sizeX"),10),s=parseInt(e.getAttribute("data-col"),10),n=s;n<s+i&&n<=this.columns;n++)t.push(n);return t},i.prototype.leftWardsSpaceChecking=function(e,t,i){var s=this,n=[],a=[];if(e.forEach(function(e){var i=parseInt(e.getAttribute("data-col"),10),n=parseInt(e.getAttribute("data-sizeX"),10);if(t<=s.columns&&i<=t)if(n>1)for(var l=i;l<i+n;l++)a.push(l);else a.push(i)}),a.length>0)for(var l=0;l<=t;l++)-1===a.indexOf(l)&&l!==t&&-1===n.indexOf(l)&&n.push(l);var r=this.getOccupiedColumns(i);return r.forEach(function(e){e<t&&-1!==n.indexOf(e)&&n.splice(n.indexOf(e),1)}),this.getOccupiedColumns(this.checkingElement).forEach(function(e){e<parseInt(i.getAttribute("data-col"),10)&&-1===r.indexOf(e)&&-1===n.indexOf(e)&&n.push(e)}),n=n.sort(function(e,t){return e-t}),n=n.reverse()},i.prototype.adjustmentAvailable=function(e,i,s,n,a){this.leftAdjustable=void 0,this.rightAdjustable=void 0;var l,r=!1,o=[];this.topAdjustable=void 0;var h=parseInt(a.getAttribute("data-sizeX"),10),d=parseInt(a.getAttribute("data-col"),10);-1===(o=this.getRowElements(this.collisions(e,0,this.columns,s,[]))).indexOf(a)&&o.push(a);var p=this.leftWardsSpaceChecking(o,i,a);if(p.length>0?(this.leftAdjustable=this.isLeftAdjustable(p,a,e,i,n,s),this.spacedColumnValue!==d-this.getCellInstance(this.checkingElement.id).sizeX&&(this.leftAdjustable=!1),this.leftAdjustable?this.rightAdjustable=!1:(this.leftAdjustable=!1,l=this.rightWardsSpaceChecking(o,i,a),this.rightAdjustable=l.length>0&&this.isRightAdjustable(l,a,e,i,n,s),this.spacedColumnValue!==h+d&&(this.rightAdjustable=!1),this.rightAdjustable||(this.rightAdjustable=!1))):(l=this.rightWardsSpaceChecking(o,i,a),this.rightAdjustable=l.length>0&&this.isRightAdjustable(l,a,e,i,n,s),this.spacedColumnValue!==h+d&&(this.rightAdjustable=!1),this.rightAdjustable&&(this.leftAdjustable=!1)),!this.rightAdjustable&&!this.leftAdjustable&&e>0){var c=this.getCellInstance(a.id).row,u=!1;this.startRow!==c&&(u=!0);for(var g=e;g>=0;g--){var m=this.getCellInstance(a.id).sizeY>1&&u?this.checkingElement:a;g!==c&&g===c-s&&0===this.collisions(g,i,n,s,m).length&&(u=!1,this.topAdjustable=!0,this.spacedRowValue=t.isNullOrUndefined(this.spacedRowValue)?g:this.spacedRowValue,this.spacedColumnValue=i)}}return(this.rightAdjustable||this.leftAdjustable||this.topAdjustable)&&(r=!0,t.isNullOrUndefined(this.spacedRowValue)&&(this.spacedRowValue=e)),r},i.prototype.isXSpacingAvailable=function(e,t){for(var i=!1,s=[],n=0;n<e.length;n++)if(e[n+1]-e[n]==1||e[n+1]-e[n]==-1){if(s.push(e[n]),2===t&&s.push(e[n+1]),n===e.length-2&&(s.push(e[n+1]),s.length>t&&s.splice(-1)),s.length===t)return i=!0,this.spacedColumnValue=s.sort(function(e,t){return e-t})[0],this.spacedColumnValue<0&&(this.spacedColumnValue=1),i}else s=[];return i},i.prototype.getRowElements=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},i.prototype.isLeftAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&e.length>0)this.spacedColumnValue=e[0],l=!0;else if(n>1&&1===a)l=this.isXSpacingAvailable(e,n);else if(a>1)if(1===n){var r=void 0;if(e.length>=1&&(r=!0),r)for(var o=0;o<e.length;o++){if(0===this.collisions(i,e[o],n,a,this.checkingElement).length)return this.spacedColumnValue=e[o],l=!0;l=!1}}else l=this.replacable(e,n,i,a,t);return l},i.prototype.isRightAdjustable=function(e,t,i,s,n,a){var l;if(1===n&&1===a&&e.length>0)this.spacedColumnValue=e[0],l=!0;else if(n>1&&1===a)l=this.isXSpacingAvailable(e,n);else if(a>1)if(1===n){var r=void 0;if(e.length>=1&&(r=!0),r)for(var o=0;o<e.length;o++){for(var h=this.collisions(i,e[o],n,a,this.checkingElement),d=0;d<h.length;d++)parseInt(t.getAttribute("data-col"),10)!==e[o]&&h.splice(h.indexOf(h[d]),1);if(0===h.length)return l=!0,this.spacedColumnValue=e[o],l;l=!1}}else l=this.replacable(e,n,i,a,t);return l},i.prototype.replacable=function(e,t,i,s,n){for(var a,l=[],r=0;r<e.length;r++)if(this.isXSpacingAvailable(e,t)){var o=[];if(o.push(this.checkingElement),o.push(n),0===l.length)return a=!0,this.spacedColumnValue=this.spacedColumnValue,a;a=!1}return a},i.prototype.sortCollisionItems=function(e){for(var t,i=[],s=this,n=this.rows-1;n>=0;n--)!function(n){t=[],e.forEach(function(e){e&&e.getAttribute("data-row")===n.toString()&&t.push(e)});for(var a=s.columns-1;a>=0;a--)!function(e){t.forEach(function(t){t&&t.getAttribute("data-col")===e.toString()&&i.push(t)})}(a)}(n);return i},i.prototype.updatedModels=function(e,t,i){var s=this,n=[];return this.mainElement||this.sortedPanel(),e.forEach(function(a){s.checkingElement=a;var l=s.getCellInstance(a.id),r=!s.adjustmentAvailable(l.row,l.col,l.sizeY,l.sizeX,i);if(l.sizeX>1&&r)for(var o=l.row;o<t.row+t.sizeY;o++)s.collisions(o,l.col,l.sizeX,l.sizeY,a).forEach(function(t){e.indexOf(t)>=0&&-1===n.indexOf(t)&&n.push(t)})}),n.forEach(function(t){n.indexOf(t)>=0&&e.splice(e.indexOf(t),1)}),e},i.prototype.resetLayout=function(e){var t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement);if(!this.mainElement||this.addPanelCalled||this.resizeCalled||this.movePanelCalled)return t;if(this.mainElement&&this.oldRowCol!==this.cloneObject)for(var i=0;i<this.panels.length;i++){var s=document.getElementById(this.panels[i].id);if(s!==this.mainElement){var n=this.cloneObject[s.id].row,a=this.cloneObject[s.id].col;this.setPanelPosition(s,n,a),this.panelPropertyChange(this.getCellInstance(s.id),{row:n,col:a}),this.setAttributes({value:{col:a.toString(),row:n.toString()}},s),this.updateOldRowColumn()}}return this.sortedArray=this.cloneArray,t=this.collisions(e.row,e.col,e.sizeX,e.sizeY,this.mainElement),this.sortedPanel(),this.updateOldRowColumn(),this.checkCollision&&this.checkCollision.length>0&&-1===t.indexOf(this.checkCollision[0])&&this.cloneObject[this.checkCollision[0].id].row===e.row&&t.push(this.checkCollision[0]),t},i.prototype.swapAvailability=function(e,t){for(var i=!0,s=this.getCellInstance(t.id),n=0;n<e.length;n++)for(var a=this.getCellInstance(e[n].id),l=1;l<s.sizeY;l++){var r=[];if(r.push(t),r.push(e[n]),this.collisions(s.row+l,a.col,a.sizeX,a.sizeY,r).length>0)return i=!1,!1}return i},i.prototype.checkForSwapping=function(e,t){if(!this.mainElement||0===e.length)return!1;var i,s=parseInt(e[0].getAttribute("data-row"),10);if(this.startRow<s?i=1:this.startRow>s&&(i=0),!this.swapAvailability(e,t))return!1;for(var n=!1,a=0;a<e.length;a++)if(e.length>=1&&this.cloneObject[this.mainElement.id].row===this.oldRowCol[this.mainElement.id].row)return!1;for(var l=0===i?this.getCellInstance(this.mainElement.id).row+this.getCellInstance(this.mainElement.id).sizeY:this.startRow,r=0;r<e.length;r++){var o=this.getCellInstance(e[r].id),h=this.getCellInstance(t.id),d=[];if(1===o.sizeY&&-1===d.indexOf(e[r]))d.push(e[r]);else if(o.sizeY>1&&-1===d.indexOf(e[r]))if(1===i&&h.row===this.cloneObject[o.id].row+o.sizeY-1)d.push(e[r]);else{if(0!==i||h.row!==this.cloneObject[o.id].row)return!1;d.push(e[r])}if(o.sizeY<=h.sizeY&&-1===d.indexOf(e[r])&&d.push(e[r]),d.push(this.mainElement),this.collisions(l,o.col,o.sizeX,o.sizeY,d).length>0)return n=!1;r===e.length-1&&(n=!0)}return n},i.prototype.swapItems=function(e,t,i){var s,n=this,a=[];a.push(t);var l=parseInt(e[0].getAttribute("data-row"),10);this.startRow<l?s=1:this.startRow>l&&(s=0);var r=0===s?l+i.sizeY:this.startRow;if(!this.movePanelCalled){var o=this.getCellInstance(e[0].id);this.panelPropertyChange(i,{row:0===s?l:r+o.sizeY})}for(var h=0;h<e.length;h++)a.push(e[h]),this.setPanelPosition(e[h],r,this.getCellInstance(e[h].id).col),this.panelPropertyChange(this.getCellInstance(e[h].id),{row:r}),e[h].setAttribute("data-row",r.toString());t.setAttribute("data-row",i.row.toString()),this.setPanelPosition(this.shadowEle,i.row,i.col);for(var d=0;d<this.panels.length;d++)this.oldRowCol[this.panels[d].id]={row:this.panels[d].row,col:this.panels[d].col};this.startRow=i.row,this.updateOldRowColumn(),a.forEach(function(e){n.cloneObject[e.id]=n.oldRowCol[e.id];for(var t=n.getCellInstance(e.id),i=0;i<n.sortedArray.length;i++)if(n.sortedArray[i])for(var s=0;s<n.sortedArray[i].length;s++)n.sortedArray[i][s]===e&&(n.sortedArray[i][s]=void 0);n.sortedArray[t.row]||(n.sortedArray[t.row]=[]),n.sortedArray[t.row][t.col]=e,n.cloneArray=n.sortedArray})},i.prototype.updatePanelLayout=function(e,i){this.collisionChecker={};var s=[],n=[];if((s=this.mainElement&&this.isRenderComplete?this.resetLayout(i):this.collisions(i.row,i.col,i.sizeX,i.sizeY,e)).length>0)if(s=this.sortCollisionItems(s),s=this.updatedModels(s,i,e),!t.isNullOrUndefined(this.startRow)&&this.checkForSwapping(s,e))this.swapItems(s,e,i);else for(var a=0;a<s.length;a++){var l=this.getCellInstance(s[a].id);if(this.checkingElement=s[a],this.spacedRowValue=null,this.spacedColumnValue=null,this.adjustmentAvailable(l.row,l.col,l.sizeY,l.sizeX,e)&&!t.isNullOrUndefined(this.spacedColumnValue)){this.setPanelPosition(s[a],this.spacedRowValue,this.spacedColumnValue),this.oldRowCol[s[a].id]={row:this.spacedRowValue,col:this.spacedColumnValue};var r={attributes:{row:this.spacedRowValue.toString(),col:this.spacedColumnValue.toString()}};if(this.setAttributes(r,s[a]),this.panelPropertyChange(l,{col:this.spacedColumnValue,row:this.spacedRowValue}),this.topAdjustable&&this.allowFloating&&(this.updatePanels(),this.updateCloneArrayObject()),this.spacedRowValue=null,a<s.length)continue}else n.push(s[a])}if(n.length>0){var o=this;n.forEach(function(e){-1===o.overlapElement.indexOf(e)&&o.overlapElement.push(e)}),this.overlapElement&&-1!==this.overlapElement.indexOf(e)&&this.overlapElement.splice(this.overlapElement.indexOf(e),1),n.length>0&&(this.updateRowColumn(i.row,this.overlapElement,e),this.checkForCompletePushing())}this.isSubValue||this.sortedPanel(),this.updateRowHeight(),this.updateGridLines()},i.prototype.checkForCompletePushing=function(){for(var e=0;e<this.panels.length;e++)if(this.collisionChecker[this.panels[e].id]&&null!==this.collisionChecker[this.panels[e].id]){this.overlapElement=[this.collisionChecker[this.panels[e].id].ele];var t=this.panels[e].id;this.updateRowColumn(this.collisionChecker[t].row,this.overlapElement,this.collisionChecker[t].srcEle)}},i.prototype.updateCollisionChecked=function(e){for(var t=0;t<Object.keys(this.collisionChecker).length;t++)this.collisionChecker[e.id]=null},i.prototype.updateRowColumn=function(e,t,i){if(i){var s=parseInt(i.getAttribute("data-sizeY"),10),n=parseInt(i.getAttribute("data-row"),10);this.overlapElementClone=(this.overlapElement&&this.shouldRestrict,this.overlapElement);for(var a=0;a<this.overlapElementClone.length;a++){if(0===this.overlapElementClone.length)return;for(var l=0;l<this.overlapElementClone.length;l++)this.collisionChecker[this.overlapElementClone[l].id]={ele:this.overlapElementClone[l],row:e,srcEle:i};var r=n+s,o=parseInt(this.overlapElementClone[a].getAttribute("data-sizeY"),10),h=parseInt(this.overlapElementClone[a].getAttribute("data-col"),10),d=parseInt(this.overlapElementClone[a].getAttribute("data-sizeX"),10),p=void 0,c=void 0;if(-1===this.overlapSubElementClone.indexOf(i)&&this.overlapSubElementClone.push(i),-1===this.overlapSubElementClone.indexOf(this.overlapElementClone[a])&&this.overlapSubElementClone.push(this.overlapElementClone[a]),o>1||d>1){var u=this.getCellInstance(this.overlapElementClone[a].id);p=u.col;for(var g=document.getElementById(u.id),m=u.row;m<n+s;m++){this.isSubValue=!0,this.panelPropertyChange(u,{row:u.row+1}),g.setAttribute("data-row",u.row.toString()),this.setPanelPosition(g,u.row,p),this.updateCollisionChecked(g),this.oldRowCol[g.id]={row:u.row,col:p};S=this.getCellInstance(g.id);this.panelPropertyChange(S,{col:p,row:u.row});var v=parseInt(g.getAttribute("data-row"),10),f=parseInt(g.getAttribute("data-col"),10),P=parseInt(g.getAttribute("data-sizeX"),10),y=parseInt(g.getAttribute("data-sizeY"),10),C=[];C.push(g),C.push(i),c=this.collisions(v,f,P,y,C),this.mainElement&&-1!==c.indexOf(this.mainElement)&&c.splice(c.indexOf(this.mainElement),1),this.collisionPanel(c,f,v,g)}this.isSubValue=!1}else{this.addPanelCalled&&(this.addPanelCalled=!1),this.overlapElementClone[a].setAttribute("data-row",r.toString());var x=[];x.push(this.overlapElementClone[a]),x.push(i),c=this.collisions(r,h,d,o,x),this.mainElement&&-1!==c.indexOf(this.mainElement)&&c.splice(c.indexOf(this.mainElement),1),p=parseInt(this.overlapElementClone[a].getAttribute("data-col"),10),this.setPanelPosition(this.overlapElementClone[a],r,p),this.updateCollisionChecked(this.overlapElementClone[a]),this.oldRowCol[this.overlapElementClone[a].id]={row:r,col:p};var S=this.getCellInstance(this.overlapElementClone[a].id);this.panelPropertyChange(S,{col:p,row:r}),this.collisionPanel(c,p,r,this.overlapElementClone[a])}}}},i.prototype.collisionPanel=function(e,t,i,s){var n=this.getCellInstance(s.id);if(this.panelPropertyChange(n,{row:i,col:t}),e.length>0){var a=this;this.overlapElement=[],this.shouldRestrict=!0,e.forEach(function(e){a.overlapElement.push(e)});for(var l=parseInt(s.getAttribute("data-row"),10),r=0;r<this.overlapElement.length;r++)this.updateRowColumn(l,this.overlapElement,s);this.shouldRestrict=!1}else{if(this.addPanelCalled||this.sortedPanel(),this.overlapSubElementClone.length>0)for(var o=this,h=0;h<this.overlapSubElementClone.length;h++)!function(e){var t=parseInt(o.overlapSubElementClone[e].getAttribute("data-row"),10),i=parseInt(o.overlapSubElementClone[e].getAttribute("data-col"),10),s=parseInt(o.overlapSubElementClone[e].getAttribute("data-sizeX"),10),n=parseInt(o.overlapSubElementClone[e].getAttribute("data-sizeY"),10),a=o.collisions(t,i,s,n,o.overlapSubElementClone);o.mainElement&&-1!==a.indexOf(o.mainElement)&&a.splice(a.indexOf(o.mainElement),1);var l=o;a.forEach(function(e){l.overlapElement.push(e)}),a.length>0&&o.updateRowColumn(t,o.overlapElement,o.overlapSubElementClone[e])}(h);this.overlapSubElementClone=[]}},i.prototype.removeResizeClasses=function(e){for(var i=0;i<e.length;i++)for(var s=e[i].querySelectorAll(".e-resize"),n=0;n<s.length;n++)t.detach(s[n])},i.prototype.ensureDrag=function(){this.checkDragging(this.dragCollection);var e=this.element.querySelectorAll("."+C);t.removeClass(e,[C]),this.setClasses(this.panelCollection)},i.prototype.setClasses=function(e){for(var i=0;i<e.length;i++){var s=e[i],n=e[i].querySelector(".e-panel-container");this.allowDragging&&(this.draggableHandle&&s.querySelectorAll(this.draggableHandle)[0]?t.addClass([s.querySelectorAll(this.draggableHandle)[0]],[C]):t.addClass([s],[C])),this.allowResizing&&this.mediaQuery&&!this.checkMediaQuery()&&this.setResizingClass(s,n)}},i.prototype.setResizingClass=function(e,i){if(this.availableClasses=this.resizableHandles,!e.querySelector(".e-resize"))for(var s=0;s<this.availableClasses.length;s++){var n=this.createElement("span"),a=void 0;i.appendChild(n),a="e-east"===this.availableClasses[s]||"e-west"===this.availableClasses[s]||"e-north"===this.availableClasses[s]||"e-south"===this.availableClasses[s]?"e-single":"e-double",t.addClass([n],[a,this.availableClasses[s],"e-resize","e-dl-icon"])}},i.prototype.setXYAttributes=function(e,i){var s={value:{sizeX:i.sizeX.toString(),sizeY:i.sizeY.toString(),minSizeX:i.minSizeX.toString(),minSizeY:i.minSizeY.toString(),maxSizeX:t.isNullOrUndefined(i.maxSizeX)?void 0:i.maxSizeX.toString(),maxSizeY:t.isNullOrUndefined(i.maxSizeY)?void 0:i.maxSizeY.toString(),row:i.row.toString(),col:i.col.toString()}};this.setAttributes(s,e)},i.prototype.setXYDimensions=function(e){var i,s,n=this.getCellSize()[1],a=this.getCellSize()[0];return i=e&&"number"==typeof a&&"number"==typeof e.sizeX&&e.sizeX>1?e.sizeX*a+(e.sizeX-1)*this.cellSpacing[0]:a,s=e&&"number"==typeof n&&e.sizeY>1&&"number"==typeof e.sizeY?e.sizeY*n+(e.sizeY-1)*this.cellSpacing[1]:t.formatUnit(n),[s,i]},i.prototype.getRowColumnDragValues=function(e){var t=parseFloat(e.element.style.top),i=parseFloat(e.element.style.left);return[Math.round(t/(this.getCellSize()[1]+this.cellSpacing[1])),Math.round(i/(this.getCellSize()[0]+ +this.cellSpacing[0]))]},i.prototype.checkForChanges=function(e,i,s){var n=[];if(this.removeAllCalled)n=[];else for(var a=0;a<this.panels.length;a++)!t.isNullOrUndefined(i)&&this.panels[a].id===i[0].id||!t.isNullOrUndefined(s)&&this.panels[a].id===s[0].id||this.panels[a].row===this.panelsInitialModel[a].row&&this.panels[a].col===this.panelsInitialModel[a].col||n.push(this.panels[a]);if(n.length>0||this.removeAllCalled){var l={changedPanels:n,isInteracted:e,addedPanels:t.isNullOrUndefined(i)?[]:i,removedPanels:t.isNullOrUndefined(s)?[]:s};this.trigger("change",l)}},i.prototype.enableDraggingContent=function(e){for(var i=this,s=0;s<e.length;s++){var n=[".e-resize",".e-drag-restrict"],a=e[s];this.dragobj=new t.Draggable(a,{preventDefault:!1,clone:!1,dragArea:this.element,isDragScroll:!0,handle:this.draggableHandle?this.draggableHandle:".e-panel",abort:n,dragStart:this.onDraggingStart.bind(this),dragStop:function(e){var s=i.getCellInstance(i.mainElement.id);i.allowPushing&&i.collisions(s.row,s.col,s.sizeX,s.sizeY,i.mainElement).length>0?(i.setHolderPosition(e),i.setPanelPosition(i.mainElement,s.row,s.col),i.updatePanelLayout(i.mainElement,s)):i.setPanelPosition(i.mainElement,s.row,s.col),i.mainElement=null;var n=i.getPanelBase(e);i.shadowEle&&t.detach(i.shadowEle),t.removeClass([i.element],["e-prevent"]),t.removeClass([e.element],["e-dragging"]),i.shadowEle=null,e.element.classList.remove("e-dragging");var a=i.getRowColumnDragValues(e)[0],l=i.getRowColumnDragValues(e)[1],r=i.getCellInstance(e.element.id);i.allowPushing&&0===i.collisions(a,l,r.sizeX,r.sizeY,document.getElementById(n.id)).length?(i.panelPropertyChange(i.getCellInstance(e.element.id),{row:a,col:l}),i.oldRowCol[e.element.id].row=a,i.oldRowCol[e.element.id].col=l,i.setAttributes({value:{col:l.toString(),row:a.toString()}},e.element),i.sortedPanel()):(i.panelPropertyChange(i.getCellInstance(e.element.id),{row:i.oldRowCol[e.element.id].row,col:i.oldRowCol[e.element.id].col}),e.element.setAttribute("data-col",i.getCellInstance(e.element.id).col.toString()),e.element.setAttribute("data-row",i.getCellInstance(e.element.id).row.toString()),i.sortedPanel());var o=i.getCellInstance(e.element.id);i.setPanelPosition(e.element,o.row,o.col),i.updatePanels(),i.updateServerPanelData(),i.updateCloneArrayObject(),i.checkForChanges(!0),i.dragStopEventArgs={event:e.event,element:e.element},i.trigger("dragStop",e),i.resizeEvents(),i.rows=i.maxRow(!0),i.setHeightWidth(),i.updateDragArea()},drag:function(e){i.draggedEventArgs={event:e.event,element:e.element,target:t.closest(e.target,".e-panel")},i.trigger("drag",i.draggedEventArgs),i.onDragStart(e)}}),-1===this.dragCollection.indexOf(this.dragobj)&&this.dragCollection.push(this.dragobj)}},i.prototype.updatePanels=function(){this.moveItemsUpwards(),this.updateOldRowColumn(),this.sortedPanel()},i.prototype.updateDragArea=function(){this.dragCollection.forEach(function(e){e.setDragArea()})},i.prototype.updateRowsHeight=function(e,t,i){e+t>=this.rows&&(this.rows=this.rows+i,this.setHeightWidth())},i.prototype.onDraggingStart=function(e){var i=e;this.trigger("dragStart",i,function(i){t.isBlazor()&&i.bindEvents(e.element)}),this.panelsInitialModel=this.cloneModels(this.panels),this.mainElement=e.element,this.cloneObject=JSON.parse(JSON.stringify(this.cloneObject));var s=this.startRow=parseInt(e.element.getAttribute("data-row"),10);this.startCol=parseInt(e.element.getAttribute("data-col"),10);var n=parseInt(e.element.getAttribute("data-sizeY"),10);this.updateRowsHeight(s,n,n),this.updateDragArea(),this.shadowEle=document.createElement("div"),this.shadowEle.classList.add("e-holder"),this.shadowEle.classList.add("e-holder-transition"),t.setStyleAttribute(this.shadowEle,{position:"absolute"}),t.addClass([this.element],["e-prevent"]),t.addClass([e.element],["e-dragging"]),this.element.appendChild(this.shadowEle),this.renderReactTemplates(),this.shadowEle=document.querySelector(".e-holder"),this.shadowEle.style.height=this.getCellInstance(e.element.id).sizeY*this.cellSize[1]+"px",this.shadowEle.style.width=this.getCellInstance(e.element.id).sizeX*this.cellSize[0]+"px";var a=this.getCellInstance(e.element.id);this.setPanelPosition(this.shadowEle,a.row,a.col)},i.prototype.cloneModels=function(e,t){void 0===t&&(t=[]);for(var i=0;i<e.length;i++){t[i]||(t[i]={});for(var s in e[i])t[i][s]=e[i][s]}return t},i.prototype.onDragStart=function(e){var t,i,s,n=s=this.getRowColumnDragValues(e)[1],a=this.getRowColumnDragValues(e)[0];if(!(n<0||a<0)){this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n});var l=this.getCellInstance(e.element.id);if(this.updateRowsHeight(l.row,l.sizeY,1),this.updateDragArea(),this.allowPushing&&(this.setAttributes({value:{col:n.toString(),row:a.toString()}},e.element),this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),t=this.oldRowCol[e.element.id].col,i=this.oldRowCol[e.element.id].row,this.oldRowCol[e.element.id]={row:a,col:n},this.updateOldRowColumn(),(this.startCol!==t||this.startRow!==i)&&(this.setHolderPosition(e),this.startCol!==t&&(this.startRow=i),this.startRow!==i&&(this.startCol=t),this.allowPushing))){this.mainElement=e.element;var r=l;this.checkCollision=this.collisions(r.row,r.col,r.sizeX,r.sizeY,e.element),l.col>=this.checkColumnValue&&(this.checkCollision=[]),this.updatePanelLayout(e.element,l),this.moveItemsUpwards()}!1!==this.allowPushing&&this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),this.oldRowCol[e.element.id].row===a&&this.oldRowCol[e.element.id].col===n||(this.panelPropertyChange(this.getCellInstance(e.element.id),{row:a,col:n}),this.setAttributes({value:{col:n.toString(),row:a.toString()}},e.element)),this.startCol!==s&&(this.startCol=t,this.moveItemsUpwards()),this.allowPushing||this.setHolderPosition(e),this.removeResizeClasses(this.panelCollection),this.setClasses(this.panelCollection),this.allowPushing}},i.prototype.getPanelBase=function(e){for(var t,i=0;i<this.panelCollection.length;i++)this.panelCollection[i].id===(e.element&&e.element.id||e)&&(t=this.panelCollection[i]);return t},i.prototype.getPanel=function(e,t,i){!i||i instanceof Array||(i=[i]);for(var s=1;e>-1;){for(var n=1,a=t;a>-1;){var l=this.sortedArray[e];if(l){var r=l[a];if(r&&(!i||-1===i.indexOf(r))&&parseInt(r.getAttribute("data-sizeX"),10)>=n&&parseInt(r.getAttribute("data-sizeY"),10)>=s)return r}++n,--a}--e,++s}return null},i.prototype.setHolderPosition=function(e){var t=parseInt(e.element.getAttribute("data-sizeY"),10),i=parseInt(e.element.getAttribute("data-col"),10),s=parseInt(e.element.getAttribute("data-row"),10),n=parseInt(e.element.getAttribute("data-sizeX"),10),a=this.getCellSize()[0],l=this.getCellSize()[1],r=0===s?0:s*(l+this.cellSpacing[1]),o=0===i?0:i*(a+this.cellSpacing[0]),h=this.getCellSize()[1],d=this.getCellSize()[0];this.elementRef.top=this.shadowEle.style.top=r+"px",this.elementRef.left=this.shadowEle.style.left=o+"px",this.elementRef.height=this.shadowEle.style.height=t*h+(t-1)*this.cellSpacing[1]+"px",this.elementRef.width=this.shadowEle.style.width=n*d+(n-1)*this.cellSpacing[0]+"px"},i.prototype.getCellInstance=function(e){for(var t,i=0;i<this.panels.length;i++)this.panels[i].id===e&&(t=this.panels[i]);return t},i.prototype.addPanel=function(e){this.panelsSizeY=0,this.allowServerDataBinding=!1,this.maxCol(),e.minSizeX||(e.minSizeX=1),e.minSizeY||(e.minSizeY=1),e.id||(e.id="layout_"+this.panelID.toString(),this.panelID=this.panelID+1);var i=new x(this,"panels",e,!0);this.panels.push(i),this.panelsInitialModel=this.cloneModels(this.panels),this.setMinMaxValues(i),(this.maxColumnValue<i.col||this.maxColumnValue<i.col+i.sizeX)&&this.panelPropertyChange(i,{col:this.maxColumnValue-i.sizeX});var s=this.renderCell(i,!0,null);if(this.oldRowCol[i.id]={row:i.row,col:i.col},this.cloneObject[i.id]={row:i.row,col:i.col},this.updateOldRowColumn(),this.element.insertAdjacentElement("afterbegin",s),this.addPanelCalled=!0,this.checkMediaQuery()?(this.checkMediaQuerySizing(),this.isBlazor&&s.style.removeProperty("visibility"),this.removeResizeClasses(this.panelCollection)):(this.mainElement=s,this.checkCollision||(this.checkCollision=[]),this.setPanelPosition(s,i.row,i.col),this.isBlazor&&s.style.removeProperty("visibility"),this.updatePanelLayout(s,i)),this.addPanelCalled=!1,this.allowDragging&&this.mediaQuery&&!this.checkMediaQuery()&&this.enableDraggingContent([document.getElementById(i.id)]),this.setClasses([s]),this.allowFloating&&(this.mainElement=null,this.moveItemsUpwards()),this.updateOldRowColumn(),this.sortedPanel(),this.updateCloneArrayObject(),this.allowResizing)for(var n=0;n<s.querySelectorAll(".e-resize").length;n++){var a="msie"===t.Browser.info.name?"mousedown pointerdown":"mousedown";t.EventHandler.add(s.querySelectorAll(".e-resize")[n],a,this.downResizeHandler,this),"msie"!==t.Browser.info.name&&t.EventHandler.add(s.querySelectorAll(".e-resize")[n],"touchstart",this.touchDownResizeHandler,this)}this.checkForChanges(!1,[i]),this.allowServerDataBinding=!0,this.serverDataBind()},i.prototype.updatePanel=function(e){if(this.panelsSizeY=0,e.id){var i=this.getCellInstance(e.id);if(i){this.maxCol(),e.col=e.col<1?0:e.col>this.columns?this.columns-1:e.col,t.isNullOrUndefined(e.col)&&(e.col=i.col),this.panelPropertyChange(i,e),this.setMinMaxValues(i);var s=document.getElementById(e.id);this.mainElement=s;var n=i.cssClass?i.cssClass.split(" "):null;if(this.panelContent=s.querySelector(".e-panel-container")?s.querySelector(".e-panel-container"):this.createSubElement(n,s.id+"_content","e-panel-container"),s.appendChild(this.panelContent),i.header){var a=s.querySelector(".e-panel-header")?s.querySelector(".e-panel-header"):this.createSubElement([],s.id+"template","");t.addClass([a],["e-panel-header"]),a.innerHTML="";o=this.element.id+"HeaderTemplate"+i.id;this.renderTemplate(i.header,a,o,!0,"header"),this.panelContent.appendChild(a),this.renderReactTemplates()}else s.querySelector(".e-panel-header")&&t.detach(s.querySelector(".e-panel-header"));if(i.content){var l=i.cssClass?i.cssClass.split(" "):null;this.panelBody=s.querySelector(".e-panel-content")?s.querySelector(".e-panel-content"):this.createSubElement(l,s.id+"_body","e-panel-content"),this.panelBody.innerHTML="";var r="calc( 100% - "+(this.panelContent.querySelector(".e-panel-header")?window.getComputedStyle(this.panelContent.querySelector(".e-panel-header")).height:"0px")+")";t.setStyleAttribute(this.panelBody,{height:r});var o=this.element.id+"ContentTemplate"+i.id;this.renderTemplate(i.content,this.panelBody,o,!0,"content"),this.panelContent.appendChild(this.panelBody),this.renderReactTemplates()}else s.querySelector(".e-panel-content")&&t.detach(s.querySelector(".e-panel-content"));this.setXYAttributes(s,i),this.setHeightAndWidth(s,i),this.setPanelPosition(s,i.row,i.col),this.updatePanelLayout(s,i),this.checkMediaQuery()&&this.checkMediaQuerySizing(),this.mainElement=null,this.updatePanels(),this.updateCloneArrayObject()}}},i.prototype.updateCloneArrayObject=function(){this.cloneArray=this.sortedArray,this.cloneObject=JSON.parse(JSON.stringify(this.oldRowCol))},i.prototype.serialize=function(){for(var e=this.cloneModels(this.panels),t=[],i=0;i<e.length;i++)t.push({id:e[i].id,row:e[i].row,col:e[i].col,sizeX:e[i].sizeX,sizeY:e[i].sizeY,minSizeX:e[i].minSizeX,minSizeY:e[i].minSizeY,maxSizeX:e[i].maxSizeX,maxSizeY:e[i].maxSizeY});return t},i.prototype.removeAll=function(){this.removeAllCalled=!0;for(var e=0;e<this.panelCollection.length;e++)t.detach(this.panelCollection[e]),this.clearTemplate();this.removeAllPanel(),this.updateServerPanelData(),this.rows=0,this.gridPanelCollection=[],this.setHeightWidth(),this.sortedPanel(),this.sortedArray=[],this.overlapElementClone=[],this.overlapElement=[],this.overlapSubElementClone=[],this.panelCollection=[],this.oldRowCol={},this.cloneObject={};var i=this.cloneModels(this.panels);this.setProperties({panels:[]},!0),this.updatePanels(),this.updateCloneArrayObject(),this.checkForChanges(!1,null,i),this.removeAllCalled=!1},i.prototype.removePanel=function(e){var i=this;this.panelsSizeY=0,this.panelsInitialModel=this.cloneModels(this.panels);for(var s,n=0;n<this.panelCollection.length;n++)this.panelCollection[n].id===e&&(t.detach(this.panelCollection[n]),this.panelCollection.splice(n,1)),this.panels[n].id===e&&(s=this.panels[n],this.panels.splice(n,1),this.panelsInitialModel.splice(n,1),this.updateOldRowColumn(),this.sortedPanel());this.updatePanels(),this.checkMediaQuery()&&(this.isPanelRemoved=!0,this.checkMediaQuerySizing(),this.isPanelRemoved=!1),this.updateServerPanelData(),this.gridPanelCollection.forEach(function(t){t.id===e&&i.gridPanelCollection.splice(i.gridPanelCollection.indexOf(t),1)}),this.updateCloneArrayObject(),this.checkForChanges(!1,null,[s])},i.prototype.movePanel=function(e,t,i){this.movePanelCalled=!0,this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);if(!isNaN(t)&&null!==t&&!isNaN(i)&&null!==i&&s){i<0?i=0:i>this.columns&&(i=this.columns-s.sizeX),this.panelPropertyChange(s,{row:t,col:i});var n=document.getElementById(e);this.mainElement=n,this.startRow=parseInt(n.getAttribute("data-row"),10),this.startCol=parseInt(n.getAttribute("data-col"),10),this.setAttributes({value:{col:i.toString(),row:t.toString()}},n),this.updateOldRowColumn(),this.setPanelPosition(n,t,i),this.updatePanelLayout(n,s),this.updateRowHeight(),this.updatePanels(),this.updateServerPanelData(),this.updateCloneArrayObject(),this.mainElement=null,this.allowFloating&&this.moveItemsUpwards(),this.movePanelCalled=!1,this.checkForChanges(!1)}},i.prototype.setAttributes=function(e,t){for(var i=0;i<Object.keys(e).length;i++)Object.keys(e)&&(e[Object.keys(e)[i]].col&&t.setAttribute("data-col",e[Object.keys(e)[i]].col.toString()),e[Object.keys(e)[i]].row&&t.setAttribute("data-row",e[Object.keys(e)[i]].row.toString()),e[Object.keys(e)[i]].sizeX&&t.setAttribute("data-sizeX",e[Object.keys(e)[i]].sizeX.toString()),e[Object.keys(e)[i]].sizeY&&t.setAttribute("data-sizeY",e[Object.keys(e)[i]].sizeY.toString()),e[Object.keys(e)[i]].minSizeX&&t.setAttribute("data-minSizeX",e[Object.keys(e)[i]].minSizeX.toString()),e[Object.keys(e)[i]].minSizeY&&t.setAttribute("data-minSizeY",e[Object.keys(e)[i]].minSizeY.toString()),e[Object.keys(e)[i]].maxSizeX&&t.setAttribute("data-maxSizeY",e[Object.keys(e)[i]].maxSizeX.toString()),e[Object.keys(e)[i]].maxSizeY&&t.setAttribute("data-maxSizeY",e[Object.keys(e)[i]].maxSizeY.toString()))},i.prototype.resizePanel=function(e,t,i){this.panelsInitialModel=this.cloneModels(this.panels);var s=this.getCellInstance(e);this.resizeCalled=!0;var n=document.getElementById(e),a={event:null,element:n,isInteracted:!1};this.trigger("resizeStart",a),this.panelPropertyChange(s,{sizeX:t,sizeY:i}),this.setMinMaxValues(s),this.checkMinMaxValues(s),this.mainElement=n,this.setAttributes({value:{sizeX:s.sizeX.toString(),sizeY:s.sizeY.toString()}},n),this.setHeightAndWidth(n,s),this.updatePanelLayout(n,s),this.updatePanels(),this.updateServerPanelData(),this.updateRowHeight(),this.resizeCalled=!1,this.trigger("resizeStop",a),this.checkForChanges(!1)},i.prototype.destroy=function(){t.EventHandler.remove(window,"resize",this.refreshListener),t.removeClass([this.element],["e-dashboardlayout","e-lib","e-responsive","e-control"]),this.element.removeAttribute("style");for(var i=0;i<this.dragCollection.length;i++)this.dragCollection[i].destroy();this.removeAllPanel(),e.prototype.destroy.call(this),this.clearTemplate(),this.renderReactTemplates()},i.prototype.removeAllPanel=function(){for(;this.element.firstElementChild;)t.detach(this.element.firstElementChild),this.clearTemplate()},i.prototype.setEnableRtl=function(){!0===this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},i.prototype.updateCellSizeAndSpacing=function(){this.panelResponsiveUpdate(),this.setHeightWidth(),this.getRowColumn();for(var e=0;e<this.element.querySelectorAll(".e-panel").length;e++){var t=this.element.querySelectorAll(".e-panel")[e],i=this.getCellInstance(t.id);this.setHeightAndWidth(t,i),this.setPanelPosition(t,i.row,i.col)}},i.prototype.updatePanelsDynamically=function(e){this.removeAll(),this.setProperties({panels:e},!0),this.setOldRowCol(),this.table&&this.table.remove(),this.isBlazor=!1,this.initialize(),this.checkMediaQuery()&&this.refresh(),this.isBlazor=t.isBlazor()&&this.isServerRendered,this.showGridLines&&this.initGridLines()},i.prototype.checkForIDValues=function(e){var i=this;!t.isNullOrUndefined(e)&&e.length>0?(this.panelID=0,e.forEach(function(e){e.id||(i.panelPropertyChange(e,{id:"layout_"+i.panelID.toString()}),i.panelID=i.panelID+1)})):this.restrictDynamicUpdate=!0},i.prototype.onPropertyChanged=function(e,i){var s=this;e.panels&&e.panels.length>0&&e.panels[0]instanceof x&&this.checkForIDValues(e.panels);for(var n=0,a=Object.keys(e);n<a.length;n++)switch(a[n]){case"enableRtl":this.setProperties({enableRtl:e.enableRtl},!0),this.setEnableRtl();break;case"mediaQuery":this.setProperties({mediaQuery:e.mediaQuery},!0),this.checkMediaQuery()&&this.checkMediaQuerySizing();break;case"allowDragging":this.setProperties({allowDragging:e.allowDragging},!0),this.ensureDrag();break;case"allowResizing":if(this.setProperties({allowResizing:e.allowResizing},!0),this.allowResizing)this.setClasses(this.panelCollection),this.resizeEvents();else{for(var l=this.element.querySelectorAll(".e-panel .e-panel-container .e-resize"),r=0;r<l.length;r++){var o="msie"===t.Browser.info.name?"mousedown pointerdown":"mousedown",h=l[r];t.EventHandler.remove(h,o,this.downResizeHandler),"msie"!==t.Browser.info.name&&t.EventHandler.remove(h,"touchstart",this.touchDownResizeHandler)}this.removeResizeClasses(this.panelCollection)}break;case"cellSpacing":this.setProperties({cellSpacing:e.cellSpacing},!0),this.updateCellSizeAndSpacing(),this.updateGridLines();break;case"draggableHandle":this.setProperties({draggableHandle:e.draggableHandle},!0),this.ensureDrag();break;case"allowFloating":this.setProperties({allowFloating:e.allowFloating},!0),this.moveItemsUpwards();break;case"showGridLines":this.showGridLines?(this.setProperties({showGridLines:e.showGridLines},!0),this.initGridLines()):this.table&&t.detach(this.table);break;case"allowPushing":this.setProperties({allowPushing:e.allowPushing},!0);break;case"panels":!e.columns&&!this.restrictDynamicUpdate&&e.panels[0]&&e.panels.length>0?(this.isRenderComplete=!1,this.updatePanelsDynamically(e.panels),this.isRenderComplete=!0):e.panels[0]&&e.panels.length?this.restrictDynamicUpdate=!1:(this.isRenderComplete=!1,this.updatePanelsDynamically(this.panels),this.isRenderComplete=!0);break;case"columns":this.isRenderComplete=!1,e.panels&&this.updatePanelsDynamically(e.panels),this.setProperties({columns:e.columns},!0),this.panelCollection=[],this.maxColumnValue=this.columns,this.calculateCellSize(),this.panels.forEach(function(e){if(s.setMinMaxValues(e),s.maxColumnValue<e.col||s.maxColumnValue<e.col+e.sizeX){var t=s.maxColumnValue-e.sizeX;s.panelPropertyChange(e,{col:t<0?0:t}),s.setXYAttributes(document.getElementById(e.id),e)}s.setHeightAndWidth(document.getElementById(e.id),e),s.panelCollection.push(document.getElementById(e.id)),s.setPanelPosition(document.getElementById(e.id),e.row,e.col),s.mainElement=document.getElementById(e.id),s.updatePanelLayout(document.getElementById(e.id),e),s.mainElement=null}),this.updatePanels(),this.updateCloneArrayObject(),this.isRenderComplete=!0,this.updateGridLines()}},i.prototype.getPersistData=function(){var e=["panels"];return this.addOnPersist(e)},i.prototype.mergePersistPanelData=function(e){var i=window.localStorage.getItem(this.getModuleName()+this.element.id);if(!t.isNullOrUndefined(i)&&""!==i||!t.isNullOrUndefined(e)){var s=t.isNullOrUndefined(e)?JSON.parse(i):e,n=Object.keys(s);this.isProtectedOnChange=!0;for(var a=0,l=n;a<l.length;a++){var r=l[a];"object"!=typeof t.getValue(r,this)||t.isNullOrUndefined(t.getValue(r,this))||Array.isArray(t.getValue(r,this))&&"panels"===r&&this.mergePanels(s[r],this[r])}this.isProtectedOnChange=!1}},i.prototype.mergePanels=function(e,i){for(var s=e,n=this,a=0;a<s.length;a++)!function(e){n.checkForIDValues(i);var a=i.filter(function(t){return t.id===s[e].id})[0];t.isNullOrUndefined(a)||(s[e]=t.extend(a,s[e],{},!0))}(a)},i.prototype.getModuleName=function(){return"DashboardLayout"},y([t.Property(!0)],i.prototype,"allowDragging",void 0),y([t.Property(!1)],i.prototype,"allowResizing",void 0),y([t.Property(!0)],i.prototype,"allowPushing",void 0),y([t.Property(!0)],i.prototype,"enableHtmlSanitizer",void 0),y([t.Property(!0)],i.prototype,"allowFloating",void 0),y([t.Property(1)],i.prototype,"cellAspectRatio",void 0),y([t.Property([5,5])],i.prototype,"cellSpacing",void 0),y([t.Property(1)],i.prototype,"columns",void 0),y([t.Property(!1)],i.prototype,"showGridLines",void 0),y([t.Property(null)],i.prototype,"draggableHandle",void 0),y([t.Property("en-US")],i.prototype,"locale",void 0),y([t.Property("max-width: 600px")],i.prototype,"mediaQuery",void 0),y([t.Collection([],x)],i.prototype,"panels",void 0),y([t.Property(["e-south-east"])],i.prototype,"resizableHandles",void 0),y([t.Event()],i.prototype,"change",void 0),y([t.Event()],i.prototype,"dragStart",void 0),y([t.Event()],i.prototype,"drag",void 0),y([t.Event()],i.prototype,"dragStop",void 0),y([t.Event()],i.prototype,"resizeStart",void 0),y([t.Event()],i.prototype,"resize",void 0),y([t.Event()],i.prototype,"resizeStop",void 0),y([t.Event()],i.prototype,"created",void 0),y([t.Event()],i.prototype,"destroyed",void 0),i=y([t.NotifyPropertyChanges],i)}(t.Component);return e.PaneProperties=v,e.Splitter=f,e.Panel=x,e.DashboardLayout=S,e}({},ej.base),this.ejs=ej;
- /*!
- * filename: ej2-notifications.min.js
- * version : 19.2.44
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.notifications=function(t,e,i,s){"use strict";var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),n=function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r},r="e-toast",l="e-toast-message",a="e-toast-progress",h="e-toast-close-icon",p=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("Left")],i.prototype,"X",void 0),n([e.Property("Top")],i.prototype,"Y",void 0),i}(e.ChildProperty),d=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property(null)],i.prototype,"model",void 0),n([e.Property(null)],i.prototype,"click",void 0),i}(e.ChildProperty),c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("FadeIn")],i.prototype,"effect",void 0),n([e.Property(600)],i.prototype,"duration",void 0),n([e.Property("ease")],i.prototype,"easing",void 0),i}(e.ChildProperty),u=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Complex({effect:"FadeIn",duration:600,easing:"ease"},c)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},c)],i.prototype,"hide",void 0),i}(e.ChildProperty),f=function(t){function c(e,i){var s=t.call(this,e,i)||this;return s.toastCollection=[],s}return o(c,t),c.prototype.getModuleName=function(){return"toast"},c.prototype.getPersistData=function(){return this.addOnPersist([])},c.prototype.destroy=function(){this.hide("All"),this.element.classList.remove("e-toast-container"),e.setStyleAttribute(this.element,{position:"","z-index":""}),e.isNullOrUndefined(this.refElement)||e.isNullOrUndefined(this.refElement.parentElement)||(this.refElement.parentElement.insertBefore(this.element,this.refElement),e.detach(this.refElement),this.refElement=void 0),this.isBlazorServer()||t.prototype.destroy.call(this)},c.prototype.preRender=function(){this.isDevice=e.Browser.isDevice,"300px"===this.width&&(this.width=this.isDevice&&screen.width<768?"100%":"300px"),e.isNullOrUndefined(this.target)&&(this.target=document.body),this.enableRtl&&!this.isBlazorServer()&&this.element.classList.add("e-rtl")},c.prototype.render=function(){this.progressObj=[],this.intervalId=[],this.contentTemplate=null,this.toastTemplate=null,this.isDevice&&screen.width<768&&new e.Touch(this.element,{swipe:this.swipeHandler.bind(this)}),this.renderComplete(),this.initRenderClass=this.element.className},c.prototype.show=function(t){var i;if(e.isNullOrUndefined(t)||(this.templateChanges(t),i=JSON.parse(JSON.stringify(t)),e.extend(this,this,t)),e.isNullOrUndefined(this.toastContainer)){this.toastContainer=this.getContainer();var s="string"==typeof this.target?document.querySelector(this.target):document.body;if(e.isNullOrUndefined(s))return;"BODY"===s.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",s.style.position="relative"),this.setPositioning(this.position),s.appendChild(this.toastContainer)}if(this.isBlazorServer()&&this.element.classList.contains("e-control"))return void this.isToastModel(t);this.toastEle=this.createElement("div",{className:r,id:e.getUniqueID("toast")}),this.setWidthHeight(),this.setCSSClass(this.cssClass),e.isNullOrUndefined(this.template)||""===this.template?this.personalizeToast():this.templateRendering(),this.setProgress(),this.setCloseButton(),this.setAria(),this.appendToTarget(t),e.isNullOrUndefined(i)||(e.extend(i,{element:[this.toastEle]},!0),this.toastCollection.push(i)),this.isReact&&this.renderReactTemplates()},c.prototype.showToast=function(t,e){this.toastEle=this.element.querySelector("#"+t),this.show(e)},c.prototype.isToastModel=function(t){this.toastContainer=this.element,this.setPositioning(this.position);var i=this;e.isNullOrUndefined(i.element.lastElementChild)||this.setProgress(),this.setAria(),this.appendToTarget(t)},c.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,".e-toast:not(.e-toast-container)"),s=this.animation.hide.effect;e.isNullOrUndefined(i)||("Right"===t.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hideToast("swipe",i)):"Left"===t.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hideToast("swipe",i)),this.animation.hide.effect=s)},c.prototype.templateChanges=function(t){e.isUndefined(t.content)||e.isNullOrUndefined(this.contentTemplate)||this.content===t.content||this.clearContentTemplate(),e.isUndefined(t.template)||e.isNullOrUndefined(this.toastTemplate)||this.template===t.template||this.clearToastTemplate()},c.prototype.setCSSClass=function(t){if(t){var i=-1!==t.indexOf(",")?",":" ";e.classList(this.toastEle,t.split(i),[])}},c.prototype.setWidthHeight=function(){"300px"===this.width?this.toastEle.style.width=e.formatUnit(this.width):"100%"===this.width?this.toastContainer.classList.add("e-toast-full-width"):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove("e-toast-full-width")),this.toastEle.style.height=e.formatUnit(this.height)},c.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},c.prototype.sanitizeHelper=function(t){if(this.enableHtmlSanitizer){var i=e.SanitizeHtmlHelper.beforeSanitize(),s={cancel:!1,helper:null};e.extend(i,i,s),this.trigger("beforeSanitizeHtml",i),i.cancel&&!e.isNullOrUndefined(i.helper)?t=i.helper(t):i.cancel||(t=e.SanitizeHtmlHelper.serializeValue(i,t))}return t},c.prototype.hide=function(t){this.hideToast("",t)},c.prototype.hideToast=function(t,i){if(!e.isNullOrUndefined(this.toastContainer)&&0!==this.toastContainer.childElementCount)if("string"!=typeof i||"All"!==i)e.isNullOrUndefined(i)&&(i=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(i,t);else for(var s=0;s<this.toastContainer.childElementCount;s++)this.destroyToast(this.toastContainer.children[s],t)},c.prototype.fetchEle=function(t,i,s){i="string"==typeof i?this.sanitizeHelper(i):i;var o,n,r,l;if(l=t.classList.contains("e-toast-title")?this.element.id+"title":t.classList.contains("e-toast-content")?this.element.id+"content":this.element.id+"template",n="content"===s?this.contentTemplate:this.toastTemplate,!e.isNullOrUndefined(n))return t.appendChild(n.cloneNode(!0)),t;try{if(document.querySelectorAll(i).length>0){var a=null;"title"!==s&&(a=document.querySelector(i),t.appendChild(a),a.style.display="");var h=e.isNullOrUndefined(a)?n:a.cloneNode(!0);"content"===s?this.contentTemplate=h:this.toastTemplate=h}}catch(t){o=e.compile(i)}if(!e.isNullOrUndefined(o))if(this.isBlazorServer()){r=o({},this,s,l,!0)}else r=o({},this,s,null,!0);return e.isNullOrUndefined(r)||!(r.length>0)||e.isNullOrUndefined(r[0].tagName)&&1===r.length?0===t.childElementCount&&(t.innerHTML=i):[].slice.call(r).forEach(function(i){e.isNullOrUndefined(i.tagName)||(i.style.display=""),t.appendChild(i)}),t},c.prototype.clearProgress=function(t){e.isNullOrUndefined(this.intervalId[t])||(clearInterval(this.intervalId[t]),delete this.intervalId[t]),e.isNullOrUndefined(this.progressObj[t])||(clearInterval(this.progressObj[t].intervalId),delete this.progressObj[t])},c.prototype.clearContainerPos=function(){var t=this;if(this.isBlazorServer())return void(this.toastContainer=null);this.customPosition?(e.setStyleAttribute(this.toastContainer,{left:"",top:""}),this.toastContainer=null,this.customPosition=!1):([r+"-top-left",r+"-top-right",r+"-bottom-left",r+"-bottom-right",r+"-bottom-center",r+"-top-center",r+"-full-width"].forEach(function(i){!e.isNullOrUndefined(t.toastContainer)&&t.toastContainer.classList.contains(i)&&t.toastContainer.classList.remove(i)}),this.toastContainer=null),e.isNullOrUndefined(this.contentTemplate)||this.clearContentTemplate(),e.isNullOrUndefined(this.toastTemplate)||this.clearToastTemplate()},c.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},c.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},c.prototype.isBlazorServer=function(){return e.isBlazor()&&this.isServerRendered},c.prototype.destroyToast=function(t,i){for(var s,o=this,n=0;n<this.toastCollection.length;n++)this.toastCollection[n].element[0]===t&&(s=this.toastCollection[n],this.toastCollection.splice(n,1));var r={options:this,cancel:!1,type:i,element:t,toastContainer:this.toastContainer},l=this.animation.hide,h={duration:l.duration,name:l.effect,timingFunction:l.easing},p=parseInt(t.id.split("toast_")[1],10),d=this.isBlazorServer()?{options:s,toastContainer:this.toastContainer}:{options:s,toastContainer:this.toastContainer,toastObj:this};this.trigger("beforeClose",r,function(i){i.cancel||(e.isNullOrUndefined(o.progressObj[p])||e.isNullOrUndefined(t.querySelector("."+a))||(o.progressObj[p].progressEle.style.width="0%"),h.end=function(){o.clearProgress(p),o.isBlazorServer()&&!e.isNullOrUndefined(s)||e.detach(t),o.trigger("close",d),0===o.toastContainer.childElementCount&&o.clearContainerPos()},new e.Animation({}).animate(t,h))})},c.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},c.prototype.setAria=function(){e.attributes(this.toastEle,{role:"alert"})},c.prototype.setPositioning=function(t){this.isBlazorServer()||(isNaN(parseFloat(t.X))&&isNaN(parseFloat(t.Y))?this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase()):(this.customPosition=!0,e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)})))},c.prototype.setCloseButton=function(){if(this.showCloseButton){var t={close:"Close"};this.l10n=new e.L10n("toast",t,this.locale),this.l10n.setLocale(this.locale);var i=this.l10n.getConstant("close"),s=this.createElement("div",{className:h+" e-icons ",attrs:{tabindex:"0","aria-label":i}});this.toastEle.appendChild(s)}},c.prototype.setProgress=function(){if(this.timeOut>0){var t=parseInt(this.toastEle.id.split("toast_")[1],10);this.intervalId[t]=window.setTimeout(this.destroyToast.bind(this,this.toastEle),this.timeOut),this.progressObj[t]={hideEta:null,intervalId:null,maxHideTime:null,element:null,timeOutId:null,progressEle:null},this.progressObj[t].maxHideTime=parseFloat(this.timeOut+""),this.progressObj[t].hideEta=(new Date).getTime()+this.progressObj[t].maxHideTime,this.progressObj[t].element=this.toastEle,this.extendedTimeout>0&&(e.EventHandler.add(this.toastEle,"mouseover",this.toastHoverAction.bind(this,t)),e.EventHandler.add(this.toastEle,"mouseleave",this.delayedToastProgress.bind(this,t)),this.progressObj[t].timeOutId=this.intervalId[t]),this.showProgressBar&&(this.progressBarEle=this.createElement("div",{className:a}),this.toastEle.insertBefore(this.progressBarEle,this.toastEle.children[0]),this.progressObj[t].intervalId=setInterval(this.updateProgressBar.bind(this,this.progressObj[t]),10),this.progressObj[t].progressEle=this.progressBarEle)}},c.prototype.toastHoverAction=function(t){clearTimeout(this.progressObj[t].timeOutId),clearInterval(this.progressObj[t].intervalId),this.progressObj[t].hideEta=0;var i=this.progressObj[t].element;e.isNullOrUndefined(i.querySelector("."+a))||(this.progressObj[t].progressEle.style.width="0%")},c.prototype.delayedToastProgress=function(t){var i=this.progressObj[t],s=i.element;i.timeOutId=window.setTimeout(this.destroyToast.bind(this,s),this.extendedTimeout),i.maxHideTime=parseFloat(this.extendedTimeout+""),i.hideEta=(new Date).getTime()+i.maxHideTime,e.isNullOrUndefined(s.querySelector("."+a))||(i.intervalId=setInterval(this.updateProgressBar.bind(this,i),10))},c.prototype.updateProgressBar=function(t){var e=(t.hideEta-(new Date).getTime())/t.maxHideTime*100;e="Ltr"===this.progressDirection?100-e:e,t.progressEle.style.width=e+"%"},c.prototype.setIcon=function(){if(!e.isNullOrUndefined(this.icon)&&0!==this.icon.length){var t=this.createElement("div",{className:"e-toast-icon e-icons "+this.icon});this.toastEle.appendChild(t)}},c.prototype.setTitle=function(){if(!e.isNullOrUndefined(this.title)){var t=this.createElement("div",{className:"e-toast-title"});t=this.fetchEle(t,this.title,"title");var i=this.createElement("div",{className:l});i.appendChild(t),this.toastEle.appendChild(i)}},c.prototype.setContent=function(){var t=this.createElement("div",{className:"e-toast-content"}),i=this.element;if(e.isNullOrUndefined(this.content)||""===this.content){var s=""!==this.element.innerHTML.replace(/\s/g,"");if((i.children.length>0||s)&&(!i.firstElementChild||!i.firstElementChild.classList.contains(r))){this.innerEle=document.createDocumentFragment();for(var o=this.createElement("div");0!==i.childNodes.length;)this.innerEle.appendChild(this.element.childNodes[0]);t.appendChild(this.innerEle),[].slice.call(t.children).forEach(function(t){o.appendChild(t.cloneNode(!0))}),this.content=o,this.appendMessageContainer(t)}}else"object"!=typeof this.content||e.isNullOrUndefined(this.content.tagName)?(t=this.fetchEle(t,this.content,"content"),this.appendMessageContainer(t)):(t.appendChild(this.content),this.content=this.content.cloneNode(!0),this.appendMessageContainer(t))},c.prototype.appendMessageContainer=function(t){if(this.toastEle.querySelectorAll("."+l).length>0)this.toastEle.querySelector("."+l).appendChild(t);else{var e=this.createElement("div",{className:l});e.appendChild(t),this.toastEle.appendChild(e)}},c.prototype.actionButtons=function(){var t=this,s=this.createElement("div",{className:"e-toast-actions"});[].slice.call(this.buttons).forEach(function(o){if(!e.isNullOrUndefined(o.model)){var n=t.createElement("button");n.setAttribute("type","button"),(e.isNullOrUndefined(o.model.cssClass)||0===o.model.cssClass.length)&&(o.model.cssClass="e-primary"),n.classList.add("e-small"),new i.Button(o.model,n),e.isNullOrUndefined(o.click)||"function"!=typeof o.click||e.EventHandler.add(n,"click",o.click),s.appendChild(n)}}),s.childElementCount>0&&this.appendMessageContainer(s)},c.prototype.appendToTarget=function(t){var i=this,o=this.isBlazorServer()?{options:t,element:this.toastEle,cancel:!1}:{options:t,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",o,function(o){if(o.cancel){if(i.isBlazorServer()){var n=parseInt(i.toastEle.id.split("toast_")[1],10);i.clearProgress(n),e.detach(i.toastEle),0===i.toastContainer.childElementCount&&i.clearContainerPos()}}else i.isBlazorServer()||(i.toastEle.style.display="none"),i.newestOnTop&&0!==i.toastContainer.childElementCount?i.toastContainer.insertBefore(i.toastEle,i.toastContainer.children[0]):i.isBlazorServer()||i.toastContainer.appendChild(i.toastEle),e.removeClass([i.toastEle],"e-blazor-toast-hidden"),e.EventHandler.add(i.toastEle,"click",i.clickHandler,i),e.EventHandler.add(i.toastEle,"keydown",i.keyDownHandler,i),i.toastContainer.style.zIndex=s.getZindexPartial(i.toastContainer)+"",i.displayToast(i.toastEle,t)})},c.prototype.clickHandler=function(t){var i=this;this.isBlazorServer()||t.stopPropagation();var s=t.target,o=e.closest(s,"."+r),n=this.isBlazorServer()?{element:o,cancel:!1,clickToClose:!1,originalEvent:t}:{element:o,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},l=s.classList.contains(h);this.trigger("click",n,function(t){(l&&!t.cancel||t.clickToClose)&&i.destroyToast(o,"click")})},c.prototype.keyDownHandler=function(t){if(t.target.classList.contains(h)&&(13===t.keyCode||32===t.keyCode)){var i=t.target,s=e.closest(i,"."+r);this.destroyToast(s,"key")}},c.prototype.displayToast=function(t,i){var s=this,o=this.animation.show,n={duration:o.duration,name:o.effect,timingFunction:o.easing},r=this.isBlazorServer()?{options:i,element:this.toastEle}:{options:i,toastObj:this,element:this.toastEle};n.begin=function(){t.style.display=""},n.end=function(){s.trigger("open",r)},new e.Animation(n).animate(t)},c.prototype.getContainer=function(){return this.element.classList.add("e-toast-container"),this.element},c.prototype.onPropertyChanged=function(t,e){for(var i=this.element,s=0,o=Object.keys(t);s<o.length;s++)switch(o[s]){case"enableRtl":t.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl")}},n([e.Property("300px")],c.prototype,"width",void 0),n([e.Property("auto")],c.prototype,"height",void 0),n([e.Property(null)],c.prototype,"title",void 0),n([e.Property(null)],c.prototype,"content",void 0),n([e.Property(!0)],c.prototype,"enableHtmlSanitizer",void 0),n([e.Property(null)],c.prototype,"icon",void 0),n([e.Property(null)],c.prototype,"cssClass",void 0),n([e.Property(null)],c.prototype,"template",void 0),n([e.Property(!0)],c.prototype,"newestOnTop",void 0),n([e.Property(!1)],c.prototype,"showCloseButton",void 0),n([e.Property(!1)],c.prototype,"showProgressBar",void 0),n([e.Property(5e3)],c.prototype,"timeOut",void 0),n([e.Property("Rtl")],c.prototype,"progressDirection",void 0),n([e.Property(1e3)],c.prototype,"extendedTimeout",void 0),n([e.Complex({},u)],c.prototype,"animation",void 0),n([e.Complex({},p)],c.prototype,"position",void 0),n([e.Collection([{}],d)],c.prototype,"buttons",void 0),n([e.Property(null)],c.prototype,"target",void 0),n([e.Event()],c.prototype,"created",void 0),n([e.Event()],c.prototype,"beforeSanitizeHtml",void 0),n([e.Event()],c.prototype,"destroyed",void 0),n([e.Event()],c.prototype,"open",void 0),n([e.Event()],c.prototype,"beforeOpen",void 0),n([e.Event()],c.prototype,"beforeClose",void 0),n([e.Event()],c.prototype,"close",void 0),n([e.Event()],c.prototype,"click",void 0),c=n([e.NotifyPropertyChanges],c)}(e.Component);return t.ToastPosition=p,t.ButtonModelProps=d,t.ToastAnimations=c,t.ToastAnimationSettings=u,t.Toast=f,t}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
- /*!
- * filename: ej2-pdfviewer.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.pdfviewer=function(e,t,i,n,o,s,a,r,l,d,u,M,p){"use strict";function h(e){return"Line"===e.shapeAnnotationType||"LineWidthArrowHead"===e.shapeAnnotationType||"Distance"===e.shapeAnnotationType||"Polygon"===e.shapeAnnotationType}function L(e,t){if(e&&t)if(e.formFieldAnnotationType)-1!==e.id.indexOf("diagram_helper")?(t.style.fill="transparent",t.style.strokeWidth=1,t.style.strokeDashArray=e.borderDashArray):(t.style.fill="transparent",t.style.strokeWidth=0);else{var i="#ffffff00"===e.fillColor?"transparent":e.fillColor;t.style.fill=i||"white",t.style.strokeColor=e.strokeColor?e.strokeColor:e.borderColor,t.style.color=e.strokeColor?e.strokeColor:e.borderColor,t.style.strokeWidth=e.thickness,"Image"!==e.shapeAnnotationType&&"SignatureText"!==e.shapeAnnotationType&&"SignatureImage"!==e.shapeAnnotationType||(t.style.strokeWidth=0),t.style.strokeDashArray=e.borderDashArray,t.style.opacity=e.opacity}}function w(e){for(var t=0,n=0;n<e.length-1;n++)t+=i.Point.findLength(e[n],e[n+1]);return t}function c(e){return i.Point.getLengthFromListOfPoints(e)}function C(e,t){var i={width:e.actualSize.width,height:e.actualSize.height,x:e.offsetX-e.actualSize.width*e.pivot.x+.5,y:e.offsetY-e.actualSize.height*e.pivot.y+.5,angle:e.rotateAngle+e.parentTransform,fill:e.style.fill,stroke:e.style.strokeColor,pivotX:e.pivot.x,pivotY:e.pivot.y,strokeWidth:1,opacity:e.style.opacity,dashArray:e.style.strokeDashArray||"",visible:e.visible,id:e.id};return t&&(i.x+=t.tx,i.y+=t.ty),i}function g(e){return void 0!==e&&"string"==typeof e&&(e=t.getValue(e,window)),e}function m(e,t,i){var n={},o="properties";if(e){i=e.propName;var s=e[o]||e,a=[],r=[];if((a=a.concat(Object.keys(s))).push("version"),i){var l=g(t);r=l?l(i):[],a=a.concat(r)}for(var d=y(i),u=0,M=a=a.concat(d);u<M.length;u++){var p=M[u];"historyManager"!==p&&("wrapper"!==p?!(!e[p]||!e.hasOwnProperty("observers"))||(e[p]instanceof Array?n[p]=f(-1===d.indexOf(p)&&e[o]?e[o][p]:e[p],t,p):e[p]instanceof Array==!1&&e[p]instanceof HTMLElement?n[p]=e[p].cloneNode(!0).innerHtml:e[p]instanceof Array==!1&&e[p]instanceof Object?n[p]=m(-1===d.indexOf(p)&&e[o]?e[o][p]:e[p]):n[p]=e[p]):e[p]&&(n[p]={actualSize:{width:e[p].actualSize.width,height:e[p].actualSize.height},offsetX:e[p].offsetX,offsetY:e[p].offsetY}))}}return n}function f(e,t,i){var n;if(e){n=[];for(var o=0;o<e.length;o++)e[o]instanceof Array?n.push(e[o]):e[o]instanceof Object?n.push(m(e[o],t,i)):n.push(e[o])}return n}function y(e){switch(e){case"nodes":case"children":return["inEdges","outEdges","parentId","processId","nodeId","umlIndex","isPhase","isLane"];case"connectors":return["parentId"];case"annotation":case"annotations":return["nodeId"];case"shape":return["hasHeader"]}return[]}function j(e,t){var n;if("Distance"===e.shapeAnnotationType)for(var o=0,s=void 0,a=0;a<e.wrapper.children.length;a++){var r=i.Point.findAngle(e.sourcePoint,e.targetPoint);if(e.wrapper.children[a].id.indexOf("leader")>-1){var l=e.wrapper.children[0].bounds.center;0===o?(s={x:e.sourcePoint.x,y:e.sourcePoint.y-e.leaderHeight},l=e.sourcePoint):(s={x:e.targetPoint.x,y:e.targetPoint.y-e.leaderHeight},l=e.targetPoint);var d=i.identityMatrix();if(i.rotateMatrix(d,r,l.x,l.y),n=i.transformPointByMatrix(d,{x:s.x,y:s.y}),t==="Leader"+o)return{leader:"leader"+o,point:n};o++}}return{leader:"",point:n}}function S(e,t){Math.abs(e.sourcePoint.x-e.targetPoint.x),Math.abs(e.sourcePoint.y-e.targetPoint.y);var i=(t=e.vertexPoints).slice(0);return i&&i.length>0&&(e.sourcePoint=i[0],e.targetPoint=i[i.length-1]),i}function A(e,t){for(var i,n="",o=[],s=0;s<t.length;)o.push({x:t[s].x,y:t[s].y}),s++;o=b(e,o);for(var a=0;a<o.length;a++)i=o[a],0===a&&(n="M"+i.x+" "+i.y),a>0&&(n+=" L"+i.x+" "+i.y);return n}function T(e,t,n){var o,s=new i.Rect;return o=A(e,t),s=i.Rect.toBounds(t),n.width=s.width,n.height=s.height,n.offsetX=s.x+n.width/2,n.offsetY=s.y+n.height/2,n.data=o,e.wrapper&&(e.wrapper.offsetX=n.offsetX,e.wrapper.offsetY=n.offsetY,e.wrapper.width=s.width,e.wrapper.height=s.height),n}function x(e,t){var i=[];return i=S(e),t.staticSize=!0,t=T(e,i,t),L(e,t),t}function N(e,t,n,o,s){var a,r;t.offsetX=n.x,t.offsetY=n.y,r=i.Point.findAngle(n,o);var l=e.thickness<=5?5:e.thickness;a=R(s?e.sourceDecoraterShapes:e.taregetDecoraterShapes);var d=new i.Size(2*l,2*l);t.transform=i.RotateTransform.Self,L(e,t),t.style.fill="tranparent"!==e.fillColor?e.fillColor:"white",t.rotateAngle=r,t.data=a,t.canMeasurePath=!0,t.width=d.width,t.height=d.height,"Butt"===e.sourceDecoraterShapes&&(t.width=d.width-10,t.height=d.height+10)}function D(e,t,n,o){var s=new i.PathElement;return N(e,s,t,n,o),s}function b(e,t){return t[0]=I(e,t,!0),t[t.length-1]=I(e,t,!1),t}function I(e,t,n){var o={x:0,y:0},s={x:0,y:0},a={x:0,y:0},r=t.length;s=n?t[0]:t[r-1],a=n?t[1]:t[r-2];var l=i.Point.distancePoints(s,a);l=0===l?1:l;var d=e.thickness;o.x=Math.round(s.x+d*(a.x-s.x)/l),o.y=Math.round(s.y+d*(a.y-s.y)/l);return o=i.Point.adjustPoint(o,a,!0,.5)}function v(e,t,n,o){var s,a=[],r=i.Point.findAngle(t[0],t[1]);return s=B(e,r),!o.enableImportAnnotationMeasurement&&e.notes&&""!==e.notes?s.content=e.notes:s.content=n.setConversion(w([t[0],t[1]])*n.pixelToPointFactor,e),s.rotateValue={y:-10,angle:r},!0===e.enableShapeLabel&&(s.style.strokeColor=e.labelBorderColor,s.style.fill=e.labelFillColor,s.style.fontSize=e.fontSize,s.style.color=e.fontColor,s.style.fontFamily=e.fontFamily),a.push(s),a}function E(e,i,n){for(var o,s=0;s<e.wrapper.children.length;s++){var a=e.wrapper.children[s];a&&!t.isNullOrUndefined(a.content)&&(o=n.setConversion(w([i[0],i[1]])*n.pixelToPointFactor,e),a.content=o,a.childNodes[0].text=a.content,a.refreshTextElement())}return o}function V(e,i){for(var n,o=0;o<e.wrapper.children.length;o++){var s=e.wrapper.children[o];s&&!t.isNullOrUndefined(s.content)&&(n=i.setConversion(e.bounds.width/2*i.pixelToPointFactor,e),s.content=n,2===s.childNodes.length?(s.childNodes[0].text=n,s.childNodes.splice(s.childNodes.length-1,1)):s.childNodes[0].text=n,s.refreshTextElement())}return n}function z(e,t,n,o){var s,a=[],r=i.Point.findAngle(t[0],t[1]);return s=B(e,r),!o.enableImportAnnotationMeasurement&&e.notes&&""!==e.notes?s.content=e.notes:s.content=n.calculatePerimeter(e),!0===e.enableShapeLabel&&(s.style.strokeColor=e.labelBorderColor,s.style.fill=e.labelFillColor,s.style.fontSize=e.fontSize,s.style.color=e.fontColor,s.style.fontFamily=e.fontFamily),s.rotateValue={y:-10,angle:r},a.push(s),a}function k(e,i,n){for(var o,s=0;s<e.wrapper.children.length;s++){var a=e.wrapper.children[s];a&&!t.isNullOrUndefined(a.content)&&(o=n.calculatePerimeter(e),a.content=o,a.childNodes[0].text=a.content,a.refreshTextElement())}return o}function O(e){for(var i=0;i<e.wrapper.children.length;i++){var n=e.wrapper.children[i];n&&!t.isNullOrUndefined(n.content)&&e.wrapper.children.splice(i,1)}}function P(e){if(e.wrapper&&e.wrapper.children)for(var i=0;i<e.wrapper.children.length;i++){var n=e.wrapper.children[i];n&&!t.isNullOrUndefined(n.content)&&(n.content=e.notes,n.childNodes[0].text=n.content,n.refreshTextElement())}}function F(e){var t,i="";i="M"+e[0].x+" "+e[0].y;var n;for(n=1;n<e.length;n++)i+="L"+(t=e[n]).x+" "+t.y;return i+="Z"}function B(e,t){var n=new i.TextElement;return L(e,n),n.style.fill="transparent",n.id=i.randomId(),n.horizontalAlignment="Center",n.rotateValue={y:10,angle:t},n.verticalAlignment="Top",n.relativeMode="Object",n.setOffsetWithRespectToBounds(.5,.5,"Absolute"),n.style.textWrapping="NoWrap",n}function Y(e,t){var i=[],n=U(e,t[0],t[1]);return i.push(n),n=U(e,t[1],t[0],!0),i.push(n),i}function U(e,t,n,o){var s=new i.PathElement;s.offsetX=t.x,s.offsetY=t.y;var a,r=i.Point.findAngle(t,n),l={x:(t.x+n.x)/2,y:(t.y+n.y)/2},d=i.identityMatrix();i.rotateMatrix(d,0-r,l.x,l.y);var u=i.transformPointByMatrix(d,t),M={x:u.x,y:u.y-e.leaderHeight};d=i.identityMatrix(),i.rotateMatrix(d,r,s.offsetX,s.offsetY),u=i.transformPointByMatrix(d,M);var p={x:t.x,y:t.y};s.offsetX=p.x,s.offsetY=p.y,s.transform=i.RotateTransform.Self,a="M"+t.x+","+t.y+",L"+u.x+","+u.y+"Z";var h=new i.Size(0,e.leaderHeight);return s.pivot.x=.5,o?(s.id="leader2_"+i.randomId(),s.pivot.y=0):(s.id="leader1_"+i.randomId(),s.pivot.y=1),L(e,s),s.rotateAngle=r,s.data=a,s.canMeasurePath=!0,s.width=h.width,s.height=h.height,s}function Q(e,t){for(var n=e.vertexPoints,o=0;o<n.length-1;o++){var s=n[o],a=n[o+1],r=i.Rect.toBounds([s,a]);if(r.Inflate(10),r.containsPoint(t)){var l=_(t,s,a),d={x1:s.x,x2:a.x,y1:s.y,y2:a.y},u={x1:t.x,x2:l.x,y1:t.y,y2:l.y},M=i.intersect3(d,u);if(M.enabled){var p=i.Point.findLength(t,M.intersectPt);if(Math.abs(p)<10)return!0}else{var h=i.Rect.toBounds([t,t]);if(h.Inflate(3),h.containsPoint(s)||h.containsPoint(a))return!0}if(i.Point.equals(t,l))return!0}}return!1}function _(e,t,n){var o;o=i.Point.findLength(t,e)>i.Point.findLength(n,e)?n:t;var s=i.Point.findAngle(t,n),a=i.Point.findAngle(o,e),r=i.Point.findLength(o,e),l=a+2*(s-a);return{x:o.x+r*Math.cos(l*Math.PI/180),y:o.y+r*Math.sin(l*Math.PI/180)}}function R(e){return qe[e]}function W(e,t,i,n){if(i&&t.activeElements.activePageID>-1){var o=J(t,i,e),s=H(o,e,t,i);return n?o:s}}function J(e,t,i){var n=e.currentPosition||{x:i.offsetX,y:i.offsetY};return q(n={x:n.x/e.getZoomFactor(),y:n.y/e.getZoomFactor()},t.getPageTable(e.activeElements.activePageID).objects)}function H(e,t,n,o){var s,a,r,l=null;if(t&&t.type&&-1!==t.type.indexOf("touch")){if(s=t,o.annotation){var d=n.getElement("_pageDiv_"+o.annotation.getEventPageNumber(t));if(d){var u=d.getBoundingClientRect();a=s.changedTouches[0].clientX-u.left,r=s.changedTouches[0].clientY-u.top}}}else if(t&&t.target&&t.path&&t.target.parentElement&&t.target.parentElement.classList.contains("foreign-object")){var M=t.path[4].getBoundingClientRect();a=t.clientX-M.left,r=t.clientY-M.top}else a=isNaN(t.offsetX)?t.position?t.position.x:0:t.offsetX,r=isNaN(t.offsetY)?t.position?t.position.y:0:t.offsetY;for(var p=0,h=0;h<e.length;h++)if("Distance"===e[h].shapeAnnotationType||"Line"===e[h].shapeAnnotationType||"LineWidthArrowHead"===e[h].shapeAnnotationType||n.tool instanceof pt){var L={x:a/n.getZoomFactor(),y:r/n.getZoomFactor()},w=Z(e[h],L,5),c=Q(e[h],L);if(w&&!c){var C=G(e[h],w);if(C){var g=i.Rect.toBounds([C,C]);g.Inflate(10),g.containsPoint(L)&&(c=!0)}}w&&c&&(l=e[h])}else{var m=e[h].wrapper.bounds,f=0;if("Stamp"!==e[h].shapeAnnotationType&&"Image"!==e[h].shapeAnnotationType||(f=25),(m.x-5)*n.getZoomFactor()<a&&(m.x+m.width+5)*n.getZoomFactor()>a&&(m.y-5-f)*n.getZoomFactor()<r&&(m.y+m.height+5)*n.getZoomFactor()>r)if(n.tool instanceof ut)l=e[h];else if(p){var y=a-(m.x-5)*n.getZoomFactor()+((m.x+m.width+5)*n.getZoomFactor()-a)+(r-(m.y-5-f)*n.getZoomFactor())+((m.y+m.height+5)*n.getZoomFactor()-r);p>y&&(l=e[h],p=y)}else l=e[h],p=a-(m.x-5)*n.getZoomFactor()+((m.x+m.width+5)*n.getZoomFactor()-a)+(r-(m.y-5-f)*n.getZoomFactor())+((m.y+m.height+5)*n.getZoomFactor()-r)}return l}function G(e,t){var n=e.sourcePoint,o=e.targetPoint;if("Distance"===e.shapeAnnotationType){var s=t,a=void 0,r=i.Point.findAngle(e.sourcePoint,e.targetPoint);if(s.id.indexOf("leader")>-1){var l=e.wrapper.children[0].bounds.center;s.id.indexOf("leader1")>-1?(a={x:e.sourcePoint.x,y:e.sourcePoint.y-e.leaderHeight},l=n):(a={x:e.targetPoint.x,y:e.targetPoint.y-e.leaderHeight},l=o);var d=i.identityMatrix();return i.rotateMatrix(d,r,l.x,l.y),i.transformPointByMatrix(d,{x:a.x,y:a.y})}}}function Z(e,t,i){return K(e.wrapper,t,i)}function X(e,t,i){if(0===i.length)i.push(e);else if(1===i.length)i[0][t]>e[t]?i.splice(0,0,e):i.push(e);else if(i.length>1){for(var n=0,o=i.length-1,s=Math.floor((n+o)/2);s!==n;)i[s][t]<e[t]?(n=s,s=Math.floor((n+o)/2)):i[s][t]>e[t]&&(o=s,s=Math.floor((n+o)/2));i[o][t]<e[t]?i.push(e):i[n][t]>e[t]?i.splice(n,0,e):i[n][t]<e[t]&&i[o][t]>e[t]&&i.splice(o,0,e)}}function K(e,n,o){if(e&&e.children)for(var s=e.children.length-1;s>=0;s--){var a=e.children[s];if(!t.isNullOrUndefined(a.children)&&a.children.length>0)for(var r=a.children.length-1;r>=0;r--){var l=a.children[r];if(l&&l.bounds.containsPoint(n,10)){if(l instanceof i.Container&&(d=this.findTargetElement(l,n)))return d;if(l.bounds.containsPoint(n,10))return l}}else if(a&&a.bounds.containsPoint(n,10)){if(a instanceof i.Container){var d=this.findTargetElement(a,n);if(d)return d}if(a.bounds.containsPoint(n,10))return a}}return e&&e.bounds.containsPoint(n,o)&&"none"!==e.style.fill?e:null}function q(e,t){for(var i=[],n=0,o=t;n<o.length;n++){var s=o[n];(Z(s,e,10)||("Stamp"===s.shapeAnnotationType||"Image"===s.shapeAnnotationType)&&Z(s,e,40))&&X(s,"zIndex",i)}return i}function $(e,t){var i=void 0;if(e.target&&e.target.wrapper)return e.target.pageIndex;if(e.target){var n=e.target.id.split("_");n.length>0&&(i=parseInt(n[n.length-1]))}return i}function ee(e,t,n,o,s){var a=i.createHtmlElement("div",{id:s.element.id+o+"_diagramAdornerLayer",style:"width:"+e.width+"px;height:"+e.height+"px;"+t});if(!i.getDiagramElement(a.id)){var r=te(s.element.id+o+"_diagramAdorner_svg",e.width,e.height);r.setAttribute("class","e-adorner-layer"+o),r.setAttribute("style","pointer-events:none;"),s.adornerSvgLayer=i.createSvgElement("g",{id:s.element.id+"_diagramAdorner"}),s.adornerSvgLayer.setAttribute("style"," pointer-events: all; "),r.appendChild(s.adornerSvgLayer),a.appendChild(r),n.parentElement.appendChild(a);var l=i.createSvgElement("g",{id:s.element.id+"_SelectorElement"});s.adornerSvgLayer.appendChild(l),i.setAttributeSvg(r,{style:"pointer-events:none;"})}s.viewerBase.applyElementStyles(a,o)}function te(e,t,n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");return i.setAttributeSvg(o,{id:e,width:t,height:n}),o}function ie(e,t,i,n){switch(e){case"Create":ne({type:n,target:document.querySelector(t.target),cssClass:t.cssClass,label:t.label,width:t.width});break;case"Show":Oe(document.querySelector(i));break;case"Hide":Fe(document.querySelector(i));break;case"Set":Be({cssClass:t.cssClass,type:n})}}function ne(e,i){if(e.target){var n,o=t.isNullOrUndefined(i)?t.createElement:i,s=Se(e.target,o);if(t.isNullOrUndefined(e.cssClass)||s.wrap.classList.add(e.cssClass),t.isNullOrUndefined(e.template)&&t.isNullOrUndefined(It)){var a=t.isNullOrUndefined(e.type)?ue(s.wrap):e.type;n=ge(t.isNullOrUndefined(e.width)?void 0:e.width,a),Me(a,s.wrap,n,o),t.isNullOrUndefined(e.label)||oe(s.inner_wrap,e.label,o)}else{var r=t.isNullOrUndefined(e.template)?It:e.template;s.wrap.classList.add(Gt),Ce(s.wrap,r,vt)}s.wrap.classList.add(Pt),s=null}}function oe(e,t,i){var n=i("div",{});return n.classList.add(Ht),n.textContent=t,e.appendChild(n),n}function se(e,t,i){var n=fe();bt[n]={timeOut:0,type:"Material",radius:t},je(e,n,i,Ft),xe(t,e,"Material",Ft)}function ae(e,t,i){var n=fe();bt[n]={timeOut:0,type:"Bootstrap4",radius:t},je(e,n,i,Ut),xe(t,e,"Bootstrap4",Ut)}function re(e,t,i){var n={};bt[t].timeOut=0,n[t]=me(t,i,0,0),Ae({uniqueID:t,container:e,globalInfo:n,timeOutVar:0})}function le(e,t,i){var n=fe();bt[n]={timeOut:0,type:"Fabric",radius:t},ye(e,n,Bt,i),Ee(t,e,Bt)}function de(e,t,i){var n=fe();bt[n]={timeOut:0,type:"HighContrast",radius:t},ye(e,n,Qt,i),Ee(t,e,Qt)}function ue(e){return window.getComputedStyle(e,":after").getPropertyValue("content").replace(/['"]+/g,"")}function Me(e,i,n,o){var s=i.querySelector("."+Rt),a=s.querySelector("svg");switch(t.isNullOrUndefined(a)||s.removeChild(a),e){case"Material":se(s,n,o);break;case"Fabric":le(s,n,o);break;case"Bootstrap":pe(s,n,o);break;case"HighContrast":de(s,n,o);break;case"Bootstrap4":ae(s,n,o)}}function pe(e,t,i){var n=fe();bt[n]={timeOut:0,type:"Bootstrap",radius:t},he(e,n,i),Le(e,t)}function he(e,t,i){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("id",t),n.setAttribute("class",Yt),n.setAttribute("viewBox","0 0 64 64"),e.insertBefore(n,e.firstChild);for(var o=0;o<=7;o++){var s=document.createElementNS("http://www.w3.org/2000/svg","circle");s.setAttribute("class",Wt+"_"+o),s.setAttribute("r","2"),s.setAttribute("transform","translate(32,32)"),n.appendChild(s)}}function Le(e,t){var i=e.querySelector("svg.e-spin-bootstrap");i.style.width=i.style.height=t+"px";for(var n=90,o=0;o<=7;o++){var s=Ve(0,0,24,n),a=i.querySelector("."+Wt+"_"+o);a.setAttribute("cx",s.x+""),a.setAttribute("cy",s.y+""),n=n>=360?0:n,n+=45}}function we(e,t){function i(e){n.push(e),e===s&&1!==r||(e<=o&&e>1&&!a?e=parseFloat((e-.2).toFixed(2)):1===e?(e=7,e=parseFloat((e+.2).toFixed(2)),a=!0):e<8&&a?8===(e=parseFloat((e+.2).toFixed(2)))&&(a=!1):e<=8&&!a&&(e=parseFloat((e-.2).toFixed(2))),++r,i(e))}var n=[],o=e,s=t,a=!1,r=1;return i(o),n}function ce(e){for(var t=e.querySelector("svg.e-spin-bootstrap").getAttribute("id"),i=1;i<=8;i++)!function(e,t,i,n,o){function s(t){bt[o].isAnimate&&(++a,e.setAttribute("r",t+""),a>=n.length&&(a=0),bt[o].timeOut=setTimeout(s.bind(null,n[a]),18))}var a=0;s(t)}(e.getElementsByClassName("e-path-circle_"+(8===i?0:i))[0],i,0,we(i,i),t)}function Ce(e,i,n){t.isNullOrUndefined(n)||e.classList.add(n),e.querySelector(".e-spinner-inner").innerHTML=i}function ge(e,t){var i;switch(t){case"Material":i=Et;break;case"Fabric":i=Vt;break;case"Bootstrap4":i=kt;break;default:i=zt}return e=e?parseFloat(e+""):i,"Bootstrap"===t?e:e/2}function me(e,t,i,n){return{radius:t,count:i,previousId:n}}function fe(){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function ye(e,t,i,n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("id",t),o.setAttribute("class",i);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",Wt);var a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("class",Jt),e.insertBefore(o,e.firstChild),o.appendChild(s),o.appendChild(a)}function je(e,t,i,n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("class",n),o.setAttribute("id",t);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",Wt),e.insertBefore(o,e.firstChild),o.appendChild(s)}function Se(e,t){var i=t("div",{});i.classList.add(_t);var n=t("div",{});return n.classList.add(Rt),e.appendChild(i),i.appendChild(n),{wrap:i,inner_wrap:n}}function Ae(e){Te(1,149,ve,1333,e.globalInfo[e.uniqueID].count,75,e),e.globalInfo[e.uniqueID].count=++e.globalInfo[e.uniqueID].count%4}function Te(e,i,n,o,s,a,r){function l(t){var i=Math.max(0,Math.min((new Date).getTime()-M,o));d(n(i,e,p,o),t.container),u===t.globalInfo[t.uniqueID].previousId&&i<o?bt[t.uniqueID].timeOut=setTimeout(l.bind(null,t),1):Ae(t)}function d(e,i){if(!t.isNullOrUndefined(i.querySelector("svg.e-spin-material"))&&!t.isNullOrUndefined(i.querySelector("svg.e-spin-material").querySelector("path.e-path-circle"))){var n=i.querySelector("svg.e-spin-material").querySelector("path.e-path-circle");n.setAttribute("stroke-dashoffset",Ie(h,L,e,a)+""),n.setAttribute("transform","rotate("+w+" "+h/2+" "+h/2+")")}}var u=++r.globalInfo[r.uniqueID].previousId,M=(new Date).getTime(),p=i-e,h=Ne(2*r.globalInfo[r.uniqueID].radius+""),L=be(h),w=-90*(r.globalInfo[r.uniqueID].count||0);l(r)}function xe(e,t,i,n){var o=2*e,s=t.querySelector("svg."+n),a=s.querySelector("path.e-path-circle"),r=be(o),l=o/2+"px";s.setAttribute("viewBox","0 0 "+o+" "+o),s.style.width=s.style.height=o+"px",s.style.transformOrigin=l+" "+l+" "+l,a.setAttribute("d",De(o,r)),"Material"===i&&(a.setAttribute("stroke-width",r+""),a.setAttribute("stroke-dasharray",(o-r)*Math.PI*.75+""),a.setAttribute("stroke-dashoffset",Ie(o,r,1,75)+""))}function Ne(e){return parseFloat(e)}function De(e,t){var i=e/2,n=t/2;return"M"+i+","+n+"A"+(i-n)+","+(i-n)+" 0 1 1 "+n+","+i}function be(e){return.1*e}function Ie(e,t,i,n){return(e-t)*Math.PI*(3*n/100-i/100)}function ve(e,t,i,n){var o=(e/=n)*e,s=o*e;return t+i*(6*s*o+-15*o*o+10*s)}function Ee(e,t,i){var n=e,o=e,s=2*e,a=t.querySelector("."+i),r=a.querySelector(".e-path-circle"),l=a.querySelector(".e-path-arc"),d=s/2+"px";r.setAttribute("d",ke(n,o,e)),l.setAttribute("d",ze(n,o,e,315,45)),a.setAttribute("viewBox","0 0 "+s+" "+s),a.style.transformOrigin=d+" "+d+" "+d,a.style.width=a.style.height=s+"px"}function Ve(e,t,i,n){var o=(n-90)*Math.PI/180;return{x:e+i*Math.cos(o),y:t+i*Math.sin(o)}}function ze(e,t,i,n,o){var s=Ve(e,t,i,o),a=Ve(e,t,i,n);return["M",s.x,s.y,"A",i,i,0,0,0,a.x,a.y].join(" ")}function ke(e,t,i){return["M",e,t,"m",-i,0,"a",i,i,0,1,0,2*i,0,"a",i,i,0,1,0,2*-i,0].join(" ")}function Oe(e){Pe(e,!1),e=null}function Pe(e,i){var n;if(e&&(n=e.classList.contains(_t)?e:e.querySelector("."+_t)),e&&n){var o=n.querySelector("."+Rt);if(i?!n.classList.contains(Gt)&&!n.classList.contains(Pt):!n.classList.contains(Gt)&&!n.classList.contains(Ot)){var s=n.querySelector("svg");if(t.isNullOrUndefined(s))return;var a=s.getAttribute("id");switch(bt[a].isAnimate=!i,bt[a].type){case"Material":i?clearTimeout(bt[a].timeOut):re(o,a,bt[a].radius);break;case"Bootstrap":i?clearTimeout(bt[a].timeOut):ce(o)}}i?t.classList(n,[Pt],[Ot]):t.classList(n,[Ot],[Pt]),e=null}}function Fe(e){Pe(e,!0),e=null}function Be(e,i){var n=t.isNullOrUndefined(i)?t.createElement:i;void 0!==e.template&&(It=e.template,void 0!==e.template&&(vt=e.cssClass));for(var o=document.querySelectorAll("."+_t),s=0;s<o.length;s++)Ye(e.template,o[s],e.type,e.cssClass,n)}function Ye(e,i,n,o,s){t.isNullOrUndefined(e)&&!i.classList.contains(Gt)?(Ue(i,n,o,s),i.classList.contains(Ot)?(i.classList.remove(Ot),Oe(i)):(i.classList.remove(Pt),Fe(i))):(It=e,t.isNullOrUndefined(o)||(vt=o))}function Ue(e,i,n,o){t.isNullOrUndefined(n)||e.classList.add(n);var s=e.querySelector("svg"),a="Bootstrap"===i?parseFloat(s.style.height):parseFloat(s.style.height)/2;if(s.getAttribute("class").split(/\s/).indexOf("e-spin-material")>=0){var r=s.getAttribute("id");clearTimeout(bt[r].timeOut)}Me(i,e,a,o)}var Qe=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_e=function(e,t,i,n){var o,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a},Re=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Qe(n,e),_e([t.Property(0)],n.prototype,"x",void 0),_e([t.Property(0)],n.prototype,"y",void 0),_e([t.Property(0)],n.prototype,"width",void 0),_e([t.Property(0)],n.prototype,"height",void 0),_e([t.Property(0)],n.prototype,"left",void 0),_e([t.Property(0)],n.prototype,"top",void 0),_e([t.Property(0)],n.prototype,"right",void 0),_e([t.Property(0)],n.prototype,"bottom",void 0),_e([t.Complex({x:0,y:0},i.Point)],n.prototype,"location",void 0),_e([t.Complex(new i.Size(0,0),i.Size)],n.prototype,"size",void 0),n}(t.ChildProperty),We=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Qe(i,e),_e([t.Property(!1)],i.prototype,"isBold",void 0),_e([t.Property(!1)],i.prototype,"isItalic",void 0),_e([t.Property(!1)],i.prototype,"isUnderline",void 0),_e([t.Property(!1)],i.prototype,"isStrikeout",void 0),i}(t.ChildProperty),Je=function(e){function i(t,i,n,o){return e.call(this,t,i,n,o)||this}return Qe(i,e),_e([t.Property("")],i.prototype,"id",void 0),_e([t.Property("Rectangle")],i.prototype,"shapeAnnotationType",void 0),_e([t.Property(null)],i.prototype,"formFieldAnnotationType",void 0),_e([t.Property("")],i.prototype,"measureType",void 0),_e([t.Property("")],i.prototype,"author",void 0),_e([t.Property("")],i.prototype,"modifiedDate",void 0),_e([t.Property("")],i.prototype,"subject",void 0),_e([t.Property("")],i.prototype,"notes",void 0),_e([t.Property(!1)],i.prototype,"isCommentLock",void 0),_e([t.Property("black")],i.prototype,"strokeColor",void 0),_e([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),_e([t.Property("#ffffff00")],i.prototype,"stampFillColor",void 0),_e([t.Property("black")],i.prototype,"stampStrokeColor",void 0),_e([t.Property("")],i.prototype,"data",void 0),_e([t.Property(1)],i.prototype,"opacity",void 0),_e([t.Property(1)],i.prototype,"thickness",void 0),_e([t.Property("")],i.prototype,"borderStyle",void 0),_e([t.Property("")],i.prototype,"borderDashArray",void 0),_e([t.Property(0)],i.prototype,"rotateAngle",void 0),_e([t.Property(!1)],i.prototype,"isCloudShape",void 0),_e([t.Property(0)],i.prototype,"cloudIntensity",void 0),_e([t.Property(40)],i.prototype,"leaderHeight",void 0),_e([t.Property(null)],i.prototype,"lineHeadStart",void 0),_e([t.Property(null)],i.prototype,"lineHeadEnd",void 0),_e([t.Property([])],i.prototype,"vertexPoints",void 0),_e([t.Property(null)],i.prototype,"sourcePoint",void 0),_e([t.Property("None")],i.prototype,"sourceDecoraterShapes",void 0),_e([t.Property("None")],i.prototype,"taregetDecoraterShapes",void 0),_e([t.Property(null)],i.prototype,"targetPoint",void 0),_e([t.Property([])],i.prototype,"segments",void 0),_e([t.Complex({x:0,y:0},Re)],i.prototype,"bounds",void 0),_e([t.Property(0)],i.prototype,"pageIndex",void 0),_e([t.Property(-1)],i.prototype,"zIndex",void 0),_e([t.Property(null)],i.prototype,"wrapper",void 0),_e([t.Property(!1)],i.prototype,"isDynamicStamp",void 0),_e([t.Property("")],i.prototype,"dynamicText",void 0),_e([t.Property("")],i.prototype,"annotName",void 0),_e([t.Property({})],i.prototype,"review",void 0),_e([t.Property([])],i.prototype,"comments",void 0),_e([t.Property("#000")],i.prototype,"fontColor",void 0),_e([t.Property(16)],i.prototype,"fontSize",void 0),_e([t.Property("Helvetica")],i.prototype,"fontFamily",void 0),_e([t.Property("None")],i.prototype,"fontStyle",void 0),_e([t.Property(!1)],i.prototype,"enableShapeLabel",void 0),_e([t.Property("label")],i.prototype,"labelContent",void 0),_e([t.Property("#ffffff00")],i.prototype,"labelFillColor",void 0),_e([t.Property(15)],i.prototype,"labelMaxLength",void 0),_e([t.Property(1)],i.prototype,"labelOpacity",void 0),_e([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),_e([t.Property("#ffffff00")],i.prototype,"labelBorderColor",void 0),_e([t.Property("left")],i.prototype,"textAlign",void 0),_e([t.Property("")],i.prototype,"signatureName",void 0),_e([t.Property(0)],i.prototype,"minHeight",void 0),_e([t.Property(0)],i.prototype,"minWidth",void 0),_e([t.Property(0)],i.prototype,"maxHeight",void 0),_e([t.Property(0)],i.prototype,"maxWidth",void 0),_e([t.Property(!1)],i.prototype,"isLock",void 0),_e([t.Property("UI Drawn Annotation")],i.prototype,"annotationAddMode",void 0),_e([t.Property("")],i.prototype,"annotationSettings",void 0),_e([t.Property(16)],i.prototype,"previousFontSize",void 0),_e([t.Complex({isBold:!1,isItalic:!1,isStrikeout:!1,isUnderline:!1},We)],i.prototype,"font",void 0),_e([t.Complex({x:0,y:0},Re)],i.prototype,"labelBounds",void 0),_e([t.Property(null)],i.prototype,"customData",void 0),_e([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),_e([t.Property(!0)],i.prototype,"isPrint",void 0),_e([t.Property(!1)],i.prototype,"isReadonly",void 0),i}(t.ChildProperty),He=function(e){function i(t,i,n,o){return e.call(this,t,i,n,o)||this}return Qe(i,e),_e([t.Property("")],i.prototype,"id",void 0),_e([t.Property("")],i.prototype,"signatureType",void 0),_e([t.Property("")],i.prototype,"name",void 0),_e([t.Property("")],i.prototype,"value",void 0),_e([t.Property(null)],i.prototype,"formFieldAnnotationType",void 0),_e([t.Property("#daeaf7ff")],i.prototype,"backgroundColor",void 0),_e([t.Property("black")],i.prototype,"color",void 0),_e([t.Property("#303030")],i.prototype,"borderColor",void 0),_e([t.Property("")],i.prototype,"tooltip",void 0),_e([t.Property(1)],i.prototype,"opacity",void 0),_e([t.Property(1)],i.prototype,"thickness",void 0),_e([t.Property(0)],i.prototype,"rotateAngle",void 0),_e([t.Complex({x:0,y:0},Re)],i.prototype,"bounds",void 0),_e([t.Property(0)],i.prototype,"pageIndex",void 0),_e([t.Property(1)],i.prototype,"pageNumber",void 0),_e([t.Property(-1)],i.prototype,"zIndex",void 0),_e([t.Property(null)],i.prototype,"wrapper",void 0),_e([t.Property(16)],i.prototype,"fontSize",void 0),_e([t.Property("Helvetica")],i.prototype,"fontFamily",void 0),_e([t.Property("None")],i.prototype,"fontStyle",void 0),_e([t.Property("left")],i.prototype,"alignment",void 0),_e([t.Property(0)],i.prototype,"minHeight",void 0),_e([t.Property(0)],i.prototype,"minWidth",void 0),_e([t.Property(0)],i.prototype,"maxHeight",void 0),_e([t.Property(0)],i.prototype,"maxWidth",void 0),_e([t.Property(0)],i.prototype,"maxLength",void 0),_e([t.Property("visible")],i.prototype,"visibility",void 0),_e([t.Property(!0)],i.prototype,"isPrint",void 0),_e([t.Property(!1)],i.prototype,"isReadonly",void 0),_e([t.Property(!1)],i.prototype,"isChecked",void 0),_e([t.Property(!1)],i.prototype,"isSelected",void 0),_e([t.Property(!1)],i.prototype,"isRequired",void 0),_e([t.Property("")],i.prototype,"options",void 0),_e([t.Property()],i.prototype,"signatureIndicatorSettings",void 0),_e([t.Complex({isBold:!1,isItalic:!1,isStrikeout:!1,isUnderline:!1},We)],i.prototype,"font",void 0),_e([t.Property()],i.prototype,"selectedIndex",void 0),i}(t.ChildProperty),Ge=function(){function e(){this.pageIdTemp=0,this.zIndexTemp=-1,this.childNodesTemp=[],this.objects=[],this.zIndexTemp=-1,this.pageIdTemp=0}return Object.defineProperty(e.prototype,"pageId",{get:function(){return this.pageIdTemp},set:function(e){this.pageIdTemp=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this.zIndexTemp},set:function(e){this.zIndexTemp=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"objects",{get:function(){return this.childNodesTemp},set:function(e){this.childNodesTemp=e},enumerable:!0,configurable:!0}),e}(),Ze=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xe=function(e,t,i,n){var o,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a},Ke=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ze(n,e),n.prototype.init=function(e){var n=new i.Container;n.measureChildren=!1;new i.Size;if(n.children=[],this.formFields&&this.formFields.length>0)for(o=0;o<this.formFields.length;o++){a=(s=e.pdfViewer.nameTable[this.formFields[o].id]).wrapper;n.children.push(a)}else if(this.annotations)for(var o=0;o<this.annotations.length;o++)if(!t.isNullOrUndefined(this.annotations[o])){var s=e.pdfViewer.nameTable[this.annotations[o].id],a=s.wrapper;n.children.push(a)}return this.wrapper=n,n},Xe([t.Property(null)],n.prototype,"wrapper",void 0),Xe([t.Collection([],Je)],n.prototype,"annotations",void 0),Xe([t.Collection([],He)],n.prototype,"formFields",void 0),Xe([t.Property()],n.prototype,"width",void 0),Xe([t.Property()],n.prototype,"height",void 0),Xe([t.Property(0)],n.prototype,"rotateAngle",void 0),Xe([t.Property(0)],n.prototype,"offsetX",void 0),Xe([t.Property(0)],n.prototype,"offsetY",void 0),Xe([t.Complex({x:.5,y:.5},i.Point)],n.prototype,"pivot",void 0),n}(t.ChildProperty),qe={OpenArrow:"M15.9,23 L5,16 L15.9,9 L17,10.7 L8.7,16 L17,21.3Z",Square:"M0,0 L10,0 L10,10 L0,10 z",Fletch:"M14.8,10c0,0-3.5,6,0.2,12c0,0-2.5-6-10.9-6C4.1,16,11.3,16,14.8,10z",OpenFetch:"M6,17c-0.6,0-1-0.4-1-1s0.4-1,1-1c10.9,0,11-5,11-5c0-0.6,0.4-1,1-1s1,0.4,1,1C19,10.3,18.9,17,6,17C6,17,6,17,6,17z M18,23c-0.5,0-1-0.4-1-1c0-0.2-0.3-5-11-5c-0.6,0-1-0.5-1-1s0.4-1,1-1c0,0,0,0,0,0c12.9,0,13,6.7,13,7 C19,22.6,18.6,23,18,23z",IndentedArrow:"M17,10c0,0-4.5,5.5,0,12L5,16L17,10z",OutdentedArrow:"M14.6,10c0,0,5.4,6,0,12L5,16L14.6,10z",DoubleArrow:"M19,10 L19,22 L13,16Z M12,10 L12,22 L6,16Z",Arrow:"M15,10 L15,22 L5,16Z",Diamond:"M12,23l-7-7l7-7l6.9,7L12,23z",Circle:"M0,50 A50,50,0 1 1 100,50 A50,50,0 1 1 0,50 Z",Butt:"M0,0 L0,90"},$e=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),et=function(e){function i(t){var i=e.call(this)||this;return i.templateFn=i.templateCompiler(t),i}return $e(i,e),i.prototype.templateCompiler=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}},i.prototype.getNodeTemplate=function(){return this.templateFn},i}(i.DrawingElement),tt=function(){function e(e){this.isDynamicStamps=!1,this.pdfViewer=e,this.renderer=new i.DrawingRenderer("this.pdfViewer.element.id",!1),this.svgRenderer=new i.SvgRenderer}return e.prototype.renderLabels=function(e){var t=e.annotations;if(t)for(var i=0;i<t.length;i++){var n=t[i];this.initObject(n)}},e.prototype.createNewZindexTable=function(e){var t=new Ge;return this.pdfViewer.zIndex++,t.pageId=this.pdfViewer.zIndex,this.pdfViewer.zIndexTable.push(t),t},e.prototype.getPageTable=function(e){var t;if(void 0!==this.pdfViewer.zIndexTable.length){for(var i=!0,n=0;n<this.pdfViewer.zIndexTable.length;n++)if(this.pdfViewer.zIndexTable[n].pageId===e){i=!1,t=this.pdfViewer.zIndexTable[n];break}i&&((t=this.createNewZindexTable(e)).pageId=e)}else t=this.createNewZindexTable(e);return t},e.prototype.setZIndex=function(e,t){if(void 0!==t.pageIndex){var i=this.getPageTable(t.pageIndex);if(-1===t.zIndex)i.zIndex++,t.zIndex=i.zIndex,i.objects.push(t);else{t.zIndex;var n=i.objects.length;t.zIndex=n++,i.objects.push(t)}}},e.prototype.initObject=function(e){return this.setZIndex(this.pdfViewer.zIndex,e),i.createMeasureElements(),h(e)?(this.initLine(e),e.wrapper.measure(new i.Size(void 0,void 0)),e.wrapper.arrange(e.wrapper.desiredSize)):this.initNode(e),e.wrapper,this.pdfViewer.nameTable[e.id]=e,e.formFieldAnnotationType&&this.nodePropertyChange(e,{bounds:{width:e.bounds.width,height:e.bounds.height}}),e},e.prototype.initNode=function(e){var t,n=this.initContainer(e);n.children||(n.children=[]),t||(t=this.init(e,n)),n.rotateAngle=e.rotateAngle,n.measure(new i.Size(e.wrapper.width,e.wrapper.height)),n.arrange(n.desiredSize),this.isDynamicStamps&&(this.pdfViewer.annotation.stampAnnotationModule.updateSessionStorage(e,null,"dynamicStamp"),this.isDynamicStamps=!1)},e.prototype.init=function(e,t){var n;n=new i.DrawingElement;var o=this.pdfViewer.annotationModule?this.pdfViewer.annotationModule.findAnnotationSettings(e):{},s=0,a=0,r=0,l=0;(o.minWidth||o.maxWidth||o.minHeight||o.maxHeight)&&(s=o.maxHeight?o.maxHeight:2e3,a=o.maxWidth?o.maxWidth:2e3,r=o.minHeight?o.minHeight:0,l=o.minWidth?o.minWidth:0);var d=!1;return(r||l||s||a)&&(d=!0),n=e.formFieldAnnotationType?this.initFormFields(e,n,t):this.initAnnotationObject(e,void 0,n,t,!1,void 0,d,s,a,l,r),n.id=e.id+"_content",n.relativeMode="Object","Stamp"!==e.shapeAnnotationType&&(void 0!==e.bounds.width&&(n.width=e.bounds.width,d&&(n.width<l||n.width>a)&&(n.width<l&&(n.width=l),n.width>a&&(n.width=a))),n.horizontalAlignment="Stretch",void 0!==e.bounds.height&&(n.height=e.bounds.height,d&&(n.height<r||n.width>s)&&(n.height<r&&(n.height=r),n.height>s&&(n.height=s))),L(e,n)),n.isRectElement=!0,n.verticalAlignment="Stretch",n},e.prototype.initFormFields=function(e,t,i){switch(e.formFieldAnnotationType){case"Textbox":case"PasswordField":case"Checkbox":case"RadioButton":case"DropdownList":case"ListBox":case"SignatureField":case"InitialField":(t=new et).id=e.id+"_content",i.children.push(t)}return t},e.prototype.initAnnotationObject=function(e,t,n,o,s,a,r,l,d,u,M){switch(e.shapeAnnotationType){case"Ellipse":(t=new i.PathElement).data="M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",n=t,o.children.push(n),e.enableShapeLabel&&((g=this.textElement(e)).content=e.labelContent,g.style.color=e.fontColor,g.style.strokeColor=e.labelBorderColor,g.style.fill=e.labelFillColor,g.style.fontSize=e.fontSize,g.style.fontFamily=e.fontFamily,g.style.opacity=e.labelOpacity,o.children.push(g));break;case"Path":(t=new i.PathElement).data=e.data,n=t,o.children.push(n);break;case"HandWrittenSignature":case"Ink":(t=new i.PathElement).data=e.data,t.style.strokeColor=e.strokeColor,t.style.strokeWidth=e.thickness,t.style.opacity=e.opacity,n=t,o.children.push(n);break;case"Polygon":(t=new i.PathElement).data=F(e.vertexPoints),n=t,o.children.push(n);break;case"Stamp":if(s=!0,this.isDynamicStamps=!0,e&&e.annotationAddMode&&("Existing Annotation"===e.annotationAddMode||"Imported Annotation"===e.annotationAddMode)&&(e.bounds.width=e.bounds.width-20,e.bounds.height=e.bounds.height-20),e.isDynamicStamp){o.horizontalAlignment="Left",(n=a=new i.DrawingElement).cornerRadius=10,n.style.fill=e.stampFillColor,n.style.strokeColor=e.stampStrokeColor,o.children.push(n);var p=this.textElement(e);(p=new i.TextElement).style.fontFamily="Helvetica",p.style.fontSize=14,p.style.italic=!0,p.style.bold=!0,p.style.color=e.fillColor,p.rotateValue=void 0,p.content=e.dynamicText,p.relativeMode="Point",p.margin.left=10,p.margin.bottom=-7,p.setOffsetWithRespectToBounds(0,.57,null),p.relativeMode="Point",o.children.push(p),(h=new i.PathElement).id=i.randomId()+"_stamp",h.data=e.data,h.width=e.bounds.width,r&&e.bounds.width>d&&(h.width=d,e.bounds.width=d),h.height=e.bounds.height/2,r&&e.bounds.height>l&&(h.height=l/2,e.bounds.height=l/2),h.rotateValue=void 0,h.margin.left=10,h.margin.bottom=-5,h.relativeMode="Point",h.setOffsetWithRespectToBounds(0,.1,null);c=h;h.style.fill=e.fillColor,h.style.strokeColor=e.strokeColor,h.style.opacity=e.opacity,n.width=e.bounds.width+20,n.height=e.bounds.height+20,n.style.opacity=e.opacity,o.children.push(c)}else{o.horizontalAlignment="Left",(n=a=new i.DrawingElement).cornerRadius=10,n.style.fill=e.stampFillColor,n.style.strokeColor=e.stampStrokeColor,o.children.push(n);var h=new i.PathElement;h.id=i.randomId()+"_stamp",h.data=e.data,h.width=e.bounds.width,r&&e.bounds.width>d&&(h.width=d,e.bounds.width=d),h.height=e.bounds.height,r&&e.bounds.height>l&&(h.height=l,e.bounds.height=l),h.minWidth=h.width/2,h.minHeight=h.height/2;var c=h;h.style.fill=e.fillColor,h.style.strokeColor=e.strokeColor,h.style.opacity=e.opacity,n.width=e.bounds.width+20,n.height=e.bounds.height+20,n.minWidth=h.width/2,n.minHeight=h.height/2,n.style.opacity=e.opacity,o.children.push(c),o.minHeight=n.minHeight+20,o.minWidth=n.minWidth+20}break;case"Image":case"SignatureImage":var C=new i.ImageElement;C.source=e.data,(n=C).style.strokeWidth=0,o.children.push(n);break;case"Rectangle":if(a=new i.DrawingElement,n=a,o.children.push(n),e.enableShapeLabel){var g=this.textElement(e);g.content=e.labelContent,g.style.color=e.fontColor,g.style.strokeColor=e.labelBorderColor,g.style.fill=e.labelFillColor,g.style.fontSize=e.fontSize,g.style.fontFamily=e.fontFamily,g.style.opacity=e.labelOpacity,o.children.push(g)}break;case"Perimeter":(t=new i.PathElement).data="M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",n=t,L(e,t),o.children.push(n),(a=new i.DrawingElement).id="perimeter_"+i.randomId(),a.height=.2,a.width=.2,a.transform=i.RotateTransform.Self,a.horizontalAlignment="Stretch",this.setNodePosition(a,e),a.rotateAngle=e.rotateAngle,L(e,a),o.children.push(a);var m=this.textElement(e);(m=new i.TextElement).content=m.content=w([{x:e.bounds.x,y:e.bounds.y},{x:e.bounds.x+e.bounds.width,y:e.bounds.y+e.bounds.height}]).toString(),m.rotateValue={y:-10,angle:e.rotateAngle},o.children.push(m);break;case"Radius":(t=new i.PathElement).data="M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",n=t,L(e,t),o.children.push(n),(a=new i.DrawingElement).id="radius_"+i.randomId(),a.height=.2,a.width=e.bounds.width/2,a.transform=i.RotateTransform.Self,this.setNodePosition(a,e),a.rotateAngle=e.rotateAngle,L(e,a),o.children.push(a);var f=this.textElement(e);e.enableShapeLabel&&(f.style.color=e.fontColor,f.style.strokeColor=e.labelBorderColor,f.style.fill=e.labelFillColor,f.style.fontSize=e.fontSize,f.style.fontFamily=e.fontFamily,f.style.opacity=e.labelOpacity);w([{x:e.bounds.x,y:e.bounds.y},{x:e.bounds.x+e.bounds.width,y:e.bounds.y+e.bounds.height}]);!this.pdfViewer.enableImportAnnotationMeasurement&&e.notes&&""!==e.notes?f.content=e.notes:f.content=this.pdfViewer.annotation.measureAnnotationModule.setConversion(e.bounds.width/2*this.pdfViewer.annotation.measureAnnotationModule.pixelToPointFactor,e),f.rotateValue={y:-10,x:e.bounds.width/4,angle:e.rotateAngle},o.children.push(f);break;case"StickyNotes":var y=new i.ImageElement;y.source=e.data,y.width=e.bounds.width,y.height=e.bounds.height,y.style.strokeColor=e.strokeColor,y.style.strokeWidth=0,n=y,o.children.push(n);break;case"SignatureText":var j=new i.DrawingElement;j.style.strokeWidth=0,(n=j).style.strokeWidth=0,o.style.strokeWidth=0,o.children.push(n);var S=this.textElement(e);S.style.fontFamily=e.fontFamily,S.style.fontSize=e.fontSize,S.style.textAlign="Left",S.rotateValue=void 0,S.content=e.data,S.margin.top=e.fontSize/2,S.style.textWrapping="Wrap",S.style.strokeWidth=0,o.children.push(S);break;case"FreeText":n=new i.DrawingElement,o.children.push(n);var A=this.textElement(e);(A=new i.TextElement).style.fontFamily=e.fontFamily,A.style.fontSize=e.fontSize,A.style.textAlign="Left","center"===e.textAlign.toLowerCase()?A.style.textAlign="Center":"right"===e.textAlign.toLowerCase()?A.style.textAlign="Right":"justify"===e.textAlign.toLowerCase()&&(A.style.textAlign="Justify"),A.style.color=e.fontColor,A.style.bold=e.font.isBold,A.style.italic=e.font.isItalic,!0===e.font.isUnderline?A.style.textDecoration="Underline":!0===e.font.isStrikeout&&(A.style.textDecoration="LineThrough"),A.rotateValue=void 0,A.content=e.dynamicText,A.style.opacity=e.opacity,A.margin.left=2,A.margin.top=5,A.style.textWrapping="Wrap",A.relativeMode="Point",A.setOffsetWithRespectToBounds(0,0,null),A.relativeMode="Point",o.children.push(A)}return n.id=e.id+"_content",n.relativeMode="Object",s||(void 0!==e.bounds.width&&(n.width=e.bounds.width,r&&(n.width<u||n.width>d)&&(n.width<u&&(n.width=u),n.width>d&&(n.width=d))),n.horizontalAlignment="Stretch",void 0!==e.bounds.height&&(n.height=e.bounds.height,r&&(n.height<M||n.width>l)&&(n.height<M&&(n.height=M),n.height>l&&(n.height=l))),L(e,n)),n.isRectElement=!0,n.verticalAlignment="Stretch",n},e.prototype.textElement=function(e){var t=new i.TextElement;return L(e,t),t.horizontalAlignment="Center",t.verticalAlignment="Top",t.relativeMode="Object",t.setOffsetWithRespectToBounds(.5,.5,"Absolute"),t},e.prototype.setNodePosition=function(e,t){if("Perimeter"===t.shapeAnnotationType)e.offsetX=t.bounds.x+t.bounds.width/2,e.offsetY=t.bounds.y+t.bounds.height/2;else if("Radius"===t.shapeAnnotationType){var n={x:t.bounds.x+t.bounds.width/2+t.bounds.width/4,y:t.bounds.y+t.bounds.height/2},o={x:t.bounds.x+t.bounds.width/2,y:t.bounds.y+t.bounds.height/2},s=i.identityMatrix();i.rotateMatrix(s,t.rotateAngle,o.x,o.y);var a=i.transformPointByMatrix(s,n),r={x:a.x,y:a.y};e.offsetX=r.x,e.offsetY=r.y,e.width=t.bounds.width/2}},e.prototype.initContainer=function(e){e.id||(e.id=i.randomId());var t;return t=new i.Canvas,t.id=e.id,t.offsetX=e.bounds.x+.5*e.bounds.width,t.offsetY=e.bounds.y+.5*e.bounds.height,t.style.fill="transparent",t.style.strokeColor="transparent",t.rotateAngle=e.rotateAngle,e.wrapper=t,t},e.prototype.initLine=function(e){e.id||(e.id=i.randomId());var t=new i.Canvas,n=new i.PathElement;n.id=e.id+"_path";var o=new i.PathElement,s=new i.PathElement;if(e.vertexPoints.length){e.sourcePoint=e.vertexPoints[0],e.targetPoint=e.vertexPoints[e.vertexPoints.length-1];for(h=0;h<e.vertexPoints.length;h++)0!==h&&h!==e.vertexPoints.length-1&&e.segments.push(e.vertexPoints[h])}n=x(e,n);var a,r=[];r=S(e);var l=[],d=[];if("Distance"===e.shapeAnnotationType&&(l=Y(e,r),d=v(e,r,this.pdfViewer.annotation.measureAnnotationModule,this.pdfViewer)),"Line"!==e.shapeAnnotationType&&"LineWidthArrowHead"!==e.shapeAnnotationType||"Perimeter"!==e.measureType||(d=z(e,r,this.pdfViewer.annotation.measureAnnotationModule,this.pdfViewer)),!0===e.enableShapeLabel&&"Distance"!==e.shapeAnnotationType&&"Perimeter"!==e.measureType){var u=void 0,M=i.Point.findAngle(r[0],r[1]);(u=this.textElement(e)).id=i.randomId(),!this.pdfViewer.enableImportAnnotationMeasurement&&e.notes&&""!==e.notes?u.content=e.notes:u.content=e.labelContent,u.style.strokeColor=e.labelBorderColor,u.style.fill=e.labelFillColor,u.style.fontSize=e.fontSize,u.style.color=e.fontColor,u.style.fontFamily=e.fontFamily,u.style.opacity=e.labelOpacity,u.rotateValue={y:-10,angle:M},d.push(u)}r=b(e,r),a=i.Rect.toBounds(r),t.width=a.width,t.height=a.height,t.offsetX=a.x+t.pivot.x*a.width,t.offsetY=a.y+t.pivot.y*a.height;var p=e.vertexPoints;if("Line"!==e.shapeAnnotationType&&"LineWidthArrowHead"!==e.shapeAnnotationType&&"Distance"!==e.shapeAnnotationType||(o=D(e,r[0],p[1],!0),s=D(e,r[r.length-1],p[p.length-2],!1)),o.id=e.id+"_srcDec",s.id=e.id+"_tarDec",n.style.fill="transparent",t.style.strokeColor="transparent",t.style.fill="transparent",t.style.strokeWidth=0,t.children=[],L(e,n),t.children.push(n),l.length>0)for(h=0;h<l.length;h++)t.children.push(l[h]);if(d.length>0)for(var h=0;h<d.length;h++)t.children.push(d[h]);return t.children.push(o),t.children.push(s),t.id=e.id,t.offsetX=n.offsetX,t.offsetY=n.offsetY,t.width=n.width,t.height=n.height,r=S(e),e.wrapper=t,t},e.prototype.add=function(e){return e.formFieldAnnotationType&&this.pdfViewer.formDesignerModule?(e=new He(this.pdfViewer,"formFields",e,!0),e=this.initObject(e),this.pdfViewer.formFields.push(e)):(e=new Je(this.pdfViewer,"annotations",e,!0),e=this.initObject(e),this.pdfViewer.annotations.push(e)),e},e.prototype.remove=function(e){for(var t=e.pageIndex,i=0;i<this.pdfViewer.annotations.length;i++){var n=this.pdfViewer.annotations[i];if(n.id===e.id||n.wrapper.id===e.id||n.id.split("_")[0]===e.id||n.id.split("_")[0]===e.id.split("_")[0]||n.id===e.id){this.pdfViewer.annotations.splice(i,1);for(var o=this.getPageObjects(e.pageIndex),s=0;s<o.length;s++)o[s].id===e.id&&(o.splice(s,1),"Path"===e.shapeAnnotationType||"SignatureImage"===e.shapeAnnotationType||"SignatureText"===e.shapeAnnotationType?this.refreshCanvasDiagramLayer(void 0,t,e.id):this.pdfViewer.renderDrawing(void 0,t))}}for(i=0;i<this.pdfViewer.formFields.length;i++)if((a=this.pdfViewer.formFields[i]).id===e.id||a.wrapper.id===e.id){this.pdfViewer.formFields.splice(i,1),this.pdfViewer.formDesignerModule&&e.formFieldAnnotationType&&this.pdfViewer.formFieldCollection.splice(i,1);for(var o=this.getPageObjects(e.pageIndex),s=0;s<o.length;s++)o[s].id===e.id&&o.splice(s,1),o[s]&&o[s].id&&-1!==o[s].id.indexOf(e.id)&&o.splice(s,1)}for(i=0;i<this.pdfViewer.formFieldCollections.length;i++){var a=this.pdfViewer.formFieldCollections[i];a.id===e.id&&this.pdfViewer.formFieldCollections.splice(i,1)}if("Textbox"===e.formFieldAnnotationType||"Checkbox"===e.formFieldAnnotationType||"RadioButton"===e.formFieldAnnotationType||"PasswordField"===e.formFieldAnnotationType||"DropdownList"===e.formFieldAnnotationType||"ListBox"===e.formFieldAnnotationType||"SignatureField"===e.formFieldAnnotationType||"InitialField"===e.formFieldAnnotationType){var r=document.getElementById("form_field_"+e.id+"_content_html_element");if(r){r.remove(),this.pdfViewer.renderDrawing(void 0,t);var l={value:e.value,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,color:e.color,backgroundColor:e.backgroundColor,alignment:e.alignment,isReadonly:e.isReadonly,visibility:e.visibility,maxLength:e.maxLength,isRequired:e.isRequired,isPrint:e.isPrint,rotation:e.rotateAngle,tooltip:e.tooltip,options:e.options,isChecked:e.isChecked,isSelected:e.isSelected};this.pdfViewer.fireFormFieldRemoveEvent("formFieldRemove",l,e.pageIndex),this.pdfViewer.formDesignerModule.removeFieldsFromAnnotationCollections(e.id)}}},e.prototype.getPageObjects=function(e){return this.getPageTable(e).objects},e.prototype.refreshCanvasDiagramLayer=function(e,n,o){if(e||(e=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+n)),e){var s=e.width/this.pdfViewer.viewerBase.getZoomFactor(),a=e.height/this.pdfViewer.viewerBase.getZoomFactor(),r=this.pdfViewer.viewerBase.getZoomFactor(),l=e.getContext("2d");l.setTransform(r,0,0,r,0,0),l.clearRect(0,0,s,a);for(var d=this.getPageObjects(n),u=0;u<d.length;u++){var M=void 0;e.id===this.pdfViewer.element.id+"_print_annotation_layer_"+n?d[u].isPrint&&(M=this.pdfViewer.nameTable[d[u].id].wrapper,t.isNullOrUndefined(M)||i.refreshDiagramElements(e,[M],this.renderer)):(M=this.pdfViewer.nameTable[d[u].id].wrapper,i.refreshDiagramElements(e,[M],this.renderer))}}},e.prototype.clearHighlighter=function(e){var t=this.getAdornerLayerSvg(this.pdfViewer.element.id+e+"_diagramAdornerLayer",e);if(t){var i=t.getElementById(t.id+"_highlighter");i&&i.parentNode.removeChild(i)}},e.prototype.getSelectorElement=function(e,t){var i=null,n=this.getAdornerLayerSvg(e,t);return n&&(i=n.getElementById(e+"_SelectorElement")),i},e.prototype.getAdornerLayerSvg=function(e,t){var n=null,o=i.getDiagramElement(e+t+"_diagramAdornerLayer");return o&&(n=o.getElementsByClassName("e-adorner-layer"+t)[0]),n},e.prototype.clearSelectorLayer=function(e){var t=this.getAdornerLayerSvg(this.pdfViewer.element.id,e);if(t){var i=t.getElementById(this.pdfViewer.adornerSvgLayer.id+"_selected_region");i&&i.parentNode.removeChild(i),this.clearHighlighter(e);for(var n=this.getSelectorElement(this.pdfViewer.element.id,e).childNodes,o=void 0,s=n.length;s>0;s--)(o=n[s-1]).parentNode.removeChild(o)}},e.prototype.renderSelector=function(e,t,n,o){if(!n||o){var s=new i.Size,a=this.pdfViewer.selectedItems;if(this.clearSelectorLayer(e),a.wrapper){a.wrapper.measure(s);var r=this.pdfViewer.viewerBase.getZoomFactor();a.wrapper.arrange(a.wrapper.desiredSize),a.width=a.wrapper.actualSize.width,a.height=a.wrapper.actualSize.height,a.offsetX=a.wrapper.offsetX,a.offsetY=a.wrapper.offsetY,1===a.annotations.length&&(a.rotateAngle=a.annotations[0].rotateAngle,a.wrapper.rotateAngle=a.annotations[0].rotateAngle);a.wrapper.bounds;var l=void 0;if(a.formFields.length)for(var d=0;d<a.formFields.length;d++){M=a.formFields[d];if((l=this.getSelectorElement(this.pdfViewer.element.id,e))&&M.pageIndex===e&&this.pdfViewer.designerMode&&this.renderResizeHandle(M.wrapper.children[0],l,a.thumbsConstraints,r,void 0,void 0,void 0,!1,!0,null,null,t),this.pdfViewer.formDesignerModule&&M.formFieldAnnotationType&&!this.pdfViewer.viewerBase.isFormFieldSelect&&!this.pdfViewer.viewerBase.isFormFieldMouseDown&&!this.pdfViewer.viewerBase.isFormFieldMouseMove){this.pdfViewer.viewerBase.isFormFieldSelect=!0;h={value:M.value,fontFamily:M.fontFamily,fontSize:M.fontSize,fontStyle:M.fontStyle,color:M.color,backgroundColor:M.backgroundColor,alignment:M.alignment,isReadonly:M.isReadonly,visibility:M.visibility,maxLength:M.maxLength,isRequired:M.isRequired,isPrint:M.isPrint,rotation:M.rotateAngle,tooltip:M.tooltip,options:M.options,isChecked:M.isChecked,isSelected:M.isSelected};this.pdfViewer.fireFormFieldSelectEvent("formFieldSelect",h,M.pageIndex,this.pdfViewer.formDesignerModule.isProgrammaticSelection)}}if(a.annotations.length)for(var u=0;u<a.annotations.length;u++){var M=a.annotations[u];if((l=this.getSelectorElement(this.pdfViewer.element.id,e))&&M.pageIndex===e){if("Distance"===M.shapeAnnotationType||"Line"===M.shapeAnnotationType||"LineWidthArrowHead"===M.shapeAnnotationType||"Polygon"===M.shapeAnnotationType)this.renderEndPointHandle(M,l,a.thumbsConstraints,{scale:r,tx:0,ty:0},void 0,void 0,!0,t);else if("StickyNotes"===M.shapeAnnotationType)this.renderResizeHandle(M.wrapper.children[0],l,a.thumbsConstraints,r,void 0,void 0,void 0,!1,!0,null,null,t);else if("Stamp"!==this.pdfViewer.tool){var p="Path"===M.shapeAnnotationType||"SignatureField"===M.formFieldAnnotationType||"InitialField"===M.formFieldAnnotationType;this.renderResizeHandle(M.wrapper.children[0],l,a.thumbsConstraints,r,void 0,void 0,void 0,"Stamp"===M.shapeAnnotationType,!1,p,"FreeText"===M.shapeAnnotationType||"HandWrittenSignature"===M.shapeAnnotationType||"SignatureImage"===M.shapeAnnotationType||"Image"===M.shapeAnnotationType||"SignatureText"===M.shapeAnnotationType,t)}if(this.pdfViewer.viewerBase.isNewSignatureAdded||"HandWrittenSignature"!==M.shapeAnnotationType&&"SignatureText"!==M.shapeAnnotationType&&"SignatureImage"!==M.shapeAnnotationType||this.pdfViewer.annotationModule.selectSignature(M.signatureName,M.pageIndex,M),this.pdfViewer.formDesignerModule&&M.formFieldAnnotationType&&!this.pdfViewer.viewerBase.isFormFieldSelect&&!this.pdfViewer.viewerBase.isFormFieldMouseDown&&!this.pdfViewer.viewerBase.isFormFieldMouseMove){this.pdfViewer.viewerBase.isFormFieldSelect=!0;var h={value:M.value,fontFamily:M.fontFamily,fontSize:M.fontSize,fontStyle:M.fontStyle,color:M.color,backgroundColor:M.backgroundColor,alignment:M.alignment,isReadonly:M.isReadonly,visibility:M.visibility,maxLength:M.maxLength,isRequired:M.isRequired,isPrint:M.isPrint,rotation:M.rotateAngle,tooltip:M.tooltip,options:M.options,isChecked:M.isChecked,isSelected:M.isSelected};this.pdfViewer.fireFormFieldSelectEvent("formFieldSelect",h,M.pageIndex,this.pdfViewer.formDesignerModule.isProgrammaticSelection)}""!==M.annotName&&n&&M===n&&!M.formFieldAnnotationType&&(this.pdfViewer.viewerBase.isAddComment||this.pdfViewer.viewerBase.isAnnotationSelect||this.pdfViewer.viewerBase.isAnnotationMouseDown||this.pdfViewer.viewerBase.isAnnotationMouseMove||this.pdfViewer.viewerBase.isInkAdded||(this.pdfViewer.viewerBase.isAnnotationSelect=!0,this.pdfViewer.annotationModule.annotationSelect(M.annotName,M.pageIndex,M)))}}}}},e.prototype.rotate=function(e,t,i,n){if(e)if(i=i||{x:e.wrapper.offsetX,y:e.wrapper.offsetY},e instanceof Ke){e.rotateAngle+=t,e.wrapper.rotateAngle+=t;var o=[];o=o.concat(e.annotations),this.rotateObjects(e,o,t,i,null,n)}else this.rotateObjects(e,[e],t,i)},e.prototype.rotateObjects=function(e,t,n,o,s,a){o=o||{};var r=i.identityMatrix();i.rotateMatrix(r,n,o.x,o.y);for(var l=0,d=t;l<d.length;l++){var u=d[l];if(u instanceof Je){if(!1!==s||e!==u){u.rotateAngle+=n,u.rotateAngle=(u.rotateAngle+360)%360;var M=i.transformPointByMatrix(r,{x:u.wrapper.offsetX,y:u.wrapper.offsetY});u.wrapper.offsetX=M.x,u.wrapper.offsetY=M.y,this.nodePropertyChange(u,{rotateAngle:u.rotateAngle})}this.renderSelector(u.pageIndex,a)}}},e.prototype.getParentSvg=function(e,t,i){return e&&e.id&&t&&"selector"===t?this.pdfViewer.adornerSvgLayer:i},e.prototype.renderBorder=function(e,t,i,n,o,s,a,r){var l=C(e,n);if(n=n||{scale:1,tx:0,ty:0},r){l.x*=n.scale,l.y*=n.scale,l.width*=n.scale,l.height*=n.scale;p=void 0;if(p=this.pdfViewer.selectedItems.annotations.length>0?this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType:this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType,i&&"object"!=typeof i&&""!==i){var d=JSON.parse(i),u=""===d.selectionBorderColor?"black":d.selectionBorderColor;l.stroke=u,l.strokeWidth=1===i.selectionBorderThickness?1:d.selectionBorderThickness;var M=0===d.selectorLineDashArray.length?[6,3]:d.selectorLineDashArray;M.length>2&&(M=[M[0],M[1]]),l.dashArray=M.toString()}else this.getBorderSelector(p,l)}else{l.x*=n.scale,l.y*=n.scale,l.width*=n.scale,l.height*=n.scale,l.fill="transparent";var p=void 0;if(p=this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType,i&&"object"!=typeof i&&""!==i){u=""===(d=JSON.parse(i)).selectionBorderColor?"black":d.selectionBorderColor;l.stroke=u,l.strokeWidth=1===i.selectionBorderThickness?1:d.selectionBorderThickness,(M=0===d.selectorLineDashArray.length?[6,3]:d.selectorLineDashArray).length>2&&(M=[M[0],M[1]]),l.dashArray=M.toString()}else if(!this.pdfViewer.designerMode)if("HandWrittenSignature"===p||"SignatureText"===p||"SignatureImage"===p||"Ink"===p){this.pdfViewer.nameTable[e.id.split("_")[0]];var h=this.pdfViewer.viewerBase.checkSignatureFormField(e.id.split("_")[0]);this.getSignBorder(p,l,h)}else this.getBorderSelector(p,l);l.class="e-pv-diagram-border",a&&(l.class+=" e-diagram-lane"),l.id="borderRect",l.id="borderRect",o||(l.class+=" e-disabled"),s&&(l.class+=" e-thick-border"),l.cornerRadius=0}var L=this.getParentSvg(e,"selector");this.svgRenderer.drawRectangle(t,l,this.pdfViewer.element.id,void 0,!0,L)},e.prototype.getSignBorder=function(e,i,n){if(n||"HandWrittenSignature"!==e&&"SignatureText"!==e&&"SignatureImage"!==e||!this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings)if("Ink"===e&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings){s=void 0;s=t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderColor?"#0000ff":this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderColor,i.stroke=s;a=void 0;a=t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderThickness,i.strokeWidth=a;r=void 0;(r=t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectorLineDashArray).length>2&&(r=[r[0],r[1]]),i.dashArray=r.toString()}else{var o=this.pdfViewer.annotationSelectorSettings,s=""===o.selectionBorderColor?"black":o.selectionBorderColor;i.stroke=s,i.strokeWidth=1===o.selectionBorderThickness?1:o.selectionBorderThickness,(r=0===o.selectorLineDashArray.length?[6,3]:o.selectorLineDashArray).length>2&&(r=[r[0],r[1]]),i.dashArray=r.toString()}else{s=void 0;s=t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderColor?"#0000ff":this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderColor,i.stroke=s;var a=void 0;a=t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderThickness,i.strokeWidth=a;var r=void 0;(r=t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectorLineDashArray).length>2&&(r=[r[0],r[1]]),i.dashArray=r.toString()}},e.prototype.getBorderSelector=function(e,i){var n=this.pdfViewer.annotationSelectorSettings,o=t.isNullOrUndefined(n.selectionBorderColor)||""===n.selectionBorderColor?"black":n.selectionBorderColor;i.stroke=o,i.strokeWidth=t.isNullOrUndefined(n.selectionBorderThickness)||1===n.selectionBorderThickness?1:n.selectionBorderThickness;var s=t.isNullOrUndefined(n.selectorLineDashArray)||0===n.selectorLineDashArray.length?[6,3]:n.selectorLineDashArray;if(s.length>2&&(s=[s[0],s[1]]),i.dashArray=s.toString(),"Rectangle"===e&&this.pdfViewer.rectangleSettings.annotationSelectorSettings){var a=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=a;m=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=m;var r=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectorLineDashArray;r.length>2&&(r=[r[0],r[1]]),i.dashArray=r.toString()}else if("Textbox"!==e&&"Checkbox"!==e&&"RadioButton"!==e&&"SignatureField"!==e&&"InitialField"!==e&&"DropdownList"!==e&&"ListBox"!==e&&"PasswordField"!==e||!this.pdfViewer.rectangleSettings.annotationSelectorSettings){if("Ellipse"===e&&this.pdfViewer.circleSettings.annotationSelectorSettings){var l=t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=l;m=t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=m;var d=t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.circleSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.circleSettings.annotationSelectorSettings.selectorLineDashArray;d.length>2&&(d=[d[0],d[1]]),i.dashArray=d.toString()}else if("Radius"===e&&this.pdfViewer.radiusSettings.annotationSelectorSettings){var u=t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=u;m=t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=m;var M=t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.radiusSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.radiusSettings.annotationSelectorSettings.selectorLineDashArray;M.length>2&&(M=[M[0],M[1]]),i.dashArray=M.toString()}else if("FreeText"===e&&this.pdfViewer.freeTextSettings.annotationSelectorSettings){var p=t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=p;m=t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=m;var h=t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectorLineDashArray;h.length>2&&(h=[h[0],h[1]]),i.dashArray=h.toString()}else if("StickyNotes"===e&&this.pdfViewer.stickyNotesSettings.annotationSelectorSettings){var L=t.isNullOrUndefined(this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=L;m=t.isNullOrUndefined(this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=m;var w=t.isNullOrUndefined(this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectorLineDashArray.length?[6,3]:this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectorLineDashArray;w.length>2&&(w=[w[0],w[1]]),i.dashArray=w.toString()}else if("Stamp"===e&&this.pdfViewer.stampSettings.annotationSelectorSettings){var c=t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderColor?"#0000ff":this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=c;m=t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=m;var C=t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.stampSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.stampSettings.annotationSelectorSettings.selectorLineDashArray;C.length>2&&(C=[C[0],C[1]]),i.dashArray=C.toString()}}else{var g=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=g;var m=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=m;var f=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectorLineDashArray;f.length>2&&(f=[f[0],f[1]]),i.dashArray=f.toString()}},e.prototype.renderCircularHandle=function(e,t,n,o,s,a,r,l,d,u,M,p,h,L){var w=t,c={x:n,y:o};if(l=l||{scale:1,tx:0,ty:0},0!==w.rotateAngle||0!==w.parentTransform){var g=i.identityMatrix();i.rotateMatrix(g,w.rotateAngle+w.parentTransform,w.offsetX,w.offsetY),c=i.transformPointByMatrix(g,c)}var m,f=C(w);m=this.pdfViewer.selectedItems.annotations.length>0&&this.pdfViewer.selectedItems.annotations[0].measureType?this.pdfViewer.selectedItems.annotations[0].measureType:this.pdfViewer.selectedItems.formFields.length>0?this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType:this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType,this.getResizerColors(m,f,L,l),this.getShapeSize(m,f,L,l),f.strokeWidth=1,void 0!==p&&(f.id="segmentEnd_"+p),f.centerX=(c.x+l.tx)*l.scale,f.centerY=(c.y+l.ty)*l.scale,f.angle=0,f.id=e,f.visible=a,f.class=h,f.opacity=1,d&&(f.class+=" e-connected"),u&&(f.visible=!1),f.x=c.x*l.scale-f.width/2,f.y=c.y*l.scale-f.height/2;var y=this.getParentSvg(t,"selector");"Square"===this.getShape(m,L)?this.svgRenderer.drawRectangle(s,f,e,void 0,!0,y):"Circle"===this.getShape(m,L)&&this.svgRenderer.drawCircle(s,f,1)},e.prototype.getShapeSize=function(e,i,n,o){if(n&&"object"!=typeof n&&""!==n){s=JSON.parse(n);i.radius=(t.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)/2,i.width=(t.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)*o.scale}else{var s=this.pdfViewer.annotationSelectorSettings;i.radius=(t.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)/2,i.width=(t.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)*o.scale,"Line"===e&&this.pdfViewer.lineSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)*o.scale):"LineWidthArrowHead"===e&&this.pdfViewer.arrowSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)*o.scale):"Rectangle"===e&&this.pdfViewer.rectangleSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)*o.scale):"Ellipse"===e&&this.pdfViewer.circleSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)*o.scale):"Distance"===e&&this.pdfViewer.distanceSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)*o.scale):"Polygon"===e&&this.pdfViewer.polygonSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)*o.scale):"Radius"===e&&this.pdfViewer.radiusSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)*o.scale):"Stamp"===e&&this.pdfViewer.stampSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)*o.scale):"FreeText"===e&&this.pdfViewer.freeTextSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)*o.scale):"HandWrittenSignature"!==e&&"SignatureText"!==e&&"SignatureImage"!==e||!this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings?"Perimeter"===e&&this.pdfViewer.perimeterSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)*o.scale):"Area"===e&&this.pdfViewer.areaSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)*o.scale):"Volume"===e&&this.pdfViewer.volumeSettings.annotationSelectorSettings?(i.radius=(t.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)*o.scale):"Ink"===e&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings&&(i.radius=(t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)*o.scale):(i.radius=(t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)/2,i.width=(t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)*o.scale)}},e.prototype.getShape=function(e,i){var n;if(i&&"object"!=typeof i&&""!==i){o=JSON.parse(i);n=t.isNullOrUndefined(o.resizerShape)||"Square"===o.resizerShape?"Square":o.resizerShape}else{var o=this.pdfViewer.annotationSelectorSettings;n=t.isNullOrUndefined(o.resizerShape)||"Square"===o.resizerShape?"Square":o.resizerShape,"Line"===e&&this.pdfViewer.lineSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.lineSettings.annotationSelectorSettings.resizerShape:"LineWidthArrowHead"===e&&this.pdfViewer.arrowSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerShape:"Rectangle"===e&&this.pdfViewer.rectangleSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerShape:"Ellipse"===e&&this.pdfViewer.circleSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.circleSettings.annotationSelectorSettings.resizerShape:"Polygon"===e&&this.pdfViewer.polygonSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerShape:"Distance"===e&&this.pdfViewer.distanceSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerShape:"Radius"===e&&this.pdfViewer.radiusSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerShape:"Stamp"===e&&this.pdfViewer.stampSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.stampSettings.annotationSelectorSettings.resizerShape:"FreeText"===e&&this.pdfViewer.freeTextSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerShape:("HandWrittenSignature"===e||"SignatureText"===e||"SignatureImage"===e)&&this.pdfViewer.handWrittenSignatureSettings&&this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerShape:"Perimeter"===e&&this.pdfViewer.perimeterSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerShape:"Area"===e&&this.pdfViewer.areaSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.areaSettings.annotationSelectorSettings.resizerShape:"Volume"===e&&this.pdfViewer.volumeSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerShape:"Ink"===e&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings&&(n=t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerShape)}return n},e.prototype.getResizerColors=function(e,i,n,o){if(n&&"object"!=typeof n&&""!==n){s=JSON.parse(n);i.stroke=t.isNullOrUndefined(s.resizerBorderColor)||"black"===s.resizerBorderColor?"black":s.resizerBorderColor,i.fill=t.isNullOrUndefined(s.resizerFillColor)||"#FF4081"===s.resizerFillColor?"#FF4081":s.resizerFillColor}else{var s=this.pdfViewer.annotationSelectorSettings;i.stroke=t.isNullOrUndefined(s.resizerBorderColor)||"black"===s.resizerBorderColor?"black":s.resizerBorderColor,i.fill=t.isNullOrUndefined(s.resizerFillColor)||"#FF4081"===s.resizerFillColor?"#FF4081":s.resizerFillColor,"Line"===e&&this.pdfViewer.lineSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.lineSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.lineSettings.annotationSelectorSettings.resizerFillColor):"LineWidthArrowHead"===e&&this.pdfViewer.arrowSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerFillColor):"Rectangle"===e&&this.pdfViewer.rectangleSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerFillColor):"Ellipse"===e&&this.pdfViewer.circleSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.circleSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.circleSettings.annotationSelectorSettings.resizerFillColor):"Distance"===e&&this.pdfViewer.distanceSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerFillColor):"Polygon"===e&&this.pdfViewer.polygonSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerFillColor):"Radius"===e&&this.pdfViewer.radiusSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerFillColor):"Stamp"===e&&this.pdfViewer.stampSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.stampSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.stampSettings.annotationSelectorSettings.resizerFillColor):"FreeText"===e&&this.pdfViewer.freeTextSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerFillColor):"HandWrittenSignature"!==e&&"SignatureText"!==e&&"SignatureImage"!==e||!this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings?"Perimeter"===e&&this.pdfViewer.perimeterSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerFillColor):"Area"===e&&this.pdfViewer.areaSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.areaSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.areaSettings.annotationSelectorSettings.resizerFillColor):"Volume"===e&&this.pdfViewer.volumeSettings.annotationSelectorSettings?(i.stroke=t.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerFillColor):"Ink"===e&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings&&(i.stroke=t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerFillColor):(i.stroke=t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerBorderColor,i.fill=t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerFillColor)}},e.prototype.renderRotateThumb=function(e,t,n,o,s){new i.PathElement;var a,r=e.offsetY-e.actualSize.height*e.pivot.y,l=e.offsetX-e.actualSize.width*e.pivot.x+e.pivot.x*e.actualSize.width,d=r;if(l=(l+n.tx)*n.scale,d=(d+n.ty)*n.scale,a={x:l,y:d-25},0!==e.rotateAngle||0!==e.parentTransform){var u=i.identityMatrix();i.rotateMatrix(u,e.rotateAngle+e.parentTransform,(n.tx+e.offsetX)*n.scale,(n.ty+e.offsetY)*n.scale),a=i.transformPointByMatrix(u,a)}var M=C(e);M.stroke="black",M.strokeWidth=1,M.opacity=1,M.fill="#FF4081",M.centerX=a.x,M.centerY=a.y,M.radius=4,M.angle=0,M.visible=!0,M.class="e-diagram-rotate-handle",M.id="rotateThumb",this.svgRenderer.drawCircle(t,M,i.ThumbsConstraints.Rotate,{"aria-label":"Thumb to rotate the selected object"})},e.prototype.renderResizeHandle=function(e,t,n,o,s,a,r,l,d,u,M,p){var h=e.offsetX-e.actualSize.width*e.pivot.x,L=e.offsetY-e.actualSize.height*e.pivot.y,w=e.actualSize.height,c=e.actualSize.width,C={scale:o,tx:0,ty:0};l&&(this.renderPivotLine(e,t,C),this.renderRotateThumb(e,t,C)),M&&(l=!0),this.renderBorder(e,t,p,C,a,r,!0,d);var g=e.actualSize.width*o,m=e.actualSize.height*o,f=this.pdfViewer.selectedItems.annotations.length>0?this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType:this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType,y=!1;if(!this.pdfViewer.formDesignerModule){var j=this.pdfViewer.selectedItems.annotations[0],S=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(j);(this.pdfViewer.annotationModule.checkIsLockSettings(j)||j.annotationSettings.isLock)&&this.getAllowedInteractions(S)&&(y=!0)}var A=this.getResizerLocation(f,p);(A<1||A>3)&&(A=3);var T=!1;!this.pdfViewer.selectedItems.annotations[0]||"Ellipse"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Radius"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Rectangle"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Ink"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||(T=!0),this.pdfViewer.viewerBase.checkSignatureFormField(e.id.split("_")[0])||r||d||u||y||((l||T&&g>=40&&m>=40&&(1===A||3===A))&&(this.renderCircularHandle("resizeNorthWest",e,h,L,t,!0,n&i.ThumbsConstraints.ResizeNorthWest,C,void 0,s,{"aria-label":"Thumb to resize the selected object on top left side direction"},void 0,"e-pv-diagram-resize-handle e-northwest",p),this.renderCircularHandle("resizeNorthEast",e,h+c,L,t,!0,n&i.ThumbsConstraints.ResizeNorthEast,C,void 0,s,{"aria-label":"Thumb to resize the selected object on top right side direction"},void 0,"e-pv-diagram-resize-handle e-northeast",p),this.renderCircularHandle("resizeSouthWest",e,h,L+w,t,!0,n&i.ThumbsConstraints.ResizeSouthWest,C,void 0,s,{"aria-label":"Thumb to resize the selected object on bottom left side direction"},void 0,"e-pv-diagram-resize-handle e-southwest",p),this.renderCircularHandle("resizeSouthEast",e,h+c,L+w,t,!0,n&i.ThumbsConstraints.ResizeSouthEast,C,void 0,s,{"aria-label":"Thumb to resize the selected object on bottom right side direction"},void 0,"e-pv-diagram-resize-handle e-southeast",p)),(l||T)&&(!T||2!==A&&3!==A&&(g>=40&&m>=40||1!==A))||(this.renderCircularHandle("resizeNorth",e,h+c/2,L,t,!0,n&i.ThumbsConstraints.ResizeNorth,C,void 0,s,{"aria-label":"Thumb to resize the selected object on top side direction"},void 0,"e-pv-diagram-resize-handle e-north",p),this.renderCircularHandle("resizeSouth",e,h+c/2,L+w,t,!0,n&i.ThumbsConstraints.ResizeSouth,C,void 0,s,{"aria-label":"Thumb to resize the selected object on bottom side direction"},void 0,"e-pv-diagram-resize-handle e-south",p),this.renderCircularHandle("resizeWest",e,h,L+w/2,t,!0,n&i.ThumbsConstraints.ResizeWest,C,void 0,s,{"aria-label":"Thumb to resize the selected object on left side direction"},void 0,"e-pv-diagram-resize-handle e-west",p),this.renderCircularHandle("resizeEast",e,h+c,L+w/2,t,!0,n&i.ThumbsConstraints.ResizeEast,C,void 0,s,{"aria-label":"Thumb to resize the selected object on right side direction"},void 0,"e-pv-diagram-resize-handle e-east",p))),"Textbox"!==f&&"Checkbox"!==f&&"RadioButton"!==f&&"SignatureField"!==f&&"InitialField"!==f&&"DropdownList"!==f&&"ListBox"!==f&&"PasswordField"!==f||(this.renderCircularHandle("resizeNorth",e,h+c/2,L,t,!0,n&i.ThumbsConstraints.ResizeNorth,C,void 0,s,{"aria-label":"Thumb to resize the selected object on top side direction"},void 0,"e-pv-diagram-resize-handle e-north",p),this.renderCircularHandle("resizeSouth",e,h+c/2,L+w,t,!0,n&i.ThumbsConstraints.ResizeSouth,C,void 0,s,{"aria-label":"Thumb to resize the selected object on bottom side direction"},void 0,"e-pv-diagram-resize-handle e-south",p),this.renderCircularHandle("resizeWest",e,h,L+w/2,t,!0,n&i.ThumbsConstraints.ResizeWest,C,void 0,s,{"aria-label":"Thumb to resize the selected object on left side direction"},void 0,"e-pv-diagram-resize-handle e-west",p),this.renderCircularHandle("resizeEast",e,h+c,L+w/2,t,!0,n&i.ThumbsConstraints.ResizeEast,C,void 0,s,{"aria-label":"Thumb to resize the selected object on right side direction"},void 0,"e-pv-diagram-resize-handle e-east",p))},e.prototype.getAllowedInteractions=function(e){if(e&&e.length>0)for(var t=0;t<e.length;t++)if("None"!==e[0]&&"Resize"===e[t])return!1;return!0},e.prototype.getResizerLocation=function(e,i){var n;if(i&&"object"!=typeof i&&""!==i){o=JSON.parse(i);n=t.isNullOrUndefined(o.resizerLocation)||3===o.resizerLocation?3:o.resizerLocation}else{var o=this.pdfViewer.annotationSelectorSettings;n=t.isNullOrUndefined(o.resizerLocation)||3===o.resizerLocation?3:o.resizerLocation,"Line"===e&&this.pdfViewer.lineSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.lineSettings.annotationSelectorSettings.resizerLocation:"LineWidthArrowHead"===e&&this.pdfViewer.arrowSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerLocation:"Rectangle"===e&&this.pdfViewer.rectangleSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerLocation:"Ellipse"===e&&this.pdfViewer.circleSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.circleSettings.annotationSelectorSettings.resizerLocation:"Polygon"===e&&this.pdfViewer.polygonSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerLocation:"Distance"===e?n=t.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerLocation:"Radius"===e&&this.pdfViewer.radiusSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerLocation:"Stamp"===e&&this.pdfViewer.stampSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.stampSettings.annotationSelectorSettings.resizerLocation:"FreeText"===e&&this.pdfViewer.freeTextSettings.annotationSelectorSettings?n=t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerLocation:"HandWrittenSignature"!==e&&"SignatureText"!==e&&"SignatureImage"!==e||!this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings?"Ink"===e&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings&&(n=t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerLocation):n=t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerLocation)||3===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerLocation?3:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerLocation}return n},e.prototype.renderPivotLine=function(e,t,i,n,o){var s=e,a=!0;o&&(a=!1);var r=C(s,i);r.fill="None",r.stroke="black",r.strokeWidth=1,r.dashArray="2,3",r.visible=a;var l=i.scale;r.x*=l,r.y*=l,r.width*=l,r.height*=l,r.id="pivotLine",r.class="e-diagram-pivot-line";var d={x:s.actualSize.width*s.pivot.x*l,y:-20},u={x:s.actualSize.width*s.pivot.x*l,y:0};r.startPoint=d,r.endPoint=u,this.svgRenderer.drawLine(t,r)},e.prototype.renderEndPointHandle=function(e,t,n,o,s,a,r,l){o=o||{tx:0,ty:0,scale:1};var d,u=e.sourcePoint,M=e.targetPoint,p=e.wrapper;for(d=0;d<e.vertexPoints.length;d++){L=e.vertexPoints[d];this.renderCircularHandle("segementThumb_"+(d+1),p,L.x,L.y,t,!0,n&i.ThumbsConstraints.ConnectorSource,o,s,null,null,d,null,l)}var h=0;if("Distance"===e.shapeAnnotationType)for(d=0;d<e.wrapper.children.length;d++){var L=e.wrapper.children[d],w=void 0,c=i.Point.findAngle(e.sourcePoint,e.targetPoint);if(L.id.indexOf("leader")>-1){var C=e.wrapper.children[0].bounds.center;0===h?(w={x:e.sourcePoint.x,y:e.sourcePoint.y-e.leaderHeight},C=u):(w={x:e.targetPoint.x,y:e.targetPoint.y-e.leaderHeight},C=M);var g=i.identityMatrix();i.rotateMatrix(g,c,C.x,C.y);var m=i.transformPointByMatrix(g,{x:w.x,y:w.y});this.renderCircularHandle("leaderThumb_"+(d+1),p,m.x,m.y,t,!0,n&i.ThumbsConstraints.ConnectorSource,o,s,null,null,d,null,l),h++}}},e.prototype.initSelectorWrapper=function(){this.pdfViewer.selectedItems.init(this)},e.prototype.select=function(e,t,i,n){for(var o=this.pdfViewer.selectedItems,s=0;s<e.length;s++){var a=this.pdfViewer.nameTable[e[s]];if(a.formFieldAnnotationType)o.formFields.push(a),this.initSelectorWrapper(),o.wrapper.children.push(a.wrapper),this.renderSelector(a.pageIndex,t,a,!0);else if(a&&!a.formFieldAnnotationType&&!(a instanceof Ke)&&a.wrapper.visible){var r=void 0;a.annotationSettings?(r=a.annotationSettings).isLock=JSON.parse(r.isLock):a.formFieldAnnotationType||(r=this.pdfViewer.annotationModule.findAnnotationSettings(a,!0),a.annotationSettings=r);var l=!a.formFieldAnnotationType&&r.isLock;r&&r.isLock&&this.pdfViewer.annotationModule.checkAllowedInteractions("Select",a)&&(l=!1),l||(o.annotations.push(a),this.initSelectorWrapper(),o.wrapper.rotateAngle=o.rotateAngle=0,o.wrapper.children.push(a.wrapper),n||this.renderSelector(a.pageIndex,t,a,!0))}}},e.prototype.dragSelectedObjects=function(e,t,i,n,o){var s=this.pdfViewer.selectedItems;return this.drag(s,e,t,n,o),!0},e.prototype.drag=function(e,t,i,n,o){if(e instanceof Ke){if(e.annotations.length)for(var s=0,a=e.annotations;s<a.length;s++){d=a[s];this.drag(d,t,i,n,o),this.renderSelector(d.pageIndex,n,o)}else if(e.formFields.length)for(var r=0,l=e.formFields;r<l.length;r++){var d=l[r];this.drag(d,t,i,n,o),this.renderSelector(d.pageIndex,n,o)}}else this.dragAnnotation(e,t,i)},e.prototype.dragAnnotation=function(e,t,i){e.wrapper.offsetX,e.wrapper.offsetY;if(e.wrapper.offsetX+=t,e.wrapper.offsetY+=i,h(e)||"Polygon"===e.shapeAnnotationType){if(e.wrapper.children.length)for(var n=e.wrapper.children,o=0;o<n.length;o++)n[o].offsetX+=t,n[o].offsetY+=i;this.dragControlPoint(e,t,i,!0)}this.nodePropertyChange(e,{bounds:{x:e.wrapper.offsetX,y:e.wrapper.offsetY}}),e.wrapper.measureChildren=!1;var s=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+e.pageIndex);this.pdfViewer.renderDrawing(s,e.pageIndex)},e.prototype.dragControlPoint=function(e,t,i,n,o){for(var s=this.pdfViewer.nameTable[e.id],a=0;a<s.vertexPoints.length;a++)s.vertexPoints[a].x+=t,s.vertexPoints[a].y+=i;return n||this.updateEndPoint(s),!0},e.prototype.updateEndPoint=function(e){this.nodePropertyChange(e,{vertexPoints:e.vertexPoints}),this.renderSelector(e.pageIndex)},e.prototype.nodePropertyChange=function(e,n){var o;e.wrapper.outerBounds,e.wrapper.bounds;if(n.bounds&&(void 0!==n.bounds.width&&(e.bounds.width=e.wrapper.width=n.bounds.width),void 0!==n.bounds.height&&(e.bounds.height=e.wrapper.height=n.bounds.height),void 0!==n.bounds.x&&(e.bounds.x=n.bounds.x-.5*e.bounds.width,e.wrapper.offsetX=n.bounds.x),void 0!==n.bounds.y&&(e.bounds.y=n.bounds.y-.5*e.bounds.height,e.wrapper.offsetY=n.bounds.y),void 0!==n.leaderHeight&&(e.leaderHeight=n.leaderHeight,this.updateConnector(e,e.vertexPoints)),e.wrapper.children.length))for(var s=e.wrapper.children,a=0;a<s.length;a++)if(s[a].id){var r=s[a].id.split("_");if(r.length&&(r.indexOf("perimeter")>-1||r.indexOf("radius")>-1))this.setNodePosition(s[a],e);else if(r.length&&r.indexOf("srcDec")>-1)s[a].offsetX=e.vertexPoints[0].x,s[a].offsetY=e.vertexPoints[0].y;else if(r.length&&r.indexOf("tarDec")>-1)s[a].offsetX=e.vertexPoints[e.vertexPoints.length-1].x,s[a].offsetY=e.vertexPoints[e.vertexPoints.length-1].y;else if(r.length&&r.indexOf("stamp")>-1){var l=0,d=2;if(void 0!=e.wrapper.width&&void 0!=e.wrapper.height&&(l=20,d=2.9),e.isDynamicStamp){s[a].width=e.bounds.width-l,s[a].height=e.bounds.height/2-l;var u=s[1],M=this.pdfViewer.stampSettings?this.pdfViewer.stampSettings:this.pdfViewer.annotationSettings;M&&(M.maxHeight||M.maxWidth)&&e.bounds.height>60?3*e.bounds.height<e.bounds.width?u.style.fontSize=e.bounds.height/2/d:e.bounds.height>e.bounds.width?u.style.fontSize=e.bounds.width/8/d:2*e.bounds.height<e.bounds.width?u.style.fontSize=e.bounds.height/4/d:u.style.fontSize=e.bounds.height/6/d:u.style.fontSize=e.bounds.height/2/d,0!=l&&(u.margin.bottom=-s[a].height/2)}else s[a].width=e.bounds.width-l,s[a].height=e.bounds.height-l;s[a].offsetX=e.wrapper.offsetX,s[a].offsetY=e.wrapper.offsetX,s[a].isDirt=!0}}if(void 0!==n.sourceDecoraterShapes&&(e.sourceDecoraterShapes=n.sourceDecoraterShapes,this.updateConnector(e,e.vertexPoints)),void 0!==n.isReadonly&&"FreeText"===e.shapeAnnotationType&&(e.isReadonly=n.isReadonly),void 0!==n.taregetDecoraterShapes&&(e.taregetDecoraterShapes=n.taregetDecoraterShapes,this.updateConnector(e,e.vertexPoints)),void 0!==n.fillColor&&(e.fillColor=n.fillColor,e.wrapper.children[0].style.fill=n.fillColor,(e.enableShapeLabel||e.measureType)&&e.wrapper&&e.wrapper.children))for(var s=e.wrapper.children,p=0;p<s.length;p++)s[p].textNodes&&(e.enableShapeLabel&&(e.labelFillColor=n.fillColor,s[p].style.fill=n.fillColor),e.measureType&&(s[p].style.fill=n.fillColor));if(e.enableShapeLabel&&void 0!==n.labelFillColor&&e.enableShapeLabel&&e.wrapper&&e.wrapper.children)for(var s=e.wrapper.children,w=0;w<s.length;w++)s[w].textNodes&&(s[w].style.fill=n.labelFillColor);if(void 0!==n.opacity&&("Stamp"==e.shapeAnnotationType||"FreeText"===e.shapeAnnotationType?(e.wrapper.children[1].style.opacity=n.opacity,e.wrapper.children[2]&&(e.wrapper.children[2].style.opacity=n.opacity)):("StickyNotes"===e.shapeAnnotationType&&(this.pdfViewer.nameTable[e.annotName].wrapper.children[0].style.opacity=n.opacity),e.opacity=n.opacity),e.wrapper.children[0].style.opacity=n.opacity,e.enableShapeLabel&&e.wrapper&&e.wrapper.children))for(var s=e.wrapper.children,c=0;c<s.length;c++)s[c].textNodes&&(s[c].style.opacity=n.labelOpacity);if(e.enableShapeLabel&&void 0!==n.labelOpacity&&e.enableShapeLabel&&e.wrapper&&e.wrapper.children)for(var s=e.wrapper.children,C=0;C<s.length;C++)s[C].textNodes&&(s[C].style.opacity=n.labelOpacity);if(void 0!==n.rotateAngle&&(e.rotateAngle=n.rotateAngle,e.wrapper.rotateAngle=n.rotateAngle),void 0!==n.strokeColor&&(e.strokeColor=n.strokeColor,e.wrapper.children[0].style.strokeColor=n.strokeColor),void 0!==n.fontColor&&(e.fontColor=n.fontColor,"FreeText"===e.shapeAnnotationType&&e.wrapper&&e.wrapper.children&&e.wrapper.children.length&&((s=e.wrapper.children)[1].style.color=n.fontColor,"Justify"===e.textAlign?s[1].horizontalAlignment="Center":s[1].horizontalAlignment="Auto"),e.enableShapeLabel&&e.wrapper&&e.wrapper.children))for(var s=e.wrapper.children,g=0;g<s.length;g++)s[g].textNodes&&(s[g].style.color=n.fontColor);if(void 0!==n.fontFamily&&(e.fontFamily=n.fontFamily,"FreeText"===e.shapeAnnotationType&&e.wrapper&&e.wrapper.children&&e.wrapper.children.length&&((s=e.wrapper.children)[1].style.fontFamily=n.fontFamily),e.enableShapeLabel&&e.wrapper&&e.wrapper.children))for(var s=e.wrapper.children,m=0;m<s.length;m++)s[m].textNodes&&(s[m].style.fontFamily=n.fontFamily);if(void 0!==n.fontSize&&(e.fontSize=n.fontSize,("FreeText"===e.shapeAnnotationType||"SignatureText"===e.shapeAnnotationType)&&e.wrapper&&e.wrapper.children&&e.wrapper.children.length&&((s=e.wrapper.children)[1].style.fontSize=n.fontSize,"SignatureText"===e.shapeAnnotationType&&(s[1].horizontalAlignment="Center",s[1].verticalAlignment="Center",s[1].setOffsetWithRespectToBounds(0,0,"Absolute"))),e.enableShapeLabel&&e.wrapper&&e.wrapper.children))for(var s=e.wrapper.children,f=0;f<s.length;f++)s[f].textNodes&&(s[f].style.fontSize=n.fontSize);if(void 0!==n.font&&"FreeText"===e.shapeAnnotationType&&e.wrapper&&e.wrapper.children&&e.wrapper.children.length){s=e.wrapper.children;void 0!==n.font.isBold&&(s[1].style.bold=n.font.isBold,e.font.isBold=n.font.isBold),void 0!==n.font.isItalic&&(s[1].style.italic=n.font.isItalic,e.font.isItalic=n.font.isItalic),void 0!==n.font.isUnderline&&(n.font.isUnderline&&(e.font.isStrikeout=!1),!0===n.font.isUnderline?s[1].style.textDecoration="Underline":n.font.isStrikeout||(s[1].style.textDecoration="None"),e.font.isUnderline=n.font.isUnderline),void 0!==n.font.isStrikeout&&(n.font.isStrikeout&&(e.font.isUnderline=!1),!0===n.font.isStrikeout?s[1].style.textDecoration="LineThrough":n.font.isUnderline||(s[1].style.textDecoration="None"),e.font.isStrikeout=n.font.isStrikeout)}if(void 0!==n.textAlign&&(e.textAlign=n.textAlign,"FreeText"===e.shapeAnnotationType&&e.wrapper&&e.wrapper.children&&e.wrapper.children.length&&((s=e.wrapper.children)[1].style.textAlign=n.textAlign,1===s[1].childNodes.length?"Justify"===e.textAlign?(s[1].horizontalAlignment="Left",s[1].setOffsetWithRespectToBounds(0,0,null)):"Right"===e.textAlign?(s[1].horizontalAlignment="Right",s[1].setOffsetWithRespectToBounds(.97,0,null)):"Left"===e.textAlign?(s[1].horizontalAlignment="Left",s[1].setOffsetWithRespectToBounds(0,0,null)):"Center"===e.textAlign&&(s[1].horizontalAlignment="Center",s[1].setOffsetWithRespectToBounds(.46,0,null)):s[1].childNodes.length>1&&"Justify"===e.textAlign?s[1].horizontalAlignment="Center":s[1].horizontalAlignment="Auto")),void 0!==n.thickness&&(e.thickness=n.thickness,e.wrapper.children[0].style.strokeWidth=n.thickness),void 0!==n.borderDashArray&&(e.borderDashArray=n.borderDashArray,e.wrapper.children[0].style.strokeDashArray=n.borderDashArray),void 0!==n.borderStyle&&(e.borderStyle=n.borderStyle),void 0!==n.author&&(e.author=n.author),void 0!==n.modifiedDate&&(e.modifiedDate=n.modifiedDate),void 0!==n.subject&&(e.subject=n.subject),void 0!==n.vertexPoints&&(e.vertexPoints=n.vertexPoints,this.pdfViewer.nameTable[e.id].vertexPoints=n.vertexPoints,this.updateConnector(e,n.vertexPoints)),void 0!==n.leaderHeight&&"Polygon"!==e.shapeAnnotationType&&(e.leaderHeight=n.leaderHeight,this.updateConnector(e,e.vertexPoints)),void 0!==n.notes&&(e.notes=n.notes),void 0!==n.annotName&&(e.annotName=n.annotName),"Distance"===e.shapeAnnotationType){for(o=0;o<e.wrapper.children.length;o++){var y=e.wrapper.children[o],j=S(e);y.id.indexOf("leader1")>-1&&this.setLineDistance(e,j,y,!1),y.id.indexOf("leader2")>-1&&this.setLineDistance(e,j,y,!0)}this.updateConnector(e,e.vertexPoints)}if("Polygon"===e.shapeAnnotationType&&n.vertexPoints){e.data=F(e.vertexPoints);var A=e.wrapper.children[0];A.data=e.data,A.canMeasurePath=!0}if(h(e))for(var T=0;T<e.wrapper.children.length;T++)e.wrapper.children[T].textNodes||L(e,e.wrapper.children[T]),!0===e.enableShapeLabel?(e.wrapper.children[T]instanceof i.TextElement&&(e.wrapper.children[T].style.fill=e.labelFillColor),e.wrapper.children[T]instanceof i.PathElement&&"Perimeter"===e.measureType&&(e.wrapper.children[T].style.fill="transparent")):(e.wrapper.children[T]instanceof i.PathElement&&"Perimeter"===e.measureType||e.wrapper.children[T]instanceof i.TextElement)&&(e.wrapper.children[T].style.fill="transparent");if(e&&("FreeText"===e.shapeAnnotationType||!0===e.enableShapeLabel)&&e.wrapper&&e.wrapper.children&&e.wrapper.children.length)for(var s=e.wrapper.children,x=0;x<s.length;x++)s[x].textNodes&&("FreeText"===e.shapeAnnotationType?(n.dynamicText?(s[x].content=n.dynamicText,e.dynamicText=n.dynamicText):s[x].content=e.dynamicText,s[x].width=e.bounds.width-8):!0===e.enableShapeLabel&&e.measureType?(n.labelContent?(s[x].content=n.labelContent,e.labelContent=n.labelContent):s[x].content=e.labelContent,e.notes=s[x].content):!0===e.enableShapeLabel&&(n.labelContent?(s[x].content=n.labelContent,e.labelContent=n.labelContent):s[x].content=e.labelContent,e.notes=s[x].content),s[x].isDirt=!0);if(e.wrapper.measure(new i.Size(e.wrapper.bounds.width,e.wrapper.bounds.height)),e.wrapper.arrange(e.wrapper.desiredSize),e&&e.formFieldAnnotationType&&e.wrapper&&e.wrapper.children&&e.wrapper.children.length&&((s=e.wrapper.children[0]).actualSize.width=e.wrapper.desiredSize.width,s.actualSize.height=e.wrapper.desiredSize.height),e&&"FreeText"===e.shapeAnnotationType&&"Text Box"===e.subject){if(e.wrapper&&e.wrapper.children&&e.wrapper.children.length){(s=e.wrapper.children)[1].childNodes.length>1&&"Justify"===e.textAlign?s[1].horizontalAlignment="Center":1===s[1].childNodes.length&&("Justify"===e.textAlign?(s[1].horizontalAlignment="Left",s[1].setOffsetWithRespectToBounds(0,0,null)):"Right"===e.textAlign?(s[1].horizontalAlignment="Right",s[1].setOffsetWithRespectToBounds(.97,0,null)):"Left"===e.textAlign?(s[1].horizontalAlignment="Left",s[1].setOffsetWithRespectToBounds(0,0,null)):"Center"===e.textAlign&&(s[1].horizontalAlignment="Center",s[1].setOffsetWithRespectToBounds(.46,0,null)));for(var N=0;N<s.length;N++){if(s[N].textNodes&&s[N].textNodes.length>0){s[N].isDirt=!0;var D=s[N].textNodes.length*s[N].textNodes[0].dy,b=e.bounds.height-D;if(b>0&&b<s[N].textNodes[0].dy&&(D+=s[N].textNodes[0].dy),D>e.bounds.height){for(var I="",v=0;v<s[N].textNodes.length;v++){var E=s[N].textNodes[0].dy*(v+1);if((E=E)>e.bounds.height&&!t.Browser.isDevice)break;I+=s[N].textNodes[v].text}s[N].content=I}}s[N].width=e.bounds.width-8}}e.wrapper.measure(new i.Size(e.wrapper.bounds.width,e.wrapper.bounds.height)),e.wrapper.arrange(e.wrapper.desiredSize)}this.pdfViewer.renderDrawing(void 0,e.pageIndex),e&&"FreeText"===e.shapeAnnotationType&&e.wrapper&&e.wrapper.children&&e.wrapper.children.length&&(1==(s=e.wrapper.children)[1].childNodes.length&&"Justify"===e.textAlign?(s[1].horizontalAlignment="Left",s[1].setOffsetWithRespectToBounds(.5,0,null)):s[1].childNodes.length>1&&"Justify"===e.textAlign&&(s[1].horizontalAlignment="Center",s[1].setOffsetWithRespectToBounds(0,0,null)))},e.prototype.setLineDistance=function(e,t,i,n){var o;o=n?U(e,t[1],t[0],n):U(e,t[0],t[1],n),i.data=o.data,i.offsetX=o.offsetX,i.offsetY=o.offsetY,i.rotateAngle=o.rotateAngle,i.width=o.width,i.height=o.height,i.pivot=o.pivot,i.canMeasurePath=!0,i.isDirt=!0},e.prototype.scaleSelectedItems=function(e,t,i){var n=this.pdfViewer.selectedItems;return this.scale(n,e,t,i)},e.prototype.scale=function(e,t,i,n){var o=!0;if(e instanceof Ke){if(e.annotations&&e.annotations.length)for(var s=0,a=e.annotations;s<a.length;s++){d=a[s];o=this.scaleAnnotation(d,t,i,n,e)}else if(e.formFields&&e.formFields.length)for(var r=0,l=e.formFields;r<l.length;r++){var d=l[r];o=this.scaleAnnotation(d,t,i,n,e)}}else o=this.scaleAnnotation(e,t,i,n,void 0);return o},e.prototype.scaleObject=function(e,t,n,o,s,a){if(e=e<0?1:e,t=t<0?1:t,1!==e||1!==t){var r=void 0,l=void 0;if(!h(o)){r=(M=o).wrapper.actualSize.width*e,l=M.wrapper.actualSize.height*t,e=r/M.wrapper.actualSize.width,t=l/M.wrapper.actualSize.height}var d=i.identityMatrix(),u=void 0;if(a||(a=o),u=a.wrapper,i.rotateMatrix(d,-u.rotateAngle,n.x,n.y),i.scaleMatrix(d,e,t,n.x,n.y),i.rotateMatrix(d,u.rotateAngle,n.x,n.y),!h(o)){var M=o,p=i.transformPointByMatrix(d,{x:M.wrapper.offsetX,y:M.wrapper.offsetY});M.wrapper.offsetX,M.wrapper.actualSize.width,M.wrapper.offsetY,M.wrapper.actualSize.height;r>0&&(M.wrapper.width=r,M.wrapper.offsetX=p.x),l>0&&(M.wrapper.height=l,M.wrapper.offsetY=p.y),M.wrapper.offsetX-M.wrapper.actualSize.width,M.wrapper.offsetY-M.wrapper.actualSize.height,this.nodePropertyChange(o,{bounds:{width:M.wrapper.width,height:M.wrapper.height,x:M.wrapper.offsetX,y:M.wrapper.offsetY}})}}},e.prototype.scaleAnnotation=function(e,t,i,n,o){var s=this.pdfViewer.nameTable[e.id],a=s.wrapper;o||(o=e);var r=o.wrapper,l=r.offsetX-r.actualSize.width*r.pivot.x,d=r.offsetY-r.actualSize.height*r.pivot.y,u=this.getShapePoint(l,d,r.actualSize.width,r.actualSize.height,r.rotateAngle,r.offsetX,r.offsetY,n);if(void 0!==a.actualSize.width&&void 0!==a.actualSize.height){this.scaleObject(t,i,u,s,a,o);this.getShapeBounds(e.wrapper)}var M=this.checkBoundaryConstraints(void 0,void 0,e.pageIndex,e.wrapper.bounds);return M||this.scaleObject(1/t,1/i,u,s,a,o),M},e.prototype.checkBoundaryConstraints=function(e,t,i,n,o,s){var a=n?void 0:this.pdfViewer.selectedItems.wrapper.bounds,r=n,l=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+i),d=10;if(l){var u=l.clientWidth/this.pdfViewer.viewerBase.getZoomFactor(),M=l.clientHeight/this.pdfViewer.viewerBase.getZoomFactor(),p=(n?r.right:a.right)+(e||0),h=(n?r.left:a.left)+(e||0),L=(n?r.top:a.top)+(t||0),w=(n?r.bottom:a.bottom)+(t||0);if(o&&(d=50,this.pdfViewer.viewerBase.eventArgs&&this.pdfViewer.viewerBase.eventArgs.source&&this.RestrictStamp(this.pdfViewer.viewerBase.eventArgs.source)))return!1;if(p<=u-10&&h>=10&&w<=M-10&&L>=d||s)return!0}return!1},e.prototype.RestrictStamp=function(e){return!(!e||void 0===e.pageIndex||!this.pdfViewer.viewerBase.activeElements||e.pageIndex===this.pdfViewer.viewerBase.activeElements.activePageID)},e.prototype.getShapeBounds=function(e){var t,n=new i.Rect,o=(t=i.cornersPointsBeforeRotation(e)).middleLeft,s=t.topCenter,a=t.bottomCenter,r=t.middleRight,l=t.topLeft,d=t.topRight,u=t.bottomLeft,M=t.bottomRight;if(e.corners={topLeft:l,topCenter:s,topRight:d,middleLeft:o,middleRight:r,bottomLeft:u,bottomCenter:a,bottomRight:M},0!==e.rotateAngle||0!==e.parentTransform){var p=i.identityMatrix();i.rotateMatrix(p,e.rotateAngle+e.parentTransform,e.offsetX,e.offsetY),e.corners.topLeft=l=i.transformPointByMatrix(p,l),e.corners.topCenter=s=i.transformPointByMatrix(p,s),e.corners.topRight=d=i.transformPointByMatrix(p,d),e.corners.middleLeft=o=i.transformPointByMatrix(p,o),e.corners.middleRight=r=i.transformPointByMatrix(p,r),e.corners.bottomLeft=u=i.transformPointByMatrix(p,u),e.corners.bottomCenter=a=i.transformPointByMatrix(p,a),e.corners.bottomRight=M=i.transformPointByMatrix(p,M)}return n=i.Rect.toBounds([l,d,u,M]),e.corners.left=n.left,e.corners.right=n.right,e.corners.top=n.top,e.corners.bottom=n.bottom,e.corners.center=n.center,e.corners.width=n.width,e.corners.height=n.height,n},e.prototype.getShapePoint=function(e,t,n,o,s,a,r,l){var d={x:0,y:0},u=i.identityMatrix();switch(i.rotateMatrix(u,s,a,r),l.x){case 1:switch(l.y){case 1:d=i.transformPointByMatrix(u,{x:e+n,y:t+o});break;case 0:d=i.transformPointByMatrix(u,{x:e+n,y:t});break;case.5:d=i.transformPointByMatrix(u,{x:e+n,y:t+o/2})}break;case 0:switch(l.y){case.5:d=i.transformPointByMatrix(u,{x:e,y:t+o/2});break;case 1:d=i.transformPointByMatrix(u,{x:e,y:t+o});break;case 0:d=i.transformPointByMatrix(u,{x:e,y:t})}break;case.5:switch(l.y){case 0:d=i.transformPointByMatrix(u,{x:e+n/2,y:t});break;case.5:d=i.transformPointByMatrix(u,{x:e+n/2,y:t+o/2});break;case 1:d=i.transformPointByMatrix(u,{x:e+n/2,y:t+o})}}return{x:d.x,y:d.y}},e.prototype.dragConnectorEnds=function(e,t,n,o,s,a,r){var l,d,u;if(l=t instanceof Ke?t.annotations[0]:t,n={x:n.x/this.pdfViewer.viewerBase.getZoomFactor(),y:n.y/this.pdfViewer.viewerBase.getZoomFactor()},this.checkBoundaryConstraints(void 0,void 0,l.pageIndex,l.wrapper.bounds)){if("Distance"===l.shapeAnnotationType){var M=j(l,e);if("Leader0"===e)this.pdfViewer.viewerBase.tool instanceof pt?(l.vertexPoints[0].x=n.x,l.vertexPoints[0].y=n.y):(d=n.x-M.point.x,u=n.y-M.point.y,l.vertexPoints[0].x+=d,l.vertexPoints[0].y+=u);else if("Leader1"===e){var p=l.vertexPoints.length-1;this.pdfViewer.viewerBase.tool instanceof pt?(l.vertexPoints[p].x=n.x,l.vertexPoints[p].y=n.y):(d=n.x-M.point.x,u=n.y-M.point.y,l.vertexPoints[p].x+=d,l.vertexPoints[p].y+=u)}else{var h=i.Point.findAngle(l.sourcePoint,l.targetPoint),L=t.wrapper.children[0].bounds.center,w=i.identityMatrix();i.rotateMatrix(w,-h,L.x,L.y);var c=i.transformPointByMatrix(w,{x:n.x,y:n.y});if("ConnectorSegmentPoint"===e.split("_")[0]){w=i.identityMatrix();i.rotateMatrix(w,-h,L.x,L.y);var C=i.transformPointByMatrix(w,l.vertexPoints[0]),g=i.transformPointByMatrix(w,l.vertexPoints[l.vertexPoints.length-1]);if(u=c.y-C.y,0===l.leaderHeight&&null!=l.leaderHeight)l.leaderHeight=this.pdfViewer.distanceSettings.leaderLength;else{l.leaderHeight+=u,C.y+=u,g.y+=u;w=i.identityMatrix();i.rotateMatrix(w,h,L.x,L.y),l.vertexPoints[0]=i.transformPointByMatrix(w,C),l.vertexPoints[l.vertexPoints.length-1]=i.transformPointByMatrix(w,g)}}}}else if("ConnectorSegmentPoint"===e.split("_")[0]){var m=Number(e.split("_")[1]);d=n.x-l.vertexPoints[m].x,u=n.y-l.vertexPoints[m].y,l.vertexPoints[m].x+=d,l.vertexPoints[m].y+=u,l.vertexPoints.length>2&&"Perimeter"!==t.measureType&&(0===parseFloat(e.split("_")[1])?(l.vertexPoints[l.vertexPoints.length-1].x+=d,l.vertexPoints[l.vertexPoints.length-1].y+=u):parseFloat(e.split("_")[1])===l.vertexPoints.length-1&&(l.vertexPoints[0].x+=d,l.vertexPoints[0].y+=u))}this.nodePropertyChange(l,{vertexPoints:l.vertexPoints}),this.renderSelector(l.pageIndex,r)}return this.pdfViewer.renderDrawing(),!0},e.prototype.dragSourceEnd=function(e,t,i,n){var o=this.pdfViewer.nameTable[e.id];return o.vertexPoints[n].x+=t,o.vertexPoints[n].y+=i,this.pdfViewer.renderDrawing(),!0},e.prototype.updateConnector=function(e,t){var i;e.vertexPoints=t,T(e,t,e.wrapper.children[0]),e.sourcePoint,i=e.vertexPoints;var n=e.wrapper.children[0];n.canMeasurePath=!0;for(var o=0;o<e.wrapper.children.length;o++)n=e.wrapper.children[o],"Polygon"!==e.shapeAnnotationType&&(n.id.indexOf("srcDec")>-1&&N(e,n,t[0],i[1],!0),e.targetPoint,n.id.indexOf("tarDec")>-1&&N(e,n,t[t.length-1],i[i.length-2],!1))},e.prototype.copy=function(){return this.pdfViewer.clipboardData.pasteIndex=1,this.pdfViewer.clipboardData.clipObject=this.copyObjects(),this.pdfViewer.clipboardData.clipObject},e.prototype.copyObjects=function(){var e=[],t=[];if(this.pdfViewer.clipboardData.childTable={},this.pdfViewer.selectedItems.annotations.length>0){e=this.pdfViewer.selectedItems.annotations;for(i=0;i<e.length;i++){n=void 0;n=m(e[i]),t.push(n)}}if(this.pdfViewer.selectedItems.formFields.length>0){e=this.pdfViewer.selectedItems.formFields;for(var i=0;i<e.length;i++){var n=void 0;n=m(e[i]),t.push(n)}}if(0===this.pdfViewer.clipboardData.pasteIndex)for(var o=0,s=e;o<s.length;o++){var a=s[o];this.pdfViewer.nameTable[a.id]&&(a.formFieldAnnotationType?(this.pdfViewer.clearSelection(a.pageIndex),this.pdfViewer.formDesignerModule.deleteFormField(a.id)):this.pdfViewer.annotationModule.deleteAnnotationById(a.annotName))}return this.sortByZIndex(t,"zIndex"),t},e.prototype.getNewObject=function(e){var t,i=[];this.pdfViewer.clipboardData.pasteIndex=1;for(var n=0;n<e.length;n++)t=m(e[n]),i.push(t);return i},e.prototype.paste=function(e,n){if(e||this.pdfViewer.clipboardData.clipObject){var o=e?this.getNewObject(e):this.pdfViewer.clipboardData.clipObject;if(o){o.length;var s={};0!==this.pdfViewer.clipboardData.pasteIndex&&this.pdfViewer.clearSelection(n);for(var a=0,r=o;a<r.length;a++)s[(d=r[a]).id]=d;for(var l=0;l<o.length;l++){var d=o[l],u=this.pdfViewer.viewerBase.getElement("_pageDiv_"+d.pageIndex),M=event;if(M.clientX||M.clientY||(M={clientX:this.pdfViewer.viewerBase.mouseLeft,clientY:this.pdfViewer.viewerBase.mouseTop}),t.isBlazor()&&(M=this.pdfViewer.viewerBase.mouseDownEvent),h(d))this.calculateCopyPosition(d,u,M);else if(u){var p=u.getBoundingClientRect();d.bounds.x=M.clientX-p.left,d.bounds.y=M.clientY-p.top}var L=m(d);"Cut"!==this.pdfViewer.viewerBase.contextMenuModule.previousAction?(L.id+=i.randomId(),this.pdfViewer.annotationModule&&(L.annotName=L.id,this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAnnotationCollection(L,o[0],!1)),"SignatureText"!==L.shapeAnnotationType&&"HandWrittenSignature"!==L.shapeAnnotationType&&"SignatureImage"!==L.shapeAnnotationType||this.pdfViewer.viewerBase.signatureModule.storeSignatureData(L.pageIndex,L),L.formFieldAnnotationType||this.pdfViewer.annotation.addAction(L.pageIndex,null,L,"Addition","",L,L)):(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAnnotationCollection(L,o[0],!0),"SignatureText"!==L.shapeAnnotationType&&"HandWrittenSignature"!==L.shapeAnnotationType&&"SignatureImage"!==L.shapeAnnotationType||this.pdfViewer.viewerBase.signatureModule.storeSignatureData(L.pageIndex,L));var w=this.add(L);if(this.pdfViewer.formDesigner&&w.formFieldAnnotationType&&this.pdfViewer.annotation.addAction(L.pageIndex,null,w,"Addition","",w,w),("FreeText"===L.shapeAnnotationType||L.enableShapeLabel)&&w&&this.nodePropertyChange(w,{}),w.formFieldAnnotationType&&w.pageIndex===n){this.pdfViewer.formFieldCollection.push(w);var c={id:w.id,name:w.name,value:w.value,type:w.formFieldAnnotationType,isReadOnly:w.isReadonly,fontFamily:w.fontFamily,fontSize:w.fontSize,fontStyle:w.fontStyle,color:w.color,backgroundColor:w.backgroundColor,alignment:w.alignment,visibility:w.visibility,maxLength:w.maxLength,isRequired:w.isRequired,isPrint:w.isPrint,tooltip:w.tooltip,bounds:w.bounds,thickness:w.thickness,borderColor:w.borderColor,signatureIndicatorSettings:w.signatureIndicatorSettings};this.pdfViewer.formFieldCollections.push(c),this.pdfViewer.formDesigner.drawHTMLContent(w.formFieldAnnotationType,w.wrapper.children[0],w,w.pageNumber-1,this.pdfViewer)}this.pdfViewer.select([L.id],this.pdfViewer.annotationSelectorSettings)}}this.pdfViewer.renderDrawing(void 0,n),this.pdfViewer.clipboardData.pasteIndex++}},e.prototype.calculateCopyPosition=function(e,t,i){for(var n,o,s,a,r=0;r<e.vertexPoints.length;r++)if(t)if(0===r){var l=t.getBoundingClientRect();n=e.vertexPoints[r].x,o=e.vertexPoints[r].y,e.vertexPoints[r].x=i.clientX-l.left,e.vertexPoints[r].y=i.clientY-l.top,s=e.vertexPoints[r].x,a=e.vertexPoints[r].y}else e.vertexPoints[r].x+=s-n,e.vertexPoints[r].y+=a-o},e.prototype.cut=function(e){this.pdfViewer.annotationModule&&(this.pdfViewer.annotationModule.removedAnnotationCollection=[]),this.pdfViewer.clipboardData.pasteIndex=0,this.pdfViewer.clipboardData.clipObject=this.copyObjects(),this.pdfViewer.renderDrawing(void 0,e)},e.prototype.sortByZIndex=function(e,t){var i=t||"zIndex";return e=e.sort(function(e,t){return e[i]-t[i]})},e}(),it=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nt=function(){function e(e,t,i){void 0===i&&(i=!1),this.commandHandler=null,this.inAction=!1,this.pdfViewerBase=null,this.currentElement=null,this.blocked=!1,this.isTooltipVisible=!1,this.childTable={},this.helper=void 0,this.undoElement={annotations:[]},this.undoParentElement={annotations:[]},this.commandHandler=e,this.pdfViewerBase=t}return e.prototype.startAction=function(e){this.currentElement=e,this.inAction=!0},e.prototype.mouseDown=function(e){this.currentElement=e.source,this.startPosition=this.currentPosition=this.prevPosition=e.position,this.isTooltipVisible=!0,this.startAction(e.source)},e.prototype.mouseMove=function(e){return this.currentPosition=e.position,this.prevPageId=this.pdfViewerBase.activeElements.activePageID,!this.blocked},e.prototype.mouseUp=function(e){this.currentPosition=e.position,this.isTooltipVisible=!1,this.endAction(),this.helper=null},e.prototype.endAction=function(){this.commandHandler&&(this.commandHandler.tool="",this.helper&&this.commandHandler.remove(this.helper)),this.commandHandler=null,this.currentElement=null,this.currentPosition=null,this.inAction=!1,this.blocked=!1},e.prototype.mouseWheel=function(e){this.currentPosition=e.position},e.prototype.mouseLeave=function(e){this.mouseUp(e)},e.prototype.updateSize=function(e,t,n,o,s,a,r){e=e;var l,d=this.commandHandler.viewerBase.getZoomFactor(),u=this.currentPosition.x/d-this.startPosition.x/d,M=this.currentPosition.y/d-this.startPosition.y/d,p=e instanceof i.TextElement?a:e.rotateAngle;l=i.identityMatrix(),i.rotateMatrix(l,-p,0,0);var h,L=0,w=0,c=e instanceof i.TextElement?e.actualSize.width:e.wrapper.bounds.width,C=e instanceof i.TextElement?e.actualSize.height:e.wrapper.bounds.height,g=e;e.formFieldAnnotationType||e.annotName||e.shapeAnnotationType||e&&(g=e.annotations[0]);var m=this.commandHandler.annotationModule?this.commandHandler.annotationModule.findAnnotationSettings(g):{},f=0,y=0,j=0,S=0;(m.minWidth||m.maxWidth||m.minHeight||m.maxHeight)&&(f=m.maxHeight?m.maxHeight:2e3,y=m.maxWidth?m.maxWidth:2e3,j=m.minHeight?m.minHeight:0,S=m.minWidth?m.minWidth:0);var A=!1;if((j||S||f||y)&&(A=!0),A&&r){var T=this.getPositions(o,u,M),x=c+T.x,N=C+T.y;N>j&&N<f&&x>S&&x<y?(u=u,M=M):((N<j||N>f)&&(M=N<j?j-C:f-C),(x<S||x>y)&&(u=x<S?S-c:y-c))}switch(o){case"ResizeWest":u=(h=i.transformPointByMatrix(l,{x:u,y:M})).x,M=h.y,w=1,u=u,M=0,A&&s.width-u>y&&(u=y-s.width),L=(s.width-u)/c;break;case"ResizeEast":u=(h=i.transformPointByMatrix(l,{x:u,y:M})).x,M=h.y,M=0,A&&s.width+u>y&&(u=y-s.width),L=(s.width+u)/c,w=1;break;case"ResizeNorth":L=1,u=(h=i.transformPointByMatrix(l,{x:u,y:M})).x,M=h.y,A&&s.height-M>f&&(M=f-s.height),w=(s.height-M)/C;break;case"ResizeSouth":L=1,u=(h=i.transformPointByMatrix(l,{x:u,y:M})).x,M=h.y,A&&s.height+M>f&&(M=f-s.height),w=(s.height+M)/C;break;case"ResizeNorthEast":u=(h=i.transformPointByMatrix(l,{x:u,y:M})).x,M=h.y,A&&(s.width+u>y&&(u=y-s.width),s.height-M>f&&(M=f-s.height)),L=(s.width+u)/c,w=(s.height-M)/C;break;case"ResizeNorthWest":u=(h=i.transformPointByMatrix(l,{x:u,y:M})).x,M=h.y,A&&(s.width-u>y&&(u=y-s.width),s.height-M>f&&(M=f-s.height)),L=(s.width-u)/c,w=(s.height-M)/C;break;case"ResizeSouthEast":u=(h=i.transformPointByMatrix(l,{x:u,y:M})).x,M=h.y,A&&(s.width+u>y&&(u=y-s.width),s.height+M>f&&(M=f-s.height)),w=(s.height+M)/C,L=(s.width+u)/c;break;case"ResizeSouthWest":u=(h=i.transformPointByMatrix(l,{x:u,y:M})).x,M=h.y,A&&(s.width-u>y&&(u=y-s.width),s.height+M>f&&(M=f-s.height)),L=(s.width-u)/c,w=(s.height+M)/C}return{width:L,height:w}},e.prototype.getPivot=function(e){switch(e){case"ResizeWest":return{x:1,y:.5};case"ResizeEast":return{x:0,y:.5};case"ResizeNorth":return{x:.5,y:1};case"ResizeSouth":return{x:.5,y:0};case"ResizeNorthEast":return{x:0,y:1};case"ResizeNorthWest":return{x:1,y:1};case"ResizeSouthEast":return{x:0,y:0};case"ResizeSouthWest":return{x:1,y:0}}return{x:.5,y:.5}},e.prototype.getPositions=function(e,t,i){switch(e){case"ResizeEast":return{x:t,y:0};case"ResizeSouthEast":return{x:t,y:i};case"ResizeSouth":return{x:0,y:i};case"ResizeNorth":return{x:0,y:-i};case"ResizeNorthEast":return{x:t,y:-i};case"ResizeNorthWest":return{x:-t,y:-i};case"ResizeWest":return{x:-t,y:0};case"ResizeSouthWest":return{x:-t,y:i}}return{x:t,y:i}},e}(),ot=function(e){function i(t,i){return e.call(this,t,i,!0)||this}return it(i,e),i.prototype.mouseDown=function(t){this.inAction=!0,this.mouseEventHelper(t),e.prototype.mouseDown.call(this,t)},i.prototype.mouseEventHelper=function(e){this.commandHandler&&this.commandHandler.annotationModule&&(this.commandHandler.annotationModule.overlappedCollections=W(e,this.pdfViewerBase,this.commandHandler,!0));var i=W(e,this.pdfViewerBase,this.commandHandler),n=!1;if(i&&"StickyNotes"===i.shapeAnnotationType&&i.annotationSettings&&i.annotationSettings.isLock&&(n=!this.commandHandler.annotationModule.checkAllowedInteractions("Select",i)),!n){var o=void 0;if(o=e.source&&null!==e.annotationSelectorSettings?e.source.annotationSelectorSettings:"",this.commandHandler){var s=this.commandHandler.selectedItems;if(s){var a=s.annotations[0],r=s.formFields[0],l=e.source;if(s.annotations.length&&e.info&&!e.info.ctrlKey&&this.commandHandler.annotationModule&&!1===this.commandHandler.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus?this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID):e.info&&e.info.ctrlKey&&(l&&"FreeText"===l.shapeAnnotationType||this.commandHandler.selectedItems.annotations[0]&&"FreeText"===this.commandHandler.selectedItems.annotations[0].shapeAnnotationType)?this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID):t.isNullOrUndefined(i)&&this.commandHandler.formDesignerModule&&this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),i&&(this.commandHandler.select([i.id],o),this.commandHandler.viewerBase.isAnnotationMouseDown=!0,this.commandHandler.viewerBase.isFormFieldMouseDown=!0),0===s.annotations.length&&a&&"Stamp"!==a.shapeAnnotationType&&!a.formFieldAnnotationType&&(t.Browser.isDevice&&!this.commandHandler.enableDesktopMode&&this.commandHandler.toolbarModule.showToolbar(!0),this.commandHandler.fireAnnotationUnSelect(a.annotName,a.pageIndex,a)),0===s.formFields.length&&this.commandHandler.formDesignerModule&&r&&r.formFieldAnnotationType){var d={value:r.value,fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,color:r.color,backgroundColor:r.backgroundColor,alignment:r.alignment,isReadonly:r.isReadOnly,visibility:r.visibility,maxLength:r.maxLength,isRequired:r.isRequired,isPrint:r.isPrint,rotation:r.rotation,tooltip:r.tooltip,options:r.options,isChecked:r.isChecked,isSelected:r.isSelected};this.commandHandler.fireFormFieldUnselectEvent("formFieldUnselect",d,r.pageIndex)}}}}},i.prototype.mouseMove=function(t){return e.prototype.mouseMove.call(this,t),!this.blocked},i.prototype.mouseUp=function(t){this.mouseEventHelper(t),this.inAction=!1,e.prototype.mouseUp.call(this,t)},i.prototype.mouseLeave=function(e){this.inAction&&this.mouseUp(e)},i}(nt),st=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.currentTarget=null,n.prevNode=null,n}return it(t,e),t.prototype.mouseDown=function(t){e.prototype.mouseDown.call(this,t),this.offset={x:t.source.wrapper.offsetX,y:t.source.wrapper.offsetY},this.startPosition=t.position;var i=m(t.source);this.redoElement={bounds:{x:i.wrapper.offsetX,y:i.wrapper.offsetY,width:i.wrapper.actualSize.width,height:i.wrapper.actualSize.height}},h(i)&&(this.redoElement.vertexPoints=i.vertexPoints,this.redoElement.leaderHeight=i.leaderHeight),this.inAction=!0},t.prototype.mouseUp=function(t){if(this.commandHandler&&t.source){this.commandHandler.selectedItems&&this.commandHandler.selectedItems.annotations&&this.commandHandler.selectedItems.annotations.length>0?this.commandHandler.selectedItems.annotations[0].annotName===t.source.annotName&&(this.commandHandler.viewerBase.isAnnotationMouseMove=!0):this.commandHandler.viewerBase.isAnnotationMouseMove=!1,this.commandHandler.selectedItems&&this.commandHandler.selectedItems.formFields&&this.commandHandler.selectedItems.formFields.length>0?this.commandHandler.selectedItems.formFields[0].name===t.source.name&&(this.commandHandler.viewerBase.isFormFieldMouseMove=!0):this.commandHandler.viewerBase.isFormFieldMouseMove=!1;var i=t.source.annotationSelectorSettings;this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.commandHandler.select([t.source.id],i),this.commandHandler.dragSelectedObjects(this.calculateMouseActionXDiff(t),this.calculateMouseActionYDiff(t),this.pdfViewerBase.activeElements.activePageID,i,null),!t.source||"Textbox"!==t.source.formFieldAnnotationType&&"Checkbox"!==t.source.formFieldAnnotationType&&"RadioButton"!==t.source.formFieldAnnotationType&&"ListBox"!==t.source.formFieldAnnotationType&&"SignatureField"!==t.source.formFieldAnnotationType&&"InitialField"!==t.source.formFieldAnnotationType&&"DropdownList"!==t.source.formFieldAnnotationType&&"PasswordField"!==t.source.formFieldAnnotationType||this.commandHandler.formDesignerModule.updateHTMLElement(t.source),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,i),this.commandHandler.viewerBase.isAnnotationMouseMove=!1,this.commandHandler.viewerBase.isFormFieldMouseMove=!1;var n={bounds:{x:t.source.wrapper.offsetX,y:t.source.wrapper.offsetY,width:t.source.wrapper.actualSize.width,height:t.source.wrapper.actualSize.height},modifiedDate:t.source.modifiedDate};if(h(t.source)&&(n.vertexPoints=t.source.vertexPoints,n.leaderHeight=t.source.leaderHeight),t.target&&t.target.formFieldAnnotationType){var o=t.target,s={value:o.value,fontFamily:o.fontFamily,fontSize:o.fontSize,fontStyle:o.fontStyle,color:o.color,backgroundColor:o.backgroundColor,borderColor:o.borderColor,thickness:o.thickness,alignment:o.alignment,isReadonly:o.isReadonly,visibility:o.visibility,maxLength:o.maxLength,isRequired:o.isRequired,isPrint:o.isPrint,rotation:o.rotateAngle,tooltip:o.tooltip,options:o.options,isChecked:o.isChecked,isSelected:o.isSelected},a={X:t.source.wrapper.offsetX,Y:t.source.wrapper.offsetY,Width:t.source.wrapper.actualSize.width,Height:t.source.wrapper.actualSize.height},r={X:this.offset.x,Y:this.offset.y,Width:t.source.wrapper.actualSize.width,Height:t.source.wrapper.actualSize.height};this.commandHandler.fireFormFieldMoveEvent("formFieldMove",s,o.pageIndex,r,a)}this.commandHandler.annotation&&(this.commandHandler.annotation.addAction(this.pageIndex,null,t.source,"Drag","",this.redoElement,n),this.commandHandler.annotation.stampAnnotationModule.updateSessionStorage(t.source,null,"Drag"),this.commandHandler.annotation.stickyNotesAnnotationModule.updateStickyNotes(t.source,null))}e.prototype.mouseUp.call(this,t)},t.prototype.calculateMouseXDiff=function(){return this.currentPosition&&this.startPosition?this.currentPosition.x-this.startPosition.x:0},t.prototype.calculateMouseYDiff=function(){return this.currentPosition&&this.startPosition?this.currentPosition.y-this.startPosition.y:0},t.prototype.calculateMouseActionXDiff=function(e){var t=this.calculateMouseXDiff()/this.commandHandler.viewerBase.getZoomFactor();return this.offset?this.offset.x+t-e.source.wrapper.offsetX:0},t.prototype.calculateMouseActionYDiff=function(e){var t=this.calculateMouseYDiff()/this.commandHandler.viewerBase.getZoomFactor();return this.offset?this.offset.y+t-e.source.wrapper.offsetY:0},t.prototype.mouseMove=function(t,i,n){if(e.prototype.mouseMove.call(this,t),this.inAction){this.currentPosition=t.position,this.currentTarget=t.target;var o=t.source.annotationSelectorSettings,s=this.calculateMouseXDiff()/this.commandHandler.viewerBase.getZoomFactor(),a=this.calculateMouseYDiff()/this.commandHandler.viewerBase.getZoomFactor(),r=this.offset.x+s,l=this.offset.y+a,d=this.calculateMouseActionXDiff(t),u=this.calculateMouseActionYDiff(t);if(this.helper)d=r-this.helper.wrapper.offsetX,u=l-this.helper.wrapper.offsetY;else{this.commandHandler.selectedItems.annotations[0];var M=m(this.commandHandler.selectedItems.annotations.length>0?this.commandHandler.selectedItems.annotations[0]:this.commandHandler.selectedItems.formFields[0]);M.wrapper&&(d=r-M.wrapper.offsetX,u=l-M.wrapper.offsetY,M.bounds=this.commandHandler.selectedItems.annotations.length>0?this.commandHandler.selectedItems.annotations[0].wrapper.bounds:this.commandHandler.selectedItems.formFields[0].wrapper.bounds),M.wrapper=void 0,M.id="diagram_helper","Stamp"===M.shapeAnnotationType?(M.strokeColor="",M.borderDashArray="",M.fillColor="transparent",M.stampFillColor="transparent",M.data=""):"FreeText"===M.shapeAnnotationType?(M.strokeColor="blue",M.fillColor="transparent",M.thickness=1,M.opacity=1,M.dynamicText=""):(M.strokeColor="red",M.borderDashArray="5,5",M.fillColor="transparent",M.thickness=2,M.opacity=1),!0===M.enableShapeLabel&&(M.labelContent=""),i?M=this.helper=t.source:this.helper=M=this.commandHandler.add(M),this.commandHandler.selectedItems.annotations.length>0?this.commandHandler.selectedItems.annotations=[M]:this.commandHandler.selectedItems.formFields=[M]}this.helper&&"Stamp"===this.helper.shapeAnnotationType&&(i=!0),this.commandHandler.checkBoundaryConstraints(d,u,this.pdfViewerBase.activeElements.activePageID,this.helper.wrapper.bounds,i,n)?(this.commandHandler.dragSelectedObjects(d,u,this.pdfViewerBase.activeElements.activePageID,o,this.helper),this.prevNode=this.helper,this.prevPosition=this.currentPosition):this.currentPosition=this.prevPosition}return!0},t.prototype.mouseLeave=function(t){var i=t.source.annotationSelectorSettings,n=this.offset.x+this.calculateMouseXDiff(),o=this.offset.y+this.calculateMouseYDiff(),s=n-t.source.wrapper.offsetX,a=o-t.source.wrapper.offsetY;this.commandHandler.dragSelectedObjects(s,a,this.prevPageId,i,null),this.commandHandler.renderSelector(this.prevPageId,i),e.prototype.mouseLeave.call(this,t)},t.prototype.endAction=function(){e.prototype.endAction.call(this),this.currentTarget=null,this.prevPosition=null},t}(nt),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return it(t,e),t.prototype.mouseDown=function(t){e.prototype.mouseUp.call(this,t)},t.prototype.mouseMove=function(t){var i;if(!this.inAction){var n=this.pdfViewerBase.activeElements.activePageID;this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID);var o=this.commandHandler.annotation.stampAnnotationModule.moveStampElement(t.position.x,t.position.y,n);i=this.commandHandler.add(o),t.source=this.commandHandler.annotations[this.commandHandler.annotations.length-1],t.sourceWrapper=t.source.wrapper,this.inAction=!0;var s=t.source;!s||"HandWrittenSignature"!==s.shapeAnnotationType&&"SignatureText"!==s.shapeAnnotationType&&"SignatureImage"!==s.shapeAnnotationType?this.offset={x:t.source.wrapper.offsetX,y:t.source.wrapper.offsetY}:this.offset={x:t.source.wrapper.offsetX-t.source.wrapper.bounds.width/2,y:t.source.wrapper.offsetY-t.source.wrapper.bounds.height/2},this.startPosition=t.position,this.commandHandler.select([i.id])}var a=t.source.annotationSelectorSettings;return e.prototype.mouseMove.call(this,t,!0,!0),this.commandHandler.renderSelector(t.source.pageIndex,a),this.inAction},t}(st),rt=function(e){function t(t,i,n){var o=e.call(this,t,i)||this;return o.sourceObject=n,o}return it(t,e),t.prototype.mouseDown=function(t){this.pdfViewerBase.disableTextSelectionMode(),e.prototype.mouseDown.call(this,t),this.inAction=!0;var i={currentPosition:this.currentPosition,prevPosition:this.prevPosition};this.commandHandler.annotation.inkAnnotationModule.drawInkInCanvas(i,this.pdfViewerBase.activeElements.activePageID)},t.prototype.mouseMove=function(t){if(e.prototype.mouseMove.call(this,t),this.inAction){var i={currentPosition:this.currentPosition,prevPosition:this.pdfViewerBase.prevPosition};this.commandHandler.annotation.inkAnnotationModule.drawInkInCanvas(i,this.pdfViewerBase.activeElements.activePageID)}return this.inAction},t.prototype.mouseUp=function(e){return this.commandHandler.annotation.inkAnnotationModule.storePathData(),!0},t.prototype.mouseLeave=function(e){},t.prototype.endAction=function(){e.prototype.endAction.call(this)},t}(nt),lt=function(e){function t(t,i,n){var o=e.call(this,t,i,!0)||this;return o.endPoint=n,o}return it(t,e),t.prototype.mouseDown=function(t){this.inAction=!0,this.undoElement=void 0,e.prototype.mouseDown.call(this,t);t.source&&t.source.annotations&&({x:this.prevPosition.x,y:this.prevPosition.y},t.source.annotations[0]),this.initialPosition=t.position,this.prevSource=this.commandHandler.selectedItems.annotations[0];var i=m(t.source);this.redoElement={bounds:{x:i.wrapper.offsetX,y:i.wrapper.offsetY,width:i.wrapper.actualSize.width,height:i.wrapper.actualSize.height}},h(i)&&(this.redoElement.vertexPoints=i.vertexPoints,this.redoElement.leaderHeight=i.leaderHeight,"Distance"!==i.measureType&&"Perimeter"!==i.measureType&&"Area"!==i.measureType&&"Volume"!==i.measureType||(this.redoElement.notes=i.notes)),this.currentPosition=t.position},t.prototype.mouseUp=function(t){if(this.commandHandler){var i=this.commandHandler.selectedItems.annotations[0];if(i){var n=this.commandHandler.annotationModule.findAnnotationSettings(i),o=0,s=0,a=0,r=0;if((n.minWidth||n.maxWidth||n.minHeight||n.maxHeight)&&(o=n.maxHeight?n.maxHeight:2e3,s=n.maxWidth?n.maxWidth:2e3,a=n.minHeight?n.minHeight:0,r=n.minWidth?n.minWidth:0),i.vertexPoints.length>3){var l=this.commandHandler.viewerBase.checkAnnotationWidth(i.vertexPoints),d=l.width,u=l.height;a||r||o||s?(u>a&&u<o||d>r&&d<s)&&this.commandHandler.nodePropertyChange(this.prevSource,{vertexPoints:i.vertexPoints,leaderHeight:i.leaderHeight}):this.commandHandler.nodePropertyChange(this.prevSource,{vertexPoints:i.vertexPoints,leaderHeight:i.leaderHeight})}else if(a||r||o||s)if(i.shapeAnnotationType,0)this.commandHandler.nodePropertyChange(this.prevSource,{vertexPoints:i.vertexPoints,leaderHeight:i.leaderHeight});else{var M=0,p=0,L=(M=i.vertexPoints[0].x>i.vertexPoints[1].x?i.vertexPoints[0].x-i.vertexPoints[1].x:i.vertexPoints[1].x-i.vertexPoints[0].x)>(p=i.vertexPoints[0].y>i.vertexPoints[1].y?i.vertexPoints[0].y-i.vertexPoints[1].y:i.vertexPoints[1].y-i.vertexPoints[0].y)?M:p;L<(o||s)&&L>(a||r)&&this.commandHandler.nodePropertyChange(this.prevSource,{vertexPoints:i.vertexPoints,leaderHeight:i.leaderHeight})}else this.commandHandler.nodePropertyChange(this.prevSource,{vertexPoints:i.vertexPoints,leaderHeight:i.leaderHeight});var w=t.source.annotationSelectorSettings;this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.commandHandler.select([this.prevSource.id],w),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,w);var c={bounds:{x:t.source.wrapper.offsetX,y:t.source.wrapper.offsetY,width:t.source.wrapper.actualSize.width,height:t.source.wrapper.actualSize.height}};"Distance"!==i.measureType&&"Perimeter"!==i.measureType&&"Area"!==i.measureType&&"Volume"!==i.measureType||(this.commandHandler.annotation.updateCalibrateValues(this.commandHandler.selectedItems.annotations[0]),c.notes=t.source.notes),h(t.source)&&(c.vertexPoints=t.source.vertexPoints,c.leaderHeight=t.source.leaderHeight),this.commandHandler.annotation.addAction(this.pageIndex,null,this.prevSource,"Resize","",this.redoElement,c)}}e.prototype.mouseUp.call(this,t)},t.prototype.mouseMove=function(t){e.prototype.mouseMove.call(this,t);if(this.currentPosition=t.position,this.currentPosition&&this.prevPosition){var i=this.currentPosition.x-this.prevPosition.x,n=this.currentPosition.y-this.prevPosition.y;if(t.source&&t.source.annotations&&({x:this.currentPosition.x,y:this.currentPosition.y},{x:this.prevPosition.x,y:this.prevPosition.y},t.source.annotations[0]),this.inAction&&void 0!==this.endPoint&&0!==i||0!==n){if(!this.helper){var o=m(this.commandHandler.selectedItems.annotations[0]);o.id="diagram_helper",o.strokeColor="red",o.borderDashArray="5,5",o.fillColor="transparent",o.thickness=2,o.opacity=1,!0===o.enableShapeLabel&&(o.labelContent=""),this.helper=o=this.commandHandler.add(o),this.commandHandler.selectedItems.annotations=[o]}var s=t.source.annotationSelectorSettings;this.blocked=!this.commandHandler.dragConnectorEnds(this.endPoint,this.helper,this.currentPosition,this.selectedSegment,t.target,null,s),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,s)}}return this.prevPosition=this.currentPosition,!this.blocked},t.prototype.mouseLeave=function(e){this.mouseUp(e)},t.prototype.endAction=function(){e.prototype.endAction.call(this),this.prevPosition=null,this.endPoint=null},t}(nt),dt=function(e){function t(t,n,o){var s=e.call(this,t,n,!0)||this;return s.initialBounds=new i.Rect,s.corner=o,s}return it(t,e),t.prototype.mouseDown=function(t){e.prototype.mouseDown.call(this,t),this.initialBounds.x=t.source.wrapper.offsetX,this.initialBounds.y=t.source.wrapper.offsetY,this.initialBounds.height=t.source.wrapper.actualSize.height,this.initialBounds.width=t.source.wrapper.actualSize.width,this.initialPosition=t.position;var i=m(t.source);this.redoElement={bounds:{x:i.wrapper.offsetX,y:i.wrapper.offsetY,width:i.wrapper.actualSize.width,height:i.wrapper.actualSize.height}},h(i)&&(this.redoElement.vertexPoints=i.vertexPoints,this.redoElement.leaderHeight=i.leaderHeight),"Radius"===i.measureType&&(this.redoElement.notes=i.notes),this.prevSource=this.commandHandler.selectedItems.annotations.length>0?this.commandHandler.selectedItems.annotations[0]:this.commandHandler.selectedItems.formFields[0]},t.prototype.mouseUp=function(t,i){if(t.source,this.commandHandler&&this.prevSource){this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.commandHandler.viewerBase.isAnnotationSelect=!0,this.commandHandler.viewerBase.isFormFieldSelect=!0,this.commandHandler.select([this.prevSource.id],this.prevSource.annotationSelectorSettings);var n=this.updateSize(this.prevSource,this.currentPosition,this.initialPosition,this.corner,this.initialBounds,null,!0);if(this.blocked=this.scaleObjects(n.width,n.height,this.corner,this.currentPosition,this.initialPosition,this.prevSource),this.commandHandler.selectedItems&&this.commandHandler.selectedItems.annotations&&this.commandHandler.selectedItems.annotations[0]&&"Stamp"===this.commandHandler.selectedItems.annotations[0].shapeAnnotationType&&(this.commandHandler.stampSettings.minHeight||this.commandHandler.stampSettings.minWidth)&&this.commandHandler.select([this.prevSource.id],this.prevSource.annotationSelectorSettings),this.commandHandler.selectedItems.formFields.length>0&&("Textbox"===this.commandHandler.selectedItems.formFields[0].formFieldAnnotationType||"Checkbox"===this.commandHandler.selectedItems.formFields[0].formFieldAnnotationType||"RadioButton"===this.commandHandler.selectedItems.formFields[0].formFieldAnnotationType||"InitialField"===this.commandHandler.selectedItems.formFields[0].formFieldAnnotationType||"SignatureField"===this.commandHandler.selectedItems.formFields[0].formFieldAnnotationType||"DropdownList"===this.commandHandler.selectedItems.formFields[0].formFieldAnnotationType||"ListBox"===this.commandHandler.selectedItems.formFields[0].formFieldAnnotationType||"PasswordField"===this.commandHandler.selectedItems.formFields[0].formFieldAnnotationType)&&this.commandHandler.formDesignerModule.updateHTMLElement(this.commandHandler.selectedItems.formFields[0]),this.commandHandler.renderSelector(this.prevPageId,this.prevSource.annotationSelectorSettings),this.commandHandler.annotation&&t.source.wrapper){var o={bounds:{x:t.source.wrapper.offsetX,y:t.source.wrapper.offsetY,width:t.source.wrapper.actualSize.width,height:t.source.wrapper.actualSize.height}};h(t.source)&&(o.vertexPoints=t.source.vertexPoints,o.leaderHeight=t.source.leaderHeight),"Radius"===this.prevSource.measureType&&(o.notes=t.source.notes,this.commandHandler.annotation.updateCalibrateValues(this.prevSource)),"SignatureText"===this.prevSource.shapeAnnotationType&&(o.fontSize=o.bounds.height/2,null!=t.target&&(t.target.fontSize=o.bounds.height/2,t.target.wrapper.children[1].style.fontSize=o.fontSize,t.target.wrapper.children[1].horizontalAlignment="Center",t.target.wrapper.children[1].verticalAlignment="Center",t.target.wrapper.children[1].setOffsetWithRespectToBounds(0,0,"Absolute"),this.commandHandler.selectedItems.annotations[0].wrapper.children[1].style.fontSize=o.fontSize,this.commandHandler.selectedItems.annotations[0].wrapper.children[1].horizontalAlignment="Center",this.commandHandler.selectedItems.annotations[0].wrapper.children[1].verticalAlignment="Center",this.commandHandler.selectedItems.annotations[0].wrapper.children[1].setOffsetWithRespectToBounds(0,0,"Absolute"),this.commandHandler.selectedItems.annotations[0].fontSize=o.bounds.height/2)),("FreeText"===this.prevSource.shapeAnnotationType||"SignatureText"===this.prevSource.shapeAnnotationType)&&this.commandHandler.selectedItems.annotations&&this.commandHandler.selectedItems.annotations.length>0&&this.commandHandler.nodePropertyChange(this.commandHandler.selectedItems.annotations[0],{fontSize:o.bounds.height/2}),this.commandHandler.annotation.addAction(this.pageIndex,null,this.prevSource,"Resize","",this.redoElement,o)}if(t.target&&t.target.formFieldAnnotationType){var s=t.target,a={value:s.value,fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,color:s.color,backgroundColor:s.backgroundColor,alignment:s.alignment,isReadonly:s.isReadonly,visibility:s.visibility,maxLength:s.maxLength,isRequired:s.isRequired,isPrint:s.isPrint,rotation:s.rotateAngle,tooltip:s.tooltip,options:s.options,isChecked:s.isChecked,isSelected:s.isSelected},r={X:t.source.wrapper.offsetX,Y:t.source.wrapper.offsetY,Width:t.source.wrapper.actualSize.width,Height:t.source.wrapper.actualSize.height},l={X:this.initialBounds.x,Y:this.initialBounds.y,Width:this.initialBounds.width,Height:this.initialBounds.height};this.commandHandler.fireFormFieldResizeEvent("formFieldResize",a,s.pageIndex,l,r)}this.commandHandler.annotation&&this.commandHandler.annotation.stampAnnotationModule&&this.commandHandler.annotation.stampAnnotationModule.updateSessionStorage(t.source,this.prevSource.id,"Resize")}return e.prototype.mouseUp.call(this,t),!this.blocked},t.prototype.mouseMove=function(t){e.prototype.mouseMove.call(this,t);var n;n=t.source,this.currentPosition=t.position;var o=this.currentPosition.x-this.startPosition.x,s=this.currentPosition.y-this.startPosition.y;o/=this.commandHandler.viewerBase.getZoomFactor(),s/=this.commandHandler.viewerBase.getZoomFactor();var a=t.source,r=this.getPoints(o,s),l=a.width+r.x,d=a.height+r.y,u=n;n&&n.annotations&&(u=n.annotations[0]);var M=this.commandHandler.annotationModule?this.commandHandler.annotationModule.findAnnotationSettings(u):{},p=0,h=0,L=0,w=0;(M.minWidth||M.maxWidth||M.minHeight||M.maxHeight)&&(p=M.maxHeight?M.maxHeight:2e3,h=M.maxWidth?M.maxWidth:2e3,L=M.minHeight?M.minHeight:0,w=M.minWidth?M.minWidth:0),(L||w||p||h)&&(d>=L&&d<=p&&l>=w&&l<=h?(o=o,s=s):((d<L||d>p)&&(s=d<L?L-a.height:p-a.height),(l<w||l>h)&&(o=l<w?w-a.width:h-a.width)));var c={x:o,y:s};if(this.currentElement.wrapper){c=i.rotatePoint(-this.currentElement.wrapper.rotateAngle,void 0,void 0,c);this.currentElement.wrapper.actualSize.width,c.x,this.currentElement.wrapper.actualSize.width,this.currentElement.wrapper.actualSize.height,c.y,this.currentElement.wrapper.actualSize.height}if(c=this.getChanges(c),!this.helper){var C=m(this.commandHandler.selectedItems.annotations.length>0?this.commandHandler.selectedItems.annotations[0]:this.commandHandler.selectedItems.formFields[0]);C.id="diagram_helper","Stamp"===C.shapeAnnotationType?(C.strokeColor="",C.borderDashArray="",C.fillColor="transparent",C.stampFillColor="transparent",C.data=""):"FreeText"===C.shapeAnnotationType?(C.strokeColor="blue",C.fillColor="transparent",C.thickness=1,C.opacity=1,C.dynamicText=""):(C.bounds=this.commandHandler.selectedItems.annotations.length>0?this.commandHandler.selectedItems.annotations[0].wrapper.bounds:this.commandHandler.selectedItems.formFields[0].wrapper.bounds,C.strokeColor="red",C.borderDashArray="5,5",C.fillColor="transparent",C.thickness=2,C.opacity=1),!0===C.enableShapeLabel&&(C.labelContent=""),"SignatureText"===C.shapeAnnotationType&&(C.fontSize=C.bounds.height/2),this.helper=C=this.commandHandler.add(C),this.commandHandler.selectedItems.annotations.length>0?this.commandHandler.selectedItems.annotations=[C]:this.commandHandler.selectedItems.formFields=[C]}var g=this.updateSize(this.helper,this.startPosition,this.currentPosition,this.corner,this.initialBounds);return this.blocked=!this.scaleObjects(g.width,g.height,this.corner,this.startPosition,this.currentPosition,this.helper),this.prevPosition=this.currentPosition,!this.blocked},t.prototype.mouseLeave=function(e){this.mouseUp(e)},t.prototype.getTooltipContent=function(e){return"W:"+Math.round(e.wrapper.bounds.width)+" H:"+Math.round(e.wrapper.bounds.height)},t.prototype.getChanges=function(e){switch(this.corner){case"ResizeEast":return{x:e.x,y:0};case"ResizeSouthEast":return e;case"ResizeSouth":return{x:0,y:e.y};case"ResizeNorth":return{x:0,y:-e.y};case"ResizeNorthEast":return{x:e.x,y:-e.y};case"ResizeNorthWest":return{x:-e.x,y:-e.y};case"ResizeWest":return{x:-e.x,y:0};case"ResizeSouthWest":return{x:-e.x,y:e.y}}return e},t.prototype.getPoints=function(e,t){switch(this.corner){case"ResizeEast":return{x:e,y:0};case"ResizeSouthEast":return{x:e,y:t};case"ResizeSouth":return{x:0,y:t};case"ResizeNorth":return{x:0,y:-t};case"ResizeNorthEast":return{x:e,y:-t};case"ResizeNorthWest":return{x:-e,y:-t};case"ResizeWest":return{x:-e,y:0};case"ResizeSouthWest":return{x:-e,y:t}}return{x:e,y:t}},t.prototype.scaleObjects=function(e,t,i,n,o,s){var a=this.commandHandler.annotationModule?this.commandHandler.annotationModule.findAnnotationSettings(s):{},r=0,l=0,d=this.currentPosition.x-this.startPosition.x,u=this.currentPosition.y-this.startPosition.y;d/=this.commandHandler.viewerBase.getZoomFactor(),u/=this.commandHandler.viewerBase.getZoomFactor();var M=s,p=this.getPoints(d,u),h=M.bounds.width+p.x,L=M.bounds.height+p.y;(a.minWidth||a.maxWidth||a.minHeight||a.maxHeight)&&(r=a.maxHeight?a.maxHeight:2e3,l=a.maxWidth?a.maxWidth:2e3,a.minHeight?a.minHeight:0,a.minWidth&&a.minWidth),s instanceof Ke&&1===s.annotations.length&&("Perimeter"===s.annotations[0].shapeAnnotationType||"Radius"===s.annotations[0].shapeAnnotationType||"Stamp"===s.shapeAnnotationType)?t=e=1!==t||1!==e?Math.max(1===t?0:t,1===e?0:e):n!==o?Math.max(t,e):0:"Image"===s.shapeAnnotationType||"HandWrittenSignature"===s.shapeAnnotationType||"SignatureText"===s.shapeAnnotationType||"SignatureImage"===s.shapeAnnotationType?1===t&&1===e||(h>=l&&L<r&&(t=Math.max(t,e)),L>=r&&h<l&&(e=Math.max(t,e)),h<l&&L<r&&(t=e=Math.max(t,e))):"Perimeter"!==s.shapeAnnotationType&&"Radius"!==s.shapeAnnotationType&&"Stamp"!==s.shapeAnnotationType||r&&l||1===t&&1===e||(t=e=Math.max(1===t?0:t,1===e?0:e));s.wrapper.offsetX,s.wrapper.offsetY;return this.blocked=this.commandHandler.scaleSelectedItems(e,t,this.getPivot(this.corner)),this.blocked},t}(nt),ut=function(e){function t(t,i,n){var o=e.call(this,t,i)||this;return o.sourceObject=n,o}return it(t,e),t.prototype.mouseDown=function(t){e.prototype.mouseDown.call(this,t),this.inAction=!0;var n={bounds:{x:100,y:300,width:100,height:100},pageIndex:0,strokeColor:"red",thickness:3};n.id=i.randomId(),this.sourceObject.pageIndex=n.pageIndex=this.pdfViewerBase.activeElements.activePageID||0,this.sourceObject.enableShapeLabel=this.commandHandler.enableShapeLabel,this.pdfViewerBase.updateFreeTextProperties(this.sourceObject),this.isFormDesign=!1;var o=document.getElementById("FormField_helper_html_element");if(o&&o.remove(),this.commandHandler.drawingObject=this.drawingObject=this.commandHandler.add(this.sourceObject||n),"Textbox"===this.drawingObject.formFieldAnnotationType||"SignatureField"===this.drawingObject.formFieldAnnotationType||"InitialField"===this.drawingObject.formFieldAnnotationType||"Checkbox"===this.drawingObject.formFieldAnnotationType||"ListBox"===this.drawingObject.formFieldAnnotationType||"RadioButton"===this.drawingObject.formFieldAnnotationType||"DropdownList"===this.drawingObject.formFieldAnnotationType||"PasswordField"===this.drawingObject.formFieldAnnotationType){this.inAction=!1,this.drawingObject.pageNumber=this.pdfViewerBase.currentPageNumber;var s=this.commandHandler.formDesignerModule.updateFormFieldInitialSize(this.drawingObject.wrapper.children[0],this.drawingObject.formFieldAnnotationType),a=this.pdfViewerBase.pageContainer.firstElementChild.clientWidth-s.width,r=this.pdfViewerBase.pageContainer.firstElementChild.clientHeight-s.height,l=this.pdfViewerBase.pageContainer.firstElementChild.offsetLeft,d=void 0;if(this.currentPosition.y>=r&&event.target&&event.target.parentElement&&event.target.parentElement.classList.contains("foreign-object")){var u=event.path[3].getBoundingClientRect();d=event.clientX-u.left}else d=this.currentPosition.x-l;var M=void 0;M=this.currentPosition.x>=a&&this.currentPosition.y>=r?{x:a,y:r,width:this.drawingObject.wrapper.children[0].width,height:this.drawingObject.wrapper.children[0].height}:this.currentPosition.x>=a?{x:a,y:this.currentPosition.y,width:this.drawingObject.wrapper.children[0].width,height:this.drawingObject.wrapper.children[0].height}:this.currentPosition.y>=r?{x:d,y:r,width:this.drawingObject.wrapper.children[0].width,height:this.drawingObject.wrapper.children[0].height}:{x:this.currentPosition.x,y:this.currentPosition.y,width:this.drawingObject.wrapper.children[0].width,height:this.drawingObject.wrapper.children[0].height},this.updateNodeDimension(this.drawingObject,M),this.commandHandler.formDesignerModule.drawHTMLContent(this.drawingObject.formFieldAnnotationType,this.drawingObject.wrapper.children[0],this.drawingObject,this.drawingObject.pageIndex,this.commandHandler),this.commandHandler.select([this.commandHandler.drawingObject.id],this.commandHandler.annotationSelectorSettings),this.commandHandler.formFieldCollection.push(this.drawingObject);var p={id:this.drawingObject.id,name:this.drawingObject.name,value:this.drawingObject.value,type:this.drawingObject.formFieldAnnotationType,isReadOnly:this.drawingObject.isReadonly,fontFamily:this.drawingObject.fontFamily,fontSize:this.drawingObject.fontSize,fontStyle:this.drawingObject.fontStyle,color:this.drawingObject.color,backgroundColor:this.drawingObject.backgroundColor,alignment:this.drawingObject.alignment,visibility:this.drawingObject.visibility,maxLength:this.drawingObject.maxLength,isRequired:this.drawingObject.isRequired,isPrint:this.drawingObject.isPrint,tooltip:this.drawingObject.tooltip,bounds:this.drawingObject.bounds,thickness:this.drawingObject.thickness,borderColor:this.drawingObject.borderColor,signatureIndicatorSettings:this.drawingObject.signatureIndicatorSettings};this.commandHandler.formFieldCollections.push(p),this.commandHandler.annotation.addAction(this.pdfViewerBase.currentPageNumber,null,this.drawingObject,"Addition","",this.drawingObject,this.drawingObject),this.endAction(),this.pdfViewerBase.tool=null,this.pdfViewerBase.action="Select",this.drawingObject=null,this.pdfViewerBase.isMouseDown=!1,this.pdfViewerBase.pdfViewer.drawingObject=null,this.isFormDesign=!0}},t.prototype.mouseMove=function(t){if(e.prototype.mouseMove.call(this,t),this.inAction&&!1===i.Point.equals(this.currentPosition,this.prevPosition)){this.dragging=!0;var n=i.Rect.toBounds([this.prevPosition,this.currentPosition]);this.updateNodeDimension(this.drawingObject,n),"Radius"===this.drawingObject.shapeAnnotationType&&this.updateRadiusLinePosition(this.drawingObject.wrapper.children[1],this.drawingObject)}return!0},t.prototype.mouseUp=function(t){this.drawingObject&&this.dragging?(this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.commandHandler.select([this.drawingObject.id],this.commandHandler.annotationSelectorSettings),this.commandHandler.annotation.updateCalibrateValues(this.drawingObject,!0),this.commandHandler&&!this.isFormDesign&&this.commandHandler.annotation.addAction(this.pageIndex,null,this.drawingObject,"Addition","",this.drawingObject,this.drawingObject),this.drawingObject=null,this.dragging=!1,e.prototype.mouseUp.call(this,t),this.inAction=!1):e.prototype.mouseUp.call(this,t)},t.prototype.endAction=function(){e.prototype.endAction.call(this)},t.prototype.updateNodeDimension=function(e,t){var i=this.commandHandler.viewerBase.getZoomFactor();e.bounds.x=t.x/i+t.width/i,e.bounds.y=t.y/i+t.height/i,e.bounds.width=t.width/i,e.bounds.height=t.height/i;var n=this.commandHandler.annotationModule?this.commandHandler.annotationModule.findAnnotationSettings(e):{},o=0,s=0;n.maxWidth||n.maxHeight?(o=n.maxHeight?n.maxHeight:2e3,s=n.maxWidth?n.maxWidth:2e3,e.bounds.width>s&&(e.bounds.width=s),e.bounds.height>o&&(e.bounds.height=o),e.bounds.height<=o&&e.bounds.width<=s&&this.commandHandler.nodePropertyChange(e,{bounds:e.bounds})):this.commandHandler.nodePropertyChange(e,{bounds:e.bounds})},t.prototype.updateRadiusLinePosition=function(e,t){var n={x:t.bounds.x+t.bounds.width/4,y:t.bounds.y},o={x:t.bounds.x+t.bounds.width/2,y:t.bounds.y+t.bounds.height/2},s=i.identityMatrix();i.rotateMatrix(s,t.rotateAngle,o.x,o.y);var a=i.transformPointByMatrix(s,n),r={x:a.x,y:a.y};e.offsetX=r.x,e.offsetY=r.y,e.width=t.bounds.width/2;var l=this.commandHandler.annotationModule.findAnnotationSettings(t),d=0;l.maxWidth&&(d=l.maxWidth?l.maxWidth:2e3,t.bounds.width>d&&(t.bounds.width=d,e.width=t.bounds.width/2)),this.commandHandler.renderDrawing(void 0,t.pageIndex)},t}(nt),Mt=function(e){function n(t,i,n){var o=e.call(this,t,i)||this;return o.action=n,o}return it(n,e),n.prototype.mouseDown=function(t){if(e.prototype.mouseDown.call(this,t),this.inAction=!0,this.drawingObject){var i=void 0,n=this.drawingObject;i={x:(i=n.vertexPoints[n.vertexPoints.length-1]).x,y:i.y};var o=this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length-1];o.x===i.x&&o.x===i.y||this.drawingObject.vertexPoints.push(i),this.commandHandler.nodePropertyChange(n,{vertexPoints:n.vertexPoints})}else{this.startPoint={x:this.startPosition.x,y:this.startPosition.y};var s={bounds:{x:this.currentPosition.x,y:this.currentPosition.y,width:5,height:5},vertexPoints:[{x:this.startPoint.x/this.pdfViewerBase.getZoomFactor(),y:this.startPoint.y/this.pdfViewerBase.getZoomFactor()},{x:this.currentPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.currentPosition.y/this.pdfViewerBase.getZoomFactor()}],shapeAnnotationType:"Line",fillColor:this.commandHandler.drawingObject.fillColor,strokeColor:this.commandHandler.drawingObject.strokeColor,pageIndex:this.pdfViewerBase.activeElements.activePageID,notes:this.commandHandler.drawingObject.notes,thickness:this.commandHandler.drawingObject.thickness,author:this.commandHandler.drawingObject.author,subject:this.commandHandler.drawingObject.subject,borderDashArray:this.commandHandler.drawingObject.borderDashArray,modifiedDate:this.commandHandler.drawingObject.modifiedDate,borderStyle:this.commandHandler.drawingObject.borderStyle,measureType:this.commandHandler.drawingObject.measureType,enableShapeLabel:this.commandHandler.enableShapeLabel,opacity:this.commandHandler.drawingObject.opacity};this.pdfViewerBase.updateFreeTextProperties(s),this.drawingObject=this.commandHandler.add(s)}},n.prototype.mouseMove=function(t){if(e.prototype.mouseMove.call(this,t),this.inAction&&!1===i.Point.equals(this.currentPosition,this.prevPosition)){this.dragging=!0;var n=this.drawingObject;this.drawingObject&&this.currentPosition&&(n.vertexPoints[n.vertexPoints.length-1].x=this.currentPosition.x/this.pdfViewerBase.getZoomFactor(),n.vertexPoints[n.vertexPoints.length-1].y=this.currentPosition.y/this.pdfViewerBase.getZoomFactor(),this.commandHandler.nodePropertyChange(n,{vertexPoints:n.vertexPoints})),"Perimeter"===n.measureType&&k(n,n.vertexPoints,this.commandHandler.annotation.measureAnnotationModule)}return!0},n.prototype.mouseUp=function(n,o,s){e.prototype.mouseMove.call(this,n);var a;if(n.source&&null!==n.annotationSelectorSettings&&(a=n.source.annotationSelectorSettings),this.drawingObject){var r=new i.Rect(this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length-1].x-20,this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length-1].y-20,40,40),l={x:this.drawingObject.vertexPoints[0].x,y:this.drawingObject.vertexPoints[0].y};if((r.containsPoint(l)||o)&&this.dragging){if(this.inAction&&(this.inAction=!1,this.drawingObject)){if(s||this.drawingObject.vertexPoints.length>2&&this.drawingObject.vertexPoints.splice(this.drawingObject.vertexPoints.length-1,1),"Polygon"===this.action){s?this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length]=this.drawingObject.vertexPoints[0]:this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length-1]=this.drawingObject.vertexPoints[0],this.commandHandler.nodePropertyChange(this.drawingObject,{vertexPoints:this.drawingObject.vertexPoints});var d=m(this.drawingObject);d.shapeAnnotationType="Polygon",d.bounds.width=d.wrapper.actualSize.width,d.bounds.height=d.wrapper.actualSize.height,d.bounds.x=this.drawingObject.wrapper.bounds.x,d.bounds.y=this.drawingObject.wrapper.bounds.y,this.commandHandler.add(d),this.commandHandler.remove(this.drawingObject),this.commandHandler.select([d.id],a);var u=this.commandHandler.selectedItems.annotations[0];u&&(this.commandHandler.enableShapeAnnotation&&(t.isNullOrUndefined(u.measureType)||""===u.measureType)&&this.commandHandler.annotation.shapeAnnotationModule.renderShapeAnnotations(u,u.pageIndex),!this.commandHandler.enableMeasureAnnotation||"Area"!==u.measureType&&"Volume"!==u.measureType||("Area"===u.measureType?(u.notes=this.commandHandler.annotation.measureAnnotationModule.calculateArea(u.vertexPoints),this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(u.annotName,u.notes)):"Volume"===u.measureType&&(u.notes=this.commandHandler.annotation.measureAnnotationModule.calculateVolume(u.vertexPoints),this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(u.annotName,u.notes)),u.enableShapeLabel&&(u.labelContent=u.notes,this.commandHandler.nodePropertyChange(u,{vertexPoints:u.vertexPoints,notes:u.notes})),this.commandHandler.annotation.measureAnnotationModule.renderMeasureShapeAnnotations(u,u.pageIndex)))}else s||o&&this.drawingObject.vertexPoints.splice(this.drawingObject.vertexPoints.length-1,1),this.commandHandler.nodePropertyChange(this.drawingObject,{vertexPoints:this.drawingObject.vertexPoints,sourceDecoraterShapes:this.commandHandler.drawingObject.sourceDecoraterShapes,taregetDecoraterShapes:this.commandHandler.drawingObject.taregetDecoraterShapes}),this.commandHandler.select([this.drawingObject.id],a),this.commandHandler.enableMeasureAnnotation&&"Perimeter"===this.drawingObject.measureType&&(this.commandHandler.renderDrawing(null,this.drawingObject.pageIndex),this.drawingObject.notes=this.commandHandler.annotation.measureAnnotationModule.calculatePerimeter(this.drawingObject),this.drawingObject.enableShapeLabel&&(this.drawingObject.labelContent=this.drawingObject.notes,this.commandHandler.nodePropertyChange(this.drawingObject,{vertexPoints:this.drawingObject.vertexPoints,notes:this.drawingObject.notes})),this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(this.drawingObject.annotName,this.drawingObject.notes),this.commandHandler.annotation.measureAnnotationModule.renderMeasureShapeAnnotations(this.drawingObject,this.drawingObject.pageIndex));var M=this.commandHandler.selectedItems.annotations[0];this.commandHandler.annotation.addAction(this.pageIndex,null,M,"Addition","",M,M),this.drawingObject=null}this.endAction()}else this.inAction&&!this.dragging&&this.commandHandler.remove(this.drawingObject)}},n.prototype.mouseLeave=function(e){this.mouseUp(e,!0,!0)},n.prototype.mouseWheel=function(t){e.prototype.mouseWheel.call(this,t),this.mouseMove(t)},n.prototype.endAction=function(){this.inAction=!1,this.drawingObject=null,this.commandHandler.tool=""},n}(nt),pt=function(e){function t(t,i,n,o){var s=e.call(this,t,i,!0)||this;return s.endPoint=n,s.drawingObject=o,s}return it(t,e),t.prototype.mouseDown=function(t){this.inAction=!0,this.undoElement=void 0,e.prototype.mouseDown.call(this,t);if(t.source&&t.source.annotations&&({x:this.prevPosition.x,y:this.prevPosition.y},this.drawingObject),this.initialPosition=t.position,this.prevSource=this.drawingObject,this.currentPosition=t.position,this.drawingObject){if(!this.dragging){var i={bounds:{x:this.currentPosition.x,y:this.currentPosition.y,width:5,height:5},vertexPoints:[{x:this.startPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.startPosition.y/this.pdfViewerBase.getZoomFactor()},{x:this.currentPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.currentPosition.y/this.pdfViewerBase.getZoomFactor()}],shapeAnnotationType:this.drawingObject.shapeAnnotationType,sourceDecoraterShapes:this.drawingObject.sourceDecoraterShapes,taregetDecoraterShapes:this.drawingObject.taregetDecoraterShapes,fillColor:this.drawingObject.fillColor,strokeColor:this.drawingObject.strokeColor,pageIndex:this.pdfViewerBase.activeElements.activePageID,opacity:this.drawingObject.opacity||1,borderDashArray:this.drawingObject.borderDashArray,thickness:this.drawingObject.thickness,modifiedDate:this.drawingObject.modifiedDate,author:this.drawingObject.author,subject:this.drawingObject.subject,lineHeadEnd:this.drawingObject.lineHeadEnd,lineHeadStart:this.drawingObject.lineHeadStart,measureType:this.commandHandler.drawingObject.measureType,enableShapeLabel:this.commandHandler.enableShapeLabel};this.pdfViewerBase.updateFreeTextProperties(i),this.drawingObject=this.commandHandler.add(i)}}else{var n=this.commandHandler.annotation.measureAnnotationModule,o={vertexPoints:[{x:this.startPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.startPosition.y/this.pdfViewerBase.getZoomFactor()},{x:this.currentPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.currentPosition.y/this.pdfViewerBase.getZoomFactor()}],bounds:{x:this.currentPosition.x,y:this.currentPosition.y,width:5,height:5},sourceDecoraterShapes:this.commandHandler.drawingObject.sourceDecoraterShapes,taregetDecoraterShapes:this.commandHandler.drawingObject.taregetDecoraterShapes,measureType:"Distance",fillColor:this.commandHandler.drawingObject.fillColor,notes:this.commandHandler.drawingObject.notes,strokeColor:this.commandHandler.drawingObject.strokeColor,opacity:this.commandHandler.drawingObject.opacity,thickness:this.commandHandler.drawingObject.thickness,borderDashArray:this.commandHandler.drawingObject.borderDashArray,shapeAnnotationType:"Distance",pageIndex:this.pdfViewerBase.activeElements.activePageID,author:this.commandHandler.drawingObject.author,subject:this.commandHandler.drawingObject.subject,enableShapeLabel:this.commandHandler.enableShapeLabel,leaderHeight:n.leaderLength};this.pdfViewerBase.updateFreeTextProperties(o),this.drawingObject=this.commandHandler.add(o)}},t.prototype.mouseUp=function(t){if(this.dragging){if(e.prototype.mouseMove.call(this,t),this.commandHandler){var i=void 0;i=t.source&&null!==t.annotationSelectorSettings?t.source.annotationSelectorSettings:"";var n=this.drawingObject;this.commandHandler.nodePropertyChange(n,{vertexPoints:n.vertexPoints,leaderHeight:n.leaderHeight}),this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.commandHandler.select([n.id],i),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,i)}this.endPoint&&this.endPoint.indexOf("ConnectorSegmentPoint")>-1&&this.dragging&&(this.commandHandler.annotation.updateCalibrateValues(this.drawingObject),this.commandHandler.annotation.addAction(this.pageIndex,null,this.drawingObject,"Addition","",this.drawingObject,this.drawingObject),this.drawingObject=null,this.dragging=!1,e.prototype.mouseUp.call(this,t)),this.drawingObject&&(this.endPoint="ConnectorSegmentPoint_1")}else this.drawingObject&&this.commandHandler.remove(this.drawingObject)},t.prototype.mouseMove=function(t){if(e.prototype.mouseMove.call(this,t),this.inAction&&!1===i.Point.equals(this.currentPosition,this.prevPosition)){if(this.currentPosition=t.position,this.dragging=!0,this.currentPosition&&this.prevPosition){var n=this.currentPosition.x-this.prevPosition.x,o=this.currentPosition.y-this.prevPosition.y;this.drawingObject;var s=void 0;s=t.source&&null!==t.annotationSelectorSettings?t.source.annotationSelectorSettings:"",(this.inAction&&this.commandHandler&&this.drawingObject&&void 0!==this.endPoint&&0!==n||0!==o)&&(this.blocked=!this.commandHandler.dragConnectorEnds(this.endPoint,this.drawingObject,this.currentPosition,this.selectedSegment,t.target,null,s),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,s))}this.prevPosition=this.currentPosition}return!this.blocked},t.prototype.mouseLeave=function(e){this.mouseUp(e)},t.prototype.endAction=function(){e.prototype.endAction.call(this),this.prevPosition=null,this.endPoint=null},t}(nt),ht=function(e){function t(t,i){return e.call(this,t,i,!0)||this}return it(t,e),t.prototype.mouseDown=function(t){var i=m(t.source);this.undoElement={bounds:{x:i.wrapper.offsetX,y:i.wrapper.offsetY,width:i.wrapper.actualSize.width,height:i.wrapper.actualSize.height},rotateAngle:i.rotateAngle},e.prototype.mouseDown.call(this,t)},t.prototype.mouseUp=function(t){var i;i=t.source;var n;if(this.undoElement.rotateAngle!==i.wrapper.rotateAngle){i.wrapper.rotateAngle;m(t.source);var o=t.source.annotations[0].annotationSelectorSettings;this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,o),n={bounds:{x:t.source.wrapper.offsetX,y:t.source.wrapper.offsetY,width:t.source.wrapper.actualSize.width,height:t.source.wrapper.actualSize.height},rotateAngle:t.source.wrapper.rotateAngle}}this.commandHandler.annotation.addAction(this.pageIndex,null,t.source,"Rotate","",this.undoElement,n),this.commandHandler.annotation.stampAnnotationModule.updateSessionStorage(t.source,null,"Rotate"),this.commandHandler.annotation.stickyNotesAnnotationModule.updateStickyNotes(t.source,null),e.prototype.mouseUp.call(this,t)},t.prototype.mouseMove=function(t){e.prototype.mouseMove.call(this,t);var n;n=t.source;var o=t.source.annotations[0].annotationSelectorSettings;if(this.currentPosition=t.position,n.wrapper){var s={x:n.wrapper.offsetX,y:n.wrapper.offsetY},a=i.Point.findAngle(s,this.currentPosition)+90;a=(a+360)%360;n.wrapper.rotateAngle;this.blocked=!this.commandHandler.rotate(a-n.wrapper.rotateAngle,o)}return!this.blocked},t.prototype.getTooltipContent=function(e){return Math.round(e.rotateAngle%360).toString()+"°"},t.prototype.mouseLeave=function(e){this.mouseUp(e)},t.prototype.endAction=function(){e.prototype.endAction.call(this)},t}(nt),Lt=function(){function e(){this.activePage=void 0,this.activePageID=void 0}return Object.defineProperty(e.prototype,"activePageID",{get:function(){return this.activePage},set:function(e){this.activePage=e,this.activePage},enumerable:!0,configurable:!0}),e}();!function(e){e[e.None=1]="None",e[e.Accepted=2]="Accepted",e[e.Canceled=3]="Canceled",e[e.Completed=4]="Completed",e[e.Rejected=5]="Rejected"}(e.CommentStatus||(e.CommentStatus={})),function(e){e[e.None=0]="None",e[e.Bold=1]="Bold",e[e.Italic=2]="Italic",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough"}(e.FontStyle||(e.FontStyle={})),function(e){e[e.Copy=0]="Copy",e[e.Highlight=1]="Highlight",e[e.Cut=2]="Cut",e[e.Underline=4]="Underline",e[e.Paste=8]="Paste",e[e.Delete=16]="Delete",e[e.ScaleRatio=32]="ScaleRatio",e[e.Strikethrough=64]="Strikethrough",e[e.Properties=128]="Properties",e[e.Comment=256]="Comment"}(e.ContextMenuItem||(e.ContextMenuItem={})),function(e){e.Draw="Draw",e.Type="Type",e.Image="Image"}(e.SignatureType||(e.SignatureType={})),function(e){e[e.Corners=1]="Corners",e[e.Edges=2]="Edges"}(e.AnnotationResizerLocation||(e.AnnotationResizerLocation={})),function(e){e.auto="auto",e.crossHair="crosshair",e.e_resize="e-resize",e.ew_resize="ew-resize",e.grab="grab",e.grabbing="grabbing",e.move="move",e.n_resize="n-resize",e.ne_resize="ne-resize",e.ns_resize="ns-resize",e.nw_resize="nw-resize",e.pointer="pointer",e.s_resize="s-resize",e.se_resize="se-resize",e.sw_resize="sw-resize",e.text="text",e.w_resize="w-resize"}(e.CursorType||(e.CursorType={})),function(e){e.Revised="Revised",e.Reviewed="Reviewed",e.Received="Received",e.Approved="Approved",e.Confidential="Confidential",e.NotApproved="NotApproved"}(e.DynamicStampItem||(e.DynamicStampItem={})),function(e){e.Witness="Witness",e.InitialHere="InitialHere",e.SignHere="SignHere",e.Accepted="Accepted",e.Rejected="Rejected"}(e.SignStampItem||(e.SignStampItem={})),function(e){e.Approved="Approved",e.NotApproved="NotApproved",e.Draft="Draft",e.Final="Final",e.Completed="Completed",e.Confidential="Confidential",e.ForPublicRelease="ForPublicRelease",e.NotForPublicRelease="NotForPublicRelease",e.ForComment="ForComment",e.Void="Void",e.PreliminaryResults="PreliminaryResults",e.InformationOnly="InformationOnly"}(e.StandardBusinessStampItem||(e.StandardBusinessStampItem={})),function(e){e.Select="Select",e.Move="Move",e.Resize="Resize",e.Delete="Delete",e.None="None",e.PropertyChange="PropertyChange"}(e.AllowedInteraction||(e.AllowedInteraction={})),function(e){e.Json="Json",e.Xfdf="Xfdf"}(e.AnnotationDataFormat||(e.AnnotationDataFormat={}));var wt=function(){function i(e,t){this.inputBoxCount=0,this.isFreeTextValueChange=!1,this.isAddAnnotationProgramatically=!1,this.isInuptBoxInFocus=!1,this.freeTextPageNumbers=[],this.selectedText="",this.isTextSelected=!1,this.selectionStart=0,this.selectionEnd=0,this.isBold=!1,this.isItalic=!1,this.isUnderline=!1,this.isStrikethrough=!1,this.isReadonly=!1,this.previousText="Type Here",this.pdfViewer=e,this.pdfViewerBase=t,this.updateTextProperties(),this.inputBoxElement=document.createElement("textarea"),this.inputBoxElement.style.position="absolute",this.inputBoxElement.style.Width=this.defautWidth,this.inputBoxElement.style.Height=this.defaultHeight,this.inputBoxElement.style.zIndex="5",this.inputBoxElement.style.fontSize=this.fontSize+"px",this.inputBoxElement.className="free-text-input",this.inputBoxElement.style.resize="none",this.inputBoxElement.style.borderColor=this.borderColor,this.inputBoxElement.style.background=this.fillColor,this.inputBoxElement.style.borderStyle=this.borderStyle,this.inputBoxElement.style.borderWidth=this.borderWidth+"px",this.inputBoxElement.style.padding="2px",this.inputBoxElement.style.borderRadius="2px",this.inputBoxElement.style.fontFamily=this.fontFamily,this.inputBoxElement.style.color=this.pdfViewer.freeTextSettings.fontColor?this.pdfViewer.freeTextSettings.fontColor:"#000",this.inputBoxElement.style.overflow="hidden",this.inputBoxElement.style.wordBreak="break-all",this.inputBoxElement.readOnly=this.isReadonly,this.inputBoxElement.addEventListener("focusout",this.onFocusOutInputBox.bind(this)),this.inputBoxElement.addEventListener("keydown",this.onKeyDownInputBox.bind(this)),this.inputBoxElement.addEventListener("mouseup",this.onMouseUpInputBox.bind(this)),this.freeTextPageNumbers=[]}return i.prototype.updateTextProperties=function(){this.defautWidth=this.pdfViewer.freeTextSettings.width?this.pdfViewer.freeTextSettings.width:151,this.defaultHeight=this.pdfViewer.freeTextSettings.height?this.pdfViewer.freeTextSettings.height:24.6,this.borderColor=this.pdfViewer.freeTextSettings.borderColor?this.pdfViewer.freeTextSettings.borderColor:"#ffffff00",this.fillColor=this.pdfViewer.freeTextSettings.fillColor?this.pdfViewer.freeTextSettings.fillColor:"#fff",this.borderStyle=this.pdfViewer.freeTextSettings.borderStyle?this.pdfViewer.freeTextSettings.borderStyle:"solid",this.borderWidth=this.pdfViewer.freeTextSettings.borderWidth?this.pdfViewer.freeTextSettings.borderWidth:1,this.fontSize=this.pdfViewer.freeTextSettings.fontSize?this.pdfViewer.freeTextSettings.fontSize:16,this.opacity=this.pdfViewer.freeTextSettings.opacity?this.pdfViewer.freeTextSettings.opacity:1,this.fontColor=this.pdfViewer.freeTextSettings.fontColor?this.pdfViewer.freeTextSettings.fontColor:"#000",this.author="Guest"!==this.pdfViewer.freeTextSettings.author?this.pdfViewer.freeTextSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest",this.fontFamily=this.pdfViewer.freeTextSettings.fontFamily?this.pdfViewer.freeTextSettings.fontFamily:"Helvetica",this.textAlign=this.pdfViewer.freeTextSettings.textAlignment?this.pdfViewer.freeTextSettings.textAlignment:"Left",this.defaultText=this.pdfViewer.freeTextSettings.defaultText?this.pdfViewer.freeTextSettings.defaultText:"Type here",this.isReadonly=!1,(this.pdfViewer.freeTextSettings.isLock||this.pdfViewer.annotationSettings.isLock||this.pdfViewer.freeTextSettings.isReadonly)&&(this.isReadonly=!0),1===this.pdfViewer.freeTextSettings.fontStyle?this.isBold=!0:2===this.pdfViewer.freeTextSettings.fontStyle?this.isItalic=!0:4===this.pdfViewer.freeTextSettings.fontStyle?this.isUnderline=!0:8===this.pdfViewer.freeTextSettings.fontStyle?this.isStrikethrough=!0:3===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isItalic=!0):5===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isUnderline=!0):9===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isStrikethrough=!0):7===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isItalic=!0,this.isUnderline=!0):11===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isItalic=!0,this.isStrikethrough=!0):14===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isUnderline=!0,this.isStrikethrough=!0):6===this.pdfViewer.freeTextSettings.fontStyle&&(this.isUnderline=!0,this.isItalic=!0)},i.prototype.renderFreeTextAnnotations=function(e,t,i){var n=!1;if(!i)for(var o=0;o<this.freeTextPageNumbers.length;o++)if(this.freeTextPageNumbers[o]===t){n=!0;break}if(e&&!n&&e.length>=1){this.freeTextPageNumbers.push(t);for(var s=0;s<e.length;s++){var a=e[s];if(a.annotationAddMode=this.pdfViewer.annotationModule.findAnnotationMode(a,t,a.AnnotType),a.AnnotType){var r=null;if(a.VertexPoints){r=[];for(var l=0;l<a.VertexPoints.length;l++){var d={x:a.VertexPoints[l].X,y:a.VertexPoints[l].Y};r.push(d)}}a.AnnotationSettings=a.AnnotationSettings?a.AnnotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.freeTextSettings);var u=void 0,M=Math.abs(a.Rotate),p=a.Bounds.X?a.Bounds.X:a.Bounds.x,h=a.Bounds.Y?a.Bounds.Y:a.Bounds.y,L=a.Bounds.Width?a.Bounds.Width:a.Bounds.width,w=a.Bounds.Height?a.Bounds.Height:a.Bounds.height;90!==M&&270!==M||(a.Bounds.Width=w,a.Bounds.Height=L,h=(p=p+w-w/2)+L-w/2);var c=!0;c="Imported Annotation"===a.annotationAddMode?a.IsPrint:a.AnnotationSettings.isPrint,a.allowedInteractions=a.AllowedInteractions?a.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(a),u={author:a.Author,modifiedDate:a.ModifiedDate,subject:a.Subject,id:"freetext"+this.inputBoxCount,rotateAngle:a.Rotate,dynamicText:a.MarkupText,strokeColor:a.StrokeColor,thickness:a.Thickness,fillColor:a.FillColor,bounds:{x:p,y:h,left:p,top:h,width:L,height:w,right:a.Bounds.Right,bottom:a.Bounds.Bottom},annotName:a.AnnotName,shapeAnnotationType:"FreeText",pageIndex:t,opacity:a.Opacity,fontColor:a.FontColor,fontSize:a.FontSize,fontFamily:a.FontFamily,notes:a.MarkupText,textAlign:a.TextAlign,comments:this.pdfViewer.annotationModule.getAnnotationComments(a.Comments,a,a.Author),review:{state:a.State,stateModel:a.StateModel,modifiedDate:a.ModifiedDate,author:a.Author},font:{isBold:a.Font.Bold,isItalic:a.Font.Italic,isStrikeout:a.Font.Strikeout,isUnderline:a.Font.Underline},annotationSelectorSettings:this.getSettings(a),annotationSettings:a.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(a),annotationAddMode:a.annotationAddMode,allowedInteractions:a.allowedInteractions,isPrint:c,isCommentLock:a.IsCommentLock,isReadonly:a.IsReadonly},i&&(u.id=a.AnnotName,u.previousFontSize=a.FontSize?a.FontSize:this.fontSize);var C=this.pdfViewer.add(u);if(this.pdfViewer.annotationModule.storeAnnotations(t,u,"_annotations_freetext"),this.isAddAnnotationProgramatically){var g={opacity:u.opacity,borderColor:u.strokeColor,borderWidth:u.thickness,author:a.author,subject:a.subject,modifiedDate:a.modifiedDate,fillColor:u.fillColor,fontSize:u.fontSize,width:u.bounds.width,height:u.bounds.height,fontColor:u.fontColor,fontFamily:u.fontFamily,defaultText:u.dynamicText,fontStyle:u.font,textAlignment:u.textAlign};this.pdfViewer.fireAnnotationAdd(u.pageIndex,u.annotName,"FreeText",u.bounds,g)}this.inputBoxCount+=1,this.pdfViewer.annotation.freeTextAnnotationModule.isFreeTextValueChange=!0,this.pdfViewer.nodePropertyChange(C,{}),this.pdfViewer.annotation.freeTextAnnotationModule.isFreeTextValueChange=!1}}}},i.prototype.getSettings=function(e){var t=this.pdfViewer.annotationSelectorSettings;return e.AnnotationSelectorSettings?t=e.AnnotationSelectorSettings:this.pdfViewer.freeTextSettings.annotationSelectorSettings&&(t=this.pdfViewer.freeTextSettings.annotationSelectorSettings),t},i.prototype.setAnnotationType=function(e){switch(this.pdfViewerBase.disableTextSelectionMode(),e){case"FreeText":this.currentAnnotationMode="FreeText",this.updateTextProperties();var t=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();this.pdfViewer.drawingObject={shapeAnnotationType:"FreeText",strokeColor:this.borderColor,fillColor:this.fillColor,opacity:this.opacity,notes:"",isCommentLock:!1,thickness:this.borderWidth,borderDashArray:"0",modifiedDate:t,author:this.pdfViewer.freeTextSettings.author,subject:"Text Box",font:{isBold:this.isBold,isItalic:this.isItalic,isStrikeout:this.isStrikethrough,isUnderline:this.isUnderline},textAlign:this.textAlign},this.pdfViewer.tool="Select"}},i.prototype.modifyInCollection=function(e,t,i,n){n||(this.pdfViewer.isDocumentEdited=!0);var o=null,s=this.getAnnotations(t,null);if(null!=s&&i){for(var a=0;a<s.length;a++)if(i.id===s[a].id){if("bounds"===e)s[a].bounds={left:i.bounds.x,top:i.bounds.y,width:i.bounds.width,height:i.bounds.height,right:i.bounds.right,bottom:i.bounds.bottom};else if("fill"===e)s[a].fillColor=i.wrapper.children[0].style.fill;else if("stroke"===e)s[a].strokeColor=i.wrapper.children[0].style.strokeColor;else if("opacity"===e)s[a].opacity=i.wrapper.children[0].style.opacity;else if("thickness"===e)s[a].thickness=i.wrapper.children[0].style.strokeWidth;else if("notes"===e)s[a].note=i.notes;else{if("delete"===e){o=s.splice(a,1)[0];break}"dynamicText"===e?s[a].dynamicText=i.dynamicText:"fontColor"===e?s[a].fontColor=i.fontColor:"fontSize"===e?s[a].fontSize=i.fontSize:"fontFamily"===e?s[a].fontFamily=i.fontFamily:"textPropertiesChange"===e?s[a].font={isBold:i.font.isBold,isItalic:i.font.isItalic,isStrikeout:i.font.isStrikeout,isUnderline:i.font.isUnderline}:"textAlign"===e&&(s[a].textAlign=i.textAlign)}s[a].modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.pdfViewer.annotationModule.storeAnnotationCollections(s[a],t)}this.manageAnnotations(s,t)}return o},i.prototype.addInCollection=function(e,t){if(t){var i=this.getAnnotations(e,null);i&&i.push(t),this.manageAnnotations(i,e)}},i.prototype.saveFreeTextAnnotations=function(){var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_freetext");this.pdfViewerBase.isStorageExceed&&(e=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_freetext"]);for(var t=new Array,i=0;i<this.pdfViewerBase.pageCount;i++)t[i]=[];if(e&&!this.pdfViewer.annotationSettings.skipDownload)for(var n=JSON.parse(e),o=0;o<n.length;o++){var s=[],a=n[o];if(a){for(var r=0;a.annotations.length>r;r++){this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));var l=a.annotations[r].strokeColor;a.annotations[r].strokeColor=JSON.stringify(this.getRgbCode(l));var d=a.annotations[r].fillColor;a.annotations[r].fillColor=JSON.stringify(this.getRgbCode(d));var u=a.annotations[r].fontColor;a.annotations[r].fontColor=JSON.stringify(this.getRgbCode(u)),a.annotations[r].vertexPoints=JSON.stringify(a.annotations[r].vertexPoints),null!==a.annotations[r].rectangleDifference&&(a.annotations[r].rectangleDifference=JSON.stringify(a.annotations[r].rectangleDifference))}s=a.annotations}t[a.pageIndex]=s}return JSON.stringify(t)},i.prototype.manageAnnotations=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_freetext");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_freetext"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_freetext");var o=this.pdfViewer.annotationModule.getPageCollection(n,t);n[o]&&(n[o].annotations=e);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_freetext"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_freetext",s)}},i.prototype.getAnnotations=function(e,t){var i,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_freetext");if(this.pdfViewerBase.isStorageExceed&&(n=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_freetext"]),n){var o=JSON.parse(n),s=this.pdfViewer.annotationModule.getPageCollection(o,e);i=o[s]?o[s].annotations:t}else i=t;return i},i.prototype.getRgbCode=function(e){e.match(/#([a-z0-9]+)/gi)||e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(e=this.pdfViewer.annotationModule.nameToHash(e));var i=e.split(",");return t.isNullOrUndefined(i[1])&&(i=(e=this.pdfViewer.annotationModule.getValue(e,"rgba")).split(",")),{r:parseInt(i[0].split("(")[1]),g:parseInt(i[1]),b:parseInt(i[2]),a:parseInt(i[3])}},i.prototype.onFocusOutInputBox=function(){if(this.pdfViewerBase.isFreeTextContextMenu)this.inputBoxElement.focus(),this.isTextSelected||window.getSelection().removeAllRanges();else{this.pdfViewer.fireBeforeAddFreeTextAnnotation(this.inputBoxElement.value);var e=this.pdfViewerBase.currentPageNumber-1,t=this.pdfViewerBase.getElement("_pageDiv_"+e),i=parseFloat(this.inputBoxElement.style.height),n=parseFloat(this.inputBoxElement.style.width),o=parseFloat(this.inputBoxElement.style.left);this.pdfViewerBase.isMixedSizeDocument&&(o-=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+e).offsetLeft);var s=parseFloat(this.inputBoxElement.style.top),a=this.pdfViewerBase.getZoomFactor();this.pdfViewer.isValidFreeText&&(this.inputBoxElement.value="Type Here",this.pdfViewer.isValidFreeText=!1);var r=this.inputBoxElement.value,l=!1;if(!0===this.isNewFreeTextAnnot){var d=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),u=this.pdfViewer.annotation.createGUID();this.isNewFreeTextAnnot=!1,l=!0;var M=void 0,p=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("freeText",e+1);p&&(document.getElementById(p).id=u);var h=this.pdfViewer.freeTextSettings.annotationSelectorSettings?this.pdfViewer.freeTextSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,L=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.freeTextSettings);this.author=this.author?this.author:this.pdfViewer.freeTextSettings.author?this.pdfViewer.freeTextSettings.author:"Guest";var w=this.pdfViewer.freeTextSettings.allowedInteractions?this.pdfViewer.freeTextSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions;M={author:this.author,modifiedDate:d,subject:"Text Box",id:"free_text"+this.inputBoxCount,rotateAngle:0,dynamicText:r,strokeColor:this.borderColor,thickness:this.borderWidth,fillColor:this.fillColor,bounds:{left:o/a,top:s/a,x:o/a,y:s/a,width:n,height:i},annotName:u,shapeAnnotationType:"FreeText",pageIndex:e,fontColor:this.fontColor,fontSize:this.fontSize,fontFamily:this.fontFamily,opacity:this.opacity,comments:[],textAlign:this.textAlign,font:{isBold:this.isBold,isItalic:this.isItalic,isStrikeout:this.isStrikethrough,isUnderline:this.isUnderline},review:{state:"Unmarked",stateModel:"None",modifiedDate:d,author:this.author},annotationSelectorSettings:h,annotationSettings:L,customData:this.pdfViewer.annotationModule.getData("FreeText"),isPrint:this.pdfViewer.freeTextSettings.isPrint,allowedInteractions:w,isReadonly:this.isReadonly},this.pdfViewer.enableRtl&&(M.textAlign="Right");var c=this.pdfViewer.add(M),C={left:M.bounds.x,top:M.bounds.y,width:M.bounds.width,height:M.bounds.height},g={opacity:M.opacity,borderColor:M.strokeColor,borderWidth:M.thickness,author:c.author,subject:c.subject,modifiedDate:c.modifiedDate,fillColor:M.fillColor,fontSize:M.fontSize,width:M.bounds.width,height:M.bounds.height,fontColor:M.fontColor,fontFamily:M.fontFamily,defaultText:M.dynamicText,fontStyle:M.font,textAlignment:M.textAlign};this.pdfViewer.annotation.storeAnnotations(e,M,"_annotations_freetext"),this.pdfViewer.fireAnnotationAdd(M.pageIndex,M.annotName,"FreeText",C,g),this.pdfViewer.annotation.addAction(e,null,M,"Addition","",M,M),this.pdfViewer.renderSelector(M.pageIndex),this.pdfViewer.clearSelection(M.pageIndex),this.pdfViewer.isDocumentEdited=!0,this.selectedAnnotation=c}if(this.isInuptBoxInFocus=!1,this.selectedAnnotation&&this.pdfViewer.selectedItems.annotations){n=(n-1)/a;var m=(i=(i-1)/a)-this.selectedAnnotation.bounds.height,f=void 0;m>0&&(f=(f=this.selectedAnnotation.wrapper.offsetY+m/2)>0?f:void 0),this.selectedAnnotation.bounds.width=n,this.selectedAnnotation.bounds.height=i,this.pdfViewer.annotation.modifyDynamicTextValue(r,this.selectedAnnotation.annotName),this.selectedAnnotation.dynamicText=r,this.modifyInCollection("dynamicText",e,this.selectedAnnotation,l),this.pdfViewer.nodePropertyChange(this.selectedAnnotation,{bounds:{width:this.selectedAnnotation.bounds.width,height:this.selectedAnnotation.bounds.height,y:f}});var y=document.getElementById(this.selectedAnnotation.annotName);y&&y.childNodes&&(y.childNodes[0].ej2_instances?y.childNodes[0].ej2_instances[0].value=r:y.childNodes[0].childNodes&&y.childNodes[0].childNodes[1].ej2_instances&&(y.childNodes[0].childNodes[1].ej2_instances[0].value=r)),this.pdfViewer.renderSelector(this.selectedAnnotation.pageIndex,this.selectedAnnotation.annotationSelectorSettings)}this.isNewFreeTextAnnot=!1,this.inputBoxElement.parentElement&&(t&&t.id===this.inputBoxElement.parentElement.id?t.removeChild(this.inputBoxElement):this.inputBoxElement.parentElement.removeChild(this.inputBoxElement));var j=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+e);this.pdfViewer.renderDrawing(j,e),this.inputBoxCount+=1,l||this.previousText===r||this.pdfViewer.annotationModule.triggerAnnotationPropChange(this.selectedAnnotation,!1,!1,!1,!1,!1,!1,!1,!0,this.previousText,r)}},i.prototype.onKeyDownInputBox=function(e){this.selectedAnnotation=this.pdfViewer.selectedItems.annotations?this.pdfViewer.selectedItems.annotations[0]:this.selectedAnnotation;var t=this;9===e.which&&e.preventDefault(),setTimeout(function(){t.defaultHeight<t.inputBoxElement.scrollHeight&&parseInt(t.inputBoxElement.style.height)<t.inputBoxElement.scrollHeight?t.updateFreeTextAnnotationSize(!0):t.updateFreeTextAnnotationSize(!1)},0)},i.prototype.updateFreeTextAnnotationSize=function(e){var t=this;e||t.inputBoxElement.readOnly||(t.inputBoxElement.style.height="auto"),t.inputBoxElement.style.height=t.inputBoxElement.readOnly?t.inputBoxElement.style.height:t.inputBoxElement.scrollHeight+5+"px";var i=parseFloat(this.inputBoxElement.style.height),n=parseFloat(this.inputBoxElement.style.width);if(i=(i-1)/t.pdfViewerBase.getZoomFactor(),n=(n-1)/t.pdfViewerBase.getZoomFactor(),this.selectedAnnotation){var o=i-t.selectedAnnotation.bounds.height,s=0;o>0?s=t.selectedAnnotation.wrapper.offsetY+o/2:(o=Math.abs(o),s=t.selectedAnnotation.wrapper.offsetY-o/2),t.selectedAnnotation.bounds.width=n,t.selectedAnnotation.bounds.height=i,t.pdfViewer.nodePropertyChange(t.selectedAnnotation,{bounds:{width:t.selectedAnnotation.bounds.width,height:t.selectedAnnotation.bounds.height,y:s}}),t.pdfViewer.renderSelector(t.selectedAnnotation.pageIndex,this.selectedAnnotation.annotationSelectorSettings)}},i.prototype.onMouseUpInputBox=function(e){var t=e.target;this.selectionStart=0,this.selectionEnd=0,3===e.which&&t&&(this.selectionStart=t.selectionStart,this.selectionEnd=t.selectionEnd),3===e.which&&null!=window.getSelection()&&""!==window.getSelection().toString()?this.isTextSelected=!0:this.isTextSelected=!1},i.prototype.addInuptElemet=function(e,i,n){void 0===i&&(i=null),t.isNullOrUndefined(n)&&(n=this.pdfViewerBase.currentPageNumber-1),i&&(n=i.pageIndex),this.inputBoxElement.id=this.pdfViewer.element.id+"_freeText_"+n+"_"+this.inputBoxCount;var o=this.pdfViewerBase.getElement("_pageDiv_"+n),s=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+n),a=this.pdfViewerBase.getZoomFactor();this.inputBoxElement.value=i&&i.dynamicText?i.dynamicText:this.defaultText,this.inputBoxElement.style.boxSizing="border-box",this.inputBoxElement.style.left=e.x+"px",this.inputBoxElement.style.top=e.y+"px",i?this.applyFreetextStyles(a,i.isReadonly):this.applyFreetextStyles(a),this.isBold?this.inputBoxElement.style.fontWeight="bold":this.inputBoxElement.style.fontWeight="normal",this.isItalic?this.inputBoxElement.style.fontStyle="italic":this.inputBoxElement.style.fontStyle="normal",this.inputBoxElement.style.textDecoration="none",this.isUnderline&&(this.inputBoxElement.style.textDecoration="underline"),this.isStrikethrough&&(this.inputBoxElement.style.textDecoration="line-through"),this.pdfViewer.enableRtl?(this.inputBoxElement.style.textAlign="right",this.inputBoxElement.style.direction="rtl",this.inputBoxElement.style.left=e.x-this.defautWidth*a/2):this.inputBoxElement.style.textAlign=this.textAlign.toLowerCase(),this.inputBoxElement.style.borderColor=this.borderColor,this.inputBoxElement.style.color=this.fontColor,this.inputBoxElement.style.background=this.fillColor,i&&i.wrapper&&i.wrapper.children[0]&&(this.inputBoxElement.style.opacity=i.wrapper.children[0].style.opacity),!0===this.isNewFreeTextAnnot&&this.pdfViewer.clearSelection(n),i&&i.wrapper&&i.wrapper.bounds&&(i.wrapper.bounds.left&&(this.inputBoxElement.style.left=i.wrapper.bounds.left*a+"px"),i.wrapper.bounds.top&&(this.inputBoxElement.style.top=i.wrapper.bounds.top*a+"px"),this.inputBoxElement.style.height=i.wrapper.bounds.height?i.wrapper.bounds.height*a+1+"px":this.defaultHeight*a+"px",this.inputBoxElement.style.width=i.wrapper.bounds.width?i.wrapper.bounds.width*a+1+"px":this.defautWidth*a+"px",this.selectedAnnotation=i,this.previousText=this.selectedAnnotation.dynamicText,this.selectedAnnotation.dynamicText="",this.inputBoxElement.style.borderColor=this.selectedAnnotation.strokeColor,this.inputBoxElement.style.color=this.selectedAnnotation.fontColor,this.inputBoxElement.style.background=this.selectedAnnotation.fillColor,!0===this.selectedAnnotation.font.isBold&&(this.inputBoxElement.style.fontWeight="bold"),!0===this.selectedAnnotation.font.isItalic&&(this.inputBoxElement.style.fontStyle="italic"),!0===this.selectedAnnotation.font.isUnderline&&(this.inputBoxElement.style.textDecoration="underline"),!0===this.selectedAnnotation.font.isStrikeout&&(this.inputBoxElement.style.textDecoration="line-through"),this.pdfViewer.enableRtl?(this.inputBoxElement.style.textAlign="right",this.inputBoxElement.style.direction="rtl"):this.selectedAnnotation.textAlign&&(this.inputBoxElement.style.textAlign=this.selectedAnnotation.textAlign),this.inputBoxElement.style.fontSize=this.selectedAnnotation.fontSize*a+"px",this.inputBoxElement.style.fontFamily=this.selectedAnnotation.fontFamily,this.pdfViewer.nodePropertyChange(this.selectedAnnotation,{})),this.pdfViewerBase.isMixedSizeDocument&&(this.inputBoxElement.style.left=e.x+s.offsetLeft+"px"),this.pdfViewer.annotation.freeTextAnnotationModule.isFreeTextValueChange=!1,o.appendChild(this.inputBoxElement),this.defaultHeight<this.inputBoxElement.scrollHeight&&parseInt(this.inputBoxElement.style.height)<this.inputBoxElement.scrollHeight&&(this.inputBoxElement.style.height=this.inputBoxElement.scrollHeight+5+"px"),this.isInuptBoxInFocus=!0,this.inputBoxElement.focus(),!0!==this.isNewFreeTextAnnot&&this.inputBoxElement.value!==this.defaultText||this.inputBoxElement.select()},i.prototype.applyFreetextStyles=function(e,i){this.inputBoxElement.style.height=this.defaultHeight*e+"px",this.inputBoxElement.style.width=this.defautWidth*e+"px",this.inputBoxElement.style.borderWidth=this.borderWidth*e+"px",this.inputBoxElement.style.fontSize=this.fontSize*e+"px",this.inputBoxElement.readOnly=t.isNullOrUndefined(i)?this.isReadonly:i},i.prototype.copySelectedText=function(){if(null!==window.getSelection()){this.selectedText=window.getSelection().toString();var e=document.createElement("textarea");e.contentEditable="true",e.textContent=this.selectedText,e.style.position="fixed",document.body.appendChild(e),e.select();try{document.execCommand("copy")}catch(e){console.warn("Copy to clipboard failed.",e)}finally{e&&document.body.removeChild(e)}}},i.prototype.pasteSelectedText=function(e){if(""!==this.selectedText&&e){var t=e.value;e.value=t.slice(0,this.selectionStart)+this.selectedText+t.slice(this.selectionEnd,t.length)}var i=event;this.onKeyDownInputBox(i)},i.prototype.cutSelectedText=function(e){if(null!==window.getSelection()){var t=e.value;this.selectedText=window.getSelection().toString(),e.value=t.slice(0,e.selectionStart)+t.slice(e.selectionEnd);var i=document.createElement("textarea");i.contentEditable="true",i.textContent=this.selectedText,i.style.position="fixed",document.body.appendChild(i),i.select();try{document.execCommand("cut")}catch(e){console.warn("Copy to clipboard failed.",e)}finally{i&&document.body.removeChild(i)}}},i.prototype.saveImportedFreeTextAnnotations=function(e,t){var i=e;if(i.AnnotType){var n=null;if(i.VertexPoints){n=[];for(var o=0;o<i.VertexPoints.length;o++){var s={x:i.VertexPoints[o].X,y:i.VertexPoints[o].Y};n.push(s)}}i.AnnotationSettings=i.AnnotationSettings?i.AnnotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.freeTextSettings);var a=void 0;i.allowedInteractions=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(i);var r=i.Bounds.X?i.Bounds.X:i.Bounds.x,l=i.Bounds.Y?i.Bounds.Y:i.Bounds.y,d=i.Bounds.Width?i.Bounds.Width:i.Bounds.width,u=i.Bounds.Height?i.Bounds.Height:i.Bounds.height;a={author:i.Author,allowedInteractions:i.allowedInteractions,modifiedDate:i.ModifiedDate,subject:i.Subject,id:"freetext",rotateAngle:i.Rotate,dynamicText:i.MarkupText,strokeColor:i.StrokeColor,thickness:i.Thickness,fillColor:i.FillColor,bounds:{x:r,y:l,left:r,top:l,width:d,height:u,right:i.Bounds.Right,bottom:i.Bounds.Bottom},annotName:i.AnnotName,shapeAnnotationType:"FreeText",pageIndex:t,opacity:i.Opacity,fontColor:i.FontColor,fontSize:i.FontSize,fontFamily:i.FontFamily,notes:i.MarkupText,textAlign:i.TextAlign,comments:this.pdfViewer.annotationModule.getAnnotationComments(i.Comments,i,i.Author),review:{state:i.State,stateModel:i.StateModel,modifiedDate:i.ModifiedDate,author:i.Author},font:{isBold:i.Font.Bold,isItalic:i.Font.Italic,isStrikeout:i.Font.Strikeout,isUnderline:i.Font.Underline},annotationSelectorSettings:this.getSettings(i),annotationSettings:i.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(i),isPrint:i.IsPrint,isCommentLock:i.IsCommentLock,isReadonly:i.IsReadonly},this.pdfViewer.annotationModule.storeAnnotations(t,a,"_annotations_freetext")}},i.prototype.updateFreeTextAnnotationCollections=function(e,t){var i=e;if(i.AnnotType){var n=null;if(i.VertexPoints){n=[];for(var o=0;o<i.VertexPoints.length;o++){var s={x:i.VertexPoints[o].X,y:i.VertexPoints[o].Y};n.push(s)}}i.AnnotationSettings=i.AnnotationSettings?i.AnnotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.freeTextSettings),i.IsLocked&&(i.AnnotationSettings.isLock=i.IsLocked),i.allowedInteractions=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(i);var a=i.Bounds.X?i.Bounds.X:i.Bounds.x,r=i.Bounds.Y?i.Bounds.Y:i.Bounds.y,l=i.Bounds.Width?i.Bounds.Width:i.Bounds.width,d=i.Bounds.Height?i.Bounds.Height:i.Bounds.height;return{author:i.Author,allowedInteractions:i.allowedInteractions,modifiedDate:i.ModifiedDate,subject:i.Subject,id:"freetext",rotateAngle:i.Rotate,dynamicText:i.MarkupText,strokeColor:i.StrokeColor,thickness:i.Thickness,fillColor:i.FillColor,bounds:{x:a,y:r,left:a,top:r,width:l,height:d,right:i.Bounds.Right,bottom:i.Bounds.Bottom},annotationId:i.AnnotName,shapeAnnotationType:"FreeText",pageIndex:t,opacity:i.Opacity,fontColor:i.FontColor,fontSize:i.FontSize,fontFamily:i.FontFamily,notes:i.MarkupText,comments:this.pdfViewer.annotationModule.getAnnotationComments(i.Comments,i,i.Author),review:{state:i.State,stateModel:i.StateModel,modifiedDate:i.ModifiedDate,author:i.Author},font:{isBold:i.Font.Bold,isItalic:i.Font.Italic,isStrikeout:i.Font.Strikeout,isUnderline:i.Font.Underline},pageNumber:t,annotationSettings:i.AnnotationSettings,isCommentLock:i.IsCommentLock}}},i.prototype.updateAddAnnotationDetails=function(t,i){i=t?t.offset?t.offset:{x:1,y:1}:(t={offset:{x:1,y:1},pageNumber:0,width:void 0,height:void 0}).offset;var n=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),o=this.pdfViewer.annotation.createGUID(),s=t.fontStyle?t.fontStyle:e.FontStyle.None,a=this.pdfViewer.freeTextSettings.annotationSelectorSettings?this.pdfViewer.freeTextSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,r=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.freeTextSettings),l=this.pdfViewer.freeTextSettings.allowedInteractions?this.pdfViewer.freeTextSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions;r.isLock=!!t.isLock&&t.isLock,r.minHeight=t.minHeight?t.minHeight:0,r.minWidth=t.minWidth?t.minWidth:0,r.maxWidth=t.maxWidth?t.maxWidth:0,r.maxHeight=t.maxHeight?t.maxHeight:0,t.width=t.width?t.width:150,t.height=t.height?t.height:24.6;var d=[],u={AllowedInteractions:t.allowedInteractions?t.allowedInteractions:l,AnnotName:o,AnnotType:"freeText",AnnotationFlags:"Default",AnnotationIntent:null,AnnotationSelectorSettings:t.annotationSelectorSettings?t.annotationSelectorSettings:a,AnnotationSettings:r,Author:t.author?t.author:"Guest",Border:{HorizontalRadius:0,VerticalRadius:0,Width:t.borderWidth?t.borderWidth:1},BorderColor:{IsEmpty:!0,B:255,Blue:1,C:0,G:255},Bounds:{X:i.x,Y:i.y,Width:t.width,Height:t.height,Left:i.x,Top:i.y,Right:i.x+t.width,Bottom:i.y+t.height},CalloutLines:null,Color:{IsEmpty:!1,B:51,Blue:.2,C:0,G:255},Comments:null,CreatedDate:n,CustomData:t.customData?t.customData:null,ExistingCustomData:null,FillColor:t.fillColor?t.fillColor:"#ffffff00",Flatten:!1,FlattenPopups:!1,Font:{Bold:s==e.FontStyle.Bold,Italic:s==e.FontStyle.Italic,Strikeout:s==e.FontStyle.Strikethrough,Underline:s==e.FontStyle.Underline},FontColor:t.fontColor?t.fontColor:"#000",FontFamily:t.fontFamily?t.fontFamily:"Helvetica",FontSize:t.fontSize?t.fontSize:16,FreeTextAnnotationType:"Text Box",InnerColor:null,IsCommentLock:!1,IsLock:!!t.isLock&&t.isLock,IsPrint:!t.isPrint||t.isPrint,Layer:null,LineEndingStyle:"OpenArrow",Location:null,MarkupText:t.defaultText?t.defaultText:"Type Here",ModifiedDate:n,Name:o,Opacity:t.opacity?t.opacity:1,Page:null,PageTags:null,ReviewHistory:null,Rotate:0,IsReadonly:!!t.isReadonly&&t.isReadonly,State:"Unmarked",StateModel:"None",StrokeColor:t.borderColor?t.borderColor:"#ffffff00",Subject:"Text Box",Text:t.defaultText?t.defaultText:"Type Here",TextAlign:t.textAlignment?t.textAlignment:"Left",TextMarkupColor:null,Thickness:t.borderWidth?t.borderWidth:1};return d[0]=u,{freeTextAnnotation:d}},i}(),ct=function(){function e(e,t){this.pdfViewer=e,this.pdfViewerBase=t,this.inputBoxElement=document.createElement("input"),this.inputBoxElement.addEventListener("focusout",this.onFocusOutInputBox.bind(this)),this.maxHeight=24.6,this.maxWidth=151,this.fontSize=16,this.isInFocus=!1,this.inputBoxElement.style.position="absolute",this.inputBoxElement.style.fontFamily="Helvetica"}return e.prototype.editLabel=function(e,t){var i=this.pdfViewerBase.currentPageNumber-1,n=this.pdfViewerBase.getElement("_pageDiv_"+i),o=this.pdfViewerBase.getZoomFactor();if(this.inputBoxElement.value=t.labelContent,this.inputBoxElement.select(),t.labelContent="",this.pdfViewer.nodePropertyChange(t,{}),this.inputBoxElement.style.left=e.x*o+"px",this.inputBoxElement.style.top=e.y*o+"px",this.inputBoxElement.style.maxHeight=this.maxHeight*o+"px",this.inputBoxElement.style.maxWidth=this.maxWidth*o+"px",this.inputBoxElement.style.fontSize=this.fontSize*o+"px",this.inputBoxElement.style.textAlign="center",t&&t.wrapper&&t.wrapper.bounds){this.inputBoxElement.style.width=t.wrapper.bounds.width?t.wrapper.bounds.width/2*o+1+"px":this.maxWidth*o+"px";var s=parseFloat(this.inputBoxElement.style.width);s=s>this.maxWidth*o?this.maxWidth*o:s,t.wrapper.bounds.left&&(this.inputBoxElement.style.left=(t.wrapper.bounds.left+t.wrapper.bounds.width/2-s/(2*o))*o+"px"),t.wrapper.bounds.top&&("Line"===t.shapeAnnotationType||"LineWidthArrowHead"===t.shapeAnnotationType||"Distance"===t.shapeAnnotationType||"Polygon"===t.shapeAnnotationType?this.inputBoxElement.style.top=(t.wrapper.bounds.top+t.wrapper.bounds.height/2-this.maxHeight)*o+"px":this.inputBoxElement.style.top=(t.wrapper.bounds.top+t.wrapper.bounds.height/2-this.maxHeight/2)*o+"px"),this.inputBoxElement.maxLength=t.labelMaxLength,this.inputBoxElement.fontFamily=t.fontFamily,this.inputBoxElement.style.color=t.fontColor,this.inputBoxElement.style.border="1px solid #ffffff00",this.inputBoxElement.style.padding="2px",this.inputBoxElement.style.background=t.labelFillColor}n.appendChild(this.inputBoxElement),this.isInFocus=!0,this.inputBoxElement.focus()},e.prototype.onFocusOutInputBox=function(){var e=this.pdfViewerBase.currentPageNumber-1,t=this.pdfViewerBase.getElement("_pageDiv_"+e),i=parseFloat(this.inputBoxElement.style.height),n=parseFloat(this.inputBoxElement.style.width);this.isInFocus=!1;var o=this.pdfViewer.selectedItems.annotations[0];if(o){n=(n-1)/this.pdfViewerBase.getZoomFactor(),i=(i-1)/this.pdfViewerBase.getZoomFactor(),o.labelContent=this.inputBoxElement.value,o.notes=this.inputBoxElement.value,"Rectangle"===o.shapeAnnotationType||"Ellipse"===o.shapeAnnotationType||"Line"===o.shapeAnnotationType||"LineWidthArrowHead"===o.shapeAnnotationType?this.pdfViewer.annotation.shapeAnnotationModule.modifyInCollection("labelContent",e,o):"Radius"===o.shapeAnnotationType&&o.measureType&&this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("labelContent",e,o),this.pdfViewer.nodePropertyChange(o,{}),this.pdfViewer.renderSelector(o.pageIndex,this.pdfViewer.annotationSelectorSettings);var s=document.getElementById(this.pdfViewer.selectedItems.annotations[0].annotName);s&&s.childNodes&&"label"!==this.inputBoxElement.value&&(s.childNodes[0].ej2_instances?s.childNodes[0].ej2_instances[0].value=this.inputBoxElement.value:s.childNodes[0].childNodes&&s.childNodes[0].childNodes[1].ej2_instances&&(s.childNodes[0].childNodes[1].ej2_instances[0].value=this.inputBoxElement.value))}t.removeChild(this.inputBoxElement);var a=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+e);this.pdfViewer.renderDrawing(a,e)},e.prototype.calculateLabelBounds=function(e,t){var i={};if(e){var n=0,o=0,s=0;void 0===t&&(t=this.pdfViewerBase.currentPageNumber-1);var a=this.pdfViewerBase.pageSize[t].rotation;e.width&&(s=(s=e.width/2)>0&&s<151?s:151),e.left&&(o=e.left+e.width/2-s/2),e.top&&(n=e.top+e.height/2-12.3),i=1===a||3===a?{left:o,top:n,width:s-24.6+s/2,height:49.2+s,right:0,bottom:0}:{left:o,top:n,width:s,height:24.6,right:0,bottom:0}}return i},e.prototype.calculateLabelBoundsFromLoadedDocument=function(e){var t={};if(e){var i=0,n=0,o=0;e.Width&&(o=(o=e.Width/2)>0&&o<151?o:151),e.Left&&(n=e.Left+e.Width/2-o/2),e.Top&&(i=e.Top+e.Height/2-12.3),t={left:n,top:i,width:o,height:24.6,right:0,bottom:0}}return t},e}(),Ct=function(){function r(e,t){this.isUndoRedoAction=!1,this.isUndoAction=!1,this.annotationSelected=!0,this.isShapeCopied=!1,this.actionCollection=[],this.redoCollection=[],this.isPopupNoteVisible=!1,this.undoCommentsElement=[],this.redoCommentsElement=[],this.selectAnnotationId=null,this.isAnnotationSelected=!1,this.annotationPageIndex=null,this.previousIndex=null,this.overlappedAnnotations=[],this.overlappedCollections=[],this.isFormFieldShape=!1,this.removedAnnotationCollection=[],this.pdfViewer=e,this.pdfViewerBase=t,this.pdfViewer.enableTextMarkupAnnotation&&(this.textMarkupAnnotationModule=new yt(this.pdfViewer,this.pdfViewerBase)),this.pdfViewer.enableShapeAnnotation&&(this.shapeAnnotationModule=new St(this.pdfViewer,this.pdfViewerBase)),this.pdfViewer.enableMeasureAnnotation&&(this.measureAnnotationModule=new jt(this.pdfViewer,this.pdfViewerBase)),this.stampAnnotationModule=new At(this.pdfViewer,this.pdfViewerBase),this.stickyNotesAnnotationModule=new Tt(this.pdfViewer,this.pdfViewerBase),this.freeTextAnnotationModule=new wt(this.pdfViewer,this.pdfViewerBase),this.inputElementModule=new ct(this.pdfViewer,this.pdfViewerBase),this.inkAnnotationModule=new xt(this.pdfViewer,this.pdfViewerBase)}return r.prototype.setAnnotationMode=function(t,i,n,o){if("None"===t)this.clearAnnotationMode();else if("Highlight"===t||"Strikethrough"===t||"Underline"===t)this.textMarkupAnnotationModule&&(this.textMarkupAnnotationModule.isSelectionMaintained=!1,this.textMarkupAnnotationModule.drawTextMarkupAnnotations(t.toString()));else if("Line"===t||"Arrow"===t||"Rectangle"===t||"Circle"===t||"Polygon"===t)this.shapeAnnotationModule&&this.shapeAnnotationModule.setAnnotationType(t);else if("Distance"===t||"Perimeter"===t||"Area"===t||"Radius"===t||"Volume"===t)this.measureAnnotationModule&&this.measureAnnotationModule.setAnnotationType(t);else if("FreeText"===t&&this.freeTextAnnotationModule)this.freeTextAnnotationModule.setAnnotationType("FreeText"),this.freeTextAnnotationModule.isNewFreeTextAnnot=!0,this.freeTextAnnotationModule.isNewAddedAnnot=!0;else if("HandWrittenSignature"===t)this.pdfViewerBase.signatureModule.setAnnotationMode();else if("Initial"===t)this.pdfViewerBase.signatureModule.setInitialMode();else if("Ink"===t)this.inkAnnotationModule.setAnnotationMode();else if("StickyNotes"===t){this.pdfViewerBase.isCommentIconAdded=!0,this.pdfViewerBase.isAddComment=!0;var s=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+(this.pdfViewerBase.currentPageNumber-1));s&&s.addEventListener("mousedown",this.pdfViewer.annotationModule.stickyNotesAnnotationModule.drawIcons.bind(this))}else if("Stamp"===t)if(this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!0,this.pdfViewer.annotationModule.stampAnnotationModule.isStampAnnotSelected=!0,this.pdfViewerBase.stampAdded=!0,i){a=e.DynamicStampItem[i];this.pdfViewerBase.isDynamicStamp=!0,this.stampAnnotationModule.retrieveDynamicStampAnnotation(a)}else if(n){a=e.SignStampItem[n];this.pdfViewerBase.isDynamicStamp=!1,this.stampAnnotationModule.retrievestampAnnotation(a)}else if(o){var a=e.StandardBusinessStampItem[o];this.pdfViewerBase.isDynamicStamp=!1,this.stampAnnotationModule.retrievestampAnnotation(a)}},r.prototype.deleteAnnotationById=function(e){e&&(this.annotationSelected=!1,this.selectAnnotation(e),this.deleteAnnotation())},r.prototype.clearAnnotationMode=function(){if(this.textMarkupAnnotationModule&&(this.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1),this.freeTextAnnotationModule&&(this.freeTextAnnotationModule.isNewFreeTextAnnot=!1,this.freeTextAnnotationModule.isNewAddedAnnot=!1),this.pdfViewerBase.isTextMarkupAnnotationModule()&&(this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode=""),this.pdfViewerBase.isShapeAnnotationModule()&&(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode=""),this.pdfViewerBase.isCalibrateAnnotationModule()&&(this.pdfViewer.annotation.measureAnnotationModule.currentAnnotationMode=""),this.pdfViewer.annotationModule.inkAnnotationModule){var e=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(e)}},r.prototype.deleteAnnotation=function(){this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.deleteTextMarkupAnnotation();var e=!1;if(this.pdfViewer.selectedItems.annotations.length>0){var i=this.pdfViewer.selectedItems.annotations[0];if(i.annotationSettings&&(e=i.annotationSettings.isLock)&&this.checkAllowedInteractions("Delete",i)&&(e=!1),!e){var n=i.pageIndex,o=i.shapeAnnotationType,s=void 0;"Line"===o||"LineWidthArrowHead"===o||"Polygon"===o||"Ellipse"===o||"Rectangle"===o||"Radius"===o||"Distance"===o?(t.isNullOrUndefined(i.measureType)||""===i.measureType?(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(i,"shape"),this.updateImportAnnotationCollection(i,n,"shapeAnnotation")):(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(i,"measure"),this.updateImportAnnotationCollection(i,n,"measureShapeAnnotation")),s=this.modifyInCollections(i,"delete")):"FreeText"===o?(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(i,"FreeText","delete"),s=this.modifyInCollections(i,"delete"),this.updateImportAnnotationCollection(i,n,"freeTextAnnotation")):"HandWrittenSignature"===o||"SignatureImage"===o||"SignatureText"===o?s=this.modifyInCollections(i,"delete"):"Ink"===o?(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(i,"Ink","delete"),s=this.modifyInCollections(i,"delete"),this.updateImportAnnotationCollection(i,n,"inkAnnotation")):(s=this.pdfViewer.selectedItems.annotations[0],this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(s,s.shapeAnnotationType,"delete"),this.pdfViewer.annotation.stampAnnotationModule.updateSessionStorage(i,null,"delete")),"StickyNotes"===o&&this.updateImportAnnotationCollection(i,n,"stickyNotesAnnotation"),this.updateImportAnnotationCollection(i,n,"stampAnnotations"),this.pdfViewer.annotation.addAction(n,null,i,"Delete","",s,i);var a=void 0;""!==i.annotName?a=document.getElementById(i.annotName):s&&""!==s.annotName&&(a=document.getElementById(s.annotName)),a&&(1===a.parentElement.childElementCount?this.stickyNotesAnnotationModule.updateAccordionContainer(a):a.remove());var r=this.pdfViewer.selectedItems.annotations[0],l=r.annotName,d=this.getAnnotationType(r.shapeAnnotationType,r.measureType);if("Path"===o||"SignatureField"===r.formFieldAnnotationType||"InitialField"===r.formFieldAnnotationType||"HandWrittenSignature"===o||"SignatureText"===o||"SignatureImage"===o){var u=document.getElementById(r.id),M=document.getElementById(r.id+"_html_element");null!==u||t.isNullOrUndefined(M)||(u=M.children[0].children[0]),u&&"e-pdfviewer-signatureformfields-signature"===u.className&&(u.className="e-pdfviewer-signatureformfields",u.style.pointerEvents="",u.parentElement.style.pointerEvents="",this.pdfViewer.formDesignerModule?this.pdfViewer.formDesignerModule.updateSignatureValue(r.id):this.pdfViewer.formFieldsModule.updateDataInSession(u,""));for(var p=this.pdfViewer.retrieveFormFields(),h=0;h<p.length;h++)r.id===p[h].id&&(p[h].value="",p[h].signatureType="")}this.pdfViewer.formDesignerModule&&r.formFieldAnnotationType?this.updateFormFieldCollection(i):this.updateAnnotationCollection(i);var L=this.pdfViewer.nameTable[i.id.split("_")[0]];if(null==L||"SignatureField"!==L.formFieldAnnotationType&&"InitialField"!==L.formFieldAnnotationType||L.wrapper.children.splice(L.wrapper.children.indexOf(i.wrapper.children[0]),1),this.pdfViewer.remove(i),this.pdfViewer.renderDrawing(),this.pdfViewer.clearSelection(n),window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection)),this.pdfViewer.isDocumentEdited=!0,this.pdfViewerBase.tool=null,this.pdfViewer.tool=null,"HandWrittenSignature"===r.shapeAnnotationType||"SignatureText"===r.shapeAnnotationType||"SignatureImage"===r.shapeAnnotationType){var w={left:r.bounds.x,top:r.bounds.y,width:r.bounds.width,height:r.bounds.height};this.pdfViewer.fireSignatureRemove(n,r.signatureName,r.shapeAnnotationType,w)}else this.pdfViewer.formDesignerModule||this.pdfViewer.fireAnnotationRemove(n,l,d,r.bounds);this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.enableTextSelectionMode()}}this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&!e&&(this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(!1),this.pdfViewer.toolbarModule.annotationToolbarModule.enableTextMarkupAnnotationPropertiesTools(!1))},r.prototype.storeAnnotationCollections=function(e,t){if(this.isFormFieldShape){i=this.checkFormDesignCollection(e);(n=m(e)).formFieldId=e.annotName,n.pageNumber=t,delete n.annotName,e.id&&(n.uniqueKey=e.id,delete n.id),i.isExisting?this.pdfViewer.formFieldCollection.splice(i.position,0,n):this.pdfViewer.formFieldCollection.push(n)}else{var i=this.checkAnnotationCollection(e),n=m(e);n.annotationId=e.annotName,n.pageNumber=t,delete n.annotName,"stamp"===e.shapeAnnotationType&&(n.uniqueKey=e.randomId,delete n.randomId),e.id&&(n.uniqueKey=e.id,delete n.id),n.customData&&e.customData&&JSON.stringify(n.customData)!==JSON.stringify(e.customData)&&(n.customData=e.customData),i.isExisting?this.pdfViewer.annotationCollection.splice(i.position,0,n):this.pdfViewer.annotationCollection.push(n)}},r.prototype.checkFormDesignCollection=function(e){var t=this.pdfViewer.formFieldCollection;if(t&&e)for(var i=0;i<t.length;i++)if(t[i].formFieldId===e.annotName)return this.pdfViewer.formFieldCollection.splice(i,1),{isExisting:!0,position:i};return{isExisting:!1,position:null}},r.prototype.updateFormFieldCollection=function(e){var t=this.pdfViewer.formFieldCollection;if(t&&e)for(var i=0;i<t.length;i++)if(t[i].formFieldId===e.annotName){this.removedAnnotationCollection.push(t[i]),this.pdfViewer.formFieldCollection.splice(i,1);break}},r.prototype.getCustomData=function(e){var t;return e.ExistingCustomData&&!e.CustomData?t=JSON.parse(e.ExistingCustomData):null===e.CustomData?("sticky"===e.shapeAnnotationType&&(t=this.pdfViewer.stickyNotesSettings.customData),"Stamp"===e.shapeAnnotationType&&(t=this.pdfViewer.stampSettings.customData),"FreeText"===e.shapeAnnotationType&&(t=this.pdfViewer.freeTextSettings.customData),"shape"===e.id&&(t=this.getShapeData(e.ShapeAnnotationType,e.subject)),"measure"===e.id&&(t=this.getMeasureData(e.Subject)),"textMarkup"===e.shapeAnnotationType&&(t=this.getTextMarkupData(e.subject)),"Ink"===e.shapeAnnotationType&&(t=this.pdfViewer.inkAnnotationSettings.customData)):t=e.CustomData,t},r.prototype.getShapeData=function(e,t){var i;return"Line"===e&&"Arrow"!==t&&this.pdfViewer.lineSettings.customData?i=this.pdfViewer.lineSettings.customData:"LineWidthArrowHead"!==e&&"Arrow"!==t||!this.pdfViewer.arrowSettings.customData?"Rectangle"!==e&&"Square"!==e||!this.pdfViewer.rectangleSettings.customData?"Ellipse"!==e&&"Circle"!==e||!this.pdfViewer.circleSettings.customData?"Polygon"===e&&this.pdfViewer.polygonSettings.customData?i=this.pdfViewer.polygonSettings.customData:this.pdfViewer.annotationSettings.customData&&(i=this.pdfViewer.annotationSettings.customData):i=this.pdfViewer.circleSettings.customData:i=this.pdfViewer.rectangleSettings.customData:i=this.pdfViewer.arrowSettings.customData,i},r.prototype.getMeasureData=function(e){var t;return"Distance"!==e&&"Distance calculation"!==e||!this.pdfViewer.distanceSettings.customData?"Line"!==e&&"Perimeter calculation"!==e||!this.pdfViewer.lineSettings.customData?"Polygon"!==e&&"Area calculation"!==e&&"Volume calculation"!==e||!this.pdfViewer.polygonSettings.customData?"Radius"!==e&&"Radius calculation"!==e||!this.pdfViewer.radiusSettings.customData?this.pdfViewer.annotationSettings.customData&&(t=this.pdfViewer.annotationSettings.customData):t=this.pdfViewer.radiusSettings.customData:t=this.pdfViewer.polygonSettings.customData:t=this.pdfViewer.lineSettings.customData:t=this.pdfViewer.distanceSettings.customData,t},r.prototype.getTextMarkupData=function(e){var t;return"Highlight"===e&&this.pdfViewer.highlightSettings.customData?t=this.pdfViewer.highlightSettings.customData:"Underline"===e&&this.pdfViewer.underlineSettings.customData?t=this.pdfViewer.underlineSettings.customData:"Strikethrough"===e&&this.pdfViewer.strikethroughSettings.customData?t=this.pdfViewer.strikethroughSettings.customData:this.pdfViewer.annotationSettings.customData&&(t=this.pdfViewer.annotationSettings.customData),t},r.prototype.getData=function(e){var t;return"FreeText"===e&&this.pdfViewer.freeTextSettings.customData?t=this.pdfViewer.freeTextSettings.customData:"image"!==e&&"Stamp"!==e||!this.pdfViewer.stampSettings.customData?"sticky"===e&&this.pdfViewer.stickyNotesSettings.customData?t=this.pdfViewer.stickyNotesSettings.customData:this.pdfViewer.annotationSettings.customData&&(t=this.pdfViewer.annotationSettings.customData):t=this.pdfViewer.stampSettings.customData,t},r.prototype.clearAnnotationStorage=function(){if(Math.round(JSON.stringify(window.sessionStorage).length/1024)>4500){for(var e=window.sessionStorage.length,t=[],i=0;i<e;i++)window.sessionStorage.key(i)&&window.sessionStorage.key(i).split("_")[3]&&"annotations"===window.sessionStorage.key(i).split("_")[3]&&(this.pdfViewerBase.annotationStorage[window.sessionStorage.key(i)]=window.sessionStorage.getItem(window.sessionStorage.key(i)),t.push(window.sessionStorage.key(i)));if(t)for(i=0;i<t.length;i++)window.sessionStorage.removeItem(t[i])}},r.prototype.checkAnnotationCollection=function(e){var t=this.pdfViewer.annotationCollection;if(t&&e)for(var i=0;i<t.length;i++)if(t[i].annotationId===e.annotName)return this.pdfViewer.annotationCollection.splice(i,1),{isExisting:!0,position:i};return{isExisting:!1,position:null}},r.prototype.updateAnnotationCollection=function(e){var t=this.pdfViewer.annotationCollection;if(t&&e)for(var i=0;i<t.length;i++)if(t[i].annotationId===e.annotName){this.removedAnnotationCollection.push(t[i]),this.pdfViewer.annotationCollection.splice(i,1);break}},r.prototype.updateImportAnnotationCollection=function(e,t,i){if(this.pdfViewerBase.isImportAction&&this.pdfViewerBase.importedAnnotation&&this.pdfViewerBase.importedAnnotation[t]){var n=this.pdfViewerBase.importedAnnotation[t];if(n[i])for(a=0;a<n[i].length;a++)if(e.annotName===n[i][a].AnnotName||e.annotName===n[i][a].annotName){this.pdfViewerBase.importedAnnotation[t][i].splice(a,1);break}}var o=this.pdfViewerBase.documentAnnotationCollections;if(o&&o[t]){var s=o[t];if(s&&s[i])for(var a=0;a<s[i].length;a++)if(e.annotName===s[i][a].AnnotName){this.pdfViewerBase.documentAnnotationCollections[t][i].splice(a,1);break}}},r.prototype.selectAnnotation=function(e){var t,i;if("object"==typeof e&&(i=(t=e).annotationId,t=this.getAnnotationsFromAnnotationCollections(i)),"string"==typeof e&&(t=this.getAnnotationsFromAnnotationCollections(e),i=e),t){var n=t.pageNumber,o=!1;o=this.findRenderPageList(n);var s=this.pdfViewer.annotationSelectorSettings;if(t&&n>=0){if("textMarkup"===t.shapeAnnotationType)if(t.rect||t.bounds){var a=((r=this.pdfViewerBase.pageSize[n].top*this.pdfViewerBase.getZoomFactor()+this.getAnnotationTop(t)*this.pdfViewerBase.getZoomFactor())-20).toString();this.pdfViewerBase.viewerContainer.scrollTop=parseInt(a)}else this.pdfViewer.navigation&&this.pdfViewer.navigation.goToPage(n+1);else if(t.bounds){var r=this.pdfViewerBase.pageSize[n].top*this.pdfViewerBase.getZoomFactor()+t.bounds.top*this.pdfViewerBase.getZoomFactor();"Ink"===t.shapeAnnotationType&&(r=this.pdfViewerBase.pageSize[n].top*this.pdfViewerBase.getZoomFactor()+t.bounds.y*this.pdfViewerBase.getZoomFactor());var l=(r-20).toString();this.pdfViewerBase.viewerContainer.scrollTop=parseInt(l)}else this.pdfViewer.navigation&&this.pdfViewer.navigation.goToPage(n+1);if(o){if(this.previousIndex&&this.pdfViewer.clearSelection(this.previousIndex),this.pdfViewer.clearSelection(n),this.previousIndex=n,"textMarkup"===t.shapeAnnotationType){this.pdfViewer.annotationModule.textMarkupAnnotationModule.clearCurrentAnnotationSelection(n,!0);var d=this.pdfViewerBase.getElement("_annotationCanvas_"+n),u=this.getTextMarkupAnnotations(n,t);u&&(this.textMarkupAnnotationModule.currentTextMarkupAnnotation=null,this.textMarkupAnnotationModule.isSelectedAnnotation=!0,this.textMarkupAnnotationModule.showHideDropletDiv(!0),this.textMarkupAnnotationModule.annotationClickPosition=null,this.textMarkupAnnotationModule.selectAnnotation(u,d,n,null,!0),this.textMarkupAnnotationModule.currentTextMarkupAnnotation=u,this.textMarkupAnnotationModule.selectTextMarkupCurrentPage=n,this.textMarkupAnnotationModule.enableAnnotationPropertiesTool(!0),this.textMarkupAnnotationModule.isSelectedAnnotation=!1,this.pdfViewer.toolbarModule&&this.pdfViewer.enableAnnotationToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem)))}else"stamp"===t.shapeAnnotationType||"stamp"===t.ShapeAnnotationType?(this.pdfViewer.select([t.uniqueKey],s),this.pdfViewer.annotation.onAnnotationMouseDown()):"sticky"===t.shapeAnnotationType||"sticky"===t.ShapeAnnotationType?(this.pdfViewer.select([t.annotationId],s),this.pdfViewer.annotation.onAnnotationMouseDown()):(this.pdfViewer.select([t.uniqueKey],s),this.pdfViewer.annotation.onAnnotationMouseDown());var M=document.getElementById(this.pdfViewer.element.id+"_commantPanel");if(M&&"block"===M.style.display){var p=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+this.pdfViewer.currentPageNumber);p&&p.ej2_instances[0].expandItem(!0);var h=document.getElementById(i);h&&(h.classList.contains("e-pv-comments-border")||h.firstChild.click())}}else this.selectAnnotationId=i,this.isAnnotationSelected=!0,this.annotationPageIndex=n}}},r.prototype.clearSelection=function(){if(this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.currentTextMarkupAnnotation)this.textMarkupAnnotationModule.clearCurrentSelectedAnnotation(),this.textMarkupAnnotationModule.clearCurrentAnnotationSelection(this.textMarkupAnnotationModule.selectTextMarkupCurrentPage);else if(this.pdfViewer.selectedItems&&this.pdfViewer.selectedItems.annotations[0]){var e=this.pdfViewer.selectedItems.annotations[0];this.pdfViewer.clearSelection(e.pageIndex)}else this.pdfViewer.clearSelection(this.pdfViewer.currentPageNumber-1)},r.prototype.getAnnotationTop=function(e){return e.rect?e.rect.Top?e.rect.Top:e.rect.top:e.bounds[0].Top?e.bounds[0].Top:e.bounds[0].top},r.prototype.selectAnnotationFromCodeBehind=function(){if(this.isAnnotationSelected&&this.selectAnnotationId){var e=this.getAnnotationsFromAnnotationCollections(this.selectAnnotationId),t=this.selectAnnotationId,i=e.pageNumber,n=this.pdfViewer.annotationSelectorSettings;if(e&&this.annotationPageIndex>=0&&this.annotationPageIndex===i){if(this.previousIndex&&this.pdfViewer.clearSelection(this.previousIndex),this.pdfViewer.clearSelection(i),this.previousIndex=i,"textMarkup"===e.shapeAnnotationType){this.pdfViewer.annotationModule.textMarkupAnnotationModule.clearCurrentAnnotationSelection(i,!0);var o=this.pdfViewerBase.getElement("_annotationCanvas_"+i),s=this.getTextMarkupAnnotations(i,e);s&&(this.textMarkupAnnotationModule.currentTextMarkupAnnotation=null,this.textMarkupAnnotationModule.isSelectedAnnotation=!0,this.textMarkupAnnotationModule.showHideDropletDiv(!0),this.textMarkupAnnotationModule.annotationClickPosition=null,this.textMarkupAnnotationModule.selectAnnotation(s,o,i),this.textMarkupAnnotationModule.currentTextMarkupAnnotation=s,this.textMarkupAnnotationModule.selectTextMarkupCurrentPage=i,this.textMarkupAnnotationModule.enableAnnotationPropertiesTool(!0),this.textMarkupAnnotationModule.isSelectedAnnotation=!1,this.pdfViewer.toolbarModule&&this.pdfViewer.enableAnnotationToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem)))}else"stamp"===e.shapeAnnotationType||"stamp"===e.ShapeAnnotationType?(this.pdfViewer.select([e.uniqueKey],n),this.pdfViewer.annotation.onAnnotationMouseDown()):"sticky"===e.shapeAnnotationType||"sticky"===e.ShapeAnnotationType?(this.pdfViewer.select([e.annotationId],n),this.pdfViewer.annotation.onAnnotationMouseDown()):e.uniqueKey?(this.pdfViewer.select([e.uniqueKey],n),this.pdfViewer.annotation.onAnnotationMouseDown()):(this.pdfViewer.select([e.annotationId],n),this.pdfViewer.annotation.onAnnotationMouseDown());var a=document.getElementById(this.pdfViewer.element.id+"_commantPanel");if(a&&"block"===a.style.display){var r=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+this.pdfViewer.currentPageNumber);r&&r.ej2_instances[0].expandItem(!0);var l=document.getElementById(t);l&&(l.classList.contains("e-pv-comments-border")||l.firstChild.click())}}this.isAnnotationSelected=!1,this.selectAnnotationId=null,this.annotationPageIndex=null}},r.prototype.findRenderPageList=function(e){var t=!1,i=this.pdfViewerBase.renderedPagesList;if(i)for(var n=0;n<i.length;n++)if(i[n]===e)return t=!0;return t},r.prototype.getPageNumberFromAnnotationCollections=function(e){var t=this.pdfViewer.annotations;if(e){if("textMarkup"===e.shapeAnnotationType)return e.pageNumber;if(t)for(var i=0;i<t.length;i++)if(t[i].annotName===e.annotationId)return t[i].pageIndex}},r.prototype.getAnnotationsFromAnnotationCollections=function(e){var t=this.pdfViewer.annotationCollection;if(t&&e)for(var i=0;i<t.length;i++)if(t[i].annotationId===e)return t[i]},r.prototype.getTextMarkupAnnotations=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_textMarkup");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_textMarkup"]),!i)return null;var n=JSON.parse(i),o=this.getPageCollection(n,e);if(n[o]){for(var s=0;s<n[o].annotations.length;s++)if(n[o].annotations[s].annotName===t.annotationId)return n[o].annotations[s];return null}},r.prototype.getAnnotationType=function(e,i){var n;if(""===i||t.isNullOrUndefined(i))switch(e){case"Line":n="Line";break;case"LineWidthArrowHead":n="Arrow";break;case"Rectangle":n="Rectangle";break;case"Ellipse":n="Circle";break;case"Polygon":n="Polygon";break;case"Stamp":n="Stamp";break;case"Image":n="Image";break;case"FreeText":n="FreeText";break;case"Ink":n="Ink";break;case"StickyNotes":n="StickyNotes"}else switch(i){case"Distance":n="Distance";break;case"Perimeter":n="Perimeter";break;case"Area":n="Area";break;case"Radius":n="Radius";break;case"Volume":n="Volume"}return n},r.prototype.getAnnotationIndex=function(e,t){for(var i=this.pdfViewer.drawing.getPageObjects(e),n=null,o=0;o<i.length;o++)if(i[o].id===t){n=o;break}return n},r.prototype.initializeCollection=function(){this.actionCollection=[],this.redoCollection=[],this.pdfViewerBase.customStampCollection=[],this.popupNote||this.createNote()},r.prototype.showCommentsPanel=function(){if(this.pdfViewer.enableCommentPanel){var e=document.getElementById(this.pdfViewer.element.id+"_commantPanel");if(e&&"none"===e.style.display){e.style.display="block",t.Browser.isDevice&&!t.isBlazor()&&document.getElementById(this.pdfViewer.element.id+"_viewerMainContainer").insertBefore(this.pdfViewerBase.navigationPane.commentPanelContainer,this.pdfViewer.toolbarModule.toolbarElement),this.pdfViewerBase.navigationPane.commentPanelResizer&&(this.pdfViewerBase.navigationPane.commentPanelResizer.style.display="block"),this.pdfViewerBase.navigationPane.setCommentPanelResizeIconTop(),this.pdfViewer.annotation.stickyNotesAnnotationModule.updateCommentPanelTextTop();var i=document.getElementById(this.pdfViewer.element.id+"_viewerContainer"),n=document.getElementById(this.pdfViewer.element.id+"_pageViewContainer");if(i&&(this.pdfViewer.enableRtl?i.style.left=this.pdfViewerBase.navigationPane.getViewerContainerRight()+"px":i.style.right=this.pdfViewerBase.navigationPane.getViewerContainerRight()+"px",i.style.width=this.pdfViewer.element.clientWidth-this.pdfViewerBase.navigationPane.getViewerContainerLeft()-this.pdfViewerBase.navigationPane.getViewerContainerRight()+"px",n.style.width=i.offsetWidth-this.pdfViewerBase.navigationPane.getViewerContainerScrollbarWidth()+"px"),this.pdfViewerBase.updateZoomValue(),this.pdfViewer.annotation&&this.pdfViewer.annotation.textMarkupAnnotationModule&&this.pdfViewer.annotation.textMarkupAnnotationModule.showHideDropletDiv(!0),t.Browser.isDevice&&!t.isBlazor()){if(e.style.height=this.pdfViewerBase.viewerMainContainer.clientHeight+"px",this.pdfViewer.selectedItems.annotations.length>0){var o=document.getElementById(this.pdfViewer.selectedItems.annotations[0].annotName);o&&o.lastElementChild.children[1]&&o.lastElementChild.children[1].ej2_instances?o.lastElementChild.children[1].ej2_instances[0].enableEditMode=!0:o&&o.lastElementChild.ej2_instances&&(o.lastElementChild.ej2_instances[0].enableEditMode=!0,o.lastElementChild.style.display="block",o.lastElementChild.children[1].style.display="block")}this.pdfViewer.toolbarModule.annotationToolbarModule.toolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.toolbar.element.style.display="none",this.pdfViewer.toolbarModule.annotationToolbarModule.propertyToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.propertyToolbar.element.style.display="none"))}}}},r.prototype.addAction=function(e,t,i,n,o,s,a){var r={pageIndex:e,index:t,annotation:i,action:n,modifiedProperty:o,undoElement:s,redoElement:a};this.actionCollection.push(r),this.updateToolbar()},r.prototype.undo=function(){var e=this.actionCollection.pop();if(e){var n=e.annotation.shapeAnnotationType;switch(this.isUndoRedoAction=!0,this.isUndoAction=!0,e.action){case"Text Markup Added":case"Text Markup Deleted":this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.undoTextMarkupAction(e.annotation,e.pageIndex,e.index,e.action);break;case"Text Markup Property modified":this.textMarkupAnnotationModule&&(e.annotation=this.textMarkupAnnotationModule.undoRedoPropertyChange(e.annotation,e.pageIndex,e.index,e.modifiedProperty,!0));break;case"Drag":case"Resize":h(e.annotation)?this.pdfViewer.nodePropertyChange(e.annotation,{bounds:e.undoElement.bounds,vertexPoints:e.undoElement.vertexPoints,leaderHeight:e.undoElement.leaderHeight}):this.pdfViewer.nodePropertyChange(e.annotation,{bounds:e.undoElement.bounds}),"Distance"!==e.annotation.measureType&&"Perimeter"!==e.annotation.measureType&&"Area"!==e.annotation.measureType&&"Radius"!==e.annotation.measureType&&"Volume"!==e.annotation.measureType||(this.pdfViewer.nodePropertyChange(e.annotation,{notes:e.undoElement.notes}),this.updateCalibrateValues(e.annotation)),e.annotation.formFieldAnnotationType&&this.pdfViewer.formDesigner.updateHTMLElement(e.annotation),this.pdfViewer.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.pdfViewer.select([e.annotation.id]),"Line"!==e.annotation.shapeAnnotationType&&"Rectangle"!==e.annotation.shapeAnnotationType&&"Ellipse"!==e.annotation.shapeAnnotationType&&"Polygon"!==e.annotation.shapeAnnotationType&&"LineWidthArrowHead"!==e.annotation.shapeAnnotationType&&"Radius"!==e.annotation.shapeAnnotationType&&"FreeText"!==e.annotation.shapeAnnotationType&&"HandWrittenSignature"!==e.annotation.shapeAnnotationType&&"SignatureText"!==e.annotation.shapeAnnotationType&&"SignatureImage"!==e.annotation.shapeAnnotationType&&"Ink"!==e.annotation.shapeAnnotationType||this.modifyInCollections(e.annotation,"bounds");break;case"Addition":if(this.pdfViewer.formDesigner&&e.annotation.formFieldAnnotationType)this.pdfViewer.formDesigner.deleteFormField(e.undoElement.id,!1);else{var o=!1;"Line"!==n&&"LineWidthArrowHead"!==n&&"Polygon"!==n&&"Ellipse"!==n&&"Rectangle"!==n&&"Radius"!==n&&"Distance"!==n||(""===e.annotation.measureType||t.isNullOrUndefined(e.annotation.measureType)?this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(e.annotation,"shape"):this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(e.annotation,"measure"),o=!0,e.duplicate=this.modifyInCollections(e.annotation,"delete")),"Stamp"!==n&&"Image"!==n||(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(e.annotation,e.annotation.shapeAnnotationType,"delete"),this.stampAnnotationModule.updateSessionStorage(e.annotation,null,"delete"),o=!0),"FreeText"!==n&&"HandWrittenSignature"!==n&&"SignatureImage"!==n&&"SignatureText"!==n&&"Ink"!==n||(o=!0,this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(e.annotation,e.annotation.shapeAnnotationType,"delete"),e.duplicate=this.modifyInCollections(e.annotation,"delete")),o||this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(e.annotation,e.annotation.shapeAnnotationType,"delete"),this.pdfViewer.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.pdfViewer.remove(e.annotation),this.pdfViewer.renderDrawing(null,e.annotation.pageIndex);var s=document.getElementById(e.annotation.annotName);if(s&&(1===s.parentElement.childElementCount?this.stickyNotesAnnotationModule.updateAccordionContainer(s):s.remove()),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){var a=document.getElementById(this.pdfViewer.element.id+"_propertyToolbar");a&&a.children.length>0&&(this.pdfViewer.toolbarModule.annotationToolbarModule.toolbarCreated=!1,this.pdfViewer.toolbarModule.annotationToolbarModule.createAnnotationToolbarForMobile())}}break;case"Delete":if(this.pdfViewer.formDesigner&&e.annotation.formFieldAnnotationType)e.undoElement.bounds.x=e.undoElement.wrapper.bounds.x,e.undoElement.bounds.y=e.undoElement.wrapper.bounds.y,this.pdfViewer.formDesigner.drawFormField(e.undoElement);else{"Line"!==n&&"LineWidthArrowHead"!==n&&"Polygon"!==n&&"Ellipse"!==n&&"Rectangle"!==n&&"Radius"!==n&&"Distance"!==n||(""===e.annotation.measureType||t.isNullOrUndefined(e.annotation.measureType)?(n="shape",this.shapeAnnotationModule.addInCollection(e.annotation.pageIndex,e.undoElement)):(n="shape_measure",this.measureAnnotationModule.addInCollection(e.annotation.pageIndex,e.undoElement))),"Stamp"===n||"Image"===n?this.stampAnnotationModule.updateDeleteItems(e.annotation.pageIndex,e.annotation):"FreeText"===n?this.freeTextAnnotationModule.addInCollection(e.annotation.pageIndex,e.undoElement):"Ink"===n&&this.inkAnnotationModule.addInCollection(e.annotation.pageIndex,e.undoElement);var r=this.pdfViewer.add(e.annotation);if(("FreeText"===n||r.enableShapeLabel)&&r&&this.pdfViewer.nodePropertyChange(r,{}),null!=(w=this.pdfViewer.nameTable[e.annotation.id.split("_")[0]])&&("SignatureField"===w.formFieldAnnotationType||"InitialField"===w.formFieldAnnotationType)){w.wrapper.children.push(e.annotation.wrapper.children[0]),"SignatureText"===e.annotation.shapeAnnotationType&&w.wrapper.children.push(e.annotation.wrapper.children[1]);for(var l=e.annotation.id.split("_")[0]+"_content",d=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),u=JSON.parse(d),M=0;M<u.length;M++)if(u[M].Key===l)if("SignatureText"===e.annotation.shapeAnnotationType)u[M].FormField.signatureType="Text",u[M].FormField.value=e.annotation.data,this.pdfViewerBase.formFieldCollection[M].FormField.value=e.annotation.data,this.pdfViewerBase.formFieldCollection[M].FormField.signatureType="Text";else if("SignatureImage"===e.annotation.shapeAnnotationType)u[M].FormField.signatureType="Image",u[M].FormField.value=e.annotation.data,this.pdfViewerBase.formFieldCollection[M].FormField.value=e.annotation.data,this.pdfViewerBase.formFieldCollection[M].FormField.signatureType="Image";else{u[M].FormField.signatureType="Path",this.pdfViewerBase.formFieldCollection[M].FormField.signatureType="Path";var p=i.processPathData(e.annotation.data),L=i.splitArrayCollection(p);u[M].FormField.value=JSON.stringify(L),this.pdfViewerBase.formFieldCollection[M].FormField.value=JSON.stringify(L)}window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))}this.pdfViewer.renderDrawing(null,e.annotation.pageIndex),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.addAnnotationComments(e.annotation.pageIndex,n)}break;case"stampOpacity":this.pdfViewer.nodePropertyChange(e.annotation,{opacity:e.undoElement.opacity}),this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e.annotation,null,!0),e.annotation.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();break;case"Shape Stroke":this.pdfViewer.nodePropertyChange(e.annotation,{strokeColor:e.undoElement.strokeColor}),this.modifyInCollections(e.annotation,"stroke"),this.pdfViewer.renderDrawing();break;case"Shape Fill":this.pdfViewer.nodePropertyChange(e.annotation,{fillColor:e.undoElement.fillColor}),this.modifyInCollections(e.annotation,"fill"),this.pdfViewer.renderDrawing();break;case"Shape Opacity":this.pdfViewer.nodePropertyChange(e.annotation,{opacity:e.undoElement.opacity}),"StickyNotes"===e.annotation.shapeAnnotationType?(this.stickyNotesAnnotationModule.updateOpacityValue(e.annotation),this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e.annotation,null,!0),e.annotation.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime()):this.modifyInCollections(e.annotation,"opacity"),this.pdfViewer.renderDrawing();break;case"Shape Thickness":this.pdfViewer.nodePropertyChange(e.annotation,{thickness:e.undoElement.thickness}),this.modifyInCollections(e.annotation,"thickness"),this.pdfViewer.renderDrawing();break;case"Line properties change":this.pdfViewer.nodePropertyChange(e.annotation,{fillColor:e.undoElement.fillColor,borderDashArray:e.undoElement.borderDashArray,borderStyle:e.undoElement.borderStyle,strokeColor:e.undoElement.strokeColor,opacity:e.undoElement.opacity,thickness:e.undoElement.thickness,sourceDecoraterShapes:this.getArrowType(e.undoElement.lineHeadStart),taregetDecoraterShapes:this.getArrowType(e.undoElement.lineHeadEnd)}),this.updateCollectionForLineProperty(e.annotation),this.pdfViewer.renderDrawing();break;case"Text Property Added":e.annotation=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.undoAction(e.annotation,e.action,e.undoElement),this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e.annotation,null,!0),e.annotation.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();break;case"Comments Property Added":case"Status Property Added":case"Comments Reply Deleted":e.annotation=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.undoAction(e.annotation,e.action,e.undoElement);break;case"dynamicText Change":this.pdfViewer.annotation.freeTextAnnotationModule.isFreeTextValueChange=!0,e.annotation.dynamicText=e.undoElement.dynamicText,this.pdfViewer.selectedItems.annotations[0]&&(this.pdfViewer.selectedItems.annotations[0].dynamicText=e.undoElement.dynamicText),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.undoAction(e.annotation,e.action,e.undoElement),this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e.annotation,null,!0),this.modifyInCollections(e.annotation,"dynamicText"),this.pdfViewer.selectedItems.annotations[0]?this.pdfViewer.nodePropertyChange(this.pdfViewer.selectedItems.annotations[0],{}):this.pdfViewer.nodePropertyChange(e.annotation,{}),this.pdfViewer.annotation.freeTextAnnotationModule.isFreeTextValueChange=!1,this.pdfViewer.clearSelection(this.pdfViewerBase.activeElements.activePageID);break;case"fontColor":this.pdfViewer.nodePropertyChange(e.annotation,{fontColor:e.undoElement.fontColor}),this.modifyInCollections(e.annotation,"fontColor"),this.pdfViewer.renderDrawing();break;case"fontSize":this.pdfViewer.nodePropertyChange(e.annotation,{fontSize:e.undoElement.fontSize}),this.modifyInCollections(e.annotation,"fontSize"),this.pdfViewer.renderDrawing();break;case"fontFamily":this.pdfViewer.nodePropertyChange(e.annotation,{fontFamily:e.undoElement.fontFamily}),this.modifyInCollections(e.annotation,"fontFamily"),this.pdfViewer.renderDrawing();break;case"textAlign":this.pdfViewer.nodePropertyChange(e.annotation,{textAlign:e.undoElement.textAlign}),this.modifyInCollections(e.annotation,"textAlign"),this.pdfViewer.renderDrawing();break;case"textPropertiesChange":this.pdfViewer.nodePropertyChange(e.annotation,{font:e.undoElement.font}),this.modifyInCollections(e.annotation,"textPropertiesChange"),this.pdfViewer.renderDrawing();break;case"Rotate":this.pdfViewer.nodePropertyChange(e.annotation.annotations[0],{bounds:e.undoElement.bounds,rotateAngle:e.undoElement.rotateAngle}),this.modifyInCollections(e.annotation.annotations[0],"bounds"),this.pdfViewer.renderDrawing();break;case"FormDesigner Properties Change":this.updateFormFieldPropertiesChanges(e.undoElement.formFieldAnnotationType,e.undoElement);break;case"FormField Value Change":if(e.annotation.formFieldAnnotationType)"RadioButton"==e.annotation.formFieldAnnotationType?(this.updateFormFieldValueChange(e.annotation.formFieldAnnotationType,e.undoElement,!1),this.updateFormFieldValueChange(e.annotation.formFieldAnnotationType,e.redoElement,!0)):this.updateFormFieldValueChange(e.annotation.formFieldAnnotationType,e.annotation,e.undoElement);else{document.getElementById(e.annotation.id+"_html_element").children[0].children[0].className="e-pdfviewer-signatureformfields";var w=this.pdfViewer.nameTable[e.annotation.id.split("_")[0]],c=this.pdfViewer.nameTable[e.annotation.id];w.wrapper.children.splice(w.wrapper.children.indexOf(c.wrapper.children[0]),1),"SignatureText"===e.annotation.shapeAnnotationType&&w.wrapper.children.splice(w.wrapper.children.indexOf(c.wrapper.children[1]),1);for(var l=e.annotation.id.split("_")[0]+"_content",d=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),u=JSON.parse(d),M=0;M<u.length;M++)u[M].Key===l&&(u[M].FormField.value="",u[M].FormField.signatureType="",this.pdfViewerBase.formFieldCollection[M].FormField.value="",this.pdfViewerBase.formFieldCollection[M].FormField.signatureType="");this.pdfViewer.remove(e.annotation),this.pdfViewer.renderDrawing(),window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))}}this.redoCollection.push(e),this.updateToolbar(),this.isUndoRedoAction=!1,this.isUndoAction=!1}},r.prototype.redo=function(){var e=this.redoCollection.pop();if(e){var n=e.annotation.shapeAnnotationType;switch(this.isUndoRedoAction=!0,e.action){case"Text Markup Property modified":this.textMarkupAnnotationModule&&(e.annotation=this.textMarkupAnnotationModule.undoRedoPropertyChange(e.annotation,e.pageIndex,e.index,e.modifiedProperty));break;case"Text Markup Added":case"Text Markup Deleted":this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.redoTextMarkupAction(e.annotation,e.pageIndex,e.index,e.action);break;case"Drag":case"Resize":h(e.annotation)?this.pdfViewer.nodePropertyChange(e.annotation,{bounds:e.redoElement.bounds,vertexPoints:e.redoElement.vertexPoints,leaderHeight:e.redoElement.leaderHeight}):this.pdfViewer.nodePropertyChange(e.annotation,{bounds:e.redoElement.bounds}),"Distance"!==e.annotation.measureType&&"Perimeter"!==e.annotation.measureType&&"Area"!==e.annotation.measureType&&"Radius"!==e.annotation.measureType&&"Volume"!==e.annotation.measureType||(this.pdfViewer.nodePropertyChange(e.annotation,{notes:e.redoElement.notes}),this.updateCalibrateValues(e.annotation)),e.annotation.formFieldAnnotationType&&this.pdfViewer.formDesigner.updateHTMLElement(e.annotation),this.pdfViewer.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.pdfViewer.select([e.annotation.id]),"Line"!==e.annotation.shapeAnnotationType&&"Rectangle"!==e.annotation.shapeAnnotationType&&"Ellipse"!==e.annotation.shapeAnnotationType&&"Polygon"!==e.annotation.shapeAnnotationType&&"LineWidthArrowHead"!==e.annotation.shapeAnnotationType&&"Radius"!==e.annotation.shapeAnnotationType&&"FreeText"!==e.annotation.shapeAnnotationType&&"HandWrittenSignature"!==e.annotation.shapeAnnotationType&&"SignatureText"!==e.annotation.shapeAnnotationType&&"SignatureImage"!==e.annotation.shapeAnnotationType&&"Ink"!==e.annotation.shapeAnnotationType||this.modifyInCollections(e.annotation,"bounds");break;case"Addition":if(this.pdfViewer.formDesigner&&e.annotation.formFieldAnnotationType)e.redoElement.bounds.x=e.redoElement.wrapper.bounds.x,e.redoElement.bounds.y=e.redoElement.wrapper.bounds.y,this.pdfViewer.formDesigner.drawFormField(e.redoElement);else{"Line"!==n&&"LineWidthArrowHead"!==n&&"Polygon"!==n&&"Ellipse"!==n&&"Rectangle"!==n&&"Radius"!==n&&"Distance"!==n||(""===e.annotation.measureType||t.isNullOrUndefined(e.annotation.measureType)?(n="shape",this.shapeAnnotationModule.addInCollection(e.annotation.pageIndex,e.duplicate)):(n="shape_measure",this.measureAnnotationModule.addInCollection(e.annotation.pageIndex,e.duplicate))),"FreeText"===n&&this.freeTextAnnotationModule.addInCollection(e.annotation.pageIndex,e.duplicate),"Stamp"===n&&this.stampAnnotationModule.updateDeleteItems(e.annotation.pageIndex,e.redoElement),"HandWrittenSignature"!==n&&"SignatureText"!==n&&"SignatureImage"!==n||this.pdfViewerBase.signatureModule.addInCollection(e.annotation.pageIndex,e.duplicate),"Ink"===n&&this.inkAnnotationModule.addInCollection(e.annotation.pageIndex,e.duplicate);var o=this.pdfViewer.add(e.annotation);if(this.pdfViewer.select([e.annotation.id]),("FreeText"===n||o.enableShapeLabel)&&o&&this.pdfViewer.nodePropertyChange(o,{}),this.pdfViewer.renderDrawing(null,e.annotation.pageIndex),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.addAnnotationComments(e.annotation.pageIndex,n),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){var s=document.getElementById(this.pdfViewer.element.id+"_propertyToolbar");s&&s.children.length>0&&(this.pdfViewer.toolbarModule.annotationToolbarModule.toolbarCreated=!1,this.pdfViewer.toolbarModule.annotationToolbarModule.createAnnotationToolbarForMobile())}}break;case"Delete":if(this.pdfViewer.formDesigner&&e.annotation.formFieldAnnotationType)this.pdfViewer.formDesigner.deleteFormField(e.redoElement.id,!1);else{var a=!1,r=e.annotation.shapeAnnotationType;if("Line"!==n&&"LineWidthArrowHead"!==n&&"Polygon"!==n&&"Ellipse"!==n&&"Rectangle"!==n&&"Radius"!==n&&"Distance"!==n||(r=""===e.annotation.measureType||t.isNullOrUndefined(e.annotation.measureType)?"shape":"measure",this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(e.annotation,r,"delete"),this.modifyInCollections(e.annotation,"delete"),a=!0),"Stamp"===n&&(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(e.annotation,r,"delete"),this.stampAnnotationModule.updateSessionStorage(e.annotation,null,"delete"),a=!0),"FreeText"!==n&&"HandWrittenSignature"!==n&&"SignatureText"!==n&&"SignatureImage"!==n||(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(e.annotation,r,"delete"),this.modifyInCollections(e.annotation,"delete")),a||this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(e.annotation,r,"delete"),null!=(w=this.pdfViewer.nameTable[e.annotation.id.split("_")[0]])&&("SignatureField"===w.formFieldAnnotationType||"InitialField"===w.formFieldAnnotationType)){w.wrapper.children.splice(w.wrapper.children.indexOf(e.annotation.wrapper.children[0]),1),"SignatureText"===e.annotation.shapeAnnotationType&&w.wrapper.children.splice(w.wrapper.children.indexOf(e.annotation.wrapper.children[1]),1);for(var l=e.annotation.id.split("_")[0]+"_content",d=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),u=JSON.parse(d),M=0;M<u.length;M++)u[M].Key===l&&(u[M].FormField.value="",u[M].FormField.signatureType="",this.pdfViewerBase.formFieldCollection[M].FormField.value="",this.pdfViewerBase.formFieldCollection[M].FormField.signatureType="");window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))}this.pdfViewer.clearSelection(e.annotation.pageIndex),this.pdfViewer.remove(e.annotation),this.pdfViewer.renderDrawing(null,e.annotation.pageIndex);var p=document.getElementById(e.annotation.annotName);p&&(1===p.parentElement.childElementCount?this.stickyNotesAnnotationModule.updateAccordionContainer(p):p.remove())}break;case"stampOpacity":this.pdfViewer.nodePropertyChange(e.annotation,{opacity:e.redoElement.opacity}),this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e.annotation,null,!0);break;case"Shape Stroke":this.pdfViewer.nodePropertyChange(e.annotation,{strokeColor:e.redoElement.strokeColor}),this.modifyInCollections(e.annotation,"stroke"),this.pdfViewer.renderDrawing();break;case"Shape Fill":this.pdfViewer.nodePropertyChange(e.annotation,{fillColor:e.redoElement.fillColor}),this.modifyInCollections(e.annotation,"fill"),this.pdfViewer.renderDrawing();break;case"Shape Opacity":this.pdfViewer.nodePropertyChange(e.annotation,{opacity:e.redoElement.opacity}),"StickyNotes"===e.annotation.shapeAnnotationType?(this.stickyNotesAnnotationModule.updateOpacityValue(e.annotation),this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e.annotation,null,!0)):this.modifyInCollections(e.annotation,"opacity"),this.pdfViewer.renderDrawing();break;case"Shape Thickness":this.pdfViewer.nodePropertyChange(e.annotation,{thickness:e.redoElement.thickness}),this.modifyInCollections(e.annotation,"thickness"),this.pdfViewer.renderDrawing();break;case"Line properties change":this.pdfViewer.nodePropertyChange(e.annotation,{fillColor:e.redoElement.fillColor,strokeColor:e.redoElement.strokeColor,opacity:e.redoElement.opacity,thickness:e.redoElement.thickness,sourceDecoraterShapes:this.getArrowType(e.redoElement.lineHeadStart),taregetDecoraterShapes:this.getArrowType(e.redoElement.lineHeadEnd),borderDashArray:e.redoElement.borderDashArray,borderStyle:e.redoElement.borderStyle}),this.updateCollectionForLineProperty(e.annotation),this.pdfViewer.renderDrawing();break;case"Text Property Added":e.annotation=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.redoAction(e.annotation,e.action,e.undoElement),this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e.annotation,null,!0);break;case"Comments Property Added":e.annotation=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.redoAction(e.annotation,e.action,e.undoElement);break;case"Status Property Added":case"Comments Reply Deleted":e.annotation=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.redoAction(e.annotation,e.action);break;case"dynamicText Change":this.pdfViewer.annotation.freeTextAnnotationModule.isFreeTextValueChange=!0,e.annotation.dynamicText=e.redoElement.dynamicText;var L=this.pdfViewer.selectedItems.annotations[0];L&&(L.dynamicText=e.redoElement.dynamicText,L.bounds.height=e.redoElement.bounds.height),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.redoAction(e.annotation,e.action,e.undoElement),this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e.annotation,null,!0),this.modifyInCollections(e.annotation,"dynamicText"),L?this.pdfViewer.nodePropertyChange(L,{}):this.pdfViewer.nodePropertyChange(e.annotation,{}),this.pdfViewer.annotation.freeTextAnnotationModule.isFreeTextValueChange=!1,this.pdfViewer.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.pdfViewer.select([e.annotation.id]);break;case"fontColor":this.pdfViewer.nodePropertyChange(e.annotation,{fontColor:e.redoElement.fontColor}),this.modifyInCollections(e.annotation,"fontColor"),this.pdfViewer.renderDrawing();break;case"fontSize":this.pdfViewer.nodePropertyChange(e.annotation,{fontSize:e.redoElement.fontSize}),this.modifyInCollections(e.annotation,"fontSize"),this.pdfViewer.renderDrawing();break;case"textAlign":this.pdfViewer.nodePropertyChange(e.annotation,{textAlign:e.redoElement.textAlign}),this.modifyInCollections(e.annotation,"textAlign"),this.pdfViewer.renderDrawing();break;case"textPropertiesChange":this.pdfViewer.nodePropertyChange(e.annotation,{font:e.redoElement.font}),this.modifyInCollections(e.annotation,"textPropertiesChange"),this.pdfViewer.renderDrawing();break;case"Rotate":this.pdfViewer.nodePropertyChange(e.annotation.annotations[0],{bounds:e.redoElement.bounds,rotateAngle:e.redoElement.rotateAngle}),this.modifyInCollections(e.annotation.annotations[0],"bounds"),this.pdfViewer.renderDrawing();break;case"FormDesigner Properties Change":this.updateFormFieldPropertiesChanges(e.redoElement.formFieldAnnotationType,e.redoElement);break;case"FormField Value Change":if(e.annotation.formFieldAnnotationType)"RadioButton"==e.annotation.formFieldAnnotationType?(this.updateFormFieldValueChange(e.annotation.formFieldAnnotationType,e.undoElement,!0),this.updateFormFieldValueChange(e.annotation.formFieldAnnotationType,e.redoElement,!1)):this.updateFormFieldValueChange(e.annotation.formFieldAnnotationType,e.annotation,e.redoElement);else{document.getElementById(e.annotation.id+"_html_element").children[0].children[0].className="e-pdfviewer-signatureformfields-signature";var w=this.pdfViewer.nameTable[e.annotation.id.split("_")[0]],c=this.pdfViewer.nameTable[e.annotation.id];w.wrapper.children.push(c.wrapper.children[0]),"SignatureText"===e.annotation.shapeAnnotationType&&w.wrapper.children.push(c.wrapper.children[1]);for(var l=e.annotation.id.split("_")[0]+"_content",d=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),u=JSON.parse(d),M=0;M<u.length;M++)if(u[M].Key===l)if("SignatureText"===e.annotation.shapeAnnotationType)u[M].FormField.signatureType="Text",u[M].FormField.value=e.annotation.data,this.pdfViewerBase.formFieldCollection[M].FormField.value=e.annotation.data,this.pdfViewerBase.formFieldCollection[M].FormField.signatureType="Text";else if("SignatureImage"===e.annotation.shapeAnnotationType)u[M].FormField.signatureType="Image",u[M].FormField.value=e.annotation.data,this.pdfViewerBase.formFieldCollection[M].FormField.value=e.annotation.data,this.pdfViewerBase.formFieldCollection[M].FormField.signatureType="Image";else{u[M].FormField.signatureType="Path",this.pdfViewerBase.formFieldCollection[M].FormField.signatureType="Path";var C=i.processPathData(e.annotation.data),g=i.splitArrayCollection(C);u[M].FormField.value=JSON.stringify(g),this.pdfViewerBase.formFieldCollection[M].FormField.value=JSON.stringify(g)}this.pdfViewer.add(e.annotation);var m=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+e.pageIndex);this.pdfViewer.renderDrawing(m,e.pageIndex),window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))}}e.redoElement&&void 0!==e.redoElement.modifiedDate&&(e.annotation.modifiedDate=e.redoElement.modifiedDate),this.actionCollection.push(e),this.updateToolbar(),this.isUndoRedoAction=!1}},r.prototype.updateFormFieldValueChange=function(e,t,i){if(t){var n=this.pdfViewer.formDesigner.getFormField(t.id.split("_")[0]),o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),s=JSON.parse(o),a=this.pdfViewer.formDesigner.getFormFiledIndex(t.id.split("_")[0]);switch(e){case"Textbox":case"PasswordField":case"RadioButton":case"DropdownList":case"ListBox":var r=document.getElementById(t.id.split("_")[0]+"_content_html_element").firstElementChild.firstElementChild;if("Textbox"==e||"PasswordField"==e)n.value=i,this.pdfViewer.formDesigner.updateValuePropertyChange(n,r,!0,a,s);else if("RadioButton"==e)n.isSelected=i,this.pdfViewer.formDesigner.updateIsSelectedPropertyChange(n,r.firstElementChild,!0,a,s);else if("DropdownList"==e||"ListBox"==e)if(n.selectedIndex=i,s[a].FormField.selectedIndex=i,this.pdfViewerBase.formFieldCollection[a].FormField.selectedIndex=i,this.pdfViewer.nameTable[s[a].Key.split("_")[0]].selectedIndex=i,"ListBox"==e)for(var l=0;l<r.options.length;l++)r.options[l].selected=!!i.includes(l);else r.selectedIndex=i;break;case"Checkbox":var d=document.getElementById(t.id.split("_")[0]+"_content_html_element").firstElementChild.firstElementChild.lastElementChild;n.isChecked=i,this.pdfViewer.formDesigner.updateIsCheckedPropertyChange(n,d,!0,a,s)}window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))}},r.prototype.updateFormFieldPropertiesChanges=function(e,t){switch(e){case"Textbox":case"PasswordField":this.pdfViewer.formDesigner.updateTextboxFormDesignerProperties(t,!0);break;case"Checkbox":this.pdfViewer.formDesigner.updateCheckboxFormDesignerProperties(t,!0);break;case"RadioButton":this.pdfViewer.formDesigner.updateRadioButtonDesignerProperties(t,!0);break;case"DropdownList":this.pdfViewer.formDesigner.updateDropdownFormDesignerProperties(t,!0);break;case"ListBox":this.pdfViewer.formDesigner.updateListBoxFormDesignerProperties(t,!0);break;case"SignatureField":case"InitialField":this.pdfViewer.formDesigner.updateSignatureTextboxProperties(t,!0)}},r.prototype.updateCollectionForLineProperty=function(e){this.modifyInCollections(e,"fill"),this.modifyInCollections(e,"stroke"),this.modifyInCollections(e,"opacity"),this.modifyInCollections(e,"thickness"),this.modifyInCollections(e,"dashArray"),this.modifyInCollections(e,"startArrow"),this.modifyInCollections(e,"endArrow")},r.prototype.updateToolbar=function(){this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.updateUndoRedoButtons()},r.prototype.createNote=function(){this.popupNote=t.createElement("div",{id:this.pdfViewer.element.id+"_annotation_note",className:"e-pv-annotation-note",styles:"display:none"}),this.popupNoteAuthor=t.createElement("div",{id:this.pdfViewer.element.id+"_annotation_note_author",className:"e-pv-annotation-note-author"}),this.popupNote.appendChild(this.popupNoteAuthor),this.popupNoteContent=t.createElement("div",{id:this.pdfViewer.element.id+"_annotation_note_content",className:"e-pv-annotation-note-content"}),this.popupNote.appendChild(this.popupNoteContent),this.pdfViewerBase.mainContainer.appendChild(this.popupNote)},r.prototype.showPopupNote=function(e,t,i,n,o){var s=this.pdfViewerBase.mainContainer.getBoundingClientRect(),a=this.popupNote.getBoundingClientRect();i&&(this.popupNoteAuthor.textContent=i),this.popupNoteContent.textContent=n,"Highlight"===o?this.popupNote.style.backgroundColor="rgb(237, 232, 177)":"Underline"===o?this.popupNote.style.backgroundColor="rgb(187, 241, 191)":"Strikethrough"===o&&(this.popupNote.style.backgroundColor="rgb(242, 188, 207)"),this.popupNote.style.display="block";var r=e.pageY-s.top+5,l=e.pageX-s.left+5;l+a.width>s.width&&(l-=a.width),r+a.height>s.height&&(r-=a.height),this.popupNote.style.top=r+"px",this.popupNote.style.left=l+"px"},r.prototype.hidePopupNote=function(){this.popupNote&&(this.popupNote.style.display="none")},r.prototype.createTextMarkupPopup=function(){var e=this,i=this.pdfViewer.element.id;this.popupElement=t.createElement("div",{id:i+"_popup_annotation_note",className:"e-pv-annotation-popup-menu",styles:"display:none"});var n=t.createElement("div",{id:i+"_popup_header",className:"e-pv-annotation-popup-header"});this.authorPopupElement=t.createElement("div",{id:i+"_popup_author",className:"e-pv-annotation-popup-author"}),n.appendChild(this.authorPopupElement);var o=t.createElement("span",{id:i+"_popup_close",className:"e-pv-annotation-popup-close e-pv-icon"});n.appendChild(o),this.popupElement.appendChild(n),this.modifiedDateElement=t.createElement("div",{id:i+"_popup_modified_time",className:"e-pv-annotation-modified-time"}),this.popupElement.appendChild(this.modifiedDateElement);var s=t.createElement("div",{id:i+"_popup_content_container",className:"e-pv-annotation-popup-note-container"});this.noteContentElement=t.createElement("div",{id:i+"_popup_content",className:"e-pv-annotation-popup-content"}),this.noteContentElement.contentEditable="true",s.appendChild(this.noteContentElement),this.popupElement.appendChild(s),this.pdfViewerBase.viewerContainer.appendChild(this.popupElement),o.addEventListener("click",this.saveClosePopupMenu.bind(this)),o.addEventListener("touchend",this.saveClosePopupMenu.bind(this)),this.popupElement.addEventListener("mousedown",this.onPopupElementMoveStart.bind(this)),this.popupElement.addEventListener("mousemove",this.onPopupElementMove.bind(this)),window.addEventListener("mouseup",this.onPopupElementMoveEnd.bind(this)),this.popupElement.addEventListener("touchstart",this.onPopupElementMoveStart.bind(this)),this.popupElement.addEventListener("touchmove",this.onPopupElementMove.bind(this)),window.addEventListener("touchend",this.onPopupElementMoveEnd.bind(this)),this.noteContentElement.addEventListener("mousedown",function(){e.noteContentElement.focus()})},r.prototype.onPopupElementMoveStart=function(e){if("touchstart"===e.type&&(e=e.changedTouches[0]),e.target.id!==this.noteContentElement.id||!e.target.contains(this.noteContentElement.childNodes[0])){this.isPopupMenuMoved=!0;var t=this.popupElement.getBoundingClientRect();this.clientX=e.clientX-t.left,this.clientY=e.clientY-t.top+this.pdfViewerBase.pageSize[this.currentAnnotPageNumber].top*this.pdfViewerBase.getZoomFactor()}},r.prototype.onPopupElementMove=function(e){if("touchmove"===e.type&&(e=e.changedTouches[0]),this.isPopupMenuMoved&&(e.target.id!==this.noteContentElement.id||!e.target.contains(this.noteContentElement.childNodes[0]))){var t=e.clientX-this.clientX+parseFloat(this.popupElement.style.left),i=e.clientY-this.clientY+parseFloat(this.popupElement.style.top);this.clientX=e.clientX,this.clientY=e.clientY;var n=this.popupElement.getBoundingClientRect(),o=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+this.currentAnnotPageNumber);t>parseFloat(o.style.left)&&t+n.width<parseFloat(o.style.left)+parseFloat(o.style.width)?this.popupElement.style.left=t+"px":this.popupElement.style.left=parseFloat(this.popupElement.style.left)+"px",i>parseFloat(o.style.top)&&i+n.height<parseFloat(o.style.top)+parseFloat(o.style.height)?this.popupElement.style.top=i+"px":this.popupElement.style.top=parseFloat(this.popupElement.style.top)+"px"}},r.prototype.onPopupElementMoveEnd=function(){this.isPopupMenuMoved=!1},r.prototype.saveClosePopupMenu=function(){this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.saveNoteContent(this.currentAnnotPageNumber,this.noteContentElement.innerText),this.closePopupMenu()},r.prototype.closePopupMenu=function(){this.popupElement&&(this.popupElement.parentElement.removeChild(this.popupElement),this.popupElement=null,this.isPopupNoteVisible=!1)},r.prototype.showAnnotationPopup=function(e){if(this.textMarkupAnnotationModule&&(this.currentAnnotPageNumber=this.getEventPageNumber(e),this.textMarkupAnnotationModule&&(e.target!==this.noteContentElement||e.target.contains(this.noteContentElement.childNodes[0]))&&(this.hidePopupNote(),!this.popupElement))){this.createTextMarkupPopup(),this.popupElement.style.display="block",this.authorPopupElement.textContent=this.textMarkupAnnotationModule.currentTextMarkupAnnotation.author,this.modifiedDateElement.textContent=this.getProperDate(this.textMarkupAnnotationModule.currentTextMarkupAnnotation.modifiedDate),this.noteContentElement.textContent=this.textMarkupAnnotationModule.currentTextMarkupAnnotation.note;var t=this.popupElement.getBoundingClientRect(),i=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+this.currentAnnotPageNumber),n=i.getBoundingClientRect(),o=e.clientY-n.top+parseFloat(i.style.top),s=e.clientX;s+t.width>parseFloat(i.style.left)+parseFloat(i.style.width)?this.popupElement.style.left=s-t.width+"px":this.popupElement.style.left=s+"px",o+t.height>parseFloat(i.style.top)+parseFloat(i.style.height)?this.popupElement.style.top=o-t.height+"px":this.popupElement.style.top=o+"px",this.isPopupNoteVisible=!0}},r.prototype.modifyOpacity=function(e,t){var i=this.pdfViewer.selectedItems.annotations[0],n=m(i),o=m(i),s=1;s=t?e/100:e.value/100,i.opacity!==s&&(o.opacity=s,this.pdfViewer.nodePropertyChange(i,{opacity:s}),"StickyNotes"===i.shapeAnnotationType?this.stickyNotesAnnotationModule.updateOpacityValue(i):this.modifyInCollections(i,"opacity"),"HandWrittenSignature"===i.shapeAnnotationType||"SignatureImage"===i.shapeAnnotationType||"SignatureText"===i.shapeAnnotationType?this.pdfViewer.fireSignaturePropertiesChange(i.pageIndex,i.signatureName,i.shapeAnnotationType,!1,!0,!1,n.opacity,o.opacity):this.triggerAnnotationPropChange(i,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(i.pageIndex,null,i,"Shape Opacity","",n,o),this.pdfViewer.renderDrawing())},r.prototype.modifyFontColor=function(e){var t=this.pdfViewer.selectedItems.annotations[0],i=m(t),n=m(t);n.fontColor=e,this.pdfViewer.nodePropertyChange(t,{fontColor:e}),this.modifyInCollections(t,"fontColor"),this.triggerAnnotationPropChange(t,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"fontColor","",i,n),this.pdfViewer.renderDrawing()},r.prototype.modifyFontFamily=function(e){var t=this.pdfViewer.selectedItems.annotations[0],i=m(t),n=m(t);n.fontFamily=e,this.pdfViewer.nodePropertyChange(t,{fontFamily:e}),this.modifyInCollections(t,"fontFamily"),this.triggerAnnotationPropChange(t,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"fontFamily","",i,n),this.pdfViewer.renderDrawing()},r.prototype.modifyFontSize=function(e){var t=this.pdfViewer.selectedItems.annotations[0],i=m(t),n=m(t);n.fontSize=e;var o=this.freeTextAnnotationModule,s=t.bounds.x,a=t.bounds.y;if(t.fontSize=e,o.addInuptElemet({x:s,y:a},t),t){t.previousFontSize>e&&(o.inputBoxElement.style.height="auto",o.inputBoxElement.style.height=o.inputBoxElement.scrollHeight+5+"px");var r=parseFloat(o.inputBoxElement.style.height),l=parseFloat(o.inputBoxElement.style.width),d=this.pdfViewerBase.getZoomFactor();l=(l-1)/d;var u=(r=(r-1)/d)-t.bounds.height,M=void 0;u>0?M=(M=t.wrapper.offsetY+u/2)>0?M:void 0:(u=Math.abs(u),M=(M=t.wrapper.offsetY-u/2)>0?M:void 0),t.bounds.width=l,t.bounds.height=r,this.pdfViewer.nodePropertyChange(t,{fontSize:e,bounds:{width:t.bounds.width,height:t.bounds.height,y:M}}),this.pdfViewer.renderSelector(t.pageIndex,this.pdfViewer.annotationSelectorSettings),t.previousFontSize=e}this.modifyInCollections(t,"fontSize"),this.modifyInCollections(t,"bounds"),this.triggerAnnotationPropChange(t,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"fontSize","",i,n),this.pdfViewer.renderDrawing()},r.prototype.modifyTextAlignment=function(e){var t=this.pdfViewer.selectedItems.annotations[0],i=m(t),n=m(t);n.textAlign=e,this.pdfViewer.nodePropertyChange(t,{textAlign:e}),this.modifyInCollections(t,"textAlign"),this.triggerAnnotationPropChange(t,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"textAlign","",i,n),this.pdfViewer.renderDrawing()},r.prototype.modifyTextProperties=function(e,t){var i=this.pdfViewer.selectedItems.annotations[0],n=m(i),o=m(i);"bold"===t?o.font.isBold=e.isBold:"italic"===t?o.font.isItalic=e.isItalic:"underline"===t?(o.font.isUnderline=e.isUnderline,o.font.isUnderline&&o.font.isStrikeout&&(o.font.isStrikeout=!1)):"strikeout"===t&&(o.font.isStrikeout=e.isStrikeout,o.font.isUnderline&&o.font.isStrikeout&&(o.font.isUnderline=!1)),this.pdfViewer.nodePropertyChange(i,{font:e}),this.modifyInCollections(i,"textPropertiesChange"),this.triggerAnnotationPropChange(i,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(i.pageIndex,null,i,"textPropertiesChange","",n,o),this.pdfViewer.renderDrawing()},r.prototype.modifyThickness=function(e){var t=this.pdfViewer.selectedItems.annotations[0],i=m(t),n=m(t);n.thickness=e,this.pdfViewer.nodePropertyChange(t,{thickness:e}),this.modifyInCollections(t,"thickness"),"HandWrittenSignature"===t.shapeAnnotationType||"SignatureText"===t.shapeAnnotationType||"SignatureImage"===t.shapeAnnotationType?this.pdfViewer.fireSignaturePropertiesChange(t.pageIndex,t.signatureName,t.shapeAnnotationType,!1,!1,!0,i.thickness,n.thickness):this.triggerAnnotationPropChange(t,!1,!1,!0,!1),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"Shape Thickness","",i,n),this.pdfViewer.renderDrawing()},r.prototype.modifyStrokeColor=function(e){var t=this.pdfViewer.selectedItems.annotations[0],i=m(t),n=m(t);n.strokeColor=e,this.pdfViewer.nodePropertyChange(t,{strokeColor:e}),this.modifyInCollections(t,"stroke"),"HandWrittenSignature"===t.shapeAnnotationType||"SignatureText"===t.shapeAnnotationType||"SignatureImage"===t.shapeAnnotationType?this.pdfViewer.fireSignaturePropertiesChange(t.pageIndex,t.signatureName,t.shapeAnnotationType,!0,!1,!1,i.strokeColor,n.strokeColor):this.triggerAnnotationPropChange(t,!1,!0,!1,!1),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"Shape Stroke","",i,n),this.pdfViewer.renderDrawing()},r.prototype.modifyFillColor=function(e){var t=this.pdfViewer.selectedItems.annotations[0],i=m(t),n=m(t);n.fillColor=e,this.pdfViewer.nodePropertyChange(this.pdfViewer.selectedItems.annotations[0],{fillColor:e}),this.modifyInCollections(t,"fill"),this.triggerAnnotationPropChange(t,!0,!1,!1,!1),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"Shape Fill","",i,n),this.pdfViewer.renderDrawing()},r.prototype.modifyDynamicTextValue=function(e,t){var i=null;if(i=this.pdfViewer.selectedItems.annotations.filter(function(e){return e.annotName===t})[0]){var n=m(i),o=m(i);i.dynamicText=e,o.dynamicText=e,""===n.dynamicText&&(n.dynamicText=this.freeTextAnnotationModule.previousText),this.pdfViewer.nodePropertyChange(this.pdfViewer.selectedItems.annotations[0],{dynamicText:e}),this.pdfViewer.annotation.addAction(i.pageIndex,null,i,"dynamicText Change","",n,o),this.modifyInCollections(i,"dynamicText"),this.pdfViewer.renderDrawing()}},r.prototype.modifyInCollections=function(e,i){var n;return""===e.measureType||t.isNullOrUndefined(e.measureType)?n="FreeText"===e.shapeAnnotationType?this.freeTextAnnotationModule.modifyInCollection(i,e.pageIndex,e):"HandWrittenSignature"===e.shapeAnnotationType||"SignatureText"===e.shapeAnnotationType||"SignatureImage"===e.shapeAnnotationType?this.pdfViewerBase.signatureModule.modifySignatureCollection(i,e.pageIndex,e):"Stamp"===e.shapeAnnotationType?this.stampAnnotationModule.modifyInCollection(i,e.pageIndex,e):"Ink"===e.shapeAnnotationType?this.inkAnnotationModule.modifySignatureInkCollection(i,e.pageIndex,e):this.shapeAnnotationModule.modifyInCollection(i,e.pageIndex,e):"Distance"!==e.measureType&&"Perimeter"!==e.measureType&&"Radius"!==e.measureType&&"Area"!==e.measureType&&"Volume"!==e.measureType||(n=this.measureAnnotationModule.modifyInCollection(i,e.pageIndex,e)),this.isUndoRedoAction?(this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e,null,!0),this.isUndoAction&&(e.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime())):"bounds"!==i&&this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e),n},r.prototype.createPropertiesWindow=function(){var e=this;if(t.isBlazor()){var i=document.querySelector("#"+this.pdfViewer.element.id+"_properties_line_start"),n=document.querySelector("#"+this.pdfViewer.element.id+"_properties_line_end"),s=document.querySelector("#"+this.pdfViewer.element.id+"_line_thickness"),a=document.querySelector("#"+this.pdfViewer.element.id+"_properties_style"),r=document.querySelector("#"+this.pdfViewer.element.id+"_properties_fill_color_button"),l=document.querySelector("#"+this.pdfViewer.element.id+"_properties_stroke_color_button"),d=document.querySelector("#"+this.pdfViewer.element.id+"_properties_opacity"),u=document.querySelector("#"+this.pdfViewer.element.id+"_properties_leader_length");i&&n&&(i.value=this.getArrowString(this.pdfViewer.selectedItems.annotations[0].sourceDecoraterShapes),n.value=this.getArrowString(this.pdfViewer.selectedItems.annotations[0].taregetDecoraterShapes)),s.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeWidth,r.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill,l.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor,this.onStrokeColorChange(l.value),this.onFillColorChange(r.value),d.value=100*this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.opacity,parseInt(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray)>=3?a.value="Dashed":"2"===this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray?a.value="Dotted":"0"===this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray&&(a.value="Solid"),"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(u.value=parseInt(this.pdfViewer.selectedItems.annotations[0].leaderHeight.toString())),this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenPropertiesDialog")}else{var M=this.pdfViewer.element.id,p=t.createElement("div",{id:M+"_properties_window",className:"e-pv-properties-window"}),h=this.createAppearanceTab();this.pdfViewerBase.pageContainer.appendChild(p),this.propertiesDialog=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("Line Properties"),target:this.pdfViewer.element,content:h,close:function(){e.destroyPropertiesWindow()}}),!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.propertiesDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.onOkClicked.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.onCancelClicked.bind(this)}]:this.propertiesDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.onCancelClicked.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.onOkClicked.bind(this)}],this.pdfViewer.enableRtl&&(this.propertiesDialog.enableRtl=!0),this.propertiesDialog.appendTo(p),this.pdfViewer.selectedItems.annotations[0]&&"Line"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(document.getElementById(this.pdfViewer.element.id+"_properties_fill_color").disabled=!0),this.startArrowDropDown.content=this.createContent(this.getArrowString(this.pdfViewer.selectedItems.annotations[0].sourceDecoraterShapes)).outerHTML,this.endArrowDropDown.content=this.createContent(this.getArrowString(this.pdfViewer.selectedItems.annotations[0].taregetDecoraterShapes)).outerHTML,this.thicknessBox.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeWidth,this.fillColorPicker.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill,this.refreshColorPicker(this.fillColorPicker),this.strokeColorPicker.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor,this.refreshColorPicker(this.strokeColorPicker),this.updateColorInIcon(this.fillDropDown.element,this.fillColorPicker.value),this.updateColorInIcon(this.strokeDropDown.element,this.strokeColorPicker.value),this.opacitySlider.value=100*this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.opacity,this.updateOpacityIndicator(),parseInt(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray)>=3?this.lineStyleDropDown.content=this.createDropDownContent("dashed").outerHTML:"2"===this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray?this.lineStyleDropDown.content=this.createDropDownContent("dotted").outerHTML:"0"===this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray&&(this.lineStyleDropDown.content=this.createDropDownContent("solid").outerHTML),this.selectedLineStyle=this.pdfViewer.selectedItems.annotations[0].borderStyle,this.selectedLineDashArray=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray,"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(this.leaderLengthBox.value=this.pdfViewer.selectedItems.annotations[0].leaderHeight)}},r.prototype.destroyPropertiesWindow=function(){this.strokeColorPicker&&(this.strokeColorPicker.destroy(),this.strokeColorPicker=null),this.fillColorPicker&&(this.fillColorPicker.destroy(),this.fillColorPicker=null),this.endArrowDropDown&&(this.endArrowDropDown.destroy(),this.endArrowDropDown=null),this.startArrowDropDown&&(this.startArrowDropDown.destroy(),this.startArrowDropDown=null),this.opacitySlider&&(this.opacitySlider.destroy(),this.opacitySlider=null),this.thicknessBox&&(this.thicknessBox.destroy(),this.thicknessBox=null),this.lineStyleDropDown&&(this.lineStyleDropDown.destroy(),this.lineStyleDropDown=null),this.leaderLengthBox&&(this.leaderLengthBox.destroy(),this.leaderLengthBox=null),this.propertiesDialog&&(this.propertiesDialog.destroy(),this.propertiesDialog=null);var e=this.pdfViewerBase.getElement("_properties_window");e&&e.parentElement.removeChild(e)},r.prototype.refreshColorPicker=function(e){e.setProperties({value:e.value},!0),e.refresh()},r.prototype.createAppearanceTab=function(){var e=this,i=this.pdfViewer.element.id,o=[{text:this.pdfViewer.localeObj.getConstant("None")},{text:this.pdfViewer.localeObj.getConstant("Open Arrow")},{text:this.pdfViewer.localeObj.getConstant("Closed Arrow")},{text:this.pdfViewer.localeObj.getConstant("Round Arrow")},{text:this.pdfViewer.localeObj.getConstant("Square Arrow")},{text:this.pdfViewer.localeObj.getConstant("Diamond Arrow")}],a=t.createElement("div",{id:i+"_properties_appearance"}),r=t.createElement("div",{className:"e-pv-properties-line-style-prop"});a.appendChild(r);var l=this.createInputElement(this.pdfViewer.localeObj.getConstant("Start Arrow"),r,"text","button",!0,"e-pv-properties-line-start",i+"_properties_line_start");this.startArrowDropDown=new s.DropDownButton({items:o,cssClass:"e-pv-properties-line-start",select:this.onStartArrowHeadStyleSelect.bind(this)},l);var d=this.createInputElement(this.pdfViewer.localeObj.getConstant("End Arrow"),r,"text","button",!0,"e-pv-properties-line-end",i+"_properties_line_end"),u=t.createElement("div",{className:"e-pv-properties-border-style"});a.appendChild(u),this.endArrowDropDown=new s.DropDownButton({items:o,cssClass:"e-pv-properties-line-end",select:this.onEndArrowHeadStyleSelect.bind(this)},d);var M=this.createInputElement(this.pdfViewer.localeObj.getConstant("Line Style"),u,"text","button",!0,"e-pv-properties-line-style",i+"_properties_line_style"),p=this.createStyleList();this.lineStyleDropDown=new s.DropDownButton({cssClass:"e-pv-properties-line-style",target:p},M);var h=this.createInputElement(this.pdfViewer.localeObj.getConstant("Line Thickness"),u,"text","input",!0,"e-pv-properties-line-thickness",i+"_properties_thickness");this.thicknessBox=new n.NumericTextBox({value:0,format:"## pt",cssClass:"e-pv-properties-line-thickness",min:0,max:12},h);var L=t.createElement("div",{className:"e-pv-properties-color-style"});a.appendChild(L);var w=this.createInputElement(this.pdfViewer.localeObj.getConstant("Fill Color"),L,"color","button",!0,"e-pv-properties-line-fill-color",i+"_properties_fill_color");this.fillColorPicker=this.createColorPicker(i+"_properties_fill_color",!0),this.fillColorPicker.change=function(t){var i=""===t.currentValue.hex?"#ffffff00":t.currentValue.hex;e.fillDropDown.toggle(),e.updateColorInIcon(e.fillDropDown.element,i)},this.fillDropDown=this.createDropDownButton(w,"e-pv-properties-fill-color-icon",this.fillColorPicker.element.parentElement),this.fillDropDown.beforeOpen=this.onFillDropDownBeforeOpen.bind(this),this.fillDropDown.open=function(){e.fillColorPicker.refresh()};var c=this.createInputElement(this.pdfViewer.localeObj.getConstant("Line Color"),L,"color","button",!0,"e-pv-properties-line-stroke-color",i+"_properties_stroke_color");this.strokeColorPicker=this.createColorPicker(i+"_properties_stroke_color",!1),this.strokeColorPicker.change=function(t){var i=""===t.currentValue.hex?"#ffffff00":t.currentValue.hex;e.strokeDropDown.toggle(),e.updateColorInIcon(e.strokeDropDown.element,i)},this.strokeDropDown=this.createDropDownButton(c,"e-pv-properties-stroke-color-icon",this.strokeColorPicker.element.parentElement),this.strokeDropDown.beforeOpen=this.onStrokeDropDownBeforeOpen.bind(this),this.strokeDropDown.open=function(){e.strokeColorPicker.refresh()};var C=t.createElement("div",{className:"e-pv-properties-opacity-style"});a.appendChild(C);var g=this.createInputElement(this.pdfViewer.localeObj.getConstant("Opacity"),C,"","div",!0,"e-pv-properties-line-opacity",i+"_properties_opacity");if(this.opacitySlider=new n.Slider({type:"MinRange",max:100,min:0,cssClass:"e-pv-properties-line-opacity",change:function(){e.updateOpacityIndicator()}},g),"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType){var m=this.createInputElement(this.pdfViewer.localeObj.getConstant("Leader Length"),C,"text","input",!0,"e-pv-properties-line-leader-length",i+"_properties_leader_length");this.leaderLengthBox=new n.NumericTextBox({value:0,format:"## pt",cssClass:"e-pv-properties-line-leader-length",min:0,max:100},m)}return a},r.prototype.createContent=function(e){var i=t.createElement("div",{className:"e-pv-properties-line-style-content"});return i.textContent=e,i},r.prototype.onStrokeDropDownBeforeOpen=function(){1===this.pdfViewer.selectedItems.annotations.length&&(this.strokeColorPicker.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor),this.strokeColorPicker.refresh()},r.prototype.onFillDropDownBeforeOpen=function(){1===this.pdfViewer.selectedItems.annotations.length&&(this.fillColorPicker.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor),this.fillColorPicker.refresh()},r.prototype.createStyleList=function(){var e=this,i=t.createElement("ul");document.body.appendChild(i);var n=this.createListForStyle("solid");n.addEventListener("click",function(){e.setThickness("0","solid")}),i.appendChild(n);var o=this.createListForStyle("dotted");o.addEventListener("click",function(){e.setThickness("2","dotted")}),i.appendChild(o);var s=this.createListForStyle("dashed");return s.addEventListener("click",function(){e.setThickness("3","dashed")}),i.appendChild(s),i},r.prototype.createColorPicker=function(e,i){var o=t.createElement("input",{id:e+"_target"});document.body.appendChild(o);var s=new n.ColorPicker({inline:!0,mode:"Palette",enableOpacity:!1,value:"#000000",showButtons:!1,modeSwitcher:!1,noColor:i});return this.pdfViewer.enableRtl&&(s.enableRtl=!0),s.appendTo(o),s},r.prototype.createDropDownButton=function(e,t,i){var n=new s.DropDownButton({iconCss:t+" e-pv-icon",target:i});return this.pdfViewer.enableRtl&&(n.enableRtl=!0),n.appendTo(e),n},r.prototype.updateColorInIcon=function(e,t){e.childNodes[0].style.borderBottomColor=t},r.prototype.onFillColorChange=function(e){var t=document.querySelector("#"+this.pdfViewer.element.id+"_properties_fill_color_button");"transparent"!==e&&(t.children[0].style.borderBottomColor=e)},r.prototype.onStrokeColorChange=function(e){var t=document.querySelector("#"+this.pdfViewer.element.id+"_properties_stroke_color_button");"transparent"!==e&&(t.children[0].style.borderBottomColor=e)},r.prototype.setThickness=function(e,t,i){i||(this.lineStyleDropDown.content=this.createDropDownContent(t).outerHTML),this.selectedLineDashArray=e,"0"===e?this.selectedLineStyle="Solid":"2"!==e&&"3"!==e||(this.selectedLineStyle="Dashed")},r.prototype.createDropDownContent=function(e){var i=t.createElement("div",{className:"e-pv-line-styles-content-container"}),n=t.createElement("span",{className:"e-pv-line-styles-content",styles:"border-bottom-style:"+e});return i.appendChild(n),i},r.prototype.createListForStyle=function(e){var i=t.createElement("li",{className:"e-menu-item"}),n=t.createElement("div",{className:"e-pv-line-styles-container"}),o=t.createElement("span",{className:"e-pv-line-styles-item",styles:"border-bottom-style:"+e});return n.appendChild(o),i.appendChild(n),i},r.prototype.onStartArrowHeadStyleSelect=function(e){this.startArrowDropDown.content=this.createContent(e.item.text).outerHTML},r.prototype.onEndArrowHeadStyleSelect=function(e){this.endArrowDropDown.content=this.createContent(e.item.text).outerHTML},r.prototype.createInputElement=function(e,i,n,o,s,a,r){var l=t.createElement("div",{id:r+"_container",className:a+"-container"});if(s){var d=t.createElement("div",{id:r+"_label",className:a+"-label"});d.textContent=e,l.appendChild(d)}this.pdfViewer.localeObj.getConstant("Opacity")===e&&(this.opacityIndicator=t.createElement("span",{className:"e-pv-properties-opacity-indicator"}),l.appendChild(this.opacityIndicator));var u=t.createElement(o,{id:r});return"input"===o&&(u.type=n),l.appendChild(u),i.appendChild(l),u},r.prototype.updateOpacityIndicator=function(){this.opacityIndicator.textContent=this.opacitySlider.value+"%"},r.prototype.onOkClicked=function(){var e,i,n,o,s,a;if(t.isBlazor()){var r=document.querySelector("#"+this.pdfViewer.element.id+"_properties_line_start"),l=document.querySelector("#"+this.pdfViewer.element.id+"_properties_line_end"),d=document.querySelector("#"+this.pdfViewer.element.id+"_line_thickness"),u=document.querySelector("#"+this.pdfViewer.element.id+"_properties_style"),M=document.querySelector("#"+this.pdfViewer.element.id+"_properties_fill_color_button"),p=document.querySelector("#"+this.pdfViewer.element.id+"_properties_stroke_color_button"),h=document.querySelector("#"+this.pdfViewer.element.id+"_properties_opacity");e=this.getArrowTypeFromDropDown(r.value,!0),i=this.getArrowTypeFromDropDown(l.value,!0),n=parseInt(d.value),o=""===(o=this.getValue(p.children[0].style.borderBottomColor,"hex"))?"#ffffff00":o,s=""===(s=this.getValue(M.children[0].style.borderBottomColor,"hex"))?"#ffffff00":s,a=h.value/100,u.value&&("Solid"===u.value?this.setThickness("0","solid",!0):"Dotted"===u.value?this.setThickness("2","dotted",!0):"Dashed"===u.value&&this.setThickness("3","dashed",!0))}else e=this.getArrowTypeFromDropDown(this.startArrowDropDown.content),i=this.getArrowTypeFromDropDown(this.endArrowDropDown.content),n=this.thicknessBox.value,o=""===(o=this.strokeColorPicker.getValue(this.strokeColorPicker.value,"hex"))?"#ffffff00":o,s=""===(s=this.fillColorPicker.getValue(this.fillColorPicker.value,"hex"))||"#transp"===s||"#ffffff00"===this.fillColorPicker.value?"#ffffff00":s,a=this.opacitySlider.value/100;var L=this.pdfViewer.selectedItems.annotations[0],w=m(L),c=m(L),C={},g=!1,f=!1,y=!1,j=!1,S=!1,A=!1,T=!1;if(e!==L.sourceDecoraterShapes&&(C.sourceDecoraterShapes=e,c.lineHeadStart=this.getArrowString(e),S=!0),i!==L.taregetDecoraterShapes&&(C.taregetDecoraterShapes=i,c.lineHeadEnd=this.getArrowString(i),A=!0),n!==L.wrapper.children[0].style.strokeWidth&&(C.thickness=n,c.thickness=n,y=!0),o!==L.wrapper.children[0].style.strokeColor&&(C.strokeColor=o,c.strokeColor=o,f=!0),s!==L.wrapper.children[0].style.fill&&(C.fillColor=s,c.fillColor=s,g=!0),a!==L.wrapper.children[0].style.opacity&&(C.opacity=a,c.opacity=a,j=!0),this.selectedLineDashArray!==L.wrapper.children[0].style.strokeDashArray&&(C.borderDashArray=this.selectedLineDashArray,C.borderStyle=this.selectedLineStyle,c.borderDashArray=C.borderDashArray,c.borderStyle=C.borderStyle,T=!0),t.isBlazor()){var x=document.querySelector("#"+this.pdfViewer.element.id+"_properties_leader_length");"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&parseInt(x.value)!==this.pdfViewer.selectedItems.annotations[0].leaderHeight&&(C.leaderHeight=parseInt(x.value))}else"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&this.leaderLengthBox.value!==this.pdfViewer.selectedItems.annotations[0].leaderHeight&&(C.leaderHeight=this.leaderLengthBox.value);this.pdfViewer.nodePropertyChange(this.pdfViewer.selectedItems.annotations[0],C),this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill=s,this.triggerAnnotationPropChange(this.pdfViewer.selectedItems.annotations[0],g,f,y,j,S,A,T),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"thickness"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"stroke"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"fill"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"opacity"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"dashArray"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"startArrow"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"endArrow"),"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"leaderLength"),this.pdfViewer.annotation.addAction(L.pageIndex,null,L,"Line properties change","",w,c),this.renderAnnotations(L.pageIndex,null,null,null),t.isBlazor()||this.propertiesDialog.hide()},r.prototype.onCancelClicked=function(){this.propertiesDialog.hide()},r.prototype.getArrowTypeFromDropDown=function(e,t){t||(e=e.split("</div>")[0].split('">')[1]);var i="None";switch(e){case this.pdfViewer.localeObj.getConstant("None"):i="None";break;case this.pdfViewer.localeObj.getConstant("Open Arrow"):i="OpenArrow";break;case this.pdfViewer.localeObj.getConstant("Closed Arrow"):i="Arrow";break;case this.pdfViewer.localeObj.getConstant("Round Arrow"):i="Circle";break;case this.pdfViewer.localeObj.getConstant("Square Arrow"):i="Square";break;case this.pdfViewer.localeObj.getConstant("Diamond Arrow"):i="Diamond";break;case this.pdfViewer.localeObj.getConstant("Butt"):i="Butt"}return i},r.prototype.getArrowString=function(e){var t=this.pdfViewer.localeObj.getConstant("None");switch(e){case"Arrow":t=this.pdfViewer.localeObj.getConstant("Closed");break;case"OpenArrow":t=this.pdfViewer.localeObj.getConstant("Open Arrow");break;case"Circle":t=this.pdfViewer.localeObj.getConstant("Round");break;case"None":case"Square":case"Diamond":t=this.pdfViewer.localeObj.getConstant(e);break;case"Butt":t=this.pdfViewer.localeObj.getConstant("Butt")}return t},r.prototype.onAnnotationMouseUp=function(){if(0!==this.pdfViewer.selectedItems.annotations.length)this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&(this.enableBasedOnType(),this.pdfViewer.toolbar.annotationToolbarModule.selectAnnotationDeleteItem(!0),t.Browser.isDevice||this.pdfViewer.toolbar.annotationToolbarModule.updateAnnnotationPropertyItems()),this.pdfViewerBase.disableTextSelectionMode();else if(!this.pdfViewer.textSelectionModule||this.pdfViewerBase.isPanMode||this.pdfViewer.designerMode||this.pdfViewer.textSelectionModule.enableTextSelectionMode(),this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&(!t.Browser.isDevice||this.pdfViewer.enableDesktopMode)){var e=this.pdfViewer.toolbar.annotationToolbarModule.inkAnnotationSelected;!this.pdfViewer.annotation.freeTextAnnotationModule||this.pdfViewer.annotation.freeTextAnnotationModule.isInuptBoxInFocus||e||(this.pdfViewer.toolbar.annotationToolbarModule.enableAnnotationPropertiesTools(!1),this.pdfViewer.toolbar.annotationToolbarModule.enableFreeTextAnnotationPropertiesTools(!1)),this.pdfViewer.toolbar.annotationToolbarModule.updateAnnnotationPropertyItems(),this.pdfViewer.toolbar.annotationToolbarModule.selectAnnotationDeleteItem(!1)}},r.prototype.onShapesMouseup=function(e,i){if(e=t.isNullOrUndefined(e)?this.pdfViewer.selectedItems.annotations[0]:e){if(this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.currentTextMarkupAnnotation&&(this.textMarkupAnnotationModule.currentTextMarkupAnnotation=null,this.textMarkupAnnotationModule.selectTextMarkupCurrentPage=null),(this.pdfViewerBase.tool instanceof ut||this.pdfViewerBase.tool instanceof pt)&&!this.pdfViewerBase.tool.dragging){var n={opacity:e.opacity,fillColor:e.fillColor,strokeColor:e.strokeColor,thickness:e.thickness,author:e.author,subject:e.subject,modifiedDate:e.modifiedDate};this.getAnnotationIndex(e.pageIndex,e.id),e.bounds.x,e.bounds.y,e.bounds.width,e.bounds.height;this.pdfViewerBase.tool instanceof pt&&(n.lineHeadStartStyle=this.getArrowString(e.sourceDecoraterShapes),n.lineHeadEndStyle=this.getArrowString(e.taregetDecoraterShapes),n.borderDashArray=e.borderDashArray),this.pdfViewerBase.isAnnotationAdded&&"Distance"!==e.measureType||(""===e.measureType||t.isNullOrUndefined(e.measureType)?this.shapeAnnotationModule.renderShapeAnnotations(e,this.pdfViewer.annotation.getEventPageNumber(i)):"Distance"!==e.measureType&&"Perimeter"!==e.measureType&&"Radius"!==e.measureType||this.measureAnnotationModule.renderMeasureShapeAnnotations(e,this.pdfViewer.annotation.getEventPageNumber(i))),this.pdfViewer.isDocumentEdited=!0}else this.pdfViewerBase.tool instanceof st||this.pdfViewerBase.tool instanceof dt?(this.pdfViewer.isDocumentEdited=!0,""===e.measureType||t.isNullOrUndefined(e.measureType)?"FreeText"===e.shapeAnnotationType?this.pdfViewer.annotation.freeTextAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),e):"HandWrittenSignature"===e.shapeAnnotationType||"SignatureImage"===e.shapeAnnotationType||"SignatureText"===e.shapeAnnotationType?this.pdfViewerBase.signatureModule.modifySignatureCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),e):"Ink"===e.shapeAnnotationType?this.inkAnnotationModule.modifySignatureInkCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),e):"Stamp"===e.shapeAnnotationType||"Image"===e.shapeAnnotationType?this.stampAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),e):this.pdfViewer.annotation.shapeAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),e):"Distance"!==e.measureType&&"Perimeter"!==e.measureType&&"Radius"!==e.measureType&&"Area"!==e.measureType&&"Volume"!==e.measureType||this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),e),this.pdfViewerBase.tool instanceof dt&&(e.formFieldAnnotationType||this.triggerAnnotationResize(e)),this.pdfViewerBase.tool instanceof st&&"Select"!==this.pdfViewerBase.action&&(e.formFieldAnnotationType||this.triggerAnnotationMove(e))):this.pdfViewerBase.tool instanceof lt&&(this.pdfViewer.isDocumentEdited=!0,""===e.measureType||t.isNullOrUndefined(e.measureType)?"Line"!==e.shapeAnnotationType&&"LineWidthArrowHead"!==e.shapeAnnotationType&&"Polygon"!==e.shapeAnnotationType||this.pdfViewer.annotation.shapeAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),e):"Distance"!==e.measureType&&"Perimeter"!==e.measureType&&"Area"!==e.measureType&&"Volume"!==e.measureType||("Distance"===e.measureType&&this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("leaderLength",this.pdfViewer.annotation.getEventPageNumber(i),e),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),e)),this.triggerAnnotationResize(e));this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.annotationMenuObj&&this.pdfViewer.isSignatureEditable&&("HandWrittenSignature"===e.shapeAnnotationType||"SignatureText"===e.shapeAnnotationType||"SignatureImage"===e.shapeAnnotationType)&&(this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export Annotations")],!0),this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export XFDF")],!0)),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.enableAnnotationToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.clearTextMarkupMode(),""===e.measureType||t.isNullOrUndefined(e.measureType)?this.pdfViewer.toolbarModule.annotationToolbarModule.clearMeasureMode():"Distance"!==e.measureType&&"Perimeter"!==e.measureType&&"Area"!==e.measureType&&"Volume"!==e.measureType&&"Radius"!==e.measureType||this.pdfViewer.toolbarModule.annotationToolbarModule.clearShapeMode(),1===this.pdfViewer.selectedItems.annotations.length&&null===this.pdfViewer.selectedItems.annotations[0].formFieldAnnotationType&&this.pdfViewer.toolbarModule.annotationToolbarModule.enableAnnotationPropertiesTools(!0),t.isBlazor()||1===this.pdfViewer.selectedItems.annotations.length&&(this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(!0),this.pdfViewer.toolbarModule.annotationToolbarModule.setCurrentColorInPicker(),this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem),this.pdfViewer.isAnnotationToolbarVisible&&this.pdfViewer.isFormDesignerToolbarVisible&&(document.getElementById(this.pdfViewer.element.id+"_formdesigner_toolbar").style.display="none",this.pdfViewer.toolbarModule&&(this.pdfViewer.toolbarModule.formDesignerToolbarModule.isToolbarHidden=!1,this.pdfViewer.toolbarModule.formDesignerToolbarModule.showFormDesignerToolbar(this.pdfViewer.toolbarModule.formDesignerItem),this.pdfViewer.toolbarModule.annotationToolbarModule.adjustViewer(!0)))))}},r.prototype.updateCalibrateValues=function(e,t){"Distance"===e.measureType?(e.notes=E(e,e.vertexPoints,this.measureAnnotationModule),!0===e.enableShapeLabel&&(e.labelContent=e.notes),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",e.pageIndex,e,t),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(e.annotName,e.notes),this.renderAnnotations(e.pageIndex,null,null,null,null)):"Radius"===e.measureType?(e.notes=V(e,this.measureAnnotationModule),!0===e.enableShapeLabel&&(e.labelContent=e.notes),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",e.pageIndex,e,t),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(e.annotName,e.notes),this.renderAnnotations(e.pageIndex,null,null,null,null)):"Perimeter"===e.measureType?(e.notes=k(e,e.vertexPoints,this.measureAnnotationModule),!0===e.enableShapeLabel&&(e.labelContent=e.notes),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",e.pageIndex,e,t),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(e.annotName,e.notes),this.renderAnnotations(e.pageIndex,null,null,null,null)):"Area"===e.measureType?(e.notes=this.measureAnnotationModule.calculateArea(e.vertexPoints,e.id,e.pageIndex),!0===e.enableShapeLabel&&(e.labelContent=e.notes,P(e)),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",e.pageIndex,e,t),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(e.annotName,e.notes),this.renderAnnotations(e.pageIndex,null,null,null,null)):"Volume"===e.measureType&&(e.notes=this.measureAnnotationModule.calculateVolume(e.vertexPoints,e.id,e.pageIndex),!0===e.enableShapeLabel&&(e.labelContent=e.notes,P(e)),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",e.pageIndex,e,t),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(e.annotName,e.notes),this.renderAnnotations(e.pageIndex,null,null,null,null))},r.prototype.onAnnotationMouseDown=function(){if(1===this.pdfViewer.selectedItems.annotations.length&&null===this.pdfViewer.selectedItems.annotations[0].formFieldAnnotationType&&this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule){if(!t.isBlazor()&&t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&"none"===document.getElementById(this.pdfViewer.element.id+"_commantPanel").style.display)if(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)this.pdfViewer.toolbarModule.annotationToolbarModule.createPropertyTools("");else{this.pdfViewer.toolbarModule.annotationToolbarModule.createPropertyTools(this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType);var e=document.getElementById(this.pdfViewer.element.id+"_annotationIcon");e&&!e.parentElement.classList.contains("e-pv-select")&&e.parentElement.classList.add("e-pv-select")}this.enableBasedOnType(),this.pdfViewer.toolbar.annotationToolbarModule.selectAnnotationDeleteItem(!0)}},r.prototype.enableBasedOnType=function(){var e=!1,i=this.pdfViewer.selectedItems.annotations[0];i&&i.annotationSettings&&(e=i.annotationSettings.isLock)&&this.checkAllowedInteractions("PropertyChange",i)&&(e=!1),!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?e||("Stamp"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"Image"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableStampAnnotationPropertiesTools(!0):"StickyNotes"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableStampAnnotationPropertiesTools(!0):"Path"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"SignatureImage"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"SignatureText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableAnnotationPropertiesTools(!1):"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableFreeTextAnnotationPropertiesTools(!0):"HandWrittenSignature"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableSignaturePropertiesTools(!0):"Ink"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableSignaturePropertiesTools(!0):1===this.pdfViewer.selectedItems.annotations.length&&null===this.pdfViewer.selectedItems.annotations[0].formFieldAnnotationType&&this.pdfViewer.toolbar.annotationToolbarModule.enableAnnotationPropertiesTools(!0)):this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation||"Path"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||!t.Browser.isDevice||this.pdfViewer.enableDesktopMode||this.pdfViewer.toolbarModule.annotationToolbarModule.createMobileAnnotationToolbar(!0,!0)},r.prototype.getProperDate=function(e){var t=new Date(e.toString());if(isNaN(t.getFullYear())){var i=e.slice(2,16);i=i.slice(0,4)+"/"+i.slice(4,6)+"/"+i.slice(6,8)+" "+i.slice(8,10)+":"+i.slice(10,12)+":"+i.slice(12,14),t=new Date(i)}return t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},r.prototype.getPageCollection=function(e,t){for(var i=null,n=0;n<e.length;n++)if(e[n].pageIndex===t){i=n;break}return i},r.prototype.getAnnotationWithId=function(e,t){for(var i,n=0;n<e.length;n++)t===e[n].id&&(i=e[n]);return i},r.prototype.getEventPageNumber=function(e){var t=e.target;t.classList.contains("e-pv-hyperlink")?t=t.parentElement:t.parentElement.classList.contains("foreign-object")&&(t=t.parentElement.parentElement.parentElement.parentElement);var i=t.id.split("_text_")[1]||t.id.split("_textLayer_")[1]||t.id.split("_annotationCanvas_")[1]||t.id.split("_pageDiv_")[1];return isNaN(i)&&(e=this.pdfViewerBase.annotationEvent)&&(i=(t=e.target).id.split("_text_")[1]||t.id.split("_textLayer_")[1]||t.id.split("_annotationCanvas_")[1]||t.id.split("_pageDiv_")[1]),parseInt(i)},r.prototype.getAnnotationComments=function(e,t,i){var n=[],o=null;if(e&&e.length>0)for(var s=0;s<e.length;s++){var a=e[s];o={shapeAnnotationType:"sticky",author:a.Author,modifiedDate:a.ModifiedDate,note:a.Note,state:a.state,stateModel:a.stateModel,comments:[],review:{state:a.State,stateModel:a.StateModel,modifiedDate:a.ModifiedDate,author:a.Author},annotName:a.AnnotName,parentId:t.AnnotName,subject:"Comments",isLock:a.IsLock},n[n.length]=o}return n},r.prototype.getRandomNumber=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){return(16*Math.random()|0).toString(16)})},r.prototype.createGUID=function(){return this.getRandomNumber()},r.prototype.createAnnotationLayer=function(e,i,n,o,s){var a=t.createElement("canvas",{id:this.pdfViewer.element.id+"_annotationCanvas_"+o,className:"e-pv-annotation-canvas"});return a.width=i,a.height=n,a.style.display=s,this.pdfViewerBase.applyElementStyles(a,o),e.appendChild(a),a},r.prototype.resizeAnnotations=function(e,t,i){var n=this.pdfViewerBase.getElement("_annotationCanvas_"+i);n&&(n.style.width=e+"px",n.style.height=t+"px",this.pdfViewerBase.applyElementStyles(n,i))},r.prototype.clearAnnotationCanvas=function(e){var t=this.pdfViewerBase.getElement("_annotationCanvas_"+e);t&&(t.width=this.pdfViewerBase.pageSize[e].width*this.pdfViewerBase.getZoomFactor(),t.height=this.pdfViewerBase.pageSize[e].height*this.pdfViewerBase.getZoomFactor())},r.prototype.renderAnnotations=function(e,t,i,n,o,s){this.clearAnnotationCanvas(e),this.shapeAnnotationModule&&(s?this.shapeAnnotationModule.renderShapeAnnotations(t,e,!0):this.shapeAnnotationModule.renderShapeAnnotations(t,e)),this.measureAnnotationModule&&(s?this.measureAnnotationModule.renderMeasureShapeAnnotations(i,e,!0):this.measureAnnotationModule.renderMeasureShapeAnnotations(i,e)),o=null!==o&&void 0!==o?o:this.pdfViewerBase.getElement("_annotationCanvas_"+e),this.pdfViewer.drawing.refreshCanvasDiagramLayer(o,e),this.textMarkupAnnotationModule&&(s?this.textMarkupAnnotationModule.renderTextMarkupAnnotationsInPage(n,e,!0):this.textMarkupAnnotationModule.renderTextMarkupAnnotationsInPage(n,e))},r.prototype.storeAnnotations=function(e,t,i){Math.round(JSON.stringify(window.sessionStorage).length/1024)>4500&&(this.clearAnnotationStorage(),this.pdfViewerBase.isStorageExceed=!0);var n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+i);this.pdfViewerBase.isStorageExceed&&(n=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+i]);var o=0;if(n){this.storeAnnotationCollections(t,e);var s=JSON.parse(n);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+i);var a=this.pdfViewer.annotationModule.getPageCollection(s,e);if(s[a])s[a].annotations.push(t),o=s[a].annotations.indexOf(t);else{var r={pageIndex:e,annotations:[]};r.annotations.push(t),o=r.annotations.indexOf(t),s.push(r)}u=JSON.stringify(s);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+i]=u:window.sessionStorage.setItem(this.pdfViewerBase.documentId+i,u)}else{this.storeAnnotationCollections(t,e);var l={pageIndex:e,annotations:[]};l.annotations.push(t),o=l.annotations.indexOf(t);var d=[];d.push(l);var u=JSON.stringify(d);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+i]=u:window.sessionStorage.setItem(this.pdfViewerBase.documentId+i,u)}return o},r.prototype.getArrowType=function(e){var t="None";switch(e){case"ClosedArrow":case"Closed":t="Arrow";break;case"OpenArrow":case"Open":t="OpenArrow";break;case"Square":t="Square";break;case"Circle":case"Round":t="Circle";break;case"Diamond":t="Diamond";break;case"Butt":t="Butt"}return t},r.prototype.getArrowTypeForCollection=function(e){var t;switch(e){case"Arrow":t="ClosedArrow";break;case"OpenArrow":case"Square":case"Circle":case"Diamond":case"None":t=e.toString();break;case"Butt":t="Butt"}return t},r.prototype.getBounds=function(e,t){var i=this.pdfViewerBase.pageSize[t];return i?1===i.rotation?{left:e.top,top:i.width-(e.left+e.width),width:e.height,height:e.width}:2===i.rotation?{left:i.width-e.left-e.width,top:i.height-e.top-e.height,width:e.width,height:e.height}:3===i.rotation?{left:i.height-e.top-e.height,top:e.left,width:e.height,height:e.width}:e:e},r.prototype.getInkBounds=function(e,t){var i=this.pdfViewerBase.pageSize[t];return i?1===i.rotation?{x:e.y,y:i.width-(e.x+e.width),width:e.height,height:e.width}:2===i.rotation?{x:i.width-e.x-e.width,y:i.height-e.y-e.height,width:e.width,height:e.height}:3===i.rotation?{x:i.height-e.y-e.height,y:e.x,width:e.height,height:e.width}:e:e},r.prototype.getVertexPoints=function(e,t){if(e){var i=this.pdfViewerBase.pageSize[t];if(1===i.rotation){for(var n=[],o=0;o<e.length;o++){r={x:e[o].y,y:i.width-e[o].x};n.push(r)}return n}if(2===i.rotation){for(var s=[],o=0;o<e.length;o++){r={x:i.width-e[o].x,y:i.height-e[o].y};s.push(r)}return s}if(3===i.rotation){for(var a=[],o=0;o<e.length;o++){var r={x:i.height-e[o].y,y:e[o].x};a.push(r)}return a}return e}},r.prototype.getStoredAnnotations=function(e,t,i){var n,o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+i);if(this.pdfViewerBase.isStorageExceed&&(o=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+i]),o){var s=JSON.parse(o),a=this.pdfViewer.annotationModule.getPageCollection(s,e);n=s[a]?s[a].annotations:null}else n=null;return n},r.prototype.triggerAnnotationPropChange=function(e,t,i,n,o,s,a,r,l,d,u){this.getAnnotationIndex(e.pageIndex,e.id);var M=this.getAnnotationType(e.shapeAnnotationType,e.measureType),p={name:"annotationPropertiesChange",pageIndex:e.pageIndex,annotationId:e.annotName,annotationType:M,isColorChanged:t,isOpacityChanged:o,isThicknessChanged:n,isStrokeColorChanged:i};l&&(p.isFreeTextChanged=l,p.previousText=d,p.currentText=u),s&&(p.isLineHeadStartStyleChanged=s),a&&(p.isLineHeadEndStyleChanged=a),r&&(p.isBorderDashArrayChanged=r),this.pdfViewer.trigger("annotationPropertiesChange",p)},r.prototype.triggerAnnotationAdd=function(e){var t={opacity:e.opacity,fillColor:e.fillColor,strokeColor:e.strokeColor,thickness:e.thickness,author:e.author,subject:e.subject,modifiedDate:e.modifiedDate},i={left:e.wrapper.bounds.x,top:e.wrapper.bounds.y,width:e.wrapper.bounds.width,height:e.wrapper.bounds.height},n=this.getAnnotationType(e.shapeAnnotationType,e.measureType);"Line"!==n&&"Arrow"!==n&&"Distance"!==n&&"Perimeter"!==n||(t.lineHeadStartStyle=this.getArrowString(e.sourceDecoraterShapes),t.lineHeadEndStyle=this.getArrowString(e.taregetDecoraterShapes),t.borderDashArray=e.borderDashArray);var o;this.pdfViewer.enableShapeLabel?(o={fontColor:e.fontColor,fontSize:e.fontSize,fontFamily:e.fontFamily,opacity:e.labelOpacity,labelContent:e.labelContent,fillColor:e.labelFillColor},this.pdfViewer.fireAnnotationAdd(e.pageIndex,e.annotName,n,i,t,null,null,null,o)):this.pdfViewer.fireAnnotationAdd(e.pageIndex,e.annotName,n,i,t)},r.prototype.triggerAnnotationResize=function(e){var t={opacity:e.opacity,fillColor:e.fillColor,strokeColor:e.strokeColor,thickness:e.thickness,author:e.author,subject:e.subject,modifiedDate:e.modifiedDate},i=(this.getAnnotationIndex(e.pageIndex,e.id),e.bounds),n={left:i.x,top:i.y,x:i.x,y:i.y,width:i.width,height:i.height},o={left:i.oldProperties.x,top:i.oldProperties.y,width:i.oldProperties.width,height:i.oldProperties.height},s=this.getAnnotationType(e.shapeAnnotationType,e.measureType);"Line"!==s&&"Arrow"!==s&&"Distance"!==s&&"Perimeter"!==s||(t.lineHeadStartStyle=this.getArrowString(e.sourceDecoraterShapes),t.lineHeadEndStyle=this.getArrowString(e.taregetDecoraterShapes),t.borderDashArray=e.borderDashArray);var a;this.pdfViewer.enableShapeLabel&&"HandWrittenSignature"!==e.shapeAnnotationType?(a={fontColor:e.fontColor,fontSize:e.fontSize,fontFamily:e.fontFamily,opacity:e.labelOpacity,labelContent:e.labelContent,fillColor:e.labelFillColor,notes:e.notes},this.pdfViewer.fireAnnotationResize(e.pageIndex,e.annotName,s,n,t,null,null,null,a)):"HandWrittenSignature"===e.shapeAnnotationType||"SignatureText"===e.shapeAnnotationType||"SignatureImage"===e.shapeAnnotationType?this.pdfViewer.fireSignatureResize(e.pageIndex,e.signatureName,e.shapeAnnotationType,e.opacity,e.strokeColor,e.thickness,n,o):this.pdfViewer.fireAnnotationResize(e.pageIndex,e.annotName,s,n,t)},r.prototype.triggerAnnotationMove=function(e){var t={opacity:e.opacity,fillColor:e.fillColor,strokeColor:e.strokeColor,thickness:e.thickness,author:e.author,subject:e.subject,modifiedDate:e.modifiedDate},i=e.bounds,n={left:i.x,top:i.y,x:i.x,y:i.y,width:i.width,height:i.height},o={left:i.oldProperties.x,top:i.oldProperties.y,width:i.width,height:i.height},s=this.getAnnotationType(e.shapeAnnotationType,e.measureType);"Line"!==s&&"Arrow"!==s&&"Distance"!==s&&"Perimeter"!==s||(t.lineHeadStartStyle=this.getArrowString(e.sourceDecoraterShapes),t.lineHeadEndStyle=this.getArrowString(e.taregetDecoraterShapes),t.borderDashArray=e.borderDashArray),"HandWrittenSignature"===e.shapeAnnotationType||"SignatureText"===e.shapeAnnotationType||"SignatureImage"===e.shapeAnnotationType?this.pdfViewer.fireSignatureMove(e.pageIndex,e.signatureName,e.shapeAnnotationType,e.opacity,e.strokeColor,e.thickness,o,n):this.pdfViewer.fireAnnotationMove(e.pageIndex,e.annotName,s,t,o,n)},r.prototype.annotationSelect=function(e,t,i,n,o,s){var a;"textMarkup"===i.shapeAnnotationType?a={type:"TextMarkup",subType:i.subject,opacity:i.opacity,color:i.color,textMarkupContent:i.textMarkupContent,textMarkupStartIndex:i.textMarkupStartIndex,textMarkupEndIndex:i.textMarkupEndIndex,customData:i.customData}:"StickyNotes"===i.shapeAnnotationType?a={type:"StickyNotes",opacity:i.opacity,customData:i.customData}:"Stamp"===i.shapeAnnotationType||"Image"===i.shapeAnnotationType?a={type:"Stamp",opacity:i.opacity,customData:i.customData}:"Ink"===i.shapeAnnotationType?a={type:"Ink",opacity:i.opacity,strokeColor:i.strokeColor,thickness:i.thickness,modifiedDate:i.modifiedDate,width:i.bounds.width,height:i.bounds.height,left:i.bounds.x,top:i.bounds.y,data:i.data,customData:i.customData}:"FreeText"===i.shapeAnnotationType?a={type:"FreeText",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,content:i.dynamicText,fontFamily:i.fontFamily,fontSize:i.fontSize,fontColor:i.fontColor,textAlign:i.textAlign,fontStyle:this.updateFreeTextFontStyle(i.font),customData:i.customData}:""===i.measureType?"Line"===i.shapeAnnotationType?a={type:"Shape",subType:"Line",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,borderDashArray:i.borderDashArray,lineHeadStartStyle:i.sourceDecoraterShapes,lineHeadEndStyle:i.taregetDecoraterShapes,customData:i.customData}:"Arrow"===i.shapeAnnotationType||"LineWidthArrowHead"===i.shapeAnnotationType?a={type:"Shape",subType:"Arrow",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,borderDashArray:i.borderDashArray,lineHeadStartStyle:i.sourceDecoraterShapes,lineHeadEndStyle:i.taregetDecoraterShapes,customData:i.customData}:"Rectangle"===i.shapeAnnotationType?a={type:"Shape",subType:"Rectangle",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,customData:i.customData}:"Circle"===i.shapeAnnotationType||"Ellipse"===i.shapeAnnotationType?a={type:"Shape",subType:"Circle",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,customData:i.customData}:"Polygon"===i.shapeAnnotationType&&(a={type:"Shape",subType:"Polygon",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,customData:i.customData}):""!==i.measureType&&("Distance"===i.measureType?a={type:"Measure",subType:"Distance",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,borderDashArray:i.borderDashArray,lineHeadStartStyle:i.sourceDecoraterShapes,lineHeadEndStyle:i.taregetDecoraterShapes,customData:i.customData}:"Perimeter"===i.measureType?a={type:"Measure",subType:"Perimeter",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,borderDashArray:i.borderDashArray,lineHeadStartStyle:i.sourceDecoraterShapes,lineHeadEndStyle:i.taregetDecoraterShapes,customData:i.customData}:"Area"===i.measureType?a={type:"Measure",subType:"Area",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,customData:i.customData}:"Radius"===i.measureType?a={type:"Measure",subType:"Radius",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,customData:i.customData}:"Volume"===i.measureType&&(a={type:"Measure",subType:"Volume",opacity:i.opacity,fillColor:i.fillColor,strokeColor:i.strokeColor,thickness:i.thickness,calibrate:i.calibrate,annotationId:i.annotName,customData:i.customData}));var r=[],l=this.getOverlappedAnnotations(i,t);if(l&&this.overlappedCollections){for(var d=[],u=0;u<l.length;u++)if("textMarkup"!==l[u].shapeAnnotationType&&this.overlappedCollections||s){for(p=0;p<this.overlappedCollections.length;p++)if(l[u].annotName===this.overlappedCollections[p].annotName){d.push(l[u]);break}}else d.push(l[u]);l=d}if(this.pdfViewer.enableMultiLineOverlap)for(u=0;u<l.length;u++)if("textMarkup"===l[u].shapeAnnotationType){for(var M=!1,p=0;p<l[u].bounds.length;p++){var h=this.orderTextMarkupBounds(l[u].bounds[p]),L=this.textMarkupAnnotationModule.annotationClickPosition;L&&(L.x||L.y)?h.left<=L.x&&h.left+h.width>=L.x&&h.top<=L.y&&h.top+h.height>=L.y&&(M=!0):M=!0}M||l.splice(u,1)}if(l&&l.length>0){n=l;for(u=0;u<n.length;u++){var w=m(n[u]);w.annotationId=n[u].annotName,e===n[u].annotName&&i.measureType&&"Volume"===i.measureType&&(a.calibrate=n[u].calibrate),delete w.annotName,r.push(w)}}else r=null;this.addFreeTextProperties(i,a);var c=i.annotationAddMode;if(o)"Stamp"===i.shapeAnnotationType||"Image"===i.shapeAnnotationType?this.pdfViewerBase.isNewStamp||this.pdfViewer.fireAnnotationDoubleClick(e,t,a):this.pdfViewer.fireAnnotationDoubleClick(e,t,a);else if("Stamp"===i.shapeAnnotationType||"Image"===i.shapeAnnotationType)!this.pdfViewerBase.isNewStamp&&this.annotationSelected&&(r?this.pdfViewer.fireAnnotationSelect(e,t,a,r,null,null,c):this.pdfViewer.fireAnnotationSelect(e,t,a,null,null,null,c));else{var C=this.textMarkupAnnotationModule.multiPageCollectionList(i);0===C.length&&(C=null),this.annotationSelected&&(r?(s=!1,this.pdfViewer.fireAnnotationSelect(e,t,a,r,C,s,c)):(s=!0,this.pdfViewer.fireAnnotationSelect(e,t,a,null,C,s,c)))}this.annotationSelected=!0},r.prototype.selectSignature=function(e,t,i){var n=i.bounds,o={height:n.height,width:n.width,x:n.x,y:n.y};if(!this.pdfViewerBase.signatureAdded){var s={bounds:o,opacity:i.opacity,thickness:i.thickness,strokeColor:i.strokeColor};this.pdfViewer.fireSignatureSelect(e,t,s)}},r.prototype.editSignature=function(e){var t,i=(t=e.uniqueKey?this.pdfViewer.nameTable[e.uniqueKey]:this.pdfViewer.selectedItems.annotations[0]).pageIndex;if("HandWrittenSignature"===t.shapeAnnotationType||"SignatureText"===t.shapeAnnotationType||"SignatureImage"===t.shapeAnnotationType){var n=m(t),o=m(t);t.opacity!==e.opacity&&(o.opacity=e.opacity,this.pdfViewer.nodePropertyChange(t,{opacity:e.opacity}),this.pdfViewer.fireSignaturePropertiesChange(t.pageIndex,t.signatureName,t.shapeAnnotationType,!1,!0,!1,n.opacity,o.opacity),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"Shape Opacity","",n,o)),t.strokeColor!==e.strokeColor&&(o.strokeColor=e.strokeColor,this.pdfViewer.nodePropertyChange(t,{strokeColor:e.strokeColor}),this.pdfViewer.fireSignaturePropertiesChange(t.pageIndex,t.signatureName,t.shapeAnnotationType,!0,!1,!1,n.strokeColor,o.strokeColor),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"Shape Stroke","",n,o)),t.thickness!==e.thickness&&(o.thickness=e.thickness,this.pdfViewer.nodePropertyChange(t,{thickness:e.thickness}),this.pdfViewer.fireSignaturePropertiesChange(t.pageIndex,t.signatureName,t.shapeAnnotationType,!1,!1,!0,n.thickness,o.thickness),this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"Shape Thickness","",n,o)),t.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.pdfViewer.renderDrawing(),this.pdfViewerBase.signatureModule.modifySignatureCollection(null,i,t,!0)}},r.prototype.deletComment=function(e){e.parentElement.firstChild===e?this.deleteAnnotation():this.pdfViewer.annotationModule.stickyNotesAnnotationModule.modifyCommentDeleteProperty(e.parentElement,e)},r.prototype.addReplyComments=function(e,t,i){if("add"===i){o=document.getElementById(e.annotName);this.pdfViewer.annotationModule.stickyNotesAnnotationModule.createCommentDiv(o);for(var n=0;n<t.length;n++)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.saveCommentDiv(o,t[n])}else if("next"===i){var o=document.getElementById(e.annotationId);this.selectAnnotation(e),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.saveCommentDiv(o,t)}},r.prototype.editComments=function(e,t){document.getElementById(e).childNodes[1].ej2_instances[0].value=t},r.prototype.editAnnotation=function(i){var n,o,s,r,l=!1;if(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?(o=(n=this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation).annotName,r=this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage):this.pdfViewer.selectedItems.annotations[0]&&(o=(n=this.pdfViewer.selectedItems.annotations[0]).annotName,r=n.pageIndex),void 0!==i.uniqueKey){if(n=this.pdfViewer.nameTable[i.uniqueKey],n.annotationSettings.isLock=i.annotationSettings.isLock,o=n.annotName,r=n.pageIndex,t.isBlazor()&&i.allowedInteractions)for(var d=i.allowedInteractions.length,u=0;u<d;u++)0===i.allowedInteractions[u]&&(i.allowedInteractions[u]=e.AllowedInteraction.Select),1===i.allowedInteractions[u]&&(i.allowedInteractions[u]=e.AllowedInteraction.Move),2===i.allowedInteractions[u]&&(i.allowedInteractions[u]=e.AllowedInteraction.Resize),3===i.allowedInteractions[u]&&(i.allowedInteractions[u]=e.AllowedInteraction.Delete),4===i.allowedInteractions[u]&&(i.allowedInteractions[u]=e.AllowedInteraction.PropertyChange),5===i.allowedInteractions[u]&&(i.allowedInteractions[u]=e.AllowedInteraction.None);n.allowedInteractions=i.allowedInteractions?i.allowedInteractions:this.updateAnnotationAllowedInteractions(i)}if(n||"sticky"===i.shapeAnnotationType&&void 0!==i.annotationId&&((n=this.pdfViewer.nameTable[i.annotationId]).annotationSettings.isLock=i.annotationSettings.isLock,o=n.annotName,r=n.pageIndex),"textMarkup"===i.shapeAnnotationType&&!this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation){n=this.pdfViewer.annotationModule.textMarkupAnnotationModule.getAnnotations(i.pageNumber,i);for(u=0;u<n.length;u++)if(i.annotationId===n[u].annotName){l=!0,(n=n[u]).isPrint=i.isPrint,this.textMarkupAnnotationModule.currentTextMarkupAnnotation=n,this.textMarkupAnnotationModule.selectTextMarkupCurrentPage=n.pageNumber,n.allowedInteractions=i.allowedInteractions,r=n.pageNumber,o=i.annotationId;break}}if(n){var M=m(n),p=m(n);if("textMarkup"===i.shapeAnnotationType&&(s="textMarkup"),i&&!0===i.isCommentLock&&(n.isCommentLock=i.isCommentLock),i.comments)for(h=0;h<i.comments.length;h++)!0===i.comments[h].isLock&&(s?(n.comments=i.comments,n.comments[h].isLock=i.comments[h].isLock):(n.properties.comments=i.comments,n.properties.comments[h].isLock=i.comments[h].isLock));if(i&&""!==i.note&&void 0!==i.note&&(s?(n.note=i.note,this.pdfViewer.annotationModule.stickyNotesAnnotationModule.addTextToComments(n.annotName,n.note)):(n.notes=i.note,this.pdfViewer.annotationModule.stickyNotesAnnotationModule.addTextToComments(n.annotName,n.notes))),i.commentId&&i.editComment&&"edit"===i.commentType&&this.editComments(i.commentId,i.editComment),i.replyComment&&"add"===i.commentType&&(this.addReplyComments(n,i.replyComment,i.commentType),this.pdfViewer.annotationCollection[0].note=i.note),i.nextComment&&"next"===i.commentType&&this.addReplyComments(i,i.nextComment,i.commentType),""===i.note&&"delete"===i.commentType){L=document.getElementById(i.annotationId);this.deletComment(L)}if(i.comments)for(var h=0;h<i.comments.length;h++)if(""===i.comments[h].note&&"delete"===i.commentType){var L=document.getElementById(i.comments[h].annotName);this.deletComment(L)}if("TextMarkup"===i.type||"textMarkup"===i.shapeAnnotationType){if(n.annotationSettings&&i.annotationSettings&&n.annotationSettings.isLock!==i.annotationSettings.isLock){var w=this.textMarkupAnnotationModule.modifyAnnotationProperty("AnnotationSettings",i.annotationSettings.isLock,null);this.textMarkupAnnotationModule.manageAnnotations(w,this.textMarkupAnnotationModule.selectTextMarkupCurrentPage)}n.opacity!==i.opacity&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.modifyOpacityProperty(null,i.opacity),n.color!==i.color&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.modifyColorProperty(i.color),s="textMarkup",l&&(this.textMarkupAnnotationModule.currentTextMarkupAnnotation=null,this.textMarkupAnnotationModule.selectTextMarkupCurrentPage=null)}else if(i&&"image"===i.stampAnnotationType&&"stamp"===i.shapeAnnotationType&&i.stampAnnotationPath)s="stamp",n.data!==i.stampAnnotationPath&&(n.data=i.stampAnnotationPath,n.wrapper.children[0].imageSource=i.stampAnnotationPath),i.opacity&&n.opacity!==i.opacity&&this.annotationPropertyChange(n,i.opacity,"Shape Opacity",M,p),this.calculateAnnotationBounds(n,i);else if("StickyNotes"===i.type||"Stamp"===i.type||"sticky"===i.shapeAnnotationType||"stamp"===i.shapeAnnotationType)i.opacity&&n.opacity!==i.opacity&&this.annotationPropertyChange(n,i.opacity,"Shape Opacity",M,p),this.calculateAnnotationBounds(n,i),s="StickyNotes"===i.type||"sticky"===i.shapeAnnotationType?"sticky":"stamp";else if("Ink"===i.type||"Shape"===i.type||"Measure"===i.type||"Line"===i.shapeAnnotationType||"Square"===i.shapeAnnotationType||"Circle"===i.shapeAnnotationType||"Polygon"===i.shapeAnnotationType||"Polyline"===i.shapeAnnotationType||"Ink"===i.shapeAnnotationType){if(this.calculateAnnotationBounds(n,i),i.opacity&&n.opacity!==i.opacity&&this.annotationPropertyChange(n,i.opacity,"Shape Opacity",M,p),i.fillColor&&n.fillColor!==i.fillColor&&(p.fillColor=i.fillColor,this.pdfViewer.nodePropertyChange(n,{fillColor:i.fillColor}),this.triggerAnnotationPropChange(n,!0,!1,!1,!1),this.pdfViewer.annotation.addAction(n.pageIndex,null,n,"Shape Fill","",M,p)),i.strokeColor&&n.strokeColor!==i.strokeColor&&(p.strokeColor=i.strokeColor,this.pdfViewer.nodePropertyChange(n,{strokeColor:i.strokeColor}),this.triggerAnnotationPropChange(n,!1,!0,!1,!1),this.pdfViewer.annotation.addAction(n.pageIndex,null,n,"Shape Stroke","",M,p)),i.thickness&&n.thickness!==i.thickness&&(p.thickness=i.thickness,this.pdfViewer.nodePropertyChange(n,{thickness:i.thickness}),this.triggerAnnotationPropChange(n,!1,!1,!0,!1),this.pdfViewer.annotation.addAction(n.pageIndex,null,n,"Shape Thickness","",M,p)),n.author!==i.author&&(p.author=i.author,this.pdfViewer.nodePropertyChange(n,{author:i.author}),this.triggerAnnotationPropChange(n,!1,!0,!1,!1)),n.modifiedDate!==i.modifiedDate&&(p.modifiedDate=i.modifiedDate,this.pdfViewer.nodePropertyChange(n,{modifiedDate:i.modifiedDate})),n.subject!==i.subject&&(p.subject=i.subject,this.pdfViewer.nodePropertyChange(n,{subject:i.subject}),this.triggerAnnotationPropChange(n,!1,!0,!1,!1),this.pdfViewer.annotation.addAction(n.pageIndex,null,n,"Shape Stroke","",M,p)),this.pdfViewer.enableShapeLabel&&n.fontColor!==i.fontColor&&(p.fontColor=i.fontColor,this.pdfViewer.nodePropertyChange(n,{fontColor:i.fontColor})),"Line"!==i.shapeAnnotationType&&"Polyline"!==i.shapeAnnotationType&&"Polygon"!==i.shapeAnnotationType||JSON.stringify(n.vertexPoints)!==JSON.stringify(i.vertexPoints)&&(n.vertexPoints=i.vertexPoints,this.pdfViewer.nodePropertyChange(n,{vertexPoints:i.vertexPoints})),"Line"===i.subType||"Arrow"===i.subType||"Distance"===i.subType||"Perimeter"===i.subType){var c=!1,C=!1,g=!1;M.lineHeadStart=n.sourceDecoraterShapes,M.lineHeadEnd=n.taregetDecoraterShapes,p.lineHeadStart=i.lineHeadStartStyle,p.lineHeadEnd=i.lineHeadEndStyle,p.borderDashArray=i.borderDashArray,n.taregetDecoraterShapes!==i.lineHeadEndStyle&&(C=!0),n.sourceDecoraterShapes!==i.lineHeadStartStyle&&(c=!0),n.borderDashArray!==i.borderDashArray&&(g=!0),this.pdfViewer.nodePropertyChange(n,{sourceDecoraterShapes:i.lineHeadStartStyle,taregetDecoraterShapes:i.lineHeadEndStyle,borderDashArray:i.borderDashArray}),this.triggerAnnotationPropChange(n,!1,!1,!1,!1,c,C,g),this.pdfViewer.annotation.addAction(n.pageIndex,null,n,"Line properties change","",M,p)}"Shape"!==i.type&&"Line"!==i.shapeAnnotationType&&"Square"!==i.shapeAnnotationType&&"Circle"!==i.shapeAnnotationType&&"Polygon"!==i.shapeAnnotationType||(s="shape"),"Ink"!==i.type&&"Ink"!==i.shapeAnnotationType||(s="ink"),"Measure"!==i.type&&"Distance calculation"!==i.subject&&"Perimeter calculation"!==i.subject&&"Radius calculation"!==i.subject&&"Area calculation"!==i.subject&&"Volume calculation"!==i.subject||(s="shape_measure"),i.labelSettings&&this.pdfViewer.enableShapeLabel&&(this.updateFreeTextProperties(n),this.pdfViewer.nodePropertyChange(n,{labelOpacity:i.labelSettings.opacity,fontColor:i.labelSettings.fontColor,fontSize:i.labelSettings.fontSize,fontFamily:i.labelSettings.fontFamily,labelContent:i.labelSettings.labelContent,labelFillColor:i.labelSettings.fillColor})),this.pdfViewer.enableShapeLabel&&i.calibrate&&i.calibrate.depth&&this.pdfViewer.annotationModule.measureAnnotationModule.volumeDepth!==i.calibrate.depth&&(this.pdfViewer.annotationModule.measureAnnotationModule.volumeDepth=i.calibrate.depth,n.notes=this.pdfViewer.annotationModule.measureAnnotationModule.calculateVolume(n.vertexPoints),n.labelContent=n.notes,i.labelSettings&&i.labelSettings.labelContent&&(i.labelSettings.labelContent=n.notes),this.pdfViewer.nodePropertyChange(n,{labelContent:n.labelContent}),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.addTextToComments(n.annotName,n.notes))}else if("FreeText"===i.type||"FreeText"===i.shapeAnnotationType){s="freetext",this.calculateAnnotationBounds(n,i),this.pdfViewer.nodePropertyChange(n,{opacity:i.opacity,fontColor:i.fontColor,fontSize:i.fontSize,fontFamily:i.fontFamily,dynamicText:i.content,fillColor:i.fillColor,textAlign:i.textAlign,strokeColor:i.strokeColor,thickness:i.thickness,font:this.setFreeTextFontStyle(i.fontStyle),isReadonly:i.isReadonly}),i.opacity&&n.opacity!==i.opacity&&this.triggerAnnotationPropChange(n,!1,!1,!1,!0),i.fillColor&&n.fillColor!==i.fillColor&&this.triggerAnnotationPropChange(n,!0,!1,!1,!1),i.strokeColor&&n.strokeColor!==i.strokeColor&&this.triggerAnnotationPropChange(n,!1,!0,!1,!1),i.thickness&&n.thickness!==i.thickness&&this.triggerAnnotationPropChange(n,!1,!1,!0,!1),i.content&&this.pdfViewer.selectedItems.annotations[0]&&this.updateAnnotationComments(this.pdfViewer.selectedItems.annotations[0].annotName,i.content);var f=document.getElementById(this.pdfViewer.element.id+"_commenttextbox_editor");new a.InPlaceEditor({value:i.content}).appendTo(f)}n.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),n.customData!==i.customData&&(n.customData=i.customData),n.isPrint=i.isPrint,"TextMarkup"!==i.type&&(this.pdfViewer.renderDrawing(),this.updateCollection(o,r,i,s))}},r.prototype.annotationPropertyChange=function(e,t,i,n,o){this.pdfViewer.nodePropertyChange(e,{opacity:t}),this.triggerAnnotationPropChange(e,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(e.pageIndex,null,e,i,"",n,o)},r.prototype.calculateAnnotationBounds=function(e,t){var i=this.pdfViewerBase.convertBounds(e.wrapper.bounds),n=this.pdfViewerBase.convertBounds(t.bounds);if(i&&n&&(JSON.stringify(i)!==JSON.stringify(n)&&Math.abs(i.Y-n.Y)>2||Math.abs(i.X-n.X)>2)){var o={x:n.X+n.Width/2,y:n.Y+n.Height/2,width:n.Width,height:n.Height};this.pdfViewer.nodePropertyChange(e,{bounds:o}),this.pdfViewer.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.triggerAnnotationPropChange(e,!1,!1,!1,!1)}},r.prototype.updateFreeTextProperties=function(e){e.labelSettings&&(e.labelSettings.fillColor&&(e.labelFillColor=e.labelSettings.fillColor),e.labelSettings.fontColor&&(e.fontColor=e.labelSettings.fontColor),e.labelSettings.fontSize&&(e.fontSize=e.labelSettings.fontSize),e.labelSettings.fontFamily&&(e.fontFamily=e.labelSettings.fontFamily),e.labelSettings.opacity&&(e.labelOpacity=e.labelSettings.opacity),e.labelSettings.labelContent&&(e.labelContent=e.labelSettings.labelContent))},r.prototype.updateAnnotationComments=function(e,t){var i=document.getElementById(e);i&&i.childNodes&&(i.childNodes[0].ej2_instances?i.childNodes[0].ej2_instances[0].value=t:i.childNodes[0].childNodes&&i.childNodes[0].childNodes[1].ej2_instances&&(i.childNodes[0].childNodes[1].ej2_instances[0].value=t))},r.prototype.addFreeTextProperties=function(e,t){this.pdfViewer.enableShapeLabel&&e&&t&&(t.labelSettings={fontColor:e.fontColor,fontSize:e.fontSize,fontFamily:e.fontFamily,opacity:e.labelOpacity,labelContent:e.labelContent,fillColor:e.labelFillColor})},r.prototype.updateMeasurementSettings=function(){if(this.pdfViewer.enableAnnotation&&this.pdfViewer.enableMeasureAnnotation){var e="1 "+this.pdfViewer.measurementSettings.conversionUnit+" = "+this.pdfViewer.measurementSettings.scaleRatio+" "+this.pdfViewer.measurementSettings.displayUnit;this.measureAnnotationModule.updateMeasureValues(e,this.pdfViewer.measurementSettings.displayUnit,this.pdfViewer.measurementSettings.conversionUnit,this.pdfViewer.measurementSettings.depth)}},r.prototype.updateCollection=function(e,t,i,n){var o,s=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_"+n);if(this.pdfViewerBase.isStorageExceed&&(s=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_"+n]),s){var a=JSON.parse(s),r=this.getPageCollection(a,t);if(a[r]&&null!==(o=a[r].annotations)){for(var l=0;l<o.length;l++)if(o[l].annotName===e){var d=this.modifyAnnotationProperties(o[l],i,n);o[l]=d}this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_"+n),a[r]&&(a[r].annotations=o);var u=JSON.stringify(a);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_"+n]=u:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_"+n,u)}}},r.prototype.modifyAnnotationProperties=function(e,i,n){if(i&&!0===i.isCommentLock&&(e.isCommentLock=i.isCommentLock),i.comments)for(s=0;s<i.comments.length;s++)!0===i.comments[s].isLock&&(e.comments[s].isLock=i.comments[s].isLock);if(i&&""!==i.note&&void 0!==i.note&&(e.note=i.note),i.commentId&&i.editComment&&"edit"===i.commentType){var o=document.getElementById(i.commentId);i.annotationId===i.commentId&&(e.note=o.childNodes[1].ej2_instances[0].value);for(var s=0;s<i.comments.length;s++)i.comments[s].annotName===i.commentId&&(e.comments[s].note=o.childNodes[1].ej2_instances[0].value)}if("textMarkup"===n)e.opacity=i.opacity,e.color=i.color,e.allowedInteractions=i.allowedInteractions;else if("sticky"===n||"stamp"===n)i.bounds&&(e.bounds=i.bounds),e.opacity=i.opacity,e.annotationSettings=i.annotationSettings,e.allowedInteractions=i.allowedInteractions,i.stampAnnotationPath&&(e.stampAnnotationPath=i.stampAnnotationPath);else if("ink"===n)i.bounds&&(e.bounds=i.bounds),e.opacity=i.opacity,e.strokeColor=i.strokeColor,e.thickness=i.thickness,e.annotationSettings=i.annotationSettings,e.allowedInteractions=i.allowedInteractions;else if("shape"===n||"shape_measure"===n){if("Line"===i.subType||"Arrow"===i.subType||"Distance"===i.subType||"Perimeter"===i.subType?(i.bounds&&(e.bounds=i.bounds),e.vertexPoints=i.vertexPoints,e.opacity=i.opacity,e.fillColor=i.fillColor,e.strokeColor=i.strokeColor,e.thickness=i.thickness,e.borderDashArray=i.borderDashArray,e.lineHeadStart=i.lineHeadStartStyle,e.lineHeadEnd=i.lineHeadEndStyle,e.annotationSettings=i.annotationSettings,e.allowedInteractions=i.allowedInteractions):(i.bounds&&(e.bounds=i.bounds),e.vertexPoints=i.vertexPoints,e.opacity=i.opacity,e.fillColor=i.fillColor,e.strokeColor=i.strokeColor,e.thickness=i.thickness,e.annotationSettings=i.annotationSettings,e.allowedInteractions=i.allowedInteractions,i.calibrate&&e.annotName===i.annotationId&&e.calibrate.depth!==i.calibrate.depth&&(e.calibrate.depth=i.calibrate.depth,this.pdfViewer.annotationModule.measureAnnotationModule.volumeDepth=i.calibrate.depth,e.note=this.pdfViewer.annotationModule.measureAnnotationModule.calculateVolume(e.vertexPoints))),this.pdfViewer.enableShapeLabel&&i.labelSettings){var a=i.labelSettings.labelContent;e.note=a,e.labelContent&&(e.labelContent=a),e.labelSettings&&(e.labelSettings=i.labelSettings),this.updateAnnotationComments(e.annotName,a)}}else"freetext"===n&&(i.bounds&&(e.bounds=i.bounds),e.opacity=i.opacity,e.strokeColor=i.strokeColor,e.thickness=i.thickness,i.content&&(e.dynamicText=i.content),e.fontFamily=i.fontFamily,e.fontSize=i.fontSize,e.fontColor=i.fontColor,e.fillColor=i.fillColor,e.font=i.font,e.textAlign=i.textAlign,e.annotationSettings=i.annotationSettings,e.allowedInteractions=i.allowedInteractions,e.isReadonly=i.isReadonly);return e.customData=i.customData,e.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),e.isPrint=i.isPrint,i.annotationSettings&&!t.isNullOrUndefined(i.annotationSettings.isLock)&&(e.isLocked=i.annotationSettings.isLock),e},r.prototype.updateAnnotationAuthor=function(e,t){var i;return"sticky"===e?i="Guest"!==this.pdfViewer.stickyNotesSettings.author?this.pdfViewer.stickyNotesSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"stamp"===e?i="Guest"!==this.pdfViewer.stampSettings.author?this.pdfViewer.stampSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"shape"===e?"Line"===t?i="Guest"!==this.pdfViewer.lineSettings.author?this.pdfViewer.lineSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"LineWidthArrowHead"===t||"Arrow"===t?i="Guest"!==this.pdfViewer.arrowSettings.author?this.pdfViewer.arrowSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"Circle"===t||"Ellipse"===t||"Oval"===t?i="Guest"!==this.pdfViewer.circleSettings.author?this.pdfViewer.circleSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"Rectangle"===t||"Square"===t?i="Guest"!==this.pdfViewer.rectangleSettings.author?this.pdfViewer.rectangleSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"Polygon"===t&&(i="Guest"!==this.pdfViewer.polygonSettings.author?this.pdfViewer.polygonSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest"):"measure"===e?"Distance"===t||"Distance calculation"===t?i="Guest"!==this.pdfViewer.distanceSettings.author?this.pdfViewer.distanceSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"Perimeter"===t||"Perimeter calculation"===t?i="Guest"!==this.pdfViewer.perimeterSettings.author?this.pdfViewer.perimeterSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"Radius"===t||"Radius calculation"===t?i="Guest"!==this.pdfViewer.radiusSettings.author?this.pdfViewer.radiusSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"Area"===t||"Area calculation"===t?i="Guest"!==this.pdfViewer.areaSettings.author?this.pdfViewer.areaSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"Volume"!==t&&"Volume calculation"!==t||(i="Guest"!==this.pdfViewer.volumeSettings.author?this.pdfViewer.volumeSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest"):"textMarkup"===e?i="Highlight"===t?"Guest"!==this.pdfViewer.highlightSettings.author?this.pdfViewer.highlightSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"Underline"===t?"Guest"!==this.pdfViewer.underlineSettings.author?this.pdfViewer.underlineSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"Strikethrough"===t?"Guest"!==this.pdfViewer.strikethroughSettings.author?this.pdfViewer.strikethroughSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":this.pdfViewer.annotationSettings.author:"freeText"===e?i="Guest"!==this.pdfViewer.freeTextSettings.author?this.pdfViewer.freeTextSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest":"ink"===e&&(i="Guest"!==this.pdfViewer.inkAnnotationSettings.author?this.pdfViewer.inkAnnotationSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest"),i||(i=this.pdfViewer.annotationSettings.author),i},r.prototype.nameToHash=function(e){var t={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",yellow:"#ffff00",yellowgreen:"#9acd32",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkred:"#8b0000",darksalmon:"#e9967a",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",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",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",indigo:"#4b0082",ivory:"#fffff0",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",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",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",pink:"#ffc0cb",plum:"#dda0dd",steelblue:"#4682b4",violet:"#ee82ee",powderblue:"#b0e0e6",purple:"#800080",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0"};return void 0!==t[e.toLowerCase()]?t[e.toLowerCase()]:""},r.prototype.updateFreeTextFontStyle=function(e){return 1===e.isBold?1:2===e.isItalic?2:4===e.isUnderline?4:e.isStrikeout?8:{isBold:e.isBold,isItalic:e.isItalic,isUnderline:e.isUnderline,isStrikeout:e.isUnderline}},r.prototype.setFreeTextFontStyle=function(e){return 1===e?{isBold:!0}:2===e?{isItalic:!0}:4===e?{isUnderline:!0}:8===e?{isStrikeout:!0}:{isStrikeout:!1,isItalic:!1,isUnderline:!1,isBold:!1}},r.prototype.findAnnotationSettings=function(e,t){var i=this.pdfViewer.annotationSettings;if(e){var n=e.shapeAnnotationType;"StickyNotes"===n&&this.pdfViewer.stickyNotesSettings?i=this.pdfViewer.stickyNotesSettings:"Stamp"===n||"Image"===n?(i=this.pdfViewer.stampSettings,"image"!==n&&"Image"!==n||(i=this.pdfViewer.customStampSettings)):"FreeText"===n?i=this.pdfViewer.freeTextSettings:""===e.measureType?"Line"===n?i=this.pdfViewer.lineSettings:"Arrow"===n||"LineWidthArrowHead"===n?i=this.pdfViewer.arrowSettings:"Rectangle"===n?i=this.pdfViewer.rectangleSettings:"Circle"===n||"Ellipse"===n?i=this.pdfViewer.circleSettings:"Polygon"===n&&this.pdfViewer.polygonSettings&&(i=this.pdfViewer.polygonSettings):""!==e.measureType&&("Distance"===e.measureType?i=this.pdfViewer.distanceSettings:"Perimeter"===e.measureType?i=this.pdfViewer.perimeterSettings:"Area"===e.measureType?i=this.pdfViewer.areaSettings:"Radius"===e.measureType?i=this.pdfViewer.radiusSettings:"Volume"===e.measureType&&(i=this.pdfViewer.volumeSettings))}var o=e?e.annotationSettings:{};return o&&(o.minWidth||o.maxWidth||o.minHeight||o.maxHeight)?this.updateSettings(o):t?this.updateSettings(i):i},r.prototype.updateAnnotationSettings=function(e){var t=this.pdfViewer.annotationSettings;return"sticky"===e.AnnotType?t=this.pdfViewer.stickyNotesSettings:"stamp"===e.AnnotType||"image"===e.AnnotType||"Image"===e.AnnotType?(t=this.pdfViewer.stampSettings,"image"!==e.Subject&&"Image"!==e.Subject||(t=this.pdfViewer.customStampSettings)):"freeText"===e.AnnotType?t=this.pdfViewer.freeTextSettings:"shape"===e.AnnotType?"Line"===e.Subject?t=this.pdfViewer.lineSettings:"Arrow"===e.Subject||"LineWidthArrowHead"===e.Subject?t=this.pdfViewer.arrowSettings:"Rectangle"===e.Subject||"Square"===e.Subject?t=this.pdfViewer.rectangleSettings:"Circle"===e.Subject||"Ellipse"===e.Subject||"Oval"===e.Subject?t=this.pdfViewer.circleSettings:"Polygon"===e.Subject&&(t=this.pdfViewer.polygonSettings):"shape_measure"===e.AnnotType&&("Distance"===e.Subject||"Distance calculation"===e.Subject?t=this.pdfViewer.distanceSettings:"Perimeter"===e.Subject||"Perimeter calculation"===e.Subject?t=this.pdfViewer.perimeterSettings:"Area"===e.Subject||"Area calculation"===e.Subject?t=this.pdfViewer.areaSettings:"Radius"===e.Subject||"Radius calculation"===e.Subject?t=this.pdfViewer.radiusSettings:"Volume"!==e.Subject&&"Volume calculation"!==e.Subject||(t=this.pdfViewer.volumeSettings)),this.updateSettings(t)},r.prototype.updateSettings=function(e){var t=0,i=0,n=0,o=0,s=!1,a=!0,r=this.pdfViewer.annotationSettings;return e.minWidth||e.maxWidth||e.minHeight||e.maxHeight?(t=e.maxHeight?e.maxHeight:2e3,i=e.maxWidth?e.maxWidth:2e3,n=e.minHeight?e.minHeight:0,o=e.minWidth?e.minWidth:0):(r.minWidth||r.maxWidth||r.minHeight||r.maxHeight)&&(t=r.maxHeight?r.maxHeight:2e3,i=r.maxWidth?r.maxWidth:2e3,n=r.minHeight?r.minHeight:0,o=r.minWidth?r.minWidth:0),s=e.isLock?e.isLock:!!r.isLock&&r.isLock,a=e.isPrint,{minWidth:o,maxWidth:i,minHeight:n,maxHeight:t,isLock:s,isPrint:a}},r.prototype.getOverlappedAnnotations=function(e,t){for(var i,n=this.getPageShapeAnnotations(t),o=0;o<n.length;o++)if(e.annotName===n[o].annotName){i=n[o];break}return this.findOverlappedAnnotations(i,n)},r.prototype.getPageShapeAnnotations=function(e){var t=[],i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_ink");if(i){var n=JSON.parse(i);if(n&&n[j=this.getPageCollection(n,e)]){var o=n[j].annotations;if(o&&o.length>0)for(A=0;A<o.length;A++)t.push(o[A])}}var s=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape");if(s){var a=JSON.parse(s);if(a&&a[j=this.getPageCollection(a,e)]){var r=a[j].annotations;if(r&&r.length>0)for(A=0;A<r.length;A++)t.push(r[A])}}var l=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape_measure");if(l){var d=JSON.parse(l);if(d&&d[j=this.getPageCollection(d,e)]){var u=d[j].annotations;if(u&&u.length>0)for(A=0;A<u.length;A++)t.push(u[A])}}var M=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_stamp");if(M){var p=JSON.parse(M);if(p&&p[j=this.getPageCollection(p,e)]){var h=p[j].annotations;if(h&&h.length>0)for(A=0;A<h.length;A++)t.push(h[A])}}var L=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_freetext");if(L){var w=JSON.parse(L);if(w&&w[j=this.getPageCollection(w,e)]){var c=w[j].annotations;if(c&&c.length>0)for(A=0;A<c.length;A++)t.push(c[A])}}var C=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_sticky");if(C){var g=JSON.parse(C);if(g&&g[j=this.getPageCollection(g,e)]){var m=g[j].annotations;if(m&&m.length>0)for(A=0;A<m.length;A++)t.push(m[A])}}var f=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_textMarkup");if(f){var y=JSON.parse(f);if(y){var j=this.getPageCollection(y,e);if(y[j]){var S=y[j].annotations;if(S&&S.length>0)for(var A=0;A<S.length;A++)t.push(S[A])}}}return t},r.prototype.findOverlappedAnnotations=function(e,t){if(this.overlappedAnnotations=[],e&&e.bounds)if("textMarkup"===e.shapeAnnotationType)for(var i=0;i<e.bounds.length;i++){var n=this.orderTextMarkupBounds(e.bounds[i]);this.calculateOverlappedAnnotationBounds(e,n,t)}else this.calculateOverlappedAnnotationBounds(e,e.bounds,t);return this.overlappedAnnotations},r.prototype.calculateOverlappedAnnotationBounds=function(e,t,i){var n=t;"Ink"===e.shapeAnnotationType&&(n={left:t.x,top:t.y,height:t.height,width:t.width});for(var o=parseInt(n.left),s=parseInt(n.top),a=parseInt(n.top+n.height),r=parseInt(n.left+n.width),l=0;l<i.length;l++)if(e.annotName===i[l].annotName)this.checkOverlappedCollections(i[l],this.overlappedAnnotations);else{var d=1;"textMarkup"===i[l].shapeAnnotationType&&(d=i[l].bounds.length);for(var u=0;u<d;u++){var M=void 0,p=i[l].bounds;if("Ink"===i[l].shapeAnnotationType&&(p={left:p.x,top:p.y,height:p.height,width:p.width}),M="textMarkup"!==i[l].shapeAnnotationType&&1===d?p:this.orderTextMarkupBounds(p[u])){var h=!1;(o<=parseInt(M.left)&&r>=parseInt(M.left)||o<=parseInt(M.left+M.width)&&r>=parseInt(M.left+M.width))&&(h=!0),h&&(h=s<=parseInt(M.top)&&a>=parseInt(M.top)||s<=parseInt(M.top+M.height)&&a>=parseInt(M.top+M.height)),h?this.checkOverlappedCollections(i[l],this.overlappedAnnotations):((parseInt(M.left)<=o&&parseInt(M.left+M.width)>=o||r>=parseInt(M.left)&&r<=parseInt(M.left+M.width))&&(h=!0),h&&(h=parseInt(M.top)<=s&&parseInt(M.top+M.height)>=s||a>=parseInt(M.top)&&a<=parseInt(M.top+M.height)),h?this.checkOverlappedCollections(i[l],this.overlappedAnnotations):((o<=parseInt(M.left)&&r>=parseInt(M.left)||o<=parseInt(M.left+M.width)&&r>=parseInt(M.left+M.width))&&(h=!0),h&&(h=parseInt(M.top)<=s&&parseInt(M.top+M.height)>=s||a>=parseInt(M.top)&&a<=parseInt(M.top+M.height)),h?this.checkOverlappedCollections(i[l],this.overlappedAnnotations):((parseInt(M.left)<=o&&parseInt(M.left+M.width)>=o||r>=parseInt(M.left)&&r<=parseInt(M.left+M.width))&&(h=!0),h&&(h=s<=parseInt(M.top)&&a>=parseInt(M.top)||s<=parseInt(M.top+M.height)&&a>=parseInt(M.top+M.height)),h&&this.checkOverlappedCollections(i[l],this.overlappedAnnotations))))}}}},r.prototype.findAnnotationMode=function(e,t,i){var n=this.pdfViewer.viewerBase.importedAnnotation[t];if(n){var o=void 0;if("shape"===i?o=n.shapeAnnotation:"shape_measure"===i?o=n.measureShapeAnnotation:"freeText"===i?o=n.freeTextAnnotation:"stamp"===i?o=n.stampAnnotations:"sticky"===i?o=n.stickyNotesAnnotation:"textMarkup"===i&&(o=n.textMarkupAnnotation),o)for(var s=0;s<o.length;s++)if(o[s].AnnotName===e.AnnotName)return"Imported Annotation"}return"Existing Annotation"},r.prototype.checkOverlappedCollections=function(e,t){if(t.length>0){for(var i=!1,n=0;n<t.length;n++)if(e.annotName===t[n].annotName&&e.bounds===t[n].bounds){i=!0;break}i||t.push(e)}else t.push(e)},r.prototype.orderTextMarkupBounds=function(e){return e.Left||e.Width?{left:e.Left,top:e.Top,height:e.Height,width:e.Width}:{left:e.left,top:e.top,height:e.height,width:e.width}},r.prototype.updateModifiedDate=function(e){if(e.modifiedDate&&(e.modifiedDate=this.setAnnotationModifiedDate(e.modifiedDate)),e.comments&&e.comments.length>0)for(var t=0;t<e.comments.length;t++)e.comments[t].modifiedDate&&(e.comments[t].modifiedDate=this.setAnnotationModifiedDate(e.comments[t].modifiedDate),e.comments[t].review&&e.comments[t].review.modifiedDate&&(e.comments[t].review.modifiedDate=this.setAnnotationModifiedDate(e.comments[t].review.modifiedDate)));e.review&&e.review.modifiedDate&&(e.review.modifiedDate=this.setAnnotationModifiedDate(e.review.modifiedDate))},r.prototype.setAnnotationModifiedDate=function(e){var t;if(""===e)return e;var i=parseInt(e.split(" ")[1].split(":")[0]);t=3===e.split(" ").length?i+":"+e.split(" ")[1].split(":")[1]+":"+e.split(" ")[1].split(":")[2]+" "+e.split(" ")[2]:i>=12?12===i?i+":"+e.split(" ")[1].split(":")[1]+":"+e.split(" ")[1].split(":")[2]+" PM":i-12+":"+e.split(" ")[1].split(":")[1]+":"+e.split(" ")[1].split(":")[2]+" PM":i+":"+e.split(" ")[1].split(":")[1]+":"+e.split(" ")[1].split(":")[2]+" AM";var n=e.split(" ")[0];return e.split(",").length>1?n+" "+t:n+", "+t},r.prototype.clear=function(){this.shapeAnnotationModule&&(this.shapeAnnotationModule.shapeCount=0),this.measureAnnotationModule&&(this.measureAnnotationModule.measureShapeCount=0),this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.clear(),this.stickyNotesAnnotationModule&&this.stickyNotesAnnotationModule.clear(),this.pdfViewer.refresh(),this.undoCommentsElement=[],this.redoCommentsElement=[],this.overlappedAnnotations=[],this.previousIndex=null,this.pdfViewer.annotation&&this.pdfViewer.annotation.stampAnnotationModule&&(this.pdfViewer.annotation.stampAnnotationModule.stampPageNumber=[]),this.pdfViewer.annotation&&this.pdfViewer.annotation.freeTextAnnotationModule&&(this.pdfViewer.annotation.freeTextAnnotationModule.freeTextPageNumbers=[],this.freeTextAnnotationModule.previousText="Type Here"),this.pdfViewer.annotation&&this.pdfViewer.annotation.inkAnnotationModule&&(this.pdfViewer.annotation.inkAnnotationModule.inkAnnotationindex=[]),window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_shape"),window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_shape_measure"),window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_stamp"),window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_sticky")},r.prototype.retrieveAnnotationCollection=function(){return this.pdfViewer.annotationCollection},r.prototype.checkAllowedInteractions=function(e,t){var i=this.updateAnnotationAllowedInteractions(t);if(i&&i.length>0)for(var n=0;n<i.length;n++)if("Select"===e){if("Move"===i[n]||"Resize"===i[n]||"Delete"===i[n]||"PropertyChange"===i[n]||"Select"===i[n])return!0}else if(i[n]===e)return!0;return!1},r.prototype.checkContextMenuDeleteItem=function(e){var t=this.findCurrentAnnotation();t&&t.annotationSettings&&(t.annotationSettings.isLock?this.checkAllowedInteractions("Delete",t)?e.enableItems([this.pdfViewer.localeObj.getConstant("Delete Context")],!0):e.enableItems([this.pdfViewer.localeObj.getConstant("Delete Context")],!1):e.enableItems([this.pdfViewer.localeObj.getConstant("Delete Context")],!0))},r.prototype.isEnableDelete=function(){var e=this.findCurrentAnnotation();return!(!e||!e.annotationSettings)&&(!e.annotationSettings.isLock||!!this.checkAllowedInteractions("Delete",e))},r.prototype.findCurrentAnnotation=function(){return this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.currentTextMarkupAnnotation?this.textMarkupAnnotationModule.currentTextMarkupAnnotation:this.pdfViewer.selectedItems.annotations&&this.pdfViewer.selectedItems.annotations[0]?this.pdfViewer.selectedItems.annotations[0]:void 0},r.prototype.updateAnnotationAllowedInteractions=function(e){var t=["None"];return e&&("FreeText"===e.shapeAnnotationType&&this.pdfViewer.freeTextSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.freeTextSettings.allowedInteractions,e.allowedInteractions):"Ink"===e.shapeAnnotationType&&this.pdfViewer.inkAnnotationSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.inkAnnotationSettings.allowedInteractions,e.allowedInteractions):"StickyNotes"===e.shapeAnnotationType&&this.pdfViewer.stickyNotesSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.stickyNotesSettings.allowedInteractions,e.allowedInteractions):"Stamp"===e.shapeAnnotationType&&this.pdfViewer.stampSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.stampSettings.allowedInteractions,e.allowedInteractions):"Image"===e.shapeAnnotationType&&this.pdfViewer.customStampSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.customStampSettings.allowedInteractions,e.allowedInteractions):"textMarkup"===e.shapeAnnotationType?"Highlight"===e.textMarkupAnnotationType&&this.pdfViewer.highlightSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.highlightSettings.allowedInteractions,e.allowedInteractions):"Underline"===e.textMarkupAnnotationType&&this.pdfViewer.underlineSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.underlineSettings.allowedInteractions,e.allowedInteractions):"Strikethrough"===e.textMarkupAnnotationType&&this.pdfViewer.strikethroughSettings.allowedInteractions&&(t=this.checkAllowedInteractionSettings(this.pdfViewer.strikethroughSettings.allowedInteractions,e.allowedInteractions)):""!==e.measureType?"Distance"===e.measureType&&this.pdfViewer.distanceSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.distanceSettings.allowedInteractions,e.allowedInteractions):"Perimeter"===e.measureType&&this.pdfViewer.perimeterSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.perimeterSettings.allowedInteractions,e.allowedInteractions):"Radius"===e.measureType&&this.pdfViewer.radiusSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.radiusSettings.allowedInteractions,e.allowedInteractions):"Area"===e.measureType&&this.pdfViewer.areaSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.areaSettings.allowedInteractions,e.allowedInteractions):"Volume"===e.measureType&&this.pdfViewer.volumeSettings.allowedInteractions&&(t=this.checkAllowedInteractionSettings(this.pdfViewer.volumeSettings.allowedInteractions,e.allowedInteractions)):"Line"===e.shapeAnnotationType&&this.pdfViewer.lineSettings.allowedInteractions?t=this.checkAllowedInteractionSettings(this.pdfViewer.lineSettings.allowedInteractions,e.allowedInteractions):"Arrow"!==e.shapeAnnotationType&&"LineWidthArrowHead"!==e.shapeAnnotationType||!this.pdfViewer.arrowSettings.allowedInteractions?"Circle"!==e.shapeAnnotationType&&"Ellipse"!==e.shapeAnnotationType&&"Oval"!==e.shapeAnnotationType||!this.pdfViewer.circleSettings.allowedInteractions?"Rectangle"!==e.shapeAnnotationType&&"Square"!==e.shapeAnnotationType||!this.pdfViewer.rectangleSettings.allowedInteractions?"Polygon"===e.shapeAnnotationType&&this.pdfViewer.polygonSettings.allowedInteractions&&(t=this.checkAllowedInteractionSettings(this.pdfViewer.polygonSettings.allowedInteractions,e.allowedInteractions)):t=this.checkAllowedInteractionSettings(this.pdfViewer.rectangleSettings.allowedInteractions,e.allowedInteractions):t=this.checkAllowedInteractionSettings(this.pdfViewer.circleSettings.allowedInteractions,e.allowedInteractions):t=this.checkAllowedInteractionSettings(this.pdfViewer.arrowSettings.allowedInteractions,e.allowedInteractions)),t},r.prototype.checkIsLockSettings=function(e){var t=!1;return e&&("FreeText"===e.shapeAnnotationType?t=this.checkLockSettings(this.pdfViewer.freeTextSettings.isLock):"Ink"===e.shapeAnnotationType?t=this.checkLockSettings(this.pdfViewer.inkAnnotationSettings.isLock):"StickyNotes"===e.shapeAnnotationType?t=this.checkLockSettings(this.pdfViewer.stickyNotesSettings.isLock):"Stamp"===e.shapeAnnotationType?t=this.checkLockSettings(this.pdfViewer.stampSettings.isLock):"Image"===e.shapeAnnotationType?t=this.checkLockSettings(this.pdfViewer.customStampSettings.isLock):"textMarkup"===e.shapeAnnotationType?"Highlight"===e.textMarkupAnnotationType?t=this.checkLockSettings(this.pdfViewer.highlightSettings.isLock):"Underline"===e.textMarkupAnnotationType?t=this.checkLockSettings(this.pdfViewer.underlineSettings.isLock):"Strikethrough"===e.textMarkupAnnotationType&&(t=this.checkLockSettings(this.pdfViewer.strikethroughSettings.isLock)):""!==e.measureType?"Distance"===e.measureType?t=this.checkLockSettings(this.pdfViewer.distanceSettings.isLock):"Perimeter"===e.measureType?t=this.checkLockSettings(this.pdfViewer.perimeterSettings.isLock):"Radius"===e.measureType?t=this.checkLockSettings(this.pdfViewer.radiusSettings.isLock):"Area"===e.measureType?t=this.checkLockSettings(this.pdfViewer.areaSettings.isLock):"Volume"===e.measureType&&(t=this.checkLockSettings(this.pdfViewer.volumeSettings.isLock)):"Line"===e.shapeAnnotationType?t=this.checkLockSettings(this.pdfViewer.lineSettings.isLock):"Arrow"===e.shapeAnnotationType||"LineWidthArrowHead"===e.shapeAnnotationType?t=this.checkLockSettings(this.pdfViewer.arrowSettings.isLock):"Circle"===e.shapeAnnotationType||"Ellipse"===e.shapeAnnotationType||"Oval"===e.shapeAnnotationType?t=this.checkLockSettings(this.pdfViewer.circleSettings.isLock):"Rectangle"===e.shapeAnnotationType||"Square"===e.shapeAnnotationType?t=this.checkLockSettings(this.pdfViewer.rectangleSettings.isLock):"Polygon"===e.shapeAnnotationType&&(t=this.checkLockSettings(this.pdfViewer.polygonSettings.isLock))),t},r.prototype.checkLockSettings=function(e){var t=!1;return(e||this.pdfViewer.annotationSettings.isLock)&&(t=!0),t},r.prototype.restrictContextMenu=function(){var e=!1,t=this.findCurrentAnnotation();return t&&this.checkIsLockSettings(t)&&this.checkAllowedInteractions("Select",t)&&(e=!0),e},r.prototype.checkAllowedInteractionSettings=function(e,t){if(t){if(1!==t.length)return t;if("None"!==t[0])return t}if(e){if(1!==e.length)return e;if("None"!==e[0])return e}return this.pdfViewer.annotationSettings.allowedInteractions?this.pdfViewer.annotationSettings.allowedInteractions:["None"]},r.prototype.getValue=function(e,t){if(t=t?t.toLowerCase():"hex","r"===e[0]){i=this.convertRgbToNumberArray(e);if("hex"===t||"hexa"===t){n=this.rgbToHex(i);return"hex"===t?n.slice(0,7):n}return"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i.slice(0,3))):"hsva"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i)):"null"}if("h"===e[0]){var i=this.hsvToRgb.apply(this,this.convertRgbToNumberArray(e));if("rgba"===t)return this.convertToRgbString(i);if("hex"===t||"hexa"===t){var n=this.rgbToHex(i);return"hex"===t?n.slice(0,7):n}return"rgb"===t?this.convertToRgbString(i.slice(0,3)):"null"}e=this.roundValue(e);var o=this.hexToRgb(e);return"rgb"!==t&&"hsv"!==t||(o=o.slice(0,3)),"rgba"===t||"rgb"===t?this.convertToRgbString(o):"hsva"===t||"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,o)):"hex"===t?e.slice(0,7):"a"===t?o[3].toString():"null"},r.prototype.convertRgbToNumberArray=function(e){return e.slice(e.indexOf("(")+1,e.indexOf(")")).split(",").map(function(e,t){return 3!==t?parseInt(e,10):parseFloat(e)})},r.prototype.convertToRgbString=function(e){return e.length?4===e.length?"rgba("+e.join()+")":"rgb("+e.join()+")":""},r.prototype.convertToHsvString=function(e){return 4===e.length?"hsva("+e.join()+")":"hsv("+e.join()+")"},r.prototype.roundValue=function(e){if(!e)return"";"#"!==e[0]&&(e="#"+e);var t=e.length;if(4===t&&(e+="f",t=5),5===t){for(var i="",n=1,o=e.length;n<o;n++)i+=e.charAt(n)+e.charAt(n);e="#"+i,t=9}return 7===t&&(e+="ff"),e},r.prototype.hexToRgb=function(e){if(!e)return[];9!==(e=e.trim()).length&&(e=this.roundValue(e));var t=Number((parseInt(e.slice(-2),16)/255).toFixed(2));e=e.slice(1,7);var i=parseInt(e,16),n=[];return n.push(i>>16&255),n.push(i>>8&255),n.push(255&i),n.push(t),n},r.prototype.rgbToHsv=function(e,i,n,o){e/=255,i/=255,n/=255;var s,a,r=Math.max(e,i,n),l=Math.min(e,i,n),d=r,u=r-l;if(a=0===r?0:u/r,r===l)s=0;else{switch(r){case e:s=(i-n)/u+(i<n?6:0);break;case i:s=(n-e)/u+2;break;case n:s=(e-i)/u+4}s/=6}var M=[Math.round(360*s),Math.round(1e3*a)/10,Math.round(1e3*d)/10];return t.isNullOrUndefined(o)||M.push(o),M},r.prototype.hsvToRgb=function(e,i,n,o){var s,a,r,l,d,u,M,p;if(i/=100,n/=100,0===i)return s=a=r=n,[Math.round(255*s),Math.round(255*a),Math.round(255*r),o];switch(e/=60,l=Math.floor(e),d=e-l,u=n*(1-i),M=n*(1-i*d),p=n*(1-i*(1-d)),l){case 0:s=n,a=p,r=u;break;case 1:s=M,a=n,r=u;break;case 2:s=u,a=n,r=p;break;case 3:s=u,a=M,r=n;break;case 4:s=p,a=u,r=n;break;default:s=n,a=u,r=M}var h=[Math.round(255*s),Math.round(255*a),Math.round(255*r)];return t.isNullOrUndefined(o)||h.push(o),h},r.prototype.rgbToHex=function(e){return e.length?"#"+this.hex(e[0])+this.hex(e[1])+this.hex(e[2])+(t.isNullOrUndefined(e[3])?"":0!==e[3]?(Math.round(255*e[3])+65536).toString(16).substr(-2):"00"):""},r.prototype.exportAnnotationsAsStream=function(e){var t=this;return this.pdfViewer.annotationModule&&this.pdfViewer.viewerBase.updateExportItem()?new Promise(function(i,n){t.pdfViewer.viewerBase.createRequestForExportAnnotations(!0,e,!0).then(function(e){i(e)})}):null},r.prototype.hex=function(e){return("0"+e.toString(16)).slice(-2)},r.prototype.cloneObject=function(e){return JSON.parse(JSON.stringify(e))},r.prototype.destroy=function(){this.destroyPropertiesWindow(),this.textMarkupAnnotationModule.clear()},r.prototype.getModuleName=function(){return"Annotation"},r.prototype.getVertexPointsXY=function(e){for(var t=[],i=0;i<e.length;i++)t[i]={X:e[i].x,Y:e[i].y};return t},r.prototype.addAnnotation=function(e,t,i,n,o){var s={x:1,y:1},a=0;t&&t.pageNumber&&t.pageNumber>0&&(a=t.pageNumber?t.pageNumber-1:0);var r=null,l=[];"FreeText"==e?(l[a]=this.pdfViewer.annotation.freeTextAnnotationModule.updateAddAnnotationDetails(t,s),this.pdfViewer.annotation.freeTextAnnotationModule.isAddAnnotationProgramatically=!0):"StickyNotes"==e?(l[a]=this.pdfViewer.annotation.stickyNotesAnnotationModule.updateAddAnnotationDetails(t,s),this.pdfViewer.annotation.stickyNotesAnnotationModule.isAddAnnotationProgramatically=!0):"Highlight"==e||"Underline"==e||"Strikethrough"==e?("Highlight"==e?r=t:"Underline"==e?r=t:"Strikethrough"==e&&(r=t),l[a]=this.pdfViewer.annotation.textMarkupAnnotationModule.updateAddAnnotationDetails(e,r),this.pdfViewer.annotation.textMarkupAnnotationModule.isAddAnnotationProgramatically=!0):"Line"===e||"Arrow"===e||"Rectangle"===e||"Circle"===e||"Polygon"===e?("Line"==e?r=t:"Arrow"==e?r=t:"Rectangle"==e?r=t:"Circle"==e?r=t:"Polygon"==e&&(r=t),l[a]=this.pdfViewer.annotation.shapeAnnotationModule.updateAddAnnotationDetails(e,r,s),this.pdfViewer.annotation.shapeAnnotationModule.isAddAnnotationProgramatically=!0):"Distance"===e||"Perimeter"===e||"Area"===e||"Radius"===e||"Volume"===e?("Distance"==e?r=t:"Perimeter"==e?r=t:"Area"==e?r=t:"Radius"==e?r=t:"Volume"==e&&(r=t),l[a]=this.pdfViewer.annotation.measureAnnotationModule.updateAddAnnotationDetails(e,r,s),this.pdfViewer.annotation.measureAnnotationModule.isAddAnnotationProgramatically=!0):"Stamp"===e?(t&&t.customStamps,l[a]=this.pdfViewer.annotation.stampAnnotationModule.updateAddAnnotationDetails(t,s,a,i,n,o),this.pdfViewer.annotation.stampAnnotationModule.isAddAnnotationProgramatically=!0):"Ink"===e&&(l[a]=this.pdfViewer.annotation.inkAnnotationModule.updateAddAnnotationDetails(t,s,a),this.pdfViewer.annotation.inkAnnotationModule.isAddAnnotationProgramatically=!0);var d={pdfAnnotation:l};this.pdfViewerBase.isAddAnnotation=!0,this.pdfViewerBase.importAnnotations(d),this.pdfViewerBase.isAddAnnotation=!1},r}(),gt=function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(a,r)}l((n=n.apply(e,t||[])).next())})},mt=function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=2&i[0]?s.return:i[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){l.label=i[1];break}if(6===i[0]&&l.label<a[1]){l.label=a[1],a=i;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(i);break}a[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],s=0}finally{o=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var o,s,a,r,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r},ft=function(){function e(e,t){this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.renderHyperlinkContent=function(e,t){if(this.pdfViewer.enableHyperlink){var i=e.hyperlinks,n=e.hyperlinkBounds,o=e.linkAnnotation,s=e.linkPage,a=e.annotationLocation;i&&i.length>0&&n.length>0&&this.renderWebLink(i,n,t),o&&o.length>0&&s.length>0&&this.renderDocumentLink(o,s,a,t)}},e.prototype.renderWebLink=function(e,i,n){for(var o=this,s=this,a=!1,r=this,l=0;l<e.length;l++)!function(l){var d=t.createElement("a",{id:"weblinkdiv_"+l}),u=i[l];if(d=r.setHyperlinkProperties(d,u,n),d.title=e[l],e[l]&&1===e[l].split("http").length){var M="http://"+e[l];d.setAttribute("href",M)}else d.setAttribute("href",e[l]);"CurrentTab"===r.pdfViewer.hyperlinkOpenState?(d.target="_self",d.onclick=function(t){return gt(o,void 0,void 0,function(){var i;return mt(this,function(n){switch(n.label){case 0:return a?[3,4]:(t.preventDefault(),s.pdfViewerBase.tool instanceof pt||s.pdfViewerBase.tool instanceof Mt?[2,!1]:[3,1]);case 1:return[4,s.pdfViewer.fireHyperlinkClick(e[l],d)];case 2:return(i=n.sent())&&(a=!0,d.click()),[2,i];case 3:return[3,5];case 4:return a=!1,[2,!0];case 5:return[2]}})})},d.onmouseover=function(){s.triggerHyperlinkEvent(d)}):"NewTab"===r.pdfViewer.hyperlinkOpenState?(d.target="_blank",d.onclick=function(t){return gt(o,void 0,void 0,function(){var i;return mt(this,function(n){switch(n.label){case 0:return a?[3,4]:(t.preventDefault(),s.pdfViewerBase.tool instanceof pt||s.pdfViewerBase.tool instanceof Mt?[2,!1]:[3,1]);case 1:return[4,s.pdfViewer.fireHyperlinkClick(e[l],d)];case 2:return(i=n.sent())&&(a=!0,d.click()),[2,i];case 3:return[3,5];case 4:return a=!1,[2,!0];case 5:return[2]}})})},d.onmouseover=function(){s.triggerHyperlinkEvent(d)}):"NewWindow"===r.pdfViewer.hyperlinkOpenState&&(d.onclick=function(t){return gt(o,void 0,void 0,function(){var i;return mt(this,function(n){switch(n.label){case 0:return t.preventDefault(),s.pdfViewerBase.tool instanceof pt||s.pdfViewerBase.tool instanceof Mt?[2,!1]:[3,1];case 1:return[4,s.pdfViewer.fireHyperlinkClick(e[l],d)];case 2:return(i=n.sent())&&window.open(d.href,"_blank","scrollbars=yes,resizable=yes"),[2,!1]}})})},d.onmouseover=function(){s.triggerHyperlinkEvent(d)}),document.getElementById(r.pdfViewer.element.id+"_pageDiv_"+n).appendChild(d)}(l)},e.prototype.triggerHyperlinkEvent=function(e){return!(this.pdfViewerBase.tool instanceof pt||this.pdfViewerBase.tool instanceof Mt)&&(this.pdfViewer.fireHyperlinkHover(e),!0)},e.prototype.renderDocumentLink=function(e,i,n,o){for(var s=this,a=this,r=0;r<e.length;r++)!function(r){var l=t.createElement("a",{id:"linkdiv_"+r}),d=e[r];if((l=a.setHyperlinkProperties(l,d,o)).setAttribute("href","javascript:void(0)"),void 0!==i[r]&&i[r]>0){var u=a.pdfViewerBase.pageSize[o].height,M=void 0,p=void 0;0!==n.length?(M=n[r],p=a.pdfViewerBase.pageSize[i[r]].top*a.pdfViewerBase.getZoomFactor()+(u-M)*a.pdfViewerBase.getZoomFactor()):p=a.pdfViewerBase.pageSize[i[r]].top*a.pdfViewerBase.getZoomFactor(),void 0!==p&&(l.name=p.toString(),l.onclick=function(){return!(s.pdfViewerBase.tool instanceof pt||s.pdfViewerBase.tool instanceof Mt)&&(s.pdfViewerBase.viewerContainer.scrollTop=parseInt(l.name),!1)}),document.getElementById(a.pdfViewer.element.id+"_pageDiv_"+o).appendChild(l)}}(r)},e.prototype.setHyperlinkProperties=function(e,t,i){return e.className="e-pv-hyperlink",e.style.background="transparent",e.style.position="absolute",e.style.left=t.Left*this.pdfViewerBase.getZoomFactor()+"px",e.style.top=t.Top*this.pdfViewerBase.getZoomFactor()+"px",e.style.width=t.Width*this.pdfViewerBase.getZoomFactor()+"px",t.Height<0?(e.style.height=-t.Height*this.pdfViewerBase.getZoomFactor()+"px",e.style.top=(t.Top+t.Height)*this.pdfViewerBase.getZoomFactor()+"px"):e.style.height=(t.Height<0?-t.Height:t.Height)*this.pdfViewerBase.getZoomFactor()+"px",e.style.color="transparent",this.pdfViewerBase.applyElementStyles(e,i),e},e.prototype.modifyZindexForTextSelection=function(e,t){if(this.pdfViewerBase.pageCount>0){var i=this.pdfViewerBase.getElement("_pageDiv_"+e);if(i)for(var n=i.childNodes,o=0;o<n.length;o++){var s=n[o];"A"===s.tagName&&(t?s.classList.add("e-pv-onselection"):s.classList.remove("e-pv-onselection"))}}},e.prototype.modifyZindexForHyperlink=function(e,t){t?e.classList.add("e-pv-onselection"):e.classList.remove("e-pv-onselection")},e.prototype.destroy=function(){for(var e=0;e<this.pdfViewerBase.pageCount-1;e++){var t=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+e);if(t){var i=t.getElementsByTagName("a");if(0!==i.length)for(var n=i.length-1;n>=0;n--)i[n].parentNode.removeChild(i[n])}}},e.prototype.getModuleName=function(){return"LinkAnnotation"},e}(),yt=function(){function e(e,t){var i=this;this.currentTextMarkupAddMode="",this.selectTextMarkupCurrentPage=null,this.currentTextMarkupAnnotation=null,this.isAddAnnotationProgramatically=!1,this.currentAnnotationIndex=null,this.isAnnotationSelect=!1,this.isDropletClicked=!1,this.isRightDropletClicked=!1,this.isLeftDropletClicked=!1,this.isSelectionMaintained=!1,this.isExtended=!1,this.isNewAnnotation=!1,this.selectedTextMarkup=null,this.multiPageCollection=[],this.triggerAddEvent=!1,this.isSelectedAnnotation=!1,this.dropletHeight=20,this.annotationClickPosition={},this.maintainSelection=function(e){i.isDropletClicked=!0,i.pdfViewer.textSelectionModule.initiateSelectionByTouch(),i.isExtended=!0,i.pdfViewer.textSelectionModule.selectionRangeArray=[]},this.selectionEnd=function(e){i.isDropletClicked&&(i.isDropletClicked=!1)},this.annotationLeftMove=function(e){i.isDropletClicked&&(i.isLeftDropletClicked=!0)},this.annotationRightMove=function(e){i.isDropletClicked&&(i.isRightDropletClicked=!0)},this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.createAnnotationSelectElement=function(){this.dropDivAnnotationLeft=t.createElement("div",{id:this.pdfViewer.element.id+"_droplet_left",className:"e-pv-drop"}),this.dropDivAnnotationLeft.style.borderRight="2px solid",this.dropDivAnnotationRight=t.createElement("div",{id:this.pdfViewer.element.id+"_droplet_right",className:"e-pv-drop"}),this.dropDivAnnotationRight.style.borderLeft="2px solid",this.dropElementLeft=t.createElement("div",{className:"e-pv-droplet",id:this.pdfViewer.element.id+"_dropletspan_left"}),this.dropElementLeft.style.transform="rotate(0deg)",this.dropDivAnnotationLeft.appendChild(this.dropElementLeft),this.dropElementRight=t.createElement("div",{className:"e-pv-droplet",id:this.pdfViewer.element.id+"_dropletspan_right"}),this.dropElementRight.style.transform="rotate(-90deg)",this.dropDivAnnotationRight.appendChild(this.dropElementRight),this.pdfViewerBase.pageContainer.appendChild(this.dropDivAnnotationLeft),this.pdfViewerBase.pageContainer.appendChild(this.dropDivAnnotationRight),this.dropElementLeft.style.top="20px",this.dropElementRight.style.top="20px",this.dropElementRight.style.left="-8px",this.dropElementLeft.style.left="-8px",this.dropDivAnnotationLeft.style.display="none",this.dropDivAnnotationRight.style.display="none",this.dropDivAnnotationLeft.addEventListener("mousedown",this.maintainSelection),this.dropDivAnnotationLeft.addEventListener("mousemove",this.annotationLeftMove),this.dropDivAnnotationLeft.addEventListener("mouseup",this.selectionEnd),this.dropDivAnnotationRight.addEventListener("mousedown",this.maintainSelection),this.dropDivAnnotationRight.addEventListener("mousemove",this.annotationRightMove),this.dropDivAnnotationRight.addEventListener("mouseup",this.selectionEnd)},e.prototype.textSelect=function(e,t,i){if(this.isLeftDropletClicked){var n=this.dropDivAnnotationRight.getBoundingClientRect(),o=this.dropDivAnnotationLeft.getBoundingClientRect(),s=t,a=i;e.classList.contains("e-pv-text")&&(o.top-25>n.top?this.pdfViewer.textSelectionModule.textSelectionOnDrag(e,s,a,!0):this.pdfViewer.textSelectionModule.textSelectionOnDrag(e,s,a,!1),this.updateLeftposition(s,a))}else if(this.isRightDropletClicked){var n=this.dropDivAnnotationLeft.getBoundingClientRect(),s=t,a=i;e.classList.contains("e-pv-text")&&(a>=n.top?this.pdfViewer.textSelectionModule.textSelectionOnDrag(e,s,a,!0):this.pdfViewer.textSelectionModule.textSelectionOnDrag(e,s,a,!1),this.updatePosition(s,a))}},e.prototype.showHideDropletDiv=function(e){var t=this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode;this.isEnableTextMarkupResizer(t)&&this.dropDivAnnotationLeft&&this.dropDivAnnotationRight&&(e?(this.dropDivAnnotationLeft.style.display="none",this.dropDivAnnotationRight.style.display="none"):(this.dropDivAnnotationLeft.style.display="",this.dropDivAnnotationRight.style.display="",this.updateDropletStyles(t)))},e.prototype.isEnableTextMarkupResizer=function(e){var t=!1;return e?"Highlight"===e&&this.pdfViewer.highlightSettings.enableTextMarkupResizer?t=!0:"Underline"===e&&this.pdfViewer.underlineSettings.enableTextMarkupResizer?t=!0:"Strikethrough"===e&&this.pdfViewer.strikethroughSettings.enableTextMarkupResizer?t=!0:this.pdfViewer.enableTextMarkupResizer&&(t=!0):this.pdfViewer.enableTextMarkupResizer?t=!0:this.pdfViewer.highlightSettings.enableTextMarkupResizer?t=!0:this.pdfViewer.underlineSettings.enableTextMarkupResizer?t=!0:this.pdfViewer.strikethroughSettings.enableTextMarkupResizer&&(t=!0),t},e.prototype.updateDropletStyles=function(e){this.isEnableTextMarkupResizer(e)&&this.dropDivAnnotationLeft&&this.dropDivAnnotationLeft.offsetWidth>0&&(this.dropDivAnnotationLeft.style.width=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropDivAnnotationRight.style.width=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementLeft.style.width=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementRight.style.width=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropDivAnnotationLeft.style.height=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropDivAnnotationRight.style.height=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementLeft.style.height=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementRight.style.height=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementLeft.style.top=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementRight.style.top=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px")},e.prototype.updateAnnotationBounds=function(){this.isSelectionMaintained=!1;var e=this.currentTextMarkupAnnotation;e&&e.isMultiSelect?(this.showHideDropletDiv(!0),this.updateMultiAnnotBounds(e)):e&&e.bounds&&(this.retreieveSelection(e,null),this.pdfViewer.textSelectionModule.maintainSelection(this.selectTextMarkupCurrentPage,!1),this.isSelectionMaintained=!0,window.getSelection().removeAllRanges())},e.prototype.updateMultiAnnotBounds=function(e){if(!e.annotpageNumbers&&(a=this.getAnnotations(e.pageNumber,null)))for(d=0;d<a.length;d++)if(a[d].annotName===e.annotName){e=a[d];break}for(var t=e.annotpageNumbers[0],i=e.annotpageNumbers[0],n=0;n<e.annotpageNumbers.length;n++){var o=e.annotpageNumbers[n];o>=i&&(i=o),o<=t&&(t=o)}for(var s=t;s<=i;s++){var a=this.getAnnotations(s,null);if(a)for(var r=0;r<e.annotNameCollection.length;r++)for(var l=e.annotNameCollection[r],d=0;d<a.length;d++)if(a[d].annotName===l){var u=a[d];this.retreieveSelection(u,null),this.pdfViewer.textSelectionModule.maintainSelection(u.pageNumber,!1)}}this.isSelectionMaintained=!0,window.getSelection().removeAllRanges()},e.prototype.retreieveSelection=function(e,t){for(var i=0;i<e.bounds.length;i++){var n=e.bounds[i],o=(n.left?n.left:n.Left)*this.pdfViewerBase.getZoomFactor(),s=(n.top?n.top:n.Top)*this.pdfViewerBase.getZoomFactor(),a=(n.width?n.width:n.Width)*this.pdfViewerBase.getZoomFactor(),r=(n.height?n.height:n.Height,this.pdfViewerBase.getElement("_textLayer_"+e.pageNumber));if(r){for(var l=r.childNodes,d=0;d<l.length;d++)if(l[d]){var u=l[d].getBoundingClientRect(),M=this.getClientValueTop(u.top,e.pageNumber),p=u.left-this.pdfViewerBase.getElement("_pageDiv_"+e.pageNumber).getBoundingClientRect().left,h=p+u.width,L=parseInt(l[d].style.left),w=parseInt(l[d].style.top),c=this.pdfViewer.textSelectionModule.checkLeftBounds(p,L,h,o),C=this.pdfViewer.textSelectionModule.checkTopBounds(M,w,s);if(c&&C){t=l[d];break}}if(null!=t){var g=this.pdfViewerBase.getElement("_textLayer_"+e.pageNumber).getBoundingClientRect();this.pdfViewer.textSelectionModule.textSelectionOnMouseMove(t,o+g.left,s+g.top,!1),e.bounds.length-1===i&&this.pdfViewer.textSelectionModule.textSelectionOnMouseMove(t,o+g.left+a,s+g.top,!1)}}}},e.prototype.updatePosition=function(e,t,i){this.showHideDropletDiv(!1);var n=this.pdfViewerBase.pageSize[this.pdfViewerBase.currentPageNumber-1].top,o=this.getClientValueTop(t,this.pdfViewerBase.currentPageNumber-1),s=document.getElementById(this.pdfViewer.element.id+"_droplet_right");s.style.top=i?o*this.pdfViewerBase.getZoomFactor()+n*this.pdfViewerBase.getZoomFactor()+"px":o+n*this.pdfViewerBase.getZoomFactor()+"px",s.style.left=e+this.pdfViewerBase.viewerContainer.scrollLeft-this.pdfViewerBase.viewerContainer.getBoundingClientRect().left+"px"},e.prototype.updateLeftposition=function(e,t,i){this.showHideDropletDiv(!1);var n=this.pdfViewerBase.pageSize[this.pdfViewerBase.currentPageNumber-1].top,o=this.getClientValueTop(t,this.pdfViewerBase.currentPageNumber-1),s=document.getElementById(this.pdfViewer.element.id+"_droplet_left");s.style.display="",s.style.top=i?o*this.pdfViewerBase.getZoomFactor()+n*this.pdfViewerBase.getZoomFactor()+"px":o+n*this.pdfViewerBase.getZoomFactor()+"px",s.style.left=e+this.pdfViewerBase.viewerContainer.scrollLeft-this.pdfViewerBase.viewerContainer.getBoundingClientRect().left-this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px"},e.prototype.getClientValueTop=function(e,t){return this.pdfViewerBase.getElement("_pageDiv_"+t)?e-this.pdfViewerBase.getElement("_pageDiv_"+t).getBoundingClientRect().top:e},e.prototype.renderTextMarkupAnnotationsInPage=function(e,t,i){var n=this.pdfViewerBase.getElement("_annotationCanvas_"+t);i?(this.renderTextMarkupAnnotations(null,t,n,this.pdfViewerBase.getZoomFactor()),this.renderTextMarkupAnnotations(e,t,n,this.pdfViewerBase.getZoomFactor(),!0)):this.renderTextMarkupAnnotations(e,t,n,this.pdfViewerBase.getZoomFactor())},e.prototype.renderTextMarkupAnnotations=function(e,t,i,n,o){if(i){var s=i.getContext("2d");s.setTransform(1,0,0,1,0,0),s.setLineDash([]);var a=void 0;if(a=o?e:this.getAnnotations(t,e))for(var r=0;r<a.length;r++){var l=a[r],d=null;if(l.TextMarkupAnnotationType){l.annotationAddMode=this.pdfViewer.annotationModule.findAnnotationMode(l,t,l.AnnotType),l.Author||(l.Author=this.pdfViewer.annotationModule.updateAnnotationAuthor("textMarkup",l.TextMarkupAnnotationType)),l.Subject||(l.Subject=l.TextMarkupAnnotationType),l.AnnotationSettings&&l.AnnotationSettings.isLock?l.AnnotationSettings={isLock:l.AnnotationSettings.isLock}:l.AnnotationSettings=this.getAnnotationSettings(l.TextMarkupAnnotationType);var u=!0;if(u="Imported Annotation"===l.annotationAddMode?l.IsPrint:this.getIsPrintValue(l.TextMarkupAnnotationType),l.allowedInteractions=l.AllowedInteractions?l.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(l),d={textMarkupAnnotationType:l.TextMarkupAnnotationType,color:l.Color,allowedInteractions:l.allowedInteractions,opacity:l.Opacity,bounds:l.Bounds,author:l.Author,subject:l.Subject,modifiedDate:l.ModifiedDate,note:l.Note,rect:l.Rect,annotName:l.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(l.Comments,l,l.Author),review:{state:l.State,stateModel:l.StateModel,modifiedDate:l.ModifiedDate,author:l.Author},shapeAnnotationType:"textMarkup",pageNumber:t,textMarkupContent:l.TextMarkupContent,textMarkupStartIndex:0,textMarkupEndIndex:0,annotationSelectorSettings:this.getSettings(l),customData:this.pdfViewer.annotation.getCustomData(l),annotationAddMode:l.annotationAddMode,annotationSettings:l.AnnotationSettings,isPrint:u,isCommentLock:l.IsCommentLock},l.IsMultiSelect&&(d.annotNameCollection=l.AnnotNameCollection,d.annotpageNumbers=l.AnnotpageNumbers,d.isMultiSelect=l.IsMultiSelect),l.textMarkupContent&&""!==l.textMarkupContent&&(d.textMarkupContent=l.textMarkupContent,d.textMarkupStartIndex=l.textMarkupStartIndex,d.textMarkupEndIndex=l.textMarkupEndIndex),this.pdfViewer.annotationModule.storeAnnotations(t,d,"_annotations_textMarkup"),this.isAddAnnotationProgramatically){var M={opacity:d.opacity,author:l.author,subject:l.subject,modifiedDate:l.modifiedDate,width:d.bounds.width,height:d.bounds.height};this.pdfViewer.fireAnnotationAdd(d.pageNumber,d.annotName,l.TextMarkupAnnotationType,d.bounds,M)}}var p=l.TextMarkupAnnotationType?l.TextMarkupAnnotationType:l.textMarkupAnnotationType,h=l.Bounds?l.Bounds:l.bounds,L=l.Opacity?l.Opacity:l.opacity,w=l.Color?l.Color:l.color,c=!0;switch(l.TextMarkupAnnotationType&&(c=l.IsPrint),l.textMarkupAnnotationType&&(c=l.isPrint),p){case"Highlight":this.renderHighlightAnnotation(h,L,w,s,n,c,t);break;case"Strikethrough":this.renderStrikeoutAnnotation(h,L,w,s,n,t,c);break;case"Underline":this.renderUnderlineAnnotation(h,L,w,s,n,t,c)}}var C=!1;if(this.currentTextMarkupAnnotation&&this.currentTextMarkupAnnotation.annotpageNumbers)for(var g=0;g<this.currentTextMarkupAnnotation.annotpageNumbers.length;g++)if(t===this.currentTextMarkupAnnotation.annotpageNumbers[g]){C=!0,this.isAnnotationSelect=!1;break}(t===this.selectTextMarkupCurrentPage||C)&&(this.isAnnotationSelect?this.isAnnotationSelect=!1:this.maintainAnnotationSelection())}},e.prototype.getSettings=function(e){return e.AnnotationSelectorSettings?e.AnnotationSelectorSettings:this.getSelector(e.TextMarkupAnnotationType)},e.prototype.drawTextMarkupAnnotations=function(e){this.isTextMarkupAnnotationMode=!0,this.currentTextMarkupAddMode=e;var t=!0;this.multiPageCollection=[];var i=this.pdfViewer.textSelectionModule.selectionRangeArray;if(i.length>0&&!this.isSelectionMaintained&&this.convertSelectionToTextMarkup(e,i,this.pdfViewerBase.getZoomFactor()),this.isEnableTextMarkupResizer(e)&&this.isExtended&&window.getSelection().toString()){if((s=this.getDrawnBounds())[0]&&s[0].bounds)for(var n=this.currentTextMarkupAnnotation,o=0;o<s.length;o++)if(n&&n.pageNumber===s[o].pageIndex)this.currentTextMarkupAnnotation=n,this.selectTextMarkupCurrentPage=s[o].pageIndex,this.updateTextMarkupAnnotationBounds(s,o);else if(n&&""===e&&(e=n.textMarkupAnnotationType),n.isMultiSelect)n.isMultiSelect&&n.annotNameCollection&&this.modifyCurrentAnnotation(n,s,o);else{a=!1;this.isMultiAnnotation(e)&&(this.multiPageCollection.push(n),a=!0),this.drawTextMarkups(e,s[o].bounds,s[o].pageIndex,s[o].rect,this.pdfViewerBase.getZoomFactor(),s[o].textContent,s[o].startIndex,s[o].endIndex,a)}}else if(window.getSelection().toString()){var s=this.getDrawnBounds(),a=this.isMultiPageAnnotations(s,e);if(s.length>0)for(var r=0;r<s.length;r++)""===e&&(t=!1),this.drawTextMarkups(e,s[r].bounds,s[r].pageIndex,s[r].rect,this.pdfViewerBase.getZoomFactor(),s[r].textContent,s[r].startIndex,s[r].endIndex,a)}if(this.multiPageCollection)for(var l=0;l<this.multiPageCollection.length;l++)this.updateAnnotationNames(this.multiPageCollection[l],this.multiPageCollection[l].pageNumber);this.isExtended=!1,this.isSelectionMaintained=!1,t&&this.pdfViewer.textSelectionModule.clearTextSelection(),this.isEnableTextMarkupResizer(e)&&this.updateAnnotationBounds()},e.prototype.isMultiPageAnnotations=function(e,t){for(var i=!1,n=0;n<e.length;n++)if(e[n].pageIndex!==e[0].pageIndex&&this.isMultiAnnotation(t)){i=!0;break}return i},e.prototype.isMultiAnnotation=function(e){var t=!1;return"Highlight"===e&&this.pdfViewer.highlightSettings.enableMultiPageAnnotation?t=!0:"Underline"===e&&this.pdfViewer.underlineSettings.enableMultiPageAnnotation?t=!0:"Strikethrough"===e&&this.pdfViewer.strikethroughSettings.enableMultiPageAnnotation?t=!0:this.pdfViewer.enableMultiPageAnnotation&&(t=!0),t},e.prototype.modifyCurrentAnnotation=function(e,t,i){for(var n=0;n<e.annotNameCollection.length;n++){var o=e.annotNameCollection[n],s=this.getAnnotations(t[i].pageIndex,null);if(s)for(var a=0;a<s.length;a++)if(s[a].annotName===o){this.currentTextMarkupAnnotation=s[a],this.selectTextMarkupCurrentPage=t[i].pageIndex,this.updateTextMarkupAnnotationBounds(t,i);break}}},e.prototype.drawAnnotationSelector=function(e,t,i){for(var n=0;n<e.bounds.length;n++){var o=e.bounds[n],s=o.left?o.left:o.Left,a=o.top?o.top:o.Top,r=o.width?o.width:o.Width,l=o.height?o.height:o.Height;i||(i=this.pdfViewerBase.getElement("_annotationCanvas_"+e.pageNumber)),this.drawAnnotationSelectRect(i,this.getMagnifiedValue(s-.5,this.pdfViewerBase.getZoomFactor()),this.getMagnifiedValue(a-.5,this.pdfViewerBase.getZoomFactor()),this.getMagnifiedValue(r+.5,this.pdfViewerBase.getZoomFactor()),this.getMagnifiedValue(l+.5,this.pdfViewerBase.getZoomFactor()),t)}},e.prototype.selectMultiPageAnnotations=function(e){for(var t=0;t<e.annotNameCollection.length;t++){var i=e.annotNameCollection[t];if(i!==e.annotName)for(var n=0;n<e.annotpageNumbers.length;n++){var o=e.annotpageNumbers[n],s=this.getAnnotations(o,null);if(s)for(var a=0;a<s.length;a++)if(s[a].annotName===i){var r=s[a];this.drawAnnotationSelector(r,e)}}}},e.prototype.deletMultiPageAnnotation=function(e){for(var t=0;t<e.annotNameCollection.length;t++){var i=e.annotNameCollection[t];if(i!==e.annotName)for(var n=0;n<e.annotpageNumbers.length;n++){var o=e.annotpageNumbers[n],s=this.getAnnotations(o,null);if(s)for(var a=0;a<s.length;a++)if(s[a].annotName===i){var r=s[a],l=null;l=s.splice(a,1)[0],this.pdfViewer.annotationModule.addAction(o,a,l,"Text Markup Deleted",null),this.currentAnnotationIndex=a,this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(l,"textMarkup");var d=document.getElementById(l.annotName);d&&(1===d.parentElement.childElementCount?this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAccordionContainer(d):d.remove()),this.pdfViewer.annotationModule.updateAnnotationCollection(r),this.manageAnnotations(s,o),this.pdfViewer.annotationModule.updateImportAnnotationCollection(r,r.pageNumber,"textMarkupAnnotation");r.annotName,r.bounds;this.pdfViewer.annotationModule.renderAnnotations(o,null,null,null)}}}},e.prototype.modifyMultiPageAnnotations=function(e,t,i){for(var n=0;n<e.annotNameCollection.length;n++){var o=e.annotNameCollection[n];if(o!==e.annotName)for(var s=0;s<e.annotpageNumbers.length;s++){var a=e.annotpageNumbers[s],r=this.getAnnotations(a,null);if(r)for(var l=0;l<r.length;l++)r[l].annotName===o&&("Color"===t?r[l].color=i:r[l].opacity=i,r[l].modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.currentAnnotationIndex=l,null!==status&&"changed"!==status||this.pdfViewer.annotationModule.addAction(r[l].pageNumber,l,r[l],"Text Markup Property modified",t),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAnnotationModifiedDate(r[l]),this.manageAnnotations(r,a),this.pdfViewer.annotationModule.renderAnnotations(a,null,null,null))}}},e.prototype.convertSelectionToTextMarkup=function(e,t,i){var n=!1;this.triggerAddEvent=!1,this.multiPageCollection=[];for(var o=0;o<t.length;o++){var s=t[o].textContent,a=void 0;if(t[o].startNode===t[o].endNode){var r=document.getElementById(t[o].startNode).textContent;a=this.getIndexNumbers(t[o].pageNumber,s,r)}else a=this.getIndexNumbers(t[o].pageNumber,s);if(!n)for(var l=1;l<t.length;l++)if(t[l].pageNumber!==t[0].pageNumber&&this.isMultiAnnotation(e)){n=!0;break}this.isMultiAnnotation(e)&&t.length-1===o&&(this.triggerAddEvent=!0),this.drawTextMarkups(e,t[o].rectangleBounds,t[o].pageNumber,t[o].bound,i,s,a.startIndex,a.endIndex,n)}},e.prototype.updateTextMarkupAnnotationBounds=function(e,t){if(this.currentTextMarkupAnnotation){var i=this.getAnnotations(e[t].pageIndex,null),n=null;if(i){for(var o=0;o<i.length;o++)JSON.stringify(this.currentTextMarkupAnnotation)===JSON.stringify(i[o])&&(i[o].bounds=e[t].bounds,i[o].textMarkupContent=e[t].textContent,i[o].textMarkupStartIndex=e[t].startIndex,i[o].textMarkupEndIndex=e[t].endIndex,i[o].modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),n=i[o]);if(this.manageAnnotations(i,e[t].pageIndex),this.currentTextMarkupAnnotation=null,this.pdfViewer.annotationModule.renderAnnotations(e[t].pageIndex,null,null,null),this.pdfViewer.isDocumentEdited=!0,n){var s={opacity:n.opacity,color:n.color,author:n.author,subject:n.subject,modifiedDate:n.modifiedDate},a=this.multiPageCollectionList(n);a.length>0?e.length-1===t&&this.pdfViewer.fireAnnotationResize(e[t].pageIndex,n.annotName,n.textMarkupAnnotationType,n.bounds,s,n.textMarkupContent,n.textMarkupStartIndex,n.textMarkupEndIndex,null,a):this.pdfViewer.fireAnnotationResize(e[t].pageIndex,n.annotName,n.textMarkupAnnotationType,n.bounds,s,n.textMarkupContent,n.textMarkupStartIndex,n.textMarkupEndIndex,null)}this.currentAnnotationIndex=null,this.selectTextMarkupCurrentPage=null}}},e.prototype.multiPageCollectionList=function(e){var t=[];if(e.isMultiSelect&&e.annotNameCollection){t.push(e);for(var i=0;i<e.annotNameCollection.length;i++){var n=e.annotNameCollection[i];if(n!==e.annotName)for(var o=0;o<e.annotpageNumbers.length;o++){var s=e.annotpageNumbers[o],a=this.getAnnotations(s,null);if(a)for(var r=0;r<a.length;r++)a[r].annotName===n&&t.push(a[r])}}}return t},e.prototype.updateAnnotationNames=function(e,t){if(e){var i=this.getAnnotations(t,null);if(i){for(var n=0;n<i.length;n++)if(e.annotName===i[n].annotName){for(var o=[],s=[],a=0;a<this.multiPageCollection.length;a++)o.push(this.multiPageCollection[a].annotName),s.push(this.multiPageCollection[a].pageNumber);i[n].isMultiSelect=!0,i[n].annotNameCollection=o,i[n].annotpageNumbers=s,i[n]}this.manageAnnotations(i,t)}}},e.prototype.updateAnnotationContent=function(e,t){if(e){var i=this.getAnnotations(this.selectTextMarkupCurrentPage,null);if(i){for(var n=0;n<i.length;n++)JSON.stringify(this.currentTextMarkupAnnotation)===JSON.stringify(i[n])&&(i[n].textMarkupContent=t.textContent,i[n].textMarkupStartIndex=t.startIndex,i[n].textMarkupEndIndex=t.endIndex,i[n]),this.pdfViewer.annotationModule.storeAnnotationCollections(i[n],this.selectTextMarkupCurrentPage);this.manageAnnotations(i,this.selectTextMarkupCurrentPage)}}},e.prototype.drawTextMarkups=function(e,i,n,o,s,a,r,l,d){var u=null;this.isNewAnnotation=!1;var M,p="Guest",h=this.getPageContext(n),L=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();this.highlightColor=this.pdfViewer.highlightSettings.color,this.underlineColor=this.pdfViewer.underlineSettings.color,this.strikethroughColor=this.pdfViewer.strikethroughSettings.color,this.highlightOpacity=this.pdfViewer.highlightSettings.opacity,this.underlineOpacity=this.pdfViewer.underlineSettings.opacity,this.strikethroughOpacity=this.pdfViewer.strikethroughSettings.opacity,this.annotationAddMode="UI Drawn Annotation";var w;if(h){switch(h.setLineDash([]),e){case"Highlight":this.isNewAnnotation=!0,M="Highlight",p="Guest"!==this.pdfViewer.highlightSettings.author&&this.pdfViewer.highlightSettings.author?this.pdfViewer.highlightSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest",w=this.pdfViewer.highlightSettings.allowedInteractions?this.pdfViewer.highlightSettings.allowedInteractions:"None",(u=this.getAddedAnnotation(e,this.highlightColor,this.highlightOpacity,i,p,M,L,"",!1,o,n,a,r,l,d,w))&&this.renderHighlightAnnotation(u.bounds,u.opacity,u.color,h,s,u.isPrint,n);break;case"Strikethrough":this.isNewAnnotation=!0,M="Strikethrough",p="Guest"!==this.pdfViewer.strikethroughSettings.author&&this.pdfViewer.strikethroughSettings.author?this.pdfViewer.strikethroughSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest",w=this.pdfViewer.strikethroughSettings.allowedInteractions?this.pdfViewer.strikethroughSettings.allowedInteractions:"None",(u=this.getAddedAnnotation(e,this.strikethroughColor,this.strikethroughOpacity,i,p,M,L,"",!1,o,n,a,r,l,d,w))&&this.renderStrikeoutAnnotation(u.bounds,u.opacity,u.color,h,s,n,u.isPrint);break;case"Underline":this.isNewAnnotation=!0,M="Underline",p="Guest"!==this.pdfViewer.underlineSettings.author&&this.pdfViewer.underlineSettings.author?this.pdfViewer.underlineSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest",w=this.pdfViewer.underlineSettings.allowedInteractions?this.pdfViewer.underlineSettings.allowedInteractions:"None",(u=this.getAddedAnnotation(e,this.underlineColor,this.underlineOpacity,i,p,M,L,"",!1,o,n,a,r,l,d,w))&&this.renderUnderlineAnnotation(u.bounds,u.opacity,u.color,h,s,n,u.isPrint)}if(this.isNewAnnotation=!1,u){this.pdfViewer.isDocumentEdited=!0;var c={opacity:u.opacity,color:u.color,author:u.author,subject:u.subject,modifiedDate:u.modifiedDate};this.pdfViewer.annotationModule.actionCollection[this.pdfViewer.annotationModule.actionCollection.length-1].index;this.isMultiAnnotation(e)?this.triggerAddEvent&&this.pdfViewer.fireAnnotationAdd(n,u.annotName,e,u.bounds,c,a,r,l,null,this.multiPageCollection):this.pdfViewer.fireAnnotationAdd(n,u.annotName,e,u.bounds,c,a,r,l)}t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.toolbarModule.annotationToolbarModule.createPropertyTools(e)}},e.prototype.retreiveTextIndex=function(e){if(""===e.textMarkupContent){this.retreieveSelection(e,null);var t=this.getDrawnBounds();window.getSelection().removeAllRanges(),t[0]&&t[0].bounds&&(this.updateAnnotationContent(e,t[0]),e.textMarkupContent=t[0].textContent,e.textMarkupStartIndex=t[0].startIndex,e.textMarkupEndIndex=t[0].endIndex)}return e},e.prototype.renderHighlightAnnotation=function(e,t,i,n,o,s,a){for(var r=0;r<e.length;r++){var l=e[r];n.beginPath();var d=l.X?l.X:l.left,u=l.Y?l.Y:l.top,M=l.Width?l.Width:l.width,p=l.Height?l.Height:l.height;d=d||l.x,u=u||l.y,p-=1,n.canvas.id===this.pdfViewer.element.id+"_print_annotation_layer_"+a?s&&(n.rect(d*o,u*o,M*o,p*o),n.globalAlpha=.5*t,n.closePath(),n.fillStyle=i,n.msFillRule="nonzero",n.fill()):(n.rect(d*o,u*o,M*o,p*o),n.globalAlpha=.5*t,n.closePath(),n.fillStyle=i,n.msFillRule="nonzero",n.fill())}n.save()},e.prototype.renderStrikeoutAnnotation=function(e,t,i,n,o,s,a){for(var r=0;r<e.length;r++){var l=this.getProperBounds(e[r]),d=this.pdfViewerBase.pageSize[s];n.canvas.id===this.pdfViewer.element.id+"_print_annotation_layer_"+s?a&&(1===d.rotation?this.drawLine(t,l.x+l.width/2,l.y,l.width,l.height,i,o,n,s):2===d.rotation?this.drawLine(t,l.x,l.y+l.height/2,l.width,l.height,i,o,n,s):3===d.rotation?this.drawLine(t,l.x,l.y,l.width/2,l.height,i,o,n,s):this.drawLine(t,l.x,l.y,l.width,l.height/2,i,o,n,s)):1===d.rotation?this.drawLine(t,l.x+l.width/2,l.y,l.width,l.height,i,o,n,s):2===d.rotation?this.drawLine(t,l.x,l.y+l.height/2,l.width,l.height,i,o,n,s):3===d.rotation?this.drawLine(t,l.x,l.y,l.width/2,l.height,i,o,n,s):this.drawLine(t,l.x,l.y,l.width,l.height/2,i,o,n,s)}},e.prototype.renderUnderlineAnnotation=function(e,t,i,n,o,s,a){for(var r=0;r<e.length;r++){var l=this.getProperBounds(e[r]);n.canvas.id===this.pdfViewer.element.id+"_print_annotation_layer_"+s?a&&this.drawLine(t,l.x,l.y,l.width,l.height,i,o,n,s):this.drawLine(t,l.x,l.y,l.width,l.height,i,o,n,s)}},e.prototype.getProperBounds=function(e){var t=e.X?e.X:e.left,i=e.Y?e.Y:e.top,n=e.Width?e.Width:e.width,o=e.Height?e.Height:e.height;return t=t||e.x,i=i||e.y,{x:t,y:i,width:n,height:o}},e.prototype.drawLine=function(e,i,n,o,s,a,r,l,d){l.globalAlpha=e,t.isBlazor()&&(n-=1),s-=1,l.beginPath();var u=this.pdfViewerBase.pageSize[d];1===u.rotation?(l.moveTo(i*r,n*r),l.lineTo(i*r,(n+s)*r)):2===u.rotation?(l.moveTo(i*r,n*r),l.lineTo((o+i)*r,n*r)):3===u.rotation?(l.moveTo((o+i)*r,n*r),l.lineTo((o+i)*r,(n+s)*r)):(l.moveTo(i*r,(n+s)*r),l.lineTo((o+i)*r,(n+s)*r)),l.lineWidth=1,l.strokeStyle=a,l.closePath(),l.msFillRule="nonzero",l.stroke()},e.prototype.printTextMarkupAnnotations=function(e,i,n,o,s,a){var r=t.createElement("canvas",{id:this.pdfViewer.element.id+"_print_annotation_layer_"+i});r.style.width="816px",r.style.height="1056px";var l=this.pdfViewerBase.pageSize[i].width,d=this.pdfViewerBase.pageSize[i].height;r.height=d*this.pdfViewerBase.getZoomFactor(),r.width=l*this.pdfViewerBase.getZoomFactor();var u=this.getAnnotations(i,null,"_annotations_textMarkup"),M=this.getAnnotations(i,null,"_annotations_shape"),p=this.getAnnotations(i,null,"_annotations_shape_measure"),h=this.getAnnotations(i,null,"_annotations_stamp"),L=this.getAnnotations(i,null,"_annotations_sticky");return h||M||L||p?this.pdfViewer.renderDrawing(r,i):(this.pdfViewer.annotation.renderAnnotations(i,o,s,null,r),this.pdfViewer.annotation.stampAnnotationModule.renderStampAnnotations(n,i,r),this.pdfViewer.annotation.stickyNotesAnnotationModule.renderStickyNotesAnnotations(a,i,r)),u?this.renderTextMarkupAnnotations(null,i,r,1):this.renderTextMarkupAnnotations(e,i,r,1),r.toDataURL()},e.prototype.saveTextMarkupAnnotations=function(){var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_textMarkup");this.pdfViewerBase.isStorageExceed&&(e=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_textMarkup"]);for(var t=new Array,i=0;i<this.pdfViewerBase.pageCount;i++)t[i]=[];if(e&&!this.pdfViewer.annotationSettings.skipDownload)for(var n=JSON.parse(e),o=0;o<n.length;o++){var s=[],a=n[o];if(a){for(var r=0;a.annotations.length>r;r++){this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.getBoundsForSave(a.annotations[r].bounds,o));var l=a.annotations[r].color;a.annotations[r].color=JSON.stringify(this.getRgbCode(l)),a.annotations[r].rect=JSON.stringify(a.annotations[r].rect)}s=a.annotations}t[a.pageIndex]=s}return JSON.stringify(t)},e.prototype.deleteTextMarkupAnnotation=function(){if(this.currentTextMarkupAnnotation){var e=!1;if(this.currentTextMarkupAnnotation.annotationSettings&&(e=this.currentTextMarkupAnnotation.annotationSettings.isLock,this.pdfViewer.annotationModule.checkAllowedInteractions("Delete",this.currentTextMarkupAnnotation)&&(e=!1)),!e){var i=null;this.showHideDropletDiv(!0);var n=this.currentTextMarkupAnnotation;this.currentTextMarkupAnnotation.isMultiSelect&&n.annotNameCollection&&this.deletMultiPageAnnotation(n);var o=this.getAnnotations(this.selectTextMarkupCurrentPage,null);if(o){for(var s=0;s<o.length;s++)if(JSON.stringify(this.currentTextMarkupAnnotation)===JSON.stringify(o[s])){i=o.splice(s,1)[0],this.pdfViewer.annotationModule.addAction(this.selectTextMarkupCurrentPage,s,i,"Text Markup Deleted",null),this.currentAnnotationIndex=s,this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(i,"textMarkup");var a=document.getElementById(i.annotName);a&&(1===a.parentElement.childElementCount?this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAccordionContainer(a):a.remove())}this.pdfViewer.annotationModule.updateAnnotationCollection(this.currentTextMarkupAnnotation),this.manageAnnotations(o,this.selectTextMarkupCurrentPage),this.pdfViewer.annotationModule.updateImportAnnotationCollection(this.currentTextMarkupAnnotation,this.currentTextMarkupAnnotation.pageNumber,"textMarkupAnnotation");var r=this.currentTextMarkupAnnotation.annotName,l=this.currentTextMarkupAnnotation.bounds;this.currentTextMarkupAnnotation=null,this.pdfViewer.annotationModule.renderAnnotations(this.selectTextMarkupCurrentPage,null,null,null),this.pdfViewer.isDocumentEdited=!0;var d=this.multiPageCollectionList(n);d.length>0?(d.push(i),this.pdfViewer.fireAnnotationRemove(this.selectTextMarkupCurrentPage,r,i.textMarkupAnnotationType,l,i.textMarkupContent,i.textMarkupStartIndex,i.textMarkupEndIndex,d)):this.pdfViewer.fireAnnotationRemove(this.selectTextMarkupCurrentPage,r,i.textMarkupAnnotationType,l,i.textMarkupContent,i.textMarkupStartIndex,i.textMarkupEndIndex),this.currentAnnotationIndex=null,this.selectTextMarkupCurrentPage=null,t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.pdfViewer.toolbarModule.annotationToolbarModule.hideMobileAnnotationToolbar(),this.pdfViewer.toolbarModule.showToolbar(!0))}}}},e.prototype.modifyColorProperty=function(e){if(this.currentTextMarkupAnnotation){var t=this.modifyAnnotationProperty("Color",e,null);this.manageAnnotations(t,this.selectTextMarkupCurrentPage),this.pdfViewer.annotationModule.renderAnnotations(this.selectTextMarkupCurrentPage,null,null,null),this.pdfViewer.isDocumentEdited=!0;var i=this.currentTextMarkupAnnotation,n=this.multiPageCollectionList(i);n.length>0?(this.pdfViewer.fireAnnotationPropertiesChange(this.selectTextMarkupCurrentPage,i.annotName,i.textMarkupAnnotationType,!0,!1,!1,!1,i.textMarkupContent,i.textMarkupStartIndex,i.textMarkupEndIndex,n),this.currentAnnotationIndex=null):(this.pdfViewer.fireAnnotationPropertiesChange(this.selectTextMarkupCurrentPage,i.annotName,i.textMarkupAnnotationType,!0,!1,!1,!1,i.textMarkupContent,i.textMarkupStartIndex,i.textMarkupEndIndex),this.currentAnnotationIndex=null)}},e.prototype.modifyOpacityProperty=function(e,t){if(this.currentTextMarkupAnnotation){var i=void 0;if((i=t?this.modifyAnnotationProperty("Opacity",t,"changed"):this.modifyAnnotationProperty("Opacity",e.value/100,e.name))&&(this.manageAnnotations(i,this.selectTextMarkupCurrentPage),this.pdfViewer.annotationModule.renderAnnotations(this.selectTextMarkupCurrentPage,null,null,null),t||"changed"===e.name)){this.pdfViewer.isDocumentEdited=!0;var n=this.currentTextMarkupAnnotation,o=this.multiPageCollectionList(n);o.length>0?(this.pdfViewer.fireAnnotationPropertiesChange(this.selectTextMarkupCurrentPage,n.annotName,n.textMarkupAnnotationType,!1,!0,!1,!1,n.textMarkupContent,n.textMarkupStartIndex,n.textMarkupEndIndex,o),this.currentAnnotationIndex=null):(this.pdfViewer.fireAnnotationPropertiesChange(this.selectTextMarkupCurrentPage,n.annotName,n.textMarkupAnnotationType,!1,!0,!1,!1,n.textMarkupContent,n.textMarkupStartIndex,n.textMarkupEndIndex),this.currentAnnotationIndex=null)}}},e.prototype.modifyAnnotationProperty=function(e,t,i,n){var o=this.currentTextMarkupAnnotation;o.isMultiSelect&&o.annotNameCollection&&this.modifyMultiPageAnnotations(o,e,t);var s=this.getAnnotations(this.selectTextMarkupCurrentPage,null);if(s)for(var a=0;a<s.length;a++)JSON.stringify(this.currentTextMarkupAnnotation)===JSON.stringify(s[a])&&("Color"===e?s[a].color=t:"Opacity"===e?s[a].opacity=t:"AnnotationSettings"===e&&(s[a].annotationSettings={isLock:t}),s[a].modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.currentAnnotationIndex=a,null!==i&&"changed"!==i||this.pdfViewer.annotationModule.addAction(this.selectTextMarkupCurrentPage,a,this.currentTextMarkupAnnotation,"Text Markup Property modified",e),this.currentTextMarkupAnnotation=s[a],this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAnnotationModifiedDate(s[a]));return s},e.prototype.undoTextMarkupAction=function(e,t,i,n){var o=this.getAnnotations(t,null);if(o)if("Text Markup Added"===n){this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(o[i],"textMarkup");var s=document.getElementById(o[i].annotName);s&&(1===s.parentElement.childElementCount?this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAccordionContainer(s):s.remove()),o.splice(i,1)}else"Text Markup Deleted"===n&&(this.pdfViewer.annotationModule.stickyNotesAnnotationModule.addAnnotationComments(t,e.shapeAnnotationType),o.splice(i,0,e));this.clearCurrentAnnotation(),this.pdfViewer.isDocumentEdited=!0,this.manageAnnotations(o,t),this.pdfViewer.annotationModule.renderAnnotations(t,null,null,null)},e.prototype.undoRedoPropertyChange=function(e,t,i,n,o){var s=this.getAnnotations(t,null);if(s){if("Color"===n){var a=s[i].color;s[i].color=e.color,e.color=a}else{var r=s[i].opacity;s[i].opacity=e.opacity,e.opacity=r}this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAnnotationModifiedDate(e,null,!0),o&&(e.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime())}return this.clearCurrentAnnotation(),this.pdfViewer.isDocumentEdited=!0,this.manageAnnotations(s,t),this.pdfViewer.annotationModule.renderAnnotations(t,null,null,null),e},e.prototype.redoTextMarkupAction=function(e,t,i,n){var o=this.getAnnotations(t,null);if(o)if("Text Markup Added"===n)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.addAnnotationComments(t,e.shapeAnnotationType),o.push(e);else if("Text Markup Deleted"===n){this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(o[i],"textMarkup");var s=document.getElementById(o[i].annotName);s&&(1===s.parentElement.childElementCount?this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAccordionContainer(s):s.remove()),o.splice(i,1)}this.clearCurrentAnnotation(),this.pdfViewer.isDocumentEdited=!0,this.manageAnnotations(o,t),this.pdfViewer.annotationModule.renderAnnotations(t,null,null,null)},e.prototype.saveNoteContent=function(e,t){var i=this.getAnnotations(e,null);if(i)for(var n=0;n<i.length;n++)JSON.stringify(this.currentTextMarkupAnnotation)===JSON.stringify(i[n])&&(i[n].note=t);this.manageAnnotations(i,e),this.pdfViewer.isDocumentEdited=!0},e.prototype.clearCurrentAnnotation=function(){if(!this.isExtended){this.pdfViewer.isMaintainSelection&&!this.pdfViewer.textSelectionModule.isTextSelection?(this.selectTextMarkupCurrentPage=this.selectTextMarkupCurrentPage,this.currentTextMarkupAnnotation=this.currentTextMarkupAnnotation):(this.selectTextMarkupCurrentPage=null,this.currentTextMarkupAnnotation=null);var e=!1;this.pdfViewer.annotation.freeTextAnnotationModule&&this.pdfViewer.annotation.freeTextAnnotationModule.isInuptBoxInFocus&&(e=!0),e||this.enableAnnotationPropertiesTool(!1)}},e.prototype.clearCurrentAnnotationSelection=function(e,t){this.isAnnotationSelect=!!t;for(var i=e-2>=0?e-2:0,n=e+2<this.pdfViewerBase.pageCount?e+2:this.pdfViewerBase.pageCount-1,o=i;o<=n;o++)this.clearAnnotationSelection(o)},e.prototype.getBoundsForSave=function(e,t){for(var i=[],n=0;n<e.length;n++){var o=this.getAnnotationBounds(e[n],t);i.push(o)}return i},e.prototype.getAnnotationBounds=function(e,t){var i=e.left?e.left:e.Left,n=e.top?e.top:e.Top,o=e.height?e.height:e.Height,s=e.width?e.width:e.Width,a=this.pdfViewerBase.pageSize[t];return i=i||e.x,n=n||e.y,a?1===a.rotation?{left:n,top:a.width-(i+s),width:o,height:s}:2===a.rotation?{left:a.width-i-s,top:a.height-n-o,width:s,height:o}:3===a.rotation?{left:a.height-n-o,top:i,width:o,height:s}:{left:i,top:n,width:s,height:o}:{left:i,top:n,width:s,height:o}},e.prototype.getRgbCode=function(e){e.match(/#([a-z0-9]+)/gi)||e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(e=this.pdfViewer.annotationModule.nameToHash(e));var i=e.split(",");t.isNullOrUndefined(i[1])&&(i=(e=this.pdfViewer.annotationModule.getValue(e,"rgba")).split(","));var n=parseInt(i[0].split("(")[1]),o=parseInt(i[1]),s=parseInt(i[2]);return{a:parseInt(i[3]),r:n,g:o,b:s}},e.prototype.getDrawnBounds=function(){var e=[],t=window.getSelection();if(null!==t.anchorNode){var i=document.createRange(),n=this.pdfViewerBase.textLayer.isBackWardSelection(t);if(t.anchorNode===t.focusNode){var o=this.pdfViewerBase.textLayer.getPageIndex(t.anchorNode);if(!isNaN(o)){N=this.pdfViewerBase.getElement("_pageDiv_"+o).getBoundingClientRect();this.pdfViewerBase.isMixedSizeDocument&&(N=this.pdfViewerBase.getElement("_textLayer_"+o).getBoundingClientRect()),n?(i.setStart(t.focusNode,t.focusOffset),i.setEnd(t.anchorNode,t.anchorOffset)):t.anchorOffset<t.focusOffset?(t.anchorOffset,t.focusOffset,i.setStart(t.anchorNode,t.anchorOffset),i.setEnd(t.focusNode,t.focusOffset)):(t.focusOffset,t.anchorOffset,i.setStart(t.focusNode,t.focusOffset),i.setEnd(t.anchorNode,t.anchorOffset));var s=i.getBoundingClientRect(),a=this.getIndexNumbers(o,i.toString(),i.commonAncestorContainer.textContent.toString()),r={left:this.getDefaultValue(s.left-N.left),top:this.getDefaultValue(s.top-N.top),width:this.getDefaultValue(s.width),height:this.getDefaultValue(s.height),right:this.getDefaultValue(s.right-N.left),bottom:this.getDefaultValue(s.bottom-N.top)},l=[];l.push(r);F={left:r.left,top:r.top,right:r.right,bottom:r.bottom};e.push({pageIndex:o,bounds:l,rect:F,startIndex:a.startIndex,endIndex:a.endIndex,textContent:i.toString()})}}else{var d=void 0,u=void 0,M=void 0,p=void 0;n?(d=t.focusNode,M=t.focusOffset,u=t.anchorNode,p=t.anchorOffset):(d=t.anchorNode,M=t.anchorOffset,u=t.focusNode,p=t.focusOffset);for(var h=this.pdfViewerBase.textLayer.getPageIndex(d),L=this.pdfViewerBase.textLayer.getTextIndex(d,h),w=this.pdfViewerBase.textLayer.getPageIndex(u),c=this.pdfViewerBase.textLayer.getTextIndex(u,w),C=0,g=0,m=0,f=h;f<=w;f++){var y=[],j=void 0,S=void 0,A=void 0,T=void 0,x=this.pdfViewerBase.getElement("_textLayer_"+f).childNodes,N=this.pdfViewerBase.getElement("_pageDiv_"+f).getBoundingClientRect();this.pdfViewerBase.isMixedSizeDocument&&(N=this.pdfViewerBase.getElement("_textLayer_"+f).getBoundingClientRect());for(var D=m=f===h?L:0;D<x.length;D++){var b=x[D];D===m?(j=m,A=f===h?M:0):(S=D,T=f===w?p:b.textContent.length),C=D===L&&f===h?M:0,g=D===c&&f===w?p:b.textContent.length;for(var I=0;I<b.childNodes.length;I++){var v=b.childNodes[I];i.setStart(v,C),i.setEnd(v,g)}var s=i.getBoundingClientRect(),r={left:this.getDefaultValue(s.left-N.left),top:this.getDefaultValue(s.top-N.top),width:this.getDefaultValue(s.width),height:this.getDefaultValue(s.height),right:this.getDefaultValue(s.right-N.left),bottom:this.getDefaultValue(s.bottom-N.top)};if(y.push(r),i.detach(),f===w&&D===c)break}S||(S=j),T||(T=g);var E=this.pdfViewerBase.getElement("_text_"+f+"_"+j).childNodes[0],V=this.pdfViewerBase.getElement("_text_"+f+"_"+S).childNodes[0],z=document.createRange();z.setStart(E,A),z.setEnd(V,T);var k=z.getBoundingClientRect(),O=z.toString(),a=this.getIndexNumbers(f,O),P={left:this.getDefaultValue(k.left-N.left),top:this.getDefaultValue(k.top-N.top),width:this.getDefaultValue(k.width),height:this.getDefaultValue(k.height),right:this.getDefaultValue(k.right-N.left),bottom:this.getDefaultValue(k.bottom-N.top)},F={left:P.left,top:P.top,right:P.right,bottom:P.bottom};e.push({pageIndex:f,bounds:y,rect:F,startIndex:a.startIndex,endIndex:a.endIndex,textContent:O})}}}return t.removeAllRanges(),e},e.prototype.getIndexNumbers=function(e,i,n){var o,s,a=this.pdfViewerBase.getStoredData(e);if(a){for(var r=0,l=a.pageText,d=0;d<e;d++)if(this.pdfViewer.isExtractText){var u=this.pdfViewer.textSearchModule.documentTextCollection[d][d],M=u.pageText?u.pageText:u.PageText;if(this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.documentTextCollection&&this.pdfViewer.textSearchModule.isTextRetrieved)this.pdfViewer.textSearchModule.documentTextCollection[d]&&(r+=M.length);else if(this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.documentTextCollection){if(!(e<=this.pdfViewer.textSearchModule.documentTextCollection.length)){r=0;break}this.pdfViewer.textSearchModule.documentTextCollection[d]&&(r+=M.length)}}s=(o=t.isNullOrUndefined(n)?l.indexOf(i)+r:l.indexOf(n)+n.indexOf(i)+r)+(i.length-1)}return{startIndex:o,endIndex:s}},e.prototype.rerenderAnnotationsPinch=function(e){var t=this.pdfViewerBase.getElement("_annotationCanvas_"+e);if(t){var i=this.pdfViewerBase.getElement("_old_annotationCanvas_"+e);i&&(t?(i.id=t.id,t.parentElement.removeChild(t)):i.id=this.pdfViewer.element.id+"_annotationCanvas_"+e,t=i),t.style.width="",t.style.height="",this.pdfViewer.restrictZoomRequest?(t.style.width=this.pdfViewerBase.pageSize[e].width*this.pdfViewerBase.getZoomFactor()+"px",t.style.height=this.pdfViewerBase.pageSize[e].height*this.pdfViewerBase.getZoomFactor()+"px"):(t.width=this.pdfViewerBase.pageSize[e].width*this.pdfViewerBase.getZoomFactor(),t.height=this.pdfViewerBase.pageSize[e].height*this.pdfViewerBase.getZoomFactor()),this.renderTextMarkupAnnotations(null,e,t,this.pdfViewerBase.getZoomFactor())}},e.prototype.rerenderAnnotations=function(e){for(var t=document.querySelectorAll("#"+this.pdfViewer.element.id+"_old_annotationCanvas_"+e),i=0;i<t.length;i++)t[i]&&t[i].parentElement.removeChild(t[i]);var n=this.pdfViewerBase.getElement("_annotationCanvas_"+e);n&&(n.style.display="block")},e.prototype.onTextMarkupAnnotationMouseUp=function(e){var i=this.pdfViewer.annotationModule.getEventPageNumber(e);if(t.isNullOrUndefined(i)||isNaN(i))this.pdfViewerBase.isClickedOnScrollBar(e,!0)||(this.clearCurrentAnnotation(),this.clearCurrentAnnotationSelection(i));else{var n=this.pdfViewerBase.getElement("_annotationCanvas_"+i);this.currentTextMarkupAnnotation?this.selectedTextMarkup=this.currentTextMarkupAnnotation:this.selectedTextMarkup=null,this.clearCurrentSelectedAnnotation();var o=this.getCurrentMarkupAnnotation(e.clientX,e.clientY,i,n);if(o&&!window.getSelection().toString()){var s=!1,a=!1;if(o.annotationSettings&&o.annotationSettings.isLock&&(s=o.annotationSettings.isLock)&&this.pdfViewer.annotationModule.checkAllowedInteractions("Select",o)&&(s=!1,a=!this.pdfViewer.annotationModule.checkAllowedInteractions("PropertyChange",o)),!s){var r=n.parentElement.getBoundingClientRect(),l=e.clientX-r.left,d=e.clientY-r.top;this.annotationClickPosition={x:l,y:d},this.selectAnnotation(o,n,i,e),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.toolbarModule.annotationToolbarModule.createPropertyTools(this.currentTextMarkupAnnotation.textMarkupAnnotationType),this.currentTextMarkupAnnotation=o,this.selectTextMarkupCurrentPage=i,a||this.enableAnnotationPropertiesTool(!0);var u=document.getElementById(this.pdfViewer.element.id+"_commantPanel");if(u&&"block"===u.style.display){var M=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+(i+1));M&&M.ej2_instances[0].expandItem(!0);var p=document.getElementById(o.annotName);p&&p.firstChild.click()}t.isBlazor()||this.pdfViewer.toolbarModule&&this.pdfViewer.enableAnnotationToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem))}}else this.clearCurrentAnnotation();this.pdfViewer.isMaintainSelection&&!this.pdfViewer.textSelectionModule.isTextSelection?o&&this.clearCurrentAnnotationSelection(i):this.clearCurrentAnnotationSelection(i)}},e.prototype.onTextMarkupAnnotationTouchEnd=function(e){var i=this.pdfViewer.annotationModule.getEventPageNumber(e);if(t.isNullOrUndefined(i)||isNaN(i))if(null!=this.selectTextMarkupCurrentPage&&t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){var n=this.selectTextMarkupCurrentPage;this.selectTextMarkupCurrentPage=null,this.clearAnnotationSelection(n)}else this.clearCurrentAnnotation(),this.clearCurrentAnnotationSelection(i);else{this.currentTextMarkupAnnotation?this.selectedTextMarkup=this.currentTextMarkupAnnotation:this.selectedTextMarkup=null,this.clearCurrentAnnotationSelection(i);var o=this.pdfViewerBase.getElement("_annotationCanvas_"+i);this.clearCurrentSelectedAnnotation();var s=this.getCurrentMarkupAnnotation(e.touches[0].clientX,e.touches[0].clientY,i,o);if(s){var a=!1;if(s.annotationSettings&&s.annotationSettings.isLock&&(a=s.annotationSettings.isLock),!a){var r=o.parentElement.getBoundingClientRect(),l=e.touches[0].clientX-r.left,d=e.touches[0].clientY-r.top;this.annotationClickPosition={x:l,y:d},this.selectAnnotation(s,o,i,e),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.toolbarModule.annotationToolbarModule.createPropertyTools(this.currentTextMarkupAnnotation.textMarkupAnnotationType),this.currentTextMarkupAnnotation=s,this.selectTextMarkupCurrentPage=i,this.enableAnnotationPropertiesTool(!0);var u=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+(i+1));u&&u.ej2_instances[0].expandItem(!0);var M=document.getElementById(s.annotName);M&&(t.Browser.isDevice||M.firstChild.click())}}else this.clearCurrentAnnotation();this.clearCurrentAnnotationSelection(i)}},e.prototype.clearCurrentSelectedAnnotation=function(){if(this.currentTextMarkupAnnotation){this.clearAnnotationSelection(this.selectTextMarkupCurrentPage);var e=this.currentTextMarkupAnnotation;this.pdfViewer.fireAnnotationUnSelect(e.annotName,e.pageNumber,e),this.clearCurrentAnnotation()}},e.prototype.onTextMarkupAnnotationMouseMove=function(e){var t=e.target,i=parseInt(t.id.split("_text_")[1])||parseInt(t.id.split("_textLayer_")[1])||parseInt(t.id.split("_annotationCanvas_")[1]);if(e.target&&(t.id.indexOf("_text")>-1||t.id.indexOf("_annotationCanvas")>-1||t.classList.contains("e-pv-hyperlink"))&&this.pdfViewer.annotation){i=this.pdfViewer.annotation.getEventPageNumber(e);var n=this.pdfViewerBase.getElement("_annotationCanvas_"+i),o=this.getCurrentMarkupAnnotation(e.clientX,e.clientY,i,n);if(o){t.style.cursor="pointer";var s=this.pdfViewerBase.getMousePosition(e),a=this.pdfViewerBase.relativePosition(e),r={left:a.x,top:a.y},l={left:s.x,top:s.y},d={opacity:o.opacity,color:o.color,author:o.author,subject:o.subject,modifiedDate:o.modifiedDate};this.pdfViewerBase.isMousedOver=!0,this.pdfViewer.fireAnnotationMouseover(o.annotName,o.pageNumber,o.textMarkupAnnotationType,o.bounds,d,l,r)}else this.pdfViewer.annotationModule.hidePopupNote(),this.pdfViewerBase.isPanMode&&!this.pdfViewerBase.getAnnotationToolStatus()?t.style.cursor="grab":t.style.cursor="auto",this.pdfViewerBase.isMousedOver&&!this.pdfViewerBase.isFormFieldMousedOver&&(this.pdfViewer.fireAnnotationMouseLeave(i),this.pdfViewerBase.isMousedOver=!1)}},e.prototype.showPopupNote=function(e,t){t.note&&this.pdfViewer.annotationModule.showPopupNote(e,t.color,t.author,t.note,t.textMarkupAnnotationType)},e.prototype.getCurrentMarkupAnnotation=function(e,t,i,n){var o=[];if(n){var s=n.parentElement.getBoundingClientRect();n.clientWidth!==n.parentElement.clientWidth&&(s=n.getBoundingClientRect());var a=e-s.left,r=t-s.top,l=this.getAnnotations(i,null),d=!1;if(l)for(var u=0;u<l.length;u++)for(var M=l[u],p=0;p<M.bounds.length;p++){var h=M.bounds[p],L=h.left?h.left:h.Left,w=h.top?h.top:h.Top,c=h.width?h.width:h.Width,C=h.height?h.height:h.Height;if(a>=this.getMagnifiedValue(L,this.pdfViewerBase.getZoomFactor())&&a<=this.getMagnifiedValue(L+c,this.pdfViewerBase.getZoomFactor())&&r>=this.getMagnifiedValue(w,this.pdfViewerBase.getZoomFactor())&&r<=this.getMagnifiedValue(w+C,this.pdfViewerBase.getZoomFactor()))o.push(M),d=!0;else if(d){d=!1;break}}var g=null;return o.length>1?g=this.compareCurrentAnnotations(o):1===o.length&&(g=o[0]),g}return null},e.prototype.compareCurrentAnnotations=function(e){for(var t,i=null,n=0;n<e.length&&n!==e.length-1;n++){var o=e[n].bounds,s=o[0].left?o[0].left:o[0].Left,a=o[0].top?o[0].top:o[0].Top,r=e[n+1].bounds,l=r[0].left?r[0].left:r[0].Left,d=r[0].top?r[0].top:r[0].Top;s<l||a<d?(t=l,i=e[n+1]):(t=s,i=e[n]),t&&n===e.length-2&&t===s&&t===l&&(t=l,i=e[n+1])}return i},e.prototype.clearAnnotationSelection=function(e){var t=this.pdfViewerBase.getElement("_annotationCanvas_"+e);t&&(t.getContext("2d").setLineDash([]),this.pdfViewer.annotationModule.renderAnnotations(e,null,null,null))},e.prototype.selectAnnotation=function(e,t,i,n,o){this.pdfViewer.selectedItems.annotations[0]&&(this.pdfViewer.clearSelection(this.pdfViewer.selectedItems.annotations[0].pageIndex),this.pdfViewer.clearSelection(this.selectTextMarkupCurrentPage));var s=!1;if(e.annotationSettings&&e.annotationSettings.isLock&&(s=e.annotationSettings.isLock)&&this.pdfViewer.annotationModule.checkAllowedInteractions("Select",e)&&(s=!1),!s){var a=!1;this.currentTextMarkupAnnotation||(a=!0),this.selectedTextMarkup&&e&&!o&&(a=this.selectedTextMarkup.annotName!==e.annotName),isNaN(i)||(this.selectTextMarkupCurrentPage=i,this.currentTextMarkupAnnotation=e,e=this.retreiveTextIndex(e),this.currentTextMarkupAnnotation=e),this.isSelectedAnnotation&&(this.pdfViewerBase.isSelection=!0,this.updateAnnotationBounds());var r=n;if(this.isEnableTextMarkupResizer(e.textMarkupAnnotationType)&&e&&r&&!r.touches&&this.updateCurrentResizerPosition(e),this.drawAnnotationSelector(e,this.currentTextMarkupAnnotation,t),e.isMultiSelect&&e.annotNameCollection&&this.selectMultiPageAnnotations(e),""!==e.annotName&&!this.isNewAnnotation&&a){var l=!1;r||(l=!0),this.pdfViewer.annotationModule.annotationSelect(e.annotName,this.selectTextMarkupCurrentPage,e,null,!1,l),this.selectedTextMarkup=null}e&&this.isEnableTextMarkupResizer(e.textMarkupAnnotationType)&&(this.isTextMarkupAnnotationMode=!0)}},e.prototype.updateCurrentResizerPosition=function(e){if(e||(e=this.currentTextMarkupAnnotation),e&&this.isEnableTextMarkupResizer(e.textMarkupAnnotationType)&&e){var t=this.pdfViewerBase.getElement("_textLayer_"+this.selectTextMarkupCurrentPage);if(t){var i=t.getBoundingClientRect(),n=e.bounds[0].left?e.bounds[0].left:e.bounds[0].Left,o=e.bounds[0].top?e.bounds[0].top:e.bounds[0].Top;this.updateLeftposition(n*this.pdfViewerBase.getZoomFactor()+i.left,i.top+o,!0);var s=e.bounds[e.bounds.length-1],a=s.left?s.left:s.Left,r=s.top?s.top:s.Top,l=s.width?s.width:s.Width;this.updatePosition((a+l)*this.pdfViewerBase.getZoomFactor()+i.left,r+i.top,!0)}}},e.prototype.drawAnnotationSelectRect=function(e,t,i,n,o,s){if(e){var a=e.getContext("2d");if(a.setTransform(1,0,0,1,0,0),a.beginPath(),"string"==typeof s.annotationSelectorSettings){(r=0===JSON.parse(s.annotationSelectorSettings).selectorLineDashArray.length?[4]:JSON.parse(s.annotationSelectorSettings).selectorLineDashArray).length>2&&(r=[r[0],r[1]]),a.setLineDash(r),a.globalAlpha=1,a.rect(t,i,n,o),a.closePath();l=""===JSON.parse(s.annotationSelectorSettings).selectionBorderColor?"#0000ff":JSON.parse(s.annotationSelectorSettings).selectionBorderColor;a.strokeStyle=l,a.lineWidth=1===JSON.parse(s.annotationSelectorSettings).selectionBorderThickness?1:s.annotationSelectorSettings.selectionBorderThickness,a.stroke(),a.save()}else{var r=0===s.annotationSelectorSettings.selectorLineDashArray.length?[4]:s.annotationSelectorSettings.selectorLineDashArray;r.length>2&&(r=[r[0],r[1]]),a.setLineDash(r),a.globalAlpha=1,a.rect(t,i,n,o),a.closePath();var l=""===s.annotationSelectorSettings.selectionBorderColor?"#0000ff":s.annotationSelectorSettings.selectionBorderColor;a.strokeStyle=l,a.lineWidth=s.annotationSelectorSettings.selectionBorderThickness?1:s.annotationSelectorSettings.selectionBorderThickness,a.stroke(),a.save()}}},e.prototype.enableAnnotationPropertiesTool=function(e){if(this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-color-container")),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&(t.Browser.isDevice||this.pdfViewer.toolbarModule.annotationToolbarModule.createMobileAnnotationToolbar(e)),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.isMobileAnnotEnabled&&0===this.pdfViewer.selectedItems.annotations.length&&this.pdfViewer.toolbarModule.annotationToolbarModule){this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(e);var i=e;this.isTextMarkupAnnotationMode&&(i=!0),this.pdfViewer.toolbarModule.annotationToolbarModule.enableTextMarkupAnnotationPropertiesTools(i),this.currentTextMarkupAnnotation?t.isBlazor()?this.pdfViewer.toolbarModule.annotationToolbarModule.updateColorInIcon(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElementInBlazor,this.currentTextMarkupAnnotation.color):this.pdfViewer.toolbarModule.annotationToolbarModule.updateColorInIcon(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElement,this.currentTextMarkupAnnotation.color):this.isTextMarkupAnnotationMode?this.pdfViewer.toolbarModule.annotationToolbarModule.setCurrentColorInPicker():t.isBlazor()?this.pdfViewer.toolbarModule.annotationToolbarModule.updateColorInIcon(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElementInBlazor,"#000000"):this.pdfViewer.toolbarModule.annotationToolbarModule.updateColorInIcon(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElement,"#000000")}},e.prototype.maintainAnnotationSelection=function(){if(this.currentTextMarkupAnnotation){var e=this.pdfViewerBase.getElement("_annotationCanvas_"+this.selectTextMarkupCurrentPage);e&&this.selectAnnotation(this.currentTextMarkupAnnotation,e,this.selectTextMarkupCurrentPage)}},e.prototype.manageAnnotations=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_textMarkup");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_textMarkup"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_textMarkup");var o=this.pdfViewer.annotationModule.getPageCollection(n,t);n[o]&&(n[o].annotations=e);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_textMarkup"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_textMarkup",s)}},e.prototype.getAnnotations=function(e,t,i){var n;null!=i&&void 0!=i||(i="_annotations_textMarkup");var o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+i);if(this.pdfViewerBase.isStorageExceed&&(o=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+i]),o){var s=JSON.parse(o),a=this.pdfViewer.annotationModule.getPageCollection(s,e);n=s[a]?s[a].annotations:t}else n=t;return n},e.prototype.getAddedAnnotation=function(e,t,i,n,o,s,a,r,l,d,u,M,p,h,L,w){var c=a||this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),C=this.pdfViewer.annotation.createGUID(),g=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("textMarkup",u+1,e);g&&(document.getElementById(g).id=C);var m=this.getAnnotationSettings(e),f=this.getIsPrintValue(e),y={textMarkupAnnotationType:e,color:t,opacity:i,bounds:n,author:o,allowedInteractions:w,subject:s,modifiedDate:c,note:r,rect:d,annotName:C,comments:[],review:{state:"",stateModel:"",author:o,modifiedDate:c},shapeAnnotationType:"textMarkup",pageNumber:u,textMarkupContent:M,textMarkupStartIndex:p,textMarkupEndIndex:h,isMultiSelect:L,annotationSelectorSettings:this.getSelector(e),customData:this.pdfViewer.annotation.getTextMarkupData(s),annotationAddMode:this.annotationAddMode,annotationSettings:m,isPrint:f,isCommentLock:l};L&&this.multiPageCollection.push(y);var j=!1;L&&this.isExtended&&(j=!0),document.getElementById(C)&&!j&&document.getElementById(C).addEventListener("mouseup",this.annotationDivSelect(y,u));var S=this.pdfViewer.annotationModule.storeAnnotations(u,y,"_annotations_textMarkup");return this.pdfViewer.annotationModule.addAction(u,S,y,"Text Markup Added",null),y},e.prototype.getSelector=function(e){var t=this.pdfViewer.annotationSelectorSettings;return"Highlight"===e&&this.pdfViewer.highlightSettings.annotationSelectorSettings?t=this.pdfViewer.highlightSettings.annotationSelectorSettings:"Underline"===e&&this.pdfViewer.underlineSettings.annotationSelectorSettings?t=this.pdfViewer.underlineSettings.annotationSelectorSettings:"Strikethrough"===e&&this.pdfViewer.strikethroughSettings.annotationSelectorSettings&&(t=this.pdfViewer.strikethroughSettings.annotationSelectorSettings),t},e.prototype.getAnnotationSettings=function(e){var t={isLock:!1};return"Highlight"===e&&this.pdfViewer.highlightSettings.isLock?t={isLock:!0}:"Underline"===e&&this.pdfViewer.underlineSettings.isLock?t={isLock:!0}:"Strikethrough"===e&&this.pdfViewer.strikethroughSettings.isLock?t={isLock:!0}:this.pdfViewer.annotationSettings.isLock&&(t={isLock:!0}),t},e.prototype.getIsPrintValue=function(e){var t=!0;return"Highlight"===e&&(t=this.pdfViewer.highlightSettings.isPrint),"Underline"===e&&(t=this.pdfViewer.underlineSettings.isPrint),"Strikethrough"===e&&(t=this.pdfViewer.strikethroughSettings.isPrint),t},e.prototype.annotationDivSelect=function(e,i){var n=this.pdfViewerBase.getElement("_annotationCanvas_"+i);if(this.selectAnnotation(e,n,i),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.enableAnnotationToolbar){this.pdfViewer.toolbarModule.annotationToolbarModule.clearShapeMode(),this.pdfViewer.toolbarModule.annotationToolbarModule.clearMeasureMode();var o=!1;e.annotationSettings&&e.annotationSettings.isLock&&(o=e.annotationSettings.isLock),o?(this.pdfViewer.annotationModule.checkAllowedInteractions("PropertyChange",e)&&(this.pdfViewer.toolbarModule.annotationToolbarModule.enableTextMarkupAnnotationPropertiesTools(!0),this.pdfViewer.toolbarModule.annotationToolbarModule.setCurrentColorInPicker()),this.pdfViewer.annotationModule.checkAllowedInteractions("Delete",e)&&this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(!0)):(this.pdfViewer.toolbarModule.annotationToolbarModule.enableTextMarkupAnnotationPropertiesTools(!0),this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(!0),this.pdfViewer.toolbarModule.annotationToolbarModule.setCurrentColorInPicker()),this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,t.isBlazor()||this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem)}},e.prototype.getPageContext=function(e){var t=this.pdfViewerBase.getElement("_annotationCanvas_"+e),i=null;return t&&(i=t.getContext("2d")),i},e.prototype.getDefaultValue=function(e){return e/this.pdfViewerBase.getZoomFactor()},e.prototype.getMagnifiedValue=function(e,t){return e*t},e.prototype.saveImportedTextMarkupAnnotations=function(e,t){var i=null;e.Author=this.pdfViewer.annotationModule.updateAnnotationAuthor("textMarkup",e.Subject),e.AnnotationSettings&&e.AnnotationSettings.isLock?e.AnnotationSettings={isLock:e.AnnotationSettings.isLock}:e.AnnotationSettings=this.getAnnotationSettings(e.TextMarkupAnnotationType),e.allowedInteractions=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e),i={textMarkupAnnotationType:e.TextMarkupAnnotationType,color:e.Color,opacity:e.Opacity,allowedInteractions:e.allowedInteractions,bounds:e.Bounds,author:e.Author,subject:e.Subject,modifiedDate:e.ModifiedDate,note:e.Note,rect:e.Rect,annotName:e.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,modifiedDate:e.ModifiedDate,author:e.Author},shapeAnnotationType:"textMarkup",pageNumber:t,textMarkupContent:"",textMarkupStartIndex:0,textMarkupEndIndex:0,annotationSelectorSettings:this.getSettings(e),customData:this.pdfViewer.annotation.getCustomData(e),isMultiSelect:e.IsMultiSelect,annotNameCollection:e.AnnotNameCollection,annotpageNumbers:e.AnnotpageNumbers,annotationAddMode:this.annotationAddMode,annotationSettings:e.AnnotationSettings,isPrint:e.isPrint,isCommentLock:e.IsCommentLock},this.pdfViewer.annotationModule.storeAnnotations(t,i,"_annotations_textMarkup")},e.prototype.updateTextMarkupAnnotationCollections=function(e,t){return e.allowedInteractions=e.AllowedInteractions?e.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e),{textMarkupAnnotationType:e.TextMarkupAnnotationType,allowedInteractions:e.allowedInteractions,color:e.Color,opacity:e.Opacity,bounds:e.Bounds,author:e.Author,subject:e.Subject,modifiedDate:e.ModifiedDate,note:e.Note,rect:e.Rect,annotationId:e.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,modifiedDate:e.ModifiedDate,author:e.Author},shapeAnnotationType:"textMarkup",pageNumber:t,isMultiSelect:e.IsMultiSelect,annotNameCollection:e.AnnotNameCollection,annotpageNumbers:e.AnnotpageNumbers,customData:this.pdfViewer.annotation.getCustomData(e),isPrint:e.isPrint,isCommentLock:e.IsCommentLock}},e.prototype.updateTextMarkupSettings=function(e){"highlightSettings"===e&&(this.highlightColor=this.pdfViewer.highlightSettings.color?this.pdfViewer.highlightSettings.color:this.highlightColor,this.highlightOpacity=this.pdfViewer.highlightSettings.opacity?this.pdfViewer.highlightSettings.opacity:this.highlightOpacity),"underlineSettings"===e&&(this.underlineColor=this.pdfViewer.underlineSettings.color?this.pdfViewer.underlineSettings.color:this.underlineColor,this.underlineOpacity=this.pdfViewer.underlineSettings.opacity?this.pdfViewer.underlineSettings.opacity:this.underlineOpacity),"strikethroughSettings"===e&&(this.strikethroughColor=this.pdfViewer.strikethroughSettings.color?this.pdfViewer.strikethroughSettings.color:this.strikethroughColor,this.strikethroughOpacity=this.pdfViewer.strikethroughSettings.opacity?this.pdfViewer.strikethroughSettings.opacity:this.strikethroughOpacity)},e.prototype.clear=function(){this.selectTextMarkupCurrentPage=null,this.currentTextMarkupAnnotation=null,this.annotationClickPosition=null,window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_textMarkup")},e.prototype.getOffsetPoints=function(e){for(var t=[],i=0;i<e.length;i++)t[i]={X:e[i].x,Y:e[i].y,Width:e[i].width,Height:e[i].height,Left:e[i].x,Top:e[i].y};return t},e.prototype.updateAddAnnotationDetails=function(e,t){t||(t={pageNumber:0});var i=null,n=null,o="",s=null,a="",r=[],l=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),d=this.pdfViewer.annotation.createGUID();"Highlight"==e?(i=this.pdfViewer.highlightSettings.annotationSelectorSettings?this.pdfViewer.highlightSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.highlightSettings),n=this.pdfViewer.highlightSettings.allowedInteractions?this.pdfViewer.highlightSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,o="Highlight",a=t.color?t.color:"#ffff00"):"Underline"==e?(i=this.pdfViewer.underlineSettings.annotationSelectorSettings?this.pdfViewer.underlineSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.underlineSettings),n=this.pdfViewer.underlineSettings.allowedInteractions?this.pdfViewer.underlineSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,o="Underline",a=t.color?t.color:"#00ff00"):"Strikethrough"==e&&(i=this.pdfViewer.strikethroughSettings.annotationSelectorSettings?this.pdfViewer.strikethroughSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.strikethroughSettings),n=this.pdfViewer.strikethroughSettings.allowedInteractions?this.pdfViewer.strikethroughSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,o="Strikethrough",a=t.color?t.color:"#ff0000"),s.isLock=!!t.isLock&&t.isLock,r=t.bounds?this.getOffsetPoints(t.bounds):[{X:1,Y:1,Width:100,Height:14,Left:1,Top:1,Location:{X:1,Y:1},Size:{Height:14,IsEmpty:!1,Width:100}}];var u=[],M={AllowedInteractions:t.allowedInteractions?t.allowedInteractions:n,AnnotName:d,AnnotNameCollection:null,AnnotType:"textMarkup",AnnotationSelectorSettings:t.annotationSelectorSettings?t.annotationSelectorSettings:i,AnnotationSettings:s,Author:t.author?t.author:"Guest",Bounds:r,Color:t.color?t.color:a,Comments:null,CreatedDate:l,CustomData:t.customData?t.customData:null,ExistingCustomData:null,EnableMultiPageAnnotation:!!t.enableMultiPageAnnotation&&t.enableMultiPageAnnotation,EnableTextMarkupResizer:!!t.enableTextMarkupResizer&&t.enableTextMarkupResizer,IsCommentLock:!1,IsMultiSelect:!1,IsLock:!!t.isLock&&t.isLock,IsPrint:!t.isPrint||t.isPrint,ModifiedDate:l,Note:"",Opacity:t.opacity?t.opacity:1,Rect:{},State:"",StateModel:"",Subject:o,TextMarkupAnnotationType:o};return u[0]=M,{textMarkupAnnotation:u}},e}(),jt=function(){function e(e,t){this.measureShapeCount=0,this.isAddAnnotationProgramatically=!1,this.pdfViewer=e,this.pdfViewerBase=t}return Object.defineProperty(e.prototype,"pixelToPointFactor",{get:function(){return.75},enumerable:!0,configurable:!0}),e.prototype.renderMeasureShapeAnnotations=function(e,t,i){if(e)if(e.length>=1){if(!this.pdfViewer.annotation.getStoredAnnotations(t,e,"_annotations_shape_measure")||i)for(var n=0;n<e.length;n++){var o=e[n],s=null;if(this.measureShapeCount=this.measureShapeCount+1,o.annotationAddMode=this.pdfViewer.annotationModule.findAnnotationMode(o,t,o.AnnotType),o.ShapeAnnotationType){var a=null;if(o.VertexPoints){a=[];for(var r=0;r<o.VertexPoints.length;r++){var l={x:o.VertexPoints[r].X?o.VertexPoints[r].X:o.VertexPoints[r].x,y:o.VertexPoints[r].Y?o.VertexPoints[r].Y:o.VertexPoints[r].y};a.push(l)}}o.Bounds&&!0===o.EnableShapeLabel&&(o.LabelBounds=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBoundsFromLoadedDocument(o.Bounds),o.LabelBorderColor=o.LabelBorderColor?o.LabelBorderColor:o.StrokeColor,o.FontColor=o.FontColor?o.FontColor:o.StrokeColor,o.LabelFillColor=o.LabelFillColor?o.LabelFillColor:o.FillColor,o.FontSize=o.FontSize?o.FontSize:16,o.LabelSettings=o.LabelSettings?o.LabelSettings:this.pdfViewer.shapeLabelSettings),o.AnnotationSettings=o.AnnotationSettings?o.AnnotationSettings:this.pdfViewer.annotationModule.updateAnnotationSettings(o),o.allowedInteractions=o.AllowedInteractions?o.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(o);var d=o.AnnotationSettings.isPrint,u={ratio:o.Calibrate.Ratio,x:this.getNumberFormatArray(o.Calibrate.X),distance:this.getNumberFormatArray(o.Calibrate.Distance),area:this.getNumberFormatArray(o.Calibrate.Area),angle:this.getNumberFormatArray(o.Calibrate.Angle),volume:this.getNumberFormatArray(o.Calibrate.Volume),targetUnitConversion:o.Calibrate.TargetUnitConversion};o.Calibrate.Depth&&(u.depth=o.Calibrate.Depth);var M=o.Bounds.X?o.Bounds.X:o.Bounds.x,p=o.Bounds.Y?o.Bounds.Y:o.Bounds.y,h=o.Bounds.Width?o.Bounds.Width:o.Bounds.width,L=o.Bounds.Height?o.Bounds.Height:o.Bounds.height,w=void 0,c=(s={id:"measure"+this.measureShapeCount,shapeAnnotationType:o.ShapeAnnotationType,author:o.Author,allowedInteractions:o.allowedInteractions,modifiedDate:o.ModifiedDate,subject:o.Subject,note:o.Note,strokeColor:o.StrokeColor,fillColor:o.FillColor,opacity:o.Opacity,thickness:o.Thickness,rectangleDifference:o.RectangleDifference,borderStyle:o.BorderStyle,borderDashArray:o.BorderDashArray,rotateAngle:o.RotateAngle,isCloudShape:o.IsCloudShape,cloudIntensity:o.CloudIntensity,vertexPoints:a,lineHeadStart:o.LineHeadStart,lineHeadEnd:o.LineHeadEnd,isLocked:o.IsLocked,bounds:{left:M,top:p,width:h,height:L,right:o.Bounds.Right,bottom:o.Bounds.Bottom},caption:o.Caption,captionPosition:o.CaptionPosition,calibrate:u,leaderLength:o.LeaderLength,leaderLineExtension:o.LeaderLineExtension,leaderLineOffset:o.LeaderLineOffset,indent:o.Indent,annotName:o.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(o.Comments,o,o.Author),review:{state:o.State,stateModel:o.StateModel,modifiedDate:o.ModifiedDate,author:o.Author},labelContent:o.LabelContent,enableShapeLabel:o.EnableShapeLabel,labelFillColor:o.LabelFillColor,fontColor:o.FontColor,labelBorderColor:o.LabelBorderColor,fontSize:o.FontSize,labelBounds:o.LabelBounds,annotationSelectorSettings:this.getSettings(o),labelSettings:o.LabelSettings,annotationSettings:o.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(o),isPrint:d,isCommentLock:o.IsCommentLock}).vertexPoints;if(null==a&&(c=[]),o.AnnotationSelectorSettings=o.AnnotationSelectorSettings?o.AnnotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,o.allowedInteractions=o.AllowedInteractions?o.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(o),w={id:"measure"+this.measureShapeCount,shapeAnnotationType:this.getShapeType(s),author:s.author,allowedInteractions:o.allowedInteractions,modifiedDate:s.modifiedDate,subject:s.subject,notes:s.note,fillColor:s.fillColor,strokeColor:s.strokeColor,opacity:s.opacity,thickness:s.thickness,borderStyle:s.borderStyle,borderDashArray:s.borderDashArray.toString(),rotateAngle:parseFloat(s.rotateAngle.split("Angle")[1]),isCloudShape:s.isCloudShape,cloudIntensity:s.cloudIntensity,taregetDecoraterShapes:this.pdfViewer.annotation.getArrowType(s.lineHeadEnd),sourceDecoraterShapes:this.pdfViewer.annotation.getArrowType(s.lineHeadStart),vertexPoints:c,bounds:{x:s.bounds.left,y:s.bounds.top,width:s.bounds.width,height:s.bounds.height},leaderHeight:s.leaderLength,pageIndex:t,annotName:s.annotName,comments:s.comments,review:s.review,measureType:this.getMeasureType(s),labelContent:o.LabelContent,enableShapeLabel:o.EnableShapeLabel,labelFillColor:o.LabelFillColor,fontColor:o.FontColor,labelBorderColor:o.LabelBorderColor,fontSize:o.FontSize,labelBounds:o.LabelBounds,annotationSelectorSettings:o.AnnotationSelectorSettings,annotationSettings:s.annotationSettings,annotationAddMode:o.annotationAddMode,isPrint:d,isCommentLock:s.isCommentLock},this.pdfViewer.annotation.storeAnnotations(t,s,"_annotations_shape_measure"),this.isAddAnnotationProgramatically){var C={opacity:w.opacity,strokeColor:w.strokeColor,thickness:w.thickness,modifiedDate:w.modifiedDate,width:w.bounds.width,height:w.bounds.height};this.pdfViewer.fireAnnotationAdd(w.pageIndex,w.annotName,o.ShapeAnnotationType,w.bounds,C)}this.pdfViewer.add(w)}}}else if(e.shapeAnnotationType){s=this.createAnnotationObject(e);this.pdfViewer.annotationModule.storeAnnotations(t,s,"_annotations_shape_measure"),this.pdfViewer.annotationModule.triggerAnnotationAdd(e)}},e.prototype.getSettings=function(e){this.pdfViewer.annotationSelectorSettings;return e.AnnotationSelectorSettings?e.AnnotationSelectorSettings:this.getSelector(e.Subject)},e.prototype.setAnnotationType=function(e){var t="Guest";switch(this.updateMeasureproperties(),this.pdfViewerBase.disableTextSelectionMode(),e){case"Distance":this.currentAnnotationMode="Distance";this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.distanceSettings.author?this.pdfViewer.distanceSettings.author:"Guest",this.pdfViewer.drawingObject={sourceDecoraterShapes:this.pdfViewer.annotation.getArrowType(this.distanceStartHead),taregetDecoraterShapes:this.pdfViewer.annotation.getArrowType(this.distanceEndHead),measureType:"Distance",fillColor:this.distanceFillColor,notes:"",strokeColor:this.distanceStrokeColor,leaderHeight:this.leaderLength,opacity:this.distanceOpacity,thickness:this.distanceThickness,borderDashArray:this.distanceDashArray.toString(),shapeAnnotationType:"Distance",author:t,subject:"Distance calculation",isCommentLock:!1},this.pdfViewer.tool="Distance";break;case"Perimeter":this.currentAnnotationMode="Perimeter";this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.perimeterSettings.author?this.pdfViewer.perimeterSettings.author:"Guest",this.pdfViewer.drawingObject={shapeAnnotationType:"LineWidthArrowHead",fillColor:this.perimeterFillColor,notes:"",strokeColor:this.perimeterStrokeColor,opacity:this.perimeterOpacity,thickness:this.perimeterThickness,sourceDecoraterShapes:this.pdfViewer.annotation.getArrowType(this.perimeterStartHead),taregetDecoraterShapes:this.pdfViewer.annotation.getArrowType(this.perimeterEndHead),measureType:"Perimeter",borderDashArray:this.perimeterDashArray.toString(),author:t,subject:"Perimeter calculation",isCommentLock:!1},this.pdfViewer.tool="Perimeter";break;case"Area":this.currentAnnotationMode="Area";var i=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.areaSettings.author?this.pdfViewer.areaSettings.author:"Guest",this.pdfViewer.drawingObject={shapeAnnotationType:"Polygon",fillColor:this.areaFillColor,notes:"",strokeColor:this.areaStrokeColor,thickness:this.areaThickness,opacity:this.areaOpacity,measureType:"Area",modifiedDate:i,borderStyle:"",borderDashArray:"0",author:t,subject:"Area calculation",isCommentLock:!1},this.pdfViewer.tool="Polygon";break;case"Radius":this.currentAnnotationMode="Radius";var n=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.radiusSettings.author?this.pdfViewer.radiusSettings.author:"Guest",this.pdfViewer.drawingObject={shapeAnnotationType:"Radius",fillColor:this.radiusFillColor,notes:"",strokeColor:this.radiusStrokeColor,opacity:this.radiusOpacity,thickness:this.radiusThickness,measureType:"Radius",modifiedDate:n,borderStyle:"",borderDashArray:"0",author:t,subject:"Radius calculation",isCommentLock:!1},this.pdfViewer.tool="DrawTool";break;case"Volume":this.currentAnnotationMode="Volume";var o=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.volumeSettings.author?this.pdfViewer.volumeSettings.author:"Guest",this.pdfViewer.drawingObject={shapeAnnotationType:"Polygon",notes:"",fillColor:this.volumeFillColor,strokeColor:this.volumeStrokeColor,opacity:this.volumeOpacity,thickness:this.volumeThickness,measureType:"Volume",modifiedDate:o,borderStyle:"",borderDashArray:"0",author:t,subject:"Volume calculation",isCommentLock:!1},this.pdfViewer.tool="Polygon"}},e.prototype.updateMeasureproperties=function(){this.distanceFillColor=this.pdfViewer.distanceSettings.fillColor?this.pdfViewer.distanceSettings.fillColor:"#ff0000",this.distanceStrokeColor=this.pdfViewer.distanceSettings.strokeColor?this.pdfViewer.distanceSettings.strokeColor:"#ff0000",this.distanceOpacity=this.pdfViewer.distanceSettings.opacity?this.pdfViewer.distanceSettings.opacity:1,this.distanceThickness=this.pdfViewer.distanceSettings.thickness?this.pdfViewer.distanceSettings.thickness:1,this.distanceDashArray=this.pdfViewer.distanceSettings.borderDashArray?this.pdfViewer.distanceSettings.borderDashArray:0,this.leaderLength=null!=this.pdfViewer.distanceSettings.leaderLength?this.pdfViewer.distanceSettings.leaderLength:40,this.distanceStartHead=this.pdfViewer.distanceSettings.lineHeadStartStyle?this.pdfViewer.distanceSettings.lineHeadStartStyle:"Closed",this.distanceEndHead=this.pdfViewer.distanceSettings.lineHeadEndStyle?this.pdfViewer.distanceSettings.lineHeadEndStyle:"Closed",this.perimeterFillColor=this.pdfViewer.perimeterSettings.fillColor?this.pdfViewer.perimeterSettings.fillColor:"#ffffff00",this.perimeterStrokeColor=this.pdfViewer.perimeterSettings.strokeColor?this.pdfViewer.perimeterSettings.strokeColor:"#ff0000",this.perimeterOpacity=this.pdfViewer.perimeterSettings.opacity?this.pdfViewer.perimeterSettings.opacity:1,this.perimeterThickness=this.pdfViewer.perimeterSettings.thickness?this.pdfViewer.perimeterSettings.thickness:1,this.perimeterDashArray=this.pdfViewer.perimeterSettings.borderDashArray?this.pdfViewer.perimeterSettings.borderDashArray:0,this.perimeterStartHead=this.pdfViewer.perimeterSettings.lineHeadStartStyle?this.pdfViewer.perimeterSettings.lineHeadStartStyle:"Open",this.perimeterEndHead=this.pdfViewer.perimeterSettings.lineHeadEndStyle?this.pdfViewer.perimeterSettings.lineHeadEndStyle:"Open",this.areaFillColor=this.pdfViewer.areaSettings.fillColor?this.pdfViewer.areaSettings.fillColor:"#ffffff00",this.areaStrokeColor=this.pdfViewer.areaSettings.strokeColor?this.pdfViewer.areaSettings.strokeColor:"#ff0000",this.areaOpacity=this.pdfViewer.areaSettings.opacity?this.pdfViewer.areaSettings.opacity:1,this.areaThickness=this.pdfViewer.areaSettings.thickness?this.pdfViewer.areaSettings.thickness:1,this.radiusFillColor=this.pdfViewer.radiusSettings.fillColor?this.pdfViewer.radiusSettings.fillColor:"#ffffff00",this.radiusStrokeColor=this.pdfViewer.radiusSettings.strokeColor?this.pdfViewer.radiusSettings.strokeColor:"#ff0000",this.radiusOpacity=this.pdfViewer.radiusSettings.opacity?this.pdfViewer.radiusSettings.opacity:1,this.radiusThickness=this.pdfViewer.radiusSettings.thickness?this.pdfViewer.radiusSettings.thickness:1,this.volumeFillColor=this.pdfViewer.volumeSettings.fillColor?this.pdfViewer.volumeSettings.fillColor:"#ffffff00",this.volumeStrokeColor=this.pdfViewer.volumeSettings.strokeColor?this.pdfViewer.volumeSettings.strokeColor:"#ff0000",this.volumeOpacity=this.pdfViewer.volumeSettings.opacity?this.pdfViewer.volumeSettings.opacity:1,this.volumeThickness=this.pdfViewer.volumeSettings.thickness?this.pdfViewer.volumeSettings.thickness:1,this.unit=this.pdfViewer.measurementSettings.conversionUnit.toLowerCase(),this.displayUnit=this.pdfViewer.measurementSettings.displayUnit.toLowerCase(),this.ratio=this.pdfViewer.measurementSettings.scaleRatio,this.volumeDepth=this.pdfViewer.measurementSettings.depth,this.scaleRatioString="1 "+this.unit+" = "+this.ratio.toString()+" "+this.displayUnit},e.prototype.createAnnotationObject=function(e){var t,i,n=this.pdfViewer.annotation.createGUID(),o=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("shape_measure",e.pageIndex+1,e.measureType);o&&(document.getElementById(o).id=n),e.annotName=n,e.author=this.pdfViewer.annotationModule.updateAnnotationAuthor("measure",e.subject),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(n,e.notes),e.wrapper.bounds?(t={left:e.wrapper.bounds.x,top:e.wrapper.bounds.y,height:e.wrapper.bounds.height,width:e.wrapper.bounds.width,right:e.wrapper.bounds.right,bottom:e.wrapper.bounds.bottom},i=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBounds(e.wrapper.bounds)):(t={left:0,top:0,height:0,width:0,right:0,bottom:0},i={left:0,top:0,height:0,width:0,right:0,bottom:0});var s=parseInt(e.borderDashArray);s=isNaN(s)?0:s;var a={ratio:this.scaleRatioString,x:[this.createNumberFormat("x")],distance:[this.createNumberFormat("d")],area:[this.createNumberFormat("a")]};"Volume"===e.measureType&&(a.depth=this.volumeDepth);var r=this.pdfViewer.annotationModule.findAnnotationSettings(e,!0),l=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e);return e.isPrint=r.isPrint,{id:e.id,shapeAnnotationType:this.getShapeAnnotType(e.measureType),author:e.author,allowedInteractions:l,subject:e.subject,note:e.notes,strokeColor:e.strokeColor,fillColor:e.fillColor,opacity:e.opacity,thickness:e.thickness,borderStyle:e.borderStyle,borderDashArray:s,bounds:t,modifiedDate:this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),rotateAngle:"RotateAngle"+e.rotateAngle,isCloudShape:e.isCloudShape,cloudIntensity:e.cloudIntensity,vertexPoints:e.vertexPoints,lineHeadStart:this.pdfViewer.annotation.getArrowTypeForCollection(e.sourceDecoraterShapes),lineHeadEnd:this.pdfViewer.annotation.getArrowTypeForCollection(e.taregetDecoraterShapes),rectangleDifference:[],isLocked:r.isLock,leaderLength:e.leaderHeight,leaderLineExtension:2,leaderLineOffset:0,calibrate:a,caption:!0,captionPosition:"Top",indent:this.getIndent(e.measureType),annotName:n,comments:[],review:{state:"",stateModel:"",modifiedDate:this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),author:e.author},labelContent:e.labelContent,enableShapeLabel:e.enableShapeLabel,labelFillColor:e.labelFillColor,labelBorderColor:e.labelBorderColor,fontColor:e.fontColor,fontSize:e.fontSize,labelBounds:i,annotationSelectorSettings:this.getSelector(e.subject),labelSettings:this.pdfViewer.shapeLabelSettings,annotationSettings:r,customData:this.pdfViewer.annotation.getMeasureData(e.subject),isPrint:e.isPrint,isCommentLock:e.isCommentLock}},e.prototype.getSelector=function(e){var t=this.pdfViewer.annotationSelectorSettings;return"Distance calculation"===e&&this.pdfViewer.distanceSettings.annotationSelectorSettings?t=this.pdfViewer.distanceSettings.annotationSelectorSettings:"Perimeter calculation"===e&&this.pdfViewer.perimeterSettings.annotationSelectorSettings?t=this.pdfViewer.perimeterSettings.annotationSelectorSettings:"Area calculation"===e&&this.pdfViewer.areaSettings.annotationSelectorSettings?t=this.pdfViewer.areaSettings.annotationSelectorSettings:"Radius calculation"===e&&this.pdfViewer.radiusSettings.annotationSelectorSettings?t=this.pdfViewer.radiusSettings.annotationSelectorSettings:"Volume calculation"===e&&this.pdfViewer.volumeSettings.annotationSelectorSettings&&(t=this.pdfViewer.volumeSettings.annotationSelectorSettings),t},e.prototype.getShapeAnnotType=function(e){var t;switch(e){case"Distance":t="Line";break;case"Perimeter":t="Polyline";break;case"Area":case"Volume":t="Polygon";break;case"Radius":t="Circle"}return t},e.prototype.getShapeType=function(e){var t;return"Line"===e.shapeAnnotationType?t="Distance":"Polyline"===e.shapeAnnotationType?t="LineWidthArrowHead":"Polygon"===e.shapeAnnotationType&&"PolygonDimension"===e.indent?t="Polygon":"Polygon"===e.shapeAnnotationType&&"PolygonRadius"===e.indent||"Circle"===e.shapeAnnotationType?t="Radius":"Polygon"===e.shapeAnnotationType&&"PolygonVolume"===e.indent&&(t="Polygon"),t},e.prototype.getMeasureType=function(e){var t;return"Line"===e.shapeAnnotationType?t="Distance":"Polyline"===e.shapeAnnotationType?t="Perimeter":"Polygon"===e.shapeAnnotationType&&"PolygonDimension"===e.indent?t="Area":"Polygon"===e.shapeAnnotationType&&"PolygonRadius"===e.indent||"Circle"===e.shapeAnnotationType?t="Radius":"Polygon"===e.shapeAnnotationType&&"PolygonVolume"===e.indent&&(t="Volume"),t},e.prototype.getIndent=function(e){var t;switch(e){case"Distance":t="LineDimension";break;case"Perimeter":t="PolyLineDimension";break;case"Area":t="PolygonDimension";break;case"Radius":t="PolygonRadius";break;case"Volume":t="PolygonVolume"}return t},e.prototype.getNumberFormatArray=function(e){var t=new Array;if(e)for(var i=0;i<e.length;i++)t[i]={unit:e[i].Unit,fractionalType:e[i].FractionalType,conversionFactor:e[i].ConversionFactor,denominator:e[i].Denominator,formatDenominator:e[i].FormatDenominator};return t},e.prototype.createNumberFormat=function(e){var t=1,i=this.displayUnit;return"x"===e&&(t=this.getFactor(this.unit)),"a"===e&&(i="sq "+this.displayUnit),{unit:i,fractionalType:"D",conversionFactor:t,denominator:100,formatDenominator:!1}},e.prototype.saveMeasureShapeAnnotations=function(){var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape_measure");this.pdfViewerBase.isStorageExceed&&(e=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape_measure"]);for(var t=new Array,i=0;i<this.pdfViewerBase.pageCount;i++)t[i]=[];if(e&&!this.pdfViewer.annotationSettings.skipDownload)for(var n=JSON.parse(e),o=0;o<n.length;o++){var s=[],a=n[o];if(a){for(var r=0;a.annotations.length>r;r++){this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));var l=a.annotations[r].strokeColor;a.annotations[r].strokeColor=JSON.stringify(this.getRgbCode(l));var d=a.annotations[r].fillColor;if(a.annotations[r].fillColor=JSON.stringify(this.getRgbCode(d)),a.annotations[r].vertexPoints=JSON.stringify(this.pdfViewer.annotation.getVertexPoints(a.annotations[r].vertexPoints,a.pageIndex)),null!==a.annotations[r].rectangleDifference&&(a.annotations[r].rectangleDifference=JSON.stringify(a.annotations[r].rectangleDifference)),a.annotations[r].calibrate=this.getStringifiedMeasure(a.annotations[r].calibrate),!0===a.annotations[r].enableShapeLabel){a.annotations[r].labelBounds=JSON.stringify(this.pdfViewer.annotationModule.inputElementModule.calculateLabelBounds(JSON.parse(a.annotations[r].bounds),a.pageIndex));var u=a.annotations[r].labelFillColor;a.annotations[r].labelFillColor=JSON.stringify(this.getRgbCode(u));var M=a.annotations[r].labelBorderColor;a.annotations[r].labelBorderColor=JSON.stringify(this.getRgbCode(M));var p=a.annotations[r].fontColor;a.annotations[r].fontColor=JSON.stringify(this.getRgbCode(p))}}s=a.annotations}t[a.pageIndex]=s}return JSON.stringify(t)},e.prototype.createScaleRatioWindow=function(){var e=this;if(t.isBlazor())this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenScaleRatioDialog");else{var i=this.pdfViewer.element.id,n=t.createElement("div",{id:i+"_scale_ratio_window",className:"e-pv-scale-ratio-window"});this.pdfViewerBase.pageContainer.appendChild(n);var s=this.createRatioUI();this.scaleRatioDialog=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("Scale Ratio"),target:this.pdfViewer.element,content:s,close:function(){e.sourceTextBox.destroy(),e.convertUnit.destroy(),e.destTextBox.destroy(),e.dispUnit.destroy(),e.scaleRatioDialog.destroy();var t=e.pdfViewerBase.getElement("_scale_ratio_window");t.parentElement.removeChild(t)}}),!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.scaleRatioDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.onOkClicked.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.onCancelClicked.bind(this)}]:this.scaleRatioDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.onCancelClicked.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.onOkClicked.bind(this)}],this.pdfViewer.enableRtl&&(this.scaleRatioDialog.enableRtl=!0),this.scaleRatioDialog.appendTo(n),this.convertUnit.content=this.createContent(this.unit).outerHTML,this.dispUnit.content=this.createContent(this.displayUnit).outerHTML,this.depthUnit.content=this.createContent(this.displayUnit).outerHTML}},e.prototype.createRatioUI=function(){var e=t.createElement("div"),i=this.pdfViewer.element.id,o=[{text:"pt"},{text:"in"},{text:"mm"},{text:"cm"},{text:"p"},{text:"ft"},{text:"ft_in"},{text:"m"}],a=t.createElement("div",{id:i+"_scale_ratio_label",className:"e-pv-scale-ratio-text"});a.textContent=this.pdfViewer.localeObj.getConstant("Scale Ratio"),e.appendChild(a);var r=t.createElement("div",{id:i+"_scale_src_container"});e.appendChild(r);var l=this.createInputElement("input","e-pv-scale-ratio-src-input",i+"_src_input",r);this.sourceTextBox=new n.NumericTextBox({value:1,format:"##",cssClass:"e-pv-scale-ratio-src-input",min:1,max:100},l);var d=this.createInputElement("button","e-pv-scale-ratio-src-unit",i+"_src_unit",r);this.convertUnit=new s.DropDownButton({items:o,cssClass:"e-pv-scale-ratio-src-unit"},d),this.convertUnit.select=this.convertUnitSelect.bind(this);var u=t.createElement("div",{id:i+"_scale_dest_container"}),M=this.createInputElement("input","e-pv-scale-ratio-dest-input",i+"_dest_input",u);this.destTextBox=new n.NumericTextBox({value:1,format:"##",cssClass:"e-pv-scale-ratio-dest-input",min:1,max:100},M);var p=this.createInputElement("button","e-pv-scale-ratio-dest-unit",i+"_dest_unit",u);this.dispUnit=new s.DropDownButton({items:o,cssClass:"e-pv-scale-ratio-dest-unit"},p),this.dispUnit.select=this.dispUnitSelect.bind(this),e.appendChild(u);var h=t.createElement("div",{id:i+"_depth_label",className:"e-pv-depth-text"});h.textContent=this.pdfViewer.localeObj.getConstant("Depth"),e.appendChild(h);var L=t.createElement("div",{id:i+"_depth_container"});e.appendChild(L);var w=this.createInputElement("input","e-pv-depth-input",i+"_depth_input",L);this.depthTextBox=new n.NumericTextBox({value:this.volumeDepth,format:"##",cssClass:"e-pv-depth-input",min:1},w);var c=this.createInputElement("button","e-pv-depth-unit",i+"_depth_unit",L);return this.depthUnit=new s.DropDownButton({items:o,cssClass:"e-pv-depth-unit"},c),this.depthUnit.select=this.depthUnitSelect.bind(this),e},e.prototype.convertUnitSelect=function(e){this.convertUnit.content=this.createContent(e.item.text).outerHTML},e.prototype.dispUnitSelect=function(e){this.dispUnit.content=this.createContent(e.item.text).outerHTML,this.depthUnit.content=this.createContent(e.item.text).outerHTML},e.prototype.depthUnitSelect=function(e){this.depthUnit.content=this.createContent(e.item.text).outerHTML},e.prototype.createContent=function(e){var i=t.createElement("div",{className:"e-pv-scale-unit-content"});return i.textContent=e,i},e.prototype.createInputElement=function(e,i,n,o){var s=t.createElement("div",{id:n+"_container",className:i+"-container"}),a=t.createElement(e,{id:n});return"input"===e&&(a.type="text"),s.appendChild(a),o.appendChild(s),a},e.prototype.onOkClicked=function(){if(t.isBlazor()){var e=document.querySelector("#"+this.pdfViewer.element.id+"_src_unit"),i=document.querySelector("#"+this.pdfViewer.element.id+"_dest_unit"),n=document.querySelector("#"+this.pdfViewer.element.id+"_ratio_input"),o=document.querySelector("#"+this.pdfViewer.element.id+"_dest_input"),s=document.querySelector("#"+this.pdfViewer.element.id+"_depth_input");e&&i&&n&&o&&s&&(this.unit=e.value,this.displayUnit=i.value,this.ratio=parseInt(o.value)/parseInt(n.value),this.volumeDepth=parseInt(s.value)),this.scaleRatioString=parseInt(n.value)+" "+this.unit+" = "+parseInt(o.value)+" "+this.displayUnit,this.updateMeasureValues(this.scaleRatioString,this.displayUnit,this.unit,this.volumeDepth)}else this.unit=this.getContent(this.convertUnit.content),this.displayUnit=this.getContent(this.dispUnit.content),this.ratio=this.destTextBox.value/this.sourceTextBox.value,this.volumeDepth=this.depthTextBox.value,this.scaleRatioString=this.sourceTextBox.value+" "+this.unit+" = "+this.destTextBox.value+" "+this.displayUnit,this.scaleRatioDialog.hide(),this.updateMeasureValues(this.scaleRatioString,this.displayUnit,this.unit,this.volumeDepth)},e.prototype.updateMeasureValues=function(e,t,i,n){this.scaleRatioString=e,this.displayUnit=t,this.unit=i,this.volumeDepth=n;for(var o=0;o<this.pdfViewerBase.pageCount;o++){var s=this.getAnnotations(o,null);if(s)for(var a=0;a<s.length;a++){var r=(s=this.getAnnotations(o,null))[a];r.calibrate.ratio=e,r.calibrate.x[0].unit=t,r.calibrate.distance[0].unit=t,r.calibrate.area[0].unit=t,r.calibrate.x[0].conversionFactor=this.getFactor(i),"PolygonVolume"===r.indent&&(r.calibrate.depth=n),s[a]=r,this.manageAnnotations(s,o),this.pdfViewer.annotation.updateCalibrateValues(this.getAnnotationBaseModel(r.id))}this.pdfViewer.annotation.renderAnnotations(o,null,null,null,null,!1)}},e.prototype.getAnnotationBaseModel=function(e){for(var t=null,i=0;i<this.pdfViewer.annotations.length;i++)if(e===this.pdfViewer.annotations[i].id){t=this.pdfViewer.annotations[i];break}return t},e.prototype.getContent=function(e){return e.split("</div>")[0].split('">')[1]},e.prototype.setConversion=function(e,t){var i;if(t){var n=t.pageIndex;"diagram_helper"===t.id&&(n=t.pageIndex?t.pageIndex:this.pdfViewerBase.activeElements.activePageID,t=this.getCurrentObject(n,null,t.annotName)),i=t?this.getCurrentValues(t.id,n):this.getCurrentValues()}else i=this.getCurrentValues();var o=e*i.ratio;return this.convertPointToUnits(i.factor,o,i.unit)},e.prototype.onCancelClicked=function(){this.scaleRatioDialog.hide()},e.prototype.modifyInCollection=function(e,t,i,n){n||(this.pdfViewer.isDocumentEdited=!0);var o=null,s=this.getAnnotations(t,null);if(null!=s&&i){for(var a=0;a<s.length;a++)if(i.id===s[a].id){if("bounds"===e)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAnnotationModifiedDate(i,!0),"Line"===s[a].shapeAnnotationType||"Polyline"===s[a].shapeAnnotationType?(s[a].vertexPoints=i.vertexPoints,s[a].bounds={left:i.bounds.x,top:i.bounds.y,width:i.bounds.width,height:i.bounds.height,right:i.bounds.right,bottom:i.bounds.bottom}):"Polygon"===s[a].shapeAnnotationType?(s[a].vertexPoints=i.vertexPoints,s[a].bounds={left:i.bounds.x,top:i.bounds.y,width:i.bounds.width,height:i.bounds.height,right:i.bounds.right,bottom:i.bounds.bottom}):s[a].bounds={left:i.bounds.x,top:i.bounds.y,width:i.bounds.width,height:i.bounds.height,right:i.bounds.right,bottom:i.bounds.bottom},!0===s[a].enableShapeLabel&&i.wrapper&&(s[a].labelBounds=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBounds(i.wrapper.bounds));else if("fill"===e)s[a].fillColor=i.wrapper.children[0].style.fill;else if("stroke"===e)s[a].strokeColor=i.wrapper.children[0].style.strokeColor;else if("opacity"===e)s[a].opacity=i.wrapper.children[0].style.opacity;else if("thickness"===e)s[a].thickness=i.wrapper.children[0].style.strokeWidth;else if("dashArray"===e)s[a].borderDashArray=i.wrapper.children[0].style.strokeDashArray,s[a].borderStyle=i.borderStyle;else if("startArrow"===e)s[a].lineHeadStart=this.pdfViewer.annotation.getArrowTypeForCollection(i.sourceDecoraterShapes);else if("endArrow"===e)s[a].lineHeadEnd=this.pdfViewer.annotation.getArrowTypeForCollection(i.taregetDecoraterShapes);else if("leaderLength"===e)s[a].leaderLength=i.leaderHeight;else if("notes"===e)s[a].note=i.notes,!0===s[a].enableShapeLabel&&(s[a].labelContent=i.notes);else{if("delete"===e){o=s.splice(a,1)[0];break}if("labelContent"===e){s[a].note=i.labelContent,s[a].labelContent=i.labelContent;break}"fontColor"===e?s[a].fontColor=i.fontColor:"fontSize"===e&&(s[a].fontSize=i.fontSize)}s[a].modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.pdfViewer.annotationModule.storeAnnotationCollections(s[a],t)}this.manageAnnotations(s,t)}return o},e.prototype.addInCollection=function(e,t){var i=this.getAnnotations(e,null);i&&i.push(t),this.manageAnnotations(i,e)},e.prototype.manageAnnotations=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape_measure");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape_measure"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_shape_measure");var o=this.pdfViewer.annotationModule.getPageCollection(n,t);n[o]&&(n[o].annotations=e);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape_measure"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_shape_measure",s)}},e.prototype.getAnnotations=function(e,t){var i,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape_measure");if(this.pdfViewerBase.isStorageExceed&&(n=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape_measure"]),n){var o=JSON.parse(n),s=this.pdfViewer.annotationModule.getPageCollection(o,e);i=o[s]?o[s].annotations:t}else i=t;return i},e.prototype.getCurrentObject=function(e,t,i){var n=null,o=this.getAnnotations(e,null);if(null!=o)for(var s=0;s<o.length;s++)if(t){if(t===o[s].id){n=o[s];break}}else if(i&&i===o[s].annotName){n=o[s];break}return n},e.prototype.getCurrentValues=function(e,t){var i,n,o,s;if(e&&!isNaN(t)){var a=this.getCurrentObject(t,e);a?(i=this.getCurrentRatio(a.calibrate.ratio),n=a.calibrate.x[0].unit,o=a.calibrate.x[0].conversionFactor,s=a.calibrate.depth):(i=this.ratio,n=this.displayUnit,o=this.getFactor(this.unit),s=this.volumeDepth)}else i=this.ratio,n=this.displayUnit,o=this.getFactor(this.unit),s=this.volumeDepth;return{ratio:i,unit:n,factor:o,depth:s}},e.prototype.getCurrentRatio=function(e){var t=e.split(" ");return"="===t[3]?parseFloat(t[4])/parseFloat(t[0]):parseFloat(t[3])/parseFloat(t[0])},e.prototype.calculateArea=function(e,t,i){var n=this.getCurrentValues(t,i),o=this.getArea(e,n.factor,n.unit)*n.ratio;if("ft_in"===n.unit){var s=Math.round(100*o)/100;if(s>=12){if(s=(Math.round(s/12*100)/100).toString(),(s=s.split("."))[1]){var a=0;return s[1].charAt(1)?(a=parseInt(s[1].charAt(0))+"."+parseInt(s[1].charAt(1)),a=Math.round(a)):a=s[1],a?s[0]+" sq ft "+a+" in":s[0]+" sq ft"}return s[0]+" sq ft"}return Math.round(100*o)/100+" sq in"}return"m"===n.unit?100*o/100+" sq "+n.unit:Math.round(100*o)/100+" sq "+n.unit},e.prototype.getArea=function(e,t,i){for(var n=0,o=e.length-1,s=0;s<e.length;s++)n+=(e[o].x*this.pixelToPointFactor*t+e[s].x*this.pixelToPointFactor*t)*(e[o].y*this.pixelToPointFactor*t-e[s].y*this.pixelToPointFactor*t),o=s;return"ft_in"===i?Math.abs(2*n):Math.abs(n/2)},e.prototype.calculateVolume=function(e,t,i){var n=this.getCurrentValues(t,i),o=n.depth?n.depth:this.volumeDepth,s=this.getArea(e,n.factor,n.unit)*(o*this.convertUnitToPoint(n.unit)*n.factor)*n.ratio;if("ft_in"===n.unit){var a=Math.round(100*s)/100;if(a>=12){if(a=(Math.round(a/12*100)/100).toString(),(a=a.split("."))[1]){var r=0;return a[1].charAt(1)?(r=parseInt(a[1].charAt(0))+"."+parseInt(a[1].charAt(1)),r=Math.round(r)):r=a[1],r?a[0]+" cu ft "+r+" in":a[0]+" cu ft"}return a[0]+" cu ft"}return Math.round(100*s)/100+" cu in"}return Math.round(100*s)/100+" cu "+n.unit},e.prototype.calculatePerimeter=function(e){var t=i.Point.getLengthFromListOfPoints(e.vertexPoints);return this.setConversion(t*this.pixelToPointFactor,e)},e.prototype.getFactor=function(e){var t;switch(e){case"in":t=1/72;break;case"cm":t=1/28.346;break;case"mm":t=1/2.835;break;case"pt":t=1;break;case"p":t=1/12;break;case"ft":t=1/864;break;case"ft_in":t=1/72;break;case"m":t=1/2834.64567}return t},e.prototype.convertPointToUnits=function(e,t,i){var n;if("ft_in"===i){var o=Math.round(t*e*100)/100;if(o>=12)if(o=(Math.round(o/12*100)/100).toString(),(o=o.split("."))[1]){var s=0;o[1].charAt(1)?(s=parseInt(o[1].charAt(0))+"."+parseInt(o[1].charAt(1)),s=Math.round(s)):s=o[1],n=s?o[0]+" ft "+s+" in":o[0]+" ft"}else n=o[0]+" ft";else n=Math.round(t*e*100)/100+" in"}else n=Math.round(t*e*100)/100+" "+i;return n},e.prototype.convertUnitToPoint=function(e){var t;switch(e){case"in":t=72;break;case"cm":t=28.346;break;case"mm":t=2.835;break;case"pt":t=1;break;case"p":t=12;break;case"ft":t=864;break;case"ft_in":t=72;break;case"m":t=2834.64567}return t},e.prototype.getStringifiedMeasure=function(e){return t.isNullOrUndefined(e)||(e.angle=JSON.stringify(e.angle),e.area=JSON.stringify(e.area),e.distance=JSON.stringify(e.distance),e.volume=JSON.stringify(e.volume)),JSON.stringify(e)},e.prototype.getRgbCode=function(e){e.match(/#([a-z0-9]+)/gi)||e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(e=this.pdfViewer.annotationModule.nameToHash(e));var i=e.split(",");return t.isNullOrUndefined(i[1])&&(i=(e=this.pdfViewer.annotationModule.getValue(e,"rgba")).split(",")),{r:parseInt(i[0].split("(")[1]),g:parseInt(i[1]),b:parseInt(i[2]),a:parseInt(i[3])}},e.prototype.saveImportedMeasureAnnotations=function(e,t){var i=null,n=null;if(e.VertexPoints){n=[];for(var o=0;o<e.VertexPoints.length;o++){var s={x:e.VertexPoints[o].X,y:e.VertexPoints[o].Y};n.push(s)}}var a={ratio:e.Calibrate.Ratio,x:this.getNumberFormatArray(e.Calibrate.X),distance:this.getNumberFormatArray(e.Calibrate.Distance),area:this.getNumberFormatArray(e.Calibrate.Area),angle:this.getNumberFormatArray(e.Calibrate.Angle),volume:this.getNumberFormatArray(e.Calibrate.Volume),targetUnitConversion:e.Calibrate.TargetUnitConversion};e.Calibrate.Depth&&(a.depth=e.Calibrate.Depth),e.Bounds&&!0===e.EnableShapeLabel&&(e.LabelBounds=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBoundsFromLoadedDocument(e.Bounds),e.LabelBorderColor=e.LabelBorderColor?e.LabelBorderColor:e.StrokeColor,e.FontColor=e.FontColor?e.FontColor:e.StrokeColor,e.LabelFillColor=e.LabelFillColor?e.LabelFillColor:e.FillColor,e.FontSize=e.FontSize?e.FontSize:16,e.LabelSettings=e.LabelSettings?e.LabelSettings:this.pdfViewer.shapeLabelSettings),e.AnnotationSettings=e.AnnotationSettings?e.AnnotationSettings:this.pdfViewer.annotationModule.updateAnnotationSettings(e),e.Author=this.pdfViewer.annotationModule.updateAnnotationAuthor("measure",e.Subject),i={id:"measure",shapeAnnotationType:e.ShapeAnnotationType,author:e.Author,modifiedDate:e.ModifiedDate,subject:e.Subject,note:e.Note,strokeColor:e.StrokeColor,fillColor:e.FillColor,opacity:e.Opacity,thickness:e.Thickness,rectangleDifference:e.RectangleDifference,borderStyle:e.BorderStyle,borderDashArray:e.BorderDashArray,rotateAngle:e.RotateAngle,isCloudShape:e.IsCloudShape,cloudIntensity:e.CloudIntensity,vertexPoints:n,lineHeadStart:e.LineHeadStart,lineHeadEnd:e.LineHeadEnd,isLocked:e.IsLocked,bounds:{left:e.Bounds.X,top:e.Bounds.Y,width:e.Bounds.Width,height:e.Bounds.Height,right:e.Bounds.Right,bottom:e.Bounds.Bottom},caption:e.Caption,captionPosition:e.CaptionPosition,calibrate:a,leaderLength:e.LeaderLength,leaderLineExtension:e.LeaderLineExtension,leaderLineOffset:e.LeaderLineOffset,indent:e.Indent,annotName:e.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,modifiedDate:e.ModifiedDate,author:e.Author},labelContent:e.LabelContent,enableShapeLabel:e.EnableShapeLabel,labelFillColor:e.LabelFillColor,labelBorderColor:e.LabelBorderColor,fontColor:e.FontColor,fontSize:e.FontSize,labelBounds:e.LabelBounds,annotationSelectorSettings:this.getSettings(e),labelSettings:e.LabelSettings,annotationSettings:e.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(e),isPrint:e.IsPrint,isCommentLock:e.IsCommentLock},this.pdfViewer.annotationModule.storeAnnotations(t,i,"_annotations_shape_measure")},e.prototype.updateMeasureAnnotationCollections=function(e,t){var i=null;if(e.VertexPoints){i=[];for(var n=0;n<e.VertexPoints.length;n++){var o={x:e.VertexPoints[n].X,y:e.VertexPoints[n].Y};i.push(o)}}var s={ratio:e.Calibrate.Ratio,x:this.getNumberFormatArray(e.Calibrate.X),distance:this.getNumberFormatArray(e.Calibrate.Distance),area:this.getNumberFormatArray(e.Calibrate.Area),angle:this.getNumberFormatArray(e.Calibrate.Angle),volume:this.getNumberFormatArray(e.Calibrate.Volume),targetUnitConversion:e.Calibrate.TargetUnitConversion};return e.Calibrate.Depth&&(s.depth=e.Calibrate.Depth),e.Bounds&&!0===e.EnableShapeLabel&&(e.LabelBounds=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBoundsFromLoadedDocument(e.Bounds),e.LabelBorderColor=e.LabelBorderColor?e.LabelBorderColor:e.StrokeColor,e.FontColor=e.FontColor?e.FontColor:e.StrokeColor,e.LabelFillColor=e.LabelFillColor?e.LabelFillColor:e.FillColor,e.FontSize=e.FontSize?e.FontSize:16,e.LabelSettings=e.LabelSettings?e.LabelSettings:this.pdfViewer.shapeLabelSettings),e.AnnotationSelectorSettings=e.AnnotationSelectorSettings?e.AnnotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,e.AnnotationSettings=e.AnnotationSettings?e.AnnotationSettings:this.pdfViewer.annotationModule.updateAnnotationSettings(e),e.IsLocked&&(e.AnnotationSettings.isLock=e.IsLocked),{id:"measure",shapeAnnotationType:e.ShapeAnnotationType,author:e.Author,modifiedDate:e.ModifiedDate,subject:e.Subject,note:e.Note,strokeColor:e.StrokeColor,fillColor:e.FillColor,opacity:e.Opacity,thickness:e.Thickness,rectangleDifference:e.RectangleDifference,borderStyle:e.BorderStyle,borderDashArray:e.BorderDashArray,rotateAngle:e.RotateAngle,isCloudShape:e.IsCloudShape,cloudIntensity:e.CloudIntensity,vertexPoints:i,lineHeadStart:e.LineHeadStart,lineHeadEnd:e.LineHeadEnd,isLocked:e.IsLocked,bounds:{left:e.Bounds.X,top:e.Bounds.Y,width:e.Bounds.Width,height:e.Bounds.Height,right:e.Bounds.Right,bottom:e.Bounds.Bottom},caption:e.Caption,captionPosition:e.CaptionPosition,calibrate:s,leaderLength:e.LeaderLength,leaderLineExtension:e.LeaderLineExtension,leaderLineOffset:e.LeaderLineOffset,indent:e.Indent,annotationId:e.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,modifiedDate:e.ModifiedDate,author:e.Author},labelContent:e.LabelContent,enableShapeLabel:e.EnableShapeLabel,labelFillColor:e.LabelFillColor,labelBorderColor:e.LabelBorderColor,fontColor:e.FontColor,fontSize:e.FontSize,labelBounds:e.LabelBounds,pageNumber:t,annotationSelectorSettings:e.AnnotationSelectorSettings,labelSettings:e.labelSettings,annotationSettings:e.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(e),isPrint:e.IsPrint}},e.prototype.updateAddAnnotationDetails=function(e,t,i){i=t?t.offset?t.offset:{x:10,y:10}:(t={offset:{x:10,y:10},pageNumber:0,width:void 0,height:void 0}).offset;var n=null,o=null,s=null,a="",r="",l="",d=!1,u=[],M=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),p=this.pdfViewer.annotation.createGUID();"Distance"==e?(n=this.pdfViewer.lineSettings.annotationSelectorSettings?this.pdfViewer.lineSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.lineSettings),o=this.pdfViewer.lineSettings.allowedInteractions?this.pdfViewer.lineSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="LineDimension",r="Line",l="Distance calculation",d=!0,u=t.vertexPoints?t.vertexPoints:[{x:i.x,y:i.y},{x:i.x+100,y:i.y}],t.width=t.width?t.width:1,t.height=t.height?t.height:1):"Perimeter"==e?(n=this.pdfViewer.arrowSettings.annotationSelectorSettings?this.pdfViewer.arrowSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.arrowSettings),o=this.pdfViewer.arrowSettings.allowedInteractions?this.pdfViewer.arrowSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="PolyLineDimension",r="Polyline",l="Perimeter calculation",d=!0,u=t.vertexPoints?t.vertexPoints:[{x:i.x,y:i.y},{x:i.x+85,y:i.y},{x:i.x+86,y:i.y+62}],t.width=t.width?t.width:1,t.height=t.height?t.height:1):"Area"==e?(n=this.pdfViewer.rectangleSettings.annotationSelectorSettings?this.pdfViewer.rectangleSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.rectangleSettings),o=this.pdfViewer.rectangleSettings.allowedInteractions?this.pdfViewer.rectangleSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="PolygonDimension",r="Polygon",l="Area calculation",u=t.vertexPoints?t.vertexPoints:[{x:i.x,y:i.y},{x:i.x+88,y:i.y-1},{x:i.x+89,y:i.y+53},{x:i.x,y:i.y}],t.width=t.width?t.width:1,t.height=t.height?t.height:1):"Radius"==e?(n=this.pdfViewer.circleSettings.annotationSelectorSettings?this.pdfViewer.circleSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.circleSettings),o=this.pdfViewer.circleSettings.allowedInteractions?this.pdfViewer.circleSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="PolygonRadius",r="Circle",l="Radius calculation",t.width=t.width?t.width:100,t.height=t.height?t.height:100,u=null):"Volume"==e&&(n=this.pdfViewer.polygonSettings.annotationSelectorSettings?this.pdfViewer.polygonSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.polygonSettings),o=this.pdfViewer.polygonSettings.allowedInteractions?this.pdfViewer.polygonSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="PolygonVolume",r="Polygon",l="Volume calculation",u=t.vertexPoints?t.vertexPoints:[{x:i.x,y:i.y},{x:i.x,y:i.y+109},{x:i.x+120,y:i.y+109},{x:i.x+120,y:i.y-1},{x:i.x,y:i.y}],t.width=t.width?t.width:1,t.height=t.height?t.height:1),s.isLock=!!t.isLock&&t.isLock,s.minHeight=t.minHeight?t.minHeight:0,s.minWidth=t.minWidth?t.minWidth:0,s.maxWidth=t.maxWidth?t.maxWidth:0,s.maxHeight=t.maxHeight?t.maxHeight:0;var h={depth:96,factor:.013888888888888888,ratio:1,unit:"in"},L="";if(u||"Radius"==e||"Volume"==e)if("Distance"==e||"Perimeter"==e||"Radius"==e){var w=0;if("Radius"==e)w=t.width/2*this.pixelToPointFactor;else{for(var c=0;c<u.length-1;c++)w+=Math.sqrt(Math.pow(u[c].x-u[c+1].x,2)+Math.pow(u[c].y-u[c+1].y,2));w*=this.pixelToPointFactor}var C=w*h.ratio;L=this.convertPointToUnits(h.factor,C,h.unit)}else if("Area"==e||"Volume"==e){for(var g=0,m=u.length-1,f=0;f<u.length;f++)g+=(u[m].x*this.pixelToPointFactor*h.factor+u[f].x*this.pixelToPointFactor*h.factor)*(u[m].y*this.pixelToPointFactor*h.factor-u[f].y*this.pixelToPointFactor*h.factor),m=f;g=Math.abs(g/2),"Volume"==e?(g=g*(h.depth*this.convertUnitToPoint(h.unit)*h.factor)*h.ratio,L=Math.round(100*g)/100+"cu "+h.unit):L=Math.round(100*g)/100+"sq "+h.unit}u&&(u=this.pdfViewer.annotation.getVertexPointsXY(u));var y=[],j={AllowedInteractions:t.allowedInteractions?t.allowedInteractions:o,AnnotName:p,AnnotType:"shape_measure",AnnotationSelectorSettings:t.annotationSelectorSettings?t.annotationSelectorSettings:n,AnnotationSettings:s,Author:t.author?t.author:"Guest",BorderDashArray:t.borderDashArray?t.borderDashArray:0,BorderStyle:"Solid",Bounds:{X:i.x,Y:i.y,Width:t.width,Height:t.height,Left:i.x,Top:i.y,Location:{X:i.x,Y:i.y},Size:{Height:t.height,IsEmpty:!1,Width:t.width}},Calibrate:{Area:[{ConversionFactor:1,Denominator:100,FormatDenominator:!1,FractionalType:"D",Unit:"sq in"}],Depth:t.depth?t.depth:0,Distance:[{ConversionFactor:1,Denominator:100,FormatDenominator:!1,FractionalType:"D",Unit:"in"}],Ratio:"1 in = 1 in",TargetUnitConversion:0,Volume:null,X:[{ConversionFactor:.013888889,Denominator:100,FormatDenominator:!1,FractionalType:"D",Unit:"in"}]},Caption:!0,CaptionPosition:"Top",CloudIntensity:0,Comments:null,CustomData:t.customData?t.customData:null,CreatedDate:M,EnableShapeLabel:!1,ExistingCustomData:null,FillColor:t.fillColor?t.fillColor:"#ffffff00",FontColor:null,FontSize:0,Indent:a,IsCloudShape:!1,IsCommentLock:!1,IsLocked:!!t.isLock&&t.isLock,IsPrint:!t.isPrint||t.isPrint,LabelBorderColor:null,LabelBounds:{X:0,Y:0,Width:0,Height:0},LabelContent:null,LabelFillColor:null,LabelSettings:null,LeaderLength:0,LeaderLineExtension:0,LeaderLineOffset:0,LineHeadEnd:t.lineHeadStartStyle?t.lineHeadStartStyle:d?"ClosedArrow":"None",LineHeadStart:t.lineHeadEndStyle?t.lineHeadEndStyle:d?"ClosedArrow":"None",ModifiedDate:"",Note:L,Opacity:t.opacity?t.opacity:1,RectangleDifference:null,RotateAngle:"RotateAngle0",ShapeAnnotationType:r,State:"",StateModel:"",StrokeColor:t.strokeColor?t.strokeColor:"#ff0000",Subject:l,Thickness:t.thickness?t.thickness:1,VertexPoints:u};return y[0]=j,{measureShapeAnnotation:y}},e}(),St=function(){function e(e,t){this.shapeCount=0,this.isAddAnnotationProgramatically=!1,this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.renderShapeAnnotations=function(e,i,n){if(e)if(e.length>=1){if(!this.pdfViewer.annotation.getStoredAnnotations(i,e,"_annotations_shape")||n)for(var o=0;o<e.length;o++){var s=e[o];s.annotationAddMode=this.pdfViewer.annotationModule.findAnnotationMode(s,i,s.AnnotType);g=null;if(this.shapeCount=this.shapeCount+1,s.ShapeAnnotationType){var a=null;if(s.VertexPoints){a=[];for(var r=0;r<s.VertexPoints.length;r++){var l={x:s.VertexPoints[r].X?s.VertexPoints[r].X:s.VertexPoints[r].x,y:s.VertexPoints[r].Y?s.VertexPoints[r].Y:s.VertexPoints[r].y};a.push(l)}}var d=void 0;g&&g.borderDashArray&&(d=g.borderDashArray.toString()),s.Bounds&&!0===s.EnableShapeLabel&&(s.LabelBounds=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBoundsFromLoadedDocument(s.Bounds),s.LabelBorderColor=s.LabelBorderColor?s.LabelBorderColor:s.StrokeColor,s.FontColor=s.FontColor?s.FontColor:s.StrokeColor,s.LabelFillColor=s.LabelFillColor?s.LabelFillColor:s.FillColor,s.FontSize=s.FontSize?s.FontSize:16,s.LabelSettings=s.LabelSettings?s.LabelSettings:this.pdfViewer.shapeLabelSettings),s.AnnotationSelectorSettings=s.AnnotationSelectorSettings?s.AnnotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s.AnnotationSettings=s.AnnotationSettings?s.AnnotationSettings:this.pdfViewer.annotationModule.updateAnnotationSettings(s),s.allowedInteractions=s.AllowedInteractions?s.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(s);var u=!0;u="Imported Annotation"===s.annotationAddMode?s.IsPrint:s.AnnotationSettings.isPrint;var M=s.Bounds.X?s.Bounds.X:s.Bounds.x,p=s.Bounds.Y?s.Bounds.Y:s.Bounds.y,h=s.Bounds.Width?s.Bounds.Width:s.Bounds.width,L=s.Bounds.Height?s.Bounds.Height:s.Bounds.height,w=void 0,c=(g={id:"shape"+this.shapeCount,shapeAnnotationType:s.ShapeAnnotationType,author:s.Author,allowedInteractions:s.allowedInteractions,modifiedDate:s.ModifiedDate,subject:s.Subject,note:s.Note,strokeColor:s.StrokeColor,fillColor:s.FillColor,opacity:s.Opacity,thickness:s.Thickness,rectangleDifference:s.RectangleDifference,borderStyle:s.BorderStyle,borderDashArray:s.BorderDashArray,rotateAngle:s.RotateAngle,isCloudShape:s.IsCloudShape,cloudIntensity:s.CloudIntensity,vertexPoints:a,lineHeadStart:s.LineHeadStart,lineHeadEnd:s.LineHeadEnd,isLocked:s.IsLocked,comments:this.pdfViewer.annotationModule.getAnnotationComments(s.Comments,s,s.Author),review:{state:s.State,stateModel:s.StateModel,modifiedDate:s.ModifiedDate,author:s.Author},annotName:s.AnnotName,bounds:{left:M,top:p,width:h,height:L,right:s.Bounds.Right,bottom:s.Bounds.Bottom},labelContent:s.LabelContent,enableShapeLabel:s.EnableShapeLabel,labelFillColor:s.LabelFillColor,fontColor:s.FontColor,labelBorderColor:s.LabelBorderColor,fontSize:s.FontSize,labelBounds:s.LabelBounds,annotationSelectorSettings:this.getSettings(s),labelSettings:s.LabelSettings,annotationSettings:s.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(s),isPrint:u,isCommentLock:s.IsCommentLock}).vertexPoints;null==a&&(c=[]),s.AnnotationSelectorSettings=s.AnnotationSelectorSettings?s.AnnotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,w={id:"shape"+this.shapeCount,shapeAnnotationType:this.getShapeType(g),author:g.author,allowedInteractions:g.allowedInteractions,modifiedDate:g.modifiedDate,annotName:g.annotName,subject:g.subject,notes:g.note,fillColor:g.fillColor,strokeColor:g.strokeColor,opacity:g.opacity,thickness:g.thickness,borderStyle:g.borderStyle,borderDashArray:d,rotateAngle:parseFloat(g.rotateAngle.split("Angle")[1]),comments:g.comments,review:g.review,isCloudShape:g.isCloudShape,cloudIntensity:g.cloudIntensity,taregetDecoraterShapes:this.pdfViewer.annotation.getArrowType(g.lineHeadEnd),sourceDecoraterShapes:this.pdfViewer.annotation.getArrowType(g.lineHeadStart),vertexPoints:c,bounds:{x:g.bounds.left,y:g.bounds.top,width:g.bounds.width,height:g.bounds.height},pageIndex:i,labelContent:s.LabelContent,enableShapeLabel:s.EnableShapeLabel,labelFillColor:s.LabelFillColor,fontColor:s.FontColor,labelBorderColor:s.LabelBorderColor,fontSize:s.FontSize,labelBounds:s.LabelBounds,annotationSelectorSettings:s.AnnotationSelectorSettings,annotationSettings:g.annotationSettings,annotationAddMode:s.annotationAddMode,isPrint:u,isCommentLock:g.isCommentLock};this.pdfViewer.add(w);if(this.pdfViewer.annotationModule.storeAnnotations(i,g,"_annotations_shape"),this.isAddAnnotationProgramatically){var C={opacity:w.opacity,strokeColor:w.strokeColor,thickness:w.thickness,modifiedDate:w.modifiedDate,width:w.bounds.width,height:w.bounds.height};this.pdfViewer.fireAnnotationAdd(w.pageIndex,w.annotName,s.ShapeAnnotationType,w.bounds,C)}}}}else if(e.shapeAnnotationType){var g=this.createAnnotationObject(e);t.isNullOrUndefined(e.formFieldAnnotationType)||""===e.formFieldAnnotationType?this.pdfViewer.annotationModule.isFormFieldShape=!1:this.pdfViewer.annotationModule.isFormFieldShape=!0,this.pdfViewer.annotationModule.storeAnnotations(i,g,"_annotations_shape"),this.pdfViewer.annotationModule.triggerAnnotationAdd(e)}},e.prototype.getSettings=function(e){this.pdfViewer.annotationSelectorSettings;return e.AnnotationSelectorSettings?e.AnnotationSelectorSettings:this.getSelector(e.ShapeAnnotationType,e.Subject)},e.prototype.setAnnotationType=function(e){this.updateShapeProperties(),this.pdfViewerBase.disableTextSelectionMode();var t="Guest";switch(e){case"Line":this.currentAnnotationMode="Line";var i=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.lineSettings.author?this.pdfViewer.lineSettings.author:"Guest",this.pdfViewer.drawingObject={shapeAnnotationType:this.setShapeType("Line"),fillColor:this.lineFillColor,notes:"",strokeColor:this.lineStrokeColor,opacity:this.lineOpacity,thickness:this.lineThickness,modifiedDate:i,borderDashArray:this.lineDashArray.toString(),sourceDecoraterShapes:this.pdfViewer.annotation.getArrowType(this.lineStartHead.toString()),taregetDecoraterShapes:this.pdfViewer.annotation.getArrowType(this.lineEndHead.toString()),author:t,subject:"Line",lineHeadStart:this.lineStartHead,lineHeadEnd:this.lineEndHead,isCommentLock:!1},this.pdfViewer.tool="Line";break;case"Arrow":this.currentAnnotationMode="Arrow";var n=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.arrowSettings.author?this.pdfViewer.arrowSettings.author:"Guest",this.pdfViewer.drawingObject={shapeAnnotationType:this.setShapeType("Arrow"),opacity:this.arrowOpacity,sourceDecoraterShapes:this.pdfViewer.annotation.getArrowType(this.arrowStartHead.toString()),taregetDecoraterShapes:this.pdfViewer.annotation.getArrowType(this.arrowEndHead.toString()),fillColor:this.arrowFillColor,strokeColor:this.arrowStrokeColor,notes:"",thickness:this.arrowThickness,borderDashArray:this.arrowDashArray.toString(),author:t,subject:"Arrow",modifiedDate:n,lineHeadStart:this.arrowStartHead,lineHeadEnd:this.arrowEndHead,isCommentLock:!1},this.pdfViewer.tool="Line";break;case"Rectangle":this.currentAnnotationMode="Rectangle";var o=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.rectangleSettings.author?this.pdfViewer.rectangleSettings.author:"Guest",this.pdfViewer.drawingObject={shapeAnnotationType:this.setShapeType("Rectangle"),strokeColor:this.rectangleStrokeColor,fillColor:this.rectangleFillColor,opacity:this.rectangleOpacity,notes:"",thickness:this.rectangleThickness,borderDashArray:"0",modifiedDate:o,author:t,subject:"Rectangle",isCommentLock:!1},this.pdfViewer.tool="DrawTool";break;case"Circle":this.currentAnnotationMode="Circle";var s=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.circleSettings.author?this.pdfViewer.circleSettings.author:"Guest",this.pdfViewer.drawingObject={shapeAnnotationType:this.setShapeType("Circle"),strokeColor:this.circleStrokeColor,fillColor:this.circleFillColor,opacity:this.circleOpacity,notes:"",thickness:this.circleThickness,borderDashArray:"0",modifiedDate:s,author:t,subject:"Circle",isCommentLock:!1},this.pdfViewer.tool="DrawTool";break;case"Polygon":this.currentAnnotationMode="Polygon";var a=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();t="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.polygonSettings.author?this.pdfViewer.polygonSettings.author:"Guest",this.pdfViewer.drawingObject={strokeColor:this.polygonStrokeColor,fillColor:this.polygonFillColor,opacity:this.polygonOpacity,thickness:this.polygonThickness,borderDashArray:"0",notes:"",author:t,subject:"Polygon",modifiedDate:a,borderStyle:"",isCommentLock:!1},this.pdfViewer.tool="Polygon"}},e.prototype.updateShapeProperties=function(){this.lineFillColor=this.pdfViewer.lineSettings.fillColor?this.pdfViewer.lineSettings.fillColor:"#ffffff00",this.lineStrokeColor=this.pdfViewer.lineSettings.strokeColor?this.pdfViewer.lineSettings.strokeColor:"#ff0000",this.lineThickness=this.pdfViewer.lineSettings.thickness?this.pdfViewer.lineSettings.thickness:1,this.lineOpacity=this.pdfViewer.lineSettings.opacity?this.pdfViewer.lineSettings.opacity:1,this.lineDashArray=this.pdfViewer.lineSettings.borderDashArray?this.pdfViewer.lineSettings.borderDashArray:0,this.lineStartHead=this.pdfViewer.lineSettings.lineHeadStartStyle?this.pdfViewer.lineSettings.lineHeadStartStyle:"None",this.lineEndHead=this.pdfViewer.lineSettings.lineHeadEndStyle?this.pdfViewer.lineSettings.lineHeadEndStyle:"None",this.arrowFillColor=this.pdfViewer.arrowSettings.fillColor?this.pdfViewer.arrowSettings.fillColor:"#ffffff00",this.arrowStrokeColor=this.pdfViewer.arrowSettings.strokeColor?this.pdfViewer.arrowSettings.strokeColor:"#ff0000",this.arrowThickness=this.pdfViewer.arrowSettings.thickness?this.pdfViewer.arrowSettings.thickness:1,this.arrowOpacity=this.pdfViewer.arrowSettings.opacity?this.pdfViewer.arrowSettings.opacity:1,this.arrowDashArray=this.pdfViewer.arrowSettings.borderDashArray?this.pdfViewer.arrowSettings.borderDashArray:0,this.arrowStartHead=this.pdfViewer.arrowSettings.lineHeadStartStyle?this.pdfViewer.arrowSettings.lineHeadStartStyle:"Closed",this.arrowEndHead=this.pdfViewer.arrowSettings.lineHeadEndStyle?this.pdfViewer.arrowSettings.lineHeadEndStyle:"Closed",this.rectangleFillColor=this.pdfViewer.rectangleSettings.fillColor?this.pdfViewer.rectangleSettings.fillColor:"#ffffff00",this.rectangleStrokeColor=this.pdfViewer.rectangleSettings.strokeColor?this.pdfViewer.rectangleSettings.strokeColor:"#ff0000",this.rectangleThickness=this.pdfViewer.rectangleSettings.thickness?this.pdfViewer.rectangleSettings.thickness:1,this.rectangleOpacity=this.pdfViewer.rectangleSettings.opacity?this.pdfViewer.rectangleSettings.opacity:1,this.circleFillColor=this.pdfViewer.circleSettings.fillColor?this.pdfViewer.circleSettings.fillColor:"#ffffff00",this.circleStrokeColor=this.pdfViewer.circleSettings.strokeColor?this.pdfViewer.circleSettings.strokeColor:"#ff0000",this.circleThickness=this.pdfViewer.circleSettings.thickness?this.pdfViewer.circleSettings.thickness:1,this.circleOpacity=this.pdfViewer.circleSettings.opacity?this.pdfViewer.circleSettings.opacity:1,this.polygonFillColor=this.pdfViewer.polygonSettings.fillColor?this.pdfViewer.polygonSettings.fillColor:"#ffffff00",this.polygonStrokeColor=this.pdfViewer.polygonSettings.strokeColor?this.pdfViewer.polygonSettings.strokeColor:"#ff0000",this.polygonThickness=this.pdfViewer.polygonSettings.thickness?this.pdfViewer.polygonSettings.thickness:1,this.polygonOpacity=this.pdfViewer.polygonSettings.opacity?this.pdfViewer.polygonSettings.opacity:1},e.prototype.setShapeType=function(e){var t;switch(e){case"Line":t="Line";break;case"Circle":t="Ellipse";break;case"Square":t="Rectangle";break;case"Polyline":t="Line";break;case"Arrow":t="LineWidthArrowHead"}return t},e.prototype.getShapeType=function(e){var t;switch(e.shapeAnnotationType){case"Line":t="Line";break;case"Circle":t="Ellipse";break;case"Square":t="Rectangle";break;case"Polyline":t="Line";break;case"Polygon":t="Polygon"}return"Line"!==e.shapeAnnotationType&&"Polyline"!==e.shapeAnnotationType||"None"===e.lineHeadStart&&"None"===e.lineHeadEnd||(t="LineWidthArrowHead"),t},e.prototype.getShapeAnnotType=function(e){var t;switch(e){case"Line":case"LineWidthArrowHead":t="Line";break;case"Rectangle":t="Square";break;case"Ellipse":t="Circle";break;case"Polygon":t="Polygon"}return t},e.prototype.modifyInCollection=function(e,i,n){t.isNullOrUndefined(n.formFieldAnnotationType)||""===n.formFieldAnnotationType?this.pdfViewer.annotationModule.isFormFieldShape=!1:this.pdfViewer.annotationModule.isFormFieldShape=!0,this.pdfViewer.isDocumentEdited=!0;var o=null;n&&"bounds"===e&&this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAnnotationModifiedDate(n,!0);var s=this.getAnnotations(i,null);if(null!=s&&n){for(var a=0;a<s.length;a++)if(n.id===s[a].id){if("bounds"===e){if("Line"===s[a].shapeAnnotationType?(s[a].vertexPoints=n.vertexPoints,s[a].bounds={left:n.bounds.x,top:n.bounds.y,width:n.bounds.width,height:n.bounds.height,right:n.bounds.right,bottom:n.bounds.bottom}):"Polygon"===s[a].shapeAnnotationType?(s[a].vertexPoints=n.vertexPoints,s[a].bounds={left:n.bounds.x,top:n.bounds.y,width:n.bounds.width,height:n.bounds.height,right:n.bounds.right,bottom:n.bounds.bottom}):s[a].bounds={left:n.bounds.x,top:n.bounds.y,width:n.bounds.width,height:n.bounds.height,right:n.bounds.right,bottom:n.bounds.bottom},!0===s[a].enableShapeLabel&&n.wrapper){var r=0,l=0,d=0;n.wrapper.bounds.width&&(d=(d=n.wrapper.bounds.width/2)>0&&d<151?d:151),n.wrapper.bounds.left&&(l=n.wrapper.bounds.left+n.wrapper.bounds.width/2-d/2),n.wrapper.bounds.top&&(r=n.wrapper.bounds.top+n.wrapper.bounds.height/2-12.3),s[a].labelBounds={left:l,top:r,width:d,height:24.6,right:0,bottom:0}}}else if("fill"===e)s[a].fillColor=n.wrapper.children[0].style.fill;else if("stroke"===e)s[a].strokeColor=n.wrapper.children[0].style.strokeColor;else if("opacity"===e)s[a].opacity=n.wrapper.children[0].style.opacity;else if("thickness"===e)s[a].thickness=n.wrapper.children[0].style.strokeWidth;else if("dashArray"===e)s[a].borderDashArray=n.wrapper.children[0].style.strokeDashArray,s[a].borderStyle=n.borderStyle;else if("startArrow"===e)s[a].lineHeadStart=this.pdfViewer.annotation.getArrowTypeForCollection(n.sourceDecoraterShapes);else if("endArrow"===e)s[a].lineHeadEnd=this.pdfViewer.annotation.getArrowTypeForCollection(n.taregetDecoraterShapes);else if("notes"===e)s[a].note=n.notes;else{if("delete"===e){o=s.splice(a,1)[0];break}if("labelContent"===e){s[a].note=n.labelContent,s[a].labelContent=n.labelContent;break}"fontColor"===e?s[a].fontColor=n.fontColor:"fontSize"===e&&(s[a].fontSize=n.fontSize)}s[a].modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.pdfViewer.annotationModule.storeAnnotationCollections(s[a],i)}this.manageAnnotations(s,i)}return o},e.prototype.addInCollection=function(e,t){var i=this.getAnnotations(e,null);i&&i.push(t),this.manageAnnotations(i,e)},e.prototype.saveShapeAnnotations=function(){var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape");this.pdfViewerBase.isStorageExceed&&(e=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape"]);for(var t=new Array,i=0;i<this.pdfViewerBase.pageCount;i++)t[i]=[];if(e&&!this.pdfViewer.annotationSettings.skipDownload)for(var n=JSON.parse(e),o=0;o<n.length;o++){var s=[],a=n[o];if(a){for(var r=0;a.annotations.length>r;r++)if(this.pdfViewerBase.checkFormFieldCollection(a.annotations[r].id))a.annotations[r]="";else{this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));var l=a.annotations[r].strokeColor;a.annotations[r].strokeColor=JSON.stringify(this.getRgbCode(l));var d=a.annotations[r].fillColor;if(a.annotations[r].fillColor=JSON.stringify(this.getRgbCode(d)),a.annotations[r].vertexPoints=JSON.stringify(this.pdfViewer.annotation.getVertexPoints(a.annotations[r].vertexPoints,a.pageIndex)),null!==a.annotations[r].rectangleDifference&&(a.annotations[r].rectangleDifference=JSON.stringify(a.annotations[r].rectangleDifference)),!0===a.annotations[r].enableShapeLabel){a.annotations[r].labelBounds=JSON.stringify(this.pdfViewer.annotationModule.inputElementModule.calculateLabelBounds(JSON.parse(a.annotations[r].bounds)));var u=a.annotations[r].labelFillColor;a.annotations[r].labelFillColor=JSON.stringify(this.getRgbCode(u));var M=a.annotations[r].labelBorderColor;a.annotations[r].labelBorderColor=JSON.stringify(this.getRgbCode(M));var p=a.annotations[r].fontColor;a.annotations[r].fontColor=JSON.stringify(this.getRgbCode(p))}}a.annotations=a.annotations.filter(function(e){return e}),s=a.annotations}t[a.pageIndex]=s}return JSON.stringify(t)},e.prototype.manageAnnotations=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_shape");var o=this.pdfViewer.annotationModule.getPageCollection(n,t);n[o]&&(n[o].annotations=e);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_shape",s)}},e.prototype.createAnnotationObject=function(e){var t,i,n=this.pdfViewer.annotation.createGUID();if(!e.formFieldAnnotationType){var o=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("shape",e.pageIndex+1,e.shapeAnnotationType);o&&(document.getElementById(o).id=n)}e.annotName=n,e.wrapper.bounds?(t={left:e.wrapper.bounds.x,top:e.wrapper.bounds.y,height:e.wrapper.bounds.height,width:e.wrapper.bounds.width,right:e.wrapper.bounds.right,bottom:e.wrapper.bounds.bottom},i=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBounds(e.wrapper.bounds)):(t={left:0,top:0,height:0,width:0,right:0,bottom:0},i={left:0,top:0,height:0,width:0,right:0,bottom:0}),"Line"===e.subject&&"Polygon"===e.shapeAnnotationType?e.author=this.pdfViewer.annotationModule.updateAnnotationAuthor("shape","Polygon"):e.author=this.pdfViewer.annotationModule.updateAnnotationAuthor("shape",e.subject),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(n,e.notes);var s=parseInt(e.borderDashArray);s=isNaN(s)?0:s;var a=this.pdfViewer.annotationModule.findAnnotationSettings(e,!0);return e.isPrint=a.isPrint,{id:e.id,shapeAnnotationType:this.getShapeAnnotType(e.shapeAnnotationType),author:e.author,allowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e),subject:e.subject,note:e.notes,strokeColor:e.strokeColor,annotName:n,comments:[],review:{state:"",stateModel:"",modifiedDate:this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),author:e.author},fillColor:e.fillColor,opacity:e.opacity,thickness:e.thickness,borderStyle:e.borderStyle,borderDashArray:s,bounds:t,modifiedDate:this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),rotateAngle:"RotateAngle"+e.rotateAngle,isCloudShape:e.isCloudShape,cloudIntensity:e.cloudIntensity,vertexPoints:e.vertexPoints,lineHeadStart:this.pdfViewer.annotation.getArrowTypeForCollection(e.sourceDecoraterShapes),lineHeadEnd:this.pdfViewer.annotation.getArrowTypeForCollection(e.taregetDecoraterShapes),rectangleDifference:[],isLocked:a.isLock,labelContent:e.labelContent,enableShapeLabel:e.enableShapeLabel,labelFillColor:e.labelFillColor,fontColor:e.fontColor,labelBorderColor:e.labelBorderColor,fontSize:e.fontSize,labelBounds:i,annotationSelectorSettings:this.getSelector(e.shapeAnnotationType,e.subject),labelSettings:this.pdfViewer.shapeLabelSettings,annotationSettings:a,customData:this.pdfViewer.annotation.getShapeData(e.shapeAnnotationType,e.subject),isPrint:e.isPrint,isCommentLock:e.isCommentLock}},e.prototype.getSelector=function(e,t){var i=this.pdfViewer.annotationSelectorSettings;return"Line"===e&&"Arrow"!==t&&this.pdfViewer.lineSettings.annotationSelectorSettings?i=this.pdfViewer.lineSettings.annotationSelectorSettings:"LineWidthArrowHead"!==e&&"Arrow"!==t||!this.pdfViewer.lineSettings.annotationSelectorSettings?"Rectangle"!==e&&"Square"!==e||!this.pdfViewer.rectangleSettings.annotationSelectorSettings?"Ellipse"!==e&&"Circle"!==e||!this.pdfViewer.circleSettings.annotationSelectorSettings?"Polygon"===e&&this.pdfViewer.polygonSettings.annotationSelectorSettings&&(i=this.pdfViewer.polygonSettings.annotationSelectorSettings):i=this.pdfViewer.circleSettings.annotationSelectorSettings:i=this.pdfViewer.rectangleSettings.annotationSelectorSettings:i=this.pdfViewer.arrowSettings.annotationSelectorSettings,i},e.prototype.getAnnotations=function(e,t){var i,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape");if(this.pdfViewerBase.isStorageExceed&&(n=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape"]),n){var o=JSON.parse(n),s=this.pdfViewer.annotationModule.getPageCollection(o,e);i=o[s]?o[s].annotations:t}else i=t;return i},e.prototype.getRgbCode=function(e){e.match(/#([a-z0-9]+)/gi)||e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(e=this.pdfViewer.annotationModule.nameToHash(e));var i=e.split(",");return t.isNullOrUndefined(i[1])&&(i=(e=this.pdfViewer.annotationModule.getValue(e,"rgba")).split(",")),{r:parseInt(i[0].split("(")[1]),g:parseInt(i[1]),b:parseInt(i[2]),a:parseInt(i[3])}},e.prototype.saveImportedShapeAnnotations=function(e,t){var i=null,n=null;if(e.Author=this.pdfViewer.annotationModule.updateAnnotationAuthor("shape",e.Subject),e.VertexPoints){n=[];for(var o=0;o<e.VertexPoints.length;o++){var s={x:e.VertexPoints[o].X,y:e.VertexPoints[o].Y};n.push(s)}}e.Bounds&&!0===e.EnableShapeLabel&&(e.LabelBounds=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBoundsFromLoadedDocument(e.Bounds),e.LabelBorderColor=e.LabelBorderColor?e.LabelBorderColor:e.StrokeColor,e.FontColor=e.FontColor?e.FontColor:e.StrokeColor,e.LabelFillColor=e.LabelFillColor?e.LabelFillColor:e.FillColor,e.FontSize=e.FontSize?e.FontSize:16,e.LabelSettings=e.LabelSettings?e.LabelSettings:this.pdfViewer.shapeLabelSettings),e.AnnotationSettings=e.AnnotationSettings?e.AnnotationSettings:this.pdfViewer.annotationModule.updateAnnotationSettings(e),e.allowedInteractions=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e),i={id:"shape",shapeAnnotationType:e.ShapeAnnotationType,author:e.Author,allowedInteractions:e.allowedInteractions,modifiedDate:e.ModifiedDate,subject:e.Subject,note:e.Note,strokeColor:e.StrokeColor,fillColor:e.FillColor,opacity:e.Opacity,thickness:e.Thickness,rectangleDifference:e.RectangleDifference,borderStyle:e.BorderStyle,borderDashArray:e.BorderDashArray,rotateAngle:e.RotateAngle,isCloudShape:e.IsCloudShape,cloudIntensity:e.CloudIntensity,vertexPoints:n,lineHeadStart:e.LineHeadStart,lineHeadEnd:e.LineHeadEnd,isLocked:e.IsLocked,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,modifiedDate:e.ModifiedDate,author:e.Author},annotName:e.AnnotName,bounds:{left:e.Bounds.X,top:e.Bounds.Y,width:e.Bounds.Width,height:e.Bounds.Height,right:e.Bounds.Right,bottom:e.Bounds.Bottom},labelContent:e.LabelContent,enableShapeLabel:e.EnableShapeLabel,labelFillColor:e.LabelFillColor,labelBorderColor:e.LabelBorderColor,fontColor:e.FontColor,fontSize:e.FontSize,labelBounds:e.LabelBounds,annotationSelectorSettings:this.getSettings(e),labelSettings:e.LabelSettings,annotationSettings:e.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(e),isPrint:e.IsPrint,isCommentLock:e.IsCommentLock},this.pdfViewer.annotationModule.storeAnnotations(t,i,"_annotations_shape")},e.prototype.updateShapeAnnotationCollections=function(e,t){var i=null;if(e.VertexPoints){i=[];for(var n=0;n<e.VertexPoints.length;n++){var o={x:e.VertexPoints[n].X,y:e.VertexPoints[n].Y};i.push(o)}}return e.Bounds&&!0===e.EnableShapeLabel&&(e.LabelBounds=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBoundsFromLoadedDocument(e.Bounds),e.LabelBorderColor=e.LabelBorderColor?e.LabelBorderColor:e.StrokeColor,e.FontColor=e.FontColor?e.FontColor:e.StrokeColor,e.LabelFillColor=e.LabelFillColor?e.LabelFillColor:e.FillColor,e.FontSize=e.FontSize?e.FontSize:16,e.LabelSettings=e.LabelSettings?e.LabelSettings:this.pdfViewer.shapeLabelSettings),e.AnnotationSettings=e.AnnotationSettings?e.AnnotationSettings:this.pdfViewer.annotationModule.updateAnnotationSettings(e),e.IsLocked&&(e.AnnotationSettings.isLock=e.IsLocked),e.allowedInteractions=e.AllowedInteractions?e.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e),{id:"shape",shapeAnnotationType:e.ShapeAnnotationType,author:e.Author,allowedInteractions:e.allowedInteractions,modifiedDate:e.ModifiedDate,subject:e.Subject,note:e.Note,strokeColor:e.StrokeColor,fillColor:e.FillColor,opacity:e.Opacity,thickness:e.Thickness,rectangleDifference:e.RectangleDifference,borderStyle:e.BorderStyle,borderDashArray:e.BorderDashArray,rotateAngle:e.RotateAngle,isCloudShape:e.IsCloudShape,cloudIntensity:e.CloudIntensity,vertexPoints:i,lineHeadStart:e.LineHeadStart,lineHeadEnd:e.LineHeadEnd,isLocked:e.IsLocked,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,modifiedDate:e.ModifiedDate,author:e.Author},annotationId:e.AnnotName,bounds:{left:e.Bounds.X,top:e.Bounds.Y,width:e.Bounds.Width,height:e.Bounds.Height,right:e.Bounds.Right,bottom:e.Bounds.Bottom},labelContent:e.LabelContent,enableShapeLabel:e.EnableShapeLabel,labelFillColor:e.LabelFillColor,labelBorderColor:e.LabelBorderColor,fontColor:e.FontColor,fontSize:e.FontSize,labelBounds:e.LabelBounds,pageNumber:t,labelSettings:e.LabelSettings,annotationSettings:e.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(e),isPrint:e.IsPrint}},e.prototype.updateAddAnnotationDetails=function(e,t,i){i=t?t.offset?t.offset:{x:10,y:10}:(t={offset:{x:10,y:10},pageNumber:0,width:void 0,height:void 0}).offset;var n=null,o=null,s=null,a="",r=!1,l=null,d=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),u=this.pdfViewer.annotation.createGUID();"Line"==e?(n=this.pdfViewer.lineSettings.annotationSelectorSettings?this.pdfViewer.lineSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.lineSettings),o=this.pdfViewer.lineSettings.allowedInteractions?this.pdfViewer.lineSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="Line",l=t.vertexPoints?t.vertexPoints:[{x:i.x,y:i.y},{x:i.x+100,y:i.y}],t.width=t.width?t.width:1,t.height=t.height?t.height:1):"Arrow"==e?(n=this.pdfViewer.arrowSettings.annotationSelectorSettings?this.pdfViewer.arrowSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.arrowSettings),o=this.pdfViewer.arrowSettings.allowedInteractions?this.pdfViewer.arrowSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="Line",r=!0,l=t.vertexPoints?t.vertexPoints:[{x:i.x,y:i.y},{x:i.x+100,y:i.y}],t.width=t.width?t.width:1,t.height=t.height?t.height:1):"Rectangle"==e?(n=this.pdfViewer.rectangleSettings.annotationSelectorSettings?this.pdfViewer.rectangleSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.rectangleSettings),o=this.pdfViewer.rectangleSettings.allowedInteractions?this.pdfViewer.rectangleSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="Square",t.width=t.width?t.width:150,t.height=t.height?t.height:75):"Circle"==e?(n=this.pdfViewer.circleSettings.annotationSelectorSettings?this.pdfViewer.circleSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.circleSettings),o=this.pdfViewer.circleSettings.allowedInteractions?this.pdfViewer.circleSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="Circle",t.width=t.width?t.width:100,t.height=t.height?t.height:90):"Polygon"==e&&(n=this.pdfViewer.polygonSettings.annotationSelectorSettings?this.pdfViewer.polygonSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.polygonSettings),o=this.pdfViewer.polygonSettings.allowedInteractions?this.pdfViewer.polygonSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,a="Polygon",l=t.vertexPoints?t.vertexPoints:[{x:i.x,y:i.y},{x:i.x+42,y:i.y-29},{x:i.x+89,y:i.y-1},{x:i.x+78,y:i.y+42},{x:i.x+11,y:i.y+42},{x:i.x,y:i.y}],t.width=t.width?t.width:1,t.height=t.height?t.height:1),s.isLock=!!t.isLock&&t.isLock,s.minHeight=t.minHeight?t.minHeight:0,s.minWidth=t.minWidth?t.minWidth:0,s.maxWidth=t.maxWidth?t.maxWidth:0,s.maxHeight=t.maxHeight?t.maxHeight:0,l&&(l=this.pdfViewer.annotation.getVertexPointsXY(l));var M=[],p={AllowedInteractions:t.allowedInteractions?t.allowedInteractions:o,AnnotName:u,AnnotType:"shape",AnnotationSelectorSettings:t.annotationSelectorSettings?t.annotationSelectorSettings:n,AnnotationSettings:s,Author:t.author?t.author:"Guest",BorderDashArray:t.borderDashArray?t.borderDashArray:0,BorderStyle:"Solid",Bounds:{X:i.x,Y:i.y,Width:t.width,Height:t.height,Left:i.x,Top:i.y,Location:{X:i.x,Y:i.y},Size:{Height:t.height,IsEmpty:!1,Width:t.width}},CloudIntensity:0,Comments:null,CustomData:t.customData?t.customData:null,CreatedDate:d,EnableShapeLabel:!1,ExistingCustomData:null,FillColor:t.fillColor?t.fillColor:"#ffffff00",FontColor:null,FontSize:0,IsCloudShape:!1,IsCommentLock:!1,IsLocked:!!t.isLock&&t.isLock,IsPrint:!t.isPrint||t.isPrint,LabelBorderColor:null,LabelBounds:{X:0,Y:0,Width:0,Height:0},LabelContent:null,LabelFillColor:null,LabelSettings:null,LineHeadEnd:t.lineHeadStartStyle?t.lineHeadStartStyle:r?"ClosedArrow":"None",LineHeadStart:t.lineHeadEndStyle?t.lineHeadEndStyle:r?"ClosedArrow":"None",ModifiedDate:"",Note:"",Opacity:t.opacity?t.opacity:1,RectangleDifference:null,RotateAngle:"RotateAngle0",ShapeAnnotationType:a,State:"",StateModel:"",StrokeColor:t.strokeColor?t.strokeColor:"#ff0000",Subject:e.toString(),Thickness:t.thickness?t.thickness:1,VertexPoints:l};return M[0]=p,{shapeAnnotation:M}},e}(),At=function(){function t(e,t){this.isStampAddMode=!1,this.stampPageNumber=[],this.isAddAnnotationProgramatically=!1,this.dynamicText="",this.pdfViewer=e,this.pdfViewerBase=t}return t.prototype.renderStampAnnotations=function(e,t,i,n){for(var o=!1,s=0;s<this.stampPageNumber.length;s++)if(this.stampPageNumber[s]===t){o=!0;break}if(n&&(o=!1),e&&!o){this.stampPageNumber.push(t);for(var a=this,r=0;r<e.length;r++)!function(o){var s=e[o];s.annotationAddMode=a.pdfViewer.annotationModule.findAnnotationMode(s,t,s.AnnotType);var r=s.Apperarance,l=s.Rect,d=s.Opacity,u=(s.AnnotationSelectorSettings,parseFloat(e[o].pageNumber));isNaN(u)&&(u=e[o].PageNumber);var M=s.IsDynamic;document.getElementById(a.pdfViewer.element.id+"_pageDiv_"+u);if(s.AnnotationSettings=s.AnnotationSettings?s.AnnotationSettings:a.pdfViewer.annotationModule.updateSettings(a.pdfViewer.stampSettings),M&&s.Subject&&"Draft"!==s.Subject){a.retrieveDynamicStampAnnotation(s.Subject),a.isExistingStamp=!0;for(var p=a.calculateImagePosition(l,!0),h=s.RotateAngle,L=0;L<r.length;L++){var w=r[L];if("string"===w.type&&void 0!==w.text){var c=void 0;2===(c=n?w.text:w.text.split("(")[1].split(")")[0]).split("(").length?c.split("(")[1].split(")")[0].toLowerCase()!==s.Subject.toLowerCase()&&(a.dynamicText+=c.split("(")[1].split(")")[0]):c.toLowerCase()!==s.Subject.toLowerCase()&&(a.dynamicText+=c)}}a.renderStamp(p.left,p.top,p.width,p.height,u,d,h,i,s,!0)}else if(s.Subject){a.retrievestampAnnotation(s.Subject),a.isExistingStamp=!0;var p=a.calculateImagePosition(l,!0),h=s.RotateAngle;a.renderStamp(p.left,p.top,p.width,p.height,u,d,h,i,s),a.isExistingStamp=!1}else if(r)for(var C=0;C<r.length;C++)!function(e){var t=r[e],n=t.imagedata,o=(t.matrix,t.CreationDate),M=t.ModifiedDate,p=t.RotateAngle;if(n){var h=new Image,L=a;h.onload=function(){if(l){var e=parseFloat(l.y?l.y:l.Y);e<0&&(l.Y=.75*(L.pdfViewerBase.pageSize[u].height+e))}var t=L.calculateImagePosition(l,!0);s.AnnotationSettings=s.AnnotationSettings?s.AnnotationSettings:L.pdfViewer.customStampSettings.annotationSettings,L.renderCustomImage(t,u,h,o,M,p,d,i,!0,s)},h.src=n}}(C)}(r)}},t.prototype.moveStampElement=function(e,t,i){var n=this.pdfViewerBase.getZoomFactor();e/=n,t/=n;var o="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.stampSettings.author?this.pdfViewer.stampSettings.author:"Guest";if(this.pdfViewerBase.isDynamicStamp)if(this.pdfViewer.dateTimeFormat){var s=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();this.dynamicText="By "+o+" at "+s.split(" ")[1]+s.split(" ")[2]+" , "+s.split(" ")[0]+" "}else{var a=(new Date).toString().split(" ").splice(1,3).join(" "),r=(new Date).toLocaleTimeString();this.dynamicText="By "+o+" at "+r+" , "+a+" "}var l,d=this.currentStampAnnotation;return d&&"Image"===d.shapeAnnotationType?l={id:"stamp"+this.pdfViewerBase.customStampCount,bounds:{x:e,y:t,width:d.bounds.width,height:d.bounds.height},pageIndex:i,data:d.data,modifiedDate:d.modifiedDate,shapeAnnotationType:"Image",opacity:d.opacity,rotateAngle:d.RotationAngle,annotName:d.annotationName,comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:d.author}}:d&&(l={id:"stamp"+this.pdfViewerBase.customStampCount,bounds:{x:e,y:t,width:d.width,height:d.height},pageIndex:i,data:d.pathdata,shapeAnnotationType:"Stamp",strokeColor:d.strokeColor,fillColor:d.fillColor,opacity:.5,stampFillColor:d.stampFillColor,stampStrokeColor:d.stampStrokeColor,rotateAngle:d.RotateAngle,isDynamicStamp:this.pdfViewerBase.isDynamicStamp,dynamicText:this.dynamicText,subject:d.iconName,annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings}),this.pdfViewerBase.currentSignatureAnnot&&(l="SignatureText"===(d=this.pdfViewerBase.currentSignatureAnnot).shapeAnnotationType?{id:"sign"+this.pdfViewerBase.signatureCount,bounds:{x:e,y:t,width:d.bounds.width,height:d.bounds.height},pageIndex:i,data:d.data,modifiedDate:"",shapeAnnotationType:"SignatureText",thickness:d.thickness,strokeColor:d.strokeColor,opacity:d.opacity,signatureName:d.signatureName,fontFamily:d.fontFamily,fontSize:d.bounds.height/2}:"SignatureImage"===d.shapeAnnotationType?{id:"sign"+this.pdfViewerBase.signatureCount,bounds:{x:e,y:t,width:d.bounds.width,height:d.bounds.height},pageIndex:i,data:d.data,modifiedDate:"",shapeAnnotationType:"SignatureImage",thickness:d.thickness,strokeColor:d.strokeColor,opacity:d.opacity,signatureName:d.signatureName}:{id:"sign"+this.pdfViewerBase.signatureCount,bounds:{x:e,y:t,width:d.bounds.width,height:d.bounds.height},pageIndex:i,data:d.data,shapeAnnotationType:"HandWrittenSignature",thickness:d.thickness,strokeColor:d.strokeColor,opacity:d.opacity,signatureName:d.signatureName}),l},t.prototype.ConvertPointToPixel=function(e){return e*(96/72)},t.prototype.calculateImagePosition=function(e,t){var i=parseFloat(e.x?e.x:e.X),n=parseFloat(e.y?e.y:e.Y),o=parseFloat(e.width?e.width:e.Width),s=parseFloat(e.height?e.height:e.Height);return t?{width:this.ConvertPointToPixel(o),height:this.ConvertPointToPixel(s),left:this.ConvertPointToPixel(i),top:this.ConvertPointToPixel(n)}:{width:o,height:s,left:i,top:n}},t.prototype.createCustomStampAnnotation=function(e,t){var i=this,n=this.pdfViewerBase.currentPageNumber-1,o=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+n),s=new Image,a=this;s.onload=function(){var e=i.pdfViewerBase.getZoomFactor(),r=i.pdfViewer.customStampSettings.width>0?i.pdfViewer.customStampSettings.width:100,l=i.pdfViewer.customStampSettings.height>0?i.pdfViewer.customStampSettings.height:100,d=0,u=0,M={width:r,height:l,left:d=i.pdfViewer.customStampSettings.left>0&&i.pdfViewer.customStampSettings.left<parseFloat(o.style.width)?i.pdfViewer.customStampSettings.left:(parseFloat(o.style.width)/2-r/2)/e,top:u=i.pdfViewer.customStampSettings.top>0&&i.pdfViewer.customStampSettings.top<parseFloat(o.style.height)?i.pdfViewer.customStampSettings.top:(parseFloat(o.style.height)/2-l/2)/e},p=(new Date).toLocaleDateString(),h=i.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime();a.renderCustomImage(M,n,s,p,h,0,1,null,null,null,t)},s.src=e},t.prototype.renderStamp=function(e,t,n,o,s,a,r,l,d,u){var M="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.stampSettings.author?this.pdfViewer.stampSettings.author:"Guest";if(this.pdfViewerBase.isDynamicStamp){var p=(new Date).toString().split(" ").splice(1,3).join(" "),h=(new Date).toLocaleTimeString();this.dynamicText="By "+M+" at "+h+" , "+p+" "}u&&(this.dynamicText+=" ",this.pdfViewerBase.isDynamicStamp=!0);var L,w=null,c=(d&&d.annotationAddMode,this.currentStampAnnotation);if(c){if(null!==n&&null!==o){c.width=n,c.height=o,c.Opacity=a,c.RotateAngle=r;D=d.AnnotName;c.AnnotName=D;var C=d.State;c.State=C;var g=d.AnnotationSettings;c.AnnotationSettings=g||this.pdfViewer.annotationModule.updateAnnotationSettings(c);var m=d.AnnotationSelectorSettings;c.AnnotationSelectorSettings=m||this.pdfViewer.annotationSelectorSettings;var f=d.ModifiedDate;c.ModifiedDate=f;var y=d.StateNodel;c.StateModel=y;var j=d.IsCommentLock;c.IsCommentLock=j;var S=d.Note;c.Note=S;var A=d.Author;c.Author=A;var T=this.pdfViewer.annotation.getCustomData(d);c.allowedInteractions=d.AllowedInteractions?d.AllowedInteractions:d.allowedInteractions?d.allowedInteractions:["None"],c.CustomData=T;var x=!0;x="Imported Annotation"===c.annotationAddMode?d.IsPrint:d.AnnotationSettings.isPrint,c.isPrint=x,null===c.Author&&(c.Author="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.stampSettings.author?this.pdfViewer.stampSettings.author:"Guest");var N=d.Comments;c.Comments=this.pdfViewer.annotationModule.getAnnotationComments(N,d,A)}else{var D=this.pdfViewer.annotation.createGUID(),b=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("stamp",s+1);b&&(document.getElementById(b).id=D),c.AnnotationSettings=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.stampSettings),c.AnnotName=D,c.Comments=[],c.State="",c.StateModel="",c.Note="",c.Opacity=1,c.RotateAngle=0,c.ModifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),c.Author="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.stampSettings.author?this.pdfViewer.stampSettings.author:"Guest"}var I=i.processPathData(c.pathdata),v=i.splitArrayCollection(I),E=d?d.annotationAddMode:"UI Drawn Annotation";if(c.AnnotationSelectorSettings=c.AnnotationSelectorSettings?c.AnnotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,L={id:"stamp"+this.pdfViewerBase.customStampCount,bounds:{x:e,y:t,width:c.width,height:c.height},pageIndex:s,data:c.pathdata,modifiedDate:c.ModifiedDate,shapeAnnotationType:"Stamp",strokeColor:c.strokeColor,fillColor:c.fillColor,opacity:c.Opacity,stampFillColor:c.stampFillColor,stampStrokeColor:c.stampStrokeColor,rotateAngle:c.RotateAngle,isDynamicStamp:this.pdfViewerBase.isDynamicStamp,dynamicText:this.dynamicText,annotName:c.AnnotName,notes:c.Note,comments:c.Comments,review:{state:c.State,stateModel:c.StateModel,modifiedDate:c.ModifiedDate,author:c.Author},subject:c.iconName,annotationSelectorSettings:c.AnnotationSelectorSettings,annotationSettings:c.AnnotationSettings,allowedInteractions:c.allowedInteractions,annotationAddMode:E,isPrint:c.isPrint,isCommentLock:c.IsCommentLock},w={stampAnnotationType:"path",author:c.Author,modifiedDate:c.ModifiedDate,subject:c.Subject,note:c.Note,strokeColor:c.strokeColor,fillColor:c.fillColor,opacity:c.Opacity,stampFillcolor:c.stampFillColor,rotateAngle:c.RotateAngle,creationDate:c.creationDate,pageNumber:s,icon:c.iconName,stampAnnotationPath:v,randomId:"stamp"+this.pdfViewerBase.customStampCount,isDynamicStamp:this.pdfViewerBase.isDynamicStamp,dynamicText:this.dynamicText,bounds:{left:e,top:t,width:c.width,height:c.height},annotName:c.AnnotName,comments:c.Comments,review:{state:c.State,stateModel:c.StateModel,author:c.Author,modifiedDate:c.ModifiedDate},shapeAnnotationType:"stamp",annotationSelectorSettings:this.getSettings(c),annotationSettings:c.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(c),allowedInteractions:c.allowedInteractions,isPrint:c.isPrint,isCommentLock:c.IsCommentLock,isMaskedImage:c.IsMaskedImage},this.storeStampInSession(s,w),this.isAddAnnotationProgramatically){var V={opacity:L.opacity,borderColor:L.strokeColor,borderWidth:L.thickness,author:c.author,subject:c.subject,modifiedDate:c.modifiedDate,fillColor:L.fillColor,fontSize:L.fontSize,width:L.bounds.width,height:L.bounds.height,fontColor:L.fontColor,fontFamily:L.fontFamily,defaultText:L.dynamicText,fontStyle:L.font,textAlignment:L.textAlign};this.pdfViewer.fireAnnotationAdd(L.pageIndex,L.annotName,"Stamp",L.bounds,V)}this.pdfViewer.add(L),l=void 0!=l&&null!=l?l:document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+s),this.pdfViewer.renderDrawing(l,s),this.pdfViewerBase.stampAdded&&this.pdfViewer.annotation.addAction(s,null,L,"Addition","",L,L),this.pdfViewerBase.stampAdded=!1,this.isExistingStamp||(c.creationDate=(new Date).toLocaleDateString(),c.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime())}this.resetAnnotation()},t.prototype.getSettings=function(e){var t=this.pdfViewer.annotationSelectorSettings;return e.AnnotationSelectorSettings?t=e.AnnotationSelectorSettings:this.pdfViewer.stampSettings.annotationSelectorSettings&&(t=this.pdfViewer.stampSettings.annotationSelectorSettings),t},t.prototype.resetAnnotation=function(){this.pdfViewerBase.isDynamicStamp=!1,this.dynamicText="",this.currentStampAnnotation=null,this.pdfViewerBase.customStampCount+=1},t.prototype.updateDeleteItems=function(e,t,n){this.pdfViewer.isDocumentEdited=!0;var o=null,s=!1;if(t.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),t.author="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.stampSettings.author?this.pdfViewer.stampSettings.author:"Guest",n){var a=this.pdfViewer.annotation.createGUID(),r=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("stamp",e+1);r&&(document.getElementById(r).id=a),t.annotName=a,t.Comments=[],t.State="",t.StateModel="",t.Note="",t.Opacity=1,t.RotateAngle=0}"Stamp"===t.shapeAnnotationType&&(t.isPrint=this.pdfViewer.stampSettings.isPrint);var l=this.pdfViewer.stampSettings.annotationSelectorSettings?this.pdfViewer.stampSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,d=this.pdfViewer.stampSettings.allowedInteractions?this.pdfViewer.stampSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions;if("Image"===t.shapeAnnotationType?(t.Author="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.customStampSettings.author?this.pdfViewer.customStampSettings.author:"Guest",t.isPrint=this.pdfViewer.customStampSettings.isPrint,o={stampAnnotationType:"image",author:t.author,modifiedDate:t.modifiedDate,subject:"",note:"",strokeColor:"",fillColor:"",opacity:n,rotateAngle:"0",creationDate:t.currentDate,pageNumber:e,icon:"",stampAnnotationPath:t.data,randomId:"stamp"+this.pdfViewerBase.customStampCount,bounds:{left:t.bounds.x,top:t.bounds.y,width:t.bounds.width,height:t.bounds.height},stampFillcolor:"",isDynamicStamp:!1,annotName:t.annotName,comments:[],review:{state:"",stateModel:"",author:t.author,modifiedDate:t.modifiedDate},shapeAnnotationType:"stamp",annotationSelectorSettings:l,annotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.customStampSettings),customData:this.pdfViewer.annotationModule.getData("image"),isPrint:t.isPrint,allowedInteractions:d,isCommentLock:!1,isMaskedImage:t.isMaskedImage}):o=t.stampAnnotationType?{stampAnnotationType:t.stampAnnotationType,author:t.author,modifiedDate:t.modifiedDate,subject:t.Subject,note:t.Note,strokeColor:t.strokeColor,fillColor:t.fillColor,opacity:t.opacity,stampFillcolor:t.stampFillcolor,rotateAngle:t.rotateAngle,creationDate:t.creationDate,pageNumber:t.pageNumber,icon:t.icon,stampAnnotationPath:t.stampAnnotationPath,randomId:t.randomId,isDynamicStamp:t.isDynamicStamp,dynamicText:t.dynamicText,bounds:{left:t.bounds.left,top:t.bounds.top,width:t.bounds.width,height:t.bounds.height},annotName:t.annotName,comments:t.Comments,review:{state:t.State,stateModel:t.StateModel,author:t.author,modifiedDate:t.ModifiedDate},shapeAnnotationType:"stamp",annotationSelectorSettings:l,annotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.stampSettings),customData:this.pdfViewer.annotationModule.getData(t.stampAnnotationType),isPrint:t.isPrint,allowedInteractions:d,isCommentLock:t.isCommentLock,isMaskedImage:t.isMaskedImage}:{stampAnnotationType:t.shapeAnnotationType,author:t.author,modifiedDate:t.modifiedDate,subject:t.subject,note:t.notes,strokeColor:t.strokeColor,fillColor:t.fillColor,opacity:t.opacity,stampFillcolor:t.stampFillColor,rotateAngle:t.rotateAngle,creationDate:t.creationDate,pageNumber:t.pageIndex,icon:t.subject,stampAnnotationPath:t.data,randomId:t.id,isDynamicStamp:t.isDynamicStamp,dynamicText:t.dynamicText,shapeAnnotationType:"stamp",bounds:{left:t.bounds.x,top:t.bounds.y,width:t.bounds.width,height:t.bounds.height},annotName:t.annotName,comments:t.Comments,review:{state:t.State,stateModel:t.StateModel,author:t.author,modifiedDate:t.ModifiedDate},annotationSelectorSettings:l,annotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.stampSettings),customData:this.pdfViewer.annotationModule.getData(t.shapeAnnotationType),isPrint:t.isPrint,allowedInteractions:d,isCommentLock:t.isCommentLock,isMaskedImage:t.isMaskedImage},n){if("Image"!==t.shapeAnnotationType){var u=i.processPathData(t.data),M=i.splitArrayCollection(u);o.stampAnnotationPath=M}if(t.creationDate=(new Date).toLocaleDateString(),o.bounds.width=t.wrapper.actualSize.width,o.bounds.height=t.wrapper.actualSize.height,o.bounds.left=t.wrapper.bounds.x,o.bounds.top=t.wrapper.bounds.y,o.opacity=n,this.pdfViewerBase.stampAdded){this.storeStampInSession(e,o),s=!0;var p={left:o.bounds.left,top:o.bounds.top,width:o.bounds.width,height:o.bounds.height};this.pdfViewer.isDocumentEdited=!0;var h={opacity:o.opacity,author:o.author,modifiedDate:o.modifiedDate};"Image"===t.shapeAnnotationType?(this.pdfViewerBase.stampAdded=!1,this.pdfViewer.fireAnnotationAdd(o.pageNumber,o.annotName,"Image",p,h)):this.pdfViewer.fireAnnotationAdd(o.pageNumber,o.annotName,"Stamp",p,h),this.pdfViewer.annotation.addAction(e,null,t,"Addition","",t,o)}}s||this.storeStampInSession(e,o)},t.prototype.renderCustomImage=function(e,t,i,n,o,s,a,r,l,d,u){var M,p,h,L,w=null,c=this.pdfViewer.customStampSettings.left>0&&this.pdfViewer.customStampSettings.top>0,C=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.customStampSettings),g=this.pdfViewer.stampSettings.allowedInteractions?this.pdfViewer.stampSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions;l?(p=d.AnnotName,h=d.Author,L=d.IsCommentLock,C=d.AnnotationSettings?d.AnnotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.customStampSettings),g=d.AllowedInteractions?d.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(d),null===h&&(h="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.customStampSettings.author?this.pdfViewer.customStampSettings.author:"Guest")):(p=this.pdfViewer.annotation.createGUID(),h="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.customStampSettings.author?this.pdfViewer.customStampSettings.author:"Guest",L=!1),o||(o=d.ModifiedDate?d.ModifiedDate:(new Date).toLocaleString());var m=d?d.annotationAddMode:"UI Drawn Annotation ",f=!0;f=l?"Imported Annotation"===d.annotationAddMode?d.IsPrint:d.AnnotationSettings.isPrint:this.pdfViewer.customStampSettings.isPrint,M={id:"stamp"+this.pdfViewerBase.customStampCount,allowedInteractions:g,bounds:{x:e.left,y:e.top,width:e.width,height:e.height},pageIndex:t,data:i.src,modifiedDate:o,shapeAnnotationType:"Image",opacity:a,rotateAngle:s,annotName:p,comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:h},annotationSettings:C,annotationAddMode:m,signatureName:u,isPrint:f,isCommentLock:L},this.currentStampAnnotation=M;var y=this.pdfViewer.stampSettings.annotationSelectorSettings?this.pdfViewer.stampSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings;if(l||c){if(!d){this.isStampAnnotSelected=!1,(d=M).Note="",d.State="",d.StateModel="";var j=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("stamp",t+1);j&&(document.getElementById(j).id=p)}w={stampAnnotationType:"image",author:h,allowedInteractions:g,modifiedDate:o,subject:"",note:d.Note,strokeColor:"",fillColor:"",opacity:a,rotateAngle:"0",creationDate:n,pageNumber:t,icon:"",stampAnnotationPath:i.src,randomId:"stamp"+this.pdfViewerBase.customStampCount,bounds:{left:e.left,top:e.top,width:e.width,height:e.height},stampFillcolor:"",isDynamicStamp:!1,annotName:p,comments:this.pdfViewer.annotationModule.getAnnotationComments(d.Comments,d,d.Author),review:{state:d.State,stateModel:d.StateModel,author:h,modifiedDate:o},shapeAnnotationType:"stamp",annotationSelectorSettings:y,annotationSettings:C,customData:this.pdfViewer.annotation.getCustomData(d),isPrint:f,isCommentLock:L,isMaskedImage:d.IsMaskedImage},this.storeStampInSession(t,w),M.comments=this.pdfViewer.annotationModule.getAnnotationComments(d.Comments,d,d.Author),M.review={state:d.State,stateModel:d.StateModel,author:h,modifiedDate:o},this.pdfViewer.add(M),r=void 0!=r&&null!=r?r:document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+t),this.pdfViewer.renderDrawing(r,t),this.pdfViewerBase.stampAdded&&this.pdfViewer.annotation.addAction(t,null,M,"Addition","",M,M)}this.pdfViewerBase.customStampCount+=1},t.prototype.retrieveDynamicStampAnnotation=function(e){var t;if(e){switch(e.trim()){case"Revised":t={iconName:"Revised",pathdata:"M19.68,21.22a3.94,3.94,0,0,1-1.1-1.9L16,11.87l-.21-.64a20.77,20.77,0,0,0,2.11-.58,7.24,7.24,0,0,0,2-1.09,5.65,5.65,0,0,0,1.72-2.12,5.4,5.4,0,0,0,.52-2.2A4.15,4.15,0,0,0,19.1,1.05a14.58,14.58,0,0,0-4.72-.6H5.31v.86a7,7,0,0,1,2,.33c.3.14.45.48.45,1a6.1,6.1,0,0,1-.14,1.08l-.21.8L3.31,19.32a3.35,3.35,0,0,1-.94,1.78,3.58,3.58,0,0,1-1.74.57v.86h9.83v-.86a6.22,6.22,0,0,1-2-.35c-.29-.15-.43-.52-.43-1.11,0-.1,0-.21,0-.31a2.36,2.36,0,0,1,0-.28l.28-1.14,1.95-6.86h.93l3.56,10.91h6.25v-.88A3.05,3.05,0,0,1,19.68,21.22ZM13.29,10.31a14,14,0,0,1-2.63.23l2-7.56a2.67,2.67,0,0,1,.52-1.17,1.4,1.4,0,0,1,1-.3,2.74,2.74,0,0,1,2.33.91,3.72,3.72,0,0,1,.69,2.3,6.4,6.4,0,0,1-.49,2.52,6.72,6.72,0,0,1-1.06,1.82A4.11,4.11,0,0,1,13.29,10.31ZM26,.45H43.74l-1.4,6.27-.88-.15a6,6,0,0,0-.78-3.4c-.84-1.12-2.54-1.69-5.11-1.69a2.9,2.9,0,0,0-1.68.32A2.34,2.34,0,0,0,33.26,3l-1.95,7.33a13.55,13.55,0,0,0,4.48-.56c.68-.32,1.44-1.3,2.27-2.92l.91.11-2.44,9-.91-.16a7.27,7.27,0,0,0,.09-.82q0-.35,0-.57a2.69,2.69,0,0,0-1-2.4A7.57,7.57,0,0,0,31,11.38l-2.17,8c0,.2-.09.38-.12.57a2.62,2.62,0,0,0,0,.43.92.92,0,0,0,.35.74,2.54,2.54,0,0,0,1.49.29,13.84,13.84,0,0,0,5.11-.84A9.85,9.85,0,0,0,40.73,16l.81.14-1.95,6.42h-18v-.9a3.43,3.43,0,0,0,1.42-.53A3.42,3.42,0,0,0,24,19.32L28,4.51c.1-.37.18-.72.25-1a4.23,4.23,0,0,0,.09-.78c0-.56-.15-.91-.44-1.06a6.85,6.85,0,0,0-2-.34ZM63.4,3.37,51,23.15H49.9L47.39,6.34a17.25,17.25,0,0,0-.93-4.24c-.25-.43-.93-.7-2.05-.79V.45h9.86v.86a5.47,5.47,0,0,0-1.72.19,1.14,1.14,0,0,0-.81,1.16,3,3,0,0,0,0,.31l0,.32L53.5,16.43l6.24-9.85c.49-.79.94-1.57,1.33-2.36a4.45,4.45,0,0,0,.6-1.85.88.88,0,0,0-.61-.9,6.11,6.11,0,0,0-1.52-.16V.45h6.34v.86a3.88,3.88,0,0,0-1.16.5A5.73,5.73,0,0,0,63.4,3.37ZM70.08,20c0,.11,0,.22,0,.31,0,.56.15.91.45,1.06a6.39,6.39,0,0,0,1.95.35v.86H62.63v-.86a3.58,3.58,0,0,0,1.74-.57,3.35,3.35,0,0,0,.94-1.78l4-14.81q.18-.63.27-1a3.78,3.78,0,0,0,.09-.75c0-.56-.16-.91-.47-1.06a7,7,0,0,0-2-.34V.45h9.83v.86a3.61,3.61,0,0,0-1.75.58,3.37,3.37,0,0,0-.91,1.78L70.4,18.48l-.26,1.14Zm19.26-7.23a6.37,6.37,0,0,1,1.07,3.62,6.58,6.58,0,0,1-2.06,4.71,7.54,7.54,0,0,1-5.65,2.1A10.15,10.15,0,0,1,80.89,23a11.42,11.42,0,0,1-1.8-.49l-.83-.3-.58-.2a2,2,0,0,0-.38,0,1,1,0,0,0-.78.26,3.89,3.89,0,0,0-.52.92H75l1.19-7.4,1,.07a14.63,14.63,0,0,0,.28,2.3,5.27,5.27,0,0,0,2.79,3.44,4.73,4.73,0,0,0,2.06.44,3.85,3.85,0,0,0,3.07-1.26,4.39,4.39,0,0,0,1.09-2.94q0-2.09-4.05-5.25c-2.7-2.22-4-4.26-4-6.14a6.31,6.31,0,0,1,1.78-4.53,6.51,6.51,0,0,1,5-1.87,9.67,9.67,0,0,1,1.82.18A6.54,6.54,0,0,1,88,.45l.84.28.56.13a2.59,2.59,0,0,0,.52.06,1.4,1.4,0,0,0,.88-.24,2.2,2.2,0,0,0,.53-.6h1L91,6.69l-.85-.12L90,5.49a6,6,0,0,0-1-2.62,3.82,3.82,0,0,0-3.38-1.73A3,3,0,0,0,82.9,2.53a3.6,3.6,0,0,0-.58,2,3.44,3.44,0,0,0,.59,2,6,6,0,0,0,1,1l2.85,2.33A12.75,12.75,0,0,1,89.34,12.72ZM110.27,16l.81.14-2,6.42H90.85v-.86a3.66,3.66,0,0,0,1.74-.57,3.42,3.42,0,0,0,.93-1.78l4-14.81c.1-.37.18-.72.25-1a4.23,4.23,0,0,0,.09-.78c0-.56-.14-.91-.44-1.06a6.85,6.85,0,0,0-2-.34V.45h17.77l-1.4,6.27L111,6.57a6,6,0,0,0-.78-3.4c-.84-1.12-2.54-1.69-5.1-1.69a2.92,2.92,0,0,0-1.69.32A2.34,2.34,0,0,0,102.8,3l-2,7.33a13.55,13.55,0,0,0,4.48-.56c.69-.32,1.44-1.3,2.27-2.92l.92.11-2.45,9-.91-.16a7.27,7.27,0,0,0,.09-.82q0-.35,0-.57a2.69,2.69,0,0,0-1-2.4,7.57,7.57,0,0,0-3.79-.64l-2.17,8c0,.2-.09.38-.12.57a2.62,2.62,0,0,0,0,.43.92.92,0,0,0,.35.74,2.54,2.54,0,0,0,1.49.29,13.84,13.84,0,0,0,5.11-.84A9.81,9.81,0,0,0,110.27,16Zm22.65-13Q130.39.45,125.52.45h-9.58v.86a7,7,0,0,1,2,.34c.31.15.47.5.47,1.06a3.61,3.61,0,0,1-.09.74c-.06.29-.15.64-.26,1.06L114,19.31a3.18,3.18,0,0,1-1.15,1.91,3.57,3.57,0,0,1-1.53.45v.86h9.47a14.87,14.87,0,0,0,10.95-4.14,12,12,0,0,0,3.75-8.77A8.94,8.94,0,0,0,132.92,2.94ZM129,15.36q-2.62,6.06-8.52,6.05a2.46,2.46,0,0,1-1.42-.29,1.05,1.05,0,0,1-.4-.93,2.24,2.24,0,0,1,0-.34,2.65,2.65,0,0,1,.08-.43l4.55-16.67a2,2,0,0,1,.54-.92,2.2,2.2,0,0,1,1.44-.35,4.74,4.74,0,0,1,4.47,2.22,7.9,7.9,0,0,1,.83,3.9A19.32,19.32,0,0,1,129,15.36Z",opacity:1,strokeColor:"",fillColor:"#192760",width:127.47,height:55.84601,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Reviewed":t={iconName:"Reviewed",pathdata:"M17.37,18.25a3.47,3.47,0,0,1-1-1.67L14.17,10c0-.07-.1-.26-.19-.56A14.71,14.71,0,0,0,15.83,9a6.08,6.08,0,0,0,1.76-1A4.92,4.92,0,0,0,19.1,6.14a4.71,4.71,0,0,0,.46-1.93A3.65,3.65,0,0,0,16.86.52,12.83,12.83,0,0,0,12.72,0h-8V.75a6.62,6.62,0,0,1,1.72.3c.26.12.39.41.39.88a4.56,4.56,0,0,1-.13.94c0,.2-.1.44-.17.7L3,16.58a2.87,2.87,0,0,1-.82,1.56,3.15,3.15,0,0,1-1.53.51v.75H9.27v-.75a5.88,5.88,0,0,1-1.74-.31c-.25-.13-.37-.46-.37-1a2.53,2.53,0,0,1,0-.28,1.44,1.44,0,0,1,0-.24l.24-1,1.71-6H10l3.13,9.59h5.49v-.77A2.71,2.71,0,0,1,17.37,18.25ZM11.75,8.67a12.06,12.06,0,0,1-2.3.19L11.2,2.22a2.2,2.2,0,0,1,.46-1,1.19,1.19,0,0,1,.87-.27,2.41,2.41,0,0,1,2.05.8,3.29,3.29,0,0,1,.6,2A5.63,5.63,0,0,1,14.75,6a6.06,6.06,0,0,1-.93,1.59A3.65,3.65,0,0,1,11.75,8.67ZM22.9,0H38.52L37.29,5.51l-.78-.13a5.34,5.34,0,0,0-.68-3c-.74-1-2.24-1.48-4.49-1.48a2.68,2.68,0,0,0-1.49.27,2.09,2.09,0,0,0-.54,1L27.59,8.67a12.08,12.08,0,0,0,3.94-.5,5.69,5.69,0,0,0,2-2.56l.81.1-2.16,7.93-.79-.15c0-.27.06-.51.08-.71s0-.37,0-.5a2.34,2.34,0,0,0-.85-2.11A6.61,6.61,0,0,0,27.3,9.6l-1.91,7.08a4.91,4.91,0,0,0-.1.5,2,2,0,0,0,0,.38.83.83,0,0,0,.31.65,2.29,2.29,0,0,0,1.31.25,12.21,12.21,0,0,0,4.49-.73,8.69,8.69,0,0,0,4.51-4.09l.71.12L34.86,19.4H19.05v-.79a2.88,2.88,0,0,0,1.28-.47,2.94,2.94,0,0,0,.82-1.56l3.56-13q.13-.49.21-.9A3.26,3.26,0,0,0,25,2q0-.73-.39-.93A6.44,6.44,0,0,0,22.9.75ZM55.79,2.57,44.86,20h-.93L41.72,5.17a16.05,16.05,0,0,0-.81-3.73c-.22-.37-.82-.6-1.81-.69V0h8.67V.75a5,5,0,0,0-1.52.17,1,1,0,0,0-.7,1,2.53,2.53,0,0,0,0,.28l0,.27L47.09,14l5.48-8.66C53,4.69,53.4,4,53.75,3.32a4,4,0,0,0,.52-1.63.78.78,0,0,0-.54-.8A5.88,5.88,0,0,0,52.4.75V0H58V.75a3.55,3.55,0,0,0-1,.44A5.18,5.18,0,0,0,55.79,2.57ZM62,18.34a6,6,0,0,0,1.71.31v.75H55.12v-.75a3.15,3.15,0,0,0,1.53-.51,2.94,2.94,0,0,0,.82-1.56L61,3.57c.1-.37.18-.68.23-.93A2.81,2.81,0,0,0,61.34,2c0-.49-.13-.8-.41-.93a6.61,6.61,0,0,0-1.71-.3V0h8.63V.75a3.17,3.17,0,0,0-1.53.51,3,3,0,0,0-.8,1.57l-3.58,13-.22,1a2.74,2.74,0,0,0,0,.28,1.41,1.41,0,0,0,0,.28C61.64,17.9,61.78,18.21,62,18.34ZM69.13,0H84.75L83.52,5.51l-.78-.13a5.34,5.34,0,0,0-.68-3c-.74-1-2.24-1.48-4.49-1.48a2.68,2.68,0,0,0-1.49.27,2.09,2.09,0,0,0-.54,1L73.82,8.67a12.08,12.08,0,0,0,3.94-.5,5.69,5.69,0,0,0,2-2.56l.81.1L78.4,13.64l-.79-.15c0-.27.07-.51.08-.71s0-.37,0-.5a2.34,2.34,0,0,0-.85-2.11,6.61,6.61,0,0,0-3.33-.57l-1.91,7.08a4.91,4.91,0,0,0-.1.5,2,2,0,0,0,0,.38.83.83,0,0,0,.31.65,2.29,2.29,0,0,0,1.31.25,12.21,12.21,0,0,0,4.49-.73,8.69,8.69,0,0,0,4.51-4.09l.71.12L81.1,19.4H65v-.75a3.15,3.15,0,0,0,1.53-.51,2.94,2.94,0,0,0,.82-1.56l3.56-13q.14-.49.21-.9A3.26,3.26,0,0,0,71.24,2q0-.73-.39-.93a6.44,6.44,0,0,0-1.72-.3Zm39.15,2.83L100,20h-.84L97.41,5.85,90.67,20h-.84L87.58,3.13A3.83,3.83,0,0,0,87,1.23,2.84,2.84,0,0,0,85.33.71V0h8.06V.75A2.55,2.55,0,0,0,92.27,1a1.33,1.33,0,0,0-.66,1.31c0,.06,0,.13,0,.19s0,.15,0,.26l1.15,10.16,4.32-9a1,1,0,0,0,0-.27,3.33,3.33,0,0,0-.64-2.38A2.5,2.5,0,0,0,95.06.71V0h7.78V.71a2.9,2.9,0,0,0-1.4.34c-.27.19-.41.6-.41,1.24,0,.13,0,.32,0,.55,0,.4.08.88.14,1.47l1,8.47,4.51-9.42a7.12,7.12,0,0,0,.29-.74,2.48,2.48,0,0,0,.14-.79.9.9,0,0,0-.48-.93,3.25,3.25,0,0,0-1.34-.19V0h5.41V.71a2.34,2.34,0,0,0-1.1.35A4.56,4.56,0,0,0,108.28,2.83Zm16.45,10.81.71.12-1.71,5.64H107.66v-.75a3.15,3.15,0,0,0,1.53-.51,2.87,2.87,0,0,0,.82-1.56l3.57-13q.12-.49.21-.9a3.17,3.17,0,0,0,.08-.69q0-.73-.39-.93a6.44,6.44,0,0,0-1.72-.3V0h15.62l-1.23,5.51-.78-.13a5.26,5.26,0,0,0-.68-3C124,1.4,122.46.91,120.2.91a2.64,2.64,0,0,0-1.48.27,2.09,2.09,0,0,0-.55,1l-1.72,6.45a12,12,0,0,0,3.94-.5,5.62,5.62,0,0,0,2-2.56l.81.1L121,13.64l-.79-.15c0-.27.06-.51.07-.71s0-.37,0-.5a2.34,2.34,0,0,0-.86-2.11,6.57,6.57,0,0,0-3.32-.57l-1.91,7.08a5,5,0,0,0-.11.5,3.14,3.14,0,0,0,0,.38.8.8,0,0,0,.31.65,2.25,2.25,0,0,0,1.3.25,12.26,12.26,0,0,0,4.5-.73A8.67,8.67,0,0,0,124.73,13.64ZM144.64,2.19Q142.41,0,138.14,0h-8.42V.75a6.61,6.61,0,0,1,1.71.3c.28.13.41.44.41.93a2.81,2.81,0,0,1-.08.66c0,.25-.12.56-.23.93l-3.56,13a2.78,2.78,0,0,1-1,1.68,3.44,3.44,0,0,1-1.35.4v.75h8.32a13.06,13.06,0,0,0,9.63-3.64,10.49,10.49,0,0,0,3.3-7.7A7.87,7.87,0,0,0,144.64,2.19ZM141.2,13.1q-2.31,5.32-7.48,5.32a2.27,2.27,0,0,1-1.26-.25,1,1,0,0,1-.34-.82,1.62,1.62,0,0,1,0-.3,2.16,2.16,0,0,1,.08-.38l4-14.65a1.63,1.63,0,0,1,.47-.81A2,2,0,0,1,138,.91a4.16,4.16,0,0,1,3.93,1.95,7,7,0,0,1,.72,3.42A16.82,16.82,0,0,1,141.2,13.1Z",opacity:1,strokeColor:"",fillColor:"#192760",width:127.70402,height:55.84601,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Received":t={iconName:"Received",pathdata:"M18.17,8.76a5,5,0,0,0,1.57-1.93,5,5,0,0,0,.47-2A3.76,3.76,0,0,0,17.42,1,13,13,0,0,0,13.13.48H4.89v.78a6.49,6.49,0,0,1,1.77.31c.27.12.41.43.41.91a5.87,5.87,0,0,1-.13,1c-.05.2-.12.44-.19.72L3.06,17.64a3,3,0,0,1-.84,1.61,3.36,3.36,0,0,1-1.59.53v.77H9.57v-.77a6.17,6.17,0,0,1-1.8-.32c-.26-.14-.39-.48-.39-1a2.46,2.46,0,0,1,0-.28,1.78,1.78,0,0,1,0-.26l.25-1,1.78-6.25h.84l3.24,9.92h5.66v-.8A2.76,2.76,0,0,1,18,19.36a3.57,3.57,0,0,1-1-1.72l-2.31-6.78c0-.07-.09-.27-.19-.58.87-.2,1.51-.38,1.92-.52A6.56,6.56,0,0,0,18.17,8.76Zm-2.93-2.1a6.19,6.19,0,0,1-1,1.65,3.85,3.85,0,0,1-2.14,1.14,12.92,12.92,0,0,1-2.39.2l1.81-6.87A2.5,2.5,0,0,1,12,1.72a1.27,1.27,0,0,1,.9-.27,2.5,2.5,0,0,1,2.12.83,3.35,3.35,0,0,1,.62,2.09A5.81,5.81,0,0,1,15.24,6.66ZM30.3,2.78,28.52,9.45a12.53,12.53,0,0,0,4.08-.51,5.91,5.91,0,0,0,2-2.66l.84.11-2.23,8.2-.82-.15c0-.28.07-.53.08-.74a5.17,5.17,0,0,0,0-.52A2.43,2.43,0,0,0,31.66,11a6.87,6.87,0,0,0-3.44-.58l-2,7.32a3.61,3.61,0,0,0-.11.51,2.31,2.31,0,0,0,0,.4.83.83,0,0,0,.32.67,2.32,2.32,0,0,0,1.35.26,12.58,12.58,0,0,0,4.65-.76,9,9,0,0,0,4.67-4.23l.73.13-1.77,5.83H19.8v-.83A2.83,2.83,0,0,0,21,19.25a3.09,3.09,0,0,0,.85-1.61L25.54,4.17c.09-.34.16-.65.22-.93a3.35,3.35,0,0,0,.09-.71c0-.5-.13-.82-.4-1a6.34,6.34,0,0,0-1.78-.31V.48H39.82l-1.27,5.7-.81-.13A5.44,5.44,0,0,0,37,3Q35.9,1.42,32.4,1.42a2.69,2.69,0,0,0-1.54.29A2.08,2.08,0,0,0,30.3,2.78ZM56.56,6.1c0-.07,0-.18,0-.33a4.89,4.89,0,0,0-1.12-3.53,3.75,3.75,0,0,0-2.82-1.16c-2.33,0-4.35,1.55-6.07,4.63a17.09,17.09,0,0,0-2.31,8.43c0,2.08.47,3.5,1.43,4.27a4.89,4.89,0,0,0,3.11,1.15,6.84,6.84,0,0,0,4.14-1.45A11.51,11.51,0,0,0,55,16l.91.66A10.08,10.08,0,0,1,52.26,20a9.33,9.33,0,0,1-4.34,1.11A8.56,8.56,0,0,1,42,19a7.25,7.25,0,0,1-2.35-5.67A13.53,13.53,0,0,1,43.22,4a11.19,11.19,0,0,1,8.56-4A12.34,12.34,0,0,1,55,.44,13.17,13.17,0,0,0,56.9.88a1,1,0,0,0,.71-.24A2.94,2.94,0,0,0,58.06,0H59L57.45,7l-.94-.18C56.54,6.42,56.55,6.17,56.56,6.1Zm18,8.49.74.13-1.78,5.83H56.87v-.77a3.31,3.31,0,0,0,1.58-.53,3.09,3.09,0,0,0,.85-1.61L63,4.17c.09-.34.16-.65.22-.93a3.35,3.35,0,0,0,.09-.71c0-.5-.14-.82-.4-1a6.34,6.34,0,0,0-1.78-.31V.48H77.26L76,6.18l-.81-.13A5.44,5.44,0,0,0,74.48,3q-1.14-1.54-4.64-1.54a2.69,2.69,0,0,0-1.54.29,2.08,2.08,0,0,0-.56,1.07L66,9.45A12.53,12.53,0,0,0,70,8.94a5.91,5.91,0,0,0,2-2.66l.84.11-2.23,8.2-.82-.15c0-.28.07-.53.08-.74a5.17,5.17,0,0,0,0-.52A2.43,2.43,0,0,0,69.1,11a6.87,6.87,0,0,0-3.44-.58l-2,7.32a3.61,3.61,0,0,0-.11.51,2.31,2.31,0,0,0,0,.4.83.83,0,0,0,.32.67,2.32,2.32,0,0,0,1.35.26,12.58,12.58,0,0,0,4.65-.76A8.91,8.91,0,0,0,74.52,14.59Zm31-11.45-11.31,18h-1L91,5.83A16.56,16.56,0,0,0,90.12,2c-.2-.34-.71-.56-1.51-.67a3,3,0,0,0-1.31.48,3.08,3.08,0,0,0-.82,1.62l-3.7,13.47-.24,1c0,.1,0,.2-.05.3s0,.2,0,.28c0,.51.14.83.41,1a6.21,6.21,0,0,0,1.77.32v.77H75.72v-.77a3.31,3.31,0,0,0,1.58-.53,3.09,3.09,0,0,0,.85-1.61L81.83,4.17c.11-.38.19-.7.25-.95a3.75,3.75,0,0,0,.08-.69c0-.5-.15-.82-.43-1A6.49,6.49,0,0,0,80,1.26V.48H97.22v.78a4.92,4.92,0,0,0-1.57.18,1,1,0,0,0-.73,1.05,2.81,2.81,0,0,0,0,.29l0,.28,1.56,12,5.67-9a24.21,24.21,0,0,0,1.21-2.14,4.07,4.07,0,0,0,.54-1.68.79.79,0,0,0-.55-.82A5.69,5.69,0,0,0,102,1.26V.48h5.76v.78a3.5,3.5,0,0,0-1,.46A5.16,5.16,0,0,0,105.52,3.14Zm16.83,11.45.73.13-1.77,5.83H104.69v-.77a3.31,3.31,0,0,0,1.58-.53,3,3,0,0,0,.85-1.61l3.69-13.47c.08-.34.16-.65.22-.93a4,4,0,0,0,.08-.71c0-.5-.13-.82-.4-1a6.34,6.34,0,0,0-1.78-.31V.48h16.16l-1.28,5.7-.8-.13A5.43,5.43,0,0,0,122.3,3q-1.14-1.54-4.64-1.54a2.67,2.67,0,0,0-1.53.29,2.16,2.16,0,0,0-.57,1.07l-1.78,6.67a12.53,12.53,0,0,0,4.08-.51,5.91,5.91,0,0,0,2.06-2.66l.83.11-2.22,8.2-.82-.15c0-.28.06-.53.08-.74s0-.38,0-.52a2.45,2.45,0,0,0-.88-2.18,6.9,6.9,0,0,0-3.44-.58l-2,7.32c-.05.18-.08.35-.11.51a3.58,3.58,0,0,0,0,.4.81.81,0,0,0,.32.67,2.28,2.28,0,0,0,1.35.26,12.62,12.62,0,0,0,4.65-.76A9,9,0,0,0,122.35,14.59ZM142.94,2.75Q140.63.48,136.21.48h-8.7v.78a6.66,6.66,0,0,1,1.77.31q.42.21.42,1a2.91,2.91,0,0,1-.08.68q-.08.39-.24,1L125.7,17.62a2.93,2.93,0,0,1-1,1.75,3.54,3.54,0,0,1-1.39.41v.77h8.61a13.5,13.5,0,0,0,10-3.76,10.84,10.84,0,0,0,3.41-8A8.14,8.14,0,0,0,142.94,2.75ZM139.38,14q-2.38,5.51-7.74,5.5a2.35,2.35,0,0,1-1.29-.26,1,1,0,0,1-.36-.85,1.78,1.78,0,0,1,0-.31,2.08,2.08,0,0,1,.08-.39l4.13-15.15a1.76,1.76,0,0,1,.49-.84A2,2,0,0,1,136,1.42a4.32,4.32,0,0,1,4.07,2A7.17,7.17,0,0,1,140.83,7,17.49,17.49,0,0,1,139.38,14Z",opacity:1,strokeColor:"",fillColor:"#192760",width:127.70402,height:55.84601,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Approved":t={iconName:"Approved",pathdata:"M19,20.22H10.55v-.71a4.26,4.26,0,0,0,1.79-.41,1.37,1.37,0,0,0,.53-1.29c0-.22,0-.75-.16-1.58,0-.17-.11-.89-.29-2.15H6.06l-1.72,3a4,4,0,0,0-.31.66,2,2,0,0,0-.14.69c0,.41.12.67.37.78a5.42,5.42,0,0,0,1.53.3v.71H0v-.71A4,4,0,0,0,1.21,19a5.68,5.68,0,0,0,1.28-1.56L13.45.07h.76L17,17a4.35,4.35,0,0,0,.7,2.08,2.4,2.4,0,0,0,1.31.44Zm-6.83-7.31L11.13,5.73,6.76,12.91Zm7.18,6.52a3,3,0,0,0,1.33-.49,3,3,0,0,0,.84-1.59L25.19,4.11c.07-.3.14-.6.2-.9a3.14,3.14,0,0,0,.1-.72,1,1,0,0,0-.58-1,5.68,5.68,0,0,0-1.57-.23V.48h8.47a9.68,9.68,0,0,1,3.57.57,4,4,0,0,1,2.71,4,4.93,4.93,0,0,1-2.2,4.22,9.53,9.53,0,0,1-5.69,1.58l-.85,0-1.71-.11L26,16.6l-.25,1a1,1,0,0,0-.05.3,2.83,2.83,0,0,0,0,.29c0,.5.14.81.4.94a6.31,6.31,0,0,0,1.76.31v.76H19.39Zm8.52-9.66.54.06h.48a5.81,5.81,0,0,0,2.3-.36,3.47,3.47,0,0,0,1.4-1.18,6.24,6.24,0,0,0,.86-2,8.94,8.94,0,0,0,.3-2,3.29,3.29,0,0,0-.58-2,2.3,2.3,0,0,0-2-.79,1.23,1.23,0,0,0-.93.28,2.71,2.71,0,0,0-.46,1Zm8,9.69a3.19,3.19,0,0,0,1.55-.52,3,3,0,0,0,.84-1.59L42,4.11c.07-.3.14-.6.2-.9a3.14,3.14,0,0,0,.1-.72,1,1,0,0,0-.58-1,5.68,5.68,0,0,0-1.57-.23V.48h8.47a9.68,9.68,0,0,1,3.57.57,4,4,0,0,1,2.71,4,4.93,4.93,0,0,1-2.2,4.22A9.53,9.53,0,0,1,47,10.87l-.85,0-1.71-.11L42.79,16.6l-.25,1a1.45,1.45,0,0,0,0,.3,2.83,2.83,0,0,0,0,.29c0,.5.14.81.4.94a6.31,6.31,0,0,0,1.76.31v.76h-8.7Zm8.74-9.69.54.06h.48A5.81,5.81,0,0,0,48,9.48a3.41,3.41,0,0,0,1.4-1.18,6.24,6.24,0,0,0,.86-2,9,9,0,0,0,.31-2,3.29,3.29,0,0,0-.59-2,2.3,2.3,0,0,0-2-.79,1.23,1.23,0,0,0-.93.28,2.88,2.88,0,0,0-.46,1Zm7.95,9.69a3.27,3.27,0,0,0,1.56-.52A3.06,3.06,0,0,0,55,17.35L58.64,4.11l.18-.71a4.72,4.72,0,0,0,.13-1c0-.47-.13-.77-.4-.9a6.74,6.74,0,0,0-1.74-.3V.48h8.11A13,13,0,0,1,69.14,1a3.7,3.7,0,0,1,2.74,3.75,4.8,4.8,0,0,1-.46,2,5,5,0,0,1-1.54,1.9,6.55,6.55,0,0,1-1.79,1,19.35,19.35,0,0,1-1.89.52c.1.3.16.49.2.57l2.27,6.66a3.49,3.49,0,0,0,1,1.7,3.08,3.08,0,0,0,1.6.41v.76H65.33l-3.19-9.76h-.83L59.57,16.6l-.25,1a1.87,1.87,0,0,0,0,.25,2.64,2.64,0,0,0,0,.28q0,.8.39,1a5.88,5.88,0,0,0,1.76.32v.76H52.62ZM63.94,9.3a3.79,3.79,0,0,0,2.11-1.13A6,6,0,0,0,67,6.55a5.84,5.84,0,0,0,.44-2.26,3.31,3.31,0,0,0-.61-2,2.47,2.47,0,0,0-2.09-.81,1.25,1.25,0,0,0-.88.26,2.34,2.34,0,0,0-.47,1.05L61.59,9.5A13.42,13.42,0,0,0,63.94,9.3ZM76.39,4.53Q80.26,0,85,0a7.34,7.34,0,0,1,5.23,1.92,6.76,6.76,0,0,1,2,5.19,13.9,13.9,0,0,1-3.62,9.07q-3.86,4.61-8.88,4.6a7.06,7.06,0,0,1-5.13-1.92,6.86,6.86,0,0,1-2-5.14A14,14,0,0,1,76.39,4.53ZM77.3,18a2.56,2.56,0,0,0,2.57,1.78A4.62,4.62,0,0,0,83,18.47,14.42,14.42,0,0,0,86,13.54a27.18,27.18,0,0,0,1.52-4.83,20.67,20.67,0,0,0,.54-4.11,4.38,4.38,0,0,0-.73-2.55A2.62,2.62,0,0,0,85,1q-3.68,0-6.19,6.54a24.29,24.29,0,0,0-1.9,8.26A5.91,5.91,0,0,0,77.3,18ZM102.23.48v.76a5.19,5.19,0,0,0-1.55.17,1,1,0,0,0-.72,1,2.46,2.46,0,0,0,0,.28L100,3l1.52,11.76L107.11,6c.44-.71.84-1.41,1.2-2.11a4.06,4.06,0,0,0,.53-1.66.79.79,0,0,0-.55-.81,6.11,6.11,0,0,0-1.35-.14V.48h5.67v.76a3.31,3.31,0,0,0-1,.45,5.33,5.33,0,0,0-1.18,1.4L99.26,20.78h-.94l-2.25-15A15.49,15.49,0,0,0,95.24,2c-.22-.39-.84-.62-1.83-.71V.48Zm7.35,19a3.19,3.19,0,0,0,1.55-.52,3,3,0,0,0,.84-1.59l3.62-13.24c.09-.34.16-.64.22-.92a3.27,3.27,0,0,0,.09-.7c0-.5-.14-.81-.4-.94a6.13,6.13,0,0,0-1.75-.31V.48h15.89l-1.25,5.6L127.6,6a5.32,5.32,0,0,0-.7-3q-1.12-1.52-4.56-1.51a2.61,2.61,0,0,0-1.51.28,2.12,2.12,0,0,0-.56,1.06L118.52,9.3a12.1,12.1,0,0,0,4-.51,5.8,5.8,0,0,0,2-2.61l.82.1-2.19,8.07-.81-.14c0-.28.07-.52.08-.73s0-.37,0-.51a2.4,2.4,0,0,0-.87-2.15,6.76,6.76,0,0,0-3.38-.57l-1.94,7.2a3.34,3.34,0,0,0-.11.51,3.67,3.67,0,0,0,0,.39.81.81,0,0,0,.32.66,2.3,2.3,0,0,0,1.33.26,12.39,12.39,0,0,0,4.57-.75A8.84,8.84,0,0,0,127,14.35l.72.13-1.74,5.74H109.58Zm18.27,0a3.27,3.27,0,0,0,1.37-.41,2.85,2.85,0,0,0,1-1.71l3.63-13.23c.1-.38.18-.69.23-1a3,3,0,0,0,.09-.67c0-.5-.15-.81-.42-.94A6.38,6.38,0,0,0,132,1.24V.48h8.57c2.9,0,5.1.74,6.62,2.22a8,8,0,0,1,2.26,6,10.72,10.72,0,0,1-3.35,7.84,13.3,13.3,0,0,1-9.8,3.7h-8.47ZM144.4,3.39a4.23,4.23,0,0,0-4-2,2,2,0,0,0-1.29.31,1.74,1.74,0,0,0-.48.83l-4.07,14.9a3.24,3.24,0,0,0-.07.39,1.69,1.69,0,0,0,0,.3,1,1,0,0,0,.36.84,2.27,2.27,0,0,0,1.27.26q5.26,0,7.62-5.42a17.25,17.25,0,0,0,1.43-6.94A7,7,0,0,0,144.4,3.39Z",opacity:1,strokeColor:"",fillColor:"#516c30",width:127.70402,height:55.84601,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"Confidential":t={iconName:"Confidential",pathdata:"M13.71,0,12.63,6.9,12,6.73c0-.41,0-.66,0-.73s0-.18,0-.32a6.16,6.16,0,0,0-.79-3.47,2.37,2.37,0,0,0-2-1.14c-1.64,0-3.07,1.51-4.29,4.55a22,22,0,0,0-1.64,8.29c0,2,.34,3.44,1,4.2A3,3,0,0,0,6.5,19.24a4.08,4.08,0,0,0,2.93-1.43,10.47,10.47,0,0,0,1.5-2.09l.64.65A8.84,8.84,0,0,1,9,19.72a5.24,5.24,0,0,1-3.08,1.09,5.16,5.16,0,0,1-4.21-2.08A8.68,8.68,0,0,1,0,13.16,16.5,16.5,0,0,1,2.55,3.92Q5.1,0,8.61,0a6.35,6.35,0,0,1,2.25.43,6.62,6.62,0,0,0,1.38.43.55.55,0,0,0,.5-.23A2.61,2.61,0,0,0,13.06,0ZM27.49,7.11a17.19,17.19,0,0,1-2.61,9.07q-2.77,4.61-6.39,4.6a4.42,4.42,0,0,1-3.7-1.92,8.47,8.47,0,0,1-1.43-5.14A17.31,17.31,0,0,1,16,4.53C17.88,1.51,20,0,22.25,0A4.53,4.53,0,0,1,26,1.92,8.27,8.27,0,0,1,27.49,7.11ZM24.42,4.6a5.71,5.71,0,0,0-.53-2.55A1.76,1.76,0,0,0,22.24,1q-2.65,0-4.45,6.54a31.93,31.93,0,0,0-1.37,8.26A8.15,8.15,0,0,0,16.67,18c.34,1.19,1,1.78,1.85,1.78a2.9,2.9,0,0,0,2.28-1.29,15.85,15.85,0,0,0,2.13-4.93A34.08,34.08,0,0,0,24,8.71,28.5,28.5,0,0,0,24.42,4.6ZM42.75,1.3l.3-.06V.48H38.69v.76a2.55,2.55,0,0,1,1.16.33,1.8,1.8,0,0,1,.51,1.48,10.11,10.11,0,0,1-.13,1.34c-.06.41-.14.87-.24,1.39l-1.65,8.34L33.73.48H29.45v.76a2.66,2.66,0,0,1,1,.24,1.88,1.88,0,0,1,.65,1.06l.09.3L28.81,15a20.72,20.72,0,0,1-1,3.61,1.61,1.61,0,0,1-1.19.9v.76h4.42v-.76a2.55,2.55,0,0,1-1.13-.32,1.67,1.67,0,0,1-.56-1.44,7.13,7.13,0,0,1,.05-.79c.06-.43.17-1.09.34-2L31.89,4.38l5.52,16.33h.52l3-15a22.58,22.58,0,0,1,.87-3.42A1.42,1.42,0,0,1,42.75,1.3ZM55.53.48H44.23v.76a3.63,3.63,0,0,1,1.26.3c.19.13.29.42.29.9a7.08,7.08,0,0,1-.09,1c0,.2-.08.44-.13.71L43,17.34a3.47,3.47,0,0,1-.59,1.58,1.91,1.91,0,0,1-1.13.54v.76h6.29v-.76a2.13,2.13,0,0,1-1-.19A1.23,1.23,0,0,1,46,18.1c0-.1,0-.21,0-.31s0-.23.05-.35l1.4-7.21a3.15,3.15,0,0,1,2.37.64A3.21,3.21,0,0,1,50.38,13c0,.11,0,.28,0,.49s0,.46-.06.75l.58.14,1.58-8.07-.59-.1a5.79,5.79,0,0,1-1.43,2.59,6.17,6.17,0,0,1-2.77.52l1.26-6.54a2.06,2.06,0,0,1,.42-1.08,1.39,1.39,0,0,1,1-.26c1.62,0,2.7.51,3.24,1.54a7.11,7.11,0,0,1,.49,3l.57.13Zm3.69,17.71c0-.08,0-.17,0-.27s0-.2,0-.3l.17-1L62.06,3.36a3.44,3.44,0,0,1,.59-1.6,2,2,0,0,1,1.12-.52V.48H57.44v.76a3.47,3.47,0,0,1,1.26.31c.2.13.3.44.3.94a4.25,4.25,0,0,1-.06.67c0,.26-.09.57-.17,1L56.16,17.35a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.12.52v.76h6.33v-.76a3.3,3.3,0,0,1-1.26-.32C59.32,19,59.22,18.69,59.22,18.19Zm18-9.51a13,13,0,0,1-2.42,7.84,8.31,8.31,0,0,1-7,3.7H61.6v-.76a2,2,0,0,0,1-.41,3.14,3.14,0,0,0,.73-1.71L65.93,4.11c.08-.38.13-.69.17-1a4.36,4.36,0,0,0,.06-.67c0-.5-.1-.81-.3-.94a3.47,3.47,0,0,0-1.26-.31V.48h6.17A5.52,5.52,0,0,1,75.53,2.7,9.91,9.91,0,0,1,77.17,8.68ZM74,6.87a9.22,9.22,0,0,0-.53-3.48,2.91,2.91,0,0,0-2.87-2,1.12,1.12,0,0,0-.93.31,1.81,1.81,0,0,0-.35.83l-2.93,14.9a3,3,0,0,0-.05.39c0,.11,0,.21,0,.3a1.17,1.17,0,0,0,.25.84,1.3,1.3,0,0,0,.92.26q3.8,0,5.49-5.42A23.26,23.26,0,0,0,74,6.87Zm11.3,11.65a6.72,6.72,0,0,1-3.29.75,1.3,1.3,0,0,1-1-.26,1,1,0,0,1-.23-.66,3.28,3.28,0,0,1,0-.39,4.88,4.88,0,0,1,.08-.51l1.4-7.2a3.73,3.73,0,0,1,2.43.57A2.87,2.87,0,0,1,85.43,13c0,.14,0,.31,0,.51s0,.45-.06.73l.59.14,1.57-8.07-.59-.1a5.79,5.79,0,0,1-1.46,2.61,6.5,6.5,0,0,1-2.89.51l1.26-6.56a2.41,2.41,0,0,1,.41-1.06c.16-.19.52-.28,1.08-.28,1.65,0,2.75.5,3.29,1.51a7,7,0,0,1,.5,3l.57.13.9-5.6H79.14v.76a3.35,3.35,0,0,1,1.26.31c.19.13.29.44.29.94a5,5,0,0,1-.07.7c0,.28-.09.58-.15.92L77.86,17.35a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.13.52v.76H87.91l1.25-5.74-.52-.13A7.69,7.69,0,0,1,85.34,18.52ZM105.8,1.24V.48h-4.37v.76a2.55,2.55,0,0,1,1.16.33,1.77,1.77,0,0,1,.52,1.48A10.58,10.58,0,0,1,103,4.39c-.06.41-.13.87-.23,1.39l-1.66,8.34L96.47.48H92.19v.76a2.61,2.61,0,0,1,1,.24,1.83,1.83,0,0,1,.65,1.06l.1.3L91.55,15a19,19,0,0,1-1,3.61,1.61,1.61,0,0,1-1.19.9v.76h4.42v-.76a2.59,2.59,0,0,1-1.13-.32,1.67,1.67,0,0,1-.56-1.44,7.13,7.13,0,0,1,0-.79c.06-.43.17-1.09.35-2L94.63,4.38l5.52,16.33h.53l2.95-15a22.93,22.93,0,0,1,.86-3.42,1.42,1.42,0,0,1,1-1Zm11.4,4.9L118,.48H106.28l-.82,5,.55.2a8,8,0,0,1,1.87-3.16,3.7,3.7,0,0,1,2.7-1.06l-3.12,15.85a2.94,2.94,0,0,1-.87,1.85,2.48,2.48,0,0,1-1.34.26v.76h7v-.76a4.24,4.24,0,0,1-1.43-.3c-.23-.13-.34-.45-.34-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.18-1,3-15.1a2.73,2.73,0,0,1,1.79.63c.75.7,1.13,2,1.17,3.94Zm3.57,12.05c0-.08,0-.17,0-.27s0-.2,0-.3l.17-1,2.62-13.24a3.44,3.44,0,0,1,.59-1.6,2,2,0,0,1,1.12-.52V.48H119v.76a3.47,3.47,0,0,1,1.26.31c.2.13.3.44.3.94a4.25,4.25,0,0,1-.06.67c0,.26-.09.57-.17,1l-2.61,13.24a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.12.52v.76h6.33v-.76a3.36,3.36,0,0,1-1.26-.32C120.87,19,120.77,18.69,120.77,18.19Zm28.86-3.71-1.24,5.74H130.3v-.71a2.48,2.48,0,0,0,1.3-.41,1.64,1.64,0,0,0,.37-1.29c0-.22,0-.75-.11-1.58,0-.17-.08-.89-.21-2.15h-4.58l-1.24,3a5.1,5.1,0,0,0-.22.66,2.45,2.45,0,0,0-.1.69c0,.41.09.67.26.78a3.05,3.05,0,0,0,1.11.3v.71h-4.17v-.71a2.66,2.66,0,0,0,.87-.53,5.79,5.79,0,0,0,.92-1.56L132.39.07h.55L135,17a5.53,5.53,0,0,0,.5,2.08,1.67,1.67,0,0,0,1.14.46v0a1.93,1.93,0,0,0,1.12-.52,3.52,3.52,0,0,0,.6-1.6l2.61-13.23c.08-.38.13-.69.17-1a4.36,4.36,0,0,0,.06-.67c0-.5-.1-.81-.3-.94a3.47,3.47,0,0,0-1.26-.31V.48h6.73v.76a3.23,3.23,0,0,0-1.49.48,3.06,3.06,0,0,0-.64,1.64l-2.77,14.08c0,.16-.05.3-.07.44s0,.29,0,.47a.79.79,0,0,0,.31.71,1.55,1.55,0,0,0,.87.21,6.83,6.83,0,0,0,3.79-1,8.42,8.42,0,0,0,2.81-3.88ZM131.5,12.91l-.78-7.18-3.14,7.18Z",opacity:1,strokeColor:"",fillColor:"#192760",width:127.70402,height:55.84601,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"NotApproved":case"Not Approved":t={iconName:"Not Approved",pathdata:"M0,19.46a1.56,1.56,0,0,0,1.16-.9A19.84,19.84,0,0,0,2.1,15L4.42,2.84l-.09-.3a1.82,1.82,0,0,0-.64-1.06,2.41,2.41,0,0,0-1-.24V.48H6.88l4.49,13.64L13,5.78c.09-.52.17-1,.22-1.39a10.11,10.11,0,0,0,.13-1.34,1.83,1.83,0,0,0-.49-1.48,2.49,2.49,0,0,0-1.13-.33V.48H16v.76l-.29.06a1.42,1.42,0,0,0-1,1,23.7,23.7,0,0,0-.84,3.42L11,20.71h-.51L5.1,4.38,3,15c-.17.87-.28,1.53-.33,2a5.32,5.32,0,0,0,0,.79,1.69,1.69,0,0,0,.54,1.44,2.48,2.48,0,0,0,1.1.32v.76H0ZM17.73,4.53C19.54,1.51,21.55,0,23.79,0a4.4,4.4,0,0,1,3.66,1.92,8.52,8.52,0,0,1,1.43,5.19,17.56,17.56,0,0,1-2.53,9.07q-2.7,4.61-6.21,4.6a4.24,4.24,0,0,1-3.6-1.92,8.6,8.6,0,0,1-1.39-5.14A17.68,17.68,0,0,1,17.73,4.53ZM18.37,18c.33,1.19.93,1.78,1.8,1.78a2.83,2.83,0,0,0,2.22-1.29,16.41,16.41,0,0,0,2.06-4.93,35.53,35.53,0,0,0,1.06-4.83A28.26,28.26,0,0,0,25.9,4.6a5.86,5.86,0,0,0-.52-2.55A1.7,1.7,0,0,0,23.78,1Q21.2,1,19.45,7.53a33,33,0,0,0-1.33,8.26A8.15,8.15,0,0,0,18.37,18Zm11.08,1.48a2.34,2.34,0,0,0,1.3-.26,3,3,0,0,0,.85-1.85l3-15.85A3.54,3.54,0,0,0,32,2.56a8,8,0,0,0-1.82,3.16l-.53-.2.8-5H41.81l-.74,5.66-.54-.07c0-1.92-.41-3.24-1.13-3.94a2.6,2.6,0,0,0-1.74-.63L34.79,16.6l-.17,1a2.43,2.43,0,0,0,0,.33,2.26,2.26,0,0,0,0,.26c0,.5.11.82.33.95a3.94,3.94,0,0,0,1.39.3v.76H29.45Zm26.65.76H50.18v-.71a2.28,2.28,0,0,0,1.25-.41,1.64,1.64,0,0,0,.37-1.29c0-.22,0-.75-.11-1.58,0-.17-.08-.89-.2-2.15H47l-1.2,3c-.08.2-.15.42-.22.66a2.84,2.84,0,0,0-.09.69c0,.41.08.67.25.78a2.91,2.91,0,0,0,1.08.3v.71H42.79v-.71a2.44,2.44,0,0,0,.85-.53,5.59,5.59,0,0,0,.9-1.56L52.21.07h.53l2,16.88A5.46,5.46,0,0,0,55.2,19a1.36,1.36,0,0,0,.9.43Zm-4.76-7.31-.76-7.18-3,7.18Zm4.95,6.53a1.82,1.82,0,0,0,1-.5,3.56,3.56,0,0,0,.58-1.59L60.42,4.11c.06-.3.1-.6.15-.9a5.46,5.46,0,0,0,.06-.72c0-.52-.13-.86-.4-1a2.88,2.88,0,0,0-1.1-.23V.48h5.93a5,5,0,0,1,2.5.57c1.26.73,1.9,2.07,1.9,4a5.81,5.81,0,0,1-1.54,4.22,5.32,5.32,0,0,1-4,1.58l-.59,0-1.2-.11L61,16.6l-.17,1a2.72,2.72,0,0,0,0,.3,2.81,2.81,0,0,0,0,.29c0,.5.09.81.28.94a3.26,3.26,0,0,0,1.23.31v.76h-6Zm6-9.67.38.06H63a3,3,0,0,0,1.62-.36,2.87,2.87,0,0,0,1-1.18,7.28,7.28,0,0,0,.6-2,11.67,11.67,0,0,0,.22-2,4.4,4.4,0,0,0-.41-2,1.44,1.44,0,0,0-1.39-.79.71.71,0,0,0-.65.28,3.7,3.7,0,0,0-.32,1Zm5.61,9.69A1.86,1.86,0,0,0,69,18.94a3.54,3.54,0,0,0,.59-1.59L72.15,4.11q.09-.45.15-.9a5.73,5.73,0,0,0,.07-.72,1.1,1.1,0,0,0-.41-1,2.88,2.88,0,0,0-1.1-.23V.48h5.93a5,5,0,0,1,2.5.57c1.27.73,1.9,2.07,1.9,4a5.77,5.77,0,0,1-1.54,4.22,5.31,5.31,0,0,1-4,1.58l-.6,0-1.2-.11L72.74,16.6l-.17,1a2.72,2.72,0,0,0,0,.3c0,.1,0,.19,0,.29,0,.5.1.81.29.94a3.15,3.15,0,0,0,1.23.31v.76h-6.1Zm6.12-9.69.38.06h.33a3,3,0,0,0,1.62-.36,3,3,0,0,0,1-1.18,7.67,7.67,0,0,0,.59-2,11.67,11.67,0,0,0,.22-2,4.4,4.4,0,0,0-.41-2,1.43,1.43,0,0,0-1.38-.79.73.73,0,0,0-.66.28,3.7,3.7,0,0,0-.32,1Zm5.57,9.69a1.9,1.9,0,0,0,1.09-.52,3.56,3.56,0,0,0,.58-1.59L83.84,4.11c0-.27.09-.51.13-.71a7.08,7.08,0,0,0,.09-1c0-.47-.1-.77-.28-.9a3.53,3.53,0,0,0-1.22-.3V.48h5.68a6.57,6.57,0,0,1,3,.53q1.92,1,1.92,3.75a6.79,6.79,0,0,1-.32,2,5.23,5.23,0,0,1-1.08,1.9,4.56,4.56,0,0,1-1.25,1,11.62,11.62,0,0,1-1.33.52c.07.3.12.49.14.57l1.59,6.66a4.07,4.07,0,0,0,.69,1.7,1.72,1.72,0,0,0,1.13.41v.76H88.52l-2.23-9.76h-.58L84.49,16.6l-.17,1a1,1,0,0,0,0,.25,2.62,2.62,0,0,0,0,.28c0,.53.09.86.26,1a3.11,3.11,0,0,0,1.24.32v.76H79.63ZM87.55,9.3A2.59,2.59,0,0,0,89,8.17a7.24,7.24,0,0,0,.66-1.62A8.18,8.18,0,0,0,90,4.29a4.32,4.32,0,0,0-.43-2,1.5,1.5,0,0,0-1.45-.81.71.71,0,0,0-.62.26,2.78,2.78,0,0,0-.33,1.05L85.91,9.5A6.63,6.63,0,0,0,87.55,9.3Zm8.72-4.77Q99,0,102.32,0A4.37,4.37,0,0,1,106,1.92a8.46,8.46,0,0,1,1.44,5.19,17.58,17.58,0,0,1-2.54,9.07q-2.7,4.61-6.21,4.6a4.27,4.27,0,0,1-3.6-1.92,8.67,8.67,0,0,1-1.38-5.14A17.68,17.68,0,0,1,96.27,4.53ZM96.9,18c.33,1.19.93,1.78,1.8,1.78a2.83,2.83,0,0,0,2.22-1.29A16.63,16.63,0,0,0,103,13.54a37.1,37.1,0,0,0,1.06-4.83,29.49,29.49,0,0,0,.38-4.11,5.86,5.86,0,0,0-.51-2.55A1.71,1.71,0,0,0,102.31,1C100.6,1,99.15,3.17,98,7.53a33.42,33.42,0,0,0-1.33,8.26A8.57,8.57,0,0,0,96.9,18ZM114.35.48v.76a2.57,2.57,0,0,0-1.08.17,1.07,1.07,0,0,0-.5,1,2.53,2.53,0,0,0,0,.28,2.64,2.64,0,0,0,0,.28l1.07,11.76L117.77,6c.31-.71.59-1.41.84-2.11A5.25,5.25,0,0,0,119,2.19a.85.85,0,0,0-.38-.81,3.09,3.09,0,0,0-.95-.14V.48h4v.76a2.08,2.08,0,0,0-.73.45,5.35,5.35,0,0,0-.82,1.4l-7.79,17.69h-.66L110,5.74A22,22,0,0,0,109.46,2c-.16-.39-.58-.62-1.28-.71V.48Zm5.15,19a1.83,1.83,0,0,0,1.08-.52,3.42,3.42,0,0,0,.59-1.59l2.54-13.24c.06-.34.11-.64.15-.92a4.83,4.83,0,0,0,.06-.7c0-.5-.09-.81-.28-.94a3.14,3.14,0,0,0-1.22-.31V.48h11.12l-.87,5.6L132.11,6a7,7,0,0,0-.49-3c-.52-1-1.59-1.51-3.19-1.51-.55,0-.9.09-1.06.28A2.44,2.44,0,0,0,127,2.74L125.76,9.3a6.21,6.21,0,0,0,2.81-.51A6,6,0,0,0,130,6.18l.58.1L129,14.35l-.56-.14c0-.28,0-.52,0-.73s0-.37,0-.51a2.92,2.92,0,0,0-.61-2.15,3.55,3.55,0,0,0-2.37-.57l-1.36,7.2a4.79,4.79,0,0,0-.07.51,3.28,3.28,0,0,0,0,.39,1,1,0,0,0,.22.66,1.24,1.24,0,0,0,.93.26,6.43,6.43,0,0,0,3.21-.75,7.67,7.67,0,0,0,3.21-4.17l.5.13-1.22,5.74H119.5Zm12.79,0a1.87,1.87,0,0,0,1-.41,3.23,3.23,0,0,0,.71-1.71L136.5,4.11c.07-.38.13-.69.17-1a5.89,5.89,0,0,0,.05-.67c0-.5-.1-.81-.29-.94a3.32,3.32,0,0,0-1.22-.31V.48h6a5.35,5.35,0,0,1,4.63,2.22,10.11,10.11,0,0,1,1.58,6,13.3,13.3,0,0,1-2.34,7.84,8,8,0,0,1-6.86,3.7h-5.93ZM143.87,3.39a2.84,2.84,0,0,0-2.79-2,1.08,1.08,0,0,0-.91.31,1.93,1.93,0,0,0-.34.83L137,17.44a3.1,3.1,0,0,0-.06.39c0,.11,0,.21,0,.3a1.22,1.22,0,0,0,.24.84,1.26,1.26,0,0,0,.9.26q3.67,0,5.33-5.42a23.91,23.91,0,0,0,1-6.94A9.45,9.45,0,0,0,143.87,3.39Z",opacity:1,strokeColor:"",fillColor:"#8a251a",width:127.70402,height:55.84601,stampFillColor:"#f6dedd",stampStrokeColor:""}}if(t)return t.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.currentStampAnnotation=t,t}},t.prototype.retrievestampAnnotation=function(e){if(e){var t=void 0;switch(e.trim()){case"Approved":t={iconName:"Approved",pathdata:"M19,20.22H10.55v-.71a4.26,4.26,0,0,0,1.79-.41,1.37,1.37,0,0,0,.53-1.29c0-.22,0-.75-.16-1.58,0-.17-.11-.89-.29-2.15H6.06l-1.72,3a4,4,0,0,0-.31.66,2,2,0,0,0-.14.69c0,.41.12.67.37.78a5.42,5.42,0,0,0,1.53.3v.71H0v-.71A4,4,0,0,0,1.21,19a5.68,5.68,0,0,0,1.28-1.56L13.45.07h.76L17,17a4.35,4.35,0,0,0,.7,2.08,2.4,2.4,0,0,0,1.31.44Zm-6.83-7.31L11.13,5.73,6.76,12.91Zm7.18,6.52a3,3,0,0,0,1.33-.49,3,3,0,0,0,.84-1.59L25.19,4.11c.07-.3.14-.6.2-.9a3.14,3.14,0,0,0,.1-.72,1,1,0,0,0-.58-1,5.68,5.68,0,0,0-1.57-.23V.48h8.47a9.68,9.68,0,0,1,3.57.57,4,4,0,0,1,2.71,4,4.93,4.93,0,0,1-2.2,4.22,9.53,9.53,0,0,1-5.69,1.58l-.85,0-1.71-.11L26,16.6l-.25,1a1,1,0,0,0-.05.3,2.83,2.83,0,0,0,0,.29c0,.5.14.81.4.94a6.31,6.31,0,0,0,1.76.31v.76H19.39Zm8.52-9.66.54.06h.48a5.81,5.81,0,0,0,2.3-.36,3.47,3.47,0,0,0,1.4-1.18,6.24,6.24,0,0,0,.86-2,8.94,8.94,0,0,0,.3-2,3.29,3.29,0,0,0-.58-2,2.3,2.3,0,0,0-2-.79,1.23,1.23,0,0,0-.93.28,2.71,2.71,0,0,0-.46,1Zm8,9.69a3.19,3.19,0,0,0,1.55-.52,3,3,0,0,0,.84-1.59L42,4.11c.07-.3.14-.6.2-.9a3.14,3.14,0,0,0,.1-.72,1,1,0,0,0-.58-1,5.68,5.68,0,0,0-1.57-.23V.48h8.47a9.68,9.68,0,0,1,3.57.57,4,4,0,0,1,2.71,4,4.93,4.93,0,0,1-2.2,4.22A9.53,9.53,0,0,1,47,10.87l-.85,0-1.71-.11L42.79,16.6l-.25,1a1.45,1.45,0,0,0,0,.3,2.83,2.83,0,0,0,0,.29c0,.5.14.81.4.94a6.31,6.31,0,0,0,1.76.31v.76h-8.7Zm8.74-9.69.54.06h.48A5.81,5.81,0,0,0,48,9.48a3.41,3.41,0,0,0,1.4-1.18,6.24,6.24,0,0,0,.86-2,9,9,0,0,0,.31-2,3.29,3.29,0,0,0-.59-2,2.3,2.3,0,0,0-2-.79,1.23,1.23,0,0,0-.93.28,2.88,2.88,0,0,0-.46,1Zm7.95,9.69a3.27,3.27,0,0,0,1.56-.52A3.06,3.06,0,0,0,55,17.35L58.64,4.11l.18-.71a4.72,4.72,0,0,0,.13-1c0-.47-.13-.77-.4-.9a6.74,6.74,0,0,0-1.74-.3V.48h8.11A13,13,0,0,1,69.14,1a3.7,3.7,0,0,1,2.74,3.75,4.8,4.8,0,0,1-.46,2,5,5,0,0,1-1.54,1.9,6.55,6.55,0,0,1-1.79,1,19.35,19.35,0,0,1-1.89.52c.1.3.16.49.2.57l2.27,6.66a3.49,3.49,0,0,0,1,1.7,3.08,3.08,0,0,0,1.6.41v.76H65.33l-3.19-9.76h-.83L59.57,16.6l-.25,1a1.87,1.87,0,0,0,0,.25,2.64,2.64,0,0,0,0,.28q0,.8.39,1a5.88,5.88,0,0,0,1.76.32v.76H52.62ZM63.94,9.3a3.79,3.79,0,0,0,2.11-1.13A6,6,0,0,0,67,6.55a5.84,5.84,0,0,0,.44-2.26,3.31,3.31,0,0,0-.61-2,2.47,2.47,0,0,0-2.09-.81,1.25,1.25,0,0,0-.88.26,2.34,2.34,0,0,0-.47,1.05L61.59,9.5A13.42,13.42,0,0,0,63.94,9.3ZM76.39,4.53Q80.26,0,85,0a7.34,7.34,0,0,1,5.23,1.92,6.76,6.76,0,0,1,2,5.19,13.9,13.9,0,0,1-3.62,9.07q-3.86,4.61-8.88,4.6a7.06,7.06,0,0,1-5.13-1.92,6.86,6.86,0,0,1-2-5.14A14,14,0,0,1,76.39,4.53ZM77.3,18a2.56,2.56,0,0,0,2.57,1.78A4.62,4.62,0,0,0,83,18.47,14.42,14.42,0,0,0,86,13.54a27.18,27.18,0,0,0,1.52-4.83,20.67,20.67,0,0,0,.54-4.11,4.38,4.38,0,0,0-.73-2.55A2.62,2.62,0,0,0,85,1q-3.68,0-6.19,6.54a24.29,24.29,0,0,0-1.9,8.26A5.91,5.91,0,0,0,77.3,18ZM102.23.48v.76a5.19,5.19,0,0,0-1.55.17,1,1,0,0,0-.72,1,2.46,2.46,0,0,0,0,.28L100,3l1.52,11.76L107.11,6c.44-.71.84-1.41,1.2-2.11a4.06,4.06,0,0,0,.53-1.66.79.79,0,0,0-.55-.81,6.11,6.11,0,0,0-1.35-.14V.48h5.67v.76a3.31,3.31,0,0,0-1,.45,5.33,5.33,0,0,0-1.18,1.4L99.26,20.78h-.94l-2.25-15A15.49,15.49,0,0,0,95.24,2c-.22-.39-.84-.62-1.83-.71V.48Zm7.35,19a3.19,3.19,0,0,0,1.55-.52,3,3,0,0,0,.84-1.59l3.62-13.24c.09-.34.16-.64.22-.92a3.27,3.27,0,0,0,.09-.7c0-.5-.14-.81-.4-.94a6.13,6.13,0,0,0-1.75-.31V.48h15.89l-1.25,5.6L127.6,6a5.32,5.32,0,0,0-.7-3q-1.12-1.52-4.56-1.51a2.61,2.61,0,0,0-1.51.28,2.12,2.12,0,0,0-.56,1.06L118.52,9.3a12.1,12.1,0,0,0,4-.51,5.8,5.8,0,0,0,2-2.61l.82.1-2.19,8.07-.81-.14c0-.28.07-.52.08-.73s0-.37,0-.51a2.4,2.4,0,0,0-.87-2.15,6.76,6.76,0,0,0-3.38-.57l-1.94,7.2a3.34,3.34,0,0,0-.11.51,3.67,3.67,0,0,0,0,.39.81.81,0,0,0,.32.66,2.3,2.3,0,0,0,1.33.26,12.39,12.39,0,0,0,4.57-.75A8.84,8.84,0,0,0,127,14.35l.72.13-1.74,5.74H109.58Zm18.27,0a3.27,3.27,0,0,0,1.37-.41,2.85,2.85,0,0,0,1-1.71l3.63-13.23c.1-.38.18-.69.23-1a3,3,0,0,0,.09-.67c0-.5-.15-.81-.42-.94A6.38,6.38,0,0,0,132,1.24V.48h8.57c2.9,0,5.1.74,6.62,2.22a8,8,0,0,1,2.26,6,10.72,10.72,0,0,1-3.35,7.84,13.3,13.3,0,0,1-9.8,3.7h-8.47ZM144.4,3.39a4.23,4.23,0,0,0-4-2,2,2,0,0,0-1.29.31,1.74,1.74,0,0,0-.48.83l-4.07,14.9a3.24,3.24,0,0,0-.07.39,1.69,1.69,0,0,0,0,.3,1,1,0,0,0,.36.84,2.27,2.27,0,0,0,1.27.26q5.26,0,7.62-5.42a17.25,17.25,0,0,0,1.43-6.94A7,7,0,0,0,144.4,3.39Z",opacity:1,strokeColor:"",fillColor:"#516c30",width:149.474,height:20.783,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"Confidential":t={iconName:"Confidential",pathdata:"M13.71,0,12.63,6.9,12,6.73c0-.41,0-.66,0-.73s0-.18,0-.32a6.16,6.16,0,0,0-.79-3.47,2.37,2.37,0,0,0-2-1.14c-1.64,0-3.07,1.51-4.29,4.55a22,22,0,0,0-1.64,8.29c0,2,.34,3.44,1,4.2A3,3,0,0,0,6.5,19.24a4.08,4.08,0,0,0,2.93-1.43,10.47,10.47,0,0,0,1.5-2.09l.64.65A8.84,8.84,0,0,1,9,19.72a5.24,5.24,0,0,1-3.08,1.09,5.16,5.16,0,0,1-4.21-2.08A8.68,8.68,0,0,1,0,13.16,16.5,16.5,0,0,1,2.55,3.92Q5.1,0,8.61,0a6.35,6.35,0,0,1,2.25.43,6.62,6.62,0,0,0,1.38.43.55.55,0,0,0,.5-.23A2.61,2.61,0,0,0,13.06,0ZM27.49,7.11a17.19,17.19,0,0,1-2.61,9.07q-2.77,4.61-6.39,4.6a4.42,4.42,0,0,1-3.7-1.92,8.47,8.47,0,0,1-1.43-5.14A17.31,17.31,0,0,1,16,4.53C17.88,1.51,20,0,22.25,0A4.53,4.53,0,0,1,26,1.92,8.27,8.27,0,0,1,27.49,7.11ZM24.42,4.6a5.71,5.71,0,0,0-.53-2.55A1.76,1.76,0,0,0,22.24,1q-2.65,0-4.45,6.54a31.93,31.93,0,0,0-1.37,8.26A8.15,8.15,0,0,0,16.67,18c.34,1.19,1,1.78,1.85,1.78a2.9,2.9,0,0,0,2.28-1.29,15.85,15.85,0,0,0,2.13-4.93A34.08,34.08,0,0,0,24,8.71,28.5,28.5,0,0,0,24.42,4.6ZM42.75,1.3l.3-.06V.48H38.69v.76a2.55,2.55,0,0,1,1.16.33,1.8,1.8,0,0,1,.51,1.48,10.11,10.11,0,0,1-.13,1.34c-.06.41-.14.87-.24,1.39l-1.65,8.34L33.73.48H29.45v.76a2.66,2.66,0,0,1,1,.24,1.88,1.88,0,0,1,.65,1.06l.09.3L28.81,15a20.72,20.72,0,0,1-1,3.61,1.61,1.61,0,0,1-1.19.9v.76h4.42v-.76a2.55,2.55,0,0,1-1.13-.32,1.67,1.67,0,0,1-.56-1.44,7.13,7.13,0,0,1,.05-.79c.06-.43.17-1.09.34-2L31.89,4.38l5.52,16.33h.52l3-15a22.58,22.58,0,0,1,.87-3.42A1.42,1.42,0,0,1,42.75,1.3ZM55.53.48H44.23v.76a3.63,3.63,0,0,1,1.26.3c.19.13.29.42.29.9a7.08,7.08,0,0,1-.09,1c0,.2-.08.44-.13.71L43,17.34a3.47,3.47,0,0,1-.59,1.58,1.91,1.91,0,0,1-1.13.54v.76h6.29v-.76a2.13,2.13,0,0,1-1-.19A1.23,1.23,0,0,1,46,18.1c0-.1,0-.21,0-.31s0-.23.05-.35l1.4-7.21a3.15,3.15,0,0,1,2.37.64A3.21,3.21,0,0,1,50.38,13c0,.11,0,.28,0,.49s0,.46-.06.75l.58.14,1.58-8.07-.59-.1a5.79,5.79,0,0,1-1.43,2.59,6.17,6.17,0,0,1-2.77.52l1.26-6.54a2.06,2.06,0,0,1,.42-1.08,1.39,1.39,0,0,1,1-.26c1.62,0,2.7.51,3.24,1.54a7.11,7.11,0,0,1,.49,3l.57.13Zm3.69,17.71c0-.08,0-.17,0-.27s0-.2,0-.3l.17-1L62.06,3.36a3.44,3.44,0,0,1,.59-1.6,2,2,0,0,1,1.12-.52V.48H57.44v.76a3.47,3.47,0,0,1,1.26.31c.2.13.3.44.3.94a4.25,4.25,0,0,1-.06.67c0,.26-.09.57-.17,1L56.16,17.35a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.12.52v.76h6.33v-.76a3.3,3.3,0,0,1-1.26-.32C59.32,19,59.22,18.69,59.22,18.19Zm18-9.51a13,13,0,0,1-2.42,7.84,8.31,8.31,0,0,1-7,3.7H61.6v-.76a2,2,0,0,0,1-.41,3.14,3.14,0,0,0,.73-1.71L65.93,4.11c.08-.38.13-.69.17-1a4.36,4.36,0,0,0,.06-.67c0-.5-.1-.81-.3-.94a3.47,3.47,0,0,0-1.26-.31V.48h6.17A5.52,5.52,0,0,1,75.53,2.7,9.91,9.91,0,0,1,77.17,8.68ZM74,6.87a9.22,9.22,0,0,0-.53-3.48,2.91,2.91,0,0,0-2.87-2,1.12,1.12,0,0,0-.93.31,1.81,1.81,0,0,0-.35.83l-2.93,14.9a3,3,0,0,0-.05.39c0,.11,0,.21,0,.3a1.17,1.17,0,0,0,.25.84,1.3,1.3,0,0,0,.92.26q3.8,0,5.49-5.42A23.26,23.26,0,0,0,74,6.87Zm11.3,11.65a6.72,6.72,0,0,1-3.29.75,1.3,1.3,0,0,1-1-.26,1,1,0,0,1-.23-.66,3.28,3.28,0,0,1,0-.39,4.88,4.88,0,0,1,.08-.51l1.4-7.2a3.73,3.73,0,0,1,2.43.57A2.87,2.87,0,0,1,85.43,13c0,.14,0,.31,0,.51s0,.45-.06.73l.59.14,1.57-8.07-.59-.1a5.79,5.79,0,0,1-1.46,2.61,6.5,6.5,0,0,1-2.89.51l1.26-6.56a2.41,2.41,0,0,1,.41-1.06c.16-.19.52-.28,1.08-.28,1.65,0,2.75.5,3.29,1.51a7,7,0,0,1,.5,3l.57.13.9-5.6H79.14v.76a3.35,3.35,0,0,1,1.26.31c.19.13.29.44.29.94a5,5,0,0,1-.07.7c0,.28-.09.58-.15.92L77.86,17.35a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.13.52v.76H87.91l1.25-5.74-.52-.13A7.69,7.69,0,0,1,85.34,18.52ZM105.8,1.24V.48h-4.37v.76a2.55,2.55,0,0,1,1.16.33,1.77,1.77,0,0,1,.52,1.48A10.58,10.58,0,0,1,103,4.39c-.06.41-.13.87-.23,1.39l-1.66,8.34L96.47.48H92.19v.76a2.61,2.61,0,0,1,1,.24,1.83,1.83,0,0,1,.65,1.06l.1.3L91.55,15a19,19,0,0,1-1,3.61,1.61,1.61,0,0,1-1.19.9v.76h4.42v-.76a2.59,2.59,0,0,1-1.13-.32,1.67,1.67,0,0,1-.56-1.44,7.13,7.13,0,0,1,0-.79c.06-.43.17-1.09.35-2L94.63,4.38l5.52,16.33h.53l2.95-15a22.93,22.93,0,0,1,.86-3.42,1.42,1.42,0,0,1,1-1Zm11.4,4.9L118,.48H106.28l-.82,5,.55.2a8,8,0,0,1,1.87-3.16,3.7,3.7,0,0,1,2.7-1.06l-3.12,15.85a2.94,2.94,0,0,1-.87,1.85,2.48,2.48,0,0,1-1.34.26v.76h7v-.76a4.24,4.24,0,0,1-1.43-.3c-.23-.13-.34-.45-.34-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.18-1,3-15.1a2.73,2.73,0,0,1,1.79.63c.75.7,1.13,2,1.17,3.94Zm3.57,12.05c0-.08,0-.17,0-.27s0-.2,0-.3l.17-1,2.62-13.24a3.44,3.44,0,0,1,.59-1.6,2,2,0,0,1,1.12-.52V.48H119v.76a3.47,3.47,0,0,1,1.26.31c.2.13.3.44.3.94a4.25,4.25,0,0,1-.06.67c0,.26-.09.57-.17,1l-2.61,13.24a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.12.52v.76h6.33v-.76a3.36,3.36,0,0,1-1.26-.32C120.87,19,120.77,18.69,120.77,18.19Zm28.86-3.71-1.24,5.74H130.3v-.71a2.48,2.48,0,0,0,1.3-.41,1.64,1.64,0,0,0,.37-1.29c0-.22,0-.75-.11-1.58,0-.17-.08-.89-.21-2.15h-4.58l-1.24,3a5.1,5.1,0,0,0-.22.66,2.45,2.45,0,0,0-.1.69c0,.41.09.67.26.78a3.05,3.05,0,0,0,1.11.3v.71h-4.17v-.71a2.66,2.66,0,0,0,.87-.53,5.79,5.79,0,0,0,.92-1.56L132.39.07h.55L135,17a5.53,5.53,0,0,0,.5,2.08,1.67,1.67,0,0,0,1.14.46v0a1.93,1.93,0,0,0,1.12-.52,3.52,3.52,0,0,0,.6-1.6l2.61-13.23c.08-.38.13-.69.17-1a4.36,4.36,0,0,0,.06-.67c0-.5-.1-.81-.3-.94a3.47,3.47,0,0,0-1.26-.31V.48h6.73v.76a3.23,3.23,0,0,0-1.49.48,3.06,3.06,0,0,0-.64,1.64l-2.77,14.08c0,.16-.05.3-.07.44s0,.29,0,.47a.79.79,0,0,0,.31.71,1.55,1.55,0,0,0,.87.21,6.83,6.83,0,0,0,3.79-1,8.42,8.42,0,0,0,2.81-3.88ZM131.5,12.91l-.78-7.18-3.14,7.18Z",opacity:1,strokeColor:"",fillColor:"#192760",width:149.633,height:20.811,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Witness":t={iconName:"Witness",pathdata:"M19.63,2.67,12.77,16.84h-.69L10.63,5.17,5.05,16.84H4.36L2.5,2.92A3.13,3.13,0,0,0,2,1.35,2.38,2.38,0,0,0,.63.91V.33H7.3V1a2.27,2.27,0,0,0-.92.17A1.11,1.11,0,0,0,5.84,2.2v.16c0,.05,0,.13,0,.22L6.81,11l3.57-7.48a.79.79,0,0,0,0-.23,2.78,2.78,0,0,0-.53-2A2.23,2.23,0,0,0,8.68.91V.33h6.45V.91A2.42,2.42,0,0,0,14,1.2c-.23.16-.34.5-.34,1,0,.11,0,.26,0,.46s.07.73.12,1.21l.8,7L18.3,3.11c.09-.19.17-.4.25-.62a2.11,2.11,0,0,0,.11-.65.73.73,0,0,0-.4-.76,2.73,2.73,0,0,0-1.1-.17V.33h4.47V.91a1.92,1.92,0,0,0-.91.3A3.66,3.66,0,0,0,19.63,2.67ZM29.76.33H22.62V1A5.07,5.07,0,0,1,24,1.2c.23.11.34.36.34.77a2.86,2.86,0,0,1-.06.54c0,.21-.11.47-.19.77L21.17,14.05a2.47,2.47,0,0,1-.68,1.29,2.62,2.62,0,0,1-1.27.42v.62h7.15v-.62A5.09,5.09,0,0,1,25,15.51c-.22-.11-.33-.37-.33-.77a2,2,0,0,1,0-.23c0-.08,0-.16,0-.24l.19-.83,3-10.77a2.5,2.5,0,0,1,.66-1.3A2.76,2.76,0,0,1,29.76,1ZM41.9,4.88l.63,0,.86-4.6H30.2l-.93,4.1.62.16A6.6,6.6,0,0,1,32,2a5.22,5.22,0,0,1,3.06-.86L31.53,14.05a2.24,2.24,0,0,1-1,1.5,3.67,3.67,0,0,1-1.51.21v.62H37v-.62a6,6,0,0,1-1.62-.24c-.26-.1-.39-.36-.39-.77,0-.07,0-.14,0-.21s0-.16.05-.27l.2-.83L38.57,1.16a3.76,3.76,0,0,1,2,.52A3.69,3.69,0,0,1,41.9,4.88ZM59.24,1,59.58,1V.33H54.65V1A3.78,3.78,0,0,1,56,1.22a1.25,1.25,0,0,1,.58,1.2,6.26,6.26,0,0,1-.15,1.09c-.07.33-.16.71-.27,1.13l-1.87,6.79L49.05.33H44.21V1a3.51,3.51,0,0,1,1.13.2,1.51,1.51,0,0,1,.74.85l.1.25L43.49,12.1A13.5,13.5,0,0,1,42.4,15a1.87,1.87,0,0,1-1.35.72v.62h5v-.62a3.62,3.62,0,0,1-1.28-.26,1.19,1.19,0,0,1-.64-1.17,3.55,3.55,0,0,1,.06-.64q.11-.53.39-1.59L47,3.5,53.2,16.78h.59L57.13,4.6a15.29,15.29,0,0,1,1-2.78A1.51,1.51,0,0,1,59.24,1Zm7.26.31a2.11,2.11,0,0,1,1.23-.23c1.87,0,3.1.41,3.71,1.23A4.39,4.39,0,0,1,72,4.78l.64.11,1-4.56H60.75V1a5,5,0,0,1,1.42.25c.22.11.32.36.32.77a2.73,2.73,0,0,1-.07.57c0,.22-.1.47-.17.74l-3,10.77a2.47,2.47,0,0,1-.68,1.29,2.62,2.62,0,0,1-1.27.42v.62h13.3l1.42-4.66-.59-.11A7.1,7.1,0,0,1,67.75,15a10,10,0,0,1-3.72.61A1.86,1.86,0,0,1,63,15.4a.67.67,0,0,1-.26-.54,2.36,2.36,0,0,1,0-.32,3.38,3.38,0,0,1,.09-.41l1.58-5.86a5.48,5.48,0,0,1,2.75.47,2,2,0,0,1,.71,1.75c0,.11,0,.25,0,.41s0,.37-.06.6l.65.11L70.2,5.05,69.54,5a4.69,4.69,0,0,1-1.65,2.12,10.06,10.06,0,0,1-3.26.41l1.42-5.33A1.75,1.75,0,0,1,66.5,1.31ZM80.88.83a2.77,2.77,0,0,1,2.46,1.26A4.36,4.36,0,0,1,84,4l.08.78.62.08,1-4.8H85a1.77,1.77,0,0,1-.38.43A1,1,0,0,1,84,.67a2.76,2.76,0,0,1-.37,0l-.41-.1-.61-.2a4.78,4.78,0,0,0-.79-.2A6.71,6.71,0,0,0,80.46,0a4.76,4.76,0,0,0-3.62,1.36,4.61,4.61,0,0,0-1.29,3.29q0,2.05,2.94,4.47t2.94,3.82a3.19,3.19,0,0,1-.79,2.14,2.8,2.8,0,0,1-2.23.92,3.43,3.43,0,0,1-1.5-.33,3.82,3.82,0,0,1-2-2.5,10.33,10.33,0,0,1-.2-1.67L74,11.45l-.87,5.38h.73a2.85,2.85,0,0,1,.38-.67A.75.75,0,0,1,74.8,16a1.12,1.12,0,0,1,.27,0l.42.15.61.22a8.62,8.62,0,0,0,1.3.35,7.53,7.53,0,0,0,1.32.12,5.48,5.48,0,0,0,4.11-1.53,4.77,4.77,0,0,0,1.49-3.43,4.59,4.59,0,0,0-.77-2.63,9.31,9.31,0,0,0-1.87-2L79.61,5.5a4.31,4.31,0,0,1-.74-.77,2.55,2.55,0,0,1-.43-1.45,2.68,2.68,0,0,1,.42-1.44A2.23,2.23,0,0,1,80.88.83Zm12.31,0a2.8,2.8,0,0,1,2.47,1.26A4.49,4.49,0,0,1,96.35,4l.08.78.62.08,1-4.8h-.71a1.62,1.62,0,0,1-.39.43,1,1,0,0,1-.64.18,2.9,2.9,0,0,1-.38,0l-.41-.1-.61-.2a4.65,4.65,0,0,0-.78-.2A6.88,6.88,0,0,0,92.77,0a4.73,4.73,0,0,0-3.61,1.36,4.57,4.57,0,0,0-1.3,3.29q0,2.05,2.94,4.47c2,1.54,3,2.81,3,3.82a3.2,3.2,0,0,1-.8,2.14,2.78,2.78,0,0,1-2.23.92,3.36,3.36,0,0,1-1.49-.33A3.68,3.68,0,0,1,88,14.73a3.76,3.76,0,0,1-.81-1.56A10.6,10.6,0,0,1,87,11.5l-.7-.05-.86,5.38h.72a2.85,2.85,0,0,1,.38-.67.78.78,0,0,1,.57-.19,1.12,1.12,0,0,1,.27,0l.42.15.61.22a8.74,8.74,0,0,0,1.31.35,7.37,7.37,0,0,0,1.32.12,5.49,5.49,0,0,0,4.11-1.53,4.81,4.81,0,0,0,1.49-3.43,4.67,4.67,0,0,0-.77-2.63A9.57,9.57,0,0,0,94,7.2L91.93,5.5a4,4,0,0,1-.74-.77,2.48,2.48,0,0,1-.43-1.45,2.68,2.68,0,0,1,.42-1.44A2.2,2.2,0,0,1,93.19.83Z",opacity:1,strokeColor:"",fillColor:"#192760",width:97.39,height:16.84,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"InitialHere":case"Initial Here":t={iconName:"Initial Here",pathdata:"M6.36,15.51a5.09,5.09,0,0,0,1.42.25v.62H.63v-.62a2.62,2.62,0,0,0,1.27-.42,2.47,2.47,0,0,0,.68-1.29l3-10.77c.08-.3.15-.56.19-.77A2.86,2.86,0,0,0,5.78,2c0-.41-.11-.66-.34-.77A5.07,5.07,0,0,0,4,1V.33h7.14V1a2.76,2.76,0,0,0-1.27.42,2.5,2.5,0,0,0-.66,1.3l-3,10.77-.19.83c0,.08,0,.16,0,.24a2,2,0,0,0,0,.23C6,15.14,6.14,15.4,6.36,15.51ZM27,1,27.36,1V.33H22.43V1a3.78,3.78,0,0,1,1.31.27,1.25,1.25,0,0,1,.58,1.2,6.26,6.26,0,0,1-.15,1.09c-.07.33-.16.71-.27,1.13L22,11.43,16.83.33H12V1a3.49,3.49,0,0,1,1.12.2,1.51,1.51,0,0,1,.74.85l.11.25-2.7,9.85A13,13,0,0,1,10.18,15a1.85,1.85,0,0,1-1.35.72v.62h5v-.62a3.62,3.62,0,0,1-1.28-.26,1.19,1.19,0,0,1-.63-1.17,4.72,4.72,0,0,1,.05-.64q.1-.53.39-1.59l2.39-8.6L21,16.78h.6L24.91,4.6a15.29,15.29,0,0,1,1-2.78A1.51,1.51,0,0,1,27,1ZM35.78.33H28.64V1a5.16,5.16,0,0,1,1.41.25c.23.11.34.36.34.77a2.86,2.86,0,0,1-.06.54c0,.21-.11.47-.19.77L27.19,14.05a2.47,2.47,0,0,1-.68,1.29,2.66,2.66,0,0,1-1.27.42v.62h7.15v-.62A5.09,5.09,0,0,1,31,15.51c-.22-.11-.33-.37-.33-.77a2,2,0,0,1,0-.23,2,2,0,0,1,0-.24l.19-.83,3-10.77a2.5,2.5,0,0,1,.66-1.3A2.76,2.76,0,0,1,35.78,1Zm12.76,4.6.87-4.6H36.22l-.93,4.1.62.16A6.52,6.52,0,0,1,38,2a5.21,5.21,0,0,1,3-.86L37.55,14.05a2.24,2.24,0,0,1-1,1.5,3.7,3.7,0,0,1-1.51.21v.62H43v-.62a5.79,5.79,0,0,1-1.61-.24c-.26-.1-.39-.36-.39-.77a1.48,1.48,0,0,1,0-.21,2,2,0,0,1,0-.27l.2-.83L44.58,1.16a3.77,3.77,0,0,1,2,.52,3.74,3.74,0,0,1,1.31,3.2Zm4,9.81a.93.93,0,0,1,0-.23,2,2,0,0,1,0-.24l.18-.83,3-10.77a2.42,2.42,0,0,1,.67-1.3A2.72,2.72,0,0,1,57.72,1V.33H50.57V1A5.26,5.26,0,0,1,52,1.2c.23.11.34.36.34.77a2.28,2.28,0,0,1-.07.54,7.71,7.71,0,0,1-.19.77l-3,10.77a2.4,2.4,0,0,1-.68,1.29,2.58,2.58,0,0,1-1.26.42v.62h7.14v-.62a5.07,5.07,0,0,1-1.41-.25C52.69,15.4,52.58,15.14,52.58,14.74Zm32-3.13.57.11-1.4,4.66H63.34v-.57a3.65,3.65,0,0,0,1.46-.34c.29-.16.43-.51.43-1,0-.18,0-.61-.13-1.29,0-.14-.09-.73-.23-1.75H59.69l-1.4,2.44a3.38,3.38,0,0,0-.25.54,1.64,1.64,0,0,0-.11.56q0,.5.3.63a4.41,4.41,0,0,0,1.25.25v.57H54.76v-.57a3.36,3.36,0,0,0,1-.43,4.58,4.58,0,0,0,1-1.27L65.7,0h.62l2.3,13.72a3.49,3.49,0,0,0,.56,1.7,2.34,2.34,0,0,0,1.29.37v0a2.58,2.58,0,0,0,1.26-.42,2.46,2.46,0,0,0,.68-1.3L75.35,3.28c.09-.3.16-.56.2-.77A2.86,2.86,0,0,0,75.61,2c0-.41-.11-.66-.34-.77A5.17,5.17,0,0,0,73.85,1V.33h7.61V1a4.77,4.77,0,0,0-1.69.39A2.27,2.27,0,0,0,79,2.67L75.92,14.12c0,.13,0,.25-.07.36a2.21,2.21,0,0,0,0,.39.59.59,0,0,0,.35.57,2.33,2.33,0,0,0,1,.17,10.06,10.06,0,0,0,4.28-.84A7.67,7.67,0,0,0,84.6,11.61ZM64.7,10.44,63.81,4.6l-3.55,5.84Zm38,4.32a.71.71,0,0,1,0-.16s0-.16.07-.34l.2-.83L106,2.67a2.43,2.43,0,0,1,.79-1.39A2.78,2.78,0,0,1,107.9,1V.33h-7.15V1a4.45,4.45,0,0,1,1.27.19.81.81,0,0,1,.47.83,2.73,2.73,0,0,1-.07.57c0,.22-.1.47-.17.74l-1.14,4.16h-5.7L96.7,2.67a2.27,2.27,0,0,1,.73-1.33A4.77,4.77,0,0,1,99.12,1V.33H91.51V1a5.09,5.09,0,0,1,1.42.25c.22.11.33.36.33.77a2.93,2.93,0,0,1-.08.58c-.05.24-.1.48-.17.73L90.07,14a2.73,2.73,0,0,1-.65,1.29,2.47,2.47,0,0,1-1.3.43v.62h7.15v-.62a5.13,5.13,0,0,1-1.42-.24c-.21-.1-.31-.34-.31-.72a3.11,3.11,0,0,1,0-.57c0-.16.1-.43.19-.8L95.12,8.5h5.7L99.31,14a2.21,2.21,0,0,1-.74,1.33,4.36,4.36,0,0,1-1.69.39v.62h7.63v-.62a4.72,4.72,0,0,1-1.25-.17A.8.8,0,0,1,102.73,14.76Zm13.38.24a10.07,10.07,0,0,1-3.72.61,1.86,1.86,0,0,1-1.08-.21.67.67,0,0,1-.26-.54,2.36,2.36,0,0,1,0-.32,3.38,3.38,0,0,1,.09-.41l1.58-5.86a5.51,5.51,0,0,1,2.75.47,2,2,0,0,1,.7,1.75c0,.11,0,.25,0,.41s0,.37-.07.6l.66.11,1.78-6.56L117.89,5a4.63,4.63,0,0,1-1.65,2.12A10,10,0,0,1,113,7.5l1.43-5.33a1.6,1.6,0,0,1,.45-.86,2.07,2.07,0,0,1,1.23-.23c1.86,0,3.1.41,3.71,1.23a4.32,4.32,0,0,1,.56,2.47l.65.11,1-4.56H109.1V1a5.1,5.1,0,0,1,1.43.25c.21.11.32.36.32.77a3.63,3.63,0,0,1-.07.57c0,.22-.11.47-.18.74l-2.95,10.77a2.4,2.4,0,0,1-.68,1.29,2.58,2.58,0,0,1-1.26.42v.62H119l1.42-4.66-.58-.11A7.17,7.17,0,0,1,116.11,15ZM144.36,2.17,142.93,7.5a10.13,10.13,0,0,0,3.27-.41A4.69,4.69,0,0,0,147.84,5l.67.08-1.78,6.56-.66-.11c0-.23.06-.43.07-.6s0-.3,0-.41a2,2,0,0,0-.7-1.75,5.51,5.51,0,0,0-2.75-.47l-1.58,5.86a3.38,3.38,0,0,0-.09.41,2.36,2.36,0,0,0,0,.32.67.67,0,0,0,.26.54,1.86,1.86,0,0,0,1.08.21,10.07,10.07,0,0,0,3.72-.61,7.14,7.14,0,0,0,3.73-3.39l.58.11L149,16.38H131l-2.59-7.93h-.68l-1.42,5-.2.83,0,.2a1.77,1.77,0,0,0,0,.23c0,.43.1.7.31.81a4.87,4.87,0,0,0,1.43.25v.62h-7.14v-.62a2.58,2.58,0,0,0,1.26-.42,2.4,2.4,0,0,0,.68-1.29l3-10.77.15-.57a4.09,4.09,0,0,0,.1-.79c0-.38-.11-.62-.32-.72A4.8,4.8,0,0,0,124,1V.33h6.6a10.58,10.58,0,0,1,3.42.43,3,3,0,0,1,2.24,3.05,4,4,0,0,1-.38,1.6A4,4,0,0,1,134.66,7a5.47,5.47,0,0,1-1.45.8c-.33.11-.85.25-1.54.42a4.73,4.73,0,0,0,.16.46l1.85,5.42a2.81,2.81,0,0,0,.8,1.38,2.42,2.42,0,0,0,1.23.32,2.53,2.53,0,0,0,1.22-.41,2.47,2.47,0,0,0,.68-1.29l2.94-10.77c.07-.27.13-.52.18-.74A2.73,2.73,0,0,0,140.8,2c0-.41-.11-.66-.32-.77A5.1,5.1,0,0,0,139.05,1V.33H152l-1,4.56-.65-.11a4.32,4.32,0,0,0-.56-2.47c-.61-.82-1.85-1.23-3.71-1.23a2.07,2.07,0,0,0-1.23.23A1.67,1.67,0,0,0,144.36,2.17ZM131.54,6.59a5,5,0,0,0,.77-1.32,4.68,4.68,0,0,0,.36-1.84,2.74,2.74,0,0,0-.5-1.67,2,2,0,0,0-1.7-.66,1,1,0,0,0-.72.22,2,2,0,0,0-.38.85l-1.45,5.49a10.33,10.33,0,0,0,1.91-.16A3.07,3.07,0,0,0,131.54,6.59Z",opacity:1,strokeColor:"",fillColor:"#192760",width:151.345,height:16.781,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"SignHere":case"Sign Here":t={iconName:"Sign Here",pathdata:"M6.38,1.9A2.56,2.56,0,0,0,6,3.34a2.49,2.49,0,0,0,.44,1.45,3.9,3.9,0,0,0,.73.76l2.07,1.7a9.34,9.34,0,0,1,1.87,2.06,4.6,4.6,0,0,1,.78,2.63,4.78,4.78,0,0,1-1.5,3.43A5.46,5.46,0,0,1,6.23,16.9a7.34,7.34,0,0,1-1.31-.12,7.48,7.48,0,0,1-1.31-.36L3,16.2l-.42-.14a1.12,1.12,0,0,0-.27,0,.71.71,0,0,0-.57.19,2.85,2.85,0,0,0-.38.67H.63l.87-5.38.69,0a10.34,10.34,0,0,0,.2,1.68,3.82,3.82,0,0,0,2,2.5,3.42,3.42,0,0,0,1.5.32,2.76,2.76,0,0,0,2.23-.92A3.14,3.14,0,0,0,8.94,13c0-1-1-2.29-2.94-3.82S3.06,6.08,3.06,4.71A4.59,4.59,0,0,1,4.35,1.42,4.76,4.76,0,0,1,8,.06,6.71,6.71,0,0,1,9.29.19a4.78,4.78,0,0,1,.79.2l.61.2.41.1a2.76,2.76,0,0,0,.37,0,1,1,0,0,0,.65-.18A1.75,1.75,0,0,0,12.5.12h.72l-1,4.8-.62-.08-.09-.79a4.45,4.45,0,0,0-.69-1.91A2.78,2.78,0,0,0,8.39.89,2.2,2.2,0,0,0,6.38,1.9ZM22.8.39H15.66V1a4.71,4.71,0,0,1,1.41.25c.23.11.34.36.34.77a2.86,2.86,0,0,1-.06.54c0,.21-.11.47-.19.77L14.21,14.11a2.47,2.47,0,0,1-.68,1.29,2.62,2.62,0,0,1-1.27.42v.62h7.15v-.62A4.63,4.63,0,0,1,18,15.56c-.22-.1-.33-.36-.33-.77a1.8,1.8,0,0,1,0-.22c0-.08,0-.16,0-.24l.19-.83,3-10.77a2.5,2.5,0,0,1,.66-1.3A2.76,2.76,0,0,1,22.8,1ZM38.09,9.14V8.52H31.18v.62a5.05,5.05,0,0,1,1.44.28c.22.1.32.35.32.75a13.35,13.35,0,0,1-.54,2.54,19.13,19.13,0,0,1-.54,1.87A1.85,1.85,0,0,1,31,15.66a3.77,3.77,0,0,1-1.78.35A3.71,3.71,0,0,1,27,15.38c-1.09-.77-1.64-2.13-1.64-4.08a13.74,13.74,0,0,1,1.78-6.69q2.05-3.72,5-3.72a2.93,2.93,0,0,1,3,1.86,6.09,6.09,0,0,1,.4,2.48l.69.08L37.44,0h-.71a2.44,2.44,0,0,1-.41.53.82.82,0,0,1-.58.2A9.14,9.14,0,0,1,34.33.36,9.23,9.23,0,0,0,31.73,0a9.4,9.4,0,0,0-7.46,3.42,10.46,10.46,0,0,0-2.65,7,5.88,5.88,0,0,0,2.2,4.83,7.77,7.77,0,0,0,5,1.64A13.06,13.06,0,0,0,32,16.52a14.26,14.26,0,0,0,2.33-.75l.67-.3,1.2-4.36a4.15,4.15,0,0,1,.62-1.59A2.28,2.28,0,0,1,38.09,9.14ZM50.36,1a3.36,3.36,0,0,1,1.31.27,1.25,1.25,0,0,1,.58,1.2,6.26,6.26,0,0,1-.15,1.09c-.07.33-.16.7-.27,1.13L50,11.48,44.76.39H39.93V1a3.49,3.49,0,0,1,1.12.2,1.51,1.51,0,0,1,.74.85l.1.25L39.2,12.16a12.62,12.62,0,0,1-1.09,2.93,1.86,1.86,0,0,1-1.35.73v.62h5v-.62a3.62,3.62,0,0,1-1.28-.26,1.21,1.21,0,0,1-.63-1.17,4.72,4.72,0,0,1,0-.64q.1-.52.39-1.59l2.39-8.6,6.23,13.28h.6L52.84,4.66a15.29,15.29,0,0,1,1-2.78A1.52,1.52,0,0,1,55,1.05l.34,0V.39H50.36Zm22.33,13.8a.66.66,0,0,1,0-.15c0-.05,0-.16.07-.34l.2-.83L75.91,2.73a2.43,2.43,0,0,1,.79-1.39A2.78,2.78,0,0,1,77.86,1V.39H70.71V1A4.45,4.45,0,0,1,72,1.2a.81.81,0,0,1,.47.83,2.73,2.73,0,0,1-.07.57c0,.22-.1.47-.17.74L71.07,7.5h-5.7l1.29-4.77a2.27,2.27,0,0,1,.73-1.33A4.36,4.36,0,0,1,69.08,1V.39H61.47V1a4.73,4.73,0,0,1,1.42.25c.22.11.33.36.33.77a2.93,2.93,0,0,1-.08.58c0,.24-.1.48-.17.73L60,14.1a2.73,2.73,0,0,1-.65,1.29,2.47,2.47,0,0,1-1.3.43v.62h7.15v-.62a5.13,5.13,0,0,1-1.42-.24c-.21-.1-.31-.34-.31-.72a3,3,0,0,1,0-.57c0-.16.1-.43.19-.8l1.35-4.94h5.7L69.27,14.1a2.21,2.21,0,0,1-.74,1.33,4.77,4.77,0,0,1-1.69.39v.62h7.63v-.62a4.72,4.72,0,0,1-1.25-.17A.82.82,0,0,1,72.69,14.81Zm13.38.25a10.28,10.28,0,0,1-3.72.61,1.86,1.86,0,0,1-1.08-.21.67.67,0,0,1-.26-.54,2.23,2.23,0,0,1,0-.32,3.38,3.38,0,0,1,.09-.41l1.58-5.86a5.51,5.51,0,0,1,2.75.47,2,2,0,0,1,.7,1.75c0,.11,0,.24,0,.41s0,.37-.07.59l.66.12,1.78-6.56L87.85,5a4.75,4.75,0,0,1-1.64,2.12,10.13,10.13,0,0,1-3.27.41l1.43-5.33a1.56,1.56,0,0,1,.45-.86,2.07,2.07,0,0,1,1.23-.23c1.86,0,3.1.41,3.71,1.23a4.32,4.32,0,0,1,.56,2.47L91,5,92,.39H79.06V1a4.75,4.75,0,0,1,1.43.25c.21.11.32.36.32.77a2.73,2.73,0,0,1-.07.57c0,.22-.11.47-.18.74l-3,10.77a2.4,2.4,0,0,1-.68,1.29,2.58,2.58,0,0,1-1.26.42v.62H89l1.41-4.66-.58-.11A7.22,7.22,0,0,1,86.07,15.06ZM114.32,2.23l-1.43,5.33a10.13,10.13,0,0,0,3.27-.41A4.75,4.75,0,0,0,117.8,5l.67.08-1.78,6.56-.66-.12c0-.22.06-.42.07-.59s0-.3,0-.41a2,2,0,0,0-.71-1.75,5.51,5.51,0,0,0-2.75-.47l-1.58,5.86a3.38,3.38,0,0,0-.09.41,2.23,2.23,0,0,0,0,.32.67.67,0,0,0,.26.54,1.86,1.86,0,0,0,1.08.21,10.28,10.28,0,0,0,3.72-.61,7.22,7.22,0,0,0,3.73-3.39l.58.11-1.41,4.66h-18L98.33,8.51h-.68l-1.42,5-.2.83,0,.2a1.77,1.77,0,0,0,0,.23c0,.43.1.7.31.8a4.51,4.51,0,0,0,1.43.26v.62H90.59v-.62a2.58,2.58,0,0,0,1.26-.42,2.4,2.4,0,0,0,.68-1.29l3-10.77.15-.57a4.09,4.09,0,0,0,.1-.79c0-.38-.11-.62-.32-.73A5.3,5.3,0,0,0,94,1V.39h6.6A10.58,10.58,0,0,1,104,.82a3,3,0,0,1,2.24,3.05,4,4,0,0,1-.38,1.6A4.06,4.06,0,0,1,104.62,7a5.32,5.32,0,0,1-1.45.8c-.33.11-.84.25-1.54.42.08.24.13.4.16.46l1.85,5.42a2.81,2.81,0,0,0,.8,1.38,2.42,2.42,0,0,0,1.23.32,2.64,2.64,0,0,0,1.22-.41,2.47,2.47,0,0,0,.68-1.29l2.94-10.77c.07-.27.13-.52.18-.74a2.73,2.73,0,0,0,.07-.57c0-.41-.11-.66-.32-.77A4.75,4.75,0,0,0,109,1V.39h12.93l-1,4.56-.64-.11a4.39,4.39,0,0,0-.57-2.47c-.61-.82-1.85-1.23-3.71-1.23a2.07,2.07,0,0,0-1.23.23A1.7,1.7,0,0,0,114.32,2.23ZM101.5,6.64a4.76,4.76,0,0,0,.77-1.31,4.68,4.68,0,0,0,.36-1.84,2.72,2.72,0,0,0-.5-1.67,2,2,0,0,0-1.7-.66.94.94,0,0,0-.71.22,1.81,1.81,0,0,0-.39.85L97.88,7.72a10.33,10.33,0,0,0,1.91-.16A3,3,0,0,0,101.5,6.64Z",opacity:1,strokeColor:"",fillColor:"#192760",width:121.306,height:16.899,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Accepted":t={iconName:"Accepted",pathdata:"M22.409294,0.00021190348 C22.64747,0.0056831966 22.875833,0.11701412 23.023336,0.32638185 23.631345,1.1873664 25.36437,2.8183636 27.4584,4.1123583 28.000408,4.4483535 28.015407,5.227338 27.477398,5.5713293 23.803344,7.9272954 12.881201,15.464245 9.4751583,23.800168 9.2091556,24.452168 8.3321453,24.542164 7.9521352,23.95016 6.0691143,21.014182 1.8990528,14.526234 0.095028103,11.832258 -0.13796928,11.485277 0.081027784,11.023275 0.49603404,10.97927 1.9670546,10.824272 4.8490969,10.421291,6.5811144,9.5293013 6.9811216,9.3233086 7.4691268,9.5782811 7.5601316,10.019287 7.847138,11.400286 8.4021459,13.83224 8.952148,14.781236 8.952148,14.781236 16.385246,3.2303471 21.985326,0.10638282 22.119951,0.031756414 22.266389,-0.003070501 22.409294,0.00021190348 z",opacity:1,strokeColor:"",fillColor:"#516c30",width:27.873,height:24.346,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"Rejected":t={iconName:"Rejected",pathdata:"M3.8779989,0 L11.294,7.4140023 18.710001,0 22.588001,3.8779911 15.172998,11.293032 22.588001,18.707033 18.710001,22.586 11.294,15.169985 3.8779989,22.586 0,18.707033 7.4150017,11.293032 0,3.8779911 z",opacity:1,strokeColor:"",fillColor:"#8a251a",width:22.588,height:22.586,stampFillColor:"#f6dedd",stampStrokeColor:""};break;case"Rejected_with_border":t={iconName:"Rejected_with_border",pathdata:"M3.8779989,0 L11.294,7.4140023 18.710001,0 22.588001,3.8779911 15.172998,11.293032 22.588001,18.707033 18.710001,22.586 11.294,15.169985 3.8779989,22.586 0,18.707033 7.4150017,11.293032 0,3.8779911 z",opacity:1,strokeColor:"",fillColor:"#192760",width:22.588,height:24.346,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"NotApproved":case"Not Approved":t={iconName:"Not Approved",pathdata:"M0,19.46a1.56,1.56,0,0,0,1.16-.9A19.84,19.84,0,0,0,2.1,15L4.42,2.84l-.09-.3a1.82,1.82,0,0,0-.64-1.06,2.41,2.41,0,0,0-1-.24V.48H6.88l4.49,13.64L13,5.78c.09-.52.17-1,.22-1.39a10.11,10.11,0,0,0,.13-1.34,1.83,1.83,0,0,0-.49-1.48,2.49,2.49,0,0,0-1.13-.33V.48H16v.76l-.29.06a1.42,1.42,0,0,0-1,1,23.7,23.7,0,0,0-.84,3.42L11,20.71h-.51L5.1,4.38,3,15c-.17.87-.28,1.53-.33,2a5.32,5.32,0,0,0,0,.79,1.69,1.69,0,0,0,.54,1.44,2.48,2.48,0,0,0,1.1.32v.76H0ZM17.73,4.53C19.54,1.51,21.55,0,23.79,0a4.4,4.4,0,0,1,3.66,1.92,8.52,8.52,0,0,1,1.43,5.19,17.56,17.56,0,0,1-2.53,9.07q-2.7,4.61-6.21,4.6a4.24,4.24,0,0,1-3.6-1.92,8.6,8.6,0,0,1-1.39-5.14A17.68,17.68,0,0,1,17.73,4.53ZM18.37,18c.33,1.19.93,1.78,1.8,1.78a2.83,2.83,0,0,0,2.22-1.29,16.41,16.41,0,0,0,2.06-4.93,35.53,35.53,0,0,0,1.06-4.83A28.26,28.26,0,0,0,25.9,4.6a5.86,5.86,0,0,0-.52-2.55A1.7,1.7,0,0,0,23.78,1Q21.2,1,19.45,7.53a33,33,0,0,0-1.33,8.26A8.15,8.15,0,0,0,18.37,18Zm11.08,1.48a2.34,2.34,0,0,0,1.3-.26,3,3,0,0,0,.85-1.85l3-15.85A3.54,3.54,0,0,0,32,2.56a8,8,0,0,0-1.82,3.16l-.53-.2.8-5H41.81l-.74,5.66-.54-.07c0-1.92-.41-3.24-1.13-3.94a2.6,2.6,0,0,0-1.74-.63L34.79,16.6l-.17,1a2.43,2.43,0,0,0,0,.33,2.26,2.26,0,0,0,0,.26c0,.5.11.82.33.95a3.94,3.94,0,0,0,1.39.3v.76H29.45Zm26.65.76H50.18v-.71a2.28,2.28,0,0,0,1.25-.41,1.64,1.64,0,0,0,.37-1.29c0-.22,0-.75-.11-1.58,0-.17-.08-.89-.2-2.15H47l-1.2,3c-.08.2-.15.42-.22.66a2.84,2.84,0,0,0-.09.69c0,.41.08.67.25.78a2.91,2.91,0,0,0,1.08.3v.71H42.79v-.71a2.44,2.44,0,0,0,.85-.53,5.59,5.59,0,0,0,.9-1.56L52.21.07h.53l2,16.88A5.46,5.46,0,0,0,55.2,19a1.36,1.36,0,0,0,.9.43Zm-4.76-7.31-.76-7.18-3,7.18Zm4.95,6.53a1.82,1.82,0,0,0,1-.5,3.56,3.56,0,0,0,.58-1.59L60.42,4.11c.06-.3.1-.6.15-.9a5.46,5.46,0,0,0,.06-.72c0-.52-.13-.86-.4-1a2.88,2.88,0,0,0-1.1-.23V.48h5.93a5,5,0,0,1,2.5.57c1.26.73,1.9,2.07,1.9,4a5.81,5.81,0,0,1-1.54,4.22,5.32,5.32,0,0,1-4,1.58l-.59,0-1.2-.11L61,16.6l-.17,1a2.72,2.72,0,0,0,0,.3,2.81,2.81,0,0,0,0,.29c0,.5.09.81.28.94a3.26,3.26,0,0,0,1.23.31v.76h-6Zm6-9.67.38.06H63a3,3,0,0,0,1.62-.36,2.87,2.87,0,0,0,1-1.18,7.28,7.28,0,0,0,.6-2,11.67,11.67,0,0,0,.22-2,4.4,4.4,0,0,0-.41-2,1.44,1.44,0,0,0-1.39-.79.71.71,0,0,0-.65.28,3.7,3.7,0,0,0-.32,1Zm5.61,9.69A1.86,1.86,0,0,0,69,18.94a3.54,3.54,0,0,0,.59-1.59L72.15,4.11q.09-.45.15-.9a5.73,5.73,0,0,0,.07-.72,1.1,1.1,0,0,0-.41-1,2.88,2.88,0,0,0-1.1-.23V.48h5.93a5,5,0,0,1,2.5.57c1.27.73,1.9,2.07,1.9,4a5.77,5.77,0,0,1-1.54,4.22,5.31,5.31,0,0,1-4,1.58l-.6,0-1.2-.11L72.74,16.6l-.17,1a2.72,2.72,0,0,0,0,.3c0,.1,0,.19,0,.29,0,.5.1.81.29.94a3.15,3.15,0,0,0,1.23.31v.76h-6.1Zm6.12-9.69.38.06h.33a3,3,0,0,0,1.62-.36,3,3,0,0,0,1-1.18,7.67,7.67,0,0,0,.59-2,11.67,11.67,0,0,0,.22-2,4.4,4.4,0,0,0-.41-2,1.43,1.43,0,0,0-1.38-.79.73.73,0,0,0-.66.28,3.7,3.7,0,0,0-.32,1Zm5.57,9.69a1.9,1.9,0,0,0,1.09-.52,3.56,3.56,0,0,0,.58-1.59L83.84,4.11c0-.27.09-.51.13-.71a7.08,7.08,0,0,0,.09-1c0-.47-.1-.77-.28-.9a3.53,3.53,0,0,0-1.22-.3V.48h5.68a6.57,6.57,0,0,1,3,.53q1.92,1,1.92,3.75a6.79,6.79,0,0,1-.32,2,5.23,5.23,0,0,1-1.08,1.9,4.56,4.56,0,0,1-1.25,1,11.62,11.62,0,0,1-1.33.52c.07.3.12.49.14.57l1.59,6.66a4.07,4.07,0,0,0,.69,1.7,1.72,1.72,0,0,0,1.13.41v.76H88.52l-2.23-9.76h-.58L84.49,16.6l-.17,1a1,1,0,0,0,0,.25,2.62,2.62,0,0,0,0,.28c0,.53.09.86.26,1a3.11,3.11,0,0,0,1.24.32v.76H79.63ZM87.55,9.3A2.59,2.59,0,0,0,89,8.17a7.24,7.24,0,0,0,.66-1.62A8.18,8.18,0,0,0,90,4.29a4.32,4.32,0,0,0-.43-2,1.5,1.5,0,0,0-1.45-.81.71.71,0,0,0-.62.26,2.78,2.78,0,0,0-.33,1.05L85.91,9.5A6.63,6.63,0,0,0,87.55,9.3Zm8.72-4.77Q99,0,102.32,0A4.37,4.37,0,0,1,106,1.92a8.46,8.46,0,0,1,1.44,5.19,17.58,17.58,0,0,1-2.54,9.07q-2.7,4.61-6.21,4.6a4.27,4.27,0,0,1-3.6-1.92,8.67,8.67,0,0,1-1.38-5.14A17.68,17.68,0,0,1,96.27,4.53ZM96.9,18c.33,1.19.93,1.78,1.8,1.78a2.83,2.83,0,0,0,2.22-1.29A16.63,16.63,0,0,0,103,13.54a37.1,37.1,0,0,0,1.06-4.83,29.49,29.49,0,0,0,.38-4.11,5.86,5.86,0,0,0-.51-2.55A1.71,1.71,0,0,0,102.31,1C100.6,1,99.15,3.17,98,7.53a33.42,33.42,0,0,0-1.33,8.26A8.57,8.57,0,0,0,96.9,18ZM114.35.48v.76a2.57,2.57,0,0,0-1.08.17,1.07,1.07,0,0,0-.5,1,2.53,2.53,0,0,0,0,.28,2.64,2.64,0,0,0,0,.28l1.07,11.76L117.77,6c.31-.71.59-1.41.84-2.11A5.25,5.25,0,0,0,119,2.19a.85.85,0,0,0-.38-.81,3.09,3.09,0,0,0-.95-.14V.48h4v.76a2.08,2.08,0,0,0-.73.45,5.35,5.35,0,0,0-.82,1.4l-7.79,17.69h-.66L110,5.74A22,22,0,0,0,109.46,2c-.16-.39-.58-.62-1.28-.71V.48Zm5.15,19a1.83,1.83,0,0,0,1.08-.52,3.42,3.42,0,0,0,.59-1.59l2.54-13.24c.06-.34.11-.64.15-.92a4.83,4.83,0,0,0,.06-.7c0-.5-.09-.81-.28-.94a3.14,3.14,0,0,0-1.22-.31V.48h11.12l-.87,5.6L132.11,6a7,7,0,0,0-.49-3c-.52-1-1.59-1.51-3.19-1.51-.55,0-.9.09-1.06.28A2.44,2.44,0,0,0,127,2.74L125.76,9.3a6.21,6.21,0,0,0,2.81-.51A6,6,0,0,0,130,6.18l.58.1L129,14.35l-.56-.14c0-.28,0-.52,0-.73s0-.37,0-.51a2.92,2.92,0,0,0-.61-2.15,3.55,3.55,0,0,0-2.37-.57l-1.36,7.2a4.79,4.79,0,0,0-.07.51,3.28,3.28,0,0,0,0,.39,1,1,0,0,0,.22.66,1.24,1.24,0,0,0,.93.26,6.43,6.43,0,0,0,3.21-.75,7.67,7.67,0,0,0,3.21-4.17l.5.13-1.22,5.74H119.5Zm12.79,0a1.87,1.87,0,0,0,1-.41,3.23,3.23,0,0,0,.71-1.71L136.5,4.11c.07-.38.13-.69.17-1a5.89,5.89,0,0,0,.05-.67c0-.5-.1-.81-.29-.94a3.32,3.32,0,0,0-1.22-.31V.48h6a5.35,5.35,0,0,1,4.63,2.22,10.11,10.11,0,0,1,1.58,6,13.3,13.3,0,0,1-2.34,7.84,8,8,0,0,1-6.86,3.7h-5.93ZM143.87,3.39a2.84,2.84,0,0,0-2.79-2,1.08,1.08,0,0,0-.91.31,1.93,1.93,0,0,0-.34.83L137,17.44a3.1,3.1,0,0,0-.06.39c0,.11,0,.21,0,.3a1.22,1.22,0,0,0,.24.84,1.26,1.26,0,0,0,.9.26q3.67,0,5.33-5.42a23.91,23.91,0,0,0,1-6.94A9.45,9.45,0,0,0,143.87,3.39Z",opacity:1,strokeColor:"",fillColor:"#8a251a",width:147.425,height:20.783,stampFillColor:"#f6dedd",stampStrokeColor:""};break;case"Draft":t={iconName:"Draft",pathdata:"M24.92,3Q22,.46,16.4.46h-11v.87a9.38,9.38,0,0,1,2.24.35q.54.23.54,1.08a3.24,3.24,0,0,1-.1.76c-.07.29-.17.65-.31,1.08L3.08,19.69a3.26,3.26,0,0,1-1.32,1.95A4.67,4.67,0,0,1,0,22.1V23H10.91q7.8,0,12.61-4.22a11.56,11.56,0,0,0,4.32-8.94A8.58,8.58,0,0,0,24.92,3ZM20.41,15.66a10.18,10.18,0,0,1-9.8,6.18A3.18,3.18,0,0,1,9,21.54a1,1,0,0,1-.46-.95,2.47,2.47,0,0,1,0-.35,3,3,0,0,1,.1-.44l5.24-17a1.91,1.91,0,0,1,.62-.95,2.81,2.81,0,0,1,1.66-.35c2.44,0,4.15.76,5.15,2.27a7.29,7.29,0,0,1,.94,4A17.63,17.63,0,0,1,20.41,15.66ZM49.75,9.74a5.84,5.84,0,0,0,2-2.16,5.1,5.1,0,0,0,.59-2.24c0-2.1-1.18-3.53-3.54-4.27A18.67,18.67,0,0,0,43.36.46H32.92v.87a8.79,8.79,0,0,1,2.24.35c.35.14.52.48.52,1a5.36,5.36,0,0,1-.17,1.11c-.06.23-.14.5-.23.8L30.61,19.7a3.26,3.26,0,0,1-1.08,1.81,4.44,4.44,0,0,1-2,.59V23H38.85V22.1a8.54,8.54,0,0,1-2.28-.36c-.32-.15-.49-.53-.49-1.13,0-.11,0-.21,0-.32a1.15,1.15,0,0,1,.06-.28l.31-1.16,2.25-7h1.07L43.89,23h7.64V22.1a4.27,4.27,0,0,1-2.07-.47,3.91,3.91,0,0,1-1.27-1.93l-2.92-7.6a4.67,4.67,0,0,1-.25-.65c1.1-.23,1.91-.42,2.43-.59A8.49,8.49,0,0,0,49.75,9.74ZM46,7.39a6.73,6.73,0,0,1-1.21,1.84,5,5,0,0,1-2.72,1.29,19.56,19.56,0,0,1-3,.23L41.38,3A2.54,2.54,0,0,1,42,1.85a1.76,1.76,0,0,1,1.14-.31,3.38,3.38,0,0,1,2.69.93,3.52,3.52,0,0,1,.79,2.34A5.94,5.94,0,0,1,46,7.39Zm27.9,11.85L70.29,0h-1L55.21,19.78a6.61,6.61,0,0,1-1.66,1.78,5.3,5.3,0,0,1-1.55.6V23h7.45v-.81a8,8,0,0,1-2-.34.85.85,0,0,1-.47-.89,2,2,0,0,1,.17-.79,5.32,5.32,0,0,1,.4-.75L59.8,16H68c.22,1.44.35,2.25.37,2.45a16,16,0,0,1,.2,1.81,1.51,1.51,0,0,1-.67,1.47,6.38,6.38,0,0,1-2.31.46V23H77.1v-.81a4.28,4.28,0,0,1-2.28-.55A4.47,4.47,0,0,1,73.93,19.24ZM60.7,14.64l5.62-8.19,1.4,8.19ZM84,.46h20.2l-1.61,6.39-1-.15a5.61,5.61,0,0,0-.88-3.43Q99.2,1.52,94.86,1.51a3.56,3.56,0,0,0-1.76.3A2.05,2.05,0,0,0,92.34,3L90.1,10.5A16.53,16.53,0,0,0,95,9.91c.77-.33,1.62-1.32,2.56-3l1.06.12-2.82,9.2-1-.17c0-.33.08-.61.1-.85s0-.43,0-.56a2.76,2.76,0,0,0-1-2.38c-.66-.49-2.07-.73-4.23-.73l-2.5,8.22a3.56,3.56,0,0,0-.09.39,1.55,1.55,0,0,0,0,.37,1.32,1.32,0,0,0,1,1.33,5.52,5.52,0,0,0,1.78.21V23H78.58V22.1a4.35,4.35,0,0,0,2-.61,3.33,3.33,0,0,0,1.06-1.8L86.32,4.6c.09-.31.16-.58.23-.81a5.05,5.05,0,0,0,.16-1.1c0-.53-.17-.87-.52-1A8.7,8.7,0,0,0,84,1.33Zm24.1,0h20.89l-1.37,6.46-1-.08c-.07-2.2-.76-3.69-2.09-4.49a6.61,6.61,0,0,0-3.2-.72L116,18.84,115.7,20a2.63,2.63,0,0,0-.07.38,1.51,1.51,0,0,0,0,.3c0,.57.2.94.61,1.08a11.19,11.19,0,0,0,2.56.34V23H106.2V22.1a6.49,6.49,0,0,0,2.4-.3,3.19,3.19,0,0,0,1.56-2.1l5.58-18.07a9.07,9.07,0,0,0-4.83,1.2,9.52,9.52,0,0,0-3.34,3.61l-1-.23Z",opacity:1,strokeColor:"",fillColor:"#192760",width:128.941,height:22.97,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Final":t={iconName:"Final",pathdata:"M24.94,6l-1.06-.13a4.37,4.37,0,0,0-.91-3q-1.51-1.54-6-1.54a4.28,4.28,0,0,0-1.83.26,1.8,1.8,0,0,0-.78,1.08L12,9.21a20.26,20.26,0,0,0,5.15-.52A6.49,6.49,0,0,0,19.8,6.1l1.1.1L18,14.27l-1.09-.15a6.34,6.34,0,0,0,.11-.74c0-.22,0-.38,0-.5a2.26,2.26,0,0,0-1-2.09c-.68-.42-2.15-.63-4.39-.63L9,17.37a3.09,3.09,0,0,0-.1.34,1.22,1.22,0,0,0,0,.32,1.18,1.18,0,0,0,1,1.17,7,7,0,0,0,1.86.18v.77H0v-.77a5.14,5.14,0,0,0,2.11-.53,3,3,0,0,0,1.1-1.58L8.06,4c.09-.27.17-.5.23-.7a3.74,3.74,0,0,0,.18-1,.83.83,0,0,0-.55-.89,10.94,10.94,0,0,0-2.33-.3V.4h21Zm8.54,12.11a1.49,1.49,0,0,1,0-.28,2.46,2.46,0,0,1,.07-.29l.3-1L38.76,3.29a2.93,2.93,0,0,1,1.09-1.6A5.42,5.42,0,0,1,42,1.17V.4H30.17v.77a10.52,10.52,0,0,1,2.34.31.88.88,0,0,1,.56.94,2.58,2.58,0,0,1-.11.67c-.07.26-.18.57-.32,1L27.79,17.28a2.94,2.94,0,0,1-1.12,1.59,5.28,5.28,0,0,1-2.09.51v.77H36.36v-.77A10.22,10.22,0,0,1,34,19.07.89.89,0,0,1,33.48,18.12ZM66.19,2.24a2.53,2.53,0,0,1,1.87-1l.56-.06V.4H60.5v.77a8,8,0,0,1,2.16.33,1.47,1.47,0,0,1,1,1.48,5.61,5.61,0,0,1-.25,1.34c-.11.4-.25.87-.43,1.38l-3.08,8.35L51.26.4h-8v.77a8.44,8.44,0,0,1,1.86.24,2.26,2.26,0,0,1,1.22,1.05l.17.31L42.11,14.88a13.74,13.74,0,0,1-1.8,3.61,3.36,3.36,0,0,1-2.22.89v.77h8.23v-.77a7.75,7.75,0,0,1-2.1-.31,1.45,1.45,0,0,1-1-1.44,3.56,3.56,0,0,1,.1-.79,16.15,16.15,0,0,1,.64-2L47.85,4.31,58.11,20.64h1l5.5-15A15.48,15.48,0,0,1,66.19,2.24Zm23,17.13v.78H78.08v-.71A7.47,7.47,0,0,0,80.49,19a1.25,1.25,0,0,0,.7-1.29A13.26,13.26,0,0,0,81,16.16c0-.18-.16-.89-.39-2.15H72.06l-2.3,3a3.7,3.7,0,0,0-.42.66,1.54,1.54,0,0,0-.18.69.74.74,0,0,0,.49.78,10.28,10.28,0,0,0,2.06.3v.71H63.94v-.71a6.43,6.43,0,0,0,1.63-.53,6.63,6.63,0,0,0,1.72-1.56L82,0h1l3.78,16.88A3.69,3.69,0,0,0,87.7,19,3.53,3.53,0,0,0,89.24,19.37Zm-8.93-6.53L78.86,5.65,73,12.84Zm32.8,1.44a11.51,11.51,0,0,1-5.23,3.88,21.36,21.36,0,0,1-7,1A4.88,4.88,0,0,1,99.22,19a.74.74,0,0,1-.58-.71,2.33,2.33,0,0,1,0-.48c0-.13.08-.28.13-.43L104,3.29a2.72,2.72,0,0,1,1.19-1.64,9.4,9.4,0,0,1,2.79-.48V.4H95.4v.77a10.42,10.42,0,0,1,2.34.31.88.88,0,0,1,.56.94,2.58,2.58,0,0,1-.11.67c-.07.25-.17.57-.31.94L93,17.27a2.92,2.92,0,0,1-1.12,1.6,4.59,4.59,0,0,1-1.71.47v.81h21.55l2.32-5.74Z",opacity:1,strokeColor:"",fillColor:"#516c30",width:114.058,height:20.639,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"Completed":t={iconName:"Completed",pathdata:"M16.37,0,15.08,6.9l-.79-.17c0-.41,0-.66,0-.73a2.73,2.73,0,0,0,0-.32,5.33,5.33,0,0,0-.94-3.47A3,3,0,0,0,11,1.07c-2,0-3.68,1.51-5.13,4.55a18.84,18.84,0,0,0-2,8.29q0,3.06,1.2,4.2a3.82,3.82,0,0,0,2.64,1.13,5.3,5.3,0,0,0,3.51-1.43,10.75,10.75,0,0,0,1.78-2.09l.77.65a9.32,9.32,0,0,1-3.12,3.35A7,7,0,0,1,7,20.81a6.66,6.66,0,0,1-5-2.08,7.72,7.72,0,0,1-2-5.57A14.57,14.57,0,0,1,3.05,3.92Q6.1,0,10.29,0A8.92,8.92,0,0,1,13,.43a9.09,9.09,0,0,0,1.65.43.72.72,0,0,0,.6-.23A2.55,2.55,0,0,0,15.6,0ZM32.83,7.11a15.24,15.24,0,0,1-3.11,9.07q-3.31,4.61-7.63,4.6a5.63,5.63,0,0,1-4.42-1.92A7.47,7.47,0,0,1,16,13.72a15.27,15.27,0,0,1,3.18-9.19Q22.46,0,26.57,0a5.82,5.82,0,0,1,4.5,1.92A7.35,7.35,0,0,1,32.83,7.11ZM29.16,4.6a4.92,4.92,0,0,0-.63-2.55,2.14,2.14,0,0,0-2-1.06Q23.4,1,21.24,7.53a27.45,27.45,0,0,0-1.63,8.26A6.68,6.68,0,0,0,19.92,18a2.24,2.24,0,0,0,2.2,1.78,3.71,3.71,0,0,0,2.73-1.29,15,15,0,0,0,2.54-4.93,30.56,30.56,0,0,0,1.3-4.83A23,23,0,0,0,29.16,4.6Zm21.2,13.62a3.83,3.83,0,0,1,.08-.75,8.6,8.6,0,0,1,.19-.88L53.75,3.31a3,3,0,0,1,.85-1.67,2.72,2.72,0,0,1,1.21-.4V.48H50.42L42.66,14.39,41.21.48h-5.8v.76a4.65,4.65,0,0,1,1.45.21c.26.11.38.37.38.78a4.57,4.57,0,0,1-.08.75c-.06.28-.13.61-.23,1L34.34,15a16.85,16.85,0,0,1-1.16,3.65,1.9,1.9,0,0,1-1.42.86v.76h5.3v-.76a3.22,3.22,0,0,1-1.32-.29A1.48,1.48,0,0,1,35,17.74a8.32,8.32,0,0,1,.17-1.42c.07-.37.17-.82.3-1.37L38.06,4.23l1.71,16.38h.71L50,3.76l-3.2,13.58A2.84,2.84,0,0,1,46,19a4.06,4.06,0,0,1-1.76.49v.76h7.93v-.76a4.79,4.79,0,0,1-1.49-.31Q50.36,19,50.36,18.22ZM67.69,9.29a7.39,7.39,0,0,1-4.89,1.58l-.73,0-1.48-.11L59.21,16.6l-.21,1a1,1,0,0,0,0,.3,2.83,2.83,0,0,0,0,.29c0,.5.12.81.35.94a4.74,4.74,0,0,0,1.51.31v.76H53.31v-.76a2.52,2.52,0,0,0,1.33-.52,3.18,3.18,0,0,0,.72-1.59L58.48,4.11q.1-.45.18-.9a4.48,4.48,0,0,0,.08-.72,1,1,0,0,0-.49-1,4.36,4.36,0,0,0-1.36-.23V.48h7.29a7.29,7.29,0,0,1,3.07.57,4,4,0,0,1,2.33,4A5.22,5.22,0,0,1,67.69,9.29Zm-1.8-5a3.65,3.65,0,0,0-.51-2,1.85,1.85,0,0,0-1.7-.79,1,1,0,0,0-.8.28,3.27,3.27,0,0,0-.4,1l-1.66,7,.47.06h.41a4.37,4.37,0,0,0,2-.36,3.14,3.14,0,0,0,1.2-1.18,6.51,6.51,0,0,0,.74-2A9.87,9.87,0,0,0,65.89,4.25Zm16.9,10.1a8.71,8.71,0,0,1-3.35,3.88,9.36,9.36,0,0,1-4.53,1,2.15,2.15,0,0,1-1-.21.75.75,0,0,1-.37-.71,3.18,3.18,0,0,1,0-.47c0-.14,0-.28.08-.44l3.3-14.08a2.94,2.94,0,0,1,.77-1.64,4.47,4.47,0,0,1,1.79-.48V.48h-8v.76a4.8,4.8,0,0,1,1.5.31c.23.13.35.44.35.94a4.36,4.36,0,0,1-.06.67c0,.26-.12.57-.21,1L69.9,17.34a3.18,3.18,0,0,1-.72,1.6,2.53,2.53,0,0,1-1.34.52v.76H81.91l1.49-5.74ZM85.73,1.24a4.59,4.59,0,0,1,1.5.31c.23.13.34.44.34.94a3.84,3.84,0,0,1-.07.7c0,.28-.11.58-.19.92L84.2,17.35a3.18,3.18,0,0,1-.72,1.59,2.27,2.27,0,0,1-1.06.47h-.07v.8H96.2l1.5-5.74-.62-.13a8.14,8.14,0,0,1-3.94,4.17,9.39,9.39,0,0,1-3.94.75A1.75,1.75,0,0,1,88.06,19a.87.87,0,0,1-.27-.66,3.28,3.28,0,0,1,0-.39,5,5,0,0,1,.09-.51l1.67-7.2a5.16,5.16,0,0,1,2.91.57A2.58,2.58,0,0,1,93.24,13c0,.14,0,.31,0,.51s0,.45-.07.73l.7.14,1.88-8.07L95,6.18a5.62,5.62,0,0,1-1.74,2.61,9.05,9.05,0,0,1-3.45.51l1.51-6.56a2.23,2.23,0,0,1,.47-1.06,2,2,0,0,1,1.3-.28c2,0,3.29.5,3.93,1.51a6.13,6.13,0,0,1,.6,3l.68.13L99.4.48H85.73ZM114,6.14l.92-5.66h-14l-1,5,.66.2a7.81,7.81,0,0,1,2.23-3.16,4.91,4.91,0,0,1,3.23-1.06l-3.73,15.85a2.84,2.84,0,0,1-1,1.85,3.48,3.48,0,0,1-1.6.26v.76h8.4v-.76a5.82,5.82,0,0,1-1.71-.3c-.27-.13-.41-.45-.41-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.21-1,3.53-15.1a3.65,3.65,0,0,1,2.14.63c.89.7,1.35,2,1.39,3.94Zm9.44,12.38a9.39,9.39,0,0,1-3.94.75,1.77,1.77,0,0,1-1.14-.26.87.87,0,0,1-.27-.66,3.28,3.28,0,0,1,0-.39,5,5,0,0,1,.09-.51l1.67-7.2a5.12,5.12,0,0,1,2.91.57,2.58,2.58,0,0,1,.75,2.15c0,.14,0,.31,0,.51s0,.45-.07.73l.7.14L126,6.28l-.7-.1a5.78,5.78,0,0,1-1.74,2.61,9.16,9.16,0,0,1-3.46.51l1.51-6.56a2.14,2.14,0,0,1,.48-1.06,2,2,0,0,1,1.3-.28c2,0,3.28.5,3.92,1.51a6,6,0,0,1,.6,3l.68.13,1.08-5.6H116v.76a4.67,4.67,0,0,1,1.51.31c.22.13.34.44.34.94a4,4,0,0,1-.08.7c0,.28-.11.58-.18.92l-3.12,13.24a3.18,3.18,0,0,1-.72,1.59,2.56,2.56,0,0,1-1.34.52v.76h14.06l1.5-5.74-.62-.13A8.14,8.14,0,0,1,123.39,18.52Zm23.32-9.84a11.62,11.62,0,0,1-2.89,7.84,10.6,10.6,0,0,1-8.42,3.7h-7.29v-.76a2.58,2.58,0,0,0,1.18-.41,2.94,2.94,0,0,0,.88-1.71l3.11-13.23c.09-.38.16-.69.21-1a4.49,4.49,0,0,0,.07-.67c0-.5-.12-.81-.36-.94a4.8,4.8,0,0,0-1.5-.31V.48h7.36a7.16,7.16,0,0,1,5.69,2.22A8.72,8.72,0,0,1,146.71,8.68ZM143,6.87a8,8,0,0,0-.64-3.48,3.52,3.52,0,0,0-3.44-2,1.52,1.52,0,0,0-1.11.31,1.75,1.75,0,0,0-.41.83l-3.5,14.9c0,.14,0,.27-.07.39s0,.21,0,.3a1.06,1.06,0,0,0,.3.84,1.75,1.75,0,0,0,1.1.26q4.53,0,6.55-5.42A19.84,19.84,0,0,0,143,6.87Z",opacity:1,strokeColor:"",fillColor:"#516c30",width:146.706,height:20.811,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"ForPublicRelease":case"For Public Release":t={iconName:"For Public Release",pathdata:"M10.33.48l-.65,5.6L9.27,6a9.74,9.74,0,0,0-.36-3A2.27,2.27,0,0,0,6.57,1.4a.85.85,0,0,0-.71.26,2.67,2.67,0,0,0-.3,1.08L4.65,9.28a3.45,3.45,0,0,0,2-.52,6.65,6.65,0,0,0,1-2.59l.43.1L7,14.34l-.42-.14c0-.29,0-.54,0-.75s0-.38,0-.49a4.17,4.17,0,0,0-.39-2.09,1.91,1.91,0,0,0-1.71-.64l-1,7.21c0,.13,0,.24,0,.35s0,.21,0,.31a1.45,1.45,0,0,0,.38,1.17,1.17,1.17,0,0,0,.72.19v.76H0v-.76a1.31,1.31,0,0,0,.82-.54,4.39,4.39,0,0,0,.42-1.58L3.13,4.11c0-.27.06-.51.09-.71,0-.41.07-.73.07-1a1.34,1.34,0,0,0-.21-.9,2.13,2.13,0,0,0-.91-.3V.48ZM20.5,7.11a22.43,22.43,0,0,1-1.88,9.07q-2,4.61-4.62,4.6a3,3,0,0,1-2.67-1.92,10.91,10.91,0,0,1-1-5.14,22.46,22.46,0,0,1,1.92-9.19Q14.23,0,16.71,0a3.11,3.11,0,0,1,2.72,1.92A10.72,10.72,0,0,1,20.5,7.11ZM18.28,4.6a7.7,7.7,0,0,0-.38-2.55c-.26-.7-.65-1-1.19-1-1.28,0-2.35,2.17-3.22,6.53a43.69,43.69,0,0,0-1,8.26,10.72,10.72,0,0,0,.19,2.2c.24,1.18.69,1.77,1.33,1.77s1.16-.43,1.65-1.29a19.35,19.35,0,0,0,1.54-4.93A48.7,48.7,0,0,0,18,8.71,38.21,38.21,0,0,0,18.28,4.6Zm11.59.16a8.73,8.73,0,0,1-.24,2,5.64,5.64,0,0,1-.8,1.9,3.49,3.49,0,0,1-.93,1,7.31,7.31,0,0,1-1,.52c0,.3.08.49.1.57l1.18,6.66a4.54,4.54,0,0,0,.52,1.7,1.1,1.1,0,0,0,.83.41v.76H26.46l-1.65-9.76h-.43l-.91,6.14-.13,1a2,2,0,0,0,0,.25,2.62,2.62,0,0,0,0,.28,1.57,1.57,0,0,0,.2,1,1.77,1.77,0,0,0,.92.32v.76H19.86v-.76a1.33,1.33,0,0,0,.81-.52,4.35,4.35,0,0,0,.43-1.59L23,4.11c0-.27.07-.51.09-.71a8.23,8.23,0,0,0,.07-1,1.3,1.3,0,0,0-.21-.9,2.08,2.08,0,0,0-.91-.3V.48h4.22A3.79,3.79,0,0,1,28.44,1C29.4,1.66,29.87,2.91,29.87,4.76Zm-2.31-.47a5.77,5.77,0,0,0-.32-2,1.12,1.12,0,0,0-1.09-.81.5.5,0,0,0-.46.26,3.87,3.87,0,0,0-.24,1.05L24.52,9.5a3.73,3.73,0,0,0,1.22-.2,2.1,2.1,0,0,0,1.1-1.13,8.41,8.41,0,0,0,.49-1.62A10.75,10.75,0,0,0,27.56,4.29Zm14.92.78a7.06,7.06,0,0,1-1.14,4.22,3.5,3.5,0,0,1-3,1.58l-.44,0-.89-.11-.84,5.86-.12,1a1.45,1.45,0,0,0,0,.3,2.81,2.81,0,0,0,0,.29,1.38,1.38,0,0,0,.21.94,1.93,1.93,0,0,0,.91.31v.76H32.65v-.76a1.28,1.28,0,0,0,.8-.52,4.3,4.3,0,0,0,.44-1.59L35.77,4.11c0-.3.08-.6.11-.9a5.21,5.21,0,0,0,0-.72,1.29,1.29,0,0,0-.3-1,1.82,1.82,0,0,0-.81-.23V.48h4.4a3,3,0,0,1,1.86.57C42,1.78,42.48,3.12,42.48,5.07Zm-2.23-.82a5.74,5.74,0,0,0-.3-2,1.07,1.07,0,0,0-1-.79.5.5,0,0,0-.49.28,5.11,5.11,0,0,0-.24,1l-1,7,.28.06h.25a1.79,1.79,0,0,0,1.2-.36,2.88,2.88,0,0,0,.73-1.18,10.56,10.56,0,0,0,.44-2A15.74,15.74,0,0,0,40.25,4.25Zm12.91-3V.48H50v.76a1.46,1.46,0,0,1,.82.32A2,2,0,0,1,51.24,3a15,15,0,0,1-.14,1.57q0-.17-.15,1.17l-.89,6.16a29.63,29.63,0,0,1-1,4.77c-.55,1.63-1.31,2.44-2.28,2.44a1.59,1.59,0,0,1-1.38-.77,4.16,4.16,0,0,1-.5-2.23q0-.63.15-2c.06-.5.15-1.14.27-1.93l1.26-8.84a4.13,4.13,0,0,1,.46-1.66,1.66,1.66,0,0,1,1-.46V.48H43.34v.76a2,2,0,0,1,.9.3,1.3,1.3,0,0,1,.21.9,7.27,7.27,0,0,1,0,.75c0,.29-.07.59-.11.92l-1,7.24c-.16,1.14-.27,1.93-.32,2.38a19.16,19.16,0,0,0-.12,2,6.13,6.13,0,0,0,1,3.71,2.93,2.93,0,0,0,2.43,1.33c1.39,0,2.45-.9,3.17-2.69a29.58,29.58,0,0,0,1.23-5.61l1-6.74A24.45,24.45,0,0,1,52.3,2.1,1.22,1.22,0,0,1,53.16,1.24Zm7.14,9.82a5.87,5.87,0,0,1,.68,3,8.55,8.55,0,0,1-1,4.27,3.68,3.68,0,0,1-3.48,1.84H51.82v-.76a1.3,1.3,0,0,0,.72-.4,3.94,3.94,0,0,0,.52-1.71L55,4.1c0-.39.09-.72.12-1s0-.46,0-.6c0-.53-.07-.86-.23-1A1.64,1.64,0,0,0,54,1.24V.48h4.17a3.4,3.4,0,0,1,2.67,1,4.91,4.91,0,0,1,1,3.38,5.33,5.33,0,0,1-1.17,3.61,4.8,4.8,0,0,1-1.68,1.22A4.84,4.84,0,0,1,60.3,11.06Zm-1.66,2.45a3.81,3.81,0,0,0-.73-2.74,2.63,2.63,0,0,0-1.58-.52l-1,7.2a4,4,0,0,0-.05.4c0,.15,0,.32,0,.51a.9.9,0,0,0,.33.82,1.13,1.13,0,0,0,.59.12c1,0,1.67-.87,2.1-2.59A13.54,13.54,0,0,0,58.64,13.51Zm.12-5.29A5.92,5.92,0,0,0,59.4,6.1a12.74,12.74,0,0,0,.13-1.74,6.54,6.54,0,0,0-.29-2.11,1.11,1.11,0,0,0-1.13-.81.49.49,0,0,0-.49.32,3.52,3.52,0,0,0-.23,1l-.94,6.62A7.45,7.45,0,0,0,58,9,1.8,1.8,0,0,0,58.76,8.22Zm11.71,6.14a8.78,8.78,0,0,1-2,3.87,4,4,0,0,1-2.74,1,.89.89,0,0,1-.63-.21.93.93,0,0,1-.22-.7,3.4,3.4,0,0,1,0-.48c0-.14,0-.28,0-.44l2-14.08a3.8,3.8,0,0,1,.47-1.64,1.94,1.94,0,0,1,1.08-.48V.48H63.6v.76a2,2,0,0,1,.91.31,1.36,1.36,0,0,1,.22.94c0,.2,0,.42,0,.67s-.07.57-.13,1L62.68,17.34a4.31,4.31,0,0,1-.44,1.6,1.28,1.28,0,0,1-.8.52v.76h8.5l.9-5.74ZM76.89.48H72.32v.76a1.92,1.92,0,0,1,.9.31c.15.13.22.44.22.94a5.56,5.56,0,0,1,0,.67c0,.26-.07.57-.12,1L71.39,17.35A4.35,4.35,0,0,1,71,18.94a1.33,1.33,0,0,1-.81.52v.76h4.57v-.76a1.81,1.81,0,0,1-.91-.32,1.39,1.39,0,0,1-.21-.94c0-.09,0-.18,0-.28l0-.3.12-1L75.65,3.36a4.43,4.43,0,0,1,.43-1.6,1.3,1.3,0,0,1,.81-.52Zm8.46.15A.38.38,0,0,1,85,.87a4.12,4.12,0,0,1-1-.44A3.51,3.51,0,0,0,82.37,0Q79.84,0,78,3.92a21.42,21.42,0,0,0-1.84,9.24,11.15,11.15,0,0,0,1.2,5.57,3.51,3.51,0,0,0,3.05,2.08,3.15,3.15,0,0,0,2.21-1.09,8.92,8.92,0,0,0,1.89-3.35L84,15.72A11.08,11.08,0,0,1,83,17.81a2.71,2.71,0,0,1-2.12,1.43,2,2,0,0,1-1.59-1.13,8.33,8.33,0,0,1-.74-4.2A29.46,29.46,0,0,1,79.7,5.62Q81,1.08,82.8,1.07c.59,0,1.07.38,1.45,1.14a8,8,0,0,1,.57,3.47,2.73,2.73,0,0,1,0,.32c0,.08,0,.32,0,.73l.48.17L86.05,0h-.47A2.93,2.93,0,0,1,85.35.63Zm21.41,13.73.37.12-.9,5.74H94.72l-1.66-9.76h-.43l-.91,6.14-.13,1c0,.08,0,.16,0,.25s0,.19,0,.28a1.57,1.57,0,0,0,.2,1,1.81,1.81,0,0,0,.92.32v.76H88.11v-.76a1.3,1.3,0,0,0,.81-.52,4.35,4.35,0,0,0,.43-1.59L91.24,4.11c0-.27.07-.51.09-.71a8.23,8.23,0,0,0,.07-1,1.3,1.3,0,0,0-.21-.9,2.08,2.08,0,0,0-.91-.3V.48h4.23A3.81,3.81,0,0,1,96.7,1c1,.65,1.43,1.9,1.43,3.75a8.73,8.73,0,0,1-.24,2,5.66,5.66,0,0,1-.81,1.9,3.49,3.49,0,0,1-.93,1,6.73,6.73,0,0,1-1,.52c0,.3.09.49.1.57l1.18,6.66a4.74,4.74,0,0,0,.52,1.7,1,1,0,0,0,.78.39,1.23,1.23,0,0,0,.78-.5A4.3,4.3,0,0,0,99,17.35l1.88-13.24c.05-.34.09-.64.12-.92a6.28,6.28,0,0,0,0-.7,1.45,1.45,0,0,0-.2-.94,2,2,0,0,0-.91-.31V.48h8.26l-.65,5.6L107.1,6a9.57,9.57,0,0,0-.36-3,2.3,2.3,0,0,0-2.38-1.51c-.41,0-.67.09-.78.28a2.87,2.87,0,0,0-.29,1.06l-.91,6.56a3.57,3.57,0,0,0,2.08-.51,6.59,6.59,0,0,0,1.06-2.61l.42.1-1.14,8.08-.42-.15c0-.28,0-.52.05-.73s0-.37,0-.51a3.6,3.6,0,0,0-.46-2.15,2.14,2.14,0,0,0-1.75-.57l-1,7.2a4.7,4.7,0,0,0-.06.51c0,.16,0,.29,0,.39a1.12,1.12,0,0,0,.17.66.77.77,0,0,0,.69.26,3.77,3.77,0,0,0,2.37-.75A7.71,7.71,0,0,0,106.76,14.36ZM95.09,8.17a7.75,7.75,0,0,0,.49-1.62,10.75,10.75,0,0,0,.23-2.26,5.77,5.77,0,0,0-.32-2,1.11,1.11,0,0,0-1.08-.81.48.48,0,0,0-.46.26,3.44,3.44,0,0,0-.25,1.05L92.78,9.5A3.78,3.78,0,0,0,94,9.3,2.08,2.08,0,0,0,95.09,8.17Zm21.32,6.19a8.67,8.67,0,0,1-2,3.87,4,4,0,0,1-2.73,1,.89.89,0,0,1-.63-.21.93.93,0,0,1-.23-.7c0-.19,0-.35,0-.48s0-.28,0-.44l2-14.08a3.84,3.84,0,0,1,.46-1.64,2,2,0,0,1,1.08-.48V.48h-4.86v.76a2,2,0,0,1,.91.31,1.38,1.38,0,0,1,.21.94,5.56,5.56,0,0,1,0,.67c0,.26-.07.57-.12,1l-1.89,13.23a4.16,4.16,0,0,1-.43,1.6,1.27,1.27,0,0,1-.81.52v.76h8.51l.9-5.74Zm8.64,0a7.71,7.71,0,0,1-2.38,4.16,3.82,3.82,0,0,1-2.38.75.77.77,0,0,1-.69-.26,1.2,1.2,0,0,1-.17-.66c0-.1,0-.23,0-.39a4.7,4.7,0,0,1,.06-.51l1-7.2a2.17,2.17,0,0,1,1.76.57,3.69,3.69,0,0,1,.45,2.15c0,.14,0,.31,0,.51s0,.45,0,.73l.42.15,1.13-8.08-.42-.1a6.79,6.79,0,0,1-1,2.61,3.63,3.63,0,0,1-2.09.51l.91-6.56a2.87,2.87,0,0,1,.29-1.06c.12-.19.38-.28.78-.28A2.3,2.3,0,0,1,125,2.91a9.57,9.57,0,0,1,.36,3l.41.13.65-5.6h-8.26v.76a1.93,1.93,0,0,1,.91.31,1.45,1.45,0,0,1,.2.94,6.28,6.28,0,0,1,0,.7c0,.28-.07.58-.11.92l-1.89,13.24a4.35,4.35,0,0,1-.43,1.59,1.33,1.33,0,0,1-.81.52v.76h8.5l.91-5.74Zm10.29,5.15v.71h-4.65v-.71a1.44,1.44,0,0,0,.93-.41,2.08,2.08,0,0,0,.27-1.29c0-.22,0-.75-.08-1.58,0-.17-.06-.89-.15-2.15h-3.31l-.89,3a5.32,5.32,0,0,0-.16.66,3.4,3.4,0,0,0-.08.69,1.06,1.06,0,0,0,.2.78,1.68,1.68,0,0,0,.79.3v.71h-3v-.71a1.8,1.8,0,0,0,.63-.53,6.45,6.45,0,0,0,.67-1.56L132.19.07h.4L134.06,17a7.15,7.15,0,0,0,.36,2.08A1.13,1.13,0,0,0,135.34,19.51Zm-3.79-6.6L131,5.73l-2.27,7.18Zm9.6-4-1.32-2.09a4.57,4.57,0,0,1-.47-.94,5.12,5.12,0,0,1-.28-1.78,5.57,5.57,0,0,1,.27-1.77c.27-.83.7-1.24,1.29-1.24s1.21.51,1.57,1.54A8.78,8.78,0,0,1,142.65,5l.06,1,.39.1.63-5.91h-.46a2.09,2.09,0,0,1-.25.54.46.46,0,0,1-.41.21.57.57,0,0,1-.24-.05,1.23,1.23,0,0,1-.26-.12l-.39-.24a2.34,2.34,0,0,0-.5-.25,2.41,2.41,0,0,0-.85-.16,2.55,2.55,0,0,0-2.31,1.67,9.11,9.11,0,0,0-.83,4.05,10.47,10.47,0,0,0,1.88,5.5A9.21,9.21,0,0,1,141,16a6.49,6.49,0,0,1-.5,2.63,1.59,1.59,0,0,1-1.43,1.14,1.42,1.42,0,0,1-1-.4,3.55,3.55,0,0,1-.78-1.16,7.09,7.09,0,0,1-.52-1.92c-.05-.43-.1-1.12-.13-2.06l-.44-.06-.55,6.62h.46a4.11,4.11,0,0,1,.25-.82.36.36,0,0,1,.36-.23.47.47,0,0,1,.17,0,2.38,2.38,0,0,1,.27.18l.39.27a3.52,3.52,0,0,0,.84.43,2.48,2.48,0,0,0,.84.15,2.91,2.91,0,0,0,2.63-1.88,9.24,9.24,0,0,0,1-4.21,9.85,9.85,0,0,0-.49-3.24A12.1,12.1,0,0,0,141.15,8.92Zm7.75-7.24c.12-.19.38-.28.78-.28a2.3,2.3,0,0,1,2.38,1.51,9.57,9.57,0,0,1,.36,3l.41.13.65-5.6h-8.26v.76a1.93,1.93,0,0,1,.91.31c.14.13.2.44.2.94a6.28,6.28,0,0,1,0,.7c0,.28-.07.58-.11.92l-1.89,13.24a4.35,4.35,0,0,1-.43,1.59,1.33,1.33,0,0,1-.81.52v.76h8.5l.91-5.74-.38-.12a7.71,7.71,0,0,1-2.38,4.16,3.82,3.82,0,0,1-2.38.75.77.77,0,0,1-.69-.26,1.2,1.2,0,0,1-.17-.66c0-.1,0-.23,0-.39a4.7,4.7,0,0,1,.06-.51l1-7.2a2.17,2.17,0,0,1,1.76.57,3.69,3.69,0,0,1,.45,2.15c0,.14,0,.31,0,.51s0,.45,0,.73l.42.15,1.14-8.08-.43-.1a6.79,6.79,0,0,1-1.05,2.61,3.63,3.63,0,0,1-2.09.51l.91-6.56A2.87,2.87,0,0,1,148.9,1.68Z",opacity:1,strokeColor:"",fillColor:"#192760",width:153.485,height:20.812,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"NotForPublicRelease":case"Not For Public Release":t={iconName:"Not For Public Release",pathdata:"M9,2.35q-.21.9-.51,3.48L6.69,21.05H6.38L3.11,4.45,1.85,15.19c-.1.89-.17,1.56-.2,2s0,.55,0,.81A2.39,2.39,0,0,0,2,19.45a1.09,1.09,0,0,0,.67.33v.77H0v-.77a1.22,1.22,0,0,0,.71-.91,33.91,33.91,0,0,0,.57-3.68L2.7,2.88l-.06-.3a2.09,2.09,0,0,0-.39-1.07,1,1,0,0,0-.59-.25V.48H4.2L6.93,14.36l1-8.49c.06-.53.11-1,.14-1.4.06-.63.08-1.08.08-1.37a2.67,2.67,0,0,0-.3-1.5,1.07,1.07,0,0,0-.69-.34V.48H9.73v.78l-.18.06C9.29,1.41,9.09,1.75,9,2.35ZM16.74,2a13.19,13.19,0,0,1,.87,5.28,27.45,27.45,0,0,1-1.54,9.22q-1.65,4.66-3.79,4.67-1.35,0-2.19-1.95a13.31,13.31,0,0,1-.85-5.23A27.59,27.59,0,0,1,10.82,4.6C11.91,1.53,13.15,0,14.51,0,15.41,0,16.16.65,16.74,2Zm-.95,2.73a9.33,9.33,0,0,0-.31-2.59c-.21-.72-.54-1.08-1-1.08-1.05,0-1.92,2.21-2.64,6.64a54.69,54.69,0,0,0-.81,8.4,14.21,14.21,0,0,0,.15,2.23c.2,1.2.57,1.8,1.1,1.8s.95-.43,1.35-1.31a22.84,22.84,0,0,0,1.26-5c.28-1.55.49-3.19.65-4.91S15.79,5.74,15.79,4.68Zm2.3.93.32.21A10.7,10.7,0,0,1,19.52,2.6a1.87,1.87,0,0,1,1.6-1.08L19.27,17.63a4,4,0,0,1-.52,1.88,1,1,0,0,1-.79.27v.77h4.17v-.77a1.72,1.72,0,0,1-.85-.3,1.56,1.56,0,0,1-.2-1,2.44,2.44,0,0,1,0-.27c0-.08,0-.2,0-.33l.11-1L23,1.52A1.31,1.31,0,0,1,24,2.17a8.49,8.49,0,0,1,.69,4l.33.07L25.5.48H18.57ZM28.75.48v.78a1.39,1.39,0,0,1,.74.31,1.44,1.44,0,0,1,.18.9q0,.36-.06,1c0,.2-.05.44-.07.71L28,17.62a5.34,5.34,0,0,1-.35,1.61,1.05,1.05,0,0,1-.67.55v.77H30.7v-.77a.82.82,0,0,1-.6-.2,1.69,1.69,0,0,1-.31-1.18c0-.11,0-.22,0-.32l0-.35.83-7.33a1.42,1.42,0,0,1,1.4.64,5,5,0,0,1,.33,2.13c0,.12,0,.28,0,.5s0,.47,0,.76l.34.15.94-8.21-.35-.1a8.12,8.12,0,0,1-.85,2.64,2.42,2.42,0,0,1-1.64.52l.74-6.65a3.34,3.34,0,0,1,.25-1.1.64.64,0,0,1,.59-.26A1.91,1.91,0,0,1,34.28,3a11.32,11.32,0,0,1,.29,3.06l.34.13.54-5.7Zm15,6.75a27.46,27.46,0,0,1-1.55,9.22q-1.65,4.66-3.79,4.67-1.35,0-2.19-1.95a13.49,13.49,0,0,1-.85-5.23A27.59,27.59,0,0,1,37,4.6Q38.65,0,40.69,0c.91,0,1.65.65,2.23,2A13.17,13.17,0,0,1,43.8,7.23ZM42,4.68a9.3,9.3,0,0,0-.32-2.59c-.21-.72-.53-1.08-1-1.08Q39.12,1,38,7.65a54.69,54.69,0,0,0-.81,8.4,13,13,0,0,0,.16,2.23c.2,1.2.56,1.8,1.09,1.8s1-.43,1.35-1.31a23.28,23.28,0,0,0,1.27-5c.27-1.55.49-3.19.64-4.91S42,5.74,42,4.68ZM50.32,1c.78.66,1.17,1.93,1.17,3.8a11,11,0,0,1-.19,2,7.2,7.2,0,0,1-.66,1.93,3.45,3.45,0,0,1-.77,1,5.58,5.58,0,0,1-.8.52c0,.31.07.51.08.58l1,6.78a5.63,5.63,0,0,0,.42,1.72.85.85,0,0,0,.69.42v.77H48.69l-1.36-9.92H47l-.75,6.25-.1,1c0,.08,0,.16,0,.26v.28a1.94,1.94,0,0,0,.16,1,1.39,1.39,0,0,0,.75.32v.77H43.27v-.77a1.07,1.07,0,0,0,.66-.53,4.83,4.83,0,0,0,.36-1.61L45.84,4.18c0-.28.06-.52.08-.72,0-.42,0-.75,0-1a1.48,1.48,0,0,0-.17-.91,1.39,1.39,0,0,0-.74-.31V.48h3.46A2.67,2.67,0,0,1,50.32,1Zm-.73,3.34a7.2,7.2,0,0,0-.26-2.09c-.18-.55-.47-.83-.89-.83a.4.4,0,0,0-.38.27,4.46,4.46,0,0,0-.2,1.06L47.1,9.65a2.39,2.39,0,0,0,1-.2A2,2,0,0,0,49,8.31a10,10,0,0,0,.4-1.65A12.71,12.71,0,0,0,49.59,4.37Zm11.1-3.3c.77.74,1.16,2.1,1.16,4.09a8.51,8.51,0,0,1-.94,4.28A2.78,2.78,0,0,1,58.48,11h-.36l-.73-.12-.69,6-.11,1c0,.1,0,.2,0,.3s0,.2,0,.3a1.7,1.7,0,0,0,.17.95,1.47,1.47,0,0,0,.75.32v.77H53.77v-.77a1.07,1.07,0,0,0,.66-.53,4.83,4.83,0,0,0,.36-1.61L56.34,4.17l.09-.9c0-.31,0-.55,0-.74a1.58,1.58,0,0,0-.25-1,1.33,1.33,0,0,0-.67-.23V.48h3.62A2.11,2.11,0,0,1,60.69,1.07ZM60,4.32a7,7,0,0,0-.25-2.06c-.17-.53-.45-.8-.84-.8a.4.4,0,0,0-.4.29,6.14,6.14,0,0,0-.2,1L57.5,9.93l.23.06h.21a1.3,1.3,0,0,0,1-.36,3.17,3.17,0,0,0,.6-1.2,12.69,12.69,0,0,0,.36-2A19.64,19.64,0,0,0,60,4.32Zm10.6-3.06V.48H68v.78a1.17,1.17,0,0,1,.68.32A2.43,2.43,0,0,1,69,3.05c0,.32,0,.85-.11,1.6,0-.12,0,.27-.12,1.18l-.73,6.26a36.28,36.28,0,0,1-.8,4.86c-.45,1.65-1.07,2.47-1.87,2.47a1.27,1.27,0,0,1-1.13-.78,5.05,5.05,0,0,1-.41-2.27c0-.43,0-1.1.13-2,.05-.51.12-1.17.21-2l1-9a4.69,4.69,0,0,1,.38-1.69,1.24,1.24,0,0,1,.8-.47V.48H62.55v.78a1.39,1.39,0,0,1,.74.31,1.56,1.56,0,0,1,.17.91c0,.21,0,.47,0,.76s-.06.6-.1.94l-.85,7.36c-.14,1.15-.23,2-.27,2.42-.06.76-.1,1.44-.1,2a7.4,7.4,0,0,0,.81,3.78,2.35,2.35,0,0,0,2,1.35c1.14,0,2-.91,2.6-2.74a35.69,35.69,0,0,0,1-5.7l.79-6.85a30.83,30.83,0,0,1,.58-3.7A1.15,1.15,0,0,1,70.61,1.26Zm5.86,10a7.16,7.16,0,0,1,.56,3.1,10.31,10.31,0,0,1-.86,4.34,2.93,2.93,0,0,1-2.86,1.87h-3.8v-.77a1.07,1.07,0,0,0,.59-.41,4.64,4.64,0,0,0,.43-1.73L72.08,4.17c0-.4.08-.73.1-1s0-.46,0-.61a1.83,1.83,0,0,0-.19-1,1.22,1.22,0,0,0-.73-.28V.48h3.43a2.58,2.58,0,0,1,2.19,1.06A5.92,5.92,0,0,1,77.69,5a6.3,6.3,0,0,1-1,3.67,4.18,4.18,0,0,1-1.39,1.24A4.36,4.36,0,0,1,76.47,11.24Zm-1.36,2.49a4.59,4.59,0,0,0-.6-2.79,2,2,0,0,0-1.3-.52l-.84,7.32c0,.12,0,.25,0,.4s0,.33,0,.52a1.06,1.06,0,0,0,.27.84.77.77,0,0,0,.48.11c.8,0,1.38-.87,1.73-2.63A17.3,17.3,0,0,0,75.11,13.73Zm.1-5.38a7.33,7.33,0,0,0,.52-2.15,15,15,0,0,0,.11-1.77,7.89,7.89,0,0,0-.24-2.14c-.16-.55-.46-.83-.93-.83a.42.42,0,0,0-.4.33,4.42,4.42,0,0,0-.19,1l-.77,6.73a5.23,5.23,0,0,0,1.27-.36A1.77,1.77,0,0,0,75.21,8.35Zm9.61,6.24a9.73,9.73,0,0,1-1.66,3.94,2.93,2.93,0,0,1-2.25,1,.64.64,0,0,1-.51-.21,1,1,0,0,1-.19-.71c0-.19,0-.35,0-.49s0-.29,0-.44L81.91,3.41a4.53,4.53,0,0,1,.38-1.66,1.47,1.47,0,0,1,.88-.49V.48h-4v.78a1.39,1.39,0,0,1,.75.32,1.59,1.59,0,0,1,.18.95c0,.2,0,.43,0,.68s0,.58-.1,1L78.42,17.62a5.28,5.28,0,0,1-.35,1.63,1.12,1.12,0,0,1-.67.53v.77h7l.73-5.83ZM90.09,1.26V.48H86.34v.78a1.38,1.38,0,0,1,.74.32,1.59,1.59,0,0,1,.18.95q0,.3,0,.69c0,.25-.06.57-.11.95L85.58,17.64a5.41,5.41,0,0,1-.36,1.61,1.07,1.07,0,0,1-.66.53v.77h3.75v-.77a1.47,1.47,0,0,1-.75-.32,1.78,1.78,0,0,1-.17-1c0-.08,0-.18,0-.28s0-.2,0-.3l.1-1L89.07,3.41a5.68,5.68,0,0,1,.35-1.62A1.1,1.1,0,0,1,90.09,1.26Zm7-.62a.33.33,0,0,1-.3.24,3.1,3.1,0,0,1-.82-.44A2.5,2.5,0,0,0,94.59,0Q92.51,0,91,4a26.57,26.57,0,0,0-1.51,9.39,13.57,13.57,0,0,0,1,5.67c.66,1.41,1.49,2.11,2.5,2.11A2.46,2.46,0,0,0,94.79,20a9.66,9.66,0,0,0,1.55-3.4L96,16a12.68,12.68,0,0,1-.89,2.13c-.54,1-1.12,1.45-1.74,1.45-.47,0-.91-.39-1.31-1.15a10.33,10.33,0,0,1-.6-4.27,36.59,36.59,0,0,1,1-8.43c.72-3.08,1.57-4.63,2.54-4.63.48,0,.88.39,1.19,1.16a10,10,0,0,1,.47,3.53V6.1c0,.07,0,.32,0,.74L97,7l.64-7h-.38A4.28,4.28,0,0,1,97,.64Zm17.57,14,.31.13-.75,5.83h-9.45l-1.35-9.92H103l-.74,6.25-.11,1c0,.08,0,.16,0,.26v.28a1.94,1.94,0,0,0,.16,1,1.39,1.39,0,0,0,.75.32v.77H99.3v-.77a1.12,1.12,0,0,0,.67-.53,5.18,5.18,0,0,0,.35-1.61l1.55-13.46c0-.28.06-.52.08-.72,0-.42,0-.75,0-1a1.48,1.48,0,0,0-.17-.91,1.39,1.39,0,0,0-.74-.31V.48h3.46a2.64,2.64,0,0,1,1.8.55c.78.66,1.17,1.93,1.17,3.8a11,11,0,0,1-.19,2,6.57,6.57,0,0,1-.66,1.93,3.61,3.61,0,0,1-.76,1,6.48,6.48,0,0,1-.81.52c0,.31.07.51.08.58l1,6.78a5.63,5.63,0,0,0,.42,1.72.84.84,0,0,0,.65.4,1.06,1.06,0,0,0,.64-.51,5.41,5.41,0,0,0,.36-1.61l1.54-13.47c0-.34.07-.65.1-.92s0-.52,0-.72a1.61,1.61,0,0,0-.17-.95,1.31,1.31,0,0,0-.74-.32V.48h6.78l-.53,5.7-.34-.13a11.8,11.8,0,0,0-.3-3.09,1.92,1.92,0,0,0-2-1.54c-.33,0-.55.1-.64.29a3.46,3.46,0,0,0-.24,1.07L111,9.45a2.6,2.6,0,0,0,1.72-.51,7.79,7.79,0,0,0,.86-2.66l.35.11-.93,8.2-.35-.15c0-.28,0-.53,0-.74v-.52a4.42,4.42,0,0,0-.37-2.18,1.56,1.56,0,0,0-1.44-.58l-.83,7.32c0,.18,0,.35,0,.51s0,.3,0,.4a1.45,1.45,0,0,0,.13.67c.09.18.28.26.57.26a2.72,2.72,0,0,0,2-.76A8.33,8.33,0,0,0,114.61,14.59ZM105,8.31a9.81,9.81,0,0,0,.41-1.65,13.72,13.72,0,0,0,.18-2.29,6.87,6.87,0,0,0-.26-2.09c-.17-.55-.47-.83-.89-.83a.4.4,0,0,0-.38.27,5.05,5.05,0,0,0-.2,1.06l-.76,6.87a2.39,2.39,0,0,0,1-.2A2,2,0,0,0,105,8.31Zm17.51,6.28a9.86,9.86,0,0,1-1.67,3.94,2.93,2.93,0,0,1-2.25,1,.64.64,0,0,1-.51-.21,1.1,1.1,0,0,1-.19-.71c0-.19,0-.35,0-.49s0-.29,0-.44l1.64-14.32A4.53,4.53,0,0,1,120,1.75a1.47,1.47,0,0,1,.89-.49V.48h-4v.78a1.39,1.39,0,0,1,.75.32,1.59,1.59,0,0,1,.18.95c0,.2,0,.43,0,.68s0,.58-.1,1l-1.55,13.45a5.28,5.28,0,0,1-.35,1.63,1.1,1.1,0,0,1-.66.53v.77h7l.74-5.83Zm7.09,0a8.33,8.33,0,0,1-2,4.23,2.73,2.73,0,0,1-2,.76c-.29,0-.48-.08-.57-.26a1.45,1.45,0,0,1-.13-.67c0-.1,0-.23,0-.4s0-.33,0-.51l.83-7.32a1.58,1.58,0,0,1,1.44.58,4.42,4.42,0,0,1,.37,2.18c0,.14,0,.31,0,.52s0,.46,0,.74l.34.15.94-8.2-.35-.11a7.71,7.71,0,0,1-.87,2.66,2.56,2.56,0,0,1-1.71.51l.75-6.67A3.46,3.46,0,0,1,127,1.71c.09-.19.31-.29.64-.29a1.92,1.92,0,0,1,2,1.54,11.8,11.8,0,0,1,.3,3.09l.33.13.54-5.7H124v.78a1.31,1.31,0,0,1,.75.32,1.7,1.7,0,0,1,.17.95,6.75,6.75,0,0,1,0,.72c0,.27-.05.58-.09.92l-1.55,13.47a5.18,5.18,0,0,1-.35,1.61,1.12,1.12,0,0,1-.67.53v.77h7l.75-5.83Zm8.45,5.24v.72h-3.83v-.72a1.11,1.11,0,0,0,.77-.41,2.52,2.52,0,0,0,.23-1.31c0-.23,0-.77-.07-1.62,0-.17-.05-.9-.13-2.18h-2.71l-.74,3c0,.2-.09.43-.13.67a4.44,4.44,0,0,0-.06.71,1.27,1.27,0,0,0,.16.79,1.35,1.35,0,0,0,.65.3v.72h-2.47v-.72a1.66,1.66,0,0,0,.52-.54,7.25,7.25,0,0,0,.55-1.58L135.49.07h.33L137,17.23a8.87,8.87,0,0,0,.3,2.11A.9.9,0,0,0,138.08,19.83ZM135,13.12l-.47-7.3-1.86,7.3Zm7.88-4-1.09-2.13a6.38,6.38,0,0,1-.39-1,6.65,6.65,0,0,1-.23-1.82,6.93,6.93,0,0,1,.23-1.8q.33-1.26,1-1.26c.57,0,1,.53,1.3,1.57a10.87,10.87,0,0,1,.36,2.39l0,1,.33.1.51-6h-.38a2.26,2.26,0,0,1-.2.54.38.38,0,0,1-.34.22.54.54,0,0,1-.19-.05l-.22-.13-.32-.25a2.36,2.36,0,0,0-.41-.25,1.82,1.82,0,0,0-.7-.16c-.81,0-1.44.57-1.9,1.7a11.21,11.21,0,0,0-.68,4.12,12.36,12.36,0,0,0,1.55,5.58,10.74,10.74,0,0,1,1.54,4.78,7.8,7.8,0,0,1-.41,2.67c-.28.76-.67,1.15-1.17,1.15a1.07,1.07,0,0,1-.79-.4,3.78,3.78,0,0,1-.64-1.18,7.79,7.79,0,0,1-.42-1.95c-.05-.44-.08-1.14-.11-2.1l-.36-.06-.46,6.73h.38a6.32,6.32,0,0,1,.2-.83.31.31,0,0,1,.3-.24.21.21,0,0,1,.14,0,1.06,1.06,0,0,1,.22.18l.32.27a3,3,0,0,0,.69.44,1.72,1.72,0,0,0,.69.15c.92,0,1.64-.63,2.16-1.91a11.22,11.22,0,0,0,.78-4.28,12.2,12.2,0,0,0-.4-3.29A14.21,14.21,0,0,0,142.85,9.07Zm6.36-7.36c.09-.19.31-.29.64-.29a1.92,1.92,0,0,1,2,1.54,11.8,11.8,0,0,1,.3,3.09l.33.13L153,.48h-6.79v.78a1.31,1.31,0,0,1,.75.32,1.7,1.7,0,0,1,.17.95,6.75,6.75,0,0,1,0,.72c0,.27-.05.58-.09.92l-1.55,13.47a5.18,5.18,0,0,1-.35,1.61,1.12,1.12,0,0,1-.67.53v.77h7l.75-5.83-.31-.13a8.33,8.33,0,0,1-2,4.23,2.73,2.73,0,0,1-2,.76c-.29,0-.48-.08-.57-.26a1.45,1.45,0,0,1-.13-.67c0-.1,0-.23,0-.4s0-.33.05-.51l.83-7.32a1.58,1.58,0,0,1,1.44.58,4.42,4.42,0,0,1,.37,2.18c0,.14,0,.31,0,.52s0,.46,0,.74l.34.15.94-8.2-.35-.11a7.71,7.71,0,0,1-.87,2.66,2.56,2.56,0,0,1-1.71.51L149,2.78A3.46,3.46,0,0,1,149.21,1.71Z",opacity:1,strokeColor:"",fillColor:"#192760",width:152.969,height:21.152,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"ForComment":case"For Comment":t={iconName:"For Comment",pathdata:"M14.1.48l-.89,5.6L12.65,6a7.14,7.14,0,0,0-.48-3c-.54-1-1.6-1.54-3.19-1.54a1.37,1.37,0,0,0-1,.26,2.06,2.06,0,0,0-.42,1.08L6.35,9.28a6,6,0,0,0,2.73-.52,5.92,5.92,0,0,0,1.41-2.59l.58.1L9.52,14.34,9,14.2c0-.29,0-.54.05-.75s0-.38,0-.49a3.15,3.15,0,0,0-.55-2.09,3.07,3.07,0,0,0-2.32-.64L4.77,17.44c0,.13,0,.24-.06.35s0,.21,0,.31a1.23,1.23,0,0,0,.53,1.17,2,2,0,0,0,1,.19v.76H0v-.76a1.91,1.91,0,0,0,1.12-.54,3.56,3.56,0,0,0,.58-1.58L4.27,4.11c.05-.27.09-.51.12-.71a7.42,7.42,0,0,0,.1-1c0-.48-.1-.77-.29-.9A3.54,3.54,0,0,0,3,1.24V.48ZM28,7.11a17.42,17.42,0,0,1-2.57,9.07q-2.75,4.61-6.3,4.6a4.33,4.33,0,0,1-3.65-1.92,8.53,8.53,0,0,1-1.41-5.14,17.56,17.56,0,0,1,2.62-9.19Q19.43,0,22.82,0a4.48,4.48,0,0,1,3.72,1.92A8.46,8.46,0,0,1,28,7.11ZM25,4.6a5.72,5.72,0,0,0-.52-2.55,1.72,1.72,0,0,0-1.63-1c-1.74,0-3.2,2.17-4.39,6.53a32.66,32.66,0,0,0-1.35,8.26,8.24,8.24,0,0,0,.26,2.2c.33,1.18.94,1.77,1.82,1.77a2.88,2.88,0,0,0,2.25-1.29,16.48,16.48,0,0,0,2.1-4.93,37.09,37.09,0,0,0,1.07-4.83A28.26,28.26,0,0,0,25,4.6Zm15.83.16a6.49,6.49,0,0,1-.33,2,5.12,5.12,0,0,1-1.09,1.9,4.65,4.65,0,0,1-1.27,1,11.5,11.5,0,0,1-1.35.52c.07.3.12.49.14.57l1.62,6.66a3.79,3.79,0,0,0,.7,1.7,1.75,1.75,0,0,0,1.14.41v.76H36.13l-2.26-9.76h-.59L32,16.6l-.17,1,0,.25a2.62,2.62,0,0,0,0,.28q0,.8.27,1a3,3,0,0,0,1.25.32v.76H27.11v-.76a1.93,1.93,0,0,0,1.11-.52,3.54,3.54,0,0,0,.59-1.59L31.38,4.11c.06-.27.1-.51.13-.71a6,6,0,0,0,.1-1c0-.47-.1-.77-.29-.9a3.54,3.54,0,0,0-1.24-.3V.48h5.76a6.77,6.77,0,0,1,3,.53Q40.79,2,40.79,4.76Zm-3.16-.47a4.35,4.35,0,0,0-.44-2,1.54,1.54,0,0,0-1.48-.81.75.75,0,0,0-.63.26,2.78,2.78,0,0,0-.33,1.05L33.48,9.5a6.85,6.85,0,0,0,1.67-.2,2.55,2.55,0,0,0,1.49-1.13,6.37,6.37,0,0,0,.67-1.62A7.81,7.81,0,0,0,37.63,4.29ZM58.49,0a2.61,2.61,0,0,1-.32.63.55.55,0,0,1-.49.24A7,7,0,0,1,56.31.43,6.15,6.15,0,0,0,54.1,0q-3.47,0-6,3.92a16.73,16.73,0,0,0-2.51,9.24,8.73,8.73,0,0,0,1.64,5.57,5,5,0,0,0,7.19,1A8.89,8.89,0,0,0,57,16.37l-.64-.65a10.47,10.47,0,0,1-1.47,2.09A4,4,0,0,1,52,19.24a2.89,2.89,0,0,1-2.17-1.13c-.67-.75-1-2.15-1-4.2a22.2,22.2,0,0,1,1.62-8.29q1.8-4.54,4.23-4.55a2.33,2.33,0,0,1,2,1.14,6.16,6.16,0,0,1,.78,3.47c0,.14,0,.25,0,.32s0,.32,0,.73l.66.17L59.12,0ZM72.71,7.11a17.33,17.33,0,0,1-2.57,9.07c-1.82,3.07-3.93,4.6-6.3,4.6a4.34,4.34,0,0,1-3.65-1.92,8.53,8.53,0,0,1-1.4-5.14A17.55,17.55,0,0,1,61.4,4.53Q64.15,0,67.54,0a4.48,4.48,0,0,1,3.72,1.92A8.39,8.39,0,0,1,72.71,7.11Zm-3-2.51a5.72,5.72,0,0,0-.52-2.55,1.72,1.72,0,0,0-1.63-1c-1.74,0-3.2,2.17-4.39,6.53a32.66,32.66,0,0,0-1.35,8.26,8.24,8.24,0,0,0,.26,2.2c.33,1.18.94,1.77,1.82,1.77a2.85,2.85,0,0,0,2.25-1.29,16,16,0,0,0,2.1-4.93,34.08,34.08,0,0,0,1.07-4.83A28.26,28.26,0,0,0,69.68,4.6Zm17.5,13.62a4.63,4.63,0,0,1,.07-.75c0-.3.09-.59.15-.88L90,3.31a3.32,3.32,0,0,1,.7-1.67,2,2,0,0,1,1-.4V.48H87.23l-6.4,13.91L79.63.48H74.84v.76a3.29,3.29,0,0,1,1.2.21c.21.11.31.37.31.78a4.35,4.35,0,0,1-.07.75c0,.28-.11.61-.18,1L74,15a19.63,19.63,0,0,1-1,3.65,1.54,1.54,0,0,1-1.17.86v.76H76.2v-.76a2.31,2.31,0,0,1-1.09-.29,1.6,1.6,0,0,1-.58-1.43,8.8,8.8,0,0,1,.14-1.42c0-.37.14-.82.24-1.37L77,4.24l1.41,16.37H79L86.89,3.76,84.25,17.34A2.94,2.94,0,0,1,83.61,19a2.87,2.87,0,0,1-1.44.49v.76h6.54v-.76a3.39,3.39,0,0,1-1.23-.31Q87.18,19,87.18,18.22Zm17.73,0a4.63,4.63,0,0,1,.07-.75c0-.3.1-.59.16-.88l2.58-13.28a3.24,3.24,0,0,1,.69-1.67,2,2,0,0,1,1-.4V.48H105l-6.4,13.91L97.36.48H92.57v.76a3.29,3.29,0,0,1,1.2.21c.21.11.32.37.32.78A5.65,5.65,0,0,1,94,3c0,.28-.11.61-.19,1L91.69,15a19.63,19.63,0,0,1-1,3.65,1.54,1.54,0,0,1-1.17.86v.76h4.38v-.76a2.33,2.33,0,0,1-1.1-.29,1.6,1.6,0,0,1-.58-1.43,10.12,10.12,0,0,1,.14-1.42c.06-.37.14-.82.25-1.37L94.76,4.24l1.41,16.37h.59l7.86-16.85L102,17.34a3.1,3.1,0,0,1-.64,1.63,3,3,0,0,1-1.45.49v.76h6.55v-.76a3.46,3.46,0,0,1-1.24-.31Q104.91,19,104.91,18.22Zm11.52.3a6.56,6.56,0,0,1-3.25.75,1.27,1.27,0,0,1-.94-.26,1,1,0,0,1-.22-.66,3,3,0,0,1,0-.39,4.88,4.88,0,0,1,.08-.51l1.38-7.2a3.65,3.65,0,0,1,2.4.57,2.92,2.92,0,0,1,.62,2.15c0,.14,0,.31,0,.51s0,.45-.06.73l.58.15,1.55-8.08-.58-.1a5.92,5.92,0,0,1-1.44,2.61,6.32,6.32,0,0,1-2.85.51L115,2.74a2.44,2.44,0,0,1,.39-1.06,1.43,1.43,0,0,1,1.07-.28c1.63,0,2.71.5,3.25,1.51a7.37,7.37,0,0,1,.49,3l.56.13.89-5.6H110.31v.76a3.28,3.28,0,0,1,1.25.31c.19.13.28.44.28.94a4.83,4.83,0,0,1-.06.7c0,.28-.09.58-.16.92l-2.57,13.24a3.54,3.54,0,0,1-.59,1.59,1.93,1.93,0,0,1-1.11.52v.76H119l1.24-5.74-.51-.12A7.7,7.7,0,0,1,116.43,18.52ZM136.6,1.24V.48h-4.3v.76a2.5,2.5,0,0,1,1.14.33A1.8,1.8,0,0,1,134,3.05a10.58,10.58,0,0,1-.14,1.34c-.05.41-.13.87-.22,1.39L132,14.12,127.41.48h-4.22v.76a2.53,2.53,0,0,1,1,.24,1.82,1.82,0,0,1,.64,1.06l.1.3L122.55,15a19.54,19.54,0,0,1-1,3.61,1.59,1.59,0,0,1-1.18.9v.76h4.37v-.76a2.5,2.5,0,0,1-1.12-.32,1.67,1.67,0,0,1-.55-1.44,5.32,5.32,0,0,1,0-.79c0-.43.17-1.09.34-2l2.08-10.57L131,20.71h.52l2.91-15a24.72,24.72,0,0,1,.85-3.42,1.42,1.42,0,0,1,1-1Zm.48-.76-.81,5,.54.2a8.1,8.1,0,0,1,1.85-3.16,3.63,3.63,0,0,1,2.66-1.06l-3.08,15.85a3,3,0,0,1-.86,1.85,2.42,2.42,0,0,1-1.32.26v.76H143v-.76a4,4,0,0,1-1.41-.3c-.23-.13-.34-.45-.34-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.17-1,2.92-15.1a2.64,2.64,0,0,1,1.76.63c.74.7,1.12,2,1.15,3.94l.55.07L148.6.48Z",opacity:1,strokeColor:"",fillColor:"#192760",width:148.603,height:20.812,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Void":t={iconName:"Void",pathdata:"M27.88,1.72a6.53,6.53,0,0,0-1.81,1.42L9,21.12H7.54L4.09,5.83A11.83,11.83,0,0,0,2.82,2Q2.3,1.4,0,1.26V.48H13.54v.78a11,11,0,0,0-2.37.18q-1.11.27-1.11,1.05a1.43,1.43,0,0,0,0,.29c0,.09,0,.19,0,.28l2.35,12,8.56-9a25.11,25.11,0,0,0,1.83-2.14,3.15,3.15,0,0,0,.82-1.68c0-.41-.28-.69-.84-.82a12.57,12.57,0,0,0-2.08-.15V.48h8.7v.78A7.11,7.11,0,0,0,27.88,1.72ZM57.37,7.23q0,4.85-5.56,9.22a21.41,21.41,0,0,1-13.62,4.67,14.41,14.41,0,0,1-7.89-1.95,6,6,0,0,1-3-5.23q0-4.92,5.66-9.34A21.12,21.12,0,0,1,46.2,0a15,15,0,0,1,8,2A6,6,0,0,1,57.37,7.23ZM50.82,4.68a3.46,3.46,0,0,0-1.13-2.59A4.93,4.93,0,0,0,46.17,1q-5.64,0-9.49,6.64c-1.94,3.36-2.92,6.16-2.92,8.4a4.27,4.27,0,0,0,.56,2.23q1.08,1.8,3.93,1.8a9.24,9.24,0,0,0,4.87-1.31,15.24,15.24,0,0,0,4.54-5A21.81,21.81,0,0,0,50,8.85,14.23,14.23,0,0,0,50.82,4.68ZM66,18.49a1.49,1.49,0,0,1,0-.28c0-.1,0-.2.08-.3l.35-1L72,3.41a2.94,2.94,0,0,1,1.25-1.62,6.79,6.79,0,0,1,2.4-.53V.48H62.19v.78a13.27,13.27,0,0,1,2.67.32.88.88,0,0,1,.64.95,2.38,2.38,0,0,1-.12.69c-.08.25-.2.57-.36.95L59.45,17.64a3,3,0,0,1-1.28,1.61,6.84,6.84,0,0,1-2.39.53v.77H69.27v-.77a13.72,13.72,0,0,1-2.67-.32A.9.9,0,0,1,66,18.49Zm38.25-9.67q0,4.59-5.15,8-5.73,3.77-15,3.76h-13v-.77a7.4,7.4,0,0,0,2.1-.41,3.08,3.08,0,0,0,1.57-1.75L80.28,4.17c.16-.38.28-.7.37-1a2.27,2.27,0,0,0,.12-.68.89.89,0,0,0-.64-.95,13.41,13.41,0,0,0-2.68-.32V.48H90.6q6.68,0,10.15,2.27A6.92,6.92,0,0,1,104.23,8.82ZM97.58,7a5.28,5.28,0,0,0-1.13-3.54q-1.77-2-6.14-2a4.24,4.24,0,0,0-2,.32,1.77,1.77,0,0,0-.74.84L81.35,17.73a1.72,1.72,0,0,0-.12.39,1.89,1.89,0,0,0,0,.31.89.89,0,0,0,.54.85,5.1,5.1,0,0,0,2,.26q8.07,0,11.68-5.5A12.61,12.61,0,0,0,97.58,7Z",opacity:1,strokeColor:"",fillColor:"#8a251a",width:104.233,height:21.123,stampFillColor:"#f6dedd",stampStrokeColor:""};break;case"PreliminaryResults":case"Preliminary Results":t={iconName:"Preliminary Results",pathdata:"M9.23,5.08q0-3-1.32-4.08A2.6,2.6,0,0,0,6.17.41H2v.78a1.5,1.5,0,0,1,.76.23,1.39,1.39,0,0,1,.28,1c0,.19,0,.43,0,.73s-.07.61-.1.91L1.17,17.56a4.76,4.76,0,0,1-.41,1.62A1.18,1.18,0,0,1,0,19.7v.78H4.25V19.7a1.77,1.77,0,0,1-.86-.31,1.5,1.5,0,0,1-.2-1c0-.09,0-.19,0-.3a1.36,1.36,0,0,1,0-.29l.12-1,.78-6L5,11h.41a3.21,3.21,0,0,0,2.78-1.6A7.57,7.57,0,0,0,9.23,5.08ZM7,6.32a10,10,0,0,1-.42,2,3,3,0,0,1-.68,1.21,1.63,1.63,0,0,1-1.13.36H4.53l-.27-.06,1-7.15a4.75,4.75,0,0,1,.22-1,.45.45,0,0,1,.46-.29,1,1,0,0,1,1,.8,6.22,6.22,0,0,1,.29,2.06A18,18,0,0,1,7,6.32ZM23.4,18.75a3.35,3.35,0,0,1-2.23.76.68.68,0,0,1-.64-.26,1.27,1.27,0,0,1-.16-.68c0-.09,0-.23,0-.39s0-.34.05-.51l.95-7.33a1.92,1.92,0,0,1,1.65.59,4,4,0,0,1,.42,2.18c0,.14,0,.31,0,.52s0,.46,0,.74l.4.15,1.07-8.21-.4-.1a7,7,0,0,1-1,2.65,3.15,3.15,0,0,1-2,.52l.85-6.67a3,3,0,0,1,.28-1.08c.11-.19.35-.28.73-.28a2.16,2.16,0,0,1,2.23,1.54A10.27,10.27,0,0,1,26,6l.39.13L27,.41H19.2v.78a1.67,1.67,0,0,1,.86.31,1.52,1.52,0,0,1,.19,1,6.58,6.58,0,0,1,0,.71c0,.28-.07.59-.11.93L18.33,17.56a4.59,4.59,0,0,1-.4,1.62,1.22,1.22,0,0,1-.74.51,1,1,0,0,1-.73-.4A5.08,5.08,0,0,1,16,17.56l-1.1-6.77c0-.08,0-.27-.1-.58a5.14,5.14,0,0,0,.92-.53,3.23,3.23,0,0,0,.87-1,6,6,0,0,0,.76-1.93,9.63,9.63,0,0,0,.22-2c0-1.87-.44-3.14-1.34-3.81a3.4,3.4,0,0,0-2-.54h-4v.78a1.78,1.78,0,0,1,.85.3,1.4,1.4,0,0,1,.19.91c0,.24,0,.56-.06,1,0,.21-.05.45-.09.73L9.31,17.56a4.53,4.53,0,0,1-.41,1.62,1.15,1.15,0,0,1-.75.52v.78h4.28V19.7a1.62,1.62,0,0,1-.86-.32,1.72,1.72,0,0,1-.18-1v-.29c0-.09,0-.18,0-.25l.12-1,.86-6.24h.4l1.55,9.92h10.8L26,14.65l-.35-.13A7.9,7.9,0,0,1,23.4,18.75ZM13.67,9.38a3.35,3.35,0,0,1-1.15.2l.87-6.87a4,4,0,0,1,.23-1.06.45.45,0,0,1,.43-.27,1.05,1.05,0,0,1,1,.83,6.14,6.14,0,0,1,.3,2.08,11.74,11.74,0,0,1-.21,2.29,9,9,0,0,1-.47,1.65A2,2,0,0,1,13.67,9.38ZM35,14.65l-.84,5.83h-8V19.7a1.24,1.24,0,0,0,.76-.52,4.73,4.73,0,0,0,.4-1.63L29.15,4.1q.08-.57.12-1c0-.26,0-.48,0-.68a1.42,1.42,0,0,0-.21-1,1.67,1.67,0,0,0-.85-.31V.41h4.56v.78a1.67,1.67,0,0,0-1,.49,4.17,4.17,0,0,0-.44,1.66L29.49,17.65c0,.16,0,.31,0,.45a3.47,3.47,0,0,0,0,.48,1,1,0,0,0,.21.72.8.8,0,0,0,.59.21,3.54,3.54,0,0,0,2.56-1.05,9.24,9.24,0,0,0,1.91-3.94Zm2.79,4.73a1.61,1.61,0,0,0,.85.32v.78H34.39V19.7a1.18,1.18,0,0,0,.76-.52,4.76,4.76,0,0,0,.41-1.62L37.33,4.1c.05-.38.09-.7.11-1a5.83,5.83,0,0,0,0-.68,1.5,1.5,0,0,0-.2-1,1.71,1.71,0,0,0-.85-.31V.41h4.29v.78a1.22,1.22,0,0,0-.77.52,4.9,4.9,0,0,0-.39,1.63L37.78,16.8l-.11,1,0,.29c0,.11,0,.2,0,.29A1.52,1.52,0,0,0,37.83,19.38Zm12.2,0a1.81,1.81,0,0,0,.85.31v.78h-4.5V19.7a1.64,1.64,0,0,0,1-.49,4,4,0,0,0,.44-1.66l1.81-13.8-5.4,17.12h-.4l-1-16.64L41.39,15.12c-.07.56-.13,1-.17,1.39-.06.61-.09,1.09-.09,1.45a2,2,0,0,0,.4,1.45,1.19,1.19,0,0,0,.75.29v.78h-3V19.7a1.21,1.21,0,0,0,.81-.87,29.47,29.47,0,0,0,.66-3.71L42.21,4c0-.38.09-.71.12-1a5.41,5.41,0,0,0,.05-.75c0-.42-.07-.69-.21-.8a1.69,1.69,0,0,0-.83-.21V.41h3.29l.83,14.14L49.85.41h3.07v.78a1.12,1.12,0,0,0-.69.41,4.08,4.08,0,0,0-.48,1.69L50,16.79c0,.29-.08.59-.11.89s0,.56,0,.76A1.41,1.41,0,0,0,50,19.39Zm5,0a1.61,1.61,0,0,0,.85.32v.78H51.56V19.7a1.18,1.18,0,0,0,.76-.52,4.76,4.76,0,0,0,.41-1.62L54.5,4.1c0-.38.09-.7.11-1a5.83,5.83,0,0,0,0-.68,1.5,1.5,0,0,0-.2-1,1.71,1.71,0,0,0-.85-.31V.41h4.29v.78a1.22,1.22,0,0,0-.77.52,4.9,4.9,0,0,0-.39,1.63L55,16.8l-.11,1,0,.29c0,.11,0,.2,0,.29A1.52,1.52,0,0,0,55,19.38ZM66.13,5.75,64.13,21h-.36L60,4.38,58.6,15.12c-.12.89-.2,1.55-.23,2a7.32,7.32,0,0,0,0,.81,2.17,2.17,0,0,0,.38,1.46,1.32,1.32,0,0,0,.77.32v.78h-3V19.7a1.26,1.26,0,0,0,.81-.91,29,29,0,0,0,.65-3.67L59.56,2.81,59.5,2.5a2,2,0,0,0-.45-1.06,1.21,1.21,0,0,0-.67-.25V.41h2.9L64.4,14.28,65.52,5.8c.07-.53.12-1,.16-1.41.06-.62.09-1.08.09-1.36a2.45,2.45,0,0,0-.34-1.51,1.39,1.39,0,0,0-.79-.33V.41h3v.78l-.21.06c-.29.08-.52.43-.68,1A34.22,34.22,0,0,0,66.13,5.75ZM83.27,1A3.41,3.41,0,0,0,81.21.41h-4v.78a1.74,1.74,0,0,1,.85.3c.14.13.2.43.2.91,0,.24,0,.56-.06,1,0,.21-.06.45-.09.73L76.38,17.56A4.53,4.53,0,0,1,76,19.18a1.18,1.18,0,0,1-.76.52v0a1,1,0,0,1-.67-.45,8.11,8.11,0,0,1-.34-2.12L72.83,0h-.38L67.11,17.64a6.42,6.42,0,0,1-.63,1.58,1.84,1.84,0,0,1-.59.54v.72h2.83v-.72a1.68,1.68,0,0,1-.75-.31,1.16,1.16,0,0,1-.18-.79,3.46,3.46,0,0,1,.07-.7,5.16,5.16,0,0,1,.15-.67l.84-3H72c.08,1.28.13,2,.13,2.18.06.85.08,1.39.08,1.61a2.26,2.26,0,0,1-.25,1.31,1.43,1.43,0,0,1-.88.42v.72H79.5V19.7a1.58,1.58,0,0,1-.86-.32,1.7,1.7,0,0,1-.19-1c0-.1,0-.2,0-.29a1.81,1.81,0,0,1,0-.25l.12-1,.85-6.24h.41l1.55,9.92h2.9V19.7a1,1,0,0,1-.79-.41A5.15,5.15,0,0,1,83,17.56l-1.11-6.77c0-.08,0-.27-.09-.58a5.53,5.53,0,0,0,.92-.53,3.52,3.52,0,0,0,.87-1,6.16,6.16,0,0,0,.75-1.93,9.67,9.67,0,0,0,.23-2C84.61,2.89,84.16,1.62,83.27,1ZM69.19,13.05l2.13-7.3.53,7.3Zm13-6.47a8.39,8.39,0,0,1-.46,1.65,2,2,0,0,1-1,1.15,3.29,3.29,0,0,1-1.14.2l.87-6.87a3.61,3.61,0,0,1,.23-1.06.45.45,0,0,1,.43-.27,1.05,1.05,0,0,1,1,.83,6.14,6.14,0,0,1,.3,2.08A11,11,0,0,1,82.22,6.58ZM90.48.41h3v.78a1.07,1.07,0,0,0-.55.41,6.13,6.13,0,0,0-.77,1.62l-2.72,8-.72,5.55c0,.22-.07.51-.1.86a7.29,7.29,0,0,0-.06.73,1.46,1.46,0,0,0,.29,1.07,1.61,1.61,0,0,0,.83.25v.78H85V19.7a1.56,1.56,0,0,0,.93-.39,3.7,3.7,0,0,0,.53-1.76l.85-6.45-1.26-8a6.07,6.07,0,0,0-.36-1.47.81.81,0,0,0-.7-.4V.41h4v.78a1.32,1.32,0,0,0-.76.23c-.15.12-.23.4-.23.84a4.46,4.46,0,0,0,0,.48c0,.19,0,.39.07.6l1,6.54,1.88-5.55c.1-.29.18-.55.24-.79a4.68,4.68,0,0,0,.14-1.11,1.35,1.35,0,0,0-.31-1,1.14,1.14,0,0,0-.66-.2Zm18.61,1.22c.1-.19.35-.28.73-.28a2.16,2.16,0,0,1,2.23,1.54A10.27,10.27,0,0,1,112.39,6l.38.13.62-5.7h-7.76v.78a1.67,1.67,0,0,1,.86.31,1.59,1.59,0,0,1,.19,1,6.58,6.58,0,0,1,0,.71c0,.28-.07.59-.11.93l-1.77,13.46a4.53,4.53,0,0,1-.41,1.62,1.17,1.17,0,0,1-.73.51,1,1,0,0,1-.73-.4,5.08,5.08,0,0,1-.49-1.73l-1.1-6.77c0-.08,0-.27-.1-.58a5.14,5.14,0,0,0,.92-.53,3.4,3.4,0,0,0,.88-1,6.16,6.16,0,0,0,.75-1.93,9.63,9.63,0,0,0,.22-2c0-1.87-.44-3.14-1.34-3.81a3.38,3.38,0,0,0-2-.54h-4v.78a1.78,1.78,0,0,1,.85.3,1.4,1.4,0,0,1,.19.91c0,.24,0,.56-.06,1,0,.21,0,.45-.09.73L95.74,17.56a4.53,4.53,0,0,1-.41,1.62,1.15,1.15,0,0,1-.75.52v.78h4.28V19.7a1.62,1.62,0,0,1-.86-.32,1.72,1.72,0,0,1-.18-1v-.29c0-.09,0-.18,0-.25l.12-1,.86-6.24h.4l1.55,9.92h10.8l.85-5.83-.35-.13a7.9,7.9,0,0,1-2.24,4.23,3.35,3.35,0,0,1-2.23.76.71.71,0,0,1-.65-.26,1.37,1.37,0,0,1-.15-.68c0-.09,0-.23,0-.39s0-.34.05-.51l.95-7.33a1.92,1.92,0,0,1,1.65.59,4,4,0,0,1,.42,2.18c0,.14,0,.31,0,.52s0,.46,0,.74l.4.15,1.07-8.21-.41-.1a7,7,0,0,1-1,2.65,3.15,3.15,0,0,1-2,.52l.85-6.67A3,3,0,0,1,109.09,1.63Zm-9,7.75a3.35,3.35,0,0,1-1.15.2l.87-6.87a4,4,0,0,1,.23-1.06.45.45,0,0,1,.43-.27,1.05,1.05,0,0,1,1,.83,6.14,6.14,0,0,1,.3,2.08,11.74,11.74,0,0,1-.21,2.29,9,9,0,0,1-.47,1.65A2,2,0,0,1,100.1,9.38ZM120.18.07h.43l-.59,6-.37-.1-.05-1a10.11,10.11,0,0,0-.41-2.39c-.34-1-.83-1.57-1.48-1.57s-.95.42-1.21,1.26a6.17,6.17,0,0,0-.25,1.8,5.92,5.92,0,0,0,.26,1.82,5.23,5.23,0,0,0,.44,1L118.19,9a12.6,12.6,0,0,1,1.12,2.57,10.75,10.75,0,0,1,.47,3.29,10,10,0,0,1-.9,4.29,2.76,2.76,0,0,1-2.46,1.91,2.17,2.17,0,0,1-.79-.15,3.28,3.28,0,0,1-.79-.44l-.36-.28-.26-.18a.38.38,0,0,0-.16,0,.34.34,0,0,0-.34.23,5.5,5.5,0,0,0-.23.84h-.43l.52-6.73.41.06c0,1,.07,1.66.12,2.09a7.13,7.13,0,0,0,.49,1.95,3.52,3.52,0,0,0,.73,1.18,1.25,1.25,0,0,0,.9.41c.57,0,1-.39,1.34-1.15a7.13,7.13,0,0,0,.47-2.68,9.86,9.86,0,0,0-1.76-4.77,11.23,11.23,0,0,1-1.77-5.58,9.8,9.8,0,0,1,.78-4.12A2.41,2.41,0,0,1,117.46,0a2.06,2.06,0,0,1,.79.16,1.9,1.9,0,0,1,.47.25l.37.25a1.15,1.15,0,0,0,.25.12.47.47,0,0,0,.22,0A.44.44,0,0,0,120,.62,2.6,2.6,0,0,0,120.18.07Zm10,2a26.67,26.67,0,0,0-.66,3.7l-.9,6.85a32.12,32.12,0,0,1-1.16,5.7c-.68,1.83-1.67,2.74-3,2.74a2.7,2.7,0,0,1-2.28-1.36,6.67,6.67,0,0,1-.92-3.77,19.46,19.46,0,0,1,.11-2c0-.46.15-1.26.3-2.42l1-7.36c0-.33.08-.64.11-.93s0-.55,0-.77a1.38,1.38,0,0,0-.2-.91,1.74,1.74,0,0,0-.85-.3V.41h4.43v.78a1.39,1.39,0,0,0-.91.47,4.25,4.25,0,0,0-.44,1.68l-1.18,9c-.11.8-.19,1.46-.25,2q-.15,1.37-.15,2a4.41,4.41,0,0,0,.48,2.27,1.44,1.44,0,0,0,1.29.78c.91,0,1.62-.82,2.13-2.48a30.62,30.62,0,0,0,.91-4.85L129,5.76c.1-.91.14-1.3.13-1.19a14.64,14.64,0,0,0,.13-1.6,2.12,2.12,0,0,0-.38-1.46,1.35,1.35,0,0,0-.77-.32V.41H131v.78A1.18,1.18,0,0,0,130.23,2.06Zm8.41,12.59-.84,5.83h-8V19.7a1.24,1.24,0,0,0,.76-.52,4.73,4.73,0,0,0,.4-1.63L132.75,4.1q.08-.57.12-1c0-.26,0-.48,0-.68,0-.51-.06-.83-.2-1a1.67,1.67,0,0,0-.85-.31V.41h4.56v.78a1.67,1.67,0,0,0-1,.49A4.17,4.17,0,0,0,135,3.34l-1.87,14.31c0,.16,0,.31-.05.45s0,.3,0,.48a1,1,0,0,0,.21.72.8.8,0,0,0,.59.21,3.54,3.54,0,0,0,2.56-1.05,9.24,9.24,0,0,0,1.91-3.94Zm7.72-8.56a7.63,7.63,0,0,0-.79-4,1.53,1.53,0,0,0-1.21-.64l-2,15.35-.12,1a2.47,2.47,0,0,0,0,.34,2.35,2.35,0,0,0,0,.26c0,.52.08.84.23,1a2,2,0,0,0,1,.3v.78h-4.76V19.7a1.18,1.18,0,0,0,.9-.26,3.75,3.75,0,0,0,.6-1.88l2.11-16.11a2.17,2.17,0,0,0-1.83,1.08,9.57,9.57,0,0,0-1.27,3.21l-.37-.2.56-5.13h7.91l-.52,5.76Zm3.41-3.79a6.17,6.17,0,0,0-.25,1.8,5.63,5.63,0,0,0,.26,1.82,5.23,5.23,0,0,0,.44,1L151.46,9a13.19,13.19,0,0,1,1.13,2.57,11.08,11.08,0,0,1,.46,3.29,10,10,0,0,1-.9,4.29,2.76,2.76,0,0,1-2.46,1.91,2.21,2.21,0,0,1-.79-.15,3.28,3.28,0,0,1-.79-.44l-.36-.28-.26-.18a.38.38,0,0,0-.16,0,.34.34,0,0,0-.34.23,5.5,5.5,0,0,0-.23.84h-.43l.52-6.73.41.06c0,1,.07,1.66.12,2.09a7.13,7.13,0,0,0,.49,1.95,3.52,3.52,0,0,0,.73,1.18,1.25,1.25,0,0,0,.9.41c.57,0,1-.39,1.34-1.15a7.13,7.13,0,0,0,.47-2.68,9.86,9.86,0,0,0-1.76-4.77,11.23,11.23,0,0,1-1.77-5.58,9.8,9.8,0,0,1,.78-4.12A2.41,2.41,0,0,1,150.73,0a2.06,2.06,0,0,1,.79.16,1.9,1.9,0,0,1,.47.25l.37.25a1.34,1.34,0,0,0,.24.12.56.56,0,0,0,.23,0,.44.44,0,0,0,.39-.21,2.6,2.6,0,0,0,.23-.55h.43l-.59,6-.37-.1,0-1a10.11,10.11,0,0,0-.41-2.39c-.34-1-.83-1.57-1.48-1.57S150,1.46,149.77,2.3Z",opacity:1,strokeColor:"",fillColor:"#192760",width:153.879,height:21.051,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"InformationOnly":case"Information Only":t={iconName:"Information Only",pathdata:"M4,19.14a2,2,0,0,0,1,.32v.76H0v-.76a1.42,1.42,0,0,0,.87-.52,4,4,0,0,0,.47-1.59l2-13.24c.06-.38.1-.69.13-1a5.73,5.73,0,0,0,0-.67c0-.5-.08-.81-.24-.94a2.2,2.2,0,0,0-1-.31V.48H7.26v.76a1.48,1.48,0,0,0-.88.52,4.14,4.14,0,0,0-.45,1.6l-2,13.24-.13,1c0,.1,0,.19,0,.3a2.72,2.72,0,0,0,0,.28A1.32,1.32,0,0,0,4,19.14ZM18.17,1.3l.24-.06V.48H15v.76a1.66,1.66,0,0,1,.9.33,2.08,2.08,0,0,1,.4,1.48,12.85,12.85,0,0,1-.1,1.34c-.05.41-.11.87-.18,1.39l-1.29,8.34L11.15.48H7.83v.76a1.69,1.69,0,0,1,.77.24,1.9,1.9,0,0,1,.51,1.06l.07.3L7.33,15a24.86,24.86,0,0,1-.76,3.61,1.32,1.32,0,0,1-.92.9v.76H9.09v-.76a1.67,1.67,0,0,1-.88-.32,1.92,1.92,0,0,1-.44-1.44,7.09,7.09,0,0,1,0-.79c0-.43.13-1.09.27-2L9.72,4.38,14,20.71h.41l2.3-15a28.78,28.78,0,0,1,.67-3.42C17.57,1.72,17.83,1.38,18.17,1.3ZM19.33.48v.76a2.32,2.32,0,0,1,1,.3c.15.13.23.42.23.9,0,.23,0,.55-.07,1,0,.2-.06.44-.1.71l-2,13.23a4,4,0,0,1-.46,1.58,1.39,1.39,0,0,1-.88.54v.76h4.89v-.76a1.36,1.36,0,0,1-.78-.19,1.39,1.39,0,0,1-.41-1.17c0-.1,0-.21,0-.31s0-.22,0-.35l1.09-7.21a2.09,2.09,0,0,1,1.83.64A3.81,3.81,0,0,1,24.1,13c0,.11,0,.28,0,.49s0,.46,0,.75l.45.14,1.22-8.07-.46-.1a6.19,6.19,0,0,1-1.11,2.59A3.89,3.89,0,0,1,22,9.28l1-6.54a2.43,2.43,0,0,1,.33-1.08.93.93,0,0,1,.76-.26,2.45,2.45,0,0,1,2.52,1.54A9,9,0,0,1,27,6l.44.13.7-5.6ZM39.06,7.11a21,21,0,0,1-2,9.07q-2.16,4.61-5,4.6a3.28,3.28,0,0,1-2.88-1.92,10.29,10.29,0,0,1-1.11-5.14,21.08,21.08,0,0,1,2.07-9.19Q32.31,0,35,0a3.37,3.37,0,0,1,2.93,1.92A10.14,10.14,0,0,1,39.06,7.11ZM36.68,4.6a7,7,0,0,0-.42-2.55A1.37,1.37,0,0,0,35,1c-1.37,0-2.52,2.17-3.46,6.53a40.81,40.81,0,0,0-1.07,8.26,10,10,0,0,0,.21,2.2c.26,1.18.74,1.77,1.43,1.77s1.24-.43,1.78-1.29a18.75,18.75,0,0,0,1.65-4.93,43.28,43.28,0,0,0,.85-4.83A36.93,36.93,0,0,0,36.68,4.6ZM61,19.15a2.25,2.25,0,0,0,1,.31v.76H56.84v-.76A2,2,0,0,0,58,19a3.6,3.6,0,0,0,.5-1.63L60.56,3.76l-6.2,16.85H53.9L52.78,4.24,51.12,15c-.09.55-.15,1-.2,1.37a13,13,0,0,0-.11,1.42,1.8,1.8,0,0,0,.46,1.43,1.54,1.54,0,0,0,.86.29v.76H45.49l-1.78-9.76h-.47l-1,6.14-.13,1,0,.25c0,.09,0,.19,0,.28a1.47,1.47,0,0,0,.22,1,2,2,0,0,0,1,.32v.76H38.37v-.76a1.42,1.42,0,0,0,.88-.52,4.21,4.21,0,0,0,.46-1.59l2-13.24c0-.27.08-.51.11-.71a8.23,8.23,0,0,0,.07-1,1.23,1.23,0,0,0-.23-.9,2.32,2.32,0,0,0-1-.3V.48h4.54A4.34,4.34,0,0,1,47.62,1c1,.65,1.54,1.9,1.54,3.75a7.78,7.78,0,0,1-.26,2A5.56,5.56,0,0,1,48,8.62a3.87,3.87,0,0,1-1,1,8.06,8.06,0,0,1-1.06.52c.05.3.09.49.11.57l1.27,6.66a4.58,4.58,0,0,0,.55,1.7,1.23,1.23,0,0,0,.83.39,1.31,1.31,0,0,0,.86-.84A23,23,0,0,0,50.36,15L52.05,4c.06-.37.11-.7.15-1a7.42,7.42,0,0,0,0-.75c0-.41-.08-.67-.25-.78a2.09,2.09,0,0,0-.94-.21V.48h3.77l1,13.91,5-13.91h3.51v.76a1.46,1.46,0,0,0-.79.4A3.71,3.71,0,0,0,63,3.31L61,16.59c0,.29-.09.58-.13.88s-.05.55-.05.75Q60.79,19,61,19.15Zm-15.14-11a7.46,7.46,0,0,0,.53-1.62,9.54,9.54,0,0,0,.25-2.26,5.31,5.31,0,0,0-.35-2,1.18,1.18,0,0,0-1.16-.81.54.54,0,0,0-.5.26,3.37,3.37,0,0,0-.26,1.05l-1,6.76a4.28,4.28,0,0,0,1.31-.2A2.17,2.17,0,0,0,45.89,8.17ZM73.21,19.51v.71h-5v-.71a1.61,1.61,0,0,0,1-.41,1.92,1.92,0,0,0,.3-1.29c0-.22,0-.75-.09-1.58,0-.17-.06-.89-.16-2.15H65.68l-1,3c-.06.2-.12.42-.17.66a3.4,3.4,0,0,0-.08.69q0,.62.21.78a1.9,1.9,0,0,0,.86.3v.71H62.29v-.71A2,2,0,0,0,63,19a6.47,6.47,0,0,0,.72-1.56L69.82.07h.43L71.83,17A6.77,6.77,0,0,0,72.22,19,1.23,1.23,0,0,0,73.21,19.51Zm-4.08-6.6-.61-7.18-2.44,7.18ZM82.52,6.14l.6-5.66H74l-.63,5,.42.2a8.71,8.71,0,0,1,1.46-3.16,2.57,2.57,0,0,1,2.1-1.06L75,17.35a3.36,3.36,0,0,1-.68,1.85,1.57,1.57,0,0,1-1,.26v.76H78.7v-.76a2.69,2.69,0,0,1-1.11-.3c-.18-.13-.27-.45-.27-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.14-1L79.8,1.5a1.87,1.87,0,0,1,1.39.63c.58.7.88,2,.91,3.94ZM88.84.48H83.92v.76a2.31,2.31,0,0,1,1,.31c.15.13.23.44.23.94a5.56,5.56,0,0,1,0,.67c0,.26-.08.57-.14,1l-2,13.24a4,4,0,0,1-.47,1.59,1.36,1.36,0,0,1-.87.52v.76H86.5v-.76a2,2,0,0,1-1-.32,1.32,1.32,0,0,1-.23-.94c0-.09,0-.18,0-.28s0-.2,0-.3l.13-1,2-13.24A4.09,4.09,0,0,1,88,1.76a1.45,1.45,0,0,1,.87-.52ZM99.11,7.11a21,21,0,0,1-2,9.07q-2.16,4.61-5,4.6a3.28,3.28,0,0,1-2.88-1.92,10.29,10.29,0,0,1-1.11-5.14,21.08,21.08,0,0,1,2.07-9.19C91.63,1.51,93.25,0,95,0A3.36,3.36,0,0,1,98,1.92,10,10,0,0,1,99.11,7.11ZM96.72,4.6a7.18,7.18,0,0,0-.41-2.55c-.28-.7-.7-1-1.29-1-1.37,0-2.52,2.17-3.46,6.53a40.7,40.7,0,0,0-1.06,8.26,10,10,0,0,0,.2,2.2c.26,1.18.74,1.77,1.43,1.77a2.2,2.2,0,0,0,1.78-1.29,18.75,18.75,0,0,0,1.65-4.93,41.1,41.1,0,0,0,.85-4.83A34.65,34.65,0,0,0,96.72,4.6Zm11.1-3.36a1.66,1.66,0,0,1,.9.33,2.08,2.08,0,0,1,.4,1.48,12.85,12.85,0,0,1-.1,1.34c0,.41-.11.87-.18,1.39l-1.29,8.34L104,.48h-3.33v.76a1.7,1.7,0,0,1,.78.24,2,2,0,0,1,.51,1.06l.07.3L100.13,15a24,24,0,0,1-.75,3.61,1.35,1.35,0,0,1-.93.9v.76h3.45v-.76a1.67,1.67,0,0,1-.88-.32,1.88,1.88,0,0,1-.44-1.44,7.09,7.09,0,0,1,0-.79c0-.43.13-1.09.27-2l1.64-10.57,4.29,16.33h.41l2.3-15a28.78,28.78,0,0,1,.67-3.42c.18-.59.44-.93.78-1l.23-.06V.48h-3.39ZM125,7.11a21,21,0,0,1-2,9.07c-1.45,3.07-3.1,4.6-5,4.6a3.28,3.28,0,0,1-2.87-1.92A10.29,10.29,0,0,1,114,13.72a21.22,21.22,0,0,1,2.06-9.19Q118.22,0,120.91,0a3.36,3.36,0,0,1,2.92,1.92A10,10,0,0,1,125,7.11ZM122.59,4.6a7,7,0,0,0-.41-2.55,1.37,1.37,0,0,0-1.28-1c-1.37,0-2.53,2.17-3.46,6.53a40.11,40.11,0,0,0-1.07,8.26,10.65,10.65,0,0,0,.2,2.2q.39,1.77,1.44,1.77a2.2,2.2,0,0,0,1.77-1.29,18.29,18.29,0,0,0,1.66-4.93,45.71,45.71,0,0,0,.85-4.83A36.53,36.53,0,0,0,122.59,4.6Zm14.26-3.3.24-.06V.48h-3.4v.76a1.74,1.74,0,0,1,.91.33,2.13,2.13,0,0,1,.4,1.48c0,.28,0,.73-.11,1.34,0,.41-.11.87-.18,1.39l-1.29,8.34L129.83.48h-3.32v.76a1.69,1.69,0,0,1,.77.24,1.9,1.9,0,0,1,.51,1.06l.07.3L126,15a27,27,0,0,1-.75,3.61,1.35,1.35,0,0,1-.93.9v.76h3.44v-.76a1.67,1.67,0,0,1-.88-.32,1.92,1.92,0,0,1-.44-1.44c0-.26,0-.52,0-.79.05-.43.13-1.09.27-2l1.65-10.57,4.29,16.33h.41l2.29-15a31.07,31.07,0,0,1,.67-3.42C136.25,1.72,136.52,1.38,136.85,1.3Zm8.52,13.06a8.55,8.55,0,0,1-2.19,3.87,4.44,4.44,0,0,1-2.94,1,1,1,0,0,1-.68-.21.9.9,0,0,1-.24-.7,3.4,3.4,0,0,1,0-.48c0-.14,0-.28,0-.44l2.15-14.08a3.69,3.69,0,0,1,.5-1.64,2.22,2.22,0,0,1,1.16-.48V.48H138v.76a2.2,2.2,0,0,1,1,.31c.16.13.24.44.24.94a5.73,5.73,0,0,1-.05.67c0,.26-.07.57-.13,1l-2,13.23a4,4,0,0,1-.47,1.6,1.36,1.36,0,0,1-.87.52v.76h9.16l1-5.74ZM151.79.48v.76a1.52,1.52,0,0,1,.76.2,1.21,1.21,0,0,1,.37,1,4.09,4.09,0,0,1-.17,1.09c-.07.24-.16.5-.27.79L150.32,9.8l-1.18-6.44a4.51,4.51,0,0,1-.08-.6,4.37,4.37,0,0,1,0-.46c0-.43.09-.71.27-.83a1.75,1.75,0,0,1,.87-.23V.48h-4.63v.76a.94.94,0,0,1,.8.4,5.08,5.08,0,0,1,.42,1.44L148.2,11l-1,6.35a3.35,3.35,0,0,1-.61,1.73,1.91,1.91,0,0,1-1.06.39v.76h5.32v-.76a2,2,0,0,1-.95-.25,1.29,1.29,0,0,1-.33-1.05,7.29,7.29,0,0,1,.06-.73q.06-.51.12-.84l.82-5.46,3.12-7.89a5.54,5.54,0,0,1,.89-1.59,1.28,1.28,0,0,1,.63-.41V.48Z",opacity:1,strokeColor:"",fillColor:"#192760",width:155.237,height:20.783,stampFillColor:"#dce3ef",stampStrokeColor:""}}if(t)return t.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.currentStampAnnotation=t,t}},t.prototype.saveStampAnnotations=function(){var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_stamp");this.pdfViewerBase.isStorageExceed&&(e=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]);for(var t=new Array,i=0;i<this.pdfViewerBase.pageCount;i++)t[i]=[];if(e&&!this.pdfViewer.annotationSettings.skipDownload)for(var n=JSON.parse(e),o=0;o<n.length;o++){var s=[],a=n[o];if(a){for(var r=0;a.annotations.length>r;r++)this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));s=a.annotations}t[a.pageIndex]=s}return JSON.stringify(t)},t.prototype.storeStampInSession=function(e,t){var i=Math.round(JSON.stringify(window.sessionStorage).length/1024),n=Math.round(JSON.stringify(t).length/1024);(i>4500||n>4500)&&(this.pdfViewerBase.isStorageExceed=!0,this.pdfViewer.annotationModule.clearAnnotationStorage());var o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_stamp"),s=0;if(this.pdfViewerBase.isStorageExceed&&(o=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]),o){this.pdfViewer.annotationModule.storeAnnotationCollections(t,e);var a=JSON.parse(o);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_stamp");var r=this.pdfViewer.annotationModule.getPageCollection(a,e);if(a[r])a[r].annotations.push(t),s=a[r].annotations.indexOf(t);else{var l={pageIndex:e,annotations:[]};l.annotations.push(t),s=l.annotations.indexOf(t),a.push(l)}M=JSON.stringify(a);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]=M:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_stamp",M)}else{this.pdfViewer.annotationModule.storeAnnotationCollections(t,e);var d={pageIndex:e,annotations:[]};d.annotations.push(t),s=d.annotations.indexOf(t);var u=[];u.push(d);var M=JSON.stringify(u);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]=M:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_stamp",M)}return s},t.prototype.updateSessionStorage=function(e,t,i){if(null!=t)for(var n=0;n<e.annotations.length;n++)if(e.annotations[n].id===t){e=e.annotations[n];break}"Rotate"===i&&(e=e.annotations[0]);var o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_stamp");if(this.pdfViewerBase.isStorageExceed&&(o=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]),o)for(var s=e.bounds,a=JSON.parse(o),r=0;r<a.length;r++)for(var l=a[r],d=0;d<l.annotations.length;d++)if(null!=a[r].annotations[d]&&a[r].annotations[d].randomId===e.id){this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_stamp");var u=this.pdfViewer.annotationModule.getPageCollection(a,a[r].annotations[d].pageNumber);"delete"!==i?a[u]&&(e.wrapper.children[1]?a[r].annotations[d].opacity=e.wrapper.children[1].style.opacity:a[r].annotations[d].opacity=e.wrapper.children[0].style.opacity,a[r].annotations[d].rotateAngle=e.rotateAngle,a[r].annotations[d].bounds={left:s.x,top:s.y,width:e.wrapper.actualSize.width,height:e.wrapper.actualSize.height,right:s.right,bottom:s.bottom}):a[r].annotations.splice(d,1);var M=JSON.stringify(a);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]=M:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_stamp",M);break}},t.prototype.saveImportedStampAnnotations=function(e,t){var n,o=null,s=!1,a=e.IsDynamic;if(e.AnnotationSettings=e.AnnotationSettings?e.AnnotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.stampSettings),e.allowedInteractions=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e),e.Subject&&a)n=this.retrieveDynamicStampAnnotation(e.Subject),s=!0;else if(e.Subject){if(n=this.retrievestampAnnotation(e.Subject),"Accepted"===e.Subject||"Rejected"===e.Subject){var r=i.processPathData(n.pathdata);n.pathdata=i.splitArrayCollection(r),s=!0}}else e.AnnotationSettings=e.AnnotationSettings?e.AnnotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.customStampSettings),o={stampAnnotationType:"image",author:e.Author,modifiedDate:e.ModifiedDate,subject:e.Subject,allowedInteractions:e.allowedInteractions,note:e.Note,strokeColor:e.StrokeColor,fillColor:e.FillColor,opacity:e.Opacity,stampFillcolor:e.FillColor,rotateAngle:e.RotateAngle,creationDate:e.ModifiedDate,pageNumber:t,icon:"",stampAnnotationPath:this.findImageData(e.Apperarance),randomId:"image",isDynamicStamp:this.pdfViewerBase.isDynamicStamp,dynamicText:" ",bounds:this.calculateImagePosition(e.Rect,!0),annotName:e.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,author:e.Author,modifiedDate:e.ModifiedDate},shapeAnnotationType:"stamp",annotationSelectorSettings:this.getSettings(e),annotationSettings:e.annotationSettings,customData:this.pdfViewer.annotation.getCustomData(e),isPrint:e.isPrint,isCommentLock:e.IsCommentLock,isMaskedImage:e.IsMaskedImage},this.pdfViewer.annotationModule.storeAnnotations(t,o,"_annotations_stamp");n&&(o={stampAnnotationType:"path",author:e.Author,modifiedDate:e.ModifiedDate,subject:e.Subject,note:e.Note,strokeColor:e.StrokeColor,fillColor:e.FillColor,opacity:e.Opacity,stampFillcolor:n.stampFillColor,rotateAngle:e.RotateAngle,creationDate:e.ModifiedDate,pageNumber:t,icon:n.iconName,stampAnnotationPath:n.pathdata,randomId:"stamp",isDynamicStamp:!1,dynamicText:this.dynamicText,bounds:this.calculateImagePosition(e.Rect,!0),annotName:e.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,author:e.Author,modifiedDate:e.ModifiedDate},shapeAnnotationType:"stamp",annotationSelectorSettings:this.getSettings(e),annotationSettings:e.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(e),isPrint:e.isPrint,isCommentLock:e.IsCommentLock,isMaskedImage:e.IsMaskedImage},s&&(o.dynamicText=this.findDynamicText(e.Apperarance,e.Subject),o.isDynamicStamp=!0),this.pdfViewer.annotationModule.storeAnnotations(t,o,"_annotations_stamp"))},t.prototype.updateStampAnnotationCollections=function(e,t){var i,n=e.IsDynamic;if(e.allowedInteractions=e.AllowedInteractions?e.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e),e.Subject&&n&&"Draft"!==e.Subject)i=this.retrieveDynamicStampAnnotation(e.Subject);else{if(!e.Subject)return e.AnnotationSettings=e.AnnotationSettings?e.AnnotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.customStampSettings),e.IsLocked&&(e.AnnotationSettings.isLock=e.IsLocked),{stampAnnotationType:"image",author:e.Author,modifiedDate:e.ModifiedDate,allowedInteractions:e.allowedInteractions,note:e.Note,strokeColor:e.StrokeColor,fillColor:e.FillColor,opacity:e.Opacity,stampFillcolor:e.StampFillColor,rotateAngle:e.RotateAngle,pageNumber:t,randomId:"stamp",isDynamicStamp:this.pdfViewerBase.isDynamicStamp,dynamicText:this.dynamicText,annotationId:e.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,author:e.Author,modifiedDate:e.ModifiedDate},shapeAnnotationType:"stamp",annotationSettings:e.AnnotationSettings,customData:this.pdfViewer.annotation.getCustomData(e),isPrint:e.isPrint,isMaskedImage:e.IsMaskedImage};i=this.retrievestampAnnotation(e.Subject)}if(i)return e.AnnotationSettings=e.AnnotationSettings?e.AnnotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.stampSettings),e.IsLocked&&(e.AnnotationSettings.isLock=e.IsLocked),e.allowedInteractions=e.AllowedInteractions?e.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e),{stampAnnotationType:"path",author:e.Author,allowedInteractions:e.allowedInteractions,modifiedDate:e.ModifiedDate,subject:e.Subject,note:e.Note,strokeColor:e.StrokeColor,fillColor:e.FillColor,opacity:e.Opacity,stampFillcolor:e.StampFillColor,rotateAngle:e.RotateAngle,creationDate:i.creationDate,pageNumber:t,icon:i.iconName,stampAnnotationPath:i.pathdata,randomId:"stamp",isDynamicStamp:this.pdfViewerBase.isDynamicStamp,dynamicText:this.dynamicText,bounds:{left:e.Rect.X,top:e.Rect.Y,width:e.Rect.Width,height:e.Rect.Height},annotationId:e.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,author:e.Author,modifiedDate:e.ModifiedDate},shapeAnnotationType:"stamp",customData:this.pdfViewer.annotation.getCustomData(e),isPrint:e.isPrint,isMaskedImage:e.IsMaskedImage}},t.prototype.findImageData=function(e){if(e)for(var t=0;t<e.length;t++){var i=e[t].imagedata;if(i)return i}return""},t.prototype.findDynamicText=function(e,t){var i="";if(e){for(var n=0;n<e.length;n++){var o=e[n],s=o.type,a=o.isImport;if("string"===s&&void 0!==o.text){var r=void 0;if(a)r=o.text;else{var l=o.text.split("(");r=l[1]?l[1].split(")")[0]:o.text}r.toLowerCase()!==t.toLowerCase()&&(i+=r)}}return i}return i},t.prototype.getAnnotations=function(e,t){var i,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_stamp");if(this.pdfViewerBase.isStorageExceed&&(n=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]),n){var o=JSON.parse(n),s=this.pdfViewer.annotationModule.getPageCollection(o,e);i=o[s]?o[s].annotations:t}else i=t;return i},t.prototype.modifyInCollection=function(e,t,i){this.pdfViewer.isDocumentEdited=!0;var n=this.getAnnotations(t,null);if(null!=n&&i){for(var o=0;o<n.length;o++)i.annotName===n[o].annotName&&("bounds"===e&&(n[o].bounds={left:i.bounds.x,top:i.bounds.y,width:i.bounds.width,height:i.bounds.height},n[o].modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime()),this.pdfViewer.annotationModule.storeAnnotationCollections(n[o],t));this.manageAnnotations(n,t)}return null},t.prototype.manageAnnotations=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_stamp");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_stamp");var o=this.pdfViewer.annotationModule.getPageCollection(n,t);n[o]&&(n[o].annotations=e);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_stamp",s)}},t.prototype.updateAddAnnotationDetails=function(t,i,n,o,s,a){i=t?t.offset?t.offset:{x:10,y:10}:(t={offset:{x:10,y:10},pageNumber:0,width:void 0,height:void 0}).offset,o||s||a||(o=e.DynamicStampItem.Approved);var r=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),l=this.pdfViewer.annotation.createGUID(),d=n,u=[],M="",p="Stamp",h=[],L=!1,w=t.author?t.author:"Guest",c=this.pdfViewer.stampSettings.annotationSelectorSettings?this.pdfViewer.stampSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,C=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.stampSettings),g=this.pdfViewer.stampSettings.allowedInteractions?this.pdfViewer.stampSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions;if(C.isLock=!!t.isLock&&t.isLock,C.minHeight=t.minHeight?t.minHeight:0,C.minWidth=t.minWidth?t.minWidth:0,C.maxWidth=t.maxWidth?t.maxWidth:0,C.maxHeight=t.maxHeight?t.maxHeight:0,t.customStamps&&"Image"==t.customStamps[0].customStampName)h[0]={imagedata:t.customStamps[0].customStampImageSource,isImport:!0},p="Image",t.width=t.width?t.width:100,t.height=t.height?t.height:100;else if(o){var m=[];m=r.split(" "),M=o.toString(),h[0]={baseFontName:"Helvetica-BoldOblique",currentFontname:"95b303ab-d397-438a-83af-e2ff8a9900f1",fontSize:10,isImport:!0,text:"By "+w+" at "+m[1]+m[2]+" , "+m[0],type:"string"},L=!0,t.width=t.width?t.width:140,t.height=t.height?t.height:55}else s?(M=s.toString(),s==e.SignStampItem.Accepted||s==e.SignStampItem.Rejected?(t.width=t.width?t.width:35,t.height=t.height?t.height:35):s==e.SignStampItem.SignHere?(t.width=t.width?t.width:110,t.height=t.height?t.height:30):s==e.SignStampItem.Witness?(t.width=t.width?t.width:130,t.height=t.height?t.height:30):s==e.SignStampItem.InitialHere&&(t.width=t.width?t.width:90,t.height=t.height?t.height:30)):a&&(M=a.toString(),a==e.StandardBusinessStampItem.Final||a==e.StandardBusinessStampItem.Draft?(t.width=t.width?t.width:110,t.height=t.height?t.height:30):a==e.StandardBusinessStampItem.Void?(t.width=t.width?t.width:100,t.height=t.height?t.height:30):(t.width=t.width?t.width:130,t.height=t.height?t.height:30));var f={AllowedInteractions:t.allowedInteractions?t.allowedInteractions:g,AnnotName:l,AnnotType:"stamp",AnnotationSelectorSettings:t.annotationSelectorSettings?t.annotationSelectorSettings:c,AnnotationSettings:C,Apperarance:h||null,Author:w,Comments:null,CreatedDate:r,CustomData:t.customData?t.customData:null,ExistingCustomData:null,FillColor:"#192760",Icon:0,IsCommentLock:!1,IsDynamic:L,IsLocked:!!t.isLock&&t.isLock,IsPrint:!t.isPrint||t.isPrint,ModifiedDate:"",Name:null,Note:"",Opacity:t.opacity?t.opacity:1,Rect:{X:i.x,Y:i.y,Width:t.width,Height:t.height,Left:i.x,Top:i.y,Location:{X:i.x,Y:i.y},Size:{Height:t.height,IsEmpty:!1,Width:t.width}},RotateAngle:0,StampAnnotationtype:p,State:"",StateModel:"",StrokeColor:"#dce3ef",Subject:M,matrix:null,pageNumber:d};return u[0]=f,{stampAnnotations:u}},t}(),Tt=function(){function e(e,t){this.commentsCount=0,this.commentsreplyCount=0,this.commentContextMenu=[],this.isAccordionContainer=!0,this.isCreateContextMenu=!1,this.isCommentsSelected=!1,this.isAddAnnotationProgramatically=!1,this.isEditableElement=!1,this.isPageCommentsRendered=!1,this.isCommentsRendered=!1,this.isAnnotationRendered=!1,this.pdfViewer=e,this.pdfViewerBase=t,this.opacity=this.pdfViewer.stickyNotesSettings.opacity?this.pdfViewer.stickyNotesSettings.opacity:1}return e.prototype.renderStickyNotesAnnotations=function(e,t,i){if(e&&e.length>0)for(var n=0;n<e.length;n++){var o=e[n],s=!1,a=this.getAnnotations(t,null,"sticky");if(null!==a)for(var r=0;r<a.length;r++){var l=o.annotName?o.annotName:o.AnnotName,d=a[r].annotName?a[r].annotName:a[r].AnnotName;if(d&&l&&d===l){s=!0;break}}if(!s){o.annotationAddMode=this.pdfViewer.annotationModule.findAnnotationMode(o,t,o.AnnotType);var u=null,M=o.Bounds,p=o.Author;o.AnnotationSettings=o.AnnotationSettings?o.AnnotationSettings:this.pdfViewer.annotationModule.updateAnnotationSettings(o),o.allowedInteractions=o.AllowedInteraction?o.AllowedInteraction:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(o);var h=!0;h="Imported Annotation"===o.annotationAddMode?o.IsPrint:o.AnnotationSettings.isPrint,o.IsLock&&(o.AnnotationSettings.isLock=o.IsLock),u={shapeAnnotationType:"sticky",author:p,modifiedDate:o.ModifiedDate,subject:o.Subject,note:o.Note,opacity:o.Opacity,state:o.State,stateModel:o.StateModel,pathData:"",comments:this.pdfViewer.annotationModule.getAnnotationComments(o.Comments,o,p),review:{state:o.State,stateModel:o.StateModel,modifiedDate:o.ModifiedDate,author:p},bounds:{left:o.Bounds.X,top:o.Bounds.Y,width:o.Bounds.Width,height:o.Bounds.Height,right:o.Bounds.Right,bottom:o.Bounds.Bottom},annotName:o.AnnotName,color:o.color,annotationSelectorSettings:this.getSettings(o),customData:this.pdfViewer.annotation.getCustomData(o),annotationSettings:o.AnnotationSettings,allowedInteractions:o.allowedInteractions,isPrint:h,isCommentLock:o.IsCommentLock};var L=void 0;if(o.AnnotationSelectorSettings=o.AnnotationSelectorSettings?o.AnnotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,L={author:p,modifiedDate:u.modifiedDate,annotName:u.annotName,pageIndex:t,bounds:{x:M.Left,y:M.Top,width:M.Width,height:M.Height},strokeColor:"transparent",stampStrokeColor:"",data:this.setImageSource(),shapeAnnotationType:"StickyNotes",subject:u.subject,notes:u.note,opacity:u.opacity,id:u.annotName,fillColor:u.color,annotationSelectorSettings:o.AnnotationSelectorSettings,annotationSettings:u.annotationSettings,annotationAddMode:o.annotationAddMode,isPrint:h,isCommentLock:u.isCommentLock},this.isAddAnnotationProgramatically){var w={opacity:L.opacity,borderColor:L.strokeColor,borderWidth:L.thickness,author:o.author,subject:o.subject,modifiedDate:o.modifiedDate,fillColor:L.fillColor,fontSize:L.fontSize,width:L.bounds.width,height:L.bounds.height,fontColor:L.fontColor,fontFamily:L.fontFamily,defaultText:L.dynamicText,fontStyle:L.font,textAlignment:L.textAlign};this.pdfViewer.fireAnnotationAdd(L.pageIndex,L.annotName,"StickyNotes",L.bounds,w)}i?this.drawStickyNotes(M.Left,M.Top,M.Width,M.Height,t,L,i):(this.pdfViewer.add(L),this.drawStickyNotes(M.Left,M.Top,M.Width,M.Height,t,L),this.pdfViewer.annotationModule.storeAnnotations(t,u,"_annotations_sticky"))}}},e.prototype.getSettings=function(e){var t=this.pdfViewer.annotationSelectorSettings;return e.AnnotationSelectorSettings?t=e.AnnotationSelectorSettings:this.pdfViewer.stickyNotesSettings.annotationSelectorSettings&&(t=this.pdfViewer.stickyNotesSettings.annotationSelectorSettings),t},e.prototype.drawStickyNotes=function(e,t,i,n,o,s,a){var r,l=this,d=null,u=new Image,M=this;u.onload=function(){var p,h,L="Guest"!==l.pdfViewer.annotationSettings.author?l.pdfViewer.annotationSettings.author:l.pdfViewer.stickyNotesSettings.author;if(s)r={author:s.author,modifiedDate:s.modifiedDate,annotName:s.annotName,data:u.src,bounds:{x:e,y:t,width:i,height:n},subject:s.subject,notes:s.notes,opacity:s.opacity,id:s.annotName,shapeAnnotationType:"StickyNotes",strokeColor:"transparent",stampStrokeColor:"",pageIndex:s.pageIndex,isPrint:s.isPrint};else{h=l.pdfViewer.annotation.createGUID(),(p=M.addComments("sticky",o+1))&&(document.getElementById(p).id=h);var w=l.pdfViewer.stickyNotesSettings.annotationSelectorSettings?l.pdfViewer.stickyNotesSettings.annotationSelectorSettings:l.pdfViewer.annotationSelectorSettings,c=l.pdfViewer.stickyNotesSettings.isPrint;if(r={bounds:{x:e,y:t,width:i,height:n},pageIndex:o,data:u.src,modifiedDate:l.getDateAndTime(),shapeAnnotationType:"StickyNotes",strokeColor:"transparent",stampStrokeColor:"",annotName:h,id:h,opacity:l.opacity,isPrint:c},M.pdfViewerBase.isAddComment){var C={left:r.bounds.x,top:r.bounds.y,width:r.bounds.width,height:r.bounds.height};l.pdfViewer.isDocumentEdited=!0;var g={opacity:r.opacity,author:L,modifiedDate:r.modifiedDate,subject:r.shapeAnnotationType};l.pdfViewer.fireAnnotationAdd(r.pageIndex,r.annotName,"StickyNotes",C,g)}var m=l.pdfViewer.stickyNotesSettings.isLock?l.pdfViewer.stickyNotesSettings.isLock:l.pdfViewer.annotationSettings.isLock,f=l.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(s);d={author:L,allowedInteractions:f,modifiedDate:l.getDateAndTime(),subject:"Sticky Note",shapeAnnotationType:"sticky",note:"",opacity:l.opacity,pathData:"",state:"",stateModel:"",color:"rgba(255,255,0)",comments:[],annotName:h,bounds:{left:e,top:t,width:i,height:n},review:{state:"",stateModel:"",modifiedDate:"",author:L},annotationSelectorSettings:w,customData:l.pdfViewer.annotationModule.getData("sticky"),annotationSettings:{isLock:m},isPrint:c,isCommentLock:!1}}if(s||(M.pdfViewer.annotation.addAction(o,null,r,"Addition","",r,r),M.pdfViewer.add(r),M.pdfViewer.annotationModule.storeAnnotations(o,d,"_annotations_sticky")),a)M.pdfViewer.renderDrawing(a,o);else{var y=document.getElementById(M.pdfViewer.element.id+"_annotationCanvas_"+o);M.pdfViewer.renderDrawing(y,o)}},u.src=this.setImageSource()},e.prototype.setImageSource=function(){return"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxNiAxNiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTYgMTY7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRENFM0VGO3N0cm9rZTojMTkyNzYwO3N0cm9rZS1taXRlcmxpbWl0OjEwO30KCS5zdDF7ZmlsbDojRENFM0VGO30KCS5zdDJ7ZmlsbDojMTkyNzYwO30KCS5zdDN7ZmlsbDojRTZFRERGO30KCS5zdDR7ZmlsbDojNTE2QzMwO30KCS5zdDV7ZmlsbDojNTE2QzMxO30KCS5zdDZ7ZmlsbDojMUEyNzYwO30KCS5zdDd7ZmlsbDojRjZERkRFO30KCS5zdDh7ZmlsbDojOEIyNTFBO30KCS5zdDl7ZmlsbDojOEEyNTFBO30KCS5zdDEwe2ZpbGw6I0Y2REVERDt9Cgkuc3QxMXtmaWxsOm5vbmU7c3Ryb2tlOiMxQTI3NjA7c3Ryb2tlLW1pdGVybGltaXQ6MTA7fQoJLnN0MTJ7ZmlsbDpub25lO3N0cm9rZTojNTE2QzMwO3N0cm9rZS1taXRlcmxpbWl0OjEwO30KCS5zdDEze2ZpbGw6bm9uZTtzdHJva2U6IzhCMjUxQTtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9Cgkuc3QxNHtmaWxsOm5vbmU7c3Ryb2tlOiM4QTI1MUE7c3Ryb2tlLW1pdGVybGltaXQ6MTA7fQoJLnN0MTV7ZmlsbDojNDI2OTFFO30KCS5zdDE2e2ZpbGw6I0IzMjAxMzt9Cgkuc3QxN3tmaWxsOiM5MzEyMEE7fQoJLnN0MTh7ZmlsbDpub25lO3N0cm9rZTojRkYwMDAwO3N0cm9rZS1taXRlcmxpbWl0OjEwO30KCS5zdDE5e2ZpbGw6I0ZGMDAwMDt9Cgkuc3QyMHtmaWxsOiNGQUVFMjU7fQoJLnN0MjF7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS1taXRlcmxpbWl0OjEwO30KCS5zdDIye2ZpbGw6bm9uZTtzdHJva2U6IzAwMDAwMDtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MTA7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNLTEyNDAuNS0xNDguNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTEyMzUuNS0xNTAuNy0xMjM3LjctMTQ4LjUtMTI0MC41LTE0OC41eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNLTEyNDAuNS0yMTYuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTEyMzUuNS0yMTguNy0xMjM3LjctMjE2LjUtMTI0MC41LTIxNi41eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNLTEyNDAuNS0yODQuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTEyMzUuNS0yODYuNy0xMjM3LjctMjg0LjUtMTI0MC41LTI4NC41eiIvPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0tMTEzLjUtNDc5LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUMtMTA4LjUtNDgxLjctMTEwLjctNDc5LjUtMTEzLjUtNDc5LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTExMy41LTUyMWgtMTYwYy0zLDAtNS41LDIuNS01LjUsNS41djMxYzAsMywyLjUsNS41LDUuNSw1LjVoMTYwYzMsMCw1LjUtMi41LDUuNS01LjV2LTMxCgkJQy0xMDgtNTE4LjUtMTEwLjUtNTIxLTExMy41LTUyMXogTS0xMDktNDg0LjVjMCwyLjUtMiw0LjUtNC41LDQuNWgtMTYwYy0yLjUsMC00LjUtMi00LjUtNC41di0zMWMwLTIuNSwyLTQuNSw0LjUtNC41aDE2MAoJCWMyLjUsMCw0LjUsMiw0LjUsNC41Vi00ODQuNXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjMzLjEtNTA4LjVjLTEuOS0xLjctNC44LTIuNS04LjUtMi41aC0xMXYwLjljMS4xLDAuMSwxLjksMC4yLDIuMiwwLjRjMC40LDAuMSwwLjUsMC41LDAuNSwxLjEKCQljMCwwLjIsMCwwLjUtMC4xLDAuOGMtMC4xLDAuMy0wLjIsMC42LTAuMywxLjFsLTQuNywxNS4xYy0wLjMsMS0wLjcsMS42LTEuMywyYy0wLjMsMC4yLTAuOSwwLjQtMS44LDAuNXYwLjloMTAuOQoJCWM1LjIsMCw5LjQtMS40LDEyLjYtNC4yYzIuOS0yLjUsNC4zLTUuNSw0LjMtOC45Qy0yMzAuMS01MDQuNS0yMzEuMS01MDYuOC0yMzMuMS01MDguNXogTS0yMzcuNi00OTUuOGMtMiw0LjEtNS4zLDYuMi05LjgsNi4yCgkJYy0wLjgsMC0xLjMtMC4xLTEuNi0wLjNzLTAuNS0wLjUtMC41LTFjMC0wLjEsMC0wLjIsMC0wLjNjMC0wLjEsMC4xLTAuMywwLjEtMC40bDUuMi0xN2MwLjEtMC40LDAuMy0wLjcsMC42LTAuOQoJCWMwLjMtMC4yLDAuOC0wLjQsMS43LTAuNGMyLjQsMCw0LjIsMC44LDUuMSwyLjNjMC42LDEsMC45LDIuMywwLjksNEMtMjM1LjctNTAxLTIzNi4zLTQ5OC4zLTIzNy42LTQ5NS44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMDguMi01MDEuN2MwLjktMC42LDEuNi0xLjQsMi0yLjJjMC40LTAuOCwwLjYtMS41LDAuNi0yLjJjMC0yLjEtMS4yLTMuNS0zLjUtNC4zYy0xLjMtMC40LTMuMS0wLjYtNS40LTAuNgoJCWgtMTAuNHYwLjljMS4yLDAuMSwxLjksMC4yLDIuMiwwLjNjMC4zLDAuMSwwLjUsMC41LDAuNSwxYzAsMC4zLTAuMSwwLjYtMC4yLDEuMWMtMC4xLDAuMi0wLjEsMC41LTAuMiwwLjhsLTQuNywxNS4xCgkJYy0wLjMsMC45LTAuNiwxLjUtMS4xLDEuOGMtMC40LDAuMy0xLjEsMC41LTIsMC42djAuOWgxMS4zdi0wLjljLTEuMi0wLjEtMS45LTAuMi0yLjMtMC40Yy0wLjMtMC4yLTAuNS0wLjUtMC41LTEuMQoJCWMwLTAuMSwwLTAuMiwwLTAuM2MwLTAuMSwwLTAuMiwwLjEtMC4zbDAuMy0xLjJsMi4yLTdoMS4xbDQuMSwxMS4xaDcuNnYtMC45Yy0wLjksMC0xLjYtMC4yLTIuMS0wLjVjLTAuNS0wLjMtMC45LTAuOS0xLjMtMS45CgkJbC0yLjktNy42YzAtMC4xLTAuMS0wLjMtMC4yLTAuNmMxLjEtMC4yLDEuOS0wLjQsMi40LTAuNkMtMjA5LjYtNTAwLjktMjA4LjktNTAxLjMtMjA4LjItNTAxLjd6IE0tMjExLjktNTA0LjEKCQljLTAuNCwwLjgtMC44LDEuNC0xLjIsMS44Yy0wLjYsMC42LTEuNSwxLjEtMi43LDEuM2MtMC43LDAuMS0xLjcsMC4yLTMsMC4ybDIuMy03LjdjMC4yLTAuNiwwLjQtMSwwLjYtMS4yCgkJYzAuMi0wLjIsMC42LTAuMywxLjEtMC4zYzEuMywwLDIuMiwwLjMsMi43LDAuOWMwLjUsMC42LDAuOCwxLjQsMC44LDIuM0MtMjExLjQtNTA1LjgtMjExLjYtNTA0LjktMjExLjktNTA0LjF6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE4NC00OTIuMmwtMy42LTE5LjJoLTFsLTE0LjEsMTkuOGMtMC42LDAuOS0xLjIsMS41LTEuNywxLjhjLTAuMywwLjItMC45LDAuNC0xLjYsMC42djAuOGg3LjV2LTAuOAoJCWMtMS0wLjEtMS43LTAuMi0yLTAuM2MtMC4zLTAuMS0wLjUtMC40LTAuNS0wLjljMC0wLjMsMC4xLTAuNSwwLjItMC44YzAuMS0wLjMsMC4zLTAuNSwwLjQtMC44bDIuMi0zLjRoOC4yCgkJYzAuMiwxLjQsMC4zLDIuMywwLjQsMi40YzAuMSwxLDAuMiwxLjYsMC4yLDEuOGMwLDAuNy0wLjIsMS4yLTAuNywxLjVjLTAuNSwwLjItMS4yLDAuNC0yLjMsMC41djAuOGgxMS41di0wLjgKCQljLTEuMi0wLjEtMS45LTAuMy0yLjMtMC42Qy0xODMuNS00OTAuMi0xODMuOC00OTEtMTg0LTQ5Mi4yeiBNLTE5Ny4zLTQ5Ni44bDUuNi04LjJsMS40LDguMkgtMTk3LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE3NC01MTAuMmMxLjIsMC4xLDEuOSwwLjIsMi4yLDAuM3MwLjUsMC41LDAuNSwxYzAsMC4zLTAuMSwwLjYtMC4yLDEuMWMtMC4xLDAuMi0wLjEsMC41LTAuMiwwLjhsLTQuNywxNS4xCgkJYy0wLjMsMC45LTAuNiwxLjUtMS4xLDEuOGMtMC40LDAuMy0xLjEsMC41LTIsMC42djAuOWgxMS4ydi0wLjljLTAuOCwwLTEuNC0wLjEtMS44LTAuMmMtMC42LTAuMi0wLjktMC43LTAuOS0xLjMKCQljMC0wLjEsMC0wLjIsMC0wLjRjMC0wLjEsMC4xLTAuMywwLjEtMC40bDIuNS04LjJjMi4yLDAsMy42LDAuMiw0LjIsMC43YzAuNywwLjUsMSwxLjMsMSwyLjRjMCwwLjEsMCwwLjMsMCwwLjYKCQljMCwwLjItMC4xLDAuNS0wLjEsMC45bDEsMC4ybDIuOC05LjJsLTEuMS0wLjFjLTAuOSwxLjYtMS44LDIuNi0yLjYsM3MtMi40LDAuNS00LjksMC42bDIuMi03LjVjMC4yLTAuNiwwLjQtMSwwLjgtMS4yCgkJYzAuMy0wLjIsMC45LTAuMywxLjgtMC4zYzIuOSwwLDQuOCwwLjYsNS44LDEuOGMwLjYsMC43LDAuOCwxLjgsMC45LDMuNGwxLDAuMWwxLjYtNi40SC0xNzRWLTUxMC4yeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNTEuNC01MDUuM2wxLDAuMmMwLjktMS42LDItMi44LDMuMy0zLjZjMS4zLTAuOCwzLTEuMiw0LjgtMS4ybC01LjYsMTguMWMtMC4zLDEuMS0wLjksMS44LTEuNiwyLjEKCQljLTAuNCwwLjItMS4yLDAuMy0yLjQsMC4zdjAuOWgxMi42di0wLjljLTEuMy0wLjEtMi4yLTAuMi0yLjYtMC4zYy0wLjQtMC4xLTAuNi0wLjUtMC42LTEuMWMwLTAuMSwwLTAuMiwwLTAuMwoJCWMwLTAuMSwwLTAuMiwwLjEtMC40bDAuMy0xLjJsNS4zLTE3LjJjMS40LDAsMi41LDAuMywzLjIsMC43YzEuMywwLjgsMiwyLjMsMi4xLDQuNWwxLDAuMWwxLjQtNi41aC0yMC45TC0xNTEuNC01MDUuM3oiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0tMTEzLjUtNDE0LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUMtMTA4LjUtNDE2LjctMTEwLjctNDE0LjUtMTEzLjUtNDE0LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNLTExMy41LTQxNGgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJQy0xMDgtNDE2LjUtMTEwLjUtNDE0LTExMy41LTQxNHogTS0yNzMuNS00NTVjLTIuNSwwLTQuNSwyLTQuNSw0LjV2MzFjMCwyLjUsMiw0LjUsNC41LDQuNWgxNjBjMi41LDAsNC41LTIsNC41LTQuNXYtMzEKCQljMC0yLjUtMi00LjUtNC41LTQuNUgtMjczLjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTI2OC4yLTQyNi43YzAuNS0wLjIsMS0wLjMsMS4yLTAuNWMwLjQtMC4zLDAuOC0wLjgsMS4zLTEuNmwxMS0xNy40aDAuOGwyLjgsMTYuOWMwLjIsMS4xLDAuNCwxLjgsMC43LDIuMQoJCWMwLjMsMC4zLDAuOSwwLjQsMS44LDAuNXYwLjdoLTl2LTAuN2MwLjgtMC4xLDEuNC0wLjIsMS44LTAuNGMwLjQtMC4yLDAuNS0wLjYsMC41LTEuM2MwLTAuMi0wLjEtMC43LTAuMi0xLjYKCQljMC0wLjItMC4xLTAuOS0wLjMtMi4xaC02LjRsLTEuNywzYy0wLjEsMC4yLTAuMiwwLjQtMC4zLDAuN2MtMC4xLDAuMi0wLjEsMC41LTAuMSwwLjdjMCwwLjQsMC4xLDAuNywwLjQsMC44CgkJYzAuMiwwLjEsMC44LDAuMiwxLjUsMC4zdjAuN2gtNS44Vi00MjYuN3ogTS0yNTYtNDMzLjNsLTEuMS03LjJsLTQuNCw3LjJILTI1NnoiLz4KCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik0tMjQ5LjEtNDI2LjdjMC43LTAuMSwxLjItMC4zLDEuNi0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy42LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMi0wLjkKCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4yLTAuOS0wLjYtMWMtMC4yLTAuMS0wLjgtMC4yLTEuNi0wLjJ2LTAuOGg4LjVjMS40LDAsMi42LDAuMiwzLjYsMC42YzEuOCwwLjcsMi43LDIuMSwyLjcsNAoJCWMwLDEuOC0wLjcsMy4yLTIuMiw0LjJjLTEuNSwxLjEtMy40LDEuNi01LjcsMS42Yy0wLjQsMC0wLjYsMC0wLjgsMGMtMC4yLDAtMC44LDAtMS43LTAuMWwtMS42LDUuOWwtMC4yLDFjMCwwLjEsMCwwLjItMC4xLDAuMwoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuNCwwLjljMC4zLDAuMSwwLjksMC4yLDEuOCwwLjN2MC44aC04LjdWLTQyNi43eiBNLTI0MC4zLTQzNi40YzAuMiwwLDAuNCwwLDAuNSwwLjEKCQljMC4yLDAsMC4zLDAsMC41LDBjMSwwLDEuOC0wLjEsMi4zLTAuNHMxLTAuNiwxLjQtMS4yYzAuNC0wLjUsMC43LTEuMiwwLjktMmMwLjItMC44LDAuMy0xLjUsMC4zLTJjMC0wLjgtMC4yLTEuNS0wLjYtMgoJCWMtMC40LTAuNS0xLjEtMC44LTItMC44Yy0wLjUsMC0wLjgsMC4xLTAuOSwwLjNjLTAuMiwwLjItMC4zLDAuNS0wLjUsMUwtMjQwLjMtNDM2LjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTIzMi4zLTQyNi43YzAuNy0wLjEsMS4yLTAuMywxLjYtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuNi0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMi0wLjktMC42LTFjLTAuMi0wLjEtMC44LTAuMi0xLjYtMC4ydi0wLjhoOC41YzEuNCwwLDIuNiwwLjIsMy42LDAuNmMxLjgsMC43LDIuNywyLjEsMi43LDQKCQljMCwxLjgtMC43LDMuMi0yLjIsNC4yYy0xLjUsMS4xLTMuNCwxLjYtNS43LDEuNmMtMC40LDAtMC42LDAtMC44LDBjLTAuMiwwLTAuOCwwLTEuNy0wLjFsLTEuNiw1LjlsLTAuMiwxYzAsMC4xLDAsMC4yLTAuMSwwLjMKCQljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjQsMC45YzAuMywwLjEsMC45LDAuMiwxLjgsMC4zdjAuOGgtOC43Vi00MjYuN3ogTS0yMjMuNi00MzYuNGMwLjIsMCwwLjQsMCwwLjUsMC4xCgkJYzAuMiwwLDAuMywwLDAuNSwwYzEsMCwxLjgtMC4xLDIuMy0wLjRzMS0wLjYsMS40LTEuMmMwLjQtMC41LDAuNy0xLjIsMC45LTJjMC4yLTAuOCwwLjMtMS41LDAuMy0yYzAtMC44LTAuMi0xLjUtMC42LTIKCQljLTAuNC0wLjUtMS4xLTAuOC0yLTAuOGMtMC41LDAtMC44LDAuMS0wLjksMC4zYy0wLjIsMC4yLTAuMywwLjUtMC41LDFMLTIyMy42LTQzNi40eiIvPgoJPHBhdGggY2xhc3M9InN0NSIgZD0iTS0yMTUuNi00MjYuN2MwLjctMC4xLDEuMi0wLjMsMS42LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTMuMmMwLjEtMC4zLDAuMS0wLjUsMC4yLTAuNwoJCWMwLjEtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjQtMC45cy0wLjktMC4yLTEuNy0wLjN2LTAuOGg4LjFjMS44LDAsMy4yLDAuMiw0LjIsMC41YzEuOCwwLjcsMi43LDEuOSwyLjcsMy43CgkJYzAsMC42LTAuMiwxLjMtMC41LDJzLTAuOCwxLjMtMS41LDEuOWMtMC41LDAuNC0xLjEsMC43LTEuOCwxYy0wLjQsMC4xLTEsMC4zLTEuOSwwLjVjMC4xLDAuMywwLjIsMC41LDAuMiwwLjZsMi4zLDYuNwoJCWMwLjMsMC45LDAuNiwxLjUsMSwxLjdjMC40LDAuMiwwLjksMC40LDEuNiwwLjR2MC44aC01LjlsLTMuMi05LjhoLTAuOGwtMS43LDYuMWwtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOSwwLjQsMWMwLjMsMC4xLDAuOCwwLjIsMS44LDAuM3YwLjhoLTguOFYtNDI2Ljd6IE0tMjA0LjMtNDM2LjljMC45LTAuMiwxLjYtMC42LDIuMS0xLjFjMC4zLTAuNCwwLjctMC45LDAuOS0xLjYKCQljMC4zLTAuNywwLjQtMS40LDAuNC0yLjNjMC0wLjgtMC4yLTEuNS0wLjYtMi4xYy0wLjQtMC41LTEuMS0wLjgtMi4xLTAuOGMtMC40LDAtMC43LDAuMS0wLjksMC4zYy0wLjIsMC4yLTAuMywwLjUtMC41LDFsLTEuOCw2LjgKCQlDLTIwNS42LTQzNi43LTIwNC44LTQzNi44LTIwNC4zLTQzNi45eiIvPgoJPHBhdGggY2xhc3M9InN0NSIgZD0iTS0xOTEuOC00NDEuN2MyLjYtMyw1LjUtNC41LDguNi00LjVjMi4xLDAsMy45LDAuNiw1LjIsMS45YzEuNCwxLjMsMiwzLDIsNS4yYzAsMy4yLTEuMiw2LjItMy42LDkuMQoJCWMtMi42LDMuMS01LjUsNC42LTguOSw0LjZjLTIuMSwwLTMuOC0wLjYtNS4xLTEuOWMtMS4zLTEuMy0yLTMtMi01LjFDLTE5NS41LTQzNS43LTE5NC4zLTQzOC44LTE5MS44LTQ0MS43eiBNLTE5MC45LTQyOC4yCgkJYzAuNSwxLjIsMS4zLDEuOCwyLjYsMS44YzEuMiwwLDIuMi0wLjQsMy4yLTEuM3MxLjktMi41LDMtNC45YzAuNi0xLjUsMS4xLTMuMSwxLjUtNC44YzAuNC0xLjcsMC41LTMuMSwwLjUtNC4xCgkJYzAtMS0wLjItMS44LTAuNy0yLjVzLTEuMy0xLjEtMi4zLTEuMWMtMi41LDAtNC41LDIuMi02LjIsNi41Yy0xLjMsMy4zLTEuOSw2LjEtMS45LDguM0MtMTkxLjMtNDI5LjUtMTkxLjItNDI4LjgtMTkwLjktNDI4LjJ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTE2Ni00NDUuN3YwLjhjLTAuNywwLTEuMiwwLjEtMS41LDAuMmMtMC41LDAuMi0wLjcsMC41LTAuNywxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zbDEuNSwxMS44CgkJbDUuNi04LjhjMC40LTAuNywwLjgtMS40LDEuMi0yLjFjMC40LTAuNywwLjUtMS4zLDAuNS0xLjdjMC0wLjQtMC4yLTAuNy0wLjUtMC44Yy0wLjItMC4xLTAuNy0wLjEtMS40LTAuMXYtMC44aDUuN3YwLjgKCQljLTAuNSwwLjEtMC44LDAuMy0xLDAuNGMtMC40LDAuMy0wLjgsMC43LTEuMiwxLjRsLTExLjEsMTcuN2gtMC45bC0yLjItMTVjLTAuMy0yLjEtMC42LTMuNC0wLjgtMy44Yy0wLjItMC40LTAuOC0wLjYtMS44LTAuNwoJCXYtMC44SC0xNjZ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTE1OC43LTQyNi43YzAuNy0wLjEsMS4yLTAuMywxLjYtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuNi0xMy4yYzAuMS0wLjMsMC4yLTAuNiwwLjItMC45CgkJczAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuNC0wLjljLTAuMy0wLjEtMC44LTAuMi0xLjgtMC4zdi0wLjhoMTUuOWwtMS4zLDUuNmwtMC44LTAuMWMwLTEuNC0wLjMtMi40LTAuNy0zCgkJYy0wLjgtMS0yLjMtMS41LTQuNi0xLjVjLTAuOCwwLTEuMywwLjEtMS41LDAuM2MtMC4yLDAuMi0wLjQsMC41LTAuNiwxLjFsLTEuOCw2LjZjMi4xLDAsMy40LTAuMiw0LTAuNXMxLjMtMS4yLDItMi42bDAuOCwwLjEKCQlsLTIuMiw4LjFsLTAuOC0wLjFjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjMtMS44LTAuOS0yLjFjLTAuNi0wLjQtMS43LTAuNi0zLjQtMC42bC0xLjksNy4yCgkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMywwLjdjMC4yLDAuMiwwLjcsMC4zLDEuMywwLjNjMS44LDAsMy4zLTAuMiw0LjYtMC43CgkJYzItMC44LDMuNS0yLjIsNC42LTQuMmwwLjcsMC4xbC0xLjcsNS43aC0xNi40Vi00MjYuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik0tMTQwLjQtNDI2LjdjMC42LTAuMSwxLjEtMC4yLDEuNC0wLjRjMC41LTAuMywwLjgtMC45LDEtMS43bDMuNi0xMy4yYzAuMS0wLjQsMC4yLTAuNywwLjItMC45CgkJczAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuNC0wLjljLTAuMy0wLjEtMC45LTAuMi0xLjctMC4zdi0wLjhoOC42YzIuOSwwLDUuMSwwLjcsNi42LDIuMmMxLjUsMS41LDIuMywzLjUsMi4zLDYKCQljMCwzLTEuMSw1LjYtMy40LDcuOGMtMi41LDIuNS01LjgsMy43LTkuOCwzLjdoLTguNVYtNDI2Ljd6IE0tMTIzLjgtNDQyLjhjLTAuOC0xLjMtMi4xLTItNC0yYy0wLjYsMC0xLjEsMC4xLTEuMywwLjMKCQljLTAuMiwwLjItMC40LDAuNS0wLjUsMC44bC00LjEsMTQuOWMwLDAuMS0wLjEsMC4zLTAuMSwwLjRjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjQsMC4xLDAuNywwLjQsMC44czAuNywwLjMsMS4zLDAuMwoJCWMzLjUsMCw2LTEuOCw3LjYtNS40YzEtMi4yLDEuNC00LjUsMS40LTYuOUMtMTIzLjEtNDQwLjgtMTIzLjMtNDQxLjktMTIzLjgtNDQyLjh6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QzIiBkPSJNLTExMy41LTIxMC41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LTIxMi43LTExMC43LTIxMC41LTExMy41LTIxMC41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NCIgZD0iTS0xMTMuNS0yMTBoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMtMTA4LTIxMi41LTExMC41LTIxMC0xMTMuNS0yMTB6IE0tMjczLjUtMjUxYy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVILTI3My41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NSIgZD0iTS0yNTMuMi0yNDEuOGMwLjksMC4zLDEuNSwwLjQsMS43LDAuNGMwLjMsMCwwLjUtMC4xLDAuNi0wLjJjMC4xLTAuMiwwLjMtMC40LDAuNC0wLjZoMC44bC0xLjMsNi45bC0wLjgtMC4yCgkJYzAtMC40LDAtMC43LDAtMC43YzAtMC4xLDAtMC4yLDAtMC4zYzAtMS42LTAuMy0yLjctMC45LTMuNWMtMC42LTAuOC0xLjQtMS4xLTIuNC0xLjFjLTIsMC0zLjcsMS41LTUuMSw0LjZjLTEuMywyLjctMiw1LjUtMiw4LjMKCQljMCwyLDAuNCwzLjQsMS4yLDQuMnMxLjcsMS4xLDIuNiwxLjFjMS4yLDAsMi40LTAuNSwzLjUtMS40YzAuNi0wLjUsMS4yLTEuMiwxLjgtMi4xbDAuOCwwLjZjLTAuOSwxLjUtMS45LDIuNi0zLjEsMy4zCgkJYy0xLjIsMC43LTIuNCwxLjEtMy43LDEuMWMtMiwwLTMuNy0wLjctNS0yLjFjLTEuMy0xLjQtMi0zLjItMi01LjZjMC0zLjYsMS02LjYsMy05LjJjMi0yLjYsNC40LTMuOSw3LjItMy45CgkJQy0yNTUtMjQyLjItMjU0LjEtMjQyLTI1My4yLTI0MS44eiIvPgoJPHBhdGggY2xhc3M9InN0NSIgZD0iTS0yNDctMjM3LjdjMi4yLTMsNC43LTQuNSw3LjQtNC41YzEuOCwwLDMuMywwLjYsNC41LDEuOXMxLjgsMywxLjgsNS4yYzAsMy4yLTEsNi4yLTMuMSw5LjEKCQljLTIuMiwzLjEtNC44LDQuNi03LjYsNC42Yy0xLjgsMC0zLjMtMC42LTQuNC0xLjlzLTEuNy0zLTEuNy01LjFDLTI1MC4yLTIzMS43LTI0OS4xLTIzNC44LTI0Ny0yMzcuN3ogTS0yNDYuMi0yMjQuMgoJCWMwLjQsMS4yLDEuMSwxLjgsMi4yLDEuOGMxLDAsMS45LTAuNCwyLjctMS4zYzAuOC0wLjksMS43LTIuNSwyLjUtNC45YzAuNi0xLjUsMS0zLjEsMS4zLTQuOGMwLjMtMS43LDAuNS0zLjEsMC41LTQuMQoJCWMwLTEtMC4yLTEuOC0wLjYtMi41cy0xLjEtMS4xLTItMS4xYy0yLjEsMC0zLjksMi4yLTUuMyw2LjVjLTEuMSwzLjMtMS42LDYuMS0xLjYsOC4zQy0yNDYuNS0yMjUuNS0yNDYuNC0yMjQuOC0yNDYuMi0yMjQuMnoiLz4KCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik0tMjM0LjQtMjIyLjdjMC43LTAuMSwxLjEtMC40LDEuNC0wLjljMC4zLTAuNSwwLjctMS43LDEuMi0zLjdsMi42LTExYzAuMS0wLjQsMC4yLTAuNywwLjItMQoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNC0wLjEtMC43LTAuNC0wLjhjLTAuMy0wLjEtMC43LTAuMi0xLjUtMC4ydi0wLjhoNS44bDEuNSwxMy45bDcuOC0xMy45aDUuNHYwLjgKCQljLTAuNiwwLjEtMSwwLjItMS4yLDAuNGMtMC40LDAuMy0wLjYsMC44LTAuOCwxLjdsLTMuMSwxMy4zYy0wLjEsMC4zLTAuMSwwLjYtMC4yLDAuOWMtMC4xLDAuMy0wLjEsMC41LTAuMSwwLjcKCQljMCwwLjUsMC4xLDAuOCwwLjQsMC45YzAuMiwwLjEsMC43LDAuMiwxLjUsMC4zdjAuOGgtNy45di0wLjhjMC45LTAuMSwxLjQtMC4zLDEuOC0wLjVzMC42LTAuOCwwLjgtMS42bDMuMi0xMy42bC05LjUsMTYuOGgtMC43CgkJbC0xLjctMTYuNGwtMi42LDEwLjdjLTAuMSwwLjUtMC4yLDEtMC4zLDEuNGMtMC4xLDAuNi0wLjIsMS4xLTAuMiwxLjRjMCwwLjcsMC4yLDEuMiwwLjcsMS40YzAuMywwLjIsMC43LDAuMiwxLjMsMC4zdjAuOGgtNS4zCgkJVi0yMjIuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik0tMjEyLjgtMjIyLjdjMC42LTAuMSwxLTAuMywxLjMtMC41YzAuMy0wLjMsMC41LTAuOCwwLjctMS42bDMuMS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMi0wLjktMC41LTFjLTAuMi0wLjEtMC43LTAuMi0xLjQtMC4ydi0wLjhoNy4zYzEuMiwwLDIuMywwLjIsMy4xLDAuNmMxLjYsMC43LDIuMywyLjEsMi4zLDQKCQljMCwxLjgtMC42LDMuMi0xLjksNC4yYy0xLjMsMS4xLTIuOSwxLjYtNC45LDEuNmMtMC4zLDAtMC41LDAtMC43LDBjLTAuMiwwLTAuNywwLTEuNS0wLjFsLTEuNCw1LjlsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDAuOWMwLjIsMC4xLDAuNywwLjIsMS41LDAuM3YwLjhoLTcuNVYtMjIyLjd6IE0tMjA1LjMtMjMyLjRjMC4yLDAsMC4zLDAsMC41LDAuMQoJCWMwLjEsMCwwLjMsMCwwLjQsMGMwLjksMCwxLjUtMC4xLDItMC40czAuOS0wLjYsMS4yLTEuMmMwLjMtMC41LDAuNi0xLjIsMC43LTJjMC4yLTAuOCwwLjMtMS41LDAuMy0yYzAtMC44LTAuMi0xLjUtMC41LTIKCQljLTAuMy0wLjUtMC45LTAuOC0xLjctMC44Yy0wLjQsMC0wLjcsMC4xLTAuOCwwLjNjLTAuMSwwLjItMC4zLDAuNS0wLjQsMUwtMjA1LjMtMjMyLjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTE5OC4zLTIyMi43YzAuNi0wLjEsMS0wLjMsMS4zLTAuNWMwLjMtMC4zLDAuNS0wLjgsMC43LTEuNmwzLjEtMTMuMmMwLjEtMC40LDAuMi0wLjcsMC4yLTAuOQoJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjItMC4xLTAuNy0wLjItMS41LTAuM3YtMC44aDh2MC44Yy0wLjksMC4xLTEuNSwwLjMtMS44LDAuNWMtMC4zLDAuMi0wLjYsMC44LTAuOCwxLjYKCQlsLTMuMywxNC4xYzAsMC4yLTAuMSwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuNCwwLjdjMC4yLDAuMSwwLjYsMC4yLDEsMC4yYzEuNywwLDMuMy0wLjMsNC41LTEKCQlzMi40LTIsMy40LTMuOWwwLjYsMC4xbC0xLjUsNS43aC0xNC4xVi0yMjIuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik0tMTg0LTIyMi43YzAuNi0wLjEsMS0wLjMsMS4zLTAuNWMwLjMtMC4zLDAuNS0wLjgsMC43LTEuNmwzLjEtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4yLTAuOQoJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNy0wLjItMS41LTAuM3YtMC44aDEzLjdsLTEuMSw1LjZsLTAuNy0wLjFjMC0xLjQtMC4yLTIuNC0wLjYtMwoJCWMtMC42LTEtMi0xLjUtMy45LTEuNWMtMC43LDAtMS4xLDAuMS0xLjMsMC4zcy0wLjQsMC41LTAuNSwxLjFsLTEuNSw2LjZjMS44LDAsMi45LTAuMiwzLjUtMC41YzAuNS0wLjMsMS4xLTEuMiwxLjctMi42bDAuNywwLjEKCQlsLTEuOSw4LjFsLTAuNy0wLjFjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNy0yLjFjLTAuNS0wLjQtMS41LTAuNi0yLjktMC42bC0xLjcsNy4yCgkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMywwLjdjMC4yLDAuMiwwLjYsMC4zLDEuMSwwLjNjMS41LDAsMi44LTAuMiwzLjktMC43CgkJYzEuNy0wLjgsMy0yLjIsMy45LTQuMmwwLjYsMC4xbC0xLjUsNS43SC0xODRWLTIyMi43eiIvPgoJPHBhdGggY2xhc3M9InN0NSIgZD0iTS0xNjYuNC0yMjIuN2MwLjgsMCwxLjMtMC4xLDEuNi0wLjNjMC41LTAuMywwLjgtMC45LDEtMS44bDMuNy0xNS45Yy0xLjMsMC0yLjMsMC4zLTMuMiwxLjEKCQljLTAuOSwwLjctMS42LDEuOC0yLjIsMy4ybC0wLjctMC4ybDEtNWgxNGwtMC45LDUuN2wtMC43LTAuMWMwLTEuOS0wLjUtMy4yLTEuNC0zLjljLTAuNS0wLjQtMS4yLTAuNi0yLjEtMC42bC0zLjUsMTUuMWwtMC4yLDEKCQljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjQsMWMwLjMsMC4xLDAuOCwwLjIsMS43LDAuM3YwLjhoLTguNFYtMjIyLjd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTE1My43LTIyMi43YzAuNi0wLjEsMS0wLjMsMS4zLTAuNWMwLjMtMC4zLDAuNS0wLjgsMC43LTEuNmwzLjEtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4yLTAuOQoJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNy0wLjItMS41LTAuM3YtMC44aDEzLjdsLTEuMSw1LjZsLTAuNy0wLjFjMC0xLjQtMC4yLTIuNC0wLjYtMwoJCWMtMC42LTEtMi0xLjUtMy45LTEuNWMtMC43LDAtMS4xLDAuMS0xLjMsMC4zcy0wLjQsMC41LTAuNSwxLjFsLTEuNSw2LjZjMS44LDAsMi45LTAuMiwzLjUtMC41YzAuNS0wLjMsMS4xLTEuMiwxLjctMi42bDAuNywwLjEKCQlsLTEuOSw4LjFsLTAuNy0wLjFjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNy0yLjFjLTAuNS0wLjQtMS41LTAuNi0yLjktMC42bC0xLjcsNy4yCgkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMywwLjdjMC4yLDAuMiwwLjYsMC4zLDEuMSwwLjNjMS41LDAsMi44LTAuMiwzLjktMC43CgkJYzEuNy0wLjgsMy0yLjIsMy45LTQuMmwwLjYsMC4xbC0xLjUsNS43aC0xNC4xVi0yMjIuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik0tMTM4LTIyMi43YzAuNi0wLjEsMC45LTAuMiwxLjItMC40YzAuNC0wLjMsMC43LTAuOSwwLjktMS43bDMuMS0xMy4yYzAuMS0wLjQsMC4yLTAuNywwLjItMC45CgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuNC0wLjljLTAuMi0wLjEtMC43LTAuMi0xLjUtMC4zdi0wLjhoNy40YzIuNSwwLDQuNCwwLjcsNS43LDIuMmMxLjMsMS41LDIsMy41LDIsNgoJCWMwLDMtMSw1LjYtMi45LDcuOGMtMi4xLDIuNS00LjksMy43LTguNCwzLjdoLTcuM1YtMjIyLjd6IE0tMTIzLjgtMjM4LjhjLTAuNy0xLjMtMS44LTItMy40LTJjLTAuNSwwLTAuOSwwLjEtMS4xLDAuMwoJCWMtMC4yLDAuMi0wLjMsMC41LTAuNCwwLjhsLTMuNSwxNC45YzAsMC4xLTAuMSwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNCwwLjEsMC43LDAuMywwLjhjMC4yLDAuMiwwLjYsMC4zLDEuMSwwLjMKCQljMywwLDUuMi0xLjgsNi41LTUuNGMwLjgtMi4yLDEuMi00LjUsMS4yLTYuOUMtMTIzLjEtMjM2LjgtMTIzLjQtMjM3LjktMTIzLjgtMjM4Ljh6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QzIiBkPSJNLTExMy41LDEyOS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LDEyNy4zLTExMC43LDEyOS41LTExMy41LDEyOS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NCIgZD0iTS0xMTMuNSwxMzBoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMtMTA4LDEyNy41LTExMC41LDEzMC0xMTMuNSwxMzB6IE0tMjczLjUsODljLTIuNSwwLTQuNSwyLTQuNSw0LjV2MzFjMCwyLjUsMiw0LjUsNC41LDQuNWgxNjBjMi41LDAsNC41LTIsNC41LTQuNXYtMzEKCQljMC0yLjUtMi00LjUtNC41LTQuNUgtMjczLjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTI1MC41LDExOC4zYzEtMC4xLDEuNy0wLjMsMi4xLTAuNWMwLjUtMC4zLDAuOC0wLjgsMS4xLTEuNmw0LjktMTMuMmMwLjEtMC4zLDAuMi0wLjUsMC4yLTAuNwoJCWMwLjEtMC40LDAuMi0wLjcsMC4yLTFjMC0wLjUtMC4yLTAuOC0wLjUtMC45cy0xLjEtMC4yLTIuMy0wLjN2LTAuOGgyMWwtMS43LDUuNmwtMS4xLTAuMWMwLTEuNC0wLjMtMi40LTAuOS0zYy0xLTEtMy0xLjUtNi0xLjUKCQljLTAuOSwwLTEuNSwwLjEtMS44LDAuM2MtMC4zLDAuMi0wLjYsMC41LTAuOCwxLjFsLTIuMyw2LjVjMi42LTAuMSw0LjQtMC4yLDUuMi0wLjVjMC44LTAuMywxLjctMS4yLDIuNy0yLjZsMS4xLDAuMWwtMi45LDguMQoJCWwtMS4xLTAuMWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN3MwLTAuNCwwLTAuNWMwLTEtMC4zLTEuNy0xLTIuMWMtMC43LTAuNC0yLjEtMC42LTQuNC0wLjZsLTIuNiw3LjJjMCwwLjEtMC4xLDAuMi0wLjEsMC4zCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC42LDAuMywxLDEsMS4yYzAuNCwwLjEsMSwwLjIsMS45LDAuMnYwLjhoLTExLjdWMTE4LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTIyNiwxMTguM2MwLjktMC4xLDEuNi0wLjMsMi4xLTAuNWMwLjUtMC4zLDAuOC0wLjgsMS4xLTEuNmw0LjktMTMuMmMwLjEtMC40LDAuMi0wLjcsMC4zLTAuOQoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjItMC44LTAuNi0wLjljLTAuNC0wLjEtMS4yLTAuMi0yLjMtMC4zdi0wLjhoMTEuOHYwLjhjLTEsMC4xLTEuNywwLjMtMi4xLDAuNQoJCWMtMC40LDAuMi0wLjgsMC44LTEuMSwxLjZsLTQuOSwxMy4ybC0wLjMsMWMwLDAuMSwwLDAuMi0wLjEsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMiwwLjgsMC41LDAuOXMxLjEsMC4yLDIuMywwLjN2MC44CgkJSC0yMjZWMTE4LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTIxMi41LDExOC4zYzEtMC4xLDEuOC0wLjQsMi4yLTAuOWMwLjUtMC41LDEuMS0xLjcsMS44LTMuNmw0LjQtMTIuMWwtMC4yLTAuM2MtMC4zLTAuNS0wLjctMC45LTEuMi0xLjEKCQljLTAuMy0wLjEtMS0wLjItMS45LTAuMnYtMC44aDhsOC42LDEzLjZsMy4xLTguM2MwLjItMC41LDAuMy0xLDAuNC0xLjRjMC4yLTAuNiwwLjMtMS4xLDAuMy0xLjNjMC0wLjctMC4zLTEuMi0xLTEuNQoJCWMtMC40LTAuMi0xLjEtMC4zLTIuMi0wLjN2LTAuOGg4LjF2MC44bC0wLjYsMC4xYy0wLjgsMC4xLTEuNCwwLjQtMS45LDFjLTAuNCwwLjYtMSwxLjctMS42LDMuNGwtNS41LDE1aC0xbC0xMC4zLTE2LjNsLTMuOSwxMC42CgkJYy0wLjMsMC45LTAuNSwxLjUtMC42LDJjLTAuMSwwLjMtMC4xLDAuNS0wLjEsMC44YzAsMC43LDAuMywxLjIsMSwxLjRjMC40LDAuMiwxLjEsMC4zLDIuMSwwLjN2MC44aC04LjJWMTE4LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNLTE4Ni42LDExOC4zYzAuNy0wLjIsMS4zLTAuMywxLjYtMC41YzAuNS0wLjMsMS4xLTAuOCwxLjctMS42bDE0LjctMTcuNGgxbDMuOCwxNi45YzAuMywxLjEsMC42LDEuOCwwLjksMi4xCgkJYzAuNCwwLjMsMS4yLDAuNCwyLjQsMC41djAuN2gtMTJ2LTAuN2MxLjEtMC4xLDEuOS0wLjIsMi40LTAuNGMwLjUtMC4yLDAuNy0wLjYsMC43LTEuM2MwLTAuMi0wLjEtMC44LTAuMi0xLjYKCQljMC0wLjItMC4yLTAuOS0wLjQtMi4xaC04LjVsLTIuMywzYy0wLjIsMC4yLTAuMywwLjQtMC40LDAuN2MtMC4xLDAuMi0wLjIsMC41LTAuMiwwLjdjMCwwLjQsMC4yLDAuNywwLjUsMC44czEsMC4yLDIuMSwwLjN2MC43CgkJaC03LjhWMTE4LjN6IE0tMTcwLjIsMTExLjdsLTEuNS03LjJsLTUuOSw3LjJILTE3MC4yeiIvPgoJPHBhdGggY2xhc3M9InN0NSIgZD0iTS0xNjAuNywxMTguM2MwLjktMC4xLDEuNi0wLjMsMi4xLTAuNWMwLjUtMC4zLDAuOC0wLjgsMS4xLTEuNmw0LjktMTMuMmMwLjEtMC40LDAuMi0wLjcsMC4zLTAuOQoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjItMC44LTAuNi0wLjlzLTEuMi0wLjItMi4zLTAuM3YtMC44aDEyLjV2MC44Yy0xLjQsMC4xLTIuMywwLjMtMi44LDAuNQoJCWMtMC41LDAuMi0wLjksMC44LTEuMiwxLjZsLTUuMSwxNC4xYy0wLjEsMC4yLTAuMSwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjIsMC42LDAuNiwwLjdjMC40LDAuMSwwLjksMC4yLDEuNiwwLjIKCQljMi43LDAsNS4xLTAuMyw3LTFjMi0wLjcsMy43LTIsNS4yLTMuOWwwLjksMC4xbC0yLjMsNS43aC0yMS45VjExOC4zeiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTS0xMTMuNS0xNDIuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJQy0xMDguNS0xNDQuNy0xMTAuNy0xNDIuNS0xMTMuNS0xNDIuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik0tMTEzLjUtMTQyaC0xNjBjLTMsMC01LjUtMi41LTUuNS01LjV2LTMxYzAtMywyLjUtNS41LDUuNS01LjVoMTYwYzMsMCw1LjUsMi41LDUuNSw1LjV2MzEKCQlDLTEwOC0xNDQuNS0xMTAuNS0xNDItMTEzLjUtMTQyeiBNLTI3My41LTE4M2MtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SC0yNzMuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjU1LjQtMTczLjhjMC44LDAuMywxLjIsMC40LDEuNCwwLjRjMC4yLDAsMC40LTAuMSwwLjUtMC4yYzAuMS0wLjIsMC4yLTAuNCwwLjMtMC42aDAuNmwtMS4xLDYuOWwtMC43LTAuMgoJCWMwLTAuNCwwLTAuNywwLTAuN2MwLTAuMSwwLTAuMiwwLTAuM2MwLTEuNi0wLjMtMi43LTAuOC0zLjVjLTAuNS0wLjgtMS4yLTEuMS0yLTEuMWMtMS42LDAtMy4xLDEuNS00LjMsNC42CgkJYy0xLjEsMi43LTEuNiw1LjUtMS42LDguM2MwLDIsMC4zLDMuNCwxLDQuMmMwLjcsMC44LDEuNCwxLjEsMi4yLDEuMWMxLDAsMi0wLjUsMi45LTEuNGMwLjUtMC41LDEtMS4yLDEuNS0yLjFsMC42LDAuNgoJCWMtMC43LDEuNS0xLjYsMi42LTIuNiwzLjNjLTEsMC43LTIsMS4xLTMuMSwxLjFjLTEuNywwLTMuMS0wLjctNC4yLTIuMWMtMS4xLTEuNC0xLjctMy4yLTEuNy01LjZjMC0zLjYsMC45LTYuNiwyLjYtOS4yCgkJYzEuNy0yLjYsMy43LTMuOSw2LjEtMy45Qy0yNTYuOS0xNzQuMi0yNTYuMS0xNzQtMjU1LjQtMTczLjh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI1MC4yLTE2OS43YzEuOS0zLDMuOS00LjUsNi4yLTQuNWMxLjUsMCwyLjgsMC42LDMuOCwxLjlzMS41LDMsMS41LDUuMmMwLDMuMi0wLjksNi4yLTIuNiw5LjEKCQljLTEuOSwzLjEtNCw0LjYtNi40LDQuNmMtMS41LDAtMi43LTAuNi0zLjctMS45Yy0xLTEuMy0xLjQtMy0xLjQtNS4xQy0yNTIuOC0xNjMuNy0yNTItMTY2LjgtMjUwLjItMTY5Ljd6IE0tMjQ5LjUtMTU2LjIKCQljMC4zLDEuMiwxLDEuOCwxLjgsMS44YzAuOCwwLDEuNi0wLjQsMi4zLTEuM2MwLjctMC45LDEuNC0yLjUsMi4xLTQuOWMwLjUtMS41LDAuOC0zLjEsMS4xLTQuOGMwLjMtMS43LDAuNC0zLjEsMC40LTQuMQoJCWMwLTEtMC4yLTEuOC0wLjUtMi41Yy0wLjQtMC43LTAuOS0xLjEtMS42LTEuMWMtMS44LDAtMy4yLDIuMi00LjUsNi41Yy0wLjksMy4zLTEuNCw2LjEtMS40LDguMwoJCUMtMjQ5LjgtMTU3LjUtMjQ5LjctMTU2LjgtMjQ5LjUtMTU2LjJ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIzOS42LTE1NC43YzAuNi0wLjEsMS0wLjQsMS4yLTAuOWMwLjItMC41LDAuNi0xLjcsMS0zLjZsMi40LTEyLjFsLTAuMS0wLjNjLTAuMi0wLjUtMC40LTAuOS0wLjctMS4xCgkJYy0wLjItMC4xLTAuNS0wLjItMS0wLjJ2LTAuOGg0LjNsNC42LDEzLjZsMS43LTguM2MwLjEtMC41LDAuMi0xLDAuMi0xLjRjMC4xLTAuNiwwLjEtMS4xLDAuMS0xLjNjMC0wLjctMC4yLTEuMi0wLjUtMS41CgkJYy0wLjItMC4yLTAuNi0wLjMtMS4yLTAuM3YtMC44aDQuNHYwLjhsLTAuMywwLjFjLTAuNCwwLjEtMC44LDAuNC0xLDFjLTAuMiwwLjYtMC41LDEuNy0wLjksMy40bC0zLDE1aC0wLjVsLTUuNS0xNi4zbC0yLjEsMTAuNgoJCWMtMC4yLDAuOS0wLjMsMS41LTAuMywyYzAsMC4zLTAuMSwwLjUtMC4xLDAuOGMwLDAuNywwLjIsMS4yLDAuNiwxLjRjMC4yLDAuMiwwLjYsMC4zLDEuMSwwLjN2MC44aC00LjRWLTE1NC43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMjUtMTU0LjdjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC0wLjMsMC4xLTAuNSwwLjEtMC43CgkJYzAuMS0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjMtMC4zdi0wLjhoMTEuM2wtMC45LDUuNmwtMC42LTAuMWMwLTEuNC0wLjItMi40LTAuNS0zCgkJYy0wLjUtMS0xLjYtMS41LTMuMi0xLjVjLTAuNSwwLTAuOCwwLjEtMSwwLjNjLTAuMiwwLjItMC4zLDAuNS0wLjQsMS4xbC0xLjMsNi41YzEuNC0wLjEsMi4zLTAuMiwyLjgtMC41YzAuNC0wLjMsMC45LTEuMiwxLjQtMi42CgkJbDAuNiwwLjFsLTEuNiw4LjFsLTAuNi0wLjFjMC0wLjMsMC0wLjUsMC4xLTAuN3MwLTAuNCwwLTAuNWMwLTEtMC4yLTEuNy0wLjYtMi4xYy0wLjQtMC40LTEuMi0wLjYtMi40LTAuNmwtMS40LDcuMgoJCWMwLDAuMSwwLDAuMi0wLjEsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC42LDAuMiwxLDAuNSwxLjJjMC4yLDAuMSwwLjUsMC4yLDEsMC4ydjAuOGgtNi4zVi0xNTQuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjExLjgtMTU0LjdjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC4xLTAuNCwwLjEtMC43LDAuMi0wLjkKCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMy0wLjN2LTAuOGg2LjN2MC44Yy0wLjUsMC4xLTAuOSwwLjMtMS4xLDAuNQoJCWMtMC4yLDAuMi0wLjQsMC44LTAuNiwxLjZsLTIuNiwxMy4ybC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywwLjljMC4yLDAuMSwwLjYsMC4yLDEuMywwLjMKCQl2MC44aC02LjNWLTE1NC43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMDQuNi0xNTQuN2MwLjUtMC4xLDAuOC0wLjIsMS0wLjRjMC4zLTAuMywwLjYtMC45LDAuNy0xLjdsMi42LTEzLjJjMC4xLTAuNCwwLjEtMC43LDAuMi0wLjkKCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMy0wLjN2LTAuOGg2LjJjMi4xLDAsMy43LDAuNyw0LjgsMi4yYzEuMSwxLjUsMS42LDMuNSwxLjYsNgoJCWMwLDMtMC44LDUuNi0yLjQsNy44Yy0xLjgsMi41LTQuMSwzLjctNy4xLDMuN2gtNi4xVi0xNTQuN3ogTS0xOTIuNy0xNzAuOGMtMC42LTEuMy0xLjUtMi0yLjktMmMtMC41LDAtMC44LDAuMS0wLjksMC4zCgkJYy0wLjIsMC4yLTAuMywwLjUtMC4zLDAuOGwtMi45LDE0LjljMCwwLjEsMCwwLjMtMC4xLDAuNHMwLDAuMiwwLDAuM2MwLDAuNCwwLjEsMC43LDAuMywwLjhzMC41LDAuMywwLjksMC4zCgkJYzIuNSwwLDQuNC0xLjgsNS41LTUuNGMwLjctMi4yLDEtNC41LDEtNi45Qy0xOTIuMi0xNjguOC0xOTIuMy0xNjkuOS0xOTIuNy0xNzAuOHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTkwLjEtMTU0LjdjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMi0wLjkKCQlzMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMy0wLjN2LTAuOGgxMS40bC0wLjksNS42bC0wLjYtMC4xYzAtMS40LTAuMi0yLjQtMC41LTMKCQljLTAuNS0xLTEuNi0xLjUtMy4zLTEuNWMtMC42LDAtMC45LDAuMS0xLjEsMC4zYy0wLjIsMC4yLTAuMywwLjUtMC40LDEuMWwtMS4zLDYuNmMxLjUsMCwyLjUtMC4yLDIuOS0wLjVzMC45LTEuMiwxLjUtMi42bDAuNiwwLjEKCQlsLTEuNiw4LjFsLTAuNi0wLjFjMC0wLjMsMC0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4yLTEuOC0wLjYtMi4xcy0xLjItMC42LTIuNC0wLjZsLTEuNCw3LjJjMCwwLjItMC4xLDAuMy0wLjEsMC41CgkJYzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4yLDAuN2MwLjIsMC4yLDAuNSwwLjMsMSwwLjNjMS4zLDAsMi40LTAuMiwzLjMtMC43YzEuNC0wLjgsMi41LTIuMiwzLjMtNC4ybDAuNSwwLjFsLTEuMyw1LjcKCQloLTExLjhWLTE1NC43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNzYuOC0xNTQuN2MwLjYtMC4xLDEtMC40LDEuMi0wLjljMC4yLTAuNSwwLjYtMS43LDEtMy42bDIuNC0xMi4xbC0wLjEtMC4zYy0wLjItMC41LTAuNC0wLjktMC43LTEuMQoJCWMtMC4yLTAuMS0wLjUtMC4yLTEtMC4ydi0wLjhoNC4zbDQuNiwxMy42bDEuNy04LjNjMC4xLTAuNSwwLjItMSwwLjItMS40YzAuMS0wLjYsMC4xLTEuMSwwLjEtMS4zYzAtMC43LTAuMi0xLjItMC41LTEuNQoJCWMtMC4yLTAuMi0wLjYtMC4zLTEuMi0wLjN2LTAuOGg0LjR2MC44bC0wLjMsMC4xYy0wLjQsMC4xLTAuOCwwLjQtMSwxYy0wLjIsMC42LTAuNSwxLjctMC45LDMuNGwtMywxNWgtMC41bC01LjUtMTYuM2wtMi4xLDEwLjYKCQljLTAuMiwwLjktMC4zLDEuNS0wLjMsMmMwLDAuMy0wLjEsMC41LTAuMSwwLjhjMCwwLjcsMC4yLDEuMiwwLjYsMS40YzAuMiwwLjIsMC42LDAuMywxLjEsMC4zdjAuOGgtNC40Vi0xNTQuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTYxLTE1NC43YzAuNywwLDEuMS0wLjEsMS4zLTAuM2MwLjQtMC4zLDAuNy0wLjksMC45LTEuOGwzLjEtMTUuOWMtMS4xLDAtMiwwLjMtMi43LDEuMQoJCWMtMC44LDAuNy0xLjQsMS44LTEuOSwzLjJsLTAuNi0wLjJsMC44LTVoMTEuN2wtMC44LDUuN2wtMC42LTAuMWMwLTEuOS0wLjQtMy4yLTEuMi0zLjljLTAuNC0wLjQtMS0wLjYtMS44LTAuNmwtMywxNS4xbC0wLjIsMQoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywxYzAuMiwwLjEsMC43LDAuMiwxLjQsMC4zdjAuOGgtN1YtMTU0Ljd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE1MC4yLTE1NC43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjItMC45CgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjMtMC4zdi0wLjhoNi4zdjAuOGMtMC41LDAuMS0wLjksMC4zLTEuMSwwLjUKCQljLTAuMiwwLjItMC40LDAuOC0wLjYsMS42bC0yLjYsMTMuMmwtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjMsMC45czAuNiwwLjIsMS4zLDAuM3YwLjhoLTYuMwoJCVYtMTU0Ljd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE0My41LTE1NC43YzAuNC0wLjIsMC43LTAuMywwLjktMC41YzAuMy0wLjMsMC42LTAuOCwwLjktMS42bDcuOS0xNy40aDAuNmwyLDE2LjljMC4xLDEuMSwwLjMsMS44LDAuNSwyLjEKCQljMC4yLDAuMywwLjYsMC40LDEuMywwLjV2MC43aC02LjR2LTAuN2MwLjYtMC4xLDEtMC4yLDEuMy0wLjRjMC4zLTAuMiwwLjQtMC42LDAuNC0xLjNjMC0wLjIsMC0wLjctMC4xLTEuNmMwLTAuMi0wLjEtMC45LTAuMi0yLjEKCQloLTQuNmwtMS4yLDNjLTAuMSwwLjItMC4yLDAuNC0wLjIsMC43Yy0wLjEsMC4yLTAuMSwwLjUtMC4xLDAuN2MwLDAuNCwwLjEsMC43LDAuMywwLjhjMC4yLDAuMSwwLjUsMC4yLDEuMSwwLjN2MC43aC00LjJWLTE1NC43egoJCSBNLTEzNC43LTE2MS4zbC0wLjgtNy4ybC0zLjEsNy4ySC0xMzQuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTI5LjYtMTU0LjdjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVzMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjItMC45CgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjMtMC4zdi0wLjhoNi43djAuOGMtMC43LDAuMS0xLjIsMC4zLTEuNSwwLjUKCQljLTAuMywwLjItMC41LDAuOC0wLjYsMS42bC0yLjgsMTQuMWMwLDAuMiwwLDAuMy0wLjEsMC40YzAsMC4xLDAsMC4zLDAsMC41YzAsMC4zLDAuMSwwLjYsMC4zLDAuN2MwLjIsMC4xLDAuNSwwLjIsMC45LDAuMgoJCWMxLjUsMCwyLjctMC4zLDMuOC0xYzEuMS0wLjcsMi0yLDIuOC0zLjlsMC41LDAuMWwtMS4yLDUuN2gtMTEuOFYtMTU0Ljd6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTExMy41LTc0LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUMtMTA4LjUtNzYuNy0xMTAuNy03NC41LTExMy41LTc0LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q2IiBkPSJNLTExMy41LTc0aC0xNjBjLTMsMC01LjUtMi41LTUuNS01LjV2LTMxYzAtMywyLjUtNS41LDUuNS01LjVoMTYwYzMsMCw1LjUsMi41LDUuNSw1LjV2MzEKCQlDLTEwOC03Ni41LTExMC41LTc0LTExMy41LTc0eiBNLTI3My41LTExNWMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SC0yNzMuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjY5LjMtODYuN2MwLjQtMC4xLDAuNy0wLjIsMC45LTAuNGMwLjMtMC4zLDAuNS0wLjksMC43LTEuN2wyLjUtMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4yLTAuOQoJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDUuOGMyLDAsMy41LDAuNyw0LjUsMi4yYzEsMS41LDEuNSwzLjUsMS41LDYKCQljMCwzLTAuOCw1LjYtMi4zLDcuOGMtMS43LDIuNS0zLjksMy43LTYuNywzLjdoLTUuOFYtODYuN3ogTS0yNTguMS0xMDIuOGMtMC41LTEuMy0xLjQtMi0yLjctMmMtMC40LDAtMC43LDAuMS0wLjksMC4zCgkJYy0wLjIsMC4yLTAuMywwLjUtMC4zLDAuOGwtMi44LDE0LjljMCwwLjEsMCwwLjMtMC4xLDAuNHMwLDAuMiwwLDAuM2MwLDAuNCwwLjEsMC43LDAuMiwwLjhzMC40LDAuMywwLjksMC4zCgkJYzIuNCwwLDQuMS0xLjgsNS4yLTUuNGMwLjYtMi4yLDEtNC41LDEtNi45Qy0yNTcuNi0xMDAuOC0yNTcuNy0xMDEuOS0yNTguMS0xMDIuOHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjU1LjYtODYuN2MwLjUtMC4xLDAuOC0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjUtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4xLTAuOQoJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDEwLjhsLTAuOSw1LjZsLTAuNS0wLjFjMC0xLjQtMC4yLTIuNC0wLjUtMwoJCWMtMC41LTEtMS41LTEuNS0zLjEtMS41Yy0wLjUsMC0wLjksMC4xLTEsMC4zYy0wLjIsMC4yLTAuMywwLjUtMC40LDEuMWwtMS4yLDYuNmMxLjQsMCwyLjMtMC4yLDIuNy0wLjVjMC40LTAuMywwLjktMS4yLDEuNC0yLjYKCQlsMC42LDAuMWwtMS41LDguMWwtMC41LTAuMWMwLTAuMywwLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNi0yLjFzLTEuMi0wLjYtMi4zLTAuNmwtMS4zLDcuMgoJCWMwLDAuMi0wLjEsMC4zLTAuMSwwLjVjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjIsMC43YzAuMSwwLjIsMC40LDAuMywwLjksMC4zYzEuMiwwLDIuMy0wLjIsMy4xLTAuNwoJCWMxLjMtMC44LDIuNC0yLjIsMy4xLTQuMmwwLjUsMC4xbC0xLjIsNS43aC0xMS4xVi04Ni43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNDMuMS04Ni43YzAuNS0wLjEsMC44LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjEtMC45CgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC45LTAuNC0xYy0wLjItMC4xLTAuNS0wLjItMS4xLTAuMnYtMC44aDUuOGMxLDAsMS44LDAuMiwyLjQsMC42YzEuMiwwLjcsMS44LDIuMSwxLjgsNAoJCWMwLDEuOC0wLjUsMy4yLTEuNSw0LjJjLTEsMS4xLTIuMywxLjYtMy45LDEuNmMtMC4yLDAtMC40LDAtMC42LDBjLTAuMSwwLTAuNSwwLTEuMi0wLjFsLTEuMSw1LjlsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDAuOWMwLjIsMC4xLDAuNiwwLjIsMS4yLDAuM3YwLjhoLTUuOVYtODYuN3ogTS0yMzcuMS05Ni40YzAuMSwwLDAuMywwLDAuNCwwLjEKCQljMC4xLDAsMC4yLDAsMC4zLDBjMC43LDAsMS4yLTAuMSwxLjYtMC40czAuNy0wLjYsMC45LTEuMmMwLjItMC41LDAuNC0xLjIsMC42LTJjMC4xLTAuOCwwLjItMS41LDAuMi0yYzAtMC44LTAuMS0xLjUtMC40LTIKCQljLTAuMy0wLjUtMC43LTAuOC0xLjMtMC44Yy0wLjMsMC0wLjUsMC4xLTAuNiwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjMsMUwtMjM3LjEtOTYuNHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjMzLjctODYuN2MwLjQtMC4yLDAuNi0wLjMsMC44LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC45LTEuNmw3LjQtMTcuNGgwLjVsMS45LDE2LjljMC4xLDEuMSwwLjMsMS44LDAuNSwyLjEKCQljMC4yLDAuMywwLjYsMC40LDEuMiwwLjV2MC43aC02LjF2LTAuN2MwLjYtMC4xLDEtMC4yLDEuMi0wLjRjMC4yLTAuMiwwLjQtMC42LDAuNC0xLjNjMC0wLjIsMC0wLjctMC4xLTEuNmMwLTAuMi0wLjEtMC45LTAuMi0yLjEKCQloLTQuM2wtMS4yLDNjLTAuMSwwLjItMC4xLDAuNC0wLjIsMC43Yy0wLjEsMC4yLTAuMSwwLjUtMC4xLDAuN2MwLDAuNCwwLjEsMC43LDAuMiwwLjhzMC41LDAuMiwxLDAuM3YwLjdoLTMuOVYtODYuN3oKCQkgTS0yMjUuNC05My4zbC0wLjctNy4ybC0zLDcuMkgtMjI1LjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIyMC43LTg2LjdjMC41LTAuMSwwLjgtMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi41LTEzLjJjMC4xLTAuMywwLjEtMC41LDAuMS0wLjcKCQljMC4xLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4zLTAuOXMtMC42LTAuMi0xLjItMC4zdi0wLjhoNS41YzEuMiwwLDIuMiwwLjIsMi45LDAuNWMxLjIsMC43LDEuOSwxLjksMS45LDMuNwoJCWMwLDAuNi0wLjEsMS4zLTAuMywyYy0wLjIsMC43LTAuNiwxLjMtMSwxLjljLTAuMywwLjQtMC44LDAuNy0xLjIsMWMtMC4zLDAuMS0wLjcsMC4zLTEuMywwLjVjMC4xLDAuMywwLjEsMC41LDAuMSwwLjZsMS41LDYuNwoJCWMwLjIsMC45LDAuNCwxLjUsMC43LDEuN2MwLjIsMC4yLDAuNiwwLjQsMS4xLDAuNHYwLjhoLTRsLTIuMi05LjhoLTAuNmwtMS4yLDYuMWwtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOSwwLjMsMWMwLjIsMC4xLDAuNiwwLjIsMS4yLDAuM3YwLjhoLTZWLTg2Ljd6IE0tMjEzLTk2LjljMC42LTAuMiwxLjEtMC42LDEuNC0xLjFjMC4yLTAuNCwwLjQtMC45LDAuNi0xLjYKCQljMC4yLTAuNywwLjMtMS40LDAuMy0yLjNjMC0wLjgtMC4xLTEuNS0wLjQtMi4xYy0wLjMtMC41LTAuOC0wLjgtMS40LTAuOGMtMC4zLDAtMC41LDAuMS0wLjYsMC4zcy0wLjIsMC41LTAuMywxbC0xLjIsNi44CgkJQy0yMTMuOS05Ni43LTIxMy4zLTk2LjgtMjEzLTk2Ljl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIwNi44LTg2LjdjMC42LDAsMS0wLjEsMS4zLTAuM2MwLjQtMC4zLDAuNi0wLjksMC44LTEuOGwzLTE1LjljLTEsMC0xLjgsMC4zLTIuNiwxLjEKCQljLTAuNywwLjctMS4zLDEuOC0xLjgsMy4ybC0wLjUtMC4ybDAuOC01aDExbC0wLjcsNS43bC0wLjUtMC4xYzAtMS45LTAuNC0zLjItMS4xLTMuOWMtMC40LTAuNC0wLjktMC42LTEuNy0wLjZsLTIuOCwxNS4xbC0wLjIsMQoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywxYzAuMiwwLjEsMC43LDAuMiwxLjQsMC4zdjAuOGgtNi42Vi04Ni43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xOTYuOC04Ni43YzAuNS0wLjEsMC45LTAuNCwxLjEtMC45YzAuMi0wLjUsMC41LTEuNywwLjktMy43bDItMTFjMC4xLTAuNCwwLjEtMC43LDAuMi0xCgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNC0wLjEtMC43LTAuMy0wLjhzLTAuNi0wLjItMS4yLTAuMnYtMC44aDQuNmwxLjEsMTMuOWw2LjEtMTMuOWg0LjN2MC44Yy0wLjUsMC4xLTAuOCwwLjItMSwwLjQKCQljLTAuMywwLjMtMC41LDAuOC0wLjcsMS43bC0yLjUsMTMuM2MtMC4xLDAuMy0wLjEsMC42LTAuMiwwLjljMCwwLjMtMC4xLDAuNS0wLjEsMC43YzAsMC41LDAuMSwwLjgsMC4zLDAuOQoJCWMwLjIsMC4xLDAuNiwwLjIsMS4yLDAuM3YwLjhoLTYuM3YtMC44YzAuNy0wLjEsMS4xLTAuMywxLjQtMC41YzAuMy0wLjIsMC41LTAuOCwwLjYtMS42bDIuNS0xMy42bC03LjUsMTYuOGgtMC42bC0xLjQtMTYuNAoJCWwtMiwxMC43Yy0wLjEsMC41LTAuMiwxLTAuMiwxLjRjLTAuMSwwLjYtMC4xLDEuMS0wLjEsMS40YzAsMC43LDAuMiwxLjIsMC42LDEuNGMwLjIsMC4yLDAuNiwwLjIsMSwwLjN2MC44aC00LjJWLTg2Ljd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE3OS43LTg2LjdjMC41LTAuMSwwLjgtMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi41LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMS0wLjkKCQlzMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMi0wLjN2LTAuOGgxMC44bC0wLjksNS42bC0wLjUtMC4xYzAtMS40LTAuMi0yLjQtMC41LTMKCQljLTAuNS0xLTEuNS0xLjUtMy4xLTEuNWMtMC41LDAtMC45LDAuMS0xLDAuM2MtMC4yLDAuMi0wLjMsMC41LTAuNCwxLjFsLTEuMiw2LjZjMS40LDAsMi4zLTAuMiwyLjctMC41czAuOS0xLjIsMS40LTIuNmwwLjYsMC4xCgkJbC0xLjUsOC4xTC0xNzEtOTJjMC0wLjMsMC0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4yLTEuOC0wLjYtMi4xcy0xLjItMC42LTIuMy0wLjZsLTEuMyw3LjJjMCwwLjItMC4xLDAuMy0wLjEsMC41CgkJYzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4yLDAuN2MwLjEsMC4yLDAuNCwwLjMsMC45LDAuM2MxLjIsMCwyLjMtMC4yLDMuMS0wLjdjMS4zLTAuOCwyLjQtMi4yLDMuMS00LjJsMC41LDAuMQoJCWwtMS4yLDUuN2gtMTEuMVYtODYuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTY3LjItODYuN2MwLjUtMC4xLDAuOS0wLjQsMS4xLTAuOWMwLjItMC41LDAuNS0xLjcsMC45LTMuNmwyLjMtMTIuMWwtMC4xLTAuM2MtMC4yLTAuNS0wLjQtMC45LTAuNi0xLjEKCQljLTAuMi0wLjEtMC41LTAuMi0wLjktMC4ydi0wLjhoNGw0LjQsMTMuNmwxLjYtOC4zYzAuMS0wLjUsMC4yLTEsMC4yLTEuNGMwLjEtMC42LDAuMS0xLjEsMC4xLTEuM2MwLTAuNy0wLjItMS4yLTAuNS0xLjUKCQljLTAuMi0wLjItMC42LTAuMy0xLjEtMC4zdi0wLjhoNC4xdjAuOGwtMC4zLDAuMWMtMC40LDAuMS0wLjcsMC40LTEsMXMtMC41LDEuNy0wLjgsMy40bC0yLjgsMTVoLTAuNWwtNS4yLTE2LjNsLTIsMTAuNgoJCWMtMC4yLDAuOS0wLjMsMS41LTAuMywyYzAsMC4zLDAsMC41LDAsMC44YzAsMC43LDAuMiwxLjIsMC41LDEuNGMwLjIsMC4yLDAuNiwwLjMsMS4xLDAuM3YwLjhoLTQuMlYtODYuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTUyLjItODYuN2MwLjYsMCwxLTAuMSwxLjMtMC4zYzAuNC0wLjMsMC42LTAuOSwwLjgtMS44bDMtMTUuOWMtMSwwLTEuOCwwLjMtMi42LDEuMQoJCWMtMC43LDAuNy0xLjMsMS44LTEuOCwzLjJsLTAuNS0wLjJsMC44LTVoMTFsLTAuNyw1LjdsLTAuNS0wLjFjMC0xLjktMC40LTMuMi0xLjEtMy45Yy0wLjQtMC40LTAuOS0wLjYtMS43LTAuNmwtMi44LDE1LjFsLTAuMiwxCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDFjMC4yLDAuMSwwLjcsMC4yLDEuNCwwLjN2MC44aC02LjZWLTg2Ljd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE0My44LTg2LjdjMC40LTAuMiwwLjYtMC4zLDAuOC0wLjVjMC4zLTAuMywwLjYtMC44LDAuOS0xLjZsNy40LTE3LjRoMC41bDEuOSwxNi45YzAuMSwxLjEsMC4zLDEuOCwwLjUsMi4xCgkJYzAuMiwwLjMsMC42LDAuNCwxLjIsMC41djAuN2gtNi4xdi0wLjdjMC42LTAuMSwxLTAuMiwxLjItMC40czAuNC0wLjYsMC40LTEuM2MwLTAuMiwwLTAuNy0wLjEtMS42YzAtMC4yLTAuMS0wLjktMC4yLTIuMWgtNC4zCgkJbC0xLjIsM2MtMC4xLDAuMi0wLjEsMC40LTAuMiwwLjdjLTAuMSwwLjItMC4xLDAuNS0wLjEsMC43YzAsMC40LDAuMSwwLjcsMC4yLDAuOGMwLjIsMC4xLDAuNSwwLjIsMSwwLjN2MC43aC0zLjlWLTg2Ljd6CgkJIE0tMTM1LjUtOTMuM2wtMC43LTcuMmwtMyw3LjJILTEzNS41eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xMzAuNi04Ni43YzAuNS0wLjEsMC44LTAuMywxLjEtMC41czAuNC0wLjgsMC42LTEuNmwyLjUtMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4yLTAuOQoJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDYuNHYwLjhjLTAuNywwLjEtMS4yLDAuMy0xLjQsMC41CgkJYy0wLjIsMC4yLTAuNCwwLjgtMC42LDEuNmwtMi42LDE0LjFjMCwwLjIsMCwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMywwLjdjMC4yLDAuMSwwLjUsMC4yLDAuOCwwLjIKCQljMS40LDAsMi42LTAuMywzLjYtMXMxLjktMiwyLjctMy45bDAuNSwwLjFsLTEuMiw1LjdoLTExLjFWLTg2Ljd6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTExMy41LTYuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJQy0xMDguNS04LjctMTEwLjctNi41LTExMy41LTYuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik0tMTEzLjUtNmgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJQy0xMDgtOC41LTExMC41LTYtMTEzLjUtNnogTS0yNzMuNS00N2MtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SC0yNzMuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjY5LjItMTguN2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjYtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4yLTAuOQoJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDExLjNsLTAuOSw1LjZsLTAuNi0wLjFjMC0xLjQtMC4yLTIuNC0wLjUtMwoJCWMtMC41LTEtMS42LTEuNS0zLjItMS41Yy0wLjYsMC0wLjksMC4xLTEuMSwwLjNzLTAuMywwLjUtMC40LDEuMWwtMS4yLDYuNmMxLjUsMCwyLjQtMC4yLDIuOC0wLjVjMC40LTAuMywwLjktMS4yLDEuNC0yLjZsMC42LDAuMQoJCWwtMS42LDguMWwtMC42LTAuMWMwLTAuMywwLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNi0yLjFjLTAuNC0wLjQtMS4yLTAuNi0yLjQtMC42bC0xLjQsNy4yCgkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4yLDAuMiwwLjUsMC4zLDAuOSwwLjNjMS4zLDAsMi40LTAuMiwzLjItMC43CgkJYzEuNC0wLjgsMi41LTIuMiwzLjMtNC4ybDAuNSwwLjFsLTEuMiw1LjdoLTExLjZWLTE4Ljd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI1Ni4xLTE4LjdjMC40LTAuMSwwLjktMC40LDEuMy0xYzAuNS0wLjUsMS0xLjMsMS42LTIuMmwzLjQtNS4ybC0xLjgtOGMtMC4yLTAuNy0wLjQtMS4yLTAuNi0xLjQKCQlzLTAuNy0wLjQtMS4zLTAuNHYtMC44aDYuNHYwLjdjLTAuNiwwLjEtMSwwLjItMS4yLDAuM2MtMC4yLDAuMS0wLjMsMC40LTAuMywwLjljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMC4xLDAuNGwxLDQuOAoJCWMwLjQtMC42LDAuOC0xLjEsMS4xLTEuNmMwLjMtMC41LDAuNi0wLjksMC45LTEuM2MwLjYtMSwxLTEuNiwxLjItMS45czAuMi0wLjYsMC4yLTAuOWMwLTAuMy0wLjEtMC42LTAuMy0wLjYKCQljLTAuMi0wLjEtMC41LTAuMi0wLjktMC4ydi0wLjdoNC4zdjAuOGMtMC4zLDAtMC41LDAuMS0wLjgsMC4zYy0wLjQsMC4zLTAuOCwwLjgtMS4zLDEuNWwtNC4yLDZsMS41LDdjMC4zLDEuNSwwLjYsMi4zLDAuOSwyLjcKCQlzMC44LDAuNiwxLjUsMC43djAuOGgtNi41di0wLjhjMC40LDAsMC44LTAuMSwwLjktMC4yYzAuMy0wLjIsMC41LTAuNSwwLjUtMC45YzAtMC4zLDAtMC41LTAuMS0wLjhzLTAuMS0wLjUtMC4yLTAuOGwtMS00LjMKCQlsLTIuOCw0LjRjLTAuMywwLjQtMC40LDAuNy0wLjUsMC45Yy0wLjEsMC4yLTAuMSwwLjQtMC4xLDAuNWMwLDAuNSwwLjIsMC44LDAuNSwxYzAuMiwwLjEsMC41LDAuMiwwLjgsMC4ydjAuOGgtNC41Vi0xOC43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNDMuMS0xOC43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjEtMC45CgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC45LTAuNC0xYy0wLjItMC4xLTAuNS0wLjItMS4xLTAuMnYtMC44aDZjMSwwLDEuOSwwLjIsMi41LDAuNmMxLjMsMC43LDEuOSwyLjEsMS45LDQKCQljMCwxLjgtMC41LDMuMi0xLjYsNC4yYy0xLDEuMS0yLjQsMS42LTQsMS42Yy0wLjMsMC0wLjUsMC0wLjYsMHMtMC42LDAtMS4yLTAuMWwtMS4xLDUuOWwtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjNzMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOCwwLjMsMC45YzAuMiwwLjEsMC42LDAuMiwxLjIsMC4zdjAuOGgtNi4yVi0xOC43eiBNLTIzNi45LTI4LjRjMC4xLDAsMC4zLDAsMC40LDAuMWMwLjEsMCwwLjIsMCwwLjMsMAoJCWMwLjcsMCwxLjMtMC4xLDEuNi0wLjRzMC43LTAuNiwxLTEuMmMwLjMtMC41LDAuNS0xLjIsMC42LTJzMC4yLTEuNSwwLjItMmMwLTAuOC0wLjEtMS41LTAuNC0yYy0wLjMtMC41LTAuNy0wLjgtMS40LTAuOAoJCWMtMC4zLDAtMC41LDAuMS0wLjcsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDFMLTIzNi45LTI4LjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIzMS4yLTE4LjdjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMi0wLjkKCQlzMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMi0wLjN2LTAuOGgxMS4zbC0wLjksNS42bC0wLjYtMC4xYzAtMS40LTAuMi0yLjQtMC41LTMKCQljLTAuNS0xLTEuNi0xLjUtMy4yLTEuNWMtMC42LDAtMC45LDAuMS0xLjEsMC4zcy0wLjMsMC41LTAuNCwxLjFsLTEuMiw2LjZjMS41LDAsMi40LTAuMiwyLjgtMC41YzAuNC0wLjMsMC45LTEuMiwxLjQtMi42bDAuNiwwLjEKCQlsLTEuNiw4LjFsLTAuNi0wLjFjMC0wLjMsMC0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4yLTEuOC0wLjYtMi4xYy0wLjQtMC40LTEuMi0wLjYtMi40LTAuNmwtMS40LDcuMgoJCWMwLDAuMi0wLjEsMC4zLTAuMSwwLjVjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjIsMC43YzAuMiwwLjIsMC41LDAuMywwLjksMC4zYzEuMywwLDIuNC0wLjIsMy4yLTAuNwoJCWMxLjQtMC44LDIuNS0yLjIsMy4zLTQuMmwwLjUsMC4xbC0xLjIsNS43aC0xMS42Vi0xOC43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMTguMi0xOC43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43CgkJYzAuMS0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjItMC4zdi0wLjhoNS44YzEuMywwLDIuMywwLjIsMywwLjVjMS4zLDAuNywyLDEuOSwyLDMuNwoJCWMwLDAuNi0wLjEsMS4zLTAuMywycy0wLjYsMS4zLTEuMSwxLjljLTAuNCwwLjQtMC44LDAuNy0xLjMsMWMtMC4zLDAuMS0wLjcsMC4zLTEuMywwLjVjMC4xLDAuMywwLjEsMC41LDAuMSwwLjZsMS42LDYuNwoJCWMwLjIsMC45LDAuNSwxLjUsMC43LDEuN2MwLjIsMC4yLDAuNiwwLjQsMS4xLDAuNHYwLjhoLTQuMmwtMi4zLTkuOGgtMC42bC0xLjIsNi4xbC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM3MwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC45LDAuMywxczAuNiwwLjIsMS4zLDAuM3YwLjhoLTYuMlYtMTguN3ogTS0yMTAuMS0yOC45YzAuNi0wLjIsMS4xLTAuNiwxLjUtMS4xYzAuMi0wLjQsMC41LTAuOSwwLjctMS42CgkJYzAuMi0wLjcsMC4zLTEuNCwwLjMtMi4zYzAtMC44LTAuMS0xLjUtMC40LTIuMWMtMC4zLTAuNS0wLjgtMC44LTEuNS0wLjhjLTAuMywwLTAuNSwwLjEtMC42LDAuM3MtMC4yLDAuNS0wLjMsMWwtMS4zLDYuOAoJCUMtMjExLjEtMjguNy0yMTAuNS0yOC44LTIxMC4xLTI4Ljl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIwNC45LTE4LjdjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC4xLTAuNCwwLjEtMC43LDAuMi0wLjkKCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMi0wLjN2LTAuOGg2LjJ2MC44Yy0wLjUsMC4xLTAuOSwwLjMtMS4xLDAuNQoJCWMtMC4yLDAuMi0wLjQsMC44LTAuNiwxLjZsLTIuNiwxMy4ybC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM3MwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywwLjlzMC42LDAuMiwxLjIsMC4zdjAuOGgtNi4yVi0xOC43egoJCSIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xOTcuOC0xOC43YzAuNS0wLjEsMC45LTAuNCwxLjItMC45czAuNi0xLjcsMS0zLjdsMi4xLTExYzAuMS0wLjQsMC4xLTAuNywwLjItMWMwLTAuMywwLjEtMC41LDAuMS0wLjcKCQljMC0wLjQtMC4xLTAuNy0wLjMtMC44cy0wLjYtMC4yLTEuMi0wLjJ2LTAuOGg0LjhsMS4yLDEzLjlsNi40LTEzLjloNC41djAuOGMtMC41LDAuMS0wLjgsMC4yLTEsMC40Yy0wLjMsMC4zLTAuNSwwLjgtMC43LDEuNwoJCWwtMi42LDEzLjNjLTAuMSwwLjMtMC4xLDAuNi0wLjIsMC45YzAsMC4zLTAuMSwwLjUtMC4xLDAuN2MwLDAuNSwwLjEsMC44LDAuMywwLjljMC4yLDAuMSwwLjYsMC4yLDEuMiwwLjN2MC44aC02LjV2LTAuOAoJCWMwLjctMC4xLDEuMi0wLjMsMS40LTAuNWMwLjMtMC4yLDAuNS0wLjgsMC42LTEuNmwyLjYtMTMuNmwtNy45LDE2LjhoLTAuNmwtMS40LTE2LjRsLTIuMSwxMC43Yy0wLjEsMC41LTAuMiwxLTAuMiwxLjQKCQljLTAuMSwwLjYtMC4xLDEuMS0wLjEsMS40YzAsMC43LDAuMiwxLjIsMC42LDEuNGMwLjIsMC4yLDAuNiwwLjIsMS4xLDAuM3YwLjhoLTQuNFYtMTguN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTgwLjEtMTguN2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjYtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4yLTAuOQoJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDExLjNsLTAuOSw1LjZsLTAuNi0wLjFjMC0xLjQtMC4yLTIuNC0wLjUtMwoJCWMtMC41LTEtMS42LTEuNS0zLjItMS41Yy0wLjYsMC0wLjksMC4xLTEuMSwwLjNzLTAuMywwLjUtMC40LDEuMWwtMS4yLDYuNmMxLjUsMCwyLjQtMC4yLDIuOC0wLjVjMC40LTAuMywwLjktMS4yLDEuNC0yLjZsMC42LDAuMQoJCWwtMS42LDguMUwtMTcxLTI0YzAtMC4zLDAtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMi0xLjgtMC42LTIuMXMtMS4yLTAuNi0yLjQtMC42bC0xLjQsNy4yYzAsMC4yLTAuMSwwLjMtMC4xLDAuNQoJCWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4yLDAuMiwwLjUsMC4zLDAuOSwwLjNjMS4zLDAsMi40LTAuMiwzLjItMC43YzEuNC0wLjgsMi41LTIuMiwzLjMtNC4ybDAuNSwwLjEKCQlsLTEuMiw1LjdoLTExLjZWLTE4Ljd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE2Ny0xOC43YzAuNS0wLjEsMC45LTAuNCwxLjItMC45YzAuMi0wLjUsMC42LTEuNywxLTMuNmwyLjQtMTIuMWwtMC4xLTAuM2MtMC4yLTAuNS0wLjQtMC45LTAuNi0xLjEKCQljLTAuMi0wLjEtMC41LTAuMi0xLTAuMnYtMC44aDQuMmw0LjUsMTMuNmwxLjYtOC4zYzAuMS0wLjUsMC4yLTEsMC4yLTEuNGMwLjEtMC42LDAuMS0xLjEsMC4xLTEuM2MwLTAuNy0wLjItMS4yLTAuNS0xLjUKCQljLTAuMi0wLjItMC42LTAuMy0xLjEtMC4zdi0wLjhoNC4zdjAuOGwtMC4zLDAuMWMtMC40LDAuMS0wLjgsMC40LTEsMXMtMC41LDEuNy0wLjgsMy40bC0yLjksMTVoLTAuNWwtNS40LTE2LjNsLTIuMSwxMC42CgkJYy0wLjIsMC45LTAuMywxLjUtMC4zLDJjMCwwLjMtMC4xLDAuNS0wLjEsMC44YzAsMC43LDAuMiwxLjIsMC42LDEuNGMwLjIsMC4yLDAuNiwwLjMsMS4xLDAuM3YwLjhoLTQuNFYtMTguN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTUxLjMtMTguN2MwLjYsMCwxLjEtMC4xLDEuMy0wLjNjMC40LTAuMywwLjctMC45LDAuOS0xLjhsMy4xLTE1LjljLTEsMC0xLjksMC4zLTIuNywxLjEKCQljLTAuNywwLjctMS40LDEuOC0xLjgsMy4ybC0wLjUtMC4ybDAuOC01aDExLjVsLTAuOCw1LjdsLTAuNS0wLjFjMC0xLjktMC40LTMuMi0xLjEtMy45Yy0wLjQtMC40LTEtMC42LTEuOC0wLjZsLTIuOSwxNS4xbC0wLjIsMQoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywxYzAuMiwwLjEsMC43LDAuMiwxLjQsMC4zdjAuOGgtNi45Vi0xOC43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNDIuNS0xOC43YzAuNC0wLjIsMC43LTAuMywwLjktMC41YzAuMy0wLjMsMC42LTAuOCwwLjktMS42bDcuOC0xNy40aDAuNWwyLDE2LjljMC4xLDEuMSwwLjMsMS44LDAuNSwyLjEKCQljMC4yLDAuMywwLjYsMC40LDEuMywwLjV2MC43aC02LjR2LTAuN2MwLjYtMC4xLDEtMC4yLDEuMy0wLjRjMC4yLTAuMiwwLjQtMC42LDAuNC0xLjNjMC0wLjIsMC0wLjctMC4xLTEuNmMwLTAuMi0wLjEtMC45LTAuMi0yLjEKCQloLTQuNWwtMS4yLDNjLTAuMSwwLjItMC4yLDAuNC0wLjIsMC43Yy0wLjEsMC4yLTAuMSwwLjUtMC4xLDAuN2MwLDAuNCwwLjEsMC43LDAuMywwLjhzMC41LDAuMiwxLjEsMC4zdjAuN2gtNC4xVi0xOC43egoJCSBNLTEzMy45LTI1LjNsLTAuOC03LjJsLTMuMSw3LjJILTEzMy45eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xMjguOC0xOC43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41czAuNC0wLjgsMC42LTEuNmwyLjYtMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4yLTAuOQoJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDYuNnYwLjhjLTAuNywwLjEtMS4yLDAuMy0xLjUsMC41CgkJYy0wLjMsMC4yLTAuNSwwLjgtMC42LDEuNmwtMi43LDE0LjFjMCwwLjIsMCwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMywwLjdjMC4yLDAuMSwwLjUsMC4yLDAuOSwwLjIKCQljMS40LDAsMi43LTAuMywzLjctMXMyLTIsMi44LTMuOWwwLjUsMC4xbC0xLjIsNS43aC0xMS42Vi0xOC43eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTS0xMTMuNSw2MS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LDU5LjMtMTEwLjcsNjEuNS0xMTMuNSw2MS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NiIgZD0iTS0xMTMuNSw2MmgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJQy0xMDgsNTkuNS0xMTAuNSw2Mi0xMTMuNSw2MnogTS0yNzMuNSwyMWMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SC0yNzMuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjU0LjYsNTAuM2MwLjctMC4xLDEuMi0wLjMsMS42LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTMuMmMwLjEtMC4zLDAuMi0wLjYsMC4yLTAuOQoJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOC0wLjItMS44LTAuM3YtMC44aDE1LjlsLTEuMyw1LjZsLTAuOC0wLjFjMC0xLjQtMC4zLTIuNC0wLjctMwoJCWMtMC44LTEtMi4zLTEuNS00LjYtMS41Yy0wLjgsMC0xLjMsMC4xLTEuNSwwLjNjLTAuMiwwLjItMC40LDAuNS0wLjYsMS4xbC0xLjgsNi42YzIuMSwwLDMuNC0wLjIsNC0wLjVzMS4zLTEuMiwyLTIuNmwwLjgsMC4xCgkJbC0yLjIsOC4xbC0wLjgtMC4xYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4zLTEuOC0wLjktMi4xYy0wLjYtMC40LTEuNy0wLjYtMy40LTAuNmwtMS45LDcuMgoJCWMwLDAuMi0wLjEsMC4zLTAuMSwwLjVjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjMsMC43YzAuMiwwLjIsMC43LDAuMywxLjMsMC4zYzEuOCwwLDMuMy0wLjIsNC42LTAuNwoJCWMyLTAuOCwzLjUtMi4yLDQuNi00LjJsMC43LDAuMWwtMS43LDUuN2gtMTYuNFY1MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMzYuMSw1MC4zYzAuNi0wLjEsMS4yLTAuNCwxLjktMWMwLjYtMC41LDEuNC0xLjMsMi4zLTIuMmw0LjgtNS4ybC0yLjUtOGMtMC4yLTAuNy0wLjUtMS4yLTAuOS0xLjQKCQljLTAuNC0wLjItMS0wLjQtMS44LTAuNHYtMC44aDlWMzJjLTAuOSwwLjEtMS41LDAuMi0xLjgsMC4zYy0wLjMsMC4xLTAuNCwwLjQtMC40LDAuOWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLjEsMC40CgkJbDEuNCw0LjhjMC42LTAuNiwxLjEtMS4xLDEuNS0xLjZjMC41LTAuNSwwLjktMC45LDEuMy0xLjNjMC45LTEsMS41LTEuNiwxLjctMS45czAuMy0wLjYsMC4zLTAuOWMwLTAuMy0wLjEtMC42LTAuNC0wLjYKCQlzLTAuNy0wLjItMS4zLTAuMnYtMC43aDZ2MC44Yy0wLjQsMC0wLjgsMC4xLTEuMSwwLjNjLTAuNSwwLjMtMS4xLDAuOC0xLjksMS41bC01LjksNmwyLjIsN2MwLjUsMS41LDAuOSwyLjMsMS4zLDIuNwoJCWMwLjQsMC4zLDEuMSwwLjYsMi4yLDAuN1Y1MWgtOS4xdi0wLjhjMC42LDAsMS4xLTAuMSwxLjMtMC4yYzAuNS0wLjIsMC43LTAuNSwwLjctMC45YzAtMC4zLDAtMC41LTAuMS0wLjgKCQljLTAuMS0wLjMtMC4xLTAuNS0wLjItMC44bC0xLjQtNC4zbC00LDQuNGMtMC40LDAuNC0wLjYsMC43LTAuNywwLjlzLTAuMiwwLjQtMC4yLDAuNWMwLDAuNSwwLjIsMC44LDAuNywxCgkJYzAuMywwLjEsMC42LDAuMiwxLjIsMC4yVjUxaC02LjRWNTAuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjE3LjcsNTAuM2MwLjctMC4xLDEuMi0wLjMsMS42LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4yLTAuOQoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjItMC45LTAuNi0xYy0wLjItMC4xLTAuOC0wLjItMS42LTAuMnYtMC44aDguNWMxLjQsMCwyLjYsMC4yLDMuNiwwLjZjMS44LDAuNywyLjcsMi4xLDIuNyw0CgkJYzAsMS44LTAuNywzLjItMi4yLDQuMmMtMS41LDEuMS0zLjQsMS42LTUuNywxLjZjLTAuNCwwLTAuNiwwLTAuOCwwYy0wLjIsMC0wLjgsMC0xLjctMC4xbC0xLjYsNS45bC0wLjIsMWMwLDAuMSwwLDAuMi0wLjEsMC4zCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC40LDAuOWMwLjMsMC4xLDAuOSwwLjIsMS44LDAuM1Y1MWgtOC43VjUwLjN6IE0tMjA5LDQwLjZjMC4yLDAsMC40LDAsMC41LDAuMQoJCWMwLjIsMCwwLjMsMCwwLjUsMGMxLDAsMS44LTAuMSwyLjMtMC40czEtMC42LDEuNC0xLjJjMC40LTAuNSwwLjctMS4yLDAuOS0yYzAuMi0wLjgsMC4zLTEuNSwwLjMtMmMwLTAuOC0wLjItMS41LTAuNi0yCgkJYy0wLjQtMC41LTEuMS0wLjgtMi0wLjhjLTAuNSwwLTAuOCwwLjEtMC45LDAuM2MtMC4yLDAuMi0wLjMsMC41LTAuNSwxTC0yMDksNDAuNnoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTkxLDUwLjNjMC43LTAuMSwxLjItMC4zLDEuNi0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy42LTEzLjJjMC4xLTAuMywwLjEtMC41LDAuMi0wLjcKCQljMC4xLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC40LTAuOXMtMC45LTAuMi0xLjctMC4zdi0wLjhoOC4xYzEuOCwwLDMuMiwwLjIsNC4yLDAuNWMxLjgsMC43LDIuNywxLjksMi43LDMuNwoJCWMwLDAuNi0wLjIsMS4zLTAuNSwyYy0wLjMsMC43LTAuOCwxLjMtMS41LDEuOWMtMC41LDAuNC0xLjEsMC43LTEuOCwxYy0wLjQsMC4xLTEsMC4zLTEuOSwwLjVjMC4xLDAuMywwLjIsMC41LDAuMiwwLjZsMi4zLDYuNwoJCWMwLjMsMC45LDAuNiwxLjUsMSwxLjdjMC40LDAuMiwwLjksMC40LDEuNiwwLjRWNTFoLTUuOWwtMy4yLTkuOGgtMC44bC0xLjcsNi4xbC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC45LDAuNCwxYzAuMywwLjEsMC44LDAuMiwxLjgsMC4zVjUxaC04LjhWNTAuM3ogTS0xNzkuNyw0MC4xYzAuOS0wLjIsMS42LTAuNiwyLjEtMS4xYzAuMy0wLjQsMC43LTAuOSwwLjktMS42CgkJYzAuMy0wLjcsMC40LTEuNCwwLjQtMi4zYzAtMC44LTAuMi0xLjUtMC42LTIuMWMtMC40LTAuNS0xLjEtMC44LTIuMS0wLjhjLTAuNCwwLTAuNywwLjEtMC45LDAuM2MtMC4yLDAuMi0wLjMsMC41LTAuNSwxbC0xLjgsNi44CgkJQy0xODEsNDAuMy0xODAuMiw0MC4yLTE3OS43LDQwLjF6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIwMS40LDUwLjNjMC43LTAuMSwxLjItMC4zLDEuNi0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy42LTEzLjJjMC4xLTAuNCwwLjItMC43LDAuMi0wLjkKCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOS0wLjItMS43LTAuM3YtMC44aDguOHYwLjhjLTAuNywwLjEtMS4yLDAuMy0xLjYsMC41CgkJYy0wLjMsMC4yLTAuNiwwLjgtMC44LDEuNmwtMy42LDEzLjJsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zczAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC40LDAuOXMwLjgsMC4yLDEuNywwLjNWNTFoLTguOFY1MC4zeiIKCQkvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNzIuMyw1MC4zYzAuNy0wLjEsMS4yLTAuMywxLjYtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuNi0xMy4yYzAuMS0wLjMsMC4yLTAuNiwwLjItMC45CgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC40LTAuOWMtMC4zLTAuMS0wLjgtMC4yLTEuOC0wLjN2LTAuOGgxNS45bC0xLjMsNS42bC0wLjgtMC4xYzAtMS40LTAuMy0yLjQtMC43LTMKCQljLTAuOC0xLTIuMy0xLjUtNC42LTEuNWMtMC44LDAtMS4zLDAuMS0xLjUsMC4zcy0wLjQsMC41LTAuNiwxLjFsLTEuOCw2LjZjMi4xLDAsMy40LTAuMiw0LTAuNWMwLjYtMC4zLDEuMy0xLjIsMi0yLjZsMC44LDAuMQoJCWwtMi4yLDguMWwtMC44LTAuMWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMy0xLjgtMC45LTIuMXMtMS43LTAuNi0zLjQtMC42bC0xLjksNy4yYzAsMC4yLTAuMSwwLjMtMC4xLDAuNQoJCWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMywwLjdjMC4yLDAuMiwwLjcsMC4zLDEuMywwLjNjMS44LDAsMy4zLTAuMiw0LjYtMC43YzItMC44LDMuNS0yLjIsNC42LTQuMmwwLjcsMC4xTC0xNTYsNTEKCQloLTE2LjRWNTAuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTU0LjEsNTAuM2MwLjYtMC4xLDEuMS0wLjIsMS40LTAuNGMwLjUtMC4zLDAuOC0wLjksMS0xLjdsMy42LTEzLjJjMC4xLTAuNCwwLjItMC43LDAuMi0wLjkKCQlzMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC40LTAuOWMtMC4zLTAuMS0wLjktMC4yLTEuNy0wLjN2LTAuOGg4LjZjMi45LDAsNS4xLDAuNyw2LjYsMi4yYzEuNSwxLjUsMi4zLDMuNSwyLjMsNgoJCWMwLDMtMS4xLDUuNi0zLjQsNy44Yy0yLjUsMi41LTUuOCwzLjctOS44LDMuN2gtOC41VjUwLjN6IE0tMTM3LjUsMzQuMmMtMC44LTEuMy0yLjEtMi00LTJjLTAuNiwwLTEuMSwwLjEtMS4zLDAuMwoJCWMtMC4yLDAuMi0wLjQsMC41LTAuNSwwLjhsLTQuMSwxNC45YzAsMC4xLTAuMSwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNCwwLjEsMC43LDAuNCwwLjhjMC4yLDAuMiwwLjcsMC4zLDEuMywwLjMKCQljMy41LDAsNi0xLjgsNy42LTUuNGMxLTIuMiwxLjQtNC41LDEuNC02LjlDLTEzNi44LDM2LjItMTM3LDM1LjEtMTM3LjUsMzQuMnoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0tMTEzLjUsMTk3LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUMtMTA4LjUsMTk1LjMtMTEwLjcsMTk3LjUtMTEzLjUsMTk3LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q2IiBkPSJNLTExMy41LDE5OGgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJQy0xMDgsMTk1LjUtMTEwLjUsMTk4LTExMy41LDE5OHogTS0yNzMuNSwxNTdjLTIuNSwwLTQuNSwyLTQuNSw0LjV2MzFjMCwyLjUsMiw0LjUsNC41LDQuNWgxNjBjMi41LDAsNC41LTIsNC41LTQuNXYtMzEKCQljMC0yLjUtMi00LjUtNC41LTQuNUgtMjczLjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI2Ny44LDE4Ni4zYzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCWMwLjEtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjMtMC45cy0wLjYtMC4yLTEuMi0wLjN2LTAuOGgxMS4xbC0wLjksNS42bC0wLjYtMC4xYzAtMS40LTAuMi0yLjQtMC41LTMKCQljLTAuNS0xLTEuNi0xLjUtMy4yLTEuNWMtMC41LDAtMC44LDAuMS0xLDAuM2MtMC4yLDAuMi0wLjMsMC41LTAuNCwxLjFsLTEuMiw2LjVjMS40LTAuMSwyLjMtMC4yLDIuNy0wLjVjMC40LTAuMywwLjktMS4yLDEuNC0yLjYKCQlsMC42LDAuMWwtMS42LDguMWwtMC42LTAuMWMwLTAuMywwLTAuNSwwLjEtMC43czAtMC40LDAtMC41YzAtMS0wLjItMS43LTAuNS0yLjFjLTAuNC0wLjQtMS4xLTAuNi0yLjMtMC42bC0xLjQsNy4yCgkJYzAsMC4xLDAsMC4yLTAuMSwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjYsMC4yLDEsMC41LDEuMmMwLjIsMC4xLDAuNSwwLjIsMSwwLjJ2MC44aC02LjJWMTg2LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI1MS4xLDE3MS4zYzEuOC0zLDMuOS00LjUsNi4xLTQuNWMxLjUsMCwyLjcsMC42LDMuNywxLjlzMS41LDMsMS41LDUuMmMwLDMuMi0wLjksNi4yLTIuNiw5LjEKCQljLTEuOCwzLjEtMy45LDQuNi02LjMsNC42Yy0xLjUsMC0yLjctMC42LTMuNi0xLjlzLTEuNC0zLTEuNC01LjFDLTI1My44LDE3Ny4zLTI1Mi45LDE3NC4yLTI1MS4xLDE3MS4zeiBNLTI1MC41LDE4NC44CgkJYzAuMywxLjIsMC45LDEuOCwxLjgsMS44YzAuOCwwLDEuNi0wLjQsMi4zLTEuM3MxLjQtMi41LDIuMS00LjljMC41LTEuNSwwLjgtMy4xLDEuMS00LjhjMC4zLTEuNywwLjQtMy4xLDAuNC00LjEKCQljMC0xLTAuMi0xLjgtMC41LTIuNWMtMC4zLTAuNy0wLjktMS4xLTEuNi0xLjFjLTEuNywwLTMuMiwyLjItNC40LDYuNWMtMC45LDMuMy0xLjQsNi4xLTEuNCw4LjMKCQlDLTI1MC43LDE4My41LTI1MC43LDE4NC4yLTI1MC41LDE4NC44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNDAuNywxODYuM2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNXMwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC4xLTAuMywwLjEtMC41LDAuMS0wLjcKCQljMC4xLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMi0wLjN2LTAuOGg1LjhjMS4zLDAsMi4zLDAuMiwzLDAuNWMxLjMsMC43LDIsMS45LDIsMy43CgkJYzAsMC42LTAuMSwxLjMtMC4zLDJzLTAuNiwxLjMtMS4xLDEuOWMtMC40LDAuNC0wLjgsMC43LTEuMywxYy0wLjMsMC4xLTAuNywwLjMtMS4zLDAuNWMwLjEsMC4zLDAuMSwwLjUsMC4xLDAuNmwxLjYsNi43CgkJYzAuMiwwLjksMC41LDEuNSwwLjcsMS43YzAuMiwwLjIsMC42LDAuNCwxLjEsMC40djAuOGgtNC4ybC0yLjMtOS44aC0wLjZsLTEuMiw2LjFsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC41LDAuMSwwLjksMC4zLDFzMC42LDAuMiwxLjMsMC4zdjAuOGgtNi4yVjE4Ni4zeiBNLTIzMi43LDE3Ni4xYzAuNi0wLjIsMS4xLTAuNiwxLjUtMS4xYzAuMi0wLjQsMC41LTAuOSwwLjctMS42CgkJYzAuMi0wLjcsMC4zLTEuNCwwLjMtMi4zYzAtMC44LTAuMS0xLjUtMC40LTIuMXMtMC44LTAuOC0xLjUtMC44Yy0wLjMsMC0wLjUsMC4xLTAuNiwwLjNzLTAuMiwwLjUtMC4zLDFsLTEuMyw2LjgKCQlDLTIzMy42LDE3Ni4zLTIzMywxNzYuMi0yMzIuNywxNzYuMXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjExLjUsMTY3LjJjMC44LDAuMywxLjIsMC40LDEuNCwwLjRjMC4yLDAsMC40LTAuMSwwLjUtMC4yYzAuMS0wLjIsMC4yLTAuNCwwLjMtMC42aDAuNmwtMS4xLDYuOWwtMC43LTAuMgoJCWMwLTAuNCwwLTAuNywwLTAuN2MwLTAuMSwwLTAuMiwwLTAuM2MwLTEuNi0wLjMtMi43LTAuOC0zLjVjLTAuNS0wLjgtMS4yLTEuMS0yLTEuMWMtMS42LDAtMywxLjUtNC4yLDQuNgoJCWMtMS4xLDIuNy0xLjYsNS41LTEuNiw4LjNjMCwyLDAuMywzLjQsMSw0LjJjMC43LDAuOCwxLjQsMS4xLDIuMiwxLjFjMSwwLDItMC41LDIuOS0xLjRjMC41LTAuNSwxLTEuMiwxLjUtMi4xbDAuNiwwLjYKCQljLTAuNywxLjUtMS42LDIuNi0yLjYsMy4zYy0xLDAuNy0yLDEuMS0zLDEuMWMtMS43LDAtMy4xLTAuNy00LjItMi4xYy0xLjEtMS40LTEuNi0zLjItMS42LTUuNmMwLTMuNiwwLjgtNi42LDIuNS05LjIKCQljMS43LTIuNiwzLjctMy45LDYtMy45Qy0yMTMsMTY2LjgtMjEyLjMsMTY3LTIxMS41LDE2Ny4yeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMDYuNCwxNzEuM2MxLjgtMywzLjktNC41LDYuMS00LjVjMS41LDAsMi43LDAuNiwzLjcsMS45czEuNSwzLDEuNSw1LjJjMCwzLjItMC45LDYuMi0yLjYsOS4xCgkJYy0xLjgsMy4xLTMuOSw0LjYtNi4zLDQuNmMtMS41LDAtMi43LTAuNi0zLjYtMS45cy0xLjQtMy0xLjQtNS4xQy0yMDksMTc3LjMtMjA4LjIsMTc0LjItMjA2LjQsMTcxLjN6IE0tMjA1LjgsMTg0LjgKCQljMC4zLDEuMiwwLjksMS44LDEuOCwxLjhjMC44LDAsMS42LTAuNCwyLjMtMS4zczEuNC0yLjUsMi4xLTQuOWMwLjUtMS41LDAuOC0zLjEsMS4xLTQuOGMwLjMtMS43LDAuNC0zLjEsMC40LTQuMQoJCWMwLTEtMC4yLTEuOC0wLjUtMi41Yy0wLjMtMC43LTAuOS0xLjEtMS42LTEuMWMtMS43LDAtMy4yLDIuMi00LjQsNi41Yy0wLjksMy4zLTEuNCw2LjEtMS40LDguMwoJCUMtMjA2LDE4My41LTIwNS45LDE4NC4yLTIwNS44LDE4NC44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xOTYsMTg2LjNjMC41LTAuMSwwLjktMC40LDEuMi0wLjljMC4yLTAuNSwwLjYtMS43LDEtMy43bDIuMS0xMWMwLjEtMC40LDAuMS0wLjcsMC4yLTEKCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC40LTAuMS0wLjctMC4zLTAuOHMtMC42LTAuMi0xLjItMC4ydi0wLjhoNC44bDEuMiwxMy45bDYuNC0xMy45aDQuNXYwLjhjLTAuNSwwLjEtMC44LDAuMi0xLDAuNAoJCWMtMC4zLDAuMy0wLjUsMC44LTAuNywxLjdsLTIuNiwxMy4zYy0wLjEsMC4zLTAuMSwwLjYtMC4yLDAuOWMwLDAuMy0wLjEsMC41LTAuMSwwLjdjMCwwLjUsMC4xLDAuOCwwLjMsMC45czAuNiwwLjIsMS4yLDAuM3YwLjgKCQloLTYuNXYtMC44YzAuNy0wLjEsMS4yLTAuMywxLjQtMC41YzAuMy0wLjIsMC41LTAuOCwwLjYtMS42bDIuNi0xMy42bC03LjksMTYuOGgtMC42bC0xLjQtMTYuNGwtMi4xLDEwLjdjLTAuMSwwLjUtMC4yLDEtMC4yLDEuNAoJCWMtMC4xLDAuNi0wLjEsMS4xLTAuMSwxLjRjMCwwLjcsMC4yLDEuMiwwLjYsMS40YzAuMiwwLjIsMC42LDAuMiwxLjEsMC4zdjAuOGgtNC40VjE4Ni4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNzguMywxODYuM2MwLjUtMC4xLDAuOS0wLjQsMS4yLTAuOWMwLjItMC41LDAuNi0xLjcsMS0zLjdsMi4xLTExYzAuMS0wLjQsMC4xLTAuNywwLjItMQoJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjQtMC4xLTAuNy0wLjMtMC44Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuMnYtMC44aDQuOGwxLjIsMTMuOWw2LjQtMTMuOWg0LjV2MC44CgkJYy0wLjUsMC4xLTAuOCwwLjItMSwwLjRjLTAuMywwLjMtMC41LDAuOC0wLjcsMS43bC0yLjYsMTMuM2MtMC4xLDAuMy0wLjEsMC42LTAuMiwwLjljMCwwLjMtMC4xLDAuNS0wLjEsMC43CgkJYzAsMC41LDAuMSwwLjgsMC4zLDAuOXMwLjYsMC4yLDEuMiwwLjN2MC44aC02LjV2LTAuOGMwLjctMC4xLDEuMi0wLjMsMS40LTAuNWMwLjMtMC4yLDAuNS0wLjgsMC42LTEuNmwyLjYtMTMuNmwtNy45LDE2LjhoLTAuNgoJCWwtMS40LTE2LjRsLTIuMSwxMC43Yy0wLjEsMC41LTAuMiwxLTAuMiwxLjRjLTAuMSwwLjYtMC4xLDEuMS0wLjEsMS40YzAsMC43LDAuMiwxLjIsMC42LDEuNGMwLjIsMC4yLDAuNiwwLjIsMS4xLDAuM3YwLjhoLTQuNAoJCVYxODYuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTYwLjUsMTg2LjNjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMi0wLjkKCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOXMtMC42LTAuMi0xLjItMC4zdi0wLjhoMTEuM2wtMC45LDUuNmwtMC42LTAuMWMwLTEuNC0wLjItMi40LTAuNS0zCgkJYy0wLjUtMS0xLjYtMS41LTMuMi0xLjVjLTAuNiwwLTAuOSwwLjEtMS4xLDAuM2MtMC4yLDAuMi0wLjMsMC41LTAuNCwxLjFsLTEuMiw2LjZjMS41LDAsMi40LTAuMiwyLjgtMC41czAuOS0xLjIsMS40LTIuNmwwLjYsMC4xCgkJbC0xLjYsOC4xbC0wLjYtMC4xYzAtMC4zLDAtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMi0xLjgtMC42LTIuMWMtMC40LTAuNC0xLjItMC42LTIuNC0wLjZsLTEuNCw3LjIKCQljMCwwLjItMC4xLDAuMy0wLjEsMC41YzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4yLDAuN2MwLjIsMC4yLDAuNSwwLjMsMC45LDAuM2MxLjMsMCwyLjQtMC4yLDMuMi0wLjgKCQljMS40LTAuOCwyLjUtMi4yLDMuMy00LjJsMC41LDAuMWwtMS4yLDUuN2gtMTEuNlYxODYuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTQ3LjQsMTg2LjNjMC41LTAuMSwwLjktMC40LDEuMi0wLjljMC4yLTAuNSwwLjYtMS43LDEtMy42bDIuNC0xMi4xbC0wLjEtMC4zYy0wLjItMC41LTAuNC0wLjktMC42LTEuMQoJCWMtMC4yLTAuMS0wLjUtMC4yLTEtMC4ydi0wLjhoNC4ybDQuNSwxMy42bDEuNi04LjNjMC4xLTAuNSwwLjItMSwwLjItMS40YzAuMS0wLjYsMC4xLTEuMSwwLjEtMS4zYzAtMC43LTAuMi0xLjItMC41LTEuNQoJCWMtMC4yLTAuMi0wLjYtMC4zLTEuMS0wLjN2LTAuOGg0LjN2MC44bC0wLjMsMC4xYy0wLjQsMC4xLTAuOCwwLjQtMSwxYy0wLjIsMC42LTAuNSwxLjctMC44LDMuNGwtMi45LDE1aC0wLjVsLTUuNC0xNi4zbC0yLjEsMTAuNgoJCWMtMC4yLDAuOS0wLjMsMS41LTAuMywyYzAsMC4zLTAuMSwwLjUtMC4xLDAuOGMwLDAuNywwLjIsMS4yLDAuNiwxLjRjMC4yLDAuMiwwLjYsMC4zLDEuMSwwLjN2MC44aC00LjRWMTg2LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTEzMS44LDE4Ni4zYzAuNiwwLDEuMS0wLjEsMS4zLTAuM2MwLjQtMC4zLDAuNy0wLjksMC45LTEuOGwzLjEtMTUuOWMtMSwwLTEuOSwwLjMtMi43LDEuMQoJCWMtMC43LDAuNy0xLjQsMS44LTEuOCwzLjJsLTAuNS0wLjJsMC44LTVoMTEuNWwtMC44LDUuN2wtMC41LTAuMWMwLTEuOS0wLjQtMy4yLTEuMS0zLjljLTAuNC0wLjQtMS0wLjYtMS44LTAuNmwtMi45LDE1LjFsLTAuMiwxCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDFjMC4yLDAuMSwwLjcsMC4yLDEuNCwwLjN2MC44aC02LjlWMTg2LjN6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTExMy41LDI2NS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LDI2My4zLTExMC43LDI2NS41LTExMy41LDI2NS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NiIgZD0iTS0xMTMuNSwyNjZoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMtMTA4LDI2My41LTExMC41LDI2Ni0xMTMuNSwyNjZ6IE0tMjczLjUsMjI1Yy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVILTI3My41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNjkuNywyNTQuM2MwLjQtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjktMTMuMmMwLTAuMywwLjEtMC41LDAuMS0wLjcKCQljMC0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMi0wLjlzLTAuNC0wLjItMC45LTAuM3YtMC44aDguMmwtMC43LDUuNmwtMC40LTAuMWMwLTEuNC0wLjEtMi40LTAuNC0zCgkJYy0wLjQtMS0xLjItMS41LTIuMy0xLjVjLTAuMywwLTAuNiwwLjEtMC43LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMywxLjFsLTAuOSw2LjVjMS0wLjEsMS43LTAuMiwyLTAuNWMwLjMtMC4zLDAuNy0xLjIsMS0yLjYKCQlsMC40LDAuMWwtMS4xLDguMWwtMC40LTAuMWMwLTAuMywwLTAuNSwwLTAuN3MwLTAuNCwwLTAuNWMwLTEtMC4xLTEuNy0wLjQtMi4xYy0wLjMtMC40LTAuOC0wLjYtMS43LTAuNmwtMSw3LjJjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjYsMC4xLDEsMC40LDEuMmMwLjIsMC4xLDAuNCwwLjIsMC43LDAuMnYwLjhoLTQuNVYyNTQuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjU3LjUsMjM5LjNjMS4zLTMsMi44LTQuNSw0LjUtNC41YzEuMSwwLDIsMC42LDIuNywxLjlzMS4xLDMsMS4xLDUuMmMwLDMuMi0wLjYsNi4yLTEuOSw5LjEKCQljLTEuMywzLjEtMi45LDQuNi00LjYsNC42Yy0xLjEsMC0yLTAuNi0yLjctMS45cy0xLTMtMS01LjFDLTI1OS40LDI0NS4zLTI1OC44LDI0Mi4yLTI1Ny41LDIzOS4zeiBNLTI1NywyNTIuOAoJCWMwLjIsMS4yLDAuNywxLjgsMS4zLDEuOGMwLjYsMCwxLjItMC40LDEuNi0xLjNzMS0yLjUsMS41LTQuOWMwLjMtMS41LDAuNi0zLjEsMC44LTQuOGMwLjItMS43LDAuMy0zLjEsMC4zLTQuMQoJCWMwLTEtMC4xLTEuOC0wLjQtMi41Yy0wLjMtMC43LTAuNy0xLjEtMS4yLTEuMWMtMS4zLDAtMi4zLDIuMi0zLjIsNi41Yy0wLjcsMy4zLTEsNi4xLTEsOC4zQy0yNTcuMiwyNTEuNS0yNTcuMSwyNTIuMi0yNTcsMjUyLjh6IgoJCS8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI0OS44LDI1NC4zYzAuNC0wLjEsMC42LTAuMywwLjgtMC41czAuMy0wLjgsMC40LTEuNmwxLjktMTMuMmMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjQsMC4xLTAuNywwLjEtMQoJCWMwLTAuNS0wLjEtMC44LTAuMi0wLjljLTAuMS0wLjEtMC40LTAuMi0wLjktMC4zdi0wLjhoNC4yYzAuOSwwLDEuNywwLjIsMi4yLDAuNWMxLDAuNywxLjQsMS45LDEuNCwzLjdjMCwwLjYtMC4xLDEuMy0wLjIsMgoJCWMtMC4yLDAuNy0wLjQsMS4zLTAuOCwxLjljLTAuMywwLjQtMC42LDAuNy0wLjksMWMtMC4yLDAuMS0wLjUsMC4zLTEsMC41YzAuMSwwLjMsMC4xLDAuNSwwLjEsMC42bDEuMiw2LjcKCQljMC4yLDAuOSwwLjMsMS41LDAuNSwxLjdjMC4yLDAuMiwwLjUsMC40LDAuOCwwLjR2MC44aC0zLjFsLTEuNy05LjhoLTAuNGwtMC45LDYuMWwtMC4xLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOSwwLjIsMXMwLjQsMC4yLDAuOSwwLjN2MC44aC00LjZWMjU0LjN6IE0tMjQ0LDI0NC4xYzAuNS0wLjIsMC44LTAuNiwxLjEtMS4xYzAuMi0wLjQsMC4zLTAuOSwwLjUtMS42CgkJYzAuMi0wLjcsMC4yLTEuNCwwLjItMi4zYzAtMC44LTAuMS0xLjUtMC4zLTIuMWMtMC4yLTAuNS0wLjYtMC44LTEuMS0wLjhjLTAuMiwwLTAuNCwwLjEtMC41LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxbC0wLjksNi44CgkJQy0yNDQuNiwyNDQuMy0yNDQuMiwyNDQuMi0yNDQsMjQ0LjF6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIzNy4xLDI1NC4zYzAuNC0wLjEsMC42LTAuMywwLjgtMC41YzAuMi0wLjMsMC4zLTAuOCwwLjQtMS42bDEuOS0xMy4yYzAtMC4zLDAuMS0wLjYsMC4xLTAuOQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC45LTAuMy0xYy0wLjEtMC4xLTAuNC0wLjItMC44LTAuMnYtMC44aDQuNGMwLjcsMCwxLjQsMC4yLDEuOSwwLjZjMC45LDAuNywxLjQsMi4xLDEuNCw0CgkJYzAsMS44LTAuNCwzLjItMS4xLDQuMmMtMC44LDEuMS0xLjcsMS42LTMsMS42Yy0wLjIsMC0wLjMsMC0wLjQsMHMtMC40LDAtMC45LTAuMWwtMC44LDUuOWwtMC4xLDFjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjIsMC45YzAuMSwwLjEsMC40LDAuMiwwLjksMC4zdjAuOGgtNC41VjI1NC4zeiBNLTIzMi41LDI0NC42YzAuMSwwLDAuMiwwLDAuMywwLjEKCQljMC4xLDAsMC4yLDAsMC4yLDBjMC41LDAsMC45LTAuMSwxLjItMC40YzAuMy0wLjIsMC41LTAuNiwwLjctMS4yYzAuMi0wLjUsMC4zLTEuMiwwLjQtMmMwLjEtMC44LDAuMi0xLjUsMC4yLTIKCQljMC0wLjgtMC4xLTEuNS0wLjMtMmMtMC4yLTAuNS0wLjUtMC44LTEtMC44Yy0wLjIsMC0wLjQsMC4xLTAuNSwwLjNzLTAuMiwwLjUtMC4yLDFMLTIzMi41LDI0NC42eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMjUuNCwyMzguOWMwLTAuMywwLjEtMC42LDAuMS0wLjljMC0wLjMsMC0wLjUsMC0wLjhjMC0wLjUtMC4xLTAuOC0wLjItMC45Yy0wLjEtMC4xLTAuNC0wLjItMC45LTAuM3YtMC44CgkJaDQuN3YwLjhjLTAuNSwwLjEtMC44LDAuMi0xLDAuNWMtMC4yLDAuMi0wLjMsMC44LTAuNSwxLjdsLTEuMyw4LjhjLTAuMSwwLjgtMC4yLDEuNC0wLjMsMS45Yy0wLjEsMC45LTAuMiwxLjYtMC4yLDIKCQljMCwxLDAuMiwxLjcsMC41LDIuMmMwLjMsMC41LDAuOCwwLjgsMS40LDAuOGMxLDAsMS43LTAuOCwyLjMtMi40YzAuMy0wLjksMC42LTIuNSwxLTQuOGwwLjktNi4yYzAuMS0wLjksMC4yLTEuMywwLjEtMS4yCgkJYzAuMS0wLjcsMC4xLTEuMywwLjEtMS42YzAtMC43LTAuMS0xLjItMC40LTEuNGMtMC4yLTAuMi0wLjQtMC4zLTAuOC0wLjN2LTAuOGgzLjF2MC44Yy0wLjQsMC4xLTAuNywwLjQtMC45LDAuOQoJCWMtMC4yLDAuNS0wLjQsMS43LTAuNywzLjZsLTEsNi43Yy0wLjQsMi43LTAuOCw0LjYtMS4yLDUuNmMtMC43LDEuOC0xLjgsMi43LTMuMiwyLjdjLTEsMC0xLjgtMC40LTIuNC0xLjNzLTEtMi4xLTEtMy43CgkJYzAtMC42LDAtMS4zLDAuMS0yYzAuMS0wLjUsMC4yLTEuMiwwLjMtMi40TC0yMjUuNCwyMzguOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjE3LjksMjU0LjNjMC4zLTAuMSwwLjYtMC4yLDAuNy0wLjRjMC4yLTAuMywwLjQtMC45LDAuNS0xLjdsMS45LTEzLjJjMC4xLTAuNCwwLjEtMC43LDAuMS0xCgkJYzAtMC4zLDAtMC41LDAtMC42YzAtMC41LTAuMS0wLjktMC4yLTFjLTAuMi0wLjEtMC40LTAuMi0wLjktMC4zdi0wLjhoNC4yYzEuMSwwLDIsMC4zLDIuNywxYzAuNiwwLjcsMC45LDEuOCwwLjksMy40CgkJYzAsMS41LTAuNCwyLjctMS4yLDMuNmMtMC40LDAuNS0xLDAuOS0xLjcsMS4yYzAuNiwwLjQsMS4xLDAuOSwxLjQsMS4zYzAuNSwwLjcsMC43LDEuOCwwLjcsM2MwLDEuNi0wLjMsMy4xLTEsNC4zCgkJYy0wLjcsMS4yLTEuOSwxLjgtMy41LDEuOGgtNC42VjI1NC4zeiBNLTIxNC4xLDI1NGMwLjEsMC4xLDAuMywwLjEsMC42LDAuMWMxLDAsMS43LTAuOSwyLjEtMi42YzAuMy0xLDAuNC0yLjEsMC40LTMuMgoJCWMwLTEuNC0wLjItMi4zLTAuNy0yLjdjLTAuMy0wLjMtMC44LTAuNS0xLjYtMC41bC0xLDcuMmMwLDAuMSwwLDAuMiwwLDAuNGMwLDAuMSwwLDAuMywwLDAuNUMtMjE0LjUsMjUzLjYtMjE0LjQsMjUzLjgtMjE0LjEsMjU0egoJCSBNLTIxMS43LDI0My44YzAuMy0wLjEsMC41LTAuNCwwLjgtMC44YzAuMy0wLjUsMC41LTEuMiwwLjYtMi4xYzAuMS0wLjYsMC4xLTEuMiwwLjEtMS43YzAtMC45LTAuMS0xLjYtMC4zLTIuMQoJCWMtMC4yLTAuNS0wLjYtMC44LTEuMS0wLjhjLTAuMiwwLTAuNCwwLjEtMC41LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxbC0wLjksNi42Qy0yMTIuNSwyNDQuMS0yMTIsMjQzLjktMjExLjcsMjQzLjh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIwOC4zLDI1NC4zYzAuNC0wLjEsMC42LTAuMywwLjgtMC41YzAuMi0wLjMsMC4zLTAuOCwwLjQtMS42bDEuOS0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjEtMC45CgkJYzAtMC4zLDAtMC41LDAtMC43YzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjN2LTAuOGg0Ljl2MC44Yy0wLjUsMC4xLTAuOSwwLjMtMS4xLDAuNQoJCWMtMC4yLDAuMi0wLjMsMC44LTAuNSwxLjZsLTIsMTQuMWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMiwwLjdjMC4xLDAuMSwwLjQsMC4yLDAuNiwwLjIKCQljMS4xLDAsMi0wLjMsMi43LTFjMC44LTAuNywxLjQtMiwyLTMuOWwwLjQsMC4xbC0wLjksNS43aC04LjVWMjU0LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE5OS42LDI1NC4zYzAuNC0wLjEsMC42LTAuMywwLjgtMC41czAuMy0wLjgsMC40LTEuNmwxLjktMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4xLTAuOWMwLTAuMywwLTAuNSwwLTAuNwoJCWMwLTAuNS0wLjEtMC44LTAuMi0wLjlzLTAuNC0wLjItMC45LTAuM3YtMC44aDQuNnYwLjhjLTAuNCwwLjEtMC42LDAuMy0wLjgsMC41Yy0wLjIsMC4yLTAuMywwLjgtMC40LDEuNmwtMS45LDEzLjJsLTAuMSwxCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4yLDAuOWMwLjEsMC4xLDAuNCwwLjIsMC45LDAuM3YwLjhoLTQuNlYyNTQuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTg1LjcsMjM1LjJjMC42LDAuMywwLjksMC40LDEsMC40YzAuMiwwLDAuMy0wLjEsMC40LTAuMmMwLjEtMC4yLDAuMi0wLjQsMC4yLTAuNmgwLjVsLTAuOCw2LjlsLTAuNS0wLjIKCQljMC0wLjQsMC0wLjcsMC0wLjdjMC0wLjEsMC0wLjIsMC0wLjNjMC0xLjYtMC4yLTIuNy0wLjYtMy41Yy0wLjQtMC44LTAuOS0xLjEtMS40LTEuMWMtMS4yLDAtMi4yLDEuNS0zLjEsNC42CgkJYy0wLjgsMi43LTEuMiw1LjUtMS4yLDguM2MwLDIsMC4yLDMuNCwwLjcsNC4yYzAuNSwwLjgsMSwxLjEsMS42LDEuMWMwLjgsMCwxLjUtMC41LDIuMS0xLjRjMC40LTAuNSwwLjctMS4yLDEuMS0yLjFsMC41LDAuNgoJCWMtMC41LDEuNS0xLjIsMi42LTEuOSwzLjNjLTAuNywwLjctMS41LDEuMS0yLjIsMS4xYy0xLjIsMC0yLjItMC43LTMtMi4xYy0wLjgtMS40LTEuMi0zLjItMS4yLTUuNmMwLTMuNiwwLjYtNi42LDEuOC05LjIKCQljMS4yLTIuNiwyLjctMy45LDQuNC0zLjlDLTE4Ni44LDIzNC44LTE4Ni4zLDIzNS0xODUuNywyMzUuMnoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTgxLjYsMjU0LjNjMC40LTAuMSwwLjYtMC4zLDAuOC0wLjVzMC4zLTAuOCwwLjQtMS42bDEuOS0xMy4yYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNCwwLjEtMC43LDAuMS0xCgkJYzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjN2LTAuOGg0LjJjMC45LDAsMS43LDAuMiwyLjIsMC41YzEsMC43LDEuNCwxLjksMS40LDMuN2MwLDAuNi0wLjEsMS4zLTAuMiwyCgkJcy0wLjQsMS4zLTAuOCwxLjljLTAuMywwLjQtMC42LDAuNy0wLjksMWMtMC4yLDAuMS0wLjUsMC4zLTEsMC41YzAsMC4zLDAuMSwwLjUsMC4xLDAuNmwxLjIsNi43YzAuMiwwLjksMC4zLDEuNSwwLjUsMS43CgkJYzAuMiwwLjIsMC41LDAuNCwwLjgsMC40djAuOGgtMy4xbC0xLjctOS44aC0wLjRsLTAuOSw2LjFsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjksMC4yLDEKCQljMC4xLDAuMSwwLjQsMC4yLDAuOSwwLjN2MC44aC00LjZWMjU0LjN6IE0tMTc1LjcsMjQ0LjFjMC41LTAuMiwwLjgtMC42LDEuMS0xLjFjMC4yLTAuNCwwLjMtMC45LDAuNS0xLjZjMC4yLTAuNywwLjItMS40LDAuMi0yLjMKCQljMC0wLjgtMC4xLTEuNS0wLjMtMi4xcy0wLjYtMC44LTEuMS0wLjhjLTAuMiwwLTAuNCwwLjEtMC41LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxbC0wLjksNi44CgkJQy0xNzYuNCwyNDQuMy0xNzYsMjQ0LjItMTc1LjcsMjQ0LjF6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE3MiwyNTQuM2MwLjQtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjktMTMuMmMwLTAuMywwLjEtMC42LDAuMS0wLjkKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMC45cy0wLjQtMC4yLTAuOS0wLjN2LTAuOGg4LjNsLTAuNyw1LjZsLTAuNC0wLjFjMC0xLjQtMC4xLTIuNC0wLjQtMwoJCWMtMC40LTEtMS4yLTEuNS0yLjQtMS41Yy0wLjQsMC0wLjcsMC4xLTAuOCwwLjNzLTAuMiwwLjUtMC4zLDEuMWwtMC45LDYuNmMxLjEsMCwxLjgtMC4yLDIuMS0wLjVjMC4zLTAuMywwLjctMS4yLDEuMS0yLjZsMC40LDAuMQoJCWwtMS4xLDguMWwtMC40LTAuMWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4yLTEuOC0wLjUtMi4xcy0wLjktMC42LTEuOC0wLjZsLTEsNy4yYzAsMC4yLDAsMC4zLTAuMSwwLjUKCQlzMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjIsMC43YzAuMSwwLjIsMC4zLDAuMywwLjcsMC4zYzAuOSwwLDEuNy0wLjIsMi40LTAuOGMxLTAuOCwxLjgtMi4yLDIuNC00LjJsMC40LDAuMWwtMC45LDUuN2gtOC41CgkJVjI1NC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNjIuMywyNTQuM2MwLjQtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjktMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4xLTAuOQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0wLjljLTAuMS0wLjEtMC40LTAuMi0wLjktMC4zdi0wLjhoNC45djAuOGMtMC41LDAuMS0wLjksMC4zLTEuMSwwLjUKCQljLTAuMiwwLjItMC4zLDAuOC0wLjUsMS42bC0yLDE0LjFjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjEsMCwwLjMsMCwwLjVjMCwwLjMsMC4xLDAuNiwwLjIsMC43YzAuMiwwLjEsMC40LDAuMiwwLjYsMC4yCgkJYzEuMSwwLDItMC4zLDIuNy0xYzAuOC0wLjcsMS40LTIsMi0zLjlsMC40LDAuMWwtMC45LDUuN2gtOC41VjI1NC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNTMuNywyNTQuM2MwLjQtMC4xLDAuNi0wLjMsMC44LTAuNXMwLjMtMC44LDAuNC0xLjZsMS45LTEzLjJjMC0wLjMsMC4xLTAuNiwwLjEtMC45YzAtMC4zLDAtMC41LDAtMC43CgkJYzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjN2LTAuOGg4LjNsLTAuNyw1LjZsLTAuNC0wLjFjMC0xLjQtMC4xLTIuNC0wLjQtM2MtMC40LTEtMS4yLTEuNS0yLjQtMS41CgkJYy0wLjQsMC0wLjcsMC4xLTAuOCwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjMsMS4xbC0wLjksNi42YzEuMSwwLDEuOC0wLjIsMi4xLTAuNWMwLjMtMC4zLDAuNy0xLjIsMS4xLTIuNmwwLjQsMC4xbC0xLjEsOC4xCgkJbC0wLjQtMC4xYzAtMC4zLDAtMC41LDAtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNS0yLjFzLTAuOS0wLjYtMS44LTAuNmwtMSw3LjJjMCwwLjIsMCwwLjMtMC4xLDAuNQoJCWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4xLDAuMiwwLjMsMC4zLDAuNywwLjNjMC45LDAsMS43LTAuMiwyLjQtMC44YzEtMC44LDEuOC0yLjIsMi40LTQuMmwwLjQsMC4xbC0wLjksNS43CgkJaC04LjVWMjU0LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE0NC41LDI1NC4zYzAuMy0wLjIsMC41LTAuMywwLjYtMC41YzAuMi0wLjMsMC40LTAuOCwwLjctMS42bDUuNy0xNy40aDAuNGwxLjUsMTYuOQoJCWMwLjEsMS4xLDAuMiwxLjgsMC40LDIuMWMwLjEsMC4zLDAuNCwwLjQsMC45LDAuNXYwLjdoLTQuN3YtMC43YzAuNC0wLjEsMC44LTAuMiwwLjktMC40YzAuMi0wLjIsMC4zLTAuNiwwLjMtMS4zCgkJYzAtMC4yLDAtMC44LTAuMS0xLjZjMC0wLjItMC4xLTAuOS0wLjEtMi4xaC0zLjNsLTAuOSwzYy0wLjEsMC4yLTAuMSwwLjQtMC4yLDAuN2MwLDAuMi0wLjEsMC41LTAuMSwwLjdjMCwwLjQsMC4xLDAuNywwLjIsMC44CgkJczAuNCwwLjIsMC44LDAuM3YwLjdoLTNWMjU0LjN6IE0tMTM4LjEsMjQ3LjdsLTAuNi03LjJsLTIuMyw3LjJILTEzOC4xeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xMzQsMjU1LjZsMC42LTYuNmwwLjQsMC4xYzAsMC45LDAuMSwxLjYsMC4xLDIuMWMwLjEsMC43LDAuMywxLjQsMC41LDEuOWMwLjIsMC41LDAuNSwwLjksMC44LDEuMgoJCXMwLjYsMC40LDEsMC40YzAuNiwwLDEuMS0wLjQsMS40LTEuMWMwLjMtMC44LDAuNS0xLjYsMC41LTIuNmMwLTEuMi0wLjYtMi44LTEuOS00LjdjLTEuMy0yLTEuOS0zLjgtMS45LTUuNQoJCWMwLTEuNiwwLjMtMi45LDAuOC00LjFjMC42LTEuMSwxLjMtMS43LDIuMy0xLjdjMC4zLDAsMC42LDAuMSwwLjgsMC4yYzAuMiwwLjEsMC40LDAuMSwwLjUsMC4ybDAuNCwwLjJjMC4xLDAsMC4yLDAuMSwwLjMsMC4xCgkJczAuMiwwLjEsMC4yLDAuMWMwLjIsMCwwLjMtMC4xLDAuNC0wLjJjMC4xLTAuMSwwLjItMC4zLDAuMi0wLjVoMC41bC0wLjYsNS45bC0wLjQtMC4xbC0wLjEtMWMtMC4xLTAuOS0wLjItMS43LTAuNC0yLjMKCQljLTAuNC0xLTAuOS0xLjUtMS42LTEuNWMtMC42LDAtMSwwLjQtMS4zLDEuMmMtMC4yLDAuNS0wLjMsMS4xLTAuMywxLjhjMCwwLjcsMC4xLDEuMywwLjMsMS44YzAuMSwwLjMsMC4zLDAuNiwwLjUsMC45bDEuMywyLjEKCQljMC41LDAuNywwLjksMS42LDEuMiwyLjVjMC4zLDAuOSwwLjUsMiwwLjUsMy4yYzAsMS42LTAuMywzLTEsNC4ycy0xLjUsMS45LTIuNiwxLjljLTAuMywwLTAuNi0wLjEtMC44LTAuMgoJCWMtMC4zLTAuMS0wLjYtMC4yLTAuOC0wLjRsLTAuNC0wLjNjLTAuMS0wLjEtMC4yLTAuMi0wLjMtMC4yYzAsMC0wLjEsMC0wLjIsMGMtMC4yLDAtMC4zLDAuMS0wLjQsMC4ycy0wLjIsMC40LTAuMiwwLjhILTEzNHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTI2LjcsMjU0LjNjMC40LTAuMSwwLjYtMC4zLDAuOC0wLjVzMC4zLTAuOCwwLjQtMS42bDEuOS0xMy4yYzAtMC4zLDAuMS0wLjYsMC4xLTAuOWMwLTAuMywwLTAuNSwwLTAuNwoJCWMwLTAuNS0wLjEtMC44LTAuMi0wLjljLTAuMS0wLjEtMC40LTAuMi0wLjktMC4zdi0wLjhoOC4zbC0wLjcsNS42bC0wLjQtMC4xYzAtMS40LTAuMS0yLjQtMC40LTNjLTAuNC0xLTEuMi0xLjUtMi40LTEuNQoJCWMtMC40LDAtMC43LDAuMS0wLjgsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDEuMWwtMC45LDYuNmMxLjEsMCwxLjgtMC4yLDIuMS0wLjVzMC43LTEuMiwxLjEtMi42bDAuNCwwLjFsLTEuMSw4LjFsLTAuNC0wLjEKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMi0xLjgtMC41LTIuMXMtMC45LTAuNi0xLjgtMC42bC0xLDcuMmMwLDAuMiwwLDAuMy0wLjEsMC41YzAsMC4yLDAsMC4zLDAsMC40CgkJYzAsMC4zLDAuMSwwLjUsMC4yLDAuN2MwLjEsMC4yLDAuMywwLjMsMC43LDAuM2MwLjksMCwxLjctMC4yLDIuNC0wLjhjMS0wLjgsMS44LTIuMiwyLjQtNC4ybDAuNCwwLjFsLTAuOSw1LjdoLTguNVYyNTQuM3oiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0tMTEzLjUsMzMzLjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUMtMTA4LjUsMzMxLjMtMTEwLjcsMzMzLjUtMTEzLjUsMzMzLjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q2IiBkPSJNLTExMy41LDMzNGgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJQy0xMDgsMzMxLjUtMTEwLjUsMzM0LTExMy41LDMzNHogTS0yNzMuNSwyOTNjLTIuNSwwLTQuNSwyLTQuNSw0LjV2MzFjMCwyLjUsMiw0LjUsNC41LDQuNWgxNjBjMi41LDAsNC41LTIsNC41LTQuNXYtMzEKCQljMC0yLjUtMi00LjUtNC41LTQuNUgtMjczLjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI2OS44LDMyMi4zYzAuNC0wLjEsMC43LTAuMywwLjktMC41YzAuMi0wLjMsMC4zLTAuOCwwLjUtMS42bDItMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4xLTAuOQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0wLjljLTAuMi0wLjEtMC41LTAuMi0xLTAuM3YtMC44aDQuOXYwLjhjLTAuNCwwLjEtMC43LDAuMy0wLjksMC41Yy0wLjIsMC4yLTAuMywwLjgtMC41LDEuNgoJCWwtMiwxMy4ybC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMiwwLjljMC4yLDAuMSwwLjUsMC4yLDEsMC4zdjAuOGgtNC45VjMyMi4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNjQuMSwzMjIuM2MwLjQtMC4xLDAuNy0wLjQsMC45LTAuOWMwLjItMC41LDAuNC0xLjcsMC44LTMuNmwxLjktMTIuMWwtMC4xLTAuM2MtMC4xLTAuNS0wLjMtMC45LTAuNS0xLjEKCQljLTAuMS0wLjEtMC40LTAuMi0wLjgtMC4ydi0wLjhoMy4zbDMuNiwxMy42bDEuMy04LjNjMC4xLTAuNSwwLjEtMSwwLjItMS40YzAuMS0wLjYsMC4xLTEuMSwwLjEtMS4zYzAtMC43LTAuMS0xLjItMC40LTEuNQoJCWMtMC4yLTAuMi0wLjUtMC4zLTAuOS0wLjN2LTAuOGgzLjR2MC44bC0wLjIsMC4xYy0wLjMsMC4xLTAuNiwwLjQtMC44LDFjLTAuMiwwLjYtMC40LDEuNy0wLjcsMy40bC0yLjMsMTVoLTAuNGwtNC4zLTE2LjMKCQlsLTEuNiwxMC42Yy0wLjEsMC45LTAuMiwxLjUtMC4zLDJjMCwwLjMsMCwwLjUsMCwwLjhjMCwwLjcsMC4xLDEuMiwwLjQsMS40YzAuMiwwLjIsMC41LDAuMywwLjksMC4zdjAuOGgtMy40VjMyMi4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNTIuOCwzMjIuM2MwLjQtMC4xLDAuNy0wLjMsMC45LTAuNWMwLjItMC4zLDAuMy0wLjgsMC41LTEuNmwyLTEzLjJjMC0wLjMsMC4xLTAuNSwwLjEtMC43CgkJYzAtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjItMC45Yy0wLjItMC4xLTAuNS0wLjItMS0wLjN2LTAuOGg4LjhsLTAuNyw1LjZsLTAuNC0wLjFjMC0xLjQtMC4xLTIuNC0wLjQtMwoJCWMtMC40LTEtMS4zLTEuNS0yLjUtMS41Yy0wLjQsMC0wLjYsMC4xLTAuOCwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjMsMS4xbC0xLDYuNWMxLjEtMC4xLDEuOC0wLjIsMi4yLTAuNWMwLjMtMC4zLDAuNy0xLjIsMS4xLTIuNgoJCWwwLjUsMC4xbC0xLjIsOC4xbC0wLjUtMC4xYzAtMC4zLDAtMC41LDAtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjEtMS43LTAuNC0yLjFjLTAuMy0wLjQtMC45LTAuNi0xLjgtMC42bC0xLjEsNy4yCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC42LDAuMSwxLDAuNCwxLjJjMC4yLDAuMSwwLjQsMC4yLDAuOCwwLjJ2MC44aC00LjlWMzIyLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIzOS42LDMwNy4zYzEuNC0zLDMuMS00LjUsNC44LTQuNWMxLjIsMCwyLjIsMC42LDIuOSwxLjlzMS4xLDMsMS4xLDUuMmMwLDMuMi0wLjcsNi4yLTIsOS4xCgkJYy0xLjQsMy4xLTMuMSw0LjYtNSw0LjZjLTEuMiwwLTIuMS0wLjYtMi45LTEuOXMtMS4xLTMtMS4xLTUuMUMtMjQxLjcsMzEzLjMtMjQxLDMxMC4yLTIzOS42LDMwNy4zeiBNLTIzOS4xLDMyMC44CgkJYzAuMywxLjIsMC43LDEuOCwxLjQsMS44YzAuNywwLDEuMi0wLjQsMS44LTEuM3MxLjEtMi41LDEuNy00LjljMC40LTEuNSwwLjYtMy4xLDAuOC00LjhjMC4yLTEuNywwLjMtMy4xLDAuMy00LjEKCQljMC0xLTAuMS0xLjgtMC40LTIuNWMtMC4zLTAuNy0wLjctMS4xLTEuMy0xLjFjLTEuNCwwLTIuNSwyLjItMy41LDYuNWMtMC43LDMuMy0xLjEsNi4xLTEuMSw4LjMKCQlDLTIzOS4zLDMxOS41LTIzOS4yLDMyMC4yLTIzOS4xLDMyMC44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMzEuNCwzMjIuM2MwLjQtMC4xLDAuNy0wLjMsMC45LTAuNXMwLjMtMC44LDAuNS0xLjZsMi0xMy4yYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNCwwLjEtMC43LDAuMS0xCgkJYzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4yLTAuMS0wLjUtMC4yLTEtMC4zdi0wLjhoNC41YzEsMCwxLjgsMC4yLDIuNCwwLjVjMSwwLjcsMS41LDEuOSwxLjUsMy43YzAsMC42LTAuMSwxLjMtMC4zLDIKCQlzLTAuNSwxLjMtMC45LDEuOWMtMC4zLDAuNC0wLjYsMC43LTEsMWMtMC4yLDAuMS0wLjYsMC4zLTEuMSwwLjVjMC4xLDAuMywwLjEsMC41LDAuMSwwLjZsMS4zLDYuN2MwLjIsMC45LDAuNCwxLjUsMC42LDEuNwoJCWMwLjIsMC4yLDAuNSwwLjQsMC45LDAuNHYwLjhoLTMuM2wtMS44LTkuOGgtMC41bC0xLDYuMWwtMC4xLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOSwwLjIsMQoJCXMwLjUsMC4yLDEsMC4zdjAuOGgtNC45VjMyMi4zeiBNLTIyNS4xLDMxMi4xYzAuNS0wLjIsMC45LTAuNiwxLjItMS4xYzAuMi0wLjQsMC40LTAuOSwwLjUtMS42YzAuMi0wLjcsMC4yLTEuNCwwLjItMi4zCgkJYzAtMC44LTAuMS0xLjUtMC4zLTIuMXMtMC42LTAuOC0xLjItMC44Yy0wLjIsMC0wLjQsMC4xLTAuNSwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjMsMWwtMSw2LjgKCQlDLTIyNS44LDMxMi4zLTIyNS4zLDMxMi4yLTIyNS4xLDMxMi4xeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMjEuMSwzMjIuM2MwLjQtMC4xLDAuNy0wLjQsMC45LTAuOWMwLjItMC41LDAuNC0xLjcsMC44LTMuN2wxLjctMTFjMC4xLTAuNCwwLjEtMC43LDAuMS0xCgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNC0wLjEtMC43LTAuMi0wLjhzLTAuNS0wLjItMC45LTAuMnYtMC44aDMuOGwwLjksMTMuOWw1LTEzLjloMy41djAuOGMtMC40LDAuMS0wLjYsMC4yLTAuOCwwLjQKCQljLTAuMiwwLjMtMC40LDAuOC0wLjUsMS43bC0yLDEzLjNjMCwwLjMtMC4xLDAuNi0wLjEsMC45YzAsMC4zLTAuMSwwLjUtMC4xLDAuN2MwLDAuNSwwLjEsMC44LDAuMiwwLjlzMC41LDAuMiwxLDAuM3YwLjhoLTUuMgoJCXYtMC44YzAuNi0wLjEsMC45LTAuMywxLjEtMC41czAuNC0wLjgsMC41LTEuNmwyLjEtMTMuNmwtNi4yLDE2LjhoLTAuNUwtMjE3LDMwN2wtMS43LDEwLjdjLTAuMSwwLjUtMC4yLDEtMC4yLDEuNAoJCWMtMC4xLDAuNi0wLjEsMS4xLTAuMSwxLjRjMCwwLjcsMC4yLDEuMiwwLjUsMS40YzAuMiwwLjIsMC41LDAuMiwwLjksMC4zdjAuOGgtMy40VjMyMi4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMDcuNSwzMjIuM2MwLjMtMC4yLDAuNS0wLjMsMC43LTAuNWMwLjItMC4zLDAuNS0wLjgsMC43LTEuNmw2LjEtMTcuNGgwLjRsMS42LDE2LjkKCQljMC4xLDEuMSwwLjIsMS44LDAuNCwyLjFjMC4yLDAuMywwLjUsMC40LDEsMC41djAuN2gtNXYtMC43YzAuNS0wLjEsMC44LTAuMiwxLTAuNGMwLjItMC4yLDAuMy0wLjYsMC4zLTEuM2MwLTAuMiwwLTAuOC0wLjEtMS42CgkJYzAtMC4yLTAuMS0wLjktMC4yLTIuMWgtMy42bC0xLDNjLTAuMSwwLjItMC4xLDAuNC0wLjIsMC43cy0wLjEsMC41LTAuMSwwLjdjMCwwLjQsMC4xLDAuNywwLjIsMC44czAuNCwwLjIsMC45LDAuM3YwLjdoLTMuMgoJCVYzMjIuM3ogTS0yMDAuNiwzMTUuN2wtMC42LTcuMmwtMi40LDcuMkgtMjAwLjZ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE5Ni41LDMyMi4zYzAuNSwwLDAuOS0wLjEsMS0wLjNjMC4zLTAuMywwLjUtMC45LDAuNy0xLjhsMi40LTE1LjljLTAuOCwwLTEuNSwwLjMtMi4xLDEuMQoJCWMtMC42LDAuNy0xLjEsMS44LTEuNSwzLjJsLTAuNC0wLjJsMC42LTVoOS4xbC0wLjYsNS43bC0wLjQtMC4xYzAtMS45LTAuMy0zLjItMC45LTMuOWMtMC4zLTAuNC0wLjgtMC42LTEuNC0wLjZsLTIuMywxNS4xbC0wLjEsMQoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywxYzAuMiwwLjEsMC41LDAuMiwxLjEsMC4zdjAuOGgtNS41VjMyMi4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xODguMiwzMjIuM2MwLjQtMC4xLDAuNy0wLjMsMC45LTAuNXMwLjMtMC44LDAuNS0xLjZsMi0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjEtMC45YzAtMC4zLDAtMC41LDAtMC43CgkJYzAtMC41LTAuMS0wLjgtMC4yLTAuOXMtMC41LTAuMi0xLTAuM3YtMC44aDQuOXYwLjhjLTAuNCwwLjEtMC43LDAuMy0wLjksMC41Yy0wLjIsMC4yLTAuMywwLjgtMC41LDEuNmwtMiwxMy4ybC0wLjEsMQoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMiwwLjljMC4yLDAuMSwwLjUsMC4yLDEsMC4zdjAuOGgtNC45VjMyMi4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNzkuNiwzMDcuM2MxLjQtMywzLjEtNC41LDQuOC00LjVjMS4yLDAsMi4yLDAuNiwyLjksMS45czEuMSwzLDEuMSw1LjJjMCwzLjItMC43LDYuMi0yLDkuMQoJCWMtMS40LDMuMS0zLjEsNC42LTUsNC42Yy0xLjIsMC0yLjEtMC42LTIuOS0xLjlzLTEuMS0zLTEuMS01LjFDLTE4MS42LDMxMy4zLTE4MSwzMTAuMi0xNzkuNiwzMDcuM3ogTS0xNzkuMSwzMjAuOAoJCWMwLjMsMS4yLDAuNywxLjgsMS40LDEuOGMwLjcsMCwxLjItMC40LDEuOC0xLjNjMC41LTAuOSwxLjEtMi41LDEuNy00LjljMC40LTEuNSwwLjYtMy4xLDAuOC00LjhjMC4yLTEuNywwLjMtMy4xLDAuMy00LjEKCQljMC0xLTAuMS0xLjgtMC40LTIuNWMtMC4zLTAuNy0wLjctMS4xLTEuMy0xLjFjLTEuNCwwLTIuNSwyLjItMy41LDYuNWMtMC43LDMuMy0xLjEsNi4xLTEuMSw4LjMKCQlDLTE3OS4zLDMxOS41LTE3OS4yLDMyMC4yLTE3OS4xLDMyMC44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNzEuMywzMjIuM2MwLjQtMC4xLDAuNy0wLjQsMC45LTAuOWMwLjItMC41LDAuNC0xLjcsMC44LTMuNmwxLjktMTIuMWwtMC4xLTAuM2MtMC4xLTAuNS0wLjMtMC45LTAuNS0xLjEKCQljLTAuMS0wLjEtMC40LTAuMi0wLjgtMC4ydi0wLjhoMy4zbDMuNiwxMy42bDEuMy04LjNjMC4xLTAuNSwwLjEtMSwwLjItMS40YzAuMS0wLjYsMC4xLTEuMSwwLjEtMS4zYzAtMC43LTAuMS0xLjItMC40LTEuNQoJCWMtMC4yLTAuMi0wLjUtMC4zLTAuOS0wLjN2LTAuOGgzLjR2MC44bC0wLjIsMC4xYy0wLjMsMC4xLTAuNiwwLjQtMC44LDFjLTAuMiwwLjYtMC40LDEuNy0wLjcsMy40bC0yLjMsMTVoLTAuNGwtNC4zLTE2LjMKCQlsLTEuNiwxMC42Yy0wLjEsMC45LTAuMiwxLjUtMC4zLDJjMCwwLjMsMCwwLjUsMCwwLjhjMCwwLjcsMC4xLDEuMiwwLjQsMS40YzAuMiwwLjIsMC41LDAuMywwLjksMC4zdjAuOGgtMy40VjMyMi4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNTMuNywzMDcuM2MxLjQtMywzLjEtNC41LDQuOC00LjVjMS4yLDAsMi4yLDAuNiwyLjksMS45czEuMSwzLDEuMSw1LjJjMCwzLjItMC43LDYuMi0yLDkuMQoJCWMtMS40LDMuMS0zLjEsNC42LTUsNC42Yy0xLjIsMC0yLjEtMC42LTIuOS0xLjlzLTEuMS0zLTEuMS01LjFDLTE1NS44LDMxMy4zLTE1NS4xLDMxMC4yLTE1My43LDMwNy4zeiBNLTE1My4yLDMyMC44CgkJYzAuMywxLjIsMC43LDEuOCwxLjQsMS44YzAuNywwLDEuMi0wLjQsMS44LTEuM2MwLjUtMC45LDEuMS0yLjUsMS43LTQuOWMwLjQtMS41LDAuNi0zLjEsMC44LTQuOGMwLjItMS43LDAuMy0zLjEsMC4zLTQuMQoJCWMwLTEtMC4xLTEuOC0wLjQtMi41Yy0wLjMtMC43LTAuNy0xLjEtMS4zLTEuMWMtMS40LDAtMi41LDIuMi0zLjUsNi41Yy0wLjcsMy4zLTEuMSw2LjEtMS4xLDguMwoJCUMtMTUzLjQsMzE5LjUtMTUzLjMsMzIwLjItMTUzLjIsMzIwLjh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE0NS40LDMyMi4zYzAuNC0wLjEsMC43LTAuNCwwLjktMC45YzAuMi0wLjUsMC40LTEuNywwLjgtMy42bDEuOS0xMi4xbC0wLjEtMC4zYy0wLjEtMC41LTAuMy0wLjktMC41LTEuMQoJCWMtMC4xLTAuMS0wLjQtMC4yLTAuOC0wLjJ2LTAuOGgzLjNsMy42LDEzLjZsMS4zLTguM2MwLjEtMC41LDAuMS0xLDAuMi0xLjRjMC4xLTAuNiwwLjEtMS4xLDAuMS0xLjNjMC0wLjctMC4xLTEuMi0wLjQtMS41CgkJYy0wLjItMC4yLTAuNS0wLjMtMC45LTAuM3YtMC44aDMuNHYwLjhsLTAuMiwwLjFjLTAuMywwLjEtMC42LDAuNC0wLjgsMWMtMC4yLDAuNi0wLjQsMS43LTAuNywzLjRsLTIuMywxNWgtMC40bC00LjMtMTYuMwoJCWwtMS42LDEwLjZjLTAuMSwwLjktMC4yLDEuNS0wLjMsMmMwLDAuMywwLDAuNSwwLDAuOGMwLDAuNywwLjEsMS4yLDAuNCwxLjRjMC4yLDAuMiwwLjUsMC4zLDAuOSwwLjN2MC44aC0zLjRWMzIyLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTEzNC4xLDMyMi4zYzAuNC0wLjEsMC43LTAuMywwLjktMC41YzAuMi0wLjMsMC4zLTAuOCwwLjUtMS42bDItMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4xLTAuOQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0wLjljLTAuMi0wLjEtMC41LTAuMi0xLTAuM3YtMC44aDUuMnYwLjhjLTAuNiwwLjEtMSwwLjMtMS4yLDAuNWMtMC4yLDAuMi0wLjQsMC44LTAuNSwxLjYKCQlsLTIuMiwxNC4xYzAsMC4yLDAsMC4zLTAuMSwwLjRjMCwwLjEsMCwwLjMsMCwwLjVjMCwwLjMsMC4xLDAuNiwwLjIsMC43YzAuMiwwLjEsMC40LDAuMiwwLjcsMC4yYzEuMSwwLDIuMS0wLjMsMi45LTEKCQljMC44LTAuNywxLjYtMiwyLjItMy45bDAuNCwwLjFsLTEsNS43aC05LjJWMzIyLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTEyNC4yLDMyMi4zYzAuNS0wLjEsMC45LTAuMiwxLjEtMC40YzAuMy0wLjMsMC41LTAuOCwwLjYtMS43bDEtNi40bC0xLjQtNy45Yy0wLjEtMC43LTAuMy0xLjItMC40LTEuNAoJCWMtMC4xLTAuMi0wLjQtMC40LTAuOC0wLjR2LTAuOGg0LjZ2MC44Yy0wLjQsMC0wLjcsMC4xLTAuOSwwLjJzLTAuMywwLjQtMC4zLDAuOGMwLDAuMSwwLDAuMywwLDAuNXMwLDAuNCwwLjEsMC42bDEuMiw2LjRsMi4yLTUuNQoJCWMwLjEtMC4zLDAuMi0wLjUsMC4zLTAuOGMwLjEtMC40LDAuMi0wLjgsMC4yLTEuMWMwLTAuNS0wLjEtMC44LTAuNC0xYy0wLjEtMC4xLTAuNC0wLjItMC44LTAuMnYtMC44aDMuNHYwLjgKCQljLTAuMiwwLjEtMC40LDAuMi0wLjYsMC40Yy0wLjMsMC4zLTAuNiwwLjktMC45LDEuNmwtMy4xLDcuOWwtMC44LDUuNWMwLDAuMi0wLjEsMC41LTAuMSwwLjhzLTAuMSwwLjYtMC4xLDAuNwoJCWMwLDAuNSwwLjEsMC45LDAuMywxLjFjMC4xLDAuMSwwLjUsMC4yLDEsMC4ydjAuOGgtNS4zVjMyMi4zeiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTS0xMTMuNSw0MDEuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJQy0xMDguNSwzOTkuMy0xMTAuNyw0MDEuNS0xMTMuNSw0MDEuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik0tMTEzLjUsNDAyaC0xNjBjLTMsMC01LjUtMi41LTUuNS01LjV2LTMxYzAtMywyLjUtNS41LDUuNS01LjVoMTYwYzMsMCw1LjUsMi41LDUuNSw1LjV2MzEKCQlDLTEwOCwzOTkuNS0xMTAuNSw0MDItMTEzLjUsNDAyeiBNLTI3My41LDM2MWMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SC0yNzMuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjY5LjcsMzkwLjNjMC4zLTAuMSwwLjYtMC40LDAuNy0wLjljMC4xLTAuNSwwLjMtMS43LDAuNi0zLjdsMS40LTEyLjNsLTAuMS0wLjNjLTAuMS0wLjUtMC4yLTAuOS0wLjQtMS4xCgkJYy0wLjEtMC4xLTAuMy0wLjItMC42LTAuMlYzNzFoMi41bDIuNywxMy45bDEtOC41YzAuMS0wLjUsMC4xLTEsMC4xLTEuNGMwLjEtMC42LDAuMS0xLjEsMC4xLTEuNGMwLTAuNy0wLjEtMS4yLTAuMy0xLjUKCQljLTAuMS0wLjItMC40LTAuMy0wLjctMC4zVjM3MWgyLjZ2MC44bC0wLjIsMC4xYy0wLjMsMC4xLTAuNSwwLjQtMC42LDFjLTAuMSwwLjYtMC4zLDEuOC0wLjUsMy41bC0xLjgsMTUuMmgtMC4zbC0zLjMtMTYuNgoJCWwtMS4zLDEwLjdjLTAuMSwwLjktMC4yLDEuNi0wLjIsMmMwLDAuMywwLDAuNSwwLDAuOGMwLDAuNywwLjEsMS4yLDAuMywxLjVjMC4xLDAuMiwwLjQsMC4zLDAuNywwLjN2MC44aC0yLjZWMzkwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI1OC45LDM3NS4xYzEuMS0zLjEsMi4zLTQuNiwzLjctNC42YzAuOSwwLDEuNywwLjYsMi4yLDJjMC42LDEuMywwLjksMy4xLDAuOSw1LjNjMCwzLjItMC41LDYuMy0xLjUsOS4yCgkJYy0xLjEsMy4xLTIuNCw0LjctMy44LDQuN2MtMC45LDAtMS42LTAuNy0yLjItMnMtMC44LTMtMC44LTUuMkMtMjYwLjUsMzgxLjEtMjYwLDM3OC0yNTguOSwzNzUuMXogTS0yNTguNSwzODguOAoJCWMwLjIsMS4yLDAuNiwxLjgsMS4xLDEuOGMwLjUsMCwwLjktMC40LDEuNC0xLjNjMC40LTAuOSwwLjgtMi41LDEuMy01YzAuMy0xLjYsMC41LTMuMiwwLjYtNC45YzAuMi0xLjcsMC4yLTMuMSwwLjItNC4yCgkJYzAtMS0wLjEtMS45LTAuMy0yLjZjLTAuMi0wLjctMC41LTEuMS0xLTEuMWMtMSwwLTEuOSwyLjItMi42LDYuNmMtMC41LDMuNC0wLjgsNi4yLTAuOCw4LjRDLTI1OC43LDM4Ny40LTI1OC42LDM4OC4xLTI1OC41LDM4OC44CgkJeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNTEuOCwzOTAuM2MwLjQsMCwwLjctMC4xLDAuOC0wLjNjMC4yLTAuMywwLjQtMC45LDAuNS0xLjlsMS45LTE2LjFjLTAuNiwwLTEuMiwwLjMtMS42LDEuMQoJCWMtMC40LDAuNy0wLjgsMS44LTEuMSwzLjJsLTAuMy0wLjJsMC41LTUuMWg2LjlsLTAuNSw1LjhsLTAuMy0wLjFjMC0yLTAuMy0zLjMtMC43LTRjLTAuMi0wLjQtMC42LTAuNi0xLjEtMC42bC0xLjgsMTUuM2wtMC4xLDEKCQljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjIsMXMwLjQsMC4yLDAuOCwwLjN2MC44aC00LjJWMzkwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI0Mi44LDM5MC4zYzAuMy0wLjEsMC41LTAuMywwLjctMC41YzAuMS0wLjMsMC4zLTAuOCwwLjQtMS42bDEuNS0xMy41YzAtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCWMwLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4yLTAuOXMtMC40LTAuMi0wLjctMC4zVjM3MWg2LjdsLTAuNSw1LjdsLTAuMy0wLjFjMC0xLjQtMC4xLTIuNS0wLjMtMy4xCgkJYy0wLjMtMS0xLTEuNi0xLjktMS42Yy0wLjMsMC0wLjUsMC4xLTAuNiwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjIsMS4xbC0wLjcsNi43YzAuOC0wLjEsMS40LTAuMiwxLjYtMC41YzAuMy0wLjMsMC41LTEuMiwwLjgtMi42CgkJbDAuNCwwLjFsLTAuOSw4LjJsLTAuMy0wLjFjMC0wLjMsMC0wLjUsMC0wLjhjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMS0xLjctMC4zLTIuMXMtMC43LTAuNi0xLjQtMC42bC0wLjgsNy4zYzAsMC4xLDAsMC4yLDAsMC40CgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC42LDAuMSwxLDAuMywxLjJjMC4xLDAuMSwwLjMsMC4yLDAuNiwwLjJ2MC44aC0zLjdWMzkwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIzMi43LDM3NS4xYzEuMS0zLjEsMi4zLTQuNiwzLjctNC42YzAuOSwwLDEuNywwLjYsMi4yLDJjMC42LDEuMywwLjksMy4xLDAuOSw1LjNjMCwzLjItMC41LDYuMy0xLjUsOS4yCgkJYy0xLjEsMy4xLTIuNCw0LjctMy44LDQuN2MtMC45LDAtMS42LTAuNy0yLjItMnMtMC44LTMtMC44LTUuMkMtMjM0LjMsMzgxLjEtMjMzLjgsMzc4LTIzMi43LDM3NS4xeiBNLTIzMi40LDM4OC44CgkJYzAuMiwxLjIsMC42LDEuOCwxLjEsMS44YzAuNSwwLDAuOS0wLjQsMS40LTEuM2MwLjQtMC45LDAuOC0yLjUsMS4zLTVjMC4zLTEuNiwwLjUtMy4yLDAuNi00LjljMC4yLTEuNywwLjItMy4xLDAuMi00LjIKCQljMC0xLTAuMS0xLjktMC4zLTIuNmMtMC4yLTAuNy0wLjUtMS4xLTEtMS4xYy0xLDAtMS45LDIuMi0yLjYsNi42Yy0wLjUsMy40LTAuOCw2LjItMC44LDguNEMtMjMyLjUsMzg3LjQtMjMyLjUsMzg4LjEtMjMyLjQsMzg4LjgKCQl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIyNi41LDM5MC4zYzAuMy0wLjEsMC41LTAuMywwLjctMC41YzAuMS0wLjMsMC4zLTAuOCwwLjQtMS42bDEuNS0xMy41YzAtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCWMwLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuNy0wLjNWMzcxaDMuNWMwLjgsMCwxLjQsMC4yLDEuOCwwLjVjMC44LDAuNywxLjIsMS45LDEuMiwzLjgKCQljMCwwLjYtMC4xLDEuMy0wLjIsMnMtMC40LDEuNC0wLjcsMS45Yy0wLjIsMC40LTAuNSwwLjctMC44LDFjLTAuMiwwLjEtMC40LDAuMy0wLjgsMC41YzAsMC4zLDAuMSwwLjUsMC4xLDAuNmwxLDYuOAoJCWMwLjEsMC45LDAuMywxLjUsMC40LDEuN2MwLjEsMC4yLDAuNCwwLjQsMC43LDAuNHYwLjhoLTIuNWwtMS40LTkuOWgtMC40bC0wLjcsNi4ybC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC45LDAuMiwxYzAuMSwwLjEsMC40LDAuMiwwLjgsMC4zdjAuOGgtMy44VjM5MC4zeiBNLTIyMS42LDM3OS45YzAuNC0wLjIsMC43LTAuNiwwLjktMS4xYzAuMS0wLjQsMC4zLTAuOSwwLjQtMS42CgkJYzAuMS0wLjcsMC4yLTEuNSwwLjItMi4zYzAtMC44LTAuMS0xLjUtMC4zLTIuMWMtMC4yLTAuNi0wLjUtMC44LTAuOS0wLjhjLTAuMiwwLTAuMywwLjEtMC40LDAuM2MtMC4xLDAuMi0wLjEsMC41LTAuMiwxLjEKCQlsLTAuOCw2LjlDLTIyMi4yLDM4MC4xLTIyMS45LDM4MC0yMjEuNiwzNzkuOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjE2LDM5MC4zYzAuMy0wLjEsMC41LTAuMywwLjctMC41YzAuMS0wLjMsMC4zLTAuOCwwLjQtMS42bDEuNS0xMy41YzAtMC4zLDAuMS0wLjYsMC4xLTAuOXMwLTAuNSwwLTAuNwoJCWMwLTAuNS0wLjEtMC45LTAuMi0xYy0wLjEtMC4xLTAuMy0wLjItMC43LTAuMlYzNzFoMy42YzAuNiwwLDEuMSwwLjIsMS41LDAuNmMwLjgsMC43LDEuMiwyLjEsMS4yLDQuMWMwLDEuOC0wLjMsMy4yLTAuOSw0LjMKCQljLTAuNiwxLjEtMS40LDEuNi0yLjQsMS42Yy0wLjIsMC0wLjMsMC0wLjQsMGMtMC4xLDAtMC4zLDAtMC43LTAuMWwtMC43LDZsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC41LDAuMSwwLjgsMC4yLDFzMC40LDAuMiwwLjgsMC4zdjAuOGgtMy43VjM5MC4zeiBNLTIxMi4yLDM4MC40YzAuMSwwLDAuMiwwLDAuMiwwLjFzMC4xLDAsMC4yLDBjMC40LDAsMC44LTAuMSwxLTAuNAoJCXMwLjQtMC42LDAuNi0xLjJjMC4yLTAuNSwwLjMtMS4yLDAuNC0yYzAuMS0wLjgsMC4xLTEuNSwwLjEtMi4xYzAtMC44LTAuMS0xLjUtMC4zLTIuMWMtMC4yLTAuNS0wLjQtMC44LTAuOC0wLjgKCQljLTAuMiwwLTAuMywwLjEtMC40LDAuM2MtMC4xLDAuMi0wLjEsMC41LTAuMiwxTC0yMTIuMiwzODAuNHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjA2LjQsMzc0LjdjMC0wLjMsMC4xLTAuNiwwLjEtMC45YzAtMC4zLDAtMC41LDAtMC44YzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuNy0wLjNWMzcxCgkJaDMuOXYwLjhjLTAuNCwwLjEtMC42LDAuMi0wLjgsMC41Yy0wLjEsMC4yLTAuMywwLjgtMC40LDEuN2wtMSw5Yy0wLjEsMC44LTAuMiwxLjUtMC4yLDJjLTAuMSwwLjktMC4xLDEuNi0wLjEsMgoJCWMwLDEsMC4xLDEuNywwLjQsMi4zczAuNywwLjgsMS4xLDAuOGMwLjgsMCwxLjQtMC44LDEuOS0yLjVjMC4zLTEsMC41LTIuNiwwLjgtNC45bDAuNy02LjNjMC4xLTAuOSwwLjEtMS4zLDAuMS0xLjIKCQljMC4xLTAuNywwLjEtMS4zLDAuMS0xLjZjMC0wLjctMC4xLTEuMi0wLjMtMS41Yy0wLjEtMC4yLTAuNC0wLjMtMC43LTAuM1YzNzFoMi42djAuOGMtMC4zLDAuMS0wLjYsMC40LTAuNywwLjkKCQljLTAuMSwwLjUtMC4zLDEuNy0wLjYsMy43bC0wLjgsNi44Yy0wLjMsMi43LTAuNyw0LjYtMSw1LjdjLTAuNiwxLjgtMS41LDIuNy0yLjYsMi43Yy0wLjgsMC0xLjUtMC41LTItMS40CgkJYy0wLjUtMC45LTAuOC0yLjItMC44LTMuOGMwLTAuNiwwLTEuMywwLjEtMmMwLTAuNSwwLjEtMS4zLDAuMy0yLjRMLTIwNi40LDM3NC43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMDAuMiwzOTAuM2MwLjMtMC4xLDAuNS0wLjIsMC42LTAuNGMwLjItMC4zLDAuMy0wLjksMC40LTEuN2wxLjUtMTMuNWMwLTAuNCwwLjEtMC43LDAuMS0xCgkJYzAtMC4zLDAtMC41LDAtMC42YzAtMC41LTAuMS0wLjktMC4yLTFjLTAuMS0wLjEtMC40LTAuMi0wLjctMC4zVjM3MWgzLjRjMC45LDAsMS43LDAuNCwyLjIsMS4xYzAuNSwwLjcsMC44LDEuOSwwLjgsMy40CgkJYzAsMS41LTAuMywyLjgtMSwzLjdjLTAuMywwLjUtMC44LDAuOS0xLjQsMS4yYzAuNSwwLjQsMC45LDAuOSwxLjEsMS4zYzAuNCwwLjgsMC42LDEuOCwwLjYsMy4xYzAsMS43LTAuMywzLjEtMC45LDQuMwoJCXMtMS41LDEuOS0yLjksMS45aC0zLjhWMzkwLjN6IE0tMTk3LjEsMzkwYzAuMSwwLjEsMC4zLDAuMSwwLjUsMC4xYzAuOCwwLDEuNC0wLjksMS43LTIuNmMwLjItMSwwLjMtMi4xLDAuMy0zLjIKCQljMC0xLjQtMC4yLTIuMy0wLjYtMi44Yy0wLjItMC4zLTAuNy0wLjUtMS4zLTAuNWwtMC44LDcuM2MwLDAuMSwwLDAuMywwLDAuNGMwLDAuMiwwLDAuMywwLDAuNQoJCUMtMTk3LjQsMzg5LjYtMTk3LjMsMzg5LjgtMTk3LjEsMzkweiBNLTE5NS4yLDM3OS42YzAuMi0wLjEsMC40LTAuNCwwLjYtMC44YzAuMi0wLjUsMC40LTEuMiwwLjUtMi4xYzAuMS0wLjYsMC4xLTEuMiwwLjEtMS44CgkJYzAtMC45LTAuMS0xLjYtMC4yLTIuMWMtMC4yLTAuNi0wLjUtMC44LTAuOS0wLjhjLTAuMiwwLTAuMywwLjEtMC40LDAuM2MtMC4xLDAuMi0wLjEsMC41LTAuMiwxbC0wLjgsNi43CgkJQy0xOTUuOCwzNzkuOS0xOTUuNCwzNzkuOC0xOTUuMiwzNzkuNnoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTkyLjMsMzkwLjNjMC4zLTAuMSwwLjUtMC4zLDAuNy0wLjVjMC4xLTAuMywwLjMtMC44LDAuNC0xLjZsMS41LTEzLjVjMC0wLjQsMC4xLTAuNywwLjEtMQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0xYy0wLjEtMC4xLTAuNC0wLjItMC43LTAuM1YzNzFoNHYwLjhjLTAuNCwwLjEtMC43LDAuMy0wLjksMC41Yy0wLjIsMC4yLTAuMywwLjgtMC40LDEuNwoJCWwtMS42LDE0LjNjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjEsMCwwLjMsMCwwLjVjMCwwLjMsMC4xLDAuNiwwLjIsMC43czAuMywwLjIsMC41LDAuMmMwLjksMCwxLjYtMC40LDIuMi0xLjEKCQljMC42LTAuNywxLjItMiwxLjctMy45bDAuMywwLjFsLTAuNyw1LjhoLTdWMzkwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE4NS4yLDM5MC4zYzAuMy0wLjEsMC41LTAuMywwLjctMC41YzAuMS0wLjMsMC4zLTAuOCwwLjQtMS42bDEuNS0xMy41YzAtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuNy0wLjNWMzcxaDMuOHYwLjhjLTAuMywwLjEtMC41LDAuMy0wLjcsMC41Yy0wLjEsMC4zLTAuMywwLjgtMC4zLDEuNgoJCWwtMS42LDEzLjVsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4yLDFzMC40LDAuMiwwLjcsMC4zdjAuOGgtMy44VjM5MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNzMuOCwzNzAuOWMwLjUsMC4zLDAuNywwLjQsMC44LDAuNGMwLjEsMCwwLjItMC4xLDAuMy0wLjJjMC4xLTAuMiwwLjEtMC40LDAuMi0wLjZoMC40bC0wLjYsN2wtMC40LTAuMgoJCWMwLTAuNCwwLTAuNywwLTAuN2MwLTAuMSwwLTAuMiwwLTAuM2MwLTEuNi0wLjItMi44LTAuNS0zLjVjLTAuMy0wLjgtMC43LTEuMi0xLjItMS4yYy0xLDAtMS44LDEuNS0yLjUsNC42Yy0wLjYsMi44LTEsNS42LTEsOC40CgkJYzAsMi4xLDAuMiwzLjUsMC42LDQuM2MwLjQsMC44LDAuOCwxLjIsMS4zLDEuMmMwLjYsMCwxLjItMC41LDEuNy0xLjVjMC4zLTAuNSwwLjYtMS4yLDAuOS0yLjFsMC40LDAuN2MtMC40LDEuNS0xLDIuNy0xLjUsMy40CgkJcy0xLjIsMS4xLTEuOCwxLjFjLTEsMC0xLjgtMC43LTIuNS0yLjFjLTAuNy0xLjQtMS0zLjMtMS01LjdjMC0zLjYsMC41LTYuNywxLjUtOS40YzEtMi43LDIuMi00LDMuNi00CgkJQy0xNzQuNywzNzAuNS0xNzQuMywzNzAuNi0xNzMuOCwzNzAuOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTcwLjQsMzkwLjNjMC4zLTAuMSwwLjUtMC4zLDAuNy0wLjVjMC4xLTAuMywwLjMtMC44LDAuNC0xLjZsMS41LTEzLjVjMC0wLjMsMC4xLTAuNSwwLjEtMC43CgkJYzAtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjItMC45cy0wLjQtMC4yLTAuNy0wLjNWMzcxaDMuNWMwLjgsMCwxLjQsMC4yLDEuOCwwLjVjMC44LDAuNywxLjIsMS45LDEuMiwzLjgKCQljMCwwLjYtMC4xLDEuMy0wLjIsMmMtMC4xLDAuNy0wLjQsMS40LTAuNywxLjljLTAuMiwwLjQtMC41LDAuNy0wLjgsMWMtMC4yLDAuMS0wLjQsMC4zLTAuOCwwLjVjMCwwLjMsMC4xLDAuNSwwLjEsMC42bDEsNi44CgkJYzAuMSwwLjksMC4zLDEuNSwwLjQsMS43YzAuMSwwLjIsMC40LDAuNCwwLjcsMC40djAuOGgtMi41bC0xLjQtOS45aC0wLjRsLTAuNyw2LjJsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC41LDAuMSwwLjksMC4yLDFjMC4xLDAuMSwwLjQsMC4yLDAuOCwwLjN2MC44aC0zLjhWMzkwLjN6IE0tMTY1LjYsMzc5LjljMC40LTAuMiwwLjctMC42LDAuOS0xLjFjMC4xLTAuNCwwLjMtMC45LDAuNC0xLjYKCQljMC4xLTAuNywwLjItMS41LDAuMi0yLjNjMC0wLjgtMC4xLTEuNS0wLjMtMi4xYy0wLjItMC42LTAuNS0wLjgtMC45LTAuOGMtMC4yLDAtMC4zLDAuMS0wLjQsMC4zYy0wLjEsMC4yLTAuMSwwLjUtMC4yLDEuMQoJCWwtMC44LDYuOUMtMTY2LjIsMzgwLjEtMTY1LjgsMzgwLTE2NS42LDM3OS45eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNjIuNSwzOTAuM2MwLjMtMC4xLDAuNS0wLjMsMC43LTAuNWMwLjEtMC4zLDAuMy0wLjgsMC40LTEuNmwxLjUtMTMuNWMwLTAuMywwLjEtMC43LDAuMS0wLjkKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuNy0wLjNWMzcxaDYuOGwtMC41LDUuN2wtMC4zLTAuMWMwLTEuNS0wLjEtMi41LTAuMy0zLjEKCQljLTAuMy0xLTEtMS41LTEuOS0xLjVjLTAuMywwLTAuNSwwLjEtMC42LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxLjFsLTAuNyw2LjdjMC45LDAsMS41LTAuMiwxLjctMC41YzAuMy0wLjMsMC41LTEuMiwwLjktMi43CgkJbDAuNCwwLjFsLTAuOSw4LjJsLTAuMy0wLjFjMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLjEtMC4xLTEuOC0wLjQtMi4yYy0wLjItMC40LTAuNy0wLjYtMS40LTAuNmwtMC44LDcuMwoJCWMwLDAuMiwwLDAuMywwLDAuNXMwLDAuMywwLDAuNGMwLDAuMywwLDAuNSwwLjEsMC43czAuMywwLjMsMC42LDAuM2MwLjgsMCwxLjQtMC4zLDItMC44YzAuOC0wLjgsMS41LTIuMiwyLTQuMmwwLjMsMC4xbC0wLjcsNS44CgkJaC03VjM5MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNTQuNiwzOTAuM2MwLjMtMC4xLDAuNS0wLjMsMC43LTAuNWMwLjEtMC4zLDAuMy0wLjgsMC40LTEuNmwxLjUtMTMuNWMwLTAuNCwwLjEtMC43LDAuMS0xCgkJYzAtMC4zLDAtMC41LDAtMC43YzAtMC41LTAuMS0wLjgtMC4yLTFjLTAuMS0wLjEtMC40LTAuMi0wLjctMC4zVjM3MWg0djAuOGMtMC40LDAuMS0wLjcsMC4zLTAuOSwwLjVjLTAuMiwwLjItMC4zLDAuOC0wLjQsMS43CgkJbC0xLjYsMTQuM2MwLDAuMiwwLDAuMywwLDAuNHMwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMiwwLjdzMC4zLDAuMiwwLjUsMC4yYzAuOSwwLDEuNi0wLjQsMi4yLTEuMXMxLjItMiwxLjctMy45bDAuMywwLjEKCQlsLTAuNyw1LjhoLTdWMzkwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE0Ny41LDM5MC4zYzAuMy0wLjEsMC41LTAuMywwLjctMC41YzAuMS0wLjMsMC4zLTAuOCwwLjQtMS42bDEuNS0xMy41YzAtMC4zLDAuMS0wLjcsMC4xLTAuOQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0xYy0wLjEtMC4xLTAuNC0wLjItMC43LTAuM1YzNzFoNi44bC0wLjUsNS43bC0wLjMtMC4xYzAtMS41LTAuMS0yLjUtMC4zLTMuMQoJCWMtMC4zLTEtMS0xLjUtMS45LTEuNWMtMC4zLDAtMC41LDAuMS0wLjYsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4yLDEuMWwtMC43LDYuN2MwLjksMCwxLjUtMC4yLDEuNy0wLjVzMC41LTEuMiwwLjktMi43bDAuNCwwLjEKCQlsLTAuOSw4LjJsLTAuMy0wLjFjMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLjEtMC4xLTEuOC0wLjQtMi4yYy0wLjItMC40LTAuNy0wLjYtMS40LTAuNmwtMC44LDcuMwoJCWMwLDAuMiwwLDAuMywwLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLDAuNSwwLjEsMC43YzAuMSwwLjIsMC4zLDAuMywwLjYsMC4zYzAuOCwwLDEuNC0wLjMsMi0wLjhjMC44LTAuOCwxLjUtMi4yLDItNC4yCgkJbDAuMywwLjFsLTAuNyw1LjhoLTdWMzkwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE0MCwzOTAuM2MwLjItMC4yLDAuNC0wLjMsMC41LTAuNWMwLjItMC4zLDAuMy0wLjgsMC41LTEuNmw0LjctMTcuNmgwLjNsMS4yLDE3LjJjMC4xLDEuMiwwLjIsMS45LDAuMywyLjEKCQljMC4xLDAuMywwLjQsMC40LDAuOCwwLjV2MC43aC0zLjh2LTAuN2MwLjQtMC4xLDAuNi0wLjIsMC44LTAuNGMwLjEtMC4yLDAuMi0wLjYsMC4yLTEuM2MwLTAuMiwwLTAuOC0wLjEtMS42YzAtMC4yLDAtMC45LTAuMS0yLjIKCQloLTIuN2wtMC43LDNjMCwwLjItMC4xLDAuNC0wLjEsMC43cy0wLjEsMC41LTAuMSwwLjdjMCwwLjQsMC4xLDAuNywwLjIsMC44YzAuMSwwLjEsMC4zLDAuMiwwLjcsMC4zdjAuN2gtMi41VjM5MC4zegoJCSBNLTEzNC44LDM4My42bC0wLjUtNy4zbC0xLjksNy4zSC0xMzQuOHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTMxLjQsMzkxLjZsMC41LTYuN2wwLjQsMC4xYzAsMSwwLjEsMS43LDAuMSwyLjFjMC4xLDAuNywwLjIsMS40LDAuNCwxLjljMC4yLDAuNSwwLjQsMC45LDAuNiwxLjIKCQljMC4yLDAuMywwLjUsMC40LDAuOCwwLjRjMC41LDAsMC45LTAuNCwxLjItMS4xYzAuMy0wLjgsMC40LTEuNywwLjQtMi43YzAtMS4zLTAuNS0yLjktMS41LTQuOGMtMS0yLTEuNS0zLjktMS41LTUuNgoJCWMwLTEuNiwwLjItMywwLjctNC4xczEuMS0xLjcsMS45LTEuN2MwLjIsMCwwLjUsMC4xLDAuNywwLjJjMC4yLDAuMSwwLjMsMC4yLDAuNCwwLjJsMC4zLDAuMmMwLjEsMCwwLjEsMC4xLDAuMiwwLjEKCQljMC4xLDAsMC4xLDAuMSwwLjIsMC4xYzAuMSwwLDAuMy0wLjEsMC4zLTAuMnMwLjEtMC4zLDAuMi0wLjVoMC40bC0wLjUsNmwtMC4zLTAuMWwwLTFjLTAuMS0wLjktMC4yLTEuNy0wLjQtMi40CgkJYy0wLjMtMS0wLjctMS42LTEuMy0xLjZjLTAuNSwwLTAuOCwwLjQtMS4xLDEuM2MtMC4xLDAuNi0wLjIsMS4yLTAuMiwxLjhjMCwwLjcsMC4xLDEuMywwLjIsMS44YzAuMSwwLjMsMC4yLDAuNiwwLjQsMWwxLjEsMi4xCgkJYzAuNCwwLjgsMC43LDEuNiwxLDIuNmMwLjMsMSwwLjQsMi4xLDAuNCwzLjNjMCwxLjYtMC4zLDMtMC44LDQuM2MtMC41LDEuMy0xLjIsMS45LTIuMiwxLjljLTAuMiwwLTAuNS0wLjEtMC43LTAuMgoJCWMtMC4yLTAuMS0wLjUtMC4yLTAuNy0wLjRsLTAuMy0wLjNjLTAuMS0wLjEtMC4yLTAuMi0wLjItMC4yYzAsMC0wLjEsMC0wLjEsMGMtMC4xLDAtMC4yLDAuMS0wLjMsMC4yYy0wLjEsMC4yLTAuMSwwLjQtMC4yLDAuOAoJCUgtMTMxLjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTEyNS4zLDM5MC4zYzAuMy0wLjEsMC41LTAuMywwLjctMC41YzAuMS0wLjMsMC4zLTAuOCwwLjQtMS42bDEuNS0xMy41YzAtMC4zLDAuMS0wLjcsMC4xLTAuOQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0xYy0wLjEtMC4xLTAuNC0wLjItMC43LTAuM1YzNzFoNi44bC0wLjUsNS43bC0wLjMtMC4xYzAtMS41LTAuMS0yLjUtMC4zLTMuMQoJCWMtMC4zLTEtMS0xLjUtMi0xLjVjLTAuMywwLTAuNSwwLjEtMC42LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxLjFsLTAuNyw2LjdjMC45LDAsMS41LTAuMiwxLjctMC41YzAuMy0wLjMsMC41LTEuMiwwLjktMi43CgkJbDAuNCwwLjFsLTAuOSw4LjJsLTAuMy0wLjFjMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLjEtMC4xLTEuOC0wLjQtMi4yYy0wLjItMC40LTAuNy0wLjYtMS40LTAuNmwtMC44LDcuMwoJCWMwLDAuMiwwLDAuMywwLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLDAuNSwwLjEsMC43YzAuMSwwLjIsMC4zLDAuMywwLjYsMC4zYzAuOCwwLDEuNC0wLjMsMi0wLjhjMC44LTAuOCwxLjUtMi4yLDItNC4yCgkJbDAuMywwLjFsLTAuNyw1LjhoLTdWMzkwLjN6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTExMy41LDQ2OS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LDQ2Ny4zLTExMC43LDQ2OS41LTExMy41LDQ2OS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NiIgZD0iTS0xMTMuNSw0NzBoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMtMTA4LDQ2Ny41LTExMC41LDQ3MC0xMTMuNSw0NzB6IE0tMjczLjUsNDI5Yy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVILTI3My41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNjkuOCw0NTguM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLTAuMywwLjEtMC42LDAuMS0wLjlzMC0wLjUsMC0wLjcKCQljMC0wLjUtMC4xLTAuOS0wLjMtMWMtMC4xLTAuMS0wLjQtMC4yLTAuOC0wLjJWNDM5aDQuMWMwLjcsMCwxLjMsMC4yLDEuNywwLjZjMC45LDAuNywxLjMsMi4xLDEuMyw0LjFjMCwxLjgtMC40LDMuMi0xLjEsNC4zCgkJYy0wLjcsMS4xLTEuNiwxLjYtMi44LDEuNmMtMC4yLDAtMC4zLDAtMC40LDBzLTAuNCwwLTAuOC0wLjFsLTAuOCw2bC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC44LDAuMiwxczAuNCwwLjIsMC45LDAuM3YwLjhoLTQuMlY0NTguM3ogTS0yNjUuNSw0NDguNGMwLjEsMCwwLjIsMCwwLjMsMC4xYzAuMSwwLDAuMiwwLDAuMiwwYzAuNSwwLDAuOS0wLjEsMS4xLTAuNAoJCXMwLjUtMC42LDAuNy0xLjJjMC4yLTAuNSwwLjMtMS4yLDAuNC0yYzAuMS0wLjgsMC4yLTEuNSwwLjItMi4xYzAtMC44LTAuMS0xLjUtMC4zLTIuMWMtMC4yLTAuNS0wLjUtMC44LTEtMC44CgkJYy0wLjIsMC0wLjQsMC4xLTAuNSwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjIsMUwtMjY1LjUsNDQ4LjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI2MS42LDQ1OC4zYzAuMy0wLjEsMC42LTAuMywwLjgtMC41YzAuMi0wLjMsMC4zLTAuOCwwLjQtMS42bDEuOC0xMy41YzAtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCWMwLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4yLTAuOXMtMC40LTAuMi0wLjktMC4zVjQzOWg0YzAuOSwwLDEuNiwwLjIsMi4xLDAuNWMwLjksMC43LDEuMywxLjksMS4zLDMuOAoJCWMwLDAuNi0wLjEsMS4zLTAuMiwycy0wLjQsMS40LTAuOCwxLjljLTAuMiwwLjQtMC41LDAuNy0wLjksMWMtMC4yLDAuMS0wLjUsMC4zLTAuOSwwLjVjMCwwLjMsMC4xLDAuNSwwLjEsMC42bDEuMSw2LjgKCQljMC4xLDAuOSwwLjMsMS41LDAuNSwxLjdjMC4yLDAuMiwwLjQsMC40LDAuOCwwLjR2MC44aC0yLjlsLTEuNi05LjloLTAuNGwtMC45LDYuMmwtMC4xLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOSwwLjIsMWMwLjEsMC4xLDAuNCwwLjIsMC45LDAuM3YwLjhoLTQuM1Y0NTguM3ogTS0yNTYuMSw0NDcuOWMwLjQtMC4yLDAuOC0wLjYsMS0xLjFjMC4yLTAuNCwwLjMtMC45LDAuNS0xLjYKCQljMC4xLTAuNywwLjItMS41LDAuMi0yLjNjMC0wLjgtMC4xLTEuNS0wLjMtMi4xYy0wLjItMC42LTAuNS0wLjgtMS0wLjhjLTAuMiwwLTAuMywwLjEtMC40LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxLjFsLTAuOSw2LjkKCQlDLTI1Ni44LDQ0OC4xLTI1Ni40LDQ0OC0yNTYuMSw0NDcuOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjUyLjYsNDU4LjNjMC4zLTAuMSwwLjYtMC4zLDAuOC0wLjVjMC4yLTAuMywwLjMtMC44LDAuNC0xLjZsMS44LTEzLjVjMC0wLjMsMC4xLTAuNywwLjEtMC45CgkJYzAtMC4zLDAtMC41LDAtMC43YzAtMC41LTAuMS0wLjgtMC4yLTFjLTAuMS0wLjEtMC40LTAuMi0wLjktMC4zVjQzOWg3LjhsLTAuNiw1LjdsLTAuNC0wLjFjMC0xLjUtMC4xLTIuNS0wLjMtMy4xCgkJYy0wLjQtMS0xLjEtMS41LTIuMi0xLjVjLTAuNCwwLTAuNiwwLjEtMC43LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMywxLjFsLTAuOSw2LjdjMSwwLDEuNy0wLjIsMi0wLjVjMC4zLTAuMywwLjYtMS4yLDEtMi43CgkJbDAuNCwwLjFsLTEuMSw4LjJsLTAuNC0wLjFjMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLjEtMC4xLTEuOC0wLjQtMi4yYy0wLjMtMC40LTAuOC0wLjYtMS43LTAuNmwtMC45LDcuMwoJCWMwLDAuMiwwLDAuMy0wLjEsMC41YzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4yLDAuN2MwLjEsMC4yLDAuMywwLjMsMC42LDAuM2MwLjksMCwxLjYtMC4zLDIuMi0wLjgKCQljMS0wLjgsMS43LTIuMiwyLjItNC4ybDAuNCwwLjFsLTAuOSw1LjhoLThWNDU4LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTI0My42LDQ1OC4zYzAuMy0wLjEsMC42LTAuMywwLjgtMC41YzAuMi0wLjMsMC4zLTAuOCwwLjQtMS42bDEuOC0xMy41YzAuMS0wLjQsMC4xLTAuNywwLjEtMQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0xYy0wLjEtMC4xLTAuNC0wLjItMC45LTAuM1Y0MzloNC42djAuOGMtMC41LDAuMS0wLjgsMC4zLTEsMC41Yy0wLjIsMC4yLTAuMywwLjgtMC40LDEuNwoJCWwtMS45LDE0LjNjMCwwLjIsMCwwLjMsMCwwLjRzMCwwLjMsMCwwLjVjMCwwLjMsMC4xLDAuNiwwLjIsMC43czAuMywwLjIsMC42LDAuMmMxLDAsMS44LTAuNCwyLjYtMS4xYzAuNy0wLjcsMS40LTIsMS45LTMuOQoJCWwwLjMsMC4xbC0wLjgsNS44aC04VjQ1OC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMzUuNCw0NTguM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLjEtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjNWNDM5aDQuM3YwLjhjLTAuNCwwLjEtMC42LDAuMy0wLjgsMC41Yy0wLjIsMC4zLTAuMywwLjgtMC40LDEuNgoJCWwtMS44LDEzLjVsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4yLDFjMC4xLDAuMSwwLjQsMC4yLDAuOSwwLjN2MC44aC00LjNWNDU4LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIzMC41LDQ1OC4zYzAuNC0wLjEsMC42LTAuNCwwLjgtMC45YzAuMi0wLjUsMC40LTEuNywwLjctMy43bDEuNS0xMS4yYzAuMS0wLjQsMC4xLTAuNywwLjEtMXMwLTAuNSwwLTAuOAoJCWMwLTAuNC0wLjEtMC43LTAuMi0wLjhjLTAuMS0wLjEtMC40LTAuMi0wLjgtMC4yVjQzOWgzLjNsMC44LDE0LjFsNC40LTE0LjFoMy4xdjAuOGMtMC4zLDAuMS0wLjYsMC4yLTAuNywwLjQKCQljLTAuMiwwLjMtMC40LDAuOS0wLjUsMS43bC0xLjgsMTMuNWMwLDAuMy0wLjEsMC42LTAuMSwwLjljMCwwLjMsMCwwLjYsMCwwLjhjMCwwLjUsMC4xLDAuOCwwLjIsMC45YzAuMSwwLjEsMC40LDAuMiwwLjgsMC4zdjAuOAoJCWgtNC41di0wLjhjMC41LTAuMSwwLjgtMC4zLDEtMC41czAuMy0wLjgsMC40LTEuN2wxLjgtMTMuOGwtNS40LDE3LjFoLTAuNGwtMS0xNi42bC0xLjUsMTAuOWMtMC4xLDAuNi0wLjEsMS0wLjIsMS40CgkJYy0wLjEsMC42LTAuMSwxLjEtMC4xLDEuNGMwLDAuNywwLjEsMS4yLDAuNCwxLjRjMC4xLDAuMiwwLjQsMC4zLDAuOCwwLjN2MC44aC0zVjQ1OC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMTguMiw0NTguM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLjEtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjNWNDM5aDQuM3YwLjhjLTAuNCwwLjEtMC42LDAuMy0wLjgsMC41Yy0wLjIsMC4zLTAuMywwLjgtMC40LDEuNgoJCWwtMS44LDEzLjVsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4yLDFjMC4xLDAuMSwwLjQsMC4yLDAuOSwwLjN2MC44aC00LjNWNDU4LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIxMy4zLDQ1OC4zYzAuNC0wLjEsMC42LTAuNCwwLjgtMC45czAuNC0xLjcsMC43LTMuN2wxLjYtMTIuM2wtMC4xLTAuM2MtMC4xLTAuNS0wLjMtMC45LTAuNC0xLjEKCQljLTAuMS0wLjEtMC4zLTAuMi0wLjctMC4yVjQzOWgyLjlsMy4xLDEzLjlsMS4xLTguNWMwLjEtMC41LDAuMS0xLDAuMi0xLjRjMC4xLTAuNiwwLjEtMS4xLDAuMS0xLjRjMC0wLjctMC4xLTEuMi0wLjMtMS41CgkJYy0wLjEtMC4yLTAuNC0wLjMtMC44LTAuM1Y0MzloM3YwLjhsLTAuMiwwLjFjLTAuMywwLjEtMC41LDAuNC0wLjcsMWMtMC4yLDAuNi0wLjQsMS44LTAuNiwzLjVsLTIsMTUuMmgtMC40bC0zLjctMTYuNmwtMS40LDEwLjcKCQljLTAuMSwwLjktMC4yLDEuNi0wLjIsMmMwLDAuMywwLDAuNSwwLDAuOGMwLDAuNywwLjEsMS4yLDAuNCwxLjVjMC4xLDAuMiwwLjQsMC4zLDAuOCwwLjN2MC44aC0zVjQ1OC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMDMuOSw0NTguM2MwLjMtMC4yLDAuNS0wLjMsMC42LTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmw1LjMtMTcuNmgwLjRsMS40LDE3LjIKCQljMC4xLDEuMiwwLjIsMS45LDAuMywyLjFjMC4xLDAuMywwLjQsMC40LDAuOSwwLjV2MC43aC00LjR2LTAuN2MwLjQtMC4xLDAuNy0wLjIsMC45LTAuNGMwLjItMC4yLDAuMy0wLjYsMC4zLTEuMwoJCWMwLTAuMiwwLTAuOC0wLjEtMS42YzAtMC4yLTAuMS0wLjktMC4xLTIuMmgtMy4xbC0wLjgsM2MtMC4xLDAuMi0wLjEsMC40LTAuMiwwLjdzLTAuMSwwLjUtMC4xLDAuN2MwLDAuNCwwLjEsMC43LDAuMiwwLjgKCQljMC4xLDAuMSwwLjQsMC4yLDAuNywwLjN2MC43aC0yLjhWNDU4LjN6IE0tMTk3LjksNDUxLjZsLTAuNS03LjNsLTIuMSw3LjNILTE5Ny45eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xOTQuNiw0NTguM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLTAuMywwLjEtMC41LDAuMS0wLjcKCQljMC0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMi0wLjlzLTAuNC0wLjItMC45LTAuM1Y0MzloNGMwLjksMCwxLjYsMC4yLDIuMSwwLjVjMC45LDAuNywxLjMsMS45LDEuMywzLjgKCQljMCwwLjYtMC4xLDEuMy0wLjIsMmMtMC4xLDAuNy0wLjQsMS40LTAuOCwxLjljLTAuMiwwLjQtMC41LDAuNy0wLjksMWMtMC4yLDAuMS0wLjUsMC4zLTAuOSwwLjVjMCwwLjMsMC4xLDAuNSwwLjEsMC42bDEuMSw2LjgKCQljMC4xLDAuOSwwLjMsMS41LDAuNSwxLjdjMC4yLDAuMiwwLjQsMC40LDAuOCwwLjR2MC44aC0yLjlsLTEuNi05LjloLTAuNGwtMC45LDYuMmwtMC4xLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOSwwLjIsMWMwLjEsMC4xLDAuNCwwLjIsMC45LDAuM3YwLjhoLTQuM1Y0NTguM3ogTS0xODkuMSw0NDcuOWMwLjQtMC4yLDAuOC0wLjYsMS0xLjFjMC4yLTAuNCwwLjMtMC45LDAuNS0xLjYKCQljMC4xLTAuNywwLjItMS41LDAuMi0yLjNjMC0wLjgtMC4xLTEuNS0wLjMtMi4xYy0wLjItMC42LTAuNS0wLjgtMS0wLjhjLTAuMiwwLTAuMywwLjEtMC40LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxLjFsLTAuOSw2LjkKCQlDLTE4OS43LDQ0OC4xLTE4OS4zLDQ0OC0xODkuMSw0NDcuOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTg0LjcsNDU4LjNjMC41LTAuMSwwLjgtMC4yLDAuOS0wLjRjMC4yLTAuMywwLjQtMC45LDAuNS0xLjhsMC44LTYuNWwtMS4zLThjLTAuMS0wLjctMC4yLTEuMi0wLjQtMS41CgkJYy0wLjEtMC4yLTAuNC0wLjQtMC43LTAuNFY0MzloNHYwLjhjLTAuNCwwLTAuNiwwLjEtMC44LDAuMmMtMC4yLDAuMS0wLjIsMC40LTAuMiwwLjhjMCwwLjEsMCwwLjMsMCwwLjVjMCwwLjIsMCwwLjQsMC4xLDAuNgoJCWwxLDYuNWwxLjktNS42YzAuMS0wLjMsMC4yLTAuNiwwLjItMC44YzAuMS0wLjQsMC4xLTAuOCwwLjEtMS4xYzAtMC41LTAuMS0wLjktMC4zLTFjLTAuMS0wLjEtMC4zLTAuMi0wLjctMC4yVjQzOWgzdjAuOAoJCWMtMC4yLDAuMS0wLjQsMC4yLTAuNSwwLjRjLTAuMywwLjMtMC41LDAuOS0wLjgsMS42bC0yLjcsOGwtMC43LDUuNWMwLDAuMi0wLjEsMC41LTAuMSwwLjlzLTAuMSwwLjYtMC4xLDAuNwoJCWMwLDAuNSwwLjEsMC45LDAuMywxLjFjMC4xLDAuMSwwLjQsMC4yLDAuOCwwLjJ2MC44aC00LjZWNDU4LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE3NS4yLDQ1OC4zYzAuMy0wLjEsMC42LTAuMywwLjgtMC41YzAuMi0wLjMsMC4zLTAuOCwwLjQtMS42bDEuOC0xMy41YzAtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCWMwLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuOC0wLjNWNDM5aDRjMC45LDAsMS42LDAuMiwyLjEsMC41YzAuOSwwLjcsMS4zLDEuOSwxLjMsMy44CgkJYzAsMC42LTAuMSwxLjMtMC4yLDJzLTAuNCwxLjQtMC44LDEuOWMtMC4yLDAuNC0wLjUsMC43LTAuOSwxYy0wLjIsMC4xLTAuNSwwLjMtMC45LDAuNWMwLDAuMywwLjEsMC41LDAuMSwwLjZsMS4xLDYuOAoJCWMwLjEsMC45LDAuMywxLjUsMC41LDEuN2MwLjIsMC4yLDAuNCwwLjQsMC44LDAuNHYwLjhoLTIuOWwtMS42LTkuOWgtMC40bC0wLjksNi4ybC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM3MwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC45LDAuMiwxYzAuMSwwLjEsMC40LDAuMiwwLjksMC4zdjAuOGgtNC4zVjQ1OC4zeiBNLTE2OS43LDQ0Ny45YzAuNC0wLjIsMC44LTAuNiwxLTEuMWMwLjItMC40LDAuMy0wLjksMC41LTEuNgoJCWMwLjEtMC43LDAuMi0xLjUsMC4yLTIuM2MwLTAuOC0wLjEtMS41LTAuMy0yLjFjLTAuMi0wLjYtMC41LTAuOC0xLTAuOGMtMC4yLDAtMC4zLDAuMS0wLjQsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4yLDEuMWwtMC45LDYuOQoJCUMtMTcwLjMsNDQ4LjEtMTY5LjksNDQ4LTE2OS43LDQ0Ny45eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNjYuMiw0NTguM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLTAuMywwLjEtMC43LDAuMS0wLjkKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjNWNDM5aDcuOGwtMC42LDUuN2wtMC40LTAuMWMwLTEuNS0wLjEtMi41LTAuMy0zLjEKCQljLTAuNC0xLTEuMS0xLjUtMi4yLTEuNWMtMC40LDAtMC42LDAuMS0wLjcsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDEuMWwtMC45LDYuN2MxLDAsMS43LTAuMiwyLTAuNWMwLjMtMC4zLDAuNi0xLjIsMS0yLjcKCQlsMC40LDAuMWwtMS4xLDguMmwtMC40LTAuMWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEuMS0wLjEtMS44LTAuNC0yLjJzLTAuOC0wLjYtMS43LTAuNmwtMC45LDcuMwoJCWMwLDAuMiwwLDAuMy0wLjEsMC41czAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4yLDAuN3MwLjMsMC4zLDAuNiwwLjNjMC45LDAsMS42LTAuMywyLjItMC44YzEtMC44LDEuNy0yLjIsMi4yLTQuMmwwLjQsMC4xCgkJbC0wLjksNS44aC04VjQ1OC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNTYuNyw0NTkuNmwwLjUtNi43bDAuNCwwLjFjMCwxLDAuMSwxLjcsMC4xLDIuMWMwLjEsMC43LDAuMywxLjQsMC41LDEuOWMwLjIsMC41LDAuNSwwLjksMC43LDEuMgoJCWMwLjMsMC4zLDAuNiwwLjQsMC45LDAuNGMwLjYsMCwxLTAuNCwxLjMtMS4xYzAuMy0wLjgsMC41LTEuNywwLjUtMi43YzAtMS4zLTAuNi0yLjktMS44LTQuOGMtMS4yLTItMS44LTMuOS0xLjgtNS42CgkJYzAtMS42LDAuMy0zLDAuOC00LjFzMS4yLTEuNywyLjItMS43YzAuMywwLDAuNSwwLjEsMC44LDAuMmMwLjIsMC4xLDAuMywwLjIsMC41LDAuMmwwLjQsMC4yYzAuMSwwLDAuMiwwLjEsMC4yLDAuMQoJCWMwLjEsMCwwLjIsMC4xLDAuMiwwLjFjMC4yLDAsMC4zLTAuMSwwLjQtMC4yYzAuMS0wLjEsMC4yLTAuMywwLjItMC41aDAuNGwtMC42LDZsLTAuNC0wLjFsMC0xYy0wLjEtMC45LTAuMi0xLjctMC40LTIuNAoJCWMtMC4zLTEtMC44LTEuNi0xLjUtMS42Yy0wLjYsMC0xLDAuNC0xLjIsMS4zYy0wLjIsMC42LTAuMywxLjItMC4zLDEuOGMwLDAuNywwLjEsMS4zLDAuMywxLjhjMC4xLDAuMywwLjIsMC42LDAuNCwxbDEuMiwyLjEKCQljMC40LDAuOCwwLjgsMS42LDEuMSwyLjZjMC4zLDEsMC41LDIuMSwwLjUsMy4zYzAsMS42LTAuMywzLTAuOSw0LjNjLTAuNiwxLjMtMS40LDEuOS0yLjUsMS45Yy0wLjMsMC0wLjUtMC4xLTAuOC0wLjIKCQljLTAuMy0wLjEtMC41LTAuMi0wLjgtMC40bC0wLjQtMC4zYy0wLjEtMC4xLTAuMi0wLjItMC4zLTAuMmMwLDAtMC4xLDAtMC4yLDBjLTAuMiwwLTAuMywwLjEtMC4zLDAuMmMtMC4xLDAuMi0wLjEsMC40LTAuMiwwLjgKCQlILTE1Ni43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNDcuMSw0NDIuN2MwLTAuMywwLjEtMC42LDAuMS0wLjljMC0wLjMsMC0wLjUsMC0wLjhjMC0wLjUtMC4xLTAuOC0wLjItMC45Yy0wLjEtMC4xLTAuNC0wLjItMC44LTAuM1Y0MzkKCQloNC40djAuOGMtMC40LDAuMS0wLjcsMC4yLTAuOSwwLjVjLTAuMiwwLjItMC4zLDAuOC0wLjQsMS43bC0xLjIsOWMtMC4xLDAuOC0wLjIsMS41LTAuMiwyYy0wLjEsMC45LTAuMSwxLjYtMC4xLDIKCQljMCwxLDAuMiwxLjcsMC41LDIuM3MwLjcsMC44LDEuMywwLjhjMC45LDAsMS42LTAuOCwyLjEtMi41YzAuMy0xLDAuNi0yLjYsMC45LTQuOWwwLjgtNi4zYzAuMS0wLjksMC4xLTEuMywwLjEtMS4yCgkJYzAuMS0wLjcsMC4xLTEuMywwLjEtMS42YzAtMC43LTAuMS0xLjItMC40LTEuNWMtMC4yLTAuMi0wLjQtMC4zLTAuOC0wLjNWNDM5aDN2MC44Yy0wLjQsMC4xLTAuNiwwLjQtMC44LDAuOQoJCWMtMC4yLDAuNS0wLjQsMS43LTAuNywzLjdsLTAuOSw2LjhjLTAuNCwyLjctMC44LDQuNi0xLjIsNS43Yy0wLjcsMS44LTEuNywyLjctMywyLjdjLTAuOSwwLTEuNy0wLjUtMi4zLTEuNHMtMC45LTIuMi0wLjktMy44CgkJYzAtMC42LDAtMS4zLDAuMS0yYzAtMC41LDAuMi0xLjMsMC4zLTIuNEwtMTQ3LjEsNDQyLjd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE0MCw0NTguM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLjEtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuOC0wLjNWNDM5aDQuNnYwLjhjLTAuNSwwLjEtMC44LDAuMy0xLDAuNWMtMC4yLDAuMi0wLjMsMC44LTAuNCwxLjcKCQlsLTEuOSwxNC4zYzAsMC4yLDAsMC4zLDAsMC40czAsMC4zLDAsMC41YzAsMC4zLDAuMSwwLjYsMC4yLDAuN3MwLjMsMC4yLDAuNiwwLjJjMSwwLDEuOC0wLjQsMi42LTEuMWMwLjctMC43LDEuNC0yLDEuOS0zLjkKCQlsMC4zLDAuMWwtMC44LDUuOGgtOFY0NTguM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTMxLjEsNDU4LjNjMC40LDAsMC43LTAuMSwwLjktMC4zYzAuMy0wLjMsMC41LTAuOSwwLjYtMS45bDIuMS0xNi4xYy0wLjcsMC0xLjMsMC4zLTEuOCwxLjEKCQljLTAuNSwwLjctMC45LDEuOC0xLjMsMy4ybC0wLjQtMC4ybDAuNi01LjFoNy45bC0wLjUsNS44bC0wLjQtMC4xYzAtMi0wLjMtMy4zLTAuOC00Yy0wLjMtMC40LTAuNy0wLjYtMS4yLTAuNmwtMiwxNS4zbC0wLjEsMQoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMiwxczAuNSwwLjIsMSwwLjN2MC44aC00LjhWNDU4LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTEyMy41LDQ1OS42bDAuNS02LjdsMC40LDAuMWMwLDEsMC4xLDEuNywwLjEsMi4xYzAuMSwwLjcsMC4zLDEuNCwwLjUsMS45YzAuMiwwLjUsMC41LDAuOSwwLjcsMS4yCgkJYzAuMywwLjMsMC42LDAuNCwwLjksMC40YzAuNiwwLDEtMC40LDEuMy0xLjFjMC4zLTAuOCwwLjUtMS43LDAuNS0yLjdjMC0xLjMtMC42LTIuOS0xLjgtNC44Yy0xLjItMi0xLjgtMy45LTEuOC01LjYKCQljMC0xLjYsMC4zLTMsMC44LTQuMWMwLjUtMS4xLDEuMi0xLjcsMi4yLTEuN2MwLjMsMCwwLjUsMC4xLDAuOCwwLjJjMC4yLDAuMSwwLjMsMC4yLDAuNSwwLjJsMC40LDAuMmMwLjEsMCwwLjIsMC4xLDAuMiwwLjEKCQljMC4xLDAsMC4yLDAuMSwwLjIsMC4xYzAuMiwwLDAuMy0wLjEsMC40LTAuMmMwLjEtMC4xLDAuMi0wLjMsMC4yLTAuNWgwLjRsLTAuNiw2bC0wLjQtMC4xbDAtMWMtMC4xLTAuOS0wLjItMS43LTAuNC0yLjQKCQljLTAuMy0xLTAuOC0xLjYtMS41LTEuNmMtMC42LDAtMSwwLjQtMS4yLDEuM2MtMC4yLDAuNi0wLjMsMS4yLTAuMywxLjhjMCwwLjcsMC4xLDEuMywwLjMsMS44YzAuMSwwLjMsMC4yLDAuNiwwLjQsMWwxLjIsMi4xCgkJYzAuNCwwLjgsMC44LDEuNiwxLjEsMi42YzAuMywxLDAuNSwyLjEsMC41LDMuM2MwLDEuNi0wLjMsMy0wLjksNC4zYy0wLjYsMS4zLTEuNCwxLjktMi41LDEuOWMtMC4zLDAtMC41LTAuMS0wLjgtMC4yCgkJYy0wLjMtMC4xLTAuNS0wLjItMC44LTAuNGwtMC40LTAuM2MtMC4xLTAuMS0wLjItMC4yLTAuMy0wLjJjMCwwLTAuMSwwLTAuMiwwYy0wLjIsMC0wLjMsMC4xLTAuMywwLjJzLTAuMSwwLjQtMC4yLDAuOEgtMTIzLjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTExMy41LDUzNy41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LDUzNS4zLTExMC43LDUzNy41LTExMy41LDUzNy41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NiIgZD0iTS0xMTMuNSw1MzhoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMtMTA4LDUzNS41LTExMC41LDUzOC0xMTMuNSw1Mzh6IE0tMjczLjUsNDk3Yy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVILTI3My41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNDYuOCw1MjcuNmwxLjYtNi43bDEuMywwLjFjMC4xLDEsMC4yLDEuNywwLjQsMi4xYzAuMywwLjcsMC44LDEuNCwxLjUsMS45YzAuNywwLjUsMS40LDAuOSwyLjIsMS4yCgkJYzAuOCwwLjMsMS43LDAuNCwyLjcsMC40YzEuNywwLDMuMS0wLjQsNC0xLjFjMS0wLjgsMS40LTEuNywxLjQtMi43YzAtMS4zLTEuOC0yLjktNS4zLTQuOGMtMy42LTItNS4zLTMuOS01LjMtNS42CgkJYzAtMS42LDAuOC0zLDIuMy00LjFjMS42LTEuMSwzLjctMS43LDYuNi0xLjdjMC44LDAsMS42LDAuMSwyLjQsMC4yYzAuNSwwLjEsMSwwLjIsMS40LDAuMmwxLjEsMC4yYzAuMiwwLDAuNSwwLjEsMC43LDAuMQoJCWMwLjMsMCwwLjUsMC4xLDAuNywwLjFjMC41LDAsMC45LTAuMSwxLjItMC4yczAuNS0wLjMsMC43LTAuNWgxLjNsLTEuOCw2bC0xLjEtMC4xbC0wLjEtMWMtMC4yLTAuOS0wLjYtMS43LTEuMy0yLjQKCQljLTEtMS0yLjUtMS42LTQuNS0xLjZjLTEuNywwLTIuOSwwLjQtMy43LDEuM2MtMC41LDAuNi0wLjgsMS4yLTAuOCwxLjhjMCwwLjcsMC4zLDEuMywwLjgsMS44YzAuMywwLjMsMC43LDAuNiwxLjMsMWwzLjgsMi4xCgkJYzEuMywwLjgsMi41LDEuNiwzLjQsMi42YzAuOSwxLDEuNCwyLjEsMS40LDMuM2MwLDEuNi0wLjksMy0yLjcsNC4zYy0xLjgsMS4zLTQuMywxLjktNy40LDEuOWMtMC44LDAtMS42LTAuMS0yLjQtMC4yCgkJYy0wLjgtMC4xLTEuNi0wLjItMi40LTAuNGwtMS4xLTAuM2MtMC40LTAuMS0wLjYtMC4yLTAuOC0wLjJjLTAuMSwwLTAuMywwLTAuNSwwYy0wLjUsMC0wLjgsMC4xLTEsMC4yYy0wLjIsMC4yLTAuNCwwLjQtMC43LDAuOAoJCUgtMjQ2Ljh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIxOC4xLDUxMS4xYzMuOC0zLjEsOC00LjYsMTIuNy00LjZjMy4xLDAsNS43LDAuNiw3LjcsMmMyLDEuMywzLDMuMSwzLDUuM2MwLDMuMi0xLjgsNi4zLTUuMyw5LjIKCQljLTMuOCwzLjEtOC4yLDQuNy0xMy4xLDQuN2MtMy4xLDAtNS42LTAuNy03LjYtMnMtMi45LTMtMi45LTUuMkMtMjIzLjUsNTE3LjEtMjIxLjcsNTE0LTIxOC4xLDUxMS4xeiBNLTIxNi44LDUyNC44CgkJYzAuNywxLjIsMiwxLjgsMy44LDEuOGMxLjcsMCwzLjMtMC40LDQuNy0xLjNjMS40LTAuOSwyLjktMi41LDQuNC01YzAuOS0xLjYsMS43LTMuMiwyLjItNC45YzAuNS0xLjcsMC44LTMuMSwwLjgtNC4yCgkJYzAtMS0wLjQtMS45LTEuMS0yLjZjLTAuNy0wLjctMS44LTEuMS0zLjQtMS4xYy0zLjYsMC02LjYsMi4yLTkuMSw2LjZjLTEuOSwzLjQtMi44LDYuMi0yLjgsOC40CgkJQy0yMTcuMyw1MjMuNC0yMTcuMSw1MjQuMS0yMTYuOCw1MjQuOHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTk2LjEsNTI2LjNjMS0wLjEsMS44LTAuMywyLjMtMC41YzAuNS0wLjMsMC45LTAuOCwxLjItMS42bDUuMy0xMy41YzAuMi0wLjQsMC4zLTAuNywwLjMtMQoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjItMC44LTAuNi0xYy0wLjQtMC4xLTEuMy0wLjItMi42LTAuM1Y1MDdoMTMuOHYwLjhjLTEuNSwwLjEtMi41LDAuMy0zLjEsMC41cy0xLDAuOC0xLjMsMS43CgkJbC01LjcsMTQuM2MtMC4xLDAuMi0wLjEsMC4zLTAuMSwwLjRzLTAuMSwwLjMtMC4xLDAuNWMwLDAuMywwLjIsMC42LDAuNiwwLjdjMC40LDAuMSwxLDAuMiwxLjgsMC4yYzMsMCw1LjYtMC40LDcuNy0xLjEKCQljMi4yLTAuNyw0LjEtMiw1LjgtMy45bDEsMC4xbC0yLjUsNS44aC0yNC4xVjUyNi4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNzEuOCw1MjYuM2MwLjktMC4xLDEuNi0wLjIsMi0wLjRjMC43LTAuMywxLjItMC45LDEuNS0xLjdsNS4zLTEzLjVjMC4yLTAuNCwwLjMtMC43LDAuNC0xCgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMi0wLjgtMC42LTFjLTAuNC0wLjEtMS4zLTAuMi0yLjYtMC4zVjUwN2gxMi42YzQuMywwLDcuNSwwLjgsOS44LDIuM2MyLjIsMS41LDMuMywzLjUsMy4zLDYuMQoJCWMwLDMuMS0xLjYsNS43LTQuOSw4Yy0zLjcsMi41LTguNSwzLjgtMTQuNCwzLjhoLTEyLjVWNTI2LjN6IE0tMTQ3LjUsNTA5LjljLTEuMS0xLjMtMy4xLTItNS45LTJjLTAuOSwwLTEuNiwwLjEtMS45LDAuMwoJCWMtMC4zLDAuMi0wLjYsMC41LTAuNywwLjhsLTYsMTUuMWMtMC4xLDAuMS0wLjEsMC4zLTAuMSwwLjRzMCwwLjIsMCwwLjNjMCwwLjQsMC4yLDAuNywwLjUsMC44YzAuMywwLjIsMSwwLjMsMS45LDAuMwoJCWM1LjIsMCw4LjktMS44LDExLjItNS41YzEuNC0yLjIsMi4xLTQuNiwyLjEtNy4xQy0xNDYuNCw1MTItMTQ2LjcsNTEwLjgtMTQ3LjUsNTA5Ljl6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTExMy41LDYwNS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LDYwMy4zLTExMC43LDYwNS41LTExMy41LDYwNS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NiIgZD0iTS0xMTMuNSw2MDZoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMtMTA4LDYwMy41LTExMC41LDYwNi0xMTMuNSw2MDZ6IE0tMjczLjUsNTY1Yy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVILTI3My41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNjcuNCw1OTQuM2MwLjgsMCwxLjQtMC4xLDEuNy0wLjNjMC41LTAuMywwLjktMC45LDEuMS0xLjlsMy45LTE2LjFjLTEuMywwLTIuNSwwLjMtMy40LDEuMQoJCWMtMC45LDAuNy0xLjcsMS44LTIuMywzLjJsLTAuNy0wLjJsMS01LjFoMTQuN2wtMSw1LjhsLTAuNy0wLjFjMC0yLTAuNS0zLjMtMS41LTRjLTAuNS0wLjQtMS4zLTAuNi0yLjItMC42bC0zLjcsMTUuM2wtMC4yLDEKCQljMCwwLjEsMCwwLjItMC4xLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuNCwxYzAuMywwLjEsMC45LDAuMiwxLjgsMC4zdjAuOGgtOC44VjU5NC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNDkuNyw1NzkuMWMyLjMtMy4xLDQuOS00LjYsNy44LTQuNmMxLjksMCwzLjUsMC42LDQuNywyYzEuMiwxLjMsMS45LDMuMSwxLjksNS4zYzAsMy4yLTEuMSw2LjMtMy4zLDkuMgoJCWMtMi4zLDMuMS01LDQuNy04LDQuN2MtMS45LDAtMy41LTAuNy00LjYtMnMtMS44LTMtMS44LTUuMkMtMjUzLjEsNTg1LjEtMjUyLDU4Mi0yNDkuNyw1NzkuMXogTS0yNDguOSw1OTIuOAoJCWMwLjQsMS4yLDEuMiwxLjgsMi4zLDEuOGMxLjEsMCwyLTAuNCwyLjktMS4zYzAuOS0wLjksMS44LTIuNSwyLjctNWMwLjYtMS42LDEtMy4yLDEuNC00LjljMC4zLTEuNywwLjUtMy4xLDAuNS00LjIKCQljMC0xLTAuMi0xLjktMC43LTIuNmMtMC40LTAuNy0xLjEtMS4xLTIuMS0xLjFjLTIuMiwwLTQuMSwyLjItNS42LDYuNmMtMS4xLDMuNC0xLjcsNi4yLTEuNyw4LjQKCQlDLTI0OS4yLDU5MS40LTI0OS4xLDU5Mi4xLTI0OC45LDU5Mi44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yMzYuNCw1OTQuM2MwLjYtMC4xLDEuMS0wLjMsMS40LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjMtMTMuNWMwLjEtMC4zLDAuMS0wLjYsMC4yLTAuOQoJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4yLTAuOS0wLjUtMWMtMC4yLTAuMS0wLjctMC4yLTEuNC0wLjJWNTc1aDcuN2MxLjMsMCwyLjQsMC4yLDMuMiwwLjZjMS42LDAuNywyLjQsMi4xLDIuNCw0LjEKCQljMCwxLjgtMC43LDMuMi0yLDQuM2MtMS4zLDEuMS0zLDEuNi01LjEsMS42Yy0wLjMsMC0wLjYsMC0wLjgsMGMtMC4yLDAtMC43LDAtMS41LTAuMWwtMS41LDZsLTAuMiwxYzAsMC4xLDAsMC4yLTAuMSwwLjMKCQljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjQsMWMwLjIsMC4xLDAuOCwwLjIsMS42LDAuM3YwLjhoLTcuOVY1OTQuM3ogTS0yMjguNSw1ODQuNGMwLjIsMCwwLjQsMCwwLjUsMC4xCgkJYzAuMSwwLDAuMywwLDAuNCwwYzAuOSwwLDEuNi0wLjEsMi4xLTAuNHMwLjktMC42LDEuMy0xLjJjMC4zLTAuNSwwLjYtMS4yLDAuOC0yYzAuMi0wLjgsMC4zLTEuNSwwLjMtMi4xYzAtMC44LTAuMi0xLjUtMC41LTIuMQoJCWMtMC40LTAuNS0xLTAuOC0xLjgtMC44Yy0wLjQsMC0wLjcsMC4xLTAuOCwwLjNjLTAuMSwwLjItMC4zLDAuNS0wLjQsMUwtMjI4LjUsNTg0LjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTIxNS44LDU5NS42bDEtNi43bDAuOCwwLjFjMC4xLDEsMC4xLDEuNywwLjIsMi4xYzAuMiwwLjcsMC41LDEuNCwwLjksMS45YzAuNCwwLjUsMC45LDAuOSwxLjQsMS4yCgkJYzAuNSwwLjMsMS4xLDAuNCwxLjcsMC40YzEuMSwwLDEuOS0wLjQsMi41LTEuMWMwLjYtMC44LDAuOS0xLjcsMC45LTIuN2MwLTEuMy0xLjEtMi45LTMuMy00LjhjLTIuMi0yLTMuMy0zLjktMy4zLTUuNgoJCWMwLTEuNiwwLjUtMywxLjQtNC4xYzEtMS4xLDIuMy0xLjcsNC0xLjdjMC41LDAsMSwwLjEsMS41LDAuMmMwLjMsMC4xLDAuNiwwLjIsMC45LDAuMmwwLjcsMC4yYzAuMSwwLDAuMywwLjEsMC41LDAuMQoJCWMwLjIsMCwwLjMsMC4xLDAuNCwwLjFjMC4zLDAsMC42LTAuMSwwLjctMC4yczAuMy0wLjMsMC40LTAuNWgwLjhsLTEuMSw2bC0wLjctMC4xbC0wLjEtMWMtMC4xLTAuOS0wLjQtMS43LTAuOC0yLjQKCQljLTAuNi0xLTEuNS0xLjYtMi43LTEuNmMtMSwwLTEuOCwwLjQtMi4yLDEuM2MtMC4zLDAuNi0wLjUsMS4yLTAuNSwxLjhjMCwwLjcsMC4yLDEuMywwLjUsMS44YzAuMiwwLjMsMC41LDAuNiwwLjgsMWwyLjMsMi4xCgkJYzAuOCwwLjgsMS41LDEuNiwyLjEsMi42YzAuNiwxLDAuOSwyLjEsMC45LDMuM2MwLDEuNi0wLjYsMy0xLjcsNC4zYy0xLjEsMS4zLTIuNiwxLjktNC42LDEuOWMtMC41LDAtMS0wLjEtMS41LTAuMgoJCWMtMC41LTAuMS0xLTAuMi0xLjUtMC40bC0wLjctMC4zYy0wLjItMC4xLTAuNC0wLjItMC41LTAuMmMtMC4xLDAtMC4yLDAtMC4zLDBjLTAuMywwLTAuNSwwLjEtMC42LDAuMnMtMC4zLDAuNC0wLjQsMC44SC0yMTUuOHoiCgkJLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjAzLDU5NC4zYzAuNi0wLjEsMS4xLTAuMywxLjQtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuMy0xMy41YzAuMS0wLjMsMC4xLTAuNywwLjItMC45CgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC40LTFjLTAuMi0wLjEtMC44LTAuMi0xLjYtMC4zVjU3NWgxNC40bC0xLjEsNS43bC0wLjctMC4xYzAtMS41LTAuMi0yLjUtMC42LTMuMQoJCWMtMC43LTEtMi4xLTEuNS00LjEtMS41Yy0wLjcsMC0xLjIsMC4xLTEuNCwwLjNjLTAuMiwwLjItMC40LDAuNS0wLjUsMS4xbC0xLjYsNi43YzEuOSwwLDMuMS0wLjIsMy42LTAuNXMxLjItMS4yLDEuOC0yLjdsMC43LDAuMQoJCWwtMiw4LjJsLTAuNy0wLjFjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS4xLTAuMy0xLjgtMC44LTIuMmMtMC41LTAuNC0xLjUtMC42LTMuMS0wLjZsLTEuOCw3LjMKCQljMCwwLjItMC4xLDAuMy0wLjEsMC41czAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4zLDAuN2MwLjIsMC4yLDAuNiwwLjMsMS4yLDAuM2MxLjYsMCwzLTAuMyw0LjEtMC44YzEuOC0wLjgsMy4yLTIuMiw0LjEtNC4yCgkJbDAuNywwLjFsLTEuNiw1LjhILTIwM1Y1OTQuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTcxLjQsNTc0LjljMSwwLjMsMS41LDAuNCwxLjcsMC40YzAuMywwLDAuNS0wLjEsMC42LTAuMmMwLjEtMC4yLDAuMy0wLjQsMC40LTAuNmgwLjhsLTEuNCw3bC0wLjgtMC4yCgkJYzAtMC40LDAtMC43LDAtMC43YzAtMC4xLDAtMC4yLDAtMC4zYzAtMS42LTAuMy0yLjgtMS0zLjVjLTAuNy0wLjgtMS41LTEuMi0yLjUtMS4yYy0yLjEsMC0zLjksMS41LTUuNCw0LjYKCQljLTEuNCwyLjgtMi4xLDUuNi0yLjEsOC40YzAsMi4xLDAuNCwzLjUsMS4zLDQuM2MwLjgsMC44LDEuOCwxLjIsMi44LDEuMmMxLjMsMCwyLjUtMC41LDMuNy0xLjVjMC42LTAuNSwxLjMtMS4yLDEuOS0yLjFsMC44LDAuNwoJCWMtMC45LDEuNS0yLDIuNy0zLjMsMy40Yy0xLjMsMC43LTIuNiwxLjEtMy45LDEuMWMtMi4xLDAtMy45LTAuNy01LjMtMi4xYy0xLjQtMS40LTIuMS0zLjMtMi4xLTUuN2MwLTMuNiwxLjEtNi43LDMuMi05LjQKCQljMi4xLTIuNyw0LjctNCw3LjYtNEMtMTczLjMsNTc0LjUtMTcyLjMsNTc0LjYtMTcxLjQsNTc0Ljl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE2OS43LDU5NC4zYzAuNi0wLjEsMS4xLTAuMywxLjQtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuMy0xMy41YzAuMS0wLjMsMC4xLTAuNSwwLjItMC43CgkJYzAuMS0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuNC0wLjlzLTAuOC0wLjItMS42LTAuM1Y1NzVoNy4zYzEuNiwwLDIuOSwwLjIsMy44LDAuNWMxLjcsMC43LDIuNSwxLjksMi41LDMuOAoJCWMwLDAuNi0wLjEsMS4zLTAuNCwycy0wLjcsMS40LTEuNCwxLjljLTAuNSwwLjQtMSwwLjctMS42LDFjLTAuNCwwLjEtMC45LDAuMy0xLjcsMC41YzAuMSwwLjMsMC4xLDAuNSwwLjIsMC42bDIuMSw2LjgKCQljMC4zLDAuOSwwLjYsMS41LDAuOSwxLjdjMC4zLDAuMiwwLjgsMC40LDEuNSwwLjR2MC44aC01LjRsLTIuOS05LjloLTAuN2wtMS42LDYuMmwtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjNzMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOSwwLjMsMWMwLjIsMC4xLDAuOCwwLjIsMS42LDAuM3YwLjhoLThWNTk0LjN6IE0tMTU5LjUsNTgzLjljMC44LTAuMiwxLjUtMC42LDEuOS0xLjFjMC4zLTAuNCwwLjYtMC45LDAuOS0xLjYKCQljMC4zLTAuNywwLjQtMS41LDAuNC0yLjNjMC0wLjgtMC4yLTEuNS0wLjYtMi4xYy0wLjQtMC42LTEtMC44LTEuOS0wLjhjLTAuNCwwLTAuNiwwLjEtMC44LDAuM2MtMC4yLDAuMi0wLjMsMC41LTAuNCwxLjFsLTEuNiw2LjkKCQlDLTE2MC42LDU4NC4xLTE1OS45LDU4NC0xNTkuNSw1ODMuOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTUzLDU5NC4zYzAuNi0wLjEsMS4xLTAuMywxLjQtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuMy0xMy41YzAuMS0wLjMsMC4xLTAuNywwLjItMC45CgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC40LTFjLTAuMi0wLjEtMC44LTAuMi0xLjYtMC4zVjU3NWgxNC40bC0xLjEsNS43bC0wLjctMC4xYzAtMS41LTAuMi0yLjUtMC42LTMuMQoJCWMtMC43LTEtMi4xLTEuNS00LjEtMS41Yy0wLjcsMC0xLjIsMC4xLTEuNCwwLjNjLTAuMiwwLjItMC40LDAuNS0wLjUsMS4xbC0xLjYsNi43YzEuOSwwLDMuMS0wLjIsMy42LTAuNXMxLjItMS4yLDEuOC0yLjdsMC43LDAuMQoJCWwtMiw4LjJsLTAuNy0wLjFjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS4xLTAuMy0xLjgtMC44LTIuMmMtMC41LTAuNC0xLjUtMC42LTMuMS0wLjZsLTEuOCw3LjMKCQljMCwwLjItMC4xLDAuMy0wLjEsMC41YzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4zLDAuN3MwLjYsMC4zLDEuMiwwLjNjMS42LDAsMy0wLjMsNC4xLTAuOGMxLjgtMC44LDMuMi0yLjIsNC4yLTQuMgoJCWwwLjcsMC4xbC0xLjYsNS44SC0xNTNWNTk0LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTEzNC41LDU5NC4zYzAuOCwwLDEuNC0wLjEsMS43LTAuM2MwLjUtMC4zLDAuOS0wLjksMS4xLTEuOWwzLjktMTYuMWMtMS4zLDAtMi41LDAuMy0zLjQsMS4xCgkJYy0wLjksMC43LTEuNywxLjgtMi4zLDMuMmwtMC43LTAuMmwxLTUuMWgxNC43bC0xLDUuOGwtMC43LTAuMWMwLTItMC41LTMuMy0xLjUtNGMtMC41LTAuNC0xLjMtMC42LTIuMi0wLjZsLTMuNywxNS4zbC0wLjIsMQoJCWMwLDAuMSwwLDAuMi0wLjEsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC40LDFjMC4zLDAuMSwwLjksMC4yLDEuOCwwLjN2MC44aC04LjhWNTk0LjN6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q3IiBkPSJNLTExMy41LDY3My41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LDY3MS4zLTExMC43LDY3My41LTExMy41LDY3My41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0xMTMuNSw2NzRoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMtMTA4LDY3MS41LTExMC41LDY3NC0xMTMuNSw2NzR6IE0tMjczLjUsNjMzYy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVILTI3My41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0OSIgZD0iTS0yMzEsNjQzdjAuOGMtMS4xLDAtMS45LDAuMS0yLjQsMC4yYy0wLjcsMC4yLTEuMSwwLjUtMS4xLDEuMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2wyLjMsMTEuOQoJCWw4LjYtOWMwLjctMC43LDEuMy0xLjQsMS44LTIuMWMwLjUtMC43LDAuOC0xLjMsMC44LTEuN3MtMC4zLTAuNy0wLjgtMC44Yy0wLjQtMC4xLTEtMC4xLTIuMS0wLjFWNjQzaDguN3YwLjgKCQljLTAuNywwLjEtMS4yLDAuMy0xLjYsMC41Yy0wLjYsMC4zLTEuMiwwLjgtMS44LDEuNGwtMTcuMSwxOGgtMS40bC0zLjQtMTUuM2MtMC41LTIuMi0wLjktMy41LTEuMy0zLjljLTAuMy0wLjQtMS4zLTAuNi0yLjgtMC43CgkJVjY0M0gtMjMxeiIvPgoJPHBhdGggY2xhc3M9InN0OSIgZD0iTS0yMTEuNiw2NDcuMWM0LTMuMSw4LjQtNC42LDEzLjMtNC42YzMuMywwLDUuOSwwLjYsOCwyYzIuMSwxLjMsMy4xLDMuMSwzLjEsNS4zYzAsMy4yLTEuOSw2LjMtNS42LDkuMgoJCWMtNCwzLjEtOC41LDQuNy0xMy42LDQuN2MtMy4yLDAtNS45LTAuNy03LjktMmMtMi0xLjMtMy0zLTMtNS4yQy0yMTcuMyw2NTMuMS0yMTUuNCw2NTAtMjExLjYsNjQ3LjF6IE0tMjEwLjIsNjYwLjgKCQljMC43LDEuMiwyLDEuOCwzLjksMS44YzEuOCwwLDMuNC0wLjQsNC45LTEuM2MxLjUtMC45LDMtMi41LDQuNS01YzEtMS42LDEuOC0zLjIsMi4zLTQuOWMwLjYtMS43LDAuOC0zLjEsMC44LTQuMgoJCWMwLTEtMC40LTEuOS0xLjEtMi42Yy0wLjgtMC43LTEuOS0xLjEtMy41LTEuMWMtMy44LDAtNi45LDIuMi05LjUsNi42Yy0xLjksMy40LTIuOSw2LjItMi45LDguNAoJCUMtMjEwLjcsNjU5LjQtMjEwLjYsNjYwLjEtMjEwLjIsNjYwLjh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q5IiBkPSJNLTE4OC43LDY2Mi4zYzEuMS0wLjEsMS45LTAuMywyLjQtMC41YzAuNS0wLjMsMC45LTAuOCwxLjMtMS42bDUuNi0xMy41YzAuMi0wLjQsMC4zLTAuNywwLjQtMQoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjItMC44LTAuNi0xYy0wLjQtMC4xLTEuMy0wLjItMi43LTAuM1Y2NDNoMTMuNXYwLjhjLTEuMSwwLjEtMS45LDAuMy0yLjQsMC41cy0wLjksMC44LTEuMiwxLjYKCQlsLTUuNiwxMy41bC0wLjQsMWMwLDAuMS0wLjEsMC4yLTAuMSwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4yLDAuOCwwLjYsMWMwLjQsMC4xLDEuMywwLjIsMi43LDAuM3YwLjhoLTEzLjVWNjYyLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q5IiBkPSJNLTE3My41LDY2Mi4zYzEtMC4xLDEuNy0wLjIsMi4xLTAuNGMwLjctMC4zLDEuMi0wLjksMS42LTEuN2w1LjYtMTMuNWMwLjItMC40LDAuMy0wLjcsMC40LTFzMC4xLTAuNSwwLjEtMC43CgkJYzAtMC41LTAuMi0wLjgtMC42LTFjLTAuNC0wLjEtMS4zLTAuMi0yLjctMC4zVjY0M2gxMy4xYzQuNCwwLDcuOCwwLjgsMTAuMiwyLjNjMi4zLDEuNSwzLjUsMy41LDMuNSw2LjFjMCwzLjEtMS43LDUuNy01LjIsOAoJCWMtMy44LDIuNS04LjgsMy44LTE1LDMuOGgtMTNWNjYyLjN6IE0tMTQ4LjEsNjQ1LjljLTEuMi0xLjMtMy4yLTItNi4xLTJjLTEsMC0xLjYsMC4xLTIsMC4zYy0wLjMsMC4yLTAuNiwwLjUtMC43LDAuOGwtNi4yLDE1LjEKCQljLTAuMSwwLjEtMC4xLDAuMy0wLjEsMC40YzAsMC4xLDAsMC4yLDAsMC4zYzAsMC40LDAuMiwwLjcsMC41LDAuOGMwLjQsMC4yLDEsMC4zLDIsMC4zYzUuNCwwLDkuMy0xLjgsMTEuNy01LjUKCQljMS41LTIuMiwyLjItNC42LDIuMi03LjFDLTE0Ni45LDY0OC0xNDcuMyw2NDYuOC0xNDguMSw2NDUuOXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDEwIiBkPSJNLTExMy41LTM0Ni41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LTM0OC43LTExMC43LTM0Ni41LTExMy41LTM0Ni41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0OSIgZD0iTS0xMTMuNS0zNDZoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMtMTA4LTM0OC41LTExMC41LTM0Ni0xMTMuNS0zNDZ6IE0tMjczLjUtMzg3Yy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVILTI3My41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0yNjcuMi0zNTguN2MwLjUtMC4xLDAuOS0wLjQsMS4yLTAuOWMwLjItMC41LDAuNS0xLjcsMC45LTMuNmwyLjMtMTIuMWwtMC4xLTAuM2MtMC4yLTAuNS0wLjQtMC45LTAuNi0xLjEKCQljLTAuMi0wLjEtMC41LTAuMi0xLTAuMnYtMC44aDQuMmw0LjUsMTMuNmwxLjYtOC4zYzAuMS0wLjUsMC4yLTEsMC4yLTEuNGMwLjEtMC42LDAuMS0xLjEsMC4xLTEuM2MwLTAuNy0wLjItMS4yLTAuNS0xLjUKCQljLTAuMi0wLjItMC42LTAuMy0xLjEtMC4zdi0wLjhoNC4ydjAuOGwtMC4zLDAuMWMtMC40LDAuMS0wLjgsMC40LTEsMWMtMC4yLDAuNi0wLjUsMS43LTAuOCwzLjRsLTIuOSwxNWgtMC41bC01LjQtMTYuM2wtMi4xLDEwLjYKCQljLTAuMiwwLjktMC4zLDEuNS0wLjMsMmMwLDAuMy0wLjEsMC41LTAuMSwwLjhjMCwwLjcsMC4yLDEuMiwwLjUsMS40YzAuMiwwLjIsMC42LDAuMywxLjEsMC4zdjAuOGgtNC4zVi0zNTguN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik0tMjQ5LjUtMzczLjdjMS44LTMsMy44LTQuNSw2LjEtNC41YzEuNSwwLDIuNywwLjYsMy43LDEuOXMxLjQsMywxLjQsNS4yYzAsMy4yLTAuOCw2LjItMi41LDkuMQoJCWMtMS44LDMuMS0zLjksNC42LTYuMiw0LjZjLTEuNSwwLTIuNy0wLjYtMy42LTEuOWMtMC45LTEuMy0xLjQtMy0xLjQtNS4xQy0yNTIuMS0zNjcuNy0yNTEuMi0zNzAuOC0yNDkuNS0zNzMuN3ogTS0yNDguOS0zNjAuMgoJCWMwLjMsMS4yLDAuOSwxLjgsMS44LDEuOGMwLjgsMCwxLjYtMC40LDIuMi0xLjNjMC43LTAuOSwxLjQtMi41LDIuMS00LjljMC41LTEuNSwwLjgtMy4xLDEuMS00LjhjMC4zLTEuNywwLjQtMy4xLDAuNC00LjEKCQljMC0xLTAuMi0xLjgtMC41LTIuNWMtMC4zLTAuNy0wLjktMS4xLTEuNi0xLjFjLTEuNywwLTMuMiwyLjItNC4zLDYuNWMtMC45LDMuMy0xLjMsNi4xLTEuMyw4LjMKCQlDLTI0OS4xLTM2MS41LTI0OS0zNjAuOC0yNDguOS0zNjAuMnoiLz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik0tMjM3LjgtMzU4LjdjMC42LDAsMS4xLTAuMSwxLjMtMC4zYzAuNC0wLjMsMC43LTAuOSwwLjgtMS44bDMtMTUuOWMtMSwwLTEuOSwwLjMtMi42LDEuMQoJCWMtMC43LDAuNy0xLjMsMS44LTEuOCwzLjJsLTAuNS0wLjJsMC44LTVoMTEuNGwtMC43LDUuN2wtMC41LTAuMWMwLTEuOS0wLjQtMy4yLTEuMS0zLjljLTAuNC0wLjQtMS0wLjYtMS43LTAuNmwtMi45LDE1LjFsLTAuMiwxCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDFjMC4yLDAuMSwwLjcsMC4yLDEuNCwwLjN2MC44aC02LjhWLTM1OC43eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0yMjQuNC0zNTguN2MwLjQtMC4yLDAuNy0wLjMsMC44LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC45LTEuNmw3LjctMTcuNGgwLjVsMiwxNi45YzAuMSwxLjEsMC4zLDEuOCwwLjUsMi4xCgkJYzAuMiwwLjMsMC42LDAuNCwxLjIsMC41djAuN2gtNi4zdi0wLjdjMC42LTAuMSwxLTAuMiwxLjMtMC40czAuNC0wLjYsMC40LTEuM2MwLTAuMiwwLTAuNy0wLjEtMS42YzAtMC4yLTAuMS0wLjktMC4yLTIuMWgtNC41CgkJbC0xLjIsM2MtMC4xLDAuMi0wLjIsMC40LTAuMiwwLjdjLTAuMSwwLjItMC4xLDAuNS0wLjEsMC43YzAsMC40LDAuMSwwLjcsMC4zLDAuOGMwLjIsMC4xLDAuNSwwLjIsMS4xLDAuM3YwLjdoLTQuMVYtMzU4Ljd6CgkJIE0tMjE1LjktMzY1LjNsLTAuOC03LjJsLTMuMSw3LjJILTIxNS45eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0yMTEtMzU4LjdjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi41LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMS0wLjkKCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjktMC40LTFjLTAuMi0wLjEtMC41LTAuMi0xLjEtMC4ydi0wLjhoNS45YzEsMCwxLjgsMC4yLDIuNSwwLjZjMS4zLDAuNywxLjksMi4xLDEuOSw0CgkJYzAsMS44LTAuNSwzLjItMS41LDQuMmMtMSwxLjEtMi40LDEuNi00LDEuNmMtMC4yLDAtMC40LDAtMC42LDBzLTAuNSwwLTEuMi0wLjFsLTEuMSw1LjlsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDAuOWMwLjIsMC4xLDAuNiwwLjIsMS4yLDAuM3YwLjhoLTYuMVYtMzU4Ljd6IE0tMjA0LjktMzY4LjRjMC4xLDAsMC4zLDAsMC40LDAuMQoJCWMwLjEsMCwwLjIsMCwwLjMsMGMwLjcsMCwxLjItMC4xLDEuNi0wLjRjMC40LTAuMiwwLjctMC42LDEtMS4yYzAuMy0wLjUsMC41LTEuMiwwLjYtMnMwLjItMS41LDAuMi0yYzAtMC44LTAuMS0xLjUtMC40LTIKCQljLTAuMy0wLjUtMC43LTAuOC0xLjQtMC44Yy0wLjMsMC0wLjUsMC4xLTAuNywwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjMsMUwtMjA0LjktMzY4LjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNLTE5OS4zLTM1OC43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjEtMC45CgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC45LTAuNC0xYy0wLjItMC4xLTAuNS0wLjItMS4xLTAuMnYtMC44aDUuOWMxLDAsMS44LDAuMiwyLjUsMC42YzEuMywwLjcsMS45LDIuMSwxLjksNAoJCWMwLDEuOC0wLjUsMy4yLTEuNSw0LjJjLTEsMS4xLTIuNCwxLjYtNCwxLjZjLTAuMiwwLTAuNCwwLTAuNiwwcy0wLjUsMC0xLjItMC4xbC0xLjEsNS45bC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuMwoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywwLjljMC4yLDAuMSwwLjYsMC4yLDEuMiwwLjN2MC44aC02LjFWLTM1OC43eiBNLTE5My4yLTM2OC40YzAuMSwwLDAuMywwLDAuNCwwLjEKCQljMC4xLDAsMC4yLDAsMC4zLDBjMC43LDAsMS4yLTAuMSwxLjYtMC40YzAuNC0wLjIsMC43LTAuNiwxLTEuMmMwLjMtMC41LDAuNS0xLjIsMC42LTJzMC4yLTEuNSwwLjItMmMwLTAuOC0wLjEtMS41LTAuNC0yCgkJYy0wLjMtMC41LTAuNy0wLjgtMS40LTAuOGMtMC4zLDAtMC41LDAuMS0wLjcsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDFMLTE5My4yLTM2OC40eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0xODcuNi0zNTguN2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjUtMTMuMmMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCWMwLjEtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDUuN2MxLjMsMCwyLjMsMC4yLDMsMC41YzEuMywwLjcsMS45LDEuOSwxLjksMy43CgkJYzAsMC42LTAuMSwxLjMtMC4zLDJzLTAuNiwxLjMtMS4xLDEuOWMtMC40LDAuNC0wLjgsMC43LTEuMywxYy0wLjMsMC4xLTAuNywwLjMtMS4zLDAuNWMwLjEsMC4zLDAuMSwwLjUsMC4xLDAuNmwxLjYsNi43CgkJYzAuMiwwLjksMC40LDEuNSwwLjcsMS43YzAuMiwwLjIsMC42LDAuNCwxLjEsMC40djAuOGgtNC4ybC0yLjItOS44aC0wLjZsLTEuMiw2LjFsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC41LDAuMSwwLjksMC4zLDFzMC42LDAuMiwxLjIsMC4zdjAuOGgtNi4yVi0zNTguN3ogTS0xNzkuNy0zNjguOWMwLjYtMC4yLDEuMS0wLjYsMS41LTEuMWMwLjItMC40LDAuNS0wLjksMC43LTEuNgoJCWMwLjItMC43LDAuMy0xLjQsMC4zLTIuM2MwLTAuOC0wLjEtMS41LTAuNC0yLjFjLTAuMy0wLjUtMC44LTAuOC0xLjUtMC44Yy0wLjMsMC0wLjUsMC4xLTAuNiwwLjNzLTAuMiwwLjUtMC4zLDFsLTEuMiw2LjgKCQlDLTE4MC42LTM2OC43LTE4MC4xLTM2OC44LTE3OS43LTM2OC45eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0xNzEtMzczLjdjMS44LTMsMy44LTQuNSw2LjEtNC41YzEuNSwwLDIuNywwLjYsMy43LDEuOXMxLjQsMywxLjQsNS4yYzAsMy4yLTAuOCw2LjItMi41LDkuMQoJCWMtMS44LDMuMS0zLjksNC42LTYuMiw0LjZjLTEuNSwwLTIuNy0wLjYtMy42LTEuOXMtMS40LTMtMS40LTUuMUMtMTczLjYtMzY3LjctMTcyLjctMzcwLjgtMTcxLTM3My43eiBNLTE3MC4zLTM2MC4yCgkJYzAuMywxLjIsMC45LDEuOCwxLjgsMS44YzAuOCwwLDEuNi0wLjQsMi4yLTEuM2MwLjctMC45LDEuNC0yLjUsMi4xLTQuOWMwLjUtMS41LDAuOC0zLjEsMS4xLTQuOGMwLjMtMS43LDAuNC0zLjEsMC40LTQuMQoJCWMwLTEtMC4yLTEuOC0wLjUtMi41Yy0wLjMtMC43LTAuOS0xLjEtMS42LTEuMWMtMS43LDAtMy4yLDIuMi00LjMsNi41Yy0wLjksMy4zLTEuMyw2LjEtMS4zLDguMwoJCUMtMTcwLjYtMzYxLjUtMTcwLjUtMzYwLjgtMTcwLjMtMzYwLjJ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNLTE1Mi45LTM3Ny43djAuOGMtMC41LDAtMC45LDAuMS0xLjEsMC4yYy0wLjMsMC4yLTAuNSwwLjUtMC41LDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQlsMS4xLDExLjhsMy45LTguOGMwLjMtMC43LDAuNi0xLjQsMC44LTIuMWMwLjItMC43LDAuNC0xLjMsMC40LTEuN2MwLTAuNC0wLjEtMC43LTAuNC0wLjhjLTAuMi0wLjEtMC41LTAuMS0wLjktMC4xdi0wLjhoNHYwLjgKCQljLTAuMywwLjEtMC42LDAuMy0wLjcsMC40Yy0wLjMsMC4zLTAuNSwwLjctMC44LDEuNGwtNy44LDE3LjdoLTAuN2wtMS42LTE1Yy0wLjItMi4xLTAuNC0zLjQtMC42LTMuOGMtMC4yLTAuNC0wLjYtMC42LTEuMy0wLjcKCQl2LTAuOEgtMTUyLjl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNLTE0Ny43LTM1OC43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjItMC4zdi0wLjhoMTEuMWwtMC45LDUuNmwtMC42LTAuMWMwLTEuNC0wLjItMi40LTAuNS0zCgkJYy0wLjUtMS0xLjYtMS41LTMuMi0xLjVjLTAuNSwwLTAuOSwwLjEtMS4xLDAuM3MtMC4zLDAuNS0wLjQsMS4xbC0xLjIsNi42YzEuNCwwLDIuNC0wLjIsMi44LTAuNXMwLjktMS4yLDEuNC0yLjZsMC42LDAuMQoJCWwtMS41LDguMWwtMC42LTAuMWMwLTAuMywwLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNi0yLjFjLTAuNC0wLjQtMS4yLTAuNi0yLjQtMC42bC0xLjQsNy4yCgkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4xLDAuMiwwLjUsMC4zLDAuOSwwLjNjMS4zLDAsMi4zLTAuMiwzLjItMC43CgkJYzEuNC0wLjgsMi40LTIuMiwzLjItNC4ybDAuNSwwLjFsLTEuMiw1LjdoLTExLjRWLTM1OC43eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0xMzUtMzU4LjdjMC41LTAuMSwwLjgtMC4yLDEtMC40YzAuMy0wLjMsMC42LTAuOSwwLjctMS43bDIuNS0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjItMC45czAuMS0wLjUsMC4xLTAuNwoJCWMwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjItMC4zdi0wLjhoNmMyLDAsMy42LDAuNyw0LjYsMi4yYzEuMSwxLjUsMS42LDMuNSwxLjYsNmMwLDMtMC44LDUuNi0yLjMsNy44CgkJYy0xLjcsMi41LTQsMy43LTYuOSwzLjdoLTUuOVYtMzU4Ljd6IE0tMTIzLjQtMzc0LjhjLTAuNS0xLjMtMS41LTItMi44LTJjLTAuNCwwLTAuNywwLjEtMC45LDAuM2MtMC4yLDAuMi0wLjMsMC41LTAuMywwLjgKCQlsLTIuOCwxNC45YzAsMC4xLDAsMC4zLTAuMSwwLjRjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjQsMC4xLDAuNywwLjIsMC44YzAuMiwwLjIsMC41LDAuMywwLjksMC4zYzIuNSwwLDQuMi0xLjgsNS4zLTUuNAoJCWMwLjctMi4yLDEtNC41LDEtNi45Qy0xMjIuOS0zNzIuOC0xMjMtMzczLjktMTIzLjQtMzc0Ljh6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTExMy41LTI3OC41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDLTEwOC41LTI4MC43LTExMC43LTI3OC41LTExMy41LTI3OC41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NiIgZD0iTS0xMTMuNS0yNzhoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMtMTA4LTI4MC41LTExMC41LTI3OC0xMTMuNS0yNzh6IE0tMjczLjUtMzE5Yy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVILTI3My41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0yNDYuOC0yODguN2MwLjktMC4yLDEuNS0wLjQsMS45LTAuNmMwLjYtMC4zLDEuMy0wLjksMi0xLjhsMTcuNC0yMC42aDEuMmw0LjUsMjBjMC4zLDEuMywwLjcsMi4yLDEuMSwyLjUKCQljMC40LDAuMywxLjQsMC41LDIuOCwwLjZ2MC44aC0xNC4ydi0wLjhjMS4zLTAuMSwyLjMtMC4yLDIuOS0wLjVzMC44LTAuOCwwLjgtMS41YzAtMC4zLTAuMS0wLjktMC4zLTEuOWMwLTAuMi0wLjItMS4xLTAuNS0yLjUKCQloLTEwLjFsLTIuNywzLjZjLTAuMiwwLjItMC4zLDAuNS0wLjUsMC44Yy0wLjEsMC4zLTAuMiwwLjYtMC4yLDAuOGMwLDAuNSwwLjIsMC44LDAuNiwwLjljMC40LDAuMSwxLjIsMC4zLDIuNCwwLjR2MC44aC05LjIKCQlWLTI4OC43eiBNLTIyNy40LTI5Ni41bC0xLjctOC41bC02LjksOC41SC0yMjcuNHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMjE0LjgtMjg3LjJsMS43LTcuOGwxLjQsMC4xYzAuMSwxLjEsMC4yLDEuOSwwLjQsMi40YzAuMywwLjksMC44LDEuNiwxLjYsMi4zYzAuNywwLjYsMS41LDEuMSwyLjQsMS40CgkJYzAuOSwwLjMsMS45LDAuNSwyLjksMC41YzEuOSwwLDMuMy0wLjQsNC40LTEuM3MxLjUtMS45LDEuNS0zLjFjMC0xLjUtMS45LTMuMy01LjctNS42Yy0zLjgtMi4zLTUuNy00LjUtNS43LTYuNQoJCWMwLTEuOSwwLjgtMy41LDIuNS00LjhjMS43LTEuMyw0LTIsNy4xLTJjMC44LDAsMS43LDAuMSwyLjYsMC4yYzAuNiwwLjEsMS4xLDAuMiwxLjUsMC4zbDEuMiwwLjNjMC4zLDAuMSwwLjUsMC4xLDAuOCwwLjEKCQljMC4zLDAsMC41LDAuMSwwLjcsMC4xYzAuNSwwLDEtMC4xLDEuMy0wLjNjMC4zLTAuMiwwLjUtMC40LDAuOC0wLjZoMS40bC0xLjksN2wtMS4yLTAuMWwtMC4yLTEuMWMtMC4yLTEuMS0wLjYtMi0xLjQtMi44CgkJYy0xLjEtMS4yLTIuNy0xLjgtNC44LTEuOGMtMS44LDAtMy4xLDAuNS0zLjksMS41Yy0wLjUsMC42LTAuOCwxLjQtMC44LDIuMWMwLDAuOCwwLjMsMS41LDAuOCwyLjFjMC4zLDAuMywwLjgsMC43LDEuNCwxLjFsNCwyLjUKCQljMS40LDAuOSwyLjcsMS45LDMuNywzYzEsMS4xLDEuNSwyLjQsMS41LDMuOGMwLDEuOC0xLDMuNS0yLjksNWMtMS45LDEuNS00LjYsMi4yLTgsMi4yYy0wLjksMC0xLjctMC4xLTIuNi0wLjIKCQljLTAuOS0wLjEtMS43LTAuMy0yLjYtMC41bC0xLjItMC4zYy0wLjQtMC4xLTAuNy0wLjItMC44LTAuMmMtMC4yLDAtMC4zLDAtMC41LDBjLTAuNSwwLTAuOSwwLjEtMS4xLDAuM2MtMC4yLDAuMi0wLjUsMC41LTAuNywxCgkJSC0yMTQuOHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tMTgyLjQtMjg4LjhjMS4xLTAuMSwxLjktMC4zLDIuNS0wLjZjMC41LTAuMywxLTAuOSwxLjMtMS45bDUuOC0xNS43YzAuMi0wLjQsMC4zLTAuOCwwLjQtMS4xCgkJczAuMS0wLjYsMC4xLTAuOGMwLTAuNi0wLjItMS0wLjctMS4xYy0wLjQtMC4yLTEuNC0wLjMtMi44LTAuNHYtMC45aDE0djAuOWMtMS4xLDAuMS0yLDAuMy0yLjUsMC42Yy0wLjUsMC4zLTAuOSwwLjktMS4zLDEuOQoJCWwtNS44LDE1LjdsLTAuNCwxLjJjMCwwLjEtMC4xLDAuMi0wLjEsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC42LDAuMiwxLDAuNiwxLjFjMC40LDAuMiwxLjQsMC4zLDIuOCwwLjR2MC45aC0xNFYtMjg4Ljh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTE2NC44LTI4Ny4ybDEuNy03LjhsMS40LDAuMWMwLjEsMS4xLDAuMiwxLjksMC40LDIuNGMwLjMsMC45LDAuOCwxLjYsMS42LDIuM2MwLjcsMC42LDEuNSwxLjEsMi40LDEuNAoJCWMwLjksMC4zLDEuOSwwLjUsMi45LDAuNWMxLjksMCwzLjMtMC40LDQuNC0xLjNjMS0wLjksMS41LTEuOSwxLjUtMy4xYzAtMS41LTEuOS0zLjMtNS43LTUuNmMtMy44LTIuMy01LjctNC41LTUuNy02LjUKCQljMC0xLjksMC44LTMuNSwyLjUtNC44YzEuNy0xLjMsNC0yLDcuMS0yYzAuOCwwLDEuNywwLjEsMi42LDAuMmMwLjYsMC4xLDEuMSwwLjIsMS41LDAuM2wxLjIsMC4zYzAuMywwLjEsMC41LDAuMSwwLjgsMC4xCgkJYzAuMywwLDAuNSwwLjEsMC43LDAuMWMwLjUsMCwxLTAuMSwxLjMtMC4zczAuNS0wLjQsMC44LTAuNmgxLjRsLTEuOSw3bC0xLjItMC4xbC0wLjItMS4xYy0wLjItMS4xLTAuNi0yLTEuNC0yLjgKCQljLTEuMS0xLjItMi43LTEuOC00LjgtMS44Yy0xLjgsMC0zLjEsMC41LTMuOSwxLjVjLTAuNSwwLjYtMC44LDEuNC0wLjgsMi4xYzAsMC44LDAuMywxLjUsMC44LDIuMWMwLjMsMC4zLDAuOCwwLjcsMS40LDEuMWw0LDIuNQoJCWMxLjQsMC45LDIuNywxLjksMy43LDNjMSwxLjEsMS41LDIuNCwxLjUsMy44YzAsMS44LTEsMy41LTIuOSw1Yy0xLjksMS41LTQuNiwyLjItOCwyLjJjLTAuOSwwLTEuNy0wLjEtMi42LTAuMgoJCWMtMC45LTAuMS0xLjctMC4zLTIuNi0wLjVsLTEuMi0wLjNjLTAuNC0wLjEtMC43LTAuMi0wLjgtMC4yYy0wLjIsMC0wLjMsMC0wLjUsMGMtMC41LDAtMC45LDAuMS0xLjEsMC4zYy0wLjIsMC4yLTAuNSwwLjUtMC43LDEKCQlILTE2NC44eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTk4NS41LTM0OS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDOTkwLjUtMzUxLjcsOTg4LjMtMzQ5LjUsOTg1LjUtMzQ5LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTg1LjUtMzkxaC0xNjBjLTMsMC01LjUsMi41LTUuNSw1LjV2MzFjMCwzLDIuNSw1LjUsNS41LDUuNWgxNjBjMywwLDUuNS0yLjUsNS41LTUuNXYtMzEKCQlDOTkxLTM4OC41LDk4OC41LTM5MSw5ODUuNS0zOTF6IE05OTAtMzU0LjVjMCwyLjUtMiw0LjUtNC41LDQuNWgtMTYwYy0yLjUsMC00LjUtMi00LjUtNC41di0zMWMwLTIuNSwyLTQuNSw0LjUtNC41aDE2MAoJCWMyLjUsMCw0LjUsMiw0LjUsNC41Vi0zNTQuNXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NjUuOS0zNzguNWMtMS45LTEuNy00LjgtMi41LTguNS0yLjVoLTExdjAuOWMxLjEsMC4xLDEuOSwwLjIsMi4yLDAuNGMwLjQsMC4xLDAuNSwwLjUsMC41LDEuMQoJCWMwLDAuMiwwLDAuNS0wLjEsMC44Yy0wLjEsMC4zLTAuMiwwLjYtMC4zLDEuMWwtNC43LDE1LjFjLTAuMywxLTAuNywxLjYtMS4zLDJjLTAuMywwLjItMC45LDAuNC0xLjgsMC41djAuOWgxMC45CgkJYzUuMiwwLDkuNC0xLjQsMTIuNi00LjJjMi45LTIuNSw0LjMtNS41LDQuMy04LjlDODY4LjktMzc0LjUsODY3LjktMzc2LjgsODY1LjktMzc4LjV6IE04NjEuNC0zNjUuOGMtMiw0LjEtNS4zLDYuMi05LjgsNi4yCgkJYy0wLjgsMC0xLjMtMC4xLTEuNi0wLjNzLTAuNS0wLjUtMC41LTFjMC0wLjEsMC0wLjIsMC0wLjNjMC0wLjEsMC4xLTAuMywwLjEtMC40bDUuMi0xN2MwLjEtMC40LDAuMy0wLjcsMC42LTAuOQoJCWMwLjMtMC4yLDAuOC0wLjQsMS43LTAuNGMyLjQsMCw0LjIsMC44LDUuMSwyLjNjMC42LDEsMC45LDIuMywwLjksNEM4NjMuMy0zNzEsODYyLjctMzY4LjMsODYxLjQtMzY1Ljh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODkwLjgtMzcxLjdjMC45LTAuNiwxLjYtMS40LDItMi4yYzAuNC0wLjgsMC42LTEuNSwwLjYtMi4yYzAtMi4xLTEuMi0zLjUtMy41LTQuM2MtMS4zLTAuNC0zLjEtMC42LTUuNC0wLjYKCQloLTEwLjR2MC45YzEuMiwwLjEsMS45LDAuMiwyLjIsMC4zYzAuMywwLjEsMC41LDAuNSwwLjUsMWMwLDAuMy0wLjEsMC42LTAuMiwxLjFjLTAuMSwwLjItMC4xLDAuNS0wLjIsMC44bC00LjcsMTUuMQoJCWMtMC4zLDAuOS0wLjYsMS41LTEuMSwxLjhjLTAuNCwwLjMtMS4xLDAuNS0yLDAuNnYwLjloMTEuM3YtMC45Yy0xLjItMC4xLTEuOS0wLjItMi4zLTAuNGMtMC4zLTAuMi0wLjUtMC41LTAuNS0xLjEKCQljMC0wLjEsMC0wLjIsMC0wLjNjMC0wLjEsMC0wLjIsMC4xLTAuM2wwLjMtMS4ybDIuMi03aDEuMWw0LjEsMTEuMWg3LjZ2LTAuOWMtMC45LDAtMS42LTAuMi0yLjEtMC41Yy0wLjUtMC4zLTAuOS0wLjktMS4zLTEuOQoJCWwtMi45LTcuNmMwLTAuMS0wLjEtMC4zLTAuMi0wLjZjMS4xLTAuMiwxLjktMC40LDIuNC0wLjZDODg5LjQtMzcwLjksODkwLjEtMzcxLjMsODkwLjgtMzcxLjd6IE04ODcuMS0zNzQuMQoJCWMtMC40LDAuOC0wLjgsMS40LTEuMiwxLjhjLTAuNiwwLjYtMS41LDEuMS0yLjcsMS4zYy0wLjcsMC4xLTEuNywwLjItMywwLjJsMi4zLTcuN2MwLjItMC42LDAuNC0xLDAuNi0xLjIKCQljMC4yLTAuMiwwLjYtMC4zLDEuMS0wLjNjMS4zLDAsMi4yLDAuMywyLjcsMC45YzAuNSwwLjYsMC44LDEuNCwwLjgsMi4zQzg4Ny42LTM3NS44LDg4Ny40LTM3NC45LDg4Ny4xLTM3NC4xeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkxNS0zNjIuMmwtMy42LTE5LjJoLTFsLTE0LjEsMTkuOGMtMC42LDAuOS0xLjIsMS41LTEuNywxLjhjLTAuMywwLjItMC45LDAuNC0xLjYsMC42djAuOGg3LjV2LTAuOAoJCWMtMS0wLjEtMS43LTAuMi0yLTAuM2MtMC4zLTAuMS0wLjUtMC40LTAuNS0wLjljMC0wLjMsMC4xLTAuNSwwLjItMC44YzAuMS0wLjMsMC4zLTAuNSwwLjQtMC44bDIuMi0zLjRoOC4yCgkJYzAuMiwxLjQsMC4zLDIuMywwLjQsMi40YzAuMSwxLDAuMiwxLjYsMC4yLDEuOGMwLDAuNy0wLjIsMS4yLTAuNywxLjVjLTAuNSwwLjItMS4yLDAuNC0yLjMsMC41djAuOGgxMS41di0wLjgKCQljLTEuMi0wLjEtMS45LTAuMy0yLjMtMC42QzkxNS41LTM2MC4yLDkxNS4yLTM2MSw5MTUtMzYyLjJ6IE05MDEuNy0zNjYuOGw1LjYtOC4ybDEuNCw4LjJIOTAxLjd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTI1LTM4MC4yYzEuMiwwLjEsMS45LDAuMiwyLjIsMC4zczAuNSwwLjUsMC41LDFjMCwwLjMtMC4xLDAuNi0wLjIsMS4xYy0wLjEsMC4yLTAuMSwwLjUtMC4yLDAuOGwtNC43LDE1LjEKCQljLTAuMywwLjktMC42LDEuNS0xLjEsMS44Yy0wLjQsMC4zLTEuMSwwLjUtMiwwLjZ2MC45aDExLjJ2LTAuOWMtMC44LDAtMS40LTAuMS0xLjgtMC4yYy0wLjYtMC4yLTAuOS0wLjctMC45LTEuMwoJCWMwLTAuMSwwLTAuMiwwLTAuNGMwLTAuMSwwLjEtMC4zLDAuMS0wLjRsMi41LTguMmMyLjIsMCwzLjYsMC4yLDQuMiwwLjdjMC43LDAuNSwxLDEuMywxLDIuNGMwLDAuMSwwLDAuMywwLDAuNgoJCWMwLDAuMi0wLjEsMC41LTAuMSwwLjlsMSwwLjJsMi44LTkuMmwtMS4xLTAuMWMtMC45LDEuNi0xLjgsMi42LTIuNiwzcy0yLjQsMC41LTQuOSwwLjZsMi4yLTcuNWMwLjItMC42LDAuNC0xLDAuOC0xLjIKCQljMC4zLTAuMiwwLjktMC4zLDEuOC0wLjNjMi45LDAsNC44LDAuNiw1LjgsMS44YzAuNiwwLjcsMC44LDEuOCwwLjksMy40bDEsMC4xbDEuNi02LjRIOTI1Vi0zODAuMnoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NDcuNi0zNzUuM2wxLDAuMmMwLjktMS42LDItMi44LDMuMy0zLjZjMS4zLTAuOCwzLTEuMiw0LjgtMS4ybC01LjYsMTguMWMtMC4zLDEuMS0wLjksMS44LTEuNiwyLjEKCQljLTAuNCwwLjItMS4yLDAuMy0yLjQsMC4zdjAuOWgxMi42di0wLjljLTEuMy0wLjEtMi4yLTAuMi0yLjYtMC4zYy0wLjQtMC4xLTAuNi0wLjUtMC42LTEuMWMwLTAuMSwwLTAuMiwwLTAuMwoJCWMwLTAuMSwwLTAuMiwwLjEtMC40bDAuMy0xLjJsNS4zLTE3LjJjMS40LDAsMi41LDAuMywzLjIsMC43YzEuMywwLjgsMiwyLjMsMi4xLDQuNWwxLDAuMWwxLjQtNi41aC0yMC45TDk0Ny42LTM3NS4zeiIvPgo8L2c+CjxnPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MyIgZD0iTTk4NS41LTI4NC41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQkJQzk5MC41LTI4Ni43LDk4OC4zLTI4NC41LDk4NS41LTI4NC41eiIvPgoJPC9nPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0NCIgZD0iTTk4NS41LTI4NGgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJCUM5OTEtMjg2LjUsOTg4LjUtMjg0LDk4NS41LTI4NHogTTgyNS41LTMyNWMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCQljMC0yLjUtMi00LjUtNC41LTQuNUg4MjUuNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik04MzAuOC0yOTYuN2MwLjUtMC4yLDEtMC4zLDEuMi0wLjVjMC40LTAuMywwLjgtMC44LDEuMy0xLjZsMTEtMTcuNGgwLjhsMi44LDE2LjljMC4yLDEuMSwwLjQsMS44LDAuNywyLjEKCQkJYzAuMywwLjMsMC45LDAuNCwxLjgsMC41djAuN2gtOXYtMC43YzAuOC0wLjEsMS40LTAuMiwxLjgtMC40YzAuNC0wLjIsMC41LTAuNiwwLjUtMS4zYzAtMC4yLTAuMS0wLjctMC4yLTEuNgoJCQljMC0wLjItMC4xLTAuOS0wLjMtMi4xaC02LjRsLTEuNywzYy0wLjEsMC4yLTAuMiwwLjQtMC4zLDAuN2MtMC4xLDAuMi0wLjEsMC41LTAuMSwwLjdjMCwwLjQsMC4xLDAuNywwLjQsMC44CgkJCWMwLjIsMC4xLDAuOCwwLjIsMS41LDAuM3YwLjdoLTUuOFYtMjk2Ljd6IE04NDMtMzAzLjNsLTEuMS03LjJsLTQuNCw3LjJIODQzeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik04NDkuOS0yOTYuN2MwLjctMC4xLDEuMi0wLjMsMS42LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4yLTAuOQoJCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4yLTAuOS0wLjYtMWMtMC4yLTAuMS0wLjgtMC4yLTEuNi0wLjJ2LTAuOGg4LjVjMS40LDAsMi42LDAuMiwzLjYsMC42YzEuOCwwLjcsMi43LDIuMSwyLjcsNAoJCQljMCwxLjgtMC43LDMuMi0yLjIsNC4yYy0xLjUsMS4xLTMuNCwxLjYtNS43LDEuNmMtMC40LDAtMC42LDAtMC44LDBjLTAuMiwwLTAuOCwwLTEuNy0wLjFsLTEuNiw1LjlsLTAuMiwxYzAsMC4xLDAsMC4yLTAuMSwwLjMKCQkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC40LDAuOWMwLjMsMC4xLDAuOSwwLjIsMS44LDAuM3YwLjhoLTguN1YtMjk2Ljd6IE04NTguNy0zMDYuNGMwLjIsMCwwLjQsMCwwLjUsMC4xCgkJCWMwLjIsMCwwLjMsMCwwLjUsMGMxLDAsMS44LTAuMSwyLjMtMC40czEtMC42LDEuNC0xLjJjMC40LTAuNSwwLjctMS4yLDAuOS0yYzAuMi0wLjgsMC4zLTEuNSwwLjMtMmMwLTAuOC0wLjItMS41LTAuNi0yCgkJCWMtMC40LTAuNS0xLjEtMC44LTItMC44Yy0wLjUsMC0wLjgsMC4xLTAuOSwwLjNjLTAuMiwwLjItMC4zLDAuNS0wLjUsMUw4NTguNy0zMDYuNHoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNODY2LjctMjk2LjdjMC43LTAuMSwxLjItMC4zLDEuNi0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy42LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMi0wLjkKCQkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMi0wLjktMC42LTFjLTAuMi0wLjEtMC44LTAuMi0xLjYtMC4ydi0wLjhoOC41YzEuNCwwLDIuNiwwLjIsMy42LDAuNmMxLjgsMC43LDIuNywyLjEsMi43LDQKCQkJYzAsMS44LTAuNywzLjItMi4yLDQuMmMtMS41LDEuMS0zLjQsMS42LTUuNywxLjZjLTAuNCwwLTAuNiwwLTAuOCwwYy0wLjIsMC0wLjgsMC0xLjctMC4xbC0xLjYsNS45bC0wLjIsMWMwLDAuMSwwLDAuMi0wLjEsMC4zCgkJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuNCwwLjljMC4zLDAuMSwwLjksMC4yLDEuOCwwLjN2MC44aC04LjdWLTI5Ni43eiBNODc1LjQtMzA2LjRjMC4yLDAsMC40LDAsMC41LDAuMQoJCQljMC4yLDAsMC4zLDAsMC41LDBjMSwwLDEuOC0wLjEsMi4zLTAuNHMxLTAuNiwxLjQtMS4yYzAuNC0wLjUsMC43LTEuMiwwLjktMmMwLjItMC44LDAuMy0xLjUsMC4zLTJjMC0wLjgtMC4yLTEuNS0wLjYtMgoJCQljLTAuNC0wLjUtMS4xLTAuOC0yLTAuOGMtMC41LDAtMC44LDAuMS0wLjksMC4zYy0wLjIsMC4yLTAuMywwLjUtMC41LDFMODc1LjQtMzA2LjR6Ii8+CgkJPHBhdGggY2xhc3M9InN0NSIgZD0iTTg4My40LTI5Ni43YzAuNy0wLjEsMS4yLTAuMywxLjYtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuNi0xMy4yYzAuMS0wLjMsMC4xLTAuNSwwLjItMC43CgkJCWMwLjEtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjQtMC45cy0wLjktMC4yLTEuNy0wLjN2LTAuOGg4LjFjMS44LDAsMy4yLDAuMiw0LjIsMC41YzEuOCwwLjcsMi43LDEuOSwyLjcsMy43CgkJCWMwLDAuNi0wLjIsMS4zLTAuNSwycy0wLjgsMS4zLTEuNSwxLjljLTAuNSwwLjQtMS4xLDAuNy0xLjgsMWMtMC40LDAuMS0xLDAuMy0xLjksMC41YzAuMSwwLjMsMC4yLDAuNSwwLjIsMC42bDIuMyw2LjcKCQkJYzAuMywwLjksMC42LDEuNSwxLDEuN2MwLjQsMC4yLDAuOSwwLjQsMS42LDAuNHYwLjhoLTUuOWwtMy4yLTkuOGgtMC44bC0xLjcsNi4xbC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuMwoJCQljMCwwLjUsMC4xLDAuOSwwLjQsMWMwLjMsMC4xLDAuOCwwLjIsMS44LDAuM3YwLjhoLTguOFYtMjk2Ljd6IE04OTQuNy0zMDYuOWMwLjktMC4yLDEuNi0wLjYsMi4xLTEuMWMwLjMtMC40LDAuNy0wLjksMC45LTEuNgoJCQljMC4zLTAuNywwLjQtMS40LDAuNC0yLjNjMC0wLjgtMC4yLTEuNS0wLjYtMi4xYy0wLjQtMC41LTEuMS0wLjgtMi4xLTAuOGMtMC40LDAtMC43LDAuMS0wLjksMC4zYy0wLjIsMC4yLTAuMywwLjUtMC41LDEKCQkJbC0xLjgsNi44Qzg5My40LTMwNi43LDg5NC4yLTMwNi44LDg5NC43LTMwNi45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik05MDcuMi0zMTEuN2MyLjYtMyw1LjUtNC41LDguNi00LjVjMi4xLDAsMy45LDAuNiw1LjIsMS45YzEuNCwxLjMsMiwzLDIsNS4yYzAsMy4yLTEuMiw2LjItMy42LDkuMQoJCQljLTIuNiwzLjEtNS41LDQuNi04LjksNC42Yy0yLjEsMC0zLjgtMC42LTUuMS0xLjljLTEuMy0xLjMtMi0zLTItNS4xQzkwMy41LTMwNS43LDkwNC43LTMwOC44LDkwNy4yLTMxMS43eiBNOTA4LjEtMjk4LjIKCQkJYzAuNSwxLjIsMS4zLDEuOCwyLjYsMS44YzEuMiwwLDIuMi0wLjQsMy4yLTEuM3MxLjktMi41LDMtNC45YzAuNi0xLjUsMS4xLTMuMSwxLjUtNC44YzAuNC0xLjcsMC41LTMuMSwwLjUtNC4xCgkJCWMwLTEtMC4yLTEuOC0wLjctMi41cy0xLjMtMS4xLTIuMy0xLjFjLTIuNSwwLTQuNSwyLjItNi4yLDYuNWMtMS4zLDMuMy0xLjksNi4xLTEuOSw4LjNDOTA3LjctMjk5LjUsOTA3LjgtMjk4LjgsOTA4LjEtMjk4LjJ6Ii8+CgkJPHBhdGggY2xhc3M9InN0NSIgZD0iTTkzMy0zMTUuN3YwLjhjLTAuNywwLTEuMiwwLjEtMS41LDAuMmMtMC41LDAuMi0wLjcsMC41LTAuNywxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zbDEuNSwxMS44CgkJCWw1LjYtOC44YzAuNC0wLjcsMC44LTEuNCwxLjItMi4xYzAuNC0wLjcsMC41LTEuMywwLjUtMS43YzAtMC40LTAuMi0wLjctMC41LTAuOGMtMC4yLTAuMS0wLjctMC4xLTEuNC0wLjF2LTAuOGg1Ljd2MC44CgkJCWMtMC41LDAuMS0wLjgsMC4zLTEsMC40Yy0wLjQsMC4zLTAuOCwwLjctMS4yLDEuNEw5MzAtMjk1LjRoLTAuOWwtMi4yLTE1Yy0wLjMtMi4xLTAuNi0zLjQtMC44LTMuOGMtMC4yLTAuNC0wLjgtMC42LTEuOC0wLjcKCQkJdi0wLjhIOTMzeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik05NDAuMy0yOTYuN2MwLjctMC4xLDEuMi0wLjMsMS42LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTMuMmMwLjEtMC4zLDAuMi0wLjYsMC4yLTAuOQoJCQlzMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC40LTAuOWMtMC4zLTAuMS0wLjgtMC4yLTEuOC0wLjN2LTAuOGgxNS45bC0xLjMsNS42bC0wLjgtMC4xYzAtMS40LTAuMy0yLjQtMC43LTMKCQkJYy0wLjgtMS0yLjMtMS41LTQuNi0xLjVjLTAuOCwwLTEuMywwLjEtMS41LDAuM2MtMC4yLDAuMi0wLjQsMC41LTAuNiwxLjFsLTEuOCw2LjZjMi4xLDAsMy40LTAuMiw0LTAuNXMxLjMtMS4yLDItMi42bDAuOCwwLjEKCQkJbC0yLjIsOC4xbC0wLjgtMC4xYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4zLTEuOC0wLjktMi4xYy0wLjYtMC40LTEuNy0wLjYtMy40LTAuNmwtMS45LDcuMgoJCQljMCwwLjItMC4xLDAuMy0wLjEsMC41YzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4zLDAuN2MwLjIsMC4yLDAuNywwLjMsMS4zLDAuM2MxLjgsMCwzLjMtMC4yLDQuNi0wLjcKCQkJYzItMC44LDMuNS0yLjIsNC42LTQuMmwwLjcsMC4xbC0xLjcsNS43aC0xNi40Vi0yOTYuN3oiLz4KCQk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNOTU4LjYtMjk2LjdjMC42LTAuMSwxLjEtMC4yLDEuNC0wLjRjMC41LTAuMywwLjgtMC45LDEtMS43bDMuNi0xMy4yYzAuMS0wLjQsMC4yLTAuNywwLjItMC45CgkJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOS0wLjItMS43LTAuM3YtMC44aDguNmMyLjksMCw1LjEsMC43LDYuNiwyLjJjMS41LDEuNSwyLjMsMy41LDIuMyw2CgkJCWMwLDMtMS4xLDUuNi0zLjQsNy44Yy0yLjUsMi41LTUuOCwzLjctOS44LDMuN2gtOC41Vi0yOTYuN3ogTTk3NS4yLTMxMi44Yy0wLjgtMS4zLTIuMS0yLTQtMmMtMC42LDAtMS4xLDAuMS0xLjMsMC4zCgkJCWMtMC4yLDAuMi0wLjQsMC41LTAuNSwwLjhsLTQuMSwxNC45YzAsMC4xLTAuMSwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNCwwLjEsMC43LDAuNCwwLjhzMC43LDAuMywxLjMsMC4zCgkJCWMzLjUsMCw2LTEuOCw3LjYtNS40YzEtMi4yLDEuNC00LjUsMS40LTYuOUM5NzUuOS0zMTAuOCw5NzUuNy0zMTEuOSw5NzUuMi0zMTIuOHoiLz4KCTwvZz4KPC9nPgo8Zz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik05ODUuNS04Mi41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQkJQzk5MC41LTg0LjcsOTg4LjMtODIuNSw5ODUuNS04Mi41eiIvPgoJPC9nPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0NCIgZD0iTTk4NS41LTgyaC0xNjBjLTMsMC01LjUtMi41LTUuNS01LjV2LTMxYzAtMywyLjUtNS41LDUuNS01LjVoMTYwYzMsMCw1LjUsMi41LDUuNSw1LjV2MzEKCQkJQzk5MS04NC41LDk4OC41LTgyLDk4NS41LTgyeiBNODI1LjUtMTIzYy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJCWMwLTIuNS0yLTQuNS00LjUtNC41SDgyNS41eiIvPgoJPC9nPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0NSIgZD0iTTg0NS44LTExMy44YzAuOSwwLjMsMS41LDAuNCwxLjcsMC40YzAuMywwLDAuNS0wLjEsMC42LTAuMmMwLjEtMC4yLDAuMy0wLjQsMC40LTAuNmgwLjhsLTEuMyw2LjlsLTAuOC0wLjIKCQkJYzAtMC40LDAtMC43LDAtMC43YzAtMC4xLDAtMC4yLDAtMC4zYzAtMS42LTAuMy0yLjctMC45LTMuNWMtMC42LTAuOC0xLjQtMS4xLTIuNC0xLjFjLTIsMC0zLjcsMS41LTUuMSw0LjZjLTEuMywyLjctMiw1LjUtMiw4LjMKCQkJYzAsMiwwLjQsMy40LDEuMiw0LjJzMS43LDEuMSwyLjYsMS4xYzEuMiwwLDIuNC0wLjUsMy41LTEuNGMwLjYtMC41LDEuMi0xLjIsMS44LTIuMWwwLjgsMC42Yy0wLjksMS41LTEuOSwyLjYtMy4xLDMuMwoJCQljLTEuMiwwLjctMi40LDEuMS0zLjcsMS4xYy0yLDAtMy43LTAuNy01LTIuMWMtMS4zLTEuNC0yLTMuMi0yLTUuNmMwLTMuNiwxLTYuNiwzLTkuMmMyLTIuNiw0LjQtMy45LDcuMi0zLjkKCQkJQzg0NC0xMTQuMiw4NDQuOS0xMTQsODQ1LjgtMTEzLjh6Ii8+CgkJPHBhdGggY2xhc3M9InN0NSIgZD0iTTg1Mi0xMDkuN2MyLjItMyw0LjctNC41LDcuNC00LjVjMS44LDAsMy4zLDAuNiw0LjUsMS45czEuOCwzLDEuOCw1LjJjMCwzLjItMSw2LjItMy4xLDkuMQoJCQljLTIuMiwzLjEtNC44LDQuNi03LjYsNC42Yy0xLjgsMC0zLjMtMC42LTQuNC0xLjlzLTEuNy0zLTEuNy01LjFDODQ4LjgtMTAzLjcsODQ5LjktMTA2LjgsODUyLTEwOS43eiBNODUyLjgtOTYuMgoJCQljMC40LDEuMiwxLjEsMS44LDIuMiwxLjhjMSwwLDEuOS0wLjQsMi43LTEuM2MwLjgtMC45LDEuNy0yLjUsMi41LTQuOWMwLjYtMS41LDEtMy4xLDEuMy00LjhjMC4zLTEuNywwLjUtMy4xLDAuNS00LjEKCQkJYzAtMS0wLjItMS44LTAuNi0yLjVzLTEuMS0xLjEtMi0xLjFjLTIuMSwwLTMuOSwyLjItNS4zLDYuNWMtMS4xLDMuMy0xLjYsNi4xLTEuNiw4LjNDODUyLjUtOTcuNSw4NTIuNi05Ni44LDg1Mi44LTk2LjJ6Ii8+CgkJPHBhdGggY2xhc3M9InN0NSIgZD0iTTg2NC42LTk0LjdjMC43LTAuMSwxLjEtMC40LDEuNC0wLjljMC4zLTAuNSwwLjctMS43LDEuMi0zLjdsMi42LTExYzAuMS0wLjQsMC4yLTAuNywwLjItMQoJCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjQtMC4xLTAuNy0wLjQtMC44Yy0wLjMtMC4xLTAuNy0wLjItMS41LTAuMnYtMC44aDUuOGwxLjUsMTMuOWw3LjgtMTMuOWg1LjR2MC44CgkJCWMtMC42LDAuMS0xLDAuMi0xLjIsMC40Yy0wLjQsMC4zLTAuNiwwLjgtMC44LDEuN2wtMy4xLDEzLjNjLTAuMSwwLjMtMC4xLDAuNi0wLjIsMC45Yy0wLjEsMC4zLTAuMSwwLjUtMC4xLDAuNwoJCQljMCwwLjUsMC4xLDAuOCwwLjQsMC45YzAuMiwwLjEsMC43LDAuMiwxLjUsMC4zdjAuOGgtNy45di0wLjhjMC45LTAuMSwxLjQtMC4zLDEuOC0wLjVzMC42LTAuOCwwLjgtMS42bDMuMi0xMy42bC05LjUsMTYuOGgtMC43CgkJCWwtMS43LTE2LjRsLTIuNiwxMC43Yy0wLjEsMC41LTAuMiwxLTAuMywxLjRjLTAuMSwwLjYtMC4yLDEuMS0wLjIsMS40YzAsMC43LDAuMiwxLjIsMC43LDEuNGMwLjMsMC4yLDAuNywwLjIsMS4zLDAuM3YwLjhoLTUuMwoJCQlWLTk0Ljd6Ii8+CgkJPHBhdGggY2xhc3M9InN0NSIgZD0iTTg4Ni4yLTk0LjdjMC42LTAuMSwxLTAuMywxLjMtMC41YzAuMy0wLjMsMC41LTAuOCwwLjctMS42bDMuMS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjItMC45LTAuNS0xYy0wLjItMC4xLTAuNy0wLjItMS40LTAuMnYtMC44aDcuM2MxLjIsMCwyLjMsMC4yLDMuMSwwLjZjMS42LDAuNywyLjMsMi4xLDIuMyw0CgkJCWMwLDEuOC0wLjYsMy4yLTEuOSw0LjJjLTEuMywxLjEtMi45LDEuNi00LjksMS42Yy0wLjMsMC0wLjUsMC0wLjcsMGMtMC4yLDAtMC43LDAtMS41LTAuMWwtMS40LDUuOWwtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjMKCQkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDAuOWMwLjIsMC4xLDAuNywwLjIsMS41LDAuM3YwLjhoLTcuNVYtOTQuN3ogTTg5My43LTEwNC40YzAuMiwwLDAuMywwLDAuNSwwLjEKCQkJYzAuMSwwLDAuMywwLDAuNCwwYzAuOSwwLDEuNS0wLjEsMi0wLjRzMC45LTAuNiwxLjItMS4yYzAuMy0wLjUsMC42LTEuMiwwLjctMmMwLjItMC44LDAuMy0xLjUsMC4zLTJjMC0wLjgtMC4yLTEuNS0wLjUtMgoJCQljLTAuMy0wLjUtMC45LTAuOC0xLjctMC44Yy0wLjQsMC0wLjcsMC4xLTAuOCwwLjNjLTAuMSwwLjItMC4zLDAuNS0wLjQsMUw4OTMuNy0xMDQuNHoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNOTAwLjctOTQuN2MwLjYtMC4xLDEtMC4zLDEuMy0wLjVjMC4zLTAuMywwLjUtMC44LDAuNy0xLjZsMy4xLTEzLjJjMC4xLTAuNCwwLjItMC43LDAuMi0wLjkKCQkJczAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuNC0wLjljLTAuMi0wLjEtMC43LTAuMi0xLjUtMC4zdi0wLjhoOHYwLjhjLTAuOSwwLjEtMS41LDAuMy0xLjgsMC41Yy0wLjMsMC4yLTAuNiwwLjgtMC44LDEuNgoJCQlsLTMuMywxNC4xYzAsMC4yLTAuMSwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuNCwwLjdjMC4yLDAuMSwwLjYsMC4yLDEsMC4yYzEuNywwLDMuMy0wLjMsNC41LTEKCQkJczIuNC0yLDMuNC0zLjlsMC42LDAuMWwtMS41LDUuN2gtMTQuMVYtOTQuN3oiLz4KCQk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNOTE1LTk0LjdjMC42LTAuMSwxLTAuMywxLjMtMC41YzAuMy0wLjMsMC41LTAuOCwwLjctMS42bDMuMS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNy0wLjItMS41LTAuM3YtMC44aDEzLjdsLTEuMSw1LjZsLTAuNy0wLjFjMC0xLjQtMC4yLTIuNC0wLjYtMwoJCQljLTAuNi0xLTItMS41LTMuOS0xLjVjLTAuNywwLTEuMSwwLjEtMS4zLDAuM3MtMC40LDAuNS0wLjUsMS4xbC0xLjUsNi42YzEuOCwwLDIuOS0wLjIsMy41LTAuNWMwLjUtMC4zLDEuMS0xLjIsMS43LTIuNmwwLjcsMC4xCgkJCWwtMS45LDguMUw5MjYtMTAwYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4yLTEuOC0wLjctMi4xYy0wLjUtMC40LTEuNS0wLjYtMi45LTAuNmwtMS43LDcuMgoJCQljMCwwLjItMC4xLDAuMy0wLjEsMC41YzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4zLDAuN2MwLjIsMC4yLDAuNiwwLjMsMS4xLDAuM2MxLjUsMCwyLjgtMC4yLDMuOS0wLjcKCQkJYzEuNy0wLjgsMy0yLjIsMy45LTQuMmwwLjYsMC4xbC0xLjUsNS43SDkxNVYtOTQuN3oiLz4KCQk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNOTMyLjYtOTQuN2MwLjgsMCwxLjMtMC4xLDEuNi0wLjNjMC41LTAuMywwLjgtMC45LDEtMS44bDMuNy0xNS45Yy0xLjMsMC0yLjMsMC4zLTMuMiwxLjEKCQkJYy0wLjksMC43LTEuNiwxLjgtMi4yLDMuMmwtMC43LTAuMmwxLTVoMTRsLTAuOSw1LjdsLTAuNy0wLjFjMC0xLjktMC41LTMuMi0xLjQtMy45Yy0wLjUtMC40LTEuMi0wLjYtMi4xLTAuNmwtMy41LDE1LjFsLTAuMiwxCgkJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuNCwxYzAuMywwLjEsMC44LDAuMiwxLjcsMC4zdjAuOGgtOC40Vi05NC43eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDUiIGQ9Ik05NDUuMy05NC43YzAuNi0wLjEsMS0wLjMsMS4zLTAuNWMwLjMtMC4zLDAuNS0wLjgsMC43LTEuNmwzLjEtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4yLTAuOQoJCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjctMC4yLTEuNS0wLjN2LTAuOGgxMy43bC0xLjEsNS42bC0wLjctMC4xYzAtMS40LTAuMi0yLjQtMC42LTMKCQkJYy0wLjYtMS0yLTEuNS0zLjktMS41Yy0wLjcsMC0xLjEsMC4xLTEuMywwLjNzLTAuNCwwLjUtMC41LDEuMWwtMS41LDYuNmMxLjgsMCwyLjktMC4yLDMuNS0wLjVjMC41LTAuMywxLjEtMS4yLDEuNy0yLjZsMC43LDAuMQoJCQlsLTEuOSw4LjFsLTAuNy0wLjFjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNy0yLjFjLTAuNS0wLjQtMS41LTAuNi0yLjktMC42bC0xLjcsNy4yCgkJCWMwLDAuMi0wLjEsMC4zLTAuMSwwLjVjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjMsMC43YzAuMiwwLjIsMC42LDAuMywxLjEsMC4zYzEuNSwwLDIuOC0wLjIsMy45LTAuNwoJCQljMS43LTAuOCwzLTIuMiwzLjktNC4ybDAuNiwwLjFsLTEuNSw1LjdoLTE0LjFWLTk0Ljd6Ii8+CgkJPHBhdGggY2xhc3M9InN0NSIgZD0iTTk2MS05NC43YzAuNi0wLjEsMC45LTAuMiwxLjItMC40YzAuNC0wLjMsMC43LTAuOSwwLjktMS43bDMuMS0xMy4yYzAuMS0wLjQsMC4yLTAuNywwLjItMC45CgkJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjItMC4xLTAuNy0wLjItMS41LTAuM3YtMC44aDcuNGMyLjUsMCw0LjQsMC43LDUuNywyLjJjMS4zLDEuNSwyLDMuNSwyLDYKCQkJYzAsMy0xLDUuNi0yLjksNy44Yy0yLjEsMi41LTQuOSwzLjctOC40LDMuN0g5NjFWLTk0Ljd6IE05NzUuMi0xMTAuOGMtMC43LTEuMy0xLjgtMi0zLjQtMmMtMC41LDAtMC45LDAuMS0xLjEsMC4zCgkJCWMtMC4yLDAuMi0wLjMsMC41LTAuNCwwLjhsLTMuNSwxNC45YzAsMC4xLTAuMSwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNCwwLjEsMC43LDAuMywwLjhjMC4yLDAuMiwwLjYsMC4zLDEuMSwwLjMKCQkJYzMsMCw1LjItMS44LDYuNS01LjRjMC44LTIuMiwxLjItNC41LDEuMi02LjlDOTc1LjktMTA4LjgsOTc1LjYtMTA5LjksOTc1LjItMTEwLjh6Ii8+Cgk8L2c+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QzIiBkPSJNOTg1LjUsMjYwLjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUM5OTAuNSwyNTguMyw5ODguMywyNjAuNSw5ODUuNSwyNjAuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDQiIGQ9Ik05ODUuNSwyNjFoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUM5OTEsMjU4LjUsOTg4LjUsMjYxLDk4NS41LDI2MXogTTgyNS41LDIyMGMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SDgyNS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NSIgZD0iTTg0OC41LDI0OS4zYzEtMC4xLDEuNy0wLjMsMi4xLTAuNWMwLjUtMC4zLDAuOC0wLjgsMS4xLTEuNmw0LjktMTMuMmMwLjEtMC4zLDAuMi0wLjUsMC4yLTAuNwoJCWMwLjEtMC40LDAuMi0wLjcsMC4yLTFjMC0wLjUtMC4yLTAuOC0wLjUtMC45cy0xLjEtMC4yLTIuMy0wLjN2LTAuOGgyMWwtMS43LDUuNmwtMS4xLTAuMWMwLTEuNC0wLjMtMi40LTAuOS0zYy0xLTEtMy0xLjUtNi0xLjUKCQljLTAuOSwwLTEuNSwwLjEtMS44LDAuM2MtMC4zLDAuMi0wLjYsMC41LTAuOCwxLjFsLTIuMyw2LjVjMi42LTAuMSw0LjQtMC4yLDUuMi0wLjVjMC44LTAuMywxLjctMS4yLDIuNy0yLjZsMS4xLDAuMWwtMi45LDguMQoJCWwtMS4xLTAuMWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN3MwLTAuNCwwLTAuNWMwLTEtMC4zLTEuNy0xLTIuMWMtMC43LTAuNC0yLjEtMC42LTQuNC0wLjZsLTIuNiw3LjJjMCwwLjEtMC4xLDAuMi0wLjEsMC4zCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC42LDAuMywxLDEsMS4yYzAuNCwwLjEsMSwwLjIsMS45LDAuMnYwLjhoLTExLjdWMjQ5LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNODczLDI0OS4zYzAuOS0wLjEsMS42LTAuMywyLjEtMC41YzAuNS0wLjMsMC44LTAuOCwxLjEtMS42bDQuOS0xMy4yYzAuMS0wLjQsMC4yLTAuNywwLjMtMC45CgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMi0wLjgtMC42LTAuOWMtMC40LTAuMS0xLjItMC4yLTIuMy0wLjN2LTAuOGgxMS44djAuOGMtMSwwLjEtMS43LDAuMy0yLjEsMC41CgkJYy0wLjQsMC4yLTAuOCwwLjgtMS4xLDEuNmwtNC45LDEzLjJsLTAuMywxYzAsMC4xLDAsMC4yLTAuMSwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4yLDAuOCwwLjUsMC45czEuMSwwLjIsMi4zLDAuM3YwLjhIODczCgkJVjI0OS4zeiIvPgoJPHBhdGggY2xhc3M9InN0NSIgZD0iTTg4Ni41LDI0OS4zYzEtMC4xLDEuOC0wLjQsMi4yLTAuOWMwLjUtMC41LDEuMS0xLjcsMS44LTMuNmw0LjQtMTIuMWwtMC4yLTAuM2MtMC4zLTAuNS0wLjctMC45LTEuMi0xLjEKCQljLTAuMy0wLjEtMS0wLjItMS45LTAuMnYtMC44aDhsOC42LDEzLjZsMy4xLTguM2MwLjItMC41LDAuMy0xLDAuNC0xLjRjMC4yLTAuNiwwLjMtMS4xLDAuMy0xLjNjMC0wLjctMC4zLTEuMi0xLTEuNQoJCWMtMC40LTAuMi0xLjEtMC4zLTIuMi0wLjN2LTAuOGg4LjF2MC44bC0wLjYsMC4xYy0wLjgsMC4xLTEuNCwwLjQtMS45LDFjLTAuNCwwLjYtMSwxLjctMS42LDMuNGwtNS41LDE1aC0xbC0xMC4zLTE2LjNsLTMuOSwxMC42CgkJYy0wLjMsMC45LTAuNSwxLjUtMC42LDJjLTAuMSwwLjMtMC4xLDAuNS0wLjEsMC44YzAsMC43LDAuMywxLjIsMSwxLjRjMC40LDAuMiwxLjEsMC4zLDIuMSwwLjN2MC44aC04LjJWMjQ5LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q1IiBkPSJNOTEyLjQsMjQ5LjNjMC43LTAuMiwxLjMtMC4zLDEuNi0wLjVjMC41LTAuMywxLjEtMC44LDEuNy0xLjZsMTQuNy0xNy40aDFsMy44LDE2LjljMC4zLDEuMSwwLjYsMS44LDAuOSwyLjEKCQljMC40LDAuMywxLjIsMC40LDIuNCwwLjV2MC43aC0xMnYtMC43YzEuMS0wLjEsMS45LTAuMiwyLjQtMC40YzAuNS0wLjIsMC43LTAuNiwwLjctMS4zYzAtMC4yLTAuMS0wLjgtMC4yLTEuNgoJCWMwLTAuMi0wLjItMC45LTAuNC0yLjFoLTguNWwtMi4zLDNjLTAuMiwwLjItMC4zLDAuNC0wLjQsMC43Yy0wLjEsMC4yLTAuMiwwLjUtMC4yLDAuN2MwLDAuNCwwLjIsMC43LDAuNSwwLjhzMSwwLjIsMi4xLDAuM3YwLjcKCQloLTcuOFYyNDkuM3ogTTkyOC44LDI0Mi43bC0xLjUtNy4ybC01LjksNy4ySDkyOC44eiIvPgoJPHBhdGggY2xhc3M9InN0NSIgZD0iTTkzOC4zLDI0OS4zYzAuOS0wLjEsMS42LTAuMywyLjEtMC41YzAuNS0wLjMsMC44LTAuOCwxLjEtMS42bDQuOS0xMy4yYzAuMS0wLjQsMC4yLTAuNywwLjMtMC45CgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMi0wLjgtMC42LTAuOXMtMS4yLTAuMi0yLjMtMC4zdi0wLjhoMTIuNXYwLjhjLTEuNCwwLjEtMi4zLDAuMy0yLjgsMC41CgkJYy0wLjUsMC4yLTAuOSwwLjgtMS4yLDEuNmwtNS4xLDE0LjFjLTAuMSwwLjItMC4xLDAuMy0wLjEsMC40YzAsMC4xLDAsMC4zLDAsMC41YzAsMC4zLDAuMiwwLjYsMC42LDAuN2MwLjQsMC4xLDAuOSwwLjIsMS42LDAuMgoJCWMyLjcsMCw1LjEtMC4zLDctMWMyLTAuNywzLjctMiw1LjItMy45bDAuOSwwLjFsLTIuMyw1LjdoLTIxLjlWMjQ5LjN6Ii8+CjwvZz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNOTg1LjUtMTAuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJCUM5OTAuNS0xMi43LDk4OC4zLTEwLjUsOTg1LjUtMTAuNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik05ODUuNS0xMGgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJCUM5OTEtMTIuNSw5ODguNS0xMCw5ODUuNS0xMHogTTgyNS41LTUxYy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJCWMwLTIuNS0yLTQuNS00LjUtNC41SDgyNS41eiIvPgoJPC9nPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg0My42LTQxLjhjMC44LDAuMywxLjIsMC40LDEuNCwwLjRjMC4yLDAsMC40LTAuMSwwLjUtMC4yYzAuMS0wLjIsMC4yLTAuNCwwLjMtMC42aDAuNmwtMS4xLDYuOWwtMC43LTAuMgoJCQljMC0wLjQsMC0wLjcsMC0wLjdjMC0wLjEsMC0wLjIsMC0wLjNjMC0xLjYtMC4zLTIuNy0wLjgtMy41Yy0wLjUtMC44LTEuMi0xLjEtMi0xLjFjLTEuNiwwLTMuMSwxLjUtNC4zLDQuNgoJCQljLTEuMSwyLjctMS42LDUuNS0xLjYsOC4zYzAsMiwwLjMsMy40LDEsNC4yYzAuNywwLjgsMS40LDEuMSwyLjIsMS4xYzEsMCwyLTAuNSwyLjktMS40YzAuNS0wLjUsMS0xLjIsMS41LTIuMWwwLjYsMC42CgkJCWMtMC43LDEuNS0xLjYsMi42LTIuNiwzLjNjLTEsMC43LTIsMS4xLTMuMSwxLjFjLTEuNywwLTMuMS0wLjctNC4yLTIuMWMtMS4xLTEuNC0xLjctMy4yLTEuNy01LjZjMC0zLjYsMC45LTYuNiwyLjYtOS4yCgkJCWMxLjctMi42LDMuNy0zLjksNi4xLTMuOUM4NDIuMS00Mi4yLDg0Mi45LTQyLDg0My42LTQxLjh6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg0OC44LTM3LjdjMS45LTMsMy45LTQuNSw2LjItNC41YzEuNSwwLDIuOCwwLjYsMy44LDEuOXMxLjUsMywxLjUsNS4yYzAsMy4yLTAuOSw2LjItMi42LDkuMQoJCQljLTEuOSwzLjEtNCw0LjYtNi40LDQuNmMtMS41LDAtMi43LTAuNi0zLjctMS45Yy0xLTEuMy0xLjQtMy0xLjQtNS4xQzg0Ni4yLTMxLjcsODQ3LTM0LjgsODQ4LjgtMzcuN3ogTTg0OS41LTI0LjIKCQkJYzAuMywxLjIsMSwxLjgsMS44LDEuOGMwLjgsMCwxLjYtMC40LDIuMy0xLjNjMC43LTAuOSwxLjQtMi41LDIuMS00LjljMC41LTEuNSwwLjgtMy4xLDEuMS00LjhjMC4zLTEuNywwLjQtMy4xLDAuNC00LjEKCQkJYzAtMS0wLjItMS44LTAuNS0yLjVjLTAuNC0wLjctMC45LTEuMS0xLjYtMS4xYy0xLjgsMC0zLjIsMi4yLTQuNSw2LjVjLTAuOSwzLjMtMS40LDYuMS0xLjQsOC4zCgkJCUM4NDkuMi0yNS41LDg0OS4zLTI0LjgsODQ5LjUtMjQuMnoiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODU5LjQtMjIuN2MwLjYtMC4xLDEtMC40LDEuMi0wLjljMC4yLTAuNSwwLjYtMS43LDEtMy42bDIuNC0xMi4xbC0wLjEtMC4zYy0wLjItMC41LTAuNC0wLjktMC43LTEuMQoJCQljLTAuMi0wLjEtMC41LTAuMi0xLTAuMnYtMC44aDQuM2w0LjYsMTMuNmwxLjctOC4zYzAuMS0wLjUsMC4yLTEsMC4yLTEuNGMwLjEtMC42LDAuMS0xLjEsMC4xLTEuM2MwLTAuNy0wLjItMS4yLTAuNS0xLjUKCQkJYy0wLjItMC4yLTAuNi0wLjMtMS4yLTAuM3YtMC44aDQuNHYwLjhsLTAuMywwLjFjLTAuNCwwLjEtMC44LDAuNC0xLDFjLTAuMiwwLjYtMC41LDEuNy0wLjksMy40bC0zLDE1aC0wLjVsLTUuNS0xNi4zbC0yLjEsMTAuNgoJCQljLTAuMiwwLjktMC4zLDEuNS0wLjMsMmMwLDAuMy0wLjEsMC41LTAuMSwwLjhjMCwwLjcsMC4yLDEuMiwwLjYsMS40YzAuMiwwLjIsMC42LDAuMywxLjEsMC4zdjAuOGgtNC40Vi0yMi43eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NzQtMjIuN2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjYtMTMuMmMwLTAuMywwLjEtMC41LDAuMS0wLjcKCQkJYzAuMS0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjMtMC4zdi0wLjhoMTEuM2wtMC45LDUuNmwtMC42LTAuMWMwLTEuNC0wLjItMi40LTAuNS0zCgkJCWMtMC41LTEtMS42LTEuNS0zLjItMS41Yy0wLjUsMC0wLjgsMC4xLTEsMC4zYy0wLjIsMC4yLTAuMywwLjUtMC40LDEuMWwtMS4zLDYuNWMxLjQtMC4xLDIuMy0wLjIsMi44LTAuNQoJCQljMC40LTAuMywwLjktMS4yLDEuNC0yLjZsMC42LDAuMWwtMS42LDguMWwtMC42LTAuMWMwLTAuMywwLTAuNSwwLjEtMC43czAtMC40LDAtMC41YzAtMS0wLjItMS43LTAuNi0yLjEKCQkJYy0wLjQtMC40LTEuMi0wLjYtMi40LTAuNmwtMS40LDcuMmMwLDAuMSwwLDAuMi0wLjEsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC42LDAuMiwxLDAuNSwxLjJjMC4yLDAuMSwwLjUsMC4yLDEsMC4ydjAuOEg4NzQKCQkJVi0yMi43eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04ODcuMi0yMi43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjItMC45CgkJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4zLTAuM3YtMC44aDYuM3YwLjhjLTAuNSwwLjEtMC45LDAuMy0xLjEsMC41CgkJCWMtMC4yLDAuMi0wLjQsMC44LTAuNiwxLjZsLTIuNiwxMy4ybC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywwLjljMC4yLDAuMSwwLjYsMC4yLDEuMywwLjMKCQkJdjAuOGgtNi4zVi0yMi43eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04OTQuNC0yMi43YzAuNS0wLjEsMC44LTAuMiwxLTAuNGMwLjMtMC4zLDAuNi0wLjksMC43LTEuN2wyLjYtMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4yLTAuOQoJCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMy0wLjN2LTAuOGg2LjJjMi4xLDAsMy43LDAuNyw0LjgsMi4yYzEuMSwxLjUsMS42LDMuNSwxLjYsNgoJCQljMCwzLTAuOCw1LjYtMi40LDcuOGMtMS44LDIuNS00LjEsMy43LTcuMSwzLjdoLTYuMVYtMjIuN3ogTTkwNi4zLTM4LjhjLTAuNi0xLjMtMS41LTItMi45LTJjLTAuNSwwLTAuOCwwLjEtMC45LDAuMwoJCQljLTAuMiwwLjItMC4zLDAuNS0wLjMsMC44bC0yLjksMTQuOWMwLDAuMSwwLDAuMy0wLjEsMC40czAsMC4yLDAsMC4zYzAsMC40LDAuMSwwLjcsMC4zLDAuOHMwLjUsMC4zLDAuOSwwLjMKCQkJYzIuNSwwLDQuNC0xLjgsNS41LTUuNGMwLjctMi4yLDEtNC41LDEtNi45QzkwNi44LTM2LjgsOTA2LjctMzcuOSw5MDYuMy0zOC44eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MDguOS0yMi43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4zLTAuM3YtMC44aDExLjRsLTAuOSw1LjZsLTAuNi0wLjFjMC0xLjQtMC4yLTIuNC0wLjUtMwoJCQljLTAuNS0xLTEuNi0xLjUtMy4zLTEuNWMtMC42LDAtMC45LDAuMS0xLjEsMC4zYy0wLjIsMC4yLTAuMywwLjUtMC40LDEuMWwtMS4zLDYuNmMxLjUsMCwyLjUtMC4yLDIuOS0wLjVzMC45LTEuMiwxLjUtMi42CgkJCWwwLjYsMC4xbC0xLjYsOC4xbC0wLjYtMC4xYzAtMC4zLDAtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMi0xLjgtMC42LTIuMXMtMS4yLTAuNi0yLjQtMC42bC0xLjQsNy4yCgkJCWMwLDAuMi0wLjEsMC4zLTAuMSwwLjVjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjIsMC43YzAuMiwwLjIsMC41LDAuMywxLDAuM2MxLjMsMCwyLjQtMC4yLDMuMy0wLjcKCQkJYzEuNC0wLjgsMi41LTIuMiwzLjMtNC4ybDAuNSwwLjFsLTEuMyw1LjdoLTExLjhWLTIyLjd6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkyMi4yLTIyLjdjMC42LTAuMSwxLTAuNCwxLjItMC45YzAuMi0wLjUsMC42LTEuNywxLTMuNmwyLjQtMTIuMWwtMC4xLTAuM2MtMC4yLTAuNS0wLjQtMC45LTAuNy0xLjEKCQkJYy0wLjItMC4xLTAuNS0wLjItMS0wLjJ2LTAuOGg0LjNsNC42LDEzLjZsMS43LTguM2MwLjEtMC41LDAuMi0xLDAuMi0xLjRjMC4xLTAuNiwwLjEtMS4xLDAuMS0xLjNjMC0wLjctMC4yLTEuMi0wLjUtMS41CgkJCWMtMC4yLTAuMi0wLjYtMC4zLTEuMi0wLjN2LTAuOGg0LjR2MC44bC0wLjMsMC4xYy0wLjQsMC4xLTAuOCwwLjQtMSwxYy0wLjIsMC42LTAuNSwxLjctMC45LDMuNGwtMywxNWgtMC41bC01LjUtMTYuM2wtMi4xLDEwLjYKCQkJYy0wLjIsMC45LTAuMywxLjUtMC4zLDJjMCwwLjMtMC4xLDAuNS0wLjEsMC44YzAsMC43LDAuMiwxLjIsMC42LDEuNGMwLjIsMC4yLDAuNiwwLjMsMS4xLDAuM3YwLjhoLTQuNFYtMjIuN3oiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTM4LTIyLjdjMC43LDAsMS4xLTAuMSwxLjMtMC4zYzAuNC0wLjMsMC43LTAuOSwwLjktMS44bDMuMS0xNS45Yy0xLjEsMC0yLDAuMy0yLjcsMS4xCgkJCWMtMC44LDAuNy0xLjQsMS44LTEuOSwzLjJsLTAuNi0wLjJsMC44LTVoMTEuN0w5NTAtMzZsLTAuNi0wLjFjMC0xLjktMC40LTMuMi0xLjItMy45Yy0wLjQtMC40LTEtMC42LTEuOC0wLjZsLTMsMTUuMWwtMC4yLDEKCQkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDFjMC4yLDAuMSwwLjcsMC4yLDEuNCwwLjN2MC44aC03Vi0yMi43eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NDguOC0yMi43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjItMC45CgkJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4zLTAuM3YtMC44aDYuM3YwLjhjLTAuNSwwLjEtMC45LDAuMy0xLjEsMC41CgkJCWMtMC4yLDAuMi0wLjQsMC44LTAuNiwxLjZsLTIuNiwxMy4ybC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywwLjlzMC42LDAuMiwxLjMsMC4zdjAuOGgtNi4zCgkJCVYtMjIuN3oiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTU1LjUtMjIuN2MwLjQtMC4yLDAuNy0wLjMsMC45LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC45LTEuNmw3LjktMTcuNGgwLjZsMiwxNi45YzAuMSwxLjEsMC4zLDEuOCwwLjUsMi4xCgkJCWMwLjIsMC4zLDAuNiwwLjQsMS4zLDAuNXYwLjdoLTYuNHYtMC43YzAuNi0wLjEsMS0wLjIsMS4zLTAuNGMwLjMtMC4yLDAuNC0wLjYsMC40LTEuM2MwLTAuMiwwLTAuNy0wLjEtMS42CgkJCWMwLTAuMi0wLjEtMC45LTAuMi0yLjFoLTQuNmwtMS4yLDNjLTAuMSwwLjItMC4yLDAuNC0wLjIsMC43Yy0wLjEsMC4yLTAuMSwwLjUtMC4xLDAuN2MwLDAuNCwwLjEsMC43LDAuMywwLjgKCQkJYzAuMiwwLjEsMC41LDAuMiwxLjEsMC4zdjAuN2gtNC4yVi0yMi43eiBNOTY0LjMtMjkuM2wtMC44LTcuMmwtMy4xLDcuMkg5NjQuM3oiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTY5LjQtMjIuN2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNXMwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC4xLTAuNCwwLjEtMC43LDAuMi0wLjlzMC4xLTAuNSwwLjEtMC43CgkJCWMwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjMtMC4zdi0wLjhoNi43djAuOGMtMC43LDAuMS0xLjIsMC4zLTEuNSwwLjVjLTAuMywwLjItMC41LDAuOC0wLjYsMS42bC0yLjgsMTQuMQoJCQljMCwwLjIsMCwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMywwLjdjMC4yLDAuMSwwLjUsMC4yLDAuOSwwLjJjMS41LDAsMi43LTAuMywzLjgtMWMxLjEtMC43LDItMiwyLjgtMy45CgkJCWwwLjUsMC4xbC0xLjIsNS43aC0xMS44Vi0yMi43eiIvPgoJPC9nPgo8L2c+CjxnPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0iTTk4NS41LDU2LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCQlDOTkwLjUsNTQuMyw5ODguMyw1Ni41LDk4NS41LDU2LjV6Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3Q2IiBkPSJNOTg1LjUsNTdoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCQlDOTkxLDU0LjUsOTg4LjUsNTcsOTg1LjUsNTd6IE04MjUuNSwxNmMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCQljMC0yLjUtMi00LjUtNC41LTQuNUg4MjUuNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04MjkuNyw0NC4zYzAuNC0wLjEsMC43LTAuMiwwLjktMC40YzAuMy0wLjMsMC41LTAuOSwwLjctMS43bDIuNS0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjItMC45CgkJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDUuOGMyLDAsMy41LDAuNyw0LjUsMi4yYzEsMS41LDEuNSwzLjUsMS41LDYKCQkJYzAsMy0wLjgsNS42LTIuMyw3LjhjLTEuNywyLjUtMy45LDMuNy02LjcsMy43aC01LjhWNDQuM3ogTTg0MC45LDI4LjJjLTAuNS0xLjMtMS40LTItMi43LTJjLTAuNCwwLTAuNywwLjEtMC45LDAuMwoJCQljLTAuMiwwLjItMC4zLDAuNS0wLjMsMC44bC0yLjgsMTQuOWMwLDAuMSwwLDAuMy0wLjEsMC40czAsMC4yLDAsMC4zYzAsMC40LDAuMSwwLjcsMC4yLDAuOHMwLjQsMC4zLDAuOSwwLjMKCQkJYzIuNCwwLDQuMS0xLjgsNS4yLTUuNGMwLjYtMi4yLDEtNC41LDEtNi45Qzg0MS40LDMwLjIsODQxLjMsMjkuMSw4NDAuOSwyOC4yeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NDMuNCw0NC4zYzAuNS0wLjEsMC44LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjEtMC45CgkJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDEwLjhsLTAuOSw1LjZsLTAuNS0wLjFjMC0xLjQtMC4yLTIuNC0wLjUtMwoJCQljLTAuNS0xLTEuNS0xLjUtMy4xLTEuNWMtMC41LDAtMC45LDAuMS0xLDAuM2MtMC4yLDAuMi0wLjMsMC41LTAuNCwxLjFsLTEuMiw2LjZjMS40LDAsMi4zLTAuMiwyLjctMC41YzAuNC0wLjMsMC45LTEuMiwxLjQtMi42CgkJCWwwLjYsMC4xbC0xLjUsOC4xbC0wLjUtMC4xYzAtMC4zLDAtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMi0xLjgtMC42LTIuMXMtMS4yLTAuNi0yLjMtMC42bC0xLjMsNy4yCgkJCWMwLDAuMi0wLjEsMC4zLTAuMSwwLjVjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjIsMC43YzAuMSwwLjIsMC40LDAuMywwLjksMC4zYzEuMiwwLDIuMy0wLjIsMy4xLTAuNwoJCQljMS4zLTAuOCwyLjQtMi4yLDMuMS00LjJsMC41LDAuMWwtMS4yLDUuN2gtMTEuMVY0NC4zeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NTUuOSw0NC4zYzAuNS0wLjEsMC44LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjEtMC45CgkJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOS0wLjQtMWMtMC4yLTAuMS0wLjUtMC4yLTEuMS0wLjJ2LTAuOGg1LjhjMSwwLDEuOCwwLjIsMi40LDAuNmMxLjIsMC43LDEuOCwyLjEsMS44LDQKCQkJYzAsMS44LTAuNSwzLjItMS41LDQuMmMtMSwxLjEtMi4zLDEuNi0zLjksMS42Yy0wLjIsMC0wLjQsMC0wLjYsMGMtMC4xLDAtMC41LDAtMS4yLTAuMWwtMS4xLDUuOWwtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjMKCQkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDAuOWMwLjIsMC4xLDAuNiwwLjIsMS4yLDAuM1Y0NWgtNS45VjQ0LjN6IE04NjEuOSwzNC42YzAuMSwwLDAuMywwLDAuNCwwLjEKCQkJYzAuMSwwLDAuMiwwLDAuMywwYzAuNywwLDEuMi0wLjEsMS42LTAuNHMwLjctMC42LDAuOS0xLjJjMC4yLTAuNSwwLjQtMS4yLDAuNi0yYzAuMS0wLjgsMC4yLTEuNSwwLjItMmMwLTAuOC0wLjEtMS41LTAuNC0yCgkJCWMtMC4zLTAuNS0wLjctMC44LTEuMy0wLjhjLTAuMywwLTAuNSwwLjEtMC42LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMywxTDg2MS45LDM0LjZ6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg2NS4zLDQ0LjNjMC40LTAuMiwwLjYtMC4zLDAuOC0wLjVjMC4zLTAuMywwLjYtMC44LDAuOS0xLjZsNy40LTE3LjRoMC41bDEuOSwxNi45YzAuMSwxLjEsMC4zLDEuOCwwLjUsMi4xCgkJCWMwLjIsMC4zLDAuNiwwLjQsMS4yLDAuNVY0NWgtNi4xdi0wLjdjMC42LTAuMSwxLTAuMiwxLjItMC40YzAuMi0wLjIsMC40LTAuNiwwLjQtMS4zYzAtMC4yLDAtMC43LTAuMS0xLjZjMC0wLjItMC4xLTAuOS0wLjItMi4xCgkJCWgtNC4zbC0xLjIsM2MtMC4xLDAuMi0wLjEsMC40LTAuMiwwLjdjLTAuMSwwLjItMC4xLDAuNS0wLjEsMC43YzAsMC40LDAuMSwwLjcsMC4yLDAuOHMwLjUsMC4yLDEsMC4zVjQ1aC0zLjlWNDQuM3ogTTg3My42LDM3LjcKCQkJbC0wLjctNy4ybC0zLDcuMkg4NzMuNnoiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODc4LjMsNDQuM2MwLjUtMC4xLDAuOC0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjUtMTMuMmMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCQljMC4xLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4zLTAuOXMtMC42LTAuMi0xLjItMC4zdi0wLjhoNS41YzEuMiwwLDIuMiwwLjIsMi45LDAuNWMxLjIsMC43LDEuOSwxLjksMS45LDMuNwoJCQljMCwwLjYtMC4xLDEuMy0wLjMsMmMtMC4yLDAuNy0wLjYsMS4zLTEsMS45Yy0wLjMsMC40LTAuOCwwLjctMS4yLDFjLTAuMywwLjEtMC43LDAuMy0xLjMsMC41YzAuMSwwLjMsMC4xLDAuNSwwLjEsMC42bDEuNSw2LjcKCQkJYzAuMiwwLjksMC40LDEuNSwwLjcsMS43YzAuMiwwLjIsMC42LDAuNCwxLjEsMC40VjQ1aC00bC0yLjItOS44aC0wLjZsLTEuMiw2LjFsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJCWMwLDAuNSwwLjEsMC45LDAuMywxYzAuMiwwLjEsMC42LDAuMiwxLjIsMC4zVjQ1aC02VjQ0LjN6IE04ODYsMzQuMWMwLjYtMC4yLDEuMS0wLjYsMS40LTEuMWMwLjItMC40LDAuNC0wLjksMC42LTEuNgoJCQljMC4yLTAuNywwLjMtMS40LDAuMy0yLjNjMC0wLjgtMC4xLTEuNS0wLjQtMi4xYy0wLjMtMC41LTAuOC0wLjgtMS40LTAuOGMtMC4zLDAtMC41LDAuMS0wLjYsMC4zcy0wLjIsMC41LTAuMywxbC0xLjIsNi44CgkJCUM4ODUuMSwzNC4zLDg4NS43LDM0LjIsODg2LDM0LjF6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg5Mi4yLDQ0LjNjMC42LDAsMS0wLjEsMS4zLTAuM2MwLjQtMC4zLDAuNi0wLjksMC44LTEuOGwzLTE1LjljLTEsMC0xLjgsMC4zLTIuNiwxLjEKCQkJYy0wLjcsMC43LTEuMywxLjgtMS44LDMuMmwtMC41LTAuMmwwLjgtNWgxMWwtMC43LDUuN2wtMC41LTAuMWMwLTEuOS0wLjQtMy4yLTEuMS0zLjljLTAuNC0wLjQtMC45LTAuNi0xLjctMC42bC0yLjgsMTUuMWwtMC4yLDEKCQkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDFjMC4yLDAuMSwwLjcsMC4yLDEuNCwwLjNWNDVoLTYuNlY0NC4zeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MDIuMiw0NC4zYzAuNS0wLjEsMC45LTAuNCwxLjEtMC45YzAuMi0wLjUsMC41LTEuNywwLjktMy43bDItMTFjMC4xLTAuNCwwLjEtMC43LDAuMi0xCgkJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjQtMC4xLTAuNy0wLjMtMC44cy0wLjYtMC4yLTEuMi0wLjJ2LTAuOGg0LjZsMS4xLDEzLjlsNi4xLTEzLjloNC4zdjAuOGMtMC41LDAuMS0wLjgsMC4yLTEsMC40CgkJCWMtMC4zLDAuMy0wLjUsMC44LTAuNywxLjdsLTIuNSwxMy4zYy0wLjEsMC4zLTAuMSwwLjYtMC4yLDAuOWMwLDAuMy0wLjEsMC41LTAuMSwwLjdjMCwwLjUsMC4xLDAuOCwwLjMsMC45CgkJCWMwLjIsMC4xLDAuNiwwLjIsMS4yLDAuM1Y0NWgtNi4zdi0wLjhjMC43LTAuMSwxLjEtMC4zLDEuNC0wLjVjMC4zLTAuMiwwLjUtMC44LDAuNi0xLjZsMi41LTEzLjZsLTcuNSwxNi44aC0wLjZMOTA3LjIsMjkKCQkJbC0yLDEwLjdjLTAuMSwwLjUtMC4yLDEtMC4yLDEuNGMtMC4xLDAuNi0wLjEsMS4xLTAuMSwxLjRjMCwwLjcsMC4yLDEuMiwwLjYsMS40YzAuMiwwLjIsMC42LDAuMiwxLDAuM1Y0NWgtNC4yVjQ0LjN6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkxOS4zLDQ0LjNjMC41LTAuMSwwLjgtMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi41LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMS0wLjkKCQkJczAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjItMC4zdi0wLjhoMTAuOGwtMC45LDUuNmwtMC41LTAuMWMwLTEuNC0wLjItMi40LTAuNS0zCgkJCWMtMC41LTEtMS41LTEuNS0zLjEtMS41Yy0wLjUsMC0wLjksMC4xLTEsMC4zYy0wLjIsMC4yLTAuMywwLjUtMC40LDEuMWwtMS4yLDYuNmMxLjQsMCwyLjMtMC4yLDIuNy0wLjVzMC45LTEuMiwxLjQtMi42bDAuNiwwLjEKCQkJbC0xLjUsOC4xTDkyOCwzOWMwLTAuMywwLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNi0yLjFzLTEuMi0wLjYtMi4zLTAuNmwtMS4zLDcuMmMwLDAuMi0wLjEsMC4zLTAuMSwwLjUKCQkJYzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4yLDAuN2MwLjEsMC4yLDAuNCwwLjMsMC45LDAuM2MxLjIsMCwyLjMtMC4yLDMuMS0wLjdjMS4zLTAuOCwyLjQtMi4yLDMuMS00LjJsMC41LDAuMQoJCQlsLTEuMiw1LjdoLTExLjFWNDQuM3oiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTMxLjgsNDQuM2MwLjUtMC4xLDAuOS0wLjQsMS4xLTAuOWMwLjItMC41LDAuNS0xLjcsMC45LTMuNmwyLjMtMTIuMWwtMC4xLTAuM2MtMC4yLTAuNS0wLjQtMC45LTAuNi0xLjEKCQkJYy0wLjItMC4xLTAuNS0wLjItMC45LTAuMnYtMC44aDRsNC40LDEzLjZsMS42LTguM2MwLjEtMC41LDAuMi0xLDAuMi0xLjRjMC4xLTAuNiwwLjEtMS4xLDAuMS0xLjNjMC0wLjctMC4yLTEuMi0wLjUtMS41CgkJCWMtMC4yLTAuMi0wLjYtMC4zLTEuMS0wLjN2LTAuOGg0LjF2MC44bC0wLjMsMC4xYy0wLjQsMC4xLTAuNywwLjQtMSwxcy0wLjUsMS43LTAuOCwzLjRsLTIuOCwxNUg5NDJsLTUuMi0xNi4zbC0yLDEwLjYKCQkJYy0wLjIsMC45LTAuMywxLjUtMC4zLDJjMCwwLjMsMCwwLjUsMCwwLjhjMCwwLjcsMC4yLDEuMiwwLjUsMS40YzAuMiwwLjIsMC42LDAuMywxLjEsMC4zVjQ1aC00LjJWNDQuM3oiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTQ2LjgsNDQuM2MwLjYsMCwxLTAuMSwxLjMtMC4zYzAuNC0wLjMsMC42LTAuOSwwLjgtMS44bDMtMTUuOWMtMSwwLTEuOCwwLjMtMi42LDEuMQoJCQljLTAuNywwLjctMS4zLDEuOC0xLjgsMy4ybC0wLjUtMC4ybDAuOC01aDExbC0wLjcsNS43bC0wLjUtMC4xYzAtMS45LTAuNC0zLjItMS4xLTMuOWMtMC40LTAuNC0wLjktMC42LTEuNy0wLjZMOTUyLDQxLjRsLTAuMiwxCgkJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywxYzAuMiwwLjEsMC43LDAuMiwxLjQsMC4zVjQ1aC02LjZWNDQuM3oiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTU1LjIsNDQuM2MwLjQtMC4yLDAuNi0wLjMsMC44LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC45LTEuNmw3LjQtMTcuNGgwLjVsMS45LDE2LjljMC4xLDEuMSwwLjMsMS44LDAuNSwyLjEKCQkJYzAuMiwwLjMsMC42LDAuNCwxLjIsMC41VjQ1aC02LjF2LTAuN2MwLjYtMC4xLDEtMC4yLDEuMi0wLjRzMC40LTAuNiwwLjQtMS4zYzAtMC4yLDAtMC43LTAuMS0xLjZjMC0wLjItMC4xLTAuOS0wLjItMi4xaC00LjMKCQkJbC0xLjIsM2MtMC4xLDAuMi0wLjEsMC40LTAuMiwwLjdjLTAuMSwwLjItMC4xLDAuNS0wLjEsMC43YzAsMC40LDAuMSwwLjcsMC4yLDAuOGMwLjIsMC4xLDAuNSwwLjIsMSwwLjNWNDVoLTMuOVY0NC4zegoJCQkgTTk2My41LDM3LjdsLTAuNy03LjJsLTMsNy4ySDk2My41eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NjguNCw0NC4zYzAuNS0wLjEsMC44LTAuMywxLjEtMC41czAuNC0wLjgsMC42LTEuNmwyLjUtMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4yLTAuOQoJCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMi0wLjN2LTAuOGg2LjR2MC44Yy0wLjcsMC4xLTEuMiwwLjMtMS40LDAuNQoJCQljLTAuMiwwLjItMC40LDAuOC0wLjYsMS42bC0yLjYsMTQuMWMwLDAuMiwwLDAuMy0wLjEsMC40YzAsMC4xLDAsMC4zLDAsMC41YzAsMC4zLDAuMSwwLjYsMC4zLDAuN2MwLjIsMC4xLDAuNSwwLjIsMC44LDAuMgoJCQljMS40LDAsMi42LTAuMywzLjYtMXMxLjktMiwyLjctMy45bDAuNSwwLjFsLTEuMiw1LjdoLTExLjFWNDQuM3oiLz4KCTwvZz4KPC9nPgo8Zz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik05ODUuNSwxMjMuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJCUM5OTAuNSwxMjEuMyw5ODguMywxMjMuNSw5ODUuNSwxMjMuNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik05ODUuNSwxMjRoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCQlDOTkxLDEyMS41LDk4OC41LDEyNCw5ODUuNSwxMjR6IE04MjUuNSw4M2MtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCQljMC0yLjUtMi00LjUtNC41LTQuNUg4MjUuNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04MjkuOCwxMTEuM2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjYtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4yLTAuOQoJCQlzMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMi0wLjN2LTAuOEg4NDRsLTAuOSw1LjZsLTAuNi0wLjFjMC0xLjQtMC4yLTIuNC0wLjUtMwoJCQljLTAuNS0xLTEuNi0xLjUtMy4yLTEuNWMtMC42LDAtMC45LDAuMS0xLjEsMC4zcy0wLjMsMC41LTAuNCwxLjFsLTEuMiw2LjZjMS41LDAsMi40LTAuMiwyLjgtMC41YzAuNC0wLjMsMC45LTEuMiwxLjQtMi42CgkJCWwwLjYsMC4xbC0xLjYsOC4xbC0wLjYtMC4xYzAtMC4zLDAtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMi0xLjgtMC42LTIuMWMtMC40LTAuNC0xLjItMC42LTIuNC0wLjZsLTEuNCw3LjIKCQkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4yLDAuMiwwLjUsMC4zLDAuOSwwLjNjMS4zLDAsMi40LTAuMiwzLjItMC43CgkJCWMxLjQtMC44LDIuNS0yLjIsMy4zLTQuMmwwLjUsMC4xbC0xLjIsNS43aC0xMS42VjExMS4zeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NDIuOSwxMTEuM2MwLjQtMC4xLDAuOS0wLjQsMS4zLTFjMC41LTAuNSwxLTEuMywxLjYtMi4ybDMuNC01LjJsLTEuOC04Yy0wLjItMC43LTAuNC0xLjItMC42LTEuNAoJCQlzLTAuNy0wLjQtMS4zLTAuNHYtMC44aDYuNFY5M2MtMC42LDAuMS0xLDAuMi0xLjIsMC4zYy0wLjIsMC4xLTAuMywwLjQtMC4zLDAuOWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLjEsMC40bDEsNC44CgkJCWMwLjQtMC42LDAuOC0xLjEsMS4xLTEuNmMwLjMtMC41LDAuNi0wLjksMC45LTEuM2MwLjYtMSwxLTEuNiwxLjItMS45czAuMi0wLjYsMC4yLTAuOWMwLTAuMy0wLjEtMC42LTAuMy0wLjYKCQkJYy0wLjItMC4xLTAuNS0wLjItMC45LTAuMnYtMC43aDQuM3YwLjhjLTAuMywwLTAuNSwwLjEtMC44LDAuM2MtMC40LDAuMy0wLjgsMC44LTEuMywxLjVsLTQuMiw2bDEuNSw3YzAuMywxLjUsMC42LDIuMywwLjksMi43CgkJCXMwLjgsMC42LDEuNSwwLjd2MC44aC02LjV2LTAuOGMwLjQsMCwwLjgtMC4xLDAuOS0wLjJjMC4zLTAuMiwwLjUtMC41LDAuNS0wLjljMC0wLjMsMC0wLjUtMC4xLTAuOHMtMC4xLTAuNS0wLjItMC44bC0xLTQuMwoJCQlsLTIuOCw0LjRjLTAuMywwLjQtMC40LDAuNy0wLjUsMC45Yy0wLjEsMC4yLTAuMSwwLjQtMC4xLDAuNWMwLDAuNSwwLjIsMC44LDAuNSwxYzAuMiwwLjEsMC41LDAuMiwwLjgsMC4ydjAuOGgtNC41VjExMS4zeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NTUuOSwxMTEuM2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjYtMTMuMmMwLjEtMC4zLDAuMS0wLjYsMC4xLTAuOQoJCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjktMC40LTFjLTAuMi0wLjEtMC41LTAuMi0xLjEtMC4ydi0wLjhoNmMxLDAsMS45LDAuMiwyLjUsMC42YzEuMywwLjcsMS45LDIuMSwxLjksNAoJCQljMCwxLjgtMC41LDMuMi0xLjYsNC4yYy0xLDEuMS0yLjQsMS42LTQsMS42Yy0wLjMsMC0wLjUsMC0wLjYsMHMtMC42LDAtMS4yLTAuMWwtMS4xLDUuOWwtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjNzMCwwLjIsMCwwLjMKCQkJYzAsMC41LDAuMSwwLjgsMC4zLDAuOWMwLjIsMC4xLDAuNiwwLjIsMS4yLDAuM3YwLjhoLTYuMlYxMTEuM3ogTTg2Mi4xLDEwMS42YzAuMSwwLDAuMywwLDAuNCwwLjFjMC4xLDAsMC4yLDAsMC4zLDAKCQkJYzAuNywwLDEuMy0wLjEsMS42LTAuNHMwLjctMC42LDEtMS4yYzAuMy0wLjUsMC41LTEuMiwwLjYtMnMwLjItMS41LDAuMi0yYzAtMC44LTAuMS0xLjUtMC40LTJjLTAuMy0wLjUtMC43LTAuOC0xLjQtMC44CgkJCWMtMC4zLDAtMC41LDAuMS0wLjcsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDFMODYyLjEsMTAxLjZ6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg2Ny44LDExMS4zYzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDExLjNsLTAuOSw1LjZsLTAuNi0wLjFjMC0xLjQtMC4yLTIuNC0wLjUtMwoJCQljLTAuNS0xLTEuNi0xLjUtMy4yLTEuNWMtMC42LDAtMC45LDAuMS0xLjEsMC4zcy0wLjMsMC41LTAuNCwxLjFsLTEuMiw2LjZjMS41LDAsMi40LTAuMiwyLjgtMC41YzAuNC0wLjMsMC45LTEuMiwxLjQtMi42CgkJCWwwLjYsMC4xbC0xLjYsOC4xbC0wLjYtMC4xYzAtMC4zLDAtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMi0xLjgtMC42LTIuMWMtMC40LTAuNC0xLjItMC42LTIuNC0wLjZsLTEuNCw3LjIKCQkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4yLDAuMiwwLjUsMC4zLDAuOSwwLjNjMS4zLDAsMi40LTAuMiwzLjItMC43CgkJCWMxLjQtMC44LDIuNS0yLjIsMy4zLTQuMmwwLjUsMC4xbC0xLjIsNS43aC0xMS42VjExMS4zeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04ODAuOCwxMTEuM2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjYtMTMuMmMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCQljMC4xLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMi0wLjN2LTAuOGg1LjhjMS4zLDAsMi4zLDAuMiwzLDAuNWMxLjMsMC43LDIsMS45LDIsMy43CgkJCWMwLDAuNi0wLjEsMS4zLTAuMywycy0wLjYsMS4zLTEuMSwxLjljLTAuNCwwLjQtMC44LDAuNy0xLjMsMWMtMC4zLDAuMS0wLjcsMC4zLTEuMywwLjVjMC4xLDAuMywwLjEsMC41LDAuMSwwLjZsMS42LDYuNwoJCQljMC4yLDAuOSwwLjUsMS41LDAuNywxLjdjMC4yLDAuMiwwLjYsMC40LDEuMSwwLjR2MC44aC00LjJsLTIuMy05LjhIODg3bC0xLjIsNi4xbC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM3MwLDAuMiwwLDAuMwoJCQljMCwwLjUsMC4xLDAuOSwwLjMsMXMwLjYsMC4yLDEuMywwLjN2MC44aC02LjJWMTExLjN6IE04ODguOSwxMDEuMWMwLjYtMC4yLDEuMS0wLjYsMS41LTEuMWMwLjItMC40LDAuNS0wLjksMC43LTEuNgoJCQljMC4yLTAuNywwLjMtMS40LDAuMy0yLjNjMC0wLjgtMC4xLTEuNS0wLjQtMi4xYy0wLjMtMC41LTAuOC0wLjgtMS41LTAuOGMtMC4zLDAtMC41LDAuMS0wLjYsMC4zcy0wLjIsMC41LTAuMywxbC0xLjMsNi44CgkJCUM4ODcuOSwxMDEuMyw4ODguNSwxMDEuMiw4ODguOSwxMDEuMXoiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODk0LjEsMTExLjNjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC4xLTAuNCwwLjEtMC43LDAuMi0wLjkKCQkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjItMC4zdi0wLjhoNi4ydjAuOGMtMC41LDAuMS0wLjksMC4zLTEuMSwwLjUKCQkJYy0wLjIsMC4yLTAuNCwwLjgtMC42LDEuNmwtMi42LDEzLjJsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zczAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDAuOXMwLjYsMC4yLDEuMiwwLjN2MC44aC02LjJWMTExLjMKCQkJeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MDEuMiwxMTEuM2MwLjUtMC4xLDAuOS0wLjQsMS4yLTAuOXMwLjYtMS43LDEtMy43bDIuMS0xMWMwLjEtMC40LDAuMS0wLjcsMC4yLTFjMC0wLjMsMC4xLTAuNSwwLjEtMC43CgkJCWMwLTAuNC0wLjEtMC43LTAuMy0wLjhzLTAuNi0wLjItMS4yLTAuMnYtMC44aDQuOGwxLjIsMTMuOWw2LjQtMTMuOWg0LjV2MC44Yy0wLjUsMC4xLTAuOCwwLjItMSwwLjRjLTAuMywwLjMtMC41LDAuOC0wLjcsMS43CgkJCWwtMi42LDEzLjNjLTAuMSwwLjMtMC4xLDAuNi0wLjIsMC45YzAsMC4zLTAuMSwwLjUtMC4xLDAuN2MwLDAuNSwwLjEsMC44LDAuMywwLjljMC4yLDAuMSwwLjYsMC4yLDEuMiwwLjN2MC44aC02LjV2LTAuOAoJCQljMC43LTAuMSwxLjItMC4zLDEuNC0wLjVjMC4zLTAuMiwwLjUtMC44LDAuNi0xLjZsMi42LTEzLjZsLTcuOSwxNi44aC0wLjZMOTA2LjQsOTZsLTIuMSwxMC43Yy0wLjEsMC41LTAuMiwxLTAuMiwxLjQKCQkJYy0wLjEsMC42LTAuMSwxLjEtMC4xLDEuNGMwLDAuNywwLjIsMS4yLDAuNiwxLjRjMC4yLDAuMiwwLjYsMC4yLDEuMSwwLjN2MC44aC00LjRWMTExLjN6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkxOC45LDExMS4zYzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjMtMC45Yy0wLjItMC4xLTAuNi0wLjItMS4yLTAuM3YtMC44aDExLjNsLTAuOSw1LjZsLTAuNi0wLjFjMC0xLjQtMC4yLTIuNC0wLjUtMwoJCQljLTAuNS0xLTEuNi0xLjUtMy4yLTEuNWMtMC42LDAtMC45LDAuMS0xLjEsMC4zcy0wLjMsMC41LTAuNCwxLjFsLTEuMiw2LjZjMS41LDAsMi40LTAuMiwyLjgtMC41YzAuNC0wLjMsMC45LTEuMiwxLjQtMi42CgkJCWwwLjYsMC4xbC0xLjYsOC4xTDkyOCwxMDZjMC0wLjMsMC0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4yLTEuOC0wLjYtMi4xcy0xLjItMC42LTIuNC0wLjZsLTEuNCw3LjIKCQkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4yLDAuMiwwLjUsMC4zLDAuOSwwLjNjMS4zLDAsMi40LTAuMiwzLjItMC43CgkJCWMxLjQtMC44LDIuNS0yLjIsMy4zLTQuMmwwLjUsMC4xbC0xLjIsNS43aC0xMS42VjExMS4zeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MzIsMTExLjNjMC41LTAuMSwwLjktMC40LDEuMi0wLjljMC4yLTAuNSwwLjYtMS43LDEtMy42bDIuNC0xMi4xbC0wLjEtMC4zYy0wLjItMC41LTAuNC0wLjktMC42LTEuMQoJCQljLTAuMi0wLjEtMC41LTAuMi0xLTAuMnYtMC44aDQuMmw0LjUsMTMuNmwxLjYtOC4zYzAuMS0wLjUsMC4yLTEsMC4yLTEuNGMwLjEtMC42LDAuMS0xLjEsMC4xLTEuM2MwLTAuNy0wLjItMS4yLTAuNS0xLjUKCQkJYy0wLjItMC4yLTAuNi0wLjMtMS4xLTAuM3YtMC44aDQuM3YwLjhsLTAuMywwLjFjLTAuNCwwLjEtMC44LDAuNC0xLDFzLTAuNSwxLjctMC44LDMuNGwtMi45LDE1aC0wLjVsLTUuNC0xNi4zbC0yLjEsMTAuNgoJCQljLTAuMiwwLjktMC4zLDEuNS0wLjMsMmMwLDAuMy0wLjEsMC41LTAuMSwwLjhjMCwwLjcsMC4yLDEuMiwwLjYsMS40YzAuMiwwLjIsMC42LDAuMywxLjEsMC4zdjAuOEg5MzJWMTExLjN6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTk0Ny43LDExMS4zYzAuNiwwLDEuMS0wLjEsMS4zLTAuM2MwLjQtMC4zLDAuNy0wLjksMC45LTEuOGwzLjEtMTUuOWMtMSwwLTEuOSwwLjMtMi43LDEuMQoJCQljLTAuNywwLjctMS40LDEuOC0xLjgsMy4ybC0wLjUtMC4ybDAuOC01aDExLjVsLTAuOCw1LjdsLTAuNS0wLjFjMC0xLjktMC40LTMuMi0xLjEtMy45Yy0wLjQtMC40LTEtMC42LTEuOC0wLjZsLTIuOSwxNS4xbC0wLjIsMQoJCQljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjMsMWMwLjIsMC4xLDAuNywwLjIsMS40LDAuM3YwLjhoLTYuOVYxMTEuM3oiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTU2LjUsMTExLjNjMC40LTAuMiwwLjctMC4zLDAuOS0wLjVjMC4zLTAuMywwLjYtMC44LDAuOS0xLjZsNy44LTE3LjRoMC41bDIsMTYuOWMwLjEsMS4xLDAuMywxLjgsMC41LDIuMQoJCQljMC4yLDAuMywwLjYsMC40LDEuMywwLjV2MC43SDk2NHYtMC43YzAuNi0wLjEsMS0wLjIsMS4zLTAuNGMwLjItMC4yLDAuNC0wLjYsMC40LTEuM2MwLTAuMiwwLTAuNy0wLjEtMS42YzAtMC4yLTAuMS0wLjktMC4yLTIuMQoJCQloLTQuNWwtMS4yLDNjLTAuMSwwLjItMC4yLDAuNC0wLjIsMC43Yy0wLjEsMC4yLTAuMSwwLjUtMC4xLDAuN2MwLDAuNCwwLjEsMC43LDAuMywwLjhzMC41LDAuMiwxLjEsMC4zdjAuN2gtNC4xVjExMS4zegoJCQkgTTk2NS4xLDEwNC43bC0wLjgtNy4ybC0zLjEsNy4ySDk2NS4xeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NzAuMiwxMTEuM2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNXMwLjQtMC44LDAuNi0xLjZsMi42LTEzLjJjMC4xLTAuNCwwLjEtMC43LDAuMi0wLjkKCQkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjItMC4zdi0wLjhoNi42djAuOGMtMC43LDAuMS0xLjIsMC4zLTEuNSwwLjUKCQkJYy0wLjMsMC4yLTAuNSwwLjgtMC42LDEuNmwtMi43LDE0LjFjMCwwLjIsMCwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMywwLjdjMC4yLDAuMSwwLjUsMC4yLDAuOSwwLjIKCQkJYzEuNCwwLDIuNy0wLjMsMy43LTFzMi0yLDIuOC0zLjlsMC41LDAuMWwtMS4yLDUuN2gtMTEuNlYxMTEuM3oiLz4KCTwvZz4KPC9nPgo8Zz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik05ODUuNSwxOTMuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJCUM5OTAuNSwxOTEuMyw5ODguMywxOTMuNSw5ODUuNSwxOTMuNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik05ODUuNSwxOTRoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCQlDOTkxLDE5MS41LDk4OC41LDE5NCw5ODUuNSwxOTR6IE04MjUuNSwxNTNjLTIuNSwwLTQuNSwyLTQuNSw0LjV2MzFjMCwyLjUsMiw0LjUsNC41LDQuNWgxNjBjMi41LDAsNC41LTIsNC41LTQuNXYtMzEKCQkJYzAtMi41LTItNC41LTQuNS00LjVIODI1LjV6Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODQ0LjQsMTgyLjNjMC43LTAuMSwxLjItMC4zLDEuNi0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy42LTEzLjJjMC4xLTAuMywwLjItMC42LDAuMi0wLjkKCQkJczAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuNC0wLjljLTAuMy0wLjEtMC44LTAuMi0xLjgtMC4zdi0wLjhoMTUuOWwtMS4zLDUuNmwtMC44LTAuMWMwLTEuNC0wLjMtMi40LTAuNy0zCgkJCWMtMC44LTEtMi4zLTEuNS00LjYtMS41Yy0wLjgsMC0xLjMsMC4xLTEuNSwwLjNjLTAuMiwwLjItMC40LDAuNS0wLjYsMS4xbC0xLjgsNi42YzIuMSwwLDMuNC0wLjIsNC0wLjVzMS4zLTEuMiwyLTIuNmwwLjgsMC4xCgkJCWwtMi4yLDguMWwtMC44LTAuMWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMy0xLjgtMC45LTIuMWMtMC42LTAuNC0xLjctMC42LTMuNC0wLjZsLTEuOSw3LjIKCQkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMywwLjdjMC4yLDAuMiwwLjcsMC4zLDEuMywwLjNjMS44LDAsMy4zLTAuMiw0LjYtMC43CgkJCWMyLTAuOCwzLjUtMi4yLDQuNi00LjJsMC43LDAuMWwtMS43LDUuN2gtMTYuNFYxODIuM3oiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODYyLjksMTgyLjNjMC42LTAuMSwxLjItMC40LDEuOS0xYzAuNi0wLjUsMS40LTEuMywyLjMtMi4ybDQuOC01LjJsLTIuNS04Yy0wLjItMC43LTAuNS0xLjItMC45LTEuNAoJCQljLTAuNC0wLjItMS0wLjQtMS44LTAuNHYtMC44aDl2MC43Yy0wLjksMC4xLTEuNSwwLjItMS44LDAuM2MtMC4zLDAuMS0wLjQsMC40LTAuNCwwLjljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMC4xLDAuNAoJCQlsMS40LDQuOGMwLjYtMC42LDEuMS0xLjEsMS41LTEuNmMwLjUtMC41LDAuOS0wLjksMS4zLTEuM2MwLjktMSwxLjUtMS42LDEuNy0xLjlzMC4zLTAuNiwwLjMtMC45YzAtMC4zLTAuMS0wLjYtMC40LTAuNgoJCQlzLTAuNy0wLjItMS4zLTAuMnYtMC43aDZ2MC44Yy0wLjQsMC0wLjgsMC4xLTEuMSwwLjNjLTAuNSwwLjMtMS4xLDAuOC0xLjksMS41bC01LjksNmwyLjIsN2MwLjUsMS41LDAuOSwyLjMsMS4zLDIuNwoJCQljMC40LDAuMywxLjEsMC42LDIuMiwwLjd2MC44aC05LjF2LTAuOGMwLjYsMCwxLjEtMC4xLDEuMy0wLjJjMC41LTAuMiwwLjctMC41LDAuNy0wLjljMC0wLjMsMC0wLjUtMC4xLTAuOAoJCQljLTAuMS0wLjMtMC4xLTAuNS0wLjItMC44bC0xLjQtNC4zbC00LDQuNGMtMC40LDAuNC0wLjYsMC43LTAuNywwLjlzLTAuMiwwLjQtMC4yLDAuNWMwLDAuNSwwLjIsMC44LDAuNywxCgkJCWMwLjMsMC4xLDAuNiwwLjIsMS4yLDAuMnYwLjhoLTYuNFYxODIuM3oiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODgxLjMsMTgyLjNjMC43LTAuMSwxLjItMC4zLDEuNi0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy42LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMi0wLjkKCQkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMi0wLjktMC42LTFjLTAuMi0wLjEtMC44LTAuMi0xLjYtMC4ydi0wLjhoOC41YzEuNCwwLDIuNiwwLjIsMy42LDAuNmMxLjgsMC43LDIuNywyLjEsMi43LDQKCQkJYzAsMS44LTAuNywzLjItMi4yLDQuMmMtMS41LDEuMS0zLjQsMS42LTUuNywxLjZjLTAuNCwwLTAuNiwwLTAuOCwwYy0wLjIsMC0wLjgsMC0xLjctMC4xbC0xLjYsNS45bC0wLjIsMWMwLDAuMSwwLDAuMi0wLjEsMC4zCgkJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuNCwwLjljMC4zLDAuMSwwLjksMC4yLDEuOCwwLjN2MC44aC04LjdWMTgyLjN6IE04OTAsMTcyLjZjMC4yLDAsMC40LDAsMC41LDAuMQoJCQljMC4yLDAsMC4zLDAsMC41LDBjMSwwLDEuOC0wLjEsMi4zLTAuNHMxLTAuNiwxLjQtMS4yYzAuNC0wLjUsMC43LTEuMiwwLjktMmMwLjItMC44LDAuMy0xLjUsMC4zLTJjMC0wLjgtMC4yLTEuNS0wLjYtMgoJCQljLTAuNC0wLjUtMS4xLTAuOC0yLTAuOGMtMC41LDAtMC44LDAuMS0wLjksMC4zYy0wLjIsMC4yLTAuMywwLjUtMC41LDFMODkwLDE3Mi42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MDgsMTgyLjNjMC43LTAuMSwxLjItMC4zLDEuNi0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy42LTEzLjJjMC4xLTAuMywwLjEtMC41LDAuMi0wLjcKCQkJYzAuMS0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuNC0wLjlzLTAuOS0wLjItMS43LTAuM3YtMC44aDguMWMxLjgsMCwzLjIsMC4yLDQuMiwwLjVjMS44LDAuNywyLjcsMS45LDIuNywzLjcKCQkJYzAsMC42LTAuMiwxLjMtMC41LDJjLTAuMywwLjctMC44LDEuMy0xLjUsMS45Yy0wLjUsMC40LTEuMSwwLjctMS44LDFjLTAuNCwwLjEtMSwwLjMtMS45LDAuNWMwLjEsMC4zLDAuMiwwLjUsMC4yLDAuNmwyLjMsNi43CgkJCWMwLjMsMC45LDAuNiwxLjUsMSwxLjdjMC40LDAuMiwwLjksMC40LDEuNiwwLjR2MC44aC01LjlsLTMuMi05LjhoLTAuOGwtMS43LDYuMWwtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQkJYzAsMC41LDAuMSwwLjksMC40LDFjMC4zLDAuMSwwLjgsMC4yLDEuOCwwLjN2MC44SDkwOFYxODIuM3ogTTkxOS4zLDE3Mi4xYzAuOS0wLjIsMS42LTAuNiwyLjEtMS4xYzAuMy0wLjQsMC43LTAuOSwwLjktMS42CgkJCWMwLjMtMC43LDAuNC0xLjQsMC40LTIuM2MwLTAuOC0wLjItMS41LTAuNi0yLjFjLTAuNC0wLjUtMS4xLTAuOC0yLjEtMC44Yy0wLjQsMC0wLjcsMC4xLTAuOSwwLjNjLTAuMiwwLjItMC4zLDAuNS0wLjUsMQoJCQlsLTEuOCw2LjhDOTE4LDE3Mi4zLDkxOC44LDE3Mi4yLDkxOS4zLDE3Mi4xeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04OTcuNiwxODIuM2MwLjctMC4xLDEuMi0wLjMsMS42LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTMuMmMwLjEtMC40LDAuMi0wLjcsMC4yLTAuOQoJCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOS0wLjItMS43LTAuM3YtMC44aDguOHYwLjhjLTAuNywwLjEtMS4yLDAuMy0xLjYsMC41CgkJCWMtMC4zLDAuMi0wLjYsMC44LTAuOCwxLjZsLTMuNiwxMy4ybC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM3MwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuNCwwLjlzMC44LDAuMiwxLjcsMC4zdjAuOGgtOC44VjE4Mi4zCgkJCXoiLz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTI2LjcsMTgyLjNjMC43LTAuMSwxLjItMC4zLDEuNi0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy42LTEzLjJjMC4xLTAuMywwLjItMC42LDAuMi0wLjkKCQkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC40LTAuOWMtMC4zLTAuMS0wLjgtMC4yLTEuOC0wLjN2LTAuOGgxNS45bC0xLjMsNS42bC0wLjgtMC4xYzAtMS40LTAuMy0yLjQtMC43LTMKCQkJYy0wLjgtMS0yLjMtMS41LTQuNi0xLjVjLTAuOCwwLTEuMywwLjEtMS41LDAuM3MtMC40LDAuNS0wLjYsMS4xbC0xLjgsNi42YzIuMSwwLDMuNC0wLjIsNC0wLjVjMC42LTAuMywxLjMtMS4yLDItMi42bDAuOCwwLjEKCQkJbC0yLjIsOC4xbC0wLjgtMC4xYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4zLTEuOC0wLjktMi4xcy0xLjctMC42LTMuNC0wLjZsLTEuOSw3LjIKCQkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMywwLjdjMC4yLDAuMiwwLjcsMC4zLDEuMywwLjNjMS44LDAsMy4zLTAuMiw0LjYtMC43CgkJCWMyLTAuOCwzLjUtMi4yLDQuNi00LjJsMC43LDAuMUw5NDMsMTgzaC0xNi40VjE4Mi4zeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NDQuOSwxODIuM2MwLjYtMC4xLDEuMS0wLjIsMS40LTAuNGMwLjUtMC4zLDAuOC0wLjksMS0xLjdsMy42LTEzLjJjMC4xLTAuNCwwLjItMC43LDAuMi0wLjkKCQkJczAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuNC0wLjljLTAuMy0wLjEtMC45LTAuMi0xLjctMC4zdi0wLjhoOC42YzIuOSwwLDUuMSwwLjcsNi42LDIuMmMxLjUsMS41LDIuMywzLjUsMi4zLDYKCQkJYzAsMy0xLjEsNS42LTMuNCw3LjhjLTIuNSwyLjUtNS44LDMuNy05LjgsMy43aC04LjVWMTgyLjN6IE05NjEuNSwxNjYuMmMtMC44LTEuMy0yLjEtMi00LTJjLTAuNiwwLTEuMSwwLjEtMS4zLDAuMwoJCQljLTAuMiwwLjItMC40LDAuNS0wLjUsMC44bC00LjEsMTQuOWMwLDAuMS0wLjEsMC4zLTAuMSwwLjRjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjQsMC4xLDAuNywwLjQsMC44YzAuMiwwLjIsMC43LDAuMywxLjMsMC4zCgkJCWMzLjUsMCw2LTEuOCw3LjYtNS40YzEtMi4yLDEuNC00LjUsMS40LTYuOUM5NjIuMiwxNjguMiw5NjIsMTY3LjEsOTYxLjUsMTY2LjJ6Ii8+Cgk8L2c+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNOTg1LjUsMzI3LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUM5OTAuNSwzMjUuMyw5ODguMywzMjcuNSw5ODUuNSwzMjcuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik05ODUuNSwzMjhoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUM5OTEsMzI1LjUsOTg4LjUsMzI4LDk4NS41LDMyOHogTTgyNS41LDI4N2MtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SDgyNS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTgzMS4yLDMxNi4zYzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCWMwLjEtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjMtMC45cy0wLjYtMC4yLTEuMi0wLjN2LTAuOGgxMS4xbC0wLjksNS42bC0wLjYtMC4xYzAtMS40LTAuMi0yLjQtMC41LTMKCQljLTAuNS0xLTEuNi0xLjUtMy4yLTEuNWMtMC41LDAtMC44LDAuMS0xLDAuM2MtMC4yLDAuMi0wLjMsMC41LTAuNCwxLjFsLTEuMiw2LjVjMS40LTAuMSwyLjMtMC4yLDIuNy0wLjVjMC40LTAuMywwLjktMS4yLDEuNC0yLjYKCQlsMC42LDAuMWwtMS42LDguMWwtMC42LTAuMWMwLTAuMywwLTAuNSwwLjEtMC43czAtMC40LDAtMC41YzAtMS0wLjItMS43LTAuNS0yLjFjLTAuNC0wLjQtMS4xLTAuNi0yLjMtMC42bC0xLjQsNy4yCgkJYzAsMC4xLDAsMC4yLTAuMSwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjYsMC4yLDEsMC41LDEuMmMwLjIsMC4xLDAuNSwwLjIsMSwwLjJ2MC44aC02LjJWMzE2LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODQ3LjksMzAxLjNjMS44LTMsMy45LTQuNSw2LjEtNC41YzEuNSwwLDIuNywwLjYsMy43LDEuOXMxLjUsMywxLjUsNS4yYzAsMy4yLTAuOSw2LjItMi42LDkuMQoJCWMtMS44LDMuMS0zLjksNC42LTYuMyw0LjZjLTEuNSwwLTIuNy0wLjYtMy42LTEuOXMtMS40LTMtMS40LTUuMUM4NDUuMiwzMDcuMyw4NDYuMSwzMDQuMiw4NDcuOSwzMDEuM3ogTTg0OC41LDMxNC44CgkJYzAuMywxLjIsMC45LDEuOCwxLjgsMS44YzAuOCwwLDEuNi0wLjQsMi4zLTEuM3MxLjQtMi41LDIuMS00LjljMC41LTEuNSwwLjgtMy4xLDEuMS00LjhjMC4zLTEuNywwLjQtMy4xLDAuNC00LjEKCQljMC0xLTAuMi0xLjgtMC41LTIuNWMtMC4zLTAuNy0wLjktMS4xLTEuNi0xLjFjLTEuNywwLTMuMiwyLjItNC40LDYuNWMtMC45LDMuMy0xLjQsNi4xLTEuNCw4LjMKCQlDODQ4LjMsMzEzLjUsODQ4LjMsMzE0LjIsODQ4LjUsMzE0Ljh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODU4LjMsMzE2LjNjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVzMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43CgkJYzAuMS0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjItMC4zdi0wLjhoNS44YzEuMywwLDIuMywwLjIsMywwLjVjMS4zLDAuNywyLDEuOSwyLDMuNwoJCWMwLDAuNi0wLjEsMS4zLTAuMywycy0wLjYsMS4zLTEuMSwxLjljLTAuNCwwLjQtMC44LDAuNy0xLjMsMWMtMC4zLDAuMS0wLjcsMC4zLTEuMywwLjVjMC4xLDAuMywwLjEsMC41LDAuMSwwLjZsMS42LDYuNwoJCWMwLjIsMC45LDAuNSwxLjUsMC43LDEuN2MwLjIsMC4yLDAuNiwwLjQsMS4xLDAuNHYwLjhoLTQuMmwtMi4zLTkuOGgtMC42bC0xLjIsNi4xbC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC45LDAuMywxczAuNiwwLjIsMS4zLDAuM3YwLjhoLTYuMlYzMTYuM3ogTTg2Ni4zLDMwNi4xYzAuNi0wLjIsMS4xLTAuNiwxLjUtMS4xYzAuMi0wLjQsMC41LTAuOSwwLjctMS42CgkJYzAuMi0wLjcsMC4zLTEuNCwwLjMtMi4zYzAtMC44LTAuMS0xLjUtMC40LTIuMXMtMC44LTAuOC0xLjUtMC44Yy0wLjMsMC0wLjUsMC4xLTAuNiwwLjNzLTAuMiwwLjUtMC4zLDFsLTEuMyw2LjgKCQlDODY1LjQsMzA2LjMsODY2LDMwNi4yLDg2Ni4zLDMwNi4xeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg4Ny41LDI5Ny4yYzAuOCwwLjMsMS4yLDAuNCwxLjQsMC40YzAuMiwwLDAuNC0wLjEsMC41LTAuMmMwLjEtMC4yLDAuMi0wLjQsMC4zLTAuNmgwLjZsLTEuMSw2LjlsLTAuNy0wLjIKCQljMC0wLjQsMC0wLjcsMC0wLjdjMC0wLjEsMC0wLjIsMC0wLjNjMC0xLjYtMC4zLTIuNy0wLjgtMy41Yy0wLjUtMC44LTEuMi0xLjEtMi0xLjFjLTEuNiwwLTMsMS41LTQuMiw0LjYKCQljLTEuMSwyLjctMS42LDUuNS0xLjYsOC4zYzAsMiwwLjMsMy40LDEsNC4yYzAuNywwLjgsMS40LDEuMSwyLjIsMS4xYzEsMCwyLTAuNSwyLjktMS40YzAuNS0wLjUsMS0xLjIsMS41LTIuMWwwLjYsMC42CgkJYy0wLjcsMS41LTEuNiwyLjYtMi42LDMuM2MtMSwwLjctMiwxLjEtMywxLjFjLTEuNywwLTMuMS0wLjctNC4yLTIuMWMtMS4xLTEuNC0xLjYtMy4yLTEuNi01LjZjMC0zLjYsMC44LTYuNiwyLjUtOS4yCgkJYzEuNy0yLjYsMy43LTMuOSw2LTMuOUM4ODYsMjk2LjgsODg2LjcsMjk3LDg4Ny41LDI5Ny4yeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg5Mi42LDMwMS4zYzEuOC0zLDMuOS00LjUsNi4xLTQuNWMxLjUsMCwyLjcsMC42LDMuNywxLjlzMS41LDMsMS41LDUuMmMwLDMuMi0wLjksNi4yLTIuNiw5LjEKCQljLTEuOCwzLjEtMy45LDQuNi02LjMsNC42Yy0xLjUsMC0yLjctMC42LTMuNi0xLjlzLTEuNC0zLTEuNC01LjFDODkwLDMwNy4zLDg5MC44LDMwNC4yLDg5Mi42LDMwMS4zeiBNODkzLjIsMzE0LjgKCQljMC4zLDEuMiwwLjksMS44LDEuOCwxLjhjMC44LDAsMS42LTAuNCwyLjMtMS4zczEuNC0yLjUsMi4xLTQuOWMwLjUtMS41LDAuOC0zLjEsMS4xLTQuOGMwLjMtMS43LDAuNC0zLjEsMC40LTQuMQoJCWMwLTEtMC4yLTEuOC0wLjUtMi41Yy0wLjMtMC43LTAuOS0xLjEtMS42LTEuMWMtMS43LDAtMy4yLDIuMi00LjQsNi41Yy0wLjksMy4zLTEuNCw2LjEtMS40LDguMwoJCUM4OTMsMzEzLjUsODkzLjEsMzE0LjIsODkzLjIsMzE0Ljh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTAzLDMxNi4zYzAuNS0wLjEsMC45LTAuNCwxLjItMC45YzAuMi0wLjUsMC42LTEuNywxLTMuN2wyLjEtMTFjMC4xLTAuNCwwLjEtMC43LDAuMi0xCgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNC0wLjEtMC43LTAuMy0wLjhzLTAuNi0wLjItMS4yLTAuMnYtMC44aDQuOGwxLjIsMTMuOWw2LjQtMTMuOWg0LjV2MC44Yy0wLjUsMC4xLTAuOCwwLjItMSwwLjQKCQljLTAuMywwLjMtMC41LDAuOC0wLjcsMS43bC0yLjYsMTMuM2MtMC4xLDAuMy0wLjEsMC42LTAuMiwwLjljMCwwLjMtMC4xLDAuNS0wLjEsMC43YzAsMC41LDAuMSwwLjgsMC4zLDAuOXMwLjYsMC4yLDEuMiwwLjN2MC44CgkJaC02LjV2LTAuOGMwLjctMC4xLDEuMi0wLjMsMS40LTAuNWMwLjMtMC4yLDAuNS0wLjgsMC42LTEuNmwyLjYtMTMuNmwtNy45LDE2LjhoLTAuNmwtMS40LTE2LjRsLTIuMSwxMC43Yy0wLjEsMC41LTAuMiwxLTAuMiwxLjQKCQljLTAuMSwwLjYtMC4xLDEuMS0wLjEsMS40YzAsMC43LDAuMiwxLjIsMC42LDEuNGMwLjIsMC4yLDAuNiwwLjIsMS4xLDAuM3YwLjhIOTAzVjMxNi4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkyMC43LDMxNi4zYzAuNS0wLjEsMC45LTAuNCwxLjItMC45YzAuMi0wLjUsMC42LTEuNywxLTMuN2wyLjEtMTFjMC4xLTAuNCwwLjEtMC43LDAuMi0xCgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNC0wLjEtMC43LTAuMy0wLjhjLTAuMi0wLjEtMC42LTAuMi0xLjItMC4ydi0wLjhoNC44bDEuMiwxMy45bDYuNC0xMy45aDQuNXYwLjgKCQljLTAuNSwwLjEtMC44LDAuMi0xLDAuNGMtMC4zLDAuMy0wLjUsMC44LTAuNywxLjdsLTIuNiwxMy4zYy0wLjEsMC4zLTAuMSwwLjYtMC4yLDAuOWMwLDAuMy0wLjEsMC41LTAuMSwwLjcKCQljMCwwLjUsMC4xLDAuOCwwLjMsMC45czAuNiwwLjIsMS4yLDAuM3YwLjhoLTYuNXYtMC44YzAuNy0wLjEsMS4yLTAuMywxLjQtMC41YzAuMy0wLjIsMC41LTAuOCwwLjYtMS42bDIuNi0xMy42bC03LjksMTYuOGgtMC42CgkJbC0xLjQtMTYuNGwtMi4xLDEwLjdjLTAuMSwwLjUtMC4yLDEtMC4yLDEuNGMtMC4xLDAuNi0wLjEsMS4xLTAuMSwxLjRjMCwwLjcsMC4yLDEuMiwwLjYsMS40YzAuMiwwLjIsMC42LDAuMiwxLjEsMC4zdjAuOGgtNC40CgkJVjMxNi4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkzOC41LDMxNi4zYzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNi0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuMy0wLjlzLTAuNi0wLjItMS4yLTAuM3YtMC44aDExLjNsLTAuOSw1LjZsLTAuNi0wLjFjMC0xLjQtMC4yLTIuNC0wLjUtMwoJCWMtMC41LTEtMS42LTEuNS0zLjItMS41Yy0wLjYsMC0wLjksMC4xLTEuMSwwLjNjLTAuMiwwLjItMC4zLDAuNS0wLjQsMS4xbC0xLjIsNi42YzEuNSwwLDIuNC0wLjIsMi44LTAuNXMwLjktMS4yLDEuNC0yLjZsMC42LDAuMQoJCWwtMS42LDguMWwtMC42LTAuMWMwLTAuMywwLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNi0yLjFjLTAuNC0wLjQtMS4yLTAuNi0yLjQtMC42bC0xLjQsNy4yCgkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4yLDAuMiwwLjUsMC4zLDAuOSwwLjNjMS4zLDAsMi40LTAuMiwzLjItMC44CgkJYzEuNC0wLjgsMi41LTIuMiwzLjMtNC4ybDAuNSwwLjFsLTEuMiw1LjdoLTExLjZWMzE2LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTUxLjYsMzE2LjNjMC41LTAuMSwwLjktMC40LDEuMi0wLjljMC4yLTAuNSwwLjYtMS43LDEtMy42bDIuNC0xMi4xbC0wLjEtMC4zYy0wLjItMC41LTAuNC0wLjktMC42LTEuMQoJCWMtMC4yLTAuMS0wLjUtMC4yLTEtMC4ydi0wLjhoNC4ybDQuNSwxMy42bDEuNi04LjNjMC4xLTAuNSwwLjItMSwwLjItMS40YzAuMS0wLjYsMC4xLTEuMSwwLjEtMS4zYzAtMC43LTAuMi0xLjItMC41LTEuNQoJCWMtMC4yLTAuMi0wLjYtMC4zLTEuMS0wLjN2LTAuOGg0LjN2MC44bC0wLjMsMC4xYy0wLjQsMC4xLTAuOCwwLjQtMSwxYy0wLjIsMC42LTAuNSwxLjctMC44LDMuNGwtMi45LDE1aC0wLjVsLTUuNC0xNi4zbC0yLjEsMTAuNgoJCWMtMC4yLDAuOS0wLjMsMS41LTAuMywyYzAsMC4zLTAuMSwwLjUtMC4xLDAuOGMwLDAuNywwLjIsMS4yLDAuNiwxLjRjMC4yLDAuMiwwLjYsMC4zLDEuMSwwLjN2MC44aC00LjRWMzE2LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTY3LjIsMzE2LjNjMC42LDAsMS4xLTAuMSwxLjMtMC4zYzAuNC0wLjMsMC43LTAuOSwwLjktMS44bDMuMS0xNS45Yy0xLDAtMS45LDAuMy0yLjcsMS4xCgkJYy0wLjcsMC43LTEuNCwxLjgtMS44LDMuMmwtMC41LTAuMmwwLjgtNWgxMS41TDk3OSwzMDNsLTAuNS0wLjFjMC0xLjktMC40LTMuMi0xLjEtMy45Yy0wLjQtMC40LTEtMC42LTEuOC0wLjZsLTIuOSwxNS4xbC0wLjIsMQoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywxYzAuMiwwLjEsMC43LDAuMiwxLjQsMC4zdjAuOGgtNi45VjMxNi4zeiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTk4NS41LDM5NC41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDOTkwLjUsMzkyLjMsOTg4LjMsMzk0LjUsOTg1LjUsMzk0LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q2IiBkPSJNOTg1LjUsMzk1aC0xNjBjLTMsMC01LjUtMi41LTUuNS01LjV2LTMxYzAtMywyLjUtNS41LDUuNS01LjVoMTYwYzMsMCw1LjUsMi41LDUuNSw1LjV2MzEKCQlDOTkxLDM5Mi41LDk4OC41LDM5NSw5ODUuNSwzOTV6IE04MjUuNSwzNTRjLTIuNSwwLTQuNSwyLTQuNSw0LjV2MzFjMCwyLjUsMiw0LjUsNC41LDQuNWgxNjBjMi41LDAsNC41LTIsNC41LTQuNXYtMzEKCQljMC0yLjUtMi00LjUtNC41LTQuNUg4MjUuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04MjkuMywzODMuM2MwLjQtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjktMTMuMmMwLTAuMywwLjEtMC41LDAuMS0wLjcKCQljMC0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMi0wLjlzLTAuNC0wLjItMC45LTAuM3YtMC44aDguMmwtMC43LDUuNmwtMC40LTAuMWMwLTEuNC0wLjEtMi40LTAuNC0zCgkJYy0wLjQtMS0xLjItMS41LTIuMy0xLjVjLTAuMywwLTAuNiwwLjEtMC43LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMywxLjFsLTAuOSw2LjVjMS0wLjEsMS43LTAuMiwyLTAuNWMwLjMtMC4zLDAuNy0xLjIsMS0yLjYKCQlsMC40LDAuMWwtMS4xLDguMWwtMC40LTAuMWMwLTAuMywwLTAuNSwwLTAuN3MwLTAuNCwwLTAuNWMwLTEtMC4xLTEuNy0wLjQtMi4xYy0wLjMtMC40LTAuOC0wLjYtMS43LTAuNmwtMSw3LjJjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjYsMC4xLDEsMC40LDEuMmMwLjIsMC4xLDAuNCwwLjIsMC43LDAuMnYwLjhoLTQuNVYzODMuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NDEuNSwzNjguM2MxLjMtMywyLjgtNC41LDQuNS00LjVjMS4xLDAsMiwwLjYsMi43LDEuOXMxLjEsMywxLjEsNS4yYzAsMy4yLTAuNiw2LjItMS45LDkuMQoJCWMtMS4zLDMuMS0yLjksNC42LTQuNiw0LjZjLTEuMSwwLTItMC42LTIuNy0xLjlzLTEtMy0xLTUuMUM4MzkuNiwzNzQuMyw4NDAuMiwzNzEuMiw4NDEuNSwzNjguM3ogTTg0MiwzODEuOAoJCWMwLjIsMS4yLDAuNywxLjgsMS4zLDEuOGMwLjYsMCwxLjItMC40LDEuNi0xLjNzMS0yLjUsMS41LTQuOWMwLjMtMS41LDAuNi0zLjEsMC44LTQuOGMwLjItMS43LDAuMy0zLjEsMC4zLTQuMQoJCWMwLTEtMC4xLTEuOC0wLjQtMi41Yy0wLjMtMC43LTAuNy0xLjEtMS4yLTEuMWMtMS4zLDAtMi4zLDIuMi0zLjIsNi41Yy0wLjcsMy4zLTEsNi4xLTEsOC4zQzg0MS44LDM4MC41LDg0MS45LDM4MS4yLDg0MiwzODEuOHoiCgkJLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NDkuMiwzODMuM2MwLjQtMC4xLDAuNi0wLjMsMC44LTAuNXMwLjMtMC44LDAuNC0xLjZsMS45LTEzLjJjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjUtMC4xLTAuOC0wLjItMC45Yy0wLjEtMC4xLTAuNC0wLjItMC45LTAuM3YtMC44aDQuMmMwLjksMCwxLjcsMC4yLDIuMiwwLjVjMSwwLjcsMS40LDEuOSwxLjQsMy43YzAsMC42LTAuMSwxLjMtMC4yLDIKCQljLTAuMiwwLjctMC40LDEuMy0wLjgsMS45Yy0wLjMsMC40LTAuNiwwLjctMC45LDFjLTAuMiwwLjEtMC41LDAuMy0xLDAuNWMwLjEsMC4zLDAuMSwwLjUsMC4xLDAuNmwxLjIsNi43CgkJYzAuMiwwLjksMC4zLDEuNSwwLjUsMS43YzAuMiwwLjIsMC41LDAuNCwwLjgsMC40djAuOGgtMy4xbC0xLjctOS44aC0wLjRsLTAuOSw2LjFsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC41LDAuMSwwLjksMC4yLDFzMC40LDAuMiwwLjksMC4zdjAuOGgtNC42VjM4My4zeiBNODU1LDM3My4xYzAuNS0wLjIsMC44LTAuNiwxLjEtMS4xYzAuMi0wLjQsMC4zLTAuOSwwLjUtMS42CgkJYzAuMi0wLjcsMC4yLTEuNCwwLjItMi4zYzAtMC44LTAuMS0xLjUtMC4zLTIuMWMtMC4yLTAuNS0wLjYtMC44LTEuMS0wLjhjLTAuMiwwLTAuNCwwLjEtMC41LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxbC0wLjksNi44CgkJQzg1NC40LDM3My4zLDg1NC44LDM3My4yLDg1NSwzNzMuMXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NjEuOSwzODMuM2MwLjQtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjktMTMuMmMwLTAuMywwLjEtMC42LDAuMS0wLjkKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOS0wLjMtMWMtMC4xLTAuMS0wLjQtMC4yLTAuOC0wLjJ2LTAuOGg0LjRjMC43LDAsMS40LDAuMiwxLjksMC42YzAuOSwwLjcsMS40LDIuMSwxLjQsNAoJCWMwLDEuOC0wLjQsMy4yLTEuMSw0LjJjLTAuOCwxLjEtMS43LDEuNi0zLDEuNmMtMC4yLDAtMC4zLDAtMC40LDBzLTAuNCwwLTAuOS0wLjFsLTAuOCw1LjlsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4yLDAuOWMwLjEsMC4xLDAuNCwwLjIsMC45LDAuM3YwLjhoLTQuNVYzODMuM3ogTTg2Ni41LDM3My42YzAuMSwwLDAuMiwwLDAuMywwLjEKCQljMC4xLDAsMC4yLDAsMC4yLDBjMC41LDAsMC45LTAuMSwxLjItMC40YzAuMy0wLjIsMC41LTAuNiwwLjctMS4yYzAuMi0wLjUsMC4zLTEuMiwwLjQtMmMwLjEtMC44LDAuMi0xLjUsMC4yLTIKCQljMC0wLjgtMC4xLTEuNS0wLjMtMmMtMC4yLTAuNS0wLjUtMC44LTEtMC44Yy0wLjIsMC0wLjQsMC4xLTAuNSwwLjNzLTAuMiwwLjUtMC4yLDFMODY2LjUsMzczLjZ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODczLjYsMzY3LjljMC0wLjMsMC4xLTAuNiwwLjEtMC45YzAtMC4zLDAtMC41LDAtMC44YzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjN2LTAuOAoJCWg0Ljd2MC44Yy0wLjUsMC4xLTAuOCwwLjItMSwwLjVjLTAuMiwwLjItMC4zLDAuOC0wLjUsMS43bC0xLjMsOC44Yy0wLjEsMC44LTAuMiwxLjQtMC4zLDEuOWMtMC4xLDAuOS0wLjIsMS42LTAuMiwyCgkJYzAsMSwwLjIsMS43LDAuNSwyLjJjMC4zLDAuNSwwLjgsMC44LDEuNCwwLjhjMSwwLDEuNy0wLjgsMi4zLTIuNGMwLjMtMC45LDAuNi0yLjUsMS00LjhsMC45LTYuMmMwLjEtMC45LDAuMi0xLjMsMC4xLTEuMgoJCWMwLjEtMC43LDAuMS0xLjMsMC4xLTEuNmMwLTAuNy0wLjEtMS4yLTAuNC0xLjRjLTAuMi0wLjItMC40LTAuMy0wLjgtMC4zdi0wLjhoMy4xdjAuOGMtMC40LDAuMS0wLjcsMC40LTAuOSwwLjkKCQljLTAuMiwwLjUtMC40LDEuNy0wLjcsMy42bC0xLDYuN2MtMC40LDIuNy0wLjgsNC42LTEuMiw1LjZjLTAuNywxLjgtMS44LDIuNy0zLjIsMi43Yy0xLDAtMS44LTAuNC0yLjQtMS4zcy0xLTIuMS0xLTMuNwoJCWMwLTAuNiwwLTEuMywwLjEtMmMwLjEtMC41LDAuMi0xLjIsMC4zLTIuNEw4NzMuNiwzNjcuOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04ODEuMSwzODMuM2MwLjMtMC4xLDAuNi0wLjIsMC43LTAuNGMwLjItMC4zLDAuNC0wLjksMC41LTEuN2wxLjktMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjMsMC0wLjUsMC0wLjZjMC0wLjUtMC4xLTAuOS0wLjItMWMtMC4yLTAuMS0wLjQtMC4yLTAuOS0wLjN2LTAuOGg0LjJjMS4xLDAsMiwwLjMsMi43LDFjMC42LDAuNywwLjksMS44LDAuOSwzLjQKCQljMCwxLjUtMC40LDIuNy0xLjIsMy42Yy0wLjQsMC41LTEsMC45LTEuNywxLjJjMC42LDAuNCwxLjEsMC45LDEuNCwxLjNjMC41LDAuNywwLjcsMS44LDAuNywzYzAsMS42LTAuMywzLjEtMSw0LjMKCQljLTAuNywxLjItMS45LDEuOC0zLjUsMS44aC00LjZWMzgzLjN6IE04ODQuOSwzODNjMC4xLDAuMSwwLjMsMC4xLDAuNiwwLjFjMSwwLDEuNy0wLjksMi4xLTIuNmMwLjMtMSwwLjQtMi4xLDAuNC0zLjIKCQljMC0xLjQtMC4yLTIuMy0wLjctMi43Yy0wLjMtMC4zLTAuOC0wLjUtMS42LTAuNWwtMSw3LjJjMCwwLjEsMCwwLjIsMCwwLjRjMCwwLjEsMCwwLjMsMCwwLjVDODg0LjUsMzgyLjYsODg0LjYsMzgyLjgsODg0LjksMzgzegoJCSBNODg3LjMsMzcyLjhjMC4zLTAuMSwwLjUtMC40LDAuOC0wLjhjMC4zLTAuNSwwLjUtMS4yLDAuNi0yLjFjMC4xLTAuNiwwLjEtMS4yLDAuMS0xLjdjMC0wLjktMC4xLTEuNi0wLjMtMi4xCgkJYy0wLjItMC41LTAuNi0wLjgtMS4xLTAuOGMtMC4yLDAtMC40LDAuMS0wLjUsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4yLDFsLTAuOSw2LjZDODg2LjUsMzczLjEsODg3LDM3Mi45LDg4Ny4zLDM3Mi44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg5MC43LDM4My4zYzAuNC0wLjEsMC42LTAuMywwLjgtMC41YzAuMi0wLjMsMC4zLTAuOCwwLjQtMS42bDEuOS0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjEtMC45CgkJYzAtMC4zLDAtMC41LDAtMC43YzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjN2LTAuOGg0Ljl2MC44Yy0wLjUsMC4xLTAuOSwwLjMtMS4xLDAuNQoJCWMtMC4yLDAuMi0wLjMsMC44LTAuNSwxLjZsLTIsMTQuMWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMiwwLjdjMC4xLDAuMSwwLjQsMC4yLDAuNiwwLjIKCQljMS4xLDAsMi0wLjMsMi43LTFjMC44LTAuNywxLjQtMiwyLTMuOWwwLjQsMC4xbC0wLjksNS43aC04LjVWMzgzLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODk5LjQsMzgzLjNjMC40LTAuMSwwLjYtMC4zLDAuOC0wLjVzMC4zLTAuOCwwLjQtMS42bDEuOS0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjEtMC45YzAtMC4zLDAtMC41LDAtMC43CgkJYzAtMC41LTAuMS0wLjgtMC4yLTAuOXMtMC40LTAuMi0wLjktMC4zdi0wLjhoNC42djAuOGMtMC40LDAuMS0wLjYsMC4zLTAuOCwwLjVjLTAuMiwwLjItMC4zLDAuOC0wLjQsMS42bC0xLjksMTMuMmwtMC4xLDEKCQljMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjIsMC45YzAuMSwwLjEsMC40LDAuMiwwLjksMC4zdjAuOGgtNC42VjM4My4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkxMy4zLDM2NC4yYzAuNiwwLjMsMC45LDAuNCwxLDAuNGMwLjIsMCwwLjMtMC4xLDAuNC0wLjJjMC4xLTAuMiwwLjItMC40LDAuMi0wLjZoMC41bC0wLjgsNi45bC0wLjUtMC4yCgkJYzAtMC40LDAtMC43LDAtMC43YzAtMC4xLDAtMC4yLDAtMC4zYzAtMS42LTAuMi0yLjctMC42LTMuNWMtMC40LTAuOC0wLjktMS4xLTEuNC0xLjFjLTEuMiwwLTIuMiwxLjUtMy4xLDQuNgoJCWMtMC44LDIuNy0xLjIsNS41LTEuMiw4LjNjMCwyLDAuMiwzLjQsMC43LDQuMmMwLjUsMC44LDEsMS4xLDEuNiwxLjFjMC44LDAsMS41LTAuNSwyLjEtMS40YzAuNC0wLjUsMC43LTEuMiwxLjEtMi4xbDAuNSwwLjYKCQljLTAuNSwxLjUtMS4yLDIuNi0xLjksMy4zYy0wLjcsMC43LTEuNSwxLjEtMi4yLDEuMWMtMS4yLDAtMi4yLTAuNy0zLTIuMWMtMC44LTEuNC0xLjItMy4yLTEuMi01LjZjMC0zLjYsMC42LTYuNiwxLjgtOS4yCgkJYzEuMi0yLjYsMi43LTMuOSw0LjQtMy45QzkxMi4yLDM2My44LDkxMi43LDM2NCw5MTMuMywzNjQuMnoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MTcuNCwzODMuM2MwLjQtMC4xLDAuNi0wLjMsMC44LTAuNXMwLjMtMC44LDAuNC0xLjZsMS45LTEzLjJjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjUtMC4xLTAuOC0wLjItMC45Yy0wLjEtMC4xLTAuNC0wLjItMC45LTAuM3YtMC44aDQuMmMwLjksMCwxLjcsMC4yLDIuMiwwLjVjMSwwLjcsMS40LDEuOSwxLjQsMy43YzAsMC42LTAuMSwxLjMtMC4yLDIKCQlzLTAuNCwxLjMtMC44LDEuOWMtMC4zLDAuNC0wLjYsMC43LTAuOSwxYy0wLjIsMC4xLTAuNSwwLjMtMSwwLjVjMCwwLjMsMC4xLDAuNSwwLjEsMC42bDEuMiw2LjdjMC4yLDAuOSwwLjMsMS41LDAuNSwxLjcKCQljMC4yLDAuMiwwLjUsMC40LDAuOCwwLjR2MC44SDkyNGwtMS43LTkuOGgtMC40bC0wLjksNi4xbC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC45LDAuMiwxCgkJYzAuMSwwLjEsMC40LDAuMiwwLjksMC4zdjAuOGgtNC42VjM4My4zeiBNOTIzLjMsMzczLjFjMC41LTAuMiwwLjgtMC42LDEuMS0xLjFjMC4yLTAuNCwwLjMtMC45LDAuNS0xLjZjMC4yLTAuNywwLjItMS40LDAuMi0yLjMKCQljMC0wLjgtMC4xLTEuNS0wLjMtMi4xcy0wLjYtMC44LTEuMS0wLjhjLTAuMiwwLTAuNCwwLjEtMC41LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxbC0wLjksNi44CgkJQzkyMi42LDM3My4zLDkyMywzNzMuMiw5MjMuMywzNzMuMXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MjcsMzgzLjNjMC40LTAuMSwwLjYtMC4zLDAuOC0wLjVjMC4yLTAuMywwLjMtMC44LDAuNC0xLjZsMS45LTEzLjJjMC0wLjMsMC4xLTAuNiwwLjEtMC45CgkJYzAtMC4zLDAtMC41LDAtMC43YzAtMC41LTAuMS0wLjgtMC4yLTAuOXMtMC40LTAuMi0wLjktMC4zdi0wLjhoOC4zbC0wLjcsNS42bC0wLjQtMC4xYzAtMS40LTAuMS0yLjQtMC40LTMKCQljLTAuNC0xLTEuMi0xLjUtMi40LTEuNWMtMC40LDAtMC43LDAuMS0wLjgsMC4zcy0wLjIsMC41LTAuMywxLjFsLTAuOSw2LjZjMS4xLDAsMS44LTAuMiwyLjEtMC41YzAuMy0wLjMsMC43LTEuMiwxLjEtMi42bDAuNCwwLjEKCQlsLTEuMSw4LjFsLTAuNC0wLjFjMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMi0xLjgtMC41LTIuMXMtMC45LTAuNi0xLjgtMC42bC0xLDcuMmMwLDAuMiwwLDAuMy0wLjEsMC41CgkJczAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4yLDAuN2MwLjEsMC4yLDAuMywwLjMsMC43LDAuM2MwLjksMCwxLjctMC4yLDIuNC0wLjhjMS0wLjgsMS44LTIuMiwyLjQtNC4ybDAuNCwwLjFsLTAuOSw1LjdIOTI3CgkJVjM4My4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkzNi43LDM4My4zYzAuNC0wLjEsMC42LTAuMywwLjgtMC41YzAuMi0wLjMsMC4zLTAuOCwwLjQtMS42bDEuOS0xMy4yYzAuMS0wLjQsMC4xLTAuNywwLjEtMC45CgkJYzAtMC4zLDAtMC41LDAtMC43YzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjN2LTAuOGg0Ljl2MC44Yy0wLjUsMC4xLTAuOSwwLjMtMS4xLDAuNQoJCWMtMC4yLDAuMi0wLjMsMC44LTAuNSwxLjZsLTIsMTQuMWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMiwwLjdjMC4yLDAuMSwwLjQsMC4yLDAuNiwwLjIKCQljMS4xLDAsMi0wLjMsMi43LTFjMC44LTAuNywxLjQtMiwyLTMuOWwwLjQsMC4xbC0wLjksNS43aC04LjVWMzgzLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTQ1LjMsMzgzLjNjMC40LTAuMSwwLjYtMC4zLDAuOC0wLjVzMC4zLTAuOCwwLjQtMS42bDEuOS0xMy4yYzAtMC4zLDAuMS0wLjYsMC4xLTAuOWMwLTAuMywwLTAuNSwwLTAuNwoJCWMwLTAuNS0wLjEtMC44LTAuMi0wLjljLTAuMS0wLjEtMC40LTAuMi0wLjktMC4zdi0wLjhoOC4zbC0wLjcsNS42bC0wLjQtMC4xYzAtMS40LTAuMS0yLjQtMC40LTNjLTAuNC0xLTEuMi0xLjUtMi40LTEuNQoJCWMtMC40LDAtMC43LDAuMS0wLjgsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDEuMWwtMC45LDYuNmMxLjEsMCwxLjgtMC4yLDIuMS0wLjVjMC4zLTAuMywwLjctMS4yLDEuMS0yLjZsMC40LDAuMWwtMS4xLDguMQoJCUw5NTIsMzc4YzAtMC4zLDAtMC41LDAtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNS0yLjFzLTAuOS0wLjYtMS44LTAuNmwtMSw3LjJjMCwwLjIsMCwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNAoJCWMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4xLDAuMiwwLjMsMC4zLDAuNywwLjNjMC45LDAsMS43LTAuMiwyLjQtMC44YzEtMC44LDEuOC0yLjIsMi40LTQuMmwwLjQsMC4xbC0wLjksNS43aC04LjVWMzgzLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTU0LjUsMzgzLjNjMC4zLTAuMiwwLjUtMC4zLDAuNi0wLjVjMC4yLTAuMywwLjQtMC44LDAuNy0xLjZsNS43LTE3LjRoMC40bDEuNSwxNi45YzAuMSwxLjEsMC4yLDEuOCwwLjQsMi4xCgkJYzAuMSwwLjMsMC40LDAuNCwwLjksMC41djAuN0g5NjB2LTAuN2MwLjQtMC4xLDAuOC0wLjIsMC45LTAuNGMwLjItMC4yLDAuMy0wLjYsMC4zLTEuM2MwLTAuMiwwLTAuOC0wLjEtMS42CgkJYzAtMC4yLTAuMS0wLjktMC4xLTIuMWgtMy4zbC0wLjksM2MtMC4xLDAuMi0wLjEsMC40LTAuMiwwLjdjMCwwLjItMC4xLDAuNS0wLjEsMC43YzAsMC40LDAuMSwwLjcsMC4yLDAuOHMwLjQsMC4yLDAuOCwwLjN2MC43aC0zCgkJVjM4My4zeiBNOTYwLjksMzc2LjdsLTAuNi03LjJsLTIuMyw3LjJIOTYwLjl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTY1LDM4NC42bDAuNi02LjZsMC40LDAuMWMwLDAuOSwwLjEsMS42LDAuMSwyLjFjMC4xLDAuNywwLjMsMS40LDAuNSwxLjljMC4yLDAuNSwwLjUsMC45LDAuOCwxLjIKCQlzMC42LDAuNCwxLDAuNGMwLjYsMCwxLjEtMC40LDEuNC0xLjFjMC4zLTAuOCwwLjUtMS42LDAuNS0yLjZjMC0xLjItMC42LTIuOC0xLjktNC43Yy0xLjMtMi0xLjktMy44LTEuOS01LjUKCQljMC0xLjYsMC4zLTIuOSwwLjgtNC4xYzAuNi0xLjEsMS4zLTEuNywyLjMtMS43YzAuMywwLDAuNiwwLjEsMC44LDAuMmMwLjIsMC4xLDAuNCwwLjEsMC41LDAuMmwwLjQsMC4yYzAuMSwwLDAuMiwwLjEsMC4zLDAuMQoJCXMwLjIsMC4xLDAuMiwwLjFjMC4yLDAsMC4zLTAuMSwwLjQtMC4yYzAuMS0wLjEsMC4yLTAuMywwLjItMC41aDAuNWwtMC42LDUuOWwtMC40LTAuMWwtMC4xLTFjLTAuMS0wLjktMC4yLTEuNy0wLjQtMi4zCgkJYy0wLjQtMS0wLjktMS41LTEuNi0xLjVjLTAuNiwwLTEsMC40LTEuMywxLjJjLTAuMiwwLjUtMC4zLDEuMS0wLjMsMS44YzAsMC43LDAuMSwxLjMsMC4zLDEuOGMwLjEsMC4zLDAuMywwLjYsMC41LDAuOWwxLjMsMi4xCgkJYzAuNSwwLjcsMC45LDEuNiwxLjIsMi41YzAuMywwLjksMC41LDIsMC41LDMuMmMwLDEuNi0wLjMsMy0xLDQuMnMtMS41LDEuOS0yLjYsMS45Yy0wLjMsMC0wLjYtMC4xLTAuOC0wLjIKCQljLTAuMy0wLjEtMC42LTAuMi0wLjgtMC40bC0wLjQtMC4zYy0wLjEtMC4xLTAuMi0wLjItMC4zLTAuMmMwLDAtMC4xLDAtMC4yLDBjLTAuMiwwLTAuMywwLjEtMC40LDAuMnMtMC4yLDAuNC0wLjIsMC44SDk2NXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NzIuMywzODMuM2MwLjQtMC4xLDAuNi0wLjMsMC44LTAuNXMwLjMtMC44LDAuNC0xLjZsMS45LTEzLjJjMC0wLjMsMC4xLTAuNiwwLjEtMC45YzAtMC4zLDAtMC41LDAtMC43CgkJYzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjN2LTAuOGg4LjNsLTAuNyw1LjZsLTAuNC0wLjFjMC0xLjQtMC4xLTIuNC0wLjQtM2MtMC40LTEtMS4yLTEuNS0yLjQtMS41CgkJYy0wLjQsMC0wLjcsMC4xLTAuOCwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjMsMS4xbC0wLjksNi42YzEuMSwwLDEuOC0wLjIsMi4xLTAuNXMwLjctMS4yLDEuMS0yLjZsMC40LDAuMWwtMS4xLDguMUw5NzksMzc4CgkJYzAtMC4zLDAtMC41LDAtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjItMS44LTAuNS0yLjFzLTAuOS0wLjYtMS44LTAuNmwtMSw3LjJjMCwwLjIsMCwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNAoJCWMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4xLDAuMiwwLjMsMC4zLDAuNywwLjNjMC45LDAsMS43LTAuMiwyLjQtMC44YzEtMC44LDEuOC0yLjIsMi40LTQuMmwwLjQsMC4xbC0wLjksNS43aC04LjVWMzgzLjN6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNOTg1LjUsNDYxLjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUM5OTAuNSw0NTkuMyw5ODguMyw0NjEuNSw5ODUuNSw0NjEuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik05ODUuNSw0NjJoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUM5OTEsNDU5LjUsOTg4LjUsNDYyLDk4NS41LDQ2MnogTTgyNS41LDQyMWMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SDgyNS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTgyOS4yLDQ1MC4zYzAuNC0wLjEsMC43LTAuMywwLjktMC41YzAuMi0wLjMsMC4zLTAuOCwwLjUtMS42bDItMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4xLTAuOQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0wLjljLTAuMi0wLjEtMC41LTAuMi0xLTAuM3YtMC44aDQuOXYwLjhjLTAuNCwwLjEtMC43LDAuMy0wLjksMC41Yy0wLjIsMC4yLTAuMywwLjgtMC41LDEuNgoJCWwtMiwxMy4ybC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMiwwLjljMC4yLDAuMSwwLjUsMC4yLDEsMC4zdjAuOGgtNC45VjQ1MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTgzNC45LDQ1MC4zYzAuNC0wLjEsMC43LTAuNCwwLjktMC45YzAuMi0wLjUsMC40LTEuNywwLjgtMy42bDEuOS0xMi4xbC0wLjEtMC4zYy0wLjEtMC41LTAuMy0wLjktMC41LTEuMQoJCWMtMC4xLTAuMS0wLjQtMC4yLTAuOC0wLjJ2LTAuOGgzLjNsMy42LDEzLjZsMS4zLTguM2MwLjEtMC41LDAuMS0xLDAuMi0xLjRjMC4xLTAuNiwwLjEtMS4xLDAuMS0xLjNjMC0wLjctMC4xLTEuMi0wLjQtMS41CgkJYy0wLjItMC4yLTAuNS0wLjMtMC45LTAuM3YtMC44aDMuNHYwLjhsLTAuMiwwLjFjLTAuMywwLjEtMC42LDAuNC0wLjgsMWMtMC4yLDAuNi0wLjQsMS43LTAuNywzLjRsLTIuMywxNWgtMC40bC00LjMtMTYuMwoJCWwtMS42LDEwLjZjLTAuMSwwLjktMC4yLDEuNS0wLjMsMmMwLDAuMywwLDAuNSwwLDAuOGMwLDAuNywwLjEsMS4yLDAuNCwxLjRjMC4yLDAuMiwwLjUsMC4zLDAuOSwwLjN2MC44aC0zLjRWNDUwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODQ2LjIsNDUwLjNjMC40LTAuMSwwLjctMC4zLDAuOS0wLjVjMC4yLTAuMywwLjMtMC44LDAuNS0xLjZsMi0xMy4yYzAtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCWMwLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4yLTAuMS0wLjUtMC4yLTEtMC4zdi0wLjhoOC44bC0wLjcsNS42bC0wLjQtMC4xYzAtMS40LTAuMS0yLjQtMC40LTMKCQljLTAuNC0xLTEuMy0xLjUtMi41LTEuNWMtMC40LDAtMC42LDAuMS0wLjgsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDEuMWwtMSw2LjVjMS4xLTAuMSwxLjgtMC4yLDIuMi0wLjVjMC4zLTAuMywwLjctMS4yLDEuMS0yLjYKCQlsMC41LDAuMWwtMS4yLDguMWwtMC41LTAuMWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4xLTEuNy0wLjQtMi4xYy0wLjMtMC40LTAuOS0wLjYtMS44LTAuNmwtMS4xLDcuMgoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNiwwLjEsMSwwLjQsMS4yYzAuMiwwLjEsMC40LDAuMiwwLjgsMC4ydjAuOGgtNC45VjQ1MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg1OS40LDQzNS4zYzEuNC0zLDMuMS00LjUsNC44LTQuNWMxLjIsMCwyLjIsMC42LDIuOSwxLjlzMS4xLDMsMS4xLDUuMmMwLDMuMi0wLjcsNi4yLTIsOS4xCgkJYy0xLjQsMy4xLTMuMSw0LjYtNSw0LjZjLTEuMiwwLTIuMS0wLjYtMi45LTEuOXMtMS4xLTMtMS4xLTUuMUM4NTcuMyw0NDEuMyw4NTgsNDM4LjIsODU5LjQsNDM1LjN6IE04NTkuOSw0NDguOAoJCWMwLjMsMS4yLDAuNywxLjgsMS40LDEuOGMwLjcsMCwxLjItMC40LDEuOC0xLjNzMS4xLTIuNSwxLjctNC45YzAuNC0xLjUsMC42LTMuMSwwLjgtNC44YzAuMi0xLjcsMC4zLTMuMSwwLjMtNC4xCgkJYzAtMS0wLjEtMS44LTAuNC0yLjVjLTAuMy0wLjctMC43LTEuMS0xLjMtMS4xYy0xLjQsMC0yLjUsMi4yLTMuNSw2LjVjLTAuNywzLjMtMS4xLDYuMS0xLjEsOC4zCgkJQzg1OS43LDQ0Ny41LDg1OS44LDQ0OC4yLDg1OS45LDQ0OC44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg2Ny42LDQ1MC4zYzAuNC0wLjEsMC43LTAuMywwLjktMC41czAuMy0wLjgsMC41LTEuNmwyLTEzLjJjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjUtMC4xLTAuOC0wLjItMC45Yy0wLjItMC4xLTAuNS0wLjItMS0wLjN2LTAuOGg0LjVjMSwwLDEuOCwwLjIsMi40LDAuNWMxLDAuNywxLjUsMS45LDEuNSwzLjdjMCwwLjYtMC4xLDEuMy0wLjMsMgoJCXMtMC41LDEuMy0wLjksMS45Yy0wLjMsMC40LTAuNiwwLjctMSwxYy0wLjIsMC4xLTAuNiwwLjMtMS4xLDAuNWMwLjEsMC4zLDAuMSwwLjUsMC4xLDAuNmwxLjMsNi43YzAuMiwwLjksMC40LDEuNSwwLjYsMS43CgkJYzAuMiwwLjIsMC41LDAuNCwwLjksMC40djAuOGgtMy4zbC0xLjgtOS44aC0wLjVsLTEsNi4xbC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC45LDAuMiwxCgkJczAuNSwwLjIsMSwwLjN2MC44aC00LjlWNDUwLjN6IE04NzMuOSw0NDAuMWMwLjUtMC4yLDAuOS0wLjYsMS4yLTEuMWMwLjItMC40LDAuNC0wLjksMC41LTEuNmMwLjItMC43LDAuMi0xLjQsMC4yLTIuMwoJCWMwLTAuOC0wLjEtMS41LTAuMy0yLjFzLTAuNi0wLjgtMS4yLTAuOGMtMC4yLDAtMC40LDAuMS0wLjUsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDFsLTEsNi44CgkJQzg3My4yLDQ0MC4zLDg3My43LDQ0MC4yLDg3My45LDQ0MC4xeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg3Ny45LDQ1MC4zYzAuNC0wLjEsMC43LTAuNCwwLjktMC45YzAuMi0wLjUsMC40LTEuNywwLjgtMy43bDEuNy0xMWMwLjEtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC40LTAuMS0wLjctMC4yLTAuOHMtMC41LTAuMi0wLjktMC4ydi0wLjhoMy44bDAuOSwxMy45bDUtMTMuOWgzLjV2MC44Yy0wLjQsMC4xLTAuNiwwLjItMC44LDAuNAoJCWMtMC4yLDAuMy0wLjQsMC44LTAuNSwxLjdsLTIsMTMuM2MwLDAuMy0wLjEsMC42LTAuMSwwLjljMCwwLjMtMC4xLDAuNS0wLjEsMC43YzAsMC41LDAuMSwwLjgsMC4yLDAuOXMwLjUsMC4yLDEsMC4zdjAuOGgtNS4yCgkJdi0wLjhjMC42LTAuMSwwLjktMC4zLDEuMS0wLjVzMC40LTAuOCwwLjUtMS42bDIuMS0xMy42bC02LjIsMTYuOGgtMC41TDg4Miw0MzVsLTEuNywxMC43Yy0wLjEsMC41LTAuMiwxLTAuMiwxLjQKCQljLTAuMSwwLjYtMC4xLDEuMS0wLjEsMS40YzAsMC43LDAuMiwxLjIsMC41LDEuNGMwLjIsMC4yLDAuNSwwLjIsMC45LDAuM3YwLjhoLTMuNFY0NTAuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04OTEuNSw0NTAuM2MwLjMtMC4yLDAuNS0wLjMsMC43LTAuNWMwLjItMC4zLDAuNS0wLjgsMC43LTEuNmw2LjEtMTcuNGgwLjRsMS42LDE2LjljMC4xLDEuMSwwLjIsMS44LDAuNCwyLjEKCQljMC4yLDAuMywwLjUsMC40LDEsMC41djAuN2gtNXYtMC43YzAuNS0wLjEsMC44LTAuMiwxLTAuNGMwLjItMC4yLDAuMy0wLjYsMC4zLTEuM2MwLTAuMiwwLTAuOC0wLjEtMS42YzAtMC4yLTAuMS0wLjktMC4yLTIuMQoJCWgtMy42bC0xLDNjLTAuMSwwLjItMC4xLDAuNC0wLjIsMC43cy0wLjEsMC41LTAuMSwwLjdjMCwwLjQsMC4xLDAuNywwLjIsMC44czAuNCwwLjIsMC45LDAuM3YwLjdoLTMuMlY0NTAuM3ogTTg5OC40LDQ0My43CgkJbC0wLjYtNy4ybC0yLjQsNy4ySDg5OC40eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkwMi41LDQ1MC4zYzAuNSwwLDAuOS0wLjEsMS0wLjNjMC4zLTAuMywwLjUtMC45LDAuNy0xLjhsMi40LTE1LjljLTAuOCwwLTEuNSwwLjMtMi4xLDEuMQoJCWMtMC42LDAuNy0xLjEsMS44LTEuNSwzLjJsLTAuNC0wLjJsMC42LTVoOS4xbC0wLjYsNS43bC0wLjQtMC4xYzAtMS45LTAuMy0zLjItMC45LTMuOWMtMC4zLTAuNC0wLjgtMC42LTEuNC0wLjZsLTIuMywxNS4xbC0wLjEsMQoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywxYzAuMiwwLjEsMC41LDAuMiwxLjEsMC4zdjAuOGgtNS41VjQ1MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkxMC44LDQ1MC4zYzAuNC0wLjEsMC43LTAuMywwLjktMC41czAuMy0wLjgsMC41LTEuNmwyLTEzLjJjMC4xLTAuNCwwLjEtMC43LDAuMS0wLjljMC0wLjMsMC0wLjUsMC0wLjcKCQljMC0wLjUtMC4xLTAuOC0wLjItMC45cy0wLjUtMC4yLTEtMC4zdi0wLjhoNC45djAuOGMtMC40LDAuMS0wLjcsMC4zLTAuOSwwLjVjLTAuMiwwLjItMC4zLDAuOC0wLjUsMS42bC0yLDEzLjJsLTAuMSwxCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4yLDAuOWMwLjIsMC4xLDAuNSwwLjIsMSwwLjN2MC44aC00LjlWNDUwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTE5LjQsNDM1LjNjMS40LTMsMy4xLTQuNSw0LjgtNC41YzEuMiwwLDIuMiwwLjYsMi45LDEuOXMxLjEsMywxLjEsNS4yYzAsMy4yLTAuNyw2LjItMiw5LjEKCQljLTEuNCwzLjEtMy4xLDQuNi01LDQuNmMtMS4yLDAtMi4xLTAuNi0yLjktMS45cy0xLjEtMy0xLjEtNS4xQzkxNy40LDQ0MS4zLDkxOCw0MzguMiw5MTkuNCw0MzUuM3ogTTkxOS45LDQ0OC44CgkJYzAuMywxLjIsMC43LDEuOCwxLjQsMS44YzAuNywwLDEuMi0wLjQsMS44LTEuM2MwLjUtMC45LDEuMS0yLjUsMS43LTQuOWMwLjQtMS41LDAuNi0zLjEsMC44LTQuOGMwLjItMS43LDAuMy0zLjEsMC4zLTQuMQoJCWMwLTEtMC4xLTEuOC0wLjQtMi41Yy0wLjMtMC43LTAuNy0xLjEtMS4zLTEuMWMtMS40LDAtMi41LDIuMi0zLjUsNi41Yy0wLjcsMy4zLTEuMSw2LjEtMS4xLDguMwoJCUM5MTkuNyw0NDcuNSw5MTkuOCw0NDguMiw5MTkuOSw0NDguOHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MjcuNyw0NTAuM2MwLjQtMC4xLDAuNy0wLjQsMC45LTAuOWMwLjItMC41LDAuNC0xLjcsMC44LTMuNmwxLjktMTIuMWwtMC4xLTAuM2MtMC4xLTAuNS0wLjMtMC45LTAuNS0xLjEKCQljLTAuMS0wLjEtMC40LTAuMi0wLjgtMC4ydi0wLjhoMy4zbDMuNiwxMy42bDEuMy04LjNjMC4xLTAuNSwwLjEtMSwwLjItMS40YzAuMS0wLjYsMC4xLTEuMSwwLjEtMS4zYzAtMC43LTAuMS0xLjItMC40LTEuNQoJCWMtMC4yLTAuMi0wLjUtMC4zLTAuOS0wLjN2LTAuOGgzLjR2MC44bC0wLjIsMC4xYy0wLjMsMC4xLTAuNiwwLjQtMC44LDFjLTAuMiwwLjYtMC40LDEuNy0wLjcsMy40bC0yLjMsMTVoLTAuNGwtNC4zLTE2LjMKCQlsLTEuNiwxMC42Yy0wLjEsMC45LTAuMiwxLjUtMC4zLDJjMCwwLjMsMCwwLjUsMCwwLjhjMCwwLjcsMC4xLDEuMiwwLjQsMS40YzAuMiwwLjIsMC41LDAuMywwLjksMC4zdjAuOGgtMy40VjQ1MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTk0NS4zLDQzNS4zYzEuNC0zLDMuMS00LjUsNC44LTQuNWMxLjIsMCwyLjIsMC42LDIuOSwxLjlzMS4xLDMsMS4xLDUuMmMwLDMuMi0wLjcsNi4yLTIsOS4xCgkJYy0xLjQsMy4xLTMuMSw0LjYtNSw0LjZjLTEuMiwwLTIuMS0wLjYtMi45LTEuOXMtMS4xLTMtMS4xLTUuMUM5NDMuMiw0NDEuMyw5NDMuOSw0MzguMiw5NDUuMyw0MzUuM3ogTTk0NS44LDQ0OC44CgkJYzAuMywxLjIsMC43LDEuOCwxLjQsMS44YzAuNywwLDEuMi0wLjQsMS44LTEuM2MwLjUtMC45LDEuMS0yLjUsMS43LTQuOWMwLjQtMS41LDAuNi0zLjEsMC44LTQuOGMwLjItMS43LDAuMy0zLjEsMC4zLTQuMQoJCWMwLTEtMC4xLTEuOC0wLjQtMi41Yy0wLjMtMC43LTAuNy0xLjEtMS4zLTEuMWMtMS40LDAtMi41LDIuMi0zLjUsNi41Yy0wLjcsMy4zLTEuMSw2LjEtMS4xLDguMwoJCUM5NDUuNiw0NDcuNSw5NDUuNyw0NDguMiw5NDUuOCw0NDguOHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NTMuNiw0NTAuM2MwLjQtMC4xLDAuNy0wLjQsMC45LTAuOWMwLjItMC41LDAuNC0xLjcsMC44LTMuNmwxLjktMTIuMWwtMC4xLTAuM2MtMC4xLTAuNS0wLjMtMC45LTAuNS0xLjEKCQljLTAuMS0wLjEtMC40LTAuMi0wLjgtMC4ydi0wLjhoMy4zbDMuNiwxMy42bDEuMy04LjNjMC4xLTAuNSwwLjEtMSwwLjItMS40YzAuMS0wLjYsMC4xLTEuMSwwLjEtMS4zYzAtMC43LTAuMS0xLjItMC40LTEuNQoJCWMtMC4yLTAuMi0wLjUtMC4zLTAuOS0wLjN2LTAuOGgzLjR2MC44bC0wLjIsMC4xYy0wLjMsMC4xLTAuNiwwLjQtMC44LDFjLTAuMiwwLjYtMC40LDEuNy0wLjcsMy40bC0yLjMsMTVoLTAuNGwtNC4zLTE2LjMKCQlsLTEuNiwxMC42Yy0wLjEsMC45LTAuMiwxLjUtMC4zLDJjMCwwLjMsMCwwLjUsMCwwLjhjMCwwLjcsMC4xLDEuMiwwLjQsMS40YzAuMiwwLjIsMC41LDAuMywwLjksMC4zdjAuOGgtMy40VjQ1MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTk2NC45LDQ1MC4zYzAuNC0wLjEsMC43LTAuMywwLjktMC41YzAuMi0wLjMsMC4zLTAuOCwwLjUtMS42bDItMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4xLTAuOQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0wLjljLTAuMi0wLjEtMC41LTAuMi0xLTAuM3YtMC44aDUuMnYwLjhjLTAuNiwwLjEtMSwwLjMtMS4yLDAuNWMtMC4yLDAuMi0wLjQsMC44LTAuNSwxLjYKCQlsLTIuMiwxNC4xYzAsMC4yLDAsMC4zLTAuMSwwLjRjMCwwLjEsMCwwLjMsMCwwLjVjMCwwLjMsMC4xLDAuNiwwLjIsMC43YzAuMiwwLjEsMC40LDAuMiwwLjcsMC4yYzEuMSwwLDIuMS0wLjMsMi45LTEKCQljMC44LTAuNywxLjYtMiwyLjItMy45bDAuNCwwLjFsLTEsNS43aC05LjJWNDUwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTc0LjgsNDUwLjNjMC41LTAuMSwwLjktMC4yLDEuMS0wLjRjMC4zLTAuMywwLjUtMC44LDAuNi0xLjdsMS02LjRsLTEuNC03LjljLTAuMS0wLjctMC4zLTEuMi0wLjQtMS40CgkJYy0wLjEtMC4yLTAuNC0wLjQtMC44LTAuNHYtMC44aDQuNnYwLjhjLTAuNCwwLTAuNywwLjEtMC45LDAuMnMtMC4zLDAuNC0wLjMsMC44YzAsMC4xLDAsMC4zLDAsMC41czAsMC40LDAuMSwwLjZsMS4yLDYuNGwyLjItNS41CgkJYzAuMS0wLjMsMC4yLTAuNSwwLjMtMC44YzAuMS0wLjQsMC4yLTAuOCwwLjItMS4xYzAtMC41LTAuMS0wLjgtMC40LTFjLTAuMS0wLjEtMC40LTAuMi0wLjgtMC4ydi0wLjhoMy40djAuOAoJCWMtMC4yLDAuMS0wLjQsMC4yLTAuNiwwLjRjLTAuMywwLjMtMC42LDAuOS0wLjksMS42bC0zLjEsNy45bC0wLjgsNS41YzAsMC4yLTAuMSwwLjUtMC4xLDAuOHMtMC4xLDAuNi0wLjEsMC43CgkJYzAsMC41LDAuMSwwLjksMC4zLDEuMWMwLjEsMC4xLDAuNSwwLjIsMSwwLjJ2MC44aC01LjNWNDUwLjN6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNOTg1LjUsNTI4LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUM5OTAuNSw1MjYuMyw5ODguMyw1MjguNSw5ODUuNSw1MjguNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik05ODUuNSw1MjloLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUM5OTEsNTI2LjUsOTg4LjUsNTI5LDk4NS41LDUyOXogTTgyNS41LDQ4OGMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SDgyNS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTgyOS4zLDUxNy4zYzAuMy0wLjEsMC42LTAuNCwwLjctMC45YzAuMS0wLjUsMC4zLTEuNywwLjYtMy43bDEuNC0xMi4zbC0wLjEtMC4zYy0wLjEtMC41LTAuMi0wLjktMC40LTEuMQoJCWMtMC4xLTAuMS0wLjMtMC4yLTAuNi0wLjJWNDk4aDIuNWwyLjcsMTMuOWwxLTguNWMwLjEtMC41LDAuMS0xLDAuMS0xLjRjMC4xLTAuNiwwLjEtMS4xLDAuMS0xLjRjMC0wLjctMC4xLTEuMi0wLjMtMS41CgkJYy0wLjEtMC4yLTAuNC0wLjMtMC43LTAuM1Y0OThoMi42djAuOGwtMC4yLDAuMWMtMC4zLDAuMS0wLjUsMC40LTAuNiwxYy0wLjEsMC42LTAuMywxLjgtMC41LDMuNWwtMS44LDE1LjJoLTAuM2wtMy4zLTE2LjYKCQlsLTEuMywxMC43Yy0wLjEsMC45LTAuMiwxLjYtMC4yLDJjMCwwLjMsMCwwLjUsMCwwLjhjMCwwLjcsMC4xLDEuMiwwLjMsMS41YzAuMSwwLjIsMC40LDAuMywwLjcsMC4zdjAuOGgtMi42VjUxNy4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg0MC4xLDUwMi4xYzEuMS0zLjEsMi4zLTQuNiwzLjctNC42YzAuOSwwLDEuNywwLjYsMi4yLDJjMC42LDEuMywwLjksMy4xLDAuOSw1LjNjMCwzLjItMC41LDYuMy0xLjUsOS4yCgkJYy0xLjEsMy4xLTIuNCw0LjctMy44LDQuN2MtMC45LDAtMS42LTAuNy0yLjItMnMtMC44LTMtMC44LTUuMkM4MzguNSw1MDguMSw4MzksNTA1LDg0MC4xLDUwMi4xeiBNODQwLjUsNTE1LjgKCQljMC4yLDEuMiwwLjYsMS44LDEuMSwxLjhjMC41LDAsMC45LTAuNCwxLjQtMS4zYzAuNC0wLjksMC44LTIuNSwxLjMtNWMwLjMtMS42LDAuNS0zLjIsMC42LTQuOWMwLjItMS43LDAuMi0zLjEsMC4yLTQuMgoJCWMwLTEtMC4xLTEuOS0wLjMtMi42Yy0wLjItMC43LTAuNS0xLjEtMS0xLjFjLTEsMC0xLjksMi4yLTIuNiw2LjZjLTAuNSwzLjQtMC44LDYuMi0wLjgsOC40Qzg0MC4zLDUxNC40LDg0MC40LDUxNS4xLDg0MC41LDUxNS44egoJCSIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg0Ny4yLDUxNy4zYzAuNCwwLDAuNy0wLjEsMC44LTAuM2MwLjItMC4zLDAuNC0wLjksMC41LTEuOWwxLjktMTYuMWMtMC42LDAtMS4yLDAuMy0xLjYsMS4xCgkJYy0wLjQsMC43LTAuOCwxLjgtMS4xLDMuMmwtMC4zLTAuMmwwLjUtNS4xaDYuOWwtMC41LDUuOGwtMC4zLTAuMWMwLTItMC4zLTMuMy0wLjctNGMtMC4yLTAuNC0wLjYtMC42LTEuMS0wLjZsLTEuOCwxNS4zbC0wLjEsMQoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMiwxczAuNCwwLjIsMC44LDAuM3YwLjhoLTQuMlY1MTcuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NTYuMiw1MTcuM2MwLjMtMC4xLDAuNS0wLjMsMC43LTAuNWMwLjEtMC4zLDAuMy0wLjgsMC40LTEuNmwxLjUtMTMuNWMwLTAuMywwLjEtMC41LDAuMS0wLjcKCQljMC0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMi0wLjlzLTAuNC0wLjItMC43LTAuM1Y0OThoNi43bC0wLjUsNS43bC0wLjMtMC4xYzAtMS40LTAuMS0yLjUtMC4zLTMuMQoJCWMtMC4zLTEtMS0xLjYtMS45LTEuNmMtMC4zLDAtMC41LDAuMS0wLjYsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4yLDEuMWwtMC43LDYuN2MwLjgtMC4xLDEuNC0wLjIsMS42LTAuNWMwLjMtMC4zLDAuNS0xLjIsMC44LTIuNgoJCWwwLjQsMC4xbC0wLjksOC4ybC0wLjMtMC4xYzAtMC4zLDAtMC41LDAtMC44YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjEtMS43LTAuMy0yLjFzLTAuNy0wLjYtMS40LTAuNmwtMC44LDcuM2MwLDAuMSwwLDAuMiwwLDAuNAoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNiwwLjEsMSwwLjMsMS4yYzAuMSwwLjEsMC4zLDAuMiwwLjYsMC4ydjAuOGgtMy43VjUxNy4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg2Ni4zLDUwMi4xYzEuMS0zLjEsMi4zLTQuNiwzLjctNC42YzAuOSwwLDEuNywwLjYsMi4yLDJjMC42LDEuMywwLjksMy4xLDAuOSw1LjNjMCwzLjItMC41LDYuMy0xLjUsOS4yCgkJYy0xLjEsMy4xLTIuNCw0LjctMy44LDQuN2MtMC45LDAtMS42LTAuNy0yLjItMnMtMC44LTMtMC44LTUuMkM4NjQuNyw1MDguMSw4NjUuMiw1MDUsODY2LjMsNTAyLjF6IE04NjYuNiw1MTUuOAoJCWMwLjIsMS4yLDAuNiwxLjgsMS4xLDEuOGMwLjUsMCwwLjktMC40LDEuNC0xLjNjMC40LTAuOSwwLjgtMi41LDEuMy01YzAuMy0xLjYsMC41LTMuMiwwLjYtNC45YzAuMi0xLjcsMC4yLTMuMSwwLjItNC4yCgkJYzAtMS0wLjEtMS45LTAuMy0yLjZjLTAuMi0wLjctMC41LTEuMS0xLTEuMWMtMSwwLTEuOSwyLjItMi42LDYuNmMtMC41LDMuNC0wLjgsNi4yLTAuOCw4LjRDODY2LjUsNTE0LjQsODY2LjUsNTE1LjEsODY2LjYsNTE1Ljh6CgkJIi8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODcyLjUsNTE3LjNjMC4zLTAuMSwwLjUtMC4zLDAuNy0wLjVjMC4xLTAuMywwLjMtMC44LDAuNC0xLjZsMS41LTEzLjVjMC0wLjMsMC4xLTAuNSwwLjEtMC43CgkJYzAtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjItMC45Yy0wLjEtMC4xLTAuNC0wLjItMC43LTAuM1Y0OThoMy41YzAuOCwwLDEuNCwwLjIsMS44LDAuNWMwLjgsMC43LDEuMiwxLjksMS4yLDMuOAoJCWMwLDAuNi0wLjEsMS4zLTAuMiwycy0wLjQsMS40LTAuNywxLjljLTAuMiwwLjQtMC41LDAuNy0wLjgsMWMtMC4yLDAuMS0wLjQsMC4zLTAuOCwwLjVjMCwwLjMsMC4xLDAuNSwwLjEsMC42bDEsNi44CgkJYzAuMSwwLjksMC4zLDEuNSwwLjQsMS43YzAuMSwwLjIsMC40LDAuNCwwLjcsMC40djAuOEg4NzhsLTEuNC05LjloLTAuNGwtMC43LDYuMmwtMC4xLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOSwwLjIsMWMwLjEsMC4xLDAuNCwwLjIsMC44LDAuM3YwLjhoLTMuOFY1MTcuM3ogTTg3Ny40LDUwNi45YzAuNC0wLjIsMC43LTAuNiwwLjktMS4xYzAuMS0wLjQsMC4zLTAuOSwwLjQtMS42CgkJYzAuMS0wLjcsMC4yLTEuNSwwLjItMi4zYzAtMC44LTAuMS0xLjUtMC4zLTIuMWMtMC4yLTAuNi0wLjUtMC44LTAuOS0wLjhjLTAuMiwwLTAuMywwLjEtMC40LDAuM2MtMC4xLDAuMi0wLjEsMC41LTAuMiwxLjEKCQlsLTAuOCw2LjlDODc2LjgsNTA3LjEsODc3LjEsNTA3LDg3Ny40LDUwNi45eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg4Myw1MTcuM2MwLjMtMC4xLDAuNS0wLjMsMC43LTAuNWMwLjEtMC4zLDAuMy0wLjgsMC40LTEuNmwxLjUtMTMuNWMwLTAuMywwLjEtMC42LDAuMS0wLjlzMC0wLjUsMC0wLjcKCQljMC0wLjUtMC4xLTAuOS0wLjItMWMtMC4xLTAuMS0wLjMtMC4yLTAuNy0wLjJWNDk4aDMuNmMwLjYsMCwxLjEsMC4yLDEuNSwwLjZjMC44LDAuNywxLjIsMi4xLDEuMiw0LjFjMCwxLjgtMC4zLDMuMi0wLjksNC4zCgkJYy0wLjYsMS4xLTEuNCwxLjYtMi40LDEuNmMtMC4yLDAtMC4zLDAtMC40LDBjLTAuMSwwLTAuMywwLTAuNy0wLjFsLTAuNyw2bC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC44LDAuMiwxczAuNCwwLjIsMC44LDAuM3YwLjhIODgzVjUxNy4zeiBNODg2LjgsNTA3LjRjMC4xLDAsMC4yLDAsMC4yLDAuMXMwLjEsMCwwLjIsMGMwLjQsMCwwLjgtMC4xLDEtMC40CgkJczAuNC0wLjYsMC42LTEuMmMwLjItMC41LDAuMy0xLjIsMC40LTJjMC4xLTAuOCwwLjEtMS41LDAuMS0yLjFjMC0wLjgtMC4xLTEuNS0wLjMtMi4xYy0wLjItMC41LTAuNC0wLjgtMC44LTAuOAoJCWMtMC4yLDAtMC4zLDAuMS0wLjQsMC4zYy0wLjEsMC4yLTAuMSwwLjUtMC4yLDFMODg2LjgsNTA3LjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODkyLjYsNTAxLjdjMC0wLjMsMC4xLTAuNiwwLjEtMC45YzAtMC4zLDAtMC41LDAtMC44YzAtMC41LTAuMS0wLjgtMC4yLTAuOWMtMC4xLTAuMS0wLjQtMC4yLTAuNy0wLjNWNDk4CgkJaDMuOXYwLjhjLTAuNCwwLjEtMC42LDAuMi0wLjgsMC41Yy0wLjEsMC4yLTAuMywwLjgtMC40LDEuN2wtMSw5Yy0wLjEsMC44LTAuMiwxLjUtMC4yLDJjLTAuMSwwLjktMC4xLDEuNi0wLjEsMgoJCWMwLDEsMC4xLDEuNywwLjQsMi4zczAuNywwLjgsMS4xLDAuOGMwLjgsMCwxLjQtMC44LDEuOS0yLjVjMC4zLTEsMC41LTIuNiwwLjgtNC45bDAuNy02LjNjMC4xLTAuOSwwLjEtMS4zLDAuMS0xLjIKCQljMC4xLTAuNywwLjEtMS4zLDAuMS0xLjZjMC0wLjctMC4xLTEuMi0wLjMtMS41Yy0wLjEtMC4yLTAuNC0wLjMtMC43LTAuM1Y0OThoMi42djAuOGMtMC4zLDAuMS0wLjYsMC40LTAuNywwLjkKCQljLTAuMSwwLjUtMC4zLDEuNy0wLjYsMy43bC0wLjgsNi44Yy0wLjMsMi43LTAuNyw0LjYtMSw1LjdjLTAuNiwxLjgtMS41LDIuNy0yLjYsMi43Yy0wLjgsMC0xLjUtMC41LTItMS40CgkJYy0wLjUtMC45LTAuOC0yLjItMC44LTMuOGMwLTAuNiwwLTEuMywwLjEtMmMwLTAuNSwwLjEtMS4zLDAuMy0yLjRMODkyLjYsNTAxLjd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODk4LjgsNTE3LjNjMC4zLTAuMSwwLjUtMC4yLDAuNi0wLjRjMC4yLTAuMywwLjMtMC45LDAuNC0xLjdsMS41LTEzLjVjMC0wLjQsMC4xLTAuNywwLjEtMQoJCWMwLTAuMywwLTAuNSwwLTAuNmMwLTAuNS0wLjEtMC45LTAuMi0xYy0wLjEtMC4xLTAuNC0wLjItMC43LTAuM1Y0OThoMy40YzAuOSwwLDEuNywwLjQsMi4yLDEuMWMwLjUsMC43LDAuOCwxLjksMC44LDMuNAoJCWMwLDEuNS0wLjMsMi44LTEsMy43Yy0wLjMsMC41LTAuOCwwLjktMS40LDEuMmMwLjUsMC40LDAuOSwwLjksMS4xLDEuM2MwLjQsMC44LDAuNiwxLjgsMC42LDMuMWMwLDEuNy0wLjMsMy4xLTAuOSw0LjMKCQlzLTEuNSwxLjktMi45LDEuOWgtMy44VjUxNy4zeiBNOTAxLjksNTE3YzAuMSwwLjEsMC4zLDAuMSwwLjUsMC4xYzAuOCwwLDEuNC0wLjksMS43LTIuNmMwLjItMSwwLjMtMi4xLDAuMy0zLjIKCQljMC0xLjQtMC4yLTIuMy0wLjYtMi44Yy0wLjItMC4zLTAuNy0wLjUtMS4zLTAuNWwtMC44LDcuM2MwLDAuMSwwLDAuMywwLDAuNGMwLDAuMiwwLDAuMywwLDAuNUM5MDEuNiw1MTYuNiw5MDEuNyw1MTYuOCw5MDEuOSw1MTcKCQl6IE05MDMuOCw1MDYuNmMwLjItMC4xLDAuNC0wLjQsMC42LTAuOGMwLjItMC41LDAuNC0xLjIsMC41LTIuMWMwLjEtMC42LDAuMS0xLjIsMC4xLTEuOGMwLTAuOS0wLjEtMS42LTAuMi0yLjEKCQljLTAuMi0wLjYtMC41LTAuOC0wLjktMC44Yy0wLjIsMC0wLjMsMC4xLTAuNCwwLjNjLTAuMSwwLjItMC4xLDAuNS0wLjIsMWwtMC44LDYuN0M5MDMuMiw1MDYuOSw5MDMuNiw1MDYuOCw5MDMuOCw1MDYuNnoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MDYuNyw1MTcuM2MwLjMtMC4xLDAuNS0wLjMsMC43LTAuNWMwLjEtMC4zLDAuMy0wLjgsMC40LTEuNmwxLjUtMTMuNWMwLTAuNCwwLjEtMC43LDAuMS0xczAtMC41LDAtMC43CgkJYzAtMC41LTAuMS0wLjgtMC4yLTFjLTAuMS0wLjEtMC40LTAuMi0wLjctMC4zVjQ5OGg0djAuOGMtMC40LDAuMS0wLjcsMC4zLTAuOSwwLjVjLTAuMiwwLjItMC4zLDAuOC0wLjQsMS43bC0xLjYsMTQuMwoJCWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMiwwLjdzMC4zLDAuMiwwLjUsMC4yYzAuOSwwLDEuNi0wLjQsMi4yLTEuMWMwLjYtMC43LDEuMi0yLDEuNy0zLjlsMC4zLDAuMQoJCWwtMC43LDUuOGgtN1Y1MTcuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MTMuOCw1MTcuM2MwLjMtMC4xLDAuNS0wLjMsMC43LTAuNWMwLjEtMC4zLDAuMy0wLjgsMC40LTEuNmwxLjUtMTMuNWMwLTAuNCwwLjEtMC43LDAuMS0xCgkJYzAtMC4zLDAtMC41LDAtMC43YzAtMC41LTAuMS0wLjgtMC4yLTFjLTAuMS0wLjEtMC40LTAuMi0wLjctMC4zVjQ5OGgzLjh2MC44Yy0wLjMsMC4xLTAuNSwwLjMtMC43LDAuNWMtMC4xLDAuMy0wLjMsMC44LTAuMywxLjYKCQlsLTEuNiwxMy41bC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMiwxczAuNCwwLjIsMC43LDAuM3YwLjhoLTMuOFY1MTcuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MjUuMiw0OTcuOWMwLjUsMC4zLDAuNywwLjQsMC44LDAuNGMwLjEsMCwwLjItMC4xLDAuMy0wLjJjMC4xLTAuMiwwLjEtMC40LDAuMi0wLjZoMC40bC0wLjYsN2wtMC40LTAuMgoJCWMwLTAuNCwwLTAuNywwLTAuN2MwLTAuMSwwLTAuMiwwLTAuM2MwLTEuNi0wLjItMi44LTAuNS0zLjVjLTAuMy0wLjgtMC43LTEuMi0xLjItMS4yYy0xLDAtMS44LDEuNS0yLjUsNC42Yy0wLjYsMi44LTEsNS42LTEsOC40CgkJYzAsMi4xLDAuMiwzLjUsMC42LDQuM2MwLjQsMC44LDAuOCwxLjIsMS4zLDEuMmMwLjYsMCwxLjItMC41LDEuNy0xLjVjMC4zLTAuNSwwLjYtMS4yLDAuOS0yLjFsMC40LDAuN2MtMC40LDEuNS0xLDIuNy0xLjUsMy40CgkJcy0xLjIsMS4xLTEuOCwxLjFjLTEsMC0xLjgtMC43LTIuNS0yLjFjLTAuNy0xLjQtMS0zLjMtMS01LjdjMC0zLjYsMC41LTYuNywxLjUtOS40YzEtMi43LDIuMi00LDMuNi00CgkJQzkyNC4zLDQ5Ny41LDkyNC43LDQ5Ny42LDkyNS4yLDQ5Ny45eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkyOC42LDUxNy4zYzAuMy0wLjEsMC41LTAuMywwLjctMC41YzAuMS0wLjMsMC4zLTAuOCwwLjQtMS42bDEuNS0xMy41YzAtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCWMwLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4yLTAuOXMtMC40LTAuMi0wLjctMC4zVjQ5OGgzLjVjMC44LDAsMS40LDAuMiwxLjgsMC41YzAuOCwwLjcsMS4yLDEuOSwxLjIsMy44CgkJYzAsMC42LTAuMSwxLjMtMC4yLDJjLTAuMSwwLjctMC40LDEuNC0wLjcsMS45Yy0wLjIsMC40LTAuNSwwLjctMC44LDFjLTAuMiwwLjEtMC40LDAuMy0wLjgsMC41YzAsMC4zLDAuMSwwLjUsMC4xLDAuNmwxLDYuOAoJCWMwLjEsMC45LDAuMywxLjUsMC40LDEuN2MwLjEsMC4yLDAuNCwwLjQsMC43LDAuNHYwLjhIOTM0bC0xLjQtOS45aC0wLjRsLTAuNyw2LjJsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC41LDAuMSwwLjksMC4yLDFjMC4xLDAuMSwwLjQsMC4yLDAuOCwwLjN2MC44aC0zLjhWNTE3LjN6IE05MzMuNCw1MDYuOWMwLjQtMC4yLDAuNy0wLjYsMC45LTEuMWMwLjEtMC40LDAuMy0wLjksMC40LTEuNgoJCWMwLjEtMC43LDAuMi0xLjUsMC4yLTIuM2MwLTAuOC0wLjEtMS41LTAuMy0yLjFjLTAuMi0wLjYtMC41LTAuOC0wLjktMC44Yy0wLjIsMC0wLjMsMC4xLTAuNCwwLjNjLTAuMSwwLjItMC4xLDAuNS0wLjIsMS4xCgkJbC0wLjgsNi45QzkzMi44LDUwNy4xLDkzMy4yLDUwNyw5MzMuNCw1MDYuOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MzYuNSw1MTcuM2MwLjMtMC4xLDAuNS0wLjMsMC43LTAuNWMwLjEtMC4zLDAuMy0wLjgsMC40LTEuNmwxLjUtMTMuNWMwLTAuMywwLjEtMC43LDAuMS0wLjkKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuNy0wLjNWNDk4aDYuOGwtMC41LDUuN2wtMC4zLTAuMWMwLTEuNS0wLjEtMi41LTAuMy0zLjEKCQljLTAuMy0xLTEtMS41LTEuOS0xLjVjLTAuMywwLTAuNSwwLjEtMC42LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxLjFsLTAuNyw2LjdjMC45LDAsMS41LTAuMiwxLjctMC41YzAuMy0wLjMsMC41LTEuMiwwLjktMi43CgkJbDAuNCwwLjFsLTAuOSw4LjJsLTAuMy0wLjFjMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLjEtMC4xLTEuOC0wLjQtMi4yYy0wLjItMC40LTAuNy0wLjYtMS40LTAuNmwtMC44LDcuMwoJCWMwLDAuMiwwLDAuMywwLDAuNXMwLDAuMywwLDAuNGMwLDAuMywwLDAuNSwwLjEsMC43czAuMywwLjMsMC42LDAuM2MwLjgsMCwxLjQtMC4zLDItMC44YzAuOC0wLjgsMS41LTIuMiwyLTQuMmwwLjMsMC4xbC0wLjcsNS44CgkJaC03VjUxNy4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTk0NC40LDUxNy4zYzAuMy0wLjEsMC41LTAuMywwLjctMC41YzAuMS0wLjMsMC4zLTAuOCwwLjQtMS42bDEuNS0xMy41YzAtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuNy0wLjNWNDk4aDR2MC44Yy0wLjQsMC4xLTAuNywwLjMtMC45LDAuNWMtMC4yLDAuMi0wLjMsMC44LTAuNCwxLjcKCQlsLTEuNiwxNC4zYzAsMC4yLDAsMC4zLDAsMC40czAsMC4zLDAsMC41YzAsMC4zLDAuMSwwLjYsMC4yLDAuN3MwLjMsMC4yLDAuNSwwLjJjMC45LDAsMS42LTAuNCwyLjItMS4xczEuMi0yLDEuNy0zLjlsMC4zLDAuMQoJCWwtMC43LDUuOGgtN1Y1MTcuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NTEuNSw1MTcuM2MwLjMtMC4xLDAuNS0wLjMsMC43LTAuNWMwLjEtMC4zLDAuMy0wLjgsMC40LTEuNmwxLjUtMTMuNWMwLTAuMywwLjEtMC43LDAuMS0wLjkKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuNy0wLjNWNDk4aDYuOGwtMC41LDUuN2wtMC4zLTAuMWMwLTEuNS0wLjEtMi41LTAuMy0zLjEKCQljLTAuMy0xLTEtMS41LTEuOS0xLjVjLTAuMywwLTAuNSwwLjEtMC42LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxLjFsLTAuNyw2LjdjMC45LDAsMS41LTAuMiwxLjctMC41czAuNS0xLjIsMC45LTIuN2wwLjQsMC4xCgkJbC0wLjksOC4ybC0wLjMtMC4xYzAtMC4zLDAtMC41LDAtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS4xLTAuMS0xLjgtMC40LTIuMmMtMC4yLTAuNC0wLjctMC42LTEuNC0wLjZsLTAuOCw3LjMKCQljMCwwLjIsMCwwLjMsMCwwLjVjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjMsMCwwLjUsMC4xLDAuN2MwLjEsMC4yLDAuMywwLjMsMC42LDAuM2MwLjgsMCwxLjQtMC4zLDItMC44YzAuOC0wLjgsMS41LTIuMiwyLTQuMgoJCWwwLjMsMC4xbC0wLjcsNS44aC03VjUxNy4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTk1OSw1MTcuM2MwLjItMC4yLDAuNC0wLjMsMC41LTAuNWMwLjItMC4zLDAuMy0wLjgsMC41LTEuNmw0LjctMTcuNmgwLjNsMS4yLDE3LjJjMC4xLDEuMiwwLjIsMS45LDAuMywyLjEKCQljMC4xLDAuMywwLjQsMC40LDAuOCwwLjV2MC43aC0zLjh2LTAuN2MwLjQtMC4xLDAuNi0wLjIsMC44LTAuNGMwLjEtMC4yLDAuMi0wLjYsMC4yLTEuM2MwLTAuMiwwLTAuOC0wLjEtMS42YzAtMC4yLDAtMC45LTAuMS0yLjIKCQloLTIuN2wtMC43LDNjMCwwLjItMC4xLDAuNC0wLjEsMC43cy0wLjEsMC41LTAuMSwwLjdjMCwwLjQsMC4xLDAuNywwLjIsMC44czAuMywwLjIsMC43LDAuM3YwLjdIOTU5VjUxNy4zeiBNOTY0LjIsNTEwLjZsLTAuNS03LjMKCQlsLTEuOSw3LjNIOTY0LjJ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTY3LjYsNTE4LjZsMC41LTYuN2wwLjQsMC4xYzAsMSwwLjEsMS43LDAuMSwyLjFjMC4xLDAuNywwLjIsMS40LDAuNCwxLjljMC4yLDAuNSwwLjQsMC45LDAuNiwxLjIKCQljMC4yLDAuMywwLjUsMC40LDAuOCwwLjRjMC41LDAsMC45LTAuNCwxLjItMS4xYzAuMy0wLjgsMC40LTEuNywwLjQtMi43YzAtMS4zLTAuNS0yLjktMS41LTQuOGMtMS0yLTEuNS0zLjktMS41LTUuNgoJCWMwLTEuNiwwLjItMywwLjctNC4xczEuMS0xLjcsMS45LTEuN2MwLjIsMCwwLjUsMC4xLDAuNywwLjJjMC4yLDAuMSwwLjMsMC4yLDAuNCwwLjJsMC4zLDAuMmMwLjEsMCwwLjEsMC4xLDAuMiwwLjEKCQljMC4xLDAsMC4xLDAuMSwwLjIsMC4xYzAuMSwwLDAuMy0wLjEsMC4zLTAuMnMwLjEtMC4zLDAuMi0wLjVoMC40bC0wLjUsNmwtMC4zLTAuMWwwLTFjLTAuMS0wLjktMC4yLTEuNy0wLjQtMi40CgkJYy0wLjMtMS0wLjctMS42LTEuMy0xLjZjLTAuNSwwLTAuOCwwLjQtMS4xLDEuM2MtMC4xLDAuNi0wLjIsMS4yLTAuMiwxLjhjMCwwLjcsMC4xLDEuMywwLjIsMS44YzAuMSwwLjMsMC4yLDAuNiwwLjQsMWwxLjEsMi4xCgkJYzAuNCwwLjgsMC43LDEuNiwxLDIuNmMwLjMsMSwwLjQsMi4xLDAuNCwzLjNjMCwxLjYtMC4zLDMtMC44LDQuM2MtMC41LDEuMy0xLjIsMS45LTIuMiwxLjljLTAuMiwwLTAuNS0wLjEtMC43LTAuMgoJCWMtMC4yLTAuMS0wLjUtMC4yLTAuNy0wLjRsLTAuMy0wLjNjLTAuMS0wLjEtMC4yLTAuMi0wLjItMC4yYzAsMC0wLjEsMC0wLjEsMGMtMC4xLDAtMC4yLDAuMS0wLjMsMC4yYy0wLjEsMC4yLTAuMSwwLjQtMC4yLDAuOAoJCUg5NjcuNnoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NzMuNyw1MTcuM2MwLjMtMC4xLDAuNS0wLjMsMC43LTAuNWMwLjEtMC4zLDAuMy0wLjgsMC40LTEuNmwxLjUtMTMuNWMwLTAuMywwLjEtMC43LDAuMS0wLjkKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuNy0wLjNWNDk4aDYuOGwtMC41LDUuN2wtMC4zLTAuMWMwLTEuNS0wLjEtMi41LTAuMy0zLjEKCQljLTAuMy0xLTEtMS41LTItMS41Yy0wLjMsMC0wLjUsMC4xLTAuNiwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjIsMS4xbC0wLjcsNi43YzAuOSwwLDEuNS0wLjIsMS43LTAuNXMwLjUtMS4yLDAuOS0yLjdsMC40LDAuMQoJCWwtMC45LDguMmwtMC4zLTAuMWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEuMS0wLjEtMS44LTAuNC0yLjJjLTAuMi0wLjQtMC43LTAuNi0xLjQtMC42bC0wLjgsNy4zCgkJYzAsMC4yLDAsMC4zLDAsMC41YzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAsMC41LDAuMSwwLjdjMC4xLDAuMiwwLjMsMC4zLDAuNiwwLjNjMC44LDAsMS40LTAuMywyLTAuOGMwLjgtMC44LDEuNS0yLjIsMi00LjIKCQlsMC4zLDAuMWwtMC43LDUuOGgtN1Y1MTcuM3oiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik05ODUuNSw2MDEuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJQzk5MC41LDU5OS4zLDk4OC4zLDYwMS41LDk4NS41LDYwMS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NiIgZD0iTTk4NS41LDYwMmgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJQzk5MSw1OTkuNSw5ODguNSw2MDIsOTg1LjUsNjAyeiBNODI1LjUsNTYxYy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVIODI1LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODI5LjIsNTkwLjNjMC4zLTAuMSwwLjYtMC4zLDAuOC0wLjVjMC4yLTAuMywwLjMtMC44LDAuNC0xLjZsMS44LTEzLjVjMC0wLjMsMC4xLTAuNiwwLjEtMC45czAtMC41LDAtMC43CgkJYzAtMC41LTAuMS0wLjktMC4zLTFjLTAuMS0wLjEtMC40LTAuMi0wLjgtMC4yVjU3MWg0LjFjMC43LDAsMS4zLDAuMiwxLjcsMC42YzAuOSwwLjcsMS4zLDIuMSwxLjMsNC4xYzAsMS44LTAuNCwzLjItMS4xLDQuMwoJCWMtMC43LDEuMS0xLjYsMS42LTIuOCwxLjZjLTAuMiwwLTAuMywwLTAuNCwwcy0wLjQsMC0wLjgtMC4xbC0wLjgsNmwtMC4xLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOCwwLjIsMXMwLjQsMC4yLDAuOSwwLjN2MC44aC00LjJWNTkwLjN6IE04MzMuNSw1ODAuNGMwLjEsMCwwLjIsMCwwLjMsMC4xYzAuMSwwLDAuMiwwLDAuMiwwYzAuNSwwLDAuOS0wLjEsMS4xLTAuNAoJCXMwLjUtMC42LDAuNy0xLjJjMC4yLTAuNSwwLjMtMS4yLDAuNC0yYzAuMS0wLjgsMC4yLTEuNSwwLjItMi4xYzAtMC44LTAuMS0xLjUtMC4zLTIuMWMtMC4yLTAuNS0wLjUtMC44LTEtMC44CgkJYy0wLjIsMC0wLjQsMC4xLTAuNSwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjIsMUw4MzMuNSw1ODAuNHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04MzcuNCw1OTAuM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLTAuMywwLjEtMC41LDAuMS0wLjcKCQljMC0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMi0wLjlzLTAuNC0wLjItMC45LTAuM1Y1NzFoNGMwLjksMCwxLjYsMC4yLDIuMSwwLjVjMC45LDAuNywxLjMsMS45LDEuMywzLjgKCQljMCwwLjYtMC4xLDEuMy0wLjIsMnMtMC40LDEuNC0wLjgsMS45Yy0wLjIsMC40LTAuNSwwLjctMC45LDFjLTAuMiwwLjEtMC41LDAuMy0wLjksMC41YzAsMC4zLDAuMSwwLjUsMC4xLDAuNmwxLjEsNi44CgkJYzAuMSwwLjksMC4zLDEuNSwwLjUsMS43YzAuMiwwLjIsMC40LDAuNCwwLjgsMC40djAuOGgtMi45bC0xLjYtOS45aC0wLjRsLTAuOSw2LjJsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC41LDAuMSwwLjksMC4yLDFjMC4xLDAuMSwwLjQsMC4yLDAuOSwwLjN2MC44aC00LjNWNTkwLjN6IE04NDIuOSw1NzkuOWMwLjQtMC4yLDAuOC0wLjYsMS0xLjFjMC4yLTAuNCwwLjMtMC45LDAuNS0xLjYKCQljMC4xLTAuNywwLjItMS41LDAuMi0yLjNjMC0wLjgtMC4xLTEuNS0wLjMtMi4xYy0wLjItMC42LTAuNS0wLjgtMS0wLjhjLTAuMiwwLTAuMywwLjEtMC40LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMiwxLjFsLTAuOSw2LjkKCQlDODQyLjIsNTgwLjEsODQyLjYsNTgwLDg0Mi45LDU3OS45eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg0Ni40LDU5MC4zYzAuMy0wLjEsMC42LTAuMywwLjgtMC41YzAuMi0wLjMsMC4zLTAuOCwwLjQtMS42bDEuOC0xMy41YzAtMC4zLDAuMS0wLjcsMC4xLTAuOQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0xYy0wLjEtMC4xLTAuNC0wLjItMC45LTAuM1Y1NzFoNy44bC0wLjYsNS43bC0wLjQtMC4xYzAtMS41LTAuMS0yLjUtMC4zLTMuMQoJCWMtMC40LTEtMS4xLTEuNS0yLjItMS41Yy0wLjQsMC0wLjYsMC4xLTAuNywwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjMsMS4xbC0wLjksNi43YzEsMCwxLjctMC4yLDItMC41YzAuMy0wLjMsMC42LTEuMiwxLTIuNwoJCWwwLjQsMC4xbC0xLjEsOC4ybC0wLjQtMC4xYzAtMC4zLDAtMC41LDAtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS4xLTAuMS0xLjgtMC40LTIuMmMtMC4zLTAuNC0wLjgtMC42LTEuNy0wLjZsLTAuOSw3LjMKCQljMCwwLjIsMCwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4xLDAuMiwwLjMsMC4zLDAuNiwwLjNjMC45LDAsMS42LTAuMywyLjItMC44CgkJYzEtMC44LDEuNy0yLjIsMi4yLTQuMmwwLjQsMC4xbC0wLjksNS44aC04VjU5MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg1NS40LDU5MC4zYzAuMy0wLjEsMC42LTAuMywwLjgtMC41YzAuMi0wLjMsMC4zLTAuOCwwLjQtMS42bDEuOC0xMy41YzAuMS0wLjQsMC4xLTAuNywwLjEtMQoJCWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuNS0wLjEtMC44LTAuMi0xYy0wLjEtMC4xLTAuNC0wLjItMC45LTAuM1Y1NzFoNC42djAuOGMtMC41LDAuMS0wLjgsMC4zLTEsMC41cy0wLjMsMC44LTAuNCwxLjdsLTEuOSwxNC4zCgkJYzAsMC4yLDAsMC4zLDAsMC40czAsMC4zLDAsMC41YzAsMC4zLDAuMSwwLjYsMC4yLDAuN3MwLjMsMC4yLDAuNiwwLjJjMSwwLDEuOC0wLjQsMi42LTEuMWMwLjctMC43LDEuNC0yLDEuOS0zLjlsMC4zLDAuMQoJCWwtMC44LDUuOGgtOFY1OTAuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NjMuNiw1OTAuM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLjEtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjNWNTcxaDQuM3YwLjhjLTAuNCwwLjEtMC42LDAuMy0wLjgsMC41Yy0wLjIsMC4zLTAuMywwLjgtMC40LDEuNgoJCWwtMS44LDEzLjVsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4yLDFjMC4xLDAuMSwwLjQsMC4yLDAuOSwwLjN2MC44aC00LjNWNTkwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODY4LjUsNTkwLjNjMC40LTAuMSwwLjYtMC40LDAuOC0wLjljMC4yLTAuNSwwLjQtMS43LDAuNy0zLjdsMS41LTExLjJjMC4xLTAuNCwwLjEtMC43LDAuMS0xczAtMC41LDAtMC44CgkJYzAtMC40LTAuMS0wLjctMC4yLTAuOGMtMC4xLTAuMS0wLjQtMC4yLTAuOC0wLjJWNTcxaDMuM2wwLjgsMTQuMWw0LjQtMTQuMWgzLjF2MC44Yy0wLjMsMC4xLTAuNiwwLjItMC43LDAuNAoJCWMtMC4yLDAuMy0wLjQsMC45LTAuNSwxLjdsLTEuOCwxMy41YzAsMC4zLTAuMSwwLjYtMC4xLDAuOWMwLDAuMywwLDAuNiwwLDAuOGMwLDAuNSwwLjEsMC44LDAuMiwwLjljMC4xLDAuMSwwLjQsMC4yLDAuOCwwLjN2MC44CgkJaC00LjV2LTAuOGMwLjUtMC4xLDAuOC0wLjMsMS0wLjVzMC4zLTAuOCwwLjQtMS43bDEuOC0xMy44bC01LjQsMTcuMUg4NzNsLTEtMTYuNmwtMS41LDEwLjljLTAuMSwwLjYtMC4xLDEtMC4yLDEuNAoJCWMtMC4xLDAuNi0wLjEsMS4xLTAuMSwxLjRjMCwwLjcsMC4xLDEuMiwwLjQsMS40YzAuMSwwLjIsMC40LDAuMywwLjgsMC4zdjAuOGgtM1Y1OTAuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04ODAuOCw1OTAuM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLjEtMC40LDAuMS0wLjcsMC4xLTEKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjNWNTcxaDQuM3YwLjhjLTAuNCwwLjEtMC42LDAuMy0wLjgsMC41Yy0wLjIsMC4zLTAuMywwLjgtMC40LDEuNgoJCWwtMS44LDEzLjVsLTAuMSwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4yLDFjMC4xLDAuMSwwLjQsMC4yLDAuOSwwLjN2MC44aC00LjNWNTkwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODg1LjcsNTkwLjNjMC40LTAuMSwwLjYtMC40LDAuOC0wLjlzMC40LTEuNywwLjctMy43bDEuNi0xMi4zbC0wLjEtMC4zYy0wLjEtMC41LTAuMy0wLjktMC40LTEuMQoJCWMtMC4xLTAuMS0wLjMtMC4yLTAuNy0wLjJWNTcxaDIuOWwzLjEsMTMuOWwxLjEtOC41YzAuMS0wLjUsMC4xLTEsMC4yLTEuNGMwLjEtMC42LDAuMS0xLjEsMC4xLTEuNGMwLTAuNy0wLjEtMS4yLTAuMy0xLjUKCQljLTAuMS0wLjItMC40LTAuMy0wLjgtMC4zVjU3MWgzdjAuOGwtMC4yLDAuMWMtMC4zLDAuMS0wLjUsMC40LTAuNywxYy0wLjIsMC42LTAuNCwxLjgtMC42LDMuNWwtMiwxNS4ySDg5M2wtMy43LTE2LjZsLTEuNCwxMC43CgkJYy0wLjEsMC45LTAuMiwxLjYtMC4yLDJjMCwwLjMsMCwwLjUsMCwwLjhjMCwwLjcsMC4xLDEuMiwwLjQsMS41YzAuMSwwLjIsMC40LDAuMywwLjgsMC4zdjAuOGgtM1Y1OTAuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04OTUuMSw1OTAuM2MwLjMtMC4yLDAuNS0wLjMsMC42LTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmw1LjMtMTcuNmgwLjRsMS40LDE3LjJjMC4xLDEuMiwwLjIsMS45LDAuMywyLjEKCQljMC4xLDAuMywwLjQsMC40LDAuOSwwLjV2MC43aC00LjR2LTAuN2MwLjQtMC4xLDAuNy0wLjIsMC45LTAuNGMwLjItMC4yLDAuMy0wLjYsMC4zLTEuM2MwLTAuMiwwLTAuOC0wLjEtMS42CgkJYzAtMC4yLTAuMS0wLjktMC4xLTIuMmgtMy4xbC0wLjgsM2MtMC4xLDAuMi0wLjEsMC40LTAuMiwwLjdzLTAuMSwwLjUtMC4xLDAuN2MwLDAuNCwwLjEsMC43LDAuMiwwLjhjMC4xLDAuMSwwLjQsMC4yLDAuNywwLjN2MC43CgkJaC0yLjhWNTkwLjN6IE05MDEuMSw1ODMuNmwtMC41LTcuM2wtMi4xLDcuM0g5MDEuMXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MDQuNCw1OTAuM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLTAuMywwLjEtMC41LDAuMS0wLjcKCQljMC0wLjQsMC4xLTAuNywwLjEtMWMwLTAuNS0wLjEtMC44LTAuMi0wLjlzLTAuNC0wLjItMC45LTAuM1Y1NzFoNGMwLjksMCwxLjYsMC4yLDIuMSwwLjVjMC45LDAuNywxLjMsMS45LDEuMywzLjgKCQljMCwwLjYtMC4xLDEuMy0wLjIsMmMtMC4xLDAuNy0wLjQsMS40LTAuOCwxLjljLTAuMiwwLjQtMC41LDAuNy0wLjksMWMtMC4yLDAuMS0wLjUsMC4zLTAuOSwwLjVjMCwwLjMsMC4xLDAuNSwwLjEsMC42bDEuMSw2LjgKCQljMC4xLDAuOSwwLjMsMS41LDAuNSwxLjdjMC4yLDAuMiwwLjQsMC40LDAuOCwwLjR2MC44aC0yLjlsLTEuNi05LjloLTAuNGwtMC45LDYuMmwtMC4xLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjUsMC4xLDAuOSwwLjIsMWMwLjEsMC4xLDAuNCwwLjIsMC45LDAuM3YwLjhoLTQuM1Y1OTAuM3ogTTkwOS45LDU3OS45YzAuNC0wLjIsMC44LTAuNiwxLTEuMWMwLjItMC40LDAuMy0wLjksMC41LTEuNgoJCWMwLjEtMC43LDAuMi0xLjUsMC4yLTIuM2MwLTAuOC0wLjEtMS41LTAuMy0yLjFjLTAuMi0wLjYtMC41LTAuOC0xLTAuOGMtMC4yLDAtMC4zLDAuMS0wLjQsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4yLDEuMWwtMC45LDYuOQoJCUM5MDkuMyw1ODAuMSw5MDkuNyw1ODAsOTA5LjksNTc5Ljl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTE0LjMsNTkwLjNjMC41LTAuMSwwLjgtMC4yLDAuOS0wLjRjMC4yLTAuMywwLjQtMC45LDAuNS0xLjhsMC44LTYuNWwtMS4zLThjLTAuMS0wLjctMC4yLTEuMi0wLjQtMS41CgkJYy0wLjEtMC4yLTAuNC0wLjQtMC43LTAuNFY1NzFoNHYwLjhjLTAuNCwwLTAuNiwwLjEtMC44LDAuMmMtMC4yLDAuMS0wLjIsMC40LTAuMiwwLjhjMCwwLjEsMCwwLjMsMCwwLjVjMCwwLjIsMCwwLjQsMC4xLDAuNgoJCWwxLDYuNWwxLjktNS42YzAuMS0wLjMsMC4yLTAuNiwwLjItMC44YzAuMS0wLjQsMC4xLTAuOCwwLjEtMS4xYzAtMC41LTAuMS0wLjktMC4zLTFjLTAuMS0wLjEtMC4zLTAuMi0wLjctMC4yVjU3MWgzdjAuOAoJCWMtMC4yLDAuMS0wLjQsMC4yLTAuNSwwLjRjLTAuMywwLjMtMC41LDAuOS0wLjgsMS42bC0yLjcsOGwtMC43LDUuNWMwLDAuMi0wLjEsMC41LTAuMSwwLjlzLTAuMSwwLjYtMC4xLDAuNwoJCWMwLDAuNSwwLjEsMC45LDAuMywxLjFjMC4xLDAuMSwwLjQsMC4yLDAuOCwwLjJ2MC44aC00LjZWNTkwLjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTIzLjgsNTkwLjNjMC4zLTAuMSwwLjYtMC4zLDAuOC0wLjVjMC4yLTAuMywwLjMtMC44LDAuNC0xLjZsMS44LTEzLjVjMC0wLjMsMC4xLTAuNSwwLjEtMC43CgkJYzAtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjItMC45Yy0wLjEtMC4xLTAuNC0wLjItMC44LTAuM1Y1NzFoNGMwLjksMCwxLjYsMC4yLDIuMSwwLjVjMC45LDAuNywxLjMsMS45LDEuMywzLjgKCQljMCwwLjYtMC4xLDEuMy0wLjIsMnMtMC40LDEuNC0wLjgsMS45Yy0wLjIsMC40LTAuNSwwLjctMC45LDFjLTAuMiwwLjEtMC41LDAuMy0wLjksMC41YzAsMC4zLDAuMSwwLjUsMC4xLDAuNmwxLjEsNi44CgkJYzAuMSwwLjksMC4zLDEuNSwwLjUsMS43YzAuMiwwLjIsMC40LDAuNCwwLjgsMC40djAuOEg5MzBsLTEuNi05LjlIOTI4bC0wLjksNi4ybC0wLjEsMWMwLDAuMSwwLDAuMiwwLDAuM3MwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC45LDAuMiwxYzAuMSwwLjEsMC40LDAuMiwwLjksMC4zdjAuOGgtNC4zVjU5MC4zeiBNOTI5LjMsNTc5LjljMC40LTAuMiwwLjgtMC42LDEtMS4xYzAuMi0wLjQsMC4zLTAuOSwwLjUtMS42CgkJYzAuMS0wLjcsMC4yLTEuNSwwLjItMi4zYzAtMC44LTAuMS0xLjUtMC4zLTIuMWMtMC4yLTAuNi0wLjUtMC44LTEtMC44Yy0wLjIsMC0wLjMsMC4xLTAuNCwwLjNjLTAuMSwwLjItMC4yLDAuNS0wLjIsMS4xbC0wLjksNi45CgkJQzkyOC43LDU4MC4xLDkyOS4xLDU4MCw5MjkuMyw1NzkuOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MzIuOCw1OTAuM2MwLjMtMC4xLDAuNi0wLjMsMC44LTAuNWMwLjItMC4zLDAuMy0wLjgsMC40LTEuNmwxLjgtMTMuNWMwLTAuMywwLjEtMC43LDAuMS0wLjkKCQljMC0wLjMsMC0wLjUsMC0wLjdjMC0wLjUtMC4xLTAuOC0wLjItMWMtMC4xLTAuMS0wLjQtMC4yLTAuOS0wLjNWNTcxaDcuOGwtMC42LDUuN2wtMC40LTAuMWMwLTEuNS0wLjEtMi41LTAuMy0zLjEKCQljLTAuNC0xLTEuMS0xLjUtMi4yLTEuNWMtMC40LDAtMC42LDAuMS0wLjcsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDEuMWwtMC45LDYuN2MxLDAsMS43LTAuMiwyLTAuNWMwLjMtMC4zLDAuNi0xLjIsMS0yLjcKCQlsMC40LDAuMWwtMS4xLDguMmwtMC40LTAuMWMwLTAuMywwLTAuNSwwLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEuMS0wLjEtMS44LTAuNC0yLjJzLTAuOC0wLjYtMS43LTAuNmwtMC45LDcuMwoJCWMwLDAuMiwwLDAuMy0wLjEsMC41czAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4yLDAuN3MwLjMsMC4zLDAuNiwwLjNjMC45LDAsMS42LTAuMywyLjItMC44YzEtMC44LDEuNy0yLjIsMi4yLTQuMmwwLjQsMC4xCgkJbC0wLjksNS44aC04VjU5MC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTk0Mi4zLDU5MS42bDAuNS02LjdsMC40LDAuMWMwLDEsMC4xLDEuNywwLjEsMi4xYzAuMSwwLjcsMC4zLDEuNCwwLjUsMS45YzAuMiwwLjUsMC41LDAuOSwwLjcsMS4yCgkJYzAuMywwLjMsMC42LDAuNCwwLjksMC40YzAuNiwwLDEtMC40LDEuMy0xLjFjMC4zLTAuOCwwLjUtMS43LDAuNS0yLjdjMC0xLjMtMC42LTIuOS0xLjgtNC44Yy0xLjItMi0xLjgtMy45LTEuOC01LjYKCQljMC0xLjYsMC4zLTMsMC44LTQuMXMxLjItMS43LDIuMi0xLjdjMC4zLDAsMC41LDAuMSwwLjgsMC4yYzAuMiwwLjEsMC4zLDAuMiwwLjUsMC4ybDAuNCwwLjJjMC4xLDAsMC4yLDAuMSwwLjIsMC4xCgkJYzAuMSwwLDAuMiwwLjEsMC4yLDAuMWMwLjIsMCwwLjMtMC4xLDAuNC0wLjJjMC4xLTAuMSwwLjItMC4zLDAuMi0wLjVoMC40bC0wLjYsNmwtMC40LTAuMWwwLTFjLTAuMS0wLjktMC4yLTEuNy0wLjQtMi40CgkJYy0wLjMtMS0wLjgtMS42LTEuNS0xLjZjLTAuNiwwLTEsMC40LTEuMiwxLjNjLTAuMiwwLjYtMC4zLDEuMi0wLjMsMS44YzAsMC43LDAuMSwxLjMsMC4zLDEuOGMwLjEsMC4zLDAuMiwwLjYsMC40LDFsMS4yLDIuMQoJCWMwLjQsMC44LDAuOCwxLjYsMS4xLDIuNmMwLjMsMSwwLjUsMi4xLDAuNSwzLjNjMCwxLjYtMC4zLDMtMC45LDQuM2MtMC42LDEuMy0xLjQsMS45LTIuNSwxLjljLTAuMywwLTAuNS0wLjEtMC44LTAuMgoJCWMtMC4zLTAuMS0wLjUtMC4yLTAuOC0wLjRsLTAuNC0wLjNjLTAuMS0wLjEtMC4yLTAuMi0wLjMtMC4yYzAsMC0wLjEsMC0wLjIsMGMtMC4yLDAtMC4zLDAuMS0wLjMsMC4yYy0wLjEsMC4yLTAuMSwwLjQtMC4yLDAuOAoJCUg5NDIuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NTEuOSw1NzQuN2MwLTAuMywwLjEtMC42LDAuMS0wLjljMC0wLjMsMC0wLjUsMC0wLjhjMC0wLjUtMC4xLTAuOC0wLjItMC45Yy0wLjEtMC4xLTAuNC0wLjItMC44LTAuM1Y1NzEKCQloNC40djAuOGMtMC40LDAuMS0wLjcsMC4yLTAuOSwwLjVjLTAuMiwwLjItMC4zLDAuOC0wLjQsMS43bC0xLjIsOWMtMC4xLDAuOC0wLjIsMS41LTAuMiwyYy0wLjEsMC45LTAuMSwxLjYtMC4xLDIKCQljMCwxLDAuMiwxLjcsMC41LDIuM3MwLjcsMC44LDEuMywwLjhjMC45LDAsMS42LTAuOCwyLjEtMi41YzAuMy0xLDAuNi0yLjYsMC45LTQuOWwwLjgtNi4zYzAuMS0wLjksMC4xLTEuMywwLjEtMS4yCgkJYzAuMS0wLjcsMC4xLTEuMywwLjEtMS42YzAtMC43LTAuMS0xLjItMC40LTEuNWMtMC4yLTAuMi0wLjQtMC4zLTAuOC0wLjNWNTcxaDN2MC44Yy0wLjQsMC4xLTAuNiwwLjQtMC44LDAuOQoJCWMtMC4yLDAuNS0wLjQsMS43LTAuNywzLjdsLTAuOSw2LjhjLTAuNCwyLjctMC44LDQuNi0xLjIsNS43Yy0wLjcsMS44LTEuNywyLjctMywyLjdjLTAuOSwwLTEuNy0wLjUtMi4zLTEuNHMtMC45LTIuMi0wLjktMy44CgkJYzAtMC42LDAtMS4zLDAuMS0yYzAtMC41LDAuMi0xLjMsMC4zLTIuNEw5NTEuOSw1NzQuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NTksNTkwLjNjMC4zLTAuMSwwLjYtMC4zLDAuOC0wLjVjMC4yLTAuMywwLjMtMC44LDAuNC0xLjZsMS44LTEzLjVjMC4xLTAuNCwwLjEtMC43LDAuMS0xCgkJYzAtMC4zLDAtMC41LDAtMC43YzAtMC41LTAuMS0wLjgtMC4yLTFjLTAuMS0wLjEtMC40LTAuMi0wLjgtMC4zVjU3MWg0LjZ2MC44Yy0wLjUsMC4xLTAuOCwwLjMtMSwwLjVjLTAuMiwwLjItMC4zLDAuOC0wLjQsMS43CgkJbC0xLjksMTQuM2MwLDAuMiwwLDAuMywwLDAuNHMwLDAuMywwLDAuNWMwLDAuMywwLjEsMC42LDAuMiwwLjdzMC4zLDAuMiwwLjYsMC4yYzEsMCwxLjgtMC40LDIuNi0xLjFjMC43LTAuNywxLjQtMiwxLjktMy45CgkJbDAuMywwLjFMOTY3LDU5MWgtOFY1OTAuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NjcuOSw1OTAuM2MwLjQsMCwwLjctMC4xLDAuOS0wLjNjMC4zLTAuMywwLjUtMC45LDAuNi0xLjlsMi4xLTE2LjFjLTAuNywwLTEuMywwLjMtMS44LDEuMQoJCWMtMC41LDAuNy0wLjksMS44LTEuMywzLjJsLTAuNC0wLjJsMC42LTUuMWg3LjlsLTAuNSw1LjhsLTAuNC0wLjFjMC0yLTAuMy0zLjMtMC44LTRjLTAuMy0wLjQtMC43LTAuNi0xLjItMC42bC0yLDE1LjNsLTAuMSwxCgkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4yLDFzMC41LDAuMiwxLDAuM3YwLjhoLTQuOFY1OTAuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NzUuNSw1OTEuNmwwLjUtNi43bDAuNCwwLjFjMCwxLDAuMSwxLjcsMC4xLDIuMWMwLjEsMC43LDAuMywxLjQsMC41LDEuOWMwLjIsMC41LDAuNSwwLjksMC43LDEuMgoJCWMwLjMsMC4zLDAuNiwwLjQsMC45LDAuNGMwLjYsMCwxLTAuNCwxLjMtMS4xYzAuMy0wLjgsMC41LTEuNywwLjUtMi43YzAtMS4zLTAuNi0yLjktMS44LTQuOGMtMS4yLTItMS44LTMuOS0xLjgtNS42CgkJYzAtMS42LDAuMy0zLDAuOC00LjFjMC41LTEuMSwxLjItMS43LDIuMi0xLjdjMC4zLDAsMC41LDAuMSwwLjgsMC4yYzAuMiwwLjEsMC4zLDAuMiwwLjUsMC4ybDAuNCwwLjJjMC4xLDAsMC4yLDAuMSwwLjIsMC4xCgkJYzAuMSwwLDAuMiwwLjEsMC4yLDAuMWMwLjIsMCwwLjMtMC4xLDAuNC0wLjJjMC4xLTAuMSwwLjItMC4zLDAuMi0wLjVoMC40bC0wLjYsNmwtMC40LTAuMWwwLTFjLTAuMS0wLjktMC4yLTEuNy0wLjQtMi40CgkJYy0wLjMtMS0wLjgtMS42LTEuNS0xLjZjLTAuNiwwLTEsMC40LTEuMiwxLjNjLTAuMiwwLjYtMC4zLDEuMi0wLjMsMS44YzAsMC43LDAuMSwxLjMsMC4zLDEuOGMwLjEsMC4zLDAuMiwwLjYsMC40LDFsMS4yLDIuMQoJCWMwLjQsMC44LDAuOCwxLjYsMS4xLDIuNmMwLjMsMSwwLjUsMi4xLDAuNSwzLjNjMCwxLjYtMC4zLDMtMC45LDQuM2MtMC42LDEuMy0xLjQsMS45LTIuNSwxLjljLTAuMywwLTAuNS0wLjEtMC44LTAuMgoJCWMtMC4zLTAuMS0wLjUtMC4yLTAuOC0wLjRsLTAuNC0wLjNjLTAuMS0wLjEtMC4yLTAuMi0wLjMtMC4yYzAsMC0wLjEsMC0wLjIsMGMtMC4yLDAtMC4zLDAuMS0wLjMsMC4ycy0wLjEsMC40LTAuMiwwLjhIOTc1LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNOTg1LjUsNjY4LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUM5OTAuNSw2NjYuMyw5ODguMyw2NjguNSw5ODUuNSw2NjguNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik05ODUuNSw2NjloLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUM5OTEsNjY2LjUsOTg4LjUsNjY5LDk4NS41LDY2OXogTTgyNS41LDYyOGMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SDgyNS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg1Mi4yLDY1OC42bDEuNi02LjdsMS4zLDAuMWMwLjEsMSwwLjIsMS43LDAuNCwyLjFjMC4zLDAuNywwLjgsMS40LDEuNSwxLjljMC43LDAuNSwxLjQsMC45LDIuMiwxLjIKCQljMC44LDAuMywxLjcsMC40LDIuNywwLjRjMS43LDAsMy4xLTAuNCw0LTEuMWMxLTAuOCwxLjQtMS43LDEuNC0yLjdjMC0xLjMtMS44LTIuOS01LjMtNC44Yy0zLjYtMi01LjMtMy45LTUuMy01LjYKCQljMC0xLjYsMC44LTMsMi4zLTQuMWMxLjYtMS4xLDMuNy0xLjcsNi42LTEuN2MwLjgsMCwxLjYsMC4xLDIuNCwwLjJjMC41LDAuMSwxLDAuMiwxLjQsMC4ybDEuMSwwLjJjMC4yLDAsMC41LDAuMSwwLjcsMC4xCgkJYzAuMywwLDAuNSwwLjEsMC43LDAuMWMwLjUsMCwwLjktMC4xLDEuMi0wLjJzMC41LTAuMywwLjctMC41aDEuM2wtMS44LDZsLTEuMS0wLjFsLTAuMS0xYy0wLjItMC45LTAuNi0xLjctMS4zLTIuNAoJCWMtMS0xLTIuNS0xLjYtNC41LTEuNmMtMS43LDAtMi45LDAuNC0zLjcsMS4zYy0wLjUsMC42LTAuOCwxLjItMC44LDEuOGMwLDAuNywwLjMsMS4zLDAuOCwxLjhjMC4zLDAuMywwLjcsMC42LDEuMywxbDMuOCwyLjEKCQljMS4zLDAuOCwyLjUsMS42LDMuNCwyLjZjMC45LDEsMS40LDIuMSwxLjQsMy4zYzAsMS42LTAuOSwzLTIuNyw0LjNjLTEuOCwxLjMtNC4zLDEuOS03LjQsMS45Yy0wLjgsMC0xLjYtMC4xLTIuNC0wLjIKCQljLTAuOC0wLjEtMS42LTAuMi0yLjQtMC40bC0xLjEtMC4zYy0wLjQtMC4xLTAuNi0wLjItMC44LTAuMmMtMC4xLDAtMC4zLDAtMC41LDBjLTAuNSwwLTAuOCwwLjEtMSwwLjJzLTAuNCwwLjQtMC43LDAuOEg4NTIuMnoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04ODAuOSw2NDIuMWMzLjgtMy4xLDgtNC42LDEyLjctNC42YzMuMSwwLDUuNywwLjYsNy43LDJjMiwxLjMsMywzLjEsMyw1LjNjMCwzLjItMS44LDYuMy01LjMsOS4yCgkJYy0zLjgsMy4xLTguMiw0LjctMTMuMSw0LjdjLTMuMSwwLTUuNi0wLjctNy42LTJzLTIuOS0zLTIuOS01LjJDODc1LjUsNjQ4LjEsODc3LjMsNjQ1LDg4MC45LDY0Mi4xeiBNODgyLjIsNjU1LjgKCQljMC43LDEuMiwyLDEuOCwzLjgsMS44YzEuNywwLDMuMy0wLjQsNC43LTEuM2MxLjQtMC45LDIuOS0yLjUsNC40LTVjMC45LTEuNiwxLjctMy4yLDIuMi00LjljMC41LTEuNywwLjgtMy4xLDAuOC00LjIKCQljMC0xLTAuNC0xLjktMS4xLTIuNmMtMC43LTAuNy0xLjgtMS4xLTMuNC0xLjFjLTMuNiwwLTYuNiwyLjItOS4xLDYuNmMtMS45LDMuNC0yLjgsNi4yLTIuOCw4LjQKCQlDODgxLjcsNjU0LjQsODgxLjksNjU1LjEsODgyLjIsNjU1Ljh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTAyLjksNjU3LjNjMS0wLjEsMS44LTAuMywyLjMtMC41YzAuNS0wLjMsMC45LTAuOCwxLjItMS42bDUuMy0xMy41YzAuMi0wLjQsMC4zLTAuNywwLjMtMQoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjItMC44LTAuNi0xYy0wLjQtMC4xLTEuMy0wLjItMi42LTAuM1Y2MzhoMTMuOHYwLjhjLTEuNSwwLjEtMi41LDAuMy0zLjEsMC41cy0xLDAuOC0xLjMsMS43CgkJbC01LjcsMTQuM2MtMC4xLDAuMi0wLjEsMC4zLTAuMSwwLjRzLTAuMSwwLjMtMC4xLDAuNWMwLDAuMywwLjIsMC42LDAuNiwwLjdjMC40LDAuMSwxLDAuMiwxLjgsMC4yYzMsMCw1LjYtMC40LDcuNy0xLjEKCQljMi4yLTAuNyw0LjEtMiw1LjgtMy45bDEsMC4xTDkyNyw2NThoLTI0LjFWNjU3LjN6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTI3LjIsNjU3LjNjMC45LTAuMSwxLjYtMC4yLDItMC40YzAuNy0wLjMsMS4yLTAuOSwxLjUtMS43bDUuMy0xMy41YzAuMi0wLjQsMC4zLTAuNywwLjQtMQoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjItMC44LTAuNi0xYy0wLjQtMC4xLTEuMy0wLjItMi42LTAuM1Y2MzhoMTIuNmM0LjMsMCw3LjUsMC44LDkuOCwyLjNjMi4yLDEuNSwzLjMsMy41LDMuMyw2LjEKCQljMCwzLjEtMS42LDUuNy00LjksOGMtMy43LDIuNS04LjUsMy44LTE0LjQsMy44aC0xMi41VjY1Ny4zeiBNOTUxLjUsNjQwLjljLTEuMS0xLjMtMy4xLTItNS45LTJjLTAuOSwwLTEuNiwwLjEtMS45LDAuMwoJCWMtMC4zLDAuMi0wLjYsMC41LTAuNywwLjhsLTYsMTUuMWMtMC4xLDAuMS0wLjEsMC4zLTAuMSwwLjRzMCwwLjIsMCwwLjNjMCwwLjQsMC4yLDAuNywwLjUsMC44YzAuMywwLjIsMSwwLjMsMS45LDAuMwoJCWM1LjIsMCw4LjktMS44LDExLjItNS41YzEuNC0yLjIsMi4xLTQuNiwyLjEtNy4xQzk1Mi42LDY0Myw5NTIuMyw2NDEuOCw5NTEuNSw2NDAuOXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik05ODUuNSw3MzUuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJQzk5MC41LDczMy4zLDk4OC4zLDczNS41LDk4NS41LDczNS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0NiIgZD0iTTk4NS41LDczNmgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJQzk5MSw3MzMuNSw5ODguNSw3MzYsOTg1LjUsNzM2eiBNODI1LjUsNjk1Yy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVIODI1LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODMxLjYsNzI0LjNjMC44LDAsMS40LTAuMSwxLjctMC4zYzAuNS0wLjMsMC45LTAuOSwxLjEtMS45bDMuOS0xNi4xYy0xLjMsMC0yLjUsMC4zLTMuNCwxLjEKCQljLTAuOSwwLjctMS43LDEuOC0yLjMsMy4ybC0wLjctMC4ybDEtNS4xaDE0LjdsLTEsNS44bC0wLjctMC4xYzAtMi0wLjUtMy4zLTEuNS00Yy0wLjUtMC40LTEuMy0wLjYtMi4yLTAuNmwtMy43LDE1LjNsLTAuMiwxCgkJYzAsMC4xLDAsMC4yLTAuMSwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjQsMWMwLjMsMC4xLDAuOSwwLjIsMS44LDAuM3YwLjhoLTguOFY3MjQuM3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04NDkuMyw3MDkuMWMyLjMtMy4xLDQuOS00LjYsNy44LTQuNmMxLjksMCwzLjUsMC42LDQuNywyYzEuMiwxLjMsMS45LDMuMSwxLjksNS4zYzAsMy4yLTEuMSw2LjMtMy4zLDkuMgoJCWMtMi4zLDMuMS01LDQuNy04LDQuN2MtMS45LDAtMy41LTAuNy00LjYtMnMtMS44LTMtMS44LTUuMkM4NDUuOSw3MTUuMSw4NDcsNzEyLDg0OS4zLDcwOS4xeiBNODUwLjEsNzIyLjgKCQljMC40LDEuMiwxLjIsMS44LDIuMywxLjhjMS4xLDAsMi0wLjQsMi45LTEuM2MwLjktMC45LDEuOC0yLjUsMi43LTVjMC42LTEuNiwxLTMuMiwxLjQtNC45YzAuMy0xLjcsMC41LTMuMSwwLjUtNC4yCgkJYzAtMS0wLjItMS45LTAuNy0yLjZjLTAuNC0wLjctMS4xLTEuMS0yLjEtMS4xYy0yLjIsMC00LjEsMi4yLTUuNiw2LjZjLTEuMSwzLjQtMS43LDYuMi0xLjcsOC40CgkJQzg0OS44LDcyMS40LDg0OS45LDcyMi4xLDg1MC4xLDcyMi44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg2Mi42LDcyNC4zYzAuNi0wLjEsMS4xLTAuMywxLjQtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuMy0xMy41YzAuMS0wLjMsMC4xLTAuNiwwLjItMC45CgkJczAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjItMC45LTAuNS0xYy0wLjItMC4xLTAuNy0wLjItMS40LTAuMlY3MDVoNy43YzEuMywwLDIuNCwwLjIsMy4yLDAuNmMxLjYsMC43LDIuNCwyLjEsMi40LDQuMQoJCWMwLDEuOC0wLjcsMy4yLTIsNC4zYy0xLjMsMS4xLTMsMS42LTUuMSwxLjZjLTAuMywwLTAuNiwwLTAuOCwwYy0wLjIsMC0wLjcsMC0xLjUtMC4xbC0xLjUsNmwtMC4yLDFjMCwwLjEsMCwwLjItMC4xLDAuMwoJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuNCwxYzAuMiwwLjEsMC44LDAuMiwxLjYsMC4zdjAuOGgtNy45VjcyNC4zeiBNODcwLjUsNzE0LjRjMC4yLDAsMC40LDAsMC41LDAuMQoJCWMwLjEsMCwwLjMsMCwwLjQsMGMwLjksMCwxLjYtMC4xLDIuMS0wLjRzMC45LTAuNiwxLjMtMS4yYzAuMy0wLjUsMC42LTEuMiwwLjgtMmMwLjItMC44LDAuMy0xLjUsMC4zLTIuMWMwLTAuOC0wLjItMS41LTAuNS0yLjEKCQljLTAuNC0wLjUtMS0wLjgtMS44LTAuOGMtMC40LDAtMC43LDAuMS0wLjgsMC4zYy0wLjEsMC4yLTAuMywwLjUtMC40LDFMODcwLjUsNzE0LjR6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODgzLjIsNzI1LjZsMS02LjdsMC44LDAuMWMwLjEsMSwwLjEsMS43LDAuMiwyLjFjMC4yLDAuNywwLjUsMS40LDAuOSwxLjljMC40LDAuNSwwLjksMC45LDEuNCwxLjIKCQljMC41LDAuMywxLjEsMC40LDEuNywwLjRjMS4xLDAsMS45LTAuNCwyLjUtMS4xYzAuNi0wLjgsMC45LTEuNywwLjktMi43YzAtMS4zLTEuMS0yLjktMy4zLTQuOGMtMi4yLTItMy4zLTMuOS0zLjMtNS42CgkJYzAtMS42LDAuNS0zLDEuNC00LjFjMS0xLjEsMi4zLTEuNyw0LTEuN2MwLjUsMCwxLDAuMSwxLjUsMC4yYzAuMywwLjEsMC42LDAuMiwwLjksMC4ybDAuNywwLjJjMC4xLDAsMC4zLDAuMSwwLjUsMC4xCgkJYzAuMiwwLDAuMywwLjEsMC40LDAuMWMwLjMsMCwwLjYtMC4xLDAuNy0wLjJzMC4zLTAuMywwLjQtMC41aDAuOGwtMS4xLDZsLTAuNy0wLjFsLTAuMS0xYy0wLjEtMC45LTAuNC0xLjctMC44LTIuNAoJCWMtMC42LTEtMS41LTEuNi0yLjctMS42Yy0xLDAtMS44LDAuNC0yLjIsMS4zYy0wLjMsMC42LTAuNSwxLjItMC41LDEuOGMwLDAuNywwLjIsMS4zLDAuNSwxLjhjMC4yLDAuMywwLjUsMC42LDAuOCwxbDIuMywyLjEKCQljMC44LDAuOCwxLjUsMS42LDIuMSwyLjZjMC42LDEsMC45LDIuMSwwLjksMy4zYzAsMS42LTAuNiwzLTEuNyw0LjNjLTEuMSwxLjMtMi42LDEuOS00LjYsMS45Yy0wLjUsMC0xLTAuMS0xLjUtMC4yCgkJYy0wLjUtMC4xLTEtMC4yLTEuNS0wLjRsLTAuNy0wLjNjLTAuMi0wLjEtMC40LTAuMi0wLjUtMC4yYy0wLjEsMC0wLjIsMC0wLjMsMGMtMC4zLDAtMC41LDAuMS0wLjYsMC4ycy0wLjMsMC40LTAuNCwwLjhIODgzLjJ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODk2LDcyNC4zYzAuNi0wLjEsMS4xLTAuMywxLjQtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuMy0xMy41YzAuMS0wLjMsMC4xLTAuNywwLjItMC45CgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC41LTAuMS0wLjgtMC40LTFjLTAuMi0wLjEtMC44LTAuMi0xLjYtMC4zVjcwNWgxNC40bC0xLjEsNS43bC0wLjctMC4xYzAtMS41LTAuMi0yLjUtMC42LTMuMQoJCWMtMC43LTEtMi4xLTEuNS00LjEtMS41Yy0wLjcsMC0xLjIsMC4xLTEuNCwwLjNjLTAuMiwwLjItMC40LDAuNS0wLjUsMS4xbC0xLjYsNi43YzEuOSwwLDMuMS0wLjIsMy42LTAuNXMxLjItMS4yLDEuOC0yLjdsMC43LDAuMQoJCWwtMiw4LjJsLTAuNy0wLjFjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS4xLTAuMy0xLjgtMC44LTIuMmMtMC41LTAuNC0xLjUtMC42LTMuMS0wLjZsLTEuOCw3LjMKCQljMCwwLjItMC4xLDAuMy0wLjEsMC41czAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4zLDAuN2MwLjIsMC4yLDAuNiwwLjMsMS4yLDAuM2MxLjYsMCwzLTAuMyw0LjEtMC44YzEuOC0wLjgsMy4yLTIuMiw0LjEtNC4yCgkJbDAuNywwLjFsLTEuNiw1LjhIODk2VjcyNC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTkyNy42LDcwNC45YzEsMC4zLDEuNSwwLjQsMS43LDAuNGMwLjMsMCwwLjUtMC4xLDAuNi0wLjJjMC4xLTAuMiwwLjMtMC40LDAuNC0wLjZoMC44bC0xLjQsN2wtMC44LTAuMgoJCWMwLTAuNCwwLTAuNywwLTAuN2MwLTAuMSwwLTAuMiwwLTAuM2MwLTEuNi0wLjMtMi44LTEtMy41Yy0wLjctMC44LTEuNS0xLjItMi41LTEuMmMtMi4xLDAtMy45LDEuNS01LjQsNC42CgkJYy0xLjQsMi44LTIuMSw1LjYtMi4xLDguNGMwLDIuMSwwLjQsMy41LDEuMyw0LjNjMC44LDAuOCwxLjgsMS4yLDIuOCwxLjJjMS4zLDAsMi41LTAuNSwzLjctMS41YzAuNi0wLjUsMS4zLTEuMiwxLjktMi4xbDAuOCwwLjcKCQljLTAuOSwxLjUtMiwyLjctMy4zLDMuNGMtMS4zLDAuNy0yLjYsMS4xLTMuOSwxLjFjLTIuMSwwLTMuOS0wLjctNS4zLTIuMWMtMS40LTEuNC0yLjEtMy4zLTIuMS01LjdjMC0zLjYsMS4xLTYuNywzLjItOS40CgkJYzIuMS0yLjcsNC43LTQsNy42LTRDOTI1LjcsNzA0LjUsOTI2LjcsNzA0LjYsOTI3LjYsNzA0Ljl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNOTI5LjMsNzI0LjNjMC42LTAuMSwxLjEtMC4zLDEuNC0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy4zLTEzLjVjMC4xLTAuMywwLjEtMC41LDAuMi0wLjcKCQljMC4xLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC40LTAuOXMtMC44LTAuMi0xLjYtMC4zVjcwNWg3LjNjMS42LDAsMi45LDAuMiwzLjgsMC41YzEuNywwLjcsMi41LDEuOSwyLjUsMy44CgkJYzAsMC42LTAuMSwxLjMtMC40LDJzLTAuNywxLjQtMS40LDEuOWMtMC41LDAuNC0xLDAuNy0xLjYsMWMtMC40LDAuMS0wLjksMC4zLTEuNywwLjVjMC4xLDAuMywwLjEsMC41LDAuMiwwLjZsMi4xLDYuOAoJCWMwLjMsMC45LDAuNiwxLjUsMC45LDEuN2MwLjMsMC4yLDAuOCwwLjQsMS41LDAuNHYwLjhoLTUuNGwtMi45LTkuOWgtMC43bC0xLjYsNi4ybC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuM3MwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC45LDAuMywxYzAuMiwwLjEsMC44LDAuMiwxLjYsMC4zdjAuOGgtOFY3MjQuM3ogTTkzOS41LDcxMy45YzAuOC0wLjIsMS41LTAuNiwxLjktMS4xYzAuMy0wLjQsMC42LTAuOSwwLjktMS42CgkJYzAuMy0wLjcsMC40LTEuNSwwLjQtMi4zYzAtMC44LTAuMi0xLjUtMC42LTIuMWMtMC40LTAuNi0xLTAuOC0xLjktMC44Yy0wLjQsMC0wLjYsMC4xLTAuOCwwLjNjLTAuMiwwLjItMC4zLDAuNS0wLjQsMS4xbC0xLjYsNi45CgkJQzkzOC40LDcxNC4xLDkzOS4xLDcxNCw5MzkuNSw3MTMuOXoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05NDYsNzI0LjNjMC42LTAuMSwxLjEtMC4zLDEuNC0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy4zLTEzLjVjMC4xLTAuMywwLjEtMC43LDAuMi0wLjkKCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMWMtMC4yLTAuMS0wLjgtMC4yLTEuNi0wLjNWNzA1aDE0LjRsLTEuMSw1LjdsLTAuNy0wLjFjMC0xLjUtMC4yLTIuNS0wLjYtMy4xCgkJYy0wLjctMS0yLjEtMS41LTQuMS0xLjVjLTAuNywwLTEuMiwwLjEtMS40LDAuM2MtMC4yLDAuMi0wLjQsMC41LTAuNSwxLjFsLTEuNiw2LjdjMS45LDAsMy4xLTAuMiwzLjYtMC41czEuMi0xLjIsMS44LTIuN2wwLjcsMC4xCgkJbC0yLDguMmwtMC43LTAuMWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLjEtMC4zLTEuOC0wLjgtMi4yYy0wLjUtMC40LTEuNS0wLjYtMy4xLTAuNmwtMS44LDcuMwoJCWMwLDAuMi0wLjEsMC4zLTAuMSwwLjVjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjMsMC43czAuNiwwLjMsMS4yLDAuM2MxLjYsMCwzLTAuMyw0LjEtMC44YzEuOC0wLjgsMy4yLTIuMiw0LjItNC4yCgkJbDAuNywwLjFsLTEuNiw1LjhIOTQ2VjcyNC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTk2NC41LDcyNC4zYzAuOCwwLDEuNC0wLjEsMS43LTAuM2MwLjUtMC4zLDAuOS0wLjksMS4xLTEuOWwzLjktMTYuMWMtMS4zLDAtMi41LDAuMy0zLjQsMS4xCgkJYy0wLjksMC43LTEuNywxLjgtMi4zLDMuMmwtMC43LTAuMmwxLTUuMWgxNC43bC0xLDUuOGwtMC43LTAuMWMwLTItMC41LTMuMy0xLjUtNGMtMC41LTAuNC0xLjMtMC42LTIuMi0wLjZsLTMuNywxNS4zbC0wLjIsMQoJCWMwLDAuMSwwLDAuMi0wLjEsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC40LDFjMC4zLDAuMSwwLjksMC4yLDEuOCwwLjN2MC44aC04LjhWNzI0LjN6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q3IiBkPSJNOTg1LjUsODAzLjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCUM5OTAuNSw4MDEuMyw5ODguMyw4MDMuNSw5ODUuNSw4MDMuNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik05ODUuNSw4MDRoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUM5OTEsODAxLjUsOTg4LjUsODA0LDk4NS41LDgwNHogTTgyNS41LDc2M2MtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SDgyNS41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0OSIgZD0iTTg2OCw3NzN2MC44Yy0xLjEsMC0xLjksMC4xLTIuNCwwLjJjLTAuNywwLjItMS4xLDAuNS0xLjEsMS4xYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zbDIuMywxMS45CgkJbDguNi05YzAuNy0wLjcsMS4zLTEuNCwxLjgtMi4xYzAuNS0wLjcsMC44LTEuMywwLjgtMS43cy0wLjMtMC43LTAuOC0wLjhjLTAuNC0wLjEtMS0wLjEtMi4xLTAuMVY3NzNoOC43djAuOAoJCWMtMC43LDAuMS0xLjIsMC4zLTEuNiwwLjVjLTAuNiwwLjMtMS4yLDAuOC0xLjgsMS40bC0xNy4xLDE4SDg2MmwtMy40LTE1LjNjLTAuNS0yLjItMC45LTMuNS0xLjMtMy45Yy0wLjMtMC40LTEuMy0wLjYtMi44LTAuNwoJCVY3NzNIODY4eiIvPgoJPHBhdGggY2xhc3M9InN0OSIgZD0iTTg4Ny40LDc3Ny4xYzQtMy4xLDguNC00LjYsMTMuMy00LjZjMy4zLDAsNS45LDAuNiw4LDJjMi4xLDEuMywzLjEsMy4xLDMuMSw1LjNjMCwzLjItMS45LDYuMy01LjYsOS4yCgkJYy00LDMuMS04LjUsNC43LTEzLjYsNC43Yy0zLjIsMC01LjktMC43LTcuOS0yYy0yLTEuMy0zLTMtMy01LjJDODgxLjcsNzgzLjEsODgzLjYsNzgwLDg4Ny40LDc3Ny4xeiBNODg4LjgsNzkwLjgKCQljMC43LDEuMiwyLDEuOCwzLjksMS44YzEuOCwwLDMuNC0wLjQsNC45LTEuM2MxLjUtMC45LDMtMi41LDQuNS01YzEtMS42LDEuOC0zLjIsMi4zLTQuOWMwLjYtMS43LDAuOC0zLjEsMC44LTQuMgoJCWMwLTEtMC40LTEuOS0xLjEtMi42Yy0wLjgtMC43LTEuOS0xLjEtMy41LTEuMWMtMy44LDAtNi45LDIuMi05LjUsNi42Yy0xLjksMy40LTIuOSw2LjItMi45LDguNAoJCUM4ODguMyw3ODkuNCw4ODguNCw3OTAuMSw4ODguOCw3OTAuOHoiLz4KCTxwYXRoIGNsYXNzPSJzdDkiIGQ9Ik05MTAuMyw3OTIuM2MxLjEtMC4xLDEuOS0wLjMsMi40LTAuNWMwLjUtMC4zLDAuOS0wLjgsMS4zLTEuNmw1LjYtMTMuNWMwLjItMC40LDAuMy0wLjcsMC40LTEKCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4yLTAuOC0wLjYtMWMtMC40LTAuMS0xLjMtMC4yLTIuNy0wLjNWNzczaDEzLjV2MC44Yy0xLjEsMC4xLTEuOSwwLjMtMi40LDAuNXMtMC45LDAuOC0xLjIsMS42CgkJbC01LjYsMTMuNWwtMC40LDFjMCwwLjEtMC4xLDAuMi0wLjEsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMiwwLjgsMC42LDFjMC40LDAuMSwxLjMsMC4yLDIuNywwLjN2MC44aC0xMy41Vjc5Mi4zeiIvPgoJPHBhdGggY2xhc3M9InN0OSIgZD0iTTkyNS41LDc5Mi4zYzEtMC4xLDEuNy0wLjIsMi4xLTAuNGMwLjctMC4zLDEuMi0wLjksMS42LTEuN2w1LjYtMTMuNWMwLjItMC40LDAuMy0wLjcsMC40LTFzMC4xLTAuNSwwLjEtMC43CgkJYzAtMC41LTAuMi0wLjgtMC42LTFjLTAuNC0wLjEtMS4zLTAuMi0yLjctMC4zVjc3M2gxMy4xYzQuNCwwLDcuOCwwLjgsMTAuMiwyLjNjMi4zLDEuNSwzLjUsMy41LDMuNSw2LjFjMCwzLjEtMS43LDUuNy01LjIsOAoJCWMtMy44LDIuNS04LjgsMy44LTE1LDMuOGgtMTNWNzkyLjN6IE05NTAuOSw3NzUuOWMtMS4yLTEuMy0zLjItMi02LjEtMmMtMSwwLTEuNiwwLjEtMiwwLjNjLTAuMywwLjItMC42LDAuNS0wLjcsMC44bC02LjIsMTUuMQoJCWMtMC4xLDAuMS0wLjEsMC4zLTAuMSwwLjRjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjQsMC4yLDAuNywwLjUsMC44YzAuNCwwLjIsMSwwLjMsMiwwLjNjNS40LDAsOS4zLTEuOCwxMS43LTUuNQoJCWMxLjUtMi4yLDIuMi00LjYsMi4yLTcuMUM5NTIuMSw3NzgsOTUxLjcsNzc2LjgsOTUwLjksNzc1Ljl6Ii8+CjwvZz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QxMCIgZD0iTTk4NS41LTIxNi41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQkJQzk5MC41LTIxOC43LDk4OC4zLTIxNi41LDk4NS41LTIxNi41eiIvPgoJPC9nPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0OSIgZD0iTTk4NS41LTIxNmgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJCUM5OTEtMjE4LjUsOTg4LjUtMjE2LDk4NS41LTIxNnogTTgyNS41LTI1N2MtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCQljMC0yLjUtMi00LjUtNC41LTQuNUg4MjUuNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik04MzEuOC0yMjguN2MwLjUtMC4xLDAuOS0wLjQsMS4yLTAuOWMwLjItMC41LDAuNS0xLjcsMC45LTMuNmwyLjMtMTIuMWwtMC4xLTAuM2MtMC4yLTAuNS0wLjQtMC45LTAuNi0xLjEKCQkJYy0wLjItMC4xLTAuNS0wLjItMS0wLjJ2LTAuOGg0LjJsNC41LDEzLjZsMS42LTguM2MwLjEtMC41LDAuMi0xLDAuMi0xLjRjMC4xLTAuNiwwLjEtMS4xLDAuMS0xLjNjMC0wLjctMC4yLTEuMi0wLjUtMS41CgkJCWMtMC4yLTAuMi0wLjYtMC4zLTEuMS0wLjN2LTAuOGg0LjJ2MC44bC0wLjMsMC4xYy0wLjQsMC4xLTAuOCwwLjQtMSwxYy0wLjIsMC42LTAuNSwxLjctMC44LDMuNGwtMi45LDE1aC0wLjVsLTUuNC0xNi4zCgkJCWwtMi4xLDEwLjZjLTAuMiwwLjktMC4zLDEuNS0wLjMsMmMwLDAuMy0wLjEsMC41LTAuMSwwLjhjMCwwLjcsMC4yLDEuMiwwLjUsMS40YzAuMiwwLjIsMC42LDAuMywxLjEsMC4zdjAuOGgtNC4zVi0yMjguN3oiLz4KCQk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNODQ5LjUtMjQzLjdjMS44LTMsMy44LTQuNSw2LjEtNC41YzEuNSwwLDIuNywwLjYsMy43LDEuOXMxLjQsMywxLjQsNS4yYzAsMy4yLTAuOCw2LjItMi41LDkuMQoJCQljLTEuOCwzLjEtMy45LDQuNi02LjIsNC42Yy0xLjUsMC0yLjctMC42LTMuNi0xLjljLTAuOS0xLjMtMS40LTMtMS40LTUuMUM4NDYuOS0yMzcuNyw4NDcuOC0yNDAuOCw4NDkuNS0yNDMuN3ogTTg1MC4xLTIzMC4yCgkJCWMwLjMsMS4yLDAuOSwxLjgsMS44LDEuOGMwLjgsMCwxLjYtMC40LDIuMi0xLjNjMC43LTAuOSwxLjQtMi41LDIuMS00LjljMC41LTEuNSwwLjgtMy4xLDEuMS00LjhjMC4zLTEuNywwLjQtMy4xLDAuNC00LjEKCQkJYzAtMS0wLjItMS44LTAuNS0yLjVjLTAuMy0wLjctMC45LTEuMS0xLjYtMS4xYy0xLjcsMC0zLjIsMi4yLTQuMyw2LjVjLTAuOSwzLjMtMS4zLDYuMS0xLjMsOC4zCgkJCUM4NDkuOS0yMzEuNSw4NTAtMjMwLjgsODUwLjEtMjMwLjJ6Ii8+CgkJPHBhdGggY2xhc3M9InN0OCIgZD0iTTg2MS4yLTIyOC43YzAuNiwwLDEuMS0wLjEsMS4zLTAuM2MwLjQtMC4zLDAuNy0wLjksMC44LTEuOGwzLTE1LjljLTEsMC0xLjksMC4zLTIuNiwxLjEKCQkJYy0wLjcsMC43LTEuMywxLjgtMS44LDMuMmwtMC41LTAuMmwwLjgtNWgxMS40bC0wLjcsNS43bC0wLjUtMC4xYzAtMS45LTAuNC0zLjItMS4xLTMuOWMtMC40LTAuNC0xLTAuNi0xLjctMC42bC0yLjksMTUuMWwtMC4yLDEKCQkJYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC41LDAuMSwwLjgsMC4zLDFjMC4yLDAuMSwwLjcsMC4yLDEuNCwwLjN2MC44aC02LjhWLTIyOC43eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik04NzQuNi0yMjguN2MwLjQtMC4yLDAuNy0wLjMsMC44LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC45LTEuNmw3LjctMTcuNGgwLjVsMiwxNi45YzAuMSwxLjEsMC4zLDEuOCwwLjUsMi4xCgkJCWMwLjIsMC4zLDAuNiwwLjQsMS4yLDAuNXYwLjdoLTYuM3YtMC43YzAuNi0wLjEsMS0wLjIsMS4zLTAuNHMwLjQtMC42LDAuNC0xLjNjMC0wLjIsMC0wLjctMC4xLTEuNmMwLTAuMi0wLjEtMC45LTAuMi0yLjFoLTQuNQoJCQlsLTEuMiwzYy0wLjEsMC4yLTAuMiwwLjQtMC4yLDAuN2MtMC4xLDAuMi0wLjEsMC41LTAuMSwwLjdjMCwwLjQsMC4xLDAuNywwLjMsMC44YzAuMiwwLjEsMC41LDAuMiwxLjEsMC4zdjAuN2gtNC4xVi0yMjguN3oKCQkJIE04ODMuMS0yMzUuM2wtMC44LTcuMmwtMy4xLDcuMkg4ODMuMXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNODg4LTIyOC43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjEtMC45CgkJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOS0wLjQtMWMtMC4yLTAuMS0wLjUtMC4yLTEuMS0wLjJ2LTAuOGg1LjljMSwwLDEuOCwwLjIsMi41LDAuNmMxLjMsMC43LDEuOSwyLjEsMS45LDQKCQkJYzAsMS44LTAuNSwzLjItMS41LDQuMmMtMSwxLjEtMi40LDEuNi00LDEuNmMtMC4yLDAtMC40LDAtMC42LDBzLTAuNSwwLTEuMi0wLjFsLTEuMSw1LjlsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zCgkJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywwLjljMC4yLDAuMSwwLjYsMC4yLDEuMiwwLjN2MC44SDg4OFYtMjI4Ljd6IE04OTQuMS0yMzguNGMwLjEsMCwwLjMsMCwwLjQsMC4xCgkJCWMwLjEsMCwwLjIsMCwwLjMsMGMwLjcsMCwxLjItMC4xLDEuNi0wLjRjMC40LTAuMiwwLjctMC42LDEtMS4yYzAuMy0wLjUsMC41LTEuMiwwLjYtMnMwLjItMS41LDAuMi0yYzAtMC44LTAuMS0xLjUtMC40LTIKCQkJYy0wLjMtMC41LTAuNy0wLjgtMS40LTAuOGMtMC4zLDAtMC41LDAuMS0wLjcsMC4zYy0wLjEsMC4yLTAuMiwwLjUtMC4zLDFMODk0LjEtMjM4LjR6Ii8+CgkJPHBhdGggY2xhc3M9InN0OCIgZD0iTTg5OS43LTIyOC43YzAuNS0wLjEsMC45LTAuMywxLjEtMC41YzAuMi0wLjMsMC40LTAuOCwwLjYtMS42bDIuNS0xMy4yYzAuMS0wLjMsMC4xLTAuNiwwLjEtMC45CgkJCWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOS0wLjQtMWMtMC4yLTAuMS0wLjUtMC4yLTEuMS0wLjJ2LTAuOGg1LjljMSwwLDEuOCwwLjIsMi41LDAuNmMxLjMsMC43LDEuOSwyLjEsMS45LDQKCQkJYzAsMS44LTAuNSwzLjItMS41LDQuMmMtMSwxLjEtMi40LDEuNi00LDEuNmMtMC4yLDAtMC40LDAtMC42LDBzLTAuNSwwLTEuMi0wLjFsLTEuMSw1LjlsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zCgkJCWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuMywwLjljMC4yLDAuMSwwLjYsMC4yLDEuMiwwLjN2MC44aC02LjFWLTIyOC43eiBNOTA1LjgtMjM4LjRjMC4xLDAsMC4zLDAsMC40LDAuMQoJCQljMC4xLDAsMC4yLDAsMC4zLDBjMC43LDAsMS4yLTAuMSwxLjYtMC40YzAuNC0wLjIsMC43LTAuNiwxLTEuMmMwLjMtMC41LDAuNS0xLjIsMC42LTJzMC4yLTEuNSwwLjItMmMwLTAuOC0wLjEtMS41LTAuNC0yCgkJCWMtMC4zLTAuNS0wLjctMC44LTEuNC0wLjhjLTAuMywwLTAuNSwwLjEtMC43LDAuM2MtMC4xLDAuMi0wLjIsMC41LTAuMywxTDkwNS44LTIzOC40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik05MTEuNC0yMjguN2MwLjUtMC4xLDAuOS0wLjMsMS4xLTAuNWMwLjItMC4zLDAuNC0wLjgsMC42LTEuNmwyLjUtMTMuMmMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuNwoJCQljMC4xLTAuNCwwLjEtMC43LDAuMS0xYzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMi0wLjN2LTAuOGg1LjdjMS4zLDAsMi4zLDAuMiwzLDAuNWMxLjMsMC43LDEuOSwxLjksMS45LDMuNwoJCQljMCwwLjYtMC4xLDEuMy0wLjMsMnMtMC42LDEuMy0xLjEsMS45Yy0wLjQsMC40LTAuOCwwLjctMS4zLDFjLTAuMywwLjEtMC43LDAuMy0xLjMsMC41YzAuMSwwLjMsMC4xLDAuNSwwLjEsMC42bDEuNiw2LjcKCQkJYzAuMiwwLjksMC40LDEuNSwwLjcsMS43YzAuMiwwLjIsMC42LDAuNCwxLjEsMC40djAuOGgtNC4ybC0yLjItOS44aC0wLjZsLTEuMiw2LjFsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJCWMwLDAuNSwwLjEsMC45LDAuMywxczAuNiwwLjIsMS4yLDAuM3YwLjhoLTYuMlYtMjI4Ljd6IE05MTkuMy0yMzguOWMwLjYtMC4yLDEuMS0wLjYsMS41LTEuMWMwLjItMC40LDAuNS0wLjksMC43LTEuNgoJCQljMC4yLTAuNywwLjMtMS40LDAuMy0yLjNjMC0wLjgtMC4xLTEuNS0wLjQtMi4xYy0wLjMtMC41LTAuOC0wLjgtMS41LTAuOGMtMC4zLDAtMC41LDAuMS0wLjYsMC4zcy0wLjIsMC41LTAuMywxbC0xLjIsNi44CgkJCUM5MTguNC0yMzguNyw5MTguOS0yMzguOCw5MTkuMy0yMzguOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNOTI4LTI0My43YzEuOC0zLDMuOC00LjUsNi4xLTQuNWMxLjUsMCwyLjcsMC42LDMuNywxLjlzMS40LDMsMS40LDUuMmMwLDMuMi0wLjgsNi4yLTIuNSw5LjEKCQkJYy0xLjgsMy4xLTMuOSw0LjYtNi4yLDQuNmMtMS41LDAtMi43LTAuNi0zLjYtMS45cy0xLjQtMy0xLjQtNS4xQzkyNS40LTIzNy43LDkyNi4zLTI0MC44LDkyOC0yNDMuN3ogTTkyOC43LTIzMC4yCgkJCWMwLjMsMS4yLDAuOSwxLjgsMS44LDEuOGMwLjgsMCwxLjYtMC40LDIuMi0xLjNjMC43LTAuOSwxLjQtMi41LDIuMS00LjljMC41LTEuNSwwLjgtMy4xLDEuMS00LjhjMC4zLTEuNywwLjQtMy4xLDAuNC00LjEKCQkJYzAtMS0wLjItMS44LTAuNS0yLjVjLTAuMy0wLjctMC45LTEuMS0xLjYtMS4xYy0xLjcsMC0zLjIsMi4yLTQuMyw2LjVjLTAuOSwzLjMtMS4zLDYuMS0xLjMsOC4zCgkJCUM5MjguNC0yMzEuNSw5MjguNS0yMzAuOCw5MjguNy0yMzAuMnoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNOTQ2LjEtMjQ3Ljd2MC44Yy0wLjUsMC0wLjksMC4xLTEuMSwwLjJjLTAuMywwLjItMC41LDAuNS0wLjUsMWMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuMwoJCQlsMS4xLDExLjhsMy45LTguOGMwLjMtMC43LDAuNi0xLjQsMC44LTIuMWMwLjItMC43LDAuNC0xLjMsMC40LTEuN2MwLTAuNC0wLjEtMC43LTAuNC0wLjhjLTAuMi0wLjEtMC41LTAuMS0wLjktMC4xdi0wLjhoNHYwLjgKCQkJYy0wLjMsMC4xLTAuNiwwLjMtMC43LDAuNGMtMC4zLDAuMy0wLjUsMC43LTAuOCwxLjRsLTcuOCwxNy43aC0wLjdsLTEuNi0xNWMtMC4yLTIuMS0wLjQtMy40LTAuNi0zLjhzLTAuNi0wLjYtMS4zLTAuN3YtMC44CgkJCUg5NDYuMXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNOTUxLjMtMjI4LjdjMC41LTAuMSwwLjktMC4zLDEuMS0wLjVjMC4yLTAuMywwLjQtMC44LDAuNi0xLjZsMi41LTEzLjJjMC4xLTAuMywwLjEtMC42LDAuMi0wLjkKCQkJYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuMy0wLjljLTAuMi0wLjEtMC42LTAuMi0xLjItMC4zdi0wLjhoMTEuMWwtMC45LDUuNmwtMC42LTAuMWMwLTEuNC0wLjItMi40LTAuNS0zCgkJCWMtMC41LTEtMS42LTEuNS0zLjItMS41Yy0wLjUsMC0wLjksMC4xLTEuMSwwLjNzLTAuMywwLjUtMC40LDEuMWwtMS4yLDYuNmMxLjQsMCwyLjQtMC4yLDIuOC0wLjVzMC45LTEuMiwxLjQtMi42bDAuNiwwLjEKCQkJbC0xLjUsOC4xbC0wLjYtMC4xYzAtMC4zLDAtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMi0xLjgtMC42LTIuMWMtMC40LTAuNC0xLjItMC42LTIuNC0wLjZsLTEuNCw3LjIKCQkJYzAsMC4yLTAuMSwwLjMtMC4xLDAuNWMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMiwwLjdjMC4xLDAuMiwwLjUsMC4zLDAuOSwwLjNjMS4zLDAsMi4zLTAuMiwzLjItMC43CgkJCWMxLjQtMC44LDIuNC0yLjIsMy4yLTQuMmwwLjUsMC4xbC0xLjIsNS43aC0xMS40Vi0yMjguN3oiLz4KCQk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNOTY0LTIyOC43YzAuNS0wLjEsMC44LTAuMiwxLTAuNGMwLjMtMC4zLDAuNi0wLjksMC43LTEuN2wyLjUtMTMuMmMwLjEtMC40LDAuMS0wLjcsMC4yLTAuOXMwLjEtMC41LDAuMS0wLjcKCQkJYzAtMC41LTAuMS0wLjgtMC4zLTAuOWMtMC4yLTAuMS0wLjYtMC4yLTEuMi0wLjN2LTAuOGg2YzIsMCwzLjYsMC43LDQuNiwyLjJjMS4xLDEuNSwxLjYsMy41LDEuNiw2YzAsMy0wLjgsNS42LTIuMyw3LjgKCQkJYy0xLjcsMi41LTQsMy43LTYuOSwzLjdIOTY0Vi0yMjguN3ogTTk3NS42LTI0NC44Yy0wLjUtMS4zLTEuNS0yLTIuOC0yYy0wLjQsMC0wLjcsMC4xLTAuOSwwLjNjLTAuMiwwLjItMC4zLDAuNS0wLjMsMC44CgkJCWwtMi44LDE0LjljMCwwLjEsMCwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNCwwLjEsMC43LDAuMiwwLjhjMC4yLDAuMiwwLjUsMC4zLDAuOSwwLjNjMi41LDAsNC4yLTEuOCw1LjMtNS40CgkJCWMwLjctMi4yLDEtNC41LDEtNi45Qzk3Ni4xLTI0Mi44LDk3Ni0yNDMuOSw5NzUuNi0yNDQuOHoiLz4KCTwvZz4KPC9nPgo8Zz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik05ODUuNS0xNDguNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJCUM5OTAuNS0xNTAuNyw5ODguMy0xNDguNSw5ODUuNS0xNDguNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDYiIGQ9Ik05ODUuNS0xNDhoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCQlDOTkxLTE1MC41LDk4OC41LTE0OCw5ODUuNS0xNDh6IE04MjUuNS0xODljLTIuNSwwLTQuNSwyLTQuNSw0LjV2MzFjMCwyLjUsMiw0LjUsNC41LDQuNWgxNjBjMi41LDAsNC41LTIsNC41LTQuNXYtMzEKCQkJYzAtMi41LTItNC41LTQuNS00LjVIODI1LjV6Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODUyLjItMTU4LjdjMC45LTAuMiwxLjUtMC40LDEuOS0wLjZjMC42LTAuMywxLjMtMC45LDItMS44bDE3LjQtMjAuNmgxLjJsNC41LDIwYzAuMywxLjMsMC43LDIuMiwxLjEsMi41CgkJCWMwLjQsMC4zLDEuNCwwLjUsMi44LDAuNnYwLjhoLTE0LjJ2LTAuOGMxLjMtMC4xLDIuMy0wLjIsMi45LTAuNXMwLjgtMC44LDAuOC0xLjVjMC0wLjMtMC4xLTAuOS0wLjMtMS45YzAtMC4yLTAuMi0xLjEtMC41LTIuNQoJCQloLTEwLjFsLTIuNywzLjZjLTAuMiwwLjItMC4zLDAuNS0wLjUsMC44Yy0wLjEsMC4zLTAuMiwwLjYtMC4yLDAuOGMwLDAuNSwwLjIsMC44LDAuNiwwLjljMC40LDAuMSwxLjIsMC4zLDIuNCwwLjR2MC44aC05LjIKCQkJVi0xNTguN3ogTTg3MS42LTE2Ni41bC0xLjctOC41bC02LjksOC41SDg3MS42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04ODQuMi0xNTcuMmwxLjctNy44bDEuNCwwLjFjMC4xLDEuMSwwLjIsMS45LDAuNCwyLjRjMC4zLDAuOSwwLjgsMS42LDEuNiwyLjNjMC43LDAuNiwxLjUsMS4xLDIuNCwxLjQKCQkJYzAuOSwwLjMsMS45LDAuNSwyLjksMC41YzEuOSwwLDMuMy0wLjQsNC40LTEuM3MxLjUtMS45LDEuNS0zLjFjMC0xLjUtMS45LTMuMy01LjctNS42Yy0zLjgtMi4zLTUuNy00LjUtNS43LTYuNQoJCQljMC0xLjksMC44LTMuNSwyLjUtNC44YzEuNy0xLjMsNC0yLDcuMS0yYzAuOCwwLDEuNywwLjEsMi42LDAuMmMwLjYsMC4xLDEuMSwwLjIsMS41LDAuM2wxLjIsMC4zYzAuMywwLjEsMC41LDAuMSwwLjgsMC4xCgkJCWMwLjMsMCwwLjUsMC4xLDAuNywwLjFjMC41LDAsMS0wLjEsMS4zLTAuM2MwLjMtMC4yLDAuNS0wLjQsMC44LTAuNmgxLjRsLTEuOSw3bC0xLjItMC4xbC0wLjItMS4xYy0wLjItMS4xLTAuNi0yLTEuNC0yLjgKCQkJYy0xLjEtMS4yLTIuNy0xLjgtNC44LTEuOGMtMS44LDAtMy4xLDAuNS0zLjksMS41Yy0wLjUsMC42LTAuOCwxLjQtMC44LDIuMWMwLDAuOCwwLjMsMS41LDAuOCwyLjFjMC4zLDAuMywwLjgsMC43LDEuNCwxLjFsNCwyLjUKCQkJYzEuNCwwLjksMi43LDEuOSwzLjcsM2MxLDEuMSwxLjUsMi40LDEuNSwzLjhjMCwxLjgtMSwzLjUtMi45LDVjLTEuOSwxLjUtNC42LDIuMi04LDIuMmMtMC45LDAtMS43LTAuMS0yLjYtMC4yCgkJCWMtMC45LTAuMS0xLjctMC4zLTIuNi0wLjVsLTEuMi0wLjNjLTAuNC0wLjEtMC43LTAuMi0wLjgtMC4yYy0wLjIsMC0wLjMsMC0wLjUsMGMtMC41LDAtMC45LDAuMS0xLjEsMC4zYy0wLjIsMC4yLTAuNSwwLjUtMC43LDEKCQkJSDg4NC4yeiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MTYuNi0xNTguOGMxLjEtMC4xLDEuOS0wLjMsMi41LTAuNmMwLjUtMC4zLDEtMC45LDEuMy0xLjlsNS44LTE1LjdjMC4yLTAuNCwwLjMtMC44LDAuNC0xLjEKCQkJczAuMS0wLjYsMC4xLTAuOGMwLTAuNi0wLjItMS0wLjctMS4xYy0wLjQtMC4yLTEuNC0wLjMtMi44LTAuNHYtMC45aDE0djAuOWMtMS4xLDAuMS0yLDAuMy0yLjUsMC42Yy0wLjUsMC4zLTAuOSwwLjktMS4zLDEuOQoJCQlsLTUuOCwxNS43bC0wLjQsMS4yYzAsMC4xLTAuMSwwLjItMC4xLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNiwwLjIsMSwwLjYsMS4xYzAuNCwwLjIsMS40LDAuMywyLjgsMC40djAuOWgtMTRWLTE1OC44eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik05MzQuMi0xNTcuMmwxLjctNy44bDEuNCwwLjFjMC4xLDEuMSwwLjIsMS45LDAuNCwyLjRjMC4zLDAuOSwwLjgsMS42LDEuNiwyLjNjMC43LDAuNiwxLjUsMS4xLDIuNCwxLjQKCQkJYzAuOSwwLjMsMS45LDAuNSwyLjksMC41YzEuOSwwLDMuMy0wLjQsNC40LTEuM2MxLTAuOSwxLjUtMS45LDEuNS0zLjFjMC0xLjUtMS45LTMuMy01LjctNS42Yy0zLjgtMi4zLTUuNy00LjUtNS43LTYuNQoJCQljMC0xLjksMC44LTMuNSwyLjUtNC44YzEuNy0xLjMsNC0yLDcuMS0yYzAuOCwwLDEuNywwLjEsMi42LDAuMmMwLjYsMC4xLDEuMSwwLjIsMS41LDAuM2wxLjIsMC4zYzAuMywwLjEsMC41LDAuMSwwLjgsMC4xCgkJCWMwLjMsMCwwLjUsMC4xLDAuNywwLjFjMC41LDAsMS0wLjEsMS4zLTAuM3MwLjUtMC40LDAuOC0wLjZoMS40bC0xLjksN2wtMS4yLTAuMWwtMC4yLTEuMWMtMC4yLTEuMS0wLjYtMi0xLjQtMi44CgkJCWMtMS4xLTEuMi0yLjctMS44LTQuOC0xLjhjLTEuOCwwLTMuMSwwLjUtMy45LDEuNWMtMC41LDAuNi0wLjgsMS40LTAuOCwyLjFjMCwwLjgsMC4zLDEuNSwwLjgsMi4xYzAuMywwLjMsMC44LDAuNywxLjQsMS4xbDQsMi41CgkJCWMxLjQsMC45LDIuNywxLjksMy43LDNjMSwxLjEsMS41LDIuNCwxLjUsMy44YzAsMS44LTEsMy41LTIuOSw1Yy0xLjksMS41LTQuNiwyLjItOCwyLjJjLTAuOSwwLTEuNy0wLjEtMi42LTAuMgoJCQljLTAuOS0wLjEtMS43LTAuMy0yLjYtMC41bC0xLjItMC4zYy0wLjQtMC4xLTAuNy0wLjItMC44LTAuMmMtMC4yLDAtMC4zLDAtMC41LDBjLTAuNSwwLTAuOSwwLjEtMS4xLDAuM2MtMC4yLDAuMi0wLjUsMC41LTAuNywxCgkJCUg5MzQuMnoiLz4KCTwvZz4KPC9nPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTc2Mi41LTM0OS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUtMzUxLjctNzU5LjctMzQ5LjUtNzYyLjUtMzQ5LjV6Ii8+CjxwYXRoIGNsYXNzPSJzdDExIiBkPSJNLTc2Mi41LTM0OS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUtMzUxLjctNzU5LjctMzQ5LjUtNzYyLjUtMzQ5LjV6Ii8+CjxnPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS05MDctMzU5LjRjMC44LTAuMSwxLjQtMC4zLDEuOC0wLjVjMC42LTAuMywxLTEsMS4zLTJsNC43LTE1LjFjMC4xLTAuNCwwLjItMC44LDAuMy0xLjEKCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjhjMC0wLjYtMC4yLTAuOS0wLjUtMS4xYy0wLjQtMC4xLTEuMS0wLjMtMi4yLTAuNHYtMC45aDExYzMuNywwLDYuNiwwLjgsOC41LDIuNWMxLjksMS43LDIuOSw0LDIuOSw2LjgKCQljMCwzLjQtMS40LDYuNC00LjMsOC45Yy0zLjIsMi44LTcuNCw0LjItMTIuNiw0LjJILTkwN1YtMzU5LjR6IE0tODg1LjctMzc3LjdjLTEtMS41LTIuNy0yLjMtNS4xLTIuM2MtMC44LDAtMS40LDAuMS0xLjcsMC40CgkJYy0wLjMsMC4yLTAuNSwwLjUtMC42LDAuOWwtNS4yLDE3YzAsMC4yLTAuMSwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNCwwLjIsMC44LDAuNSwxczAuOSwwLjMsMS42LDAuMwoJCWM0LjUsMCw3LjgtMi4xLDkuOC02LjJjMS4yLTIuNSwxLjgtNS4xLDEuOC03LjlDLTg4NC43LTM3NS40LTg4NS0zNzYuNy04ODUuNy0zNzcuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tODc5LjQtMzU5LjRjMC45LTAuMSwxLjYtMC4zLDItMC42YzAuNC0wLjMsMC44LTAuOSwxLjEtMS44bDQuNy0xNS4xYzAuMS0wLjMsMC4yLTAuNiwwLjItMC44CgkJYzAuMS0wLjUsMC4yLTAuOCwwLjItMS4xYzAtMC41LTAuMi0wLjktMC41LTFjLTAuMy0wLjEtMS4xLTAuMy0yLjItMC4zdi0wLjloMTAuNGMyLjMsMCw0LjEsMC4yLDUuNCwwLjZjMi40LDAuNywzLjUsMi4yLDMuNSw0LjMKCQljMCwwLjctMC4yLDEuNC0wLjYsMi4ycy0xLjEsMS41LTIsMi4yYy0wLjcsMC41LTEuNCwwLjgtMi4zLDEuMWMtMC41LDAuMi0xLjMsMC40LTIuNCwwLjZjMC4xLDAuMywwLjIsMC42LDAuMiwwLjZsMi45LDcuNgoJCWMwLjQsMSwwLjgsMS43LDEuMywxLjljMC41LDAuMywxLjEsMC40LDIuMSwwLjV2MC45aC03LjZsLTQuMS0xMS4xaC0xLjFsLTIuMiw3bC0wLjMsMS4yYzAsMC4xLDAsMC4yLTAuMSwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQljMCwwLjYsMC4yLDEsMC41LDEuMWMwLjMsMC4yLDEuMSwwLjMsMi4zLDAuNHYwLjloLTExLjNWLTM1OS40eiBNLTg2NC45LTM3MWMxLjItMC4yLDIuMS0wLjYsMi43LTEuM2MwLjQtMC40LDAuOC0xLjEsMS4yLTEuOAoJCWMwLjQtMC44LDAuNi0xLjcsMC42LTIuNmMwLTAuOS0wLjMtMS43LTAuOC0yLjNjLTAuNS0wLjYtMS40LTAuOS0yLjctMC45Yy0wLjUsMC0wLjksMC4xLTEuMSwwLjNjLTAuMiwwLjItMC40LDAuNi0wLjYsMS4yCgkJbC0yLjMsNy43Qy04NjYuNS0zNzAuOC04NjUuNS0zNzAuOC04NjQuOS0zNzF6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTg1NS0zNTkuM2MwLjctMC4yLDEuMi0wLjQsMS42LTAuNmMwLjUtMC4zLDEtMC45LDEuNy0xLjhsMTQuMS0xOS44aDFsMy42LDE5LjJjMC4yLDEuMywwLjUsMi4xLDAuOSwyLjQKCQljMC4zLDAuMywxLjEsMC41LDIuMywwLjZ2MC44aC0xMS41di0wLjhjMS4xLTAuMSwxLjktMC4yLDIuMy0wLjVjMC41LTAuMiwwLjctMC43LDAuNy0xLjVjMC0wLjMtMC4xLTAuOS0wLjItMS44CgkJYzAtMC4yLTAuMS0xLTAuNC0yLjRoLTguMmwtMi4yLDMuNGMtMC4xLDAuMi0wLjMsMC41LTAuNCwwLjhjLTAuMSwwLjMtMC4yLDAuNS0wLjIsMC44YzAsMC41LDAuMiwwLjgsMC41LDAuOWMwLjMsMC4xLDEsMC4yLDIsMC4zCgkJdjAuOGgtNy41Vi0zNTkuM3ogTS04MzkuMi0zNjYuOGwtMS40LTguMmwtNS42LDguMkgtODM5LjJ6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTgyOC40LTM1OS40YzAuOS0wLjEsMS42LTAuMywyLTAuNmMwLjQtMC4zLDAuOC0wLjksMS4xLTEuOGw0LjctMTUuMWMwLjEtMC4zLDAuMi0wLjYsMC4yLTAuOAoJCWMwLjEtMC41LDAuMi0wLjgsMC4yLTEuMWMwLTAuNS0wLjItMC45LTAuNS0xYy0wLjMtMC4xLTEuMS0wLjMtMi4yLTAuM3YtMC45aDIwLjJsLTEuNiw2LjRsLTEtMC4xYzAtMS42LTAuMy0yLjgtMC45LTMuNAoJCWMtMS0xLjItMi45LTEuOC01LjgtMS44Yy0wLjksMC0xLjQsMC4xLTEuOCwwLjNjLTAuMywwLjItMC42LDAuNi0wLjgsMS4ybC0yLjIsNy41YzIuNS0wLjEsNC4yLTAuMyw0LjktMC42YzAuOC0wLjMsMS42LTEuMywyLjYtMwoJCWwxLjEsMC4xbC0yLjgsOS4ybC0xLTAuMmMwLTAuMywwLjEtMC42LDAuMS0wLjljMC0wLjIsMC0wLjQsMC0wLjZjMC0xLjEtMC4zLTEuOS0xLTIuNGMtMC43LTAuNS0yLjEtMC43LTQuMi0wLjdsLTIuNSw4LjIKCQljMCwwLjEtMC4xLDAuMy0wLjEsMC40YzAsMC4xLDAsMC4yLDAsMC40YzAsMC43LDAuMywxLjEsMC45LDEuM2MwLjQsMC4xLDEsMC4yLDEuOCwwLjJ2MC45aC0xMS4yVi0zNTkuNHoiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tODAwLjgtMzU5LjRjMS4yLDAsMi0wLjEsMi40LTAuM2MwLjctMC4zLDEuMi0xLDEuNi0yLjFsNS42LTE4LjFjLTEuOSwwLTMuNSwwLjQtNC44LDEuMgoJCWMtMS4zLDAuOC0yLjUsMi0zLjMsMy42bC0xLTAuMmwxLjUtNS44aDIwLjlsLTEuNCw2LjVsLTEtMC4xYy0wLjEtMi4yLTAuOC0zLjctMi4xLTQuNWMtMC43LTAuNC0xLjgtMC43LTMuMi0wLjdsLTUuMywxNy4yCgkJbC0wLjMsMS4yYzAsMC4yLTAuMSwwLjMtMC4xLDAuNGMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuNiwwLjIsMC45LDAuNiwxLjFjMC40LDAuMSwxLjMsMC4zLDIuNiwwLjN2MC45aC0xMi42Vi0zNTkuNHoiLz4KPC9nPgo8cGF0aCBjbGFzcz0ic3QzIiBkPSJNLTc2Mi41LTI4NC41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUtMjg2LjctNzU5LjctMjg0LjUtNzYyLjUtMjg0LjV6Ii8+CjxwYXRoIGNsYXNzPSJzdDEyIiBkPSJNLTc2Mi41LTI4NC41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUtMjg2LjctNzU5LjctMjg0LjUtNzYyLjUtMjg0LjV6Ii8+Cjx0ZXh0IHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgLTkxNS42NjcgLTI5NS45Njg4KSIgY2xhc3M9InN0NSIgc3R5bGU9ImZvbnQtZmFtaWx5OidUaW1lcy1Cb2xkSXRhbGljJzsgZm9udC1zaXplOjI5LjUxNTdweDsgbGV0dGVyLXNwYWNpbmc6LTE7Ij5BUFBST1ZFRDwvdGV4dD4KPHBhdGggY2xhc3M9InN0MyIgZD0iTS03NjIuNS04MC41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUtODIuNy03NTkuNy04MC41LTc2Mi41LTgwLjV6Ii8+CjxwYXRoIGNsYXNzPSJzdDEyIiBkPSJNLTc2Mi41LTgwLjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNS04Mi43LTc1OS43LTgwLjUtNzYyLjUtODAuNXoiLz4KPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMC44NiAwIDAgMSAtOTE1LjY2NyAtOTEuOTY4OCkiIGNsYXNzPSJzdDUiIHN0eWxlPSJmb250LWZhbWlseTonVGltZXMtQm9sZEl0YWxpYyc7IGZvbnQtc2l6ZToyOS41MTU3cHg7IGxldHRlci1zcGFjaW5nOi0xLjI7Ij5DT01QTEVURUQ8L3RleHQ+CjxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0tNzYyLjUsMjU5LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNSwyNTcuMy03NTkuNywyNTkuNS03NjIuNSwyNTkuNXoiLz4KPHBhdGggY2xhc3M9InN0MTIiIGQ9Ik0tNzYyLjUsMjU5LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNSwyNTcuMy03NTkuNywyNTkuNS03NjIuNSwyNTkuNXoiLz4KPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMS4zNCAwIDAgMSAtODk4LjcyMTkgMjQ5LjAzMTIpIiBjbGFzcz0ic3Q1IiBzdHlsZT0iZm9udC1mYW1pbHk6J1RpbWVzLUJvbGRJdGFsaWMnOyBmb250LXNpemU6MjkuNTE1N3B4OyBsZXR0ZXItc3BhY2luZzotMC43OyI+RklOQUw8L3RleHQ+CjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0tNzYyLjUtMTIuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTc1Ny41LTE0LjctNzU5LjctMTIuNS03NjIuNS0xMi41eiIvPgo8cGF0aCBjbGFzcz0ic3QxMSIgZD0iTS03NjIuNS0xMi41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUtMTQuNy03NTkuNy0xMi41LTc2Mi41LTEyLjV6Ii8+CjxnPgoJCgkJPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMC43MiAwIDAgMSAtOTE1LjY2NyAtMjMuOTY4OCkiIGNsYXNzPSJzdDIiIHN0eWxlPSJmb250LWZhbWlseTonVGltZXMtQm9sZEl0YWxpYyc7IGZvbnQtc2l6ZToyOS41MTU3cHg7Ij5DT05GSURFTlRJQUw8L3RleHQ+CjwvZz4KPHBhdGggY2xhc3M9InN0MSIgZD0iTS03NjIuNSw1NS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsNTMuMy03NTkuNyw1NS41LTc2Mi41LDU1LjV6Ii8+CjxwYXRoIGNsYXNzPSJzdDExIiBkPSJNLTc2Mi41LDU1LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNSw1My4zLTc1OS43LDU1LjUtNzYyLjUsNTUuNXoiLz4KPGc+Cgk8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgwLjY4IDAgMCAxIC05MTcuNjY3IDQ0LjAzMTIpIiBjbGFzcz0ic3QyIiBzdHlsZT0iZm9udC1mYW1pbHk6J1RpbWVzLUJvbGRJdGFsaWMnOyBmb250LXNpemU6MjkuNTE1N3B4OyI+REVQQVJUTUVOVEFMPC90ZXh0Pgo8L2c+CjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0tNzYyLjUsMTIzLjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNSwxMjEuMy03NTkuNywxMjMuNS03NjIuNSwxMjMuNXoiLz4KPHBhdGggY2xhc3M9InN0MTEiIGQ9Ik0tNzYyLjUsMTIzLjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNSwxMjEuMy03NTkuNywxMjMuNS03NjIuNSwxMjMuNXoiLz4KPGc+CgkKCQk8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgwLjcxIDAgMCAxIC05MTcuNjY3IDExMi4wMzEyKSIgY2xhc3M9InN0MiIgc3R5bGU9ImZvbnQtZmFtaWx5OidUaW1lcy1Cb2xkSXRhbGljJzsgZm9udC1zaXplOjI5LjUxNTdweDsiPkVYUEVSSU1FTlRBTDwvdGV4dD4KPC9nPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTc2Mi41LDE5MS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsMTg5LjMtNzU5LjcsMTkxLjUtNzYyLjUsMTkxLjV6Ii8+CjxwYXRoIGNsYXNzPSJzdDExIiBkPSJNLTc2Mi41LDE5MS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsMTg5LjMtNzU5LjcsMTkxLjUtNzYyLjUsMTkxLjV6Ii8+CjxnPgoJCgkJPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAtOTAyLjc0OSAxODEuMDMxMikiIGNsYXNzPSJzdDIiIHN0eWxlPSJmb250LWZhbWlseTonVGltZXMtQm9sZEl0YWxpYyc7IGZvbnQtc2l6ZToyOS41MTU3cHg7IGxldHRlci1zcGFjaW5nOi0xOyI+RVhQUklFRDwvdGV4dD4KPC9nPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTc2Mi41LDMyNy41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsMzI1LjMtNzU5LjcsMzI3LjUtNzYyLjUsMzI3LjV6Ii8+CjxwYXRoIGNsYXNzPSJzdDExIiBkPSJNLTc2Mi41LDMyNy41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsMzI1LjMtNzU5LjcsMzI3LjUtNzYyLjUsMzI3LjV6Ii8+CjxnPgoJCgkJPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMC43MSAwIDAgMSAtOTE2LjM4NTcgMzE3LjAzMTIpIiBjbGFzcz0ic3QyIiBzdHlsZT0iZm9udC1mYW1pbHk6J1RpbWVzLUJvbGRJdGFsaWMnOyBmb250LXNpemU6MjkuNTE1N3B4OyI+Rk9SIENPTU1FTlQ8L3RleHQ+CjwvZz4KPHBhdGggY2xhc3M9InN0MSIgZD0iTS03NjIuNSwzOTUuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTc1Ny41LDM5My4zLTc1OS43LDM5NS41LTc2Mi41LDM5NS41eiIvPgo8cGF0aCBjbGFzcz0ic3QxMSIgZD0iTS03NjIuNSwzOTUuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTc1Ny41LDM5My4zLTc1OS43LDM5NS41LTc2Mi41LDM5NS41eiIvPgo8Zz4KCQoJCTx0ZXh0IHRyYW5zZm9ybT0ibWF0cml4KDAuNTIgMCAwIDEgLTkxOC4zODU3IDM4NS4wMzEyKSIgY2xhc3M9InN0MiIgc3R5bGU9ImZvbnQtZmFtaWx5OidUaW1lcy1Cb2xkSXRhbGljJzsgZm9udC1zaXplOjI5LjUxNTdweDsiPkZPUiBQVUJMSUMgUkVMRUFTRTwvdGV4dD4KPC9nPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTc2Mi41LDQ2My41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsNDYxLjMtNzU5LjcsNDYzLjUtNzYyLjUsNDYzLjV6Ii8+CjxwYXRoIGNsYXNzPSJzdDExIiBkPSJNLTc2Mi41LDQ2My41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsNDYxLjMtNzU5LjcsNDYzLjUtNzYyLjUsNDYzLjV6Ii8+CjxnPgoJCgkJPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMC41NiAwIDAgMSAtOTE4LjM4NTcgNDUzLjAzMTIpIiBjbGFzcz0ic3QyIiBzdHlsZT0iZm9udC1mYW1pbHk6J1RpbWVzLUJvbGRJdGFsaWMnOyBmb250LXNpemU6MjkuNTE1N3B4OyI+SU5GT1JNQVRJT04gT05MWTwvdGV4dD4KPC9nPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTc2Mi41LDUzMS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsNTI5LjMtNzU5LjcsNTMxLjUtNzYyLjUsNTMxLjV6Ii8+CjxwYXRoIGNsYXNzPSJzdDExIiBkPSJNLTc2Mi41LDUzMS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsNTI5LjMtNzU5LjcsNTMxLjUtNzYyLjUsNTMxLjV6Ii8+CjxnPgoJPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMC40MiAwIDAgMSAtOTE4LjM4NTcgNTIxLjAzMTIpIiBjbGFzcz0ic3QyIiBzdHlsZT0iZm9udC1mYW1pbHk6J1RpbWVzLUJvbGRJdGFsaWMnOyBmb250LXNpemU6MzBweDsiPk5PVCBGT1IgUFVCTElDIFJFTEVBU0U8L3RleHQ+CjwvZz4KPHBhdGggY2xhc3M9InN0MSIgZD0iTS03NjIuNSw1OTkuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTc1Ny41LDU5Ny4zLTc1OS43LDU5OS41LTc2Mi41LDU5OS41eiIvPgo8cGF0aCBjbGFzcz0ic3QxMSIgZD0iTS03NjIuNSw1OTkuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTc1Ny41LDU5Ny4zLTc1OS43LDU5OS41LTc2Mi41LDU5OS41eiIvPgo8Zz4KCTx0ZXh0IHRyYW5zZm9ybT0ibWF0cml4KDAuNDggMCAwIDEgLTkxOC4zODU3IDU4OS4wMzEyKSIgY2xhc3M9InN0MiIgc3R5bGU9ImZvbnQtZmFtaWx5OidUaW1lcy1Cb2xkSXRhbGljJzsgZm9udC1zaXplOjMwcHg7Ij5QUkVMSU1JTkFSWSBSRVNVTFRTPC90ZXh0Pgo8L2c+CjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0tNzYyLjUsNjY3LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNSw2NjUuMy03NTkuNyw2NjcuNS03NjIuNSw2NjcuNXoiLz4KPHBhdGggY2xhc3M9InN0MTEiIGQ9Ik0tNzYyLjUsNjY3LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNSw2NjUuMy03NTkuNyw2NjcuNS03NjIuNSw2NjcuNXoiLz4KPGc+CgkKCQk8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgxLjQ1IDAgMCAxIC04OTYuMDA4MyA2NTcuMDMxMikiIGNsYXNzPSJzdDIiIHN0eWxlPSJmb250LWZhbWlseTonVGltZXMtQm9sZEl0YWxpYyc7IGZvbnQtc2l6ZTozMHB4OyBsZXR0ZXItc3BhY2luZzotMC43OyI+U09MRDwvdGV4dD4KPC9nPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNLTc2Mi41LDczNS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsNzMzLjMtNzU5LjcsNzM1LjUtNzYyLjUsNzM1LjV6Ii8+CjxwYXRoIGNsYXNzPSJzdDExIiBkPSJNLTc2Mi41LDczNS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCUMtNzU3LjUsNzMzLjMtNzU5LjcsNzM1LjUtNzYyLjUsNzM1LjV6Ii8+CjxnPgoJCgkJPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMC44OSAwIDAgMSAtOTE3LjQ3MDUgNzI1LjAzMTIpIiBjbGFzcz0ic3QyIiBzdHlsZT0iZm9udC1mYW1pbHk6J1RpbWVzLUJvbGRJdGFsaWMnOyBmb250LXNpemU6MzBweDsgbGV0dGVyLXNwYWNpbmc6LTEuMTsiPlRPUCBTRUNSRVQ8L3RleHQ+CjwvZz4KPHBhdGggY2xhc3M9InN0NyIgZD0iTS03NjIuNSw4MDMuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTc1Ny41LDgwMS4zLTc1OS43LDgwMy41LTc2Mi41LDgwMy41eiIvPgo8cGF0aCBjbGFzcz0ic3QxMyIgZD0iTS03NjIuNSw4MDMuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCglDLTc1Ny41LDgwMS4zLTc1OS43LDgwMy41LTc2Mi41LDgwMy41eiIvPgo8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgxLjUxIDAgMCAxIC04OTUuNzExOSA3OTMuMDMxMikiIGNsYXNzPSJzdDkiIHN0eWxlPSJmb250LWZhbWlseTonVGltZXMtQm9sZEl0YWxpYyc7IGZvbnQtc2l6ZTozMHB4OyBsZXR0ZXItc3BhY2luZzotMC43OyI+Vk9JRDwvdGV4dD4KPHBhdGggY2xhc3M9InN0MTAiIGQ9Ik0tNzYyLjUtMjE2LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNS0yMTguNy03NTkuNy0yMTYuNS03NjIuNS0yMTYuNXoiLz4KPHBhdGggY2xhc3M9InN0MTQiIGQ9Ik0tNzYyLjUtMjE2LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNS0yMTguNy03NTkuNy0yMTYuNS03NjIuNS0yMTYuNXoiLz4KPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMC43IDAgMCAxIC05MTUuNjY3IC0yMjcuOTY4OCkiIGNsYXNzPSJzdDgiIHN0eWxlPSJmb250LWZhbWlseTonVGltZXMtQm9sZEl0YWxpYyc7IGZvbnQtc2l6ZToyOS41MTU3cHg7Ij5OT1QgQVBQUk9WRUQ8L3RleHQ+CjxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0tNzYyLjUtMTQ4LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNS0xNTAuNy03NTkuNy0xNDguNS03NjIuNS0xNDguNXoiLz4KPHBhdGggY2xhc3M9InN0MTEiIGQ9Ik0tNzYyLjUtMTQ4LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJQy03NTcuNS0xNTAuNy03NTkuNy0xNDguNS03NjIuNS0xNDguNXoiLz4KPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMS4zNCAwIDAgMSAtODkzLjM0NjQgLTE1Ny44NDc3KSIgY2xhc3M9InN0MiIgc3R5bGU9ImZvbnQtZmFtaWx5OidUaW1lcy1Cb2xkSXRhbGljJzsgZm9udC1zaXplOjM1cHg7IGxldHRlci1zcGFjaW5nOi0xLjU7Ij5BUyBJUzwvdGV4dD4KPGc+CgkKCQk8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAxIC0xMzg2LjkxMDIgLTI5Mi45Njg4KSIgY2xhc3M9InN0MiIgc3R5bGU9ImZvbnQtZmFtaWx5OidUaW1lcy1Cb2xkSXRhbGljJzsgZm9udC1zaXplOjMzcHg7IGxldHRlci1zcGFjaW5nOi0xOyI+UkVWSVNFRDwvdGV4dD4KPC9nPgo8Zz4KCQoJCTx0ZXh0IHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgLTEzOTIuNzM2NiAtMjI2Ljk2ODgpIiBjbGFzcz0ic3QyIiBzdHlsZT0iZm9udC1mYW1pbHk6J1RpbWVzLUJvbGRJdGFsaWMnOyBmb250LXNpemU6MjlweDsgbGV0dGVyLXNwYWNpbmc6LTE7Ij5SRVZJRVdFRDwvdGV4dD4KPC9nPgo8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAxIC05NDIuMTM4NyAtNDc2LjU0KSIgc3R5bGU9ImZvbnQtZmFtaWx5OidNeXJpYWRQcm8tUmVndWxhcic7IGZvbnQtc2l6ZToxMTQuMTY0OXB4OyI+TGluZTwvdGV4dD4KPGc+CgkKCQk8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAxIC0xMzkxLjg5NTUgLTE1OC45Njg4KSIgY2xhc3M9InN0MiIgc3R5bGU9ImZvbnQtZmFtaWx5OidUaW1lcy1Cb2xkSXRhbGljJzsgZm9udC1zaXplOjMwcHg7IGxldHRlci1zcGFjaW5nOi0xOyI+UkVDRUlWRUQ8L3RleHQ+CjwvZz4KPGc+CgkKCQk8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAxIC0xMzk1Ljg5NTUgLTg4Ljk2ODgpIiBjbGFzcz0ic3Q4IiBzdHlsZT0iZm9udC1mYW1pbHk6J1RpbWVzLUJvbGRJdGFsaWMnOyBmb250LXNpemU6MzBweDsgbGV0dGVyLXNwYWNpbmc6LTE7Ij5XSVRORVNTPC90ZXh0Pgo8L2c+CjxnPgoJCgkJPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAtMTM5Ni44OTU1IC0zMS45Njg4KSIgY2xhc3M9InN0OCIgc3R5bGU9ImZvbnQtZmFtaWx5OidUaW1lcy1Cb2xkSXRhbGljJzsgZm9udC1zaXplOjMwcHg7IGxldHRlci1zcGFjaW5nOi0xOyI+SU5JVElBTCBIRVJFPC90ZXh0Pgo8L2c+CjxnPgoJCgkJPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSAtMTM5Ni44OTU1IDI2LjAzMTIpIiBjbGFzcz0ic3Q4IiBzdHlsZT0iZm9udC1mYW1pbHk6J1RpbWVzLUJvbGRJdGFsaWMnOyBmb250LXNpemU6MzBweDsgbGV0dGVyLXNwYWNpbmc6LTE7Ij5TSUdOIEhFUkU8L3RleHQ+CjwvZz4KPHBhdGggY2xhc3M9InN0MTUiIGQ9Ik0tMTMzNy4zLDkzLjVjMS41LTAuMiw0LjQtMC42LDYuMS0xLjRjMC40LTAuMiwwLjksMCwxLDAuNWMwLjMsMS40LDAuOCwzLjgsMS40LDQuOGMwLDAsNy40LTExLjYsMTMtMTQuNwoJYzAuNC0wLjIsMC44LTAuMSwxLDAuMmMwLjYsMC45LDIuMywyLjUsNC40LDMuOGMwLjUsMC4zLDAuNiwxLjEsMCwxLjVjLTMuNywyLjQtMTQuNiw5LjktMTgsMTguMmMtMC4zLDAuNy0xLjEsMC43LTEuNSwwLjEKCWMtMS45LTIuOS02LjEtOS40LTcuOS0xMi4xQy0xMzM3LjksOTQtMTMzNy43LDkzLjUtMTMzNy4zLDkzLjV6Ii8+CjxnPgoJPHBvbHlnb24gY2xhc3M9InN0MTYiIHBvaW50cz0iLTEzMTIuNywxNDQuNiAtMTMxNi42LDE0MC43IC0xMzI0LDE0OC4xIC0xMzMxLjQsMTQwLjcgLTEzMzUuMywxNDQuNiAtMTMyNy45LDE1MiAtMTMzNS4zLDE1OS40IAoJCS0xMzMxLjQsMTYzLjMgLTEzMjQsMTU1LjkgLTEzMTYuNiwxNjMuMyAtMTMxMi43LDE1OS40IC0xMzIwLjEsMTUyIAkiLz4KCTxwYXRoIGNsYXNzPSJzdDE3IiBkPSJNLTEzMTYuNiwxNjRsLTcuNC03LjRsLTcuNCw3LjRsLTQuNi00LjZsNy40LTcuNGwtNy40LTcuNGw0LjYtNC42bDcuNCw3LjRsNy40LTcuNGw0LjYsNC42bC03LjQsNy40bDcuNCw3LjQKCQlMLTEzMTYuNiwxNjR6IE0tMTMyNCwxNTUuMmw3LjQsNy40bDMuMi0zLjJsLTcuNC03LjRsNy40LTcuNGwtMy4yLTMuMmwtNy40LDcuNGwtNy40LTcuNGwtMy4yLDMuMmw3LjQsNy40bC03LjQsNy40bDMuMiwzLjIKCQlMLTEzMjQsMTU1LjJ6Ii8+CjwvZz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNODkuNS0zNDMuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJCUM5NC41LTM0NS43LDkyLjMtMzQzLjUsODkuNS0zNDMuNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04OS41LTM0M2gtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJCUM5NS0zNDUuNSw5Mi41LTM0Myw4OS41LTM0M3ogTS03MC41LTM4NGMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCQljMC0yLjUtMi00LjUtNC41LTQuNUgtNzAuNXoiLz4KCTwvZz4KPC9nPgo8Zz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik04OS41LTI3NS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQkJQzk0LjUtMjc3LjcsOTIuMy0yNzUuNSw4OS41LTI3NS41eiIvPgoJPC9nPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg5LjUtMjc1aC0xNjBjLTMsMC01LjUtMi41LTUuNS01LjV2LTMxYzAtMywyLjUtNS41LDUuNS01LjVoMTYwYzMsMCw1LjUsMi41LDUuNSw1LjV2MzEKCQkJQzk1LTI3Ny41LDkyLjUtMjc1LDg5LjUtMjc1eiBNLTcwLjUtMzE2Yy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJCWMwLTIuNS0yLTQuNS00LjUtNC41SC03MC41eiIvPgoJPC9nPgo8L2c+CjxnPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0iTTg5LjUtMjA3LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCQlDOTQuNS0yMDkuNyw5Mi4zLTIwNy41LDg5LjUtMjA3LjV6Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODkuNS0yMDdoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCQlDOTUtMjA5LjUsOTIuNS0yMDcsODkuNS0yMDd6IE0tNzAuNS0yNDhjLTIuNSwwLTQuNSwyLTQuNSw0LjV2MzFjMCwyLjUsMiw0LjUsNC41LDQuNWgxNjBjMi41LDAsNC41LTIsNC41LTQuNXYtMzEKCQkJYzAtMi41LTItNC41LTQuNS00LjVILTcwLjV6Ii8+Cgk8L2c+CjwvZz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QxIiBkPSJNODkuNS0xMzkuNWgtMTYwYy0yLjgsMC01LTIuMi01LTV2LTMxYzAtMi44LDIuMi01LDUtNWgxNjBjMi44LDAsNSwyLjIsNSw1djMxCgkJCUM5NC41LTE0MS43LDkyLjMtMTM5LjUsODkuNS0xMzkuNXoiLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik04OS41LTEzOWgtMTYwYy0zLDAtNS41LTIuNS01LjUtNS41di0zMWMwLTMsMi41LTUuNSw1LjUtNS41aDE2MGMzLDAsNS41LDIuNSw1LjUsNS41djMxCgkJCUM5NS0xNDEuNSw5Mi41LTEzOSw4OS41LTEzOXogTS03MC41LTE4MGMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCQljMC0yLjUtMi00LjUtNC41LTQuNUgtNzAuNXoiLz4KCTwvZz4KPC9nPgo8Zz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik04OS41LTQxMS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQkJQzk0LjUtNDEzLjcsOTIuMy00MTEuNSw4OS41LTQxMS41eiIvPgoJPC9nPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTg5LjUtNDExaC0xNjBjLTMsMC01LjUtMi41LTUuNS01LjV2LTMxYzAtMywyLjUtNS41LDUuNS01LjVoMTYwYzMsMCw1LjUsMi41LDUuNSw1LjV2MzEKCQkJQzk1LTQxMy41LDkyLjUtNDExLDg5LjUtNDExeiBNLTcwLjUtNDUyYy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJCWMwLTIuNS0yLTQuNS00LjUtNC41SC03MC41eiIvPgoJPC9nPgo8L2c+CjxnPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0iTTg5LjUtNDc5LjVoLTE2MGMtMi44LDAtNS0yLjItNS01di0zMWMwLTIuOCwyLjItNSw1LTVoMTYwYzIuOCwwLDUsMi4yLDUsNXYzMQoJCQlDOTQuNS00ODEuNyw5Mi4zLTQ3OS41LDg5LjUtNDc5LjV6Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNODkuNS00NzloLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCQlDOTUtNDgxLjUsOTIuNS00NzksODkuNS00Nzl6IE0tNzAuNS01MjBjLTIuNSwwLTQuNSwyLTQuNSw0LjV2MzFjMCwyLjUsMiw0LjUsNC41LDQuNWgxNjBjMi41LDAsNC41LTIsNC41LTQuNXYtMzEKCQkJYzAtMi41LTItNC41LTQuNS00LjVILTcwLjV6Ii8+Cgk8L2c+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTU3LjktNDg4LjhjMC44LTAuMSwxLjQtMC4zLDEuNy0wLjZzMC43LTAuOSwwLjktMS44bDQuMS0xNC44YzAuMS0wLjMsMC4yLTAuNiwwLjItMC44CgkJYzAuMS0wLjUsMC4xLTAuOCwwLjEtMS4xYzAtMC41LTAuMi0wLjktMC41LTFjLTAuMy0wLjEtMS0wLjMtMS45LTAuM3YtMC45aDkuMWMyLDAsMy42LDAuMiw0LjcsMC42YzIsMC43LDMuMSwyLjEsMy4xLDQuMgoJCWMwLDAuNy0wLjIsMS40LTAuNSwyLjJjLTAuMywwLjgtMC45LDEuNS0xLjcsMi4xYy0wLjYsMC41LTEuMiwwLjgtMiwxLjFjLTAuNSwwLjItMS4yLDAuNC0yLjEsMC42YzAuMSwwLjMsMC4yLDAuNiwwLjIsMC42CgkJbDIuNSw3LjVjMC4zLDEsMC43LDEuNiwxLjEsMS45czEsMC40LDEuOCwwLjV2MC45aC02LjZsLTMuNi0xMC45aC0wLjlsLTIsNi45bC0wLjMsMS4xYzAsMC4xLDAsMC4yLDAsMC4zczAsMC4yLDAsMC4zCgkJYzAsMC42LDAuMSwxLDAuNCwxLjFzMC45LDAuMywyLDAuNHYwLjloLTkuOFYtNDg4Ljh6IE0tNDUuMi01MDAuMmMxLTAuMiwxLjgtMC42LDIuNC0xLjNjMC40LTAuNCwwLjctMSwxLjEtMS44CgkJYzAuMy0wLjgsMC41LTEuNiwwLjUtMi41YzAtMC45LTAuMi0xLjctMC43LTIuM2MtMC41LTAuNi0xLjItMC45LTIuMy0wLjljLTAuNSwwLTAuOCwwLjEtMSwwLjNjLTAuMiwwLjItMC40LDAuNi0wLjUsMS4ybC0yLDcuNgoJCUMtNDYuNy01MDAtNDUuOC01MDAuMS00NS4yLTUwMC4yeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0zNy4yLTQ4OC44YzAuOC0wLjEsMS40LTAuMywxLjctMC42czAuNy0wLjksMC45LTEuOGw0LjEtMTQuOGMwLjEtMC40LDAuMi0wLjcsMC4yLTEKCQljMC4xLTAuMywwLjEtMC42LDAuMS0wLjhjMC0wLjYtMC4xLTAuOS0wLjQtMS4xYy0wLjMtMC4xLTAuOS0wLjMtMi0wLjN2LTAuOWgxNy44bC0xLjQsNi4zbC0wLjktMC4xYzAtMS42LTAuMy0yLjctMC44LTMuNAoJCWMtMC44LTEuMS0yLjUtMS43LTUuMS0xLjdjLTAuOSwwLTEuNCwwLjEtMS43LDAuM2MtMC4zLDAuMi0wLjUsMC42LTAuNiwxLjJsLTIsNy4zYzIuMy0wLjEsMy44LTAuMiw0LjUtMC42CgkJYzAuNy0wLjMsMS40LTEuMywyLjMtMi45bDAuOSwwLjFsLTIuNCw5bC0wLjktMC4yYzAtMC4zLDAuMS0wLjYsMC4xLTAuOGMwLTAuMiwwLTAuNCwwLTAuNmMwLTEuMi0wLjMtMi0xLTIuNHMtMS45LTAuNi0zLjgtMC42CgkJbC0yLjIsOC4xYy0wLjEsMC4yLTAuMSwwLjQtMC4xLDAuNnMwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuNCwwLjdzMC43LDAuMywxLjUsMC4zYzIsMCwzLjctMC4zLDUuMS0wLjgKCQljMi4yLTAuOSwzLjktMi40LDUuMS00LjdsMC44LDAuMWwtMiw2LjRoLTE4LjNWLTQ4OC44eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS00LjMtNTEwdjAuOWMtMC44LDAtMS40LDAuMS0xLjcsMC4yYy0wLjUsMC4yLTAuOCwwLjYtMC44LDEuMmMwLDAuMSwwLDAuMiwwLDAuM2MwLDAuMSwwLDAuMiwwLDAuM2wxLjcsMTMuMQoJCWw2LjItOS45YzAuNS0wLjgsMC45LTEuNiwxLjMtMi40czAuNi0xLjQsMC42LTEuOXMtMC4yLTAuOC0wLjYtMC45Yy0wLjMtMC4xLTAuOC0wLjEtMS41LTAuMnYtMC45aDYuM3YwLjkKCQljLTAuNSwwLjItMC45LDAuMy0xLjIsMC41Yy0wLjQsMC4zLTAuOSwwLjgtMS4zLDEuNmwtMTIuNCwxOS44aC0xLjFsLTIuNS0xNi44Yy0wLjQtMi40LTAuNy0zLjgtMC45LTQuMmMtMC4zLTAuNC0wLjktMC43LTIuMS0wLjgKCQl2LTAuOUgtNC4zeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTQuMS00ODguOGMwLjgtMC4xLDEuNC0wLjMsMS43LTAuNmMwLjQtMC4zLDAuNy0wLjksMC45LTEuOGw0LjEtMTQuOGMwLjEtMC40LDAuMi0wLjgsMC4zLTEuMQoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuNi0wLjItMC45LTAuNS0xLjFjLTAuMy0wLjEtMS0wLjMtMS45LTAuM3YtMC45aDkuOHYwLjljLTAuOCwwLjEtMS40LDAuMy0xLjcsMC42cy0wLjcsMC45LTAuOSwxLjgKCQlMMTEuOS00OTJsLTAuMywxLjFjMCwwLjEsMCwwLjItMC4xLDAuM3MwLDAuMiwwLDAuM2MwLDAuNiwwLjIsMC45LDAuNSwxLjFzMSwwLjMsMiwwLjR2MC45SDQuMVYtNDg4Ljh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTYuNS00ODcuNGwxLjItNy40bDEsMC4xYzAuMSwxLjEsMC4yLDEuOCwwLjMsMi4zYzAuMiwwLjgsMC42LDEuNSwxLjEsMi4xYzAuNSwwLjYsMS4xLDEsMS43LDEuMwoJCWMwLjYsMC4zLDEuMywwLjQsMi4xLDAuNGMxLjMsMCwyLjMtMC40LDMuMS0xLjNjMC43LTAuOCwxLjEtMS44LDEuMS0yLjljMC0xLjQtMS4zLTMuMS00LTUuM2MtMi43LTIuMi00LTQuMy00LTYuMQoJCWMwLTEuOCwwLjYtMy4zLDEuOC00LjVjMS4yLTEuMiwyLjgtMS45LDUtMS45YzAuNiwwLDEuMiwwLjEsMS44LDAuMmMwLjQsMC4xLDAuOCwwLjIsMS4xLDAuM2wwLjgsMC4zYzAuMiwwLjEsMC40LDAuMSwwLjYsMC4xCgkJczAuNCwwLjEsMC41LDAuMWMwLjQsMCwwLjctMC4xLDAuOS0wLjJzMC40LTAuNCwwLjUtMC42aDFsLTEuMyw2LjZsLTAuOS0wLjFsLTAuMS0xLjFjLTAuMS0xLTAuNS0xLjktMS0yLjYKCQljLTAuOC0xLjEtMS45LTEuNy0zLjQtMS43Yy0xLjMsMC0yLjIsMC41LTIuOCwxLjRjLTAuNCwwLjYtMC42LDEuMy0wLjYsMmMwLDAuOCwwLjIsMS40LDAuNiwyYzAuMiwwLjMsMC42LDAuNywxLDFsMi44LDIuMwoJCWMxLDAuOCwxLjksMS44LDIuNiwyLjhzMS4xLDIuMywxLjEsMy42YzAsMS43LTAuNywzLjMtMi4xLDQuN2MtMS40LDEuNC0zLjMsMi4xLTUuNiwyLjFjLTAuNiwwLTEuMi0wLjEtMS44LTAuMgoJCWMtMC42LTAuMS0xLjItMC4zLTEuOC0wLjVsLTAuOC0wLjNjLTAuMy0wLjEtMC41LTAuMi0wLjYtMC4yYy0wLjEsMC0wLjIsMC0wLjQsMGMtMC40LDAtMC42LDAuMS0wLjgsMC4zcy0wLjMsMC41LTAuNSwwLjlIMTYuNXoiCgkJLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0zMi4zLTQ4OC44YzAuOC0wLjEsMS40LTAuMywxLjctMC42YzAuNC0wLjMsMC43LTAuOSwwLjktMS44TDM5LTUwNmMwLjEtMC40LDAuMi0wLjcsMC4yLTEKCQljMC4xLTAuMywwLjEtMC42LDAuMS0wLjhjMC0wLjYtMC4xLTAuOS0wLjQtMS4xYy0wLjMtMC4xLTAuOS0wLjMtMi0wLjN2LTAuOWgxNy44bC0xLjQsNi4zbC0wLjktMC4xYzAtMS42LTAuMy0yLjctMC44LTMuNAoJCWMtMC44LTEuMS0yLjUtMS43LTUuMS0xLjdjLTAuOSwwLTEuNCwwLjEtMS43LDAuM2MtMC4zLDAuMi0wLjUsMC42LTAuNiwxLjJsLTIsNy4zYzIuMy0wLjEsMy44LTAuMiw0LjUtMC42CgkJYzAuNy0wLjMsMS40LTEuMywyLjMtMi45bDAuOSwwLjFsLTIuNCw5bC0wLjktMC4yYzAtMC4zLDAuMS0wLjYsMC4xLTAuOGMwLTAuMiwwLTAuNCwwLTAuNmMwLTEuMi0wLjMtMi0xLTIuNHMtMS45LTAuNi0zLjgtMC42CgkJbC0yLjIsOC4xYy0wLjEsMC4yLTAuMSwwLjQtMC4xLDAuNmMwLDAuMiwwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuNCwwLjdzMC43LDAuMywxLjUsMC4zYzIsMCwzLjctMC4zLDUuMS0wLjgKCQljMi4yLTAuOSwzLjktMi40LDUuMS00LjdsMC44LDAuMWwtMiw2LjRIMzIuM1YtNDg4Ljh6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNTIuNy00ODguOGMwLjctMC4xLDEuMi0wLjIsMS41LTAuNWMwLjUtMC4zLDAuOS0xLDEuMS0xLjlsNC0xNC44YzAuMS0wLjQsMC4yLTAuOCwwLjMtMS4xCgkJYzAuMS0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC42LTAuMi0wLjktMC41LTEuMWMtMC4zLTAuMS0xLTAuMy0yLTAuM3YtMC45SDY3YzMuMiwwLDUuNywwLjgsNy40LDIuNWMxLjcsMS43LDIuNSwzLjksMi41LDYuNwoJCWMwLDMuNC0xLjIsNi4zLTMuOCw4LjhjLTIuOCwyLjgtNi40LDQuMS0xMSw0LjFoLTkuNVYtNDg4Ljh6IE03MS4yLTUwNi44Yy0wLjktMS41LTIuMy0yLjItNC41LTIuMmMtMC43LDAtMS4yLDAuMS0xLjQsMC4zCgkJYy0wLjMsMC4yLTAuNCwwLjUtMC41LDAuOWwtNC41LDE2LjdjMCwwLjItMC4xLDAuMy0wLjEsMC40YzAsMC4xLDAsMC4yLDAsMC4zYzAsMC40LDAuMSwwLjcsMC40LDAuOWMwLjMsMC4yLDAuNywwLjMsMS40LDAuMwoJCWMzLjksMCw2LjgtMiw4LjUtNi4xYzEuMS0yLjQsMS42LTUsMS42LTcuOEM3Mi4xLTUwNC41LDcxLjgtNTA1LjgsNzEuMi01MDYuOHoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tNjMuNi00MjIuN2MwLjctMC4xLDEuMi0wLjMsMS41LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTNjMC4xLTAuMywwLjEtMC41LDAuMi0wLjcKCQljMC4xLTAuNCwwLjEtMC43LDAuMS0wLjljMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOC0wLjItMS43LTAuM3YtMC44aDhjMS44LDAsMy4yLDAuMiw0LjEsMC41YzEuOCwwLjYsMi43LDEuOSwyLjcsMy43CgkJYzAsMC42LTAuMiwxLjItMC41LDEuOWMtMC4zLDAuNy0wLjgsMS4zLTEuNSwxLjljLTAuNSwwLjQtMS4xLDAuNy0xLjgsMWMtMC40LDAuMS0xLDAuMy0xLjksMC41YzAuMSwwLjMsMC4yLDAuNSwwLjIsMC42bDIuMiw2LjUKCQljMC4zLDAuOSwwLjYsMS40LDEsMS43YzAuMywwLjIsMC45LDAuNCwxLjYsMC40djAuOGgtNS44bC0zLjEtOS42aC0wLjhsLTEuNyw2bC0wLjIsMWMwLDAuMSwwLDAuMiwwLDAuMmMwLDAuMSwwLDAuMiwwLDAuMwoJCWMwLDAuNSwwLjEsMC44LDAuNCwxYzAuMiwwLjEsMC44LDAuMiwxLjcsMC4zdjAuOGgtOC42Vi00MjIuN3ogTS01Mi41LTQzMi43YzAuOS0wLjIsMS42LTAuNiwyLjEtMS4xYzAuMy0wLjQsMC42LTAuOSwwLjktMS42CgkJYzAuMy0wLjcsMC40LTEuNCwwLjQtMi4yYzAtMC44LTAuMi0xLjUtMC42LTJjLTAuNC0wLjUtMS4xLTAuOC0yLTAuOGMtMC40LDAtMC43LDAuMS0wLjksMC4zYy0wLjIsMC4yLTAuMywwLjUtMC41LDFsLTEuOCw2LjYKCQlDLTUzLjgtNDMyLjUtNTMtNDMyLjYtNTIuNS00MzIuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tNDUuNC00MjIuN2MwLjctMC4xLDEuMi0wLjMsMS41LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTNjMC4xLTAuMywwLjItMC42LDAuMi0wLjkKCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOC0wLjItMS43LTAuM3YtMC44aDE1LjZsLTEuMiw1LjVsLTAuOC0wLjFjMC0xLjQtMC4yLTIuNC0wLjctMwoJCWMtMC43LTEtMi4yLTEuNS00LjUtMS41Yy0wLjgsMC0xLjMsMC4xLTEuNSwwLjNjLTAuMiwwLjItMC40LDAuNS0wLjUsMWwtMS43LDYuNGMyLDAsMy4zLTAuMiwzLjktMC41YzAuNi0wLjMsMS4zLTEuMSwyLTIuNgoJCWwwLjgsMC4xbC0yLjIsNy45bC0wLjgtMC4xYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEtMC4zLTEuNy0wLjktMi4xcy0xLjctMC42LTMuMy0wLjZsLTEuOSw3LjEKCQljMCwwLjItMC4xLDAuMy0wLjEsMC41czAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4zLDAuN3MwLjYsMC4zLDEuMywwLjNjMS44LDAsMy4zLTAuMiw0LjUtMC43YzEuOS0wLjgsMy40LTIuMSw0LjUtNC4xbDAuNywwLjEKCQlsLTEuNyw1LjZoLTE2LjFWLTQyMi43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS0xNi41LTQ0MS40djAuOGMtMC43LDAtMS4yLDAuMS0xLjUsMC4yYy0wLjUsMC4yLTAuNywwLjUtMC43LDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjMKCQlsMS41LDExLjVsNS41LTguN2MwLjQtMC43LDAuOC0xLjQsMS4yLTIuMWMwLjMtMC43LDAuNS0xLjIsMC41LTEuNmMwLTAuNC0wLjItMC43LTAuNS0wLjhjLTAuMi0wLjEtMC43LTAuMS0xLjMtMC4xdi0wLjhoNS42djAuOAoJCWMtMC41LDAuMS0wLjgsMC4zLTEsMC40Yy0wLjQsMC4zLTAuOCwwLjctMS4yLDEuNGwtMTAuOSwxNy40aC0wLjlsLTIuMi0xNC44Yy0wLjMtMi4xLTAuNi0zLjMtMC44LTMuN3MtMC44LTAuNi0xLjgtMC43di0wLjgKCQlILTE2LjV6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTkuMS00MjIuN2MwLjctMC4xLDEuMi0wLjMsMS41LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTNjMC4xLTAuNCwwLjItMC43LDAuMi0wLjkKCQljMC4xLTAuMiwwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOC0wLjItMS43LTAuM3YtMC44aDguNnYwLjhjLTAuNywwLjEtMS4yLDAuMy0xLjUsMC41cy0wLjYsMC44LTAuOCwxLjYKCQlsLTMuNiwxM2wtMC4yLDFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjUsMC4xLDAuOCwwLjQsMC45YzAuMywwLjEsMC44LDAuMiwxLjcsMC4zdjAuOGgtOC42Vi00MjIuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0wLjgtNDIyLjdjMC43LTAuMSwxLjItMC4zLDEuNS0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy42LTEzYzAuMS0wLjMsMC4yLTAuNiwwLjItMC45CgkJQzctNDM5LDctNDM5LjIsNy00MzkuNGMwLTAuNS0wLjEtMC44LTAuNC0wLjljLTAuMy0wLjEtMC44LTAuMi0xLjctMC4zdi0wLjhoMTUuNmwtMS4yLDUuNWwtMC44LTAuMWMwLTEuNC0wLjItMi40LTAuNy0zCgkJYy0wLjctMS0yLjItMS41LTQuNS0xLjVjLTAuOCwwLTEuMywwLjEtMS41LDAuM2MtMC4yLDAuMi0wLjQsMC41LTAuNSwxbC0xLjcsNi40YzIsMCwzLjMtMC4yLDMuOS0wLjVjMC42LTAuMywxLjMtMS4xLDItMi42CgkJbDAuOCwwLjFsLTIuMiw3LjlsLTAuOC0wLjFjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS0wLjMtMS43LTAuOS0yLjFzLTEuNy0wLjYtMy4zLTAuNmwtMS45LDcuMQoJCWMwLDAuMi0wLjEsMC4zLTAuMSwwLjVzMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjMsMC43czAuNiwwLjMsMS4zLDAuM2MxLjgsMCwzLjMtMC4yLDQuNS0wLjdjMS45LTAuOCwzLjQtMi4xLDQuNS00LjFsMC43LDAuMQoJCWwtMS43LDUuNkgwLjhWLTQyMi43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTI5LjEtNDQxLjR2MC44Yy0wLjUsMC0wLjksMC4xLTEuMSwwLjJjLTAuNCwwLjItMC43LDAuNy0wLjcsMS4zYzAsMC4xLDAsMC4xLDAsMC4yYzAsMC4xLDAsMC4xLDAsMC4zCgkJbDEuMSwxMC4ybDQuMy05YzAtMC4xLDAtMC4yLDAtMC4zYzAtMS4yLTAuMi0yLTAuNi0yLjRjLTAuMy0wLjItMC44LTAuNC0xLjUtMC41di0wLjdoNy44djAuN2MtMC43LDAtMS4xLDAuMi0xLjQsMC4zCgkJYy0wLjMsMC4yLTAuNCwwLjYtMC40LDEuMmMwLDAuMSwwLDAuMywwLDAuNmMwLDAuNCwwLjEsMC45LDAuMSwxLjVsMSw4LjVsNC41LTkuNGMwLjEtMC4yLDAuMi0wLjUsMC4zLTAuNwoJCWMwLjEtMC4zLDAuMS0wLjUsMC4xLTAuOGMwLTAuNS0wLjItMC44LTAuNS0wLjljLTAuMy0wLjEtMC44LTAuMi0xLjMtMC4ydi0wLjdoNS40djAuN2MtMC41LDAtMC44LDAuMi0xLjEsMC40CgkJYy0wLjUsMC4zLTAuOSwwLjktMS4zLDEuOGwtOC4zLDE3LjFoLTAuOGwtMS44LTE0LjFsLTYuNywxNC4xaC0wLjhsLTIuMy0xNi44Yy0wLjEtMS0wLjMtMS42LTAuNi0xLjlzLTAuOC0wLjQtMS43LTAuNXYtMC43SDI5LjF6CgkJIi8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNDMuNC00MjIuN2MwLjctMC4xLDEuMi0wLjMsMS41LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjYtMTNjMC4xLTAuMywwLjItMC42LDAuMi0wLjkKCQljMC4xLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOC0wLjItMS43LTAuM3YtMC44aDE1LjZsLTEuMiw1LjVsLTAuOC0wLjFjMC0xLjQtMC4yLTIuNC0wLjctMwoJCWMtMC43LTEtMi4yLTEuNS00LjUtMS41Yy0wLjgsMC0xLjMsMC4xLTEuNSwwLjNjLTAuMiwwLjItMC40LDAuNS0wLjUsMWwtMS43LDYuNGMyLDAsMy4zLTAuMiwzLjktMC41czEuMy0xLjEsMi0yLjZsMC44LDAuMQoJCWwtMi4yLDcuOWwtMC44LTAuMWMwLTAuMywwLjEtMC41LDAuMS0wLjdjMC0wLjIsMC0wLjQsMC0wLjVjMC0xLTAuMy0xLjctMC45LTIuMXMtMS43LTAuNi0zLjMtMC42bC0xLjksNy4xYzAsMC4yLTAuMSwwLjMtMC4xLDAuNQoJCXMwLDAuMywwLDAuNGMwLDAuMywwLjEsMC41LDAuMywwLjdzMC42LDAuMywxLjMsMC4zYzEuOCwwLDMuMy0wLjIsNC41LTAuN2MxLjktMC44LDMuNC0yLjEsNC41LTQuMWwwLjcsMC4xbC0xLjcsNS42SDQzLjRWLTQyMi43egoJCSIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTYxLjQtNDIyLjdjMC42LTAuMSwxLjEtMC4yLDEuMy0wLjRjMC40LTAuMywwLjgtMC45LDEtMS43bDMuNi0xM2MwLjEtMC40LDAuMi0wLjcsMC4yLTAuOXMwLjEtMC41LDAuMS0wLjcKCQljMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOC0wLjItMS43LTAuM3YtMC44aDguNGMyLjgsMCw1LDAuNyw2LjUsMi4yYzEuNSwxLjUsMi4yLDMuNCwyLjIsNS45YzAsMy0xLjEsNS41LTMuMyw3LjcKCQljLTIuNCwyLjQtNS43LDMuNi05LjYsMy42aC04LjNWLTQyMi43eiBNNzcuNi00MzguNWMtMC44LTEuMy0yLjEtMi0zLjktMmMtMC42LDAtMSwwLjEtMS4zLDAuM2MtMC4yLDAuMi0wLjQsMC41LTAuNSwwLjhsLTQsMTQuNgoJCWMwLDAuMS0wLjEsMC4zLTAuMSwwLjRjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjQsMC4xLDAuNywwLjMsMC44YzAuMiwwLjIsMC42LDAuMywxLjMsMC4zYzMuNCwwLDUuOS0xLjgsNy41LTUuMwoJCWMwLjktMi4yLDEuNC00LjQsMS40LTYuOEM3OC40LTQzNi41LDc4LjEtNDM3LjcsNzcuNi00MzguNXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tNjIuOC0zNTQuN2MwLjctMC4xLDEuMi0wLjMsMS42LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjctMTMuNWMwLjEtMC4zLDAuMS0wLjUsMC4yLTAuNwoJCWMwLjEtMC40LDAuMS0wLjcsMC4xLTFjMC0wLjUtMC4xLTAuOC0wLjQtMC45Yy0wLjMtMC4xLTAuOS0wLjItMS44LTAuM3YtMC44aDguMmMxLjgsMCwzLjMsMC4yLDQuMywwLjVjMS45LDAuNywyLjgsMS45LDIuOCwzLjgKCQljMCwwLjYtMC4yLDEuMy0wLjUsMmMtMC4zLDAuNy0wLjgsMS40LTEuNiwxLjljLTAuNSwwLjQtMS4xLDAuNy0xLjgsMWMtMC40LDAuMS0xLjEsMC4zLTEuOSwwLjVjMC4xLDAuMywwLjIsMC41LDAuMiwwLjZsMi4zLDYuOAoJCWMwLjMsMC45LDAuNiwxLjUsMSwxLjdzMC45LDAuNCwxLjYsMC40djAuOGgtNmwtMy4yLTkuOUgtNTRsLTEuOCw2LjJsLTAuMiwxYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4yLDAsMC4zCgkJYzAsMC41LDAuMSwwLjksMC40LDFjMC4zLDAuMSwwLjksMC4yLDEuOCwwLjN2MC44aC04LjlWLTM1NC43eiBNLTUxLjMtMzY1LjFjMC45LTAuMiwxLjYtMC42LDIuMS0xLjFjMC4zLTAuNCwwLjctMC45LDEtMS42CgkJczAuNC0xLjUsMC40LTIuM2MwLTAuOC0wLjItMS41LTAuNi0yLjFzLTEuMS0wLjgtMi4xLTAuOGMtMC40LDAtMC43LDAuMS0wLjksMC4zYy0wLjIsMC4yLTAuMywwLjUtMC41LDEuMWwtMS44LDYuOQoJCUMtNTIuNi0zNjQuOS01MS44LTM2NS01MS4zLTM2NS4xeiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTS00NC0zNTQuN2MwLjctMC4xLDEuMi0wLjMsMS42LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjctMTMuNWMwLjEtMC4zLDAuMi0wLjcsMC4yLTAuOQoJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMWMtMC4zLTAuMS0wLjktMC4yLTEuOC0wLjN2LTAuOGgxNi4ybC0xLjMsNS43bC0wLjgtMC4xYzAtMS41LTAuMy0yLjUtMC43LTMuMQoJCWMtMC44LTEtMi4zLTEuNS00LjYtMS41Yy0wLjgsMC0xLjMsMC4xLTEuNSwwLjNjLTAuMiwwLjItMC40LDAuNS0wLjYsMS4xbC0xLjgsNi43YzIuMSwwLDMuNS0wLjIsNC4xLTAuNWMwLjYtMC4zLDEuMy0xLjIsMi4xLTIuNwoJCWwwLjgsMC4xbC0yLjIsOC4ybC0wLjgtMC4xYzAtMC4zLDAuMS0wLjUsMC4xLTAuN3MwLTAuNCwwLTAuNWMwLTEuMS0wLjMtMS44LTAuOS0yLjJzLTEuNy0wLjYtMy40LTAuNmwtMiw3LjMKCQljMCwwLjItMC4xLDAuMy0wLjEsMC41czAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4zLDAuN2MwLjIsMC4yLDAuNywwLjMsMS4zLDAuM2MxLjgsMCwzLjQtMC4zLDQuNi0wLjhjMi0wLjgsMy41LTIuMiw0LjctNC4yCgkJbDAuNywwLjFsLTEuOCw1LjhILTQ0Vi0zNTQuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0tOC41LTM3NC4xYzEuMSwwLjMsMS43LDAuNCwyLDAuNGMwLjMsMCwwLjUtMC4xLDAuNy0wLjJzMC4zLTAuNCwwLjUtMC42aDAuOWwtMS41LDdsLTAuOS0wLjIKCQljMC0wLjQsMC0wLjcsMC4xLTAuN2MwLTAuMSwwLTAuMiwwLTAuM2MwLTEuNi0wLjQtMi44LTEuMS0zLjVzLTEuNy0xLjItMi44LTEuMmMtMi4zLDAtNC4zLDEuNS02LjEsNC42Yy0xLjUsMi44LTIuMyw1LjYtMi4zLDguNAoJCWMwLDIuMSwwLjUsMy41LDEuNCw0LjNjMSwwLjgsMiwxLjEsMy4xLDEuMWMxLjUsMCwyLjgtMC41LDQuMS0xLjVjMC43LTAuNSwxLjQtMS4yLDIuMS0yLjFsMC45LDAuN2MtMSwxLjUtMi4zLDIuNy0zLjcsMy40CgkJcy0yLjksMS4xLTQuMywxLjFjLTIuNCwwLTQuNC0wLjctNi0yLjFjLTEuNi0xLjQtMi40LTMuMy0yLjQtNS43YzAtMy42LDEuMi02LjcsMy42LTkuNGMyLjQtMi43LDUuMy00LDguNi00CgkJQy0xMC42LTM3NC41LTkuNi0zNzQuNC04LjUtMzc0LjF6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNLTYuNi0zNTQuN2MwLjctMC4xLDEuMi0wLjMsMS42LTAuNWMwLjMtMC4zLDAuNi0wLjgsMC44LTEuNmwzLjctMTMuNWMwLjEtMC4zLDAuMi0wLjcsMC4yLTAuOQoJCXMwLjEtMC41LDAuMS0wLjdjMC0wLjUtMC4xLTAuOC0wLjQtMWMtMC4zLTAuMS0wLjktMC4yLTEuOC0wLjN2LTAuOGgxNi4ybC0xLjMsNS43bC0wLjgtMC4xYzAtMS41LTAuMy0yLjUtMC43LTMuMQoJCWMtMC44LTEtMi4zLTEuNS00LjYtMS41Yy0wLjgsMC0xLjMsMC4xLTEuNSwwLjNjLTAuMiwwLjItMC40LDAuNS0wLjYsMS4xbC0xLjgsNi43YzIuMSwwLDMuNS0wLjIsNC4xLTAuNWMwLjYtMC4zLDEuMy0xLjIsMi4xLTIuNwoJCWwwLjgsMC4xbC0yLjIsOC4ybC0wLjgtMC4xYzAtMC4zLDAuMS0wLjUsMC4xLTAuN2MwLTAuMiwwLTAuNCwwLTAuNWMwLTEuMS0wLjMtMS44LTAuOS0yLjJzLTEuNy0wLjYtMy40LTAuNmwtMiw3LjMKCQljMCwwLjItMC4xLDAuMy0wLjEsMC41YzAsMC4yLDAsMC4zLDAsMC40YzAsMC4zLDAuMSwwLjUsMC4zLDAuN3MwLjcsMC4zLDEuMywwLjNjMS44LDAsMy40LTAuMyw0LjYtMC44YzItMC44LDMuNS0yLjIsNC43LTQuMgoJCWwwLjcsMC4xbC0xLjgsNS44SC02LjZWLTM1NC43eiIvPgoJPHBhdGggY2xhc3M9InN0MiIgZD0iTTEyLjMtMzU0LjdjMC43LTAuMSwxLjItMC4zLDEuNi0wLjVjMC4zLTAuMywwLjYtMC44LDAuOC0xLjZsMy43LTEzLjVjMC4xLTAuNCwwLjItMC43LDAuMi0xczAuMS0wLjUsMC4xLTAuNwoJCWMwLTAuNS0wLjEtMC44LTAuNC0xcy0wLjktMC4yLTEuOC0wLjN2LTAuOGg4Ljl2MC44Yy0wLjcsMC4xLTEuMywwLjMtMS42LDAuNXMtMC42LDAuOC0wLjgsMS42bC0zLjcsMTMuNWwtMC4yLDEKCQljMCwwLjEsMCwwLjItMC4xLDAuM3MwLDAuMiwwLDAuM2MwLDAuNSwwLjEsMC44LDAuNCwxYzAuMywwLjEsMC45LDAuMiwxLjgsMC4zdjAuOGgtOC45Vi0zNTQuN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0zMy44LTM3NHYwLjhjLTAuNywwLTEuMiwwLjEtMS42LDAuMmMtMC41LDAuMi0wLjcsMC41LTAuNywxLjFjMCwwLjEsMCwwLjIsMCwwLjNjMCwwLjEsMCwwLjIsMCwwLjNsMS42LDExLjkKCQlsNS43LTljMC40LTAuNywwLjktMS40LDEuMi0yLjFzMC41LTEuMywwLjUtMS43YzAtMC40LTAuMi0wLjctMC42LTAuOGMtMC4yLTAuMS0wLjctMC4xLTEuNC0wLjF2LTAuOGg1Ljh2MC44CgkJYy0wLjUsMC4xLTAuOCwwLjMtMS4xLDAuNWMtMC40LDAuMy0wLjgsMC44LTEuMiwxLjRsLTExLjMsMThoLTFsLTIuMy0xNS4zYy0wLjMtMi4yLTAuNi0zLjUtMC44LTMuOXMtMC45LTAuNi0xLjktMC43di0wLjhIMzMuOHoiCgkJLz4KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik00MS4zLTM1NC43YzAuNy0wLjEsMS4yLTAuMywxLjYtMC41YzAuMy0wLjMsMC42LTAuOCwwLjgtMS42bDMuNy0xMy41YzAuMS0wLjMsMC4yLTAuNywwLjItMC45CgkJczAuMS0wLjUsMC4xLTAuN2MwLTAuNS0wLjEtMC44LTAuNC0xYy0wLjMtMC4xLTAuOS0wLjItMS44LTAuM3YtMC44aDE2LjJsLTEuMyw1LjdsLTAuOC0wLjFjMC0xLjUtMC4zLTIuNS0wLjctMy4xCgkJYy0wLjgtMS0yLjMtMS41LTQuNi0xLjVjLTAuOCwwLTEuMywwLjEtMS41LDAuM2MtMC4yLDAuMi0wLjQsMC41LTAuNiwxLjFsLTEuOCw2LjdjMi4xLDAsMy41LTAuMiw0LjEtMC41YzAuNi0wLjMsMS4zLTEuMiwyLjEtMi43CgkJbDAuOCwwLjFsLTIuMiw4LjJsLTAuOC0wLjFjMC0wLjMsMC4xLTAuNSwwLjEtMC43YzAtMC4yLDAtMC40LDAtMC41YzAtMS4xLTAuMy0xLjgtMC45LTIuMnMtMS43LTAuNi0zLjQtMC42bC0yLDcuMwoJCWMwLDAuMi0wLjEsMC4zLTAuMSwwLjVjMCwwLjIsMCwwLjMsMCwwLjRjMCwwLjMsMC4xLDAuNSwwLjMsMC43czAuNywwLjMsMS4zLDAuM2MxLjgsMCwzLjQtMC4zLDQuNi0wLjhjMi0wLjgsMy41LTIuMiw0LjctNC4yCgkJbDAuNywwLjFsLTEuOCw1LjhINDEuM1YtMzU0Ljd6Ii8+Cgk8cGF0aCBjbGFzcz0ic3QyIiBkPSJNNTkuOC0zNTQuN2MwLjctMC4xLDEuMS0wLjIsMS40LTAuNGMwLjUtMC4zLDAuOC0wLjksMS0xLjdsMy43LTEzLjVjMC4xLTAuNCwwLjItMC43LDAuMi0xczAuMS0wLjUsMC4xLTAuNwoJCWMwLTAuNS0wLjEtMC44LTAuNC0xcy0wLjktMC4yLTEuOC0wLjN2LTAuOGg4LjdjMi45LDAsNS4yLDAuOCw2LjcsMi4zczIuMywzLjUsMi4zLDYuMWMwLDMuMS0xLjEsNS43LTMuNCw4CgkJYy0yLjUsMi41LTUuOCwzLjgtMTAsMy44aC04LjZWLTM1NC43eiBNNzYuNy0zNzEuMWMtMC44LTEuMy0yLjEtMi00LjEtMmMtMC42LDAtMS4xLDAuMS0xLjMsMC4zYy0wLjIsMC4yLTAuNCwwLjUtMC41LDAuOAoJCWwtNC4xLDE1LjFjMCwwLjEtMC4xLDAuMy0wLjEsMC40czAsMC4yLDAsMC4zYzAsMC40LDAuMSwwLjcsMC40LDAuOGMwLjIsMC4yLDAuNywwLjMsMS4zLDAuM2MzLjYsMCw2LjEtMS44LDcuNy01LjUKCQljMS0yLjIsMS41LTQuNiwxLjUtNy4xQzc3LjQtMzY5LDc3LjItMzcwLjIsNzYuNy0zNzEuMXoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik0tMzItMzAyLjl2MC42Yy0wLjQsMC0wLjcsMC4xLTAuOSwwLjJjLTAuNCwwLjItMC41LDAuNS0wLjUsMS4xYzAsMC4xLDAsMC4xLDAsMC4yczAsMC4xLDAsMC4ybDAuOSw4LjQKCQlsMy42LTcuNWMwLTAuMSwwLTAuMiwwLTAuMmMwLTEtMC4yLTEuNi0wLjUtMmMtMC4yLTAuMi0wLjYtMC4zLTEuMi0wLjR2LTAuNmg2LjR2MC42Yy0wLjUsMC0wLjksMC4xLTEuMiwwLjMKCQljLTAuMiwwLjItMC4zLDAuNS0wLjMsMWMwLDAuMSwwLDAuMywwLDAuNWMwLDAuMywwLjEsMC43LDAuMSwxLjJsMC44LDdsMy43LTcuOGMwLjEtMC4yLDAuMi0wLjQsMC4yLTAuNmMwLjEtMC4yLDAuMS0wLjQsMC4xLTAuNgoJCWMwLTAuNC0wLjEtMC43LTAuNC0wLjhzLTAuNi0wLjItMS4xLTAuMnYtMC42aDQuNXYwLjZjLTAuNCwwLTAuNywwLjEtMC45LDAuM2MtMC40LDAuMy0wLjcsMC44LTEuMSwxLjVsLTYuOSwxNC4yaC0wLjdsLTEuNS0xMS43CgkJbC01LjYsMTEuN2gtMC43bC0xLjktMTMuOWMtMC4xLTAuOC0wLjMtMS40LTAuNS0xLjZjLTAuMi0wLjItMC43LTAuNC0xLjQtMC40di0wLjZILTMyeiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0yMC0yODcuNWMwLjYtMC4xLDEtMC4yLDEuMy0wLjRzMC41LTAuNiwwLjctMS4zbDIuOS0xMC44YzAuMS0wLjMsMC4yLTAuNiwwLjItMC44czAuMS0wLjQsMC4xLTAuNQoJCWMwLTAuNC0wLjEtMC43LTAuMy0wLjhzLTAuNy0wLjItMS40LTAuM3YtMC42aDcuMXYwLjZjLTAuNiwwLjEtMSwwLjItMS4zLDAuNHMtMC41LDAuNi0wLjcsMS4zbC0zLDEwLjhsLTAuMiwwLjgKCQljMCwwLjEsMCwwLjIsMCwwLjJzMCwwLjIsMCwwLjJjMCwwLjQsMC4xLDAuNywwLjMsMC44czAuNywwLjIsMS40LDAuM3YwLjZILTIwVi0yODcuNXoiLz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik0tMTAuMi0yODcuNWMwLjcsMCwxLjItMC4xLDEuNS0wLjJjMC40LTAuMiwwLjgtMC43LDEtMS41bDMuNS0xMi45Yy0xLjIsMC0yLjIsMC4zLTMuMSwwLjkKCQljLTAuOCwwLjYtMS41LDEuNC0yLjEsMi42bC0wLjYtMC4ybDAuOS00LjFINC4xbC0wLjksNC42bC0wLjYtMC4xYzAtMS42LTAuNS0yLjYtMS4zLTMuMmMtMC41LTAuMy0xLjEtMC41LTItMC41TC00LTI4OS44CgkJbC0wLjIsMC44YzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4xLDAsMC4yYzAsMC40LDAuMSwwLjcsMC40LDAuOGMwLjMsMC4xLDAuOCwwLjIsMS42LDAuMnYwLjZoLTcuOVYtMjg3LjV6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNMS44LTI4Ny41YzAuNi0wLjEsMS4xLTAuMywxLjMtMC43YzAuMy0wLjQsMC42LTEuNCwxLjEtMi45bDIuNy05LjhsLTAuMS0wLjJjLTAuMi0wLjQtMC40LTAuNy0wLjctMC45CgkJYy0wLjItMC4xLTAuNi0wLjItMS4xLTAuMnYtMC42aDQuOGw1LjIsMTEuMWwxLjktNi44YzAuMS0wLjQsMC4yLTAuOCwwLjMtMS4xYzAuMS0wLjUsMC4yLTAuOSwwLjItMS4xYzAtMC42LTAuMi0xLTAuNi0xLjIKCQljLTAuMi0wLjEtMC43LTAuMi0xLjMtMC4zdi0wLjZoNC45djAuNmwtMC4zLDBjLTAuNSwwLjEtMC45LDAuMy0xLjEsMC44Yy0wLjMsMC41LTAuNiwxLjQtMSwyLjhsLTMuMywxMi4yaC0wLjZsLTYuMi0xMy4zCgkJbC0yLjQsOC42Yy0wLjIsMC43LTAuMywxLjItMC40LDEuNmMwLDAuMi0wLjEsMC40LTAuMSwwLjZjMCwwLjYsMC4yLDEsMC42LDEuMmMwLjIsMC4xLDAuNywwLjIsMS4zLDAuM3YwLjZoLTVWLTI4Ny41eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTTE4LjEtMjg3LjVjMC42LTAuMSwxLTAuMiwxLjMtMC40czAuNS0wLjYsMC43LTEuM0wyMy0zMDBjMC4xLTAuMywwLjEtMC41LDAuMi0wLjdzMC4xLTAuNCwwLjEtMC42CgkJYzAtMC40LTAuMS0wLjctMC4zLTAuOHMtMC43LTAuMi0xLjQtMC4zdi0wLjZoMTIuOWwtMSw0LjZsLTAuNi0wLjFjMC0xLjItMC4yLTItMC42LTIuNWMtMC42LTAuOC0xLjgtMS4yLTMuNy0xLjIKCQljLTAuNiwwLTEsMC4xLTEuMiwwLjJjLTAuMiwwLjItMC4zLDAuNC0wLjUsMC45bC0xLjQsNS4zYzEuNywwLDIuOC0wLjIsMy4zLTAuNHMxLTAuOSwxLjYtMi4xbDAuNywwLjFsLTEuOCw2LjZsLTAuNy0wLjEKCQljMC0wLjIsMC4xLTAuNCwwLjEtMC42czAtMC4zLDAtMC40YzAtMC45LTAuMi0xLjQtMC43LTEuN2MtMC41LTAuMy0xLjQtMC41LTIuOC0wLjVsLTEuNiw1LjljMCwwLjEtMC4xLDAuMy0wLjEsMC40czAsMC4yLDAsMC4zCgkJYzAsMC4yLDAuMSwwLjQsMC4zLDAuNXMwLjUsMC4yLDEuMSwwLjJjMS41LDAsMi43LTAuMiwzLjctMC42YzEuNi0wLjYsMi44LTEuOCwzLjctMy40bDAuNiwwLjFsLTEuNCw0LjdIMTguMVYtMjg3LjV6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNMzMuOS0yODYuNGwwLjktNS40bDAuNywwYzAsMC44LDAuMSwxLjMsMC4yLDEuN2MwLjEsMC42LDAuNCwxLjEsMC44LDEuNmMwLjQsMC40LDAuOCwwLjcsMS4yLDAuOQoJCXMxLDAuMywxLjUsMC4zYzEsMCwxLjctMC4zLDIuMi0wLjlzMC44LTEuMywwLjgtMi4xYzAtMS0xLTIuMy0yLjktMy44Yy0yLTEuNi0yLjktMy4xLTIuOS00LjVjMC0xLjMsMC40LTIuNCwxLjMtMy4zCgkJczIuMS0xLjQsMy42LTEuNGMwLjQsMCwwLjksMCwxLjMsMC4xYzAuMywwLjEsMC42LDAuMSwwLjgsMC4ybDAuNiwwLjJjMC4xLDAsMC4zLDAuMSwwLjQsMC4xczAuMywwLDAuNCwwYzAuMywwLDAuNS0wLjEsMC42LTAuMgoJCXMwLjMtMC4zLDAuNC0wLjRoMC43bC0xLDQuOGwtMC42LTAuMWwtMC4xLTAuOGMtMC4xLTAuNy0wLjMtMS40LTAuNy0xLjljLTAuNi0wLjgtMS40LTEuMy0yLjUtMS4zYy0wLjksMC0xLjYsMC4zLTIsMQoJCWMtMC4zLDAuNC0wLjQsMC45LTAuNCwxLjRjMCwwLjUsMC4xLDEsMC40LDEuNWMwLjIsMC4yLDAuNCwwLjUsMC43LDAuOGwyLjEsMS43YzAuNywwLjYsMS40LDEuMywxLjksMi4xczAuOCwxLjYsMC44LDIuNgoJCWMwLDEuMy0wLjUsMi40LTEuNSwzLjRzLTIuNCwxLjUtNC4xLDEuNWMtMC40LDAtMC45LDAtMS4zLTAuMWMtMC40LTAuMS0wLjktMC4yLTEuMy0wLjRsLTAuNi0wLjJjLTAuMi0wLjEtMC4zLTAuMS0wLjQtMC4xCgkJYy0wLjEsMC0wLjIsMC0wLjMsMGMtMC4zLDAtMC41LDAuMS0wLjYsMC4yYy0wLjEsMC4xLTAuMiwwLjMtMC40LDAuN0gzMy45eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTTQ2LjItMjg2LjRsMC45LTUuNGwwLjcsMGMwLDAuOCwwLjEsMS4zLDAuMiwxLjdjMC4xLDAuNiwwLjQsMS4xLDAuOCwxLjZjMC40LDAuNCwwLjgsMC43LDEuMiwwLjkKCQlzMSwwLjMsMS41LDAuM2MxLDAsMS43LTAuMywyLjItMC45czAuOC0xLjMsMC44LTIuMWMwLTEtMS0yLjMtMi45LTMuOGMtMi0xLjYtMi45LTMuMS0yLjktNC41YzAtMS4zLDAuNC0yLjQsMS4zLTMuMwoJCXMyLjEtMS40LDMuNi0xLjRjMC40LDAsMC45LDAsMS4zLDAuMWMwLjMsMC4xLDAuNiwwLjEsMC44LDAuMmwwLjYsMC4yYzAuMSwwLDAuMywwLjEsMC40LDAuMXMwLjMsMCwwLjQsMGMwLjMsMCwwLjUtMC4xLDAuNi0wLjIKCQlzMC4zLTAuMywwLjQtMC40aDAuN2wtMSw0LjhsLTAuNi0wLjFsLTAuMS0wLjhjLTAuMS0wLjctMC4zLTEuNC0wLjctMS45Yy0wLjYtMC44LTEuNC0xLjMtMi41LTEuM2MtMC45LDAtMS42LDAuMy0yLDEKCQljLTAuMywwLjQtMC40LDAuOS0wLjQsMS40YzAsMC41LDAuMSwxLDAuNCwxLjVjMC4yLDAuMiwwLjQsMC41LDAuNywwLjhsMi4xLDEuN2MwLjcsMC42LDEuNCwxLjMsMS45LDIuMXMwLjgsMS42LDAuOCwyLjYKCQljMCwxLjMtMC41LDIuNC0xLjUsMy40cy0yLjQsMS41LTQuMSwxLjVjLTAuNCwwLTAuOSwwLTEuMy0wLjFjLTAuNC0wLjEtMC45LTAuMi0xLjMtMC40bC0wLjYtMC4yYy0wLjItMC4xLTAuMy0wLjEtMC40LTAuMQoJCWMtMC4xLDAtMC4yLDAtMC4zLDBjLTAuMywwLTAuNSwwLjEtMC42LDAuMmMtMC4xLDAuMS0wLjIsMC4zLTAuNCwwLjdINDYuMnoiLz4KPC9nPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik0tNjYuMi0yMjAuNWMwLjYtMC4xLDEtMC4yLDEuMy0wLjRzMC41LTAuNiwwLjctMS4zbDIuOS0xMC44YzAuMS0wLjMsMC4yLTAuNiwwLjItMC44czAuMS0wLjQsMC4xLTAuNQoJCWMwLTAuNC0wLjEtMC43LTAuMy0wLjhzLTAuNy0wLjItMS40LTAuM3YtMC42aDcuMXYwLjZjLTAuNiwwLjEtMSwwLjItMS4zLDAuNHMtMC41LDAuNi0wLjcsMS4zbC0zLDEwLjhsLTAuMiwwLjgKCQljMCwwLjEsMCwwLjIsMCwwLjJzMCwwLjIsMCwwLjJjMCwwLjQsMC4xLDAuNywwLjMsMC44czAuNywwLjIsMS40LDAuM3YwLjZoLTcuMVYtMjIwLjV6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNLTU4LTIyMC41YzAuNi0wLjEsMS4xLTAuMywxLjMtMC43YzAuMy0wLjQsMC42LTEuNCwxLjEtMi45bDIuNy05LjhsLTAuMS0wLjJjLTAuMi0wLjQtMC40LTAuNy0wLjctMC45CgkJYy0wLjItMC4xLTAuNi0wLjItMS4xLTAuMnYtMC42aDQuOGw1LjIsMTEuMWwxLjktNi44YzAuMS0wLjQsMC4yLTAuOCwwLjMtMS4xYzAuMS0wLjUsMC4yLTAuOSwwLjItMS4xYzAtMC42LTAuMi0xLTAuNi0xLjIKCQljLTAuMi0wLjEtMC43LTAuMi0xLjMtMC4zdi0wLjZoNC45djAuNmwtMC4zLDBjLTAuNSwwLjEtMC45LDAuMy0xLjEsMC44Yy0wLjMsMC41LTAuNiwxLjQtMSwyLjhsLTMuMywxMi4yaC0wLjZsLTYuMi0xMy4zCgkJbC0yLjQsOC42Yy0wLjIsMC43LTAuMywxLjItMC40LDEuNmMwLDAuMi0wLjEsMC40LTAuMSwwLjZjMCwwLjYsMC4yLDEsMC42LDEuMmMwLjIsMC4xLDAuNywwLjIsMS4zLDAuM3YwLjZoLTVWLTIyMC41eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS00MS42LTIyMC41YzAuNi0wLjEsMS0wLjIsMS4zLTAuNHMwLjUtMC42LDAuNy0xLjNsMi45LTEwLjhjMC4xLTAuMywwLjItMC42LDAuMi0wLjhjMC0wLjIsMC4xLTAuNCwwLjEtMC41CgkJYzAtMC40LTAuMS0wLjctMC4zLTAuOGMtMC4yLTAuMS0wLjctMC4yLTEuNC0wLjN2LTAuNmg3LjF2MC42Yy0wLjYsMC4xLTEsMC4yLTEuMywwLjRzLTAuNSwwLjYtMC43LDEuM2wtMywxMC44bC0wLjIsMC44CgkJYzAsMC4xLDAsMC4yLDAsMC4yczAsMC4yLDAsMC4yYzAsMC40LDAuMSwwLjcsMC4zLDAuOGMwLjIsMC4xLDAuNywwLjIsMS40LDAuM3YwLjZoLTcuMVYtMjIwLjV6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNLTMxLjgtMjIwLjVjMC43LDAsMS4yLTAuMSwxLjUtMC4yYzAuNC0wLjIsMC44LTAuNywxLTEuNWwzLjUtMTIuOWMtMS4yLDAtMi4yLDAuMy0zLjEsMC45CgkJYy0wLjgsMC42LTEuNSwxLjQtMi4xLDIuNmwtMC42LTAuMmwwLjktNC4xaDEzLjJsLTAuOSw0LjZsLTAuNi0wLjFjMC0xLjYtMC41LTIuNi0xLjMtMy4yYy0wLjUtMC4zLTEuMS0wLjUtMi0wLjVsLTMuMywxMi4zCgkJbC0wLjIsMC44YzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4xLDAsMC4xLDAsMC4yYzAsMC40LDAuMSwwLjcsMC40LDAuOGMwLjMsMC4xLDAuOCwwLjIsMS42LDAuMnYwLjZoLTcuOVYtMjIwLjV6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNLTE5LjYtMjIwLjVjMC42LTAuMSwxLTAuMiwxLjMtMC40czAuNS0wLjYsMC43LTEuM2wyLjktMTAuOGMwLjEtMC4zLDAuMi0wLjYsMC4yLTAuOHMwLjEtMC40LDAuMS0wLjUKCQljMC0wLjQtMC4xLTAuNy0wLjMtMC44cy0wLjctMC4yLTEuNC0wLjN2LTAuNmg3LjF2MC42Yy0wLjYsMC4xLTEsMC4yLTEuMywwLjRzLTAuNSwwLjYtMC43LDEuM2wtMywxMC44bC0wLjIsMC44CgkJYzAsMC4xLDAsMC4yLDAsMC4yczAsMC4yLDAsMC4yYzAsMC40LDAuMSwwLjcsMC4zLDAuOHMwLjcsMC4yLDEuNCwwLjN2MC42aC03LjFWLTIyMC41eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0xMi0yMjAuNGMwLjQtMC4xLDAuOC0wLjMsMS0wLjRjMC4zLTAuMiwwLjctMC42LDEtMS4zbDguOS0xNC4xaDAuNmwyLjMsMTMuN2MwLjIsMC45LDAuMywxLjUsMC42LDEuNwoJCXMwLjcsMC4zLDEuNCwwLjR2MC42aC03LjN2LTAuNmMwLjctMC4xLDEuMi0wLjIsMS41LTAuM3MwLjQtMC41LDAuNC0xYzAtMC4yLDAtMC42LTAuMS0xLjNjMC0wLjEtMC4xLTAuNy0wLjItMS43aC01LjJsLTEuNCwyLjQKCQljLTAuMSwwLjItMC4yLDAuMy0wLjMsMC41cy0wLjEsMC40LTAuMSwwLjZjMCwwLjMsMC4xLDAuNSwwLjMsMC42czAuNiwwLjIsMS4yLDAuMnYwLjZILTEyVi0yMjAuNHogTS0yLjEtMjI1LjhsLTAuOS01LjhsLTMuNiw1LjgKCQlILTIuMXoiLz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik0zLjctMjIwLjVjMC42LTAuMSwxLTAuMiwxLjMtMC40YzAuMy0wLjIsMC41LTAuNiwwLjctMS4zTDguNi0yMzNjMC4xLTAuMywwLjItMC42LDAuMi0wLjgKCQljMC0wLjIsMC4xLTAuNCwwLjEtMC41YzAtMC40LTAuMS0wLjctMC4zLTAuOGMtMC4yLTAuMS0wLjctMC4yLTEuNC0wLjN2LTAuNmg3LjZ2MC42Yy0wLjgsMC4xLTEuNCwwLjItMS43LDAuNAoJCWMtMC4zLDAuMi0wLjUsMC42LTAuNywxLjNsLTMuMSwxMS41YzAsMC4xLTAuMSwwLjItMC4xLDAuNHMwLDAuMiwwLDAuNGMwLDAuMywwLjEsMC41LDAuNCwwLjZjMC4yLDAuMSwwLjYsMC4yLDEsMC4yCgkJYzEuNiwwLDMuMS0wLjMsNC4zLTAuOHMyLjMtMS42LDMuMi0zLjJsMC42LDAuMWwtMS40LDQuN0gzLjdWLTIyMC41eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTTIxLjMtMjIwLjVjMC42LTAuMSwxLTAuMiwxLjMtMC40YzAuMy0wLjIsMC41LTAuNiwwLjctMS4zbDIuOS0xMC44YzAuMS0wLjIsMC4xLTAuNSwwLjItMC43czAuMS0wLjQsMC4xLTAuNgoJCWMwLTAuNC0wLjEtMC43LTAuMy0wLjhzLTAuNy0wLjItMS40LTAuM3YtMC42aDcuNnYwLjZjLTAuOCwwLjEtMS40LDAuMi0xLjcsMC40cy0wLjUsMC42LTAuNywxLjNsLTEuMyw0LjhoNS43bDEuMS00LjIKCQljMC4xLTAuMywwLjEtMC41LDAuMi0wLjdjMC0wLjIsMC4xLTAuNCwwLjEtMC42YzAtMC40LTAuMi0wLjctMC41LTAuOGMtMC4yLTAuMS0wLjYtMC4xLTEuMy0wLjJ2LTAuNmg3LjF2MC42CgkJYy0wLjYsMC4xLTAuOSwwLjItMS4yLDAuM2MtMC4zLDAuMi0wLjYsMC43LTAuOCwxLjRsLTIuOSwxMC44TDM2LTIyMmMwLDAuMi0wLjEsMC4zLTAuMSwwLjNzMCwwLjEsMCwwLjJjMCwwLjQsMC4yLDAuNywwLjUsMC44CgkJYzAuMiwwLjEsMC42LDAuMSwxLjMsMC4ydjAuNmgtNy42di0wLjZjMC44LTAuMSwxLjQtMC4yLDEuNy0wLjRjMC4zLTAuMiwwLjUtMC42LDAuNy0xLjNsMS41LTUuNWgtNS43bC0xLjQsNC45CgkJYy0wLjEsMC40LTAuMiwwLjYtMC4yLDAuOGMwLDAuMiwwLDAuMywwLDAuNmMwLDAuNCwwLjEsMC42LDAuMywwLjdjMC4yLDAuMSwwLjcsMC4yLDEuNCwwLjJ2MC42aC03LjFWLTIyMC41eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTTM4LjktMjIwLjVjMC42LTAuMSwxLTAuMiwxLjMtMC40czAuNS0wLjYsMC43LTEuM2wyLjktMTAuOGMwLjEtMC4zLDAuMS0wLjUsMC4yLTAuN3MwLjEtMC40LDAuMS0wLjYKCQljMC0wLjQtMC4xLTAuNy0wLjMtMC44cy0wLjctMC4yLTEuNC0wLjN2LTAuNmgxMi45bC0xLDQuNmwtMC42LTAuMWMwLTEuMi0wLjItMi0wLjYtMi41Yy0wLjYtMC44LTEuOC0xLjItMy43LTEuMgoJCWMtMC42LDAtMSwwLjEtMS4yLDAuMmMtMC4yLDAuMi0wLjMsMC40LTAuNSwwLjlsLTEuNCw1LjNjMS43LDAsMi44LTAuMiwzLjMtMC40czEtMC45LDEuNi0yLjFsMC43LDAuMWwtMS44LDYuNmwtMC43LTAuMQoJCWMwLTAuMiwwLjEtMC40LDAuMS0wLjZzMC0wLjMsMC0wLjRjMC0wLjktMC4yLTEuNC0wLjctMS43Yy0wLjUtMC4zLTEuNC0wLjUtMi44LTAuNWwtMS42LDUuOWMwLDAuMS0wLjEsMC4zLTAuMSwwLjRzMCwwLjIsMCwwLjMKCQljMCwwLjIsMC4xLDAuNCwwLjMsMC41czAuNSwwLjIsMS4xLDAuMmMxLjUsMCwyLjctMC4yLDMuNy0wLjZjMS42LTAuNiwyLjgtMS44LDMuNy0zLjRsMC42LDAuMWwtMS40LDQuN0gzOC45Vi0yMjAuNXoiLz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik01My44LTIyMC41YzAuNi0wLjEsMS0wLjIsMS4zLTAuNHMwLjUtMC42LDAuNy0xLjNsMi45LTEwLjhjMC4xLTAuMiwwLjEtMC40LDAuMS0wLjZjMC4xLTAuMywwLjEtMC42LDAuMS0wLjgKCQljMC0wLjQtMC4xLTAuNi0wLjMtMC43cy0wLjctMC4yLTEuNC0wLjJ2LTAuNmg2LjZjMS41LDAsMi42LDAuMSwzLjQsMC40YzEuNSwwLjUsMi4yLDEuNSwyLjIsM2MwLDAuNS0wLjEsMS0wLjQsMS42CgkJcy0wLjcsMS4xLTEuMywxLjVjLTAuNCwwLjMtMC45LDAuNi0xLjUsMC44Yy0wLjMsMC4xLTAuOCwwLjMtMS41LDAuNGMwLjEsMC4yLDAuMSwwLjQsMC4yLDAuNWwxLjgsNS40YzAuMiwwLjcsMC41LDEuMiwwLjgsMS40CgkJczAuNywwLjMsMS4zLDAuM3YwLjZoLTQuOGwtMi42LTcuOWgtMC43bC0xLjQsNWwtMC4yLDAuOGMwLDAuMSwwLDAuMSwwLDAuMmMwLDAuMSwwLDAuMSwwLDAuMmMwLDAuNCwwLjEsMC43LDAuMywwLjgKCQljMC4yLDAuMSwwLjcsMC4yLDEuNCwwLjN2MC42aC03LjFWLTIyMC41eiBNNjMtMjI4LjhjMC43LTAuMiwxLjMtMC41LDEuNy0wLjljMC4zLTAuMywwLjUtMC44LDAuOC0xLjNzMC40LTEuMiwwLjQtMS44CgkJYzAtMC43LTAuMi0xLjItMC41LTEuN3MtMC45LTAuNy0xLjctMC43Yy0wLjMsMC0wLjYsMC4xLTAuNywwLjJjLTAuMSwwLjEtMC4zLDAuNC0wLjQsMC44bC0xLjUsNS41QzYyLTIyOC42LDYyLjYtMjI4LjcsNjMtMjI4Ljh6CgkJIi8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNNjguOS0yMjAuNWMwLjYtMC4xLDEtMC4yLDEuMy0wLjRzMC41LTAuNiwwLjctMS4zbDIuOS0xMC44YzAuMS0wLjMsMC4xLTAuNSwwLjItMC43czAuMS0wLjQsMC4xLTAuNgoJCWMwLTAuNC0wLjEtMC43LTAuMy0wLjhzLTAuNy0wLjItMS40LTAuM3YtMC42aDEyLjlsLTEsNC42bC0wLjYtMC4xYzAtMS4yLTAuMi0yLTAuNi0yLjVjLTAuNi0wLjgtMS44LTEuMi0zLjctMS4yCgkJYy0wLjYsMC0xLDAuMS0xLjIsMC4yYy0wLjIsMC4yLTAuMywwLjQtMC41LDAuOWwtMS40LDUuM2MxLjcsMCwyLjgtMC4yLDMuMy0wLjRzMS0wLjksMS42LTIuMWwwLjcsMC4xbC0xLjgsNi42bC0wLjctMC4xCgkJYzAtMC4yLDAuMS0wLjQsMC4xLTAuNnMwLTAuMywwLTAuNGMwLTAuOS0wLjItMS40LTAuNy0xLjdjLTAuNS0wLjMtMS40LTAuNS0yLjgtMC41bC0xLjYsNS45YzAsMC4xLTAuMSwwLjMtMC4xLDAuNHMwLDAuMiwwLDAuMwoJCWMwLDAuMiwwLjEsMC40LDAuMywwLjVzMC41LDAuMiwxLjEsMC4yYzEuNSwwLDIuNy0wLjIsMy43LTAuNmMxLjYtMC42LDIuOC0xLjgsMy43LTMuNGwwLjYsMC4xbC0xLjQsNC43SDY4LjlWLTIyMC41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS01MS4xLTE1MS40bDAuOS01LjRsMC43LDBjMCwwLjgsMC4xLDEuMywwLjIsMS43YzAuMSwwLjYsMC40LDEuMSwwLjgsMS42YzAuNCwwLjQsMC44LDAuNywxLjIsMC45CgkJczEsMC4zLDEuNSwwLjNjMSwwLDEuNy0wLjMsMi4yLTAuOXMwLjgtMS4zLDAuOC0yLjFjMC0xLTEtMi4zLTIuOS0zLjhjLTItMS42LTIuOS0zLjEtMi45LTQuNWMwLTEuMywwLjQtMi40LDEuMy0zLjMKCQlzMi4xLTEuNCwzLjYtMS40YzAuNCwwLDAuOSwwLDEuMywwLjFjMC4zLDAuMSwwLjYsMC4xLDAuOCwwLjJsMC42LDAuMmMwLjEsMCwwLjMsMC4xLDAuNCwwLjFzMC4zLDAsMC40LDBjMC4zLDAsMC41LTAuMSwwLjYtMC4yCgkJczAuMy0wLjMsMC40LTAuNGgwLjdsLTEsNC44bC0wLjYtMC4xbC0wLjEtMC44Yy0wLjEtMC43LTAuMy0xLjQtMC43LTEuOWMtMC42LTAuOC0xLjQtMS4zLTIuNS0xLjNjLTAuOSwwLTEuNiwwLjMtMiwxCgkJYy0wLjMsMC40LTAuNCwwLjktMC40LDEuNGMwLDAuNSwwLjEsMSwwLjQsMS41YzAuMiwwLjIsMC40LDAuNSwwLjcsMC44bDIuMSwxLjdjMC43LDAuNiwxLjQsMS4zLDEuOSwyLjFzMC44LDEuNiwwLjgsMi42CgkJYzAsMS4zLTAuNSwyLjQtMS41LDMuNHMtMi40LDEuNS00LjEsMS41Yy0wLjQsMC0wLjksMC0xLjMtMC4xYy0wLjQtMC4xLTAuOS0wLjItMS4zLTAuNGwtMC42LTAuMmMtMC4yLTAuMS0wLjMtMC4xLTAuNC0wLjEKCQljLTAuMSwwLTAuMiwwLTAuMywwYy0wLjMsMC0wLjUsMC4xLTAuNiwwLjJjLTAuMSwwLjEtMC4yLDAuMy0wLjQsMC43SC01MS4xeiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTS0zOS41LTE1Mi41YzAuNi0wLjEsMS0wLjIsMS4zLTAuNHMwLjUtMC42LDAuNy0xLjNsMi45LTEwLjhjMC4xLTAuMywwLjItMC42LDAuMi0wLjhjMC0wLjIsMC4xLTAuNCwwLjEtMC41CgkJYzAtMC40LTAuMS0wLjctMC4zLTAuOGMtMC4yLTAuMS0wLjctMC4yLTEuNC0wLjN2LTAuNmg3LjF2MC42Yy0wLjYsMC4xLTEsMC4yLTEuMywwLjRzLTAuNSwwLjYtMC43LDEuM2wtMywxMC44TC0zNC0xNTQKCQljMCwwLjEsMCwwLjIsMCwwLjJzMCwwLjIsMCwwLjJjMCwwLjQsMC4xLDAuNywwLjMsMC44YzAuMiwwLjEsMC43LDAuMiwxLjQsMC4zdjAuNmgtNy4xVi0xNTIuNXoiLz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik0tMTcuNC0xNjcuOWMwLjgsMC4yLDEuMywwLjQsMS40LDAuNGMwLjIsMCwwLjQtMC4xLDAuNi0wLjJzMC4zLTAuMywwLjQtMC41aDAuN2wtMS4yLDUuM2wtMC43LTAuMQoJCWMwLTEtMC4xLTEuOC0wLjQtMi41Yy0wLjUtMS4yLTEuNS0xLjktMy0xLjljLTIsMC0zLjYsMS4yLTUsMy43Yy0xLjIsMi4yLTEuOCw0LjQtMS44LDYuN2MwLDIsMC41LDMuMywxLjYsNC4xCgkJYzAuNiwwLjQsMS4zLDAuNiwyLjIsMC42YzAuOCwwLDEuNC0wLjEsMS44LTAuM2MwLjQtMC4yLDAuNy0wLjYsMC45LTEuMWMwLDAuMSwwLjItMC41LDAuNS0xLjljMC40LTEuMywwLjUtMi4yLDAuNS0yLjUKCQljMC0wLjQtMC4xLTAuNi0wLjMtMC44Yy0wLjItMC4xLTAuNy0wLjItMS40LTAuM3YtMC42aDYuOXYwLjZjLTAuNywwLjEtMS4xLDAuMi0xLjMsMC40Yy0wLjIsMC4yLTAuNCwwLjctMC42LDEuNmwtMS4yLDQuNAoJCWwtMC43LDAuM2MtMC41LDAuMi0xLjMsMC41LTIuMywwLjdjLTEsMC4zLTIuMSwwLjQtMy4yLDAuNGMtMiwwLTMuNy0wLjUtNS0xLjZjLTEuNS0xLjItMi4yLTIuOC0yLjItNC44YzAtMi42LDAuOS01LDIuNi03CgkJYzItMi4zLDQuNC0zLjQsNy41LTMuNEMtMTkuMS0xNjguMy0xOC4yLTE2OC4yLTE3LjQtMTY3Ljl6Ii8+Cgk8cGF0aCBjbGFzcz0ic3Q4IiBkPSJNLTE1LTE1Mi41YzAuNi0wLjEsMS4xLTAuMywxLjMtMC43YzAuMy0wLjQsMC42LTEuNCwxLjEtMi45bDIuNy05LjhsLTAuMS0wLjJjLTAuMi0wLjQtMC40LTAuNy0wLjctMC45CgkJYy0wLjItMC4xLTAuNi0wLjItMS4xLTAuMnYtMC42SC03bDUuMiwxMS4xbDEuOS02LjhjMC4xLTAuNCwwLjItMC44LDAuMy0xLjFjMC4xLTAuNSwwLjItMC45LDAuMi0xLjFjMC0wLjYtMC4yLTEtMC42LTEuMgoJCWMtMC4yLTAuMS0wLjctMC4yLTEuMy0wLjN2LTAuNmg0Ljl2MC42bC0wLjMsMGMtMC41LDAuMS0wLjksMC4zLTEuMSwwLjhjLTAuMywwLjUtMC42LDEuNC0xLDIuOGwtMy4zLDEyLjJoLTAuNkwtOS0xNjQuOGwtMi40LDguNgoJCWMtMC4yLDAuNy0wLjMsMS4yLTAuNCwxLjZjMCwwLjItMC4xLDAuNC0wLjEsMC42YzAsMC42LDAuMiwxLDAuNiwxLjJjMC4yLDAuMSwwLjcsMC4yLDEuMywwLjN2MC42aC01Vi0xNTIuNXoiLz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik02LjQtMTUyLjVjMC42LTAuMSwxLTAuMiwxLjMtMC40YzAuMy0wLjIsMC41LTAuNiwwLjctMS4zbDIuOS0xMC44YzAuMS0wLjIsMC4xLTAuNSwwLjItMC43CgkJYzAuMS0wLjIsMC4xLTAuNCwwLjEtMC42YzAtMC40LTAuMS0wLjctMC4zLTAuOGMtMC4yLTAuMS0wLjctMC4yLTEuNC0wLjN2LTAuNmg3LjZ2MC42Yy0wLjgsMC4xLTEuNCwwLjItMS43LDAuNHMtMC41LDAuNi0wLjcsMS4zCgkJbC0xLjMsNC44aDUuN2wxLjEtNC4yYzAuMS0wLjMsMC4xLTAuNSwwLjItMC43czAuMS0wLjQsMC4xLTAuNmMwLTAuNC0wLjItMC43LTAuNS0wLjhjLTAuMi0wLjEtMC42LTAuMS0xLjMtMC4ydi0wLjZoNy4xdjAuNgoJCWMtMC42LDAuMS0wLjksMC4yLTEuMiwwLjNjLTAuMywwLjItMC42LDAuNy0wLjgsMS40bC0yLjksMTAuOGwtMC4yLDAuOGMwLDAuMi0wLjEsMC4zLTAuMSwwLjNjMCwwLDAsMC4xLDAsMC4yCgkJYzAsMC40LDAuMiwwLjcsMC41LDAuOGMwLjIsMC4xLDAuNiwwLjEsMS4zLDAuMnYwLjZoLTcuNnYtMC42YzAuOC0wLjEsMS40LTAuMiwxLjctMC40YzAuMy0wLjIsMC41LTAuNiwwLjctMS4zbDEuNS01LjVoLTUuNwoJCWwtMS40LDQuOWMtMC4xLDAuNC0wLjIsMC42LTAuMiwwLjhjMCwwLjIsMCwwLjMsMCwwLjZjMCwwLjQsMC4xLDAuNiwwLjMsMC43YzAuMiwwLjEsMC43LDAuMiwxLjQsMC4ydjAuNkg2LjRWLTE1Mi41eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTTI0LTE1Mi41YzAuNi0wLjEsMS0wLjIsMS4zLTAuNHMwLjUtMC42LDAuNy0xLjNsMi45LTEwLjhjMC4xLTAuMywwLjEtMC41LDAuMi0wLjdzMC4xLTAuNCwwLjEtMC42CgkJYzAtMC40LTAuMS0wLjctMC4zLTAuOHMtMC43LTAuMi0xLjQtMC4zdi0wLjZoMTIuOWwtMSw0LjZsLTAuNi0wLjFjMC0xLjItMC4yLTItMC42LTIuNWMtMC42LTAuOC0xLjgtMS4yLTMuNy0xLjIKCQljLTAuNiwwLTEsMC4xLTEuMiwwLjJjLTAuMiwwLjItMC4zLDAuNC0wLjUsMC45bC0xLjQsNS4zYzEuNywwLDIuOC0wLjIsMy4zLTAuNHMxLTAuOSwxLjYtMi4xbDAuNywwLjFsLTEuOCw2LjZsLTAuNy0wLjEKCQljMC0wLjIsMC4xLTAuNCwwLjEtMC42czAtMC4zLDAtMC40YzAtMC45LTAuMi0xLjQtMC43LTEuN2MtMC41LTAuMy0xLjQtMC41LTIuOC0wLjVsLTEuNiw1LjljMCwwLjEtMC4xLDAuMy0wLjEsMC40czAsMC4yLDAsMC4zCgkJYzAsMC4yLDAuMSwwLjQsMC4zLDAuNXMwLjUsMC4yLDEuMSwwLjJjMS41LDAsMi43LTAuMiwzLjctMC42YzEuNi0wLjYsMi44LTEuOCwzLjctMy40bDAuNiwwLjFsLTEuNCw0LjdIMjRWLTE1Mi41eiIvPgoJPHBhdGggY2xhc3M9InN0OCIgZD0iTTM4LjktMTUyLjVjMC42LTAuMSwxLTAuMiwxLjMtMC40czAuNS0wLjYsMC43LTEuM2wyLjktMTAuOGMwLjEtMC4yLDAuMS0wLjQsMC4xLTAuNmMwLjEtMC4zLDAuMS0wLjYsMC4xLTAuOAoJCWMwLTAuNC0wLjEtMC42LTAuMy0wLjdzLTAuNy0wLjItMS40LTAuMnYtMC42aDYuNmMxLjUsMCwyLjYsMC4xLDMuNCwwLjRjMS41LDAuNSwyLjIsMS41LDIuMiwzYzAsMC41LTAuMSwxLTAuNCwxLjYKCQljLTAuMywwLjYtMC43LDEuMS0xLjMsMS41Yy0wLjQsMC4zLTAuOSwwLjYtMS41LDAuOGMtMC4zLDAuMS0wLjgsMC4zLTEuNSwwLjRjMC4xLDAuMiwwLjEsMC40LDAuMiwwLjVsMS44LDUuNAoJCWMwLjIsMC43LDAuNSwxLjIsMC44LDEuNHMwLjcsMC4zLDEuMywwLjN2MC42aC00LjhsLTIuNi03LjloLTAuN2wtMS40LDVsLTAuMiwwLjhjMCwwLjEsMCwwLjEsMCwwLjJjMCwwLjEsMCwwLjEsMCwwLjIKCQljMCwwLjQsMC4xLDAuNywwLjMsMC44czAuNywwLjIsMS40LDAuM3YwLjZoLTcuMVYtMTUyLjV6IE00OC4xLTE2MC44YzAuNy0wLjIsMS4zLTAuNSwxLjctMC45YzAuMy0wLjMsMC41LTAuOCwwLjgtMS4zCgkJczAuNC0xLjIsMC40LTEuOGMwLTAuNy0wLjItMS4yLTAuNS0xLjdjLTAuMy0wLjQtMC45LTAuNy0xLjctMC43Yy0wLjMsMC0wLjYsMC4xLTAuNywwLjJjLTAuMSwwLjEtMC4zLDAuNC0wLjQsMC44bC0xLjUsNS41CgkJQzQ3LTE2MC42LDQ3LjctMTYwLjcsNDguMS0xNjAuOHoiLz4KCTxwYXRoIGNsYXNzPSJzdDgiIGQ9Ik01My45LTE1Mi41YzAuNi0wLjEsMS0wLjIsMS4zLTAuNHMwLjUtMC42LDAuNy0xLjNsMi45LTEwLjhjMC4xLTAuMywwLjEtMC41LDAuMi0wLjdzMC4xLTAuNCwwLjEtMC42CgkJYzAtMC40LTAuMS0wLjctMC4zLTAuOHMtMC43LTAuMi0xLjQtMC4zdi0wLjZoMTIuOWwtMSw0LjZsLTAuNi0wLjFjMC0xLjItMC4yLTItMC42LTIuNWMtMC42LTAuOC0xLjgtMS4yLTMuNy0xLjIKCQljLTAuNiwwLTEsMC4xLTEuMiwwLjJjLTAuMiwwLjItMC4zLDAuNC0wLjUsMC45bC0xLjQsNS4zYzEuNywwLDIuOC0wLjIsMy4zLTAuNHMxLTAuOSwxLjYtMi4xbDAuNywwLjFsLTEuOCw2LjZsLTAuNy0wLjEKCQljMC0wLjIsMC4xLTAuNCwwLjEtMC42czAtMC4zLDAtMC40YzAtMC45LTAuMi0xLjQtMC43LTEuN2MtMC41LTAuMy0xLjQtMC41LTIuOC0wLjVsLTEuNiw1LjljMCwwLjEtMC4xLDAuMy0wLjEsMC40czAsMC4yLDAsMC4zCgkJYzAsMC4yLDAuMSwwLjQsMC4zLDAuNXMwLjUsMC4yLDEuMSwwLjJjMS41LDAsMi43LTAuMiwzLjctMC42YzEuNi0wLjYsMi44LTEuOCwzLjctMy40bDAuNiwwLjFsLTEuNCw0LjdINTMuOVYtMTUyLjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QxNSIgZD0iTS03LjMtMTAxLjVjMS41LTAuMiw0LjQtMC42LDYuMS0xLjRjMC40LTAuMiwwLjksMCwxLDAuNWMwLjMsMS40LDAuOCwzLjgsMS40LDQuOGMwLDAsNy40LTExLjYsMTMtMTQuNwoJCWMwLjQtMC4yLDAuOC0wLjEsMSwwLjJjMC42LDAuOSwyLjMsMi41LDQuNCwzLjhjMC41LDAuMywwLjYsMS4xLDAsMS41QzE2LTEwNC42LDUuMS05NywxLjctODguN2MtMC4zLDAuNy0xLjEsMC43LTEuNSwwLjEKCQljLTEuOS0yLjktNi4xLTkuNC03LjktMTIuMUMtNy45LTEwMS03LjctMTAxLjUtNy4zLTEwMS41eiIvPgo8L2c+CjxnPgoJPGc+CgkJPHBvbHlnb24gY2xhc3M9InN0MTYiIHBvaW50cz0iMTcuMywtNTAuNCAxMy40LC01NC4zIDYsLTQ2LjkgLTEuNCwtNTQuMyAtNS4zLC01MC40IDIuMSwtNDMgLTUuMywtMzUuNiAtMS40LC0zMS43IDYsLTM5LjEgCgkJCTEzLjQsLTMxLjcgMTcuMywtMzUuNiA5LjksLTQzIAkJIi8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QxNyIgZD0iTTEzLjQtMzFMNi0zOC40TC0xLjQtMzFMLTYtMzUuNkwxLjQtNDNMLTYtNTAuNGw0LjYtNC42TDYtNDcuNmw3LjQtNy40bDQuNiw0LjZMMTAuNi00M2w3LjQsNy40TDEzLjQtMzF6CgkJCSBNNi0zOS44bDcuNCw3LjRsMy4yLTMuMkw5LjItNDNsNy40LTcuNGwtMy4yLTMuMkw2LTQ2LjJsLTcuNC03LjRsLTMuMiwzLjJMMi44LTQzbC03LjQsNy40bDMuMiwzLjJMNi0zOS44eiIvPgoJPC9nPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MSIgZD0iTTM3Ni41LTE2Mi41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDMzgxLjUtMTY0LjcsMzc5LjMtMTYyLjUsMzc2LjUtMTYyLjV6Ii8+CjwvZz4KPHBhdGggY2xhc3M9InN0MiIgZD0iTTM3Ni41LTIwNGgtMTYwYy0zLDAtNS41LDIuNS01LjUsNS41djMxYzAsMywyLjUsNS41LDUuNSw1LjVoMTYwYzMsMCw1LjUtMi41LDUuNS01LjV2LTMxCglDMzgyLTIwMS41LDM3OS41LTIwNCwzNzYuNS0yMDR6IE0zODEtMTY3LjVjMCwyLjUtMiw0LjUtNC41LDQuNWgtMTYwYy0yLjUsMC00LjUtMi00LjUtNC41di0zMWMwLTIuNSwyLTQuNSw0LjUtNC41aDE2MAoJYzIuNSwwLDQuNSwyLDQuNSw0LjVWLTE2Ny41eiIvPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0zNzYuNS05Ny41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDMzgxLjUtOTkuNywzNzkuMy05Ny41LDM3Ni41LTk3LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNMzc2LjUtOTdoLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMzODItOTkuNSwzNzkuNS05NywzNzYuNS05N3ogTTIxNi41LTEzOGMtMi41LDAtNC41LDItNC41LDQuNXYzMWMwLDIuNSwyLDQuNSw0LjUsNC41aDE2MGMyLjUsMCw0LjUtMiw0LjUtNC41di0zMQoJCWMwLTIuNS0yLTQuNS00LjUtNC41SDIxNi41eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MTAiIGQ9Ik0zNzYuNS0yOS41aC0xNjBjLTIuOCwwLTUtMi4yLTUtNXYtMzFjMC0yLjgsMi4yLTUsNS01aDE2MGMyLjgsMCw1LDIuMiw1LDV2MzEKCQlDMzgxLjUtMzEuNywzNzkuMy0yOS41LDM3Ni41LTI5LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3Q5IiBkPSJNMzc2LjUtMjloLTE2MGMtMywwLTUuNS0yLjUtNS41LTUuNXYtMzFjMC0zLDIuNS01LjUsNS41LTUuNWgxNjBjMywwLDUuNSwyLjUsNS41LDUuNXYzMQoJCUMzODItMzEuNSwzNzkuNS0yOSwzNzYuNS0yOXogTTIxNi41LTcwYy0yLjUsMC00LjUsMi00LjUsNC41djMxYzAsMi41LDIsNC41LDQuNSw0LjVoMTYwYzIuNSwwLDQuNS0yLDQuNS00LjV2LTMxCgkJYzAtMi41LTItNC41LTQuNS00LjVIMjE2LjV6Ii8+CjwvZz4KPGc+Cgk8Zz4KCQk8bGluZSBjbGFzcz0ic3QxOCIgeDE9IjM4MiIgeTE9Ii0xODMiIHgyPSI0NTUuOCIgeTI9Ii0xODMiLz4KCQk8Zz4KCQkJPHBvbHlnb24gY2xhc3M9InN0MTkiIHBvaW50cz0iNDU0LjQsLTE3OCA0NjMsLTE4MyA0NTQuNCwtMTg4IAkJCSIvPgoJCTwvZz4KCTwvZz4KPC9nPgo8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAxIDQ3NC42NjcgLTE4MykiIHN0eWxlPSJmb250LWZhbWlseTonU2Vnb2VVSSc7IGZvbnQtc2l6ZToyNHB4OyBsZXR0ZXItc3BhY2luZzotMTsiPkZpbGw6IGRjZTNlZjwvdGV4dD4KPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSA0NzQuNjY3IC0xNTgpIiBzdHlsZT0iZm9udC1mYW1pbHk6J1NlZ29lVUknOyBmb250LXNpemU6MjRweDsgbGV0dGVyLXNwYWNpbmc6LTE7Ij5Cb3JkZXI6IDE5Mjc2MDwvdGV4dD4KPGc+Cgk8Zz4KCQk8bGluZSBjbGFzcz0ic3QxOCIgeDE9IjM4MiIgeTE9Ii0xMTcuNSIgeDI9IjQ1NS44IiB5Mj0iLTExNy41Ii8+CgkJPGc+CgkJCTxwb2x5Z29uIGNsYXNzPSJzdDE5IiBwb2ludHM9IjQ1NC40LC0xMTIuNSA0NjMsLTExNy41IDQ1NC40LC0xMjIuNSAJCQkiLz4KCQk8L2c+Cgk8L2c+CjwvZz4KPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSA0NzQuNjY3IC0xMTcuNSkiIHN0eWxlPSJmb250LWZhbWlseTonU2Vnb2VVSSc7IGZvbnQtc2l6ZToyNHB4OyBsZXR0ZXItc3BhY2luZzotMTsiPkZpbGw6IGU2ZWRkZjwvdGV4dD4KPHRleHQgdHJhbnNmb3JtPSJtYXRyaXgoMSAwIDAgMSA0NzQuNjY3IC05Mi41KSIgc3R5bGU9ImZvbnQtZmFtaWx5OidTZWdvZVVJJzsgZm9udC1zaXplOjI0cHg7IGxldHRlci1zcGFjaW5nOi0xOyI+Qm9yZGVyOiA1MTZjMzA8L3RleHQ+CjxnPgoJPGc+CgkJPGxpbmUgY2xhc3M9InN0MTgiIHgxPSIzODIiIHkxPSItNDkuNSIgeDI9IjQ1NS44IiB5Mj0iLTQ5LjUiLz4KCQk8Zz4KCQkJPHBvbHlnb24gY2xhc3M9InN0MTkiIHBvaW50cz0iNDU0LjQsLTQ0LjUgNDYzLC00OS41IDQ1NC40LC01NC41IAkJCSIvPgoJCTwvZz4KCTwvZz4KPC9nPgo8dGV4dCB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAxIDQ3NC42NjcgLTQ5LjUpIiBzdHlsZT0iZm9udC1mYW1pbHk6J1NlZ29lVUknOyBmb250LXNpemU6MjRweDsgbGV0dGVyLXNwYWNpbmc6LTE7Ij5GaWxsOiBmNmRlZGQ8L3RleHQ+Cjx0ZXh0IHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgNDc0LjY2NyAtMjQuNSkiIHN0eWxlPSJmb250LWZhbWlseTonU2Vnb2VVSSc7IGZvbnQtc2l6ZToyNHB4OyBsZXR0ZXItc3BhY2luZzotMTsiPkJvcmRlcjogOGEyNTFhPC90ZXh0Pgo8Zz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDIwIiBkPSJNMTQuNSwzLjRjLTAuNy0wLjktMS42LTEuNi0yLjctMi4xQzEwLjYsMC44LDkuNCwwLjUsOCwwLjVTNS40LDAuOCw0LjIsMS4zQzMuMSwxLjgsMi4yLDIuNSwxLjUsMy40CgkJCWMtMC43LDAuOS0xLDEuOC0xLDIuOWMwLDAuOSwwLjIsMS43LDAuNywyLjRjMC41LDAuOCwxLjEsMS40LDEuOSwxLjljMCwwLjItMC4xLDAuNS0wLjEsMC43YzAsMC4yLTAuMSwwLjQtMC4xLDAuNQoJCQljMCwwLjEtMC4xLDAuMy0wLjIsMC40Yy0wLjEsMC4xLTAuMSwwLjMtMC4yLDAuM2MwLDAuMS0wLjEsMC4yLTAuMiwwLjNDMi4zLDEyLjksMi4yLDEzLDIuMiwxM2MwLDAtMC4xLDAuMS0wLjIsMC4yCgkJCXMtMC4yLDAuMi0wLjIsMC4yYy0wLjEsMC4xLTAuMiwwLjItMC4yLDAuM2MwLDAuMSwwLjEsMC4xLDAuMSwwLjJDMS43LDE0LDEuOCwxNCwxLjksMTRjMC4yLDAsMC40LTAuMSwwLjctMC4xCgkJCWMxLjUtMC4zLDIuNy0xLDMuNi0yLjFDNi44LDExLjksNy40LDEyLDgsMTJjMS40LDAsMi42LTAuMywzLjgtMC44YzEuMS0wLjUsMi4xLTEuMiwyLjctMi4xYzAuNy0wLjksMS0xLjgsMS0yLjkKCQkJQzE1LjUsNS4yLDE1LjIsNC4yLDE0LjUsMy40eiIvPgoJPC9nPgo8L2c+CjxnPgoJPGc+CgkJPHBhdGggZD0iTTEuOCwxNWMtMC4yLDAtMC4zLTAuMS0wLjUtMC4yYy0wLjEtMC4xLTAuMi0wLjMtMC4zLTAuNGMtMC4xLTAuMywwLTAuNSwwLjMtMC44YzAsMCwwLjEtMC4xLDAuMi0wLjIKCQkJYzAuMS0wLjEsMC4yLTAuMiwwLjItMC4yYzAsMCwwLjEtMC4xLDAuMi0wLjJjMC4xLTAuMSwwLjEtMC4yLDAuMS0wLjJjMC0wLjEsMC4xLTAuMiwwLjItMC4zYzAuMS0wLjEsMC4xLTAuMiwwLjEtMC40CgkJCWMwLTAuMSwwLjEtMC4zLDAuMS0wLjVjMC0wLjEsMC0wLjIsMC4xLTAuM2MtMC44LTAuNi0xLjQtMS4yLTEuOC0yQzAuMyw4LjQsMCw3LjQsMCw2LjVjMC0xLjIsMC40LTIuMywxLjEtMy4zCgkJCWMwLjctMSwxLjctMS44LDIuOS0yLjNjMi40LTEuMSw1LjUtMS4xLDgsMGMxLjIsMC42LDIuMiwxLjMsMi45LDIuM2wwLDBjMC43LDEsMS4xLDIuMSwxLjEsMy4zYzAsMS4yLTAuNCwyLjMtMS4xLDMuMwoJCQljLTAuNywxLTEuNywxLjgtMi45LDIuM2MtMS4yLDAuNi0yLjUsMC44LTQsMC44Yy0wLjUsMC0xLjEsMC0xLjYtMC4xYy0xLDEtMi4yLDEuNy0zLjcsMi4xQzIuNCwxNC45LDIuMSwxNSwxLjgsMTUKCQkJQzEuOSwxNSwxLjksMTUsMS44LDE1eiBNOCwxQzYuNywxLDUuNSwxLjMsNC40LDEuOGMtMS4xLDAuNS0xLjksMS4yLTIuNSwyQzEuMyw0LjYsMSw1LjUsMSw2LjVDMSw3LjMsMS4yLDgsMS42LDguNwoJCQljMC40LDAuNywxLDEuMywxLjgsMS45bDAuMiwwLjJsMCwwLjNjMCwwLjMtMC4xLDAuNS0wLjEsMC43YzAsMC4yLTAuMSwwLjQtMC4xLDAuNmMwLDAuMi0wLjEsMC40LTAuMiwwLjVDMy4xLDEzLDMsMTMuMSwzLDEzLjIKCQkJYy0wLjEsMC4xLTAuMSwwLjItMC4zLDAuNGMtMC4xLDAuMS0wLjIsMC4yLTAuMiwwLjNjMCwwLDAsMCwwLDBjMS4zLTAuMywyLjUtMSwzLjQtMmwwLjItMC4ybDAuMywwLjFjMC41LDAuMSwxLjEsMC4yLDEuNywwLjIKCQkJYzEuMywwLDIuNS0wLjMsMy42LTAuOGMxLjEtMC41LDEuOS0xLjIsMi41LTJDMTQuNyw4LjMsMTUsNy40LDE1LDYuNWMwLTEtMC4zLTEuOS0wLjktMi43bDAsMGMtMC42LTAuOC0xLjUtMS41LTIuNS0yCgkJCUMxMC41LDEuMyw5LjMsMSw4LDF6Ii8+Cgk8L2c+CjwvZz4KPGc+Cgk8cGF0aCBkPSJNMTEuNSw1LjVoLTdDNC4yLDUuNSw0LDUuMyw0LDVzMC4yLTAuNSwwLjUtMC41aDdDMTEuOCw0LjUsMTIsNC43LDEyLDVTMTEuOCw1LjUsMTEuNSw1LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBkPSJNMTEuNSw3LjVoLTdDNC4yLDcuNSw0LDcuMyw0LDdzMC4yLTAuNSwwLjUtMC41aDdDMTEuOCw2LjUsMTIsNi43LDEyLDdTMTEuOCw3LjUsMTEuNSw3LjV6Ii8+CjwvZz4KPGc+Cgk8cGF0aCBjbGFzcz0ic3QyMCIgZD0iTTQ0LjUsMy40Yy0wLjctMC45LTEuNi0xLjYtMi43LTIuMWMtMS4xLTAuNS0yLjQtMC44LTMuOC0wLjhzLTIuNiwwLjMtMy44LDAuOGMtMS4xLDAuNS0yLjEsMS4yLTIuNywyLjEKCQljLTAuNywwLjktMSwxLjgtMSwyLjljMCwwLjksMC4yLDEuNywwLjcsMi40YzAuNSwwLjgsMS4xLDEuNCwxLjksMS45YzAsMC4yLTAuMSwwLjUtMC4xLDAuN2MwLDAuMi0wLjEsMC40LTAuMSwwLjUKCQljMCwwLjEtMC4xLDAuMy0wLjIsMC40Yy0wLjEsMC4xLTAuMSwwLjMtMC4yLDAuM2MwLDAuMS0wLjEsMC4yLTAuMiwwLjNjLTAuMSwwLjEtMC4yLDAuMi0wLjIsMC4yYzAsMC0wLjEsMC4xLTAuMiwwLjIKCQlzLTAuMiwwLjItMC4yLDAuMmMtMC4xLDAuMS0wLjIsMC4yLTAuMiwwLjNjMCwwLjEsMC4xLDAuMSwwLjEsMC4yYzAuMSwwLDAuMSwwLjEsMC4yLDAuMWMwLjIsMCwwLjQtMC4xLDAuNy0wLjEKCQljMS41LTAuMywyLjctMSwzLjYtMi4xYzAuNiwwLjEsMS4yLDAuMiwxLjgsMC4yYzEuNCwwLDIuNi0wLjMsMy44LTAuOGMxLjEtMC41LDIuMS0xLjIsMi43LTIuMWMwLjctMC45LDEtMS44LDEtMi45CgkJQzQ1LjUsNS4yLDQ1LjIsNC4yLDQ0LjUsMy40eiIvPgo8L2c+CjxnPgoJPHBhdGggY2xhc3M9InN0MjEiIGQ9Ik00NC41LDMuNWMtMC43LTAuOS0xLjYtMS42LTIuNy0yLjJjLTEuMS0wLjUtMi40LTAuOC0zLjgtMC44cy0yLjYsMC4zLTMuOCwwLjhjLTEuMSwwLjUtMi4xLDEuMy0yLjcsMi4yCgkJYy0wLjcsMC45LTEsMS45LTEsM2MwLDAuOSwwLjIsMS43LDAuNywyLjVjMC41LDAuOCwxLjEsMS41LDEuOSwyYzAsMC4yLTAuMSwwLjUtMC4xLDAuN2MwLDAuMi0wLjEsMC40LTAuMSwwLjUKCQljMCwwLjEtMC4xLDAuMy0wLjIsMC40Yy0wLjEsMC4xLTAuMSwwLjMtMC4yLDAuM2MwLDAuMS0wLjEsMC4yLTAuMiwwLjNjLTAuMSwwLjEtMC4yLDAuMi0wLjIsMC4yYzAsMC0wLjEsMC4xLTAuMiwwLjIKCQljLTAuMSwwLjEtMC4yLDAuMi0wLjIsMC4yYy0wLjEsMC4xLTAuMiwwLjMtMC4yLDAuM2MwLDAuMSwwLjEsMC4xLDAuMSwwLjJjMC4xLDAsMC4xLDAuMSwwLjIsMC4xYzAuMiwwLDAuNC0wLjEsMC43LTAuMQoJCWMxLjUtMC4zLDIuNy0xLjEsMy42LTIuMWMwLjYsMC4xLDEuMiwwLjIsMS44LDAuMmMxLjQsMCwyLjYtMC4zLDMuOC0wLjhjMS4xLTAuNSwyLjEtMS4zLDIuNy0yLjJjMC43LTAuOSwxLTEuOSwxLTMKCQlDNDUuNSw1LjQsNDUuMiw0LjQsNDQuNSwzLjV6Ii8+CjwvZz4KPGxpbmUgY2xhc3M9InN0MjIiIHgxPSIzNC41IiB5MT0iNSIgeDI9IjQxLjUiIHkyPSI1Ii8+CjxsaW5lIGNsYXNzPSJzdDIyIiB4MT0iMzQuNSIgeTE9IjciIHgyPSI0MS41IiB5Mj0iNyIvPgo8Zz4KCTxnPgoJCTxwYXRoIGNsYXNzPSJzdDIwIiBkPSJNNzQuNSwyLjljLTAuNy0wLjktMS42LTEuNi0yLjctMi4xQzcwLjYsMC4zLDY5LjQsMCw2OCwwcy0yLjYsMC4zLTMuOCwwLjhjLTEuMSwwLjUtMi4xLDEuMi0yLjcsMi4xCgkJCWMtMC43LDAuOS0xLDEuOC0xLDIuOWMwLDAuOSwwLjIsMS43LDAuNywyLjRjMC41LDAuOCwxLjEsMS40LDEuOSwxLjljMCwwLjItMC4xLDAuNS0wLjEsMC43YzAsMC4yLTAuMSwwLjQtMC4xLDAuNQoJCQljMCwwLjEtMC4xLDAuMy0wLjIsMC40Yy0wLjEsMC4xLTAuMSwwLjMtMC4yLDAuM2MwLDAuMS0wLjEsMC4yLTAuMiwwLjNjLTAuMSwwLjEtMC4yLDAuMi0wLjIsMC4yYzAsMC0wLjEsMC4xLTAuMiwwLjIKCQkJcy0wLjIsMC4yLTAuMiwwLjJjLTAuMSwwLjEtMC4yLDAuMi0wLjIsMC4zYzAsMC4xLDAuMSwwLjEsMC4xLDAuMmMwLjEsMCwwLjEsMC4xLDAuMiwwLjFjMC4yLDAsMC40LTAuMSwwLjctMC4xCgkJCWMxLjUtMC4zLDIuNy0xLDMuNi0yLjFjMC42LDAuMSwxLjIsMC4yLDEuOCwwLjJjMS40LDAsMi42LTAuMywzLjgtMC44YzEuMS0wLjUsMi4xLTEuMiwyLjctMi4xYzAuNy0wLjksMS0xLjgsMS0yLjkKCQkJQzc1LjUsNC43LDc1LjIsMy43LDc0LjUsMi45eiIvPgoJPC9nPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MjEiIGQ9Ik03NC41LDNjLTAuNy0wLjktMS42LTEuNi0yLjctMi4yQzcwLjYsMC4zLDY5LjQsMCw2OCwwcy0yLjYsMC4zLTMuOCwwLjhDNjMuMSwxLjMsNjIuMiwyLDYxLjUsMwoJCQljLTAuNywwLjktMSwxLjktMSwzYzAsMC45LDAuMiwxLjcsMC43LDIuNWMwLjUsMC44LDEuMSwxLjUsMS45LDJjMCwwLjItMC4xLDAuNS0wLjEsMC43YzAsMC4yLTAuMSwwLjQtMC4xLDAuNQoJCQljMCwwLjEtMC4xLDAuMy0wLjIsMC40Yy0wLjEsMC4xLTAuMSwwLjMtMC4yLDAuM2MwLDAuMS0wLjEsMC4yLTAuMiwwLjNjLTAuMSwwLjEtMC4yLDAuMi0wLjIsMC4yYzAsMC0wLjEsMC4xLTAuMiwwLjIKCQkJYy0wLjEsMC4xLTAuMiwwLjItMC4yLDAuMmMtMC4xLDAuMS0wLjIsMC4zLTAuMiwwLjNjMCwwLjEsMC4xLDAuMSwwLjEsMC4yYzAuMSwwLDAuMSwwLjEsMC4yLDAuMWMwLjIsMCwwLjQtMC4xLDAuNy0wLjEKCQkJYzEuNS0wLjMsMi43LTEuMSwzLjYtMi4xYzAuNiwwLjEsMS4yLDAuMiwxLjgsMC4yYzEuNCwwLDIuNi0wLjMsMy44LTAuOGMxLjEtMC41LDIuMS0xLjMsMi43LTIuMmMwLjctMC45LDEtMS45LDEtMwoJCQlDNzUuNSw0LjksNzUuMiwzLjksNzQuNSwzeiIvPgoJPC9nPgoJPGxpbmUgY2xhc3M9InN0MjIiIHgxPSI2NC41IiB5MT0iNC41IiB4Mj0iNzEuNSIgeTI9IjQuNSIvPgoJPGxpbmUgY2xhc3M9InN0MjIiIHgxPSI2NC41IiB5MT0iNi41IiB4Mj0iNzEuNSIgeTI9IjYuNSIvPgo8L2c+CjxnIGlkPSJycHBRSmUudGlmIj4KCQoJCTxpbWFnZSBzdHlsZT0ib3ZlcmZsb3c6dmlzaWJsZTsiIHdpZHRoPSI5NCIgaGVpZ2h0PSI5NiIgaWQ9IkxheWVyXzBfMV8iIHhsaW5rOmhyZWY9Ijg5NkNFNjY0NEIwQkVGMEYucG5nIiAgdHJhbnNmb3JtPSJtYXRyaXgoMC41IDAgMCAwLjUgMTM3IDMzKSI+Cgk8L2ltYWdlPgo8L2c+Cjwvc3ZnPgo="},e.prototype.createRequestForComments=function(){var e,t=this,i=t.pdfViewerBase.pageCount;t.isCommentsRendered||(20<i?i=20:t.isPageCommentsRendered=!0),this.isCommentsRendered?e={pageStartIndex:20,pageEndIndex:i,hashId:this.pdfViewerBase.hashId,action:"RenderAnnotationComments",elementId:this.pdfViewer.element.id,uniqueId:t.pdfViewerBase.documentId}:(e={pageStartIndex:0,pageEndIndex:i,hashId:this.pdfViewerBase.hashId,action:"RenderAnnotationComments",elementId:this.pdfViewer.element.id,uniqueId:t.pdfViewerBase.documentId},t.isCommentsRendered=!0),this.pdfViewerBase.jsonDocumentId&&(e.documentId=this.pdfViewerBase.jsonDocumentId);var n=this.pdfViewer.serviceUrl+"/"+this.pdfViewer.serverActionSettings.renderComments;t.commentsRequestHandler=new ti(t.pdfViewer),t.commentsRequestHandler.url=n,t.commentsRequestHandler.mode=!0,t.commentsRequestHandler.responseType="text",t.commentsRequestHandler.send(e),t.commentsRequestHandler.onSuccess=function(e){var i=e.data;if(i){if("object"!=typeof i)try{"object"!=typeof(i=JSON.parse(i))&&(i=JSON.parse(i)),"object"!=typeof i&&(t.pdfViewerBase.onControlError(500,i,this.pdfViewer.serverActionSettings.renderComments),i=null)}catch(e){t.pdfViewerBase.onControlError(500,i,this.pdfViewer.serverActionSettings.renderComments),i=null}if(i){var n=!1;if(t.pdfViewerBase.annotationComments?t.pdfViewerBase.annotationComments=i.annotationDetails:(t.pdfViewerBase.annotationComments=i.annotationDetails,n=!0),i.annotationDetails&&i.uniqueId===t.pdfViewerBase.documentId){t.pdfViewer.fireAjaxRequestSuccess(this.pdfViewer.serverActionSettings.renderComments,i),t.isAnnotationRendered=!0;var o=void 0;if(t.pdfViewerBase.documentAnnotationCollections)o=t.updateAnnotationsInDocumentCollections(t.pdfViewerBase.annotationComments,t.pdfViewerBase.documentAnnotationCollections);else{var s=t.pdfViewerBase.createAnnotationsCollection();o=t.updateAnnotationsInDocumentCollections(t.pdfViewerBase.annotationComments,s)}t.pdfViewerBase.annotationComments=o,t.pdfViewerBase.documentAnnotationCollections=o;for(var a=i.startPageIndex;a<i.endPageIndex;a++)i.annotationDetails[a]&&t.renderAnnotationCollections(i.annotationDetails[a],a,n);t.isPageCommentsRendered||(t.isPageCommentsRendered=!0,t.createRequestForComments())}}}},t.commentsRequestHandler.onFailure=function(e){this.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText)},t.commentsRequestHandler.onError=function(e){t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,t.pdfViewer.serverActionSettings.renderComments)}},e.prototype.updateAnnotationsInDocumentCollections=function(e,t){for(var i=0;i<this.pdfViewerBase.pageCount;i++)if(e[i]&&t[i]){if(e[i].textMarkupAnnotation&&0!==e[i].textMarkupAnnotation.length&&t[i].textMarkupAnnotation)for(n=0;n<e[i].textMarkupAnnotation.length;n++)this.updateDocumentAnnotationCollections(e[i].textMarkupAnnotation[n],t[i].textMarkupAnnotation);if(e[i].shapeAnnotation&&0!==e[i].shapeAnnotation.length&&t[i].shapeAnnotation)for(n=0;n<e[i].shapeAnnotation.length;n++)this.updateDocumentAnnotationCollections(e[i].shapeAnnotation[n],t[i].shapeAnnotation);if(e[i].measureShapeAnnotation&&0!==e[i].measureShapeAnnotation.length&&t[i].measureShapeAnnotation)for(n=0;n<e[i].measureShapeAnnotation.length;n++)this.updateDocumentAnnotationCollections(e[i].measureShapeAnnotation[n],t[i].measureShapeAnnotation);if(e[i].stampAnnotations&&0!==e[i].stampAnnotations.length&&t[i].stampAnnotations)for(n=0;n<e[i].stampAnnotations.length;n++)this.updateDocumentAnnotationCollections(e[i].stampAnnotations[n],t[i].stampAnnotations);if(e[i].stickyNotesAnnotation&&0!==e[i].stickyNotesAnnotation.length&&t[i].stickyNotesAnnotation)for(n=0;n<e[i].stickyNotesAnnotation.length;n++)this.updateDocumentAnnotationCollections(e[i].stickyNotesAnnotation[n],t[i].stickyNotesAnnotation);if(e[i].freeTextAnnotation&&0!==e[i].freeTextAnnotation.length&&t[i].freeTextAnnotation)for(n=0;n<e[i].freeTextAnnotation.length;n++)this.updateDocumentAnnotationCollections(e[i].freeTextAnnotation[n],t[i].freeTextAnnotation);if(e[i].signatureAnnotation&&0!==e[i].signatureAnnotation.length&&t[i].signatureAnnotation)for(n=0;n<e[i].signatureAnnotation.length;n++)this.updateDocumentAnnotationCollections(e[i].signatureAnnotation[n],t[i].signatureAnnotation);if(e[i].signatureInkAnnotation&&0!==e[i].signatureInkAnnotation.length&&t[i].signatureInkAnnotation)for(var n=0;n<e[i].signatureInkAnnotation.length;n++)this.updateDocumentAnnotationCollections(e[i].signatureInkAnnotation[n],t[i].signatureInkAnnotation)}return t},e.prototype.updateDocumentAnnotationCollections=function(e,t){if(0===t.length)t.push(e);else{for(var i=!1,n=0;n<t.length;n++)if(e.AnnotName&&t[n].AnnotName&&e.AnnotName===t[n].AnnotName){i=!0;break}i||t.push(e)}},e.prototype.renderAnnotationCollections=function(e,t,i){var n=[];if(e.textMarkupAnnotation&&0!==e.textMarkupAnnotation.length)for(o=0;o<e.textMarkupAnnotation.length;o++)this.pdfViewer.dateTimeFormat&&(e.textMarkupAnnotation[o].ModifiedDate=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.getDateAndTime(e.textMarkupAnnotation[o].ModifiedDate)),n.push(e.textMarkupAnnotation[o]),this.updateCollections(this.pdfViewer.annotationModule.textMarkupAnnotationModule.updateTextMarkupAnnotationCollections(e.textMarkupAnnotation[o],t));if(e.shapeAnnotation&&0!==e.shapeAnnotation.length)for(o=0;o<e.shapeAnnotation.length;o++)this.pdfViewer.dateTimeFormat&&(e.shapeAnnotation[o].ModifiedDate=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.getDateAndTime(e.shapeAnnotation[o].ModifiedDate)),n.push(e.shapeAnnotation[o]),this.updateCollections(this.pdfViewer.annotationModule.shapeAnnotationModule.updateShapeAnnotationCollections(e.shapeAnnotation[o],t));if(e.measureShapeAnnotation&&0!==e.measureShapeAnnotation.length)for(o=0;o<e.measureShapeAnnotation.length;o++)this.pdfViewer.dateTimeFormat&&(e.measureShapeAnnotation[o].ModifiedDate=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.getDateAndTime(e.measureShapeAnnotation[o].ModifiedDate)),n.push(e.measureShapeAnnotation[o]),this.updateCollections(this.pdfViewer.annotationModule.measureAnnotationModule.updateMeasureAnnotationCollections(e.measureShapeAnnotation[o],t));if(e.stampAnnotations&&0!==e.stampAnnotations.length)for(o=0;o<e.stampAnnotations.length;o++)this.pdfViewer.dateTimeFormat&&(e.stampAnnotations[o].ModifiedDate=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.getDateAndTime(e.stampAnnotations[o].ModifiedDate)),n.push(e.stampAnnotations[o]),this.updateCollections(this.pdfViewer.annotationModule.stampAnnotationModule.updateStampAnnotationCollections(e.stampAnnotations[o],t));if(e.stickyNotesAnnotation&&0!==e.stickyNotesAnnotation.length)for(o=0;o<e.stickyNotesAnnotation.length;o++)this.pdfViewer.dateTimeFormat&&(e.stickyNotesAnnotation[o].ModifiedDate=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.getDateAndTime(e.stickyNotesAnnotation[o].ModifiedDate)),n.push(e.stickyNotesAnnotation[o]),this.updateCollections(this.updateStickyNotesAnnotationCollections(e.stickyNotesAnnotation[o],t));if(e.freeTextAnnotation&&0!==e.freeTextAnnotation.length)for(o=0;o<e.freeTextAnnotation.length;o++)this.pdfViewer.dateTimeFormat&&(e.freeTextAnnotation[o].ModifiedDate=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.getDateAndTime(e.freeTextAnnotation[o].ModifiedDate)),n.push(e.freeTextAnnotation[o]),this.updateCollections(this.pdfViewer.annotationModule.freeTextAnnotationModule.updateFreeTextAnnotationCollections(e.freeTextAnnotation[o],t));if(e.signatureAnnotation&&0!==e.signatureAnnotation.length)for(o=0;o<e.signatureAnnotation.length;o++)this.pdfViewer.dateTimeFormat&&(e.signatureAnnotation[o].ModifiedDate=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.getDateAndTime(e.signatureAnnotation[o].ModifiedDate)),this.updateCollections(this.pdfViewerBase.signatureModule.updateSignatureCollections(e.signatureAnnotation[o],t),!0);if(e.signatureInkAnnotation&&0!==e.signatureInkAnnotation.length)for(o=0;o<e.signatureInkAnnotation.length;o++)this.pdfViewer.dateTimeFormat&&(e.signatureInkAnnotation[o].ModifiedDate=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.getDateAndTime(e.signatureInkAnnotation[o].ModifiedDate)),n.push(e.signatureInkAnnotation[o]),this.updateCollections(this.pdfViewer.annotationModule.inkAnnotationModule.updateInkCollections(e.signatureInkAnnotation[o],t));if(this.pdfViewer.toolbarModule&&this.renderAnnotationComments(n,t),i)for(var o=0;o<this.pdfViewerBase.renderedPagesList.length;o++)this.pdfViewerBase.renderAnnotations(this.pdfViewerBase.renderedPagesList[o])},e.prototype.updateCollections=function(e,t){var i,n=!1;if((i=t?this.pdfViewer.signatureCollection:this.pdfViewer.annotationCollection)&&e)for(var o=0;o<i.length;o++)if(t){if(i[o].signatureName===e.signatureName){n=!0;break}}else if(i[o].annotationId===e.annotationId){n=!0;break}!n&&e&&(t?this.pdfViewer.signatureCollection.push(e):this.pdfViewer.annotationCollection.push(e))},e.prototype.renderAnnotationComments=function(e,t){if(t+=1,e&&0!==e.length){this.createPageAccordion(t);for(var i=0;i<e.length;i++)e[i].AnnotName&&1===e[i].AnnotName.split("freeText").length&&this.createCommentControlPanel(e[i],t);var n=document.querySelectorAll(".e-pv-new-comments-div");if(n)for(var o=0;o<n.length;o++)n[o].style.display="none"}},e.prototype.initializeAcccordionContainer=function(){var e=t.createElement("div",{id:this.pdfViewer.element.id+"_commentsPanelText",className:"e-pv-comments-panel-text"});e.textContent=this.pdfViewer.localeObj.getConstant("No Comments Yet"),this.updateCommentPanelTextTop(),this.pdfViewerBase.navigationPane.commentsContentContainer.appendChild(e),this.accordionContentContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_accordionContentContainer",className:"e-pv-accordion-content-container"}),this.pdfViewerBase.navigationPane.commentsContentContainer.appendChild(this.accordionContentContainer),this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export Annotations")],!1),this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export XFDF")],!1)},e.prototype.updateCommentPanelTextTop=function(){var e=document.getElementById(this.pdfViewer.element.id+"_commentsPanelText");this.pdfViewerBase.navigationPane.commentPanelContainer&&this.pdfViewerBase.navigationPane.commentPanelContainer.clientHeight&&"none"!==e.style.display&&(e.style.paddingTop=this.pdfViewerBase.navigationPane.commentPanelContainer.clientHeight/2-47+"px",e.style.paddingLeft=this.pdfViewerBase.navigationPane.commentPanelContainer.clientWidth/3+"px")},e.prototype.createPageAccordion=function(e){if(null===document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+e)&&this.pdfViewer.enableCommentPanel)return this.accordionContent=t.createElement("div",{id:this.pdfViewer.element.id+"_accordioncontent"+e}),this.accordionContent.style.zIndex="1000",this.accordionPageContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_accordionPageContainer"+e,className:"e-pv-accordion-page-container"}),this.accordionPageContainer.appendChild(this.accordionContent),this.pdfViewerBase.viewerMainContainer.appendChild(this.accordionPageContainer),this.accordionContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_accordionContainer"+e,className:"e-pv-accordion-container"}),new r.Accordion({items:[{header:this.pdfViewer.localeObj.getConstant("Page")+" "+e,expanded:!0,content:"#"+this.pdfViewer.element.id+"_accordioncontent"+e}]}).appendTo(this.accordionContainer),this.accordionContainer.style.order="pageIndex",this.alignAccordionContainer(this.accordionContainer,e),document.getElementById(this.pdfViewer.element.id+"_commentsPanelText")&&(this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export Annotations")],!0),this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export XFDF")],!0),document.getElementById(this.pdfViewer.element.id+"_commentsPanelText").style.display="none"),document.getElementById(this.pdfViewer.element.id+"_accordionContentContainer")&&(document.getElementById(this.pdfViewer.element.id+"_accordionContentContainer").style.display="block"),this.accordionContainer},e.prototype.alignAccordionContainer=function(e,t){var i=!0;if(this.accordionContentContainer){if(this.isAccordionContainer)this.accordionContentContainer.appendChild(e),i=!1;else for(var n=1;n<=this.pdfViewerBase.pageCount;n++){var o=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+n);if(o&&t<n){this.accordionContentContainer.insertBefore(e,o),i=!1;break}}i&&(this.accordionContentContainer.appendChild(e),i=!1),this.isAccordionContainer=!1}},e.prototype.updateCommentPanelScrollTop=function(e){var t=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+e);if(t){var i=t.offsetTop+t.clientTop-35;this.pdfViewerBase.navigationPane.commentsContentContainer.scrollTop=i}},e.prototype.createCommentControlPanel=function(e,i,n,o){var s=document.getElementById(this.pdfViewer.element.id+"_accordioncontent"+i);if(s){var r=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+i);r&&r.ej2_instances[0].expandItem(!0),this.commentsContainer=t.createElement("div",{id:this.pdfViewer.element.id+"commentscontainer"+i+"_"+this.commentsCount,className:"e-pv-comments-container"}),this.commentsContainer.accessKey=i.toString();var l=!1;if(e){if(this.commentsContainer.id=e.AnnotName,e.AnnotName)for(L=0;L<s.childElementCount;L++)if(s.children[L].id===e.AnnotName){l=!0;break}e.Name&&"freeText"===e.Name?this.commentsContainer.setAttribute("name","freeText"):this.commentsContainer.setAttribute("name",e.AnnotType)}n&&this.commentsContainer.setAttribute("name",n),this.commentsContainer.addEventListener("mousedown",this.commentsAnnotationSelect.bind(this));var d=t.createElement("div",{id:this.pdfViewer.element.id+"_commentdiv"+i+"_"+this.commentsCount,className:"e-pv-comments-div"});this.commentsCount=this.commentsCount+1,this.commentsContainer.appendChild(d),this.updateCommentPanelScrollTop(i),l||s.appendChild(this.commentsContainer);var u=void 0;e?(u=this.commentsContainer.getAttribute("name"),this.createTitleContainer(d,u,e.Subject,e.ModifiedDate,e.Author)):(u=this.commentsContainer.getAttribute("name"),this.createTitleContainer(d,u,o));var M=t.createElement("div",{id:this.pdfViewer.element.id+"_commenttextbox",className:"e-pv-comment-textbox"}),p=new a.InPlaceEditor({mode:"Inline",type:"Text",model:{placeholder:this.pdfViewer.localeObj.getConstant("Add a comment")+".."},emptyText:"",editableOn:"EditIconClick",saveButton:{content:this.pdfViewer.localeObj.getConstant("Post"),cssClass:"e-outline",disabled:!0},cancelButton:{content:this.pdfViewer.localeObj.getConstant("Cancel"),cssClass:"e-outline"},submitOnEnter:!0});p.appendTo(M);for(var h=document.querySelectorAll(".e-editable-inline"),L=0;L<h.length;L++)h[L].style.display="none";if(e||(p.enableEditMode=!0),M.addEventListener("keydown",function(e){p.element.querySelector(".e-btn-save")&&(""!==e.srcElement.value?p.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!1:p.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!0)}),p.actionSuccess=this.createCommentDiv.bind(this,p),d.appendChild(M),e){if(p.value=e.Note,this.checkIslockProperty(e)&&null==e.Comments&&this.createCommentDiv(this.commentsContainer),"freeText"===e.Name&&(p.value=e.MarkupText),e.State){var w=t.createElement("div",{id:this.pdfViewer.element.id+"status_container",className:"e-pv-status-container"}),c=t.createElement("div",{id:this.pdfViewer.element.id+"status_div",className:"e-pv-status-div"}),C=t.createElement("span",{id:this.pdfViewer.element.id+"status_icon"});c.appendChild(C),w.appendChild(c),d.appendChild(w),this.updateStatusContainer(e.State,C,c,w)}if(e.Comments){for(L=0;L<e.Comments.length;L++)this.renderComments(e.Comments[L],this.commentsContainer);" "!==e.Note&&""!==e.Note&&null!==e.Note&&this.createCommentDiv(this.commentsContainer)}}return this.isNewcommentAdded=!0,d.addEventListener("click",this.commentsDivClickEvent.bind(this)),d.addEventListener("mouseover",this.commentDivMouseOver.bind(this)),d.addEventListener("mouseleave",this.commentDivMouseLeave.bind(this)),d.addEventListener("mouseout",this.commentDivMouseLeave.bind(this)),d.addEventListener("focusout",this.commentDivMouseLeave.bind(this)),M.addEventListener("dblclick",this.openEditorElement.bind(this)),M.addEventListener("focusin",this.commentDivFocus.bind(this)),this.commentsContainer.id}return""},e.prototype.commentDivFocus=function(e){var t=this,i=this.pdfViewerBase.currentPageNumber;setTimeout(function(){t.updateScrollPosition(i)},500)},e.prototype.updateScrollPosition=function(e){var t=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+e);if(t&&this.isNewcommentAdded){var i=0,n=document.querySelectorAll(".e-editable-inline");n[0]&&(i=n[0].getBoundingClientRect().height);var o=t.offsetTop+t.clientTop+i;this.pdfViewerBase.navigationPane.commentsContentContainer.scrollTop<o&&(this.pdfViewerBase.navigationPane.commentsContentContainer.scrollTop=o),this.isNewcommentAdded=!1}},e.prototype.updateCommentsScrollTop=function(e){var t=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+this.pdfViewerBase.currentPageNumber),i=document.querySelector(".e-pv-comments-border"),n=0;if(t&&i){n=i.getBoundingClientRect().height;var o=void 0;o=e?t.offsetTop+i.offsetTop+n/4:t.offsetTop+i.offsetTop-70,this.pdfViewerBase.navigationPane.commentsContentContainer.scrollTop=o}},e.prototype.createCommentDiv=function(e){var i,n,o=this,s=t.createElement("div",{id:this.pdfViewer.element.id+"_newcommentdiv"+this.commentsCount,className:"e-pv-new-comments-div"});e.localName?i=e:(i=e.valueEle.parentElement.parentElement.parentElement.parentElement,n=e.valueEle.parentElement.parentElement.previousSibling.childNodes[1]);var r=new a.InPlaceEditor({mode:"Inline",type:"Text",value:"",editableOn:"Click",model:{placeholder:this.pdfViewer.localeObj.getConstant("Add a reply")+".."},emptyText:this.pdfViewer.localeObj.getConstant("Add a reply"),saveButton:{content:this.pdfViewer.localeObj.getConstant("Post"),cssClass:"e-outline",disabled:!0},cancelButton:{content:this.pdfViewer.localeObj.getConstant("Cancel"),cssClass:"e-outline"},submitOnEnter:!0});if(r.appendTo(s),s.lastChild.firstChild.click(),s.addEventListener("keydown",function(e){r.element.querySelector(".e-btn-save")&&(""!==e.srcElement.value?r.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!1:(r.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!0,r.enableEditMode=!0))}),e.valueEle){if(null!=e.value&&""!==e.value&&" "!==e.value){if(this.pdfViewer.selectedItems.annotations[0]&&"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType)this.modifyTextProperty(e.value,e.prevValue,e.valueEle.parentNode.parentNode.parentNode.parentNode.id);else try{this.modifyTextProperty(e.value,e.prevValue,e.valueEle.parentNode.parentNode.parentNode.parentNode.id)}catch(t){this.modifyTextProperty(e.value,e.prevValue)}this.updateModifiedDate(n)}1===e.valueEle.parentElement.parentElement.parentElement.parentElement.childElementCount&&null!=e.value&&""!==e.value&&" "!==e.value&&(i.appendChild(s),setTimeout(function(){o.updateCommentsScrollTop(!0)},50))}else i.appendChild(s),setTimeout(function(){o.updateCommentsScrollTop(!0)},50);r.actionSuccess=this.saveCommentDiv.bind(this,r)},e.prototype.saveCommentDiv=function(e,i){var n,o,s,r;if(i.name&&""!==e.value?(n=e.valueEle.parentElement.parentElement.parentElement,s=e.valueEle.parentElement.parentElement,r=e.value):(s=(n=e).lastChild,r=i),n&&s){n.removeChild(s);var l=t.createElement("div",{id:this.pdfViewer.element.id+"_replytextbox"});this.commentsreplyCount=this.commentsreplyCount+1;var d=t.createElement("div",{id:this.pdfViewer.element.id+"replyDiv"+this.commentsreplyCount,className:"e-pv-reply-div"});d.id=this.pdfViewer.annotation.createGUID(),o=n.getAttribute("author"),this.createReplyDivTitleContainer(d,null,o),d.addEventListener("mouseover",this.commentDivMouseOver.bind(this)),d.addEventListener("mouseleave",this.commentDivMouseLeave.bind(this)),d.addEventListener("click",this.commentDivOnSelect.bind(this)),l.addEventListener("dblclick",this.openEditorElement.bind(this)),d.style.border="1px",d.style.borderColor="black",d.style.zIndex=1002;var u=new a.InPlaceEditor({mode:"Inline",type:"Text",emptyText:"",editableOn:"EditIconClick",model:{placeholder:this.pdfViewer.localeObj.getConstant("Add a reply")+".."},value:r,saveButton:{content:this.pdfViewer.localeObj.getConstant("Post"),cssClass:"e-outline"},cancelButton:{content:this.pdfViewer.localeObj.getConstant("Cancel"),cssClass:"e-outline"}});u.appendTo(l),u.actionSuccess=this.modifyProperty.bind(this,u),d.appendChild(l),d.style.paddingLeft="24px",n.appendChild(d),l.addEventListener("keydown",function(e){u.element.querySelector(".e-btn-save")&&(""!==e.srcElement.value?u.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!1:u.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!0)}),d.addEventListener("click",this.commentsDivClickEvent.bind(this)),d.addEventListener("dblclick",this.commentsDivDoubleClickEvent.bind(this)),this.createCommentDiv(d.parentElement),this.modifyCommentsProperty(r,d.id,n.id)}},e.prototype.renderComments=function(e,i,n,o,s){var r,l=t.createElement("div",{id:this.pdfViewer.element.id+"_replytextbox"});this.commentsreplyCount=this.commentsreplyCount+1;var d=t.createElement("div",{id:"replyDiv"+this.commentsreplyCount,className:"e-pv-reply-div"});n?(d.id=e.annotName,r=e.author):(d.id=e.AnnotName,r=e.Author),d.style.border="1px",d.style.borderColor="black",r||(r=i.getAttribute("author")),n?void 0!==e.modifiedDate?this.createReplyDivTitleContainer(d,e.modifiedDate,r):this.createReplyDivTitleContainer(d,null,r):this.createReplyDivTitleContainer(d,e.ModifiedDate,r),d.addEventListener("mouseover",this.commentDivMouseOver.bind(this)),d.addEventListener("mouseleave",this.commentDivMouseLeave.bind(this)),d.addEventListener("click",this.commentDivOnSelect.bind(this)),l.addEventListener("dblclick",this.openEditorElement.bind(this));var u=new a.InPlaceEditor({mode:"Inline",type:"Text",emptyText:"",editableOn:"EditIconClick",model:{placeholder:this.pdfViewer.localeObj.getConstant("Add a reply")+".."},value:"",saveButton:{content:this.pdfViewer.localeObj.getConstant("Post"),cssClass:"e-outline"},cancelButton:{content:this.pdfViewer.localeObj.getConstant("Cancel"),cssClass:"e-outline"}});if(u.value=n?e.note:e.Note,u.appendTo(l),d.appendChild(l),n&&(e.State=e.state),e.State){var M=t.createElement("div",{id:this.pdfViewer.element.id+"status_container",className:"e-pv-status-container"}),p=t.createElement("div",{id:this.pdfViewer.element.id+"status_div",className:"e-pv-status-div"}),h=t.createElement("span",{id:this.pdfViewer.element.id+"status_icon"});p.appendChild(h),M.appendChild(p),d.appendChild(M),this.updateStatusContainer(e.State,h,p,M)}if(d.style.paddingLeft="24px",l.addEventListener("keydown",function(e){u.element.querySelector(".e-btn-save")&&(""!==e.srcElement.value?u.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!1:u.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!0)}),n)if(s)i.appendChild(d);else{var L=document.getElementById(o);e.position?L.insertBefore(d,L.childNodes[e.position]):L&&(L.childElementCount>1?L.insertBefore(d,L.childNodes[L.childElementCount-1]):i.appendChild(d))}else i.appendChild(d);d.addEventListener("click",this.commentsDivClickEvent.bind(this)),d.addEventListener("dblclick",this.commentsDivDoubleClickEvent.bind(this)),u.actionSuccess=this.modifyProperty.bind(this,u)},e.prototype.createCommentsContainer=function(e,i,n){var o=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+i);if(!o){var s=document.getElementById(this.pdfViewer.element.id+"_accordionPageContainer"+i);s&&s.remove(),(o=this.createPageAccordion(i))&&o.ej2_instances[0].expandItem(!0)}var r=document.getElementById(this.pdfViewer.element.id+"_accordioncontent"+i);this.commentsContainer=t.createElement("div",{id:this.pdfViewer.element.id+"commentscontainer"+i+"_"+this.commentsCount,className:"e-pv-comments-container"}),this.commentsContainer.accessKey=i.toString(),e&&(this.commentsContainer.id=e.annotName),this.commentsContainer.addEventListener("mousedown",this.commentsAnnotationSelect.bind(this));var l=t.createElement("div",{id:this.pdfViewer.element.id+"_commentdiv"+i+"_"+this.commentsCount,className:"e-pv-comments-div"});if(this.commentsCount=this.commentsCount+1,this.commentsContainer.appendChild(l),this.updateCommentPanelScrollTop(i),e&&r&&(e.position||0===e.position?r.insertBefore(this.commentsContainer,r.children[e.position]):r.appendChild(this.commentsContainer)),e&&r)if(e.indent)this.commentsContainer.setAttribute("name","shape_measure"),this.createTitleContainer(l,"shape_measure",e.subject,e.modifiedDate,e.author);else if("sticky"===e.shapeAnnotationType||"stamp"===e.shapeAnnotationType){var d=this.createTitleContainer(l,e.shapeAnnotationType,null,e.modifiedDate,e.author);this.commentsContainer.setAttribute("name",d),"sticky"===d&&(n||this.addStickyNotesAnnotations(i-1,e))}else"textMarkup"===e.shapeAnnotationType?(this.commentsContainer.setAttribute("name","textMarkup"),this.createTitleContainer(l,"textMarkup",e.subject,e.modifiedDate,e.author)):"FreeText"===e.shapeAnnotationType?(e.note=e.dynamicText,this.commentsContainer.setAttribute("name","freetext"),this.createTitleContainer(l,"freeText",e.subject,e.modifiedDate)):"Ink"===e.shapeAnnotationType?(e.note=e.dynamicText,this.commentsContainer.setAttribute("name","ink"),this.createTitleContainer(l,"ink",e.subject,e.modifiedDate)):(this.commentsContainer.setAttribute("name","shape"),"Line"===e.shapeAnnotationType?this.createTitleContainer(l,"shape",e.subject,e.modifiedDate,e.author):this.createTitleContainer(l,"shape",e.shapeAnnotationType,e.modifiedDate,e.author));var u=t.createElement("div",{id:this.pdfViewer.element.id+"_commenttextbox",className:"e-pv-comment-textbox"}),M=new a.InPlaceEditor({mode:"Inline",type:"Text",model:{placeholder:this.pdfViewer.localeObj.getConstant("Add a comment")+".."},emptyText:"",editableOn:"EditIconClick",saveButton:{content:this.pdfViewer.localeObj.getConstant("Post"),cssClass:"e-outline",disabled:!0},cancelButton:{content:this.pdfViewer.localeObj.getConstant("Cancel"),cssClass:"e-outline"},submitOnEnter:!0});M.appendTo(u);for(var p=document.querySelectorAll(".e-editable-inline"),h=0;h<p.length;h++)p[h].style.display="none";if(u.addEventListener("keydown",function(e){M.element.querySelector(".e-btn-save")&&(""!==e.srcElement.value?M.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!1:M.element.querySelector(".e-btn-save").ej2_instances[0].disabled=!0)}),M.actionSuccess=this.createCommentDiv.bind(this,M),l.appendChild(u),e){if(M.value=e.note,e.state){var L=t.createElement("div",{id:this.pdfViewer.element.id+"status_container",className:"e-pv-status-container"}),w=t.createElement("div",{id:this.pdfViewer.element.id+"status_div",className:"e-pv-status-div"}),c=t.createElement("span",{id:this.pdfViewer.element.id+"status_icon"});w.appendChild(c),L.appendChild(w),l.appendChild(L),this.updateStatusContainer(e.state,c,w,L)}if(e.comments){for(h=0;h<e.comments.length;h++)this.renderComments(e.comments[h],this.commentsContainer,!0,null,!0);e.comments.length>0&&this.createCommentDiv(this.commentsContainer)}}return l.addEventListener("click",this.commentsDivClickEvent.bind(this)),l.addEventListener("mouseover",this.commentDivMouseOver.bind(this)),l.addEventListener("mouseleave",this.commentDivMouseLeave.bind(this)),l.addEventListener("mouseout",this.commentDivMouseLeave.bind(this)),l.addEventListener("focusout",this.commentDivMouseLeave.bind(this)),u.addEventListener("dblclick",this.openEditorElement.bind(this)),this.commentsContainer.id},e.prototype.modifyProperty=function(e){var t=e.element.parentElement.id,i=e.element.parentElement.parentElement.id,n=e.element.previousSibling.firstChild;this.updateModifiedDate(n),this.modifyCommentsProperty(e.value,t,i,e.prevValue)},e.prototype.createTitleContainer=function(e,i,n,o,s){var a;"stamp"===i||"Stamp"===i?a="stamp":"shape"===i||"Line"===i||"Radius"===i||"Rectangle"===i||"Ellipse"===i||"Polygon"===i||"LineWidthArrowHead"===i||"Square"===i||"Circle"===i?a="shape":"textMarkup"===i?a="textMarkup":"freeText"===i?a="freeText":"sticky"===i||"StickyNotes"===i?a="sticky":"measure"===i||"shape_measure"===i?a="measure":"ink"===i&&(a="ink");var r=t.createElement("div",{id:this.pdfViewer.element.id+"_commentTitleConatiner",className:"e-pv-comment-title-container"}),l=t.createElement("span",{id:this.pdfViewer.element.id+"_commenttype_icon"});l.style.opacity="0.6",this.updateCommentIcon(l,a,n);var d;d=s||this.pdfViewer.annotationModule.updateAnnotationAuthor(a,n),l.style.padding="8px",l.style.cssFloat="left",r.appendChild(l);var u=t.createElement("div",{id:this.pdfViewer.element.id+"_commentTitle",className:"e-pv-comment-title"});u.textContent=o?d+" - "+this.setExistingAnnotationModifiedDate(o):d+" - "+this.setModifiedDate(),r.appendChild(u);var M=t.createElement("button",{id:this.pdfViewer.element.id+"_more-options",className:"e-pv-more-options-button e-btn",attrs:{tabindex:"-1"}});M.style.visibility="hidden",M.style.zIndex="1001",M.setAttribute("type","button");var p=t.createElement("span",{id:this.pdfViewer.element.id+"_more-options_icon",className:"e-pv-more-icon e-pv-icon"});M.appendChild(p),p.style.opacity="0.87",r.appendChild(M),e.appendChild(r);var h=e.parentElement;if(h){var L=this.pdfViewer.annotationModule.updateAnnotationAuthor(a,n);h.setAttribute("author",L)}return this.isCreateContextMenu||this.createCommentContextMenu(),this.isCreateContextMenu=!0,r.addEventListener("dblclick",this.openTextEditor.bind(this)),M.addEventListener("mouseup",this.moreOptionsClick.bind(this)),a},e.prototype.createReplyDivTitleContainer=function(e,i,n){var o=t.createElement("div",{id:this.pdfViewer.element.id+"_replyTitleConatiner",className:"e-pv-reply-title-container"}),s=t.createElement("div",{id:this.pdfViewer.element.id+"_replyTitle",className:"e-pv-reply-title"});s.textContent=i?n+" - "+this.setExistingAnnotationModifiedDate(i):n+" - "+this.setModifiedDate(),o.appendChild(s);var a=t.createElement("button",{id:this.pdfViewer.element.id+"_more-options",className:"e-pv-more-options-button e-btn",attrs:{tabindex:"-1"}});a.style.visibility="hidden",a.style.zIndex="1001",a.setAttribute("type","button");var r=t.createElement("span",{id:this.pdfViewer.element.id+"_more-options_icon",className:"e-pv-more-icon e-pv-icon"});a.appendChild(r),r.style.opacity="0.87",o.appendChild(a),e.appendChild(o),o.addEventListener("dblclick",this.openTextEditor.bind(this)),a.addEventListener("mouseup",this.moreOptionsClick.bind(this))},e.prototype.updateCommentIcon=function(e,t,i){"sticky"===t?e.className="e-pv-comment-icon e-pv-icon":"stamp"===t?e.className="e-pv-stamp-icon e-pv-icon":"shape"===t?e.className="Line"===i?"e-pv-shape-line-icon e-pv-icon":"LineWidthArrowHead"===i||"Arrow"===i?"e-pv-shape-arrow-icon e-pv-icon":"Circle"===i||"Ellipse"===i||"Oval"===i?"e-pv-shape-circle-icon e-pv-icon":"Rectangle"===i||"Square"===i?"e-pv-shape-rectangle-icon e-pv-icon":"Polygon"===i?"e-pv-shape-pentagon-icon e-pv-icon":"e-pv-annotation-shape-icon e-pv-icon":"measure"===t?e.className="Distance"===i||"Distance calculation"===i?"e-pv-calibrate-distance-icon e-pv-icon":"Perimeter"===i||"Perimeter calculation"===i?"e-pv-calibrate-perimeter-icon e-pv-icon":"Radius"===i||"Radius calculation"===i?"e-pv-calibrate-radius-icon e-pv-icon":"Area"===i||"Area calculation"===i?"e-pv-calibrate-area-icon e-pv-icon":"Volume"===i||"Volume calculation"===i?"e-pv-calibrate-volume-icon e-pv-icon":"e-pv-annotation-calibrate-icon e-pv-icon":"textMarkup"===t?e.className="Highlight"===i?"e-pv-highlight-icon e-pv-icon":"Underline"===i?"e-pv-underline-icon e-pv-icon":"Strikethrough"===i?"e-pv-strikethrough-icon e-pv-icon":"e-pv-annotation-icon e-pv-icon":"freeText"===t?e.className="e-pv-freetext-icon e-pv-icon":"ink"!==t&&"Ink"!==i||(e.className="e-pv-inkannotation-icon e-pv-icon")},e.prototype.updateStatusContainer=function(e,t,i,n){"Accepted"===e?(i.style.backgroundColor="rgb(24,169,85)",t.className="e-pv-accepted-icon"):"Completed"===e?(i.style.backgroundColor="rgb(0,122,255)",t.className="e-pv-completed-icon"):"Cancelled"===e?(i.style.backgroundColor="rgb(245,103,0)",t.className="e-pv-cancelled-icon"):"Rejected"===e?(i.style.backgroundColor="rgb(255,59,48)",t.className="e-pv-rejected-icon"):(t.className="",n.remove())},e.prototype.updateAccordionContainer=function(e){var t=parseInt(e.accessKey),i=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+t);i&&i.remove();var n=document.getElementById(this.pdfViewer.element.id+"_accordionContentContainer");n&&0===n.childElementCount&&(n.style.display="none",document.getElementById(this.pdfViewer.element.id+"_commentsPanelText")&&(this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export Annotations")],!1),this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export XFDF")],!1),document.getElementById(this.pdfViewer.element.id+"_commentsPanelText").style.display="block",this.updateCommentPanelTextTop()))},e.prototype.createCommentContextMenu=function(){this.commentContextMenu=[{text:this.pdfViewer.localeObj.getConstant("Edit")},{text:this.pdfViewer.localeObj.getConstant("Delete Context")},{text:this.pdfViewer.localeObj.getConstant("Set Status"),items:[{text:this.pdfViewer.localeObj.getConstant("None")},{text:this.pdfViewer.localeObj.getConstant("Accepted")},{text:this.pdfViewer.localeObj.getConstant("Cancelled")},{text:this.pdfViewer.localeObj.getConstant("Completed")},{text:this.pdfViewer.localeObj.getConstant("Rejected")}]}];var e=t.createElement("ul",{id:this.pdfViewer.element.id+"_comment_context_menu"});this.pdfViewer.element.appendChild(e),this.commentMenuObj=new r.ContextMenu({target:"#"+this.pdfViewer.element.id+"_more-options",items:this.commentContextMenu,beforeOpen:this.contextMenuBeforeOpen.bind(this),select:this.commentMenuItemSelect.bind(this)}),this.pdfViewer.enableRtl&&(this.commentMenuObj.enableRtl=!0),this.commentMenuObj.appendTo(e),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.commentMenuObj.animationSettings.effect="ZoomIn":this.commentMenuObj.animationSettings.effect="SlideDown"},e.prototype.contextMenuBeforeOpen=function(e){var t,i=document.querySelectorAll("#"+this.pdfViewer.element.id+"_more-options");if(i)for(var n=0;n<i.length;n++)"visible"===i[n].style.visibility&&(t=i[n].parentElement.nextSibling);this.checkIslockProperty(t)?(this.commentMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Edit")],!1),this.commentMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Delete Context")],!1)):(this.commentMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Edit")],!0),this.commentMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Delete Context")],!0))},e.prototype.commentMenuItemSelect=function(e){var i,n=document.querySelectorAll("#"+this.pdfViewer.element.id+"_more-options");if(n){for(s=0;s<n.length;s++)"visible"===n[s].style.visibility&&(i=n[s].parentElement.nextSibling);if(e.item)switch(e.item.text){case this.pdfViewer.localeObj.getConstant("Edit"):for(var o=document.querySelectorAll(".e-pv-new-comments-div"),s=0;s<o.length;s++)o[s].style.display="none";i.ej2_instances[0].enableEditMode=!0;break;case this.pdfViewer.localeObj.getConstant("Delete Context"):i.parentElement.parentElement.firstChild===i.parentElement?this.pdfViewer.annotationModule.deleteAnnotation():this.modifyCommentDeleteProperty(i.parentElement.parentElement,i.parentElement);break;case this.pdfViewer.localeObj.getConstant("Set Status"):break;case this.pdfViewer.localeObj.getConstant("Accepted"):i.parentElement.lastChild.id===this.pdfViewer.element.id+"status_container"&&i.parentElement.lastChild.remove();var a=t.createElement("div",{id:this.pdfViewer.element.id+"status_container",className:"e-pv-status-container"}),r=t.createElement("div",{id:this.pdfViewer.element.id+"status_div",className:"e-pv-status-div"}),l=t.createElement("span",{id:this.pdfViewer.element.id+"status_icon",className:"e-pv-accepted-icon"});r.style.backgroundColor="rgb(24,169,85)",r.appendChild(l),a.appendChild(r),i.parentElement.appendChild(a),this.modifyStatusProperty("Accepted",i.parentElement);break;case this.pdfViewer.localeObj.getConstant("Completed"):i.parentElement.lastChild.id===this.pdfViewer.element.id+"status_container"&&i.parentElement.lastChild.remove();var d=t.createElement("div",{id:this.pdfViewer.element.id+"status_container",className:"e-pv-status-container"}),u=t.createElement("div",{id:this.pdfViewer.element.id+"status_div",className:"e-pv-status-div"}),M=t.createElement("span",{id:this.pdfViewer.element.id+"status_icon",className:"e-pv-completed-icon"});u.style.backgroundColor="rgb(0,122,255)",u.appendChild(M),d.appendChild(u),i.parentElement.appendChild(d),this.modifyStatusProperty("Completed",i.parentElement);break;case this.pdfViewer.localeObj.getConstant("Cancelled"):i.parentElement.lastChild.id===this.pdfViewer.element.id+"status_container"&&i.parentElement.lastChild.remove();var p=t.createElement("div",{id:this.pdfViewer.element.id+"status_container",className:"e-pv-status-container"}),h=t.createElement("div",{id:this.pdfViewer.element.id+"status_div",className:"e-pv-status-div"}),L=t.createElement("span",{id:this.pdfViewer.element.id+"status_icon",className:"e-pv-cancelled-icon"});h.style.backgroundColor="rgb(245,103,0)",h.appendChild(L),p.appendChild(h),i.parentElement.appendChild(p),this.modifyStatusProperty("Cancelled",i.parentElement);break;case this.pdfViewer.localeObj.getConstant("Rejected"):i.parentElement.lastChild.id===this.pdfViewer.element.id+"status_container"&&i.parentElement.lastChild.remove();var w=t.createElement("div",{id:this.pdfViewer.element.id+"status_container",className:"e-pv-status-container"}),c=t.createElement("div",{id:this.pdfViewer.element.id+"status_div",className:"e-pv-status-div"}),C=t.createElement("span",{id:this.pdfViewer.element.id+"status_icon",className:"e-pv-rejected-icon"});c.style.backgroundColor="rgb(255,59,48)",c.appendChild(C),w.appendChild(c),i.parentElement.appendChild(w),this.modifyStatusProperty("Rejected",i.parentElement);break;case this.pdfViewer.localeObj.getConstant("None"):i.parentElement.lastChild.id===this.pdfViewer.element.id+"status_container"&&i.parentElement.lastChild.remove(),this.modifyStatusProperty("None",i.parentElement)}}},e.prototype.moreOptionsClick=function(e,t){if("block"!==document.getElementById(this.pdfViewer.element.id+"_comment_context_menu").style.display&&("e-pv-more-options-button e-btn"===e.currentTarget.className&&e.currentTarget.parentElement.nextSibling.lastChild.firstChild.click(),this.pdfViewer.annotationModule.checkContextMenuDeleteItem(this.commentMenuObj),this.commentMenuObj.open(e.clientY,e.clientX,e.currentTarget)),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var i=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(i)}},e.prototype.openTextEditor=function(e){for(var t=document.querySelectorAll(".e-pv-new-comments-div"),i=0;i<t.length;i++)t[i].style.display="none";if(this.checkIslockProperty(e.currentTarget.nextSibling))e.currentTarget.nextSibling.ej2_instances[0].enableEditMode=!1;else if(e.currentTarget.parentElement.parentElement){var n=this.checkAnnotationSettings(e.currentTarget.parentElement.parentElement.id);if(n){var o=this.findAnnotationObject(e.currentTarget.parentElement.parentElement.id);this.pdfViewer.annotationModule.checkAllowedInteractions("Select",o)&&(n=!1)}n||(e.currentTarget.nextSibling.ej2_instances[0].enableEditMode=!0)}else e.currentTarget.nextSibling.ej2_instances[0].enableEditMode=!0},e.prototype.checkIslockProperty=function(e){var t,i=this.pdfViewer.annotationCollection;if(e.IsCommentLock)return!0;this.pdfViewer.annotationModule.textMarkupAnnotationModule&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?t=this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation:this.pdfViewer.selectedItems.annotations[0]&&(t=this.pdfViewer.selectedItems.annotations[0]);for(var n=0;n<i.length;n++){var o=i[n].note?i[n].note:i[n].notes;if(!0===i[n].isCommentLock&&(e.textContent===o||i[n].dynamicText===e.textContent))return!0;for(var s=0;s<i[n].comments.length;s++)if(t&&i[n].annotationId===t.annotName&&!0===i[n].comments[s].isLock&&e.textContent===i[n].comments[s].note)return!0}return!1},e.prototype.openEditorElement=function(e){for(var t=document.querySelectorAll(".e-pv-new-comments-div"),i=0;i<t.length;i++)t[i].style.display="none";if(this.checkIslockProperty(e.currentTarget))e.currentTarget.ej2_instances[0].enableEditMode=!1;else if(e.currentTarget.parentElement.parentElement){var n=this.checkAnnotationSettings(e.currentTarget.parentElement.parentElement.id);if(n){var o=this.findAnnotationObject(e.currentTarget.parentElement.parentElement.id);this.pdfViewer.annotationModule.checkAllowedInteractions("Select",o)&&(n=!1)}n||(this.pdfViewer.selectedItems.annotations[0].isReadonly?e.currentTarget.ej2_instances[0].enableEditMode=!1:e.currentTarget.ej2_instances[0].enableEditMode=!0)}else e.currentTarget.ej2_instances[0].enableEditMode=!0},e.prototype.commentsDivClickEvent=function(e){var t=this.findAnnotationObject(e.currentTarget.parentElement.id),i=this.checkAnnotationSettings(e.currentTarget.parentElement.id);if(i&&this.pdfViewer.annotationModule.checkAllowedInteractions("Select",t)&&(i=!1),!i){var n=!1;if(0===e.clientX&&0===e.clientY?this.isSetAnnotationType=!0:this.isSetAnnotationType=!1,"e-pv-more-icon e-pv-icon"===e.target.className)return null;for(var o=document.querySelectorAll("#"+this.pdfViewer.element.id+"_more-options"),s=0;s<o.length;s++)o[s].style.visibility="hidden";"none"===document.getElementById(this.pdfViewer.element.id+"_commantPanel").style.display&&this.pdfViewer.annotationModule.showCommentsPanel(),e.currentTarget.parentElement.classList.contains("e-pv-comments-border")&&(n=!0),e.currentTarget.firstChild.lastChild.style.visibility="visible";var a=document.querySelectorAll(".e-pv-comments-border");if(a)for(var r=0;r<a.length;r++)a[r].classList.remove("e-pv-comments-border");e.currentTarget.parentElement.classList.add("e-pv-comments-border");for(var l=document.querySelectorAll(".e-pv-new-comments-div"),s=0;s<l.length;s++)l[s].style.display="none";var d=e.currentTarget.parentElement.lastChild,u=e.currentTarget.parentElement;if(d){if(d.style.display="block",d.querySelector(".e-editable-inline")){this.isEditableElement||(d.querySelector(".e-editable-inline").style.display="block");for(s=0;s<u.childElementCount;s++){var M=u.childNodes[s].querySelector(".e-editable-inline");M&&""===M.style.display&&(d.style.display="none",d.querySelector(".e-editable-inline").style.display="none")}}this.isSetAnnotationType&&(n||this.updateCommentsScrollTop())}if(1===e.currentTarget.parentElement.childElementCount)if(this.pdfViewer.enableShapeLabel){var p=e.currentTarget.parentElement.getAttribute("name");this.isSetAnnotationType&&"shape"===p?e.currentTarget.childNodes[1].ej2_instances[0].enableEditMode=!1:e.currentTarget.childNodes[1].ej2_instances[0].enableEditMode=!0}else e.currentTarget.childNodes[1].ej2_instances[0].enableEditMode=!0;e.currentTarget&&e.currentTarget.id&&e.currentTarget.childNodes[1].ej2_instances[0]&&this.pdfViewer.fireCommentSelect(e.currentTarget.id,e.currentTarget.childNodes[1].ej2_instances[0].value,t),this.commentDivOnSelect(e),e.preventDefault()}},e.prototype.commentsDivDoubleClickEvent=function(e){for(var t=document.querySelectorAll(".e-pv-new-comments-div"),i=0;i<t.length;i++)t[i].style.display="none";this.checkIslockProperty(e.currentTarget.children[1])?2===e.currentTarget.childElementCount?e.currentTarget.lastChild.ej2_instances[0].enableEditMode=!1:e.currentTarget.childNodes[1].ej2_instances[0].enableEditMode=!1:e.currentTarget&&(this.checkAnnotationSettings(e.currentTarget.parentElement.id)||(2===e.currentTarget.childElementCount?e.currentTarget.lastChild.ej2_instances[0].enableEditMode=!0:e.currentTarget.childNodes[1].ej2_instances[0].enableEditMode=!0))},e.prototype.commentDivOnSelect=function(e){for(var t=document.querySelectorAll(".e-pv-comments-select"),i=0;i<t.length;i++)t[i].classList.remove("e-pv-comments-select");var n=document.getElementById(e.currentTarget.id);if(n&&(n.classList.remove("e-pv-comments-hover"),n.classList.remove("e-pv-comments-leave"),n.classList.add("e-pv-comments-select"),e.currentTarget.nextSibling&&e.currentTarget.nextSibling.classList.contains("e-pv-new-comments-div"))){var o=document.getElementById(e.currentTarget.nextSibling.id);o.classList.remove("e-pv-comments-hover"),o.classList.remove("e-pv-comments-leave"),o.classList.add("e-pv-comments-select")}},e.prototype.commentDivMouseOver=function(e){var t=document.getElementById(e.currentTarget.id);if(t&&(t.classList.remove("e-pv-comments-select"),t.classList.remove("e-pv-comments-leave"),t.classList.add("e-pv-comments-hover"),e.currentTarget.nextSibling&&e.currentTarget.nextSibling.classList.contains("e-pv-new-comments-div"))){var i=document.getElementById(e.currentTarget.nextSibling.id);i.classList.remove("e-pv-comments-select"),i.classList.remove("e-pv-comments-leave"),i.classList.add("e-pv-comments-hover")}},e.prototype.commentDivMouseLeave=function(e){var t=document.getElementById(e.currentTarget.id);if(t&&(t.classList.remove("e-pv-comments-hover"),t.classList.remove("e-pv-comments-select"),t.classList.add("e-pv-comments-leave"),e.currentTarget.nextSibling&&e.currentTarget.nextSibling.classList.contains("e-pv-new-comments-div"))){var i=document.getElementById(e.currentTarget.nextSibling.id);i.classList.remove("e-pv-comments-hover"),i.classList.remove("e-pv-comments-select"),i.classList.add("e-pv-comments-leave")}},e.prototype.drawIcons=function(e){if(this.pdfViewerBase.isCommentIconAdded){var t=this.pdfViewer.annotation.getEventPageNumber(e),i=this.pdfViewerBase.getElement("_pageDiv_"+t).getBoundingClientRect(),n=this.pdfViewerBase.getZoomFactor();this.pdfViewer.annotation.stickyNotesAnnotationModule.drawStickyNotes((e.clientX-i.left)/n,(e.clientY-i.top)/n,30,30,t,null),this.pdfViewerBase.isCommentIconAdded=!1;var o=document.getElementById(this.pdfViewer.element.id+"_comment");if(o.classList.contains("e-pv-select"))o.classList.remove("e-pv-select");else{var s=document.getElementById(this.pdfViewer.element.id+"_commentIcon");this.pdfViewer.enableRtl?s.className="e-pv-comment-icon e-pv-icon e-icon-left e-right":s.className="e-pv-comment-icon e-pv-icon e-icon-left"}}},e.prototype.addComments=function(e,t,i){var n;return document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+t)?n=this.pdfViewer.annotation.stickyNotesAnnotationModule.createCommentControlPanel(null,t,e,i):(this.pdfViewer.annotation.stickyNotesAnnotationModule.createPageAccordion(t),n=this.pdfViewer.annotation.stickyNotesAnnotationModule.createCommentControlPanel(null,t,e,i)),n},e.prototype.commentsAnnotationSelect=function(e){var t=e.currentTarget,i=this.checkAnnotationSettings(t.id);if(i){var n=this.findAnnotationObject(t.id);this.pdfViewer.annotationModule.checkAllowedInteractions("Select",n)&&(i=!1)}if(!i){if(t.classList.contains("e-pv-comments-border")){for(var o=document.querySelectorAll(".e-pv-comments-div"),s=0;s<o.length;s++)o[s].style.minHeight="60px";1===e.currentTarget.childElementCount&&e.currentTarget.childNodes[0].querySelector(".e-editable-inline")&&(e.currentTarget.childNodes[0].style.minHeight=e.currentTarget.childNodes[0].clientHeight)}if("e-pv-more-icon e-pv-icon"===e.target.className||"e-pv-more-options-button e-btn"===e.target.className)return e.preventDefault(),null;var a=parseInt(t.accessKey);if(t.classList.contains("e-pv-comments-border"))this.isSetAnnotationType=!0;else{var r=document.querySelectorAll(".e-pv-comments-border");if(r)for(s=0;s<r.length;s++)r[s].classList.remove("e-pv-comments-border");(o=document.getElementById(t.id))&&o.classList.add("e-pv-comments-border");for(var l=document.querySelectorAll(".e-pv-new-comments-div"),s=0;s<l.length;s++)l[s].style.display="none";if(o){var d=o.querySelector(".e-pv-new-comments-div");d&&(d.style.display="block")}var u=t.lastChild;if(this.isEditableElement=!1,u.querySelector(".e-editable-inline")){u.style.display="block",u.querySelector(".e-editable-inline").style.display="block";for(var M=0;M<t.childElementCount;M++){var p=t.childNodes[M].querySelector(".e-editable-inline");p&&""===p.style.display&&u.classList.contains("e-pv-new-comments-div")&&(this.isEditableElement=!0,u.style.display="none",u.querySelector(".e-editable-inline").style.display="none")}}this.isSetAnnotationType=!1,1===e.currentTarget.childElementCount&&(e.currentTarget.childNodes[0].childNodes[1].ej2_instances[0].enableEditMode=!0)}if(!this.isSetAnnotationType){this.pdfViewer.navigation&&this.pdfViewer.navigationModule.goToPage(a);var h=t.getAttribute("name");"null"!==h&&"Ink"!==h||(h="ink"),this.isCommentsSelected=!1,this.setAnnotationType(t.id,h,a),this.isCommentsSelected||(this.selectAnnotationObj={id:t.id,annotType:h,pageNumber:a})}}this.isSetAnnotationType=!1},e.prototype.findAnnotationObject=function(e){if(this.pdfViewer.annotationModule.textMarkupAnnotationModule&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)return this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation;if(this.pdfViewer.selectedItems.annotations[0])return this.pdfViewer.selectedItems.annotations[0];var t=this.pdfViewer.annotationCollection;if(t)for(var i=0;i<t.length;i++)if(t[i].annotationId&&t[i].annotationId===e){if("textMarkup"===t[i].shapeAnnotationType)return t[i];t=this.pdfViewer.annotations;for(var n=0;n<t.length;n++)if(t[n].annotName&&t[n].annotName===e)return t[n]}},e.prototype.checkAnnotationSettings=function(e){var t=this.pdfViewer.annotationCollection;if(t){for(var i=0;i<t.length;i++)if(t[i].annotationId&&t[i].annotationId===e)return!(!t[i].annotationSettings||!t[i].annotationSettings.isLock);return!1}return!1},e.prototype.updateCommentsContainerWidth=function(){var e=document.getElementById(this.pdfViewer.element.id+"_accordionContentContainer"),t=document.getElementById(this.pdfViewer.element.id+"_commentscontentcontainer");e.style.width=t.clientWidth+"px"},e.prototype.selectCommentsAnnotation=function(e){this.selectAnnotationObj&&!this.isCommentsSelected&&this.selectAnnotationObj.pageNumber-1===e&&(this.setAnnotationType(this.selectAnnotationObj.id,this.selectAnnotationObj.annotType,this.selectAnnotationObj.pageNumber),this.selectAnnotationObj=null,this.isCommentsSelected=!0)},e.prototype.setAnnotationType=function(e,t,i){var n="measure"===t?"shape_measure":t;"freeText"===n&&(n="freetext");var o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_"+n);if(this.pdfViewerBase.isStorageExceed&&(o=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_"+n]),o){var s=JSON.parse(o),a=this.pdfViewer.selectedItems.annotations[0],r=this.pdfViewer.annotationModule.getPageCollection(s,i-1);if(s[r])for(var l=s[r].annotations,d=0;d<l.length;d++){var u=l[d].annotationSelectorSettings;if(l[d].annotName===e){if(a&&this.pdfViewer.fireAnnotationUnSelect(a.annotName,a.pageIndex,a),this.pdfViewer.clearSelection(i-1),"textMarkup"===t){this.pdfViewer.annotationModule.textMarkupAnnotationModule.clearCurrentAnnotationSelection(i-1,!0);var M=this.pdfViewerBase.getElement("_annotationCanvas_"+(i-1));this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectAnnotation(l[d],M,i-1),this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAnnotation=l[d],this.pdfViewer.annotation.textMarkupAnnotationModule.selectTextMarkupCurrentPage=i-1,this.pdfViewer.annotation.textMarkupAnnotationModule.enableAnnotationPropertiesTool(!0),this.pdfViewer.toolbarModule&&this.pdfViewer.enableAnnotationToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem))}else"stamp"===t?(this.pdfViewer.select([l[d].randomId],u),this.pdfViewer.annotation.onAnnotationMouseDown()):"sticky"===t?(this.pdfViewer.select([l[d].annotName],u),this.pdfViewer.annotation.onAnnotationMouseDown()):(this.pdfViewer.select([l[d].id],u),this.pdfViewer.annotation.onAnnotationMouseDown());if("textMarkup"===t){if((l[d].rect||l[d].bounds)&&(L=this.pdfViewerBase.pageSize[i-1].top*this.pdfViewerBase.getZoomFactor()+this.pdfViewer.annotationModule.getAnnotationTop(l[d])*this.pdfViewerBase.getZoomFactor())){var p=(L-20).toString();this.pdfViewerBase.viewerContainer.scrollTop=parseInt(p)}}else{var h=l[d].bounds.top;"ink"===t&&(h=l[d].bounds.y);var L=this.pdfViewerBase.pageSize[i-1].top*this.pdfViewerBase.getZoomFactor()+h*this.pdfViewerBase.getZoomFactor(),w=(L-20).toString();this.pdfViewerBase.viewerContainer.scrollTop=parseInt(w)}this.isCommentsSelected=!0}}}},e.prototype.modifyTextProperty=function(e,t,i){var n;if(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation&&(n=this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation),n?n.annotName!==i&&(n=this.pdfViewer.selectedItems.annotations[0]):n=this.pdfViewer.selectedItems.annotations[0],i&&n.annotName!==i)for(M=0;M<this.pdfViewer.annotations.length;M++)if(i===this.pdfViewer.annotations[M].annotName){n=this.pdfViewer.annotations[M];break}if(n){var o=document.getElementById(n.annotName);if(o){var s=void 0;s=o.accessKey?parseInt(o.accessKey):this.pdfViewerBase.currentPageNumber;var a=o.getAttribute("name"),r=s-1,l=void 0,d=!1;if("FreeText"===n.shapeAnnotationType||this.pdfViewer.enableShapeLabel&&("shape"===a||"shape_measure"===a)){var u=!1;i&&n.annotName!==i&&(this.pdfViewer.annotation.modifyDynamicTextValue(e,i),u=!0),u||("FreeText"===n.shapeAnnotationType?(n.dynamicText!==e&&this.pdfViewer.annotation.modifyDynamicTextValue(e,n.annotName),n.dynamicText=e):(this.pdfViewer.annotation.modifyDynamicTextValue(e,n.annotName),n.labelContent=e,n.notes=e),this.pdfViewer.nodePropertyChange(n,{}))}if(n.measureType&&""!==n.measureType?(l=this.getAnnotations(r,null,"shape_measure"),d=!0):l=this.getAnnotations(r,null,n.shapeAnnotationType),null!==l&&"FreeText"!==n.shapeAnnotationType)for(var M=0;M<l.length;M++)if(l[M].annotName===n.annotName){var p=m(l[M]);if(null!==e&&l[M].note!==e)return this.pdfViewer.annotation.addAction(r,M,l[M],"Text Property Added","",p,l[M]),n=l[M],n.note=e,n.enableShapeLabel&&(n.labelContent=e),n.modifiedDate=this.getDateAndTime(),d?this.updateUndoRedoCollections(n,r,"shape_measure"):this.updateUndoRedoCollections(n,r),t&&""!==t?this.pdfViewer.fireCommentEdit(n.annotName,n.note,n):this.pdfViewer.fireCommentAdd(n.annotName,n.note,n),n}}}},e.prototype.getDateAndTime=function(e){e||(e=new Date),this.globalize=new t.Internationalization;var i={format:this.pdfViewer.dateTimeFormat,type:"dateTime"};return this.globalize.formatDate(new Date(e),i)},e.prototype.modifyCommentsProperty=function(e,t,i,n){var o;if(o=this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation:this.pdfViewer.selectedItems.annotations[0]){var s=document.getElementById(o.annotName),a=parseInt(s.accessKey)-1,r=void 0,l=!1,d=s.getAttribute("author");if(o.measureType&&""!==o.measureType?(r=this.getAnnotations(a,null,"shape_measure"),l=!0):r=this.getAnnotations(a,null,o.shapeAnnotationType),null!==r)for(var u=0;u<r.length;u++)r[u].annotName===o.annotName&&(o=r[u]);var M=m(o);if(o.comments.length>0){for(var p=!1,h=0;h<o.comments.length;h++)o.comments[h].annotName===t&&(p=!0,o.comments[h].note=e,o.comments[h].modifiedDate=this.getDateAndTime());L={annotName:t,parentId:i,subject:"Comments",comments:[],author:d,note:e,shapeAnnotationType:"",state:"",stateModel:"",modifiedDate:this.getDateAndTime(),review:{state:"",stateModel:"",modifiedDate:this.getDateAndTime(),author:d},isLock:!1};p||(o.comments[o.comments.length]=L)}else{var L={annotName:t,parentId:i,subject:"Comments",comments:[],author:d,note:e,shapeAnnotationType:"",state:"",stateModel:"",modifiedDate:this.getDateAndTime(),review:{state:"",stateModel:"",modifiedDate:this.getDateAndTime(),author:d},isLock:!1};o.comments[o.comments.length]=L}this.pdfViewer.annotation.addAction(a,null,o,"Comments Property Added","",M,o),l?this.updateUndoRedoCollections(o,a,"shape_measure"):this.updateUndoRedoCollections(o,a)}void 0!==n?this.pdfViewer.fireCommentEdit(t,e,o):this.pdfViewer.fireCommentAdd(t,e,o)},e.prototype.modifyStatusProperty=function(e,t){var i;if(i=this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAnnotation?this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAnnotation:this.pdfViewer.selectedItems.annotations[0]){var n=document.getElementById(i.annotName),o=parseInt(n.accessKey)-1,s=void 0,a=!1,r=n.getAttribute("author");if(i.measureType&&""!==i.measureType?(s=this.getAnnotations(o,null,"shape_measure"),a=!0):s=this.getAnnotations(o,null,i.shapeAnnotationType),null!==s)for(var l=0;l<s.length;l++)s[l].annotName===i.annotName&&(i=s[l]);var d=m(i);if(t.parentElement.firstChild.id===t.id)i.review={state:e,stateModel:"Review",author:r,modifiedDate:this.getDateAndTime(),annotId:t.id},i.state=e,i.stateModel="Review",this.pdfViewer.annotation.addAction(o,null,i,"Status Property Added","",d,i),this.pdfViewer.fireCommentStatusChanged(t.id,i.note,i,i.state);else for(var u=0;u<i.comments.length;u++)if(i.comments[u].annotName===t.id){var M=m(i.comments[u]);i.comments[u].state=e,i.comments[u].stateModel="Review",i.comments[u].review={state:e,stateModel:"Review",author:r,modifiedDate:this.getDateAndTime(),annotId:t.id},this.pdfViewer.annotation.addAction(o,null,i,"Status Property Added","",M,i.comments[u]),this.pdfViewer.fireCommentStatusChanged(i.comments[u].annotName,i.comments[u].note,i,i.comments[u].state)}a?this.updateUndoRedoCollections(i,o,"shape_measure"):this.updateUndoRedoCollections(i,o)}},e.prototype.modifyCommentDeleteProperty=function(e,t){var i,n,o,s=document.getElementById(e.id);if(s){var a=parseInt(s.accessKey)-1,r=e.getAttribute("name"),l=this.getAnnotations(a,null,r);if(null!==l)for(d=0;d<l.length;d++)l[d].annotName===e.id&&(o=l[d]);for(var d=1;d<s.childElementCount;d++)if(s.childNodes[d].id===t.id){n=m(o);var u=d-1;o.comments[u].position=d,i=m(o.comments[u]),this.pdfViewer.fireCommentDelete(o.comments[u].annotName,o.comments[u].note,o),o.comments.splice(u,1),t.remove()}this.pdfViewer.annotation.addAction(a,null,n,"Comments Reply Deleted","",i,o),this.updateUndoRedoCollections(o,a)}},e.prototype.updateOpacityValue=function(e){var t=this.getAnnotations(e.pageIndex,null,e.shapeAnnotationType);if(null!==t)for(var i=0;i<t.length;i++)t[i].annotName===e.annotName&&(t[i].opacity=e.opacity,this.updateUndoRedoCollections(t[i],e.pageIndex))},e.prototype.undoAction=function(e,t,i){if("Text Property Added"===t){if(e&&(p=document.getElementById(e.annotName))){var n=(M=parseInt(p.accessKey))-1,o=m(e);p.firstChild.firstChild.nextSibling.ej2_instances[0].value=i.note;var s=i.note;return e.note=s,2===p.childElementCount&&(p.lastChild.style.display="block"),this.updateUndoRedoCollections(e,n),o}}else if("Comments Property Added"===t){if(e.comments.length>0){var a=document.getElementById(e.annotName),n=this.pdfViewerBase.currentPageNumber-1;a&&(n=(M=parseInt(a.accessKey))-1);var o=m(e),r=e.comments[e.comments.length-1],l=document.getElementById(r.annotName);return l&&l.remove(),e=i,this.updateUndoRedoCollections(e,n),o}}else if("Status Property Added"===t){if(e){var a=document.getElementById(e.annotName),n=this.pdfViewerBase.currentPageNumber-1;a&&(n=(M=parseInt(a.accessKey))-1);o=m(e);if(e.annotName===i.annotName)e.review=i.review,e.state=i.state,e.stateModel=i.stateModel,this.pdfViewer.annotation.redoCommentsElement.push(e);else for(var d=0;d<e.comments.length;d++)if(e.comments[d].annotName===i.annotName){e.comments[d].state=i.state,e.comments[d].stateModel=i.stateModel,e.comments[d].review=i.review,this.pdfViewer.annotation.redoCommentsElement.push(e.comments[d]);break}var u=document.getElementById(i.annotName);return u.lastChild.id===this.pdfViewer.element.id+"status_container"?u.lastChild.remove():u.firstChild.lastChild.id===this.pdfViewer.element.id+"status_container"&&u.firstChild.lastChild.remove(),this.updateUndoRedoCollections(e,n),o}}else if("Comments Reply Deleted"===t){if(a=document.getElementById(e.annotName)){var M=parseInt(a.accessKey),n=M-1;return this.renderComments(i,a,!0,e.annotName),this.pdfViewer.annotation.redoCommentsElement.push(i),this.updateUndoRedoCollections(e,n),e}}else if("dynamicText Change"===t&&e){var p=document.getElementById(e.annotName);if(p)return p.firstChild.firstChild.nextSibling.ej2_instances[0].value=i.dynamicText,e}},e.prototype.redoAction=function(e,i,n){if("Text Property Added"===i){if(g=document.getElementById(e.annotName)){r=(L=parseInt(g.accessKey))-1;return g.firstChild.firstChild.nextSibling.ej2_instances[0].value=e.note,g.lastChild.style.display="block",this.updateUndoRedoCollections(e,r),e}}else if("Comments Property Added"===i){var o=e.comments[e.comments.length-1],s=document.getElementById(e.annotName);if(s){r=(L=parseInt(s.accessKey))-1;return this.renderComments(o,s,!0,e.annotName),this.updateUndoRedoCollections(e,r),e}}else{if("Status Property Added"===i){var a=this.pdfViewer.annotation.redoCommentsElement.pop(),r=this.pdfViewerBase.currentPageNumber-1;if(a){var l=t.createElement("div",{id:this.pdfViewer.element.id+"status_container",className:"e-pv-status-container"}),d=t.createElement("div",{id:this.pdfViewer.element.id+"status_div",className:"e-pv-status-div"}),u=t.createElement("span",{id:this.pdfViewer.element.id+"status_icon"});if(d.appendChild(u),l.appendChild(d),(h=document.getElementById(e.annotName))&&(r=(L=parseInt(h.accessKey))-1),e.annotName===a.annotName){this.updateStatusContainer(e.state,u,d,l);for(c=0;c<h.firstChild.children.length;c++)h.firstChild.children[c].id===this.pdfViewer.element.id+"status_container"&&h.firstChild.children[c].parentElement.removeChild(h.firstChild.children[c]);h.firstChild.appendChild(l)}else for(c=0;c<e.comments.length;c++)if(e.comments[c].annotName===a.annotName){this.updateStatusContainer(e.comments[c].state,u,d,l);for(var M=document.getElementById(a.annotName),p=0;p<M.children.length;p++)M.children[p].id===this.pdfViewer.element.id+"status_container"&&M.children[p].parentElement.removeChild(M.children[p]);M&&M.appendChild(l)}}return this.updateUndoRedoCollections(e,r),e}if("Comments Reply Deleted"===i){var r=this.pdfViewerBase.currentPageNumber-1,h=document.getElementById(e.annotName);if(h){var L=parseInt(h.accessKey);r=L-1}for(var a=this.pdfViewer.annotation.redoCommentsElement.pop(),w=m(e),c=0;c<e.comments.length;c++)if(e.comments[c].annotName===a.annotName){var C=document.getElementById(a.annotName);e.comments.splice(c,1),C.remove()}return this.updateUndoRedoCollections(e,r),w}if("dynamicText Change"===i&&e){var g=document.getElementById(e.annotName);if(g)return g.firstChild.firstChild.nextSibling.ej2_instances[0].value=e.dynamicText,e}}},e.prototype.updateUndoRedoCollections=function(e,t,i,n){var o=i||e.shapeAnnotationType;e.indent&&""!==e.indent&&(o="shape_measure");var s=this.getAnnotations(t,null,o);if(null!==s){for(var a=0;a<s.length;a++)e.annotName===s[a].annotName&&(s[a]=e,this.pdfViewer.annotationModule.storeAnnotationCollections(s[a],t),n&&(s.splice(a,1),this.deleteStickyNotesAnnotations(s,t)));"shape_measure"===o?this.manageAnnotations(s,t,"shape_measure"):this.manageAnnotations(s,t,e.shapeAnnotationType)}},e.prototype.addAnnotationComments=function(e,t){var i=e+1,n=this.pdfViewer.annotation.undoCommentsElement.pop();n&&(this.createCommentsContainer(n,i),this.updateUndoRedoCollections(n,e,t))},e.prototype.findPosition=function(e,t,i){var n,o=document.getElementById(e.annotName);if(o){for(var s=parseInt(o.accessKey)-1,a=o.parentElement,r=0;r<a.childElementCount;r++)a.childNodes[r].id===e.annotName&&(n=r);"Stamp"===t||"Image"===t?t="stamp":"FreeText"===t?t="freetext":"StickyNotes"===t||"sticky"===t?t="sticky":"Ink"===t&&(t="ink");var l=this.getAnnotations(s,null,t);if(null!==l)for(r=0;r<l.length;r++)if(l[r].annotName===e.annotName){var d=m(l[r]);l[r].position=n,this.pdfViewer.annotation.undoCommentsElement.push(l[r]),"sticky"===t&&this.updateUndoRedoCollections(d,s,null,i)}}},e.prototype.getAnnotations=function(e,t,i){var n;i="Stamp"===i||"stamp"===i||"Image"===i?"stamp":"StickyNotes"===i||"sticky"===i?"sticky":"textMarkup"===i?"textMarkup":"shape"===i||"Line"===i||"Radius"===i||"Rectangle"===i||"Ellipse"===i||"Polygon"===i||"LineWidthArrowHead"===i||"Square"===i||"Circle"===i?"shape":"FreeText"===i||"freetext"===i||"freeText"===i?"freetext":"ink"===i||"Ink"===i?"ink":"shape_measure";var o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_"+i);if(this.pdfViewerBase.isStorageExceed&&(o=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_"+i]),o){var s=JSON.parse(o),a=this.pdfViewer.annotationModule.getPageCollection(s,e);n=s[a]?s[a].annotations:t}else n=t;return n},e.prototype.manageAnnotations=function(e,t,i){i="Stamp"===i||"stamp"===i?"stamp":"Sticky"===i||"sticky"===i?"sticky":"textMarkup"===i?"textMarkup":"shape"===i||"Line"===i||"Radius"===i||"Rectangle"===i||"Ellipse"===i||"Polygon"===i||"LineWidthArrowHead"===i||"Square"===i||"Circle"===i?"shape":"FreeText"===i?"freetext":"ink"===i||"Ink"===i?"ink":"shape_measure";var n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_"+i);if(this.pdfViewerBase.isStorageExceed&&(n=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_"+i]),n){var o=JSON.parse(n);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_"+i);var s=this.pdfViewer.annotationModule.getPageCollection(o,t);o[s]&&(o[s].annotations=e);var a=JSON.stringify(o);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_"+i]=a:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_"+i,a)}},e.prototype.updateStickyNotes=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_sticky");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_sticky"]),i)for(var n=e.bounds,o=JSON.parse(i),s=0;s<o.length;s++)for(var a=o[s],r=0;r<a.annotations.length;r++)if(o[s].annotations[r].annotName===e.annotName){this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_sticky"),o[this.pdfViewer.annotationModule.getPageCollection(o,0)]&&(o[s].annotations[r].bounds={left:n.x,top:n.y,width:n.width,height:n.height,right:n.right,bottom:n.bottom});var l=JSON.stringify(o);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_sticky"]=l:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_sticky",l);break}},e.prototype.saveStickyAnnotations=function(){var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_sticky");this.pdfViewerBase.isStorageExceed&&(e=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_sticky"]);for(var t=new Array,i=0;i<this.pdfViewerBase.pageCount;i++)t[i]=[];if(e&&!this.pdfViewer.annotationSettings.skipDownload)for(var n=JSON.parse(e),o=0;o<n.length;o++){var s=[],a=n[o];if(a){for(var r=0;a.annotations.length>r;r++)this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));s=a.annotations}t[a.pageIndex]=s}return JSON.stringify(t)},e.prototype.deleteStickyNotesAnnotations=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_sticky");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_sticky"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_sticky");var o=this.pdfViewer.annotationModule.getPageCollection(n,t);n[o]&&(n[o].annotations=e);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_sticky"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_sticky",s)}},e.prototype.addStickyNotesAnnotations=function(e,t){var i=this.getAnnotations(e,null,"sticky");i&&i.push(t),this.manageAnnotations(i,e,"sticky")},e.prototype.addTextToComments=function(e,t){var i=document.getElementById(e);i&&(i.firstChild.firstChild.nextSibling.ej2_instances[0].value=t)},e.prototype.updateAnnotationCollection=function(e,t,i){var n=this.findAnnotationType(t),o=this.getAnnotations(t.pageIndex,null,n);if(i&&(o=this.pdfViewer.annotationModule.removedAnnotationCollection),null!==o)for(var s=0;s<o.length;s++)if(i&&!o[s].annotName&&(o[s].annotName=o[s].annotationId),o[s].annotName===t.annotName){var a=m(o[s]);a.annotName=e.annotName,"shape"!==n&&"shape_measure"!==n&&"freetext"!==n&&"ink"!==n||(a.id=e.id),"stamp"===n&&(a.randomId=e.id),"ink"===n?(a.bounds.x=e.bounds.x,a.bounds.y=e.bounds.y):(a.bounds.left=e.bounds.x,a.bounds.top=e.bounds.y,a.vertexPoints=e.vertexPoints),a.note=a.note?a.note:"",a.comments=[],a.review={state:"",stateModel:"",modifiedDate:a.ModifiedDate,author:a.author},a.state="",a.stateModel="",this.pdfViewer.annotationModule.storeAnnotations(t.pageIndex,a,"_annotations_"+n),this.createCommentsContainer(a,t.pageIndex+1,!0),i&&(this.pdfViewer.annotationModule.removedAnnotationCollection=[]);break}},e.prototype.findAnnotationType=function(e){return""!==e.measureType?"shape_measure":"StickyNotes"===e.shapeAnnotationType?"sticky":"Stamp"===e.shapeAnnotationType||"Image"===e.shapeAnnotationType?"stamp":"FreeText"===e.shapeAnnotationType?"freetext":"Ink"===e.shapeAnnotationType?"ink":"shape"},e.prototype.setExistingAnnotationModifiedDate=function(e){return""!==e?this.setModifiedDate(e):this.setModifiedDate()},e.prototype.updateModifiedTime=function(e,t){return e>=12?12===e?e+":"+t+" PM":e-12+":"+t+" PM":e+":"+t+" AM"},e.prototype.setModifiedDate=function(e){var t;t=e?this.getDateAndTime(e):this.getDateAndTime();var i,n=new Date(t),o=n.toString().split(" ").splice(1,2).join(" ");if(2===n.toLocaleTimeString().split(" ").length)i=n.toLocaleTimeString().split(" ")[0].split(":").splice(0,2).join(":")+" "+n.toLocaleTimeString().split(" ")[1];else{var s=parseInt(n.toLocaleTimeString().split(":")[0]),a=n.toLocaleTimeString().split(":")[1];i=this.updateModifiedTime(s,a)}return o+", "+i},e.prototype.updateModifiedDate=function(e){e.id===this.pdfViewer.element.id+"_commenttype_icon"&&(e=e.nextSibling);var t=e.textContent.split("-")[0];e.textContent=t+" - "+this.setModifiedDate()},e.prototype.updateAnnotationModifiedDate=function(e,t,i){var n;if(e){var o=document.getElementById(e.annotName);if(o){if(t){var s=this.findAnnotationType(e),a=this.getAnnotations(e.pageIndex,null,s);if(null!=a&&e)for(var r=0;r<a.length;r++)if(e.annotName===a[r].annotName&&(e.bounds.x!==a[r].bounds.left||e.bounds.y!==a[r].bounds.top||e.bounds.height!==a[r].bounds.height||e.bounds.width!==a[r].bounds.width)){l=(n=o.firstChild.firstChild.childNodes[1]).textContent.split("-")[0];n.textContent=l+" - "+this.setModifiedDate()}}else{l=(n=o.firstChild.firstChild.childNodes[1]).textContent.split("-")[0];n.textContent=l+" - "+this.setModifiedDate()}if(i&&(n=o.firstChild.firstChild.childNodes[1],void 0!==e.modifiedDate)){var l=n.textContent.split("-")[0];n.textContent=l+" - "+this.setExistingAnnotationModifiedDate(e.modifiedDate)}}}},e.prototype.saveImportedStickyNotesAnnotations=function(e,t){var i=null;e.Author||(e.Author="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.stickyNotesSettings.author);var n=this.pdfViewer.stickyNotesSettings.isLock?this.pdfViewer.stickyNotesSettings.isLock:this.pdfViewer.annotationSettings.isLock,o=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e);i={shapeAnnotationType:"sticky",author:e.Author,allowedInteractions:o,modifiedDate:e.ModifiedDate,subject:e.Subject,note:e.Note,opacity:e.Opacity,state:e.State,stateModel:e.StateModel,pathData:"",comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,modifiedDate:e.ModifiedDate,author:e.Author},bounds:{left:e.Bounds.X,top:e.Bounds.Y,width:e.Bounds.Width,height:e.Bounds.Height,right:e.Bounds.Right,bottom:e.Bounds.Bottom},annotName:e.AnnotName,color:e.color,annotationSelectorSettings:this.getSettings(e),customData:this.pdfViewer.annotation.getCustomData(e),annotationSettings:{isLock:n},isPrint:e.IsPrint,isCommentLock:e.IsCommentLock},this.pdfViewer.annotationModule.storeAnnotations(t,i,"_annotations_sticky")},e.prototype.updateStickyNotesAnnotationCollections=function(e,t){e.Author||(e.Author="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.stickyNotesSettings.author);var i=this.pdfViewer.stickyNotesSettings.isLock?this.pdfViewer.stickyNotesSettings.isLock:this.pdfViewer.annotationSettings.isLock,n=e.AllowedInteraction?e.AllowedInteraction:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e);return e.IsLock&&(i=e.isLock),{shapeAnnotationType:"sticky",author:e.Author,allowedInteractions:n,modifiedDate:e.ModifiedDate,subject:e.Subject,note:e.Note,opacity:e.Opacity,state:e.State,stateModel:e.StateModel,pathData:"",comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),review:{state:e.State,stateModel:e.StateModel,modifiedDate:e.ModifiedDate,author:e.Author},bounds:{left:e.Bounds.X,top:e.Bounds.Y,width:e.Bounds.Width,height:e.Bounds.Height,right:e.Bounds.Right,bottom:e.Bounds.Bottom},annotationId:e.AnnotName,color:e.color,pageNumber:t,customData:this.pdfViewer.annotation.getCustomData(e),annotationSettings:{isLock:i},isPrint:e.IsPrint,isCommentLock:e.IsCommentLock}},e.prototype.clear=function(){this.commentsCount=0,this.commentsreplyCount=0,this.isAccordionContainer=!0,this.isEditableElement=!1,this.isCreateContextMenu=!1,this.isPageCommentsRendered=!1,this.isCommentsRendered=!1,this.isAnnotationRendered=!1,this.commentMenuObj&&this.commentMenuObj.destroy();var e=document.querySelectorAll(".e-pv-accordion-page-container");if(e)for(var t=0;t<e.length;t++)e[t].remove()},e.prototype.getModuleName=function(){return"StickyNotesAnnotation"},e.prototype.updateAddAnnotationDetails=function(e,t){t=e?e.offset?e.offset:{x:1,y:1}:(e={offset:{x:1,y:1},pageNumber:0}).offset;var i=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),n=this.pdfViewer.annotation.createGUID(),o=this.pdfViewer.stickyNotesSettings.annotationSelectorSettings?this.pdfViewer.stickyNotesSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,s=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.stickyNotesSettings),a=this.pdfViewer.stickyNotesSettings.allowedInteractions?this.pdfViewer.stickyNotesSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions;s.isLock=!!e.isLock&&e.isLock;var r=[],l={AllowedInteractions:e.allowedInteractions?e.allowedInteractions:a,AnnotName:n,AnnotType:"sticky",AnnotationFlags:null,AnnotationSelectorSettings:e.annotationSelectorSettings?e.annotationSelectorSettings:o,AnnotationSettings:s,Author:e.author?e.author:"Guest",Bounds:{X:t.x,Y:t.y,Width:30,Height:30,Left:t.x,Top:t.y,Location:{X:t.x,Y:t.y},Size:{Height:30,IsEmpty:!1,Width:30}},Color:{IsEmpty:!1,B:51,Blue:.2,C:0,G:255},Comments:null,CreatedDate:i,CustomData:e.customData?e.customData:null,ExistingCustomData:null,Icon:"Comment",IsCommentLock:!1,IsLock:!!e.isLock&&e.isLock,IsPrint:!e.isPrint||e.isPrint,ModifiedDate:i,Note:"",Opacity:e.opacity?e.opacity:1,Reference:null,Size:{IsEmpty:!0,Width:0,Height:0},State:"",StateModel:"",StrokeColor:null,SubType:null,Subject:"Sticky Note",Type:null};return r[0]=l,{stickyNotesAnnotation:r}},e}(),xt=function(){function e(e,t){this.newObject=[],this.outputString="",this.inkAnnotationindex=[],this.isAddAnnotationProgramatically=!1,this.currentPageNumber="",this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.drawInk=function(){this.pdfViewerBase.disableTextSelectionMode(),this.pdfViewer.tool="Ink"},e.prototype.drawInkAnnotation=function(e){if(this.pdfViewerBase.isToolbarInkClicked){this.pdfViewerBase.isInkAdded=!0;var i=isNaN(e)?this.pdfViewerBase.currentPageNumber-1:e;if(this.outputString&&""!==this.outputString){var n=this.addInk(i);this.pdfViewer.renderDrawing(void 0,i),this.pdfViewer.clearSelection(i),this.pdfViewer.select([n.id],n.annotationSelectorSettings),this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&this.pdfViewer.toolbar.annotationToolbarModule.enableSignaturePropertiesTools(!0),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.toolbarModule.annotationToolbarModule.createPropertyTools("Ink")}else this.outputString="",this.newObject=[],this.pdfViewerBase.isToolbarInkClicked=!1,this.pdfViewer.tool="";this.pdfViewerBase.isInkAdded=!1}},e.prototype.storePathData=function(){this.convertToPath(this.newObject),this.newObject=[]},e.prototype.drawInkInCanvas=function(e,t){""!==this.currentPageNumber&&parseInt(this.currentPageNumber)!==t&&(this.drawInkAnnotation(parseInt(this.currentPageNumber)),this.pdfViewerBase.isToolbarInkClicked=!0,this.pdfViewer.tool="Ink");var i=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+t).getContext("2d"),n=this.pdfViewer.inkAnnotationSettings.thickness?this.pdfViewer.inkAnnotationSettings.thickness:1,o=this.pdfViewer.inkAnnotationSettings.opacity?this.pdfViewer.inkAnnotationSettings.opacity:1,s=this.pdfViewer.inkAnnotationSettings.strokeColor?this.pdfViewer.inkAnnotationSettings.strokeColor:"#ff0000";i.beginPath(),i.moveTo(e.prevPosition.x,e.prevPosition.y),i.lineTo(e.currentPosition.x,e.currentPosition.y),i.lineWidth=n,i.strokeStyle=s,i.globalAlpha=o,i.stroke(),i.arc(e.prevPosition.x,e.prevPosition.y,1,0,2*Math.PI,!0),i.closePath(),this.pdfViewerBase.prevPosition=e.currentPosition,this.newObject.push(e.currentPosition.x,e.currentPosition.y),this.currentPageNumber=t.toString()},e.prototype.convertToPath=function(e){this.movePath(e[0],e[1]),this.linePath(e[0],e[1]);for(var t=2;t<e.length;t+=2)this.linePath(e[t],e[t+1])},e.prototype.linePath=function(e,t){this.outputString+="L"+e+","+t+" "},e.prototype.movePath=function(e,t){this.outputString+="M"+e+","+t+" "},e.prototype.addInk=function(e){var t,i=this.calculateInkSize();this.pdfViewerBase.getZoomFactor();if(this.pdfViewerBase.isToolbarInkClicked){var n=this.pdfViewer.annotation.createGUID(),o=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),s=isNaN(e)?this.pdfViewerBase.currentPageNumber-1:e,a=this.pdfViewer.inkAnnotationSettings.thickness?this.pdfViewer.inkAnnotationSettings.thickness:1,r=this.pdfViewer.inkAnnotationSettings.opacity?this.pdfViewer.inkAnnotationSettings.opacity:1,l=this.pdfViewer.inkAnnotationSettings.strokeColor?this.pdfViewer.inkAnnotationSettings.strokeColor:"#ff0000",d=this.pdfViewer.inkAnnotationSettings.isLock?this.pdfViewer.inkAnnotationSettings.isLock:this.pdfViewer.annotationSettings.isLock,u="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.inkAnnotationSettings.author?this.pdfViewer.inkAnnotationSettings.author:"Guest",M=this.pdfViewer.inkAnnotationSettings.customData,p=this.pdfViewer.inkAnnotationSettings.isPrint,h=this.pdfViewer.inkAnnotationSettings.allowedInteractions?this.pdfViewer.inkAnnotationSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions,L=this.pdfViewer.inkAnnotationSettings?this.pdfViewer.inkAnnotationSettings:this.pdfViewer.annotationSettings;t={id:"ink"+this.pdfViewerBase.inkCount,bounds:{x:i.x,y:i.y,width:i.width,height:i.height},pageIndex:s,data:this.outputString,customData:M,shapeAnnotationType:"Ink",opacity:r,strokeColor:l,thickness:a,annotName:n,comments:[],author:u,subject:"Ink",notes:"",review:{state:"",stateModel:"",modifiedDate:o,author:u},annotationSelectorSettings:this.getSelector("Ink",""),modifiedDate:o,annotationSettings:L,isPrint:p,allowedInteractions:h,isCommentLock:!1,isLocked:d};var w=this.pdfViewer.add(t),c={left:t.bounds.x,top:t.bounds.y,width:t.bounds.width,height:t.bounds.height},C={opacity:t.opacity,strokeColor:t.strokeColor,thickness:t.thickness,modifiedDate:t.modifiedDate,width:t.bounds.width,height:t.bounds.height,data:this.outputString};this.pdfViewerBase.inkCount++;var g=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("ink",t.pageIndex+1,t.shapeAnnotationType);g&&(document.getElementById(g).id=n),t.annotName=n,this.pdfViewer.annotationModule.storeAnnotations(s,t,"_annotations_ink"),this.pdfViewer.fireAnnotationAdd(t.pageIndex,t.annotName,"Ink",c,C),this.pdfViewer.annotation.addAction(s,null,w,"Addition","",w,w),this.pdfViewerBase.isInkAdded&&(this.outputString="",this.newObject=[]),this.pdfViewerBase.isToolbarInkClicked=!1,this.pdfViewer.tool=""}return t},e.prototype.setAnnotationMode=function(){this.pdfViewerBase.isToolbarInkClicked?this.drawInkAnnotation():(this.pdfViewerBase.isToolbarInkClicked=!0,this.drawInk())},e.prototype.saveInkSignature=function(){for(var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_ink"),t=new Array,n=0;n<this.pdfViewerBase.pageCount;n++)t[n]=[];if(e)for(var o=JSON.parse(e),s=0;s<o.length;s++){var a=[],r=o[s];if(r){for(var l=0;r.annotations.length>l;l++){this.pdfViewer.annotationModule.updateModifiedDate(r.annotations[l]);var d=r.annotations[l].strokeColor;r.annotations[l].strokeColor=JSON.stringify(this.pdfViewerBase.signatureModule.getRgbCode(d)),r.annotations[l].bounds=JSON.stringify(this.pdfViewer.annotation.getInkBounds(r.annotations[l].bounds,r.pageIndex));var u=i.processPathData(r.annotations[l].data),M=i.splitArrayCollection(u);r.annotations[l].data=JSON.stringify(M)}a=r.annotations}t[r.pageIndex]=a}return JSON.stringify(t)},e.prototype.addInCollection=function(e,t){if(t){var i=this.getAnnotations(e,null);i&&i.push(t),this.manageInkAnnotations(i,e)}},e.prototype.calculateInkSize=function(){for(var e=-1,t=-1,n=-1,o=-1,s=i.processPathData(this.outputString),a=this.pdfViewerBase.getZoomFactor(),r=0;r<s.length;r++){var l=s[r];if(-1===e)e=l.x,n=l.x,t=l.y,o=l.y;else{var d=l.x,u=l.y;e>=d&&(e=d),t>=u&&(t=u),n<=d&&(n=d),o<=u&&(o=u)}}return{x:e/a,y:t/a,width:(n-e)/a,height:(o-t)/a}},e.prototype.renderExistingInkSignature=function(e,t,n){var o,s=!1;if(!n)for(var a=0;a<this.inkAnnotationindex.length;a++)if(this.inkAnnotationindex[a]===t){s=!0;break}if(e&&!s){e.length>0&&-1===this.inkAnnotationindex.indexOf(t)&&this.inkAnnotationindex.push(t);for(var r=0;r<e.length;r++){var l=e[r];if(l){var d=l.Bounds,u=d.X?d.X:d.x,M=d.Y?d.Y:d.y,p=d.Width?d.Width:d.width,h=d.Height?d.Height:d.height,L=l.PathData;n&&(L=l.IsPathData||l.PathData.split("command").length<=1?l.PathData:i.getPathString(JSON.parse(l.PathData)));var w=!!l.AnnotationSettings&&l.AnnotationSettings.isLock,c=l.AnnotationSelectorSettings?l.AnnotationSelectorSettings:this.getSelector(l,"Ink"),C=this.pdfViewer.annotation.getCustomData(l),g=!0;g=l.AnnotationSettings?l.AnnotationSettings.isPrint:this.pdfViewer.inkAnnotationSettings.isPrint,l.IsLocked&&(w=l.IsLocked),l.allowedInteractions=l.AllowedInteractions?l.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(l),o={id:"ink"+this.pdfViewerBase.inkCount,bounds:{x:u,y:M,width:p,height:h},pageIndex:t,data:L,shapeAnnotationType:"Ink",opacity:l.Opacity,strokeColor:l.StrokeColor,thickness:l.Thickness,annotName:l.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(l.Comments,l,l.Author),author:l.Author,allowedInteractions:l.allowedInteractions,subject:l.Subject,modifiedDate:l.ModifiedDate,review:{state:"",stateModel:"",modifiedDate:l.ModifiedDate,author:l.Author},notes:l.Note,annotationSettings:{isLock:w},annotationSelectorSettings:c,customData:C,isPrint:g,isCommentLock:l.IsCommentLock},this.pdfViewer.add(o);var m=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+l.pageIndex);if(this.pdfViewer.renderDrawing(m,o.pageIndex),this.pdfViewer.annotationModule.storeAnnotations(o.pageIndex,o,"_annotations_ink"),this.isAddAnnotationProgramatically){var f={opacity:o.opacity,strokeColor:o.strokeColor,thickness:o.thickness,modifiedDate:o.modifiedDate,width:o.bounds.width,height:o.bounds.height,data:this.outputString};this.pdfViewer.fireAnnotationAdd(o.pageIndex,o.annotName,"Ink",d,f)}this.pdfViewerBase.currentSignatureAnnot=null,this.pdfViewerBase.signatureCount++,this.pdfViewerBase.inkCount++,this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.annotationMenuObj&&this.pdfViewer.isSignatureEditable&&(this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export Annotations")],!0),this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export XFDF")],!0))}}}},e.prototype.storeInkSignatureData=function(e,t){this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"Addition","",t,t);var i=null,n=t.bounds.left?t.bounds.left:t.bounds.x,o=t.bounds.top?t.bounds.top:t.bounds.y;t.wrapper&&t.wrapper.bounds&&(n=t.wrapper.bounds.left,o=t.wrapper.bounds.top),i={id:t.id,bounds:{x:n,y:o,width:t.bounds.width,height:t.bounds.height},shapeAnnotationType:"Ink",opacity:t.opacity,thickness:t.thickness,strokeColor:t.strokeColor,pageIndex:t.pageIndex,data:t.data,annotName:t.annotName,comments:t.comments,author:t.author,subject:t.subject,modifiedDate:t.modifiedDate,review:{state:"",stateModel:"",modifiedDate:t.modifiedDate,author:t.author},notes:t.notes,annotationSelectorSettings:this.getSelector(t,"Ink"),isCommentLock:t.isCommentLock};var s=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_ink");if(s){var a=JSON.parse(s);window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_ink");var r=this.pdfViewer.annotationModule.getPageCollection(a,e);if(a[r])a[r].annotations.push(i),a[r].annotations.indexOf(i);else{var l={pageIndex:e,annotations:[]};l.annotations.push(i),l.annotations.indexOf(i),a.push(l)}M=JSON.stringify(a);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_ink",M)}else{var d={pageIndex:e,annotations:[]};d.annotations.push(i),d.annotations.indexOf(i);var u=[];u.push(d);var M=JSON.stringify(u);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_ink",M)}},e.prototype.getSelector=function(e,t){var i=this.pdfViewer.annotationSelectorSettings;return"Ink"===e&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings&&(i=this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings),i},e.prototype.getAnnotations=function(e,t){var i,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_ink");if(n){var o=JSON.parse(n),s=this.pdfViewer.annotationModule.getPageCollection(o,e);i=o[s]?o[s].annotations:t}else i=t;return i},e.prototype.modifySignatureInkCollection=function(e,t,i){this.pdfViewer.isDocumentEdited=!0;var n=null,o=this.getAnnotations(t,null);if(null!=o&&i){for(var s=0;s<o.length;s++)if(i.id===o[s].id){if("bounds"===e)o[s].bounds={x:i.wrapper.bounds.left,y:i.wrapper.bounds.top,width:i.bounds.width,height:i.bounds.height};else if("stroke"===e)o[s].strokeColor=i.wrapper.children[0].style.strokeColor;else if("opacity"===e)o[s].opacity=i.wrapper.children[0].style.opacity;else if("thickness"===e)o[s].thickness=i.wrapper.children[0].style.strokeWidth;else if("notes"===e)o[s].notes=i.notes;else if("delete"===e){n=o.splice(s,1)[0];break}o[s].modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.pdfViewer.annotationModule.storeAnnotationCollections(o[s],t)}this.manageInkAnnotations(o,t)}return n},e.prototype.manageInkAnnotations=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_ink");if(i){var n=JSON.parse(i);window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_ink");var o=this.pdfViewer.annotationModule.getPageCollection(n,t);n[o]&&(n[o].annotations=e);var s=JSON.stringify(n);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_ink",s)}},e.prototype.updateInkCollections=function(e,t,n){if(e){var o=e.Bounds,s=o.X,a=o.Y,r=o.Width,l=o.Height,d=e.customData,u=e.isPrint,M=e.AllowedInteractions?e.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(e),p=e.AnnotationSettings?e.AnnotationSettings:this.pdfViewer.inkAnnotationSettings?this.pdfViewer.inkAnnotationSettings:this.pdfViewer.annotationSettings;e.IsLocked&&(p.isLock=e.IsLocked);var h=e.PathData;return n&&(h=i.getPathString(JSON.parse(e.PathData))),{id:"ink"+this.pdfViewerBase.signatureCount,bounds:{x:s,y:a,width:r,height:l},pageIndex:t,data:h,shapeAnnotationType:"Ink",opacity:e.Opacity,strokeColor:e.StrokeColor,thickness:e.Thickness,annotationId:e.AnnotName,customData:d,comments:this.pdfViewer.annotationModule.getAnnotationComments(e.Comments,e,e.Author),author:e.Author,allowedInteractions:M,subject:e.Subject,modifiedDate:e.ModifiedDate,review:{state:"",stateModel:"",modifiedDate:e.ModifiedDate,author:e.Author},notes:e.Note,isPrint:u,isCommentLock:e.IsCommentLock,annotationSettings:p,isLocked:p.isLock}}},e.prototype.updateAddAnnotationDetails=function(e,t,n){t=e?e.offset?e.offset:{x:10,y:10}:(e={offset:{x:10,y:10},pageNumber:0,width:void 0,height:void 0}).offset;var o=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),s=this.pdfViewer.annotation.createGUID(),a=this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings?this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,r=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.inkAnnotationSettings),l=this.pdfViewer.inkAnnotationSettings.allowedInteractions?this.pdfViewer.inkAnnotationSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions;r.isLock=!!e.isLock&&e.isLock,e.width=e.width?e.width:150,e.height=e.height?e.height:60;var d=e.path?e.path:"";e.path=i.getPathString(JSON.parse(d));var u=[],M={AllowedInteractions:e.allowedInteractions?e.allowedInteractions:l,AnnotName:s,AnnotType:"ink",AnnotationFlags:null,AnnotationSelectorSettings:e.annotationSelectorSettings?e.annotationSelectorSettings:a,AnnotationSettings:r,AnnotationType:"Ink",Author:e.author?e.author:"Guest",Bounds:{X:t.x,Y:t.y,Width:e.width,Height:e.height,Left:t.x,Top:t.y,Location:{X:t.x,Y:t.y},Size:{Height:e.height,IsEmpty:!1,Width:e.width}},Comments:null,CreatedDate:o,CustomData:e.customData?e.customData:null,ExistingCustomData:null,IsCommentLock:!1,IsLock:!!e.isLock&&e.isLock,IsPrint:!e.isPrint||e.isPrint,ModifiedDate:o,Note:"",Opacity:e.opacity?e.opacity:1,PathData:e.path,PageNumber:n,State:"",StateModel:"",StrokeColor:e.strokeColor?e.strokeColor:"rgba(255,0,0,1)",SubType:null,Subject:"Ink",Type:null,Thickness:e.thickness?e.thickness:1};return u[0]=M,{signatureInkAnnotation:u}},e}(),Nt=function(){function i(i,n){var o=this;this.thumbnailWidthMin=200,this.contentContainerScrollWidth=33,this.closeButtonLeft=170,this.isTooltipCreated=!1,this.isThumbnail=!1,this.annotationContextMenu=[],this.isCommentPanelShow=!1,this.commentPanelWidthMin=300,this.isNavigationToolbarVisible=!1,this.isBookmarkListOpen=!1,this.isNavigationPaneResized=!1,this.isBookmarkOpen=!1,this.isThumbnailOpen=!1,this.loadImportAnnotation=function(t){var i=t.target.files;if(null!==t.target.files[0]){var n=i[0];if(n){o.pdfViewer.fireImportStart(n);var s=n.type;if(n.name.split(".json").length>1&&s.includes("json"))(a=new FileReader).readAsDataURL(n),a.onload=function(t){if(t.currentTarget.result){var i=t.currentTarget.result.split(",")[1],n=atob(i);if(n){var s=JSON.parse(n);o.pdfViewerBase.importAnnotations(s,e.AnnotationDataFormat.Json)}}};else if(n.name.split(".xfdf").length>1&&s.includes("xfdf")){var a=new FileReader;a.readAsDataURL(n),a.onload=function(t){if(t.currentTarget.result){var i=t.currentTarget.result.split(",")[1];atob(i)&&o.pdfViewerBase.importAnnotations(i,e.AnnotationDataFormat.Xfdf,!0)}}}else o.pdfViewer.fireImportFailed(n,o.pdfViewer.localeObj.getConstant("Import Failed")),o.pdfViewerBase.openImportExportNotificationPopup(o.pdfViewer.localeObj.getConstant("Import Failed"))}}},this.resizeIconMouseOver=function(e){e.srcElement.style.cursor="default"},this.resizePanelMouseDown=function(e){var t=o;t.offset=[t.sideBarResizer.offsetLeft-e.clientX,t.sideBarResizer.offsetTop-e.clientY,t.sideBarResizer.offsetParent.clientWidth],o.previousX=e.clientX,t.isDown=!0,t.isNavigationPaneResized=!0,t.pdfViewerBase.viewerContainer.style.cursor="e-resize",t.sideBarContentContainer&&(t.sideBarContentContainer.style.cursor="e-resize")},this.resizeViewerMouseLeave=function(e){var t=o;t.isDown=!1,t.isNavigationPaneResized&&t.sideBarContentContainer&&(t.pdfViewerBase.viewerContainer.style.cursor="default",t.sideBarContentContainer.style.cursor="default",t.isNavigationPaneResized=!1),t.commentPanelContainer&&t.isCommentPanelShow&&(o.commentPanelMouseLeave(e),t.isCommentPanelShow=!1)},this.resizePanelMouseMove=function(e){var t=o;if(!o.pdfViewerBase.getPopupNoteVisibleStatus()){var i=e.target;if(o.pdfViewerBase.skipPreventDefault(i)&&e.preventDefault(),t.isDown&&o.sideBarContentContainer){if(o.pdfViewer.enableRtl)(n=o.previousX-e.clientX+t.offset[2])>(s=Math.floor(o.outerContainerWidth/2))&&(n=s),n<o.thumbnailWidthMin&&(n=o.thumbnailWidthMin),t.sideBarResizer.style.right=n+"px",t.sideBarContentContainer.style.width=n+"px",t.sideBarContent.style.width=n+"px",t.sideBarContentSplitter.style.width=n+"px",t.sideBarTitleContainer.style.width=n+"px",t.pdfViewerBase.viewerContainer.style.right=t.getViewerContainerLeft()+"px",t.pdfViewerBase.viewerContainer.style.left=t.getViewerContainerRight()+"px";else{var n=e.clientX+t.offset[0],s=Math.floor(o.outerContainerWidth/2);n>s&&(n=s),n<o.thumbnailWidthMin&&(n=o.thumbnailWidthMin),t.sideBarResizer.style.left=n+"px",t.closeDiv.style.left=n-t.contentContainerScrollWidth+"px",t.sideBarContentContainer.style.width=n+"px",t.sideBarContent.style.width=n+"px",t.sideBarContentSplitter.style.width=n+"px",t.sideBarTitleContainer.style.width=n+"px",t.pdfViewerBase.viewerContainer.style.left=t.getViewerContainerLeft()+"px",t.pdfViewerBase.viewerContainer.style.right=t.getViewerContainerRight()+"px"}var a=t.pdfViewer.element.clientWidth-t.getViewerContainerLeft()-t.getViewerContainerRight();t.pdfViewerBase.viewerContainer.style.width=a+"px",t.pdfViewerBase.pageContainer.style.width=t.pdfViewerBase.viewerContainer.clientWidth+"px",t.pdfViewer.thumbnailViewModule.gotoThumbnailImage(t.pdfViewerBase.currentPageNumber-1),t.pdfViewerBase.updateZoomValue(),t.bookmarkButton.children[0].classList.contains("e-pv-bookmark-disable-icon")||t.pdfViewer.bookmarkViewModule.setBookmarkContentHeight()}else t.isCommentPanelShow&&o.commentPanelContainer&&o.updateCommentPanelContainer(e)}},this.sideToolbarOnClose=function(e){var t=o;t.removeThumbnailSelectionIconTheme(),t.removeBookmarkSelectionIconTheme(),t.updateViewerContainerOnClose()},this.sideToolbarOnClick=function(e){o.sideBarTitle.textContent=o.pdfViewer.localeObj.getConstant("Page Thumbnails"),o.sideBarContent.setAttribute("aria-label","Thumbnail View Panel");var i=o,n=t.isBlazor()?o.pdfViewer.element.querySelector(".e-pv-bookmark-view"):document.getElementById(o.pdfViewer.element.id+"_bookmark_view");if(n&&(i.removeBookmarkSelectionIconTheme(),n.style.display="none"),document.getElementById(o.pdfViewer.element.id+"_thumbnail_view").style.display="flex",i.sideBarContentContainer&&("none"!==i.sideBarContentContainer.style.display?i.isBookmarkOpen?(i.isThumbnailOpen=!0,i.setThumbnailSelectionIconTheme(),o.updateViewerContainerOnExpand()):(i.isThumbnailOpen=!1,i.removeThumbnailSelectionIconTheme(),o.updateViewerContainerOnClose()):(o.sideBarContent.focus(),i.isThumbnailOpen=!0,i.setThumbnailSelectionIconTheme(),o.updateViewerContainerOnExpand())),i.isBookmarkOpen=!1,o.pdfViewer.annotationModule&&o.pdfViewer.annotationModule.inkAnnotationModule){var s=parseInt(o.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);o.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(s)}},this.openThumbnailPane=function(){var e=o,t=document.getElementById(o.pdfViewer.element.id+"_sideBarContent"),i=document.getElementById(o.pdfViewer.element.id+"_sideBarContentContainer"),n=document.getElementById(o.pdfViewer.element.id+"_viewerContainer"),s=document.getElementById(o.pdfViewer.element.id+"_pageViewContainer");if(document.getElementById(o.pdfViewer.element.id+"_thumbnail_view").style.display="block",document.getElementById(o.pdfViewer.element.id+"_sideBarResizer").style.display="none",document.getElementById(o.pdfViewer.element.id+"_sideBarTitleContainer").style.display="none",document.getElementById(o.pdfViewer.element.id+"_sideBarContentSplitter").style.display="none",t.classList.add("e-thumbnail"),i.classList.add("e-thumbnail"),i&&(e.isThumbnail?(i.style.display="none",n.style.width=e.pdfViewer.element.clientWidth+"px",s.style.width=n.clientWidth+"px",n.style.left=i.clientWidth+"px",e.pdfViewerBase.updateZoomValue(),e.isThumbnail=!1):(t.focus(),i.style.display="block",n.style.width=e.pdfViewer.element.clientWidth-i.clientWidth+"px",s.style.width=n.clientWidth+"px",n.style.left=i.clientWidth+"px",e.pdfViewerBase.updateZoomValue(),e.pdfViewer.thumbnailViewModule.gotoThumbnailImage(e.pdfViewerBase.currentPageNumber-1),e.isThumbnail=!0)),o.pdfViewer.annotationModule&&o.pdfViewer.annotationModule.inkAnnotationModule){var a=parseInt(o.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);o.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(a)}},this.bookmarkButtonOnClick=function(e){o.openBookmarkcontentInitially()},this.commentPanelMouseDown=function(e){var t=o;t.offset=[t.commentPanelResizer.offsetLeft-e.clientX,t.commentPanelResizer.offsetTop-e.clientY,t.getViewerContainerRight()],o.isCommentPanelShow=!0,o.previousX=e.clientX,t.pdfViewerBase.viewerContainer.style.cursor="e-resize",t.commentPanelResizer.style.cursor="e-resize"},this.updateCommentPanelContainer=function(e){var t=o;if(o.pdfViewer.enableRtl)(i=e.clientX+t.offset[0])>(n=Math.floor(o.outerContainerWidth/2))&&(i=n),i<o.commentPanelWidthMin&&(i=o.commentPanelWidthMin),t.commentPanelResizer.style.left=i+"px",t.commentPanelContainer.style.width=i+"px",t.pdfViewerBase.viewerContainer.style.left=t.getViewerContainerRight()+"px",t.pdfViewerBase.viewerContainer.style.right=t.getViewerContainerLeft()+"px";else{var i=o.previousX-e.clientX+t.offset[2],n=Math.floor(o.outerContainerWidth/2);i>n&&(i=n),i<o.commentPanelWidthMin&&(i=o.commentPanelWidthMin),t.commentPanelResizer.style.right=i+"px",t.commentPanelContainer.style.width=i+"px",t.pdfViewerBase.viewerContainer.style.right=t.getViewerContainerRight()+"px",t.pdfViewerBase.viewerContainer.style.left=t.getViewerContainerLeft()+"px"}o.pdfViewer.annotation.stickyNotesAnnotationModule.updateCommentPanelTextTop();var s=t.pdfViewer.element.clientWidth-t.getViewerContainerLeft()-t.getViewerContainerRight();t.pdfViewerBase.viewerContainer.style.width=s+"px",t.pdfViewerBase.pageContainer.style.width=t.pdfViewerBase.viewerContainer.clientWidth+"px",t.pdfViewerBase.updateZoomValue()},this.commentPanelMouseLeave=function(e){var t=o;t.commentPanelContainer&&(t.pdfViewerBase.viewerContainer.style.cursor="default",t.commentPanelContainer.style.cursor="default")},this.pdfViewer=i,this.pdfViewerBase=n}return i.prototype.initializeNavigationPane=function(){!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.createNavigationPane():(this.commentPanelContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_commantPanel",className:"e-pv-mobile-comments-container"}),this.pdfViewerBase.mainContainer.appendChild(this.commentPanelContainer),this.pdfViewer.enableRtl?this.commentPanelContainer.style.left="0px":this.commentPanelContainer.style.right="0px",this.commentPanelContainer.style.bottom="0px",this.createCommentPanelTitleContainer(),this.commentPanelContainer.style.display="none",this.commentsContentContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_commentscontentcontainer",className:"e-pv-comments-content-container"}),this.commentPanelContainer.appendChild(this.commentsContentContainer),this.createFileElement(this.commentPanelContainer),this.createXFdfFileElement(this.commentPanelContainer))},i.prototype.createNavigationPane=function(){t.isBlazor()?(this.sideBarToolbar=this.pdfViewer.element.querySelector(".e-pv-sidebar-toolbar"),this.sideBarToolbarSplitter=this.pdfViewer.element.querySelector(".e-pv-sidebar-toolbar-splitter"),this.sideBarContentContainer=this.pdfViewer.element.querySelector(".e-pv-sidebar-content-container"),this.sideBarContentSplitter=this.pdfViewer.element.querySelector(".e-pv-sidebar-content-splitter"),this.sideBarContent=this.pdfViewer.element.querySelector(".e-pv-sidebar-content"),this.sideBarTitleContainer=this.pdfViewer.element.querySelector(".e-pv-sidebar-title-container"),this.sideBarTitle=this.pdfViewer.element.querySelector(".e-pv-sidebar-title"),this.sideBarResizer=this.pdfViewer.element.querySelector(".e-pv-sidebar-resizer")):(this.sideBarToolbar=t.createElement("div",{id:this.pdfViewer.element.id+"_sideBarToolbar",className:"e-pv-sidebar-toolbar",attrs:{role:"toolbar","aria-orientation":"vertical",tabindex:"-1"}}),this.sideBarToolbarSplitter=t.createElement("div",{id:this.pdfViewer.element.id+"_sideBarToolbarSplitter",className:"e-pv-sidebar-toolbar-splitter"}),this.sideBarContentContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_sideBarContentContainer",className:"e-pv-sidebar-content-container"}),this.sideBarContentSplitter=t.createElement("div",{id:this.pdfViewer.element.id+"_sideBarContentSplitter",className:"e-pv-sidebar-content-splitter"}),this.sideBarContent=t.createElement("div",{id:this.pdfViewer.element.id+"_sideBarContent",className:"e-pv-sidebar-content",attrs:{tabindex:"0"}}),this.sideBarTitleContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_sideBarTitleContainer",className:"e-pv-sidebar-title-container"}),this.sideBarTitle=t.createElement("div",{id:this.pdfViewer.element.id+"_sideBarTitle",className:"e-pv-sidebar-title",attrs:{tabindex:"-1"}}),this.sideBarResizer=t.createElement("div",{id:this.pdfViewer.element.id+"_sideBarResizer",className:"e-pv-sidebar-resizer"})),this.pdfViewerBase.mainContainer.appendChild(this.sideBarToolbar),this.pdfViewer.enableRtl&&(this.sideBarToolbar.style.cssFloat="right",this.sideBarToolbar.style.right="1px",this.sideBarToolbar.style.position="relative"),this.pdfViewerBase.mainContainer.appendChild(this.sideBarToolbarSplitter),this.pdfViewer.enableRtl?this.sideBarToolbarSplitter.classList.add("e-right"):this.sideBarToolbarSplitter.classList.add("e-left"),this.pdfViewer.enableRtl?this.sideBarContentContainer.classList.add("e-right"):this.sideBarContentContainer.classList.add("e-left"),this.pdfViewerBase.mainContainer.appendChild(this.sideBarContentContainer),this.pdfViewer.enableRtl&&(this.sideBarContentSplitter.style.right="0px"),this.sideBarContentContainer.appendChild(this.sideBarContentSplitter),this.pdfViewer.enableRtl&&(this.sideBarContent.style.right="0px",this.sideBarContent.style.direction="rtl"),this.sideBarContentContainer.appendChild(this.sideBarContent),this.pdfViewer.enableRtl&&(this.sideBarTitleContainer.style.right="0px"),this.pdfViewer.enableRtl?this.sideBarTitle.classList.add("e-right"):this.sideBarTitle.classList.add("e-left"),this.sideBarTitleContainer.appendChild(this.sideBarTitle),this.sideBarContentContainer.appendChild(this.sideBarTitleContainer),this.sideBarResizer.addEventListener("mousedown",this.resizePanelMouseDown),this.pdfViewerBase.mainContainer.addEventListener("mousemove",this.resizePanelMouseMove),this.pdfViewerBase.mainContainer.addEventListener("mouseup",this.resizeViewerMouseLeave),this.pdfViewer.enableRtl?this.sideBarResizer.classList.add("e-right"):this.sideBarResizer.classList.add("e-left"),this.sideBarContentContainer.appendChild(this.sideBarResizer),this.createCommentPanel();var e=this.getViewerContainerLeft(),i=this.getViewerContainerRight();this.pdfViewer.enableRtl||(this.pdfViewerBase.viewerContainer.style.left=e+"px",this.pdfViewerBase.viewerContainer.style.right=i+"px"),this.pdfViewerBase.viewerContainer.style.width=this.pdfViewer.element.clientWidth-e-this.commentPanelContainer.clientWidth+"px",this.sideBarContentContainer.style.display="none",this.createSidebarToolBar(),this.createSidebarTitleCloseButton(),this.createResizeIcon(),this.sideBarToolbar.addEventListener("mouseup",this.sideToolbarOnMouseup.bind(this)),this.sideBarContentContainer.addEventListener("mouseup",this.sideBarTitleOnMouseup.bind(this))},i.prototype.adjustPane=function(){if(t.isBlazor()){var e=this.pdfViewer.element.querySelector(".e-pv-sidebar-toolbar-splitter"),i=this.pdfViewer.element.querySelector(".e-pv-sidebar-toolbar"),n=this.pdfViewer.element.querySelector(".e-pv-sidebar-content-container");0===(s=(o=this.pdfViewer.element.querySelector(".e-pv-toolbar")).getBoundingClientRect().height)&&(s=parseFloat(window.getComputedStyle(o).height)+1),this.pdfViewer.enableToolbar||(s=0),i.style.top=s+"px",n.style.top=s+"px",e.style.top=s+"px",i.style.height=this.getSideToolbarHeight(s),n.style.height=this.getSideToolbarHeight(s),e.style.height=this.getSideToolbarHeight(s),this.pdfViewerBase.viewerContainer.style.height=this.getSideToolbarHeight(s)}else{var e=this.pdfViewerBase.getElement("_sideBarToolbarSplitter"),o=this.pdfViewerBase.getElement("_toolbarContainer"),s=o.getBoundingClientRect().height;0===s&&(s=parseFloat(window.getComputedStyle(o).height)+1),this.sideBarToolbar.style.top=s+"px",this.sideBarContentContainer.style.top=s+"px",e.style.top=s+"px"}},i.prototype.getSideToolbarHeight=function(e){var t=this.pdfViewer.element.getBoundingClientRect().height;return 0!==t?t-e+"px":""},i.prototype.createCommentPanel=function(){this.commentPanelContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_commantPanel",className:"e-pv-comment-panel"}),this.pdfViewerBase.mainContainer.appendChild(this.commentPanelContainer),this.pdfViewer.enableRtl?this.commentPanelContainer.style.left="0px":this.commentPanelContainer.style.right="0px",this.commentPanelContainer.style.bottom="0px",this.createCommentPanelTitleContainer(),this.commentPanelContainer.style.display="none",this.commentsContentContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_commentscontentcontainer",className:"e-pv-comments-content-container"}),this.commentPanelContainer.appendChild(this.commentsContentContainer),this.commentPanelResizer=t.createElement("div",{id:this.pdfViewer.element.id+"_commentPanelResizer",className:"e-pv-comment-panel-resizer"}),this.pdfViewer.enableRtl?this.commentPanelResizer.classList.add("e-left"):this.commentPanelResizer.classList.add("e-right"),this.commentPanelResizer.style.display="none",this.commentPanelResizer.addEventListener("mousedown",this.commentPanelMouseDown),this.pdfViewerBase.mainContainer.appendChild(this.commentPanelResizer),this.createCommentPanelResizeIcon(),this.createFileElement(this.commentPanelContainer),this.createXFdfFileElement(this.commentPanelContainer)},i.prototype.createCommentPanelTitleContainer=function(){var e=t.createElement("div",{id:this.pdfViewer.element.id+"_commentPanelTitleContainer",className:"e-pv-comment-panel-title-container"}),i=t.createElement("div",{id:this.pdfViewer.element.id+"_commentPanelTitle",className:"e-pv-comment-panel-title",attrs:{tabindex:"-1"}});i.innerText=this.pdfViewer.localeObj.getConstant("Comments");var n=t.createElement("button",{id:this.pdfViewer.element.id+"_annotations_btn"});n.setAttribute("aria-label","annotation button"),n.setAttribute("type","button"),n.className="e-btn e-pv-tbar-btn e-pv-comment-panel-title-close-div e-btn";var o=t.createElement("span",{id:this.pdfViewer.element.id+"_annotation_more_icon",className:"e-pv-more-icon e-pv-icon"});if(n.appendChild(o),t.Browser.isDevice&&!t.isBlazor()){var s=t.createElement("button");s.setAttribute("aria-label","annotation button"),s.setAttribute("type","button"),s.style.borderColor="transparent",s.style.paddingTop="11px",s.style.paddingBottom="11px",s.style.backgroundColor="#fafafa",s.addEventListener("click",this.closeCommentPanelContainer.bind(this)),i.style.left="37px";var a=t.createElement("span",{className:"e-pv-annotation-tools-close-icon e-pv-icon"});s.appendChild(a),e.appendChild(s)}e.appendChild(i),e.appendChild(n),this.commentPanelContainer.appendChild(e),this.createAnnotationContextMenu(),n.addEventListener("click",this.openAnnotationContextMenu.bind(this))},i.prototype.createCommentPanelResizeIcon=function(){this.commentPanelResizeIcon=t.createElement("div",{id:this.pdfViewer.element.id+"_resize",className:"e-pv-resize-icon e-pv-icon"}),this.setCommentPanelResizeIconTop(),this.commentPanelResizeIcon.style.position="absolute",this.commentPanelResizer.appendChild(this.commentPanelResizeIcon)},i.prototype.openAnnotationContextMenu=function(e){this.annotationMenuObj.open(e.clientY,e.clientX,e.currentTarget)},i.prototype.createAnnotationContextMenu=function(){this.annotationContextMenu=[{text:this.pdfViewer.localeObj.getConstant("Export Annotations")},{text:this.pdfViewer.localeObj.getConstant("Import Annotations")},{text:this.pdfViewer.localeObj.getConstant("Export XFDF")},{text:this.pdfViewer.localeObj.getConstant("Import XFDF")}];var e=t.createElement("ul",{id:this.pdfViewer.element.id+"_annotation_context_menu"});this.pdfViewer.element.appendChild(e),this.annotationMenuObj=new r.ContextMenu({target:"#"+this.pdfViewer.element.id+"_annotations_btn",items:this.annotationContextMenu,select:this.annotationMenuItemSelect.bind(this)}),this.pdfViewer.enableRtl&&(this.annotationMenuObj.enableRtl=!0),this.annotationMenuObj.appendTo(e),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.annotationMenuObj.animationSettings.effect="ZoomIn":this.annotationMenuObj.animationSettings.effect="SlideDown"},i.prototype.annotationMenuItemSelect=function(t){if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var i=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(i)}if(t.item)switch(t.item.text){case this.pdfViewer.localeObj.getConstant("Export Annotations"):this.pdfViewerBase.exportAnnotations(e.AnnotationDataFormat.Json);break;case this.pdfViewer.localeObj.getConstant("Import Annotations"):this.importAnnotationIconClick(t);break;case this.pdfViewer.localeObj.getConstant("Export XFDF"):this.pdfViewerBase.exportAnnotations(e.AnnotationDataFormat.Xfdf);break;case this.pdfViewer.localeObj.getConstant("Import XFDF"):this.importXFdfAnnotationIconClick(t)}},i.prototype.createFileElement=function(e){this.annotationInputElement=t.createElement("input",{id:this.pdfViewer.element.id+"_annotationUploadElement",styles:"position:fixed; left:-100em",attrs:{type:"file","aria-label":"upload elements"}}),this.annotationInputElement.setAttribute("accept",".json"),e.appendChild(this.annotationInputElement),this.annotationInputElement.addEventListener("change",this.loadImportAnnotation)},i.prototype.createXFdfFileElement=function(e){this.annotationXFdfInputElement=t.createElement("input",{id:this.pdfViewer.element.id+"_annotationXFdfUploadElement",styles:"position:fixed; left:-100em",attrs:{type:"file","aria-label":"upload elements"}}),this.annotationXFdfInputElement.setAttribute("accept",".xfdf"),e.appendChild(this.annotationXFdfInputElement),this.annotationXFdfInputElement.addEventListener("change",this.loadImportAnnotation)},i.prototype.importAnnotationIconClick=function(e){this.annotationInputElement.click()},i.prototype.importXFdfAnnotationIconClick=function(e){this.annotationXFdfInputElement.click()},i.prototype.closeCommentPanelContainer=function(){var e=this,i=document.getElementById(this.pdfViewer.element.id+"_viewerContainer"),n=document.getElementById(this.pdfViewer.element.id+"_pageViewContainer"),o=document.getElementById(this.pdfViewer.element.id+"_commantPanel");o&&(o.style.display="none",e.commentPanelResizer&&(e.commentPanelResizer.style.display="none"),i&&(this.pdfViewer.enableRtl?i.style.left=e.getViewerContainerRight()+"px":i.style.right=e.getViewerContainerRight()+"px",i.style.width=e.pdfViewer.element.clientWidth-e.getViewerContainerLeft()-e.getViewerContainerRight()+"px",n.style.width=e.pdfViewerBase.viewerContainer.offsetWidth-e.getViewerContainerScrollbarWidth()+"px"),e.pdfViewerBase&&e.pdfViewerBase.updateZoomValue(),this.pdfViewer.annotation&&this.pdfViewer.annotation.textMarkupAnnotationModule&&this.pdfViewer.annotation.textMarkupAnnotationModule.showHideDropletDiv(!0),t.Browser.isDevice&&!t.isBlazor()&&this.pdfViewer.toolbarModule.annotationToolbarModule.toolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.toolbar.element.style.display="block",this.pdfViewer.toolbarModule.annotationToolbarModule.propertyToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.propertyToolbar.element.style.display="block")))},i.prototype.createNavigationPaneMobile=function(e){var i=this;this.isNavigationToolbarVisible=!0,this.toolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_navigationToolbar",className:"e-pv-nav-toolbar"}),this.pdfViewerBase.viewerMainContainer.insertBefore(this.toolbarElement,this.pdfViewerBase.viewerContainer);var n;if("search"===e){var o='<div class="e-input-group e-pv-search-input-mobile" id="'+this.pdfViewer.element.id+'_search_input_container"><input class="e-input" type="text" placeholder="'+this.pdfViewer.localeObj.getConstant("Find in document")+'" id="'+this.pdfViewer.element.id+'_search_input"></input></div>';n=[{prefixIcon:"e-pv-backward-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Go Back"),id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)},{template:o},{prefixIcon:"e-pv-search-icon e-pv-icon",id:this.pdfViewer.element.id+"_search_box-icon",click:function(){var e=i.pdfViewerBase.getElement("_search_box-icon").firstElementChild;e.classList.contains("e-pv-search-close")&&i.enableSearchItems(!1),i.pdfViewer.textSearchModule.searchButtonClick(e,i.searchInput)}},{prefixIcon:"e-pv-prev-search-icon e-pv-icon",id:this.pdfViewer.element.id+"_prev_occurrence",click:function(e){i.pdfViewer.textSearchModule.searchPrevious()}},{prefixIcon:"e-pv-next-search-icon e-pv-icon",id:this.pdfViewer.element.id+"_next_occurrence",click:function(e){i.pdfViewer.textSearchModule.searchNext()}}]}else n=[{prefixIcon:"e-pv-backward-icon e-pv-icon",id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)},{text:this.pdfViewer.localeObj.getConstant("Bookmarks")}];this.toolbar=new r.Toolbar({items:n,width:"",height:"",overflowMode:"Popup"}),this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.toolbarElement),"search"===e?this.initiateSearchBox():this.initiateBookmarks()},i.prototype.initiateSearchBox=function(){var e=this;this.searchInput=this.pdfViewerBase.getElement("_search_input"),this.pdfViewer.textSearchModule.searchBtn=this.pdfViewerBase.getElement("_search_box-icon").firstElementChild,this.searchInput.addEventListener("keyup",function(t){e.enableSearchItems(!0);e.searchInput.value;13===t.which?e.initiateTextSearch():e.pdfViewer.textSearchModule.resetVariables()}),this.pdfViewer.textSearchModule.searchInput=this.searchInput,this.setSearchInputWidth(),this.enableSearchItems(!1),this.searchInput.focus()},i.prototype.enableSearchItems=function(e){t.isBlazor()?this.pdfViewer._dotnetInstance.invokeMethodAsync("EnableSearchItems",e):(this.toolbar.enableItems(this.pdfViewerBase.getElement("_prev_occurrence").parentElement,e),this.toolbar.enableItems(this.pdfViewerBase.getElement("_next_occurrence").parentElement,e))},i.prototype.initiateBookmarks=function(){if(t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){this.pdfViewerBase.mobileScrollerContainer.style.display="none";for(var e=document.querySelectorAll(".e-pv-mobile-annotation-toolbar"),i=0;i<e.length;i++)e[i].style.display="none"}var n=t.createElement("div",{id:this.pdfViewer.element.id+"_bookmarks_container",className:"e-pv-bookmark-container"});n.style.width="100%",n.style.height=this.pdfViewerBase.viewerContainer.style.height,this.pdfViewerBase.getElement("_viewerMainContainer").appendChild(n),this.pdfViewerBase.viewerContainer.style.display="none",this.isBookmarkListOpen=!0,this.pdfViewer.bookmarkViewModule.renderBookmarkContentMobile()},i.prototype.initiateTextSearch=function(){var e=this.searchInput.value;this.pdfViewer.textSearchModule.initiateSearch(e)},i.prototype.goBackToToolbar=function(){if(this.isNavigationToolbarVisible=!1,(!t.isBlazor()||t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode)&&t.isBlazor()||this.pdfViewer.textSearchModule.cancelTextSearch(),this.searchInput=null,0!==this.pdfViewer.bookmarkViewModule.childNavigateCount)this.pdfViewer.bookmarkViewModule.bookmarkList.back(),this.pdfViewer.bookmarkViewModule.childNavigateCount--;else{null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);var e=this.pdfViewerBase.getElement("_bookmarks_container");e&&(e.parentElement.removeChild(e),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.pdfViewerBase.mobileScrollerContainer.style.display="")),this.toolbarElement&&null!=this.toolbarElement.parentElement&&this.toolbarElement.parentElement.removeChild(this.toolbarElement),this.pdfViewerBase.viewerContainer.style.display="block",this.isBookmarkListOpen=!1,t.isBlazor()?this.pdfViewerBase.onWindowResize():this.pdfViewer.toolbar.annotationToolbarModule.isMobileAnnotEnabled||this.pdfViewer.toolbarModule.showToolbar(!0)}},i.prototype.setSearchInputWidth=function(){var e=this.searchInput.parentElement,i=window.getComputedStyle(e.parentElement,null).getPropertyValue("padding-left");t.isBlazor()&&t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.toolbarElement=this.pdfViewerBase.getElement("_navigationToolbar"));var n=this.toolbarElement.clientWidth-this.getParentElementSearchBox("_backward").clientWidth-this.getParentElementSearchBox("_search_box-icon").clientWidth-this.getParentElementSearchBox("_prev_occurrence").clientWidth-this.getParentElementSearchBox("_next_occurrence").clientWidth-6;""!==i&&(n-=2*parseFloat(i)),e.style.width=n+"px"},i.prototype.getParentElementSearchBox=function(e){return this.pdfViewerBase.getElement(e).parentElement},i.prototype.createTooltipMobile=function(e){if(this.isTooltipCreated){if(this.toastObject){this.toastObject.title=e;var t=this.pdfViewerBase.getElement("_container_tooltip").firstElementChild;if(t)t.style.width="auto",t.firstElementChild.firstElementChild.textContent=e;else{this.isTooltipCreated=!1;var i=this.pdfViewerBase.getElement("_container_tooltip");this.toastObject&&this.toastObject.destroy(),i.parentElement.removeChild(i),this.toastObject=null,this.createMobileTooltip(e)}}}else this.createMobileTooltip(e)},i.prototype.createMobileTooltip=function(e){var i=t.createElement("div",{className:"e-pv-container-tooltip",id:this.pdfViewer.element.id+"_container_tooltip"});this.pdfViewer.element.appendChild(i),this.toastObject=new l.Toast({title:e,target:this.pdfViewer.element,close:this.onTooltipClose.bind(this),position:{X:0,Y:0},animation:{hide:{duration:200,effect:"FadeOut"}}}),this.toastObject.appendTo(i);var n=.65*this.pdfViewer.element.clientHeight,o=(this.pdfViewer.element.clientWidth-i.clientWidth)/2;this.isTooltipCreated=!0,this.toastObject.show({position:{X:o,Y:n}});var s=i.firstElementChild;s&&(s.style.width="auto")},i.prototype.onTooltipClose=function(e){if(this.pdfViewer.textSearchModule){this.isTooltipCreated=!1;var t=this.pdfViewerBase.getElement("_container_tooltip");this.pdfViewer.textSearchModule.isMessagePopupOpened=!1,this.toastObject&&this.toastObject.destroy(),t.parentElement.removeChild(t),this.toastObject=null}},i.prototype.toolbarResize=function(){this.searchInput&&(this.searchInput.style.width="auto",this.setSearchInputWidth())},i.prototype.createSidebarToolBar=function(){if(t.isBlazor())this.thumbnailButton=this.pdfViewer.element.querySelector(".e-pv-thumbnail-view-button"),this.bookmarkButton=this.pdfViewer.element.querySelector(".e-pv-bookmark-button");else{this.thumbnailButton=t.createElement("button",{id:this.pdfViewer.element.id+"_thumbnail-view",attrs:{disabled:"disabled","aria-label":"Page Thumbnails",tabindex:"-1"}}),this.thumbnailButton.className="e-pv-tbar-btn e-pv-thumbnail-view-button e-btn",this.thumbnailButton.setAttribute("type","button");var e=t.createElement("span",{id:this.pdfViewer.element.id+"_thumbnail-view_icon",className:"e-pv-thumbnail-view-disable-icon e-pv-icon"});this.thumbnailButton.appendChild(e),new o.Tooltip({content:this.pdfViewer.localeObj.getConstant("Page Thumbnails"),opensOn:"Hover",beforeOpen:this.onTooltipBeforeOpen.bind(this)}).appendTo(this.thumbnailButton),this.bookmarkButton=t.createElement("button",{id:this.pdfViewer.element.id+"_bookmark",attrs:{disabled:"disabled","aria-label":"Bookmarks",tabindex:"-1"}}),this.bookmarkButton.setAttribute("type","button"),this.bookmarkButton.className="e-pv-tbar-btn e-pv-bookmark-button e-btn";var i=t.createElement("span",{id:this.pdfViewer.element.id+"_bookmark_icon",className:"e-pv-bookmark-disable-icon e-pv-icon"});this.bookmarkButton.appendChild(i),new o.Tooltip({content:this.pdfViewer.localeObj.getConstant("Bookmarks"),opensOn:"Hover",beforeOpen:this.onTooltipBeforeOpen.bind(this)}).appendTo(this.bookmarkButton),this.sideBarToolbar.appendChild(this.thumbnailButton),this.sideBarToolbar.appendChild(this.bookmarkButton)}this.thumbnailButton.addEventListener("click",this.sideToolbarOnClick),this.bookmarkButton.addEventListener("click",this.bookmarkButtonOnClick)},i.prototype.onTooltipBeforeOpen=function(e){this.pdfViewer.toolbarSettings.showTooltip||(e.cancel=!0)},i.prototype.enableThumbnailButton=function(){this.thumbnailButton&&(this.thumbnailButton.removeAttribute("disabled"),this.thumbnailButton.children[0].classList.remove("e-pv-thumbnail-view-disable-icon"),this.thumbnailButton.children[0].classList.add("e-pv-thumbnail-view-icon"))},i.prototype.enableBookmarkButton=function(){this.bookmarkButton&&(this.bookmarkButton.removeAttribute("disabled"),this.bookmarkButton.children[0].classList.remove("e-pv-bookmark-disable-icon"),this.bookmarkButton.children[0].classList.add("e-pv-bookmark-icon"))},i.prototype.createSidebarTitleCloseButton=function(){this.closeDiv=t.createElement("button",{id:this.pdfViewer.element.id+"_close_btn"}),this.closeDiv.setAttribute("aria-label","close button"),this.closeDiv.setAttribute("type","button"),this.closeDiv.className="e-btn e-pv-tbar-btn e-pv-title-close-div e-btn",this.pdfViewer.enableRtl?this.closeDiv.style.left="8px":this.closeDiv.style.left=this.closeButtonLeft+"px";var e=t.createElement("span",{id:this.pdfViewer.element.id+"_close_icon",className:"e-pv-title-close-icon e-pv-icon"});this.closeDiv.appendChild(e),this.sideBarTitleContainer.appendChild(this.closeDiv),this.closeDiv.addEventListener("click",this.sideToolbarOnClose)},i.prototype.createResizeIcon=function(){this.resizeIcon=t.createElement("div",{id:this.pdfViewer.element.id+"_resize",className:"e-pv-resize-icon e-pv-icon"}),this.setResizeIconTop(),this.resizeIcon.style.position="absolute",this.resizeIcon.addEventListener("click",this.sideToolbarOnClose),this.resizeIcon.addEventListener("mouseover",this.resizeIconMouseOver),this.sideBarResizer.appendChild(this.resizeIcon)},i.prototype.setResizeIconTop=function(){this.sideBarToolbar&&this.sideBarToolbar.clientHeight&&""===this.resizeIcon.style.top&&(this.resizeIcon.style.top=this.sideBarToolbar.clientHeight/2+"px")},i.prototype.setCommentPanelResizeIconTop=function(){this.commentPanelContainer&&this.commentPanelContainer.clientHeight&&this.commentPanelResizeIcon&&""===this.commentPanelResizeIcon.style.top&&(this.commentPanelResizeIcon.style.top=this.commentPanelContainer.clientHeight/2+"px")},Object.defineProperty(i.prototype,"outerContainerWidth",{get:function(){return this.mainContainerWidth||(this.mainContainerWidth=this.pdfViewerBase.mainContainer.clientWidth),this.mainContainerWidth},enumerable:!0,configurable:!0}),i.prototype.getViewerContainerScrollbarWidth=function(){return this.pdfViewerBase.viewerContainer.offsetWidth+this.pdfViewerBase.viewerContainer.offsetLeft-(this.pdfViewerBase.viewerContainer.clientWidth+this.pdfViewerBase.viewerContainer.offsetLeft)},Object.defineProperty(i.prototype,"sideToolbarWidth",{get:function(){return this.sideBarToolbar?this.sideBarToolbar.clientWidth:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sideBarContentContainerWidth",{get:function(){return this.sideBarContentContainer?this.sideBarContentContainer.clientWidth:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"commentPanelContainerWidth",{get:function(){return this.commentPanelContainer?this.commentPanelContainer.offsetWidth:0},enumerable:!0,configurable:!0}),i.prototype.updateViewerContainerOnClose=function(){var e=this;e.sideBarContentContainer&&(e.sideBarContentContainer.style.display="none",this.pdfViewer.enableRtl?e.pdfViewerBase.viewerContainer.style.right=e.sideToolbarWidth+"px":e.pdfViewerBase.viewerContainer.style.left=e.sideToolbarWidth+"px",e.pdfViewerBase.viewerContainer.style.width=e.pdfViewer.element.clientWidth-e.sideToolbarWidth-e.getViewerContainerRight()+"px",e.pdfViewerBase.pageContainer.style.width=e.pdfViewerBase.viewerContainer.offsetWidth-e.getViewerContainerScrollbarWidth()+"px",e.pdfViewerBase.updateZoomValue())},i.prototype.updateViewerContainerOnExpand=function(){var e=this;e.sideBarContentContainer&&(e.sideBarContentContainer.style.display="block",this.pdfViewer.enableRtl?e.pdfViewerBase.viewerContainer.style.right=e.getViewerContainerLeft()+"px":e.pdfViewerBase.viewerContainer.style.left=e.getViewerContainerLeft()+"px",e.pdfViewerBase.viewerContainer.style.width=e.pdfViewer.element.clientWidth-this.getViewerContainerLeft()-this.getViewerContainerRight()+"px",e.pdfViewerBase.pageContainer.style.width=e.pdfViewerBase.viewerContainer.clientWidth+"px",e.pdfViewerBase.updateZoomValue(),e.pdfViewer.enableThumbnail&&e.pdfViewer.thumbnailViewModule.gotoThumbnailImage(e.pdfViewerBase.currentPageNumber-1))},i.prototype.getViewerContainerLeft=function(){return this.sideToolbarWidth?this.sideToolbarWidth+this.sideBarContentContainerWidth:0},i.prototype.getViewerContainerRight=function(){return this.commentPanelResizer?this.commentPanelContainerWidth+this.commentPanelResizer.clientWidth:0},i.prototype.getViewerMainContainerWidth=function(){return this.pdfViewer.element.clientWidth-this.sideToolbarWidth},i.prototype.setThumbnailSelectionIconTheme=function(){this.thumbnailButton&&(this.thumbnailButton.children[0].classList.remove("e-pv-thumbnail-view-icon"),this.thumbnailButton.children[0].classList.add("e-pv-thumbnail-view-selection-icon"),this.thumbnailButton.classList.add("e-pv-thumbnail-view-button-selection"))},i.prototype.removeThumbnailSelectionIconTheme=function(){this.thumbnailButton&&(this.thumbnailButton.children[0].classList.add("e-pv-thumbnail-view-icon"),this.thumbnailButton.children[0].classList.remove("e-pv-thumbnail-view-selection-icon"),this.thumbnailButton.classList.remove("e-pv-thumbnail-view-button-selection"))},i.prototype.resetThumbnailIcon=function(){this.thumbnailButton&&(this.thumbnailButton.children[0].classList.remove("e-pv-thumbnail-view-icon"),this.thumbnailButton.children[0].classList.add("e-pv-thumbnail-view-disable-icon"))},i.prototype.resetThumbnailView=function(){this.sideBarContentContainer&&(this.sideBarContentContainer.style.display="none",this.pdfViewer.enableRtl?this.pdfViewerBase.viewerContainer.style.left="1px":this.pdfViewerBase.viewerContainer.style.left=this.sideToolbarWidth+"px",this.pdfViewerBase.viewerContainer.style.width=this.pdfViewer.element.clientWidth-this.sideToolbarWidth-this.getViewerContainerRight()+"px",this.pdfViewerBase.pageContainer&&(this.pdfViewerBase.pageContainer.style.width=this.pdfViewerBase.viewerContainer.clientWidth+"px"),this.thumbnailButton.setAttribute("disabled","disabled"),this.removeThumbnailSelectionIconTheme(),this.resetThumbnailIcon())},i.prototype.setBookmarkSelectionIconTheme=function(){this.bookmarkButton&&(this.bookmarkButton.children[0].classList.remove("e-pv-bookmark-icon"),this.bookmarkButton.children[0].classList.add("e-pv-bookmark-selection-icon"),this.bookmarkButton.classList.add("e-pv-bookmark-button-selection"))},i.prototype.removeBookmarkSelectionIconTheme=function(){this.bookmarkButton&&(this.bookmarkButton.children[0].classList.add("e-pv-bookmark-icon"),this.bookmarkButton.children[0].classList.remove("e-pv-bookmark-selection-icon"),this.bookmarkButton.classList.remove("e-pv-bookmark-button-selection"))},i.prototype.sideToolbarOnMouseup=function(e){e.target===this.sideBarToolbar&&this.pdfViewerBase.focusViewerContainer()},i.prototype.sideBarTitleOnMouseup=function(e){this.pdfViewerBase.focusViewerContainer()},i.prototype.openBookmarkcontentInitially=function(){var e=this;if(document.getElementById(this.pdfViewer.element.id+"_thumbnail_view")&&(document.getElementById(this.pdfViewer.element.id+"_thumbnail_view").style.display="none"),this.removeThumbnailSelectionIconTheme(),this.sideBarTitle.textContent=this.pdfViewer.localeObj.getConstant("Bookmarks"),this.sideBarContent.setAttribute("aria-label","Bookmark View Panel"),this.pdfViewer.bookmarkViewModule.renderBookmarkcontent(),this.sideBarContentContainer&&("none"!==e.sideBarContentContainer.style.display?this.isThumbnailOpen?(this.setBookmarkSelectionIconTheme(),this.isBookmarkOpen=!0,this.updateViewerContainerOnExpand()):(this.removeBookmarkSelectionIconTheme(),this.isBookmarkOpen=!1,this.updateViewerContainerOnClose()):(this.sideBarContent.focus(),this.setBookmarkSelectionIconTheme(),this.isBookmarkOpen=!0,this.updateViewerContainerOnExpand())),this.isThumbnailOpen=!1,this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var t=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(t)}},i.prototype.disableBookmarkButton=function(){this.sideBarContentContainer&&(this.sideBarContentContainer.style.display="none",this.bookmarkButton.setAttribute("disabled","disabled"),this.bookmarkButton.children[0].classList.add("e-pv-bookmark-disable-icon"))},i.prototype.clear=function(){t.Browser.isDevice||(this.removeBookmarkSelectionIconTheme(),this.removeThumbnailSelectionIconTheme(),this.closeCommentPanelContainer()),this.commentsContentContainer&&(this.commentsContentContainer.innerHTML="")},i.prototype.destroy=function(){this.annotationMenuObj&&this.annotationMenuObj.destroy()},i.prototype.getModuleName=function(){return"NavigationPane"},i}(),Dt=function(){function e(e,t){this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.createContextMenu=function(){var e=document.getElementsByClassName(this.pdfViewer.element.id+"_context_menu");if(e&&(this.contextMenuElement=e[0],this.contextMenuElement.children&&this.contextMenuElement.children.length>0)){var t=this.contextMenuElement.children[0];t.className=t.className+" e-pv-context-menu"}},e.prototype.open=function(e,t,i){this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenContextMenu",e,t)},e.prototype.close=function(){this.pdfViewer._dotnetInstance.invokeMethodAsync("CloseContextMenu")},e.prototype.destroy=function(){this.previousAction="",this.contextMenuElement=null},e.prototype.OnItemSelected=function(e){"string"==typeof e?this.pdfViewerBase.OnItemSelected(e):this.pdfViewerBase.OnItemSelected(e[0])},e}(),bt={},It=null,vt=null,Et=30,Vt=30,zt=30,kt=36,Ot="e-spin-show",Pt="e-spin-hide",Ft="e-spin-material",Bt="e-spin-fabric",Yt="e-spin-bootstrap",Ut="e-spin-bootstrap4",Qt="e-spin-high-contrast",_t="e-spinner-pane",Rt="e-spinner-inner",Wt="e-path-circle",Jt="e-path-arc",Ht="e-spin-label",Gt="e-spin-template",Zt=function(){function e(e,t){this.pdfViewer=null,this.pdfViewerBase=null,this.totalPageElement=null,this.currentPageBoxElementContainer=null,this.currentPageBoxElement=null,this.firstPageElement=null,this.previousPageElement=null,this.nextPageElement=null,this.lastPageElement=null,this.zommOutElement=null,this.zoomInElement=null,this.zoomDropDownElement=null,this.selectToolElement=null,this.handToolElement=null,this.undoElement=null,this.redoElement=null,this.commentElement=null,this.submitFormButton=null,this.searchElement=null,this.annotationElement=null,this.printElement=null,this.downloadElement=null,this.highlightElement=null,this.underlineElement=null,this.strikeThroughElement=null,this.shapeElement=null,this.calibrateElement=null,this.stampElement=null,this.freeTextElement=null,this.signatureElement=null,this.inkElement=null,this.annotationFontSizeInputElement=null,this.annotationFontFamilyInputElement=null,this.annotationColorElement=null,this.annotationStrokeColorElement=null,this.annotationThicknessElement=null,this.annotationOpacityElement=null,this.annotationFontColorElement=null,this.annotationFontFamilyElement=null,this.annotationFontSizeElement=null,this.annotationTextAlignElement=null,this.annotationTextColorElement=null,this.annotationTextPropertiesElement=null,this.annotationDeleteElement=null,this.annotationCloseElement=null,this.annotationCommentPanelElement=null,this.mobileToolbarContainerElement=null,this.mobileSearchPreviousOccurenceElement=null,this.mobileSearchNextOccurenceElement=null,this.cssClass="e-overlay",this.disableClass=" e-overlay",this.pdfViewer=e,this.pdfViewerBase=t,this.findToolbarElements()}return e.prototype.findToolbarElements=function(){this.totalPageElement=this.pdfViewerBase.getElement("_totalPage").children[0],this.currentPageBoxElementContainer=this.pdfViewerBase.getElement("_currentPageInput"),this.currentPageBoxElement=this.pdfViewerBase.getElement("_currentPageInput").children[0].children[0],this.firstPageElement=this.pdfViewerBase.getElement("_firstPage"),this.previousPageElement=this.pdfViewerBase.getElement("_previousPage"),this.nextPageElement=this.pdfViewerBase.getElement("_nextPage"),this.lastPageElement=this.pdfViewerBase.getElement("_lastPage"),this.zommOutElement=this.pdfViewerBase.getElement("_zoomOut"),this.zoomInElement=this.pdfViewerBase.getElement("_zoomIn"),this.zoomDropDownElement=this.pdfViewerBase.getElement("_zoomDropDown"),this.selectToolElement=this.pdfViewerBase.getElement("_selectTool"),this.handToolElement=this.pdfViewerBase.getElement("_handTool"),this.undoElement=this.pdfViewerBase.getElement("_undo"),this.redoElement=this.pdfViewerBase.getElement("_redo"),this.commentElement=this.pdfViewerBase.getElement("_comment"),this.submitFormButton=this.pdfViewerBase.getElement("_submitFormButton"),this.searchElement=this.pdfViewerBase.getElement("_search"),this.annotationElement=this.pdfViewerBase.getElement("_annotation"),this.printElement=this.pdfViewerBase.getElement("_print"),this.downloadElement=this.pdfViewerBase.getElement("_download"),this.highlightElement=this.pdfViewerBase.getElement("_highLight"),this.underlineElement=this.pdfViewerBase.getElement("_underline"),this.strikeThroughElement=this.pdfViewerBase.getElement("_strikethrough"),this.shapeElement=this.pdfViewerBase.getElement("_annotation_shapes"),this.calibrateElement=this.pdfViewerBase.getElement("_annotation_calibrate"),this.stampElement=this.pdfViewerBase.getElement("_annotation_stamp"),this.freeTextElement=this.pdfViewerBase.getElement("_annotation_freeTextEdit"),this.signatureElement=this.pdfViewerBase.getElement("_annotation_signature"),this.inkElement=document.getElementById("InkAnnotation"),this.annotationFontSizeInputElement=this.pdfViewerBase.getElement("_annotation_fontsize").children[0].children[0],this.annotationFontFamilyInputElement=this.pdfViewerBase.getElement("_annotation_fontname").children[0].children[0],this.annotationColorElement=this.pdfViewerBase.getElement("_annotation_color"),this.annotationStrokeColorElement=this.pdfViewerBase.getElement("_annotation_stroke"),this.annotationThicknessElement=this.pdfViewerBase.getElement("_annotation_thickness"),this.annotationOpacityElement=this.pdfViewerBase.getElement("_annotation_opacity"),this.annotationFontColorElement=this.pdfViewerBase.getElement("_annotation_textcolor"),this.annotationFontFamilyElement=this.pdfViewerBase.getElement("_annotation_fontname"),this.annotationFontSizeElement=this.pdfViewerBase.getElement("_annotation_fontsize"),this.annotationTextAlignElement=this.pdfViewerBase.getElement("_annotation_textalign"),this.annotationTextColorElement=this.pdfViewerBase.getElement("_annotation_textcolor"),this.annotationTextPropertiesElement=this.pdfViewerBase.getElement("_annotation_textproperties"),this.annotationDeleteElement=this.pdfViewerBase.getElement("_annotation_delete"),this.annotationCommentPanelElement=this.pdfViewerBase.getElement("_annotation_commentPanel"),this.annotationCloseElement=this.pdfViewerBase.getElement("_annotation_close"),this.mobileToolbarContainerElement=this.pdfViewerBase.getElement("_mobileToolbarContainer"),this.mobileSearchPreviousOccurenceElement=this.pdfViewerBase.getElement("_prev_occurrence"),this.mobileSearchNextOccurenceElement=this.pdfViewerBase.getElement("_next_occurrence")},e.prototype.updateTotalPage=function(){this.totalPageElement.textContent=this.pdfViewer.localeObj.getConstant("of")+this.pdfViewerBase.pageCount.toString()},e.prototype.updateCurrentPage=function(e){this.currentPageBoxElement.value=e.toString()},e.prototype.loadDocument=function(){this.pdfViewer.enableNavigation&&(this.currentPageBoxElementContainer.classList.remove(this.cssClass),this.currentPageBoxElement.value="1",this.totalPageElement.textContent=this.pdfViewer.localeObj.getConstant("of")+this.pdfViewerBase.pageCount.toString(),this.isEnabled(this.firstPageElement)||(this.firstPageElement.className+=this.disableClass),this.isEnabled(this.previousPageElement)||(this.previousPageElement.className+=this.disableClass),this.nextPageElement.classList.remove(this.cssClass),this.lastPageElement.classList.remove(this.cssClass),1===this.pdfViewerBase.pageCount&&(this.nextPageElement.classList.contains(this.cssClass)||(this.nextPageElement.className+=this.disableClass),this.lastPageElement.classList.contains(this.cssClass)||(this.lastPageElement.className+=this.disableClass))),this.pdfViewer.enableMagnification&&(this.zoomInElement.classList.remove(this.cssClass),this.zommOutElement.classList.remove(this.cssClass),this.zoomDropDownElement.classList.remove(this.cssClass)),this.pdfViewer.enableTextSelection&&this.selectToolElement.classList.remove(this.cssClass),this.handToolElement.classList.remove(this.cssClass),this.pdfViewer.enableStickyNotesAnnotation&&this.commentElement.classList.remove(this.cssClass),this.pdfViewer.enableTextSearch&&this.searchElement.classList.remove(this.cssClass),this.pdfViewer.isFormFieldDocument&&this.submitFormButton.classList.remove(this.cssClass),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableAnnotationToolbar&&this.annotationElement.classList.remove(this.cssClass),this.pdfViewer.enablePrint&&this.printElement.classList.remove(this.cssClass),this.pdfViewer.enableDownload&&this.downloadElement.classList.remove(this.cssClass),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableTextMarkupAnnotation&&(this.highlightElement.classList.remove(this.cssClass),this.underlineElement.classList.remove(this.cssClass),this.strikeThroughElement.classList.remove(this.cssClass)),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableShapeAnnotation&&this.shapeElement.classList.remove(this.cssClass),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableMeasureAnnotation&&this.calibrateElement.classList.remove(this.cssClass),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableStampAnnotations&&this.stampElement.classList.remove(this.cssClass),this.pdfViewer.enableFreeText&&this.freeTextElement.classList.remove(this.cssClass),this.pdfViewer.enableHandwrittenSignature&&this.signatureElement.classList.remove(this.cssClass),this.pdfViewer.enableInkAnnotation&&this.inkElement.classList.remove(this.cssClass)},e.prototype.resetToolbar=function(){this.pdfViewer.enableToolbar&&(this.currentPageBoxElement.value="0",this.totalPageElement.textContent=this.pdfViewer.localeObj.getConstant("of")+"0",this.isEnabled(this.currentPageBoxElementContainer)||(this.currentPageBoxElementContainer.className+=this.disableClass),this.isEnabled(this.firstPageElement)||(this.firstPageElement.className+=this.disableClass),this.isEnabled(this.previousPageElement)||(this.previousPageElement.className+=this.disableClass),this.isEnabled(this.nextPageElement)||(this.nextPageElement.className+=this.disableClass),this.isEnabled(this.lastPageElement)||(this.lastPageElement.className+=this.disableClass),this.isEnabled(this.zoomInElement)||(this.zoomInElement.className+=this.disableClass),this.isEnabled(this.zommOutElement)||(this.zommOutElement.className+=this.disableClass),this.isEnabled(this.zoomDropDownElement)||(this.zoomDropDownElement.className+=this.disableClass),this.isEnabled(this.selectToolElement)||(this.selectToolElement.className+=this.disableClass),this.isEnabled(this.handToolElement)||(this.handToolElement.className+=this.disableClass),this.isEnabled(this.undoElement)||(this.undoElement.className+=this.disableClass),this.isEnabled(this.redoElement)||(this.redoElement.className+=this.disableClass),this.isEnabled(this.commentElement)||(this.commentElement.className+=this.disableClass),this.isEnabled(this.searchElement)||(this.searchElement.className+=this.disableClass),this.isEnabled(this.submitFormButton)||(this.submitFormButton.className+=this.disableClass),this.isEnabled(this.annotationElement)||(this.annotationElement.className+=this.disableClass),this.isEnabled(this.printElement)||(this.printElement.className+=this.disableClass),this.isEnabled(this.downloadElement)||(this.downloadElement.className+=this.disableClass)),this.pdfViewer.enableAnnotationToolbar&&(this.isEnabled(this.highlightElement)||(this.highlightElement.className+=this.disableClass),this.isEnabled(this.underlineElement)||(this.underlineElement.className+=this.disableClass),this.isEnabled(this.strikeThroughElement)||(this.strikeThroughElement.className+=this.disableClass),this.isEnabled(this.shapeElement)||(this.shapeElement.className+=this.disableClass),this.isEnabled(this.calibrateElement)||(this.calibrateElement.className+=this.disableClass),this.isEnabled(this.stampElement)||(this.stampElement.className+=this.disableClass),this.isEnabled(this.freeTextElement)||(this.freeTextElement.className+=this.disableClass),this.isEnabled(this.signatureElement)||(this.signatureElement.className+=this.disableClass),this.isEnabled(this.inkElement)||(this.inkElement.className+=this.disableClass),this.isEnabled(this.annotationFontFamilyElement)||(this.annotationFontFamilyElement.className+=this.disableClass),this.isEnabled(this.annotationFontSizeElement)||(this.annotationFontSizeElement.className+=this.disableClass),this.isEnabled(this.annotationTextColorElement)||(this.annotationTextColorElement.className+=this.disableClass),this.isEnabled(this.annotationTextAlignElement)||(this.annotationTextAlignElement.className+=this.disableClass),this.isEnabled(this.annotationTextPropertiesElement)||(this.annotationTextPropertiesElement.className+=this.disableClass),this.isEnabled(this.annotationColorElement)||(this.annotationColorElement.className+=this.disableClass),this.isEnabled(this.annotationStrokeColorElement)||(this.annotationStrokeColorElement.className+=this.disableClass),this.isEnabled(this.annotationThicknessElement)||(this.annotationThicknessElement.className+=this.disableClass),this.isEnabled(this.annotationOpacityElement)||(this.annotationOpacityElement.className+=this.disableClass),this.isEnabled(this.annotationOpacityElement)||(this.annotationDeleteElement.className+=this.disableClass),this.isEnabled(this.annotationCommentPanelElement)||(this.annotationCommentPanelElement.className+=this.disableClass))},e.prototype.pageChanged=function(e){this.pdfViewer.enableNavigation&&(this.currentPageBoxElement.value=e.toString()),e===this.pdfViewer.pageCount&&(this.isEnabled(this.nextPageElement)||(this.nextPageElement.className+=this.disableClass),this.previousPageElement.classList.remove(this.cssClass),this.isEnabled(this.lastPageElement)||(this.lastPageElement.className+=this.disableClass),this.firstPageElement.classList.remove(this.cssClass)),e<this.pdfViewer.pageCount&&1!==e&&(this.firstPageElement.classList.remove(this.cssClass),this.previousPageElement.classList.remove(this.cssClass),this.nextPageElement.classList.remove(this.cssClass),this.lastPageElement.classList.remove(this.cssClass)),1===e&&(this.nextPageElement.classList.remove(this.cssClass),this.lastPageElement.classList.remove(this.cssClass),this.isEnabled(this.firstPageElement)||(this.firstPageElement.className+=this.disableClass),this.isEnabled(this.previousPageElement)||(this.previousPageElement.className+=this.disableClass))},e.prototype.updateUndoRedoButton=function(e,t){"undo"===e&&(t?this.undoElement.classList.remove(this.cssClass):this.isEnabled(this.undoElement)||(this.undoElement.className+=this.disableClass)),"redo"===e&&(t?this.redoElement.classList.remove(this.cssClass):this.isEnabled(this.redoElement)||(this.redoElement.className+=this.disableClass))},e.prototype.disableUndoRedoButton=function(){this.isEnabled(this.undoElement)||(this.undoElement.className+=this.disableClass),this.isEnabled(this.redoElement)||(this.redoElement.className+=this.disableClass)},e.prototype.enableAnnotationPropertiesTool=function(e,t){t&&(e?(this.annotationColorElement.classList.remove(this.cssClass),this.annotationStrokeColorElement.classList.remove(this.cssClass),this.annotationThicknessElement.classList.remove(this.cssClass),this.annotationOpacityElement.classList.remove(this.cssClass),this.pdfViewer.enableShapeLabel&&(this.annotationFontColorElement.classList.remove(this.cssClass),this.annotationFontFamilyElement.classList.remove(this.cssClass),this.annotationFontSizeElement.classList.remove(this.cssClass)),this.isEnabled(this.annotationTextAlignElement)||(this.annotationTextAlignElement.className+=this.disableClass),this.isEnabled(this.annotationTextPropertiesElement)||(this.annotationTextPropertiesElement.className+=this.disableClass)):(this.isEnabled(this.annotationColorElement)||(this.annotationColorElement.className+=this.disableClass),this.isEnabled(this.annotationStrokeColorElement)||(this.annotationStrokeColorElement.className+=this.disableClass),this.isEnabled(this.annotationThicknessElement)||(this.annotationThicknessElement.className+=this.disableClass),this.isEnabled(this.annotationOpacityElement)||(this.annotationOpacityElement.className+=this.disableClass),this.isEnabled(this.annotationDeleteElement)||(this.annotationDeleteElement.className+=this.disableClass)))},e.prototype.enableFreeTextAnnotationPropertiesTools=function(e,t){t&&e&&(this.annotationColorElement.classList.remove(this.cssClass),this.annotationStrokeColorElement.classList.remove(this.cssClass),this.annotationThicknessElement.classList.remove(this.cssClass),this.annotationOpacityElement.classList.remove(this.cssClass),this.annotationFontColorElement.classList.remove(this.cssClass),this.annotationFontFamilyElement.classList.remove(this.cssClass),this.annotationFontSizeElement.classList.remove(this.cssClass),this.annotationTextAlignElement.classList.remove(this.cssClass),this.annotationTextPropertiesElement.classList.remove(this.cssClass),this.annotationDeleteElement.classList.remove(this.cssClass),this.annotationCommentPanelElement.classList.remove(this.cssClass))},e.prototype.enableStampAnnotationPropertiesTools=function(e,t){e?(this.annotationOpacityElement.classList.remove(this.cssClass),this.annotationDeleteElement.classList.remove(this.cssClass),this.annotationCommentPanelElement.classList.remove(this.cssClass)):(this.isEnabled(this.annotationOpacityElement)||(this.annotationOpacityElement.className+=this.disableClass),this.isEnabled(this.annotationDeleteElement)||(this.annotationDeleteElement.className+=this.disableClass),this.isEnabled(this.annotationCommentPanelElement)||(this.annotationCommentPanelElement.className+=this.disableClass)),this.isEnabled(this.annotationColorElement)||(this.annotationColorElement.className+=this.disableClass),this.isEnabled(this.annotationStrokeColorElement)||(this.annotationStrokeColorElement.className+=this.disableClass),this.isEnabled(this.annotationThicknessElement)||(this.annotationThicknessElement.className+=this.disableClass),this.isEnabled(this.annotationOpacityElement)||(this.annotationOpacityElement.className+=this.disableClass),this.isEnabled(this.annotationFontColorElement)||(this.annotationFontColorElement.className+=this.disableClass),this.isEnabled(this.annotationFontFamilyElement)||(this.annotationFontFamilyElement.className+=this.disableClass),this.isEnabled(this.annotationFontSizeElement)||(this.annotationFontSizeElement.className+=this.disableClass),this.isEnabled(this.annotationTextAlignElement)||(this.annotationTextAlignElement.className+=this.disableClass),this.isEnabled(this.annotationTextPropertiesElement)||(this.annotationTextPropertiesElement.className+=this.disableClass)},e.prototype.enableSignaturePropertiesTools=function(e,t){e?(this.annotationStrokeColorElement.classList.remove(this.cssClass),this.annotationThicknessElement.classList.remove(this.cssClass),this.annotationOpacityElement.classList.remove(this.cssClass),this.annotationDeleteElement.classList.remove(this.cssClass),this.annotationCommentPanelElement.classList.remove(this.cssClass)):(this.isEnabled(this.annotationStrokeColorElement)||(this.annotationStrokeColorElement.className+=this.disableClass),this.isEnabled(this.annotationThicknessElement)||(this.annotationThicknessElement.className+=this.disableClass),this.isEnabled(this.annotationOpacityElement)||(this.annotationOpacityElement.className+=this.disableClass),this.isEnabled(this.annotationDeleteElement)||(this.annotationDeleteElement.className+=this.disableClass),this.isEnabled(this.annotationCommentPanelElement)||(this.annotationCommentPanelElement.className+=this.disableClass)),this.isEnabled(this.annotationColorElement)||(this.annotationColorElement.className+=this.disableClass),this.isEnabled(this.annotationFontColorElement)||(this.annotationFontColorElement.className+=this.disableClass),this.isEnabled(this.annotationFontFamilyElement)||(this.annotationFontFamilyElement.className+=this.disableClass),this.isEnabled(this.annotationFontSizeElement)||(this.annotationFontSizeElement.className+=this.disableClass),this.isEnabled(this.annotationTextAlignElement)||(this.annotationTextAlignElement.className+=this.disableClass),this.isEnabled(this.annotationTextPropertiesElement)||(this.annotationTextPropertiesElement.className+=this.disableClass)},e.prototype.annotationAdd=function(){this.isEnabled(this.annotationColorElement)||(this.annotationColorElement.className+=this.disableClass),this.isEnabled(this.annotationStrokeColorElement)||(this.annotationStrokeColorElement.className+=this.disableClass),this.isEnabled(this.annotationThicknessElement)||(this.annotationThicknessElement.className+=this.disableClass),this.isEnabled(this.annotationOpacityElement)||(this.annotationOpacityElement.className+=this.disableClass),this.isEnabled(this.annotationFontColorElement)||(this.annotationFontColorElement.className+=this.disableClass),this.isEnabled(this.annotationFontFamilyElement)||(this.annotationFontFamilyElement.className+=this.disableClass),this.isEnabled(this.annotationFontSizeElement)||(this.annotationFontSizeElement.className+=this.disableClass),this.isEnabled(this.annotationTextAlignElement)||(this.annotationTextAlignElement.className+=this.disableClass),this.isEnabled(this.annotationTextPropertiesElement)||(this.annotationTextPropertiesElement.className+=this.disableClass)},e.prototype.annotationUnSelect=function(){this.isEnabled(this.annotationColorElement)||(this.annotationColorElement.className+=this.disableClass),this.isEnabled(this.annotationStrokeColorElement)||(this.annotationStrokeColorElement.className+=this.disableClass),this.isEnabled(this.annotationThicknessElement)||(this.annotationThicknessElement.className+=this.disableClass),this.isEnabled(this.annotationOpacityElement)||(this.annotationOpacityElement.className+=this.disableClass),this.isEnabled(this.annotationFontColorElement)||(this.annotationFontColorElement.className+=this.disableClass),this.isEnabled(this.annotationFontFamilyElement)||(this.annotationFontFamilyElement.className+=this.disableClass),this.isEnabled(this.annotationFontSizeElement)||(this.annotationFontSizeElement.className+=this.disableClass),this.isEnabled(this.annotationTextAlignElement)||(this.annotationTextAlignElement.className+=this.disableClass),this.isEnabled(this.annotationTextPropertiesElement)||(this.annotationTextPropertiesElement.className+=this.disableClass),this.isEnabled(this.annotationDeleteElement)||(this.annotationDeleteElement.className+=this.disableClass)},e.prototype.annotationSelect=function(e){"FreeText"===e&&(this.annotationColorElement.classList.remove(this.cssClass),this.annotationStrokeColorElement.classList.remove(this.cssClass),this.annotationThicknessElement.classList.remove(this.cssClass),this.annotationOpacityElement.classList.remove(this.cssClass),this.annotationFontColorElement.classList.remove(this.cssClass),this.annotationFontFamilyElement.classList.remove(this.cssClass),this.annotationFontSizeElement.classList.remove(this.cssClass),this.annotationTextAlignElement.classList.remove(this.cssClass),this.annotationTextPropertiesElement.classList.remove(this.cssClass)),"Shape"!==e&&"Measure"!==e||(this.annotationColorElement.classList.remove(this.cssClass),this.annotationStrokeColorElement.classList.remove(this.cssClass),this.annotationThicknessElement.classList.remove(this.cssClass),this.annotationOpacityElement.classList.remove(this.cssClass),this.isEnabled(this.annotationFontColorElement)||(this.annotationFontColorElement.className+=this.disableClass),this.isEnabled(this.annotationFontFamilyElement)||(this.annotationFontFamilyElement.className+=this.disableClass),this.isEnabled(this.annotationFontSizeElement)||(this.annotationFontSizeElement.className+=this.disableClass),this.isEnabled(this.annotationTextAlignElement)||(this.annotationTextAlignElement.className+=this.disableClass),this.isEnabled(this.annotationTextPropertiesElement)||(this.annotationTextPropertiesElement.className+=this.disableClass)),"TextMarkup"===e&&(this.annotationColorElement.classList.remove(this.cssClass),this.isEnabled(this.annotationStrokeColorElement)||(this.annotationStrokeColorElement.className+=this.disableClass),this.isEnabled(this.annotationThicknessElement)||(this.annotationThicknessElement.className+=this.disableClass),this.annotationOpacityElement.classList.remove(this.cssClass),this.isEnabled(this.annotationFontColorElement)||(this.annotationFontColorElement.className+=this.disableClass),this.isEnabled(this.annotationFontFamilyElement)||(this.annotationFontFamilyElement.className+=this.disableClass),this.isEnabled(this.annotationFontSizeElement)||(this.annotationFontSizeElement.className+=this.disableClass),this.isEnabled(this.annotationTextAlignElement)||(this.annotationTextAlignElement.className+=this.disableClass),this.isEnabled(this.annotationTextPropertiesElement)||(this.annotationTextPropertiesElement.className+=this.disableClass)),this.annotationDeleteElement.classList.remove(this.cssClass),this.annotationCommentPanelElement.classList.remove(this.cssClass)},e.prototype.updateFontFamilyInIcon=function(e){this.annotationFontFamilyInputElement.value=e},e.prototype.updateFontSizeInIcon=function(e){var t=e.toString()+"px";this.annotationFontSizeInputElement.value=t},e.prototype.enableSearchItems=function(e){e?(this.mobileSearchPreviousOccurenceElement.classList.remove(this.cssClass),this.mobileSearchNextOccurenceElement.classList.remove(this.cssClass)):(this.isEnabled(this.mobileSearchPreviousOccurenceElement)||(this.mobileSearchPreviousOccurenceElement.className+=this.disableClass),this.isEnabled(this.mobileSearchNextOccurenceElement)||(this.mobileSearchNextOccurenceElement.className+=this.disableClass))},e.prototype.tapOnMobileDevice=function(e){null!=this.mobileToolbarContainerElement&&(this.mobileToolbarContainerElement.style.display=e?"none":"block")},e.prototype.isEnabled=function(e){return e.classList.contains(this.cssClass)},e}(),Xt=function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(a,r)}l((n=n.apply(e,t||[])).next())})},Kt=function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=2&i[0]?s.return:i[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){l.label=i[1];break}if(6===i[0]&&l.label<a[1]){l.label=a[1],a=i;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(i);break}a[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],s=0}finally{o=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var o,s,a,r,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r},qt=function(){function s(e){var n=this;this.pageSize=[],this.pageCount=0,this.currentPageNumber=0,this.activeElements=new Lt,this.mouseDownEvent=null,this.isDocumentLoaded=!1,this.renderedPagesList=[],this.pageGap=8,this.signatureAdded=!1,this.pageLeft=5,this.sessionLimit=1e3,this.pageStopValue=300,this.toolbarHeight=56,this.pageLimit=0,this.previousPage=0,this.isViewerMouseDown=!1,this.isViewerMouseWheel=!1,this.scrollPosition=0,this.sessionStorage=[],this.isLoadedFormFieldAdded=!1,this.pointerCount=0,this.pointersForTouch=[],this.isPasswordAvailable=!1,this.passwordData="",this.reRenderedCount=0,this.mouseX=0,this.mouseY=0,this.mouseLeft=0,this.mouseTop=0,this.touchClientX=0,this.touchClientY=0,this.previousTime=0,this.currentTime=0,this.isTouchScrolled=!1,this.isLongTouchPropagated=!1,this.longTouchTimer=null,this.isViewerContainerDoubleClick=!1,this.dblClickTimer=null,this.pinchZoomStorage=[],this.isTextSelectionDisabled=!1,this.isPanMode=!1,this.dragX=0,this.dragY=0,this.isScrollbarMouseDown=!1,this.scrollX=0,this.scrollY=0,this.ispageMoved=!1,this.isThumb=!1,this.isTapHidden=!1,this.singleTapTimer=null,this.tapCount=0,this.inputTapCount=0,this.isInitialLoaded=!1,this.annotationPageList=[],this.importPageList=[],this.isImportAction=!1,this.isImportedAnnotation=!1,this.isAnnotationCollectionRemoved=!1,this.tool=null,this.action="Select",this.eventArgs=null,this.inAction=!1,this.isMouseDown=!1,this.isStampMouseDown=!1,this.stampAdded=!1,this.customStampCount=0,this.isDynamicStamp=!1,this.isMixedSizeDocument=!1,this.highestWidth=0,this.highestHeight=0,this.customStampCollection=[],this.isAlreadyAdded=!1,this.isWebkitMobile=!1,this.isFreeTextContextMenu=!1,this.isSelection=!1,this.isAddAnnotation=!1,this.annotationComments=null,this.isToolbarSignClicked=!1,this.signatureCount=0,this.isSignatureAdded=!1,this.isNewSignatureAdded=!1,this.isInitialPageMode=!1,this.documentAnnotationCollections=null,this.annotationRenderredList=[],this.annotationStorage={},this.isStorageExceed=!1,this.isNewStamp=!1,this.downloadCollections={},this.isAnnotationAdded=!1,this.annotationEvent=null,this.isAnnotationDrawn=!1,this.isAnnotationSelect=!1,this.isAnnotationMouseDown=!1,this.isAnnotationMouseMove=!1,this.validateForm=!1,this.isMinimumZoom=!1,this.documentLoaded=!1,this.tileRenderCount=0,this.tileRequestCount=0,this.isTileImageRendered=!1,this.isDataExits=!1,this.requestLists=[],this.tilerequestLists=[],this.isInkAdded=!1,this.inkCount=0,this.isAddedSignClicked=!1,this.imageCount=0,this.isMousedOver=!1,this.isFormFieldSelect=!1,this.isFormFieldMouseDown=!1,this.isFormFieldMouseMove=!1,this.isFormFieldMousedOver=!1,this.isPassword=!1,this.isAddComment=!1,this.drawSignatureWithTool=!1,this.formFieldCollection=[],this.nonFillableFields={},this.isInitialField=!1,this.isTouchDesignerMode=!1,this.isPrint=!1,this.clearSessionStorage=function(){var e="";e=t.Browser.isIE||"edge"===t.Browser.info.name?decodeURI(window.sessionStorage.getItem("hashId")):window.sessionStorage.getItem("hashId");var i=window.sessionStorage.getItem("documentLiveCount");if(null!==e){var o={hashId:e,documentLiveCount:i,action:"Unload",elementId:n.pdfViewer.element.id},s=window.sessionStorage.getItem("unload");if(window.sessionStorage.getItem("serviceURL")&&"undefined"!==window.sessionStorage.getItem("serviceURL")){if("keepalive"in new Request("")){var a=n.setUnloadRequestHeaders(),r=n.pdfViewer.ajaxRequestSettings.withCredentials?"include":"omit";fetch(window.sessionStorage.getItem("serviceURL")+"/"+s,{method:"POST",credentials:r,headers:a,body:JSON.stringify(o)})}}else if(window.sessionStorage.getItem("serviceURL")&&t.isBlazor()){var l=new XMLHttpRequest;l.open("POST",window.sessionStorage.getItem("serviceURL")+"/"+s,!1),l.setRequestHeader("Accept","application/json"),l.setRequestHeader("Content-type","application/json"),l.send(JSON.stringify(o))}}window.sessionStorage.removeItem(n.documentId+"_annotations_textMarkup"),window.sessionStorage.removeItem(n.documentId+"_annotations_shape"),window.sessionStorage.removeItem(n.documentId+"_annotations_shape_measure"),window.sessionStorage.removeItem(n.documentId+"_annotations_stamp"),window.sessionStorage.removeItem(n.documentId+"_annotations_sticky"),window.sessionStorage.removeItem(n.documentId+"_annotations_freetext"),window.sessionStorage.removeItem(n.documentId+"_formfields"),window.sessionStorage.removeItem(n.documentId+"_formDesigner"),window.sessionStorage.removeItem(n.documentId+"_annotations_sign"),window.sessionStorage.removeItem(n.documentId+"_pagedata"),window.sessionStorage.removeItem("hashId"),window.sessionStorage.removeItem("documentLiveCount"),window.sessionStorage.removeItem("currentDocument"),window.sessionStorage.removeItem("serviceURL"),window.sessionStorage.removeItem("unload")},this.onWindowResize=function(e){var i=n;n.pdfViewer.enableRtl?(i.viewerContainer.style.right=(i.navigationPane.sideBarToolbar?i.navigationPane.getViewerContainerLeft():0)+"px",i.viewerContainer.style.left=(i.navigationPane.commentPanelContainer?i.navigationPane.commentPanelContainer.offsetWidth:0)+"px"):(i.viewerContainer.style.left=(i.navigationPane.sideBarToolbar?i.navigationPane.getViewerContainerLeft():0)+"px",i.viewerContainer.style.right=(i.navigationPane.commentPanelContainer?i.navigationPane.commentPanelContainer.offsetWidth:0)+"px");var o=(i.pdfViewer.element.clientWidth>0?i.pdfViewer.element.clientWidth:i.pdfViewer.element.style.width)-(i.navigationPane.sideBarToolbar?i.navigationPane.getViewerContainerLeft():0)-(i.navigationPane.commentPanelContainer?i.navigationPane.getViewerContainerRight():0);if(i.viewerContainer.style.width=o+"px",i.pdfViewer.toolbarModule){var s=t.isBlazor()?i.pdfViewer.element.querySelector(".e-pv-toolbar"):i.getElement("_toolbarContainer"),a=0;if(s&&(a=s.getBoundingClientRect().height),i.isAnnotationToolbarHidden()||t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode)0==a&&n.navigationPane.isNavigationToolbarVisible&&(a=i.getElement("_navigationToolbar").getBoundingClientRect().height),i.viewerContainer.style.height=i.updatePageHeight(i.pdfViewer.element.getBoundingClientRect().height,a);else{var r=t.isBlazor()?i.pdfViewer.element.querySelector(".e-pv-annotation-toolbar"):i.getElement("_annotation_toolbar"),l=0;r&&(l=r.getBoundingClientRect().height),i.viewerContainer.style.height=i.updatePageHeight(i.pdfViewer.element.getBoundingClientRect().height,a+l)}}else i.viewerContainer.style.height=i.updatePageHeight(i.pdfViewer.element.getBoundingClientRect().height,0);if(i.pdfViewer.bookmarkViewModule&&t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode){var d=i.getElement("_bookmarks_container");d&&(d.style.height=i.updatePageHeight(i.pdfViewer.element.getBoundingClientRect().height,0))}"0px"===i.viewerContainer.style.height&&("auto"===i.pdfViewer.height.toString()?(i.pdfViewer.height=500,i.viewerContainer.style.height=i.pdfViewer.height+"px"):i.viewerContainer.style.height=i.pdfViewer.element.style.height),"0px"===i.viewerContainer.style.width&&("auto"===i.pdfViewer.width.toString()?(i.pdfViewer.width=500,i.viewerContainer.style.width=i.pdfViewer.width+"px"):i.viewerContainer.style.width=i.pdfViewer.element.style.width),i.pageContainer.style.width=i.viewerContainer.clientWidth+"px",0===i.viewerContainer.clientWidth&&(i.pageContainer.style.width=i.pdfViewer.element.style.width),t.isBlazor()||i.pdfViewer.toolbarModule&&i.pdfViewer.toolbarModule.onToolbarResize(i.navigationPane.sideBarToolbar?i.navigationPane.getViewerMainContainerWidth():i.pdfViewer.element.clientWidth),n.pdfViewer.enableToolbar&&n.pdfViewer.thumbnailViewModule&&i.pdfViewer.thumbnailViewModule.gotoThumbnailImage(i.currentPageNumber-1),!i.pdfViewer.textSearchModule||t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||i.pdfViewer.textSearchModule.textSearchBoxOnResize(),0!==o&&(i.navigationPane.isBookmarkListOpen||i.updateZoomValue()),t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode?(i.mobileScrollerContainer.style.left=o-parseFloat(i.mobileScrollerContainer.style.width)+"px",i.mobilePageNoContainer.style.left=o/2-parseFloat(i.mobilePageNoContainer.style.width)/2+"px",i.mobilePageNoContainer.style.top=i.pdfViewer.element.clientHeight/2+"px",i.updateMobileScrollerPosition()):(i.navigationPane.setResizeIconTop(),i.navigationPane.setCommentPanelResizeIconTop(),e&&"resize"===e.type&&i.signatureModule.updateCanvasSize()),i.navigationPane.sideBarToolbar&&(i.navigationPane.sideBarToolbar.style.height=i.viewerContainer.style.height)},this.viewerContainerOnMousedown=function(e){n.isFreeTextContextMenu=!1;var i=!1;if(n.isSelection=!0,0===e.button&&!n.getPopupNoteVisibleStatus()&&!n.isClickedOnScrollBar(e,!1)){n.isViewerMouseDown=!0;var o=e.target;1===e.detail&&"e-pdfviewer-formFields"!==o.className&&"free-text-input"!==o.className&&(i=!0,n.focusViewerContainer(!0)),n.scrollPosition=n.viewerContainer.scrollTop/n.getZoomFactor(),n.mouseX=e.clientX,n.mouseY=e.clientY,n.mouseLeft=e.clientX,n.mouseTop=e.clientY;var s=!!document.documentMode;!n.pdfViewer.textSelectionModule||n.isClickedOnScrollBar(e,!0)||n.isTextSelectionDisabled||(s||"e-pdfviewer-formFields"===o.className||"e-pdfviewer-ListBox"===o.className||"e-pv-formfield-dropdown"===o.className||"e-pv-formfield-listbox"===o.className||e.preventDefault(),"e-pv-droplet"!==o.className&&n.pdfViewer.textSelectionModule.clearTextSelection())}n.isClickedOnScrollBar(e,!1)&&(n.isViewerMouseDown=!0),n.isPanMode&&(n.dragX=e.pageX,n.dragY=e.pageY,n.viewerContainer.contains(e.target)&&e.target!==n.viewerContainer&&e.target!==n.pageContainer&&n.isPanMode&&(n.viewerContainer.style.cursor="grabbing")),n.isShapeBasedAnnotationsEnabled()&&n.diagramMouseDown(e),n.pdfViewer.annotation&&n.pdfViewer.annotation.stickyNotesAnnotationModule.accordionContainer&&(i||(n.pdfViewer.annotationModule.stickyNotesAnnotationModule.isEditableElement=!1,n.updateCommentPanel(),i=!0)),t.isBlazor()&&n.mouseDownHandler(e)},this.viewerContainerOnMouseup=function(e){if(!n.getPopupNoteVisibleStatus()){n.isViewerMouseDown&&(n.scrollHoldTimer&&(clearTimeout(n.scrollHoldTimer),n.scrollHoldTimer=null),n.scrollPosition*n.getZoomFactor()!==n.viewerContainer.scrollTop&&n.pageViewScrollChanged(n.currentPageNumber)),n.isShapeBasedAnnotationsEnabled()&&(n.diagramMouseUp(e),n.pdfViewer.annotation&&n.pdfViewer.annotation.onAnnotationMouseUp()),n.pdfViewer.selectedItems.formFields.length>0?t.isNullOrUndefined(n.pdfViewer.toolbar)||t.isNullOrUndefined(n.pdfViewer.toolbar.formDesignerToolbarModule)||t.Browser.isDevice||n.pdfViewer.toolbar.formDesignerToolbarModule.showHideDeleteIcon(!0):t.isNullOrUndefined(n.pdfViewer.toolbar)||t.isNullOrUndefined(n.pdfViewer.toolbar.formDesignerToolbarModule)||t.Browser.isDevice||n.pdfViewer.toolbar.formDesignerToolbarModule.showHideDeleteIcon(!1),n.isSelection=!1;var i=document.getElementById(n.pdfViewer.element.id+"_commantPanel");if(i&&"block"===i.style.display&&n.pdfViewer.selectedItems&&0!==n.pdfViewer.selectedItems.annotations.length){var o=document.getElementById(n.pdfViewer.element.id+"_accordionContainer"+n.pdfViewer.currentPageNumber);o&&o.ej2_instances[0].expandItem(!0);var s=document.getElementById(n.pdfViewer.selectedItems.annotations[0].annotName);s&&(s.classList.contains("e-pv-comments-border")||s.firstChild.click())}if(0===e.button&&!n.isClickedOnScrollBar(e,!1)){var a=e.target,r=e.clientX,l=e.clientY,d=n.getZoomFactor(),u=n.currentPageNumber;if(a){var M=a.id.split("_text_")[1]||a.id.split("_textLayer_")[1]||a.id.split("_annotationCanvas_")[1]||a.id.split("_pageDiv_")[1];u=parseInt(M)}var p=n.getElement("_pageDiv_"+u);if(p){var h=p.getBoundingClientRect();r=(e.clientX-h.left)/d,l=(e.clientY-h.top)/d}a&&a.classList&&!a.classList.contains("e-pv-hyperlink")&&!a.classList.contains("e-pv-page-container")&&(n.pdfViewer.firePageClick(r,l,u+1),n.pdfViewer.formFieldsModule&&n.pdfViewer.formFieldsModule.removeFocus()),n.isTextMarkupAnnotationModule()&&!n.isToolbarInkClicked&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.onTextMarkupAnnotationMouseUp(e),n.pdfViewer.formDesignerModule&&!n.pdfViewer.annotationModule&&n.pdfViewer.formDesignerModule.updateCanvas(u),n.viewerContainer.contains(e.target)&&e.target!==n.viewerContainer&&e.target!==n.pageContainer&&n.isPanMode&&(n.viewerContainer.style.cursor="move",n.viewerContainer.style.cursor="-webkit-grab",n.viewerContainer.style.cursor="-moz-grab",n.viewerContainer.style.cursor="grab")}n.isViewerMouseDown=!1}},this.viewerContainerOnMouseWheel=function(e){if(n.isViewerMouseWheel=!0,n.getRerenderCanvasCreated()&&e.preventDefault(),e.ctrlKey){var t=25;n.pdfViewer.magnification.zoomFactor<1&&(t=10),n.pdfViewer.magnification.zoomFactor>=2&&(t=50),e.wheelDelta>0?n.pdfViewer.magnification.zoomTo(100*n.pdfViewer.magnification.zoomFactor+t):n.pdfViewer.magnification.zoomTo(100*n.pdfViewer.magnification.zoomFactor-t)}n.pdfViewer.magnificationModule&&(n.pdfViewer.magnificationModule.pageRerenderOnMouseWheel(),e.ctrlKey&&e.preventDefault(),n.pdfViewer.magnificationModule.fitPageScrollMouseWheel(e)),n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&n.isViewerMouseDown&&(e.target.classList.contains("e-pv-text")||n.pdfViewer.textSelectionModule.textSelectionOnMouseWheel(n.currentPageNumber-1))},this.viewerContainerOnKeyDown=function(e){var t=!!navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i),i=!!t&&e.metaKey;if(!n.isFreeTextAnnotationModule()||!n.pdfViewer.annotationModule||!0!==n.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus&&!0!==n.pdfViewer.annotationModule.inputElementModule.isInFocus){if(e.ctrlKey||i){if(e.shiftKey&&!t||t&&!e.shiftKey)switch(e.keyCode){case 38:case 33:e.preventDefault(),1!==n.currentPageNumber&&n.updateScrollTop(0);break;case 40:case 34:e.preventDefault(),n.currentPageNumber!==n.pageCount&&n.updateScrollTop(n.pageCount-1)}switch(e.keyCode){case 79:n.pdfViewer.toolbarModule&&n.pdfViewer.enableToolbar&&n.pdfViewer.toolbarModule.openFileDialogBox(e);break;case 67:n.pdfViewer.textSelectionModule&&n.pdfViewer.enableTextSelection&&!n.isTextSelectionDisabled&&(e.preventDefault(),n.pdfViewer.textSelectionModule.copyText()),(n.pdfViewer.selectedItems.annotations.length||n.pdfViewer.selectedItems.formFields.length)&&(n.pdfViewer.copy(),n.contextMenuModule.previousAction="Copy");break;case 70:n.pdfViewer.textSearchModule&&n.pdfViewer.enableTextSearch&&(e.preventDefault(),n.pdfViewer.toolbarModule.textSearchButtonHandler());break;case 80:n.pdfViewer.printModule&&n.pdfViewer.enablePrint&&(e.preventDefault(),n.pdfViewer.print.print());break;case 90:n.pdfViewer.annotationModule&&n.pdfViewer.annotationModule.undo();break;case 88:(n.pdfViewer.selectedItems.annotations.length||n.pdfViewer.selectedItems.formFields.length)&&(n.pdfViewer.cut(),n.contextMenuModule.previousAction="Cut");break;case 89:n.pdfViewer.annotationModule&&n.pdfViewer.annotationModule.redo();break;case 86:(n.pdfViewer.annotation&&n.pdfViewer.annotation.isShapeCopied||n.pdfViewer.formFields&&n.pdfViewer.formDesigner.isShapeCopied)&&(n.pdfViewer.paste(),n.contextMenuModule.previousAction="Paste")}}else switch(e.keyCode){case 46:if(n.pdfViewer.formDesignerModule&&n.pdfViewer.designerMode&&0!=n.pdfViewer.selectedItems.formFields.length)n.pdfViewer.formDesignerModule.deleteFormField(n.pdfViewer.selectedItems.formFields[0].id);else if(n.pdfViewer.annotation&&(n.isTextMarkupAnnotationModule()&&!n.getPopupNoteVisibleStatus()&&n.pdfViewer.annotationModule.deleteAnnotation(),n.pdfViewer.selectedItems.annotations.length>0)){var o=n.pdfViewer.selectedItems.annotations[0];o.annotationSettings&&o.annotationSettings.isLock?n.pdfViewer.annotationModule.checkAllowedInteractions("Delete",o)&&(n.pdfViewer.remove(o),n.pdfViewer.renderSelector(n.pdfViewer.annotation.getEventPageNumber(e))):(n.pdfViewer.remove(o),n.pdfViewer.renderSelector(n.pdfViewer.annotation.getEventPageNumber(e)))}break;case 27:if(n.pdfViewer.annotationModule&&n.pdfViewer.annotationModule.inkAnnotationModule){var s=parseInt(n.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);n.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(s)}n.pdfViewer.toolbar&&n.pdfViewer.toolbar.annotationToolbarModule&&n.pdfViewer.toolbar.annotationToolbarModule.deselectInkAnnotation()}n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.magnifyBehaviorKeyDown(e)}},this.viewerContainerOnMousemove=function(e){n.mouseX=e.clientX,n.mouseY=e.clientY;var t=!!document.documentMode,o=e.target;if("Drag"===n.action&&e.preventDefault(),n.isViewerMouseDown&&"Perimeter"!==n.action&&"Polygon"!==n.action&&"Line"!==n.action&&"DrawTool"!==n.action&&"Distance"!==n.action)if(n.pdfViewer.textSelectionModule&&n.pdfViewer.enableTextSelection&&!n.isTextSelectionDisabled&&!n.getPopupNoteVisibleStatus())if(t){var s=window.getSelection();s.type||s.isCollapsed||null===s.anchorNode||(n.pdfViewer.textSelectionModule.isTextSelection=!0)}else{e.preventDefault(),n.mouseX=e.clientX,n.mouseY=e.clientY;var a=n.pdfViewer.annotationModule;a&&a.textMarkupAnnotationModule&&a.textMarkupAnnotationModule.isDropletClicked&&a.textMarkupAnnotationModule.isEnableTextMarkupResizer(a.textMarkupAnnotationModule.currentTextMarkupAddMode)?a.textMarkupAnnotationModule.textSelect(e.target,n.mouseX,n.mouseY):n.pdfViewer.textSelectionModule.textSelectionOnMouseMove(e.target,n.mouseX,n.mouseY)}else n.skipPreventDefault(o)&&e.preventDefault();if(n.isTextMarkupAnnotationModule()&&!n.getPopupNoteVisibleStatus()&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.onTextMarkupAnnotationMouseMove(e),n.isPanMode&&n.panOnMouseMove(e),n.isShapeBasedAnnotationsEnabled()){var r=void 0;if(e.target&&(e.target.id.indexOf("_text")>-1||e.target.parentElement.classList.contains("foreign-object")||e.target.id.indexOf("_annotationCanvas")>-1||e.target.classList.contains("e-pv-hyperlink"))&&n.pdfViewer.annotation){u=n.pdfViewer.annotation.getEventPageNumber(e);if(M=document.getElementById(n.pdfViewer.element.id+"_annotationCanvas_"+u)){var l=(p=M.getBoundingClientRect()).x?p.x:p.left,d=p.y?p.y:p.top;r=n.pdfViewer.annotationModule.stampAnnotationModule.currentStampAnnotation&&"Image"===n.pdfViewer.annotationModule.stampAnnotationModule.currentStampAnnotation.shapeAnnotationType?new i.Rect(l,d,p.width-10,p.height-10):new i.Rect(l+10,d+10,p.width-10,p.height-10)}}else if(!n.pdfViewer.annotationModule&&n.pdfViewer.formDesignerModule){var u=n.pdfViewer.formDesignerModule.getEventPageNumber(e),M=document.getElementById(n.pdfViewer.element.id+"_annotationCanvas_"+u);if(M){var p=M.getBoundingClientRect(),l=p.x?p.x:p.left,h=p.y?p.y:p.top;r=new i.Rect(l+10,h+10,p.width-10,p.height-10)}}var L=n.pdfViewer.annotationModule?n.pdfViewer.annotationModule.stampAnnotationModule:null;!r||!r.containsPoint({x:n.mouseX,y:n.mouseY})||L&&L.isStampAnnotSelected?(n.diagramMouseLeave(e),n.isAnnotationDrawn&&"Ink"!==n.action&&(n.diagramMouseUp(e),n.isAnnotationAdded=!0)):(n.diagramMouseMove(e),n.annotationEvent=e),n.pdfViewer.enableStampAnnotations&&L&&L.isStampAnnotSelected&&(n.pdfViewer.tool="Stamp",n.tool=new at(n.pdfViewer,n),n.isMouseDown=!0,L.isStampAnnotSelected=!1,L.isNewStampAnnot=!0),n.isSignatureAdded&&n.pdfViewer.enableHandwrittenSignature&&(n.pdfViewer.tool="Stamp",n.tool=new at(n.pdfViewer,n),n.isMouseDown=!0,n.isSignatureAdded=!1,n.isNewSignatureAdded=!0)}},this.panOnMouseMove=function(e){var t=!1;if("Drag"!==n.action&&-1===n.action.indexOf("Rotate")&&-1===n.action.indexOf("Resize")||(t=!0),n.viewerContainer.contains(e.target)&&e.target!==n.viewerContainer&&e.target!==n.pageContainer&&!t)if(n.isViewerMouseDown){var i=n.dragX-e.pageX,o=n.dragY-e.pageY;n.viewerContainer.scrollTop=n.viewerContainer.scrollTop+o,n.viewerContainer.scrollLeft=n.viewerContainer.scrollLeft+i,n.viewerContainer.style.cursor="move",n.viewerContainer.style.cursor="-webkit-grabbing",n.viewerContainer.style.cursor="-moz-grabbing",n.viewerContainer.style.cursor="grabbing",n.dragX=e.pageX,n.dragY=e.pageY}else n.navigationPane.isNavigationPaneResized||(n.viewerContainer.style.cursor="move",n.viewerContainer.style.cursor="-webkit-grab",n.viewerContainer.style.cursor="-moz-grab",n.viewerContainer.style.cursor="grab");else n.navigationPane.isNavigationPaneResized||(n.viewerContainer.style.cursor="auto")},this.viewerContainerOnMouseLeave=function(e){n.isViewerMouseDown&&n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&n.pdfViewer.textSelectionModule.textSelectionOnMouseLeave(e)},this.viewerContainerOnMouseEnter=function(e){n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&n.pdfViewer.textSelectionModule.clear()},this.viewerContainerOnMouseOver=function(e){var t=!!document.documentMode;n.isViewerMouseDown&&(t||e.preventDefault())},this.viewerContainerOnClick=function(e){if("dblclick"===e.type){if(!n.pdfViewer.textSelectionModule||n.isTextSelectionDisabled||n.getCurrentTextMarkupAnnotation())n.getCurrentTextMarkupAnnotation();else if(e.target.classList.contains("e-pv-text")){if(n.isViewerContainerDoubleClick=!0,!n.getTextMarkupAnnotationMode()){var t=parseFloat(e.target.id.split("_")[2]);n.pdfViewer.fireTextSelectionStart(t+1)}n.pdfViewer.textSelectionModule.selectAWord(e.target,e.clientX,e.clientY,!1),"MouseUp"===n.pdfViewer.contextMenuSettings.contextMenuAction&&n.pdfViewer.textSelectionModule.calculateContextMenuPosition(e.clientY,e.clientX),n.getTextMarkupAnnotationMode()?n.isTextMarkupAnnotationModule()&&n.getTextMarkupAnnotationMode()&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations(n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode):(n.pdfViewer.textSelectionModule.maintainSelectionOnZoom(!0,!1),n.dblClickTimer=setTimeout(function(){n.applySelection()},100),n.pdfViewer.textSelectionModule.fireTextSelectEnd())}if(n.action&&("Perimeter"===n.action||"Polygon"===n.action)&&n.tool){n.eventArgs.position=n.currentPosition,n.getMouseEventArgs(n.currentPosition,n.eventArgs,e,n.eventArgs.source);n.isMetaKey(e);var i={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey};n.eventArgs.info=i,n.eventArgs.clickCount=e.detail,n.tool.mouseUp(n.eventArgs,!0)}if(n.pdfViewer.selectedItems||n.pdfViewer.annotation&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)if(0!==n.pdfViewer.selectedItems.annotations.length){var o=n.pdfViewer.selectedItems.annotations[0];if(n.pdfViewer.annotationModule&&!o.formFieldAnnotationType&&(n.pdfViewer.annotationModule.annotationSelect(o.annotName,o.pageIndex,o,null,!0),!1===n.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus))if(!0===n.isFreeTextAnnotation(n.pdfViewer.selectedItems.annotations))(s={}).x=n.pdfViewer.selectedItems.annotations[0].bounds.x,s.y=n.pdfViewer.selectedItems.annotations[0].bounds.y,n.pdfViewer.annotation.freeTextAnnotationModule.addInuptElemet(s,n.pdfViewer.selectedItems.annotations[0]);else if(!0===n.pdfViewer.selectedItems.annotations[0].enableShapeLabel){var s={};s.x=n.pdfViewer.selectedItems.annotations[0].bounds.x,s.y=n.pdfViewer.selectedItems.annotations[0].bounds.y,n.pdfViewer.annotation.inputElementModule.editLabel(s,n.pdfViewer.selectedItems.annotations[0])}else{(l=document.getElementById(n.pdfViewer.element.id+"_accordionContainer"+n.pdfViewer.currentPageNumber))&&l.ej2_instances[0].expandItem(!0);var a=document.getElementById(n.pdfViewer.selectedItems.annotations[0].annotName);a&&(a.classList.contains("e-pv-comments-border")||a.firstChild.click())}}else if(n.pdfViewer.annotation&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation){var r=n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation;n.pdfViewer.annotationModule.annotationSelect(r.annotName,n.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage,r,null,!0);var l=document.getElementById(n.pdfViewer.element.id+"_accordionContainer"+n.currentPageNumber);l&&l.ej2_instances[0].expandItem(!0);var d=document.getElementById(r.annotName);d&&d.firstChild.click()}}else 3===e.detail&&(n.isViewerContainerDoubleClick&&(clearTimeout(n.dblClickTimer),n.isViewerContainerDoubleClick=!1),!n.pdfViewer.textSelectionModule||n.isTextSelectionDisabled||n.getTextMarkupAnnotationMode()||(n.pdfViewer.textSelectionModule.selectEntireLine(e),n.pdfViewer.textSelectionModule.maintainSelectionOnZoom(!0,!1),n.pdfViewer.textSelectionModule.fireTextSelectEnd(),n.applySelection()))},this.viewerContainerOnDragStart=function(e){!!document.documentMode||e.preventDefault()},this.viewerContainerOnContextMenuClick=function(e){n.isViewerMouseDown=!1},this.onWindowMouseUp=function(e){n.isFreeTextContextMenu=!1,n.isNewStamp=!1,n.signatureAdded=!1;var t=n.pdfViewer.annotationModule;if(t&&t.textMarkupAnnotationModule&&t.textMarkupAnnotationModule.isEnableTextMarkupResizer(t.textMarkupAnnotationModule.currentTextMarkupAddMode)){var i=t.textMarkupAnnotationModule;i.isLeftDropletClicked=!1,i.isDropletClicked=!1,i.isRightDropletClicked=!1,i.currentTextMarkupAnnotation||null!==window.getSelection().anchorNode?i.currentTextMarkupAnnotation||""!==i.currentTextMarkupAddMode||(i.isTextMarkupAnnotationMode=!1):i.showHideDropletDiv(!0)}if(!n.getPopupNoteVisibleStatus()){if(0===e.button){if(n.isNewFreeTextAnnotation())if(!n.pdfViewer.textSelectionModule||n.isTextSelectionDisabled||n.getTextMarkupAnnotationMode()){if(n.getTextMarkupAnnotationMode()){var o=n.pdfViewer.element,s=e.target;o&&s&&o.id.split("_")[0]===s.id.split("_")[0]&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations(n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode)}}else{1!==e.detail||n.viewerContainer.contains(e.target)||n.contextMenuModule.contextMenuElement.contains(e.target)||null!==window.getSelection().anchorNode&&n.pdfViewer.textSelectionModule.textSelectionOnMouseup(e);var a=e.target;n.viewerContainer.contains(e.target)&&"e-pdfviewer-formFields"!==a.className&&(n.isClickedOnScrollBar(e,!0)||n.isScrollbarMouseDown?null!==window.getSelection().anchorNode&&n.pdfViewer.textSelectionModule.applySpanForSelection():n.pdfViewer.textSelectionModule.textSelectionOnMouseup(e))}}else 2===e.button&&n.viewerContainer.contains(e.target)&&n.skipPreventDefault(e.target)&&n.checkIsNormalText()&&window.getSelection().removeAllRanges();return!n.isViewerMouseDown||(n.isViewerMouseDown=!1,n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&(n.pdfViewer.textSelectionModule.clear(),n.pdfViewer.textSelectionModule.selectionStartPage=null),e.preventDefault(),e.stopPropagation(),!1)}},this.onWindowTouchEnd=function(e){n.signatureAdded=!1,n.pdfViewer.element.contains(e.target)||n.contextMenuModule.contextMenuElement.contains(e.target)||n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&n.pdfViewer.textSelectionModule.clearTextSelection()},this.viewerContainerOnTouchStart=function(e){var i=e.touches;n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.setTouchPoints(i[0].clientX,i[0].clientY);var o=e.target;1===i.length&&!o.classList.contains("e-pv-hyperlink")&&n.skipPreventDefault(o)&&n.preventTouchEvent(e),1===e.touches.length&&n.isTextMarkupAnnotationModule()&&!n.getPopupNoteVisibleStatus()&&(n.isToolbarInkClicked||n.pdfViewer.annotationModule.textMarkupAnnotationModule.onTextMarkupAnnotationTouchEnd(e)),n.touchClientX=i[0].clientX,n.touchClientY=i[0].clientY,n.scrollY=i[0].clientY,n.previousTime=(new Date).getTime(),1!==i.length||e.target.classList.contains("e-pv-touch-select-drop")||e.target.classList.contains("e-pv-touch-ellipse")||(t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&n.pageCount>0&&!n.isThumb&&!e.target.classList.contains("e-pv-hyperlink")&&n.handleTaps(i),t.isBlazor()&&t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||n.handleTextBoxTaps(i),n.isDesignerMode(o)?(n.contextMenuModule.close(),n.isLongTouchPropagated||(n.longTouchTimer=setTimeout(function(){n.isTouchDesignerMode=!0,n.contextMenuModule.open(n.touchClientY,n.touchClientX,n.viewerContainer)},1e3)),n.isLongTouchPropagated=!0):n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&(n.pdfViewer.textSelectionModule.clearTextSelection(),n.contextMenuModule.close(),n.isLongTouchPropagated||(n.longTouchTimer=setTimeout(function(){n.viewerContainerOnLongTouch(e)},1e3)),n.isLongTouchPropagated=!0)),n.diagramMouseDown(e),"Perimeter"!==n.action&&"Polygon"!==n.action&&"DrawTool"!==n.action&&"Drag"!==n.action&&-1===n.action.indexOf("Rotate")&&-1===n.action.indexOf("Resize")||e.preventDefault()},this.viewerContainerOnLongTouch=function(e){n.touchClientX=e.touches[0].clientX,n.touchClientY=e.touches[0].clientY,e.preventDefault(),n.pdfViewer.textSelectionModule&&(n.pdfViewer.textSelectionModule.initiateTouchSelection(e,n.touchClientX,n.touchClientY),t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(clearTimeout(n.singleTapTimer),n.tapCount=0))},this.viewerContainerOnPointerDown=function(e){"touch"===e.pointerType&&++n.pointerCount<=2&&(e.preventDefault(),n.pointersForTouch.push(e),2===n.pointerCount&&(n.pointerCount=0),n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.setTouchPoints(e.clientX,e.clientY))},this.viewerContainerOnTouchMove=function(e){t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(clearTimeout(n.singleTapTimer),n.tapCount=0),n.preventTouchEvent(e),n.isToolbarInkClicked&&e.preventDefault();var o=e.touches;n.pdfViewer.magnificationModule&&(n.isTouchScrolled=!0,o.length>1&&n.pageCount>0?(t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(n.isTouchScrolled=!1),n.pdfViewer.enablePinchZoom&&n.pdfViewer.magnificationModule.initiatePinchMove(o[0].clientX,o[0].clientY,o[1].clientX,o[1].clientY)):1===o.length&&n.getPagesPinchZoomed()&&(t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(n.isTouchScrolled=!1),n.pdfViewer.magnificationModule.pinchMoveScroll())),n.mouseX=o[0].clientX,n.mouseY=o[0].clientY;var s;if(e.target&&(e.target.id.indexOf("_text")>-1||e.target.id.indexOf("_annotationCanvas")>-1||e.target.classList.contains("e-pv-hyperlink"))&&n.pdfViewer.annotation){var a=n.pdfViewer.annotation.getEventPageNumber(e),r=document.getElementById(n.pdfViewer.element.id+"_annotationCanvas_"+a);if(r){var l=r.getBoundingClientRect(),d=l.x?l.x:l.left,u=l.y?l.y:l.top;s=new i.Rect(d+10,u+10,l.width-10,l.height-10)}}s&&s.containsPoint({x:n.mouseX,y:n.mouseY})?(n.diagramMouseMove(e),n.annotationEvent=e):(n.diagramMouseLeave(e),n.isAnnotationDrawn&&(n.diagramMouseUp(e),n.isAnnotationAdded=!0)),o=null},this.viewerContainerOnPointerMove=function(e){if("touch"===e.pointerType&&n.pageCount>0&&(e.preventDefault(),2===n.pointersForTouch.length)){for(var t=0;t<n.pointersForTouch.length;t++)if(e.pointerId===n.pointersForTouch[t].pointerId){n.pointersForTouch[t]=e;break}n.pdfViewer.magnificationModule&&n.pdfViewer.enablePinchZoom&&n.pdfViewer.magnificationModule.initiatePinchMove(n.pointersForTouch[0].clientX,n.pointersForTouch[0].clientY,n.pointersForTouch[1].clientX,n.pointersForTouch[1].clientY)}},this.viewerContainerOnTouchEnd=function(e){if(n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.pinchMoveEnd(),n.isLongTouchPropagated=!1,clearInterval(n.longTouchTimer),n.longTouchTimer=null,t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&n.isTouchScrolled){n.currentTime=(new Date).getTime();var i=n.currentTime-n.previousTime,o=n.scrollY-e.changedTouches[0].pageY,s=o/i;if(Math.abs(s)>1.5){var a=o+i*s;n.viewerContainer.scrollTop+=a,n.updateMobileScrollerPosition()}}n.diagramMouseUp(e),n.renderStampAnnotation(e)},this.viewerContainerOnPointerEnd=function(e){"touch"===e.pointerType&&(e.preventDefault(),n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.pinchMoveEnd(),n.pointersForTouch=[],n.pointerCount=0)},this.viewerContainerOnScroll=function(e){var i=n,o=0,s=0;if(e.touches&&t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode){var a=(n.viewerContainer.scrollHeight-n.viewerContainer.clientHeight)/(n.viewerContainer.clientHeight-n.toolbarHeight);if(n.isThumb){n.ispageMoved=!0,e.preventDefault(),n.mobilePageNoContainer.style.display="block",o=e.touches[0].pageX-n.scrollX,s=e.touches[0].pageY-n.viewerContainer.offsetTop,n.viewerContainer.scrollTop=s*a;var r=e.touches[0].pageY,l=n.pdfViewer.toolbarModule?0:50;0!==n.viewerContainer.scrollTop&&r<=n.viewerContainer.clientHeight-l&&(n.mobileScrollerContainer.style.top=r+"px")}else"e-pv-touch-ellipse"!==e.touches[0].target.className&&(n.isWebkitMobile&&t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||(n.mobilePageNoContainer.style.display="none",s=n.touchClientY-e.touches[0].pageY,o=n.touchClientX-e.touches[0].pageX,n.viewerContainer.scrollTop=n.viewerContainer.scrollTop+s,n.viewerContainer.scrollLeft=n.viewerContainer.scrollLeft+o),n.updateMobileScrollerPosition(),n.touchClientY=e.touches[0].pageY,n.touchClientX=e.touches[0].pageX)}n.scrollHoldTimer&&clearTimeout(n.scrollHoldTimer);var d=n.currentPageNumber;n.scrollHoldTimer=null,n.contextMenuModule.close();for(var u=n.viewerContainer.scrollTop,M=0;M<n.pageCount;M++)if(null!=n.pageSize[M]){var p=n.getPageHeight(M);if(n.pageStopValue=p<150?75:p>=150&&p<300?125:p>=300&&p<500?200:300,u+n.pageStopValue<=n.getPageTop(M)+p){n.currentPageNumber=M+1,n.pdfViewer.currentPageNumber=M+1;break}}n.pdfViewer.magnificationModule&&"fitToPage"===n.pdfViewer.magnificationModule.fitType&&n.currentPageNumber>0&&n.pageSize[n.currentPageNumber-1]&&(n.viewerContainer.scrollTop=n.pageSize[n.currentPageNumber-1].top*n.getZoomFactor()),n.renderElementsVirtualScroll(n.currentPageNumber),(n.isViewerMouseDown||n.getPinchZoomed()||n.getPinchScrolled()||n.getPagesPinchZoomed())&&!n.isViewerMouseWheel?n.showPageLoadingIndicator(n.currentPageNumber-1,!1):(n.pageViewScrollChanged(n.currentPageNumber),n.isViewerMouseWheel=!1),n.pdfViewer.toolbarModule&&(t.isBlazor()||n.pdfViewer.toolbarModule.updateCurrentPage(n.currentPageNumber),n.viewerContainer.setAttribute("aria-labelledby",n.pdfViewer.element.id+"_pageDiv_"+(n.currentPageNumber-1)),t.isBlazor()||t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||n.pdfViewer.toolbarModule.updateNavigationButtons()),t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(n.mobileSpanContainer.innerHTML=n.currentPageNumber.toString(),n.mobilecurrentPageContainer.innerHTML=n.currentPageNumber.toString()),d!==n.currentPageNumber&&(!i.pdfViewer.thumbnailViewModule||t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||(i.pdfViewer.thumbnailViewModule.gotoThumbnailImage(i.currentPageNumber-1),i.pdfViewer.thumbnailViewModule.isThumbnailClicked=!1),n.pdfViewer.firePageChange(d)),n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.updatePagesForFitPage(n.currentPageNumber-1);var h=n.getElement("_pageDiv_"+(n.currentPageNumber-1));if(h&&(h.style.visibility="visible"),n.isViewerMouseDown)if(n.getRerenderCanvasCreated()&&!n.isPanMode&&n.pdfViewer.magnificationModule.clearIntervalTimer(),n.getStoredData(n.currentPageNumber))n.isDataExits=!0,n.initiatePageViewScrollChanged(),n.isDataExits=!1;else{var L=n.pdfViewer.scrollSettings.delayPageRequestTimeOnScroll?n.pdfViewer.scrollSettings.delayPageRequestTimeOnScroll:100;n.scrollHoldTimer=setTimeout(function(){n.initiatePageViewScrollChanged()},L)}n.pdfViewer.annotation&&n.navigationPane.commentPanelContainer&&n.pdfViewer.annotation.stickyNotesAnnotationModule.updateCommentPanelScrollTop(n.currentPageNumber),t.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&e.touches&&"e-pv-touch-ellipse"!==e.touches[0].target.className&&setTimeout(function(){n.updateMobileScrollerPosition()},500)},this.pdfViewer=e,this.navigationPane=new Nt(this.pdfViewer,this),this.textLayer=new $t(this.pdfViewer,this),this.signatureModule=new ii(this.pdfViewer,this),this.isWebkitMobile=/Chrome/.test(navigator.userAgent)||/Google Inc/.test(navigator.vendor)||-1!==navigator.userAgent.indexOf("Safari")}return s.prototype.initializeComponent=function(){var e=document.getElementById(this.pdfViewer.element.id);if(e){this.blazorUIAdaptor=t.isBlazor()?new Zt(this.pdfViewer,this):null,t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.element.classList.add("e-pv-mobile-view");var i=void 0;this.viewerMainContainer=t.isBlazor()?e.querySelector(".e-pv-viewer-main-container"):t.createElement("div",{id:this.pdfViewer.element.id+"_viewerMainContainer",className:"e-pv-viewer-main-container"}),this.viewerContainer=t.isBlazor()?e.querySelector(".e-pv-viewer-container"):t.createElement("div",{id:this.pdfViewer.element.id+"_viewerContainer",className:"e-pv-viewer-container",attrs:{"aria-label":"pdfviewer scroll view"}}),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.createMobilePageNumberContainer(),this.viewerContainer.tabIndex=0,this.pdfViewer.enableRtl&&(this.viewerContainer.style.direction="rtl"),e.style.touchAction="pan-x pan-y",this.setMaximumHeight(e),this.mainContainer=t.isBlazor()?e.querySelector(".e-pv-main-container"):t.createElement("div",{id:this.pdfViewer.element.id+"_mainContainer",className:"e-pv-main-container"}),this.mainContainer.appendChild(this.viewerMainContainer),e.appendChild(this.mainContainer),this.applyViewerHeight(this.mainContainer),this.pdfViewer.toolbarModule?(this.navigationPane.initializeNavigationPane(),i=this.pdfViewer.toolbarModule.intializeToolbar("100%")):t.isBlazor()&&(this.navigationPane.initializeNavigationPane(),i=this.pdfViewer.element.querySelector(".e-pv-toolbar"),this.pdfViewer.enableToolbar||(this.toolbarHeight=0,i.style.display="none"),this.pdfViewer.enableNavigationToolbar||(this.navigationPane.sideBarToolbar.style.display="none",this.navigationPane.sideBarToolbarSplitter.style.display="none",(this.navigationPane.isBookmarkOpen||this.navigationPane.isThumbnailOpen)&&this.navigationPane.updateViewerContainerOnClose())),this.viewerContainer.style.height=i?this.updatePageHeight(this.pdfViewer.element.getBoundingClientRect().height,56):this.updatePageHeight(this.pdfViewer.element.getBoundingClientRect().height,0);var n=this.pdfViewer.element.clientWidth;t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(n=n-(this.navigationPane.sideBarToolbar?this.navigationPane.getViewerContainerLeft():0)-(this.navigationPane.commentPanelContainer?this.navigationPane.getViewerContainerRight():0)),this.viewerContainer.style.width=n+"px",this.viewerMainContainer.appendChild(this.viewerContainer),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.mobileScrollerContainer.style.left=n-parseFloat(this.mobileScrollerContainer.style.width)+"px",this.mobilePageNoContainer.style.left=n/2-parseFloat(this.mobilePageNoContainer.style.width)/2+"px",this.mobilePageNoContainer.style.top=this.pdfViewer.element.clientHeight/2+"px",this.mobilePageNoContainer.style.display="none",this.mobilePageNoContainer.appendChild(this.mobilecurrentPageContainer),this.mobilePageNoContainer.appendChild(this.mobilenumberContainer),this.mobilePageNoContainer.appendChild(this.mobiletotalPageContainer),this.viewerContainer.appendChild(this.mobilePageNoContainer),this.viewerMainContainer.appendChild(this.mobileScrollerContainer),this.mobileScrollerContainer.appendChild(this.mobileSpanContainer)),this.pageContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_pageViewContainer",className:"e-pv-page-container",attrs:{tabindex:"0","aria-label":"pdfviewer Page View"}}),this.pdfViewer.enableRtl&&(this.pageContainer.style.direction="ltr"),this.viewerContainer.appendChild(this.pageContainer),this.pageContainer.style.width=this.viewerContainer.clientWidth+"px",i&&this.pdfViewer.thumbnailViewModule&&(!t.Browser.isDevice||this.pdfViewer.enableDesktopMode)&&this.pdfViewer.thumbnailViewModule.createThumbnailContainer(),this.createPrintPopup(),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.createGoToPagePopup();var o=t.createElement("div",{id:this.pdfViewer.element.id+"_loadingIndicator"});this.viewerContainer.appendChild(o),ne({target:o,cssClass:"e-spin-center"}),this.setLoaderProperties(o),t.isBlazor()?this.contextMenuModule=new Dt(this.pdfViewer,this):this.contextMenuModule=new ei(this.pdfViewer,this),this.contextMenuModule.createContextMenu(),this.createFileInputElement(),this.wireEvents(),!this.pdfViewer.textSearchModule||t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||this.pdfViewer.textSearchModule.createTextSearchBox(),this.pdfViewer.documentPath&&this.pdfViewer.load(this.pdfViewer.documentPath,null),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.initializeCollection()}},s.prototype.createMobilePageNumberContainer=function(){this.mobilePageNoContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_mobilepagenoContainer",className:"e-pv-mobilepagenoscroll-container"}),this.mobilecurrentPageContainer=t.createElement("span",{id:this.pdfViewer.element.id+"_mobilecurrentpageContainer",className:"e-pv-mobilecurrentpage-container"}),this.mobilenumberContainer=t.createElement("span",{id:this.pdfViewer.element.id+"_mobiledashedlineContainer",className:"e-pv-mobiledashedline-container"}),this.mobiletotalPageContainer=t.createElement("span",{id:this.pdfViewer.element.id+"_mobiletotalpageContainer",className:"e-pv-mobiletotalpage-container"}),this.mobileScrollerContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_mobilescrollContainer",className:"e-pv-mobilescroll-container"}),this.mobileSpanContainer=t.createElement("span",{id:this.pdfViewer.element.id+"_mobilespanContainer",className:"e-pv-mobilespanscroll-container"}),this.mobileSpanContainer.innerHTML="1",this.mobilecurrentPageContainer.innerHTML="1",this.mobilenumberContainer.innerHTML="―――――",this.mobileScrollerContainer.style.cssFloat="right",this.mobileScrollerContainer.style.width="40px",this.mobileScrollerContainer.style.height="32px",this.mobileScrollerContainer.style.zIndex="100",this.mobilePageNoContainer.style.width="120px",this.mobilePageNoContainer.style.height="100px",this.mobilePageNoContainer.style.zIndex="100",this.mobilePageNoContainer.style.position="fixed",this.mobileScrollerContainer.addEventListener("touchstart",this.mobileScrollContainerDown.bind(this)),this.mobileScrollerContainer.addEventListener("touchend",this.mobileScrollContainerEnd.bind(this)),this.mobileScrollerContainer.style.display="none"},s.prototype.initiatePageRender=function(e,t){this.loadedData=e,this.documentId=this.createGUID(),this.viewerContainer&&(this.viewerContainer.scrollTop=0),this.showLoadingIndicator(!0),this.hashId=" ",this.isFileName=!1,this.saveDocumentInfo(),"Pan"===this.pdfViewer.interactionMode&&this.initiatePanning(),e=this.checkDocumentData(e),this.setFileName(),this.pdfViewer.downloadFileName||(this.pdfViewer.downloadFileName=this.pdfViewer.fileName);var i=this.constructJsonObject(e,t);this.createAjaxRequest(i,e,t)},s.prototype.mobileScrollContainerDown=function(e){if(this.ispageMoved=!1,this.isThumb=!0,this.isTextMarkupAnnotationModule()&&null!=this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage&&t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){var i=this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage;this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage=null,this.pdfViewer.annotationModule.textMarkupAnnotationModule.clearAnnotationSelection(i),this.pdfViewer.toolbar.showToolbar(!0)}this.mobileScrollerContainer.addEventListener("touchmove",this.viewerContainerOnScroll.bind(this),!0)},s.prototype.relativePosition=function(e){var t=this.viewerContainer.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},s.prototype.setMaximumHeight=function(e){var i=e.getBoundingClientRect();(!t.Browser.isDevice||this.pdfViewer.enableDesktopMode||i&&0===i.height)&&(e.style.minHeight="500px"),this.updateWidth(),this.updateHeight()},s.prototype.applyViewerHeight=function(e){var i=e.getBoundingClientRect();t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&i&&0===i.height&&(e.style.minHeight="500px")},s.prototype.updateWidth=function(){"auto"!==this.pdfViewer.width.toString()&&(this.pdfViewer.element.style.width=this.pdfViewer.width)},s.prototype.updateHeight=function(){"auto"!==this.pdfViewer.height.toString()&&(this.pdfViewer.element.style.height=this.pdfViewer.height)},s.prototype.updateViewerContainer=function(){this.getElement("_sideBarContentContainer")?this.navigationPane.updateViewerContainerOnClose():this.updateViewerContainerSize();var e=this.pdfViewer.toolbarModule;e&&(t.isBlazor()?(this.pdfViewer.enableToolbar||this.pdfViewer.enableAnnotationToolbar)&&this.pdfViewer._dotnetInstance.invokeMethodAsync("RefreshToolbarItems"):(this.pdfViewer.enableToolbar&&e.toolbar.refreshOverflow(),this.pdfViewer.enableAnnotationToolbar&&e.annotationToolbarModule&&e.annotationToolbarModule.toolbar.refreshOverflow()))},s.prototype.updateViewerContainerSize=function(){this.viewerContainer.style.width=this.pdfViewer.element.clientWidth+"px",this.pageContainer.style.width=this.viewerContainer.offsetWidth+"px",this.updateZoomValue()},s.prototype.mobileScrollContainerEnd=function(e){this.ispageMoved||this.goToPagePopup.show(),this.isThumb=!1,this.ispageMoved=!1,this.mobileScrollerContainer.removeEventListener("touchmove",this.viewerContainerOnScroll.bind(this),!0),this.mobilePageNoContainer.style.display="none"},s.prototype.createAjaxRequest=function(e,t,i){var n=this;this.pdfViewer.serverActionSettings&&(this.loadRequestHandler=new ti(this.pdfViewer),this.loadRequestHandler.url=this.pdfViewer.serviceUrl+"/"+this.pdfViewer.serverActionSettings.load,this.loadRequestHandler.responseType="json",this.loadRequestHandler.mode=!0,e.action="Load",e.elementId=this.pdfViewer.element.id,this.loadRequestHandler.send(e),this.loadRequestHandler.onSuccess=function(e){var o=e.data;if(o){if("object"!=typeof o)try{o=JSON.parse(o)}catch(e){n.onControlError(500,o,this.pdfViewer.serverActionSettings.load),o=null}if(o){for(;"object"!=typeof o;)if(o=JSON.parse(o),"number"==typeof parseInt(o)&&!isNaN(parseInt(o))){o=parseInt(o);break}(o.uniqueId===n.documentId||"number"==typeof parseInt(o)&&!isNaN(parseInt(o)))&&(n.pdfViewer.fireAjaxRequestSuccess(this.pdfViewer.serverActionSettings.load,o),n.requestSuccess(o,t,i))}}},this.loadRequestHandler.onFailure=function(e){"4"===e.status.toString().split("")[0]?n.openNotificationPopup("Client error"):n.openNotificationPopup(),n.showLoadingIndicator(!1),n.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,n.pdfViewer.serverActionSettings.load)},this.loadRequestHandler.onError=function(e){n.openNotificationPopup(),n.showLoadingIndicator(!1),n.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,n.pdfViewer.serverActionSettings.load)})},s.prototype.openNotificationPopup=function(e){this.pdfViewer.showNotificationDialog&&("Client error"===e?this.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant("Client error")):this.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant("Server error")),this.getElement("_notify")&&this.getElement("_notify").classList.add("e-pv-notification-large-content"))},s.prototype.showNotificationPopup=function(e){this.pdfViewer.showNotificationDialog||""===e||(this.textLayer.createNotificationPopup(e),this.getElement("_notify")&&this.getElement("_notify").classList.add("e-pv-notification-large-content"))},s.prototype.requestSuccess=function(e,i,n){if(e&&void 0!==e.pageCount){t.isBlazor()&&this.isPassword&&(this.isPassword=!1,this.isPasswordAvailable=!1,this.pdfViewer._dotnetInstance.invokeMethodAsync("ClosePasswordDialog")),this.pageCount=e.pageCount,this.pdfViewer.pageCount=e.pageCount,this.hashId=e.hashId,this.documentLiveCount=e.documentLiveCount,this.isAnnotationCollectionRemoved=!1,this.saveDocumentHashData(),this.saveFormfieldsData(e),this.pageRender(e);var o={pageCount:e.pageCount,pageSizes:e.pageSizes};if(window.sessionStorage.setItem(this.documentId+"_pagedata",JSON.stringify(o)),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){this.mobileScrollerContainer.style.display="";var s=this.pdfViewer.toolbarModule?this.toolbarHeight:0;this.mobileScrollerContainer.style.top=s+"px"}this.restrictionList=e.RestrictionSummary,this.RestrictionEnabled(this.restrictionList,!1)}else this.pageCount=0,this.currentPageNumber=0,t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.mobileScrollerContainer.style.display="none"),4===e?(t.isBlazor()&&(this.isPassword=!0),this.renderPasswordPopup(i,n)):3===e&&this.renderCorruptPopup(),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.updateToolbarItems();var a=this.pdfViewer.annotationModule;a&&a.textMarkupAnnotationModule&&a.textMarkupAnnotationModule.isEnableTextMarkupResizer(a.textMarkupAnnotationModule.currentTextMarkupAddMode)&&a.textMarkupAnnotationModule.createAnnotationSelectElement()},s.prototype.RestrictionEnabled=function(e,t){if(e)for(var i=0;i<e.length;i++){switch(e[i]){case"Print":this.pdfViewer.enablePrint=t;break;case"CopyContent":this.pdfViewer.enableTextSelection=t;break;case"FillFields":this.pdfViewer.enableFormFields=t,this.enableFormFieldButton(t);break;case"EditAnnotations":this.pdfViewer.enableAnnotation=t}this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.DisableToolbarItems(e[i],t)}},s.prototype.pageRender=function(e){this.document=null,this.passwordDialogReset(),this.passwordPopup&&this.passwordPopup.hide();this.initPageDiv(e),this.currentPageNumber=1,this.pdfViewer.currentPageNumber=1,this.previousZoomValue=this.pdfViewer.zoomValue;var i=!1;this.pdfViewer.magnificationModule&&(this.pdfViewer.magnificationModule.isAutoZoom=!0,this.pdfViewer.zoomValue&&this.pdfViewer.zoomValue>0&&(i=!0,this.isInitialPageMode=!0,this.pdfViewer.magnification.zoomTo(this.pdfViewer.zoomValue)),"FitToWidth"===this.pdfViewer.zoomMode?(this.isInitialPageMode=!0,this.pdfViewer.magnificationModule.fitToWidth()):"FitToPage"===this.pdfViewer.zoomMode&&(this.isInitialPageMode=!0,this.pdfViewer.magnificationModule.fitToPage()),this.documentLoaded=!0,this.pdfViewer.magnificationModule.isInitialLoading=!0,this.onWindowResize(),this.documentLoaded=!1,this.pdfViewer.magnificationModule.isInitialLoading=!1),this.isDocumentLoaded=!0;this.pageSize[0].width;if(-1===this.renderedPagesList.indexOf(0)&&!i){this.createRequestForRender(0);var n=1;if(n<this.pageCount&&(this.createRequestForRender(n),n+=1),this.pageSize[n])for(var o=this.getPageTop(n),s=this.viewerContainer.clientHeight;s>o&&this.pageSize[n];)this.renderPageElement(n),this.createRequestForRender(n),o=this.getPageTop(n),n+=1}this.showLoadingIndicator(!1),t.isBlazor()||this.pdfViewer.toolbarModule&&(this.pdfViewer.toolbarModule.uploadedDocumentName=null,this.pdfViewer.toolbarModule.updateCurrentPage(this.currentPageNumber),this.pdfViewer.toolbarModule.updateToolbarItems(),this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&this.pdfViewer.toolbar.annotationToolbarModule.enableAnnotationAddTools(!0),this.viewerContainer.setAttribute("aria-labelledby",this.pdfViewer.element.id+"_pageDiv_"+(this.currentPageNumber-1))),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.mobileSpanContainer.innerHTML=this.currentPageNumber.toString(),this.mobilecurrentPageContainer.innerHTML=this.currentPageNumber.toString())},s.prototype.renderPasswordPopup=function(e,i){var n=this;if(t.isBlazor()){var o=document.getElementById(this.pdfViewer.element.id+"_prompt");o.textContent=this.pdfViewer.localeObj.getConstant("Enter Password");var s=document.querySelector("#"+this.pdfViewer.element.id+"_password_input");s.addEventListener("keyup",function(){""===s.value&&n.passwordDialogReset()}),s.addEventListener("focus",function(){s.parentElement.classList.add("e-input-focus")}),s.addEventListener("blur",function(){s.parentElement.classList.remove("e-input-focus")}),this.isPasswordAvailable?(this.pdfViewer.fireDocumentLoadFailed(!0,i),o.classList.add("e-pv-password-error"),o.textContent=this.pdfViewer.localeObj.getConstant("Invalid Password"),o.focus(),this.isFileName?this.document=e:this.document="data:application/pdf;base64,"+e):(this.isFileName?this.document=e:this.document="data:application/pdf;base64,"+e,this.isPasswordAvailable=!0,this.pdfViewer.fireDocumentLoadFailed(!0,null)),this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenPasswordDialog")}else this.isPasswordAvailable?(this.pdfViewer.fireDocumentLoadFailed(!0,i),this.promptElement.classList.add("e-pv-password-error"),this.promptElement.textContent=this.pdfViewer.localeObj.getConstant("Invalid Password"),this.promptElement.focus(),this.isFileName?this.document=e:this.document="data:application/pdf;base64,"+e,this.passwordPopup.show()):(this.isFileName?this.document=e:this.document="data:application/pdf;base64,"+e,this.isPasswordAvailable=!0,this.createPasswordPopup(),this.pdfViewer.fireDocumentLoadFailed(!0,null),this.passwordPopup.show())},s.prototype.renderCorruptPopup=function(){this.pdfViewer.fireDocumentLoadFailed(!1,null),this.documentId=null,t.isBlazor()?this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenCorruptedDialog"):(this.createCorruptedPopup(),this.corruptPopup.show())},s.prototype.constructJsonObject=function(e,t){var i;return t?(this.isPasswordAvailable=!0,this.passwordData=t,i={document:e,password:t,zoomFactor:1,isFileName:this.isFileName,uniqueId:this.documentId}):(this.isPasswordAvailable=!1,this.passwordData="",i={document:e,zoomFactor:1,isFileName:this.isFileName,uniqueId:this.documentId}),i},s.prototype.checkDocumentData=function(e){var t=e.split("base64,")[1];if(void 0===t){if(this.isFileName=!0,this.jsonDocumentId=e,null===this.pdfViewer.fileName){var i=-1!==e.indexOf("\\")?e.split("\\"):e.split("/");this.pdfViewer.fileName=i[i.length-1],this.jsonDocumentId=this.pdfViewer.fileName,t=e}}else this.jsonDocumentId=null;return t},s.prototype.setFileName=function(){null===this.pdfViewer.fileName&&(this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.uploadedDocumentName?(this.pdfViewer.fileName=this.pdfViewer.toolbarModule.uploadedDocumentName,this.jsonDocumentId=this.pdfViewer.fileName):(this.pdfViewer.fileName="undefined.pdf",this.jsonDocumentId=null))},s.prototype.saveDocumentInfo=function(){window.sessionStorage.setItem("currentDocument",this.documentId),window.sessionStorage.setItem("serviceURL",this.pdfViewer.serviceUrl),this.pdfViewer.serverActionSettings&&window.sessionStorage.setItem("unload",this.pdfViewer.serverActionSettings.unload)},s.prototype.saveDocumentHashData=function(){var e="";e=t.Browser.isIE||"edge"===t.Browser.info.name?encodeURI(this.hashId):this.hashId,window.sessionStorage.setItem("hashId",e),this.documentLiveCount&&window.sessionStorage.setItem("documentLiveCount",this.documentLiveCount.toString())},s.prototype.saveFormfieldsData=function(e){this.pdfViewer.isFormFieldDocument=!1,this.enableFormFieldButton(!1),e&&e.PdfRenderedFormFields&&e.PdfRenderedFormFields.length>0&&(this.formfieldvalue?(window.sessionStorage.setItem(this.documentId+"_formfields",JSON.stringify(this.formfieldvalue)),this.formfieldvalue=null):window.sessionStorage.setItem(this.documentId+"_formfields",JSON.stringify(e.PdfRenderedFormFields)),this.pdfViewer.enableFormFields&&!this.pdfViewer.formDesignerModule&&this.pdfViewer.formFieldsModule.formFieldCollections(),this.pdfViewer.formFieldCollections.length>0&&(this.pdfViewer.isFormFieldDocument=!0,this.enableFormFieldButton(!0)))},s.prototype.enableFormFieldButton=function(e){this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.submitItem&&this.pdfViewer.toolbarModule.toolbar.enableItems(this.pdfViewer.toolbarModule.submitItem.parentElement,e)},s.prototype.updateWaitingPopup=function(e){if(null!=this.pageSize[e].top){var i=this.getElement("_pageDiv_"+e).getBoundingClientRect(),n=this.getElement("_pageDiv_"+e).firstChild.firstChild;i.top<0?this.toolbarHeight+this.viewerContainer.clientHeight/2-i.top<i.height?n.style.top=this.viewerContainer.clientHeight/2-i.top-this.toolbarHeight+"px":this.toolbarHeight+i.bottom/2-i.top<i.height&&(n.style.top=i.bottom/2-i.top-this.toolbarHeight+"px"):n.style.top=this.viewerContainer.clientHeight/2+"px",t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&i.width>this.viewerContainer.clientWidth?n.style.left=this.viewerContainer.clientWidth/2+this.viewerContainer.scrollLeft+"px":this.getZoomFactor()>1.25&&i.width>this.viewerContainer.clientWidth?n.style.left=this.viewerContainer.clientWidth/2+"px":n.style.left=i.width/2+"px"}},s.prototype.createWaitingPopup=function(e){var t=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+e);t&&(ne({target:t}),this.setLoaderProperties(t))},s.prototype.showLoadingIndicator=function(e){var t=this.getElement("_loadingIndicator");t&&(e?Oe(t):Fe(t))},s.prototype.showPageLoadingIndicator=function(e,t){var i=this.getElement("_pageDiv_"+e);null!=i&&(t?Oe(i):Fe(i),this.updateWaitingPopup(e))},s.prototype.showPrintLoadingIndicator=function(e){var t=this.getElement("_printLoadingIndicator");null!=t&&(e?(this.printMainContainer.style.display="block",Oe(t)):(this.printMainContainer.style.display="none",Fe(t)))},s.prototype.setLoaderProperties=function(e){var t=e.firstChild.firstChild.firstChild;t&&(t.style.height="48px",t.style.width="48px",t.style.transformOrigin="24px 24px 24px")},s.prototype.updateScrollTop=function(e){var t=this;null!=this.pageSize[e]&&(this.viewerContainer.scrollTop=this.getPageTop(e),this.renderElementsVirtualScroll(e),-1===this.renderedPagesList.indexOf(e)&&this.createRequestForRender(e),setTimeout(function(){var i=e+1;i!==t.currentPageNumber&&(t.pdfViewer.currentPageNumber=i,t.currentPageNumber=i,t.pdfViewer.toolbarModule&&t.pdfViewer.toolbarModule.updateCurrentPage(i))},800))},s.prototype.getZoomFactor=function(){return this.pdfViewer.magnificationModule?this.pdfViewer.magnificationModule.zoomFactor:1},s.prototype.getPinchZoomed=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isPinchZoomed},s.prototype.getMagnified=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isMagnified},s.prototype.getPinchScrolled=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isPinchScrolled},s.prototype.getPagesPinchZoomed=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isPagePinchZoomed},s.prototype.getPagesZoomed=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isPagesZoomed},s.prototype.getRerenderCanvasCreated=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isRerenderCanvasCreated},s.prototype.getDocumentId=function(){return this.documentId},s.prototype.download=function(){this.pageCount>0&&this.createRequestForDownload()},s.prototype.saveAsBlob=function(){var e=this;return this.pageCount>0?new Promise(function(t,i){e.saveAsBlobRequest().then(function(e){t(e)})}):null},s.prototype.saveAsBlobRequest=function(){var e=this,t=this;return new Promise(function(i,n){var o=t.constructJsonDownload();e.dowonloadRequestHandler=new ti(e.pdfViewer),e.dowonloadRequestHandler.url=t.pdfViewer.serviceUrl+"/"+t.pdfViewer.serverActionSettings.download,e.dowonloadRequestHandler.responseType="text",e.dowonloadRequestHandler.send(o),e.dowonloadRequestHandler.onSuccess=function(e){var n=e.data;if(n&&("object"==typeof n&&(n=JSON.parse(n)),"object"!=typeof n&&-1===n.indexOf("data:application/pdf")&&(t.onControlError(500,n,t.pdfViewer.serverActionSettings.download),n=null),n)){t.pdfViewer.fireAjaxRequestSuccess(t.pdfViewer.serverActionSettings.download,n);var o=t.createBlobUrl(n.split("base64,")[1],"application/pdf");i(o)}},e.dowonloadRequestHandler.onFailure=function(e){t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,t.pdfViewer.serverActionSettings.download)},e.dowonloadRequestHandler.onError=function(e){t.openNotificationPopup(),t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,t.pdfViewer.serverActionSettings.download)}})},s.prototype.clear=function(e){if(this.isPasswordAvailable=!1,this.isDocumentLoaded=!1,this.isInitialLoaded=!1,this.isImportAction=!1,this.annotationPageList=[],this.annotationComments=null,this.pdfViewer.isDocumentEdited=!1,this.pdfViewer.annotationCollection=[],this.pdfViewer.signatureCollection=[],this.pdfViewer.formFieldCollection=[],this.isAnnotationCollectionRemoved=!1,this.documentAnnotationCollections=null,this.annotationRenderredList=[],this.isImportAction=!1,this.isImportedAnnotation=!1,this.importedAnnotation=[],this.isStorageExceed=!1,this.annotationStorage={},this.downloadCollections={},this.annotationEvent=null,this.highestWidth=0,this.highestHeight=0,this.requestLists=[],this.tilerequestLists=[],this.pdfViewer.formFieldCollections=[],this.pdfViewer.formDesignerModule&&(this.pdfViewer.formDesignerModule.formFieldIndex=0),this.initiateTextSelectMode(),this.RestrictionEnabled(this.restrictionList,!0),this.restrictionList=null,t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||this.navigationPane.sideBarToolbar&&this.navigationPane.clear(),(!t.isBlazor()&&t.Browser.isDevice||!this.pdfViewer.enableDesktopMode)&&this.navigationPane.clear(),this.pdfViewer.thumbnailViewModule&&this.pdfViewer.thumbnailViewModule.clear(),this.pdfViewer.bookmarkViewModule&&this.pdfViewer.bookmarkViewModule.clear(),this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.clearIntervalTimer(),this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.clearTextSelection(),this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.resetTextSearch(),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.clear(),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.initializeCollection(),this.pdfViewer.formFieldsModule&&(this.pdfViewer.formFieldsModule.readOnlyCollection=[],this.pdfViewer.formFieldsModule.signatureFieldCollection=[],this.pdfViewer.formFieldsModule.currentTarget=null),this.signatureModule&&(this.signatureModule.signaturecollection=[],this.signatureModule.outputcollection=[]),this.pageSize&&(this.pageSize=[]),this.renderedPagesList&&(this.renderedPagesList=[]),this.pageContainer)for(;this.pageContainer.hasChildNodes();)this.pageContainer.removeChild(this.pageContainer.lastChild);this.pageCount>0&&(this.unloadDocument(this),this.textLayer.characterBound=new Array),this.windowSessionStorageClear(),this.pinchZoomStorage&&(this.pinchZoomStorage=[]),!this.previousZoomValue&&0!==this.previousZoomValue||this.previousZoomValue===this.pdfViewer.zoomValue||(this.pdfViewer.zoomValue=this.previousZoomValue),e&&this.pageCount>0&&this.pdfViewer.fireDocumentUnload(this.pdfViewer.fileName),this.pdfViewer.fileName=null,this.pdfViewer.downloadFileName=null},s.prototype.destroy=function(){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.element.classList.remove("e-pv-mobile-view"),this.unWireEvents(),this.clear(!1),this.pageContainer.parentNode.removeChild(this.pageContainer),this.viewerContainer.parentNode.removeChild(this.viewerContainer),this.contextMenuModule.destroy(),this.pdfViewer.toolbarModule&&this.navigationPane.destroy();var e=document.getElementById("measureElement");e&&(e=void 0)},s.prototype.unloadDocument=function(e){var i="";i=t.Browser.isIE||"edge"===t.Browser.info.name?decodeURI(window.sessionStorage.getItem("hashId")):window.sessionStorage.getItem("hashId");var n=window.sessionStorage.getItem("documentLiveCount");if(null!==i){var o={hashId:i,documentLiveCount:n,action:"Unload",elementId:e.pdfViewer.element.id},s=window.sessionStorage.getItem("unload");if(window.sessionStorage.getItem("serviceURL")&&"undefined"!==window.sessionStorage.getItem("serviceURL"))try{if("keepalive"in new Request("")){var a=this.setUnloadRequestHeaders(),r=this.pdfViewer.ajaxRequestSettings.withCredentials?"include":"omit";fetch(window.sessionStorage.getItem("serviceURL")+"/"+s,{method:"POST",credentials:r,headers:a,body:JSON.stringify(o)})}}catch(e){this.unloadRequestHandler=new ti(this.pdfViewer),this.unloadRequestHandler.send(o)}else window.sessionStorage.getItem("serviceURL")&&t.isBlazor()&&(this.unloadRequestHandler=new ti(this.pdfViewer),this.unloadRequestHandler.url=window.sessionStorage.getItem("serviceURL")+"/"+s,this.unloadRequestHandler.mode=!1,this.unloadRequestHandler.responseType=null,this.unloadRequestHandler.send(o),this.unloadRequestHandler.onSuccess=function(t){var i=t.data;i&&("object"!=typeof i&&-1===i.indexOf("Document")&&(e.onControlError(500,i,s),i=null),i&&e.pdfViewer.fireAjaxRequestSuccess(e.pdfViewer.serverActionSettings.unload,i))},this.unloadRequestHandler.onFailure=function(t){e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,s)},this.unloadRequestHandler.onError=function(t){e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,s)})}this.pdfViewer.magnificationModule&&(this.pdfViewer.magnificationModule.zoomFactor=1),this.formFieldCollection=[],window.sessionStorage.removeItem("hashId"),window.sessionStorage.removeItem("documentLiveCount"),this.documentId&&(window.sessionStorage.removeItem(this.documentId+"_formfields"),window.sessionStorage.removeItem(this.documentId+"_formDesigner"),window.sessionStorage.removeItem(this.documentId+"_annotations_shape"),window.sessionStorage.removeItem(this.documentId+"_annotations_shape_measure"),window.sessionStorage.removeItem(this.documentId+"_annotations_stamp"),window.sessionStorage.removeItem(this.documentId+"_annotations_sticky"),window.sessionStorage.removeItem(this.documentId+"_annotations_textMarkup"),window.sessionStorage.removeItem(this.documentId+"_annotations_freetext"),window.sessionStorage.removeItem(this.documentId+"_formfields"),window.sessionStorage.removeItem(this.documentId+"_annotations_sign"),window.sessionStorage.removeItem(this.documentId+"_annotations_ink"))},s.prototype.setUnloadRequestHeaders=function(){var e=new Headers;e.append("Content-Type","application/json;charset=UTF-8");for(var t=0;t<this.pdfViewer.ajaxRequestSettings.ajaxHeaders.length;t++)e.append(this.pdfViewer.ajaxRequestSettings.ajaxHeaders[t].headerName,this.pdfViewer.ajaxRequestSettings.ajaxHeaders[t].headerValue);return e},s.prototype.windowSessionStorageClear=function(){window.sessionStorage.removeItem("currentDocument"),window.sessionStorage.removeItem("serviceURL"),window.sessionStorage.removeItem("unload");for(var e=0;e<this.sessionStorage.length;e++)window.sessionStorage.removeItem(this.sessionStorage[e])},s.prototype.updateCommentPanel=function(){for(var e=document.querySelectorAll("#"+this.pdfViewer.element.id+"_more-options"),t=0;t<e.length;t++)e[t].style.visibility="hidden";for(var i=document.querySelectorAll(".e-pv-new-comments-div"),n=0;n<i.length;n++)i[n].style.display="none";for(var o=document.querySelectorAll(".e-pv-comments-border"),n=0;n<o.length;n++)o[n].classList.remove("e-pv-comments-border");for(var s=document.querySelectorAll(".e-editable-inline"),n=0;n<s.length;n++)s[n].style.display="none";for(var a=document.querySelectorAll(".e-pv-comments-select"),r=0;r<a.length;r++)a[r].classList.remove("e-pv-comments-select");for(var l=document.querySelectorAll(".e-pv-comments-div"),n=0;n<l.length;n++)l[n].style.minHeight="60px"},s.prototype.focusViewerContainer=function(e){var t=window.scrollX,i=window.scrollY,n=this.getScrollParent(this.viewerContainer),o=0,s=0;null!==n&&(o=n.scrollLeft,s=n.scrollTop),this.viewerContainer.focus(),this.currentPageNumber>0&&this.viewerContainer.setAttribute("aria-labelledby",this.pdfViewer.element.id+"_pageDiv_"+(this.currentPageNumber-1)),this.pdfViewer.annotation&&this.pdfViewer.annotation.stickyNotesAnnotationModule.accordionContainer&&this.updateCommentPanel(),(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>-1||-1!==navigator.userAgent.indexOf("Edge"))&&null!==n?(n.scrollLeft=o,n.scrollTop=s):null!==n&&n.scrollTo(o,s),window.scrollTo(t,i)},s.prototype.getScrollParent=function(e){if(null===e||"HTML"===e.nodeName)return null;var t=getComputedStyle(e);return this.viewerContainer.id===e.id||"scroll"!==t.overflowY&&"auto"!==t.overflowY?this.getScrollParent(e.parentNode):e},s.prototype.createCorruptedPopup=function(){var e=this,i=t.createElement("div",{id:this.pdfViewer.element.id+"_corrupted_popup",className:"e-pv-corrupted-popup"});this.pageContainer.appendChild(i),this.corruptPopup=new o.Dialog({showCloseIcon:!0,closeOnEscape:!0,isModal:!0,header:'<div class="e-pv-corrupted-popup-header"> '+this.pdfViewer.localeObj.getConstant("File Corrupted")+"</div>",visible:!1,buttons:[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.closeCorruptPopup.bind(this)}],target:this.pdfViewer.element,beforeClose:function(){e.corruptPopup.destroy(),e.getElement("_corrupted_popup").remove(),e.corruptPopup=null;var t=e.getElement("_loadingIndicator");null!=t&&Fe(t)}}),this.pdfViewer.enableRtl?(this.corruptPopup.content='<div id="templatertl" class="e-pv-notification-icon-rtl"> <div class="e-pv-corrupted-popup-content-rtl" tabindex="0">'+this.pdfViewer.localeObj.getConstant("File Corrupted Content")+"</div></div>",this.corruptPopup.enableRtl=!0):this.corruptPopup.content='<div id="template" class="e-pv-notification-icon"> <div class="e-pv-corrupted-popup-content" tabindex="0">'+this.pdfViewer.localeObj.getConstant("File Corrupted Content")+"</div></div>",this.corruptPopup.appendTo(i)},s.prototype.hideLoadingIndicator=function(){var e=this.getElement("_loadingIndicator");null!==e&&Fe(e)},s.prototype.closeCorruptPopup=function(){this.corruptPopup.hide();var e=this.getElement("_loadingIndicator");null!==e&&Fe(e)},s.prototype.createPrintPopup=function(){var e=document.getElementById(this.pdfViewer.element.id);this.printMainContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_printcontainer",className:"e-pv-print-popup-container"}),e.appendChild(this.printMainContainer),this.printMainContainer.style.display="none";var i=t.createElement("div",{id:this.pdfViewer.element.id+"_printLoadingIndicator",className:"e-pv-print-loading-container"});this.printMainContainer.appendChild(i),ne({target:i,cssClass:"e-spin-center"}),this.setLoaderProperties(i)},s.prototype.createGoToPagePopup=function(){var e=this,i=t.createElement("div",{id:this.pdfViewer.element.id+"_goTopage_popup",className:"e-pv-gotopage-popup"});this.goToPageElement=t.createElement("span",{id:this.pdfViewer.element.id+"_prompt"}),this.goToPageElement.textContent=this.pdfViewer.localeObj.getConstant("Enter pagenumber"),i.appendChild(this.goToPageElement);var s=t.createElement("span",{className:"e-pv-text-input"});this.goToPageInput=t.createElement("input",{id:this.pdfViewer.element.id+"_page_input",className:"e-input"}),this.goToPageInput.type="text",this.goToPageInput.style.maxWidth="80%",this.pageNoContainer=t.createElement("span",{className:".e-pv-number-ofpages"}),s.appendChild(this.goToPageInput),s.appendChild(this.pageNoContainer),i.appendChild(s),this.pageContainer.appendChild(i),this.goToPagePopup=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("GoToPage"),visible:!1,buttons:[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.GoToPageCancelClick.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Apply"),disabled:!0,cssClass:"e-pv-gotopage-apply-btn",isPrimary:!0},click:this.GoToPageApplyClick.bind(this)}],close:this.closeGoToPagePopUp.bind(this)}),this.pdfViewer.enableRtl&&(this.goToPagePopup.enableRtl=!0),this.goToPagePopup.appendTo(i),t.isBlazor()||new n.NumericTextBox({format:"##",showSpinButton:!1}).appendTo(this.goToPageInput),this.goToPageInput.addEventListener("keyup",function(){var t=e.goToPageInput.value;""!==t&&parseFloat(t)>0&&e.pdfViewer.pageCount+1>parseFloat(t)?e.EnableApplyButton():e.DisableApplyButton()})},s.prototype.closeGoToPagePopUp=function(){this.goToPageInput.value="",this.DisableApplyButton()},s.prototype.EnableApplyButton=function(){document.getElementsByClassName("e-pv-gotopage-apply-btn")[0].removeAttribute("disabled")},s.prototype.DisableApplyButton=function(){document.getElementsByClassName("e-pv-gotopage-apply-btn")[0].setAttribute("disabled",!0)},s.prototype.GoToPageCancelClick=function(){this.goToPagePopup.hide()},s.prototype.GoToPageApplyClick=function(){this.goToPagePopup.hide();var e=this.goToPageInput.value;this.pdfViewer.navigation.goToPage(e),this.updateMobileScrollerPosition()},s.prototype.updateMobileScrollerPosition=function(){if(t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.mobileScrollerContainer){var e=(this.viewerContainer.scrollHeight-this.viewerContainer.clientHeight)/(this.viewerContainer.clientHeight-56),i=this.viewerContainer.scrollTop/e,n=this.pdfViewer.toolbarModule?this.toolbarHeight:0;this.mobileScrollerContainer.style.top=n+i+"px"}},s.prototype.createPasswordPopup=function(){var e=this,i=t.createElement("div",{id:this.pdfViewer.element.id+"_password_popup",className:"e-pv-password-popup",attrs:{tabindex:"-1"}});this.promptElement=t.createElement("span",{id:this.pdfViewer.element.id+"_prompt",attrs:{tabindex:"-1"}}),this.promptElement.textContent=this.pdfViewer.localeObj.getConstant("Enter Password"),i.appendChild(this.promptElement);var n=t.createElement("span",{className:"e-input-group e-pv-password-input"});this.passwordInput=t.createElement("input",{id:this.pdfViewer.element.id+"_password_input",className:"e-input"}),this.passwordInput.type="password",this.passwordInput.name="Required",n.appendChild(this.passwordInput),i.appendChild(n),this.pageContainer.appendChild(i),this.passwordPopup=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("Password Protected"),visible:!1,close:this.passwordCancel.bind(this),target:this.pdfViewer.element,beforeClose:function(){e.passwordPopup.destroy(),e.getElement("_password_popup").remove(),e.passwordPopup=null;var t=e.getElement("_loadingIndicator");null!=t&&Fe(t)}}),!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.passwordPopup.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.applyPassword.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.passwordCancelClick.bind(this)}]:this.passwordPopup.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.passwordCancelClick.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.applyPassword.bind(this)}],this.pdfViewer.enableRtl&&(this.passwordPopup.enableRtl=!0),this.passwordPopup.appendTo(i),this.passwordInput.addEventListener("keyup",function(){""===e.passwordInput.value&&e.passwordDialogReset()}),this.passwordInput.addEventListener("focus",function(){e.passwordInput.parentElement.classList.add("e-input-focus")}),this.passwordInput.addEventListener("blur",function(){e.passwordInput.parentElement.classList.remove("e-input-focus")})},s.prototype.passwordCancel=function(e){e.isInteraction&&(this.clear(!1),this.passwordDialogReset(),this.passwordInput.value="");var t=this.getElement("_loadingIndicator");null!==t&&Fe(t)},s.prototype.passwordCancelClick=function(){this.clear(!1),this.passwordDialogReset(),this.passwordPopup.hide();var e=this.getElement("_loadingIndicator");null!==e&&Fe(e)},s.prototype.passwordDialogReset=function(){if(t.isBlazor()){var e=document.querySelector("#"+this.pdfViewer.element.id+"_password_input"),i=document.querySelector("#"+this.pdfViewer.element.id+"_prompt");i&&(i.classList.remove("e-pv-password-error"),i.textContent=this.pdfViewer.localeObj.getConstant("Enter Password"),e.value="")}else this.promptElement&&(this.promptElement.classList.remove("e-pv-password-error"),this.promptElement.textContent=this.pdfViewer.localeObj.getConstant("Enter Password"),this.passwordInput.value="")},s.prototype.applyPassword=function(){if(t.isBlazor())""!==(e=document.querySelector("#"+this.pdfViewer.element.id+"_password_input").value)&&this.pdfViewer.load(this.document,e);else{var e=this.passwordInput.value;""!==e&&this.pdfViewer.load(this.document,e)}this.focusViewerContainer()},s.prototype.createFileInputElement=function(){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.pdfViewer.enableAnnotationToolbar&&this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.createCustomStampElement(),this.signatureModule&&this.signatureModule.createSignatureFileElement())},s.prototype.wireEvents=function(){var e=this;this.viewerContainer.addEventListener("scroll",this.viewerContainerOnScroll,!0),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.viewerContainer.addEventListener("touchmove",this.viewerContainerOnScroll,!0),this.viewerContainer.addEventListener("mousedown",this.viewerContainerOnMousedown),this.viewerContainer.addEventListener("mouseup",this.viewerContainerOnMouseup),this.viewerContainer.addEventListener("wheel",this.viewerContainerOnMouseWheel),this.viewerContainer.addEventListener("mousemove",this.viewerContainerOnMousemove),this.viewerContainer.addEventListener("mouseleave",this.viewerContainerOnMouseLeave),this.viewerContainer.addEventListener("mouseenter",this.viewerContainerOnMouseEnter),this.viewerContainer.addEventListener("mouseover",this.viewerContainerOnMouseOver),this.viewerContainer.addEventListener("click",this.viewerContainerOnClick),this.viewerContainer.addEventListener("dblclick",this.viewerContainerOnClick),this.viewerContainer.addEventListener("dragstart",this.viewerContainerOnDragStart),this.pdfViewer.element.addEventListener("keydown",this.viewerContainerOnKeyDown),window.addEventListener("mouseup",this.onWindowMouseUp),window.addEventListener("touchend",this.onWindowTouchEnd),this.unload=function(){return e.unloadDocument(e)},window.addEventListener("unload",this.unload),window.addEventListener("beforeunload",this.clearSessionStorage),window.addEventListener("resize",this.onWindowResize),-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Edge")||-1!==navigator.userAgent.indexOf("Trident")?(this.viewerContainer.addEventListener("pointerdown",this.viewerContainerOnPointerDown),this.viewerContainer.addEventListener("pointermove",this.viewerContainerOnPointerMove),this.viewerContainer.addEventListener("pointerup",this.viewerContainerOnPointerEnd),this.viewerContainer.addEventListener("pointerleave",this.viewerContainerOnPointerEnd)):(this.viewerContainer.addEventListener("touchstart",this.viewerContainerOnTouchStart),this.viewerContainer.addEventListener("touchmove",this.viewerContainerOnTouchMove),this.viewerContainer.addEventListener("touchend",this.viewerContainerOnTouchEnd),this.viewerContainer.addEventListener("touchleave",this.viewerContainerOnTouchEnd),this.viewerContainer.addEventListener("touchcancel",this.viewerContainerOnTouchEnd))},s.prototype.unWireEvents=function(){this.viewerContainer.removeEventListener("scroll",this.viewerContainerOnScroll,!0),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.viewerContainer.removeEventListener("touchmove",this.viewerContainerOnScroll,!0),this.viewerContainer.removeEventListener("mousedown",this.viewerContainerOnMousedown),this.viewerContainer.removeEventListener("mouseup",this.viewerContainerOnMouseup),this.viewerContainer.removeEventListener("wheel",this.viewerContainerOnMouseWheel),this.viewerContainer.removeEventListener("mousemove",this.viewerContainerOnMousemove),this.viewerContainer.removeEventListener("mouseleave",this.viewerContainerOnMouseLeave),this.viewerContainer.removeEventListener("mouseenter",this.viewerContainerOnMouseEnter),this.viewerContainer.removeEventListener("mouseover",this.viewerContainerOnMouseOver),this.viewerContainer.removeEventListener("click",this.viewerContainerOnClick),this.viewerContainer.removeEventListener("dragstart",this.viewerContainerOnDragStart),this.viewerContainer.removeEventListener("contextmenu",this.viewerContainerOnContextMenuClick),this.pdfViewer.element.removeEventListener("keydown",this.viewerContainerOnKeyDown),window.removeEventListener("mouseup",this.onWindowMouseUp),window.removeEventListener("unload",this.unload),window.removeEventListener("resize",this.onWindowResize),-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Edge")||-1!==navigator.userAgent.indexOf("Trident")?(this.viewerContainer.removeEventListener("pointerdown",this.viewerContainerOnPointerDown),this.viewerContainer.removeEventListener("pointermove",this.viewerContainerOnPointerMove),this.viewerContainer.removeEventListener("pointerup",this.viewerContainerOnPointerEnd),this.viewerContainer.removeEventListener("pointerleave",this.viewerContainerOnPointerEnd)):(this.viewerContainer.removeEventListener("touchstart",this.viewerContainerOnTouchStart),this.viewerContainer.removeEventListener("touchmove",this.viewerContainerOnTouchMove),this.viewerContainer.removeEventListener("touchend",this.viewerContainerOnTouchEnd),this.viewerContainer.removeEventListener("touchleave",this.viewerContainerOnTouchEnd),this.viewerContainer.removeEventListener("touchcancel",this.viewerContainerOnTouchEnd))},s.prototype.updateZoomValue=function(){this.pdfViewer.magnificationModule&&(this.pdfViewer.magnificationModule.isAutoZoom?this.pdfViewer.magnificationModule.fitToAuto():"FitToWidth"!==this.pdfViewer.zoomMode&&"fitToWidth"===this.pdfViewer.magnificationModule.fitType?this.pdfViewer.magnificationModule.fitToWidth():"fitToPage"===this.pdfViewer.magnificationModule.fitType&&this.pdfViewer.magnificationModule.fitToPage());for(var e=0;e<this.pageCount;e++)this.applyLeftPosition(e)},s.prototype.updateFreeTextProperties=function(e){this.pdfViewer.enableShapeLabel&&(this.pdfViewer.shapeLabelSettings.fillColor&&(e.labelFillColor=this.pdfViewer.shapeLabelSettings.fillColor),this.pdfViewer.shapeLabelSettings.fontColor&&(e.fontColor=this.pdfViewer.shapeLabelSettings.fontColor),this.pdfViewer.shapeLabelSettings.fontSize&&(e.fontSize=this.pdfViewer.shapeLabelSettings.fontSize),this.pdfViewer.shapeLabelSettings.fontFamily&&(e.fontFamily=this.pdfViewer.shapeLabelSettings.fontFamily),this.pdfViewer.shapeLabelSettings.opacity&&(e.labelOpacity=this.pdfViewer.shapeLabelSettings.opacity),this.pdfViewer.shapeLabelSettings.labelContent&&(e.labelContent=this.pdfViewer.shapeLabelSettings.labelContent))},s.prototype.mouseDownHandler=function(e){var i,n=[],o=[];if(e&&e.target&&(this.mouseDownEvent=e,this.contextMenuModule.currentTarget=e.target),this.pdfViewer.annotationModule.isEnableDelete()||o.push("DeleteContext"),"None"===this.pdfViewer.contextMenuOption)i=!0;else if(this.pdfViewer.textSelectionModule||this.isShapeBasedAnnotationsEnabled()){if(e){var s=this.isClickWithinSelectionBounds(e);this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus?(this.isFreeTextContextMenu=!0,this.pdfViewer.annotation.freeTextAnnotationModule&&!this.pdfViewer.annotation.freeTextAnnotationModule.isTextSelected&&(o.push("Cut"),o.push("Copy")),this.pdfViewer.annotation.freeTextAnnotationModule&&""===this.pdfViewer.annotation.freeTextAnnotationModule.selectedText&&o.push("Paste"),n.push("HighlightContext"),n.push("UnderlineContext"),n.push("StrikethroughContext"),n.push("ScaleRatio"),n.push("Properties"),n.push("Comment"),n.push("DeleteContext")):s&&this.pdfViewer.textSelectionModule?(!e.target.classList.contains("e-pv-maintaincontent")&&e.target.classList.contains("e-pv-text")||e.target.classList.contains("e-pv-text-layer")?this.checkIsNormalText()&&(i=!0):(t.Browser.isIE||"edge"===t.Browser.info.name)&&e.target.classList.contains("e-pv-page-container")&&(i=!0),n.push("Cut"),n.push("Paste"),n.push("DeleteContext"),n.push("ScaleRatio"),n.push("Comment"),n.push("Properties")):0===this.pdfViewer.selectedItems.annotations.length||"HandWrittenSignature"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"SignatureText"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"SignatureImage"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?0!==this.pdfViewer.selectedItems.annotations.length&&"Path"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.shapeMenuItems(n,o,!0):this.pdfViewer.annotation&&this.pdfViewer.annotation.isShapeCopied&&(e.target.classList.contains("e-pv-text-layer")||e.target.classList.contains("e-pv-text"))&&!this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?(n.push("Properties"),this.shapeMenuItems(n,o,!1)):this.isCalibrateAnnotationModule()&&this.pdfViewer.annotationModule.measureAnnotationModule.currentAnnotationMode?(n.push("HighlightContext"),n.push("UnderlineContext"),n.push("StrikethroughContext"),n.push("Properties"),o.push("Cut"),o.push("Copy"),o.push("Paste"),o.push("DeleteContext"),o.push("Comment")):this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?(n.push("HighlightContext"),n.push("UnderlineContext"),n.push("StrikethroughContext"),n.push("Properties"),n.push("Cut"),n.push("Copy"),n.push("Paste"),n.push("ScaleRatio")):i=!0:this.shapeMenuItems(n,o,!1,!0)}else this.pdfViewer.textSelectionModule&&"MouseUp"===this.pdfViewer.contextMenuOption?(n.push("Cut"),n.push("Paste"),n.push("DeleteContext"),n.push("ScaleRatio"),n.push("Comment"),n.push("Properties")):0===this.pdfViewer.selectedItems.annotations.length&&(n.push("Cut"),n.push("Paste"),n.push("DeleteContext"),n.push("ScaleRatio"),n.push("Properties"));this.pdfViewer.enableCommentPanel||o.push("Comment")}else i=!0;var a={hidenItems:n,disabledItems:o,isCancel:i};this.pdfViewer._dotnetInstance.invokeMethodAsync("MouseDownHandler",a)},s.prototype.OnItemSelected=function(e){var t=this.contextMenuModule.currentTarget;switch(e){case this.pdfViewer.localeObj.getConstant("Copy"):var i=!1;this.isFreeTextContextMenu||this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus?(this.pdfViewer.annotation.freeTextAnnotationModule.copySelectedText(),this.contextMenuModule.close(),i=!0):this.pdfViewer.textSelectionModule&&(this.pdfViewer.textSelectionModule.copyText(),this.contextMenuModule.close()),this.pdfViewer.selectedItems.annotations.length&&!i?(this.pdfViewer.copy(),this.contextMenuModule.previousAction="Copy"):this.pdfViewer.selectedItems.formFields.length>0&&(this.pdfViewer.copy(),this.contextMenuModule.previousAction="Copy");break;case this.pdfViewer.localeObj.getConstant("Highlight context"):this.pdfViewer.annotation&&this.pdfViewer.annotation.textMarkupAnnotationModule&&(this.pdfViewer.annotation.textMarkupAnnotationModule.isSelectionMaintained=!1,this.pdfViewer.annotation.textMarkupAnnotationModule.drawTextMarkupAnnotations("Highlight"),this.pdfViewer.annotation.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1,this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode="",this.pdfViewer.annotation.textMarkupAnnotationModule.isSelectionMaintained=!0);break;case this.pdfViewer.localeObj.getConstant("Underline context"):this.pdfViewer.annotation&&this.pdfViewer.annotation.textMarkupAnnotationModule&&(this.pdfViewer.annotation.textMarkupAnnotationModule.isSelectionMaintained=!1,this.pdfViewer.annotation.textMarkupAnnotationModule.drawTextMarkupAnnotations("Underline"),this.pdfViewer.annotation.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1,this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode="",this.pdfViewer.annotation.textMarkupAnnotationModule.isSelectionMaintained=!0);break;case this.pdfViewer.localeObj.getConstant("Strikethrough context"):this.pdfViewer.annotation&&this.pdfViewer.annotation.textMarkupAnnotationModule&&(this.pdfViewer.annotation.textMarkupAnnotationModule.isSelectionMaintained=!1,this.pdfViewer.annotation.textMarkupAnnotationModule.drawTextMarkupAnnotations("Strikethrough"),this.pdfViewer.annotation.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1,this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode="",this.pdfViewer.annotation.textMarkupAnnotationModule.isSelectionMaintained=!0);break;case this.pdfViewer.localeObj.getConstant("Properties"):0===this.pdfViewer.selectedItems.annotations.length||"Line"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"LineWidthArrowHead"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Distance"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?0!==this.pdfViewer.selectedItems.formFields.length&&this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType&&this.pdfViewer.formDesigner.createPropertiesWindow():this.pdfViewer.annotation.createPropertiesWindow();break;case this.pdfViewer.localeObj.getConstant("Cut"):if(this.isFreeTextContextMenu||this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus&&t&&"free-text-input"===t.className&&"TEXTAREA"===t.tagName)this.pdfViewer.annotation.freeTextAnnotationModule.cutSelectedText(t),this.contextMenuModule.close();else if(1===this.pdfViewer.selectedItems.annotations.length){this.pdfViewer.selectedItems.annotations[0].pageIndex;this.pdfViewer.cut(),this.contextMenuModule.previousAction="Cut"}else 1===this.pdfViewer.selectedItems.formFields.length&&(this.pdfViewer.cut(),this.contextMenuModule.previousAction="Cut");break;case this.pdfViewer.localeObj.getConstant("Paste"):this.isFreeTextContextMenu||this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus&&t&&"free-text-input"===t.className&&"TEXTAREA"===t.tagName?(this.pdfViewer.annotation.freeTextAnnotationModule.pasteSelectedText(t),this.contextMenuModule.close()):(this.pdfViewer.paste(),this.contextMenuModule.previousAction="Paste");break;case this.pdfViewer.localeObj.getConstant("Delete Context"):this.pdfViewer.formDesignerModule&&0!=this.pdfViewer.selectedItems.formFields.length?this.pdfViewer.formDesignerModule.deleteFormField(this.pdfViewer.selectedItems.formFields[0].id):this.pdfViewer.annotation&&this.pdfViewer.annotation.deleteAnnotation();break;case this.pdfViewer.localeObj.getConstant("Scale Ratio"):this.isCalibrateAnnotationModule()&&this.pdfViewer.annotation.measureAnnotationModule.createScaleRatioWindow();break;case this.pdfViewer.localeObj.getConstant("Comment"):if(this.pdfViewer.annotation&&(this.pdfViewer.annotation.showCommentsPanel(),0!==this.pdfViewer.selectedItems.annotations.length||this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)){var n=void 0;n=this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation:this.pdfViewer.selectedItems.annotations[0];var o=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+this.pdfViewer.currentPageNumber);o&&o.ej2_instances[0].expandItem(!0);var s=document.getElementById(n.annotName);s&&(s.classList.contains("e-pv-comments-border")||s.firstChild.click())}}},s.prototype.shapeMenuItems=function(e,t,i,n){this.pdfViewer.annotation&&!this.pdfViewer.annotation.isShapeCopied&&t.push("Paste"),e.push("HighlightContext"),e.push("UnderlineContext"),e.push("StrikethroughContext"),e.push("ScaleRatio"),i?"Line"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"LineWidthArrowHead"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Distance"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&e.push("Properties"):n?(e.push("Properties"),e.push("Comment")):(e.push("Cut"),e.push("Copy"),e.push("DeleteContext"),e.push("Comment"))},s.prototype.checkIsRtlText=function(e){return new RegExp("^[^A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02B8\\u0300-\\u0590\\u0800-\\u1FFF\\u2C00-\\uFB1C\\uFDFE-\\uFE6F\\uFEFD-\\uFFFF]*[\\u0591-\\u07FF\\uFB1D-\\uFDFD\\uFE70-\\uFEFC]").test(e)},s.prototype.isClickWithinSelectionBounds=function(e){var i=!1;if(this.pdfViewer.textSelectionModule){var n=this.pdfViewer.textSelectionModule.getCurrentSelectionBounds(this.currentPageNumber-1);if(n){var o=n;this.getHorizontalValue(o.left)<e.clientX&&this.getHorizontalValue(o.right)>e.clientX&&this.getVerticalValue(o.top)<e.clientY&&this.getVerticalValue(o.bottom)>e.clientY&&(i=!0)}(t.Browser.isIE||"edge"===t.Browser.info.name)&&n&&(i=!0)}return i},s.prototype.getHorizontalClientValue=function(e){return e-this.getElement("_pageDiv_"+(this.currentPageNumber-1)).getBoundingClientRect().left},s.prototype.getVerticalClientValue=function(e){return e-this.getElement("_pageDiv_"+(this.currentPageNumber-1)).getBoundingClientRect().top},s.prototype.getHorizontalValue=function(e){var t=this.getElement("_pageDiv_"+(this.currentPageNumber-1)).getBoundingClientRect();return e*this.getZoomFactor()+t.left},s.prototype.getVerticalValue=function(e){var t=this.getElement("_pageDiv_"+(this.currentPageNumber-1)).getBoundingClientRect();return e*this.getZoomFactor()+t.top},s.prototype.checkIsNormalText=function(){var e=!0,t="",i=this.pdfViewer.textSelectionModule;return i&&i.selectionRangeArray&&1===i.selectionRangeArray.length?t=i.selectionRangeArray[0].textContent:window.getSelection()&&window.getSelection().anchorNode&&(t=window.getSelection().toString()),""!==t&&this.checkIsRtlText(t)&&(e=!1),e},s.prototype.initiatePanning=function(){this.isPanMode=!0,this.textLayer.modifyTextCursor(!1),this.disableTextSelectionMode(),this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&!t.isBlazor()&&this.pdfViewer.toolbar.annotationToolbarModule.deselectAllItems()},s.prototype.initiateTextSelectMode=function(){this.isPanMode=!1,this.viewerContainer&&(this.viewerContainer.style.cursor="auto",this.pdfViewer.textSelectionModule&&(this.textLayer.modifyTextCursor(!0),this.pdfViewer.textSelectionModule.enableTextSelectionMode()),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||t.isBlazor()||this.enableAnnotationAddTools(!0))},s.prototype.enableAnnotationAddTools=function(e){this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.enableAnnotationAddTools(e)},s.prototype.applySelection=function(){null!==window.getSelection().anchorNode&&this.pdfViewer.textSelectionModule.applySpanForSelection(),this.isViewerContainerDoubleClick=!1},s.prototype.isDesignerMode=function(e){var t=!1;return 0===this.pdfViewer.selectedItems.annotations.length||"HandWrittenSignature"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"SignatureText"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"SignatureImage"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?0!==this.pdfViewer.selectedItems.annotations.length&&"Path"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?t=!0:0!==this.pdfViewer.selectedItems.formFields.length&&this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType&&this.pdfViewer.designerMode?t=!0:this.pdfViewer.annotation&&this.pdfViewer.annotation.isShapeCopied&&(e.classList.contains("e-pv-text-layer")||e.classList.contains("e-pv-text"))&&!this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?t=!0:this.pdfViewer.formDesigner&&this.pdfViewer.formDesigner.isShapeCopied&&(e.classList.contains("e-pv-text-layer")||e.classList.contains("e-pv-text"))&&(t=!0):t=!0,this.designerModetarget=e,t},s.prototype.handleTaps=function(e){var t=this;this.singleTapTimer?this.pdfViewer.enablePinchZoom&&(this.tapCount++,clearTimeout(this.singleTapTimer),this.singleTapTimer=null,this.onDoubleTap(e)):(this.singleTapTimer=setTimeout(function(){t.onSingleTap(e)},300),this.tapCount++)},s.prototype.handleTextBoxTaps=function(e){var t=this;setTimeout(function(){t.inputTapCount=0},300),this.inputTapCount++;setTimeout(function(){t.onTextBoxDoubleTap(e)},200);this.inputTapCount>2&&(this.inputTapCount=0)},s.prototype.onTextBoxDoubleTap=function(e){e[0].target;if(2===this.inputTapCount&&0!==this.pdfViewer.selectedItems.annotations.length)if(!0===this.isFreeTextAnnotation(this.pdfViewer.selectedItems.annotations))(t={}).x=this.pdfViewer.selectedItems.annotations[0].bounds.x,t.y=this.pdfViewer.selectedItems.annotations[0].bounds.y,this.pdfViewer.annotation.freeTextAnnotationModule.addInuptElemet(t,this.pdfViewer.selectedItems.annotations[0]);else if(!0===this.pdfViewer.selectedItems.annotations[0].enableShapeLabel){var t={};t.x=this.pdfViewer.selectedItems.annotations[0].bounds.x,t.y=this.pdfViewer.selectedItems.annotations[0].bounds.y,this.pdfViewer.annotation.inputElementModule.editLabel(t,this.pdfViewer.selectedItems.annotations[0])}},s.prototype.onSingleTap=function(e){var i=e[0].target,n=!1;if(this.singleTapTimer=null,i&&(i.classList.contains("e-pdfviewer-formFields")||i.classList.contains("e-pdfviewer-ListBox")||i.classList.contains("e-pdfviewer-signatureformfields"))&&(n=!0),!this.isLongTouchPropagated&&!this.navigationPane.isNavigationToolbarVisible&&!n&&this.pdfViewer.toolbarModule){if(this.touchClientX>=e[0].clientX-10&&this.touchClientX<=e[0].clientX+10&&this.touchClientY>=e[0].clientY-10&&this.touchClientY<=e[0].clientY+10){if(this.isTapHidden)t.isBlazor()&&(this.viewerContainer.scrollTop+=this.pdfViewer.element.querySelector(".e-pv-mobile-toolbar").clientHeight*this.getZoomFactor());else if(t.isBlazor()&&(this.viewerContainer.scrollTop-=this.pdfViewer.element.querySelector(".e-pv-mobile-toolbar").clientHeight*this.getZoomFactor()),this.pdfViewer.toolbar.moreDropDown){var o=this.getElement("_more_option-popup");o.firstElementChild&&(o.classList.remove("e-popup-open"),o.classList.add("e-popup-close"),o.removeChild(o.firstElementChild))}this.isTapHidden&&t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?(this.mobileScrollerContainer.style.display="",this.updateMobileScrollerPosition()):t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&null==this.getSelectTextMarkupCurrentPage()&&(this.mobileScrollerContainer.style.display="none"),null==this.getSelectTextMarkupCurrentPage()&&(t.isBlazor()?this.blazorUIAdaptor.tapOnMobileDevice(this.isTapHidden):this.pdfViewer.toolbarModule.showToolbar(!0),this.isTapHidden=!this.isTapHidden)}this.tapCount=0}},s.prototype.onDoubleTap=function(e){var t=e[0].target,i=!1;t&&(t.classList.contains("e-pdfviewer-formFields")||t.classList.contains("e-pdfviewer-ListBox")||t.classList.contains("e-pdfviewer-signatureformfields"))&&(i=!0),2!==this.tapCount||i||(this.tapCount=0,this.touchClientX>=parseInt((e[0].clientX-10).toString())&&this.touchClientX<=e[0].clientX+10&&this.touchClientY>=e[0].clientY-10&&this.touchClientY<=e[0].clientY+30&&(this.pdfViewer.magnification&&1!==this.pdfViewer.selectedItems.annotations.length&&this.pdfViewer.magnification.onDoubleTapMagnification(),this.viewerContainer.style.height=this.updatePageHeight(this.pdfViewer.element.getBoundingClientRect().height,0),this.isTapHidden=!1,clearTimeout(this.singleTapTimer)))},s.prototype.preventTouchEvent=function(e){this.pdfViewer.textSelectionModule&&(this.isPanMode||!this.pdfViewer.enableTextSelection||this.isTextSelectionDisabled||null!=this.getSelectTextMarkupCurrentPage()||this.isWebkitMobile&&t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(e.preventDefault(),e.stopPropagation()))},s.prototype.renderStampAnnotation=function(e){if(this.pdfViewer.annotation){var i=this.getZoomFactor(),n=this.pdfViewer.annotation.getEventPageNumber(e),o=this.getElement("_pageDiv_"+n);if(this.pdfViewer.enableStampAnnotations){var s=this.pdfViewer.annotationModule.stampAnnotationModule;if(s&&s.isStampAnnotSelected&&o){a=o.getBoundingClientRect();t.Browser.isDevice&&"touchend"===e.type&&"Image"===this.pdfViewer.annotationModule.stampAnnotationModule.currentStampAnnotation.shapeAnnotationType?this.pdfViewer.add(this.pdfViewer.annotationModule.stampAnnotationModule.currentStampAnnotation):s.renderStamp((e.changedTouches[0].clientX-a.left)/i,(e.changedTouches[0].clientY-a.top)/i,null,null,n,null,null,null,null),s.isStampAnnotSelected=!1}this.pdfViewer.annotation.onAnnotationMouseDown()}if(this.pdfViewer.enableHandwrittenSignature&&this.isSignatureAdded&&o){var a=o.getBoundingClientRect();this.signatureModule.renderSignature((e.changedTouches[0].clientX-a.left)/i,(e.changedTouches[0].clientY-a.top)/i),this.isSignatureAdded=!1}1===e.touches.length&&this.isTextMarkupAnnotationModule()&&!this.getPopupNoteVisibleStatus()&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.onTextMarkupAnnotationTouchEnd(e)}},s.prototype.initPageDiv=function(e){if(t.isBlazor()||this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.updateTotalPage(),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.mobiletotalPageContainer&&(this.mobiletotalPageContainer.innerHTML=this.pageCount.toString(),this.pageNoContainer.innerHTML="(1-"+this.pageCount.toString()+")"),this.pageCount>0){var i=0,n=0;this.isMixedSizeDocument=!1,this.pageCount>100?(n=100,this.pageLimit=n):n=this.pageCount;for(var o=!1,s=!1,a=!1,r=0;r<n;r++){if("object"!=typeof e.pageSizes[r]){var l=e.pageSizes[r].split(",");if(null!==e.pageSizes[r-1]&&0!==r){d=e.pageSizes[r-1].split(",");i=this.pageGap+parseFloat(d[1])+i}else i=this.pageGap;u={width:parseFloat(l[0]),height:parseFloat(l[1]),top:i};this.pageSize.push(u)}else{if(null!==e.pageSizes[r-1]&&0!==r){var d=e.pageSizes[r-1];i=this.pageGap+parseFloat(d.Height)+i}else i=this.pageGap;var u={width:e.pageSizes[r].Width,height:e.pageSizes[r].Height,top:i};this.pageSize.push(u)}this.pageSize[r].height>this.pageSize[r].width&&(o=!0),this.pageSize[r].width>this.pageSize[r].height&&(s=!0),r>0&&this.pageSize[r].width!==this.pageSize[r-1].width&&(a=!0);var M=this.pageSize[r].width;M>this.highestWidth&&(this.highestWidth=M);var p=this.pageSize[r].height;p>this.highestHeight&&(this.highestHeight=p)}(o&&s||a)&&(this.isMixedSizeDocument=!0);for(var h=this.pageCount<10?this.pageCount:10,r=0;r<h;r++)this.renderPageContainer(r,this.getPageWidth(r),this.getPageHeight(r),this.getPageTop(r));this.pageContainer.style.height=this.getPageTop(this.pageSize.length-1)+this.getPageHeight(this.pageSize.length-1)+"px",this.pageContainer.style.position="relative",100===this.pageLimit&&null===this.getElement("_pageDiv_"+this.pageLimit)&&this.pageLimit<this.pageCount&&Promise.all([this.renderPagesVirtually()])}},s.prototype.renderElementsVirtualScroll=function(e){var t=1,i=e+(t=this.pageStopValue<=200?4:2);i>this.pageCount&&(i=this.pageCount);for(o=e-1;o<=i;o++)-1!==o&&this.renderPageElement(o);var n=e-3;n<0&&(n=0);for(var o=e-1;o>=n;o--)-1!==o&&this.renderPageElement(o);for(var s=0;s<this.pageCount;s++)if(!(n<=s&&s<=i)){var a=this.getElement("_pageDiv_"+s),r=this.getElement("_pageCanvas_"+s),l=this.getElement("_textLayer_"+s);if(r&&(r.parentNode.removeChild(r),l&&(this.pdfViewer.textSelectionModule&&0!==l.childNodes.length&&!this.isTextSelectionDisabled&&this.pdfViewer.textSelectionModule.maintainSelectionOnScroll(s,!0),l.parentNode.removeChild(l)),-1!==(d=this.renderedPagesList.indexOf(s))&&this.renderedPagesList.splice(d,1)),a){a.parentNode.removeChild(a);var d=this.renderedPagesList.indexOf(s);-1!==d&&this.renderedPagesList.splice(d,1)}}},s.prototype.renderPageElement=function(e){var t=this.getElement("_pageDiv_"+e);null==this.getElement("_pageCanvas_"+e)&&null==t&&e<this.pageSize.length&&this.renderPageContainer(e,this.getPageWidth(e),this.getPageHeight(e),this.getPageTop(e))},s.prototype.renderPagesVirtually=function(){return Xt(this,void 0,void 0,function(){var e,t=this;return Kt(this,function(i){return e=this,setTimeout(function(){t.initiateRenderPagesVirtually(e)},500),[2]})})},s.prototype.initiateRenderPagesVirtually=function(e){var t={hashId:e.hashId,isCompletePageSizeNotReceived:!0,action:"VirtualLoad",elementId:e.pdfViewer.element.id,uniqueId:e.documentId};e.jsonDocumentId&&(t.documentId=e.jsonDocumentId),this.virtualLoadRequestHandler=new ti(this.pdfViewer),this.virtualLoadRequestHandler.url=e.pdfViewer.serviceUrl+"/"+e.pdfViewer.serverActionSettings.load,this.virtualLoadRequestHandler.responseType="json",this.virtualLoadRequestHandler.mode=!0,this.virtualLoadRequestHandler.send(t),this.virtualLoadRequestHandler.onSuccess=function(t){var i=t.data;if(i&&"object"!=typeof i)try{i=JSON.parse(i)}catch(t){e.onControlError(500,i,"VirtualLoad")}if(i){for(;"object"!=typeof i;)i=JSON.parse(i);if(e.documentId===i.uniqueId){e.pdfViewer.fireAjaxRequestSuccess("VirtualLoad",i);var n=i;if(e.pageSize[e.pageLimit-1]){for(var o=e.pageSize[e.pageLimit-1].top,s=e.pageLimit;s<e.pageCount;s++){var a=n.pageSizes[s].split(",");if(null!==e.pageSize[s-1]&&0!==s){var r=e.pageSize[s-1].height;o=e.pageGap+parseFloat(r)+o}var l={width:parseFloat(a[0]),height:parseFloat(a[1]),top:o};e.pageSize.push(l)}e.pageContainer.style.height=e.getPageTop(e.pageSize.length-1)+e.getPageHeight(e.pageSize.length-1)+"px";var d=window.sessionStorage.getItem(e.documentId+"_pagedata");e.pageCount>100&&e.pdfViewer.fireDocumentLoad(d)}}}},this.virtualLoadRequestHandler.onFailure=function(t){e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText)},this.virtualLoadRequestHandler.onError=function(t){e.openNotificationPopup(),e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText)}},s.prototype.tileRenderPage=function(e,i){var n=this,o=this;if(e&&this.pageSize[i]){var s=this.getPageWidth(i),a=this.getPageHeight(i),r=this.getElement("_pageCanvas_"+i),l=this.getElement("_pageDiv_"+i);if(l&&(this.isMixedSizeDocument&&this.highestWidth>0?l.style.width=this.highestWidth*this.getZoomFactor()+"px":l.style.width=s+"px",l.style.height=a+"px",l.style.top=this.getPageTop(i)+"px",this.pdfViewer.enableRtl?l.style.right=this.updateLeftPosition(i)+"px":l.style.left=this.updateLeftPosition(i)+"px"),r){r.style.backgroundColor="#fff",r.style.width=s+"px",r.style.height=a+"px";var d=this.retrieveCurrentZoomFactor(),u=this.documentId+"_"+i+"_"+d+"_"+e.tileX+"_"+e.tileY;if(-1===this.tilerequestLists.indexOf(u)&&this.pdfViewer.restrictZoomRequest||!this.pdfViewer.restrictZoomRequest){this.tilerequestLists.push(u);var M=e.image,p=e.transformationMatrix;if(M){var h=new Image;h.onload=function(){var r=n.getElement("_pageCanvas_"+i);if(r){var l=t.isNullOrUndefined(e.scaleFactor)?1.5:e.scaleFactor,d=parseInt(r.width.toString()),u=parseInt((parseFloat(r.style.width)*l).toString());isNaN(parseFloat(r.style.width))||d===u||(r.style.width=s+"px",r.style.height=a+"px",r.height=parseInt((a*l).toString()),r.width=parseInt((s*l).toString())),o.tileRenderCount=o.tileRenderCount+1;var M=n.retrieveCurrentZoomFactor();e.zoomFactor&&(M=e.zoomFactor);var L=p.Elements[0]*n.getZoomFactor()/M,w=p.Elements[1]*n.getZoomFactor()/M,c=p.Elements[2]*n.getZoomFactor()/M,C=p.Elements[3]*n.getZoomFactor()/M,g=p.Elements[4]*n.getZoomFactor()/M,m=p.Elements[5]*n.getZoomFactor()/M,f=r.getContext("2d");f.setTransform(L,w,c,C,g,m),f.drawImage(h,0,0),n.showPageLoadingIndicator(i,!1);var y=e.tileX?e.tileX:0,j=e.tileY?e.tileY:0;if(0===y&&0===j&&0===i&&n.isDocumentLoaded){n.renderPDFInformations(),n.isInitialLoaded=!0;var S=window.sessionStorage.getItem(n.documentId+"_pagedata");n.pageCount<=100&&n.pdfViewer.fireDocumentLoad(S),n.isDocumentLoaded=!1,n.pdfViewer.textSearch&&n.pdfViewer.isExtractText&&n.pdfViewer.textSearchModule.getPDFDocumentTexts()}o.tileRenderCount===o.tileRequestCount&&(o.isTileImageRendered=!1,o.tileRenderCount=0,n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.rerenderCountIncrement()),h.onload=null,h=null}},h.src=M}}var L=e.tileX?e.tileX:0,w=e.tileY?e.tileY:0;0===L&&0===w&&this.onPageRender(e,i,l)}}},s.prototype.calculateImageWidth=function(e,t,i,n){var o=e/this.getZoomFactor()*t*i;return parseInt(n.toString())===parseInt(o.toString())&&(n=o),n=n*this.getZoomFactor()/t},s.prototype.renderPage=function(e,i){var n=this;if(e&&this.pageSize[i]){var o=this.getPageWidth(i),s=this.getPageHeight(i),a=this.getElement("_pageCanvas_"+i),r=this.getElement("_pageDiv_"+i);if(r&&(this.isMixedSizeDocument&&this.highestWidth>0?r.style.width=this.highestWidth*this.getZoomFactor()+"px":r.style.width=o+"px",r.style.height=s+"px",r.style.top=this.getPageTop(i)+"px",this.pdfViewer.enableRtl?r.style.right=this.updateLeftPosition(i)+"px":r.style.left=this.updateLeftPosition(i)+"px"),a){a.style.width=o+"px",a.style.height=s+"px";var l=a.getContext("2d"),d=e.image,u=e.transformationMatrix;if(d){var M=new Image;M.onload=function(){var d=M.width,p=t.isNullOrUndefined(e.scaleFactor)?1.5:e.scaleFactor,h=n.retrieveCurrentZoomFactor();if(d=e.zoomFactor?n.calculateImageWidth(o,e.zoomFactor,p,d):n.calculateImageWidth(o,h,p,d),parseInt((o*p).toString())===parseInt(d.toString())){if(isNaN(parseFloat(a.style.width))||(a.style.width=o+"px",a.style.height=s+"px",a.height=s*window.devicePixelRatio,a.width=o*window.devicePixelRatio),o<parseFloat(r.style.width)&&(r.style.boxShadow="none"),l.setTransform(u.Elements[0],u.Elements[1],u.Elements[2],u.Elements[3],u.Elements[4],u.Elements[5]),l.drawImage(M,0,0,a.width,a.height),n.showPageLoadingIndicator(i,!1),0===i&&n.isDocumentLoaded){n.renderPDFInformations(),n.isInitialLoaded=!0;var L=window.sessionStorage.getItem(n.documentId+"_pagedata");n.pageCount<=100&&n.pdfViewer.fireDocumentLoad(L),n.isDocumentLoaded=!1,n.pdfViewer.textSearch&&n.pdfViewer.isExtractText&&n.pdfViewer.textSearchModule.getPDFDocumentTexts()}n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.rerenderCountIncrement()}M.onload=null,M=null},M.src=d,this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.pushImageObjects(M)}this.onPageRender(e,i,r)}}},s.prototype.onPageRender=function(e,t,i){var n=i.getElementsByTagName("a"),o=!1;if(0!==n.length)for(var s=n.length-1;s>=0;s--)n[s].parentNode.removeChild(n[s]);if((this.pdfViewer.textSearchModule||this.pdfViewer.textSelectionModule||this.pdfViewer.annotationModule)&&this.renderTextContent(e,t),this.pdfViewer.formFieldsModule&&this.pdfViewer.formFieldsModule.renderFormFields(t),this.pdfViewer.formDesignerModule&&!this.isLoadedFormFieldAdded&&this.pdfViewer.formDesignerModule.rerenderFormFields(t),this.pdfViewer.enableHyperlink&&this.pdfViewer.linkAnnotationModule&&this.pdfViewer.linkAnnotationModule.renderHyperlinkContent(e,t),this.pdfViewer.textSelectionModule&&!this.isTextSelectionDisabled&&this.pdfViewer.textSelectionModule.applySelectionRangeOnScroll(t),this.documentAnnotationCollections){for(var a=!1,r=0;r<this.annotationRenderredList.length;r++)this.annotationRenderredList[r]===t&&(a=!0);(l=this.documentAnnotationCollections[t])&&!a&&(e.shapeAnnotation=l.shapeAnnotation,e.measureShapeAnnotation=l.measureShapeAnnotation,e.textMarkupAnnotation=l.textMarkupAnnotation,e.freeTextAnnotation=l.freeTextAnnotation,e.stampAnnotations=l.stampAnnotations,e.stickyNotesAnnotation=l.stickyNotesAnnotation,e.signatureInkAnnotation=l.signatureInkAnnotation,this.annotationRenderredList.push(t))}if(this.isImportAction){var l=this.checkDocumentCollectionData(t);l&&(e.shapeAnnotation=l.shapeAnnotation,e.measureShapeAnnotation=l.measureShapeAnnotation,e.textMarkupAnnotation=l.textMarkupAnnotation,e.freeTextAnnotation=l.freeTextAnnotation,e.stampAnnotations=l.stampAnnotations,e.stickyNotesAnnotation=l.stickyNotesAnnotation,e.signatureInkAnnotation=l.signatureInkAnnotation,o=!0)}if(this.pdfViewer.annotationModule&&(this.isTextMarkupAnnotationModule()||this.isShapeBasedAnnotationsEnabled())){if(this.isStampAnnotationModule()){var d=e.stampAnnotations;o?this.pdfViewer.annotationModule.stampAnnotationModule.renderStampAnnotations(d,t,null,!0):this.pdfViewer.annotationModule.stampAnnotationModule.renderStampAnnotations(d,t)}o?this.pdfViewer.annotationModule.renderAnnotations(t,e.shapeAnnotation,e.measureShapeAnnotation,e.textMarkupAnnotation,null,!0):this.pdfViewer.annotationModule.renderAnnotations(t,e.shapeAnnotation,e.measureShapeAnnotation,e.textMarkupAnnotation),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderStickyNotesAnnotations(e.stickyNotesAnnotation,t)}if(this.pdfViewer.formDesignerModule&&!this.pdfViewer.annotationModule&&this.pdfViewer.formDesignerModule.updateCanvas(t),this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.isTextSearch&&this.pdfViewer.textSearchModule.highlightOtherOccurrences(t),this.isShapeBasedAnnotationsEnabled()){var u=this.getElement("_annotationCanvas_"+t);u&&(ee(u.getBoundingClientRect(),"position:absolute;top:0px;left:0px;overflow:hidden;pointer-events:none;z-index:1000",u,t,this.pdfViewer),this.pdfViewer.renderSelector(t,this.pdfViewer.annotationSelectorSettings))}this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.stickyNotesAnnotationModule.selectCommentsAnnotation(t),this.isFreeTextAnnotationModule()&&e.freeTextAnnotation&&(o?this.pdfViewer.annotationModule.freeTextAnnotationModule.renderFreeTextAnnotations(e.freeTextAnnotation,t,!0):this.pdfViewer.annotationModule.freeTextAnnotationModule.renderFreeTextAnnotations(e.freeTextAnnotation,t)),this.isInkAnnotationModule()&&e&&e.signatureInkAnnotation&&this.pdfViewer.annotationModule.inkAnnotationModule.renderExistingInkSignature(e.signatureInkAnnotation,t,o),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.isAnnotationSelected&&this.pdfViewer.annotationModule.annotationPageIndex===t&&this.pdfViewer.annotationModule.selectAnnotationFromCodeBehind(),this.isLoadedFormFieldAdded=!1},s.prototype.renderAnnotations=function(e){var t={};if(this.documentAnnotationCollections){for(var i=!1,n=0;n<this.annotationRenderredList.length;n++)this.annotationRenderredList[n]===e&&(i=!0);var o=this.documentAnnotationCollections[e];o&&!i&&(t.shapeAnnotation=o.shapeAnnotation,t.measureShapeAnnotation=o.measureShapeAnnotation,t.textMarkupAnnotation=o.textMarkupAnnotation,t.freeTextAnnotation=o.freeTextAnnotation,t.stampAnnotations=o.stampAnnotations,t.stickyNotesAnnotation=o.stickyNotesAnnotation,t.signatureAnnotation=o.signatureAnnotation,t.signatureInkAnnotation=o.signatureInkAnnotation,this.annotationRenderredList.push(e))}if(this.isAnnotationCollectionRemoved&&(t.shapeAnnotation=[],t.measureShapeAnnotation=[],t.textMarkupAnnotation=[],t.freeTextAnnotation=[],t.stampAnnotations=[],t.stickyNotesAnnotation=[],t.signatureInkAnnotation=[]),this.isTextMarkupAnnotationModule()||this.isShapeBasedAnnotationsEnabled()){if(this.isStampAnnotationModule()){var s=t.stampAnnotations;this.pdfViewer.annotationModule.stampAnnotationModule.renderStampAnnotations(s,e)}this.pdfViewer.annotationModule.renderAnnotations(e,t.shapeAnnotation,t.measureShapeAnnotation,t.textMarkupAnnotation),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderStickyNotesAnnotations(t.stickyNotesAnnotation,e)}if(this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.isTextSearch&&this.pdfViewer.textSearchModule.highlightOtherOccurrences(e),this.isImportAction){for(var i=!1,n=0;n<this.annotationPageList.length;n++)this.annotationPageList[n]===e&&(i=!0);i||this.importedAnnotation&&(this.drawPageAnnotations(this.importedAnnotation,e,!0),this.annotationPageList[this.annotationPageList.length]=e)}if(this.isShapeBasedAnnotationsEnabled()){var a=this.getElement("_annotationCanvas_"+e);a&&(ee(a.getBoundingClientRect(),"position:absolute;top:0px;left:0px;overflow:hidden;pointer-events:none;z-index:1000",a,e,this.pdfViewer),this.pdfViewer.renderSelector(e))}this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.stickyNotesAnnotationModule.selectCommentsAnnotation(e),this.isFreeTextAnnotationModule()&&t.freeTextAnnotation&&this.pdfViewer.annotationModule.freeTextAnnotationModule.renderFreeTextAnnotations(t.freeTextAnnotation,e),t&&t.signatureAnnotation&&this.signatureModule.renderExistingSignature(t.signatureAnnotation,e,!1),this.isInkAnnotationModule()&&t&&t.signatureInkAnnotation&&this.pdfViewer.annotationModule.inkAnnotationModule.renderExistingInkSignature(t.signatureInkAnnotation,e,!1),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.isAnnotationSelected&&this.pdfViewer.annotationModule.selectAnnotationFromCodeBehind()},s.prototype.renderTextContent=function(e,t){var i=e.textContent,n=e.textBounds,o=e.rotation,s=this.getElement("_textLayer_"+t);s||(s=this.textLayer.addTextLayer(t,this.getPageWidth(t),this.getPageHeight(t),this.getElement("_pageDiv_"+t))),s&&i&&n&&(s.style.display="block",0===s.childNodes.length?this.textLayer.renderTextContents(t,i,n,o):this.textLayer.resizeTextContents(t,i,n,o,!0))},s.prototype.renderPageContainer=function(e,i,n,o){var s=t.createElement("div",{id:this.pdfViewer.element.id+"_pageDiv_"+e,className:"e-pv-page-div",attrs:{tabindex:"0"}});this.isMixedSizeDocument&&this.highestWidth>0?s.style.width=this.highestWidth*this.getZoomFactor()+"px":s.style.width=i+"px",s.style.height=n+"px",this.pdfViewer.enableRtl?s.style.right=this.updateLeftPosition(e)+"px":s.style.left=this.updateLeftPosition(e)+"px",s.style.top=o+"px",this.pageContainer.appendChild(s),this.pageContainer.style.width=this.viewerContainer.clientWidth+"px",this.createWaitingPopup(e),this.orderPageDivElements(s,e),this.renderPageCanvas(s,i,n,e,"block"),!t.Browser.isDevice||this.pdfViewer.enableDesktopMode||this.isThumb||this.updateMobileScrollerPosition()},s.prototype.renderPDFInformations=function(){!this.pdfViewer.thumbnailViewModule||t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||this.pdfViewer.thumbnailViewModule.createRequestForThumbnails(),this.pdfViewer.bookmarkViewModule&&this.pdfViewer.bookmarkViewModule.createRequestForBookmarks(),this.pdfViewer.annotationModule&&(this.pdfViewer.toolbarModule&&this.pdfViewer.annotationModule.stickyNotesAnnotationModule.initializeAcccordionContainer(),this.pdfViewer.isCommandPanelOpen&&this.pdfViewer.annotation.showCommentsPanel(),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.createRequestForComments())},s.prototype.orderPageDivElements=function(e,t){var i=this.getElement("_pageDiv_"+(t+1));i?this.pageContainer.insertBefore(e,i):this.pageContainer.appendChild(e)},s.prototype.renderPageCanvas=function(e,i,n,o,s){if(e){var a=t.createElement("canvas",{id:this.pdfViewer.element.id+"_pageCanvas_"+o,className:"e-pv-page-canvas"});return a.width=i,a.height=n,a.style.display=s,this.isMixedSizeDocument&&this.highestWidth>0&&(a.style.marginLeft="auto",a.style.marginRight="auto"),e.appendChild(a),(this.pdfViewer.textSearchModule||this.pdfViewer.textSelectionModule||this.pdfViewer.annotationModule)&&this.textLayer.addTextLayer(o,i,n,e),this.pdfViewer.annotationModule&&this.pdfViewer.annotation&&this.pdfViewer.annotationModule.createAnnotationLayer(e,i,n,o,s),this.pdfViewer.formDesignerModule&&!this.pdfViewer.annotationModule&&this.pdfViewer.formDesignerModule.createAnnotationLayer(e,i,n,o,s),a}},s.prototype.applyElementStyles=function(e,t){if(this.isMixedSizeDocument&&e){var i=document.getElementById(this.pdfViewer.element.id+"_pageCanvas_"+t),n=document.getElementById(this.pdfViewer.element.id+"_oldCanvas_"+t);e&&i&&i.offsetLeft>0?(e.style.marginLeft=i.offsetLeft+"px",e.style.marginRight=i.offsetLeft+"px"):n&&n.offsetLeft>0?(e.style.marginLeft=n.offsetLeft+"px",e.style.marginRight=n.offsetLeft+"px"):(e.style.marginLeft="auto",e.style.marginRight="auto")}},s.prototype.updateLeftPosition=function(e){var i,n=this.viewerContainer.getBoundingClientRect().width;if(0===n&&(n=parseFloat(this.pdfViewer.width.toString())),i=this.isMixedSizeDocument&&this.highestWidth>0?this.viewerContainer.clientWidth>0?(this.viewerContainer.clientWidth-this.highestWidth*this.getZoomFactor())/2:(n-this.highestWidth*this.getZoomFactor())/2:this.viewerContainer.clientWidth>0?(this.viewerContainer.clientWidth-this.getPageWidth(e))/2:(n-this.getPageWidth(e))/2,this.pageSize[e].width,this.pageSize[e].height,i<0||this.pdfViewer.magnificationModule&&(this.pdfViewer.magnificationModule.isAutoZoom&&this.getZoomFactor()<1||"fitToWidth"===this.pdfViewer.magnificationModule.fitType)){var o=i;(i=i>0&&t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?i:this.pageLeft)>0&&this.isMixedSizeDocument&&o>0&&(i=o)}return i},s.prototype.applyLeftPosition=function(e){var t;if(this.pageSize[e]){if(t=this.isMixedSizeDocument&&this.highestWidth>0?this.viewerContainer.clientWidth>0?(this.viewerContainer.clientWidth-this.highestWidth*this.getZoomFactor())/2:(this.viewerContainer.getBoundingClientRect().width-this.highestWidth*this.getZoomFactor())/2:this.viewerContainer.clientWidth>0?(this.viewerContainer.clientWidth-this.pageSize[e].width*this.getZoomFactor())/2:(this.viewerContainer.getBoundingClientRect().width-this.pageSize[e].width*this.getZoomFactor())/2,this.pageSize[e].width,this.pageSize[e].height,t<0||this.pdfViewer.magnificationModule&&(this.pdfViewer.magnificationModule.isAutoZoom&&this.getZoomFactor()<1||"fitToWidth"===this.pdfViewer.magnificationModule.fitType)){var i=t;t=this.pageLeft,i>0&&this.isMixedSizeDocument&&(t=i)}var n=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+e);n&&(this.pdfViewer.enableRtl?n.style.right=t+"px":n.style.left=t+"px")}},s.prototype.updatePageHeight=function(e,t){return(e-t)/e*100+"%"},s.prototype.initiatePageViewScrollChanged=function(){this.scrollHoldTimer&&clearTimeout(this.scrollHoldTimer),this.scrollHoldTimer=null,this.scrollPosition*this.getZoomFactor()!==this.viewerContainer.scrollTop&&(this.scrollPosition=this.viewerContainer.scrollTop,this.pageViewScrollChanged(this.currentPageNumber))},s.prototype.renderCountIncrement=function(){this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.renderCountIncrement()},s.prototype.pageViewScrollChanged=function(e){this.isPanMode?-1===this.renderedPagesList.indexOf(e-1)&&(this.reRenderedCount=0):this.reRenderedCount=0;var t=e-1;if(e!==this.previousPage&&e<=this.pageCount){n=!1;this.isDataExits&&!this.getStoredData(t)&&(n=!0),-1!==this.renderedPagesList.indexOf(t)||this.getMagnified()||n||(this.createRequestForRender(t),this.renderCountIncrement())}if(!this.getMagnified()&&!this.getPagesPinchZoomed()){var i=t-1,n=!1,o=this.getElement("_pageCanvas_"+i);this.isDataExits&&!this.getStoredData(i)&&(n=!0),null===o||n||-1!==this.renderedPagesList.indexOf(i)||this.getMagnified()||(this.createRequestForRender(i),this.renderCountIncrement()),this.isMinimumZoom&&this.renderPreviousPagesInScroll(i);var s=t+1,a=0;if(s<this.pageCount&&(a=this.getPageHeight(s),-1===this.renderedPagesList.indexOf(s)&&!this.getMagnified()&&a))for(this.createRequestForRender(s),this.renderCountIncrement();this.viewerContainer.clientHeight>a&&(s+=1)<this.pageCount;)this.renderPageElement(s),this.createRequestForRender(s),a+=this.getPageHeight(s),this.renderCountIncrement()}},s.prototype.renderPreviousPagesInScroll=function(e){var t=e-1,i=t-1;t>0&&(-1!==this.renderedPagesList.indexOf(t)||this.getMagnified()||(this.createRequestForRender(t),this.renderCountIncrement()),i>0&&(-1!==this.renderedPagesList.indexOf(i)||this.getMagnified()||(this.createRequestForRender(i),this.renderCountIncrement())))},s.prototype.downloadDocument=function(e){e=(URL||webkitURL).createObjectURL(e);var i=t.createElement("a");if(i.click)i.href=e,i.target="_parent","download"in i&&(i.download=this.pdfViewer.downloadFileName),(document.body||document.documentElement).appendChild(i),i.click(),i.parentNode.removeChild(i);else{if(window.top===window&&e.split("#")[0]===window.location.href.split("#")[0]){var n=-1===e.indexOf("?")?"?":"&";e=e.replace(/#|$/,n+"$&")}window.open(e,"_parent")}},s.prototype.downloadExportAnnotationJson=function(e,i){e=(URL||webkitURL).createObjectURL(e);var n=t.createElement("a");if(n.click)n.href=e,n.target="_parent","download"in n&&(null!==this.pdfViewer.exportAnnotationFileName?n.download=this.pdfViewer.exportAnnotationFileName.split(".")[0]+".json":n.download=this.pdfViewer.fileName.split(".")[0]+".json"),(document.body||document.documentElement).appendChild(n),n.click(),n.parentNode.removeChild(n),i?this.pdfViewer.fireFormExportSuccess(e,n.download):this.pdfViewer.fireExportSuccess(e,n.download);else{if(window.top===window&&e.split("#")[0]===window.location.href.split("#")[0]){var o=-1===e.indexOf("?")?"?":"&";e=e.replace(/#|$/,o+"$&")}window.open(e,"_parent"),i?this.pdfViewer.fireFormExportSuccess(e,this.pdfViewer.fileName.split(".")[0]+".json"):this.pdfViewer.fireExportSuccess(e,this.pdfViewer.fileName.split(".")[0]+".json")}},s.prototype.downloadExportedXFdfAnnotation=function(e){e=(URL||webkitURL).createObjectURL(e);var i=t.createElement("a");i.click&&(i.href=e,i.target="_parent","download"in i&&(null!==this.pdfViewer.exportAnnotationFileName?i.download=this.pdfViewer.exportAnnotationFileName.split(".")[0]+".xfdf":i.download=this.pdfViewer.fileName.split(".")[0]+".xfdf"),(document.body||document.documentElement).appendChild(i),i.click(),i.parentNode.removeChild(i),this.pdfViewer.fireExportSuccess(e,i.download))},s.prototype.exportFormFields=function(e){this.createRequestForExportFormfields(!1,e)},s.prototype.importFormFields=function(e){this.createRequestForImportingFormfields(e)},s.prototype.createRequestForExportFormfields=function(e,i){var n=this,o=this,s=new Promise(function(s,a){var r=o.createFormfieldsJsonData();o.pdfViewer.fireFormExportStarted(r.pdfAnnotation),r.action="ExportFormFields",r.hashId=o.hashId,r.fileName=o.pdfViewer.fileName,i&&""!==i&&!e&&(r.filePath=i),r.elementId=n.pdfViewer.element.id,o.jsonDocumentId&&(r.document=o.jsonDocumentId);var l=o.pdfViewer.serviceUrl+"/"+o.pdfViewer.serverActionSettings.exportFormFields;o.exportFormFieldsRequestHandler=new ti(n.pdfViewer),o.exportFormFieldsRequestHandler.url=l,o.exportFormFieldsRequestHandler.mode=!0,o.exportFormFieldsRequestHandler.responseType="text",o.exportFormFieldsRequestHandler.send(r),o.exportFormFieldsRequestHandler.onSuccess=function(i){var n=i.data;if(n&&n)if(o.pdfViewer.fireAjaxRequestSuccess(o.pdfViewer.serverActionSettings.exportFormFields,n),e){var a=decodeURIComponent(escape(atob(n.split(",")[1])));s(a),o.pdfViewer.fireFormExportSuccess(a,o.pdfViewer.fileName)}else if(n.split("base64,")[1]){var r=o.createBlobUrl(n.split("base64,")[1],"application/json");t.Browser.isIE||"edge"===t.Browser.info.name?window.navigator.msSaveOrOpenBlob(r,o.pdfViewer.fileName.split(".")[0]+".json"):o.downloadExportAnnotationJson(r,!0)}},o.exportFormFieldsRequestHandler.onFailure=function(e){o.pdfViewer.fireFormExportFailed(r.pdfAnnotation,e.statusText)},o.exportFormFieldsRequestHandler.onError=function(e){o.pdfViewer.fireFormExportFailed(r.pdfAnnotation,e.statusText)}});return!e||s},s.prototype.createRequestForImportingFormfields=function(e){var t=this,i={};"object"==typeof e?i.data=JSON.stringify(e):(i.data=e,i.fileName=t.pdfViewer.fileName),t.pdfViewer.fireFormImportStarted(e),i.action="ImportFormFields",i.hashId=t.hashId,i.elementId=this.pdfViewer.element.id,t.jsonDocumentId&&(i.document=t.jsonDocumentId);var n=t.pdfViewer.serviceUrl+"/"+t.pdfViewer.serverActionSettings.importFormFields;t.importFormFieldsRequestHandler=new ti(this.pdfViewer),t.importFormFieldsRequestHandler.url=n,t.importFormFieldsRequestHandler.mode=!0,t.importFormFieldsRequestHandler.responseType="text",t.importFormFieldsRequestHandler.send(i),t.importFormFieldsRequestHandler.onSuccess=function(i){var n=i.data;if(n&&"null"!==n){if("object"!=typeof n)try{"object"!=typeof(n=JSON.parse(n))&&(t.onControlError(500,n,t.pdfViewer.serverActionSettings.importFormFields),t.pdfViewer.fireFormImportFailed(e,i.statusText),n=null)}catch(i){t.pdfViewer.fireFormImportFailed(e,t.pdfViewer.localeObj.getConstant("File not found")),t.openImportExportNotificationPopup(t.pdfViewer.localeObj.getConstant("File not found")),t.onControlError(500,n,t.pdfViewer.serverActionSettings.importFormFields),n=null}t.pdfViewer.fireAjaxRequestSuccess(t.pdfViewer.serverActionSettings.importFormFields,n),t.pdfViewer.fireFormImportSuccess(e),window.sessionStorage.removeItem(this.documentId+"_formfields"),this.pdfViewer.formFieldsModule.removeExistingFormFields(),window.sessionStorage.removeItem(this.documentId+"_formDesigner"),t.saveFormfieldsData(n);for(var o=0;o<t.renderedPagesList.length;o++)this.pdfViewer.formFieldsModule.renderFormFields(o)}else t.pdfViewer.fireFormImportFailed(e,i.statusText),t.openImportExportNotificationPopup(t.pdfViewer.localeObj.getConstant("File not found"))},t.importFormFieldsRequestHandler.onFailure=function(i){t.pdfViewer.fireFormImportFailed(e,i.statusText)},t.importFormFieldsRequestHandler.onError=function(i){t.pdfViewer.fireFormImportFailed(e,i.statusText)}},s.prototype.createFormfieldsJsonData=function(){var e={};if(this.pdfViewer.formFieldsModule){t=this.pdfViewer.formFieldsModule.downloadFormFieldsData();e.fieldsData=t}if(this.pdfViewer.formDesignerModule){var t=this.pdfViewer.formDesignerModule.downloadFormDesigner();e.formDesigner=t}return e},s.prototype.constructJsonDownload=function(){var e={hashId:this.hashId};if(this.jsonDocumentId&&(e.documentId=this.jsonDocumentId),this.importPageList=[],this.pdfViewer.annotationModule&&this.saveImportedAnnotations(),this.isTextMarkupAnnotationModule()){var t=this.pdfViewer.annotationModule.textMarkupAnnotationModule.saveTextMarkupAnnotations();e.textMarkupAnnotations=t}if(this.isShapeAnnotationModule()){var i=this.pdfViewer.annotationModule.shapeAnnotationModule.saveShapeAnnotations();e.shapeAnnotations=i}if(this.isCalibrateAnnotationModule()){var n=this.pdfViewer.annotationModule.measureAnnotationModule.saveMeasureShapeAnnotations();e.measureShapeAnnotations=n}if(this.isStampAnnotationModule()){var o=this.pdfViewer.annotationModule.stampAnnotationModule.saveStampAnnotations();e.stampAnnotations=o}if(this.isCommentAnnotationModule()){var s=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.saveStickyAnnotations();e.stickyNotesAnnotation=s}if(this.isImportAction){var a=JSON.stringify(this.importPageList);e.importPageList=a}if(this.pdfViewer.formFieldsModule){r=this.pdfViewer.formFieldsModule.downloadFormFieldsData();e.fieldsData=r}if(this.pdfViewer.formDesignerModule){var r=this.pdfViewer.formDesignerModule.downloadFormDesigner();e.formDesigner=r}var l=this.signatureModule.saveSignature();if(e.signatureData=l,this.pdfViewer.isSignatureEditable&&(e.isSignatureEdited=this.pdfViewer.isSignatureEditable),this.isFreeTextAnnotationModule()){var d=this.pdfViewer.annotationModule.freeTextAnnotationModule.saveFreeTextAnnotations();e.freeTextAnnotation=d}if(this.isInkAnnotationModule()){var u=this.pdfViewer.annotationModule.inkAnnotationModule.saveInkSignature();e.inkSignatureData=u}return e.action="Download",e.elementId=this.pdfViewer.element.id,e},s.prototype.checkFormFieldCollection=function(e){var t=!1,i=window.sessionStorage.getItem(this.documentId+"_formDesigner"),n=JSON.parse(i);if(n)for(var o=0;o<n.length;o++)if("RadioButton"===n[o].FormField.formFieldAnnotationType){for(var s=0;s<n[o].FormField.radiobuttonItem.length;s++)if(e===n[o].FormField.radiobuttonItem[s].id.split("_")[0]){t=!0;break}}else if(n[o].Key.split("_")[0]===e){t=!0;break}return t},s.prototype.isFreeTextAnnotationModule=function(){return!!this.pdfViewer.annotation&&!(!this.pdfViewer.annotation||!this.pdfViewer.annotation.freeTextAnnotationModule)},s.prototype.createRequestForDownload=function(){var e=this;e.pdfViewer.fireDownloadStart(e.pdfViewer.downloadFileName);var i=this.constructJsonDownload();this.dowonloadRequestHandler=new ti(this.pdfViewer),this.dowonloadRequestHandler.url=e.pdfViewer.serviceUrl+"/"+e.pdfViewer.serverActionSettings.download,this.dowonloadRequestHandler.responseType="text",this.validateForm&&this.pdfViewer.enableFormFieldsValidation?(this.pdfViewer.fireValidatedFailed(e.pdfViewer.serverActionSettings.download),this.validateForm=!1):this.dowonloadRequestHandler.send(i),this.dowonloadRequestHandler.onSuccess=function(i){var n=i.data;if(n){if("object"!=typeof n&&-1===n.indexOf("data:application/pdf")&&(e.onControlError(500,n,e.pdfViewer.serverActionSettings.download),n=null),"object"==typeof n&&(n=JSON.parse(n)),n){e.pdfViewer.fireAjaxRequestSuccess(e.pdfViewer.serverActionSettings.download,n);var o=e.createBlobUrl(n.split("base64,")[1],"application/pdf");t.Browser.isIE||"edge"===t.Browser.info.name?window.navigator.msSaveOrOpenBlob(o,e.pdfViewer.downloadFileName):e.downloadDocument(o),e.pdfViewer.fireDownloadEnd(e.pdfViewer.downloadFileName,n)}e.updateDocumentAnnotationCollections()}else e.pdfViewer.fireDownloadEnd(e.pdfViewer.downloadFileName,"PDF Document saved in server side successfully")},this.dowonloadRequestHandler.onFailure=function(t){e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,e.pdfViewer.serverActionSettings.download)},this.dowonloadRequestHandler.onError=function(t){e.openNotificationPopup(),e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,e.pdfViewer.serverActionSettings.download)}},s.prototype.getTileCount=function(e){if(e&&"number"==typeof e){var t=1;t=this.getZoomFactor()>2&&e<=1200?2:e/816;var i=parseInt(t.toFixed());return i<=0?1:this.pdfViewer.tileRenderingSettings.enableTileRendering?i:1}return 1},s.prototype.createRequestForRender=function(e){var t=this,i=t.getElement("_pageCanvas_"+e),n=t.getElement("_oldCanvas_"+e);if(this.pageSize&&this.pageSize[e]){var o=this.pageSize[e].width,s=(this.pageSize[e].height,this.getElement("_pageCanvas_"+e),1200),a=t.pdfViewer.element.clientHeight>0?t.pdfViewer.element.clientHeight:t.pdfViewer.element.style.height;s=parseInt(s),a=parseInt(a);var r=void 0,l=void 0,d=this.getTileCount(o);if(i){isNaN(parseFloat(i.style.width))&&!n||t.isInitialLoaded&&t.showPageLoadingIndicator(e,!1);var u=t.getStoredData(e);r=l=d;var M=t.pdfViewer.tileRenderingSettings;M.enableTileRendering&&M.x>0&&M.y>0&&(s<o||this.getZoomFactor()>2)&&(r=M.x,l=M.y),t.tileRequestCount=r*l;var p=this.retrieveCurrentZoomFactor(),h=void 0;if(1===d)u=t.getStoredData(e),h=t.pageRequestSent(e,0,0);else{var L=JSON.parse(t.getWindowSessionStorageTile(e,0,0,p));L&&(u=L)}if(u&&u.uniqueId===t.documentId){if(i.style.backgroundColor="#fff",t.pdfViewer.magnification&&t.pdfViewer.magnification.isPinchZoomed||!this.pageSize[e])return;var w=this.retrieveCurrentZoomFactor();if(s=w>2&&o<=1200?700:1200,t.pdfViewer.tileRenderingSettings.enableTileRendering||(s=1200),s>=o||!t.pdfViewer.tileRenderingSettings.enableTileRendering)t.renderPage(u,e);else{t.isTileImageRendered=!0,t.tileRenderCount=0,t.tileRenderPage(u,e);for(var c=0;c<r;c++)for(var C=0;C<l;C++)0===c&&0===C||(u=JSON.parse(this.getWindowSessionStorageTile(e,c,C,w)))&&t.tileRenderPage(u,e)}u=null}else if(null===u||!h){if(this.getPagesPinchZoomed()?t.showPageLoadingIndicator(e,!1):t.showPageLoadingIndicator(e,!0),t.getPagesZoomed()&&t.isInitialLoaded&&t.showPageLoadingIndicator(e,!1),t.pdfViewer.magnification&&t.pdfViewer.magnification.isPinchZoomed)return;t.pdfViewer.tileRenderingSettings.enableTileRendering||(r=1,l=1),t.tileRenderCount=0,t.isTileImageRendered=!0;for(var g=0;g<r;g++)for(var m=0;m<l;m++){var f=void 0,y=this.retrieveCurrentZoomFactor();s=y>2&&o<=1200?700:1200,t.pdfViewer.tileRenderingSettings.enableTileRendering||(s=1200),f={xCoordinate:g,yCoordinate:m,viewPortWidth:s,viewPortHeight:a,pageNumber:e,hashId:t.hashId,tilecount:d,tileXCount:r,tileYCount:l,zoomFactor:y,action:"RenderPdfPages",uniqueId:this.documentId,elementId:t.pdfViewer.element.id},this.jsonDocumentId&&(f.documentId=this.jsonDocumentId),t.pageRequestHandler=new ti(this.pdfViewer),t.pageRequestHandler.url=t.pdfViewer.serviceUrl+"/"+t.pdfViewer.serverActionSettings.renderPages,t.pageRequestHandler.responseType="json",t.pageRequestHandler.send(f),t.requestLists.push(t.documentId+"_"+e+"_"+g+"_"+m+"_"+y),t.pageRequestHandler.onSuccess=function(i){if(!(t.pdfViewer.magnification&&t.pdfViewer.magnification.isPinchZoomed||!t.pageSize[e])){var n=i.data;if(n&&"object"!=typeof n)try{n=JSON.parse(n)}catch(e){t.onControlError(500,n,t.pdfViewer.serverActionSettings.renderPages),n=null}if(n){for(;"object"!=typeof n;)n=JSON.parse(n);if(n.image&&n.uniqueId===t.documentId){t.pdfViewer.fireAjaxRequestSuccess(t.pdfViewer.serverActionSettings.renderPages,n);var a=void 0!==n.pageNumber?n.pageNumber:e;s>=o||!t.pdfViewer.tileRenderingSettings.enableTileRendering?t.storeWinData(n,a):t.storeWinData(n,a,n.tileX,n.tileY),s>=o||!t.pdfViewer.tileRenderingSettings.enableTileRendering?t.renderPage(n,a):t.tileRenderPage(n,a)}}}},this.pageRequestHandler.onFailure=function(e){t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,t.pdfViewer.serverActionSettings.renderPages)},this.pageRequestHandler.onError=function(e){t.openNotificationPopup(),t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,t.pdfViewer.serverActionSettings.renderPages)}}}t.renderedPagesList.push(e)}}},s.prototype.pageRequestSent=function(e,t,i){var n=this.retrieveCurrentZoomFactor(),o=this.documentId+"_"+e+"_"+t+"_"+i+"_"+n;return!!(this.requestLists&&this.requestLists.indexOf(o)>-1)},s.prototype.onControlError=function(e,t,i){this.openNotificationPopup(),this.pdfViewer.fireAjaxRequestFailed(e,t,i)},s.prototype.getStoredData=function(e){var t=this.retrieveCurrentZoomFactor();this.pdfViewer.restrictZoomRequest&&!this.pdfViewer.tileRenderingSettings.enableTileRendering&&(t=1);var i=this.getWindowSessionStorage(e,t)?this.getWindowSessionStorage(e,t):this.getPinchZoomPage(e),n=null;return i&&(n=i,this.isPinchZoomStorage||(n=JSON.parse(i)),this.isPinchZoomStorage=!1),n},s.prototype.storeWinData=function(e,t,i,n){var o,s=this.createBlobUrl(e.image.split("base64,")[1],"image/png"),a=(URL||webkitURL).createObjectURL(s);isNaN(i)&&isNaN(n)||0===i&&0===n?(o={image:a,transformationMatrix:e.transformationMatrix,hyperlinks:e.hyperlinks,hyperlinkBounds:e.hyperlinkBounds,linkAnnotation:e.linkAnnotation,linkPage:e.linkPage,annotationLocation:e.annotationLocation,textContent:e.textContent,textBounds:e.textBounds,pageText:e.pageText,rotation:e.rotation,scaleFactor:e.scaleFactor,uniqueId:e.uniqueId,zoomFactor:e.zoomFactor,tileX:i,tileY:n},this.pageSize[t]&&(this.pageSize[t].rotation=parseFloat(e.rotation)),this.textLayer.characterBound[t]=e.characterBounds):o={image:a,transformationMatrix:e.transformationMatrix,tileX:i,tileY:n,zoomFactor:e.zoomFactor};this.pageSize[t]&&this.pageSize[t].width,this.manageSessionStorage(t,o,i,n)},s.prototype.setCustomAjaxHeaders=function(e){for(var t=0;t<this.pdfViewer.ajaxRequestSettings.ajaxHeaders.length;t++)e.setRequestHeader(this.pdfViewer.ajaxRequestSettings.ajaxHeaders[t].headerName,this.pdfViewer.ajaxRequestSettings.ajaxHeaders[t].headerValue)},s.prototype.getPinchZoomPage=function(e){for(var t in this.pinchZoomStorage)if(this.pinchZoomStorage.hasOwnProperty(t)&&this.pinchZoomStorage[t].index===e)return this.isPinchZoomStorage=!0,this.pinchZoomStorage[t].pinchZoomStorage;return null},s.prototype.getWindowSessionStorage=function(e,t){return window.sessionStorage.getItem(this.documentId+"_"+e+"_"+t)},s.prototype.getWindowSessionStorageTile=function(e,t,i,n){return window.sessionStorage.getItem(this.documentId+"_"+e+"_"+t+"_"+i+"_"+n)},s.prototype.retrieveCurrentZoomFactor=function(){var e=this.getZoomFactor();return this.pdfViewer.enableZoomOptimization?(e<=1?e=1:e>1&&e<=2?e=2:e>2&&e<=3?e=3:e>3&&e<=4&&(e=4),e):(e<=0&&(e=1),e)},s.prototype.manageSessionStorage=function(e,t,i,n){var o=Math.round(JSON.stringify(window.sessionStorage).length/1024);if(o>=5e3){if(!this.isStorageExceed){for(var s=[],a=0;a<window.sessionStorage.length;a++)window.sessionStorage.key(a)&&window.sessionStorage.key(a).split("_")[3]&&"annotations"===window.sessionStorage.key(a).split("_")[3]&&(this.annotationStorage[window.sessionStorage.key(a)]=window.sessionStorage.getItem(window.sessionStorage.key(a)),s.push(window.sessionStorage.key(a)));if(s)for(a=0;a<s.length;a++)window.sessionStorage.removeItem(s[a])}if(this.isStorageExceed=!0,(o=Math.round(JSON.stringify(window.sessionStorage).length/1024))>=5e3){var r=window.sessionStorage.length;r>200&&(r=200);for(a=0;a<r;a++)window.sessionStorage.key(a)&&window.sessionStorage.key(a).split("_")[3]&&"annotations"!==window.sessionStorage.key(a).split("_")[3]&&window.sessionStorage.removeItem(window.sessionStorage.key(a))}}var l=this.retrieveCurrentZoomFactor();isNaN(i)&&isNaN(n)?(window.sessionStorage.setItem(this.documentId+"_"+e+"_"+l,JSON.stringify(t)),this.sessionStorage.push(this.documentId+"_"+e+"_"+l)):(this.sessionStorage.push(this.documentId+"_"+e+"_"+i+"_"+n+"_"+l),window.sessionStorage.setItem(this.documentId+"_"+e+"_"+i+"_"+n+"_"+l,JSON.stringify(t)))},s.prototype.createBlobUrl=function(e,t){for(var i=atob(e),n=[],o=0;o<i.length;o+=512){for(var s=i.slice(o,o+512),a=new Array(s.length),r=0;r<s.length;r++)a[r]=s.charCodeAt(r);var l=new Uint8Array(a);n.push(l)}return new Blob(n,{type:t})},s.prototype.getRandomNumber=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){return(16*Math.random()|0).toString(16)})},s.prototype.createGUID=function(){return"Sync_PdfViewer_"+this.getRandomNumber()},s.prototype.isClickedOnScrollBar=function(e,t){var i=!1;return t&&this.setScrollDownValue(e.type,!1),this.viewerContainer.clientWidth+this.viewerContainer.offsetLeft<e.clientX&&e.clientX<this.viewerContainer.offsetWidth+this.viewerContainer.offsetLeft&&(i=!0,t&&this.setScrollDownValue(e.type,!0)),this.viewerContainer.clientHeight+this.viewerContainer.offsetTop<e.clientY&&e.clientY<this.viewerContainer.offsetHeight+this.viewerContainer.offsetTop&&(i=!0,t&&this.setScrollDownValue(e.type,!0)),i},s.prototype.setScrollDownValue=function(e,t){"mousedown"===e&&(this.isScrollbarMouseDown=t)},s.prototype.disableTextSelectionMode=function(){this.isTextSelectionDisabled=!0,this.viewerContainer.classList.remove("e-enable-text-selection"),this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.clearTextSelection(),this.viewerContainer.classList.add("e-disable-text-selection"),this.viewerContainer.addEventListener("selectstart",function(){return!1})},s.prototype.getElement=function(e){return document.getElementById(this.pdfViewer.element.id+e)},s.prototype.getPageWidth=function(e){return this.pageSize[e]?this.pageSize[e].width*this.getZoomFactor():0},s.prototype.getPageHeight=function(e){return this.pageSize[e]?this.pageSize[e].height*this.getZoomFactor():0},s.prototype.getPageTop=function(e){return this.pageSize[e]?this.pageSize[e].top*this.getZoomFactor():0},s.prototype.isAnnotationToolbarHidden=function(){return!this.pdfViewer.toolbarModule.annotationToolbarModule||this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden},s.prototype.getTextMarkupAnnotationMode=function(){return!!this.isTextMarkupAnnotationModule()&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.isTextMarkupAnnotationMode},s.prototype.isNewFreeTextAnnotation=function(){return!this.pdfViewer.annotationModule||!this.pdfViewer.annotationModule.freeTextAnnotationModule||!this.pdfViewer.annotationModule.freeTextAnnotationModule.isNewFreeTextAnnot},s.prototype.getCurrentTextMarkupAnnotation=function(){return!!this.isTextMarkupAnnotationModule()&&!!this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation},s.prototype.getSelectTextMarkupCurrentPage=function(){return this.isTextMarkupAnnotationModule()?this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage:null},s.prototype.getAnnotationToolStatus=function(){return!!this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.isAnnotationButtonsEnabled()},s.prototype.getPopupNoteVisibleStatus=function(){return!!this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.isPopupNoteVisible},s.prototype.isTextMarkupAnnotationModule=function(){return this.pdfViewer.annotationModule?this.pdfViewer.annotationModule.textMarkupAnnotationModule:null},s.prototype.isShapeAnnotationModule=function(){return!!this.pdfViewer.annotation&&!(!this.pdfViewer.annotation||!this.pdfViewer.annotation.shapeAnnotationModule)},s.prototype.isFormDesignerModule=function(){return!!this.pdfViewer.formDesignerModule},s.prototype.isCalibrateAnnotationModule=function(){return!!this.pdfViewer.annotation&&!(!this.pdfViewer.annotation||!this.pdfViewer.annotation.measureAnnotationModule)},s.prototype.isStampAnnotationModule=function(){return!!this.pdfViewer.annotation&&!(!this.pdfViewer.annotation||!this.pdfViewer.annotation.stampAnnotationModule)},s.prototype.isInkAnnotationModule=function(){return!!this.pdfViewer.annotation&&!(!this.pdfViewer.annotation||!this.pdfViewer.annotation.inkAnnotationModule)},s.prototype.isCommentAnnotationModule=function(){return!!this.pdfViewer.annotation&&!(!this.pdfViewer.annotation||!this.pdfViewer.annotation.stickyNotesAnnotationModule)},s.prototype.isShapeBasedAnnotationsEnabled=function(){return!!(this.isShapeAnnotationModule()||this.isCalibrateAnnotationModule()||this.isStampAnnotationModule()||this.isCommentAnnotationModule()||this.isFormDesignerModule())},s.prototype.getMousePosition=function(e){var t,i,n;if(-1!==e.type.indexOf("touch")){if(t=e,this.pdfViewer.annotation){var o=this.getElement("_pageDiv_"+this.pdfViewer.annotation.getEventPageNumber(e));if(o){var s=o.getBoundingClientRect();i=t.changedTouches[0].clientX-s.left,n=t.changedTouches[0].clientY-s.top}}}else if(e.target.classList.contains("e-pv-hyperlink"))i=e.offsetX+e.target.offsetLeft,n=e.offsetY+e.target.offsetTop;else if(e.target.classList.contains("e-pv-text")&&e.target.parentElement){a=e.target.parentElement.getBoundingClientRect();i=e.clientX-a.left,n=e.clientY-a.top}else if(e.target&&e.path&&e.target.parentElement&&e.target.parentElement.classList.contains("foreign-object")){a=e.path[4].getBoundingClientRect();i=e.clientX-a.left,n=e.clientY-a.top}else if(e.target&&e.path&&e.target.parentElement&&e.target.parentElement.parentElement.classList.contains("foreign-object")){var a=e.path[4].getBoundingClientRect();i=e.clientX-a.left,n=e.clientY-a.top}else i=e.offsetX,n=e.offsetY;return{x:i,y:n}},s.prototype.getMouseEventArgs=function(e,t,i,n){t.position=e;var o;n?o=W(i,this,this.pdfViewer):"Drag"===this.action||"ConnectorSourceEnd"===this.action||"SegmentEnd"===this.action||"OrthoThumb"===this.action||"BezierSourceThumb"===this.action||"BezierTargetThumb"===this.action||"ConnectorTargetEnd"===this.action||-1!==this.action.indexOf("Rotate")||-1!==this.action.indexOf("Resize")?(o=this.pdfViewer.selectedItems,"Drag"===this.action&&o&&this.pdfViewer.selectedItems.annotations.length>0?o=W(i,this,this.pdfViewer):"Drag"===this.action&&o&&this.pdfViewer.selectedItems.formFields.length>0&&(o=W(i,this,this.pdfViewer))):o=W(i,this,this.pdfViewer);var s;return o&&(s=o.wrapper),n?(t.target=o,t.targetWrapper=s):(t.source=o,t.sourceWrapper=s),t.actualObject=this.eventArgs.actualObject,t},s.prototype.findToolToActivate=function(e,t){t={x:t.x/this.getZoomFactor(),y:t.y/this.getZoomFactor()};var n=this.pdfViewer.selectedItems.wrapper;if(e=e,n&&e){var o=n.bounds,s=new i.Rect(o.x,o.y,o.width,o.height);if("Line"===e.shapeAnnotationType||"LineWidthArrowHead"===e.shapeAnnotationType||"Distance"===e.shapeAnnotationType||"Polygon"===e.shapeAnnotationType){var a=this.pdfViewer.selectedItems.annotations[0];if(a)for(d=0;d<a.vertexPoints.length;d++)if(i.contains(t,a.vertexPoints[d],10)&&0!==a.leaderHeight)return"ConnectorSegmentPoint_"+d}if("Distance"===e.shapeAnnotationType){var r=0,l=void 0;if(e&&e.wrapper)for(var d=0;d<e.wrapper.children.length;d++){var u=i.Point.findAngle(e.sourcePoint,e.targetPoint);if(e.wrapper.children[d].id.indexOf("leader")>-1){var M=e.wrapper.children[0].bounds.center;0===r?(l={x:e.sourcePoint.x,y:e.sourcePoint.y-e.leaderHeight},M=e.sourcePoint):(l={x:e.targetPoint.x,y:e.targetPoint.y-e.leaderHeight},M=e.targetPoint);var p=i.identityMatrix();i.rotateMatrix(p,u,M.x,M.y);var h=i.transformPointByMatrix(p,{x:l.x,y:l.y});if(i.contains(t,h,10))return"Leader"+r;r++}}}var L=10/this.getZoomFactor(),w=i.identityMatrix();i.rotateMatrix(w,e.rotateAngle+n.parentTransform,n.offsetX,n.offsetY);var c=n.offsetX-n.pivot.x*n.actualSize.width,C=n.offsetY-n.pivot.y*n.actualSize.height,g={x:c+(.5===n.pivot.x?2*n.pivot.x:n.pivot.x)*n.actualSize.width/2,y:C-30/this.getZoomFactor()};if(g=i.transformPointByMatrix(w,g),"Stamp"===e.shapeAnnotationType&&i.contains(t,g,L))return"Rotate";if((s=this.inflate(L,s)).containsPoint(t,0)){var m=this.checkResizeHandles(this.pdfViewer,n,t,w,c,C);if(m)return m}return this.pdfViewer.selectedItems.annotations.indexOf(e)>-1?"Drag":this.pdfViewer.selectedItems.formFields.indexOf(e)>-1&&this.pdfViewer.designerMode?"Drag":"Select"}return this.pdfViewer.tool||"Select"},s.prototype.inflate=function(e,t){return t.x-=e,t.y-=e,t.width+=2*e,t.height+=2*e,t},s.prototype.checkResizeHandles=function(e,t,i,n,o,s){var a;return a||(a=this.checkForResizeHandles(e,t,i,n,o,s)),a||null},s.prototype.checkForResizeHandles=function(e,t,n,o,s,a){e.selectedItems;var r=!1,l=!1,d=!1,u=!1,M=this.pdfViewer.annotationSelectorSettings.resizerLocation;if((M<1||M>3)&&(M=3),!this.pdfViewer.selectedItems.annotations[0]||"Stamp"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"FreeText"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Image"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"HandWrittenSignature"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"SignatureText"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"SignatureImage"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||(r=!0),this.pdfViewer.selectedItems.annotations[0]&&"StickyNotes"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(l=!0),this.pdfViewer.selectedItems.annotations[0]&&"Ink"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(u=!0),!this.pdfViewer.selectedItems.annotations[0]||"Ellipse"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Radius"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Rectangle"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||(d=!0),!l){if(u||r||this.pdfViewer.selectedItems.annotations[0]&&("HandWrittenSignature"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"SignatureText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"SignatureImage"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType)||t.actualSize.width>=40&&t.actualSize.height>=40&&d&&(1===M||3===M)){if(i.contains(n,i.transformPointByMatrix(o,{x:s+t.actualSize.width,y:a+t.actualSize.height}),10))return"ResizeSouthEast";if(i.contains(n,i.transformPointByMatrix(o,{x:s,y:a+t.actualSize.height}),10))return"ResizeSouthWest";if(i.contains(n,i.transformPointByMatrix(o,{x:s+t.actualSize.width,y:a}),10))return"ResizeNorthEast";if(i.contains(n,i.transformPointByMatrix(o,{x:s,y:a}),10))return"ResizeNorthWest"}if(u||!d||d&&(2===M||3===M||!(t.actualSize.width>=40&&t.actualSize.height>=40)&&1===M)){if(i.contains(n,i.transformPointByMatrix(o,{x:s+t.actualSize.width,y:a+t.actualSize.height/2}),10)&&!r)return"ResizeEast";if(i.contains(n,i.transformPointByMatrix(o,{x:s,y:a+t.actualSize.height/2}),10)&&!r)return"ResizeWest";if(i.contains(n,i.transformPointByMatrix(o,{x:s+t.actualSize.width/2,y:a+t.actualSize.height}),10)&&!r)return"ResizeSouth";if(i.contains(n,i.transformPointByMatrix(o,{x:s+t.actualSize.width/2,y:a}),10)&&!r)return"ResizeNorth"}}return null},s.prototype.checkSignatureFormField=function(e){var t=!1,i=this.pdfViewer.nameTable[e];return i&&("SignatureField"!==i.formFieldAnnotationType&&"InitialField"!==i.formFieldAnnotationType||(t=!0)),t},s.prototype.diagramMouseMove=function(e){this.currentPosition=this.getMousePosition(e),this.pdfViewer.firePageMouseover(this.currentPosition.x,this.currentPosition.y),this.pdfViewer.annotation?this.activeElements.activePageID=this.pdfViewer.annotation.getEventPageNumber(e):this.pdfViewer.formDesignerModule&&(this.activeElements.activePageID=this.pdfViewer.formDesignerModule.getEventPageNumber(e));var n=W(e,this,this.pdfViewer);(this.tool instanceof ut||this.tool instanceof pt)&&(n=this.pdfViewer.drawingObject);var o,s=this.pdfViewer.selectedItems.annotations.length>0&&this.checkSignatureFormField(this.pdfViewer.selectedItems.annotations[0].id.split("_")[0]);if(!1===i.Point.equals(this.currentPosition,this.prevPosition)||this.inAction){if(!1===this.isMouseDown){this.eventArgs={};n&&(this.tool=this.getTool(this.action),n.wrapper&&n.wrapper.children[0]&&(o=n));a=e.target;this.action=this.findToolToActivate(n,this.currentPosition),n&&n.annotationSettings&&n.annotationSettings.isLock&&("Select"===this.action&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Select",n)?this.action=this.action:this.action=""),"Drag"===this.action&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Move",n)?this.action=this.action:this.action="Select"),("ResizeSouthEast"===this.action||"ResizeNorthEast"===this.action||"ResizeNorthWest"===this.action||"ResizeSouthWest"===this.action||"ResizeNorth"===this.action||"ResizeWest"===this.action||"ResizeEast"===this.action||"ResizeSouth"===this.action||this.action.includes("ConnectorSegmentPoint")||this.action.includes("Leader"))&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Resize",n)?this.action=this.action:this.action="Select")),this.pdfViewer.designerMode||(t.isNullOrUndefined(o)||t.isNullOrUndefined(o.formFieldAnnotationType))&&!s||("ResizeSouthEast"===this.action||"ResizeNorthEast"===this.action||"ResizeNorthWest"===this.action||"ResizeSouthWest"===this.action||"ResizeNorth"===this.action||"Drag"===this.action||"ResizeWest"===this.action||"ResizeEast"===this.action||"ResizeSouth"===this.action||this.action.includes("ConnectorSegmentPoint")||this.action.includes("Leader"))&&(this.action=""),this.tool=this.getTool(this.action),this.setCursor(a,e)}else{if(this.pdfViewer.designerMode||(t.isNullOrUndefined(o)||t.isNullOrUndefined(o.formFieldAnnotationType))&&!s||("ResizeSouthEast"===this.action||"ResizeNorthEast"===this.action||"ResizeNorthWest"===this.action||"ResizeSouthWest"===this.action||"ResizeNorth"===this.action||"Drag"===this.action||"ResizeWest"===this.action||"ResizeEast"===this.action||"ResizeSouth"===this.action||this.action.includes("ConnectorSegmentPoint")||this.action.includes("Leader"))&&(this.action="",this.tool=null),this.eventArgs&&this.eventArgs.source){var a=e.target;this.updateDefaultCursor(this.eventArgs.source,a,e)}else this.setCursor(e.target,e);if(this.diagramMouseActionHelper(e),this.tool){var r=n;r&&"FreeText"===r.shapeAnnotationType&&this.pdfViewer.freeTextSettings.allowEditTextOnly&&((a=event.target).style.cursor="default",this.tool=null),null!=this.tool&&this.tool.mouseMove(this.eventArgs)}}if(this.pdfViewer.drawingObject&&this.pdfViewer.drawingObject.formFieldAnnotationType&&"Drag"!==this.action&&!(this.tool instanceof dt)&&(this.tool=this.getTool(this.action),this.tool instanceof ut)){var l=this.pdfViewer.drawingObject,d=this.pdfViewer.formDesignerModule.updateFormFieldInitialSize(l,l.formFieldAnnotationType),u=this.pageContainer.firstElementChild.clientWidth-d.width,M=this.pageContainer.firstElementChild.clientHeight-d.height;if(this.pdfViewer.formDesignerModule&&l.formFieldAnnotationType&&this.currentPosition.x<u&&this.currentPosition.y<M)if(p=document.getElementById("FormField_helper_html_element")){if(p){this.getZoomFactor();h=this.getMousePosition(event);"Checkbox"===l.formFieldAnnotationType?p.firstElementChild.firstElementChild.lastElementChild.style.visibility="visible":"SignatureField"===l.formFieldAnnotationType||"InitialField"===l.formFieldAnnotationType?(p.firstElementChild.firstElementChild.style.visibility="visible",p.firstElementChild.lastElementChild.style.visibility="visible"):p.firstElementChild.firstElementChild.style.visibility="visible",p.setAttribute("style","height:"+d.height+"px; width:"+d.width+"px;left:"+h.x+"px; top:"+h.y+"px;position:absolute;opacity: 0.5;")}}else this.pdfViewer.formDesignerModule.drawHelper(l.formFieldAnnotationType,l,e);else if(this.currentPosition.x>u||this.currentPosition.y>M){var p=document.getElementById("FormField_helper_html_element");if(p){if(p){var h=this.getMousePosition(event);p.setAttribute("style","height:"+d.height+"px; width:"+d.width+"px;left:"+h.x+"px; top:"+h.y+"px;position:absolute;opacity: 0.5;"),"Checkbox"===l.formFieldAnnotationType?p.firstElementChild.firstElementChild.lastElementChild.style.visibility="hidden":"SignatureField"===l.formFieldAnnotationType||"InitialField"===l.formFieldAnnotationType?(p.firstElementChild.firstElementChild.style.visibility="hidden",p.firstElementChild.lastElementChild.style.visibility="hidden"):p.firstElementChild.firstElementChild.style.visibility="hidden"}}else this.pdfViewer.formDesignerModule.drawHelper(l.formFieldAnnotationType,l,e)}}this.prevPosition=this.currentPosition}},s.prototype.updateDefaultCursor=function(e,t,i){e&&void 0!==e.pageIndex&&e.pageIndex!==this.activeElements.activePageID&&t?this.isPanMode?t.style.cursor="grab":t.style.cursor="default":this.setCursor(t,i)},s.prototype.diagramMouseLeave=function(e){this.currentPosition=this.getMousePosition(e),this.pdfViewer.annotation&&(this.activeElements.activePageID=this.pdfViewer.annotation.getEventPageNumber(e));var t=W(e,this,this.pdfViewer),n=!1;if(!1===i.Point.equals(this.currentPosition,this.prevPosition)||this.inAction){if(!1===this.isMouseDown||n){this.eventArgs={};t&&(t.wrapper.children[0],n=!1)}else this.diagramMouseActionHelper(e),this.tool&&"Drag"!==this.action&&"Stamp"!==this.pdfViewer.tool&&this.tool.currentElement&&"Stamp"!==this.tool.currentElement.shapeAnnotationType&&(this.tool.mouseLeave(this.eventArgs),this.tool=null,this.pdfViewer.annotation&&this.pdfViewer.annotationModule.renderAnnotations(this.previousPage,null,null,null));this.prevPosition=this.currentPosition}},s.prototype.diagramMouseActionHelper=function(e){this.eventArgs.position=this.currentPosition,"Drag"===this.action&&this.eventArgs.source instanceof Ke&&this.getMouseEventArgs(this.currentPosition,this.eventArgs,e),this.getMouseEventArgs(this.currentPosition,this.eventArgs,e,this.eventArgs.source),this.inAction=!0,this.initialEventArgs=null},s.prototype.setCursor=function(e,i){var n,o=this.pdfViewer.annotationModule?this.pdfViewer.annotationModule.freeTextAnnotationModule:null;if(this.tool instanceof dt)"ResizeNorthWest"===this.tool.corner?(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"nw-resize":n):"ResizeNorthEast"===this.tool.corner?(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"ne-resize":n):"ResizeSouthWest"===this.tool.corner?(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"sw-resize":n):"ResizeSouthEast"===this.tool.corner?(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"se-resize":n):"ResizeNorth"===this.tool.corner?(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"n-resize":n):"ResizeWest"===this.tool.corner?(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"w-resize":n):"ResizeEast"===this.tool.corner?(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"e-resize":n):"ResizeSouth"===this.tool.corner&&(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"s-resize":n);else if(this.isCommentIconAdded&&this.isAddComment)e.style.cursor="crosshair";else if(this.pdfViewer.enableHandwrittenSignature&&this.isNewSignatureAdded&&this.tool instanceof at)e.style.cursor="crosshair";else if(this.tool instanceof st)e.style.cursor="move";else if(this.tool instanceof ut||this.tool instanceof pt||this.tool instanceof Mt||o&&o.isNewAddedAnnot||this.tool instanceof rt)e.style.cursor="crosshair";else if(this.tool instanceof lt)this.tool.endPoint&&this.tool.endPoint.indexOf("Leader0")?(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"nw-resize":n):this.tool.endPoint&&this.tool.endPoint.indexOf("Leader1")?(n=this.setResizerCursorType(),e.style.cursor=t.isNullOrUndefined(n)?"ne-resize":n):this.tool.endPoint&&this.tool.endPoint.indexOf("ConnectorSegmentPoint")&&(e.style.cursor="sw-resize");else if(e.classList.contains("e-pv-text"))e.style.cursor="text";else if(e.classList.contains("e-pv-hyperlink"))e.style.cursor="pointer";else if(this.isPanMode){if(this.isViewerMouseDown&&"mousemove"===i.type)e.style.cursor="grabbing";else if((u=W(i,this,this.pdfViewer))&&"mousemove"===i.type){e.style.cursor="pointer";var s=u,a=this.getMousePosition(i),r={left:(p=this.relativePosition(i)).x,top:p.y},l={left:a.x,top:a.y},d={opacity:s.opacity,fillColor:s.fillColor,strokeColor:s.strokeColor,thicknes:s.thickness,author:s.author,subject:s.subject,modifiedDate:s.modifiedDate};if(this.isMousedOver=!0,s.formFieldAnnotationType){this.isFormFieldMousedOver=!0;h={value:s.value,fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,color:s.color,backgroundColor:s.backgroundColor,borderColor:s.borderColor,thickness:s.thickness,alignment:s.alignment,isReadonly:s.isReadonly,visibility:s.visibility,maxLength:s.maxLength,isRequired:s.isRequired,isPrint:s.isPrint,rotation:s.rotateAngle,tooltip:s.tooltip,options:s.options,isChecked:s.isChecked,isSelected:s.isSelected};this.pdfViewer.fireFormFieldMouseoverEvent("formFieldMouseover",h,s.pageIndex,p.x,p.y,a.x,a.y)}else this.pdfViewer.fireAnnotationMouseover(s.annotName,s.pageIndex,s.shapeAnnotationType,s.bounds,d,l,r)}else if(e.style.cursor="grab",this.isMousedOver){L=void 0;L=this.pdfViewer.formDesignerModule?this.pdfViewer.formDesignerModule.getEventPageNumber(i):this.pdfViewer.annotation.getEventPageNumber(i),this.isFormFieldMousedOver?this.pdfViewer.fireFormFieldMouseLeaveEvent("formFieldMouseLeave",null,L):this.pdfViewer.fireAnnotationMouseLeave(L),this.isMousedOver=!1,this.isFormFieldMousedOver=!1}}else{var u=W(i,this,this.pdfViewer);if(u&&0===this.pdfViewer.selectedItems.annotations.length&&"mousemove"===i.type){var s=u,M=this.pdfViewer.nameTable[s.id];"HandWrittenSignature"!==M.shapeAnnotationType&&"Ink"!==M.shapeAnnotationType&&M.annotationSettings&&void 0!==M.annotationSettings.isLock&&(M.annotationSettings.isLock=JSON.parse(M.annotationSettings.isLock)),M.annotationSettings&&M.annotationSettings.isLock?e.style.cursor="default":e.style.cursor="pointer";var a=this.getMousePosition(i),p=this.relativePosition(i),r={left:p.x,top:p.y},l={left:a.x,top:a.y},d={opacity:s.opacity,fillColor:s.fillColor,strokeColor:s.strokeColor,thicknes:s.thickness,author:s.author,subject:s.subject,modifiedDate:s.modifiedDate};if(this.isMousedOver=!0,s.formFieldAnnotationType){this.isFormFieldMousedOver=!0;var h={value:s.value,fontFamily:s.fontFamily,fontSize:s.fontSize,fontStyle:s.fontStyle,color:s.color,backgroundColor:s.backgroundColor,borderColor:s.borderColor,thickness:s.thickness,alignment:s.alignment,isReadonly:s.isReadonly,visibility:s.visibility,maxLength:s.maxLength,isRequired:s.isRequired,isPrint:s.isPrint,rotation:s.rotateAngle,tooltip:s.tooltip,options:s.options,isChecked:s.isChecked,isSelected:s.isSelected};this.pdfViewer.fireFormFieldMouseoverEvent("formFieldMouseover",h,s.pageIndex,p.x,p.y,a.x,a.y)}else this.pdfViewer.fireAnnotationMouseover(s.annotName,s.pageIndex,s.shapeAnnotationType,s.bounds,d,l,r)}else{if(this.isMousedOver){var L=void 0;L=this.pdfViewer.formDesignerModule?this.pdfViewer.formDesignerModule.getEventPageNumber(i):this.pdfViewer.annotation.getEventPageNumber(i),this.isFormFieldMousedOver?this.pdfViewer.fireFormFieldMouseLeaveEvent("formFieldMouseLeave",null,L):this.pdfViewer.fireAnnotationMouseLeave(L),this.isMousedOver=!1,this.isFormFieldMousedOver=!1,e.style.cursor="default"}u&&1===this.pdfViewer.selectedItems.annotations.length&&"mousemove"===i.type?e.style.cursor="pointer":e.style.cursor="default"}}},s.prototype.setResizerCursorType=function(){var e;return this.pdfViewer.selectedItems.annotations[0]&&t.isNullOrUndefined(this.pdfViewer.selectedItems.annotations[0].annotationSelectorSettings.resizerCursorType)?"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?e=t.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings)?null:this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerCursorType:"Stamp"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?e=t.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings)?null:this.pdfViewer.stampSettings.annotationSelectorSettings.resizerCursorType:"HandWrittenSignature"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"SignatureText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"SignatureImage"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?e=t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings)?null:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerCursorType:"Ink"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?e=t.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings)?null:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerCursorType:this.pdfViewer.selectedItems.annotations[0].measureType?this.pdfViewer.selectedItems.annotations[0].measureType&&("Distance calculation"===this.pdfViewer.selectedItems.annotations[0].subject?e=t.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings)?null:this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerCursorType:"Perimeter calculation"===this.pdfViewer.selectedItems.annotations[0].subject?e=t.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings)?null:this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerCursorType:"Area calculation"===this.pdfViewer.selectedItems.annotations[0].subject?e=t.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings)?null:this.pdfViewer.areaSettings.annotationSelectorSettings.resizerCursorType:"Radius calculation"===this.pdfViewer.selectedItems.annotations[0].subject?e=t.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings)?null:this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerCursorType:"Volume calculation"===this.pdfViewer.selectedItems.annotations[0].subject&&(e=t.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings)?null:this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerCursorType)):"Line"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?e=t.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings)?null:this.pdfViewer.lineSettings.annotationSelectorSettings.resizerCursorType:"LineWidthArrowHead"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?e=t.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings)?null:this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerCursorType:"Rectangle"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?e=t.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings)?null:this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerCursorType:"Ellipse"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?e=t.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings)?null:this.pdfViewer.circleSettings.annotationSelectorSettings.resizerCursorType:"Polygon"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(e=t.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings)?null:this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerCursorType):this.pdfViewer.selectedItems.annotations[0]&&(e=this.pdfViewer.selectedItems.annotations[0].annotationSelectorSettings.resizerCursorType),e||(e=this.pdfViewer.annotationSelectorSettings.resizerCursorType),e},s.prototype.getTool=function(e){switch(e){case"Select":return new ot(this.pdfViewer,this);case"Drag":return new st(this.pdfViewer,this);case"ResizeSouthEast":case"ResizeSouthWest":case"ResizeNorthEast":case"ResizeNorthWest":case"ResizeSouth":case"ResizeNorth":case"ResizeWest":case"ResizeEast":return new dt(this.pdfViewer,this,e);case"ConnectorSourceEnd":case"ConnectorTargetEnd":case"Leader":case"ConnectorSegmentPoint":return new lt(this.pdfViewer,this,e);case"DrawTool":return new ut(this.pdfViewer,this,this.pdfViewer.drawingObject);case"Polygon":return new Mt(this.pdfViewer,this,"Polygon");case"Distance":return new pt(this.pdfViewer,this,"Leader1",void 0);case"Line":return new pt(this.pdfViewer,this,"ConnectorSegmentPoint_1",this.pdfViewer.drawingObject);case"Perimeter":return new Mt(this.pdfViewer,this,"Perimeter");case"Rotate":return new ht(this.pdfViewer,this);case"Stamp":return new at(this.pdfViewer,this);case"Ink":return new rt(this.pdfViewer,this,this.pdfViewer.drawingObject)}return e.indexOf("ConnectorSegmentPoint")>-1||e.indexOf("Leader")>-1?new lt(this.pdfViewer,this,e):null},s.prototype.diagramMouseUp=function(e){if(this.tool){if(!this.inAction&&3!==e.which&&"Drag"===this.action){this.action="Select";n=W(e,this,this.pdfViewer)}if(this.tool instanceof Mt||this.tool instanceof pt||this.tool instanceof ut||(this.inAction=!1,this.isMouseDown=!1),this.currentPosition=this.getMousePosition(e),this.tool){this.eventArgs.position=this.currentPosition,this.getMouseEventArgs(this.currentPosition,this.eventArgs,e,this.eventArgs.source);this.isMetaKey(e);var i={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey};this.eventArgs.info=i,this.eventArgs.clickCount=e.detail,this.tool.mouseUp(this.eventArgs),this.isAnnotationMouseDown=!1,this.isFormFieldMouseDown=!1,this.isAddComment=!1,(this.tool instanceof ut||this.tool instanceof pt||this.tool instanceof Mt)&&!this.tool.dragging&&(this.inAction=!1,this.isMouseDown=!1);var n=W(e,this,this.pdfViewer);this.isShapeAnnotationModule()&&this.isCalibrateAnnotationModule()&&this.pdfViewer.annotation.onShapesMouseup(n,e),this.isAnnotationDrawn=!1}}var o=e.target;e.cancelable&&this.skipPreventDefault(o)&&(!t.Browser.isDevice||this.pdfViewer.enableDesktopMode)&&e.preventDefault(),this.eventArgs={}},s.prototype.skipPreventDefault=function(e){var t=!1,i=!1;return this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus&&(i=!0),!e.parentElement||"foreign-object"===e.parentElement.className||e.classList.contains("e-pv-radio-btn")||e.classList.contains("e-pv-radiobtn-span")||e.classList.contains("e-pv-checkbox-div")||e.classList.contains("e-pdfviewer-formFields")||e.classList.contains("e-pdfviewer-ListBox")||e.classList.contains("e-pdfviewer-signatureformfields")||"free-text-input"===e.className&&"TEXTAREA"===e.tagName||i||"e-pv-hyperlink"===e.className||(t=!0),t},s.prototype.isMetaKey=function(e){return navigator.platform.match("Mac")?e.metaKey:e.ctrlKey},s.prototype.diagramMouseDown=function(e){var n;n=e.touches,this.isMouseDown=!0,this.isAnnotationAdded=!1,this.currentPosition=this.prevPosition=this.getMousePosition(e),this.eventArgs={};var o=!1;"Stamp"===this.pdfViewer.tool&&(this.pdfViewer.tool="",o=!0),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.annotation&&(this.activeElements.activePageID=this.pdfViewer.annotation.getEventPageNumber(e));var s=W(e,this,this.pdfViewer);if(t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&s&&e.preventDefault(),this.pdfViewer.annotation&&this.pdfViewer.enableStampAnnotations){var a=this.pdfViewer.annotationModule.stampAnnotationModule;if(a&&a.isNewStampAnnot){var r=s;if(!r&&this.pdfViewer.selectedItems.annotations[0]&&(r=this.pdfViewer.selectedItems.annotations[0]),r){if(this.isViewerMouseDown=!1,r.opacity=this.pdfViewer.stampSettings.opacity,this.isNewStamp=!0,this.pdfViewer.nodePropertyChange(r,{opacity:this.pdfViewer.stampSettings.opacity}),this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!1,"Image"===r.shapeAnnotationType&&!this.isAlreadyAdded){this.stampAdded=!0;var l=r.id;a.currentStampAnnotation&&a.currentStampAnnotation.signatureName&&(l=a.currentStampAnnotation.signatureName);for(var d=!1,u=0;u<this.customStampCollection.length;u++)if(this.customStampCollection[u].customStampName===l){d=!0;break}d&&(l=r.id),this.customStampCollection.push({customStampName:l,customStampImageSource:r.data})}this.pdfViewer.customStampSettings.enableCustomStamp&&this.pdfViewer.customStampSettings.isAddToMenu&&(this.stampAdded=!0),this.isAlreadyAdded=!1,a.updateDeleteItems(r.pageIndex,r,r.opacity),a.resetAnnotation(),a.isNewStampAnnot=!1}}}if(this.isNewSignatureAdded){this.signatureCount++,this.currentSignatureAnnot=null;var M=s;if(t.isNullOrUndefined(M)&&this.pdfViewer.selectedItems.annotations[0]&&(M=this.pdfViewer.selectedItems.annotations[0]),M){this.signatureAdded=!0,this.signatureModule.storeSignatureData(M.pageIndex,M);var p={left:M.bounds.x,top:M.bounds.y,width:M.bounds.width,height:M.bounds.height};this.pdfViewer.fireSignatureAdd(M.pageIndex,M.signatureName,M.shapeAnnotationType,p,M.opacity,M.strokeColor,M.thickness,this.signatureModule.saveImageString)}this.isNewSignatureAdded=!1}if(this.pdfViewer.annotationModule){var h=this.pdfViewer.annotationModule.freeTextAnnotationModule,L=s;if(!0===h.isNewFreeTextAnnot&&(!L||"FreeText"!==L.shapeAnnotationType)){var w=void 0;if(e.target&&(e.target.id.indexOf("_text")>-1||e.target.id.indexOf("_annotationCanvas")>-1||e.target.classList.contains("e-pv-hyperlink"))&&this.pdfViewer.annotation){var c=this.pdfViewer.annotation.getEventPageNumber(e),C=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+c);if(C){var g=C.getBoundingClientRect(),m=g.x?g.x:g.left,f=g.y?g.y:g.top;w=new i.Rect(m+10,f+10,g.width-10,g.height-10)}}if(n&&(this.mouseX=n[0].clientX,this.mouseY=n[0].clientY),w&&w.containsPoint({x:this.mouseX,y:this.mouseY})&&h.isNewAddedAnnot){c=this.pdfViewer.annotation.getEventPageNumber(e);if(h.addInuptElemet(this.currentPosition,null,c),this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule){var y=this.pdfViewer.toolbar.annotationToolbarModule;t.isBlazor()||y.primaryToolbar.deSelectItem(y.freeTextEditItem)}e.preventDefault(),h.isNewAddedAnnot=!1}}}if(s&&s.wrapper.children[0],(!this.tool||this.tool&&!this.tool.drawingObject)&&(o?(this.action="Select",this.tool=this.getTool(this.action)):(this.action=this.findToolToActivate(s,this.currentPosition),s&&s.annotationSettings&&s.annotationSettings.isLock&&("Select"===this.action&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Select",s)?this.action=this.action:this.action=""),"Drag"===this.action&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Move",s)?this.action=this.action:this.action="Select"),("ResizeSouthEast"===this.action||"ResizeNorthEast"===this.action||"ResizeNorthWest"===this.action||"ResizeSouthWest"===this.action||"ResizeSouth"===this.action||"ResizeNorth"===this.action||"ResizeWest"===this.action||"ResizeEast"===this.action||this.action.includes("ConnectorSegmentPoint")||this.action.includes("Leader"))&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Resize",s)?this.action=this.action:this.action="Select")),this.tool=this.getTool(this.action),this.tool||(this.action=this.pdfViewer.tool||"Select",this.tool=this.getTool(this.action)))),this.getMouseEventArgs(this.currentPosition,this.eventArgs,e),this.eventArgs.position=this.currentPosition,this.tool&&(this.isAnnotationMouseDown=!1,this.isFormFieldMouseDown=!1,this.isAnnotationMouseMove=!1,this.isFormFieldMouseMove=!1,this.tool.mouseDown(this.eventArgs),this.isAnnotationDrawn=!0,this.signatureAdded=!0),this.pdfViewer.annotation&&this.pdfViewer.annotation.onAnnotationMouseDown(),this.pdfViewer.selectedItems&&1===this.pdfViewer.selectedItems.formFields.length&&(t.isNullOrUndefined(this.pdfViewer.toolbar)||t.isNullOrUndefined(this.pdfViewer.toolbar.formDesignerToolbarModule)||this.pdfViewer.toolbar.formDesignerToolbarModule.showHideDeleteIcon(!0)),this.eventArgs&&this.eventArgs.source&&this.eventArgs.source.formFieldAnnotationType&&!this.pdfViewer.designerMode){var j=this.eventArgs.source;if(!(this.pdfViewer.nameTable[j.id.split("_")[0]+"_content"]?this.pdfViewer.nameTable[j.id.split("_")[0]+"_content"].value:null)){var S={id:j.id,fontFamily:j.fontFamily,fontSize:j.fontSize,fontStyle:j.fontStyle,color:j.color,value:j.value,type:this.eventArgs.source.formFieldAnnotationType,backgroundColor:j.backgroundColor,alignment:j.alignment};this.pdfViewer.fireFormFieldClickEvent("formFieldClicked",S)}}this.initialEventArgs={source:this.eventArgs.source,sourceWrapper:this.eventArgs.sourceWrapper},this.initialEventArgs.position=this.currentPosition,this.initialEventArgs.info=this.eventArgs.info},s.prototype.exportAnnotationsAsObject=function(){var t=this;if(this.pdfViewer.annotationModule&&this.updateExportItem())return new Promise(function(i,n){t.createRequestForExportAnnotations(!0,e.AnnotationDataFormat.Json).then(function(e){i(e)})})},s.prototype.exportFormFieldsAsObject=function(){var e=this;if(this.pdfViewer.formFieldsModule)return new Promise(function(t,i){e.createRequestForExportFormfields(!0).then(function(e){t(e)})})},s.prototype.importAnnotations=function(e,t,i){this.pdfViewer.annotationModule&&this.createRequestForImportAnnotations(e,t,i)},s.prototype.exportAnnotations=function(e){this.pdfViewer.annotationModule&&this.updateExportItem()&&this.createRequestForExportAnnotations(!1,e)},s.prototype.createRequestForExportAnnotations=function(e,i,n){var o=this,s=this,a=new Promise(function(a,r){var l;"Json"===i?(l={hashId:s.hashId,action:"ExportAnnotations",pdfAnnotation:s.createAnnotationJsonData(),elementId:s.pdfViewer.element.id,annotationDataFormat:i},s.pdfViewer.fireExportStart(l.pdfAnnotation)):(l=o.constructJsonDownload(),s.pdfViewer.fireExportStart(l),l.annotationDataFormat=i,l.action="ExportAnnotations"),s.jsonDocumentId&&(l.document=s.jsonDocumentId);var d=s.pdfViewer.serviceUrl+"/"+s.pdfViewer.serverActionSettings.exportAnnotations;s.exportAnnotationRequestHandler=new ti(o.pdfViewer),s.exportAnnotationRequestHandler.url=d,s.exportAnnotationRequestHandler.mode=!0,s.exportAnnotationRequestHandler.responseType="text",s.exportAnnotationRequestHandler.send(l),s.exportAnnotationRequestHandler.onSuccess=function(o){var r=o.data;if(r){if("object"==typeof r&&(r=JSON.parse(r)),r)if(s.pdfViewer.fireAjaxRequestSuccess(s.pdfViewer.serverActionSettings.exportAnnotations,r),e)if(r.split("base64,")[1]){var d=atob(r.split(",")[1]),u=void 0;u="Json"===l.annotationDataFormat?JSON.parse(d):d,null!==s.pdfViewer.exportAnnotationFileName?s.pdfViewer.fireExportSuccess(u,s.pdfViewer.exportAnnotationFileName):s.pdfViewer.fireExportSuccess(u,s.pdfViewer.fileName),s.updateDocumentAnnotationCollections(),a(n?r:d)}else s.pdfViewer.fireExportFailed(l.pdfAnnotation,s.pdfViewer.localeObj.getConstant("Export Failed"));else if("Json"===i)if(r.split("base64,")[1]){M=s.createBlobUrl(r.split("base64,")[1],"application/json");t.Browser.isIE||"edge"===t.Browser.info.name?null!==s.pdfViewer.exportAnnotationFileName?window.navigator.msSaveOrOpenBlob(M,s.pdfViewer.exportAnnotationFileName.split(".")[0]+".json"):window.navigator.msSaveOrOpenBlob(M,s.pdfViewer.fileName.split(".")[0]+".json"):s.downloadExportAnnotationJson(M),s.updateDocumentAnnotationCollections()}else s.openImportExportNotificationPopup(s.pdfViewer.localeObj.getConstant("Export Failed")),s.pdfViewer.fireExportFailed(l.pdfAnnotation,s.pdfViewer.localeObj.getConstant("Export Failed"));else if(r.split("base64,")[1]){var M=s.createBlobUrl(r.split("base64,")[1],"application/vnd.adobe.xfdf");t.Browser.isIE||"edge"===t.Browser.info.name?window.navigator.msSaveOrOpenBlob(M,s.pdfViewer.fileName.split(".")[0]+".xfdf"):s.downloadExportedXFdfAnnotation(M)}else s.openImportExportNotificationPopup(s.pdfViewer.localeObj.getConstant("Export Failed")),s.pdfViewer.fireExportFailed(l,s.pdfViewer.localeObj.getConstant("Export Failed"));if("string"!=typeof r)try{"string"==typeof r&&(s.onControlError(500,r,s.pdfViewer.serverActionSettings.exportAnnotations),r=null)}catch(e){s.pdfViewer.fireExportFailed(l.pdfAnnotation,s.pdfViewer.localeObj.getConstant("Export Failed")),s.onControlError(500,r,s.pdfViewer.serverActionSettings.exportAnnotations),r=null}}else{var p=void 0;p=null!==s.pdfViewer.exportAnnotationFileName?s.pdfViewer.exportAnnotationFileName:s.pdfViewer.fileName,s.pdfViewer.fireExportSuccess("Exported data saved in server side successfully",p)}},s.exportAnnotationRequestHandler.onFailure=function(e){s.pdfViewer.fireExportFailed(l.pdfAnnotation,e.statusText)},s.exportAnnotationRequestHandler.onError=function(e){s.pdfViewer.fireExportFailed(l.pdfAnnotation,e.statusText)}});return!e||a},s.prototype.createRequestForImportAnnotations=function(e,t,i){var n,o=this;if("object"==typeof e)o.reRenderAnnotations(e.pdfAnnotation),o.isImportedAnnotation=!0,o.pdfViewer.isDocumentEdited=!0,this.isAddAnnotation||o.pdfViewer.fireImportSuccess(e.pdfAnnotation);else{o.pdfViewer.fireImportStart(e),"Json"===t?n={fileName:e,action:"ImportAnnotations",elementId:o.pdfViewer.element.id}:(i||(e=btoa(e)),n={importedData:e,action:"ImportAnnotations",elementId:o.pdfViewer.element.id,hashId:this.hashId,uniqueId:this.documentId}),o.jsonDocumentId&&(n.document=o.jsonDocumentId);var s=o.pdfViewer.serviceUrl+"/"+o.pdfViewer.serverActionSettings.importAnnotations;o.importAnnotationRequestHandler=new ti(o.pdfViewer),o.importAnnotationRequestHandler.url=s,o.importAnnotationRequestHandler.mode=!0,o.importAnnotationRequestHandler.responseType="text",o.importAnnotationRequestHandler.send(n),o.importAnnotationRequestHandler.onSuccess=function(t){var i=t.data;if(i){if("object"!=typeof i)try{"object"!=typeof(i=JSON.parse(i))&&(o.onControlError(500,i,o.pdfViewer.serverActionSettings.importAnnotations),i=null)}catch(t){o.pdfViewer.fireImportFailed(e,o.pdfViewer.localeObj.getConstant("File not found")),o.openImportExportNotificationPopup(o.pdfViewer.localeObj.getConstant("File not found")),o.onControlError(500,i,o.pdfViewer.serverActionSettings.importAnnotations),i=null}i&&(o.pdfViewer.fireAjaxRequestSuccess(o.pdfViewer.serverActionSettings.importAnnotations,i),i.pdfAnnotation&&(o.reRenderAnnotations(i.pdfAnnotation),o.isImportedAnnotation=!0,o.pdfViewer.isDocumentEdited=!0,o.pdfViewer.fireImportSuccess(i.pdfAnnotation)))}},o.importAnnotationRequestHandler.onFailure=function(t){o.pdfViewer.fireImportFailed(e,t.statusText)},o.importAnnotationRequestHandler.onError=function(t){o.pdfViewer.fireImportFailed(e,t.statusText)}}},s.prototype.openImportExportNotificationPopup=function(e){this.pdfViewer.showNotificationDialog&&this.textLayer.createNotificationPopup(e)},s.prototype.reRenderAnnotations=function(e){if(e){this.isImportAction=!0;var t=void 0;this.isImportedAnnotation?this.importedAnnotation=this.combineImportedData(this.importedAnnotation,e):this.pageCount>0&&(this.importedAnnotation=e),this.isImportedAnnotation||(t=0);for(var i=0;i<this.pageCount;i++)if(e[i]){var n=[],o=window.sessionStorage.getItem(this.documentId+"_annotations_textMarkup"),s=window.sessionStorage.getItem(this.documentId+"_annotations_shape"),a=window.sessionStorage.getItem(this.documentId+"_annotations_shape_measure"),r=window.sessionStorage.getItem(this.documentId+"_annotations_stamp"),l=window.sessionStorage.getItem(this.documentId+"_annotations_sticky"),d=window.sessionStorage.getItem(this.documentId+"_annotations_freetext"),u=window.sessionStorage.getItem(this.documentId+"_annotations_sign"),M=window.sessionStorage.getItem(this.documentId+"_annotations_ink");if(this.isStorageExceed&&(o=this.annotationStorage[this.documentId+"_annotations_textMarkup"],s=this.annotationStorage[this.documentId+"_annotations_shape"],a=this.annotationStorage[this.documentId+"_annotations_shape_measure"],r=this.annotationStorage[this.documentId+"_annotations_stamp"],l=this.annotationStorage[this.documentId+"_annotations_sticky"],d=this.annotationStorage[this.documentId+"_annotations_freetext"],M=this.annotationStorage[this.documentId+"_annotations_ink"]),this.getElement("_annotationCanvas_"+i))if(this.drawPageAnnotations(e[i],i),this.isImportedAnnotation){for(var p=!1,h=0;h<this.annotationPageList.length;h++)this.annotationPageList[h]===i&&(p=!0);p&&(this.annotationPageList[t]=i,t+=1)}else this.annotationPageList[t]=i,t+=1;if(e[i].textMarkupAnnotation&&0!==e[i].textMarkupAnnotation.length){if(o){L=JSON.parse(o);e[i].textMarkupAnnotation=this.checkAnnotationCollections(L,e[i].textMarkupAnnotation,i)}if(e[i].textMarkupAnnotation=this.checkAnnotationCommentsCollections(e[i].textMarkupAnnotation,i),n.textMarkupAnnotation=e[i].textMarkupAnnotation,0!==e[i].textMarkupAnnotation.length){this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderAnnotationComments(e[i].textMarkupAnnotation,i);for(h=0;h<e[i].textMarkupAnnotation.length;h++)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateCollections(this.pdfViewer.annotationModule.textMarkupAnnotationModule.updateTextMarkupAnnotationCollections(e[i].textMarkupAnnotation[h],i))}}if(e[i].shapeAnnotation&&0!==e[i].shapeAnnotation.length){if(s){L=JSON.parse(s);e[i].shapeAnnotation=this.checkAnnotationCollections(L,e[i].shapeAnnotation,i)}if(e[i].shapeAnnotation=this.checkAnnotationCommentsCollections(e[i].shapeAnnotation,i),n.shapeAnnotation=e[i].shapeAnnotation,0!==e[i].shapeAnnotation.length){this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderAnnotationComments(e[i].shapeAnnotation,i);for(h=0;h<e[i].shapeAnnotation.length;h++)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateCollections(this.pdfViewer.annotationModule.shapeAnnotationModule.updateShapeAnnotationCollections(e[i].shapeAnnotation[h],i))}}if(e[i].measureShapeAnnotation&&0!==e[i].measureShapeAnnotation.length){if(a){L=JSON.parse(a);e[i].measureShapeAnnotation=this.checkAnnotationCollections(L,e[i].measureShapeAnnotation,i)}if(e[i].measureShapeAnnotation=this.checkAnnotationCommentsCollections(e[i].measureShapeAnnotation,i),n.measureShapeAnnotation=e[i].measureShapeAnnotation,0!==e[i].measureShapeAnnotation.length){this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderAnnotationComments(e[i].measureShapeAnnotation,i);for(h=0;h<e[i].measureShapeAnnotation.length;h++)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateCollections(this.pdfViewer.annotationModule.measureAnnotationModule.updateMeasureAnnotationCollections(e[i].measureShapeAnnotation[h],i))}}if(e[i].stampAnnotations&&0!==e[i].stampAnnotations.length){if(r){L=JSON.parse(r);e[i].stampAnnotations=this.checkAnnotationCollections(L,e[i].stampAnnotations,i)}if(e[i].stampAnnotations=this.checkAnnotationCommentsCollections(e[i].stampAnnotations,i),n.stampAnnotations=e[i].stampAnnotations,0!==e[i].stampAnnotations.length){this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderAnnotationComments(e[i].stampAnnotations,i);for(h=0;h<e[i].stampAnnotations.length;h++)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateCollections(this.pdfViewer.annotationModule.stampAnnotationModule.updateStampAnnotationCollections(e[i].stampAnnotations[h],i))}}if(e[i].stickyNotesAnnotation&&0!==e[i].stickyNotesAnnotation.length){if(l){L=JSON.parse(l);e[i].stickyNotesAnnotation=this.checkAnnotationCollections(L,e[i].stickyNotesAnnotation,i)}if(e[i].stickyNotesAnnotation=this.checkAnnotationCommentsCollections(e[i].stickyNotesAnnotation,i),n.stickyNotesAnnotation=e[i].stickyNotesAnnotation,0!==e[i].stickyNotesAnnotation.length){this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderAnnotationComments(e[i].stickyNotesAnnotation,i);for(h=0;h<e[i].stickyNotesAnnotation.length;h++)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateCollections(this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateStickyNotesAnnotationCollections(e[i].stickyNotesAnnotation[h],i))}}if(e[i].freeTextAnnotation&&0!==e[i].freeTextAnnotation.length){if(d){L=JSON.parse(d);e[i].freeTextAnnotation=this.checkAnnotationCollections(L,e[i].freeTextAnnotation,i)}if(e[i].freeTextAnnotation=this.checkAnnotationCommentsCollections(e[i].freeTextAnnotation,i),n.freeTextAnnotation=e[i].freeTextAnnotation,0!==e[i].freeTextAnnotation.length){this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderAnnotationComments(e[i].freeTextAnnotation,i);for(h=0;h<e[i].freeTextAnnotation.length;h++)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateCollections(this.pdfViewer.annotationModule.freeTextAnnotationModule.updateFreeTextAnnotationCollections(e[i].freeTextAnnotation[h],i))}}if(e[i].signatureAnnotation&&0!==e[i].signatureAnnotation.length){if(u){L=JSON.parse(u);e[i].signatureAnnotation=this.checkSignatureCollections(L,e[i].signatureAnnotation,i)}if(n.signatureAnnotation=e[i].signatureAnnotation,0!==e[i].signatureAnnotation.length)for(h=0;h<e[i].signatureAnnotation.length;h++)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateCollections(this.signatureModule.updateSignatureCollections(e[i].signatureAnnotation[h],i),!0)}if(e[i].signatureInkAnnotation&&0!==e[i].signatureInkAnnotation.length){if(M){var L=JSON.parse(M);e[i].signatureInkAnnotation=this.checkAnnotationCollections(L,e[i].signatureInkAnnotation,i)}if(e[i].signatureInkAnnotation=this.checkAnnotationCommentsCollections(e[i].signatureInkAnnotation,i),n.signatureInkAnnotation=e[i].signatureInkAnnotation,0!==e[i].signatureInkAnnotation.length){this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderAnnotationComments(e[i].signatureInkAnnotation,i);for(h=0;h<e[i].signatureInkAnnotation.length;h++);}}this.updateImportedAnnotationsInDocumentCollections(n,i)}if(this.pageCount>0&&this.pdfViewer.annotationModule.stickyNotesAnnotationModule&&!this.pdfViewer.annotationModule.stickyNotesAnnotationModule.isAnnotationRendered){var w=this.createAnnotationsCollection();w&&(this.documentAnnotationCollections=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAnnotationsInDocumentCollections(this.importedAnnotation,w))}}},s.prototype.updateImportedAnnotationsInDocumentCollections=function(e,t){if(this.documentAnnotationCollections){var i=this.documentAnnotationCollections[t];if(i){if(e.textMarkupAnnotation&&0!==e.textMarkupAnnotation.length)for(n=0;n<e.textMarkupAnnotation.length;n++)i.textMarkupAnnotation.push(e.textMarkupAnnotation[n]);if(e.shapeAnnotation&&0!==e.shapeAnnotation.length)for(n=0;n<e.shapeAnnotation.length;n++)i.shapeAnnotation.push(e.shapeAnnotation[n]);if(e.measureShapeAnnotation&&0!==e.measureShapeAnnotation.length)for(n=0;n<e.measureShapeAnnotation.length;n++)i.measureShapeAnnotation.push(e.measureShapeAnnotation[n]);if(e.stampAnnotations&&0!==e.stampAnnotations.length)for(n=0;n<e.stampAnnotations.length;n++)i.stampAnnotations.push(e.stampAnnotations[n]);if(e.stickyNotesAnnotation&&0!==e.stickyNotesAnnotation.length)for(n=0;n<e.stickyNotesAnnotation.length;n++)i.stickyNotesAnnotation.push(e.stickyNotesAnnotation[n]);if(e.freeTextAnnotation&&0!==e.freeTextAnnotation.length)for(n=0;n<e.freeTextAnnotation.length;n++)i.freeTextAnnotation.push(e.freeTextAnnotation[n]);if(e.signatureAnnotation&&0!==e.signatureAnnotation.length)for(n=0;n<e.signatureAnnotation.length;n++)i.signatureAnnotation.push(e.signatureAnnotation[n]);if(e.signatureInkAnnotation&&0!==e.signatureInkAnnotation.length)for(var n=0;n<e.signatureInkAnnotation.length;n++)i.signatureInkAnnotation.push(e.signatureInkAnnotation[n]);this.documentAnnotationCollections[t]=i}}},s.prototype.checkDocumentCollectionData=function(e,t){var i;if(t)i=t;else if(this.documentAnnotationCollections){var n=this.documentAnnotationCollections[e];n&&(i=m(n))}if(i){var o=window.sessionStorage.getItem(this.documentId+"_annotations_textMarkup"),s=window.sessionStorage.getItem(this.documentId+"_annotations_shape"),a=window.sessionStorage.getItem(this.documentId+"_annotations_shape_measure"),r=window.sessionStorage.getItem(this.documentId+"_annotations_stamp"),l=window.sessionStorage.getItem(this.documentId+"_annotations_sticky"),d=window.sessionStorage.getItem(this.documentId+"_annotations_freetext"),u=window.sessionStorage.getItem(this.documentId+"_annotations_ink");if(this.isStorageExceed&&(o=this.annotationStorage[this.documentId+"_annotations_textMarkup"],s=this.annotationStorage[this.documentId+"_annotations_shape"],a=this.annotationStorage[this.documentId+"_annotations_shape_measure"],r=this.annotationStorage[this.documentId+"_annotations_stamp"],l=this.annotationStorage[this.documentId+"_annotations_sticky"],d=this.annotationStorage[this.documentId+"_annotations_freetext"],u=this.annotationStorage[this.documentId+"_annotations_ink"]),i.textMarkupAnnotation&&0!==i.textMarkupAnnotation.length&&o&&(M=JSON.parse(o))&&(i.textMarkupAnnotation=this.findImportedAnnotations(M,i.textMarkupAnnotation,e)),i.shapeAnnotation&&0!==i.shapeAnnotation.length&&s&&(M=JSON.parse(s))&&(i.shapeAnnotation=this.findImportedAnnotations(M,i.shapeAnnotation,e)),i.measureShapeAnnotation&&0!==i.measureShapeAnnotation.length&&a&&(M=JSON.parse(a))&&(i.measureShapeAnnotation=this.findImportedAnnotations(M,i.measureShapeAnnotation,e)),i.stampAnnotations&&0!==i.stampAnnotations.length&&r&&(M=JSON.parse(r))&&(i.stampAnnotations=this.findImportedAnnotations(M,i.stampAnnotations,e)),i.stickyNotesAnnotation&&0!==i.stickyNotesAnnotation.length&&l&&(M=JSON.parse(l))&&(i.stickyNotesAnnotation=this.findImportedAnnotations(M,i.stickyNotesAnnotation,e)),i.freeTextAnnotation&&0!==i.freeTextAnnotation.length&&d&&(M=JSON.parse(d))&&(i.freeTextAnnotation=this.findImportedAnnotations(M,i.freeTextAnnotation,e)),i.signatureInkAnnotation&&0!==i.signatureInkAnnotation.length&&u){var M=JSON.parse(u);M&&(i.signatureInkAnnotation=this.findImportedAnnotations(M,i.signatureInkAnnotation,e))}return i}},s.prototype.findImportedAnnotations=function(e,t,i){for(var n=null,o=0;o<e.length;o++)e[o].pageIndex===i&&(n=e[o].annotations);if(n)for(var s=0;s<n.length;s++)for(var a=0;a<t.length;a++)n[s].annotName===t[a].AnnotName&&(t.splice(a,1),a-=1);return n=null,t},s.prototype.drawPageAnnotations=function(e,t,i){if(i&&(e=e[t]),e){if(e.textMarkupAnnotation&&0!==e.textMarkupAnnotation.length){n=window.sessionStorage.getItem(this.documentId+"_annotations_textMarkup");this.isStorageExceed&&(n=this.annotationStorage[this.documentId+"_annotations_textMarkup"]),n&&(o=JSON.parse(n))&&(e.textMarkupAnnotation=this.checkAnnotationCollections(o,e.textMarkupAnnotation,t)),e.textMarkupAnnotation=this.checkAnnotationCommentsCollections(e.textMarkupAnnotation,t),0!==e.textMarkupAnnotation.length&&this.pdfViewer.annotationModule.renderAnnotations(t,null,null,e.textMarkupAnnotation,null,!0)}if(e.shapeAnnotation&&0!==e.shapeAnnotation.length){n=window.sessionStorage.getItem(this.documentId+"_annotations_shape");if(this.isStorageExceed&&(n=this.annotationStorage[this.documentId+"_annotations_shape"]),n){o=JSON.parse(n);e.shapeAnnotation=this.checkAnnotationCollections(o,e.shapeAnnotation,t)}e.shapeAnnotation=this.checkAnnotationCommentsCollections(e.shapeAnnotation,t),0!==e.shapeAnnotation.length&&this.pdfViewer.annotationModule.renderAnnotations(t,e.shapeAnnotation,null,null,null,!0)}if(e.measureShapeAnnotation&&0!==e.measureShapeAnnotation.length){n=window.sessionStorage.getItem(this.documentId+"_annotations_shape_measure");if(this.isStorageExceed&&(n=this.annotationStorage[this.documentId+"_annotations_shape_measure"]),n){o=JSON.parse(n);e.measureShapeAnnotation=this.checkAnnotationCollections(o,e.measureShapeAnnotation,t)}e.measureShapeAnnotation=this.checkAnnotationCommentsCollections(e.measureShapeAnnotation,t),0!==e.measureShapeAnnotation.length&&this.pdfViewer.annotationModule.renderAnnotations(t,null,e.measureShapeAnnotation,null,null,!0)}if(e.stampAnnotations&&0!==e.stampAnnotations.length){n=window.sessionStorage.getItem(this.documentId+"_annotations_stamp");if(this.isStorageExceed&&(n=this.annotationStorage[this.documentId+"_annotations_stamp"]),n){o=JSON.parse(n);e.stampAnnotations=this.checkAnnotationCollections(o,e.stampAnnotations,t)}e.stampAnnotations=this.checkAnnotationCommentsCollections(e.stampAnnotations,t),0!==e.stampAnnotations.length&&this.pdfViewer.annotationModule.stampAnnotationModule.renderStampAnnotations(e.stampAnnotations,t,null,!0)}if(e.stickyNotesAnnotation&&0!==e.stickyNotesAnnotation.length){n=window.sessionStorage.getItem(this.documentId+"_annotations_sticky");if(this.isStorageExceed&&(n=this.annotationStorage[this.documentId+"_annotations_sticky"]),n){o=JSON.parse(n);e.stickyNotesAnnotation=this.checkAnnotationCollections(o,e.stickyNotesAnnotation,t)}e.stickyNotesAnnotation=this.checkAnnotationCommentsCollections(e.stickyNotesAnnotation,t),0!==e.stickyNotesAnnotation.length&&this.pdfViewer.annotationModule.stickyNotesAnnotationModule.renderStickyNotesAnnotations(e.stickyNotesAnnotation,t)}if(e.freeTextAnnotation&&0!==e.freeTextAnnotation.length){n=window.sessionStorage.getItem(this.documentId+"_annotations_freetext");if(this.isStorageExceed&&(n=this.annotationStorage[this.documentId+"_annotations_freetext"]),n){o=JSON.parse(n);e.freeTextAnnotation=this.checkAnnotationCollections(o,e.freeTextAnnotation,t)}e.freeTextAnnotation=this.checkAnnotationCommentsCollections(e.freeTextAnnotation,t),0!==e.freeTextAnnotation.length&&this.pdfViewer.annotationModule.freeTextAnnotationModule.renderFreeTextAnnotations(e.freeTextAnnotation,t,!0)}if(e.signatureAnnotation&&0!==e.signatureAnnotation.length){n=window.sessionStorage.getItem(this.documentId+"_annotations_sign");(o=JSON.parse(n))&&(e.signatureAnnotation=this.checkSignatureCollections(o,e.signatureAnnotation,t)),this.signatureModule.renderExistingSignature(e.signatureAnnotation,t,!0)}if(e.signatureInkAnnotation&&0!==e.signatureInkAnnotation.length){var n=window.sessionStorage.getItem(this.documentId+"_annotations_ink");if(this.isStorageExceed&&(n=this.annotationStorage[this.documentId+"_annotations_ink"]),n){var o=JSON.parse(n);e.signatureInkAnnotation=this.checkAnnotationCollections(o,e.signatureInkAnnotation,t)}e.signatureInkAnnotation=this.checkAnnotationCommentsCollections(e.signatureInkAnnotation,t),0!==e.signatureInkAnnotation.length&&this.pdfViewer.annotationModule.inkAnnotationModule.renderExistingInkSignature(e.signatureInkAnnotation,t,!0)}}},s.prototype.checkSignatureCollections=function(e,t,i){for(var n=null,o=0;o<e.length;o++)e[o].pageIndex===i&&(n=e[o].annotations);if(n)for(var s=0;s<n.length;s++)for(var a=0;a<t.length;a++)n[s].signatureName===t[a].SignatureName&&(t.splice(a,1),a-=1);return n=null,t},s.prototype.checkAnnotationCollections=function(e,t,i){for(var n=null,o=0;o<e.length;o++)e[o].pageIndex===i&&(n=e[o].annotations);if(n)for(var s=0;s<n.length;s++)for(var a=0;a<t.length;a++)n[s].annotName===t[a].AnnotName&&(t.splice(a,1),a-=1);return n=null,t},s.prototype.checkAnnotationCommentsCollections=function(e,t){if(this.annotationComments){var i=this.annotationComments[t];if(i=this.selectAnnotationCollections(i))for(var n=0;n<i.length;n++)for(var o=0;o<e.length;o++)i[n].AnnotName===e[o].AnnotName&&(e.splice(o,1),o-=1);i=null}return e},s.prototype.selectAnnotationCollections=function(e){var t=[];if(e){if(e.textMarkupAnnotation&&0!==e.textMarkupAnnotation.length)for(i=0;i<e.textMarkupAnnotation.length;i++)t.push(e.textMarkupAnnotation[i]);if(e.shapeAnnotation&&0!==e.shapeAnnotation.length)for(i=0;i<e.shapeAnnotation.length;i++)t.push(e.shapeAnnotation[i]);if(e.measureShapeAnnotation&&0!==e.measureShapeAnnotation.length)for(i=0;i<e.measureShapeAnnotation.length;i++)t.push(e.measureShapeAnnotation[i]);if(e.stampAnnotations&&0!==e.stampAnnotations.length)for(i=0;i<e.stampAnnotations.length;i++)t.push(e.stampAnnotations[i]);if(e.stickyNotesAnnotation&&0!==e.stickyNotesAnnotation.length)for(i=0;i<e.stickyNotesAnnotation.length;i++)t.push(e.stickyNotesAnnotation[i]);if(e.freeTextAnnotation&&0!==e.freeTextAnnotation.length)for(i=0;i<e.freeTextAnnotation.length;i++)t.push(e.freeTextAnnotation[i]);if(e.signatureInkAnnotation&&0!==e.signatureInkAnnotation.length)for(var i=0;i<e.signatureInkAnnotation.length;i++)t.push(e.signatureInkAnnotation[i])}return t},s.prototype.saveImportedAnnotations=function(){var e=window.sessionStorage.getItem(this.documentId+"_annotations_textMarkup"),t=window.sessionStorage.getItem(this.documentId+"_annotations_shape"),i=window.sessionStorage.getItem(this.documentId+"_annotations_shape_measure"),n=window.sessionStorage.getItem(this.documentId+"_annotations_stamp"),o=window.sessionStorage.getItem(this.documentId+"_annotations_sticky"),s=window.sessionStorage.getItem(this.documentId+"_annotations_freetext"),a=window.sessionStorage.getItem(this.documentId+"_annotations_ink");if(this.isStorageExceed&&(e=this.annotationStorage[this.documentId+"_annotations_textMarkup"],t=this.annotationStorage[this.documentId+"_annotations_shape"],i=this.annotationStorage[this.documentId+"_annotations_shape_measure"],n=this.annotationStorage[this.documentId+"_annotations_stamp"],o=this.annotationStorage[this.documentId+"_annotations_sticky"],s=this.annotationStorage[this.documentId+"_annotations_freetext"],a=this.annotationStorage[this.documentId+"_annotations_ink"]),this.downloadCollections={textMarkupObject:e,shapeObject:t,measureShapeObject:i,stampObject:n,stickyObject:o,freeTextObject:s,inkObject:a},this.documentAnnotationCollections)for(var r=0;r<this.pageCount;r++)if(this.documentAnnotationCollections[r]){var l=m(this.documentAnnotationCollections[r]);l=this.checkDocumentCollectionData(r,l),this.savePageAnnotations(l,r)}},s.prototype.savePageAnnotations=function(e,t){if(0!==e.textMarkupAnnotation.length)for(i=0;i<e.textMarkupAnnotation.length;i++)this.pdfViewer.annotationModule.textMarkupAnnotationModule.saveImportedTextMarkupAnnotations(e.textMarkupAnnotation[i],t);if(0!==e.shapeAnnotation.length)for(i=0;i<e.shapeAnnotation.length;i++)this.pdfViewer.annotationModule.shapeAnnotationModule.saveImportedShapeAnnotations(e.shapeAnnotation[i],t);if(0!==e.measureShapeAnnotation.length)for(i=0;i<e.measureShapeAnnotation.length;i++)this.pdfViewer.annotationModule.measureAnnotationModule.saveImportedMeasureAnnotations(e.measureShapeAnnotation[i],t);if(0!==e.stampAnnotations.length)for(i=0;i<e.stampAnnotations.length;i++)this.pdfViewer.annotationModule.stampAnnotationModule.saveImportedStampAnnotations(e.stampAnnotations[i],t);if(0!==e.stickyNotesAnnotation.length)for(i=0;i<e.stickyNotesAnnotation.length;i++)this.pdfViewer.annotationModule.stickyNotesAnnotationModule.saveImportedStickyNotesAnnotations(e.stickyNotesAnnotation[i],t);if(0!==e.freeTextAnnotation.length)for(var i=0;i<e.freeTextAnnotation.length;i++)this.pdfViewer.annotationModule.freeTextAnnotationModule.saveImportedFreeTextAnnotations(e.freeTextAnnotation[i],t)},s.prototype.updateDocumentAnnotationCollections=function(){window.sessionStorage.removeItem(this.documentId+"_annotations_textMarkup"),window.sessionStorage.removeItem(this.documentId+"_annotations_shape"),window.sessionStorage.removeItem(this.documentId+"_annotations_shape_measure"),window.sessionStorage.removeItem(this.documentId+"_annotations_stamp"),window.sessionStorage.removeItem(this.documentId+"_annotations_sticky"),window.sessionStorage.removeItem(this.documentId+"_annotations_freetext"),window.sessionStorage.removeItem(this.documentId+"_annotations_ink"),this.downloadCollections&&(this.isStorageExceed?(this.annotationStorage[this.documentId+"_annotations_textMarkup"]=this.downloadCollections.textMarkupObject,this.annotationStorage[this.documentId+"_annotations_shape"]=this.downloadCollections.shapeObject,this.annotationStorage[this.documentId+"_annotations_shape_measure"]=this.downloadCollections.measureShapeObject,this.annotationStorage[this.documentId+"_annotations_stamp"]=this.downloadCollections.stampObject,this.annotationStorage[this.documentId+"_annotations_sticky"]=this.downloadCollections.stickyObject,this.annotationStorage[this.documentId+"_annotations_freetext"]=this.downloadCollections.freeTextObject,this.annotationStorage[this.documentId+"_annotations_ink"]=this.downloadCollections.inkObject):(this.downloadCollections.textMarkupObject&&window.sessionStorage.setItem(this.documentId+"_annotations_textMarkup",this.downloadCollections.textMarkupObject),this.downloadCollections.shapeObject&&window.sessionStorage.setItem(this.documentId+"_annotations_shape",this.downloadCollections.shapeObject),this.downloadCollections.measureShapeObject&&window.sessionStorage.setItem(this.documentId+"_annotations_shape_measure",this.downloadCollections.measureShapeObject),this.downloadCollections.stampObject&&window.sessionStorage.setItem(this.documentId+"_annotations_stamp",this.downloadCollections.stampObject),this.downloadCollections.stickyObject&&window.sessionStorage.setItem(this.documentId+"_annotations_sticky",this.downloadCollections.stickyObject),this.downloadCollections.freeTextObject&&window.sessionStorage.setItem(this.documentId+"_annotations_freetext",this.downloadCollections.freeTextObject),this.downloadCollections.inkObject&&window.sessionStorage.setItem(this.documentId+"_annotations_ink",this.downloadCollections.inkObject)))},s.prototype.createAnnotationJsonData=function(){var e,t,i,n,o,s,a,r,l={};if(this.saveImportedAnnotations(),this.isTextMarkupAnnotationModule()&&(e=this.pdfViewer.annotationModule.textMarkupAnnotationModule.saveTextMarkupAnnotations()),this.isShapeAnnotationModule()&&(t=this.pdfViewer.annotationModule.shapeAnnotationModule.saveShapeAnnotations()),this.isCalibrateAnnotationModule()&&(i=this.pdfViewer.annotationModule.measureAnnotationModule.saveMeasureShapeAnnotations()),this.isStampAnnotationModule()&&(n=this.pdfViewer.annotationModule.stampAnnotationModule.saveStampAnnotations()),this.isCommentAnnotationModule()&&(o=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.saveStickyAnnotations()),this.isFreeTextAnnotationModule()&&(s=this.pdfViewer.annotationModule.freeTextAnnotationModule.saveFreeTextAnnotations()),this.isInkAnnotationModule()&&(r=this.pdfViewer.annotationModule.inkAnnotationModule.saveInkSignature()),this.pdfViewer.isSignatureEditable)a=this.signatureModule.saveSignature();else{for(var d=new Array,u=0;u<this.pageCount;u++)d[u]=[];a=JSON.stringify(d)}for(var M=0;M<this.pageCount;M++){var p={textMarkupAnnotation:JSON.parse(e)[M],shapeAnnotation:JSON.parse(t)[M],measureShapeAnnotation:JSON.parse(i)[M],stampAnnotations:JSON.parse(n)[M],stickyNotesAnnotation:JSON.parse(o)[M],freeTextAnnotation:JSON.parse(s)[M],signatureAnnotation:JSON.parse(a)[M],signatureInkAnnotation:JSON.parse(r)[M]};l[M]=p}return JSON.stringify(l)},s.prototype.combineImportedData=function(e,t){for(var i=0;i<this.pageCount;i++)if(t[i])if(e[i])t[i].textMarkupAnnotation&&0!==t[i].textMarkupAnnotation.length&&(e[i].textMarkupAnnotation?(t[i].textMarkupAnnotation=this.checkImportedData(e[i].textMarkupAnnotation,t[i].textMarkupAnnotation,i),0!==t[i].textMarkupAnnotation.length&&(e[i].textMarkupAnnotation=e[i].textMarkupAnnotation.concat(t[i].textMarkupAnnotation))):e[i].textMarkupAnnotation=t[i].textMarkupAnnotation),t[i].shapeAnnotation&&0!==t[i].shapeAnnotation.length&&(e[i].shapeAnnotation?(t[i].shapeAnnotation=this.checkImportedData(e[i].shapeAnnotation,t[i].shapeAnnotation,i),0!==t[i].shapeAnnotation.length&&(e[i].shapeAnnotation=e[i].shapeAnnotation.concat(t[i].shapeAnnotation))):e[i].shapeAnnotation=t[i].shapeAnnotation),t[i].measureShapeAnnotation&&0!==t[i].measureShapeAnnotation.length&&(e[i].measureShapeAnnotation?(t[i].measureShapeAnnotation=this.checkImportedData(e[i].measureShapeAnnotation,t[i].measureShapeAnnotation,i),0!==t[i].measureShapeAnnotation.length&&(e[i].measureShapeAnnotation=e[i].measureShapeAnnotation.concat(t[i].measureShapeAnnotation))):e[i].measureShapeAnnotation=t[i].measureShapeAnnotation),t[i].stampAnnotations&&0!==t[i].stampAnnotations.length&&(e[i].stampAnnotations?(t[i].stampAnnotations=this.checkImportedData(e[i].stampAnnotations,t[i].stampAnnotations,i),0!==t[i].stampAnnotations.length&&(e[i].stampAnnotations=e[i].stampAnnotations.concat(t[i].stampAnnotations))):e[i].stampAnnotations=t[i].stampAnnotations),t[i].stickyNotesAnnotation&&0!==t[i].stickyNotesAnnotation.length&&(e[i].stickyNotesAnnotation?(t[i].stickyNotesAnnotation=this.checkImportedData(e[i].stickyNotesAnnotation,t[i].stickyNotesAnnotation,i),0!==t[i].stickyNotesAnnotation.length&&(e[i].stickyNotesAnnotation=e[i].stickyNotesAnnotation.concat(t[i].stickyNotesAnnotation))):e[i].stickyNotesAnnotation=t[i].stickyNotesAnnotation),t[i].freeTextAnnotation&&0!==t[i].freeTextAnnotation.length&&(e[i].freeTextAnnotation?(t[i].freeTextAnnotation=this.checkImportedData(e[i].freeTextAnnotation,t[i].freeTextAnnotation,i),0!==t[i].freeTextAnnotation.length&&(e[i].freeTextAnnotation=e[i].freeTextAnnotation.concat(t[i].freeTextAnnotation))):e[i].freeTextAnnotation=t[i].freeTextAnnotation),t[i].signatureInkAnnotation&&0!==t[i].signatureInkAnnotation.length&&(e[i].signatureInkAnnotation?(t[i].signatureInkAnnotation=this.checkImportedData(e[i].signatureInkAnnotation,t[i].signatureInkAnnotation,i),0!==t[i].signatureInkAnnotation.length&&(e[i].signatureInkAnnotation=e[i].signatureInkAnnotation.concat(t[i].signatureInkAnnotation))):e[i].signatureInkAnnotation=t[i].signatureInkAnnotation);else{var n={textMarkupAnnotation:t[i].textMarkupAnnotation,shapeAnnotation:t[i].shapeAnnotation,measureShapeAnnotation:t[i].measureShapeAnnotation,stampAnnotations:t[i].stampAnnotations,stickyNotesAnnotation:t[i].stickyNotesAnnotation,freeTextAnnotation:t[i].freeTextAnnotation,signatureInkAnnotation:t[i].signatureInkAnnotation};e[i]=n}return e},s.prototype.updateExportItem=function(){var e=window.sessionStorage.getItem(this.documentId+"_annotations_shape"),t=window.sessionStorage.getItem(this.documentId+"_annotations_shape_measure"),i=window.sessionStorage.getItem(this.documentId+"_annotations_stamp"),n=window.sessionStorage.getItem(this.documentId+"_annotations_sticky"),o=window.sessionStorage.getItem(this.documentId+"_annotations_textMarkup"),s=window.sessionStorage.getItem(this.documentId+"_annotations_freetext"),a=!1,r=window.sessionStorage.getItem(this.documentId+"_annotations_ink");return this.pdfViewer.isSignatureEditable&&window.sessionStorage.getItem(this.documentId+"_annotations_sign")&&(a=!0),!!(e||t||i||n||o||s||this.isImportAction||this.isStorageExceed||a||r)},s.prototype.isFreeTextAnnotation=function(e){var t=!1;return e&&e.length>0&&(t=e.some(function(e){return"FreeText"===e.shapeAnnotationType&&"Text Box"===e.subject})),t},s.prototype.checkImportedData=function(e,t,i){for(o=0;o<e.length;o++)for(s=0;s<t.length;s++)e[o].AnnotName===t[s].AnnotName&&(t.splice(s,1),s-=1);if(this.annotationComments){var n=this.annotationComments[i];if(n=this.selectAnnotationCollections(n))for(var o=0;o<n.length;o++)for(var s=0;s<t.length;s++)n[o].AnnotName===t[s].AnnotName&&(t.splice(s,1),s-=1)}return t},s.prototype.checkAnnotationWidth=function(e){for(var t,i,n,o,s,a,r=0;r<e.length;r++)n?(n>e[r].x?n=e[r].x:o<e[r].x&&(o=e[r].x),s>e[r].y?s=e[r].y:a<e[r].y&&(a=e[r].y)):(n=e[r].x,o=e[r].x,s=e[r].y,a=e[r].y);return t=o-n,i=a-s,{width:t,height:i}},s.prototype.deleteAnnotations=function(){if(this.pdfViewer.annotationModule){this.pdfViewer.annotations=[],this.pdfViewer.zIndexTable=[],this.pdfViewer.annotationCollection=[],this.pdfViewer.signatureCollection=[];var e=this.createAnnotationsCollection();this.annotationComments=e,this.documentAnnotationCollections=e,this.annotationRenderredList=[],window.sessionStorage.removeItem(this.documentId+"_annotations_shape"),window.sessionStorage.removeItem(this.documentId+"_annotations_shape_measure"),window.sessionStorage.removeItem(this.documentId+"_annotations_stamp"),window.sessionStorage.removeItem(this.documentId+"_annotations_sticky"),window.sessionStorage.removeItem(this.documentId+"_annotations_textMarkup"),window.sessionStorage.removeItem(this.documentId+"_annotations_freetext"),window.sessionStorage.removeItem(this.documentId+"_annotations_sign"),window.sessionStorage.removeItem(this.documentId+"_annotations_ink");for(var t=0;t<this.pageCount;t++){this.pdfViewer.annotationModule.renderAnnotations(t,null,null,null),this.pdfViewer.renderDrawing(void 0,t),this.pdfViewer.clearSelection(t);var i=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+(t+1));i&&i.remove();var n=document.getElementById(this.pdfViewer.element.id+"_accordionContentContainer");n&&0===n.childElementCount&&(n.style.display="none",document.getElementById(this.pdfViewer.element.id+"_commentsPanelText")&&(this.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export Annotations")],!1),document.getElementById(this.pdfViewer.element.id+"_commentsPanelText").style.display="block"))}this.isImportedAnnotation=!1,this.isImportAction=!1,this.importedAnnotation=[],this.annotationPageList=[],this.pdfViewer.annotationModule.freeTextAnnotationModule.freeTextPageNumbers=[],this.pdfViewer.annotationModule.stampAnnotationModule.stampPageNumber=[],this.pdfViewer.annotation.inkAnnotationModule.inkAnnotationindex=[],this.isAnnotationCollectionRemoved=!0}},s.prototype.createAnnotationsCollection=function(e,t){var i=[];if(t){o={textMarkupAnnotation:[],shapeAnnotation:[],measureShapeAnnotation:[],stampAnnotations:[],stickyNotesAnnotation:[],freeTextAnnotation:[],signatureAnnotation:[],signatureInkAnnotation:[]};(i={})[e]=o}else for(var n=0;n<this.pageCount;n++){var o={textMarkupAnnotation:[],shapeAnnotation:[],measureShapeAnnotation:[],stampAnnotations:[],stickyNotesAnnotation:[],freeTextAnnotation:[],signatureAnnotation:[],signatureInkAnnotation:[]};i.push(o)}return i},s.prototype.addAnnotation=function(e){var t,i={};if(e){var n=!1,o=1;e.shapeAnnotationType||e.author?(n=!0,t=this.createAnnotationsCollection(e.pageNumber,!0)):e.length?(o=e.length,t=this.createAnnotationsCollection()):(n=!0,t=this.createAnnotationsCollection(e.pageNumber,!0));for(var s=0;s<o;s++){var a=void 0;a=n?e:e[s];var r={};if(r.ShapeAnnotationType=a.shapeAnnotationType,r.AnnotationAddMode=a.annotationAddMode,r.Author=a.author,r.AnnotationSelectorSettings=a.annotationSelectorSettings,r.AnnotationSettings=a.annotationSettings,r.PageNumber=a.pageNumber,r.ModifiedDate=a.modifiedDate,r.Subject=a.subject,r.Note=a.note,r.AnnotName=a.annotationId,r.IsCommentLock=a.isCommentLock,r.Comments=a.comments,a.comments&&a.comments.length>0){for(var l=[],d=0;d<a.comments.length;d++)l.push(this.updateComments(a,a.comments[d]));r.Comments=l}if(a.review&&(r.State=a.review.state,r.StateModel=a.review.stateModel),r.CustomData=a.customData,r.Opacity=a.opacity,"textMarkup"===a.shapeAnnotationType){if(r.AnnotType="textMarkup",r.Color=a.color,r.IsMultiSelect=a.isMultiSelect,r.TextMarkupAnnotationType=a.textMarkupAnnotationType,r.TextMarkupContent=a.textMarkupContent,r.TextMarkupStartIndex=a.textMarkupStartIndex,r.TextMarkupEndIndex=a.textMarkupEndIndex,a.rect&&(r.Rect=this.convertBounds(a.rect,!0)),a.bounds&&a.bounds.length>=1){for(var u=new Array,d=0;d<a.bounds.length;d++)u.push(this.convertBounds(a.bounds[d]));r.Bounds=u}t[a.pageNumber].textMarkupAnnotation.push(r)}else if("sticky"===a.shapeAnnotationType)r.AnnotType="sticky",r.Icon="Comment",r.Bounds=this.convertBounds(a.bounds),r.StrokeColor=a.strokeColor,r.Color=a.color,t[a.pageNumber].stickyNotesAnnotation.push(r);else if("FreeText"===a.shapeAnnotationType)r.AnnotType="freeText",r.Name=a.annotationId,r.MarkupText=a.dynamicText,r.Text=a.dynamicText,r.Note=a.dynamicText,r.TextAlign=a.textAlign,r.Thickness=a.thicknes,r.StrokeColor=a.strokeColor,r.FillColor=a.fillColor,r.FontColor=a.fontColor,r.FontSize=a.fontSize,r.FontFamily=a.fontFamily,r.Rotate=a.rotateAngle,r.Bounds=this.convertBounds(a.bounds),r.Font={Name:a.fontFamily,Size:a.fontSize,Bold:a.font.isBold,Italic:a.font.isItalic,Strikeout:a.font.isStrikeout,Underline:a.font.isUnderline},t[a.pageNumber].freeTextAnnotation.push(r);else if("stamp"===a.shapeAnnotationType){if(r.AnnotType="stamp",r.Icon=a.icon,r.isDynamic=!1,r.Rect=this.convertBounds(a.bounds),r.RotateAngle=a.rotateAngle,r.FillColor=a.fillColor,r.StrokeColor=a.strokeColor,r.StampAnnotationType=a.stampAnnotationType,r.CreationDate=a.creationDate,"image"===a.stampAnnotationType){var M=[],p={imagedata:a.stampAnnotationPath};M.push(p),r.Apperarance=M}if(a.isDynamicStamp){r.IsDynamic=!0,r.StrokeColor=a.stampFillcolor;var M=[],p={type:"string",text:a.dynamicText,currentFontname:"95b303ab-d397-438a-83af-e2ff8a9900f1",baseFontName:"Helvetica-BoldOblique",fontSize:10,isImport:!0};M.push(p),r.Apperarance=M}t[a.pageNumber].stampAnnotations.push(r)}else if("Ink"===a.shapeAnnotationType||"Signature"===a.shapeAnnotationType)r.StrokeColor=a.strokeColor,r.FillColor=a.fillColor,r.Thickness=a.thickness,r.Bounds=this.convertBounds(a.bounds),r.PathData=a.data,r.pageIndex=a.pageNumber,"Ink"===a.shapeAnnotationType&&(r.AnnotType="Ink",r.IsPathData=!0,t[a.pageNumber].signatureInkAnnotation.push(r)),"Signature"===a.shapeAnnotationType&&(r.AnnotType="Signature",r.SignatureName=a.annotationId,r.IsSignature=!0,t[a.pageNumber].signatureAnnotation.push(r));else if("Line"===a.shapeAnnotationType||"LineWidthArrowHead"===a.shapeAnnotationType||"Polyline"===a.shapeAnnotationType||"Polygon"===a.shapeAnnotationType||"Polyline"===a.shapeAnnotationType||"Circle"===a.shapeAnnotationType||"Oval"===a.shapeAnnotationType||"Rectangle"===a.shapeAnnotationType||"Square"===a.shapeAnnotationType||"Ellipse"===a.shapeAnnotationType){if(r.AnnotType="shape",r.StrokeColor=a.strokeColor,r.FillColor=a.fillColor,r.Thickness=a.thickness,r.BorderStyle=a.borderStyle,r.BorderDashArray=a.borderDashArray,r.RotateAngle=a.rotateAngle,r.IsCloudShape=a.isCloudShape,r.CloudIntensity=a.cloudIntensity,r.RectangleDifference=a.rectangleDifference,r.LineHeadStart=a.lineHeadStart,r.LineHeadEnd=a.lineHeadEnd,r.IsLocked=a.isLocked,r.EnableShapeLabel=a.enableShapeLabel,r.LabelContent=a.labelContent,r.LabelFillColor=a.labelFillColor,r.LabelBorderColor=a.labelBorderColor,r.FontColor=a.fontColor,r.FontSize=a.fontSize,r.LabelBounds=this.convertBounds(a.labelBounds),r.LabelSettings=a.labelSettings,r.Bounds=this.convertBounds(a.bounds),r.LeaderLength=a.leaderLength,r.LeaderLineExtenstion=a.leaderLineExtension,a.vertexPoints&&a.vertexPoints.length>=1){for(var h=new Array,d=0;d<a.vertexPoints.length;d++)h.push(this.convertVertexPoints(a.vertexPoints[d]));r.VertexPoints=h}if(r.EnableShapeLabel=a.enableShapeLabel,"Distance calculation"===a.subject||"Perimeter calculation"===a.subject||"Area calculation"===a.subject||"Radius calculation"===a.subject||"Volume calculation"===a.subject){r.AnnotType="shape_measure";var L=a.calibrate;L&&(r.Calibrate={Ratio:L.ratio,X:[{Unit:L.x[0].unit,ConversionFactor:L.x[0].conversionFactor,FractionalType:L.x[0].fractionalType,Denominator:L.x[0].denominator,FormatDenominator:L.x[0].formatDenominator}],Distance:[{Unit:L.distance[0].unit,ConversionFactor:L.distance[0].conversionFactor,FractionalType:L.distance[0].fractionalType,Denominator:L.distance[0].denominator,FormatDenominator:L.distance[0].formatDenominator}],Area:[{Unit:L.area[0].unit,ConversionFactor:L.area[0].conversionFactor,FractionalType:L.area[0].fractionalType,Denominator:L.area[0].denominator,FormatDenominator:L.area[0].formatDenominator}],Angle:null,Volume:null,TargetUnitConversion:L.targetUnitConversion,Depth:L.depth}),r.Indent=a.indent,r.Caption=a.caption,r.CaptionPosition=a.captionPosition,r.LeaderLineExtension=a.leaderLineExtension,r.LeaderLength=a.leaderLength,r.LeaderLineOffset=a.leaderLineOffset,t[a.pageNumber].measureShapeAnnotation.push(r)}else t[a.pageNumber].shapeAnnotation.push(r)}}i.pdfAnnotation=t,this.pdfViewer.importAnnotation(i)}},s.prototype.convertBounds=function(e,t){if(e){if(t)return{left:e.left?e.left:e.Left?e.Left:0,right:e.right?e.right:e.Right?e.Right:0,bottom:e.bottom?e.bottom:e.Bottom?e.Bottom:0,top:e.top?e.top:e.Top?e.Top:0};var i=e.x?e.x:e.left?e.left:e.Left?e.Left:0,n=e.y?e.y:e.top?e.top:e.Top?e.Top:0,o=e.width?e.width:e.Width?e.Width:0;return{X:i,Y:n,Left:i,Top:n,Height:e.height?e.height:e.Height?e.Height:0,Width:o}}},s.prototype.convertVertexPoints=function(e){if(e){var t=e.x?e.x:e.X?e.X:0,i=e.y?e.y:e.Y?e.Y:0;return{X:t,Y:i,Left:t,Top:i}}},s.prototype.updateComments=function(e,t){if(e&&t){var i={};return i.ShapeAnnotationType=e.shapeAnnotationType,i.Author=t.author,i.AnnotationSelectorSettings=e.annotationSelectorSettings,i.AnnotationSettings=e.annotationSettings,i.PageNumber=e.pageNumber,i.ModifiedDate=t.modifiedDate,i.Subject=e.subject,i.Note=t.note,i.AnnotName=t.annotName,i.Comments=t.comments,i.State=t.review.state,i.StateModel=t.review.stateModel,i.CustomData=e.customData,i.IsLock=t.isLock,i}},s.prototype.removeFocus=function(){if(t.isBlazor()){var e=this.pdfViewer.element.querySelector("#"+this.pdfViewer.element.id+"_totalPage");e&&e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.blur()}},s}(),$t=function(){function e(e,t){var i=this;this.textBoundsArray=[],this.characterBound=[],this.closeNotification=function(){i.notifyDialog.hide()},this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.addTextLayer=function(e,i,n,o){var s;return document.getElementById(this.pdfViewer.element.id+"_textLayer_"+e)||((s=t.createElement("div",{id:this.pdfViewer.element.id+"_textLayer_"+e,className:"e-pv-text-layer"})).style.width=i+"px",s.style.height=n+"px",o.appendChild(s)),this.pdfViewerBase.applyElementStyles(s,e),s},e.prototype.renderTextContents=function(e,i,n,o){var s=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+e),a=document.getElementById(this.pdfViewer.element.id+"_pageCanvas_"+e);if(a&&0===s.childNodes.length)for(var r=0;r<i.length;r++){var l=n[r],d=t.createElement("div",{id:this.pdfViewer.element.id+"_text_"+e+"_"+r,className:"e-pv-text",attrs:{tabindex:"0"}}),u=i[r];d.textContent=u.replace(/ /g," ")," "!==i[r].replace(/ +/g," ")&&(d.style.whiteSpace="pre"),l&&this.setStyleToTextDiv(d,l.X,l.Y,l.Bottom,l.Width,l.Height),this.setTextElementProperties(d);var M=a.getContext("2d");M.font=d.style.fontSize+" "+d.style.fontFamily;var p=M.measureText(i[r].replace(/(\r\n|\n|\r)/gm,"")).width;if(l){var h=l.Width*this.pdfViewerBase.getZoomFactor()/p;this.applyTextRotation(h,d,o,l.Rotation)}s.appendChild(d),this.resizeExcessDiv(s,d),this.pdfViewer.textSelectionModule&&this.pdfViewer.enableTextSelection&&!this.pdfViewerBase.isTextSelectionDisabled&&"e-pdfviewer-formFields"!==d.className&&"e-pdfviewer-signatureformfields"!==d.className&&"e-pdfviewer-signatureformfields-signature"!==d.className&&d.classList.add("e-pv-cursor")}},e.prototype.resizeTextContents=function(e,i,n,o,s){var a=this.pdfViewerBase.getElement("_textLayer_"+e),r=this.pdfViewerBase.getElement("_pageCanvas_"+e);if(r)for(var l=0;l<a.childNodes.length;l++){var d=void 0,u=this.pdfViewerBase.getElement("_text_"+e+"_"+l);if(t.isNullOrUndefined(u))break;n&&(d=n[l])&&this.setStyleToTextDiv(u,d.X,d.Y,d.Bottom,d.Width,d.Height),this.setTextElementProperties(u);var M=r.getContext("2d");M.font=u.style.fontSize+" "+u.style.fontFamily;var p=void 0;if(i){var h=i[l];h&&(p=M.measureText(h.replace(/(\r\n|\n|\r)/gm,"")).width)}else p=M.measureText(u.textContent.replace(/(\r\n|\n|\r)/gm,"")).width;if(d){var L=d.Width*this.pdfViewerBase.getZoomFactor()/p;this.applyTextRotation(L,u,o,d.Rotation)}this.resizeExcessDiv(a,u)}else a.parentElement.removeChild(a);this.pdfViewer.textSearch&&(s||this.pdfViewer.textSearch.resizeSearchElements(e))},e.prototype.applyTextRotation=function(e,t,i,n){var o="scaleX("+e+")";0===i?t.style.transform=0===n?o:"rotate("+n+"deg) "+o:1===i?t.style.transform=0===n?"rotate(90deg) "+o:-90===n?o:"rotate("+n+"deg) "+o:2===i?t.style.transform=0===n?"rotate(180deg) "+o:180===n?o:"rotate("+n+"deg) "+o:3===i&&(t.style.transform=0===n?"rotate(-90deg) "+o:90===n?o:"rotate("+n+"deg) "+o)},e.prototype.setTextElementProperties=function(e){e.style.fontFamily="serif",e.style.transformOrigin="0%"},e.prototype.resizeTextContentsOnZoom=function(e){var t,i=window.sessionStorage.getItem(this.pdfViewerBase.getDocumentId()+"_"+e+"_"+this.getPreviousZoomFactor()),n=[],o=[];if(i){var s=JSON.parse(i);n=s.textBounds,o=s.textContent,t=s.rotation}if(0!==n.length)this.textBoundsArray.push({pageNumber:e,textBounds:n}),this.resizeTextContents(e,o,n,t);else{var a=this.textBoundsArray.filter(function(t){return t.pageNumber===e});a&&0!==a.length&&(n=a[0].textBounds,this.resizeTextContents(e,null,n,t))}},e.prototype.resizeExcessDiv=function(e,t){var i=e.getBoundingClientRect(),n=t.getBoundingClientRect();(n.width+n.left>=i.width+i.left||n.width>i.width)&&(t.style.width="auto",t.style.width=t.clientWidth+"px")},e.prototype.clearTextLayers=function(e){var t=this.pdfViewerBase.currentPageNumber-3;t=t>0?t:0;var i=this.pdfViewerBase.currentPageNumber+1;i=i<this.pdfViewerBase.pageCount?i:this.pdfViewerBase.pageCount-1;for(var n=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+'_textLayer_"]'),o=0;o<n.length;o++)if(n[o].style.display="block",this.pdfViewerBase.getMagnified()&&(this.getTextSelectionStatus()||this.getTextSearchStatus())){var s=parseInt(n[o].id.split("_textLayer_")[1]);t+1<=s&&s<=i-1||this.removeElement(n[o],e)}else this.pdfViewerBase.getPinchZoomed(),this.removeElement(n[o],e)},e.prototype.removeElement=function(e,i){i?this.removeForeignObjects(e):t.Browser.isIE?e.parentElement?e.parentElement.removeChild(e):e.parentNode&&e.parentNode.removeChild(e):e.remove()},e.prototype.removeForeignObjects=function(e){var t=e.getElementsByClassName("foreign-object");if(t)for(var i=0;i<t.length;i++)"e-pv-text-layer"===t[i].parentElement.className&&e.removeChild(t[0])},e.prototype.convertToSpan=function(e,i,n,o,s,a){var r=this.pdfViewerBase.getElement("_text_"+e+"_"+i),l=s.substring(n,o),d=document.createTextNode(l);if(a){var u=t.createElement("span");u.className=a+" e-pv-text",u.appendChild(d),r.appendChild(u)}else r.appendChild(d)},e.prototype.applySpanForSelection=function(e,t,i,n,o,s){if(this.pdfViewer.textSelectionModule)for(var a=e;a<=t;a++){var r=void 0,l=void 0,d=this.pdfViewerBase.getElement("_textLayer_"+a).childNodes;a===e?(r=i,l=d.length-1):a===t?(r=0,l=n):(r=0,l=d.length-1),e===t&&(r=i,l=n);for(var u=r;u<=l;u++){var M=this.pdfViewerBase.getElement("_text_"+a+"_"+u),p=void 0,h=void 0,L=void 0;if(M&&M.textContent){L=M.textContent.length;var w=M.textContent;M.textContent="",u===r?(p=a===e?o:0,h=L,this.convertToSpan(a,u,0,p,w,null)):u===l&&a===t?(p=0,h=s):(p=0,h=L),r===l&&e===t&&(p=o,h=s),this.convertToSpan(a,u,p,h,w,"e-pv-maintaincontent"),u===l&&a===t&&this.convertToSpan(a,u,h,w.length,w,null)}}}},e.prototype.clearDivSelection=function(){for(var e=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+'_textLayer_"]'),t=0;t<e.length;t++)for(var i=e[t].childNodes,n=0;n<i.length;n++){var o=i[n];if("e-pdfviewer-formFields"!==o.className&&"e-pdfviewer-signatureformfields"!==o.className&&"e-pdfviewer-signatureformfields-signature"!==o.className){var s=o.textContent;(o.childNodes.length>1||1===o.childNodes.length&&"SPAN"===o.childNodes[0].tagName)&&(o.textContent="",o.textContent=s)}}},e.prototype.setStyleToTextDiv=function(e,t,i,n,o,s){e.style.left=t*this.pdfViewerBase.getZoomFactor()+"px",e.style.top=i*this.pdfViewerBase.getZoomFactor()+"px";var a=s*this.pdfViewerBase.getZoomFactor();e.style.height=a+"px",e.style.fontSize=s*this.pdfViewerBase.getZoomFactor()+"px"},e.prototype.getTextSelectionStatus=function(){return!!this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.isTextSelection},e.prototype.modifyTextCursor=function(e){for(var t=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+'_textLayer_"]'),i=0;i<t.length;i++)for(var n=t[i].childNodes,o=0;o<n.length;o++){var s=n[o];e&&"e-pdfviewer-formFields"!==s.className&&"e-pdfviewer-signatureformfields"!==s.className&&"e-pdfviewer-signatureformfields-signature"!==s.className?s.classList.add("e-pv-cursor"):s.classList.remove("e-pv-cursor")}},e.prototype.isBackWardSelection=function(e){var t=e.anchorNode.compareDocumentPosition(e.focusNode),i=!1;return(!t&&e.anchorOffset>e.focusOffset||t===Node.DOCUMENT_POSITION_PRECEDING)&&(i=!0),i},e.prototype.getPageIndex=function(e){var t=e.parentElement;return t||(t=e.parentNode),"e-pv-text-layer"===t.className?parseInt(e.id.split("_text_")[1]):parseInt(t.id.split("_text_")[1])},e.prototype.getTextIndex=function(e,t){var i=e.parentElement;return i||(i=e.parentNode),"e-pv-text-layer"===i.className?parseInt(e.id.split("_text_"+t+"_")[1]):parseInt(i.id.split("_text_"+t+"_")[1])},e.prototype.getPreviousZoomFactor=function(){return this.pdfViewer.magnificationModule?this.pdfViewer.magnificationModule.previousZoomFactor:1},e.prototype.getTextSearchStatus=function(){return!!this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.isTextSearch},e.prototype.createNotificationPopup=function(e){var i=this;if(!this.isMessageBoxOpen)if(t.isBlazor()){var n=document.getElementById(this.pdfViewer.element.id+"_notification_popup_content");n&&(n.textContent=e,n.innerHTML=e),this.pdfViewer.textSearchModule&&(this.pdfViewer.textSearch.isMessagePopupOpened=!1),this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenNotificationPopup")}else{var s=t.createElement("div",{id:this.pdfViewer.element.id+"_notify",className:"e-pv-notification-popup"});this.pdfViewerBase.viewerContainer.appendChild(s),this.notifyDialog=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("PdfViewer"),buttons:[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.closeNotification.bind(this)}],content:'<div class="e-pv-notification-popup-content" tabindex = "0">'+e+"</div>",target:this.pdfViewer.element,beforeClose:function(){if(i.notifyDialog.destroy(),i.pdfViewer.element)try{i.pdfViewer.element.removeChild(s)}catch(e){s.parentElement.removeChild(s)}i.pdfViewer.textSearchModule&&(i.pdfViewer.textSearch.isMessagePopupOpened=!1),i.isMessageBoxOpen=!1}}),this.pdfViewer.enableRtl&&(this.notifyDialog.enableRtl=!0),this.notifyDialog.appendTo(s),this.isMessageBoxOpen=!0}},e}(),ei=function(){function i(e,t){this.copyContextMenu=[],this.pdfViewer=e,this.pdfViewerBase=t,this.copyContextMenu=[{text:this.pdfViewer.localeObj.getConstant("Cut"),iconCss:"e-pv-cut-icon"},{text:this.pdfViewer.localeObj.getConstant("Copy"),iconCss:"e-pv-copy-icon"},{text:this.pdfViewer.localeObj.getConstant("Highlight context"),iconCss:"e-pv-highlight-icon"},{text:this.pdfViewer.localeObj.getConstant("Underline context"),iconCss:"e-pv-underline-icon"},{text:this.pdfViewer.localeObj.getConstant("Strikethrough context"),iconCss:"e-pv-strikethrough-icon"},{text:this.pdfViewer.localeObj.getConstant("Paste"),iconCss:"e-pv-paste-icon"},{text:this.pdfViewer.localeObj.getConstant("Delete Context"),iconCss:"e-pv-delete-icon"},{text:this.pdfViewer.localeObj.getConstant("Scale Ratio"),iconCss:"e-pv-scale-ratio-icon"},{separator:!0,id:e.element.id+"_context_menu_comment_separator"},{text:this.pdfViewer.localeObj.getConstant("Comment"),iconCss:"e-pv-comment-icon"},{separator:!0,id:e.element.id+"_context_menu_separator"},{text:this.pdfViewer.localeObj.getConstant("Properties")}]}return i.prototype.createContextMenu=function(){this.contextMenuElement=t.createElement("ul",{id:this.pdfViewer.element.id+"_context_menu",className:"e-pv-context-menu"}),this.pdfViewer.element.appendChild(this.contextMenuElement),this.contextMenuObj=new r.ContextMenu({target:"#"+this.pdfViewerBase.viewerContainer.id,items:this.copyContextMenu,beforeOpen:this.contextMenuOnBeforeOpen.bind(this),select:this.onMenuItemSelect.bind(this),created:this.contextMenuOnCreated.bind(this)}),this.pdfViewer.enableRtl&&(this.contextMenuObj.enableRtl=!0),this.contextMenuObj.appendTo(this.contextMenuElement),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.contextMenuObj.animationSettings.effect="ZoomIn":this.contextMenuObj.animationSettings.effect="SlideDown"},i.prototype.contextMenuOnCreated=function(e){var t=[this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context")];this.pdfViewer.annotationModule?this.pdfViewer.annotationModule.textMarkupAnnotationModule||this.contextMenuObj.enableItems(t,!1):this.contextMenuObj.enableItems(t,!1)},i.prototype.setTarget=function(e){var t=null;return e.event&&e.event.target&&(t=e.event.target,this.currentTarget=t),t},i.prototype.contextMenuOnBeforeOpen=function(e){var i=this.setTarget(e);if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus&&i&&"free-text-input"===i.className&&"TEXTAREA"===i.tagName&&(this.pdfViewerBase.isFreeTextContextMenu=!0),this.contextMenuObj.showItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Copy"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Scale Ratio"),this.pdfViewer.localeObj.getConstant("Comment"),this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.remove("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.remove("e-menu-hide"),this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Copy"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Delete Context")],!0),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.checkContextMenuDeleteItem(this.contextMenuObj),this.pdfViewer.textSelectionModule||this.pdfViewerBase.isShapeBasedAnnotationsEnabled()){if(e.event||this.pdfViewerBase.isTouchDesignerMode){var n=this.pdfViewerBase.isClickWithinSelectionBounds(e.event);if(this.pdfViewerBase.isFreeTextContextMenu)this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context"),this.pdfViewer.localeObj.getConstant("Properties"),this.pdfViewer.localeObj.getConstant("Comment"),this.pdfViewer.localeObj.getConstant("Scale Ratio"),this.pdfViewer.localeObj.getConstant("Delete Context")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.add("e-menu-hide"),this.pdfViewer.annotation.freeTextAnnotationModule&&this.pdfViewer.annotation.freeTextAnnotationModule.isTextSelected?(this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Copy")],!0),this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Cut")],!0)):(this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Copy")],!1),this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Cut")],!1),window.getSelection().removeAllRanges()),this.pdfViewer.annotation.freeTextAnnotationModule&&""!==this.pdfViewer.annotation.freeTextAnnotationModule.selectedText?this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Paste")],!0):this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Paste")],!1);else if(n&&this.pdfViewer.textSelectionModule)!e.event.target.classList.contains("e-pv-maintaincontent")&&e.event.target.classList.contains("e-pv-text")||e.event.target.classList.contains("e-pv-text-layer")?this.pdfViewerBase.checkIsNormalText()&&(e.cancel=!0):(t.Browser.isIE||"edge"===t.Browser.info.name)&&e.event.target.classList.contains("e-pv-page-container")&&(e.cancel=!0),this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Scale Ratio"),this.pdfViewer.localeObj.getConstant("Comment"),this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.add("e-menu-hide");else if(0===this.pdfViewer.selectedItems.annotations.length||"HandWrittenSignature"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"SignatureText"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"SignatureImage"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType)if(0!==this.pdfViewer.selectedItems.annotations.length&&"Path"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType)this.onOpeningForShape(!0);else if(0!==this.pdfViewer.selectedItems.formFields.length&&this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType&&this.pdfViewer.designerMode)this.onOpeningForShape(!0),t.isNullOrUndefined(this.pdfViewer.toolbar)||t.isNullOrUndefined(this.pdfViewer.toolbar.formDesignerToolbarModule)||this.pdfViewer.toolbar.formDesignerToolbarModule.showHideDeleteIcon(!0);else{var o=this.pdfViewerBase.designerModetarget;e.event&&e.event.target&&(o=e.event.target),this.pdfViewer.annotation&&this.pdfViewer.annotation.isShapeCopied&&(o.classList.contains("e-pv-text-layer")||o.classList.contains("e-pv-text"))&&!this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?this.onOpeningForShape(!1):this.pdfViewer.formDesigner&&this.pdfViewer.formDesigner.isShapeCopied&&(o.classList.contains("e-pv-text-layer")||o.classList.contains("e-pv-text"))?this.onOpeningForShape(!1):this.pdfViewerBase.isCalibrateAnnotationModule()&&this.pdfViewer.annotationModule.measureAnnotationModule.currentAnnotationMode?(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context"),this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.remove("e-menu-hide"),this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Copy"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Comment")],!1)):this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context"),this.pdfViewer.localeObj.getConstant("Properties"),this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Copy"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Scale Ratio")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.remove("e-menu-hide"),this.contextMenuObj.showItems([this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Comment")],!1)):e.cancel=!0}else this.onOpeningForShape(!1,!0)}else this.pdfViewer.textSelectionModule&&"MouseUp"===this.pdfViewer.contextMenuOption?(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Scale Ratio"),this.pdfViewer.localeObj.getConstant("Comment"),this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.add("e-menu-hide")):this.hideContextItems();this.enableCommentPanelItem()}else e.cancel=!0;"None"===this.pdfViewer.contextMenuOption?e.cancel=!0:this.contextMenuItems(e),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.restrictContextMenu()&&(e.cancel=!0),this.pdfViewerBase.isTouchDesignerMode=!1},i.prototype.contextMenuItems=function(t){if(this.pdfViewer.contextMenuSettings.contextMenuItems.length){for(var i=[],n=this.contextMenuObj.getRootElement(),o=0;o<this.pdfViewer.contextMenuSettings.contextMenuItems.length;o++)for(var s=0;s<this.copyContextMenu.length;s++){var a=this.copyContextMenu[s].text;switch(a){case"Highlight":a="Highlight context";break;case"Underline":a="Underline context";break;case"Strikethrough":a="Strikethrough context";break;case"Delete":a="Delete Context";break;case"Scale Ratio":a="Scale Ratio";break;case"Comment":this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.add("e-menu-hide");break;case"Properties":this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide")}var r=this.pdfViewer.localeObj.getConstant(a);if("Scale Ratio"===r&&(r="ScaleRatio"),0===o&&r!==e.ContextMenuItem[this.pdfViewer.contextMenuSettings.contextMenuItems[o]]&&("Strikethrough"===r&&(r="Strike through"),"ScaleRatio"===r&&(r="Scale Ratio"),i.push(r)),o>0&&r===e.ContextMenuItem[this.pdfViewer.contextMenuSettings.contextMenuItems[o]]){"Strikethrough"===r&&(r="Strike through"),"ScaleRatio"===r&&(r="Scale Ratio");for(var l=0;l<i.length;l++)i[l]===r&&i.splice(l,1)}}this.contextMenuObj.hideItems(i),0===this.getEnabledItemCount(n)&&(t.cancel=!0)}},i.prototype.getEnabledItemCount=function(e){for(var t=this.copyContextMenu.length,i=e.children,n=0;n<i.length;n++){var o=i[n];(o.classList.contains("e-menu-hide")||o.classList.contains("e-disabled"))&&(t-=1)}return t},i.prototype.hideContextItems=function(){0===this.pdfViewer.selectedItems.annotations.length&&(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Scale Ratio"),this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"))},i.prototype.enableCommentPanelItem=function(){this.pdfViewer.enableCommentPanel?this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Comment")],!0):this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Comment")],!1),0!=this.pdfViewer.selectedItems.formFields.length&&this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Comment")],!1)},i.prototype.onOpeningForShape=function(e,t){this.pdfViewer.annotation&&this.pdfViewer.annotation.isShapeCopied?this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Paste")],!0):this.pdfViewer.formDesigner&&this.pdfViewer.formDesigner.isShapeCopied?this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Paste")],!0):this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Paste")],!1),this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context"),this.pdfViewer.localeObj.getConstant("Scale Ratio")]),e?0===this.pdfViewer.selectedItems.annotations.length||"Line"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"LineWidthArrowHead"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Distance"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?0!==this.pdfViewer.selectedItems.formFields.length&&this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType?(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Comment")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.contextMenuObj.showItems([this.pdfViewer.localeObj.getConstant("Properties")])):(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide")):this.contextMenuObj.showItems([this.pdfViewer.localeObj.getConstant("Properties")]):t?(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Properties"),this.pdfViewer.localeObj.getConstant("Comment")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.add("e-menu-hide")):(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Copy"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Properties"),this.pdfViewer.localeObj.getConstant("Comment")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.add("e-menu-hide"))},i.prototype.OnItemSelected=function(e){this.pdfViewerBase.OnItemSelected(e)},i.prototype.onMenuItemSelect=function(e){this.pdfViewerBase.OnItemSelected(e.item.text)},i.prototype.destroy=function(){this.contextMenuObj&&(this.previousAction="",this.contextMenuObj.destroy())},i.prototype.close=function(){this.contextMenuObj.close()},i.prototype.open=function(e,t,i){this.contextMenuObj.open(e,t,i)},i}(),ti=function(){function e(e){this.type="POST",this.mode=!0,this.contentType="application/json;charset=UTF-8",this.pdfViewer=e,this.retryCount=e.retryCount}return e.prototype.send=function(e){var t=this;this.httpRequest=new XMLHttpRequest,this.mode?this.sendRequest(e):setTimeout(function(){t.sendRequest(e)}),this.httpRequest.onreadystatechange=function(){var i=!1,n=t.pdfViewer.viewerBase;n&&n.isPasswordAvailable&&""===n.passwordData&&(i=!0,t.retryCount=0),t.retryCount>0&&(i=t.resendRequest(t,e)),i||t.stateChange(t)},this.httpRequest.onerror=function(){t.error(t)}},e.prototype.resendRequest=function(e,t){var i=!1,n=e.httpRequest.status,o=n.toString().split("")[0];if(4===e.httpRequest.readyState&&200===n){var s=void 0;if((s=null!==this.responseType?e.httpRequest.response:e.httpRequest.responseText)&&"object"!=typeof s)try{s=JSON.parse(s)}catch(e){"Document stream does not exist in the cache"!==s&&"Document Reference pointer does not exist in the cache"!==s||(i=!0)}}return("5"===o||i)&&(i=!0,this.retryCount--,e.pdfViewer.fireAjaxRequestFailed(n,e.httpRequest.statusText,t.action,!0),e.send(t)),i},e.prototype.sendRequest=function(e){this.httpRequest.open(this.type,this.url,this.mode),this.httpRequest.withCredentials=this.pdfViewer.ajaxRequestSettings.withCredentials,this.httpRequest.setRequestHeader("Content-Type",this.contentType),e=this.addExtraData(e),this.setCustomAjaxHeaders(),null!==this.responseType&&(this.httpRequest.responseType=this.responseType),this.httpRequest.send(JSON.stringify(e))},e.prototype.addExtraData=function(e){return this.pdfViewer.viewerBase.ajaxData="",this.pdfViewer.fireAjaxRequestInitiate(e),this.pdfViewer.viewerBase.ajaxData&&""!==this.pdfViewer.viewerBase.ajaxData&&(e=this.pdfViewer.viewerBase.ajaxData),e},e.prototype.stateChange=function(e){var t=e.httpRequest.status,i=t.toString().split("")[0];if(4===e.httpRequest.readyState&&200===t){var n=void 0,o={name:"onSuccess",data:n=null!==this.responseType?e.httpRequest.response:e.httpRequest.responseText,readyState:e.httpRequest.readyState,status:e.httpRequest.status};e.successHandler(o)}else if(4===e.httpRequest.readyState&&("4"===i||"5"===i)){o={name:"onFailure",status:e.httpRequest.status,statusText:e.httpRequest.statusText};e.failureHandler(o)}},e.prototype.error=function(e){var t={name:"onError",status:this.httpRequest.status,statusText:this.httpRequest.statusText};e.errorHandler(t)},e.prototype.successHandler=function(e){return this.onSuccess&&this.onSuccess(e),e},e.prototype.failureHandler=function(e){return this.onFailure&&this.onFailure(e),e},e.prototype.errorHandler=function(e){return this.onError&&this.onError(e),e},e.prototype.setCustomAjaxHeaders=function(){for(var e=0;e<this.pdfViewer.ajaxRequestSettings.ajaxHeaders.length;e++)this.httpRequest.setRequestHeader(this.pdfViewer.ajaxRequestSettings.ajaxHeaders[e].headerName,this.pdfViewer.ajaxRequestSettings.ajaxHeaders[e].headerValue)},e}(),ii=function(){function e(e,t){var i=this;this.newObject=[],this.outputString="",this.signaturecollection=[],this.outputcollection=[],this.fontsign=[],this.signfontStyle=[],this.isSaveSignature=!1,this.saveSignatureString="",this.saveImageString="",this.signatureImageString="",this.maxSaveLimit=5,this.addStampImage=function(e){var t=e.target.files;if(null!==e.target.files[0]){var n=t[0];if("image"===n.type.split("/")[0]){var o=new FileReader;o.onload=function(e){var t=document.getElementById(i.pdfViewer.element.id+"_signatureuploadCanvas_"),n=t.getContext("2d"),o=new Image,s=i;o.onload=function(){document.getElementById(i.pdfViewer.element.id+"_e-pv-upload-button").style.visibility="hidden",n.drawImage(o,0,0,t.width,t.height),s.enableCreateButton(!1),s.outputString=o.src},o.src=e.currentTarget.result,s.outputString=e.currentTarget.result},o.readAsDataURL(n)}}},this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.createSignaturePanel=function(){var e=this;if(t.isBlazor()){var i=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_");if(i){if(!this.pdfViewerBase.pageContainer.querySelector(".e-pv-signature-window")){var n=this.pdfViewer.element.id,s=t.createElement("div",{id:n+"_signature_window",className:"e-pv-signature-window"});s.style.display="block",this.pdfViewerBase.pageContainer.appendChild(s)}i.addEventListener("mousedown",this.signaturePanelMouseDown.bind(this)),i.addEventListener("mousemove",this.signaturePanelMouseMove.bind(this)),i.addEventListener("mouseup",this.signaturePanelMouseUp.bind(this)),i.addEventListener("mouseleave",this.signaturePanelMouseUp.bind(this)),i.addEventListener("touchstart",this.signaturePanelMouseDown.bind(this)),i.addEventListener("touchmove",this.signaturePanelMouseMove.bind(this)),i.addEventListener("touchend",this.signaturePanelMouseUp.bind(this)),this.clearSignatureCanvas()}this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenSignaturePanel",this.pdfViewerBase.isToolbarSignClicked)}else{n=this.pdfViewer.element.id;(s=t.createElement("div",{id:n+"_signature_window",className:"e-pv-signature-window"})).style.display="block",this.pdfViewerBase.pageContainer.appendChild(s);var a=this.createSignatureCanvas(),r=void 0;r=this.pdfViewerBase.isToolbarSignClicked&&!this.pdfViewerBase.isInitialField?this.pdfViewer.localeObj.getConstant("Draw Signature"):this.pdfViewerBase.isInitialField?this.pdfViewer.localeObj.getConstant("Draw Initial"):this.pdfViewer.localeObj.getConstant("Draw Signature"),this.signatureDialog?this.signatureDialog.content=a:(this.signatureDialog=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:r,target:this.pdfViewer.element,content:a,width:"750px",visible:!0,allowDragging:!0,beforeClose:function(){e.clearSignatureCanvas(),e.signatureDialog.destroy(),e.signatureDialog=null,e.tabObj&&e.tabObj.destroy();var i=document.getElementById(e.pdfViewer.element.id+"_signature_window");i&&(i.parentNode?i.parentNode.removeChild(i):i.parentElement.removeChild(i)),e.pdfViewerBase.isToolbarSignClicked||e.pdfViewerBase.drawSignatureWithTool||t.isNullOrUndefined(e.pdfViewer.formFieldsModule.currentTarget)||e.pdfViewer.fireFocusOutFormField(e.pdfViewer.formFieldsModule.currentTarget.name,""),e.pdfViewerBase.isToolbarSignClicked=!1,e.pdfViewer.formFieldsModule.setFocus()}}),this.signatureDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Clear"),disabled:!0,cssClass:"e-pv-clearbtn"},click:this.clearSignatureCanvas.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.closeSignaturePanel.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Create"),isPrimary:!0,disabled:!0,cssClass:"e-pv-createbtn"},click:this.addSignatureInPage.bind(this)}],this.signatureDialog.appendTo(s),this.signaturetype="Draw"),this.pdfViewer.enableRtl&&(this.signatureDialog.enableRtl=this.pdfViewer.enableRtl)}this.drawSavedSignature()},e.prototype.drawSavedSignature=function(){if(!this.pdfViewerBase.isToolbarSignClicked&&this.isSaveSignature){this.outputString=this.saveSignatureString;var e=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_").getContext("2d"),t=new Image;t.onload=function(){e.drawImage(t,0,0)},t.src=this.signatureImageString;var i=document.getElementById(this.pdfViewer.element.id+"_signatureCheckBox");i&&(i.checked=!0),this.enableCreateButton(!1),this.enableClearbutton(!1)}},e.prototype.saveSignatureImage=function(){var e=document.getElementById(this.pdfViewer.element.id+"_signatureCheckBox");if(e&&e.checked){if(""!==this.outputString){this.isSaveSignature=!0,this.saveSignatureString=this.outputString;var t=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_");this.saveImageString=t.toDataURL(),this.signatureImageString=this.saveImageString}}else this.isSaveSignature&&(this.isSaveSignature=!1,this.saveSignatureString="",this.saveImageString="",this.signatureImageString=""),this.clearSignatureCanvas()},e.prototype.addSignature=function(e){var i;if(this.pdfViewerBase.isToolbarSignClicked){var n=this.pdfViewer.annotation.createGUID();this.pdfViewerBase.currentSignatureAnnot=null,this.pdfViewerBase.isSignatureAdded=!0;var o=this.pdfViewerBase.currentPageNumber-1,s=this.pdfViewer.handWrittenSignatureSettings.thickness?this.pdfViewer.handWrittenSignatureSettings.thickness:1,a=this.pdfViewer.handWrittenSignatureSettings.opacity?this.pdfViewer.handWrittenSignatureSettings.opacity:1,r=this.pdfViewer.handWrittenSignatureSettings.strokeColor?this.pdfViewer.handWrittenSignatureSettings.strokeColor:"#000000",l=this.pdfViewer.formFieldsModule.updateSignatureAspectRatio(this.outputString,!0),d=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_");this.saveImageString=d.toDataURL(),this.signatureImageString=this.saveImageString,i={id:"sign"+this.pdfViewerBase.signatureCount,bounds:l,pageIndex:o,data:this.outputString,shapeAnnotationType:"HandWrittenSignature",opacity:a,strokeColor:r,thickness:s,signatureName:n},this.pdfViewerBase.currentSignatureAnnot=i;u=void 0;(u=t.isBlazor()?document.getElementById(this.pdfViewer.element.id+"_signatureCheckBox"):document.getElementById("checkbox"))&&u.checked&&this.addSignatureCollection(),this.hideSignaturePanel(),this.pdfViewerBase.isToolbarSignClicked=!1}else{var u=void 0;u=t.isBlazor()?document.getElementById(this.pdfViewer.element.id+"_signatureCheckBox"):document.getElementById("checkbox");var M=!1;if(t.isBlazor()&&e&&("Image"===e[0]?(this.imageAddSignature(),M=!0):"Type"===e[0]&&(this.typeAddSignature(),M=!0)),!M){d=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_");this.saveImageString=d.toDataURL(),u.checked?(this.isSaveSignature=!0,this.saveSignatureString=this.outputString):(this.isSaveSignature=!1,this.saveSignatureString=""),this.signatureImageString=this.saveImageString,this.pdfViewer.formFieldsModule.drawSignature(null,null,this.pdfViewerBase.currentTarget,null),M=!0}}},e.prototype.addSignatureInPage=function(){"Draw"===this.signaturetype?this.addSignature():"Type"===this.signaturetype?this.typeAddSignature():this.imageAddSignature()},e.prototype.typeAddSignature=function(){if(this.pdfViewerBase.isToolbarSignClicked){var e=this.pdfViewerBase.getZoomFactor(),i=void 0,n=this.pdfViewer.annotation.createGUID();this.pdfViewerBase.currentSignatureAnnot=null,this.pdfViewerBase.isSignatureAdded=!0;var o=this.pdfViewerBase.currentPageNumber-1,s=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+o),a=0,r=0;a=(parseFloat(s.style.width)/2-100)/e,r=(parseFloat(s.style.height)/2-32.5)/e;var l=this.pdfViewerBase.getZoomFactor(),d=this.signtypevalue;i={id:"Typesign"+this.pdfViewerBase.signatureCount,bounds:{left:a/l,top:r/l,x:a/l,y:r/l,width:200,height:65},pageIndex:o,dynamicText:d,data:this.pdfViewerBase.signatureModule.outputString,shapeAnnotationType:"SignatureText",fontFamily:this.fontName,signatureName:n},this.pdfViewerBase.currentSignatureAnnot=i;var u=void 0;(u=t.isBlazor()?document.getElementById(this.pdfViewer.element.id+"_signatureCheckBox"):document.getElementById("checkbox1"))&&u.checked&&this.addSignatureCollection(),this.hideSignaturePanel(),this.pdfViewerBase.isToolbarSignClicked=!1}else this.pdfViewer.formFieldsModule.drawSignature("Type","",this.pdfViewerBase.currentTarget),this.hideSignaturePanel()},e.prototype.imageAddSignature=function(){if(this.pdfViewerBase.isToolbarSignClicked){var e=this.pdfViewerBase.getZoomFactor(),i=void 0,n=this.pdfViewer.annotation.createGUID();this.pdfViewerBase.currentSignatureAnnot=null,this.pdfViewerBase.isSignatureAdded=!0;var o=this.pdfViewerBase.currentPageNumber-1,s=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+o),a=0,r=0;a=(parseFloat(s.style.width)/2-100)/e,r=(parseFloat(s.style.height)/2-32.5)/e;var l=this.pdfViewerBase.getZoomFactor(),d=this.signtypevalue;i={id:"Typesign"+this.pdfViewerBase.signatureCount,bounds:{left:a/l,top:r/l,x:a/l,y:r/l,width:200,height:65},pageIndex:o,dynamicText:d,data:this.pdfViewerBase.signatureModule.outputString,shapeAnnotationType:"SignatureImage",fontFamily:this.fontName,signatureName:n},this.pdfViewerBase.currentSignatureAnnot=i;var u=void 0;(u=t.isBlazor()?document.getElementById(this.pdfViewer.element.id+"_signatureCheckBox"):document.getElementById("checkbox2"))&&u.checked&&this.addSignatureCollection(),this.hideSignaturePanel(),this.pdfViewerBase.isToolbarSignClicked=!1}else this.pdfViewer.formFieldsModule.drawSignature("Image","",this.pdfViewerBase.currentTarget),this.hideSignaturePanel()},e.prototype.hideSignaturePanel=function(){this.signatureDialog&&this.signatureDialog.hide()},e.prototype.bindTypeSignatureClickEvent=function(){if(t.isBlazor())for(var e=0;e<4;e++){var i=document.querySelector("#"+this.pdfViewer.element.id+"_font_signature"+e);i&&i.addEventListener("click",this.typeSignatureclicked.bind(this))}},e.prototype.bindDrawSignatureClickEvent=function(){var e=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_");e&&(e.addEventListener("mousedown",this.signaturePanelMouseDown.bind(this)),e.addEventListener("mousemove",this.signaturePanelMouseMove.bind(this)),e.addEventListener("mouseup",this.signaturePanelMouseUp.bind(this)),e.addEventListener("mouseleave",this.signaturePanelMouseUp.bind(this)),e.addEventListener("touchstart",this.signaturePanelMouseDown.bind(this)),e.addEventListener("touchmove",this.signaturePanelMouseMove.bind(this)),e.addEventListener("touchend",this.signaturePanelMouseUp.bind(this)))},e.prototype.typeSignatureclicked=function(e){var t=e.target;if(t){for(var i=0;i<4;i++){var n=document.querySelector("#"+this.pdfViewer.element.id+"_font_signature"+i);n&&(n.style.borderColor="")}t.style.borderColor="red",this.outputString=t.textContent;try{this.fontName=JSON.parse(t.style.fontFamily)}catch(e){this.fontName=t.style.fontFamily}this.enableCreateButton(!1)}},e.prototype.createSignatureCanvas=function(){var e=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_"),i=document.getElementById(this.pdfViewer.element.id+"Signature_appearance");e&&e.remove(),i&&i.remove();var o=t.createElement("div",{id:this.pdfViewer.element.id+"Signature_appearance",className:"e-pv-signature-apperance"}),s=t.createElement("canvas",{id:this.pdfViewer.element.id+"_signatureCanvas_",className:"e-pv-signature-canvas"});this.pdfViewer.element.offsetWidth>750?(s.width=715,s.style.width="715px"):(s.width=this.pdfViewer.element.offsetWidth-35,s.style.width=s.width+"px"),s.height=335,s.style.height="335px",s.style.border="1px dotted #bdbdbd",s.style.backgroundColor="white",s.style.boxSizing="border-box",s.style.borderRadius="2px",s.addEventListener("mousedown",this.signaturePanelMouseDown.bind(this)),s.addEventListener("mousemove",this.signaturePanelMouseMove.bind(this)),s.addEventListener("mouseup",this.signaturePanelMouseUp.bind(this)),s.addEventListener("mouseleave",this.signaturePanelMouseUp.bind(this)),s.addEventListener("touchstart",this.signaturePanelMouseDown.bind(this)),s.addEventListener("touchmove",this.signaturePanelMouseMove.bind(this)),s.addEventListener("touchend",this.signaturePanelMouseUp.bind(this)),o.appendChild(s);var a,l,u;u=this.pdfViewerBase.isToolbarSignClicked&&!this.pdfViewerBase.isInitialField?this.pdfViewer.localeObj.getConstant("Save Signature"):this.pdfViewerBase.isInitialField?this.pdfViewer.localeObj.getConstant("Save Initial"):this.pdfViewer.localeObj.getConstant("Save Signature"),this.pdfViewer.hideSaveSignature||((l=document.createElement("input")).type="checkbox",l.id="checkbox",o.appendChild(l),(a=new d.CheckBox({label:u,disabled:!1,checked:!1})).appendTo(l)),this.isSaveSignature&&(a.checked=!0);var M=t.createElement("div",{id:this.pdfViewer.element.id+"type_appearance",className:"e-pv-signature-apperance"}),p=document.createElement("input");p.type="text",p.id=this.pdfViewer.element.id+"_e-pv-Signtext-box",M.appendChild(p),new n.TextBox({placeholder:this.pdfViewer.localeObj.getConstant("Enter Signature as Name"),floatLabelType:"Auto"}).appendTo(p);var h=t.createElement("div",{id:this.pdfViewer.element.id+"_font_appearance"});h.style.width="715px",h.style.height="270px",h.style.border="1px dotted #bdbdbd",h.style.boxSizing="border-box",h.style.borderRadius="2px",h.style.backgroundColor="white",M.appendChild(h),(l=document.createElement("input")).type="checkbox",l.id="checkbox1",M.appendChild(l),(a=new d.CheckBox({label:u,disabled:!1,checked:!1})).appendTo(l);var L=t.createElement("div",{id:this.pdfViewer.element.id+"Signature_tab"}),w=t.createElement("div",{id:this.pdfViewer.element.id+"upload_appearance",className:"e-pv-signature-apperance"});w.style.backgroundColor="white";var c=document.createElement("div");c.id=this.pdfViewer.element.id+"_e-pv-upload-button",w.appendChild(c);var C=new d.Button({cssClass:"e-pv-sign-upload",content:this.pdfViewer.localeObj.getConstant("Browse Signature Image")});C.appendTo(c),C.element.style.position="absolute";var g=t.createElement("canvas",{id:this.pdfViewer.element.id+"_signatureuploadCanvas_",className:"e-pv-signature-uploadcanvas"});this.pdfViewer.element.offsetWidth>750?(g.width=715,g.style.width="715px"):(g.width=this.pdfViewer.element.offsetWidth-35,g.style.width=s.width+"px"),g.height=335,g.style.height="335px",C.element.style.left=parseFloat(g.style.width)/2-50+"px",C.element.style.top=parseFloat(g.style.height)/2-10+"px",g.style.border="1px dotted #bdbdbd",g.style.backgroundColor="white",g.style.boxSizing="border-box",g.style.borderRadius="2px",g.style.zIndex="0",w.appendChild(g),(l=document.createElement("input")).type="checkbox",l.id="checkbox2",w.appendChild(l),(a=new d.CheckBox({label:u,disabled:!1,checked:!1})).appendTo(l),this.signfontStyle=[{FontName:"Helvetica"},{FontName:"Times New Roman"},{FontName:"Courier"},{FontName:"Symbol"}];var m=[];if(!t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.typeSignatureFonts))for(var f=0;f<4;f++)t.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.typeSignatureFonts[f])||(this.signfontStyle[f].FontName=this.pdfViewer.handWrittenSignatureSettings.typeSignatureFonts[f]);for(var y=0;y<this.signfontStyle.length;y++)m[y]=document.createElement("div"),m[y].id="_font_signature"+y,m[y].classList.add("e-pv-font-sign");this.fontsign=m;var j=this;return this.tabObj=new r.Tab({selected:function(e){j.handleSelectEvent(e)},items:[{header:{text:this.pdfViewer.localeObj.getConstant("Draw-hand Signature")},content:o},{header:{text:this.pdfViewer.localeObj.getConstant("Type Signature")},content:M},{header:{text:this.pdfViewer.localeObj.getConstant("Upload Signature")},content:w}]}),this.tabObj.appendTo(L),L},e.prototype.handleSelectEvent=function(e){var t=document.getElementById("checkbox");if(t&&t.checked){if(0===e.previousIndex&&""!==this.outputString){this.isSaveSignature=!0,this.saveSignatureString=this.outputString;var i=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_");this.saveImageString=i.toDataURL(),this.signatureImageString=this.saveImageString}}else this.isSaveSignature&&(this.isSaveSignature=!1,this.saveSignatureString="",this.saveImageString="",this.signatureImageString=""),this.clearSignatureCanvas();0===e.selectedIndex?(this.signaturetype="Draw",this.isSaveSignature&&this.enableCreateButton(!1)):1===e.selectedIndex?(this.signaturetype="Type",document.getElementById(this.pdfViewer.element.id+"_e-pv-Signtext-box").addEventListener("input",this.renderSignatureText.bind(this)),this.enableCreateButton(!0)):2===e.selectedIndex&&(this.signaturetype="Image",this.enableCreateButton(!0),document.getElementById(this.pdfViewer.element.id+"_e-pv-upload-button").addEventListener("click",this.uploadSignatureImage.bind(this)))},e.prototype.createSignatureFileElement=function(){var e=t.createElement("input",{id:this.pdfViewer.element.id+"_signElement",attrs:{type:"file"}});e.setAttribute("accept",".jpg,.jpeg"),e.style.position="absolute",e.style.left="0px",e.style.top="0px",e.style.visibility="hidden",document.body.appendChild(e),e.addEventListener("change",this.addStampImage)},e.prototype.uploadSignatureImage=function(){var e=document.getElementById(this.pdfViewer.element.id+"_signElement");e&&e.click()},e.prototype.renderSignatureText=function(){for(var e=document.getElementById(this.pdfViewer.element.id+"_font_appearance"),t=document.getElementById(this.pdfViewer.element.id+"_e-pv-Signtext-box"),i=0;i<this.signfontStyle.length;i++)this.fontsign[i].innerHTML=t.value,this.fontsign[i].style.fontFamily=this.signfontStyle[i].FontName,e.appendChild(this.fontsign[i]);for(i=0;i<this.signfontStyle.length;i++)document.getElementById("_font_signature"+i).addEventListener("click",this.typeSignatureclick.bind(this));this.enableClearbutton(!1)},e.prototype.typeSignatureclick=function(){var e=event.target;document.getElementsByClassName("e-pv-createbtn")[0].disabled=!1;for(var t=0;t<4;t++){var i=document.getElementById("_font_signature"+t);i&&(i.style.borderColor="")}e.style.borderColor="red",this.outputString=e.textContent;try{this.fontName=JSON.parse(e.style.fontFamily)}catch(t){this.fontName=e.style.fontFamily}},e.prototype.addSignatureCollection=function(e,t){var n,o=-1,s=-1,a=-1,r=-1,l=i.processPathData(this.outputString),d=document.createElement("canvas"),u=d.getContext("2d"),M=this.pdfViewerBase.currentSignatureAnnot.shapeAnnotationType;if("HandWrittenSignature"===M){if(0!==l.length){for(var p=0;p<l.length;p++){var h=l[p];if(-1===o)o=h.x,a=h.x,s=h.y,r=h.y;else{var L=h.x,w=h.y;o>=L&&(o=L),s>=w&&(s=w),a<=L&&(a=L),r<=w&&(r=w)}}var c=a-o,C=r-s,g=c/100,m=C/100,f=0,y=0;e?(d.width=t.currentWidth,d.height=t.currentHeight,g=c/e.width,m=C/e.height,f=e.x-t.currentLeft,y=e.y-t.currentTop):(d.width=100,d.height=100),u.beginPath();for(var j=0;j<l.length;j++){var L=((h=l[j]).x-o)/g+f,w=(h.y-s)/m+y;"M"===h.command?u.moveTo(L,w):"L"===h.command&&u.lineTo(L,w)}u.stroke(),u.closePath(),n=d.toDataURL()}}else n=this.outputString;if(e)this.saveImageString=n;else{var S={};S["sign_"+this.pdfViewerBase.imageCount]=this.outputString,this.outputcollection.push(S);var A=[];A.push({id:"sign_"+this.pdfViewerBase.imageCount,imageData:n,signatureType:M,fontFamily:this.pdfViewerBase.currentSignatureAnnot.fontFamily}),this.signaturecollection.push({image:A,isInitial:this.pdfViewerBase.isInitialField}),this.pdfViewerBase.imageCount++}},e.prototype.getSaveLimit=function(e){return e>this.maxSaveLimit?e=this.maxSaveLimit:e<1&&(e=1),e},e.prototype.RenderSavedSignature=function(){this.pdfViewerBase.signatureCount++;var e,t=this.pdfViewerBase.getZoomFactor();if(this.pdfViewerBase.isAddedSignClicked){var i=this.pdfViewer.annotation.createGUID();this.pdfViewerBase.currentSignatureAnnot=null,this.pdfViewerBase.isSignatureAdded=!0;var n=this.pdfViewerBase.currentPageNumber-1,o=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+n),s=0,a=0,r=this.pdfViewer.handWrittenSignatureSettings.width?this.pdfViewer.handWrittenSignatureSettings.width:100,l=this.pdfViewer.handWrittenSignatureSettings.height?this.pdfViewer.handWrittenSignatureSettings.height:100,d=this.pdfViewer.handWrittenSignatureSettings.thickness?this.pdfViewer.handWrittenSignatureSettings.thickness:1,u=this.pdfViewer.handWrittenSignatureSettings.opacity?this.pdfViewer.handWrittenSignatureSettings.opacity:1,M=this.pdfViewer.handWrittenSignatureSettings.strokeColor?this.pdfViewer.handWrittenSignatureSettings.strokeColor:"#000000";s=(parseFloat(o.style.width)/2-r/2)/t,a=(parseFloat(o.style.height)/2-l/2)/t;for(var p="",h=void 0,L=void 0,w=0;w<this.outputcollection.length;w++){var c=this.outputcollection[w];if((g=event.target)&&g.id==="sign_"+w||g&&g.id==="sign_border"+w){p=c["sign_"+w];break}}for(var C=0;C<this.signaturecollection.length;C++){var g=event.target,m=this.signaturecollection[C].image[0].id.split("_")[1];if(g&&g.id==="sign_"+m||g&&g.id==="sign_border"+m){h=this.signaturecollection[C].image[0].signatureType,L=this.signaturecollection[C].image[0].fontFamily;break}}if("HandWrittenSignature"===h){var f=this.pdfViewer.formFieldsModule.updateSignatureAspectRatio(p,!0);r=f.width?f.width:r,l=f.height?f.height:l}else r=150===r?200:this.pdfViewer.handWrittenSignatureSettings.width,l=100===l?65:this.pdfViewer.handWrittenSignatureSettings.height;e={id:"sign"+this.pdfViewerBase.signatureCount,bounds:{x:s,y:a,width:r,height:l},pageIndex:n,data:p,shapeAnnotationType:h,opacity:u,fontFamily:L,strokeColor:M,thickness:d,signatureName:i},this.pdfViewerBase.currentSignatureAnnot=e,this.pdfViewerBase.isAddedSignClicked=!1}else this.pdfViewer.formFieldsModule.drawSignature()},e.prototype.updateCanvasSize=function(){var e=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_");e&&this.signatureDialog&&this.signatureDialog.visible&&(this.pdfViewer.element.offsetWidth>750?(e.width=715,e.style.width="715px"):(e.width=this.pdfViewer.element.offsetWidth-35,e.style.width=e.width+"px"))},e.prototype.signaturePanelMouseDown=function(e){"contextmenu"!==e.type&&(e.preventDefault(),this.findMousePosition(e),this.mouseDetection=!0,this.oldX=this.mouseX,this.oldY=this.mouseY,this.newObject=[],this.drawMousePosition(e))},e.prototype.enableCreateButton=function(e){var t=document.getElementsByClassName("e-pv-createbtn")[0];t&&(t.disabled=e),this.enableClearbutton(e)},e.prototype.enableClearbutton=function(e){var t=document.getElementsByClassName("e-pv-clearbtn")[0];t&&(t.disabled=e)},e.prototype.signaturePanelMouseMove=function(e){this.mouseDetection&&(this.findMousePosition(e),this.enableCreateButton(!1),this.drawMousePosition(e))},e.prototype.findMousePosition=function(e){if(-1!==e.type.indexOf("touch")){var t=(e=e).target.getBoundingClientRect();this.mouseX=e.touches[0].pageX-t.left,this.mouseY=e.touches[0].pageY-t.top}else e=e,this.mouseX=e.offsetX,this.mouseY=e.offsetY},e.prototype.drawMousePosition=function(e){this.mouseDetection&&(this.drawSignatureInCanvas(),this.oldX=this.mouseX,this.oldY=this.mouseY)},e.prototype.drawSignatureInCanvas=function(){var e=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_").getContext("2d");e.beginPath(),e.moveTo(this.oldX,this.oldY),e.lineTo(this.mouseX,this.mouseY),e.stroke(),e.lineWidth=2,e.arc(this.oldX,this.oldY,1,0,2*Math.PI,!0),e.closePath(),this.newObject.push(this.mouseX,this.mouseY)},e.prototype.signaturePanelMouseUp=function(){this.mouseDetection&&this.convertToPath(this.newObject),this.mouseDetection=!1},e.prototype.convertToPath=function(e){this.movePath(e[0],e[1]),this.linePath(e[0],e[1]);for(var t=2;t<e.length;t+=2)this.linePath(e[t],e[t+1])},e.prototype.linePath=function(e,t){this.outputString+="L"+e+","+t+" "},e.prototype.movePath=function(e,t){this.outputString+="M"+e+","+t+" "},e.prototype.clearSignatureCanvas=function(){this.outputString="",this.newObject=[];var e=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_");e&&(n=e.getContext("2d")).clearRect(0,0,e.width,e.height);var i=document.getElementById(this.pdfViewer.element.id+"_signatureuploadCanvas_");if(i){var n=i.getContext("2d");n.clearRect(0,0,i.width,i.height);var o=document.getElementById(this.pdfViewer.element.id+"_e-pv-upload-button");o&&(o.style.visibility="")}var s=document.getElementById(this.pdfViewer.element.id+"_font_appearance"),a=document.getElementById(this.pdfViewer.element.id+"_e-pv-Signtext-box");s&&a&&(a.value="",t.isBlazor()||(s.innerHTML="")),this.enableCreateButton(!0)},e.prototype.closeSignaturePanel=function(){this.pdfViewerBase.currentTarget&&(this.pdfViewerBase.drawSignatureWithTool=!0),this.clearSignatureCanvas(),t.isBlazor()||this.signatureDialog.hide(),this.pdfViewerBase.isToolbarSignClicked=!1,this.pdfViewerBase.drawSignatureWithTool=!1},e.prototype.saveSignature=function(){for(var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_sign"),n=new Array,o=0;o<this.pdfViewerBase.pageCount;o++)n[o]=[];if(e)for(var s=JSON.parse(e),a=0;a<s.length;a++){var r=[],l=s[a];if(l){for(var d=0;l.annotations.length>d;d++){var u=l.annotations[d].strokeColor;if(l.annotations[d].strokeColor=JSON.stringify(this.getRgbCode(u)),l.annotations[d].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(l.annotations[d].bounds,l.pageIndex)),"HandWrittenSignature"===l.annotations[d].shapeAnnotationType){var M=i.processPathData(l.annotations[d].data),p=i.splitArrayCollection(M);l.annotations[d].data=JSON.stringify(p)}else if("SignatureText"!==l.annotations[d].shapeAnnotationType||this.checkDefaultFont(l.annotations[d].fontFamily))l.annotations[d].data=JSON.stringify(l.annotations[d].data);else{var h=t.createElement("canvas");h.width=150,h.height=2*l.annotations[d].fontSize;var L=h.getContext("2d"),w=h.width/2,c=h.height/2-10;L.textAlign="center",L.font=l.annotations[d].fontSize+"px "+l.annotations[d].fontFamily,L.fillText(l.annotations[d].data,w,c),l.annotations[d].data=JSON.stringify(h.toDataURL("image/png")),l.annotations[d].shapeAnnotationType="SignatureImage"}}r=l.annotations}n[l.pageIndex]=r}return JSON.stringify(n)},e.prototype.checkDefaultFont=function(e){return"Helvetica"===e||"Times New Roman"===e||"Courier"===e||"Symbol"===e},e.prototype.getRgbCode=function(e){e.match(/#([a-z0-9]+)/gi)||e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(e=this.pdfViewer.annotationModule.nameToHash(e));var i=e.split(",");return t.isNullOrUndefined(i[1])&&(i=(e=this.pdfViewer.annotationModule.getValue(e,"rgba")).split(",")),{r:parseInt(i[0].split("(")[1]),g:parseInt(i[1]),b:parseInt(i[2]),a:parseInt(i[3])}},e.prototype.renderSignature=function(e,t){var i,n=this.pdfViewerBase.currentSignatureAnnot,o=this.pdfViewer.annotation.createGUID();if(n){i={id:n.id,bounds:{x:e,y:t,width:n.bounds.width,height:n.bounds.height},pageIndex:n.pageIndex,data:n.data,shapeAnnotationType:"HandWrittenSignature",opacity:n.opacity,strokeColor:n.strokeColor,thickness:n.thickness,signatureName:o},this.pdfViewer.add(i);var s=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+n.pageIndex);this.pdfViewer.renderDrawing(s,n.pageIndex),this.pdfViewerBase.signatureAdded=!0,this.pdfViewer.fireSignatureAdd(n.pageIndex,n.signatureName,n.shapeAnnotationType,n.bounds,n.opacity,n.strokeColor,n.thickness),this.storeSignatureData(n.pageIndex,i),this.pdfViewerBase.currentSignatureAnnot=null,this.pdfViewerBase.signatureCount++}},e.prototype.renderExistingSignature=function(e,t,n){for(var o,s=0;s<e.length;s++){var a=e[s];if(a){var r=a.Bounds,l=r.X,d=r.Y,u=r.Width,M=r.Height,p=a.PathData;n&&(p=a.IsSignature?a.PathData:"SignatureImage"===a.AnnotationType||"SignatureText"===a.AnnotationType?JSON.parse(a.PathData):p.includes("command")?i.getPathString(JSON.parse(a.PathData)):a.PathData),o="SignatureText"===a.AnnotationType?{id:"sign"+this.pdfViewerBase.signatureCount,bounds:{x:l,y:d,width:u,height:M},pageIndex:t,data:p,fontFamily:a.FontFamily,fontSize:a.FontSize,shapeAnnotationType:"SignatureText",opacity:a.Opacity,strokeColor:a.StrokeColor,thickness:a.Thickness,signatureName:a.SignatureName}:"SignatureImage"===a.AnnotationType?{id:"sign"+this.pdfViewerBase.signatureCount,bounds:{x:l,y:d,width:u,height:M},pageIndex:t,data:p,shapeAnnotationType:"SignatureImage",opacity:a.Opacity,strokeColor:a.StrokeColor,thickness:a.Thickness,signatureName:a.SignatureName}:{id:"sign"+this.pdfViewerBase.signatureCount,bounds:{x:l,y:d,width:u,height:M},pageIndex:t,data:p,shapeAnnotationType:"HandWrittenSignature",opacity:a.Opacity,strokeColor:a.StrokeColor,thickness:a.Thickness,signatureName:a.SignatureName},this.pdfViewer.add(o);var h=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+a.pageIndex);this.pdfViewer.renderDrawing(h,o.pageIndex),this.storeSignatureData(o.pageIndex,o),this.pdfViewerBase.currentSignatureAnnot=null,this.pdfViewerBase.signatureCount++,this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.annotationMenuObj&&this.pdfViewer.isSignatureEditable&&(this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export Annotations")],!0),this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export XFDF")],!0))}}},e.prototype.storeSignatureData=function(e,t){this.pdfViewer.annotation.addAction(t.pageIndex,null,t,"Addition","",t,t);var i=null,n=t.bounds.left?t.bounds.left:t.bounds.x,o=t.bounds.top?t.bounds.top:t.bounds.y;t.wrapper&&t.wrapper.bounds&&(n=t.wrapper.bounds.left,o=t.wrapper.bounds.top),i={id:t.id,bounds:{left:n,top:o,width:t.bounds.width,height:t.bounds.height},shapeAnnotationType:t.shapeAnnotationType,opacity:t.opacity,thickness:t.thickness,strokeColor:t.strokeColor,pageIndex:t.pageIndex,data:t.data,fontSize:t.fontSize,fontFamily:t.fontFamily,signatureName:t.signatureName};var s=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_sign");if(s){this.storeSignatureCollections(i,e);var a=JSON.parse(s);window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_sign");var r=this.pdfViewer.annotationModule.getPageCollection(a,e);if(a[r])a[r].annotations.push(i),a[r].annotations.indexOf(i);else{var l={pageIndex:e,annotations:[]};l.annotations.push(i),l.annotations.indexOf(i),a.push(l)}M=JSON.stringify(a);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_sign",M)}else{this.storeSignatureCollections(i,e);var d={pageIndex:e,annotations:[]};d.annotations.push(i),d.annotations.indexOf(i);var u=[];u.push(d);var M=JSON.stringify(u);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_sign",M)}},e.prototype.modifySignatureCollection=function(e,t,i,n){this.pdfViewer.isDocumentEdited=!0;var o=null,s=this.getAnnotations(t,null);if(null!=s&&i){for(var a=0;a<s.length;a++)if(i.id===s[a].id){if("bounds"===e)s[a].bounds={left:i.wrapper.bounds.left,top:i.wrapper.bounds.top,width:i.bounds.width,height:i.bounds.height},s[a].fontSize=i.fontSize;else if("stroke"===e)s[a].strokeColor=i.wrapper.children[0].style.strokeColor;else if("opacity"===e)s[a].opacity=i.wrapper.children[0].style.opacity;else if("thickness"===e)s[a].thickness=i.wrapper.children[0].style.strokeWidth;else if("delete"===e){this.updateSignatureCollection(s[a]),o=s.splice(a,1)[0];break}if(e&&"delete"!==e&&this.storeSignatureCollections(s[a],t),n){s[a].opacity=i.wrapper.children[0].style.opacity,s[a].strokeColor=i.wrapper.children[0].style.strokeColor,s[a].thickness=i.wrapper.children[0].style.strokeWidth,this.storeSignatureCollections(s[a],t);break}}this.manageAnnotations(s,t)}return o},e.prototype.storeSignatureCollections=function(e,t){var i=this.checkSignatureCollection(e),n=m(e);n.annotationId=e.signatureName,n.pageNumber=t,delete n.annotName,e.id&&(n.uniqueKey=e.id,delete n.id),i.isExisting?this.pdfViewer.signatureCollection.splice(i.position,0,n):this.pdfViewer.signatureCollection.push(n)},e.prototype.checkSignatureCollection=function(e){var t=this.pdfViewer.signatureCollection;if(t&&e)for(var i=0;i<t.length;i++)if(t[i].annotationId===e.signatureName)return this.pdfViewer.signatureCollection.splice(i,1),{isExisting:!0,position:i};return{isExisting:!1,position:null}},e.prototype.updateSignatureCollection=function(e){var t=this.pdfViewer.signatureCollection;if(t&&e)for(var i=0;i<t.length;i++)if(t[i].annotationId===e.signatureName){this.pdfViewer.signatureCollection.splice(i,1);break}},e.prototype.addInCollection=function(e,t){if(t){this.storeSignatureCollections(t,e);var i=this.getAnnotations(e,null);i&&i.push(t),this.manageAnnotations(i,e)}},e.prototype.getAnnotations=function(e,t){var i,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_sign");if(n){var o=JSON.parse(n),s=this.pdfViewer.annotationModule.getPageCollection(o,e);i=o[s]?o[s].annotations:t}else i=t;return i},e.prototype.manageAnnotations=function(e,t){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_sign");if(i){var n=JSON.parse(i);window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_sign");var o=this.pdfViewer.annotationModule.getPageCollection(n,t);n[o]&&(n[o].annotations=e);var s=JSON.stringify(n);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_sign",s)}},e.prototype.showSignatureDialog=function(e){e&&this.createSignaturePanel()},e.prototype.setAnnotationMode=function(){this.pdfViewerBase.isToolbarSignClicked=!0,this.showSignatureDialog(!0)},e.prototype.setInitialMode=function(){this.pdfViewerBase.isToolbarSignClicked=!0,this.pdfViewerBase.isInitialField=!0,this.showSignatureDialog(!0)},e.prototype.ConvertPointToPixel=function(e){return e*(96/72)},e.prototype.updateSignatureCollections=function(e,t,n){if(e){var o=e.Bounds,s=o.X,a=o.Y,r=o.Width,l=o.Height,d=e.PathData;return n&&(d=i.getPathString(JSON.parse(e.PathData))),{id:"sign"+e.SignatureName,bounds:{x:s,y:a,width:r,height:l},pageIndex:t,data:d,shapeAnnotationType:"HandWrittenSignature",opacity:e.Opacity,strokeColor:e.StrokeColor,thickness:e.Thickness,signatureName:e.SignatureName}}},e.prototype.destroy=function(){window.sessionStorage.removeItem("_annotations_sign");var e=document.getElementById(this.pdfViewer.element.id+"_signElement");e&&e.parentElement.removeChild(e)},e}(),ni=function(){function e(e,t){this.zoomFactor=1,this.previousZoomFactor=1,this.scrollWidth=25,this.zoomPercentages=[10,25,50,75,100,125,150,200,400],this.isNotPredefinedZoom=!1,this.pinchStep=.02,this.reRenderPageNumber=0,this.magnifyPageRerenderTimer=null,this.rerenderOnScrollTimer=null,this.rerenderInterval=null,this.touchCenterX=0,this.touchCenterY=0,this.pageRerenderCount=0,this.imageObjects=[],this.topValue=0,this.isTapToFitZoom=!1,this.fitType=null,this.isPinchZoomed=!1,this.isPagePinchZoomed=!1,this.isRerenderCanvasCreated=!1,this.isMagnified=!1,this.isPagesZoomed=!1,this.isPinchScrolled=!1,this.isAutoZoom=!1,this.isWebkitMobile=!1,this.isFitToPageMode=!0,this.pdfViewer=e,this.pdfViewerBase=t,this.zoomLevel=2,this.isWebkitMobile=/Chrome/.test(navigator.userAgent)||/Google Inc/.test(navigator.vendor)||-1!==navigator.userAgent.indexOf("Safari")}return e.prototype.zoomTo=function(e){e<10?e=10:e>400&&(e=400),this.fitType=null,this.isNotPredefinedZoom=!1,this.isAutoZoom&&this.isInitialLoading?this.pdfViewerBase.onWindowResize():(this.isAutoZoom=!1,this.onZoomChanged(e)),this.isInitialLoading=!1},e.prototype.zoomIn=function(){(this.fitType||this.isNotPredefinedZoom)&&(this.zoomLevel=this.lowerZoomLevel,this.fitType=null),this.isNotPredefinedZoom=!1,this.zoomLevel>=8?this.zoomLevel=8:this.zoomLevel++,this.isAutoZoom=!1,this.onZoomChanged(this.zoomPercentages[this.zoomLevel])},e.prototype.zoomOut=function(){(this.fitType||this.isNotPredefinedZoom)&&(this.zoomLevel=this.higherZoomLevel,this.fitType=null),this.isNotPredefinedZoom=!1,this.zoomLevel<=0?this.zoomLevel=0:this.zoomLevel--,this.isAutoZoom=!1,this.onZoomChanged(this.zoomPercentages[this.zoomLevel])},e.prototype.fitToWidth=function(){this.isAutoZoom=!1;var e=this.calculateFitZoomFactor("fitToWidth");this.onZoomChanged(e)},e.prototype.fitToAuto=function(){this.isAutoZoom=!0;var e=this.calculateFitZoomFactor("fitToWidth");this.onZoomChanged(e)},e.prototype.fitToPage=function(){var e=this.calculateFitZoomFactor("fitToPage");null!==e&&(this.isAutoZoom=!1,this.onZoomChanged(e),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.isWebkitMobile?this.pdfViewerBase.viewerContainer.style.overflowY="auto":this.pdfViewerBase.viewerContainer.style.overflowY="hidden":this.pdfViewerBase.viewerContainer.style.overflowY="auto",this.pdfViewerBase.viewerContainer.scrollTop=this.pdfViewerBase.pageSize[this.pdfViewerBase.currentPageNumber-1].top*this.zoomFactor)},e.prototype.calculateFitZoomFactor=function(e){var t=this.pdfViewerBase.viewerContainer.getBoundingClientRect().width,i=this.pdfViewerBase.viewerContainer.getBoundingClientRect().height;if(0===t&&0===i&&(t=parseFloat(this.pdfViewer.width.toString()),i=parseFloat(this.pdfViewer.height.toString())),isNaN(i)||isNaN(t))return null;if(this.fitType=e,"fitToWidth"===this.fitType){n=(t-this.scrollWidth)/this.pdfViewerBase.highestWidth;return this.isAutoZoom&&(this.fitType=null,1===(n=Math.min(1,n))&&(this.zoomLevel=2)),parseInt((100*n).toString())}this.isFitToPageMode=!0;var n=(t-this.scrollWidth-10)/this.pdfViewerBase.highestWidth,o=i/this.pdfViewerBase.highestHeight;return o>n&&(o=n,this.isFitToPageMode=!1),parseInt((100*o).toString())},e.prototype.pinchIn=function(){this.fitType=null;var e=this.zoomFactor-this.pinchStep;if(e<4&&e>2&&(e=this.zoomFactor-this.pinchStep),e<.1&&(e=.1),this.isPinchZoomed=!0,this.onZoomChanged(100*e),this.isTapToFitZoom=!0,t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&100*this.zoomFactor==50){var i=this.calculateFitZoomFactor("fitToWidth");this.fitType=null,i<=50&&this.fitToWidth()}},e.prototype.pinchOut=function(){this.fitType=null;var e=this.zoomFactor+this.pinchStep;t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?e>2&&(e=2):(e>2&&(e+=this.pinchStep),e>4&&(e=4)),this.isTapToFitZoom=!0,this.isPinchZoomed=!0,this.onZoomChanged(100*e)},e.prototype.getZoomLevel=function(e){for(var t=0,i=this.zoomPercentages.length-1;t<=i&&(0!==t||0!==i);){var n=Math.round((t+i)/2);this.zoomPercentages[n]<=e?t=n+1:this.zoomPercentages[n]>=e&&(i=n-1)}return this.higherZoomLevel=t,this.lowerZoomLevel=i,i},e.prototype.checkZoomFactor=function(){return this.zoomPercentages.indexOf(100*this.zoomFactor)>-1},e.prototype.onZoomChanged=function(e){if(e&&(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.closePopupMenu(),this.previousZoomFactor=this.zoomFactor,this.zoomLevel=this.getZoomLevel(e),this.zoomFactor=this.getZoomFactor(e),this.zoomFactor<=.25?this.pdfViewerBase.isMinimumZoom=!0:this.pdfViewerBase.isMinimumZoom=!1,t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.isWebkitMobile?this.pdfViewerBase.viewerContainer.style.overflowY="auto":this.pdfViewerBase.viewerContainer.style.overflowY="hidden":this.pdfViewerBase.viewerContainer.style.overflowY="auto",this.pdfViewerBase.pageCount>0&&(this.previousZoomFactor!==this.zoomFactor&&(this.isPinchZoomed?(t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.pdfViewerBase.mobilePageNoContainer.style.left=this.pdfViewer.element.clientWidth/2-parseFloat(this.pdfViewerBase.mobilePageNoContainer.style.width)/2+"px"),this.responsivePages()):this.magnifyPages()),t.isBlazor()||this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.updateZoomButtons(),this.isInitialLoading||this.previousZoomFactor!==this.zoomFactor&&(this.pdfViewer.zoomValue=parseInt((100*this.zoomFactor).toString()),this.pdfViewer.fireZoomChange())),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.updateZoomPercentage(this.zoomFactor),this.isInitialLoading||this.previousZoomFactor!==this.zoomFactor&&(this.pdfViewer.zoomValue=parseInt((100*this.zoomFactor).toString()),this.pdfViewer.fireZoomChange()),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.isPinchZoomed)){var i=parseInt((100*this.zoomFactor).toString())+"%";this.pdfViewerBase.navigationPane.createTooltipMobile(i)}},e.prototype.setTouchPoints=function(e,t){this.touchCenterX=e,this.touchCenterY=t},e.prototype.initiatePinchMove=function(e,t,i,n){this.isPinchScrolled=!1,this.isMagnified=!1,this.reRenderPageNumber=this.pdfViewerBase.currentPageNumber,this.touchCenterX=(e+i)/2,this.touchCenterY=(t+n)/2,this.zoomOverPages(e,t,i,n)},e.prototype.magnifyPages=function(){this.clearRerenderTimer(),this.isPagesZoomed||(this.reRenderPageNumber=this.pdfViewerBase.currentPageNumber),this.pdfViewerBase.documentLoaded||this.pdfViewerBase.isInitialPageMode||(this.isPagesZoomed=!0);var e=this.getMagnifiedValue(this.pdfViewerBase.viewerContainer.scrollTop);this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.maintainSelectionOnZoom(!1,!0),this.isInitialLoading||(this.isMagnified=!0),this.updatePageLocation(),this.resizeCanvas(this.reRenderPageNumber),this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.resizeTouchElements();var t=this.pdfViewer.annotationModule;if(t&&t.textMarkupAnnotationModule&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.updateCurrentResizerPosition(),this.pdfViewerBase.pageSize.length>0){this.pdfViewerBase.pageContainer.style.height=this.topValue+this.pdfViewerBase.getPageHeight(this.pdfViewerBase.pageSize.length-1)+"px";var i=this;this.pdfViewerBase.renderedPagesList=[],this.pdfViewerBase.pinchZoomStorage=[],this.pdfViewerBase.viewerContainer.scrollTop=e,this.pdfViewerBase.documentLoaded||(this.magnifyPageRerenderTimer=setTimeout(function(){i.rerenderMagnifiedPages()},800))}},e.prototype.updatePageLocation=function(){this.topValue=0;for(var e=1;e<this.pdfViewerBase.pageSize.length;e++)this.topValue+=(this.pdfViewerBase.pageSize[e].height+this.pdfViewerBase.pageGap)*this.zoomFactor},e.prototype.clearRerenderTimer=function(){clearTimeout(this.rerenderOnScrollTimer),clearTimeout(this.magnifyPageRerenderTimer),this.clearIntervalTimer(),this.isPinchScrolled=!1},e.prototype.clearIntervalTimer=function(){clearInterval(this.rerenderInterval),this.rerenderInterval=null,this.clearRendering();for(var e=document.querySelectorAll('canvas[id*="'+this.pdfViewer.element.id+'_oldCanvas_"]'),t=0;t<e.length;t++){var i=parseInt(e[t].id.split("_oldCanvas_")[1]),n=this.pdfViewerBase.getElement("_pageCanvas_"+i);n?(e[t].id=n.id,n.parentElement.removeChild(n)):e[t].id=this.pdfViewer.element.id+"_pageCanvas_"+i,this.pdfViewerBase.isTextMarkupAnnotationModule()&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.rerenderAnnotationsPinch(t)}this.isRerenderCanvasCreated=!1},e.prototype.pushImageObjects=function(e){this.imageObjects.push(e)},e.prototype.clearRendering=function(){if(this.imageObjects){for(var e=0;e<this.imageObjects.length;e++)this.imageObjects[e]&&(this.imageObjects[e].onload=null);this.imageObjects=[]}},e.prototype.rerenderMagnifiedPages=function(){!this.pdfViewerBase.isInitialLoaded&&!this.pdfViewerBase.isDocumentLoaded||this.pdfViewerBase.isInitialPageMode?this.pdfViewerBase.isInitialPageMode&&(this.pageRerenderCount=0,this.pdfViewerBase.renderedPagesList=[],this.pdfViewerBase.pinchZoomStorage=[],this.isMagnified=!1,this.pdfViewerBase.pageViewScrollChanged(this.reRenderPageNumber),this.pdfViewerBase.isInitialPageMode=!1):(this.renderInSeparateThread(this.reRenderPageNumber),this.isPagesZoomed=!1)},e.prototype.renderInSeparateThread=function(e){var t=this;this.designNewCanvas(e),this.pageRerenderCount=0,this.pdfViewerBase.renderedPagesList=[],this.pdfViewerBase.pinchZoomStorage=[],this.isMagnified=!1,this.pdfViewerBase.pageViewScrollChanged(this.reRenderPageNumber);var i=this;this.rerenderInterval=setInterval(function(){t.initiateRerender(i)},1)},e.prototype.responsivePages=function(){this.isPagesZoomed=!0,this.clearRerenderTimer(),this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.clearTextSelection(),this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.clearAllOccurrences();var e=this.pdfViewerBase.viewerContainer.scrollTop;this.isAutoZoom=!1,this.updatePageLocation(),this.pdfViewerBase.pageContainer.style.height=this.topValue+this.pdfViewerBase.pageSize[this.pdfViewerBase.pageSize.length-1].height*this.zoomFactor+"px",this.resizeCanvas(this.pdfViewerBase.currentPageNumber),this.pdfViewerBase.textLayer&&this.pdfViewerBase.textLayer.clearTextLayers(!0),this.isPinchZoomed&&this.calculateScrollValues(e),this.pdfViewerBase.renderedPagesList=[],this.pdfViewerBase.pinchZoomStorage=[]},e.prototype.calculateScrollValues=function(e){var t=this.pdfViewerBase.currentPageNumber-1,i=this.pdfViewerBase.getElement("_pageDiv_"+t);if(i){var n=i.getBoundingClientRect(),o=n.top*this.previousZoomFactor,s=e+this.touchCenterY,a=n.top*this.zoomFactor+(s-o<0?s-o:(s-o)*(this.zoomFactor/this.previousZoomFactor));this.pdfViewerBase.viewerContainer.scrollTop=a-this.touchCenterY;var r=n.width*this.previousZoomFactor/n.width,l=this.zoomFactor/r-1,d=this.touchCenterX-n.left;this.pdfViewerBase.viewerContainer.scrollLeft+=d*l}},e.prototype.rerenderOnScroll=function(){var e=this;if(this.isPinchZoomed=!1,this.isPinchScrolled){this.rerenderOnScrollTimer=null,this.isPinchScrolled=!1,this.reRenderPageNumber=this.pdfViewerBase.currentPageNumber,this.pdfViewerBase.renderedPagesList=[],this.pdfViewerBase.pinchZoomStorage=[];for(var t=document.querySelectorAll('canvas[id*="'+this.pdfViewer.element.id+'_pageCanvas_"]'),i=0;i<t.length;i++){var n=parseInt(t[i].id.split("_pageCanvas_")[1]),o=this.pdfViewerBase.pageSize[n].width;816<o&&this.pdfViewer.tileRenderingSettings.enableTileRendering&&(this.pdfViewer.restrictZoomRequest?(t[i].style.width=o*this.pdfViewerBase.getZoomFactor()+"px",t[i].style.height=this.pdfViewerBase.pageSize[n].height*this.pdfViewerBase.getZoomFactor()+"px"):(t[i].width=o*this.pdfViewerBase.getZoomFactor(),t[i].height=this.pdfViewerBase.pageSize[n].height*this.pdfViewerBase.getZoomFactor()))}if(this.pdfViewerBase.textLayer)for(var s=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+'_textLayer_"]'),i=0;i<s.length;i++)s[i].style.display="block";if(this.pdfViewerBase.isTextMarkupAnnotationModule())for(var a=document.querySelectorAll('canvas[id*="'+this.pdfViewer.element.id+'_annotationCanvas_"]'),r=0;r<a.length;r++){n=a[r].id.split("_annotationCanvas_")[1];this.pdfViewer.annotationModule.textMarkupAnnotationModule.rerenderAnnotationsPinch(parseInt(n))}this.pdfViewerBase.pageViewScrollChanged(this.reRenderPageNumber),this.isPagePinchZoomed=!1,this.rerenderOnScrollTimer=setTimeout(function(){e.pdfViewerBase.pageViewScrollChanged(e.reRenderPageNumber)},300)}},e.prototype.pinchMoveScroll=function(){var e=this;this.isRerenderCanvasCreated&&this.clearIntervalTimer(),(this.isPagesZoomed||!this.isRerenderCanvasCreated&&this.isPagePinchZoomed)&&(this.clearRendering(),this.isPagesZoomed=!1,clearTimeout(this.magnifyPageRerenderTimer),this.isPinchScrolled=!0,this.rerenderOnScrollTimer=setTimeout(function(){e.rerenderOnScroll()},100))},e.prototype.initiateRerender=function(e){var t=!1;(this.previousZoomFactor<.4||this.pdfViewerBase.isMinimumZoom)&&(t=!0),e.pageRerenderCount!==e.pdfViewerBase.reRenderedCount&&!t||0===e.pageRerenderCount||0===e.pdfViewerBase.reRenderedCount||e.reRenderAfterPinch(this.reRenderPageNumber)},e.prototype.reRenderAfterPinch=function(e){this.pageRerenderCount=0;var t=e-3,i=e+1;this.pdfViewerBase.isMinimumZoom&&(t=e-4,i=e+4),t=t>0?t:0,i=i<this.pdfViewerBase.pageCount?i:this.pdfViewerBase.pageCount-1;for(var n=t;n<=i;n++){var o=this.pdfViewerBase.getElement("_pageDiv_"+n),s=this.pdfViewerBase.getElement("_pageCanvas_"+n);s&&(s.style.display="block");var a=this.pdfViewerBase.getElement("_oldCanvas_"+n);a&&a.parentNode.removeChild(a),this.pdfViewerBase.isTextMarkupAnnotationModule()?this.pdfViewer.annotationModule.textMarkupAnnotationModule.rerenderAnnotations(n):this.pdfViewer.formDesignerModule&&(this.rerenderAnnotations(n),this.pdfViewer.renderDrawing(void 0,e)),o&&(o.style.visibility="visible")}this.isRerenderCanvasCreated=!1,this.isPagePinchZoomed=!1,0!==this.pdfViewerBase.reRenderedCount&&(this.pdfViewerBase.reRenderedCount=0,this.pageRerenderCount=0,clearInterval(this.rerenderInterval),this.rerenderInterval=null),this.imageObjects=[]},e.prototype.rerenderAnnotations=function(e){for(var t=document.querySelectorAll("#"+this.pdfViewer.element.id+"_old_annotationCanvas_"+e),i=0;i<t.length;i++)t[i]&&t[i].parentElement.removeChild(t[i]);var n=this.pdfViewerBase.getElement("_annotationCanvas_"+e);n&&(n.style.display="block")},e.prototype.designNewCanvas=function(e){this.pdfViewerBase.textLayer&&this.pdfViewerBase.textLayer.clearTextLayers();var t=e-3,i=e+1;this.pdfViewerBase.isMinimumZoom&&(t=e-4,i=e+4),t=t>0?t:0,i=i<this.pdfViewerBase.pageCount?i:this.pdfViewerBase.pageCount-1;for(var n=t;n<=i;n++){var o=this.pdfViewerBase.getElement("_pageCanvas_"+n);o&&!this.pdfViewer.restrictZoomRequest?(o.id=this.pdfViewer.element.id+"_oldCanvas_"+n,o.style.backgroundColor="#fff",(this.pdfViewerBase.isTextMarkupAnnotationModule()||this.pdfViewer.formDesignerModule)&&(this.pdfViewerBase.getElement("_annotationCanvas_"+n).id=this.pdfViewer.element.id+"_old_annotationCanvas_"+n),this.pdfViewerBase.renderPageCanvas(this.pdfViewerBase.getElement("_pageDiv_"+n),this.pdfViewerBase.pageSize[n].width*this.zoomFactor,this.pdfViewerBase.pageSize[n].height*this.zoomFactor,n,"none")):this.pdfViewerBase.renderPageCanvas(this.pdfViewerBase.getElement("_pageDiv_"+n),this.pdfViewerBase.pageSize[n].width*this.zoomFactor,this.pdfViewerBase.pageSize[n].height*this.zoomFactor,n,"none")}this.isRerenderCanvasCreated=!0},e.prototype.pageRerenderOnMouseWheel=function(){var e=this;this.isRerenderCanvasCreated&&(this.clearIntervalTimer(),clearTimeout(this.magnifyPageRerenderTimer),this.isPinchScrolled||(this.isPinchScrolled=!0,this.rerenderOnScrollTimer=setTimeout(function(){e.rerenderOnScroll()},100)))},e.prototype.renderCountIncrement=function(){this.isRerenderCanvasCreated&&this.pageRerenderCount++},e.prototype.rerenderCountIncrement=function(){this.pageRerenderCount>0&&this.pdfViewerBase.reRenderedCount++},e.prototype.resizeCanvas=function(e){if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var t=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(t)}var n=e-3,o=e+3;this.pdfViewerBase.isMinimumZoom&&(n=e-4,o=e+4),n=n>0?n:0,o=o<this.pdfViewerBase.pageCount?o:this.pdfViewerBase.pageCount-1;for(var s=n;s<=o;s++){var a=this.pdfViewerBase.getElement("_pageDiv_"+s),r=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+s);if(a&&n<=s&&s<=o){var l=!1;if(this.pdfViewer.textSelectionModule&&(l=this.pdfViewer.textSelectionModule.isSelectionAvailableOnScroll(s)),null!=this.pdfViewerBase.pageSize[s]){var d=this.pdfViewerBase.pageSize[s].width*this.zoomFactor,u=this.pdfViewerBase.pageSize[s].height*this.zoomFactor;this.pdfViewerBase.isMixedSizeDocument&&this.pdfViewerBase.highestWidth>0?a.style.width=this.pdfViewerBase.highestWidth*this.zoomFactor+"px":a.style.width=d+"px",a.style.height=u+"px",a.style.top=this.pdfViewerBase.pageSize[s].top*this.zoomFactor+"px",this.pdfViewer.enableRtl?a.style.right=this.pdfViewerBase.updateLeftPosition(s)+"px":a.style.left=this.pdfViewerBase.updateLeftPosition(s)+"px";var M=this.pdfViewerBase.getElement("_pageCanvas_"+s);if(M&&(M.style.width=d+"px",M.style.height=u+"px",this.pdfViewer.annotation?this.pdfViewer.annotationModule.resizeAnnotations(d,u,s):this.pdfViewer.formDesignerModule.resizeAnnotations(d,u,s)),r){if(r.style.width=d+"px",r.style.height=u+"px",this.pdfViewer.textSelectionModule)if(this.isPinchZoomed)r.style.display="none";else if(this.isMagnified){var p=e-2==0?0:e-2,h=e===this.pdfViewerBase.pageCount?this.pdfViewerBase.pageCount-1:e+1;p<=s&&s<=h&&(this.pdfViewer.textSelectionModule.isTextSelection&&l||this.pdfViewerBase.textLayer.getTextSearchStatus()||this.pdfViewerBase.isInitialPageMode)?(this.pdfViewerBase.textLayer.resizeTextContentsOnZoom(s),this.pdfViewer.textSelectionModule.isTextSelection&&l&&this.pdfViewer.textSelectionModule.applySelectionRangeOnScroll(s)):r.style.display="none"}else r.style.display="none";this.pdfViewerBase.applyElementStyles(r,s)}var L=i.getDiagramElement(this.pdfViewer.element.id+"_textLayer_"+s);if(L){var w=i.getDiagramElement(this.pdfViewer.element.id+s+"_diagramAdorner_svg");w&&(w.style.width=d+"px",w.style.height=u+"px");var c=i.getDiagramElement(this.pdfViewer.element.id+s+"_diagramAdornerLayer");c&&(c.style.width=d+"px",c.style.height=u+"px"),L.style.width=d+"px",L.style.height=u+"px",this.pdfViewer.renderSelector(s,this.pdfViewer.annotationSelectorSettings),this.pdfViewerBase.applyElementStyles(c,s)}}}}},e.prototype.zoomOverPages=function(e,t,i,n){var o=Math.sqrt(Math.pow(e-i,2)+Math.pow(t-n,2));this.previousTouchDifference>-1&&(o>this.previousTouchDifference?this.pinchOut():o<this.previousTouchDifference&&this.pinchIn()),this.previousTouchDifference=o},e.prototype.pinchMoveEnd=function(){this.touchCenterX=0,this.touchCenterY=0,this.previousTouchDifference=-1,this.isPinchZoomed&&(this.isPinchScrolled=!1,this.isPagePinchZoomed=!0,this.pinchMoveScroll())},e.prototype.fitPageScrollMouseWheel=function(e){"fitToPage"===this.fitType&&(this.isMagnified=!1,e.preventDefault(),e.deltaY>0?this.downwardScrollFitPage(this.pdfViewerBase.currentPageNumber-1):this.upwardScrollFitPage(this.pdfViewerBase.currentPageNumber-1))},e.prototype.magnifyBehaviorKeyDown=function(e){var t=!!!!navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i)&&e.metaKey;switch(e.keyCode){case 38:case 37:case 33:"fitToPage"!==this.fitType||(e.ctrlKey||t)&&e.shiftKey||(e.preventDefault(),this.upwardScrollFitPage(this.pdfViewerBase.currentPageNumber-1));break;case 40:case 39:case 34:"fitToPage"!==this.fitType||(e.ctrlKey||t)&&e.shiftKey||(e.preventDefault(),this.downwardScrollFitPage(this.pdfViewerBase.currentPageNumber-1));break;case 187:(e.ctrlKey||t)&&(e.preventDefault(),this.zoomIn());break;case 189:(e.ctrlKey||t)&&(e.preventDefault(),this.zoomOut());break;case 48:!e.ctrlKey&&!t||e.shiftKey||(e.preventDefault(),this.fitToPage());break;case 49:!e.ctrlKey&&!t||e.shiftKey||(e.preventDefault(),this.zoomTo(100))}},e.prototype.upwardScrollFitPage=function(e){e>0&&(this.pdfViewerBase.getElement("_pageDiv_"+(e-1)).style.visibility="visible",this.pdfViewerBase.viewerContainer.scrollTop=this.pdfViewerBase.pageSize[e-1].top*this.zoomFactor,this.isFitToPageMode&&(this.pdfViewerBase.getElement("_pageDiv_"+e).style.visibility="hidden"))},e.prototype.updatePagesForFitPage=function(e){"fitToPage"===this.fitType&&this.isFitToPageMode&&(e>0&&this.pdfViewerBase.getElement("_pageDiv_"+(e-1))&&(this.pdfViewerBase.getElement("_pageDiv_"+(e-1)).style.visibility="hidden"),e<this.pdfViewerBase.pageCount-1&&this.pdfViewerBase.getElement("_pageDiv_"+(e+1))&&(this.pdfViewerBase.getElement("_pageDiv_"+(e+1)).style.visibility="hidden"))},e.prototype.onDoubleTapMagnification=function(){this.pdfViewer.toolbarModule&&t.isBlazor()&&this.pdfViewer.toolbarModule.showToolbar(!0);var e=this.pdfViewerBase.viewerContainer.scrollTop;if(this.pdfViewer.selectedItems.annotations[0]){if(t.isBlazor()&&this.pdfViewer.selectedItems.annotations[0]&&"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType){var i={};i.x=this.pdfViewer.selectedItems.annotations[0].bounds.x,i.y=this.pdfViewer.selectedItems.annotations[0].bounds.y,this.pdfViewer.annotation.freeTextAnnotationModule.addInuptElemet(i,this.pdfViewer.selectedItems.annotations[0])}}else this.isTapToFitZoom?this.fitToWidth():this.zoomFactor<2?this.zoomTo(200):this.fitToWidth(),this.calculateScrollValues(e),this.isTapToFitZoom=!this.isTapToFitZoom},e.prototype.downwardScrollFitPage=function(e){e!==this.pdfViewerBase.pageCount-1&&(this.pdfViewerBase.getElement("_pageDiv_"+(e+1)).style.visibility="visible",this.pdfViewerBase.viewerContainer.scrollTop=this.pdfViewerBase.pageSize[e+1].top*this.zoomFactor,this.isFitToPageMode&&(e+1===this.pdfViewerBase.pageCount-1?this.pdfViewerBase.getElement("_pageDiv_"+e).style.visibility="hidden":this.pdfViewerBase.getElement("_pageDiv_"+(e+2)).style.visibility="hidden"))},e.prototype.getMagnifiedValue=function(e){return e/this.previousZoomFactor*this.zoomFactor},e.prototype.destroy=function(){this.imageObjects=void 0},e.prototype.getZoomFactor=function(e){return e/100},e.prototype.getModuleName=function(){return"Magnification"},e}(),oi=function(){function e(e,t){this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.goToNextPage=function(){this.pageNumber=this.pdfViewerBase.currentPageNumber,++this.pageNumber<=this.pdfViewerBase.pageCount&&this.pdfViewerBase.updateScrollTop(this.pageNumber-1)},e.prototype.goToPreviousPage=function(){this.pageNumber=this.pdfViewerBase.currentPageNumber,--this.pageNumber>0&&this.pdfViewerBase.updateScrollTop(this.pageNumber-1)},e.prototype.goToPage=function(e){e>0&&e<=this.pdfViewerBase.pageCount&&this.pdfViewerBase.currentPageNumber!==e&&this.pdfViewerBase.updateScrollTop(e-1),this.pdfViewer.magnificationModule.resizeCanvas(e);var t=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(e-1));t&&(t.style.display="block")},e.prototype.goToFirstPage=function(){this.pageNumber=0,this.pdfViewerBase.updateScrollTop(this.pageNumber)},e.prototype.goToLastPage=function(){this.pageNumber=this.pdfViewerBase.pageCount-1,this.pdfViewerBase.updateScrollTop(this.pageNumber)},e.prototype.destroy=function(){this.pageNumber=0},e.prototype.getModuleName=function(){return"Navigation"},e}(),si=function(){function e(e,t){var i=this;this.thumbnailLimit=30,this.thumbnailThreshold=50,this.thumbnailTopMargin=10,this.isThumbnailClicked=!1,this.thumbnailClick=function(e){var t=i,n=t.getPageNumberFromID(e.srcElement.id);if(t.previousElement&&(t.previousElement.classList.remove("e-pv-thumbnail-selection"),t.previousElement.classList.remove("e-pv-thumbnail-focus"),t.previousElement.classList.add("e-pv-thumbnail-selection-ring")),e.srcElement.parentElement.id===t.pdfViewer.element.id+"_thumbnail_Selection_Ring_"+n?(t.setSelectionStyle(e.srcElement.parentElement),t.previousElement=e.srcElement.parentElement):e.srcElement.id===t.pdfViewer.element.id+"_thumbnail_Selection_Ring_"+n&&(t.setSelectionStyle(e.srcElement),t.previousElement=e.srcElement),t.pdfViewer.fireThumbnailClick(n+1),t.isThumbnailClicked=!0,t.goToThumbnailPage(n+1),t.pdfViewerBase.focusViewerContainer(),i.pdfViewer.annotationModule&&i.pdfViewer.annotationModule.inkAnnotationModule){var o=parseInt(i.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);i.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(o)}},this.thumbnailMouseOver=function(e){var t=i,n=t.getPageNumberFromID(e.srcElement.id);e.srcElement.id===t.pdfViewer.element.id+"_thumbnail_Selection_Ring_"+n?t.setMouseOverStyle(e.srcElement):e.srcElement.id===t.pdfViewer.element.id+"_thumbnail_image_"+n&&t.setMouseOverStyle(e.srcElement.parentElement)},this.thumbnailMouseLeave=function(e){var t=i,n=t.getPageNumberFromID(e.srcElement.id);e.srcElement.parentElement.id===t.pdfViewer.element.id+"_thumbnail_view"?t.setMouseLeaveStyle(e.srcElement.children[0].children[0]):e.srcElement.parentElement.id===t.pdfViewer.element.id+"_thumbnail_"+n&&t.setMouseLeaveStyle(e.srcElement.parentElement.children[0])},this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.createThumbnailContainer=function(){this.thumbnailView=t.createElement("div",{id:this.pdfViewer.element.id+"_thumbnail_view",className:"e-pv-thumbnail-view e-pv-thumbnail-row"}),this.pdfViewerBase.navigationPane.sideBarContent.appendChild(this.thumbnailView)},e.prototype.openThumbnailPane=function(){this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.openThumbnailPane()},e.prototype.createRequestForThumbnails=function(){var e=this;return!!document.documentMode?(this.requestCreation(e),null):new Promise(function(t,i){e.requestCreation(e)})},e.prototype.requestCreation=function(e){e.isThumbnailCompleted?(e.startIndex=e.thumbnailLimit,e.thumbnailLimit=e.startIndex+e.thumbnailThreshold<e.pdfViewer.pageCount?e.startIndex+e.thumbnailThreshold:e.pdfViewer.pageCount):(e.thumbnailLimit=e.thumbnailLimit<e.pdfViewer.pageCount?e.thumbnailLimit:e.pdfViewer.pageCount,e.thumbnailLimit!==e.pdfViewer.pageCount&&(e.isThumbnailCompleted=!1,e.startIndex=0));var t={startPage:e.startIndex,endPage:e.thumbnailLimit,sizeX:99.7,sizeY:141,hashId:e.pdfViewerBase.hashId,action:"RenderThumbnailImages",elementId:e.pdfViewer.element.id,uniqueId:e.pdfViewerBase.documentId};this.pdfViewerBase.jsonDocumentId&&(t.documentId=this.pdfViewerBase.jsonDocumentId),this.thumbnailRequestHandler=new ti(this.pdfViewer),this.thumbnailRequestHandler.url=e.pdfViewer.serviceUrl+"/"+e.pdfViewer.serverActionSettings.renderThumbnail,this.thumbnailRequestHandler.responseType="json",this.thumbnailRequestHandler.send(t),this.thumbnailRequestHandler.onSuccess=function(t){var i=t.data;if(i){if("object"!=typeof i)try{i=JSON.parse(i)}catch(t){e.pdfViewerBase.onControlError(500,i,e.pdfViewer.serverActionSettings.renderThumbnail),i=null}if(i&&i.uniqueId===e.pdfViewerBase.documentId){if(e.pdfViewer.fireAjaxRequestSuccess(e.pdfViewer.serverActionSettings.renderThumbnail,i),e.renderThumbnailImage(i),!e.isThumbnailCompleted){var n=i&&isNaN(i.endPage)?i.endPage:e.thumbnailLimit;e.startIndex=n,e.isThumbnailCompleted=!0}if(e.pdfViewer.isThumbnailViewOpen){e.pdfViewerBase.navigationPane.isThumbnailOpen=!0,e.pdfViewerBase.navigationPane.sideBarTitle.textContent=e.pdfViewer.localeObj.getConstant("Page Thumbnails"),document.getElementById(e.pdfViewer.element.id+"_thumbnail_view").style.display="flex";var o=e.pdfViewer.element.querySelector(".e-pv-bookmark-view");o&&(o.style.display="none"),e.pdfViewerBase.navigationPane.setThumbnailSelectionIconTheme(),e.pdfViewerBase.navigationPane.updateViewerContainerOnExpand(),e.pdfViewerBase.navigationPane.isBookmarkOpen=!1}}}},this.thumbnailRequestHandler.onFailure=function(t){e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,e.pdfViewer.serverActionSettings.renderThumbnail)},this.thumbnailRequestHandler.onError=function(t){e.pdfViewerBase.openNotificationPopup(),e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,e.pdfViewer.serverActionSettings.renderThumbnail)}},e.prototype.gotoThumbnailImage=function(e){var t=this.checkThumbnailScroll(e);if(this.thumbnailView){var i=this.thumbnailView.children[e];if(i){var n=i.children[0];if(t){var o=n.offsetTop+n.clientTop-this.thumbnailTopMargin;this.pdfViewerBase.navigationPane.sideBarContent.scrollTop=o}this.isThumbnailClicked||(this.previousElement&&(this.previousElement.classList.remove("e-pv-thumbnail-selection"),this.previousElement.classList.remove("e-pv-thumbnail-focus"),this.previousElement.classList.remove("e-pv-thumbnail-hover"),this.previousElement.classList.add("e-pv-thumbnail-selection-ring")),this.setFocusStyle(n,e)),this.previousElement=n.children[0]}}},e.prototype.checkThumbnailScroll=function(e){var t=!1;if(this.thumbnailView){var i=this.getVisibleThumbs(),n=i.views.length;if(n>0){var o=this.getPageNumberFromID(i.first.id),s=n>1?this.getPageNumberFromID(i.last.id):o;e<=o||e>=s?t=!0:i.views.some(function(i){var n=i.id.split("_"),o=n[n.length-1];return parseInt(o)===e&&(t=i.percent<100,!0)})}}return t},e.prototype.getPageNumberFromID=function(e){var t=e.split("_"),i=t[t.length-1];return parseInt(i)},e.prototype.setFocusStyle=function(e,t){e.children[0].id===this.pdfViewer.element.id+"_thumbnail_Selection_Ring_"+t&&this.setMouseFocusStyle(e.children[0])},e.prototype.renderThumbnailImage=function(e){if(this.thumbnailView)for(var i=e&&isNaN(e.startPage)?e.startPage:this.startIndex,n=e&&isNaN(e.endPage)?e.endPage:this.thumbnailLimit,o=i;o<n;o++){var s=t.createElement("a",{id:"page_"+o,attrs:{"aria-label":"Thumbnail of Page"+(o+1),tabindex:"-1",role:"link"}}),a=t.createElement("div",{id:this.pdfViewer.element.id+"_thumbnail_"+o,className:"e-pv-thumbnail e-pv-thumbnail-column"});this.thumbnailSelectionRing=t.createElement("div",{id:this.pdfViewer.element.id+"_thumbnail_Selection_Ring_"+o,className:"e-pv-thumbnail-selection-ring"}),a.appendChild(this.thumbnailSelectionRing);var r=t.createElement("div",{id:this.pdfViewer.element.id+"_thumbnail_pagenumber_"+o,className:"e-pv-thumbnail-number"});r.textContent=(o+1).toString(),a.appendChild(r),this.thumbnailImage=t.createElement("img",{id:this.pdfViewer.element.id+"_thumbnail_image_"+o,className:"e-pv-thumbnail-image"}),this.thumbnailImage.src=e.thumbnailImage[o],this.pdfViewerBase.pageSize[o]&&this.pdfViewerBase.pageSize[o].height<this.pdfViewerBase.pageSize[o].width&&(this.thumbnailImage.style.height="86px",this.thumbnailImage.style.width="126px",a.style.height="100px",a.style.width="140px",s.style.left="-25px",s.style.position="relative",r.style.left="18px",r.style.position="relative"),this.thumbnailSelectionRing.appendChild(this.thumbnailImage),s.appendChild(a),this.thumbnailView.appendChild(s),this.wireUpEvents(),0===o&&this.setMouseFocusToFirstPage()}this.pdfViewerBase.navigationPane.enableThumbnailButton(),this.thumbnailLimit!==this.pdfViewerBase.pageCount&&this.thumbnailView&&(!!document.documentMode?this.createRequestForThumbnails():Promise.all([this.createRequestForThumbnails()]))},e.prototype.wireUpEvents=function(){this.thumbnailSelectionRing&&(this.thumbnailSelectionRing.addEventListener("click",this.thumbnailClick),this.thumbnailSelectionRing.addEventListener("mouseover",this.thumbnailMouseOver),this.thumbnailSelectionRing.addEventListener("mouseleave",this.thumbnailMouseLeave))},e.prototype.unwireUpEvents=function(){this.thumbnailSelectionRing&&this.thumbnailImage&&(this.thumbnailSelectionRing.removeEventListener("click",this.thumbnailClick),this.thumbnailSelectionRing.removeEventListener("mouseover",this.thumbnailMouseOver),this.thumbnailSelectionRing.removeEventListener("mouseleave",this.thumbnailMouseLeave))},e.prototype.goToThumbnailPage=function(e){e>0&&e<=this.pdfViewerBase.pageCount&&this.pdfViewerBase.currentPageNumber!==e?this.pdfViewerBase.updateScrollTop(e-1):this.isThumbnailClicked=!1},e.prototype.setSelectionStyle=function(e){e.classList.remove("e-pv-thumbnail-selection-ring"),e.classList.remove("e-pv-thumbnail-hover"),e.classList.remove("e-pv-thumbnail-focus"),e.classList.add("e-pv-thumbnail-selection")},e.prototype.setMouseOverStyle=function(e){e.classList.contains("e-pv-thumbnail-selection")||(e.classList.remove("e-pv-thumbnail-selection-ring"),e.classList.contains("e-pv-thumbnail-focus")||e.classList.add("e-pv-thumbnail-hover"))},e.prototype.setMouseLeaveStyle=function(e){e.classList.contains("e-pv-thumbnail-selection")?e.classList.contains("e-pv-thumbnail-selection")||(e.classList.remove("e-pv-thumbnail-selection"),e.classList.add("e-pv-thumbnail-focus")):(e.classList.contains("e-pv-thumbnail-focus")||e.classList.add("e-pv-thumbnail-selection-ring"),e.classList.remove("e-pv-thumbnail-hover"))},e.prototype.setMouseFocusStyle=function(e){e.classList.remove("e-pv-thumbnail-selection"),e.classList.remove("e-pv-thumbnail-hover"),e.classList.add("e-pv-thumbnail-focus")},e.prototype.setMouseFocusToFirstPage=function(){var e=this.thumbnailView.children[0];if(e){var t=e.children[0].children[0];this.setMouseFocusStyle(t),this.previousElement=t}},e.prototype.clear=function(){if(this.startIndex=0,this.thumbnailLimit=0,this.isThumbnailCompleted=!1,this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.sideBarContentContainer&&(this.pdfViewerBase.navigationPane.sideBarContentContainer.style.display="block",this.pdfViewerBase.navigationPane.sideBarContent.scrollTop=0,this.pdfViewerBase.navigationPane.sideBarContentContainer.style.display="none"),this.thumbnailView)for(;this.thumbnailView.hasChildNodes();)this.thumbnailView.removeChild(this.thumbnailView.lastChild);this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.resetThumbnailView(),this.unwireUpEvents()},e.prototype.getVisibleThumbs=function(){return this.getVisibleElements(this.pdfViewerBase.navigationPane.sideBarContent,this.thumbnailView.children)},e.prototype.getVisibleElements=function(e,t){function i(e){return e.offsetTop+e.clientTop+e.clientHeight>p}var n,o,s,a,r,l,d,u,M,p=e.scrollTop,h=p+e.clientHeight,L=e.scrollLeft,w=L+e.clientWidth,c=[],C=0===t.length?0:this.binarySearchFirstItem(t,i);t.length>0&&(C=this.backtrackBeforeAllVisibleElements(C,t,p));for(var g=-1,m=C,f=t.length;m<f;m++){if(n=this.getThumbnailElement(m),o=n,l=o.offsetLeft+o.clientLeft,s=o.offsetTop+o.clientTop,d=o.clientWidth,a=o.clientHeight,u=l+d,r=s+a,-1===g)r>=h&&(g=r);else if(s>g)break;r<=p||s>=h||u<=L||l>=w||(M=(a-(Math.max(0,p-s)+Math.max(0,r-h)))*(d-(Math.max(0,L-l)+Math.max(0,u-w)))*100/a/d|0,c.push({id:n.id,x:l,y:s,view:n,percent:M}))}return{first:c[0],last:c[c.length-1],views:c}},e.prototype.binarySearchFirstItem=function(e,t){var i=0,n=e.length-1;if(0===e.length||!t(this.getThumbnailElement(n)))return e.length-1;if(t(this.getThumbnailElement(i)))return i;for(;i<n;){var o=i+n>>1;t(this.getThumbnailElement(o))?n=o:i=o+1}return i},e.prototype.backtrackBeforeAllVisibleElements=function(e,t,i){if(e<2)return e;var n=this.getThumbnailElement(e),o=n.offsetTop+n.clientTop;o>=i&&(o=(n=this.getThumbnailElement(e-1)).offsetTop+n.clientTop);for(var s=e-2;s>=0&&!((n=this.getThumbnailElement(s)).offsetTop+n.clientTop+n.clientHeight<=o);--s)e=s;return e},e.prototype.getThumbnailElement=function(e){return this.thumbnailView.children[e].children[0]},e.prototype.destroy=function(){this.clear()},e.prototype.getModuleName=function(){return"ThumbnailView"},e}(),ai=function(){function e(e,t,i){this.isToolbarHidden=!1,this.isTextboxBtnVisible=!0,this.isPasswordBtnVisible=!0,this.isCheckboxBtnVisible=!0,this.isRadiobuttonBtnVisible=!0,this.isDropdownBtnVisible=!0,this.isListboxBtnVisible=!0,this.isSignatureBtnVisible=!0,this.isDeleteBtnVisible=!0,this.toolbarBorderHeight=1,this.pdfViewer=e,this.pdfViewerBase=t,this.primaryToolbar=i}return e.prototype.initializeFormDesignerToolbar=function(){var e=this;this.toolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_formdesigner_toolbar",className:"e-pv-formdesigner-toolbar"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.toolbarElement),this.toolbar=new r.Toolbar({width:"",height:"",overflowMode:"Popup",items:this.createToolbarItems(),clicked:this.onToolbarClicked.bind(this),created:function(){e.createDropDowns()}}),this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.toolbar.appendTo(this.toolbarElement),this.afterToolbarCreation(),this.createSignContainer(),this.applyFormDesignerToolbarSettings(),this.showFormDesignerToolbar(null,!0)},e.prototype.showFormDesignerToolbar=function(e,t){if(this.isToolbarHidden){var i=this.toolbarElement.style.display;this.toolbarElement.style.display="block",this.pdfViewer.designerMode=!0,this.pdfViewer.formDesignerModule.setMode("designer"),t||(this.pdfViewer.isFormDesignerToolbarVisible=!0),e?this.primaryToolbar.selectItem(e):this.pdfViewer.enableToolbar&&this.primaryToolbar.selectItem(this.primaryToolbar.formDesignerItem),"none"===i&&this.adjustViewer(!0)}else{this.pdfViewer.formDesignerModule;e?this.primaryToolbar.deSelectItem(e):this.pdfViewer.enableToolbar&&this.primaryToolbar.deSelectItem(this.primaryToolbar.formDesignerItem),this.adjustViewer(!1),this.toolbarElement.style.display="none",this.pdfViewer.formDesignerModule.setMode("edit"),this.pdfViewer.designerMode=!1,t||(this.pdfViewer.isFormDesignerToolbarVisible=!1)}this.pdfViewer.magnification&&"fitToPage"===this.pdfViewer.magnification.fitType&&this.pdfViewer.magnification.fitToPage(),this.isToolbarHidden=!this.isToolbarHidden},e.prototype.adjustViewer=function(e){var i,n,o;if(t.isBlazor()){i=this.pdfViewer.element.querySelector(".e-pv-sidebar-toolbar-splitter"),n=this.pdfViewer.element.querySelector(".e-pv-toolbar");var s=this.pdfViewer.element.querySelector(".e-pv-formDesigner-toolbar");o=this.getToolbarHeight(s)}else i=this.pdfViewerBase.getElement("_sideBarToolbarSplitter"),n=this.pdfViewerBase.getElement("_toolbarContainer"),o=this.getToolbarHeight(this.toolbarElement);var a=this.getToolbarHeight(n),r=this.pdfViewerBase.navigationPane.sideBarToolbar,l=this.pdfViewerBase.navigationPane.sideBarContentContainer,d=this.pdfViewerBase.navigationPane.commentPanelContainer,u=this.pdfViewerBase.navigationPane.commentPanelResizer;e?(this.pdfViewer.enableToolbar?(r.style.top=a+o+"px",l.style.top=a+o+"px",i.style.top=a+o+"px",d.style.top=a+o+"px",u.style.top=a+o+"px"):(r.style.top=o+"px",l.style.top=o+"px",i.style.top=o+"px",d.style.top=o+"px",u.style.top=a+o+"px"),this.pdfViewer.enableToolbar||(a=0),this.pdfViewerBase.viewerContainer.style.height=this.updateViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer),o+a)+"px",r.style.height=this.getNavigationToolbarHeight(o+a)+"px",i.style.height=this.getNavigationToolbarHeight(o+a)+"px"):(this.pdfViewer.enableToolbar?(r.style.top=a+"px",l.style.top=a+"px",i.style.top=a+"px",d.style.top=a+"px",u.style.top=a+"px"):(r.style.top="1px",r.style.height="100%",l.style.top="1px",l.style.height="100%",i.style.top="1px",i.style.height="100%",d.style.top="1px",d.style.height="100%",u.style.top="1px",u.style.height="100%"),this.pdfViewer.enableToolbar||(a=0),this.pdfViewerBase.viewerContainer.style.height=this.resetViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer),o)+"px",r.style.height=this.getNavigationToolbarHeight(a),i.style.height=this.getNavigationToolbarHeight(a),"0px"===this.pdfViewerBase.viewerContainer.style.height&&(this.pdfViewerBase.viewerContainer.style.height=parseInt(this.pdfViewer.element.style.height)-parseInt(r.style.top)+"px")),t.isBlazor()?this.updateContentContainerHeight(e,!0):this.updateContentContainerHeight(e)},e.prototype.getElementHeight=function(e){try{return e.getBoundingClientRect().height}catch(e){return 0}},e.prototype.updateViewerHeight=function(e,t){return this.getElementHeight(this.pdfViewer.element)-t},e.prototype.resetViewerHeight=function(e,t){return e+t},e.prototype.getNavigationToolbarHeight=function(e){var t=this.pdfViewer.element.getBoundingClientRect().height;return 0!==t?t-e+"px":""},e.prototype.updateContentContainerHeight=function(e,t){var i;if(t){var n=this.pdfViewer.element.querySelector(".e-pv-formDesigner-toolbar");i=this.getToolbarHeight(n)}else i=this.getToolbarHeight(this.toolbarElement);var o=this.pdfViewerBase.navigationPane.sideBarContentContainer.getBoundingClientRect();0!==o.height&&(this.pdfViewerBase.navigationPane.sideBarContentContainer.style.height=e?o.height-i+"px":o.height+i+"px")},e.prototype.getToolbarHeight=function(e){var t=e.getBoundingClientRect().height;return 0===t&&e===this.pdfViewerBase.getElement("_toolbarContainer")&&(t=parseFloat(window.getComputedStyle(e).height)+this.toolbarBorderHeight),t},e.prototype.createToolbarItems=function(){var e=this.getTemplate("span","_formfield_signature","e-pv-annotation-handwritten-container"),t=[];return t.push({prefixIcon:"e-pv-textbox-icon e-pv-icon",className:"e-pv-annotation-shapes-container",id:this.pdfViewer.element.id+"_formdesigner_textbox",align:"Left"}),t.push({prefixIcon:"e-pv-password-icon e-pv-icon",className:"e-pv-annotation-shapes-container",id:this.pdfViewer.element.id+"_formdesigner_passwordfield",align:"Left"}),t.push({prefixIcon:"e-pv-checkbox-icon e-pv-icon",className:"e-pv-annotation-shapes-container",id:this.pdfViewer.element.id+"_formdesigner_checkbox",align:"Left"}),t.push({prefixIcon:"e-pv-radiobutton-icon e-pv-icon",className:"e-pv-annotation-shapes-container",id:this.pdfViewer.element.id+"_formdesigner_radiobutton",align:"Left"}),t.push({prefixIcon:"e-pv-dropdown-icon e-pv-icon",className:"e-pv-annotation-shapes-container",id:this.pdfViewer.element.id+"_formdesigner_dropdown",align:"Left"}),t.push({prefixIcon:"e-pv-listbox-icon e-pv-icon",className:"e-pv-annotation-shapes-container",id:this.pdfViewer.element.id+"_formdesigner_listbox",align:"Left"}),t.push({template:e,align:"Left"}),t.push({type:"Separator",align:"Left"}),t.push({prefixIcon:"e-pv-annotation-delete-icon e-pv-icon",className:"e-pv-annotation-delete-container",id:this.pdfViewer.element.id+"_formdesigner_delete",align:"Left"}),t.push({prefixIcon:"e-pv-annotation-tools-close-icon e-pv-icon",className:"e-pv-annotation-tools-close-container",id:this.pdfViewer.element.id+"_formdesigner_close",align:"Right"}),t},e.prototype.createSignContainer=function(){var e=this;this.handWrittenSignatureItem=this.pdfViewerBase.getElement("_formfield_signature"),this.primaryToolbar.createTooltip(this.pdfViewerBase.getElement("_formfield_signature"),this.pdfViewer.localeObj.getConstant("Draw Signature"));var i=[],n={items:i=[{text:"ADD SIGNATURE"},{separator:!0},{text:"ADD INITIAL"}],iconCss:"e-pv-handwritten-icon e-pv-icon",cssClass:"e-pv-handwritten-popup",beforeItemRender:function(i){if(e.pdfViewer.clearSelection(e.pdfViewerBase.currentPageNumber-1),"ADD SIGNATURE"===i.item.text&&(i.element.innerHTML="",(n=t.createElement("span")).classList.add("e-pv-align-sign"),n.textContent="ADD SIGNATURE",n.style.fontFamily="Roboto",n.style.fontSize="14px",n.style.width="fit-content",n.addEventListener("mouseover",e.hoverSignature.bind(e)),n.addEventListener("mouseleave",e.leaveSignature.bind(e)),n.addEventListener("click",e.clickSignature.bind(e)),i.element.appendChild(n),i.element.addEventListener("mouseover",e.hoverInitialBtn.bind(e)),i.element.style.width="206px",i.element.style.display="flex",i.element.style.flexDirection="column",i.element.style.height="auto"),"ADD INITIAL"===i.item.text){i.element.innerHTML="";var n=t.createElement("span");n.classList.add("e-pv-align-sign"),n.textContent="ADD INITIAL",n.style.width="fit-content",n.style.left="40px",n.addEventListener("mouseover",e.hoverSignature.bind(e)),n.addEventListener("mouseleave",e.leaveSignature.bind(e)),n.addEventListener("click",e.clickInitial.bind(e)),i.element.appendChild(n),i.element.addEventListener("mouseover",e.hoverInitialBtn.bind(e)),i.element.style.width="206px",i.element.style.display="flex",i.element.style.flexDirection="column",i.element.style.height="auto"}}};new s.DropDownButton(n).appendTo(this.handWrittenSignatureItem)},e.prototype.leaveSignature=function(){var e=event.target;e.classList.contains("e-pv-align-sign")&&(e.classList.remove("e-pv-signaturehover"),e.style.cursor="default")},e.prototype.hoverSignature=function(){var e=event.target;e.classList.contains("e-pv-align-sign")&&(e.classList.add("e-pv-signaturehover"),e.style.cursor="pointer")},e.prototype.hoverInitialBtn=function(e){var i=e.target,n=t.isNullOrUndefined(e.path)?e.composedPath()[0].id:e.path[0].id;if(n!=="sign_"+n.split("_")[1]&&n!=="delete_"+n.split("_")[1]){var o=document.getElementById(i.id);t.isNullOrUndefined(o)&&(o=document.getElementById(i.parentElement.id)),null==o||i.id==="sign_"+i.id.split("_")[1]&&i.id==="sign_border_"+i.id.split("_")[2]?null==o.parentElement||i.id==="sign_"+i.id.split("_")[1]&&i.id==="sign_border_"+i.id.split("_")[2]||(o.parentElement.style.background="transparent",o.parentElement.style.cursor="default"):(o.style.background="transparent",o.style.cursor="default")}},e.prototype.getTemplate=function(e,i,n){var o=t.createElement(e,{id:this.pdfViewer.element.id+i});return n&&(o.className=n),o.outerHTML},e.prototype.onToolbarClicked=function(e){e&&e.item&&(-1!==e.item.id.indexOf("textbox")?this.pdfViewer.formDesignerModule.setFormFieldMode("Textbox"):-1!==e.item.id.indexOf("passwordfield")?this.pdfViewer.formDesignerModule.setFormFieldMode("Password"):-1!==e.item.id.indexOf("checkbox")?this.pdfViewer.formDesignerModule.setFormFieldMode("CheckBox"):-1!==e.item.id.indexOf("radiobutton")?this.pdfViewer.formDesignerModule.setFormFieldMode("RadioButton"):-1!==e.item.id.indexOf("dropdown")?this.pdfViewer.formDesignerModule.setFormFieldMode("DropDown"):-1!==e.item.id.indexOf("listbox")?this.pdfViewer.formDesignerModule.setFormFieldMode("ListBox"):-1!==e.item.id.indexOf("signature")?this.pdfViewer.formDesignerModule.setFormFieldMode("SignatureField"):-1!==e.item.id.indexOf("close")?this.pdfViewer.toolbarModule.formDesignerToolbarModule.showFormDesignerToolbar(this.pdfViewer.toolbarModule.formDesignerItem):-1!==e.item.id.indexOf("delete")&&(this.pdfViewer.formDesignerModule.deleteFormField(this.pdfViewer.selectedItems.formFields[0]),this.showHideDeleteIcon(!1)),this.pdfViewer.selectedItems.formFields.length>0&&this.pdfViewer.clearSelection(this.pdfViewer.selectedItems.formFields[0].pageIndex))},e.prototype.clickSignature=function(e){this.pdfViewer.formDesignerModule.setFormFieldMode("SignatureField")},e.prototype.clickInitial=function(e){this.pdfViewer.isInitialFieldToolbarSelection=!0,this.pdfViewer.formDesignerModule.setFormFieldMode("InitialField"),this.pdfViewer.isInitialFieldToolbarSelection=!1},e.prototype.afterToolbarCreation=function(){this.textboxItem=this.primaryToolbar.addClassToolbarItem("_formdesigner_textbox","e-pv-formdesigner-textbox",this.pdfViewer.localeObj.getConstant("Textbox")),this.passwordItem=this.primaryToolbar.addClassToolbarItem("_formdesigner_passwordfield","e-pv-formdesigner-passwordfield",this.pdfViewer.localeObj.getConstant("Password")),this.checkboxItem=this.primaryToolbar.addClassToolbarItem("_formdesigner_checkbox","e-pv-formdesigner-checkbox",this.pdfViewer.localeObj.getConstant("Check Box")),this.radioButtonItem=this.primaryToolbar.addClassToolbarItem("_formdesigner_radiobutton","e-pv-formdesigner-radiobutton",this.pdfViewer.localeObj.getConstant("Radio Button")),this.dropdownItem=this.primaryToolbar.addClassToolbarItem("_formdesigner_dropdown","e-pv-formdesigner-dropdown",this.pdfViewer.localeObj.getConstant("Dropdown")),this.listboxItem=this.primaryToolbar.addClassToolbarItem("_formdesigner_listbox","e-pv-formdesigner-listbox",this.pdfViewer.localeObj.getConstant("List Box")),this.deleteItem=this.primaryToolbar.addClassToolbarItem("_formdesigner_delete","e-pv-formdesigner-delete",this.pdfViewer.localeObj.getConstant("Delete FormField")),this.closeItem=this.primaryToolbar.addClassToolbarItem("_formdesigner_close","e-pv-annotation-tools-close",null),this.showHideDeleteIcon(!1)},e.prototype.showHideDeleteIcon=function(e){this.toolbar.enableItems(this.deleteItem.parentElement,e)},e.prototype.applyFormDesignerToolbarSettings=function(){this.pdfViewer.toolbarSettings.formDesignerToolbarItems&&(-1!==this.pdfViewer.toolbarSettings.formDesignerToolbarItems.indexOf("TextboxTool")?this.showTextboxTool(!0):this.showTextboxTool(!1),-1!==this.pdfViewer.toolbarSettings.formDesignerToolbarItems.indexOf("PasswordTool")?this.showPasswordTool(!0):this.showPasswordTool(!1),-1!==this.pdfViewer.toolbarSettings.formDesignerToolbarItems.indexOf("CheckBoxTool")?this.showCheckboxTool(!0):this.showCheckboxTool(!1),-1!==this.pdfViewer.toolbarSettings.formDesignerToolbarItems.indexOf("RadioButtonTool")?this.showRadioButtonTool(!0):this.showRadioButtonTool(!1),-1!==this.pdfViewer.toolbarSettings.formDesignerToolbarItems.indexOf("DropdownTool")?this.showDropdownTool(!0):this.showDropdownTool(!1),-1!==this.pdfViewer.toolbarSettings.formDesignerToolbarItems.indexOf("ListboxTool")?this.showListboxTool(!0):this.showListboxTool(!1),-1!==this.pdfViewer.toolbarSettings.formDesignerToolbarItems.indexOf("DrawSignatureTool")?this.showDrawSignatureTool(!0):this.showDrawSignatureTool(!1),-1!==this.pdfViewer.toolbarSettings.formDesignerToolbarItems.indexOf("DeleteTool")?this.showDeleteTool(!0):this.showDeleteTool(!1),this.showSeparator())},e.prototype.showTextboxTool=function(e){this.isTextboxBtnVisible=e,this.applyHideToToolbar(e,0,0)},e.prototype.showPasswordTool=function(e){this.isPasswordBtnVisible=e,this.applyHideToToolbar(e,1,1)},e.prototype.showCheckboxTool=function(e){this.isCheckboxBtnVisible=e,this.applyHideToToolbar(e,2,2)},e.prototype.showRadioButtonTool=function(e){this.isRadiobuttonBtnVisible=e,this.applyHideToToolbar(e,3,3)},e.prototype.showDropdownTool=function(e){this.isDropdownBtnVisible=e,this.applyHideToToolbar(e,4,4)},e.prototype.showListboxTool=function(e){this.isListboxBtnVisible=e,this.applyHideToToolbar(e,5,5)},e.prototype.showDrawSignatureTool=function(e){this.isSignatureBtnVisible=e,this.applyHideToToolbar(e,6,6)},e.prototype.showDeleteTool=function(e){this.isDeleteBtnVisible=e,this.applyHideToToolbar(e,8,8)},e.prototype.showSeparator=function(){this.isSignatureBtnVisible||this.isDeleteBtnVisible||this.applyHideToToolbar(!1,7,7)},e.prototype.applyHideToToolbar=function(e,t,i){for(var n=!e,o=t;o<=i;o++)this.toolbar.hideItem(o,n)},e.prototype.createDropDowns=function(){},e}(),ri=function(){function e(e,i){var n=this;this.isPageNavigationToolDisabled=!1,this.isMagnificationToolDisabled=!1,this.isSelectionToolDisabled=!1,this.isScrollingToolDisabled=!1,this.isOpenBtnVisible=!0,this.isNavigationToolVisible=!0,this.isMagnificationToolVisible=!0,this.isSelectionBtnVisible=!0,this.isScrollingBtnVisible=!0,this.isDownloadBtnVisible=!0,this.isPrintBtnVisible=!0,this.isSearchBtnVisible=!0,this.isTextSearchBoxDisplayed=!1,this.isUndoRedoBtnsVisible=!0,this.isAnnotationEditBtnVisible=!0,this.isFormDesignerEditBtnVisible=!0,this.isCommentBtnVisible=!0,this.isSubmitbtnvisible=!0,this.onToolbarKeydown=function(e){var t=e.target.id;t!==n.pdfViewer.element.id+"_currentPageInput"&&t!==n.pdfViewer.element.id+"_zoomDropDown"&&(e.preventDefault(),e.stopPropagation())},this.toolbarClickHandler=function(e){if(!t.Browser.isDevice||n.pdfViewer.enableDesktopMode)if(e.originalEvent.target===n.zoomDropdownItem.parentElement.childNodes[1]||e.originalEvent.target===n.zoomDropdownItem.parentElement.childNodes[2])e.cancel=!0;else if(e.originalEvent.target.id===n.pdfViewer.element.id+"_openIcon"){var i=e.originalEvent.target.parentElement.dataset;if(i&&i.tooltipId){var o=document.getElementById(i.tooltipId);o&&(o.style.display="none")}}n.handleToolbarBtnClick(e);var s=e.originalEvent.target;!t.Browser.isDevice||n.pdfViewer.enableDesktopMode?e.originalEvent.target!==n.zoomDropdownItem.parentElement.childNodes[1]&&e.originalEvent.target!==n.zoomDropdownItem.parentElement.childNodes[2]&&e.originalEvent.target!==n.currentPageBoxElement&&e.originalEvent.target!==n.textSearchItem.childNodes[0]&&s.parentElement.id!==n.pdfViewer.element.id+"_toolbarContainer_nav"&&s.id!==n.pdfViewer.element.id+"_toolbarContainer_nav"&&(e.originalEvent.target.blur(),n.pdfViewerBase.focusViewerContainer()):(e.originalEvent.target.blur(),n.pdfViewerBase.focusViewerContainer())},this.loadDocument=function(e){var t=e.target.files;if(null!==e.target.files[0]){var i=t[0];if(i){n.uploadedDocumentName=i.name;var o=new FileReader;o.readAsDataURL(i),o.onload=function(e){var t=e.currentTarget.result;n.pdfViewer.load(t,null)}}}},this.navigateToPage=function(e){if(13===e.which){var t=parseInt(n.currentPageBoxElement.value);null!==t&&t>0&&t<=n.pdfViewerBase.pageCount?n.pdfViewer.navigationModule&&n.pdfViewer.navigationModule.goToPage(t):n.updateCurrentPage(n.pdfViewerBase.currentPageNumber),n.currentPageBoxElement.blur(),n.pdfViewerBase.focusViewerContainer()}},this.textBoxFocusOut=function(){(null===n.currentPageBox.value||n.currentPageBox.value>=n.pdfViewerBase.pageCount||n.currentPageBox.value!==n.pdfViewerBase.currentPageNumber)&&n.updateCurrentPage(n.pdfViewerBase.currentPageNumber)},this.pdfViewer=e,this.pdfViewerBase=i}return e.prototype.intializeToolbar=function(e){var i;return t.isBlazor()?t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(i=this.pdfViewer.element.querySelector(".e-pv-toolbar"),this.toolbarElement=i):i=this.createToolbar(e),!!document.documentMode&&(t.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.totalPageElement.classList.add("e-pv-total-page-ms"):t.Browser.isDevice||this.totalPageItem.classList.add("e-pv-total-page-ms")),this.createFileElement(i),this.wireEvent(),t.isBlazor()?(t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.initialEnableItems(),this.pdfViewerBase.navigationPane.adjustPane(),this.pdfViewer.enableToolbar&&this.bindOpenIconEvent()),this.annotationToolbarModule=new li(this.pdfViewer,this.pdfViewerBase,this),(this.pdfViewer.enableToolbar&&this.pdfViewer.enableAnnotationToolbar||this.pdfViewer.enableDesktopMode&&t.Browser.isDevice)&&this.annotationToolbarModule.afterAnnotationToolbarCreationInBlazor()):(this.updateToolbarItems(),!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?(this.applyToolbarSettings(),this.initialEnableItems(),this.pdfViewerBase.navigationPane.adjustPane()):this.initialEnableItems(),this.pdfViewer.annotationModule&&(this.annotationToolbarModule=new li(this.pdfViewer,this.pdfViewerBase,this),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||this.annotationToolbarModule.initializeAnnotationToolbar()),this.pdfViewer.formDesignerModule&&(this.formDesignerToolbarModule=new ai(this.pdfViewer,this.pdfViewerBase,this),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||this.formDesignerToolbarModule.initializeFormDesignerToolbar())),i},e.prototype.bindOpenIconEvent=function(){var e=document.getElementById(this.pdfViewer.element.id+"_open");e&&e.addEventListener("click",this.openFileDialogBox.bind(this))},e.prototype.InitializeMobileToolbarInBlazor=function(){var e;e=this.pdfViewer.element.querySelector(".e-pv-mobile-toolbar"),this.createFileElement(e),this.wireEvent()},e.prototype.showToolbar=function(e){var i=this.toolbarElement;e?(i.style.display="block",t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.hideMobileAnnotationToolbar()):(this.pdfViewerBase.toolbarHeight=0,t.Browser.isDevice&&this.pdfViewer.toolbarModule.annotationToolbarModule.toolbar&&(this.annotationToolbarModule.toolbarCreated=!1,this.annotationToolbarModule.adjustMobileViewer(),this.pdfViewer.toolbarModule.annotationToolbarModule.toolbar.element.style.display="none"),t.Browser.isDevice&&this.annotationToolbarModule.propertyToolbar&&(this.annotationToolbarModule.propertyToolbar.element.style.display="none"),i.style.display="none")},e.prototype.showNavigationToolbar=function(e){if(!t.Browser.isDevice||this.pdfViewer.enableDesktopMode){var i=this.pdfViewerBase.navigationPane.sideBarToolbar,n=this.pdfViewerBase.navigationPane.sideBarToolbarSplitter;e?(i.style.display="block",n.style.display="block",(this.pdfViewerBase.navigationPane.isBookmarkOpen||this.pdfViewerBase.navigationPane.isThumbnailOpen)&&this.pdfViewerBase.navigationPane.clear()):(i.style.display="none",n.style.display="none",(this.pdfViewerBase.navigationPane.isBookmarkOpen||this.pdfViewerBase.navigationPane.isThumbnailOpen)&&this.pdfViewerBase.navigationPane.updateViewerContainerOnClose())}},e.prototype.showAnnotationToolbar=function(e){e?(this.annotationToolbarModule.isToolbarHidden=!0,this.annotationToolbarModule.showAnnotationToolbar()):(this.annotationToolbarModule.isToolbarHidden=!1,this.annotationToolbarModule.showAnnotationToolbar())},e.prototype.showToolbarItem=function(e,t){for(var i=0;i<e.length;i++)switch(e[i]){case"OpenOption":this.showOpenOption(t);break;case"PageNavigationTool":this.showPageNavigationTool(t);break;case"MagnificationTool":this.showMagnificationTool(t);break;case"SelectionTool":this.showSelectionTool(t);break;case"PanTool":this.showScrollingTool(t);break;case"DownloadOption":this.showDownloadOption(t);break;case"PrintOption":this.showPrintOption(t);break;case"SearchOption":this.showSearchOption(t);break;case"UndoRedoTool":this.showUndoRedoTool(t);break;case"AnnotationEditTool":this.showAnnotationEditTool(t);break;case"CommentTool":this.showCommentOption(t);break;case"SubmitForm":this.showSubmitForm(t)}this.applyHideToToolbar(!0,1,1),this.applyHideToToolbar(!0,8,8),this.applyHideToToolbar(!0,12,12),this.applyHideToToolbar(!0,15,15),this.showSeparator(e)},e.prototype.enableToolbarItem=function(e,t){for(var i=0;i<e.length;i++)switch(e[i]){case"OpenOption":this.enableOpenOption(t);break;case"PageNavigationTool":this.isPageNavigationToolDisabled=t,this.enablePageNavigationTool(t);break;case"MagnificationTool":this.isMagnificationToolDisabled=t,this.enableMagnificationTool(t);break;case"SelectionTool":this.isSelectionToolDisabled=t,this.enableSelectionTool(t);break;case"PanTool":this.isScrollingToolDisabled=t,this.enableScrollingTool(t);break;case"DownloadOption":this.enableDownloadOption(t);break;case"PrintOption":this.enablePrintOption(t);break;case"SearchOption":this.enableSearchOption(t);break;case"UndoRedoTool":this.enableUndoRedoTool(t);break;case"AnnotationEditTool":this.enableAnnotationEditTool(t);break;case"FormDesignerEditTool":this.enableFormDesignerEditTool(t);break;case"CommentTool":this.enableCommentsTool(t)}},e.prototype.DisableToolbarItems=function(e,t){switch(e){case"Print":this.enablePrintOption(t);break;case"CopyContent":this.isSelectionToolDisabled=t,this.enableSelectionTool(t),t?(this.pdfViewerBase.initiateTextSelectMode(),this.updateInteractionTools(t)):(this.pdfViewerBase.initiatePanning(),this.updateInteractionTools(t));break;case"EditAnnotations":this.enableAnnotationEditTool(t)}},e.prototype.showOpenOption=function(e){this.isOpenBtnVisible=e,this.applyHideToToolbar(e,0,0)},e.prototype.showPageNavigationTool=function(e){this.isNavigationToolVisible=e,this.applyHideToToolbar(e,2,7)},e.prototype.showMagnificationTool=function(e){this.isMagnificationToolVisible=e,this.applyHideToToolbar(e,9,11)},e.prototype.showSelectionTool=function(e){this.isSelectionBtnVisible=e,this.applyHideToToolbar(e,13,13)},e.prototype.showScrollingTool=function(e){this.isScrollingBtnVisible=e,this.applyHideToToolbar(e,14,14)},e.prototype.showDownloadOption=function(e){this.isDownloadBtnVisible=e,!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.applyHideToToolbar(e,26,26):this.applyHideToToolbar(e,5,5)},e.prototype.showPrintOption=function(e){this.isPrintBtnVisible=e,this.applyHideToToolbar(e,25,25)},e.prototype.showSearchOption=function(e){this.isSearchBtnVisible=e,!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.applyHideToToolbar(e,22,22):this.applyHideToToolbar(e,4,4)},e.prototype.showUndoRedoTool=function(e){this.isUndoRedoBtnsVisible=e,!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.applyHideToToolbar(e,16,17):this.applyHideToToolbar(e,2,3)},e.prototype.showCommentOption=function(e){this.pdfViewer.enableStickyNotesAnnotation?(this.isCommentBtnVisible=e,this.applyHideToToolbar(e,18,19)):(this.isCommentBtnVisible=e,this.applyHideToToolbar(this.pdfViewer.enableStickyNotesAnnotation,18,19))},e.prototype.showAnnotationEditTool=function(e){this.isAnnotationEditBtnVisible=e,this.applyHideToToolbar(e,23,23)},e.prototype.showFormDesignerEditTool=function(e){this.isFormDesignerEditBtnVisible=e,this.applyHideToToolbar(e,24,24)},e.prototype.showSubmitForm=function(e){this.isSubmitbtnvisible=e,this.applyHideToToolbar(e,20,21)},e.prototype.enableOpenOption=function(e){this.toolbar.enableItems(this.openDocumentItem.parentElement,e)},e.prototype.enablePageNavigationTool=function(e){this.toolbar.enableItems(this.firstPageItem.parentElement,e),this.toolbar.enableItems(this.previousPageItem.parentElement,e),this.toolbar.enableItems(this.nextPageItem.parentElement,e),this.toolbar.enableItems(this.lastPageItem.parentElement,e),this.currentPageBox.readonly=!e},e.prototype.enableMagnificationTool=function(e){this.toolbar.enableItems(this.zoomInItem.parentElement,e),this.toolbar.enableItems(this.zoomOutItem.parentElement,e),this.zoomDropDown.readonly=!e},e.prototype.enableSelectionTool=function(e){this.toolbar.enableItems(this.textSelectItem.parentElement,e)},e.prototype.enableScrollingTool=function(e){this.toolbar.enableItems(this.panItem.parentElement,e)},e.prototype.enableDownloadOption=function(e){this.toolbar.enableItems(this.downloadItem.parentElement,e)},e.prototype.enablePrintOption=function(e){this.toolbar.enableItems(this.printItem.parentElement,e)},e.prototype.enableSearchOption=function(e){this.toolbar.enableItems(this.textSearchItem.parentElement,e)},e.prototype.enableUndoRedoTool=function(e){this.toolbar.enableItems(this.undoItem.parentElement,e),this.toolbar.enableItems(this.redoItem.parentElement,e)},e.prototype.enableAnnotationEditTool=function(e){this.toolbar.enableItems(this.annotationItem.parentElement,e)},e.prototype.enableFormDesignerEditTool=function(e){this.toolbar.enableItems(this.formDesignerItem.parentElement,e)},e.prototype.enableCommentsTool=function(e){this.pdfViewer.enableStickyNotesAnnotation&&this.toolbar.enableItems(this.annotationItem.parentElement,e)},e.prototype.resetToolbar=function(){if(!t.Browser.isDevice||this.pdfViewer.enableDesktopMode)if(this.currentPageBox.min=0,this.currentPageBox.value=0,this.updateTotalPage(),this.updateToolbarItems(),this.annotationToolbarModule)this.annotationToolbarModule.clear();else if(this.annotationToolbarModule){this.annotationToolbarModule.propertyToolbar&&this.annotationToolbarModule.propertyToolbar.destroy();var e=document.getElementById(this.pdfViewer.element.id+"_commentscontentcontainer");e&&(e.innerHTML="")}},e.prototype.updateToolbarItems=function(){!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.toolbar&&(0===this.pdfViewerBase.pageCount?(this.toolbar.enableItems(this.downloadItem.parentElement,!1),this.toolbar.enableItems(this.printItem.parentElement,!1),this.toolbar.enableItems(this.commentItem.parentElement,!1),this.updateUndoRedoButtons(),this.updateNavigationButtons(),this.toolbar.enableItems(this.zoomInItem.parentElement,!1),this.toolbar.enableItems(this.zoomOutItem.parentElement,!1),this.pdfViewer.magnificationModule&&(this.zoomDropDown.readonly=!0),this.toolbar.enableItems(this.submitItem.parentElement,!1),this.toolbar.enableItems(this.pdfViewerBase.getElement("_currentPageInputContainer"),!1),this.toolbar.enableItems(this.pdfViewerBase.getElement("_zoomDropDownContainer"),!1),this.toolbar.enableItems(this.textSelectItem.parentElement,!1),this.toolbar.enableItems(this.annotationItem.parentElement,!1),this.toolbar.enableItems(this.formDesignerItem.parentElement,!1),this.toolbar.enableItems(this.panItem.parentElement,!1),this.toolbar.enableItems(this.textSearchItem.parentElement,!1),this.deSelectItem(this.annotationItem),this.annotationToolbarModule&&this.annotationToolbarModule.resetToolbar(),this.deSelectItem(this.formDesignerItem)):this.pdfViewerBase.pageCount>0&&(this.toolbar.enableItems(this.downloadItem.parentElement,!0),this.toolbar.enableItems(this.printItem.parentElement,!0),this.toolbar.enableItems(this.pdfViewerBase.getElement("_currentPageInputContainer"),!0),this.toolbar.enableItems(this.pdfViewerBase.getElement("_zoomDropDownContainer"),!0),this.updateUndoRedoButtons(),this.updateNavigationButtons(),this.updateZoomButtons(),this.pdfViewer.magnificationModule&&(this.zoomDropDown.readonly=!1),this.updateInteractionItems(),this.pdfViewer.annotationModule&&this.pdfViewer.enableAnnotation&&this.toolbar.enableItems(this.annotationItem.parentElement,!0),this.pdfViewer.formDesignerModule&&this.pdfViewer.enableFormDesigner&&this.toolbar.enableItems(this.formDesignerItem.parentElement,!0),this.pdfViewer.textSearchModule&&this.pdfViewer.enableTextSearch&&this.toolbar.enableItems(this.textSearchItem.parentElement,!0),this.pdfViewer.annotationModule&&this.pdfViewer.enableStickyNotesAnnotation&&this.toolbar.enableItems(this.commentItem.parentElement,!0)),this.pdfViewer.toolbarSettings.annotationToolbarItems&&(0!==this.pdfViewer.toolbarSettings.annotationToolbarItems.length&&this.pdfViewer.annotationModule&&this.pdfViewer.enableAnnotationToolbar||this.enableToolbarItem(["AnnotationEditTool"],!1)),this.pdfViewer.toolbarSettings.formDesignerToolbarItems&&(0!==this.pdfViewer.toolbarSettings.formDesignerToolbarItems.length&&this.pdfViewer.formDesignerModule&&this.pdfViewer.enableFormDesignerToolbar||this.enableToolbarItem(["FormDesignerEditTool"],!1)),this.pdfViewer.enableDownload||this.enableDownloadOption(!1),this.pdfViewer.enablePrint||this.enablePrintOption(!1)):0===this.pdfViewerBase.pageCount?(this.toolbar.enableItems(this.textSearchItem.parentElement,!1),this.toolbar.enableItems(this.moreOptionItem.parentElement,!1),this.toolbar.enableItems(this.annotationItem.parentElement,!1)):this.pdfViewerBase.pageCount>0&&(this.toolbar.enableItems(this.textSearchItem.parentElement,!0),this.toolbar.enableItems(this.moreOptionItem.parentElement,!0),this.toolbar.enableItems(this.annotationItem.parentElement,!0),this.updateUndoRedoButtons())},e.prototype.updateNavigationButtons=function(){this.pdfViewer.navigationModule&&!this.isPageNavigationToolDisabled?0===this.pdfViewerBase.pageCount||1===this.pdfViewerBase.currentPageNumber&&1===this.pdfViewerBase.pageCount?(this.toolbar.enableItems(this.firstPageItem.parentElement,!1),this.toolbar.enableItems(this.previousPageItem.parentElement,!1),this.toolbar.enableItems(this.nextPageItem.parentElement,!1),this.toolbar.enableItems(this.lastPageItem.parentElement,!1)):1===this.pdfViewerBase.currentPageNumber&&this.pdfViewerBase.pageCount>0?(this.toolbar.enableItems(this.firstPageItem.parentElement,!1),this.toolbar.enableItems(this.previousPageItem.parentElement,!1),this.toolbar.enableItems(this.nextPageItem.parentElement,!0),this.toolbar.enableItems(this.lastPageItem.parentElement,!0)):this.pdfViewerBase.currentPageNumber===this.pdfViewerBase.pageCount&&this.pdfViewerBase.pageCount>0?(this.toolbar.enableItems(this.firstPageItem.parentElement,!0),this.toolbar.enableItems(this.previousPageItem.parentElement,!0),this.toolbar.enableItems(this.nextPageItem.parentElement,!1),this.toolbar.enableItems(this.lastPageItem.parentElement,!1)):this.pdfViewerBase.currentPageNumber>1&&this.pdfViewerBase.currentPageNumber<this.pdfViewerBase.pageCount&&(this.toolbar.enableItems(this.firstPageItem.parentElement,!0),this.toolbar.enableItems(this.previousPageItem.parentElement,!0),this.toolbar.enableItems(this.nextPageItem.parentElement,!0),this.toolbar.enableItems(this.lastPageItem.parentElement,!0)):(this.toolbar.enableItems(this.firstPageItem.parentElement,!1),this.toolbar.enableItems(this.previousPageItem.parentElement,!1),this.toolbar.enableItems(this.nextPageItem.parentElement,!1),this.toolbar.enableItems(this.lastPageItem.parentElement,!1),this.currentPageBox.readonly=!0)},e.prototype.updateZoomButtons=function(){!this.pdfViewer.magnificationModule||this.isMagnificationToolDisabled||t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.pdfViewer.magnificationModule.zoomFactor<=.1?(this.toolbar.enableItems(this.zoomInItem.parentElement,!0),this.toolbar.enableItems(this.zoomOutItem.parentElement,!1)):this.pdfViewer.magnificationModule.zoomFactor>=4?(this.toolbar.enableItems(this.zoomInItem.parentElement,!1),this.toolbar.enableItems(this.zoomOutItem.parentElement,!0)):(this.toolbar.enableItems(this.zoomInItem.parentElement,!0),this.toolbar.enableItems(this.zoomOutItem.parentElement,!0)))},e.prototype.updateUndoRedoButtons=function(){this.pdfViewer.annotationModule&&this.pdfViewerBase.pageCount>0?t.isBlazor()?(this.enableCollectionAvailableInBlazor(this.pdfViewer.annotationModule.actionCollection,"undo"),this.enableCollectionAvailableInBlazor(this.pdfViewer.annotationModule.redoCollection,"redo")):(this.enableCollectionAvailable(this.pdfViewer.annotationModule.actionCollection,this.undoItem.parentElement),this.enableCollectionAvailable(this.pdfViewer.annotationModule.redoCollection,this.redoItem.parentElement)):t.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.disableUndoRedoButton():this.disableUndoRedoButtons()},e.prototype.enableCollectionAvailable=function(e,t){e.length>0?this.toolbar.enableItems(t,!0):this.toolbar.enableItems(t,!1)},e.prototype.enableCollectionAvailableInBlazor=function(e,t){e.length>0?this.pdfViewerBase.blazorUIAdaptor.updateUndoRedoButton(t,!0):this.pdfViewerBase.blazorUIAdaptor.updateUndoRedoButton(t,!1)},e.prototype.disableUndoRedoButtons=function(){this.toolbar.enableItems(this.undoItem.parentElement,!1),this.toolbar.enableItems(this.redoItem.parentElement,!1)},e.prototype.destroy=function(){t.isBlazor()||(this.unWireEvent(),this.moreDropDown&&this.moreDropDown.destroy(),this.annotationToolbarModule&&this.annotationToolbarModule.destroy(),this.toolbar.destroy(),this.toolbarElement.remove())},e.prototype.updateCurrentPage=function(e){!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?(t.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.pageChanged(e):(this.currentPageBox.value===e&&(this.currentPageBoxElement.value=e.toString()),this.currentPageBox.value=e),this.pdfViewerBase.currentPageNumber=e,this.pdfViewer.currentPageNumber=e):(this.pdfViewerBase.mobileSpanContainer.innerHTML=e.toString(),this.pdfViewerBase.mobilecurrentPageContainer.innerHTML=e.toString())},e.prototype.updateTotalPage=function(){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.pdfViewerBase.pageCount>0&&(this.currentPageBox.min=1),this.totalPageItem.textContent=this.pdfViewer.localeObj.getConstant("of")+this.pdfViewerBase.pageCount.toString())},e.prototype.openFileDialogBox=function(e){e.preventDefault(),this.fileInputElement.click()},e.prototype.createToolbar=function(e){var i=this;return this.toolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_toolbarContainer",className:"e-pv-toolbar"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.toolbarElement),!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?(this.toolbar=new r.Toolbar({clicked:this.toolbarClickHandler,width:"",height:"",overflowMode:"Popup",items:this.createToolbarItems(),created:function(){i.createZoomDropdown(),i.createNumericTextBox(),i.toolbar.refreshOverflow()}}),this.toolbar.isStringTemplate=!0,this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.toolbar.appendTo(this.toolbarElement),this.applyToolbarSettings(),this.afterToolbarCreation(),this.updateTotalPage(),this.toolbarElement.addEventListener("keydown",this.onToolbarKeydown)):(this.createToolbarItemsForMobile(),this.afterToolbarCreationInMobile(),this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.applyToolbarSettings(),this.disableUndoRedoButtons()),this.toolbarElement},e.prototype.createToolbarItems=function(){var e=this.createCurrentPageInputTemplate(),t=this.createTotalPageTemplate(),i=this.createZoomDropdownElement(),n=[],o='<button id="'+this.pdfViewer.element.id+'_submitForm" class="e-tbar-btn"> Submit Form</button>';return n.push({prefixIcon:"e-pv-open-document-icon e-pv-icon",cssClass:"e-pv-open-document-container",id:this.pdfViewer.element.id+"_open",text:this.pdfViewer.localeObj.getConstant("Open text"),align:"Left"}),n.push({type:"Separator",align:"Left",cssClass:"e-pv-open-separator-container"}),this.pdfViewer.enableRtl?(n.push({prefixIcon:"e-pv-last-page-navigation-icon e-pv-icon",cssClass:"e-pv-last-page-navigation-container",id:this.pdfViewer.element.id+"_firstPage",text:this.pdfViewer.localeObj.getConstant("First text"),align:"Left"}),n.push({prefixIcon:"e-pv-next-page-navigation-icon e-pv-icon",cssClass:"e-pv-next-page-navigation-container",id:this.pdfViewer.element.id+"_previousPage",text:this.pdfViewer.localeObj.getConstant("Previous text"),align:"Left"}),n.push({prefixIcon:"e-pv-previous-page-navigation-icon e-pv-icon",cssClass:"e-pv-previous-page-navigation-container",id:this.pdfViewer.element.id+"_nextPage",text:this.pdfViewer.localeObj.getConstant("Next text"),align:"Left"}),n.push({prefixIcon:"e-pv-first-page-navigation-icon e-pv-icon",cssClass:"e-pv-first-page-navigation-container",id:this.pdfViewer.element.id+"_lastPage",text:this.pdfViewer.localeObj.getConstant("Last text"),align:"Left"}),n.push({template:t,align:"Left",cssClass:"e-pv-total-page-container"}),n.push({template:e,align:"Left",cssClass:"e-pv-current-page-container"})):(n.push({prefixIcon:"e-pv-first-page-navigation-icon e-pv-icon",cssClass:"e-pv-first-page-navigation-container",id:this.pdfViewer.element.id+"_firstPage",text:this.pdfViewer.localeObj.getConstant("First text"),align:"Left"}),n.push({prefixIcon:"e-pv-previous-page-navigation-icon e-pv-icon",cssClass:"e-pv-previous-page-navigation-container",id:this.pdfViewer.element.id+"_previousPage",text:this.pdfViewer.localeObj.getConstant("Previous text"),align:"Left"}),n.push({prefixIcon:"e-pv-next-page-navigation-icon e-pv-icon",cssClass:"e-pv-next-page-navigation-container",id:this.pdfViewer.element.id+"_nextPage",text:this.pdfViewer.localeObj.getConstant("Next text"),align:"Left"}),n.push({prefixIcon:"e-pv-last-page-navigation-icon e-pv-icon",cssClass:"e-pv-last-page-navigation-container",id:this.pdfViewer.element.id+"_lastPage",text:this.pdfViewer.localeObj.getConstant("Last text"),align:"Left"}),n.push({template:e,align:"Left",cssClass:"e-pv-current-page-container"}),n.push({template:t,align:"Left",cssClass:"e-pv-total-page-container"})),n.push({type:"Separator",align:"Left",cssClass:"e-pv-navigation-separator-container"}),n.push({prefixIcon:"e-pv-zoom-out-icon e-pv-icon",cssClass:"e-pv-zoom-out-container",id:this.pdfViewer.element.id+"_zoomOut",text:this.pdfViewer.localeObj.getConstant("Zoom out text"),align:"Left"}),n.push({prefixIcon:"e-pv-zoom-in-icon e-pv-icon",cssClass:"e-pv-zoom-in-container",id:this.pdfViewer.element.id+"_zoomIn",text:this.pdfViewer.localeObj.getConstant("Zoom in text"),align:"Left"}),n.push({template:i,cssClass:"e-pv-zoom-drop-down-container",align:"Left"}),n.push({type:"Separator",align:"Left",cssClass:"e-pv-magnification-separator-container"}),n.push({prefixIcon:"e-pv-text-select-tool-icon e-pv-icon",cssClass:"e-pv-text-select-tool-container",id:this.pdfViewer.element.id+"_selectTool",text:this.pdfViewer.localeObj.getConstant("Selection text")}),n.push({prefixIcon:"e-pv-pan-tool-icon e-pv-icon",cssClass:"e-pv-pan-tool-container",id:this.pdfViewer.element.id+"_handTool",text:this.pdfViewer.localeObj.getConstant("Pan text")}),n.push({type:"Separator",align:"Left",cssClass:"e-pv-pan-separator-container"}),n.push({prefixIcon:"e-pv-undo-icon e-pv-icon",cssClass:"e-pv-undo-container",id:this.pdfViewer.element.id+"_undo",text:this.pdfViewer.localeObj.getConstant("Undo"),align:"Left"}),n.push({prefixIcon:"e-pv-redo-icon e-pv-icon",cssClass:"e-pv-redo-container",id:this.pdfViewer.element.id+"_redo",text:this.pdfViewer.localeObj.getConstant("Redo"),align:"Left"}),n.push({type:"Separator",align:"Left",cssClass:"e-pv-undo-separator-container"}),n.push({prefixIcon:"e-pv-comment-icon e-pv-icon",cssClass:"e-pv-comment-container",id:this.pdfViewer.element.id+"_comment",text:this.pdfViewer.localeObj.getConstant("Add Comments"),align:"Left"}),n.push({type:"Separator",align:"Left",cssClass:"e-pv-comment-separator-container"}),n.push({template:o,cssClass:"e-pv-submit",align:"Left"}),n.push({prefixIcon:"e-pv-text-search-icon e-pv-icon",cssClass:"e-pv-text-search-container",id:this.pdfViewer.element.id+"_search",text:this.pdfViewer.localeObj.getConstant("Search text"),align:"Right"}),n.push({prefixIcon:"e-pv-annotation-icon e-pv-icon",cssClass:"e-pv-annotation-container",id:this.pdfViewer.element.id+"_annotation",text:this.pdfViewer.localeObj.getConstant("Annotation Edit text"),align:"Right"}),n.push({prefixIcon:"e-pv-formdesigner-icon e-pv-icon",cssClass:"e-pv-formdesigner-container",id:this.pdfViewer.element.id+"_formdesigner",text:this.pdfViewer.localeObj.getConstant("FormDesigner Edit text"),align:"Right"}),n.push({prefixIcon:"e-pv-print-document-icon e-pv-icon",cssClass:"e-pv-print-document-container",id:this.pdfViewer.element.id+"_print",text:this.pdfViewer.localeObj.getConstant("Print text"),align:"Right"}),n.push({prefixIcon:"e-pv-download-document-icon e-pv-icon",cssClass:"e-pv-download-document-container",id:this.pdfViewer.element.id+"_download",text:this.pdfViewer.localeObj.getConstant("Download"),align:"Right"}),n},e.prototype.afterToolbarCreationInMobile=function(){this.itemsContainer=this.toolbar.element.childNodes[0],this.itemsContainer.id=this.pdfViewer.element.id+"_toolbarItemsContainer",this.openDocumentItem=this.addClassToolbarItem("_open","e-pv-open-document",this.pdfViewer.localeObj.getConstant("Open")),this.undoItem=this.addClassToolbarItem("_undo","e-pv-undo",this.pdfViewer.localeObj.getConstant("Undo")),this.redoItem=this.addClassToolbarItem("_redo","e-pv-redo",this.pdfViewer.localeObj.getConstant("Redo")),this.annotationItem=this.addClassToolbarItem("_annotation","e-pv-annotation",this.pdfViewer.localeObj.getConstant("Annotation"))},e.prototype.afterToolbarCreation=function(){this.itemsContainer=this.toolbar.element.childNodes[0],this.itemsContainer.id=this.pdfViewer.element.id+"_toolbarItemsContainer",this.openDocumentItem=this.addClassToolbarItem("_open","e-pv-open-document",this.pdfViewer.localeObj.getConstant("Open")),this.undoItem=this.addClassToolbarItem("_undo","e-pv-undo",this.pdfViewer.localeObj.getConstant("Undo")),this.redoItem=this.addClassToolbarItem("_redo","e-pv-redo",this.pdfViewer.localeObj.getConstant("Redo")),this.pdfViewer.enableRtl?(this.firstPageItem=this.addClassToolbarItem("_firstPage","e-pv-last-page-navigation",this.pdfViewer.localeObj.getConstant("Go To First Page")),this.previousPageItem=this.addClassToolbarItem("_previousPage","e-pv-next-page-navigation",this.pdfViewer.localeObj.getConstant("Previous Page")),this.nextPageItem=this.addClassToolbarItem("_nextPage","e-pv-previous-page-navigation",this.pdfViewer.localeObj.getConstant("Next Page")),this.lastPageItem=this.addClassToolbarItem("_lastPage","e-pv-first-page-navigation",this.pdfViewer.localeObj.getConstant("Go To Last Page"))):(this.firstPageItem=this.addClassToolbarItem("_firstPage","e-pv-first-page-navigation",this.pdfViewer.localeObj.getConstant("Go To First Page")),this.previousPageItem=this.addClassToolbarItem("_previousPage","e-pv-previous-page-navigation",this.pdfViewer.localeObj.getConstant("Previous Page")),this.nextPageItem=this.addClassToolbarItem("_nextPage","e-pv-next-page-navigation",this.pdfViewer.localeObj.getConstant("Next Page")),this.lastPageItem=this.addClassToolbarItem("_lastPage","e-pv-last-page-navigation",this.pdfViewer.localeObj.getConstant("Go To Last Page"))),this.zoomOutItem=this.addClassToolbarItem("_zoomOut","e-pv-zoom-out",this.pdfViewer.localeObj.getConstant("Zoom Out")),this.zoomInItem=this.addClassToolbarItem("_zoomIn","e-pv-zoom-in",this.pdfViewer.localeObj.getConstant("Zoom In")),this.textSelectItem=this.addClassToolbarItem("_selectTool","e-pv-text-select-tool",this.pdfViewer.localeObj.getConstant("Text Selection")),this.panItem=this.addClassToolbarItem("_handTool","e-pv-pan-tool",this.pdfViewer.localeObj.getConstant("Panning")),this.commentItem=this.addClassToolbarItem("_comment","e-pv-comment",this.pdfViewer.localeObj.getConstant("Add Comments")),this.textSearchItem=this.addClassToolbarItem("_search","e-pv-text-search",this.pdfViewer.localeObj.getConstant("Text Search")),this.annotationItem=this.addClassToolbarItem("_annotation","e-pv-annotation",this.pdfViewer.localeObj.getConstant("Annotation")),this.formDesignerItem=this.addClassToolbarItem("_formdesigner","e-pv-formdesigner",this.pdfViewer.localeObj.getConstant("FormDesigner")),this.printItem=this.addClassToolbarItem("_print","e-pv-print-document",this.pdfViewer.localeObj.getConstant("Print")),this.downloadItem=this.addClassToolbarItem("_download","e-pv-download-document",this.pdfViewer.localeObj.getConstant("Download file")),this.zoomDropdownItem=this.pdfViewerBase.getElement("_zoomDropDown"),this.createTooltip(this.zoomDropdownItem,this.pdfViewer.localeObj.getConstant("Zoom")),this.zoomDropdownItem.setAttribute("aria-label",this.pdfViewer.localeObj.getConstant("Zoom")),this.addPropertiesToolItemContainer(this.zoomDropdownItem.parentElement.parentElement,null,"_zoomDropDownContainer"),this.pdfViewerBase.getElement("_zoomDropDownContainer").style.minWidth="",this.createTooltip(this.currentPageBoxElement,this.pdfViewer.localeObj.getConstant("Page Number")),this.currentPageBoxElement.setAttribute("aria-label",this.pdfViewer.localeObj.getConstant("Page Number")),this.submitItem=this.pdfViewerBase.getElement("_submitForm"),this.addPropertiesToolItemContainer(this.submitItem.parentElement,"e-pv-submit","_submitForm"),this.createTooltip(this.submitItem,this.pdfViewer.localeObj.getConstant("SubmitForm")),this.addPropertiesToolItemContainer(this.currentPageBoxElement.parentElement.parentElement,"e-pv-current-page-container","_currentPageInputContainer"),this.pdfViewerBase.getElement("_currentPageInputContainer").style.minWidth="20px",this.totalPageItem=this.pdfViewerBase.getElement("_totalPage"),this.addPropertiesToolItemContainer(this.totalPageItem.parentElement,"e-pv-total-page-container","_totalPageContainer")},e.prototype.addClassToolbarItem=function(e,t,i){var n=this.pdfViewerBase.getElement(e);if(n.classList.add(t),n.classList.add("e-pv-tbar-btn"),n.setAttribute("aria-label",i),n.parentElement.classList.add(t+"-container"),n.parentElement.classList.add("e-popup-text"),n.parentElement.id=this.pdfViewer.element.id+e+"Container",n.childNodes.length>0){var o=n.childNodes[0];o.id=this.pdfViewer.element.id+e+"Icon",o.classList.remove("e-icons"),o.classList.remove("e-btn-icon"),this.pdfViewer.enableRtl&&o.classList.add("e-right");var s=n.childNodes[1];s&&s.classList.contains("e-tbar-btn-text")&&(s.id=this.pdfViewer.element.id+e+"Text")}return n.style.width="",this.createTooltip(n,i),n},e.prototype.addPropertiesToolItemContainer=function(e,t,i){null!==t&&e.classList.add(t),e.classList.add("e-popup-text"),e.id=this.pdfViewer.element.id+i},e.prototype.createZoomDropdownElement=function(){return this.createToolbarItem("input",this.pdfViewer.element.id+"_zoomDropDown",null).outerHTML},e.prototype.createZoomDropdown=function(){var e=[{percent:"10%",id:"0"},{percent:"25%",id:"1"},{percent:"50%",id:"2"},{percent:"75%",id:"3"},{percent:"100%",id:"4"},{percent:"125%",id:"5"},{percent:"150%",id:"6"},{percent:"200%",id:"7"},{percent:"400%",id:"8"},{percent:this.pdfViewer.localeObj.getConstant("Fit Page"),id:"9"},{percent:this.pdfViewer.localeObj.getConstant("Fit Width"),id:"10"},{percent:this.pdfViewer.localeObj.getConstant("Automatic"),id:"11"}];this.zoomDropDown=new u.ComboBox({dataSource:e,text:"100%",fields:{text:"percent",value:"id"},readonly:!0,cssClass:"e-pv-zoom-drop-down",popupHeight:"450px",showClearButton:!1,select:function(e){"keydown"==e.e.type&&e.itemData.text!==this.zoomDropDown.element.value&&(e.cancel=!0)}}),this.zoomDropDown.appendTo(this.pdfViewerBase.getElement("_zoomDropDown"))},e.prototype.createCurrentPageInputTemplate=function(){return this.createToolbarItem("input",this.pdfViewer.element.id+"_currentPageInput",null).outerHTML},e.prototype.createTotalPageTemplate=function(){return this.createToolbarItem("span",this.pdfViewer.element.id+"_totalPage","e-pv-total-page").outerHTML},e.prototype.createNumericTextBox=function(){this.currentPageBox=new n.NumericTextBox({value:0,format:"##",cssClass:"e-pv-current-page-box",showSpinButton:!1}),this.currentPageBoxElement=this.pdfViewerBase.getElement("_currentPageInput"),this.currentPageBox.appendTo(this.currentPageBoxElement)},e.prototype.createToolbarItemsForMobile=function(){this.toolbarElement.classList.add("e-pv-mobile-toolbar");var e='<button id="'+this.pdfViewer.element.id+'_more_option" class="e-tbar-btn"></button>';this.toolbar=new r.Toolbar({items:[{prefixIcon:"e-pv-open-document-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Open"),id:this.pdfViewer.element.id+"_open"},{type:"Separator",align:"Left"},{prefixIcon:"e-pv-undo-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Undo"),id:this.pdfViewer.element.id+"_undo"},{prefixIcon:"e-pv-redo-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Redo"),id:this.pdfViewer.element.id+"_redo"},{prefixIcon:"e-pv-annotation-icon e-pv-icon",cssClass:"e-pv-annotation-container",tooltipText:this.pdfViewer.localeObj.getConstant("Annotation"),id:this.pdfViewer.element.id+"_annotation",align:"Right"},{prefixIcon:"e-pv-text-search-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Text Search"),id:this.pdfViewer.element.id+"_search",align:"Right"},{template:e,align:"Right"}],clicked:this.toolbarClickHandler,width:"",height:"",overflowMode:"Popup"}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.toolbarElement),this.openDocumentItem=this.pdfViewerBase.getElement("_open"),this.openDocumentItem.classList.add("e-pv-open-document"),this.openDocumentItem.firstElementChild.id=this.pdfViewer.element.id+"_openIcon",this.annotationItem=this.pdfViewerBase.getElement("_annotation"),this.annotationItem.classList.add("e-pv-annotation"),this.annotationItem.firstElementChild.id=this.pdfViewer.element.id+"_annotationIcon",this.textSearchItem=this.pdfViewerBase.getElement("_search"),this.textSearchItem.classList.add("e-pv-text-search"),this.textSearchItem.firstElementChild.id=this.pdfViewer.element.id+"_searchIcon",this.undoItem=this.pdfViewerBase.getElement("_undo"),this.undoItem.classList.add("e-pv-undo"),this.redoItem=this.pdfViewerBase.getElement("_redo"),this.redoItem.classList.add("e-pv-redo"),this.redoItem.firstElementChild.id=this.pdfViewer.element.id+"_redoIcon",this.undoItem.firstElementChild.id=this.pdfViewer.element.id+"_undoIcon",this.createMoreOption(this.pdfViewer.element.id+"_more_option")},e.prototype.createMoreOption=function(e){var t=this;this.moreOptionItem=document.getElementById(e);var i=[{text:this.pdfViewer.localeObj.getConstant("Download"),id:this.pdfViewer.element.id+"_menu_download",iconCss:"e-icons e-pv-download-document-icon e-pv-icon"},{text:this.pdfViewer.localeObj.getConstant("Bookmarks"),id:this.pdfViewer.element.id+"_menu_bookmarks",iconCss:"e-icons e-pv-bookmark-icon e-pv-icon"}];this.moreDropDown=new s.DropDownButton({items:i,iconCss:"e-pv-more-icon e-pv-icon",cssClass:"e-caret-hide",open:function(e){var i=t.moreDropDown.element.getBoundingClientRect();t.pdfViewer.enableRtl||(e.element.parentElement.style.left=i.left+i.width-e.element.parentElement.offsetWidth+"px")},select:function(e){switch(e.item.id){case t.pdfViewer.element.id+"_menu_download":t.pdfViewerBase.download();break;case t.pdfViewer.element.id+"_menu_bookmarks":t.showToolbar(!1),t.pdfViewerBase.navigationPane.createNavigationPaneMobile("bookmarks")}},beforeItemRender:function(e){e.item.id===t.pdfViewer.element.id+"_menu_bookmarks"&&(t.pdfViewer.bookmarkViewModule&&t.pdfViewer.bookmarkViewModule.bookmarks?e.element.classList.remove("e-disabled"):e.element.classList.add("e-disabled"))},close:function(e){t.moreOptionItem.blur(),t.pdfViewerBase.focusViewerContainer()}}),this.moreDropDown.appendTo("#"+e)},e.prototype.createToolbarItem=function(e,i,n){var o=t.createElement(e,{id:i});return null!==n&&(o.className=n),"input"===e&&i!==this.pdfViewer.element.id+"_zoomDropDown"&&(o.type="text"),o},e.prototype.createTooltip=function(e,t){null!==t&&new o.Tooltip({content:t,opensOn:"Hover",beforeOpen:this.onTooltipBeforeOpen.bind(this)}).appendTo(e)},e.prototype.onTooltipBeforeOpen=function(e){!this.pdfViewer.toolbarSettings.showTooltip&&this.toolbarElement.contains(e.target)&&(e.cancel=!0),this.annotationToolbarModule&&!this.pdfViewer.toolbarSettings.showTooltip&&this.annotationToolbarModule.toolbarElement.contains(e.target)&&(e.cancel=!0)},e.prototype.createFileElement=function(e){e&&(t.isBlazor()?this.fileInputElement=this.pdfViewer.element.querySelector(".e-pv-fileupload-element"):(this.fileInputElement=t.createElement("input",{id:this.pdfViewer.element.id+"_fileUploadElement",styles:"position:fixed; left:-100em",attrs:{type:"file"}}),this.fileInputElement.setAttribute("accept",".pdf"),this.fileInputElement.setAttribute("aria-label","file upload element")),e&&e.appendChild(this.fileInputElement))},e.prototype.wireEvent=function(){this.fileInputElement&&this.fileInputElement.addEventListener("change",this.loadDocument),t.isBlazor()||t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.toolbarElement.addEventListener("mouseup",this.toolbarOnMouseup.bind(this)),this.currentPageBoxElement.addEventListener("focusout",this.textBoxFocusOut),this.currentPageBoxElement.addEventListener("keypress",this.navigateToPage),this.zoomDropDown.change=this.zoomPercentSelect.bind(this),this.zoomDropDown.element.addEventListener("keypress",this.onZoomDropDownInput.bind(this)),this.zoomDropDown.element.addEventListener("click",this.onZoomDropDownInputClick.bind(this)))},e.prototype.unWireEvent=function(){this.fileInputElement&&this.fileInputElement.removeEventListener("change",this.loadDocument),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||t.isBlazor()||(this.toolbarElement.removeEventListener("mouseup",this.toolbarOnMouseup.bind(this)),this.currentPageBoxElement.removeEventListener("focusout",this.textBoxFocusOut),this.currentPageBoxElement.removeEventListener("keypress",this.navigateToPage),this.zoomDropDown.removeEventListener("change",this.zoomPercentSelect),this.zoomDropDown.element.removeEventListener("keypress",this.onZoomDropDownInput),this.zoomDropDown.element.removeEventListener("click",this.onZoomDropDownInputClick))},e.prototype.onToolbarResize=function(e){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.pdfViewerBase.navigationPane.toolbarResize():this.toolbar.refreshOverflow()},e.prototype.toolbarOnMouseup=function(e){e.target!==this.itemsContainer&&e.target!==this.toolbarElement||this.pdfViewerBase.focusViewerContainer()},e.prototype.applyHideToToolbar=function(e,t,i){for(var n=!e,o=t;o<=i;o++)if(this.toolbar.items[o]){var s=this.toolbar.items[o].cssClass;if(s&&""!==s){var a=this.toolbar.element.querySelector("."+s);a&&this.toolbar.hideItem(a,n)}else this.toolbar.hideItem(o,n)}},e.prototype.handleOpenIconClick=function(e){this.fileInputElement.click(),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(t.isBlazor()||e.originalEvent.target.blur(),this.pdfViewerBase.focusViewerContainer())},e.prototype.handleToolbarBtnClick=function(e){switch(this.addInkAnnotation(),e.originalEvent.target.id){case this.pdfViewer.element.id+"_open":case this.pdfViewer.element.id+"_openIcon":case this.pdfViewer.element.id+"_openText":this.handleOpenIconClick(e);break;case this.pdfViewer.element.id+"_download":case this.pdfViewer.element.id+"_downloadIcon":case this.pdfViewer.element.id+"_downloadText":this.pdfViewerBase.download();break;case this.pdfViewer.element.id+"_print":case this.pdfViewer.element.id+"_printIcon":case this.pdfViewer.element.id+"_printText":this.pdfViewer.printModule&&this.pdfViewer.firePrintStart();break;case this.pdfViewer.element.id+"_undo":case this.pdfViewer.element.id+"_undoIcon":case this.pdfViewer.element.id+"_undoText":this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.undo();break;case this.pdfViewer.element.id+"_redo":case this.pdfViewer.element.id+"_redoIcon":case this.pdfViewer.element.id+"_redoText":this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.redo();break;case this.pdfViewer.element.id+"_firstPage":case this.pdfViewer.element.id+"_firstPageIcon":case this.pdfViewer.element.id+"_firstPageText":this.pdfViewer.navigationModule&&this.pdfViewer.navigationModule.goToFirstPage();break;case this.pdfViewer.element.id+"_previousPage":case this.pdfViewer.element.id+"_previousPageIcon":case this.pdfViewer.element.id+"_previousPageText":this.pdfViewer.navigationModule&&this.pdfViewer.navigationModule.goToPreviousPage();break;case this.pdfViewer.element.id+"_nextPage":case this.pdfViewer.element.id+"_nextPageIcon":case this.pdfViewer.element.id+"_nextPageText":this.pdfViewer.navigationModule&&this.pdfViewer.navigationModule.goToNextPage();break;case this.pdfViewer.element.id+"_lastPage":case this.pdfViewer.element.id+"_lastPageIcon":case this.pdfViewer.element.id+"_lastPageText":this.pdfViewer.navigationModule&&this.pdfViewer.navigationModule.goToLastPage();break;case this.pdfViewer.element.id+"_zoomIn":case this.pdfViewer.element.id+"_zoomInIcon":case this.pdfViewer.element.id+"_zoomInText":this.pdfViewer.magnificationModule.zoomIn();break;case this.pdfViewer.element.id+"_zoomOut":case this.pdfViewer.element.id+"_zoomOutIcon":case this.pdfViewer.element.id+"_zoomOutText":this.pdfViewer.magnificationModule.zoomOut();break;case this.pdfViewer.element.id+"_selectTool":case this.pdfViewer.element.id+"_selectToolIcon":case this.pdfViewer.element.id+"_selectToolText":this.isSelectionToolDisabled||(this.pdfViewerBase.initiateTextSelectMode(),this.updateInteractionTools(!0));break;case this.pdfViewer.element.id+"_handTool":case this.pdfViewer.element.id+"_handToolIcon":case this.pdfViewer.element.id+"_handToolText":this.isScrollingToolDisabled||this.getStampMode()||(this.pdfViewerBase.initiatePanning(),this.updateInteractionTools(!1));break;case this.pdfViewer.element.id+"_search":case this.pdfViewer.element.id+"_searchIcon":case this.pdfViewer.element.id+"_searchText":this.textSearchButtonHandler();break;case this.pdfViewer.element.id+"_annotation":case this.pdfViewer.element.id+"_annotationIcon":case this.pdfViewer.element.id+"_annotationText":this.initiateAnnotationMode(e.originalEvent.target.id);break;case this.pdfViewer.element.id+"_formdesigner":case this.pdfViewer.element.id+"_formdesignerIcon":case this.pdfViewer.element.id+"_formdesignerText":this.initiateFormDesignerMode(),this.formDesignerToolbarModule.showHideDeleteIcon(!1);break;case this.pdfViewer.element.id+"_comment":case this.pdfViewer.element.id+"_commentIcon":this.pdfViewerBase.isAddComment=!0,this.pdfViewerBase.isCommentIconAdded=!0,this.addComments(e.originalEvent.target);break;case this.pdfViewer.element.id+"_submitForm":this.pdfViewerBase.exportFormFields()}},e.prototype.addInkAnnotation=function(){if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var e=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(e)}this.annotationToolbarModule&&(this.annotationToolbarModule.inkAnnotationSelected=!1)},e.prototype.addComments=function(e){t.isBlazor()?(this.pdfViewerBase.isCommentIconAdded=!0,this.pdfViewerBase.isAddComment=!0,document.getElementById(this.pdfViewer.element.id+"_comment").classList.add("e-pv-select")):e.id===this.pdfViewer.element.id+"_comment"||e.id===this.pdfViewer.element.id+"_commentIcon"?e.id===this.pdfViewer.element.id+"_commentIcon"&&e.parentElement?e.parentElement.classList.add("e-pv-select"):e.classList.add("e-pv-select"):this.pdfViewer.enableRtl?e.className="e-pv-comment-selection-icon e-pv-icon e-icon-left e-right":e.className="e-pv-comment-selection-icon e-pv-icon e-icon-left",this.updateStampItems(),document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+(this.pdfViewerBase.currentPageNumber-1)).addEventListener("mousedown",this.pdfViewer.annotationModule.stickyNotesAnnotationModule.drawIcons.bind(this))},e.prototype.onZoomDropDownInput=function(e){if((e.which<48||e.which>57)&&8!==e.which&&13!==e.which)return e.preventDefault(),!1;if(13===e.which){e.preventDefault();var t=this.zoomDropDown.element.value;this.zoomDropDownChange(t)}return!0},e.prototype.onZoomDropDownInputClick=function(){this.zoomDropDown.element.select()},e.prototype.zoomPercentSelect=function(e){if(this.pdfViewerBase.pageCount>0)if(e.isInteracted){if(e.itemData){var t=e.itemData.percent;this.zoomDropDownChange(t)}}else this.updateZoomPercentage(this.pdfViewer.magnificationModule.zoomFactor)},e.prototype.zoomDropDownChange=function(e){e!==this.pdfViewer.localeObj.getConstant("Fit Width")&&e!==this.pdfViewer.localeObj.getConstant("Fit Page")&&e!==this.pdfViewer.localeObj.getConstant("Automatic")?(this.pdfViewer.magnificationModule.isAutoZoom=!1,this.pdfViewer.magnificationModule.zoomTo(parseFloat(e)),this.updateZoomPercentage(this.pdfViewer.magnificationModule.zoomFactor),this.zoomDropDown.focusOut()):e===this.pdfViewer.localeObj.getConstant("Fit Width")?(this.pdfViewer.magnificationModule.isAutoZoom=!1,this.pdfViewer.magnificationModule.fitToWidth(),this.zoomDropDown.focusOut()):e===this.pdfViewer.localeObj.getConstant("Fit Page")?(this.pdfViewer.magnificationModule.fitToPage(),this.zoomDropDown.focusOut()):e===this.pdfViewer.localeObj.getConstant("Automatic")&&(this.pdfViewer.magnificationModule.isAutoZoom=!0,this.pdfViewer.magnificationModule.fitToAuto(),this.zoomDropDown.focusOut())},e.prototype.updateZoomPercentage=function(e){if(!t.Browser.isDevice||this.pdfViewer.enableDesktopMode){var i=parseInt((100*e).toString())+"%";if(t.isBlazor()){var n=this.pdfViewerBase.getElement("_zoomDropDown");n&&n.children.length>0&&(n.children[0].children[0].value=i)}else this.zoomDropDown.text===i&&(this.zoomDropDown.element.value=i),11===this.zoomDropDown.index&&(this.zoomDropDown.value=4),this.pdfViewerBase.isMinimumZoom=e<=.25,this.zoomDropDown.text=i}},e.prototype.updateInteractionItems=function(){this.pdfViewer.textSelectionModule&&this.pdfViewer.enableTextSelection?this.toolbar.enableItems(this.textSelectItem.parentElement,!0):this.toolbar.enableItems(this.textSelectItem.parentElement,!1),this.toolbar.enableItems(this.panItem.parentElement,!0),"TextSelection"===this.pdfViewer.interactionMode?(this.selectItem(this.textSelectItem),this.deSelectItem(this.panItem)):(this.selectItem(this.panItem),this.deSelectItem(this.textSelectItem),this.pdfViewerBase.initiatePanning())},e.prototype.textSearchButtonHandler=function(){if(!t.Browser.isDevice||this.pdfViewer.enableDesktopMode){if(this.pdfViewer.textSearchModule&&this.pdfViewerBase.pageCount>0)if(this.isTextSearchBoxDisplayed=!this.isTextSearchBoxDisplayed,this.pdfViewer.textSearchModule.showSearchBox(this.isTextSearchBoxDisplayed),this.isTextSearchBoxDisplayed){t.isBlazor()||this.selectItem(this.textSearchItem);var e=document.getElementById(this.pdfViewer.element.id+"_search_input");e.select(),e.focus()}else t.isBlazor()||this.deSelectItem(this.textSearchItem)}else this.showToolbar(!1),this.pdfViewerBase.navigationPane.createNavigationPaneMobile("search")},e.prototype.initiateAnnotationMode=function(e){t.Browser.isDevice?t.isBlazor()||(e===this.pdfViewer.element.id+"_annotation"&&(e=this.pdfViewer.element.id+"_annotationIcon"),this.annotationToolbarModule.createAnnotationToolbarForMobile(e)):this.annotationToolbarModule&&this.pdfViewer.enableAnnotationToolbar&&(this.annotationToolbarModule.showAnnotationToolbar(this.annotationItem),this.pdfViewer.isAnnotationToolbarVisible&&this.pdfViewer.isFormDesignerToolbarVisible&&(document.getElementById(this.pdfViewer.element.id+"_formdesigner_toolbar").style.display="none",this.formDesignerToolbarModule.isToolbarHidden=!1,this.formDesignerToolbarModule.showFormDesignerToolbar(this.formDesignerItem),this.annotationToolbarModule.adjustViewer(!0)))},e.prototype.initiateFormDesignerMode=function(){this.formDesignerToolbarModule&&this.pdfViewer.enableFormDesignerToolbar&&(this.formDesignerToolbarModule.showFormDesignerToolbar(this.formDesignerItem),this.pdfViewer.isAnnotationToolbarVisible&&this.pdfViewer.isFormDesignerToolbarVisible&&(document.getElementById(this.pdfViewer.element.id+"_annotation_toolbar").style.display="none",this.annotationToolbarModule.isToolbarHidden=!1,this.annotationToolbarModule.showAnnotationToolbar(this.annotationItem),this.formDesignerToolbarModule.adjustViewer(!0)))},e.prototype.DisableInteractionTools=function(){this.deSelectItem(this.textSelectItem),this.deSelectItem(this.panItem)},e.prototype.selectItem=function(e){e&&e.classList.add("e-pv-select")},e.prototype.deSelectItem=function(e){e&&e.classList.remove("e-pv-select")},e.prototype.updateInteractionTools=function(e){e?(this.selectItem(this.textSelectItem),this.deSelectItem(this.panItem)):(this.selectItem(this.panItem),this.deSelectItem(this.textSelectItem))},e.prototype.initialEnableItems=function(){this.pdfViewer.enableToolbar?this.showToolbar(!0):this.showToolbar(!1),this.pdfViewer.enableNavigationToolbar?this.showNavigationToolbar(!0):this.showNavigationToolbar(!1),t.isBlazor()||(this.isPrintBtnVisible?this.showPrintOption(!0):this.showPrintOption(!1),this.isDownloadBtnVisible?this.showDownloadOption(!0):this.showDownloadOption(!1),this.isSearchBtnVisible?this.showSearchOption(!0):this.showSearchOption(!1),this.isCommentBtnVisible?this.showCommentOption(!0):this.showCommentOption(!1))},e.prototype.showSeparator=function(e){this.isOpenBtnVisible&&(this.isNavigationToolVisible||this.isMagnificationToolVisible||this.isSelectionBtnVisible||this.isScrollingBtnVisible||this.isUndoRedoBtnsVisible)||this.applyHideToToolbar(!1,1,1),(this.isNavigationToolVisible||this.isMagnificationToolVisible||this.isOpenBtnVisible)&&(!this.isOpenBtnVisible||this.isNavigationToolVisible)&&(this.isOpenBtnVisible||this.isNavigationToolVisible)&&(this.isMagnificationToolVisible||this.isScrollingBtnVisible||this.isSelectionBtnVisible)||this.applyHideToToolbar(!1,8,8),(!this.isMagnificationToolVisible&&!this.isSelectionBtnVisible&&!this.isScrollingBtnVisible||this.isMagnificationToolVisible&&!this.isSelectionBtnVisible&&!this.isScrollingBtnVisible||!this.isMagnificationToolVisible&&(this.isSelectionBtnVisible||this.isScrollingBtnVisible))&&this.applyHideToToolbar(!1,12,12),(this.isMagnificationToolVisible||this.isNavigationToolVisible||this.isScrollingBtnVisible||this.isSelectionBtnVisible||!this.isUndoRedoBtnsVisible)&&this.isUndoRedoBtnsVisible||this.applyHideToToolbar(!1,15,15)},e.prototype.applyToolbarSettings=function(){var e=this.pdfViewer.toolbarSettings.toolbarItems;e&&(-1!==e.indexOf("OpenOption")?this.showOpenOption(!0):this.showOpenOption(!1),-1!==e.indexOf("PageNavigationTool")?this.showPageNavigationTool(!0):this.showPageNavigationTool(!1),-1!==e.indexOf("MagnificationTool")?this.showMagnificationTool(!0):this.showMagnificationTool(!1),-1!==e.indexOf("SelectionTool")?this.showSelectionTool(!0):this.showSelectionTool(!1),-1!==e.indexOf("PanTool")?this.showScrollingTool(!0):this.showScrollingTool(!1),-1!==e.indexOf("PrintOption")?this.showPrintOption(!0):this.showPrintOption(!1),-1!==e.indexOf("DownloadOption")?this.showDownloadOption(!0):this.showDownloadOption(!1),-1!==e.indexOf("SearchOption")?this.showSearchOption(!0):this.showSearchOption(!1),-1!==e.indexOf("UndoRedoTool")?this.showUndoRedoTool(!0):this.showUndoRedoTool(!1),-1!==e.indexOf("AnnotationEditTool")?this.showAnnotationEditTool(!0):this.showAnnotationEditTool(!1),-1!==e.indexOf("FormDesignerEditTool")?this.showFormDesignerEditTool(!0):this.showFormDesignerEditTool(!1),-1!==e.indexOf("CommentTool")?this.showCommentOption(!0):this.showCommentOption(!1),-1!==e.indexOf("SubmitForm")?this.showSubmitForm(!0):this.showSubmitForm(!1),this.showSeparator(e))},e.prototype.getStampMode=function(){return!(!this.pdfViewer.annotation||!this.pdfViewer.annotation.stampAnnotationModule)&&this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode},e.prototype.stampBeforeOpen=function(e){if(this.annotationToolbarModule.resetFreeTextAnnot(),""===e.ParentItem.Text&&this.pdfViewer.customStampSettings.isAddToMenu&&e.Items.length>0){for(var t=null,i=0;i<e.Items.length;i++)if("Custom Stamp"===e.Items[i].Text){e.Items[i].Items=[],t=e.Items[i];break}var n=this.pdfViewerBase.customStampCollection,o=this.pdfViewer.customStampSettings.customStamps;if(0===n.length&&o&&o.length>0)for(var s=0;s<o.length;s++)n.push({customStampName:o[s].customStampName,customStampImageSource:o[s].customStampImageSource});for(var a=0;a<n.length;a++)null!=t&&t.Items.push({text:n[a].customStampName})}},e.prototype.stampBeforeClose=function(e,t){(e.ParentItem&&"Custom Stamp"!==e.ParentItem.Text&&"Standard Business"!==e.ParentItem.Text&&"Dynamic"!==e.ParentItem.Text&&"Sign Here"!==e.ParentItem.Text||!e.ParentItem)&&!0},e.prototype.updateStampItems=function(){this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.stampAnnotationModule&&this.pdfViewer.annotationModule.stampAnnotationModule.isNewStampAnnot&&(this.pdfViewer.selectedItems.annotations[0]&&(this.pdfViewer.remove(this.pdfViewer.selectedItems.annotations[0]),this.pdfViewer.clearSelection(this.pdfViewer.currentPageNumber-1),this.pdfViewer.renderDrawing(),this.pdfViewerBase.tool=null),this.pdfViewerBase.isAlreadyAdded=!1,this.pdfViewer.annotationModule.stampAnnotationModule.isNewStampAnnot=!1)},e.prototype.stampSelect=function(e,i){if(this.pdfViewerBase.isAlreadyAdded=!1,this.updateStampItems(),"Custom Stamp"===e.Item.Text){this.annotationToolbarModule.checkStampAnnotations(),this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!0;var n=t.createElement("input",{id:this.pdfViewer.element.id+"_stampElement",attrs:{type:"file"}});n.setAttribute("accept",".jpg,.jpeg"),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.visibility="hidden",document.body.appendChild(n),n.click(),n.addEventListener("change",this.annotationToolbarModule.addStampImage),document.body.removeChild(n)}else if("Custom Stamp"===i&&""!==e.Item.Text)for(var o=this.pdfViewerBase.customStampCollection,s=0;s<o.length;s++)o[s].customStampName===e.Item.Text&&(this.annotationToolbarModule.checkStampAnnotations(),this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!0,this.pdfViewer.annotationModule.stampAnnotationModule.isStampAnnotSelected=!0,this.pdfViewerBase.stampAdded=!0,this.pdfViewerBase.isAlreadyAdded=!0,this.pdfViewer.annotationModule.stampAnnotationModule.createCustomStampAnnotation(o[s].customStampImageSource),this.pdfViewerBase.stampAdded=!1);else"Dynamic"===e.Item.Text||""===e.Item.Text||"Standard Business"===e.Item.Text||"Sign Here"!==i&&"Sign Here"===e.Item.Text||(this.annotationToolbarModule.checkStampAnnotations(),this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!0,this.pdfViewer.annotationModule.stampAnnotationModule.isStampAnnotSelected=!0,this.pdfViewerBase.stampAdded=!0,"Dynamic"===i?(this.pdfViewerBase.isDynamicStamp=!0,this.pdfViewer.annotationModule.stampAnnotationModule.retrieveDynamicStampAnnotation(e.Item.Text)):(this.pdfViewerBase.isDynamicStamp=!1,this.pdfViewer.annotationModule.stampAnnotationModule.retrievestampAnnotation(e.Item.Text)))},e.prototype.getModuleName=function(){return"Toolbar"},e}(),li=function(){function i(e,i,n){var o=this;this.toolbarBorderHeight=1,this.isToolbarHidden=!1,this.isMobileAnnotEnabled=!1,this.isHighlightEnabled=!1,this.isUnderlineEnabled=!1,this.isStrikethroughEnabled=!1,this.isHighlightBtnVisible=!0,this.isUnderlineBtnVisible=!0,this.isStrikethroughBtnVisible=!0,this.isColorToolVisible=!0,this.isOpacityToolVisible=!0,this.isDeleteAnnotationToolVisible=!0,this.isCurrentAnnotationOpacitySet=!1,this.isStampBtnVisible=!1,this.isShapeBtnVisible=!1,this.isSignatureBtnVisible=!1,this.isInkBtnVisible=!1,this.isFontFamilyToolVisible=!1,this.isFontSizeToolVisible=!1,this.isFontAlignToolVisible=!1,this.isFontColorToolVisible=!1,this.isFontStylesToolVisible=!1,this.isCommentPanelBtnVisible=!1,this.isFreeTextBtnVisible=!1,this.isCalibrateBtnVisible=!1,this.isStrokeColorToolVisible=!1,this.isThicknessToolVisible=!1,this.stampMenu=[],this.stampParentID="",this.inkAnnotationSelected=!1,this.openSignaturePopup=!1,this.isSavedSignatureClicked=!1,this.saveSignatureCount=0,this.saveInitialCount=0,this.isToolbarCreated=!1,this.addStampImage=function(e){var t=o,i=e.target.files;if(null!==e.target.files[0]){var n=i[0];if("image"===n.type.split("/")[0]){var s=new FileReader;s.onload=function(e){var i=e.currentTarget.result;t.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!0,t.pdfViewer.annotationModule.stampAnnotationModule.isStampAnnotSelected=!0,t.pdfViewerBase.stampAdded=!0,o.pdfViewer.annotationModule.stampAnnotationModule.createCustomStampAnnotation(i),t.pdfViewerBase.stampAdded=!1},s.readAsDataURL(n)}}},this.onShapeToolbarClicked=function(e){var i=o.pdfViewer.element.id,n=o.pdfViewer.annotation.shapeAnnotationModule;if(t.Browser.isDevice){var s=e.originalEvent.target;o.pdfViewer.toolbarModule.selectItem(s.parentElement)}else o.deselectAllItems(),o.resetFreeTextAnnot();switch(e.originalEvent.target.id){case i+"_shape_line":case i+"_shape_lineIcon":n.setAnnotationType("Line"),o.onShapeDrawSelection(!0),o.updateColorInIcon(o.colorDropDownElement,n.lineFillColor),o.updateColorInIcon(o.strokeDropDownElement,n.lineStrokeColor),o.handleShapeTool(i+"_shape_line");break;case i+"_shape_arrow":case i+"_shape_arrowIcon":n.setAnnotationType("Arrow"),o.onShapeDrawSelection(!0),o.updateColorInIcon(o.colorDropDownElement,n.arrowFillColor),o.updateColorInIcon(o.strokeDropDownElement,n.arrowStrokeColor),o.handleShapeTool(i+"_shape_arrow");break;case i+"_shape_rectangle":case i+"_shape_rectangleIcon":n.setAnnotationType("Rectangle"),o.onShapeDrawSelection(!0),o.updateColorInIcon(o.colorDropDownElement,n.rectangleFillColor),o.updateColorInIcon(o.strokeDropDownElement,n.rectangleStrokeColor),o.handleShapeTool(i+"_shape_rectangle");break;case i+"_shape_circle":case i+"_shape_circleIcon":n.setAnnotationType("Circle"),o.onShapeDrawSelection(!0),o.updateColorInIcon(o.colorDropDownElement,n.circleFillColor),o.updateColorInIcon(o.strokeDropDownElement,n.circleStrokeColor),o.handleShapeTool(i+"_shape_circle");break;case i+"_shape_pentagon":case i+"_shape_pentagonIcon":n.setAnnotationType("Polygon"),o.onShapeDrawSelection(!0),o.updateColorInIcon(o.colorDropDownElement,n.polygonFillColor),o.updateColorInIcon(o.strokeDropDownElement,n.polygonStrokeColor),o.handleShapeTool(i+"_shape_pentagon")}},this.pdfViewer=e,this.pdfViewerBase=i,this.primaryToolbar=n}return i.prototype.initializeAnnotationToolbar=function(){var e=this;this.toolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_annotation_toolbar",className:"e-pv-annotation-toolbar"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.toolbarElement),this.toolbar=new r.Toolbar({width:"",height:"",overflowMode:"Popup",items:this.createToolbarItems(),clicked:this.onToolbarClicked.bind(this),created:function(){e.createDropDowns()}}),this.toolbar.isStringTemplate=!0,this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.toolbar.appendTo(this.toolbarElement),this.afterToolbarCreation(),this.createStampContainer(),this.createSignContainer(),this.applyAnnotationToolbarSettings(),this.updateToolbarItems(),this.showAnnotationToolbar(null,!0)},i.prototype.createMobileAnnotationToolbar=function(e,i){var n=this;t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?null==this.toolbarElement&&e?(this.isMobileAnnotEnabled=!0,this.toolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_annotation_toolbar",className:"e-pv-annotation-toolbar"}),this.pdfViewerBase.viewerMainContainer.insertBefore(this.toolbarElement,this.pdfViewerBase.viewerContainer),this.toolbar=new r.Toolbar({width:"",height:"",overflowMode:"Popup",items:this.createMobileToolbarItems(i),clicked:this.onToolbarClicked.bind(this),created:function(){n.createDropDowns(i)}}),this.toolbar.isStringTemplate=!0,this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.pdfViewerBase.navigationPane.goBackToToolbar(),this.pdfViewer.toolbarModule.showToolbar(!1),this.toolbar.appendTo(this.toolbarElement),this.deleteItem=this.pdfViewerBase.getElement("_annotation_delete"),this.deleteItem.firstElementChild.id=this.pdfViewer.element.id+"_annotation_delete"):null!=this.toolbarElement&&(e?(this.isMobileAnnotEnabled=!0,this.pdfViewerBase.navigationPane.goBackToToolbar(),this.pdfViewer.toolbarModule.showToolbar(!1),this.toolbarElement.style.display="block"):e||(this.isMobileAnnotEnabled=!1,this.pdfViewer.toolbarModule.showToolbar(!0),this.hideMobileAnnotationToolbar())):this.isMobileAnnotEnabled=!0},i.prototype.hideMobileAnnotationToolbar=function(){if(null!=this.toolbarElement){if(this.pdfViewer.selectedItems.annotations.length>0||this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)this.propertyToolbar.element.children.length>0&&(this.propertyToolbar.element.style.display="block",this.toolbarCreated=!0);else if(this.toolbar.element.children.length>0?this.toolbarCreated=!0:this.toolbarCreated=!1,this.propertyToolbar&&"none"!==this.propertyToolbar.element.style.display&&(this.propertyToolbar.element.style.display="none",!this.toolbarCreated)){var e=document.getElementById(this.pdfViewer.element.id+"_annotationIcon");e&&e.parentElement.classList.contains("e-pv-select")&&this.createAnnotationToolbarForMobile()}this.toolbarElement.children.length>0&&(this.toolbarElement.style.display="block"),this.adjustMobileViewer()}},i.prototype.FreeTextForMobile=function(){var e=this;this.hideExistingTool(),this.freetextToolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_freeTextToolbar",className:"e-pv-mobile-annotation-toolbar",styles:"bottom: 0px; position: absolute; width: 100%; float: left"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.freetextToolbarElement);var i,n=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_color","e-pv-annotation-color-container"),o=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_stroke","e-pv-annotation-stroke-container"),s=this.getTemplate("span","_annotation_thickness","e-pv-annotation-thickness-container"),a=this.getTemplate("span","_annotation_opacity","e-pv-annotation-opacity-container"),l=this.getTemplate("input","_annotation_fontname","e-pv-annotation-fontname-container"),d=this.getTemplate("input","_annotation_fontsize","e-pv-annotation-fontsize-container"),u=this.getTemplate("span","_annotation_textcolor","e-pv-annotation-textcolor-container"),M=this.getTemplate("span","_annotation_textalign","e-pv-annotation-textalign-container"),p=this.getTemplate("span","_annotation_textproperties","e-pv-annotation-textprop-container");i=[{prefixIcon:"e-pv-backward-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Go Back"),id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)},{template:n},{template:o},{template:s},{template:a},{template:l},{template:d},{template:u},{template:M},{template:p}],this.toolbar=new r.Toolbar({items:i,width:"",height:"",overflowMode:"Scrollable",created:function(){e.pdfViewer.toolbarModule.annotationToolbarModule.mobileColorpicker(e.pdfViewer.element.id+"_annotation_freeTextEdit")}}),this.toolbar.appendTo(this.freetextToolbarElement)},i.prototype.createPropertyTools=function(e){var i=this;if(""!==e){this.propertyToolbar&&this.propertyToolbar.destroy(),this.toolbar&&this.toolbar.destroy();var n=void 0;(n=document.getElementById(this.pdfViewer.element.id+"_propertyToolbar"))&&n.parentElement.removeChild(n),n=t.createElement("div",{id:this.pdfViewer.element.id+"_propertyToolbar",className:"e-pv-mobile-annotation-toolbar",styles:"bottom: 0px; position: absolute; width: 100%; float: left"}),this.pdfViewerBase.viewerMainContainer.appendChild(n);var o=new r.Toolbar({items:this.createPropertyToolbarForMobile(e),width:"",height:"",overflowMode:"Scrollable",created:function(){var t;t=i.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?i.pdfViewer.element.id+"_underlineIcon":"FreeText"===i.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?i.pdfViewer.element.id+"_annotation_freeTextEdit":"Stamp"===i.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"StickyNotes"===i.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"Image"===i.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?i.pdfViewer.element.id+"_annotation_stamp":"HandWrittenSignature"===i.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?i.pdfViewer.element.id+"_annotation_handwrittenSign":"Ink"===i.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"Path"===i.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?i.pdfViewer.element.id+"_annotation_inkIcon":"Highlight"===e||"Underline"===e||"Strikethrough"===e?i.pdfViewer.element.id+"_highlightIcon":i.pdfViewer.element.id+"_annotation_shapesIcon",i.pdfViewer.toolbarModule.annotationToolbarModule.mobileColorpicker(t)}});if(o.isStringTemplate=!0,o.appendTo(n),!this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation&&("Line"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&this.toolbar.enableItems(this.colorDropDownElement.parentElement,!1),"HandWrittenSignature"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType)){var s=document.getElementById(this.pdfViewer.element.id+"_annotation_commentPanel");this.toolbar.enableItems(s.parentElement,!1)}this.showPropertyTool(o)}},i.prototype.showPropertyTool=function(e){if(this.toolbar&&this.toolbar.destroy(),this.propertyToolbar=e,this.pdfViewer.selectedItems.annotations[0]){var t=this.pdfViewer.selectedItems.annotations[0];"HandWrittenSignature"!==t.shapeAnnotationType&&"Stamp"!==t.shapeAnnotationType&&"Image"!==t.shapeAnnotationType&&"Ink"!==t.shapeAnnotationType&&"Path"!==t.shapeAnnotationType&&"StickyNotes"!==t.shapeAnnotationType?(this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.selectedItems.annotations[0].fillColor),this.updateColorInIcon(this.strokeDropDownElement,this.pdfViewer.selectedItems.annotations[0].strokeColor),"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(this.fontFamilyElement.ej2_instances[0].value=this.pdfViewer.selectedItems.annotations[0].fontFamily,this.fontColorElement.children[0].style.borderBottomColor=this.pdfViewer.selectedItems.annotations[0].fontColor,this.pdfViewer.annotation.modifyTextAlignment(this.pdfViewer.selectedItems.annotations[0].textAlign),this.updateTextAlignInIcon(this.pdfViewer.selectedItems.annotations[0].textAlign))):this.strokeDropDownElement&&this.updateColorInIcon(this.strokeDropDownElement,this.pdfViewer.selectedItems.annotations[0].strokeColor)}this.toolbarCreated=!0,this.adjustMobileViewer()},i.prototype.stampToolMobileForMobile=function(e){var i=this;this.hideExistingTool(),this.stampToolbarElement&&this.stampToolbarElement.parentElement.removeChild(this.stampToolbarElement),this.stampToolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_stampToolbar",className:"e-pv-mobile-annotation-toolbar",styles:"bottom: 0px; position: absolute; width: 100%; float: left"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.stampToolbarElement),this.toolbar=new r.Toolbar({items:this.createStampToolbarItemsForMobile(),width:"",height:"",overflowMode:"Scrollable",clicked:this.onShapeToolbarClicked.bind(this),created:function(){i.pdfViewer.toolbarModule.annotationToolbarModule.mobileColorpicker(e)}}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.stampToolbarElement)},i.prototype.shapeToolMobile=function(e){var i=this;this.hideExistingTool(),this.shapeToolbarElement&&this.shapeToolbarElement.parentElement.removeChild(this.shapeToolbarElement),this.shapeToolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_shapeToolbar",className:"e-pv-mobile-annotation-toolbar",styles:"bottom: 0px; position: absolute; width: 100%; float: left"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.shapeToolbarElement),this.toolbar=new r.Toolbar({items:this.createShapeToolbarItemsForMobile(),width:"",height:"",overflowMode:"Scrollable",clicked:this.onShapeToolbarClicked.bind(this),created:function(){i.pdfViewer.toolbarModule.annotationToolbarModule.mobileColorpicker(e.originalEvent.target.id)}}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.shapeToolbarElement),this.afterShapeToolbarCreationForMobile()},i.prototype.calibrateToolMobile=function(e){var i=this;this.hideExistingTool(),this.calibrateToolbarElement&&this.calibrateToolbarElement.parentElement.removeChild(this.calibrateToolbarElement),this.calibrateToolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_calibrateToolbar",className:"e-pv-mobile-annotation-toolbar",styles:"bottom: 0px; position: absolute; width: 100%; float: left"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.calibrateToolbarElement),this.toolbar=new r.Toolbar({items:this.createCalibrateToolbarItemsForMobile(),width:"",height:"",overflowMode:"Scrollable",clicked:this.onCalibrateToolbarClicked.bind(this),created:function(){i.pdfViewer.toolbarModule.annotationToolbarModule.mobileColorpicker(e.originalEvent.target.id)}}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.calibrateToolbarElement),this.afterCalibrateToolbarCreationForMobile()},i.prototype.textMarkupForMobile=function(e){var i=this;this.hideExistingTool(),this.textMarkupToolbarElement&&this.textMarkupToolbarElement.parentElement.removeChild(this.textMarkupToolbarElement),this.textMarkupToolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_mobileAnnotationToolbar",className:"e-pv-mobile-annotation-toolbar",styles:"bottom: 0px; position: absolute; width: 100%; float: left"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.textMarkupToolbarElement);var n,o=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_color","e-pv-annotation-color-container"),s=this.getTemplate("span","_annotation_opacity","e-pv-annotation-opacity-container");n=[{prefixIcon:"e-pv-backward-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Go Back"),id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)},{template:o,align:"left"},{template:s,align:"left"}],this.propertyToolbar=new r.Toolbar({items:n,width:"",height:"",overflowMode:"Scrollable",created:function(){i.pdfViewer.toolbarModule.annotationToolbarModule.mobileColorpicker(e.originalEvent.target.id)}}),this.propertyToolbar.isStringTemplate=!0,this.propertyToolbar.appendTo(this.textMarkupToolbarElement)},i.prototype.signatureInkForMobile=function(){var e=this;this.hideExistingTool(),this.signatureInkToolbarElement&&this.signatureInkToolbarElement.parentElement.removeChild(this.signatureInkToolbarElement),this.signatureInkToolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_mobileAnnotationToolbar",className:"e-pv-mobile-annotation-toolbar",styles:"bottom: 0px; position: absolute; width: 100%; float: left"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.signatureInkToolbarElement);var i,n=this.getTemplate("span","_annotation_opacity","e-pv-annotation-opacity-container"),o=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_stroke","e-pv-annotation-stroke-container"),s=this.getTemplate("span","_annotation_thickness","e-pv-annotation-thickness-container");i=[{prefixIcon:"e-pv-backward-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Go Back"),id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)},{template:n,align:"left"},{template:o,aign:"left"},{template:s,align:"left"}],this.toolbar=new r.Toolbar({items:i,width:"",height:"",overflowMode:"Scrollable",created:function(){e.pdfViewer.toolbarModule.annotationToolbarModule.mobileColorpicker(e.pdfViewer.element.id+"_annotation_inkIcon")}}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.signatureInkToolbarElement)},i.prototype.hideExistingTool=function(){this.toolbar&&this.toolbar.destroy(),this.propertyToolbar&&this.propertyToolbar.destroy(),document.getElementById(this.pdfViewer.element.id+"_mobileAnnotationToolbar").style.display="none"},i.prototype.createAnnotationToolbarForMobile=function(e){var i;if(e){var n=document.getElementById(e);n.parentElement.classList.contains("e-pv-select")?(i=!0,n.parentElement.classList.remove("e-pv-select")):(i=!1,this.pdfViewer.toolbarModule.selectItem(n.parentElement))}if(i)return this.toolbarCreated=!1,this.adjustMobileViewer(),this.toolbar&&this.toolbar.destroy(),this.propertyToolbar&&this.propertyToolbar.destroy(),document.getElementById(this.pdfViewer.element.id+"_mobileAnnotationToolbar").style.display="none",[];this.isToolbarCreated=!0,this.propertyToolbar&&this.propertyToolbar.destroy(),this.toolbarElement&&this.toolbarElement.parentElement.removeChild(this.toolbarElement),this.toolbarElement=t.createElement("div",{id:this.pdfViewer.element.id+"_mobileAnnotationToolbar",className:"e-pv-mobile-annotation-toolbar",styles:"bottom: 0px; position: absolute; width: 100%; float: left;"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.toolbarElement);var o=this.getTemplate("span","_annotation_stamp","e-pv-annotation-stamp-container"),s=this.getTemplate("span","_annotation_signature","e-pv-annotation-handwritten-container"),a=void 0;return a=[{prefixIcon:"e-pv-comment-icon e-pv-icon",className:"e-pv-comment-container",id:this.pdfViewer.element.id+"_comment",align:"Left"},{type:"Separator",align:"Left"},{prefixIcon:"e-pv-highlight-icon e-pv-icon",className:"e-pv-highlight-container",id:this.pdfViewer.element.id+"_highlight",align:"Left"},{prefixIcon:"e-pv-underline-icon e-pv-icon",className:"e-pv-underline-container",id:this.pdfViewer.element.id+"_underline",align:"Left"},{prefixIcon:"e-pv-strikethrough-icon e-pv-icon",className:"e-pv-strikethrough-container",id:this.pdfViewer.element.id+"_strikethrough",align:"Left"},{type:"Separator",align:"Left"},{prefixIcon:"e-pv-annotation-shape-icon e-pv-icon",className:"e-pv-annotation-shapes-container",id:this.pdfViewer.element.id+"_annotation_shapes",align:"Left"},{type:"Separator",align:"Left"},{prefixIcon:"e-pv-annotation-calibrate-icon e-pv-icon",className:"e-pv-annotation-calibrate-container",id:this.pdfViewer.element.id+"_annotation_calibrate",align:"Left"},{type:"Separator",align:"Left"},{prefixIcon:"e-pv-freetext-icon e-pv-icon",className:"e-pv-annotation-freetextedit-container",id:this.pdfViewer.element.id+"_annotation_freeTextEdit",align:"Left"},{type:"Separator",align:"Left"},{template:o},{type:"Separator",align:"Left"},{template:s,align:"Left"},{type:"Separator",align:"Left"},{prefixIcon:"e-pv-inkannotation-icon e-pv-icon",className:"e-pv-annotation-ink-container",id:this.pdfViewer.element.id+"_annotation_ink",align:"Left"},{type:"Separator",align:"Left"},{prefixIcon:"e-pv-comment-panel-icon e-pv-icon",className:"e-pv-comment-panel-icon-container",id:this.pdfViewer.element.id+"_annotation_commentPanel",align:"Right"}],this.toolbarCreated?(this.toolbar.destroy(),this.toolbarCreated=!1,this.adjustMobileViewer()):(this.toolbar=new r.Toolbar({items:a,width:"",height:"",overflowMode:"Scrollable",clicked:this.onToolbarClicked.bind(this)}),this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.toolbarElement),this.afterMobileToolbarCreation(),this.createStampContainer(),this.createSignContainer(),this.applyAnnotationToolbarSettings(),this.toolbarCreated=!0,this.adjustMobileViewer()),a},i.prototype.adjustMobileViewer=function(){var e;this.toolbarElement&&(e=this.toolbarElement.clientHeight);var t=!1;this.toolbarElement&&0===this.toolbarElement.children.length&&this.propertyToolbar&&this.propertyToolbar.element.children.length>0?(e=this.propertyToolbar.element.clientHeight,"none"===this.pdfViewer.toolbarModule.toolbarElement.style.display&&(this.pdfViewer.toolbarModule.toolbarElement.style.display="block")):this.freetextToolbarElement&&this.freetextToolbarElement.children.length>0?e=this.freetextToolbarElement.clientHeight:0===e&&this.pdfViewer.toolbarModule.toolbar&&(e=this.pdfViewer.toolbarModule.toolbarElement.clientHeight,t=!0),this.toolbarCreated?this.pdfViewerBase.viewerContainer.style.height=this.updateViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer),e+e)+"px":t||(this.pdfViewerBase.viewerContainer.style.height.split("%").length>1?this.pdfViewerBase.viewerContainer.style.height=this.resetViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer),-e)+"px":this.pdfViewerBase.viewerContainer.style.height=this.resetViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer),e)+"px")},i.prototype.showToolbar=function(e){var i=this.toolbarElement;e?(i.style.display="block",t.Browser.isDevice&&this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.hideMobileAnnotationToolbar()):i.style.display="none"},i.prototype.createMobileToolbarItems=function(e){var t=this.getTemplate("span","_annotation_color","e-pv-annotation-color-container"),i=this.getTemplate("span","_annotation_opacity","e-pv-annotation-opacity-container"),n=[];return n.push({prefixIcon:"e-pv-backward-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Go Back"),id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)}),e||(n.push({template:t,align:"right"}),n.push({template:i,align:"right"}),n.push({type:"Separator",align:"right"})),n.push({prefixIcon:"e-pv-annotation-delete-icon e-pv-icon",className:"e-pv-annotation-delete-container",id:this.pdfViewer.element.id+"_annotation_delete",align:"right"}),n},i.prototype.goBackToToolbar=function(){this.isMobileAnnotEnabled=!1,this.toolbarElement.children.length>0?this.toolbarElement.style.display="block":(this.toolbarCreated=!1,this.toolbar.destroy(),this.createAnnotationToolbarForMobile());var e=this.pdfViewerBase.getSelectTextMarkupCurrentPage();e&&(this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage=null,this.pdfViewer.annotationModule.textMarkupAnnotationModule.clearAnnotationSelection(e))},i.prototype.createToolbarItems=function(){var e=this.getTemplate("span","_annotation_color","e-pv-annotation-color-container"),t=this.getTemplate("span","_annotation_stroke","e-pv-annotation-stroke-container"),i=this.getTemplate("span","_annotation_thickness","e-pv-annotation-thickness-container"),n=this.getTemplate("span","_annotation_opacity","e-pv-annotation-opacity-container"),o=this.getTemplate("span","_annotation_shapes","e-pv-annotation-shapes-container"),s=this.getTemplate("span","_annotation_calibrate","e-pv-annotation-calibrate-container"),a=this.getTemplate("span","_annotation_stamp","e-pv-annotation-stamp-container"),r=this.getTemplate("input","_annotation_fontname","e-pv-annotation-fontname-container"),l=this.getTemplate("input","_annotation_fontsize","e-pv-annotation-fontsize-container"),d=this.getTemplate("span","_annotation_textcolor","e-pv-annotation-textcolor-container"),u=this.getTemplate("span","_annotation_textalign","e-pv-annotation-textalign-container"),M=this.getTemplate("span","_annotation_textproperties","e-pv-annotation-textprop-container"),p=this.getTemplate("span","_annotation_signature","e-pv-annotation-handwritten-container"),h=[];return h.push({prefixIcon:"e-pv-highlight-icon e-pv-icon",className:"e-pv-highlight-container",id:this.pdfViewer.element.id+"_highlight",align:"Left"}),h.push({prefixIcon:"e-pv-underline-icon e-pv-icon",className:"e-pv-underline-container",id:this.pdfViewer.element.id+"_underline",align:"Left"}),h.push({prefixIcon:"e-pv-strikethrough-icon e-pv-icon",className:"e-pv-strikethrough-container",id:this.pdfViewer.element.id+"_strikethrough",align:"Left"}),h.push({type:"Separator",align:"Left",cssClass:"e-pv-hightlight-separator-container"}),h.push({template:o,align:"Left",cssClass:"e-pv-shape-template-container"}),h.push({type:"Separator",align:"Left",cssClass:"e-pv-shape-separator-container"}),h.push({template:s,align:"Left",cssClass:"e-pv-calibrate-template-container"}),h.push({type:"Separator",align:"Left",cssClass:"e-pv-calibrate-separator-container"}),h.push({prefixIcon:"e-pv-freetext-icon e-pv-icon",className:"e-pv-annotation-freetextedit-container",id:this.pdfViewer.element.id+"_annotation_freeTextEdit",align:"Left"}),h.push({type:"Separator",align:"Left",cssClass:"e-pv-freetext-separator-container"}),h.push({template:a,align:"Left",cssClass:"e-pv-stamp-template-container"}),h.push({type:"Separator",align:"Left",cssClass:"e-pv-stamp-separator-container"}),h.push({template:p,align:"Left",cssClass:"e-pv-sign-template-container"}),h.push({type:"Separator",align:"Left",cssClass:"e-pv-sign-separator-container"}),h.push({prefixIcon:"e-pv-inkannotation-icon e-pv-icon",className:"e-pv-annotation-ink-container",id:this.pdfViewer.element.id+"_annotation_ink",align:"Left"}),h.push({type:"Separator",align:"Left",cssClass:"e-pv-ink-separator-container"}),h.push({template:r,align:"Left",cssClass:"e-pv-fontfamily-container"}),h.push({template:l,align:"Left",cssClass:"e-pv-fontsize-container"}),h.push({template:d,align:"Left",cssClass:"e-pv-text-color-container"}),h.push({template:u,align:"Left",cssClass:"e-pv-alignment-container"}),h.push({template:M,align:"Left",cssClass:"e-pv-text-properties-container"}),h.push({type:"Separator",align:"Left",cssClass:"e-pv-text-separator-container"}),h.push({template:e,align:"Left",cssClass:"e-pv-color-template-container"}),h.push({template:t,align:"Left",cssClass:"e-pv-stroke-template-container"}),h.push({template:i,align:"Left",cssClass:"e-pv-thickness-template-container"}),h.push({template:n,align:"Left",cssClass:"e-pv-opacity-template-container"}),h.push({type:"Separator",align:"Left",cssClass:"e-pv-opacity-separator-container"}),h.push({prefixIcon:"e-pv-annotation-delete-icon e-pv-icon",className:"e-pv-annotation-delete-container",id:this.pdfViewer.element.id+"_annotation_delete",align:"Left"}),h.push({prefixIcon:"e-pv-comment-panel-icon e-pv-icon",className:"e-pv-comment-panel-icon-container",id:this.pdfViewer.element.id+"_annotation_commentPanel",align:"Right"}),h.push({prefixIcon:"e-pv-annotation-tools-close-icon e-pv-icon",className:"e-pv-annotation-tools-close-container",id:this.pdfViewer.element.id+"_annotation_close",align:"Right"}),h},i.prototype.createSignContainer=function(){var e=this;this.handWrittenSignatureItem=this.pdfViewerBase.getElement("_annotation_signature"),this.primaryToolbar.createTooltip(this.pdfViewerBase.getElement("_annotation_signature"),this.pdfViewer.localeObj.getConstant("Draw Signature"));var i=this,n=[],o={items:n=0===this.pdfViewer.handWrittenSignatureSettings.signatureItem.length||2==this.pdfViewer.handWrittenSignatureSettings.signatureItem.length?[{text:"ADD SIGNATURE"},{separator:!0},{text:"ADD INITIAL"}]:"Signature"===this.pdfViewer.handWrittenSignatureSettings.signatureItem[0]?[{text:"ADD SIGNATURE"}]:[{text:"ADD INITIAL"}],iconCss:"e-pv-handwritten-icon e-pv-icon",cssClass:"e-pv-handwritten-popup",open:function(e){i.openSignature()},beforeItemRender:function(i){if(e.pdfViewer.clearSelection(e.pdfViewerBase.currentPageNumber-1),"ADD SIGNATURE"===i.item.text){i.element.innerHTML="",e.saveSignatureCount=0;for(s=e.pdfViewerBase.signatureModule.signaturecollection.length;s>0;s--)if(e.saveSignatureCount<e.pdfViewerBase.signatureModule.getSaveLimit(e.pdfViewer.handWrittenSignatureSettings.saveSignatureLimit)){i.element.style.display="block";var n=(a=e.pdfViewerBase.signatureModule.signaturecollection[s-1]).image[0].imageData,o=a.image[0].id.split("_")[1];if(!a.isInitial&&""!==n){(r=t.createElement("div")).id="s"+o,r.style.display="block",r.style.paddingBottom="10px",(l=t.createElement("span")).id="sign_border_"+o,l.classList.add("e-pv-align-border");d=void 0;"SignatureText"===a.image[0].signatureType?((d=t.createElement("div")).innerText=n,d.style.fontFamily=a.image[0].fontFamily,d.style.fontSize="15px",d.style.display="inline-block",d.style.top="8px",d.style.position="relative",d.id="sign_"+o,d.style.width="80px",d.style.height="53px",d.style.overflow="hidden",d.style.textOverflow="ellipsis",d.style.paddingLeft="11px"):((d=t.createElement("img")).id="sign_"+o,d.src=n,d.width=80,d.height=32,d.style.paddingLeft="20px",d.style.paddingRight="18px",d.style.paddingTop="12px",d.style.paddingBottom="12px",d.style.boxSizing="content-box"),d.addEventListener("mouseover",e.hoverSignatureImage.bind(e)),d.addEventListener("mouseleave",e.leaveSignatureImage.bind(e)),(u=t.createElement("span")).id="delete_"+o,u.classList.add("e-pv-delete"),u.classList.add("e-pv-align"),l.append(d),l.append(u),r.append(l),i.element.appendChild(r),i.element.style.pointerEvents="auto",i.element.style.background="none",e.pdfViewerBase.getElement("_annotation_signature-popup").style.width="206px",e.saveSignatureCount++}}(M=t.createElement("span")).classList.add("e-pv-align-sign"),M.textContent="ADD SIGNATURE",M.style.fontFamily="Roboto",M.style.fontSize="14px",-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Trident")?M.style.maxWidth="140px":M.style.width="fit-content",M.addEventListener("mouseover",e.hoverSignature.bind(e)),M.addEventListener("mouseleave",e.leaveSignature.bind(e)),M.addEventListener("click",e.clickSignature.bind(e)),i.element.appendChild(M),i.element.addEventListener("mouseover",e.hoverInitialBtn.bind(e)),i.element.style.width="206px",i.element.style.display="flex",i.element.style.flexDirection="column",i.element.style.height="auto"}if("ADD INITIAL"===i.item.text){e.saveInitialCount=0,i.element.innerHTML="";for(var s=e.pdfViewerBase.signatureModule.signaturecollection.length;s>0;s--)if(e.saveInitialCount<e.pdfViewerBase.signatureModule.getSaveLimit(e.pdfViewer.handWrittenSignatureSettings.saveInitialLimit)){var a=e.pdfViewerBase.signatureModule.signaturecollection[s-1],n=a.image[0].imageData,o=a.image[0].id.split("_")[1];if(a.isInitial&&""!==n){var r=t.createElement("div");r.id="s"+o,r.style.display="block",r.style.paddingBottom="10px";var l=t.createElement("span");l.id="sign_border_"+o,l.classList.add("e-pv-align-border");var d=void 0;"SignatureText"===a.image[0].signatureType?((d=t.createElement("div")).innerText=n,d.style.fontFamily=a.image[0].fontFamily,d.style.fontSize="25px",d.style.display="inline",d.style.top="8px",d.style.position="relative",d.id="sign_"+o,d.style.width="80px",d.style.height="32px",d.style.paddingLeft="20px",d.style.paddingRight="18px",d.style.paddingTop="10px",d.style.paddingBottom="10px"):((d=t.createElement("img")).id="sign_"+o,d.src=n,d.width=80,d.height=32,d.style.paddingLeft="20px",d.style.paddingRight="18px",d.style.paddingTop="12px",d.style.paddingBottom="12px",d.style.boxSizing="content-box"),d.addEventListener("mouseover",e.hoverSignatureImage.bind(e)),d.addEventListener("mouseleave",e.leaveSignatureImage.bind(e)),d.width=80,d.height=32;var u=t.createElement("span");u.id="delete_"+o,u.classList.add("e-pv-delete"),u.classList.add("e-pv-align"),l.append(d),l.append(u),r.append(l),i.element.appendChild(r),i.element.style.pointerEvents="auto",i.element.style.background="none",e.pdfViewerBase.getElement("_annotation_signature-popup").style.width="206px",e.saveInitialCount++}}e.isSignatureIteam=!1;var M=t.createElement("span");M.classList.add("e-pv-align-sign"),M.textContent="ADD INITIAL",-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Trident")?M.style.maxWidth="100px":M.style.width="fit-content",M.style.fontFamily="Roboto",M.style.left="40px",M.addEventListener("mouseover",e.hoverSignature.bind(e)),M.addEventListener("mouseleave",e.leaveSignature.bind(e)),M.addEventListener("click",e.clickInitial.bind(e)),i.element.appendChild(M),i.element.addEventListener("mouseover",e.hoverInitialBtn.bind(e)),i.element.style.width="206px",i.element.style.display="flex",i.element.style.flexDirection="column",i.element.style.height="auto"}},select:function(t){e.pdfViewer.clearSelection(e.pdfViewerBase.currentPageNumber-1)}};new s.DropDownButton(o).appendTo(this.handWrittenSignatureItem)},i.prototype.updateSignatureCount=function(){this.openSignaturePopup=!1;for(var e=this.pdfViewerBase.signatureModule.signaturecollection,t=0;t<e.length;t++)e[t].image[0].imageData},i.prototype.openSignature=function(){this.saveInitialCount=0,this.saveSignatureCount=0;for(e=this.pdfViewerBase.signatureModule.signaturecollection.length;e>0;e--)if(this.saveSignatureCount<this.pdfViewerBase.signatureModule.getSaveLimit(this.pdfViewer.handWrittenSignatureSettings.saveSignatureLimit)&&""!==(t=this.pdfViewerBase.signatureModule.signaturecollection[e-1]).image[0].imageData&&!t.isInitial){this.saveSignatureCount++;i=document.getElementById("sign_border_"+t.image[0].id.split("_")[1]);(n=document.getElementById("delete_"+t.image[0].id.split("_")[1])).style.backgroundClip="content-box",i.addEventListener("click",this.renderAddedSignature.bind(this)),n.addEventListener("click",this.deleteSavedSign.bind(this)),n.addEventListener("mouseover",this.hoverSignatureDelete.bind(this)),n.addEventListener("mouseleave",this.leaveSignatureDelete.bind(this)),i.addEventListener("mouseover",this.hoverSignatureDelete.bind(this)),i.addEventListener("mouseleave",this.leaveSignatureDelete.bind(this))}for(var e=this.pdfViewerBase.signatureModule.signaturecollection.length;e>0;e--)if(this.saveInitialCount<this.pdfViewerBase.signatureModule.getSaveLimit(this.pdfViewer.handWrittenSignatureSettings.saveInitialLimit)){var t=this.pdfViewerBase.signatureModule.signaturecollection[e-1];if(""!==t.image[0].imageData&&t.isInitial){this.saveInitialCount++;var i=document.getElementById("sign_border_"+t.image[0].id.split("_")[1]),n=document.getElementById("delete_"+t.image[0].id.split("_")[1]);n.style.backgroundClip="content-box",i.addEventListener("click",this.renderAddedSignature.bind(this)),n.addEventListener("click",this.deleteSavedSign.bind(this)),n.addEventListener("mouseover",this.hoverSignatureDelete.bind(this)),n.addEventListener("mouseleave",this.leaveSignatureDelete.bind(this)),i.addEventListener("mouseover",this.hoverSignatureDelete.bind(this)),i.addEventListener("mouseleave",this.leaveSignatureDelete.bind(this))}}},i.prototype.hoverSignatureDelete=function(){var e=event.target;(e.id==="sign_"+e.id.split("_")[1]||e.classList.contains("e-pv-delete"))&&(e.classList.add("e-pv-signaturehover"),e.style.cursor="pointer")},i.prototype.hoverSignature=function(){var e=event.target;e.classList.contains("e-pv-align-sign")&&(e.classList.add("e-pv-signaturehover"),e.style.cursor="pointer")},i.prototype.hoverInitialBtn=function(e){var i=e.target,n="";if((n=-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Trident")?i.id:t.isNullOrUndefined(e.path)?e.composedPath()[0].id:e.path[0].id)!=="sign_"+n.split("_")[1]&&n!=="delete_"+n.split("_")[1]){var o=document.getElementById(i.id);t.isNullOrUndefined(o)&&(o=document.getElementById(i.parentElement.id)),null==o||i.id==="sign_"+i.id.split("_")[1]&&i.id==="sign_border_"+i.id.split("_")[2]?null==o.parentElement||i.id==="sign_"+i.id.split("_")[1]&&i.id==="sign_border_"+i.id.split("_")[2]||(o.parentElement.style.background="transparent",o.parentElement.style.cursor="default"):(o.style.background="transparent",o.style.cursor="default")}},i.prototype.hoverSignatureImage=function(){var e=event.target;(e.id==="sign_"+e.id.split("_")[1]||e.classList.contains("e-pv-delete"))&&(e.classList.add("e-pv-signaturehover"),e.style.cursor="pointer")},i.prototype.leaveSignatureDelete=function(){var e=event.target;(e.id==="sign_"+e.id.split("_")[1]||e.classList.contains("e-pv-delete"))&&(e.classList.remove("e-pv-signaturehover"),e.children[0]&&"IMG"===e.children[0].tagName&&e.children[0].classList.remove("e-pv-signaturehover"),e.style.cursor="default")},i.prototype.leaveSignature=function(){var e=event.target;e.classList.contains("e-pv-align-sign")&&(e.classList.remove("e-pv-signaturehover"),e.style.cursor="default")},i.prototype.clickSignature=function(){event.target.classList.contains("e-pv-align-sign")&&(this.pdfViewerBase.isInitialField=!1,this.addSignature())},i.prototype.clickInitial=function(){event.target.classList.contains("e-pv-align-sign")&&(this.pdfViewerBase.isInitialField=!0,this.addSignature())},i.prototype.leaveSignatureImage=function(){var e=event.target;(e.id==="sign_"+e.id.split("_")[1]||e.classList.contains("e-pv-delete"))&&(e.classList.remove("e-pv-signaturehover"),e.children[0]&&"IMG"===e.children[0].tagName&&e.children[0].classList.remove("e-pv-signaturehover"),e.style.cursor="default")},i.prototype.addSignature=function(){this.deselectAllItems(),this.showSignaturepanel()},i.prototype.renderAddedSignature=function(){this.pdfViewerBase.isAddedSignClicked=!0,this.isSavedSignatureClicked=!0,this.pdfViewerBase.signatureModule.RenderSavedSignature()},i.prototype.deleteSavedSign=function(e){e.stopPropagation();for(var t=this.pdfViewerBase.signatureModule.signaturecollection,i=t.length;i>0;i--)if(e.target.parentElement.children[0].id==="sign_"+t[i-1].image[0].id.split("_")[1]){t[i-1].image[0].imageData="",this.pdfViewerBase.signatureModule.signaturecollection.splice(i-1,1);break}e.target.parentElement.remove()},i.prototype.getTemplate=function(e,i,n){var o=t.createElement(e,{id:this.pdfViewer.element.id+i,styles:"text-align:left"});return n&&(o.className=n),o.outerHTML},i.prototype.createStampContainer=function(){var i=this;this.stampElement=this.pdfViewerBase.getElement("_annotation_stamp"),this.primaryToolbar.createTooltip(this.pdfViewerBase.getElement("_annotation_stamp"),this.pdfViewer.localeObj.getConstant("Add Stamp"));var n=t.createElement("ul",{id:this.pdfViewer.element.id+"contextMenuElement"});this.pdfViewerBase.getElement("_annotation_stamp").appendChild(n);var o=[];if(this.pdfViewer.stampSettings.dynamicStamps&&this.pdfViewer.stampSettings.dynamicStamps.length>0){var s=[];o.push({text:this.pdfViewer.localeObj.getConstant("Dynamic"),items:s}),this.pdfViewer.stampSettings.dynamicStamps.forEach(function(t,i){var n=e.DynamicStampItem[t];switch(n){case"NotApproved":n="Not Approved"}s.push({text:n})})}if(this.pdfViewer.stampSettings.signStamps&&this.pdfViewer.stampSettings.signStamps.length>0){var a=[];o.push({text:this.pdfViewer.localeObj.getConstant("Sign Here"),items:a}),this.pdfViewer.stampSettings.signStamps.forEach(function(t,i){var n=e.SignStampItem[t];switch(n){case"InitialHere":n="Initial Here";break;case"SignHere":n="Sign Here"}a.push({text:n})})}if(this.pdfViewer.stampSettings.standardBusinessStamps&&this.pdfViewer.stampSettings.standardBusinessStamps.length>0){var l=[];o.push({text:this.pdfViewer.localeObj.getConstant("Standard Business"),items:l}),this.pdfViewer.stampSettings.standardBusinessStamps.forEach(function(t,i){var n=e.StandardBusinessStampItem[t];switch(n){case"NotApproved":n="Not Approved";break;case"ForPublicRelease":n="For Public Release";break;case"NotForPublicRelease":n="Not For Public Release";break;case"ForComment":n="For Comment";break;case"PreliminaryResults":n="Preliminary Results";break;case"InformationOnly":n="Information Only"}l.push({text:n})})}this.pdfViewer.customStampSettings.enableCustomStamp&&!t.Browser.isDevice&&(o.length>0&&o.push({separator:!0}),o.push({text:this.pdfViewer.localeObj.getConstant("Custom Stamp"),items:[]})),this.stampMenu=[{iconCss:"e-pv-stamp-icon e-pv-icon",items:o}];var d={items:this.stampMenu,cssClass:"e-custom-scroll",showItemOnClick:!0,enableScrolling:!0,beforeOpen:function(e){if(i.resetFreeTextAnnot(),""===e.parentItem.text&&i.pdfViewer.customStampSettings.isAddToMenu&&e.items.length>0){for(var n=null,o=0;o<e.items.length;o++)if(e.items[o].text===i.pdfViewer.localeObj.getConstant("Custom Stamp")){e.items[o].items=[],n=e.items[o];break}var s=i.pdfViewerBase.customStampCollection,a=i.pdfViewer.customStampSettings.customStamps;if(0===s.length&&a&&a.length>0)for(var r=0;r<a.length;r++)s.push({customStampName:a[r].customStampName,customStampImageSource:a[r].customStampImageSource});for(var l=0;l<s.length;l++)if(null!=n){n.items.push({text:s[l].customStampName});for(o=0;o<e.items.length;o++)if(e.items[o].text===i.pdfViewer.localeObj.getConstant("Custom Stamp")){var d=e.element.children[o];if(d&&!d.childElementCount){var u=document.createElement("span");u.className="e-icons e-caret e-menu-caret-icon",d.appendChild(u),d.setAttribute("aria-haspopup","true"),d.setAttribute("aria-expanded","false")}}}}e.parentItem.text===i.pdfViewer.localeObj.getConstant("Custom Stamp")&&(a=i.pdfViewer.customStampSettings.customStamps)&&a.length>10&&(t.closest(e.element,".e-menu-wrapper").style.height="350px"),i.stampParentID=e.parentItem.text,i.menuItems.showItemOnClick=!1},beforeClose:function(e){(e.parentItem&&e.parentItem.text!==i.pdfViewer.localeObj.getConstant("Custom Stamp")&&"Standard Business"!==e.parentItem.text&&"Dynamic"!==e.parentItem.text&&"Sign Here"!==e.parentItem.text||!e.parentItem)&&(i.menuItems.showItemOnClick=!0)},select:function(e){if(i.pdfViewerBase.isAlreadyAdded=!1,e.item.text===i.pdfViewer.localeObj.getConstant("Custom Stamp")){i.updateInteractionTools(),i.checkStampAnnotations(),i.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!0;var n=document.getElementById(i.pdfViewer.element.id+"_stampElement");n&&n.click()}else if(i.stampParentID===i.pdfViewer.localeObj.getConstant("Custom Stamp")&&""!==e.item.text)for(var o=i.pdfViewerBase.customStampCollection,s=0;s<o.length;s++)o[s].customStampName===e.item.text&&(i.checkStampAnnotations(),i.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!0,i.pdfViewer.annotationModule.stampAnnotationModule.isStampAnnotSelected=!0,i.pdfViewerBase.stampAdded=!0,i.pdfViewerBase.isAlreadyAdded=!0,i.pdfViewer.annotationModule.stampAnnotationModule.createCustomStampAnnotation(o[s].customStampImageSource),i.pdfViewerBase.stampAdded=!1);else e.item.text===i.pdfViewer.localeObj.getConstant("Dynamic")||""===e.item.text||"Standard Business"===e.item.text||"Sign Here"!==i.stampParentID&&"Sign Here"===e.item.text||(i.updateInteractionTools(),i.checkStampAnnotations(),i.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!0,i.pdfViewer.annotationModule.stampAnnotationModule.isStampAnnotSelected=!0,i.pdfViewerBase.stampAdded=!0,i.stampParentID===i.pdfViewer.localeObj.getConstant("Dynamic")?(i.pdfViewerBase.isDynamicStamp=!0,i.pdfViewer.annotationModule.stampAnnotationModule.retrieveDynamicStampAnnotation(e.item.text)):(i.pdfViewerBase.isDynamicStamp=!1,i.pdfViewer.annotationModule.stampAnnotationModule.retrievestampAnnotation(e.item.text)),t.Browser.isDevice&&i.stampToolMobileForMobile(i.pdfViewer.element.id+"_annotation_stamp"))}};return this.menuItems=new r.Menu(d,"#"+this.pdfViewer.element.id+"contextMenuElement"),n.parentElement.classList.add("e-pv-stamp"),n},i.prototype.createCustomStampElement=function(){var e=t.createElement("input",{id:this.pdfViewer.element.id+"_stampElement",attrs:{type:"file"}});e.setAttribute("accept",".jpg,.jpeg"),e.style.position="absolute",e.style.left="0px",e.style.top="0px",e.style.visibility="hidden",document.body.appendChild(e),e.addEventListener("change",this.addStampImage)},i.prototype.checkStampAnnotations=function(){if(this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode&&this.pdfViewer.selectedItems&&this.pdfViewer.selectedItems.annotations)for(var e=0;e<this.pdfViewer.selectedItems.annotations.length;e++){var t=this.pdfViewer.selectedItems.annotations[e];!t||t.annotName||t.author||"Shape"===t.shapeAnnotationType&&"Image"===t.shapeAnnotationType||(this.pdfViewer.remove(t),this.pdfViewer.annotation.renderAnnotations(t.pageIndex,null,null,null),this.pdfViewer.clearSelection(t.pageIndex))}},i.prototype.createDropDowns=function(e){var i=this;if(!t.Browser.isDevice||this.pdfViewer.enableDesktopMode){this.shapeElement=this.pdfViewerBase.getElement("_annotation_shapes");var n=this.createShapeOptions(this.shapeElement.id,!0);this.shapeDropDown=this.createDropDownButton(this.shapeElement,"e-pv-annotation-shape-icon",n.element,this.pdfViewer.localeObj.getConstant("Add Shapes")),this.calibrateElement=this.pdfViewerBase.getElement("_annotation_calibrate");var o=this.createShapeOptions(this.calibrateElement.id,!1);this.calibrateDropDown=this.createDropDownButton(this.calibrateElement,"e-pv-annotation-calibrate-icon",o.element,this.pdfViewer.localeObj.getConstant("Calibrate"))}if(e||(this.colorDropDownElement=this.pdfViewerBase.getElement("_annotation_color"),this.colorPalette=this.createColorPicker(this.colorDropDownElement.id),this.colorPalette.change=this.onColorPickerChange.bind(this),this.colorDropDown=this.createDropDownButton(this.colorDropDownElement,"e-pv-annotation-color-icon",this.colorPalette.element.parentElement,this.pdfViewer.localeObj.getConstant("Color edit")),this.colorDropDown.beforeOpen=this.colorDropDownBeforeOpen.bind(this),this.colorDropDown.open=this.colorDropDownOpen.bind(this),this.pdfViewerBase.getElement("_annotation_color-popup").addEventListener("click",this.onColorPickerCancelClick.bind(this))),!t.Browser.isDevice||this.pdfViewer.enableDesktopMode){this.strokeDropDownElement=this.pdfViewerBase.getElement("_annotation_stroke"),this.strokeColorPicker=this.createColorPicker(this.strokeDropDownElement.id),this.strokeColorPicker.change=this.onStrokePickerChange.bind(this),this.strokeDropDown=this.createDropDownButton(this.strokeDropDownElement,"e-pv-annotation-stroke-icon",this.strokeColorPicker.element.parentElement,this.pdfViewer.localeObj.getConstant("Stroke edit")),this.strokeDropDown.beforeOpen=this.strokeDropDownBeforeOpen.bind(this),this.strokeDropDown.open=this.strokeDropDownOpen.bind(this),this.pdfViewerBase.getElement("_annotation_stroke-popup").addEventListener("click",this.onStrokePickerCancelClick.bind(this)),this.thicknessElement=this.pdfViewerBase.getElement("_annotation_thickness");var s=this.createThicknessSlider(this.thicknessElement.id);this.thicknessDropDown=this.createDropDownButton(this.thicknessElement,"e-pv-annotation-thickness-icon",s,this.pdfViewer.localeObj.getConstant("Change thickness")),this.thicknessDropDown.beforeOpen=this.thicknessDropDownBeforeOpen.bind(this),this.thicknessSlider.change=this.thicknessChange.bind(this),this.thicknessSlider.changed=this.thicknessChange.bind(this),this.thicknessDropDown.open=this.thicknessDropDownOpen.bind(this)}if(!e){this.opacityDropDownElement=this.pdfViewerBase.getElement("_annotation_opacity");var a=this.createSlider(this.opacityDropDownElement.id);this.opacityDropDown=this.createDropDownButton(this.opacityDropDownElement,"e-pv-annotation-opacity-icon",a,this.pdfViewer.localeObj.getConstant("Opacity edit")),this.opacityDropDown.beforeOpen=this.opacityDropDownBeforeOpen.bind(this),this.opacitySlider.change=this.opacityChange.bind(this),this.opacitySlider.changed=this.opacityChange.bind(this),this.opacityDropDown.open=this.opacityDropDownOpen.bind(this)}t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.fontFamilyElement=this.pdfViewerBase.getElement("_annotation_fontname"),this.createDropDownListForFamily(this.fontFamilyElement),this.fontFamilyElement.style.textAlign="left",this.fontFamilyElement.addEventListener("change",function(){i.onFontFamilyChange.bind(i)}),this.fontSizeElement=this.pdfViewerBase.getElement("_annotation_fontsize"),this.createDropDownListForSize(this.fontSizeElement),this.fontColorElement=this.pdfViewerBase.getElement("_annotation_textcolor"),this.fontColorPalette=this.createColorPicker(this.fontColorElement.id),this.fontColorPalette.change=this.onFontColorChange.bind(this),this.fontColorDropDown=this.createDropDownButton(this.fontColorElement,"e-pv-annotation-textcolor-icon",this.fontColorPalette.element.parentElement,this.pdfViewer.localeObj.getConstant("Font color")),this.textAlignElement=this.pdfViewerBase.getElement("_annotation_textalign"),this.alignmentToolbar=this.createShapeOptions(this.textAlignElement.id,void 0,!0),this.textAlignDropDown=this.createDropDownButton(this.textAlignElement,"e-pv-annotation-textalign-icon",this.alignmentToolbar.element,this.pdfViewer.localeObj.getConstant("Text Align")),this.textAlignDropDown.beforeOpen=this.textAlignDropDownBeforeOpen.bind(this),this.textPropElement=this.pdfViewerBase.getElement("_annotation_textproperties"),this.propertiesToolbar=this.createShapeOptions(this.textPropElement.id,void 0,!1,!0),this.textPropertiesDropDown=this.createPropDropDownButton(this.textPropElement,"e-pv-annotation-textprop-icon",this.propertiesToolbar.element,this.pdfViewer.localeObj.getConstant("Text Properties")),this.textPropertiesDropDown.beforeOpen=this.textPropertiesDropDownBeforeOpen.bind(this))},i.prototype.mobileColorpicker=function(e){var t=this;this.opacityDropDownElement=this.pdfViewerBase.getElement("_annotation_opacity");var i=this.createSlider(this.opacityDropDownElement.id);if(this.opacityDropDown=this.createDropDownButton(this.opacityDropDownElement,"e-pv-annotation-opacity-icon",i,this.pdfViewer.localeObj.getConstant("Opacity edit")),this.opacityDropDown.beforeOpen=this.opacityDropDownBeforeOpen.bind(this),this.opacitySlider.change=this.opacityChange.bind(this),this.opacitySlider.changed=this.opacityChange.bind(this),this.opacityDropDown.open=this.opacityDropDownOpen.bind(this),e===this.pdfViewer.element.id+"_annotation_shapes"?e=this.pdfViewer.element.id+"_annotation_shapesIcon":e===this.pdfViewer.element.id+"_annotation_calibrate"?e=this.pdfViewer.element.id+"_annotation_calibrateIcon":e===this.pdfViewer.element.id+"_highlight"?e=this.pdfViewer.element.id+"_highlightIcon":e===this.pdfViewer.element.id+"_underline"?e=this.pdfViewer.element.id+"_underlineIcon":e===this.pdfViewer.element.id+"_strikethrough"&&(e=this.pdfViewer.element.id+"_strikethroughIcon"),(e===this.pdfViewer.element.id+"_annotation_shapesIcon"||e===this.pdfViewer.element.id+"_annotation_calibrateIcon"||e===this.pdfViewer.element.id+"_annotation_freeTextEdit"||e===this.pdfViewer.element.id+"_highlightIcon"||e===this.pdfViewer.element.id+"_underlineIcon"||e===this.pdfViewer.element.id+"_strikethroughIcon"||e===this.pdfViewer.element.id+"_annotation_inkIcon"||e===this.pdfViewer.element.id+"_annotation_handwrittenSign")&&(e!==this.pdfViewer.element.id+"_annotation_handwrittenSign"&&e!==this.pdfViewer.element.id+"_annotation_inkIcon"&&(this.colorDropDownElement=this.pdfViewerBase.getElement("_annotation_color"),this.colorPalette=this.createColorPicker(this.colorDropDownElement.id),this.colorPalette.change=this.onColorPickerChange.bind(this),this.colorDropDown=this.createDropDownButton(this.colorDropDownElement,"e-pv-annotation-color-icon",this.colorPalette.element.parentElement,this.pdfViewer.localeObj.getConstant("Color edit")),this.colorDropDown.beforeOpen=this.colorDropDownBeforeOpen.bind(this),this.colorDropDown.open=this.colorDropDownOpen.bind(this),this.pdfViewerBase.getElement("_annotation_color-popup").addEventListener("click",this.onColorPickerCancelClick.bind(this))),e===this.pdfViewer.element.id+"_annotation_freeTextEdit"&&(this.fontFamilyElement=this.pdfViewerBase.getElement("_annotation_fontname"),this.createDropDownListForFamily(this.fontFamilyElement),this.fontFamilyElement.style.textAlign="left",this.fontFamilyElement.addEventListener("change",function(){t.onFontFamilyChange.bind(t)}),this.fontSizeElement=this.pdfViewerBase.getElement("_annotation_fontsize"),this.createDropDownListForSize(this.fontSizeElement),this.fontColorElement=this.pdfViewerBase.getElement("_annotation_textcolor"),this.fontColorPalette=this.createColorPicker(this.fontColorElement.id),this.fontColorPalette.change=this.onFontColorChange.bind(this),this.fontColorDropDown=this.createDropDownButton(this.fontColorElement,"e-pv-annotation-textcolor-icon",this.fontColorPalette.element.parentElement,this.pdfViewer.localeObj.getConstant("Font color")),this.textAlignElement=this.pdfViewerBase.getElement("_annotation_textalign"),this.alignmentToolbar=this.createShapeOptions(this.textAlignElement.id,void 0,!0),this.textAlignDropDown=this.createDropDownButton(this.textAlignElement,"e-pv-annotation-textalign-icon",this.alignmentToolbar.element,this.pdfViewer.localeObj.getConstant("Text Align")),this.textAlignDropDown.beforeOpen=this.textAlignDropDownBeforeOpen.bind(this),this.textPropElement=this.pdfViewerBase.getElement("_annotation_textproperties"),this.propertiesToolbar=this.createShapeOptions(this.textPropElement.id,void 0,!1,!0),this.textPropertiesDropDown=this.createPropDropDownButton(this.textPropElement,"e-pv-annotation-textprop-icon",this.propertiesToolbar.element,this.pdfViewer.localeObj.getConstant("Text Properties")),this.textPropertiesDropDown.beforeOpen=this.textPropertiesDropDownBeforeOpen.bind(this)),e===this.pdfViewer.element.id+"_annotation_shapesIcon"||e===this.pdfViewer.element.id+"_annotation_calibrateIcon"||e===this.pdfViewer.element.id+"_annotation_freeTextEdit"||e===this.pdfViewer.element.id+"_annotation_inkIcon"||e===this.pdfViewer.element.id+"_annotation_handwrittenSign")){this.thicknessElement=this.pdfViewerBase.getElement("_annotation_thickness");var n=this.createThicknessSlider(this.thicknessElement.id);this.thicknessDropDown=this.createDropDownButton(this.thicknessElement,"e-pv-annotation-thickness-icon",n,this.pdfViewer.localeObj.getConstant("Change thickness")),this.thicknessDropDown.beforeOpen=this.thicknessDropDownBeforeOpen.bind(this),this.thicknessSlider.change=this.thicknessChange.bind(this),this.thicknessSlider.changed=this.thicknessChange.bind(this),this.thicknessDropDown.open=this.thicknessDropDownOpen.bind(this),this.strokeDropDownElement=this.pdfViewerBase.getElement("_annotation_stroke"),this.strokeColorPicker=this.createColorPicker(this.strokeDropDownElement.id),this.strokeColorPicker.change=this.onStrokePickerChange.bind(this),this.strokeDropDown=this.createDropDownButton(this.strokeDropDownElement,"e-pv-annotation-stroke-icon",this.strokeColorPicker.element.parentElement,this.pdfViewer.localeObj.getConstant("Stroke edit")),this.strokeDropDown.beforeOpen=this.strokeDropDownBeforeOpen.bind(this),this.strokeDropDown.open=this.strokeDropDownOpen.bind(this),this.pdfViewerBase.getElement("_annotation_stroke-popup").addEventListener("click",this.onStrokePickerCancelClick.bind(this))}},i.prototype.opacityDropDownOpen=function(e){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?(e.element.parentElement.style.left="0px",e.element.parentElement.style.top=this.pdfViewerBase.viewerContainer.clientHeight+"px"):this.calculateToolbarPosition(e)},i.prototype.onColorPickerCancelClick=function(e){e.target.classList.contains("e-cancel")&&this.colorDropDown.toggle()},i.prototype.onStrokePickerCancelClick=function(e){e.target.classList.contains("e-cancel")&&this.strokeDropDown.toggle()},i.prototype.colorDropDownBeforeOpen=function(e){this.colorPalette.noColor=!1,this.pdfViewer.annotationModule.textMarkupAnnotationModule&&(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?this.colorPalette.value=this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation.color:this.setCurrentColorInPicker()),1===this.pdfViewer.selectedItems.annotations.length?(this.colorPalette.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill,this.colorPalette.noColor=!0):this.setCurrentColorInPicker(),this.colorPalette.refresh(),this.updateColorInIcon(this.colorDropDownElement,this.colorPalette.value)},i.prototype.setCurrentColorInPicker=function(){if(!t.isBlazor()){if(this.pdfViewer.annotationModule.textMarkupAnnotationModule)switch(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode){case"Highlight":this.setColorInPicker(this.colorPalette,this.pdfViewer.annotationModule.textMarkupAnnotationModule.highlightColor);break;case"Underline":this.setColorInPicker(this.colorPalette,this.pdfViewer.annotationModule.textMarkupAnnotationModule.underlineColor);break;case"Strikethrough":this.setColorInPicker(this.colorPalette,this.pdfViewer.annotationModule.textMarkupAnnotationModule.strikethroughColor)}if(this.pdfViewer.annotation.shapeAnnotationModule)switch(this.pdfViewer.annotationModule.shapeAnnotationModule.currentAnnotationMode){case"Line":this.setColorInPicker(this.colorPalette,this.pdfViewer.annotationModule.shapeAnnotationModule.lineFillColor);break;case"Arrow":this.setColorInPicker(this.colorPalette,this.pdfViewer.annotationModule.shapeAnnotationModule.arrowFillColor);break;case"Rectangle":this.setColorInPicker(this.colorPalette,this.pdfViewer.annotationModule.shapeAnnotationModule.rectangleFillColor);break;case"Circle":this.setColorInPicker(this.colorPalette,this.pdfViewer.annotationModule.shapeAnnotationModule.circleFillColor);break;case"Polygon":this.setColorInPicker(this.colorPalette,this.pdfViewer.annotationModule.shapeAnnotationModule.polygonFillColor)}this.colorDropDownElement&&this.updateColorInIcon(this.colorDropDownElement,this.colorPalette.value)}},i.prototype.colorDropDownOpen=function(e){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(e.element.parentElement.style.top=this.pdfViewerBase.viewerContainer.clientHeight/2+"px"),this.colorPalette.refresh()},i.prototype.strokeDropDownBeforeOpen=function(e){1===this.pdfViewer.selectedItems.annotations.length?this.strokeColorPicker.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor:this.setCurrentStrokeColorInPicker(),this.strokeColorPicker.refresh(),this.updateColorInIcon(this.strokeDropDownElement,this.strokeColorPicker.value),this.updateInkannotationItems()},i.prototype.setCurrentStrokeColorInPicker=function(){if(!t.isBlazor()&&this.pdfViewer.annotation.shapeAnnotationModule)switch(this.pdfViewer.annotationModule.shapeAnnotationModule.currentAnnotationMode){case"Line":this.setColorInPicker(this.strokeColorPicker,this.pdfViewer.annotationModule.shapeAnnotationModule.lineStrokeColor);break;case"Arrow":this.setColorInPicker(this.strokeColorPicker,this.pdfViewer.annotationModule.shapeAnnotationModule.arrowStrokeColor);break;case"Rectangle":this.setColorInPicker(this.strokeColorPicker,this.pdfViewer.annotationModule.shapeAnnotationModule.rectangleStrokeColor);break;case"Circle":this.setColorInPicker(this.strokeColorPicker,this.pdfViewer.annotationModule.shapeAnnotationModule.circleStrokeColor);break;case"Polygon":this.setColorInPicker(this.strokeColorPicker,this.pdfViewer.annotationModule.shapeAnnotationModule.polygonStrokeColor)}},i.prototype.strokeDropDownOpen=function(e){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(e.element.parentElement.style.top=this.pdfViewerBase.viewerContainer.clientHeight/2+"px"),this.strokeColorPicker.refresh()},i.prototype.onFontColorChange=function(e){var i;i=t.isBlazor()?e[0]:""===e.currentValue.hex?"#ffffff00":e.currentValue.hex,1===this.pdfViewer.selectedItems.annotations.length?this.pdfViewer.annotation.modifyFontColor(i):(this.pdfViewer.freeTextSettings.fontColor=i,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()),t.isBlazor()?(this.fontColorElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-textcolor-container"),this.updateColorInIcon(this.fontColorElementInBlazor,i)):(this.updateColorInIcon(this.fontColorElement,i),this.fontColorDropDown.toggle())},i.prototype.onFontFamilyChange=function(e){var i;i=t.isBlazor()?e:e&&e.fontFamily&&e.fontFamily.value?e.fontFamily.value:"",1===this.pdfViewer.selectedItems.annotations.length&&i?this.pdfViewer.annotation.modifyFontFamily(i):(this.pdfViewer.freeTextSettings.fontFamily=i,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties())},i.prototype.onFontSizeChange=function(e){var i;i=t.isBlazor()?e:e&&e.fontSize&&e.fontSize.value?e.fontSize.value:"";var n=parseFloat(i);1===this.pdfViewer.selectedItems.annotations.length&&i?this.pdfViewer.annotation.modifyFontSize(n):(this.pdfViewer.freeTextSettings.fontSize=n,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties())},i.prototype.textAlignDropDownBeforeOpen=function(e){if(1===this.pdfViewer.selectedItems.annotations.length&&e.element.getElementsByTagName("button")&&e.element.getElementsByTagName("button").length>0)for(var t=e.element.getElementsByTagName("button"),i=this.pdfViewer.selectedItems.annotations[0],n=0;n<t.length;n++)t[n]&&(t[n].classList.remove("textprop-option-active"),t[n].id===this.pdfViewer.element.id+"_left_align"&&"Left"===i.textAlign&&t[n].classList.add("textprop-option-active"),t[n].id===this.pdfViewer.element.id+"_right_align"&&"Right"===i.textAlign&&t[n].classList.add("textprop-option-active"),t[n].id===this.pdfViewer.element.id+"_center_align"&&"Center"===i.textAlign&&t[n].classList.add("textprop-option-active"),t[n].id===this.pdfViewer.element.id+"_justify_align"&&"Justify"===i.textAlign&&t[n].classList.add("textprop-option-active"))},i.prototype.textPropertiesDropDownBeforeOpen=function(e){if(1===this.pdfViewer.selectedItems.annotations.length&&e.element.getElementsByTagName("button")&&e.element.getElementsByTagName("button").length>0)for(var t=e.element.getElementsByTagName("button"),i=this.pdfViewer.selectedItems.annotations[0],n=0;n<t.length;n++)t[n]&&(t[n].classList.remove("textprop-option-active"),t[n].id===this.pdfViewer.element.id+"_bold"&&i.font.isBold&&t[n].classList.add("textprop-option-active"),t[n].id===this.pdfViewer.element.id+"_italic"&&i.font.isItalic&&t[n].classList.add("textprop-option-active"),t[n].id===this.pdfViewer.element.id+"_strikeout"&&i.font.isStrikeout&&t[n].classList.add("textprop-option-active"),t[n].id===this.pdfViewer.element.id+"_underline_textinput"&&i.font.isUnderline&&t[n].classList.add("textprop-option-active"))},i.prototype.onClickTextAlignment=function(e){var i;i=t.isBlazor()?e[0]:e&&e.item&&e.item.value?e.item.value:"",1===this.pdfViewer.selectedItems.annotations.length&&i?this.pdfViewer.annotation.modifyTextAlignment(i):(this.pdfViewer.freeTextSettings.textAlignment=e.item.value,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()),this.updateTextAlignInIcon(i)},i.prototype.onClickTextProperties=function(e){var i;if(i=t.isBlazor()?e[0]:e&&e.item&&e.item.value?e.item.value:"",1===this.pdfViewer.selectedItems.annotations.length&&i){var n={isBold:void 0,isItalic:void 0,isStrikeout:void 0,isUnderline:void 0};"bold"===i?n.isBold=!this.pdfViewer.selectedItems.annotations[0].font.isBold:"italic"===i?n.isItalic=!this.pdfViewer.selectedItems.annotations[0].font.isItalic:"underline"===i?n.isUnderline=!this.pdfViewer.selectedItems.annotations[0].font.isUnderline:"strikeout"===i&&(n.isStrikeout=!this.pdfViewer.selectedItems.annotations[0].font.isStrikeout),this.pdfViewer.annotation.modifyTextProperties(n,i)}else"bold"===i?this.pdfViewer.annotationModule.freeTextAnnotationModule.isBold?this.pdfViewer.annotationModule.freeTextAnnotationModule.isBold=!1:(this.pdfViewer.freeTextSettings.fontStyle=1,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()):"italic"===i?this.pdfViewer.annotationModule.freeTextAnnotationModule.isItalic?this.pdfViewer.annotationModule.freeTextAnnotationModule.isItalic=!1:(this.pdfViewer.freeTextSettings.fontStyle=2,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()):"underline"===i?this.pdfViewer.annotationModule.freeTextAnnotationModule.isUnderline?this.pdfViewer.annotationModule.freeTextAnnotationModule.isUnderline=!1:(this.pdfViewer.freeTextSettings.fontStyle=4,this.pdfViewer.annotationModule.freeTextAnnotationModule.isStrikethrough=!1,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()):"strikeout"===i&&(this.pdfViewer.annotationModule.freeTextAnnotationModule.isStrikethrough?this.pdfViewer.annotationModule.freeTextAnnotationModule.isStrikethrough=!1:(this.pdfViewer.freeTextSettings.fontStyle=8,this.pdfViewer.annotationModule.freeTextAnnotationModule.isUnderline=!1,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()));this.updateTextPropertySelection(i)},i.prototype.opacityChange=function(e){var i=1;if(i=e&&1===e.length?e[0]:e.value,this.pdfViewer.annotationModule.textMarkupAnnotationModule)if(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)t.isBlazor()?this.pdfViewer.annotationModule.textMarkupAnnotationModule.modifyOpacityProperty(null,i):this.isCurrentAnnotationOpacitySet&&"changed"===e.name?this.isCurrentAnnotationOpacitySet=!1:this.pdfViewer.annotationModule.textMarkupAnnotationModule.modifyOpacityProperty(e);else switch(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode){case"Highlight":this.pdfViewer.annotationModule.textMarkupAnnotationModule.highlightOpacity=i/100;break;case"Underline":this.pdfViewer.annotationModule.textMarkupAnnotationModule.underlineOpacity=i/100;break;case"Strikethrough":this.pdfViewer.annotationModule.textMarkupAnnotationModule.strikethroughOpacity=i/100}if(1===this.pdfViewer.selectedItems.annotations.length){var n=this.pdfViewer.selectedItems.annotations[0];if(null==n||"Stamp"!==n.shapeAnnotationType&&"Image"!==n.shapeAnnotationType)t.isBlazor()?this.pdfViewer.annotation.modifyOpacity(i,!0):"changed"===e.name&&e.value!==e.previousValue&&this.pdfViewer.annotation.modifyOpacity(e);else{var o=m(n),s=m(n);s.opacity=i/100,this.pdfViewer.nodePropertyChange(n,{opacity:i/100}),this.pdfViewer.annotation.triggerAnnotationPropChange(n,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(this.pdfViewer.selectedItems.annotations[0].pageIndex,null,this.pdfViewer.selectedItems.annotations[0],"stampOpacity","",o,s),this.pdfViewer.annotation.stampAnnotationModule.updateSessionStorage(this.pdfViewer.selectedItems.annotations[0],null,"opacity")}}else{if(this.pdfViewer.annotation.shapeAnnotationModule)switch(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode){case"Line":this.pdfViewer.annotation.shapeAnnotationModule.lineOpacity=i/100;break;case"Arrow":this.pdfViewer.annotation.shapeAnnotationModule.arrowOpacity=i/100;break;case"Rectangle":this.pdfViewer.annotation.shapeAnnotationModule.rectangleOpacity=i/100;break;case"Circle":this.pdfViewer.annotation.shapeAnnotationModule.circleOpacity=i/100;break;case"Polygon":this.pdfViewer.annotation.shapeAnnotationModule.polygonOpacity=i/100}var a=this.pdfViewer.annotation;a&&a.inkAnnotationModule&&(this.pdfViewer.inkAnnotationSettings.opacity=i/100),this.pdfViewer.drawingObject&&(this.pdfViewer.drawingObject.opacity=i/100,"FreeText"===this.pdfViewer.drawingObject.shapeAnnotationType&&(this.pdfViewer.freeTextSettings.opacity=i/100,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()))}t.isBlazor()||this.updateOpacityIndicator()},i.prototype.opacityDropDownBeforeOpen=function(e){if(this.pdfViewer.annotationModule.textMarkupAnnotationModule)if(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)this.isCurrentAnnotationOpacitySet=!0,this.opacitySlider.value=100*this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation.opacity;else switch(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode){case"Highlight":this.opacitySlider.value=100*this.pdfViewer.annotationModule.textMarkupAnnotationModule.highlightOpacity;break;case"Underline":this.opacitySlider.value=100*this.pdfViewer.annotationModule.textMarkupAnnotationModule.underlineOpacity;break;case"Strikethrough":this.opacitySlider.value=100*this.pdfViewer.annotationModule.textMarkupAnnotationModule.strikethroughOpacity}if(1===this.pdfViewer.selectedItems.annotations.length)this.opacitySlider.value=100*this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.opacity;else if(this.pdfViewer.annotation.shapeAnnotationModule)switch(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode){case"Line":this.opacitySlider.value=100*this.pdfViewer.annotation.shapeAnnotationModule.lineOpacity;break;case"Arrow":this.opacitySlider.value=100*this.pdfViewer.annotation.shapeAnnotationModule.arrowOpacity;break;case"Rectangle":this.opacitySlider.value=100*this.pdfViewer.annotation.shapeAnnotationModule.rectangleOpacity;break;case"Circle":this.opacitySlider.value=100*this.pdfViewer.annotation.shapeAnnotationModule.circleOpacity;break;case"Polygon":this.opacitySlider.value=100*this.pdfViewer.annotation.shapeAnnotationModule.polygonOpacity}this.updateOpacityIndicator(),this.updateInkannotationItems()},i.prototype.thicknessDropDownBeforeOpen=function(){if(1===this.pdfViewer.selectedItems.annotations.length)this.thicknessSlider.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeWidth;else if(this.pdfViewer.annotation.shapeAnnotationModule)switch(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode){case"Line":this.thicknessSlider.value=this.pdfViewer.annotation.shapeAnnotationModule.lineThickness;break;case"Arrow":this.thicknessSlider.value=this.pdfViewer.annotation.shapeAnnotationModule.arrowThickness;break;case"Rectangle":this.thicknessSlider.value=this.pdfViewer.annotation.shapeAnnotationModule.rectangleThickness;break;case"Circle":this.thicknessSlider.value=this.pdfViewer.annotation.shapeAnnotationModule.circleThickness;break;case"Polygon":this.thicknessSlider.value=this.pdfViewer.annotation.shapeAnnotationModule.polygonThickness}this.updateThicknessIndicator(),this.updateInkannotationItems()},i.prototype.thicknessDropDownOpen=function(e){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?(e.element.parentElement.style.left="0px",e.element.parentElement.style.top=this.pdfViewerBase.viewerContainer.clientHeight+"px"):this.calculateToolbarPosition(e)},i.prototype.calculateToolbarPosition=function(e){if(e.element&&e.element.parentElement){var t=parseFloat(e.element.parentElement.style.left),i=e.element.parentElement.offsetWidth;t+i<this.pdfViewer.element.offsetWidth+10&&(e.element.parentElement.style.left=t-i+"px")}},i.prototype.thicknessChangeInBlazor=function(e){1===this.pdfViewer.selectedItems.annotations.length?this.pdfViewer.annotation.modifyThickness(e[0]):this.ShapeThickness(e[0])},i.prototype.thicknessChange=function(e){1===this.pdfViewer.selectedItems.annotations.length?"changed"===e.name&&(this.pdfViewer.annotation.modifyThickness(e.value),t.isBlazor()||this.updateThicknessIndicator()):this.ShapeThickness(e.value)},i.prototype.ShapeThickness=function(e){if(this.pdfViewer.annotation.shapeAnnotationModule){switch(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode){case"Line":this.pdfViewer.annotation.shapeAnnotationModule.lineThickness=e;break;case"Arrow":this.pdfViewer.annotation.shapeAnnotationModule.arrowThickness=e;break;case"Rectangle":this.pdfViewer.annotation.shapeAnnotationModule.rectangleThickness=e;break;case"Circle":this.pdfViewer.annotation.shapeAnnotationModule.circleThickness=e;break;case"Polygon":this.pdfViewer.annotation.shapeAnnotationModule.polygonThickness=e}var i=this.pdfViewer.annotation;i&&i.inkAnnotationModule&&(this.pdfViewer.inkAnnotationSettings.thickness=e.value),this.pdfViewer.drawingObject&&(this.pdfViewer.drawingObject.thickness=e.value),this.pdfViewer.drawingObject&&"FreeText"===this.pdfViewer.drawingObject.shapeAnnotationType&&(this.pdfViewer.freeTextSettings.borderWidth=e.value,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties())}var n=this.pdfViewer.annotation;n&&n.inkAnnotationModule&&(this.pdfViewer.inkAnnotationSettings.thickness=e),this.pdfViewer.drawingObject&&(this.pdfViewer.drawingObject.thickness=e),this.pdfViewer.drawingObject&&"FreeText"===this.pdfViewer.drawingObject.shapeAnnotationType&&(this.pdfViewer.freeTextSettings.borderWidth=e,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()),t.isBlazor()||this.updateThicknessIndicator()},i.prototype.createDropDownButton=function(e,t,i,n){var o=new s.DropDownButton({iconCss:t+" e-pv-icon",target:i});return this.pdfViewer.enableRtl&&(o.enableRtl=!0),o.appendTo(e),this.primaryToolbar.createTooltip(e,n),o},i.prototype.createShapeOptions=function(e,i,n,o){var s=t.createElement("div",{id:e+"_target",className:"e-pv-shapes-toolbar"});document.body.appendChild(s);var a;return n?((a=new r.Toolbar({items:this.textAlignmentToolbarItems(),overflowMode:"MultiRow"},s)).isStringTemplate=!0,this.afterAlignmentToolbarCreation()):o?((a=new r.Toolbar({items:this.textPropertiesToolbarItems(),overflowMode:"MultiRow"},s)).isStringTemplate=!0,this.afterPropertiesToolbarCreation()):i?t.Browser.isDevice?(this.toolbarElement=t.createElement("div",{id:e+"_target",className:"e-pv-mobile-annotation-toolbar",styles:"bottom: 0px; position: absolute; width: 100%; float: left"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.toolbarElement),(a=new r.Toolbar({items:this.createShapeToolbarItemsForMobile(),overflowMode:"Scrollable",clicked:this.onShapeToolbarClicked.bind(this)},this.toolbarElement)).isStringTemplate=!0,this.afterShapeToolbarCreationForMobile()):((a=new r.Toolbar({items:this.createShapeToolbarItems(),overflowMode:"MultiRow",clicked:this.onShapeToolbarClicked.bind(this)},s)).isStringTemplate=!0,this.afterShapeToolbarCreation()):((a=new r.Toolbar({items:this.createCalibrateToolbarItems(),overflowMode:"MultiRow",clicked:this.onCalibrateToolbarClicked.bind(this)},s)).isStringTemplate=!0,this.afterCalibrateToolbarCreation()),a},i.prototype.createPropertyToolbarForMobile=function(e){var t=this,i=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_color","e-pv-annotation-color-container"),n=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_stroke","e-pv-annotation-stroke-container"),o=this.getTemplate("span","_annotation_thickness","e-pv-annotation-thickness-container"),s=this.getTemplate("span","_annotation_opacity","e-pv-annotation-opacity-container"),a=this.getTemplate("input","_annotation_fontname","e-pv-annotation-fontname-container"),r=this.getTemplate("input","_annotation_fontsize","e-pv-annotation-fontsize-container"),l=this.getTemplate("span","_annotation_textcolor","e-pv-annotation-textcolor-container"),d=this.getTemplate("span","_annotation_textalign","e-pv-annotation-textalign-container"),u=this.getTemplate("span","_annotation_textproperties","e-pv-annotation-textprop-container"),M=[];return"Polygon"===e||"Rectangle"===e||"Ellipse"===e||"Line"===e||"LineWidthArrowHead"===e||"Distance"===e||"Perimeter"===e||"Radius"===e||"FreeText"===e?("FreeText"===e&&(M.push({prefixIcon:"e-pv-freetext-icon e-pv-icon",className:"e-pv-annotation-freetextedit-container"}),M.push({type:"Separator",align:"Left"}),M.push({template:a}),M.push({template:r}),M.push({template:l}),M.push({template:d}),M.push({template:u})),"Polygon"===e?"Area"===this.pdfViewer.selectedItems.annotations[0].measureType?(M.push({prefixIcon:"e-pv-calibrate-area-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"Volume"===this.pdfViewer.selectedItems.annotations[0].measureType?(M.push({prefixIcon:"e-pv-calibrate-volume-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):(M.push({prefixIcon:"e-pv-shape-pentagon-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"Rectangle"===e?(M.push({prefixIcon:"e-pv-shape-rectangle-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"Ellipse"===e?(M.push({prefixIcon:"e-pv-shape-circle-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"Line"===e?"Perimeter"===this.pdfViewer.selectedItems.annotations[0].measureType?(M.push({prefixIcon:"e-pv-calibrate-perimeter-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):(M.push({prefixIcon:"e-pv-shape-line-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"LineWidthArrowHead"===e?(M.push({prefixIcon:"e-pv-shape-arrow-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"Distance"===e?(M.push({prefixIcon:"e-pv-calibrate-distance-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"Perimeter"===e?(M.push({prefixIcon:"e-pv-calibrate-perimeter-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"Radius"===e&&(M.push({prefixIcon:"e-pv-calibrate-radius-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})),M.push({template:i}),M.push({template:n}),M.push({template:o})):"Path"===e||"Ink"===e||"HandWrittenSignature"===e?("Path"===e||"Ink"===e?(M.push({prefixIcon:"e-pv-inkannotation-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"HandWrittenSignature"===e&&(M.push({prefixIcon:"e-pv-handwritten-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})),M.push({template:n}),M.push({template:o})):"Underline"===e||"Highlight"===e||"Strikethrough"===e?("Highlight"===e?(M.push({prefixIcon:"e-pv-highlight-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"Underline"===e?(M.push({prefixIcon:"e-pv-underline-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"Strikethrough"===e&&(M.push({prefixIcon:"e-pv-strikethrough-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})),M.push({template:i})):"Stamp"===e?(M.push({prefixIcon:"e-pv-stamp-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})):"StickyNotes"===e&&(M.push({prefixIcon:"e-pv-comment-icon e-pv-icon"}),M.push({type:"Separator",align:"Left"})),M.push({template:s}),M.push({prefixIcon:"e-pv-comment-panel-icon e-pv-icon",className:"e-pv-comment-panel-icon-container",id:this.pdfViewer.element.id+"_annotation_commentPanel",align:"Right",click:function(e){t.pdfViewer.annotationModule.showCommentsPanel()}}),M.push({prefixIcon:"e-pv-annotation-delete-icon e-pv-icon",className:"e-pv-annotation-delete-container",id:this.pdfViewer.element.id+"_annotation_delete",align:"Right",click:function(e){t.pdfViewer.annotationModule.deleteAnnotation(),t.propertyToolbar.destroy(),t.toolbarCreated=!1,t.createAnnotationToolbarForMobile(),t.adjustMobileViewer()}}),M},i.prototype.createStampToolbarItemsForMobile=function(){var e=this.getTemplate("span","_annotation_opacity","e-pv-annotation-opacity-container"),t=[];return t.push({type:"Separator",align:"Left"}),t.push({template:e}),t},i.prototype.createShapeToolbarItemsForMobile=function(){var e=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_color","e-pv-annotation-color-container"),t=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_stroke","e-pv-annotation-stroke-container"),i=this.getTemplate("span","_annotation_thickness","e-pv-annotation-thickness-container"),n=this.getTemplate("span","_annotation_opacity","e-pv-annotation-opacity-container"),o=[];return o.push({prefixIcon:"e-pv-backward-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Go Back"),id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)}),o.push({prefixIcon:"e-pv-shape-line-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_line",text:this.pdfViewer.localeObj.getConstant("Line Shape"),align:"Left"}),o.push({prefixIcon:"e-pv-shape-arrow-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_arrow",text:this.pdfViewer.localeObj.getConstant("Arrow Shape"),align:"Left"}),o.push({prefixIcon:"e-pv-shape-rectangle-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_rectangle",text:this.pdfViewer.localeObj.getConstant("Rectangle Shape"),align:"Left"}),o.push({prefixIcon:"e-pv-shape-circle-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_circle",text:this.pdfViewer.localeObj.getConstant("Circle Shape"),align:"Left"}),o.push({prefixIcon:"e-pv-shape-pentagon-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_pentagon",text:this.pdfViewer.localeObj.getConstant("Pentagon Shape"),align:"Left"}),o.push({type:"Separator",align:"Left"}),o.push({template:e}),o.push({template:t}),o.push({template:i}),o.push({template:n}),o},i.prototype.createCalibrateToolbarItemsForMobile=function(){var e=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_color","e-pv-annotation-color-container"),t=this.pdfViewer.toolbarModule.annotationToolbarModule.getTemplate("span","_annotation_stroke","e-pv-annotation-stroke-container"),i=this.getTemplate("span","_annotation_thickness","e-pv-annotation-thickness-container"),n=this.getTemplate("span","_annotation_opacity","e-pv-annotation-opacity-container"),o=[];return o.push({prefixIcon:"e-pv-backward-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Go Back"),id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)}),o.push({prefixIcon:"e-pv-calibrate-distance-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_distance",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),o.push({prefixIcon:"e-pv-calibrate-perimeter-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_perimeter",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),o.push({prefixIcon:"e-pv-calibrate-area-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_area",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),o.push({prefixIcon:"e-pv-calibrate-radius-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_radius",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),o.push({prefixIcon:"e-pv-calibrate-volume-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_volume",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),o.push({type:"Separator",align:"Left"}),o.push({template:e}),o.push({template:t}),o.push({template:i}),o.push({template:n}),o},i.prototype.handleShapeTool=function(e){if(!t.isBlazor()&&t.Browser.isDevice)for(var i=document.querySelectorAll(".e-pv-select"),n=0;n<i.length;n++)i[n].id!==e&&i[n].id!==this.pdfViewer.element.id+"_annotation"&&i[n].classList.remove("e-pv-select")},i.prototype.createPropDropDownButton=function(e,t,i,n){var o=new s.DropDownButton({iconCss:t+" e-pv-icon",target:i,cssClass:"e-caret-hide"});return this.pdfViewer.enableRtl&&(o.enableRtl=!0),o.appendTo(e),this.primaryToolbar.createTooltip(e,n),o},i.prototype.textAlignmentToolbarItems=function(){var e=[];return e.push({prefixIcon:"e-pv-left-align-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_left_align",align:"Left",value:"Left",click:this.onClickTextAlignment.bind(this)}),e.push({prefixIcon:"e-pv-right-align-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_right_align",align:"Left",value:"Right",click:this.onClickTextAlignment.bind(this)}),e.push({prefixIcon:"e-pv-center-align-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_center_align",align:"Left",value:"Center",click:this.onClickTextAlignment.bind(this)}),e.push({prefixIcon:"e-pv-justfiy-align-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_justify_align",align:"Left",value:"Justify",click:this.onClickTextAlignment.bind(this)}),e},i.prototype.afterAlignmentToolbarCreation=function(){this.primaryToolbar.addClassToolbarItem("_left_align","e-pv-left-align",this.pdfViewer.localeObj.getConstant("Align left")),this.primaryToolbar.addClassToolbarItem("_right_align","e-pv-right-align",this.pdfViewer.localeObj.getConstant("Align right")),this.primaryToolbar.addClassToolbarItem("_center_align","e-pv-center-align",this.pdfViewer.localeObj.getConstant("Center")),this.primaryToolbar.addClassToolbarItem("_justify_align","e-pv-justfiy-align",this.pdfViewer.localeObj.getConstant("Justify"))},i.prototype.afterPropertiesToolbarCreation=function(){this.primaryToolbar.addClassToolbarItem("_bold","e-pv-bold",this.pdfViewer.localeObj.getConstant("Bold")),this.primaryToolbar.addClassToolbarItem("_italic","e-pv-italic",this.pdfViewer.localeObj.getConstant("Italic")),this.primaryToolbar.addClassToolbarItem("_strikeout","e-pv-strikeout",this.pdfViewer.localeObj.getConstant("Strikethroughs")),this.primaryToolbar.addClassToolbarItem("_underline_textinput","e-pv-underlinetext",this.pdfViewer.localeObj.getConstant("Underlines"))},i.prototype.createDropDownListForSize=function(e){var t=this,i=["8px","9px","10px","11px","12px","14px","16px","18px","20px","22px","24px","26px","28px","36px","48px","72px","96px"];this.fontSize=new u.ComboBox({dataSource:i,cssClass:"e-pv-prop-dropdown",allowCustom:!0,showClearButton:!1,width:"80px"}),this.fontSize.value="16px",this.fontSize.appendTo(e),this.primaryToolbar.createTooltip(e,this.pdfViewer.localeObj.getConstant("Font size")),this.fontSize.addEventListener("change",function(){t.onFontSizeChange(t)})},i.prototype.createDropDownListForFamily=function(e){var t=this,i=[{FontName:"Helvetica"},{FontName:"Courier"},{FontName:"Symbol"},{FontName:"Times New Roman"}];this.fontFamily=new u.ComboBox({dataSource:i,query:(new M.Query).select(["FontName"]),fields:{text:"FontName",value:"FontName"},cssClass:"e-pv-prop-dropdown",itemTemplate:'<span style="font-family: ${FontName};">${FontName}</span>',allowCustom:!0,showClearButton:!1,width:"100px"}),this.fontFamily.isStringTemplate=!0,this.fontFamily.value="Helvetica",this.fontFamily.appendTo(e),this.primaryToolbar.createTooltip(e,this.pdfViewer.localeObj.getConstant("Font family")),this.fontFamily.addEventListener("change",function(){t.onFontFamilyChange(t)})},i.prototype.textPropertiesToolbarItems=function(){var e=[];return e.push({prefixIcon:"e-pv-bold-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_bold",align:"Left",value:"bold",click:this.onClickTextProperties.bind(this)}),e.push({prefixIcon:"e-pv-italic-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_italic",align:"Left",value:"italic",click:this.onClickTextProperties.bind(this)}),e.push({prefixIcon:"e-pv-strikeout-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_strikeout",align:"Left",value:"strikeout",click:this.onClickTextProperties.bind(this)}),e.push({prefixIcon:"e-pv-underlinetext-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_underline_textinput",align:"Left",value:"underline",click:this.onClickTextProperties.bind(this)}),e},i.prototype.createShapeToolbarItems=function(){var e=[];return e.push({prefixIcon:"e-pv-shape-line-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_line",text:this.pdfViewer.localeObj.getConstant("Line Shape"),align:"Left"}),e.push({prefixIcon:"e-pv-shape-arrow-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_arrow",text:this.pdfViewer.localeObj.getConstant("Arrow Shape"),align:"Left"}),e.push({prefixIcon:"e-pv-shape-rectangle-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_rectangle",text:this.pdfViewer.localeObj.getConstant("Rectangle Shape"),align:"Left"}),e.push({prefixIcon:"e-pv-shape-circle-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_circle",text:this.pdfViewer.localeObj.getConstant("Circle Shape"),align:"Left"}),e.push({prefixIcon:"e-pv-shape-pentagon-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_pentagon",text:this.pdfViewer.localeObj.getConstant("Pentagon Shape"),align:"Left"}),e},i.prototype.createCalibrateToolbarItems=function(){var e=[];return e.push({prefixIcon:"e-pv-calibrate-distance-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_distance",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),e.push({prefixIcon:"e-pv-calibrate-perimeter-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_perimeter",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),e.push({prefixIcon:"e-pv-calibrate-area-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_area",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),e.push({prefixIcon:"e-pv-calibrate-radius-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_radius",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),e.push({prefixIcon:"e-pv-calibrate-volume-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_volume",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),e},i.prototype.onCalibrateToolbarClicked=function(e){var i=this.pdfViewer.element.id,n=this.pdfViewer.annotation.measureAnnotationModule;if(this.deselectAllItems(),this.resetFreeTextAnnot(),t.Browser.isDevice&&!t.isBlazor()){var o=e.originalEvent.target;this.pdfViewer.toolbarModule.selectItem(o.parentElement)}switch(e.originalEvent.target.id){case i+"_calibrate_distance":case i+"_calibrate_distanceIcon":n.setAnnotationType("Distance"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,n.distanceFillColor),this.updateColorInIcon(this.strokeDropDownElement,n.distanceStrokeColor),this.handleShapeTool(i+"_calibrate_distance");break;case i+"_calibrate_perimeter":case i+"_calibrate_perimeterIcon":n.setAnnotationType("Perimeter"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,n.perimeterFillColor),this.updateColorInIcon(this.strokeDropDownElement,n.perimeterStrokeColor),this.handleShapeTool(i+"_calibrate_perimeter");break;case i+"_calibrate_area":case i+"_calibrate_areaIcon":n.setAnnotationType("Area"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,n.areaFillColor),this.updateColorInIcon(this.strokeDropDownElement,n.areaStrokeColor),this.handleShapeTool(i+"_calibrate_area");break;case i+"_calibrate_radius":case i+"_calibrate_radiusIcon":n.setAnnotationType("Radius"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,n.radiusFillColor),this.updateColorInIcon(this.strokeDropDownElement,n.radiusStrokeColor),this.handleShapeTool(i+"_calibrate_radius");break;case i+"_calibrate_volume":case i+"_calibrate_volumeIcon":n.setAnnotationType("Volume"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,n.volumeFillColor),this.updateColorInIcon(this.strokeDropDownElement,n.volumeStrokeColor),this.handleShapeTool(i+"_calibrate_volume")}},i.prototype.onShapeDrawSelection=function(e){var i=this.pdfViewer.selectedItems.annotations[0];t.Browser.isDevice||(this.updateInteractionTools(),this.enableAnnotationPropertiesTools(!0),e?this.shapeDropDown.toggle():this.calibrateDropDown.toggle()),1===this.pdfViewer.selectedItems.annotations.length&&(this.pdfViewer.fireAnnotationUnSelect(i.annotName,i.pageIndex,i),this.pdfViewer.clearSelection(this.pdfViewer.selectedItems.annotations[0].pageIndex))},i.prototype.afterCalibrateToolbarCreationForMobile=function(){this.primaryToolbar.addClassToolbarItem("_calibrate_distance","e-pv-calibrate-distance",this.pdfViewer.localeObj.getConstant("Calibrate Distance")),this.primaryToolbar.addClassToolbarItem("_calibrate_perimeter","e-pv-calibrate-perimeter",this.pdfViewer.localeObj.getConstant("Calibrate Perimeter")),this.primaryToolbar.addClassToolbarItem("_calibrate_area","e-pv-calibrate-area",this.pdfViewer.localeObj.getConstant("Calibrate Area")),this.primaryToolbar.addClassToolbarItem("_calibrate_radius","e-pv-calibrate-radius",this.pdfViewer.localeObj.getConstant("Calibrate Radius")),this.primaryToolbar.addClassToolbarItem("_calibrate_volume","e-pv-calibrate-volume",this.pdfViewer.localeObj.getConstant("Calibrate Volume"))},i.prototype.afterShapeToolbarCreationForMobile=function(){this.primaryToolbar.addClassToolbarItem("_annotation_color","e-pv-annotation-color-container",this.pdfViewer.localeObj.getConstant("Change Color")),this.primaryToolbar.addClassToolbarItem("_annotation_stroke","e-pv-annotation-stroke-container",this.pdfViewer.localeObj.getConstant("Change Stroke Color")),this.primaryToolbar.addClassToolbarItem("_annotation_thickness","e-pv-annotation-thickness-container",this.pdfViewer.localeObj.getConstant("Chnage Border Thickness")),this.primaryToolbar.addClassToolbarItem("_annotation_opacity","e-annotation-opacity-container",this.pdfViewer.localeObj.getConstant("Change Opacity")),this.primaryToolbar.addClassToolbarItem("_shape_line","e-pv-shape-line",this.pdfViewer.localeObj.getConstant("Add line")),this.primaryToolbar.addClassToolbarItem("_shape_arrow","e-pv-shape-arrow",this.pdfViewer.localeObj.getConstant("Add arrow")),this.primaryToolbar.addClassToolbarItem("_shape_rectangle","e-pv-shape-rectangle",this.pdfViewer.localeObj.getConstant("Add rectangle")),this.primaryToolbar.addClassToolbarItem("_shape_circle","e-pv-shape-circle",this.pdfViewer.localeObj.getConstant("Add circle")),this.primaryToolbar.addClassToolbarItem("_shape_pentagon","e-pv-shape-pentagon",this.pdfViewer.localeObj.getConstant("Add polygon"))},i.prototype.afterShapeToolbarCreation=function(){this.primaryToolbar.addClassToolbarItem("_shape_line","e-pv-shape-line",this.pdfViewer.localeObj.getConstant("Add line")),this.primaryToolbar.addClassToolbarItem("_shape_arrow","e-pv-shape-arrow",this.pdfViewer.localeObj.getConstant("Add arrow")),this.primaryToolbar.addClassToolbarItem("_shape_rectangle","e-pv-shape-rectangle",this.pdfViewer.localeObj.getConstant("Add rectangle")),this.primaryToolbar.addClassToolbarItem("_shape_circle","e-pv-shape-circle",this.pdfViewer.localeObj.getConstant("Add circle")),this.primaryToolbar.addClassToolbarItem("_shape_pentagon","e-pv-shape-pentagon",this.pdfViewer.localeObj.getConstant("Add polygon"))},i.prototype.afterCalibrateToolbarCreation=function(){this.primaryToolbar.addClassToolbarItem("_calibrate_distance","e-pv-calibrate-distance",this.pdfViewer.localeObj.getConstant("Calibrate Distance")),this.primaryToolbar.addClassToolbarItem("_calibrate_perimeter","e-pv-calibrate-perimeter",this.pdfViewer.localeObj.getConstant("Calibrate Perimeter")),this.primaryToolbar.addClassToolbarItem("_calibrate_area","e-pv-calibrate-area",this.pdfViewer.localeObj.getConstant("Calibrate Area")),this.primaryToolbar.addClassToolbarItem("_calibrate_radius","e-pv-calibrate-radius",this.pdfViewer.localeObj.getConstant("Calibrate Radius")),this.primaryToolbar.addClassToolbarItem("_calibrate_volume","e-pv-calibrate-volume",this.pdfViewer.localeObj.getConstant("Calibrate Volume"))},i.prototype.afterMobileToolbarCreation=function(){this.highlightItem=this.primaryToolbar.addClassToolbarItem("_highlight","e-pv-highlight",this.pdfViewer.localeObj.getConstant("Highlight")),this.underlineItem=this.primaryToolbar.addClassToolbarItem("_underline","e-pv-underline",this.pdfViewer.localeObj.getConstant("Underline")),this.strikethroughItem=this.primaryToolbar.addClassToolbarItem("_strikethrough","e-pv-strikethrough",this.pdfViewer.localeObj.getConstant("Strikethrough")),this.shapesItem=this.primaryToolbar.addClassToolbarItem("_annotation_shapes","e-pv-annotation-shapes",this.pdfViewer.localeObj.getConstant("Add Shapes")),this.calibrateItem=this.primaryToolbar.addClassToolbarItem("_annotation_calibrate","e-pv-annotation-calibrate",this.pdfViewer.localeObj.getConstant("Calibrate")),this.freeTextEditItem=this.primaryToolbar.addClassToolbarItem("_annotation_freeTextEdit","e-pv-annotation-freeTextEdit",this.pdfViewer.localeObj.getConstant("Free Text")),this.commentItem=this.primaryToolbar.addClassToolbarItem("_comment","e-pv-comment",this.pdfViewer.localeObj.getConstant("Add Comments")),this.commentItem=this.primaryToolbar.addClassToolbarItem("_annotation_commentPanel","e-pv-annotation-comment-panel",this.pdfViewer.localeObj.getConstant("Comment Panel")),this.inkAnnotationItem=this.primaryToolbar.addClassToolbarItem("_annotation_ink","e-pv-annotation-ink",this.pdfViewer.localeObj.getConstant("Draw Ink")),this.selectAnnotationDeleteItem(!1),this.enableCommentPanelTool(this.pdfViewer.enableCommentPanel)},i.prototype.createColorPicker=function(e){var i,o=document.getElementById(e+"_target");i=o||t.createElement("input",{id:e+"_target"}),document.body.appendChild(i);var s=new n.ColorPicker({inline:!0,mode:"Palette",cssClass:"e-show-value",enableOpacity:!1,value:"#000000",showButtons:!1,modeSwitcher:!1});return this.pdfViewer.enableRtl&&(s.enableRtl=!0),s.appendTo(i),s},i.prototype.onColorPickerChange=function(e){var i;if(i=t.isBlazor()?e[0]:""===e.currentValue.hex?"#ffffff00":e.currentValue.hex,this.pdfViewer.annotationModule.textMarkupAnnotationModule)if(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)this.pdfViewer.annotationModule.textMarkupAnnotationModule.modifyColorProperty(i);else switch(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode){case"Highlight":this.pdfViewer.annotationModule.textMarkupAnnotationModule.highlightColor=i;break;case"Underline":this.pdfViewer.annotationModule.textMarkupAnnotationModule.underlineColor=i;break;case"Strikethrough":this.pdfViewer.annotationModule.textMarkupAnnotationModule.strikethroughColor=i}if(1===this.pdfViewer.selectedItems.annotations.length)t.isBlazor()?e[0]!==e[1]&&this.pdfViewer.annotation.modifyFillColor(i):e.currentValue.hex!==e.previousValue.hex&&this.pdfViewer.annotation.modifyFillColor(i);else{if(this.pdfViewer.annotation.shapeAnnotationModule)switch(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode){case"Line":this.pdfViewer.annotation.shapeAnnotationModule.lineFillColor=i;break;case"Arrow":this.pdfViewer.annotation.shapeAnnotationModule.arrowFillColor=i;break;case"Rectangle":this.pdfViewer.annotation.shapeAnnotationModule.rectangleFillColor=i;break;case"Circle":this.pdfViewer.annotation.shapeAnnotationModule.circleFillColor=i;break;case"Polygon":this.pdfViewer.annotation.shapeAnnotationModule.polygonFillColor=i}this.pdfViewer.drawingObject&&(this.pdfViewer.drawingObject.fillColor=i,"FreeText"===this.pdfViewer.drawingObject.shapeAnnotationType&&(this.pdfViewer.freeTextSettings.fillColor=i,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()))}t.isBlazor()?(this.colorDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-color-container"),this.updateColorInIcon(this.colorDropDownElementInBlazor,i)):(this.updateColorInIcon(this.colorDropDownElement,i),this.colorDropDown.toggle())},i.prototype.onStrokePickerChange=function(e){var i;if(i=t.isBlazor()?e[0]:""===e.currentValue.hex?"#ffffff00":e.currentValue.hex,1===this.pdfViewer.selectedItems.annotations.length)t.isBlazor()?e[0]!==e[1]&&this.pdfViewer.annotation.modifyStrokeColor(i):e.currentValue.hex!==e.previousValue.hex&&this.pdfViewer.annotation.modifyStrokeColor(i);else{if(this.pdfViewer.annotation.shapeAnnotationModule)switch(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode){case"Line":this.pdfViewer.annotation.shapeAnnotationModule.lineStrokeColor=i;break;case"Arrow":this.pdfViewer.annotation.shapeAnnotationModule.arrowStrokeColor=i;break;case"Rectangle":this.pdfViewer.annotation.shapeAnnotationModule.rectangleStrokeColor=i;break;case"Circle":this.pdfViewer.annotation.shapeAnnotationModule.circleStrokeColor=i;break;case"Polygon":this.pdfViewer.annotation.shapeAnnotationModule.polygonStrokeColor=i}var n=this.pdfViewer.annotation;n&&n.inkAnnotationModule&&(this.pdfViewer.inkAnnotationSettings.strokeColor=i),this.pdfViewer.drawingObject&&(this.pdfViewer.drawingObject.strokeColor=i),this.pdfViewer.drawingObject&&"FreeText"===this.pdfViewer.drawingObject.shapeAnnotationType&&(this.pdfViewer.freeTextSettings.borderColor=i,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties())}t.isBlazor()?(this.strokeDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-stroke-container"),this.updateColorInIcon(this.strokeDropDownElementInBlazor,i)):(this.updateColorInIcon(this.strokeDropDownElement,i),this.strokeDropDown.toggle())},i.prototype.updateColorInIcon=function(e,i){t.isBlazor()?e&&(e.children[0].style.borderBottomColor=i):e.childNodes[0].style.borderBottomColor=i},i.prototype.updateTextPropertySelection=function(e){"bold"===e?document.getElementById(this.pdfViewer.element.id+"_bold").classList.toggle("textprop-option-active"):"italic"===e?document.getElementById(this.pdfViewer.element.id+"_italic").classList.toggle("textprop-option-active"):"underline"===e?(document.getElementById(this.pdfViewer.element.id+"_underline_textinput").classList.toggle("textprop-option-active"),document.getElementById(this.pdfViewer.element.id+"_strikeout").classList.remove("textprop-option-active")):"strikeout"===e&&(document.getElementById(this.pdfViewer.element.id+"_strikeout").classList.toggle("textprop-option-active"),document.getElementById(this.pdfViewer.element.id+"_underline_textinput").classList.remove("textprop-option-active"))},i.prototype.updateFontFamilyInIcon=function(e){this.fontFamily.value=e},i.prototype.updateTextAlignInIcon=function(e){var i="e-btn-icon e-pv-left-align-icon e-pv-icon",n=document.getElementById(this.pdfViewer.element.id+"_left_align"),o=document.getElementById(this.pdfViewer.element.id+"_right_align"),s=document.getElementById(this.pdfViewer.element.id+"_center_align"),a=document.getElementById(this.pdfViewer.element.id+"_justify_align");t.isBlazor()||(n.classList.remove("textprop-option-active"),o.classList.remove("textprop-option-active"),s.classList.remove("textprop-option-active"),a.classList.remove("textprop-option-active")),"Left"===e?n.classList.add("textprop-option-active"):"Right"===e?(i="e-btn-icon e-pv-right-align-icon e-pv-icon",o.classList.add("textprop-option-active")):"Center"===e?(i="e-btn-icon e-pv-center-align-icon e-pv-icon",s.classList.add("textprop-option-active")):"Justify"===e&&(i="e-btn-icon e-pv-justfiy-align-icon e-pv-icon",a.classList.add("textprop-option-active")),document.getElementById(this.pdfViewer.element.id+"_annotation_textalign").children[0].className=i},i.prototype.updateFontSizeInIcon=function(e){this.fontSize.value=e+"px"},i.prototype.updateOpacityIndicator=function(){this.opacityIndicator.textContent=parseInt(Math.round(this.opacitySlider.value).toString())+"%"},i.prototype.updateThicknessIndicator=function(){this.thicknessIndicator.textContent=this.thicknessSlider.value+" pt"},i.prototype.createSlider=function(e){var i=t.createElement("div",{className:"e-pv-annotation-opacity-popup-container"});document.body.appendChild(i);var o=t.createElement("span",{id:e+"_label",className:"e-pv-annotation-opacity-label"});o.textContent=this.pdfViewer.localeObj.getConstant("Opacity");var s=t.createElement("div",{id:e+"_slider"});return this.opacitySlider=new n.Slider({type:"MinRange",cssClass:"e-pv-annotation-opacity-slider",max:100,min:0}),this.opacityIndicator=t.createElement("div",{id:e+"_opacity_indicator",className:"e-pv-annotation-opacity-indicator"}),this.opacityIndicator.textContent="100%",this.pdfViewer.enableRtl?(i.appendChild(this.opacityIndicator),i.appendChild(s),this.opacitySlider.enableRtl=!0,this.opacitySlider.appendTo(s),this.opacitySlider.element.parentElement.classList.add("e-pv-annotation-opacity-slider-container"),i.appendChild(o)):(i.appendChild(o),i.appendChild(s),this.opacitySlider.appendTo(s),this.opacitySlider.element.parentElement.classList.add("e-pv-annotation-opacity-slider-container"),i.appendChild(this.opacityIndicator)),i},i.prototype.createThicknessSlider=function(e){var i=t.createElement("div",{className:"e-pv-annotation-thickness-popup-container"});document.body.appendChild(i);var o=t.createElement("span",{id:e+"_label",className:"e-pv-annotation-thickness-label"});o.textContent=this.pdfViewer.localeObj.getConstant("Line Thickness");var s=t.createElement("div",{id:e+"_slider"});return this.thicknessSlider=new n.Slider({type:"MinRange",cssClass:"e-pv-annotation-thickness-slider",max:12,min:0}),this.thicknessIndicator=t.createElement("div",{id:e+"_thickness_indicator",className:"e-pv-annotation-thickness-indicator"}),this.thicknessIndicator.textContent="0 pt",this.pdfViewer.enableRtl?(i.appendChild(this.thicknessIndicator),i.appendChild(s),this.thicknessSlider.enableRtl=!0,this.thicknessSlider.appendTo(s),i.appendChild(o)):(i.appendChild(o),i.appendChild(s),this.thicknessSlider.appendTo(s),i.appendChild(this.thicknessIndicator)),this.thicknessSlider.element.parentElement.classList.add("e-pv-annotation-thickness-slider-container"),i},i.prototype.afterToolbarCreation=function(){this.highlightItem=this.primaryToolbar.addClassToolbarItem("_highlight","e-pv-highlight",this.pdfViewer.localeObj.getConstant("Highlight")),this.underlineItem=this.primaryToolbar.addClassToolbarItem("_underline","e-pv-underline",this.pdfViewer.localeObj.getConstant("Underline")),this.strikethroughItem=this.primaryToolbar.addClassToolbarItem("_strikethrough","e-pv-strikethrough",this.pdfViewer.localeObj.getConstant("Strikethrough")),this.deleteItem=this.primaryToolbar.addClassToolbarItem("_annotation_delete","e-pv-annotation-delete",this.pdfViewer.localeObj.getConstant("Delete")),this.freeTextEditItem=this.primaryToolbar.addClassToolbarItem("_annotation_freeTextEdit","e-pv-annotation-freeTextEdit",this.pdfViewer.localeObj.getConstant("Free Text")),this.inkAnnotationItem=this.primaryToolbar.addClassToolbarItem("_annotation_ink","e-pv-annotation-ink",this.pdfViewer.localeObj.getConstant("Draw Ink")),this.commentItem=this.primaryToolbar.addClassToolbarItem("_annotation_commentPanel","e-pv-annotation-comment-panel",this.pdfViewer.localeObj.getConstant("Comment Panel")),this.closeItem=this.primaryToolbar.addClassToolbarItem("_annotation_close","e-pv-annotation-tools-close",null),this.selectAnnotationDeleteItem(!1),this.enableTextMarkupAnnotationPropertiesTools(!1),this.enableCommentPanelTool(this.pdfViewer.enableCommentPanel)},i.prototype.onToolbarClicked=function(e){var i=this.pdfViewer.selectedItems.annotations[0];switch(e.originalEvent.target.id&&this.pdfViewer.toolbarModule.updateStampItems(),e.originalEvent.target.id){case this.pdfViewer.element.id+"_highlight":case this.pdfViewer.element.id+"_highlightIcon":this.pdfViewer.tool="",t.Browser.isDevice?(this.pdfViewer.annotationModule.setAnnotationMode("Highlight"),this.textMarkupForMobile(e)):(this.pdfViewer.tool="",this.resetFreeTextAnnot(),this.handleHighlight());break;case this.pdfViewer.element.id+"_underline":case this.pdfViewer.element.id+"_underlineIcon":this.pdfViewer.tool="",t.Browser.isDevice?(this.pdfViewer.annotationModule.setAnnotationMode("Underline"),this.textMarkupForMobile(e)):(this.pdfViewer.tool="",this.resetFreeTextAnnot(),this.handleUnderline());break;case this.pdfViewer.element.id+"_strikethrough":case this.pdfViewer.element.id+"_strikethroughIcon":this.pdfViewer.tool="",t.Browser.isDevice?(this.pdfViewer.annotationModule.setAnnotationMode("Strikethrough"),this.textMarkupForMobile(e)):(this.pdfViewer.tool="",this.resetFreeTextAnnot(),this.handleStrikethrough());break;case this.pdfViewer.element.id+"_annotation_delete":case this.pdfViewer.element.id+"_annotation_deleteIcon":this.pdfViewer.annotationModule.deleteAnnotation(),this.resetFreeTextAnnot();break;case this.pdfViewer.element.id+"_annotation_commentPanel":case this.pdfViewer.element.id+"_annotation_commentPanelIcon":this.inkAnnotationSelected=!1;var n=document.getElementById(this.pdfViewer.element.id+"_commantPanel");this.pdfViewer.annotation&&this.pdfViewer.annotation.textMarkupAnnotationModule&&this.pdfViewer.annotation.textMarkupAnnotationModule.showHideDropletDiv(!0),"block"===n.style.display?this.pdfViewerBase.navigationPane.closeCommentPanelContainer():this.pdfViewer.annotationModule.showCommentsPanel();break;case this.pdfViewer.element.id+"_annotation_close":case this.pdfViewer.element.id+"_annotation_closeIcon":this.inkAnnotationSelected=!1,"block"===document.getElementById(this.pdfViewer.element.id+"_commantPanel").style.display&&this.pdfViewerBase.navigationPane.closeCommentPanelContainer(),this.showAnnotationToolbar(this.primaryToolbar.annotationItem);break;case this.pdfViewer.element.id+"_annotation_freeTextEdit":case this.pdfViewer.element.id+"_annotation_freeTextEditIcon":t.Browser.isDevice?(this.pdfViewer.annotationModule.setAnnotationMode("FreeText"),this.FreeTextForMobile()):(this.resetFreeTextAnnot(),this.handleFreeTextEditor());break;case this.pdfViewer.element.id+"_annotation_signature":case this.pdfViewer.element.id+"_annotation_signatureIcon":this.inkAnnotationSelected=!1,this.updateSignatureCount();break;case this.pdfViewer.element.id+"_annotation_ink":case this.pdfViewer.element.id+"_annotation_inkIcon":if(i&&this.pdfViewer.fireAnnotationUnSelect(i.annotName,i.pageIndex,i),this.pdfViewer.clearSelection(this.pdfViewer.currentPageNumber-1),this.pdfViewer.annotationModule.inkAnnotationModule){var o=this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber;o&&""!==o&&(this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(parseInt(o)),this.primaryToolbar.deSelectItem(this.inkAnnotationItem))}this.inkAnnotationSelected?this.inkAnnotationSelected=!1:(this.deselectAllItems(),this.drawInkAnnotation());break;case this.pdfViewer.element.id+"_annotation_shapesIcon":case this.pdfViewer.element.id+"_annotation_shapes":t.Browser.isDevice&&this.shapeToolMobile(e);break;case this.pdfViewer.element.id+"_annotation_calibrateIcon":case this.pdfViewer.element.id+"_annotation_calibrate":t.Browser.isDevice&&this.calibrateToolMobile(e);break;case this.pdfViewer.element.id+"_commentIcon":case this.pdfViewer.element.id+"_comment":this.pdfViewerBase.isAddComment=!0,this.pdfViewerBase.isCommentIconAdded=!0,document.getElementById(this.pdfViewer.element.id+"_comment").classList.add("e-pv-select"),this.pdfViewer.toolbarModule.addComments(e)}},i.prototype.addInkAnnotation=function(){if(this.pdfViewer.clearSelection(this.pdfViewer.currentPageNumber-1),this.pdfViewer.annotationModule.inkAnnotationModule){var e=this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber;e&&""!==e&&(this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(parseInt(e)),t.isBlazor()||this.primaryToolbar.deSelectItem(this.inkAnnotationItem))}this.inkAnnotationSelected?this.inkAnnotationSelected=!1:(t.isBlazor()||this.deselectAllItems(),this.drawInkAnnotation())},i.prototype.deselectInkAnnotation=function(){this.primaryToolbar.deSelectItem(this.inkAnnotationItem)},i.prototype.drawInkAnnotation=function(){this.inkAnnotationSelected=!0,t.isBlazor()||(this.primaryToolbar.selectItem(this.inkAnnotationItem),this.enableSignaturePropertiesTools(!0)),this.pdfViewerBase.isToolbarInkClicked=!0,this.pdfViewer.annotationModule.inkAnnotationModule.drawInk()},i.prototype.resetFreeTextAnnot=function(){if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule&&(this.pdfViewer.annotation.freeTextAnnotationModule.isNewFreeTextAnnot=!1,this.pdfViewer.annotation.freeTextAnnotationModule.isNewAddedAnnot=!1,t.Browser.isDevice||this.freeTextEditItem&&!t.isBlazor()&&(this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.enableFreeTextAnnotationPropertiesTools(!1))),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var e=this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber;e&&""!==e&&(this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(parseInt(e)),t.isBlazor()||this.primaryToolbar.deSelectItem(this.inkAnnotationItem))}this.inkAnnotationSelected=!1},i.prototype.updateInkannotationItems=function(){if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule&&this.inkAnnotationSelected){var e=this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber;e&&""!==e&&(this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(parseInt(e)),this.pdfViewerBase.isToolbarInkClicked=!0,this.pdfViewer.tool="Ink",this.pdfViewer.clearSelection(e))}},i.prototype.showSignaturepanel=function(){this.pdfViewerBase.isToolbarSignClicked=!0,this.pdfViewerBase.signatureModule.showSignatureDialog(!0)},i.prototype.handleFreeTextEditor=function(){var e=this.pdfViewer.selectedItems.annotations[0];this.enableFreeTextAnnotationPropertiesTools(!0),e&&this.pdfViewer.fireAnnotationUnSelect(e.annotName,e.pageIndex,e),this.pdfViewer.clearSelection(this.pdfViewer.currentPageNumber-1),this.pdfViewer.annotationModule.textMarkupAnnotationModule&&(this.pdfViewer.annotationModule.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1),this.isStrikethroughEnabled=!1,this.isHighlightEnabled=!1,this.isUnderlineEnabled=!1;var t=this.pdfViewer.annotation.freeTextAnnotationModule;t.setAnnotationType("FreeText"),t.isNewFreeTextAnnot=!0,t.isNewAddedAnnot=!0,this.updateInteractionTools(),this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.primaryToolbar.selectItem(this.freeTextEditItem),this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.annotationModule.freeTextAnnotationModule.fillColor),this.updateColorInIcon(this.strokeDropDownElement,this.pdfViewer.annotationModule.freeTextAnnotationModule.borderColor),this.updateColorInIcon(this.fontColorElement,this.pdfViewer.annotationModule.freeTextAnnotationModule.fontColor),this.updateFontFamilyInIcon(this.pdfViewer.annotationModule.freeTextAnnotationModule.fontFamily),this.updateFontSizeInIcon(this.pdfViewer.annotationModule.freeTextAnnotationModule.fontSize),this.updateTextAlignInIcon(this.pdfViewer.annotationModule.freeTextAnnotationModule.textAlign),this.updateFontFamily()},i.prototype.updateFontFamily=function(){this.pdfViewer.annotationModule.freeTextAnnotationModule.isBold?this.updateFontFamilyIcon("_bold",!0):this.updateFontFamilyIcon("_bold",!1),this.pdfViewer.annotationModule.freeTextAnnotationModule.isItalic?this.updateFontFamilyIcon("_italic",!0):this.updateFontFamilyIcon("_italic",!1),this.pdfViewer.annotationModule.freeTextAnnotationModule.isUnderline?(this.updateFontFamilyIcon("_underline_textinput",!0),this.updateFontFamilyIcon("_strikeout",!1)):this.updateFontFamilyIcon("_underline_textinput",!1),this.pdfViewer.annotationModule.freeTextAnnotationModule.isStrikethrough?(this.updateFontFamilyIcon("_strikeout",!0),this.updateFontFamilyIcon("_underline_textinput",!1)):this.updateFontFamilyIcon("_strikeout",!1)},i.prototype.updateFontFamilyIcon=function(e,t){var i=document.getElementById(this.pdfViewer.element.id+e);t?i.classList.add("textprop-option-active"):i.classList.remove("textprop-option-active")},i.prototype.showAnnotationToolbar=function(e,i){if(!t.Browser.isDevice){if(this.isToolbarHidden){var n=this.toolbarElement.style.display;this.toolbarElement.style.display="block",i||(this.pdfViewer.isAnnotationToolbarVisible=!0),e?this.primaryToolbar.selectItem(e):this.pdfViewer.enableToolbar&&this.primaryToolbar.selectItem(this.primaryToolbar.annotationItem),"none"===n&&this.adjustViewer(!0)}else{var o=this.pdfViewer.annotationModule;e?this.primaryToolbar.deSelectItem(e):this.pdfViewer.enableToolbar&&this.primaryToolbar.deSelectItem(this.primaryToolbar.annotationItem),this.adjustViewer(!1),o&&o.textMarkupAnnotationModule&&o.textMarkupAnnotationModule.currentTextMarkupAnnotation?this.enablePropertiesTool(o):this.deselectAllItems(),this.toolbarElement.style.display="none",i||(this.pdfViewer.isAnnotationToolbarVisible=!1),this.pdfViewerBase.isPanMode?this.primaryToolbar.updateInteractionTools(!1):this.primaryToolbar.updateInteractionTools(!0)}this.pdfViewer.magnification&&"fitToPage"===this.pdfViewer.magnification.fitType&&this.pdfViewer.magnification.fitToPage(),this.enableAnnotationAddTools(!0),this.isToolbarHidden=!this.isToolbarHidden}},i.prototype.enablePropertiesTool=function(e){this.isHighlightEnabled=!1,this.isUnderlineEnabled=!1,this.isStrikethroughEnabled=!1,this.pdfViewerBase.isTextMarkupAnnotationModule()&&(e.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1),this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.enableTextMarkupAnnotationPropertiesTools(!0),this.updateColorInIcon(this.colorDropDownElement,e.textMarkupAnnotationModule.currentTextMarkupAnnotation.color),this.selectAnnotationDeleteItem(!0)},i.prototype.applyAnnotationToolbarSettings=function(){this.pdfViewer.toolbarSettings.annotationToolbarItems&&(-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("HighlightTool")?this.showHighlightTool(!0):this.showHighlightTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("UnderlineTool")?this.showUnderlineTool(!0):this.showUnderlineTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("StrikethroughTool")?this.showStrikethroughTool(!0):this.showStrikethroughTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("ShapeTool")?this.showShapeAnnotationTool(!0):this.showShapeAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("CalibrateTool")?this.showCalibrateAnnotationTool(!0):this.showCalibrateAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("ColorEditTool")?this.showColorEditTool(!0):this.showColorEditTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("StrokeColorEditTool")?this.showStrokeColorEditTool(!0):this.showStrokeColorEditTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("ThicknessEditTool")?this.showThicknessEditTool(!0):this.showThicknessEditTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("OpacityEditTool")?this.showOpacityEditTool(!0):this.showOpacityEditTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("AnnotationDeleteTool")?this.showAnnotationDeleteTool(!0):this.showAnnotationDeleteTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("StampAnnotationTool")?this.showStampAnnotationTool(!0):this.showStampAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("HandWrittenSignatureTool")?this.showSignatureTool(!0):this.showSignatureTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FreeTextAnnotationTool")?this.showFreeTextAnnotationTool(!0):this.showFreeTextAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontFamilyAnnotationTool")?this.showFontFamilyAnnotationTool(!0):this.showFontFamilyAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontSizeAnnotationTool")?this.showFontSizeAnnotationTool(!0):this.showFontSizeAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontStylesAnnotationTool")?this.showFontStylesAnnotationTool(!0):this.showFontStylesAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontAlignAnnotationTool")?this.showFontAlignAnnotationTool(!0):this.showFontAlignAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontColorAnnotationTool")?this.showFontColorAnnotationTool(!0):this.showFontColorAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("CommentPanelTool")?this.showCommentPanelTool(!0):this.showCommentPanelTool(!1),this.showInkAnnotationTool(),this.showSeparator())},i.prototype.showInkAnnotationTool=function(){-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("InkAnnotationTool")?this.showInkTool(!0):this.showInkTool(!1)},i.prototype.showSeparator=function(){this.isHighlightBtnVisible||this.isUnderlineBtnVisible||this.isStrikethroughBtnVisible||this.applyHideToToolbar(!1,3,3),this.isShapeBtnVisible||this.applyHideToToolbar(!1,5,5),this.isCalibrateBtnVisible||this.applyHideToToolbar(!1,7,7),this.isFreeTextBtnVisible||this.applyHideToToolbar(!1,9,9),this.isStampBtnVisible||this.applyHideToToolbar(!1,11,11),this.isSignatureBtnVisible||this.applyHideToToolbar(!1,13,13),this.isInkBtnVisible||this.applyHideToToolbar(!1,15,15),this.isFontFamilyToolVisible||this.isFontSizeToolVisible||this.isFontColorToolVisible||this.isFontAlignToolVisible||this.isFontStylesToolVisible||this.applyHideToToolbar(!1,21,21),(this.isColorToolVisible||this.isStrokeColorToolVisible||this.isThicknessToolVisible||this.isOpacityToolVisible)&&this.isDeleteAnnotationToolVisible||this.applyHideToToolbar(!1,26,26)},i.prototype.showHighlightTool=function(e){this.isHighlightBtnVisible=e,this.applyHideToToolbar(e,0,0)},i.prototype.showUnderlineTool=function(e){this.isUnderlineBtnVisible=e,this.applyHideToToolbar(e,1,1)},i.prototype.showStrikethroughTool=function(e){this.isStrikethroughBtnVisible=e,this.applyHideToToolbar(e,2,2)},i.prototype.showShapeAnnotationTool=function(e){this.isShapeBtnVisible=e,this.applyHideToToolbar(e,4,4)},i.prototype.showCalibrateAnnotationTool=function(e){this.isCalibrateBtnVisible=e,this.applyHideToToolbar(e,6,6)},i.prototype.showFreeTextAnnotationTool=function(e){this.isFreeTextBtnVisible=e,this.applyHideToToolbar(e,8,8)},i.prototype.showStampAnnotationTool=function(e){this.isStampBtnVisible=e,this.applyHideToToolbar(e,10,10)},i.prototype.showSignatureTool=function(e){this.isSignatureBtnVisible=e,this.applyHideToToolbar(e,12,12)},i.prototype.showInkTool=function(e){this.isInkBtnVisible=e,this.applyHideToToolbar(e,14,14)},i.prototype.showFontFamilyAnnotationTool=function(e){this.isFontFamilyToolVisible=e,this.applyHideToToolbar(e,16,16)},i.prototype.showFontSizeAnnotationTool=function(e){this.isFontSizeToolVisible=e,this.applyHideToToolbar(e,17,17)},i.prototype.showFontAlignAnnotationTool=function(e){this.isFontAlignToolVisible=e,this.applyHideToToolbar(e,18,18)},i.prototype.showFontColorAnnotationTool=function(e){this.isFontColorToolVisible=e,this.applyHideToToolbar(e,19,19)},i.prototype.showFontStylesAnnotationTool=function(e){this.isFontStylesToolVisible=e,this.applyHideToToolbar(e,20,20)},i.prototype.showColorEditTool=function(e){this.isColorToolVisible=e,this.applyHideToToolbar(e,22,22)},i.prototype.showStrokeColorEditTool=function(e){this.isStrokeColorToolVisible=e,this.applyHideToToolbar(e,23,23)},i.prototype.showThicknessEditTool=function(e){this.isThicknessToolVisible=e,this.applyHideToToolbar(e,24,24)},i.prototype.showOpacityEditTool=function(e){this.isOpacityToolVisible=e,this.applyHideToToolbar(e,25,25)},i.prototype.showAnnotationDeleteTool=function(e){this.isDeleteAnnotationToolVisible=e,this.applyHideToToolbar(e,27,27)},i.prototype.showCommentPanelTool=function(e){this.isCommentPanelBtnVisible=e,this.applyHideToToolbar(e,28,28)},i.prototype.applyHideToToolbar=function(e,t,i){for(var n=!e,o=t;o<=i;o++)if(this.toolbar.items[o]){var s=this.toolbar.items[o].cssClass;if(s&&""!==s){var a=this.toolbar.element.querySelector("."+s);a&&this.toolbar.hideItem(a,n)}else this.toolbar.hideItem(o,n)}},i.prototype.adjustViewer=function(e){var i,n,o;if(t.isBlazor()){i=this.pdfViewer.element.querySelector(".e-pv-sidebar-toolbar-splitter"),n=this.pdfViewer.element.querySelector(".e-pv-toolbar");var s=this.pdfViewer.element.querySelector(".e-pv-annotation-toolbar");o=this.getToolbarHeight(s)}else i=this.pdfViewerBase.getElement("_sideBarToolbarSplitter"),n=this.pdfViewerBase.getElement("_toolbarContainer"),o=this.getToolbarHeight(this.toolbarElement);var a=this.getToolbarHeight(n),r=this.pdfViewerBase.navigationPane.sideBarToolbar,l=this.pdfViewerBase.navigationPane.sideBarContentContainer,d=this.pdfViewerBase.navigationPane.commentPanelContainer,u=this.pdfViewerBase.navigationPane.commentPanelResizer;e?(this.pdfViewer.enableToolbar?(r.style.top=a+o+"px",l.style.top=a+o+"px",i.style.top=a+o+"px",d.style.top=a+o+"px",u.style.top=a+o+"px"):(r.style.top=o+"px",l.style.top=o+"px",i.style.top=o+"px",d.style.top=o+"px",u.style.top=a+o+"px"),this.pdfViewer.enableToolbar||(a=0),this.pdfViewerBase.viewerContainer.style.height=this.updateViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer),o+a)+"px",r.style.height=this.getNavigationToolbarHeight(o+a)+"px",i.style.height=this.getNavigationToolbarHeight(o+a)+"px"):(this.pdfViewer.enableToolbar?(r.style.top=a+"px",l.style.top=a+"px",i.style.top=a+"px",d.style.top=a+"px",u.style.top=a+"px"):(r.style.top="1px",r.style.height="100%",l.style.top="1px",l.style.height="100%",i.style.top="1px",i.style.height="100%",d.style.top="1px",d.style.height="100%",u.style.top="1px",u.style.height="100%"),this.pdfViewer.enableToolbar||(a=0),this.pdfViewerBase.viewerContainer.style.height=this.resetViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer),o)+"px",r.style.height=this.getNavigationToolbarHeight(a),i.style.height=this.getNavigationToolbarHeight(a),"0px"===this.pdfViewerBase.viewerContainer.style.height&&(this.pdfViewerBase.viewerContainer.style.height=parseInt(this.pdfViewer.element.style.height)-parseInt(r.style.top)+"px")),t.isBlazor()?this.updateContentContainerHeight(e,!0):this.updateContentContainerHeight(e)},i.prototype.updateContentContainerHeight=function(e,t){var i;if(t){var n=this.pdfViewer.element.querySelector(".e-pv-annotation-toolbar");i=this.getToolbarHeight(n)}else i=this.getToolbarHeight(this.toolbarElement);var o=this.pdfViewerBase.navigationPane.sideBarContentContainer.getBoundingClientRect();0!==o.height&&(this.pdfViewerBase.navigationPane.sideBarContentContainer.style.height=e?o.height-i+"px":o.height+i+"px")},i.prototype.getToolbarHeight=function(e){var t=e.getBoundingClientRect().height;return 0===t&&e===this.pdfViewerBase.getElement("_toolbarContainer")&&(t=parseFloat(window.getComputedStyle(e).height)+this.toolbarBorderHeight),t},i.prototype.getNavigationToolbarHeight=function(e){var t=this.pdfViewer.element.getBoundingClientRect().height;return 0!==t?t-e+"px":""},i.prototype.handleHighlight=function(){this.isHighlightEnabled?this.deselectAllItems():(this.updateInteractionTools(),this.clearShapeMode(),this.clearMeasureMode(),this.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations("Highlight"),this.primaryToolbar.selectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.primaryToolbar.deSelectItem(this.inkAnnotationItem),this.enableTextMarkupAnnotationPropertiesTools(!0),this.setCurrentColorInPicker(),this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.annotationModule.textMarkupAnnotationModule.highlightColor),this.isHighlightEnabled=!0,this.isUnderlineEnabled=!1,this.isStrikethroughEnabled=!1)},i.prototype.handleUnderline=function(){this.isUnderlineEnabled?this.deselectAllItems():(this.updateInteractionTools(),this.clearShapeMode(),this.clearMeasureMode(),this.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations("Underline"),this.primaryToolbar.selectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.primaryToolbar.deSelectItem(this.inkAnnotationItem),this.enableTextMarkupAnnotationPropertiesTools(!0),this.setCurrentColorInPicker(),this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.annotationModule.textMarkupAnnotationModule.underlineColor),this.isUnderlineEnabled=!0,this.isHighlightEnabled=!1,this.isStrikethroughEnabled=!1)},i.prototype.handleStrikethrough=function(){this.isStrikethroughEnabled?this.deselectAllItems():(this.updateInteractionTools(),this.clearShapeMode(),this.clearMeasureMode(),this.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations("Strikethrough"),this.primaryToolbar.selectItem(this.strikethroughItem),this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.primaryToolbar.deSelectItem(this.inkAnnotationItem),this.enableTextMarkupAnnotationPropertiesTools(!0),this.setCurrentColorInPicker(),this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.annotationModule.textMarkupAnnotationModule.strikethroughColor),this.isStrikethroughEnabled=!0,this.isHighlightEnabled=!1,this.isUnderlineEnabled=!1)},i.prototype.deselectAllItems=function(){this.isHighlightEnabled=!1,this.isUnderlineEnabled=!1,this.isStrikethroughEnabled=!1,this.pdfViewerBase.isTextMarkupAnnotationModule()&&(this.pdfViewer.annotationModule.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1,this.pdfViewer.annotationModule.textMarkupAnnotationModule.showHideDropletDiv(!0)),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.primaryToolbar.deSelectItem(this.inkAnnotationItem)),this.resetFreeTextAnnot(),this.clearTextMarkupMode(),this.clearShapeMode(),this.clearMeasureMode(),this.pdfViewer.tool="",t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.enableTextMarkupAnnotationPropertiesTools(!1),this.enableFreeTextAnnotationPropertiesTools(!1),this.updateColorInIcon(this.colorDropDownElement,"#000000"),this.updateColorInIcon(this.strokeDropDownElement,"#000000"),this.updateColorInIcon(this.fontColorElement,"#000000"),this.selectAnnotationDeleteItem(!1)),this.pdfViewer.annotationModule&&(this.pdfViewer.annotationModule.freeTextAnnotationModule.isNewFreeTextAnnot=!1)},i.prototype.updateInteractionTools=function(){this.pdfViewerBase.initiateTextSelectMode(),t.Browser.isDevice||this.pdfViewer.toolbar.updateInteractionTools(!0)},i.prototype.selectAnnotationDeleteItem=function(e){if(!t.isBlazor()&&!t.Browser.isDevice&&this.toolbar)if(e){var i=this.pdfViewer.annotationModule.findCurrentAnnotation();i&&(i.annotationSettings&&i.annotationSettings.isLock?this.pdfViewer.annotationModule.checkAllowedInteractions("Delete",i)?this.toolbar.enableItems(this.deleteItem.parentElement,e):this.toolbar.enableItems(this.deleteItem.parentElement,!1):this.toolbar.enableItems(this.deleteItem.parentElement,e))}else this.toolbar.enableItems(this.deleteItem.parentElement,e)},i.prototype.enableTextMarkupAnnotationPropertiesTools=function(e){t.Browser.isDevice||(t.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.annotationSelect("TextMarkup"):(this.toolbar.enableItems(this.colorDropDownElement.parentElement,e),this.toolbar.enableItems(this.opacityDropDownElement.parentElement,e),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.toolbar.enableItems(this.strokeDropDownElement.parentElement,!1),this.toolbar.enableItems(this.thicknessElement.parentElement,!1),this.toolbar.enableItems(this.fontFamilyElement.parentElement,!1),this.toolbar.enableItems(this.fontSizeElement.parentElement,!1),this.toolbar.enableItems(this.fontColorElement.parentElement,!1),this.toolbar.enableItems(this.textAlignElement.parentElement,!1),this.toolbar.enableItems(this.textPropElement.parentElement,!1))))},i.prototype.checkAnnotationPropertiesChange=function(){var e=this.pdfViewer.selectedItems.annotations[0];return!(e&&e.annotationSettings&&e.annotationSettings.isLock)||!!this.pdfViewer.annotationModule.checkAllowedInteractions("PropertyChange",e)},i.prototype.enableAnnotationPropertiesTools=function(e){if(!t.Browser.isDevice){var i=this.checkAnnotationPropertiesChange();e||(i=!0),t.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.enableAnnotationPropertiesTool(e,i):i&&(this.pdfViewer.selectedItems.annotations[0]&&"Line"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.toolbar.enableItems(this.colorDropDownElement.parentElement,!1):this.toolbar.enableItems(this.colorDropDownElement.parentElement,e),this.toolbar.enableItems(this.opacityDropDownElement.parentElement,e),this.toolbar.enableItems(this.strokeDropDownElement.parentElement,e),this.toolbar.enableItems(this.thicknessElement.parentElement,e),this.pdfViewer.enableShapeLabel&&(this.toolbar.enableItems(this.fontFamilyElement.parentElement,e),this.toolbar.enableItems(this.fontSizeElement.parentElement,e),this.toolbar.enableItems(this.fontColorElement.parentElement,e)),this.toolbar.enableItems(this.textAlignElement.parentElement,!1),this.toolbar.enableItems(this.textPropElement.parentElement,!1))}},i.prototype.enableSignaturePropertiesTools=function(e){if(!t.Browser.isDevice){var i=this.checkAnnotationPropertiesChange();e||(i=!0),t.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.enableSignaturePropertiesTools(e,i):i&&(this.toolbar.enableItems(this.colorDropDownElement.parentElement,!1),this.toolbar.enableItems(this.opacityDropDownElement.parentElement,e),this.toolbar.enableItems(this.strokeDropDownElement.parentElement,e),this.toolbar.enableItems(this.thicknessElement.parentElement,e),this.toolbar.enableItems(this.textAlignElement.parentElement,!1),this.toolbar.enableItems(this.textPropElement.parentElement,!1),this.toolbar.enableItems(this.fontFamilyElement.parentElement,!1),this.toolbar.enableItems(this.fontSizeElement.parentElement,!1),this.toolbar.enableItems(this.fontColorElement.parentElement,!1),this.toolbar.enableItems(this.textAlignElement.parentElement,!1))}},i.prototype.enableStampAnnotationPropertiesTools=function(e){var i=this.checkAnnotationPropertiesChange();e||(i=!0),t.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.enableStampAnnotationPropertiesTools(e,i):i&&(this.toolbar.enableItems(this.opacityDropDownElement.parentElement,e),this.toolbar.enableItems(this.colorDropDownElement.parentElement,!1),this.toolbar.enableItems(this.strokeDropDownElement.parentElement,!1),this.toolbar.enableItems(this.thicknessElement.parentElement,!1),this.toolbar.enableItems(this.fontFamilyElement.parentElement,!1),this.toolbar.enableItems(this.fontSizeElement.parentElement,!1),this.toolbar.enableItems(this.fontColorElement.parentElement,!1),this.toolbar.enableItems(this.textAlignElement.parentElement,!1),this.toolbar.enableItems(this.textPropElement.parentElement,!1))},i.prototype.enableFreeTextAnnotationPropertiesTools=function(e){var i=this.checkAnnotationPropertiesChange();e||(i=!0),t.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.enableFreeTextAnnotationPropertiesTools(e,i):i&&(this.toolbar.enableItems(this.opacityDropDownElement.parentElement,e),this.toolbar.enableItems(this.colorDropDownElement.parentElement,e),this.toolbar.enableItems(this.strokeDropDownElement.parentElement,e),this.toolbar.enableItems(this.thicknessElement.parentElement,e),this.toolbar.enableItems(this.fontFamilyElement.parentElement,e),this.toolbar.enableItems(this.fontSizeElement.parentElement,e),this.toolbar.enableItems(this.fontColorElement.parentElement,e),this.toolbar.enableItems(this.textAlignElement.parentElement,e),this.toolbar.enableItems(this.textPropElement.parentElement,e))},i.prototype.enableAnnotationAddTools=function(e){this.toolbar&&!t.Browser.isDevice&&(this.pdfViewer.enableTextMarkupAnnotation&&(this.toolbar.enableItems(this.highlightItem.parentElement,e),this.toolbar.enableItems(this.underlineItem.parentElement,e),this.toolbar.enableItems(this.strikethroughItem.parentElement,e)),this.pdfViewer.enableShapeAnnotation&&this.toolbar.enableItems(this.shapeElement.parentElement,e),this.pdfViewer.enableStampAnnotations&&this.toolbar.enableItems(this.stampElement.parentElement,e),this.pdfViewer.enableMeasureAnnotation&&this.pdfViewerBase.isCalibrateAnnotationModule()&&this.toolbar.enableItems(this.calibrateElement.parentElement,e),this.pdfViewer.enableFreeText&&this.toolbar.enableItems(this.freeTextEditItem.parentElement,e),this.pdfViewer.enableHandwrittenSignature&&this.toolbar.enableItems(this.handWrittenSignatureItem.parentElement,e),this.pdfViewer.enableInkAnnotation&&this.toolbar.enableItems(this.inkAnnotationItem.parentElement,e),this.pdfViewer.enableCommentPanel&&this.enableCommentPanelTool(e))},i.prototype.isAnnotationButtonsEnabled=function(){var e=!1;return(this.isHighlightEnabled||this.isUnderlineEnabled||this.isStrikethroughEnabled)&&(e=!0),e},i.prototype.enableCommentPanelTool=function(e){this.toolbar.enableItems(this.commentItem.parentElement,e)},i.prototype.updateToolbarItems=function(){this.pdfViewer.enableTextMarkupAnnotation?this.enableTextMarkupAddTools(!0):this.enableTextMarkupAddTools(!1),this.toolbar.enableItems(this.shapeElement.parentElement,this.pdfViewer.enableShapeAnnotation),this.toolbar.enableItems(this.stampElement.parentElement,this.pdfViewer.enableStampAnnotations),this.toolbar.enableItems(this.calibrateElement.parentElement,this.pdfViewer.enableMeasureAnnotation),this.toolbar.enableItems(this.freeTextEditItem.parentElement,this.pdfViewer.enableFreeText),this.toolbar.enableItems(this.handWrittenSignatureItem.parentElement,this.pdfViewer.enableHandwrittenSignature),this.toolbar.enableItems(this.inkAnnotationItem.parentElement,this.pdfViewer.enableInkAnnotation)},i.prototype.enableTextMarkupAddTools=function(e){this.toolbar.enableItems(this.highlightItem.parentElement,e),this.toolbar.enableItems(this.underlineItem.parentElement,e),this.toolbar.enableItems(this.strikethroughItem.parentElement,e)},i.prototype.updateAnnnotationPropertyItems=function(){t.isBlazor()?(this.colorDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-color-container"),this.strokeDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-stroke-container"),this.fontColorElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-textcolor-container"),1===this.pdfViewer.selectedItems.annotations.length?(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.colorDropDownElementInBlazor,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill,"fillColor")),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.strokeDropDownElementInBlazor,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor,"strokeColor")),"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.fontColorElementInBlazor,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].fontColor,"fontColor")),this.pdfViewerBase.blazorUIAdaptor.updateFontFamilyInIcon(this.pdfViewer.selectedItems.annotations[0].fontFamily),this.pdfViewerBase.blazorUIAdaptor.updateFontSizeInIcon(this.pdfViewer.selectedItems.annotations[0].fontSize))):(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.colorDropDownElementInBlazor,"#000000"),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.strokeDropDownElementInBlazor,"#000000"),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.fontColorElementInBlazor,"#000000"))):1===this.pdfViewer.selectedItems.annotations.length?(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.colorDropDownElement,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill,"fillColor")),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.strokeDropDownElement,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor,"strokeColor")),"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.fontColorElement,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].fontColor,"fontColor")),this.pdfViewer.toolbar.annotationToolbarModule.updateFontFamilyInIcon(this.pdfViewer.selectedItems.annotations[0].fontFamily),this.pdfViewer.toolbar.annotationToolbarModule.updateFontSizeInIcon(this.pdfViewer.selectedItems.annotations[0].fontSize),this.pdfViewer.toolbar.annotationToolbarModule.updateTextAlignInIcon(this.pdfViewer.selectedItems.annotations[0].textAlign))):(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.colorDropDownElement,"#000000"),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.strokeDropDownElement,"#000000"),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.fontColorElement,"#000000"))},i.prototype.getColorHexValue=function(e,i){return"#ffffff00"===e&&(e="#ffffff"),"red"===e.toLowerCase()&&(e="#FF0000"),"transparent"!==e?t.isBlazor()?e:this.colorPalette.getValue(e,"hex"):"fontColor"===i||"strokeColor"===i?"#000000":"#ffffff"},i.prototype.setColorInPicker=function(e,t){e.setProperties({value:t},!0)},i.prototype.resetToolbar=function(){this.adjustViewer(!1),this.updateToolbarItems(),(this.pdfViewer.isAnnotationToolbarOpen||this.pdfViewer.isAnnotationToolbarVisible)&&this.pdfViewer.enableAnnotationToolbar?(this.toolbarElement.style.display="",this.isToolbarHidden=!1,this.adjustViewer(!0),this.enableAnnotationAddTools(!1),this.pdfViewer.isAnnotationToolbarVisible=!0):(this.toolbarElement.style.display="none",this.isToolbarHidden=!0,this.pdfViewer.isAnnotationToolbarVisible=!1)},i.prototype.clearTextMarkupMode=function(){this.pdfViewerBase.isTextMarkupAnnotationModule()&&(this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode="")},i.prototype.clearShapeMode=function(){this.pdfViewerBase.isShapeAnnotationModule()&&(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode="")},i.prototype.clearMeasureMode=function(){this.pdfViewerBase.isCalibrateAnnotationModule()&&(this.pdfViewer.annotation.measureAnnotationModule.currentAnnotationMode="")},i.prototype.clear=function(){this.deselectAllItems()},i.prototype.destroy=function(){this.colorDropDown.destroy(),this.opacityDropDown.destroy(),this.strokeDropDown.destroy(),this.thicknessDropDown.destroy(),this.shapeDropDown.destroy(),this.calibrateDropDown.destroy(),this.toolbar.destroy(),this.fontColorDropDown.destroy(),this.textAlignDropDown.destroy(),this.textPropertiesDropDown.destroy();var e=document.getElementById(this.pdfViewer.element.id+"_stampElement");e&&e.parentElement.removeChild(e)},i.prototype.getElementHeight=function(e){try{return e.getBoundingClientRect().height}catch(e){return 0}},i.prototype.updateViewerHeight=function(e,t){return this.getElementHeight(this.pdfViewer.element)-t},i.prototype.resetViewerHeight=function(e,t){return e+t},i.prototype.afterAnnotationToolbarCreationInBlazor=function(){this.HighlightElement=document.getElementById(this.pdfViewer.element.id+"_highLight").children[0],this.UnderlineElement=document.getElementById(this.pdfViewer.element.id+"_underline").children[0],this.StrikethroughElement=document.getElementById(this.pdfViewer.element.id+"_strikethrough").children[0],this.HighlightElement=this.addClassToToolbarInBlazor(this.HighlightElement,"e-pv-highlight","_highLight"),this.UnderlineElement=this.addClassToToolbarInBlazor(this.UnderlineElement,"e-pv-underline","_underline"),this.StrikethroughElement=this.addClassToToolbarInBlazor(this.StrikethroughElement,"e-pv-strikethrough","_strikethrough")},i.prototype.addClassToToolbarInBlazor=function(e,t,i){if(e.classList.add(t),e.classList.add("e-pv-tbar-btn"),e.childNodes.length>0){var n=e.childNodes[0];n&&n.classList&&(n.id=this.pdfViewer.element.id+i+"Icon",n.classList.remove("e-icons"),n.classList.remove("e-btn-icon"),this.pdfViewer.enableRtl&&n.classList.add("e-right"))}return e},i.prototype.handleHighlightInBlazor=function(){this.HighlightElement.classList.contains("e-pv-select")?this.primaryToolbar.deSelectItem(this.HighlightElement):this.HighlightElement.classList.contains("e-pv-select")||this.primaryToolbar.selectItem(this.HighlightElement),this.StrikethroughElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.StrikethroughElement),this.UnderlineElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.UnderlineElement)},i.prototype.handleUnderlineInBlazor=function(){this.UnderlineElement.classList.contains("e-pv-select")?this.primaryToolbar.deSelectItem(this.UnderlineElement):this.UnderlineElement.classList.contains("e-pv-select")||this.primaryToolbar.selectItem(this.UnderlineElement),this.StrikethroughElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.StrikethroughElement),this.HighlightElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.HighlightElement)},i.prototype.handleStrikethroughInBlazor=function(){this.StrikethroughElement.classList.contains("e-pv-select")?this.primaryToolbar.deSelectItem(this.StrikethroughElement):this.StrikethroughElement.classList.contains("e-pv-select")||this.primaryToolbar.selectItem(this.StrikethroughElement),this.HighlightElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.HighlightElement),this.UnderlineElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.UnderlineElement)},i}(),di=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ui=function(e,t,i,n){var o,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(a=(s<3?o(a):s>3?o(t,i,a):o(t,i))||a);return s>3&&a&&Object.defineProperty(t,i,a),a},Mi=function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(a,r)}l((n=n.apply(e,t||[])).next())})},pi=function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=2&i[0]?s.return:i[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){l.label=i[1];break}if(6===i[0]&&l.label<a[1]){l.label=a[1],a=i;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(i);break}a[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],s=0}finally{o=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var o,s,a,r,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r},hi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(!0)],i.prototype,"showTooltip",void 0),ui([t.Property()],i.prototype,"toolbarItems",void 0),ui([t.Property()],i.prototype,"annotationToolbarItems",void 0),ui([t.Property()],i.prototype,"formDesignerToolbarItems",void 0),i}(t.ChildProperty),Li=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property()],i.prototype,"ajaxHeaders",void 0),ui([t.Property(!1)],i.prototype,"withCredentials",void 0),i}(t.ChildProperty),wi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property("")],i.prototype,"customStampName",void 0),ui([t.Property("")],i.prototype,"customStampImageSource",void 0),i}(t.ChildProperty),ci=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(!0)],i.prototype,"showTooltip",void 0),ui([t.Property()],i.prototype,"annotationToolbarItem",void 0),i}(t.ChildProperty),Ci=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(!0)],i.prototype,"showTooltip",void 0),ui([t.Property()],i.prototype,"formDesignerToolbarItem",void 0),i}(t.ChildProperty),gi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0,width:0,height:0})],i.prototype,"bounds",void 0),ui([t.Property("")],i.prototype,"name",void 0),ui([t.Property(!1)],i.prototype,"isReadOnly",void 0),ui([t.Property("visible")],i.prototype,"visibility",void 0),ui([t.Property(!1)],i.prototype,"isRequired",void 0),ui([t.Property(!1)],i.prototype,"isPrint",void 0),ui([t.Property("")],i.prototype,"tooltip",void 0),ui([t.Property(0)],i.prototype,"pageNumber",void 0),ui([t.Property()],i.prototype,"signatureIndicatorSettings",void 0),i}(t.ChildProperty),mi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0,width:0,height:0})],i.prototype,"bounds",void 0),ui([t.Property("")],i.prototype,"name",void 0),ui([t.Property(!1)],i.prototype,"isReadOnly",void 0),ui([t.Property("visible")],i.prototype,"visibility",void 0),ui([t.Property(!1)],i.prototype,"isRequired",void 0),ui([t.Property(!1)],i.prototype,"isPrint",void 0),ui([t.Property("")],i.prototype,"tooltip",void 0),ui([t.Property(0)],i.prototype,"pageNumber",void 0),ui([t.Property(!1)],i.prototype,"isInitialField",void 0),ui([t.Property()],i.prototype,"initialIndicatorSettings",void 0),i}(t.ChildProperty),fi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("orange")],i.prototype,"backgroundColor",void 0),ui([t.Property(19)],i.prototype,"width",void 0),ui([t.Property(10)],i.prototype,"height",void 0),ui([t.Property(10)],i.prototype,"fontSize",void 0),ui([t.Property(null)],i.prototype,"text",void 0),ui([t.Property("black")],i.prototype,"color",void 0),i}(t.ChildProperty),yi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property("Load")],i.prototype,"load",void 0),ui([t.Property("Unload")],i.prototype,"unload",void 0),ui([t.Property("RenderPdfPages")],i.prototype,"renderPages",void 0),ui([t.Property("RenderPdfPages")],i.prototype,"print",void 0),ui([t.Property("Download")],i.prototype,"download",void 0),ui([t.Property("RenderThumbnailImages")],i.prototype,"renderThumbnail",void 0),ui([t.Property("RenderAnnotationComments")],i.prototype,"renderComments",void 0),ui([t.Property("ImportAnnotations")],i.prototype,"importAnnotations",void 0),ui([t.Property("ExportAnnotations")],i.prototype,"exportAnnotations",void 0),ui([t.Property("ImportFormFields")],i.prototype,"importFormFields",void 0),ui([t.Property("ExportFormFields")],i.prototype,"exportFormFields",void 0),ui([t.Property("RenderPdfTexts")],i.prototype,"renderTexts",void 0),i}(t.ChildProperty),ji=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ff0000")],i.prototype,"color",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(!1)],i.prototype,"enableMultiPageAnnotation",void 0),ui([t.Property(!1)],i.prototype,"enableTextMarkupResizer",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Si=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#00ff00")],i.prototype,"color",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(!1)],i.prototype,"enableMultiPageAnnotation",void 0),ui([t.Property(!1)],i.prototype,"enableTextMarkupResizer",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Ai=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffff00")],i.prototype,"color",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(!1)],i.prototype,"enableMultiPageAnnotation",void 0),ui([t.Property(!1)],i.prototype,"enableTextMarkupResizer",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Ti=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("1")],i.prototype,"thickness",void 0),ui([t.Property("None")],i.prototype,"lineHeadStartStyle",void 0),ui([t.Property("None")],i.prototype,"lineHeadEndStyle",void 0),ui([t.Property(0)],i.prototype,"borderDashArray",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),xi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("1")],i.prototype,"thickness",void 0),ui([t.Property("None")],i.prototype,"lineHeadStartStyle",void 0),ui([t.Property("None")],i.prototype,"lineHeadEndStyle",void 0),ui([t.Property(0)],i.prototype,"borderDashArray",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Ni=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(100)],i.prototype,"width",void 0),ui([t.Property(50)],i.prototype,"height",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("1")],i.prototype,"thickness",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Di=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(100)],i.prototype,"width",void 0),ui([t.Property(100)],i.prototype,"height",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("1")],i.prototype,"thickness",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),bi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#000")],i.prototype,"fontColor",void 0),ui([t.Property(16)],i.prototype,"fontSize",void 0),ui([t.Property("Helvetica")],i.prototype,"fontFamily",void 0),ui([t.Property("Label")],i.prototype,"labelContent",void 0),ui([t.Property("")],i.prototype,"notes",void 0),i}(t.ChildProperty),Ii=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("1")],i.prototype,"thickness",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),vi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(150)],i.prototype,"width",void 0),ui([t.Property(50)],i.prototype,"height",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property([])],i.prototype,"dynamicStamps",void 0),ui([t.Property([])],i.prototype,"signStamps",void 0),ui([t.Property([])],i.prototype,"standardBusinessStamps",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Ei=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property(0)],i.prototype,"width",void 0),ui([t.Property(0)],i.prototype,"height",void 0),ui([t.Property(0)],i.prototype,"left",void 0),ui([t.Property(0)],i.prototype,"top",void 0),ui([t.Property(!1)],i.prototype,"isAddToMenu",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property("")],i.prototype,"customStamps",void 0),ui([t.Property(!0)],i.prototype,"enableCustomStamp",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Vi=function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return di(n,i),ui([t.Property({x:0,y:0})],n.prototype,"offset",void 0),ui([t.Property(1)],n.prototype,"pageNumber",void 0),ui([t.Property(1)],n.prototype,"opacity",void 0),ui([t.Property("#ff0000")],n.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],n.prototype,"strokeColor",void 0),ui([t.Property("Guest")],n.prototype,"author",void 0),ui([t.Property("1")],n.prototype,"thickness",void 0),ui([t.Property("None")],n.prototype,"lineHeadStartStyle",void 0),ui([t.Property("None")],n.prototype,"lineHeadEndStyle",void 0),ui([t.Property(0)],n.prototype,"borderDashArray",void 0),ui([t.Property("")],n.prototype,"annotationSelectorSettings",void 0),ui([t.Property(0)],n.prototype,"minHeight",void 0),ui([t.Property(0)],n.prototype,"minWidth",void 0),ui([t.Property(0)],n.prototype,"maxHeight",void 0),ui([t.Property(0)],n.prototype,"maxWidth",void 0),ui([t.Property(!1)],n.prototype,"isLock",void 0),ui([t.Property(null)],n.prototype,"customData",void 0),ui([t.Property(40)],n.prototype,"leaderLength",void 0),ui([t.Property(e.CursorType.move)],n.prototype,"resizeCursorType",void 0),ui([t.Property(["None"])],n.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],n.prototype,"isPrint",void 0),n}(t.ChildProperty),zi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("1")],i.prototype,"thickness",void 0),ui([t.Property("None")],i.prototype,"lineHeadStartStyle",void 0),ui([t.Property("None")],i.prototype,"lineHeadEndStyle",void 0),ui([t.Property(0)],i.prototype,"borderDashArray",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),ki=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("1")],i.prototype,"thickness",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Oi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(100)],i.prototype,"width",void 0),ui([t.Property(90)],i.prototype,"height",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("1")],i.prototype,"thickness",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Pi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("1")],i.prototype,"thickness",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Fi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(0)],i.prototype,"width",void 0),ui([t.Property(0)],i.prototype,"height",void 0),ui([t.Property(0)],i.prototype,"path",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ff0000")],i.prototype,"strokeColor",void 0),ui([t.Property(1)],i.prototype,"thickness",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Bi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),i}(t.ChildProperty),Yi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(1)],i.prototype,"scaleRatio",void 0),ui([t.Property("in")],i.prototype,"conversionUnit",void 0),ui([t.Property("in")],i.prototype,"displayUnit",void 0),ui([t.Property(96)],i.prototype,"depth",void 0),i}(t.ChildProperty),Ui=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0})],i.prototype,"offset",void 0),ui([t.Property(1)],i.prototype,"pageNumber",void 0),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#ffffff00")],i.prototype,"borderColor",void 0),ui([t.Property(1)],i.prototype,"borderWidth",void 0),ui([t.Property("solid")],i.prototype,"borderStyle",void 0),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property("#ffffff00")],i.prototype,"fillColor",void 0),ui([t.Property(16)],i.prototype,"fontSize",void 0),ui([t.Property(151)],i.prototype,"width",void 0),ui([t.Property(24.6)],i.prototype,"height",void 0),ui([t.Property("#000")],i.prototype,"fontColor",void 0),ui([t.Property("Helvetica")],i.prototype,"fontFamily",void 0),ui([t.Property("TypeHere")],i.prototype,"defaultText",void 0),ui([t.Property("None")],i.prototype,"fontStyle",void 0),ui([t.Property("Left")],i.prototype,"textAlignment",void 0),ui([t.Property(!1)],i.prototype,"allowEditTextOnly",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),ui([t.Property(!0)],i.prototype,"isPrint",void 0),ui([t.Property(!1)],i.prototype,"isReadonly",void 0),i}(t.ChildProperty),Qi=function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return di(n,i),ui([t.Property("")],n.prototype,"selectionBorderColor",void 0),ui([t.Property("black")],n.prototype,"resizerBorderColor",void 0),ui([t.Property("#FF4081")],n.prototype,"resizerFillColor",void 0),ui([t.Property(8)],n.prototype,"resizerSize",void 0),ui([t.Property(1)],n.prototype,"selectionBorderThickness",void 0),ui([t.Property("Square")],n.prototype,"resizerShape",void 0),ui([t.Property("")],n.prototype,"selectorLineDashArray",void 0),ui([t.Property(e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges)],n.prototype,"resizerLocation",void 0),ui([t.Property(null)],n.prototype,"resizerCursorType",void 0),n}(t.ChildProperty),_i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property("#fdd835")],i.prototype,"searchHighlightColor",void 0),ui([t.Property("#8b4c12")],i.prototype,"searchColor",void 0),i}(t.ChildProperty),Ri=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(1)],i.prototype,"opacity",void 0),ui([t.Property("#000000")],i.prototype,"strokeColor",void 0),ui([t.Property(1)],i.prototype,"thickness",void 0),ui([t.Property(150)],i.prototype,"width",void 0),ui([t.Property(100)],i.prototype,"height",void 0),ui([t.Property(1)],i.prototype,"saveSignatureLimit",void 0),ui([t.Property(1)],i.prototype,"saveInitialLimit",void 0),ui([t.Property([])],i.prototype,"signatureItem",void 0),ui([t.Property()],i.prototype,"typeSignatureFonts",void 0),ui([t.Property("")],i.prototype,"annotationSelectorSettings",void 0),i}(t.ChildProperty),Wi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property("Guest")],i.prototype,"author",void 0),ui([t.Property(0)],i.prototype,"minHeight",void 0),ui([t.Property(0)],i.prototype,"minWidth",void 0),ui([t.Property(0)],i.prototype,"maxHeight",void 0),ui([t.Property(0)],i.prototype,"maxWidth",void 0),ui([t.Property(!1)],i.prototype,"isLock",void 0),ui([t.Property(!1)],i.prototype,"skipPrint",void 0),ui([t.Property(!1)],i.prototype,"skipDownload",void 0),ui([t.Property(null)],i.prototype,"customData",void 0),ui([t.Property(["None"])],i.prototype,"allowedInteractions",void 0),i}(t.ChildProperty),Ji=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property()],i.prototype,"textData",void 0),ui([t.Property()],i.prototype,"pageText",void 0),ui([t.Property()],i.prototype,"pageSize",void 0),i}(t.ChildProperty),Hi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property()],i.prototype,"bounds",void 0),ui([t.Property()],i.prototype,"text",void 0),i}(t.ChildProperty),Gi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property()],i.prototype,"size",void 0),ui([t.Property()],i.prototype,"x",void 0),ui([t.Property()],i.prototype,"y",void 0),ui([t.Property()],i.prototype,"width",void 0),ui([t.Property()],i.prototype,"height",void 0),ui([t.Property()],i.prototype,"left",void 0),ui([t.Property()],i.prototype,"top",void 0),ui([t.Property()],i.prototype,"right",void 0),ui([t.Property()],i.prototype,"bottom",void 0),ui([t.Property()],i.prototype,"isEmpty",void 0),i}(t.ChildProperty),Zi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(!0)],i.prototype,"enableTileRendering",void 0),ui([t.Property(0)],i.prototype,"x",void 0),ui([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),Xi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property(100)],i.prototype,"delayPageRequestTimeOnScroll",void 0),i}(t.ChildProperty),Ki=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property("")],i.prototype,"name",void 0),ui([t.Property("")],i.prototype,"id",void 0),ui([t.Property("")],i.prototype,"value",void 0),ui([t.Property("")],i.prototype,"type",void 0),ui([t.Property(!1)],i.prototype,"isReadOnly",void 0),ui([t.Property([""])],i.prototype,"signatureType",void 0),ui([t.Property("")],i.prototype,"fontName",void 0),ui([t.Property({x:0,y:0,width:0,height:0})],i.prototype,"bounds",void 0),ui([t.Property("Helvetica")],i.prototype,"fontFamily",void 0),ui([t.Property(10)],i.prototype,"fontSize",void 0),ui([t.Property("None")],i.prototype,"fontStyle",void 0),ui([t.Property("black")],i.prototype,"color",void 0),ui([t.Property("white")],i.prototype,"backgroundColor",void 0),ui([t.Property("Left")],i.prototype,"alignment",void 0),ui([t.Property("visible")],i.prototype,"visibility",void 0),ui([t.Property(0)],i.prototype,"maxLength",void 0),ui([t.Property(!1)],i.prototype,"isRequired",void 0),ui([t.Property(!1)],i.prototype,"isPrint",void 0),ui([t.Property("")],i.prototype,"tooltip",void 0),ui([t.Property("")],i.prototype,"options",void 0),ui([t.Property()],i.prototype,"signatureIndicatorSettings",void 0),ui([t.Property(1)],i.prototype,"thickness",void 0),ui([t.Property("#303030")],i.prototype,"borderColor",void 0),i}(t.ChildProperty),qi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property("RightClick")],i.prototype,"contextMenuAction",void 0),ui([t.Property([])],i.prototype,"contextMenuItems",void 0),i}(t.ChildProperty),$i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0,width:0,height:0})],i.prototype,"bounds",void 0),ui([t.Property("")],i.prototype,"name",void 0),ui([t.Property("")],i.prototype,"value",void 0),ui([t.Property("Helvetica")],i.prototype,"fontFamily",void 0),ui([t.Property(10)],i.prototype,"fontSize",void 0),ui([t.Property(0)],i.prototype,"pageNumber",void 0),ui([t.Property("None")],i.prototype,"fontStyle",void 0),ui([t.Property("black")],i.prototype,"color",void 0),ui([t.Property("white")],i.prototype,"backgroundColor",void 0),ui([t.Property("Left")],i.prototype,"alignment",void 0),ui([t.Property(!1)],i.prototype,"isReadOnly",void 0),ui([t.Property("visible")],i.prototype,"visibility",void 0),ui([t.Property(0)],i.prototype,"maxLength",void 0),ui([t.Property(!1)],i.prototype,"isRequired",void 0),ui([t.Property(!1)],i.prototype,"isPrint",void 0),ui([t.Property("")],i.prototype,"tooltip",void 0),ui([t.Property(1)],i.prototype,"thickness",void 0),ui([t.Property("#303030")],i.prototype,"borderColor",void 0),i}(t.ChildProperty),en=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0,width:0,height:0})],i.prototype,"bounds",void 0),ui([t.Property("")],i.prototype,"name",void 0),ui([t.Property("")],i.prototype,"value",void 0),ui([t.Property(0)],i.prototype,"pageNumber",void 0),ui([t.Property("Helvetica")],i.prototype,"fontFamily",void 0),ui([t.Property(10)],i.prototype,"fontSize",void 0),ui([t.Property("None")],i.prototype,"fontStyle",void 0),ui([t.Property("black")],i.prototype,"color",void 0),ui([t.Property("white")],i.prototype,"backgroundColor",void 0),ui([t.Property("Left")],i.prototype,"alignment",void 0),ui([t.Property(!1)],i.prototype,"isReadOnly",void 0),ui([t.Property("visible")],i.prototype,"visibility",void 0),ui([t.Property(0)],i.prototype,"maxLength",void 0),ui([t.Property(!1)],i.prototype,"isRequired",void 0),ui([t.Property(!1)],i.prototype,"isPrint",void 0),ui([t.Property("")],i.prototype,"tooltip",void 0),ui([t.Property(1)],i.prototype,"thickness",void 0),ui([t.Property("#303030")],i.prototype,"borderColor",void 0),i}(t.ChildProperty),tn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0,width:0,height:0})],i.prototype,"bounds",void 0),ui([t.Property("")],i.prototype,"name",void 0),ui([t.Property(!1)],i.prototype,"isChecked",void 0),ui([t.Property("white")],i.prototype,"backgroundColor",void 0),ui([t.Property(!1)],i.prototype,"isReadOnly",void 0),ui([t.Property("visible")],i.prototype,"visibility",void 0),ui([t.Property(!1)],i.prototype,"isPrint",void 0),ui([t.Property(0)],i.prototype,"pageNumber",void 0),ui([t.Property("")],i.prototype,"tooltip",void 0),ui([t.Property(!1)],i.prototype,"isRequired",void 0),ui([t.Property(1)],i.prototype,"thickness",void 0),ui([t.Property("#303030")],i.prototype,"borderColor",void 0),i}(t.ChildProperty),nn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0,width:0,height:0})],i.prototype,"bounds",void 0),ui([t.Property("")],i.prototype,"name",void 0),ui([t.Property(!1)],i.prototype,"isSelected",void 0),ui([t.Property("white")],i.prototype,"backgroundColor",void 0),ui([t.Property(!1)],i.prototype,"isReadOnly",void 0),ui([t.Property(!1)],i.prototype,"isRequired",void 0),ui([t.Property(0)],i.prototype,"pageNumber",void 0),ui([t.Property("visible")],i.prototype,"visibility",void 0),ui([t.Property(!1)],i.prototype,"isPrint",void 0),ui([t.Property("")],i.prototype,"tooltip",void 0),ui([t.Property(1)],i.prototype,"thickness",void 0),ui([t.Property("#303030")],i.prototype,"borderColor",void 0),i}(t.ChildProperty),on=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0,width:0,height:0})],i.prototype,"bounds",void 0),ui([t.Property("")],i.prototype,"name",void 0),ui([t.Property("")],i.prototype,"value",void 0),ui([t.Property("Helvetica")],i.prototype,"fontFamily",void 0),ui([t.Property(10)],i.prototype,"fontSize",void 0),ui([t.Property(0)],i.prototype,"pageNumber",void 0),ui([t.Property("None")],i.prototype,"fontStyle",void 0),ui([t.Property("black")],i.prototype,"color",void 0),ui([t.Property("white")],i.prototype,"backgroundColor",void 0),ui([t.Property("Left")],i.prototype,"alignment",void 0),ui([t.Property(!1)],i.prototype,"isReadOnly",void 0),ui([t.Property("visible")],i.prototype,"visibility",void 0),ui([t.Property(!1)],i.prototype,"isRequired",void 0),ui([t.Property(!1)],i.prototype,"isPrint",void 0),ui([t.Property("")],i.prototype,"tooltip",void 0),ui([t.Property("")],i.prototype,"options",void 0),ui([t.Property(1)],i.prototype,"thickness",void 0),ui([t.Property("#303030")],i.prototype,"borderColor",void 0),i}(t.ChildProperty),sn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property({x:0,y:0,width:0,height:0})],i.prototype,"bounds",void 0),ui([t.Property("")],i.prototype,"name",void 0),ui([t.Property("")],i.prototype,"value",void 0),ui([t.Property("Helvetica")],i.prototype,"fontFamily",void 0),ui([t.Property(10)],i.prototype,"fontSize",void 0),ui([t.Property(0)],i.prototype,"pageNumber",void 0),ui([t.Property("None")],i.prototype,"fontStyle",void 0),ui([t.Property("black")],i.prototype,"color",void 0),ui([t.Property("white")],i.prototype,"backgroundColor",void 0),ui([t.Property("Left")],i.prototype,"alignment",void 0),ui([t.Property(!1)],i.prototype,"isReadOnly",void 0),ui([t.Property("visible")],i.prototype,"visibility",void 0),ui([t.Property(!1)],i.prototype,"isRequired",void 0),ui([t.Property(!1)],i.prototype,"isPrint",void 0),ui([t.Property("")],i.prototype,"tooltip",void 0),ui([t.Property([])],i.prototype,"options",void 0),ui([t.Property(1)],i.prototype,"thickness",void 0),ui([t.Property("#303030")],i.prototype,"borderColor",void 0),i}(t.ChildProperty),an=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return di(i,e),ui([t.Property("")],i.prototype,"itemName",void 0),ui([t.Property("")],i.prototype,"itemValue",void 0),i}(t.ChildProperty),rn=function(i){function n(e,t){var n=i.call(this,e,t)||this;return n.signatureCollection=[],n.fileName=null,n.zIndex=-1,n.nameTable={},n.clipboardData={},n.zIndexTable=[],n.isTextSelectionStarted=!1,n.defaultLocale={PdfViewer:"PDF Viewer",Cancel:"Cancel","Download file":"Download file",Download:"Download","Enter Password":"This document is password protected. Please enter a password.","File Corrupted":"File Corrupted","File Corrupted Content":"The file is corrupted and cannot be opened.","Fit Page":"Fit Page","Fit Width":"Fit Width",Automatic:"Automatic","Go To First Page":"Show first page","Invalid Password":"Incorrect Password. Please try again.","Next Page":"Show next page",OK:"OK",Open:"Open file","Page Number":"Current page number","Previous Page":"Show previous page","Go To Last Page":"Show last page",Zoom:"Zoom","Zoom In":"Zoom in","Zoom Out":"Zoom out","Page Thumbnails":"Page thumbnails",Bookmarks:"Bookmarks",Print:"Print file","Password Protected":"Password Required",Copy:"Copy","Text Selection":"Text selection tool",Panning:"Pan mode","Text Search":"Find text","Find in document":"Find in document","Match case":"Match case",Apply:"Apply",GoToPage:"Go to Page","No matches":"Viewer has finished searching the document. No more matches were found","No Text Found":"No Text Found",Undo:"Undo",Redo:"Redo",Annotation:"Add or Edit annotations",FormDesigner:"Add and Edit Form Fields",Highlight:"Highlight Text",Underline:"Underline Text",Strikethrough:"Strikethrough Text",Delete:"Delete annotation",Opacity:"Opacity","Color edit":"Change Color","Opacity edit":"Change Opacity","Highlight context":"Highlight","Underline context":"Underline","Strikethrough context":"Strikethrough","Server error":"Web-service is not listening. PDF Viewer depends on web-service for all it's features. Please start the web service to continue.","Client error":"Client-side error is found. Please check the custom headers provided in the AjaxRequestSettings property and web action methods in the ServerActionSettings property.","Open text":"Open","First text":"First Page","Previous text":"Previous Page","Next text":"Next Page","Last text":"Last Page","Zoom in text":"Zoom In","Zoom out text":"Zoom Out","Selection text":"Selection","Pan text":"Pan","Print text":"Print","Search text":"Search","Annotation Edit text":"Edit Annotation","FormDesigner Edit text":"Add and Edit Form Fields","Line Thickness":"Line Thickness","Line Properties":"Line Properties","Start Arrow":"Start Arrow","End Arrow":"End Arrow","Line Style":"Line Style","Fill Color":"Fill Color","Line Color":"Line Color",None:"None","Open Arrow":"Open","Closed Arrow":"Closed","Round Arrow":"Round","Square Arrow":"Square","Diamond Arrow":"Diamond",Butt:"Butt",Cut:"Cut",Paste:"Paste","Delete Context":"Delete",Properties:"Properties","Add Stamp":"Add Stamp","Add Shapes":"Add Shapes","Stroke edit":"Change Stroke Color","Change thickness":"Change Border Thickness","Add line":"Add Line","Add arrow":"Add Arrow","Add rectangle":"Add Rectangle","Add circle":"Add Circle","Add polygon":"Add Polygon","Add Comments":"Add Comments",Comments:"Comments",SubmitForm:"Submit Form","No Comments Yet":"No Comments Yet",Accepted:"Accepted",Completed:"Completed",Cancelled:"Cancelled",Rejected:"Rejected","Leader Length":"Leader Length","Scale Ratio":"Scale Ratio",Calibrate:"Calibrate","Calibrate Distance":"Calibrate Distance","Calibrate Perimeter":"Calibrate Perimeter","Calibrate Area":"Calibrate Area","Calibrate Radius":"Calibrate Radius","Calibrate Volume":"Calibrate Volume",Depth:"Depth",Closed:"Closed",Round:"Round",Square:"Square",Diamond:"Diamond",Edit:"Edit",Comment:"Comment","Comment Panel":"Comment Panel","Set Status":"Set Status",Post:"Post",Page:"Page","Add a comment":"Add a comment","Add a reply":"Add a reply","Import Annotations":"Import annotations from JSON file","Export Annotations":"Export annotation to JSON file","Export XFDF":"Export annotation to XFDF file","Import XFDF":"Import annotations from XFDF file",Add:"Add",Clear:"Clear",Bold:"Bold",Italic:"Italic",Strikethroughs:"Strikethrough",Underlines:"Underline",Superscript:"Superscript",Subscript:"Subscript","Align left":"Align Left","Align right":"Align Right",Center:"Center",Justify:"Justify","Font color":"Font Color","Text Align":"Text Align","Text Properties":"Font Style","Draw Signature":"Draw Signature","Draw Initial":"Draw Initial","Draw Ink":"Draw Ink",Create:"Create","Font family":"Font Family","Font size":"Font Size","Free Text":"Free Text","Import Failed":"Invalid JSON file type or file name; please select a valid JSON file","File not found":"Imported JSON file is not found in the desired location","Export Failed":"Export annotations action has failed; please ensure annotations are added properly",of:"of ",Dynamic:"Dynamic","Standard Business":"Standard Business","Sign Here":"Sign Here","Custom Stamp":"Custom Stamp","Enter Signature as Name":"Enter your name","Draw-hand Signature":"DRAW","Type Signature":"TYPE","Upload Signature":"UPLOAD","Browse Signature Image":"BROWSE","Save Signature":"Save Signature","Save Initial":"Save Initial",Textbox:"Textbox",Password:"Password","Check Box":"Checkbox","Radio Button":"Radio Button",Dropdown:"Drop Down","List Box":"List Box",Signature:"Signature","Delete FormField":"Delete Form Field","Textbox Properties":"Textbox Properties",Name:"Name",Tooltip:"Tooltip",Value:"Value","Form Field Visibility":"Form Field Visibility","Read Only":"Read Only",Required:"Required",Checked:"Checked","Show Printing":"Show Printing",Formatting:"Format",Fill:"Fill",Border:"Border","Border Color":"Border Color",Thickness:"Thickness","Max Length":"Max Length","List Item":"Item Name","Export Value":"Item Value","Dropdown Item List":"Dropdown Item List","List Box Item List":"List Box Item List",General:"GENERAL",Appearance:"APPEARANCE",Options:"OPTIONS","Delete Item":"Delete",Up:"Up",Down:"Down"},n.viewerBase=new qt(n),n.drawing=new tt(n),n}return di(n,i),Object.defineProperty(n.prototype,"zoomPercentage",{get:function(){return 100*this.magnificationModule.zoomFactor},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bookmark",{get:function(){return this.bookmarkViewModule},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"print",{get:function(){return this.printModule},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"magnification",{get:function(){return this.magnificationModule},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"navigation",{get:function(){return this.navigationModule},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"textSearch",{get:function(){return this.textSearchModule},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"toolbar",{get:function(){return this.toolbarModule},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"thumbnailView",{get:function(){return this.thumbnailViewModule},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"annotation",{get:function(){return this.annotationModule},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"formDesigner",{get:function(){return this.formDesignerModule},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"textSelection",{get:function(){return this.textSelectionModule},enumerable:!0,configurable:!0}),n.prototype.preRender=function(){this.localeObj=new t.L10n(this.getModuleName(),this.defaultLocale,this.locale)},n.prototype.render=function(){this.viewerBase.initializeComponent(),this.enableTextSelection&&this.textSelectionModule?this.textSelectionModule.enableTextSelectionMode():this.viewerBase.disableTextSelectionMode(),this.drawing.renderLabels(this),this.renderComplete()},n.prototype.getModuleName=function(){return"PdfViewer"},n.prototype.getLocaleConstants=function(){return this.defaultLocale},n.prototype.setJsonData=function(e){this.viewerBase.ajaxData=e},n.prototype.onPropertyChanged=function(e,t){if(!this.isDestroyed)for(var n=0,o=Object.keys(e);n<o.length;n++){var s=o[n];switch(s){case"locale":if(this.viewerBase.loadedData){var a=window.sessionStorage.getItem(this.viewerBase.documentId+"_formfields");this.viewerBase.formfieldvalue=JSON.parse(a);var r=this.annotationCollection,l=this.viewerBase.jsonDocumentId;i.prototype.refresh.call(this),this.load(this.viewerBase.loadedData,null),this.addAnnotation(r),this.viewerBase.loadedData=null,this.downloadFileName=l,this.fileName=l}break;case"enableToolbar":this.notify("",{module:"toolbar",enable:this.enableToolbar});break;case"enableCommentPanel":this.notify("",{module:"annotation",enable:this.enableCommentPanel}),this.toolbarModule&&this.toolbarModule.annotationToolbarModule&&this.toolbarModule.annotationToolbarModule.enableCommentPanelTool(this.enableCommentPanel),this.enableCommentPanel||this.viewerBase.navigationPane&&this.viewerBase.navigationPane.closeCommentPanelContainer();break;case"documentPath":this.load(e.documentPath,null);break;case"interactionMode":this.interactionMode=e.interactionMode,"Pan"===e.interactionMode?(this.viewerBase.initiatePanning(),this.toolbar&&this.toolbar.updateInteractionTools(!1)):"TextSelection"===e.interactionMode&&(this.viewerBase.initiateTextSelectMode(),this.toolbar&&this.toolbar.updateInteractionTools(!0));break;case"height":this.height=e.height,this.viewerBase.updateHeight(),this.viewerBase.onWindowResize(),this.toolbar&&this.toolbar.annotationToolbarModule&&(this.toolbar.annotationToolbarModule.isToolbarHidden?this.toolbar.annotationToolbarModule.adjustViewer(!1):this.toolbar.annotationToolbarModule.adjustViewer(!0));break;case"width":this.width=e.width,this.viewerBase.updateWidth(),this.viewerBase.onWindowResize();break;case"customStamp":this.renderCustomerStamp(this.customStamp[0]);break;case"customStampSettings":e.customStampSettings.customStamps&&this.renderCustomerStamp(this.customStampSettings.customStamps[0]);break;case"enableFormFields":if(this.enableFormFields&&this.formFieldsModule)for(var d=0;d<this.pageCount;d++)this.formFieldsModule.renderFormFields(d);else this.formFieldsModule=new pn(this,this.viewerBase),this.formFieldsModule.formFieldsReadOnly(this.enableFormFields);break;case"designerMode":this.designerMode?this.formDesignerModule.setMode("designer"):this.formDesignerModule.setMode("edit");break;case"highlightSettings":case"underlineSettings":case"strikethroughSettings":this.annotationModule&&this.annotationModule.textMarkupAnnotationModule&&this.annotationModule.textMarkupAnnotationModule.updateTextMarkupSettings(s)}}},n.prototype.renderCustomerStamp=function(e){this.annotation.stampAnnotationModule.isStampAddMode=!0,this.annotationModule.stampAnnotationModule.isStampAnnotSelected=!0,this.viewerBase.stampAdded=!0,this.viewerBase.isAlreadyAdded=!1,this.annotation.stampAnnotationModule.createCustomStampAnnotation(e.customStampImageSource,e.customStampName)},n.prototype.getPersistData=function(){return"PdfViewer"},n.prototype.requiredModules=function(){var e=[];return this.enableMagnification&&e.push({member:"Magnification",args:[this,this.viewerBase]}),this.enableNavigation&&e.push({member:"Navigation",args:[this,this.viewerBase]}),(this.enableToolbar||this.enableNavigationToolbar)&&e.push({member:"Toolbar",args:[this,this.viewerBase]}),this.enableHyperlink&&e.push({member:"LinkAnnotation",args:[this,this.viewerBase]}),this.enableThumbnail&&e.push({member:"ThumbnailView",args:[this,this.viewerBase]}),this.enableBookmark&&e.push({member:"BookmarkView",args:[this,this.viewerBase]}),this.enableTextSelection&&e.push({member:"TextSelection",args:[this,this.viewerBase]}),this.enableTextSearch&&e.push({member:"TextSearch",args:[this,this.viewerBase]}),this.enablePrint&&e.push({member:"Print",args:[this,this.viewerBase]}),this.enableAnnotation&&e.push({member:"Annotation",args:[this,this.viewerBase]}),this.enableFormFields&&e.push({member:"FormFields",args:[this,this.viewerBase]}),this.enableFormDesigner&&e.push({member:"FormDesigner",args:[this,this.viewerBase]}),e},n.prototype.load=function(e,i){0!==this.pageCount?this.viewerBase.clear(!0):this.viewerBase.clear(!1),this.pageCount=0,this.currentPageNumber=0,t.isBlazor()||this.toolbarModule&&this.toolbarModule.resetToolbar(),this.viewerBase.initiatePageRender(e,i)},n.prototype.download=function(){this.enableDownload&&this.viewerBase.download()},n.prototype.saveAsBlob=function(){var e=this;return this.enableDownload?new Promise(function(t,i){t(e.viewerBase.saveAsBlob())}):null},n.prototype.updateViewerContainer=function(){this.viewerBase.updateViewerContainer()},n.prototype.showNotificationPopup=function(e){this.viewerBase.showNotificationPopup(e)},n.prototype.updateFormFieldsValue=function(e){var t=document.getElementById(e.id);(t=t||document.getElementById(e.id+"_content_html_element").children[0].children[0])&&"Textbox"===e.type||"Password"===e.type?t.value=e.value:"RadioButton"===e.type||"CheckBox"===e.type?("CheckBox"===e.type&&(t.style.appearance="auto"),t.checked=e.value):"DropDown"!==e.type&&"ListBox"!==e.type||(t.options[t.selectedIndex].text=e.value),"SignatureField"===e.type||"InitialField"===e.type?(e.signatureType&&(e.signatureType=e.signatureType[0]),e.fontName=e.fontName?e.fontName:e.fontFamily,this.formFieldsModule.drawSignature(e.signatureType,e.value,t,e.fontName)):this.formFieldsModule.updateDataInSession(t)},n.prototype.undo=function(){this.annotationModule&&this.annotationModule.undo()},n.prototype.redo=function(){this.annotationModule&&this.annotationModule.redo()},n.prototype.unload=function(){this.viewerBase.clear(!0),this.pageCount=0,t.isBlazor()?this.viewerBase.blazorUIAdaptor.resetToolbar():this.toolbarModule&&(this.viewerBase.pageCount=0,this.toolbarModule.resetToolbar()),this.magnificationModule.zoomTo(100)},n.prototype.destroy=function(){i.prototype.destroy.call(this),t.isNullOrUndefined(this.element)||(this.refreshing||this.element.classList.remove("e-pdfviewer"),this.element.innerHTML=""),this.viewerBase.destroy()},n.prototype.importAnnotation=function(t,i){if(this.annotationModule)if("string"==typeof t){var n=t.indexOf(".xfdf")>-1;i?this.viewerBase.importAnnotations(t,i,n):"json"===t.split(".")[1]?this.viewerBase.importAnnotations(t,e.AnnotationDataFormat.Json):this.viewerBase.importAnnotations(t,e.AnnotationDataFormat.Xfdf,n)}else this.viewerBase.importAnnotations(t)},n.prototype.exportAnnotation=function(t){this.annotationModule&&(t&&"Xfdf"===t?this.viewerBase.exportAnnotations(e.AnnotationDataFormat.Xfdf):this.viewerBase.exportAnnotations(e.AnnotationDataFormat.Json))},n.prototype.exportAnnotationsAsObject=function(){var e=this;return this.annotationModule?new Promise(function(t,i){e.viewerBase.exportAnnotationsAsObject().then(function(e){t(e)})}):null},n.prototype.addAnnotation=function(e){this.viewerBase&&this.viewerBase.addAnnotation(e)},n.prototype.importFormFields=function(e){this.formFieldsModule&&this.viewerBase.importFormFields(e)},n.prototype.exportFormFields=function(e){this.formFieldsModule&&this.viewerBase.exportFormFields(e)},n.prototype.exportFormFieldsAsObject=function(){var e=this;return this.formFieldsModule?new Promise(function(t,i){e.viewerBase.exportFormFieldsAsObject().then(function(e){t(e)})}):null},n.prototype.resetFormFields=function(){this.formFieldsModule.resetFormFields()},n.prototype.clearFormFields=function(e){this.formFieldsModule.clearFormFields(e)},n.prototype.deleteAnnotations=function(){this.annotationModule&&this.viewerBase.deleteAnnotations()},n.prototype.retrieveFormFields=function(){return this.formFieldCollections},n.prototype.updateFormFields=function(e){this.formFieldsModule.updateFormFieldValues(e)},n.prototype.fireAjaxRequestInitiate=function(e){var t={name:"ajaxRequestInitiate",JsonData:e};this.trigger("ajaxRequestInitiate",t)},n.prototype.fireButtonFieldClickEvent=function(e,t,i){var n={name:"buttonFieldClicked",buttonFieldValue:e,buttonFieldName:t,id:i};this.trigger("buttonFieldClick",n)},n.prototype.fireFormFieldClickEvent=function(e,i,n){return Mi(this,void 0,void 0,function(){var o;return pi(this,function(s){switch(s.label){case 0:return o={name:e,field:i,cancel:n},t.isBlazor()?[4,this.triggerEvent("formFieldClick",o)]:[3,2];case 1:return o=s.sent()||o,o.field.type=i.type,[3,3];case 2:this.triggerEvent("formFieldClick",o),s.label=3;case 3:return"SignatureField"===i.type&&(o.cancel||this.viewerBase.signatureModule.showSignatureDialog(!0)),[2]}})})},n.prototype.fireFormFieldAddEvent=function(e,t,i){var n={name:e,field:t,pageIndex:i};this.viewerBase.isFormFieldSelect=!1,this.trigger("formFieldAdd",n)},n.prototype.fireFormFieldRemoveEvent=function(e,t,i){var n={name:e,field:t,pageIndex:i};this.trigger("formFieldRemove",n)},n.prototype.fireFormFieldPropertiesChangeEvent=function(e,t,i,n,o,s,a,r,l,d,u,M,p,h,L,w,c,C,g,m){var f={name:e,field:t,pageIndex:i,isValueChanged:n,isFontFamilyChanged:o,isFontSizeChanged:s,isFontStyleChanged:a,isColorChanged:r,isBackgroundColorChanged:l,isBorderColorChanged:d,isBorderWidthChanged:u,isAlignmentChanged:M,isReadOnlyChanged:p,isVisibilityChanged:h,isMaxLengthChanged:L,isRequiredChanged:w,isPrintChanged:c,isToolTipChanged:C,oldValue:g,newValue:m};this.trigger("formFieldPropertiesChange",f)},n.prototype.fireFormFieldMouseLeaveEvent=function(e,t,i){var n={name:e,field:t,pageIndex:i};this.trigger("formFieldMouseLeave",n)},n.prototype.fireFormFieldMouseoverEvent=function(e,t,i,n,o,s,a){var r={name:e,field:t,pageIndex:i,pageX:n,pageY:o,X:s,Y:a};this.trigger("formFieldMouseover",r)},n.prototype.fireFormFieldMoveEvent=function(e,t,i,n,o){var s={name:e,field:t,pageIndex:i,previousPosition:n,currentPosition:o};this.trigger("formFieldMove",s)},n.prototype.fireFormFieldResizeEvent=function(e,t,i,n,o){var s={name:e,field:t,pageIndex:i,previousPosition:n,currentPosition:o};this.trigger("formFieldResize",s)},n.prototype.fireFormFieldSelectEvent=function(e,t,i,n){var o={name:e,field:t,pageIndex:i,isProgrammaticSelection:n};this.trigger("formFieldSelect",o)},n.prototype.fireFormFieldUnselectEvent=function(e,t,i){var n={name:e,field:t,pageIndex:i};this.trigger("formFieldUnselect",n)},n.prototype.fireDocumentLoad=function(e){var i={name:"documentLoad",documentName:this.fileName,pageData:e};this.trigger("documentLoad",i),t.isBlazor()&&(this._dotnetInstance.invokeMethodAsync("LoadDocument",null),this.viewerBase.blazorUIAdaptor.loadDocument())},n.prototype.fireDocumentUnload=function(e){var t={name:"documentUnload",documentName:e};this.trigger("documentUnload",t)},n.prototype.fireDocumentLoadFailed=function(e,t){var i={name:"documentLoadFailed",documentName:this.fileName,isPasswordRequired:e,password:t};this.trigger("documentLoadFailed",i)},n.prototype.fireAjaxRequestFailed=function(e,t,i,n){var o={name:"ajaxRequestFailed",documentName:this.fileName,errorStatusCode:e,errorMessage:t,action:i};n&&(o.retryCount=!0),this.trigger("ajaxRequestFailed",o)},n.prototype.fireAjaxRequestSuccess=function(e,t){var i={name:"ajaxRequestSuccess",documentName:this.fileName,action:e,data:t};this.trigger("ajaxRequestSuccess",i)},n.prototype.fireValidatedFailed=function(e){if(t.isBlazor())(i={}).documentName=this.fileName,i.formFields=this.formFieldCollections,i.nonFillableFields=this.viewerBase.nonFillableFields,this.trigger("validateFormFields",i);else{var i={formField:this.formFieldCollections,documentName:this.fileName,nonFillableFields:this.viewerBase.nonFillableFields};this.trigger("validateFormFields",i)}},n.prototype.firePageClick=function(e,t,i){var n={name:"pageClick",documentName:this.fileName,x:e,y:t,pageNumber:i};this.trigger("pageClick",n)},n.prototype.firePageChange=function(e){var i={name:"pageChange",documentName:this.fileName,currentPageNumber:this.currentPageNumber,previousPageNumber:e};this.trigger("pageChange",i),t.isBlazor()&&this.viewerBase.blazorUIAdaptor.pageChanged(this.currentPageNumber)},n.prototype.fireZoomChange=function(){var e={name:"zoomChange",zoomValue:100*this.magnificationModule.zoomFactor,previousZoomValue:100*this.magnificationModule.previousZoomFactor};this.trigger("zoomChange",e)},n.prototype.fireHyperlinkClick=function(e,i){return Mi(this,void 0,void 0,function(){var n;return pi(this,function(o){switch(o.label){case 0:return n={name:"hyperlinkClick",hyperlink:e,hyperlinkElement:i,cancel:!1},t.isBlazor()?[4,this.triggerEvent("hyperlinkClick",n)]:[3,2];case 1:return n=o.sent()||n,[3,3];case 2:this.triggerEvent("hyperlinkClick",n),o.label=3;case 3:return n.hyperlinkElement.href!=n.hyperlink&&(i.href=n.hyperlink),n.cancel?[2,!1]:[2,!0]}})})},n.prototype.fireHyperlinkHover=function(e){var t={name:"hyperlinkMouseOver",hyperlinkElement:e};this.trigger("hyperlinkMouseOver",t)},n.prototype.fireFocusOutFormField=function(e,t){var i={name:"formFieldFocusOut",fieldName:e,value:t};this.trigger("formFieldFocusOut",i)},n.prototype.fireAnnotationAdd=function(e,i,n,o,s,a,r,l,d,u){var M={name:"annotationAdd",pageIndex:e,annotationId:i,annotationType:n,annotationBound:o,annotationSettings:s};a&&(t.isBlazor()?(M.annotationSettings.textMarkupContent=a,M.annotationSettings.textMarkupStartIndex=r,M.annotationSettings.textMarkupEndIndex=l):(M.textMarkupContent=a,M.textMarkupStartIndex=r,M.textMarkupEndIndex=l)),d&&(M.labelSettings=d),u&&(M.multiplePageCollection=u),this.viewerBase.isAnnotationSelect=!1,this.trigger("annotationAdd",M),t.isBlazor()&&this.viewerBase.blazorUIAdaptor.annotationAdd()},n.prototype.fireAnnotationRemove=function(e,t,i,n,o,s,a,r){var l={name:"annotationRemove",pageIndex:e,annotationId:t,annotationType:i,annotationBounds:n};o&&(l.textMarkupContent=o,l.textMarkupStartIndex=s,l.textMarkupEndIndex=a),r&&(l.multiplePageCollection=r),this.trigger("annotationRemove",l)},n.prototype.fireBeforeAddFreeTextAnnotation=function(e){var t={name:"beforeAddFreeText",value:e};this.trigger("beforeAddFreeText",t)},n.prototype.fireCommentAdd=function(e,t,i){var n={name:"CommentAdd",id:e,text:t,annotation:i};this.trigger("commentAdd",n)},n.prototype.fireCommentEdit=function(e,t,i){var n={name:"CommentEdit",id:e,text:t,annotation:i};this.trigger("commentEdit",n)},n.prototype.fireCommentDelete=function(e,t,i){var n={name:"CommentDelete",id:e,text:t,annotation:i};this.trigger("commentDelete",n)},n.prototype.fireCommentSelect=function(e,t,i){var n={name:"CommentSelect",id:e,text:t,annotation:i};this.trigger("commentSelect",n)},n.prototype.fireCommentStatusChanged=function(e,t,i,n){var o={name:"CommentStatusChanged",id:e,text:t,annotation:i,status:n};this.trigger("commentStatusChanged",o)},n.prototype.fireAnnotationPropertiesChange=function(e,t,i,n,o,s,a,r,l,d,u){var M={name:"annotationPropertiesChange",pageIndex:e,annotationId:t,annotationType:i,isColorChanged:n,isOpacityChanged:o,isTextChanged:s,isCommentsChanged:a};r&&(M.textMarkupContent=r,M.textMarkupStartIndex=l,M.textMarkupEndIndex=d),u&&(M.multiplePageCollection=u),this.trigger("annotationPropertiesChange",M)},n.prototype.fireSignatureAdd=function(e,t,i,n,o,s,a,r){var l={pageIndex:e,id:t,type:i,bounds:n,opacity:o};a&&(l.thickness=a),s&&(l.strokeColor=s),r&&(l.data=r),this.trigger("addSignature",l)},n.prototype.fireSignatureRemove=function(e,t,i,n){var o={pageIndex:e,id:t,type:i,bounds:n};this.trigger("removeSignature",o)},n.prototype.fireSignatureMove=function(e,t,i,n,o,s,a,r){var l={pageIndex:e,id:t,type:i,opacity:n,strokeColor:o,thickness:s,previousPosition:a,currentPosition:r};this.trigger("moveSignature",l)},n.prototype.fireSignaturePropertiesChange=function(e,t,i,n,o,s,a,r){var l={pageIndex:e,id:t,type:i,isStrokeColorChanged:n,isOpacityChanged:o,isThicknessChanged:s,oldValue:a,newValue:r};this.trigger("signaturePropertiesChange",l)},n.prototype.fireSignatureResize=function(e,t,i,n,o,s,a,r){var l={pageIndex:e,id:t,type:i,opacity:n,strokeColor:o,thickness:s,currentPosition:a,previousPosition:r};this.trigger("resizeSignature",l)},n.prototype.fireSignatureSelect=function(e,t,i){var n={id:e,pageIndex:t,signature:i};this.trigger("signatureSelect",n)},n.prototype.fireAnnotationSelect=function(e,i,n,o,s,a,r){var l={name:"annotationSelect",annotationId:e,pageIndex:i,annotation:n};if(o&&(l={name:"annotationSelect",annotationId:e,pageIndex:i,annotation:n,annotationCollection:o}),s&&(l.multiplePageCollection=s),a&&(l.isProgrammaticSelection=a),r&&(l.annotationAddMode=r),t.isBlazor()){if("FreeText"===n.type){var d={isBold:!1,isItalic:!1,isStrikeout:!1,isUnderline:!1};1===n.fontStyle?d.isBold=!0:2===n.fontStyle?d.isItalic=!0:3===n.fontStyle?d.isStrikeout=!0:4===n.fontStyle&&(d.isUnderline=!0),n.fontStyle=d}this.viewerBase.blazorUIAdaptor.annotationSelect(n.type)}this.trigger("annotationSelect",l)},n.prototype.fireAnnotationUnSelect=function(e,i,n){t.isBlazor()&&this.viewerBase.blazorUIAdaptor.annotationUnSelect();var o={name:"annotationUnSelect",annotationId:e,pageIndex:i,annotation:n};this.trigger("annotationUnSelect",o)},n.prototype.fireAnnotationDoubleClick=function(e,t,i){var n={name:"annotationDblClick",annotationId:e,pageIndex:t,annotation:i};this.trigger("annotationDoubleClick",n)},n.prototype.fireTextSelectionStart=function(e){this.isTextSelectionStarted=!0;var t={pageIndex:e};this.trigger("textSelectionStart",t)},n.prototype.fireTextSelectionEnd=function(e,t,i){if(this.isTextSelectionStarted){var n={pageIndex:e,textContent:t,textBounds:i};this.trigger("textSelectionEnd",n),this.isTextSelectionStarted=!1}},n.prototype.renderDrawing=function(e,t){t||!this.viewerBase.activeElements.activePageID||this.viewerBase.isPrint||(t=this.viewerBase.activeElements.activePageID),this.annotation?this.annotation.renderAnnotations(t,null,null,null,e):this.formDesignerModule.updateCanvas(t,e)},n.prototype.fireAnnotationResize=function(e,t,i,n,o,s,a,r,l,d){var u={name:"annotationResize",pageIndex:e,annotationId:t,annotationType:i,annotationBound:n,annotationSettings:o};s&&(u.textMarkupContent=s,u.textMarkupStartIndex=a,u.textMarkupEndIndex=r),l&&(u.labelSettings=l),d&&(u.multiplePageCollection=d),this.trigger("annotationResize",u)},n.prototype.fireAnnotationMove=function(e,t,i,n,o,s){var a={name:"annotationMove",pageIndex:e,annotationId:t,annotationType:i,annotationSettings:n,previousPosition:o,currentPosition:s};this.trigger("annotationMove",a)},n.prototype.fireAnnotationMouseover=function(e,i,n,o,s,a,r){var l={name:"annotationMouseover",annotationId:e,pageIndex:i,annotationType:n,annotationBounds:o,annotation:s,pageX:a.left,pageY:a.top,X:r.left,Y:r.top};t.isBlazor()&&("Perimeter calculation"===s.subject?l.annotationType="Perimeter":"Area calculation"===s.subject?l.annotationType="Area":"Volume calculation"===s.subject?l.annotationType="Volume":"Arrow"===s.subject?l.annotationType="Arrow":"Circle"===s.subject&&(l.annotationType="Circle")),this.trigger("annotationMouseover",l)},n.prototype.fireAnnotationMouseLeave=function(e){var t={name:"annotationMouseLeave",pageIndex:e};this.trigger("annotationMouseLeave",t)},n.prototype.firePageMouseover=function(e,t){var i={pageX:e,pageY:t};this.trigger("pageMouseover",i)},n.prototype.fireDownloadStart=function(e){var t={fileName:e};this.trigger("downloadStart",t)},n.prototype.fireDownloadEnd=function(e,t){var i={fileName:e,downloadDocument:t};this.trigger("downloadEnd",i)},n.prototype.firePrintStart=function(){return Mi(this,void 0,void 0,function(){var e;return pi(this,function(i){switch(i.label){case 0:return e={fileName:this.downloadFileName,cancel:!1},t.isBlazor?[4,this.triggerEvent("printStart",e)]:[3,2];case 1:return e=i.sent()||e,[3,3];case 2:this.triggerEvent("printStart",e),i.label=3;case 3:return e.cancel||this.printModule.print(),[2]}})})},n.prototype.triggerEvent=function(e,i){return Mi(this,void 0,void 0,function(){var n;return pi(this,function(o){switch(o.label){case 0:return[4,this.trigger(e,i)];case 1:return n=o.sent(),t.isBlazor&&"string"==typeof n&&(n=JSON.parse(n)),[2,n]}})})},n.prototype.firePrintEnd=function(e){var t={fileName:e};this.trigger("printEnd",t)},n.prototype.fireThumbnailClick=function(e){var t={name:"thumbnailClick",pageNumber:e};this.trigger("thumbnailClick",t)},n.prototype.fireBookmarkClick=function(e,t,i,n){var o={name:"bookmarkClick",pageNumber:e,position:t,text:i,fileName:n};this.trigger("bookmarkClick",o)},n.prototype.fireImportStart=function(e){var t={name:"importAnnotationsStart",importData:e,formFieldData:null};this.trigger("importStart",t)},n.prototype.fireExportStart=function(e){var t={name:"exportAnnotationsStart",exportData:e,formFieldData:null};this.trigger("exportStart",t)},n.prototype.fireImportSuccess=function(e){var t={name:"importAnnotationsSuccess",importData:e,formFieldData:null};this.trigger("importSuccess",t)},n.prototype.fireExportSuccess=function(e,t){var i={name:"exportAnnotationsSuccess",exportData:e,fileName:t,formFieldData:null};this.trigger("exportSuccess",i)},n.prototype.fireImportFailed=function(e,t){var i={name:"importAnnotationsFailed",importData:e,errorDetails:t,formFieldData:null};this.trigger("importFailed",i)},n.prototype.fireExportFailed=function(e,t){var i={name:"exportAnnotationsFailed",exportData:e,errorDetails:t,formFieldData:null};this.trigger("exportFailed",i)},n.prototype.fireFormImportStarted=function(e){var t={name:"importFormFieldsStart",importData:null,formFieldData:e};this.trigger("importStart",t)},n.prototype.fireFormExportStarted=function(e){var t={name:"exportFormFieldsStart",exportData:null,formFieldData:e};this.trigger("exportStart",t)},n.prototype.fireFormImportSuccess=function(e){var t={name:"importFormFieldsSuccess",importData:e,formFieldData:e};this.trigger("importSuccess",t)},n.prototype.fireFormExportSuccess=function(e,t){var i={name:"exportFormFieldsSuccess",exportData:e,fileName:t,formFieldData:e};this.trigger("exportSuccess",i)},n.prototype.fireFormImportFailed=function(e,t){var i={name:"importFormFieldsfailed",importData:e,errorDetails:t,formFieldData:e};this.trigger("importFailed",i)},n.prototype.fireFormExportFailed=function(e,t){var i={name:"exportFormFieldsFailed",exportData:e,errorDetails:t,formFieldData:e};this.trigger("exportFailed",i)},n.prototype.fireTextExtractionCompleted=function(e){var t={documentTextCollection:e};this.trigger("extractTextCompleted",t)},n.prototype.fireTextSearchStart=function(e,t){var i={name:"textSearchStart",searchText:e,matchCase:t};this.trigger("textSearchStart",i)},n.prototype.fireTextSearchComplete=function(e,t){var i={name:"textSearchComplete",searchText:e,matchCase:t};this.trigger("textSearchComplete",i)},n.prototype.fireTextSearchHighlight=function(e,t,i,n){var o={name:"textSearchHighlight",searchText:e,matchCase:t,bounds:i,pageNumber:n};this.trigger("textSearchHighlight",o)},n.prototype.renderAdornerLayer=function(e,t,i,n){ee(e,t,i,n,this)},n.prototype.renderSelector=function(e,t){this.drawing.renderSelector(e,t)},n.prototype.select=function(e,t,i,n){if(this.annotationModule){var o=this.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage,s=this.selectedItems.annotations[0];if(o){var a=this.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation;this.annotationModule.textMarkupAnnotationModule.clearCurrentAnnotationSelection(o,!0),this.fireAnnotationUnSelect(a.annotName,a.pageNumber,a)}i||this.viewerBase.activeElements&&this.viewerBase.activeElements.activePageID>=0&&(s&&this.fireAnnotationUnSelect(s.annotName,s.pageIndex,s),this.clearSelection(this.viewerBase.activeElements.activePageID))}if(this.formDesignerModule){var r=this.selectedItems.formFields[0];if(r&&this.formDesignerModule&&r&&r.formFieldAnnotationType){var l={value:r.value,fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,color:r.color,backgroundColor:r.backgroundColor,borderColor:r.borderColor,thickness:r.thickness,alignment:r.alignment,isReadonly:r.isReadonly,visibility:r.visibility,maxLength:r.maxLength,isRequired:r.isRequired,isPrint:r.isPrint,rotation:r.rotateAngle,tooltip:r.tooltip,options:r.options,isChecked:r.isChecked,isSelected:r.isSelected};this.fireFormFieldUnselectEvent("formFieldUnselect",l,r.pageIndex)}}this.drawing.select(e,t,i,n)},n.prototype.getPageTable=function(e){return this.drawing.getPageTable(e)},n.prototype.dragSelectedObjects=function(e,t,i,n,o){return this.drawing.dragSelectedObjects(e,t,i,n,o)},n.prototype.scaleSelectedItems=function(e,t,i){return this.drawing.scaleSelectedItems(e,t,i)},n.prototype.dragConnectorEnds=function(e,t,i,n,o,s,a){return this.drawing.dragConnectorEnds(e,t,i,n,o,null,a)},n.prototype.clearSelection=function(e){var t=this.selectedItems;t.annotations.length>0?this.selectedItems.annotations[0]:this.selectedItems.formFields[0];t.annotations.length>0?(t.offsetX=0,t.offsetY=0,t.width=0,t.height=0,t.rotateAngle=0,t.annotations=[],t.wrapper=null):t.formFields.length>0&&(t.offsetX=0,t.offsetY=0,t.width=0,t.height=0,t.rotateAngle=0,t.formFields=[],t.wrapper=null),this.drawing.clearSelectorLayer(e),this.viewerBase.isAnnotationSelect=!1,this.viewerBase.isFormFieldSelect=!1},n.prototype.add=function(e){return this.drawing.add(e)},n.prototype.remove=function(e){return this.drawing.remove(e)},n.prototype.copy=function(){return this.annotation?this.annotation.isShapeCopied=!0:this.formDesigner&&this.designerMode&&(this.formDesigner.isShapeCopied=!0),this.drawing.copy()},n.prototype.rotate=function(e,t){return this.drawing.rotate(this.selectedItems,e,null,t)},n.prototype.paste=function(e){var t;return this.viewerBase.activeElements.activePageID&&(t=this.viewerBase.activeElements.activePageID),this.drawing.paste(e,t||0)},n.prototype.refresh=function(){for(var e=0;e<this.annotations.length;e++){if(void 0!==this.zIndexTable.length){for(var t=0;t<this.zIndexTable.length;t++){for(var i=this.zIndexTable[t].objects,n=0;n<i.length;n++)i.splice(n,1);delete this.zIndexTable[t]}this.annotations[e]&&delete this.annotations[e],this.selectedItems.annotations&&this.selectedItems.annotations[e]&&delete this.selectedItems.annotations[e],this.zIndexTable=[],this.renderDrawing()}this.annotations&&0!==this.annotations.length&&(this.annotations.length=0,this.selectedItems.annotations.length=0)}},n.prototype.cut=function(){var e;return this.viewerBase.activeElements.activePageID&&(e=this.viewerBase.activeElements.activePageID),this.annotation?this.annotation.isShapeCopied=!0:this.formDesigner&&this.designerMode&&(this.formDesigner.isShapeCopied=!0),this.drawing.cut(e||0)},n.prototype.nodePropertyChange=function(e,t){this.drawing.nodePropertyChange(e,t)},n.prototype.checkBoundaryConstraints=function(e,t,i,n,o,s){return this.drawing.checkBoundaryConstraints(e,t,i,n,o,s)},ui([t.Property()],n.prototype,"serviceUrl",void 0),ui([t.Property(0)],n.prototype,"pageCount",void 0),ui([t.Property(!1)],n.prototype,"isDocumentEdited",void 0),ui([t.Property(0)],n.prototype,"currentPageNumber",void 0),ui([t.Property()],n.prototype,"documentPath",void 0),ui([t.Property(null)],n.prototype,"exportAnnotationFileName",void 0),ui([t.Property()],n.prototype,"downloadFileName",void 0),ui([t.Property("auto")],n.prototype,"height",void 0),ui([t.Property("auto")],n.prototype,"width",void 0),ui([t.Property(!0)],n.prototype,"enableToolbar",void 0),ui([t.Property(1)],n.prototype,"retryCount",void 0),ui([t.Property(!0)],n.prototype,"showNotificationDialog",void 0),ui([t.Property(!0)],n.prototype,"enableNavigationToolbar",void 0),ui([t.Property(!0)],n.prototype,"enableCommentPanel",void 0),ui([t.Property(!1)],n.prototype,"isCommandPanelOpen",void 0),ui([t.Property(!1)],n.prototype,"enableTextMarkupResizer",void 0),ui([t.Property(!1)],n.prototype,"enableMultiLineOverlap",void 0),ui([t.Property(!1)],n.prototype,"isValidFreeText",void 0),ui([t.Property(!1)],n.prototype,"isAnnotationToolbarOpen",void 0),ui([t.Property(!1)],n.prototype,"isAnnotationToolbarVisible",void 0),ui([t.Property(!1)],n.prototype,"isFormDesignerToolbarVisible",void 0),ui([t.Property(!1)],n.prototype,"enableMultiPageAnnotation",void 0),ui([t.Property(!0)],n.prototype,"enableDownload",void 0),ui([t.Property(!0)],n.prototype,"enablePrint",void 0),ui([t.Property(!0)],n.prototype,"enableThumbnail",void 0),ui([t.Property(!1)],n.prototype,"isThumbnailViewOpen",void 0),ui([t.Property(!1)],n.prototype,"isSignatureEditable",void 0),ui([t.Property(!0)],n.prototype,"enableBookmark",void 0),ui([t.Property(!1)],n.prototype,"enableBookmarkStyles",void 0),ui([t.Property(!0)],n.prototype,"enableHyperlink",void 0),ui([t.Property(!0)],n.prototype,"enableHandwrittenSignature",void 0),ui([t.Property(!0)],n.prototype,"enableInkAnnotation",void 0),ui([t.Property(!1)],n.prototype,"restrictZoomRequest",void 0),ui([t.Property("CurrentTab")],n.prototype,"hyperlinkOpenState",void 0),ui([t.Property("RightClick")],n.prototype,"contextMenuOption",void 0),ui([t.Property([])],n.prototype,"disableContextMenuItems",void 0),ui([t.Property({name:"",id:"",type:"",isReadOnly:!1,value:"",signatureType:[""],fontName:"",fontFamily:"Helvetica",fontSize:10,fontStyle:"None",color:"black",backgroundColor:"white",alignment:"Left",visibility:"visible",maxLength:0,isRequired:!1,isPrint:!1,tooltip:"",options:[],signatureIndicatorSettings:{opacity:1,backgroundColor:"orange",width:19,height:10,fontSize:10,text:null,color:"black"}})],n.prototype,"formFieldCollections",void 0),ui([t.Property(!0)],n.prototype,"enableNavigation",void 0),ui([t.Property(!0)],n.prototype,"enableAutoComplete",void 0),ui([t.Property(!0)],n.prototype,"enableMagnification",void 0),ui([t.Property(!1)],n.prototype,"enableShapeLabel",void 0),ui([t.Property(!0)],n.prototype,"enableImportAnnotationMeasurement",void 0),ui([t.Property(!0)],n.prototype,"enablePinchZoom",void 0),ui([t.Property(!0)],n.prototype,"enableTextSelection",void 0),ui([t.Property(!0)],n.prototype,"enableTextSearch",void 0),ui([t.Property(!0)],n.prototype,"enableAnnotation",void 0),ui([t.Property(!0)],n.prototype,"enableFormFields",void 0),ui([t.Property(!0)],n.prototype,"enableFormDesigner",void 0),ui([t.Property(!1)],n.prototype,"designerMode",void 0),ui([t.Property(!1)],n.prototype,"enableFormFieldsValidation",void 0),ui([t.Property(!1)],n.prototype,"isFormFieldDocument",void 0),ui([t.Property(!1)],n.prototype,"enableDesktopMode",void 0),ui([t.Property(!1)],n.prototype,"hideSaveSignature",void 0),ui([t.Property(!0)],n.prototype,"enableFreeText",void 0),ui([t.Property(!0)],n.prototype,"enableTextMarkupAnnotation",void 0),ui([t.Property(!0)],n.prototype,"enableShapeAnnotation",void 0),ui([t.Property(!0)],n.prototype,"enableMeasureAnnotation",void 0),ui([t.Property(!0)],n.prototype,"enableStampAnnotations",void 0),ui([t.Property(!0)],n.prototype,"enableStickyNotesAnnotation",void 0),ui([t.Property(!0)],n.prototype,"enableAnnotationToolbar",void 0),ui([t.Property(!0)],n.prototype,"enableFormDesignerToolbar",void 0),ui([t.Property(!1)],n.prototype,"isBookmarkPanelOpen",void 0),ui([t.Property(!1)],n.prototype,"isInitialFieldToolbarSelection",void 0),ui([t.Property("TextSelection")],n.prototype,"interactionMode",void 0),ui([t.Property("Default")],n.prototype,"zoomMode",void 0),ui([t.Property("Default")],n.prototype,"signatureFitMode",void 0),ui([t.Property("Default")],n.prototype,"printMode",void 0),ui([t.Property(0)],n.prototype,"zoomValue",void 0),ui([t.Property(!0)],n.prototype,"enableZoomOptimization",void 0),ui([t.Property(!1)],n.prototype,"isExtractText",void 0),ui([t.Property(!1)],n.prototype,"isMaintainSelection",void 0),ui([t.Property("M/d/yyyy h:mm:ss a")],n.prototype,"dateTimeFormat",void 0),ui([t.Property({showTooltip:!0,toolbarItems:["OpenOption","UndoRedoTool","PageNavigationTool","MagnificationTool","PanTool","SelectionTool","CommentTool","SubmitForm","AnnotationEditTool","FormDesignerEditTool","FreeTextAnnotationOption","InkAnnotationOption","ShapeAnnotationOption","StampAnnotation","SignatureOption","SearchOption","PrintOption","DownloadOption"],annotationToolbarItems:["HighlightTool","UnderlineTool","StrikethroughTool","ColorEditTool","OpacityEditTool","AnnotationDeleteTool","StampAnnotationTool","HandWrittenSignatureTool","InkAnnotationTool","ShapeTool","CalibrateTool","StrokeColorEditTool","ThicknessEditTool","FreeTextAnnotationTool","FontFamilyAnnotationTool","FontSizeAnnotationTool","FontStylesAnnotationTool","FontAlignAnnotationTool","FontColorAnnotationTool","CommentPanelTool"],formDesignerToolbarItems:["TextboxTool","PasswordTool","CheckBoxTool","RadioButtonTool","DropdownTool","ListboxTool","DrawSignatureTool","DeleteTool"]})],n.prototype,"toolbarSettings",void 0),ui([t.Property({ajaxHeaders:[],withCredentials:!1})],n.prototype,"ajaxRequestSettings",void 0),ui([t.Property({customStampName:"",customStampImageSource:""})],n.prototype,"customStamp",void 0),ui([t.Property({load:"Load",renderPages:"RenderPdfPages",unload:"Unload",download:"Download",renderThumbnail:"RenderThumbnailImages",print:"PrintImages",renderComments:"RenderAnnotationComments",importAnnotations:"ImportAnnotations",exportAnnotations:"ExportAnnotations",importFormFields:"ImportFormFields",exportFormFields:"ExportFormFields",renderTexts:"RenderPdfTexts"})],n.prototype,"serverActionSettings",void 0),ui([t.Property({signatureIndicatorSettings:{opacity:1,backgroundColor:"orange",width:19,height:10,fontSize:10,text:null,color:"black"}})],n.prototype,"signatureFieldSettings",void 0),ui([t.Property({signatureIndicatorSettings:{opacity:1,backgroundColor:"orange",width:19,height:10,fontSize:10,text:null,color:"black"}})],n.prototype,"initialFieldSettings",void 0),ui([t.Property({opacity:1,color:"#FFDF56",author:"Guest",annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges},isLock:!1,enableMultiPageAnnotation:!1,enableTextMarkupResizer:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"highlightSettings",void 0),ui([t.Property({opacity:1,color:"#ff0000",author:"Guest",annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges},isLock:!1,enableMultiPageAnnotation:!1,enableTextMarkupResizer:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"strikethroughSettings",void 0),ui([t.Property({opacity:1,color:"#00ff00",author:"Guest",annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges},isLock:!1,enableMultiPageAnnotation:!1,enableTextMarkupResizer:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"underlineSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,borderDashArray:0,lineHeadStartStyle:"None",lineHeadEndStyle:"None",annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"lineSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,borderDashArray:0,lineHeadStartStyle:"Closed",lineHeadEndStyle:"Closed",annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"arrowSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"rectangleSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",borderColor:"#ff0000",fontColor:"#000",fontSize:16,labelHeight:24.6,labelMaxWidth:151,labelContent:"Label"})],n.prototype,"shapeLabelSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"circleSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"polygonSettings",void 0),ui([t.Property({opacity:1,author:"Guest",annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,dynamicStamps:[e.DynamicStampItem.Revised,e.DynamicStampItem.Reviewed,e.DynamicStampItem.Received,e.DynamicStampItem.Confidential,e.DynamicStampItem.Approved,e.DynamicStampItem.NotApproved],signStamps:[e.SignStampItem.Witness,e.SignStampItem.InitialHere,e.SignStampItem.SignHere,e.SignStampItem.Accepted,e.SignStampItem.Rejected],standardBusinessStamps:[e.StandardBusinessStampItem.Approved,e.StandardBusinessStampItem.NotApproved,e.StandardBusinessStampItem.Draft,e.StandardBusinessStampItem.Final,e.StandardBusinessStampItem.Completed,e.StandardBusinessStampItem.Confidential,e.StandardBusinessStampItem.ForPublicRelease,e.StandardBusinessStampItem.NotForPublicRelease,e.StandardBusinessStampItem.ForComment,e.StandardBusinessStampItem.Void,e.StandardBusinessStampItem.PreliminaryResults,e.StandardBusinessStampItem.InformationOnly],allowedInteractions:["None"],isPrint:!0})],n.prototype,"stampSettings",void 0),ui([t.Property({opacity:1,author:"Guest",width:0,height:0,left:0,top:0,minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,enableCustomStamp:!0,allowedInteractions:["None"],isPrint:!0})],n.prototype,"customStampSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,borderDashArray:0,lineHeadStartStyle:"Closed",lineHeadEndStyle:"Closed",annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,leaderLength:40,resizeCursorType:e.CursorType.move,allowedInteractions:["None"],isPrint:!0})],n.prototype,"distanceSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,borderDashArray:0,lineHeadStartStyle:"Open",lineHeadEndStyle:"Open",minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},allowedInteractions:["None"],isPrint:!0})],n.prototype,"perimeterSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},allowedInteractions:["None"],isPrint:!0})],n.prototype,"areaSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"radiusSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",strokeColor:"#ff0000",author:"Guest",thickness:1,minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},allowedInteractions:["None"],isPrint:!0})],n.prototype,"volumeSettings",void 0),ui([t.Property({author:"Guest",opacity:1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},isLock:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"stickyNotesSettings",void 0),ui([t.Property({opacity:1,fillColor:"#ffffff00",borderColor:"#ffffff00",author:"Guest",borderWidth:1,width:151,fontSize:16,height:24.6,fontColor:"#000",fontFamily:"Helvetica",defaultText:"Type Here",textAlignment:"Left",fontStyle:e.FontStyle.None,allowTextOnly:!1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,allowedInteractions:["None"],isPrint:!0,isReadonly:!1})],n.prototype,"freeTextSettings",void 0),ui([t.Property({conversionUnit:"in",displayUnit:"in",scaleRatio:1,depth:96})],n.prototype,"measurementSettings",void 0),ui([t.Property({selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null})],n.prototype,"annotationSelectorSettings",void 0),ui([t.Property({searchHighlightColor:"#fdd835",searchColor:"#8b4c12"})],n.prototype,"textSearchColorSettings",void 0),ui([t.Property({signatureItem:["Signature","Initial"],saveSignatureLimit:1,saveInitialLimit:1,opacity:1,strokeColor:"#000000",width:150,height:100,thickness:1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},allowedInteractions:["None"]})],n.prototype,"handWrittenSignatureSettings",void 0),ui([t.Property({author:"Guest",opacity:1,strokeColor:"#ff0000",thickness:1,annotationSelectorSettings:{selectionBorderColor:"",resizerBorderColor:"black",resizerFillColor:"#FF4081",resizerSize:8,selectionBorderThickness:1,resizerShape:"Square",selectorLineDashArray:[],resizerLocation:e.AnnotationResizerLocation.Corners|e.AnnotationResizerLocation.Edges,resizerCursorType:null},isLock:!1,allowedInteractions:["None"],isPrint:!0})],n.prototype,"inkAnnotationSettings",void 0),ui([t.Property({author:"Guest",minHeight:0,minWidth:0,maxWidth:0,maxHeight:0,isLock:!1,skipPrint:!1,skipDownload:!1,allowedInteractions:["None"]})],n.prototype,"annotationSettings",void 0),ui([t.Property({enableTileRendering:!0,x:0,y:0})],n.prototype,"tileRenderingSettings",void 0),ui([t.Property({delayPageRequestTimeOnScroll:100})],n.prototype,"scrollSettings",void 0),ui([t.Property({name:"",value:"",fontFamily:"Helvetica",fontSize:10,fontStyle:"None",color:"black",backgroundColor:"white",alignment:"Left",isReadOnly:!1,visibility:"visible",maxLength:0,isRequired:!1,isPrint:!1,tooltip:""})],n.prototype,"textFieldSettings",void 0),ui([t.Property({name:"",value:"",fontFamily:"Helvetica",fontSize:10,fontStyle:"None",color:"black",backgroundColor:"white",alignment:"Left",isReadOnly:!1,visibility:"visible",maxLength:0,isRequired:!1,isPrint:!1,tooltip:""})],n.prototype,"passwordFieldSettings",void 0),ui([t.Property({name:"",isChecked:!1,backgroundColor:"white",isReadOnly:!1,visibility:"visible",isPrint:!1,tooltip:""})],n.prototype,"checkBoxFieldSettings",void 0),ui([t.Property({name:"",isSelected:!1,backgroundColor:"white",isReadOnly:!1,visibility:"visible",isPrint:!1,tooltip:""})],n.prototype,"radioButtonFieldSettings",void 0),ui([t.Property({name:"",value:"",fontFamily:"Helvetica",fontSize:10,fontStyle:"None",color:"black",backgroundColor:"white",alignment:"Left",isReadOnly:!1,visibility:"visible",isRequired:!1,isPrint:!1,tooltip:"",options:[]})],n.prototype,"DropdownFieldSettings",void 0),ui([t.Property({name:"",value:"",fontFamily:"Helvetica",fontSize:10,fontStyle:"None",color:"black",backgroundColor:"white",alignment:"Left",isReadOnly:!1,visibility:"visible",isRequired:!1,isPrint:!1,tooltip:"",options:[]})],n.prototype,"listBoxFieldSettings",void 0),ui([t.Property({contextMenuAction:"RightClick",contextMenuItems:[e.ContextMenuItem.Comment,e.ContextMenuItem.Copy,e.ContextMenuItem.Cut,e.ContextMenuItem.Delete,e.ContextMenuItem.Highlight,e.ContextMenuItem.Paste,e.ContextMenuItem.Properties,e.ContextMenuItem.ScaleRatio,e.ContextMenuItem.Strikethrough,e.ContextMenuItem.Underline]})],n.prototype,"contextMenuSettings",void 0),ui([t.Complex({},Ke)],n.prototype,"selectedItems",void 0),ui([t.Event()],n.prototype,"created",void 0),ui([t.Event()],n.prototype,"documentLoad",void 0),ui([t.Event()],n.prototype,"documentUnload",void 0),ui([t.Event()],n.prototype,"documentLoadFailed",void 0),ui([t.Event()],n.prototype,"ajaxRequestFailed",void 0),ui([t.Event()],n.prototype,"ajaxRequestSuccess",void 0),ui([t.Event()],n.prototype,"validateFormFields",void 0),ui([t.Event()],n.prototype,"pageClick",void 0),ui([t.Event()],n.prototype,"pageChange",void 0),ui([t.Event()],n.prototype,"hyperlinkClick",void 0),ui([t.Event()],n.prototype,"hyperlinkMouseOver",void 0),ui([t.Event()],n.prototype,"zoomChange",void 0),ui([t.Event()],n.prototype,"annotationAdd",void 0),ui([t.Event()],n.prototype,"annotationRemove",void 0),ui([t.Event()],n.prototype,"annotationPropertiesChange",void 0),ui([t.Event()],n.prototype,"annotationResize",void 0),ui([t.Event()],n.prototype,"addSignature",void 0),ui([t.Event()],n.prototype,"removeSignature",void 0),ui([t.Event()],n.prototype,"moveSignature",void 0),ui([t.Event()],n.prototype,"signaturePropertiesChange",void 0),ui([t.Event()],n.prototype,"resizeSignature",void 0),ui([t.Event()],n.prototype,"signatureSelect",void 0),ui([t.Event()],n.prototype,"annotationSelect",void 0),ui([t.Event()],n.prototype,"annotationUnSelect",void 0),ui([t.Event()],n.prototype,"annotationDoubleClick",void 0),ui([t.Event()],n.prototype,"annotationMove",void 0),ui([t.Event()],n.prototype,"annotationMouseover",void 0),ui([t.Event()],n.prototype,"annotationMouseLeave",void 0),ui([t.Event()],n.prototype,"pageMouseover",void 0),ui([t.Event()],n.prototype,"importStart",void 0),ui([t.Event()],n.prototype,"exportStart",void 0),ui([t.Event()],n.prototype,"importSuccess",void 0),ui([t.Event()],n.prototype,"exportSuccess",void 0),ui([t.Event()],n.prototype,"importFailed",void 0),ui([t.Event()],n.prototype,"exportFailed",void 0),ui([t.Event()],n.prototype,"extractTextCompleted",void 0),ui([t.Event()],n.prototype,"thumbnailClick",void 0),ui([t.Event()],n.prototype,"bookmarkClick",void 0),ui([t.Event()],n.prototype,"textSelectionStart",void 0),ui([t.Event()],n.prototype,"textSelectionEnd",void 0),ui([t.Event()],n.prototype,"downloadStart",void 0),ui([t.Event()],n.prototype,"buttonFieldClick",void 0),ui([t.Event()],n.prototype,"formFieldClick",void 0),ui([t.Event()],n.prototype,"downloadEnd",void 0),ui([t.Event()],n.prototype,"printStart",void 0),ui([t.Event()],n.prototype,"printEnd",void 0),ui([t.Event()],n.prototype,"textSearchStart",void 0),ui([t.Event()],n.prototype,"textSearchComplete",void 0),ui([t.Event()],n.prototype,"textSearchHighlight",void 0),ui([t.Event()],n.prototype,"ajaxRequestInitiate",void 0),ui([t.Event()],n.prototype,"commentAdd",void 0),ui([t.Event()],n.prototype,"commentEdit",void 0),ui([t.Event()],n.prototype,"commentDelete",void 0),ui([t.Event()],n.prototype,"commentSelect",void 0),ui([t.Event()],n.prototype,"commentStatusChanged",void 0),ui([t.Event()],n.prototype,"beforeAddFreeText",void 0),ui([t.Event()],n.prototype,"formFieldFocusOut",void 0),ui([t.Event()],n.prototype,"formFieldAdd",void 0),ui([t.Event()],n.prototype,"formFieldRemove",void 0),ui([t.Event()],n.prototype,"formFieldPropertiesChange",void 0),ui([t.Event()],n.prototype,"formFieldMouseLeave",void 0),ui([t.Event()],n.prototype,"formFieldMouseover",void 0),ui([t.Event()],n.prototype,"formFieldMove",void 0),ui([t.Event()],n.prototype,"formFieldResize",void 0),ui([t.Event()],n.prototype,"formFieldSelect",void 0),ui([t.Event()],n.prototype,"formFieldUnselect",void 0),ui([t.Collection([],Je)],n.prototype,"annotations",void 0),ui([t.Collection([],He)],n.prototype,"formFields",void 0),ui([t.Property()],n.prototype,"drawingObject",void 0),n=ui([t.NotifyPropertyChanges],n)}(t.Component),ln=function(){function e(e,t){var i=this;this.childNavigateCount=0,this.bookmarkClick=function(e){if(e.event.target.classList.contains("e-icons"))i.childNavigateCount++;else{var t=e.data.Id;i.childNavigateCount=0,i.pdfViewerBase.navigationPane.goBackToToolbar();var n=i.treeObj.getTreeData(e.node);i.navigateToBookmark(t,e.node.textContent,n[0].FileName)}return!1},this.nodeClick=function(e){i.setHeight(e.node);var t=Number(e.nodeData.id),n=i.treeObj.getTreeData(e.node);if(i.navigateToBookmark(t,e.node.textContent,n[0].FileName),i.pdfViewer.annotationModule&&i.pdfViewer.annotationModule.inkAnnotationModule){var o=parseInt(i.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);i.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(o)}return!1},this.bookmarkPanelBeforeOpen=function(e){if(i.pdfViewer.enableBookmarkStyles)for(var t=0;t<i.bookmarkStyles.length;t++)if(e.text.trim()===i.bookmarkStyles[t].Text.trim()){var n=e.node.lastElementChild;if(n){for(var o=i.bookmarkStyles[t].FontStyle.split(","),s=0;s<o.length;s++)switch(o[s].trim()){case"Italic":n.style.fontStyle="italic";break;case"Bold":n.style.fontWeight="Bold"}var a=n.getElementsByClassName("e-pv-bookmark-Title")[0];a?a.style.color=i.bookmarkStyles[t].Color:n.children[0].style.color=i.bookmarkStyles[t].Color}break}},this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.createRequestForBookmarks=function(){var e=this,i={hashId:this.pdfViewerBase.hashId,action:"Bookmarks",elementId:this.pdfViewer.element.id,uniqueId:this.pdfViewerBase.documentId};this.pdfViewerBase.jsonDocumentId&&(i.documentId=this.pdfViewerBase.jsonDocumentId),this.pdfViewer.enableBookmarkStyles&&(i.bookmarkStyles=this.pdfViewer.enableBookmarkStyles),this.bookmarkRequestHandler=new ti(this.pdfViewer),this.bookmarkRequestHandler.url=e.pdfViewer.serviceUrl+"/Bookmarks",this.bookmarkRequestHandler.responseType="json",this.bookmarkRequestHandler.send(i),this.bookmarkRequestHandler.onSuccess=function(i){e.pdfViewerBase.navigationPane&&e.pdfViewerBase.navigationPane.disableBookmarkButton();var n=i.data;if(n){if("object"!=typeof n)try{n=JSON.parse(n)}catch(t){e.pdfViewerBase.onControlError(500,n,"Bookmarks"),n=null}if(n&&n.uniqueId===e.pdfViewerBase.documentId&&(e.pdfViewer.fireAjaxRequestSuccess("Bookmarks",n),e.bookmarks={bookMark:n.Bookmarks},e.bookmarkStyles=n.Bookmarkstyles,e.bookmarksDestination={bookMarkDestination:n.BookmarksDestination},t.isBlazor())){var o={bookmarks:e.bookmarks,bookmarksDestination:e.bookmarksDestination};e.pdfViewer&&e.pdfViewer._dotnetInstance&&e.pdfViewer._dotnetInstance.invokeMethodAsync("UpdateBookmarkCollection",o)}}e.pdfViewerBase.navigationPane&&(null==e.bookmarks?e.pdfViewerBase.navigationPane.disableBookmarkButton():(e.pdfViewerBase.navigationPane.enableBookmarkButton(),e.isBookmarkViewDiv=!1,e.pdfViewer.isBookmarkPanelOpen&&e.pdfViewerBase.navigationPane.openBookmarkcontentInitially()))},this.bookmarkRequestHandler.onFailure=function(t){e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,"Bookmarks")},this.bookmarkRequestHandler.onError=function(t){e.pdfViewerBase.openNotificationPopup(),e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,"Bookmarks")}},e.prototype.renderBookmarkcontent=function(){var e=this;if(!this.isBookmarkViewDiv){var i=t.isBlazor();this.bookmarkView=i?this.pdfViewer.element.querySelector(".e-pv-bookmark-view"):t.createElement("div",{id:this.pdfViewer.element.id+"_bookmark_view",className:"e-pv-bookmark-view"}),this.pdfViewerBase.navigationPane.sideBarContent.appendChild(this.bookmarkView);var n=t.createElement("div",{id:this.pdfViewer.element.id+"_bookmark_iconview",className:"e-pv-bookmark-icon-view"});if(this.pdfViewer.enableRtl){o=t.createElement("span",{id:this.pdfViewer.element.id+"_bookmark_icon",className:"e-pv-bookmark-icon e-pv-icon e-right"});n.appendChild(o)}else{var o=t.createElement("span",{id:this.pdfViewer.element.id+"_bookmark_icon",className:"e-pv-bookmark-icon e-pv-icon"});n.appendChild(o)}var s=t.createElement("div",{id:this.pdfViewer.element.id+"_bookmark_Title",className:"e-pv-bookmark-Title"});this.pdfViewer.enableRtl?s.style.paddingRight="26px":s.style.paddingLeft="40px",s.innerText="${Title}",n.appendChild(s),i||(this.treeObj=new r.TreeView({fields:{dataSource:this.bookmarks.bookMark,id:"Id",text:"Title",child:"Child",hasChildren:"HasChild"},nodeTemplate:n.outerHTML,nodeSelected:this.nodeClick.bind(this),drawNode:this.bookmarkPanelBeforeOpen.bind(this)}),this.treeObj.isStringTemplate=!0,this.pdfViewer.enableRtl&&(this.treeObj.enableRtl=!0),this.treeObj.appendTo(this.bookmarkView));for(var a=["mouseover","keydown"],l=0;l<a.length;l++)this.bookmarkView.addEventListener(a[l],function(t){e.setHeight(t.target)});this.isBookmarkViewDiv=!0}this.bookmarkView.style.display="block"},e.prototype.renderBookmarkContentMobile=function(){null!=this.bookmarkView&&this.bookmarkView.remove(),this.bookmarkView=t.createElement("div",{id:this.pdfViewer.element.id+"_bookmark_view",className:"e-pv-bookmark-view"}),this.pdfViewerBase.getElement("_bookmarks_container").appendChild(this.bookmarkView),this.bookmarkList=new p.ListView({dataSource:this.bookmarks.bookMark,fields:{id:"Id",text:"Title",child:"Child"},showHeader:!1,select:this.bookmarkClick.bind(this)}),this.bookmarkList.isStringTemplate=!0,this.pdfViewer.enableRtl&&(this.bookmarkList.enableRtl=!0),this.bookmarkList.appendTo(this.bookmarkView)},e.prototype.setHeight=function(e){this.treeObj&&this.treeObj.fullRowSelect&&e.classList&&(e.classList.contains("e-treeview")?e=e.querySelector(".e-node-focus").querySelector(".e-fullrow"):e.classList.contains("e-list-parent")?e=e.querySelector(".e-fullrow"):"e-fullrow"!==e.classList.value&&(e.closest&&e.closest(".e-list-item")?e=e.closest(".e-list-item").querySelector(".e-fullrow"):e.classList.contains("e-list-item")?e=e.querySelector(".e-fullrow"):e.classList.contains("e-icons")&&e.classList.contains("interaction")&&e.parentElement.parentElement.classList.contains("e-list-item")&&(e=e.parentElement.parentElement.querySelector(".e-fullrow"))),e.nextElementSibling&&(e.style.height=e.nextElementSibling.offsetHeight+"px"))},e.prototype.setBookmarkContentHeight=function(){if(this.treeObj){var e=this.treeObj.element;this.treeObj.fullRowSelect&&(e.classList.contains("e-treeview")&&(e=e.querySelector(".e-node-focus").querySelector(".e-fullrow")),e.nextElementSibling&&(e.style.height=e.nextElementSibling.offsetHeight+"px"))}},e.prototype.navigateToBookmark=function(e,t,i){var n=this.bookmarksDestination.bookMarkDestination[e].PageIndex,o=this.bookmarksDestination.bookMarkDestination[e].Y;-1!==n&&this.goToBookmark(n,o),this.pdfViewer.fireBookmarkClick(-1!==n?n+1:n,o,t,i)},e.prototype.getBookmarks=function(){if(this.bookmarks&&this.bookmarksDestination)return{bookmarks:this.bookmarks,bookmarksDestination:this.bookmarksDestination}},e.prototype.goToBookmark=function(e,i){var n,o=this,s=this.pdfViewerBase.pageSize[e].height,a=(n=0===i?this.pdfViewerBase.pageSize[e].top*this.pdfViewerBase.getZoomFactor():this.pdfViewerBase.pageSize[e].top*this.pdfViewerBase.getZoomFactor()+(s-i)*this.pdfViewerBase.getZoomFactor()).toString();return o.pdfViewerBase.viewerContainer.scrollTop=parseInt(a),t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.pdfViewerBase.mobileScrollerContainer.style.display="",this.pdfViewerBase.updateMobileScrollerPosition()),o.pdfViewerBase.focusViewerContainer(),!1},e.prototype.clear=function(){if(this.pdfViewerBase.navigationPane&&(this.pdfViewerBase.navigationPane.disableBookmarkButton(),this.pdfViewerBase.navigationPane.updateViewerContainerOnClose()),this.bookmarks&&(this.bookmarks.bookMark=[],this.bookmarks=null),this.bookmarksDestination&&(this.bookmarksDestination.bookMarkDestination=[]),null!=this.bookmarkView)for(null!==this.bookmarkView.parentElement&&this.bookmarkView.parentElement.removeChild(this.bookmarkView);this.bookmarkView.hasChildNodes();)this.bookmarkView.removeChild(this.bookmarkView.lastChild)},e.prototype.destroy=function(){this.clear()},e.prototype.getModuleName=function(){return"BookmarkView"},e}(),dn=function(){function e(e,t){var i=this;this.isTextSelection=!1,this.selectionStartPage=null,this.isBackwardPropagatedSelection=!1,this.contextMenuHeight=144,this.selectionRangeArray=[],this.selectionAnchorTouch=null,this.selectionFocusTouch=null,this.scrollMoveTimer=0,this.isMouseLeaveSelection=!1,this.isTouchSelection=!1,this.previousScrollDifference=0,this.topStoreLeft=null,this.topStoreRight=null,this.isTextSearched=!1,this.isSelectionStartTriggered=!1,this.onLeftTouchSelectElementTouchStart=function(e){i.initiateSelectionByTouch()},this.onRightTouchSelectElementTouchStart=function(e){i.initiateSelectionByTouch()},this.onLeftTouchSelectElementTouchEnd=function(e){i.terminateSelectionByTouch(e)},this.onRightTouchSelectElementTouchEnd=function(e){i.terminateSelectionByTouch(e)},this.onLeftTouchSelectElementTouchMove=function(e){var t;e.preventDefault(),e.target.style.zIndex="0";var n=i.dropDivElementRight,o=i.isTouchedWithinContainer(e);if(n&&o){var s=n.getBoundingClientRect(),a=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY;if(e.target.style.zIndex="1000",t=i.getNodeElement(void 0,a,r,e,t)){var l=Math.sqrt((r-s.top)*(r-s.top)+(a-s.left)*(a-s.left)),d=i.isCloserTouchScroll(l),u=!1;if(r<=s.top?(i.dropElementLeft.style.transform="rotate(0deg)",i.dropElementRight.style.transform="rotate(-90deg)",u=i.selectTextByTouch(t.parentElement,a,r,!1,"left",d)):(i.dropElementLeft.style.transform="rotate(-90deg)",i.dropElementRight.style.transform="rotate(0deg)",u=i.selectTextByTouch(t.parentElement,a,r,!0,"left",d)),u){var M=i.dropDivElementLeft.getBoundingClientRect(),p=i.pdfViewerBase.pageSize[i.pdfViewerBase.currentPageNumber-1].top,h=i.getClientValueTop(r,i.pdfViewerBase.currentPageNumber-1),L=a-i.pdfViewerBase.getElement("_pageDiv_"+(i.pdfViewerBase.currentPageNumber-1)).getBoundingClientRect().left;i.dropDivElementLeft.style.top=p*i.pdfViewerBase.getZoomFactor()+h+"px",i.topStoreLeft={pageTop:p,topClientValue:i.getMagnifiedValue(h),pageNumber:i.pdfViewerBase.currentPageNumber-1,left:i.getMagnifiedValue(L),isHeightNeeded:!1},i.dropDivElementLeft.style.left=a-i.pdfViewerBase.viewerContainer.getBoundingClientRect().left-M.width/2+"px",i.previousScrollDifference=l}}}},this.onRightTouchSelectElementTouchMove=function(e){var t;e.preventDefault(),e.target.style.zIndex="0";var n=i.dropDivElementLeft,o=i.isTouchedWithinContainer(e);if(n&&o){var s=n.getBoundingClientRect(),a=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY;if(e.target.style.zIndex="1000",t=i.getNodeElement(void 0,a,r,e,t)){var l=Math.sqrt((r-s.top)*(r-s.top)+(a-s.left)*(a-s.left)),d=i.isCloserTouchScroll(l),u=!1;if(r>=s.top?(i.dropElementRight.style.transform="rotate(-90deg)",i.dropElementLeft.style.transform="rotate(0deg)",u=i.selectTextByTouch(t.parentElement,a,r,!0,"right",d)):(i.dropElementRight.style.transform="rotate(0deg)",i.dropElementLeft.style.transform="rotate(-90deg)",u=i.selectTextByTouch(t.parentElement,a,r,!1,"right",d)),u){var M=i.pdfViewerBase.pageSize[i.pdfViewerBase.currentPageNumber-1].top,p=i.getClientValueTop(r,i.pdfViewerBase.currentPageNumber-1),h=i.dropDivElementRight.getBoundingClientRect();i.dropDivElementRight.style.top=M*i.pdfViewerBase.getZoomFactor()+p+"px";var L=a-i.pdfViewerBase.getElement("_pageDiv_"+(i.pdfViewerBase.currentPageNumber-1)).getBoundingClientRect().left;i.topStoreRight={pageTop:M,topClientValue:i.getMagnifiedValue(p),pageNumber:i.pdfViewerBase.currentPageNumber-1,left:i.getMagnifiedValue(L),isHeightNeeded:!1},i.dropDivElementRight.style.left=a-i.pdfViewerBase.viewerContainer.getBoundingClientRect().left-h.width/2+"px",i.previousScrollDifference=l}}}},this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.textSelectionOnMouseMove=function(e,t,i,n){var o=e;if(this.isTextSearched=!0,o.nodeType===o.TEXT_NODE){this.isSelectionStartTriggered||this.pdfViewerBase.getTextMarkupAnnotationMode()||(this.pdfViewer.fireTextSelectionStart(this.pdfViewerBase.currentPageNumber),this.isSelectionStartTriggered=!0),this.isBackwardPropagatedSelection=!1;var s=o.ownerDocument.createRange(),a=window.getSelection();if(null!==a.anchorNode){var r=a.anchorNode.compareDocumentPosition(a.focusNode);(!r&&a.anchorOffset>a.focusOffset||r===Node.DOCUMENT_POSITION_PRECEDING)&&(this.isBackwardPropagatedSelection=!0)}s.selectNodeContents(o);for(var l=0,d=s.endOffset;l<d;){s.setStart(o,l),s.setEnd(o,l+1);var u=(C=s.getBoundingClientRect()).right;n&&(u=parseInt(C.right.toString())),C.left<=t&&u>=t&&parseInt(C.top.toString())<=i&&C.bottom>=i&&(null!==a.anchorNode&&a.anchorNode.parentNode.classList.contains("e-pv-text")&&s.setStart(a.anchorNode,a.anchorOffset),a.removeAllRanges(),a.addRange(s),this.isTextSelection||(this.selectionStartPage=this.pdfViewerBase.currentPageNumber-1),this.isTextSelection=!0,!!document.documentMode||(this.isBackwardPropagatedSelection?a.extend(o,l):n?a.extend(o,l):a.extend(o,l+1)),s.detach()),l+=1}var M=this.pdfViewer.annotationModule;if(M&&M.textMarkupAnnotationModule&&M.textMarkupAnnotationModule.isEnableTextMarkupResizer(M.textMarkupAnnotationModule.currentTextMarkupAddMode)){var p=document.getElementById(this.pdfViewer.element.id+"_droplet_left");if(this.pdfViewerBase.isSelection&&a&&a.rangeCount>0){var h=a.getRangeAt(0).getBoundingClientRect(),L=h.left,w=h.top;this.pdfViewer.annotation.textMarkupAnnotationModule.updateLeftposition(L,w),this.pdfViewerBase.isSelection=!1}else p&&"none"===p.style.display&&this.pdfViewer.annotation.textMarkupAnnotationModule.updateLeftposition(t,i);this.pdfViewer.annotation.textMarkupAnnotationModule.updatePosition(t,i)}}else for(var c=0;c<o.childNodes.length;c++)if(o.childNodes[c].nodeType===o.TEXT_NODE){var C=(s=this.getSelectionRange(c,o)).getBoundingClientRect();C.left<=t&&C.right>=parseInt(t.toString())&&parseInt(C.top.toString())<=i&&C.bottom>=i?(s.detach(),this.textSelectionOnMouseMove(o.childNodes[c],t,i,n)):s.detach()}},e.prototype.textSelectionOnDrag=function(e,t,i,n){var o=e;if(this.isTextSearched=!0,o.nodeType===o.TEXT_NODE){this.isBackwardPropagatedSelection=!1;var s=o.ownerDocument.createRange(),a=window.getSelection();if(null!==a.anchorNode){var r=a.anchorNode.compareDocumentPosition(a.focusNode);(!r&&a.anchorOffset>a.focusOffset||r===Node.DOCUMENT_POSITION_PRECEDING)&&(this.isBackwardPropagatedSelection=!0)}s.selectNodeContents(o);for(var l=0,d=s.endOffset;l<d;){if(s.setStart(o,l),s.setEnd(o,l+1),(L=s.getBoundingClientRect()).left<=t&&L.right>=t&&parseInt(L.top.toString())<=i&&L.bottom>=i)return n?(null!==a.anchorNode&&a.anchorNode.parentNode.classList.contains("e-pv-text")&&s.setStart(a.anchorNode,a.anchorOffset),a.removeAllRanges(),a.addRange(s),a.extend(o,l)):a.focusNode&&(s.setEnd(a.focusNode,a.focusOffset),a.removeAllRanges(),a.addRange(s)),this.isTextSelection||(this.selectionStartPage=this.pdfViewerBase.currentPageNumber-1),this.isTextSelection=!0,s.detach(),!0;l+=1}if(this.pdfViewerBase.isSelection){var u=a.getRangeAt(0).getBoundingClientRect(),M=u.left,p=u.top;this.pdfViewer.annotation.textMarkupAnnotationModule.updateLeftposition(M,p),this.pdfViewerBase.isSelection=!1}this.pdfViewer.annotation.textMarkupAnnotationModule.updatePosition(t,i)}else for(var h=0;h<o.childNodes.length;h++)if(o.childNodes[h].nodeType===o.TEXT_NODE){var L=(s=this.getSelectionRange(h,o)).getBoundingClientRect();L.left<=t&&L.right>=t&&parseInt(L.top.toString())<=i&&L.bottom>=i?(s.detach(),this.textSelectionOnDrag(o.childNodes[h],t,i,n)):s.detach()}return null},e.prototype.selectTextRegion=function(e,t){for(var i=null,n=e-1,o=0;o<t.length;o++){var s=t[o],a=(s.left?s.left:s.Left)*this.pdfViewerBase.getZoomFactor(),r=(s.top?s.top:s.Top)*this.pdfViewerBase.getZoomFactor(),l=(s.width?s.width:s.Width)*this.pdfViewerBase.getZoomFactor(),d=(s.height?s.height:s.Height,this.pdfViewerBase.getElement("_textLayer_"+n));if(d){for(var u=d.childNodes,M=0;M<u.length;M++)if(u[M]){var p=u[M].getBoundingClientRect(),h=this.getClientValueTop(p.top,n),L=p.left-this.pdfViewerBase.getElement("_pageDiv_"+n).getBoundingClientRect().left,w=L+p.width,c=parseInt(u[M].style.left),C=parseInt(u[M].style.top),g=this.checkLeftBounds(L,c,w,a),m=this.checkTopBounds(h,C,r);if(g&&m){i=u[M];break}}if(null!=i){var f=this.pdfViewerBase.getElement("_textLayer_"+n).getBoundingClientRect();this.textSelectionOnMouseMove(i,a+f.left,r+f.top,!1),t.length-1===o&&this.textSelectionOnMouseMove(i,a+f.left+l,r+f.top,!1)}}}},e.prototype.checkLeftBounds=function(e,t,i,n){var o=!1;return(e===parseInt(n.toString())||parseInt(e.toString())===parseInt(n.toString())||e+1===parseInt(n.toString())||e-1===parseInt(n.toString())||t===parseInt(n.toString())||t===n||i>=n&&e<=n)&&(o=!0),o},e.prototype.checkTopBounds=function(e,t,i){var n=!1;return e!==parseInt(i.toString())&&parseInt(e.toString())!==parseInt(i.toString())&&parseInt((e+1).toString())!==parseInt(i.toString())&&parseInt((e-1).toString())!==parseInt(i.toString())&&t!==parseInt(i.toString())&&t!==i||(n=!0),n},e.prototype.textSelectionOnMouseLeave=function(e){var t=this;e.preventDefault();var i=this.pdfViewerBase.viewerContainer.offsetTop;this.pdfViewer.magnificationModule&&"fitToPage"===this.pdfViewer.magnificationModule.fitType||(e.clientY>i?this.scrollMoveTimer=setInterval(function(){t.scrollForwardOnSelection()},500):this.scrollMoveTimer=setInterval(function(){t.scrollBackwardOnSelection()},500))},e.prototype.scrollForwardOnSelection=function(){this.isMouseLeaveSelection=!0,this.pdfViewerBase.viewerContainer.scrollTop=this.pdfViewerBase.viewerContainer.scrollTop+200,this.stichSelectionOnScroll(this.pdfViewerBase.currentPageNumber-1)},e.prototype.scrollBackwardOnSelection=function(){this.isMouseLeaveSelection=!0,this.pdfViewerBase.viewerContainer.scrollTop=this.pdfViewerBase.viewerContainer.scrollTop-200,this.stichSelectionOnScroll(this.pdfViewerBase.currentPageNumber-1)},e.prototype.clear=function(){this.scrollMoveTimer&&(this.isMouseLeaveSelection=!1,clearInterval(this.scrollMoveTimer))},e.prototype.selectAWord=function(e,i,n,o){if(e.nodeType===e.TEXT_NODE){var s=window.getSelection();(w=e.ownerDocument.createRange()).selectNodeContents(e);for(var a=0,r=w.endOffset;a<r;){if(w.setStart(e,a),w.setEnd(e,a+1),(c=w.getBoundingClientRect()).left<=i&&c.right>=i&&c.top<=n&&c.bottom>=n){for(var l=e.textContent,d=[],u=void 0,M=void 0,p=0;p<l.length;p++)" "===l[p]&&d.push(p);for(var h=0;h<d.length;h++){if(a===d[h]&&(u=d[h],M=d[h]),d[0]>a){u=0,M=d[h];break}a>d[h]&&a<d[h+1]?(u=d[h],M=d[h+1]):a>d[h]&&(d[h+1]||(u=d[h]))}M||(M=l.length),0===u?w.setStart(e,u):w.setStart(e,u+1),w.setEnd(e,M),s.removeAllRanges(),s.addRange(w),this.isTextSelection=!0;var L=t.isNullOrUndefined(w.startContainer.parentElement)?w.startContainer.parentNode:w.startContainer.parentElement;this.selectionStartPage=parseInt(L.id.split("_text_")[1]),o&&(this.selectionAnchorTouch={anchorNode:s.anchorNode.parentElement.id,anchorOffset:s.anchorOffset},this.selectionFocusTouch={focusNode:s.focusNode.parentElement.id,focusOffset:s.focusOffset}),t.Browser.isIE||w.detach();break}a+=1}}else for(p=0;p<e.childNodes.length;p++){var w=this.getSelectionRange(p,e),c=w.getBoundingClientRect();c.left<=i&&c.right>=i&&c.top<=n&&c.bottom>=n?(w.detach(),this.selectAWord(e.childNodes[p],i,n,o)):w.detach()}},e.prototype.getSelectionRange=function(e,t){var i=t.childNodes[e].ownerDocument.createRange();return i.selectNodeContents(t.childNodes[e]),i},e.prototype.selectEntireLine=function(e){var t=[],i=e.target,n=i.getBoundingClientRect(),o=parseInt((n.top+n.height/2).toString()),s=parseInt(e.target.id.split("_text_")[1]),a=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+"_text_"+s+'"]');if(i.classList.contains("e-pv-text")){this.pdfViewer.fireTextSelectionStart(s+1);for(var r=0;r<a.length;r++){var l=a[r].getBoundingClientRect(),d=parseInt(l.top.toString()),u=parseInt(l.bottom.toString());if(d<=o&&u>o&&n.bottom+10>u){var M=a[r].id;""!==M&&t.push(M)}}var p=window.getSelection();p.removeAllRanges();var h=document.createRange(),L=t.length-1,w=document.getElementById(t[0]),c=document.getElementById(t[L]);c.childNodes.length>0?(h.setStart(w.childNodes[0],0),h.setEnd(c.childNodes[0],c.textContent.length)):(h.setStart(w.childNodes[0],0),h.setEnd(c,1)),this.selectionStartPage=parseInt(h.startContainer.parentElement.id.split("_text_")[1]),p.addRange(h),this.isTextSelection=!0,null!=p&&"MouseUp"===this.pdfViewer.contextMenuSettings.contextMenuAction&&this.calculateContextMenuPosition(e.clientY,e.clientY)}},e.prototype.enableTextSelectionMode=function(){this.pdfViewerBase.isTextSelectionDisabled=!1,this.pdfViewerBase.viewerContainer.classList.remove("e-disable-text-selection"),this.pdfViewerBase.viewerContainer.classList.add("e-enable-text-selection"),this.pdfViewerBase.viewerContainer.addEventListener("selectstart",function(){return!0})},e.prototype.clearTextSelection=function(){if(this.isTextSelection){if(this.pdfViewerBase.textLayer.clearDivSelection(),window.getSelection&&window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges(),this.pdfViewer.linkAnnotationModule){var e=this.pdfViewerBase.currentPageNumber-3;e=e<0?0:e;var t=this.pdfViewer.currentPageNumber+1;t=t<this.pdfViewerBase.pageCount-1?t:this.pdfViewerBase.pageCount-1;for(var i=e;i<=t;i++)this.pdfViewer.linkAnnotationModule.modifyZindexForTextSelection(i,!1)}this.pdfViewer.annotation&&this.pdfViewer.annotation.textMarkupAnnotationModule&&this.pdfViewer.annotation.textMarkupAnnotationModule.showHideDropletDiv(!0),this.selectionRangeArray=[],this.isTextSelection=!1,this.isTouchSelection=!1,this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.searchAfterSelection(),this.pdfViewerBase.contextMenuModule.close(),this.removeTouchElements()}},e.prototype.removeTouchElements=function(){this.dropDivElementLeft&&(this.dropDivElementLeft.parentElement.removeChild(this.dropDivElementLeft),this.dropDivElementLeft=null,this.dropElementLeft.style.transform="rotate(0deg)"),this.dropDivElementRight&&(this.dropDivElementRight.parentElement.removeChild(this.dropDivElementRight),this.dropDivElementRight=null,this.dropElementRight.style.transform="rotate(-90deg)")},e.prototype.resizeTouchElements=function(){var e=this.pdfViewerBase.viewerContainer.getBoundingClientRect().left;if(this.dropDivElementLeft){var t=this.dropDivElementLeft.getBoundingClientRect(),i=0,n=this.pdfViewerBase.getElement("_pageDiv_"+this.topStoreLeft.pageNumber).getBoundingClientRect();this.dropDivElementLeft.style.left=parseFloat(this.topStoreLeft.left.toString())*this.pdfViewerBase.getZoomFactor()+n.left-e-t.width/2+"px",this.topStoreLeft.isHeightNeeded&&(i=t.height/2*this.pdfViewerBase.getZoomFactor()),this.dropDivElementLeft.style.top=parseFloat(this.topStoreLeft.pageTop.toString())*this.pdfViewerBase.getZoomFactor()+parseFloat(this.topStoreLeft.topClientValue.toString())*this.pdfViewerBase.getZoomFactor()+i+"px"}if(this.dropDivElementRight){var t=this.dropDivElementRight.getBoundingClientRect(),i=0,o=this.pdfViewerBase.getElement("_pageDiv_"+this.topStoreRight.pageNumber).getBoundingClientRect();this.dropDivElementRight.style.left=parseFloat(this.topStoreRight.left.toString())*this.pdfViewerBase.getZoomFactor()+o.left-e-t.width/2+"px",this.topStoreRight.isHeightNeeded&&(i=t.height/2*this.pdfViewerBase.getZoomFactor()),this.dropDivElementRight.style.top=parseFloat(this.topStoreRight.pageTop.toString())*this.pdfViewerBase.getZoomFactor()+parseFloat(this.topStoreRight.topClientValue.toString())*this.pdfViewerBase.getZoomFactor()+i+"px"}},e.prototype.textSelectionOnMouseup=function(e){if(this.clear(),null!==window.getSelection().anchorNode){if(this.isMouseLeaveSelection=!1,this.isSelectionStartTriggered=!1,this.maintainSelectionOnZoom(!0,!1),this.fireTextSelectEnd(),this.pdfViewerBase.textLayer.getTextSearchStatus()){this.pdfViewerBase.textLayer.clearDivSelection();for(var t=this.pdfViewer.textSearchModule.getIndexes(),i=parseFloat(t.lowerPageValue.toString()),n=parseFloat(t.higherPageValue.toString()),o=i;o<n;o++)this.applySelectionRangeOnScroll(o);this.pdfViewer.textSearchModule.searchAfterSelection()}else this.applySpanForSelection();this.pdfViewer.linkAnnotationModule&&this.pdfViewer.linkAnnotationModule.modifyZindexForTextSelection(this.pdfViewerBase.currentPageNumber-1,!1),this.isTextSearched&&"MouseUp"===this.pdfViewer.contextMenuSettings.contextMenuAction&&(this.calculateContextMenuPosition(e.clientY,e.clientX),this.isTextSearched=!1)}else this.pdfViewerBase.textLayer.clearDivSelection(),this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.searchAfterSelection(),this.pdfViewerBase.contextMenuModule.close(),this.removeTouchElements()},e.prototype.fireTextSelectEnd=function(){if(0!==this.selectionRangeArray.length){for(var e=0,t="",i=[],n=0;n<this.selectionRangeArray.length;n++){t+=this.selectionRangeArray[n].textContent;for(var o=0;o<this.selectionRangeArray[n].rectangleBounds.length;o++){var s=this.selectionRangeArray[n].rectangleBounds[o];i.push({left:s.left,right:s.right,top:s.top,bottom:s.bottom,width:s.width,height:s.height,pageIndex:this.selectionRangeArray[n].pageNumber+1})}this.selectionRangeArray[n].isBackward&&0===n?e=this.selectionRangeArray[n].pageNumber+1:this.selectionRangeArray[n].isBackward||n!==this.selectionRangeArray.length-1||(e=this.selectionRangeArray[n].pageNumber+1)}this.pdfViewer.fireTextSelectionEnd(e,t,i)}},e.prototype.maintainSelectionOnZoom=function(e,t){var i=window.getSelection();if("Range"===i.type||!i.type&&!i.isCollapsed){var n=this.pdfViewerBase.textLayer.isBackWardSelection(i);if(null!==i.anchorNode){var o=parseInt(this.getNodeElementFromNode(i.anchorNode).id.split("_text_")[1]),s=parseInt(this.getNodeElementFromNode(i.focusNode).id.split("_text_")[1]);if(this.isTouchSelection&&isNaN(s)&&i.focusNode===this.pdfViewerBase.pageContainer){var a=this.pdfViewerBase.pageContainer.lastChild;a.classList.contains("e-pv-touch-select-drop")?s=parseInt(a.previousSibling.previousSibling.id.split("_pageDiv_")[1]):a.classList.contains("e-pv-page-div")&&(s=parseInt(a.id.split("_pageDiv_")[1]))}if(n)for(r=o;r>=s;r--)this.maintainSelectionOnScroll(r,t);else for(var r=o;r<=s;r++)this.maintainSelectionOnScroll(r,t)}e||i.removeAllRanges()}},e.prototype.isSelectionAvailableOnScroll=function(e){for(var t=!1,i=this.selectionRangeArray,n=0;n<i.length;n++)if(null!==i[n]&&e===i[n].pageNumber){t=!0,this.isTouchSelection&&!this.pdfViewerBase.getMagnified()&&(t=!1);break}return t},e.prototype.applySelectionRangeOnScroll=function(e){this.isMouseLeaveSelection?this.applySelectionMouseScroll(e):this.applySelectionRange(e)},e.prototype.getSelectionRangeFromArray=function(e){for(var t=!1,i=null,n=this.selectionRangeArray,o=0;o<n.length;o++)if(null!==n[o]&&e===n[o].pageNumber){i=n[o],t=!0;break}return{isSelectionAvailable:t,selectionRange:i}},e.prototype.applySelectionRange=function(e){var t=this.getSelectionRangeFromArray(e),i=t.isSelectionAvailable,n=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+e);if(n&&i&&0!==n.childNodes.length){var o=t.selectionRange,s=void 0,a=void 0,r=void 0,l=void 0;if(o.isBackward){var d=parseInt(o.endNode.split("_text_")[1].split("_")[1]),u=parseInt(o.startNode.split("_text_")[1].split("_")[1]);d<u?(s=d,r=o.endOffset,l=o.startOffset,a=u):(s=u,r=o.endOffset,a=d,l=o.startOffset)}else s=parseInt(o.startNode.split("text_")[1].split("_")[1]),a=parseInt(o.endNode.split("text_")[1].split("_")[1]),r=o.startOffset,l=o.endOffset;window.getSelection().removeAllRanges(),this.pdfViewerBase.textLayer.applySpanForSelection(e,e,s,a,r,l),this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.searchAfterSelection()}},e.prototype.applySelectionMouseScroll=function(e){var t=this.getSelectionRangeFromArray(e);if(t.isSelectionAvailable){var i=t.selectionRange,n=window.getSelection(),o=document.getElementById(i.startNode).childNodes[0],s=document.getElementById(i.endNode).childNodes[0],a=document.createRange();if(null===n.anchorNode)i.isBackward?(a.setStart(s,i.endOffset),a.setEnd(o,i.startOffset)):(a.setStart(o,i.startOffset),a.setEnd(s,i.endOffset));else{var r=isNaN(parseInt(n.anchorNode.parentElement.id.split("_text_")[1]))?parseInt(n.anchorNode.id.split("_pageDiv_")[1]):parseInt(n.anchorNode.parentElement.id.split("_text_")[1]);isNaN(r)&&(r=parseInt(n.anchorNode.id.split("_text_")[1]));var l=isNaN(parseInt(n.focusNode.parentElement.id.split("_text_")[1]))?parseInt(n.focusNode.id.split("_pageDiv_")[1]):parseInt(n.focusNode.parentElement.id.split("_text_")[1]),d=parseInt(i.startNode.split("_text_")[1]);if(r===l&&r===d)i.isBackward?(a.setStart(s,i.endOffset),a.setEnd(o,i.startOffset)):(a.setStart(o,i.startOffset),a.setEnd(s,i.endOffset));else if(isNaN(r))isNaN(r)&&(i.isBackward?(a.setStart(s,i.endOffset),a.setEnd(o,i.startOffset)):(a.setStart(o,i.startOffset),a.setEnd(s,i.endOffset)));else if(isNaN(r)||i.isBackward){var u=this.pdfViewerBase.textLayer.isBackWardSelection(n);if(r>d&&d>l&&r!==l)u?n.extend(n.focusNode,n.focusOffset):(a.setStart(n.anchorNode,n.anchorOffset),a.setEnd(n.focusNode,n.focusOffset));else if(r<d&&d<l&&r!==l)u?n.extend(n.focusNode,n.focusOffset):(a.setStart(n.anchorNode,n.anchorOffset),a.setEnd(n.focusNode,n.focusOffset));else if(r<d)u?d!==this.selectionRangeArray[0].pageNumber?this.extendCurrentSelection(s.parentElement,i.endOffset,n,a):this.extendCurrentSelection(o.parentElement,i.startOffset,n,a):d!==this.selectionRangeArray[0].pageNumber?(a.setStart(n.anchorNode,n.anchorOffset),a.setEnd(s,i.endOffset)):(a.setStart(n.anchorNode,n.anchorOffset),a.setEnd(o,i.startOffset));else if(r===d)d===l?(a.setStart(o,i.startOffset),a.setEnd(o,i.startOffset),n.removeAllRanges(),n.addRange(a),a=document.createRange(),n.extend(s,i.endOffset)):u?this.extendCurrentSelection(s.parentElement,i.endOffset,n,a):(a.setStart(s,i.endOffset),a.setEnd(n.focusNode,n.focusOffset));else if(l===d)u?n.extend(n.focusNode,n.focusOffset):(a.setStart(n.anchorNode,n.anchorOffset),a.setEnd(n.focusNode,n.focusOffset));else if(r>d){var M=parseInt(i.startNode.split("_"+d+"_")[1]),p=parseInt(i.endNode.split("_"+d+"_")[1]);u?d!==this.selectionRangeArray[0].pageNumber?M<p?this.extendCurrentSelection(o.parentElement,i.startOffset,n,a):(a.setStart(s.parentElement,i.endOffset),a.setEnd(n.anchorNode,n.anchorOffset)):this.extendCurrentSelection(s.parentElement,i.endOffset,n,a):M<p?(a.setStart(o,i.startOffset),a.setEnd(n.focusNode,n.focusOffset)):(a.setStart(s,i.endOffset),a.setEnd(n.focusNode,n.focusOffset))}}else r<d&&d<l&&r!==l?(a.setStart(n.anchorNode,n.anchorOffset),a.setEnd(n.focusNode,n.focusOffset)):r<d?(a.setStart(n.anchorNode,n.anchorOffset),a.setEnd(s,i.endOffset)):(a.setStart(o,i.startOffset),a.setEnd(n.focusNode,n.focusOffset))}""!==a.toString()&&(n.removeAllRanges(),n.addRange(a))}},e.prototype.maintainSelectionOnScroll=function(e,t){var i=this.isSelectionAvailableOnScroll(e);this.isTextSelection&&!i&&this.maintainSelection(e,t)},e.prototype.maintainSelection=function(e,t){var i=window.getSelection();if(this.isTextSelection&&("Range"===i.type||!i.type&&!i.isCollapsed)){var n=parseInt(this.getNodeElementFromNode(i.anchorNode).id.split("_text_")[1]),o=parseInt(this.getNodeElementFromNode(i.focusNode).id.split("_text_")[1]);if(isNaN(o)&&null!==i.anchorNode)if(this.pdfViewerBase.textLayer.isBackWardSelection(i))o=parseInt(this.pdfViewerBase.pageContainer.firstChild.id.split("_pageDiv_")[1]);else{var s=this.pdfViewerBase.pageContainer.lastChild;o=s.classList.contains("e-pv-touch-select-drop")?parseInt(s.previousSibling.previousSibling.id.split("_pageDiv_")[1]):parseInt(s.id.split("_pageDiv_")[1])}var a=this.pdfViewerBase.textLayer.isBackWardSelection(i);if(this.isTouchSelection&&e>o&&e>n)return;if(n===o){var r=null,l=this.getSelectionBounds(i.getRangeAt(0),e),d=this.getSelectionRectangleBounds(i.getRangeAt(0),e),u=1===this.getNodeElementFromNode(i.anchorNode).childNodes.length?i.anchorOffset:this.getCorrectOffset(i.anchorNode,i.anchorOffset),M=1===this.getNodeElementFromNode(i.focusNode).childNodes.length?i.focusOffset:this.getCorrectOffset(i.focusNode,i.focusOffset);r={isBackward:a,startNode:this.getNodeElementFromNode(i.anchorNode).id,startOffset:u,endNode:this.getNodeElementFromNode(i.focusNode).id,endOffset:M,textContent:i.toString(),pageNumber:e,bound:l,rectangleBounds:d},this.pushSelectionRangeObject(r,e)}else(r=this.createRangeObjectOnScroll(e,n,o))&&(this.pushSelectionRangeObject(r,e),t&&this.stichSelection(a,i,e))}},e.prototype.getCorrectOffset=function(e,t){for(var i=0,n=this.getNodeElementFromNode(e),o=0;o<n.childNodes.length;o++){if(n.childNodes[o]===e){i+=t;break}i+=n.childNodes[o].textContent.length}return i},e.prototype.pushSelectionRangeObject=function(e,t){if(this.isTouchSelection){var i=this.selectionRangeArray.filter(function(e){return e.pageNumber===t});if(i.length>0){var n=this.selectionRangeArray.indexOf(i[0]);return void this.selectionRangeArray.splice(n,1,e)}}var o=this.selectionRangeArray.filter(function(e){return e.pageNumber===t+1});if(0===o.length)if(this.isTouchSelection&&0!==this.selectionRangeArray.length){var s=this.selectionRangeArray.filter(function(e){return e.pageNumber===t-1});if(0!==s.length){var a=this.selectionRangeArray.indexOf(s[0]);this.selectionRangeArray.splice(a+1,0,e)}else{var r=this.selectionRangeArray[0];t<r.pageNumber?this.selectionRangeArray.splice(0,0,e):this.selectionRangeArray.push(e)}}else this.selectionRangeArray.push(e);else{var l=this.selectionRangeArray.indexOf(o[0]);this.selectionRangeArray.splice(l,0,e)}},e.prototype.extendCurrentSelection=function(e,t,i,n){var o=i.focusOffset,s=i.focusNode.parentElement.id,a=isNaN(parseInt(s.split("_text_")[1]))?parseInt(i.focusNode.id.split("_pageDiv_")[1]):parseInt(s.split("_text_")[1]);isNaN(parseInt(s.split("_text_")[1]))&&(s=this.pdfViewerBase.getElement("_textLayer_"+(a+1)).firstChild.id),n.setStart(e.childNodes[0],t),n.setEnd(e.childNodes[0],t),i.removeAllRanges(),i.addRange(n),i.extend(document.getElementById(s).childNodes[0],o)},e.prototype.stichSelection=function(e,t,i){var n,o=document.createRange();if(e)if(n=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(i-1)))(s=n.lastChild)?this.extendCurrentSelection(s,this.getTextLastLength(s),t,o):(s=(n=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(i-2))).lastChild,this.extendCurrentSelection(s,this.getTextLastLength(s),t,o));else{var s=(n=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(i+1))).firstChild;this.extendCurrentSelection(s,0,t,o)}else if(n=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(i+1))){var a=n.firstChild;a?o.setStart(a.childNodes[0],0):(a=(n=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(i+2))).firstChild,o.setStart(a.childNodes[0],0)),o.setEnd(t.focusNode,t.focusOffset),t.removeAllRanges(),t.addRange(o)}},e.prototype.textSelectionOnMouseWheel=function(e){this.isMouseLeaveSelection=!0,this.stichSelectionOnScroll(e)},e.prototype.stichSelectionOnScroll=function(e){var t=window.getSelection();if(this.isTextSelection){var i=parseInt(this.getNodeElementFromNode(t.anchorNode).id.split("_text_")[1]),n=parseInt(this.getNodeElementFromNode(t.focusNode).id.split("_text_")[1]),o=void 0;if(i!==e&&n!==e)if(this.pdfViewerBase.textLayer.isBackWardSelection(t)){if(o=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(e-1))){var s=o.firstChild;s&&this.extendSelectionStich(s.childNodes[0],0,t)}}else if(o=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(e-1)))if(s=o.lastChild)s.childNodes[0]?this.extendSelectionStich(s.childNodes[0],this.getTextLastLength(s),t):this.extendSelectionStich(s,this.getTextLastLength(s),t);else{var a=(o=this.pdfViewerBase.getElement("_textLayer_"+e)).firstChild;this.extendSelectionStich(a.childNodes[0],0,t)}this.maintainSelectionArray()}},e.prototype.extendSelectionStich=function(e,t,i){i.extend&&i.extend(e,t)},e.prototype.createRangeObjectOnScroll=function(e,t,i){var n=window.getSelection();if(null!==n.anchorNode){var o=this.pdfViewerBase.textLayer.isBackWardSelection(n),s=void 0,a=void 0,r=void 0,l=void 0,d=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+e);if(d.childNodes){if(o?e===t?(s=this.getNodeElementFromNode(n.anchorNode),a=d.firstChild,r=this.getCorrectOffset(n.anchorNode,n.anchorOffset),l=0):e<t&&e>i?(s=d.firstChild,a=d.lastChild,r=0,l=this.getTextLastLength(a)):e===i&&(s=this.getNodeElementFromNode(n.focusNode),a=d.lastChild,r=this.getCorrectOffset(n.focusNode,n.focusOffset),l=this.getTextLastLength(a)):e===t?(s=this.getNodeElementFromNode(n.anchorNode),a=d.lastChild,r=this.getCorrectOffset(n.anchorNode,n.anchorOffset),l=this.getTextLastLength(a)):e>t&&e<i?(s=d.firstChild,a=d.lastChild,r=0,l=this.getTextLastLength(a)):e===i&&(s=d.firstChild,-1!==this.getNodeElementFromNode(n.focusNode).id.indexOf(i.toString())?(a=this.getNodeElementFromNode(n.focusNode),l=this.getCorrectOffset(n.focusNode,n.focusOffset)):(a=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+i).lastChild,l=this.getTextLastLength(a)),r=0),s&&a){var u=this.getSelectionRangeObject(s.id,r,a.id,l,e),M=u.toString(),p=this.getSelectionBounds(u,e),h=this.getSelectionRectangleBounds(u,e);return{isBackward:o,startNode:s.id,startOffset:r,endNode:a.id,endOffset:l,textContent:M,pageNumber:e,bound:p,rectangleBounds:h}}return null}}return null},e.prototype.getSelectionRangeObject=function(e,t,i,n,o){var s=document.getElementById(e),a=document.getElementById(i);s.childNodes[0]&&(s=s.childNodes[0]),a.childNodes[0]&&(a=a.childNodes[0]);var r=parseInt(e.split("_"+o+"_")[1]),l=parseInt(i.split("_"+o+"_")[1]),d=document.createRange();return r<=l?(d.setStart(s,t),d.setEnd(a,n)):(d.setStart(a,n),d.setEnd(s,t)),d},e.prototype.getSelectionBounds=function(e,t){var i=null;if(this.getNodeElementFromNode(e.startContainer)!==this.getNodeElementFromNode(e.endContainer)){var n=document.createRange(),o=this.createRangeForSelection(e.startContainer,e.endContainer,e.startOffset,e.endOffset,n);i=this.normalizeBounds(o.getBoundingClientRect(),t)}else i=this.normalizeBounds(e.getBoundingClientRect(),t);return i},e.prototype.getSelectionRectangleBounds=function(e,t){var i=[],n=null;if(this.getNodeElementFromNode(e.startContainer)!==this.getNodeElementFromNode(e.endContainer))for(var o=0,s=0,a=0,r=this.pdfViewerBase.textLayer.getPageIndex(e.startContainer),l=this.pdfViewerBase.textLayer.getTextIndex(e.startContainer,r),d=this.pdfViewerBase.textLayer.getPageIndex(e.endContainer),u=this.pdfViewerBase.textLayer.getTextIndex(e.endContainer,d),M=this.pdfViewerBase.getElement("_textLayer_"+d).childNodes,p=a=t===r?l:0;p<M.length;p++){var h=M[p];o=p===l?e.startOffset:0,s=p===u?e.endOffset:h.textContent.length;for(var L=document.createRange(),w=0;w<h.childNodes.length;w++){var c=h.childNodes[w];L.setStart(c,o),L.setEnd(c,s)}var C=this.normalizeBounds(L.getBoundingClientRect(),t);if(i.push(C),L.detach(),p===u)break}else n=this.normalizeBounds(e.getBoundingClientRect(),t),i.push(n);return i},e.prototype.getTextId=function(e){var t=e.lastIndexOf("_"),i=e.substring(t+1,e.length);return parseInt(i)},e.prototype.normalizeBounds=function(e,t){var i=this.pdfViewerBase.getElement("_pageDiv_"+t);if(this.pdfViewerBase.isMixedSizeDocument){var n=this.pdfViewerBase.getElement("_textLayer_"+t);n&&(i=n)}var o=i.getBoundingClientRect();return{bottom:this.getMagnifiedValue(e.bottom-o.top),height:this.getMagnifiedValue(e.height),left:this.getMagnifiedValue(e.left-o.left),top:this.getMagnifiedValue(e.top-o.top),right:this.getMagnifiedValue(e.right-o.left),width:this.getMagnifiedValue(e.width)}},e.prototype.getMagnifiedValue=function(e){return e/this.pdfViewerBase.getZoomFactor()},e.prototype.getCurrentSelectionBounds=function(e){for(var t=null,i=this.selectionRangeArray,n=0;n<i.length;n++)null!==i[n]&&e===i[n].pageNumber&&(t=i[n].bound);return t},e.prototype.createRangeForSelection=function(e,t,i,n,o){return o.setStart(e,i),o.setEnd(t,n),o},e.prototype.maintainSelectionArray=function(){var e=this;if(0!==this.selectionRangeArray.length){var t=window.getSelection(),i=this.pdfViewerBase.textLayer.isBackWardSelection(t),n=isNaN(parseInt(this.getNodeElementFromNode(t.anchorNode).id.split("_text_")[1]))?parseInt(t.anchorNode.id.split("_pageDiv_")[1]):parseInt(this.getNodeElementFromNode(t.anchorNode).id.split("_text_")[1]);isNaN(n)&&(n=parseInt(t.anchorNode.id.split("_text_")[1]));var o=isNaN(parseInt(this.getNodeElementFromNode(t.focusNode).id.split("_text_")[1]))?parseInt(t.focusNode.id.split("_pageDiv_")[1]):parseInt(this.getNodeElementFromNode(t.focusNode).id.split("_text_")[1]);isNaN(o)&&(o=isNaN(parseInt(t.focusNode.id.split("_text_")[1]))?parseInt(t.focusNode.id.split("_textLayer_")[1]):parseInt(t.focusNode.id.split("_text_")[1]));var s=[];if((s=i?this.selectionRangeArray.filter(function(t){return!(o<t.pageNumber&&t.pageNumber<=e.selectionStartPage)}):this.selectionRangeArray.filter(function(t){return!(e.selectionStartPage<=t.pageNumber&&t.pageNumber<o)})).length>0){for(var a=0;a<s.length;a++){var r=this.selectionRangeArray.indexOf(s[a]);-1!==r&&this.selectionRangeArray.splice(r,1)}1===this.selectionRangeArray.length&&(this.selectionRangeArray[0].pageNumber!==n&&this.selectionRangeArray[0].pageNumber!==o||(s=[]))}}},e.prototype.applySpanForSelection=function(){var e=window.getSelection();if(e.anchorNode!==e.focusNode||e.anchorOffset!==e.focusOffset||e.isCollapsed||e.removeAllRanges(),null!==e.anchorNode&&this.pdfViewerBase.viewerContainer.contains(this.getNodeElementFromNode(e.anchorNode))){var t=void 0,i=void 0,n=void 0,o=void 0,s=void 0,a=void 0;if(this.pdfViewerBase.textLayer.isBackWardSelection(e))t=parseInt(this.getNodeElementFromNode(e.focusNode).id.split("_text_")[1]),i=parseInt(this.getNodeElementFromNode(e.anchorNode).id.split("_text_")[1]),n=parseInt(this.getNodeElementFromNode(e.focusNode).id.split("_text_")[1].split("_")[1]),o=parseInt(this.getNodeElementFromNode(e.anchorNode).id.split("_text_")[1].split("_")[1]),s=e.focusOffset,a=e.anchorOffset;else{var r=this.getNodeElementFromNode(e.anchorNode),l=this.getNodeElementFromNode(e.focusNode);t=-1!==r.id.indexOf("text_")?parseInt(r.id.split("text_")[1]):parseInt(r.id.split("_textLayer_")[1]),i=-1!==l.id.indexOf("text_")?parseInt(l.id.split("text_")[1]):parseInt(l.id.split("_textLayer_")[1]);var d=!1;if(this.isTouchSelection&&e.focusNode===this.pdfViewerBase.pageContainer){var u=this.pdfViewerBase.pageContainer.lastChild;if(u.classList.contains("e-pv-touch-select-drop")){M=u.previousSibling.previousSibling;i=parseInt(M.id.split("_pageDiv_")[1]),l=this.pdfViewerBase.getElement("_textLayer_"+i).lastChild,d=!0}else if(u.classList.contains("e-pv-page-div")){var M=u;i=parseInt(M.id.split("_pageDiv_")[1]),l=this.pdfViewerBase.getElement("_textLayer_"+i).lastChild,d=!0}}r.classList.contains("e-pv-maintaincontent")&&(r=this.getNodeElementFromNode(r),t=parseInt(r.id.split("text_")[1])),l.classList.contains("e-pv-maintaincontent")&&(l=this.getNodeElementFromNode(l),i=parseInt(l.id.split("text_")[1])),t===i&&(r.contains(l)&&(r=l),l.contains(r)&&(l=r)),n=r.id.split("text_")[1]?parseInt(r.id.split("text_")[1].split("_")[1]):null,o=l.id.split("text_")[1]?parseInt(l.id.split("text_")[1].split("_")[1]):null,n=isNaN(n)?o:n,o=isNaN(o)?n:o,s=e.anchorOffset,a=d?l.textContent.length:e.focusOffset}this.pdfViewerBase.checkIsNormalText()&&(e.removeAllRanges(),this.pdfViewerBase.textLayer.clearDivSelection(),this.pdfViewerBase.textLayer.applySpanForSelection(t,i,n,o,s,a)),this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.searchAfterSelection()}},e.prototype.initiateTouchSelection=function(e,t,i){this.pdfViewerBase.isShapeBasedAnnotationsEnabled()&&this.pdfViewer.selectedItems.annotations.length>0&&this.pdfViewer.clearSelection(this.pdfViewer.selectedItems.annotations[0].pageIndex);var n=e.target,o=document.elementsFromPoint(e.touches[0].clientX,e.touches[0].clientY);0!==o.length&&o[0].classList.contains("e-pv-hyperlink")&&o[1].classList.contains("e-pv-text")&&(n=o[1]);var s=parseFloat(n.id.split("_")[2]);this.pdfViewer.fireTextSelectionStart(s+1),this.selectAWord(n,t,i,!0),this.createTouchSelectElement(e),this.maintainSelectionOnZoom(!0,!1),this.fireTextSelectEnd(),this.applySpanForSelection()},e.prototype.selectTextByTouch=function(e,t,i,n,o,s){var a=!1;if(e.nodeType===e.TEXT_NODE){var r=e.ownerDocument.createRange(),l=window.getSelection();r.selectNodeContents(e);for(var d=0,u=r.endOffset;d<u;){if(r.setStart(e,d),r.setEnd(e,d+1),(h=r.getBoundingClientRect()).left<=t&&h.right>=t&&h.top<=i&&h.bottom>=i)return null!=l.anchorNode&&(n&&r.setStart(l.anchorNode,l.anchorOffset),r=this.setTouchSelectionStartPosition(l,r,n,o,e,d,s),n&&l.extend(e,d),a=!0),r.detach(),a;d+=1}}else for(var M=0;M<e.childNodes.length;M++){var p=e.childNodes[M].ownerDocument.createRange();p.selectNodeContents(e.childNodes[M]);var h=p.getBoundingClientRect();if(h.left<=t&&h.right>=t&&h.top<=i&&h.bottom>=i)return p.detach(),this.selectTextByTouch(e.childNodes[M],t,i,n,o,s);p.detach()}return a},e.prototype.setTouchSelectionStartPosition=function(e,t,i,n,o,s,a){if(i){if("left"===n){r=this.getTouchFocusElement(e,!0);t.setStart(r.focusNode,r.focusOffset),t.setEnd(o,s),this.selectionAnchorTouch={anchorNode:t.endContainer.parentElement.id,anchorOffset:t.endOffset}}else if("right"===n){r=this.getTouchAnchorElement(e,!1);t.setStart(r.anchorNode,r.anchorOffset),t.setEnd(o,s),this.selectionFocusTouch={focusNode:t.endContainer.parentElement.id,focusOffset:t.endOffset}}}else if("left"===n)if(a)t.setStart(o,s),t.setEnd(e.focusNode,e.focusOffset),this.selectionAnchorTouch={anchorNode:t.startContainer.parentElement.id,anchorOffset:t.startOffset};else{r=this.getTouchFocusElement(e,!1);t.setStart(o,s),t.setEnd(r.focusNode,r.focusOffset),""===t.toString()&&(t.setStart(o,s),t.setEnd(e.focusNode,e.focusOffset)),this.selectionAnchorTouch={anchorNode:t.startContainer.parentElement.id,anchorOffset:t.startOffset}}else if("right"===n){var r=this.getTouchAnchorElement(e,!0);t.setStart(o,s),t.setEnd(r.anchorNode,r.anchorOffset),""===t.toString()&&(t.setStart(r.anchorNode,r.anchorOffset),t.setEnd(o,s)),this.selectionFocusTouch={focusNode:t.startContainer.parentElement.id,focusOffset:t.startOffset}}return e.removeAllRanges(),e.addRange(t),t},e.prototype.getTouchAnchorElement=function(e,t){var i=document.getElementById(this.selectionAnchorTouch.anchorNode.toString()),n=null,o=0;return i?(n=i.childNodes[0],o=parseInt(this.selectionAnchorTouch.anchorOffset.toString())):t?(n=e.focusNode,o=e.focusOffset):(n=e.anchorNode,o=e.anchorOffset),{anchorNode:n,anchorOffset:o}},e.prototype.getTouchFocusElement=function(e,t){var i=document.getElementById(this.selectionFocusTouch.focusNode.toString()),n=null,o=0;return i?(n=i.childNodes[0],o=parseInt(this.selectionFocusTouch.focusOffset.toString())):t?(n=e.anchorNode,o=e.anchorOffset):(n=e.focusNode,o=e.focusOffset),{focusNode:n,focusOffset:o}},e.prototype.createTouchSelectElement=function(e){this.isTouchSelection=!0;var i=window.getSelection();if("Range"===i.type){this.dropDivElementLeft=t.createElement("div",{id:this.pdfViewer.element.id+"_touchSelect_droplet_left",className:"e-pv-touch-select-drop"}),this.dropDivElementRight=t.createElement("div",{id:this.pdfViewer.element.id+"_touchSelect_droplet_right",className:"e-pv-touch-select-drop"}),this.dropElementLeft=t.createElement("div",{className:"e-pv-touch-ellipse"}),this.dropElementLeft.style.transform="rotate(0deg)",this.dropDivElementLeft.appendChild(this.dropElementLeft),this.dropElementRight=t.createElement("div",{className:"e-pv-touch-ellipse"}),this.dropElementRight.style.transform="rotate(-90deg)",this.dropDivElementRight.appendChild(this.dropElementRight),this.pdfViewerBase.pageContainer.appendChild(this.dropDivElementLeft),this.pdfViewerBase.pageContainer.appendChild(this.dropDivElementRight);var n=i.getRangeAt(0).getBoundingClientRect(),o=this.dropDivElementLeft.getBoundingClientRect(),s=this.pdfViewerBase.pageSize[this.pdfViewerBase.currentPageNumber-1].top,a=this.pdfViewerBase.viewerContainer.getBoundingClientRect().left,r=this.getClientValueTop(n.top,this.pdfViewerBase.currentPageNumber-1),l=r+s*this.pdfViewerBase.getZoomFactor()+o.height/2*this.pdfViewerBase.getZoomFactor()+"px";this.dropDivElementLeft.style.top=l,this.dropDivElementLeft.style.left=n.left-(a+o.width)+"px",this.dropDivElementRight.style.top=l,this.dropDivElementRight.style.left=n.left+n.width-a+"px";var d=this.pdfViewerBase.getElement("_pageDiv_"+(this.pdfViewerBase.currentPageNumber-1)).getBoundingClientRect().left,u=n.left-d;this.topStoreLeft={pageTop:s,topClientValue:this.getMagnifiedValue(r),pageNumber:this.pdfViewerBase.currentPageNumber-1,left:this.getMagnifiedValue(u),isHeightNeeded:!0},this.topStoreRight={pageTop:s,topClientValue:this.getMagnifiedValue(r),pageNumber:this.pdfViewerBase.currentPageNumber-1,left:this.getMagnifiedValue(u+n.width),isHeightNeeded:!0},this.dropDivElementLeft.addEventListener("touchstart",this.onLeftTouchSelectElementTouchStart),this.dropDivElementLeft.addEventListener("touchmove",this.onLeftTouchSelectElementTouchMove),this.dropDivElementLeft.addEventListener("touchend",this.onLeftTouchSelectElementTouchEnd),this.dropDivElementRight.addEventListener("touchstart",this.onRightTouchSelectElementTouchStart),this.dropDivElementRight.addEventListener("touchmove",this.onRightTouchSelectElementTouchMove),this.dropDivElementRight.addEventListener("touchend",this.onRightTouchSelectElementTouchEnd),this.calculateContextMenuPosition(e.touches[0].clientY,e.touches[0].clientX)}},e.prototype.calculateContextMenuPosition=function(e,i){if(e-=this.pdfViewerBase.toolbarHeight,t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){var n=e-this.contextMenuHeight;n<this.pdfViewerBase.toolbarHeight?e+=this.contextMenuHeight:e=n}"MouseUp"===this.pdfViewer.contextMenuSettings.contextMenuAction&&(i-=50),this.pdfViewerBase.contextMenuModule.open(e,i-this.pdfViewerBase.viewerContainer.clientLeft,this.pdfViewerBase.viewerContainer)},e.prototype.initiateSelectionByTouch=function(){this.pdfViewerBase.textLayer.clearDivSelection(),this.pdfViewerBase.contextMenuModule.close();var e=this.pdfViewerBase.currentPageNumber-3;e=e<0?0:e;var t=this.pdfViewer.currentPageNumber+1;t=t<this.pdfViewerBase.pageCount-1?t:this.pdfViewerBase.pageCount-1;for(var i=e;i<=t;i++){var n=this.pdfViewerBase.getElement("_textLayer_"+i);n&&null!==n.childNodes&&this.applySelectionMouseScroll(i)}this.selectionRangeArray.length>0&&this.pdfViewer.fireTextSelectionStart(this.selectionRangeArray[0].pageNumber+1)},e.prototype.terminateSelectionByTouch=function(e){this.maintainSelectionOnZoom(!0,!1),this.applySpanForSelection(),this.pdfViewerBase.getTextMarkupAnnotationMode()?this.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode):(this.fireTextSelectEnd(),this.pdfViewerBase.contextMenuModule.open(e.changedTouches[0].clientY-this.pdfViewerBase.viewerContainer.offsetTop+this.pdfViewerBase.contextMenuModule.contextMenuElement.clientHeight,e.changedTouches[0].clientX-this.pdfViewerBase.viewerContainer.offsetLeft,this.pdfViewerBase.viewerContainer))},e.prototype.getNodeElement=function(e,t,i,n,o){if(document.caretRangeFromPoint)e=document.caretRangeFromPoint(t,i),o=this.onTouchElementScroll(e,o,i,n);else if(document.caretPositionFromPoint){var s=document.caretPositionFromPoint(t,i),a=document.caretPositionFromPoint(t,i);(e=document.createRange()).setStart(s.offsetNode,s.offset),e.setEnd(a.offsetNode,a.offset),o=this.onTouchElementScroll(e,o,i,n)}return o},e.prototype.isTouchedWithinContainer=function(e){var t=!1;return 0!==document.elementsFromPoint(e.touches[0].clientX,e.touches[0].clientY).length&&(t=!0),t},e.prototype.onTouchElementScroll=function(e,t,i,n){var o=this.pdfViewerBase.viewerContainer.scrollTop;if(null!=e){t=e.startContainer;var s=this.isScrolledOnScrollBar(n);this.pdfViewerBase.viewerContainer.contains(t.parentElement)&&!s||(i<this.pdfViewerBase.viewerContainer.clientHeight?this.pdfViewerBase.viewerContainer.scrollTop=o-30:this.pdfViewerBase.viewerContainer.scrollTop=o+30)}else i<this.pdfViewerBase.viewerContainer.clientHeight?this.pdfViewerBase.viewerContainer.scrollTop=o-30:this.pdfViewerBase.viewerContainer.scrollTop=o+30;return t},e.prototype.isCloserTouchScroll=function(e){var t=!1;return this.previousScrollDifference>e&&(t=!0),t},e.prototype.getClientValueTop=function(e,t){return this.pdfViewerBase.getElement("_pageDiv_"+t)?e-this.pdfViewerBase.getElement("_pageDiv_"+t).getBoundingClientRect().top:e},e.prototype.isScrolledOnScrollBar=function(e){var t=!1;return e.touches&&this.pdfViewerBase.viewerContainer.clientHeight+this.pdfViewerBase.viewerContainer.offsetTop<e.touches[0].clientY&&e.touches[0].clientY<this.pdfViewerBase.viewerContainer.offsetHeight+this.pdfViewerBase.viewerContainer.offsetTop&&(t=!0),t},e.prototype.getTextLastLength=function(e){return e?e.textContent.length:0},e.prototype.getNodeElementFromNode=function(e){return e.parentElement?e.parentElement:e.parentNode},e.prototype.copyText=function(){var e="";if(this.maintainSelectionOnZoom(!0,!1),this.selectionRangeArray.length>0)for(var t=0;t<this.selectionRangeArray.length;t++)e+=this.selectionRangeArray[t].textContent;if(e.length>0){this.pdfViewer.annotation&&(this.pdfViewer.annotation.isShapeCopied=!1);var i=document.createElement("textarea");i.contentEditable="true",i.textContent=e,this.pdfViewer.annotation&&this.pdfViewer.annotation.freeTextAnnotationModule&&(this.pdfViewer.annotation.freeTextAnnotationModule.selectedText=e),i.style.position="fixed",document.body.appendChild(i),i.select();try{document.execCommand("copy")}catch(e){console.warn("Copy to clipboard failed.",e)}finally{i&&document.body.removeChild(i)}}},e.prototype.destroy=function(){this.clear()},e.prototype.getModuleName=function(){return"TextSelection"},e}(),un=function(){function e(e,i){var n=this;this.isTextSearch=!1,this.searchCount=0,this.searchIndex=0,this.currentSearchIndex=0,this.searchPageIndex=null,this.searchString=null,this.isMatchCase=!1,this.searchRequestHandler=null,this.textContents=new Array,this.searchMatches=new Array,this.searchCollection=new Array,this.searchedPages=[],this.isPrevSearch=!1,this.tempElementStorage=new Array,this.isMessagePopupOpened=!1,this.isTextRetrieved=!1,this.isTextSearched=!1,this.isTextSearchEventTriggered=!1,this.checkBoxOnChange=function(e){if(t.isBlazor()?e.currentTarget&&e.currentTarget.checked?n.isMatchCase=!0:n.isMatchCase=!1:e.checked?n.isMatchCase=!0:n.isMatchCase=!1,n.isTextSearch){n.resetVariables(),n.clearAllOccurrences();var i=n.searchInput.value;n.searchIndex=0,n.textSearch(i)}},this.searchKeypressHandler=function(e){n.enableNextButton(!0),n.enablePrevButton(!0),13===e.which?(n.initiateTextSearch(n.searchInput),n.updateSearchInputIcon(!1)):n.resetVariables()},this.searchClickHandler=function(e){n.searchButtonClick(n.searchBtn,n.searchInput)},this.nextButtonOnClick=function(e){n.nextSearch()},this.prevButtonOnClick=function(e){n.prevSearch()},this.pdfViewer=e,this.pdfViewerBase=i}return e.prototype.createTextSearchBox=function(){var e=this;this.searchBox=t.createElement("div",{id:this.pdfViewer.element.id+"_search_box",className:"e-pv-search-bar"});var i=t.createElement("div",{id:this.pdfViewer.element.id+"_search_box_elements",className:"e-pv-search-bar-elements"}),n=t.createElement("div",{id:this.pdfViewer.element.id+"_search_input_container",className:"e-input-group e-pv-search-input"});this.searchInput=t.createElement("input",{id:this.pdfViewer.element.id+"_search_input",className:"e-input"}),this.searchInput.type="text",t.isBlazor()?(r=this.pdfViewer._dotnetInstance.invokeMethodAsync("GetLocaleText","PdfViewer_Findindocument")).then(function(t){e.searchInput.placeholder=t}):this.searchInput.placeholder=this.pdfViewer.localeObj.getConstant("Find in document"),this.searchBtn=t.createElement("span",{id:this.pdfViewer.element.id+"_search_box-icon",className:"e-input-group-icon e-input-search-group-icon e-pv-search-icon"}),n.appendChild(this.searchInput),n.appendChild(this.searchBtn),i.appendChild(n),this.pdfViewer.enableRtl?this.prevSearchBtn=this.createSearchBoxButtons("prev_occurrence","e-pv-next-search"):this.prevSearchBtn=this.createSearchBoxButtons("prev_occurrence","e-pv-prev-search"),this.prevSearchBtn.setAttribute("aria-label","Previous Search text"),i.appendChild(this.prevSearchBtn),this.pdfViewer.enableRtl?this.nextSearchBtn=this.createSearchBoxButtons("next_occurrence","e-pv-prev-search"):this.nextSearchBtn=this.createSearchBoxButtons("next_occurrence","e-pv-next-search"),this.nextSearchBtn.setAttribute("aria-label","Next Search text"),i.appendChild(this.nextSearchBtn);var o=t.createElement("div",{id:this.pdfViewer.element.id+"_match_case_container",className:"e-pv-match-case-container"}),s=t.createElement("input",{id:this.pdfViewer.element.id+"_match_case"});if(s.type="checkbox",t.isBlazor()&&(s.style.height="17px",s.style.width="17px",s.addEventListener("change",this.checkBoxOnChange.bind(this))),o.appendChild(s),this.searchBox.appendChild(i),this.searchBox.appendChild(o),this.pdfViewerBase.mainContainer.appendChild(this.searchBox),t.isBlazor()){var a=t.createElement("span",{id:this.pdfViewer.element.id+"_search_box_text",styles:"position: absolute; padding-top: 3px; padding-left: 8px; padding-right: 8px; font-size: 13px"}),r=this.pdfViewer._dotnetInstance.invokeMethodAsync("GetLocaleText","PdfViewer_Matchcase");r.then(function(e){a.textContent=e}),o.appendChild(a)}else new d.CheckBox({cssClass:"e-pv-match-case",label:this.pdfViewer.localeObj.getConstant("Match case"),change:this.checkBoxOnChange.bind(this)}).appendTo(s);var l=t.createElement("div",{id:this.pdfViewer.element.id+"_textSearchLoadingIndicator"});n.appendChild(l),l.style.position="absolute",l.style.top="15px",l.style.left=n.clientWidth-46+"px",ne({target:l,cssClass:"e-spin-center"}),this.setLoaderProperties(l),this.showSearchBox(!1),this.pdfViewer.enableRtl?(this.searchBox.classList.add("e-rtl"),this.searchBox.style.left="88.3px"):(this.searchBox.classList.remove("e-rtl"),this.searchBox.style.right="88.3px"),this.searchInput.addEventListener("focus",function(){e.searchInput.parentElement.classList.add("e-input-focus")}),this.searchInput.addEventListener("blur",function(){e.searchInput.parentElement.classList.remove("e-input-focus")}),this.searchInput.addEventListener("keydown",this.searchKeypressHandler.bind(this)),this.searchBtn.addEventListener("click",this.searchClickHandler.bind(this)),this.nextSearchBtn.addEventListener("click",this.nextButtonOnClick.bind(this)),this.prevSearchBtn.addEventListener("click",this.prevButtonOnClick.bind(this))},e.prototype.setLoaderProperties=function(e){var t=e.firstChild.firstChild.firstChild;t&&(t.style.height="18px",t.style.width="18px",t.style.transformOrigin="9px 9px 9px")},e.prototype.showLoadingIndicator=function(e){var t=document.getElementById(this.pdfViewer.element.id+"_textSearchLoadingIndicator");t&&(e?Oe(t):Fe(t))},e.prototype.textSearchBoxOnResize=function(){if(this.pdfViewer.toolbarModule&&this.pdfViewer.enableToolbar){var e=this.pdfViewerBase.getElement("_toolbarContainer_popup");e&&e.contains(this.pdfViewerBase.getElement("_search").parentElement)&&(this.searchBox.style.right="0px")}else this.pdfViewerBase.viewerContainer.clientWidth+this.pdfViewerBase.viewerContainer.offsetLeft<this.searchBox.offsetLeft+this.searchBox.clientWidth?(this.searchBox.style.right="0px",this.searchBox.style.width=parseInt(this.searchBox.style.width)-(this.searchBox.offsetLeft+this.searchBox.clientWidth-this.pdfViewerBase.viewerContainer.clientWidth)+"px",this.searchInput.style.width=parseInt(this.searchInput.style.width)-(this.searchBox.offsetLeft+this.searchBox.clientWidth-this.pdfViewerBase.viewerContainer.clientWidth)+"px"):(this.searchBox.style.right="88.3px",this.searchBox.style.width="",this.searchInput.style.width="")},e.prototype.showSearchBox=function(e){e?this.searchBox.style.display="block":(this.searchBox.style.display="none",this.searchInput.value=""),this.onTextSearchClose()},e.prototype.searchAfterSelection=function(){this.isTextSearch&&(this.initSearch(this.searchPageIndex,!0),this.highlightOthers())},e.prototype.initiateTextSearch=function(e){var t=e.value;this.initiateSearch(t)},e.prototype.initiateSearch=function(e){e!==this.searchString&&(this.isTextSearch=!1,this.searchPageIndex=this.pdfViewerBase.currentPageNumber-1),this.clearAllOccurrences(),""!==e&&(this.searchMatches[this.searchPageIndex]&&e===this.searchString?0===this.searchMatches[this.searchPageIndex].length?this.initSearch(this.searchPageIndex,!1):this.nextSearch():(this.resetVariables(),this.searchIndex=0,this.textSearch(e)))},e.prototype.textSearch=function(e){if(""!==e||e){if(this.searchString=e,this.isTextSearch=!0,this.searchPageIndex=this.pdfViewerBase.currentPageNumber-1,this.searchCount=0,this.isTextSearchEventTriggered=!1,this.showLoadingIndicator(!0),this.pdfViewer.fireTextSearchStart(e,this.isMatchCase),this.pdfViewer.isExtractText)if(this.isTextRetrieved)for(t=0;t<this.pdfViewerBase.pageCount;t++)this.initSearch(t,!1,!0);else{this.isTextSearched=!0;for(var t=0;t<this.documentTextCollection.length;t++)this.initSearch(t,!1,!0)}this.initSearch(this.searchPageIndex,!1),this.highlightOthers()}},e.prototype.nextSearch=function(){this.isPrevSearch=!1,this.isTextSearch=!0,this.searchString?(this.clearAllOccurrences(),this.searchIndex=this.searchIndex+1,this.searchMatches[this.searchPageIndex]?(this.searchIndex>=this.searchMatches[this.searchPageIndex].length||this.searchPageIndex!==this.pdfViewerBase.currentPageNumber-1?(this.searchIndex=0,this.searchPageIndex=this.searchPageIndex+1<this.pdfViewerBase.pageCount?this.searchPageIndex+1:0,this.initSearch(this.searchPageIndex,!1),this.showLoadingIndicator(!0)):(this.highlightSearchedTexts(this.searchPageIndex,!1),this.showLoadingIndicator(!1)),this.highlightOthers(!0)):this.initiateTextSearch(this.searchInput)):this.initiateTextSearch(this.searchInput)},e.prototype.prevSearch=function(){if(this.isPrevSearch=!0,this.isTextSearch=!0,this.searchString)this.clearAllOccurrences(),this.searchIndex=this.searchIndex-1,this.searchIndex<0?(this.searchPageIndex=this.searchPageIndex-1<0?this.pdfViewerBase.pageCount-1:this.searchPageIndex-1,this.initSearch(this.searchPageIndex,!1),this.showLoadingIndicator(!0)):(this.highlightSearchedTexts(this.searchPageIndex,!1),this.showLoadingIndicator(!1)),this.highlightOthers(!0);else{this.searchIndex=this.searchIndex-1,this.searchPageIndex=this.searchPageIndex-1<0?this.pdfViewerBase.pageCount-1:this.searchPageIndex-1;var e=this.searchInput.value;this.textSearch(e)}},e.prototype.initSearch=function(e,t,i){var n=this.pdfViewerBase.getStoredData(e),o=null,s=null,a=null;if(i){if(0!==this.documentTextCollection.length){var r=this.documentTextCollection[e][e],l=r.pageText?r.pageText:r.PageText;this.documentTextCollection[e]&&r&&this.getSearchTextContent(e,this.searchString,l,s,t,this.documentTextCollection[e])}}else n?(o=n.pageText,s=n.textContent,a=this.pdfViewerBase.textLayer.characterBound[e],this.textContents[e]=s,this.getPossibleMatches(e,this.searchString,o,s,t,a)):t||this.createRequestForSearch(e);this.pdfViewerBase.pageCount===(this.searchMatches&&this.searchMatches.length)&&(this.isTextSearchEventTriggered||(this.isTextSearchEventTriggered=!0,this.pdfViewer.fireTextSearchComplete(this.searchString,this.isMatchCase)))},e.prototype.getPossibleMatches=function(e,t,i,n,o,s){if(this.searchMatches&&!this.searchMatches[e]){var a=i,r=t,l=t.length;this.isMatchCase||(r=t.toLowerCase(),a=i.toLowerCase());for(var d=[],u=-l,M=-l;0!==u&&""!==r&&" "!==r&&r;){if(u=a.indexOf(r,u+l),-1!==r.indexOf(" ")){var p=t.replace(" ","\r\n");(M=a.indexOf(p,M+l))<=-1||M<u&&d.push(M)}if(u<=-1&&M<=-1)break;u<=-1||d.push(u),M>u&&!(M<=-1)&&d.push(M)}this.searchMatches&&(this.searchMatches[e]=d)}if(o||(-1===this.searchedPages.indexOf(e)&&this.searchedPages.push(e),this.updateSearchInputIcon(!1)),this.searchMatches&&this.searchMatches[e]&&0!==this.searchMatches[e].length)o||(this.isPrevSearch&&(this.searchIndex=this.searchMatches[e].length-1),this.pdfViewerBase.currentPageNumber-1!==this.searchPageIndex&&(this.searchMatches.length>0&&(0===this.searchIndex||-1===this.searchIndex)&&this.searchPageIndex===this.currentSearchIndex&&(this.isMessagePopupOpened||this.onMessageBoxOpen(),this.searchPageIndex=this.getSearchPage(this.pdfViewerBase.currentPageNumber-1),this.searchedPages=[]),this.pdfViewerBase.updateScrollTop(this.searchPageIndex))),this.highlightSearchedTexts(e,o);else if(!o)if(this.isPrevSearch?this.searchPageIndex=this.searchPageIndex-1<0?this.pdfViewerBase.pageCount-1:this.searchPageIndex-1:this.searchPageIndex=this.searchPageIndex+1<this.pdfViewerBase.pageCount?this.searchPageIndex+1:0,-1===this.searchedPages.indexOf(this.searchPageIndex)&&this.searchedPages.length!==this.pdfViewerBase.pageCount)this.showLoadingIndicator(!0),this.initSearch(this.searchPageIndex,!1);else{var h=this.getSearchPage(e);this.searchMatches&&0===this.searchMatches[this.searchPageIndex].length&&this.searchedPages.length===this.pdfViewerBase.pageCount?this.isMessagePopupOpened||this.onMessageBoxOpen():this.searchMatches&&this.searchMatches.length>0&&(0===this.searchIndex||-1===this.searchIndex)&&h===this.currentSearchIndex&&(this.isPrevSearch?(this.isMessagePopupOpened||this.onMessageBoxOpen(),this.searchPageIndex=h,this.searchedPages=[],this.searchIndex=-1):(this.isMessagePopupOpened||this.onMessageBoxOpen(),this.searchPageIndex=h,this.searchedPages=[],this.searchIndex=0),this.highlightSearchedTexts(this.searchPageIndex,o))}},e.prototype.getSearchTextContent=function(e,t,i,n,o,s){var a=i,r=t,l=t.length;this.isMatchCase||(r=t.toLowerCase(),a=i.toLowerCase());for(var d=[],u=-l,M=-l;0!==u&&""!==r&&" "!==r&&r;){if(u=a.indexOf(r,u+l),-1!==r.indexOf(" ")){var p=t.replace(" ","\r\n");(M=a.indexOf(p,M+l))<=-1||M<u&&d.push(M)}if(u<=-1&&M<=-1)break;u<=-1||d.push(u),M>u&&!(M<=-1)&&d.push(M)}0!==d.length&&(this.searchCount=this.searchCount+d.length),this.searchMatches[e]=d},e.prototype.getSearchPage=function(e){var t=null;if(this.isPrevSearch){for(i=e;i>=0;i--)if(i!==e&&this.searchMatches[i]){t=i;break}if(!t)for(n=this.pdfViewerBase.pageCount-1;n>e;n--)if(this.searchMatches[n]){t=n;break}}else{for(var i=e;i<this.pdfViewerBase.pageCount;i++)if(i!==e&&this.searchMatches[i]){t=i;break}if(!t)if(0===e)t=e;else for(var n=0;n<e;n++)if(this.searchMatches[n]){t=n;break}}return t},e.prototype.highlightSearchedTexts=function(e,t){var i,n=this.searchMatches[e],o={y:-100,x:-100},s=this.pdfViewerBase.textLayer.characterBound[e];if(s){for(var a=0;a<n.length;a++)i=a===this.searchIndex&&e===this.searchPageIndex?"e-pv-search-text-highlight":"e-pv-search-text-highlightother",this.addDivForSearch(a,e,s,this.searchString.length,i);if(e===this.searchPageIndex&&!t){var r=this.pdfViewerBase.getElement("_searchtext_"+e+"_"+this.searchIndex);if(r){d=this.getScrollElement(r);this.scrollToSearchStr(d,o)}else{this.pdfViewerBase.updateScrollTop(e);var l=this.pdfViewerBase.getElement("_searchtext_"+e+"_"+this.searchIndex);if(l){var d=this.getScrollElement(l);this.scrollToSearchStr(d,o)}}}}},e.prototype.addDivForSearch=function(e,i,n,o,s){var a=this.pdfViewerBase.getElement("_textLayer_"+i);t.isNullOrUndefined(a)&&"e-pv-search-text-highlight"===s&&this.pdfViewer.navigation&&this.pdfViewer.navigation.goToPage(i+1);for(var r=this.searchMatches[i][e],l=r,d=0;r<l+o;)r=this.addDivElement(r,n,o,s,e,i,l,d),d++;"e-pv-search-text-highlight"===s&&this.showLoadingIndicator(!1)},e.prototype.addDivElement=function(e,t,i,n,o,s,a,r){var l=0,d=0,u=0,M=0,p=!1;t[e]&&(M=t[e].X,u=t[e].Y);var h=0;for(e-a!=0&&(h=e-a,i+=1),h=h;h<i;h++)t[e]&&(M>(w=t[e]).X&&(p=!0),l=l>(c=(u=u<w.Y?u:w.Y)<w.Y?w.Y-u:u-w.Y)+w.Height?l:c+w.Height,e++);var L=!1;if(p){var w=t[a+i-1];M=w.X,d=t[a].X-t[a+i-1].X;var c=(u=u<w.Y?u:w.Y)<w.Y?w.Y-u:u-w.Y;l=l>c+w.Height?l:c+w.Height;for(var C=t[a-1].Y-t[a].Y,g=a+i-1;g>=a;g--)0===(w=t[g]).Width&&(C=w.Y-t[g-1].Y);d+=C}else a+i!==e?(L=!0,t[e-1]&&(d=t[e-1].X-M)):(L=!1,t[e]?d=t[e].X-M:t[e-1]&&(d=t[e-1].X-M));return this.createSearchTextDiv(o,s,l,d,u,M,n,L,r),e},e.prototype.createSearchTextDiv=function(e,i,n,o,s,a,r,l,d){var u="_searchtext_"+i+"_"+e;if(l&&(u+="_"+d),!this.pdfViewerBase.getElement(u)){var M=t.createElement("div",{id:this.pdfViewer.element.id+u});if(M.style.height=n*this.pdfViewerBase.getZoomFactor()+"px",M.style.width=o*this.pdfViewerBase.getZoomFactor()+"px",M.style.top=s*this.pdfViewerBase.getZoomFactor()+"px",M.style.left=a*this.pdfViewerBase.getZoomFactor()+"px",M.classList.add(r),"e-pv-search-text-highlight"===r){M.style.backgroundColor=""===this.pdfViewer.textSearchColorSettings.searchHighlightColor?"#fdd835":this.pdfViewer.textSearchColorSettings.searchHighlightColor;var p={left:a,top:s,width:o,height:n};this.pdfViewer.fireTextSearchHighlight(this.searchString,this.isMatchCase,p,i+1)}else"e-pv-search-text-highlightother"===r&&(M.style.backgroundColor=""===this.pdfViewer.textSearchColorSettings.searchColor?"#8b4c12":this.pdfViewer.textSearchColorSettings.searchColor);var h=this.pdfViewerBase.getElement("_textLayer_"+i);h&&h.appendChild(M)}},e.prototype.isClassAvailable=function(){for(var e=!1,t=0;t<this.tempElementStorage.length;t++)if(this.tempElementStorage[t].classString&&("e-pv-search-text-highlight"===this.tempElementStorage[t].classString||"e-pv-search-text-highlightother"===this.tempElementStorage[t].classString)){e=!0;break}return e},e.prototype.getScrollElement=function(e){var t=e;if(e.childNodes.length>0)for(var i=0;i<e.childNodes.length;i++)e.childNodes[i].classList&&e.childNodes[i].classList.contains("e-pv-search-text-highlight")&&(t=e.childNodes[i]);return t},e.prototype.scrollToSearchStr=function(e,i){for(var n=e.offsetParent,o=e.offsetTop+e.clientTop,s=e.offsetLeft+e.clientLeft;n.id!==this.pdfViewerBase.viewerContainer.id;)o+=n.offsetTop,s+=n.offsetLeft,n=n.offsetParent;i&&(o+=i.y,s+=i.x,t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?n.scrollLeft=s:this.pdfViewerBase.getZoomFactor()>1.5&&(n.scrollLeft=s)),n.scrollTop=o,this.pdfViewerBase.updateMobileScrollerPosition()},e.prototype.resizeSearchElements=function(e){for(var t=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+"_searchtext_"+e+'"]'),i=0;i<t.length;i++){var n=t[i],o=1;this.pdfViewer.magnificationModule&&(o=this.pdfViewer.magnificationModule.previousZoomFactor);var s=e+"_"+o+"_"+this.pdfViewerBase.getZoomFactor();n.getAttribute("name")!==s&&(n.style.width=parseFloat(n.style.width)/o*this.pdfViewerBase.getZoomFactor()+"px",n.style.height=parseFloat(n.style.height)/o*this.pdfViewerBase.getZoomFactor()+"px",n.style.top=parseFloat(n.style.top)/o*this.pdfViewerBase.getZoomFactor()+"px",n.style.left=parseFloat(n.style.left)/o*this.pdfViewerBase.getZoomFactor()+"px",n.setAttribute("name",s))}},e.prototype.highlightOtherOccurrences=function(e){this.initSearch(e,!0)},e.prototype.highlightOthers=function(e){for(var t=this.getIndexes(),i=parseFloat(t.lowerPageValue.toString()),n=parseFloat(t.higherPageValue.toString()),o=i;o<=n;o++)this.highlightOtherOccurrences(o);e&&this.showLoadingIndicator(!1)},e.prototype.clearAllOccurrences=function(){for(var e=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+'_searchtext_"]'),t=0;t<e.length;t++)e[t].parentElement.removeChild(e[t])},e.prototype.getIndexes=function(){var e=this.pdfViewerBase.currentPageNumber-3;e=e>0?e:0;var t=this.pdfViewerBase.currentPageNumber+1;return t=t<this.pdfViewerBase.pageCount?t:this.pdfViewerBase.pageCount-1,{lowerPageValue:e,higherPageValue:t}},e.prototype.applyTextSelection=function(){if(this.pdfViewer.textSelectionModule&&!this.pdfViewerBase.isTextSelectionDisabled)for(var e=this.getIndexes(),t=parseFloat(e.lowerPageValue.toString()),i=parseFloat(e.higherPageValue.toString()),n=t;n<=i;n++)this.pdfViewer.textSelectionModule.applySelectionRangeOnScroll(n)},e.prototype.resetTextSearch=function(){this.resetVariables(),this.onTextSearchClose(),this.searchPageIndex=null,this.searchIndex=0,this.updateSearchInputIcon(!0),this.enableNextButton(!1),this.enablePrevButton(!1),this.documentTextCollection=[],this.isTextRetrieved=!1,this.isTextSearched=!1},e.prototype.onTextSearchClose=function(){this.isPrevSearch=!1,this.isTextSearch=!1,this.pdfViewerBase.pageCount>0&&this.clearAllOccurrences()},e.prototype.createRequestForSearch=function(e){var t=this,i=this.pdfViewer.element.clientHeight,n=this.pdfViewerBase.pageSize[e].width,o=(this.pdfViewerBase.pageSize[e].height,this.pdfViewerBase.getTileCount(n)),s=816>=n?1:o,a=816>=n?1:o,r=this.pdfViewer.tileRenderingSettings;r.enableTileRendering&&r.x>0&&r.y>0&&(s=816>=n?1:r.x,a=816>=n?1:r.y);for(var l=0;l<s;l++)for(var d=0;d<a;d++){var u=void 0;u={xCoordinate:0,yCoordinate:0,pageNumber:e,viewPortWidth:816,viewPortHeight:i,documentId:t.pdfViewerBase.getDocumentId(),hashId:t.pdfViewerBase.hashId,zoomFactor:t.pdfViewerBase.getZoomFactor(),tilecount:o,action:"Search",elementId:t.pdfViewer.element.id,uniqueId:t.pdfViewerBase.documentId,tileXCount:s,tileYCount:a},this.pdfViewerBase.jsonDocumentId&&(u.documentId=this.pdfViewerBase.jsonDocumentId),this.searchRequestHandler=new ti(this.pdfViewer),this.searchRequestHandler.url=this.pdfViewer.serviceUrl+"/"+this.pdfViewer.serverActionSettings.renderPages,this.searchRequestHandler.responseType="json",this.searchRequestHandler.send(u),this.searchRequestHandler.onSuccess=function(i){var o=i.data;if(o){if("object"!=typeof o)try{o=JSON.parse(o)}catch(e){t.pdfViewerBase.onControlError(500,o,this.pdfViewer.serverActionSettings.renderPages),o=null}if(o&&o.pageText&&o.uniqueId===t.pdfViewerBase.documentId){t.pdfViewer.fireAjaxRequestSuccess(this.pdfViewer.serverActionSettings.renderPages,o);var s=void 0!==o.pageNumber?o.pageNumber:e;816>=n?t.pdfViewerBase.storeWinData(o,s):t.pdfViewerBase.storeWinData(o,s,o.tileX,o.tileY),t.initSearch(e,!1)}}},this.searchRequestHandler.onFailure=function(e){t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,this.pdfViewer.serverActionSettings.renderPages)},this.searchRequestHandler.onError=function(e){t.pdfViewerBase.openNotificationPopup(),t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,this.pdfViewer.serverActionSettings.renderPages)}}},e.prototype.getPDFDocumentTexts=function(){var e=50,t=this.pdfViewerBase.pageCount;e>=t&&(e=t),this.createRequestForGetPdfTexts(0,e)},e.prototype.createRequestForGetPdfTexts=function(e,t){var i,n=this;i={pageStartIndex:e,pageEndIndex:t,documentId:n.pdfViewerBase.getDocumentId(),hashId:n.pdfViewerBase.hashId,action:"RenderPdfTexts",elementId:n.pdfViewer.element.id,uniqueId:n.pdfViewerBase.documentId},this.pdfViewerBase.jsonDocumentId&&(i.documentId=this.pdfViewerBase.jsonDocumentId),this.searchRequestHandler=new ti(this.pdfViewer),this.searchRequestHandler.url=this.pdfViewer.serviceUrl+"/"+this.pdfViewer.serverActionSettings.renderTexts,this.searchRequestHandler.responseType="json",this.searchRequestHandler.send(i),this.searchRequestHandler.onSuccess=function(i){var o=i.data;if(o){if("object"!=typeof o)try{o=JSON.parse(o)}catch(e){n.pdfViewerBase.onControlError(500,o,this.pdfViewer.serverActionSettings.renderTexts),o=null}if(o&&o.documentTextCollection&&o.uniqueId===n.pdfViewerBase.documentId){n.pdfViewer.fireAjaxRequestSuccess(this.pdfViewer.serverActionSettings.renderTexts,o),n.documentTextCollection.length>0?(n.documentTextCollection=o.documentTextCollection.concat(n.documentTextCollection),n.documentTextCollection=n.orderPdfTextCollections(n.documentTextCollection)):n.documentTextCollection=o.documentTextCollection;var s=n.pdfViewerBase.pageCount;t!==s?(e=t,(t+=50)>=s&&(t=s),n.createRequestForGetPdfTexts(e,t)):(n.isTextRetrieved=!0,n.pdfViewer.fireTextExtractionCompleted(n.documentTextCollection),n.isTextSearched&&n.searchString.length>0&&(n.textSearch(n.searchString),n.isTextSearched=!1))}}},this.searchRequestHandler.onFailure=function(e){n.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,this.pdfViewer.serverActionSettings.renderTexts)},this.searchRequestHandler.onError=function(e){n.pdfViewerBase.openNotificationPopup(),n.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,this.pdfViewer.serverActionSettings.renderTexts)}},e.prototype.orderPdfTextCollections=function(e){for(var t=[],i=0;i<e.length;i++)if(0===t.length)t.push(e[i]);else if(parseInt(Object.keys(e[i])[0])>parseInt(Object.keys(t[t.length-1])[0]))t.push(e[i]);else for(var n=0;n<t.length;n++)if(parseInt(Object.keys(e[i])[0])<parseInt(Object.keys(t[n])[0])){t.splice(n,0,e[i]);break}return t},e.prototype.createSearchBoxButtons=function(e,i){var n=t.createElement("button",{id:this.pdfViewer.element.id+"_"+e,className:"e-btn e-icon-btn e-pv-search-btn "+i});n.setAttribute("type","button");var o=t.createElement("span",{id:this.pdfViewer.element.id+"_"+e+"Icon",className:"e-pv-icon-search "+i+"-icon"});return n.disabled=!0,n.appendChild(o),n},e.prototype.enablePrevButton=function(e){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(e?this.prevSearchBtn.removeAttribute("disabled"):this.prevSearchBtn.disabled=!0)},e.prototype.enableNextButton=function(e){t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(e?this.nextSearchBtn.removeAttribute("disabled"):this.nextSearchBtn.disabled=!0)},e.prototype.resetVariables=function(){this.searchedPages=[],this.searchMatches=new Array},e.prototype.searchButtonClick=function(e,i){this.isMessagePopupOpened=!1,t.isBlazor()&&t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(e=this.pdfViewerBase.getElement("_search_box-icon").children[0].children[0],i=this.pdfViewerBase.getElement("_search_input")),e.classList.contains("e-pv-search-icon")?this.initiateTextSearch(i):e.classList.contains("e-pv-search-close")&&(this.showLoadingIndicator(!1),i.value="",this.resetTextSearch(),i.focus())},e.prototype.updateSearchInputIcon=function(e){t.isBlazor()&&this.searchBtn&&t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.searchBtn=this.pdfViewerBase.getElement("_search_box-icon").children[0].children[0]),this.searchBtn&&(e?(this.searchBtn.classList.remove("e-pv-search-close"),this.searchBtn.classList.add("e-pv-search-icon")):(this.searchBtn.classList.remove("e-pv-search-icon"),this.searchBtn.classList.add("e-pv-search-close")))},e.prototype.onMessageBoxOpen=function(){this.showLoadingIndicator(!1),this.pdfViewerBase.getElement("_search_input").blur(),this.isMessagePopupOpened=!0,!t.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.pdfViewerBase.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant("No matches")):this.pdfViewerBase.navigationPane.createTooltipMobile(this.pdfViewer.localeObj.getConstant("No Text Found"))},e.prototype.searchText=function(e,t){this.searchString=e,this.isMatchCase=t,this.searchIndex=0,this.textSearch(e)},e.prototype.searchNext=function(){this.nextSearch()},e.prototype.searchPrevious=function(){this.prevSearch()},e.prototype.cancelTextSearch=function(){this.resetTextSearch()},e.prototype.destroy=function(){this.searchMatches=void 0},e.prototype.getModuleName=function(){return"TextSearch"},e}(),Mn=function(){function e(e,t){this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.print=function(){var e,i=this;this.pdfViewerBase.pageCount>0&&(this.printViewerContainer=t.createElement("div",{id:this.pdfViewer.element.id+"_print_viewer_container",className:"e-pv-print-viewer-container"}),"Default"===this.pdfViewer.printMode?(this.pdfViewerBase.showPrintLoadingIndicator(!0),this.iframe=document.createElement("iframe"),this.iframe.className="iframeprint",this.iframe.id="iframePrint",this.iframe.style.position="fixed",this.iframe.style.top="-100000000px",document.body.appendChild(this.iframe),this.frameDoc=this.iframe.contentWindow?this.iframe.contentWindow:this.iframe.contentDocument,this.frameDoc.document.open()):(this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight),this.createPrintLoadingIndicator(this.printWindow.document.body)),setTimeout(function(){for(e=0;e<i.pdfViewerBase.pageCount;e++){var t=i.pdfViewerBase.pageSize[e].width,n=i.pdfViewerBase.pageSize[e].height;i.pdfViewer.printModule.createRequestForPrint(e,t,n,i.pdfViewerBase.pageCount)}i.pdfViewer.firePrintEnd(i.pdfViewer.downloadFileName)},100))},e.prototype.createRequestForPrint=function(e,i,n,o){var s=this,a={pageNumber:e,documentId:this.pdfViewerBase.documentId,hashId:this.pdfViewerBase.hashId,zoomFactor:2,action:"PrintImages",elementId:this.pdfViewer.element.id,uniqueId:this.pdfViewerBase.documentId};this.pdfViewerBase.jsonDocumentId&&(a.documentId=this.pdfViewerBase.jsonDocumentId),s.pdfViewerBase.createFormfieldsJsonData(),s.printRequestHandler=new ti(s.pdfViewer),s.printRequestHandler.url=s.pdfViewer.serviceUrl+"/"+s.pdfViewer.serverActionSettings.print,s.printRequestHandler.responseType=null,s.printRequestHandler.mode=!1,this.pdfViewerBase.validateForm&&this.pdfViewer.enableFormFieldsValidation?(this.pdfViewer.fireValidatedFailed(s.pdfViewer.serverActionSettings.download),this.pdfViewerBase.validateForm=!1,this.pdfViewerBase.showPrintLoadingIndicator(!1)):s.printRequestHandler.send(a),s.printRequestHandler.onSuccess=function(o){s.pdfViewerBase.isPrint=!0;var a=o.data;if(a&&"object"!=typeof a)try{"object"!=typeof(a=JSON.parse(a))&&(s.pdfViewerBase.onControlError(500,a,s.pdfViewer.serverActionSettings.print),a=null)}catch(e){s.pdfViewerBase.onControlError(500,a,s.pdfViewer.serverActionSettings.print),a=null}if(a&&a.uniqueId===s.pdfViewerBase.documentId){s.pdfViewer.fireAjaxRequestSuccess(s.pdfViewer.serverActionSettings.print,a);var r="";if(!s.pdfViewer.annotationSettings.skipPrint){var l=s.pdfViewerBase.documentAnnotationCollections;if(l&&l[a.pageNumber]&&s.pdfViewerBase.isTextMarkupAnnotationModule()){var d=l[a.pageNumber];if(s.pdfViewerBase.isImportAction){var u=d.textMarkupAnnotation,M=d.shapeAnnotation,p=d.measureShapeAnnotation,h=d.stampAnnotations,L=d.stickyNotesAnnotation;r=s.pdfViewer.annotationModule.textMarkupAnnotationModule.printTextMarkupAnnotations(u,a.pageNumber,h,M,p,L)}else r=s.pdfViewer.annotationModule.textMarkupAnnotationModule.printTextMarkupAnnotations(d.textMarkupAnnotation,a.pageNumber,d.stampAnnotations,d.shapeAnnotation,d.measureShapeAnnotation,d.stickyNoteAnnotation)}s.pdfViewerBase.isAnnotationCollectionRemoved&&(r=s.pdfViewer.annotationModule.textMarkupAnnotationModule.printTextMarkupAnnotations(null,a.pageNumber,null,null,null,null))}var w=a.pageNumber;s.printCanvas=t.createElement("canvas",{id:s.pdfViewer.element.id+"_printCanvas_"+e,className:"e-pv-print-canvas"}),s.printCanvas.style.width=i+"px",s.printCanvas.style.height=n+"px";s.printCanvas.height=1584*window.devicePixelRatio,s.printCanvas.width=1224*window.devicePixelRatio;var c=s.printCanvas.getContext("2d"),C=new Image,g=new Image;C.onload=function(){n>i?(c.drawImage(C,0,0,s.printCanvas.width,s.printCanvas.height),r&&c.drawImage(g,0,0,s.printCanvas.width,s.printCanvas.height)):(c.translate(.5*s.printCanvas.width,.5*s.printCanvas.height),c.rotate(-.5*Math.PI),c.translate(.5*-s.printCanvas.height,.5*-s.printCanvas.width),c.drawImage(C,0,0,s.printCanvas.height,s.printCanvas.width),r&&c.drawImage(g,0,0,s.printCanvas.height,s.printCanvas.width)),w===s.pdfViewerBase.pageCount-1&&s.printWindowOpen(),s.pdfViewer.renderDrawing(null,e)},C.src=a.image,g.src=r,s.printViewerContainer.appendChild(s.printCanvas)}s.pdfViewerBase.isPrint=!1},this.printRequestHandler.onFailure=function(e){s.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,s.pdfViewer.serverActionSettings.print)},this.printRequestHandler.onError=function(e){s.pdfViewerBase.openNotificationPopup(),s.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,s.pdfViewer.serverActionSettings.print)}},e.prototype.renderFieldsForPrint=function(e,t,i){var n,o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields"),s=JSON.parse(o);if(n="Default"===this.pdfViewer.printMode?this.frameDoc.document.getElementById("fields_"+e):this.printWindow.document.getElementById("fields_"+e),s)for(m=0;m<s.length;m++){var a=s[m];if(parseFloat(a.PageIndex)===e){var r=this.pdfViewer.formFieldsModule.createFormFields(a,e,m,n);if(r){var l=a.LineBounds,d=a.Font;if(this.applyPosition(r,l,d,t,i),r.InsertSpaces=a.InsertSpaces,r.InsertSpaces){var u=parseInt(r.style.width)/r.maxLength-parseInt(r.style.fontSize)/2-.5;r.style.letterSpacing=u+"px",r.style.fontFamily="monospace"}var M=this.pdfViewerBase.pageSize[e];if(M.width>M.height){r.style.transform="rotate(-90deg)";var p=parseFloat(r.style.left),h=parseFloat(r.style.width)/2,L=parseFloat(r.style.height)/2,w=parseFloat(r.style.top),c=parseFloat(r.style.height);r.style.left=L-h+w+"px",r.style.top=M.width-c-(h-L+p)+"px"}r.style.backgroundColor="transparent",a.IsSignatureField||(r.style.borderColor="transparent"),n.appendChild(r)}}}var C=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner");if(null!==C)for(var g=JSON.parse(C),m=0;m<g.length;m++)if((a=g[m].FormField).pageNumber-1===e&&a.isPrint){var f=this.pdfViewer.nameTable[g[m].Key.split("_")[0]],y=f.wrapper.children[0],j=void 0;if(y)if("RadioButton"===a.formFieldAnnotationType){for(var S=0;S<a.radiobuttonItem.length;S++)if(f=this.pdfViewer.nameTable[a.radiobuttonItem[S].id.split("_")[0]],j=this.createFormDesignerFields(a.radiobuttonItem[S],y,f)){var l=a.radiobuttonItem[S].lineBound,d=a.radiobuttonItem[S].fontFamily;this.applyPosition(j,l,d,t,i,!0,a.radiobuttonItem[S].zoomValue),n.appendChild(j)}}else if(j=this.createFormDesignerFields(a,y,f)){var l=a.lineBound,d=a.fontFamily;this.applyPosition(j,l,d,t,i,!0,a.zoomValue),n.appendChild(j)}}},e.prototype.createFormDesignerFields=function(e,t,i){var n,o,s={id:"form_field_"+t.id+"_html_element",class:"foreign-object"};o=this.pdfViewer.formDesignerModule.createHtmlElement("div",s);var a={id:t.id+"_html_element",class:"foreign-object"};return n=this.pdfViewer.formDesignerModule.createHtmlElement("div",a),"SignatureField"===e.formFieldAnnotationType||"InitialField"===e.formFieldAnnotationType?(this.pdfViewer.formDesignerModule.disableSignatureClickEvent=!0,t.template=n.appendChild(this.pdfViewer.formDesignerModule.createSignatureDialog(this.pdfViewer,i,null,!0)),this.pdfViewer.formDesignerModule.disableSignatureClickEvent=!1):"DropdownList"===e.formFieldAnnotationType?t.template=n.appendChild(this.pdfViewer.formDesignerModule.createDropDownList(t,i)):"ListBox"===e.formFieldAnnotationType?t.template=n.appendChild(this.pdfViewer.formDesignerModule.createListBox(t,i)):t.template=n.appendChild(this.pdfViewer.formDesignerModule.createInputElement(e.formFieldAnnotationType,i,null,!0)),o.appendChild(n),n},e.prototype.applyPosition=function(e,i,n,o,s,a,r){if(i){var l=a?i.X/r/s:this.pdfViewer.formFieldsModule.ConvertPointToPixel(i.X)/s,d=a?i.Y/r/o:this.pdfViewer.formFieldsModule.ConvertPointToPixel(i.Y)/o,u=a?i.Width/r/s:this.pdfViewer.formFieldsModule.ConvertPointToPixel(i.Width)/s,M=a?i.Height/r/o:this.pdfViewer.formFieldsModule.ConvertPointToPixel(i.Height)/o,p=0;null!==n&&n.Height&&(e.style.fontfamily=n.Name,n.Italic&&(e.style.fontStyle="italic"),n.Bold&&(e.style.fontWeight="Bold"),p=this.pdfViewer.formFieldsModule.ConvertPointToPixel(n.Size)),t.Browser.isIE&&(d-=1),this.pdfViewer.formFieldsModule.setStyleToTextDiv(e,l,d,p,u,M,!0)}},e.prototype.printWindowOpen=function(){var e,i=this,n=navigator.userAgent;e="Default"===this.pdfViewer.printMode?this.frameDoc.document:this.printWindow.document,-1!==n.indexOf("Chrome")||-1!==n.indexOf("Safari")||-1!==n.indexOf("Firefox")?(e.write("<!DOCTYPE html>"),e.write('<html moznomarginboxes mozdisallowselectionprint><head><style>html, body { height: 100%; } img { height: 100%; width: 100%; display: block; }@media print { body { margin: 0cm; } img { width:100%; max-width: 1048px; box-sizing: border-box; }br, button { display: none; } div{ page-break-inside: avoid; }} @page{margin:0mm; size: 816px 1056px;}</style></head><body><center class="loader">')):(e.write("<!DOCTYPE html>"),e.write("<html><head><style>html, body { height: 100%; } img { height: 100%; width: 100%; }@media print { body { margin: 0cm; }img { width:100%; max-width: 1048px; box-sizing: border-box; }br, button { display: none; } div{ page-break-inside: avoid; }} @page{margin:0mm; size: 816px 1056px;}</style></head><body><center>"));for(var o=0;o<this.printViewerContainer.children.length;o++){var s=this.printViewerContainer.children[o].toDataURL();if(e.write('<div style="margin:0mm;width:816px;height:1056px;position:relative"><img src="'+s+'" id="image_'+o+'" /><div id="fields_'+o+'" style="margin:0px;top:0px;left:0px;position:absolute;width:816px;height:1056px;z-index:2"></div></div>'),this.pdfViewer.formFieldsModule){var a,r,l=this.pdfViewerBase.pageSize[o].width,d=this.pdfViewerBase.pageSize[o].height;d<l?(a=d/816,r=l/1056):(a=d/1056,r=l/816),this.renderFieldsForPrint(o,a,r)}}if(t.Browser.isIE||"edge"===t.Browser.info.name)try{"Default"===this.pdfViewer.printMode?(this.pdfViewerBase.showPrintLoadingIndicator(!1),this.iframe.contentWindow.document.execCommand("print",!1,null)):this.printWindow.document.execCommand("print",!1,null)}catch(e){"Default"===this.pdfViewer.printMode?(this.pdfViewerBase.showPrintLoadingIndicator(!1),this.iframe.contentWindow.print()):this.printWindow.print()}else setTimeout(function(){"Default"===i.pdfViewer.printMode?(i.pdfViewerBase.showPrintLoadingIndicator(!1),i.iframe.contentWindow.print(),i.iframe.contentWindow.focus(),document.body.removeChild(i.iframe)):i.printWindow&&(i.printWindow.print(),i.printWindow.focus(),i.printWindow.close())},200)},e.prototype.createPrintLoadingIndicator=function(e){var i=t.createElement("div",{id:this.pdfViewer.element.id+"_printWindowcontainer"});i.style.height="100%",i.style.width="100%",i.style.position="absolute",i.style.zIndex=2e3,i.style.left=0,i.style.top=0,i.style.overflow="auto",i.style.backgroundColor="rgba(0, 0, 0, 0.3)",e.appendChild(i);var n=t.createElement("div",{id:this.pdfViewer.element.id+"_printLoadingContainer"});n.style.position="absolute",n.style.width="50px",n.style.height="50px",n.style.left="46%",n.style.top="45%",i.style.zIndex=3e3,i.appendChild(n);var o=new Image;o.src="data:image/gif;base64,R0lGODlhNgA3APMAAP///wAAAHh4eBwcHA4ODtjY2FRUVNzc3MTExEhISIqKigAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAANgA3AAAEzBDISau9OOvNu/9gKI5kaZ4lkhBEgqCnws6EApMITb93uOqsRC8EpA1Bxdnx8wMKl51ckXcsGFiGAkamsy0LA9pAe1EFqRbBYCAYXXUGk4DWJhZN4dlAlMSLRW80cSVzM3UgB3ksAwcnamwkB28GjVCWl5iZmpucnZ4cj4eWoRqFLKJHpgSoFIoEe5ausBeyl7UYqqw9uaVrukOkn8LDxMXGx8ibwY6+JLxydCO3JdMg1dJ/Is+E0SPLcs3Jnt/F28XXw+jC5uXh4u89EQAh+QQJCgAAACwAAAAANgA3AAAEzhDISau9OOvNu/9gKI5kaZ5oqhYGQRiFWhaD6w6xLLa2a+iiXg8YEtqIIF7vh/QcarbB4YJIuBKIpuTAM0wtCqNiJBgMBCaE0ZUFCXpoknWdCEFvpfURdCcM8noEIW82cSNzRnWDZoYjamttWhphQmOSHFVXkZecnZ6foKFujJdlZxqELo1AqQSrFH1/TbEZtLM9shetrzK7qKSSpryixMXGx8jJyifCKc1kcMzRIrYl1Xy4J9cfvibdIs/MwMue4cffxtvE6qLoxubk8ScRACH5BAkKAAAALAAAAAA2ADcAAATOEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwyZKxhqhgJJeSQVdraBNFSsVUVPHsEAzJrEtnJNSELXRN2bKcwjw19f0QG7PjA7B2EGfn+FhoeIiYoSCAk1CQiLFQpoChlUQwhuBJEWcXkpjm4JF3w9P5tvFqZsLKkEF58/omiksXiZm52SlGKWkhONj7vAxcbHyMkTmCjMcDygRNAjrCfVaqcm11zTJrIjzt64yojhxd/G28XqwOjG5uTxJhEAIfkECQoAAAAsAAAAADYANwAABM0QyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/i8qmCoGQoacT8FZ4AXbFopfTwEBhhnQ4w2j0GRkgQYiEOLPI6ZUkgHZwd6EweLBqSlq6ytricICTUJCKwKkgojgiMIlwS1VEYlspcJIZAkvjXHlcnKIZokxJLG0KAlvZfAebeMuUi7FbGz2z/Rq8jozavn7Nev8CsRACH5BAkKAAAALAAAAAA2ADcAAATLEMhJq7046827/2AojmRpnmiqrqwwDAJbCkRNxLI42MSQ6zzfD0Sz4YYfFwzJNCmPzheUyJuKijVrZ2cTlrg1LwjcO5HFyeoJeyM9U++mfE6v2+/4PD6O5F/YWiqAGWdIhRiHP4kWg0ONGH4/kXqUlZaXmJlMBQY1BgVuUicFZ6AhjyOdPAQGQF0mqzauYbCxBFdqJao8rVeiGQgJNQkIFwdnB0MKsQrGqgbJPwi2BMV5wrYJetQ129x62LHaedO21nnLq82VwcPnIhEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7/g8Po7kX9haKoAZZ0iFGIc/iRaDQ40Yfj+RepSVlpeYAAgJNQkIlgo8NQqUCKI2nzNSIpynBAkzaiCuNl9BIbQ1tl0hraewbrIfpq6pbqsioaKkFwUGNQYFSJudxhUFZ9KUz6IGlbTfrpXcPN6UB2cHlgfcBuqZKBEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhhh8XDMk0KY/OF5TIm4qKNWtnZxOWuDUvCNw7kcXJ6gl7Iz1T76Z8Tq/b7yJEopZA4CsKPDUKfxIIgjZ+P3EWe4gECYtqFo82P2cXlTWXQReOiJE5bFqHj4qiUhmBgoSFho59rrKztLVMBQY1BgWzBWe8UUsiuYIGTpMglSaYIcpfnSHEPMYzyB8HZwdrqSMHxAbath2MsqO0zLLorua05OLvJxEAIfkECQoAAAAsAAAAADYANwAABMwQyEmrvTjrzbv/YCiOZGmeaKqurDAMAlsKRE3EsjjYxJDrPN8PRLPhfohELYHQuGBDgIJXU0Q5CKqtOXsdP0otITHjfTtiW2lnE37StXUwFNaSScXaGZvm4r0jU1RWV1hhTIWJiouMjVcFBjUGBY4WBWw1A5RDT3sTkVQGnGYYaUOYPaVip3MXoDyiP3k3GAeoAwdRnRoHoAa5lcHCw8TFxscduyjKIrOeRKRAbSe3I9Um1yHOJ9sjzCbfyInhwt3E2cPo5dHF5OLvJREAOwAAAAAAAAAAAA==",o.style.width="50px",o.style.height="50px",n.appendChild(o);var s=t.createElement("div",{id:this.pdfViewer.element.id+"_printLabelContainer"});s.style.position="absolute",s.textContent="Loading ...",s.style.fontWeight="Bold",s.style.left="46%",s.style.top="54.5%",s.style.zIndex="3000",i.appendChild(s)},e.prototype.destroy=function(){this.printViewerContainer=void 0,this.frameDoc=void 0,this.printWindow=void 0},e.prototype.getModuleName=function(){return"Print"},e}(),pn=function(){function e(e,t){this.maintainTabIndex={},this.maintanMinTabindex={},this.isSignatureField=!1,this.isKeyDownCheck=!1,this.readOnlyCollection=[],this.isSignatureRendered=!1,this.signatureFieldCollection=[],this.selectedIndex=[],this.pdfViewer=e,this.pdfViewerBase=t}return e.prototype.renderFormFields=function(e){if(this.maxTabIndex=0,this.minTabIndex=-1,this.data=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields"),null!==this.data){this.formFieldsData=JSON.parse(this.data);var i=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+e),n=document.getElementById(this.pdfViewer.element.id+"_pageCanvas_"+e);if(null!==this.formFieldsData&&null!==n&&null!==i)for(var o=0;o<this.formFieldsData.length;o++){var s=this.formFieldsData[o];s.IsInitialField&&(s.Name="InitialField");var a=s.Font;if(this.pdfViewer.formDesigner){var r=void 0,l=void 0,d=void 0;null!==a&&a.Height&&(r=a.Name,a.Italic&&(l="Italic"),a.Bold&&(l="Bold"),a.Strikeout&&(l="Strikethrough"),a.Underline&&(l="Underline"),d=this.ConvertPointToPixel(a.Size));var u=2===s.Alignment?"right":1===s.Alignment?"center":"left",M=s.BackColor,p=s.LineBounds,h="rgba("+M.R+","+M.G+","+M.B+",1)";"#000000ff"===(h=this.rgbaToHex(h))&&(h="#daeaf7ff");var L=s.FontColor,w=this.ConvertPointToPixel(p.X),c=this.ConvertPointToPixel(p.Y),C=this.ConvertPointToPixel(p.Width),g=this.ConvertPointToPixel(p.Height),m="rgba("+L.R+","+L.G+","+L.B+",1)";m=this.rgbaToHex(m);var f=s.BorderColor,y="rgba("+f.R+","+f.G+","+f.B+",1)";y=this.rgbaToHex(y);var j=s.BorderWidth;this.selectedIndex=[];var S={bounds:{X:w,Y:c,Width:C,Height:g},pageNumber:parseFloat(s.PageIndex)+1,name:s.ActualFieldName,tooltip:s.ToolTip,value:s.Text,isChecked:s.Selected,isSelected:s.Selected,fontFamily:r,fontStyle:l,backgroundColor:h,color:m,borderColor:y,thickness:j,fontSize:d,isReadOnly:s.IsReadonly,isRequired:s.IsRequired,alignment:u,options:this.getListValues(s),selectedIndex:this.selectedIndex,maxLength:s.MaxLength,font:{isItalic:!t.isNullOrUndefined(a)&&a.Italic,isBold:!t.isNullOrUndefined(a)&&a.Bold,isStrikeout:!t.isNullOrUndefined(a)&&a.Strikeout,isUnderline:!t.isNullOrUndefined(a)&&a.Underline}};if(("SignatureText"!==s.Name||"SignatureImage"!==s.Name)&&!t.isNullOrUndefined(this.getFormFieldType(s))){var A=this.pdfViewer.formDesignerModule.addFormField(this.getFormFieldType(s),S);s.id=A.parentElement.id.split("_")[0]}"SignatureField"!==this.getFormFieldType(s)&&"InitialField"!==this.getFormFieldType(s)||(this.addSignaturePath(s),t.isNullOrUndefined(s.Value)||(this.renderExistingAnnnot(s,parseFloat(s.PageIndex)+1,null),this.isSignatureRendered=!0)),o===this.formFieldsData.length-1&&(this.pdfViewerBase.isLoadedFormFieldAdded=!0,window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_formfields"))}else{if(parseFloat(s.PageIndex)==e){var T=this.createFormFields(s,e,o);if(T){var x=this.createParentElement(s,e),p=s.LineBounds,N=s.Font;if(this.applyPosition(T,p,N,e,s.Rotation),T.InsertSpaces=s.InsertSpaces,T.InsertSpaces){var D=parseInt(T.style.width)/T.maxLength-parseInt(T.style.fontSize)/2-.5;T.style.letterSpacing=D+"px",T.style.fontFamily="monospace"}s.uniqueID=this.pdfViewer.element.id+"input_"+e+"_"+o;for(var b=0;b<this.pdfViewer.formFieldCollections.length;b++)"text"!==T.type&&"password"!==T.type&&"textarea"!==T.type||"SignatureField"===s.Name||s.uniqueID===this.pdfViewer.formFieldCollections[b].id&&(s.Value=this.pdfViewer.formFieldCollections[b].value,T.value=this.pdfViewer.formFieldCollections[b].value);if(this.applyCommonProperties(T,e,o,s),this.checkIsReadonly(s,T),this.applyTabIndex(s,T,e),this.checkIsRequiredField(s,T),this.applyDefaultColor(T),0===s.Rotation){var I=this.getAngle(e);x?x.style.transform="rotate("+I+"deg)":T.style.transform="rotate("+I+"deg)"}x?(x.appendChild(T),i.appendChild(x)):(T.style.position="absolute",i.appendChild(T)),T.addEventListener("focus",this.focusFormFields.bind(this)),T.addEventListener("blur",this.blurFormFields.bind(this)),T.addEventListener("click",this.updateFormFields.bind(this)),T.addEventListener("change",this.changeFormFields.bind(this)),T.addEventListener("keydown",this.updateFormFieldsValue.bind(this)),T.addEventListener("keyup",this.updateSameFieldsValue.bind(this))}}window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_formfields"),window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formfields",JSON.stringify(this.formFieldsData))}}}},e.prototype.trim=function(e){return e.replace(/^\s+|\s+$/gm,"")},e.prototype.rgbaToHex=function(e){var t=e.substring(e.indexOf("(")).split(","),i=parseInt(this.trim(t[0].substring(1)),10),n=parseInt(this.trim(t[1]),10),o=parseInt(this.trim(t[2]),10),s=parseFloat(parseFloat(this.trim(t[3].substring(0,t[3].length-1))).toFixed(2)),a=[i.toString(16),n.toString(16),o.toString(16),Math.round(255*s).toString(16).substring(0,2)];return a.forEach(function(e,t){1===e.length&&(a[t]="0"+e)}),"#"+a.join("")},e.prototype.getListValues=function(e){for(var t=e.TextList,i=[],n=0;n<t.length;n++)t[n]===e.SelectedValue&&this.selectedIndex.push(n),i.push({itemName:t[n],itemValue:t[n]});return"ListBox"===this.getFormFieldType(e)&&(this.selectedIndex=e.SelectedList),i},e.prototype.createParentElement=function(e,t){var i;if("Textbox"===e.Name||"Password"===e.Name){(i=document.createElement("div")).style.background="white",e.InsertSpaces&&(i.style.background="transparent");var n=e.LineBounds,o=e.Font;i.style.position="absolute",this.applyPosition(i,n,o,t,e.Rotation)}return i},e.prototype.getAngle=function(e){var t=0,i=this.pdfViewerBase.pageSize[e];if(i.rotation)switch(i.rotation){case 0:t=0;break;case 1:t=90;break;case 2:t=180;break;case 3:t=270}return t},e.prototype.nextField=function(){this.signatureFieldNavigate(!0)},e.prototype.previousField=function(){this.signatureFieldNavigate(!1)},e.prototype.signatureFieldNavigate=function(e){var t=e,i=this.signatureFieldCollection;0===i.length&&(i=this.getSignField());var n;if(this.currentTarget){for(var o=0;o<i.length;o++)if(n=i[o],this.currentTarget.id===n.uniqueID){this.currentTarget=document.getElementById(n.uniqueID),this.getSignatureIndex(o,i.length,t);break}}else e&&(n=i[0]).uniqueID&&(this.currentTarget=document.getElementById(n.uniqueID),this.getSignatureIndex(0,i.length,t,!0))},e.prototype.getSignatureIndex=function(e,t,i,n){var o=e;n||(i?o++:o--),1===t?this.renderSignatureField(0):o<t&&o>=0?this.renderSignatureField(o):i?o>=t&&this.renderSignatureField(0):o<=0&&this.renderSignatureField(t-1)},e.prototype.renderSignatureField=function(e){var t,i=e,n=this.signatureFieldCollection;if(i<n.length){for(var o=0;o<n.length;o++)if(n[i].uniqueID===n[o].uniqueID){this.pdfViewer.annotationModule.findRenderPageList(n[o].PageIndex)||this.pdfViewer.navigation.goToPage(n[o].PageIndex),this.currentTarget=document.getElementById(n[o].uniqueID),t=n[o];break}null===this.currentTarget&&(this.pdfViewer.navigation.goToPage(t.PageIndex),this.currentTarget=document.getElementById(t.uniqueID)),this.currentTarget&&("e-pdfviewer-signatureformfields-signature"===this.currentTarget.className?(document.getElementById(this.currentTarget.id).focus(),this.pdfViewer.select([this.currentTarget.id],null)):"e-pdfviewer-signatureformfields"===this.currentTarget.className&&document.getElementById(this.currentTarget.id).focus())}},e.prototype.setFocus=function(e){e?(this.removeFocus(),document.getElementById(e).classList.add("e-pv-signature-focus")):this.currentTarget&&document.getElementById(this.currentTarget.id).focus()},e.prototype.removeFocus=function(){if(this.signatureFieldCollection){var e=this.signatureFieldCollection;0===e.length&&(e=this.getSignField());for(var t=0;t<this.signatureFieldCollection.length;t++){var i=document.getElementById(this.signatureFieldCollection[t].uniqueID);i&&i.classList.remove("e-pv-signature-focus")}}},e.prototype.getSignField=function(){var e,t=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields");if(null!==t)for(var i=JSON.parse(t),n=0;n<i.length;n++)"SignatureField"===(e=i[n]).Name&&(e.uniqueID=this.pdfViewer.element.id+"input_"+e.PageIndex+"_"+n,this.signatureFieldCollection.push(i[n]));return this.signatureFieldCollection},e.prototype.formFieldCollections=function(){var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields");if(null!==e)for(var t=JSON.parse(e),i=0;i<t.length;i++){var n=t[i],o=n.Name;if("ink"!==n.Name){var s={name:this.retriveFieldName(n),id:this.pdfViewer.element.id+"input_"+parseFloat(n.PageIndex)+"_"+i,isReadOnly:!1,type:o,value:this.retriveCurrentValue(n),signatureType:[],fontName:""};this.pdfViewer.formFieldCollections.push(s)}}},e.prototype.updateFormFieldValues=function(e){if(this.readOnlyCollection.push(e.id),e){var t=document.getElementById(e.id);t&&(e.isReadOnly?(t.disabled=!0,t.style.backgroundColor="",t.style.cursor="default"):(""===t.style.backgroundColor&&(t.style.backgroundColor="rgba(0, 20, 200, 0.2)"),t.disabled=!1,t.style.cursor=""))}},e.prototype.retriveFieldName=function(e){var t;switch(e.Name){case"Textbox":case"Password":case"SignatureField":t=e.FieldName;break;case"RadioButton":case"CheckBox":t=e.GroupName;break;case"DropDown":case"ListBox":t=e.Text}return t},e.prototype.retriveCurrentValue=function(e){var t;switch(e.Name){case"Textbox":case"Password":t=e.Text;break;case"SignatureField":t=e.Value;break;case"RadioButton":case"CheckBox":t=e.Selected;break;case"DropDown":t=e.SelectedValue;break;case"ListBox":t=e.SelectedList}return t},e.prototype.getSignatureBounds=function(e,t,i){var n=this.pdfViewerBase.pageSize[i],o=0;switch(n.rotation){case 0:o=t;break;case 1:o={x:t.x+e.Width+t.width/3.5,y:n.width-e.X+t.height/4};break;case 2:o={x:n.width-t.x-t.width,y:n.height-t.y-t.height};break;case 3:o={x:t.y-t.width/2+t.height,y:t.x+t.width/3}}return o},e.prototype.downloadFormFieldsData=function(){var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields"),t=JSON.parse(e),n={};if(t)for(var o=0;o<t.length;o++){var s=t[o];if("Textbox"===s.Name||"Password"===s.Name||s.Multiline)""===s.Text||null===s.Text?(this.pdfViewerBase.validateForm=!0,this.pdfViewerBase.nonFillableFields[s.FieldName]=s.Text):delete this.pdfViewerBase.nonFillableFields[s.FieldName],n[s.FieldName]=s.Text;else if("RadioButton"===s.Name&&s.Selected)!1===s.Selected?(this.pdfViewerBase.validateForm=!0,this.pdfViewerBase.nonFillableFields[s.GroupName]=s.Value):delete this.pdfViewerBase.nonFillableFields[s.GroupName],n[s.GroupName]=s.Value;else if("CheckBox"===s.Name)!1===s.Selected&&(this.pdfViewerBase.validateForm=!0),s.CheckboxIndex&&s.Selected?n[s.GroupName]=s.CheckboxIndex:void 0!==n[s.GroupName]&&null!==n[s.GroupName]||(n[s.GroupName]=s.Selected);else if("DropDown"===s.Name)""===s.SelectedValue?(this.pdfViewerBase.validateForm=!0,this.pdfViewerBase.nonFillableFields[s.Text]=s.SelectedValue):delete this.pdfViewerBase.nonFillableFields[s.Text],n[s.Text]=s.SelectedValue;else if("ListBox"===s.Name){for(var a=s.TextList,r=[],l=0;l<s.SelectedList.length;l++){var d=s.SelectedList[l];r.push(a[d])}n[s.Text]=JSON.stringify(r)}else if("SignatureField"===s.Name){var u=void 0;if(null!==s.Value&&""!==s.Value||this.addSignaturePath(s),s.Value&&""!==s.Value){u=s.Value;var M=s.fontFamily?s.fontFamily:s.FontFamily;if(M)n[s.FieldName+"fontName"]=M,n[s.FieldName+"fontSize"]=s.fontSize?s.fontSize:s.FontSize;else if(s.Value.split("base64,")[1])n[s.FieldName+"ImageData"]=!0;else{var p=i.processPathData(s.Value);u=i.splitArrayCollection(p)}}if(null===s.Value||""===s.Value?(this.pdfViewerBase.validateForm=!0,this.pdfViewerBase.nonFillableFields[s.FieldName]=JSON.stringify(u)):delete this.pdfViewerBase.nonFillableFields[s.FieldName],n[s.FieldName]=JSON.stringify(u),s.Bounds){L=this.getSignatureBounds(s.LineBounds,s.Bounds,s.PageIndex);s.Bounds.x=L.x,s.Bounds.y=L.y,n[s.FieldName+"bounds"]=JSON.stringify(s.Bounds)}else{var h=s.LineBounds,L={x:this.ConvertPointToPixel(h.X),y:this.ConvertPointToPixel(h.Y),width:this.ConvertPointToPixel(h.Width),height:this.ConvertPointToPixel(h.Height)};n[s.FieldName+"bounds"]=JSON.stringify(L)}}}return JSON.stringify(n)},e.prototype.focusFormFields=function(e){var t=e.target;if(t&&"e-pdfviewer-signatureformfields"!==t.className&&"e-pdfviewer-signatureformfields e-pv-signature-focus"!==t.className){var i=t.style.backgroundColor,n=i.lastIndexOf(","),o=i.slice(0,n+1)+0+")";"checkbox"===t.type&&(t.style.webkitAppearance=""),t.style.backgroundColor=o}else t&&("e-pdfviewer-signatureformfields"!==t.className&&"e-pdfviewer-signatureformfields-signature"!==t.className&&"e-pdfviewer-signatureformfields e-pv-signature-focus"!==t.className&&"e-pdfviewer-signatureformfields-signature e-pv-signature-focus"!==t.className||this.setFocus(t.id))},e.prototype.blurFormFields=function(e){var t=e.target;if(t.InsertSpaces&&this.isKeyDownCheck){var i=parseInt(t.style.width)-parseInt(t.style.height)/2;t.style.width=i+"px",this.isKeyDownCheck=!1}"checkbox"===t.type?this.pdfViewer.fireFocusOutFormField(t.name,t.checked):this.pdfViewer.fireFocusOutFormField(t.name,t.value);var n=t.style.backgroundColor,o=n.lastIndexOf(","),s=n.slice(0,o+1)+.2+")";"checkbox"!==t.type||t.checked?t.style.webkitAppearance="":t.style.webkitAppearance="none",t.style.backgroundColor=s},e.prototype.updateFormFields=function(e){var t=e.target;"e-pdfviewer-ListBox"===t.className?(t=t.parentElement,this.updateDataInSession(t)):"e-pdfviewer-signatureformfields"===t.className?this.currentTarget=t:"e-pv-buttonItem"!==t.className&&"button"!==t.type||this.pdfViewer.fireButtonFieldClickEvent(t.value,t.name,t.id);for(var i=0;i<this.pdfViewer.formFieldCollections.length;i++)t.id===this.pdfViewer.formFieldCollections[i].id&&(this.pdfViewer.fireFormFieldClickEvent("formFieldClicked",this.pdfViewer.formFieldCollections[i]),"e-pdfviewer-signatureformfields"!==t.className&&"e-pdfviewer-signatureformfields-signature"!==t.className&&"e-pdfviewer-signatureformfields e-pv-signature-focus"!==t.className&&"e-pdfviewer-signatureformfields-signature e-pv-signature-focus"!==t.className||this.setFocus(t.id))},e.prototype.drawSignature=function(e,t,i,n){var o,s,a,r,l=this.currentTarget?this.currentTarget:i,d=(l=l||this.pdfViewerBase.currentTarget).offsetParent.offsetParent.id.split("_")[0],u=this.pdfViewer.nameTable[d];i&&i.offsetParent&&u&&(a=i.getBoundingClientRect(),r=i.offsetParent.offsetParent.offsetParent.getBoundingClientRect(),this.pdfViewerBase.drawSignatureWithTool=!0,i.nextSibling&&-1!==i.nextSibling.id.indexOf("initial")&&(this.pdfViewer.isInitialFieldToolbarSelection=!0));var M,p,h=t||this.pdfViewerBase.signatureModule.outputString,L=n||this.pdfViewerBase.signatureModule.fontName,w=this.pdfViewerBase.getZoomFactor(),c=this.pdfViewerBase.drawSignatureWithTool?a.width/w:parseFloat(l.style.width)/w,C=this.pdfViewerBase.drawSignatureWithTool?a.height/w:parseFloat(l.style.height)/w,g=this.pdfViewerBase.drawSignatureWithTool?(a.left-r.left)/w:parseFloat(l.style.left)/w,m=this.pdfViewerBase.drawSignatureWithTool?(a.top-r.top)/w:parseFloat(l.style.top)/w,f=this.pdfViewerBase.drawSignatureWithTool?this.pdfViewer.currentPageNumber-1:parseFloat(l.id.split("_")[1]),y=this.pdfViewerBase.drawSignatureWithTool&&i.nextElementSibling?parseFloat(i.nextElementSibling.id.split("_")[1]):parseFloat(l.id.split("_")[2]),j=this.pdfViewerBase.signatureModule.saveImageString,S=this.getAngle(f);if("Type"===e)L||(L="Helvetica"),s=this.getSignBounds(y,S,f,w,g,m,c,C),"Default"===this.pdfViewer.signatureFitMode&&(s=this.getDefaultBoundsforSign(s)),j=(o={id:l.id,bounds:{x:s.x,y:s.y,width:s.width,height:s.height},pageIndex:f,data:h,modifiedDate:"",shapeAnnotationType:"SignatureText",opacity:1,rotateAngle:this.rotateAngle,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""},fontFamily:L,fontSize:s.height/2}).data,M=o.fontFamily,p=o.fontSize;else if("Image"===e)s=this.getSignBounds(y,S,f,w,g,m,c,C),"Default"===this.pdfViewer.signatureFitMode&&(s=this.getDefaultBoundsforSign(s)),j=(o={id:l.id,bounds:{x:s.x,y:s.y,width:s.width,height:s.height},pageIndex:f,data:h,modifiedDate:"",shapeAnnotationType:"SignatureImage",opacity:1,rotateAngle:this.rotateAngle,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""}}).data;else if(-1!==h.indexOf("base64"))s=this.getSignBounds(y,S,f,w,g,m,c,C),"Default"===this.pdfViewer.signatureFitMode&&(s=this.getDefaultBoundsforSign(s)),j=(o={id:l.id,bounds:{x:s.x,y:s.y,width:s.width,height:s.height},pageIndex:f,data:h,modifiedDate:"",shapeAnnotationType:"SignatureImage",opacity:1,rotateAngle:this.rotateAngle,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""}}).data;else{if("Default"===this.pdfViewer.signatureFitMode){var A=this.updateSignatureAspectRatio(h,!1,l);(s=this.getSignBounds(y,S,f,w,g,m,A.width,A.height,!0)).x=s.x+A.left,s.y=s.y+A.top}else s=this.getSignBounds(y,S,f,w,g,m,c,C);o={id:l.id,bounds:{x:s.x,y:s.y,width:s.width,height:s.height},pageIndex:f,data:h,modifiedDate:"",shapeAnnotationType:"Path",opacity:1,rotateAngle:this.rotateAngle,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""}}}if(this.pdfViewerBase.drawSignatureWithTool&&u){o.id=u.id+"_content";var T=this.pdfViewer.add(o);u.wrapper.children.push(T.wrapper)}else this.pdfViewer.add(o);if(o&&"Path"===o.shapeAnnotationType&&""!==h){this.pdfViewerBase.currentSignatureAnnot=o;var x={currentHeight:C,currentWidth:c,currentLeft:g,currentTop:m};this.pdfViewerBase.signatureModule.addSignatureCollection(s,x),j=this.pdfViewerBase.signatureModule.saveImageString,this.pdfViewerBase.currentSignatureAnnot=null}var N=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+f);if(this.pdfViewer.renderDrawing(N,f),this.pdfViewerBase.signatureModule.showSignatureDialog(!1),"e-pdfviewer-signatureformfields e-pv-signature-focus"===l.className?l.className="e-pdfviewer-signatureformfields-signature e-pv-signature-focus":l.className="e-pdfviewer-signatureformfields-signature",this.pdfViewerBase.drawSignatureWithTool&&u){var D=i.offsetParent.offsetParent.id.split("_")[0]+"_content";this.updateSignatureDataInSession(o,D)}else this.updateDataInSession(l,o.data,o.bounds,M,p);l.style.pointerEvents="none",this.pdfViewerBase.signatureModule.hideSignaturePanel(),this.pdfViewer.annotation.addAction(o.pageIndex,null,o,"FormField Value Change","",o,o),this.pdfViewer.fireSignatureAdd(o.pageIndex,o.id,o.shapeAnnotationType,o.bounds,o.opacity,null,null,j),this.pdfViewer.fireFocusOutFormField(l.name,h),this.pdfViewerBase.drawSignatureWithTool=!1,this.pdfViewer.isInitialFieldToolbarSelection=!1},e.prototype.updateSignatureDataInSession=function(e,t){for(var n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),o=JSON.parse(n),s=0;s<o.length;s++)if(o[s].Key===t)if("SignatureText"===e.shapeAnnotationType?(o[s].FormField.signatureType="Text",this.pdfViewerBase.formFieldCollection[s].FormField.signatureType="Text",this.pdfViewer.nameTable[t].signatureType="Text",o[s].FormField.fontFamily=e.fontFamily,this.pdfViewerBase.formFieldCollection[s].FormField.fontFamily=e.fontFamily,this.pdfViewer.nameTable[t].fontFamily=e.fontFamily):"SignatureImage"===e.shapeAnnotationType?(o[s].FormField.signatureType="Image",this.pdfViewerBase.formFieldCollection[s].FormField.signatureType="Image",this.pdfViewer.nameTable[t].signatureType="Image"):(o[s].FormField.signatureType="Path",this.pdfViewerBase.formFieldCollection[s].FormField.signatureType="Path",this.pdfViewer.nameTable[t].signatureType="Path"),o[s].FormField.signatureBound=e.bounds,this.pdfViewerBase.formFieldCollection[s].FormField.signatureBound=e.bounds,this.pdfViewer.nameTable[t].signatureBound=e.bounds,"Path"===e.shapeAnnotationType){var a=i.processPathData(e.data),r=i.splitArrayCollection(a);o[s].FormField.value=JSON.stringify(r),this.pdfViewer.nameTable[t].value=e.data,this.pdfViewerBase.formFieldCollection[s].FormField.value=JSON.stringify(r)}else o[s].FormField.value=e.data,this.pdfViewerBase.formFieldCollection[s].FormField.value=e.data,this.pdfViewer.nameTable[t].value=e.data;window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(o))},e.prototype.getDefaultBoundsforSign=function(e){return{x:e.x+10,y:e.y+10,width:e.width-23,height:e.height-23}},e.prototype.getSignBounds=function(e,t,i,n,o,s,a,r,l){var d=this.pdfViewer.isInitialFieldToolbarSelection?"initialIcon":"signIcon",u=document.getElementById(d+i+"_"+e),M=o*n-parseFloat(u.style.left)*n/n;return 90===t||270===t?(this.rotateAngle=0,l?{x:o-M/n-n,y:s+M/n+n,width:a,height:r}:{x:o-M/n-n,y:s+M/n+n,width:r,height:a}):(this.rotateAngle=0,{x:o,y:s,width:a,height:r})},e.prototype.updateSameFieldsValue=function(e){if(this.formFieldsData)for(var t=0;t<this.formFieldsData.length;t++){var i=this.formFieldsData[t];if(e.target.name===i.FieldName&&e.target.id!==i.uniqueID){var n=document.getElementById(this.formFieldsData[t].uniqueID);n?n.value=e.target.value:(i.Text=e.target.value,window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formfields",JSON.stringify(this.formFieldsData)))}}},e.prototype.updateFormFieldsValue=function(e){var t=e.target;if(t.InsertSpaces&&!this.isKeyDownCheck){var i=parseInt(t.style.width)+parseInt(t.style.height)/2;t.style.width=i+"px",this.isKeyDownCheck=!0}if(9===e.which&&t&&"e-pdfviewer-formFields"===t.className){var n=t.id.split("input_")[1].split("_")[0];if(this.maintainTabIndex[n]===t.tabIndex){if(a=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(parseInt(n)+1)))(o=a.getElementsByClassName("e-pdfviewer-formFields"))&&o.length>0&&(o[0].focus(),e.preventDefault());else for(var o=document.getElementById(this.pdfViewer.element.id+"_textLayer_0").getElementsByClassName("e-pdfviewer-formFields"),s=0;s<o.length;s++)if(o[s].tabIndex===this.maintanMinTabindex[0]){o[s].focus(),e.preventDefault();break}}else{for(var a=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+parseInt(n)),o=a.getElementsByClassName("e-pdfviewer-formFields"),r=!0,s=0;s<o.length;s++)if(r=!1,o[s].tabIndex===t.tabIndex+1){o[s].focus(),r=!0,e.preventDefault();break}for(var l=t.tabIndex+1;!r;){for(var d=0;d<o.length;d++)if(r=!1,o[d].tabIndex===l){o[d].focus(),r=!0,e.preventDefault();break}this.maintainTabIndex[n]===l&&(r=!0),l+=1}}}if(e.currentTarget.classList.contains("e-pdfviewer-signatureformfields")||e.currentTarget.classList.contains("e-pdfviewer-signatureformfields-signature"))if("Enter"===e.key)for(var u=e.target,s=0;s<this.pdfViewer.formFieldCollections.length;s++)u.id===this.pdfViewer.formFieldCollections[s].id&&(this.setFocus(u.id),this.pdfViewer.fireFormFieldClickEvent("formFieldClicked",this.pdfViewer.formFieldCollections[s]));else e.preventDefault()},e.prototype.changeFormFields=function(e){var t=e.target;this.updateDataInSession(t)},e.prototype.updateSignatureAspectRatio=function(e,t,n){for(var o=i.processPathData(e),s=i.splitArrayCollection(o),a=-1,r=-1,l=-1,d=-1,u=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_"),M=0,p=0,h=0;h<s.length;h++){var L=s[h];if(-1===a)a=parseFloat(L.x.toString()),l=parseFloat(L.x.toString()),r=parseFloat(L.y.toString()),d=parseFloat(L.y.toString());else{var w=parseFloat(L.x.toString()),c=parseFloat(L.y.toString());a>=w&&(a=w),r>=c&&(r=c),l<=w&&(l=w),d<=c&&(d=c)}}var C=l-a,g=d-r,m=C/(M=u?u.clientWidth:650),f=g/(p=u?u.clientHeight:300),y=this.pdfViewerBase.getZoomFactor(),j=0,S=0;if(t)j=this.pdfViewer.handWrittenSignatureSettings.width?this.pdfViewer.handWrittenSignatureSettings.width:150,S=this.pdfViewer.handWrittenSignatureSettings.height?this.pdfViewer.handWrittenSignatureSettings.height:100;else{var A="100%"===n.style.width?n.clientWidth:parseFloat(n.style.width),T="100%"===n.style.height?n.clientHeight:parseFloat(n.style.height);"rotate(90deg)"===n.style.transform||"rotate(270deg)"===n.style.transform?(j=T/y,S=A/y):(j=A/y,S=T/y)}var x=(M-C)/2,N=(p-g)/2;if(x=x/M*j,N=N/p*S,j*=m,S*=f,t){var D=this.pdfViewerBase.currentPageNumber-1,b=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+D);return{x:(parseFloat(b.style.width)/2-j/2)/y,y:(parseFloat(b.style.height)/2-S/2)/y,width:j,height:S}}return{left:x,top:N,width:j,height:S}},e.prototype.updateDataInSession=function(e,t,n,o,s){this.pdfViewer.isDocumentEdited=!0;var a=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields");if(a){for(var r=JSON.parse(a),l=0;l<r.length;l++){var d=r[l];if(d.uniqueID===e.id){if(e&&"text"===e.type||"password"===e.type||"textarea"===e.type){var u=e;u.classList.contains("e-pdfviewer-signatureformfields")||u.classList.contains("e-pdfviewer-signatureformfields-signature")?(d.Value=t,n&&(d.Bounds=n),o?(d.fontFamily=o,d.fontSize=s):d.fontFamily=null):d.Text=e.value}else if("radio"===e.type){for(M=0;M<r.length;M++){r[M];r[M].GroupName===e.name&&(r[M].Selected=!1)}d.Selected=!0}else if("checkbox"===e.type){for(var M=0;M<r.length;M++){r[M];if(r[M].GroupName===e.name){r[M].Selected=!1;var p=document.getElementById(r[M].uniqueID);p&&d.GroupName===e.name&&d.uniqueID!==p.id&&(d.Selected=!1,p.checked=!1,p.style.webkitAppearance="none")}}e.checked?d.Selected=!0:d.Selected=!1}else if("select-one"===e.type&&0===e.size)for(var h=e.options[e.selectedIndex].text,L=e.children,w=0;w<L.length;w++)L[w].text===h&&(d.SelectedValue=h);else if("select-multiple"===e.type||e.size>0){h=e.selectedOptions;d.SelectedList=[];for(var c=0;c<h.length;c++)for(var L=e.children,w=0;w<L.length;w++)L[w]===h[c]&&d.SelectedList.push(w)}break}e&&null!=e.getAttribute("list")&&"text"===e.type&&d.uniqueID===e.list.id&&(d.SelectedValue=e.value)}window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_formfields"),window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formfields",JSON.stringify(r))}else if(this.pdfViewer.formDesignerModule){var C=this.pdfViewer.nameTable[e.id.split("_")[0]];C.value=e.value;var g=i.cornersPointsBeforeRotation(C.wrapper.children[0]).topLeft;this.pdfViewer.formDesignerModule.updateFormDesignerFieldInSessionStorage(g,C.wrapper.children[0],C.formFieldAnnotationType,C)}},e.prototype.removeExistingFormFields=function(){for(var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),t=JSON.parse(e),i=0;i<t.length;i++)this.pdfViewer.formDesignerModule.deleteFormField(t[i].Key.split("_")[0])},e.prototype.applyCommonProperties=function(e,t,i,n){var o=document.getElementById(this.pdfViewer.element.id+"input_"+t+"_"+i);o&&o.remove();var s,a,r,l,d=document.getElementById("signIcon"+t+"_"+t),u=parseFloat(e.style.left),M=parseInt(e.style.top),p=parseFloat(e.style.width),h=parseFloat(e.style.height),L=this.pdfViewerBase.getZoomFactor();d&&(s=parseFloat(d.style.width),a=parseFloat(d.style.height),"rotate(90deg)"==d.style.transform&&(d.style.transform="rotate(0deg)",r=h/2,l=s*L,d.style.left=u-(r-s*L)+l/2+"px"),"rotate(180deg)"==d.style.transform&&(d.style.transform="rotate(0deg)",d.style.left=u+"px",d.style.top=M+"px"),"rotate(270deg)"==d.style.transform&&(d.style.transform="rotate(0deg)",r=h/2,l=s*L,d.style.left=u-(r-l)+l/2+"px",d.style.top=M+(p+a*L)+a*L/2+"px")),n.IsSignatureField&&this.isSignatureField?(e.className="e-pdfviewer-signatureformfields-signature",e.style.pointerEvents="none"):n.IsSignatureField?e.className="e-pdfviewer-signatureformfields":"Button"!==n.Name&&(e.className="e-pdfviewer-formFields"),e.id=this.pdfViewer.element.id+"input_"+t+"_"+i,e.style.zIndex=1e3},e.prototype.createFormFields=function(e,t,i,n){var o;switch(e.Name){case"Textbox":o=this.createTextBoxField(e,t,"text");break;case"Password":o=this.createTextBoxField(e,t,"password");break;case"RadioButton":o=this.createRadioBoxField(e,t,"radio");break;case"CheckBox":o=this.createRadioBoxField(e,t,"checkbox",n);break;case"DropDown":o=this.createDropDownField(e,t,i,n);break;case"ListBox":o=this.createListBoxField(e,t);break;case"SignatureField":o=this.createSignatureField(e,t,i,n),e.Value&&""!==e.Value&&(this.renderExistingAnnnot(e,i,n),this.isSignatureRendered=!0);break;case"Button":o=this.createButtonField(e,t);break;case"ink":case"SignatureText":case"SignatureImage":e.Value&&""!==e.Value&&!this.isSignatureRendered&&this.renderExistingAnnnot(e,i,n)}return o},e.prototype.getFormFieldType=function(e){var t;switch(e.Name){case"Textbox":t="Textbox";break;case"Password":t="Password";break;case"RadioButton":t="RadioButton";break;case"CheckBox":t="CheckBox";break;case"DropDown":t="DropDown";break;case"ListBox":t="ListBox";break;case"SignatureField":t="SignatureField",e.IsInitialField&&(t="InitialField");break;case"InitialField":t="InitialField"}return t},e.prototype.createButtonField=function(e,t){var i=document.createElement("input");return e.Value?(i.type="image",i.src=e.Value):i.type="button",i.className="e-pv-buttonItem",""!==e.Text?i.value=e.Text:i.value="",i.name=e.FieldName,i},e.prototype.createTextBoxField=function(e,t,i){var n;if(1!==e.Visible)return e.Multiline?(n=document.createElement("textarea")).style.resize="none":(n=document.createElement("input")).type=i,e.MaxLength>0&&(n.maxLength=e.MaxLength),this.addAlignmentPropety(e,n),""!==e.Text?n.value=e.Text:n.value="",this.pdfViewer.enableAutoComplete||(n.autocomplete="off"),n.name=e.FieldName,n},e.prototype.checkIsReadonly=function(e,t){for(var i=!1,n=0;n<this.readOnlyCollection.length;n++)if(t.id===this.readOnlyCollection[n]){i=!0;break}if(e.IsReadonly||!this.pdfViewer.enableFormFields||i)t.disabled=!0,t.style.cursor="default",t.style.backgroundColor="transparent";else{var o=e.BackColor;t.style.backgroundColor="rgba("+o.R+","+o.G+","+o.B+",0.2)";var s=e.FontColor;t.style.color="rgba("+s.R+","+s.G+","+s.B+",1)"}},e.prototype.formFieldsReadOnly=function(e){var t=document.getElementsByClassName("e-pdfviewer-formFields");this.makeformFieldsReadonly(t,e);var i=document.getElementsByClassName("e-pdfviewer-signatureformfields");this.makeformFieldsReadonly(i,e)},e.prototype.makeformFieldsReadonly=function(e,t){for(var i=0;i<e.length;i++)if(e[i]){var n=e[i];t?n.disabled=!1:(n.disabled=!0,n.style.cursor="default")}},e.prototype.applyTabIndex=function(e,t,i){t.tabIndex=e.TabIndex,this.maxTabIndex=Math.max(this.maxTabIndex,t.tabIndex),-1===this.minTabIndex&&(this.minTabIndex=t.tabIndex),this.minTabIndex=Math.min(this.minTabIndex,t.tabIndex),this.maintainTabIndex[i.toString()]=this.maxTabIndex,this.maintanMinTabindex[i.toString()]=this.minTabIndex},e.prototype.checkIsRequiredField=function(e,t){if(e.IsRequired)t.required=!0,t.style.border="1px solid red";else{var i=e.BorderColor;t.style.border=e.BorderWidth,t.style.borderColor="rgba("+i.R+","+i.G+","+i.B+",1)"}if("checkbox"!==t.type&&"radio"!==t.type){var n=e.BorderStyle;this.addBorderStylePropety(n,t)}},e.prototype.applyDefaultColor=function(e){"button"===e.type||"rgba(255, 255, 255, 0.2)"!==e.style.backgroundColor&&"rgba(0, 0, 0, 0.2)"!==e.style.backgroundColor||(e.style.backgroundColor="rgba(0, 20, 200, 0.2)"),"rgba(255, 255, 255, 0.2)"===e.style.color&&(e.style.color="black")},e.prototype.addAlignmentPropety=function(e,t){switch(e.Alignment){case 0:t.style.textAlign="left";break;case 1:t.style.textAlign="center";break;case 2:t.style.textAlign="right";break;case 3:t.style.textAlign="justify"}},e.prototype.addBorderStylePropety=function(e,t){switch(e){case 0:t.style.borderStyle="solid";break;case 1:t.style.borderStyle="dashed";break;case 2:t.style.borderStyle="outset";break;case 3:t.style.borderStyle="inset";break;case 4:t.style.borderStyle="outset";break;case 5:t.style.borderStyle="dotted";break;case 6:t.style.borderStyle="inset"}},e.prototype.createRadioBoxField=function(e,t,i,n){var o=document.createElement("input");return o.type=i,e.Selected?o.checked=!0:"checkbox"!==i||n||(o.style.webkitAppearance="none"),o.name=e.GroupName,o.value=e.Value,o},e.prototype.createDropDownField=function(e,t,i,n){var o=document.createElement("select"),s=e.TextList;if(e.Selected&&!n){var a=document.getElementById("editableDropdown"+t+"_"+i);a&&a.remove();var r=document.createElement("input");r.id="editableDropdown"+t+"_"+i,r.setAttribute("list",this.pdfViewer.element.id+"input_"+t+"_"+i);var l=e.LineBounds,d=e.Font;r.style.position="absolute",r.style.border="0px",this.applyPosition(r,l,d,t,e.Rotation),r.style.backgroundColor="rgba(0, 20, 200, 0.2)",r.className="e-pdfviewer-formFields",-1===e.selectedIndex&&(r.value=e.SelectedValue),n?n.appendChild(r):document.getElementById(this.pdfViewer.element.id+"_textLayer_"+t).appendChild(r),r.addEventListener("focus",this.focusFormFields.bind(this)),r.addEventListener("blur",this.blurFormFields.bind(this)),r.addEventListener("click",this.updateFormFields.bind(this)),r.addEventListener("change",this.changeFormFields.bind(this)),r.addEventListener("keydown",this.updateFormFieldsValue.bind(this)),o=document.createElement("DATALIST")}for(var u=0;u<s.length;u++){var M=document.createElement("option");M.className="e-dropdownSelect",e.SelectedValue===s[u]||e.selectedIndex===u?M.selected=!0:M.selected=!1,M.innerHTML=s[u],o.appendChild(M)}return o.name=e.Text,o},e.prototype.createListBoxField=function(e,t){var i=document.createElement("select"),n=e.TextList;e.MultiSelect?i.multiple=!0:(i.multiple=!1,i.size=n.length);for(var o=0;o<n.length;o++){var s=document.createElement("option");s.className="e-pdfviewer-ListBox";for(var a=0;a<e.SelectedList.length;a++)e.SelectedList[a]===o&&(s.selected=!0);s.innerHTML=n[o],i.appendChild(s)}return i.name=e.Text,i},e.prototype.createSignatureField=function(e,i,n,o){var s=document.createElement("input");s.type="text",s.name=e.FieldName;var a=document.getElementById("signIcon"+i+"_"+n);a&&!o&&a.remove(),this.pdfViewerBase.isInitialField=e.IsInitialField;var r=this.pdfViewerBase.isInitialField?"Initial":"Sign",l=19===this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.width?this.pdfViewerBase.isInitialField?27:19:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.width,d=document.createElement("span"),u=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+i),M=e.LineBounds,p=(e.Font,this.ConvertPointToPixel(M.X)),h=this.ConvertPointToPixel(M.Y),L=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.height>M.Height/2?M.Height/2:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.height,w=l>M.Width/2?M.Width/2:l,c=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.fontSize>L/2?10:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.fontSize;d.style.position="absolute",d.id="signIcon"+i+"_"+n;var C=this.pdfViewerBase.getZoomFactor(),g=this.getAngle(i),m={left:p,top:h,width:w,height:L},f=this.getBounds(m,i);return d.style.transform="rotate("+g+"deg)",d.style.left=f.left*C+"px",d.style.top=f.top*C+"px",t.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?(d.style.height="5px",d.style.width="10px",d.style.fontSize="3px"):(d.style.height=L+"px",d.style.width=w+"px",d.style.fontSize=c+"px",t.isBlazor()&&(d.style.fontSize=c-1+"px")),d.style.padding="2px",d.style.textAlign="center",d.style.boxSizing="content-box",d.innerHTML=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.text?this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.text:r,d.style.color=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.color?this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.color:"black",d.style.backgroundColor=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.backgroundColor?this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.backgroundColor:"orange",d.style.opacity=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.opacity?this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.opacity:1,u.appendChild(d),this.addSignaturePath(e),s},e.prototype.addSignaturePath=function(e){this.isSignatureField=!1;for(var t=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields"),i=JSON.parse(t),n=0;n<i.length;n++){var o=i[n];if(("ink"===o.Name||"SignatureField"===o.Name||"SignatureImage"===o.Name||"SignatureText"===o.Name)&&o.FieldName===e.ActualFieldName&&o.Value&&""!==o.Value){e.Value=o.Value,e.Bounds=o.LineBounds,e.FontFamily=o.FontFamily,e.FontSize=o.FontSize,this.isSignatureField=!0;break}}return this.isSignatureField},e.prototype.getBounds=function(e,t,i){var n=this.pdfViewerBase.pageSize[t];return i>0?this.getBoundsPosition(i,e,n):this.getBoundsPosition(n.rotation,e,n)},e.prototype.getBoundsPosition=function(e,t,i){var n;switch(e){case 90:n={left:i.width-t.top-t.height,top:t.left,width:t.height,height:t.width};break;case 180:n={left:i.width-t.left-t.width,top:i.height-t.top-t.height,width:t.width,height:t.height};break;case 270:n={left:t.top,top:i.height-t.left-t.width,width:t.height,height:t.width};break;case 0:n=t;break;case 1:n={left:i.width-t.top-t.height-(t.width/2-t.height/2),top:t.left+(t.width/2-t.height/2),width:t.width,height:t.height};break;case 2:n={left:i.width-t.left-t.width,top:i.height-t.top-t.height,width:t.width,height:t.height};break;case 3:n={left:t.top-(t.width/2-t.height/2),top:i.height-t.left-t.width+(t.width/2-t.height/2),width:t.width,height:t.height}}return n||(n=t),n},e.prototype.applyPosition=function(e,t,i,n,o){if(t){var s=0,a={left:this.ConvertPointToPixel(t.X),top:this.ConvertPointToPixel(t.Y),width:this.ConvertPointToPixel(t.Width),height:this.ConvertPointToPixel(t.Height)},r=this.getBounds(a,n,o);null!==i&&i.Height&&(e.style.fontfamily=i.Name,i.Italic&&(e.style.fontStyle="italic"),i.Bold&&(e.style.fontWeight="Bold"),s=this.ConvertPointToPixel(i.Size)),this.setStyleToTextDiv(e,r.left,r.top,s,r.width,r.height,!1)}},e.prototype.setStyleToTextDiv=function(e,t,i,n,o,s,a){var r=this.pdfViewerBase.getZoomFactor();a&&(r=1,e.style.position="absolute"),e.style.left=t*r+"px",e.style.top=i*r+"px",e.style.height=s*r+"px",e.style.width=o*r+"px",e.style.margin="0px",n>0&&(e.style.fontSize=n*r+"px")},e.prototype.renderExistingAnnnot=function(e,i,n){if(!n){var o=void 0;o=e.Bounds&&"ink"!==e.Name?e.Bounds:e.LineBounds;var s=this.ConvertPointToPixel(o.X),a=this.ConvertPointToPixel(o.Y),r=this.ConvertPointToPixel(o.Width),l=this.ConvertPointToPixel(o.Height),d=parseFloat(e.PageIndex),u={left:s,top:a,width:r,height:l},M=this.updateSignatureBounds(u,d),p=void 0,h=e.FontFamily?e.FontFamily:e.fontFamily;if(e.Value.split("base64,")[1]?p={id:this.pdfViewer.element.id+"input_"+d+"_"+i,bounds:M,pageIndex:d,data:e.Value,modifiedDate:"",shapeAnnotationType:"SignatureImage",opacity:1,rotateAngle:0,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""}}:h?((p={id:this.pdfViewer.element.id+"input_"+d+"_"+i,bounds:M,pageIndex:d,data:e.Value,modifiedDate:"",shapeAnnotationType:"SignatureText",opacity:1,rotateAngle:0,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""},fontFamily:e.FontFamily,fontSize:e.FontSize}).fontFamily=h,p.fontSize=e.FontSize?e.FontSize:e.fontSize):p={id:this.pdfViewer.element.id+"input_"+d+"_"+i,bounds:M,pageIndex:d,data:e.Value,modifiedDate:"",shapeAnnotationType:"Path",opacity:1,rotateAngle:0,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""}},"SignatureField"!==e.Name&&"InitialField"!==e.Name||t.isNullOrUndefined(e.id))this.pdfViewer.add(p);else{var L=e.id,w=document.getElementById(L+"_content_html_element"),c=this.pdfViewer.nameTable[L];p.id=c.id+"_content";var C=this.pdfViewer.add(p);if(c.wrapper.children.push(C.wrapper),!t.isNullOrUndefined(w)&&this.isSignatureField){var g=w.children[0].children[0];g.style.pointerEvents="none",g.className="e-pdfviewer-signatureformfields-signature",g.parentElement.style.pointerEvents="none"}}e.Bounds=p.bounds,this.pdfViewer.formDesignerModule&&this.updateSignatureDataInSession(p,p.id);var m=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+d);this.pdfViewer.renderDrawing(m,d)}},e.prototype.updateSignatureBounds=function(e,t){var i=this.pdfViewerBase.pageSize[t];return i?1===i.rotation?{x:i.width-e.top-e.height,y:e.left,width:e.height,height:e.width}:2===i.rotation?{x:i.width-e.left-e.width,y:i.height-e.top-e.height,width:e.width,height:e.height}:3===i.rotation?{x:e.top,y:i.height-e.left-e.width,width:e.height,height:e.width}:{x:e.left,y:e.top,width:e.width,height:e.height}:{x:e.left,y:e.top,width:e.width,height:e.height}},e.prototype.resetFormFields=function(){for(var e=this.pdfViewer.formFieldCollections,t=0;t<e.length;t++){var i=e[t];if(this.currentTarget=document.getElementById(i.id),"Textbox"===i.type)this.currentTarget.value=i.value;else if("RadioButton"===i.type)this.currentTarget.checked=i.value,i.value&&this.updateDataInSession(this.currentTarget);else if("DropDown"===i.type)this.currentTarget.value=i.value;else if("CheckBox"===i.type)this.currentTarget.checked=i.value;else if("SignatureField"===i.type){var n=this.pdfViewer.nameTable[i.id];n&&(this.currentTarget&&"e-pdfviewer-signatureformfields-signature"===this.currentTarget.className&&(this.currentTarget.className="e-pdfviewer-signatureformfields",this.currentTarget.style.pointerEvents="",this.updateDataInSession(this.currentTarget,"")),this.pdfViewer.remove(n),this.pdfViewer.renderDrawing())}"RadioButton"!==i.type&&"SignatureField"!==i.type&&this.updateDataInSession(this.currentTarget)}},e.prototype.clearFormFields=function(e){var t,i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields");t=e?[e]:JSON.parse(i);for(var n=!0,o=0;o<t.length;o++){var s=t[o];if(e&&(s.uniqueID=e.id,s.Name=e.type),this.currentTarget=document.getElementById(s.uniqueID),"Textbox"===s.Name)this.currentTarget.value="";else if("RadioButton"===s.Name)n&&(this.currentTarget.checked=!0,this.updateDataInSession(this.currentTarget),n=!1);else if("DropDown"===s.Name)this.currentTarget.value=s.TextList[0];else if("CheckBox"===s.Name)this.currentTarget.checked=!1;else if("SignatureField"===s.Name){var a=this.pdfViewer.nameTable[s.uniqueID];a&&(this.currentTarget&&"e-pdfviewer-signatureformfields-signature"===this.currentTarget.className&&(this.currentTarget.className="e-pdfviewer-signatureformfields",this.currentTarget.style.pointerEvents="",this.currentTarget.parentElement.style.pointerEvents="",this.updateDataInSession(this.currentTarget,""),e&&(e.value="",e.signatureType=[e.signatureType],e.signatureType[0]="")),this.pdfViewer.remove(a),this.pdfViewer.renderDrawing())}"SignatureField"!==s.Name&&"ink"!==s.Name&&"RadioButton"!==s.Name&&this.updateDataInSession(this.currentTarget)}},e.prototype.ConvertPointToPixel=function(e){return e*(96/72)},e.prototype.destroy=function(){this.currentTarget=null,this.readOnlyCollection=[]},e.prototype.getModuleName=function(){return"FormFields"},e}(),hn=function(){function a(e,t){this.isFormFieldExistingInCollection=!1,this.formFieldListItemCollection=[],this.formFieldListItemDataSource=[],this.isInitialField=!1,this.disableSignatureClickEvent=!1,this.formFieldIndex=0,this.formFieldIdIndex=0,this.isProgrammaticSelection=!1,this.isShapeCopied=!1,this.isDrawHelper=!1,this.pdfViewer=e,this.pdfViewerBase=t}return a.prototype.drawHelper=function(e,t,i){var n=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+this.pdfViewerBase.activeElements.activePageID);if(null!==document.getElementById(this.pdfViewer.element.id+"_pageCanvas_"+this.pdfViewerBase.activeElements.activePageID)&&null!==n){var o=this.pdfViewerBase.getZoomFactor(),s=void 0,a={id:"FormField_helper_html_element",class:"foreign-object"},r=this.updateFormFieldInitialSize(t,e);if(s=this.createHtmlElement("div",a),this.isDrawHelper=!0,"SignatureField"===e||"InitialField"===e)s.appendChild(this.createSignatureDialog(this.pdfViewer,t,r));else if("DropdownList"===e){l={id:"dropdown_helper"};s.appendChild(this.createDropDownList(l,t))}else if("ListBox"===e){var l={id:"listbox_helper"};s.appendChild(this.createListBox(l,t))}else s.appendChild(this.createInputElement(e,t,r));n.appendChild(s);var d=this.pdfViewerBase.getMousePosition(i);s.setAttribute("style","height:"+r.height*o+"px; width:"+r.width*o+"px;left:"+d.x*o+"px; top:"+d.y*o+"px;position:absolute;opacity: 0.5;")}},a.prototype.drawHTMLContent=function(e,t,n,o,s){var a=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+o),r=document.getElementById(this.pdfViewer.element.id+"_pageCanvas_"+o);if(null!==t&&null!==r&&null!==a){var l=this.pdfViewerBase.getZoomFactor(),d=void 0,u=void 0,M={id:"form_field_"+t.id+"_html_element",class:"foreign-object"};u=this.createHtmlElement("div",M);var p={id:t.id+"_html_element",class:"foreign-object"};d=this.createHtmlElement("div",p),t.template="SignatureField"===e||"InitialField"===e?d.appendChild(this.createSignatureDialog(s,n)):"DropdownList"===e?d.appendChild(this.createDropDownList(t,n)):"ListBox"===e?d.appendChild(this.createListBox(t,n)):d.appendChild(this.createInputElement(e,n));var h=document.createElement("div");if(h.id=n.id+"_designer_name",h.style.fontSize=n.fontSize?n.fontSize*l+"px":10*l+"px",h.className="e-pv-show-designer-name",this.pdfViewer.designerMode?(h.innerHTML=n.name,h.style.position="absolute"):(h.innerHTML="",h.style.position="initial"),d.appendChild(h),u.appendChild(d),a.appendChild(u),"RadioButton"===e&&document.getElementsByClassName("e-pv-radiobtn-span").length>0)for(var L=document.getElementsByClassName("e-pv-radiobtn-span"),w=0;w<L.length;w++)L[w].style.width=n.bounds.width*l-10+"px",L[w].style.height=n.bounds.height*l-10+"px",0!==parseInt(L[w].style.width,10)&&0!==parseInt(L[w].style.height,10)||(L[w].style.width="2px",L[w].style.height="2px");C=i.cornersPointsBeforeRotation(t).topLeft;d.setAttribute("style","height:"+t.actualSize.height*l+"px; width:"+t.actualSize.width*l+"px;left:"+C.x*l+"px; top:"+C.y*l+"px;position:absolute;transform:rotate("+(t.rotateAngle+t.parentTransform)+"deg);pointer-events:"+(this.pdfViewer.designerMode?"none":"all")+";visibility:"+(t.visible?"visible":"hidden")+";opacity:"+t.style.opacity+";"),this.updateFormDesignerFieldInSessionStorage(C,t,e,n);var c={value:n.value,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,color:n.color,backgroundColor:n.backgroundColor,alignment:n.alignment,isReadonly:n.isReadonly,visibility:n.visibility,maxLength:n.maxLength,isRequired:n.isRequired,isPrint:n.isPrint,rotation:n.rotateAngle,tooltip:n.tooltip,borderColor:n.borderColor,thickness:n.thickness,options:n.options,pageNumber:n.pageNumber,isChecked:n.isChecked,isSelected:n.isSelected};this.pdfViewer.fireFormFieldAddEvent("formFieldAdd",c,this.pdfViewerBase.activeElements.activePageID)}else{var C=i.cornersPointsBeforeRotation(t).topLeft;this.updateFormDesignerFieldInSessionStorage(C,t,e,n)}return t.template},a.prototype.updateFormDesignerFieldInSessionStorage=function(e,t,i,n){var o=this.pdfViewerBase.getZoomFactor(),s={id:t.id,lineBound:{X:e.x*o,Y:e.y*o,Width:t.actualSize.width*o,Height:t.actualSize.height*o},name:n.name,zoomValue:o,pageNumber:n.pageNumber,value:n.value,formFieldAnnotationType:i,signatureType:n.signatureType,signatureBound:n.signatureBound,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,fontColor:this.getRgbCode(n.color),borderColor:this.getRgbCode(n.borderColor),thickness:n.thickness,backgroundColor:this.getRgbCode(n.backgroundColor),textAlign:n.alignment,isChecked:n.isChecked,isSelected:n.isSelected,isReadonly:n.isReadonly,font:{isBold:n.font.isBold,isItalic:n.font.isItalic,isStrikeout:n.font.isStrikeout,isUnderline:n.font.isUnderline},selectedIndex:[],radiobuttonItem:null,option:n.options?n.options:[],visibility:n.visibility,maxLength:n.maxLength,isRequired:n.isRequired,isPrint:n.isPrint,rotation:0,tooltip:n.tooltip};if("RadioButton"===s.formFieldAnnotationType&&(s.radiobuttonItem=[],s.radiobuttonItem.push({id:t.id,lineBound:{X:e.x*o,Y:e.y*o,Width:t.actualSize.width*o,Height:t.actualSize.height*o},name:n.name,zoomValue:o,pageNumber:n.pageNumber,value:n.value,formFieldAnnotationType:i,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,fontColor:this.getRgbCode(n.color),borderColor:this.getRgbCode(n.borderColor),thickness:n.thickness,backgroundColor:this.getRgbCode(n.backgroundColor),textAlign:n.alignment,isChecked:n.isChecked,isSelected:n.isSelected,isReadonly:n.isReadonly,visibility:n.visibility,maxLength:n.maxLength,isRequired:n.isRequired,isPrint:n.isPrint,rotation:0,tooltip:n.tooltip})),!this.getRadioButtonItem(s,n)){for(var a=0;a<this.pdfViewerBase.formFieldCollection.length;a++)this.pdfViewerBase.formFieldCollection[a].Key===s.id&&(this.pdfViewerBase.formFieldCollection.splice(a,1),this.pdfViewerBase.formFieldCollection.push({Key:t.id,FormField:s}),this.isFormFieldExistingInCollection=!0);this.isFormFieldExistingInCollection||this.pdfViewerBase.formFieldCollection.push({Key:t.id,FormField:s});var r=JSON.stringify(this.pdfViewerBase.formFieldCollection);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",r),this.isFormFieldExistingInCollection=!1,this.pdfViewerBase.formFieldCollection.length>0?this.pdfViewerBase.enableFormFieldButton(!0):this.pdfViewerBase.enableFormFieldButton(!1)}},a.prototype.getRadioButtonItem=function(e,i){var n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),o=JSON.parse(n),s=!1;if(null!=o){for(var a=0;a<o.length;a++){var r=o[a],l=void 0;if("RadioButton"===e.formFieldAnnotationType&&e.radiobuttonItem&&r.FormField.radiobuttonItem)for(var d=0;d<r.FormField.radiobuttonItem.length;d++){if(r.FormField.radiobuttonItem[d].id===e.id){l={lineBound:e.lineBound,id:e.id,name:e.name,zoomValue:e.zoomValue,pageNumber:e.pageNumber,value:e.value,formFieldAnnotationType:e.formFieldAnnotationType,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontColor:this.getRgbCode(i.color),borderColor:this.getRgbCode(i.borderColor),thickness:i.thickness,backgroundColor:this.getRgbCode(i.backgroundColor),textAlign:e.textAlign,isChecked:e.isChecked,isSelected:e.isSelected,isReadonly:e.isReadonly,visibility:e.visibility,maxLength:e.maxLength,isRequired:e.isRequired,isPrint:e.isPrint,rotation:0,tooltip:e.tooltip},r.FormField.radiobuttonItem.splice(d,1),r.FormField.radiobuttonItem.push(l),t.isNullOrUndefined(this.pdfViewerBase.formFieldCollection[a])||(this.pdfViewerBase.formFieldCollection[a].FormField.radiobuttonItem=r.FormField.radiobuttonItem,s=!0);break}if(e.formFieldAnnotationType===r.FormField.formFieldAnnotationType&&e.name===r.FormField.name){l={lineBound:e.lineBound,id:e.id,name:e.name,zoomValue:e.zoomValue,pageNumber:e.pageNumber,value:e.value,formFieldAnnotationType:e.formFieldAnnotationType,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontColor:this.getRgbCode(i.color),borderColor:this.getRgbCode(i.borderColor),thickness:i.thickness,backgroundColor:this.getRgbCode(i.backgroundColor),textAlign:e.textAlign,isChecked:e.isChecked,isSelected:e.isSelected,isReadonly:e.isReadonly,visibility:e.visibility,maxLength:e.maxLength,isRequired:e.isRequired,isPrint:e.isPrint,rotation:0,tooltip:e.tooltip};for(var u=!1,M=0;M<r.FormField.radiobuttonItem.length;M++)if(r.FormField.radiobuttonItem[M].id===l.id){r.FormField.radiobuttonItem[M]=l,u=!0;break}if(u||r.FormField.radiobuttonItem.push(l),!t.isNullOrUndefined(this.pdfViewerBase.formFieldCollection[a])){this.pdfViewerBase.formFieldCollection[a].FormField.radiobuttonItem=r.FormField.radiobuttonItem,s=!0;for(var p=0;p<this.pdfViewerBase.formFieldCollection.length;p++)this.pdfViewerBase.formFieldCollection[p].Key===l.id&&this.pdfViewerBase.formFieldCollection.splice(p,1)}}}}if(s){var h=JSON.stringify(this.pdfViewerBase.formFieldCollection);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",h)}}return s},a.prototype.getRgbCode=function(e){if(!e.match(/#([a-z0-9]+)/gi)&&!e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)){var i=this.nameToHash(e);""!=i&&(e=i)}var n=e.split(",");return t.isNullOrUndefined(n[1])&&(n=(e=this.getValue(e,"rgba")).split(",")),{r:parseInt(n[0].split("(")[1]),g:parseInt(n[1]),b:parseInt(n[2]),a:100*parseFloat(n[3])}},a.prototype.nameToHash=function(e){var t={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",yellow:"#ffff00",yellowgreen:"#9acd32",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkred:"#8b0000",darksalmon:"#e9967a",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",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",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",indigo:"#4b0082",ivory:"#fffff0",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",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",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",pink:"#ffc0cb",plum:"#dda0dd",steelblue:"#4682b4",violet:"#ee82ee",powderblue:"#b0e0e6",purple:"#800080",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0"};return void 0!==t[e.toLowerCase()]?t[e.toLowerCase()]:""},a.prototype.getValue=function(e,t){if(t=t?t.toLowerCase():"hex","r"===e[0]){i=this.convertRgbToNumberArray(e);if("hex"===t||"hexa"===t){n=this.rgbToHex(i);return"hex"===t?n.slice(0,7):n}return"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i.slice(0,3))):"hsva"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i)):"null"}if("h"===e[0]){var i=this.hsvToRgb.apply(this,this.convertRgbToNumberArray(e));if("rgba"===t)return this.convertToRgbString(i);if("hex"===t||"hexa"===t){var n=this.rgbToHex(i);return"hex"===t?n.slice(0,7):n}return"rgb"===t?this.convertToRgbString(i.slice(0,3)):"null"}e=this.roundValue(e);var o=this.hexToRgb(e);return"rgb"!==t&&"hsv"!==t||(o=o.slice(0,3)),"rgba"===t||"rgb"===t?this.convertToRgbString(o):"hsva"===t||"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,o)):"hex"===t?e.slice(0,7):"a"===t?o[3].toString():"null"},a.prototype.convertRgbToNumberArray=function(e){return e.slice(e.indexOf("(")+1,e.indexOf(")")).split(",").map(function(e,t){return 3!==t?parseInt(e,10):parseFloat(e)})},a.prototype.convertToRgbString=function(e){return e.length?4===e.length?"rgba("+e.join()+")":"rgb("+e.join()+")":""},a.prototype.convertToHsvString=function(e){return 4===e.length?"hsva("+e.join()+")":"hsv("+e.join()+")"},a.prototype.roundValue=function(e){if(!e)return"";"#"!==e[0]&&(e="#"+e);var t=e.length;if(4===t&&(e+="f",t=5),5===t){for(var i="",n=1,o=e.length;n<o;n++)i+=e.charAt(n)+e.charAt(n);e="#"+i,t=9}return 7===t&&(e+="ff"),e},a.prototype.hexToRgb=function(e){if(!e)return[];9!==(e=e.trim()).length&&(e=this.roundValue(e));var t=Number((parseInt(e.slice(-2),16)/255).toFixed(2));e=e.slice(1,7);var i=parseInt(e,16),n=[];return n.push(i>>16&255),n.push(i>>8&255),n.push(255&i),n.push(t),n},a.prototype.rgbToHsv=function(e,i,n,o){e/=255,i/=255,n/=255;var s,a,r=Math.max(e,i,n),l=Math.min(e,i,n),d=r,u=r-l;if(a=0===r?0:u/r,r===l)s=0;else{switch(r){case e:s=(i-n)/u+(i<n?6:0);break;case i:s=(n-e)/u+2;break;case n:s=(e-i)/u+4}s/=6}var M=[Math.round(360*s),Math.round(1e3*a)/10,Math.round(1e3*d)/10];return t.isNullOrUndefined(o)||M.push(o),M},a.prototype.hsvToRgb=function(e,i,n,o){var s,a,r,l,d,u,M,p;if(i/=100,n/=100,0===i)return s=a=r=n,[Math.round(255*s),Math.round(255*a),Math.round(255*r),o];switch(e/=60,l=Math.floor(e),d=e-l,u=n*(1-i),M=n*(1-i*d),p=n*(1-i*(1-d)),l){case 0:s=n,a=p,r=u;break;case 1:s=M,a=n,r=u;break;case 2:s=u,a=n,r=p;break;case 3:s=u,a=M,r=n;break;case 4:s=p,a=u,r=n;break;default:s=n,a=u,r=M}var h=[Math.round(255*s),Math.round(255*a),Math.round(255*r)];return t.isNullOrUndefined(o)||h.push(o),h},a.prototype.rgbToHex=function(e){return e.length?"#"+this.hex(e[0])+this.hex(e[1])+this.hex(e[2])+(t.isNullOrUndefined(e[3])?"":0!==e[3]?(Math.round(255*e[3])+65536).toString(16).substr(-2):"00"):""},a.prototype.updateCanvas=function(e,t){t=null!==t&&void 0!==t?t:this.pdfViewerBase.getElement("_annotationCanvas_"+e),this.pdfViewer.drawing.refreshCanvasDiagramLayer(t,e)},a.prototype.rerenderFormFields=function(e){var t=this.pdfViewerBase.getZoomFactor(),i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner");if(null!==i){var n=JSON.parse(i),o=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+e),s=document.getElementById(this.pdfViewer.element.id+"_pageCanvas_"+e);if(null!==n&&null!==s&&null!==o)for(var a=0;a<n.length;a++){var r=n[a].FormField;if(r.pageNumber===e+1){var l=this.pdfViewer.nameTable[n[a].Key.split("_")[0]],d=l.wrapper.children[0];if(d){if("RadioButton"===r.formFieldAnnotationType)for(var u=0;u<r.radiobuttonItem.length;u++)d=(l=this.pdfViewer.nameTable[r.radiobuttonItem[u].id.split("_")[0]]).wrapper.children[0],r.radiobuttonItem[u]=this.renderFormFieldsInZooming(d,r.radiobuttonItem[u],l,t),this.pdfViewerBase.formFieldCollection[a].FormField.radiobuttonItem[u].lineBound=r.radiobuttonItem[u].lineBound,this.pdfViewerBase.formFieldCollection[a].FormField.radiobuttonItem[u].zoomValue=t;else r.lineBound=this.renderFormFieldsInZooming(d,r,l,t).lineBound,this.pdfViewerBase.formFieldCollection[a].FormField.lineBound=r.lineBound,this.pdfViewerBase.formFieldCollection[a].FormField.zoomValue=t;window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))}}}}},a.prototype.renderFormFieldsInZooming=function(e,t,n,o){if(e){var s=void 0,a=void 0,r={id:"form_field_"+e.id+"_html_element",class:"foreign-object"};a=this.createHtmlElement("div",r);var l={id:e.id+"_html_element",class:"foreign-object"};s=this.createHtmlElement("div",l),"SignatureField"===t.formFieldAnnotationType||"InitialField"===t.formFieldAnnotationType?(this.disableSignatureClickEvent=!0,n.value=t.value,n.signatureType=t.signatureType,n.signatureBound=t.signatureBound,e.template=s.appendChild(this.createSignatureDialog(this.pdfViewer,n)),this.disableSignatureClickEvent=!1):"DropdownList"===t.formFieldAnnotationType?e.template=s.appendChild(this.createDropDownList(e,n)):"ListBox"===t.formFieldAnnotationType?e.template=s.appendChild(this.createListBox(e,n)):e.template=s.appendChild(this.createInputElement(t.formFieldAnnotationType,n));var d=document.createElement("div");if(d.id=n.id+"_designer_name",d.style.fontSize=n.fontSize?n.fontSize*o+"px":10*o+"px",d.className="e-pv-show-designer-name",this.pdfViewer.designerMode?(d.innerHTML=n.name,d.style.position="absolute"):(d.innerHTML="",d.style.position="initial"),s.appendChild(d),a.appendChild(s),document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(t.pageNumber-1)).appendChild(a),"RadioButton"===n.formFieldAnnotationType&&document.getElementsByClassName("e-pv-radiobtn-span").length>0)for(var u=document.getElementsByClassName("e-pv-radiobtn-span"),M=0;M<u.length;M++)u[M].style.width=n.bounds.width*o-10+"px",u[M].style.height=n.bounds.height*o-10+"px",0!==parseInt(u[M].style.width,10)&&0!==parseInt(u[M].style.height,10)||(u[M].style.width="2px",u[M].style.height="2px");var p=i.cornersPointsBeforeRotation(n.wrapper.children[0]).topLeft;s.setAttribute("style","height:"+e.actualSize.height*o+"px; width:"+e.actualSize.width*o+"px;left:"+p.x*o+"px; top:"+p.y*o+"px;position:absolute;transform:rotate("+(e.rotateAngle+e.parentTransform)+"deg);pointer-events:"+(this.pdfViewer.designerMode?"none":"all")+";visibility:"+(e.visible?"visible":"hidden")+";opacity:"+e.style.opacity+";"),t.lineBound={X:p.x*o,Y:p.y*o,Width:e.actualSize.width*o,Height:e.actualSize.height*o}}return t},a.prototype.updateFormFieldInitialSize=function(e,t){var i=this.pdfViewerBase.getZoomFactor();switch(t){case"Textbox":case"PasswordField":e.width=200*i,e.height=24*i;break;case"SignatureField":case"InitialField":e.width=200*i,e.height=63*i;break;case"Checkbox":case"RadioButton":e.width=20*i,e.height=20*i;break;case"DropdownList":e.width=200*i,e.height=24*i;break;case"ListBox":e.width=198*i,e.height=66*i}return{width:e.width,height:e.height}},a.prototype.updateHTMLElement=function(e){var n=e.wrapper.children[0],o=this.pdfViewerBase.getZoomFactor();if(n){var s=document.getElementById(n.id+"_html_element");if(!t.isNullOrUndefined(s)){var a=i.cornersPointsBeforeRotation(e.wrapper.children[0]).topLeft;s.setAttribute("style","height:"+n.actualSize.height*o+"px; width:"+n.actualSize.width*o+"px;left:"+a.x*o+"px; top:"+a.y*o+"px;position:absolute;transform:rotate("+(n.rotateAngle+n.parentTransform)+"deg);pointer-events:"+(this.pdfViewer.designerMode?"none":"all")+";visibility:"+(n.visible?"visible":"hidden")+";opacity:"+n.style.opacity+";");var r=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner");if("RadioButton"===e.formFieldAnnotationType){var l=s.firstElementChild.firstElementChild,d=s.firstElementChild.firstElementChild.lastElementChild;n.actualSize.width>n.actualSize.height?(s.firstElementChild.style.display="inherit",l.style.width=l.style.height=n.actualSize.height*o+"px",d.style.width=d.style.height=n.actualSize.height-10+"px"):(s.firstElementChild.style.display="flex",l.style.width=l.style.height=n.actualSize.width*o+"px",d.style.width=d.style.height=n.actualSize.width-10+"px")}if("Checkbox"===e.formFieldAnnotationType){var l=s.firstElementChild.firstElementChild,d=s.firstElementChild.firstElementChild.lastElementChild.firstElementChild;n.actualSize.width>n.actualSize.height?(s.firstElementChild.style.display="inherit",l.style.width=l.style.height=n.actualSize.height*o+"px",d.style.width=n.actualSize.height/5*o+"px",d.style.height=n.actualSize.height/2.5*o+"px",d.style.left=n.actualSize.height/2.5*o+"px",d.style.top=n.actualSize.height/5*o+"px"):(s.firstElementChild.style.display="flex",l.style.width=l.style.height=n.actualSize.width*o+"px",d.style.width=n.actualSize.width/5*o+"px",d.style.height=n.actualSize.width/2.5*o+"px",d.style.left=n.actualSize.width/2.5*o+"px",d.style.top=n.actualSize.width/5*o+"px")}for(var u=JSON.parse(r),M=0;M<u.length;M++)if("RadioButton"===u[M].FormField.formFieldAnnotationType){for(var p=0;p<u[M].FormField.radiobuttonItem.length;p++)if(n.id===u[M].FormField.radiobuttonItem[p].id){this.pdfViewerBase.formFieldCollection[M].FormField.radiobuttonItem[p].lineBound={X:a.x*o,Y:a.y*o,Width:n.actualSize.width*o,Height:n.actualSize.height*o},this.pdfViewerBase.formFieldCollection[M].FormField.radiobuttonItem[p].zoomValue=o;break}}else u[M].Key===n.id&&(u[M].FormField.lineBound={X:a.x*o,Y:a.y*o,Width:n.actualSize.width*o,Height:n.actualSize.height*o},this.pdfViewerBase.formFieldCollection[M].FormField.lineBound=u[M].FormField.lineBound);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))}}},a.prototype.updateSessionFormFieldProperties=function(e){for(var t=this.pdfViewerBase.getZoomFactor(),i=e.wrapper.children[0],n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),o=JSON.parse(n),s=0;s<o.length;s++)if("RadioButton"===o[s].FormField.formFieldAnnotationType){for(var a=0;a<o[s].FormField.radiobuttonItem.length;a++)if(i.id===o[s].FormField.radiobuttonItem[a].id){var r={id:i.id,lineBound:{X:i.bounds.x*t,Y:i.bounds.y*t,Width:i.bounds.width*t,Height:i.bounds.height*t},name:e.name,zoomValue:t,pageNumber:e.pageNumber,value:e.value,formFieldAnnotationType:e.formFieldAnnotationType,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontColor:this.getRgbCode(e.color),backgroundColor:this.getRgbCode(e.backgroundColor),borderColor:this.getRgbCode(e.borderColor),thickness:e.thickness,textAlign:e.alignment,isChecked:e.isChecked,isSelected:e.isSelected,isReadonly:e.isReadonly,visibility:e.visibility,maxLength:e.maxLength,isRequired:e.isRequired,isPrint:e.isPrint,rotation:0,tooltip:e.tooltip};o[s].FormField.radiobuttonItem[a]=r;break}}else if(o[s].Key===i.id){var l={id:i.id,lineBound:{X:i.bounds.x*t,Y:i.bounds.y*t,Width:i.bounds.width*t,Height:i.bounds.height*t},name:e.name,zoomValue:t,pageNumber:e.pageNumber,value:e.value,formFieldAnnotationType:e.formFieldAnnotationType,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,fontColor:this.getRgbCode(e.color),backgroundColor:this.getRgbCode(e.backgroundColor),borderColor:this.getRgbCode(e.borderColor),thickness:e.thickness,textAlign:e.alignment,isChecked:e.isChecked,isSelected:e.isSelected,isReadonly:e.isReadonly,font:{isBold:e.font.isBold,isItalic:e.font.isItalic,isStrikeout:e.font.isStrikeout,isUnderline:e.font.isUnderline},selectedIndex:[],radiobuttonItem:null,option:e.options?e.options:[],visibility:e.visibility,maxLength:e.maxLength,isRequired:e.isRequired,isPrint:e.isPrint,rotation:0,tooltip:e.tooltip};o[s].FormField=l,this.pdfViewerBase.formFieldCollection[s].FormField=l;break}this.pdfViewerBase.formFieldCollection.length>0?this.pdfViewerBase.enableFormFieldButton(!0):this.pdfViewerBase.enableFormFieldButton(!1),window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.createSignatureDialog=function(e,i,n,o){this.isInitialField=!t.isNullOrUndefined(i.isInitialField)&&i.isInitialField,this.pdfViewerBase.isInitialField=this.isInitialField,this.pdfViewerBase.isInitialField=i.isInitialField;var s=t.createElement("div");s.className="foreign-object",s.style.position="absolute",s.style.width="100%",s.style.height="100%";var a=t.createElement("div");a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.backgroundColor="transparent",a.style.border="1px solid #303030",t.isNullOrUndefined(i.value)||""===i.value?(a.className="e-pdfviewer-signatureformfields",a.style.pointerEvents=""):(a.className="e-pdfviewer-signatureformfields-signature",a.style.pointerEvents="none"),a.id=i.id,a.addEventListener("click",this.openSignatureDialog.bind(this,e)),s.appendChild(a);var r=19===this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.width?i.isInitialField?30:25:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.width,l=i.signatureIndicatorSettings&&i.signatureIndicatorSettings.width?i.signatureIndicatorSettings.width:r,d=10===this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.height?13:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.height,u=i.signatureIndicatorSettings&&i.signatureIndicatorSettings.height?i.signatureIndicatorSettings.height:d,M="orange"===this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.backgroundColor?"#FFE48559":this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.backgroundColor,p=(i.isInitialField,i.bounds?i.bounds.width:n.width),h=i.bounds?i.bounds.height:n.height,L=u>h/2?h/2:u,w=l>p/2?p/2:l,c=10;c=i.signatureIndicatorSettings&&i.signatureIndicatorSettings.fontSize?i.signatureIndicatorSettings.fontSize>L/2?10:i.signatureIndicatorSettings.fontSize:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.fontSize>L/2?10:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.fontSize;var C=t.createElement("span");i.isInitialField?(C.id="initialIcon"+i.pageIndex+"_"+this.setFormFieldIdIndex(),C.innerHTML=i.signatureIndicatorSettings&&i.signatureIndicatorSettings.text?i.signatureIndicatorSettings.text:"Initial"):(C.id="signIcon"+i.pageIndex+"_"+this.setFormFieldIdIndex(),C.innerHTML=i.signatureIndicatorSettings&&i.signatureIndicatorSettings.text?i.signatureIndicatorSettings.text:"Sign"),C.style.color=i.signatureIndicatorSettings&&i.signatureIndicatorSettings.color?i.signatureIndicatorSettings.color:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.color,C.style.backgroundColor=i.signatureIndicatorSettings&&i.signatureIndicatorSettings.backgroundColor?i.signatureIndicatorSettings.backgroundColor:M,C.style.opacity=i.signatureIndicatorSettings&&i.signatureIndicatorSettings.opacity?i.signatureIndicatorSettings.opacity:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.opacity,C.style.position="absolute";var g=this.pdfViewerBase.getZoomFactor();return C.style.width=w*g+NaN,C.style.height=L*g+NaN,C.style.textAlign="center",C.style.fontSize=c*g+"px",C.style.paddingTop="1px",o||s.appendChild(C),t.isNullOrUndefined(i.tooltip)||""==i.tooltip||this.setToolTip(i.tooltip,s),s},a.prototype.openSignatureDialog=function(e,i){e.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.pdfViewerBase.currentTarget=i.target;var n="";n=-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Trident")?this.pdfViewerBase.currentTarget.id:t.isNullOrUndefined(i.path)?i.composedPath()[2].id.split("_")[0]:i.path[2].id.split("_")[0],"InitialField"===this.pdfViewer.nameTable[n].formFieldAnnotationType?this.isInitialField=!0:this.isInitialField=!1,this.pdfViewerBase.isToolbarSignClicked=!1,this.pdfViewerBase.isInitialField=this.isInitialField,this.pdfViewerBase.signatureModule.showSignatureDialog(!0),this.pdfViewerBase.isInitialField=!1},a.prototype.createDropDownList=function(e,i){var n=i.options?i.options:[],o=t.createElement("div");o.className="foreign-object",o.style.position="absolute",o.style.width="100%",o.style.height="100%";var s=document.createElement("select");s.addEventListener("change",this.dropdownChange.bind(this)),s.id=i.id+"_"+i.pageIndex+"_"+this.setFormFieldIdIndex(),s.name="editabledropdown"+this.pdfViewerBase.activeElements.activePageID+e.id,s.className="e-pv-formfield-dropdown",s.style.width="100%",s.style.height="100%",this.updateDropdownListProperties(i,s);for(var a=0;a<n.length;a++){var r=document.createElement("option");r.className="e-pv-formfield-dropdown",r.value=n[a].itemValue,r.text=n[a].itemName,this.updateDropdownListProperties(i,r),s.appendChild(r)}return s.selectedIndex=t.isNullOrUndefined(i.selectedIndex)?0:i.selectedIndex,o.appendChild(s),t.isNullOrUndefined(i.tooltip)||""==i.tooltip||this.setToolTip(i.tooltip,o),o},a.prototype.createListBox=function(e,i){var n=i.options?i.options:[],o=t.createElement("div");o.className="foreign-object",o.style.position="absolute",o.style.width="100%",o.style.height="100%";var s=document.createElement("select");s.addEventListener("click",this.listBoxChange.bind(this)),s.id=i.id+"_"+i.pageIndex+"_"+this.setFormFieldIdIndex(),s.name="editabledropdown"+this.pdfViewerBase.activeElements.activePageID+e.id,s.className="e-pv-formfield-listbox",s.style.width="100%",s.style.height="100%",s.multiple=!0,this.updateListBoxProperties(i,s);for(var a=0;a<n.length;a++){var r=document.createElement("option");if(r.className="e-pv-formfield-listbox",r.value=n[a].itemValue,r.text=n[a].itemName,!t.isNullOrUndefined(i.selectedIndex))for(var l=0;l<i.selectedIndex.length;l++)a===i.selectedIndex[l]&&(r.selected=!0);this.updateListBoxProperties(i,r),s.appendChild(r)}return o.appendChild(s),s.style.borderColor=i.borderColor?i.borderColor:"#303030",t.isNullOrUndefined(i.tooltip)||""==i.tooltip||this.setToolTip(i.tooltip,o),o},a.prototype.createInputElement=function(e,i,n,o){var s=this.pdfViewerBase.getZoomFactor(),a=t.createElement("div");a.className="foreign-object",a.style.position="absolute",a.style.width="100%",a.style.height="100%";var r,l,d,u=t.createElement("input");return u.id=i.id+"_"+i.pageIndex+"_"+this.setFormFieldIdIndex(),"Textbox"===e?(u.type="text",u.className="e-pv-formfield-input",u.autocomplete="off",u.addEventListener("change",this.getTextboxValue.bind(this)),u.addEventListener("click",this.inputElementClick.bind(this)),this.updateTextboxProperties(i,u)):"Checkbox"==e?(a.style.textAlign="chrome"===t.Browser.info.name?"-webkit-center":"center",a.style.display="flex",a.style.alignItems="center",(r=t.createElement("label",{className:"e-pv-checkbox-container"})).style.width=i.bounds?i.bounds.width*s+"px":n.width*s+"px",r.style.height=i.bounds?i.bounds.height*s+"px":n.height*s+"px",this.isDrawHelper?r.style.cursor="crosshair":r.style.cursor="pointer",(l=t.createElement("div",{className:"e-pv-checkbox-div"})).addEventListener("click",this.setCheckBoxState.bind(this)),l.id=i.id+"_input",(d=i.isChecked?t.createElement("span",{className:"e-pv-checkbox-span e-pv-cb-checked"}):t.createElement("span",{className:"e-pv-checkbox-span e-pv-cb-unchecked"})).id=i.id+"_input_span",r.id=i.id+"_input_label",d.style.width=i.bounds?i.bounds.width/5*s+"px":n.width/5*s+"px",d.style.height=i.bounds?i.bounds.height/2.5*s+"px":n.height/2.5*s+"px",d.style.left=i.bounds?i.bounds.width/2.5*s+"px":n.width/2.5*s+"px",d.style.top=i.bounds?i.bounds.height/5*s+"px":n.height/5*s+"px",u.type="checkbox",u.style.margin="0px",u.style.width=i.bounds?i.bounds.width*s+"px":n.width*s+"px",u.style.height=i.bounds?i.bounds.height*s+"px":n.height*s+"px",o?this.updateCheckboxProperties(i,u):this.updateCheckboxProperties(i,l),r.appendChild(u),r.appendChild(l),l.appendChild(d),o&&(u.style.outlineWidth=i.thickness+"px",u.style.outlineColor=i.borderColor,u.style.outlineStyle="solid",u.style.background=i.backgroundColor)):"PasswordField"==e?(u.type="password",u.className="e-pv-formfield-input",u.addEventListener("click",this.inputElementClick.bind(this)),u.addEventListener("change",this.getTextboxValue.bind(this)),this.updatePasswordFieldProperties(i,u)):(a.style.textAlign="chrome"===t.Browser.info.name?"-webkit-center":"center",a.style.display="flex",a.style.alignItems="center",(r=t.createElement("label",{className:"e-pv-radiobtn-container"})).style.width=i.bounds?i.bounds.width*s+"px":n.width*s+"px",r.style.height=i.bounds?i.bounds.height*s+"px":n.height*s+"px",r.style.display="flex",r.style.boxShadow=i.borderColor+" 0px 0px 0px "+i.thickness+"px",r.style.borderRadius="50%",r.addEventListener("click",this.setRadioButtonState.bind(this)),this.isDrawHelper?r.style.cursor="crosshair":r.style.cursor="pointer",r.style.background=i.backgroundColor,(d=t.createElement("span",{className:"e-pv-radiobtn-span"})).id=i.id,d.style.width=i.bounds?i.bounds.width*s+"px":n.width*s+"px",d.style.height=i.bounds?i.bounds.height*s+"px":n.height*s+"px",d.addEventListener("click",this.setRadioButtonState.bind(this)),r.id=i.id+"_input_label",u.type="radio",o||(u.className="e-pv-radio-btn"),u.style.margin="0px",u.addEventListener("click",function(e){e.stopPropagation()}),u.style.width=i.bounds?i.bounds.width*s+"px":n.width*s+"px",u.style.height=i.bounds?i.bounds.height*s+"px":n.height*s+"px",this.updateRadioButtonProperties(i,u),r.appendChild(u),r.appendChild(d)),"Checkbox"!==e&&"RadioButton"!==e||o?(u.style.width="100%",u.style.height="100%",a.appendChild(u)):a.appendChild(r),t.isNullOrUndefined(i.tooltip)||""==i.tooltip||("RadioButton"===e?this.setToolTip(i.tooltip,r):this.setToolTip(i.tooltip,a)),this.isDrawHelper=!1,a},a.prototype.listBoxChange=function(e){for(var t=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),i=JSON.parse(t),n=0;n<i.length;n++)if(i[n].Key.split("_")[0]===e.currentTarget.id.split("_")[0]||this.pdfViewer.nameTable[e.currentTarget.id.split("_")[0]].name===i[n].FormField.name){if(i[n].Key.split("_")[0]!==e.currentTarget.id.split("_")[0])for(var o=document.getElementById(i[n].Key.split("_")[0]+"_content_html_element").firstElementChild.firstElementChild,s=0;s<e.currentTarget.options.length;s++)o.options[s].selected=e.currentTarget.options[s].selected;i[n].FormField.selectedIndex=[];for(var a=this.pdfViewerBase.formFieldCollection[n].FormField.selectedIndex,r=0;r<e.currentTarget.selectedOptions.length;r++){var l=e.currentTarget.selectedOptions[r].index,d=0;0!==this.pdfViewerBase.formFieldCollection[n].FormField.selectedIndex.length&&(d=this.pdfViewerBase.formFieldCollection[n].FormField.selectedIndex.pop(),this.pdfViewerBase.formFieldCollection[n].FormField.selectedIndex.push(d));var u=i[n].FormField.option[d].value;i[n].FormField.selectedIndex.push(l),this.pdfViewer.nameTable[i[n].Key.split("_")[0]].selectedIndex=i[n].FormField.selectedIndex,this.pdfViewerBase.formFieldCollection[n].FormField.selectedIndex=i[n].FormField.selectedIndex;var M=i[n].FormField.option[l].value;this.pdfViewer.fireFormFieldPropertiesChangeEvent("formFieldPropertiesChange",i[n].FormField,this.pdfViewerBase.formFieldCollection[n].FormField.pageNumber,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,u,M)}this.pdfViewer.annotation.addAction(this.pdfViewerBase.formFieldCollection[n].FormField.pageNumber,null,this.pdfViewerBase.formFieldCollection[n].FormField,"FormField Value Change","",a,this.pdfViewerBase.formFieldCollection[n].FormField.selectedIndex)}window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.dropdownChange=function(e){for(var t=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),i=JSON.parse(t),n=0;n<i.length;n++)if(i[n].Key.split("_")[0]===e.target.id.split("_")[0]||this.pdfViewer.nameTable[e.target.id.split("_")[0]].name===i[n].FormField.name){var o=document.getElementById(e.currentTarget.id).selectedIndex,s=0;0!==i[n].FormField.selectedIndex.length&&(s=i[n].FormField.selectedIndex.pop(),i[n].FormField.selectedIndex.push(s));var a=i[n].FormField.option[s].value;i[n].FormField.selectedIndex.push(o),this.pdfViewer.nameTable[i[n].Key.split("_")[0]].selectedIndex=o,this.pdfViewerBase.formFieldCollection[n].FormField.selectedIndex.push(o);var r=i[n].FormField.option[o].value;i[n].Key.split("_")[0]!==e.target.id.split("_")[0]&&(document.getElementById(i[n].Key.split("_")[0]+"_content_html_element").firstElementChild.firstElementChild.selectedIndex=o),this.pdfViewer.fireFormFieldPropertiesChangeEvent("formFieldPropertiesChange",i[n].FormField,this.pdfViewerBase.formFieldCollection[n].FormField.pageNumber,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r),this.pdfViewer.annotation.addAction(this.pdfViewerBase.formFieldCollection[n].FormField.pageNumber,null,this.pdfViewerBase.formFieldCollection[n].FormField,"FormField Value Change","",s,o)}window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.setCheckBoxState=function(e){var t=!1;if(!this.pdfViewer.nameTable[e.target.id.split("_")[0]].isReadonly){e.target&&e.target.firstElementChild&&"e-pv-checkbox-span e-pv-cb-checked"===e.target.firstElementChild.className?(e.target.firstElementChild.classList.remove("e-pv-cb-checked"),e.target.firstElementChild.classList.add("e-pv-checkbox-span","e-pv-cb-unchecked"),t=!1):"e-pv-checkbox-span e-pv-cb-checked"===e.target.className?(e.target.classList.remove("e-pv-cb-checked"),e.target.classList.add("e-pv-checkbox-span","e-pv-cb-unchecked"),t=!1):(e.target.firstElementChild.classList.remove("e-pv-cb-unchecked"),e.target.firstElementChild.classList.add("e-pv-checkbox-span","e-pv-cb-checked"),t=!0);for(var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),n=JSON.parse(i),o=0;o<n.length;o++)if(n[o].Key.split("_")[0]===e.target.id.split("_")[0]||this.pdfViewer.nameTable[e.target.id.split("_")[0]].name===n[o].FormField.name){this.pdfViewer.nameTable[n[o].Key.split("_")[0]].isChecked=t;var s=this.pdfViewerBase.formFieldCollection[o].FormField.isChecked;if(n[o].FormField.isChecked=t,this.pdfViewerBase.formFieldCollection[o].FormField.isChecked=n[o].FormField.isChecked,n[o].Key.split("_")[0]!==e.target.id.split("_")[0]){var a=document.getElementById(n[o].Key.split("_")[0]+"_input").firstElementChild;t?(a.classList.contains("e-pv-cb-unchecked")&&a.classList.remove("e-pv-cb-unchecked"),a.classList.add("e-pv-cb-checked")):(a.classList.contains("e-pv-cb-checked")&&a.classList.remove("e-pv-cb-checked"),a.classList.add("e-pv-cb-unchecked"))}this.pdfViewer.fireFormFieldPropertiesChangeEvent("formFieldPropertiesChange",n[o].FormField,this.pdfViewerBase.formFieldCollection[o].FormField.pageNumber,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,s,t),this.pdfViewer.annotation.addAction(this.pdfViewerBase.formFieldCollection[o].FormField.pageNumber,null,this.pdfViewerBase.formFieldCollection[o].FormField,"FormField Value Change","",s,t)}window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))}},a.prototype.setCheckedValue=function(e,t){t?(e.firstElementChild.classList.remove("e-pv-cb-unchecked"),e.firstElementChild.classList.add("e-pv-checkbox-span","e-pv-cb-checked")):(e.firstElementChild.classList.remove("e-pv-cb-checked"),e.firstElementChild.classList.add("e-pv-checkbox-span","e-pv-cb-unchecked"))},a.prototype.setRadioButtonState=function(e){for(var t=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),i=JSON.parse(t),n=0;n<i.length;n++)if(null!=i[n].FormField.radiobuttonItem){for(var o=void 0,s=void 0,a=0;a<i[n].FormField.radiobuttonItem.length;a++)if(i[n].FormField.radiobuttonItem[a].id.split("_")[0]===e.currentTarget.id.split("_")[0])this.pdfViewer.nameTable[e.currentTarget.id.split("_")[0]].isSelected=!0,i[n].FormField.radiobuttonItem[a].isSelected=!0,this.pdfViewerBase.formFieldCollection[n].FormField.radiobuttonItem[a].isSelected||(o=this.pdfViewerBase.formFieldCollection[n].FormField.radiobuttonItem[a]),this.pdfViewerBase.formFieldCollection[n].FormField.radiobuttonItem[a].isSelected=!0,this.pdfViewer.fireFormFieldPropertiesChangeEvent("formFieldPropertiesChange",i[n].FormField,this.pdfViewerBase.formFieldCollection[n].FormField.pageNumber,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0);else if(this.pdfViewer.nameTable[e.currentTarget.id.split("_")[0]].name===i[n].FormField.radiobuttonItem[a].name){this.pdfViewer.nameTable[i[n].FormField.radiobuttonItem[a].id.split("_")[0]].isSelected=!1;this.pdfViewerBase.formFieldCollection[n].FormField.radiobuttonItem[a].isSelected;i[n].FormField.radiobuttonItem[a].isSelected=!1,this.pdfViewerBase.formFieldCollection[n].FormField.radiobuttonItem[a].isSelected&&(s=this.pdfViewerBase.formFieldCollection[n].FormField.radiobuttonItem[a]),this.pdfViewerBase.formFieldCollection[n].FormField.radiobuttonItem[a].isSelected=i[n].FormField.radiobuttonItem[a].isSelected,this.pdfViewer.fireFormFieldPropertiesChangeEvent("formFieldPropertiesChange",i[n].FormField,this.pdfViewerBase.formFieldCollection[n].FormField.pageNumber,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!0,!1)}null==o&&null==s||this.pdfViewer.annotation.addAction(this.pdfViewerBase.formFieldCollection[n].FormField.pageNumber,null,this.pdfViewerBase.formFieldCollection[n].FormField,"FormField Value Change","",o,s)}window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.getTextboxValue=function(e){for(var t=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),i=JSON.parse(t),n=0;n<i.length;n++)if(i[n].Key.split("_")[0]===e.target.id.split("_")[0]||this.pdfViewer.nameTable[e.target.id.split("_")[0]].name===i[n].FormField.name){var o=this.pdfViewerBase.formFieldCollection[n].FormField.value;i[n].FormField.value=e.target.value,this.pdfViewer.nameTable[i[n].Key.split("_")[0]].value=i[n].FormField.value,this.pdfViewerBase.formFieldCollection[n].FormField.value=i[n].FormField.value,i[n].Key.split("_")[0]!==e.target.id.split("_")[0]&&(document.getElementById(i[n].Key.split("_")[0]+"_content_html_element").firstElementChild.firstElementChild.value=i[n].FormField.value),this.pdfViewer.fireFormFieldPropertiesChangeEvent("formFieldPropertiesChange",this.pdfViewerBase.formFieldCollection[n].FormField,this.pdfViewerBase.formFieldCollection[n].FormField.pageNumber,!0,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,o,e.target.value),this.pdfViewer.annotation.addAction(this.pdfViewerBase.formFieldCollection[n].FormField.pageNumber,null,this.pdfViewerBase.formFieldCollection[n].FormField,"FormField Value Change","",o,e.target.value)}window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.inputElementClick=function(e){e.target.focus()},a.prototype.addFormField=function(e,i){var n={thickness:0,bounds:{x:i.bounds.X,y:i.bounds.Y,width:i.bounds.Width,height:i.bounds.Height},fontFamily:t.isNullOrUndefined(i.fontFamily)?"Helvetica":i.fontFamily,fontSize:t.isNullOrUndefined(i.fontSize)?10:i.fontSize,color:t.isNullOrUndefined(i.color)?"black":i.color,backgroundColor:t.isNullOrUndefined(i.backgroundColor)?"#daeaf7ff":i.backgroundColor,alignment:t.isNullOrUndefined(i.alignment)?"left":i.alignment,isReadonly:!!i.isReadOnly&&i.isReadOnly};switch(n.fontStyle=t.isNullOrUndefined(i.fontStyle)?"None":i.fontStyle,n.visibility=t.isNullOrUndefined(i.visibility)?"visible":i.visibility,n.value=t.isNullOrUndefined(i.value)?"":i.value,n.isRequired=!!i.isRequired&&i.isRequired,n.isPrint=i.isPrint,n.pageNumber=t.isNullOrUndefined(i.pageNumber)?this.pdfViewerBase.currentPageNumber:i.pageNumber,n.pageIndex=n.pageNumber-1,n.font=i.font,e){case"Textbox":n.formFieldAnnotationType=e,n.name=t.isNullOrUndefined(i.name)?"Textbox"+this.setFormFieldIndex():i.name,n.maxLength=i.maxLength,n.thickness=t.isNullOrUndefined(i.thickness)?1:i.thickness,n.borderColor=t.isNullOrUndefined(i.borderColor)?"#303030":i.borderColor;break;case"Password":n.formFieldAnnotationType="PasswordField",n.name=t.isNullOrUndefined(i.name)?"Password"+this.setFormFieldIndex():i.name,n.maxLength=i.maxLength,n.thickness=t.isNullOrUndefined(i.thickness)?1:i.thickness,n.borderColor=t.isNullOrUndefined(i.borderColor)?"#303030":i.borderColor;break;case"DropDown":n.formFieldAnnotationType="DropdownList",n.name=t.isNullOrUndefined(i.name)?"Dropdown"+this.setFormFieldIndex():i.name,n.options=i.options?i.options:[];for(o=0;o<this.pdfViewer.formFieldCollection.length;o++)if("DropdownList"===(s=this.pdfViewer.formFieldCollection[o]).formFieldAnnotationType&&s.name===n.name){n.options=s.options;break}n.selectedIndex=i.selectedIndex,n.thickness=t.isNullOrUndefined(i.thickness)?1:i.thickness,n.borderColor=t.isNullOrUndefined(i.borderColor)?"#303030":i.borderColor;break;case"ListBox":n.formFieldAnnotationType=e,n.name=t.isNullOrUndefined(i.name)?"List Box"+this.setFormFieldIndex():i.name,n.options=i.options?i.options:[];for(var o=0;o<this.pdfViewer.formFieldCollection.length;o++){var s=this.pdfViewer.formFieldCollection[o];if(s.formFieldAnnotationType===e&&s.name===n.name){n.options=s.options;break}}n.selectedIndex=i.selectedIndex,n.thickness=t.isNullOrUndefined(i.thickness)?1:i.thickness,n.borderColor=t.isNullOrUndefined(i.borderColor)?"#303030":i.borderColor;break;case"CheckBox":n.formFieldAnnotationType="Checkbox",n.bounds={x:i.bounds.X,y:i.bounds.Y,width:i.bounds.Width,height:i.bounds.Height},n.backgroundColor=t.isNullOrUndefined(i.backgroundColor)?"#daeaf7ff":i.backgroundColor,n.isReadonly=!!i.isReadOnly&&i.isReadOnly,n.name=t.isNullOrUndefined(i.name)?"Check Box"+this.setFormFieldIndex():i.name,n.isChecked=!!i.isChecked&&i.isChecked,n.visibility=i.visibility?i.visibility:"visible",n.isRequired=!!i.isRequired&&i.isRequired,n.thickness=t.isNullOrUndefined(i.thickness)?1:i.thickness,n.borderColor=t.isNullOrUndefined(i.borderColor)?"#303030":i.borderColor;break;case"RadioButton":n.formFieldAnnotationType=e,n.bounds={x:i.bounds.X,y:i.bounds.Y,width:i.bounds.Width,height:i.bounds.Height},n.backgroundColor=t.isNullOrUndefined(i.backgroundColor)?"#daeaf7ff":i.backgroundColor,n.isReadonly=!!i.isReadOnly&&i.isReadOnly,n.name=t.isNullOrUndefined(i.name)?"Radio Button"+this.setFormFieldIndex():i.name,n.isSelected=!!i.isSelected&&i.isSelected,n.visibility=i.visibility?i.visibility:"visible",n.isRequired=!!i.isRequired&&i.isRequired,n.thickness=t.isNullOrUndefined(i.thickness)?1:i.thickness,n.borderColor=t.isNullOrUndefined(i.borderColor)?"#303030":i.borderColor;break;case"SignatureField":n.formFieldAnnotationType=e,n.bounds={x:i.bounds.X,y:i.bounds.Y,width:i.bounds.Width,height:i.bounds.Height},n.backgroundColor=t.isNullOrUndefined(i.backgroundColor)?"#daeaf7ff":i.backgroundColor,n.fontSize=t.isNullOrUndefined(i.fontSize)?10:i.fontSize,n.fontStyle=t.isNullOrUndefined(i.fontStyle)?"None":i.fontStyle,n.name=t.isNullOrUndefined(i.name)?"Signature"+ +this.setFormFieldIndex():i.name,n.isRequired=!!i.isRequired&&i.isRequired,n.isReadonly=!!i.isReadOnly&&i.isReadOnly,n.signatureIndicatorSettings=i.signatureIndicatorSettings?{opacity:i.signatureIndicatorSettings.opacity?i.signatureIndicatorSettings.opacity:1,backgroundColor:i.signatureIndicatorSettings.backgroundColor?i.signatureIndicatorSettings.backgroundColor:"orange",width:i.signatureIndicatorSettings.width?i.signatureIndicatorSettings.width:19,height:i.signatureIndicatorSettings.height?i.signatureIndicatorSettings.height:10,fontSize:i.signatureIndicatorSettings.fontSize?i.signatureIndicatorSettings.fontSize:10,text:i.signatureIndicatorSettings.text?i.signatureIndicatorSettings.text:null,color:i.signatureIndicatorSettings.color?i.signatureIndicatorSettings.color:"black"}:null;break;case"InitialField":n.formFieldAnnotationType=e,n.bounds={x:i.bounds.X,y:i.bounds.Y,width:i.bounds.Width,height:i.bounds.Height},n.backgroundColor=t.isNullOrUndefined(i.backgroundColor)?"#daeaf7ff":i.backgroundColor,n.fontSize=t.isNullOrUndefined(i.fontSize)?10:i.fontSize,n.fontStyle=t.isNullOrUndefined(i.fontStyle)?"None":i.fontStyle,n.name=t.isNullOrUndefined(i.name)?"Initial"+ +this.setFormFieldIndex():i.name,n.isRequired=!!i.isRequired&&i.isRequired,n.isReadonly=!!i.isReadOnly&&i.isReadOnly,n.isInitialField=!0,n.signatureIndicatorSettings=i.signatureIndicatorSettings?{opacity:i.signatureIndicatorSettings.opacity?i.signatureIndicatorSettings.opacity:1,backgroundColor:i.signatureIndicatorSettings.backgroundColor?i.signatureIndicatorSettings.backgroundColor:"orange",width:i.signatureIndicatorSettings.width?i.signatureIndicatorSettings.width:19,height:i.signatureIndicatorSettings.height?i.signatureIndicatorSettings.height:10,fontSize:i.signatureIndicatorSettings.fontSize?i.signatureIndicatorSettings.fontSize:10,text:i.signatureIndicatorSettings.text?i.signatureIndicatorSettings.text:null,color:i.signatureIndicatorSettings.color?i.signatureIndicatorSettings.color:"black"}:null}return n.tooltip=t.isNullOrUndefined(i.tooltip)?"":i.tooltip,this.pdfViewerBase.disableTextSelectionMode(),this.drawFormField(n)},a.prototype.drawFormField=function(e){var t=this.pdfViewer.add(e);this.pdfViewer.formFieldCollection.push(t);var i={id:t.id,name:t.name,value:t.value,type:t.formFieldAnnotationType,isReadOnly:t.isReadonly,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,color:t.color,backgroundColor:t.backgroundColor,alignment:t.alignment,visibility:t.visibility,maxLength:t.maxLength,isRequired:t.isRequired,isPrint:t.isPrint,tooltip:t.tooltip,bounds:t.bounds,thickness:t.thickness,borderColor:t.borderColor,signatureIndicatorSettings:t.signatureIndicatorSettings};return this.pdfViewer.formFieldCollections.push(i),this.drawHTMLContent(t.formFieldAnnotationType,t.wrapper.children[0],t,e.pageNumber-1,this.pdfViewer)},a.prototype.setFormFieldMode=function(e,t){switch(e){case"Textbox":this.activateTextboxElement(e);break;case"Password":this.activatePasswordField("PasswordField");break;case"CheckBox":this.activateCheckboxElement("Checkbox");break;case"RadioButton":this.activateRadioButtonElement(e);break;case"DropDown":this.activateDropDownListElement("DropdownList",t);break;case"ListBox":this.activateListboxElement(e,t);break;case"SignatureField":case"InitialField":this.activateSignatureBoxElement(e)}},a.prototype.resetFormField=function(e){var t=this.getFormField(e);if(t){switch(t.formFieldAnnotationType){case"Textbox":this.resetTextboxProperties(t);break;case"PasswordField":this.resetPasswordProperties(t);break;case"Checkbox":this.resetCheckboxProperties(t);break;case"RadioButton":this.resetRadioButtonProperties(t);break;case"DropdownList":this.resetDropdownListProperties(t);break;case"ListBox":this.resetListBoxProperties(t);break;case"SignatureField":case"InitialField":this.resetSignatureTextboxProperties(t)}this.updateSessionFormFieldProperties(t)}},a.prototype.selectFormField=function(e){var t=this.getFormField(e);t&&(this.isProgrammaticSelection=!0,this.pdfViewer.select([t.id]),this.isProgrammaticSelection=!1)},a.prototype.updateFormField=function(e,t){var i=this.getFormField(e);if(i)switch(i.formFieldAnnotationType){case"Textbox":case"PasswordField":case"DropdownList":case"ListBox":case"SignatureField":case"InitialField":var n=document.getElementById(i.id+"_content_html_element").firstElementChild.firstElementChild;this.formFieldPropertyChange(i,t,n);break;case"RadioButton":var o=document.getElementById(i.id+"_content_html_element").firstElementChild.firstElementChild.firstElementChild;this.formFieldPropertyChange(i,t,o);break;case"Checkbox":var s=document.getElementById(i.id+"_content_html_element").firstElementChild.firstElementChild.lastElementChild;this.formFieldPropertyChange(i,t,s)}},a.prototype.formFieldPropertyChange=function(n,o,s){var a,r,l=!1,d=!1,u=!1,M=!1,p=!1,h=!1,L=!1,w=!1,c=!1,C=!1,g=!1,m=!1,f=!1,y=!1,j=!1,S=this.pdfViewerBase.getZoomFactor();if(o.name){n.name=o.name;var A=document.getElementById(n.id+"_designer_name");A.innerHTML=n.name,A.style.fontSize=n.fontSize?n.fontSize*S+"px":10*S+"px",s.name=o.name,this.pdfViewer.nameTable[n.id.split("_")[0]].name=n.name}if("SignatureField"!==n.formFieldAnnotationType&&(o.thickness&&(n.thickness!==o.thickness&&(w=!0,a=n.thickness,r=o.thickness),s.style.borderWidth=o.thickness.toString(),n.thickness=o.thickness,this.pdfViewer.nameTable[n.id.split("_")[0]].thickness=o.thickness,w&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,!1,!1,w,!1,!1,!1,!1,!1,!1,!1,a,r)),o.borderColor)){var T=this.colorNametoHashValue(o.borderColor);n.borderColor!==T&&(L=!0,a=n.borderColor,r=T),n.borderColor=T,s.style.borderColor=T,"RadioButton"===n.formFieldAnnotationType&&(s.parentElement.style.boxShadow=T+" 0px 0px 0px "+n.thickness+"px",this.setToolTip(o.tooltip,s.parentElement)),this.pdfViewer.nameTable[n.id.split("_")[0]].borderColor=T,L&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,!1,L,!1,!1,!1,!1,!1,!1,!1,!1,a,r)}if(o.backgroundColor){var x=this.colorNametoHashValue(o.backgroundColor);n.backgroundColor!==x&&(h=!0,a=n.backgroundColor,r=x),n.backgroundColor=x,s.style.background=x,"RadioButton"===n.formFieldAnnotationType&&(s.parentElement.style.background=n.backgroundColor),this.pdfViewer.nameTable[n.id.split("_")[0]].backgroundColor=x,h&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,h,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r)}if(o.bounds){n.bounds={x:o.bounds.X,y:o.bounds.Y,width:o.bounds.Width,height:o.bounds.Height};var N=this.pdfViewer.nameTable[n.id.split("_")[0]];N.bounds={x:o.bounds.X,y:o.bounds.Y,width:o.bounds.Width,height:o.bounds.Height},N.wrapper.bounds=new i.Rect(o.bounds.X,o.bounds.Y,o.bounds.Width,o.bounds.Height),this.pdfViewer.drawing.nodePropertyChange(N,{bounds:{x:N.wrapper.bounds.x,y:N.wrapper.bounds.y,width:N.wrapper.bounds.width,height:N.wrapper.bounds.height}});var D=N.wrapper.children[0],b=i.cornersPointsBeforeRotation(N.wrapper.children[0]).topLeft,I=document.getElementById(D.id+"_html_element");t.isNullOrUndefined(I)||I.setAttribute("style","height:"+D.actualSize.height*S+"px; width:"+D.actualSize.width*S+"px;left:"+b.x*S+"px; top:"+b.y*S+"px;position:absolute;transform:rotate("+(D.rotateAngle+D.parentTransform)+"deg);pointer-events:"+(this.pdfViewer.designerMode?"none":"all")+";visibility:"+(D.visible?"visible":"hidden")+";opacity:"+D.style.opacity+";")}if(o.isReadOnly&&(n.isReadonly!==o.isReadOnly&&(C=!0,a=n.isReadonly,r=o.isReadOnly),n.isReadonly=o.isReadOnly,this.setReadOnlyToElement(n,s,o.isReadOnly),this.setReadOnlyToFormField(n,o.isReadOnly),this.pdfViewer.nameTable[n.id.split("_")[0]].isReadonly=o.isReadOnly,C&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,!1,!1,!1,!1,C,!1,!1,!1,!1,!1,a,r)),o.isRequired&&(n.isRequired!==o.isRequired&&(f=!0,a=n.isRequired,r=o.isRequired),n.isRequired=o.isRequired,this.setRequiredToElement(n,s,o.isRequired),this.setRequiredToFormField(n,o.isRequired),this.pdfViewer.nameTable[n.id.split("_")[0]].isRequired=o.isRequired,f&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,f,!1,!1,a,r)),o.visibility&&(n.visibility!==o.visibility&&(g=!0,a=n.visibility,r=o.visibility),n.visibility=o.visibility,this.pdfViewer.nameTable[n.id.split("_")[0]].visibility=o.visibility,g&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,g,!1,!1,!1,!1,a,r)),o.isPrint&&(n.isPrint!==o.isPrint&&(y=!0,a=n.isPrint,r=o.isPrint),n.isPrint=o.isPrint,this.pdfViewer.nameTable[n.id.split("_")[0]].isPrint=o.isPrint,y&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,y,!1,a,r)),o.tooltip&&(n.tooltip!==o.tooltip&&(j=!0,a=n.tooltip,r=o.tooltip),n.tooltip=o.tooltip,t.isNullOrUndefined(o.tooltip)||("RadioButton"===n.formFieldAnnotationType?this.setToolTip(o.tooltip,s.parentElement):this.setToolTip(o.tooltip,s)),this.pdfViewer.nameTable[n.id.split("_")[0]].tooltip=o.tooltip,j&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,j,a,r)),"Checkbox"===n.formFieldAnnotationType&&o.isChecked&&(n.isChecked!==this.checkboxCheckedState&&(l=!0,a=n.isChecked,r=o.isChecked),n.isChecked=o.isChecked,s.checked=o.isChecked,this.setCheckedValue(s,o.isChecked),this.pdfViewer.nameTable[n.id.split("_")[0]].isChecked=o.isChecked,l&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,l,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r)),"RadioButton"===n.formFieldAnnotationType&&o.isSelected&&(n.isSelected!==o.isSelected&&(l=!0,a=n.isSelected,r=this.checkboxCheckedState),n.isSelected=o.isSelected,s.checked=o.isSelected,this.pdfViewer.nameTable[n.id.split("_")[0]].isSelected=o.isSelected,l&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,l,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r)),"DropdownList"!==n.formFieldAnnotationType&&"ListBox"!==n.formFieldAnnotationType||o.options&&(n.options=o.options,this.updateDropDownListDataSource(n,s),this.pdfViewer.nameTable[n.id.split("_")[0]].options=n.options),"Textbox"===n.formFieldAnnotationType||"SignatureField"===n.formFieldAnnotationType||"InitialField"===n.formFieldAnnotationType||"DropdownList"===n.formFieldAnnotationType||"ListBox"===n.formFieldAnnotationType||"PasswordField"===n.formFieldAnnotationType){if(o.value&&(n.value!==o.value&&(l=!0,a=n.value,r=o.value),n.value=o.value,"DropdownList"!==n.formFieldAnnotationType&&"ListBox"!==n.formFieldAnnotationType&&(s.value=o.value),this.pdfViewer.nameTable[n.id.split("_")[0]].value=o.value,l&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,l,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r)),o.fontSize&&(n.fontSize!==o.fontSize&&(u=!0,a=n.fontSize,r=o.fontSize),n.fontSize=o.fontSize,s.style.fontSize=o.fontSize*S+"px",this.pdfViewer.nameTable[n.id.split("_")[0]].fontSize=o.fontSize,u&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,u,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r)),o.color){var v=this.colorNametoHashValue(o.color);n.color!==v&&(p=!0,a=n.color,r=v),n.color=v,s.style.color=v,this.pdfViewer.nameTable[n.id.split("_")[0]].color=v,p&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,p,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r)}if("SignatureField"!==n.formFieldAnnotationType&&(o.alignment&&(n.alignment!==o.alignment&&(c=!0,a=n.alignment,r=o.alignment),n.alignment=o.alignment,s.style.textAlign=o.alignment,this.pdfViewer.nameTable[n.id.split("_")[0]].alignment=o.alignment,c&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,!1,!1,!1,c,!1,!1,!1,!1,!1,!1,a,r)),o.maxLength&&(n.maxLength!==o.maxLength&&(m=!0,a=n.maxLength,r=o.maxLength),n.maxLength=o.maxLength,s.maxLength=o.maxLength,this.pdfViewer.nameTable[n.id.split("_")[0]].maxLength=o.maxLength,m&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,m,!1,!1,!1,a,r))),"PasswordField"!==n.formFieldAnnotationType){o.fontFamily&&(n.fontFamily!==o.fontFamily&&(d=!0,a=n.fontFamily,r=o.fontFamily),n.fontFamily=o.fontFamily,s.style.fontFamily=o.fontFamily,this.pdfViewer.nameTable[n.id.split("_")[0]].fontFamily=o.fontFamily,d&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,d,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r));var E="",V="";o.fontStyle&&(E+=n.font.isBold?"Bold, ":"",E+=n.font.isItalic?"Italic, ":"",E+=n.font.isStrikeout?"Strikethrough, ":"",E+=n.font.isUnderline?"Underline, ":"",0!=(o.fontStyle&e.FontStyle.Bold)&&(s.style.fontWeight="bold",n.fontStyle="Bold",n.font.isBold=!0,this.pdfViewer.nameTable[n.id.split("_")[0]].font.isBold=!0),V+=n.font.isBold?"Bold, ":"",0!=(o.fontStyle&e.FontStyle.Italic)&&(s.style.fontStyle="italic",n.fontStyle="Italic",n.font.isItalic=!0,this.pdfViewer.nameTable[n.id.split("_")[0]].font.isItalic=!0),V+=n.font.isItalic?"Italic, ":"",0!=(o.fontStyle&e.FontStyle.Strikethrough)&&(s.style.textDecoration="line-through",n.font.isStrikeout=!0,n.fontStyle="Strikethrough",this.pdfViewer.nameTable[n.id.split("_")[0]].font.isStrikeout=!0),V+=n.font.isStrikeout?"Strikethrough, ":"",0!=(o.fontStyle&e.FontStyle.Underline)&&(s.style.textDecoration="underline",n.fontStyle="Underline",n.font.isUnderline=!0,this.pdfViewer.nameTable[n.id.split("_")[0]].font.isUnderline=!0),V+=n.font.isUnderline?"Underline, ":"",(M=!0)&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",n,!1,!1,!1,M,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,E,V))}}this.updateSessionFormFieldProperties(n);var z={id:n.id,name:n.name,value:n.value,type:n.formFieldAnnotationType,isReadOnly:n.isReadonly,fontFamily:n.fontFamily,fontSize:n.fontSize,fontStyle:n.fontStyle,color:n.color,backgroundColor:n.backgroundColor,alignment:n.alignment,visibility:n.visibility,maxLength:n.maxLength,isRequired:n.isRequired,isPrint:n.isPrint,tooltip:n.tooltip,bounds:n.bounds,thickness:n.thickness,borderColor:n.borderColor};this.pdfViewer.formFieldCollections[this.pdfViewer.formFieldCollections.findIndex(function(e){return e.id===z.id})]=z},a.prototype.colorNametoHashValue=function(e){var t=e;return t.match(/#([a-z0-9]+)/gi)||t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(t=this.nameToHash(t)),""!==t?t:e},a.prototype.getFormField=function(e){var t,i;return"object"==typeof e&&(i=this.getAnnotationsFromAnnotationCollections(e.id))&&(t=this.pdfViewer.nameTable[i.id]),"string"==typeof e&&(i=this.getAnnotationsFromAnnotationCollections(e))&&(t=this.pdfViewer.nameTable[i.id]),t},a.prototype.resetTextboxProperties=function(e){var t=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild;t&&(e.name="textboxField",e.value="",e.fontFamily="Helvetica",e.fontSize=10,e.fontStyle="None",e.color="black",e.backgroundColor="#daeaf7ff",e.alignment="left",e.visibility="visible",e.isReadonly=!1,e.isRequired=!1,e.tooltip="",e.isPrint=!0,e.borderColor="#303030",e.thickness=1,e.maxLength=0,this.updateTextboxProperties(e,t))},a.prototype.resetPasswordProperties=function(e){var t=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild;t&&(e.name="passswordField",e.value="",e.fontFamily="Helvetica",e.fontSize=10,e.fontStyle="None",e.color="black",e.backgroundColor="#daeaf7ff",e.alignment="left",e.visibility="visible",e.isReadonly=!1,e.isRequired=!1,e.tooltip="",e.isPrint=!0,e.borderColor="#303030",e.thickness=1,e.maxLength=0,this.updatePasswordFieldProperties(e,t))},a.prototype.resetCheckboxProperties=function(e){var t=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild;t&&(e.name="checkboxField",e.isChecked=!1,e.backgroundColor="#daeaf7ff",e.visibility="visible",e.isReadonly=!1,e.isRequired=!1,e.tooltip="",e.isPrint=!0,e.borderColor="#303030",e.thickness=1,this.updateCheckboxProperties(e,t))},a.prototype.resetRadioButtonProperties=function(e){var t=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild;t&&(e.name="RadioButtonField",e.isSelected=!1,e.backgroundColor="#daeaf7ff",e.visibility="visible",e.isReadonly=!1,e.isRequired=!1,e.tooltip="",e.isPrint=!0,e.borderColor="#303030",e.thickness=1,this.updateRadioButtonProperties(e,t))},a.prototype.resetDropdownListProperties=function(e){var t=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild;t&&(e.name="dropDownField",e.value="",e.fontFamily="Helvetica",e.fontSize=10,e.fontStyle="None",e.color="black",e.backgroundColor="#daeaf7ff",e.alignment="left",e.visibility="visible",e.isReadonly=!1,e.isRequired=!1,e.tooltip="",e.isPrint=!0,e.borderColor="#303030",e.thickness=1,e.options=[],this.updateDropdownListProperties(e,t),e.options&&this.updateDropDownListDataSource(e,t))},a.prototype.resetListBoxProperties=function(e){var t=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild;t&&(e.name="listBoxField",e.value="",e.fontFamily="Helvetica",e.fontSize=10,e.fontStyle="None",e.color="black",e.backgroundColor="#daeaf7ff",e.alignment="left",e.visibility="visible",e.isReadonly=!1,e.isRequired=!1,e.tooltip="",e.isPrint=!0,e.borderColor="#303030",e.thickness=1,e.options=[],this.updateListBoxProperties(e,t),e.options&&this.updateDropDownListDataSource(e,t))},a.prototype.resetSignatureTextboxProperties=function(e){var t=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild;t&&(e.name="signatureField",e.value="",e.fontFamily="Helvetica",e.fontSize=10,e.fontStyle="None",e.color="black",e.backgroundColor="#daeaf7ff",e.isRequired=!1,e.isReadonly=!1,e.tooltip="",e.isPrint=!0,e.visibility="visible",this.updateSignatureFieldProperties(e,t))},a.prototype.deleteFormField=function(e,i){void 0===i&&(i=!0);var n=this.getFormField(e);n&&(this.clearSelection(e),this.pdfViewer.remove(n),this.pdfViewer.renderDrawing(),t.isNullOrUndefined(this.pdfViewer.toolbar)||t.isNullOrUndefined(this.pdfViewer.toolbar.formDesignerToolbarModule)||this.pdfViewer.toolbar.formDesignerToolbarModule.showHideDeleteIcon(!1),this.pdfViewerBase.formFieldCollection.length>0?this.pdfViewerBase.enableFormFieldButton(!0):this.pdfViewerBase.enableFormFieldButton(!1),i&&this.pdfViewer.annotation.addAction(this.pdfViewerBase.currentPageNumber,null,n,"Delete","",n,n))},a.prototype.clearSelection=function(e){var i,n;"object"==typeof e&&(n=this.getAnnotationsFromAnnotationCollections(e.id),i=this.pdfViewer.nameTable[n.id]),"string"==typeof e&&(n=this.getAnnotationsFromAnnotationCollections(e),i=this.pdfViewer.nameTable[n.id]),i&&this.pdfViewer.selectedItems&&!t.isNullOrUndefined(this.pdfViewer.selectedItems.properties.formFields)&&this.pdfViewer.selectedItems.properties.formFields.length>0&&this.pdfViewer.selectedItems.properties.formFields[0].id===i.id&&this.pdfViewer.clearSelection(this.pdfViewerBase.activeElements.activePageID)},a.prototype.setMode=function(e){e&&-1!==e.indexOf("designer")?(this.enableDisableFormFieldsInteraction(!0),this.pdfViewerBase.disableTextSelectionMode()):(this.enableDisableFormFieldsInteraction(!1),this.pdfViewer.textSelectionModule.enableTextSelectionMode())},a.prototype.enableDisableFormFieldsInteraction=function(e){var t=this.pdfViewer.formFieldCollection;if(t&&t.length>0)for(var i=0;i<t.length;i++){var n=document.getElementById(t[i].id+"_content_html_element"),o=document.getElementById(t[i].id+"_designer_name");if(n)if(e){this.pdfViewer.designerMode=!0,n.style.pointerEvents="none",o.innerHTML=t[i].name;var s=this.pdfViewerBase.getZoomFactor();o.style.fontSize=t[i].fontSize?t[i].fontSize*s+"px":10*s+"px",o.style.position="absolute"}else this.pdfViewer.designerMode=!1,n.style.pointerEvents="all",o.innerHTML="",o.style.position="initial","RadioButton"===t[i].formFieldAnnotationType&&this.updateRadioButtonDesignerProperties(t[i]),"Checkbox"===t[i].formFieldAnnotationType&&this.updateCheckboxFormDesignerProperties(t[i]),this.pdfViewer.clearSelection(t[i].pageIndex)}},a.prototype.getAnnotationsFromAnnotationCollections=function(e){var t=this.pdfViewer.formFieldCollection;if(t&&e)for(var i=0;i<t.length;i++)if(t[i].id===e)return t[i]},a.prototype.updateSignatureValue=function(e){for(var t=0;t<this.pdfViewerBase.formFieldCollection.length;t++)e===this.pdfViewerBase.formFieldCollection[t].FormField.id&&(this.pdfViewerBase.formFieldCollection[t].FormField.value="",this.pdfViewer.nameTable[this.pdfViewerBase.formFieldCollection[t].FormField.id.split("_")[0]].value="",this.pdfViewerBase.formFieldCollection[t].FormField.signatureType="",this.pdfViewer.nameTable[this.pdfViewerBase.formFieldCollection[t].FormField.id.split("_")[0]].signatureType="")},a.prototype.removeFieldsFromAnnotationCollections=function(e){for(var t=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),i=JSON.parse(t),n=0;n<i.length;n++)if(i[n].Key.split("_")[0]===e){i.splice(n,1),this.pdfViewerBase.formFieldCollection.splice(n,1);break}window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection));var o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape");if(o){var s=JSON.parse(o),a=this.pdfViewer.annotationModule.getPageCollection(s,this.pdfViewerBase.currentPageNumber-1);if(s[a]){for(var r=0;r<s[a].annotations.length;r++)if(e===s[a].annotations[r].id){s[a].annotations.splice(r,1);break}var l=JSON.stringify(s);window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_shape",l)}}var d=this.pdfViewer.formFieldCollection;if(d&&e)for(n=0;n<d.length;n++)d[n].formFieldId===e&&this.pdfViewer.formFieldCollection.splice(n,1)},a.prototype.setFormFieldIndex=function(){return this.formFieldIndex=this.formFieldIndex+1,this.formFieldIndex},a.prototype.setFormFieldIdIndex=function(){return this.formFieldIdIndex=this.formFieldIdIndex+1,this.formFieldIdIndex},a.prototype.activateTextboxElement=function(e){this.pdfViewer.drawingObject={formFieldAnnotationType:e,name:"Textbox"+this.setFormFieldIndex(),value:"",fontFamily:"Helvetica",fontSize:10*this.pdfViewerBase.getZoomFactor(),fontStyle:"None",color:"black",backgroundColor:"#daeaf7ff",thickness:1,borderColor:"#303030",alignment:"left",isReadonly:!1,visibility:"visible",isRequired:!1,isPrint:!0,rotateAngle:0,tooltip:"",font:{isItalic:!1,isBold:!1,isStrikeout:!1,isUnderline:!1}},this.pdfViewer.tool="DrawTool"},a.prototype.activatePasswordField=function(e){this.pdfViewer.drawingObject={formFieldAnnotationType:e,name:"Password"+this.setFormFieldIndex(),value:"",fontFamily:"Helvetica",fontSize:10*this.pdfViewerBase.getZoomFactor(),fontStyle:"None",color:"black",alignment:"left",backgroundColor:"#daeaf7ff",thickness:1,borderColor:"#303030",isReadonly:!1,visibility:"visible",isRequired:!1,isPrint:!0,rotateAngle:0,tooltip:"",font:{isItalic:!1,isBold:!1,isStrikeout:!1,isUnderline:!1}},this.pdfViewer.tool="DrawTool"},a.prototype.activateCheckboxElement=function(e){this.pdfViewer.drawingObject={formFieldAnnotationType:e,name:"Check Box"+this.setFormFieldIndex(),isChecked:!1,backgroundColor:"#daeaf7ff",color:"black",thickness:1,borderColor:"#303030",isReadonly:!1,visibility:"visible",isPrint:!0,rotateAngle:0,tooltip:""},this.pdfViewer.tool="DrawTool"},a.prototype.activateRadioButtonElement=function(e){this.pdfViewer.drawingObject={formFieldAnnotationType:e,name:"Radio Button"+this.setFormFieldIndex(),isSelected:!1,backgroundColor:"#daeaf7ff",color:"black",thickness:1,borderColor:"#303030",isReadonly:!1,visibility:"visible",isPrint:!0,rotateAngle:0,tooltip:""},this.pdfViewer.tool="DrawTool"},a.prototype.activateDropDownListElement=function(e,t){this.pdfViewer.drawingObject={formFieldAnnotationType:e,name:"Dropdown"+this.setFormFieldIndex(),fontFamily:"Helvetica",fontSize:10*this.pdfViewerBase.getZoomFactor(),fontStyle:"None",color:"black",backgroundColor:"#daeaf7ff",thickness:1,borderColor:"#303030",alignment:"left",isReadonly:!1,visibility:"visible",isRequired:!1,isPrint:!0,rotateAngle:0,tooltip:"",options:t,isMultiSelect:!1,font:{isItalic:!1,isBold:!1,isStrikeout:!1,isUnderline:!1}},this.pdfViewer.tool="DrawTool"},a.prototype.activateListboxElement=function(e,t){this.pdfViewer.drawingObject={formFieldAnnotationType:e,name:"List Box"+this.setFormFieldIndex(),fontFamily:"Helvetica",fontSize:10*this.pdfViewerBase.getZoomFactor(),fontStyle:"None",color:"black",backgroundColor:"#daeaf7ff",thickness:1,borderColor:"#303030",alignment:"left",isReadonly:!1,visibility:"visible",isRequired:!1,isPrint:!0,rotateAngle:0,tooltip:"",options:t,isMultiSelect:!0,font:{isItalic:!1,isBold:!1,isStrikeout:!1,isUnderline:!1}},this.pdfViewer.tool="DrawTool"},a.prototype.activateSignatureBoxElement=function(e){this.pdfViewer.drawingObject={formFieldAnnotationType:e,name:this.pdfViewer.isInitialFieldToolbarSelection?"Initial"+this.setFormFieldIndex():"Signature"+this.setFormFieldIndex(),fontFamily:"Helvetica",fontSize:10*this.pdfViewerBase.getZoomFactor(),fontStyle:"None",color:"black",backgroundColor:"#daeaf7ff",alignment:"left",isReadonly:!1,visibility:"visible",isRequired:!1,isPrint:!0,rotateAngle:0,tooltip:"",font:{isItalic:!1,isBold:!1,isStrikeout:!1,isUnderline:!1},isInitialField:this.pdfViewer.isInitialFieldToolbarSelection},this.pdfViewer.tool="DrawTool"},a.prototype.updateTextboxProperties=function(e,i){i.name=e.name?e.name:"Textbox"+this.setFormFieldIndex(),i.value=e.value?e.value:"",i.style.fontFamily=e.fontFamily?e.fontFamily:"Helvetica";var n=this.pdfViewerBase.getZoomFactor();i.style.fontSize=e.fontSize?e.fontSize*n+"px":10*n+"px",e.font.isBold&&(i.style.fontWeight="bold"),e.font.isItalic&&(i.style.fontStyle="italic"),e.font.isStrikeout&&(i.style.textDecoration="line-through"),e.font.isUnderline&&(i.style.textDecoration="underline"),i.style.color=e.color?e.color:"black",i.style.backgroundColor=e.backgroundColor?e.backgroundColor:"#daeaf7ff",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px",i.style.borderColor=e.borderColor?e.borderColor:"#303030",i.style.textAlign=e.alignment?e.alignment.toLowerCase():"left",i.style.visibility=e.visibility?e.visibility:"visible",i.style.pointerEvents=e.isReadonly?"none":"default",e.isReadonly&&(i.disabled=!0,i.style.cursor="default",i.style.backgroundColor="transparent"),e.isRequired&&(i.required=!0,i.style.border="1px solid red",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px"),void 0!=e.maxLength&&(i.maxLength=0===e.maxLength?524288:e.maxLength),i.tabIndex=this.formFieldIndex},a.prototype.updatePasswordFieldProperties=function(e,i){i.name=e.name?e.name:"Password"+this.setFormFieldIndex(),i.value=e.value?e.value:"",i.style.fontFamily=e.fontFamily?e.fontFamily:"Helvetica";var n=this.pdfViewerBase.getZoomFactor();i.style.fontSize=e.fontSize?e.fontSize*n+"px":10*n+"px",e.font.isBold&&(i.style.fontWeight="bold"),e.font.isItalic&&(i.style.fontStyle="italic"),e.font.isStrikeout&&(i.style.textDecoration="line-through"),e.font.isUnderline&&(i.style.textDecoration="underline"),i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px",i.style.color=e.color?e.color:"black",i.style.backgroundColor=e.backgroundColor?e.backgroundColor:"#daeaf7ff",i.style.borderColor=e.borderColor?e.borderColor:"#303030",i.style.textAlign=e.alignment?e.alignment.toLowerCase():"left",i.style.visibility=e.visibility?e.visibility:"visible",i.style.pointerEvents=e.isReadonly?"none":"default",e.isReadonly&&(i.disabled=!0,i.style.cursor="default",i.style.backgroundColor="transparent"),e.isRequired&&(i.required=!0,i.style.border="1px solid red",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px"),void 0!=e.maxLength&&(i.maxLength=0===e.maxLength?524288:e.maxLength),i.tabIndex=this.formFieldIndex},a.prototype.updateCheckboxProperties=function(e,i){i.name=e.name?e.name:"Check Box"+this.setFormFieldIndex(),i.checked=!!e.isChecked,i.style.backgroundColor=e.backgroundColor?e.backgroundColor:"#daeaf7ff",i.style.borderColor=e.borderColor?e.borderColor:"#303030",i.style.visibility=e.visibility?e.visibility:"visible",i.style.pointerEvents=e.isReadonly?"none":"default",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px",e.isReadonly&&(i.disabled=!0,i.style.cursor="default",i.style.backgroundColor="transparent"),e.isRequired&&(i.required=!0,i.style.border="1px solid red",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px"),i.tabIndex=this.formFieldIndex},a.prototype.updateRadioButtonProperties=function(e,i){i.name=e.name?e.name:"Radio Button"+this.setFormFieldIndex(),i.checked=!!e.isSelected,i.style.backgroundColor=e.backgroundColor?e.backgroundColor:"#daeaf7ff",i.style.borderColor=e.borderColor?e.borderColor:"#303030",i.style.visibility=e.visibility?e.visibility:"visible",i.style.pointerEvents=e.isReadonly?"none":"default",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px",e.isReadonly&&(i.disabled=!0,i.style.cursor="default",i.style.backgroundColor="transparent"),e.isRequired&&(i.required=!0,i.style.border="1px solid red",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px"),i.tabIndex=this.formFieldIndex},a.prototype.updateDropdownListProperties=function(e,i){i.name=e.name?e.name:"Dropdown"+this.setFormFieldIndex(),i.value=e.value?e.value:"",i.style.fontFamily=e.fontFamily?e.fontFamily:"Helvetica";var n=this.pdfViewerBase.getZoomFactor();i.style.fontSize=e.fontSize?e.fontSize*n+"px":10*n+"px",e.font.isBold&&(i.style.fontWeight="bold"),e.font.isItalic&&(i.style.fontStyle="italic"),e.font.isStrikeout&&(i.style.textDecoration="line-through"),e.font.isUnderline&&(i.style.textDecoration="underline"),i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px",i.style.color=e.color?e.color:"black",i.style.backgroundColor=e.backgroundColor?e.backgroundColor:"#daeaf7ff",i.style.borderColor=e.borderColor?e.borderColor:"#303030",i.style.textAlign=e.alignment?e.alignment.toLowerCase():"left",i.style.visibility=e.visibility?e.visibility:"visible",i.style.pointerEvents=e.isReadonly?"none":"default",e.isReadonly&&(i.disabled=!0,i.style.cursor="default",i.style.backgroundColor="transparent"),e.isRequired&&(i.required=!0,i.style.border="1px solid red",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px"),i.tabIndex=this.formFieldIndex},a.prototype.updateListBoxProperties=function(e,i){i.name=e.name?e.name:"List Box"+this.setFormFieldIndex(),i.value=e.value?e.value:"",i.style.fontFamily=e.fontFamily?e.fontFamily:"Helvetica";var n=this.pdfViewerBase.getZoomFactor();i.style.fontSize=e.fontSize?e.fontSize*n+"px":10*n+"px",e.font.isBold&&(i.style.fontWeight="bold"),e.font.isItalic&&(i.style.fontStyle="italic"),e.font.isStrikeout&&(i.style.textDecoration="line-through"),e.font.isUnderline&&(i.style.textDecoration="underline"),i.style.color=e.color?e.color:"black",i.style.backgroundColor=e.backgroundColor?e.backgroundColor:"#daeaf7ff",i.style.borderColor=e.borderColor?e.borderColor:"#303030",i.style.textAlign=e.alignment?e.alignment.toLowerCase():"left",i.style.visibility=e.visibility?e.visibility:"visible",i.style.pointerEvents=e.isReadonly?"none":"default",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px",e.isReadonly&&(i.disabled=!0,i.style.cursor="default",i.style.backgroundColor="transparent"),e.isRequired&&(i.required=!0,i.style.border="1px solid red",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px"),i.tabIndex=this.formFieldIndex},a.prototype.updateSignatureFieldProperties=function(e,i){i.name=e.name?e.name:"Signature"+this.setFormFieldIndex(),i.value=e.value?e.value:"",i.style.fontFamily=e.fontFamily?e.fontFamily:"Helvetica";var n=this.pdfViewerBase.getZoomFactor();i.style.fontSize=e.fontSize?e.fontSize*n+"px":10*n+"px",e.font.isBold&&(i.style.fontWeight="bold"),e.font.isItalic&&(i.style.fontStyle="italic"),e.font.isStrikeout&&(i.style.textDecoration="line-through"),e.font.isUnderline&&(i.style.textDecoration="underline"),i.style.color=e.color?e.color:"black",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px",i.style.backgroundColor="#FFE48559",e.isReadonly&&(i.disabled=!0,i.style.cursor="default",i.style.backgroundColor="transparent"),e.isRequired&&(i.required=!0,i.style.border="1px solid red",i.style.borderWidth=t.isNullOrUndefined(e.thickness)?"1px":e.thickness+"px"),i.tabIndex=this.formFieldIndex},a.prototype.createHtmlElement=function(e,i){var n=t.createElement(e);return this.setAttributeHtml(n,i),n},a.prototype.setAttributeHtml=function(e,t){for(var i=Object.keys(t),n=0;n<i.length;n++)"style"!==i[n]?e.setAttribute(i[n],t[i[n]]):this.applyStyleAgainstCsp(e,t[i[n]])},a.prototype.applyStyleAgainstCsp=function(e,t){for(var i=t.split(";"),n=0;n<i.length;n++){var o=i[n].split(":");2===o.length&&(e.style[o[0].trim()]=o[1].trim())}},a.prototype.downloadFormDesigner=function(){var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),t=JSON.parse(e);if(t){for(var i=0;i<t.length;i++){var n=t[i].FormField;if("Textbox"===n.formFieldAnnotationType||"PasswordField"===n.formFieldAnnotationType||n.Multiline)null!==n.value&&""!==n.value||(this.pdfViewerBase.validateForm=!0,this.pdfViewerBase.nonFillableFields[n.name]=n.value);else if("RadioButton"===n.formFieldAnnotationType){if(n.radiobuttonItem){for(var o=void 0,s=0;s<n.radiobuttonItem.length;s++)if(n.radiobuttonItem[s].isSelected){o=!0;break}o||(this.pdfViewerBase.validateForm=!0,this.pdfViewerBase.nonFillableFields[n.name]=o)}}else"CheckBox"===n.formFieldAnnotationType?!1===n.isChecked&&(this.pdfViewerBase.validateForm=!0,this.pdfViewerBase.nonFillableFields[n.name]=n.isChecked):"DropdownList"===n.formFieldAnnotationType||"ListBox"===n.formFieldAnnotationType?null!==n.selectedIndex&&0!==n.selectedIndex.length||(this.pdfViewerBase.validateForm=!0,this.pdfViewerBase.nonFillableFields[n.name]=n.selectedIndex):"SignatureField"!==n.formFieldAnnotationType&&"InitialField"!==n.formFieldAnnotationType||null!==n.value&&""!==n.value||(this.pdfViewerBase.validateForm=!0,this.pdfViewerBase.nonFillableFields[n.name]=n.value)}return JSON.stringify(t)}return null},a.prototype.createAnnotationLayer=function(e,i,n,o,s){var a=t.createElement("canvas",{id:this.pdfViewer.element.id+"_annotationCanvas_"+o,className:"e-pv-annotation-canvas"});return a.width=i,a.height=n,a.style.display=s,this.pdfViewerBase.applyElementStyles(a,o),e.appendChild(a),a},a.prototype.resizeAnnotations=function(e,t,i){var n=this.pdfViewerBase.getElement("_annotationCanvas_"+i);n&&(n.style.width=e+"px",n.style.height=t+"px",this.pdfViewerBase.applyElementStyles(n,i))},a.prototype.getEventPageNumber=function(e){var t=e.target;t.classList.contains("e-pv-hyperlink")?t=t.parentElement:t.parentElement.classList.contains("foreign-object")&&(t=t.parentElement.parentElement.parentElement.parentElement);var i=t.id.split("_text_")[1]||t.id.split("_textLayer_")[1]||t.id.split("_annotationCanvas_")[1]||t.id.split("_pageDiv_")[1];return isNaN(i)&&(e=this.pdfViewerBase.annotationEvent)&&(i=(t=e.target).id.split("_text_")[1]||t.id.split("_textLayer_")[1]||t.id.split("_annotationCanvas_")[1]||t.id.split("_pageDiv_")[1]),parseInt(i)},a.prototype.getPropertyPanelHeaderContent=function(e){switch(e){case"Textbox":return"Textbox";case"PasswordField":return"Password";case"Checkbox":return"Checkbox";case"RadioButton":return"Radio Button";case"DropdownList":return"Drop Down";case"ListBox":return"List Box";case"InitialField":return"Initial";case"SignatureField":return"Signature"}},a.prototype.createPropertiesWindow=function(){var e,i=this,n=this.pdfViewer.element.id,s=t.createElement("div",{id:n+"_properties_window",className:"e-pv-properties-form-field-window"}),a=this.createAppearanceTab();this.pdfViewerBase.pageContainer.appendChild(s),e="DropdownList"!==this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType&&"ListBox"!==this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType?"430px":"505px",this.propertiesDialog=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:'<div class="e-pv-form-field-property-header"> '+this.getPropertyPanelHeaderContent(this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType)+" "+this.pdfViewer.localeObj.getConstant("Properties")+"</div>",minHeight:e,target:this.pdfViewer.element,content:a,allowDragging:!0,close:function(){i.destroyPropertiesWindow()}}),!t.Browser.isDevice||this.pdfViewer.enableDesktopMode,this.propertiesDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.onCancelClicked.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.onOkClicked.bind(this)}],this.pdfViewer.enableRtl&&(this.propertiesDialog.enableRtl=!0);var r=t.createElement("div");r.className="e-pv-properties-bottom-spliter",s.appendChild(r),this.propertiesDialog.appendTo(s)},a.prototype.onOkClicked=function(e){var t=this.pdfViewer.selectedItems.formFields[0],n=m(t);if(t){switch(t.formFieldAnnotationType){case"Textbox":case"PasswordField":this.updateTextboxFormDesignerProperties(t);var o=i.cornersPointsBeforeRotation(t.wrapper.children[0]).topLeft;this.updateFormDesignerFieldInSessionStorage(o,t.wrapper.children[0],t.formFieldAnnotationType,t);break;case"Checkbox":this.updateCheckboxFormDesignerProperties(t);var s=i.cornersPointsBeforeRotation(t.wrapper.children[0]).topLeft;this.updateFormDesignerFieldInSessionStorage(s,t.wrapper.children[0],t.formFieldAnnotationType,t);break;case"RadioButton":this.updateRadioButtonDesignerProperties(t);var a=i.cornersPointsBeforeRotation(t.wrapper.children[0]).topLeft;this.updateFormDesignerFieldInSessionStorage(a,t.wrapper.children[0],t.formFieldAnnotationType,t);break;case"SignatureField":case"InitialField":this.updateSignatureTextboxProperties(t);var r=i.cornersPointsBeforeRotation(t.wrapper.children[0]).topLeft;this.updateFormDesignerFieldInSessionStorage(r,t.wrapper.children[0],t.formFieldAnnotationType,t);break;case"DropdownList":this.updateDropdownFormDesignerProperties(t);var l=i.cornersPointsBeforeRotation(t.wrapper.children[0]).topLeft;this.updateFormDesignerFieldInSessionStorage(l,t.wrapper.children[0],t.formFieldAnnotationType,t);break;case"ListBox":this.updateListBoxFormDesignerProperties(t);var d=i.cornersPointsBeforeRotation(t.wrapper.children[0]).topLeft;this.updateFormDesignerFieldInSessionStorage(d,t.wrapper.children[0],t.formFieldAnnotationType,t)}this.updateFormFieldCollections(t);var u=m(t);this.pdfViewer.annotation.addAction(this.pdfViewerBase.currentPageNumber,null,t,"FormDesigner Properties Change","",n,u)}this.propertiesDialog.hide()},a.prototype.updateFormFieldCollections=function(e){var t={id:e.id,name:e.name,value:e.value,type:e.formFieldAnnotationType,isReadOnly:e.isReadonly,fontFamily:e.fontFamily,fontSize:e.fontSize,fontStyle:e.fontStyle,color:e.color,backgroundColor:e.backgroundColor,alignment:e.alignment,visibility:e.visibility,maxLength:e.maxLength,isRequired:e.isRequired,isPrint:e.isPrint,tooltip:e.tooltip,bounds:e.bounds,thickness:e.thickness,borderColor:e.borderColor};this.pdfViewer.formFieldCollections[this.pdfViewer.formFieldCollections.findIndex(function(e){return e.id===t.id})]=t},a.prototype.updateDropdownFormDesignerProperties=function(e,t){var i=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild;if(this.pdfViewer.designerMode||t){var n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),o=JSON.parse(n),s=this.getFormFiledIndex(e.id.split("_")[0]);e.options=this.createDropdownDataSource(e),this.updateDropDownListDataSource(e,i),s>-1&&(o[s].FormField.option=e.options,this.pdfViewerBase.formFieldCollection[s].FormField.option=e.options),this.pdfViewer.nameTable[e.id.split("_")[0]].options=e.options,(this.formFieldName&&this.formFieldName.value||t)&&this.updateNamePropertyChange(e,i,t,s,o),(this.formFieldPrinting||t)&&this.updateIsPrintPropertyChange(e,t,s,o),(this.formFieldTooltip||t)&&this.updateTooltipPropertyChange(e,i,t,s,o),(this.formFieldVisibility||t)&&this.updateVisibilityPropertyChange(e,i,t,s,o),(this.formFieldFontFamily&&this.formFieldFontFamily.value||t)&&this.updateFontFamilyPropertyChange(e,i,t,s,o),(this.formFieldFontSize&&this.formFieldFontSize.value||t)&&this.updateFontSizePropertyChange(e,i,t,s,o),this.updateFontStylePropertyChange(e,i,t,s,o),(this.formFieldAlign||t)&&this.updateAlignmentPropertyChange(e,i,t,s,o),(this.fontColorValue||t)&&this.updateColorPropertyChange(e,i,t,s,o),(this.backgroundColorValue||t)&&this.updateBackgroundColorPropertyChange(e,i,t,s,o),(this.borderColorValue||t)&&this.updateBorderColorPropertyChange(e,i,t,s,o),(this.formFieldBorderWidth||t)&&this.updateBorderThicknessPropertyChange(e,i,t,s,o),(this.formFieldReadOnly||t)&&this.updateIsReadOnlyPropertyChange(e,i,t,s,o),(this.formFieldRequired||t)&&this.updateIsRequiredPropertyChange(e,i,t,s,o)}t&&window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.updateListBoxFormDesignerProperties=function(e,t){var i=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild;if(this.pdfViewer.designerMode||t){var n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),o=JSON.parse(n),s=this.getFormFiledIndex(e.id.split("_")[0]);e.options=this.createDropdownDataSource(e),this.updateDropDownListDataSource(e,i),s>-1&&(o[s].FormField.option=e.options,this.pdfViewerBase.formFieldCollection[s].FormField.option=e.options),this.pdfViewer.nameTable[e.id.split("_")[0]].options=e.options,(this.formFieldName&&this.formFieldName.value||t)&&this.updateNamePropertyChange(e,i,t,s,o),(this.formFieldPrinting||t)&&this.updateIsPrintPropertyChange(e,t,s,o),(this.formFieldTooltip||t)&&this.updateTooltipPropertyChange(e,i,t,s,o),(this.formFieldVisibility||t)&&this.updateVisibilityPropertyChange(e,i,t,s,o),(this.formFieldFontFamily&&this.formFieldFontFamily.value||t)&&this.updateFontFamilyPropertyChange(e,i,t,s,o),(this.formFieldFontSize&&this.formFieldFontSize.value||t)&&this.updateFontSizePropertyChange(e,i,t,s,o),this.updateFontStylePropertyChange(e,i,t,s,o),(this.formFieldAlign||t)&&this.updateAlignmentPropertyChange(e,i,t,s,o),(this.fontColorValue||t)&&this.updateColorPropertyChange(e,i,t,s,o),(this.backgroundColorValue||t)&&this.updateBackgroundColorPropertyChange(e,i,t,s,o),(this.borderColorValue||t)&&this.updateBorderColorPropertyChange(e,i,t,s,o),(this.formFieldBorderWidth||t)&&this.updateBorderThicknessPropertyChange(e,i,t,s,o),(this.formFieldReadOnly||t)&&this.updateIsReadOnlyPropertyChange(e,i,t,s,o),(this.formFieldRequired||t)&&this.updateIsRequiredPropertyChange(e,i,t,s,o)}t&&window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.updateDropDownListDataSource=function(e,t){for(;t.firstChild;)t.firstChild.remove();for(var i=0;i<e.options.length;i++){var n=document.createElement("option");n.className="e-pv-formfield-dropdown",n.value=e.options[i].itemValue,n.text=e.options[i].itemName,t.appendChild(n)}},a.prototype.createDropdownDataSource=function(e){var t=document.getElementById(this.pdfViewer.element.id+"_ul_list_item");if(this.formFieldListItemDataSource=[],t&&t.children&&t.children.length>0)for(var i=0;i<t.children.length;i++){var n=t.children[i];this.formFieldListItemDataSource.push({itemName:n.innerHTML,itemValue:n.innerHTML})}else e&&e.options.length>0&&(this.formFieldListItemDataSource=e.options);return this.formFieldListItemDataSource},a.prototype.updateSignatureTextboxProperties=function(e,t){var i=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),o=JSON.parse(n),s=this.getFormFiledIndex(e.id.split("_")[0]);(this.pdfViewer.designerMode||t)&&((this.formFieldName&&this.formFieldName.value||t)&&this.updateNamePropertyChange(e,i,t,s,o),(this.formFieldPrinting||t)&&this.updateIsPrintPropertyChange(e,t,s,o),(this.formFieldTooltip||t)&&this.updateTooltipPropertyChange(e,i,t,s,o),(this.formFieldVisibility||t)&&this.updateVisibilityPropertyChange(e,i,t,s,o),(this.formFieldReadOnly||t)&&this.updateIsReadOnlyPropertyChange(e,i,t,s,o),(this.formFieldRequired||t)&&this.updateIsRequiredPropertyChange(e,i,t,s,o)),t&&window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.updateCheckboxFormDesignerProperties=function(e,t){var i=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild.lastElementChild,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),o=JSON.parse(n),s=this.getFormFiledIndex(e.id.split("_")[0]);(this.formFieldName&&this.formFieldName.value||t)&&this.updateNamePropertyChange(e,i,t,s,o),(this.backgroundColorValue||t)&&this.updateBackgroundColorPropertyChange(e,i,t,s,o),(this.borderColorValue||t)&&this.updateBorderColorPropertyChange(e,i,t,s,o),(this.formFieldBorderWidth||t)&&this.updateBorderThicknessPropertyChange(e,i,t,s,o),this.formFieldChecked&&(this.checkboxCheckedState=this.formFieldChecked.checked),(this.formFieldPrinting||t)&&this.updateIsPrintPropertyChange(e,t,s,o),(this.formFieldTooltip||t)&&this.updateTooltipPropertyChange(e,i,t,s,o),(this.formFieldVisibility||t)&&this.updateVisibilityPropertyChange(e,i,t,s,o),(void 0!=this.checkboxCheckedState||t)&&this.updateIsCheckedPropertyChange(e,i,t,s,o),(this.pdfViewer.designerMode&&this.borderColorValue||t)&&this.updateBorderColorPropertyChange(e,i,t,s,o),(this.pdfViewer.designerMode&&this.formFieldBorderWidth||t)&&this.updateBorderThicknessPropertyChange(e,i,t,s,o),(this.formFieldReadOnly||t)&&this.updateIsReadOnlyPropertyChange(e,i,t,s,o),(this.formFieldRequired||t)&&this.updateIsRequiredPropertyChange(e,i,t,s,o),t&&window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.updateRadioButtonDesignerProperties=function(e,t){var n=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild.firstElementChild,o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),s=JSON.parse(o),a=this.getFormFiledIndex(e.id.split("_")[0]);if((this.formFieldName&&this.formFieldName.value||t)&&this.updateNamePropertyChange(e,n,t,a,s),this.formFieldChecked&&(this.checkboxCheckedState=this.formFieldChecked.checked),(this.formFieldPrinting||t)&&this.updateIsPrintPropertyChange(e,t,a,s),(this.formFieldTooltip||t)&&this.updateTooltipPropertyChange(e,n,t,a,s),(this.formFieldVisibility||t)&&this.updateVisibilityPropertyChange(e,n,t,a,s),(this.pdfViewer.designerMode&&this.formFieldBorderWidth||t)&&this.updateBorderThicknessPropertyChange(e,n,t,a,s),(this.backgroundColorValue||t)&&this.updateBackgroundColorPropertyChange(e,n,t,a,s),(this.borderColorValue||t)&&this.updateBorderColorPropertyChange(e,n,t,a,s),(void 0!=this.checkboxCheckedState||t)&&this.updateIsSelectedPropertyChange(e,n,t,a,s),(this.formFieldReadOnly||t)&&this.updateIsReadOnlyPropertyChange(e,n,t,a,s),(this.formFieldRequired||t)&&this.updateIsRequiredPropertyChange(e,n,t,a,s),t){var r=this.pdfViewer.nameTable[e.id.split("_")[0]],l=i.cornersPointsBeforeRotation(r.wrapper.children[0]).topLeft;this.updateFormDesignerFieldInSessionStorage(l,r.wrapper.children[0],r.formFieldAnnotationType,r)}},a.prototype.updateTextboxFormDesignerProperties=function(e,t){var i,n,o=document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild,s=!1,a=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formDesigner"),r=JSON.parse(a),l=this.getFormFiledIndex(e.id.split("_")[0]);if(this.pdfViewer.designerMode||t){if((this.formFieldName&&this.formFieldName.value||t)&&this.updateNamePropertyChange(e,o,t,l,r),(this.formFieldValue||t)&&this.updateValuePropertyChange(e,o,t,l,r),(this.formFieldPrinting||t)&&this.updateIsPrintPropertyChange(e,t,l,r),(this.formFieldTooltip||t)&&this.updateTooltipPropertyChange(e,o,t,l,r),(this.formFieldVisibility||t)&&this.updateVisibilityPropertyChange(e,o,t,l,r),(this.formFieldFontFamily&&this.formFieldFontFamily.value||t)&&this.updateFontFamilyPropertyChange(e,o,t,l,r),(this.formFieldFontSize&&this.formFieldFontSize.value||t)&&this.updateFontSizePropertyChange(e,o,t,l,r),this.updateFontStylePropertyChange(e,o,t,l,r),(this.formFieldAlign||t)&&this.updateAlignmentPropertyChange(e,o,t,l,r),this.maxLengthItem||t){this.maxLengthItem&&e.maxLength!==this.maxLengthItem.value&&(s=!0,i=e.maxLength,n=this.maxLengthItem.value);var d=0===this.maxLengthItem.value?524288:this.maxLengthItem.value;t&&0!==e.maxLength?o.maxLength=e.maxLength:(o.maxLength=d,e.maxLength=this.maxLengthItem.value),l>-1&&(r[l].FormField.maxLength=e.maxLength,this.pdfViewerBase.formFieldCollection[l].FormField.maxLength=e.maxLength),this.pdfViewer.nameTable[e.id.split("_")[0]].maxLength=e.maxLength,s&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,s,!1,!1,!1,i,n)}(this.fontColorValue||t)&&this.updateColorPropertyChange(e,o,t,l,r),(this.backgroundColorValue||t)&&this.updateBackgroundColorPropertyChange(e,o,t,l,r),(this.borderColorValue||t)&&this.updateBorderColorPropertyChange(e,o,t,l,r),(this.formFieldBorderWidth||t)&&this.updateBorderThicknessPropertyChange(e,o,t,l,r),(this.formFieldReadOnly||t)&&this.updateIsReadOnlyPropertyChange(e,o,t,l,r),(this.formFieldRequired||t)&&this.updateIsRequiredPropertyChange(e,o,t,l,r)}this.pdfViewer.designerMode||this.formFieldVisibility&&this.formFieldVisibility.value&&(e.visibility=this.formFieldVisibility.value,document.getElementById(e.id+"_content_html_element").firstElementChild.firstElementChild.style.visibility=e.visibility),t&&window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_formDesigner",JSON.stringify(this.pdfViewerBase.formFieldCollection))},a.prototype.updateIsCheckedPropertyChange=function(e,t,i,n,o){if(this.pdfViewer.designerMode||i){var s=!1,a=void 0,r=void 0;e.isChecked!==this.checkboxCheckedState&&(s=!0,a=e.isChecked,r=this.checkboxCheckedState),i||(e.isChecked=this.checkboxCheckedState),n>-1&&(o[n].FormField.isChecked=e.isChecked,this.pdfViewerBase.formFieldCollection[n].FormField.isChecked=e.isChecked),this.pdfViewer.nameTable[e.id.split("_")[0]].isChecked=e.isChecked,s&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,s,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r)}if(!this.pdfViewer.designerMode||i){var l=document.getElementById(e.id+"_input").firstElementChild;e.isChecked?(l.classList.contains("e-pv-cb-unchecked")&&l.classList.remove("e-pv-cb-unchecked"),l.classList.add("e-pv-cb-checked")):(l.classList.contains("e-pv-cb-checked")&&l.classList.remove("e-pv-cb-checked"),l.classList.add("e-pv-cb-unchecked"))}},a.prototype.updateIsSelectedPropertyChange=function(e,t,i,n,o){if(this.pdfViewer.designerMode||i){var s=!1,a=void 0,r=void 0;if(e.isSelected!==this.checkboxCheckedState&&(s=!0,a=e.isSelected,r=this.checkboxCheckedState),i||(e.isSelected=this.checkboxCheckedState),n>-1){o[n].FormField.isSelected=e.isSelected,this.pdfViewerBase.formFieldCollection[n].FormField.isSelected=e.isSelected;for(var l=0;l<o[n].FormField.radiobuttonItem.length;l++)o[n].FormField.radiobuttonItem[l].id.split("_")[0]===e.id.split("_")[0]&&(o[n].FormField.radiobuttonItem[l].isSelected=e.isSelected,this.pdfViewerBase.formFieldCollection[n].FormField.radiobuttonItem[l].isSelected=e.isSelected)}this.pdfViewer.nameTable[e.id.split("_")[0]].isSelected=e.isSelected,s&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,s,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r)}this.pdfViewer.designerMode&&!i||(t.checked=e.isSelected)},a.prototype.updateValuePropertyChange=function(e,t,i,n,o){var s,a,r=!1;this.formFieldValue&&e.value!==this.formFieldValue.value&&(r=!0,s=e.value,a=this.formFieldValue.value),i?t.value=e.value:(e.value=this.formFieldValue.value,t.value=this.formFieldValue.value),n>-1&&(o[n].FormField.value=e.value,this.pdfViewerBase.formFieldCollection[n].FormField.value=e.value),this.pdfViewer.nameTable[e.id.split("_")[0]].value=e.value,r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,r,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,s,a)},a.prototype.updateFontStylePropertyChange=function(e,t,i,n,o){var s=!1,a="",r="",l=this.updateFontStyle(t,e,i,n,o);s=l[0],a=l[1],r=l[2],n>-1&&(o[n].FormField.fontStyle=e.fontStyle,this.pdfViewerBase.formFieldCollection[n].FormField.fontStyle=e.fontStyle),this.pdfViewer.nameTable[e.id.split("_")[0]].fontStyle=e.fontStyle,s&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,s,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,r)},a.prototype.updateBorderThicknessPropertyChange=function(e,t,i,n,o){var s,a,r=!1,l=parseInt(this.formFieldBorderWidth);e.thickness!==l&&(r=!0,s=e.thickness,a=l),i?t.style.borderWidth=e.thickness.toString():(t.style.borderWidth=this.formFieldBorderWidth,e.thickness=l),n>-1&&(o[n].FormField.thickness=e.thickness,this.pdfViewerBase.formFieldCollection[n].FormField.thickness=e.thickness),this.pdfViewer.nameTable[e.id.split("_")[0]].thickness=e.thickness,r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,!1,!1,r,!1,!1,!1,!1,!1,!1,!1,s,a)},a.prototype.updateBorderColorPropertyChange=function(e,t,i,n,o){var s,a,r=!1;e.borderColor!==this.borderColorValue&&(r=!0,s=e.borderColor,a=this.borderColorValue),i?t.style.borderColor=e.borderColor:(t.style.borderColor=this.borderColorValue,e.borderColor=this.borderColorValue),"RadioButton"==e.formFieldAnnotationType&&(t.parentElement.style.boxShadow=this.borderColorValue+" 0px 0px 0px "+e.thickness+"px"),n>-1&&(o[n].FormField.borderColor=this.getRgbCode(e.borderColor),this.pdfViewerBase.formFieldCollection[n].FormField.borderColor=this.getRgbCode(e.borderColor)),this.pdfViewer.nameTable[e.id.split("_")[0]].borderColor=e.borderColor,r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,!1,r,!1,!1,!1,!1,!1,!1,!1,!1,s,a)},a.prototype.updateBackgroundColorPropertyChange=function(e,t,i,n,o){var s,a,r=!1;e.backgroundColor!==this.backgroundColorValue&&(r=!0,s=e.backgroundColor,a=this.backgroundColorValue),i?"RadioButton"==e.formFieldAnnotationType?t.parentElement.style.background=e.backgroundColor:t.style.background=e.backgroundColor:("RadioButton"==e.formFieldAnnotationType?t.parentElement.style.background=this.backgroundColorValue:t.style.background=this.backgroundColorValue,e.backgroundColor=this.backgroundColorValue),n>-1&&(o[n].FormField.backgroundColor=this.getRgbCode(e.backgroundColor),this.pdfViewerBase.formFieldCollection[n].FormField.backgroundColor=this.getRgbCode(e.backgroundColor)),this.pdfViewer.nameTable[e.id.split("_")[0]].backgroundColor=e.backgroundColor,r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,r,!1,!1,!1,!1,!1,!1,!1,!1,!1,s,a)},a.prototype.updateColorPropertyChange=function(e,t,i,n,o){var s,a,r=!1;e.color!==this.fontColorValue&&(r=!0,s=e.color,a=this.fontColorValue),i?t.style.color=e.color:(t.style.color=this.fontColorValue,e.color=this.fontColorValue),n>-1&&(o[n].FormField.color=this.getRgbCode(e.color),this.pdfViewerBase.formFieldCollection[n].FormField.color=this.getRgbCode(e.color)),this.pdfViewer.nameTable[e.id.split("_")[0]].color=e.color,r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,r,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,s,a)},a.prototype.updateAlignmentPropertyChange=function(e,t,i,n,o){var s,a,r=!1;if(e.alignment!==this.formFieldAlign&&(r=!0,s=e.alignment,a=this.formFieldAlign),i){if(t.style.textAlign=e.alignment,("ListBox"==e.formFieldAnnotationType||"DropdownList"==e.formFieldAnnotationType)&&t.children.length>0){t.style.textAlignLast=e.alignment;for(l=0;l<t.children.length;l++)(d=t.children[l]).style.textAlignLast=e.alignment,d.style.textAlign=e.alignment}}else if(t.style.textAlign=this.formFieldAlign,e.alignment=this.formFieldAlign,("ListBox"==e.formFieldAnnotationType||"DropdownList"==e.formFieldAnnotationType)&&t.children.length>0){t.style.textAlignLast=this.formFieldAlign;for(var l=0;l<t.children.length;l++){var d=t.children[l];d.style.textAlignLast=this.formFieldAlign,d.style.textAlign=this.formFieldAlign}}n>-1&&(o[n].FormField.alignment=e.alignment,this.pdfViewerBase.formFieldCollection[n].FormField.alignment=e.alignment),this.pdfViewer.nameTable[e.id.split("_")[0]].alignment=e.alignment,r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,!1,!1,!1,r,!1,!1,!1,!1,!1,!1,s,a)},a.prototype.updateFontSizePropertyChange=function(e,t,i,n,o){var s,a,r=!1,l=this.pdfViewerBase.getZoomFactor(),d=this.formFieldFontSize?parseInt(this.formFieldFontSize.value.toString()):null;e.fontSize!==d&&(r=!0,s=e.fontSize,a=d),i?t.style.fontSize=e.fontSize*l+"px".toString():(e.fontSize=d,t.style.fontSize=parseInt(this.formFieldFontSize.value.toString())*l+"px"),n>-1&&(o[n].FormField.fontSize=e.fontSize,this.pdfViewerBase.formFieldCollection[n].FormField.fontSize=e.fontSize),this.pdfViewer.nameTable[e.id.split("_")[0]].fontSize=e.fontSize,r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,r,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,s,a)},a.prototype.updateFontFamilyPropertyChange=function(e,t,i,n,o){var s,a,r=!1,l=this.formFieldFontFamily?this.formFieldFontFamily.value.toString():"";e.fontFamily!==l&&(r=!0,s=e.fontFamily,a=l),i?t.style.fontFamily=e.fontFamily:(e.fontFamily=l,t.style.fontFamily=l),n>-1&&(o[n].FormField.fontFamily=e.fontFamily,this.pdfViewerBase.formFieldCollection[n].FormField.fontFamily=e.fontFamily),this.pdfViewer.nameTable[e.id.split("_")[0]].fontFamily=e.fontFamily,r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,r,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,s,a)},a.prototype.updateVisibilityPropertyChange=function(e,t,n,o,s){var a,r,l=!1;if(this.formFieldVisibility&&e.visibility!==this.formFieldVisibility.value&&(l=!0,a=e.visibility,r=this.formFieldVisibility.value),n||(e.visibility=this.formFieldVisibility.value),t.style.visibility=e.visibility,"SignatureField"===e.formFieldAnnotationType||"InitialField"===e.formFieldAnnotationType){document.getElementById(e.id+"_content_html_element").firstElementChild.children[1].style.visibility=e.visibility;var d=this.pdfViewer.nameTable[e.id.split("_")[0]+"_content"];if("hidden"===e.visibility)e.wrapper.children.splice(e.wrapper.children.indexOf(d.wrapper.children[0]),1),e.value="",e.signatureType="",s[o].FormField.value="",s[o].FormField.signatureType="",this.pdfViewerBase.formFieldCollection[o].FormField.value="",this.pdfViewerBase.formFieldCollection[o].FormField.signatureType="",this.pdfViewer.remove(d),this.pdfViewer.renderDrawing();else{if("SignatureText"===d.shapeAnnotationType)e.value=d.data,e.signatureType="Text",s[o].FormField.signatureType="Text",s[o].FormField.value=d.data,this.pdfViewerBase.formFieldCollection[o].FormField.value=d.data,this.pdfViewerBase.formFieldCollection[o].FormField.signatureType="Text";else if("SignatureImage"===d.shapeAnnotationType)e.value=d.data,e.signatureType="Image",s[o].FormField.signatureType="Image",s[o].FormField.value=d.data,this.pdfViewerBase.formFieldCollection[o].FormField.value=d.data,this.pdfViewerBase.formFieldCollection[o].FormField.signatureType="Image";else{s[o].FormField.signatureType="Path",e.signatureType="Path",this.pdfViewerBase.formFieldCollection[o].FormField.signatureType="Path";var u=i.processPathData(d.data),M=i.splitArrayCollection(u);e.value=JSON.stringify(M),s[o].FormField.value=JSON.stringify(M),this.pdfViewerBase.formFieldCollection[o].FormField.value=JSON.stringify(M)}if(e.signatureBound=d.signatureBound,"hidden"===a){this.pdfViewer.add(d),e.wrapper.children.push(d.wrapper);var p=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+e.pageIndex);this.pdfViewer.renderDrawing(p,e.pageIndex)}}}o>-1&&(s[o].FormField.visibility=e.visibility,this.pdfViewerBase.formFieldCollection[o].FormField.visibility=e.visibility),this.pdfViewer.nameTable[e.id.split("_")[0]].visibility=e.visibility,l&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,l,!1,!1,!1,!1,a,r)},a.prototype.updateTooltipPropertyChange=function(e,i,o,s,a){var r,l,d=!1;this.formFieldTooltip&&e.tooltip!==this.formFieldTooltip.value&&(d=!0,r=e.tooltip,l=this.formFieldTooltip.value),o?(this.formFieldTooltip=new n.TextBox,this.formFieldTooltip.value=e.tooltip):e.tooltip=this.formFieldTooltip.value,s>-1&&(a[s].FormField.tooltip=e.tooltip,this.pdfViewerBase.formFieldCollection[s].FormField.tooltip=e.tooltip),this.pdfViewer.nameTable[e.id.split("_")[0]].tooltip=this.formFieldTooltip.value,t.isNullOrUndefined(this.formFieldTooltip.value)||""===this.formFieldTooltip.value||this.setToolTip(this.formFieldTooltip.value,"RadioButton"==e.formFieldAnnotationType?i.parentElement:i),d&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,d,r,l)},a.prototype.updateNamePropertyChange=function(e,t,i,n,o){var s=document.getElementById(e.id+"_designer_name"),a=this.pdfViewerBase.getZoomFactor();if(s.style.fontSize=e.fontSize?e.fontSize*a+"px":10*a+"px",i?s.innerHTML=e.name:(e.name=this.formFieldName.value,s.innerHTML=e.name),n>-1&&(o[n].FormField.name=e.name,this.pdfViewerBase.formFieldCollection[n].FormField.name=e.name),t.name=e.name,this.pdfViewer.nameTable[e.id.split("_")[0]].name=e.name,"DropdownList"==e.formFieldAnnotationType||"ListBox"==e.formFieldAnnotationType)for(var r=0;r<this.pdfViewer.formFieldCollection.length;r++){var l=this.pdfViewer.formFieldCollection[r];if(("DropdownList"===l.formFieldAnnotationType||"ListBox"===l.formFieldAnnotationType)&&l.name===e.name&&l.id!==e.id){e.options=l.options,this.updateDropDownListDataSource(e,t);break}}},a.prototype.updateIsReadOnlyPropertyChange=function(e,t,i,n,o){var s,a,r=!1;this.formFieldReadOnly&&e.isReadonly!==this.formFieldReadOnly.checked&&(r=!0,s=e.isReadonly,a=this.formFieldReadOnly.checked),i?(this.formFieldReadOnly=new d.CheckBox,this.formFieldReadOnly.checked=e.isReadonly):e.isReadonly=this.formFieldReadOnly.checked,n>-1&&(o[n].FormField.isReadonly=e.isReadonly,this.pdfViewerBase.formFieldCollection[n].FormField.isReadonly=e.isReadonly),this.pdfViewer.nameTable[e.id.split("_")[0]].isReadonly=e.isReadonly,this.setReadOnlyToElement(e,t,e.isReadonly),this.setReadOnlyToFormField(e,e.isReadonly),r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,!1,!1,!1,!1,r,!1,!1,!1,!1,!1,s,a)},a.prototype.updateIsRequiredPropertyChange=function(e,t,i,n,o){var s,a,r=!1;this.formFieldRequired&&e.isRequired!==this.formFieldRequired.checked&&(r=!0,s=e.isRequired,a=this.formFieldRequired.checked),i?(this.formFieldRequired=new d.CheckBox,this.formFieldRequired.checked=e.isRequired):e.isRequired=this.formFieldRequired.checked,n>-1&&(o[n].FormField.isRequired=e.isRequired,this.pdfViewerBase.formFieldCollection[n].FormField.isRequired=e.isRequired),this.pdfViewer.nameTable[e.id.split("_")[0]].isRequired=e.isRequired,this.setRequiredToElement(e,t,e.isRequired),this.setRequiredToFormField(e,e.isRequired),r&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,r,!1,!1,s,a)},a.prototype.updateIsPrintPropertyChange=function(e,t,i,n){var o,s,a=!1;this.formFieldPrinting&&e.isPrint!==this.formFieldPrinting.checked&&(a=!0,o=e.isPrint,s=this.formFieldPrinting.checked),t?(this.formFieldPrinting=new d.CheckBox,this.formFieldPrinting.checked=e.isPrint):e.isPrint=this.formFieldPrinting.checked,i>-1&&(n[i].FormField.isPrint=e.isPrint,this.pdfViewerBase.formFieldCollection[i].FormField.isPrint=e.isPrint),this.pdfViewer.nameTable[e.id.split("_")[0]].isPrint=e.isPrint,a&&this.updateFormFieldPropertiesChanges("formFieldPropertiesChange",e,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,a,!1,o,s)},a.prototype.getFormFiledIndex=function(e){if(null==this.pdfViewerBase.formFieldCollection||0==this.pdfViewerBase.formFieldCollection.length)return-1;for(var t=0;t<this.pdfViewerBase.formFieldCollection.length;t++)if(this.pdfViewerBase.formFieldCollection[t].Key.split("_")[0]===e)return t;return-1},a.prototype.updateFontStyle=function(e,t,i,n,o){var s=!1,a="",r="";return this.formFieldBold?("Bold"!==t.fontStyle&&(s=!0,a+=t.font.isBold?"Bold, ":""),i?t.font.isBold?this.setFontStyleValues(t,"Bold",this.formFieldBold,e,!0,"bold",n,o):this.setFontStyleValues(t,"None",this.formFieldBold,e,!1,"",n,o):"bold"===this.formFieldBold?this.setFontStyleValues(t,"Bold",this.formFieldBold,e,!0,"bold",n,o):this.setFontStyleValues(t,"None","bold",e,!1,"",n,o)):t.font.isBold&&this.setFontStyleValues(t,"None","bold",e,!1,"",n,o),r+=t.font.isBold?"Bold, ":"",this.formFieldItalic?("Italic"!==t.fontStyle&&(s=!0,a+=t.font.isItalic?"Italic, ":""),i?t.font.isItalic?this.setFontStyleValues(t,"Italic",this.formFieldItalic,e,!0,"italic",n,o):this.setFontStyleValues(t,"None",this.formFieldItalic,e,!1,"",n,o):"italic"===this.formFieldItalic?this.setFontStyleValues(t,"Italic",this.formFieldItalic,e,!0,"italic",n,o):this.setFontStyleValues(t,"None","italic",e,!1,"",n,o)):t.font.isItalic&&this.setFontStyleValues(t,"None","italic",e,!1,"",n,o),r+=t.font.isItalic?"Italic, ":"",this.formFieldUnderline?("Underline"!==t.fontStyle&&(s=!0,a+=t.font.isUnderline?"Underline, ":""),i?t.font.isUnderline?this.setFontStyleValues(t,"Underline",this.formFieldUnderline,e,!0,"underline",n,o):this.setFontStyleValues(t,"None",this.formFieldUnderline,e,!1,"",n,o):"underline"===this.formFieldUnderline?this.setFontStyleValues(t,"Underline",this.formFieldUnderline,e,!0,"underline",n,o):this.setFontStyleValues(t,"None","underline",e,!1,"",n,o)):t.font.isUnderline&&this.setFontStyleValues(t,"None","underline",e,!1,"",n,o),r+=t.font.isUnderline?"Underline, ":"",this.formFieldStrikeOut?("Strikethrough"!==t.fontStyle&&(s=!0,a+=t.font.isStrikeout?"Strikethrough, ":""),i?t.font.isStrikeout?this.setFontStyleValues(t,"Strikethrough",this.formFieldStrikeOut,e,!0,"line-through",n,o):this.setFontStyleValues(t,"None",this.formFieldStrikeOut,e,!1,"",n,o):"line-through"===this.formFieldStrikeOut?this.setFontStyleValues(t,"Strikethrough",this.formFieldStrikeOut,e,!0,"line-through",n,o):this.setFontStyleValues(t,"None","line-through",e,!1,"",n,o)):t.font.isStrikeout&&this.setFontStyleValues(t,"None","line-through",e,!1,"",n,o),r+=t.font.isStrikeout?"Strikethrough, ":"",[s,a,r]},a.prototype.setFontStyleValues=function(e,t,i,n,o,s,a,r){"bold"===i?(e.fontStyle=t,e.font.isBold=o,n.style.fontWeight=s,this.setDropdownFontStyleValue(n,i,s),a>-1&&(r[a].FormField.font.isBold=o,this.pdfViewerBase.formFieldCollection[a].FormField.font.isBold=o),this.pdfViewer.nameTable[e.id.split("_")[0]].font.isBold=o):"italic"===i?(n.style.fontStyle=s,this.setDropdownFontStyleValue(n,i,s),e.fontStyle=t,e.font.isItalic=o,a>-1&&(r[a].FormField.font.isItalic=o,this.pdfViewerBase.formFieldCollection[a].FormField.font.isItalic=o),this.pdfViewer.nameTable[e.id.split("_")[0]].font.isItalic=o):"underline"===i?(this.setDropdownFontStyleValue(n,i,s),n.style.textDecoration=s,e.fontStyle=t,e.font.isUnderline=o,a>-1&&(r[a].FormField.font.isUnderline=o,this.pdfViewerBase.formFieldCollection[a].FormField.font.isUnderline=o),this.pdfViewer.nameTable[e.id.split("_")[0]].font.isUnderline=o):"line-through"===i&&(this.setDropdownFontStyleValue(n,i,s),n.style.textDecoration=s,e.fontStyle=t,e.font.isStrikeout=o,a>-1&&(r[a].FormField.font.isStrikeout=o,this.pdfViewerBase.formFieldCollection[a].FormField.font.isStrikeout=o),this.pdfViewer.nameTable[e.id.split("_")[0]].font.isStrikeout=o)},a.prototype.setDropdownFontStyleValue=function(e,t,i){if(e.length>0)for(var n=0;n<e.length;n++)"bold"===t?e[n].style.fontWeight=i:"italic"===t?e[n].style.fontStyle=i:"underline"===t?e[n].style.textDecoration=i:"line-through"===t&&(e[n].style.textDecoration=i)},a.prototype.updateFormFieldPropertiesChanges=function(e,t,i,n,o,s,a,r,l,d,u,M,p,h,L,w,c,C,g){var m={value:t.value,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,color:t.color,backgroundColor:t.backgroundColor,alignment:t.alignment,isReadonly:t.isReadonly,visibility:t.visibility,maxLength:t.maxLength,isRequired:t.isRequired,isPrint:t.isPrint,rotation:t.rotateAngle,tooltip:t.tooltip,options:t.options,isChecked:t.isChecked,isSelected:t.isSelected};this.pdfViewer.fireFormFieldPropertiesChangeEvent("formFieldPropertiesChange",m,t.pageIndex,i,n,o,s,a,r,l,d,u,M,p,h,L,w,c,C,g)},a.prototype.onCancelClicked=function(e){this.propertiesDialog.hide()},a.prototype.createAppearanceTab=function(){var e=this.pdfViewer.element.id,i=t.createElement("div",{id:e+"_properties_appearance"});"DropdownList"!==this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType&&"ListBox"!==this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType?i.style.height="260px":i.style.height="336px";var n=t.createElement("div");n.className="e-pv-properties-header-spliter",i.appendChild(n);var o=t.createElement("div",{className:"e-pv-properties-tab-style-prop"});return i.appendChild(o),!this.pdfViewer.selectedItems||"ListBox"!==this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType&&"DropdownList"!==this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType?!this.pdfViewer.selectedItems||"SignatureField"!==this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType&&"InitialField"!==this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType?this.tabControl=new r.Tab({items:[{header:{text:'<div class="e-pv-form-field-property-header-general"> '+this.pdfViewer.localeObj.getConstant("General")+"</div>"},content:this.createGeneralProperties()},{header:{text:'<div class="e-pv-form-field-property-header-general"> '+this.pdfViewer.localeObj.getConstant("Appearance")+"</div>"},content:this.createAppearanceProperties()}]},o):this.tabControl=new r.Tab({items:[{header:{text:'<div class="e-pv-form-field-property-header-general"> '+this.pdfViewer.localeObj.getConstant("General")+"</div>"},content:this.createGeneralProperties()}]},o):this.tabControl=new r.Tab({items:[{header:{text:'<div class="e-pv-form-field-property-header-general"> '+this.pdfViewer.localeObj.getConstant("General")+"</div>"},content:this.createGeneralProperties()},{header:{text:'<div class="e-pv-form-field-property-header-general"> '+this.pdfViewer.localeObj.getConstant("Appearance")+"</div>"},content:this.createAppearanceProperties()},{header:{text:'<div class="e-pv-form-field-property-header-general"> '+this.pdfViewer.localeObj.getConstant("Options")+"</div>"},content:this.createOptionProperties()}]},o),o.children[1].style.height="100%",i},a.prototype.createGeneralProperties=function(){var e=this.pdfViewer.selectedItems.formFields?this.pdfViewer.selectedItems.formFields[0]:null,i=["visible","hidden"],o=this.pdfViewer.element.id,s=t.createElement("div",{id:o+"_general_prop_appearance"}),a=t.createElement("div",{className:"e-pv-properties-text-edit-prop"});s.appendChild(a);var r=t.createElement("div",{className:"e-pv-properties-form-field-name-main-div"}),l=t.createElement("div",{className:"e-pv-properties-name-edit-prop"}),M=t.createElement("input",{className:"e-pv-properties-name-edit-input e-input"});l.appendChild(M),r.appendChild(l),this.formFieldName=new n.TextBox({type:"text",floatLabelType:"Always",placeholder:this.pdfViewer.localeObj.getConstant("Name"),value:e.name,cssClass:"e-pv-properties-formfield-name"},M),a.appendChild(r);var p=t.createElement("div",{className:"e-pv-properties-form-field-tooltip-main-div"}),h=t.createElement("div",{className:"e-pv-properties-tooltip-edit-prop"}),L=t.createElement("input",{className:"e-pv-properties-tooltip-prop-input e-input"});h.appendChild(L),p.appendChild(h),this.formFieldTooltip=new n.TextBox({type:"text",floatLabelType:"Always",placeholder:this.pdfViewer.localeObj.getConstant("Tooltip"),value:e.tooltip,cssClass:"e-pv-properties-formfield-tooltip"},L),a.appendChild(p);var w=t.createElement("div",{className:"e-pv-properties-visibility-style-prop"});s.appendChild(w);var c=t.createElement("div",{className:"e-pv-properties-form-field-value-main-div"}),C=t.createElement("div",{className:"e-pv-properties-value-edit-prop"}),g=t.createElement("input",{className:"e-pv-properties-value-input e-input"});C.appendChild(g),c.appendChild(C),this.formFieldValue=new n.TextBox({type:"text",floatLabelType:"Always",placeholder:this.pdfViewer.localeObj.getConstant("Value"),value:e.value,cssClass:"e-pv-properties-formfield-value"},g),"Textbox"!==this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType&&(this.formFieldValue.enabled=!1,this.formFieldValue.value=""),w.appendChild(c);var m=t.createElement("div",{className:"e-pv-properties-form-field-visibility-main-div"}),f=t.createElement("div",{className:"e-pv-properties-visibility-edit-prop"}),y=t.createElement("div",{className:"e-pv-properties-formfield-visibility"});f.appendChild(y),m.appendChild(f);var j="visible"===e.visibility?0:1;this.formFieldVisibility=new u.DropDownList({dataSource:i,floatLabelType:"Always",index:j,value:e.visibility,placeholder:this.pdfViewer.localeObj.getConstant("Form Field Visibility"),cssClass:"e-pv-properties-formfield-visibility"},y),w.appendChild(m);var S=t.createElement("div",{className:"e-pv-properties-checkbox-main-div-prop"}),A=t.createElement("input",{className:"e-pv-properties-checkbox-readonly-input e-input"});if(S.appendChild(A),this.formFieldReadOnly=new d.CheckBox({label:this.pdfViewer.localeObj.getConstant("Read Only"),checked:e.isReadonly,cssClass:"e-pv-properties-form-field-checkbox"},A),"Checkbox"===this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType||"RadioButton"===this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType){var T=t.createElement("input",{className:"e-pv-properties-checkbox-checked-input e-input"});S.appendChild(T),this.formFieldChecked=new d.CheckBox({label:this.pdfViewer.localeObj.getConstant("Checked"),cssClass:"e-pv-properties-form-field-checkbox",checked:e.isChecked||e.isSelected,change:this.checkBoxChange.bind(this)},T)}var x=t.createElement("input",{className:"e-pv-properties-checkbox-required-input e-input"});S.appendChild(x),this.formFieldRequired=new d.CheckBox({label:this.pdfViewer.localeObj.getConstant("Required"),checked:e.isRequired,cssClass:"e-pv-properties-form-field-checkbox"},x);var N=t.createElement("input",{className:"e-pv-properties-checkbox-printing-input e-input"});return S.appendChild(N),this.formFieldPrinting=new d.CheckBox({label:this.pdfViewer.localeObj.getConstant("Show Printing"),checked:e.isPrint,cssClass:"e-pv-properties-form-field-checkbox"},N),s.appendChild(S),s},a.prototype.checkBoxChange=function(e){this.checkboxCheckedState=e.checked},a.prototype.setToolTip=function(e,t){var i=new o.Tooltip({content:e});i.appendTo(t),i.beforeOpen=this.tooltipBeforeOpen.bind(this)},a.prototype.tooltipBeforeOpen=function(e){var i=this.pdfViewer.nameTable[e.target.id.split("_")[0]];t.isNullOrUndefined(i)||(e.element.children[0].innerHTML=i.tooltip)},a.prototype.createAppearanceProperties=function(){var e=this.pdfViewer.selectedItems.formFields?this.pdfViewer.selectedItems.formFields[0]:null,i=["Helvetica","Courier","Times New Roman","Symbol","ZapfDingbats"],o=["6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","36px","40px"],s=this.pdfViewer.element.id,a=t.createElement("div",{id:s+"_formatting_text_prop_appearance"}),r=t.createElement("div",{className:"e-pv-properties-format-text-style-prop"});a.appendChild(r),this.createLabelElement(this.pdfViewer.localeObj.getConstant("Formatting"),r,!0,"e-pv-properties-formfield-label",s+"_properties_formfield_formatting");var l=t.createElement("div",{className:"e-pv-properties-font-items-container"}),d=t.createElement("div",{className:"e-pv-properties-font-family-container"}),M=t.createElement("div",{className:"e-pv-properties-format-font-family-prop"});d.appendChild(M),l.appendChild(d),this.formFieldFontFamily=new u.DropDownList({dataSource:i,value:e.fontFamily,cssClass:"e-pv-properties-formfield-fontfamily"},M),this.setToolTip(this.pdfViewer.localeObj.getConstant("Font family"),d);var p=t.createElement("div",{className:"e-pv-properties-font-size-container"}),h=t.createElement("div",{className:"e-pv-properties-format-font-family-prop"});p.appendChild(h),l.appendChild(p),this.formFieldFontSize=new u.DropDownList({dataSource:o,value:e.fontSize+"px",cssClass:"e-pv-properties-formfield-fontsize"},h),this.setToolTip(this.pdfViewer.localeObj.getConstant("Font size"),p);var L=t.createElement("div",{className:"e-pv-properties-form-field-font-style"});L.onclick=this.fontStyleClicked.bind(this),L.appendChild(this.addClassFontItem("_formField_bold","e-pv-bold-icon",e.font.isBold)),L.appendChild(this.addClassFontItem("_formField_italic","e-pv-italic-icon",e.font.isItalic)),L.appendChild(this.addClassFontItem("_formField_underline_textinput","e-pv-underlinetext-icon",e.font.isUnderline)),L.appendChild(this.addClassFontItem("_formField_strikeout","e-pv-strikeout-icon",e.font.isStrikeout)),l.appendChild(L),a.appendChild(l);var w=t.createElement("div",{className:"e-pv-properties-font-color-container"}),c=t.createElement("div",{className:"e-pv-properties-form-field-font-align"});c.onclick=this.fontAlignClicked.bind(this),c.appendChild(this.addClassFontItem("_formField_left_align","e-pv-left-align-icon","left"===e.alignment)),c.appendChild(this.addClassFontItem("_formField_center_align","e-pv-center-align-icon","center"===e.alignment)),c.appendChild(this.addClassFontItem("_formField_right_align","e-pv-right-align-icon","right"===e.alignment)),w.appendChild(c),this.fontColorElement=t.createElement("div",{className:"e-pv-formfield-textcolor-icon",id:this.pdfViewer.element.id+"formField_textColor"}),this.fontColorPalette=this.createColorPicker(this.fontColorElement.id,e.color),this.fontColorPalette.change=this.onFontColorChange.bind(this),this.fontColorDropDown=this.createDropDownButton(this.fontColorElement,"e-pv-annotation-textcolor-icon",this.fontColorPalette.element.parentElement),w.appendChild(this.fontColorElement),this.setToolTip(this.pdfViewer.localeObj.getConstant("Font color"),this.fontColorDropDown.element),this.updateColorInIcon(this.fontColorElement,this.pdfViewer.selectedItems.formFields[0].color),"Checkbox"!==e.formFieldAnnotationType&&"RadioButton"!==e.formFieldAnnotationType||(this.fontColorPalette.disabled=!0,this.fontColorDropDown.disabled=!0,this.fontColorElement.style.pointerEvents="none",this.fontColorElement.style.opacity="0.5",c.style.pointerEvents="none",c.style.opacity="0.5",this.formFieldFontSize.enabled=!1,this.formFieldFontFamily.enabled=!1,d.style.pointerEvents="none",p.style.pointerEvents="none",L.style.pointerEvents="none",L.style.opacity="0.5");var C=t.createElement("div",{className:"e-pv-formfield-maxlength-group",id:this.pdfViewer.element.id+"formField_maxlength_group"}),g=t.createElement("div",{className:"e-pv-formfield-maxlength-icon",id:this.pdfViewer.element.id+"formField_maxlength"});C.appendChild(g),this.createLabelElement(this.pdfViewer.localeObj.getConstant("Max Length"),g,!0,"e-pv-properties-formfield-label",s+"_properties_formfield_maxlength");var m=t.createElement("div",{className:"e-pv-formfield-maxlength",id:this.pdfViewer.element.id+"formField_maxlength_container"}),f=t.createElement("input",{className:"e-pv-formfield-maxlength-input e-input"});m.appendChild(f),C.appendChild(m),this.maxLengthItem=new n.NumericTextBox({format:"n",value:0!==e.maxLength?e.maxLength:0,min:0},f),w.appendChild(C),this.setToolTip(this.pdfViewer.localeObj.getConstant("Max Length"),this.maxLengthItem.element),"Textbox"!==e.formFieldAnnotationType&&"PasswordField"!==e.formFieldAnnotationType&&(this.maxLengthItem.enabled=!1,g.style.pointerEvents="none"),a.appendChild(w);var y=t.createElement("div",{className:"e-pv-properties-color-container-style-prop"}),j=t.createElement("div",{className:"e-pv-properties-fill-color-style-prop"});a.appendChild(j),this.createLabelElement(this.pdfViewer.localeObj.getConstant("Fill"),j,!0,"e-pv-properties-formfield-label",s+"_properties_formfield_fontcolor"),this.colorDropDownElement=t.createElement("div",{className:"e-pv-formfield-fontcolor-icon",id:this.pdfViewer.element.id+"formField_fontColor"}),this.colorPalette=this.createColorPicker(this.colorDropDownElement.id,e.backgroundColor),this.colorPalette.change=this.onColorPickerChange.bind(this),this.colorDropDown=this.createDropDownButton(this.colorDropDownElement,"e-pv-annotation-color-icon",this.colorPalette.element.parentElement),this.setToolTip(this.pdfViewer.localeObj.getConstant("Fill Color"),this.colorDropDown.element),j.appendChild(this.colorDropDownElement),y.appendChild(j),this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.selectedItems.formFields[0].backgroundColor);var S=t.createElement("div",{className:"e-pv-properties-stroke-color-style-prop"});this.createLabelElement(this.pdfViewer.localeObj.getConstant("Border"),S,!0,"e-pv-properties-formfield-label",s+"_properties_formfield_strokecolor"),this.strokeDropDownElement=t.createElement("div",{className:"e-pv-formfield-strokecolor-icon",id:this.pdfViewer.element.id+"formField_strokeColor"}),this.strokeColorPicker=this.createColorPicker(this.strokeDropDownElement.id,e.borderColor),this.strokeColorPicker.change=this.onStrokePickerChange.bind(this),this.strokeDropDown=this.createDropDownButton(this.strokeDropDownElement,"e-pv-annotation-stroke-icon",this.strokeColorPicker.element.parentElement),this.setToolTip(this.pdfViewer.localeObj.getConstant("Border Color"),this.strokeDropDown.element),S.appendChild(this.strokeDropDownElement),y.appendChild(S),this.updateColorInIcon(this.strokeDropDownElement,this.pdfViewer.selectedItems.formFields[0].borderColor);var A=t.createElement("div",{className:"e-pv-properties-stroke-thickness-style-prop"});this.createLabelElement(this.pdfViewer.localeObj.getConstant("Thickness"),A,!0,"e-pv-properties-formfield-label",s+"_properties_formfield_strokethickness"),this.thicknessElement=t.createElement("div",{className:"e-pv-formfield-strokethickness-icon",id:this.pdfViewer.element.id+"formField_strokethickness"});var T=this.createThicknessSlider(this.thicknessElement.id);return this.thicknessDropDown=this.createDropDownButton(this.thicknessElement,"e-pv-annotation-thickness-icon",T),this.thicknessDropDown.beforeOpen=this.thicknessDropDownBeforeOpen.bind(this),this.setToolTip(this.pdfViewer.localeObj.getConstant("Thickness"),this.thicknessDropDown.element),this.thicknessSlider.change=this.thicknessChange.bind(this),this.thicknessSlider.changed=this.thicknessChange.bind(this),A.appendChild(this.thicknessElement),y.appendChild(A),a.appendChild(y),a},a.prototype.thicknessChange=function(e){1===this.pdfViewer.selectedItems.formFields.length&&(this.formFieldBorderWidth=e.value,this.updateThicknessIndicator())},a.prototype.thicknessDropDownBeforeOpen=function(){1===this.pdfViewer.selectedItems.formFields.length&&(this.formFieldBorderWidth=this.pdfViewer.selectedItems.formFields[0].thickness.toString(),this.thicknessSlider.value=this.pdfViewer.selectedItems.formFields[0].thickness),this.updateThicknessIndicator()},a.prototype.updateThicknessIndicator=function(){this.thicknessIndicator.textContent=this.thicknessSlider.value+" pt"},a.prototype.createOptionProperties=function(){var e=this,i=this.pdfViewer.element.id,o=t.createElement("div",{id:i+"_option_prop_appearance"}),s=t.createElement("div",{className:"e-pv-properties-form-field-list-add-div"}),a=t.createElement("div",{className:"e-pv-properties-form-field-list-item-main-div"});this.createLabelElement(this.pdfViewer.localeObj.getConstant("List Item"),a,!0,"e-pv-properties-formfield-label",i+"_properties_formfield_listitem");var r=t.createElement("div",{className:"e-pv-properties-list-item-edit-prop"}),l=t.createElement("input",{className:"e-pv-properties-list-item-input e-input"});l.addEventListener("keyup",function(t){if(e.formFieldAddButton.disabled=!0,e.formFieldListItem.value=t.target.value,t.target&&t.target.value)if(e.formFieldListItemCollection.length>0)for(var i=0;i<e.formFieldListItemCollection.length;i++){if(e.formFieldListItemCollection[i]===t.target.value){e.formFieldAddButton.disabled=!0;break}e.formFieldAddButton.disabled=!1}else e.formFieldAddButton.disabled=!1}),r.appendChild(l),a.appendChild(r),this.formFieldListItem=new n.TextBox({type:"text",cssClass:"e-pv-properties-formfield-listitem"},l),s.appendChild(a),o.appendChild(s);var u=t.createElement("div",{className:"e-pv-properties-form-field-list-btn-div"}),M=t.createElement("button",{className:"e-btn"});M.addEventListener("click",this.addListItemOnClick.bind(this)),u.appendChild(M),this.formFieldAddButton=new d.Button({content:this.pdfViewer.localeObj.getConstant("Add"),disabled:!0,cssClass:"e-pv-properties-dropdown-btn"},M),s.appendChild(u);var p=t.createElement("div",{className:"e-pv-properties-form-field-export-value-div"}),h=t.createElement("div",{className:"e-pv-properties-form-field-export-value-main-div"});this.createLabelElement(this.pdfViewer.localeObj.getConstant("Export Value"),h,!0,"e-pv-properties-formfield-label",i+"_properties_formfield_exportValue");var L=t.createElement("div",{className:"e-pv-properties-export-value-edit-prop"}),w=t.createElement("input",{className:"e-pv-properties-export-value-input e-input"});L.appendChild(w),h.appendChild(L),this.formFieldListItem=new n.TextBox({type:"text",cssClass:"e-pv-properties-formfield-exportvalue"},w),p.appendChild(h),o.appendChild(p);var c=t.createElement("div",{className:"e-pv-properties-form-field-option-dropdown-list-div"}),C=t.createElement("div",{className:"e-pv-properties-form-field-option-dropdown-list-item-div"});"DropdownList"===this.pdfViewer.selectedItems.formFields[0].formFieldAnnotationType?this.createLabelElement(this.pdfViewer.localeObj.getConstant("Dropdown Item List"),C,!0,"e-pv-properties-formfield-label",i+"_properties_formfield_dropdown_listitem"):this.createLabelElement(this.pdfViewer.localeObj.getConstant("List Box Item List"),C,!0,"e-pv-properties-formfield-label",i+"_properties_formfield_dropdown_listitem"),c.appendChild(C);var g=t.createElement("div",{className:"e-pv-properties-form-field-btn-textarea-container"}),m=t.createElement("div",{className:"e-pv-properties-formfield-textarea",styles:"width:300px;height:123px;border:1px solid #E0E0E0;margin-right:15px;overflow:auto"}),f=t.createElement("ul",{id:this.pdfViewer.element.id+"_ul_list_item",className:"e-pv-form-designer-ul-list-items"}),y=this.createListElement(f);m.appendChild(f),g.appendChild(m);var j=t.createElement("div",{className:"e-pv-properties-form-field-group-btn-div"}),S=t.createElement("div",{className:"e-pv-properties-form-field-delete-btn-div"}),A=t.createElement("button",{className:"e-btn"});A.addEventListener("click",this.deleteListItem.bind(this)),S.appendChild(A),this.formFieldDeleteButton=new d.Button({content:this.pdfViewer.localeObj.getConstant("Delete Item"),disabled:!(y>0),cssClass:"e-pv-properties-dropdown-btn"},A),j.appendChild(S);var T=t.createElement("div",{className:"e-pv-properties-form-field-up-btn-div"}),x=t.createElement("button",{className:"e-btn"});x.addEventListener("click",this.moveUpListItem.bind(this)),T.appendChild(x),this.formFieldUpButton=new d.Button({content:this.pdfViewer.localeObj.getConstant("Up"),disabled:!(y>1),cssClass:"e-pv-properties-dropdown-btn"},x),j.appendChild(T);var N=t.createElement("div",{className:"e-pv-properties-form-field-down-btn-div"}),D=t.createElement("button",{className:"e-btn"});return D.addEventListener("click",this.moveDownListItem.bind(this)),N.appendChild(D),this.formFieldDownButton=new d.Button({content:this.pdfViewer.localeObj.getConstant("Down"),disabled:!0,cssClass:"e-pv-properties-dropdown-btn"},D),j.appendChild(N),g.appendChild(j),c.appendChild(g),o.appendChild(c),o},a.prototype.addListItemOnClick=function(){var e=this.formFieldListItem.value;this.formFieldListItemCollection.push(e);var i=document.getElementById(this.pdfViewer.element.id+"_ul_list_item");if(i.children&&i.children.length>0)for(var n=0;n<i.children.length;n++){var o=i.children[n];o.classList.contains("e-pv-li-select")&&o.classList.remove("e-pv-li-select")}var s=t.createElement("li",{className:"e-pv-formfield-li-element"});s.addEventListener("click",this.listItemOnClick.bind(this)),s.innerHTML=e,s.classList.add("e-pv-li-select"),i.appendChild(s),this.formFieldDeleteButton.disabled=!1,this.formFieldAddButton.disabled=!0,s.previousElementSibling&&(this.formFieldUpButton.disabled=!1),s.nextElementSibling||(this.formFieldDownButton.disabled=!0)},a.prototype.listItemOnClick=function(e){var t=document.getElementById(this.pdfViewer.element.id+"_ul_list_item");if(t.children&&t.children.length>0)for(var i=0;i<t.children.length;i++){var n=t.children[i];n.classList.contains("e-pv-li-select")&&n.classList.remove("e-pv-li-select")}e.target&&e.target.classList.add("e-pv-li-select"),e.target.nextElementSibling?this.formFieldDownButton.disabled=!1:this.formFieldDownButton.disabled=!0,e.target.previousElementSibling?this.formFieldUpButton.disabled=!1:this.formFieldUpButton.disabled=!0},a.prototype.deleteListItem=function(){var e=document.getElementById(this.pdfViewer.element.id+"_ul_list_item");if(e.children&&e.children.length>0)for(var t=0;t<e.children.length;t++){var i=e.children[t];i.classList.contains("e-pv-li-select")&&(i.classList.remove("e-pv-li-select"),this.formFieldListItemCollection.splice(t,1),i.previousElementSibling?(i.previousElementSibling.classList.add("e-pv-li-select"),i.previousElementSibling.previousElementSibling||(this.formFieldUpButton.disabled=!0)):i.nextElementSibling&&(i.nextElementSibling.classList.add("e-pv-li-select"),i.nextElementSibling.nextElementSibling||(this.formFieldDownButton.disabled=!0)),i.remove())}e.children&&0===e.children.length&&(this.formFieldDeleteButton.disabled=!0,this.formFieldUpButton.disabled=!0,this.formFieldDownButton.disabled=!0),e.children&&1===e.children.length&&(this.formFieldDeleteButton.disabled=!1,this.formFieldUpButton.disabled=!0,this.formFieldDownButton.disabled=!0)},a.prototype.moveUpListItem=function(){var e=document.getElementById(this.pdfViewer.element.id+"_ul_list_item");if(e.children&&e.children.length>0)for(var t=0;t<e.children.length;t++){var i=e.children[t];i.classList.contains("e-pv-li-select")&&(i.previousElementSibling?(i.parentNode.insertBefore(i,i.previousElementSibling),i.previousElementSibling||(this.formFieldUpButton.disabled=!0)):this.formFieldUpButton.disabled=!0,i.nextElementSibling&&(this.formFieldDownButton.disabled=!1))}},a.prototype.moveDownListItem=function(){var e,t=document.getElementById(this.pdfViewer.element.id+"_ul_list_item");if(t.children&&t.children.length>0)for(var i=0;i<t.children.length;i++)if((e=t.children[i]).classList.contains("e-pv-li-select")){if(e.nextElementSibling){e.parentNode.insertBefore(e.nextElementSibling,e);break}this.formFieldDownButton.disabled=!0}e.nextElementSibling||(this.formFieldDownButton.disabled=!0),e.previousElementSibling&&(this.formFieldUpButton.disabled=!1)},a.prototype.createListElement=function(e){var i=this.pdfViewer.selectedItems.formFields[0];if(i&&i.options&&i.options.length>0){for(var n=0;n<i.options.length;n++){var o=i.options[n].itemName;if(this.formFieldListItemCollection[n]!==i.options[n].itemName){this.formFieldListItemCollection.push(o);var s=t.createElement("li",{className:"e-pv-formfield-li-element"});s.addEventListener("click",this.listItemOnClick.bind(this)),s.innerHTML=o,e.appendChild(s)}}e.children[e.children.length-1].classList.add("e-pv-li-select")}return e.children.length},a.prototype.createThicknessSlider=function(e){var i=t.createElement("div",{className:"e-pv-annotation-thickness-popup-container"});document.body.appendChild(i);var o=t.createElement("span",{id:e+"_label",className:"e-pv-annotation-thickness-label"});o.textContent=this.pdfViewer.localeObj.getConstant("Line Thickness");var s=t.createElement("div",{id:e+"_slider"});return this.thicknessSlider=new n.Slider({type:"MinRange",cssClass:"e-pv-annotation-thickness-slider",max:12,min:0}),this.thicknessIndicator=t.createElement("div",{id:e+"_thickness_indicator",className:"e-pv-annotation-thickness-indicator"}),this.thicknessIndicator.textContent="0 pt",this.pdfViewer.enableRtl?(i.appendChild(this.thicknessIndicator),i.appendChild(s),this.thicknessSlider.enableRtl=!0,this.thicknessSlider.appendTo(s),i.appendChild(o)):(i.appendChild(o),i.appendChild(s),this.thicknessSlider.appendTo(s),i.appendChild(this.thicknessIndicator)),this.thicknessSlider.element.parentElement.classList.add("e-pv-annotation-thickness-slider-container"),i},a.prototype.createColorPicker=function(e,i){var o=t.createElement("input",{id:e+"_target"});document.body.appendChild(o);var s=new n.ColorPicker({inline:!0,mode:"Palette",cssClass:"e-show-value",enableOpacity:!1,value:i,showButtons:!1,modeSwitcher:!1});return this.pdfViewer.enableRtl&&(s.enableRtl=!0),s.appendTo(o),s},a.prototype.fontStyleClicked=function(e){if(e.target)if(-1!==e.target.id.indexOf("formField_bold"))(t=-1!==e.target.id.indexOf("formField_bold_div")?e.target:e.target.parentElement).classList.contains("e-pv-li-select")&&(this.isBold=!0),this.isBold=!this.isBold,this.isBold?(this.formFieldBold="bold",t.classList.add("e-pv-li-select")):(this.formFieldBold="normal",t.classList.remove("e-pv-li-select"));else if(-1!==e.target.id.indexOf("formField_italic"))(t=-1!==e.target.id.indexOf("formField_italic_div")?e.target:e.target.parentElement).classList.contains("e-pv-li-select")&&(this.isItalic=!0),this.isItalic=!this.isItalic,this.isItalic?(this.formFieldItalic="italic",t.classList.add("e-pv-li-select")):(this.formFieldItalic="normal",t.classList.remove("e-pv-li-select"));else if(-1!==e.target.id.indexOf("formField_underline"))(t=-1!==e.target.id.indexOf("formField_underline_textinput_div")?e.target:e.target.parentElement).classList.contains("e-pv-li-select")&&(this.isUnderline=!0),this.isUnderline=!this.isUnderline,this.isUnderline?(this.formFieldUnderline="underline",this.isStrikeThrough=!1,t.classList.add("e-pv-li-select")):(this.formFieldUnderline="none",t.classList.remove("e-pv-li-select"));else if(-1!==e.target.id.indexOf("formField_strikeout")){var t=-1!==e.target.id.indexOf("formField_strikeout_div")?e.target:e.target.parentElement;t.classList.contains("e-pv-li-select")&&(this.isStrikeThrough=!0),this.isStrikeThrough=!this.isStrikeThrough,this.isStrikeThrough?(this.formFieldStrikeOut="line-through",this.isUnderline=!1,t.classList.add("e-pv-li-select")):(this.formFieldStrikeOut="none",t.classList.remove("e-pv-li-select"))}},a.prototype.clearFontAlignIconSelection=function(e){for(var t=0;t<e.children.length;t++)e.children[t].classList.contains("e-pv-li-select")&&e.children[t].classList.remove("e-pv-li-select")},a.prototype.fontAlignClicked=function(e){if(e.target)if(e.target.classList.remove("e-pv-li-select"),-1!==e.target.id.indexOf("_formField_left_align")){t=-1!==e.target.id.indexOf("_formField_left_align_div")?e.target:e.target.parentElement;this.formFieldAlign="left",this.clearFontAlignIconSelection(e.currentTarget),t.classList.add("e-pv-li-select")}else if(-1!==e.target.id.indexOf("_formField_right_align")){t=-1!==e.target.id.indexOf("_formField_right_align_div")?e.target:e.target.parentElement;this.formFieldAlign="right",this.clearFontAlignIconSelection(e.currentTarget),t.classList.add("e-pv-li-select")}else{var t=-1!==e.target.id.indexOf("_formField_center_align_div")?e.target:e.target.parentElement;this.formFieldAlign="center",this.clearFontAlignIconSelection(e.currentTarget),t.classList.add("e-pv-li-select")}},a.prototype.onFontColorChange=function(e){this.fontColorValue=""===e.currentValue.hex?"#ffffff00":e.currentValue.hex,this.updateColorInIcon(this.fontColorElement,this.fontColorValue),this.fontColorDropDown.toggle()},a.prototype.onColorPickerChange=function(e){this.backgroundColorValue=""===e.currentValue.hex?"#ffffff00":e.currentValue.hex,this.updateColorInIcon(this.colorDropDownElement,this.backgroundColorValue),this.colorDropDown.toggle()},a.prototype.updateColorInIcon=function(e,t){e.childNodes[0].style.borderBottomColor=t},a.prototype.onStrokePickerChange=function(e){this.borderColorValue=""===e.currentValue.hex?"#ffffff00":e.currentValue.hex,this.updateColorInIcon(this.strokeDropDownElement,this.borderColorValue),this.strokeDropDown.toggle()},a.prototype.createDropDownButton=function(e,t,i){var n=new s.DropDownButton({iconCss:t+" e-pv-icon",target:i});return this.pdfViewer.enableRtl&&(n.enableRtl=!0),n.appendTo(e),n},a.prototype.addClassFontItem=function(e,i,n){var o=t.createElement("div",{id:this.pdfViewer.element.id+e+"_div"});o.classList.add(i+"-div");var s=t.createElement("span",{id:this.pdfViewer.element.id+e+"_span"});switch(s.classList.add(i),s.classList.add("e-pv-icon"),i){case"e-pv-bold-icon":this.setToolTip(this.pdfViewer.localeObj.getConstant("Bold"),o);break;case"e-pv-italic-icon":this.setToolTip(this.pdfViewer.localeObj.getConstant("Italic"),o);break;case"e-pv-underlinetext-icon":this.setToolTip(this.pdfViewer.localeObj.getConstant("Underlines"),o);break;case"e-pv-strikeout-icon":this.setToolTip(this.pdfViewer.localeObj.getConstant("Strikethroughs"),o);break;case"e-pv-left-align-icon":this.setToolTip(this.pdfViewer.localeObj.getConstant("Align left"),o);break;case"e-pv-center-align-icon":this.setToolTip(this.pdfViewer.localeObj.getConstant("Center"),o);break;case"e-pv-right-align-icon":this.setToolTip(this.pdfViewer.localeObj.getConstant("Align right"),o)}return n&&o.classList.add("e-pv-li-select"),o.appendChild(s),o},a.prototype.createLabelElement=function(e,i,n,o,s){var a=t.createElement("div",{id:s+"_container",className:o+"-container"}),r=null;n&&((r=t.createElement("div",{id:s+"_label",className:o})).textContent=e,a.appendChild(r)),i.appendChild(r)},a.prototype.setReadOnlyToFormField=function(e,t){for(var i=0;i<this.pdfViewer.formFieldCollection.length;i++){var n=this.pdfViewer.formFieldCollection[i];if(n.formFieldAnnotationType===e.formFieldAnnotationType&&n.name===e.name&&n.id!==e.id)switch(n.isReadonly=t,n.formFieldAnnotationType){case"Textbox":case"PasswordField":case"DropdownList":case"ListBox":case"SignatureField":case"InitialField":var o=document.getElementById(n.id+"_content_html_element").firstElementChild.firstElementChild;this.setReadOnlyToElement(n,o,t);break;case"RadioButton":var s=document.getElementById(n.id+"_content_html_element").firstElementChild.firstElementChild.firstElementChild;this.setReadOnlyToElement(n,s,t);break;case"Checkbox":var a=document.getElementById(n.id+"_content_html_element").firstElementChild.firstElementChild.lastElementChild;this.setReadOnlyToElement(n,a,t)}}},a.prototype.setRequiredToFormField=function(e,t){for(var i=0;i<this.pdfViewer.formFieldCollection.length;i++){var n=this.pdfViewer.formFieldCollection[i];if(n.formFieldAnnotationType===e.formFieldAnnotationType&&n.name===e.name&&n.id!==e.id)switch(n.isRequired=t,n.formFieldAnnotationType){case"Textbox":case"PasswordField":case"DropdownList":case"SignatureField":case"InitialField":var o=document.getElementById(n.id+"_content_html_element").firstElementChild.firstElementChild;this.setRequiredToElement(n,o,t);break;case"RadioButton":var s=document.getElementById(n.id+"_content_html_element").firstElementChild.firstElementChild.firstElementChild;this.setRequiredToElement(n,s,t);break;case"Checkbox":var a=document.getElementById(n.id+"_content_html_element").firstElementChild.firstElementChild.lastElementChild;this.setRequiredToElement(n,a,t)}}},a.prototype.setReadOnlyToElement=function(e,t,i){i?(t.disabled=!0,"RadioButton"===e.formFieldAnnotationType?(t.parentElement.style.cursor="default",t.parentElement.style.backgroundColor="transparent"):(t.style.cursor="default",t.style.backgroundColor="transparent")):(t.disabled=!1,"RadioButton"===e.formFieldAnnotationType?t.parentElement.style.backgroundColor=e.backgroundColor:"SignatureField"==e.formFieldAnnotationType||"InitialField"==e.formFieldAnnotationType?t.style.backgroundColor="transparent":t.style.backgroundColor=e.backgroundColor)},a.prototype.setRequiredToElement=function(e,t,i){i?(t.required=!0,t.style.border="1px solid red","RadioButton"===e.formFieldAnnotationType&&(t.parentElement.style.boxShadow="red 0px 0px 0px "+e.thickness+"px")):(t.required=!1,t.style.borderWidth=e.thickness,t.style.borderColor=e.borderColor,"RadioButton"===e.formFieldAnnotationType&&(t.parentElement.style.boxShadow=e.borderColor+" 0px 0px 0px "+e.thickness+"px"))},a.prototype.destroyPropertiesWindow=function(){this.formFieldListItemCollection=[],this.formFieldListItemDataSource=[],this.formFieldFontFamily=null,this.formFieldFontSize=null,this.formFieldAlign=null,this.fontColorValue=null,this.backgroundColorValue=null,this.borderColorValue=null,this.formFieldBorderWidth=null,this.formFieldName=null,this.formFieldChecked=null,this.formFieldReadOnly=null,this.formFieldRequired=null,this.formFieldTooltip=null,this.formFieldPrinting=null,this.formFieldVisibility=null;var e=this.pdfViewerBase.getElement("_properties_window");e&&e.parentElement.removeChild(e)},a.prototype.destroy=function(){this.destroyPropertiesWindow()},a.prototype.hex=function(e){return("0"+e.toString(16)).slice(-2)},a.prototype.getModuleName=function(){return"FormDesigner"},a}();return rn.Inject(ft,ln,ni,si,ri,oi,Mn,dn,un,Ct,hn,pn),e.Drawing=tt,e.findActiveElement=W,e.findObjectsUnderMouse=J,e.findObjectUnderMouse=H,e.CalculateLeaderPoints=G,e.findElementUnderMouse=Z,e.insertObject=X,e.findTargetShapeElement=K,e.findObjects=q,e.findActivePage=$,e.ActiveElements=Lt,e.getConnectorPoints=S,e.getSegmentPath=A,e.updateSegmentElement=T,e.getSegmentElement=x,e.updateDecoratorElement=N,e.getDecoratorElement=D,e.clipDecorators=b,e.clipDecorator=I,e.initDistanceLabel=v,e.updateDistanceLabel=E,e.updateRadiusLabel=V,e.initPerimeterLabel=z,e.updatePerimeterLabel=k,e.removePerimeterLabel=O,e.updateCalibrateLabel=P,e.getPolygonPath=F,e.textElement=B,e.initLeaders=Y,e.initLeader=U,e.isPointOverConnector=Q,e.findNearestPoint=_,e.getDecoratorShape=R,e.renderAdornerLayer=ee,e.createSvg=te,e.isLineShapes=h,e.setElementStype=L,e.findPointsLength=w,e.findPerimeterLength=c,e.getBaseShapeAttributes=C,e.getFunction=g,e.cloneObject=m,e.cloneArray=f,e.getInternalProperties=y,e.isLeader=j,e.PdfBounds=Re,e.PdfFont=We,e.PdfAnnotationBase=Je,e.PdfFormFieldBase=He,e.ZOrderPageTable=Ge,e.Selector=Ke,e.ToolBase=nt,e.SelectTool=ot,e.MoveTool=st,e.StampTool=at,e.InkDrawingTool=rt,e.ConnectTool=lt,e.ResizeTool=dt,e.NodeDrawingTool=ut,e.PolygonDrawingTool=Mt,e.LineTool=pt,e.RotateTool=ht,e.Annotation=Ct,e.LinkAnnotation=ft,e.TextMarkupAnnotation=yt,e.MeasureAnnotation=jt,e.ShapeAnnotation=St,e.StampAnnotation=At,e.StickyNotesAnnotation=Tt,e.FreeTextAnnotation=wt,e.InputElement=ct,e.InkAnnotation=xt,e.NavigationPane=Nt,e.PdfViewerBase=qt,e.TextLayer=$t,e.ContextMenu=ei,e.AjaxHandler=ti,e.Signature=ii,e.Spinner=ie,e.createSpinner=ne,e.showSpinner=Oe,e.hideSpinner=Fe,e.setSpinner=Be,e.BlazorUiAdaptor=Zt,e.Magnification=ni,e.Navigation=oi,e.ThumbnailView=si,e.Toolbar=ri,e.AnnotationToolbar=li,e.FormDesignerToolbar=ai,e.ToolbarSettings=hi,e.AjaxRequestSettings=Li,e.CustomStamp=wi,e.AnnotationToolbarSettings=ci,e.FormDesignerToolbarSettings=Ci,e.SignatureFieldSettings=gi,e.InitialFieldSettings=mi,e.SignatureIndicatorSettings=fi,e.ServerActionSettings=yi,e.StrikethroughSettings=ji,e.UnderlineSettings=Si,e.HighlightSettings=Ai,e.LineSettings=Ti,e.ArrowSettings=xi,e.RectangleSettings=Ni,e.CircleSettings=Di,e.ShapeLabelSettings=bi,e.PolygonSettings=Ii,e.StampSettings=vi,e.CustomStampSettings=Ei,e.DistanceSettings=Vi,e.PerimeterSettings=zi,e.AreaSettings=ki,e.RadiusSettings=Oi,e.VolumeSettings=Pi,e.InkAnnotationSettings=Fi,e.StickyNotesSettings=Bi,e.MeasurementSettings=Yi,e.FreeTextSettings=Ui,e.AnnotationSelectorSettings=Qi,e.TextSearchColorSettings=_i,e.HandWrittenSignatureSettings=Ri,e.AnnotationSettings=Wi,e.DocumentTextCollectionSettings=Ji,e.TextDataSettings=Hi,e.RectangleBounds=Gi,e.TileRenderingSettings=Zi,e.ScrollSettings=Xi,e.FormField=Ki,e.ContextMenuSettings=qi,e.TextFieldSettings=$i,e.PasswordFieldSettings=en,e.CheckBoxFieldSettings=tn,e.RadioButtonFieldSettings=nn,e.DropdownFieldSettings=on,e.ListBoxFieldSettings=sn,e.Item=an,e.PdfViewer=rn,e.BookmarkView=ln,e.TextSelection=dn,e.TextSearch=un,e.Print=Mn,e.FormFields=pn,e.FormDesigner=hn,e}({},ej.base,ej.drawings,ej.inputs,ej.popups,ej.splitbuttons,ej.inplaceeditor,ej.navigations,ej.notifications,ej.buttons,ej.dropdowns,ej.data,ej.lists),this.ejs=ej;
- /*!
- * filename: ej2-richtexteditor.min.js
- * version : 19.2.46
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.richtexteditor=function(e,t,n,i,o,r,s,a){"use strict";function l(e,t,n){for(var i=0;t.length>i;i++)if(t[i].value===n.subCommand)return e.localeObj.getConstant(t[i].locale);return n.text}function d(e){he.forEach(function(t,n){he[n].text=l(e,pe,he[n])}),ge.forEach(function(t,n){ge[n].text=l(e,me,ge[n])}),ve.forEach(function(t,n){ve[n].text=l(e,be,ve[n])}),Ce.forEach(function(t,n){Ce[n].text=l(e,ye,Ce[n])}),Te.forEach(function(t,n){Te[n].text=l(e,Se,Te[n])}),Ne.forEach(function(t,n){Ne[n].text=l(e,Ee,Ne[n])})}function c(e,t){var n=-1;return t.some(function(t,i){return"string"==typeof t&&e===t.toLocaleLowerCase()&&(n=i,!0)}),n}function p(e,t){var n=!1;return e.classList.contains(t)&&(n=!0),n}function h(e,n,i,o){for(var r,s,a=0;a<e.length;a++){if("value"===i&&e[a].value.toLocaleLowerCase()===n.toLocaleLowerCase()){r=e[a];break}if("text"===i&&e[a].text.toLocaleLowerCase()===n.toLocaleLowerCase()){r=e[a];break}if("subCommand"===i&&e[a].subCommand.toLocaleLowerCase()===n.toLocaleLowerCase()){r=e[a];break}}if(!t.isNullOrUndefined(r))switch(o){case"text":s=r.text;break;case"value":s=r.value;break;case"iconCss":s=r.iconCss}return s}function u(){var e=!1;return t.Browser.isDevice&&t.Browser.isIos&&(e=!0),e}function m(e){return t.isNullOrUndefined(e)?"":e}function g(e,t,n){return n?window.pageYOffset+t.getBoundingClientRect().top+e.clientY:e.pageY}function f(e,t){var n=t.getService("rteLocale"),i=Be[e];return n.getConstant(i)}function b(e,n,i){R(i);for(var o=e.dropDownModule,r=e.args,s=0,a=Object.keys(e.args);s<a.length;s++)for(var l=a[s],d=0;d<e.tbItems.length;d++){var p=e.tbItems[d].subCommand,u=p&&p.toLocaleLowerCase();if(p&&u===l||"UL"===p&&"unorderedlist"===l||"OL"===p&&"orderedlist"===l||"pre"===u&&"insertcode"===l)if("boolean"==typeof r[l])!0===r[l]?t.addClass([e.tbElements[d]],[re]):t.removeClass([e.tbElements[d]],[re]);else if(("string"==typeof r[l]||null===r[l])&&c(l,e.parent.toolbarSettings.items)>-1){var g=r[l]?r[l]:"",f="";switch(l){case"formats":if(t.isNullOrUndefined(o.formatDropDown)||n||!t.isNullOrUndefined(o.formatDropDown)&&o.formatDropDown.isDestroyed)break;var b=e.parent.format.types,v=t.isNullOrUndefined(e.parent.format.default)?b[0].text:e.parent.format.default;f=h(b,g,"subCommand","text"),o.formatDropDown.content='<span style="display: inline-flex;width:'+e.parent.format.width+'" ><span class="e-rte-dropdown-btn-text">'+(t.isNullOrUndefined(f)?v:f)+"</span></span>",o.formatDropDown.dataBind();break;case"alignments":if(t.isNullOrUndefined(o.alignDropDown)||!t.isNullOrUndefined(o.alignDropDown)&&o.alignDropDown.isDestroyed)break;f=h(he,g,"subCommand","iconCss"),o.alignDropDown.iconCss=t.isNullOrUndefined(f)?"e-icons e-justify-left":f,o.alignDropDown.dataBind();break;case"fontname":if(t.isNullOrUndefined(o.fontNameDropDown)||n||!t.isNullOrUndefined(o.fontNameDropDown)&&o.fontNameDropDown.isDestroyed)break;var y=e.parent.fontFamily.items;f=h(y,g,"value","text");var C=t.isNullOrUndefined(e.parent.fontFamily.default)?y[0].text:e.parent.fontFamily.default,S=t.isNullOrUndefined(f)?C:f;e.tbElements[d].title=S,o.fontNameDropDown.content='<span style="display: inline-flex;width:'+e.parent.fontFamily.width+'" ><span class="e-rte-dropdown-btn-text">'+S+"</span></span>",o.fontNameDropDown.dataBind();break;case"fontsize":if(t.isNullOrUndefined(o.fontSizeDropDown)||!t.isNullOrUndefined(o.fontSizeDropDown)&&o.fontSizeDropDown.isDestroyed)break;var T=e.parent.fontSize.items,E=t.isNullOrUndefined(e.parent.fontSize.default)?T[1].text:e.parent.fontSize.default;f=h(T,""===g?E.replace(/\s/g,""):g,"value","text"),o.fontSizeDropDown.content='<span style="display: inline-flex;width:'+e.parent.fontSize.width+'" ><span class="e-rte-dropdown-btn-text">'+m(f)+"</span></span>",o.fontSizeDropDown.dataBind()}}}}function v(e){return"object"==typeof e?e:[e]}function y(e,t){for(var n=[],i=0;i<e.length;i++)for(var o=0;o<t.length;o++)if("Separator"!==t[o].type){if("OrderedList"===e[i]&&"OL"===t[o].subCommand){n.push(o);break}if("UnorderedList"===e[i]&&"UL"===t[o].subCommand){n.push(o);break}if("InsertCode"===e[i]&&"Pre"===t[o].subCommand){n.push(o);break}if("FileManager"===e[i]&&"File"===t[o].subCommand){n.push(o);break}if("object"==typeof e[i]&&"Custom"===e[i].command){n.push(i);break}if(e[i]===t[o].subCommand){n.push(o);break}}return n}function C(e,n){for(var i=0,o=y(v(je),e.toolbarObj.items),r=t.selectAll("."+te,e.toolbarObj.element),s=0,a=Object.keys(n);s<a.length;s++){var l=a[s],d=r[o[i]];d&&e.toolbarObj.enableItems(d,n[l]),i++}}function S(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!1,!0),e.dispatchEvent(n)}function T(e){var n=t.createElement("template");return n.innerHTML=e,n.content instanceof DocumentFragment?n.content:document.createRange().createContextualFragment(e)}function E(e,t){var n=[];for(t=t.firstChild;t;t=t.nextSibling)3===t.nodeType?n.push(t):n=n.concat(E(e,t));return n}function N(e){for(var t={},n=Object.keys(e),i=0;i<Object.keys(e).length;i++)t[n[i].toLocaleLowerCase()]=e[n[i]];return t}function w(e,t){var n;return null!==e&&""!==e?(n=k(t.enableHtmlEncode?x(e):e),t.setProperties({value:n},!0)):n=t.enableHtmlEncode?"<p><br/></p>":"<p><br/></p>",n}function k(e){var n=document.createElement("div"),i=document.createElement("div"),o=n.childNodes;if(n.innerHTML=e,n.setAttribute("class","tempDiv"),o.length>0){for(var r=void 0,s=void 0,a=void 0;n.firstChild;)"#text"===n.firstChild.nodeName&&(n.firstChild.textContent.indexOf("\n")<0||""!==n.firstChild.textContent.trim())||Fe.indexOf(n.firstChild.nodeName.toLocaleLowerCase())>=0?(r?s.appendChild(n.firstChild):(a=t.createElement("p"),i.appendChild(a),a.appendChild(n.firstChild)),s=a,r=!0):"#text"===n.firstChild.nodeName&&("\n"===n.firstChild.textContent||n.firstChild.textContent.indexOf("\n")>=0&&""===n.firstChild.textContent.trim())?t.detach(n.firstChild):(i.appendChild(n.firstChild),r=!1);for(var l=i.querySelectorAll("img"),d=0;d<l.length;d++)l[d].classList.contains(ae)||l[d].classList.add(ae),l[d].classList.contains(ie)||l[d].classList.contains(ne)||l[d].classList.add(ie)}return i.innerHTML}function L(e){return"<p><br></p>"===e||"<p><br></p>"===e||""===e}function x(e){return e.replace(/&/g,"&").replace(/&lt;/g,"<").replace(/</g,"<").replace(/&gt;/g,">").replace(/>/g,">").replace(/ /g," ").replace(/&nbsp;/g," ").replace(/"/g,"")}function O(e,n){if(n.enableHtmlSanitizer){var i=t.SanitizeHtmlHelper.beforeSanitize(),o={cancel:!1,helper:null};t.extend(i,i,o),n.trigger("beforeSanitizeHtml",i),i.cancel&&!t.isNullOrUndefined(i.helper)?e=i.helper(e):i.cancel||(e=t.SanitizeHtmlHelper.serializeValue(i,e))}return e}function D(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],i=atob(t[1]),o=i.length,r=new Uint8Array(o);o--;)r[o]=i.charCodeAt(o);return new Blob([r],{type:n})}function M(e,t,n){for(var i=0;t.length>i;i++)if(t[i].value===n.value||t[i].value===n.subCommand)return e.localeObj.getConstant(t[i].locale);return n.text}function R(e){ke.forEach(function(t,n){ke[n].text=M(e,Pe,ke[n])}),xe.forEach(function(t,n){xe[n].text=M(e,Ae,xe[n])}),Me.forEach(function(t,n){Me[n].text=M(e,He,Me[n])}),Re.forEach(function(t,n){Re[n].text=M(e,Ue,Re[n])})}function I(){var e=!1;return t.Browser.isDevice&&t.Browser.isIos&&(e=!0),e}function B(e,n){if("BODY"===e.nodeName&&!t.isNullOrUndefined(n)){var i=top.window.document.querySelector(n);t.isNullOrUndefined(i)||i.contentWindow.focus()}}function P(e){var n=document.createElement("div");n.innerHTML=e,n.setAttribute("class","tempDiv");var i=document.createElement("div");if(n.childNodes.length>0){for(var o=void 0,r=void 0,s=void 0;n.firstChild;)"#text"===n.firstChild.nodeName&&(n.firstChild.textContent.indexOf("\n")<0||""!==n.firstChild.textContent.trim())||ot.indexOf(n.firstChild.nodeName.toLocaleLowerCase())>=0?(o?r.appendChild(n.firstChild):(s=t.createElement("p"),i.appendChild(s),s.appendChild(n.firstChild)),r=s,o=!0):"#text"===n.firstChild.nodeName&&("\n"===n.firstChild.textContent||n.firstChild.textContent.indexOf("\n")>=0&&""===n.firstChild.textContent.trim())?t.detach(n.firstChild):(i.appendChild(n.firstChild),o=!1);for(var a=i.querySelectorAll("table"),l=0;l<a.length;l++){"0"===a[l].getAttribute("border")&&a[l].removeAttribute("border");for(var d=a[l].querySelectorAll("td"),c=0;c<d.length;c++)"none"===d[c].style.borderLeft&&d[c].style.removeProperty("border-left"),"none"===d[c].style.borderRight&&d[c].style.removeProperty("border-right"),"none"===d[c].style.borderBottom&&d[c].style.removeProperty("border-bottom"),"none"===d[c].style.borderTop&&d[c].style.removeProperty("border-top"),"none"===d[c].style.border&&d[c].style.removeProperty("border");a[l].classList.contains(le)||a[l].classList.add(le)}for(var p=i.querySelectorAll("img"),l=0;l<p.length;l++)p[l].classList.contains(ae)||p[l].classList.add(ae),p[l].classList.contains(ie)||p[l].classList.contains(ne)||p[l].classList.add(ie)}return i.innerHTML}function A(e){var t=e;do{t.childNodes.length>0&&(t=t.childNodes[0])}while(t.childNodes.length>0);return t}function H(){return{bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,unorderedlist:!1,underline:!1,alignments:null,backgroundcolor:null,fontcolor:null,fontname:null,fontsize:null,formats:null,createlink:!1,insertcode:!1}}function U(){return{bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,uppercase:!1,lowercase:!1,inlinecode:!1,unorderedlist:!1,formats:null}}function j(e,t,n,i){var o;if(o=n?t.contentModule.getDocument().querySelector("body"):t.element,Object.keys(e).length)for(var r=0,s=Object.keys(e);r<s.length;r++){var a=s[r];"class"===a?o.classList.add(e[a]):"disabled"===a&&"disabled"===e[a]?(t.enabled=!1,t.setEnable()):"readonly"===a&&"readonly"===e[a]?(t.readonly=!0,t.setReadOnly(i)):"style"===a?o.setAttribute("style",e[a]):"tabindex"===a?t.inputElement.setAttribute("tabindex",e[a]):"placeholder"===a?(t.placeholder=e[a],t.setPlaceHolder()):["name","required"].indexOf(a)>-1?t.valueContainer.setAttribute(a,e[a]):o.setAttribute(a,e[a])}}var F="initial-end",z="destroy",_="model-changed",q="keyUp",Q="keyDown",V="selection-save",W="mouseDown",G="paste-content",K="rtl-mode",X="checkUndoStack",Y="e-richtexteditor",J="e-rte-quick-toolbar",$="e-rte-dropdown-popup",Z="e-rte-dropdown-items",ee="e-rte-dropdown-btn",te="e-toolbar-item",ne="e-imgbreak",ie="e-imginline",oe="e-rte-character-count",re="e-active",se="e-alternate-border",ae="e-rte-image",le="e-rte-table";!function(e){e[e.Toolbar=0]="Toolbar",e[e.Content=1]="Content",e[e.Popup=2]="Popup",e[e.LinkToolbar=3]="LinkToolbar",e[e.TextToolbar=4]="TextToolbar",e[e.ImageToolbar=5]="ImageToolbar",e[e.InlineToolbar=6]="InlineToolbar",e[e.TableToolbar=7]="TableToolbar"}(e.RenderType||(e.RenderType={})),function(e){e.Expand="Expand",e.MultiRow="MultiRow",e.Scrollable="Scrollable"}(e.ToolbarType||(e.ToolbarType={}));var de=["alignments","formats","fontname","fontsize","fontcolor","backgroundcolor","align","display","tablerows","tablecolumns","tablecell","tablecellhorizontalalign","tablecellverticalalign","styles","numberformatlist","bulletformatlist"],ce={alignments:{id:"Alignments",icon:"e-alignments",tooltip:"Alignments",command:"Alignments",subCommand:"Alignments"},justifyleft:{id:"JustifyLeft",icon:"e-justify-left",tooltip:"JustifyLeft",command:"Alignments",subCommand:"JustifyLeft"},justifycenter:{id:"JustifyCenter",icon:"e-justify-center",tooltip:"JustifyCenter",command:"Alignments",subCommand:"JustifyCenter"},justifyright:{id:"JustifyRight",icon:"e-justify-right",tooltip:"JustifyRight",command:"Alignments",subCommand:"JustifyRight"},justifyfull:{id:"JustifyFull",icon:"e-justify-full",tooltip:"JustifyFull",command:"Alignments",subCommand:"JustifyFull"},fontname:{id:"FontName",icon:"e-font-name",tooltip:"Font Name",command:"Font",subCommand:"FontName"},fontsize:{id:"FontSize",icon:"e-font-size",tooltip:"Font Size",command:"Font",subCommand:"FontSize"},fontcolor:{id:"FontColor",icon:"e-font-color",tooltip:"Font Color",command:"Font",subCommand:"FontColor",value:"#ff0000ff"},backgroundcolor:{id:"BackgroundColor",icon:"e-background-color",tooltip:"Background Color",command:"Font",subCommand:"BackgroundColor",value:"#ffff00ff"},bold:{id:"Bold",icon:"e-bold",tooltip:"Bold",command:"Style",subCommand:"Bold"},italic:{id:"Italic",icon:"e-italic",tooltip:"Italic",command:"Style",subCommand:"Italic"},underline:{id:"Underline",icon:"e-underline",tooltip:"Underline",command:"Style",subCommand:"Underline"},strikethrough:{id:"StrikeThrough",icon:"e-strike-through",tooltip:"StrikeThrough",command:"Style",subCommand:"StrikeThrough"},clearformat:{id:"ClearFormat",icon:"e-clear-format",tooltip:"Clear Format",command:"Clear",subCommand:"ClearFormat"},clearall:{id:"ClearAll",icon:"e-clear-all",tooltip:"Clear All",command:"Clear",subCommand:"ClearAll"},cut:{id:"Cut",icon:"e-cut",tooltip:"Cut",command:"ClipBoard",subCommand:"Cut"},copy:{id:"Copy",icon:"e-copy",tooltip:"Copy",command:"ClipBoard",subCommand:"Copy"},paste:{id:"Paste",icon:"e-paste",tooltip:"Paste",command:"ClipBoard",subCommand:"Paste"},unorderedlist:{id:"UnorderedList",icon:"e-unorder-list",tooltip:"Bulleted List",command:"Lists",subCommand:"UL"},orderedlist:{id:"OrderedList",icon:"e-order-list",tooltip:"Numbered List",command:"Lists",subCommand:"OL"},numberformatlist:{id:"NumberFormatList",icon:"e-order-list",tooltip:"NumberFormatList",command:"NumberFormatList",subCommand:"NumberFormatList"},bulletformatlist:{id:"BulletFormatList",icon:"e-unorder-list",tooltip:"BulletFormatList",command:"BulletFormatList",subCommand:"BulletFormatList"},indent:{id:"Indent",icon:"e-indent",tooltip:"Increase Indent",command:"Indents",subCommand:"Indent"},outdent:{id:"Outdent",icon:"e-outdent",tooltip:"Decrease Indent",command:"Indents",subCommand:"Outdent"},undo:{id:"Undo",icon:"e-undo",tooltip:"Undo",command:"Actions",subCommand:"Undo"},redo:{id:"Redo",icon:"e-redo",tooltip:"Redo",command:"Actions",subCommand:"Redo"},superscript:{id:"SuperScript",icon:"e-super-script",tooltip:"Superscript",command:"Effects",subCommand:"SuperScript"},subscript:{id:"SubScript",icon:"e-sub-script",tooltip:"Subscript",command:"Effects",subCommand:"SubScript"},createlink:{id:"CreateLink",icon:"e-create-link",tooltip:"Insert Hyperlink",command:"Links",subCommand:"CreateLink"},openlink:{id:"OpenLink",icon:"e-open-link",tooltip:"Open Link",command:"Links",subCommand:"OpenLink"},editlink:{id:"EditLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Links",subCommand:"EditLink"},removelink:{id:"RemoveLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Links",subCommand:"RemoveLink"},image:{id:"Image",icon:"e-image",tooltip:"Insert Image",command:"Images",subCommand:"Image"},filemanager:{id:"FileManager",icon:"e-rte-file-manager",tooltip:"File Manager",command:"Files",subCommand:"File"},createtable:{id:"CreateTable",icon:"e-create-table",tooltip:"Create Table",command:"Table",subCommand:"CreateTable"},removetable:{id:"removeTable",icon:"e-remove-table",tooltip:"Remove Table",command:"removeTable",subCommand:"removeTable"},replace:{id:"Replace",icon:"e-replace",tooltip:"Replace",command:"Images",subCommand:"Replace"},align:{id:"Align",icon:"e-align",tooltip:"Align",command:"Images",subCommand:"Align"},caption:{id:"Caption",icon:"e-caption",tooltip:"Image Caption",command:"Images",subCommand:"Caption"},remove:{id:"Remove",icon:"e-remove",tooltip:"Remove",command:"Images",subCommand:"Remove"},openimagelink:{id:"OpenImageLink",icon:"e-open-link",tooltip:"Open Link",command:"Images",subCommand:"OpenImageLink"},editimagelink:{id:"EditImageLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Images",subCommand:"EditImageLink"},removeimagelink:{id:"RemoveImageLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Images",subCommand:"RemoveImageLink"},insertlink:{id:"InsertLink",icon:"e-insert-link",tooltip:"Insert Link",command:"Images",subCommand:"InsertLink"},display:{id:"Display",icon:"e-display",tooltip:"Display",command:"Images",subCommand:"Display"},alttext:{id:"AltText",icon:"e-alt-text",tooltip:"Alternative Text",command:"Images",subCommand:"AltText"},dimension:{id:"Dimension",icon:"e-dimension",tooltip:"Change Size",command:"Images",subCommand:"Dimension"},fullscreen:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"View",subCommand:"Maximize"},maximize:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"FullScreen",subCommand:"Maximize"},minimize:{id:"Minimize",icon:"e-minimize",tooltip:"Minimize",command:"FullScreen",subCommand:"Minimize"},lowercase:{id:"LowerCase",icon:"e-lower-case",tooltip:"Lower Case",command:"Casing",subCommand:"LowerCase"},uppercase:{id:"UpperCase",icon:"e-upper-case",tooltip:"Upper Case",command:"Casing",subCommand:"UpperCase"},print:{id:"Print",icon:"e-print",tooltip:"Print",command:"Print",subCommand:"Print"},formats:{id:"Formats",icon:"e-formats",tooltip:"Formats",command:"Formats",subCommand:"Formats"},sourcecode:{id:"SourceCode",icon:"e-source-code",tooltip:"Source Code",command:"SourceCode",subCommand:"SourceCode"},preview:{id:"Preview",icon:"e-preview",tooltip:"Preview",command:"Preview",subCommand:"Preview"},viewside:{id:"ViewSide",icon:"e-view-side",tooltip:"ViewSide",command:"ViewSide",subCommand:"ViewSide"},insertcode:{id:"InsertCode",icon:"e-insert-code",tooltip:"Insert Code",command:"Formats",subCommand:"Pre"},tableheader:{id:"TableHeader",icon:"e-table-header",tooltip:"Table Header",command:"Table",subCommand:"TableHeader"},tableremove:{id:"TableRemove",icon:"e-table-remove",tooltip:"Table Remove",command:"Table",subCommand:"TableRemove"},tablerows:{id:"TableRows",icon:"e-table-rows",tooltip:"Table Rows",command:"Table",subCommand:"TableRows"},tablecolumns:{id:"TableColumns",icon:"e-table-columns",tooltip:"Table Columns",command:"Table",subCommand:"TableColumns"},tablecell:{id:"TableCell",icon:"e-table-cell",tooltip:"Table Cell",command:"Table",subCommand:"TableCell"},tablecellbackground:{id:"TableCellBackground",icon:"e-table-cell-background",tooltip:"Table Cell Background",command:"Table",subCommand:"TableCellBackground"},tablecellhorizontalalign:{id:"TableCellHorizontalAlign",icon:"e-table-cell-horizontalAlign",tooltip:"Table Cell HorizontalAlign",command:"Table",subCommand:"TableCellHorizontalAlign"},tablecellverticalalign:{id:"TableCellVerticalAlign",icon:"e-table-cell-verticalAlign",tooltip:"Table Cell VerticalAlign",command:"Table",subCommand:"TableCellVerticalAlign"},tableeditproperties:{id:"TableEditProperties",icon:"e-table-edit-properties",tooltip:"Table Edit Properties",command:"Table",subCommand:"TableEditProperties"},styles:{id:"Styles",icon:"e-table-styles",tooltip:"Styles",command:"Table",subCommand:"Styles"}},pe=[{locale:"alignmentsDropDownLeft",value:"JustifyLeft"},{locale:"alignmentsDropDownCenter",value:"JustifyCenter"},{locale:"alignmentsDropDownRight",value:"JustifyRight"},{locale:"alignmentsDropDownJustify",value:"JustifyFull"}],he=[{iconCss:"e-icons e-justify-left",text:"Align Left",command:"Alignments",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",text:"Align Center",command:"Alignments",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",text:"Align Right",command:"Alignments",subCommand:"JustifyRight"},{iconCss:"e-icons e-justify-full",text:"Align Justify",command:"Alignments",subCommand:"JustifyFull"}],ue=[{iconCss:"e-icons e-justify-left",command:"Images",subCommand:"JustifyLeft"},{iconCss:"e-icons e-justify-center",command:"Images",subCommand:"JustifyCenter"},{iconCss:"e-icons e-justify-right",command:"Images",subCommand:"JustifyRight"}],me=[{locale:"imageDisplayDropDownInline",value:"Inline"},{locale:"imageDisplayDropDownBreak",value:"Break"}],ge=[{text:"Inline",cssClass:"e-inline",command:"Images",subCommand:"Inline"},{text:"Break",cssClass:"e-break",command:"Images",subCommand:"Break"}],fe=[{iconCss:"e-icons e-cell-merge",text:"Merge cells",command:"Table",subCommand:"Merge"},{iconCss:"e-icons e-cell-horizontal-split",text:"Horizontal split",command:"Table",subCommand:"HorizontalSplit"},{iconCss:"e-icons e-cell-vertical-split",text:"Vertical split",command:"Table",subCommand:"VerticalSplit"}],be=[{locale:"tableInsertRowDropDownBefore",value:"InsertRowBefore"},{locale:"tableInsertRowDropDownAfter",value:"InsertRowAfter"},{locale:"tableInsertRowDropDownDelete",value:"DeleteRow"}],ve=[{iconCss:"e-icons e-insert-row-before",text:"Insert row before",command:"Table",subCommand:"InsertRowBefore"},{iconCss:"e-icons e-insert-row-after",text:"Insert row after",command:"Table",subCommand:"InsertRowAfter"},{iconCss:"e-icons e-delete-row",text:"Delete row",command:"Table",subCommand:"DeleteRow"}],ye=[{locale:"tableInsertColumnDropDownLeft",value:"InsertColumnLeft"},{locale:"tableInsertColumnDropDownRight",value:"InsertColumnRight"},{locale:"tableInsertColumnDropDownDelete",value:"DeleteColumn"}],Ce=[{iconCss:"e-icons e-insert-column-left",text:"Insert column left",command:"Table",subCommand:"InsertColumnLeft"},{iconCss:"e-icons e-insert-column-right",text:"Insert column right",command:"Table",subCommand:"InsertColumnRight"},{iconCss:"e-icons e-delete-column",text:"Delete column",command:"Table",subCommand:"DeleteColumn"}],Se=[{locale:"tableVerticalAlignDropDownTop",value:"AlignTop"},{locale:"tableVerticalAlignDropDownMiddle",value:"AlignMiddle"},{locale:"tableVerticalAlignDropDownBottom",value:"AlignBottom"}],Te=[{iconCss:"e-icons e-align-top",text:"Align Top",command:"Table",subCommand:"AlignTop"},{iconCss:"e-icons e-align-middle",text:"Align Middle",command:"Table",subCommand:"AlignMiddle"},{iconCss:"e-icons e-align-bottom",text:"Align Bottom",command:"Table",subCommand:"AlignBottom"}],Ee=[{locale:"tableStylesDropDownDashedBorder",value:"Dashed"},{locale:"tableStylesDropDownAlternateRows",value:"Alternate"}],Ne=[{text:"Dashed Borders",cssClass:"e-dashed-borders",command:"Table",subCommand:"Dashed"},{text:"Alternate Rows",cssClass:"e-alternate-rows",command:"Table",subCommand:"Alternate"}],we=["Bold","Italic","Underline","|","Formats","Alignments","OrderedList","UnorderedList","|","CreateLink","Image","|","SourceCode","Undo","Redo"],ke=[{cssClass:"e-segoe-ui",text:"Segoe UI",command:"Font",subCommand:"FontName",value:"Segoe UI"},{cssClass:"e-arial",text:"Arial",command:"Font",subCommand:"FontName",value:"Arial,Helvetica,sans-serif"},{cssClass:"e-georgia",text:"Georgia",command:"Font",subCommand:"FontName",value:"Georgia,serif"},{cssClass:"e-impact",text:"Impact",command:"Font",subCommand:"FontName",value:"Impact,Charcoal,sans-serif"},{cssClass:"e-tahoma",text:"Tahoma",command:"Font",subCommand:"FontName",value:"Tahoma,Geneva,sans-serif"},{cssClass:"e-times-new-roman",text:"Times New Roman",command:"Font",subCommand:"FontName",value:"Times New Roman,Times,serif"},{cssClass:"e-verdana",text:"Verdana",command:"Font",subCommand:"FontName",value:"Verdana,Geneva,sans-serif"}],Le=[{text:"8 pt",value:"8pt"},{text:"10 pt",value:"10pt"},{text:"12 pt",value:"12pt"},{text:"14 pt",value:"14pt"},{text:"18 pt",value:"18pt"},{text:"24 pt",value:"24pt"},{text:"36 pt",value:"36pt"}],xe=[{cssClass:"e-paragraph",text:"Paragraph",command:"Formats",subCommand:"P",value:"P"},{cssClass:"e-code",text:"Code",command:"Formats",subCommand:"Pre",value:"Pre"},{cssClass:"e-quote",text:"Quotation",command:"Formats",subCommand:"BlockQuote",value:"BlockQuote"},{cssClass:"e-h1",text:"Heading 1",command:"Formats",subCommand:"H1",value:"H1"},{cssClass:"e-h2",text:"Heading 2",command:"Formats",subCommand:"H2",value:"H2"},{cssClass:"e-h3",text:"Heading 3",command:"Formats",subCommand:"H3",value:"H3"},{cssClass:"e-h4",text:"Heading 4",command:"Formats",subCommand:"H4",value:"H4"}],Oe={Custom:["","#000000","#e7e6e6","#44546a","#4472c4","#ed7d31","#a5a5a5","#ffc000","#70ad47","#ff0000","#f2f2f2","#808080","#cfcdcd","#d5dce4","#d9e2f3","#fbe4d5","#ededed","#fff2cc","#e2efd9","#ffcccc","#d9d9d9","#595959","#aeaaaa","#acb9ca","#b4c6e7","#f7caac","#dbdbdb","#ffe599","#c5e0b3","#ff8080","#bfbfbf","#404040","#747070","#8496b0","#8eaadb","#f4b083","#c9c9c9","#ffd966","#a8d08d","#ff3333","#a6a6a6","#262626","#3b3838","#323e4f","#2f5496","#c45911","#7b7b7b","#bf8f00","#538135","#b30000","#7f7f7f","#0d0d0d","#161616","#212934","#1f3763","#823b0b","#525252","#7f5f00","#375623","#660000"]},De={Custom:["","#000000","#ffff00","#00ff00","#00ffff","#0000ff","#ff0000","#000080","#800080","#996633","#f2f2f2","#808080","#ffffcc","#b3ffb3","#ccffff","#ccccff","#ffcccc","#ccccff","#ff80ff","#f2e6d9","#d9d9d9","#595959","#ffff80","#80ff80","#b3ffff","#8080ff","#ff8080","#8080ff","#ff00ff","#dfbf9f","#bfbfbf","#404040","#ffff33","#33ff33","#33ffff","#3333ff","#ff3333","#0000b3","#b300b3","#c68c53","#a6a6a6","#262626","#e6e600","#00b300","#009999","#000099","#b30000","#000066","#660066","#86592d","#7f7f7f","#0d0d0d","#999900","#006600","#006666","#000066","#660000","#00004d","#4d004d","#734d26"]},Me=[{text:"None",command:"Lists",subCommand:"NumberFormatList",value:"none"},{text:"Number",command:"Lists",subCommand:"NumberFormatList",value:"decimal"},{text:"Lower Greek",command:"Lists",subCommand:"NumberFormatList",value:"lowerGreek"},{text:"Lower Roman",command:"Lists",subCommand:"NumberFormatList",value:"lowerRoman"},{text:"Upper Alpha",command:"Lists",subCommand:"NumberFormatList",value:"upperAlpha"},{text:"Lower Alpha",command:"Lists",subCommand:"NumberFormatList",value:"lowerAlpha"},{text:"Upper Roman",command:"Lists",subCommand:"NumberFormatList",value:"upperRoman"}],Re=[{text:"None",command:"Lists",subCommand:"BulletFormatList",value:"none"},{text:"Disc",command:"Lists",subCommand:"BulletFormatList",value:"disc"},{text:"Circle",command:"Lists",subCommand:"BulletFormatList",value:"circle"},{text:"Square",command:"Lists",subCommand:"BulletFormatList",value:"square"}],Ie={alignments:"Alignments",justifyLeft:"Align Left",justifyCenter:"Align Center",justifyRight:"Align Right",justifyFull:"Align Justify",fontName:"Font Name",fontSize:"Font Size",fontColor:"Font Color",backgroundColor:"Background Color",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",clearFormat:"Clear Format",clearAll:"Clear All",cut:"Cut",copy:"Copy",paste:"Paste",unorderedList:"Bulleted List",orderedList:"Numbered List",indent:"Increase Indent",outdent:"Decrease Indent",undo:"Undo",redo:"Redo",superscript:"Superscript",subscript:"Subscript",createLink:"Insert Link",openLink:"Open Link",editLink:"Edit Link",removeLink:"Remove Link",image:"Insert Image",replace:"Replace",align:"Align",caption:"Image Caption",remove:"Remove",insertLink:"Insert Link",display:"Display",altText:"Alternative Text",dimension:"Change Size",fullscreen:"Maximize",maximize:"Maximize",minimize:"Minimize",lowerCase:"Lower Case",upperCase:"Upper Case",print:"Print",formats:"Formats",sourcecode:"Code View",preview:"Preview",viewside:"ViewSide",insertCode:"Insert Code",linkText:"Display Text",linkTooltipLabel:"Title",linkWebUrl:"Web Address",linkTitle:"Enter a title",linkurl:"http://example.com",linkOpenInNewWindow:"Open Link in New Window",linkHeader:"Insert Link",dialogInsert:"Insert",dialogCancel:"Cancel",dialogUpdate:"Update",imageHeader:"Insert Image",imageLinkHeader:"You can also provide a link from the web",mdimageLink:"Please provide a URL for your image",imageUploadMessage:"Drop image here or browse to upload",imageDeviceUploadMessage:"Click here to upload",imageAlternateText:"Alternate Text",alternateHeader:"Alternative Text",browse:"Browse",imageUrl:"http://example.com/image.png",imageCaption:"Caption",imageSizeHeader:"Image Size",imageHeight:"Height",imageWidth:"Width",textPlaceholder:"Enter Text",inserttablebtn:"Insert Table",tabledialogHeader:"Insert Table",tableWidth:"Width",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",columns:"Number of columns",rows:"Number of rows",tableRows:"Table Rows",tableColumns:"Table Columns",tableCellHorizontalAlign:"Table Cell Horizontal Align",tableCellVerticalAlign:"Table Cell Vertical Align",createTable:"Create Table",removeTable:"Remove Table",tableHeader:"Table Header",tableRemove:"Table Remove",tableCellBackground:"Table Cell Background",tableEditProperties:"Table Edit Properties",styles:"Styles",insertColumnLeft:"Insert Column Left",insertColumnRight:"Insert Column Right",deleteColumn:"Delete Column",insertRowBefore:"Insert Row Before",insertRowAfter:"Insert Row After",deleteRow:"Delete Row",tableEditHeader:"Edit Table",TableHeadingText:"Heading",TableColText:"Col",imageInsertLinkHeader:"Insert Link",editImageHeader:"Edit Image",alignmentsDropDownLeft:"Align Left",alignmentsDropDownCenter:"Align Center",alignmentsDropDownRight:"Align Right",alignmentsDropDownJustify:"Align Justify",imageDisplayDropDownInline:"Inline",imageDisplayDropDownBreak:"Break",tableInsertRowDropDownBefore:"Insert row before",tableInsertRowDropDownAfter:"Insert row after",tableInsertRowDropDownDelete:"Delete row",tableInsertColumnDropDownLeft:"Insert column left",tableInsertColumnDropDownRight:"Insert column right",tableInsertColumnDropDownDelete:"Delete column",tableVerticalAlignDropDownTop:"Align Top",tableVerticalAlignDropDownMiddle:"Align Middle",tableVerticalAlignDropDownBottom:"Align Bottom",tableStylesDropDownDashedBorder:"Dashed Borders",tableStylesDropDownAlternateRows:"Alternate Rows",pasteFormat:"Paste Format",pasteFormatContent:"Choose the formatting action",plainText:"Plain Text",cleanFormat:"Clean",keepFormat:"Keep",pasteDialogOk:"OK",pasteDialogCancel:"Cancel",fileManager:"File Manager",fileDialogHeader:"File Browser",formatsDropDownParagraph:"Paragraph",formatsDropDownCode:"Code",formatsDropDownQuotation:"Quotation",formatsDropDownHeading1:"Heading 1",formatsDropDownHeading2:"Heading 2",formatsDropDownHeading3:"Heading 3",formatsDropDownHeading4:"Heading 4",fontNameSegoeUI:"Segoe UI",fontNameArial:"Arial",fontNameGeorgia:"Georgia",fontNameImpact:"Impact",fontNameTahoma:"Tahoma",fontNameTimesNewRoman:"Times New Roman",fontNameVerdana:"Verdana",numberFormatListNumber:"Number",numberFormatListLowerAlpha:"LowerAlpha",numberFormatListUpperAlpha:"UpperAlpha",numberFormatListLowerRoman:"LowerRoman",numberFormatListUpperRoman:"UpperRoman",numberFormatListLowerGreek:"LowerGreek",bulletFormatListDisc:"Disc",bulletFormatListCircle:"Circle",bulletFormatListSquare:"Square",numberFormatListNone:"None",bulletFormatListNone:"None"},Be={alignments:"alignments",justifyleft:"justifyLeft",justifycenter:"justifyCenter",justifyright:"justifyRight",justifyfull:"justifyFull",fontname:"fontName",fontsize:"fontSize",fontcolor:"fontColor",backgroundcolor:"backgroundColor",bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikethrough",clearformat:"clearFormat",clearall:"clearAll",cut:"cut",copy:"copy",paste:"paste",unorderedlist:"unorderedList",orderedlist:"orderedList",indent:"indent",outdent:"outdent",undo:"undo",redo:"redo",superscript:"superscript",subscript:"subscript",createlink:"createLink",openlink:"openLink",editlink:"editLink",removelink:"removeLink",openimagelink:"openLink",editimagelink:"editLink",removeimagelink:"removeLink",image:"image",replace:"replace",align:"align",caption:"caption",remove:"remove",insertlink:"insertLink",display:"display",alttext:"altText",dimension:"dimension",fullscreen:"fullscreen",maximize:"maximize",minimize:"minimize",lowercase:"lowerCase",uppercase:"upperCase",print:"print",formats:"formats",sourcecode:"sourcecode",preview:"preview",viewside:"viewside",insertcode:"insertCode",tablerows:"tableRows",tablecolumns:"tableColumns",tablecellhorizontalalign:"tableCellHorizontalAlign",tablecellverticalalign:"tableCellVerticalAlign",createtable:"createTable",removetable:"removeTable",tableheader:"tableHeader",tableremove:"tableRemove",tablecellbackground:"tableCellBackground",tableeditproperties:"tableEditProperties",styles:"styles",insertcolumnleft:"insertColumnLeft",insertcolumnright:"insertColumnRight",deletecolumn:"deleteColumn",aligntop:"AlignTop",alignmiddle:"AlignMiddle",alignbottom:"AlignBottom",insertrowbefore:"insertRowBefore",insertrowafter:"insertRowAfter",deleterow:"deleteRow"},Pe=[{locale:"fontNameSegoeUI",value:"Segoe UI"},{locale:"fontNameArial",value:"Arial,Helvetica,sans-serif"},{locale:"fontNameGeorgia",value:"Georgia,serif"},{locale:"fontNameImpact",value:"Impact,Charcoal,sans-serif"},{locale:"fontNameTahoma",value:"Tahoma,Geneva,sans-serif"},{locale:"fontNameTimesNewRoman",value:"Times New Roman,Times,serif"},{locale:"fontNameVerdana",value:"Verdana,Geneva,sans-serif"}],Ae=[{locale:"formatsDropDownParagraph",value:"P"},{locale:"formatsDropDownCode",value:"Pre"},{locale:"formatsDropDownQuotation",value:"BlockQuote"},{locale:"formatsDropDownHeading1",value:"H1"},{locale:"formatsDropDownHeading2",value:"H2"},{locale:"formatsDropDownHeading3",value:"H3"},{locale:"formatsDropDownHeading4",value:"H4"}],He=[{locale:"numberFormatListNone",value:"none"},{locale:"numberFormatListNumber",value:"decimal"},{locale:"numberFormatListLowerAlpha",value:"lower-alpha"},{locale:"numberFormatListUpperAlpha",value:"upper-alpha"},{locale:"numberFormatListLowerRoman",value:"lower-roman"},{locale:"numberFormatListUpperRoman",value:"upper-roman"},{locale:"numberFormatListLowerGreek",value:"lower-greek"}],Ue=[{locale:"bulletFormatListNone",value:"none"},{locale:"bulletFormatListDisc",value:"disc"},{locale:"bulletFormatListCircle",value:"circle"},{locale:"bulletFormatListSquare",value:"square"}],je=["Undo","Redo"],Fe=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","strike","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],ze=function(){function e(e){this.parent=e,this.wireEvent()}return e.prototype.wireEvent=function(){this.parent.on(z,this.unWireEvent,this)},e.prototype.unWireEvent=function(){this.parent.off(z,this.unWireEvent),this.popupOverlay&&t.EventHandler.remove(this.popupOverlay,"click touchmove",this.onPopupOverlay),this.removePopupContainer()},e.prototype.toolbarBeforeCreate=function(e){"Extended"===this.mode&&(e.enableCollision=!1)},e.prototype.toolbarCreated=function(){this.parent.notify("toolbarCreated",this)},e.prototype.toolbarClicked=function(e){this.parent.enabled&&(this.parent.readonly||this.parent.notify("toolbarClick",e),this.parent.trigger("toolbarClick",e))},e.prototype.dropDownSelected=function(e){this.parent.notify("dropDownSelect",e),this.onPopupOverlay()},e.prototype.beforeDropDownItemRender=function(e){!this.parent.readonly&&this.parent.enabled&&this.parent.notify("beforeDropDownItemRender",e)},e.prototype.dropDownOpen=function(e){if(e.element.parentElement.getAttribute("id").indexOf("TableCell")>-1){var n=e.element.querySelectorAll("li");1===this.parent.inputElement.querySelectorAll(".e-cell-select").length?(t.addClass([n[0]],"e-disabled"),t.removeClass([n[1],n[2]],"e-disabled")):this.parent.inputElement.querySelectorAll(".e-cell-select").length>1&&(t.removeClass([n[0]],"e-disabled"),t.addClass([n[1],n[2]],"e-disabled"))}t.Browser.isDevice&&!e.element.parentElement.classList.contains("e-quick-dropdown")&&this.popupModal(e.element.parentElement),this.parent.notify(V,e)},e.prototype.dropDownClose=function(e){this.removePopupContainer(),this.parent.notify("selection-restore",e)},e.prototype.removePopupContainer=function(){if(t.Browser.isDevice&&!t.isNullOrUndefined(this.popupContainer)){var e=this.popupContainer.querySelector(".e-dropdown-popup.e-tbar-btn.e-control");e&&(this.popupContainer.parentNode.insertBefore(e,this.popupContainer.nextSibling),e.style.removeProperty("position"),t.removeClass([e],"e-popup-modal")),t.detach(this.popupContainer),this.popupContainer=void 0}},e.prototype.renderToolbar=function(e){this.setPanel(e.target),this.renderPanel(),this.mode=e.overflowMode,e.rteToolbarObj.toolbarObj=new n.Toolbar({items:e.items,width:"100%",overflowMode:e.overflowMode,beforeCreate:this.toolbarBeforeCreate.bind(this),created:this.toolbarCreated.bind(this),clicked:this.toolbarClicked.bind(this),enablePersistence:e.enablePersistence,enableRtl:e.enableRtl}),e.rteToolbarObj.toolbarObj.isStringTemplate=!0,e.rteToolbarObj.toolbarObj.createElement=this.parent.createElement,e.rteToolbarObj.toolbarObj.appendTo(e.target)},e.prototype.renderDropDownButton=function(e){var n,o=this;e.element.classList.add(ee),n=e.cssClass+" e-rte-elements e-tbar-btn",this.parent.inlineMode.enable&&t.Browser.isDevice&&(n+=" e-rte-inline-dropdown");var r=this,s=new i.DropDownButton({items:e.items,iconCss:e.iconCss,cssClass:n,content:e.content,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,select:this.dropDownSelected.bind(this),beforeOpen:function(e){if(r.parent.readonly||!r.parent.enabled)return void(e.cancel=!0);for(var n=0;n<e.element.childNodes.length;n++){var i=o.parent.createElement("div");i.innerHTML=s.content.trim(),""!==i.textContent.trim()&&e.element.childNodes[n].textContent.trim()===i.textContent.trim()?e.element.childNodes[n].classList.contains("e-active")||t.addClass([e.element.childNodes[n]],"e-active"):t.removeClass([e.element.childNodes[n]],"e-active")}r.parent.notify("beforeDropDownOpen",e)},close:this.dropDownClose.bind(this),open:this.dropDownOpen.bind(this),beforeItemRender:this.beforeDropDownItemRender.bind(this)});return s.isStringTemplate=!0,s.createElement=r.parent.createElement,s.appendTo(e.element),e.element.tabIndex=-1,document.getElementById(s.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),s},e.prototype.renderListDropDown=function(e){var t=this,n="e-rte-elements e-tbar-btn"+(this.parent.inlineMode?" e-rte-inline-dropdown":"");n+=" "+("NumberFormatList"===e.itemName?"e-rte-numberformatlist-dropdown":"e-rte-bulletformatlist-dropdown");var o=t.parent.createElement("span",{className:"e-rte-list-primary-content"}),r=t.parent.createElement("span",{className:e.cssClass});o.appendChild(r);var s=new i.DropDownButton({items:e.items,cssClass:n,content:e.content,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,select:this.dropDownSelected.bind(this),beforeOpen:function(e){if(t.parent.readonly||!t.parent.enabled)return void(e.cancel=!0);var n=e.event?e.event.target:null;if(t.currentElement=s.element,t.currentDropdown=s,e.event&&"click"===e.event.type&&(n.classList.contains("e-rte-list-primary-content")||n.parentElement.classList.contains("e-rte-list-primary-content")))return void(e.cancel=!0);t.parent.notify("beforeDropDownOpen",e)},close:this.dropDownClose.bind(this),open:this.dropDownOpen.bind(this),beforeItemRender:this.beforeDropDownItemRender.bind(this)});return s.isStringTemplate=!0,s.createElement=t.parent.createElement,s.appendTo(e.element),e.element.tabIndex=-1,document.getElementById(s.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),1===e.element.childElementCount&&s.element.insertBefore(o,s.element.querySelector(".e-caret")),e.element.tabIndex=-1,s.element.removeAttribute("type"),s},e.prototype.onPopupOverlay=function(e){t.isNullOrUndefined(this.popupOverlay)||(t.closest(this.popupOverlay,".e-popup-container").style.display="none",this.popupOverlay.style.display="none",t.removeClass([this.popupOverlay],"e-popup-overlay"))},e.prototype.setIsModel=function(e){t.closest(e,".e-popup-container")?(e.parentElement.style.display="flex",this.popupOverlay=e.nextElementSibling,this.popupOverlay.style.display="block",t.addClass([this.popupOverlay],"e-popup-overlay")):(this.popupContainer=this.parent.createElement("div",{className:"e-rte-modal-popup e-popup-container e-center"}),e.parentNode.insertBefore(this.popupContainer,e),this.popupContainer.appendChild(e),this.popupContainer.style.zIndex=e.style.zIndex,this.popupContainer.style.display="flex",e.style.position="relative",t.addClass([e],"e-popup-modal"),this.popupOverlay=this.parent.createElement("div",{className:"e-popup-overlay"}),this.popupOverlay.style.zIndex=(parseInt(e.style.zIndex,null)-1).toString(),this.popupOverlay.style.display="block",this.popupContainer.appendChild(this.popupOverlay),t.EventHandler.add(this.popupOverlay,"click touchmove",this.onPopupOverlay,this))},e.prototype.paletteSelection=function(e,n){var i=e.element.querySelector(".e-control.e-colorpicker"),o=[].slice.call(t.selectAll(".e-tile",i.parentElement));t.removeClass(o,"e-selected");var r=n.querySelector(".e-rte-elements").style.borderBottomColor;o.filter(function(e){e.style.backgroundColor===r&&t.addClass([e],"e-selected")})},e.prototype.renderColorPickerDropDown=function(e,n,o){var s=this,a=this,l="e-rte-elements e-tbar-btn"+(this.parent.inlineMode?" e-rte-inline-dropdown":"");l+=" "+("backgroundcolor"===n?"e-rte-backgroundcolor-dropdown":"e-rte-fontcolor-dropdown");var d,c=a.parent.createElement("span",{className:"e-rte-color-content"}),h=a.parent.createElement("span",{className:e.cssClass});h.style.borderBottomColor="backgroundcolor"===n?a.parent.backgroundColor.default:a.parent.fontColor.default,c.appendChild(h);var u=new i.DropDownButton({target:o.element.parentElement,cssClass:l,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,beforeOpen:function(n){if(a.parent.readonly||!a.parent.enabled)return void(n.cancel=!0);var i=n.event?n.event.target:null;if(a.currentElement=u.element,a.currentDropdown=u,a.paletteSelection(n,a.currentElement),n.event&&"click"===n.event.type&&(i.classList.contains("e-rte-color-content")||i.parentElement.classList.contains("e-rte-color-content"))){n.cancel=!0;var o=i.classList.contains("e-rte-elements")?i.style.borderBottomColor:i.querySelector(".e-rte-elements").style.borderBottomColor;a.parent.notify("selection-restore",{});var s=(d=a.parent.formatter.editorManager.nodeSelection.getRange(a.parent.contentModule.getDocument())).startContainer.parentNode;return void(("TD"===d.startContainer.nodeName||"TH"===d.startContainer.nodeName||t.closest(d.startContainer.parentNode,"td,th")||a.parent.iframeSettings.enable&&!p(s.ownerDocument.querySelector("body"),"e-lib"))&&d.collapsed&&"BackgroundColor"===e.subCommand?a.parent.notify("tableColorPickerChanged",{item:{command:e.command,subCommand:e.subCommand,value:o}}):a.parent.notify("colorPickerChanged",{item:{command:e.command,subCommand:e.subCommand,value:o}}))}var l=n.element.querySelector(".e-control.e-colorpicker"),c=t.getInstance(l,r.ColorPicker);c.showButtons=!n.element.querySelector(".e-color-palette"),c.dataBind(),n.element.onclick=function(e){e.target.classList.contains("e-cancel")&&u.toggle()}},open:function(e){s.setColorPickerContentWidth(o);var n,i=e.element.querySelector(".e-control.e-colorpicker");(n=e.element.querySelector(".e-color-palette")?i.parentElement.querySelector(".e-palette"):i.parentElement.querySelector("e-handler"))&&n.focus(),t.Browser.isDevice&&s.popupModal(e.element.parentElement),s.pickerRefresh(e)},beforeClose:function(n){var i=n.event?n.event.target:null;if(n.event&&"click"===n.event.type&&(i.classList.contains("e-rte-color-content")||i.parentElement.classList.contains("e-rte-color-content"))){var o=i.classList.contains("e-rte-elements")?i.style.borderBottomColor:i.querySelector(".e-rte-elements").style.borderBottomColor;return d=a.parent.formatter.editorManager.nodeSelection.getRange(a.parent.contentModule.getDocument()),void(("TD"===d.startContainer.nodeName||"TH"===d.startContainer.nodeName||t.closest(d.startContainer.parentNode,"td,th"))&&d.collapsed?a.parent.notify("tableColorPickerChanged",{item:{command:e.command,subCommand:e.subCommand,value:o}}):a.parent.notify("colorPickerChanged",{item:{command:e.command,subCommand:e.subCommand,value:o}}))}},close:function(e){a.parent.notify("selection-restore",{});var n=t.closest(e.element.parentElement,".e-popup-container");if(n&&(n.style.display="none",n.lastElementChild.style.display="none",t.removeClass([n.lastElementChild],"e-popup-overlay")),t.Browser.isDevice&&!t.isNullOrUndefined(n)){var i=n.querySelector(".e-dropdown-popup.e-tbar-btn.e-control");i&&(n.parentNode.insertBefore(i,n.nextSibling),i.style.removeProperty("position"),t.removeClass([i],"e-popup-modal")),t.detach(n),a.popupContainer=void 0}}});return u.isStringTemplate=!0,u.createElement=a.parent.createElement,e.element.setAttribute("role","button"),u.appendTo(e.element),document.getElementById(u.element.id+"-popup").setAttribute("aria-owns",this.parent.getID()),u.element.insertBefore(c,u.element.querySelector(".e-caret")),e.element.tabIndex=-1,u.element.removeAttribute("type"),u.element.onmousedown=function(){a.parent.notify(V,{})},u.element.onkeydown=function(){a.parent.notify(V,{})},u},e.prototype.pickerRefresh=function(e){if("Picker"===this.parent.backgroundColor.mode){var n=e.element.parentElement;n.style.width=(n.offsetWidth+5).toString()+"px",t.getInstance(n,o.Popup).refreshPosition(n),n.style.width=(n.offsetWidth-5).toString()+"px"}},e.prototype.popupModal=function(e){var n=t.getInstance(e,o.Popup);n.relateTo=document.body,n.position={X:0,Y:0},n.targetType="container",n.collision={X:"fit",Y:"fit"},n.offsetY=4,n.dataBind(),this.setIsModel(e)},e.prototype.setColorPickerContentWidth=function(e){var n=e.element.nextSibling;if("0px"===n.style.width){n.style.width="";var i=parseInt(getComputedStyle(n).borderBottomWidth,10);n.style.width=t.formatUnit(n.children[0].offsetWidth+i+i)}},e.prototype.renderColorPicker=function(e,n){var i,o=this,s=new r.ColorPicker({enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl,inline:!0,created:function(){var e="backgroundcolor"===n?o.parent.backgroundColor.default:o.parent.fontColor.default;s.setProperties({value:e})},mode:"backgroundcolor"===n?o.parent.backgroundColor.mode:o.parent.fontColor.mode,modeSwitcher:"backgroundcolor"===n?o.parent.backgroundColor.modeSwitcher:o.parent.fontColor.modeSwitcher,beforeTileRender:function(e){e.element.classList.add("e-rte-square-palette"),e.element.classList.add("e-custom-tile"),""===e.value&&e.element.classList.add("e-nocolor-item")},change:function(n){var i=n.currentValue.rgba;n.item={command:e.command,subCommand:e.subCommand,value:i},o.parent.notify("selection-restore",{}),o.currentElement.querySelector(".e-rte-elements").style.borderBottomColor=i;var r=o.parent.formatter.editorManager.nodeSelection.getRange(o.parent.contentModule.getDocument());("TD"===r.startContainer.nodeName||"TH"===r.startContainer.nodeName||"BODY"===r.startContainer.nodeName||t.closest(r.startContainer.parentNode,"td,th"))&&r.collapsed&&"BackgroundColor"===e.subCommand?o.parent.notify("tableColorPickerChanged",n):o.parent.notify("colorPickerChanged",n),o.currentDropdown.toggle()},beforeModeSwitch:function(e){""===(i=s.value)&&s.setProperties({value:"Picker"===e.mode?"#008000ff":""},!0),s.showButtons="Palette"!==e.mode}});return s.isStringTemplate=!0,s.columns="backgroundcolor"===n?this.parent.backgroundColor.columns:this.parent.fontColor.columns,s.presetColors="backgroundcolor"===n?this.parent.backgroundColor.colorCode:this.parent.fontColor.colorCode,s.cssClass="backgroundcolor"===n?"e-rte-backgroundcolor-colorpicker":"e-rte-fontcolor-colorpicker",s.createElement=this.parent.createElement,s.appendTo(document.getElementById(e.target)),s},e.prototype.renderPanel=function(){this.getPanel().classList.add("e-rte-toolbar")},e.prototype.getPanel=function(){return this.toolbarPanel},e.prototype.setPanel=function(e){this.toolbarPanel=e},e}(),_e=function(){function n(e,n){this.tools={},this.parent=e,this.locator=n,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?t.extend(this.tools,ce,N(this.parent.toolbarSettings.itemConfigs),!0):this.tools=ce}return n.prototype.addEventListener=function(){this.parent.on(K,this.setRtl,this),this.parent.on(z,this.removeEventListener,this)},n.prototype.removeEventListener=function(){this.parent.off(K,this.setRtl),this.parent.off(z,this.removeEventListener)},n.prototype.setRtl=function(e){t.isNullOrUndefined(this.toolbarObj)||this.toolbarObj.setProperties({enableRtl:e.enableRtl})},n.prototype.getClass=function(e){var t;switch(e){case"fontsize":t="e-rte-inline-size-template";break;case"fontcolor":case"backgroundcolor":t="e-rte-inline-color-template";break;default:t="e-rte-inline-template"}return t},n.prototype.getTemplateObject=function(e,t){var n;switch(e){case"fontcolor":case"backgroundcolor":case"numberformatlist":case"bulletformatlist":n="span";break;default:n="button"}return{command:this.tools[e.toLocaleLowerCase()].command,subCommand:this.tools[e.toLocaleLowerCase()].subCommand,template:this.parent.createElement(n,{id:this.parent.getID()+"_"+t+"_"+this.tools[e.toLocaleLowerCase()].id}).outerHTML,cssClass:this.parent.inlineMode.enable?this.getClass(e):"",tooltipText:f(e,this.locator)}},n.prototype.getObject=function(e,t){var n=e.toLowerCase();if(-1!==de.indexOf(n))return this.getTemplateObject(n,t);switch(n){case"|":return{type:"Separator"};case"-":return{type:"Separator",cssClass:"e-rte-horizontal-separator"};default:return{id:this.parent.getID()+"_"+t+"_"+this.tools[n.toLocaleLowerCase()].id,prefixIcon:this.tools[n.toLocaleLowerCase()].icon,tooltipText:f(n,this.locator),command:this.tools[n.toLocaleLowerCase()].command,subCommand:this.tools[n.toLocaleLowerCase()].subCommand}}},n.prototype.getItems=function(e,n){var i=this;if(this.parent.toolbarSettings.items.length<1)return[];for(var o=[],r=this,s=0,a=e;s<a.length;s++)!function(e){switch(typeof e){case"string":o.push(r.getObject(e,n));break;default:if(!t.isNullOrUndefined(e.click)){var s=e,a=s.click;s.click=function(){s.undo&&0===i.parent.formatter.getUndoRedoStack().length&&i.parent.formatter.saveData(),a.call(i),i.parent.formatter.getUndoRedoStack()[i.parent.formatter.getUndoRedoStack().length-1].text.trim()!==i.parent.inputElement.innerHTML.trim()&&s.undo&&i.parent.formatter.saveData()}}o.push(e)}}(a[s]);return o},n.prototype.getToolbarOptions=function(e){return{target:e.target,rteToolbarObj:this,items:this.getItems(e.items,e.container),overflowMode:e.mode,enablePersistence:this.parent.enablePersistence,enableRtl:this.parent.enableRtl}},n.prototype.render=function(t){this.toolbarRenderer=this.renderFactory.getRenderer(e.RenderType.Toolbar),this.toolbarRenderer.renderToolbar(this.getToolbarOptions(t))},n}(),qe=function(){function n(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return n.prototype.initializeInstance=function(){this.toolbarRenderer=this.renderFactory.getRenderer(e.RenderType.Toolbar)},n.prototype.beforeRender=function(e){var n=e.item;n.cssClass&&t.addClass([e.element],n.cssClass),"Alignments"!==n.command&&"JustifyLeft"!==n.subCommand&&"JustifyRight"!==n.subCommand&&"JustifyCenter"!==n.subCommand||e.element.setAttribute("title",f(n.subCommand.toLocaleLowerCase(),this.locator))},n.prototype.dropdownContent=function(e,t,n){return'<span style="display: inline-flex;width:'+("quick"===t?"auto":e)+'" ><span class="e-rte-dropdown-btn-text">'+n+"</span></span>"},n.prototype.renderDropDowns=function(e){var n=this;this.initializeInstance();var i=e.containerType,o=e.container;de.forEach(function(r){var s=void 0;if(-1!==c(r,e.items))switch(r){case"numberformatlist":if(s=t.select("#"+n.parent.getID()+"_"+i+"_NumberFormatList",o),t.isNullOrUndefined(s)||s.classList.contains(ee))return;var a=n.parent.numberFormatList.types.slice();a.forEach(function(e){Object.defineProperties(e,{command:{value:"Lists",enumerable:!0},subCommand:{value:"NumberFormatList",enumerable:!0}})}),n.numberFormatListDropDown=n.toolbarRenderer.renderListDropDown({cssClass:"e-order-list e-rte-elements e-icons",itemName:"NumberFormatList",items:a,element:s});break;case"bulletformatlist":if(s=t.select("#"+n.parent.getID()+"_"+i+"_BulletFormatList",o),t.isNullOrUndefined(s)||s.classList.contains(ee))return;var l=n.parent.bulletFormatList.types.slice();l.forEach(function(e){Object.defineProperties(e,{command:{value:"Lists",enumerable:!0},subCommand:{value:"BulletFormatList",enumerable:!0}})}),n.bulletFormatListDropDown=n.toolbarRenderer.renderListDropDown({cssClass:"e-unorder-list e-rte-elements e-icons",itemName:"BulletFormatList",items:l,element:s});break;case"formats":if(s=t.select("#"+n.parent.getID()+"_"+i+"_Formats",o),t.isNullOrUndefined(s)||s.classList.contains(ee))return;var d=n.parent.format.types.slice();d.forEach(function(e){Object.defineProperties(e,{command:{value:"Formats",enumerable:!0},subCommand:{value:e.value,enumerable:!0}})});var p=t.isNullOrUndefined(n.parent.format.default)?d[0].text:n.parent.format.default;n.formatDropDown=n.toolbarRenderer.renderDropDownButton({iconCss:"quick"===i?"e-formats e-icons":"",content:n.dropdownContent(n.parent.format.width,i,"quick"===i?"":h(d,p,"text","text")),cssClass:"e-rte-dropdown-popup e-rte-dropdown-items e-formats-tbar-btn",itemName:"Formats",items:d,element:s});break;case"fontname":if(s=t.select("#"+n.parent.getID()+"_"+i+"_FontName",o),t.isNullOrUndefined(s)||s.classList.contains(ee))return;var u=n.parent.fontFamily.items.slice();u.forEach(function(e){Object.defineProperties(e,{command:{value:"Font",enumerable:!0},subCommand:{value:"FontName",enumerable:!0}})});var g=t.isNullOrUndefined(n.parent.fontFamily.default)?u[0].text:n.parent.fontFamily.default;n.fontNameDropDown=n.toolbarRenderer.renderDropDownButton({iconCss:"quick"===i?"e-font-name e-icons":"",content:n.dropdownContent(n.parent.fontFamily.width,i,"quick"===i?"":h(u,g,"text","text")),cssClass:"e-rte-dropdown-popup e-rte-dropdown-items e-font-name-tbar-btn",itemName:"FontName",items:u,element:s}),t.isNullOrUndefined(n.parent.fontFamily.default)||(n.getEditNode().style.fontFamily=n.parent.fontFamily.default);break;case"fontsize":if(s=t.select("#"+n.parent.getID()+"_"+i+"_FontSize",o),t.isNullOrUndefined(s)||s.classList.contains(ee))return;var f=n.parent.fontSize.items.slice();f.forEach(function(e){Object.defineProperties(e,{command:{value:"Font",enumerable:!0},subCommand:{value:"FontSize",enumerable:!0}})});var b=t.isNullOrUndefined(n.parent.fontSize.default)?f[1].text:n.parent.fontSize.default;n.fontSizeDropDown=n.toolbarRenderer.renderDropDownButton({content:n.dropdownContent(n.parent.fontSize.width,i,m(h(f,b.replace(/\s/g,""),"value","text"))),cssClass:"e-rte-dropdown-popup e-rte-dropdown-items e-font-size-tbar-btn",itemName:"FontSize",items:f,element:s}),t.isNullOrUndefined(n.parent.fontSize.default)||(n.getEditNode().style.fontSize=n.parent.fontSize.default);break;case"alignments":if(s=t.select("#"+n.parent.getID()+"_"+i+"_Alignments",o),t.isNullOrUndefined(s)||s.classList.contains(ee))return;n.alignDropDown=n.toolbarRenderer.renderDropDownButton({iconCss:"e-justify-left e-icons",cssClass:$+" "+Z,itemName:"Alignments",items:he,element:s});break;case"align":n.imageAlignmentDropDown(i,o,s);break;case"display":n.imageDisplayDropDown(i,o,s);break;case"tablerows":n.rowDropDown(i,o,s);break;case"tablecolumns":n.columnDropDown(i,o,s);break;case"tablecell":n.cellDropDown(i,o,s);break;case"tablecellverticalalign":n.verticalAlignDropDown(i,o,s);break;case"styles":n.tableStylesDropDown(i,o,s)}})},n.prototype.getUpdateItems=function(e,t){var n=e.slice();return n.forEach(function(e){Object.defineProperties(e,{command:{value:"Format"===t?"Formats":"Font",enumerable:!0},subCommand:{value:"Format"===t?e.value:t,enumerable:!0}})}),n},n.prototype.onPropertyChanged=function(e){for(var n,i,o=e.newProp,r=0,s=Object.keys(o);r<s.length;r++)switch(s[r]){case"fontFamily":if(this.fontNameDropDown)for(var a=0,l=Object.keys(o.fontFamily);a<l.length;a++)switch(l[a]){case"default":case"width":var d=this.fontNameDropDown.items;n=t.isNullOrUndefined(t.closest(this.fontNameDropDown.element,"."+J))?"toolbar":"quick";var c=t.isNullOrUndefined(this.parent.fontFamily.default)?d[0].text:this.parent.fontFamily.default;i=this.dropdownContent(this.parent.fontFamily.width,n,"quick"===n?"":h(d,c,"text","text")),this.fontNameDropDown.setProperties({content:i}),t.isNullOrUndefined(this.parent.fontFamily.default)?this.getEditNode().style.removeProperty("font-family"):this.getEditNode().style.fontFamily=this.parent.fontFamily.default;break;case"items":this.fontNameDropDown.setProperties({items:this.getUpdateItems(o.fontFamily.items,"FontName")})}break;case"fontSize":if(this.fontSizeDropDown)for(var p=0,u=Object.keys(o.fontSize);p<u.length;p++)switch(u[p]){case"default":case"width":var g=this.fontSizeDropDown.items;n=t.isNullOrUndefined(t.closest(this.fontSizeDropDown.element,"."+J))?"toolbar":"quick";var f=t.isNullOrUndefined(this.parent.fontSize.default)?g[1].text:this.parent.fontSize.default;i=this.dropdownContent(this.parent.fontSize.width,n,m(h(g,f.replace(/\s/g,""),"value","text"))),this.fontSizeDropDown.setProperties({content:i}),t.isNullOrUndefined(this.parent.fontSize.default)?this.getEditNode().style.removeProperty("font-size"):this.getEditNode().style.fontSize=this.parent.fontSize.default;break;case"items":this.fontSizeDropDown.setProperties({items:this.getUpdateItems(o.fontSize.items,"FontSize")})}break;case"format":if(this.formatDropDown)for(var b=0,v=Object.keys(o.format);b<v.length;b++)switch(v[b]){case"default":case"width":var y=this.formatDropDown.items;n=t.isNullOrUndefined(t.closest(this.formatDropDown.element,"."+J))?"toolbar":"quick";var C=t.isNullOrUndefined(this.parent.format.default)?y[0].text:this.parent.format.default;i=this.dropdownContent(this.parent.format.width,n,"quick"===n?"":h(y,C,"text","text")),this.formatDropDown.setProperties({content:i});break;case"types":this.formatDropDown.setProperties({items:this.getUpdateItems(o.format.types,"Format")})}}},n.prototype.getEditNode=function(){return this.parent.contentModule.getEditPanel()},n.prototype.rowDropDown=function(e,n,i){(i=t.select("#"+this.parent.getID()+"_"+e+"_TableRows",n)).classList.contains(ee)||(this.tableRowsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-rows e-icons",cssClass:"e-rte-dropdown-popup e-rte-dropdown-items e-quick-dropdown",itemName:"TableRows",items:ve,element:i}))},n.prototype.columnDropDown=function(e,n,i){(i=t.select("#"+this.parent.getID()+"_"+e+"_TableColumns",n)).classList.contains(ee)||(this.tableColumnsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-columns e-icons",cssClass:"e-rte-dropdown-popup e-rte-dropdown-items e-quick-dropdown",itemName:"TableColumns",items:Ce,element:i}))},n.prototype.cellDropDown=function(e,n,i){(i=t.select("#"+this.parent.getID()+"_"+e+"_TableCell",n)).classList.contains(ee)||(this.tableRowsDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-cell e-icons",cssClass:"e-rte-dropdown-popup e-rte-dropdown-items e-quick-dropdown",itemName:"TableCell",items:fe,element:i}))},n.prototype.verticalAlignDropDown=function(e,n,i){(i=t.select("#"+this.parent.getID()+"_"+e+"_TableCellVerticalAlign",n)).classList.contains(ee)||(this.tableCellVerticalAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-table-cell-ver-align e-icons",cssClass:"e-rte-dropdown-popup e-rte-dropdown-items e-quick-dropdown",itemName:"TableCellVerticalAlign",items:Te,element:i}))},n.prototype.imageDisplayDropDown=function(e,n,i){(i=t.select("#"+this.parent.getID()+"_"+e+"_Display",n)).classList.contains(ee)||(this.displayDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-display e-icons",cssClass:"e-rte-dropdown-popup e-rte-dropdown-items e-quick-dropdown",itemName:"Display",items:ge,element:i}))},n.prototype.imageAlignmentDropDown=function(e,n,i){(i=t.select("#"+this.parent.getID()+"_"+e+"_Align",n)).classList.contains(ee)||(this.imageAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-justify-left e-icons",cssClass:$+" e-rte-dropdown-icons e-quick-dropdown",itemName:"Align",items:ue,element:i}))},n.prototype.tableStylesDropDown=function(e,n,i){(i=t.select("#"+this.parent.getID()+"_"+e+"_Styles",n)).classList.contains(ee)||(this.imageAlignDropDown=this.toolbarRenderer.renderDropDownButton({iconCss:"e-style e-icons",cssClass:$+" e-rte-dropdown-icons e-quick-dropdown",itemName:"Styles",items:this.parent.tableSettings.styles,element:i}))},n.prototype.removeDropDownClasses=function(e){t.removeClass([e],[ee,$,"e-rte-dropdown-icons",Z])},n.prototype.destroyDropDowns=function(){this.formatDropDown&&(this.removeDropDownClasses(this.formatDropDown.element),this.formatDropDown.destroy()),this.fontNameDropDown&&(this.removeDropDownClasses(this.fontNameDropDown.element),this.fontNameDropDown.destroy()),this.fontSizeDropDown&&(this.removeDropDownClasses(this.fontSizeDropDown.element),this.fontSizeDropDown.destroy()),this.alignDropDown&&(this.removeDropDownClasses(this.alignDropDown.element),this.alignDropDown.destroy()),this.imageAlignDropDown&&(this.removeDropDownClasses(this.imageAlignDropDown.element),this.imageAlignDropDown.destroy()),this.displayDropDown&&(this.removeDropDownClasses(this.displayDropDown.element),this.displayDropDown.destroy()),this.tableRowsDropDown&&(this.removeDropDownClasses(this.tableRowsDropDown.element),this.tableRowsDropDown.destroy()),this.tableColumnsDropDown&&(this.removeDropDownClasses(this.tableColumnsDropDown.element),this.tableColumnsDropDown.destroy()),this.tableCellVerticalAlignDropDown&&(this.removeDropDownClasses(this.tableCellVerticalAlignDropDown.element),this.tableCellVerticalAlignDropDown.destroy()),this.numberFormatListDropDown&&(this.removeDropDownClasses(this.numberFormatListDropDown.element),this.numberFormatListDropDown.destroy()),this.bulletFormatListDropDown&&(this.removeDropDownClasses(this.bulletFormatListDropDown.element),this.bulletFormatListDropDown.destroy())},n.prototype.setRtl=function(e){this.formatDropDown&&this.formatDropDown.setProperties({enableRtl:e.enableRtl}),this.fontNameDropDown&&this.fontNameDropDown.setProperties({enableRtl:e.enableRtl}),this.fontSizeDropDown&&this.fontSizeDropDown.setProperties({enableRtl:e.enableRtl}),this.alignDropDown&&this.alignDropDown.setProperties({enableRtl:e.enableRtl}),this.imageAlignDropDown&&this.imageAlignDropDown.setProperties({enableRtl:e.enableRtl}),this.displayDropDown&&this.displayDropDown.setProperties({enableRtl:e.enableRtl}),this.numberFormatListDropDown&&this.numberFormatListDropDown.setProperties({enableRtl:e.enableRtl}),this.bulletFormatListDropDown&&this.bulletFormatListDropDown.setProperties({enableRtl:e.enableRtl})},n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("beforeDropDownItemRender",this.beforeRender,this),this.parent.on("iframe-click",this.onIframeMouseDown,this),this.parent.on(K,this.setRtl,this),this.parent.on(z,this.removeEventListener,this),this.parent.on(_,this.onPropertyChanged,this))},n.prototype.onIframeMouseDown=function(){S(document,"mousedown")},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("iframe-click",this.onIframeMouseDown),this.parent.off(K,this.setRtl),this.parent.off("beforeDropDownItemRender",this.beforeRender),this.parent.off(z,this.removeEventListener),this.parent.off(_,this.onPropertyChanged))},n}(),Qe=function(){function e(){this.services={}}return e.prototype.register=function(e,n){t.isNullOrUndefined(this.services[e])&&(this.services[e]=n)},e.prototype.getService=function(e){if(t.isNullOrUndefined(this.services[e]))throw"The service "+e+" is not registered";return this.services[e]},e}(),Ve=function(){function n(){this.rendererMap={}}return n.prototype.addRenderer=function(n,i){var o=t.getEnumValue(e.RenderType,n);t.isNullOrUndefined(this.rendererMap[o])&&(this.rendererMap[o]=i)},n.prototype.getRenderer=function(n){var i=t.getEnumValue(e.RenderType,n);if(t.isNullOrUndefined(this.rendererMap[i]))throw"The renderer "+i+" is not found";return this.rendererMap[i]},n}(),We=function(){function e(e){this.parent=e,this.addEventListener(),this.serviceLocator=new Qe,this.serviceLocator.register("rendererFactory",new Ve)}return e.prototype.addEventListener=function(){this.parent.on("toolbarClick",this.toolbarClick,this),this.parent.on("dropDownSelect",this.dropDownSelect,this),this.parent.on("colorPickerChanged",this.renderSelection,this),this.parent.on(z,this.removeEventListener,this)},e.prototype.toolbarClick=function(e){if(!t.isNullOrUndefined(e.item)){if(!t.isNullOrUndefined(e.item.controlParent)){var n=e.item.controlParent.activeEle;n&&(n.tabIndex=-1)}"NumberFormatList"!==e.item.command&&"BulletFormatList"!==e.item.command||(e.originalEvent.target.classList.contains("e-order-list")||e.originalEvent.target.classList.contains("e-unorder-list"))&&(e.item.command="Lists",e.item.subCommand="NumberFormatList"===e.item.subCommand?"OL":"UL"),"Lists"===e.item.command&&e.originalEvent.target.classList.contains("e-caret")&&(e.originalEvent.target.parentElement.classList.contains("e-rte-bulletformatlist-dropdown")||e.originalEvent.target.parentElement.classList.contains("e-rte-numberformatlist-dropdown"))&&(e.item.command=e.item.subCommand=null),this.parent.notify("html-toolbar-click",e),this.parent.notify("markdown-toolbar-click",e)}},e.prototype.dropDownSelect=function(e){if(this.parent.notify("selection-restore",{}),!document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))||!e.item||"Images"!==e.item.command&&"Display"!==e.item.command&&"Table"!==e.item.command){var t=e.item.controlParent&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.tableQTBar&&this.parent.quickToolbarModule.tableQTBar.element.contains(e.item.controlParent.element)?"Table":null;if("Lists"===e.item.command){var n={listStyle:e.item.value,listImage:e.item.listImage,type:e.item.subCommand};this.parent.formatter.process(this.parent,e,e.originalEvent,n)}else this.parent.formatter.process(this.parent,e,e.originalEvent,t)}this.parent.notify(V,{})},e.prototype.renderSelection=function(e){this.parent.notify("selection-restore",{}),this.parent.formatter.process(this.parent,e,e.originalEvent,null),this.parent.notify(V,{})},e.prototype.removeEventListener=function(){this.parent.off("toolbarClick",this.toolbarClick),this.parent.off("dropDownSelect",this.dropDownSelect),this.parent.off("colorPickerChanged",this.renderSelection),this.parent.off(z,this.removeEventListener)},e}(),Ge=function(){function n(n,i){this.parent=n,this.isToolbar=!1,this.locator=i,this.isTransformChild=!1,this.renderFactory=this.locator.getService("rendererFactory"),d(this.parent),R(this.parent),this.renderFactory.addRenderer(e.RenderType.Toolbar,new ze(this.parent)),this.toolbarRenderer=this.renderFactory.getRenderer(e.RenderType.Toolbar),this.baseToolbar=new _e(this.parent,this.locator),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?t.extend(this.tools,ce,N(this.parent.toolbarSettings.itemConfigs),!0):this.tools=ce}return n.prototype.initializeInstance=function(){this.contentRenderer=this.renderFactory.getRenderer(e.RenderType.Content),this.editableElement=this.contentRenderer.getEditPanel(),this.editPanel=this.contentRenderer.getPanel()},n.prototype.toolbarBindEvent=function(){this.parent.inlineMode.enable||(this.keyBoardModule=new t.KeyboardEvents(this.getToolbarElement(),{keyAction:this.toolBarKeyDown.bind(this),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"}))},n.prototype.toolBarKeyDown=function(e){switch(e.action){case"escape":this.parent.contentModule.getEditPanel().focus()}},n.prototype.createToolbarElement=function(){this.tbElement=this.parent.createElement("div",{id:this.parent.getID()+"_toolbar"}),!t.Browser.isDevice&&this.parent.inlineMode.enable&&u()||(this.parent.toolbarSettings.enableFloating&&!this.parent.inlineMode.enable?(this.tbWrapper=this.parent.createElement("div",{id:this.parent.getID()+"_toolbar_wrapper",innerHTML:this.tbElement.outerHTML,className:"e-toolbar-wrapper"}),this.tbElement=this.tbWrapper.firstElementChild,this.parent.element.insertBefore(this.tbWrapper,this.editPanel)):this.parent.element.insertBefore(this.tbElement,this.editPanel))},n.prototype.getToolbarMode=function(){var t;switch(this.parent.toolbarSettings.type){case e.ToolbarType.Expand:t="Extended";break;case e.ToolbarType.Scrollable:t="Scrollable";break;default:t="MultiRow"}return u()&&this.parent.toolbarSettings.type===e.ToolbarType.Expand&&(t=e.ToolbarType.Scrollable),t},n.prototype.checkToolbarResponsive=function(n){if(!t.Browser.isDevice||u())return!1;var i;return i=this.parent.toolbarSettings.type===e.ToolbarType.Expand?e.ToolbarType.MultiRow:this.parent.toolbarSettings.type,this.baseToolbar.render({container:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items,mode:i,target:n}),this.parent.toolbarSettings.type===e.ToolbarType.Expand&&(t.addClass([n],["e-rte-tb-mobile"]),this.parent.inlineMode.enable?this.addFixedTBarClass():t.addClass([n],["e-tb-static"])),this.wireEvents(),this.dropDownModule.renderDropDowns({container:n,containerType:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items}),this.parent.notify("render-color-picker",{container:this.tbElement,containerType:this.parent.inlineMode.enable?"quick":"toolbar",items:this.parent.toolbarSettings.items}),!0},n.prototype.checkIsTransformChild=function(){this.isTransformChild=!1;for(var e=t.selectAll('[style*="transform"]',document),n=0;n<e.length;n++)if(!t.isNullOrUndefined(e[n].contains)&&e[n].contains(this.parent.element)){this.isTransformChild=!0;break}},n.prototype.toggleFloatClass=function(e){var n,i,o=!1,r=!1,s=this.parent.floatingToolbarOffset;e&&this.parent.iframeSettings.enable&&this.parent.inputElement.ownerDocument===e.target?i=e.target.body:e&&e.target!==document?i=e.target:(o=!0,i=document.body);var a=this.getToolbarHeight()+this.getExpandTBarPopHeight();if(this.isTransformChild){n=0;var l=0,d=this.parent.element.offsetHeight;if(o){var c=window.getComputedStyle(i);l=parseFloat(c.marginTop.split("px")[0])+parseFloat(c.paddingTop.split("px")[0])}var p=this.parent.element.getBoundingClientRect().top,h=t.Browser.isMSPointer&&o?window.pageYOffset:i.parentElement.scrollTop,u=i.getBoundingClientRect(),m=o?u.top+h:u.top,g=!(p-(o?0:m)+d>a+s);p>m+s||p<-d||p<0&&g?(r=!1,t.removeClass([this.tbElement],["e-rte-tb-abs-float"])):p<m+s&&(n=p<0?-p+m:m-p,n=o?n-l:n,t.addClass([this.tbElement],["e-rte-tb-abs-float"]),r=!0)}else{var f=this.parent.element.getBoundingClientRect();if(window.innerHeight<f.top)return;n=e&&e.target!==document?i.getBoundingClientRect().top:0,f.bottom<s+a+n||f.bottom<0||f.top>s+n?r=!1:f.top<s&&(r=!0)}r?(t.addClass([this.tbElement],["e-rte-tb-float"]),t.setStyleAttribute(this.tbElement,{width:this.parent.element.offsetWidth+"px",top:s+n+"px"})):(t.removeClass([this.tbElement],["e-rte-tb-float"]),t.setStyleAttribute(this.tbElement,{top:"0px",width:"100%"}))},n.prototype.renderToolbar=function(){if(this.initializeInstance(),this.createToolbarElement(),!this.checkToolbarResponsive(this.tbElement)){this.parent.inlineMode.enable?this.parent.notify("renderInlineToolbar",{}):(this.baseToolbar.render({container:"toolbar",items:this.parent.toolbarSettings.items,mode:this.getToolbarMode(),target:this.tbElement}),this.parent.inlineMode.enable||(this.parent.toolbarSettings.enableFloating&&(this.checkIsTransformChild(),this.toggleFloatClass()),t.addClass([this.parent.element],["e-rte-toolbar-enabled"]),this.parent.toolbarSettings.type===e.ToolbarType.Expand&&t.addClass([this.parent.element],["e-rte-tb-expand"]))),this.wireEvents(),this.parent.inlineMode.enable&&!u()&&this.addFixedTBarClass(),this.parent.inlineMode.enable||(this.dropDownModule.renderDropDowns({container:this.tbElement,containerType:"toolbar",items:this.parent.toolbarSettings.items}),this.parent.notify("render-color-picker",{container:this.tbElement,containerType:"toolbar",items:this.parent.toolbarSettings.items}),this.refreshToolbarOverflow());var n=this.parent.element.querySelector(".e-rte-srctextarea"),i=this.parent.element.querySelector(".e-source-content");(!this.parent.iframeSettings.enable&&!t.isNullOrUndefined(n)&&"block"===n.style.display||this.parent.iframeSettings.enable&&!t.isNullOrUndefined(i)&&"block"===i.style.display)&&(this.parent.notify("updateToolbarItem",{targetItem:"SourceCode",updateItem:"Preview",baseToolbar:this.parent.getBaseToolbarObject()}),this.parent.disableToolbarItem(this.parent.toolbarSettings.items))}},n.prototype.addFixedTBarClass=function(){t.addClass([this.tbElement],["e-rte-tb-fixed"])},n.prototype.removeFixedTBarClass=function(){t.removeClass([this.tbElement],["e-rte-tb-fixed"])},n.prototype.showFixedTBar=function(){t.addClass([this.tbElement],["e-show"]),t.Browser.isIos&&t.addClass([this.tbElement],["e-tbar-ios-fixed"])},n.prototype.hideFixedTBar=function(){this.isToolbar?this.isToolbar=!1:t.removeClass([this.tbElement],["e-show","e-tbar-ios-fixed"])},n.prototype.updateItem=function(e){var n=this.tools[e.updateItem.toLocaleLowerCase()],i=y(v(this.tools[e.targetItem.toLocaleLowerCase()].subCommand),e.baseToolbar.toolbarObj.items)[0];if(t.isNullOrUndefined(i))this.addTBarItem(e,0);else{var o=this.parent.inlineMode.enable?"_quick_":"_toolbar_";e.baseToolbar.toolbarObj.items[i].id=this.parent.getID()+o+n.id,e.baseToolbar.toolbarObj.items[i].prefixIcon=n.icon,e.baseToolbar.toolbarObj.items[i].tooltipText=n.tooltip,e.baseToolbar.toolbarObj.items[i].subCommand=n.subCommand,e.baseToolbar.toolbarObj.dataBind()}},n.prototype.updateToolbarStatus=function(e){this.tbElement&&(!this.parent.inlineMode.enable||!u()&&t.Browser.isDevice)&&b({args:e,dropDownModule:this.dropDownModule,parent:this.parent,tbElements:t.selectAll("."+te,this.tbElement),tbItems:this.baseToolbar.toolbarObj.items},!!this.parent.inlineMode.enable,this.parent)},n.prototype.fullScreen=function(e){this.parent.fullScreenModule.showFullScreen(e)},n.prototype.hideScreen=function(e){this.parent.fullScreenModule.hideFullScreen(e)},n.prototype.getBaseToolbar=function(){return this.baseToolbar},n.prototype.addTBarItem=function(e,t){e.baseToolbar.toolbarObj.addItems([e.baseToolbar.getObject(e.updateItem,"toolbar")],t)},n.prototype.enableTBarItems=function(e,n,i,o){var r=y(v(n),e.toolbarObj.items);this.tbItems=t.selectAll("."+te,e.toolbarObj.element);for(var s=0;s<r.length;s++){var a=this.tbItems[r[s]];a&&e.toolbarObj.enableItems(a,i)}t.select(".e-rte-srctextarea",this.parent.element)||o||C(e,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus())},n.prototype.removeTBarItems=function(e){t.isNullOrUndefined(this.baseToolbar.toolbarObj)&&(this.baseToolbar=this.parent.getBaseToolbarObject());var n=y(v(e),this.baseToolbar.toolbarObj.items);this.tbItems=this.parent.inlineMode.enable?t.selectAll("."+te,this.baseToolbar.toolbarObj.element):t.selectAll("."+te,this.parent.element);for(var i=0;i<n.length;i++)this.baseToolbar.toolbarObj.removeItems(this.tbItems[n[i]])},n.prototype.getExpandTBarPopHeight=function(){var n=0;if(this.parent.toolbarSettings.type===e.ToolbarType.Expand&&this.tbElement.classList.contains("e-extended-toolbar")){var i=t.select(".e-toolbar-extended",this.tbElement);i&&this.tbElement.classList.contains("e-expand-open")||i&&i.classList.contains("e-popup-open")?(t.addClass([i],["e-visible"]),n+=i.offsetHeight,t.removeClass([i],["e-visible"])):t.removeClass([this.tbElement],["e-expand-open"])}return n},n.prototype.getToolbarHeight=function(){return this.tbElement.offsetHeight},n.prototype.getToolbarElement=function(){return t.select(".e-rte-toolbar",this.parent.element)},n.prototype.refreshToolbarOverflow=function(){this.baseToolbar.toolbarObj.refreshOverflow()},n.prototype.isToolbarDestroyed=function(){return this.baseToolbar.toolbarObj&&!this.baseToolbar.toolbarObj.isDestroyed},n.prototype.destroyToolbar=function(){if(this.isToolbarDestroyed()){this.parent.unWireScrollElementsEvents(),this.unWireEvents(),this.parent.notify("destroy-color-picker",{}),this.dropDownModule.destroyDropDowns(),this.baseToolbar.toolbarObj.destroy(),this.removeEventListener(),t.removeClass([this.parent.element],["e-rte-toolbar-enabled"]),t.removeClass([this.parent.element],["e-rte-tb-expand"]);var e=t.select(".e-toolbar-wrapper",this.parent.element),n=t.select(".e-rte-toolbar",this.parent.element);t.isNullOrUndefined(e)?t.isNullOrUndefined(n)||t.detach(n):t.detach(e)}},n.prototype.destroy=function(){this.isToolbarDestroyed()&&(this.destroyToolbar(),this.keyBoardModule&&this.keyBoardModule.destroy())},n.prototype.scrollHandler=function(e){this.parent.inlineMode.enable||this.parent.toolbarSettings.enableFloating&&this.getDOMVisibility(this.tbElement)&&this.toggleFloatClass(e.args)},n.prototype.getDOMVisibility=function(e){return!(!e.offsetParent&&0===e.offsetWidth&&0===e.offsetHeight)},n.prototype.mouseDownHandler=function(){t.Browser.isDevice&&this.parent.inlineMode.enable&&!u()&&this.showFixedTBar()},n.prototype.focusChangeHandler=function(){t.Browser.isDevice&&this.parent.inlineMode.enable&&!u()&&(this.isToolbar=!1,this.hideFixedTBar())},n.prototype.dropDownBeforeOpenHandler=function(){this.isToolbar=!0},n.prototype.tbFocusHandler=function(e){var n=document.activeElement,i=t.closest(n,".e-rte-toolbar");if(n===this.parent.getToolbarElement()||i===this.parent.getToolbarElement())for(var o=this.parent.getToolbarElement().querySelectorAll(".e-expended-nav"),r=0;r<o.length;r++)t.isNullOrUndefined(this.parent.getToolbarElement().querySelector(".e-insert-table-btn"))?o[r].setAttribute("tabindex","0"):o[r].setAttribute("tabindex","1")},n.prototype.tbKeydownHandler=function(e){(e.target.classList.contains("e-dropdown-btn")||e.target.getAttribute("id")===this.parent.getID()+"_toolbar_CreateTable")&&e.target.setAttribute("tabindex","0")},n.prototype.toolbarClickHandler=function(n){var i=t.closest(n.originalEvent.target,".e-hor-nav");i&&this.parent.toolbarSettings.type===e.ToolbarType.Expand&&!t.isNullOrUndefined(i)?i.classList.contains("e-nav-active")?(t.addClass([this.tbElement],["e-expand-open"]),this.parent.setContentHeight("toolbar",!0)):(t.removeClass([this.tbElement],["e-expand-open"]),this.parent.setContentHeight("toolbar",!1)):(t.Browser.isDevice||this.parent.inlineMode.enable)&&(this.isToolbar=!0),t.isNullOrUndefined(i)&&this.parent.toolbarSettings.type===e.ToolbarType.Expand&&t.removeClass([this.tbElement],["e-expand-open"])},n.prototype.wireEvents=function(){this.parent.inlineMode.enable&&u()||(t.EventHandler.add(this.tbElement,"focusin",this.tbFocusHandler,this),t.EventHandler.add(this.tbElement,"keydown",this.tbKeydownHandler,this))},n.prototype.unWireEvents=function(){t.EventHandler.remove(this.tbElement,"focusin",this.tbFocusHandler),t.EventHandler.remove(this.tbElement,"keydown",this.tbKeydownHandler)},n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.dropDownModule=new qe(this.parent,this.locator),this.toolbarActionModule=new We(this.parent),this.parent.on(F,this.renderToolbar,this),this.parent.on("scroll",this.scrollHandler,this),this.parent.on("bind-on-end",this.toolbarBindEvent,this),this.parent.on("toolbar-updated",this.updateToolbarStatus,this),this.parent.on(_,this.onPropertyChanged,this),this.parent.on("refresh-begin",this.onRefresh,this),this.parent.on(z,this.destroy,this),this.parent.on("enableFullScreen",this.fullScreen,this),this.parent.on("disableFullScreen",this.hideScreen,this),this.parent.on("updateToolbarItem",this.updateItem,this),this.parent.on("beforeDropDownOpen",this.dropDownBeforeOpenHandler,this),this.parent.on("expandPopupClick",this.parent.setContentHeight,this.parent),this.parent.on("focusChange",this.focusChangeHandler,this),this.parent.on(W,this.mouseDownHandler,this),this.parent.on("sourceCodeMouseDown",this.mouseDownHandler,this),this.parent.inlineMode.enable||u()||this.parent.on("toolbarClick",this.toolbarClickHandler,this))},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(F,this.renderToolbar),this.parent.off("scroll",this.scrollHandler),this.parent.off("bind-on-end",this.toolbarBindEvent),this.parent.off("toolbar-updated",this.updateToolbarStatus),this.parent.off(_,this.onPropertyChanged),this.parent.off("refresh-begin",this.onRefresh),this.parent.off(z,this.destroy),this.parent.off("enableFullScreen",this.parent.fullScreenModule.showFullScreen),this.parent.off("disableFullScreen",this.parent.fullScreenModule.hideFullScreen),this.parent.off("updateToolbarItem",this.updateItem),this.parent.off("beforeDropDownOpen",this.dropDownBeforeOpenHandler),this.parent.off("expandPopupClick",this.parent.setContentHeight),this.parent.off("focusChange",this.focusChangeHandler),this.parent.off(W,this.mouseDownHandler),this.parent.off("sourceCodeMouseDown",this.mouseDownHandler),this.parent.inlineMode.enable||u()||this.parent.off("toolbarClick",this.toolbarClickHandler))},n.prototype.onRefresh=function(){this.refreshToolbarOverflow(),this.parent.setContentHeight("",!0)},n.prototype.onPropertyChanged=function(e){if(!t.isNullOrUndefined(e.newProp.inlineMode))for(var n=0,i=Object.keys(e.newProp.inlineMode);n<i.length;n++)switch(i[n]){case"enable":this.refreshToolbar()}e.module===this.getModuleName()&&this.refreshToolbar()},n.prototype.refreshToolbar=function(){t.isNullOrUndefined(this.baseToolbar.toolbarObj)&&(this.baseToolbar=this.parent.getBaseToolbarObject());var e=t.select(".e-toolbar-wrapper",this.parent.element);(t.select(".e-rte-toolbar",this.parent.element)||e)&&this.destroyToolbar(),this.parent.toolbarSettings.enable&&(this.addEventListener(),this.renderToolbar(),this.parent.wireScrollElementsEvents(),t.select(".e-rte-srctextarea",this.parent.element)||C(this.baseToolbar,this.parent.formatter.editorManager.undoRedoManager.getUndoStatus()),this.parent.notify("dynamicModule",{}))},n.prototype.getModuleName=function(){return"toolbar"},n}(),Ke=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Xe=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Ye={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,space:32,escape:27,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,semicolon:186,plus:187,comma:188,minus:189,dot:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222,"]":221,"[":219,"=":187},Je=function(e){function n(t,n){var o=e.call(this,n,t)||this;return o.keyPressHandler=function(e){for(var t=e.altKey,n=e.ctrlKey,r=e.shiftKey,s=e.metaKey,a=e.which,l=0,d=Object.keys(o.keyConfigs);l<d.length;l++)for(var c=d[l],p=0,h=o.keyConfigs[c].split(",");p<h.length;p++){var u=h[p],m=i.getKeyConfigData(u.trim());t!==m.altKey||n!==m.ctrlKey&&!s||r!==m.shiftKey||a!==m.keyCode||(e.action=c)}o.keyAction&&o.keyAction(e)},o.bind(),o}Ke(n,e),i=n,n.prototype.destroy=function(){this.unwireEvents(),e.prototype.destroy.call(this)},n.prototype.onPropertyChanged=function(e,t){},n.prototype.bind=function(){this.wireEvents()},n.prototype.getModuleName=function(){return"keyboard"},n.prototype.wireEvents=function(){this.element.addEventListener(this.eventName,this.keyPressHandler)},n.prototype.unwireEvents=function(){this.element.removeEventListener(this.eventName,this.keyPressHandler)},n.getKeyConfigData=function(e){if(e in this.configCache)return this.configCache[e];var t=e.toLowerCase().split("+"),n={altKey:-1!==t.indexOf("alt"),ctrlKey:-1!==t.indexOf("ctrl"),shiftKey:-1!==t.indexOf("shift"),keyCode:null};return t[t.length-1].length>1&&Number(t[t.length-1])?n.keyCode=Number(t[t.length-1]):n.keyCode=i.getKeyCode(t[t.length-1]),i.configCache[e]=n,n},n.getKeyCode=function(e){return Ye[e]||e.toUpperCase().charCodeAt(0)};var i;return n.configCache={},Xe([t.Property({})],n.prototype,"keyConfigs",void 0),Xe([t.Property("keyup")],n.prototype,"eventName",void 0),Xe([t.Event()],n.prototype,"keyAction",void 0),n=i=Xe([t.NotifyPropertyChanges],n)}(t.Base),$e=function(){function n(e,n){this.tools={},this.parent=e,this.locator=n,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener(),this.parent.toolbarSettings&&Object.keys(this.parent.toolbarSettings.itemConfigs).length>0?t.extend(this.tools,ce,N(this.parent.toolbarSettings.itemConfigs),!0):this.tools=ce}return n.prototype.initializeInstance=function(){this.toolbarRenderer=this.renderFactory.getRenderer(e.RenderType.Toolbar)},n.prototype.renderColorPickerInput=function(e){var n=this;this.initializeInstance();var i,o,r=e.containerType,s=e.container;de.forEach(function(a){if(-1!==c(a,e.items))switch(a){case"fontcolor":i=n.parent.getID()+"_"+r+"_FontColor_Target";var l=n.parent.createElement("input");l.id=i,l.classList.add("e-rte-fontcolor-element"),document.body.appendChild(l),o={cssClass:n.tools[a.toLocaleLowerCase()].icon+" e-rte-elements e-icons",value:n.tools[a.toLocaleLowerCase()].value,command:n.tools[a.toLocaleLowerCase()].command,subCommand:n.tools[a.toLocaleLowerCase()].subCommand,element:t.select("#"+n.parent.getID()+"_"+r+"_FontColor",s),target:i},n.fontColorPicker=n.toolbarRenderer.renderColorPicker(o,"fontcolor"),n.fontColorDropDown=n.toolbarRenderer.renderColorPickerDropDown(o,"fontcolor",n.fontColorPicker);break;case"backgroundcolor":i=n.parent.getID()+"_"+r+"_BackgroundColor_Target";var d=n.parent.createElement("input");d.id=i,d.classList.add("e-rte-backgroundcolor-element"),document.body.appendChild(d),o={cssClass:n.tools[a.toLocaleLowerCase()].icon+" e-rte-elements e-icons",value:n.tools[a.toLocaleLowerCase()].value,command:n.tools[a.toLocaleLowerCase()].command,subCommand:n.tools[a.toLocaleLowerCase()].subCommand,element:t.select("#"+n.parent.getID()+"_"+r+"_BackgroundColor",s),target:i},n.backgroundColorPicker=n.toolbarRenderer.renderColorPicker(o,"backgroundcolor"),n.backgroundColorDropDown=n.toolbarRenderer.renderColorPickerDropDown(o,"backgroundcolor",n.backgroundColorPicker)}})},n.prototype.destroy=function(){this.removeEventListener(),this.destroyColorPicker()},n.prototype.destroyColorPicker=function(){if(this.fontColorPicker&&!this.fontColorPicker.isDestroyed&&this.fontColorPicker.destroy(),this.backgroundColorPicker&&!this.backgroundColorPicker.isDestroyed&&this.backgroundColorPicker.destroy(),this.fontColorDropDown&&!this.fontColorDropDown.isDestroyed&&((e=this.fontColorDropDown.element.querySelector(".e-rte-color-content"))&&t.detach(e),this.fontColorDropDown.destroy()),this.backgroundColorDropDown&&!this.backgroundColorDropDown.isDestroyed){var e=this.backgroundColorDropDown.element.querySelector(".e-rte-color-content");e&&t.detach(e),this.backgroundColorDropDown.destroy()}},n.prototype.setRtl=function(e){this.fontColorPicker&&(this.fontColorPicker.setProperties({enableRtl:e.enableRtl}),this.fontColorDropDown.setProperties({enableRtl:e.enableRtl})),this.backgroundColorPicker&&(this.backgroundColorPicker.setProperties({enableRtl:e.enableRtl}),this.backgroundColorDropDown.setProperties({enableRtl:e.enableRtl}))},n.prototype.addEventListener=function(){this.parent.on("toolbarRenderComplete",this.renderColorPickerInput,this),this.parent.on(K,this.setRtl,this),this.parent.on(z,this.destroy,this),this.parent.on("destroy-color-picker",this.destroyColorPicker,this),this.parent.on(_,this.onPropertyChanged,this)},n.prototype.onPropertyChanged=function(e){for(var t=e.newProp,n=0,i=Object.keys(t);n<i.length;n++)switch(i[n]){case"fontColor":if(this.fontColorPicker)for(var o=0,r=Object.keys(t.fontColor);o<r.length;o++)switch(r[o]){case"default":this.fontColorPicker.setProperties({value:t.fontColor.default}),this.fontColorDropDown.element.querySelector("."+this.tools.fontcolor.icon).style.borderBottomColor=t.fontColor.default;break;case"mode":this.fontColorPicker.setProperties({mode:t.fontColor.mode});break;case"columns":this.fontColorPicker.setProperties({columns:t.fontColor.columns});break;case"colorCode":this.fontColorPicker.setProperties({presetColors:t.fontColor.colorCode});break;case"modeSwitcher":this.fontColorPicker.setProperties({modeSwitcher:t.fontColor.modeSwitcher})}break;case"backgroundColor":if(this.backgroundColorPicker)for(var s=0,a=Object.keys(t.backgroundColor);s<a.length;s++)switch(a[s]){case"default":this.backgroundColorPicker.setProperties({value:t.backgroundColor.default}),this.backgroundColorDropDown.element.querySelector("."+this.tools.backgroundcolor.icon).style.borderBottomColor=t.backgroundColor.default;break;case"mode":this.backgroundColorPicker.setProperties({mode:t.backgroundColor.mode});break;case"columns":this.backgroundColorPicker.setProperties({columns:t.backgroundColor.columns});break;case"colorCode":this.backgroundColorPicker.setProperties({presetColors:t.backgroundColor.colorCode});break;case"modeSwitcher":this.backgroundColorPicker.setProperties({modeSwitcher:t.backgroundColor.modeSwitcher})}}},n.prototype.removeEventListener=function(){this.parent.off("toolbarRenderComplete",this.renderColorPickerInput),this.parent.off(z,this.destroy),this.parent.off(K,this.setRtl),this.parent.off("destroy-color-picker",this.destroyColorPicker),this.parent.off(_,this.onPropertyChanged)},n}(),Ze=function(){function n(t,n){this.parent=t,this.locator=n,this.isDOMElement=!1,this.renderFactory=this.locator.getService("rendererFactory"),this.contentRenderer=this.renderFactory.getRenderer(e.RenderType.Content),this.popupRenderer=this.renderFactory.getRenderer(e.RenderType.Popup),this.dropDownButtons=new qe(this.parent,this.locator),this.colorPickerObj=new $e(this.parent,this.locator)}return n.prototype.appendPopupContent=function(){this.toolbarElement=this.parent.createElement("div",{className:J}),this.element.appendChild(this.toolbarElement)},n.prototype.render=function(e){var n;n="Image"===e.popupType?"e-rte-image-popup":"Inline"===e.popupType?"e-rte-inline-popup":"";var i=t.getUniqueID(e.popupType+"_Quick_Popup");this.stringItems=e.toolbarItems,this.element=this.parent.createElement("div",{id:i,className:n+" e-rte-elements"}),this.element.setAttribute("aria-owns",this.parent.getID()),this.appendPopupContent(),this.createToolbar(e.toolbarItems,e.mode),this.popupRenderer.renderPopup(this),this.addEventListener()},n.prototype.createToolbar=function(e,t){this.quickTBarObj=new _e(this.parent,this.locator),this.quickTBarObj.render({container:"quick",target:this.toolbarElement,items:e,mode:t}),this.quickTBarObj.toolbarObj.refresh()},n.prototype.setPosition=function(e){var n,i,o=t.closest(e.target,".e-img-caption"),r=t.isNullOrUndefined(o)?e.target:o;t.addClass([this.toolbarElement],["e-remove-white-space"]);var s=r.offsetTop,a=window.pageYOffset+e.parentData.top;i=s-e.editTop>e.popHeight?a+e.tBarElementHeight+(s-e.editTop)-e.popHeight-5:e.editTop+e.editHeight-(s+r.offsetHeight)>e.popHeight?a+e.tBarElementHeight+(s-e.editTop)+r.offsetHeight+5:e.y,n=r.offsetWidth>e.popWidth?r.offsetWidth/2-e.popWidth/2+e.parentData.left+r.offsetLeft:e.parentData.left+r.offsetLeft,this.popupObj.position.X=n+e.popWidth>e.parentData.right?e.parentData.right-e.popWidth:n,this.popupObj.position.Y=i>=0?i:e.y+5,this.popupObj.dataBind(),t.removeClass([this.toolbarElement],["e-remove-white-space"])},n.prototype.checkCollision=function(e,t,n){var i,r,s=e.parentData.top,a=e.windowY+s+e.tBarElementHeight,l=[];l="document"===t?o.isCollide(e.popup):o.isCollide(e.popup,e.parentElement);for(var d=0;d<l.length;d++)switch(l[d]){case"top":r="document"===t?e.windowY:window.pageYOffset+s+e.tBarElementHeight;break;case"bottom":r="document"===t?"inline"===n?e.y-e.popHeight-10:e.windowHeight-(s+e.tBarElementHeight)>e.popHeight?a-e.windowHeight>e.popHeight?a+(e.windowHeight-s)-e.popHeight:a:e.windowY+(s+e.tBarElementHeight):"IMG"!==e.target.tagName?e.parentData.bottom+window.pageYOffset-e.popHeight-10:e.parentData.bottom+window.pageYOffset-e.popHeight-5;break;case"right":i="inline"===n?window.pageXOffset+(e.windowWidth-(e.popWidth+e.bodyRightSpace+10)):e.x-e.popWidth;break;case"left":i="inline"===n?0:e.parentData.left}this.popupObj.position.X=i||this.popupObj.position.X,this.popupObj.position.Y=r||this.popupObj.position.Y,this.popupObj.dataBind()},n.prototype.showPopup=function(e,n,i){var o=this,r=t.isBlazor()?{cancel:!1,targetElement:i}:{popup:this.popupObj,cancel:!1,targetElement:i};this.parent.trigger("beforeQuickToolbarOpen",r,function(r){if(!r.cancel){var s=void 0,a=void 0,l=window.getComputedStyle(document.body),d=parseFloat(l.marginRight.split("px")[0])+parseFloat(l.paddingRight.split("px")[0]),c=window.innerHeight,p=window.innerWidth,h=o.parent.element,m=!t.isNullOrUndefined(o.parent.getToolbar()),g=m&&o.parent.toolbarModule.getToolbarHeight(),f=m&&o.parent.toolbarModule.getExpandTBarPopHeight(),b=m?g+f:0;if(t.addClass([o.element],["e-hide"]),t.Browser.isDevice&&!u()&&t.addClass([o.parent.getToolbar()],["e-hide"]),o.parent.iframeSettings.enable)s=(v=o.contentRenderer.getPanel().contentWindow).pageYOffset,a=v.innerHeight;else{var v=t.closest(i,".e-rte-content");s=v?v.scrollTop:0,a=v?v.offsetHeight:0}o.parent.inlineMode.enable||t.closest(i,"table")||(o.parent.disableToolbarItem(o.parent.toolbarSettings.items),o.parent.enableToolbarItem(["Undo","Redo"])),t.append([o.element],document.body),o.popupObj.position.X=e+20,o.popupObj.position.Y=n+20,o.popupObj.dataBind(),o.popupObj.element.classList.add("e-popup-open"),o.dropDownButtons.renderDropDowns({container:o.toolbarElement,containerType:"quick",items:o.stringItems}),o.colorPickerObj.renderColorPickerInput({container:o.toolbarElement,containerType:"quick",items:o.stringItems});var y={x:e,y:n,target:i,editTop:s,editHeight:a,popup:o.popupObj.element,popHeight:o.popupObj.element.offsetHeight,popWidth:o.popupObj.element.offsetWidth,parentElement:h,bodyRightSpace:d,windowY:window.pageYOffset,windowHeight:c,windowWidth:p,parentData:h.getBoundingClientRect(),tBarElementHeight:b};"IMG"===i.tagName&&o.setPosition(y),o.parent.inlineMode.enable||o.checkCollision(y,"parent",""),o.checkCollision(y,"document",o.parent.inlineMode.enable?"inline":""),o.popupObj.element.classList.remove("e-popup-open"),t.removeClass([o.element],["e-hide"]),o.popupObj.show({name:"ZoomIn",duration:t.Browser.isIE?250:400}),t.setStyleAttribute(o.element,{maxWidth:window.outerWidth+"px"}),t.addClass([o.element],["e-rte-pop"]),o.isDOMElement=!0}})},n.prototype.hidePopup=function(){var e=this.parent.sourceCodeModule.getViewPanel();t.Browser.isDevice&&!u()&&t.removeClass([this.parent.getToolbar()],["e-hide"]),t.isNullOrUndefined(this.parent.getToolbar())||this.parent.inlineMode.enable||(t.isNullOrUndefined(e)||"none"===e.style.display)&&this.parent.enableToolbarItem(this.parent.toolbarSettings.items),this.removeEleFromDOM(),this.isDOMElement=!1},n.prototype.addQTBarItem=function(e,t){this.quickTBarObj.toolbarObj.addItems(this.quickTBarObj.getItems(e,"toolbar"),t)},n.prototype.removeQTBarItem=function(e){this.quickTBarObj.toolbarObj.removeItems(e)},n.prototype.removeEleFromDOM=function(){var e=this.popupObj.element;if(this.isDOMElement){this.dropDownButtons.destroyDropDowns(),this.colorPickerObj.destroyColorPicker(),t.removeClass([this.element],["e-rte-pop"]),t.detach(e);var n=t.isBlazor()?{element:this.popupObj.element}:this.popupObj;this.parent.trigger("quickToolbarClose",n)}},n.prototype.updateStatus=function(e){b({args:e,dropDownModule:this.dropDownButtons,parent:this.parent,tbElements:t.selectAll("."+te,this.element),tbItems:this.quickTBarObj.toolbarObj.items},!0,this.parent),t.select(".e-rte-srctextarea",this.parent.element)||C(this.parent.getBaseToolbarObject(),this.parent.formatter.editorManager.undoRedoManager.getUndoStatus())},n.prototype.destroy=function(){this.popupObj&&!this.popupObj.isDestroyed&&(this.popupObj.destroy(),this.removeEleFromDOM()),this.removeEventListener()},n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(z,this.destroy,this),this.parent.on(_,this.onPropertyChanged,this),this.parent.inlineMode.enable&&this.parent.on("toolbar-updated",this.updateStatus,this))},n.prototype.onPropertyChanged=function(e){if(!t.isNullOrUndefined(e.newProp.inlineMode))for(var n=0,i=Object.keys(e.newProp.inlineMode);n<i.length;n++)switch(i[n]){case"enable":e.newProp.inlineMode.enable?this.parent.on("toolbar-updated",this.updateStatus,this):this.parent.off("toolbar-updated",this.updateStatus)}},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(z,this.destroy),this.parent.off(_,this.onPropertyChanged),this.parent.inlineMode.enable&&this.parent.off("toolbar-updated",this.updateStatus))},n}(),et=function(){function e(e){this.parent=e}return e.prototype.quickToolbarOpen=function(){var e=t.isBlazor()?{element:this.popupObj.element}:this.popupObj;this.parent.trigger("quickToolbarOpen",e)},e.prototype.renderPopup=function(e){this.setPanel(e.element),this.renderPanel(),e.popupObj=new o.Popup(e.element,{targetType:"relative",relateTo:this.parent.element,open:this.quickToolbarOpen.bind(this)}),this.popupObj=e.popupObj,e.popupObj.hide()},e.prototype.renderPanel=function(){this.getPanel().classList.add("e-rte-quick-popup")},e.prototype.getPanel=function(){return this.popupPanel},e.prototype.setPanel=function(e){this.popupPanel=e},e}(),tt=function(){function n(t,n){this.parent=t,this.locator=n,this.renderFactory=this.locator.getService("rendererFactory"),this.renderFactory.addRenderer(e.RenderType.Popup,new et(this.parent)),this.addEventListener()}return n.prototype.formatItems=function(e){var t=[];return e.forEach(function(e){if("string"==typeof e)switch(e.toLocaleLowerCase()){case"open":t.push("openLink");break;case"edit":t.push("editLink");break;case"unlink":t.push("removeLink");break;default:t.push(e)}else t.push(e)}),t},n.prototype.getQTBarOptions=function(e,t,n,i){return{popupType:e,toolbarItems:n,mode:t,renderType:i}},n.prototype.createQTBar=function(e,t,n,i){if(n.length<1)return null;var o=new Ze(this.parent,this.locator);return o.render(this.getQTBarOptions(e,t,this.formatItems(n),i)),o},n.prototype.initializeQuickToolbars=function(){this.parent.quickToolbarModule=this,this.contentRenderer=this.renderFactory.getRenderer(e.RenderType.Content),this.parent.inlineMode.enable&&this.parent.inlineMode.onSelection&&u()&&t.EventHandler.add(this.contentRenderer.getDocument(),"selectionchange",this.selectionChangeHandler,this)},n.prototype.onMouseDown=function(e){this.parent.isBlur=!1,this.parent.isRTE=!0},n.prototype.renderQuickToolbars=function(){this.linkQTBar||this.imageQTBar||this.textQTBar||this.tableQTBar||(this.linkQTBar=this.createQTBar("Link","Scrollable",this.parent.quickToolbarSettings.link,e.RenderType.LinkToolbar),this.renderFactory.addRenderer(e.RenderType.LinkToolbar,this.linkQTBar),this.textQTBar=this.createQTBar("Text","Scrollable",this.parent.quickToolbarSettings.text,e.RenderType.TextToolbar),this.renderFactory.addRenderer(e.RenderType.TextToolbar,this.textQTBar),this.imageQTBar=this.createQTBar("Image","MultiRow",this.parent.quickToolbarSettings.image,e.RenderType.ImageToolbar),this.renderFactory.addRenderer(e.RenderType.ImageToolbar,this.imageQTBar),this.tableQTBar=this.createQTBar("Table","MultiRow",this.parent.quickToolbarSettings.table,e.RenderType.TableToolbar),this.renderFactory.addRenderer(e.RenderType.TableToolbar,this.tableQTBar),this.linkQTBar&&t.EventHandler.add(this.linkQTBar.element,"mousedown",this.onMouseDown,this),this.imageQTBar&&t.EventHandler.add(this.imageQTBar.element,"mousedown",this.onMouseDown,this),this.textQTBar&&t.EventHandler.add(this.textQTBar.element,"mousedown",this.onMouseDown,this),this.tableQTBar&&t.EventHandler.add(this.tableQTBar.element,"mousedown",this.onMouseDown,this))},n.prototype.renderInlineQuickToolbar=function(){!this.parent.inlineMode.enable||t.Browser.isDevice&&!u()||(t.addClass([this.parent.element],["e-rte-inline"]),this.inlineQTBar=this.createQTBar("Inline","MultiRow",this.parent.toolbarSettings.items,e.RenderType.InlineToolbar),this.renderFactory.addRenderer(e.RenderType.InlineToolbar,this.inlineQTBar),t.EventHandler.add(this.inlineQTBar.element,"mousedown",this.onMouseDown,this))},n.prototype.showInlineQTBar=function(e,t,n){this.parent.readonly||this.inlineQTBar.showPopup(e,t,n)},n.prototype.hideInlineQTBar=function(){this.inlineQTBar&&!p(this.inlineQTBar.element,"e-popup-close")&&this.inlineQTBar.hidePopup()},n.prototype.hideQuickToolbars=function(){this.linkQTBar&&!p(this.linkQTBar.element,"e-popup-close")&&document.body.contains(this.linkQTBar.element)&&this.linkQTBar.hidePopup(),this.textQTBar&&!p(this.textQTBar.element,"e-popup-close")&&document.body.contains(this.textQTBar.element)&&this.textQTBar.hidePopup(),this.imageQTBar&&!p(this.imageQTBar.element,"e-popup-close")&&document.body.contains(this.imageQTBar.element)&&this.imageQTBar.hidePopup(),this.tableQTBar&&!p(this.tableQTBar.element,"e-popup-close")&&document.body.contains(this.tableQTBar.element)&&this.tableQTBar.hidePopup(),!this.parent.inlineMode.enable||t.Browser.isDevice&&!u()||this.hideInlineQTBar()},n.prototype.deBounce=function(e,t,n){var i=this;clearTimeout(this.deBouncer),this.deBouncer=window.setTimeout(function(){i.showInlineQTBar(e,t,n)},1e3)},n.prototype.mouseUpHandler=function(e){if(this.parent.inlineMode.enable&&(!t.Browser.isDevice||u())){var n=e.args.touches?e.args.changedTouches[0]:e.args,i=this.parent.getRange(),o=e.args.target;if(t.isNullOrUndefined(t.select(".e-rte-inline-popup",document.body))){if(u()&&e.touchData&&e.touchData.prevClientX!==e.touchData.clientX&&e.touchData.prevClientY!==e.touchData.clientY)return;this.hideInlineQTBar();var r=this.parent.element.getBoundingClientRect().left;if(this.offsetX=this.parent.iframeSettings.enable?window.pageXOffset+r+n.clientX:n.pageX,this.offsetY=g(n,this.parent.element,this.parent.iframeSettings.enable),"TEXTAREA"===o.nodeName)this.showInlineQTBar(this.offsetX,this.offsetY,o);else{var s=t.closest(o,"a");if(!("IMG"===(o=s||o).tagName||"A"===o.tagName||t.closest(o,"td,th")&&i.collapsed)){if(this.parent.inlineMode.onSelection&&i.collapsed)return;this.target=o,this.showInlineQTBar(this.offsetX,this.offsetY,o)}}}}},n.prototype.keyDownHandler=function(){!this.parent.inlineMode.enable||t.Browser.isDevice&&!u()||t.isNullOrUndefined(t.select(".e-rte-inline-popup",document))||this.hideInlineQTBar()},n.prototype.inlineQTBarMouseDownHandler=function(){!this.parent.inlineMode.enable||t.Browser.isDevice&&!u()||t.isNullOrUndefined(t.select(".e-rte-inline-popup",document))||this.hideInlineQTBar()},n.prototype.keyUpHandler=function(e){if(this.parent.inlineMode.enable&&!t.Browser.isDevice){if(this.parent.inlineMode.onSelection)return;var n=e.args;this.deBounce(this.offsetX,this.offsetY,n.target)}},n.prototype.selectionChangeHandler=function(e){var t=this;clearTimeout(this.deBouncer),this.deBouncer=window.setTimeout(function(){t.onSelectionChange(e)},1e3)},n.prototype.onSelectionChange=function(e){t.isNullOrUndefined(t.select(".e-rte-inline-popup",document.body))&&(this.contentRenderer.getDocument().getSelection().isCollapsed||this.mouseUpHandler({args:e}))},n.prototype.getInlineBaseToolbar=function(){return this.inlineQTBar&&this.inlineQTBar.quickTBarObj},n.prototype.destroy=function(){this.linkQTBar&&(t.EventHandler.remove(this.linkQTBar.element,"mousedown",this.onMouseDown),this.linkQTBar.destroy()),this.textQTBar&&(t.EventHandler.remove(this.textQTBar.element,"mousedown",this.onMouseDown),this.textQTBar.destroy()),this.imageQTBar&&(t.EventHandler.remove(this.imageQTBar.element,"mousedown",this.onMouseDown),this.imageQTBar.destroy()),this.tableQTBar&&(t.EventHandler.remove(this.tableQTBar.element,"mousedown",this.onMouseDown),this.tableQTBar.destroy()),this.inlineQTBar&&(t.EventHandler.remove(this.inlineQTBar.element,"mousedown",this.onMouseDown),u()&&t.EventHandler.remove(document,"selectionchange",this.selectionChangeHandler),this.inlineQTBar.destroy()),this.removeEventListener()},n.prototype.wireInlineQTBarEvents=function(){this.parent.on("mouseUp",this.mouseUpHandler,this),this.parent.on(W,this.inlineQTBarMouseDownHandler,this),this.parent.on(Q,this.keyDownHandler,this),this.parent.on(q,this.keyUpHandler,this),this.parent.on("sourceCodeMouseDown",this.mouseUpHandler,this),this.parent.on("renderInlineToolbar",this.renderInlineQuickToolbar,this)},n.prototype.unWireInlineQTBarEvents=function(){this.parent.off("mouseUp",this.mouseUpHandler),this.parent.off(W,this.inlineQTBarMouseDownHandler),this.parent.off(Q,this.keyDownHandler),this.parent.off(q,this.keyUpHandler),this.parent.off("sourceCodeMouseDown",this.mouseUpHandler),this.parent.off("renderInlineToolbar",this.renderInlineQuickToolbar)},n.prototype.toolbarUpdated=function(e){this.linkQTBar&&!p(this.linkQTBar.element,"e-popup-close")&&this.linkQTBar.hidePopup(),this.imageQTBar&&!p(this.imageQTBar.element,"e-popup-close")&&this.imageQTBar.hidePopup(),this.tableQTBar&&!p(this.tableQTBar.element,"e-popup-close")&&this.tableQTBar.hidePopup()},n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(F,this.initializeQuickToolbars,this),this.parent.on(W,this.renderQuickToolbars,this),this.parent.on("toolbar-updated",this.toolbarUpdated,this),this.parent.on("drop",this.renderQuickToolbars,this),this.wireInlineQTBarEvents(),this.parent.on(_,this.onPropertyChanged,this),"hide"===this.parent.quickToolbarSettings.actionOnScroll&&(this.parent.on("scroll",this.hideQuickToolbars,this),this.parent.on("contentscroll",this.hideQuickToolbars,this)),this.parent.on("focusChange",this.hideQuickToolbars,this),this.parent.on("iframe-click",this.onIframeMouseDown,this),this.parent.on(z,this.destroy,this),this.parent.on(Q,this.onKeyDown,this),this.parent.on(K,this.setRtl,this))},n.prototype.onKeyDown=function(e){var t=e.args;8!==t.which&&46!==t.which||this.imageQTBar&&!p(this.imageQTBar.element,"e-popup-close")&&this.imageQTBar.hidePopup()},n.prototype.onIframeMouseDown=function(){this.hideQuickToolbars(),this.hideInlineQTBar()},n.prototype.setRtl=function(e){this.inlineQTBar&&this.inlineQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.imageQTBar&&this.imageQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl}),this.linkQTBar&&this.imageQTBar.quickTBarObj.toolbarObj.setProperties({enableRtl:e.enableRtl})},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(F,this.initializeQuickToolbars),this.parent.off(W,this.renderQuickToolbars),this.parent.off("toolbar-updated",this.toolbarUpdated),this.parent.off("drop",this.renderQuickToolbars),this.unWireInlineQTBarEvents(),this.parent.off(_,this.onPropertyChanged),"hide"===this.parent.quickToolbarSettings.actionOnScroll&&(this.parent.off("scroll",this.hideQuickToolbars),this.parent.off("contentscroll",this.hideQuickToolbars)),this.parent.off("focusChange",this.hideQuickToolbars),this.parent.off(z,this.destroy),this.parent.off("iframe-click",this.onIframeMouseDown),this.parent.off(Q,this.onKeyDown),this.parent.off(K,this.setRtl))},n.prototype.onPropertyChanged=function(e){if(!t.isNullOrUndefined(e.newProp.quickToolbarSettings))for(var n=0,i=Object.keys(e.newProp.quickToolbarSettings);n<i.length;n++)switch(i[n]){case"actionOnScroll":"none"===e.newProp.quickToolbarSettings.actionOnScroll?(this.parent.off("scroll",this.hideQuickToolbars),this.parent.off("contentscroll",this.hideQuickToolbars)):(this.parent.on("scroll",this.hideQuickToolbars,this),this.parent.on("contentscroll",this.hideQuickToolbars,this))}e.module===this.getModuleName()&&(this.inlineQTBar&&(t.removeClass([this.parent.element],["e-rte-inline"]),this.unWireInlineQTBarEvents(),this.hideInlineQTBar()),!this.parent.inlineMode.enable||t.Browser.isDevice&&!u()||(t.addClass([this.parent.element],["e-rte-inline"]),this.wireInlineQTBarEvents()))},n.prototype.getModuleName=function(){return"quickToolbar"},n}(),nt=function(){function n(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return n.prototype.initializeInstance=function(){this.contentRenderer=this.renderFactory.getRenderer(e.RenderType.Content),this.editPanel=this.contentRenderer.getEditPanel(),this.addEventListener()},n.prototype.renderCount=function(){this.initializeInstance(),this.element=this.parent.createElement("span",{className:oe}),this.contentRenderer.getPanel().parentElement.appendChild(this.element),this.appendCount(),-1!==this.parent.maxLength&&this.charCountBackground(this.htmlLength)},n.prototype.appendCount=function(){var e="Markdown"===this.parent.editorMode?this.editPanel.value.trim():this.editPanel.textContent.trim();this.htmlLength=e.length;var t=-1===this.parent.maxLength?this.htmlLength:this.htmlLength+" / "+this.parent.maxLength;this.element.innerHTML=t},n.prototype.charCountBackground=function(e){var t=e/this.parent.maxLength*100;t<85?(this.element.classList.remove("e-warning"),this.element.classList.remove("e-error")):t>85&&t<=90?(this.element.classList.remove("e-error"),this.element.classList.add("e-warning")):t>90&&(this.element.classList.remove("e-warning"),this.element.classList.add("e-error"))},n.prototype.refresh=function(){t.isNullOrUndefined(this.editPanel)||(this.appendCount(),-1!==this.parent.maxLength&&this.charCountBackground(this.htmlLength))},n.prototype.destroy=function(){this.element&&!t.isNullOrUndefined(this.parent.element.querySelector("."+oe))&&t.detach(this.element),this.removeEventListener()},n.prototype.toggle=function(e){this.element.style.display="viewSource"===e.member?"none":"block"},n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(F,this.renderCount,this),this.parent.on(q,this.refresh,this),this.parent.on("count",this.refresh,this),this.parent.on("refresh-begin",this.refresh,this),this.parent.on(W,this.refresh,this),this.parent.on(z,this.destroy,this),this.parent.on("sourceCode",this.toggle,this),this.parent.on("updateSource",this.toggle,this))},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(F,this.renderCount),this.parent.off(q,this.refresh),this.parent.off("refresh-begin",this.refresh),this.parent.off("count",this.refresh),this.parent.off(W,this.refresh),this.parent.off(z,this.destroy),this.parent.off("sourceCode",this.toggle),this.parent.off("updateSource",this.toggle))},n.prototype.getModuleName=function(){return"count"},n}(),it=function(){function e(){}return e.prototype.getLineNumber=function(e,t){return e.value.substr(0,t).split("\n").length},e.prototype.getSelectedText=function(e){var t=e.selectionStart,n=e.selectionEnd;return e.value.substring(t,n)},e.prototype.getAllParents=function(e){return e.split("\n")},e.prototype.getSelectedLine=function(e){return this.getAllParents(e.value)[this.getLineNumber(e,e.selectionStart)-1]},e.prototype.getLine=function(e,t){return this.getAllParents(e.value)[t]},e.prototype.getSelectedParentPoints=function(e){var t=this.getAllParents(e.value),n=this.getLineNumber(e,e.selectionStart),i=this.getLineNumber(e,e.selectionEnd),o=this.getSelectedText(e).split("\n"),r=[],s=t[n-1],a=t.slice(0,n-1).join("").length,l={};if(l.line=n-1,l.start=a+l.line,l.end=""!==s?l.start+s.length+1:l.start+s.length,l.text=s,r.push(l),o.length>1){for(var d=1;d<o.length-1;d++){var c={};c.line=r[d-1].line+1,c.start=(o[d],r[d-1].end),c.end=c.start+o[d].length+1,c.text=o[d],r.push(c)}var p={};p.line=r[r.length-1].line+1,p.start=r[r.length-1].end,p.end=p.start+t[i-1].length+1,p.text=t[i-1],r.push(p)}return r},e.prototype.setSelection=function(e,t,n){e.setSelectionRange(t,n),e.focus()},e.prototype.save=function(e,t){this.selectionStart=e,this.selectionEnd=t},e.prototype.restore=function(e){this.setSelection(e,this.selectionStart,this.selectionEnd)},e.prototype.isStartWith=function(e,t){var n=!1;return e&&(n=(e.trim()===t.trim()?new RegExp("^("+this.replaceSpecialChar(t.trim())+")","gim"):new RegExp("^("+this.replaceSpecialChar(t)+")","gim")).test(e.trim())),n},e.prototype.replaceSpecialChar=function(e){return e.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/g,"\\$&")},e.prototype.isClear=function(e,t){for(var n=0;n<e.length;n++)if(new RegExp(t,"gim").test(e[n].text))return!0;return!1},e.prototype.getSelectedInlinePoints=function(e){return{start:e.selectionStart,end:e.selectionEnd,text:this.getSelectedText(e)}},e}(),ot=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","strike","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],rt=function(){function e(e){this.toolbarStatus=this.prevToolbarStatus=U(),this.selection=new it,this.parent=e,this.element=this.parent.contentModule.getEditPanel(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("toolbar-refresh",this.onRefreshHandler,this),this.parent.on(z,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off("toolbar-refresh",this.onRefreshHandler),this.parent.off(z,this.removeEventListener)},e.prototype.onRefreshHandler=function(e){var t=this.selection.getSelectedParentPoints(this.element);this.toolbarStatus={orderedlist:!e.documentNode&&this.isListsApplied(t,"OL"),unorderedlist:!e.documentNode&&this.isListsApplied(t,"UL"),formats:this.currentFormat(t,e.documentNode),bold:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("Bold"),italic:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("Italic"),inlinecode:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("InlineCode"),strikethrough:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("StrikeThrough"),subscript:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("SubScript"),superscript:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("SuperScript"),uppercase:!e.documentNode&&this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("UpperCase")},this.parent.formatter.editorManager.mdSelectionFormats.isAppliedCommand("InlineCode")&&(this.toolbarStatus.formats="pre");var n=JSON.stringify(this.toolbarStatus);this.parent.notify("toolbar-updated",this.toolbarStatus),JSON.stringify(this.prevToolbarStatus)!==n&&(this.parent.notify("updateTbItemsStatus",{html:null,markdown:JSON.parse(n)}),this.prevToolbarStatus=JSON.parse(n))},e.prototype.isListsApplied=function(e,t){var n=!0;if("OL"===t)for(o=0;o<e.length;o++){var i=e[o].text.trim().split(" ",2)[0]+" ";if(!/^[\d.]+[ ]+$/.test(i)){n=!1;break}}else for(var o=0;o<e.length;o++)if(!this.selection.isStartWith(e[o].text,this.parent.formatter.listTags[t])){n=!1;break}return n},e.prototype.currentFormat=function(e,t){for(var n="p",i=Object.keys(this.parent.formatter.formatTags),o="backward"===this.element.selectionDirection?e[0].text:e[e.length-1].text,r=0;!t&&r<i.length;r++){if("pre"!==i[r]&&this.selection.isStartWith(o,this.parent.formatter.formatTags[i[r]])){n=i[r];break}if("pre"===i[r]&&this.codeFormat()){n=i[r];break}}return n},e.prototype.codeFormat=function(){var e=!1,t=this.parent.inputElement,n=function(e){return function(t){return[t.slice(0,e),t.slice(e)]}}(t.selectionStart)(t.value),i=this.parent.formatter.formatTags.pre,o=this.getSelectedText(t);if(""!==o&&o===o.toLocaleUpperCase())return!0;if(""===o){var r=t.value.substr(n[0].length-1,1),s=n[1].substr(0,1);if(""!==r&&""!==s&&r.match(/[a-z]/i)&&r===r.toLocaleUpperCase()&&s===s.toLocaleUpperCase())return!0}return this.isCode(n[0],i)&&this.isCode(n[1],i)&&n[0].match(this.multiCharRegx(i)).length%2==1&&n[1].match(this.multiCharRegx(i)).length%2==1&&(e=!0),e},e.prototype.getSelectedText=function(e){return e.value.substring(e.selectionStart,e.selectionEnd)},e.prototype.isCode=function(e,t){return-1!==e.search("\\"+t)},e.prototype.multiCharRegx=function(e){return new RegExp("(\\"+e+")","g")},e}(),st=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("execCommandCallBack",this.commandCallBack,this),this.parent.on(z,this.removeEventListener,this)},e.prototype.commandCallBack=function(e){"Undo"!==e.requestType&&"Redo"!==e.requestType&&this.parent.formatter.saveData(),this.parent.notify("toolbar-refresh",{args:e}),this.parent.notify("count",{})},e.prototype.removeEventListener=function(){this.parent.off("execCommandCallBack",this.commandCallBack),this.parent.off(z,this.removeEventListener)},e}(),at=function(){function e(){}return e.prototype.process=function(e,n,i,o){var r,s=this,a=e.contentModule.getDocument().getSelection(),l=a.rangeCount>0?a.getRangeAt(a.rangeCount-1):null;if("HTML"===e.editorMode&&(r=this.editorManager.nodeSelection.save(l,e.contentModule.getDocument())),t.isNullOrUndefined(n)||!n.item.command||"Table"===n.item.command||"Actions"===n.item.command||"Links"===n.item.command||"Images"===n.item.command||"Files"===n.item.command||!l||e.contentModule.getEditPanel().contains(this.getAncestorNode(l.commonAncestorContainer))||e.contentModule.getEditPanel()===l.commonAncestorContainer||e.contentModule.getPanel()===l.commonAncestorContainer){if(t.isNullOrUndefined(n)){var d=i.action;if("tab"!==d&&"enter"!==d&&"space"!==d&&"escape"!==d){n={},"Markdown"===e.editorMode&&"insert-table"===d&&(o={headingText:e.localeObj.getConstant("TableHeadingText"),colText:e.localeObj.getConstant("TableColText")});var c={originalEvent:i,cancel:!1,requestType:d||i.key+"Key",itemCollection:o};t.extend(n,n,c,!0),t.isBlazor()&&(delete n.item,delete n.itemCollection),e.trigger("actionBegin",n,function(e){e.cancel&&("paste"!==d&&"cut"!==d&&"copy"!==d||i.preventDefault())})}var p=!!t.isNullOrUndefined(e.tableModule)||!!e.tableModule&&e.tableModule.ensureInsideTableList;(9===i.which&&p||9!==i.which)&&this.editorManager.observer.notify("keydown"===i.type?"keydown":"keyup",{event:i,callBack:this.onSuccess.bind(this,e),value:o})}else!t.isNullOrUndefined(n)&&n.item.command&&n.item.subCommand&&(n.item.command!==n.item.subCommand&&"Font"!==n.item.command||("FontName"===n.item.subCommand||"FontSize"===n.item.subCommand)&&"dropDownSelect"===n.name||("BackgroundColor"===n.item.subCommand||"FontColor"===n.item.subCommand)&&"colorPickerChanged"===n.name)&&(t.extend(n,n,{requestType:n.item.subCommand,cancel:!1,itemCollection:o},!0),e.trigger("actionBegin",n,function(t){if(!t.cancel){0===s.getUndoRedoStack().length&&"Links"!==t.item.command&&"Images"!==t.item.command&&s.saveData(),e.isBlur=!1,e.contentModule.getEditPanel().focus(),"HTML"===e.editorMode&&r.restore();var a=t.item.subCommand.toLocaleLowerCase();"paste"===a||"cut"===a||"copy"===a?e.clipboardAction(a,i):(s.editorManager.observer.notify(X,{subCommand:t.item.subCommand}),s.editorManager.execCommand(t.item.command,t.item.subCommand,i,s.onSuccess.bind(s,e),t.item.value,"Pre"===t.item.subCommand&&"dropDownSelect"===n.name?{name:n.name}:o,"#"+e.getID()+" iframe"))}}));(t.isNullOrUndefined(i)||i&&"copy"!==i.action)&&this.enableUndo(e)}},e.prototype.getAncestorNode=function(e){return e=3===e.nodeType?e.parentNode:e},e.prototype.onKeyHandler=function(e,t){var n=this;this.editorManager.observer.notify("keyup",{event:t,callBack:function(){e.notify("content-changed",{}),n.enableUndo(e)}})},e.prototype.onSuccess=function(e,n){e.notify("content-changed",{}),n&&(t.isNullOrUndefined(n.event)||"copy"!==n.event.action)&&(this.enableUndo(e),e.notify("execCommandCallBack",n)),e.trigger("actionComplete",n,function(t){if(e.setPlaceHolder(),"Images"===t.requestType||"Links"===t.requestType&&"HTML"===e.editorMode){var n=t;if("Links"===t.requestType&&t.event&&"keydown"===t.event.type&&32===t.event.keyCode)return;e.notify("insertCompleted",{args:n.event,type:t.requestType,isNotify:!0,elements:n.elements})}e.autoResize()})},e.prototype.saveData=function(e){this.editorManager.undoRedoManager.saveData(e)},e.prototype.getUndoStatus=function(){return this.editorManager.undoRedoManager.getUndoStatus()},e.prototype.getUndoRedoStack=function(){return this.editorManager.undoRedoManager.undoRedoStack},e.prototype.enableUndo=function(e){var n=this.getUndoStatus();!e.inlineMode.enable||t.Browser.isDevice&&!u()?e.toolbarModule&&C(e.toolbarModule.baseToolbar,n):C(e.quickToolbarModule.inlineQTBar.quickTBarObj,n)},e}(),lt=function(){function e(e){t.extend(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("lists-commands",this.applyListsHandler,this),this.parent.observer.on("keydown-handler",this.keyDownHandler,this),this.parent.observer.on("keyup-handler",this.keyUpHandler,this)},e.prototype.keyDownHandler=function(e){switch(e.event.which){case 9:this.tabKey(e)}switch(e.event.action){case"ordered-list":this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault();break;case"unordered-list":this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.keyUpHandler=function(e){switch(e.event.which){case 13:this.enterKey(e)}},e.prototype.tabKey=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var n=t.selectionStart,i=t.selectionEnd,o=this.selection.getSelectedParentPoints(t),r=0,s=this.isNotFirstLine(t,o[0]);if(!s&&!e.event.shiftKey)return void this.restore(t,n,i+r,e);var a=this.olListType(),l=this.getListRegex();this.currentAction=this.getAction(o[0].text);for(var d=0;d<o.length;d++){var c=(e.event.shiftKey,o[d].line-1),p=this.selection.getLine(t,c);if(p&&(!e.event.shiftKey&&s||e.event.shiftKey)){var h=p.split(". "),u=e.event.shiftKey?-"\t".length:"\t".length,m=o[d].text.split("\t");if(e.event.shiftKey&&1===m.length)break;if("OL"===this.currentAction&&/^\d+$/.test(h[0].trim())&&a){e.event.preventDefault(),o[d].text=e.event.shiftKey?m.splice(1,m.length).join("\t"):"\t"+o[d].text;var g=this.getTabSpace(o[d].text),f=this.getTabSpace(p),b=o[d].text.split(". ");if(g===f)this.changeTextAreaValue(b,this.nextOrderedListValue(h[0].trim()),e,t,o,d,i);else if(f<g)this.changeTextAreaValue(b,"1. ",e,t,o,d,i);else for(;f.length>g.length;null){c-=1;var v=(p=this.selection.getLine(t,c)).trim().split(". ");if(/^\d+$/.test(v[0])&&(f=this.getTabSpace(p)).length<=g.length){this.changeTextAreaValue(b,this.nextOrderedListValue(v[0]),e,t,o,d,i);break}}}else("UL"===this.currentAction&&l.test(p.trim())||!a)&&(e.event.preventDefault(),o[d].text=e.event.shiftKey?m.splice(1,m.length).join("\t"):"\t"+o[d].text,t.value=t.value.substr(0,o[d].start)+o[d].text+"\n"+t.value.substr(o[d].end,t.value.length));if(n=0===d?n+u:n,r+=u,1!==o.length)for(var y=d;y<o.length;y++)o[y].start=0!==y?o[y].start+u:o[y].start,o[y].end=o[y].end+u}}this.restore(t,n,i+r,e)},e.prototype.changeTextAreaValue=function(e,n,i,o,r,s,a){var l=n;e.splice(0,1);var d,c=this.selection.getAllParents(o.value).length,p="",h=this.getTabSpace(r[s].text),u=parseInt(l.split(".")[0],null),m=this.getTabSpace(r[s].text),g=!0,f=!0,b=-1,v=!0,y=0,C="";p=""!==this.selection.getLine(o,r[0].line+1)?"":p+o.value.substr(r[0].end,o.value.length);for(var S=1;S<c&&!t.isNullOrUndefined(this.selection.getLine(o,r[0].line+S))&&""!==this.selection.getLine(o,r[0].line+S);S++){var T=this.selection.getLine(o,r[0].line+S),E=this.getTabSpace(T),N=T.split(". ");if(1===N.length){p+=o.value.substr(r[0].end+y,o.value.length);break}y+=T.length;var w=!1;if(d=i.event.shiftKey?h.length+1:h.length-1,E.length>m.length&&(v=!1),h.length!==E.length&&E.length<m.length?(f=!0,g=!1,w=!(!i.event.shiftKey||h.length!==E.length)&&(f=!1,!0)):v&&i.event.shiftKey&&h.length===E.length&&E.length===m.length&&(f=!1,w=!0),C=""===p?"":"\n",d===E.length&&f){k=i.event.shiftKey?(b++,this.nextOrderedListValue(b.toString())):this.previousOrderedListValue(N[0]);N.splice(0,1),p=p+C+E+k+N.join(". ")}else if(h.length===E.length&&g||w){var k=this.nextOrderedListValue(u.toString());u++,N.splice(0,1),p=p+C+E+k+N.join(". ")}else p=p+C+T,f=!1;m=this.getTabSpace(T)}r[s].text=this.getTabSpace(r[s].text)+l+e.join(". ")+"\n",o.value=o.value.substr(0,r[s].start)+r[s].text+p},e.prototype.getTabSpace=function(e){for(var t=e.split("\t"),n="",i=0;i<t.length&&""===t[i];i++)n+="\t";return n},e.prototype.isNotFirstLine=function(e,t){var n,i=t.text,o=t.line-1,r=this.selection.getLine(e,o),s=this.getListRegex(),a=!1;if(r){this.currentAction=this.getAction(r);c=r.split(". ");n="OL"===this.currentAction?/^\d+$/.test(c[0].trim()):s.test(r.trim())}if(r&&n){var l=this.getTabSpace(i),d=this.getTabSpace(r);for(a=l===d||a;d.length>l.length;null){o-=1;var c=(r=this.selection.getLine(e,o)).trim().split(". ");if(("OL"===this.currentAction?/^\d+$/.test(c[0]):s.test(r.trim()))&&(d=this.getTabSpace(r)).length<=l.length){a=!0;break}}}return a},e.prototype.getAction=function(e){var t=e.split(". ")[0],n=/^\d+$/.test(t.trim()),i=e.trim().split(new RegExp("^("+this.selection.replaceSpecialChar(this.syntax.UL).trim()+")"))[1];return n?"OL":i?"UL":"NOTLIST"},e.prototype.nextOrderedListValue=function(e){return(parseInt(e,null)+1).toString()+". "},e.prototype.previousOrderedListValue=function(e){return(parseInt(e,null)-1).toString()+". "},e.prototype.enterKey=function(e){var n=this.parent.element;this.selection.save(n.selectionStart,n.selectionEnd);var i=n.selectionStart,o=n.selectionEnd,r=this.selection.getSelectedParentPoints(n),s=this.selection.getLine(n,r[0].line-1),a=this.olListType(),l=this.getListRegex(),d=[];t.isNullOrUndefined(s)||(d=s.split(". "),this.currentAction=this.getAction(s));var c=0;if("OL"===this.currentAction&&d.length>1&&/^\d+$/.test(d[0].trim())&&a&&""!==d[1]){S=this.getTabSpace(s);this.currentAction=this.getAction(s);T=this.nextOrderedListValue(d[0]);r[0].text=S+T+r[0].text;for(var p=this.selection.getAllParents(n.value).length,h="\n",u=this.getTabSpace(s),m=this.getTabSpace(r[0].text),g=!0,f=1;f<p&&""!==n.value.substr(r[0].end,n.value.length);f++){var b=this.selection.getLine(n,r[0].line+f);if(t.isNullOrUndefined(b))h+="";else{var v=b.split(". "),y=this.getTabSpace(b);if(y.length<m.length&&(g=!1),v.length>1&&/^\d+$/.test(v[0].trim())&&u.length===y.length&&g){var C=this.nextOrderedListValue(v[0]);v.splice(0,1),h=h+y+C+v.join(". ")+"\n"}else h=h+b+"\n",m=this.getTabSpace(b)}}n.value=n.value.substr(0,r[0].start)+u+T+this.selection.getLine(n,r[0].line)+h,i=i+T.length+S.length,c+=T.length+S.length}else if("UL"===this.currentAction&&s&&l.test(s.trim())&&""!==s.trim().replace(l,"")||"OL"===this.currentAction&&!a){var S=this.getTabSpace(s),T=this.syntax[this.currentAction];r[0].text=S+T+r[0].text+(r[0].text.trim().length>0?"\n":""),n.value=n.value.substr(0,r[0].start)+r[0].text+n.value.substr(r[0].end,n.value.length),i=i+T.length+S.length,c+=T.length+S.length}this.restore(n,i,o+c,e)},e.prototype.olListType=function(){var e=this.syntax.OL.split(".,");return(1===e.length?null:parseInt(e[2].trim(),null)-parseInt(e[0].trim(),null))?1:0},e.prototype.applyListsHandler=function(e){var n=this.parent.element;this.selection.save(n.selectionStart,n.selectionEnd),this.currentAction=e.subCommand;for(var i,o=n.selectionStart,r=n.selectionEnd,s=0,a=0,l=0,d=this.selection.getSelectedParentPoints(n),c="",p=this.olListType(),h={},u=0;u<d.length;u++)if(i=p?"OL"===this.currentAction?u+p+". ":this.syntax[this.currentAction]:"OL"===this.currentAction?this.syntax.OL:this.syntax[this.currentAction],this.selection.isStartWith(d[u].text,i))d[u].text=d[u].text.replace(i,""),n.value=n.value.substr(0,d[u].start+l)+d[u].text+"\n"+n.value.substr(d[u].end+l,n.value.length),l-=i.length,a=i.length,this.restore(n,o-a,r+l,null);else{if(""===d[u].text&&0===u&&(this.selection.save(o,r),1!==d.length))for(f=u;f<d.length;f++)d[f].start=0!==f?1+d[f].start:d[f].start,d[f].end=1+d[f].end;var m=t.isNullOrUndefined(d[u-1])?0:this.getTabSpace(d[u-1].text).length,g=this.appliedLine(d[u].text,i,h,m);if(c=g.line?c:i,d[u].text=g.line?g.line:c+d[u].text,g.space=g.space?g.space:0,n.value=n.value.substr(0,d[u].start+l)+d[u].text+"\n"+n.value.substr(d[u].end,n.value.length),o=0===u?o+c.length+g.space>0?o+c.length+g.space:0:o,s+=c.length+g.space,1!==d.length)for(var f=u;f<d.length;f++)d[f].start=0!==f?c.length+d[f].start+g.space:d[f].start,d[f].end=c.length+d[f].end+g.space;this.restore(n,o,r+s,null)}this.restore(n,null,null,e)},e.prototype.appliedLine=function(e,n,i,o){var r={},s=new RegExp("^["+this.syntax.UL.trim()+"]"),a=e.split(". "),l=a[0]+". ",d=s.test(e.trim())||e.trim()===this.syntax.OL.trim()||e.trim()===this.syntax.UL.trim()||/^\d+$/.test(a[0].trim()),c=this.olListType(),p=this.getTabSpace(e).length;if("OL"===this.currentAction&&c&&(i[p.toString()]=t.isNullOrUndefined(i[p.toString()])?1:i[p.toString()].valueOf()+1,n=i[p.toString()].valueOf().toString()+". ",!t.isNullOrUndefined(o)&&o>p&&(i[o.toString()]=0)),d){var h=void 0,u=void 0;s.test(e.trim())?(u=this.syntax.UL,h=n,r.space=n.trim().length-this.syntax.UL.trim().length):/^\d+$/.test(a[0].trim())&&c?(u=a[0].trim()+". ",h=n,r.space=this.syntax.UL.trim().length-l.trim().length):/^\d+$/.test(a[0].trim())&&(u=a[0].trim()+". ",h=this.syntax.UL,r.space=this.syntax.UL.trim().length-l.trim().length),r.line=e.replace(u,h)}return r},e.prototype.restore=function(e,n,i,o){t.isNullOrUndefined(n)||t.isNullOrUndefined(n)||this.selection.save(n,i),t.isNullOrUndefined(o)||this.selection.restore(e),o&&o.callBack&&o.callBack({requestType:this.currentAction,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:o.event})},e.prototype.getListRegex=function(){for(var e="",t=Object.keys(this.syntax),n=0;n<t.length;n++){var i=this.selection.replaceSpecialChar(this.syntax[t[n]]);e+=""===e?"^("+i+")|^("+i.trim()+")":"|^("+i+")|^("+i.trim()+")"}return new RegExp(e)},e}(),dt=function(){function e(e){t.extend(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("format-type",this.applyFormats,this)},e.prototype.applyFormats=function(e){e.subCommand=e.subCommand.toLowerCase();var n=this.parent.element;this.selection.save(n.selectionStart,n.selectionEnd);var i=this.selection.getSelectedParentPoints(n);if(this.isAppliedFormat(i)===e.subCommand){if("pre"===e.subCommand){if(!(i.length>1))return;this.applyCodeBlock(n,e,i)}return this.cleanFormat(n),void this.restore(n,n.selectionStart,n.selectionEnd,e)}if("p"===e.subCommand)return this.cleanFormat(n),void this.restore(n,n.selectionStart,n.selectionEnd,e);("pre"===e.subCommand&&1!==i.length||"pre"!==e.subCommand)&&this.cleanFormat(n,e.subCommand);var o=n.selectionStart,r=n.selectionEnd,s=0;if(i=this.selection.getSelectedParentPoints(n),"pre"===e.subCommand)return void(i.length>1?this.applyCodeBlock(n,e,i):(t.extend(e,e,{subCommand:"InlineCode"},!0),this.parent.observer.notify("command-type",e)));for(var a=0;a<i.length;a++)if(""===i[a].text||this.selection.isStartWith(i[a].text,"\\"+this.syntax[e.subCommand])){if(""===i[a].text&&0===a&&(this.selection.save(o,r),0===this.selection.getSelectedText(n).length&&(i[a].text=this.syntax[e.subCommand],n.value=n.value.substr(0,i[a].start)+this.syntax[e.subCommand]+n.value.substr(i[a].end,n.value.length),o=0===a?o+this.syntax[e.subCommand].length:o,s+=this.syntax[e.subCommand].length),1!==i.length))for(l=a;l<i.length;l++)i[l].start=0!==l?1+i[l].start:i[l].start,i[l].end=1+i[l].end}else if(i[a].text=this.syntax[e.subCommand]+i[a].text,n.value=n.value.substr(0,i[a].start)+i[a].text+"\n"+n.value.substr(i[a].end,n.value.length),o=0===a?o+this.syntax[e.subCommand].length:o,s+=this.syntax[e.subCommand].length,1!==i.length)for(var l=a;l<i.length;l++)i[l].start=0!==l?this.syntax[e.subCommand].length+i[l].start:i[l].start,i[l].end=this.syntax[e.subCommand].length+i[l].end;this.restore(n,o,r+s,e)},e.prototype.clearRegex=function(){for(var e="",t=Object.keys(this.syntax),n=0;n<t.length&&"pre"!==t[n]&&"p"!==t[n];n++)e+=""===e?"^("+this.selection.replaceSpecialChar(this.syntax[t[n]].trim())+")":"|^("+this.selection.replaceSpecialChar(this.syntax[t[n]].trim())+")";return e},e.prototype.cleanFormat=function(e,t){var n=this.selection.getSelectedParentPoints(e),i=e.selectionStart,o=e.selectionEnd,r=0;if(this.selection.isClear(n,this.clearRegex())){for(var s=0;s<n.length;s++){for(var a=Object.keys(this.syntax),l=0;""!==n[s].text&&l<a.length;l++){var d=this.syntax[a[l]];if(a[l]!==t){var c=new RegExp("^("+this.selection.replaceSpecialChar(d)+")","gim");if(c.test(n[s].text)){if(n[s].text=n[s].text.replace(c,""),e.value=e.value.substr(0,n[s].start)+n[s].text+"\n"+e.value.substr(n[s].end,e.value.length),i=0===s?i-d.length>0?i-d.length:0:i,r+=d.length,1!==n.length)for(var p=0;p<n.length;p++)n[p].start=0!==p?n[p].start-d.length:n[p].start,n[p].end=n[p].end-d.length;break}}}if(""===n[s].text&&0===s&&(this.selection.save(i,o),1!==n.length))for(l=s;l<n.length;l++)n[l].start=0!==l?1+n[l].start:n[l].start,n[l].end=1+n[l].end}this.restore(e,i,o-r)}},e.prototype.applyCodeBlock=function(e,t,n){var i=t.subCommand,o=n[0].start,r=n[n.length-1].end,s=this.selection.getAllParents(e.value),a=s[n[0].line-1],l=s[n.length+1+1];if(this.selection.isStartWith(a,this.syntax.pre.split("\n")[0])||this.selection.isStartWith(l,this.syntax.pre.split("\n")[0])){var d=this.syntax[i],c=this.parent.markdownSelection.getSelectedInlinePoints(e),p=e.value.substr(0,e.selectionStart).lastIndexOf(d),h=e.value.substr(e.selectionEnd,e.selectionEnd).indexOf(d);h+=c.end;var u=this.replaceAt(e.value.substr(0,c.start),d,"",p,c.start),m=this.replaceAt(e.value.substr(c.end,e.value.length),d,"",0,h);e.value=u+c.text+m,o=this.selection.selectionStart-d.length,r=this.selection.selectionEnd-d.length}else{var g=e.value.substring(o,r).split("\n"),f=""===g[g.length-1]?"":"\n";e.value=e.value.substr(0,o)+this.syntax[i]+e.value.substring(o,r)+f+this.syntax[i]+e.value.substr(r,e.value.length),o=this.selection.selectionStart+this.syntax[i].length,r=this.selection.selectionEnd+this.syntax[i].length-1}this.restore(e,o,r,t)},e.prototype.replaceAt=function(e,t,n,i,o){return e.slice(0,i)+e.slice(i,o).replace(t,n)+e.slice(o)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e.prototype.isAppliedFormat=function(e,t){for(var n="p",i=(Object.keys(this.syntax),Object.keys(this.syntax)),o="backward"===this.parent.element.selectionDirection?e[0].text:e[e.length-1].text,r=0;!t&&r<i.length;r++){if("pre"!==i[r]&&this.selection.isStartWith(o,this.syntax[i[r]])){n=i[r];break}if("pre"===i[r]){var s=this.selection.getAllParents(this.parent.element.value),a=s[e[0].line-1],l=s[e.length+1];if(this.selection.isStartWith(a,this.syntax[i[r]].split("\n")[0])&&this.selection.isStartWith(l,this.syntax[i[r]].split("\n")[0])){n=i[r];break}}}return n},e}(),ct=function(){function e(e){t.extend(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("command-type",this.applyCommands,this),this.parent.observer.on("keydown-handler",this.keyDownHandler,this)},e.prototype.keyDownHandler=function(e){switch(e.event.action){case"bold":this.applyCommands({subCommand:"Bold",callBack:e.callBack}),e.event.preventDefault();break;case"italic":this.applyCommands({subCommand:"Italic",callBack:e.callBack}),e.event.preventDefault();break;case"strikethrough":this.applyCommands({subCommand:"StrikeThrough",callBack:e.callBack}),e.event.preventDefault();break;case"uppercase":this.applyCommands({subCommand:"UpperCase",callBack:e.callBack}),e.event.preventDefault();break;case"lowercase":this.applyCommands({subCommand:"LowerCase",callBack:e.callBack}),e.event.preventDefault();break;case"superscript":this.applyCommands({subCommand:"SuperScript",callBack:e.callBack}),e.event.preventDefault();break;case"subscript":this.applyCommands({subCommand:"SubScript",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.isBold=function(e,t){return-1!==e.search("\\"+t+"\\"+t)},e.prototype.isItalic=function(e,t){return-1!==e.search("\\"+t)},e.prototype.isMatch=function(e,t){var n=[""];switch(t){case this.syntax.Italic:case this.syntax.InlineCode:case this.syntax.StrikeThrough:n=e.match(this.singleCharRegx(t))}return n},e.prototype.multiCharRegx=function(e){return new RegExp("(\\"+e+"\\"+e+")","g")},e.prototype.singleCharRegx=function(e){return new RegExp("(\\"+e+")","g")},e.prototype.isAppliedCommand=function(e){var n=!1,i=this.parent.element,o=function(e){return function(t){return[t.slice(0,e),t.slice(e)]}}(i.selectionStart)(i.value),r=this.syntax.Bold.substr(0,1),s=this.syntax.Italic,a=this.parent.markdownSelection.getSelectedText(i);if(""!==a&&a===a.toLocaleUpperCase()&&"UpperCase"===e)return!0;if(""===a){var l=i.value.substr(o[0].length-1,1),d=o[1].substr(0,1);if(""!==l&&""!==d&&l.match(/[a-z]/i)&&l===l.toLocaleUpperCase()&&d===d.toLocaleUpperCase()&&"UpperCase"===e)return!0}return this.isBold(o[0],r)||this.isItalic(o[0],s)||this.isBold(o[1],r)||this.isItalic(o[1],s)||(t.isNullOrUndefined(this.isMatch(o[0],this.syntax.StrikeThrough))||t.isNullOrUndefined(this.isMatch(o[1],this.syntax.StrikeThrough))||this.isMatch(o[0],this.syntax.StrikeThrough).length%2!=1||this.isMatch(o[1],this.syntax.StrikeThrough).length%2!=1||"StrikeThrough"!==e||(n=!0),t.isNullOrUndefined(this.isMatch(o[0],this.syntax.InlineCode))||t.isNullOrUndefined(this.isMatch(o[1],this.syntax.InlineCode))||this.isMatch(o[0],this.syntax.InlineCode).length%2!=1||this.isMatch(o[1],this.syntax.InlineCode).length%2!=1||"InlineCode"!==e||(n=!0),t.isNullOrUndefined(o[0].match(/\<sub>/g))||t.isNullOrUndefined(o[1].match(/\<\/sub>/g))||o[0].match(/\<sub>/g).length%2!=1||o[1].match(/\<\/sub>/g).length%2!=1||"SubScript"!==e||(n=!0),t.isNullOrUndefined(o[0].match(/\<sup>/g))||t.isNullOrUndefined(o[1].match(/\<\/sup>/g))||o[0].match(/\<sup>/g).length%2!=1||o[1].match(/\<\/sup>/g).length%2!=1||"SuperScript"!==e||(n=!0)),this.isBold(o[0],r)&&this.isBold(o[1],r)&&o[0].match(this.multiCharRegx(r)).length%2==1&&o[1].match(this.multiCharRegx(r)).length%2==1&&"Bold"===e&&(n=!0),o[0]=this.isBold(o[0],r)?o[0].replace(this.multiCharRegx(r),"$%@"):o[0],o[1]=this.isBold(o[1],r)?o[1].replace(this.multiCharRegx(r),"$%@"):o[1],t.isNullOrUndefined(this.isMatch(o[0],this.syntax.Italic))||t.isNullOrUndefined(this.isMatch(o[1],this.syntax.Italic))||this.isMatch(o[0],this.syntax.Italic).length%2!=1||this.isMatch(o[1],this.syntax.Italic).length%2!=1||"Italic"!==e||(n=!0),t.isNullOrUndefined(this.isMatch(o[0],this.syntax.StrikeThrough))||t.isNullOrUndefined(this.isMatch(o[1],this.syntax.StrikeThrough))||this.isMatch(o[0],this.syntax.StrikeThrough).length%2!=1||this.isMatch(o[1],this.syntax.StrikeThrough).length%2!=1||"StrikeThrough"!==e||(n=!0),t.isNullOrUndefined(this.isMatch(o[0],this.syntax.InlineCode))||t.isNullOrUndefined(this.isMatch(o[1],this.syntax.InlineCode))||this.isMatch(o[0],this.syntax.InlineCode).length%2!=1||this.isMatch(o[1],this.syntax.InlineCode).length%2!=1||"InlineCode"!==e||(n=!0),t.isNullOrUndefined(o[0].match(/\<sub>/g))||t.isNullOrUndefined(o[1].match(/\<\/sub>/g))||o[0].match(/\<sub>/g).length%2!=1||o[1].match(/\<\/sub>/g).length%2!=1||"SubScript"!==e||(n=!0),t.isNullOrUndefined(o[0].match(/\<sup>/g))||t.isNullOrUndefined(o[1].match(/\<\/sup>/g))||o[0].match(/\<sup>/g).length%2!=1||o[1].match(/\<\/sup>/g).length%2!=1||"SuperScript"!==e||(n=!0),n},e.prototype.applyCommands=function(e){this.currentAction=e.subCommand;var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var n=t.selectionStart,i=t.selectionEnd,o=0,r=this.parent.markdownSelection.getSelectedInlinePoints(t);if(this.isAppliedCommand(e.subCommand)&&""!==r.text){var s=this.syntax[e.subCommand],a="SubScript"===e.subCommand?"</sub>":"SuperScript"===e.subCommand?"</sup>":this.syntax[e.subCommand],l="UpperCase"===e.subCommand||"LowerCase"===e.subCommand?0:s.length,d=t.value.substr(0,r.start).lastIndexOf(s),c=t.value.substr(r.end,t.value.length).indexOf(a);c+=r.end;var p=this.replaceAt(t.value.substr(0,r.start),s,"",d,r.start),h=this.replaceAt(t.value.substr(r.end,t.value.length),a,"",0,c);return t.value=p+r.text+h,void this.restore(t,n-l,i-l,e)}if(""===r.text||this.isApplied(r,e.subCommand))"UpperCase"!==e.subCommand&&"LowerCase"!==e.subCommand?("SubScript"===e.subCommand||"SuperScript"===e.subCommand?(r.text=this.textReplace(r.text,e.subCommand),r.text=this.syntax[e.subCommand]+r.text+"</"+this.syntax[e.subCommand].substring(1,5)):(r.text=this.textReplace(r.text,e.subCommand),r.text=this.syntax[e.subCommand]+r.text+this.syntax[e.subCommand]),t.value=t.value.substr(0,r.start)+r.text+t.value.substr(r.end,t.value.length),o=this.syntax[e.subCommand].length,r.start===r.end?this.restore(t,n+o,i+o,e):this.restore(t,n+o,i-o,e)):this.restore(t,n,i,e);else{o="UpperCase"===e.subCommand||"LowerCase"===e.subCommand?0:this.syntax[e.subCommand].length;var u=t.value.substr(r.start-this.syntax[e.subCommand].length,this.syntax[e.subCommand].length),m=void 0;if(u===e.subCommand||r.start-this.syntax[e.subCommand].length===t.value.indexOf(this.syntax[e.subCommand])&&(r.end===t.value.lastIndexOf(this.syntax[e.subCommand])||r.end===t.value.lastIndexOf("</"+this.syntax[e.subCommand].substring(1,5)))){m="SubScript"===e.subCommand||"SuperScript"===e.subCommand?t.value.substr(r.end,this.syntax[e.subCommand].length+1):t.value.substr(r.end,this.syntax[e.subCommand].length);var p=this.replaceAt(t.value.substr(0,r.start),u,"",r.start-this.syntax[e.subCommand].length,r.start),h=this.replaceAt(t.value.substr(r.end,t.value.length),m,"",0,m.length);t.value=p+r.text+h,this.restore(t,n-o,i-o,e)}else"SubScript"===e.subCommand||"SuperScript"===e.subCommand?r.text=this.syntax[e.subCommand]+r.text+"</"+this.syntax[e.subCommand].substring(1,5):"UpperCase"===e.subCommand||"LowerCase"===e.subCommand?r.text="UpperCase"===e.subCommand?r.text.toUpperCase():r.text.toLowerCase():r.text=this.syntax[e.subCommand]+r.text+this.syntax[e.subCommand],t.value=t.value.substr(0,r.start)+r.text+t.value.substr(r.end,t.value.length),this.restore(t,n+o,i+o,e)}this.parent.undoRedoManager.saveData()},e.prototype.replaceAt=function(e,t,n,i,o){return e.slice(0,i)+e.slice(i,o).replace(t,n)+e.slice(o)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:this.currentAction,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e.prototype.textReplace=function(e,t){var n=this.singleCharRegx(this.syntax[t]);switch(t){case"Bold":n=this.multiCharRegx(this.syntax[t].substr(0,1)),e=e.replace(n,"");break;case"Italic":if(this.isBold(e,this.syntax[t].substr(0,1))){var i=this.multiCharRegx(this.syntax[t].substr(0,1)),o=e;o=o.replace(i,"$%@").replace(n,"");var r=new RegExp("\\$%@","g");e=o.replace(r,this.syntax[t].substr(0,1)+this.syntax[t].substr(0,1))}else e=e.replace(n,"");break;case"StrikeThrough":case"InlineCode":e=e.replace(n,"");break;case"SubScript":e=e.replace(/<sub>/g,"").replace(/<\/sub>/g,"");break;case"SuperScript":e=e.replace(/<sup>/g,"").replace(/<\/sup>/g,"")}return e},e.prototype.isApplied=function(e,t){var n=this.singleCharRegx(this.syntax[t]);switch(t){case"SubScript":case"SuperScript":return(n=this.singleCharRegx(this.syntax[t])).test(e.text);case"Bold":case"StrikeThrough":return(n=this.multiCharRegx(this.syntax[t].substr(0,1))).test(e.text);case"UpperCase":case"LowerCase":return(n=new RegExp("^["+this.syntax[t]+"]*$","g")).test(e.text);case"Italic":var i=void 0,o=this.multiCharRegx(this.syntax[t].substr(0,1));if(o.test(e.text)){var r=e.text;r=r.replace(o,"$%#"),i=n.test(r)}else i=n.test(e.text);return i;case"InlineCode":return n.test(e.text)}},e}(),pt={h6:"###### ",h5:"##### ",h4:"#### ",h3:"### ",h2:"## ",h1:"# ",blockquote:"> ",pre:"```\n",p:""},ht={Bold:"**",Italic:"*",StrikeThrough:"~~",InlineCode:"`",SubScript:"<sub>",SuperScript:"<sup>",UpperCase:"A-Z",LowerCase:"a-z"},ut={OL:"1. ",UL:"- "},mt={"toolbar-focus":"alt+f10",escape:"27","insert-link":"ctrl+k","insert-image":"ctrl+shift+i","insert-table":"ctrl+shift+e",undo:"ctrl+z",redo:"ctrl+y",copy:"ctrl+c",cut:"ctrl+x",paste:"ctrl+v",bold:"ctrl+b",italic:"ctrl+i",underline:"ctrl+u",strikethrough:"ctrl+shift+s",uppercase:"ctrl+shift+u",lowercase:"ctrl+shift+l",superscript:"ctrl+shift+=",subscript:"ctrl+=",indents:"ctrl+]",outdents:"ctrl+[","html-source":"ctrl+shift+h","full-screen":"ctrl+shift+f","decrease-fontsize":"ctrl+shift+<","increase-fontsize":"ctrl+shift+>","justify-center":"ctrl+e","justify-full":"ctrl+j","justify-left":"ctrl+l","justify-right":"ctrl+r","clear-format":"ctrl+shift+r","ordered-list":"ctrl+shift+o","unordered-list":"ctrl+alt+o",space:"32",enter:"13",tab:"tab",delete:"46"},gt={"toolbar-focus":"alt+f10",escape:"27","insert-link":"ctrl+k","insert-image":"ctrl+shift+i","insert-table":"ctrl+shift+e",undo:"ctrl+z",redo:"ctrl+y",copy:"ctrl+c",cut:"ctrl+x",paste:"ctrl+v",bold:"ctrl+b",italic:"ctrl+i",strikethrough:"ctrl+shift+s",uppercase:"ctrl+shift+u",lowercase:"ctrl+shift+l",superscript:"ctrl+shift+=",subscript:"ctrl+=","full-screen":"ctrl+shift+f","ordered-list":"ctrl+shift+o","unordered-list":"ctrl+alt+o"},ft={b:["strong"],strong:["b"],i:["emp","cite"],emp:["i","cite"],cite:["i","emp"]},bt={first:"MsoListParagraphCxSpFirst",middle:"MsoListParagraphCxSpMiddle",last:"MsoListParagraphCxSpLast"},vt=["BR","IMG"],yt=function(){function e(e,n){this.undoRedoStack=[],this.parent=e,this.undoRedoSteps=t.isNullOrUndefined(n)?30:n.undoRedoSteps,this.undoRedoTimer=t.isNullOrUndefined(n)?300:n.undoRedoTimer,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){var e=t.debounce(this.keyUp,this.undoRedoTimer);this.parent.observer.on("keyup-handler",e,this),this.parent.observer.on("keydown-handler",this.keyDown,this),this.parent.observer.on("action",this.onAction,this),this.parent.observer.on("model_changed_plugin",this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){for(var t=0,n=Object.keys(e.newProp);t<n.length;t++)switch(n[t]){case"undoRedoSteps":this.undoRedoSteps=e.newProp.undoRedoSteps;break;case"undoRedoTimer":this.undoRedoTimer=e.newProp.undoRedoTimer}},e.prototype.removeEventListener=function(){var e=t.debounce(this.keyUp,300);this.parent.observer.off("keyup-handler",e),this.parent.observer.off("keydown-handler",this.keyDown),this.parent.observer.off("action",this.onAction),this.parent.observer.off("model_changed_plugin",this.onPropertyChanged)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.onAction=function(e){"Undo"===e.subCommand?this.undo(e):this.redo(e)},e.prototype.keyDown=function(e){var t=e.event,n=this;switch(t.action){case"undo":t.preventDefault(),n.undo(e);break;case"redo":t.preventDefault(),n.redo(e)}},e.prototype.keyUp=function(e){17===e.event.keyCode||e.event.ctrlKey||this.saveData(e)},e.prototype.saveData=function(e){var t=this.parent.element;this.selection.save(t.selectionStart,t.selectionEnd);var n=t.selectionStart,i=t.selectionEnd,o={text:this.parent.element.value,start:n,end:i};this.undoRedoStack.length>=this.steps&&(this.undoRedoStack=this.undoRedoStack.slice(0,this.steps+1)),this.undoRedoStack.length>1&&this.undoRedoStack[this.undoRedoStack.length-1].start===n&&this.undoRedoStack[this.undoRedoStack.length-1].end===i||(this.undoRedoStack.push(o),this.steps=this.undoRedoStack.length-1,this.steps>this.undoRedoSteps&&(this.undoRedoStack.shift(),this.steps--),e&&e.callBack&&e.callBack())},e.prototype.undo=function(e){if(this.steps>0){this.currentAction="Undo";var t=this.undoRedoStack[this.steps-1].start,n=this.undoRedoStack[this.steps-1].end,i=this.undoRedoStack[this.steps-1].text;this.parent.element.value=i,this.parent.element.focus(),this.steps--,this.restore(this.parent.element,t,n,e)}},e.prototype.redo=function(e){if(null!=this.undoRedoStack[this.steps+1]){this.currentAction="Redo";var t=this.undoRedoStack[this.steps+1].start,n=this.undoRedoStack[this.steps+1].end;this.parent.element.value=this.undoRedoStack[this.steps+1].text,this.parent.element.focus(),this.steps++,this.restore(this.parent.element,t,n,e)}},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:this.currentAction,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e.prototype.getUndoStatus=function(){var e={undo:!1,redo:!1};return this.steps>0&&(e.undo=!0),null!=this.undoRedoStack[this.steps+1]&&(e.redo=!0),e},e}(),Ct=function(){function e(e){this.parent=e,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("link-commands",this.createLink,this)},e.prototype.createLink=function(e){var t=this.parent.element;t.focus();var n=t.selectionStart,i=t.selectionEnd,o="Image"===e.subCommand?this.selection.getSelectedText(t):e.item.text,r="Image"===e.subCommand?n+2:n+1,s="Image"===e.subCommand?i+2:i+1;o="Image"===e.subCommand?"":"["+o+"]("+e.item.url+")",t.value=t.value.substr(0,n)+o+t.value.substr(i,t.value.length),this.parent.markdownSelection.setSelection(t,r,s),this.restore(t,r,s,e)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e}(),St=function(){function e(e){t.extend(this,this,e,!0),this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("insert-table",this.createTable,this),this.parent.observer.on("keydown-handler",this.onKeyDown,this)},e.prototype.removeEventListener=function(){this.parent.observer.off("insert-table",this.createTable),this.parent.observer.off("keydown-handler",this.onKeyDown)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.onKeyDown=function(e){"insert-table"===e.event.action&&(e.item=e.value,this.createTable(e))},e.prototype.createTable=function(e){this.element=this.parent.element;var t=this.element.selectionStart,n=this.element.selectionEnd,i=this.element.value;this.locale=e,this.selection.save(t,n),this.restore(this.element.selectionStart,this.element.selectionEnd,null),this.insertTable(t,n,i,e)},e.prototype.getTable=function(){var e="";return e+=this.textNonEmpty(),e+=this.tableHeader(this.locale),e+=this.tableCell(this.locale)},e.prototype.tableHeader=function(e){for(var t="",n=1;n<=2;n++){t+="|";for(var i=1;i<=2;i++)t+=1===n?e.item.headingText+" "+i+"|":"---------|";t+=this.insertLine()}return t},e.prototype.tableCell=function(e){for(var t="",n=1;n<=2;n++){t+="|";for(var i=1;i<=2;i++)t+=e.item.colText+" "+this.convertToLetters(n)+i+"|";t+=this.insertLine()}return t+=this.insertLine()},e.prototype.insertLine=function(){var e=document.createElement("div");return e.innerHTML="\n",e.textContent},e.prototype.insertTable=function(e,t,n,i){var o=this.selection.getSelectedParentPoints(this.element),r=o[o.length-1].text.split(" ",2),s=this.getFormatTag();r.length<2?(this.element.value=this.updateValue(this.getTable()),this.makeSelection(n,e,t)):this.ensureFormatApply(o[o.length-1].text)?this.checkValid(e,t,this.getTable(),n,i,r,o,s):(this.element.value=this.updateValue(this.getTable()),this.makeSelection(n,e,t)),this.restore(this.element.selectionStart,this.element.selectionEnd,i)},e.prototype.makeSelection=function(e,t,n){n=t+(e.length>0?12:10),t+=e.length>0?3:1,this.selection.setSelection(this.element,t,n)},e.prototype.getFormatTag=function(){for(var e=Object.keys(this.syntaxTag.Formats),t=Object.keys(this.syntaxTag.List),n=[],i=0;i<e.length;i++)n.push(this.syntaxTag.Formats[e[i]]);for(var o=0;o<t.length;o++)n.push(this.syntaxTag.List[t[o]]);return n},e.prototype.ensureFormatApply=function(e){for(var t=this.getFormatTag(),n=e.trim().split(" ",2)[0]+" ",i=0;i<t.length;i++)if(n===t[i]||/^[\d.]+[ ]+$/.test(n))return!0;return!1},e.prototype.ensureStartValid=function(e,t){for(var n=t[0].text.split(" ",2),i=e+1;i<=e+n[0].length+1;i++)if(this.element.selectionStart===i||this.element.selectionEnd===i)return!1;return!0},e.prototype.ensureEndValid=function(e,t){for(var n=e+1;n<=e+t+1;n++)if(this.element.selectionEnd===n)return!1;return!0},e.prototype.updateValueWithFormat=function(e,t){var n=this.element.value.substring(this.element.selectionEnd,this.element.value.length);return t+=n.replace(n,e[0]+" "+n),this.element.value.substr(0,this.element.selectionStart)+t},e.prototype.updateValue=function(e){return this.element.value.substr(0,this.element.selectionStart)+e+this.element.value.substr(this.element.selectionEnd,this.element.value.length)},e.prototype.checkValid=function(e,t,n,i,o,r,s,a){this.ensureStartValid(s[0].start,s)&&this.ensureEndValid(s[s.length-1].start,r[0].length)&&(e===s[0].start?e!==t&&t!==s[s.length-1].end-1?this.element.value=this.updateValueWithFormat(r,n):this.element.value=this.updateValue(n):t===s[s.length-1].end-1?this.element.value=this.updateValue(n):this.element.value=this.updateValueWithFormat(r,n),this.makeSelection(i,e,t))},e.prototype.convertToLetters=function(e){var t="A".charCodeAt(0),n="";do{e-=1,n=String.fromCharCode(t+e%26)+n,e=e/26>>0}while(e>0);return n},e.prototype.textNonEmpty=function(){var e="";return(this.isCursorBased()||this.isSelectionBased())&&this.element.value.length>0&&(e+=this.insertLine(),e+=this.insertLine()),e},e.prototype.isCursorBased=function(){return this.element.selectionStart===this.element.selectionEnd},e.prototype.isSelectionBased=function(){return this.element.selectionStart!==this.element.selectionEnd},e.prototype.restore=function(e,t,n){this.selection.save(e,t),this.selection.restore(this.element),n&&n.callBack&&n.callBack({requestType:n.subCommand,selectedText:this.selection.getSelectedText(this.element),editorMode:"Markdown",event:n.event})},e}(),Tt=function(){function e(e){this.parent=e,this.selection=this.parent.markdownSelection,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("clear-commands",this.clear,this)},e.prototype.replaceRegex=function(e){return e.replace(/\*/gi,"\\*").replace(/\&/gi,"\\&").replace(/\-/gi,"\\-").replace(/\^/gi,"\\^").replace(/\$/gi,"\\$").replace(/\./gi,"\\.").replace(/\|/gi,"\\|").replace(/\?/gi,"\\?").replace(/\+/gi,"\\+").replace(/\-/gi,"\\-").replace(/\&/gi,"\\&")},e.prototype.clearSelectionTags=function(e){for(var t=this.parent.selectionTags,n=Object.keys(t),i=0;i<n.length;i++){var o=n[i];if(t.hasOwnProperty(o)&&""!==t[o]){var r=this.replaceRegex(t[o]),s=void 0,a=t[o].length,l="<sup>"===t[o]||"<sub>"===t[o]?t[o].length+1:t[o].length;s="<sup>"===t[o]?new RegExp("<sup>(.*?)</sup>","ig"):"<sub>"===t[o]?new RegExp("<sub>(.*?)</sub>","ig"):new RegExp(r+"(.*?)"+r,"ig");for(var d=e.match(s),c=0;d&&c<d.length&&""!==d[c];c++)e=e.replace(d[c],d[c].substr(a,d[c].length-l-a))}}return e},e.prototype.clearFormatTags=function(e){var t=e.split("\n");return this.clearFormatLines(t)},e.prototype.clearFormatLines=function(e){for(var t=[this.parent.formatTags,this.parent.listTags],n="",i=0;i<e.length;i++){for(var o=0;o<t.length;o++)for(var r=t[o],s=Object.keys(r),a=0;a<s.length;a++){var l=s[a];r.hasOwnProperty(l)&&""!==r[l]&&0===e[i].indexOf(r[l])&&(e[i]=e[i].replace(r[l],""),e[i]=this.clearFormatLines([e[i]]))}n=n+e[i]+(i!==e.length-1?"\n":"")}return n},e.prototype.clear=function(e){var t=this.parent.element;t.focus();var n=t.selectionStart,i=t.selectionEnd,o=this.selection.getSelectedText(t);o=this.clearSelectionTags(o),o=this.clearFormatTags(o),t.value=t.value.substr(0,n)+o+t.value.substr(i,t.value.length),this.parent.markdownSelection.setSelection(t,n,n+o.length),this.restore(t,n,n+o.length,e)},e.prototype.restore=function(e,t,n,i){this.selection.save(t,n),this.selection.restore(e),i&&i.callBack&&i.callBack({requestType:i.subCommand,selectedText:this.selection.getSelectedText(e),editorMode:"Markdown",event:i.event})},e}(),Et=function(){function e(e){this.initialize(),t.extend(this,this,e,!0),this.observer=new t.Observer(this),this.markdownSelection=new it,this.listObj=new lt({parent:this,syntax:this.listTags}),this.formatObj=new dt({parent:this,syntax:this.formatTags}),this.undoRedoManager=new yt(this,e.options),this.mdSelectionFormats=new ct({parent:this,syntax:this.selectionTags}),this.linkObj=new Ct(this),this.tableObj=new St({parent:this,syntaxTag:{Formats:this.formatTags,List:this.listTags}}),this.clearObj=new Tt(this),this.wireEvents()}return e.prototype.initialize=function(){this.formatTags=pt,this.listTags=ut,this.selectionTags=ht},e.prototype.wireEvents=function(){this.observer.on("keydown",this.editorKeyDown,this),this.observer.on("keyup",this.editorKeyUp,this),this.observer.on("model_changed",this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){this.observer.notify("model_changed_plugin",e)},e.prototype.editorKeyDown=function(e){this.observer.notify("keydown-handler",e)},e.prototype.editorKeyUp=function(e){this.observer.notify("keyup-handler",e)},e.prototype.execCommand=function(e,t,n,i,o,r){switch(e.toLocaleLowerCase()){case"lists":this.observer.notify("lists-commands",{subCommand:t,event:n,callBack:i});break;case"formats":this.observer.notify("format-type",{subCommand:t,event:n,callBack:i});break;case"actions":this.observer.notify("action",{subCommand:t,event:n,callBack:i});break;case"style":case"effects":case"casing":this.observer.notify("command-type",{subCommand:t,event:n,callBack:i});break;case"links":case"images":this.observer.notify("link-commands",{subCommand:t,event:n,callBack:i,item:r});break;case"table":switch(t.toString().toLocaleLowerCase()){case"createtable":this.observer.notify("insert-table",{subCommand:t,item:r,event:n,callBack:i})}break;case"clear":this.observer.notify("clear-commands",{subCommand:t,event:n,callBack:i})}},e}(),Nt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wt=function(e){function n(n){var i=e.call(this)||this;return i.initialize(),t.extend(i,i,n,!0),n&&i.element&&i.updateFormatter(i.element,document,n.options),i}return Nt(n,e),n.prototype.initialize=function(){this.keyConfig=gt,this.formatTags=pt,this.listTags=ut,this.selectionTags=ht},n.prototype.updateFormatter=function(e,t,n){e&&(this.editorManager=new Et({element:e,formatTags:this.formatTags,listTags:this.listTags,selectionTags:this.selectionTags,options:n}))},n}(at),kt=function(){function e(e){this.parent=e}return e.prototype.renderPanel=function(){var e=this.parent,t=this.parent.createElement("div",{id:this.parent.getID()+"_view",className:"e-rte-content"});this.editableElement=this.parent.createElement("textarea",{className:"e-content",id:this.parent.getID()+"_editable-content"}),t.appendChild(this.editableElement),this.setPanel(t),e.element.appendChild(t)},e.prototype.getPanel=function(){return this.contentPanel},e.prototype.getEditPanel=function(){return this.editableElement},e.prototype.getText=function(){return this.getEditPanel().value},e.prototype.setPanel=function(e){this.contentPanel=e},e.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},e}(),Lt=function(){function n(e,t){this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.addEventListener()}return n.prototype.destroy=function(){this.removeEventListener()},n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.saveSelection=new it,this.parent.on("initial-load",this.instantiateRenderer,this),this.parent.on(F,this.render,this),this.parent.on(_,this.onPropertyChanged,this),this.parent.on("markdown-toolbar-click",this.onToolbarClick,this),this.parent.on(z,this.destroy,this),this.parent.on("selectAll",this.selectAll,this),this.parent.on("getSelectedHtml",this.getSelectedHtml,this),this.parent.on(V,this.onSelectionSave,this),this.parent.on("selection-restore",this.onSelectionRestore,this),this.parent.on("readOnlyMode",this.updateReadOnly,this))},n.prototype.updateReadOnly=function(){this.parent.readonly?(this.parent.contentModule.getEditPanel().setAttribute("readonly","readonly"),t.addClass([this.parent.element],"e-rte-readonly")):(this.parent.contentModule.getEditPanel().removeAttribute("readonly"),t.removeClass([this.parent.element],"e-rte-readonly"))},n.prototype.onSelectionSave=function(){var e=this.parent.contentModule.getEditPanel();this.saveSelection.save(e.selectionStart,e.selectionEnd)},n.prototype.onSelectionRestore=function(e){this.contentRenderer.getEditPanel().focus();var t=this.parent.contentModule.getEditPanel();this.saveSelection.restore(t)},n.prototype.onToolbarClick=function(e){var t=e.item,n=this.parent.contentModule.getEditPanel();n.focus();var i=n.selectionStart,o=n.selectionEnd,r=n.value.substring(i,o);switch(t.subCommand){case"Maximize":this.parent.notify("enableFullScreen",{args:e});break;case"Minimize":this.parent.notify("disableFullScreen",{args:e});break;case"CreateLink":this.parent.notify("insertLink",{member:"link",args:e,text:r,module:"Markdown"});break;case"Image":this.parent.notify("insertImage",{member:"image",args:e,text:r,module:"Markdown"});break;case"CreateTable":var s={headingText:this.parent.localeObj.getConstant("TableHeadingText"),colText:this.parent.localeObj.getConstant("TableColText")};this.parent.formatter.process(this.parent,e,e.originalEvent,s);break;default:this.parent.formatter.process(this.parent,e,e.originalEvent,null)}},n.prototype.instantiateRenderer=function(){this.renderFactory.addRenderer(e.RenderType.Content,new kt(this.parent))},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(F,this.render),this.parent.off(_,this.onPropertyChanged),this.parent.off(z,this.destroy),this.parent.off("markdown-toolbar-click",this.onToolbarClick),this.parent.off("initial-load",this.instantiateRenderer),this.parent.off("selectAll",this.selectAll),this.parent.off("getSelectedHtml",this.getSelectedHtml),this.parent.off(V,this.onSelectionSave),this.parent.off("selection-restore",this.onSelectionRestore),this.parent.off("readOnlyMode",this.updateReadOnly))},n.prototype.render=function(){this.contentRenderer=this.renderFactory.getRenderer(e.RenderType.Content);var n=this.contentRenderer.getEditPanel(),i={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};t.isNullOrUndefined(this.parent.formatter)?this.parent.formatter=new wt({element:n,options:i}):this.parent.formatter.updateFormatter(n,this.contentRenderer.getDocument(),i),this.parent.toolbarSettings.enable&&(this.toolbarUpdate=new rt(this.parent)),this.parent.notify("bind-on-end",{})},n.prototype.onPropertyChanged=function(e){if(!t.isNullOrUndefined(e.newProp.formatter)){var n=this.contentRenderer.getEditPanel(),i={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};this.parent.formatter.updateFormatter(n,this.contentRenderer.getDocument(),i)}},n.prototype.getModuleName=function(){return"markdownEditor"},n.prototype.selectAll=function(){this.parent.formatter.editorManager.markdownSelection.setSelection(this.parent.contentModule.getEditPanel(),0,this.parent.contentModule.getEditPanel().value.length)},n.prototype.getSelectedHtml=function(e){e.callBack(this.parent.formatter.editorManager.markdownSelection.getSelectedText(this.parent.contentModule.getEditPanel()))},n}(),xt="INSERT-IMAGE",Ot="INSERT-TABLE",Dt="INSERT-LINK",Mt=["address","article","aside","audio","blockquote","canvas","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tbody","td","tfoot","th","thead","tr","ul","video","body"],Rt=["td","th"],It=["table","tbody","td","tfoot","th","thead","tr"],Bt=function(){function e(){this.startNodeName=[],this.endNodeName=[]}return e.prototype.saveInstance=function(e,t){return this.range=e.cloneRange(),this.rootNode=this.documentFromRange(e),this.body=t,this.startContainer=this.getNodeArray(e.startContainer,!0),this.endContainer=this.getNodeArray(e.endContainer,!1),this.startOffset=e.startOffset,this.endOffset=e.endOffset,this.html=this.body.innerHTML,this},e.prototype.documentFromRange=function(e){return 9===e.startContainer.nodeType?e.startContainer:e.startContainer.ownerDocument},e.prototype.getRange=function(e){var t=this.get(e),n=t&&t.rangeCount>0?t.getRangeAt(t.rangeCount-1):e.createRange();return n.startContainer!==e||n.endContainer!==e||n.startOffset||n.endOffset||(n.setStart(e.body,0),n.collapse(!0)),n},e.prototype.get=function(e){return e.defaultView.getSelection()},e.prototype.save=function(e,t){return e=e?e.cloneRange():this.getRange(t),this.saveInstance(e,t.body)},e.prototype.getIndex=function(e){var t=0;if(e=e.previousSibling||"BR"!==e.tagName?e.previousSibling:e)for(e.nodeType;e;null)t++,e.nodeType,e=e.previousSibling;return t},e.prototype.isChildNode=function(e,t){for(var n=0;n<t.childNodes.length;n++)if(e.indexOf(t.childNodes[n])>-1)return!0;return!1},e.prototype.getNode=function(e,t,n){return t!==e||3!==e.nodeType&&e.firstChild&&-1===n.indexOf(e.firstChild)&&!this.isChildNode(n,e)?-1===n.indexOf(e.firstChild)&&e.firstChild&&!this.isChildNode(n,e)?e.firstChild:e.nextSibling?e.nextSibling:e.parentNode?e.parentNode:null:null},e.prototype.getNodeCollection=function(e){var t=e.startContainer.childNodes[e.startOffset]||e.startContainer,n=e.endContainer.childNodes[e.endOffset>0?e.endOffset-1:e.endOffset]||e.endContainer;if(t===n&&0===t.childNodes.length)return[t];if(e.startOffset===e.endOffset&&0!==e.startOffset&&"PRE"===e.startContainer.nodeName)return["BR"===t.nodeName||"#text"===t.nodeName?t:t.childNodes[0]];var i=[];do{-1===i.indexOf(t)&&i.push(t),t=this.getNode(t,n,i)}while(t);return i},e.prototype.getParentNodeCollection=function(e){return this.getParentNodes(this.getNodeCollection(e),e)},e.prototype.getParentNodes=function(e,t){e=e.reverse();for(var n=0;n<e.length;n++)-1!==e.indexOf(e[n].parentNode)||3===e[n].nodeType&&t.startContainer!==t.endContainer&&t.startContainer.parentNode!==t.endContainer.parentNode?(e.splice(n,1),n--):3===e[n].nodeType&&(e[n]=e[n].parentNode);return e},e.prototype.getSelectionNodeCollection=function(e){return this.getSelectionNodes(this.getNodeCollection(e))},e.prototype.getSelectionNodeCollectionBr=function(e){return this.getSelectionNodesBr(this.getNodeCollection(e))},e.prototype.getSelectionNodes=function(e){e=e.reverse();for(var t=new RegExp(String.fromCharCode(8203),"g"),n=0;n<e.length;n++)(3!==e[n].nodeType||""===e[n].textContent.trim()||1===e[n].textContent.length&&e[n].textContent.match(t))&&(e.splice(n,1),n--);return e.reverse()},e.prototype.getSelectionNodesBr=function(e){e=e.reverse();for(var t=new RegExp(String.fromCharCode(8203),"g"),n=0;n<e.length;n++)"BR"!==e[n].nodeName&&(3!==e[n].nodeType||""===e[n].textContent.trim()||1===e[n].textContent.length&&e[n].textContent.match(t))&&(e.splice(n,1),n--);return e.reverse()},e.prototype.getInsertNodeCollection=function(e){return this.getInsertNodes(this.getNodeCollection(e))},e.prototype.getInsertNodes=function(e){e=e.reverse();for(var t=0;t<e.length;t++)(0!==e[t].childNodes.length&&3!==e[t].nodeType||3===e[t].nodeType&&""===e[t].textContent)&&(e.splice(t,1),t--);return e.reverse()},e.prototype.getNodeArray=function(e,n,i){var o=[];for(n?this.startNodeName=[]:this.endNodeName=[];e!==(i||this.rootNode)&&!t.isNullOrUndefined(e);null)n?this.startNodeName.push(e.nodeName.toLowerCase()):this.endNodeName.push(e.nodeName.toLowerCase()),o.push(this.getIndex(e)),e=e.parentNode;return o},e.prototype.setRangePoint=function(e,t,n,i){for(var o=this.rootNode,r=n.length,s=i;r--;null)o=o&&o.childNodes[n[r]];return o&&s>=0&&"html"!==o.nodeName&&e[t?"setStart":"setEnd"](o,s),e},e.prototype.restore=function(){var e=this.range.cloneRange();return e=this.setRangePoint(e,!0,this.startContainer,this.startOffset),e=this.setRangePoint(e,!1,this.endContainer,this.endOffset),this.selectRange(this.rootNode,e),e},e.prototype.selectRange=function(e,t){this.setRange(e,t),this.save(t,e)},e.prototype.setRange=function(e,t){var n=this.get(e);n.removeAllRanges(),n.addRange(t)},e.prototype.setSelectionText=function(e,t,n,i,o){var r=e.createRange();r.setStart(t,i),r.setEnd(n,o),this.setRange(e,r)},e.prototype.setSelectionContents=function(e,t){var n=e.createRange();n.selectNode(t),this.setRange(e,n)},e.prototype.setSelectionNode=function(e,t){var n=e.createRange();n.selectNodeContents(t),this.setRange(e,n)},e.prototype.getSelectedNodes=function(e){return this.getNodeCollection(this.getRange(e))},e.prototype.Clear=function(e){this.get(e).removeAllRanges()},e.prototype.insertParentNode=function(e,t,n){n.surroundContents(t),this.selectRange(e,n)},e.prototype.setCursorPoint=function(e,t,n){var i=e.createRange(),o=e.defaultView.getSelection();i.setStart(t,n),i.collapse(!0),o.removeAllRanges(),o.addRange(i)},e}(),Pt={startSelection:"e-editor-select-start",endSelection:"e-editor-select-end"},At=function(){function e(e,t){this.parent=e,this.nodeSelection=new Bt,this.currentDocument=t}return e.prototype.contents=function(e){return e&&"IFRAME"!==e.tagName?Array.prototype.slice.call(e.childNodes||[]):[]},e.prototype.isBlockNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&Mt.indexOf(e.tagName.toLowerCase())>=0},e.prototype.isLink=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},e.prototype.blockParentNode=function(e){for(;e&&e.parentNode!==this.parent&&(!e.parentNode||!this.hasClass(e.parentNode,"e-node-inner"));null)if(e=e.parentNode,this.isBlockNode(e))return e;return e},e.prototype.rawAttributes=function(e){var t={},n=e.attributes;if(n.length>0)for(var i=0;i<n.length;i++){var o=n[i];t[o.nodeName]=o.value}return t},e.prototype.attributes=function(e){if(!e)return"";for(var t="",n=this.rawAttributes(e),i=Object.keys(n).sort(),o=0;o<i.length;o++){var r=i[o],s=n[r];s.indexOf("'")<0&&s.indexOf('"')>=0?t+=" "+r+"='"+s+"'":s.indexOf('"')>=0&&s.indexOf("'")>=0?t+=" "+r+'="'+(s=s.replace(/"/g,"""))+'"':t+=" "+r+'="'+s+'"'}return t},e.prototype.clearAttributes=function(e){for(var t=e.attributes,n=t.length-1;n>=0;n--){var i=t[n];e.removeAttribute(i.nodeName)}},e.prototype.openTagString=function(e){return"<"+e.tagName.toLowerCase()+this.attributes(e)+">"},e.prototype.closeTagString=function(e){return"</"+e.tagName.toLowerCase()+">"},e.prototype.createTagString=function(e,t,n){return"<"+e.toLowerCase()+this.attributes(t)+">"+n+"</"+e.toLowerCase()+">"},e.prototype.isList=function(e){return!!e&&["UL","OL"].indexOf(e.tagName)>=0},e.prototype.isElement=function(e){return e===this.parent},e.prototype.isEditable=function(e){return(!e.getAttribute||"true"===e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},e.prototype.hasClass=function(e,t){return e&&e.classList&&e.classList.contains(t)},e.prototype.replaceWith=function(e,n){e.parentNode.insertBefore(this.parseHTMLFragment(n),e),t.detach(e)},e.prototype.parseHTMLFragment=function(e){var n=t.createElement("template");return n.innerHTML=e,n.content instanceof DocumentFragment?n.content:document.createRange().createContextualFragment(e)},e.prototype.wrap=function(e,t){return e.parentNode.insertBefore(t,e),(t=e.previousSibling).appendChild(e),t},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.wrapInner=function(e,t){for(e.appendChild(t),(t=e.querySelector(".e-rte-wrap-inner")).classList.remove("e-rte-wrap-inner"),0===t.classList.length&&t.removeAttribute("class");e.firstChild!==t;)t.appendChild(e.firstChild);return t},e.prototype.unWrap=function(e){for(var t=e.parentNode,n=[];e.firstChild;)n.push(e.firstChild),t.insertBefore(e.firstChild,e);return n=n.length>0?n:[e.parentNode],t.removeChild(e),n},e.prototype.getSelectedNode=function(e,t){return e.nodeType===Node.ELEMENT_NODE&&e.childNodes.length>0&&e.childNodes[t-1]&&e.childNodes[t-1].nodeType===Node.ELEMENT_NODE&&(e.childNodes[t-1].classList.contains(Pt.startSelection)||e.childNodes[t-1].classList.contains(Pt.endSelection))?e=e.childNodes[t-1]:e.nodeType===Node.ELEMENT_NODE&&e.childNodes.length>0&&e.childNodes[t]&&(e=e.childNodes[t]),e.nodeType===Node.TEXT_NODE&&(e=e.parentNode),e},e.prototype.nodeFinds=function(e,t){for(var n=[],i=0;i<t.length;i++)e.contains(t[i])&&e!==t[i]&&n.push(t[i]);return n},e.prototype.isEditorArea=function(){var e;for(e=this.getRangePoint(0).commonAncestorContainer;e&&!this.isElement(e);null)e=e.parentNode;return!!this.isElement(e)},e.prototype.getRangePoint=function(e){var t=this.getSelection(),n=[];if(t&&t.getRangeAt&&t.rangeCount){n=[];for(var i=0;i<t.rangeCount;i++)n.push(t.getRangeAt(i))}else n=[this.currentDocument.createRange()];return void 0!==e?n[e]:n},e.prototype.getSelection=function(){return this.nodeSelection.get(this.currentDocument)},e.prototype.getPreviousNode=function(e){for(e=e.previousElementSibling;e&&"\n"===e.textContent;null)e=e.previousElementSibling;return e},e.prototype.encode=function(e){var t=document.createElement("div");return t.innerText=e,t.innerHTML.replace(/<br\s*[\/]?>/gi,"\n")},e.prototype.saveMarker=function(e,n){var i,o,r=this.parent.querySelector("."+Pt.startSelection),s=this.parent.querySelector("."+Pt.endSelection);if(""===r.textContent&&t.isNullOrUndefined(s)&&"tab"!==n&&(1===r.childNodes.length&&"BR"===r.childNodes[0].nodeName?r.innerHTML="<br>":r.innerHTML=""),this.hasClass(r,Pt.startSelection)&&r.classList.length>1){a=this.createTagString("p",r,this.encode(r.textContent));this.replaceWith(r,a),(r=this.parent.querySelector("."+Pt.startSelection)).classList.remove(Pt.startSelection),i=r.childNodes[0]}else i=this.unWrap(r)[0];if(this.hasClass(s,Pt.endSelection)&&s.classList.length>1){var a=this.createTagString("p",s,this.encode(s.textContent));this.replaceWith(s,a),(s=this.parent.querySelector("."+Pt.endSelection)).classList.remove(Pt.endSelection),o=s.childNodes[0]}else o=s?this.unWrap(s)[0]:i;return e.startContainer=e.getNodeArray(i,!0),e.endContainer=e.getNodeArray(o,!1),e},e.prototype.marker=function(e,t){return'<span class="'+e+'">'+t+"</span>"},e.prototype.setMarker=function(e){var t=e.range,n=t.startContainer.childNodes,i=(n.length>1&&"TABLE"===n[0].nodeName?A(n[t.startOffset+1]):n[t.startOffset>0?t.startOffset-1:t.startOffset])||t.startContainer,o=t.endContainer.childNodes[t.endOffset>0?t.endOffset-1:t.endOffset]||t.endContainer;if(i.nodeType===Node.ELEMENT_NODE&&o.nodeType===Node.ELEMENT_NODE&&(i.contains(o)||o.contains(i))){var r=i.contains(o)?i:o;if(r.nodeType!==Node.TEXT_NODE){for(var s=[],a=[],l=r;r.contains(l);null)s.indexOf(l)<0&&l.childNodes&&l.childNodes.length?(s.push(l),l=l.childNodes[0]):l.nextSibling?l=l.nextSibling:l.parentNode&&(l=l.parentNode,s.push(l)),a.indexOf(l)<0&&(l.nodeType===Node.TEXT_NODE||Rt.indexOf(l.parentNode.tagName.toLocaleLowerCase())>=0&&("BR"===l.tagName||"IMG"===l.tagName))&&a.push(l);a.length&&(i=i.contains(o)?a[0]:i,o=a[a.length-1])}}i!==o?(i.nodeType!==Node.TEXT_NODE&&("BR"===i.tagName&&Rt.indexOf(i.parentNode.tagName.toLocaleLowerCase())>=0||"IMG"===i.tagName)?(this.replaceWith(i,this.marker(Pt.startSelection,this.encode(i.textContent))),t.startContainer.querySelector("."+Pt.startSelection).appendChild(i)):this.replaceWith(i,this.marker(Pt.startSelection,this.encode(i.textContent))),o.nodeType!==Node.TEXT_NODE&&"BR"===o.tagName&&Rt.indexOf(o.parentNode.tagName.toLocaleLowerCase())>=0?(this.replaceWith(o,this.marker(Pt.endSelection,this.encode(o.textContent))),t.endContainer.querySelector("."+Pt.endSelection).appendChild(o)):this.ensureSelfClosingTag(o,Pt.endSelection,t)):this.ensureSelfClosingTag(i,Pt.startSelection,t)},e.prototype.ensureSelfClosingTag=function(e,n,i){var o=!1;if(3===e.nodeType)this.replaceWith(e,this.marker(n,this.encode(e.textContent)));else if("BR"===e.tagName)this.replaceWith(e,this.marker(Pt.startSelection,this.encode(e.textContent))),i.startContainer.querySelector("."+Pt.startSelection).appendChild(e);else{if("IMG"===e.tagName){var r=document.createElement("p");e.parentElement.insertBefore(r,e),r.appendChild(e),e=r.children[0]}if("TABLE"===e.tagName)if(o=!0,""===e.textContent){var s=e.querySelectorAll("td");e=s[s.length-1],e=t.isNullOrUndefined(e.childNodes[0])?e:e.childNodes[0]}else{for(var a=e.lastChild;3!==a.nodeType&&"#text"!==a.nodeName&&"BR"!==a.nodeName;)a=a.lastChild;e=a}for(var l=0;l<vt.length;l++)e=e.tagName!==vt[l]||o?e:e.parentNode;if(3===e.nodeType&&"#text"===e.nodeName)this.replaceWith(e,this.marker(n,this.encode(e.textContent)));else if("BR"===e.nodeName)this.replaceWith(e,this.marker(Pt.endSelection,this.encode(e.textContent))),i.endContainer.querySelector("."+Pt.endSelection).appendChild(e);else{var d=this.marker(n,"");t.append([this.parseHTMLFragment(d)],e)}}},e.prototype.createTempNode=function(e){var t=e.textContent;if("BR"===e.tagName){var n="<p></p>",i=e.parentNode;Rt.indexOf(i.tagName.toLocaleLowerCase())>=0&&(e=this.wrap(e,this.parseHTMLFragment(n)))}else if(e.nodeType!==Node.TEXT_NODE&&(e.classList.contains(Pt.startSelection)||e.classList.contains(Pt.endSelection))||t.replace(/\n/g,"").replace(/(^ *)|( *$)/g,"").length>0||t.length&&t.indexOf("\n")<0){var n="<p></p>",o=e;e=this.wrap(e,this.parseHTMLFragment(n)),!(o.nodeType===Node.ELEMENT_NODE&&o.firstChild&&"BR"===o.firstChild.nodeName&&(o.classList.contains(Pt.startSelection)||o.classList.contains(Pt.endSelection)))&&e.nextElementSibling&&"BR"===e.nextElementSibling.tagName&&e.appendChild(e.nextElementSibling)}return e},e.prototype.getImageTagInSelection=function(){var e=this.getSelection();return this.isEditorArea()&&e.rangeCount?e.focusNode.querySelectorAll("img"):null},e.prototype.blockNodes=function(){var e=[],n=this.getSelection();if(this.isEditorArea()&&n.rangeCount)for(var i=this.getRangePoint(),o=0;o<i.length;o++){var r=void 0,s=i[o],a=this.getSelectedNode(s.startContainer,s.startOffset),l=this.getSelectedNode(s.endContainer,s.endOffset);if(this.isBlockNode(a)&&e.indexOf(a)<0&&e.push(a),(r=this.blockParentNode(a))&&e.indexOf(r)<0)if(Rt.indexOf(r.tagName.toLocaleLowerCase())>=0&&("BR"===a.tagName||a.nodeType===Node.TEXT_NODE||a.classList.contains(Pt.startSelection)||a.classList.contains(Pt.endSelection))){var d=a.previousSibling&&a.previousSibling.nodeType===Node.TEXT_NODE?a.previousSibling:a;a.nextSibling||a.previousSibling||"BR"!==a.tagName?e.push(this.createTempNode(d)):e.push(d)}else e.push(r);for(var c=[],p=a;p!==l&&p!==this.parent;null)c.indexOf(p)<0&&p.childNodes&&p.childNodes.length?(c.push(p),p=p.childNodes[0]):p&&8!==p.nodeType&&("BR"===p.tagName||p.nodeType===Node.TEXT_NODE&&""!==p.textContent.trim()||p.nodeType!==Node.TEXT_NODE&&(p.classList.contains(Pt.startSelection)||p.classList.contains(Pt.endSelection)))&&Rt.indexOf(p.parentNode.tagName.toLocaleLowerCase())>=0?p=this.createTempNode(p):p.nextSibling&&8!==p.nextSibling.nodeType&&("BR"===p.nextSibling.tagName||p.nextSibling.nodeType===Node.TEXT_NODE||p.nextSibling.classList.contains(Pt.startSelection)||p.nextSibling.classList.contains(Pt.endSelection))&&Rt.indexOf(p.nextSibling.parentNode.tagName.toLocaleLowerCase())>=0?p=this.createTempNode(p.nextSibling):p.nextSibling?p=p.nextSibling:p.parentNode&&(p=p.parentNode,c.push(p)),e.indexOf(p)<0&&p.nodeType===Node.ELEMENT_NODE&&Rt.indexOf(p.parentNode.tagName.toLocaleLowerCase())>=0&&(p.classList.contains(Pt.startSelection)||p.classList.contains(Pt.endSelection))&&e.push(this.createTempNode(p)),this.isBlockNode(p)&&this.ignoreTableTag(p)&&c.indexOf(p)<0&&e.indexOf(p)<0&&(p!==l||s.endOffset>0)&&e.push(p),"IMG"===p.nodeName&&"true"===p.parentElement.contentEditable&&e.push(p);(r=this.blockParentNode(l))&&this.ignoreTableTag(r)&&e.indexOf(r)<0&&!t.isNullOrUndefined(r.previousElementSibling)&&"IMG"!==r.previousElementSibling.tagName&&e.push(r)}for(var h=e.length-1;h>0;h--)if((c=this.nodeFinds(e[h],e)).length){var u=e[h].querySelectorAll("ul, ol");if("LI"===e[h].tagName&&u.length>0)continue;e.splice(h,1)}return e},e.prototype.ignoreTableTag=function(e){return!(It.indexOf(e.tagName.toLocaleLowerCase())>=0)},e}(),Ht=function(){function e(e){this.parent=e,this.domNode=this.parent.domNode,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("list-type",this.applyListsHandler,this),this.parent.observer.on("keydown-handler",this.keyDownHandler,this)},e.prototype.testList=function(e){var n=[/^[\d]+[.]+$/,/^(?=[MDCLXVI])M*(C[MD]|D?C{0,3})(X[CL]|L?X{0,3})(I[XV]|V?I{0,3})[.]$/gi,/^[a-zA-Z][.]+$/],i=t.isNullOrUndefined(e)?null:e.innerText.trim().split(".")[0]+".";if(!t.isNullOrUndefined(i))for(var o=0;o<n.length;o++)if(n[o].test(i))return!0;return!1},e.prototype.testCurrentList=function(e){var n=[/^[1]+[.]+$/,/^[i]+[.]+$/,/^[a]+[.]+$/];if(!t.isNullOrUndefined(e.startContainer.textContent.slice(0,e.startOffset)))for(var i=0;i<n.length;i++)if(n[i].test(e.startContainer.textContent.slice(0,e.startOffset)))return!0;return!1},e.prototype.spaceList=function(e){var n=this.parent.nodeSelection.getRange(this.parent.currentDocument);this.saveSelection=this.parent.nodeSelection.save(n,this.parent.currentDocument);var i=this.parent.domNode.getSelectedNode(n.startContainer,n.startOffset),o=(this.parent.domNode.getSelectedNode(n.endContainer,n.endOffset),i.previousElementSibling),r=i.nextElementSibling,s=t.isNullOrUndefined(o)?null:o.innerText.trim().substring(0,1),a=t.isNullOrUndefined(r)?null:r.innerText.trim().substring(0,1),l=this.testCurrentList(n),d=this.testList(o),c=this.testList(r);d||c||"*"===s||"*"===a||(l?(n.startContainer.textContent=n.startContainer.textContent.slice(n.startOffset,n.startContainer.textContent.length),this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault()):"*"!==n.startContainer.textContent.slice(0,n.startOffset)&&"-"!==n.startContainer.textContent.slice(0,n.startOffset)||(n.startContainer.textContent=n.startContainer.textContent.slice(n.startOffset,n.startContainer.textContent.length),this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()))},e.prototype.enterList=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument),n=this.parent.domNode.getSelectedNode(t.startContainer,t.startOffset);n===this.parent.domNode.getSelectedNode(t.endContainer,t.endOffset)&&"LI"===n.tagName&&""===n.textContent.trim()&&65279===n.textContent.charCodeAt(0)&&(n.textContent="")},e.prototype.backspaceList=function(e){var n=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=this.parent.domNode.getSelectedNode(n.startContainer,n.startOffset),o=this.parent.domNode.getSelectedNode(n.endContainer,n.endOffset);if(i="BR"===i.nodeName?i.parentElement:i,o="BR"===o.nodeName?o.parentElement:o,i===o&&!t.isNullOrUndefined(t.closest(i,"li"))&&(""===i.textContent.trim()&&65279===i.textContent.charCodeAt(0)||1===i.textContent.length&&8203===i.textContent.charCodeAt(0))&&(i.textContent=""),i===o&&""===i.textContent){if("LI"===i.parentElement.tagName&&"LI"===o.parentElement.tagName)t.detach(i);else if((i.closest("ul")||i.closest("ol"))&&(r=t.isNullOrUndefined(i.closest("ul"))?i.closest("ol"):i.closest("ul")).firstElementChild===i&&!t.isNullOrUndefined(r.children[1])&&("OL"===r.children[1].tagName||"UL"===r.children[1].tagName))if(r.tagName===r.children[1].tagName){for(;r.children[1].lastChild;)this.parent.domNode.insertAfter(r.children[1].lastChild,r.children[1]);t.detach(r.children[1])}else r.parentElement.insertBefore(r.children[1],r)}else if(!(t.isNullOrUndefined(i.firstChild)||"BR"!==i.firstChild.nodeName||t.isNullOrUndefined(i.childNodes[1])||"UL"!==i.childNodes[1].nodeName&&"OL"!==i.childNodes[1].nodeName)){var r=t.isNullOrUndefined(i.closest("ul"))?i.closest("ol"):i.closest("ul");if(r.tagName===i.childNodes[1].nodeName){for(;i.childNodes[1].lastChild;)this.parent.domNode.insertAfter(i.children[1].lastChild,i);t.detach(i.childNodes[1])}else r.parentElement.insertBefore(i.children[1],r)}},e.prototype.keyDownHandler=function(e){if(13===e.event.which&&this.enterList(e),32===e.event.which&&this.spaceList(e),8===e.event.which&&this.backspaceList(e),46===e.event.which&&"delete"===e.event.action){var n=(a=this.parent.nodeSelection.getRange(this.parent.currentDocument)).commonAncestorContainer,i=a.startContainer,o=a.endContainer,r=3===i.nodeType?i.parentElement:i,s=3===o.nodeType?o.parentElement:o;"UL"!==n.nodeName&&"OL"!==n.nodeName||r===s||t.isNullOrUndefined(t.closest(r,"ul"))&&t.isNullOrUndefined(t.closest(r,"ol"))||t.isNullOrUndefined(t.closest(s,"ul"))&&t.isNullOrUndefined(t.closest(s,"ol"))||n.lastElementChild!==t.closest(s,"li")||a.collapsed||t.detach(n)}if(9===e.event.which){var a=this.parent.nodeSelection.getRange(this.parent.currentDocument);e.event.action&&"indent"===e.event.action||(this.saveSelection=this.parent.nodeSelection.save(a,this.parent.currentDocument));var l=void 0,d=a.startOffset,c=a.endOffset;if((r=this.parent.domNode.getSelectedNode(a.startContainer,a.startOffset))===(s=this.parent.domNode.getSelectedNode(a.endContainer,a.endOffset))&&("BR"===r.nodeName||"#text"===r.nodeName)&&Rt.indexOf(r.parentNode.tagName.toLocaleLowerCase())>=0)return;e.event.action&&"indent"===e.event.action||this.domNode.setMarker(this.saveSelection),l=this.domNode.blockNodes();for(var p=[],h=!0,u=0;u<l.length;u++)"LI"===l[u].parentNode.tagName?p.push(l[u].parentNode):"LI"===l[u].tagName&&"P"!==l[u].childNodes[0].tagName&&"OL"!==l[u].childNodes[0].tagName&&"UL"!==l[u].childNodes[0].tagName&&p.push(l[u]);p.length>1||p.length&&(0===d&&0===c||e.ignoreDefault)?(e.event.preventDefault(),e.event.stopPropagation(),this.currentAction=this.getAction(p[0]),e.event.shiftKey?(this.revertList(p),this.revertClean()):h=this.nestedList(p),h&&(this.cleanNode(),this.parent.editableElement.focus()),e.event.action&&"indent"===e.event.action||(this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore(),e.callBack&&e.callBack({requestType:this.currentAction,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes(),event:e.event}))):e.event.action&&"indent"===e.event.action||(e.event&&e.event.shiftKey&&"Tab"===e.event.key&&(e.event.action="tab"),this.saveSelection=this.domNode.saveMarker(this.saveSelection,e.event.action),this.saveSelection.restore())}else switch(e.event.action){case"ordered-list":this.applyListsHandler({subCommand:"OL",callBack:e.callBack}),e.event.preventDefault();break;case"unordered-list":this.applyListsHandler({subCommand:"UL",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.getAction=function(e){return"OL"===e.parentNode.nodeName?"OL":"UL"},e.prototype.revertClean=function(){for(var e=this.parent.editableElement.querySelectorAll("ul, ol"),t=0;t<e.length;t++){var n=e[t].querySelectorAll("ul, ol");if(n.length>0)for(var i=0;i<n.length;i++){var o=n[i].previousSibling;o&&"LI"===o.tagName&&o.appendChild(n[i])}}},e.prototype.noPreviousElement=function(e){var n,i,o=e.querySelectorAll("ol, ul"),r=e.querySelectorAll("li"),s=this.domNode.contents(r[0])[0];if(r.length>0&&("OL"===s.nodeName||"UL"===s.nodeName)?n=r[0]:i=o[0],n)for(a=this.domNode.contents(e)[0];a&&!this.domNode.isList(a);null){l=a.nextSibling;t.prepend([a],n),t.setStyleAttribute(e,{"list-style-type":"none"}),t.setStyleAttribute(n,{"list-style-type":""}),a=l}else if(i){c=t.createElement("li");t.prepend([c],i);for(var a=this.domNode.contents(e)[0];a&&!this.domNode.isList(a);null){var l=a.nextSibling;c.appendChild(a),a=l}t.prepend([i],e.parentNode),t.detach(e);d=t.createElement("li",{styles:"list-style-type: none;"});t.prepend([d],i.parentNode),t.append([i],d)}else{var d=t.createElement("li",{styles:"list-style-type: none;"});t.prepend([d],e.parentNode);var c=t.createElement(e.parentNode.tagName);t.prepend([c],d),t.append([e],c)}},e.prototype.nestedList=function(e){for(var n=!1,i=0;i<e.length;i++){var o=this.domNode.getPreviousNode(e[i]);if(o){n=!0;var r=void 0,s=void 0,a=e[i].querySelectorAll("ol, ul"),l=e[i].querySelectorAll("li"),d=this.domNode.contents(l[0])[0];if(l.length>0&&("OL"===d.nodeName||"UL"===d.nodeName)?s=l[0]:r=a[0],r){h=t.createElement("li");t.prepend([h],r);for(c=this.domNode.contents(e[i])[0];c&&!this.domNode.isList(c);null){p=c.nextSibling;h.appendChild(c),c=p}t.append([r],o),t.detach(e[i])}else if(s){if("LI"===o.tagName){for(var c=this.domNode.contents(e[i])[0];c&&!this.domNode.isList(c);null){var p=c.nextSibling;t.prepend([c],s),t.setStyleAttribute(e[i],{"list-style-type":"none"}),t.setStyleAttribute(s,{"list-style-type":""}),c=p}t.append([s.parentNode],o),t.detach(e[i])}}else if("LI"===o.tagName){var h=t.createElement(e[i].parentNode.tagName);t.append([h],o),t.append([e[i]],h)}}else{var u=e[i];n=!0,this.noPreviousElement(u)}}return n},e.prototype.applyListsHandler=function(e){var t=this.parent.nodeSelection.getRange(this.parent.currentDocument);this.saveSelection=this.parent.nodeSelection.save(t,this.parent.currentDocument),this.currentAction=e.subCommand,this.currentAction=e.subCommand="NumberFormatList"===this.currentAction?"OL":"BulletFormatList"===this.currentAction?"UL":this.currentAction,this.domNode.setMarker(this.saveSelection);for(var n=this.domNode.blockNodes(),i=0;i<n.length;i++)"TABLE"!==n[i].tagName||t.collapsed||n.splice(i,1),n.length>0&&"LI"!==n[i].tagName&&"LI"===n[i].parentNode.tagName&&(n[i]=n[i].parentNode);this.applyLists(n,this.currentAction,e.selector,e.item),e.callBack&&e.callBack({requestType:this.currentAction,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e.prototype.applyLists=function(e,n,i,o){if(this.isRevert(e,n)&&t.isNullOrUndefined(o))this.revertList(e),this.removeEmptyListElements();else{this.checkLists(e,n,o);for(var r=0;r<e.length;r++)if(t.isNullOrUndefined(o)||t.isNullOrUndefined(o.listStyle)||("listImage"===o.listStyle?t.setStyleAttribute(e[r],{"list-style-image":o.listImage}):(t.setStyleAttribute(e[r],{"list-style-image":"none"}),t.setStyleAttribute(e[r],{"list-style-type":o.listStyle.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}))),"true"===e[r].getAttribute("contenteditable")&&1===e[r].childNodes.length&&"TABLE"===e[r].childNodes[0].nodeName){var s=document.createElement(n);s.innerHTML="<li><br/></li>",e[r].appendChild(s)}else if("LI"!==e[r].tagName&&t.isNullOrUndefined(o)){var a="<"+n+">",l="</"+n+">",d="li"+(h="IMG"===e[r].tagName?"":this.domNode.attributes(e[r])),c="p"===e[r].tagName.toLowerCase()?e[r].innerHTML:e[r].outerHTML,p=a+(u=this.domNode.createTagString(d,null,c))+l;this.domNode.replaceWith(e[r],p)}else if(!t.isNullOrUndefined(o)&&"LI"!==e[r].tagName){var h="IMG"===e[r].tagName?"":this.domNode.attributes(e[r]),a="<"+n+h+">",l="</"+n+">",d="li",c="p"===e[r].tagName.toLowerCase()?e[r].innerHTML:e[r].outerHTML,u=this.domNode.createTagString(d,null,c),p=a+u+l;this.domNode.replaceWith(e[r],p)}}this.cleanNode(),this.parent.editableElement.focus(),I()&&B(this.parent.editableElement,i),this.saveSelection=this.domNode.saveMarker(this.saveSelection),this.saveSelection.restore()},e.prototype.removeEmptyListElements=function(){for(var e=this.parent.editableElement.querySelectorAll("ol, ul"),n=0;n<e.length;n++)""===e[n].textContent.trim()&&t.detach(e[n])},e.prototype.isRevert=function(e,t){for(var n=!0,i=0;i<e.length;i++){if("LI"!==e[i].tagName)return!1;e[i].parentNode.tagName!==t&&(n=!1)}return n},e.prototype.checkLists=function(e,n,i){for(var o=[],r=0;r<e.length;r++){var s=e[r].parentNode;t.isNullOrUndefined(i)||"LI"!==e[r].tagName||t.isNullOrUndefined(i.listStyle)||("listImage"===i.listStyle?t.setStyleAttribute(s,{"list-style-image":i.listImage}):(t.setStyleAttribute(s,{"list-style-image":"none"}),t.setStyleAttribute(s,{"list-style-type":i.listStyle.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}))),("LI"===e[r].tagName&&s.tagName!==n&&o.indexOf(s)<0||"LI"===e[r].tagName&&s.tagName===n&&o.indexOf(s)<0&&null!==i)&&o.push(s)}for(var a=o.length-1;a>=0;a--){var l=o[a],d="<"+n.toLowerCase()+" "+this.domNode.attributes(l)+">"+l.innerHTML+"</"+n.toLowerCase()+">";this.domNode.replaceWith(o[a],d)}},e.prototype.cleanNode=function(){for(var e=this.parent.editableElement.querySelectorAll("ol + ol, ul + ul"),t=0;t<e.length;t++){var n=e[t];if(this.domNode.isList(n.previousElementSibling)&&this.domNode.openTagString(n)===this.domNode.openTagString(n.previousElementSibling)){for(var i=this.domNode.contents(n),o=0;o<i.length;o++)n.previousElementSibling.appendChild(i[o]);n.parentNode.removeChild(n)}}},e.prototype.findUnSelected=function(e,t){if((e=e.slice().reverse()).length>0){var n=[],i=[],o=[],r=[];o=t[t.length-1].childNodes;for(var s=0;s<o.length;s++)if("OL"===o[s].tagName||"UL"===o[s].tagName){var a=o[s].querySelectorAll("li");if(a.length>0)for(var l=0;l<a.length;l++)r.push(a[l])}for(var d=0;d<r.length;d++){for(var c=0,p=0;p<e.length;p++)r[d].contains(e[p])||(c+=1);c===e.length&&i.push(r[d])}if(i.length>0)for(var h=0;h<i.length;h++)"OL"!==this.domNode.contents(i[h])[0].nodeName&&"UL"!==this.domNode.contents(i[h])[0].nodeName&&n.push(i[h]);n.length>0&&this.nestedList(n)}},e.prototype.revertList=function(e){for(var n=[],i=e.length-1;i>=0;i--)for(var o=i-1;o>=0;o--)if(e[o].contains(e[i])||e[o]===e[i]){n.push(e[i]),e.splice(i,1);break}this.findUnSelected(n,e);for(var r=[],i=0;i<e.length;i++){var s=e[i];3===this.domNode.contents(s)[0].nodeType&&0===this.domNode.contents(s)[0].textContent.trim().length&&t.detach(this.domNode.contents(s)[0]);var a=e[i].parentNode,l=s.getAttribute("class");if(0===n.length){var d=e[i].querySelectorAll("ul, ol")[0];if(d&&d.querySelectorAll("li")){var c=t.createElement(d.tagName);t.append([c],d.parentNode);var p=t.createElement("li",{styles:"list-style-type: none;"});t.append([p],c),t.append([d],p)}}if(s.parentNode.insertBefore(this.closeTag(a.tagName),s),"LI"===a.parentNode.tagName)s.parentNode.insertBefore(this.closeTag("LI"),s);else{if(0===s.querySelectorAll(Mt.join(", ")).length){var h="<p"+(t.isNullOrUndefined(l)?' class="e-rte-wrap-inner"':' class="'+l+' e-rte-wrap-inner"')+this.domNode.attributes(a)+"></p>";this.domNode.wrapInner(s,this.domNode.parseHTMLFragment(h))}else if(3===this.domNode.contents(s)[0].nodeType){u=this.domNode.createTagString("p",a,this.parent.domNode.encode(this.domNode.contents(s)[0].textContent));this.domNode.replaceWith(this.domNode.contents(s)[0],u)}else if(this.domNode.contents(s)[0].classList.contains(Pt.startSelection)||this.domNode.contents(s)[0].classList.contains(Pt.endSelection)){var u=this.domNode.createTagString("p",a,this.domNode.contents(s)[0].outerHTML);this.domNode.replaceWith(this.domNode.contents(s)[0],u)}else{var m=s.firstChild;l=m.getAttribute("class"),t.attributes(m,this.domNode.rawAttributes(a)),l&&m.getAttribute("class")&&t.attributes(m,{class:l+" "+m.getAttribute("class")})}t.append([this.openTag("LI")],s),t.prepend([this.closeTag("LI")],s)}this.domNode.insertAfter(this.openTag(a.tagName),s),"LI"===a.parentNode.tagName&&(a=a.parentNode.parentNode),r.indexOf(a)<0&&r.push(a)}for(i=0;i<r.length;i++){var g=r[i],f=g.innerHTML;f=(f=f.replace(/<span class="e-rte-list-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="e-rte-list-open-([a-z]*)"><\/span>/g,"<$1 "+this.domNode.attributes(g)+">"),this.domNode.replaceWith(g,this.domNode.openTagString(g)+f.trim()+this.domNode.closeTagString(g))}for(var b=this.parent.editableElement.querySelectorAll("ul:empty, ol:empty"),i=0;i<b.length;i++)t.detach(b[i]);for(var v=this.parent.editableElement.querySelectorAll("li:empty"),i=0;i<v.length;i++)t.detach(v[i])},e.prototype.openTag=function(e){return this.domNode.parseHTMLFragment('<span class="e-rte-list-open-'+e.toLowerCase()+'"></span>')},e.prototype.closeTag=function(e){return this.domNode.parseHTMLFragment('<span class="e-rte-list-close-'+e.toLowerCase()+'"></span>')},e}(),Ut=function(){function e(){}return e.WrapBefore=function(e,t,n){return t.innerText=e.textContent,n?this.AppendBefore(t,e,!0):this.AppendBefore(t,e),e.parentNode&&e.parentNode.removeChild(e),t.childNodes[0]},e.Wrap=function(e,t){return this.AppendBefore(t,e),t.appendChild(e),e},e.unwrap=function(e){for(var t=e.parentNode,n=[];e.firstChild;null)n.push(t.insertBefore(e.firstChild,e));return t.removeChild(e),n},e.AppendBefore=function(e,t,n){return t.parentNode?n?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.insertBefore(e,t):t},e}(),jt=function(){function e(){this.position=-1,this.nodeSelection=new Bt}return e.prototype.GetSpliceNode=function(e,t){return t=this.SplitNode(e,t,!0),t=this.SplitNode(e,t,!1)},e.prototype.SplitNode=function(e,t,n){if(t){var i=e.cloneRange(),o=t.parentNode,r=this.nodeSelection.getIndex(t);i.collapse(n),n?i.setStartBefore(t):i.setEndAfter(t);var s=i.extractContents();if(n)t=o.childNodes[r],(s=this.spliceEmptyNode(s,!1))&&s.childNodes.length>0&&((a=!(1!==s.childNodes.length||"IMG"===s.childNodes[0].nodeName||!this.isImgElm(s)||""!==s.textContent))||(t?Ut.AppendBefore(s,t):(o.appendChild(s),(l=document.createElement("div")).innerHTML="",t=l.firstChild,o.appendChild(t))));else if(t=o.childNodes.length>1?o.childNodes[r]:o.childNodes[0],(s=this.spliceEmptyNode(s,!0))&&s.childNodes.length>0){var a=!(1!==s.childNodes.length||"IMG"===s.childNodes[0].nodeName||!this.isImgElm(s)||""!==s.textContent.trim());if(!a)if(t)Ut.AppendBefore(s,t,!0);else{o.appendChild(s);var l=document.createElement("div");l.innerHTML="",o.insertBefore(l.firstChild,o.firstChild),t=o.firstChild}}return t}return null},e.prototype.isImgElm=function(e){var n=!0;if(1===e.childNodes.length&&"IMG"!==e.childNodes[0].nodeName)for(var i=e.childNodes[0],o=0;!t.isNullOrUndefined(i.childNodes)&&o<i.childNodes.length;o++)"IMG"===i.childNodes[o].nodeName&&(n=!1);else n=!0;return n},e.prototype.spliceEmptyNode=function(e,t){var n;return n=1===e.childNodes.length&&"#text"===e.childNodes[0].nodeName&&""===e.childNodes[0].textContent||""===e.textContent?-1:e.childNodes.length-1,n>-1&&!t?this.spliceEmptyNode(e.childNodes[n],t):n>-1?this.spliceEmptyNode(e.childNodes[0],t):3!==e.nodeType&&11!==e.nodeType&&e.parentNode.removeChild(e),e},e.prototype.GetCursorStart=function(e,t,n){for(var i=(e=n?e:e.reverse())[0],o=0;o<e.length&&(n?e[o]<t:e[o]>=t);o++)i=e[o];return i},e.prototype.GetCursorRange=function(e,t,n){var i=e.createRange(),o=[];o.push(0);for(var r=this.TrimLineBreak(n.data),s=r.indexOf(" ",0);-1!==s;)o.indexOf(s)<0&&o.push(s),new RegExp("\\s").test(r[s-1])&&o.indexOf(s-1)<0&&o.push(s-1),new RegExp("\\s").test(r[s+1])&&o.push(s+1),s=r.indexOf(" ",s+1);if(o.push(r.length),o.indexOf(t.startOffset)>=0||o.indexOf(t.startOffset-1)>=0&&(1!==t.startOffset||1===t.startOffset&&new RegExp("\\s").test(r[0]))||o[o.length-1]-1===t.startOffset)i=t,this.position=1;else{var a=this.GetCursorStart(o,t.startOffset,!0);this.position=t.startOffset-a,i.setStart(t.startContainer,a),i.setEnd(t.startContainer,this.GetCursorStart(o,t.startOffset,!1))}return i},e.prototype.GetCursorNode=function(e,t,n){return this.GetSpliceNode(this.GetCursorRange(e,t,n),n)},e.prototype.TrimLineBreak=function(e){return e.replace(/(\r\n\t|\n|\r\t)/gm," ")},e}(),Ft=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("format-type",this.applyFormats,this),this.parent.observer.on("keyup-handler",this.onKeyUp,this),this.parent.observer.on("keydown-handler",this.onKeyDown,this)},e.prototype.getParentNode=function(e){for(;e.parentNode&&e.parentNode!==this.parent.editableElement;null)e=e.parentNode;return e},e.prototype.onKeyUp=function(e){var n=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=n.endContainer,o=i.lastChild;if(13===e.event.which&&n.startContainer===i&&3!==i.nodeType){var r=t.createElement("p");if(r.innerHTML="<br>","BR"===o.nodeName&&o.previousSibling&&"TABLE"===o.previousSibling.nodeName)i.replaceChild(r,o),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,r,0);else{var s=this.parent.nodeSelection.getSelectionNodeCollectionBr(n)[0];!t.isNullOrUndefined(s)&&"BR"===s.nodeName&&s.previousSibling&&"TABLE"===s.previousSibling.nodeName&&(i.replaceChild(r,s),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,r,0))}}},e.prototype.onKeyDown=function(e){if(13===e.event.which){var n=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=0===n.startContainer.textContent.length||"PRE"===n.startContainer.nodeName?n.startContainer:n.startContainer.parentElement,o=0===n.endContainer.textContent.length||"PRE"===n.endContainer.nodeName?n.endContainer:n.endContainer.parentElement,r=t.closest(i,"pre"),s=t.closest(o,"pre");if(!t.isNullOrUndefined(r)&&!t.isNullOrUndefined(r.parentElement)&&"LI"===r.parentElement.tagName)return;if((t.isNullOrUndefined(r)&&!t.isNullOrUndefined(s)||!t.isNullOrUndefined(r)&&t.isNullOrUndefined(s))&&(e.event.preventDefault(),this.deleteContent(n),this.removeCodeContent(n),n=this.parent.nodeSelection.getRange(this.parent.currentDocument),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0)),13===e.event.which&&!t.isNullOrUndefined(r)&&!t.isNullOrUndefined(s)){e.event.preventDefault(),this.deleteContent(n),this.removeCodeContent(n);var a=(n=this.parent.nodeSelection.getRange(this.parent.currentDocument)).startContainer.childNodes[n.endOffset],l=n.startContainer.childNodes[n.endOffset-1],d=n.startContainer;if(t.isNullOrUndefined(a)||t.isNullOrUndefined(l)||!t.isNullOrUndefined(a.nextSibling)||"BR"!==a.nodeName||"BR"!==l.nodeName)if(8203===d.textContent.charCodeAt(0)&&1===d.textContent.length||0===d.textContent.length){for(;"PRE"!==d.parentElement.nodeName&&(1===d.textContent.length||0===d.textContent.length);)d=d.parentElement;!t.isNullOrUndefined(d.previousSibling)&&"BR"===d.previousSibling.nodeName&&t.isNullOrUndefined(d.nextSibling)?this.paraFocus(d.parentElement):this.isNotEndCursor(r,n)}else this.isNotEndCursor(r,n);else this.paraFocus(n.startContainer)}}},e.prototype.removeCodeContent=function(e){var n=new RegExp(String.fromCharCode(65279),"g");if(!t.isNullOrUndefined(e.endContainer.textContent.match(n))){var i=65279===e.endContainer.textContent.charCodeAt(e.endOffset-1)?e.endOffset-2:e.endOffset;e.endContainer.textContent=e.endContainer.textContent.replace(n,""),""===e.endContainer.textContent?this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e.endContainer.parentElement,0):this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,e.endContainer,i)}},e.prototype.deleteContent=function(e){e.startContainer===e.endContainer&&e.startOffset===e.endOffset||e.deleteContents()},e.prototype.paraFocus=function(e){var n=t.createElement("p");n.innerHTML="<br>",this.parent.domNode.insertAfter(n,e),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,n,0),t.detach(e.lastChild)},e.prototype.isNotEndCursor=function(e,n){var i=new jt,o=n.startOffset===e.lastChild.textContent.length&&e.lastChild.textContent===n.startContainer.textContent;if(0===e.textContent.indexOf(n.startContainer.textContent)&&(0===n.startOffset&&0===n.endOffset||"PRE"===n.startContainer.nodeName)){this.insertMarker(e,n);var r=t.createElement("br");e.childNodes[n.endOffset].parentElement.insertBefore(r,e.childNodes[n.endOffset])}else{var s=i.SplitNode(n,e,!0);this.insertMarker(e,n);var a=e.previousElementSibling;"PRE"===a.tagName&&(a.insertAdjacentHTML("beforeend","<br>"+s.innerHTML),t.detach(e))}this.setCursorPosition(o,e)},e.prototype.setCursorPosition=function(e,n){var i=!1,o=this.parent.editableElement.querySelector(".tempSpan"),r=o.parentElement;if(""===o.parentNode.textContent?i=!0:this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),e)if(i)r===n?(this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),t.detach(o)):this.focusSelectionParent(o,r);else{var s=t.createElement("br");this.parent.domNode.insertAfter(s,o),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,o,0),t.detach(o)}else i?this.focusSelectionParent(o,r):t.detach(o)},e.prototype.focusSelectionParent=function(e,n){t.detach(e),n.innerHTML="",this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,n,0)},e.prototype.insertMarker=function(e,n){var i=t.createElement("span",{className:"tempSpan"});"PRE"===n.startContainer.nodeName?e.childNodes[n.endOffset].parentElement.insertBefore(i,e.childNodes[n.endOffset]):n.startContainer.parentElement.insertBefore(i,n.startContainer)},e.prototype.applyFormats=function(e){var n=this.parent.nodeSelection.getRange(this.parent.currentDocument),i=!1;this.parent.editableElement!==n.endContainer||t.isNullOrUndefined(this.parent.editableElement.children[n.endOffset-1])||"TABLE"!==this.parent.editableElement.children[n.endOffset-1].tagName||n.collapsed||(i=!0);var o=this.parent.nodeSelection.save(n,this.parent.currentDocument);this.parent.domNode.setMarker(o);for(var r=this.parent.domNode.blockNodes(),s=0;s<r.length;s++){var a=void 0,l=void 0;if("blockquote"===e.subCommand.toLowerCase()?(a=this.getParentNode(r[s]),l=this.parent.domNode.isList(a)||"TABLE"===a.tagName?a.outerHTML:a.innerHTML):l=(a=r[s]).innerHTML,!(e.subCommand.toLowerCase()===a.tagName.toLowerCase()&&("pre"!==e.subCommand.toLowerCase()||!t.isNullOrUndefined(e.exeValue)&&"dropDownSelect"===e.exeValue.name)||t.isNullOrUndefined(a.parentNode)||"TABLE"===a.tagName&&"pre"===e.subCommand.toLowerCase())){this.cleanFormats(a,e.subCommand);var d="pre"===e.subCommand.toLowerCase()&&"pre"===a.tagName.toLowerCase()?"p":e.subCommand,c=this.parent.domNode.createTagString(d,a,l.replace(/>\s+</g,"><"));"LI"===a.tagName?(a.innerHTML="",a.insertAdjacentHTML("beforeend",c)):this.parent.domNode.replaceWith(a,c)}}this.preFormatMerge();var p=this.parent.editableElement.querySelector("."+Pt.startSelection),h=this.parent.editableElement.querySelector("."+Pt.endSelection);t.isNullOrUndefined(p)||t.isNullOrUndefined(h)||(p=p.lastChild,h=h.lastChild),o=this.parent.domNode.saveMarker(o,null),I()&&B(this.parent.editableElement,e.selector),i?this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,p,h,0,h.textContent.length):o.restore(),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e.prototype.preFormatMerge=function(){var e=this.parent.editableElement.querySelectorAll("PRE");if(!t.isNullOrUndefined(e))for(var n=0;n<e.length;n++){var i=e[n].previousElementSibling;t.isNullOrUndefined(i)||"PRE"!==i.tagName||(i.insertAdjacentHTML("beforeend","<br>"+e[n].innerHTML),t.detach(e[n]))}},e.prototype.cleanFormats=function(e,t){var n=["display","font-size","margin-top","margin-bottom","margin-left","margin-right","font-weight"];t=t.toLowerCase();for(var i=0;i<n.length&&"p"!==t&&"blockquote"!==t&&"pre"!==t;i++)e.style.removeProperty(n[i])},e}(),zt=function(){function e(){}return e.Insert=function(e,n,i,o){var r;if("string"==typeof n)(s=document.createElement("div")).innerHTML=n,r=o?s:s.firstChild;else if(o&&(t.isNullOrUndefined(n)||t.isNullOrUndefined(n.classList)||!n.classList.contains("pasteContent"))){var s=document.createElement("div");s.appendChild(n),r=s}else r=n;var a=new Bt,l=new jt,d=a.getRange(e),c=d.startOffset===d.endOffset&&0===d.startOffset&&d.startContainer===d.endContainer,p=d.collapsed,h=this.getNodeCollection(d,a,r),u="table"===r.nodeName.toLowerCase()?this.closestEle(h[0].parentNode,i):h[0];if(o||!t.isNullOrUndefined(r)&&!t.isNullOrUndefined(r.classList)&&r.classList.contains("pasteContent"))return void this.pasteInsertHTML(h,r,d,a,l,e,p,u,i);if(i!==d.startContainer&&(!p&&(u.nodeType!==Node.ELEMENT_NODE||-1===It.indexOf(u.tagName.toLocaleLowerCase()))||"table"===r.nodeName.toLowerCase()&&u&&-1===It.indexOf(u.tagName.toLocaleLowerCase()))){var m=l.GetSpliceNode(d,u),g=m.previousSibling,f=m.parentNode;if(1===h.length||"table"===r.nodeName.toLowerCase()&&0===m.childElementCount)a.setSelectionContents(e,m),d=a.getRange(e);else{var b=l.GetSpliceNode(d,h[h.length-1].parentElement);b=t.isNullOrUndefined(b)?m:b,a.setSelectionText(e,m,b,0,3===b.nodeType?b.textContent.length:b.childNodes.length),d=a.getRange(e)}d.extractContents(),"TABLE"===n.tagName&&this.removeEmptyElements(i);for(var v=0;v<h.length;v++)if(3!==h[v].nodeType&&null!=h[v].parentNode){if("IMG"===h[v].nodeName)continue;h[v].parentNode.removeChild(h[v])}if(g)Ut.AppendBefore(r,g,!0);else{for(var y=null;f!==i&&f.firstChild&&""===f.textContent.trim();)y=f,f=f.parentNode;null!==y&&(f=y),f.firstChild&&(f!==i||"TABLE"===r.nodeName&&c&&f===d.startContainer&&f===d.endContainer)?""===f.textContent.trim()&&f!==i?(Ut.AppendBefore(r,f,!1),t.detach(f)):Ut.AppendBefore(r,f.firstChild,!1):f.appendChild(r)}"IMG"===r.nodeName?this.imageFocus(r,a,e):3!==r.nodeType?a.setSelectionText(e,r,r,0,r.childNodes.length):a.setSelectionText(e,r,r,0,r.textContent.length)}else{if(d.deleteContents(),c&&""===d.startContainer.textContent&&(d.startContainer.innerHTML=""),t.Browser.isIE){var C=e.createDocumentFragment();C.appendChild(r),d.insertNode(C)}else d.insertNode(r);3!==r.nodeType&&r.childNodes.length>0?a.setSelectionText(e,r,r,1,1):"IMG"===r.nodeName?this.imageFocus(r,a,e):3!==r.nodeType?a.setSelectionContents(e,r):a.setSelectionText(e,r,r,r.textContent.length,r.textContent.length)}},e.pasteInsertHTML=function(e,n,i,o,r,s,a,l,d){var c=i.startOffset===i.endOffset&&i.startContainer===i.endContainer;if(c&&i.startContainer===d&&""===d.textContent){var p=this.getImmediateBlockNode(e[e.length-1],d);o.setSelectionText(s,p,p,0,0),i=o.getRange(s)}var h,u,m,g;d!==i.startContainer&&(!a&&(l.nodeType!==Node.ELEMENT_NODE||-1===It.indexOf(l.tagName.toLocaleLowerCase()))||"table"===n.nodeName.toLowerCase()&&l&&-1===It.indexOf(l.tagName.toLocaleLowerCase()))&&(g=r.GetSpliceNode(i,l),u=t.isNullOrUndefined(g.previousSibling)?g.parentNode.previousSibling:g.previousSibling,1===e.length?(o.setSelectionContents(s,g),i=o.getRange(s),m=!0):(h=r.GetSpliceNode(i,e[e.length-1].parentElement),h=t.isNullOrUndefined(h)?g:h,o.setSelectionText(s,g,h,0,3===h.nodeType?h.textContent.length:h.childNodes.length),i=o.getRange(s),m=!1));var f=!1;this.removingComments(n);for(var b=n.childNodes,v=0;v<b.length;v++)if(Mt.indexOf(b[v].nodeName.toLocaleLowerCase())>=0){f=!0;break}var y,C=document.createDocumentFragment();if(f){this.insertTempNode(i,n,e,r,d);var S=!0,T=void 0,E=void 0,N=void 0;for(i.deleteContents();n.firstChild;)if("#text"!==n.firstChild.nodeName||""!==n.firstChild.textContent.trim())if("#text"===n.firstChild.nodeName&&S||this.inlineNode.indexOf(n.firstChild.nodeName.toLocaleLowerCase())>=0&&S){if(y=n.firstChild,t.isNullOrUndefined(n.previousElementSibling)){var w=t.createElement("p");n.parentElement.insertBefore(w,n)}n.previousElementSibling.appendChild(n.firstChild)}else y=n.firstChild,"#text"===n.firstChild.nodeName||this.inlineNode.indexOf(n.firstChild.nodeName.toLocaleLowerCase())>=0?(T?(N.appendChild(n.firstChild),C.appendChild(N)):((E=t.createElement("p")).appendChild(n.firstChild),C.appendChild(E)),N=E,T=!0):(C.appendChild(n.firstChild),T=!1),S=!1;else t.detach(n.firstChild);n.parentNode.replaceChild(C,n)}else if(c){var k=t.createElement("span",{className:"tempSpan"});for(i.insertNode(k);n.firstChild;)y=n.firstChild,C.appendChild(n.firstChild);k.parentNode.replaceChild(C,k)}else{for(;n.firstChild;)y=n.firstChild,C.appendChild(n.firstChild);m?g.parentNode.replaceChild(C,g):(i.deleteContents(),t.detach(h),t.isNullOrUndefined(u)?d.appendChild(C):u.parentNode.appendChild(C))}"#text"===y.nodeName?this.placeCursorEnd(y,n,o,s,d):this.cursorPos(y,n,o,s,d)},e.placeCursorEnd=function(e,n,i,o,r){for(e="BR"===e.nodeName?t.isNullOrUndefined(e.previousSibling)?e.parentNode:e.previousSibling:e;!t.isNullOrUndefined(e)&&"#text"!==e.nodeName&&"IMG"!==e.nodeName&&"BR"!==e.nodeName&&"HR"!==e.nodeName;)e=e.lastChild;"IMG"===(e=t.isNullOrUndefined(e)?n:e).nodeName?this.imageFocus(e,i,o):i.setSelectionText(o,e,e,e.textContent.length,e.textContent.length),this.removeEmptyElements(r)},e.getNodeCollection=function(e,t,n){var i=[];return e.startOffset===e.endOffset&&e.startContainer===e.endContainer&&("TD"===e.startContainer.nodeName||3!==e.startContainer.nodeType&&n.classList&&n.classList.contains("pasteContent"))?i.push(e.startContainer.childNodes[e.endOffset]):i=t.getInsertNodeCollection(e),i},e.insertTempNode=function(e,n,i,o,r){if(e.startContainer!==r||t.isNullOrUndefined(e.startContainer.childNodes[e.endOffset-1])||"TABLE"!==e.startContainer.childNodes[e.endOffset-1].nodeName)if(e.startContainer!==r||t.isNullOrUndefined(e.startContainer.childNodes[e.endOffset])||"TABLE"!==e.startContainer.childNodes[e.endOffset].nodeName)if(e.startContainer===e.endContainer&&3!==e.startContainer.nodeType&&"HR"===n.firstChild.nodeName)e.startContainer.classList.contains("e-content")||"BODY"===e.startContainer.nodeName?e.startContainer.appendChild(n):e.startContainer.parentNode.insertBefore(n,e.startContainer);else{var s=this.getImmediateBlockNode(i[i.length-1],r);if((t.isNullOrUndefined(s)||t.isNullOrUndefined(s.parentElement))&&3!==e.endContainer.nodeType&&(s=e.endContainer,e.setEnd(s,e.endContainer.textContent.length)),"TD"===s.nodeName||"TH"===s.nodeName){var a=t.createElement("span",{className:"tempSpan"});e.insertNode(a),a.parentNode.replaceChild(n,a)}else{var l=o.GetSpliceNode(e,s);l.parentNode.replaceChild(n,l)}}else e.startContainer.insertBefore(n,e.startContainer.childNodes[e.endOffset]);else t.isNullOrUndefined(e.startContainer.childNodes[e.endOffset-1].nextSibling)?e.startContainer.appendChild(n):e.startContainer.insertBefore(n,e.startContainer.childNodes[e.endOffset-1].nextSibling)},e.cursorPos=function(e,n,i,o,r){e.classList.add("lastNode"),r.innerHTML=P(r.innerHTML),e=r.querySelector(".lastNode"),t.isNullOrUndefined(e)||(this.placeCursorEnd(e,n,i,o,r),e.classList.remove("lastNode"),0===e.classList.length&&e.removeAttribute("class"))},e.imageFocus=function(e,t,n){var i=document.createTextNode(" ");e.parentNode.insertBefore(i,e.nextSibling),t.setSelectionText(n,e.nextSibling,e.nextSibling,0,0)},e.getImmediateBlockNode=function(e,t){do{e=e.parentNode}while(e&&Mt.indexOf(e.nodeName.toLocaleLowerCase())<0);return e},e.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.findDetachEmptyElem=function(e){return t.isNullOrUndefined(e.parentElement)?null:""===e.parentElement.textContent.trim()&&"true"!==e.parentElement.contentEditable?this.findDetachEmptyElem(e.parentElement):e},e.removeEmptyElements=function(e){for(var n=e.querySelectorAll(":empty"),i=0;i<n.length;i++)if("IMG"!==n[i].tagName&&"BR"!==n[i].tagName&&"IFRAME"!==n[i].tagName&&"TD"!==n[i].tagName&&"SOURCE"!==n[i].tagName&&"HR"!==n[i].tagName){var o=this.findDetachEmptyElem(n[i]);t.isNullOrUndefined(o)||t.detach(o)}},e.closestEle=function(e,n){for(var i=e;i&&1===i.nodeType;){if(i.parentNode===n||!t.isNullOrUndefined(i.parentNode.tagName)&&-1!==Rt.indexOf(i.parentNode.tagName.toLocaleLowerCase()))return i;i=i.parentNode}return null},e.inlineNode=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],e}(),_t=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Dt,this.linkCommand,this)},e.prototype.linkCommand=function(e){switch(e.value.toString().toLocaleLowerCase()){case"createlink":case"editlink":this.createLink(e);break;case"openlink":this.openLink(e);break;case"removelink":this.removeLink(e)}},e.prototype.createLink=function(e){var n=!t.isNullOrUndefined(e.item.selectParent)&&e.item.selectParent.length>0&&t.closest(e.item.selectParent[0],"a");if(n=t.isNullOrUndefined(n)?!t.isNullOrUndefined(e.item.selectParent)&&e.item.selectParent.length>0?e.item.selectParent[0]:null:n,t.isNullOrUndefined(n)||"A"!==n.tagName){var i=(new Bt).getRange(this.parent.currentDocument),o=!!t.isNullOrUndefined(e.item.text)||e.item.text.replace(/ /g,"").localeCompare(i.toString().replace(/\n/g," ").replace(/ /g,""))<0;if(e.event&&"keydown"===e.event.type&&(32===e.event.keyCode||13===e.event.keyCode)||"Paste"===e.item.action||i.collapsed||o){var r=this.createAchorNode(e);if(r.innerText=""===e.item.text?e.item.url:e.item.text,e.item.selection.restore(),zt.Insert(this.parent.currentDocument,r,this.parent.editableElement),!e.event||"keydown"!==e.event.type||32!==e.event.keyCode&&13!==e.event.keyCode){d="Paste"===e.item.action?r.childNodes[0].textContent.length:0;e.item.selection.setSelectionText(this.parent.currentDocument,r.childNodes[0],r.childNodes[0],d,r.childNodes[0].textContent.length)}else{var s=e.item.selection.range.startContainer;s.textContent=this.removeText(s.textContent,e.item.text)}}else this.createLinkNode(e)}else{var a=n,l="";if(t.isNullOrUndefined(e.item.url)||a.setAttribute("href",e.item.url),t.isNullOrUndefined(e.item.title)||a.setAttribute("title",e.item.title),t.isNullOrUndefined(e.item.text)||""===e.item.text||(l=a.innerText,a.innerText=e.item.text),t.isNullOrUndefined(e.item.target)?a.removeAttribute("target"):a.setAttribute("target",e.item.target),l===e.item.text)e.item.selection.setSelectionText(this.parent.currentDocument,a,a,1,1),e.item.selection.restore();else{var d="Paste"===e.item.action?a.childNodes[0].textContent.length:0;e.item.selection.setSelectionText(this.parent.currentDocument,a.childNodes[0],a.childNodes[0],d,a.childNodes[0].textContent.length)}}e.callBack&&e.callBack({requestType:"Links",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.createLinkNode=function(e){for(var t,n,i=new Bt,o=new jt,r=i.getRange(this.parent.currentDocument),s=this.getSelectionNodes(i.getNodeCollection(r)),a=i.save(r,this.parent.currentDocument),l=[],d=[],c=[],p=[],h=[],u=0;u<s.length;u++)s[u]=o.GetSpliceNode(r,s[u]),l[u]=s[u];for(f=0;f<l.length;f++){var m=!0;for(t=l[f];!0===m;){if("A"===t.parentNode.nodeName){var g=t.parentNode;t.parentNode.parentNode.insertBefore(g.firstChild,g),t.parentNode.removeChild(g)}this.isBlockNode(t.parentNode)||0===l.length||0===f||f===l.length-1?(d[f]=t,m=!1):t=t.parentNode}}for(var f=0,b=0;f<d.length;f++)if(0===f&&(h[b]=d[f]),d.length>1&&f<d.length-1){if(d[f].parentElement===d[f+1].parentElement&&d[f]===d[f+1])continue;h[b+1]=d[f+1],b++}var v=0;p[v]=this.createAchorNode(e);for(f=0;f<h.length;f++)if(0===f&&(n=h[f].cloneNode(!0),p[f].appendChild(n)),f<h.length-1)if(h[f].parentNode===h[f+1].parentNode){var y=h[f+1].cloneNode(!0);p[v].appendChild(y)}else p[v+=1]=this.createAchorNode(e),n=h[f+1].cloneNode(!0),p[v].appendChild(n);this.parent.nodeSelection.setRange(document,a.range);for(var f=0,C=0,S=0;f<=h.length;f++)0===f&&(h[f].parentNode.insertBefore(p[C],h[f].nextSibling),1===this.parent.domNode.blockNodes().length&&this.parent.nodeSelection.setSelectionNode(this.parent.currentDocument,p[C]),c[S]=h[f],S++),f<h.length-1&&(h[f].parentNode===h[f+1].parentNode?(c[S]=h[f+1],S++):(C+=1,h[f+1].parentNode.insertBefore(p[C],h[f+1]),c[S]=h[f+1],S++));for(f=0;f<c.length;f++)c[f].parentNode&&c[f].parentNode.removeChild(c[f])},e.prototype.createAchorNode=function(e){var n=t.createElement("a",{className:"e-rte-anchor",attrs:{href:e.item.url,title:t.isNullOrUndefined(e.item.title)||""===e.item.title?e.item.url:e.item.title}});return t.isNullOrUndefined(e.item.target)||n.setAttribute("target",e.item.target),n},e.prototype.getSelectionNodes=function(e){e=e.reverse();for(var t=0;t<e.length;t++)3===e[t].nodeType&&""!==e[t].textContent.trim()||"IMG"!==e[t].nodeName&&(e.splice(t,1),t--);return e.reverse()},e.prototype.isBlockNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&Mt.indexOf(e.tagName.toLowerCase())>=0},e.prototype.removeText=function(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]===t&&(n.splice(i,1),i--);return n.join(" ")+" "},e.prototype.openLink=function(e){document.defaultView.open(e.item.url,e.item.target),this.callBack(e)},e.prototype.removeLink=function(e){var n=this.parent.domNode.blockNodes();if(n.length<2){this.parent.domNode.setMarker(e.item.selection);for(var i=t.closest(e.item.selectParent[0],"a"),o=i||e.item.selectParent[0],r=o.parentNode,s=[];o.firstChild;null)s.push(r.insertBefore(o.firstChild,o));r.removeChild(o),s&&1===s.length&&(e.item.selection.startContainer=e.item.selection.getNodeArray(s[s.length-1],!0),e.item.selection.endContainer=e.item.selection.startContainer),e.item.selection=this.parent.domNode.saveMarker(e.item.selection)}else for(var a=0;a<n.length;a++)for(var l=n[a].querySelectorAll("a"),d=0;d<l.length;d++)document.getSelection().containsNode(l[d],!0)&&(l[d].outerHTML=l[d].innerHTML);e.item.selection.restore(),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}(),qt=function(){function e(e){this.alignments={JustifyLeft:"left",JustifyCenter:"center",JustifyRight:"right",JustifyFull:"justify"},this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("alignment-type",this.applyAlignment,this),this.parent.observer.on("keydown-handler",this.onKeyDown,this)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"justify-center":this.applyAlignment({subCommand:"JustifyCenter",callBack:e.callBack}),e.event.preventDefault();break;case"justify-full":this.applyAlignment({subCommand:"JustifyFull",callBack:e.callBack}),e.event.preventDefault();break;case"justify-left":this.applyAlignment({subCommand:"JustifyLeft",callBack:e.callBack}),e.event.preventDefault();break;case"justify-right":this.applyAlignment({subCommand:"JustifyRight",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.getTableNode=function(e){var n=e.startContainer.nodeType===Node.ELEMENT_NODE?e.startContainer:e.startContainer.parentNode;return[t.closest(n,"td,th")]},e.prototype.applyAlignment=function(e){var n="Table"===e.value,i=this.parent.nodeSelection.getRange(this.parent.currentDocument),o=this.parent.nodeSelection.save(i,this.parent.currentDocument);if(n)t.setStyleAttribute(this.getTableNode(i)[0],{"text-align":this.alignments[e.subCommand]});else{this.parent.domNode.setMarker(o);for(var r=this.parent.domNode.blockNodes(),s=0;s<r.length;s++){var a=r[s];t.setStyleAttribute(a,{"text-align":this.alignments[e.subCommand]})}for(var l=this.parent.domNode.getImageTagInSelection(),s=0;s<l.length;s++){var d=[];d.push(l[s]),this.parent.imgObj.imageCommand({item:{selectNode:d},subCommand:e.subCommand,value:e.subCommand,callBack:e.callBack,selector:e.selector})}this.parent.editableElement.focus(),o=this.parent.domNode.saveMarker(o),I()&&B(this.parent.editableElement,e.selector),o.restore()}e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:n?this.getTableNode(i):this.parent.domNode.blockNodes()})},e}(),Qt=function(){function e(e){this.indentValue=20,this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("indent-type",this.applyIndents,this),this.parent.observer.on("keydown-handler",this.onKeyDown,this)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"indents":this.applyIndents({subCommand:"Indent",callBack:e.callBack}),e.event.preventDefault();break;case"outdents":this.applyIndents({subCommand:"Outdent",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.applyIndents=function(e){var t=this.parent.editableElement,n=t.classList.contains("e-rtl"),i=this.parent.nodeSelection.getRange(this.parent.currentDocument),o=this.parent.nodeSelection.save(i,this.parent.currentDocument);this.parent.domNode.setMarker(o);for(var r=this.parent.domNode.blockNodes(),s=r.slice(),a=[],l=0;l<s.length;l++)"LI"!==s[l].tagName&&"LI"===s[l].parentNode.tagName?(r.splice(r.indexOf(s[l]),1),a.push(s[l].parentNode)):"LI"===s[l].tagName&&(r.splice(r.indexOf(s[l]),1),a.push(s[l]));a.length>0&&this.parent.observer.notify("keydown-handler",{event:{preventDefault:function(){},stopPropagation:function(){},shiftKey:"Indent"!==e.subCommand,which:9,action:"indent"},ignoreDefault:!0});for(l=0;l<r.length;l++){var d=r[l],c=n?d.style.marginRight:d.style.marginLeft,p=void 0;"Indent"===e.subCommand?(p=""===c?this.indentValue+"px":parseInt(c,null)+this.indentValue+"px",n?d.style.marginRight=p:d.style.marginLeft=p):(p=""===c||"0px"===c?"":parseInt(c,null)-this.indentValue+"px",n?d.style.marginRight=p:d.style.marginLeft=p)}t.focus(),I()&&B(t,e.selector),(o=this.parent.domNode.saveMarker(o)).restore(),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.domNode.blockNodes()})},e}(),Vt="e-img-caption",Wt=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(xt,this.imageCommand,this)},e.prototype.imageCommand=function(e){switch(e.value.toString().toLocaleLowerCase()){case"image":case"replace":this.createImage(e);break;case"insertlink":this.insertImageLink(e);break;case"openimagelink":this.openImageLink(e);break;case"editimagelink":this.editImageLink(e);break;case"removeimagelink":this.removeImageLink(e);break;case"remove":this.removeImage(e);break;case"alttext":this.insertAltTextImage(e);break;case"dimension":this.imageDimension(e);break;case"caption":this.imageCaption(e);break;case"justifyleft":this.imageJustifyLeft(e);break;case"justifycenter":this.imageJustifyCenter(e);break;case"justifyright":this.imageJustifyRight(e);break;case"inline":this.imageInline(e);break;case"break":this.imageBreak(e)}},e.prototype.createImage=function(e){var n=this,i=!1;if(e.item.url=t.isNullOrUndefined(e.item.url)||"undefined"===e.item.url?e.item.src:e.item.url,t.isNullOrUndefined(e.item.selectParent)||"IMG"!==e.item.selectParent[0].tagName){var o=t.createElement("img");this.setStyle(o,e),t.isNullOrUndefined(e.item.selection)||e.item.selection.restore(),t.isNullOrUndefined(e.selector)||"pasteCleanupModule"!==e.selector?zt.Insert(this.parent.currentDocument,o,this.parent.editableElement):e.callBack({requestType:"Images",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:[o]})}else{var r=e.item.selectParent[0];this.setStyle(r,e),i=!0}if(e.callBack&&(t.isNullOrUndefined(e.selector)||!t.isNullOrUndefined(e.selector)&&"pasteCleanupModule"!==e.selector)){var s=this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)[0],a="Replace"===e.value||i?e.item.selectParent[0]:t.Browser.isIE?s.previousSibling:s.previousElementSibling;a.addEventListener("load",function(){e.callBack({requestType:"Images",editorMode:"HTML",event:e.event,range:n.parent.nodeSelection.getRange(n.parent.currentDocument),elements:[a]})})}},e.prototype.setStyle=function(e,n){t.isNullOrUndefined(n.item.url)||e.setAttribute("src",n.item.url),e.setAttribute("class","e-rte-image"+(t.isNullOrUndefined(n.item.cssClass)?"":" "+n.item.cssClass)),t.isNullOrUndefined(n.item.altText)||e.setAttribute("alt",n.item.altText),t.isNullOrUndefined(n.item.width)||t.isNullOrUndefined(n.item.width.width)||e.setAttribute("width",this.calculateStyleValue(n.item.width.width)),t.isNullOrUndefined(n.item.height)||t.isNullOrUndefined(n.item.height.height)||e.setAttribute("height",this.calculateStyleValue(n.item.height.height)),t.isNullOrUndefined(n.item.width)||t.isNullOrUndefined(n.item.width.minWidth)||(e.style.minWidth=this.calculateStyleValue(n.item.width.minWidth)),t.isNullOrUndefined(n.item.width)||t.isNullOrUndefined(n.item.width.maxWidth)||(e.style.maxWidth=this.calculateStyleValue(n.item.width.maxWidth)),t.isNullOrUndefined(n.item.height)||t.isNullOrUndefined(n.item.height.minHeight)||(e.style.minHeight=this.calculateStyleValue(n.item.height.minHeight)),t.isNullOrUndefined(n.item.height)||t.isNullOrUndefined(n.item.height.maxHeight)||(e.style.maxHeight=this.calculateStyleValue(n.item.height.maxHeight))},e.prototype.calculateStyleValue=function(e){return"string"==typeof e&&(e.indexOf("px")||e.indexOf("%")||e.indexOf("auto"))?e:e+"px"},e.prototype.insertImageLink=function(e){var n=t.createElement("a",{attrs:{href:e.item.url}});e.item.selectNode[0].parentElement.classList.contains("e-img-wrap")&&(e.item.selection.restore(),n.setAttribute("contenteditable","true")),n.appendChild(e.item.selectNode[0]),t.isNullOrUndefined(e.item.target)||n.setAttribute("target",e.item.target),zt.Insert(this.parent.currentDocument,n,this.parent.editableElement),this.callBack(e)},e.prototype.openImageLink=function(e){document.defaultView.open(e.item.url,e.item.target),this.callBack(e)},e.prototype.removeImageLink=function(e){var n=e.item.selectParent[0];if(n.classList.contains("e-img-caption")){var i=t.select(".e-img-wrap",n),o=t.select(".e-img-inner",n),r=o.cloneNode(!0);t.detach(t.select("a",n)),t.detach(o),i.appendChild(e.item.insertElement),i.appendChild(r)}else t.detach(n),t.Browser.isIE&&e.item.selection.restore(),zt.Insert(this.parent.currentDocument,e.item.insertElement,this.parent.editableElement);this.callBack(e)},e.prototype.editImageLink=function(e){e.item.selectNode[0].parentElement.href=e.item.url,t.isNullOrUndefined(e.item.target)?e.item.selectNode[0].parentElement.removeAttribute("target"):e.item.selectNode[0].parentElement.target=e.item.target,this.callBack(e)},e.prototype.removeImage=function(e){t.closest(e.item.selectNode[0],"a")?"A"!==e.item.selectNode[0].parentElement.nodeName||t.isNullOrUndefined(e.item.selectNode[0].parentElement.innerText)?t.detach(t.closest(e.item.selectNode[0],"a")):t.detach(e.item.selectNode[0]):t.isNullOrUndefined(t.closest(e.item.selectNode[0],".e-img-caption"))?t.detach(e.item.selectNode[0]):t.detach(t.closest(e.item.selectNode[0],".e-img-caption")),this.callBack(e)},e.prototype.insertAltTextImage=function(e){e.item.selectNode[0].setAttribute("alt",e.item.altText),this.callBack(e)},e.prototype.imageDimension=function(e){var t=e.item.selectNode[0];t.style.height="",t.style.width="",t.width=e.item.width,t.height=e.item.height,this.callBack(e)},e.prototype.imageCaption=function(e){zt.Insert(this.parent.currentDocument,e.item.insertElement,this.parent.editableElement),this.callBack(e)},e.prototype.imageJustifyLeft=function(e){var n=e.item.selectNode[0];n.removeAttribute("class"),t.addClass([n],"e-rte-image"),t.isNullOrUndefined(t.closest(n,".e-img-caption"))||(t.removeClass([t.closest(n,".e-img-caption")],"e-imgright"),t.addClass([t.closest(n,".e-img-caption")],"e-imgleft")),"A"===n.parentElement.nodeName?(t.removeClass([n.parentElement],"e-imgright"),t.addClass([n.parentElement],"e-imgleft"),t.addClass([n],"e-imgleft")):t.addClass([n],"e-imgleft"),this.callBack(e)},e.prototype.imageJustifyCenter=function(e){var n=e.item.selectNode[0];n.removeAttribute("class"),t.addClass([n],"e-rte-image"),t.isNullOrUndefined(t.closest(n,".e-img-caption"))||(t.removeClass([t.closest(n,".e-img-caption")],"e-imgleft"),t.removeClass([t.closest(n,".e-img-caption")],"e-imgright"),t.addClass([t.closest(n,".e-img-caption")],"e-imgcenter")),"A"===n.parentElement.nodeName?(t.removeClass([n.parentElement],"e-imgleft"),t.removeClass([n.parentElement],"e-imgright"),t.addClass([n.parentElement],"e-imgcenter"),t.addClass([n],"e-imgcenter")):t.addClass([n],"e-imgcenter"),this.callBack(e)},e.prototype.imageJustifyRight=function(e){var n=e.item.selectNode[0];n.removeAttribute("class"),t.addClass([n],"e-rte-image"),t.isNullOrUndefined(t.closest(n,".e-img-caption"))||(t.removeClass([t.closest(n,".e-img-caption")],"e-imgleft"),t.addClass([t.closest(n,".e-img-caption")],"e-imgright")),"A"===n.parentElement.nodeName?(t.removeClass([n.parentElement],"e-imgleft"),t.addClass([n.parentElement],"e-imgright"),t.addClass([n],"e-imgright")):t.addClass([n],"e-imgright"),this.callBack(e)},e.prototype.imageInline=function(e){var n=e.item.selectNode[0];n.removeAttribute("class"),t.addClass([n],"e-rte-image"),t.addClass([n],"e-imginline"),t.isNullOrUndefined(t.closest(n,".e-img-caption"))||(t.removeClass([t.closest(n,".e-img-caption")],"e-imgbreak"),t.removeClass([t.closest(n,".e-img-caption")],"e-imgcenter"),t.removeClass([t.closest(n,".e-img-caption")],"e-imgleft"),t.removeClass([t.closest(n,".e-img-caption")],"e-imgright"),t.addClass([t.closest(n,".e-img-caption")],"e-caption-inline")),this.callBack(e)},e.prototype.imageBreak=function(e){var n=e.item.selectNode[0];n.removeAttribute("class"),t.addClass([n],"e-imgbreak"),t.addClass([n],"e-rte-image"),t.isNullOrUndefined(t.closest(n,".e-img-caption"))||(t.removeClass([t.closest(n,".e-img-caption")],"e-caption-inline"),t.removeClass([t.closest(n,".e-img-caption")],"e-imgcenter"),t.removeClass([t.closest(n,".e-img-caption")],"e-imgleft"),t.removeClass([t.closest(n,".e-img-caption")],"e-imgright"),t.addClass([t.closest(n,".e-img-caption")],"e-imgbreak")),this.callBack(e)},e.prototype.callBack=function(e){e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}(),Gt=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on(Ot,this.createTable,this),this.parent.observer.on("INSERT-ROW",this.insertRow,this),this.parent.observer.on("INSERT-COLUMN",this.insertColumn,this),this.parent.observer.on("DELETE-ROW",this.deleteRow,this),this.parent.observer.on("DELETE-COLUMN",this.deleteColumn,this),this.parent.observer.on("REMOVE-TABLE",this.removeTable,this),this.parent.observer.on("TABLE-HEADER",this.tableHeader,this),this.parent.observer.on("TABLE_VERTICAL_ALIGN",this.tableVerticalAlign,this),this.parent.observer.on("TABLE_MERGE",this.cellMerge,this),this.parent.observer.on("TABLE_HORIZONTAL_SPLIT",this.HorizontalSplit,this),this.parent.observer.on("TABLE_VERTICAL_SPLIT",this.VerticalSplit,this),this.parent.observer.on("TABLE_MOVE",this.tableMove,this)},e.prototype.createTable=function(e){var n=t.createElement("table",{className:"e-rte-table"}),i=t.createElement("tbody");t.isNullOrUndefined(e.item.width.width)||(n.style.width=this.calculateStyleValue(e.item.width.width)),t.isNullOrUndefined(e.item.width.minWidth)||(n.style.minWidth=this.calculateStyleValue(e.item.width.minWidth)),t.isNullOrUndefined(e.item.width.maxWidth)||(n.style.maxWidth=this.calculateStyleValue(e.item.width.maxWidth));for(var o=parseInt(e.item.width.width,10)>100?100/e.item.columns:parseInt(e.item.width.width,10)/e.item.columns,r=0;r<e.item.row;r++){for(var s=t.createElement("tr"),a=0;a<e.item.columns;a++){var l=t.createElement("td");l.appendChild(t.createElement("br")),l.style.width=o+"%",s.appendChild(l)}i.appendChild(s)}if(n.appendChild(i),e.item.selection.restore(),zt.Insert(this.parent.currentDocument,n,this.parent.editableElement),this.removeEmptyNode(),e.item.selection.setSelectionText(this.parent.currentDocument,n.querySelector("td"),n.querySelector("td"),0,0),null===n.nextElementSibling){var d=t.createElement("p");d.appendChild(t.createElement("br")),this.insertAfter(d,n)}return n.querySelector("td").classList.add("e-cell-select"),e.callBack&&e.callBack({requestType:"Table",editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:[n]}),n},e.prototype.calculateStyleValue=function(e){return"string"==typeof e&&(e.indexOf("px")||e.indexOf("%")||e.indexOf("auto"))?e:e+"px"},e.prototype.removeEmptyNode=function(){for(var e=this.parent.editableElement.querySelectorAll("ul:empty, ol:empty"),n=0;n<e.length;n++)t.detach(e[n]);for(var i=this.parent.editableElement.querySelectorAll("li *:empty"),n=0;n<i.length;n++)t.detach(i[n]),i.length===n+1&&(i=this.parent.editableElement.querySelectorAll("li *:empty"),n=-1);for(var o=this.parent.editableElement.querySelectorAll("li:empty"),n=0;n<o.length;n++)t.detach(o[n])},e.prototype.insertAfter=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},e.prototype.getSelectedCellMinMaxIndex=function(e){for(var t=this.curTable.querySelectorAll(".e-cell-select"),n=0,i=e.length,o=0,r=e[0].length,s=0;n<t.length;n++){var a=this.getCorrespondingIndex(t[n],e),l=this.FindIndex(a[0],a[1],e);i=Math.min(a[0],i),o=Math.max(l[0],o),r=Math.min(a[1],r),s=Math.max(l[1],s)}return{startRow:i,endRow:o,startColumn:r,endColumn:s}},e.prototype.insertRow=function(e){var n="InsertRowBefore"!==e.item.subCommand,i=e.item.selection.range.startContainer;if("TH"!==i.nodeName&&"TD"!==i.nodeName&&(i=t.closest(i.parentElement,"td,th")),"th"!==i.nodeName.toLowerCase()||"InsertRowBefore"!==e.item.subCommand){if(this.curTable=t.closest(this.parent.nodeSelection.range.startContainer.parentElement,"table"),0===this.curTable.querySelectorAll(".e-cell-select").length){var o=this.curTable.rows[this.curTable.rows.length-1],r=o.cloneNode(!0);r.removeAttribute("rowspan"),this.insertAfter(r,o)}else{for(var s=this.getCorrespondingColumns(),a=this.getSelectedCellMinMaxIndex(s),l=n?a.endRow:a.startRow,d=t.createElement("tr"),c=this.curTable.querySelectorAll("th.e-cell-select").length>0,p=0;p<s[l].length;p++)if(n&&l<s.length-1&&s[l][p]===s[l+1][p]||!n&&0<l&&s[l][p]===s[l-1][p])(0===p||0<p&&s[l][p]!==s[l][p-1])&&s[l][p].setAttribute("rowspan",(parseInt(s[l][p].getAttribute("rowspan"),10)+1).toString());else{var h=t.createElement("td");h.appendChild(t.createElement("br")),d.appendChild(h),h.setAttribute("style",s[c&&n?l+1:l][p].getAttribute("style"))}var u=void 0;u=c&&n?this.curTable.querySelector("tbody").childNodes[0]:this.curTable.rows[l],"InsertRowBefore"===e.item.subCommand?u.parentElement.insertBefore(d,u):c?u.parentElement.insertBefore(d,u):this.insertAfter(d,u)}e.item.selection.setSelectionText(this.parent.currentDocument,e.item.selection.range.startContainer,e.item.selection.range.startContainer,0,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.insertColumn=function(e){var n=e.item.selection.range.startContainer;"TH"!==n.nodeName&&"TD"!==n.nodeName&&(n=t.closest(n.parentElement,"td,th"));for(var i,o=t.closest(n,"tr"),r=t.closest(o,"table").rows,s=Array.prototype.slice.call(o.querySelectorAll("th,td")).indexOf(n),a=parseInt(e.item.width,10)/(o.querySelectorAll("td,th").length+1),l=0;l<t.closest(o,"table").querySelectorAll("th,td").length;l++)t.closest(o,"table").querySelectorAll("th,td")[l].style.width=a+"%";for(var d=0;d<r.length;d++){var c=(i=r[d].querySelectorAll("th,td")[s]).cloneNode(!0);c.innerHTML="",c.appendChild(t.createElement("br")),c.removeAttribute("class"),c.removeAttribute("colspan"),c.removeAttribute("rowspan"),"InsertColumnLeft"===e.item.subCommand?i.parentElement.insertBefore(c,i):this.insertAfter(c,i)}e.item.selection.setSelectionText(this.parent.currentDocument,n,n,0,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.deleteColumn=function(e){var n=e.item.selection.range.startContainer;3===n.nodeType&&(n=t.closest(n.parentElement,"td,th"));var i=t.closest(n,"TH"===n.tagName?"thead":"tbody"),o=i&&Array.prototype.indexOf.call(i.childNodes,n.parentNode);if(this.curTable=t.closest(n,"table"),1===t.closest(n,"tr").querySelectorAll("th,td").length)e.item.selection.restore(),t.detach(t.closest(n.parentElement,"table"));else{for(var r=void 0,s=this.getCorrespondingColumns(),a=this.getSelectedCellMinMaxIndex(s),l=a.startColumn,d=a.endColumn,c=0;c<s.length;c++)for(var p=s[c],h=0;h<p.length;h++){var u=p[h],m=this.getCorrespondingIndex(u,s),g=parseInt(u.getAttribute("colspan"),10)||1;m[1]+(g-1)>=l&&m[1]<=d&&(g>1?u.setAttribute("colspan",(g-1).toString()):(t.detach(u),r=h,t.Browser.isIE&&(e.item.selection.setSelectionText(this.parent.currentDocument,this.curTable.querySelector("td"),this.curTable.querySelector("td"),0,0),this.curTable.querySelector("td, th").classList.add("e-cell-select"))))}if(r>-1){var f=i.children[o],b=f&&f.children[r<=f.children.length-1?r:r-1];b&&(e.item.selection.setSelectionText(this.parent.currentDocument,b,b,0,0),b.classList.add("e-cell-select"))}}if(e.callBack){var v=this.parent.nodeSelection.getRange(this.parent.currentDocument).startContainer;if("TD"!==v.nodeName){var y=this.parent.nodeSelection.getRange(this.parent.currentDocument).startOffset,C=v.children[y];C&&this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,C,0)}e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.deleteRow=function(e){var n=e.item.selection.range.startContainer;3===n.nodeType&&(n=t.closest(n.parentElement,"td,th"));var i=Array.prototype.indexOf.call(n.parentNode.childNodes,n);this.curTable=t.closest(n,"table");var o,r,s,a=this.getCorrespondingColumns(),l=this.getSelectedCellMinMaxIndex(a);if(1===this.curTable.rows.length)e.item.selection.restore(),t.detach(t.closest(n.parentElement,"table"));else for(r=l.endRow;r>=l.startRow;r--){for(o=this.curTable.rows[r],s=0;s<a[r].length;s++){if((0===s||a[r][s]!==a[r][s-1])&&1<parseInt(a[r][s].getAttribute("rowspan"),10)){var d=parseInt(a[r][s].getAttribute("rowspan"),10)-1;1===d?a[r][s].removeAttribute("rowspan"):a[r][s].setAttribute("rowspan",d.toString())}if(r<a.length-1&&a[r][s]===a[r+1][s]&&(0===r||a[r][s]!==a[r-1][s])){var c=a[r][s],p=void 0;for(p=s;0<p&&a[r][p]===a[r][p-1];p--)0===p?this.curTable.rows[r+1].prepend(c):a[r+1][p-1].insertAdjacentElement("afterend",c)}}var h=o.rowIndex;this.curTable.deleteRow(h);var u=t.isNullOrUndefined(this.curTable.rows[h])?this.curTable.querySelectorAll("tbody tr")[h-1]:this.curTable.querySelectorAll("tbody tr")[h],m=u&&u.querySelectorAll("td")[i];m?(e.item.selection.setSelectionText(this.parent.currentDocument,m,m,0,0),m.classList.add("e-cell-select")):(e.item.selection.setSelectionText(this.parent.currentDocument,this.curTable.querySelector("td"),this.curTable.querySelector("td"),0,0),this.curTable.querySelector("td, th").classList.add("e-cell-select"))}e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.removeTable=function(e){var n=e.item.selection.range.startContainer;n=3===n.nodeType?n.parentNode:n;var i=t.closest(n.parentElement,"table");i&&(e.item.selection.restore(),t.detach(i)),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.tableHeader=function(e){var n=!1,i=e.item.selection.range.startContainer;i=3===i.nodeType?i.parentNode:i;var o=t.closest(i.parentElement,"table");if([].slice.call(o.childNodes).forEach(function(e){"THEAD"===e.nodeName&&(n=!0)}),o&&!n){for(var r=o.querySelector("tr").childElementCount,s=0,a=0;a<r;a++)s+=parseInt(o.querySelector("tr").children[a].getAttribute("colspan"),10)||1;for(var l=o.createTHead().insertRow(0),d=0;d<s;d++){var c=t.createElement("th");c.appendChild(t.createElement("br")),l.appendChild(c)}}else o.deleteTHead();e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.tableVerticalAlign=function(e){"AlignTop"===e.item.subCommand?e.item.tableCell.style.verticalAlign="top":"AlignMiddle"===e.item.subCommand?e.item.tableCell.style.verticalAlign="middle":e.item.tableCell.style.verticalAlign="bottom",e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e.prototype.cellMerge=function(e){t.isNullOrUndefined(this.curTable)&&(this.curTable=t.closest(this.parent.nodeSelection.range.startContainer.parentElement,"table"));var n=this.curTable.querySelectorAll(".e-cell-select");if(!(n.length<2)){this.mergeCellContent();var i=this.getSelectedMinMaxIndexes(this.getCorrespondingColumns()),o=n[0],r=o.parentElement.querySelectorAll(".e-cell-select");i.startColumn<i.endColumn&&o.setAttribute("colspan",(i.endColumn-i.startColumn+1).toString()),i.startRow<i.endRow&&o.setAttribute("rowspan",(i.endRow-i.startRow+1).toString());for(var s=0,a=r.length-1;a>=0;a--)s+=parseFloat(r[a].style.width);o.style.width=s+"%";for(l=1;l<=n.length-1;l++)t.detach(n[l]);for(var l=0;l<this.curTable.rows.length;l++)""===this.curTable.rows[l].innerHTML&&t.detach(this.curTable.rows[l]);this.updateRowSpanStyle(i.startRow,i.endRow,this.getCorrespondingColumns()),this.updateColSpanStyle(i.startColumn,i.endColumn,this.getCorrespondingColumns()),e.item.selection.setSelectionText(this.parent.currentDocument,e.item.selection.range.startContainer,e.item.selection.range.startContainer,0,0),this.parent.nodeSelection.range&&this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,this.parent.nodeSelection.range.endContainer,0),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.updateColSpanStyle=function(e,t,n){var i,o,r,s,a=0,l=0,d=n;if(e<(t=Math.min(t,d[0].length-1))){for(o===e;o<=t;o++)if(!(e<o&&d[0][o]===d[0][o-1])&&1<(a=Math.min(parseInt(d[0][o].getAttribute("colspan"),10)||1,t-e+1))&&d[0][o]===d[0][o+1])for(l=a-1,i=1;i<d.length;i++){if(d[i][o]!==d[i-1][o])for(r=o;r<o+a;r++)if(1<(s=parseInt(d[i][r].getAttribute("colspan"),10)||1)&&d[i][r]===d[i][r+1])r+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&this.updateCellAttribute(d,l,"colspan",0,d.length-1,e,t)}},e.prototype.updateRowSpanStyle=function(e,t,n){var i,o,r,s,a=0,l=0,d=n;if(e<(t=Math.min(t,d.length-1))){for(i=e;i<=t;i++)if(!(e<i&&d[i][0]===d[i-1][0])&&1<(a=Math.min(parseInt(d[i][0].getAttribute("rowspan"),10)||1,t-e+1))&&d[i][0]===d[i+1][0])for(l=a-1,o=1;o<d[0].length;o++)if(d[i][o]!==d[i][o-1]){for(r=i;r<i+a;r++)if(1<(s=parseInt(d[r][o].getAttribute("rowspan"),10)||1)&&d[r][o]===d[r+1][o])r+=l=Math.min(l,s-1);else if(!(l=Math.max(0,l-1)))break;if(!l)break}l&&this.updateCellAttribute(d,l,"rowspan",e,t,0,d[0].length-1)}},e.prototype.updateCellAttribute=function(e,t,n,i,o,r,s){var a,l,d;for(a=i;a<=o;a++)for(l=r;l<=s;l++)i<a&&e[a][l]===e[a-1][l]||r<l&&e[a][l]===e[a][l-1]||1<(d=parseInt(e[a][l].getAttribute(n),10)||1)&&(1<d-t?e[a][l].setAttribute(n,(d-t).toString()):e[a][l].removeAttribute(n))},e.prototype.mergeCellContent=function(){for(var e=this.curTable.querySelectorAll(".e-cell-select"),t=e[0].innerHTML,n=1;n<e.length-1;n++)"<br>"!==e[n].innerHTML&&(t+=e[n].innerHTML);e[0].innerHTML=t},e.prototype.getSelectedMinMaxIndexes=function(e){var t=this.curTable.querySelectorAll(".e-cell-select");if(0<t.length){for(var n=e.length,i=0,o=e[0].length,r=0,s=0;s<t.length;s++){var a=this.getCorrespondingIndex(t[s],e),l=this.FindIndex(a[0],a[1],e);n=Math.min(a[0],n),i=Math.max(l[0],i),o=Math.min(a[1],o),r=Math.max(l[1],r)}return{startRow:n,endRow:i,startColumn:o,endColumn:r}}return null},e.prototype.HorizontalSplit=function(e){var n=e.item.selection.range.startContainer;if(this.curTable=t.closest(n.parentElement,"table"),!(this.curTable.querySelectorAll(".e-cell-select").length>1)){this.activeCell=this.curTable.querySelector(".e-cell-select");var i=this.activeCell.cloneNode(!0);i.removeAttribute("class"),i.innerHTML="</br>";var o=this.getCorrespondingIndex(this.activeCell,this.getCorrespondingColumns()),r=this.getCorrespondingColumns(),s=this.activeCell.getAttribute("rowspan")?parseInt(this.activeCell.getAttribute("rowspan"),10):1;if(s>1){var a=Math.ceil(s/2);1<a?this.activeCell.setAttribute("rowspan",a.toString()):this.activeCell.removeAttribute("rowspan"),1<s-a?i.setAttribute("rowspan",(s-a).toString()):i.removeAttribute("rowspan");var l=void 0,d=void 0;for(l=o[0]+Math.ceil(s/2),d=0===o[1]?o[1]:o[1]-1;0<=d&&(r[l][d]===r[l][d-1]||0<l&&r[l][d]===r[l-1][d]);)d--;-1===d?this.curTable.rows[l].firstChild?this.curTable.rows[l].prepend(i):this.curTable.appendChild(i):r[l][d].insertAdjacentElement("afterend",i)}else{var c=t.createElement("tr");c.appendChild(i);for(var p=r[o[0]],h=0;h<=p.length-1;h++)p[h]!==p[h-1]&&p[h]!==this.activeCell&&p[h].setAttribute("rowspan",((parseInt(p[h].getAttribute("rowspan"),10)?parseInt(p[h].getAttribute("rowspan"),10):1)+1).toString());this.activeCell.parentNode.insertAdjacentElement("afterend",c)}e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.VerticalSplit=function(e){var n=e.item.selection.range.startContainer;if(this.curTable=t.closest(n.parentElement,"table"),!(this.curTable.querySelectorAll(".e-cell-select").length>1)){this.activeCell=this.curTable.querySelector(".e-cell-select");var i=this.curTable.rows,o=this.activeCell.cloneNode(!0);o.removeAttribute("class"),o.innerHTML="</br>";var r=parseFloat(this.activeCell.style.width)/2;if("TH"===this.activeCell.tagName&&isNaN(r)){for(var s=this.curTable.querySelector("tr").childElementCount,a=0,l=0;l<s;l++)a+=parseInt(this.curTable.querySelector("tr").children[l].getAttribute("colspan"),10)||1;r=parseFloat((this.activeCell.offsetWidth/2/this.curTable.offsetWidth*100).toFixed(1))}var d=this.getCorrespondingIndex(this.activeCell,this.getCorrespondingColumns()),c=this.getCorrespondingColumns(),p=parseInt(this.activeCell.getAttribute("colspan"),10);if(p>1)1<Math.ceil(p/2)?this.activeCell.setAttribute("colspan",(p/2).toString()):this.activeCell.removeAttribute("colspan"),1<p-p/2?o.setAttribute("colspan",(p-p/2).toString()):o.removeAttribute("colspan");else for(l=0;l<=i.length-1;l++)if(0===l||c[l][d[1]]!==c[l-1][d[1]]){var h=c[l][d[1]];h!==this.activeCell&&h.setAttribute("colspan",((parseInt(h.getAttribute("colspan"),10)?parseInt(h.getAttribute("colspan"),10):1)+1).toString())}this.activeCell.style.width=r+"%",o.style.width=r+"%",this.activeCell.parentNode.insertBefore(o,this.activeCell.nextSibling),e.callBack&&e.callBack({requestType:e.item.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})}},e.prototype.getCorrespondingColumns=function(){for(var e=[],t=this.curTable.querySelectorAll("tr"),n=0;n<=t.length-1;n++)for(var i=t[n],o=0,r=0;r<=i.children.length-1;r++){for(var s=i.children[r],a=s,l=parseInt(a.getAttribute("colspan"),10)||1,d=parseInt(a.getAttribute("rowspan"),10)||1,c=n;c<n+d;c++)for(var p=o;p<o+l;p++)e[c]||(e[c]=[]),e[c][p]?o++:e[c][p]=s;o+=0}return e},e.prototype.FindIndex=function(e,t,n){var i,o;for(i=e+1,o=t+1;i<n.length;){if(n[i][t]!==n[e][t]){i--;break}i++}for(i===n.length&&i--;o<n[e].length;){if(n[e][o]!==n[e][t]){o--;break}o++}return o===n[e].length&&o--,[i,o]},e.prototype.getCorrespondingIndex=function(e,t){for(var n=0;n<t.length;n++)for(var i=0;i<t[n].length;i++)if(t[n][i]===e)return[n,i];return[]},e.prototype.highlightCells=function(e,t,n,i,o){var r,s,a,l,d=e,c=t,p=n,h=i,u=new Kt;for(r=d;r<=c;r++){for((1<(parseInt(o[r][p].getAttribute("rowspan"),10)||1)||1<(parseInt(o[r][p].getAttribute("colspan"),10)||1))&&(l=this.FindIndex((a=this.getCorrespondingIndex(o[r][p],o))[0],a[1],o))?(d=Math.min(a[0],d),c=Math.max(l[0],c),p=Math.min(a[1],p),h=Math.max(l[1],h)):(1<(parseInt(o[r][h].getAttribute("rowspan"),10)||1)||1<(parseInt(o[r][h].getAttribute("colspan"),10)||1))&&(l=this.FindIndex((a=this.getCorrespondingIndex(o[r][h],o))[0],a[1],o))&&(d=Math.min(a[0],d),c=Math.max(l[0],c),p=Math.min(a[1],p),h=Math.max(l[1],h)),s=p;s<=h;s++)(1<(parseInt(o[d][s].getAttribute("rowspan"),10)||1)||1<(parseInt(o[d][s].getAttribute("colspan"),10)||1))&&(l=this.FindIndex((a=this.getCorrespondingIndex(o[d][s],o))[0],a[1],o))?(d=Math.min(a[0],d),c=Math.max(l[0],c),p=Math.min(a[1],p),h=Math.max(l[1],h)):(1<(parseInt(o[c][s].getAttribute("rowspan"),10)||1)||1<(parseInt(o[c][s].getAttribute("colspan"),10)||1))&&(l=this.FindIndex((a=this.getCorrespondingIndex(o[c][s],o))[0],a[1],o))&&(d=Math.min(a[0],d),c=Math.max(l[0],c),p=Math.min(a[1],p),h=Math.max(l[1],h));u=d===e&&c===t&&p===n&&h===i?{startRow:e,endRow:t,startColumn:n,endColumn:i}:this.highlightCells(d,c,p,h,o)}return u},e.prototype.tableMove=function(e){this.activeCell=e.selectNode[0];var n=e.event.target,i=this.activeCell.tagName,o=n.tagName;if(this.curTable=t.closest(n,"table"),this.curTable.querySelectorAll(".e-cell-select").length>1&&this.parent.nodeSelection.Clear(this.parent.currentDocument),"TD"===n.tagName||"TH"===n.tagName||i===o){for(var r=Array.prototype.slice.call(this.activeCell.parentElement.parentElement.children).indexOf(this.activeCell.parentElement),s=Array.prototype.slice.call(this.activeCell.parentElement.children).indexOf(this.activeCell),a=Array.prototype.slice.call(n.parentElement.parentElement.children).indexOf(n.parentElement),l=Array.prototype.slice.call(n.parentElement.children).indexOf(n),d=this.curTable.querySelectorAll(".e-cell-select"),c=d.length-1;c>=0;c--)this.activeCell!==d[c]&&d[c].classList.remove("e-cell-select");if(r!==a||s!==l){for(var p=this.getCorrespondingColumns(),h=this.getCorrespondingIndex(this.activeCell,p),u=this.getCorrespondingIndex(n,p),m=this.highlightCells(Math.min(h[0],u[0]),Math.max(h[0],u[0]),Math.min(h[1],u[1]),Math.max(h[1],u[1]),p),g=m.startRow;g<=m.endRow;g++)for(var f=m.startColumn;f<=m.endColumn;f++)p[g][f].classList.add("e-cell-select");this.parent.nodeSelection.range&&(this.parent.nodeSelection.setSelectionText(this.parent.currentDocument,this.parent.nodeSelection.range.endContainer,this.parent.nodeSelection.range.endContainer,0,0),this.parent.nodeSelection.setCursorPoint(this.parent.currentDocument,this.parent.nodeSelection.range.endContainer,0))}}},e}(),Kt=function(){function e(){}return e}(),Xt=function(){function e(){}return e.prototype.getFormattedNode=function(e,t,n){var i=this.getFormatParent(e,t,n);return null!==i&&i!==n?i:null},e.prototype.getFormatParent=function(e,t,n){do{e=e.parentNode}while(e&&e!==n&&!this.isFormattedNode(e,t));return e},e.prototype.isFormattedNode=function(t,n){switch(n){case"bold":return e.isBold(t);case"italic":return e.isItalic(t);case"underline":return e.isUnderline(t);case"strikethrough":return e.isStrikethrough(t);case"superscript":return e.isSuperscript(t);case"subscript":return e.isSubscript(t);case"fontcolor":return this.isFontColor(t);case"fontname":return this.isFontName(t);case"fontsize":return this.isFontSize(t);case"backgroundcolor":return this.isBackgroundColor(t);default:return!1}},e.isBold=function(e){return-1!==["strong","b"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"bold"!==e.style.fontWeight)},e.isItalic=function(e){return-1!==["em","i"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"italic"!==e.style.fontStyle)},e.isUnderline=function(e){return-1!==["u"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"underline"!==e.style.textDecoration)},e.isStrikethrough=function(e){return-1!==["del","strike"].indexOf(e.nodeName.toLowerCase())||!(-1===this.inlineTags.indexOf(e.nodeName.toLowerCase())||!e.style||"line-through"!==e.style.textDecoration)},e.isSuperscript=function(e){return-1!==["sup"].indexOf(e.nodeName.toLowerCase())},e.isSubscript=function(e){return-1!==["sub"].indexOf(e.nodeName.toLowerCase())},e.prototype.isFontColor=function(t){var n=t.style&&t.style.color;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.prototype.isBackgroundColor=function(t){var n=t.style&&t.style.backgroundColor;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.prototype.isFontSize=function(t){var n=t.style&&t.style.fontSize;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.prototype.isFontName=function(t){var n=t.style&&t.style.fontFamily;return-1!==e.inlineTags.indexOf(t.nodeName.toLowerCase())&&null!==n&&""!==n&&void 0!==n},e.inlineTags=["a","abbr","acronym","b","bdo","big","cite","code","dfn","em","i","kbd","label","q","samp","small","span","strong","sub","sup","tt","u","var"],e}(),Yt=function(){function e(){}return e.applyFormat=function(e,n,i,o,r){if(["bold","italic","underline","strikethrough","superscript","subscript","uppercase","lowercase","fontcolor","fontname","fontsize","backgroundcolor"].indexOf(n)>-1){"backgroundcolor"===n&&""===o&&(o="transparent");var s=!1,a=new Bt,l=new At(i,e),d=new jt,c=new Xt,p=a.getRange(e),h=a.save(p,e),u=p.collapsed?a.getSelectionNodeCollection(p):a.getSelectionNodeCollectionBr(p),m=!1,g=!1,f=!1,b=["fontcolor","fontname","fontsize","backgroundcolor"].indexOf(n)>-1;if(p.collapsed)if(u.length>0)m=!0,p=d.GetCursorRange(e,p,u[0]);else if(3===p.startContainer.nodeType&&p.startContainer.parentElement.childElementCount>0&&p.startOffset>0&&"br"!==p.startContainer.parentElement.firstElementChild.tagName.toLowerCase())m=!0,p=d.GetCursorRange(e,p,p.startContainer),u.push(p.startContainer);else{var v=this.insertCursorNode(e,a,p,c,d,n,o,i);a.endContainer=a.startContainer=a.getNodeArray(v,!0);var y="BR"===v.nodeName&&v.parentNode.childNodes;t.isNullOrUndefined(y)||1!==y.length||"BR"!==y[0].nodeName||0!==u.length?a.endOffset=a.startOffset=1:(a.setSelectionText(e,p.startContainer,p.endContainer,0,0),s=!0)}f=p.collapsed;for(var C=!1,S=0;S<u.length;S++){var T=c.getFormattedNode(u[S],n,i);null===T&&("subscript"===n?C=null!==(T=c.getFormattedNode(u[S],"superscript",i)):"superscript"===n&&(C=null!==(T=c.getFormattedNode(u[S],"subscript",i)))),0===S&&null===T&&(g=!0),u[S]=null===T||g&&!b?this.insertFormat(e,u,S,T,f,g,b,p,d,n,o):this.removeFormat(u,S,T,f,g,b,p,d,n,o,a,i,l),a=this.applySelection(u,a,d,S,m)}I()&&B(i,r),s||h.restore(),C&&this.applyFormat(e,n,i)}},e.insertCursorNode=function(e,t,n,i,o,r,s,a){var l=t.getNodeCollection(n),d=l.length>0?l.length>1&&n.startContainer===n.endContainer?this.getCursorFormat(i,l,r,a):i.getFormattedNode(l[0],r,a):null,c=null;return d?(c=l[0],Ut.unwrap(d)):(l.length>1&&n.startOffset>0&&l[0].firstElementChild&&"br"===l[0].firstElementChild.tagName.toLowerCase()&&(l[0].innerHTML=""),c=this.getInsertNode(e,n,r,s).firstChild),c},e.getCursorFormat=function(e,t,n,i){for(var o,r=0;r<t.length;r++)o=t[r].lastElementChild?t[r].lastElementChild:t[r];return e.getFormattedNode(o,n,i)},e.removeFormat=function(e,n,i,o,r,s,a,l,d,c,p,h,u){var m=null;if(a.startContainer!==a.endContainer||0!==a.startOffset||a.endOffset!==a.startContainer.length){var g=[],f=e[n];do{g.push(p.getIndex(f)),f=f.parentNode}while(f&&f!==i);if("BR"!==e[n].nodeName&&(f=m=o&&i.textContent.length-1===a.startOffset?l.SplitNode(a,i,!0):l.GetSpliceNode(a,i)),o){for(var b=m;null!==b.firstChild&&3!==b.firstChild.nodeType;null)b=b.firstChild;b.innerHTML="​",e[n]=b.firstChild}else{for(;f&&f.childNodes.length>0&&g.length-1>=0&&f.childNodes.length>g[g.length-1];)f=f.childNodes[g[g.length-1]],g.pop();if("BR"!==e[n].nodeName)if(3!==f.nodeType||o&&""===f.nodeValue){var v=document.createElement("div");v.innerHTML="​",3!==f.nodeType?(f.insertBefore(v.firstChild,f.firstChild),e[n]=f.firstChild):(f.parentNode.insertBefore(v.firstChild,f),e[n]=f.previousSibling,f.parentNode.removeChild(f))}else e[n]=f}}var y;"backgroundcolor"===d&&(y=i.style.fontSize);var C;if("fontsize"===d){var S=t.closest(e[n].parentElement,"span[style*=background-color]");t.isNullOrUndefined(S)||(C=S.style.backgroundColor)}var T=i.getAttribute("style"),E=i.tagName,N=Ut.unwrap(i);if(N[0]&&!s)for(var w=N[n]?N[n]:N[0],k=w;w&&w.parentElement&&w.parentElement!==h;w=w)w.parentElement&&w.parentElement.tagName.toLocaleLowerCase()===i.tagName.toLocaleLowerCase()&&(w.parentElement.childElementCount>1||a.startOffset>1)?(k.parentElement&&k.parentElement.tagName.toLocaleLowerCase()===i.tagName.toLocaleLowerCase()&&a.startOffset===a.endOffset&&1!==k.nodeType&&!t.isNullOrUndefined(k.textContent)&&k.parentElement.childElementCount>1&&(a.setStart(k,0),a.setEnd(k,k.textContent.length),l.SplitNode(a,k.parentElement,!1)),Ut.unwrap(w.parentElement),w=t.isNullOrUndefined(w.parentElement)||u.isBlockNode(w.parentElement)?w.parentElement:k):w=w.parentElement;if(N.length>0&&s){for(var L=0;L<N.length;L++)N[L]=Ut.Wrap(N[L],this.GetFormatNode(d,c,E,T)),0===L?a.setStartBefore(N[L]):L===N.length-1&&a.setEndAfter(N[L]);var x=e[n].parentElement;if(t.isNullOrUndefined(y)||""===y||(x.style.fontSize=y),t.isNullOrUndefined(C)||""===C||(x.style.backgroundColor=C),"backgroundcolor"===d&&!t.isNullOrUndefined(y)&&""!==y&&x.parentElement.innerHTML===x.outerHTML){var O=x.parentElement;O.parentElement.insertBefore(x,O),t.detach(O)}if("fontsize"===d||"fontcolor"===d){for(var D=e[n].parentElement,M=e[n].parentElement;!t.isNullOrUndefined(M)&&"li"!==M.tagName.toLowerCase();)D=M=M.parentElement;t.isNullOrUndefined(D)||"li"!==D.tagName.toLowerCase()||D.textContent.trim()!==e[n].textContent.trim()||("fontsize"===d?D.style.fontSize=c:(D.style.color=c,D.style.textDecoration="inherit"))}}return e[n]},e.insertFormat=function(e,n,i,o,r,s,a,l,d,c,p){if(r)if("uppercase"!==c&&"lowercase"!==c){h=this.getInsertNode(e,l,c,p);n[i]=h.firstChild,d.position=1}else d.position=l.startOffset;else if(null===o&&s||a){if("BR"!==n[i].nodeName&&(n[i]=d.GetSpliceNode(l,n[i]),n[i].textContent=d.TrimLineBreak(n[i].textContent)),"uppercase"===c||"lowercase"===c)n[i].textContent="uppercase"===c?n[i].textContent.toLocaleUpperCase():n[i].textContent.toLocaleLowerCase();else if(!0!==a||""!==p){var h=this.GetFormatNode(c,p);if("fontsize"===c||"fontcolor"===c){for(var u=n[i].parentElement,m=n[i].parentElement;!t.isNullOrUndefined(m)&&"li"!==m.tagName.toLowerCase();)u=m=m.parentElement;if(t.isNullOrUndefined(u)||"li"!==u.tagName.toLowerCase()||u.textContent.trim()!==n[i].textContent.trim()||("fontsize"===c?u.style.fontSize=p:(u.style.color=p,u.style.textDecoration="inherit")),n[i]=this.applyStyles(n,i,h),"fontsize"===c){var g=t.closest(n[i].parentElement,"span[style*=background-color]");t.isNullOrUndefined(g)||(n[i].parentElement.style.backgroundColor=g.style.backgroundColor)}}else n[i]=this.applyStyles(n,i,h)}}else n[i]=d.GetSpliceNode(l,n[i]);return n[i]},e.applyStyles=function(e,t,n){return e[t]=t===e.length-1||"BR"===e[t].nodeName?Ut.Wrap(e[t],n):Ut.WrapBefore(e[t],n,!0),e[t]=this.getChildNode(e[t],n),e[t]},e.getInsertNode=function(e,n,i,o){var r=this.GetFormatNode(i,o);if(r.innerHTML="​",t.Browser.isIE){var s=e.createDocumentFragment();s.appendChild(r),n.insertNode(s)}else n.insertNode(r);return r},e.getChildNode=function(e,t){return void 0!==e&&null!==e||(t.innerHTML="​",e=t.firstChild),e},e.applySelection=function(e,t,n,i,o){return 1!==e.length||o?1===e.length&&o?(t.startContainer=t.getNodeArray(e[i],!0),t.endContainer=t.startContainer,t.startOffset=n.position,t.endOffset=n.position):0===i?(t.startContainer=t.getNodeArray(e[i],!0),t.startOffset=0):i===e.length-1&&(t.endContainer=t.getNodeArray(e[i],!1),t.endOffset=e[i].textContent.length):(t.startContainer=t.getNodeArray(e[i],!0),t.endContainer=t.startContainer,t.startOffset=0,t.endOffset=e[i].textContent.length),t},e.GetFormatNode=function(e,t,n,i){var o;switch(e){case"bold":return document.createElement("strong");case"italic":return document.createElement("em");case"underline":return o=document.createElement("span"),this.updateStyles(o,n,i),o.style.textDecoration="underline",o;case"strikethrough":return o=document.createElement("span"),this.updateStyles(o,n,i),o.style.textDecoration="line-through",o;case"superscript":return document.createElement("sup");case"subscript":return document.createElement("sub");case"fontcolor":return o=document.createElement("span"),this.updateStyles(o,n,i),o.style.color=t,o.style.textDecoration="inherit",o;case"fontname":return o=document.createElement("span"),this.updateStyles(o,n,i),o.style.fontFamily=t,o;case"fontsize":return o=document.createElement("span"),this.updateStyles(o,n,i),o.style.fontSize=t,o;default:return o=document.createElement("span"),this.updateStyles(o,n,i),o.style.backgroundColor=t,o}},e.updateStyles=function(e,t,n){null!==n&&"SPAN"===t&&e.setAttribute("style",n)},e}(),Jt=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("selection-type",this.applySelection,this),this.parent.observer.on("keydown-handler",this.keyDownHandler,this)},e.prototype.keyDownHandler=function(e){var t=["bold","italic","underline","strikethrough","superscript","subscript","uppercase","lowercase"];e.event.ctrlKey&&t.indexOf(e.event.action)>-1&&(e.event.preventDefault(),Yt.applyFormat(this.parent.currentDocument,e.event.action,this.parent.editableElement),this.callBack(e,e.event.action))},e.prototype.applySelection=function(e){Yt.applyFormat(this.parent.currentDocument,e.subCommand.toLocaleLowerCase(),this.parent.editableElement,e.value,e.selector),this.callBack(e,e.subCommand)},e.prototype.callBack=function(e,t){e.callBack&&e.callBack({requestType:t,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}(),$t=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("inserthtml-type",this.applyHtml,this)},e.prototype.applyHtml=function(e){if(zt.Insert(this.parent.currentDocument,e.value,this.parent.editableElement,!0),"pasteCleanup"===e.subCommand){var t=this.parent.editableElement.querySelectorAll(".pasteContent_RTE"),n=[].slice.call(t),i=this.parent.editableElement.querySelectorAll(".pasteContent_Img"),o=[].slice.call(i);e.callBack({requestType:e.subCommand,editorMode:"HTML",elements:n,imgElem:o})}else e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}(),Zt=function(){function e(){}return e.clear=function(e,n,i){var o=new Bt,r=new jt,s=o.getRange(e),a=s.collapsed,l=o.getInsertNodeCollection(s),d=o.save(s,e);if(!a){var c=void 0;if(c="BR"===l[0].nodeName&&t.closest(l[0],"table")?r.GetSpliceNode(s,t.closest(l[0],"table")):r.GetSpliceNode(s,l[l.length>1&&"IMG"===l[0].nodeName?1:0]),1===l.length)o.setSelectionContents(e,c),s=o.getRange(e);else{for(var p=1,h=l[l.length-p];l.length<=p&&"BR"===l[l.length-p].nodeName;)p++,h=l[l.length-p];var u=r.GetSpliceNode(s,h);o.setSelectionText(e,c,u,0,3===u.nodeType?u.textContent.length:u.childNodes.length),s=o.getRange(e)}var m=o.getNodeCollection(s),g=m.slice();this.clearInlines(o.getSelectionNodes(g),g,o.getRange(e),r,n),this.reSelection(e,d,m),s=o.getRange(e);var f=(m=o.getNodeCollection(s)).slice();this.clearBlocks(e,f,n,r,o),I()&&B(n,i),this.reSelection(e,d,m)}},e.reSelection=function(e,t,n){var i=t.getInsertNodes(n);t.startContainer=t.getNodeArray(i[0],!0,e),t.startOffset=0,t.endContainer=t.getNodeArray(i[i.length-1],!1,e);var o=i[i.length-1];t.endOffset=3===o.nodeType?o.textContent.length:o.childNodes.length,t.restore()},e.clearBlocks=function(e,t,n,i,o){for(var r=[],s=0;s<t.length;s++)this.BLOCK_TAGS.indexOf(t[s].nodeName.toLocaleLowerCase())>-1&&-1===r.indexOf(t[s])?r.push(t[s]):this.BLOCK_TAGS.indexOf(t[s].parentNode.nodeName.toLocaleLowerCase())>-1&&-1===r.indexOf(t[s].parentNode)&&n!==t[s].parentNode&&r.push(t[s].parentNode);r=this.spliceParent(r,t)[0],r=this.removeParent(r),this.unWrap(e,r,i,o)},e.spliceParent=function(e,t){for(var n=0;n<e.length;n++)for(var i=e[n].childNodes.length,o=0;o<i;o++)if(t.indexOf(e[n].childNodes[o])>0&&e[n].childNodes[o].childNodes.length>0&&(t=this.spliceParent([e[n].childNodes[o]],t)[1]),t.indexOf(e[n].childNodes[o])<=-1&&""!==e[n].childNodes[o].textContent.trim()){for(var r=0;r<i;r++)t.indexOf(e[n].childNodes[r])>-1&&t.splice(t.indexOf(e[n].childNodes[r]),1);o=e[n].childNodes.length;var s=e.indexOf(e[n].parentNode),a=t.indexOf(e[n].parentNode);s>-1&&e.splice(s,1),a>-1&&t.splice(a,1);var l=t.indexOf(e[n]);l>-1&&t.splice(l,1),e.splice(n,1),n--}return[e,t]},e.removeChild=function(e,t){var n=t.childNodes.length;if(n>0)for(var i=0;i<n;i++)e.indexOf(t.childNodes[i])>-1&&(e=this.removeChild(e,t.childNodes[i])).splice(e.indexOf(t.childNodes[i]),1);return e},e.removeParent=function(e){for(var t=0;t<e.length;t++)e.indexOf(e[t].parentNode)>-1&&((e=this.removeChild(e,e[t])).splice(t,1),t--);return e},e.unWrap=function(e,t,n,i){for(var o=0;o<t.length;o++)if(this.NONVALID_TAGS.indexOf(t[o].nodeName.toLowerCase())>-1&&t[o].parentNode&&this.NONVALID_PARENT_TAGS.indexOf(t[o].parentNode.nodeName.toLowerCase())>-1&&(i.setSelectionText(e,t[o],t[o],0,t[o].childNodes.length),Ut.unwrap(n.GetSpliceNode(i.getRange(e),t[o].parentNode))),"p"!==t[o].nodeName.toLocaleLowerCase()){!(this.NONVALID_PARENT_TAGS.indexOf(t[o].nodeName.toLowerCase())<0&&"p"!==t[o].parentNode.nodeName.toLocaleLowerCase())||("blockquote"===t[o].nodeName.toLocaleLowerCase()||"li"===t[o].nodeName.toLocaleLowerCase())&&this.IGNORE_PARENT_TAGS.indexOf(t[o].childNodes[0].nodeName.toLocaleLowerCase())>-1||1===t[o].childNodes.length&&"p"===t[o].childNodes[0].nodeName.toLocaleLowerCase()||Ut.Wrap(t[o],e.createElement("p"));var r=Ut.unwrap(t[o]);1===r.length&&"p"===r[0].parentNode.nodeName.toLocaleLowerCase()&&(Ut.Wrap(t[o],e.createElement("p")),Ut.unwrap(t[o]));for(var s=0;s<r.length;s++)if(this.NONVALID_TAGS.indexOf(r[s].nodeName.toLowerCase())>-1)this.unWrap(e,[r[s]],n,i);else if(this.BLOCK_TAGS.indexOf(r[s].nodeName.toLocaleLowerCase())>-1&&"p"!==r[s].nodeName.toLocaleLowerCase()){var a=this.removeParent([r[s]]);this.unWrap(e,a,n,i)}else this.BLOCK_TAGS.indexOf(r[s].nodeName.toLocaleLowerCase())>-1&&r[s].parentNode.nodeName.toLocaleLowerCase()===r[s].nodeName.toLocaleLowerCase()?Ut.unwrap(r[s]):this.BLOCK_TAGS.indexOf(r[s].nodeName.toLocaleLowerCase())>-1&&"p"===r[s].nodeName.toLocaleLowerCase()&&(Ut.Wrap(r[s],e.createElement("p")),Ut.unwrap(r[s]))}else Ut.Wrap(t[o],e.createElement("p")),Ut.unwrap(t[o])},e.clearInlines=function(e,t,n,i,o){for(var r=0;r<e.length;r++)e[r].parentNode&&Xt.inlineTags.indexOf(e[r].parentNode.nodeName.toLocaleLowerCase())>-1&&(i.GetSpliceNode(n,e[r].parentNode),this.removeInlineParent(e[r].parentNode))},e.removeInlineParent=function(e){for(var t=Ut.unwrap(e),n=0;n<t.length;n++)1===t[n].parentNode.childNodes.length&&Xt.inlineTags.indexOf(t[n].parentNode.nodeName.toLocaleLowerCase())>-1?this.removeInlineParent(t[n].parentNode):Xt.inlineTags.indexOf(t[n].nodeName.toLocaleLowerCase())>-1&&this.removeInlineParent(t[n])},e.BLOCK_TAGS=["address","article","aside","blockquote","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","li","main","nav","noscript","ol","p","pre","section","ul"],e.NONVALID_PARENT_TAGS=["thead","tbody","ul","ol","table","tfoot","tr"],e.IGNORE_PARENT_TAGS=["ul","ol","table"],e.NONVALID_TAGS=["thead","tbody","figcaption","td","tr","th","tfoot","figcaption","li"],e}(),en=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("clear-type",this.applyClear,this),this.parent.observer.on("keydown-handler",this.onKeyDown,this)},e.prototype.onKeyDown=function(e){switch(e.event.action){case"clear-format":this.applyClear({subCommand:"ClearFormat",callBack:e.callBack}),e.event.preventDefault()}},e.prototype.applyClear=function(e){"ClearFormat"===e.subCommand&&(Zt.clear(this.parent.currentDocument,this.parent.editableElement,e.selector),e.callBack&&e.callBack({requestType:e.subCommand,event:e.event,editorMode:"HTML",range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)}))},e}(),tn=function(){function e(e,n){this.undoRedoStack=[],this.parent=e,this.undoRedoSteps=t.isNullOrUndefined(n)?30:n.undoRedoSteps,this.undoRedoTimer=t.isNullOrUndefined(n)?300:n.undoRedoTimer,this.addEventListener()}return e.prototype.addEventListener=function(){var e=t.debounce(this.keyUp,this.undoRedoTimer);this.parent.observer.on("keyup-handler",e,this),this.parent.observer.on("keydown-handler",this.keyDown,this),this.parent.observer.on("action",this.onAction,this),this.parent.observer.on("model_changed_plugin",this.onPropertyChanged,this)},e.prototype.onPropertyChanged=function(e){for(var t=0,n=Object.keys(e.newProp);t<n.length;t++)switch(n[t]){case"undoRedoSteps":this.undoRedoSteps=e.newProp.undoRedoSteps;break;case"undoRedoTimer":this.undoRedoTimer=e.newProp.undoRedoTimer}},e.prototype.removeEventListener=function(){this.parent.observer.off("keyup-handler",this.keyUp),this.parent.observer.off("keydown-handler",this.keyDown),this.parent.observer.off("action",this.onAction)},e.prototype.onAction=function(e){"Undo"===e.subCommand?this.undo(e):this.redo(e)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.keyDown=function(e){var t=e.event,n=this;switch(t.action){case"undo":t.preventDefault(),n.undo(e);break;case"redo":t.preventDefault(),n.redo(e)}},e.prototype.keyUp=function(e){17===e.event.keyCode||e.event.ctrlKey||this.saveData(e)},e.prototype.saveData=function(e){var t=(new Bt).getRange(this.parent.currentDocument),n=(new Bt).save(t,this.parent.currentDocument),i={text:this.parent.editableElement.innerHTML,range:n};this.undoRedoStack.length>=this.steps&&(this.undoRedoStack=this.undoRedoStack.slice(0,this.steps+1)),this.undoRedoStack.length>1&&this.undoRedoStack[this.undoRedoStack.length-1].range.range.collapsed===t.collapsed&&this.undoRedoStack[this.undoRedoStack.length-1].range.startOffset===n.range.startOffset&&this.undoRedoStack[this.undoRedoStack.length-1].range.endOffset===n.range.endOffset&&this.undoRedoStack[this.undoRedoStack.length-1].range.range.startContainer===n.range.startContainer&&this.undoRedoStack[this.undoRedoStack.length-1].text.trim()===i.text.trim()||(this.undoRedoStack.push(i),this.steps=this.undoRedoStack.length-1,this.steps>this.undoRedoSteps&&(this.undoRedoStack.shift(),this.steps--),e&&e.callBack&&e.callBack())},e.prototype.undo=function(e){if(this.steps>0){var t=this.undoRedoStack[this.steps-1].range,n=this.undoRedoStack[this.steps-1].text;this.parent.editableElement.innerHTML=n,this.parent.editableElement.focus(),I()&&B(this.parent.editableElement,e.selector),t.restore(),this.steps--,e.callBack&&e.callBack({requestType:"Undo",editorMode:"HTML",range:t,elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),event:e.event})}},e.prototype.redo=function(e){if(null!=this.undoRedoStack[this.steps+1]){var t=this.undoRedoStack[this.steps+1].range;this.parent.editableElement.innerHTML=this.undoRedoStack[this.steps+1].text,this.parent.editableElement.focus(),I()&&B(this.parent.editableElement,e.selector),t.restore(),this.steps++,e.callBack&&e.callBack({requestType:"Redo",editorMode:"HTML",range:t,elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument),event:e.event})}},e.prototype.getUndoStatus=function(){var e={undo:!1,redo:!1};return this.steps>0&&(e.undo=!0),null!=this.undoRedoStack[this.steps+1]&&(e.redo=!0),e},e}(),nn=function(){function e(e){this.olData=["decimal","lower-alpha","lower-roman","upper-alpha","upper-roman","lower-greek"],this.ulData=["disc","square","circle","disc","square","circle"],this.ignorableNodes=["A","APPLET","B","BLOCKQUOTE","BR","BUTTON","CENTER","CODE","COL","COLGROUP","DD","DEL","DFN","DIR","DIV","DL","DT","EM","FIELDSET","FONT","FORM","FRAME","FRAMESET","H1","H2","H3","H4","H5","H6","HR","I","IMG","IFRAME","INPUT","INS","LABEL","LI","OL","OPTION","P","PARAM","PRE","Q","S","SELECT","SPAN","STRIKE","STRONG","SUB","SUP","TABLE","TBODY","TD","TEXTAREA","TFOOT","TH","THEAD","TITLE","TR","TT","U","UL"],this.blockNode=["div","p","h1","h2","h3","h4","h5","h6","address","blockquote","button","center","dd","dir","dl","dt","fieldset","frameset","hr","iframe","isindex","li","map","menu","noframes","noscript","object","ol","pre","table","tbody","td","tfoot","th","thead","tr","ul","header","article","nav","footer","section","aside","main","figure","figcaption"],this.borderStyle=["border-top","border-right","border-bottom","border-left"],this.removableElements=["o:p","style"],this.listContents=[],this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("ms_word_cleanup_plugin",this.wordCleanup,this)},e.prototype.wordCleanup=function(e){var n=e.allowedStylePropertiesArray,i=[],o=e.args.clipboardData.getData("text/HTML"),r=e.args.clipboardData.getData("text/rtf"),s=t.createElement("p");s.setAttribute("id","MSWord-Content"),s.innerHTML=o;var a=/class="?Mso|style="[^ ]*\bmso-/i,l=/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument)/gi,d=/style='mso-width-source:/i;/class='?Mso|style='[^ ]*\bmso-/i.test(o)||a.test(o)||l.test(o)||d.test(o)?(this.imageConversion(s,r),o=o.replace(/<img[^>]+>/i,""),i=this.cleanUp(s,i),t.isNullOrUndefined(i[0])||"UL"===i[0].parentElement.tagName||"OL"===i[0].parentElement.tagName||this.listConverter(i),this.styleCorrection(s,n),this.removingComments(s),this.removeUnwantedElements(s),this.removeEmptyElements(s),this.breakLineAddition(s),this.removeClassName(s),d.test(o)&&this.addTableBorderClass(s),e.callBack(s.innerHTML)):e.callBack(s.innerHTML)},e.prototype.addTableBorderClass=function(e){for(var t=e.querySelectorAll("table"),n=!1,i=0;i<t.length;i++){for(var o=0;o<this.borderStyle.length;o++)if(t[i].innerHTML.indexOf(this.borderStyle[o])>=0){n=!0;break}n&&(t[i].classList.add("e-rte-table-border"),n=!1)}},e.prototype.imageConversion=function(e,t){this.checkVShape(e);var n=e.querySelectorAll("img"),i=[],o=[],r=[],s=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if(n.length>0){for(l=0;l<n.length;l++)i.push(n[l].getAttribute("src")),r.push(n[l].getAttribute("src").split("/")[n[l].getAttribute("src").split("/").length-1].split(".")[0]);for(var a=this.hexConversion(t),l=0;l<a.length;l++)o.push(this.convertToBase64(a[l]));for(l=0;l<n.length;l++)i[l].match(s)?n[l].setAttribute("src",i[l]):n[l].setAttribute("src",o[l]),n[l].setAttribute("id","msWordImg-"+r[l])}},e.prototype.checkVShape=function(e){for(var n=e.querySelectorAll("*"),i=0;i<n.length;i++)switch(n[i].nodeName){case"V:SHAPETYPE":t.detach(n[i]);break;case"V:SHAPE":if("V:IMAGEDATA"===n[i].firstElementChild.nodeName){var o=n[i].firstElementChild.getAttribute("src"),r=t.createElement("img");r.setAttribute("src",o),n[i].parentElement.insertBefore(r,n[i]),t.detach(n[i])}}},e.prototype.convertToBase64=function(e){var t=this.conHexStringToBytes(e.hex),n=this.conBytesToBase64(t);return e.type?"data:"+e.type+";base64,"+n:null},e.prototype.conBytesToBase64=function(e){for(var t="",n=e.length,i=0;i<n;i+=3){var o=e.slice(i,i+3),r=o.length,s=[];if(r<3)for(a=r;a<3;a++)o[a]=0;s[0]=(252&o[0])>>2,s[1]=(3&o[0])<<4|o[1]>>4,s[2]=(15&o[1])<<2|(192&o[2])>>6,s[3]=63&o[2];for(var a=0;a<4;a++)t+=a<=r?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(s[a]):"="}return t},e.prototype.conHexStringToBytes=function(e){for(var t=[],n=e.length/2,i=0;i<n;i++)t.push(parseInt(e.substr(2*i,2),16));return t},e.prototype.hexConversion=function(e){var n,i=/\{\\pict[\s\S]+?\\bliptag\-?\d+(\\blipupi\-?\d+)?(\{\\\*\\blipuid\s?[\da-fA-F]+)?[\s\}]*?/,o=new RegExp("(?:("+i.source+"))([\\da-fA-F\\s]+)\\}","g"),r=e.match(o),s=[];if(!t.isNullOrUndefined(r))for(var a=0;a<r.length;a++)if(i.test(r[a])){if(-1!==r[a].indexOf("\\pngblip"))n="image/png";else{if(-1===r[a].indexOf("\\jpegblip"))continue;n="image/jpeg"}s.push({hex:n?r[a].replace(i,"").replace(/[^\da-fA-F]/g,""):null,type:n})}return s},e.prototype.removeClassName=function(e){for(var t=e.querySelectorAll("*[class]"),n=0;n<t.length;n++)t[n].removeAttribute("class")},e.prototype.breakLineAddition=function(e){for(var n=e.querySelectorAll("*"),i=0;i<n.length;i++)if(0===n[i].children.length&&" "===n[i].innerHTML&&" "===n[i].innerHTML&&!n[i].closest("li")&&!n[i].closest("td")){var o=this.findDetachElem(n[i]),r=t.createElement("br");t.isNullOrUndefined(o.parentElement)||(o.parentElement.insertBefore(r,o),t.detach(o))}},e.prototype.findDetachElem=function(e){return!t.isNullOrUndefined(e.parentElement)&&""===e.parentElement.textContent.trim()&&"TD"!==e.parentElement.tagName&&t.isNullOrUndefined(e.parentElement.querySelector("img"))?this.findDetachElem(e.parentElement):e},e.prototype.removeUnwantedElements=function(e){for(var t=e.innerHTML,n=0;n<this.removableElements.length;n++){var i=new RegExp("<"+this.removableElements[n]+">","g"),o=new RegExp("</"+this.removableElements[n]+">","g");t=(t=t.replace(i,"")).replace(o,"")}e.innerHTML=t,e.querySelectorAll(":empty")},e.prototype.findDetachEmptyElem=function(e){return t.isNullOrUndefined(e.parentElement)?null:""===e.parentElement.textContent.trim()&&"MSWord-Content"!==e.parentElement.getAttribute("id")&&t.isNullOrUndefined(e.parentElement.querySelector("img"))?this.findDetachEmptyElem(e.parentElement):e},e.prototype.removeEmptyElements=function(e){for(var n=e.querySelectorAll(":empty"),i=0;i<n.length;i++)if(t.isNullOrUndefined(n[i].closest("td"))||t.isNullOrUndefined(n[i].closest("td").querySelector(".MsoNormal"))||(n[i].innerHTML="-"),"IMG"!==n[i].tagName&&"BR"!==n[i].tagName&&"IFRAME"!==n[i].tagName&&"TD"!==n[i].tagName&&"HR"!==n[i].tagName){var o=this.findDetachEmptyElem(n[i]);t.isNullOrUndefined(o)||t.detach(o)}},e.prototype.styleCorrection=function(e,n){var i=e.querySelectorAll("style");if(i.length>0){var o=i[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi),r=t.isNullOrUndefined(o)?null:this.findStyleObject(o),s=Object.keys(r),a=s.map(function(e){return r[e]});a=this.removeUnwantedStyle(a,n),this.filterStyles(e,n);for(var l=void 0,d=!1,c=0;c<s.length;c++){if(""===s[c].split(".")[0])l=e.getElementsByClassName(s[c].split(".")[1]),d=!0;else{if(1===s[c].split(".").length&&s[c].split(".")[0].indexOf("@")>=0)continue;l=1===s[c].split(".").length&&s[c].split(".")[0].indexOf("@")<0?e.getElementsByTagName(s[c]):e.querySelectorAll(s[c])}for(var p=0;p<l.length;p++){var h=l[p].getAttribute("style");if(t.isNullOrUndefined(h)||""===h.trim())l[p].setAttribute("style",a[c]);else{var u=a[c].split(";");if(!d)for(var m=0;m<u.length;m++)h.indexOf(u[m].split(":")[0])>=0&&(u.splice(m,1),m--);a[c]=u.join(";")+";";var g=h+a[c];l[p].setAttribute("style",g)}}d=!1}}},e.prototype.filterStyles=function(e,t){for(var n=e.querySelectorAll("*[style]"),i=0;i<n.length;i++){for(var o=n[i].getAttribute("style").split(";"),r="",s=0;s<o.length;s++)t.indexOf(o[s].split(":")[0].trim())>=0&&(r+=o[s]+";");n[i].setAttribute("style",r)}},e.prototype.removeUnwantedStyle=function(e,t){for(var n=0;n<e.length;n++){var i=e[n].split(";");e[n]="";for(var o=0;o<i.length;o++)t.indexOf(i[o].split(":")[0])>=0&&(e[n]+=i[o]+";")}return e},e.prototype.findStyleObject=function(e){for(var t={},n=0;n<e.length;n++){var i=e[n],o=i.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),r=i.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");o=o.replace(/^[\s]|[\s]$/gm,""),r=r.replace(/^[\s]|[\s]$/gm,""),o=o.replace(/\n|\r|\n\r/g,""),r=r.replace(/\n|\r|\n\r/g,"");for(var s=o.split(", "),a=0;a<s.length;a++)t[s[a]]=r}return t},e.prototype.removingComments=function(e){var t=e.innerHTML;t=t.replace(/<!--[\s\S]*?-->/g,""),e.innerHTML=t},e.prototype.cleanUp=function(e,t){for(var n,i=[],o=e.querySelectorAll("*"),r=0;r<o.length;r++)-1===this.ignorableNodes.indexOf(o[r].nodeName)||3===o[r].nodeType&&""===o[r].textContent.trim()?i.push(o[r]):(o[r].className&&-1!==o[r].className.toLowerCase().indexOf("msolistparagraph")&&1!==o[r].childElementCount&&t.push(o[r]),!n||-1===this.blockNode.indexOf(o[r].nodeName.toLowerCase())||o[r].className&&-1!==o[r].className.toLowerCase().indexOf("msolistparagraph")||t.push(null),-1!==this.blockNode.indexOf(o[r].nodeName.toLowerCase())&&(n=!(!o[r].className||-1===o[r].className.toLowerCase().indexOf("msolistparagraph"))));return t.length&&null!==t[t.length-1]&&t.push(null),t},e.prototype.listConverter=function(e){for(var n,i,o=[],r=[],s="",a=0;a<e.length;a++)if(null!==e[a]){e[a].getAttribute("style")&&-1!==e[a].getAttribute("style").indexOf("mso-outline-level")&&e[a].setAttribute("style",e[a].getAttribute("style").replace("mso-outline-level","mso-outline")),n=(s=e[a].getAttribute("style"))&&-1!==s.indexOf("level")?parseInt(s.charAt(s.indexOf("level")+5),null):1,this.listContents=[],this.getListContent(e[a]);var l=void 0;if(!t.isNullOrUndefined(this.listContents[0])){l=this.listContents[0].trim().length>1?"ol":"ul";for(var d=[],c=1;c<this.listContents.length;c++)d.push(this.listContents[c]);var p=void 0;t.isNullOrUndefined(e[a].className)||(p=e[a].className),r.push({listType:l,content:d,nestedLevel:n,class:p})}}else o.push({content:this.makeConversion(r),node:e[a-1]}),r=[];for(i=e.shift();i;){for(var h=[],u=0;u<o.length;u++)if(o[u].node===i){for(m=0;m<o[u].content.childNodes.length;m++)h.push(o[u].content.childNodes[m]);for(var m=0;m<h.length;m++)i.parentElement.insertBefore(h[m],i);break}i.remove(),(i=e.shift())||(i=e.shift())}},e.prototype.makeConversion=function(e){for(var n,i,o,r=t.createElement("div"),s=1,a=0,l=0;l<e.length;l++){var d=t.createElement("p");if(d.innerHTML=e[l].content.join(" "),1===e[l].nestedLevel&&0===a&&e[l].content)r.appendChild(n=t.createElement(e[l].listType)),(i=t.createElement("li")).appendChild(d),n.appendChild(i),n.setAttribute("level",e[l].nestedLevel.toString()),n.style.listStyle=this.getListStyle(e[l].listType,e[l].nestedLevel);else if(e[l].nestedLevel===s)i.parentElement.tagName.toLowerCase()===e[l].listType?(i.parentElement.appendChild(i=t.createElement("li")),i.appendChild(d)):(n=t.createElement(e[l].listType),i.parentElement.parentElement.appendChild(n),(i=t.createElement("li")).appendChild(d),n.appendChild(i),n.setAttribute("level",e[l].nestedLevel.toString()));else if(e[l].nestedLevel>s)if(t.isNullOrUndefined(i))r.appendChild(n=t.createElement(e[l].listType)),(i=t.createElement("li")).appendChild(d),n.appendChild(i),n.setAttribute("level",e[l].nestedLevel.toString()),n.style.listStyle=this.getListStyle(e[l].listType,e[l].nestedLevel);else{for(var c=0;c<e[l].nestedLevel-s;c++)i.appendChild(n=t.createElement(e[l].listType)),i=t.createElement("li",{styles:"list-style-type: none;"}),n.appendChild(i);i.appendChild(d),n.setAttribute("level",e[l].nestedLevel.toString()),n.style.listStyle=this.getListStyle(e[l].listType,e[l].nestedLevel),n.childNodes[0].style.listStyle=this.getListStyle(e[l].listType,e[l].nestedLevel)}else if(1===e[l].nestedLevel)r.lastChild.tagName.toLowerCase()===e[l].listType?n=r.lastChild:r.appendChild(n=t.createElement(e[l].listType)),(i=t.createElement("li")).appendChild(d),n.appendChild(i),n.setAttribute("level",e[l].nestedLevel.toString()),n.style.listStyle=this.getListStyle(e[l].listType,e[l].nestedLevel);else for(o=i;o.parentElement;)if((o=o.parentElement).attributes.getNamedItem("level")){if(parseInt(o.attributes.getNamedItem("level").textContent,null)===e[l].nestedLevel){(i=t.createElement("li")).appendChild(d),o.appendChild(i);break}if(e[l].nestedLevel>parseInt(o.attributes.getNamedItem("level").textContent,null)){o.appendChild(n=t.createElement(e[l].listType)),(i=t.createElement("li")).appendChild(d),n.appendChild(i),n.setAttribute("level",e[l].nestedLevel.toString()),n.style.listStyle=this.getListStyle(e[l].listType,e[l].nestedLevel);break}}i.setAttribute("class",e[l].class),s=e[l].nestedLevel,a++}return r},e.prototype.getListStyle=function(e,t){return t=t>0?t-1:t,"ol"===e?t<this.olData.length?this.olData[t]:this.olData[0]:t<this.ulData.length?this.ulData[t]:this.ulData[0]},e.prototype.getListContent=function(e){var n="",i=e.firstElementChild;if(""!==i.textContent.trim()||t.isNullOrUndefined(i.firstElementChild)||"IMG"!==i.firstElementChild.nodeName){var o=["b","em"];if(i.childNodes.length>0&&(i.querySelectorAll("b").length>0||i.querySelectorAll("em").length>0))for(var r=0;r<i.childNodes.length;r++){var s=i.childNodes[r].nodeName.toLowerCase();i.childNodes[r].textContent.trim().length>1&&-1!==o.indexOf(s)?(n="<"+s+">"+i.childNodes[r].textContent+"</"+s+">",this.listContents.push(n)):1===i.childNodes[r].textContent.trim().length&&this.listContents.push(i.childNodes[r].textContent.trim())}else n=i.textContent.trim(),this.listContents.push(n)}else n=e.innerHTML.trim(),this.listContents.push(""),this.listContents.push(n);t.detach(i),this.listContents.push(e.innerHTML)},e}(),on=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.observer.on("insert-text-type",this.insertText,this)},e.prototype.insertText=function(e){var t=document.createTextNode(e.value);zt.Insert(this.parent.currentDocument,t),e.callBack&&e.callBack({requestType:e.subCommand,editorMode:"HTML",event:e.event,range:this.parent.nodeSelection.getRange(this.parent.currentDocument),elements:this.parent.nodeSelection.getSelectedNodes(this.parent.currentDocument)})},e}(),rn=function(){function e(e){this.currentDocument=e.document,this.editableElement=e.editableElement,this.nodeSelection=new Bt,this.domNode=new At(this.editableElement,this.currentDocument),this.observer=new t.Observer(this),this.listObj=new Ht(this),this.formatObj=new Ft(this),this.alignmentObj=new qt(this),this.indentsObj=new Qt(this),this.linkObj=new _t(this),this.imgObj=new Wt(this),this.selectionObj=new Jt(this),this.inserthtmlObj=new $t(this),this.insertTextObj=new on(this),this.clearObj=new en(this),this.tableObj=new Gt(this),this.undoRedoManager=new tn(this,e.options),this.msWordPaste=new nn(this),this.wireEvents()}return e.prototype.wireEvents=function(){this.observer.on("keydown",this.editorKeyDown,this),this.observer.on("keyup",this.editorKeyUp,this),this.observer.on("keyup",this.editorKeyUp,this),this.observer.on("model_changed",this.onPropertyChanged,this),this.observer.on("ms_word_cleanup",this.onWordPaste,this)},e.prototype.onWordPaste=function(e){this.observer.notify("ms_word_cleanup_plugin",e)},e.prototype.onPropertyChanged=function(e){this.observer.notify("model_changed_plugin",e)},e.prototype.editorKeyDown=function(e){this.observer.notify("keydown-handler",e)},e.prototype.editorKeyUp=function(e){this.observer.notify("keyup-handler",e)},e.prototype.execCommand=function(e,t,n,i,o,r,s){switch(e.toLocaleLowerCase()){case"lists":this.observer.notify("list-type",{subCommand:t,event:n,callBack:i,selector:s,item:r});break;case"formats":this.observer.notify("format-type",{subCommand:t,event:n,callBack:i,selector:s,exeValue:r});break;case"alignments":this.observer.notify("alignment-type",{subCommand:t,event:n,callBack:i,selector:s,value:r});break;case"indents":this.observer.notify("indent-type",{subCommand:t,event:n,callBack:i,selector:s});break;case"links":this.observer.notify(Dt,{command:e,value:t,item:r,event:n,callBack:i});break;case"files":this.observer.notify(xt,{command:e,value:"Image",item:r,event:n,callBack:i,selector:s});break;case"images":this.observer.notify(xt,{command:e,value:t,item:r,event:n,callBack:i,selector:s});break;case"table":switch(t.toString().toLocaleLowerCase()){case"createtable":this.observer.notify(Ot,{item:r,event:n,callBack:i});break;case"insertrowbefore":case"insertrowafter":this.observer.notify("INSERT-ROW",{item:r,event:n,callBack:i});break;case"insertcolumnleft":case"insertcolumnright":this.observer.notify("INSERT-COLUMN",{item:r,event:n,callBack:i});break;case"deleterow":this.observer.notify("DELETE-ROW",{item:r,event:n,callBack:i});break;case"deletecolumn":this.observer.notify("DELETE-COLUMN",{item:r,event:n,callBack:i});break;case"tableremove":this.observer.notify("REMOVE-TABLE",{item:r,event:n,callBack:i});break;case"tableheader":this.observer.notify("TABLE-HEADER",{item:r,event:n,callBack:i});break;case"aligntop":case"alignmiddle":case"alignbottom":this.observer.notify("TABLE_VERTICAL_ALIGN",{item:r,event:n,callBack:i});break;case"merge":this.observer.notify("TABLE_MERGE",{item:r,event:n,callBack:i});break;case"horizontalsplit":this.observer.notify("TABLE_HORIZONTAL_SPLIT",{item:r,event:n,callBack:i});break;case"verticalsplit":this.observer.notify("TABLE_VERTICAL_SPLIT",{item:r,event:n,callBack:i})}break;case"font":case"style":case"effects":case"casing":this.observer.notify("selection-type",{subCommand:t,event:n,callBack:i,value:o,selector:s});break;case"inserthtml":this.observer.notify("inserthtml-type",{subCommand:t,callBack:i,value:o});break;case"inserttext":this.observer.notify("insert-text-type",{subCommand:t,callBack:i,value:o});break;case"clear":this.observer.notify("clear-type",{subCommand:t,event:n,callBack:i,selector:s});break;case"actions":this.observer.notify("action",{subCommand:t,event:n,callBack:i,selector:s})}},e}(),sn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),an=function(e){function n(n){var i=e.call(this)||this;return i.initialize(),t.extend(i,i,n,!0),i.currentDocument&&i.element&&i.updateFormatter(i.element,i.currentDocument,n.options),i}return sn(n,e),n.prototype.initialize=function(){this.keyConfig=mt},n.prototype.updateFormatter=function(e,t,n){e&&t&&(this.editorManager=new rn({document:t,editableElement:e,options:n}))},n}(at),ln=H(),dn=function(){function e(){}return e.get=function(e,t,n,i,o,r){for(var s=JSON.parse(JSON.stringify(ln)),a=JSON.parse(JSON.stringify(ln)),l=new Bt,d=r?[r]:l.getNodeCollection(l.getRange(e)),c=d.length,p=0;p<d.length;p++)("BR"!==d[p].nodeName&&3!==d[p].nodeType||c>1&&3===d[p].nodeType&&""===d[p].textContent.trim())&&(d.splice(p,1),p--);for(p=0;p<d.length;p++)s=this.getFormatParent(e,s,d[p],t,n,i,o),(0===p&&s.bold||!s.bold)&&(a.bold=s.bold),(0===p&&s.insertcode||!s.insertcode)&&(a.insertcode=s.insertcode),(0===p&&s.italic||!s.italic)&&(a.italic=s.italic),(0===p&&s.underline||!s.underline)&&(a.underline=s.underline),(0===p&&s.strikethrough||!s.strikethrough)&&(a.strikethrough=s.strikethrough),(0===p&&s.superscript||!s.superscript)&&(a.superscript=s.superscript),(0===p&&s.subscript||!s.subscript)&&(a.subscript=s.subscript),(0===p&&s.fontcolor||!s.fontcolor)&&(a.fontcolor=s.fontcolor),(0===p&&s.fontname||!s.fontname)&&(a.fontname=s.fontname),(0===p&&s.fontsize||!s.fontsize)&&(a.fontsize=s.fontsize),(0===p&&s.backgroundcolor||!s.backgroundcolor)&&(a.backgroundcolor=s.backgroundcolor),(0===p&&s.orderedlist||!s.orderedlist)&&(a.orderedlist=s.orderedlist),(0===p&&s.unorderedlist||!s.unorderedlist)&&(a.unorderedlist=s.unorderedlist),(0===p&&s.alignments||!s.alignments)&&(a.alignments=s.alignments),(0===p&&s.formats||!s.formats)&&(a.formats=s.formats),(0===p&&s.createlink||!s.createlink)&&(a.createlink=s.createlink),(0===p&&s.numberFormatList||!s.numberFormatList)&&(a.numberFormatList=s.numberFormatList),(0===p&&s.bulletFormatList||!s.bulletFormatList)&&(a.bulletFormatList=s.bulletFormatList),s=JSON.parse(JSON.stringify(ln));return a},e.getFormatParent=function(e,t,n,i,o,r,s){if(i.contains(n)||3===n.nodeType&&3!==i.nodeType&&i.contains(n.parentNode))do{t=this.isFormattedNode(e,t,n,o,r,s),n=n.parentNode}while(n&&n!==i);return t},e.isFormattedNode=function(e,t,n,i,o,r){return t.bold||(t.bold=Xt.isBold(n)),t.italic||(t.italic=Xt.isItalic(n)),t.underline||(t.underline=Xt.isUnderline(n)),t.strikethrough||(t.strikethrough=Xt.isStrikethrough(n)),t.superscript||(t.superscript=Xt.isSuperscript(n)),t.subscript||(t.subscript=Xt.isSubscript(n)),t.fontcolor||(t.fontcolor=this.isFontColor(e,n)),t.fontname||(t.fontname=this.isFontName(e,n,r)),t.fontsize||(t.fontsize=this.isFontSize(n,o)),t.backgroundcolor||(t.backgroundcolor=this.isBackgroundColor(n)),t.orderedlist||(t.orderedlist=this.isOrderedList(n)),t.unorderedlist||(t.unorderedlist=this.isUnorderedList(n)),t.alignments||(t.alignments=this.isAlignment(n)),t.formats||(t.formats=this.isFormats(n,i),"pre"===t.formats&&(t.insertcode=!0)),t.createlink||(t.createlink=this.isLink(n)),t.numberFormatList||(t.numberFormatList=this.isNumberFormatList(n)),t.bulletFormatList||(t.bulletFormatList=this.isBulletFormatList(n)),t},e.isFontColor=function(e,t){var n=t.style&&t.style.color;return null!==n&&void 0!==n&&""!==n||3===t.nodeType||(n=this.getComputedStyle(e,t,"color")),null!==n&&""!==n&&void 0!==n?n:null},e.isLink=function(e){return"a"===e.nodeName.toLocaleLowerCase()},e.isBackgroundColor=function(e){var t=e.style&&e.style.backgroundColor;return null!==t&&""!==t&&void 0!==t?t:null},e.isFontSize=function(e,t){var n=e.style&&e.style.fontSize;return null!==n&&""!==n&&void 0!==n&&(null===t||void 0===t||t.indexOf(n)>-1)?n:null},e.isFontName=function(e,t,n){var i=t.style&&t.style.fontFamily;null!==i&&void 0!==i&&""!==i||3===t.nodeType||(i=this.getComputedStyle(e,t,"font-family"));var o=null;return null!==i&&""!==i&&void 0!==i&&(null===n||void 0===n||n.filter(function(e,t){var n=new RegExp(i,"i");(e.replace(/"/g,"").replace(/ /g,"")===i.replace(/"/g,"").replace(/ /g,"")||e.search(n)>-1)&&(o=t)})&&null!==o)?null!==o?n[o]:i.replace(/"/g,""):null},e.isOrderedList=function(e){return"ol"===e.nodeName.toLocaleLowerCase()},e.isUnorderedList=function(e){return"ul"===e.nodeName.toLocaleLowerCase()},e.isAlignment=function(e){var t=e.style&&e.style.textAlign;return"left"===t?"justifyleft":"center"===t?"justifycenter":"right"===t?"justifyright":"justify"===t?"justifyfull":null},e.isFormats=function(e,t){return(void 0===t||null===t)&&Mt.indexOf(e.nodeName.toLocaleLowerCase())>-1||null!==t&&void 0!==t&&t.indexOf(e.nodeName.toLocaleLowerCase())>-1?e.nodeName.toLocaleLowerCase():null},e.getComputedStyle=function(e,t,n){return e.defaultView.getComputedStyle(t,null).getPropertyValue(n)},e.isNumberFormatList=function(e){var t=e.style&&e.style.listStyleType;return"lower-alpha"===t?"Lower Alpha":"number"===t?"Number":"upper-alpha"===t?"Upper Alpha":"lower-roman"===t?"Lower Roman":"upper-roman"===t?"Upper Roman":"lower-greek"===t?"Lower Greek":"none"===t?"None":null},e.isBulletFormatList=function(e){var t=e.style&&e.style.listStyleType;return"circle"===t?"Circle":"square"===t?"Square":"none"===t?"None":"disc"===t?"Disc":null},e}(),cn=function(){function e(e){this.parent=e,this.toolbarStatus=this.prevToolbarStatus=H(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("toolbar-refresh",this.onRefreshHandler,this),this.parent.on(z,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off("toolbar-refresh",this.onRefreshHandler),this.parent.off(z,this.removeEventListener)},e.prototype.onRefreshHandler=function(e){if(!this.parent.readonly){var t=[],n=[],i=[];this.parent.fontSize.items.forEach(function(e){t.push(e.value)}),this.parent.fontFamily.items.forEach(function(e){n.push(e.value)}),this.parent.format.types.forEach(function(e){i.push(e.value.toLocaleLowerCase())}),this.toolbarStatus=dn.get(this.parent.contentModule.getDocument(),this.parent.contentModule.getEditPanel(),i,t,n,e.documentNode);var o=JSON.stringify(this.toolbarStatus);this.parent.notify("toolbar-updated",this.toolbarStatus),JSON.stringify(this.prevToolbarStatus)!==o&&(this.parent.notify("updateTbItemsStatus",{html:JSON.parse(o),markdown:null}),this.prevToolbarStatus=JSON.parse(o))}},e}(),pn=function(){function e(e,t){this.parent=e,this.serviceLocator=t}return e.prototype.renderPanel=function(){var e=this.parent,t=this.parent.createElement("div",{className:"e-rte-content",id:this.parent.getID()+"rte-view"}),n=w(e.value,e);this.editableElement=this.parent.createElement("div",{className:"e-content",id:this.parent.getID()+"_rte-edit-view",attrs:{contenteditable:"true"},innerHTML:n}),t.appendChild(this.editableElement),this.setPanel(t),e.element.appendChild(t)},e.prototype.getPanel=function(){return this.contentPanel},e.prototype.getEditPanel=function(){return this.editableElement},e.prototype.getText=function(){return this.getEditPanel().innerText},e.prototype.setPanel=function(e){this.contentPanel=e},e.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},e}(),hn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),un=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return hn(n,e),n.prototype.renderPanel=function(){var e=this.parent,t="\n<!DOCTYPE html> \n <html>\n <head>\n <meta charset='utf-8' /> \n <style>\n @charset \"UTF-8\";\n body {\n font-family: \"Roboto\", sans-serif;\n font-size: 14px;\n }\n html, body{height: 100%;margin: 0;}\n body.e-cursor{cursor:default}\n span.e-selected-node\t{background-color: #939393;color: white;}\n span.e-selected-node.e-highlight {background-color: #1d9dd8;}\n body{color:#333;word-wrap:break-word;padding: 8px;box-sizing: border-box;}\n .e-rte-image {border: 0;cursor: pointer;display:\n block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-img-caption { display: inline-block; float: none; margin: 5px auto; max-width: 100%;position: relative;}\n .e-img-caption.e-caption-inline {display: inline-block;float: none;\n margin: 5px auto;margin-left: 5px;margin-right: 5px;max-width: calc(100% - (2 * 5px));\n position: relativetext-align: center;vertical-align: bottom;}\n .e-img-inner {box-sizing: border-box;display: block;font-size: 16px;font-weight: initial;\n margin: auto;opacity: .9;text-align: center;width: 100%;}\n .e-img-wrap {display: inline-block;margin: auto;padding: 0;text-align: center;width: 100%;}\n .e-imgleft {float: left;margin: 0 5px 0 0;text-align: left;}\n .e-imgright {float: right;margin: 0 0 0 5px;text-align: right;}\n .e-imgcenter {cursor: pointer;display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-control img:not(.e-resize) {border: 2px solid transparent; z-index: 1000}\n .e-imginline {display: inline-block;float: none;margin-left: 5px;margin-right: 5px;\n max-width: calc(100% - (2 * 5px));vertical-align: bottom;}\n .e-imgbreak {border: 0;cursor: pointer;\n display: block;float: none;height: auto;margin: 5px auto;max-width: 100%;position: relative;}\n .e-rte-image.e-img-focus:not(.e-resize) {border: solid 2px #4a90e2;}\n img.e-img-focus::selection { background: transparent;color: transparent;}\n span.e-rte-imageboxmark { width: 10px; height: 10px; position: absolute; display: block;\n background: #4a90e2; border: 1px solid #fff; z-index: 1000;}\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-mob-rte span.e-rte-imageboxmark { background: #fff; border: 1px solid #4a90e2;\n border-radius: 15px; height: 20px; width: 20px; }\n .e-mob-rte.e-mob-span span.e-rte-imageboxmark { background: #4a90e2; border: 1px solid #fff; }\n .e-rte-content .e-content img.e-resize { z-index: 1000; }\n .e-img-caption .e-img-inner { outline: 0; }\n .e-img-caption a:focus-visible { outline: none; }\n .e-img-caption .e-rte-image.e-imgright, .e-img-caption .e-rte-image.e-imgleft { float: none; margin: 0;}\n body{box-sizing: border-box;min-height: 100px;outline: 0 solid transparent;\n overflow-x: auto;padding: 16px;position: relative;text-align: inherit;z-index: 2;}\n p{margin: 0 0 10px;margin-bottom: 10px;}\n li{margin-bottom: 10px;}\n h1{font-size: 2.17em;font-weight: 400;line-height: 1;margin: 10px 0;}\n h2{font-size: 1.74em;font-weight: 400;margin: 10px 0;}\n h3{font-size: 1.31em;font-weight: 400;margin: 10px 0;}\n h4{font-size: 16px;font-weight: 400;line-height: 1.5;margin: 0;}\n h5{font-size: 00.8em;font-weight: 400;margin: 0;}\n h6{font-size: 00.65em;font-weight: 400;margin: 0;}\n blockquote{margin: 10px 0;margin-left: 0;padding-left: 5px;border-left: solid 2px #5c5c5c;}\n pre{background-color: inherit;border: 0;border-radius: 0;color: #333;\n font-size: inherit;line-height: inherit;margin: 0 0 10px;overflow: visible;padding: 0;\n white-space: pre-wrap;word-break: inherit;word-wrap: break-word;}\n strong, b{font-weight: 700;}\n a{text-decoration: none;user-select: auto;}\n a:hover{text-decoration: underline;};\n p:last-child, pre:last-child, blockquote:last-child{margin-bottom: 0;}\n h3+h4, h4+h5, h5+h6{margin-top: 00.6em;}\n ul:last-child{margin-bottom: 0;}\n table { border-collapse: collapse; empty-cells: show;}\n table td,table th {border: 1px solid #BDBDBD; height: 20px; vertical-align: middle;}\n table.e-alternate-border tbody tr:nth-child(2n) {background-color: #F5F5F5;}\n table th {background-color: #E0E0E0;}\n table.e-dashed-border td,table.e-dashed-border th { border: 1px dashed #BDBDBD} \n table .e-cell-select {border: 1px double #4a90e2;}\n span.e-table-box { cursor: nwse-resize; display: block; height: 10px; position: absolute; width: 10px; }\n span.e-table-box.e-rmob {height: 14px;width: 14px;}\n .e-row-resize, .e-column-resize { background-color: transparent; background-repeat: repeat;\n bottom: 0;cursor: col-resize;height: 1px;overflow: visible;position: absolute;width: 1px; }\n .e-row-resize { cursor: row-resize; height: 1px;}\n .e-table-rhelper { cursor: col-resize; opacity: .87;position: absolute;}\n .e-table-rhelper.e-column-helper { width: 1px; }\n .e-table-rhelper.e-row-helper {height: 1px;}\n .e-reicon::before { border-bottom: 6px solid transparent; border-right: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block; height: 0;\n position: absolute; right: 4px; top: 4px; width: 20px; }\n .e-reicon::after { border-bottom: 6px solid transparent; border-left: 6px solid;\n border-top: 6px solid transparent; content: ''; display: block;\n height: 0; left: 4px; position: absolute; top: 4px; width: 20px; z-index: 3; }\n .e-row-helper.e-reicon::after { top: 10px; transform: rotate(90deg); }\n .e-row-helper.e-reicon::before { left: 4px; top: -20px; transform: rotate(90deg); }\n span.e-table-box { background-color: #ffffff; border: 1px solid #BDBDBD; }\n span.e-table-box.e-rbox-select { background-color: #BDBDBD; border: 1px solid #BDBDBD; }\n .e-table-rhelper { background-color: #4a90e2;}\n .e-rtl { direction: rtl; }\n </style>\n </head>"+('<body spellcheck="false" autocorrect="off" contenteditable="true">'+w(e.value,e)+"</body></html>"),n=this.parent.createElement("iframe",{innerHTML:t,id:this.parent.getID()+"_rte-view",className:"e-rte-content",styles:"display:block;"});this.setPanel(n),e.element.appendChild(n),n.contentDocument.body.id=this.parent.getID()+"_rte-edit-view",n.contentDocument.body.setAttribute("aria-owns",this.parent.getID()),n.contentDocument.open(),t=this.setThemeColor(t,{color:"#333"}),n.contentDocument.write(t),n.contentDocument.close(),e.enableRtl&&this.contentPanel.contentDocument.body.setAttribute("class","e-rtl")},n.prototype.setThemeColor=function(e,t){var n=getComputedStyle(this.parent.element,".e-richtexteditor").getPropertyValue("color");return e.replace(t.color,n)},n.prototype.getEditPanel=function(){return t.isNullOrUndefined(this.contentPanel.contentDocument)?this.parent.inputElement:this.contentPanel.contentDocument.body},n.prototype.getDocument=function(){return this.getEditPanel().ownerDocument},n}(pn),mn=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("xhtmlValidation",this.enableXhtmlValidation,this),this.parent.on(z,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off("xhtmlValidation",this.enableXhtmlValidation),this.parent.off(z,this.removeEventListener)},e.prototype.enableXhtmlValidation=function(){this.parent.enableXhtml&&(t.isNullOrUndefined(this.parent.inputElement)?this.currentElement=this.parent.element:this.currentElement=this.parent.inputElement,this.clean(this.currentElement),this.AddRootElement(),this.ImageTags(),this.removeTags(),this.RemoveUnsupported(),this.currentElement.innerHTML=this.selfEncloseValidation(this.currentElement.innerHTML),this.parent.setProperties({value:this.currentElement.innerHTML},!0))},e.prototype.selfEncloseValidation=function(e){e=e.replace(/<br>/g,"<br/>").replace(/<hr>/g,"<hr/>").replace(/ /gi," ").replace(/ /g," ");for(var t,n=[],i=[],o=[/<img(.*?)>/gi,/<area(.*?)>/gi,/<base(.*?)>/gi,/<col (.*?)>/gi,/<embed(.*?)>/gi,/<input(.*?)>/gi,/<link(.*?)>/gi,/<meta(.*?)>/gi,/<param(.*?)>/gi,/<source(.*?)>/gi,/<track(.*?)>/gi,/<wbr(.*?)>/gi],r=0;r<o.length;r++){for(t=o[r].exec(e);null!==t;)n.push(t[0].toString()),t=o[r].exec(e);i=n.slice(0);for(var s=0;s<n.length;s++)-1!==n[s].indexOf("/")&&n[s].lastIndexOf("/")===n[s].length-2||(n[s]=n[s].substr(0,n[s].length-1)+" /"+n[s].substr(n[s].length-1,n[s].length));for(var a=0;a<=n.length-1;a++)e=e.replace(i[a],n[a])}return e},e.prototype.AddRootElement=function(){if(1===this.currentElement.childNodes.length&&"DIV"!==this.currentElement.firstChild.nodeName||this.currentElement.childNodes.length>1){for(var e=this.parent.createElement("div");this.currentElement.childNodes.length>0;)e.appendChild(this.currentElement.childNodes[0]);this.currentElement.appendChild(e)}},e.prototype.clean=function(e){for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];8===n.nodeType||"V:IMAGE"===n.nodeName?(e.removeChild(n),t--):1===n.nodeType&&this.clean(n)}return this.currentElement.innerHTML},e.prototype.ImageTags=function(){for(var e=this.currentElement.querySelectorAll("IMG"),t=e.length-1;t>=0;t--)e[t].hasAttribute("alt")||e[t].setAttribute("alt","")},e.prototype.removeTags=function(){for(var e=[["br","ul"],["br","ol"],["table","span"],["div","span"],["p","span"]],t=0;t<e.length;t++)this.RemoveElementNode(e[t][0],e[t][1])},e.prototype.RemoveElementNode=function(e,n){for(var i=this.currentElement.querySelectorAll(n),o=0;o<i.length;o++)for(var r=i[o].querySelectorAll(e),s=r.length;s>0;s--)t.detach(r[s-1])},e.prototype.RemoveUnsupported=function(){for(var e=this.currentElement.querySelectorAll("u"),n=e.length-1;n>=0;n--){var i=this.parent.createElement("span");i.style.textDecoration="underline",i.innerHTML=e[n].innerHTML,e[n].parentNode.insertBefore(i,e[n]),t.detach(e[n])}for(var o=this.currentElement.querySelectorAll("strong"),n=o.length-1;n>=0;n--){var r=this.parent.createElement("b");r.innerHTML=o[n].innerHTML,o[n].parentNode.insertBefore(r,o[n]),t.detach(o[n])}for(var s=["language","role","target","contenteditable","cellspacing","cellpadding","border","valign","colspan"],n=0;n<=s.length;n++)this.RemoveAttributeByName(s[n])},e.prototype.RemoveAttributeByName=function(e){if(null!==this.currentElement.firstChild&&3!==this.currentElement.firstChild.nodeType)for(var t=0;t<this.currentElement.childNodes.length;t++){var n=this.currentElement.childNodes[t];if(3!==n.nodeType&&"TABLE"!==n.nodeName&&"TBODY"!==n.nodeName&&"THEAD"!==n.nodeName&&"TH"!==n.nodeName&&"TR"!==n.nodeName&&"TD"!==n.nodeName&&(n.hasAttribute(e)&&n.removeAttribute(e),n.hasChildNodes()))for(var i=0;i<n.childNodes.length;i++){var o=n.childNodes[i];if(3!==o.nodeType&&"TABLE"!==o.nodeName&&"TBODY"!==o.nodeName&&"THEAD"!==o.nodeName&&"TH"!==o.nodeName&&"TR"!==o.nodeName&&"TD"!==o.nodeName&&o.hasAttribute(e)&&o.removeAttribute(e),o.hasChildNodes())for(var r=0;r<o.childNodes.length;r++)3!==o.childNodes[r].nodeType&&"TABLE"!==o.childNodes[r].nodeName&&"TBODY"!==o.childNodes[r].nodeName&&"THEAD"!==o.childNodes[r].nodeName&&"TH"!==o.childNodes[r].nodeName&&"TR"!==o.childNodes[r].nodeName&&"TD"!==o.childNodes[r].nodeName&&o.childNodes[r].hasAttribute(e)&&o.childNodes[r].removeAttribute(e)}}},e}(),gn=function(){function n(e,t){this.rangeCollection=[],this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.xhtmlValidation=new mn(e),this.addEventListener()}return n.prototype.destroy=function(){this.removeEventListener()},n.prototype.sanitizeHelper=function(e){return e=O(e,this.parent)},n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.nodeSelectionObj=new Bt,this.colorPickerModule=new $e(this.parent,this.locator),this.parent.on("initial-load",this.instantiateRenderer,this),this.parent.on("html-toolbar-click",this.onToolbarClick,this),this.parent.on(Q,this.onKeyDown,this),this.parent.on("render-color-picker",this.renderColorPicker,this),this.parent.on(F,this.render,this),this.parent.on(_,this.onPropertyChanged,this),this.parent.on(z,this.destroy,this),this.parent.on("selectAll",this.selectAll,this),this.parent.on("selectRange",this.selectRange,this),this.parent.on("getSelectedHtml",this.getSelectedHtml,this),this.parent.on(V,this.onSelectionSave,this),this.parent.on("selection-restore",this.onSelectionRestore,this),this.parent.on("readOnlyMode",this.updateReadOnly,this),this.parent.on(G,this.onPaste,this))},n.prototype.updateReadOnly=function(){this.parent.readonly?(t.attributes(this.parent.contentModule.getEditPanel(),{contenteditable:"false"}),t.addClass([this.parent.element],"e-rte-readonly")):(t.attributes(this.parent.contentModule.getEditPanel(),{contenteditable:"true"}),t.removeClass([this.parent.element],"e-rte-readonly"))},n.prototype.onSelectionSave=function(){var e=this.contentRenderer.getDocument(),t=this.nodeSelectionObj.getRange(e);this.saveSelection=this.nodeSelectionObj.save(t,e)},n.prototype.onSelectionRestore=function(e){this.parent.isBlur=!1,this.contentRenderer.getEditPanel().focus(),(t.isNullOrUndefined(e.items)||e.items)&&this.saveSelection.restore()},n.prototype.onKeyDown=function(e){var n;if("chrome"===t.Browser.info.name&&(n=this.parent.getRange(),this.backSpaceCleanup(e,n)),9===e.args.keyCode&&this.parent.enableTabKey){var i=this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()),o=this.nodeSelectionObj.getParentNodeCollection(i);if("LI"!==o[0].nodeName&&!t.closest(o[0],"li")&&!t.closest(o[0],"table")||0!==i.startOffset)if(e.args.preventDefault(),e.args.shiftKey){if(this.rangeCollection.length>0&&4===this.rangeCollection[this.rangeCollection.length-1].startContainer.textContent.length){var r=this.rangeCollection[this.rangeCollection.length-1].startContainer;this.nodeSelectionObj.setSelectionText(this.contentRenderer.getDocument(),r,r,0,r.textContent.length),zt.Insert(this.contentRenderer.getDocument(),document.createTextNode("")),this.rangeCollection.pop()}}else zt.Insert(this.contentRenderer.getDocument()," "),this.rangeCollection.push(this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()))}"space"!==e.args.action&&"enter"!==e.args.action||this.spaceLink(e.args),"chrome"!==t.Browser.info.name||t.isNullOrUndefined(this.rangeElement)||t.isNullOrUndefined(this.oldRangeElement)||"TD"===n.startContainer.parentElement.tagName||"TH"===n.startContainer.parentElement.tagName||(this.rangeElement=null,this.oldRangeElement=null,e.args.preventDefault())},n.prototype.backSpaceCleanup=function(e,n){var i=!1;if("Backspace"===e.args.code&&8===e.args.keyCode&&0===n.startOffset&&0===n.endOffset&&0===this.parent.getSelection().length&&n.startContainer.textContent.length>0&&"TD"!==n.startContainer.parentElement.tagName&&"TH"!==n.startContainer.parentElement.tagName){if(this.rangeElement=this.getRootBlockNode(n.startContainer),"OL"===this.rangeElement.tagName||"UL"===this.rangeElement.tagName){var o=this.getRangeLiNode(n.startContainer);o.previousElementSibling&&o.previousElementSibling.childElementCount>0&&(this.oldRangeElement=o.previousElementSibling.lastElementChild,t.isNullOrUndefined(o.lastElementChild)?this.rangeElement=o:(this.rangeElement=o.lastElementChild,i=!0))}else{if("TABLE"===this.rangeElement.tagName||!t.isNullOrUndefined(this.rangeElement.previousElementSibling)&&"TABLE"===this.rangeElement.previousElementSibling.tagName)return;this.oldRangeElement=this.rangeElement.previousElementSibling}if(t.isNullOrUndefined(this.oldRangeElement))return;if("OL"!==this.oldRangeElement.tagName&&"UL"!==this.oldRangeElement.tagName||(this.oldRangeElement=this.oldRangeElement.lastElementChild.lastElementChild?this.oldRangeElement.lastElementChild.lastElementChild:this.oldRangeElement.lastElementChild),this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),this.oldRangeElement,this.oldRangeElement.childNodes.length),this.oldRangeElement.querySelector("BR")&&t.detach(this.oldRangeElement.querySelector("BR")),!t.isNullOrUndefined(this.rangeElement)&&this.oldRangeElement!==this.rangeElement){for(;this.rangeElement.firstChild;)this.oldRangeElement.appendChild(this.rangeElement.childNodes[0]);i?t.detach(this.rangeElement.parentElement):t.detach(this.rangeElement),this.oldRangeElement.normalize()}}},n.prototype.getRootBlockNode=function(e){for(;e&&this.parent&&this.parent.inputElement!==e&&e.parentElement!==this.parent.inputElement;e=e)e=e.parentElement;return e},n.prototype.getRangeLiNode=function(e){for(var t=e.parentElement;t!==this.parent.inputElement&&(1!==t.nodeType||"LI"!==t.tagName);)t=t.parentElement;return t},n.prototype.onPaste=function(e){var n=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if(e.text.match(n)){if(e.isWordPaste)return;e.args.preventDefault();for(var i=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),o=(this.parent.formatter.editorManager.nodeSelection.save(i,this.parent.contentModule.getDocument()),new RegExp(/([^\S]|^)(((https?\:\/\/)))/gi)),r=new RegExp(/([^\S]|^)(((www\.))(\S+))/gi),s=e.text.split("\n"),a="",l=0;l<s.length;l++)if(""===s[l].trim())a+="<p><br></p>";else{for(var d="",c=!0,p=s[l].split(" "),h=0;h<p.length;h++)""===p[h].trim()?d+=c?" ":" ":(c=!1,d+=p[h]+" ");a+=0===l?"<span>"+d.trim()+"</span>":"<p>"+d.trim()+"</p>"}var u=this.parent.createElement("div");u.setAttribute("class","pasteContent"),u.style.display="inline",u.innerHTML=a;for(var m=u.querySelectorAll("span, p"),l=0;l<m.length;l++){for(var g=m[l].innerHTML.split(" "),f="",h=0;h<g.length;h++)g[h].match(o)||g[h].match(r)?f+='<a className="e-rte-anchor" href="'+g[h]+'" title="'+g[h]+'"target="_blank">'+g[h]+" </a>":f+=g[h]+" ";m[l].innerHTML=f.trim()}t.isNullOrUndefined(this.parent.pasteCleanupModule)?this.parent.formatter.editorManager.execCommand("insertHTML",null,null,null,u):e.callBack(u.innerHTML)}},n.prototype.spaceLink=function(e){var t=this.nodeSelectionObj.getRange(this.contentRenderer.getDocument()),n=this.nodeSelectionObj.getParentNodeCollection(t),i=t.startContainer.textContent.substr(0,t.endOffset),o=i.split(" "),r=o[o.length-1],s=t.startOffset-(i.length-o[o.length-1].length);r=r.slice(0,s);var a=new RegExp(/([^\S]|^)(((https?\:\/\/)|(www\.))(\S+))/gi);if("A"!==n[0].nodeName&&r.match(a)){var l=this.nodeSelectionObj.save(t,this.parent.contentModule.getDocument()),d={url:r.indexOf("http")>-1?r:"http://"+r,selection:l,selectParent:this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(t),text:r,title:"",target:"_blank"};this.parent.formatter.process(this.parent,{item:{command:"Links",subCommand:"CreateLink"}},e,d)}},n.prototype.onToolbarClick=function(e){var n,i,o,r=e.item,s=t.closest(e.originalEvent.target,".e-rte-quick-popup");if(s&&!s.classList.contains("e-rte-inline-popup")){if("SourceCode"!==r.subCommand&&"Preview"!==r.subCommand&&"FontColor"!==r.subCommand&&"BackgroundColor"!==r.subCommand){I()&&"Images"===r.command&&this.nodeSelectionObj.restore();d=this.nodeSelectionObj.getRange(this.parent.contentModule.getDocument());n=this.nodeSelectionObj.save(d,this.parent.contentModule.getDocument()),i=this.nodeSelectionObj.getNodeCollection(d),o=this.nodeSelectionObj.getParentNodeCollection(d)}"Images"===r.command&&this.parent.notify("image-toolbar-action",{member:"image",args:e,selectNode:i,selection:n,selectParent:o}),"Links"===r.command&&this.parent.notify("link-toolbar-action",{member:"link",args:e,selectNode:i,selection:n,selectParent:o}),"Table"===r.command&&this.parent.notify("table-toolbar-action",{member:"table",args:e,selectNode:i,selection:n,selectParent:o})}else{var a=document.getElementById(this.parent.getID()+"_rtelink"),l=document.getElementById(this.parent.getID()+"_image");if("SourceCode"!==r.subCommand&&"Preview"!==r.subCommand&&"FontColor"!==r.subCommand&&"BackgroundColor"!==r.subCommand){var d=this.nodeSelectionObj.getRange(this.parent.contentModule.getDocument());t.isNullOrUndefined(a)&&t.isNullOrUndefined(l)&&(n=this.nodeSelectionObj.save(d,this.parent.contentModule.getDocument())),i=this.nodeSelectionObj.getNodeCollection(d),o=this.nodeSelectionObj.getParentNodeCollection(d)}switch(r.subCommand){case"Maximize":this.parent.notify("enableFullScreen",{args:e});break;case"Minimize":this.parent.notify("disableFullScreen",{args:e});break;case"CreateLink":this.parent.notify("insertLink",{member:"link",args:e,selectNode:i,selection:n,selectParent:o});break;case"RemoveLink":this.parent.notify("unLink",{member:"link",args:e,selectNode:i,selection:n,selectParent:o});break;case"Print":this.parent.print();break;case"Image":this.parent.notify("insertImage",{member:"image",args:e,selectNode:i,selection:n,selectParent:o});break;case"CreateTable":this.parent.notify("createTable",{member:"table",args:e,selection:n});break;case"SourceCode":this.parent.notify("sourceCode",{member:"viewSource",args:e});break;case"Preview":this.parent.notify("updateSource",{member:"updateSource",args:e});break;case"FontColor":case"BackgroundColor":break;case"File":this.parent.notify("renderFileManager",{member:"fileManager",args:e,selectNode:i,selection:n,selectParent:o});break;default:this.parent.formatter.process(this.parent,e,e.originalEvent,null)}}},n.prototype.renderColorPicker=function(e){this.colorPickerModule.renderColorPickerInput(e)},n.prototype.instantiateRenderer=function(){this.parent.iframeSettings.enable?this.renderFactory.addRenderer(e.RenderType.Content,new un(this.parent,this.locator)):this.renderFactory.addRenderer(e.RenderType.Content,new pn(this.parent,this.locator))},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(F,this.render),this.parent.off(_,this.onPropertyChanged),this.parent.off("html-toolbar-click",this.onToolbarClick),this.parent.off("render-color-picker",this.renderColorPicker),this.parent.off(z,this.destroy),this.parent.off(Q,this.onKeyDown),this.parent.off("initial-load",this.instantiateRenderer),this.parent.off("selectAll",this.selectAll),this.parent.off("selectRange",this.selectRange),this.parent.off("getSelectedHtml",this.getSelectedHtml),this.parent.off(V,this.onSelectionSave),this.parent.off("selection-restore",this.onSelectionRestore),this.parent.off("readOnlyMode",this.updateReadOnly),this.parent.off(G,this.onPaste))},n.prototype.render=function(){this.contentRenderer=this.renderFactory.getRenderer(e.RenderType.Content);var n=this.contentRenderer.getEditPanel(),i={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};if(t.isNullOrUndefined(this.parent.formatter)){var o=new an({currentDocument:this.contentRenderer.getDocument(),element:n,options:i});this.parent.setProperties({formatter:o},!0)}else this.parent.formatter.updateFormatter(n,this.contentRenderer.getDocument(),i);this.parent.enableXhtml&&this.parent.notify("xhtmlValidation",{}),this.parent.toolbarSettings.enable&&(this.toolbarUpdate=new cn(this.parent)),this.parent.notify("bind-on-end",{})},n.prototype.onPropertyChanged=function(e){if(!t.isNullOrUndefined(e.newProp.formatter)){var n=this.contentRenderer.getEditPanel(),i={undoRedoSteps:this.parent.undoRedoSteps,undoRedoTimer:this.parent.undoRedoTimer};this.parent.formatter.updateFormatter(n,this.contentRenderer.getDocument(),i)}},n.prototype.getModuleName=function(){return"htmlEditor"},n.prototype.selectAll=function(){var e=E(this.parent.contentModule.getDocument(),this.parent.contentModule.getEditPanel());e.length>0&&this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.parent.contentModule.getDocument(),e[0],e[e.length-1],0,e[e.length-1].textContent.length)},n.prototype.selectRange=function(e){this.parent.formatter.editorManager.nodeSelection.setRange(this.parent.contentModule.getDocument(),e.range)},n.prototype.getSelectedHtml=function(e){e.callBack(this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()).toString())},n}(),fn=function(){function n(e,t){this.inlineNode=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","font","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],this.blockNode=["div","h1","h2","h3","h4","h5","h6","address","blockquote","button","center","dd","dir","dl","dt","fieldset","frameset","hr","iframe","isindex","li","map","menu","noframes","noscript","object","ol","pre","td","tr","th","tbody","tfoot","thead","table","ul","header","article","nav","footer","section","aside","main","figure","figcaption"],this.isNotFromHtml=!1,this.containsHtml=!1,this.parent=e,this.locator=t,this.renderFactory=this.locator.getService("rendererFactory"),this.i10n=t.getService("rteLocale"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return n.prototype.addEventListener=function(){this.nodeSelectionObj=new Bt,this.parent.isDestroyed||(this.parent.on("pasteClean",this.pasteClean,this),this.parent.on(z,this.destroy,this))},n.prototype.destroy=function(){this.removeEventListener()},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("pasteClean",this.pasteClean),this.parent.off(z,this.destroy))},n.prototype.pasteClean=function(n){var i,o=this,r={requestType:"Paste",editorMode:this.parent.editorMode,event:n},s=null;if(n.args&&!t.isNullOrUndefined(n.args.clipboardData)&&(s=n.args.clipboardData.getData("text/html")),this.parent.trigger("beforePasteCleanup",{value:s}),n.args&&null!==s&&"HTML"===this.parent.editorMode){if(0===s.length){var a=new RegExp(/<\/[a-z][\s\S]*>/i);s=n.args.clipboardData.getData("text/plain"),this.isNotFromHtml=""!==s,s=s.replace(/</g,"<"),s=s.replace(/>/g,">"),this.containsHtml=a.test(s);var l=n&&n.args.clipboardData&&n.args.clipboardData.items.length>0?n.args.clipboardData.items[0].getAsFile():null;if(this.parent.notify(G,{file:l,args:n.args,text:s,callBack:function(e){"object"==typeof(i=e)?o.parent.formatter.editorManager.execCommand("Images","Image",n.args,o.imageFormatting.bind(o,r),"pasteCleanup",i,"pasteCleanupModule"):s=i}}),!a.test(s)){var d=this.parent.createElement("div");d.innerHTML=this.splitBreakLine(s),s=d.innerHTML}}else s.length>0&&this.parent.formatter.editorManager.observer.notify("ms_word_cleanup",{args:n.args,text:n.text,allowedStylePropertiesArray:this.parent.pasteCleanupSettings.allowedStyleProps,callBack:function(e){s=e.trim()}});this.contentRenderer=this.renderFactory.getRenderer(e.RenderType.Content);var c=this.contentRenderer.getDocument(),p=this.nodeSelectionObj.getRange(c);if(this.saveSelection=this.nodeSelectionObj.save(p,c),this.parent.trigger("afterPasteCleanup",{value:s},function(e){s=e.value}),this.parent.pasteCleanupSettings.prompt){n.args.preventDefault();var h=this.parent.createElement("div");h.innerHTML=s,""===h.textContent&&t.isNullOrUndefined(h.querySelector("img"))&&t.isNullOrUndefined(h.querySelector("table"))||this.pasteDialog(s,r)}else this.parent.pasteCleanupSettings.plainText?(n.args.preventDefault(),this.plainFormatting(s,r)):this.parent.pasteCleanupSettings.keepFormat?(n.args.preventDefault(),this.formatting(s,!1,r)):(n.args.preventDefault(),this.formatting(s,!0,r))}},n.prototype.splitBreakLine=function(e){for(var t=e.split("\n"),n="",i=0;i<t.length;i++)""===t[i].trim()?n+="<p><br></p>":n+="<p>"+this.makeSpace(t[i]).trim()+"</p>";return n},n.prototype.makeSpace=function(e){for(var t="",n=!0,i=e.split(" "),o=0;o<i.length;o++)""===i[o].trim()?t+=n?" ":" ":(n=!1,t+=i[o]+" ");return t},n.prototype.imgUploading=function(e){var n=e.querySelectorAll(".pasteContent_Img");if(this.parent.insertImageSettings.saveUrl&&n.length>0){for(var i=[],o=[],r=[],s=0;s<n.length;s++)n[s].getAttribute("src").split(",")[0].indexOf("base64")>=0&&(i.push(n[s].getAttribute("src")),o.push(t.getUniqueID("rte_image")),r.push(n[s]));for(var a=[],s=0;s<i.length;s++)a.push(this.base64ToFile(i[s],o[s]));for(s=0;s<a.length;s++)this.uploadMethod(a[s],r[s]);t.isNullOrUndefined(this.parent.insertImageSettings.path)&&"Blob"===this.parent.insertImageSettings.saveFormat&&this.getBlob(n)}else"Blob"===this.parent.insertImageSettings.saveFormat&&this.getBlob(n);for(var l=e.querySelectorAll(".pasteContent_Img"),s=0;s<l.length;s++)l[s].classList.remove("pasteContent_Img"),""===l[s].getAttribute("class").trim()&&n[s].removeAttribute("class")},n.prototype.getBlob=function(e){for(var n=0;n<e.length;n++)if(!t.isNullOrUndefined(e[n].getAttribute("src"))&&e[n].getAttribute("src").split(",")[0].indexOf("base64")>=0){var i=URL.createObjectURL(D(e[n].getAttribute("src")));e[n].setAttribute("src",i)}},n.prototype.uploadMethod=function(e,n){var i=this,s=document.createElement("div");document.body.appendChild(s),s.setAttribute("display","none"),n.style.opacity="0.5";var a=this.parent.createElement("div");this.parent.element.appendChild(a);var l=this.parent.createElement("input",{id:this.parent.element.id+"_upload",attrs:{type:"File",name:"UploadFiles"}}),d=this.parent.iframeSettings.enable?-50:-90,c=new o.Popup(a,{relateTo:n,height:"85px",width:"300px",offsetY:d,content:l,viewPortElement:this.parent.element,position:{X:"center",Y:"top"},enableRtl:this.parent.enableRtl,zIndex:10001,close:function(e){i.parent.isBlur=!1,c.destroy(),t.detach(c.element)}});c.element.style.display="none",t.addClass([c.element],["e-popup-open","e-rte-upload-popup"]);var p=e.size>1e6?300:100;setTimeout(function(){i.refreshPopup(n,c)},p);var h,u,m=new r.Uploader({asyncSettings:{saveUrl:this.parent.insertImageSettings.saveUrl,removeUrl:this.parent.insertImageSettings.removeUrl},cssClass:"e-rte-dialog-upload",dropArea:this.parent.inputElement,allowedExtensions:this.parent.insertImageSettings.allowedTypes.toString(),success:function(e){setTimeout(function(){i.popupClose(c,m,n,e)},900)},uploading:function(e){i.parent.isServerRendered||(i.parent.trigger("imageUploading",e),i.parent.inputElement.contentEditable="false")},beforeUpload:function(e){i.parent.isServerRendered?((u=JSON.parse(JSON.stringify(e))).filesData=h,e.cancel=!0,i.parent.trigger("imageUploading",u,function(e){e.cancel||(m.currentRequestHeader=e.currentRequest?e.currentRequest:m.currentRequestHeader,m.customFormDatas=e.customFormData&&e.customFormData.length>0?e.customFormData:m.customFormDatas,m.uploadFiles(h,null))})):i.parent.trigger("beforeImageUpload",e)},failure:function(e){setTimeout(function(){i.uploadFailure(n,m,c,e)},900)},canceling:function(){i.parent.inputElement.contentEditable="true"," "===n.nextSibling.textContent&&t.detach(n.nextSibling),t.detach(n),c.close()},selected:function(e){e.cancel=!0,i.parent.isServerRendered&&(h=e.filesData)},removing:function(){i.parent.inputElement.contentEditable="true"," "===n.nextSibling.textContent&&t.detach(n.nextSibling),t.detach(n),c.close()}});m.appendTo(c.element.childNodes[0]);var g=[{name:e.name,rawFile:e,size:e.size,type:e.type,validationMessages:{minSize:"",maxSize:""},statusCode:"1"}];m.createFileList(g),m.filesData.push(g[0]),h=g,m.upload(g),c.element.getElementsByClassName("e-file-select-wrap")[0].style.display="none",t.detach(c.element.querySelector(".e-rte-dialog-upload .e-file-select-wrap"))},n.prototype.uploadFailure=function(e,n,i,o){this.parent.inputElement.contentEditable="true",t.detach(e),i&&i.close(),this.parent.trigger("imageUploadFailed",o),n.destroy()},n.prototype.popupClose=function(e,n,i,o){var r=this;this.parent.inputElement.contentEditable="true",o.element=i,this.parent.trigger("imageUploadSuccess",o,function(e){if(!t.isNullOrUndefined(r.parent.insertImageSettings.path)){var n=r.parent.insertImageSettings.path+e.file.name;i.src=n,i.setAttribute("alt",e.file.name)}}),e.close(),i.style.opacity="1",n.destroy()},n.prototype.refreshPopup=function(e,t){(this.parent.iframeSettings.enable?this.parent.element.offsetTop+e.offsetTop:e.offsetTop)>this.parent.element.offsetTop+this.parent.element.offsetHeight?(t.relateTo=this.parent.inputElement,t.offsetY=this.parent.iframeSettings.enable?-30:-65,t.element.style.display="block"):t&&(t.refreshPosition(e),t.element.style.display="block")},n.prototype.base64ToFile=function(e,n){for(var i=e.split(","),o=i[0].match(/:(.*?);/)[1].split("/")[1],r=atob(i[1]),s=r.length,a=new Uint8Array(s);s--;)a[s]=r.charCodeAt(s);if(t.Browser.isIE||navigator.appVersion.indexOf("Edge")>-1){var l=new Blob([a],{type:o});return t.extend(l,{name:n+"."+(t.isNullOrUndefined(o)?"":o)}),l}return new File([a],n+"."+(t.isNullOrUndefined(o)?"":o),{type:o})},n.prototype.imageFormatting=function(t,n){var i=this.parent.createElement("span");i.appendChild(n.elements[0]);var o=i.innerHTML;this.contentRenderer=this.renderFactory.getRenderer(e.RenderType.Content);var r=this.contentRenderer.getDocument(),s=this.nodeSelectionObj.getRange(r);this.saveSelection=this.nodeSelectionObj.save(s,r),this.parent.pasteCleanupSettings.prompt?this.pasteDialog(o,t):this.parent.pasteCleanupSettings.plainText?this.plainFormatting(o,t):this.parent.pasteCleanupSettings.keepFormat?this.formatting(o,!1,t):this.formatting(o,!0,t)},n.prototype.radioRender=function(){var e=new s.RadioButton({label:this.i10n.getConstant("keepFormat"),name:"pasteOption",checked:!0});e.isStringTemplate=!0;var t=this.parent.element.querySelector("#keepFormating");e.appendTo(t);var n=new s.RadioButton({label:this.i10n.getConstant("cleanFormat"),name:"pasteOption"});n.isStringTemplate=!0;var i=this.parent.element.querySelector("#cleanFormat");n.appendTo(i);var o=new s.RadioButton({label:this.i10n.getConstant("plainText"),name:"pasteOption"});o.isStringTemplate=!0;var r=this.parent.element.querySelector("#plainTextFormat");o.appendTo(r)},n.prototype.selectFormatting=function(e,t,n,i){n?this.formatting(e,!1,t):i?this.formatting(e,!0,t):this.plainFormatting(e,t)},n.prototype.pasteDialog=function(e,n){var i=this,o=!1,r=this.parent.height,s={buttons:[{click:function(){if(!a.isDestroyed){var s=i.parent.element.querySelector("#keepFormating").checked,l=i.parent.element.querySelector("#cleanFormat").checked;a.hide(),i.parent.height=o?r:i.parent.height,o=!1;var d=t.isBlazor()?null:a;i.dialogRenderObj.close(d),a.destroy(),i.selectFormatting(e,n,s,l)}},buttonModel:{isPrimary:!0,cssClass:"e-flat e-rte-pasteok",content:this.i10n.getConstant("pasteDialogOk")}},{click:function(){if(!a.isDestroyed){a.hide(),i.parent.height=o?r:i.parent.height,o=!1;var e=t.isBlazor()?null:a;i.dialogRenderObj.close(e),a.destroy()}},buttonModel:{cssClass:"e-flat e-rte-pastecancel",content:this.i10n.getConstant("pasteDialogCancel")}}],header:this.i10n.getConstant("pasteFormat"),content:this.i10n.getConstant("pasteFormatContent")+'<br/><div><div style="padding-top:24px;"><input type="radio" class="e-rte-keepformat" id="keepFormating"/></div><div style="padding-top:20px;"><input type="radio" class="e-rte-removeformat" id="cleanFormat"/></div><div style="padding-top:20px;"><input type="radio" class="e-rte-plainformat" id="plainTextFormat"/></div></div>',target:this.parent.element,width:"300px",height:"265px",cssClass:"e-rte-dialog-minheight",isModal:!0,visible:!1},a=this.dialogRenderObj.render(s),l=this.parent.element.querySelector("#"+this.parent.getID()+"_pasteCleanupDialog");null!==l&&""!==l.innerHTML&&this.destroyDialog(l),null===l&&(l=this.parent.createElement("div",{id:this.parent.getID()+"_pasteCleanupDialog"}),this.parent.element.appendChild(l)),a.appendTo(l),this.radioRender(),this.parent.element.offsetHeight<parseInt(a.height.split("px")[0],null)&&(this.parent.height=parseInt(a.height.split("px")[0],null)+40,o=!0),a.show()},n.prototype.destroyDialog=function(e){var n=this.parent.element.querySelector(".e-dlg-container");t.detach(n);for(var i=e.children.length,o=0;o<i;o++)t.detach(e.children[0])},n.prototype.formatting=function(e,n,i){var o=this,r=this.parent.createElement("div",{className:"pasteContent",styles:"display:inline;"});this.isNotFromHtml&&this.containsHtml&&(e=this.splitBreakLine(e)),r.innerHTML=e,null!==this.parent.pasteCleanupSettings.deniedTags&&(r=this.deniedTags(r)),n?r=this.deniedAttributes(r,n):null!==this.parent.pasteCleanupSettings.deniedAttrs&&(r=this.deniedAttributes(r,n)),null!==this.parent.pasteCleanupSettings.allowedStyleProps&&(r=this.allowedStyle(r)),this.saveSelection.restore(),r.innerHTML=this.sanitizeHelper(r.innerHTML);for(var s=r.querySelectorAll("img"),a=0;a<s.length;a++)s[a].classList.add("pasteContent_Img");this.addTempClass(r),""===r.textContent&&t.isNullOrUndefined(r.querySelector("img"))&&t.isNullOrUndefined(r.querySelector("table"))||(this.parent.formatter.editorManager.execCommand("inserthtml","pasteCleanup",i,function(e){t.extend(i,{elements:e.elements,imageElements:e.imgElem},!0),o.parent.formatter.onSuccess(o.parent,i)},r),this.removeTempClass(),this.parent.notify("toolbar-refresh",{}),this.imgUploading(this.parent.inputElement),this.parent.iframeSettings.enable&&this.parent.updateValue())},n.prototype.addTempClass=function(e){for(var t=e.children,n=0;n<t.length;n++)t[n].classList.add("pasteContent_RTE")},n.prototype.removeTempClass=function(){for(var e=this.parent.inputElement.querySelectorAll(".pasteContent_RTE"),t=0;t<e.length;t++)e[t].classList.remove("pasteContent_RTE"),""===e[t].getAttribute("class")&&e[t].removeAttribute("class")},n.prototype.sanitizeHelper=function(e){return e=O(e,this.parent)},n.prototype.plainFormatting=function(e,n){var i=this,o=this.parent.createElement("div",{className:"pasteContent",styles:"display:inline;"});if(o.innerHTML=e,this.detachInlineElements(o),this.getTextContent(o),""!==o.textContent.trim()){if(!t.isNullOrUndefined(o.firstElementChild)&&"BR"!==o.firstElementChild.tagName){var r=o.firstElementChild;if(!t.isNullOrUndefined(o.firstElementChild)){for(var s=this.parent.createElement("span"),a=0,l=0;a<r.childNodes.length;a++,l++)if("#text"===r.childNodes[a].nodeName)s.appendChild(r.childNodes[a]),o.insertBefore(s,o.firstElementChild),a--;else{if("#text"===r.childNodes[a].nodeName||0!==l)break;for(var d=0;d<r.childNodes[a].childNodes.length;d++)s.appendChild(r.childNodes[a].childNodes[d]),o.insertBefore(s,o.firstElementChild),d--;a--}r.hasChildNodes()||t.detach(r)}}this.removeEmptyElements(o),this.saveSelection.restore(),o.innerHTML=this.sanitizeHelper(o.innerHTML),this.addTempClass(o),this.parent.formatter.editorManager.execCommand("inserthtml","pasteCleanup",n,function(e){t.extend(n,{elements:e.elements,imageElements:e.imgElem},!0),i.parent.formatter.onSuccess(i.parent,n)},o),this.removeTempClass()}else this.saveSelection.restore(),t.extend(n,{elements:[]},!0),this.parent.formatter.onSuccess(this.parent,n)},n.prototype.getTextContent=function(e){for(c=0;c<this.blockNode.length;c++)for(var n=e.querySelectorAll(this.blockNode[c]),i=0;i<n.length;i++){for(var o=void 0,r=0,s=0,a=void 0;r<n[i].childNodes.length;r++,s++)if("DIV"===n[i].childNodes[r].nodeName||"P"===n[i].childNodes[r].nodeName||"#text"===n[i].childNodes[r].nodeName&&" "!==n[i].childNodes[r].nodeValue.replace(/\u00a0/g," ")&&""===n[i].childNodes[r].textContent.trim())o=n[i].childNodes[r].parentElement,n[i].childNodes[r].parentElement.parentElement.insertBefore(n[i].childNodes[r],n[i].childNodes[r].parentElement),r--;else{if(o=n[i].childNodes[r].parentElement,"text"===a)o.previousElementSibling.appendChild(n[i].childNodes[r]);else{var l=this.parent.createElement("div",{id:"newDiv"});l.appendChild(n[i].childNodes[r]),o.parentElement.insertBefore(l,o)}r--,a="text"}t.isNullOrUndefined(o)||t.detach(o)}for(var d=e.querySelectorAll("*"),c=0;c<d.length;c++)for(var p=d[c].attributes,i=0;i<p.length;i++)d[c].removeAttribute(p[i].name),i--},n.prototype.detachInlineElements=function(e){for(var n=0;n<this.inlineNode.length;n++)for(var i=e.querySelectorAll(this.inlineNode[n]),o=0;o<i.length;o++){for(var r=void 0,s=0;s<i[o].childNodes.length;s++)r=i[o].childNodes[s].parentElement,i[o].childNodes[s].parentElement.parentElement.insertBefore(i[o].childNodes[s],i[o].childNodes[s].parentElement),s--;t.isNullOrUndefined(r)||t.detach(r)}},n.prototype.findDetachEmptyElem=function(e){return t.isNullOrUndefined(e.parentElement)?null:""===e.parentElement.textContent.trim()&&"pasteContent"!==e.parentElement.getAttribute("class")?this.findDetachEmptyElem(e.parentElement):e},n.prototype.removeEmptyElements=function(e){for(var n=e.querySelectorAll(":empty"),i=0;i<n.length;i++)if("BR"!==n[i].tagName){var o=this.findDetachEmptyElem(n[i]);t.isNullOrUndefined(o)||t.detach(o)}},n.prototype.tagGrouping=function(e){for(var t=e.slice(),n=Object.keys(ft),i=n.map(function(e){return ft[e]}),o=[],r=0;r<t.length;r++)if(t[r].split("[").length>1&&(t[r]=t[r].split("[")[0].trim()),n.indexOf(t[r])>-1)for(var s=0;s<i[n.indexOf(t[r])].length;s++)t.indexOf(i[n.indexOf(t[r])][s])<0&&o.indexOf(i[n.indexOf(t[r])][s])<0&&o.push(i[n.indexOf(t[r])][s]);return e=e.concat(o)},n.prototype.attributesfilter=function(e){for(var t=0;t<e.length;t++)if(e[t].split("[").length>1){for(var n=e[t].split("[")[1].split("]")[0].split(","),i=[],o=[],r=0;r<n.length;r++)n[r].indexOf("!")<0?i.push(n[r].trim()):o.push(n[r].split("!")[1].trim());var s=i.length>1?i.join("]["):i.join(),a=o.length>1?o.join("]["):o.join();if(a.length>0){var l=""!==s?e[t].split("[")[0]+"["+s+"]":e[t].split("[")[0];e[t]=l+":not(["+a+"])"}else e[t]=e[t].split("[")[0]+"["+s+"]"}return e},n.prototype.deniedTags=function(e){var n=t.isNullOrUndefined(this.parent.pasteCleanupSettings.deniedTags)?[]:this.parent.pasteCleanupSettings.deniedTags.slice();n=this.attributesfilter(n),n=this.tagGrouping(n);for(var i=0;i<n.length;i++)for(var o=e.querySelectorAll(n[i]),r=o.length-1;r>=0;r--){for(var s=o[r].parentNode;o[r].firstChild;)s.insertBefore(o[r].firstChild,o[r]);s.removeChild(o[r])}return e},n.prototype.deniedAttributes=function(e,n){var i=t.isNullOrUndefined(this.parent.pasteCleanupSettings.deniedAttrs)?[]:this.parent.pasteCleanupSettings.deniedAttrs.slice();n&&i.push("style");for(var o=0;o<i.length;o++)for(var r=e.querySelectorAll("["+i[o]+"]"),s=0;s<r.length;s++)r[s].removeAttribute(i[o]);return e},n.prototype.allowedStyle=function(e){var n=t.isNullOrUndefined(this.parent.pasteCleanupSettings.allowedStyleProps)?[]:this.parent.pasteCleanupSettings.allowedStyleProps.slice();n.push("list-style-type","list-style");for(var i=e.querySelectorAll("[style]"),o=0;o<i.length;o++){for(var r="",s=[],a=i[o].getAttribute("style").split(";"),l=0;l<a.length;l++)n.indexOf(a[l].split(":")[0].trim())>=0&&s.push(a[l]);i[o].removeAttribute("style"),(r=""===s.join(";").trim()?s.join(";"):s.join(";")+";")&&i[o].setAttribute("style",r)}return e},n.prototype.getModuleName=function(){return"pasteCleanup"},n}(),bn=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(F,this.renderResizable,this),this.parent.on(z,this.destroy,this))},e.prototype.renderResizable=function(){this.resizer=this.parent.createElement("div",{id:this.parent.getID()+"-resizable",className:"e-icons e-resize-handle e-south-east"}),this.parent.element.classList.add("e-rte-resize"),this.parent.element.appendChild(this.resizer),this.touchStartEvent="msie"===t.Browser.info.name?"pointerdown":"touchstart",t.EventHandler.add(this.resizer,"mousedown",this.resizeStart,this),t.EventHandler.add(this.resizer,this.touchStartEvent,this.resizeStart,this)},e.prototype.resizeStart=function(e){var n=this;e.cancelable&&e.preventDefault(),this.wireResizeEvents(),this.parent.notify("resizeInitialized",{});var i=t.isBlazor()?{requestType:"editor"}:{event:e,requestType:"editor"};this.parent.trigger("resizeStart",i,function(e){e.cancel&&n.unwireResizeEvents()})},e.prototype.performResize=function(e){var n=this,i=t.isBlazor()?{requestType:"editor"}:{event:e,requestType:"editor"};this.parent.trigger("resizing",i,function(e){e.cancel&&n.unwireResizeEvents()});var o=this.parent.element.getBoundingClientRect();if(this.isMouseEvent(e))this.parent.element.style.height=e.clientY-o.top+"px",this.parent.element.style.width=e.clientX-o.left+"px";else{var r="msie"!==t.Browser.info.name?e.touches[0]:e;this.parent.element.style.height=r.clientY-o.top+"px",this.parent.element.style.width=r.clientX-o.left+"px"}this.parent.toolbarSettings.enable||this.parent.setContentHeight("",!1),this.parent.refreshUI()},e.prototype.stopResize=function(e){this.parent.refreshUI(),this.unwireResizeEvents();var n=t.isBlazor()?{requestType:"editor"}:{event:e,requestType:"editor"};this.parent.trigger("resizeStop",n)},e.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},e.prototype.isMouseEvent=function(e){var n=!1;return("mouse"===this.getEventType(e.type)||!t.isNullOrUndefined(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(n=!0),n},e.prototype.wireResizeEvents=function(){t.EventHandler.add(document,"mousemove",this.performResize,this),t.EventHandler.add(document,"mouseup",this.stopResize,this),this.touchMoveEvent="msie"===t.Browser.info.name?"pointermove":"touchmove",this.touchEndEvent="msie"===t.Browser.info.name?"pointerup":"touchend",t.EventHandler.add(document,this.touchMoveEvent,this.performResize,this),t.EventHandler.add(document,this.touchEndEvent,this.stopResize,this)},e.prototype.unwireResizeEvents=function(){t.EventHandler.remove(document,"mousemove",this.performResize),t.EventHandler.remove(document,"mouseup",this.stopResize),t.EventHandler.remove(document,this.touchMoveEvent,this.performResize),t.EventHandler.remove(document,this.touchEndEvent,this.stopResize)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(F,this.renderResizable),this.parent.element.classList.remove("e-rte-resize"),t.EventHandler.remove(this.resizer,"mousedown",this.resizeStart),t.EventHandler.remove(this.resizer,this.touchStartEvent,this.resizeStart),this.resizer&&t.detach(this.resizer),this.parent.off(z,this.destroy))},e.prototype.getModuleName=function(){return"resize"},e}(),vn=function(){function n(e,t){a.FileManager.Inject(a.ContextMenu,a.DetailsView,a.NavigationPane,a.Toolbar),this.parent=e,this.i10n=t.getService("rteLocale"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.rendererFactory=t.getService("rendererFactory"),this.addEventListener()}return n.prototype.initialize=function(){this.parent.fileManagerModule=this,this.contentModule=this.rendererFactory.getRenderer(e.RenderType.Content)},n.prototype.render=function(e){var n,i=this;n=e.selectNode&&"IMG"===e.selectNode[0].nodeName?this.parent.localeObj.getConstant("dialogUpdate"):this.i10n.getConstant("dialogInsert");var o=this.parent.localeObj.getConstant("fileDialogHeader"),r=this.i10n.getConstant("dialogCancel");this.dlgButtons=[{click:this.insertImageUrl.bind(this),buttonModel:{content:n,cssClass:"e-flat e-insertImage",isPrimary:!0}},{click:function(e){i.cancelDialog()},buttonModel:{cssClass:"e-flat e-cancel",content:r}}],this.dlgButtons[0].buttonModel.disabled=!0,this.selectObj={selection:e.selection,args:e.args,selectParent:e.selectParent};var s=this.parent.createElement("div",{className:"e-rte-file-manager-dialog",id:this.parent.getID()+"_file-manager-dialog",attrs:{"aria-owns":this.parent.getID()}});document.body.appendChild(s),this.fileWrap=this.parent.createElement("div",{id:this.parent.getID()+"_rte-file-manager",className:"e-img-file-wrap"}),s.appendChild(this.fileWrap),s.appendChild(this.getInputUrlElement());var a={visible:!1,isModal:!0,header:o,target:document.body,locale:this.parent.locale,enableRtl:this.parent.enableRtl,cssClass:"e-rte-elements",animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,width:"720px",height:"auto",position:{X:"center",Y:"center"},buttons:this.dlgButtons,created:this.renderFileManager.bind(this),close:function(e){i.parent.isBlur=!1,e&&e.event.returnValue&&i.selectObj.selection.restore(),i.destroyComponents(),i.dialogRenderObj.close(e)}};this.dialogObj=this.dialogRenderObj.render(a),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(s),this.dialogObj.show(!!t.Browser.isDevice)},n.prototype.renderFileManager=function(){var e=this,n=this;this.fileObj=new a.FileManager({allowMultiSelection:!1,locale:this.parent.locale,enableRtl:this.parent.enableRtl,path:this.parent.fileManagerSettings.path,view:this.parent.fileManagerSettings.view,enablePersistence:this.parent.enablePersistence,cssClass:this.parent.fileManagerSettings.cssClass,sortOrder:this.parent.fileManagerSettings.sortOrder,ajaxSettings:this.parent.fileManagerSettings.ajaxSettings,showThumbnail:this.parent.fileManagerSettings.showThumbnail,rootAliasName:this.parent.fileManagerSettings.rootAliasName,uploadSettings:this.parent.fileManagerSettings.uploadSettings,searchSettings:this.parent.fileManagerSettings.searchSettings,toolbarSettings:this.parent.fileManagerSettings.toolbarSettings,showHiddenItems:this.parent.fileManagerSettings.showHiddenItems,allowDragAndDrop:this.parent.fileManagerSettings.allowDragAndDrop,showFileExtension:this.parent.fileManagerSettings.showFileExtension,detailsViewSettings:this.parent.fileManagerSettings.detailsViewSettings,contextMenuSettings:this.parent.fileManagerSettings.contextMenuSettings,navigationPaneSettings:this.parent.fileManagerSettings.navigationPaneSettings,fileSelect:function(t){var i=t.fileDetails;i.isFile&&n.parent.insertImageSettings.allowedTypes.indexOf(i.type)>-1?(n.inputUrl.value=n.parent.fileManagerSettings.ajaxSettings.getImageUrl+"?path="+(i.filterPath&&i.filterPath.replace(/\\/g,"/"))+i.name,e.dlgButtons[0].buttonModel.disabled=!1):(n.inputUrl.value="",e.dlgButtons[0].buttonModel.disabled=!0),e.dialogObj.buttons=e.dlgButtons},created:function(){e.inputUrl.removeAttribute("disabled")},success:function(){e.fileObj.refreshLayout()}}),t.Browser.isDevice&&(this.fileObj.height="85%"),this.fileObj.appendTo(this.fileWrap),t.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this)},n.prototype.getInputUrlElement=function(){var e=this.parent.createElement("div",{className:"imgUrl"}),t=this.parent.createElement("div",{className:"e-rte-label"});t.innerHTML='<label for="rteSample_img_url">'+this.i10n.getConstant("linkWebUrl")+"</label>",e.appendChild(t);var n=this.i10n.getConstant("imageUrl");return this.inputUrl=this.parent.createElement("input",{className:"e-input e-img-url",attrs:{placeholder:n,spellcheck:"false",disabled:"true"}}),e.appendChild(this.inputUrl),e},n.prototype.insertImageUrl=function(e){var n=this.inputUrl.value;if(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),""!==n){if("HTML"===this.parent.editorMode&&t.isNullOrUndefined(t.closest(this.selectObj.selection.range.startContainer.parentNode,"#"+this.contentModule.getPanel().id))){this.contentModule.getEditPanel().focus();var i=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());this.selectObj.selection=this.parent.formatter.editorManager.nodeSelection.save(i,this.contentModule.getDocument()),this.selectObj.selectParent=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(i)}var o=/[\w-]+.(jpg|png|jpeg|gif)/g,r=t.isNullOrUndefined(n.match(o))||"HTML"!==this.parent.editorMode?"":n.match(o)[0],s={cssClass:"inline"===this.parent.insertImageSettings.display?ie:ne,url:n,selection:this.selectObj.selection,altText:r,selectParent:this.selectObj.selectParent,width:{width:this.parent.insertImageSettings.width,minWidth:this.parent.insertImageSettings.minWidth,maxWidth:this.parent.getInsertImgMaxWidth()},height:{height:this.parent.insertImageSettings.height,minHeight:this.parent.insertImageSettings.minHeight,maxHeight:this.parent.insertImageSettings.maxHeight}};this.parent.formatter.process(this.parent,this.selectObj.args,this.selectObj.args.originalEvent,s),this.dialogObj.hide({returnValue:!1})}},n.prototype.cancelDialog=function(){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0})},n.prototype.onDocumentClick=function(e){var n=e.target,i="#document"!==n.nodeName&&!t.isNullOrUndefined(n.previousElementSibling)&&n.previousElementSibling;t.isNullOrUndefined(this.dialogObj)||t.closest(n,"#"+this.parent.getID()+"_file-manager-dialog")||t.closest(n,"#"+this.parent.getID()+"_rte-file-manager_tb_sortby-popup")||t.closest(n,"#"+this.parent.getID()+"_rte-file-manager_tb_view-popup")||t.closest(n,"#"+this.parent.getID()+"_rte-file-manager_contextmenu")||!t.isNullOrUndefined(t.closest(n,".e-contextmenu-wrapper"))&&t.closest(n,".e-contextmenu-wrapper").querySelector("#"+this.parent.getID()+"_rte-file-manager_contextmenu")||t.isNullOrUndefined(i)||i.classList.contains("e-rte-file-manager-dialog")||t.isNullOrUndefined(i)||i.id===this.parent.getID()+"_rte-file-manager_contextmenu"?this.parent.isRTE=!0:(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,S(this.parent.element,"focusout"))},n.prototype.addEventListener=function(){this.parent.on(F,this.initialize,this),this.parent.on("renderFileManager",this.render,this),this.parent.on(z,this.destroy,this)},n.prototype.removeEventListener=function(){t.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),this.parent.off(F,this.initialize),this.parent.off("renderFileManager",this.render),this.parent.off(z,this.destroy)},n.prototype.destroyComponents=function(){this.fileObj&&(this.fileObj.destroy(),this.fileObj=null),this.dialogObj&&(this.dialogObj.destroy(),t.detach(this.dialogObj.element),this.dialogObj=null)},n.prototype.destroy=function(){this.parent.isDestroyed||(this.destroyComponents(),this.removeEventListener())},n.prototype.getModuleName=function(){return"fileManager"},n}(),yn=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.showFullScreen=function(e){!0!==this.parent.toolbarSettings.enable||"Markdown"===this.parent.editorMode||t.isNullOrUndefined(this.parent.quickToolbarModule)||this.parent.quickToolbarModule.hideQuickToolbars(),this.scrollableParent=o.getScrollableParent(this.parent.element),this.parent.element.classList.contains("e-rte-full-screen")||(this.parent.trigger("actionBegin",{requestType:"Maximize",targetItem:"Maximize",args:e}),this.parent.toolbarSettings.enableFloating&&!this.parent.inlineMode.enable&&this.parent.toolbarSettings.enable&&(this.parent.getToolbarElement().style.width="100%",this.parent.getToolbarElement().style.top="0px"),this.parent.element.classList.add("e-rte-full-screen"),this.toggleParentOverflow(!0),this.parent.setContentHeight(),this.parent.toolbarModule&&(this.parent.getBaseToolbarObject().toolbarObj.items[0].properties||this.parent.getBaseToolbarObject().toolbarObj.removeItems(0),t.Browser.isDevice&&this.parent.toolbarModule.removeFixedTBarClass(),this.parent.toolbarModule.updateItem({targetItem:"Maximize",updateItem:"Minimize",baseToolbar:this.parent.getBaseToolbarObject()})),this.parent.trigger("actionComplete",{requestType:"Maximize",targetItem:"Maximize",args:e}))},e.prototype.hideFullScreen=function(e){if(!0!==this.parent.toolbarSettings.enable||"Markdown"===this.parent.editorMode||t.isNullOrUndefined(this.parent.quickToolbarModule)||this.parent.quickToolbarModule.hideQuickToolbars(),this.parent.element.classList.contains("e-rte-full-screen")){this.parent.element.classList.remove("e-rte-full-screen");for(var n=document.querySelectorAll(".e-rte-overflow"),i=0;i<n.length;i++)t.removeClass([n[i]],["e-rte-overflow"]);this.parent.trigger("actionBegin",{requestType:"Minimize",targetItem:"Minimize",args:e}),this.parent.setContentHeight(),this.parent.toolbarModule&&(this.parent.getBaseToolbarObject().toolbarObj.items[0].properties||this.parent.getBaseToolbarObject().toolbarObj.removeItems(0),this.parent.toolbarModule.updateItem({targetItem:"Minimize",updateItem:"Maximize",baseToolbar:this.parent.getBaseToolbarObject()}),t.Browser.isDevice&&this.parent.inlineMode.enable&&this.parent.toolbarModule.addFixedTBarClass()),this.parent.trigger("actionComplete",{requestType:"Minimize",targetItem:"Minimize",args:e})}},e.prototype.toggleParentOverflow=function(e){if(!t.isNullOrUndefined(this.scrollableParent))for(var n=0;n<this.scrollableParent.length;n++)if("#document"===this.scrollableParent[n].nodeName){i=document.querySelector("body");t.addClass([i],["e-rte-overflow"])}else{var i=this.scrollableParent[n];t.addClass([i],["e-rte-overflow"])}},e.prototype.onKeyDown=function(e){var t=e.args;switch(t.action){case"full-screen":this.showFullScreen(e.args),t.preventDefault();break;case"escape":this.hideFullScreen(e.args),t.preventDefault()}},e.prototype.addEventListener=function(){this.parent.on(Q,this.onKeyDown,this),this.parent.on(z,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.off(Q,this.onKeyDown),this.parent.off(z,this.destroy)},e.prototype.destroy=function(){this.parent.element.classList.contains("e-rte-full-screen")&&this.toggleParentOverflow(!1);for(var e=document.querySelectorAll(".e-rte-overflow"),n=0;n<e.length;n++)t.removeClass([e[n]],["e-rte-overflow"]);this.removeEventListener()},e}(),Cn=function(){function t(e,t){this.parent=e,this.locator=t,this.renderer=this.locator.getService("rendererFactory"),this.addEventListener()}return t.prototype.render=function(){this.parent;this.contentRenderer=this.renderer.getRenderer(e.RenderType.Content),this.contentRenderer.renderPanel()},t.prototype.refresh=function(e){void 0===e&&(e={requestType:"refresh"}),this.parent.notify(e.requestType+"-begin",e)},t.prototype.destroy=function(){this.removeEventListener()},t.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(_,this.refresh,this),this.parent.on(q,this.keyUp,this))},t.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(_,this.refresh),this.parent.off(q,this.keyUp))},t.prototype.keyUp=function(e){if("HTML"===this.parent.editorMode)switch(e.args.which){case 46:case 8:var t=this.parent.contentModule.getEditPanel().childNodes;if(0===t.length||1===t.length&&0===t[0].childNodes.length&&("BR"===t[0].tagName||"P"===t[0].tagName&&""===t[0].textContent)){var n=this.parent.contentModule.getEditPanel();n.innerHTML="<p><br/></p>",this.parent.formatter.editorManager.nodeSelection.setCursorPoint(this.parent.contentModule.getDocument(),n.childNodes[0],0)}}},t}(),Sn=function(){function n(e,t){this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.addEventListener(),this.serviceLocator=t,this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject")}return n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("insertLink",this.linkDialog,this),this.parent.on(Q,this.onKeyDown,this),this.parent.on("insertCompleted",this.showLinkQuickToolbar,this),this.parent.on("clearDialogObj",this.clearDialogObj,this),this.parent.on("link-toolbar-action",this.onToolbarAction,this),this.parent.on("iframe-click",this.onIframeMouseDown,this),this.parent.on("unLink",this.removeLink,this),this.parent.on("editLink",this.editLink,this),this.parent.on("openLink",this.openLink,this),this.parent.on("editAreaClick",this.editAreaClickHandler,this),this.parent.on(z,this.destroy,this))},n.prototype.onToolbarAction=function(e){switch(e.args.item.subCommand){case"OpenLink":this.parent.notify("openLink",e);break;case"EditLink":this.parent.notify("editLink",e);break;case"RemoveLink":this.parent.notify("unLink",e)}},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("insertLink",this.linkDialog),this.parent.off(Q,this.onKeyDown),this.parent.off("insertCompleted",this.showLinkQuickToolbar),this.parent.off("clearDialogObj",this.clearDialogObj),this.parent.off("link-toolbar-action",this.onToolbarAction),this.parent.off("unLink",this.removeLink),this.parent.off("iframe-click",this.onIframeMouseDown),this.parent.off("editLink",this.editLink),this.parent.off("openLink",this.openLink),this.parent.off("editAreaClick",this.editAreaClickHandler),this.parent.off(z,this.destroy))},n.prototype.onIframeMouseDown=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},n.prototype.showLinkQuickToolbar=function(e){if("enter"!==e.args.action&&"space"!==e.args.action){var n=void 0,i=void 0;if("Links"!==e.type||t.isNullOrUndefined(this.parent.quickToolbarModule)||t.isNullOrUndefined(this.parent.quickToolbarModule.linkQTBar))return;this.quickToolObj=this.parent.quickToolbarModule;var o,r=this.parent.element.getBoundingClientRect().top,s=this.parent.element.getBoundingClientRect().left,a=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());if([].forEach.call(e.elements,function(e,t){0===t&&(o="#text"===e.nodeName?e.parentNode:e)}),e.isNotify){var l=this.parent.toolbarModule.getToolbarElement(),d=o.getBoundingClientRect().top,c=o.getBoundingClientRect().left,p=d-r,h=l?l.offsetHeight+this.parent.toolbarModule.getExpandTBarPopHeight():0;n=this.parent.iframeSettings.enable?s+c:o.getBoundingClientRect().left,i=window.pageYOffset+(this.parent.iframeSettings.enable?r+h+d:r+p)}else{var u=void 0;u=e.args.touches?e.args.changedTouches[0]:u=e.args,n=this.parent.iframeSettings.enable?window.pageXOffset+s+u.clientX:u.pageX,i=this.parent.iframeSettings.enable?window.pageYOffset+r+u.clientY:u.pageY}this.quickToolObj.linkQTBar&&this.quickToolObj.linkQTBar.showPopup(n,i,a.endContainer)}},n.prototype.hideLinkQuickToolbar=function(){this.quickToolObj&&this.quickToolObj.linkQTBar&&document.body.contains(this.quickToolObj.linkQTBar.element)&&this.quickToolObj.linkQTBar.hidePopup()},n.prototype.editAreaClickHandler=function(t){if(this.parent.readonly)return void this.hideLinkQuickToolbar();var n=t.args,i=this.parent.quickToolbarSettings.showOnRightClick;if(!(2===n.which||i&&1===n.which||!i&&3===n.which)&&"HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.linkQTBar){this.quickToolObj=this.parent.quickToolbarModule;var o=n.target;o=this.getAnchorNode(o),this.contentModule=this.rendererFactory.getRenderer(e.RenderType.Content);var r=this.quickToolObj.linkQTBar.element.classList.contains("e-rte-pop");if("A"===o.nodeName&&o.childNodes.length>0&&"IMG"!==o.childNodes[0].nodeName&&"IMG"!==t.args.target.nodeName){if(r)return;this.showLinkQuickToolbar({args:n,isNotify:!1,type:"Links",elements:[n.target]})}else this.hideLinkQuickToolbar()}},n.prototype.onKeyDown=function(e){var n=e.args;switch(n.action){case"escape":t.isNullOrUndefined(this.dialogObj)||this.dialogObj.close();break;case"insert-link":if("HTML"===this.parent.editorMode){var i=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.save(i,this.parent.contentModule.getDocument()),r=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(i),s=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(i),a={args:e.args,selectNode:r,selection:o,selectParent:s};this.linkDialog(a)}else{var l=this.parent.contentModule.getEditPanel();this.parent.formatter.editorManager.markdownSelection.save(l.selectionStart,l.selectionEnd),this.linkDialog({args:{item:{command:"Links",subCommand:"Link"},originalEvent:n},member:"link",text:this.parent.formatter.editorManager.markdownSelection.getSelectedText(this.parent.contentModule.getEditPanel()),module:"Markdown",name:"insertLink"})}n.preventDefault()}},n.prototype.clearDialogObj=function(){this.dialogObj&&(this.dialogObj.destroy(),t.detach(this.dialogObj.element),this.dialogObj=null)},n.prototype.linkDialog=function(e,n){var i=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});if("HTML"===this.parent.editorMode&&e.selectParent.length>0&&!t.isNullOrUndefined(e.selectParent[0].classList)&&e.selectParent[0].classList.contains("e-rte-anchor")&&t.isNullOrUndefined(n))return void this.editLink(e);var o=this.i10n.getConstant("linkWebUrl"),r=this.i10n.getConstant("linkText"),a=this.i10n.getConstant("linkTooltipLabel"),l=this.i10n.getConstant("linkurl"),d=this.i10n.getConstant("textPlaceholder"),c=this.i10n.getConstant("linkTitle"),p=this.parent.createElement("div",{className:"e-rte-link-dialog",id:this.rteID+"_rtelink"});this.parent.element.appendChild(p);var h=this.parent.createElement("div",{className:"e-rte-linkcontent",id:this.rteID+"_linkContent"}),u=T('<div class="e-rte-label"><label>'+o+'</label></div><div class="e-rte-field"><input type="text" data-role ="none" spellcheck="false" placeholder="'+l+'" class="e-input e-rte-linkurl"/></div><div class="e-rte-label"><label>'+r+'</label></div><div class="e-rte-field"> <input type="text" data-role ="none" spellcheck="false" class="e-input e-rte-linkText" placeholder="'+d+'"></div><div class="e-rte-label">'+("HTML"===this.parent.editorMode?"<label>"+a+'</label></div><div class="e-rte-field"><input type="text" data-role ="none" spellcheck="false" placeholder = "'+c+'" class="e-input e-rte-linkTitle"></div><div class="e-rte-label"></div><div class="e-rte-field"><input type="checkbox" class="e-rte-linkTarget" data-role ="none"></div>':""));h.appendChild(u);var m=h.querySelector(".e-rte-linkTarget"),g=h.querySelector(".e-rte-linkurl"),f=h.querySelector(".e-rte-linkText"),b=h.querySelector(".e-rte-linkTitle"),v=this.i10n.getConstant("linkOpenInNewWindow");this.checkBoxObj=new s.CheckBox({label:v,checked:!0,enableRtl:this.parent.enableRtl}),this.checkBoxObj.isStringTemplate=!0,this.checkBoxObj.createElement=this.parent.createElement,this.checkBoxObj.appendTo(m);var y="HTML"===this.parent.editorMode?e.selection.getRange(this.parent.contentModule.getDocument()).toString():e.text,C=this.i10n.getConstant("dialogInsert"),S=this.i10n.getConstant("dialogCancel"),E=e.selection,N={selfLink:this,selection:e.selection,selectParent:e.selectParent,args:e.args},w={header:this.i10n.getConstant("linkHeader"),content:h,cssClass:"e-rte-elements",enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:t.Browser.isDevice?"290px":"310px",height:"inherit",isModal:t.Browser.isDevice,buttons:[{click:this.insertlink.bind(N),buttonModel:{content:C,cssClass:"e-flat e-insertLink",isPrimary:!0}},{click:this.cancelDialog.bind(N),buttonModel:{cssClass:"e-flat",content:S}}],target:t.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){i.parent.isBlur=!1,e&&e.event.returnValue&&("HTML"===i.parent.editorMode?E.restore():i.parent.formatter.editorManager.markdownSelection.restore(i.parent.contentModule.getEditPanel())),i.dialogObj.destroy(),t.detach(i.dialogObj.element);var n=t.isBlazor()?null:i.dialogObj;i.dialogRenderObj.close(n),i.dialogObj=null}};this.dialogObj=this.dialogRenderObj.render(w),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(p),p.style.maxHeight="inherit",t.isNullOrUndefined(this.dialogObj)||(t.isNullOrUndefined(n)||(g.value=n.url,f.value=n.text,b.value=n.title,n.target?this.checkBoxObj.checked=!0:this.checkBoxObj.checked=!1,this.dialogObj.header=n.header,this.dialogObj.element.querySelector(".e-insertLink").textContent=n.btnText),this.checkUrl(!1),("HTML"===this.parent.editorMode&&t.isNullOrUndefined(n)&&(!t.isNullOrUndefined(y)&&""!==y&&0===e.selection.range.startOffset||e.selection.range.startOffset!==e.selection.range.endOffset)||"Markdown"===e.module)&&(f.value=y),t.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this),this.quickToolObj&&(this.hideLinkQuickToolbar(),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup()))},n.prototype.insertlink=function(e){var n,i=this.selfLink.dialogObj.element,o=i.querySelector(".e-rte-linkurl").value,r=i.querySelector(".e-rte-linkText").value;"HTML"===this.selfLink.parent.editorMode&&(n=i.querySelector(".e-rte-linkTitle").value);var s=this.selfLink.checkBoxObj.checked?"_blank":null;if(""===o)return void this.selfLink.checkUrl(!0);this.selfLink.isUrl(o)?this.selfLink.checkUrl(!1):(r=""===r?o:r,o=this.selfLink.parent.enableAutoUrl?o:o.indexOf("http")>-1?o:"http://"+o);var a=this.selfLink;if("HTML"===a.parent.editorMode&&t.isNullOrUndefined(t.closest(this.selection.range.startContainer.parentNode,"[id='"+a.parent.contentModule.getPanel().id+"']"))){a.parent.contentModule.getEditPanel().focus(),t.Browser.isIE&&a.parent.iframeSettings.enable&&this.selection.restore();var l=a.parent.formatter.editorManager.nodeSelection.getRange(a.parent.contentModule.getDocument());this.selection=a.parent.formatter.editorManager.nodeSelection.save(l,a.parent.contentModule.getDocument()),this.selectParent=a.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(l)}var d={url:o,text:r,title:n,target:s,selection:this.selection,selectParent:this.selectParent};document.body.contains(a.dialogObj.element)&&this.selfLink.dialogObj.hide({returnValue:!1}),I()&&a.parent.iframeSettings.enable&&t.select("iframe",a.parent.element).contentWindow.focus(),"HTML"===a.parent.editorMode&&this.selection.restore(),0===a.parent.formatter.getUndoRedoStack().length&&a.parent.formatter.saveData();var c;if("KeyK"===this.args.code){var p=this.args;t.extend(this.args,{item:{command:"Links",subCommand:"CreateLink"},originalEvent:p},!0),c={item:{command:"Links",subCommand:"CreateLink"},originalEvent:p}}else c=this.args;this.selfLink.parent.formatter.process(this.selfLink.parent,c,this.args.originalEvent,d),this.selfLink.parent.contentModule.getEditPanel().focus()},n.prototype.isUrl=function(e){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi.test(e)},n.prototype.checkUrl=function(e){var n=this.dialogObj.element.querySelector(".e-rte-linkurl");e?(t.addClass([n],"e-error"),n.setSelectionRange(0,n.value.length),n.focus()):t.removeClass([n],"e-error")},n.prototype.removeLink=function(e){0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,selectParent:e.selectParent,selection:e.selection,subCommand:e.args.item.subCommand}),I()&&this.parent.iframeSettings.enable?t.select("iframe",this.parent.element).contentWindow.focus():this.parent.contentModule.getEditPanel().focus(),this.hideLinkQuickToolbar()},n.prototype.openLink=function(e){var t=this.getAnchorNode(e.selectParent[0]);(t.classList.contains("e-rte-anchor")||"A"===t.tagName)&&this.parent.formatter.process(this.parent,e.args,e.args,{url:t.href,target:""===t.target?"_self":"_blank",selectNode:e.selectNode,subCommand:e.args.item.subCommand})},n.prototype.getAnchorNode=function(e){var n=t.closest(e,"a");return n||e},n.prototype.editLink=function(e){var t=this.getAnchorNode(e.selectNode[0]),n=this.getAnchorNode(e.selectParent[0]);if((n="A"===t.nodeName?t:n).classList.contains("e-rte-anchor")||"A"===n.tagName){var i=this.i10n.getConstant("dialogUpdate"),o={url:n.getAttribute("href"),text:n.innerText,title:n.title,target:n.target,header:this.i10n.getConstant("editLink"),btnText:i};this.linkDialog(e,o)}},n.prototype.cancelDialog=function(e){this.selfLink.parent.isBlur=!1,this.selfLink.dialogObj.hide({returnValue:!0}),I()?this.selection.restore():this.selfLink.parent.contentModule.getEditPanel().focus()},n.prototype.onDocumentClick=function(e){var n=e.target;!t.isNullOrUndefined(this.dialogObj)&&(!t.closest(n,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||(this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)||this.parent.inlineMode.enable&&!t.closest(n,"#"+this.dialogObj.element.id))&&!t.closest(n,"#"+this.parent.getID()+"_toolbar_CreateLink")&&!n.querySelector("#"+this.parent.getID()+"_toolbar_CreateLink"))&&(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,S(this.parent.element,"focusout"))},n.prototype.destroy=function(){this.removeEventListener()},n.prototype.getModuleName=function(){return"link"},n}(),Tn=function(){function n(e,t){this.isImgUploaded=!1,this.pageX=null,this.pageY=null,this.deletedImg=[],this.parent=e,this.rteID=e.element.id,this.i10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on(Q,this.onKeyDown,this),this.parent.on(q,this.onKeyUp,this),this.parent.on("insertImage",this.insertImage,this),this.parent.on("resize",this.onWindowResize,this),this.parent.on("insertCompleted",this.showImageQuickToolbar,this),this.parent.on("clearDialogObj",this.clearDialogObj,this),this.parent.on("image-toolbar-action",this.onToolbarAction,this),this.parent.on("caption",this.caption,this),this.parent.on("delete",this.deleteImg,this),this.parent.on("insertImgLink",this.insertImgLink,this),this.parent.on("imgAltText",this.insertAltText,this),this.parent.on("editAreaClick",this.editAreaClickHandler,this),this.parent.on("iframe-click",this.onIframeMouseDown,this),this.parent.on("imageSize",this.imageSize,this),this.parent.on("dropDownSelect",this.alignmentSelect,this),this.parent.on(F,this.afterRender,this),this.parent.on("dynamicModule",this.afterRender,this),this.parent.on(G,this.imagePaste,this),this.parent.on(z,this.removeEventListener,this))},n.prototype.removeEventListener=function(){if(!this.parent.isDestroyed){this.parent.off(Q,this.onKeyDown),this.parent.off(q,this.onKeyUp),this.parent.off("resize",this.onWindowResize),this.parent.off("insertImage",this.insertImage),this.parent.off("insertCompleted",this.showImageQuickToolbar),this.parent.off("clearDialogObj",this.clearDialogObj),this.parent.off("caption",this.caption),this.parent.off("image-toolbar-action",this.onToolbarAction),this.parent.off("delete",this.deleteImg),this.parent.off("insertImgLink",this.insertImgLink),this.parent.off("imgAltText",this.insertAltText),this.parent.off("editAreaClick",this.editAreaClickHandler),this.parent.off("iframe-click",this.onIframeMouseDown),this.parent.off("imageSize",this.imageSize),this.parent.off("dropDownSelect",this.alignmentSelect),this.parent.off(F,this.afterRender),this.parent.off("dynamicModule",this.afterRender),this.parent.off(G,this.imagePaste),this.parent.off(z,this.removeEventListener);var e=this.parent.iframeSettings.enable?this.parent.inputElement.ownerDocument:this.parent.inputElement;e.removeEventListener("drop",this.dragDrop.bind(this),!0),e.removeEventListener("dragstart",this.dragStart.bind(this),!0),e.removeEventListener("dragenter",this.dragEnter.bind(this),!0),e.removeEventListener("dragover",this.dragOver.bind(this),!0),t.isNullOrUndefined(this.contentModule)||(t.EventHandler.remove(this.contentModule.getEditPanel(),t.Browser.touchEndEvent,this.imageClick),this.parent.formatter.editorManager.observer.off(X,this.undoStack),this.parent.insertImageSettings.resize&&(t.EventHandler.remove(this.parent.contentModule.getEditPanel(),t.Browser.touchStartEvent,this.resizeStart),t.EventHandler.remove(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick),t.EventHandler.remove(this.contentModule.getEditPanel(),"cut",this.onCutHandler)))}},n.prototype.onIframeMouseDown=function(){this.dialogObj&&this.dialogObj.hide({returnValue:!0})},n.prototype.afterRender=function(){this.contentModule=this.rendererFactory.getRenderer(e.RenderType.Content),t.EventHandler.add(this.contentModule.getEditPanel(),t.Browser.touchEndEvent,this.imageClick,this),this.parent.insertImageSettings.resize&&(t.EventHandler.add(this.parent.contentModule.getEditPanel(),t.Browser.touchStartEvent,this.resizeStart,this),t.EventHandler.add(this.parent.element.ownerDocument,"mousedown",this.onDocumentClick,this),t.EventHandler.add(this.contentModule.getEditPanel(),"cut",this.onCutHandler,this));var n=this.parent.iframeSettings.enable?this.parent.inputElement.ownerDocument:this.parent.inputElement;n.addEventListener("drop",this.dragDrop.bind(this),!0),n.addEventListener("dragstart",this.dragStart.bind(this),!0),n.addEventListener("dragenter",this.dragOver.bind(this),!0),n.addEventListener("dragover",this.dragOver.bind(this),!0)},n.prototype.undoStack=function(e){if("undo"===e.subCommand.toLowerCase()||"redo"===e.subCommand.toLowerCase())for(var n=0;n<this.parent.formatter.getUndoRedoStack().length;n++){var i=this.parent.createElement("div"),o=T(this.parent.formatter.getUndoRedoStack()[n].text);i.appendChild(o);var r=i.querySelectorAll("img");if(i.querySelector(".e-img-resize")&&r.length>0){for(var s=0;s<r.length;s++)r[s].style.outline="";t.detach(i.querySelector(".e-img-resize")),this.parent.formatter.getUndoRedoStack()[n].text=i.innerHTML}}},n.prototype.resizeEnd=function(e){this.resizeBtnInit(),this.imgEle.parentElement.style.cursor="auto",t.Browser.isDevice&&t.removeClass([e.target.parentElement],"e-mob-span");var n=t.isBlazor()?{requestType:"images"}:{event:e,requestType:"images"};this.parent.trigger("resizeStop",n);this.getPointX(e),this.parent.iframeSettings.enable?(window.pageYOffset,this.parent.element.getBoundingClientRect().top,e.clientY):e.pageY;this.parent.formatter.editorManager.observer.on(X,this.undoStack,this),this.parent.formatter.saveData()},n.prototype.resizeStart=function(e,n){var i=this;if(!this.parent.readonly){var o=n||e.target;if(this.prevSelectedImgEle=this.imgEle,"IMG"===o.tagName){this.parent.preventDefaultResize(e);var r=o;this.imgResizeDiv&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&t.detach(this.imgResizeDiv),this.imageResize(r)}if(o.classList.contains("e-rte-imageboxmark")){if(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),this.pageX=this.getPointX(e),this.pageY=this.getPointY(e),e.preventDefault(),e.stopImmediatePropagation(),this.resizeBtnInit(),this.quickToolObj&&this.quickToolObj.imageQTBar.hidePopup(),o.classList.contains("e-rte-topLeft")&&(this.resizeBtnStat.topLeft=!0),o.classList.contains("e-rte-topRight")&&(this.resizeBtnStat.topRight=!0),o.classList.contains("e-rte-botLeft")&&(this.resizeBtnStat.botLeft=!0),o.classList.contains("e-rte-botRight")&&(this.resizeBtnStat.botRight=!0),t.Browser.isDevice&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&!this.imgResizeDiv.classList.contains("e-mob-span"))t.addClass([this.imgResizeDiv],"e-mob-span");else{var s=t.isBlazor()?{requestType:"images"}:{event:e,requestType:"images"};this.parent.trigger("resizeStart",s,function(e){e.cancel&&i.cancelResizeAction()})}t.EventHandler.add(this.contentModule.getDocument(),t.Browser.touchEndEvent,this.resizeEnd,this)}}},n.prototype.imageClick=function(e){t.Browser.isDevice&&("IMG"===e.target.tagName&&"A"===e.target.parentElement.tagName||"IMG"===e.target.tagName?(this.contentModule.getEditPanel().setAttribute("contenteditable","false"),e.target.focus()):this.parent.readonly||this.contentModule.getEditPanel().setAttribute("contenteditable","true")),"IMG"===e.target.tagName&&"A"===e.target.parentElement.tagName&&e.preventDefault()},n.prototype.onCutHandler=function(){this.imgResizeDiv&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&this.cancelResizeAction()},n.prototype.imageResize=function(e){this.resizeBtnInit(),this.imgEle=e,t.addClass([this.imgEle],"e-resize"),this.imgResizeDiv=this.parent.createElement("span",{className:"e-img-resize",id:this.rteID+"_imgResize"}),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-topLeft",styles:"cursor: nwse-resize"})),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-topRight",styles:"cursor: nesw-resize"})),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-botLeft",styles:"cursor: nesw-resize"})),this.imgResizeDiv.appendChild(this.parent.createElement("span",{className:"e-rte-imageboxmark e-rte-botRight",styles:"cursor: nwse-resize"})),t.Browser.isDevice&&t.addClass([this.imgResizeDiv],"e-mob-rte"),e.style.outline="2px solid #4a90e2",this.imgResizePos(e,this.imgResizeDiv),this.resizeImgDupPos(e),this.contentModule.getEditPanel().appendChild(this.imgResizeDiv),t.EventHandler.add(this.contentModule.getDocument(),t.Browser.touchMoveEvent,this.resizing,this)},n.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].pageX:e.pageX},n.prototype.getPointY=function(e){return e.touches&&e.touches.length?e.touches[0].pageY:e.pageY},n.prototype.imgResizePos=function(e,n){var i=this.calcPos(e),o=i.top,r=i.left,s=e.width,a=e.height,l=t.Browser.isDevice?4*parseInt(e.style.outline.slice(-3),10)+2:2*parseInt(e.style.outline.slice(-3),10)+2,d=t.Browser.isDevice?0:2;n.querySelector(".e-rte-botLeft").style.left=r-l+"px",n.querySelector(".e-rte-botLeft").style.top=a-l+o+"px",n.querySelector(".e-rte-botRight").style.left=s-(l-d)+r+"px",n.querySelector(".e-rte-botRight").style.top=a-l+o+"px",n.querySelector(".e-rte-topRight").style.left=s-(l-d)+r+"px",n.querySelector(".e-rte-topRight").style.top=o-l+"px",n.querySelector(".e-rte-topLeft").style.left=r-l+"px",n.querySelector(".e-rte-topLeft").style.top=o-l+"px"},n.prototype.calcPos=function(e){for(var n=["TD","TH","TABLE","A"],i=e.ownerDocument,o=(e.offsetParent&&(e.offsetParent.classList.contains("e-img-caption")||n.indexOf(e.offsetParent.tagName)>-1)?t.closest(e,"#"+this.parent.getID()+"_rte-edit-view"):e.offsetParent)||i.documentElement;o&&(o===i.body||o===i.documentElement)&&"static"===o.style.position;)o=o.parentNode;return o&&o!==e&&1===o.nodeType&&o.getBoundingClientRect(),{top:e.offsetTop,left:e.offsetLeft}},n.prototype.setAspectRatio=function(e,n,i){if(!t.isNullOrUndefined(e.width)){var o=""!==e.style.width?e.style.width.match(/^\d+(\.\d*)?%$/g)?parseFloat(e.style.width):parseInt(e.style.width,10):e.width,r=""!==e.style.height?parseInt(e.style.height,10):e.height;if(o>r)if(this.parent.insertImageSettings.resizeByPercent){if(e.style.minWidth="20px",0!==parseInt(""+e.getBoundingClientRect().width)&&0!==parseInt(""+o)){var s=this.pixToPerc(o/r*i,e.previousElementSibling||e.parentElement);e.style.width=Math.min(Math.round(s/e.getBoundingClientRect().width*n*100)/100,100)+"%"}else e.style.width=this.pixToPerc(o/r*i,e.previousElementSibling||e.parentElement)+"%";e.style.height=null,e.removeAttribute("height")}else""!==e.style.width?(e.style.width=o/r*i+"px",e.style.height=i+"px"):(e.setAttribute("width",(o/r*i).toString()),e.setAttribute("height",i.toString()));else r>o?this.parent.insertImageSettings.resizeByPercent?(0!==parseInt(""+e.getBoundingClientRect().width)&&0!==parseInt(""+o)?e.style.width=Math.min(Math.round(o/e.getBoundingClientRect().width*n*100)/100,100)+"%":e.style.width=this.pixToPerc(n/r*i,e.previousElementSibling||e.parentElement)+"%",e.style.height=null,e.removeAttribute("height")):""!==e.style.width?(e.style.width=n+"px",e.style.height=r/o*n+"px"):(e.setAttribute("width",n.toString()),e.setAttribute("height",(r/o*n).toString())):this.parent.insertImageSettings.resizeByPercent?(e.style.width=this.pixToPerc(n,e.previousElementSibling||e.parentElement)+"%",e.style.height=null,e.removeAttribute("height")):""!==e.style.width?(e.style.width=n+"px",e.style.height=n+"px"):(e.setAttribute("width",n.toString()),e.setAttribute("height",n.toString()))}},n.prototype.pixToPerc=function(e,t){return e/parseFloat(getComputedStyle(t).width)*100},n.prototype.imgDupMouseMove=function(e,n,i){var o=this,r=t.isBlazor()?{requestType:"images"}:{event:i,requestType:"images"};this.parent.trigger("resizing",r,function(i){if(i.cancel)o.cancelResizeAction();else{if(parseInt(o.parent.insertImageSettings.minWidth,10)>=parseInt(e,10)||parseInt(o.parent.getInsertImgMaxWidth(),10)<=parseInt(e,10)&&t.isNullOrUndefined(o.imgEle.style.width))return;if(!o.parent.insertImageSettings.resizeByPercent&&(parseInt(o.parent.insertImageSettings.minHeight,10)>=parseInt(n,10)||parseInt(o.parent.insertImageSettings.maxHeight,10)<=parseInt(n,10)))return;o.imgEle.parentElement.style.cursor="pointer",o.setAspectRatio(o.imgEle,parseInt(e,10),parseInt(n,10)),o.resizeImgDupPos(o.imgEle),o.imgResizePos(o.imgEle,o.imgResizeDiv),o.parent.setContentHeight("",!1)}})},n.prototype.resizing=function(e){this.imgEle.offsetWidth>=this.parent.getInsertImgMaxWidth()&&(this.imgEle.style.maxHeight=this.imgEle.offsetHeight+"px");var t=this.getPointX(e),n=this.getPointY(e),i=this.resizeBtnStat.botLeft||this.resizeBtnStat.topLeft?-(t-this.pageX):t-this.pageX,o=this.resizeBtnStat.topLeft||this.resizeBtnStat.topRight?-(n-this.pageY):n-this.pageY,r=parseInt(this.imgDupPos.width,10)+i,s=parseInt(this.imgDupPos.height,10)+o;this.pageX=t,this.pageY=n,this.resizeBtnStat.botRight?this.imgDupMouseMove(r+"px",s+"px",e):this.resizeBtnStat.botLeft?this.imgDupMouseMove(r+"px",s+"px",e):this.resizeBtnStat.topRight?this.imgDupMouseMove(r+"px",s+"px",e):this.resizeBtnStat.topLeft&&this.imgDupMouseMove(r+"px",s+"px",e)},n.prototype.cancelResizeAction=function(){t.EventHandler.remove(this.contentModule.getDocument(),t.Browser.touchMoveEvent,this.resizing),t.EventHandler.remove(this.contentModule.getDocument(),t.Browser.touchEndEvent,this.resizeEnd),this.imgEle&&this.imgResizeDiv&&this.contentModule.getEditPanel().contains(this.imgResizeDiv)&&(t.detach(this.imgResizeDiv),this.imgEle.style.outline="",this.imgResizeDiv=null,this.pageX=null,this.pageY=null)},n.prototype.resizeImgDupPos=function(e){this.imgDupPos={width:""!==e.style.height?this.imgEle.style.width:e.width+"px",height:""!==e.style.height?this.imgEle.style.height:e.height+"px"}},n.prototype.resizeBtnInit=function(){return this.resizeBtnStat={botLeft:!1,botRight:!1,topRight:!1,topLeft:!1}},n.prototype.onToolbarAction=function(e){switch(I()&&this.parent.notify("selection-restore",{}),e.args.item.subCommand){case"Replace":this.parent.fileManagerSettings.enable?this.parent.notify("renderFileManager",e):this.parent.notify("insertImage",e);break;case"Caption":this.parent.notify("caption",e);break;case"InsertLink":this.parent.notify("insertImgLink",e);break;case"AltText":this.parent.notify("imgAltText",e);break;case"Remove":this.parent.notify("delete",e);break;case"Dimension":this.parent.notify("imageSize",e);break;case"OpenImageLink":this.openImgLink(e);break;case"EditImageLink":this.editImgLink(e);break;case"RemoveImageLink":this.removeImgLink(e)}},n.prototype.openImgLink=function(e){var t=""===e.selectParent[0].parentNode.target?"_self":"_blank";this.parent.formatter.process(this.parent,e.args,e.args,{url:e.selectParent[0].parentNode.href,target:t,selectNode:e.selectNode,subCommand:e.args.item.subCommand})},n.prototype.editImgLink=function(e){var t=e.selectParent[0].parentNode,n=this.i10n.getConstant("dialogUpdate"),i={url:t.href,target:t.target,header:"Edit Link",btnText:n};this.insertImgLink(e,i)},n.prototype.removeImgLink=function(e){t.Browser.isIE&&this.contentModule.getEditPanel().focus(),e.selection.restore();var n=!(!this.contentModule.getEditPanel().contains(this.captionEle)||!t.select("a",this.captionEle)),i=n?[this.captionEle]:[e.selectNode[0].parentElement];this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:e.selectNode[0],selectParent:i,selection:e.selection,subCommand:e.args.item.subCommand}),this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),t.isNullOrUndefined(e.selectParent)||t.removeClass([e.selectParent[0]],"e-img-focus")),n&&t.select(".e-img-inner",this.captionEle).focus()},n.prototype.onKeyDown=function(e){var n,i,o,r,s=e.args;this.deletedImg=[];var a,l=[27,112,113,114,115,116,117,118,119,120,121,122,123,44,45,9,16,17,18,19,20,33,34,35,36,37,38,39,40,91,92,93,144,145,182,183];if("HTML"===this.parent.editorMode&&(a=(n=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument())).startContainer===n.endContainer&&n.startOffset===n.endOffset),!a&&"HTML"===this.parent.editorMode&&l.indexOf(s.which)<0)for(var d=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(n),c=0;c<d.length;c++)"IMG"===d[c].nodeName&&this.deletedImg.push(d[c]);if("HTML"===this.parent.editorMode&&(8===s.which&&"Backspace"===s.code||46===s.which&&"Delete"===s.code)){var p=n.startContainer===n.endContainer&&n.startOffset===n.endOffset;8===s.which&&"Backspace"===s.code&&p?this.checkImageBack(n):46===s.which&&"Delete"===s.code&&p&&this.checkImageDel(n)}if(!t.isNullOrUndefined(this.parent.formatter.editorManager.nodeSelection)&&"KeyK"!==s.code&&(n=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),i=this.parent.formatter.editorManager.nodeSelection.save(n,this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(n),r=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(n),!s.ctrlKey&&s.key&&(1===s.key.length||"enter"===s.action)&&"IMG"===r[0].tagName&&r[0].parentElement)){var h=r[0].parentElement.childNodes[0];this.contentModule.getEditPanel().querySelector(".e-img-resize")&&this.removeResizeEle(),this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),h,h,h.textContent.length,h.textContent.length),t.removeClass([r[0]],"e-img-focus"),this.quickToolObj.imageQTBar.hidePopup()}if(!s.ctrlKey||89!==s.keyCode&&90!==s.keyCode||this.undoStack({subCommand:90===s.keyCode?"undo":"redo"}),8===s.keyCode||46===s.keyCode){if(o&&"IMG"===o[0].nodeName&&o.length<1){s.preventDefault();var u={selectNode:o,selection:i,selectParent:r,args:{item:{command:"Images",subCommand:"Remove"},originalEvent:s}};this.deleteImg(u,s.keyCode)}this.parent.contentModule.getEditPanel().querySelector(".e-img-resize")&&this.removeResizeEle()}switch("Backspace"===s.code&&(s.action="backspace"),s.action){case"escape":t.isNullOrUndefined(this.dialogObj)||this.dialogObj.close();break;case"backspace":case"delete":for(c=0;c<this.deletedImg.length;c++){var m=this.deletedImg[c].src;this.imageRemovePost(m)}break;case"insert-image":"HTML"===this.parent.editorMode?this.insertImage({args:{item:{command:"Images",subCommand:"Image"},originalEvent:s},selectNode:o,selection:i,selectParent:r}):this.insertImage({args:{item:{command:"Images",subCommand:"Image"},originalEvent:s},member:"image",text:this.parent.formatter.editorManager.markdownSelection.getSelectedText(this.parent.contentModule.getEditPanel()),module:"Markdown",name:"insertImage"}),s.preventDefault()}},n.prototype.onKeyUp=function(e){if(!t.isNullOrUndefined(this.deletedImg)&&this.deletedImg.length>0)for(var n=0;n<this.deletedImg.length;n++){var i={element:this.deletedImg[n],src:this.deletedImg[n].getAttribute("src")};this.parent.trigger("afterImageDelete",i)}},n.prototype.checkImageBack=function(e){"#text"!==e.startContainer.nodeName||0!==e.startOffset||t.isNullOrUndefined(e.startContainer.previousSibling)||"IMG"!==e.startContainer.previousSibling.nodeName?"#text"===e.startContainer.nodeName||t.isNullOrUndefined(e.startContainer.childNodes[e.startOffset-1])||"IMG"!==e.startContainer.childNodes[e.startOffset-1].nodeName||this.deletedImg.push(e.startContainer.childNodes[e.startOffset-1]):this.deletedImg.push(e.startContainer.previousSibling)},n.prototype.checkImageDel=function(e){"#text"!==e.startContainer.nodeName||e.startOffset!==e.startContainer.textContent.length||t.isNullOrUndefined(e.startContainer.nextSibling)||"IMG"!==e.startContainer.nextSibling.nodeName?"#text"===e.startContainer.nodeName||t.isNullOrUndefined(e.startContainer.childNodes[e.startOffset])||"IMG"!==e.startContainer.childNodes[e.startOffset].nodeName||this.deletedImg.push(e.startContainer.childNodes[e.startOffset]):this.deletedImg.push(e.startContainer.nextSibling)},n.prototype.alignmentSelect=function(e){var n=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Images"===n.command){var i=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),o=this.parent.formatter.editorManager.nodeSelection.getNodeCollection(i),r={args:e,selectNode:o="IMG"===o[0].nodeName?o:[this.imgEle]};switch(0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),n.subCommand){case"JustifyLeft":this.alignImage(r,"JustifyLeft");break;case"JustifyCenter":this.alignImage(r,"JustifyCenter");break;case"JustifyRight":this.alignImage(r,"JustifyRight");break;case"Inline":this.inline(r);break;case"Break":this.break(r)}this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),t.removeClass([o[0]],"e-img-focus")),this.cancelResizeAction()}},n.prototype.imageWithLinkQTBarItemUpdate=function(){for(var e=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item"),n=0;n<e.length;n++)e[n].getAttribute("title")===this.i10n.getConstant("openLink")||e[n].getAttribute("title")===this.i10n.getConstant("editLink")||e[n].getAttribute("title")===this.i10n.getConstant("removeLink")?(t.addClass([e[n]],"e-link-groups"),e[n].style.display="none"):"Insert Link"===e[n].getAttribute("title")?e[n].style.display="":e[n].classList.contains("e-rte-horizontal-separator")&&(e[n],t.detach(e[n]));var i=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item:not(.e-link-groups)");this.quickToolObj.imageQTBar.addQTBarItem(["-"],Math.round(i.length/2))},n.prototype.showImageQuickToolbar=function(e){var n=this;if("Images"===e.type&&!t.isNullOrUndefined(this.parent.quickToolbarModule)&&!t.isNullOrUndefined(this.parent.quickToolbarModule.imageQTBar)){this.quickToolObj=this.parent.quickToolbarModule;var i=e.args,o=e.elements;[].forEach.call(e.elements,function(e,t){0===t&&(o=e)}),o&&!t.closest(o,"a")&&this.imageWithLinkQTBarItemUpdate(),"IMG"===o.nodeName&&t.addClass([o],["e-img-focus"]);var r=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+i.clientY:i.pageY;this.parent.quickToolbarModule.imageQTBar&&(e.isNotify?setTimeout(function(){n.quickToolObj.imageQTBar.showPopup(i.pageX,r,o)},400):this.quickToolObj.imageQTBar.showPopup(i.pageX,r,o))}},n.prototype.hideImageQuickToolbar=function(){t.isNullOrUndefined(this.contentModule.getEditPanel().querySelector(".e-img-focus"))||(t.removeClass([this.contentModule.getEditPanel().querySelector(".e-img-focus")],"e-img-focus"),this.quickToolObj&&this.quickToolObj.imageQTBar&&document.body.contains(this.quickToolObj.imageQTBar.element)&&this.quickToolObj.imageQTBar.hidePopup())},n.prototype.editAreaClickHandler=function(n){if(this.parent.readonly)return void this.hideImageQuickToolbar();var i=n.args,o=this.parent.quickToolbarSettings.showOnRightClick;if(2===i.which||o&&1===i.which||!o&&3===i.which)return void(o&&1===i.which&&!t.isNullOrUndefined(i.target)&&"IMG"===i.target.tagName&&(this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),i.target)));if("HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.imageQTBar){this.quickToolObj=this.parent.quickToolbarModule;var r=i.target;this.contentModule=this.rendererFactory.getRenderer(e.RenderType.Content);var s=this.quickToolObj.imageQTBar.element.classList.contains("e-rte-pop");if("IMG"===r.nodeName&&this.parent.quickToolbarModule){if(s)return;this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.setSelectionContents(this.contentModule.getDocument(),r),I()&&this.parent.notify(V,n),t.addClass([r],"e-img-focus");var a=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item");if(t.closest(r,"a")){for(var l=0;l<a.length;l++)a[l].getAttribute("title")===this.i10n.getConstant("openLink")||a[l].getAttribute("title")===this.i10n.getConstant("editLink")||a[l].getAttribute("title")===this.i10n.getConstant("removeLink")?(a[l].style.display="",t.removeClass([a[l]],"e-link-groups")):"Insert Link"===a[l].getAttribute("title")?a[l].style.display="none":a[l].classList.contains("e-rte-horizontal-separator")&&(a[l],t.detach(a[l]));var d=this.quickToolObj.imageQTBar.toolbarElement.querySelectorAll(".e-toolbar-item:not(.e-link-groups)");this.quickToolObj.imageQTBar.addQTBarItem(["-"],Math.round(d.length/2))}else t.closest(r,"a")||this.imageWithLinkQTBarItemUpdate();this.showImageQuickToolbar({args:i,type:"Images",elements:[i.target]})}else this.hideImageQuickToolbar()}},n.prototype.insertImgLink=function(e,n){var i=this;if("IMG"===e.selectNode[0].nodeName&&(this.imagDialog(e),!t.isNullOrUndefined(this.dialogObj))){var o=this.parent.createElement("div",{className:"e-img-linkwrap"}),r=T('<div class="e-rte-field"><input type="text" data-role ="none" class="e-input e-img-link" spellcheck="false" placeholder="'+this.i10n.getConstant("linkurl")+'"/></div><div class="e-rte-label"></div><div class="e-rte-field"><input type="checkbox" class="e-rte-linkTarget" data-role ="none"></div>');o.appendChild(r);var a=o.querySelector(".e-rte-linkTarget"),l=o.querySelector(".e-img-link"),d=this.i10n.getConstant("linkOpenInNewWindow");this.checkBoxObj=new s.CheckBox({label:d,checked:!0,enableRtl:this.parent.enableRtl,change:function(e){c=e.checked?"_blank":null}}),this.checkBoxObj.isStringTemplate=!0,this.checkBoxObj.createElement=this.parent.createElement,this.checkBoxObj.appendTo(a);var c=this.checkBoxObj.checked?"_blank":null,p=this.i10n.getConstant("dialogUpdate"),h={args:e.args,selfImage:this,selection:e.selection,selectNode:e.selectNode,selectParent:e.selectParent,link:l,target:c};this.dialogObj.setProperties({height:"inherit",width:"290px",header:this.parent.localeObj.getConstant("imageInsertLinkHeader"),content:o,position:{X:"center",Y:"center"},buttons:[{click:function(e){i.insertlink(h)},buttonModel:{content:p,cssClass:"e-flat e-update-link",isPrimary:!0}}]}),t.isNullOrUndefined(n)||(l.value=n.url,n.target?this.checkBoxObj.checked=!0:this.checkBoxObj.checked=!1,this.dialogObj.header=n.header),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}},n.prototype.insertAltText=function(e){var n=this;if("IMG"===e.selectNode[0].nodeName){this.imagDialog(e);var i=this.i10n.getConstant("altText");if(!t.isNullOrUndefined(this.dialogObj)){var o=this.parent.createElement("div",{className:"e-img-altwrap"}),r=this.i10n.getConstant("alternateHeader"),s=this.i10n.getConstant("dialogUpdate"),a=T('<div class="e-rte-field"><input type="text" spellcheck="false" value="'+(null===e.selectNode[0].getAttribute("alt")?"":e.selectNode[0].getAttribute("alt"))+'" class="e-input e-img-alt" placeholder="'+i+'"/></div>');o.appendChild(a);var l=o.querySelector(".e-img-alt"),d={args:e.args,selfImage:this,selection:e.selection,selectNode:e.selectNode,alt:l};this.dialogObj.setProperties({height:"inherit",width:"290px",header:r,content:o,position:{X:"center",Y:"center"},buttons:[{click:function(e){n.insertAlt(d)},buttonModel:{content:s,cssClass:"e-flat e-update-alt",isPrimary:!0}}]}),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}}},n.prototype.insertAlt=function(e){if(!t.isNullOrUndefined(e.alt)){e.selection.restore(),0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData();var n=e.alt.value;this.parent.formatter.process(this.parent,e.args,e.args,{altText:n,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.dialogObj.hide({returnValue:!1})}},n.prototype.insertlink=function(e){if("IMG"===e.selectNode[0].nodeName){var n=e.link.value;if(""===n)return t.addClass([e.link],"e-error"),e.link.setSelectionRange(0,n.length),void e.link.focus();this.isUrl(n)?t.removeClass([e.link],"e-error"):n="http://"+n;var i=e.selfImage;if("HTML"===i.parent.editorMode&&e.selection.restore(),0===i.parent.formatter.getUndoRedoStack().length&&i.parent.formatter.saveData(),"A"===e.selectNode[0].parentElement.nodeName)return i.parent.formatter.process(i.parent,e.args,e.args,{url:n,target:i.checkBoxObj.checked?"_blank":null,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),void i.dialogObj.hide({returnValue:!0});i.parent.formatter.process(i.parent,e.args,e.args,{url:n,target:i.checkBoxObj.checked?"_blank":null,selectNode:e.selectNode,subCommand:e.args.item.subCommand,selection:e.selection});var o=t.closest(e.selectNode[0],".e-img-caption");o&&t.select(".e-img-inner",o).focus(),o&&t.select(".e-img-inner",o).focus(),i.dialogObj.hide({returnValue:!1})}},n.prototype.isUrl=function(e){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi.test(e)},n.prototype.deleteImg=function(e,n){if("IMG"===e.selectNode[0].nodeName){var i={element:e.selectNode[0],src:e.selectNode[0].getAttribute("src")};0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),e.selection.restore(),this.contentModule.getEditPanel().querySelector(".e-img-resize")&&this.removeResizeEle(),this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,captionClass:"e-img-caption",subCommand:e.args.item.subCommand}),this.imageRemovePost(i.src),this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&this.quickToolObj.imageQTBar.hidePopup(),this.cancelResizeAction(),t.isNullOrUndefined(n)&&this.parent.trigger("afterImageDelete",i)}},n.prototype.imageRemovePost=function(e){var n=this.parent.insertImageSettings.removeUrl;if(!t.isNullOrUndefined(n)&&""!==n){var i=new t.Ajax(n,"POST",!0,null),o=new FormData;o.append(name,e),i.send(o)}},n.prototype.caption=function(e){var n=e.selectNode[0];if("IMG"===n.nodeName){e.selection.restore(),0===this.parent.formatter.getUndoRedoStack().length&&this.parent.formatter.saveData(),this.cancelResizeAction(),t.addClass([n],"e-rte-image");var i=e.args.item?e.args.item.subCommand:"Caption";if(t.isNullOrUndefined(t.closest(n,".e-img-caption"))){this.captionEle=this.parent.createElement("span",{className:"e-img-caption e-rte-img-caption",attrs:{contenteditable:"false",draggable:"false",style:"width:"+this.parent.insertImageSettings.width}});var o=this.parent.createElement("span",{className:"e-img-wrap"}),r=this.parent.createElement("span",{className:"e-img-inner",attrs:{contenteditable:"true"}}),s=e.selectNode[0].parentElement;"A"===s.tagName&&s.setAttribute("contenteditable","true"),o.appendChild("A"===s.tagName?s:e.selectNode[0]),o.appendChild(r);var a=this.i10n.getConstant("imageCaption");r.innerHTML=a,this.captionEle.appendChild(o),n.classList.contains(ie)&&t.addClass([this.captionEle],"e-caption-inline"),n.classList.contains(ne)&&t.addClass([this.captionEle],ne),n.classList.contains("e-imgleft")&&t.addClass([this.captionEle],"e-imgleft"),n.classList.contains("e-imgright")&&t.addClass([this.captionEle],"e-imgright"),n.classList.contains("e-imgcenter")&&t.addClass([this.captionEle],"e-imgcenter"),this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:this.captionEle,selectNode:e.selectNode,subCommand:i}),this.parent.formatter.editorManager.nodeSelection.setSelectionText(this.contentModule.getDocument(),r.childNodes[0],r.childNodes[0],0,r.childNodes[0].textContent.length)}else t.detach(t.closest(n,".e-img-caption")),t.Browser.isIE&&(this.contentModule.getEditPanel().focus(),e.selection.restore()),"A"===n.parentElement.tagName?this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:n.parentElement,selectNode:e.selectNode,subCommand:i}):this.parent.formatter.process(this.parent,e.args,e.args,{insertElement:n,selectNode:e.selectNode,subCommand:i});this.quickToolObj&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),t.removeClass([n],"e-img-focus"))}},n.prototype.imageSize=function(e){var n=this;if("IMG"===e.selectNode[0].nodeName&&(this.imagDialog(e),!t.isNullOrUndefined(this.dialogObj))){var i=this.i10n.getConstant("imageSizeHeader"),o=this.i10n.getConstant("dialogUpdate"),r=this.imgsizeInput(e),s={args:e.args,selfImage:this,selection:e.selection,selectNode:e.selectNode};this.dialogObj.setProperties({height:"inherit",width:"290px",header:i,content:r,position:{X:"center",Y:"center"},buttons:[{click:function(e){n.insertSize(s)},buttonModel:{content:o,cssClass:"e-flat e-update-size",isPrimary:!0}}]}),this.dialogObj.element.style.maxHeight="inherit",this.dialogObj.content.querySelector("input").focus()}},n.prototype.break=function(e){if("IMG"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Break";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},n.prototype.inline=function(e){if("IMG"===e.selectNode[0].nodeName){var t=e.args.item?e.args.item.subCommand:"Inline";this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:t})}},n.prototype.alignImage=function(e,t){var n=e.args.item?e.args.item.subCommand:t;this.parent.formatter.process(this.parent,e.args,e.args,{selectNode:e.selectNode,subCommand:n})},n.prototype.clearDialogObj=function(){this.dialogObj&&(this.dialogObj.destroy(),t.detach(this.dialogObj.element),this.dialogObj=null)},n.prototype.imagDialog=function(e){var n=this;if(this.dialogObj)return void this.dialogObj.hide({returnValue:!0});var i=this.parent.createElement("div",{className:"e-rte-img-dialog",id:this.rteID+"_image"});this.parent.element.appendChild(i);var o=this.i10n.getConstant("dialogInsert"),r=this.i10n.getConstant("dialogCancel"),s=this.i10n.getConstant("imageHeader"),a=e.selection,l={selfImage:this,selection:e.selection,args:e.args,selectParent:e.selectParent},d={header:s,cssClass:"e-rte-elements",enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:t.Browser.isDevice?"290px":"340px",height:"inherit",position:{X:"center",Y:t.Browser.isDevice?"center":"top"},isModal:t.Browser.isDevice,buttons:[{click:this.insertImageUrl.bind(l),buttonModel:{content:o,cssClass:"e-flat e-insertImage",isPrimary:!0}},{click:function(e){n.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel",content:r}}],target:t.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){n.isImgUploaded&&n.uploadObj.removing(),n.parent.isBlur=!1,e&&e.event.returnValue&&("HTML"===n.parent.editorMode?a.restore():n.parent.formatter.editorManager.markdownSelection.restore(n.parent.contentModule.getEditPanel())),n.dialogObj.destroy(),t.detach(n.dialogObj.element),n.dialogRenderObj.close(e),n.dialogObj=null}},c=this.parent.createElement("div",{className:"e-img-content"});(!t.isNullOrUndefined(this.parent.insertImageSettings.path)&&"Markdown"===this.parent.editorMode||"HTML"===this.parent.editorMode)&&c.appendChild(this.imgUpload(e));var p=this.parent.createElement("div",{className:"e-linkheader"}),h=this.i10n.getConstant("imageLinkHeader");"HTML"===this.parent.editorMode?p.innerHTML=h:p.innerHTML=this.i10n.getConstant("mdimageLink"),c.appendChild(p),c.appendChild(this.imageUrlPopup(e)),e.selectNode&&"IMG"===e.selectNode[0].nodeName?(d.header=this.parent.localeObj.getConstant("editImageHeader"),d.content=c):d.content=c,this.dialogObj=this.dialogRenderObj.render(d),this.dialogObj.createElement=this.parent.createElement,this.dialogObj.appendTo(i),t.isNullOrUndefined(this.dialogObj)||(e.selectNode&&"IMG"===e.selectNode[0].nodeName&&"insertImage"===e.name&&(this.dialogObj.element.querySelector(".e-insertImage").textContent=this.parent.localeObj.getConstant("dialogUpdate")),i.style.maxHeight="inherit",this.quickToolObj&&(this.quickToolObj.imageQTBar&&document.body.contains(this.quickToolObj.imageQTBar.element)&&(this.quickToolObj.imageQTBar.hidePopup(),t.isNullOrUndefined(e.selectParent)||t.removeClass([e.selectParent[0]],"e-img-focus")),this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup()))},n.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.dialogObj.hide({returnValue:!0}),this.isImgUploaded&&this.uploadObj.removing()},n.prototype.onDocumentClick=function(e){var n=e.target;"IMG"===n.nodeName&&(this.imgEle=n),!t.isNullOrUndefined(this.dialogObj)&&(!t.closest(n,"[id='"+this.dialogObj.element.id+"']")&&this.parent.toolbarSettings.enable&&this.parent.getToolbarElement()&&!this.parent.getToolbarElement().contains(e.target)||this.parent.getToolbarElement()&&this.parent.getToolbarElement().contains(e.target)&&!t.closest(n,"#"+this.parent.getID()+"_toolbar_Image")&&!n.querySelector("#"+this.parent.getID()+"_toolbar_Image"))&&(this.dialogObj.hide({returnValue:!0}),this.parent.isBlur=!0,S(this.parent.element,"focusout")),"IMG"===e.target.tagName||!this.imgResizeDiv||this.quickToolObj&&this.quickToolObj.imageQTBar&&this.quickToolObj.imageQTBar.element.contains(e.target)||!this.contentModule.getEditPanel().contains(this.imgResizeDiv)||this.cancelResizeAction(),this.contentModule.getEditPanel().querySelector(".e-img-resize")&&("IMG"!==n.tagName&&this.removeResizeEle(),"IMG"===n.tagName||t.isNullOrUndefined(this.imgEle)?t.isNullOrUndefined(this.prevSelectedImgEle)||this.prevSelectedImgEle===n||(this.prevSelectedImgEle.style.outline=""):this.imgEle.style.outline="")},n.prototype.removeResizeEle=function(){t.EventHandler.remove(this.contentModule.getDocument(),t.Browser.touchMoveEvent,this.resizing),t.EventHandler.remove(this.contentModule.getDocument(),t.Browser.touchEndEvent,this.resizeEnd),t.detach(this.contentModule.getEditPanel().querySelector(".e-img-resize"))},n.prototype.onWindowResize=function(){t.isNullOrUndefined(this.contentModule)||t.isNullOrUndefined(this.contentModule.getEditPanel().querySelector(".e-img-resize"))||this.cancelResizeAction()},n.prototype.imageUrlPopup=function(e){var t=this.parent.createElement("div",{className:"imgUrl"}),n=this.i10n.getConstant("imageUrl");return this.inputUrl=this.parent.createElement("input",{className:"e-input e-img-url",attrs:{placeholder:n,spellcheck:"false"}}),t.appendChild(this.inputUrl),t},n.prototype.insertImageUrl=function(e){var n=this.selfImage;n.isImgUploaded=!1;var i=n.inputUrl.value;if(0===n.parent.formatter.getUndoRedoStack().length&&n.parent.formatter.saveData(),t.isNullOrUndefined(n.uploadUrl)||""===n.uploadUrl.url){if(""!==i){if("HTML"===n.parent.editorMode&&t.isNullOrUndefined(t.closest(this.selection.range.startContainer.parentNode,"[id='"+n.contentModule.getPanel().id+"']"))){n.contentModule.getEditPanel().focus();var o=n.parent.formatter.editorManager.nodeSelection.getRange(n.contentModule.getDocument());this.selection=n.parent.formatter.editorManager.nodeSelection.save(o,n.contentModule.getDocument()),this.selectParent=n.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(o)}var r=/[\w-]+.(jpg|png|jpeg|gif)/g,s=t.isNullOrUndefined(i.match(r))||"HTML"!==n.parent.editorMode?"":i.match(r)[0],a={cssClass:"inline"===n.parent.insertImageSettings.display?ie:ne,url:i,selection:this.selection,altText:s,selectParent:this.selectParent,width:{width:n.parent.insertImageSettings.width,minWidth:n.parent.insertImageSettings.minWidth,maxWidth:n.parent.getInsertImgMaxWidth()},height:{height:n.parent.insertImageSettings.height,minHeight:n.parent.insertImageSettings.minHeight,maxHeight:n.parent.insertImageSettings.maxHeight}};n.parent.formatter.process(n.parent,this.args,this.args.originalEvent,a),n.dialogObj.hide({returnValue:!1})}}else n.uploadUrl.cssClass="inline"===n.parent.insertImageSettings.display?ie:ne,n.dialogObj.hide({returnValue:!1}),n.parent.formatter.process(n.parent,this.args,this.args.originalEvent,n.uploadUrl),n.uploadUrl.url="",n.contentModule.getEditPanel().querySelector(".e-img-resize")&&(n.imgEle.style.outline="",n.removeResizeEle())},n.prototype.imgsizeInput=function(e){var n=e.selectNode[0],i=this.i10n.getConstant("imageHeight"),o=this.i10n.getConstant("imageWidth"),s=this.parent.createElement("div",{className:"e-img-sizewrap"}),a=T('<div class="e-rte-label"><label>'+o+'</label></div><div class="e-rte-field"><input type="text" data-role ="none" id="imgwidth" class="e-img-width" value='+("auto"===n.getAttribute("width")||t.isNullOrUndefined(n.getAttribute("width"))?n.width:n.getClientRects()[0].width)+' /></div><div class="e-rte-label"><label>'+i+'</label></div><div class="e-rte-field"> <input type="text" data-role ="none" id="imgheight" class="e-img-height" value='+("auto"===n.getAttribute("height")||t.isNullOrUndefined(n.getAttribute("height"))?n.height:n.getClientRects()[0].height)+" /></div>");s.appendChild(a);var l=new r.NumericTextBox({format:"###.### px",min:this.parent.insertImageSettings.minWidth,max:this.parent.getInsertImgMaxWidth(),enableRtl:this.parent.enableRtl,locale:this.parent.locale});l.isStringTemplate=!0,l.createElement=this.parent.createElement,l.appendTo(s.querySelector("#imgwidth"));var d=new r.NumericTextBox({format:"###.### px",min:this.parent.insertImageSettings.minHeight,max:this.parent.insertImageSettings.maxHeight,enableRtl:this.parent.enableRtl,locale:this.parent.locale});return d.isStringTemplate=!0,d.createElement=this.parent.createElement,d.appendTo(s.querySelector("#imgheight")),s},n.prototype.insertSize=function(e){e.selection.restore();var t=e.selfImage;0===t.parent.formatter.getUndoRedoStack().length&&t.parent.formatter.saveData();var n=t.dialogObj.element,i=parseFloat(n.querySelector(".e-img-width").value),o=parseFloat(n.parentElement.querySelector(".e-img-height").value);t.parent.formatter.process(this.parent,e.args,e.args,{width:i,height:o,selectNode:e.selectNode,subCommand:e.args.item.subCommand}),this.imgResizeDiv&&t.imgResizePos(e.selectNode[0],this.imgResizeDiv),t.dialogObj.hide({returnValue:!0})},n.prototype.insertImage=function(e){if(this.imagDialog(e),!t.isNullOrUndefined(this.dialogObj)){this.dialogObj.element.style.maxHeight="inherit";var n=this.dialogObj.element.querySelector(".e-img-content");!t.isNullOrUndefined(this.parent.insertImageSettings.path)&&"Markdown"===this.parent.editorMode||"HTML"===this.parent.editorMode?document.getElementById(this.rteID+"_insertImage").focus():n.querySelector(".e-img-url").focus()}},n.prototype.imgUpload=function(e){var n,i,o=this,a=this,l=a.parent.iframeSettings.enable;if("HTML"===a.parent.editorMode&&(!l&&t.isNullOrUndefined(t.closest(e.selection.range.startContainer.parentNode,"[id='"+this.parent.contentModule.getPanel().id+"']"))||l&&!p(e.selection.range.startContainer.parentNode.ownerDocument.querySelector("body"),"e-lib"))){this.contentModule.getEditPanel().focus();var d=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());n=this.parent.formatter.editorManager.nodeSelection.save(d,this.parent.contentModule.getDocument()),i=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(d)}else n=e.selection,i=e.selectParent;var c=this.parent.createElement("div",{className:"e-img-uploadwrap e-droparea"}),h=this.i10n.getConstant("imageDeviceUploadMessage"),u=this.i10n.getConstant("imageUploadMessage"),m=this.parent.createElement("span",{className:"e-droptext"}),g=this.parent.createElement("span",{className:"e-rte-upload-text",innerHTML:t.Browser.isDevice?h:u});m.appendChild(g);var f=this.parent.createElement("button",{className:"e-browsebtn",id:this.rteID+"_insertImage",attrs:{autofocus:"true",type:"button"}});m.appendChild(f),c.appendChild(m);var b=this.i10n.getConstant("browse"),v=new s.Button({content:b,enableRtl:this.parent.enableRtl});v.isStringTemplate=!0,v.createElement=this.parent.createElement,v.appendTo(f);var y=t.Browser.isDevice?m:f;t.EventHandler.add(y,"click",this.fileSelect,this);var C=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"}});c.appendChild(C);var S,T,E,N,w;return this.uploadObj=new r.Uploader({asyncSettings:{saveUrl:this.parent.insertImageSettings.saveUrl,removeUrl:this.parent.insertImageSettings.removeUrl},dropArea:m,multiple:!1,enableRtl:this.parent.enableRtl,allowedExtensions:this.parent.insertImageSettings.allowedTypes.toString(),selected:function(e){a.isImgUploaded=!0,E=e,N=e.filesData,o.parent.isServerRendered&&(E=JSON.parse(JSON.stringify(e)),e.cancel=!0,T=e.filesData,E.filesData=T),o.parent.trigger("imageSelected",E,function(e){if(!e.cancel){if(o.checkExtension(e.filesData[0]),S=e.filesData[0].name,"HTML"===o.parent.editorMode&&t.isNullOrUndefined(o.parent.insertImageSettings.path)){var r=new FileReader;r.addEventListener("load",function(e){var t="Base64"===o.parent.insertImageSettings.saveFormat?r.result:URL.createObjectURL(D(r.result));a.uploadUrl={url:t,selection:n,altText:S,selectParent:i,width:{width:a.parent.insertImageSettings.width,minWidth:a.parent.insertImageSettings.minWidth,maxWidth:a.parent.getInsertImgMaxWidth()},height:{height:a.parent.insertImageSettings.height,minHeight:a.parent.insertImageSettings.minHeight,maxHeight:a.parent.insertImageSettings.maxHeight}},a.inputUrl.setAttribute("disabled","true")}),r.readAsDataURL(e.filesData[0].rawFile)}o.parent.isServerRendered&&o.uploadObj._internalRenderSelect(e,T)}})},beforeUpload:function(e){o.parent.isServerRendered?((w=JSON.parse(JSON.stringify(e))).filesData=N,e.cancel=!0,o.parent.trigger("imageUploading",w,function(e){e.cancel||(o.uploadObj.currentRequestHeader=e.currentRequest?e.currentRequest:o.uploadObj.currentRequestHeader,o.uploadObj.customFormDatas=e.customFormData&&e.customFormData.length>0?e.customFormData:o.uploadObj.customFormDatas,o.uploadObj.uploadFiles(T,null))})):o.parent.trigger("beforeImageUpload",e)},uploading:function(e){o.parent.isServerRendered||o.parent.trigger("imageUploading",e)},success:function(e){o.parent.trigger("imageUploadSuccess",e,function(e){if(!t.isNullOrUndefined(o.parent.insertImageSettings.path)){var r=o.parent.insertImageSettings.path+e.file.name;a.uploadUrl={url:r,selection:n,altText:S,selectParent:i,width:{width:a.parent.insertImageSettings.width,minWidth:a.parent.insertImageSettings.minWidth,maxWidth:a.parent.getInsertImgMaxWidth()},height:{height:a.parent.insertImageSettings.height,minHeight:a.parent.insertImageSettings.minHeight,maxHeight:a.parent.insertImageSettings.maxHeight}},a.inputUrl.setAttribute("disabled","true")}})},failure:function(e){o.parent.trigger("imageUploadFailed",e)},removing:function(){o.parent.trigger("imageRemoving",e,function(e){a.isImgUploaded=!1,a.inputUrl.removeAttribute("disabled"),a.uploadUrl&&(a.uploadUrl.url=""),o.dialogObj.getButtons(0).element.removeAttribute("disabled")})}}),this.uploadObj.isStringTemplate=!0,this.uploadObj.createElement=this.parent.createElement,this.uploadObj.appendTo(C),c},n.prototype.checkExtension=function(e){this.uploadObj.allowedExtensions&&(-1===this.uploadObj.allowedExtensions.toLocaleLowerCase().indexOf(("."+e.type).toLocaleLowerCase())?this.dialogObj.getButtons(0).element.setAttribute("disabled","disabled"):this.dialogObj.getButtons(0).element.removeAttribute("disabled"))},n.prototype.fileSelect=function(){return this.dialogObj.element.getElementsByClassName("e-file-select-wrap")[0].querySelector("button").click(),!1},n.prototype.dragStart=function(e){if("IMG"!==e.target.nodeName)return!0;this.parent.trigger("actionBegin",e,function(t){t.cancel?e.preventDefault():(e.dataTransfer.effectAllowed="copyMove",e.target.classList.add("e-rte-drag-image"))})},n.prototype.dragEnter=function(e){e.dataTransfer.dropEffect="copy",e.preventDefault()},n.prototype.dragOver=function(e){if(!("edge"===t.Browser.info.name&&e.dataTransfer.items[0].type.split("/")[0].indexOf("image")>-1||t.Browser.isIE&&"Files"===e.dataTransfer.types[0]))return!0;e.preventDefault()},n.prototype.dragDrop=function(e){var n=this;this.parent.trigger("beforeImageDrop",e,function(e){var i=n.parent.inputElement.ownerDocument.querySelector(".e-rte-drag-image"),o=i&&"IMG"===i.tagName||e.dataTransfer.files.length>0;!e.cancel&&o?n.parent.trigger("actionBegin",e,function(i){if(i.cancel)e.preventDefault();else{if(t.closest(e.target,"#"+n.parent.getID()+"_toolbar")||"false"===n.parent.inputElement.contentEditable)return void e.preventDefault();n.parent.element.querySelector(".e-img-resize")&&t.detach(n.imgResizeDiv),e.preventDefault();var o=void 0;if(n.contentModule.getDocument().caretRangeFromPoint?o=n.contentModule.getDocument().caretRangeFromPoint(e.clientX,e.clientY):e.rangeParent?(o=n.contentModule.getDocument().createRange()).setStart(e.rangeParent,e.rangeOffset):o=n.getDropRange(e.clientX,e.clientY),n.parent.notify("selectRange",{range:o}),n.parent.element.querySelector(".e-droparea"))return;n.insertDragImage(e)}}):o&&e.preventDefault()})},n.prototype.getDropRange=function(e,t){var n=this.contentModule.getDocument().createRange();this.parent.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(),n);var i=this.contentModule.getDocument().elementFromPoint(e,t),o=i.childNodes.length>0?i.childNodes[0]:i,r=0;if("<br>"===this.parent.inputElement.firstChild.innerHTML)n.setStart(o,r),n.setEnd(o,r);else{var s=void 0;do{r++,n.setStart(o,r),n.setEnd(o,r+1),s=n.getBoundingClientRect()}while(s.left<e&&r<o.length-1)}return n},n.prototype.insertDragImage=function(e){var t=this;e.preventDefault();var n=this.parent.element.querySelector("e-popup-open");if(this.parent.notify("drop",{args:e}),n&&n.classList.add("e-hide"),e.dataTransfer.files.length>0){if(e.dataTransfer.files.length>1)return;for(var i=e.dataTransfer.files,o=i[0].name,r=o.substring(o.lastIndexOf(".")),s=this.parent.insertImageSettings.allowedTypes,a=0;a<s.length;a++)if(r.toLocaleLowerCase()===s[a].toLowerCase())if(this.parent.insertImageSettings.saveUrl)this.onSelect(e);else{p={args:e,text:"",file:i[0]};e.preventDefault(),this.imagePaste(p)}}else{var l=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),d=this.parent.inputElement.ownerDocument.querySelector(".e-rte-drag-image");if(d&&"IMG"===d.tagName){d.nextElementSibling&&d.nextElementSibling.classList.contains("e-img-inner")?l.insertNode(d.parentElement.parentElement):l.insertNode(d),d.classList.remove("e-rte-drag-image");var c={elements:[d]};d.addEventListener("load",function(){t.parent.trigger("actionComplete",c)}),this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());var p=e;this.resizeStart(p,d),this.hideImageQuickToolbar()}}},n.prototype.onSelect=function(e){var t=this,n=this,i=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),o=this.parent.createElement("ul",{className:"e-upload-files"});this.parent.element.appendChild(o);var r={name:"",size:0,status:"",statusCode:"",type:"",rawFile:e.dataTransfer.files[0],validationMessages:{}},s=this.parent.createElement("IMG");s.style.opacity="0.5",s.classList.add(ae),s.classList.add(ie),s.classList.add("e-resize");var a=r.rawFile,l=new FileReader;l.addEventListener("load",function(){var e=URL.createObjectURL(D(l.result));s.src="Blob"===n.parent.insertImageSettings.saveFormat?e:l.result}),a&&l.readAsDataURL(a),i.insertNode(s),this.uploadMethod(e,s);var d={elements:[s]};s.addEventListener("load",function(){t.parent.trigger("actionComplete",d)})},n.prototype.uploadMethod=function(e,n){var i=this,s=!1,a=this,l=this.parent.createElement("div");this.parent.element.appendChild(l);var d=this.parent.createElement("input",{id:this.rteID+"_upload",attrs:{type:"File",name:"UploadFiles"}}),c=this.parent.iframeSettings.enable?-50:-90;this.popupObj=new o.Popup(l,{relateTo:n,height:"85px",width:"300px",offsetY:c,content:d,viewPortElement:this.parent.element,position:{X:"center",Y:"top"},enableRtl:this.parent.enableRtl,zIndex:10001,close:function(e){i.parent.isBlur=!1,i.popupObj.destroy(),t.detach(i.popupObj.element),i.popupObj=null}}),this.popupObj.element.style.display="none",t.addClass([this.popupObj.element],"e-popup-open"),t.addClass([this.popupObj.element],"e-rte-upload-popup");var p=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),h=e.dataTransfer.files[0].size>1e6?300:100;setTimeout(function(){a.refreshPopup(n)},h);var u,m;this.uploadObj=new r.Uploader({asyncSettings:{saveUrl:this.parent.insertImageSettings.saveUrl,removeUrl:this.parent.insertImageSettings.removeUrl},cssClass:"e-rte-dialog-upload",dropArea:this.parent.element,allowedExtensions:this.parent.insertImageSettings.allowedTypes.toString(),removing:function(){i.parent.inputElement.contentEditable="true",s=!1,t.detach(n),i.popupObj.close()},canceling:function(){i.parent.inputElement.contentEditable="true",s=!1,t.detach(n),i.popupObj.close()},beforeUpload:function(e){i.parent.isServerRendered?((m=JSON.parse(JSON.stringify(e))).filesData=u,s=!0,e.cancel=!0,i.parent.trigger("imageUploading",m,function(e){e.cancel||(i.uploadObj.currentRequestHeader=e.currentRequest?e.currentRequest:i.uploadObj.currentRequestHeader,i.uploadObj.customFormDatas=e.customFormData&&e.customFormData.length>0?e.customFormData:i.uploadObj.customFormDatas,i.uploadObj.uploadFiles(u,null),i.parent.inputElement.contentEditable="false")})):i.parent.trigger("beforeImageUpload",e)},uploading:function(e){i.parent.isServerRendered||(s=!0,i.parent.trigger("imageUploading",e),i.parent.inputElement.contentEditable="false")},selected:function(e){s&&(e.cancel=!0),i.parent.isServerRendered&&(u=e.filesData)},failure:function(t){s=!1,i.parent.inputElement.contentEditable="true";var o={args:e,type:"Images",isNotify:void 0,elements:n};setTimeout(function(){i.uploadFailure(n,o,t)},900)},success:function(t){s=!1,i.parent.inputElement.contentEditable="true";var o={args:e,type:"Images",isNotify:void 0,elements:n};setTimeout(function(){i.uploadSuccess(n,e,o,t)},900)}}),this.uploadObj.appendTo(this.popupObj.element.childNodes[0]),t.detach(this.popupObj.element.querySelector(".e-rte-dialog-upload .e-file-select-wrap")),p.selectNodeContents(n),this.parent.formatter.editorManager.nodeSelection.setRange(this.contentModule.getDocument(),p)},n.prototype.refreshPopup=function(e){(this.parent.iframeSettings.enable?this.parent.element.offsetTop+e.offsetTop:e.offsetTop)>this.parent.element.offsetTop+this.parent.element.offsetHeight?(this.popupObj.relateTo=this.parent.inputElement,this.popupObj.offsetY=this.parent.iframeSettings.enable?-30:-65,this.popupObj.element.style.display="block"):this.popupObj&&(this.popupObj.refreshPosition(e),this.popupObj.element.style.display="block")},n.prototype.uploadFailure=function(e,n,i){t.detach(e),this.popupObj&&this.popupObj.close(),this.parent.trigger("imageUploadFailed",i),this.uploadObj.destroy()},n.prototype.uploadSuccess=function(e,n,i,o){var r=this;e.style.opacity="1",e.classList.add("e-img-focus"),o.element=e,this.parent.trigger("imageUploadSuccess",o,function(n){if(!t.isNullOrUndefined(r.parent.insertImageSettings.path)){var i=r.parent.insertImageSettings.path+n.file.name;e.src=i,e.setAttribute("alt",n.file.name)}}),this.popupObj&&(this.popupObj.close(),this.uploadObj.destroy()),this.showImageQuickToolbar(i),this.resizeStart(n,e)},n.prototype.imagePaste=function(e){var n=this;if(0===e.text.length&&!t.isNullOrUndefined(e.file)){var i=this,o=new FileReader;e.args.preventDefault(),o.addEventListener("load",function(r){var s={cssClass:"inline"===i.parent.insertImageSettings.display?ie:ne,url:"Base64"!==n.parent.insertImageSettings.saveFormat&&t.isNullOrUndefined(e.callBack)?URL.createObjectURL(D(o.result)):o.result,width:{width:i.parent.insertImageSettings.width,minWidth:i.parent.insertImageSettings.minWidth,maxWidth:i.parent.getInsertImgMaxWidth()},height:{height:i.parent.insertImageSettings.height,minHeight:i.parent.insertImageSettings.minHeight,maxHeight:i.parent.insertImageSettings.maxHeight}};if(!t.isNullOrUndefined(e.callBack))return void e.callBack(s);i.parent.formatter.process(i.parent,{item:{command:"Images",subCommand:"Image"}},e.args,s),n.showPopupToolBar(e,s)}),o.readAsDataURL(e.file)}},n.prototype.showPopupToolBar=function(t,n){var i=this,o='img[src="'+n.url+'"]',r=this.parent.inputElement.querySelector(o);this.parent.quickToolbarModule.createQTBar("Image","MultiRow",this.parent.quickToolbarSettings.image,e.RenderType.ImageToolbar);var s={args:t.args,type:"Images",isNotify:void 0,elements:r};r&&setTimeout(function(){i.showImageQuickToolbar(s),i.resizeStart(t.args,r)},0)},n.prototype.destroy=function(){this.prevSelectedImgEle=void 0,this.removeEventListener()},n.prototype.getModuleName=function(){return"image"},n}(),En=function(){function n(e,t){this.parent=e;var n=t;this.rendererFactory=n.getService("rendererFactory"),this.addEventListener()}return n.prototype.addEventListener=function(){this.parent.on("sourceCode",this.sourceCode,this),this.parent.on(F,this.onInitialEnd,this),this.parent.on("updateSource",this.updateSourceCode,this),this.parent.on(z,this.destroy,this)},n.prototype.onInitialEnd=function(){this.parent.formatter.editorManager.observer.on("keydown-handler",this.onKeyDown,this)},n.prototype.removeEventListener=function(){this.unWireEvent(),this.parent.off("sourceCode",this.sourceCode),this.parent.off("updateSource",this.updateSourceCode),this.parent.off(F,this.onInitialEnd),this.parent.off(z,this.destroy),this.parent.formatter.editorManager.observer.off("keydown-handler",this.onKeyDown)},n.prototype.getSourceCode=function(){return this.parent.createElement("textarea",{className:"e-rte-srctextarea"})},n.prototype.wireEvent=function(e){this.keyboardModule=new Je(e,{keyAction:this.previewKeyDown.bind(this),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"}),t.EventHandler.add(this.previewElement,"mousedown",this.mouseDownHandler,this)},n.prototype.unWireEvent=function(){this.keyboardModule&&this.keyboardModule.destroy(),this.previewElement&&t.EventHandler.remove(this.previewElement,"mousedown",this.mouseDownHandler)},n.prototype.wireBaseKeyDown=function(){this.parent.keyboardModule=new Je(this.contentModule.getEditPanel(),{keyAction:this.parent.keyDown.bind(this.parent),keyConfigs:this.parent.formatter.keyConfig,eventName:"keydown"})},n.prototype.unWireBaseKeyDown=function(){this.parent.keyboardModule.destroy()},n.prototype.mouseDownHandler=function(e){this.parent.notify("sourceCodeMouseDown",{args:e})},n.prototype.previewKeyDown=function(e){switch(e.action){case"html-source":this.updateSourceCode(e),e.preventDefault();break;case"toolbar-focus":if(this.parent.toolbarSettings.enable){this.parent.toolbarModule.baseToolbar.toolbarObj.element.querySelector('.e-toolbar-item[aria-disabled="false"][title] [tabindex]').focus()}}},n.prototype.onKeyDown=function(e){switch(e.event.action){case"html-source":e.event.preventDefault(),this.sourceCode(e),e.callBack({requestType:"SourceCode",editorMode:"HTML",event:e.event})}},n.prototype.sourceCode=function(n){this.parent.isBlur=!1,this.parent.trigger("actionBegin",{requestType:"SourceCode",targetItem:"SourceCode",args:n});var i=t.selectAll("."+te,this.parent.element);if(this.contentModule=this.rendererFactory.getRenderer(e.RenderType.Content),this.parent.notify("updateToolbarItem",{targetItem:"SourceCode",updateItem:"Preview",baseToolbar:this.parent.getBaseToolbarObject()}),t.isNullOrUndefined(this.previewElement)&&(this.previewElement=this.getSourceCode()),this.parent.updateValueData(),this.parent.iframeSettings.enable){var o=void 0;(o=t.isNullOrUndefined(this.parent.element.querySelector("#"+this.parent.element.id+"_source-view"))?this.parent.createElement("div",{className:"e-source-content",id:this.parent.element.id+"_source-view"}):this.parent.element.querySelector("#"+this.parent.element.id+"_source-view")).appendChild(this.previewElement),this.parent.element.appendChild(o),o.style.height=this.contentModule.getPanel().style.height,o.style.marginTop=this.contentModule.getPanel().style.marginTop,this.getPanel().value=this.getTextAreaValue(),this.contentModule.getPanel().style.display="none",o.style.display="block"}else this.contentModule.getPanel().appendChild(this.previewElement),this.getPanel().value=this.getTextAreaValue(),this.contentModule.getEditPanel().style.display="none",this.previewElement.style.display="block";this.parent.isBlur=!1,this.parent.disableToolbarItem(this.parent.toolbarSettings.items),this.parent.enableToolbarItem("SourceCode"),this.parent.getToolbar()&&t.removeClass([this.parent.getToolbar()],["e-expand-open"]),t.removeClass(i,[re]),this.parent.setContentHeight("sourceCode",!0),this.wireEvent(this.previewElement),this.unWireBaseKeyDown(),this.previewElement.focus(),this.parent.updateValue(),t.isNullOrUndefined(this.parent.placeholder)||this.parent.iframeSettings.enable||(this.parent.element.querySelector(".rte-placeholder.e-rte-placeholder").style.display="none"),this.parent.trigger("actionComplete",{requestType:"SourceCode",targetItem:"SourceCode",args:n}),this.parent.invokeChangeEvent()},n.prototype.updateSourceCode=function(e){this.parent.isBlur=!1,this.parent.trigger("actionBegin",{requestType:"Preview",targetItem:"Preview",args:e});var n=this.getPanel();this.parent.notify("updateToolbarItem",{targetItem:"Preview",updateItem:"SourceCode",baseToolbar:this.parent.getBaseToolbarObject()});var i=this.parent.serializeValue(n.value),o=null===i||""===i?"<p><br/></p>":i;this.parent.iframeSettings.enable?(n.parentElement.style.display="none",this.contentModule.getPanel().style.display="block",this.contentModule.getEditPanel().innerHTML=o):(n.style.display="none",this.contentModule.getEditPanel().style.display="block",this.contentModule.getEditPanel().innerHTML=o),this.parent.isBlur=!1,this.parent.enableToolbarItem(this.parent.toolbarSettings.items),this.parent.getToolbar()&&t.removeClass([this.parent.getToolbar()],["e-expand-open"]),this.parent.setContentHeight("preview",!0),this.unWireEvent(),this.wireBaseKeyDown(),this.contentModule.getEditPanel().focus(),this.parent.updateValue(),t.isNullOrUndefined(this.parent.placeholder)||0!==this.contentModule.getEditPanel().innerText.length||(this.parent.element.querySelector(".rte-placeholder.e-rte-placeholder").style.display="block"),this.parent.trigger("actionComplete",{requestType:"Preview",targetItem:"Preview",args:e}),this.parent.formatter.enableUndo(this.parent),this.parent.invokeChangeEvent()},n.prototype.getTextAreaValue=function(){return"<p><br></p>"===this.contentModule.getEditPanel().innerHTML||1===this.contentModule.getEditPanel().childNodes.length&&"P"===this.contentModule.getEditPanel().childNodes[0].tagName&&7===this.contentModule.getEditPanel().innerHTML.length?"":this.parent.value},n.prototype.getPanel=function(){return this.parent.element&&this.parent.element.querySelector(".e-rte-srctextarea")},n.prototype.getViewPanel=function(){return this.parent.iframeSettings.enable&&this.getPanel()?this.getPanel().parentElement:this.getPanel()},n.prototype.destroy=function(){this.removeEventListener()},n}(),Nn=function(){function n(e,t){this.ensureInsideTableList=!0,this.pageX=null,this.pageY=null,this.moveEle=null,this.parent=e,this.rteID=e.element.id,this.l10n=t.getService("rteLocale"),this.rendererFactory=t.getService("rendererFactory"),this.dialogRenderObj=t.getService("dialogRenderObject"),this.addEventListener()}return n.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("createTable",this.renderDlgContent,this),this.parent.on(F,this.afterRender,this),this.parent.on("dynamicModule",this.afterRender,this),this.parent.on("docClick",this.docClick,this),this.parent.on("editAreaClick",this.editAreaClickHandler,this),this.parent.on("clearDialogObj",this.clearDialogObj,this),this.parent.on("table-toolbar-action",this.onToolbarAction,this),this.parent.on("dropDownSelect",this.dropdownSelect,this),this.parent.on(Q,this.keyDown,this),this.parent.on("mouseUp",this.selectionTable,this),this.parent.on(z,this.destroy,this))},n.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("createTable",this.renderDlgContent),this.parent.off(F,this.afterRender),this.parent.off("dynamicModule",this.afterRender),this.parent.off("docClick",this.docClick),this.parent.off("editAreaClick",this.editAreaClickHandler),this.parent.off("clearDialogObj",this.clearDialogObj),this.parent.off("table-toolbar-action",this.onToolbarAction),this.parent.off("dropDownSelect",this.dropdownSelect),this.parent.off(W,this.cellSelect),this.parent.off("tableColorPickerChanged",this.setBGColor),this.parent.off(Q,this.keyDown),this.parent.off("mouseUp",this.selectionTable),this.parent.off(z,this.destroy))},n.prototype.selectionTable=function(e){var n=e.args.target;"mozilla"!==t.Browser.info.name||t.isNullOrUndefined(t.closest(n,"table"))||"TABLE"!==t.closest(n,"table").tagName||this.parent.contentModule.getEditPanel().setAttribute("contenteditable","true")},n.prototype.afterRender=function(){this.contentModule=this.rendererFactory.getRenderer(e.RenderType.Content),this.parent.on("tableColorPickerChanged",this.setBGColor,this),this.parent.on(W,this.cellSelect,this),this.parent.tableSettings.resize&&t.EventHandler.add(this.parent.contentModule.getEditPanel(),t.Browser.touchStartEvent,this.resizeStart,this),!t.Browser.isDevice&&this.parent.tableSettings.resize&&t.EventHandler.add(this.contentModule.getEditPanel(),"mouseover",this.resizeHelper,this)},n.prototype.dropdownSelect=function(e){var t=e.item;if(document.body.contains(document.body.querySelector(".e-rte-quick-toolbar"))&&"Table"===t.command){var n=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),i={args:e,selection:this.parent.formatter.editorManager.nodeSelection.save(n,this.contentModule.getDocument()),selectParent:this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(n)};switch(t.subCommand){case"InsertRowBefore":case"InsertRowAfter":this.addRow(i.selection,e);break;case"InsertColumnLeft":case"InsertColumnRight":this.addColumn(i.selection,e);break;case"DeleteColumn":case"DeleteRow":this.removeRowColumn(i.selection,e);break;case"AlignTop":case"AlignMiddle":case"AlignBottom":this.verticalAlign(i,e);break;case"Dashed":case"Alternate":this.tableStyles(i,t.subCommand);break;case"Merge":case"VerticalSplit":case"HorizontalSplit":this.UpdateCells(i.selection,e)}}},n.prototype.UpdateCells=function(e,t){this.parent.formatter.process(this.parent,t,t,{selection:e,subCommand:t.item.subCommand}),this.hideTableQuickToolbar()},n.prototype.keyDown=function(e){var n=e.args,i=this;switch(n.action){case"escape":break;case"insert-table":if("HTML"===this.parent.editorMode){var o=this.parent.contentModule.getDocument(),r=this.parent.formatter.editorManager.nodeSelection.getRange(o),s=this.parent.formatter.editorManager.nodeSelection.save(r,o),a={originalEvent:e.args,item:{command:"Table",subCommand:"CreateTable"}};this.insertTableDialog({self:this,args:a,selection:s})}n.preventDefault()}if(!t.isNullOrUndefined(this.parent.formatter.editorManager.nodeSelection)&&this.contentModule&&"KeyK"!==n.code){var r=this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument()),s=this.parent.formatter.editorManager.nodeSelection.save(r,this.contentModule.getDocument()),l=this.parent.formatter.editorManager.nodeSelection.getParentNodeCollection(r)[0];if(l=l&&"TD"!==l.tagName&&"TH"!==l.tagName?l.parentElement:l,(8===n.keyCode||46===n.keyCode||n.ctrlKey&&88===n.keyCode)&&(l&&"TBODY"===l.tagName?(n.preventDefault(),i.removeTable(s,n,!0)):l&&l.querySelectorAll("table").length>0&&this.removeResizeElement()),l&&"TD"!==l.tagName&&"TH"!==l.tagName){var d=t.closest(l,"td");l=!t.isNullOrUndefined(d)&&this.parent.inputElement.contains(d)?d:l}if(l&&("TD"===l.tagName||"TH"===l.tagName))switch(n.keyCode){case 9:case 37:case 39:i.tabSelection(n,s,l);break;case 40:case 38:i.tableArrowNavigation(n,s,l)}}},n.prototype.onToolbarAction=function(e){switch(e.args.item.subCommand){case"TableHeader":this.tableHeader(e.selection,e.args);break;case"TableRemove":this.removeTable(e.selection,e.args);break;case"TableEditProperties":this.editTable(e)}},n.prototype.verticalAlign=function(e,n){var i=t.closest(e.selectParent[0],"td")||t.closest(e.selectParent[0],"th");i&&this.parent.formatter.process(this.parent,n,n,{tableCell:i,subCommand:n.item.subCommand})},n.prototype.tableStyles=function(e,n){var i=t.closest(e.selectParent[0],"table");"Dashed"===n&&(this.parent.element.classList.contains("e-dashed-border")?this.parent.element.classList.remove("e-dashed-border"):this.parent.element.classList.add("e-dashed-border"),i.classList.contains("e-dashed-border")?i.classList.remove("e-dashed-border"):i.classList.add("e-dashed-border")),"Alternate"===n&&(this.parent.element.classList.contains(se)?this.parent.element.classList.remove(se):this.parent.element.classList.add(se),i.classList.contains(se)?i.classList.remove(se):i.classList.add(se)),this.parent.formatter.saveData(),this.parent.formatter.editorManager.nodeSelection.restore()},n.prototype.insideList=function(e){for(var t=this.parent.formatter.editorManager.domNode.blockNodes(),n=[],i=0;i<t.length;i++)"LI"===t[i].parentNode.tagName?n.push(t[i].parentNode):"LI"===t[i].tagName&&"P"!==t[i].childNodes[0].tagName&&"OL"!==t[i].childNodes[0].tagName&&"UL"!==t[i].childNodes[0].tagName&&n.push(t[i]);return n.length>1||n.length&&0===e.startOffset&&0===e.endOffset?(this.ensureInsideTableList=!0,!0):(this.ensureInsideTableList=!1,!1)},n.prototype.tabSelection=function(e,n,i){var o=this.insideList(n.range);if((37!==e.keyCode&&39!==e.keyCode||3!==n.range.startContainer.nodeType)&&!o)if(e.preventDefault(),i.classList.remove("e-cell-select"),e.shiftKey||37===e.keyCode){var r=t.isNullOrUndefined(i.previousSibling)?t.isNullOrUndefined(t.closest(i,"tr").previousSibling)?t.isNullOrUndefined(t.closest(i,"table").previousSibling)?i:"td"===t.closest(i,"table").previousSibling.nodeName.toLowerCase()?t.closest(i,"table").previousSibling:i:t.closest(i,"tr").previousSibling.childNodes[t.closest(i,"tr").previousSibling.childNodes.length-1]:i.previousSibling;if(i===r&&0===i.cellIndex&&t.closest(i,"table").tHead){var s=t.closest(i,"table");r=s.rows[0].cells[s.rows[0].cells.length-1]}37===e.keyCode&&i===r&&(r=t.closest(i,"table").previousSibling),r&&(""!==r.textContent.trim()&&t.closest(r,"td")?n.setSelectionNode(this.contentModule.getDocument(),r):n.setSelectionText(this.contentModule.getDocument(),r,r,0,0))}else{var a=t.isNullOrUndefined(i.nextSibling)?t.isNullOrUndefined(t.closest(i,"tr").nextSibling)?t.isNullOrUndefined(t.closest(i,"table").nextSibling)?i:"td"===t.closest(i,"table").nextSibling.nodeName.toLowerCase()?t.closest(i,"table").nextSibling:i:t.closest(i,"tr").nextSibling.childNodes[0]:i.nextSibling;i===a&&"TH"===i.nodeName&&(a=t.closest(i,"table").rows[1].cells[0]),39===e.keyCode&&i===a&&(a=t.closest(i,"table").nextSibling),a&&(""!==a.textContent.trim()&&t.closest(a,"td")?n.setSelectionNode(this.contentModule.getDocument(),a):n.setSelectionText(this.contentModule.getDocument(),a,a,0,0)),i===a&&39!==e.keyCode&&a&&(i.classList.add("e-cell-select"),this.addRow(n,e,!0),i.classList.remove("e-cell-select"),""!==(a=a.parentElement.nextSibling.firstChild).textContent.trim()&&t.closest(a,"td")?n.setSelectionNode(this.contentModule.getDocument(),a):n.setSelectionText(this.contentModule.getDocument(),a,a,0,0))}},n.prototype.tableArrowNavigation=function(e,n,i){var o=n.range.startContainer;40===e.keyCode&&3===o.nodeType&&(o.nextSibling&&"BR"===o.nextSibling.nodeName||o.parentNode&&"TD"!==o.parentNode.nodeName)||38===e.keyCode&&3===o.nodeType&&(o.previousSibling&&"BR"===o.previousSibling.nodeName||o.parentNode&&"TD"!==o.parentNode.nodeName)||(e.preventDefault(),i.classList.remove("e-cell-select"),(i=40===e.keyCode?t.isNullOrUndefined(t.closest(i,"tr").nextElementSibling)?t.closest(i,"table").tHead&&"TH"===i.nodeName?t.closest(i,"table").rows[1].cells[i.cellIndex]:t.isNullOrUndefined(t.closest(i,"table").nextSibling)?i:t.closest(i,"table").nextSibling:t.closest(i,"tr").nextElementSibling.children[i.cellIndex]:t.isNullOrUndefined(t.closest(i,"tr").previousElementSibling)?t.closest(i,"table").tHead&&"TH"!==i.nodeName?t.closest(i,"table").tHead.rows[0].cells[i.cellIndex]:t.isNullOrUndefined(t.closest(i,"table").previousSibling)?i:t.closest(i,"table").previousSibling:t.closest(i,"tr").previousElementSibling.children[i.cellIndex])&&n.setSelectionText(this.contentModule.getDocument(),i,i,0,0))},n.prototype.setBGColor=function(e){for(var t=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument()),n=(this.parent.formatter.editorManager.nodeSelection.save(t,this.contentModule.getDocument()),this.curTable.querySelectorAll(".e-cell-select")),i=0;i<n.length;i++)n[i].style.backgroundColor=e.item.value;this.parent.formatter.saveData()},n.prototype.hideTableQuickToolbar=function(){this.quickToolObj&&this.quickToolObj.tableQTBar&&document.body.contains(this.quickToolObj.tableQTBar.element)&&this.quickToolObj.tableQTBar.hidePopup()},n.prototype.tableHeader=function(e,t){this.parent.formatter.process(this.parent,t,t.originalEvent,{selection:e,subCommand:t.item.subCommand})},n.prototype.editAreaClickHandler=function(n){if(!this.parent.readonly&&t.isNullOrUndefined(t.closest(n.args.target,".e-img-caption"))){var i=n.args,o=this.parent.quickToolbarSettings.showOnRightClick;if(!(2===i.which||o&&1===i.which||!o&&3===i.which)&&"HTML"===this.parent.editorMode&&this.parent.quickToolbarModule&&this.parent.quickToolbarModule.tableQTBar){this.quickToolObj=this.parent.quickToolbarModule;var r=i.target;if(this.contentModule=this.rendererFactory.getRenderer(e.RenderType.Content),this.quickToolObj.tableQTBar.element.classList.contains("e-rte-pop"))return;var s=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument()),a=t.closest(r,"table");if(r&&"A"!==r.nodeName&&"IMG"!==r.nodeName&&("TD"===r.nodeName||"TH"===r.nodeName||"TABLE"===r.nodeName||a&&this.parent.contentModule.getEditPanel().contains(a))&&(3!==s.startContainer.nodeType||s.collapsed)){var l=this.parent.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument());this.parent.formatter.editorManager.nodeSelection.save(l,this.contentModule.getDocument()),this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument());var d=this.parent.iframeSettings.enable?window.pageYOffset+this.parent.element.getBoundingClientRect().top+i.clientY:i.pageY;this.quickToolObj.tableQTBar.showPopup(i.pageX,d,r),this.parent.formatter.editorManager.nodeSelection.restore()}else this.hideTableQuickToolbar()}}},n.prototype.tableCellSelect=function(e){var n=e.target,i=Array.prototype.slice.call(n.parentElement.parentElement.children).indexOf(n.parentElement),o=Array.prototype.slice.call(n.parentElement.children).indexOf(n),r=this.dlgDiv.querySelectorAll(".e-rte-tablecell");Array.prototype.forEach.call(r,function(e){var n=Array.prototype.slice.call(e.parentElement.parentElement.children).indexOf(e.parentElement),r=Array.prototype.slice.call(e.parentElement.children).indexOf(e);t.removeClass([e],"e-active"),n<=i&&r<=o&&t.addClass([e],"e-active")}),this.tblHeader.innerHTML=o+1+"x"+(i+1)},n.prototype.tableMouseUp=function(e){t.EventHandler.remove(this.curTable,"mousemove",this.tableMove)},n.prototype.tableCellLeave=function(e){t.removeClass(this.dlgDiv.querySelectorAll(".e-rte-tablecell"),"e-active"),t.addClass([this.dlgDiv.querySelector(".e-rte-tablecell")],"e-active"),this.tblHeader.innerHTML="1x1"},n.prototype.tableCellClick=function(e){var t=e.target,n=Array.prototype.slice.call(t.parentElement.parentElement.children).indexOf(t.parentElement)+1,i=Array.prototype.slice.call(t.parentElement.children).indexOf(t)+1;this.self.tableInsert(n,i,e,this)},n.prototype.tableInsert=function(e,n,i,o){var r=o.self?o.self:this,s=o.selection.range.startContainer;"P"!==s.nodeName||""!==s.textContent.trim()||s.childNodes.length>0||(s.innerHTML="<br />");var a=s.parentNode;if("HTML"===r.parent.editorMode&&(r.parent.iframeSettings.enable&&!p(a.ownerDocument.querySelector("body"),"e-lib")||!r.parent.iframeSettings.enable&&t.isNullOrUndefined(t.closest(a,"[id='"+r.contentModule.getPanel().id+"']")))){r.contentModule.getEditPanel().focus();var l=r.parent.formatter.editorManager.nodeSelection.getRange(r.contentModule.getDocument());o.selection=r.parent.formatter.editorManager.nodeSelection.save(l,r.contentModule.getDocument())}var d={row:e,columns:n,width:{minWidth:r.parent.tableSettings.minWidth,maxWidth:r.parent.tableSettings.maxWidth,width:r.parent.tableSettings.width},selection:o.selection};r.popupObj&&r.popupObj.hide(),r.editdlgObj&&r.editdlgObj.hide(),r.parent.formatter.process(r.parent,o.args,o.args.originalEvent,d),r.contentModule.getEditPanel().focus(),r.parent.on(W,r.cellSelect,r)},n.prototype.cellSelect=function(e){var n=e.args.target,i=t.closest(n,"td,th");n="TD"!==n.nodeName&&i&&this.parent.contentModule.getEditPanel().contains(i)?i:n,t.removeClass(this.contentModule.getEditPanel().querySelectorAll("table td, table th"),"e-cell-select"),!n||"TD"!==n.tagName&&"TH"!==n.tagName||(n.removeAttribute("class"),t.addClass([n],"e-cell-select"),this.activeCell=n,this.curTable=this.curTable?this.curTable:t.closest(n,"table"),t.EventHandler.add(this.curTable,"mousemove",this.tableMove,this),t.EventHandler.add(this.curTable,"mouseup",this.tableMouseUp,this),this.removeResizeElement(),this.helper&&this.contentModule.getEditPanel().contains(this.helper)&&t.detach(this.helper)),"mozilla"!==t.Browser.info.name||t.isNullOrUndefined(t.closest(n,"table"))||"TABLE"!==t.closest(n,"table").tagName||this.parent.contentModule.getEditPanel().setAttribute("contenteditable","false")},n.prototype.tableMove=function(e){this.parent.formatter.editorManager.observer.notify("TABLE_MOVE",{event:e,selectNode:[this.activeCell]})},n.prototype.resizeHelper=function(e){if(!this.parent.readonly){var n=e.target||e.targetTouches[0].target,i=t.closest(n,"table");t.isNullOrUndefined(this.curTable)||t.isNullOrUndefined(i)||i===this.curTable||(this.removeResizeElement(),this.removeHelper(e),this.cancelResizeAction()),"TABLE"!==n.nodeName&&"TD"!==n.nodeName&&"TH"!==n.nodeName||(this.curTable=i&&this.parent.contentModule.getEditPanel().contains(i)&&("TD"===n.nodeName||"TH"===n.nodeName)?i:n,this.removeResizeElement(),this.tableResizeEleCreation(this.curTable,e))}},n.prototype.tableResizeEleCreation=function(e,n){this.parent.preventDefaultResize(n);for(var i=Array.prototype.slice.call(e.rows[0].cells,1),o=[],r=0;r<e.rows.length;r++)o.push(Array.prototype.slice.call(e.rows[r].cells,0,1)[0]);for(var s=parseInt(getComputedStyle(e).height,10),a=parseInt(getComputedStyle(e).width,10),l=this.calcPos(e),r=0;i.length>r;r++){var d=this.parent.createElement("span",{attrs:{"data-col":(r+1).toString(),unselectable:"on",contenteditable:"false"}});d.classList.add("e-rte-table-resize","e-column-resize"),d.style.cssText="height: "+s+"px; width: 4px; top: "+l.top+"px; left:"+(l.left+this.calcPos(i[r]).left)+"px;",this.contentModule.getEditPanel().appendChild(d)}for(r=0;o.length>r;r++){var c=this.parent.createElement("span",{attrs:{"data-row":r.toString(),unselectable:"on",contenteditable:"false"}});c.classList.add("e-rte-table-resize","e-row-resize");var p=t.isNullOrUndefined(e.getAttribute("cellspacing"))&&""===e.getAttribute("cellspacing")?this.calcPos(o[r]).left:0;c.style.cssText="width: "+a+"px; height: 4px; top: "+(this.calcPos(o[r]).top+l.top+o[r].offsetHeight-2)+"px; left:"+(p+l.left)+"px;",this.contentModule.getEditPanel().appendChild(c)}var h=this.parent.createElement("span",{className:"e-table-box",attrs:{"data-col":i.length.toString(),unselectable:"on",contenteditable:"false"}});h.style.cssText="top: "+(l.top+s-4)+"px; left:"+(l.left+a-4)+"px;",t.Browser.isDevice&&h.classList.add("e-rmob"),this.contentModule.getEditPanel().appendChild(h)},n.prototype.removeResizeElement=function(){var e=this.parent.contentModule.getEditPanel().querySelectorAll(".e-column-resize, .e-row-resize, .e-table-box");if(e.length>0)for(var n=0;n<e.length;n++)t.detach(e[n])},n.prototype.calcPos=function(e){for(var n={top:0,left:0},i=e.getBoundingClientRect(),o=e.ownerDocument,r=e.offsetParent||o.documentElement;r&&(r===o.body||r===o.documentElement)&&"static"===r.style.position;)r=r.parentNode;return"TD"===r.nodeName&&"TABLE"===e.nodeName&&(r=t.closest(r,".e-rte-content")),r&&r!==e&&1===r.nodeType&&(n=r.getBoundingClientRect()),{top:i.top-n.top,left:i.left-n.left}},n.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].pageX:e.pageX},n.prototype.getPointY=function(e){return e.touches&&e.touches.length?e.touches[0].pageY:e.pageY},n.prototype.resizeStart=function(e){var n=this;if(!this.parent.readonly){t.Browser.isDevice&&this.resizeHelper(e);var i=e.target;if(i.classList.contains("e-column-resize")||i.classList.contains("e-row-resize")||i.classList.contains("e-table-box")){if(e.preventDefault(),this.parent.preventDefaultResize(e),t.removeClass(this.curTable.querySelectorAll("td,th"),"e-cell-select"),this.parent.formatter.editorManager.nodeSelection.Clear(this.contentModule.getDocument()),this.pageX=this.getPointX(e),this.pageY=this.getPointY(e),this.resizeBtnInit(),this.hideTableQuickToolbar(),i.classList.contains("e-column-resize")&&(this.resizeBtnStat.column=!0,this.columnEle=this.curTable.rows[0].cells[parseInt(i.getAttribute("data-col"),10)],this.colIndex=this.columnEle.cellIndex,this.moveEle=e.target,this.appendHelper()),i.classList.contains("e-row-resize")&&(this.rowEle=this.curTable.rows[parseInt(i.getAttribute("data-row"),10)],this.resizeBtnStat.row=!0,this.appendHelper()),i.classList.contains("e-table-box")&&(this.resizeBtnStat.tableBox=!0),t.Browser.isDevice&&this.helper&&!this.helper.classList.contains("e-reicon"))this.helper.classList.add("e-reicon"),t.EventHandler.add(document,t.Browser.touchStartEvent,this.removeHelper,this),t.EventHandler.add(this.helper,t.Browser.touchStartEvent,this.resizeStart,this);else{var o=t.isBlazor()?{requestType:"Table"}:{event:e,requestType:"Table"};this.parent.trigger("resizeStart",o,function(e){e.cancel&&n.cancelResizeAction()})}t.EventHandler.add(this.contentModule.getDocument(),t.Browser.touchMoveEvent,this.resizing,this),t.EventHandler.add(this.contentModule.getDocument(),t.Browser.touchEndEvent,this.resizeEnd,this)}}},n.prototype.removeHelper=function(e){!e.target.classList.contains("e-reicon")&&this.helper&&(t.EventHandler.remove(document,t.Browser.touchStartEvent,this.removeHelper),t.EventHandler.remove(this.helper,t.Browser.touchStartEvent,this.resizeStart),this.helper&&this.contentModule.getEditPanel().contains(this.helper)&&t.detach(this.helper),this.pageX=null,this.helper=null)},n.prototype.appendHelper=function(){this.helper=this.parent.createElement("div",{className:"e-table-rhelper"}),t.Browser.isDevice&&this.helper.classList.add("e-reicon"),this.contentModule.getEditPanel().appendChild(this.helper),this.setHelperHeight()},n.prototype.setHelperHeight=function(){var e=this.calcPos(this.curTable);this.resizeBtnStat.column?(this.helper.classList.add("e-column-helper"),this.helper.style.cssText="height: "+getComputedStyle(this.curTable).height+"; top: "+e.top+"px; left:"+(e.left+this.calcPos(this.columnEle).left-1)+"px;"):(this.helper.classList.add("e-row-helper"),this.helper.style.cssText="width: "+getComputedStyle(this.curTable).width+"; top: "+(this.calcPos(this.rowEle).top+e.top+this.rowEle.offsetHeight)+"px; left:"+(this.calcPos(this.rowEle).left+e.left)+"px;")},n.prototype.updateHelper=function(){var e=this.calcPos(this.curTable);if(this.resizeBtnStat.column){var t=e.left+this.calcPos(this.columnEle).left-1;this.helper.style.left=t+"px"}else{var n=this.calcPos(this.rowEle).top+e.top+this.rowEle.offsetHeight;this.helper.style.top=n+"px"}},n.prototype.resizing=function(e){var n=this,i=this.getPointX(e),o=this.getPointY(e),r=this.parent.enableRtl?-(i-this.pageX):i-this.pageX,s=this.parent.enableRtl?-(o-this.pageY):o-this.pageY;this.pageX=i,this.pageY=o;var a=t.isBlazor()?{requestType:"table"}:{event:e,requestType:"table"};this.parent.trigger("resizing",a,function(i){if(i.cancel)n.cancelResizeAction();else{var o=n.contentModule.getEditPanel().querySelector(".e-table-box"),a=parseInt(getComputedStyle(n.curTable).width,10),l=parseInt(getComputedStyle(n.curTable).height,10),d=+getComputedStyle(n.contentModule.getEditPanel()).paddingRight.match(/\d/g).join(""),c=n.contentModule.getEditPanel().offsetWidth-2*d;if(n.resizeBtnStat.column){for(var p=n.curTable.rows[0].cells,h=parseFloat(n.columnEle.offsetWidth.toString())-r,u=parseFloat(n.columnEle.offsetWidth.toString())+parseFloat(p[n.colIndex-1].offsetWidth.toString()),m=0;m<n.curTable.rows.length;m++)if(u-h>20&&h>20){var g=u-h,f=h;n.curTable.rows[m].cells[n.colIndex-1].style.width=n.convertPixelToPercentage(g,a)+"%",n.curTable.rows[m].cells[n.colIndex].style.width=n.convertPixelToPercentage(f,a)+"%"}n.updateHelper()}else if(n.resizeBtnStat.row){n.parent.preventDefaultResize(e);var b=parseFloat(n.rowEle.clientHeight.toString())+s;b>20&&(n.rowEle.style.height=b+"px"),n.curTable.style.height="",t.isNullOrUndefined(o)||(o.style.cssText="top: "+(n.calcPos(n.curTable).top+l-4)+"px; left:"+(n.calcPos(n.curTable).left+a-4)+"px;"),n.updateHelper()}else if(n.resizeBtnStat.tableBox){t.Browser.isDevice||t.EventHandler.remove(n.contentModule.getEditPanel(),"mouseover",n.resizeHelper);var v=n.curTable.style.width.indexOf("%")>-1;n.curTable.style.width=v?n.convertPixelToPercentage(a+r,c)+"%":a+r+"px",n.curTable.style.height=l+s+"px",o.classList.add("e-rbox-select"),o.style.cssText="top: "+(n.calcPos(n.curTable).top+l-4)+"px; left:"+(n.calcPos(n.curTable).left+a-4)+"px;"}}})},n.prototype.convertPixelToPercentage=function(e,t){return e/t*100},n.prototype.cancelResizeAction=function(){t.EventHandler.remove(this.contentModule.getDocument(),t.Browser.touchMoveEvent,this.resizing),t.EventHandler.remove(this.contentModule.getDocument(),t.Browser.touchEndEvent,this.resizeEnd),this.removeResizeElement()},n.prototype.resizeEnd=function(e){this.resizeBtnInit(),t.EventHandler.remove(this.contentModule.getDocument(),t.Browser.touchMoveEvent,this.resizing),t.EventHandler.remove(this.contentModule.getDocument(),t.Browser.touchEndEvent,this.resizeEnd),this.contentModule.getEditPanel().querySelector(".e-table-box")&&this.contentModule.getEditPanel().contains(this.contentModule.getEditPanel().querySelector(".e-table-box"))&&(t.Browser.isDevice||t.EventHandler.add(this.contentModule.getEditPanel(),"mouseover",this.resizeHelper,this),this.removeResizeElement(),this.helper&&this.contentModule.getEditPanel().contains(this.helper)&&(t.detach(this.helper),this.helper=null),this.pageX=null,this.pageY=null,this.moveEle=null);var n=t.isBlazor()?{requestType:"table"}:{event:e,requestType:"table"};this.parent.trigger("resizeStop",n),this.parent.formatter.saveData()},n.prototype.resizeBtnInit=function(){return this.resizeBtnStat={column:!1,row:!1,tableBox:!1}},n.prototype.addRow=function(e,t,n){var i;n&&(i={item:{command:"Table",subCommand:"InsertRowAfter"}});var o={selection:e,subCommand:n?i.item.subCommand:t.item.subCommand};this.parent.formatter.process(this.parent,n?i:t,t,o)},n.prototype.addColumn=function(e,t){this.parent.formatter.process(this.parent,t,t,{selection:e,width:this.parent.tableSettings.width,subCommand:t.item.subCommand})},n.prototype.removeRowColumn=function(e,t){this.parent.formatter.process(this.parent,t,t,{selection:e,subCommand:t.item.subCommand}),this.hideTableQuickToolbar()},n.prototype.removeTable=function(e,t,n){var i;n&&(i={item:{command:"Table",subCommand:"TableRemove"}});var o={selection:e,subCommand:n?i.item.subCommand:t.item.subCommand};this.parent.formatter.process(this.parent,n?i:t,t.originalEvent,o),this.contentModule.getEditPanel().focus(),this.removeResizeElement(),this.hideTableQuickToolbar()},n.prototype.renderDlgContent=function(e){var n=this;if(t.Browser.isDevice||this.parent.inlineMode.enable)return void this.insertTableDialog(e);if(this.popupObj)return void this.popupObj.hide();this.hideTableQuickToolbar();var i=this.l10n.getConstant("inserttablebtn");this.dlgDiv=this.parent.createElement("div",{className:"e-rte-table-popup",id:this.rteID+"_table"}),this.tblHeader=this.parent.createElement("div",{className:"e-rte-popup-header"}),this.tblHeader.innerHTML="1X1",this.dlgDiv.appendChild(this.tblHeader);var r=this.parent.createElement("div",{className:"e-rte-table-span"});this.drawTable(r,e),this.dlgDiv.appendChild(r),this.dlgDiv.appendChild(this.parent.createElement("span",{className:"e-span-border"}));var a=this.parent.createElement("button",{className:"e-insert-table-btn",id:this.rteID+"_insertTable",attrs:{type:"button",tabindex:"0"}});t.isNullOrUndefined(this.parent.getToolbarElement().querySelector(".e-expended-nav"))||this.parent.getToolbarElement().querySelector(".e-expended-nav").setAttribute("tabindex","1"),this.dlgDiv.appendChild(a);var l=new s.Button({iconCss:"e-icons e-create-table",content:i,cssClass:"e-flat",enableRtl:this.parent.enableRtl,locale:this.parent.locale});l.isStringTemplate=!0,l.appendTo(a),t.EventHandler.add(a,"click",this.insertTableDialog,{self:this,args:e.args,selection:e.selection}),this.parent.getToolbar().appendChild(this.dlgDiv);var d=e.args.originalEvent.target;d=d.classList.contains("e-toolbar-item")?d.firstChild:d.parentElement,this.popupObj=new o.Popup(this.dlgDiv,{targetType:"relative",relateTo:d,collision:{X:"fit",Y:"none"},offsetY:8,viewPortElement:this.parent.element,position:{X:"left",Y:"bottom"},enableRtl:this.parent.enableRtl,zIndex:10001,close:function(e){n.parent.isBlur=!1,n.popupObj.destroy(),t.detach(n.popupObj.element),n.popupObj=null}}),t.addClass([this.popupObj.element],"e-popup-open"),this.popupObj.refreshPosition(d)},n.prototype.docClick=function(e){var n=e.args.target;n&&n.classList&&(this.popupObj&&!t.closest(n,"[id='"+this.popupObj.element.id+"']")||this.editdlgObj&&!t.closest(n,"#"+this.editdlgObj.element.id))&&!n.classList.contains("e-create-table")&&n.offsetParent&&!n.offsetParent.classList.contains("e-rte-backgroundcolor-dropdown")&&(this.popupObj&&this.popupObj.hide(),this.editdlgObj&&this.editdlgObj.hide(),this.parent.isBlur=!0,S(this.parent.element,"focusout"));var i=t.closest(n,"td"),o=!(!i||!this.parent.contentModule.getEditPanel().contains(i));!n||"TD"===n.tagName||"TH"===n.tagName||o||null!==t.closest(n,".e-rte-quick-popup")||!n.offsetParent||n.offsetParent.classList.contains("e-quick-dropdown")||n.offsetParent.classList.contains("e-rte-backgroundcolor-dropdown")||t.closest(n,".e-rte-dropdown-popup")||t.closest(n,".e-rte-elements")||(t.removeClass(this.parent.element.querySelectorAll("table td"),"e-cell-select"),t.Browser.isIE||this.hideTableQuickToolbar()),!n||!n.classList||n.classList.contains("e-column-resize")||n.classList.contains("e-row-resize")||n.classList.contains("e-table-box")||this.removeResizeElement()},n.prototype.drawTable=function(e,n){for(var i,o,r=0;r<3;r++){i=this.parent.createElement("div",{className:"e-rte-table-row",attrs:{"data-column":""+r}});for(var s=0;s<10;s++){var a=r>2?"none":"inline-block";o=this.parent.createElement("div",{className:"e-rte-tablecell e-default",attrs:{"data-cell":""+s}}),i.appendChild(o),o.style.display=a,0===s&&0===r&&t.addClass([o],"e-active"),t.EventHandler.add(o,"mousemove",this.tableCellSelect,this),t.EventHandler.add(i,"mouseleave",this.tableCellLeave,this),t.EventHandler.add(o,"mouseup",this.tableCellClick,{self:this,args:n.args,selection:n.selection})}e.appendChild(i)}},n.prototype.editTable=function(e){var t=this;this.createDialog(e);var n=this.tableDlgContent(e),i=this.l10n.getConstant("dialogUpdate"),o=this.l10n.getConstant("dialogCancel"),r=this.l10n.getConstant("tableEditHeader");this.editdlgObj.setProperties({height:"initial",width:"290px",content:n,header:r,buttons:[{click:this.applyProperties.bind(this,e),buttonModel:{content:i,cssClass:"e-flat e-size-update",isPrimary:!0}},{click:function(e){t.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel",content:o}}]}),this.editdlgObj.element.style.maxHeight="none",this.editdlgObj.content.querySelector("input").focus(),this.hideTableQuickToolbar()},n.prototype.insertTableDialog=function(e){var n=this.self?this.self:this;n.popupObj&&n.popupObj.hide(),n.createDialog(e);var i=n.tableCellDlgContent(),o=n.l10n.getConstant("dialogInsert"),r=n.l10n.getConstant("dialogCancel");t.isNullOrUndefined(n.editdlgObj)||(n.editdlgObj.setProperties({height:"initial",width:"290px",content:i,buttons:[{click:n.customTable.bind(this,e),buttonModel:{content:o,cssClass:"e-flat e-insert-table",isPrimary:!0}},{click:function(e){n.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel",content:r}}]}),n.editdlgObj.element.style.maxHeight="none",n.editdlgObj.content.querySelector("input").focus())},n.prototype.tableCellDlgContent=function(){var e=this.l10n.getConstant("columns"),t=this.l10n.getConstant("rows"),n=this.parent.createElement("div",{className:"e-cell-wrap"}),i=T('<div class="e-rte-field"><input type="text" data-role ="none" id="tableColumn" class="e-table-column"/></div><div class="e-rte-field"><input type="text" data-role ="none" id="tableRow" class="e-table-row" /></div>');return n.appendChild(i),this.columnTextBox=new r.NumericTextBox({format:"n0",min:1,value:3,placeholder:e,floatLabelType:"Auto",max:50,enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.columnTextBox.isStringTemplate=!0,this.columnTextBox.appendTo(n.querySelector("#tableColumn")),this.rowTextBox=new r.NumericTextBox({format:"n0",min:1,value:3,placeholder:t,floatLabelType:"Auto",max:50,enableRtl:this.parent.enableRtl,locale:this.parent.locale}),this.rowTextBox.isStringTemplate=!0,this.rowTextBox.appendTo(n.querySelector("#tableRow")),n},n.prototype.clearDialogObj=function(){this.editdlgObj&&(this.editdlgObj.destroy(),t.detach(this.editdlgObj.element),this.editdlgObj=null)},n.prototype.createDialog=function(e){var n=this;if(this.editdlgObj)return void this.editdlgObj.hide({returnValue:!0});var i=this.parent.createElement("div",{className:"e-rte-edit-table",id:this.rteID+"_tabledialog"});this.parent.element.appendChild(i);var o=this.l10n.getConstant("dialogInsert"),r=this.l10n.getConstant("dialogCancel"),s={header:this.l10n.getConstant("tabledialogHeader"),cssClass:"e-rte-elements",enableRtl:this.parent.enableRtl,locale:this.parent.locale,showCloseIcon:!0,closeOnEscape:!0,width:t.Browser.isDevice?"290px":"340px",height:"initial",position:{X:"center",Y:t.Browser.isDevice?"center":"top"},isModal:t.Browser.isDevice,buttons:[{buttonModel:{content:o,cssClass:"e-flat e-insert-table",isPrimary:!0}},{click:function(e){n.cancelDialog(e)},buttonModel:{cssClass:"e-flat e-cancel",content:r}}],target:t.Browser.isDevice?document.body:this.parent.element,animationSettings:{effect:"None"},close:function(e){n.parent.isBlur=!1,n.editdlgObj.destroy(),t.detach(n.editdlgObj.element),n.dialogRenderObj.close(e),n.editdlgObj=null}};this.editdlgObj=this.dialogRenderObj.render(s),this.editdlgObj.appendTo(i),this.quickToolObj&&this.quickToolObj.inlineQTBar&&document.body.contains(this.quickToolObj.inlineQTBar.element)&&this.quickToolObj.inlineQTBar.hidePopup()},n.prototype.customTable=function(e,n){var i=this.self?this.self:this;if(i.rowTextBox.value&&i.columnTextBox.value){var o=t.Browser.isDevice||!t.isNullOrUndefined(e.args)&&!t.isNullOrUndefined(e.args.originalEvent)&&"insert-table"===e.args.originalEvent.action||i.parent.inlineMode.enable?e:this;i.tableInsert(i.rowTextBox.value,i.columnTextBox.value,n,o)}},n.prototype.cancelDialog=function(e){this.parent.isBlur=!1,this.editdlgObj.hide({returnValue:!0})},n.prototype.applyProperties=function(e,n){var i=this.editdlgObj.element,o=t.closest(e.selectNode[0],"table");if(o.style.width=i.querySelector(".e-table-width").value+"px",""!==i.querySelector(".e-cell-padding").value)for(var r=o.querySelectorAll("td"),s=0;s<r.length;s++){var a="";""===r[s].style.padding?a=r[s].getAttribute("style")+" padding:"+i.querySelector(".e-cell-padding").value+"px;":(r[s].style.padding=i.querySelector(".e-cell-padding").value+"px",a=r[s].getAttribute("style")),r[s].setAttribute("style",a)}o.cellSpacing=i.querySelector(".e-cell-spacing").value,t.isNullOrUndefined(o.cellSpacing)&&"0"===o.cellSpacing?t.removeClass([o],"e-rte-table-border"):t.addClass([o],"e-rte-table-border"),this.parent.formatter.saveData(),this.editdlgObj.hide({returnValue:!0})},n.prototype.tableDlgContent=function(e){var n=e.selectParent[0],i=this.l10n.getConstant("tableWidth"),o=this.l10n.getConstant("cellpadding"),s=this.l10n.getConstant("cellspacing"),a=this.parent.createElement("div",{className:"e-table-sizewrap"}),l=t.closest(n,"table").getClientRects()[0].width,d=t.closest(n,"td").style.padding,c=t.closest(n,"table").getAttribute("cellspacing"),p=T('<div class="e-rte-field"><input type="text" data-role ="none" id="tableWidth" class="e-table-width" /></div><div class="e-rte-field"><input type="text" data-role ="none" id="cellPadding" class="e-cell-padding" /> </div><div class="e-rte-field"><input type="text" data-role ="none" id="cellSpacing" class="e-cell-spacing" /></div>');a.appendChild(p);var h=new r.NumericTextBox({format:"n0",min:0,value:l,placeholder:i,floatLabelType:"Auto",enableRtl:this.parent.enableRtl,locale:this.parent.locale});h.isStringTemplate=!0,h.appendTo(a.querySelector("#tableWidth"));var u=new r.NumericTextBox({format:"n0",min:0,value:""!==d?parseInt(d,null):0,placeholder:o,floatLabelType:"Auto",enableRtl:this.parent.enableRtl,locale:this.parent.locale});u.isStringTemplate=!0,u.appendTo(a.querySelector("#cellPadding"));var m=new r.NumericTextBox({format:"n0",min:0,value:""===c||t.isNullOrUndefined(c)?0:parseInt(c,null),placeholder:s,floatLabelType:"Auto",enableRtl:this.parent.enableRtl,locale:this.parent.locale});return m.isStringTemplate=!0,m.appendTo(a.querySelector("#cellSpacing")),a},n.prototype.destroy=function(){this.removeEventListener()},n.prototype.getModuleName=function(){return"table"},n}(),wn=function(){function e(e){this.parent=e}return e.prototype.render=function(e){var n;return e.beforeOpen=this.beforeOpen.bind(this),e.open=this.open.bind(this),t.isNullOrUndefined(e.close)&&(e.close=this.close.bind(this)),e.beforeClose=this.beforeClose.bind(this),n=new o.Dialog(e),n.isStringTemplate=!0,n},e.prototype.beforeOpen=function(e){this.parent.trigger("beforeDialogOpen",e,this.beforeOpenCallback.bind(this,e))},e.prototype.beforeOpenCallback=function(e){e.cancel&&this.parent.notify("clearDialogObj",null)},e.prototype.open=function(e){this.parent.trigger("dialogOpen",e)},e.prototype.beforeClose=function(e){this.parent.trigger("beforeDialogClose",e,function(e){e.cancel||e.container.classList.contains("e-popup-close")&&(e.cancel=!0)})},e.prototype.close=function(e){this.parent.trigger("dialogClose",e)},e}(),kn={bold:{command:"Style",subCommand:"Bold",value:"strong"},italic:{command:"Style",subCommand:"Italic",value:"em"},underline:{command:"Style",subCommand:"Underline",value:"span"},strikeThrough:{command:"Style",subCommand:"StrikeThrough",value:"span"},insertCode:{command:"Formats",subCommand:"Pre",value:"pre"},superscript:{command:"Effects",subCommand:"SuperScript",value:"sup"},subscript:{command:"Effects",subCommand:"SubScript",value:"sub"},uppercase:{command:"Casing",subCommand:"UpperCase"},lowercase:{command:"Casing",subCommand:"LowerCase"},fontColor:{command:"font",subCommand:"fontcolor",value:"#ff0000"},fontName:{command:"font",subCommand:"fontname",value:"Segoe UI"},fontSize:{command:"font",subCommand:"fontsize",value:"10pt"},backColor:{command:"font",subCommand:"backgroundcolor",value:"#ffff00"},justifyCenter:{command:"Alignments",subCommand:"JustifyCenter"},justifyFull:{command:"Alignments",subCommand:"JustifyFull"},justifyLeft:{command:"Alignments",subCommand:"JustifyLeft"},justifyRight:{command:"Alignments",subCommand:"JustifyRight"},undo:{command:"Actions",subCommand:"Undo"},redo:{command:"Actions",subCommand:"Redo"},createLink:{command:"Links",subCommand:"createLink"},editLink:{command:"Links",subCommand:"createLink"},createImage:{command:"Images",subCommand:"Images"},formatBlock:{command:"Formats",value:"P"},heading:{command:"Formats",value:"H1"},indent:{command:"Indents",subCommand:"Indent"},outdent:{command:"Indents",subCommand:"Outdent"},insertHTML:{command:"InsertHTML",subCommand:"InsertHTML",value:""},insertText:{command:"InsertText",subCommand:"InsertText",value:""},insertHorizontalRule:{command:"InsertHTML",subCommand:"InsertHTML",value:"<hr/>"},insertImage:{command:"Images",subCommand:"Image"},editImage:{command:"Images",subCommand:"Image"},insertTable:{command:"Table",subCommand:"CreateTable"},insertBrOnReturn:{command:"InsertHTML",subCommand:"InsertHTML",value:"<br/>"},insertOrderedList:{command:"Lists",value:"OL"},insertUnorderedList:{command:"Lists",value:"UL"},insertParagraph:{command:"Formats",value:"P"},removeFormat:{command:"Clear",subCommand:"ClearFormat"}},Ln=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xn=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},On=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return Ln(i,n),xn([t.Property(!0)],i.prototype,"enable",void 0),xn([t.Property(!0)],i.prototype,"enableFloating",void 0),xn([t.Property(e.ToolbarType.Expand)],i.prototype,"type",void 0),xn([t.Property(we)],i.prototype,"items",void 0),xn([t.Property({})],i.prototype,"itemConfigs",void 0),i}(t.ChildProperty),Dn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property([".jpeg",".jpg",".png"])],n.prototype,"allowedTypes",void 0),xn([t.Property("inline")],n.prototype,"display",void 0),xn([t.Property("Blob")],n.prototype,"saveFormat",void 0),xn([t.Property("auto")],n.prototype,"width",void 0),xn([t.Property("auto")],n.prototype,"height",void 0),xn([t.Property(null)],n.prototype,"saveUrl",void 0),xn([t.Property(null)],n.prototype,"path",void 0),xn([t.Property(!0)],n.prototype,"resize",void 0),xn([t.Property(null)],n.prototype,"removeUrl",void 0),xn([t.Property(0)],n.prototype,"minWidth",void 0),xn([t.Property(null)],n.prototype,"maxWidth",void 0),xn([t.Property(0)],n.prototype,"minHeight",void 0),xn([t.Property(null)],n.prototype,"maxHeight",void 0),xn([t.Property(!1)],n.prototype,"resizeByPercent",void 0),n}(t.ChildProperty),Mn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Complex({getImageUrl:null,url:null,uploadUrl:null},a.AjaxSettings)],n.prototype,"ajaxSettings",void 0),xn([t.Property(!1)],n.prototype,"allowDragAndDrop",void 0),xn([t.Complex({visible:!0,file:["Open","|","Cut","Copy","|","Delete","Rename","|","Details"],folder:["Open","|","Cut","Copy","Paste","|","Delete","Rename","|","Details"],layout:["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"]},a.ContextMenuSettings)],n.prototype,"contextMenuSettings",void 0),xn([t.Property("")],n.prototype,"cssClass",void 0),xn([t.Complex({},a.DetailsViewSettings)],n.prototype,"detailsViewSettings",void 0),xn([t.Property(!1)],n.prototype,"enable",void 0),xn([t.Complex({maxWidth:"650px",minWidth:"240px",visible:!0},a.NavigationPaneSettings)],n.prototype,"navigationPaneSettings",void 0),xn([t.Property("/")],n.prototype,"path",void 0),xn([t.Property(null)],n.prototype,"rootAliasName",void 0),xn([t.Complex({},a.SearchSettings)],n.prototype,"searchSettings",void 0),xn([t.Property(!0)],n.prototype,"showFileExtension",void 0),xn([t.Property(!1)],n.prototype,"showHiddenItems",void 0),xn([t.Property(!0)],n.prototype,"showThumbnail",void 0),xn([t.Property("Ascending")],n.prototype,"sortOrder",void 0),xn([t.Complex({visible:!0,items:["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"]},a.ToolbarSettings)],n.prototype,"toolbarSettings",void 0),xn([t.Complex({autoUpload:!0,minFileSize:0,maxFileSize:3e7,allowedExtensions:"",autoClose:!1},a.UploadSettings)],n.prototype,"uploadSettings",void 0),xn([t.Property("LargeIcons")],n.prototype,"view",void 0),n}(t.ChildProperty),Rn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property("100%")],n.prototype,"width",void 0),xn([t.Property(Ne)],n.prototype,"styles",void 0),xn([t.Property(!0)],n.prototype,"resize",void 0),xn([t.Property(0)],n.prototype,"minWidth",void 0),xn([t.Property(null)],n.prototype,"maxWidth",void 0),n}(t.ChildProperty),In=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property(!0)],n.prototype,"enable",void 0),xn([t.Property(!1)],n.prototype,"showOnRightClick",void 0),xn([t.Property("hide")],n.prototype,"actionOnScroll",void 0),xn([t.Property(["Open","Edit","UnLink"])],n.prototype,"link",void 0),xn([t.Property(["Replace","Align","Caption","Remove","-","InsertLink","OpenImageLink","EditImageLink","RemoveImageLink","Display","AltText","Dimension"])],n.prototype,"image",void 0),xn([t.Property(["Cut","Copy","Paste"])],n.prototype,"text",void 0),xn([t.Property(["TableHeader","TableRows","TableColumns","BackgroundColor","-","TableRemove","Alignments","TableCellVerticalAlign","Styles"])],n.prototype,"table",void 0),n}(t.ChildProperty),Bn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property(!1)],n.prototype,"prompt",void 0),xn([t.Property(null)],n.prototype,"deniedAttrs",void 0),xn([t.Property(["background","background-color","border","border-bottom","border-left","border-radius","border-right","border-style","border-top","border-width","clear","color","cursor","direction","display","float","font","font-family","font-size","font-weight","font-style","height","left","line-height","margin","margin-top","margin-left","margin-right","margin-bottom","max-height","max-width","min-height","min-width","overflow","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","position","right","table-layout","text-align","text-decoration","text-indent","top","vertical-align","visibility","white-space","width"])],n.prototype,"allowedStyleProps",void 0),xn([t.Property(null)],n.prototype,"deniedTags",void 0),xn([t.Property(!0)],n.prototype,"keepFormat",void 0),xn([t.Property(!1)],n.prototype,"plainText",void 0),n}(t.ChildProperty),Pn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property(null)],n.prototype,"default",void 0),xn([t.Property("65px")],n.prototype,"width",void 0),xn([t.Property(ke)],n.prototype,"items",void 0),n}(t.ChildProperty),An=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property(null)],n.prototype,"default",void 0),xn([t.Property("35px")],n.prototype,"width",void 0),xn([t.Property(Le)],n.prototype,"items",void 0),n}(t.ChildProperty),Hn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property(null)],n.prototype,"default",void 0),xn([t.Property("65px")],n.prototype,"width",void 0),xn([t.Property(xe)],n.prototype,"types",void 0),n}(t.ChildProperty),Un=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property("#ff0000")],n.prototype,"default",void 0),xn([t.Property("Palette")],n.prototype,"mode",void 0),xn([t.Property(10)],n.prototype,"columns",void 0),xn([t.Property(Oe)],n.prototype,"colorCode",void 0),xn([t.Property(!1)],n.prototype,"modeSwitcher",void 0),n}(t.ChildProperty),jn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property("#ffff00")],n.prototype,"default",void 0),xn([t.Property("Palette")],n.prototype,"mode",void 0),xn([t.Property(10)],n.prototype,"columns",void 0),xn([t.Property(De)],n.prototype,"colorCode",void 0),xn([t.Property(!1)],n.prototype,"modeSwitcher",void 0),n}(t.ChildProperty),Fn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property(Me)],n.prototype,"types",void 0),n}(t.ChildProperty),zn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ln(n,e),xn([t.Property(Re)],n.prototype,"types",void 0),n}(t.ChildProperty),_n=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qn=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Qn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return _n(n,e),qn([t.Property([])],n.prototype,"styles",void 0),qn([t.Property([])],n.prototype,"scripts",void 0),n}(t.ChildProperty),Vn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return _n(n,e),qn([t.Property(!1)],n.prototype,"enable",void 0),qn([t.Property(null)],n.prototype,"attributes",void 0),qn([t.Complex({},Qn)],n.prototype,"resources",void 0),n}(t.ChildProperty),Wn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gn=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Kn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Wn(n,e),Gn([t.Property(!1)],n.prototype,"enable",void 0),Gn([t.Property(!0)],n.prototype,"onSelection",void 0),n}(t.ChildProperty),Xn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Yn=function(){return(Yn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)},Jn=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},$n=function(n){function i(e,t){var i=n.call(this,e,t)||this;return i.defaultResetValue=null,i.isResizeInitialized=!1,i.isFocusOut=!1,i.isRTE=!1,i.isBlur=!0,i.needsID=!0,i}return Xn(i,n),i.prototype.requiredModules=function(){var e=[];return this.toolbarSettings.enable&&(e.push({member:"toolbar",args:[this,this.serviceLocator]}),e.push({member:"link",args:[this,this.serviceLocator]}),e.push({member:"table",args:[this,this.serviceLocator]}),e.push({member:"image",args:[this,this.serviceLocator]}),this.quickToolbarSettings.enable&&e.push({member:"quickToolbar",args:[this,this.serviceLocator]})),this.showCharCount&&e.push({member:"count",args:[this,this.serviceLocator]}),"Markdown"===this.editorMode&&e.push({member:"markdownEditor",args:[this,this.serviceLocator]}),"HTML"===this.editorMode&&(e.push({member:"htmlEditor",args:[this,this.serviceLocator]}),e.push({member:"pasteCleanup",args:[this,this.serviceLocator]})),this.fileManagerSettings.enable&&e.push({member:"fileManager",args:[this,this.serviceLocator]}),this.enableResize&&e.push({member:"resize",args:[this]}),e},i.prototype.updateEnable=function(){this.enabled?(t.removeClass([this.element],"e-disabled"),this.element.setAttribute("aria-disabled","false"),t.isNullOrUndefined(this.htmlAttributes.tabindex)?this.inputElement.setAttribute("tabindex","0"):this.inputElement.setAttribute("tabindex",this.htmlAttributes.tabindex)):(this.getToolbar()&&(t.removeClass(this.getToolbar().querySelectorAll("."+re),re),t.removeClass([this.getToolbar()],["e-rte-tb-float","e-rte-tb-abs-float"])),t.addClass([this.element],"e-disabled"),this.element.tabIndex=-1,this.element.setAttribute("aria-disabled","true"),this.inputElement.setAttribute("tabindex","-1"))},i.prototype.setEnable=function(){this.updateEnable(),this.enabled?this.eventInitializer():this.unWireEvents()},i.prototype.preRender=function(){this.onBlurHandler=this.blurHandler.bind(this),this.onFocusHandler=this.focusHandler.bind(this),this.onResizeHandler=this.resizeHandler.bind(this),this.clickPoints={clientX:0,clientY:0},this.initialValue=this.value,this.serviceLocator=new Qe,this.initializeServices(),this.setContainer(),this.persistData(),t.setStyleAttribute(this.element,{width:t.formatUnit(this.width)}),t.attributes(this.element,{role:"application"})},i.prototype.persistData=function(){if(this.enablePersistence&&"TEXTAREA"===this.originalElement.tagName){this.element.id=this.originalElement.id+"_wrapper";var e=window.localStorage.getItem(this.getModuleName()+this.element.id);t.isNullOrUndefined(e)||""===e||this.setProperties(JSON.parse(e),!0)}},i.prototype.setContainer=function(){this.originalElement=this.element.cloneNode(!0),null!==this.value&&null===this.valueTemplate||this.setValue(),this.element.hasAttribute("tabindex")&&(this.htmlAttributes={tabindex:this.element.getAttribute("tabindex")},this.element.removeAttribute("tabindex")),this.isBlazor()||(this.element.innerHTML="");for(var e=["class","style","id","ejs-for"],n={},i=0;i<this.element.attributes.length;i++)-1!==e.indexOf(this.element.attributes[i].name)||/^data-val/.test(this.element.attributes[i].name)||(n[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name));if(t.extend(n,this.htmlAttributes,n),this.setProperties({htmlAttributes:n},!0),t.isNullOrUndefined(this.htmlAttributes.id)||(this.element.id=this.htmlAttributes.id),"TEXTAREA"===this.element.tagName){var o=this.createElement("div",{className:this.element.getAttribute("class")});this.isBlazor()||(this.element.innerHTML=""),this.element.parentElement.insertBefore(o,this.element),t.isBlazor()?(o.appendChild(this.element),this.valueContainer=this.createElement("textarea",{id:this.element.id+"-value"})):this.valueContainer=this.element,t.removeClass([this.valueContainer],this.element.getAttribute("class").split(" ")),this.isBlazor()&&t.addClass([this.element],"e-rte-hidden"),this.element=o}else this.valueContainer=this.createElement("textarea",{id:this.getID()+"-value"});this.valueContainer.name=this.getID(),t.addClass([this.valueContainer],"e-rte-hidden"),this.element.appendChild(this.valueContainer)},i.prototype.getPersistData=function(){return this.addOnPersist(["value"])},i.prototype.focusIn=function(){this.enabled&&(this.inputElement.focus(),this.focusHandler({}))},i.prototype.focusOut=function(){this.enabled&&(this.inputElement.blur(),this.blurHandler({}))},i.prototype.selectAll=function(){this.notify("selectAll",{})},i.prototype.selectRange=function(e){this.notify("selectRange",{range:e})},i.prototype.getSelection=function(){var e="";return this.notify("getSelectedHtml",{callBack:function(t){e=t}}),e},i.prototype.executeCommand=function(e,t,n){if(t=this.htmlPurifier(e,t),"HTML"===this.editorMode){var i=this.getRange();this.iframeSettings.enable&&this.formatter.editorManager.nodeSelection.Clear(this.element.ownerDocument),(!(!this.iframeSettings.enable||i.startContainer!==this.inputElement)||!this.inputElement.contains(i.startContainer))&&this.focusIn()}var o=kn[e];n&&n.undo&&n.undo&&0===this.formatter.getUndoRedoStack().length&&this.formatter.saveData(),this.formatter.editorManager.execCommand(o.command,o.subCommand?o.subCommand:t||o.value,null,null,t||o.value,t||o.value),n&&n.undo&&(this.formatter.saveData(),this.formatter.enableUndo(this)),this.setPlaceHolder(),this.notify("content-changed",{})},i.prototype.htmlPurifier=function(e,n){if("HTML"===this.editorMode)switch(e){case"insertHTML":this.enableHtmlSanitizer&&(n="string"==typeof n?this.htmlEditorModule.sanitizeHelper(n):this.htmlEditorModule.sanitizeHelper(n.outerHTML));break;case"insertTable":t.isNullOrUndefined(n.width)&&(n.width={minWidth:this.tableSettings.minWidth,maxWidth:this.tableSettings.maxWidth,width:this.tableSettings.width});break;case"insertImage":var i=this.createElement("img",{attrs:{src:n.url}}),o=i.outerHTML;this.enableHtmlSanitizer&&(o=this.htmlEditorModule.sanitizeHelper(i.outerHTML));var r=""!==o&&this.createElement("div",{innerHTML:o}).firstElementChild.getAttribute("src")||null;r=t.isNullOrUndefined(r)?"":r,n.url=r,t.isNullOrUndefined(n.width)&&(n.width={minWidth:this.insertImageSettings.minWidth,maxWidth:this.insertImageSettings.maxWidth,width:this.insertImageSettings.width}),t.isNullOrUndefined(n.height)&&(n.height={minHeight:this.insertImageSettings.minHeight,maxHeight:this.insertImageSettings.maxHeight,height:this.insertImageSettings.height});break;case"createLink":var s=this.createElement("a",{attrs:{href:n.url}}),a=s.outerHTML;this.enableHtmlSanitizer&&(a=this.htmlEditorModule.sanitizeHelper(s.outerHTML));var l=""!==a&&this.createElement("div",{innerHTML:a}).firstElementChild.getAttribute("href")||null;l=t.isNullOrUndefined(l)?"":l,n.url=l}return n},i.prototype.encode=function(e){var t=this.createElement("div");return t.innerText=e.trim(),t.innerHTML.replace(/<br\s*[\/]?>/gi,"\n")},i.prototype.render=function(){this.value&&!this.valueTemplate&&this.setProperties({value:this.serializeValue(this.value)},!0),this.renderModule=new Cn(this,this.serviceLocator),this.sourceCodeModule=new En(this,this.serviceLocator),this.notify("initial-load",{}),this.trigger("load"),this.RTERender();new st(this);this.notify(F,{}),this.enableXhtml&&this.setProperties({value:this.getXhtml()},!0),this.toolbarSettings.enable&&"Expand"===this.toolbarSettings.type&&!t.isNullOrUndefined(this.getToolbar())&&this.toolbarSettings.items.indexOf("Undo")>-1&&this.toolbarSettings.items.indexOf("Redo")>-1&&this.disableToolbarItem(["Undo","Redo"]),this.setContentHeight(),null!==this.value&&(this.isBlazor()?this.defaultResetValue=this.value:this.valueContainer.defaultValue=this.value),this.enabled?this.eventInitializer():this.unWireEvents(),this.renderComplete()},i.prototype.eventInitializer=function(){this.wireEvents()},i.prototype.keyDown=function(e){if(this.notify(Q,{member:"keydown",args:e}),this.restrict(e),"HTML"===this.editorMode&&(8===e.which&&"Backspace"===e.code||46===e.which&&"Delete"===e.code)){var n=this.getRange(),i="#text"===n.startContainer.nodeName?n.startContainer.parentElement:n.startContainer;if(t.closest(i,"pre")&&8===e.which&&8203===n.startContainer.textContent.charCodeAt(n.startOffset-1)||46===e.which&&8203===n.startContainer.textContent.charCodeAt(n.startOffset)){var o=new RegExp(String.fromCharCode(8203),"g"),r=8===e.which?n.startOffset-1:n.startOffset;n.startContainer.textContent=n.startContainer.textContent.replace(o,""),this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),n.startContainer,r)}else if("Backspace"===e.code&&8===e.which&&8203===n.startContainer.textContent.charCodeAt(0)&&n.collapsed){var s=n.startContainer.parentElement,a=void 0,l=void 0;for(l=0;l<s.childNodes.length;l++)s.childNodes[l]===n.startContainer&&(a=l);var d=!0,c=[];for(l=a;l>=0;l--)3===s.childNodes[l].nodeType&&8203===s.childNodes[l].textContent.charCodeAt(0)&&d?c.push(l):d=!1;if(c.length>0)for(l=c.length-1;l>0;l--)s.childNodes[c[l]].textContent="";this.formatter.editorManager.nodeSelection.setCursorPoint(this.contentModule.getDocument(),n.startContainer,n.startOffset)}}if(0===this.formatter.getUndoRedoStack().length&&this.formatter.saveData(),"insert-link"!==e.action&&(e.action&&"paste"!==e.action||9===e.which||"Backspace"===e.code&&8===e.which))switch(this.formatter.process(this,null,e),e.action){case"toolbar-focus":if(this.toolbarSettings.enable){this.toolbarModule.baseToolbar.toolbarObj.element.querySelector('.e-toolbar-item[aria-disabled="false"][title] [tabindex]').focus()}break;case"escape":this.contentModule.getEditPanel().focus()}t.isNullOrUndefined(this.placeholder)||(t.isNullOrUndefined(this.placeHolderWrapper)||1===this.inputElement.textContent.length?this.setPlaceHolder():this.placeHolderWrapper.style.display="none"),this.autoResize()},i.prototype.keyUp=function(e){this.notify(q,{member:"keyup",args:e}),"KeyX"!==e.code||88!==e.which||88!==e.keyCode||!e.ctrlKey||""!==this.inputElement.innerHTML&&"<br>"!==this.inputElement.innerHTML||(this.inputElement.innerHTML=w("<p><br></p>",this));var n=32===e.which||13===e.which||8===e.which||46===e.which;("shift"!==e.key&&!e.ctrlKey&&e.key&&1===e.key.length||n||"Markdown"===this.editorMode&&("shift"!==e.key&&!e.ctrlKey&&e.key&&1===e.key.length||n)&&!this.inlineMode.enable)&&this.formatter.onKeyHandler(this,e),this.inputElement&&0!==this.inputElement.textContent.length&&this.notify("toolbar-refresh",{args:e}),t.isNullOrUndefined(this.placeholder)||this.setPlaceHolder()},i.prototype.serializeValue=function(e){return"HTML"!==this.editorMode||t.isNullOrUndefined(e)||(this.enableHtmlEncode?(e=this.htmlEditorModule.sanitizeHelper(x(e)),e=this.encode(e)):e=this.htmlEditorModule.sanitizeHelper(e)),e},i.prototype.sanitizeHtml=function(e){return this.serializeValue(e)},i.prototype.updateValue=function(e){if(t.isNullOrUndefined(e)){var n=this.inputElement.innerHTML;this.setProperties({value:L(n)?null:n})}else this.setProperties({value:e})},i.prototype.triggerEditArea=function(e){if(u()){var t=e.touches?e.changedTouches[0]:e;this.clickPoints.clientX===t.clientX&&this.clickPoints.clientY===t.clientY&&this.notify("editAreaClick",{member:"editAreaClick",args:e})}else this.notify("editAreaClick",{member:"editAreaClick",args:e})},i.prototype.notifyMouseUp=function(e){var t=e.touches?e.changedTouches[0]:e;this.notify("mouseUp",{member:"mouseUp",args:e,touchData:{prevClientX:this.clickPoints.clientX,prevClientY:this.clickPoints.clientY,clientX:t.clientX,clientY:t.clientY}}),this.inputElement&&("HTML"===this.editorMode&&0!==this.inputElement.textContent.length||"Markdown"===this.editorMode&&0!==this.inputElement.value.length)&&this.notify("toolbar-refresh",{args:e}),this.triggerEditArea(e)},i.prototype.mouseUp=function(e){if(this.quickToolbarSettings.showOnRightClick&&t.Browser.isDevice){var n=e.target,i=t.closest(n,"table");if(n&&"A"===n.nodeName||"IMG"===n.nodeName||"TD"===n.nodeName||"TH"===n.nodeName||"TABLE"===n.nodeName||i&&this.contentModule.getEditPanel().contains(i))return}if(this.notifyMouseUp(e),3===e.detail){var o=this.getRange(),r=this.formatter.editorManager.domNode.getSelection();/\s+$/.test(r.toString())&&((t.isNullOrUndefined(o.startContainer.parentElement)||(t.isNullOrUndefined(o.startContainer.parentElement.nextSibling)||3===o.startContainer.parentElement.nextSibling.nodeType&&!/\s+$/.test(o.startContainer.parentElement.nextSibling.textContent))&&o.startOffset!==o.endOffset)&&"li"!==o.startContainer.parentElement.tagName.toLocaleLowerCase()||(o.setStart(o.startContainer,o.startOffset),o.setEnd(o.startContainer,o.startContainer.textContent.length)))}},i.prototype.ensureModuleInjected=function(e){return this.getInjectedModules().indexOf(e)>=0},i.prototype.onCopy=function(){this.contentModule.getDocument().execCommand("copy",!1,null)},i.prototype.onCut=function(){this.contentModule.getDocument().execCommand("cut",!1,null)},i.prototype.onPaste=function(e){var n=this,i={originalEvent:e,cancel:!1,requestType:"Paste"};this.trigger("actionBegin",i,function(i){var o=n.getText().trim().length-n.getSelection().length+(t.isNullOrUndefined(e)||t.isNullOrUndefined(e.clipboardData)?0:e.clipboardData.getData("text/plain").length);if("Markdown"===n.editorMode)return void(-1===n.maxLength||o<=n.maxLength||e.preventDefault());if(!i.cancel&&"true"===n.inputElement.contentEditable&&(-1===n.maxLength||o<=n.maxLength))if(t.isNullOrUndefined(n.pasteCleanupModule)){var r={requestType:"Paste",editorMode:n.editorMode,event:e},s=null,a=!1;e&&!t.isNullOrUndefined(e.clipboardData)&&(s=e.clipboardData.getData("text/plain"),a=e.clipboardData.getData("text/html").indexOf("MsoNormal")>0);var l=e&&e.clipboardData&&e.clipboardData.items.length>0?e.clipboardData.items[0].getAsFile():null;null!==s&&n.notify(G,{file:l,args:e,text:s,isWordPaste:a}),setTimeout(function(){n.formatter.onSuccess(n,r)},0)}else n.notify("pasteClean",{args:e});else e.preventDefault()})},i.prototype.clipboardAction=function(e,t){switch(e.toLowerCase()){case"cut":this.onCut(),this.formatter.onSuccess(this,{requestType:"Cut",editorMode:this.editorMode,event:t});break;case"copy":this.onCopy(),this.formatter.onSuccess(this,{requestType:"Copy",editorMode:this.editorMode,event:t});break;case"paste":this.onPaste(t)}},i.prototype.destroy=function(){if(!this.isDestroyed&&this.isRendered){if(null===this.element.offsetParent&&!t.isNullOrUndefined(this.toolbarModule))return void this.toolbarModule.destroy();if(this.notify(z,{}),this.destroyDependentModules(),t.isNullOrUndefined(this.timeInterval)||(clearInterval(this.timeInterval),this.timeInterval=null),this.unWireEvents(),"TEXTAREA"===this.originalElement.tagName){t.isBlazor()&&(t.detach(this.valueContainer),this.valueContainer=this.element.querySelector(".e-blazor-hidden.e-control.e-richtexteditor")),this.element.parentElement.insertBefore(this.valueContainer,this.element),this.valueContainer.id=this.getID(),this.valueContainer.removeAttribute("name"),t.detach(this.element),""!==this.originalElement.innerHTML.trim()?t.isBlazor()||(this.valueContainer.value=this.originalElement.innerHTML.trim(),this.setProperties({value:t.isNullOrUndefined(this.initialValue)?null:this.initialValue},!0)):this.valueContainer.value=this.isBlazor()?this.defaultResetValue:this.valueContainer.defaultValue,this.element=this.valueContainer;for(i=0;i<this.originalElement.classList.length;i++)t.addClass([this.element],this.originalElement.classList[i]);t.removeClass([this.element],"e-rte-hidden")}else""!==this.originalElement.innerHTML.trim()?(this.element.innerHTML=this.originalElement.innerHTML.trim(),this.setProperties({value:t.isNullOrUndefined(this.initialValue)?null:this.initialValue},!0)):this.element.innerHTML="";if(this.placeholder&&this.placeHolderWrapper&&(this.placeHolderWrapper=null),!t.isNullOrUndefined(this.cssClass))for(var e=this.cssClass.split(" "),i=0;i<e.length;i++)""!==e[i].trim()&&t.removeClass([this.element],e[i]);this.removeHtmlAttributes(),this.removeAttributes(),n.prototype.destroy.call(this),this.isRendered=!1,this.enablePersistence&&window.localStorage.removeItem(this.getModuleName()+this.element.id)}},i.prototype.removeHtmlAttributes=function(){if(this.htmlAttributes)for(var e=Object.keys(this.htmlAttributes),t=0;t<e.length&&this.element.hasAttribute(e[t]);t++)this.element.removeAttribute(e[t])},i.prototype.removeAttributes=function(){this.enabled||t.removeClass([this.element],"e-disabled"),this.enableRtl&&t.removeClass([this.element],"e-rtl"),this.readonly&&t.removeClass([this.element],"e-rte-readonly"),""!==this.element.style.width&&""===this.originalElement.style.width&&this.element.style.removeProperty("width"),""!==this.element.style.height&&""===this.originalElement.style.height&&this.element.style.removeProperty("height"),this.element.removeAttribute("aria-disabled"),this.element.removeAttribute("role"),this.element.removeAttribute("tabindex")},i.prototype.destroyDependentModules=function(){this.renderModule.destroy(),this.formatter.editorManager.undoRedoManager.destroy(),this.sourceCodeModule.destroy()},i.prototype.getContent=function(){return this.iframeSettings.enable&&t.isBlazor()?this.inputElement:this.contentModule.getPanel()},i.prototype.getText=function(){return this.contentModule.getText()},i.prototype.getSelectedHtml=function(){var e,t=this.createElement("div"),n=this.contentModule.getDocument().getSelection();if(n.rangeCount>0){var i=(e=n.getRangeAt(0)).cloneContents();t.appendChild(i)}return t.innerHTML},i.prototype.showInlineToolbar=function(){if(this.inlineMode.enable){var e=this.getRange(),t="#text"===e.endContainer.nodeName?e.endContainer.parentElement:e.endContainer,n=e.getClientRects()[0].left,i=e.getClientRects()[0].top;this.quickToolbarModule.showInlineQTBar(n,i,t)}},i.prototype.hideInlineToolbar=function(){this.quickToolbarModule.hideInlineQTBar()},i.prototype.getModuleName=function(){return"richtexteditor"},i.prototype.onPropertyChanged=function(e,i){for(var o=0,r=Object.keys(e);o<r.length;o++){var s=r[o];switch(s){case"value":var a=e[s],l="HTML"===this.editorMode?w(a,this):a;t.isNullOrUndefined(a)||""===a||(this.value=this.serializeValue(this.enableHtmlEncode?this.encode(x(l)):l)),this.updatePanelValue(),this.setPlaceHolder(),this.notify("xhtmlValidation",{module:"XhtmlValidation",newProp:e,oldProp:i}),this.enableXhtml&&this.setProperties({value:this.getXhtml()},!0),this.showCharCount&&this.countModule.refresh();break;case"valueTemplate":this.setValue(),this.showCharCount&&this.countModule.refresh();break;case"width":this.setWidth(e[s]),this.toolbarSettings.enable&&(this.toolbarModule.refreshToolbarOverflow(),this.resizeHandler());break;case"height":this.setHeight(e[s]),this.setContentHeight(),this.autoResize();break;case"readonly":this.setReadOnly(!1);break;case"cssClass":this.element.classList.remove(i[s]),this.setCssClass(e[s]);break;case"enabled":this.setEnable();break;case"enableRtl":this.updateRTL();break;case"placeholder":this.placeholder=e[s],this.setPlaceHolder();break;case"htmlAttributes":j(this.htmlAttributes,this,!1,!1);break;case"iframeSettings":var d=i[s];if(d.resources){var c=this.contentModule.getDocument().querySelector("head"),p=void 0;d.resources.scripts&&(p=c.querySelectorAll(".rte-iframe-script-sheet"),this.removeSheets(p)),d.resources.styles&&(p=c.querySelectorAll(".rte-iframe-style-sheet"),this.removeSheets(p))}this.setIframeSettings();break;case"locale":n.prototype.refresh.call(this);break;case"inlineMode":this.notify(_,{module:"quickToolbar",newProp:e,oldProp:i}),this.setContentHeight();break;case"toolbarSettings":this.notify(_,{module:"toolbar",newProp:e,oldProp:i}),this.setContentHeight();break;case"maxLength":this.showCharCount&&this.countModule.refresh();break;case"showCharCount":e[s]&&this.countModule?this.countModule.renderCount():!1===e[s]&&this.countModule&&this.countModule.destroy();break;case"enableHtmlEncode":this.updateValueData(),this.updatePanelValue(),this.setPlaceHolder(),this.showCharCount&&this.countModule.refresh();break;case"undoRedoSteps":case"undoRedoTimer":this.formatter.editorManager.observer.notify("model_changed",{newProp:e,oldProp:i});break;case"enableXhtml":this.notify("xhtmlValidation",{module:"XhtmlValidation",newProp:e,oldProp:i});break;case"quickToolbarSettings":e.quickToolbarSettings.showOnRightClick?this.wireContextEvent():this.unWireContextEvent(),this.notify(_,{newProp:e,oldProp:i});break;default:this.notify(_,{newProp:e,oldProp:i})}}},i.prototype.updateValueData=function(){this.enableHtmlEncode?this.setProperties({value:this.encode(x(this.inputElement.innerHTML))},!0):this.setProperties({value:/<[a-z][\s\S]*>/i.test(this.inputElement.innerHTML)?this.inputElement.innerHTML:x(this.inputElement.innerHTML)})},i.prototype.removeSheets=function(e){var n;for(n=0;n<e.length;n++)t.detach(e[n])},i.prototype.updatePanelValue=function(){var e=this.value;e=this.enableHtmlEncode&&this.value?x(e):e;var t=this.element.querySelector(".e-rte-srctextarea");e?(t&&"block"===t.style.display&&(t.value=this.value),this.valueContainer&&(this.valueContainer.value=this.enableHtmlEncode?this.value:e),"HTML"===this.editorMode&&this.inputElement&&this.inputElement.innerHTML.trim()!==e.trim()?this.inputElement.innerHTML=e:"Markdown"===this.editorMode&&this.inputElement&&this.inputElement.value.trim()!==e.trim()&&(this.inputElement.value=e)):(t&&"block"===t.style.display&&(t.value=""),"HTML"===this.editorMode?this.inputElement.innerHTML="<p><br/></p>":this.inputElement.value="",this.valueContainer&&(this.valueContainer.value="")),this.showCharCount&&this.countModule.refresh()},i.prototype.setHeight=function(e){this.element.style.height="auto"!==e?t.formatUnit(e):"auto","Expand"===this.toolbarSettings.type&&("string"==typeof this.height&&this.height.indexOf("px")>-1||"number"==typeof this.height)?this.element.classList.add("e-rte-fixed-tb-expand"):this.element.classList.remove("e-rte-fixed-tb-expand")},i.prototype.setPlaceHolder=function(){this.inputElement&&this.placeholder&&!0!==this.iframeSettings.enable&&("Markdown"!==this.editorMode?(this.placeHolderWrapper||(this.placeHolderWrapper=this.createElement("span",{className:"rte-placeholder e-rte-placeholder"}),this.inputElement&&this.inputElement.parentElement.insertBefore(this.placeHolderWrapper,this.inputElement),t.attributes(this.placeHolderWrapper,{style:"font-size: 14px; padding: 16px; margin-left: 0px; margin-right: 0px;"})),this.placeHolderWrapper.innerHTML=this.placeholder,0!==this.inputElement.textContent.length||t.isNullOrUndefined(this.inputElement.firstChild)||"P"!==this.inputElement.firstChild.nodeName||t.isNullOrUndefined(this.inputElement.firstChild.firstChild)||"BR"!==this.inputElement.firstChild.firstChild.nodeName||"<p><br></p><p><br></p>"===this.inputElement.innerHTML?this.placeHolderWrapper.style.display="none":this.placeHolderWrapper.style.display="block"):this.inputElement.setAttribute("placeholder",this.placeholder))},i.prototype.setWidth=function(e){"auto"!==e?t.setStyleAttribute(this.element,{width:t.formatUnit(this.width)}):this.element.style.width="auto"},i.prototype.setCssClass=function(e){if(!t.isNullOrUndefined(e))for(var n=e.split(" "),i=0;i<n.length;i++)""!==n[i].trim()&&this.element.classList.add(n[i])},i.prototype.updateRTL=function(){this.notify(K,{enableRtl:this.enableRtl}),this.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")},i.prototype.updateReadOnly=function(){this.notify("readOnlyMode",{editPanel:this.inputElement,mode:this.readonly})},i.prototype.setReadOnly=function(e){this.updateReadOnly(),e||(this.readonly&&this.enabled?this.unbindEvents():this.enabled&&this.bindEvents())},i.prototype.print=function(){var e,n=this,i={element:this.inputElement,requestType:"print",cancel:!1};this.trigger("actionBegin",i,function(i){if(e=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth),"msie"===t.Browser.info.name&&e.resizeTo(screen.availWidth,screen.availHeight),e=t.print(n.inputElement,e),!i.cancel){var o={requestType:"print"};n.trigger("actionComplete",o)}})},i.prototype.refreshUI=function(){this.renderModule.refresh()},i.prototype.showFullScreen=function(){this.fullScreenModule.showFullScreen()},i.prototype.enableToolbarItem=function(e,t){this.toolbarModule.enableTBarItems(this.getBaseToolbarObject(),e,!0,t)},i.prototype.disableToolbarItem=function(e,t){this.toolbarModule.enableTBarItems(this.getBaseToolbarObject(),e,!1,t)},i.prototype.removeToolbarItem=function(e){this.toolbarModule.removeTBarItems(e)},i.prototype.getRange=function(){return this.formatter.editorManager.nodeSelection.getRange(this.contentModule.getDocument())},i.prototype.initializeServices=function(){this.serviceLocator.register("rendererFactory",new Ve),this.serviceLocator.register("rteLocale",this.localeObj=new t.L10n(this.getModuleName(),Ie,this.locale)),this.serviceLocator.register("dialogRenderObject",new wn(this))},i.prototype.RTERender=function(){var n=this.serviceLocator.getService("rendererFactory");this.contentModule=n.getRenderer(e.RenderType.Content),this.fullScreenModule=new yn(this),this.renderModule.render(),this.inputElement=this.contentModule.getEditPanel(),this.setHeight(this.height),j(this.htmlAttributes,this,!1,!0),this.iframeSettings&&this.setIframeSettings(),this.setCssClass(this.cssClass),this.updateEnable(),this.setPlaceHolder(),this.updateRTL(),this.updateReadOnly(),this.updatePanelValue(),this.enableHtmlEncode&&!t.isNullOrUndefined(this.value)&&this.setProperties({value:this.encode(x(this.value))})},i.prototype.setIframeSettings=function(){if(this.iframeSettings.resources){var e=this.iframeSettings.resources.styles,t=this.iframeSettings.resources.scripts;this.iframeSettings.resources.scripts.length>0&&this.InjectSheet(!0,t),this.iframeSettings.resources.styles.length>0&&this.InjectSheet(!1,e)}this.iframeSettings.attributes&&j(this.iframeSettings.attributes,this,!0,!1)},i.prototype.InjectSheet=function(e,t){try{if(t&&t.length>0)for(var n=this.contentModule.getDocument().querySelector("head"),i=0;i<t.length;i++)if(e){var o=this.createScriptElement();o.src=t[i],n.appendChild(o)}else{var r=this.createStyleElement();r.href=t[i],n.appendChild(r)}}catch(e){return}},i.prototype.createScriptElement=function(){var e=this.createElement("script",{className:"rte-iframe-script-sheet"});return e.type="text/javascript",e},i.prototype.createStyleElement=function(){var e=this.createElement("link",{className:"rte-iframe-style-sheet"});return e.rel="stylesheet",e},i.prototype.isBlazor=function(){return!!t.isBlazor()},i.prototype.setValue=function(){if(this.valueTemplate)if("string"==typeof this.valueTemplate)this.setProperties({value:this.valueTemplate});else{for(var e=t.compile(this.valueTemplate)({}),n=0;n<e.length;n++){var i=e[n];t.append([i],this.element)}this.setProperties({value:this.element.innerHTML.trim()})}else{var o=!t.isNullOrUndefined(this.element.innerHTML)&&this.element.innerHTML.replace(/<(\/?|\!?)(!--!--)>/g,"").trim();""!==o&&("TEXTAREA"===this.element.tagName?this.setProperties({value:x(o)}):this.setProperties({value:o}))}},i.prototype.updateResizeFlag=function(){this.isResizeInitialized=!0},i.prototype.getInsertImgMaxWidth=function(){var e=this.insertImageSettings.maxWidth,n=this.contentModule.getEditPanel(),i=window.getComputedStyle(n),o=n.offsetWidth-(14+parseFloat(i.paddingLeft.split("px")[0])+parseFloat(i.paddingRight.split("px")[0])+parseFloat(i.marginLeft.split("px")[0])+parseFloat(i.marginRight.split("px")[0]));return t.isNullOrUndefined(e)?o:e},i.prototype.setContentHeight=function(n,i){var o,r,s=0,a="string"==typeof this.height&&this.height.indexOf("%")>-1,l=this.sourceCodeModule.getPanel()&&"block"===this.sourceCodeModule.getPanel().parentElement.style.display?this.sourceCodeModule.getPanel().parentElement:this.contentModule.getPanel(),d=this.element.offsetHeight;0!==d||"auto"===this.height||this.getToolbar()||(d=parseInt(this.height,10),a&&(r=this.height));var c=this.getToolbar()?this.toolbarModule.getToolbarHeight():0,p=this.element.querySelector(".e-resize-handle"),h=this.enableResize?t.isNullOrUndefined(p)?0:p.offsetHeight+8:0,u=this.getToolbar()?this.toolbarModule.getExpandTBarPopHeight():0;if(this.toolbarSettings.type===e.ToolbarType.Expand&&i&&"preview"!==n?(o="auto"===this.height&&0===h?"auto":d-(c+u+h)+"px",s=this.toolbarSettings.enableFloating?0:u):o="auto"!==this.height||this.element.classList.contains("e-rte-full-screen")||this.isResizeInitialized?a?r:d-(c+h)+"px":"auto","windowResize"!==n&&t.setStyleAttribute(l,{height:o,marginTop:s+"px"}),this.iframeSettings.enable&&"sourceCode"===n){var m=t.select(".e-rte-content",this.element);t.setStyleAttribute(m,{height:o,marginTop:s+"px"})}if(this.toolbarSettings.enableFloating&&this.getToolbar()&&!this.inlineMode.enable){var g=(i?c+u:c)+"px";t.setStyleAttribute(this.getToolbar().parentElement,{height:g})}0===h&&this.autoResize()},i.prototype.getHtml=function(){return this.serializeValue(this.contentModule.getEditPanel().innerHTML)},i.prototype.getXhtml=function(){var e=this.value;return!t.isNullOrUndefined(e)&&this.enableXhtml&&(e=this.htmlEditorModule.xhtmlValidation.selfEncloseValidation(e)),e},i.prototype.showSourceCode=function(){this.readonly||this.notify("sourceCode",{})},i.prototype.getCharCount=function(){return("Markdown"===this.editorMode?this.inputElement.value.trim():this.inputElement.textContent.trim()).length},i.prototype.getBaseToolbarObject=function(){return!this.inlineMode.enable||t.Browser.isDevice&&!u()?this.toolbarModule&&this.toolbarModule.getBaseToolbar():this.quickToolbarModule&&this.quickToolbarModule.getInlineBaseToolbar()},i.prototype.getToolbar=function(){return this.toolbarModule?this.toolbarModule.getToolbarElement():null},i.prototype.getToolbarElement=function(){return this.toolbarModule&&this.toolbarModule.getToolbarElement()},i.prototype.getID=function(){return"TEXTAREA"===this.originalElement.tagName?this.valueContainer.id:this.element.id},i.prototype.mouseDownHandler=function(e){var n=e.touches?e.changedTouches[0]:e;t.addClass([this.element],["e-focused"]),this.preventDefaultResize(e),this.notify(W,{args:e}),this.clickPoints={clientX:n.clientX,clientY:n.clientY}},i.prototype.preventImgResize=function(e){"img"===e.target.nodeName.toLocaleLowerCase()&&e.preventDefault()},i.prototype.preventDefaultResize=function(e){"msie"===t.Browser.info.name?this.contentModule.getEditPanel().addEventListener("mscontrolselect",this.preventImgResize):"mozilla"===t.Browser.info.name&&(this.contentModule.getDocument().execCommand("enableObjectResizing",!1,"false"),this.contentModule.getDocument().execCommand("enableInlineTableEditing",!1,"false"))},i.prototype.defaultResize=function(e){"msie"===t.Browser.info.name?this.contentModule.getEditPanel().removeEventListener("mscontrolselect",this.preventImgResize):"mozilla"===t.Browser.info.name&&(this.contentModule.getDocument().execCommand("enableObjectResizing",!0,"true"),this.contentModule.getDocument().execCommand("enableInlineTableEditing",!0,"true"))},i.prototype.resizeHandler=function(){var e=!1;if(!document.body.contains(this.element))return void document.defaultView.removeEventListener("resize",this.onResizeHandler,!0);this.toolbarSettings.enable&&!this.inlineMode.enable&&(this.toolbarModule.refreshToolbarOverflow(),e=this.toolbarModule.baseToolbar.toolbarObj.element.classList.contains("e-expand-open")),this.setContentHeight("windowResize",e),this.notify("resize",null)},i.prototype.scrollHandler=function(e){this.notify("scroll",{args:e})},i.prototype.contentScrollHandler=function(e){this.notify("contentscroll",{args:e})},i.prototype.focusHandler=function(e){if(!this.isRTE||this.isFocusOut){this.isRTE=!this.isFocusOut,this.isFocusOut=!1,t.addClass([this.element],["e-focused"]),"HTML"===this.editorMode?this.cloneValue="<p><br></p>"===this.inputElement.innerHTML?null:this.enableHtmlEncode?this.encode(x(this.inputElement.innerHTML)):this.inputElement.innerHTML:this.cloneValue=""===this.inputElement.value?null:this.inputElement.value;var n=document.activeElement;if((n===this.element||n===this.getToolbarElement()||n===this.contentModule.getEditPanel()||this.iframeSettings.enable&&n===this.contentModule.getPanel()&&e.target&&!e.target.classList.contains("e-img-inner")&&e.target&&e.target.parentElement&&!e.target.parentElement.classList.contains("e-img-wrap")||t.closest(n,".e-rte-toolbar")===this.getToolbarElement())&&(this.contentModule.getEditPanel().focus(),!t.isNullOrUndefined(this.getToolbarElement()))){this.getToolbarElement().setAttribute("tabindex","-1");for(var i=this.getToolbarElement().querySelectorAll('[tabindex="0"]'),o=0;o<i.length;o++)i[o].setAttribute("tabindex","-1")}this.preventDefaultResize(e),this.trigger("focus",{event:e,isInteracted:0!==Object.keys(e).length}),!t.isNullOrUndefined(this.saveInterval)&&this.saveInterval>0&&!this.autoSaveOnIdle&&(this.timeInterval=setInterval(this.updateValueOnIdle.bind(this),this.saveInterval)),t.EventHandler.add(document,"mousedown",this.onDocumentClick,this)}if(!t.isNullOrUndefined(this.getToolbarElement()))for(var r=this.getToolbarElement().querySelectorAll("input,select,button,a,[tabindex]"),o=0;o<r.length;o++)r[o].classList.contains("e-rte-dropdown-btn")||r[o].classList.contains("e-insert-table-btn")||r[o].hasAttribute("tabindex")&&"-1"===r[o].getAttribute("tabindex")||r[o].setAttribute("tabindex","-1")},i.prototype.getUpdatedValue=function(){var e;t.isNullOrUndefined(this.tableModule)||this.tableModule.removeResizeElement();var n=this.element.querySelector(".e-rte-srctextarea");return"HTML"===this.editorMode?(e="<p><br></p>"===this.inputElement.innerHTML?null:this.enableHtmlEncode?this.encode(x(this.inputElement.innerHTML)):this.inputElement.innerHTML,n&&"block"===n.style.display&&(e=n.value)):e=""===this.inputElement.value?null:this.inputElement.value,e},i.prototype.updateValueOnIdle=function(){(t.isNullOrUndefined(this.tableModule)||t.isNullOrUndefined(this.inputElement.querySelector(".e-table-box.e-rbox-select")))&&(this.setProperties({value:this.getUpdatedValue()},!0),this.valueContainer.value=this.value,this.invokeChangeEvent())},i.prototype.updateIntervalValue=function(){clearTimeout(this.idleInterval),this.idleInterval=setTimeout(this.updateValueOnIdle.bind(this),0)},i.prototype.updateStatus=function(e){if(!t.isNullOrUndefined(e.html)||!t.isNullOrUndefined(e.markdown)){var n=this.formatter.editorManager.undoRedoManager.getUndoStatus(),i={undo:n.undo,redo:n.redo,html:e.html,markdown:e.markdown};this.trigger("updatedToolbarStatus",i)}},i.prototype.onDocumentClick=function(e){var n=e.target,i=t.closest(n,"."+Y);this.element.contains(e.target)||document===e.target||i===this.element||t.closest(n,'[aria-owns="'+this.getID()+'"]')||(this.isBlur=!0,this.isRTE=!1),this.notify("docClick",{args:e}),e.detail>3&&e.preventDefault()},i.prototype.blurHandler=function(e){var n=e.relatedTarget;if(n){var i=t.closest(n,"."+Y);i&&i===this.element?(this.isBlur=!1,n===this.getToolbarElement()&&n.setAttribute("tabindex","-1")):t.closest(n,'[aria-owns="'+this.getID()+'"]')?this.isBlur=!1:(this.isBlur=!0,n=null)}if(this.isBlur&&t.isNullOrUndefined(n)){t.removeClass([this.element],["e-focused"]),this.notify("focusChange",{});var o=this.getUpdatedValue();this.setProperties({value:o}),this.notify("toolbar-refresh",{args:e,documentNode:document}),this.invokeChangeEvent(),this.isFocusOut=!0,this.isBlur=!1,S(this.valueContainer,"focusout"),this.defaultResize(e),this.trigger("blur",{event:e,isInteracted:0!==Object.keys(e).length}),t.isNullOrUndefined(this.timeInterval)||(clearInterval(this.timeInterval),this.timeInterval=null),t.EventHandler.remove(document,"mousedown",this.onDocumentClick)}else this.isRTE=!0},i.prototype.contentChanged=function(){this.autoSaveOnIdle&&(t.isNullOrUndefined(this.saveInterval)||(clearTimeout(this.timeInterval),this.timeInterval=setTimeout(this.updateIntervalValue.bind(this),this.saveInterval)))},i.prototype.invokeChangeEvent=function(){var e,t={value:e=this.enableXhtml?this.getXhtml():this.value};this.value!==this.cloneValue&&(this.trigger("change",t),this.cloneValue=this.value)},i.prototype.wireScrollElementsEvents=function(){this.scrollParentElements=o.getScrollableParent(this.element);for(var e=0,n=this.scrollParentElements;e<n.length;e++){var i=n[e];t.EventHandler.add(i,"scroll",this.scrollHandler,this)}this.iframeSettings.enable||t.EventHandler.add(this.contentModule.getPanel(),"scroll",this.contentScrollHandler,this)},i.prototype.wireContextEvent=function(){this.quickToolbarSettings.showOnRightClick&&(t.EventHandler.add(this.inputElement,"contextmenu",this.contextHandler,this),t.Browser.isDevice&&(this.touchModule=new t.Touch(this.inputElement,{tapHold:this.touchHandler.bind(this),tapHoldThreshold:500})))},i.prototype.unWireContextEvent=function(){t.EventHandler.remove(this.inputElement,"contextmenu",this.contextHandler),t.Browser.isDevice&&this.touchModule&&this.touchModule.destroy()},i.prototype.unWireScrollElementsEvents=function(){this.scrollParentElements=o.getScrollableParent(this.element);for(var e=0,n=this.scrollParentElements;e<n.length;e++){var i=n[e];t.EventHandler.remove(i,"scroll",this.scrollHandler)}this.iframeSettings.enable||t.EventHandler.remove(this.contentModule.getPanel(),"scroll",this.contentScrollHandler)},i.prototype.touchHandler=function(e){this.notifyMouseUp(e.originalEvent),this.triggerEditArea(e.originalEvent)},i.prototype.contextHandler=function(e){var n=t.closest(e.target,"a, table, img");!1!==this.inlineMode.onSelection&&(t.isNullOrUndefined(n)||!this.inputElement.contains(n)||"IMG"!==n.tagName&&"TABLE"!==n.tagName&&"A"!==n.tagName)||e.preventDefault()},i.prototype.resetHandler=function(){var e=this.valueContainer.defaultValue.trim();this.setProperties({value:""===e?null:this.isBlazor()?this.defaultResetValue:e})},i.prototype.autoResize=function(){var e=this;if("auto"===this.height){if("Markdown"===this.editorMode)setTimeout(function(){e.setAutoHeight(e.inputElement)},0);else if(this.iframeSettings.enable){var t=this.element.querySelector("#"+this.getID()+"_rte-view");setTimeout(function(){e.setAutoHeight(t)},100),this.inputElement.style.overflow="hidden"}}else this.inputElement.style.overflow=null},i.prototype.setAutoHeight=function(e){t.isNullOrUndefined(e)||(e.style.height="",e.style.height=this.inputElement.scrollHeight+"px",e.style.overflow="hidden")},i.prototype.wireEvents=function(){this.element.addEventListener("focusin",this.onFocusHandler,!0),this.element.addEventListener("focusout",this.onBlurHandler,!0),this.on("content-changed",this.contentChanged,this),this.on("resizeInitialized",this.updateResizeFlag,this),this.on("updateTbItemsStatus",this.updateStatus,this),this.readonly&&this.enabled||this.bindEvents()},i.prototype.restrict=function(e){if(this.maxLength>=0){for(var t="Markdown"===this.editorMode?this.contentModule.getText():e.currentTarget.textContent.trim(),n=[8,16,17,37,38,39,40,46,65],i=void 0,o=0;o<=n.length-1;o++)if(e.which===n[o]){if(e.ctrlKey&&65===e.which)return;if(65!==e.which)return void(i=n[o])}t.length>=this.maxLength&&-1!==this.maxLength&&e.which!==i&&e.preventDefault()}},i.prototype.bindEvents=function(){this.keyboardModule=new Je(this.inputElement,{keyAction:this.keyDown.bind(this),keyConfigs:Yn({},this.formatter.keyConfig,this.keyConfig),eventName:"keydown"});var e=t.closest(this.valueContainer,"form");e&&t.EventHandler.add(e,"reset",this.resetHandler,this),t.EventHandler.add(this.inputElement,"keyup",this.keyUp,this),t.EventHandler.add(this.inputElement,"paste",this.onPaste,this),t.EventHandler.add(this.inputElement,t.Browser.touchEndEvent,t.debounce(this.mouseUp,30),this),t.EventHandler.add(this.inputElement,t.Browser.touchStartEvent,this.mouseDownHandler,this),this.wireContextEvent(),this.formatter.editorManager.observer.on("keydown-handler",this.editorKeyDown,this),this.element.ownerDocument.defaultView.addEventListener("resize",this.onResizeHandler,!0),this.iframeSettings.enable&&(t.EventHandler.add(this.inputElement,"focusin",this.focusHandler,this),t.EventHandler.add(this.inputElement,"focusout",this.blurHandler,this),t.EventHandler.add(this.inputElement.ownerDocument,"scroll",this.contentScrollHandler,this),t.EventHandler.add(this.inputElement.ownerDocument,t.Browser.touchStartEvent,this.onIframeMouseDown,this)),this.wireScrollElementsEvents()},i.prototype.onIframeMouseDown=function(e){this.isBlur=!1,this.notify("iframe-click",e)},i.prototype.editorKeyDown=function(e){switch(e.event.action){case"copy":this.onCopy();break;case"cut":this.onCut()}!e.callBack||"copy"!==e.event.action&&"cut"!==e.event.action&&"delete"!==e.event.action||e.callBack({requestType:e.event.action,editorMode:"HTML",event:e.event})},i.prototype.unWireEvents=function(){this.element.removeEventListener("focusin",this.onFocusHandler,!0),this.element.removeEventListener("focusout",this.onBlurHandler,!0),this.off("content-changed",this.contentChanged),this.off("resizeInitialized",this.updateResizeFlag),this.off("updateTbItemsStatus",this.updateStatus),this.readonly&&this.enabled||this.unbindEvents()},i.prototype.unbindEvents=function(){this.keyboardModule&&this.keyboardModule.destroy();var e=t.closest(this.valueContainer,"form");e&&t.EventHandler.remove(e,"reset",this.resetHandler),t.EventHandler.remove(this.inputElement,"keyup",this.keyUp),t.EventHandler.remove(this.inputElement,"paste",this.onPaste),t.EventHandler.remove(this.inputElement,t.Browser.touchEndEvent,t.debounce(this.mouseUp,30)),t.EventHandler.remove(this.inputElement,t.Browser.touchStartEvent,this.mouseDownHandler),this.unWireContextEvent(),this.formatter&&this.formatter.editorManager.observer.off("keydown-handler",this.editorKeyDown),this.element.ownerDocument.defaultView.removeEventListener("resize",this.onResizeHandler,!0),this.iframeSettings.enable&&(t.EventHandler.remove(this.inputElement,"focusin",this.focusHandler),t.EventHandler.remove(this.inputElement,"focusout",this.blurHandler),t.EventHandler.remove(this.inputElement.ownerDocument,"scroll",this.contentScrollHandler),t.EventHandler.remove(this.inputElement.ownerDocument,t.Browser.touchStartEvent,this.onIframeMouseDown)),this.unWireScrollElementsEvents()},Jn([t.Complex({},On)],i.prototype,"toolbarSettings",void 0),Jn([t.Complex({},In)],i.prototype,"quickToolbarSettings",void 0),Jn([t.Complex({},Bn)],i.prototype,"pasteCleanupSettings",void 0),Jn([t.Complex({},Vn)],i.prototype,"iframeSettings",void 0),Jn([t.Complex({},Dn)],i.prototype,"insertImageSettings",void 0),Jn([t.Complex({},Rn)],i.prototype,"tableSettings",void 0),Jn([t.Property(0)],i.prototype,"floatingToolbarOffset",void 0),Jn([t.Complex({},Kn)],i.prototype,"inlineMode",void 0),Jn([t.Complex({},Mn)],i.prototype,"fileManagerSettings",void 0),Jn([t.Property("100%")],i.prototype,"width",void 0),Jn([t.Property(!1)],i.prototype,"enablePersistence",void 0),Jn([t.Property(!1)],i.prototype,"enableResize",void 0),Jn([t.Property({})],i.prototype,"htmlAttributes",void 0),Jn([t.Property(null)],i.prototype,"placeholder",void 0),Jn([t.Property(!1)],i.prototype,"autoSaveOnIdle",void 0),Jn([t.Property(!1)],i.prototype,"readonly",void 0),Jn([t.Property(!0)],i.prototype,"enabled",void 0),Jn([t.Property(!0)],i.prototype,"enableHtmlSanitizer",void 0),Jn([t.Property(!1)],i.prototype,"enableHtmlEncode",void 0),Jn([t.Property(!1)],i.prototype,"enableXhtml",void 0),Jn([t.Property("auto")],i.prototype,"height",void 0),Jn([t.Property(null)],i.prototype,"cssClass",void 0),Jn([t.Property(null)],i.prototype,"value",void 0),Jn([t.Property(30)],i.prototype,"undoRedoSteps",void 0),Jn([t.Property(300)],i.prototype,"undoRedoTimer",void 0),Jn([t.Property("HTML")],i.prototype,"editorMode",void 0),Jn([t.Property(null)],i.prototype,"keyConfig",void 0),Jn([t.Property(!1)],i.prototype,"showCharCount",void 0),Jn([t.Property(!1)],i.prototype,"enableTabKey",void 0),Jn([t.Property(!1)],i.prototype,"enableAutoUrl",void 0),Jn([t.Property(-1)],i.prototype,"maxLength",void 0),Jn([t.Complex({},Hn)],i.prototype,"format",void 0),Jn([t.Complex({},Fn)],i.prototype,"numberFormatList",void 0),Jn([t.Complex({},zn)],i.prototype,"bulletFormatList",void 0),Jn([t.Complex({},Pn)],i.prototype,"fontFamily",void 0),Jn([t.Complex({},An)],i.prototype,"fontSize",void 0),Jn([t.Complex({},Un)],i.prototype,"fontColor",void 0),Jn([t.Complex({},jn)],i.prototype,"backgroundColor",void 0),Jn([t.Property(null)],i.prototype,"valueTemplate",void 0),Jn([t.Property(1e4)],i.prototype,"saveInterval",void 0),Jn([t.Event()],i.prototype,"actionBegin",void 0),Jn([t.Event()],i.prototype,"actionComplete",void 0),Jn([t.Event()],i.prototype,"beforeDialogOpen",void 0),Jn([t.Event()],i.prototype,"dialogOpen",void 0),Jn([t.Event()],i.prototype,"beforeDialogClose",void 0),Jn([t.Event()],i.prototype,"dialogClose",void 0),Jn([t.Event()],i.prototype,"beforeQuickToolbarOpen",void 0),Jn([t.Event()],i.prototype,"quickToolbarOpen",void 0),Jn([t.Event()],i.prototype,"quickToolbarClose",void 0),Jn([t.Event()],i.prototype,"toolbarStatusUpdate",void 0),Jn([t.Event()],i.prototype,"updatedToolbarStatus",void 0),Jn([t.Event()],i.prototype,"imageSelected",void 0),Jn([t.Event()],i.prototype,"beforeImageUpload",void 0),Jn([t.Event()],i.prototype,"imageUploading",void 0),Jn([t.Event()],i.prototype,"imageUploadSuccess",void 0),Jn([t.Event()],i.prototype,"imageUploadFailed",void 0),Jn([t.Event()],i.prototype,"imageRemoving",void 0),Jn([t.Event()],i.prototype,"afterImageDelete",void 0),Jn([t.Event()],i.prototype,"created",void 0),Jn([t.Event()],i.prototype,"destroyed",void 0),Jn([t.Event()],i.prototype,"beforeSanitizeHtml",void 0),Jn([t.Event()],i.prototype,"blur",void 0),Jn([t.Event()],i.prototype,"toolbarClick",void 0),Jn([t.Event()],i.prototype,"focus",void 0),Jn([t.Event()],i.prototype,"change",void 0),Jn([t.Event()],i.prototype,"resizing",void 0),Jn([t.Event()],i.prototype,"resizeStart",void 0),Jn([t.Event()],i.prototype,"resizeStop",void 0),Jn([t.Event()],i.prototype,"beforePasteCleanup",void 0),Jn([t.Event()],i.prototype,"afterPasteCleanup",void 0),Jn([t.Event()],i.prototype,"beforeImageDrop",void 0),Jn([t.Property(null)],i.prototype,"formatter",void 0),i=Jn([t.NotifyPropertyChanges],i)}(t.Component);return $n.Inject(Ge,Sn,Tn,nt,tt,gn,Lt,Nn,fn,bn,vn),e.Toolbar=Ge,e.KeyboardEvents=Je,e.BaseToolbar=_e,e.BaseQuickToolbar=Ze,e.QuickToolbar=tt,e.Count=nt,e.ColorPickerInput=$e,e.MarkdownToolbarStatus=rt,e.ExecCommandCallBack=st,e.ToolbarAction=We,e.MarkdownEditor=Lt,e.HtmlEditor=gn,e.PasteCleanup=fn,e.Resize=bn,e.DropDownButtons=qe,e.FileManager=vn,e.FullScreen=yn,e.setAttributes=j,e.HtmlToolbarStatus=cn,e.XhtmlValidation=mn,e.HTMLFormatter=an,e.Formatter=at,e.MarkdownFormatter=wt,e.ContentRender=pn,e.Render=Cn,e.ToolbarRenderer=ze,e.Link=Sn,e.Image=Tn,e.ViewSource=En,e.Table=Nn,e.DialogRenderer=wn,e.IframeContentRender=un,e.MarkdownRender=kt,e.PopupRenderer=et,e.RichTextEditor=$n,e.executeGroup=kn,e.created="create",e.destroyed="destroy",e.load="load",e.initialLoad="initial-load",e.contentChanged="content-changed",e.initialEnd=F,e.iframeMouseDown="iframe-click",e.destroy=z,e.toolbarClick="toolbarClick",e.toolbarRefresh="toolbar-refresh",e.refreshBegin="refresh-begin",e.toolbarUpdated="toolbar-updated",e.bindOnEnd="bind-on-end",e.renderColorPicker="render-color-picker",e.htmlToolbarClick="html-toolbar-click",e.markdownToolbarClick="markdown-toolbar-click",e.destroyColorPicker="destroy-color-picker",e.modelChanged=_,e.keyUp=q,e.keyDown=Q,e.mouseUp="mouseUp",e.toolbarCreated="toolbarCreated",e.toolbarRenderComplete="toolbarRenderComplete",e.enableFullScreen="enableFullScreen",e.disableFullScreen="disableFullScreen",e.dropDownSelect="dropDownSelect",e.beforeDropDownItemRender="beforeDropDownItemRender",e.execCommandCallBack="execCommandCallBack",e.imageToolbarAction="image-toolbar-action",e.linkToolbarAction="link-toolbar-action",e.windowResize="resize",e.resizeStart="resizeStart",e.onResize="resizing",e.resizeStop="resizeStop",e.undo="undo",e.redo="redo",e.insertLink="insertLink",e.unLink="unLink",e.editLink="editLink",e.openLink="openLink",e.actionBegin="actionBegin",e.actionComplete="actionComplete",e.updatedToolbarStatus="updatedToolbarStatus",e.actionSuccess="actionSuccess",e.updateToolbarItem="updateToolbarItem",e.insertImage="insertImage",e.insertCompleted="insertCompleted",e.imageLeft="justifyLeft",e.imageRight="justifyRight",e.imageCenter="justifyCenter",e.imageBreak="break",e.imageInline="inline",e.imageLink="insertImgLink",e.imageAlt="imgAltText",e.imageDelete="delete",e.imageCaption="caption",e.imageSize="imageSize",e.sourceCode="sourceCode",e.updateSource="updateSource",e.toolbarOpen="toolbarOpen",e.beforeDropDownOpen="beforeDropDownOpen",e.selectionSave=V,e.selectionRestore="selection-restore",e.expandPopupClick="expandPopupClick",e.count="count",e.contentFocus="contentFocus",e.contentBlur="contentBlur",e.mouseDown=W,e.sourceCodeMouseDown="sourceCodeMouseDown",e.editAreaClick="editAreaClick",e.scroll="scroll",e.contentscroll="contentscroll",e.colorPickerChanged="colorPickerChanged",e.tableColorPickerChanged="tableColorPickerChanged",e.focusChange="focusChange",e.selectAll="selectAll",e.selectRange="selectRange",e.getSelectedHtml="getSelectedHtml",e.renderInlineToolbar="renderInlineToolbar",e.paste=G,e.imgModule="imageModule",e.rtlMode=K,e.createTable="createTable",e.docClick="docClick",e.tableToolbarAction="table-toolbar-action",e.checkUndo=X,e.readOnlyMode="readOnlyMode",e.pasteClean="pasteClean",e.beforeDialogOpen="beforeDialogOpen",e.clearDialogObj="clearDialogObj",e.dialogOpen="dialogOpen",e.beforeDialogClose="beforeDialogClose",e.dialogClose="dialogClose",e.beforeQuickToolbarOpen="beforeQuickToolbarOpen",e.quickToolbarOpen="quickToolbarOpen",e.quickToolbarClose="quickToolbarClose",e.popupHide="popupHide",e.imageSelected="imageSelected",e.imageUploading="imageUploading",e.imageUploadSuccess="imageUploadSuccess",e.imageUploadFailed="imageUploadFailed",e.imageRemoving="imageRemoving",e.afterImageDelete="afterImageDelete",e.drop="drop",e.xhtmlValidation="xhtmlValidation",e.beforeImageUpload="beforeImageUpload",e.resizeInitialized="resizeInitialized",e.renderFileManager="renderFileManager",e.beforeImageDrop="beforeImageDrop",e.dynamicModule="dynamicModule",e.beforePasteCleanup="beforePasteCleanup",e.afterPasteCleanup="afterPasteCleanup",e.updateTbItemsStatus="updateTbItemsStatus",e.CLS_RTE=Y,e.CLS_RTL="e-rtl",e.CLS_CONTENT="e-content",e.CLS_DISABLED="e-disabled",e.CLS_SCRIPT_SHEET="rte-iframe-script-sheet",e.CLS_STYLE_SHEET="rte-iframe-style-sheet",e.CLS_TOOLBAR="e-rte-toolbar",e.CLS_TB_FIXED="e-rte-tb-fixed",e.CLS_TB_FLOAT="e-rte-tb-float",e.CLS_TB_ABS_FLOAT="e-rte-tb-abs-float",e.CLS_INLINE="e-rte-inline",e.CLS_TB_INLINE="e-rte-tb-inline",e.CLS_RTE_EXPAND_TB="e-rte-tb-expand",e.CLS_FULL_SCREEN="e-rte-full-screen",e.CLS_QUICK_TB=J,e.CLS_POP="e-rte-pop",e.CLS_TB_STATIC="e-tb-static",e.CLS_QUICK_POP="e-rte-quick-popup",e.CLS_QUICK_DROPDOWN="e-quick-dropdown",e.CLS_IMAGE_POP="e-rte-image-popup",e.CLS_INLINE_POP="e-rte-inline-popup",e.CLS_INLINE_DROPDOWN="e-rte-inline-dropdown",e.CLS_DROPDOWN_POPUP=$,e.CLS_DROPDOWN_ICONS="e-rte-dropdown-icons",e.CLS_DROPDOWN_ITEMS=Z,e.CLS_DROPDOWN_BTN=ee,e.CLS_RTE_CONTENT="e-rte-content",e.CLS_TB_ITEM=te,e.CLS_TB_EXTENDED="e-toolbar-extended",e.CLS_TB_WRAP="e-toolbar-wrapper",e.CLS_POPUP="e-popup",e.CLS_SEPARATOR="e-separator",e.CLS_MINIMIZE="e-minimize",e.CLS_MAXIMIZE="e-maximize",e.CLS_BACK="e-back",e.CLS_SHOW="e-show",e.CLS_HIDE="e-hide",e.CLS_VISIBLE="e-visible",e.CLS_FOCUS="e-focused",e.CLS_RM_WHITE_SPACE="e-remove-white-space",e.CLS_IMGRIGHT="e-imgright",e.CLS_IMGLEFT="e-imgleft",e.CLS_IMGCENTER="e-imgcenter",e.CLS_IMGBREAK=ne,e.CLS_CAPTION="e-img-caption",e.CLS_RTE_CAPTION="e-rte-img-caption",e.CLS_CAPINLINE="e-caption-inline",e.CLS_IMGINLINE=ie,e.CLS_COUNT=oe,e.CLS_WARNING="e-warning",e.CLS_ERROR="e-error",e.CLS_ICONS="e-icons",e.CLS_ACTIVE=re,e.CLS_EXPAND_OPEN="e-expand-open",e.CLS_RTE_ELEMENTS="e-rte-elements",e.CLS_TB_BTN="e-tbar-btn",e.CLS_HR_SEPARATOR="e-rte-horizontal-separator",e.CLS_TB_IOS_FIX="e-tbar-ios-fixed",e.CLS_LIST_PRIMARY_CONTENT="e-rte-list-primary-content",e.CLS_NUMBERFORMATLIST_TB_BTN="e-rte-numberformatlist-dropdown",e.CLS_BULLETFORMATLIST_TB_BTN="e-rte-bulletformatlist-dropdown",e.CLS_FORMATS_TB_BTN="e-formats-tbar-btn",e.CLS_FONT_NAME_TB_BTN="e-font-name-tbar-btn",e.CLS_FONT_SIZE_TB_BTN="e-font-size-tbar-btn",e.CLS_FONT_COLOR_TARGET="e-rte-fontcolor-element",e.CLS_BACKGROUND_COLOR_TARGET="e-rte-backgroundcolor-element",e.CLS_COLOR_CONTENT="e-rte-color-content",e.CLS_FONT_COLOR_DROPDOWN="e-rte-fontcolor-dropdown",e.CLS_BACKGROUND_COLOR_DROPDOWN="e-rte-backgroundcolor-dropdown",e.CLS_COLOR_PALETTE="e-rte-square-palette",e.CLS_FONT_COLOR_PICKER="e-rte-fontcolor-colorpicker",e.CLS_BACKGROUND_COLOR_PICKER="e-rte-backgroundcolor-colorpicker",e.CLS_RTE_READONLY="e-rte-readonly",e.CLS_TABLE_SEL="e-cell-select",e.CLS_TB_DASH_BOR="e-dashed-border",e.CLS_TB_ALT_BOR=se,e.CLS_TB_COL_RES="e-column-resize",e.CLS_TB_ROW_RES="e-row-resize",e.CLS_TB_BOX_RES="e-table-box",e.CLS_RTE_HIDDEN="e-rte-hidden",e.CLS_RTE_PASTE_KEEP_FORMAT="e-rte-keepformat",e.CLS_RTE_PASTE_REMOVE_FORMAT="e-rte-removeformat",e.CLS_RTE_PASTE_PLAIN_FORMAT="e-rte-plainformat",e.CLS_RTE_PASTE_OK="e-rte-pasteok",e.CLS_RTE_PASTE_CANCEL="e-rte-pastecancel",e.CLS_RTE_DIALOG_MIN_HEIGHT="e-rte-dialog-minheight",e.CLS_RTE_RES_HANDLE="e-resize-handle",e.CLS_RTE_RES_EAST="e-south-east",e.CLS_RTE_IMAGE=ae,e.CLS_RESIZE="e-resize",e.CLS_IMG_FOCUS="e-img-focus",e.CLS_RTE_DRAG_IMAGE="e-rte-drag-image",e.CLS_RTE_UPLOAD_POPUP="e-rte-upload-popup",e.CLS_POPUP_OPEN="e-popup-open",e.CLS_IMG_RESIZE="e-img-resize",e.CLS_DROPAREA="e-droparea",e.CLS_IMG_INNER="e-img-inner",e.CLS_UPLOAD_FILES="e-upload-files",e.CLS_RTE_DIALOG_UPLOAD="e-rte-dialog-upload",e.CLS_RTE_RES_CNT="e-rte-resize",e.CLS_CUSTOM_TILE="e-custom-tile",e.CLS_NOCOLOR_ITEM="e-nocolor-item",e.CLS_TABLE=le,e.CLS_TABLE_BORDER="e-rte-table-border",e.CLS_RTE_TABLE_RESIZE="e-rte-table-resize",e.CLS_RTE_FIXED_TB_EXPAND="e-rte-fixed-tb-expand",e.CLS_RTE_TB_ENABLED="e-rte-toolbar-enabled",e.getIndex=c,e.hasClass=p,e.getDropDownValue=h,e.isIDevice=u,e.getFormattedFontSize=m,e.pageYOffset=g,e.getTooltipText=f,e.setToolbarStatus=b,e.getCollection=v,e.getTBarItemsIndex=y,e.updateUndoRedoStatus=C,e.dispatchEvent=S,e.parseHtml=T,e.getTextNodesUnder=E,e.toObjectLowerCase=N,e.getEditValue=w,e.updateTextNode=k,e.isEditableValueEmpty=L,e.decode=x,e.sanitizeHelper=O,e.convertToBlob=D,e.getLocaleFontFormat=M,e.updateDropDownFontFormatLocale=R,e.ServiceLocator=Qe,e.RendererFactory=Ve,e.EditorManager=rn,e.IMAGE=xt,e.TABLE=Ot,e.LINK=Dt,e.INSERT_ROW="INSERT-ROW",e.INSERT_COLUMN="INSERT-COLUMN",e.DELETEROW="DELETE-ROW",e.DELETECOLUMN="DELETE-COLUMN",e.REMOVETABLE="REMOVE-TABLE",e.TABLEHEADER="TABLE-HEADER",e.TABLE_VERTICAL_ALIGN="TABLE_VERTICAL_ALIGN",e.TABLE_MERGE="TABLE_MERGE",e.TABLE_VERTICAL_SPLIT="TABLE_VERTICAL_SPLIT",e.TABLE_HORIZONTAL_SPLIT="TABLE_HORIZONTAL_SPLIT",e.TABLE_MOVE="TABLE_MOVE",e.ALIGNMENT_TYPE="alignment-type",e.INDENT_TYPE="indent-type",e.DEFAULT_TAG="p",e.BLOCK_TAGS=Mt,e.IGNORE_BLOCK_TAGS=Rt,e.TABLE_BLOCK_TAGS=It,e.SELECTION_TYPE="selection-type",e.INSERTHTML_TYPE="inserthtml-type",e.INSERT_TEXT_TYPE="insert-text-type",e.CLEAR_TYPE="clear-type",e.CLASS_IMAGE_RIGHT="e-imgright",e.CLASS_IMAGE_LEFT="e-imgleft",e.CLASS_IMAGE_CENTER="e-imgcenter",e.CLASS_IMAGE_BREAK="e-imgbreak",e.CLASS_CAPTION=Vt,e.CLASS_RTE_CAPTION="e-rte-img-caption",e.CLASS_CAPTION_INLINE="e-caption-inline",e.CLASS_IMAGE_INLINE="e-imginline",e.Lists=Ht,e.markerClassName=Pt,e.DOMNode=At,e.Alignments=qt,e.Indents=Qt,e.Formats=Ft,e.LinkCommand=_t,e.InsertMethods=Ut,e.InsertTextExec=on,e.InsertHtmlExec=$t,e.InsertHtml=zt,e.IsFormatted=Xt,e.MsWordPaste=nn,e.NodeCutter=jt,e.ImageCommand=Wt,e.SelectionCommands=Yt,e.SelectionBasedExec=Jt,e.ClearFormatExec=en,e.UndoRedoManager=tn,e.TableCommand=Gt,e.statusCollection=ln,e.ToolbarStatus=dn,e.NodeSelection=Bt,e.MarkdownParser=Et,e.LISTS_COMMAND="lists-commands",e.selectionCommand="command-type",e.LINK_COMMAND="link-commands",e.CLEAR_COMMAND="clear-commands",e.MD_TABLE="insert-table",e.ClearFormat=Tt,e.MDLists=lt,e.MDFormats=dt,e.MarkdownSelection=it,e.UndoRedoCommands=yt,e.MDSelectionFormats=ct,e.MDLink=Ct,e.MDTable=St,e.markdownFormatTags=pt,e.markdownSelectionTags=ht,e.markdownListsTags=ut,e.htmlKeyConfig=mt,e.markdownKeyConfig=gt,e.pasteCleanupGroupingTags=ft,e.listConversionFilters=bt,e.selfClosingTags=vt,e.KEY_DOWN="keydown",e.ACTION="action",e.FORMAT_TYPE="format-type",e.KEY_DOWN_HANDLER="keydown-handler",e.LIST_TYPE="list-type",e.KEY_UP_HANDLER="keyup-handler",e.KEY_UP="keyup",e.MODEL_CHANGED_PLUGIN="model_changed_plugin",e.MODEL_CHANGED="model_changed",e.MS_WORD_CLEANUP_PLUGIN="ms_word_cleanup_plugin",e.MS_WORD_CLEANUP="ms_word_cleanup",e}({},ej.base,ej.navigations,ej.splitbuttons,ej.popups,ej.inputs,ej.buttons,ej.filemanager),this.ejs=ej;
|