PageSourceSearch

https://st-gedeon.qc.ca/1616.a278c486c88a88af.js

js st-gedeon.qc.ca collected 2026-09-25 00:59:10 UTC 1,916,338 bytes, 1 lines download raw bytes

1(self.webpackChunkpc=self.webpackChunkpc||[]).push([[1616],{88875:(ns,Di,H)=>{"use strict";H.d(Di,{G:()=>ce});class re{constructor(x,J,ft,Zt,hn){this.id=J,this.name=ft,this.disableScroll=hn,this.priority=1e6*Zt+J,this.ctrl=x}canStart(){return!!this.ctrl&&this.ctrl.canStart(this.name)}start(){return!!this.ctrl&&this.ctrl.start(this.name,this.id,this.priority)}capture(){if(!this.ctrl)return!1;const x=this.ctrl.capture(this.name,this.id,this.priority);return x&&this.disableScroll&&this.ctrl.disableScroll(this.id),x}release(){this.ctrl&&(this.ctrl.release(this.id),this.disableScroll&&this.ctrl.enableScroll(this.id))}destroy(){this.release(),this.ctrl=void 0}}class s{constructor(x,J,ft,Zt){this.id=J,this.disable=ft,this.disableScroll=Zt,this.ctrl=x}block(){if(this.ctrl){if(this.disable)for(const x of this.disable)this.ctrl.disableGesture(x,this.id);this.disableScroll&&this.ctrl.disableScroll(this.id)}}unblock(){if(this.ctrl){if(this.disable)for(const x of this.disable)this.ctrl.enableGesture(x,this.id);this.disableScroll&&this.ctrl.enableScroll(this.id)}}destroy(){this.unblock(),this.ctrl=void 0}}const ae="backdrop-no-scroll",ce=new class c{constructor(){this.gestureId=0,this.requestedStart=new Map,this.disabledGestures=new Map,this.disabledScroll=new Set}createGesture(x){var J;return new re(this,this.newID(),x.name,null!==(J=x.priority)&&void 0!==J?J:0,!!x.disableScroll)}createBlocker(x={}){return new s(this,this.newID(),x.disable,!!x.disableScroll)}start(x,J,ft){return this.canStart(x)?(this.requestedStart.set(J,ft),!0):(this.requestedStart.delete(J),!1)}capture(x,J,ft){if(!this.start(x,J,ft))return!1;const Zt=this.requestedStart;let hn=-1e4;if(Zt.forEach(Ae=>{hn=Math.max(hn,Ae)}),hn===ft){this.capturedId=J,Zt.clear();const Ae=new CustomEvent("ionGestureCaptured",{detail:{gestureName:x}});return document.dispatchEvent(Ae),!0}return Zt.delete(J),!1}release(x){this.requestedStart.delete(x),this.capturedId===x&&(this.capturedId=void 0)}disableGesture(x,J){let ft=this.disabledGestures.get(x);void 0===ft&&(ft=new Set,this.disabledGestures.set(x,ft)),ft.add(J)}enableGesture(x,J){const ft=this.disabledGestures.get(x);void 0!==ft&&ft.delete(J)}disableScroll(x){this.disabledScroll.add(x),1===this.disabledScroll.size&&document.body.classList.add(ae)}enableScroll(x){this.disabledScroll.delete(x),0===this.disabledScroll.size&&document.body.classList.remove(ae)}canStart(x){return!(void 0!==this.capturedId||this.isDisabled(x))}isCaptured(){return void 0!==this.capturedId}isScrollDisabled(){return this.disabledScroll.size>0}isDisabled(x){const J=this.disabledGestures.get(x);return!!(J&&J.size>0)}newID(){return this.gestureId++,this.gestureId}}},2104:(ns,Di,H)=>{"use strict";H.r(Di),H.d(Di,{GESTURE_CONTROLLER:()=>c.G,createGesture:()=>ft});var c=H(88875);const re=(ne,Me,Pt,at)=>{const lt=s(ne)?{capture:!!at.capture,passive:!!at.passive}:!!at.capture;let je,mt;return ne.__zone_symbol__addEventListener?(je="__zone_symbol__addEventListener",mt="__zone_symbol__removeEventListener"):(je="addEventListener",mt="removeEventListener"),ne[je](Me,Pt,lt),()=>{ne[mt](Me,Pt,lt)}},s=ne=>{if(void 0===ae)try{const Me=Object.defineProperty({},"passive",{get:()=>{ae=!0}});ne.addEventListener("optsTest",()=>{},Me)}catch{ae=!1}return!!ae};let ae;const x=ne=>ne instanceof Document?ne:ne.ownerDocument,ft=ne=>{let Me=!1,Pt=!1,at=!0,lt=!1;const je=Object.assign({disableScroll:!1,direction:"x",gesturePriority:0,passive:!0,maxAngle:40,threshold:10},ne),mt=je.canStart,Ft=je.onWillStart,R=je.onStart,N=je.onEnd,X=je.notCaptured,U=je.onMove,Y=je.threshold,z=je.passive,F=je.blurOnStart,B={type:"pan",startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,event:void 0,data:void 0},j=((ne,Me,Pt)=>{const at=Pt*(Math.PI/180),lt="x"===ne,je=Math.cos(at),mt=Me*Me;let Ft=0,R=0,N=!1,X=0;return{start(U,Y){Ft=U,R=Y,X=0,N=!0},detect(U,Y){if(!N)return!1;const z=U-Ft,F=Y-R,B=z*z+F*F;if(B<mt)return!1;const j=Math.sqrt(B),q=(lt?z:F)/j;return X=q>je?1:q<-je?-1:0,N=!1,!0},isGesture:()=>0!==X,getDirection:()=>X}}
1)(je.direction,je.threshold,je.maxAngle),q=c.G.createGesture({name:ne.gestureName,priority:ne.gesturePriority,disableScroll:ne.disableScroll}),De=()=>{Me&&(lt=!1,U&&U(B))},It=()=>!!q.capture()&&(Me=!0,at=!1,B.startX=B.currentX,B.startY=B.currentY,B.startTime=B.currentTime,Ft?Ft(B).then(ei):ei(),!0),ei=()=>{F&&(()=>{if(typeof document<"u"){const Xt=document.activeElement;null!=Xt&&Xt.blur&&Xt.blur()}})(),R&&R(B),at=!0},Ki=()=>{Me=!1,Pt=!1,lt=!1,at=!0,q.release()},ci=Xt=>{const jn=Me,rs=at;if(Ki(),rs){if(Zt(B,Xt),jn)return void(N&&N(B));X&&X(B)}},Xn=((ne,Me,Pt,at,lt)=>{let je,mt,Ft,R,N,X,U,Y=0;const z=tt=>{Y=Date.now()+2e3,Me(tt)&&(!mt&&Pt&&(mt=re(ne,"touchmove",Pt,lt)),Ft||(Ft=re(tt.target,"touchend",B,lt)),R||(R=re(tt.target,"touchcancel",B,lt)))},F=tt=>{Y>Date.now()||Me(tt)&&(!X&&Pt&&(X=re(x(ne),"mousemove",Pt,lt)),U||(U=re(x(ne),"mouseup",j,lt)))},B=tt=>{q(),at&&at(tt)},j=tt=>{le(),at&&at(tt)},q=()=>{mt&&mt(),Ft&&Ft(),R&&R(),mt=Ft=R=void 0},le=()=>{X&&X(),U&&U(),X=U=void 0},fe=()=>{q(),le()},De=(tt=!0)=>{tt?(je||(je=re(ne,"touchstart",z,lt)),N||(N=re(ne,"mousedown",F,lt))):(je&&je(),N&&N(),je=N=void 0,fe())};return{enable:De,stop:fe,destroy:()=>{De(!1),at=Pt=Me=void 0}}})(je.el,Xt=>{const jn=Ae(Xt);return!(Pt||!at||(hn(Xt,B),B.startX=B.currentX,B.startY=B.currentY,B.startTime=B.currentTime=jn,B.velocityX=B.velocityY=B.deltaX=B.deltaY=0,B.event=Xt,mt&&!1===mt(B))||(q.release(),!q.start()))&&(Pt=!0,0===Y?It():(j.start(B.startX,B.startY),!0))},Xt=>{Me?!lt&&at&&(lt=!0,Zt(B,Xt),requestAnimationFrame(De)):(Zt(B,Xt),j.detect(B.currentX,B.currentY)&&(!j.isGesture()||!It())&&kr())},ci,{capture:!1,passive:z}),kr=()=>{Ki(),Xn.stop(),X&&X(B)};return{enable(Xt=!0){Xt||(Me&&ci(void 0),Ki()),Xn.enable(Xt)},destroy(){q.destroy(),Xn.destroy()}}},Zt=(ne,Me)=>{if(!Me)return;const Pt=ne.currentX,at=ne.currentY,lt=ne.currentTime;hn(Me,ne);const je=ne.currentX,mt=ne.currentY,R=(ne.currentTime=Ae(Me))-lt;if(R>0&&R<100){const X=(mt-at)/R;ne.velocityX=(je-Pt)/R*.7+.3*ne.velocityX,ne.velocityY=.7*X+.3*ne.velocityY}ne.deltaX=je-ne.startX,ne.deltaY=mt-ne.startY,ne.event=Me},hn=(ne,Me)=>{let Pt=0,at=0;if(ne){const lt=ne.changedTouches;if(lt&&lt.length>0){const je=lt[0];Pt=je.clientX,at=je.clientY}else void 0!==ne.pageX&&(Pt=ne.pageX,at=ne.pageY)}Me.currentX=Pt,Me.currentY=at},Ae=ne=>ne.timeStamp||Date.now()},43811:(ns,Di,H)=>{"use strict";H.d(Di,{F5:()=>Me,GU:()=>ke,Jz:()=>Ae,L8:()=>ce,Mq:()=>je,NN:()=>ae,Pc:()=>x,_k:()=>Ft,hO:()=>hn,l_:()=>lt,nw:()=>mt,xu:()=>Zt,zl:()=>re});var c=H(30049);function re(F,B){return j=>{if((0,c.gD_)(j.value)||""===j.value)return null;const q=parseFloat(j.value);return q>
1=F&&q<=B?null:{invalidRange:{min:F,max:B,actual:q}}}}function ae(){return F=>F.value?/^(0|[1-9]\d*)?$/.test(F.value)?null:{notInteger:!0}:null}function ce(F){return B=>{const j=B.parent;return j&&B.value!==j.get([F]).value?{mismatch:!0}:null}}function ke(F,B){return j=>{const q=j.parent;if(q){const le=q.get([F]).value;if((0,c.z3F)(j.value)&&le===B)return{required:!0}}return null}}function x(F){return B=>!B.parent||null!=B.value&&""!==B.value||1!=F?null:{required:!0}}function Zt(F,B){return j=>{const q=j.parent,le=j.value;if(q){const fe=q.get([F]).value;if((null==le||""===le)&&fe!==B&&null!==fe&&""!==fe&&void 0!==fe)return{required:!0}}return null}}function hn(F,B,j){return q=>{const le=q.parent,fe=q.value;if(le){const De=le.get([F]).value;if((null==fe||""===fe)&&De!==B&&De!==j&&null!==De&&""!==De&&void 0!==De)return{required:!0}}return null}}function Ae(F,B,j,q){return le=>{const fe=le.parent,De=le.value;if(fe){const It=fe.get([F]).value;if((0,c.z3F)(De)&&It!==B&&It!==j&&It!==q&&(0,c.Wo_)(It))return{required:!0}}return null}}function Me(F){return B=>{const j=B.value;return null!=j&&null!=j&&""!=j||!F.value?null:{requiredIf:{condition:F.value}}}}function lt(F){return B=>{if(B&&(B.value||0===B.value)){const j=+B.value;if(isNaN(j)||j<F)return{minValue:F}}return null}}function je(F,B){return j=>{const le=[];return j.controls[F].value.forEach(De=>{le.push(De[B])}),0==le.filter(De=>!1!==De&&null!=De&&""!==De).length?{nothingSelected:!0}:null}}function mt(){return F=>{const B=F.controls.B22.controls.MurExterieurs.controls.RevetementRenovations.controls,j=[];if(B)return B.forEach(q=>{const le=q,fe=[];le.controls.Facades.value.forEach(It=>{fe.push(It.TypeFacade)}),0==fe.filter(It=>!1!==It&&null!=It&&""!==It).length&&(j.push(!0),le.controls.Facades.setErrors({aucuneFacade:!0}))}),j.length>0?{aucuneFacade:!0}:null}}function Ft(){return F=>{let B,j;
1if(F.controls.B22&&(B=F.controls.B22.controls.PorteFenetres.controls.AnneesRenovationEtg.controls,j=F.controls.B22.controls.PorteFenetres.controls.NbPortesFenetresEtg.value),F.controls.AnneesRenovationEtg&&(B=F.controls.AnneesRenovationEtg.controls,j=F.controls.NbPortesFenetresEtg.value),!B)return null;let q=0;const le=[];B.forEach(ei=>{q+=ei.controls.Nombre.value,le.push(ei.controls.Annee.value)});const fe=new Set(le),De="d\xE9clar\xE9es",It="\xE0 ajouter",tt="\xE0 retirer";return fe.size!==le.length?{duplicateAnneeRenovEtg:!0}:q<j?{renovEtgIncorrect:`${q}/${j} ${De} : ${j-q} ${It}`}:q>j?{renovEtgIncorrect:`${q}/${j} ${De} : ${q-j} ${tt}`}:null}}},98239:(ns,Di,H)=>{"use strict";H.d(Di,{e:()=>re});var c=H(54438);let re=(()=>{var s;class ae{constructor(ke){}blockPaste(ke){ke.preventDefault()}blockCopy(ke){ke.preventDefault()}blockCut(ke){ke.preventDefault()}}return(s=ae).\u0275fac=function(ke){return new(ke||s)(c.rXU(c.aKT))},s.\u0275dir=c.FsC({type:s,selectors:[["","preventCopyPasteDirective",""]],hostBindings:function(ke,x){1&ke&&c.bIt("paste",function(ft){return x.blockPaste(ft)})("copy",function(ft){return x.blockCopy(ft)})("cut",function(ft){return x.blockCut(ft)})},inputs:{preventCopyPasteDirective:"preventCopyPasteDirective"}}),ae})()},88821:(ns,Di,H)=>{"use strict";H.d(Di,{X:()=>re});var c=H(54438);let re=(()=>{var s;class ae{transform(ke){return ke?ke.charAt(0).toUpperCase()+ke.slice(1):""}}return(s=ae).\u0275fac=function(ke){return new(ke||s)},s.\u0275pipe=c.EJ8({name:"vplusCapitalizeFirstLetter",type:s,pure:!0}),ae})()},81616:(ns,Di,H)=>{"use strict";H.r(Di),H.d(Di,{VisiteVirtuellePageModule:()=>x8});var _u,c=H(54438),re=H(6402),s=H(89163),ae=H(16623),ce=H(58031),ke=H(23735),x=H(62603),J=H(53028),ft=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Zt=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},Ae="e-rtl",ne="e-overlay",at="e-nav-arrow",lt="e-nav-right-arrow",je="e-nav-left-arrow",mt="e-scroll-nav",Ft="e-scroll-right-nav",R="e-scroll-left-nav",N="e-scroll-device",X="e-scroll-overlay",U="e-scroll-right-overlay",Y="e-scroll-left-overlay",F=function(a){function i(e,t){return a.call(this,e,t)||this}return ft(i,a),i.prototype.preRender=function(){this.browser=s.Pw.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=s.Pw.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=(0,s.Lz)("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(Ae)},i.prototype.render=function(){this.touchModule=new s.Up(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),s.Jm.add(this.scrollEle,"scroll",this.scrollHandler,this),this.isDevice?(this.element.classList.add(N),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},i.prototype.setScrollState=function(){(0,s.hX)(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 n=this.element,o=0,l=[].slice.call(n.children);o<l.length;o++)e.appendChild(l[o]);t.appendChild(e),n.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},i.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},i.prototype.getModuleName=function(){return"hScroll"},i.prototype.destroy=function(){var e=this.element;e.style.display="",e.classList.remove("e-hscroll"),e.classList.remove(N),e.classList.remove(Ae);var t=(0,s.Ub)(".e-"+e.id+"_nav."+mt,e),n=(0,s.Ub)("."+X,e);
1[].slice.call(n).forEach(function(h){(0,s.Yo)(h)});for(var r=0,o=[].slice.call(this.scrollItems.children);r<o.length;r++)e.appendChild(o[r]);this.uniqueId&&this.element.removeAttribute("id"),(0,s.Yo)(this.scrollEle),t.length>0&&((0,s.Yo)(t[0]),(0,s.hX)(t[1])||(0,s.Yo)(t[1])),s.Jm.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,a.prototype.destroy.call(this)},i.prototype.disable=function(e){var t=(0,s.Ub)(".e-scroll-nav:not(."+ne+")",this.element);e?this.element.classList.add(ne):this.element.classList.remove(ne),[].slice.call(t).forEach(function(n){n.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),n=this.createElement("div",{className:X+" "+U}),r="e-"+e.id.concat("_nav "+mt+" "+Ft),o=this.createElement("div",{id:t.concat("_right"),className:r}),l=this.createElement("div",{className:lt+" "+at+" e-icons"});o.appendChild(l);var h=this.createElement("div",{className:X+" "+Y});this.ieCheck&&o.classList.add("e-ie-align"),e.appendChild(n),e.appendChild(o),e.insertBefore(h,e.firstChild),this.eventBinding([o])},i.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),n="e-"+e.id.concat("_nav "+mt+" "+Ft),r={role:"button",id:t.concat("_right"),"aria-label":"Scroll right"},o=this.createElement("div",{className:n,attrs:r});o.setAttribute("aria-disabled","false");var l=this.createElement("div",{className:lt+" "+at+" e-icons"}),h="e-"+e.id.concat("_nav "+mt+" "+R),d={role:"button",id:t.concat("_left"),"aria-label":"Scroll left"},p=this.createElement("div",{className:h+" "+ne,attrs:d});p.setAttribute("aria-disabled","true");var u=this.createElement("div",{className:je+" "+at+" e-icons"});p.appendChild(u),o.appendChild(l),e.appendChild(o),e.insertBefore(p,e.firstChild),this.ieCheck&&(o.classList.add("e-ie-align"),p.classList.add("e-ie-align")),this.eventBinding([o,p])},i.prototype.onKeyPress=function(e){var t=this;"Enter"===e.key&&(this.keyTimer=window.setTimeout(function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)},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 t=this;[].slice.call(e).forEach(function(n){new s.Up(n,{tapHold:t.tabHoldHandler.bind(t),tapHoldThreshold:500}),n.addEventListener("keydown",t.onKeyPress.bind(t)),n.addEventListener("keyup",t.onKeyUp.bind(t)),n.addEventListener("mouseup",t.repeatScroll.bind(t)),n.addEventListener("touchend",t.repeatScroll.bind(t)),n.addEventListener("contextmenu",function(r){r.preventDefault()}),s.Jm.add(n,"click",t.clickEventHandler,t)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,n=e.originalEvent.target;n=this.contains(n,mt)?n.firstElementChild:n,this.timeout=window.setInterval(function(){t.eleScrolling(10,n,!0)},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,n){var r=this.element,o=t.classList;o.contains(mt)&&(o=t.querySelector("."+at).classList),this.contains(r,Ae)&&this.browserCheck&&(e=-e),!this.contains(r,Ae)||this.browserCheck||this.ieCheck?o.contains(lt)?this.frameScrollRequest(e,"add",n):this.frameScrollRequest(e,"",n):o.contains(je)?this.frameScrollRequest(e,"add",n):this.frameScrollRequest(e,"",n)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.swipeHandler=function(e){var n,t=this.scrollEle;n=e.velocity<=1?e.distanceX/(10*e.velocity):e.distanceX/e.velocity;var r=.5,o=function(){var l=Math.sin(r);l<=0?window.cancelAnimationFrame(l):("Left"===e.swipeDirection?t.scrollLeft+=n*l:"Right"===e.swipeDirection&&(t.scrollLeft-=n*l),r-=.5,window.requestAnimationFrame(o))};o()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e,this.enableRtl&&this.scrollEle.scrollLeft>0&&(this.scrollEle.scrollLeft=0)},i.prototype.frameScrollRequest=function(e,t,n){var r=this;if(n)this.scrollUpdating(e,t);else{this.customStep||[].slice.call((0,s.Ub)("."+X,this.element)).forEac
1h(function(h){e-=h.offsetWidth});var l=function(){var h,d;r.contains(r.element,Ae)&&r.browserCheck?(h=-e,d=-10):(h=e,d=10),h<10?window.cancelAnimationFrame(d):(r.scrollUpdating(d,t),e-=d,window.requestAnimationFrame(l))};l()}},i.prototype.touchHandler=function(e){var t=this.scrollEle,n=e.distanceX;this.ieCheck&&this.contains(this.element,Ae)&&(n=-n),"Left"===e.scrollDirection?t.scrollLeft=t.scrollLeft+n:"Right"===e.scrollDirection&&(t.scrollLeft=t.scrollLeft-n)},i.prototype.arrowDisabling=function(e,t){if(this.isDevice){var r=((0,s.hX)(e)?t:e).querySelector("."+at);(0,s.hX)(e)?(0,s.pP)(r,[lt],[je]):(0,s.pP)(r,[je],[lt])}else e&&t&&(e.classList.add(ne),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),t.classList.remove(ne),t.setAttribute("aria-disabled","false"),t.setAttribute("tabindex","0"));this.repeatScroll()},i.prototype.scrollHandler=function(e){var t=e.target,n=t.offsetWidth,o=this.element.querySelector("."+R),l=this.element.querySelector("."+Ft),h=this.element.querySelector("."+Y),d=this.element.querySelector("."+U),p=t.scrollLeft;if(p<=0&&(p=-p),this.isDevice&&(this.enableRtl&&!(this.browserCheck||this.ieCheck)&&(h=this.element.querySelector("."+U),d=this.element.querySelector("."+Y)),h.style.width=p<40?p+"px":"40px",d.style.width=t.scrollWidth-Math.ceil(n+p)<40?t.scrollWidth-Math.ceil(n+p)+"px":"40px"),0===p)this.arrowDisabling(o,l);else if(Math.ceil(n+p+.1)>=t.scrollWidth)this.arrowDisabling(l,o);else{var u=this.element.querySelector("."+mt+"."+ne);u&&(u.classList.remove(ne),u.setAttribute("aria-disabled","false"),u.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add(Ae):this.element.classList.remove(Ae)}},Zt([(0,s.mA)(null)],i.prototype,"scrollStep",void 0),Zt([s.kc],i)}(s.uA),B=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),j=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},le="e-rtl",fe="e-overlay",tt="e-nav-arrow",ei="e-nav-up-arrow",Ki="e-nav-down-arrow",ci="e-scroll-nav",Xn="e-scroll-up-nav",kr="e-scroll-down-nav",Xt="e-scroll-device",jn="e-scroll-overlay",rs="e-scroll-up-overlay",Po="e-scroll-down-overlay",Cn=function(a){function i(e,t){return a.call(this,e,t)||this}return B(i,a),i.prototype.preRender=function(){this.browser=s.Pw.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=s.Pw.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=(0,s.Lz)("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(le)},i.prototype.render=function(){this.touchModule=new s.Up(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),s.Jm.add(this.scrollEle,"scroll",this.scrollEventHandler,this),this.isDevice?(this.element.classList.add(Xt),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),s.Jm.add(this.element,"wheel",this.wheelEventHandler,this)},i.prototype.setScrollState=function(){(0,s.hX)(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=(0,s.n)("div",{className:"e-vscroll-content"}),t=(0,s.n)("div",{className:"e-vscroll-bar"});t.setAttribute("tabindex","-1");for(var n=this.element,o=0,l=[].slice.call(n.children);o<l.length;o++)e.appendChild(l[o]);t.appendChild(e),n.appendChild(t),t.style.overflow="hidden",this.scrollEle=t,this.scrollItems=e},i.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},i.prototype.getModuleName=function(){return"vScroll"},i.prototype.destroy=function(){var e=this.element;e.style.display="",(0,s.vy)([this.element],["e-vscroll",Xt,le]);var t=(0,s.Ub)(".e-"+e.id+"_nav."+ci,e),n=(0,s.Ub)("."+jn,e);
1[].slice.call(n).forEach(function(h){(0,s.Yo)(h)});for(var r=0,o=[].slice.call(this.scrollItems.children);r<o.length;r++)e.appendChild(o[r]);this.uniqueId&&this.element.removeAttribute("id"),(0,s.Yo)(this.scrollEle),t.length>0&&((0,s.Yo)(t[0]),(0,s.hX)(t[1])||(0,s.Yo)(t[1])),s.Jm.remove(this.scrollEle,"scroll",this.scrollEventHandler),this.touchModule.destroy(),this.touchModule=null,a.prototype.destroy.call(this)},i.prototype.disable=function(e){var t=(0,s.Ub)(".e-scroll-nav:not(."+fe+")",this.element);e?this.element.classList.add(fe):this.element.classList.remove(fe),[].slice.call(t).forEach(function(n){n.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlayElement=function(e){var t=e.id.concat("_nav"),n=(0,s.n)("div",{className:jn+" "+Po}),r="e-"+e.id.concat("_nav "+ci+" "+kr),o=(0,s.n)("div",{id:t.concat("down"),className:r}),l=(0,s.n)("div",{className:Ki+" "+tt+" e-icons"});o.appendChild(l);var h=(0,s.n)("div",{className:jn+" "+rs});this.ieCheck&&o.classList.add("e-ie-align"),e.appendChild(n),e.appendChild(o),e.insertBefore(h,e.firstChild),this.eventBinding([o])},i.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),n="e-"+e.id.concat("_nav "+ci+" "+kr),r=(0,s.n)("div",{id:t.concat("_down"),className:n});r.setAttribute("aria-disabled","false");var o=(0,s.n)("div",{className:Ki+" "+tt+" e-icons"}),l="e-"+e.id.concat("_nav "+ci+" "+Xn),h=(0,s.n)("div",{id:t.concat("_up"),className:l+" "+fe});h.setAttribute("aria-disabled","true");var d=(0,s.n)("div",{className:ei+" "+tt+" e-icons"});h.appendChild(d),r.appendChild(o),r.setAttribute("tabindex","0"),e.appendChild(r),e.insertBefore(h,e.firstChild),this.ieCheck&&(r.classList.add("e-ie-align"),h.classList.add("e-ie-align")),this.eventBinding([r,h])},i.prototype.onKeyPress=function(e){var t=this;"Enter"===e.key&&(this.keyTimer=window.setTimeout(function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)},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 t=this;[].slice.call(e).forEach(function(n){new s.Up(n,{tapHold:t.tabHoldHandler.bind(t),tapHoldThreshold:500}),n.addEventListener("keydown",t.onKeyPress.bind(t)),n.addEventListener("keyup",t.onKeyUp.bind(t)),n.addEventListener("mouseup",t.repeatScroll.bind(t)),n.addEventListener("touchend",t.repeatScroll.bind(t)),n.addEventListener("contextmenu",function(r){r.preventDefault()}),s.Jm.add(n,"click",t.clickEventHandler,t)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,n=e.originalEvent.target;n=this.contains(n,ci)?n.firstElementChild:n,this.timeout=window.setInterval(function(){t.eleScrolling(10,n,!0)},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,n){var r=t.classList;r.contains(ci)&&(r=t.querySelector("."+tt).classList),r.contains(Ki)?this.frameScrollRequest(e,"add",n):r.contains(ei)&&this.frameScrollRequest(e,"",n)},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 n,t=this.scrollEle;n=e.velocity<=1?e.distanceY/(10*e.velocity):e.distanceY/e.velocity;var r=.5,o=function(){var l=Math.sin(r);l<=0?window.cancelAnimationFrame(l):("Up"===e.swipeDirection?t.scrollTop+=n*l:"Down"===e.swipeDirection&&(t.scrollTop-=n*l),r-=.02,window.requestAnimationFrame(o))};o()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollTop+=e:this.scrollEle.scrollTop-=e},i.prototype.frameScrollRequest=function(e,t,n){var r=this;if(n)this.scrollUpdating(e,t);else{this.customStep||[].slice.call((0,s.Ub)("."+jn,this.element)).forEach(function(h){e-=h.offsetHeight});var l=function(){e<10?window.cancelAnimationFrame(10):(r.scrollUpdating(10,t),e-=10,window.requestAnimationFrame(l))};l()}},i.prototype.touchHandler=function(e){var t=this.scrollEle,n=e.distanceY;"Up"===e.scrollDirection?t.scrollTop=t.scrollTop+n:"Down"===e.scrollDirection&&(t.scrollTop=t.scrollTop-n)},i.prototype.arrowDisabling=function(e,t){if(this.isDevice){var r=((0,s.hX)(e)?t:e).querySelector("."+tt);(0,s.hX)(e)?(0,s.pP)(r,[Ki],[ei]):(0,s.pP)(r,[ei],[Ki])}else e.classList.add(fe),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),t.classList.remove(fe),t.setAttribute("aria-disabled","false"),t.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollEventHandler=function(e){var t=e.target,n=t.offsetHeight,r=this.element.querySelector("."+Xn),o=this.element.querySelector("."+kr),l=this.element.querySelector("."+rs),h=this.element.querySelector("."+Po),d=t.scrollTop;
1if(d<=0&&(d=-d),this.isDevice&&(l.style.height=d<40?d+"px":"40px",h.style.height=t.scrollHeight-Math.ceil(n+d)<40?t.scrollHeight-Math.ceil(n+d)+"px":"40px"),0===d)this.arrowDisabling(r,o);else if(Math.ceil(n+d+.1)>=t.scrollHeight)this.arrowDisabling(o,r);else{var p=this.element.querySelector("."+ci+"."+fe);p&&(p.classList.remove(fe),p.setAttribute("aria-disabled","false"),p.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add(le):this.element.classList.remove(le)}},j([(0,s.mA)(null)],i.prototype,"scrollStep",void 0),j([s.kc],i)}(s.uA),Yg=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),ht=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},Ip="e-vertical",Mt="e-toolbar-items",Dt="e-toolbar-item",cr="e-rtl",kt="e-separator",Bc="e-popup-up-icon",Fa="e-popup-down-icon",Qg="e-popup-open",Jg="e-template",Ti="e-overlay",Kg="e-toolbar-text",xp="e-popup-text",$n="e-overflow-show",Hc="e-overflow-hide",Zi="e-hor-nav",Zg="e-scroll-nav",ev="e-toolbar-center",qn="e-tbar-pos",wp="e-hscroll-bar",Ba="e-toolbar-pop",as="e-toolbar-popup",Ha="e-nav-active",za="e-ignore",Op="e-popup-alone",Gn="e-hidden",tv="e-toolbar-multirow",iv="e-multirow-pos",Ap="e-multirow-separator",Pp="e-extended-separator",nv="e-extended-toolbar",zc="e-toolbar-extended",Dp="e-tbar-extended",O_=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return Yg(i,a),ht([(0,s.mA)("")],i.prototype,"id",void 0),ht([(0,s.mA)("")],i.prototype,"text",void 0),ht([(0,s.mA)("auto")],i.prototype,"width",void 0),ht([(0,s.mA)("")],i.prototype,"cssClass",void 0),ht([(0,s.mA)(!1)],i.prototype,"showAlwaysInPopup",void 0),ht([(0,s.mA)(!1)],i.prototype,"disabled",void 0),ht([(0,s.mA)("")],i.prototype,"prefixIcon",void 0),ht([(0,s.mA)("")],i.prototype,"suffixIcon",void 0),ht([(0,s.mA)(!0)],i.prototype,"visible",void 0),ht([(0,s.mA)("None")],i.prototype,"overflow",void 0),ht([(0,s.mA)("")],i.prototype,"template",void 0),ht([(0,s.mA)("Button")],i.prototype,"type",void 0),ht([(0,s.mA)("Both")],i.prototype,"showTextOn",void 0),ht([(0,s.mA)(null)],i.prototype,"htmlAttributes",void 0),ht([(0,s.mA)("")],i.prototype,"tooltipText",void 0),ht([(0,s.mA)("Left")],i.prototype,"align",void 0),ht([(0,s.Jh)()],i.prototype,"click",void 0),ht([(0,s.mA)(-1)],i.prototype,"tabIndex",void 0),i}(s.I1),rv=function(a){function i(e,t){var n=a.call(this,e,t)||this;return n.resizeContext=n.resize.bind(n),n.orientationChangeContext=n.orientationChange.bind(n),n.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},n}return Yg(i,a),i.prototype.destroy=function(){var e=this;(this.isReact||this.isAngular)&&this.clearTemplate();var t=this.element.querySelectorAll(".e-control.e-btn");for([].slice.call(t).forEach(function(n){!(0,s.hX)(n)&&!(0,s.hX)(n.ej2_instances)&&!(0,s.hX)(n.ej2_instances[0])&&!n.ej2_instances[0].isDestroyed&&n.ej2_instances[0].destroy()}),this.unwireEvents(),this.tempId.forEach(function(n){(0,s.hX)(e.element.querySelector(n))||(document.body.appendChild(e.element.querySelector(n)).style.display="none")}),this.destroyItems();this.element.lastElementChild;)this.element.removeChild(this.element.lastElementChild);this.trgtEle&&(this.element.appendChild(this.ctrlTem),this.trgtEle=null,this.ctrlTem=null),this.popObj&&(this.popObj.destroy(),(0,s.Yo)(this.popObj.element)),this.activeEle&&(this.activeEle=null),this.popObj=null,this.tbarAlign=null,this.tbarItemsCol=[],this.remove(this.element,"e-toolpop"),this.cssClass&&(0,s.vy)([this.element],this.cssClass.split(" ")),this.element.removeAttribute("style"),["aria-disabled","aria-orientation","role"].forEach(function(n){return e.element.removeAttribute(n)}),a.prototype.destroy.call(this)},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(Ip),this.isExtendedOpen=!1,this.popupPriCount=0,this.enableRtl&&this.add(this.element,cr)},i.prototype.wireEvents=function(){s.Jm.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resizeContext),window.addEventListener("orientationchange",this.orientationChangeContext),this.allowKeyboard&&this.wireKeyboardEvent()},i.prototype.wireKeyboardEvent=function(){this.keyModule=new s.j9(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),s.Jm.add(this.element,"keydown",this.docKeyDown,this),this.updateTabIndex("0")},i.prototype.updateTabIndex=function(e){var t=this.element.querySelector("."+Dt+":not(."+Ti+" ):not(."+kt+" ):not(."+Gn+" )");if(!(0,s.hX)(t)&&!(0,s.hX)(t.firstElementChild)){var n=t.firstElementChild.getAttribute("data-tabindex");n&&"-1"===n&&"INPUT"!==t.firstElementChild.tagName&&t.firstElementChild.setAttribute("tabindex",e)}},i.prototype.unwireKeyboardEvent=function(){this.keyModule&&(s.Jm.remove(this.element,"keydown",this.docKeyDown),this.keyModule.destroy(),this.keyModule=null)},i.prototype.docKeyDown=function(e){if("INPUT"!==e.target.tagName){var t=!(0,s.hX)(this.popObj)&&(0,s.zN)(this.popObj.element)&&"Extended"!==this.overflowMode;9===e.keyCode&&!0===e.target.classList.contains("e-hor-nav")&&t&&this.popObj.hide({name:"FadeOut",duration:100}
1),(40===e.keyCode||38===e.keyCode||35===e.keyCode||36===e.keyCode)&&e.preventDefault()}},i.prototype.unwireEvents=function(){s.Jm.remove(this.element,"click",this.clickHandler),this.destroyScroll(),this.unwireKeyboardEvent(),window.removeEventListener("resize",this.resizeContext),window.removeEventListener("orientationchange",this.orientationChangeContext),document.removeEventListener("scroll",this.clickEvent),document.removeEventListener("click",this.scrollEvent),this.scrollEvent=null,this.clickEvent=null},i.prototype.clearProperty=function(){this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},i.prototype.docEvent=function(e){var t=(0,s.kp)(e.target,".e-popup");this.popObj&&(0,s.zN)(this.popObj.element)&&!t&&"Popup"===this.overflowMode&&this.popObj.hide({name:"FadeOut",duration:100})},i.prototype.destroyScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,qn),this.scrollModule.destroy(),this.scrollModule=null)},i.prototype.destroyItems=function(){if(this.element&&[].slice.call(this.element.querySelectorAll("."+Dt)).forEach(function(t){(0,s.Yo)(t)}),this.tbarAlign){var e=this.element.querySelector("."+Mt);[].slice.call(e.children).forEach(function(t){(0,s.Yo)(t)}),this.tbarAlign=!1,this.remove(e,qn)}this.clearProperty()},i.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,cr),this.destroyScroll()),this.remove(this.element,Dp),this.remove(this.element,nv);var e=this.element.querySelector(".e-toolbar-multirow");e&&this.remove(e,tv),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,t){return e&&this.popObj&&(0,s.zN)(this.popObj.element)?this.popObj.element.querySelector("."+Dt):this.element===t||e?this.element.querySelector("."+Dt+":not(."+Ti+" ):not(."+kt+" ):not(."+Gn+" )"):(0,s.kp)(t,"."+Dt)},i.prototype.getNextFocusableItem=function(e,t){var l,r=Array.from(this.element.querySelectorAll("."+Dt+":not(."+Ti+"):not(."+kt+"):not(."+Gn+")")),o=r.indexOf(e);if(o<0)return null;switch(t){case"moveRight":case"moveDown":case"tab":l=(o+1)%r.length;break;case"moveLeft":case"moveUp":l=(o-1+r.length)%r.length;break;case"home":l=0;break;case"end":l=r.length-1;break;default:l=o}return l>=0&&l<r.length?r[parseInt(l.toString(),10)]:null},i.prototype.keyHandling=function(e,t,n,r,o){var u,f,l=this.popObj,h=this.element,d={name:"FadeOut",duration:100},p="moveUp"===t.action?"previous":"next";switch(t.action){case"moveRight":if(this.isVertical)return;h===n?this.elementFocus(e):r||this.eleFocus(e,"next");break;case"moveLeft":if(this.isVertical)return;r||this.eleFocus(e,"previous");break;case"home":case"end":if(e){var m=(0,s.kp)(e,".e-popup"),g=this.element.querySelector("."+zc);"Extended"===this.overflowMode&&g&&g.classList.contains("e-popup-open")&&(m="end"===t.action?g:null),m?(0,s.zN)(this.popObj.element)&&(f=[].slice.call(m.children),u="home"===t.action?this.focusFirstVisibleEle(f):this.focusLastVisibleEle(f)):(f=this.element.querySelectorAll("."+Mt+" ."+Dt+":not(."+kt+")"),u="home"===t.action?this.focusFirstVisibleEle(f):this.focusLastVisibleEle(f)),u&&this.elementFocus(u)}break;case"moveUp":case"moveDown":if(this.isVertical)this.eleFocus(e,"moveUp"===t.action?"previous":"next");else if(l&&(0,s.kp)(n,".e-popup")){var v=l.element;if("previous"===p&&v.firstElementChild===e){var b=this.focusLastVisibleEle([].slice.call(v.children));b&&this.elementFocus(b)}else if("next"===p&&v.lastElementChild===e){var y=this.focusFirstVisibleEle([].slice.call(v.children));y&&this.elementFocus(y)}else this.eleFocus(e,p)}else"moveDown"===t.action&&l&&(0,s.zN)(l.element)&&(this.eleContains(e)?this.eleFocus(e,p):this.elementFocus(e));break;case"tab":if(!o&&!r){var E=e.firstElementChild;h===n&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(E),E.focus()))}break;case"popupClose":l&&"Extended"!==this.overflowMode&&l.hide(d);break;case"popupOpen":if(!r)return;l&&!(0,s.zN)(l.element)?(l.element.style.top=h.offsetHeight+"px",l.
1show({name:"FadeIn",duration:100})):l.hide(d)}},i.prototype.keyActionHandler=function(e){var t=this,n=e.target;if("home"!==e.action&&"end"!==e.action&&"moveRight"!==e.action&&"moveLeft"!==e.action&&"moveUp"!==e.action&&"moveDown"!==e.action||"INPUT"!==n.tagName&&"TEXTAREA"!==n.tagName&&!this.element.classList.contains(Ti)){e.preventDefault();var r=n.classList.contains(Zi),o=n.classList.contains(Zg),l=this.clstElement(r,n);if(l||o){var h=l,d=this.getNextFocusableItem(h,e.action);this.trigger("keyDown",{originalEvent:e,currentItem:h,nextItem:d,cancel:!1},function(u){u.cancel||t.keyHandling(l,e,n,r,o)})}}},i.prototype.disable=function(e){var t=this.element;e?t.classList.add(Ti):t.classList.remove(Ti),this.activeEle&&this.activeEle.setAttribute("tabindex",this.activeEle.getAttribute("data-tabindex")),this.scrollModule&&this.scrollModule.disable(e),this.popObj&&((0,s.zN)(this.popObj.element)&&"Extended"!==this.overflowMode&&this.popObj.hide(),t.querySelector("#"+t.id+"_nav").setAttribute("tabindex",e?"-1":"0"))},i.prototype.eleContains=function(e){return e.classList.contains(kt)||e.classList.contains(Ti)||e.getAttribute("disabled")||e.classList.contains(Gn)||!(0,s.zN)(e)||!e.classList.contains(Dt)},i.prototype.focusFirstVisibleEle=function(e){for(var n=0;n<e.length;){var r=e[parseInt(n.toString(),10)];if(!r.classList.contains(kt)&&!r.classList.contains(Gn)&&!r.classList.contains(Ti))return r;n++}},i.prototype.focusLastVisibleEle=function(e){for(var n=e.length-1;n>=0;){var r=e[parseInt(n.toString(),10)];if(!r.classList.contains(kt)&&!r.classList.contains(Gn)&&!r.classList.contains(Ti))return r;n--}},i.prototype.eleFocus=function(e,t){var n=Object(e)[t+"ElementSibling"];if(n){if(this.eleContains(n))return void this.eleFocus(n,t);this.elementFocus(n)}else if(this.tbarAlign){var o=Object(e.parentElement)[t+"ElementSibling"];if(!(0,s.hX)(o)&&0===o.children.length&&(o=Object(o)[t+"ElementSibling"]),!(0,s.hX)(o)&&o.children.length>0)if("next"===t){var l=o.querySelector("."+Dt);this.eleContains(l)?this.eleFocus(l,t):(l.firstElementChild.focus(),this.activeEleSwitch(l))}else this.eleContains(l=o.lastElementChild)?this.eleFocus(l,t):this.elementFocus(l)}else if(!(0,s.hX)(e)){var h=this.element.querySelectorAll("."+Mt+" ."+Dt+":not(."+kt+"):not(."+Ti+"):not(."+Gn+")");"next"===t&&h?this.elementFocus(h[0]):"previous"===t&&h&&this.elementFocus(h[h.length-1])}},i.prototype.clickHandler=function(e){var t=this,n=e.target,r=this.element,o=!(0,s.hX)((0,s.kp)(n,"."+Ba)),l=n.classList,h=(0,s.kp)(n,"."+Zi);h||(h=n),!r.children[0].classList.contains("e-hscroll")&&!r.children[0].classList.contains("e-vscroll")&&l.contains(Zi)&&(l=n.querySelector(".e-icons").classList),(l.contains(Bc)||l.contains(Fa))&&this.popupClickHandler(r,h,cr);var d,p=(0,s.kp)(e.target,"."+Dt);if(!(0,s.hX)(p)&&!p.classList.contains(Ti)||h.classList.contains(Zi)){p&&(d=this.items[this.tbarEle.indexOf(p)]);var f={originalEvent:e,item:d};(d&&!(0,s.hX)(d.click)&&"object"==typeof d.click?!(0,s.hX)(d.click.observers)&&d.click.observers.length>0:!(0,s.hX)(d)&&!(0,s.hX)(d.click))&&this.trigger("items["+this.tbarEle.indexOf(p)+"].click",f),f.cancel||this.trigger("clicked",f,function(g){!(0,s.hX)(t.popObj)&&o&&!g.cancel&&"Popup"===t.overflowMode&&g.item&&"Input"!==g.item.type&&t.popObj.hide({name:"FadeOut",duration:100})})}},i.prototype.popupClickHandler=function(e,t,n){var r=this.popObj;(0,s.zN)(r.element)?(t.classList.remove(Ha),r.hide({name:"FadeOut",duration:100})):(e.classList.contains(n)&&(r.enableRtl=!0,r.position={X:"left",Y:"top"}),0===r.offsetX&&!e.classList.contains(n)&&(r.enableRtl=!1,r.position={X:"right",Y:"top"}),"Extended"===this.overflowMode&&(r.element.style.minHeight="0px",r.width=this.getToolbarPopupWidth(this.element)),r.dataBind(),r.refreshPosition(),r.element.style.top=this.getElementOffsetY()+"px",t.classList.add(Ha),r.show({name:"FadeIn",duration:100}))},i.prototype.getToolbarPopupWidth=function(e){var t=window.getComputedStyle(e);return parseFloat(t.width)+2*parseFloat(t.borderRightWidth)},i.prototype.render=function(){var e=this;this.initialize(),this.renderControl(),this.wireEvents(),this.clickEvent=this.docEvent.bind(this),this.scrollEvent=this.docEvent.bind(this),this.renderComplete(),this.isReact&&this.portals&&this.portals.length>0&&this.renderReactTemplates(function(){e.refreshOverflow()})},i.prototype.initialize=function(){var e=(0,s.IV)(this.width),t=(0,s.IV)(this.height);("msie"!==s.Pw.info.name||"auto"!==this.height||"MultiRow"===this.overflowMode)&&(0,s.sN)(this.element,{height:t}),(0,s.sN)(this.element,{width:e}),(0,s.uK)(this.element,{role:"toolbar","aria-disabled":"false","aria-orientation":this.isVertical?"vertical":"horizontal"}),this.cssClass&&(0,s.iQ)([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 n,r;this.tbarEle||(this.tbarEle=[]);for(var o=0;o<e.length;o++)n=this.renderSubComponent(e[parseInt(o.toString(),10)],o),-1===this.tbarEle.indexOf(n)&&this.tbarEle.push(n),this.tbarAlign||this.tbarItemAlign(e[parseInt(o.toString(),10)],t,o),(r=t.querySelector(".e-toolbar-"+e[parseInt(o.toString(),10)].align.toLowerCase()))?(e[parseInt(o.toString(),10)].showAlwaysInPopup&&"Show"!==e[parseInt(o.toString(),10)].overflow||this.tbarAlgEle[(e[parseInt(o.toString(),10)].align+"s").toLowerCase()].push(n),r.appendChild(n)):t.appendChild(n);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(Ip),this.isVertical=!1,("auto"===this.height||"100%"===this.height)&&(e.style.height=this.height),e.setAttribute("aria-orientation","horizontal")):(e.classList.add(Ip),this.isVertical=!0,e.setAttribute("aria-orientation","vertical"),(0,s.sN)(this.element,{height:(0,s.IV)(this.height),width:(0,s.IV)(this.width)})),this.destroyMode(),this.refreshOverflow()},i.prototype.initScroll=function(e,t){if(!this.scrollModule&&this.checkOverflow(e,t[0])){this.tbarAlign&&this.element.querySelector("."+Mt+" ."+ev).removeAttribute("style"),this.scrollModule=this.isVertical?new Cn({scrollStep:this.scrollStep,enableRtl:this.enableRtl},t[0]):new F({scrollStep:this.scrollStep,enableRtl:this.enableRtl},t[0]),this.cssClass&&(0,s.iQ)([t[0]],this.cssClass.split(" "));var n=this.scrollModule.element.querySelector("."+wp+", .e-vscroll-bar");n&&n.removeAttribute("tabindex"),this.remove(this.scrollModule.element,qn),(0,s.sN)(this.element,{overflow:"hidden"})}},i.prototype.itemWidthCal=function(e){var r,t=this,n=0;
1return[].slice.call((0,s.Ub)("."+Dt,e)).forEach(function(o){(0,s.zN)(o)&&(r=window.getComputedStyle(o),n+=t.isVertical?o.offsetHeight:o.offsetWidth,n+=parseFloat(t.isVertical?r.marginTop:r.marginRight),n+=parseFloat(t.isVertical?r.marginBottom:r.marginLeft))}),n},i.prototype.getScrollCntEle=function(e){return e.querySelector(this.isVertical?".e-vscroll-content":".e-hscroll-content")},i.prototype.checkOverflow=function(e,t){if((0,s.hX)(e)||(0,s.hX)(t)||!(0,s.zN)(e))return!1;var n=this.isVertical?e.offsetHeight:e.offsetWidth,r=this.isVertical?t.offsetHeight:t.offsetWidth;(this.tbarAlign||this.scrollModule||n===r)&&(r=this.itemWidthCal(this.scrollModule?this.getScrollCntEle(t):t));var o=e.querySelector("."+Zi),l=e.querySelector("."+Zg),h=0;return o?h=this.isVertical?o.offsetHeight:o.offsetWidth:l&&(h=this.isVertical?2*l.offsetHeight:2*l.offsetWidth),!(n>=r&&l)&&r>n-h},i.prototype.refreshOverflow=function(){this.resize()},i.prototype.toolbarAlign=function(e){this.tbarAlign&&(this.add(e,qn),this.itemPositioning())},i.prototype.renderOverflowMode=function(){var e=this.element,t=e.querySelector("."+Mt),n=this.popupPriCount>0;if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.remove(this.element,"e-toolpop"),"msie"===s.Pw.info.name&&"auto"===this.height&&(e.style.height=""),this.overflowMode){case"Scrollable":(0,s.hX)(this.scrollModule)&&this.initScroll(e,[].slice.call(e.getElementsByClassName(Mt)));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),(this.checkOverflow(e,t)||n)&&this.setOverflowAttributes(e),this.toolbarAlign(t);break;case"MultiRow":this.add(t,tv),this.checkOverflow(e,t)&&this.tbarAlign&&(this.removePositioning(),this.add(t,iv)),"hidden"===e.style.overflow&&(e.style.overflow=""),("msie"===s.Pw.info.name||"auto"!==e.style.height)&&(e.style.height="auto");break;case"Extended":this.add(this.element,nv),(this.checkOverflow(e,t)||n)&&(this.tbarAlign&&this.removePositioning(),this.setOverflowAttributes(e)),this.toolbarAlign(t)}},i.prototype.setOverflowAttributes=function(e){this.createPopupEle(e,[].slice.call((0,s.Ub)("."+Mt+" ."+Dt,e))),(0,s.uK)(this.element.querySelector("."+Zi),{tabindex:"0",role:"button","aria-haspopup":"true","aria-label":"overflow"})},i.prototype.separator=function(){var e=this.element,t=[].slice.call(e.querySelectorAll("."+kt)),n=e.querySelector("."+Ap),r=e.querySelector("."+Pp),o="MultiRow"===this.overflowMode?n:r;null!==o&&("MultiRow"===this.overflowMode?o.classList.remove(Ap):"Extended"===this.overflowMode&&o.classList.remove(Pp));for(var l=0;l<=t.length-1;l++)t[parseInt(l.toString(),10)].offsetLeft<30&&0!==t[parseInt(l.toString(),10)].offsetLeft&&("MultiRow"===this.overflowMode?t[parseInt(l.toString(),10)].classList.add(Ap):"Extended"===this.overflowMode&&t[parseInt(l.toString(),10)].classList.add(Pp))},i.prototype.createPopupEle=function(e,t){var n=e.querySelector("."+Zi),r=this.isVertical;n||this.createPopupIcon(e),n=e.querySelector("."+Zi);var l=(r?e.offsetHeight:e.offsetWidth)-(r?n.offsetHeight:n.offsetWidth);this.element.classList.remove("e-rtl"),(0,s.sN)(this.element,{direction:"initial"}),this.checkPriority(e,t,l,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.element.style.removeProperty("direction"),this.createPopup()},i.prototype.pushingPoppedEle=function(e,t,n,r,o){var l=e.element,h=[].slice.call((0,s.Ub)("."+as,l.querySelector("."+Mt))),d=(0,s.Ub)("."+$n,n),p=0,u=0;h.forEach(function(v,b){d=(0,s.Ub)("."+$n,n),v.classList.contains($n)&&d.length>0?e.tbResize&&d.length>b?(n.insertBefore(v,d[parseInt(b.toString(),10)]),++u):(n.insertBefore(v,n.children[d.length]),++u):v.classList.contains($n)||e.tbResize&&v.classList.contains(Hc)&&n.children.length>0&&0===d.length?(n.insertBefore(v,n.firstChild),++u):v.classList.contains(Hc)?t.push(v):e.tbResize?(n.insertBefore(v,n.childNodes[p+u]),++p):n.appendChild(v),v.classList.contains(kt)?(0,s.sN)(v,{display:"",height:o+"px"}):(0,s.sN)(v,{display:"",height:r+"px"})}),t.forEach(function(v){n.appendChild(v)});for(var f=(0,s.Ub)("."+Dt,l.querySelector("."+Mt)),m=f.length-1;m>=0;m--){var g=f[parseInt(m.toString(),10)];if(!g.classList.contains(kt)||"Extended"===this.overflowMode)break;(0,s.sN)(g,{display:"none"})}},i.prototype.createPopup=function(){var t,n,e=this.element;"Extended"===this.overflowMode&&(n=e.querySelector("."+kt),t="auto"===e.style.height||""===e.style.height?null:n&&n.offsetHeight);var l,r=e.querySelector("."+Dt+":not(."+kt+"):not(."+as+")"),o="auto"===e.style.height||""===e.style.height?null:r&&r.offsetHeight;if((0,s.Lt)("#"+e.id+"_popup."+Ba,e))l=(0,s.Lt)("#"+e.id+"_popup."+Ba,e);else{var d=this.createElement("div",{id:e.id+"_popup",className:Ba+" "+zc}),p=this.createElement("div",{id:e.id+"_popup",className:Ba});l="Extended"===this.overflowMode?d:p}this.pushingPoppedEle(this,[],l,o,t),this.popupInit(e,l)},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,t){if(this.popObj){if("Extended"!==this.overflowMode){var o=this.popObj.element;(0,s.sN)(o,{maxHeight:"",display:"block"}),(0,s.sN)(o,{maxHeight:o.offsetHeight+"px",display:""})}}else{e.appendChild(t),this.cssClass&&(0,s.iQ)([t],this.cssClass.split(" ")),(0,s.sN)(this.element,{overflow:""});var n=new ae.zD(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("Extended"===this.overflowMode&&(n.width=this.getToolbarPopupWidth(this.element),n.offsetX=0),n.appendTo(t),document.addEventListener("scroll",this.clickEvent),document.addEventListener("click",this.scrollEvent),"Extended"!==this.overflowMode&&(n.element.style.maxHeight=n.element.offsetHeight+"px"),this.isVertical&&(n.element.style.visibility="hidden"),this.isExtendedOpen){var r=this.element.querySelector("."+Zi);r.classList.add(Ha),(0,s.pP)(r.firstElementChild,[Bc],[Fa]),this.element.querySelector("."+zc).classList.add(Qg)}else n.hide();this.popObj=n}},i.prototype.tbarPopupHandler=function(e){"Extended"===this.overflowMode&&(e?this.add(this.element,Dp):this.remove(this.element,Dp))},i.prototype.popupOpen=function(e){var t=this.popObj;this.isVertical||(t.offsetY=this.getElementOffsetY(),t.dataBind());var n=this.popObj.element,r=this.popObj.element.parentElement,o=r.querySelector("."+Zi);o.setAttribute("aria-expanded","true"),"Extended"===this.overflowMode?t.element.style.minHeight="":((0,s.sN)(t.element,{height:"auto",maxHeight:""}),t.element.style.maxHeight=t.element.offsetHeight+"px");var l=n.offsetTop+n.offsetHeight+(0,ae.sZ)(r).top,h=o.firstElementChild;o.classList.add(Ha),(0,s.pP)(h,[Bc],[Fa]),this.tbarPopupHandler(!0);var d=(0,s.hX)(window.scrollY)?0:window.scrollY;if(!this.isVertical&&window.innerHeight+d<l&&this.element.offsetTop<n.offsetHeight){var p=n.offsetHeight-(l-window.innerHeight-d+5);t.height=p+"px";for(var u=0;u<=n.childElementCount;u++){var f=n.children[parseInt(u.toString(),10)];if(f.offsetTop+f.offsetHeight>p){p=f.offsetTop;break}}"Extended"!==this.overflowMode&&(0,s.sN)(t.element,{maxHeight:p+"px"})}else if(this.isVertical&&"Extended"!==this.overflowMode){var m=this.element.getBoundingClientRect();(0,s.sN)(t.element,{maxHeight:m.top+this.element.offsetHeight+"px",bottom:0,visibility:""})}if(t){var g=n.getBoundingClientRect();g.right>document.documentElement.clientWidth&&g.width>r.getBoundingClientRect().width&&(t.collision={Y:"none"},t.dataBind()),t.refreshPosition()}},i.prototype.popupClose=function(e){var n=this.element.querySelector("."+Zi);
1n.setAttribute("aria-expanded","false");var r=n.firstElementChild;n.classList.remove(Ha),(0,s.pP)(r,[Fa],[Bc]),this.tbarPopupHandler(!1)},i.prototype.checkPriority=function(e,t,n,r){for(var d,o=this.popupPriCount>0,h=n,u=0,f=0,m=0,g=function(I,w){var A=!1;return w.forEach(function(M){I.classList.contains(M)&&(A=!0)}),A},v=t.length-1;v>=0;v--){var b=void 0,y=window.getComputedStyle(t[parseInt(v.toString(),10)]);this.isVertical?(b=parseFloat(y.marginTop),b+=parseFloat(y.marginBottom)):(b=parseFloat(y.marginRight),b+=parseFloat(y.marginLeft));var S=t[parseInt(v.toString(),10)]===this.tbarEle[0];S&&(this.tbarEleMrgn=b),d=this.isVertical?t[parseInt(v.toString(),10)].offsetHeight:t[parseInt(v.toString(),10)].offsetWidth;var E=S?d+b:d;if(g(t[parseInt(v.toString(),10)],[Op])&&o&&(t[parseInt(v.toString(),10)].classList.add(as),(0,s.sN)(t[parseInt(v.toString(),10)],this.isVertical?{display:"none",minHeight:E+"px"}:{display:"none",minWidth:E+"px"}),m++),this.isVertical?t[parseInt(v.toString(),10)].offsetTop+t[parseInt(v.toString(),10)].offsetHeight+b>n:t[parseInt(v.toString(),10)].offsetLeft+t[parseInt(v.toString(),10)].offsetWidth+b>n){if(t[parseInt(v.toString(),10)].classList.contains(kt)){if("Extended"===this.overflowMode)g(_=t[parseInt(v.toString(),10)],[kt,za])&&(t[parseInt(v.toString(),10)].classList.add(as),m++),f++;else if("Popup"===this.overflowMode){var _;u>0&&f===m&&g(_=t[v+f+(u-1)],[kt,za])&&(0,s.sN)(_,{display:"none"}),u++,f=0,m=0}}else f++;t[parseInt(v.toString(),10)].classList.contains($n)&&r||g(t[parseInt(v.toString(),10)],[kt,za])?n-=(this.isVertical?t[parseInt(v.toString(),10)].offsetHeight:t[parseInt(v.toString(),10)].offsetWidth)+b:(t[parseInt(v.toString(),10)].classList.add(as),(0,s.sN)(t[parseInt(v.toString(),10)],this.isVertical?{display:"none",minHeight:E+"px"}:{display:"none",minWidth:E+"px"}),m++)}}if(r){var T=(0,s.Ub)("."+Dt+":not(."+as+")",this.element);this.checkPriority(e,T,h,!1)}},i.prototype.createPopupIcon=function(e){var t=e.id.concat("_nav"),n="e-"+e.id.concat("_nav e-hor-nav"),r=this.createElement("div",{id:t,className:n="Extended"===this.overflowMode?n+" e-expended-nav":n});("msie"===s.Pw.info.name||"edge"===s.Pw.info.name)&&r.classList.add("e-ie-align");var o=this.createElement("div",{className:Fa+" e-icons"});r.appendChild(o),r.setAttribute("tabindex","0"),r.setAttribute("role","button"),e.appendChild(r)},i.prototype.tbarPriRef=function(e,t,n,r,o,l,h,d,p){var u=d,m="."+Dt+":not(."+kt+"):not(."+$n+")",g=(0,s.Ub)("."+as+":not(."+$n+")",this.popObj.element).length,v=function(_,T){return _.classList.contains(T)};if(0===(0,s.Ub)(m,e).length){var b=e.children[t-(t-n)-1],y=!(0,s.hX)(b)&&v(b,za);if(!(0,s.hX)(b)&&v(b,kt)&&!(0,s.zN)(b)||y){b.style.display="unset";var S=b.offsetWidth+2*parseFloat(window.getComputedStyle(b).marginRight),E=b.previousElementSibling;l+S<h||o?(e.insertBefore(r,e.children[t+u-(t-n)]),(0,s.hX)(E)||(E.style.display="")):((0,s.sN)(r,p),E.classList.contains(kt)&&(E.style.display="none")),b.style.display=""}else e.insertBefore(r,e.children[t+u-(t-n)])}else e.insertBefore(r,e.children[t+u-g])},i.prototype.popupRefresh=function(e,t){var n=this,r=this.element,o=this.isVertical,l=r.querySelector("."+Mt),h=r.querySelector("."+Zi);if(!(0,s.hX)(h)){var d;l.removeAttribute("style"),e.style.display="block",d=o?r.offsetHeight-(h.offsetHeight+l.offsetHeight):r.offsetWidth-(h.offsetWidth+l.offsetWidth);var p=0;[].slice.call(e.children).forEach(function(u){p+=n.popupEleWidth(u),(0,s.sN)(u,{position:""})}),d+(o?h.offsetHeight:h.offsetWidth)>p&&0===this.popupPriCount&&(t=!0),this.popupEleRefresh(d,e,t),e.style.display="",0===e.children.length&&h&&this.popObj&&((0,s.Yo)(h),h=null,this.popObj.destroy(),(0,s.Yo)(this.popObj.element),this.popObj=null)}},i.prototype.ignoreEleFetch=function(e,t){var n=[].slice.call(t.querySelectorAll("."+za)),r=[],o=0;return n.length>0?(n.forEach(function(l){r.push([].slice.call(t.children).indexOf(l))}),r.forEach(function(l){l<=e&&o++}),o):0},i.prototype.checkPopupRefresh=function(e,t){t.style.display="block";var n=this.popupEleWidth(t.firstElementChild);t.firstElementChild.style.removeProperty("Position");var r=e.offsetWidth-e.querySelector("."+Zi).offsetWidth,o=e.querySelector("."+Mt).offsetWidth;return t.style.removeProperty("display"),r>n+o},i.prototype.popupEleWidth=function(e){e.style.position="absolute";var t=window.getComputedStyle(e),n=this.isVertical?e.offsetHeight:e.offsetWidth+parseFloat(t.marginLeft)+parseFloat(t.marginRight),r=e.querySelector(".e-tbar-btn-text");if(e.classList.contains("e-tbtn-align")||e.classList.contains(xp)){var o=e.children[0];!(0,s.hX)(r)&&e.classList.contains(xp)?r.style.display="none":!(0,s.hX)(r)&&e.classList.contains(Kg)&&(r.style.display="block"),o.style.minWidth="0%",n=parseFloat(this.isVertical?e.style.minHeight:e.style.minWidth),o.style.minWidth="",o.style.minHeight="",(0,s.hX)(r)||(r.style.display="")}return n},i.prototype.popupEleRefresh=function(e,t,n){for(var l,h,r=this.popupPriCount>0,o=this.tbarEle,d=this.element.querySelector("."+Mt),p=0,u=function(S){if(S.classList.contains(Op)&&r&&!n)return"continue";var E=f.popupEleWidth(S);if(S===f.tbarEle[0]&&(E+=f.tbarEleMrgn),S.style.position="",!(E<e||n))return"break";var _={minWidth:S.style.minWidth,height:S.style.height,minHeight:S.style.minHeight};if((0,s.sN)(S,{minWidth:"",height:"",minHeight:""}),S.classList.contains(Hc)||S.classList.remove(as),h=f.tbarEle.indexOf(S),f.tbarAlign){var T=f.items[parseInt(h.toString(),10)].align;h=f.tbarAlgEle[(T+"s").toLowerCase()].indexOf(S),o=f.tbarAlgEle[(T+"s").toLowerCase()],d=f.element.querySelector("."+Mt+" .e-toolbar-"+T.toLowerCase())}var I=0;
1"Extended"!==f.overflowMode&&o.slice(0,h).forEach(function(w){(w.classList.contains($n)||w.classList.contains(kt))&&(w.classList.contains(kt)&&(w.style.display="",e-=w.offsetWidth),I++)}),p=f.ignoreEleFetch(h,d),S.classList.contains($n)?(f.tbarPriRef(d,h,I,S,n,E,e,p,_),e-=S.offsetWidth):0===h?(d.insertBefore(S,d.firstChild),e-=S.offsetWidth):(l=(0,s.Ub)("."+$n,f.popObj.element).length,d.insertBefore(S,d.children[h+p-l]),e-=S.offsetWidth),S.style.height=""},f=this,m=0,g=[].slice.call(t.children);m<g.length&&"break"!==u(g[m]);m++);this.checkOverflow(this.element,this.element.getElementsByClassName(Mt)[0])&&!n&&this.renderOverflowMode()},i.prototype.removePositioning=function(){var e=this.element.querySelector("."+Mt);if(!(0,s.hX)(e)&&e.classList.contains(qn)){this.remove(e,qn);var t=[].slice.call(e.childNodes);t[1].removeAttribute("style"),t[2].removeAttribute("style")}},i.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+Mt);this.add(e,qn),this.itemPositioning()},i.prototype.itemPositioning=function(){var t,e=this.element.querySelector("."+Mt);if(!(0,s.hX)(e)&&e.classList.contains(qn)){var r,n=this.element.querySelector("."+Zi);r=[].slice.call(this.scrollModule?e.querySelector("."+(this.isVertical?"e-vscroll-content":"e-hscroll-content")).children:e.childNodes),t=this.isVertical?r[0].offsetHeight+r[2].offsetHeight:r[0].offsetWidth+r[2].offsetWidth;var l=this.isVertical?this.element.offsetHeight:this.element.offsetWidth;if(n){l-=this.isVertical?n.offsetHeight:n.offsetWidth;var h=(this.isVertical?n.offsetHeight:n.offsetWidth)+"px";r[2].removeAttribute("style"),this.isVertical?this.enableRtl?r[2].style.top=h:r[2].style.bottom=h:this.enableRtl?r[2].style.left=h:r[2].style.right=h}if(!(l<=t)){var d=(l-t-(this.isVertical?r[1].offsetHeight:r[1].offsetWidth))/2;r[1].removeAttribute("style");var p=(this.isVertical?r[0].offsetHeight:r[0].offsetWidth)+d+"px";this.isVertical?this.enableRtl?r[1].style.marginBottom=p:r[1].style.marginTop=p:this.enableRtl?r[1].style.marginRight=p:r[1].style.marginLeft=p}}},i.prototype.tbarItemAlign=function(e,t,n){var r=this;if(!e.showAlwaysInPopup||"Show"===e.overflow){var o=[];if(o.push(this.createElement("div",{className:"e-toolbar-left",attrs:{role:"group"}})),o.push(this.createElement("div",{className:ev,attrs:{role:"group"}})),o.push(this.createElement("div",{className:"e-toolbar-right",attrs:{role:"group"}})),0===n&&"Left"!==e.align)o.forEach(function(d){t.appendChild(d)}),this.tbarAlign=!0,this.add(t,qn);else if("Left"!==e.align){var h=o[0];[].slice.call(t.childNodes).forEach(function(d){r.tbarAlgEle.lefts.push(d),h.appendChild(d)}),t.appendChild(h),t.appendChild(o[1]),t.appendChild(o[2]),this.tbarAlign=!0,this.add(t,qn)}}},i.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,Mt),this.tbarEle=[],[].slice.call(this.trgtEle.children).forEach(function(n){"DIV"===n.tagName&&(e.tbarEle.push(n),(0,s.hX)(n.firstElementChild)||n.firstElementChild.setAttribute("aria-disabled","false"),e.add(n,Dt))})},i.prototype.renderItems=function(){var e=this.element,t=this.items;if(null!=this.trgtEle)this.ctrlTemplate();else if(e&&t.length>0){var n=void 0;e&&e.children.length>0&&(n=e.querySelector("."+Mt)),n||(n=this.createElement("div",{className:Mt})),this.itemsAlign(t,n),e.appendChild(n)}},i.prototype.setAttr=function(e,t){for(var r,n=Object.keys(e),o=0;o<n.length;o++)"class"===(r=n[parseInt(o.toString(),10)])?this.add(t,e[""+r]):t.setAttribute(r,e[""+r])},i.prototype.enableItems=function(e,t){var l,n=this,r=e,o=r.length;(0,s.hX)(t)&&(t=!0);var h=function(f,m){f?(m.classList.remove(Ti),(0,s.hX)(m.firstElementChild)||(m.firstElementChild.setAttribute("aria-disabled","false"),n.updateTabIndex("0"))):(m.classList.add(Ti),(0,s.hX)(m.firstElementChild)||(m.firstElementChild.setAttribute("aria-disabled","true"),m.firstElementChild.setAttribute("tabindex","-1"),n.updateTabIndex("0")))};if(!(0,s.hX)(o)&&o>=1){for(var d=0,p=[].slice.call(r);d<o;d++){var u=p[parseInt(d.toString(),10)];if("number"==typeof u){if(l=this.getElementByIndex(u),(0,s.hX)(l))return;r[parseInt(d.toString(),10)]=l}else l=u;h(t,l)}t?(0,s.vy)(r,Ti):(0,s.iQ)(r,Ti)}else{if("number"==typeof r){if(l=this.getElementByIndex(r),(0,s.hX)(l))return}else l=e;h(t,l)}},i.prototype.getElementByIndex=function(e){return this.tbarEle[parseInt(e.toString(),10)]?this.tbarEle[parseInt(e.toString(),10)]:null},i.prototype.addItems=function(e,t){var n;this.extendedOpen();var r=this.element.querySelector("."+Mt);if((0,s.hX)(r))this.itemsRerender(e);else{var o,l="Left";(0,s.hX)(t)&&(t=0),e.forEach(function(m){!(0,s.hX)(m.align)&&"Left"!==m.align&&"Left"===l&&(l=m.align)});for(var h=0,d=e;h<d.length;h++){var p=d[h];if((0,s.hX)(p.type)&&(p.type="Button"),n=(0,s.Ub)("."+Dt,this.element),p.align=l,o=this.renderSubComponent(p,t),this.tbarEle.length>=t&&n.length>=0){(0,s.hX)(this.scrollModule)&&this.destroyMode();
1var u="L"===p.align[0]?0:"C"===p.align[0]?1:2,f=void 0;this.tbarAlign||"Left"===l?this.tbarAlign?((f=(0,s.kp)(n[0],"."+Mt).children[parseInt(u.toString(),10)]).insertBefore(o,f.children[parseInt(t.toString(),10)]),this.tbarAlgEle[(p.align+"s").toLowerCase()].splice(t,0,o),this.refreshPositioning()):0===n.length?(n=(0,s.Ub)("."+Mt,this.element))[0].appendChild(o):n[0].parentNode.insertBefore(o,n[parseInt(t.toString(),10)]):(this.tbarItemAlign(p,r,1),this.tbarAlign=!0,(f=(0,s.kp)(n[0],"."+Mt).children[parseInt(u.toString(),10)]).appendChild(o),this.tbarAlgEle[(p.align+"s").toLowerCase()].push(o),this.refreshPositioning()),this.items.splice(t,0,p),p.template&&this.tbarEle.splice(this.tbarEle.length-1,1),this.tbarEle.splice(t,0,o),t++,this.offsetWid=r.offsetWidth}}r.style.width="",this.renderOverflowMode(),this.isReact&&this.renderReactTemplates()}},i.prototype.removeItems=function(e){var n,t=e,r=[].slice.call((0,s.Ub)("."+Dt,this.element));if("number"==typeof t)n=parseInt(e.toString(),10),this.removeItemByIndex(n,r);else if(t&&t.length>1)for(var o=0,l=[].slice.call(t);o<l.length;o++)n=this.tbarEle.indexOf(l[o]),this.removeItemByIndex(n,r),r=(0,s.Ub)("."+Dt,this.element);else n=r.indexOf(t&&t.length&&1===t.length?t[0]:e),this.removeItemByIndex(n,r);this.resize()},i.prototype.removeItemByIndex=function(e,t){if(this.tbarEle[parseInt(e.toString(),10)]&&t[parseInt(e.toString(),10)]){var n=this.tbarEle.indexOf(t[parseInt(e.toString(),10)]);if(this.tbarAlign){var r=this.tbarAlgEle[(this.items[parseInt(n.toString(),10)].align+"s").toLowerCase()].indexOf(this.tbarEle[parseInt(n.toString(),10)]);this.tbarAlgEle[(this.items[parseInt(n.toString(),10)].align+"s").toLowerCase()].splice(parseInt(r.toString(),10),1)}this.isReact&&this.clearToolbarTemplate(t[parseInt(e.toString(),10)]);var o=t[parseInt(e.toString(),10)].querySelector(".e-control.e-btn");!(0,s.hX)(o)&&!(0,s.hX)(o.ej2_instances[0])&&!o.ej2_instances[0].isDestroyed&&o.ej2_instances[0].destroy(),(0,s.Yo)(t[parseInt(e.toString(),10)]),this.items.splice(n,1),this.tbarEle.splice(n,1)}},i.prototype.templateRender=function(e,t,n,r){var h,l=e;if("object"==typeof e&&(h="function"==typeof l.appendTo),"string"!=typeof e&&h)"Input"===n.type&&((f=this.createElement("input")).id=n.id?n.id:(0,s.Lz)("tbr-ipt"),t.appendChild(f),l.appendTo(f));else{var p,d=void 0,u=new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);p="string"==typeof e?e.trim():e;try{if("object"!=typeof e||(0,s.hX)(e.tagName))if("string"==typeof e&&u.test(p))t.innerHTML=p;else if(document.querySelectorAll(p).length){var f,m=(f=document.querySelector(p)).outerHTML.trim();t.appendChild(f),f.style.display="",(0,s.hX)(m)||this.tempId.push(p)}else d=(0,s.wE)(p);else t.appendChild(e)}catch{d=(0,s.wE)(p)}var g=void 0;(0,s.hX)(d)||(g=d({},this,"template",this.element.id+r+"_template",this.isStringTemplate,void 0,void 0,this.root)),!(0,s.hX)(g)&&g.length>0&&[].slice.call(g).forEach(function(y){(0,s.hX)(y.tagName)||(y.style.display=""),t.appendChild(y)})}this.add(t,Jg);var b=t.firstElementChild;(0,s.hX)(b)||(b.setAttribute("tabindex",(0,s.hX)(b.getAttribute("tabIndex"))?"-1":this.getDataTabindex(b)),b.setAttribute("data-tabindex",(0,s.hX)(b.getAttribute("tabIndex"))?"-1":this.getDataTabindex(b))),this.tbarEle.push(t)},i.prototype.buttonRendering=function(e,t){var n=this.createElement("button",{className:"e-tbar-btn"});n.setAttribute("type","button");var o,l,r=e.text;n.id=e.id?e.id:(0,s.Lz)("e-tbr-btn");var h=this.createElement("span",{className:"e-tbar-btn-text"});r?(h.innerHTML=this.enableHtmlSanitizer?s.r4.sanitize(r):r,n.appendChild(h),n.classList.add("e-tbtn-txt")):this.add(t,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(o=e.prefixIcon+" e-icons",l="Left"):(o=e.suffixIcon+" e-icons",l="Right"));var d=new ke.$n({iconCss:o,iconPosition:l});return d.createElement=this.createElement,d.appendTo(n),e.width&&(0,s.sN)(n,{width:(0,s.IV)(e.width)}),n},i.prototype.renderSubComponent=function(e,t){var n,r=this.createElement("div",{className:Dt}),o=this.createElement("div",{innerHTML:this.enableHtmlSanitizer&&!(0,s.hX)(e.tooltipText)?s.r4.sanitize(e.tooltipText):e.tooltipText});if(this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,r),e.tooltipText&&r.setAttribute("title",o.textContent),e.cssClass&&(r.className=r.className+" "+e.cssClass),e.template)this.templateRender(e.template,r,e,t);else switch(e.type){case"Button":(n=this.buttonRendering(e,r)).setAttribute("tabindex",(0,s.hX)(e.tabIndex)?"-1":e.tabIndex.toString()),n.setAttribute("data-tabindex",(0,s.hX)(e.tabIndex)?"-1":e.tabIndex.toString()),n.setAttribute("aria-label",e.text||e.tooltipText),n.setAttribute("aria-disabled","false"),r.appendChild(n),r.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(r,kt)}if(e.showTextOn){var l=e.showTextOn;"Toolbar"===l?(this.add(r,Kg),this.add(r,"e-tbtn-align")):"Overflow"===l&&this.add(r,xp)}if(e.overflow){var h=e.overflow;"Show"===h?this.add(r,$n):"Hide"===h&&(r.classList.contains(kt)||this.add(r,Hc))}return"Show"!==e.overflow&&e.showAlwaysInPopup&&!r.classList.contains(kt)&&(this.add(r,Op),this.popupPriCount++),e.disabled&&this.add(r,Ti),!1===e.visible&&this.add(r,Gn),r},i.prototype.getDataTabindex=function(e){return(0,s.hX)(e.getAttribute("data-tabindex"))?"-1":e.getAttribute("data-tabindex")},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){var t=this.element.querySelector("."+Dt+":not(."+Ti+" ):not(."+kt+" ):not(."+Gn+" )");if((0,s.hX)(this.activeEle)||(this.activeEle.setAttribute("tabindex",this.getDataTabindex(this.activeEle)),t&&t.removeAttribute("tabindex"),t=this.activeEle),this.activeEle=e,"-1"===this.getDataTabindex(this.activeEle))if((0,s.hX)(this.trgtEle)&&!e.parentElement.classList.contains(Jg)){if(!(0,s.hX)(this.element.querySelector(".e-hor-nav"))&&this.element.querySelector(".e-hor-nav").classList.contains("e-nav-active")){this.updateTabIndex("0");var n="-1"===this.getDataTabindex(t)?"0":this.getDataTabindex(t);t.setAttribute("tabindex",n)}else this.updateTabIndex("-1");e.removeAttribute("tabindex")}else{var r=parseInt(this.getDataTabindex(this.activeEle),10)+1;this.activeEle.setAttribute("tabindex",r.toString())}},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.isAngular)&&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 t=this.checkOverflow(e,e.getElementsByClassName(Mt)[0]);if(!t){this.destroyScroll();var n=e.querySelector("."+Mt);(0,s.hX)(n)||(this.remove(n,iv),this.tbarAlign&&this.add(n,qn))}t&&this.scrollModule&&this.offsetWid===e.offsetWidth||((this.offsetWid>e.offsetWidth||t)&&this.renderOverflowMode(),this.popObj&&("Extended"===this.overflowMode&&(this.popObj.width=this.getToolbarPopupWidth(this.element)),this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()),this.element.querySelector("."+wp)&&(this.scrollStep=this.element.querySelector("."+wp).offsetWidth),this.offsetWid=e.offsetWidth,this.tbResize=!1,this.separator())},i.prototype.orientationChange=function(){var e=this;setTimeout(function(){e.resize()},500)},i.prototype.extendedOpen=function(){var e=this.element.querySelector("."+zc);"Extended"===this.overflowMode&&e&&(this.isExtendedOpen=e.classList.contains(Qg))},i.prototype.updateHideEleTabIndex=function(e,t,n,r,o){n&&(r=o.indexOf(e));for(var l=o[++r];l;){if(!this.eleContains(l)){var d=l.firstElementChild.getAttribute("data-tabindex");t&&"-1"===d?l.firstElementChild.setAttribute("tabindex","0"):d!==l.firstElementChild.getAttribute("tabindex")&&l.firstElementChild.setAttribute("tabindex",d);break}l=o[++r]}},i.prototype.clearToolbarTemplate=function(e){if(this.registeredTemplate&&this.registeredTemplate.template)for(var t=this.registeredTemplate,n=0;n<t.template.length;n++){var r=t.template[parseInt(n.toString(),10)].rootNodes[0],o=(0,s.kp)(r,"."+Dt);if(!(0,s.hX)(o)&&o===e){this.clearTemplate(["template"],[t.template[parseInt(n.toString(),10)]]);break}}else if(this.portals&&this.portals.length>0){var l=this.portals;for(n=0;n<l.length;n++){var h=l[parseInt(n.toString(),10)];if(o=(0,s.kp)(h.containerInfo,"."+Dt),!(0,s.hX)(o)&&o===e){this.clearTemplate(["template"],n);break}}}},i.prototype.onPropertyChanged=function(e,t){var n=this.element;this.extendedOpen();for(var r=0,o=Object.keys(e);r<o.length;r++)switch(o[r]){case"items":if(e.items instanceof Array&&t.items instanceof Array)this.itemsRerender(e.items);else for(var h=Object.keys(e.items),d=0;d<h.length;d++){var p=parseInt(Object.keys(e.items)[parseInt(d.toString(),10)],10),u=Object.keys(e.items[parseInt(p.toString(),10)])[0],f=Object(e.items[parseInt(p.toString(),10)])[""+u];if(this.tbarAlign||"align"===u){this.refresh(),this.trigger("created");break}var g="overflow"===u&&0!==this.popupPriCount;("showAlwaysInPopup"===u&&!f||this.items[parseInt(p.toString(),10)].showAlwaysInPopup&&g)&&--this.popupPriCount,(0,s.hX)(this.scrollModule)&&this.destroyMode();var v=[].slice.call((0,s.Ub)("."+Mt+" ."+Dt,n));this.isReact&&this.items[parseInt(p.toString(),10)].template&&this.clearToolbarTemplate(v[parseInt(p.toString(),10)]),(0,s.Yo)(v[parseInt(p.toString(),10)]),this.tbarEle.splice(p,1),this.addItems([this.items[parseInt(p.toString(),10)]],p),this.items.splice(p,1),this.items[parseInt(p.toString(),10)].template&&this.tbarEle.splice(this.items.length,1)}break;case"width":(0,s.sN)(n,{width:(0,s.IV)(e.width)}),this.refreshOverflow();break;case"height":(0,s.sN)(this.element,{height:(0,s.IV)(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(n,cr),this.refreshOverflow();break;case"enableRtl":e.enableRtl?this.add(n,cr):this.remove(n,cr),(0,s.hX)(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,cr):this.remove(this.scrollModule.element,cr)),(0,s.hX)(this.popObj)||(e.enableRtl?this.add(this.popObj.element,cr):this.remove(this.popObj.element,cr)),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":t.cssClass&&(0,s.vy)([this.element],t.cssClass.split(" ")),e.cssClass&&(0,s.iQ)([this.element],e.cssClass.split(" "));break;case"allowKeyboard":this.unwireKeyboardEvent(),e.allowKeyboard&&this.wireKeyboardEvent()}},i.prototype.hideItem=function(e,t){var o,n="object"==typeof e,r=e;if(n||!(0,s.hX)(r)){var l=[].slice.call((0,s.Ub)("."+Dt,this.element));n?o=e:this.tbarEle[parseInt(r.toString(),10)]&&(o=[].slice.call((0,s.Ub)("."+Dt,this.element))[parseInt(r.toString(),10)]),o&&(t?(o.classList.add(Gn),o.classList.contains(kt)||((0,s.hX)(o.firstElementChild.getAttribute("tabindex"))||"-1"!==o.firstElementChild.getAttribute("tabindex"))&&this.updateHideEleTabIndex(o,t,n,r,l)):(o.classList.remove(Gn),o.classList.contains(kt)||this.updateHideEleTabIndex(o,t,n,r,l)),this.refreshOverflow())}},ht([(0,s.pM)([],O_)],i.prototype,"items",void 0),ht([(0,s.mA)("auto")],i.prototype,"width",void 0),ht([(0,s.mA)("auto")],i.prototype,"height",void 0),ht([(0,s.mA)("")],i.prototype,"cssClass",void 0),ht([(0,s.mA)("Scrollable")],i.prototype,"overflowMode",void 0),ht([(0,s.mA)()],i.prototype,"scrollStep",void 0),ht([(0,s.mA)(!0)],i.prototype,"enableCollision",void 0),ht([(0,s.mA)(!0)],i.prototype,"enableHtmlSanitizer",void 0),ht([(0,s.mA)(!0)],i.prototype,"allowKeyboard",void 0),ht([(0,s.Jh)()],i.prototype,"clicked",void 0),ht([(0,s.Jh)()],i.prototype,"created",void 0),ht([(0,s.Jh)()],i.prototype,"destroyed",void 0),ht([(0,s.Jh)()],i.prototype,"beforeCreate",void 0),ht([(0,s.Jh)()],i.prototype,"keyDown",void 0),ht([s.kc],i)}
1(s.uA),Jc=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),ge=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},xn="e-treeview",bv="e-control",Lt="e-icon-collapsible",$e="e-icon-expandable",Oe="e-list-item",Xs="e-list-text",qe="e-list-parent",Kc="e-hover",Si="e-active",Zc="e-icons-spinner",Vr="e-process",ni="e-icons",hi="e-text-content",eh="e-input",yv="e-input-group",th="e-tree-input",$p="e-editing",Cv="e-interaction",Ev="e-droppable",ih="e-dragging",Ga="e-sibling",nh="e-drop-in",Ya="e-drop-next",qp="e-drop-out",Gp="e-no-drop",Fr="e-fullrow",No="e-selected",rh="e-expanded",_v="e-node-collapsed",Vo="e-disable",Ci="e-check",wn="e-stop",ki="e-treeview-checkbox",dr="e-frame",Tv="e-ripple",js="e-node-focus",Iv="e-list-img",sh="e-animation-active",xv="e-disabled",Qa="e-prevent",wv={treeRole:"group",itemRole:"treeitem",listRole:"group",itemText:"",wrapperRole:""},sT=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return Jc(i,a),ge([(0,s.mA)("child")],i.prototype,"child",void 0),ge([(0,s.mA)([])],i.prototype,"dataSource",void 0),ge([(0,s.mA)("expanded")],i.prototype,"expanded",void 0),ge([(0,s.mA)("hasChildren")],i.prototype,"hasChildren",void 0),ge([(0,s.mA)("htmlAttributes")],i.prototype,"htmlAttributes",void 0),ge([(0,s.mA)("iconCss")],i.prototype,"iconCss",void 0),ge([(0,s.mA)("id")],i.prototype,"id",void 0),ge([(0,s.mA)("imageUrl")],i.prototype,"imageUrl",void 0),ge([(0,s.mA)("isChecked")],i.prototype,"isChecked",void 0),ge([(0,s.mA)("parentID")],i.prototype,"parentID",void 0),ge([(0,s.mA)(null)],i.prototype,"query",void 0),ge([(0,s.mA)("selectable")],i.prototype,"selectable",void 0),ge([(0,s.mA)("selected")],i.prototype,"selected",void 0),ge([(0,s.mA)(null)],i.prototype,"tableName",void 0),ge([(0,s.mA)("text")],i.prototype,"text",void 0),ge([(0,s.mA)("tooltip")],i.prototype,"tooltip",void 0),ge([(0,s.mA)("navigateUrl")],i.prototype,"navigateUrl",void 0),i}(s.I1),Ov=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return Jc(i,a),ge([(0,s.mA)("SlideDown")],i.prototype,"effect",void 0),ge([(0,s.mA)(400)],i.prototype,"duration",void 0),ge([(0,s.mA)("linear")],i.prototype,"easing",void 0),i}(s.I1),oT=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return Jc(i,a),ge([(0,s.pr)({effect:"SlideUp",duration:400,easing:"linear"},Ov)],i.prototype,"collapse",void 0),ge([(0,s.pr)({effect:"SlideDown",duration:400,easing:"linear"},Ov)],i.prototype,"expand",void 0),i}(s.I1),Av=function(a){function i(t,n){var r=a.call(this,t,n)||this;return r.isRefreshed=!1,r.preventExpand=!1,r.checkedElement=[],r.disableNode=[],r.validArr=[],r.validNodes=[],r.expandChildren=[],r.isFieldChange=!1,r.changeDataSource=!1,r.hasTemplate=!1,r.isFirstRender=!1,r.isNodeDropped=!1,r.isInteracted=!1,r.isRightClick=!1,r.mouseDownStatus=!1,r.isDropIn=!1,r.OldCheckedData=[],r.isHiddenItem=!1,r}var e;return Jc(i,a),e=i,i.prototype.getModuleName=function(){return"treeview"},i.prototype.preRender=function(){var t=this;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",shiftSpace:"shift+space",ctrlSpace:"ctrl+space"},this.listBaseOption={expandCollapse:!0,showIcon:!0,expandIconClass:$e,ariaAttributes:wv,expandIconPosition:"Left",itemCreated:function(n){t.beforeNodeCreate(n)},enableHtmlSanitizer:this.enableHtmlSanitizer,itemNavigable:this.fullRowNavigable},this.updateListProp(this.fields),this.aniObj=new s.X5({}),this.treeList=[],this.isLoaded=!1,this.isInitalExpand=!1,this.expandChildren=[],this.index=0,this.setTouchClass(),this.DDTTreeData=JSON.parse(JSON.stringify(this.fields.dataSource)),(0,s.hX)(this.selectedNodes)&&this.setProperties({selectedNodes:[]},!0),(0,s.hX)(this.checkedNodes)&&this.setProperties({checkedNodes:[]},!0),(0,s.hX)(this.expandedNodes)?this.setProperties({expandedNodes:[]},!0):this.isInitalExpand=!0},i.prototype.getPersistData=function(){return this.addOnPersist(["selectedNodes","checkedNodes","expandedNodes"])},i.prototype.render=function(){this.initialRender=!0,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.initialRender=!1,this.renderComplete()},i.prototype.initialize=function(){this.element.setAttribute("role","tree"),!(0,s.hX)(this.fields.dataSource)&&Array.isArray(this.fields.dataSource)&&0!==this.fields.dataSource.length&&this.element.setAttribute("aria-activedescendant",this.element.i
1d+"_active"),this.setCssClass(null,this.cssClass),this.setEnableRtl(),this.setFullRow(this.fullRowSelect),this.setTextWrap(),this.nodeTemplateFn=this.templateComplier(this.nodeTemplate)},i.prototype.setDisabledMode=function(){this.disabled?(this.element.classList.add(xv),this.element.setAttribute("aria-disabled","true")):(this.element.classList.remove(xv),this.element.setAttribute("aria-disabled","false"))},i.prototype.setEnableRtl=function(){(this.enableRtl?s.iQ:s.vy)([this.element],"e-rtl")},i.prototype.setRipple=function(){this.rippleFn=(0,s.CF)(this.element,{selector:"."+Fr+",."+hi,ignore:"."+hi+" > ."+ni+",."+yv+",."+eh+", ."+ki}),this.rippleIconFn=(0,s.CF)(this.element,{selector:"."+hi+" > ."+ni,isCenterRipple:!0})},i.prototype.setFullRow=function(t){(t?s.iQ:s.vy)([this.element],"e-fullrow-wrap")},i.prototype.setMultiSelect=function(t){this.element.setAttribute("aria-multiselectable",t?"true":"false")},i.prototype.templateComplier=function(t){if(t){this.hasTemplate=!0,this.element.classList.add(Cv);try{return"function"!=typeof t&&document.querySelectorAll(t).length?(0,s.wE)(document.querySelector(t).innerHTML.trim()):(0,s.wE)(t)}catch{return(0,s.wE)(t)}}this.element.classList.remove(Cv)},i.prototype.setDataBinding=function(t){var n=this;this.treeList.push("false"),this.fields.dataSource instanceof x.M1?(this.isOffline=this.fields.dataSource.dataSource.offline,this.fields.dataSource.ready?this.fields.dataSource.ready.then(function(r){n.isOffline=n.fields.dataSource.dataSource.offline,n.fields.dataSource instanceof x.M1&&n.isOffline&&(n.treeList.pop(),n.treeData=r.result,n.isNumberTypeId=n.getType(),n.setRootData(),n.renderItems(!0),0===n.treeList.length&&!n.isLoaded&&n.finalize())}).catch(function(r){n.trigger("actionFailure",{error:r})}):this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function(r){n.treeList.pop(),n.treeData=r.result,n.isNumberTypeId=n.getType(),n.setRootData(),t&&(n.changeDataSource=!0),n.renderItems(!0),n.changeDataSource=!1,0===n.treeList.length&&!n.isLoaded&&n.finalize()}).catch(function(r){n.trigger("actionFailure",{error:r})})):(this.treeList.pop(),(0,s.hX)(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()},i.prototype.getQuery=function(t,n){void 0===n&&(n=null);var o,r=[];if(t.query)o=t.query.clone();else{o=new x.XK;for(var l=this.getActualProperties(t),h=0,d=Object.keys(l);h<d.length;h++){var p=d[h];"dataSource"!==p&&"tableName"!==p&&"child"!==p&&t[""+p]&&"url"!==p&&-1===r.indexOf(t[""+p])&&r.push(t[""+p])}o.select(r),Object.prototype.hasOwnProperty.call(l,"tableName")&&o.from(t.tableName)}return ce.iY.addSorting(this.sortOrder,t.text,o),!(0,s.hX)(n)&&!(0,s.hX)(t.parentID)&&o.where(t.parentID,"equal",this.isNumberTypeId?parseFloat(n):n),o},i.prototype.getType=function(){return!!this.treeData[0]&&"number"==typeof(0,s._W)(this.fields.id,this.treeData[0])},i.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 t=this.getChildNodes(this.treeData,void 0,!0);this.rootData=(0,s.hX)(t)?[]:t}else this.rootData=this.treeData},i.prototype.isChildObject=function(){return"object"==typeof this.fields.child},i.prototype.renderItems=function(t){this.listBaseOption.ariaAttributes.level=1;var n=this.getSortedData(this.rootData);this.ulElement=ce.iY.createList(this.createElement,t?this.rootData:n,this.listBaseOption),this.element.appendChild(this.ulElement);var r=this.ulElement.querySelectorAll(".e-list-item");if(!1===this.loadOnDemand)for(var o=0;o<r.length;)this.renderChildNodes(r[parseInt(o.toString(),10)],!0,null,!0),o++;(1===(0,s.Ub)("."+qe,this.element).length&&r&&0!==r.length||this.loadOnDemand)&&this.finalizeNode(this.element),this.parentNodeCheck=[],this.parentCheckData=[],this.updateCheckedStateFromDS(),this.autoCheck&&this.showCheckBox&&!this.isLoaded&&this.updateParentCheckState()},i.prototype.updateCheckedStateFromDS=function(){if(this.validNodes=[],this.treeData&&this.showCheckBox){if(1===this.dataType){for(var t=this.fields,n=new x.M1(this.treeData).executeLocal((new x.XK).where(t.isChecked,"equal",!0,!1)),r=0;r<n.length;r++){var o=n[parseInt(r.toString(),10)][this.fields.id]?n[parseInt(r.toString(),10)][this.fields.id].toString():null;if(-1===this.checkedNodes.indexOf(o)&&!this.isLoaded&&this.checkDisabledState(o,n[r]),n[parseInt(r.toString(),10)][this.fields.hasChildren])for(var l=n[parseInt(r.toString(),10)][this.fields.id],h=new x.M1(this.treeData).executeLocal((new x.XK).where(t.parentID,"equal",l,!1)),d=0;d<h.length;d++){var p=h[parseInt(d.toString(),10)][this.fields.id]?h[parseInt(d.toString(),10)][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(p)&&this.autoCheck&&this.checkDisabledState(p,h[d])}}for(r=0;r<this.checkedNodes.length;r++){var u=this.fields,f=new x.M1(this.treeData).executeLocal((new x.XK).where(u.id,"equal",this.checkedNodes[parseInt(r.toString(),10)],!0));if(f[0]&&this.autoCheck&&(this.getCheckedNodeDetails(u,f),this.checkIndeterminateState(f[0])),f.length>0){var m=f[0][this.fields.id]?f[0][this.fields.id].toString():null;this.checkedNodes.indexOf(m)>-1&&-1===this.validNodes.indexOf(m)&&this.validNodes.push(m)}for(var g=new x.M1(this.treeData).executeLocal((new x.XK).where(u.parentID,"equal",this.checkedNodes[parseInt(r.toString(),10)],!0)),v=0;v<g.length;v++)m=g[parseInt(v.toString(),10)][this.fields.id]?g[parseInt(v.toString(),10)][this.fields.id].toString():null,-1===this.checkedNodes.indexOf(m)&&this.autoCheck&&this.checkDisabledState(m,g[v]),this.checkedNodes.indexOf(m)>-1&&-1===this.validNodes.indexOf(m)&&this.validNodes.push(m)}}else if(2===this.dataType||this.fields.dataSource instanceof x.M1&&this.isOffline){for(v=0;v<this.treeData.length;v++){var b=this.treeData[parseInt(v.toString(),10)][this.fields.id]?this.treeData[parseInt(v.toString(),10)][this.fields.id].toString():"";this.treeData[parseInt(v.toString(),10)][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(b)&&this.checkDisabledState(b,this.treeData[v]),this.checkedNodes.indexOf(b)>-1&&-1===this.validNodes.indexOf(b)&&this.validNodes.push(b);var y=(0,s._W)(this.fields.child.toString(),this.treeData[parseInt(v.toString(),10)]);y&&this.updateChildCheckState(y,this.treeData[parseInt(v.toString(),10)])}this.validNodes=this.enablePersistence?this.checkedNodes:this.validNodes}this.setProperties({checkedNodes:this.validNodes},!0)}},i.prototype.getCheckedNodeDetails=function(t,n){var r=n[0][this.fields.parentID]?n[0][this.fields.parentID].toString():null,o=0,l=this.element.querySelector('[data-uid="'+n[0][this.fields.id]+'"]'),h=this.element.querySelector('[data-uid="'+n[0][this.fields.parentID]+'"]');if(l||h)h&&((0,s.Lt)("."+Ci,h)||this.changeState(h,"indeterminate",null,!0,!0));else{-1===this.parentNodeCheck.indexOf(r)&&this.parentNodeCheck.push(r);for(var d=this.getChildNodes(this.treeData,r),p=0;p<d.length;p++){var u=d[parseInt(p.toString(),10)][this.fields.id]?d[parseInt(p.toString(),10)][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(u)&&o++,o===d.length&&-1===this.checkedNodes.indexOf(r)&&this.checkDisabledState(r)}var f=new x.M1(this.treeData).executeLocal((new x.XK).where(t.id,"equal",r,!0));this.getCheckedNodeDetails(t,f)}},i.prototype.updateParentCheckState=function(){var n,t=(0,s.Ub)("."+wn,this.element),r=this.treeData;this.element.classList.contains("e-filtering")&&(r=this.DDTTreeData);for(var o=0;o<t.length;o++){var l=(0,s.kp)(t[parseInt(o.toString(),10)],"."+Oe),h=l.getAttribute("data-uid").toString(),d=void 0;this.element.classList.contains("e-filtering")&&(d=new x.M1(this.OldCheckedData).executeLocal((new x.XK).where("parentID","equal",h,!0))),n=1===this.dataType?new x.M1(r).executeLocal((new x.XK).where(this.fields.parentID,"equal",h,!0)):this.getChildNodes(r,h);var p=0;if(n){for(var u=function(v){var b=n[parseInt(v.toString(),10)][f.fields.id].toString();(-1!==f.checkedNodes.indexOf(b)||f.element.classList.contains("e-filtering")&&-1!==d.findIndex(function(y){return y.id===b}))&&p++},f=this,m=0;m<n.length;m++)u(m);
1if(p===n.length){var g=l.getAttribute("data-uid");-1===this.checkedNodes.indexOf(g)&&this.checkDisabledState(g),this.changeState(l,"check",null,!0,!0)}else 0===p&&0===this.checkedNodes.length&&this.changeState(l,"uncheck",null,!0,!0)}}},i.prototype.checkIndeterminateState=function(t){var n;(n=this.element.querySelector(1===this.dataType?'[data-uid="'+t[this.fields.parentID]+'"]':'[data-uid="'+t[this.fields.id]+'"]'))?"true"!==n.getAttribute("aria-checked")&&this.changeState(n,"indeterminate",null,!0,!0):2===this.dataType&&-1===this.parentNodeCheck.indexOf(t[this.fields.id].toString())&&this.parentNodeCheck.push(t[this.fields.id].toString())},i.prototype.updateChildCheckState=function(t,n){for(var r=0,o=n[this.fields.id]?n[this.fields.id].toString():"",l=0;l<t.length;l++){var h=t[parseInt(l.toString(),10)][this.fields.id]?t[parseInt(l.toString(),10)][this.fields.id].toString():"";t[parseInt(l.toString(),10)][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(h)&&this.checkDisabledState(h,t[l]),-1!==this.checkedNodes.indexOf(o)&&-1===this.checkedNodes.indexOf(h)&&this.autoCheck&&this.checkDisabledState(h,t[l]),-1!==this.checkedNodes.indexOf(h)&&this.autoCheck&&r++,this.checkedNodes.indexOf(h)>-1&&-1===this.validNodes.indexOf(h)&&this.validNodes.push(h);var d=(0,s._W)(this.fields.child.toString(),t[parseInt(l.toString(),10)]);d&&d.length&&(-1===this.parentCheckData.indexOf(n)&&this.parentCheckData.push(n),this.updateChildCheckState(d,t[parseInt(l.toString(),10)])),r===t.length&&this.autoCheck&&-1===this.checkedNodes.indexOf(o)&&this.checkDisabledState(o,n)}if(0!==r&&this.autoCheck){this.checkIndeterminateState(n);for(var p=0;p<this.parentCheckData.length;p++)n!==this.parentCheckData[parseInt(p.toString(),10)]&&this.parentCheckData[parseInt(p.toString(),10)]&&this.checkIndeterminateState(this.parentCheckData[parseInt(p.toString(),10)])}this.parentCheckData=[]},i.prototype.beforeNodeCreate=function(t){if(this.showCheckBox){var n=(0,ke.OK)(this.createElement,!0,{cssClass:this.touchClass});n.classList.add(ki);var r=(0,s.Lt)("div."+$e+", div."+Lt,t.item),o=t.item.getAttribute("data-uid");t.item.childNodes[0].insertBefore(n,t.item.childNodes[0].childNodes[(0,s.hX)(r)?0:1]);var l=(0,s._W)(t.fields.isChecked,t.curData);this.checkedNodes.indexOf(o)>-1?((0,s.Lt)("."+dr,n).classList.add(Ci),t.item.setAttribute("aria-checked","true"),this.addCheck(t.item)):(0,s.hX)(l)||"true"!==l.toString()?t.item.setAttribute("aria-checked","false"):((0,s.Lt)("."+dr,n).classList.add(Ci),t.item.setAttribute("aria-checked","true"),this.addCheck(t.item));var h=(0,s.Lt)("."+dr,n);s.Jm.add(h,"mousedown",this.frameMouseHandler,this),s.Jm.add(h,"mouseup",this.frameMouseHandler,this)}this.fullRowSelect&&this.createFullRow(t.item),this.allowMultiSelection&&!t.item.classList.contains(No)&&t.item.setAttribute("aria-selected","false");var d=t.fields;if(this.addActionClass(t,d.selected,No),this.addActionClass(t,d.expanded,rh),t.item.setAttribute("tabindex","-1"),s.Jm.add(t.item,"focus",this.focusIn,this),!(0,s.hX)(this.nodeTemplateFn)){var p=t.item.querySelector("."+Xs),u=t.item.getAttribute("data-uid");p.innerHTML="",this.renderNodeTemplate(t.curData,p,u)}this.isRefreshed||(this.trigger("drawNode",{node:t.item,nodeData:t.curData,text:t.text}),!1!==t.curData[this.fields.selectable]||this.showCheckBox)||(t.item.classList.add(Qa),t.item.firstElementChild.style.cursor="not-allowed")},i.prototype.frameMouseHandler=function(t){var n=(0,s.Lt)(".e-ripple-container",t.target.parentElement);(0,ke.Wn)(t,n)},i.prototype.addActionClass=function(t,n,r){var l=(0,s._W)(n,t.curData);!(0,s.hX)(l)&&"false"!==l.toString()&&t.item.classList.add(r)},i.prototype.getDataType=function(t,n){if(this.fields.dataSource instanceof x.M1){for(var r=0;r<t.length;r++)if(this.isOffline){if("string"==typeof n.child&&(0,s.hX)((0,s._W)(n.child,t[parseInt(r.toString(),10)]))&&!(0,s.hX)((0,s._W)(n.parentID,t[parseInt(r.toString(),10)])))return 1}else if("string"==typeof n.child&&(0,s.hX)((0,s._W)(n.child,t[parseInt(r.toString(),10)])))return 1;return 2}r=0;for(var o=t.length;r<o;r++){if("string"==typeof n.child&&(!(0,s.hX)((0,s._W)(n.child,t[parseInt(r.toString(),10)]))||Object.prototype.hasOwnProperty.call(t[parseInt(r.toString(),10)],n.child))||this.isChildObject())return 2;if(!(0,s.hX)((0,s._W)(n.parentID,t[parseInt(r.toString(),10)]))||!(0,s.hX)((0,s._W)(n.hasChildren,t[parseInt(r.toString(),10)])))return 1}return 1},i.prototype.getGroupedData=function(t,n){for(var r=(new x.XK).group(n),o=ce.iY.getDataSource(t,r),l=[],h=0;h<o.length;h++){var d=o[parseInt(h.toString(),10)].items;l.push(d)}return l},i.prototype.getSortedData=function(t){return t&&"None"!==this.sortOrder&&(t=ce.iY.getDataSource(t,ce.iY.addSorting(this.sortOrder,this.fields.text))),t},i.prototype.finalizeNode=function(t,n,r){var o=this;if(n||this.updateAttributes(t),!r){var l=(0,s.Ub)("."+rh,t);if(!this.loadOnDemand&&this.fields.dataSource instanceof x.M1&&(this.isInitalExpand=this.treeData.filter(function(d){return!0===d[o.fields.expanded]}).length>0||this.isInitalExpand),!this.isInitalExpand)for(var h=0;h<l.length;h++)this.renderChildNodes(l[parseInt(h.toString(),10)]);(0,s.vy)(l,rh)}n||this.updateList(),this.isLoaded&&this.updateCheckedProp()},i.prototype.updateAttributes=function(t){for(var n=(0,s.Ub)("."+Iv,t),r=0;r<n.length;r++)n[parseInt(r.toString(),10)].setAttribute("alt",Iv);if(this.isLoaded){for(var o=(0,s.Ub)("."+No,t),l=0;l<o.length;l++){this.selectNode(o[parseInt(l.toString(),10)],null);break}(0,s.vy)(o,No)}for(var h=(0,s.Ub)("."+Oe+":not(."+rh+")",t),d=0;d<h.length;d++){var p=(0,s.Lt)("div."+ni,h[parseInt(d.toString(),10)]);p&&p.classList.contains($e)&&this.disableExpandAttr(h[parseInt(d.toString(),10)])}},i.prototype.updateCheckedProp=function(){if(this.showCheckBox){var t=[].concat([],this.checkedNodes);this.setProperties({checkedNodes:t},!0)}},i.prototype.ensureIndeterminate=function(){if(this.autoCheck)for(var t=(0,s.Ub)("li",this.element),r=0;r<t.length;r++)t[parseInt(r.toString(),10)].classList.contains(Oe)&&((0,s.Lt)("."+qe,t[parseInt(r.toString(),10)])?this.ensureParentCheckState(t[parseInt(r.toString(),10)]):this.ensureChildCheckState(t[parseInt(r.toString(),10)]));else{var o=(0,s.Ub)("."+wn,this.element);for(r=0;r<o.length;r++)o[parseInt(r.toString(),10)].classList.remove(wn)}},i.prototype.ensureParentCheckState=function(t){if(!(0,s.hX)(t)){if(t.classList.contains(xn))return;var n=t;t.classList.contains(Oe)&&(n=(0,s.Lt)("."+qe,t));var r=(0,s.Ub)("."+ki+" ."+Ci,n),o=(0,s.Ub)("."+wn,n),l=(0,s.Ub)(this.checkDisabledChildren?"."+Oe:"."+Oe+":not(."+Vo+")",n),h=t.getElementsByClassName(ki)[0],d=l.length,p=r.length,u=[],f=[],m=t.getAttribute("data-uid"),g=!0,v=!1;
1l.forEach(function(w){w instanceof HTMLElement&&("true"===w.getAttribute("aria-checked")?v=!0:g=!1)});var b=!1;if(this.element.classList.contains("e-filtering")){p=new x.M1(this.OldCheckedData).executeLocal((new x.XK).where("parentID","equal",m,!0)).length;var S=new x.M1(this.OldCheckedData).executeLocal((new x.XK).where("hasChildren","equal",!0,!0));S.length>0&&v&&(this.OldCheckedData.some(function(w){return w.id===m})||-1!==this.parentNodeCheck.indexOf(m))&&(p=S.length,b=!0),d=(1===this.dataType?new x.M1(this.DDTTreeData).executeLocal((new x.XK).where(this.fields.parentID,"equal",m,!0)):this.getChildNodes(this.DDTTreeData,m)).length}if(!this.autoCheck||!this.showCheckBox||this.fields.dataSource instanceof x.M1||(u=this.getSelectedChildNodeDetails(m),f=new x.M1(this.checkActionNodes).executeLocal((new x.XK).where("parentID","equal",m,!0))),0===d&&0===p)return;d===p||b&&d>0&&(f.length===u.length||f.length!==u.length)&&0!==f.length&&0!==u.length&&g&&this.autoCheck&&this.showCheckBox?this.changeState(h,"check",null,!0,!0):p>0&&!b&&this.autoCheck&&this.showCheckBox||p>0||o.length>0?this.changeState(h,"indeterminate",null,!0,!0):0===p&&this.changeState(h,"uncheck",null,!0,!0);var T=(0,s.kp)(t,"."+qe);if(!(0,s.hX)(T)){var I=(0,s.kp)(T,"."+Oe);this.ensureParentCheckState(I)}}},i.prototype.getSelectedChildNodeDetails=function(t){var n=this,r="string"==typeof this.fields.child?this.fields.child:null,o=this.fields.id,l=this.fields.parentID;return this.checkedNodes.map(function(d){return n.getNodeObject(d)}).filter(function(d){return!!(d&&"object"==typeof d&&r in d||2!==n.dataType&&"object"==typeof d&&(l in d||r in d))&&function(d){if(!(0,s.hX)(r)&&r in d&&Array.isArray(d[r])){var p=d[o];if(!(0,s.hX)(p))return p.toString()===t}else{var u=d[l];if(!(0,s.hX)(u))return u.toString()===t}return!1}(d)})},i.prototype.ensureChildCheckState=function(t,n,r){var o=this;if(!(0,s.hX)(t)){var l=(0,s.Lt)("."+qe,t),h=void 0;if(!(0,s.hX)(l)){var d=Array.from(l.querySelectorAll("li"));h=(0,s.Ub)("."+ki,l),this.isFilter&&(h=Array.from(h).filter(function(b){var y=b.closest("li").getAttribute("data-uid");return null!==y&&-1!==o.checkedNodes.indexOf(y)}),d=Array.from(d).filter(function(b){var y=b.getAttribute("data-uid");return null!==y&&-1!==o.checkedNodes.indexOf(y)}),0===h.length&&(h=(0,s.Ub)("."+ki,l),d=Array.from(l.querySelectorAll("li"))));for(var p=t.getElementsByClassName(dr)[0].classList.contains(Ci),u=t.getElementsByClassName(dr)[0].classList.contains(wn),f=void 0,m=0;m<h.length;m++){var g=d[parseInt(m.toString(),10)].getAttribute("data-uid");if((0,s.hX)(this.currentLoadData)||(0,s.hX)((0,s._W)(this.fields.isChecked,this.currentLoadData[parseInt(m.toString(),10)]))){var v=h[parseInt(m.toString(),10)].getElementsByClassName(dr)[0].classList.contains(Ci);p||v&&!this.isLoaded||-1!==this.checkedNodes.indexOf(g)&&this.isLoaded&&(u||p)?f="check":d[parseInt(m.toString(),10)].classList.contains("e-has-child")&&!(0,s.b0)(this.parentNodeCheck)&&this.autoCheck&&(p||u)&&-1!==this.parentNodeCheck.indexOf(g)||1===this.dataType&&!(0,s.b0)(this.parentNodeCheck)&&this.autoCheck&&(p||u)&&-1!==this.parentNodeCheck.indexOf(g)?(f="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(g),1)):f="uncheck"}else f=(0,s._W)(this.fields.isChecked,this.currentLoadData[parseInt(m.toString(),10)])?"check":"uncheck",-1!==this.ele&&(f=p?"check":"uncheck"),"uncheck"===f&&!(0,s.b0)(this.parentNodeCheck)&&this.autoCheck&&-1!==this.parentNodeCheck.indexOf(g)&&(this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(g),1),f="indeterminate");this.changeState(h[parseInt(m.toString(),10)],f,n,!0,!0)}}this.autoCheck&&this.isLoaded&&!r&&this.updateParentCheckState()}},i.prototype.doCheckBoxAction=function(t,n){if((0,s.hX)(t)){var m=(0,s.Ub)("."+ki,this.element);if(this.loadOnDemand)for(var g=0;g<m.length;g++){var o=(0,s.kp)(m[parseInt(g.toString(),10)],"."+Oe);this.updateFieldChecked(m[parseInt(g.toString(),10)],n),this.changeState(m[parseInt(g.toString(),10)],n?"check":"uncheck",null,null,null,n),this.updateOldCheckedData([this.getNodeData(o)])}else for(g=0;g<m.length;g++)o=(0,s.kp)(m[parseInt(g.toString(),10)],"."+Oe),this.updateFieldChecked(m[parseInt(g.toString(),10)],n),this.changeState(m[parseInt(g.toString(),10)],n?"check":"uncheck"),this.updateOldCheckedData([this.getNodeData(o)])}else{t.reverse();for(var r=t.length-1;r>=0;r--)if(o=this.getElement(t[parseInt(r.toString(),10)]),(0,s.hX)(o)){if(""!==(l=t[r-t.length]?t[r-t.length].toString():t[parseInt(r.toString(),10)]?t[parseInt(r.toString(),10)].toString():null)&&n&&l)this.setValidCheckedNode(l,t),this.dynamicCheckState(l,n);else if(-1!==this.checkedNodes.indexOf(l)&&""!==l&&!n){this.checkedNodes.splice(this.checkedNodes.indexOf(l),1);var h=this.getChildNodes(this.treeData,l);if(h){for(var d=0;d<h.length;d++){var p=h[parseInt(d.toString(),10)][this.fields.id]?h[parseInt(d.toString(),10)][this.fields.id].toString():null;if(-1!==this.checkedNodes.indexOf(p)){this.checkedNodes.splice(this.checkedNodes.indexOf(p),1);var u=this.element.querySelector('[data-uid="'+p+'"]');u&&this.changeState(u,"uncheck",null)}}-1!==this.parentNodeCheck.indexOf(l)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(l),1)}l&&this.dynamicCheckState(l,n),this.updateField(this.treeData,this.fields,l,"isChecked",null)}}else{var f=(0,s.Lt)("."+qe+" ."+ki,o);this.validateCheckNode(f,!n,o,null)}}if(t)for(var v=0;v<t.length-1;v++){var l=t[parseInt(v.toString(),10)]?t[parseInt(v.toString(),10)].toString():"";n||this.updateField(this.treeData,this.fields,l,"isChecked",null)}this.autoCheck&&this.updateParentCheckState()},i.prototype.updateFieldChecked=function(t,n){var r=(0,s.kp)(t,"."+Oe),o=r.getAttribute("data-uid");"true"===this.getNodeData(r).isChecked&&!n&&this.updateField(this.treeData,this.fields,o,"isChecked",null)},i.prototype.dynamicCheckState=function(t,n){if(1===this.dataType){var r=0,o=new x.M1(this.treeData).executeLocal((new x.XK).where(this.fields.id,"equal",t,!0));if(o[0]){var l=o[0][this.fields.id]?o[0][this.fields.id].toString():null,h=o[0][this.fields.parentID]?o[0][this.fields.parentID].toString():null,d=this.element.querySelector('[data-uid="'+h+'"]'),p=this.element.querySelector('[data-uid="'+l+'"]'),u=this.getChildNodes(this.treeData,h);if(u)for(var f=0;f<u.length;f++){var m=u[parseInt(f.toString(),10)][this.fields.id]?u[parseInt(f.toString(),10)][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(m)&&r++}-1!==this.checkedNodes.indexOf(t)&&d&&l===t&&this.autoCheck?this.changeState(d,"indeterminate",null):-1===this.checkedNodes.indexOf(t)&&p&&l===t&&!n?this.changeState(p,"uncheck",null):-1!==this.checkedNodes.indexOf(t)&&p&&l===t&&n?this.changeState(p,"check",null):-1===this.checkedNodes.indexOf(t)&&!p&&d&&l===t&&this.autoCheck&&0!==r?this.changeState(d,"indeterminate",null):-1===this.checkedNodes.indexOf(t)&&!p&&d&&l===t&&this.autoCheck&&0===r?this.changeState(d,"uncheck",null):!p&&!d&&l===t&&this.autoCheck&&this.updateIndeterminate(t,n)}}else if(2===this.dataType||this.fields.dataSource instanceof x.M1&&this.isOffline){l=void 0,d=void 0;var g=void 0;for(f=0;f<this.treeData.length;f++){l=this.treeData[parseInt(f.toString(),10)][this.fields.id]?this.treeData[parseInt(f.toString(),10)][this.fields.id].toString():"",g=(d=this.element.querySelector('[data-uid="'+l+'"]'))?(0,s.Lt)("."+Ci,d):null,-1===this.checkedNodes.indexOf(l)&&d&&g&&!n&&this.changeState(d,"uncheck",null);var v=(0,s._W)(this.fields.child.toString(),this.treeData[parseInt(f.toString(),10)]);v&&this.updateChildIndeterminate(v,l,t,n,l)}}},i.prototype.updateIndeterminate=function(t,n){var l,r=this.getTreeData(t),o=0;1===this.dataType&&(l=r[0][this.fields.parentID]?r[0][this.fields.parentID].toString():null);var h=this.getChildNodes(this.treeData,l);if(h)for(var d=0;d<h.length;d++){var p=h[parseInt(d.toString(),10)][this.fields.id]?h[parseInt(d.toString(),10)][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(p)&&o++}var u=this.element.querySelector('[data-uid="'+l+'"]');u&&n||!n&&u&&-1===this.parentNodeCheck.indexOf(l)&&0!==o?this.changeState(u,"indeterminate",null):!n&&u&&-1===this.parentNodeCheck.indexOf(l)&&0===o?this.changeState(u,"uncheck",null):u||(n||-1!==this.checkedNodes.indexOf(l)||-1===this.parentNodeCheck.indexOf(l)?(n&&-1===this.checkedNodes.indexOf(l)&&-1===this.parentNodeCheck.indexOf(l)||!n&&-1!==this.checkedNodes.indexOf(l)&&-1===this.parentNodeCheck.indexOf(l)&&0!==o)&&this.parentNodeCheck.push(l):this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(l),1),this.updateIndeterminate(l,n),-1!==this.checkedNodes.indexOf(l)&&!n&&this.checkedNodes.splice(this.checkedNodes.indexOf(l),1))},i.prototype.updateChildIndeterminate=function(t,n,r,o,l){for(var h=0,d=0;d<t.length;d++){var p=t[parseInt(d.toString(),10)][this.fields.id]?t[parseInt(d.toString(),10)][this.fields.id].toString():"";-1!==this.checkedNodes.indexOf(p)&&h++;var u=this.element.querySelector('[data-uid="'+n+'"]'),f=u?(0,s.Lt)("."+wn,u):null,m=u?(0,s.Lt)("."+Ci,u):null,g=this.element.querySelector('[data-uid="'+p+'"]'),v=g?(0,s.Lt)("."+Ci,g):null;if(-1!==this.checkedNodes.indexOf(r)&&u&&p===r&&this.autoCheck)this.changeState(u,"indeterminate",null);else if(-1!==this.checkedNodes.indexOf(r)||!u||g||p!==r||o){if(-1===this.checkedNodes.indexOf(r)&&g&&p===r&&!o)this.changeState(g,"uncheck",null);else if(-1===this.checkedNodes.indexOf(r)&&f&&p===r&&this.autoCheck&&0===h&&!o)f.classList.remove(wn);else if(-1===this.checkedNodes.indexOf(r)&&!g&&m&&p===r&&0===h)this.changeState(u,"uncheck",null);else if(-1===this.checkedNodes.indexOf(p)&&g&&v&&0===h)this.changeState(g,"uncheck",null);else if(!g&&!u&&p===r||-1!==this.parentNodeCheck.indexOf(n)&&this.autoCheck){var b=this.element.querySelector('[data-uid="'+l+'"]');o&&0!==h?this.changeState(b,"indeterminate",null):o&&h===t.length&&-1===this.checkedNodes.indexOf(n)?this.checkDisabledState(n):!o&&0===h&&-1!==this.parentNodeCheck.indexOf(n)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(n)),-1===this.parentNodeCheck.indexOf(n)&&this.parentNodeCheck.push(n)}}else this.changeState(u,this.autoCheck?"uncheck":0!==h?"indeterminate":"uncheck",null);var y=(0,s._W)(this.fields.child.toString(),t[parseInt(d.toString(),10)]);y&&this.updateChildIndeterminate(y,p,r,o,l)}},i.prototype.changeState=function(t,n,r,o,l,h){var p,d=this,u=(0,s.kp)(t,"."+Oe);!this.checkDisabledChildren&&u&&(u.classList.contains(Vo)||this.disableNode&&-1!==this.disableNode.indexOf(u.getAttribute("data-uid")))||(t===u&&(t=(0,s.Lt)("."+ki,u)),o?this.nodeCheckAction(t,n,u,p,r,o,l,h):(this.checkActionNodes=[],p=this.getCheckEvent(u,n,r),this.trigger("nodeChecking",p,function(f){f.cancel||d.nodeCheckAction(t,n,u,f,r,o,l,h)})))},i.prototype.nodeCheckAction=function(t,n,r,o,l,h,d,p){var u,f=t.getElementsByClassName(
1dr)[0];if("check"!==n||f.classList.contains(Ci)?"uncheck"===n&&(f.classList.contains(Ci)||f.classList.contains(wn))?((0,s.vy)([f],[Ci,wn]),this.removeCheck(r),u="false"):"indeterminate"===n&&this.autoCheck&&(f.classList.remove(Ci),f.classList.add(wn),this.removeCheck(r),u="mixed"):(f.classList.remove(wn),f.classList.add(Ci),this.addCheck(r),u="true"),(0,s.hX)(u="check"===n?"true":"uncheck"===n?"false":u)||r.setAttribute("aria-checked",u),d){var m=[].concat([],this.checkActionNodes);o=this.getCheckEvent(r,n,l),(0,s.b0)(h)&&(o.data=m)}void 0!==p&&this.ensureStateChange(r,p),h||(0,s.hX)(u)||(r.setAttribute("aria-checked",u),o.data[0].checked=u,this.trigger("nodeChecked",o),this.checkActionNodes=[])},i.prototype.addCheck=function(t){var n=t.getAttribute("data-uid");!(0,s.hX)(n)&&-1===this.checkedNodes.indexOf(n)&&this.checkDisabledState(n)},i.prototype.removeCheck=function(t){var n=this.checkedNodes.indexOf(t.getAttribute("data-uid"));n>-1&&this.checkedNodes.splice(n,1)},i.prototype.getCheckEvent=function(t,n,r){this.checkActionNodes.push(this.getNodeData(t));var o=this.checkActionNodes;return{action:n,cancel:!1,isInteracted:!(0,s.hX)(r),node:t,data:o}},i.prototype.finalize=function(){var t=(0,s.Lt)("."+qe,this.element);(0,s.hX)(t)||(t.setAttribute("role",wv.treeRole),this.setMultiSelect(this.allowMultiSelection),this.setNodeFocusable(),this.allowTextWrap&&this.updateWrap(),this.renderReactTemplates(),this.hasPid=!!this.rootData[0]&&Object.prototype.hasOwnProperty.call(this.rootData[0],this.fields.parentID),this.doExpandAction())},i.prototype.setTextWrap=function(){(this.allowTextWrap?s.iQ:s.vy)([this.element],"e-text-wrap"),s.Pw.isIE&&(this.allowTextWrap?s.iQ:s.vy)([this.element],"e-ie-wrap")},i.prototype.updateWrap=function(t){if(this.fullRowSelect)for(var n=t?(0,s.Ub)("."+Oe,t):this.liList,r=n.length,o=0;o<r;o++)this.calculateWrap(n[parseInt(o.toString(),10)])},i.prototype.calculateWrap=function(t){var n=(0,s.Lt)("."+Fr,t);n&&n.nextElementSibling&&(n.style.height=this.allowTextWrap?n.nextElementSibling.offsetHeight+"px":"")},i.prototype.doExpandAction=function(){var t=this,n=this.expandedNodes;if(!this.loadOnDemand&&this.fields.dataSource instanceof x.M1&&(this.isInitalExpand=this.treeData.filter(function(h){return!0===h[t.fields.expanded]}).length>0||this.isInitalExpand),this.isInitalExpand&&n.length>0)if(this.setProperties({expandedNodes:[]},!0),this.fields.dataSource instanceof x.M1)this.expandGivenNodes(n);else{for(var r=0;r<n.length;r++){var o=(0,s.Lt)('[data-uid="'+n[parseInt(r.toString(),10)]+'"]',this.element);if((0,s.hX)(o))n[parseInt(r.toString(),10)]&&-1===this.expandChildren.indexOf(n[parseInt(r.toString(),10)])&&this.expandChildren.push(n[parseInt(r.toString(),10)].toString());else{var l=(0,s.Lt)("."+$e,(0,s.Lt)("."+hi,o));(0,s.hX)(l)||this.expandAction(o,l,null)}}this.afterFinalized()}else this.afterFinalized()},i.prototype.expandGivenNodes=function(t){var n=this;this.expandCallback(t[this.index],function(){n.index++,n.index<t.length?n.expandGivenNodes(t):n.afterFinalized()}),this.index>0&&(this.index=0)},i.prototype.expandCallback=function(t,n){var r=(0,s.Lt)('[data-uid="'+t+'"]',this.element);if((0,s.hX)(r))n();else{var o=(0,s.Lt)("."+$e,(0,s.Lt)("."+hi,r));(0,s.hX)(o)||this.expandAction(r,o,null,!1,n),n()}},i.prototype.afterFinalized=function(){this.doSelectionAction(),this.updateCheckedProp(),this.isAnimate=!0,this.isInitalExpand=!1,this.isLoaded&&!this.isFieldChange||this.isNodeDropped||this.trigger("dataBound",{data:this.treeData}),this.isLoaded=!0,this.isNodeDropped=!1},i.prototype.doSelectionAction=function(){var t=(0,s.Ub)("."+No,this.element),n=this.selectedNodes;if(n.length>0){this.setProperties({selectedNodes:[]},!0);for(var r=0;r<n.length;r++){var o=(0,s.Lt)('[data-uid="'+n[parseInt(r.toString(),10)]+'"]',this.element);if(o&&!o.classList.contains("e-active")?this.selectNode(o,null,!0):this.selectedNodes.push(n[parseInt(r.toString(),10)]),!this.allowMultiSelection)break}}else this.selectGivenNodes(t);(0,s.vy)(t,No)},i.prototype.selectGivenNodes=function(t){for(var n=0;n<t.length&&(t[parseInt(n.toString(),10)].classList.contains("e-disable")||this.selectNode(t[parseInt(n.toString(),10)],null,!0),this.allowMultiSelection);n++);},i.prototype.clickHandler=function(t){var n=s.Pw.isDevice&&t.originalEvent.changedTouches&&!s.Pw.isIos?document.elementFromPoint(t.originalEvent.changedTouches[0].clientX,t.originalEvent.changedTouches[0].clientY):t.originalEvent.target;if(s.Jm.remove(this.element,"contextmenu",this.preventContextMenu),n&&!this.dragStartAction){var r=n.classList,o=(0,s.kp)(n,"."+Oe);if(!o||o.classList.contains(Qa)&&!r.contains($e)&&!r.contains(Lt))return;if(3!==t.originalEvent.which){var l=(0,s.Lt)(".e-ripple-element",o),h=(0,s.Lt)("."+ni,o);this.removeHover(),this.setFocusElement(o);var d=r.contains($e)||r.contains(Lt);if(this.showCheckBox&&!o.classList.contains("e-disable")&&!d){var p=this.checkOnClick?(0,s.Lt)("."+ki,o):(0,s.kp)(n,"."+ki);if(!(0,s.hX)(p)){var u=(0,s.Lt)("."+dr,p);return this.validateCheckNode(p,u.classList.contains(Ci),o,t.originalEvent),void this.triggerClickEvent(t.originalEvent,o)}}r.contains($e)?this.expandAction(o,n,t):r.contains(Lt)?this.collapseNode(o,n,t):l&&h?h.classList.contains(Tv)&&h.classList.contains($e)?this.expandAction(o,h,t):h.classList.contains(Tv)&&h.classList.contains(Lt)?this.collapseNode(o,h,t):!r.contains(qe)&&!r.contains(Oe)&&this.toggleSelect(o,t.originalEvent,!1):!r.contains(qe)&&!r.contains(Oe)&&this.toggleSelect(o,t.originalEvent,!1)}3===t.originalEvent.which&&(this.isRightClick=!0),this.triggerClickEvent(t.originalEvent,o)}},i.prototype.nodeCheckedEvent=function(t,n,r){var o=this.getCheckEvent(t,n?"uncheck":"check",r);o.data=o.data.splice(0,o.data.length-1),this.trigger("nodeChecked",o)},i.prototype.updateOldCheckedData=function(t){var h,n=this,r=new x.M1(t),o=r.executeLocal((new x.XK).where("isChecked","equal","true",!0)),l=r.executeLocal((new x.XK).where("isChecked","equal","false",!0));if(l.length>0&&-1!==(h=this.OldCheckedData.findIndex(function(p){return p.id===l[0].id}))){this.OldCheckedData.splice(h,1);var d=this.OldCheckedData.filter(function(p){return p.parentID===l[0].id});d.length>0&&d.forEach(function(p){var u=n.OldCheckedData.findIndex(function(f){return f.id===p.id});-1!==u&&n.OldCheckedData.splice(u,1)})}else o.length>0&&-1===(h=this.OldCheckedData.findIndex(function(u){return u.id===o[0].id}))&&this.OldCheckedData.push(o[0])},i.prototype.triggerClickEvent=function(t,n){this.trigger("nodeClicked",{event:t,node:n})},i.prototype.expandNode=function(t,n,r){var o=this;if(this.renderReactTemplates(),n.classList.contains(Zc)&&this.hideSpinner(n),this.initialRender||n.classList.add("interaction"),!0!==r||!0===r&&t.classList.contains("e-expanded")){if(!0!==this.preventExpand){(0,s.vy)([n],$e),(0,s.iQ)([n],Lt);var l=0,h=0,d=(0,s.Lt)("."+qe,t),p=t;if(this.isAnimate&&!this.isRefreshed){this.setHeight(p,d);var u=(0,s.Lt)("."+Oe+"."+Si,t);this.aniObj.animate(d,{name:this.animation.expand.effect,duration:0===this.animation.expand.duration&&"Enable"===s.QM?400:this.animation.expand.duration,timingFunction:this.animation.expand.easing,begin:function(){p.style.overflow="hidden",!(0,s.hX)(u)&&u instanceof HTMLElement&&u.classList.add(sh),l=p.offsetHeight;var m=window.getComputedStyle(p),g=parseFloat(m.paddingTop),v=parseFloat(m.paddingBottom);h=(0,s.Lt)("."+hi,t).offsetHeight+v+g},progress:function(m){m.element.style.display="block",o.animateHeight(m,l,h)},end:function(m){m.element.style.display="block",!(0,s.hX)(u)&&u instanceof HTMLElement&&u.classList.remove(sh),o.expandedNode(p,d,n)}})}else this.expandedNode(p,d,n)}}else(0,s.Lt)("."+qe,t).style.display="none",this.fields.dataSource instanceof x.M1&&(this.preventExpand=!1);this.initialRender&&n.classList.add("interaction")},i.prototype.expandedNode=function(t,n,r){n.style.display="block",t.style.display="block",t.style.overflow="",t.style.height="",(0,s.vy)([r],Vr),this.addExpand(t),this.allowTextWrap&&this.isLoaded&&this.isFirstRender&&(this.updateWrap(t),this.isFirstRender=!1),this.isLoaded&&this.expandArgs&&!this.isRefreshed&&(this.expandArgs=this.getExpandEvent(t,null),this.expandArgs.isInteracted=this.isInteracted,this.trigger("nodeExpanded",this.expandArgs)),this.isHiddenItem&&this.collapseAll([this.getNodeData(t).id])},i.prototype.addExpand=function(t){t.setAttribute("aria-expanded","true"),(0,s.vy)([t],_v);var n=t.getAttribute("data-uid");!(0,s.hX)(n)&&-1===this.expandedNodes.indexOf(n)&&this.expandedNodes.push(n)},i.prototype.collapseNode=function(t,n,r){var l,o=this;
1n.classList.contains(Vr)||((0,s.iQ)([n],Vr),this.isLoaded?(l=this.getExpandEvent(t,r),this.isInteracted=l.isInteracted,this.trigger("nodeCollapsing",l,function(h){h.cancel?(0,s.vy)([n],Vr):o.nodeCollapseAction(t,n,h)})):this.nodeCollapseAction(t,n,l))},i.prototype.nodeCollapseAction=function(t,n,r){var o=this;(0,s.vy)([n],Lt),(0,s.iQ)([n],$e);var l=0,h=0,d=(0,s.Lt)("."+qe,t),p=t,u=(0,s.Lt)("."+Oe+"."+Si,t);this.isAnimate?this.aniObj.animate(d,{name:this.animation.collapse.effect,duration:0===this.animation.collapse.duration&&"Enable"===s.QM?400:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing,begin:function(){p.style.overflow="hidden",!(0,s.hX)(u)&&u instanceof HTMLElement&&u.classList.add(sh),l=(0,s.Lt)("."+hi,t).offsetHeight,h=p.offsetHeight},progress:function(f){o.animateHeight(f,l,h)},end:function(f){f.element.style.display="none",!(0,s.hX)(u)&&u instanceof HTMLElement&&u.classList.remove(sh),o.collapsedNode(p,d,n,r)}}):this.collapsedNode(p,d,n,r)},i.prototype.collapsedNode=function(t,n,r,o){n.style.display="none",t.style.overflow="",t.style.height="",(0,s.vy)([r],Vr),this.removeExpand(t),this.isLoaded&&((o=this.getExpandEvent(t,null)).isInteracted=this.isInteracted,this.trigger("nodeCollapsed",o))},i.prototype.removeExpand=function(t,n){n?t.removeAttribute("aria-expanded"):this.disableExpandAttr(t);var r=this.expandedNodes.indexOf(t.getAttribute("data-uid"));r>-1&&this.expandedNodes.splice(r,1)},i.prototype.disableExpandAttr=function(t){t.setAttribute("aria-expanded","false"),(0,s.iQ)([t],_v)},i.prototype.setHeight=function(t,n){n.style.display="block",n.style.visibility="hidden",t.style.height=t.offsetHeight+"px",n.style.display="none",n.style.visibility=""},i.prototype.animateHeight=function(t,n,r){(0,s.hX)(t.element.parentElement)||(t.element.parentElement.style.height=(t.duration-t.timeStamp)/t.duration*(r-n)+n+"px")},i.prototype.renderChildNodes=function(t,n,r,o,l){var p,h=this,d=(0,s.Lt)("div."+ni,t);if(!(0,s.hX)(d))if(this.showSpinner(d),this.fields.dataSource instanceof x.M1){var u=this.parents(t,"."+qe).length,f=this.getChildFields(this.fields,u,1);if((0,s.hX)(f)||(0,s.hX)(f.dataSource))return(0,s.Yo)(d),void this.removeExpand(t,!0);this.treeList.push("false"),this.fields.dataSource instanceof x.M1&&this.isOffline?(this.treeList.pop(),p=this.getChildNodes(this.treeData,t.getAttribute("data-uid")),this.loadChild(p,f,d,t,n,r,o)):f.dataSource.executeQuery(this.getQuery(f,t.getAttribute("data-uid"))).then(function(m){h.treeList.pop(),p=m.result,1===h.dataType&&(h.dataType=2),h.loadChild(p,f,d,t,n,r,o)}).catch(function(m){h.trigger("actionFailure",{error:m})})}else{if(p=this.getChildNodes(this.treeData,t.getAttribute("data-uid"),!1,parseFloat(t.getAttribute("aria-level"))+1),this.currentLoadData=this.getSortedData(p),(0,s.hX)(p)||0===p.length)return(0,s.Yo)(d),d.classList.contains(Zc)&&this.hideSpinner(d),void this.removeExpand(t,!0);this.listBaseOption.ariaAttributes.level=parseFloat(t.getAttribute("aria-level"))+1,t.appendChild(ce.iY.createList(this.createElement,this.currentLoadData,this.listBaseOption)),this.expandNode(t,d,o),this.setSelectionForChildNodes(p),this.ensureCheckNode(t,l),this.finalizeNode(t,l,n),this.disableTreeNodes(p),this.renderSubChild(t,n,o,l)}},i.prototype.loadChild=function(t,n,r,o,l,h,d){if(this.currentLoadData=t,(0,s.hX)(t)||0===t.length)(0,s.Yo)(r),this.removeExpand(o,!0);else{if(this.updateListProp(n),this.fields.dataSource instanceof x.M1&&!this.isOffline){var p=o.getAttribute("data-uid"),u=this.getNodeObject(p);(0,s.KY)("child",t,u)}this.listBaseOption.ariaAttributes.level=parseFloat(o.getAttribute("aria-level"))+1,o.appendChild(ce.iY.createList(this.createElement,t,this.listBaseOption)),this.expandNode(o,r,d),this.setSelectionForChildNodes(t),this.ensureCheckNode(o),this.finalizeNode(o),this.disableTreeNodes(t),this.renderSubChild(o,l,d)}h&&h(),l&&this.expandedNodes.push(o.getAttribute("data-uid")),0===this.treeList.length&&!this.isLoaded&&this.finalize()},i.prototype.disableTreeNodes=function(t){if(!(0,s.hX)(this.disableNode)&&0!==this.disableNode.length)for(var n=0;n<t.length;){var r=t[parseInt(n.toString(),10)][this.fields.id]?t[parseInt(n.toString(),10)][this.fields.id].toString():null;void 0!==this.disableNode&&-1!==this.disableNode.indexOf(r)&&this.doDisableAction([r]),n++}},i.prototype.setSelectionForChildNodes=function(t){var n;if(!(0,s.hX)(this.selectedNodes)&&0!==this.selectedNodes.length)for(n=0;n<t.length;n++){var r=t[parseInt(n.toString(),10)][this.fields.id]?t[parseInt(n.toString(),10)][this.fields.id].toString():null;void 0!==this.selectedNodes&&-1!==this.selectedNodes.indexOf(r)&&this.doSelectionAction()}},i.prototype.ensureCheckNode=function(t,n){this.showCheckBox&&(this.ele=this.checkedElement?this.checkedElement.indexOf(t.getAttribute("data-uid")):null,this.autoCheck&&(this.ensureChildCheckState(t,null,n),(!n||(0,s.Lt)("."+Ci,this.element)||(0,s.Lt)("."+wn,this.element))&&this.ensureParentCheckState(t))),this.currentLoadData=null},i.prototype.getFields=function(t,n,r){return n===r?t:this.getFields(this.getChildMapper(t),n,r+1)},i.prototype.getChildFields=function(t,n,r){return n===r?this.getChildMapper(t):this.getChildFields(this.getChildMapper(t),n,r+1)},i.prototype.getChildMapper=function(t){return"string"==typeof t.child||(0,s.hX)(t.child)?t:t.child},i.prototype.getChildNodes=function(t,n,r,o){var h,l=this;if(void 0===r&&(r=!1),(0,s.hX)(t))return h;if(1===this.dataType)return this.getChildGroup(this.groupedData,n,r);if("string"==typeof this.fields.child)return this.findChildNodes(t,this.fields.id,n)||this.findNestedChildNodes(t,n,o)||[];
1if(this.isChildObject()){for(var d=(0,s.hX)(o)?this.fields.child:this.fields,p=1;p<o&&!(0,s.hX)(d.child);)d=d.child,p++;this.updateListProp(d);var u=t.findIndex(function(b){return(0,s._W)(l.fields.id,b)&&(0,s._W)(l.fields.id,b).toString()===n});if(-1!==u)return(0,s._W)("child",t[parseInt(u.toString(),10)]);if(-1===u)for(var f=0,m=t.length;f<m;f++){var g=(0,s._W)("child",t[parseInt(f.toString(),10)]),v=(0,s.hX)(g)?-1:g.findIndex(function(b){return(0,s._W)(l.fields.child.id,b)&&(0,s._W)(l.fields.child.id,b).toString()===n});if(-1!==v)return(0,s._W)("child",g[parseInt(v.toString(),10)]);if(!(0,s.hX)(g)&&void 0!==(h=this.getChildNodes(g,n,!1,o)))break}}return h},i.prototype.findChildNodes=function(t,n,r){var o=t.findIndex(function(l){var h=(0,s._W)(n,l);return h&&h.toString()===r});return-1!==o?(0,s._W)(this.fields.child,t[o]):null},i.prototype.findNestedChildNodes=function(t,n,r){for(var o=0,l=t;o<l.length;o++){var d=(0,s._W)(this.fields.child,l[o]);if(!(0,s.hX)(d)){var p=this.findChildNodes(d,this.fields.id,n);if(p)return p;var u=this.getChildNodes(d,n,!1,r);if(u&&u.length>0)return u}}},i.prototype.getChildGroup=function(t,n,r){var o=[];if((0,s.hX)(t))return o;for(var l=0,h=t.length;l<h;l++)if((0,s.hX)(t[parseInt(l.toString(),10)][0])||(0,s.hX)((0,s._W)(this.fields.parentID,t[parseInt(l.toString(),10)][0]))){if(r)return t[parseInt(l.toString(),10)]}else if((0,s._W)(this.fields.parentID,t[parseInt(l.toString(),10)][0]).toString()===n)return t[parseInt(l.toString(),10)];return o},i.prototype.renderSubChild=function(t,n,r,o){if(n)for(var l=(0,s.Ub)("."+$e,t),h=0,d=l.length;h<d;h++){var p=l[parseInt(h.toString(),10)];if(t.querySelector(".e-icons")!==l[parseInt(h.toString(),10)]){var u=(0,s.kp)(p,"."+Oe);this.expandArgs=this.getExpandEvent(u,null),!0!==r&&this.trigger("nodeExpanding",this.expandArgs),this.renderChildNodes(u,n,null,r,o)}}},i.prototype.toggleSelect=function(t,n,r){t.classList.contains("e-disable")||(this.allowMultiSelection&&(n&&n.ctrlKey||r)&&this.isActive(t)?this.unselectNode(t,n):this.selectNode(t,n,r))},i.prototype.isActive=function(t){return!!t.classList.contains(Si)},i.prototype.selectNode=function(t,n,r){var o=this;if((0,s.hX)(t)||!this.allowMultiSelection&&this.isActive(t)&&!(0,s.hX)(n)){if(this.checkOnClick){var l=(0,s.Lt)(" ."+dr,t);!(0,s.hX)(l)&&l.classList.contains(Ci)?(0,s.iQ)([t],Si):(0,s.vy)([t],Si)}this.setFocusElement(t)}else{var h;this.isLoaded?(h=this.getSelectEvent(t,"select",n),this.trigger("nodeSelecting",h,function(d){!d.cancel&&!d.node.classList.contains(Qa)&&o.nodeSelectAction(t,n,d,r)})):this.nodeSelectAction(t,n,h,r)}},i.prototype.nodeSelectAction=function(t,n,r,o){if((!this.allowMultiSelection||!o&&(!n||n&&!(n.ctrlKey||n.metaKey)))&&this.removeSelectAll(),this.allowMultiSelection&&n&&n.shiftKey){this.startNode||(this.startNode=t);var l=this.liList.indexOf(this.startNode),h=this.liList.indexOf(t);if(l>h){var d=l;l=h,h=d}for(var p=l;p<=h;p++){var u=this.liList[parseInt(p.toString(),10)];(0,s.zN)(u)&&!u.classList.contains("e-disable")&&this.addSelect(u)}}else this.startNode=t,this.addSelect(t);this.isLoaded&&(r.nodeData=this.getNodeData(t),this.trigger("nodeSelected",r),this.isRightClick=!1),this.isRightClick=!1},i.prototype.unselectNode=function(t,n){var o,r=this;this.isLoaded?(o=this.getSelectEvent(t,"un-select",n),this.trigger("nodeSelecting",o,function(l){l.cancel||r.nodeUnselectAction(t,l)})):this.nodeUnselectAction(t,o)},i.prototype.nodeUnselectAction=function(t,n){this.removeSelect(t),this.setFocusElement(t),this.isLoaded&&(n.nodeData=this.getNodeData(t),this.trigger("nodeSelected",n))},i.prototype.setFocusElement=function(t){if(!(0,s.hX)(t)){var n=this.getFocusedNode();n&&((0,s.vy)([n],js),n.setAttribute("tabindex","-1")),(0,s.iQ)([t],js),t.setAttribute("tabindex","0"),s.Jm.add(t,"blur",this.focusOut,this),this.updateIdAttr(n,t)}},i.prototype.addSelect=function(t){t.setAttribute("aria-selected","true"),(0,s.iQ)([t],Si);var n=t.getAttribute("data-uid");!(0,s.hX)(n)&&-1===this.selectedNodes.indexOf(n)&&this.selectedNodes.push(n)},i.prototype.removeSelect=function(t){this.allowMultiSelection?t.setAttribute("aria-selected","false"):t.removeAttribute("aria-selected"),(0,s.vy)([t],Si);var n=this.selectedNodes.indexOf(t.getAttribute("data-uid"));n>-1&&this.selectedNodes.splice(n,1)},i.prototype.removeSelectAll=function(){for(var t=this.element.querySelectorAll("."+Si),n=0,r=t;n<r.length;n++){var o=r[n];this.allowMultiSelection?o.setAttribute("aria-selected","false"):o.removeAttribute("aria-selected")}(0,s.vy)(t,Si),this.setProperties({selectedNodes:[]},!0)},i.prototype.getSelectEvent=function(t,n,r){var o=this.getNodeData(t);return{action:n,cancel:!1,isInteracted:!(0,s.hX)(r),node:t,nodeData:o}},i.prototype.setExpandOnType=function(){this.expandOnType="Auto"===this.expandOn?s.Pw.isDevice?"Click":"DblClick":this.expandOn},i.prototype.expandHandler=function(t){var n=s.Pw.isDevice&&t.originalEvent.changedTouches&&!s.Pw.isIos?document.elementFromPoint(t.originalEvent.changedTouches[0].clientX,t.originalEvent.changedTouches[0].clientY):t.originalEvent.target;!n||n.classList.contains(eh)||n.classList.contains(xn)||n.classList.contains(qe)||n.classList.contains(Oe)||n.classList.contains(ni)||this.showCheckBox&&(0,s.kp)(n,"."+ki)||this.expandCollapseAction((0,s.kp)(n,"."+Oe),t)},i.prototype.expandCollapseAction=function(t,n){var r=(0,s.Lt)("div."+ni,t);if(r&&!r.classList.contains(Vr)){var o=r.classList;o.contains($e)?this.expandAction(t,r,n):o.contains(Lt)&&this.collapseNode(t,r,n)}},i.prototype.expandAction=function(t,n,r,o,l,h){var d=this;n.classList.contains(Vr)||((0,s.iQ)([n],Vr),this.isLoaded&&!this.isRefreshed?(this.expandArgs=this.getExpandEvent(t,r),this.isInteracted=this.expandArgs.isInteracted,this.trigger("nodeExpanding",this.expandArgs,function(p){p.cancel?(0,s.vy)([n],Vr):d.nodeExpandAction(t,n,o,l,h)})):this.nodeExpandAction(t,n,o,l,h))},i.prototype.nodeExpandAction=function(t,n,r,o,l){var h=(0,s.Lt)("."+qe,t);if(h&&"UL"===h.nodeName)this.expandNode(t,n);else{if(this.isFirstRender=!0,this.renderChildNodes(t,r,o,null,l),(0,s.hX)(this.expandChildren)||0===this.expandChildren.length)return;for(var d=(0,s.Ub)("."+Oe,t),p=0;p<d.length;p++){var u=this.getId(d[parseInt(p.toString(),10)]);if(-1!==this.expandChildren.indexOf(u)&&void 0!==this.expandChildren){var f=(0,s.Lt)("."+$e,(0,s.Lt)("."+hi,d[parseInt(p.toString(),10)]));(0,s.hX)(f)||this.expandAction(d[parseInt(p.toString(),10)],f,null),this.expandChildren.splice(this.expandChildren.indexOf(u),1)}}}},i.prototype.keyActionHandler=function(t){var n=this,r=t.target,o=this.getFocusedNode();if(r&&r.classList.contains(eh)){var l=r;
1"enter"===t.action?l.blur():"escape"===t.action&&(l.value=this.oldText,l.blur())}else t.preventDefault(),this.trigger("keyPress",{cancel:!1,event:t,node:o},function(d){if(!d.cancel)switch(t.action){case"space":n.showCheckBox?n.checkNode(t):n.toggleSelect(o,t);break;case"moveRight":n.openNode(!n.enableRtl,t);break;case"moveLeft":n.openNode(!!n.enableRtl,t);break;case"shiftDown":n.shiftKeySelect(!0,t);break;case"moveDown":case"ctrlDown":case"csDown":n.navigateNode(!0);break;case"shiftUp":n.shiftKeySelect(!1,t);break;case"moveUp":case"ctrlUp":case"csUp":n.navigateNode(!1);break;case"home":case"shiftHome":case"ctrlHome":case"csHome":n.navigateRootNode(!0);break;case"end":case"shiftEnd":case"ctrlEnd":case"csEnd":n.navigateRootNode(!1);break;case"enter":case"ctrlEnter":case"shiftEnter":case"csEnter":case"shiftSpace":case"ctrlSpace":n.toggleSelect(o,t);break;case"f2":n.allowEditing&&!o.classList.contains("e-disable")&&n.createTextbox(o);break;case"ctrlA":if(n.allowMultiSelection){var p=(0,s.Ub)("."+Oe+":not(."+Si+")",n.element);n.selectGivenNodes(p)}}})},i.prototype.navigateToFocus=function(t){var n=this.getFocusedNode().querySelector("."+hi),r=n.getBoundingClientRect(),o=this.getScrollParent(this.element);if(!(0,s.hX)(o)){var l=o.getBoundingClientRect();r.bottom>l.bottom?o.scrollTop+=r.bottom-l.bottom:r.top<l.top&&(o.scrollTop-=l.top-r.top)}this.isVisibleInViewport(n)||n.scrollIntoView(t)},i.prototype.isVisibleInViewport=function(t){var n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)},i.prototype.getScrollParent=function(t){return(0,s.hX)(t)?null:t.scrollHeight>t.clientHeight?t:this.getScrollParent(t.parentElement)},i.prototype.shiftKeySelect=function(t,n){if(this.allowMultiSelection){var r=this.getFocusedNode(),o=t?this.getNextNode(r):this.getPrevNode(r);this.removeHover(),this.setFocusElement(o),this.toggleSelect(o,n,!1),this.navigateToFocus(!t)}else this.navigateNode(t)},i.prototype.checkNode=function(t){var n=this.getFocusedNode(),r=(0,s.Lt)("."+ki,n),o=(0,s.Lt)(" ."+dr,r).classList.contains(Ci);n.classList.contains("e-disable")||0===n.getElementsByClassName("e-checkbox-disabled").length&&this.validateCheckNode(r,o,n,t)},i.prototype.validateCheckNode=function(t,n,r,o){var l=this,h=(0,s.kp)(t,"."+Oe);this.checkActionNodes=[];var d=n?"false":"true";(0,s.hX)(d)||h.setAttribute("aria-checked",d);var p=this.getCheckEvent(h,n?"uncheck":"check",o);this.trigger("nodeChecking",p,function(u){u.cancel||l.nodeCheckingAction(t,n,r,u,o)})},i.prototype.nodeCheckingAction=function(t,n,r,o,l){if(-1===this.checkedElement.indexOf(r.getAttribute("data-uid"))&&(this.checkedElement.push(r.getAttribute("data-uid")),this.autoCheck)){var h=this.getChildNodes(this.treeData,r.getAttribute("data-uid"));null!==h?this.allCheckNode(h,this.checkedElement,null,null,!1):h=null}if(this.changeState(t,n?"uncheck":"check",l,!0),this.updateActiveClass(r,n),this.autoCheck){this.ensureChildCheckState(r),this.updateOldCheckedData([this.getNodeData(r)]),this.ensureParentCheckState((0,s.kp)((0,s.kp)(r,"."+qe),"."+Oe));var d=void 0;"check"===o.action?d=!0:"uncheck"===o.action&&(d=!1),this.ensureStateChange(r,d)}this.nodeCheckedEvent(t,n,l)},i.prototype.updateActiveClass=function(t,n){this.showCheckBox&&this.checkOnClick&&("check"===n||!1===n?(this.removeSelectAll(),(0,s.iQ)([t],Si)):("uncheck"===n||"indeterminate"===n||!0===n)&&(0,s.vy)([t],Si))},i.prototype.ensureStateChange=function(t,n){var r=this,o=(0,s.Lt)("."+qe,t),l=t.getAttribute("data-uid"),h=this.fields;if(1===this.dataType&&this.autoCheck){var d=new x.M1(this.treeData).executeLocal((new x.XK).where(h.parentID,"equal",l,!0)),p=d.filter(function(_){return-1!==r.checkedNodes.indexOf(_[h.id].toString())},this);-1!==this.checkedNodes.indexOf(l)&&p.length!==d.length&&this.isFilter&&p.length>0&&(d=p);for(var u=0;u<d.length;u++){var f=d[parseInt(u.toString(),10)][this.fields.id]?d[parseInt(u.toString(),10)][this.fields.id].toString():null,m=d[parseInt(u.toString(),10)][this.fields.isChecked]?d[parseInt(u.toString(),10)][this.fields.isChecked].toString():null;if(-1!==this.checkedNodes.indexOf(l)&&-1===this.checkedNodes.indexOf(f)){this.checkDisabledState(f,d[u]);var g=this.getChildNodes(this.treeData,f);this.getChildItems(g,n),-1!==this.parentNodeCheck.indexOf(f)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(f),1)}else if(-1===this.checkedNodes.indexOf(l)&&null===o&&-1!==this.checkedNodes.indexOf(f)){if(this.checkedNodes.splice(this.checkedNodes.indexOf(f),1),"true"===m&&this.updateField(this.treeData,this.fields,f,"isChecked",null),-1===this.checkedNodes.indexOf(l)&&null===o||-1!==this.parentNodeCheck.indexOf(f)){var v=this.getChildNodes(this.treeData,f);this.getChildItems(v,n),-1!==this.parentNodeCheck.indexOf(f)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(f),1)}}else g=this.getChildNodes(this.treeData,f),this.getChildItems(g,n)}}else if(1!==this.dataType||this.autoCheck){if(g=this.getChildNodes(this.treeData,l)){var E=g.filter(function(T){var I=String(T[Object.keys(T)[0]]);return-1!==r.checkedNodes.indexOf(I)});E.length>0&&g.length&&this.isFilter&&(g=E),this.childStateChange(g,l,o,n)}}else if(n)for(u=0;
1u<this.treeData.length;u++){var S=this.treeData[parseInt(u.toString(),10)][this.fields.id]?this.treeData[parseInt(u.toString(),10)][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(S)&&this.checkDisabledState(S,this.treeData[u])}else{var b=new x.M1(this.treeData).executeLocal((new x.XK).where(h.isChecked,"equal",!0,!1));for(u=0;u<b.length;u++){var y=b[parseInt(u.toString(),10)][this.fields.id]?b[parseInt(u.toString(),10)][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(y)&&this.checkedNodes.splice(this.checkedNodes.indexOf(y),1),this.updateField(this.treeData,this.fields,y,"isChecked",null)}this.checkedNodes=[]}},i.prototype.checkDisabledState=function(t,n){var r=this.checkDisabledChildren;if(!r){var o=!0;if(this.loadOnDemand&&this.fields.htmlAttributes&&(n=(0,s.hX)(n)?n:this.getNodeObject(t),!(0,s.hX)(n))){var l=n[this.fields.htmlAttributes];l&&!(0,s.hX)(l.class)&&-1!==l.class.indexOf(Vo)&&(o=!1)}var h=(0,s.Lt)('[data-uid="'+t+'"]',this.element);r=h?!h.classList.contains(Vo):-1===this.disableNode.indexOf(t)&&o}r&&this.checkedNodes.push(t)},i.prototype.getChildItems=function(t,n){for(var r=0;r<t.length;r++){var o=t[parseInt(r.toString(),10)][this.fields.id]?t[parseInt(r.toString(),10)][this.fields.id].toString():null,l=t[parseInt(r.toString(),10)][this.fields.isChecked]?t[parseInt(r.toString(),10)][this.fields.isChecked].toString():null;-1!==this.checkedNodes.indexOf(o)&&!n&&this.checkedNodes.splice(this.checkedNodes.indexOf(o),1),-1===this.checkedNodes.indexOf(o)&&n&&this.checkDisabledState(o,t[r]),"true"===l&&!n&&this.updateField(this.treeData,this.fields,o,"isChecked",null);var h=this.getChildNodes(this.treeData,o);h.length>0&&this.getChildItems(h,n)}},i.prototype.childStateChange=function(t,n,r,o){for(var l=0;l<t.length;l++){var h=t[parseInt(l.toString(),10)][this.fields.id]?t[parseInt(l.toString(),10)][this.fields.id].toString():"",d=t[parseInt(l.toString(),10)][this.fields.isChecked]?t[parseInt(l.toString(),10)][this.fields.isChecked].toString():null;this.autoCheck?-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(h)?(this.checkDisabledState(h,t[l]),-1!==this.parentNodeCheck.indexOf(h)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(h),1)):-1===this.checkedNodes.indexOf(n)&&-1!==this.checkedNodes.indexOf(h)&&!o&&(this.checkedNodes.splice(this.checkedNodes.indexOf(h),1),"true"===d&&this.updateField(this.treeData,this.fields,h,"isChecked",null)):this.autoCheck||(o?-1===this.checkedNodes.indexOf(h)&&this.checkDisabledState(h,t[l]):(-1!==this.checkedNodes.indexOf(h)&&this.checkedNodes.splice(this.checkedNodes.indexOf(h),1),this.updateField(this.treeData,this.fields,h,"isChecked",null),this.checkedNodes=[]));var p=this.getChildNodes([t[parseInt(l.toString(),10)]],h);p&&this.childStateChange(p,n,r,o)}},i.prototype.allCheckNode=function(t,n,r,o,l){if(t)for(var h=0;h<t.length;h++){var d=(0,s._W)(this.fields.id,t[parseInt(h.toString(),10)]),p=this.element.querySelector('[data-uid="'+d+'"]');!1!==l&&-1===this.checkedElement.indexOf(d.toString())&&(null===p&&!(0,s.hX)(t[parseInt(h.toString(),10)][this.fields.isChecked])&&-1===n.indexOf(d.toString())||0===o||2===r)&&(!1!==t[parseInt(h.toString(),10)][this.fields.isChecked]||2===r?n.push(d.toString()):o=null,o=!1!==t[parseInt(h.toString(),10)][this.fields.isChecked]||2===r?0:null),-1===n.indexOf(d.toString())&&(0,s.hX)(r)&&n.push(d.toString());var u=(0,s._W)(this.fields.child.toString(),t[parseInt(h.toString(),10)]);if(!0===(0,s._W)(this.fields.hasChildren,t[parseInt(h.toString(),10)])||u){var m,f=(0,s._W)(this.fields.id,t[parseInt(h.toString(),10)]);(m=1===this.dataType?this.getChildNodes(this.treeData,f.toString()):u)&&((0,s.hX)(l)?this.allCheckNode(m,n,r,o):this.allCheckNode(m,n,r,o,l),o=null)}o=null}},i.prototype.openNode=function(t,n){var r=this.getFocusedNode(),o=(0,s.Lt)("div."+ni,r);if(t){if(!o)return;o.classList.contains($e)?this.expandAction(r,o,n):this.focusNextNode(r,!0)}else if(o&&o.classList.contains(Lt))this.collapseNode(r,o,n);else{var l=(0,s.kp)((0,s.kp)(r,"."+qe),"."+Oe);if(!l)return;l.classList.contains("e-disable")||(this.setFocus(r,l),this.navigateToFocus(!0))}},i.prototype.navigateNode=function(t){var n=this.getFocusedNode();this.focusNextNode(n,t)},i.prototype.navigateRootNode=function(t){var n=this.getFocusedNode(),r=t?this.getRootNode():this.getEndNode();r.classList.contains("e-disable")||(this.setFocus(n,r),this.navigateToFocus(t))},i.prototype.getFocusedNode=function(){var t,n=(0,s.Lt)("."+Oe+'[tabindex="0"]',this.element);if(!(0,s.hX)(n)){var r=n.getAttribute("aria-checked");("mixed"===r||"false"===r)&&(this.isFilter=!1)}return(0,s.hX)(n)&&(t=(0,s.Lt)("."+Oe,this.element)),(0,s.hX)(n)?(0,s.hX)(t)?this.element.firstElementChild:t:n}
1,i.prototype.focusNextNode=function(t,n){var r=n?this.getNextNode(t):this.getPrevNode(t);if(this.setFocus(t,r),this.navigateToFocus(!n),r.classList.contains("e-disable")){var o=r.lastChild;null==r.previousSibling&&r.classList.contains("e-level-1")?this.focusNextNode(r,!0):null==r.nextSibling&&r.classList.contains("e-node-collapsed")||null==r.nextSibling&&o.classList.contains(hi)?this.focusNextNode(r,!1):this.focusNextNode(r,n)}},i.prototype.getNextNode=function(t){var r,n=this.liList.indexOf(t);do{if(n++,r=this.liList[parseInt(n.toString(),10)],(0,s.hX)(r))return t}while(!(0,s.zN)(r));return r},i.prototype.getPrevNode=function(t){var r,n=this.liList.indexOf(t);do{if(n--,r=this.liList[parseInt(n.toString(),10)],(0,s.hX)(r))return t}while(!(0,s.zN)(r));return r},i.prototype.getRootNode=function(){var n,t=0;do{n=this.liList[parseInt(t.toString(),10)],t++}while(!(0,s.zN)(n));return n},i.prototype.getEndNode=function(){var n,t=this.liList.length-1;do{n=this.liList[parseInt(t.toString(),10)],t--}while(!(0,s.zN)(n));return n},i.prototype.setFocus=function(t,n){(0,s.vy)([t],js),t.setAttribute("tabindex","-1"),n.classList.contains("e-disable")||((0,s.iQ)([n],js),n.setAttribute("tabindex","0"),n.focus(),s.Jm.add(n,"blur",this.focusOut,this),this.updateIdAttr(t,n))},i.prototype.updateIdAttr=function(t,n){this.element.removeAttribute("aria-activedescendant"),t&&t.removeAttribute("id"),n.setAttribute("id",this.element.id+"_active"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active")},i.prototype.focusIn=function(){if(!this.mouseDownStatus){var t=this.getFocusedNode();t.classList.contains("e-disable")?(t.setAttribute("tabindex","-1"),this.navigateNode(!0)):(t.setAttribute("tabindex","0"),(0,s.iQ)([t],js),s.Jm.add(t,"blur",this.focusOut,this)),this.mouseDownStatus=!1}},i.prototype.focusOut=function(t){var n=this.getFocusedNode();t.target===n&&((0,s.vy)([n],js),s.Jm.remove(n,"blur",this.focusOut))},i.prototype.onMouseOver=function(t){if(!s.Pw.isDevice){var n=t.target,r=n.classList,o=(0,s.kp)(n,"."+Oe);if(!o||r.contains(qe)||r.contains(Oe))return void this.removeHover();o&&!o.classList.contains("e-disable")&&this.setHover(o)}},i.prototype.setHover=function(t){!t.classList.contains(Kc)&&!t.classList.contains(Qa)&&(this.removeHover(),(0,s.iQ)([t],Kc))},i.prototype.onMouseLeave=function(){this.removeHover()},i.prototype.removeHover=function(){var t=(0,s.Ub)("."+Kc,this.element);t&&t.length&&(0,s.vy)(t,Kc)},i.prototype.getNodeData=function(t,n,r){if(!(0,s.hX)(t)&&t.classList.contains(Oe)&&!(0,s.hX)((0,s.kp)(t,"."+bv))&&(0,s.kp)(t,"."+bv).classList.contains(xn)){var o=t.getAttribute("data-uid"),l=this.getText(t,n,r),h=(0,s.kp)(t.parentNode,"."+Oe),d=h?h.getAttribute("data-uid"):null,p=t.classList.contains(Si),u=!t.classList.contains(Qa),f="true"===t.getAttribute("aria-expanded"),m=null!==t.getAttribute("aria-expanded")||null!=((0,s.Lt)("."+$e,t)||(0,s.Lt)("."+Lt,t)),g=null,v=(0,s.Lt)("."+ki,t);return this.showCheckBox&&v&&(g=t.getAttribute("aria-checked")),{id:o,text:l,parentID:d,selected:p,selectable:u,expanded:f,isChecked:g,hasChildren:m}}return{id:"",text:"",parentID:"",selected:!1,expanded:!1,isChecked:"",hasChildren:!1}},i.prototype.getText=function(t,n,r){if(n){var o=(0,s.hX)(r)?this.getNodeObject(t.getAttribute("data-uid")):r,l=parseFloat(t.getAttribute("aria-level")),h=this.getFields(this.fields,l,1);return(0,s.hX)(r)?(0,s._W)(h.text,o):r.text}return(0,s.Lt)("."+Xs,t).textContent},i.prototype.getExpandEvent=function(t,n){var r=this.getNodeData(t);return{cancel:!1,isInteracted:!(0,s.hX)(n),node:t,nodeData:r,event:n}},i.prototype.renderNodeTemplate=function(t,n,r){var o=this.nodeTemplateFn(t,this,"nodeTemplate"+r,this.element.id+"nodeTemplate",this.isStringTemplate,void 0,n,this.root);o&&(o=Array.prototype.slice.call(o),(0,s.BC)(o,n))},i.prototype.destroyTemplate=function(t){this.clearTemplate(["nodeTemplate"+t.getAttribute("data-uid")])},i.prototype.reRenderNodes=function(){this.updateListProp(this.fields),s.Pw.isIE?(this.ulElement=this.element.querySelector(".e-list-parent.e-ul"),this.ulElement.parentElement.removeChild(this.ulElement)):this.element.innerHTML="",(0,s.hX)(this.nodeTemplateFn)||this.clearTemplate(),this.setTouchClass(),this.setProperties({selectedNodes:[],checkedNodes:[],expandedNodes:[]},!0),this.checkedElement=[],this.isLoaded=!1,this.setDataBinding(!0)},i.prototype.setCssClass=function(t,n){!(0,s.hX)(t)&&""!==t&&(0,s.vy)([this.element],t.split(" ")),!(0,s.hX)(n)&&""!==n&&(0,s.iQ)([this.element],n.split(" "))},i.prototype.editingHandler=function(t){var n=t.target;if(!(!n||n.classList.contains(xn)||n.classList.contains(qe)||n.classList.contains(Oe)||n.classList.contains(ni)||n.classList.contains(eh)||n.classList.contains(yv))){var r=(0,s.kp)(n,"."+Oe);this.createTextbox(r)}},i.prototype.createTextbox=function(t){var n=this,r=(0,s.Lt)("."+th,this.element);r&&r.blur();var o=(0,s.Lt)("."+Xs,t);this.updateOldText(t);var l=this.createElement("input",{className:th,attrs:{value:this.oldText}}),h=this.getEditEvent(t,null,l.outerHTML);this.trigger("nodeEditing",h,function(d){if(!d.cancel){var u=o.offsetWidth+5+"px";(0,s.iQ)([t],$p),(0,s.hX)(n.nodeTemplateFn)||n.destroyTemplate(t),n.isReact?setTimeout(function(){n.renderTextBox(
1h,o,u)},5):n.renderTextBox(h,o,u)}})},i.prototype.renderTextBox=function(t,n,r){n.innerHTML=t.innerHtml;var o=(0,s.Lt)("."+th,n);this.inputObj=J.pd.createInput({element:o,properties:{enableRtl:this.enableRtl}},this.createElement),this.inputObj.container.style.width=r,o.focus(),o.setSelectionRange(0,o.value.length),this.wireInputEvents(o)},i.prototype.updateOldText=function(t){var n=t.getAttribute("data-uid");this.editData=this.getNodeObject(n);var r=parseFloat(t.getAttribute("aria-level"));this.editFields=this.getFields(this.fields,r,1),this.oldText=(0,s._W)(this.editFields.text,this.editData)},i.prototype.inputFocusOut=function(t){if((0,s.Lt)("."+th,this.element)){var n=t.target,r=n.value,o=(0,s.kp)(n,"."+Xs),l=(0,s.kp)(n,"."+Oe);(0,s.Yo)(this.inputObj.container),J.pd.destroy({element:n,properties:this.properties}),this.fields.dataSource instanceof x.M1&&!this.isOffline?this.crudOperation("update",null,l,r,null,null,!0):this.appendNewText(l,o,r,!0),s.Jm.remove(n,"blur",this.inputFocusOut),this.inputObj=null,(0,s.Yo)(n),n=null}},i.prototype.appendNewText=function(t,n,r,o){var l=this,h=this.getEditEvent(t,r,null);this.trigger("nodeEdited",h,function(d){l.updateText(t,n,r=d.cancel?d.oldText:d.newText,o),d.oldText!==r&&l.triggerEvent("nodeEdited",[l.getNode(t)])})},i.prototype.updateText=function(t,n,r,o){var l=(0,s.KY)(this.editFields.text,r,this.editData);if((0,s.hX)(this.nodeTemplateFn))this.enableHtmlSanitizer?n.innerText=s.r4.sanitize(r):n.innerHTML=r;else{n.innerText="";var h=t.getAttribute("data-uid");this.renderNodeTemplate(l,n,h),this.renderReactTemplates()}o&&((0,s.vy)([t],$p),t.focus(),s.Jm.add(t,"blur",this.focusOut,this),(0,s.iQ)([t],js)),this.allowTextWrap&&this.calculateWrap(t)},i.prototype.getElement=function(t){return(0,s.hX)(t)?null:"string"==typeof t?this.element.querySelector('[data-uid="'+t+'"]'):"object"==typeof t?(0,s.V6)(t):null},i.prototype.getId=function(t){return(0,s.hX)(t)?null:"string"==typeof t?t:"object"==typeof t?(0,s.V6)(t).getAttribute("data-uid"):null},i.prototype.getEditEvent=function(t,n,r){return{cancel:!1,newText:n,node:t,nodeData:this.getNodeData(t),oldText:this.oldText,innerHtml:r}},i.prototype.getNodeObject=function(t){var n;if((0,s.hX)(t))return n;if(1!==this.dataType)return this.getChildNodeObject(this.treeData,this.fields,t);for(var r=0,o=this.treeData.length;r<o;r++){var l=(0,s._W)(this.fields.id,this.treeData[parseInt(r.toString(),10)]);if(!(0,s.hX)(this.treeData[parseInt(r.toString(),10)])&&!(0,s.hX)(l)&&l.toString()===t)return this.treeData[parseInt(r.toString(),10)]}return n},i.prototype.getChildNodeObject=function(t,n,r){var o;if((0,s.hX)(t))return o;for(var l=0,h=t.length;l<h;l++){var d=(0,s._W)(n.id,t[parseInt(l.toString(),10)]);if(t[parseInt(l.toString(),10)]&&d&&d.toString()===r)return t[parseInt(l.toString(),10)];if("string"!=typeof n.child||(0,s.hX)((0,s._W)(n.child,t[parseInt(l.toString(),10)]))){if(this.fields.dataSource instanceof x.M1&&!(0,s.hX)((0,s._W)("child",t[parseInt(l.toString(),10)]))){if(void 0!==(o=this.getChildNodeObject((0,s._W)("child",t[parseInt(l.toString(),10)]),this.getChildMapper(n),r)))break}else if(this.isChildObject()&&(p=(0,s._W)("child",t[parseInt(l.toString(),10)]),void 0!==(o=this.getChildNodeObject(p,this.getChildMapper(n),r))))break}else{var p=(0,s._W)(n.child,t[parseInt(l.toString(),10)]);if(void 0!==(o=this.getChildNodeObject(p,this.getChildMapper(n),r)))break}}return o},i.prototype.setDragAndDrop=function(t){t&&!this.disabled?this.initializeDrag():this.destroyDrag()},i.prototype.initializeDrag=function(){var n,t=this;this.dragObj=new s.sx(this.element,{enableTailMode:!0,enableAutoScroll:!0,dragArea:this.dragArea,dragTarget:"."+hi,enableTapHold:!0,tapHoldThreshold:100,helper:function(r){t.dragTarget=r.sender.target;var o=(0,s.kp)(t.dragTarget,"."+xn),l=(0,s.kp)(t.dragTarget,"."+hi);if(t.dragLi=(0,s.kp)(t.dragTarget,"."+Oe),t.fullRowSelect&&!l&&t.dragTarget.classList.contains(Fr)&&(l=t.dragTarget.nextElementSibling),!t.dragTarget||!r.element.isSameNode(o)||!l||t.dragTarget.classList.contains(xn)||t.dragTarget.classList.contains(qe)||t.dragTarget.classList.contains(Oe)||t.dragLi.classList.contains("e-disable"))return!1;var h=l.cloneNode(!0);if((0,s.hX)((0,s.Lt)("div."+ni,h))){var d=t.createElement("div",{className:ni+" "+$e});h.insertBefore(d,h.children[0])}(n=t.createElement("div",{className:"e-drag-item "+xn+" "+t.cssClass+" "+(t.enableRtl?"e-rtl":"")})).appendChild(h);var u=t.selectedNodes.length;if(u>1&&t.allowMultiSelection&&t.dragLi.classList.contains(Si)){var f=t.createElement("span",{className:"e-drop-count",innerHTML:""+u});n.appendChild(f)}return document.body.appendChild(n),document.body.style.cursor="",t.dragData=t.getNodeData(t.dragLi),n},dragStart:function(r){(0,s.iQ)([t.element],ih);var l,o=(0,s.kp)(r.target,".e-list-item");o&&(l=parseInt(o.getAttribute("aria-level"),10));var h=t.getDragEvent(r.event,t,null,r.target,null,n,l);h.draggedNode.classList.contains($p)?(t.dragObj.intDestroy(r.event),t.dragCancelAction(n)):t.trigger("nodeDragStart",h,function(d){d.cancel?(t.dragObj.intDestroy(r.event),t.dragCancelAction(n)):t.dragStartAction=!0}
1)},drag:function(r){t.dragObj.setProperties({cursorAt:{top:!(0,s.hX)(r.event.targetTouches)||s.Pw.isDevice?60:-20}}),t.dragAction(r,n)},dragStop:function(r){if(!r.target)return r.helper&&r.helper.parentNode&&(0,s.Yo)(r.helper),document.body.style.cursor="",(0,s.vy)([t.element],ih),void(t.dragStartAction=!1);(0,s.vy)([t.element],ih),r.target.classList.contains("e-sibling")||t.removeVirtualEle();var o=r.target,h=(0,s.kp)(o,"."+Ev);(!o||!h)&&((0,s.Yo)(r.helper),document.body.style.cursor="");var p,d=(0,s.kp)(o,".e-list-item");d&&(p=parseInt(d.getAttribute("aria-level"),10));var u=t.getDragEvent(r.event,t,o,o,null,r.helper,p);u.preventTargetExpand=!1,t.trigger("nodeDragStop",u,function(f){t.dragParent=f.draggedParentNode,t.preventExpand=f.preventTargetExpand,f.cancel&&(r.helper.parentNode&&(0,s.Yo)(r.helper),document.body.style.cursor="",o.classList.contains("e-sibling")&&t.removeVirtualEle()),t.dragStartAction=!1})}}),this.dropObj=new s.gL(this.element,{out:function(r){r.target&&!(0,s.hX)(r)&&!r.target.classList.contains(Ga)&&t.dropObj.dragData.default&&t.dropObj.dragData.default.helper.classList.contains(xn)&&(document.body.style.cursor="not-allowed")},over:function(){document.body.style.cursor=""}
1,drop:function(r){t.dropAction(r),t.removeVirtualEle()}})},i.prototype.dragCancelAction=function(t){(0,s.Yo)(t),(0,s.vy)([this.element],ih),this.dragStartAction=!1},i.prototype.getOffsetX=function(t,n){var r=t.changedTouches;return r&&r.length>0?r[0].clientX-n.getBoundingClientRect().left:t.offsetX},i.prototype.getOffsetY=function(t,n){var r=t.changedTouches;return r&&r.length>0?r[0].clientY-n.getBoundingClientRect().top:t.offsetY},i.prototype.dragAction=function(t,n){if(t.target){var r=(0,s.kp)(t.target,"."+Ev),o=(0,s.kp)(t.target,"."+hi),l=(0,s.Lt)("div."+ni,n);(0,s.vy)([l],[nh,Ya,qp,Gp]),this.isDropIn=!1,this.removeVirtualEle(),document.body.style.cursor="";var h=t.target.classList,d=t.event,p=this.getOffsetY(d,t.target),u=this.getOffsetX(d,t.target);if(this.fullRowSelect&&!o&&!(0,s.hX)(h)&&h.contains(Fr)&&(o=t.target.nextElementSibling),r){var f=(0,s.kp)(t.target,"."+Oe),m=(0,s.kp)(t.target,"."+ki),g=(0,s.kp)(t.target,"."+Lt),v=(0,s.kp)(t.target,"."+$e);if(!r.classList.contains(xn)||o&&!f.isSameNode(this.dragLi)&&!this.isDescendant(this.dragLi,f))if(this.hasTemplate&&f){var b=(0,s.Lt)(this.fullRowSelect?"."+Fr:"."+hi,f);t&&!v&&!g&&p<7&&!m||v&&p<5||g&&u<3?this.appendIndicator(f,l,this.fullRowSelect?1:0):t&&!v&&!g&&!m&&b&&p>b.offsetHeight-10||v&&p>19||g&&u>19?this.appendIndicator(f,l,this.fullRowSelect?2:1):((0,s.iQ)([l],nh),this.isDropIn=!0)}else f&&t&&!v&&!g&&p<7&&!m||v&&p<5||g&&u<3?this.appendIndicator(f,l,this.fullRowSelect?1:0):f&&t&&!v&&!g&&t.target.offsetHeight>0&&p>t.target.offsetHeight-10&&!m||v&&p>19||g&&u>19?this.appendIndicator(f,l,this.fullRowSelect?2:1):((0,s.iQ)([l],nh),this.isDropIn=!0);else"LI"!==t.target.nodeName||f.isSameNode(this.dragLi)||this.isDescendant(this.dragLi,f)?t.target.classList.contains(Ga)?(0,s.iQ)([l],Ya):(0,s.iQ)([l],qp):((0,s.iQ)([l],Ya),this.renderVirtualEle(t))}else(0,s.iQ)([l],Gp),document.body.style.cursor="not-allowed";var E,S=(0,s.kp)(t.target,".e-list-item");S&&(E=parseInt(S.getAttribute("aria-level"),10));var _=this.getDragEvent(t.event,this,t.target,t.target,null,n,E);_.dropIndicator&&(0,s.vy)([l],_.dropIndicator),this.trigger("nodeDragging",_),_.dropIndicator&&(0,s.iQ)([l],_.dropIndicator)}},i.prototype.appendIndicator=function(t,n,r){(0,s.iQ)([n],Ya);var o=this.createElement("div",{className:Ga});t.insertBefore(o,t.children[parseInt(r.toString(),10)])},i.prototype.dropAction=function(t){for(var l,h,r=this.getOffsetY(t.event,t.target),o=t.target,d=!1,p=[],u=[],f=t.dragData.draggable,m=0;m<f.ej2_instances.length;m++)if(f.ej2_instances[parseInt(m.toString(),10)]instanceof e){l=f.ej2_instances[parseInt(m.toString(),10)];break}if(l&&l.dragTarget){var v=(0,s.kp)(l.dragTarget,"."+Oe),b=(0,s.kp)(o,"."+Oe);if(u.push(v),null==b&&o.classList.contains(xn)&&(b=o.firstElementChild),(0,s.Yo)(t.droppedElement),document.body.style.cursor="",!b||b.isSameNode(v)||this.isDescendant(v,b))return void(this.fields.dataSource instanceof x.M1||(this.preventExpand=!1));if(l.allowMultiSelection&&v.classList.contains(Si)){var y=(0,s.Ub)("."+Si,l.element);if(u=y,t.target.offsetHeight<=33&&r>t.target.offsetHeight-10&&r>6)for(m=y.length-1;m>=0;m--)b.isSameNode(y[parseInt(m.toString(),10)])||this.isDescendant(y[parseInt(m.toString(),10)],b)||this.appendNode(o,y[parseInt(m.toString(),10)],b,t,l,r);else for(m=0;m<y.length;m++)b.isSameNode(y[parseInt(m.toString(),10)])||this.isDescendant(y[parseInt(m.toString(),10)],b)||this.appendNode(o,y[parseInt(m.toString(),10)],b,t,l,r)}else this.appendNode(o,v,b,t,l,r);h=parseInt(v.getAttribute("aria-level"),10),d=!0}this.fields.dataSource instanceof x.M1||(this.preventExpand=!1);var S=(0,s.hX)(l)?null:l.dragData;for(m=0;m<u.length;m++)p.push(this.getNodeData(this.getElement(u[parseInt(m.toString(),10)]),!0,S));this.trigger("nodeDropped",this.getDragEvent(t.event,l,o,t.target,t.dragData.draggedElement,null,h,d)),l.element.id!==this.element.id&&(l.triggerEvent("nodeDropped",p),this.isNodeDropped=!0,this.fields.dataSource=this.treeData),this.triggerEvent("nodeDropped",p)},i.prototype.appendNode=function(t,n,r,o,l,h){var d=(0,s.kp)(t,"."+ki),p=(0,s.kp)(o.target,"."+Lt),u=(0,s.kp)(o.target,"."+$e);n.classList.contains("e-disable")||d||!(u&&o.event.offsetY<5||p&&o.event.offsetX<3||u&&o.event.offsetY>19||p&&o.event.offsetX>19||!u&&!p)?this.dropAsChildNode(n,r,l,null,o,h,!0,t):"LI"===t.nodeName?this.dropAsSiblingNode(n,r,o,l):t.firstElementChild&&t.classList.contains(xn)?"UL"===t.firstElementChild.nodeName&&this.dropAsSiblingNode(n,r,o,l):t.classList.contains("e-icon-collapsible")||t.classList.contains("e-icon-expandable")?this.dropAsSiblingNode(n,r,o,l):this.dropAsChildNode(n,r,l,null,o,h,null,t),this.showCheckBox&&this.ensureIndeterminate()},i.prototype.dropAsSiblingNode=function(t,n,r,o){var p,l=(0,s.kp)(n,"."+qe),h=(0,s.kp)(t,"."+qe),d=(0,s.kp)(h,"."+Oe);if(r.target.offsetHeight>0&&r.event.offsetY>r.target.offsetHeight-2?p=!1:r.event.offsetY<2?p=!0:(r.target.classList.contains("e-icon-expandable")||r.target.classList.contains("e-icon-collapsible"))&&(r.event.offsetY<5||r.event.offsetX<3?p=!0:(r.event.offsetY>15||r.event.offsetX>17)&&(p=!1)),r.target.classList.contains("e-icon-expandable")||r.target.classList.contains("e-icon-collapsible")){var u=r.target.closest("li");l.insertBefore(t,p?u:u.nextElementSibling)}else l.insertBefore(t,p?r.target:r.target.nextElementSibling);this.moveData(t,n,l,p,o),this.updateElement(h,d),this.updateAriaLevel(t),o.element.i
1d===this.element.id?this.updateList():(o.updateInstance(),this.updateInstance())},i.prototype.dropAsChildNode=function(t,n,r,o,l,h,d,p){var g,u=(0,s.kp)(t,"."+qe),f=(0,s.kp)(u,"."+Oe),m=(0,s.kp)(n,"."+qe);if(l&&l.target&&(g=(0,s.Lt)(this.fullRowSelect?"."+Fr:"."+hi,n)),l&&(h<7&&!p.classList.contains("e-sibling")||p.classList.contains("e-sibling")&&!n.lastChild.classList.contains("e-sibling"))&&!d)m.insertBefore(t,n),this.moveData(t,n,m,!0,r);else if(l&&l.target.offsetHeight>0&&h>l.target.offsetHeight-10&&!d&&!this.hasTemplate)m.insertBefore(t,n.nextElementSibling),this.moveData(t,n,m,!1,r);else if(this.hasTemplate&&g&&h>g.offsetHeight-10&&!d)m.insertBefore(t,n.nextElementSibling),this.moveData(t,n,m,!1,r);else{var v=this.expandParent(n),b=(0,s.hX)(o)?null:v.childNodes[parseInt(o.toString(),10)];v.insertBefore(t,b),this.moveData(t,b,v,!0,r)}this.updateElement(u,f),this.updateAriaLevel(t),r.element.id===this.element.id?this.updateList():(r.updateInstance(),this.updateInstance())},i.prototype.moveData=function(t,n,r,o,l){var h=(0,s.kp)(r,"."+Oe),d=this.getId(t),p=l.updateChildField(l.treeData,l.fields,d,null,null,!0),u=this.getId(n),f=u?this.getDataPos(this.treeData,this.fields,u):null,m=this.getId(h);if(1===this.dataType){this.updateField(this.treeData,this.fields,m,"hasChildren",!0);var g=(0,s.hX)(f)?this.treeData.length:o?f:f+1;if((0,s.hX)(m)&&!this.hasPid)delete p[0][this.fields.parentID];else{var v=this.isNumberTypeId?parseFloat(m):m;(0,s.KY)(this.fields.parentID,v,p[0])}if(this.treeData.splice(g,0,p[0]),l.element.id!==this.element.id){var b=l.removeChildNodes(d);g++;for(var y=0,S=b.length;y<S;y++)this.treeData.splice(g,0,b[parseInt(y.toString(),10)]),g++;l.groupedData=l.getGroupedData(l.treeData,l.fields.parentID)}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.addChildData(this.treeData,this.fields,m,p,o?f:f+1)},i.prototype.expandParent=function(t){var n=(0,s.Lt)("div."+$e+", div."+Lt,t);n&&n.classList.contains($e)&&!0!==this.preventExpand&&this.expandAction(t,n,null);var r=(0,s.Lt)("."+qe,t);if(!0===this.preventExpand&&!r&&n&&this.renderChildNodes(t),r=(0,s.Lt)("."+qe,t),!(0,s.hX)(r)&&this.preventExpand&&"true"!==t.getAttribute("aria-expanded")&&(r.style.display="none"),!(0,s.hX)(r)&&!1===this.preventExpand&&(r.style.display="block"),(0,s.hX)(r)&&!0===this.preventExpand&&((0,s.hX)(n)&&ce.iY.generateIcon(this.createElement,t,$e,this.listBaseOption),(o=(0,s.Lt)("div."+$e+", div."+Lt,t))&&o.classList.add("e-icon-expandable"),r=ce.iY.generateUL(this.createElement,[],null,this.listBaseOption),t.appendChild(r),o?(0,s.vy)([o],Lt):ce.iY.generateIcon(this.createElement,t,$e,this.listBaseOption),t.setAttribute("aria-expanded","false"),r.style.display="none"),(0,s.hX)(r)){var o,l=this.expandArgs;((0,s.hX)(l)||l&&"nodeExpanding"!==l.name)&&this.trigger("nodeExpanding",this.getExpandEvent(t,null)),(0,s.hX)(n)&&ce.iY.generateIcon(this.createElement,t,Lt,this.listBaseOption),(o=(0,s.Lt)("div."+$e+", div."+Lt,t))||(ce.iY.generateIcon(this.createElement,t,Lt,this.listBaseOption),o=(0,s.Lt)("div."+ni,t)),(0,s.vy)([o],$e),r=ce.iY.generateUL(this.createElement,[],null,this.listBaseOption),t.appendChild(r),this.addExpand(t),this.trigger("nodeExpanded",this.getExpandEvent(t,null))}var h=(0,s.Lt)("div."+Lt,t);return!(0,s.hX)(r)&&h&&this.preventExpand&&"true"!==t.getAttribute("aria-expanded")&&((0,s.vy)([h],Lt),t.setAttribute("aria-expanded","false"),(0,s.iQ)([h],$e)),r},i.prototype.updateElement=function(t,n){if(n&&0===t.childElementCount){var r=(0,s.Lt)("div."+ni,n);(0,s.Yo)(t),(0,s.Yo)(r);var o=this.getId(n);this.updateField(this.treeData,this.fields,o,"hasChildren",!1),this.removeExpand(n,!0)}},i.prototype.updateAriaLevel=function(t){var n=this.parents(t,"."+qe).length;t.setAttribute("aria-level",""+n),this.updateChildAriaLevel((0,s.Lt)("."+qe,t),n+1)},i.prototype.updateChildAriaLevel=function(t,n){if(!(0,s.hX)(t))for(var r=t.childNodes,o=0,l=r.length;o<l;o++){var h=r[parseInt(o.toString(),10)];h.setAttribute("aria-level",""+n),this.updateChildAriaLevel((0,s.Lt)("."+qe,h),n+1)}},i.prototype.renderVirtualEle=function(t){var n,o=this.getOffsetY(t.event,t.target);o>t.target.offsetHeight-2?n=!1:o<2&&(n=!0);var l=this.createElement("div",{className:Ga});t.target.insertBefore(l,t.target.children[parseInt((this.fullRowSelect?n?1:2:n?0:1).toString(),10)])}
1,i.prototype.removeVirtualEle=function(){var t=(0,s.Lt)("."+Ga);t&&(0,s.Yo)(t)},i.prototype.destroyDrag=function(){this.dragObj&&this.dropObj&&(this.dragObj.destroy(),this.dropObj.destroy())},i.prototype.getDragEvent=function(t,n,r,o,l,h,d,p){var u=r?(0,s.kp)(r,"."+Oe):null,f=u?this.getNodeData(u):null,m=n?n.dragLi:l,g=n?n.dragData:null,v=r?this.parents(r,"."+Oe):null,b=n.dragLi.parentElement,y=n.dragLi?(0,s.kp)(b,"."+Oe):null,S=null,E=null,_=[Ya,nh,qp,Gp],T=null,I=!0===p?m:u,w=I?(0,s.kp)(I,".e-list-parent"):null,A=0,M=null;if(y=n.dragLi&&null===y?(0,s.kp)(b,"."+xn):y,y=!0===p?this.dragParent:y,h)for(;A<4;){if((0,s.Lt)("."+ni,h).classList.contains(_[parseInt(A.toString(),10)])){T=_[parseInt(A.toString(),10)];break}A++}if(w){var D=0;for(A=0;A<w.childElementCount;A++){if(D=!0!==p&&w.children[parseInt(A.toString(),10)]===m&&u!==m?++D:D,!0!==p&&w.children[parseInt(A.toString(),10)].classList.contains("e-hover")){E=t.offsetY>=23?A+1:A;break}if(w.children[parseInt(A.toString(),10)]===I){E=A;break}}E=0!==D?--E:E,M=this.isDropIn?"Inside":t.offsetY<7?"Before":"After"}if(r&&(S=0===v.length?null:r.classList.contains(Oe)?v[0]:v[1]),u===m&&(S=u),r&&o.offsetHeight<=33&&t.offsetY<o.offsetHeight-10&&t.offsetY>6&&(S=u,!0!==p)){d=++d;var L=S?(0,s.Lt)(".e-list-parent",S):null;if(E=L?L.children.length:0,!(this.fields.dataSource instanceof x.M1)&&null===L&&S){var V=S.hasAttribute("data-uid")?this.getChildNodes(this.fields.dataSource,S.getAttribute("data-uid").toString()):null;E=V?V.length:0}}return{cancel:!1,clonedNode:h,event:t,draggedNode:m,draggedNodeData:g,droppedNode:u,droppedNodeData:f,dropIndex:E,dropLevel:d,draggedParentNode:y,dropTarget:S,dropIndicator:T,target:o,position:M}},i.prototype.addFullRow=function(t){var n=this.liList.length;if(t)for(var r=0;r<n;r++)this.createFullRow(this.liList[parseInt(r.toString(),10)]);else for(r=0;r<n;r++){var o=(0,s.Lt)("."+Fr,this.liList[parseInt(r.toString(),10)]);(0,s.Yo)(o)}},i.prototype.createFullRow=function(t){var n=this.createElement("div",{className:Fr});t.insertBefore(n,t.childNodes[0])},i.prototype.addMultiSelect=function(t){if(t)for(var r=0,o=(0,s.Ub)("."+Oe+':not([aria-selected="true"])',this.element);r<o.length;r++)o[r].setAttribute("aria-selected","false");else for(var h=0,d=(0,s.Ub)("."+Oe+'[aria-selected="false"]',this.element);h<d.length;h++)d[h].removeAttribute("aria-selected")},i.prototype.collapseByLevel=function(t,n,r,o){if(o=(0,s.hX)(o)?1:o,n>0&&!(0,s.hX)(t))for(var l=this.getVisibleNodes(r,t.childNodes),h=0,d=l.length;h<d;h++){var p=l[parseInt(h.toString(),10)],u=(0,s.Lt)("."+Lt,(0,s.Lt)("."+hi,p));o>=n&&!(0,s.hX)(u)&&this.collapseNode(p,u,null),this.collapseByLevel((0,s.Lt)("."+qe,p),n,r,o+1)}},i.prototype.collapseAllNodes=function(t){for(var n=this.getVisibleNodes(t,(0,s.Ub)("."+Lt,this.element)),r=0,o=n.length;r<o;r++){var l=n[parseInt(r.toString(),10)],h=(0,s.kp)(l,"."+Oe);this.collapseNode(h,l,null)}},i.prototype.expandByLevel=function(t,n,r){if(n>0&&!(0,s.hX)(t))for(var o=this.getVisibleNodes(r,t.childNodes),l=0,h=o.length;l<h;l++){var d=o[parseInt(l.toString(),10)],p=(0,s.Lt)("."+$e,(0,s.Lt)("."+hi,d));(0,s.hX)(p)||this.expandAction(d,p,null),this.expandByLevel((0,s.Lt)("."+qe,d),n-1,r)}},i.prototype.expandAllNodes=function(t){for(var r=0,o=this.getVisibleNodes(t,(0,s.Ub)("."+$e,this.element));r<o.length;r++){var l=o[r],h=(0,s.kp)(l,"."+Oe);this.expandAction(h,l,null,!0,null,!0)}},i.prototype.getVisibleNodes=function(t,n){var r=Array.prototype.slice.call(n);if(t)for(var o=0;o<r.length;o++)(0,s.zN)(r[parseInt(o.toString(),10)])||(r.splice(o,1),o--);return r},i.prototype.removeNode=function(t){var n=(0,s.kp)(t,"."+qe),r=(0,s.kp)(n,"."+Oe);(0,s.hX)(this.nodeTemplateFn)||this.destroyTemplate(t),(0,s.Yo)(t),this.updateElement(n,r),this.removeData(t)},i.prototype.updateInstance=function(){this.updateList(),this.updateSelectedNodes(),this.updateExpandedNodes()},i.prototype.updateList=function(){this.liList=Array.prototype.slice.call((0,s.Ub)("."+Oe,this.element))},i.prototype.updateSelectedNodes=function(){this.setProperties({selectedNodes:[]},!0);var t=(0,s.Ub)("."+Si,this.element);this.selectGivenNodes(t)},i.prototype.updateExpandedNodes=function(){this.setProperties({expandedNodes:[]},!0);for(var t=(0,s.Ub)('[aria-expanded="true"]',this.element),n=0,r=t.length;n<r;n++)this.addExpand(t[parseInt(n.toString(),10)])},i.prototype.removeData=function(t){if(1===this.dataType){var n=new x.M1(this.treeData),r=this.getId(t),o={},l=this.isNumberTypeId?parseFloat(r):r;o[this.fields.id]=l,n.remove(this.fields.id,o),this.removeChildNodes(r)}else r=this.getId(t),this.updateChildField(this.treeData,this.fields,r,null,null,!0)},i.prototype.removeChildNodes=function(t){for(var n=this.getChildGroup(this.groupedData,t,!1),r=[],o=0,l=n.length;o<l;o++){var h=new x.M1(this.treeData),d=(0,s._W)(this.fields.id,n[parseInt(o.toString(),10)]).toString(),p={},u=this.isNumberTypeId?parseFloat(d):d;p[this.fields.id]=u;var f=h.remove(this.fields.id,p);r.push(f[0]),this.removeChildNodes(d)}return r},i.prototype.doGivenAction=function(t,n,r){for(var o=0,l=t.length;o<l;o++){var h=this.getElement(t[parseInt(o.toString(),10)]);if(!(0,s.hX)(h)){var d=(0,s.Lt)("."+n,(0,s.Lt)("."+hi,h));(0,s.hX)(d)||(r?this.expandAction(h,d,null):this.collapseNode(h,d,null))}}},i.prototype.addGivenNodes=function(t,n,r,o,l){if(0!==t.length){var h=this.getSortedData(t),d=n?parseFloat(n.getAttribute("aria-level"))+1:1;o&&this.updateMapper(d);var f,m,p=ce.iY.createListItemFromJson(this.createElement,h,this.listBaseOption,d),u=this.getId(n);(0,s.hX)(n)||(f=(0,s.Lt)("div."+ni,n)),1===this.dataType&&f&&f.classList.contains($e)&&this.preventExpand&&!(0,s.hX)(this.element.offsetParent)&&!this.element.offsetParent.parentElement.classList.contains("e-filemanager")&&(this.preventExpand=!0),1!==this.dataType&&(this.addChildData(this.treeData,this.fields,u,t,r),this.isFirstRender=!1),m=l||(n?this.expandParent(n):(0,s.Lt)("."+qe,this.element));var g=(0,s.hX)(r)?null:m.childNodes[parseInt(r.toString(),10)];if(!this.isFirstRender||1===this.dataType){var v=this.expandArgs;if(g||"None"===this.sortOrder){for(var b=0;b<p.length;b++)m.insertBefore(p[parseInt(b.toString(),10)],g);1!==this.dataType||(0,s.hX)(n)||this.preventExpand||(0,s.hX)(this.element.offsetParent)||this.element.offsetParent.parentElement.classList.contains("e-filemanager")||(this.preventExpand=!1,(y=(0,s.Lt)("div."+ni,n))&&y.classList.contains($e)&&((0,s.hX)(v)||"nodeExpanding"!==v.name)&&this.expandAction(n,y,null))}if(!g&&("Ascending"===this.sortOrder||"Descending"===this.sortOrder))if(0===m.childNodes.length){for(b=0;b<p.length;b++)m.insertBefore(p[parseInt(b.toString(),10)],g);var y;1!==this.dataType||(0,s.hX)(n)||this.preventExpand||(0,s.hX)(this.element.offsetParent)||this.element.offsetParent.parentElement.classList.contains("e-filemanager")||(this.preventExpand=!1,(y=(0,s.Lt)("div."+ni,n))&&y.classList.contains($e)&&((0,s.hX)(v)||"nodeExpanding"!==v.name)&&this.expandAction(n,y,null))}else{var S=m.childNodes;for(b=0;b<p.length;b++)for(var E=0;E<S.length;E++){if("Ascending"===this.sortOrder?S[parseInt(E.toString(),10)].textContent.toUpperCase()>p[parseInt(b.toString(),10)].innerText.toUpperCase():S[parseInt(E.toString(),10)].textContent.toUpperCase()<
1p[parseInt(b.toString(),10)].innerText.toUpperCase()){m.insertBefore(p[parseInt(b.toString(),10)],S[parseInt(E.toString(),10)]);break}m.insertBefore(p[parseInt(b.toString(),10)],S[S.length])}}}if(1===this.dataType){this.updateField(this.treeData,this.fields,u,"hasChildren",!0);var T=this.getId(g),I=(0,s.hX)(T)?this.treeData.length:this.getDataPos(this.treeData,this.fields,T);for(E=0;E<t.length;E++){if(!(0,s.hX)(u)){var w=this.isNumberTypeId?parseFloat(u):u;(0,s.KY)(this.fields.parentID,w,t[parseInt(E.toString(),10)])}this.treeData.splice(I,0,t[parseInt(E.toString(),10)]),I++}}this.finalizeNode(m)}},i.prototype.updateMapper=function(t){var n=1===t?this.fields:this.getChildFields(this.fields,t-1,1);this.updateListProp(n)},i.prototype.updateListProp=function(t){var n=this.getActualProperties(t);this.listBaseOption.fields=n,this.listBaseOption.fields.url=Object.prototype.hasOwnProperty.call(n,"navigateUrl")?n.navigateUrl:"navigateUrl"},i.prototype.getDataPos=function(t,n,r){for(var o=null,l=0,h=t.length;l<h;l++){var d=(0,s._W)(n.id,t[parseInt(l.toString(),10)]);if(t[parseInt(l.toString(),10)]&&d&&d.toString()===r)return l;if("string"!=typeof n.child||(0,s.hX)((0,s._W)(n.child,t[parseInt(l.toString(),10)]))){if(this.fields.dataSource instanceof x.M1&&!(0,s.hX)((0,s._W)("child",t[parseInt(l.toString(),10)]))){var u=(0,s._W)("child",t[parseInt(l.toString(),10)]);if(null!==(o=this.getDataPos(u,this.getChildMapper(n),r)))break}}else{var p=(0,s._W)(n.child,t[parseInt(l.toString(),10)]);if(null!==(o=this.getDataPos(p,this.getChildMapper(n),r)))break}}return o},i.prototype.addChildData=function(t,n,r,o,l){var h;if((0,s.hX)(r)){l=(0,s.hX)(l)?t.length:l;for(var d=0,p=o.length;d<p;d++)t.splice(l,0,o[parseInt(d.toString(),10)]),l++;return h}for(var u=0,f=t.length;u<f;u++){var m=(0,s._W)(n.id,t[parseInt(u.toString(),10)]);if(t[parseInt(u.toString(),10)]&&m&&m.toString()===r){if("string"==typeof n.child&&Object.prototype.hasOwnProperty.call(t[parseInt(u.toString(),10)],n.child)&&null!==t[parseInt(u.toString(),10)][n.child]||this.fields.dataSource instanceof x.M1&&Object.prototype.hasOwnProperty.call(t[parseInt(u.toString(),10)],"child")){var v=(0,s._W)(g="string"==typeof n.child?n.child:"child",t[parseInt(u.toString(),10)]);for((0,s.hX)(v)&&(v=[]),l=(0,s.hX)(l)?v.length:l,d=0,p=o.length;d<p;d++)v.splice(l,0,o[parseInt(d.toString(),10)]),l++}else{var g="string"==typeof n.child?n.child:"child";t[parseInt(u.toString(),10)][""+g]=o}return!0}if("string"!=typeof n.child||(0,s.hX)((0,s._W)(n.child,t[parseInt(u.toString(),10)]))){if(this.fields.dataSource instanceof x.M1&&!(0,s.hX)((0,s._W)("child",t[parseInt(u.toString(),10)]))&&(v=(0,s._W)("child",t[parseInt(u.toString(),10)]),void 0!==(h=this.addChildData(v,this.getChildMapper(n),r,o,l))))break}else{var b=(0,s._W)(n.child,t[parseInt(u.toString(),10)]);if(void 0!==(h=this.addChildData(b,this.getChildMapper(n),r,o,l)))break}}return h},i.prototype.doDisableAction=function(t){var n=this.nodeType(t),r=this.checkValidId(n);this.validArr=[];for(var o=0,l=r.length;o<l;o++){var h=r[parseInt(o.toString(),10)][this.fields.id].toString();h&&-1===this.disableNode.indexOf(h)&&this.disableNode.push(h);var d=this.getElement(h);d&&(d.setAttribute("aria-disabled","true"),(0,s.iQ)([d],Vo))}},i.prototype.doEnableAction=function(t){for(var n=this.nodeType(t),r=0,o=n.length;r<o;r++){var l=this.getElement(n[parseInt(r.toString(),10)]),h=n[parseInt(r.toString(),10)];h&&-1!==this.disableNode.indexOf(h)&&this.disableNode.splice(this.disableNode.indexOf(h),1),l&&(l.removeAttribute("aria-disabled"),(0,s.vy)([l],Vo))}},i.prototype.nodeType=function(t){for(var n=[],r=0,o=t.length;r<o;r++){var l=void 0;"string"==typeof t[parseInt(r.toString(),10)]?l=t[parseInt(r.toString(),10)]?t[parseInt(r.toString(),10)].toString():null:"object"==typeof t[parseInt(r.toString(),10)]&&(l=t[parseInt(r.toString(),10)]?t[parseInt(r.toString(),10)].getAttribute("data-uid").toString():null),-1===n.indexOf(l)&&n.push(l)}return n},i.prototype.checkValidId=function(t){var n=this;if(1===this.dataType)this.validArr=this.treeData.filter(function(h){return-1!==t.indexOf(h[n.fields.id]?h[n.fields.id].toString():null)});else if(2===this.dataType)for(var r=0;r<this.treeData.length;r++){var o=this.treeData[parseInt(r.toString(),10)][this.fields.id]?this.treeData[parseInt(r.toString(),10)][this.fields.id].toString():null;
1-1!==t.indexOf(o)&&this.validArr.push(this.treeData[parseInt(r.toString(),10)]);var l=(0,s._W)(this.fields.child.toString(),this.treeData[parseInt(r.toString(),10)]);l&&this.filterNestedChild(l,t)}return this.validArr},i.prototype.filterNestedChild=function(t,n){for(var r=0;r<t.length;r++){var o=t[parseInt(r.toString(),10)][this.fields.id]?t[parseInt(r.toString(),10)][this.fields.id].toString():null;-1!==n.indexOf(o)&&this.validArr.push(t[parseInt(r.toString(),10)]);var l=(0,s._W)(this.fields.child.toString(),t[parseInt(r.toString(),10)]);l&&this.filterNestedChild(l,n)}},i.prototype.setTouchClass=function(){var t=(0,s.kp)(this.element,".e-bigger");this.touchClass=(0,s.hX)(t)?"":"e-small"},i.prototype.updatePersistProp=function(){this.removeField(this.treeData,this.fields,["selected","expanded"]);for(var t=this.selectedNodes,n=0,r=t.length;n<r;n++)this.updateField(this.treeData,this.fields,t[parseInt(n.toString(),10)],"selected",!0);for(var o=this.expandedNodes,l=0,h=o.length;l<h;l++)this.updateField(this.treeData,this.fields,o[parseInt(l.toString(),10)],"expanded",!0);if(this.showCheckBox){this.removeField(this.treeData,this.fields,["isChecked"]);var d=this.checkedNodes,p=0;for(h=d.length;p<h;p++)this.updateField(this.treeData,this.fields,d[parseInt(p.toString(),10)],"isChecked",!0)}},i.prototype.removeField=function(t,n,r){if(!(0,s.hX)(t)&&!(0,s.hX)(n))for(var o=0,l=t.length;o<l;o++){for(var h=0;h<r.length;h++){var d=this.getMapperProp(n,r[parseInt(h.toString(),10)]);(0,s.hX)(t[parseInt(o.toString(),10)][""+d])||delete t[parseInt(o.toString(),10)][""+d]}"string"!=typeof n.child||(0,s.hX)((0,s._W)(n.child,t[parseInt(o.toString(),10)]))?this.fields.dataSource instanceof x.M1&&!(0,s.hX)((0,s._W)("child",t[parseInt(o.toString(),10)]))&&this.removeField((0,s._W)("child",t[parseInt(o.toString(),10)]),this.getChildMapper(n),r):this.removeField((0,s._W)(n.child,t[parseInt(o.toString(),10)]),this.getChildMapper(n),r)}},i.prototype.getMapperProp=function(t,n){switch(n){case"selected":return(0,s.hX)(t.selected)?"selected":t.selected;case"expanded":return(0,s.hX)(t.expanded)?"expanded":t.expanded;case"isChecked":return(0,s.hX)(t.isChecked)?"isChecked":t.isChecked;case"hasChildren":return(0,s.hX)(t.hasChildren)?"hasChildren":t.hasChildren;default:return n}},i.prototype.updateField=function(t,n,r,o,l){if(!(0,s.hX)(r))if(1===this.dataType){var h=this.isNumberTypeId?parseFloat(r):r,d=new x.M1(this.treeData).executeLocal((new x.XK).where(n.id,"equal",h,!1));(0,s.KY)(this.getMapperProp(n,o),l,d[0])}else this.updateChildField(t,n,r,o,l)},i.prototype.updateChildField=function(t,n,r,o,l,h){var d;if((0,s.hX)(t))return d;for(var p=0,u=t.length;p<u;p++){var f=(0,s._W)(n.id,t[parseInt(p.toString(),10)]);if(t[parseInt(p.toString(),10)]&&!(0,s.hX)(f)&&f.toString()===r)return h?d=t.splice(p,1):((0,s.KY)(this.getMapperProp(n,o),l,t[parseInt(p.toString(),10)]),d=[]),d;if("string"!=typeof n.child||(0,s.hX)((0,s._W)(n.child,t[parseInt(p.toString(),10)]))){if(this.fields.dataSource instanceof x.M1&&!(0,s.hX)((0,s._W)("child",t[parseInt(p.toString(),10)]))){var g=(0,s._W)("child",t[parseInt(p.toString(),10)]);if(void 0!==(d=this.updateChildField(g,this.getChildMapper(n),r,o,l,h)))break}}else{var m=(0,s._W)(n.child,t[parseInt(p.toString(),10)]);if(void 0!==(d=this.updateChildField(m,this.getChildMapper(n),r,o,l,h)))break}}return d},i.prototype.triggerEvent=function(t,n){if(this.renderReactTemplates(),"addNodes"===t){for(var r=[],o=0;o<n.length;o++)r.push(this.getNode(this.getElement((0,s.hX)(n[parseInt(o.toString(),10)][this.fields.id])?(0,s._W)(this.fields.id,n[parseInt(o.toString(),10)]).toString():null)));n=r}this.trigger("dataSourceChanged",{data:this.treeData,action:t,nodeData:n})},i.prototype.wireInputEvents=function(t){s.Jm.add(t,"blur",this.inputFocusOut,this)},i.prototype.wireEditingEvents=function(t){var n=this;t&&!this.disabled?this.touchEditObj=new s.Up(this.element,{tap:function(r){n.isDoubleTapped(r)&&2===r.tapCount&&(r.originalEvent.preventDefault(),n.editingHandler(r.originalEvent))}}):this.touchEditObj&&this.touchEditObj.destroy()},i.prototype.wireClickEvent=function(t){var n=this;t?this.touchClickObj=new s.Up(this.element,{tap:function(r){n.clickHandler(r)}}):this.touchClickObj&&this.touchClickObj.destroy()},i.prototype.wireExpandOnEvent=function(t){var n=this;t?this.touchExpandObj=new s.Up(this.element,{tap:function(r){("Click"===n.expandOnType||"DblClick"===n.expandOnType&&n.isDoubleTapped(r)&&2===r.tapCount)&&3!==r.originalEvent.which&&n.expandHandler(r)}}):this.touchExpandObj&&this.touchExpandObj.destroy()},i.prototype.mouseDownHandler=function(t){this.mouseDownStatus=!0,(t.shiftKey||t.ctrlKey)&&t.preventDefault(),t.ctrlKey&&this.allowMultiSelection&&s.Jm.add(this.element,"contextmenu",this.preventContextMenu,this)},i.prototype.preventContextMenu=function(t){t.preventDefault()},i.prototype.wireEvents=function(){s.Jm.add(this.element,"mousedown",this.mouseDownHandler,this),this.wireClickEvent(!0),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0),s.Jm.add(this.element,"mouseover",this.onMouseOver,this),s.Jm.add(this.element,"mouseout",this.onMouseLeave,this),this.keyboardModule=new s.j9(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},i.prototype.unWireEvents=function(){s.Jm.remove(this.element,"mousedown",this.mouseDownHandler),this.wireClickEvent(!1),this.wireExpandOnEvent(!1),s.Jm.remove(this.element,"mouseover",this.onMouseOver),s.Jm.remove(this.element,"mouseout",this.onMouseLeave),this.disabled||this.keyboardModule.destroy()},i.prototype.parents=function(t,n){for(var r=[],o=t.parentNode;!(0,s.hX)(o);)(0,s.cK)(o,n)&&r.push(o),o=o.parentNode;return r},i.prototype.isDoubleTapped=function(t){var r,n=t.originalEvent.target;return n&&t.tapCount&&(1===t.tapCount?this.firstTap=(0,s.kp)(n,"."+Oe):2===t.tapCount&&(r=(0,s.kp)(n,"."+Oe))),this.firstTap===r},i.prototype.isDescendant=function(t,n){for(var r=n.parentNode;!(0,s.hX)(r);){if(r===t)return!0;r=r.parentNode}return!1},i.prototype.showSpinner=function(t){(0,s.iQ)([t],Zc),(0,ae.GF)({target:t,width:s.Pw.isDevice?16:14},this.createElement),(0,ae.xc)(t)},i.prototype.hideSpinner=function(t){(0,ae.W$)(t),t.innerHTML="",(0,s.vy)([t],Zc)},i.prototype.setCheckedNodes=function(t){(t=JSON.parse(JSON.stringify(t))).length>1&&"function"==typeof this.nodeChecked&&this.nodeChecked.length>0&&(this.isFilter=!0),this.uncheckAll(this.checkedNodes),this.setIndeterminate(t),t.length>0&&this.checkAll(t)},i.prototype.setValidCheckedNode=function(t,n){if(void 0===n&&(n=[]),1===this.dataType){var r=this.fields,o=new x.M1(this.treeData).executeLocal((new x.XK).where(r.id,"equal",t,!0));if(o[0]&&(this.setChildCheckState(o,t,o[0],n),this.autoCheck)){for(var l=o[0][this.fields.parentID]?o[0][this.fields.parentID].toString():null,h=this.getChildNodes(this.treeData,l),d=0,p=0;p<h.length;p++){var u=h[parseInt(p.toString(),10)][this.fields.id].toString();-1!==this.checkedNodes.indexOf(u)&&d++}d===h.length&&-1===this.checkedNodes.indexOf(l)&&l&&this.checkDisabledState(l)}}else if(2===this.dataType)for(var f=0;f<this.treeData.length;f++){if((this.treeData[parseInt(f.toString(),10)][this.fields.id]?this.treeData[parseInt(f.toString(),10)][this.fields.id].toString():"")===t&&-1===this.checkedNodes.indexOf(t)){this.checkDisabledState(t);break}var g=(0,s._W)(this.fields.child.toString(),this.treeData[parseInt(f.toString(),10)]);g&&this.setChildCheckState(g,t,this.treeData[parseInt(f.toString(),10)],n)}},i.prototype.setChildCheckState=function(t,n,r,o){void 0===o&&(o=[]);var l,h=0;if(1===this.dataType){r&&(l=r[this.fields.id]?r[this.fields.id].toString():null);for(var d=0;d<t.length;d++){var p=t[parseInt(d.toString(),10)][this.fields.id]?t[parseInt(d.toString(),10)][this.fields.id].toString():null;r&&l&&this.autoCheck&&-1!==this.checkedNodes.indexOf(l)&&-1===this.checkedNodes.indexOf(p)&&this.checkDisabledState(p,t[d]),p===n&&-1===this.checkedNodes.indexOf(n)&&this.checkDisabledState(n);var u=this.getChildNodes(this.treeData,p),f=1===o.length&&o[0]===p;(u.length===n.length||f)&&this.setChildCheckState(u,n,r)}}else for(r&&(l=r[this.fields.id]?r[this.fields.id].toString():""),d=0;d<t.length;d++){var m=t[parseInt(d.toString(),10)][this.fields.id]?t[parseInt(d.toString(),10)][this.fields.id].toString():"";f=0===o.length,r&&l&&this.autoCheck&&-1!==this.checkedNodes.indexOf(l)&&-1===this.checkedNodes.indexOf(m)&&(m===n||f)&&this.checkDisabledState(m,t[d]),m===n&&-1===this.checkedNodes.indexOf(n)&&this.checkDisabledState(n),(u=(0,s._W)(this.fields.child.toString(),t[parseInt(d.toString(),10)]))&&this.setChildCheckState(u,n,t[parseInt(d.toString(),10)]),-1!==this.checkedNodes.indexOf(m)&&this.autoCheck&&h++,h===t.length&&-1===this.checkedNodes.indexOf(l)&&this.autoCheck&&this.checkDisabledState(l,r)}},i.prototype.setIndeterminate=function(t){for(var n=0;n<t.length;n++)this.setValidCheckedNode(t[parseInt(n.toString(),10)],t)},i.prototype.updatePosition=function(t,n,r,o){if(1===this.dataType){var l=this.getDataPos(this.treeData,this.fields,t);if(this.treeData.splice(l,1,n),r){this.removeChildNodes(t);for(var h=0;h<o.length;h++)this.treeData.splice(l,0,o[parseInt(h.toString(),10)]),l++}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.updateChildPosition(this.treeData,this.fields,t,[n],void 0)},i.prototype.updateChildPosition=function(t,n,r,o,l){for(var h,d=0,p=t.length;d<p;d++){var u=(0,s._W)(n.id,t[parseInt(d.toString(),10)]);if(t[parseInt(d.toString(),10)]&&u&&u.toString()===r)return t[parseInt(d.toString(),10)]=o[0],!0;if("string"!=typeof n.child||(0,s.hX)((0,s._W)(n.child,t[parseInt(d.toString(),10)]))){if(this.fields.dataSource instanceof x.M1&&!(0,s.hX)((0,s._W)("child",t[parseInt(d.toString(),10)]))){var m=(0,s._W)("child",t[parseInt(d.toString(),10)]);if(void 0!==(h=this.updateChildPosition(m,this.getChildMapper(n),r,o,l)))break}}else{var f=(0,s._W)(n.child,t[parseInt(d.toString(),10)]);if(void 0!==(h=this.updateChildPosition(f,this.getChildMapper(n),r,o,l)))break}}return h},i.prototype.dynamicState=function(){this.setDragAndDrop(this.allowDragAndDrop),this.wireEditingEvents(this.allowEditing),this.disabled?(this.unWireEvents(),this.rippleFn(),this.rippleIconFn()):(this.wireEvents(),this.setRipple())},i.prototype.crudOperation=function(t,n,r,o,l,h,d){var v,p=this,u=this.fields.dataSource,f=[],m=this.getQuery(this.fields),g=this.fields.id,b={addedRecords:[],deletedRecords:[],changedRecords:[]},y=[];n?y=this.nodeType(n):r&&("string"==typeof r?y[0]=r.toString():"object"==typeof r&&(y[0]=r.getAttribute("data-uid").toString()));for(var S=0,E=y.length;S<E;S++){var _=this.getElement(y[parseInt(S.toString(),10)]);if(!(0,s.hX)(_)){var T=this.getNodeObject(y[parseInt(S.toString(),10)]);f.push(T)}}switch(t){case"delete":1===n.length?v=u.remove(g,f[0],m.fromTable,m):(b.deletedRecords=f,v=u.saveChanges(b,g,m.fromTable,m)),v.then(function(){return p.deleteSuccess(y)}).catch(function(w){return p.dmFailure(w)});break;case"update":f[0][this.fields.text]=o,(v=u.update(g,f[0],m.fromTable,m)).then(function(){return p.editSucess(r,o,d)}).catch(function(w){return p.dmFailure(w,r,d)});break;case"insert":if(1===l.length)v=u.insert(l[0],m.fromTable,m);else{var I=[];for(S=0,E=l.length;S<E;S++)I.push(l[parseInt(S.toString(),10)]);b.addedRecords=I,v=u.saveChanges(b,g,m.fromTable,m)}v.then(function(){var w=p.getElement(r);p.addSuccess(l,w,h),p.preventExpand=!1}).catch(function(w){return p.dmFailure(w)})}},i.prototype.deleteSuccess=function(t){for(var n=[],r=0,o=t.length;r<o;r++){var l=this.getElement(t[parseInt(r.toString(),10)]);n.push(this.getNode(l)),!(0,s.hX)(l)&&this.removeNode(l)}this.updateInstance(),1===this.dataType&&(this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)),this.triggerEvent("removeNode",n)},i.prototype.editSucess=function(t,n,r){var o=this.getElement(t),l=(0,s.Lt)("."+Xs,o);this.appendNewText(o,l,n,r)},i.prototype.addSuccess=function(t,n,r){var l,o=this,h=n?n.querySelector("."+ni):null;n&&h&&h.classList.contains($e)&&null===n.querySelector("."+qe)?this.renderChildNodes(n,null,function(){l=n.querySelector("."+qe),o.addGivenNodes(t,n,r,!0,l),o.triggerEvent("addNodes",t)}):(this.addGivenNodes(t,n,r,!0),this.triggerEvent("addNodes",t))},i.prototype.dmFailure=function(t,n,r){n&&this.updatePreviousText(n,r),this.trigger("actionFailure",{error:t})},i.prototype.updatePreviousText=function(t,n){var r=this.getElement(t),o=(0,s.Lt)("."+Xs,r);this.updateText(r,o,this.oldText,n)},i.prototype.getHierarchicalParentId=function(t,n,r){var o=this,l=n.findIndex(function(p){return p[o.fields.id]&&p[o.fields.id].toString()===t});if(-1===l)for(var h=0;h<n.length;h++){var d=(0,s._W)(this.fields.child.toString(),n[parseInt(h.toString(),10)]);if(!(0,s.hX)(d)){if(-1!==(l=d.findIndex(function(p){return p[o.fields.id]&&p[o.fields.id].toString()===t}))){r.push(n[parseInt(h.toString(),10)][this.fields.id].toString()),this.getHierarchicalParentId(n[parseInt(h.toString(),10)][this.fields.id].toString(),this.treeData,r);break}this.getHierarchicalParentId(t,d,r)}}return r},i.prototype.onPropertyChanged=function(t,n){for(var r=0,o=Object.keys(t);r<o.length;r++)switch(o[r]){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 h=this.getElement(this.selectedNodes[0]);this.isLoaded=!1,this.removeSelectAll(),this.selectNode(h,null),this.isLoaded=!0}this.setMultiSelect(this.allowMultiSelection),this.addMultiSelect(this.allowMultiSelection);break;case"allowTextWrap":this.setTextWrap(),this.updateWrap();break;case"checkedNodes":JSON.stringify(n.checkedNodes)!==JSON.stringify(t.checkedNodes)&&this.showCheckBox&&(this.checkedNodes=n.checkedNodes,this.setCheckedNodes(t.checkedNodes));break;case"autoCheck":this.showCheckBox&&(this.autoCheck=t.autoCheck,this.ensureIndeterminate());break;case"cssClass":this.setCssClass(n.cssClass,t.cssClass);break;case"enableRtl":this.setEnableRtl();break;case"expandedNodes":this.isAnimate=!1,this.setProperties({expandedNodes:[]},!0),this.collapseAll(),this.isInitalExpand=!0,this.setProperties({expandedNodes:(0,s.hX)(t.expandedNodes)?[]:t.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.isReact||this.isReact&&!(this.fields.dataSource instanceof x.M1))&&(this.element.classList.contains("e-filtering")||(this.DDTTreeData=JSON.parse(JSON.stringify(this.fields.dataSource))),this.reRenderNodes()),this.initialRender=!1,this.isAnimate=!0,this.isFieldChange=!1;break;case"fullRowSelect":this.setFullRow(this.fullRowSelect),this.addFullRow(this.fullRowSelect),this.allowTextWrap&&(this.setTextWrap(),this.updateWrap());break;case"loadOnDemand":if(!1===this.loadOnDemand&&!this.onLoaded){for(var d=this.element.querySelectorAll("li"),p=0;p<d.length;)"true"!==d[parseInt(p.toString(),10)].getAttribute("aria-expanded")&&this.renderChildNodes(d[parseInt(p.toString(),10)],!0,null,!0),p++;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:t.selectedNodes},!0),this.doSelectionAction();break;case"showCheckBox":case"checkDisabledChildren":case"sortOrder":this.reRenderNodes();break;case"fullRowNavigable":this.setProperties({fullRowNavigable:t.fullRowNavigable},!0),this.listBaseOption.itemNavigable=t.fullRowNavigable,this.reRenderNodes()}},i.prototype.destroy=function(){this.clearTemplate(),this.element.removeAttribute("aria-activedescendant"),this.unWireEvents(),this.wireEditingEvents(!1),this.disabled||(this.rippleFn(),this.rippleIconFn()),this.setCssClass(this.cssClass,null),this.setDragAndDrop(!1),this.setFullRow(!1),this.ulElement&&this.ulElement.parentElement&&this.ulElement.parentElement.removeChild(this.ulElement),this.ulElement=null,this.liList=null,this.startNode=null,this.fir
1stTap=null,this.expandArgs=null,this.dragLi=null,this.dragTarget=null,this.dragParent=null,this.dragObj=null,this.dropObj=null,this.inputObj=null,this.touchEditObj=null,this.touchExpandObj=null,this.touchClickObj=null,a.prototype.destroy.call(this)},i.prototype.addNodes=function(t,n,r,o){if(!(0,s.hX)(t)){t=JSON.parse(JSON.stringify(t));var l=this.getElement(n);if(this.preventExpand=o,this.fields.dataSource instanceof x.M1)this.isOffline?this.addSuccess(t,l,r):this.crudOperation("insert",null,n,null,t,r,this.preventExpand);else if(2===this.dataType)this.addGivenNodes(t,l,r);else{if(l)this.addGivenNodes(t,l,r);else{t=this.getSortedData(t);for(var h=0;h<t.length;h++){var d=(0,s._W)(this.fields.parentID,t[parseInt(h.toString(),10)]);l=d&&this.getElement(d.toString()),!(0,s.hX)(d)&&(0,s.hX)(l)&&(this.isHiddenItem=!0,this.preventExpand=!1,this.ensureVisible(d),this.preventExpand=o,this.isHiddenItem=!1,l=this.getElement(d.toString())),this.addGivenNodes([t[parseInt(h.toString(),10)]],l,r)}}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}var p=(0,s.Lt)("."+Oe+'[tabindex="0"]',this.element);(0,s.hX)(p)&&this.setNodeFocusable(),this.updateCheckedStateFromDS(),this.showCheckBox&&l&&this.ensureParentCheckState(l),this.fields.dataSource instanceof x.M1||(this.preventExpand=!1,this.triggerEvent("addNodes",t))}},i.prototype.beginEdit=function(t){var n=this.getElement(t);(0,s.hX)(n)||this.disabled||this.createTextbox(n)},i.prototype.checkAll=function(t){this.showCheckBox&&this.doCheckBoxAction(t,!0)},i.prototype.collapseAll=function(t,n,r){(0,s.hX)(t)?n>0?this.collapseByLevel((0,s.Lt)("."+qe,this.element),n,r):this.collapseAllNodes(r):this.doGivenAction(t,Lt,!1)},i.prototype.disableNodes=function(t){(0,s.hX)(t)||this.doDisableAction(t)},i.prototype.enableNodes=function(t){(0,s.hX)(t)||this.doEnableAction(t)},i.prototype.ensureVisible=function(t){var n=[];if(1===this.dataType)for(var r=this.getTreeData(t);0!==r.length&&!(0,s.hX)(r[0][this.fields.parentID]);)n.push(r[0][this.fields.parentID].toString()),r=this.getTreeData(r[0][this.fields.parentID].toString());else 2===this.dataType&&(n=this.getHierarchicalParentId(t,this.treeData,n));this.expandAll(n.reverse(),null,null,this.isHiddenItem);var o=this.getElement(t);if(!(0,s.hX)(o)){if("object"==typeof t){var l=this.parents(o,"."+Oe);this.expandAll(l)}setTimeout(function(){o.scrollIntoView({behavior:"smooth"})},450)}},i.prototype.expandAll=function(t,n,r,o){this.isAnimate=!o,(0,s.hX)(t)?n>0?this.expandByLevel((0,s.Lt)("."+qe,this.element),n,r):(this.expandAllNodes(r),(!this.loadOnDemand||this.element.classList.contains("e-filtering"))&&(this.updateAttributes(this.element),this.updateList())):this.doGivenAction(t,$e,!0),this.isAnimate=!0},i.prototype.getAllCheckedNodes=function(){return this.checkedNodes},i.prototype.getDisabledNodes=function(){return this.disableNode},i.prototype.getNode=function(t){var n=this.getElement(t);return this.getNodeData(n,!0)},i.prototype.getTreeData=function(t){var n=this.getId(t);if(this.updatePersistProp(),(0,s.hX)(n))return this.treeData;var r=this.getNodeObject(n);return(0,s.hX)(r)?[]:[r]},i.prototype.moveNodes=function(t,n,r,o){if(!(0,s.hX)(t)&&0!==t.length){var l=this.getElement(n),h=[];(0,s.hX)(l)&&(this.isHiddenItem=!0,this.ensureVisible(n),this.isHiddenItem=!1,l=this.getElement(n));for(var d=0;d<t.length;d++){var p=this.getElement(t[parseInt(d.toString(),10)]);h.push(this.getNode(p)),!((0,s.hX)(p)||l.isSameNode(p)||this.isDescendant(p,l))&&(this.preventExpand=o,this.dropAsChildNode(p,l,this,r,null,null,null,l))}this.fields.dataSource instanceof x.M1||(this.preventExpand=!1),this.triggerEvent("moveNodes",h)}},i.prototype.refreshNode=function(t,n){if(!(0,s.hX)(t)&&!(0,s.hX)(n)){var r=!1;if(1===this.dataType&&n.length>1)r=!0;else if(2===this.dataType&&1===n.length){var o=(0,s._W)(this.fields.child.toString(),n[0]);(0,s.hX)(o)||(r=!0)}var d,p,l=this.getElement(t),h=l?l.getAttribute("data-uid"):t?t.toString():null;if(this.refreshData=this.getNodeObject(h),n=JSON.parse(JSON.stringify(n)),1===this.dataType&&r){for(var u=0;u<n.length;u++)if((0,s.hX)(n[parseInt(u.toString(),10)][this.fields.parentID])){p=n[parseInt(u.toString(),10)],n.splice(u,1);break}d=(0,s.X$)({},this.refreshData,p)}else d=(0,s.X$)({},this.refreshData,n[0]);if((0,s.hX)(l))return void this.updatePosition(h,d,r,n);this.isRefreshed=!0;var f=parseFloat(l.getAttribute("aria-level")),m=ce.iY.createListItemFromJson(this.createElement,[d],this.listBaseOption,f),g=(0,s.Lt)("."+qe,l),v=(0,s._W)(this.fields.child.toString(),d);if(r&&g||r&&!(0,s.hX)(v)){var b=l.parentElement,y=Array.prototype.indexOf.call(b.childNodes,l);(0,s.TF)(l),b.insertBefore(m[0],b.childNodes[parseInt(y.toString(),10)]),this.updatePosition(h,d,r,n),r&&g&&this.expandAll([h])}else{var S=(0,s.Lt)("."+hi,l),E=(0,s.Lt)("."+hi,m[0]),_=(0,s.Lt)("div."+ni,S),T=(0,s.Lt)("div."+ni,E);_&&T&&(T.classList.contains($e)&&_.classList.contains(Lt)?((0,s.vy)([T],$e),(0,s.iQ)([T],Lt)):T.classList.contains(Lt)&&_.classList.contains($e)?((0,s.vy)([T],Lt),(0,s.iQ)([T],$e)):_.classList.contains("interaction")&&(0,s.iQ)([T],"interaction")),(0,s.TF)(S);var I=(0,s.Lt)("."+Fr,l);I.parentNode.insertBefore(E,I.nextSibling),this.updatePosition(h,d,r,n)}if(l=this.getElement(t),d[this.fields.tooltip]&&l.setAttribute("title",d[this.fields.tooltip]),Object.prototype.hasOwnProperty.call(d,this.fields.htmlAttributes)&&d[this.fields.htmlAttributes]){var w={};(0,s.h1)(w,d[this.fields.htmlAttributes]),w.class?((0,s.iQ)([l],w.class.split(" ")),delete w.class):(0,s.uK)(l,w)}-1!==this.selectedNodes.indexOf(h)&&(l.setAttribute("aria-selected","true"),(0,s.iQ)([l],Si)),this.isRefreshed=!1,this.triggerEvent("refreshNode",[this.getNode(l)])}},i.prototype.removeNodes=function(t){(0,s.hX)(t)||(this.fields.dataSource instanceof x.M1&&!this.isOffline?this.crudOperation("delete",t):this.deleteSuccess(t))},i.prototype.updateNode=function(t,n){var r=this;if(!(0,s.hX)(t)&&!(0,s.hX)(n)&&this.allowEditing){var o=this.getElement(t);if(!(0,s.hX)(o)){var l=(0,s.Lt)("."+Xs,o);this.updateOldText(o);var h=this.getEditEvent(o,null,null);this.trigger("nodeEditing",h,function(d){d.cancel||(r.fields.dataSource instanceof x.M1&&!r.isOffline?r.crudOperation("update",null,t,n,null,null,!1):r.appendNewText(o,l,n,!1))})}}},i.prototype.uncheckAll=function(t){this.showCheckBox&&this.checkedNodes.length>0&&this.doCheckBoxAction(t,!1)}
1,i.prototype.setNodeFocusable=function(){var t=(0,s.Lt)("."+Oe,this.element);t&&(t.setAttribute("tabindex","0"),this.updateIdAttr(null,t))},ge([(0,s.mA)(!1)],i.prototype,"allowDragAndDrop",void 0),ge([(0,s.mA)(!1)],i.prototype,"allowEditing",void 0),ge([(0,s.mA)(!1)],i.prototype,"allowMultiSelection",void 0),ge([(0,s.mA)(!1)],i.prototype,"allowTextWrap",void 0),ge([(0,s.pr)({},oT)],i.prototype,"animation",void 0),ge([(0,s.mA)()],i.prototype,"checkedNodes",void 0),ge([(0,s.mA)(!0)],i.prototype,"checkDisabledChildren",void 0),ge([(0,s.mA)("")],i.prototype,"cssClass",void 0),ge([(0,s.mA)(!1)],i.prototype,"disabled",void 0),ge([(0,s.mA)(null)],i.prototype,"dragArea",void 0),ge([(0,s.mA)(!0)],i.prototype,"enableHtmlSanitizer",void 0),ge([(0,s.mA)(!1)],i.prototype,"enablePersistence",void 0),ge([(0,s.mA)()],i.prototype,"expandedNodes",void 0),ge([(0,s.mA)("Auto")],i.prototype,"expandOn",void 0),ge([(0,s.pr)({},sT)],i.prototype,"fields",void 0),ge([(0,s.mA)(!0)],i.prototype,"fullRowSelect",void 0),ge([(0,s.mA)(!0)],i.prototype,"loadOnDemand",void 0),ge([(0,s.mA)()],i.prototype,"locale",void 0),ge([(0,s.mA)()],i.prototype,"nodeTemplate",void 0),ge([(0,s.mA)()],i.prototype,"selectedNodes",void 0),ge([(0,s.mA)("None")],i.prototype,"sortOrder",void 0),ge([(0,s.mA)(!1)],i.prototype,"showCheckBox",void 0),ge([(0,s.mA)(!1)],i.prototype,"checkOnClick",void 0),ge([(0,s.mA)(!0)],i.prototype,"autoCheck",void 0),ge([(0,s.mA)(!1)],i.prototype,"fullRowNavigable",void 0),ge([(0,s.Jh)()],i.prototype,"actionFailure",void 0),ge([(0,s.Jh)()],i.prototype,"created",void 0),ge([(0,s.Jh)()],i.prototype,"dataBound",void 0),ge([(0,s.Jh)()],i.prototype,"dataSourceChanged",void 0),ge([(0,s.Jh)()],i.prototype,"drawNode",void 0),ge([(0,s.Jh)()],i.prototype,"destroyed",void 0),ge([(0,s.Jh)()],i.prototype,"keyPress",void 0),ge([(0,s.Jh)()],i.prototype,"nodeChecked",void 0),ge([(0,s.Jh)()],i.prototype,"nodeChecking",void 0),ge([(0,s.Jh)()],i.prototype,"nodeClicked",void 0),ge([(0,s.Jh)()],i.prototype,"nodeCollapsed",void 0),ge([(0,s.Jh)()],i.prototype,"nodeCollapsing",void 0),ge([(0,s.Jh)()],i.prototype,"nodeDragging",void 0),ge([(0,s.Jh)()],i.prototype,"nodeDragStart",void 0),ge([(0,s.Jh)()],i.prototype,"nodeDragStop",void 0),ge([(0,s.Jh)()],i.prototype,"nodeDropped",void 0),ge([(0,s.Jh)()],i.prototype,"nodeEdited",void 0),ge([(0,s.Jh)()],i.prototype,"nodeEditing",void 0),ge([(0,s.Jh)()],i.prototype,"nodeExpanded",void 0),ge([(0,s.Jh)()],i.prototype,"nodeExpanding",void 0),ge([(0,s.Jh)()],i.prototype,"nodeSelected",void 0),ge([(0,s.Jh)()],i.prototype,"nodeSelecting",void 0),e=ge([s.kc],i)}(s.uA),Su=H(29775),ll=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Ke=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},rn="e-toast",Yo="e-toast-container",l0="e-toast-title",c0="e-toast-full-width",h0="e-toast-content",yh="e-toast-message",Sh="e-toast-progress",Cu="e-toast-close-icon",Eu="e-rtl",LT=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return ll(i,a),Ke([(0,s.mA)("Left")],i.prototype,"X",void 0),Ke([(0,s.mA)("Top")],i.prototype,"Y",void 0),i}(s.I1),RT=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return ll(i,a),Ke([(0,s.mA)(null)],i.prototype,"model",void 0),Ke([(0,s.mA)(null)],i.prototype,"click",void 0),i}(s.I1),d0=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return ll(i,a),Ke([(0,s.mA)("FadeIn")],i.prototype,"effect",void 0),Ke([(0,s.mA)(600)],i.prototype,"duration",void 0),Ke([(0,s.mA)("ease")],i.prototype,"easing",void 0),i}(s.I1),NT=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return ll(i,a),Ke([(0,s.pr)({effect:"FadeIn",duration:600,easing:"ease"},d0)],i.prototype,"show",void 0),Ke([(0,s.pr)({effect:"FadeOut",duration:600,easing:"ease"},d0)],i.prototype,"hide",void 0),i}(s.I1),VT=function(a){function i(e,t){var n=a.call(this,e,t)||this;return n.toastCollection=[],n.needsID=!0,n}return ll(i,a),i.prototype.getModuleName=function(){return"toast"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.destroy=function(){this.hide("All"),this.element.classList.remove(Yo),(0,s.sN)(this.element,{position:"","z-index":""}),!(0,s.hX)(this.refElement)&&!(0,s.hX)(this.refElement.parentElement)&&(this.refElement.parentElement.insertBefore(this.element,this.refElement),(0,s.Yo)(this.refElement),this.refElement=void 0),this.isBlazorServer()||a.prototype.destroy.call(this),this.element&&this.element.parentElement&&this.element.parentElement.removeChild(this.element)},i.prototype.preRender=function(){this.isDevice=s.Pw.isDevice,"300px"===this.width&&(this.width=this.isDevice&&screen.width<768?"100%":"300px"),(0,s.hX)(this.target)&&(this.target=document.body),this.enableRtl&&!this.isBlazorServer()&&this.element.classList.add(Eu)},i.prototype.render=function(){this.progressObj=[],this.intervalId=[],this.contentTemplate=null,this.toastTemplate=null,this.renderComplete(),this.initRenderClass=this.element.className},i.prototype.show=function(e){var t;if((0,s.hX)(e)||(this.templateChanges(e),t=JSON.parse(JSON.stringify(e)),(0,s.X$)(this,this,e)),(0,s.hX)(this.toastContainer)){this.toastContainer=this.getContainer();var n="string"==typeof this.target?document.querySelector(this.target):"object"==typeof this.target?this.target:document.body;if((0,s.hX)(n))return;"BODY"===n.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",n.style.position="relative"),this.setPositioning(this.position),n.appendChild(this.toastContainer)}this.isBlazorServer()&&this.element.classList.contains("e-control")?this.isToastModel(e):(this.toastEle=this.createElement("div",{className:rn,id:(0,s.Lz)("toast")}),this.setWidthHeight(),this.setCSSClass(this.cssClass),(0,s.hX)(this.template)||""===this.template?this.personalizeToast():this.templateRendering(),this.setProgress(),this.setCloseButton(),this.setAria(),this.appendToTarget(e),this.isDevice&&screen.width<768&&new s.Up(this.toastEle,{swipe:this.swipeHandler.bind(this)}),(0,s.hX)(t)||((0,s.X$)(t,{element:[this.toastEle]},!0),this.toastCollection.push(t)),this.isReact&&this.renderReactTemplates())},i.prototype.showToast=function(e,t){this.toastEle=this.element.querySelector("#"+e),this.show(t)},i.prototype.isToastModel=function(e){this.toastContainer=this.element,this.setPositioning(this.position),(0,s.hX)(this.element.lastElementChild)||this.setProgress(),this.setAria(),this.appendToTarget(e)},i.prototype.swipeHandler=function(e){var t=(0,s.kp)(e.originalEvent.target,"."+rn+":not(."+Yo+")"),n=this.animation.hide.effect;(0,s.hX)(t)||("Right"===e.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hideToast("swipe",t)):"Left"===e.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hideToast("swipe",t)),this.animation.hide.effect=n)},i.prototype.templateChanges=function(e){!(0,s.b0)(e.content)&&!(0,s.hX)(this.contentTemplate)&&this.content!==e.content&&this.clearContentTemplate(),!(0,s.b0)(e.template)&&!(0,s.hX)(this.toastTemplate)&&this.template!==e.template&&this.clearToastTemplate()},i.prototype.setCSSClass=function(e){if(e){var t=-1!==e.indexOf(",")?",":" ";(0,s.pP)(this.toastEle,e.split(t),[]),this.toastContainer&&(0,s.pP)(this.toastContainer,e.split(t),[])}},i.prototype.setWidthHeight=function(){"300px"===this.width?this.toastEle.style.width=(0,s.IV)(this.width):"100%"===this.width?this.toastContainer.classList.add(c0):(this.toastEle.style.width=(0,s.IV)(this.width),this.toastContainer.classList.remove(c0)),this.toastEle.style.height=(0,s.IV)(this.height)},i.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},i.prototype.sanitizeHelper=function(e){if(this.enableHtmlSanitizer){var t=s.r4.beforeSanitize();(0,s.X$)(t,t,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",t),t.cancel&&!(0,s.hX)(t.helper)?e=t.helper(e):t.cancel||(e=s.r4.serializeValue(t,e))}return e},i.prototype.hide=function(e){this.hideToast("",e)},i.prototype.hideToast=function(e,t){if(!(0,s.hX)(this.toastContainer)&&
10!==this.toastContainer.childElementCount){if("string"==typeof t&&"All"===t){for(var n=0;n<this.toastContainer.childElementCount;n++)this.destroyToast(this.toastContainer.children[n],e);return}(0,s.hX)(t)&&(t=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(t,e)}},i.prototype.fetchEle=function(e,t,n){var r,o,l,h;if(t="string"==typeof t?this.sanitizeHelper(t):t,h=e.classList.contains(l0)?this.element.id+"title":e.classList.contains(h0)?this.element.id+"content":this.element.id+"template",!(0,s.hX)(o="content"===n?this.contentTemplate:this.toastTemplate))return e.appendChild(o.cloneNode(!0)),e;try{if("function"!=typeof t&&document.querySelectorAll(t).length>0){var d=null;"title"!==n&&(d=document.querySelector(t),e.appendChild(d),d.style.display="");var p=(0,s.hX)(d)?o:d.cloneNode(!0);"content"===n?this.contentTemplate=p:this.toastTemplate=p}else r=(0,s.wE)(t)}catch{r=(0,s.wE)("object"==typeof t?t:(0,s.dG)(function(){return t}))}return(0,s.hX)(r)||(l=this.isBlazorServer()?r({},this,n,h,!0):r({},this,n,null,!0)),(0,s.hX)(l)||!(l.length>0)||(0,s.hX)(l[0].tagName)&&1===l.length?"function"!=typeof t&&0===e.childElementCount&&(e.innerHTML=t):[].slice.call(l).forEach(function(f){(0,s.hX)(f.tagName)||(f.style.display=""),e.appendChild(f)}),e},i.prototype.clearProgress=function(e){(0,s.hX)(this.intervalId[e])||(clearInterval(this.intervalId[e]),delete this.intervalId[e]),(0,s.hX)(this.progressObj[e])||(clearInterval(this.progressObj[e].intervalId),delete this.progressObj[e])},i.prototype.removeToastContainer=function(e){e&&this.toastContainer.classList.contains("e-toast-util")&&(0,s.Yo)(this.toastContainer)},i.prototype.clearContainerPos=function(e){var t=this;this.isBlazorServer()?this.toastContainer=null:(this.customPosition?((0,s.sN)(this.toastContainer,{left:"",top:""}),this.removeToastContainer(e),this.toastContainer=null,this.customPosition=!1):([rn+"-top-left",rn+"-top-right",rn+"-bottom-left",rn+"-bottom-right",rn+"-bottom-center",rn+"-top-center",rn+"-full-width"].forEach(function(n){!(0,s.hX)(t.toastContainer)&&t.toastContainer.classList.contains(n)&&t.toastContainer.classList.remove(n)}),this.removeToastContainer(e),this.toastContainer=null),(0,s.hX)(this.contentTemplate)||this.clearContentTemplate(),(0,s.hX)(this.toastTemplate)||this.clearToastTemplate())},i.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},i.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},i.prototype.isBlazorServer=function(){return(0,s.Z4)()&&this.isServerRendered},i.prototype.destroyToast=function(e,t){for(var r,n=this,o=0;o<this.toastCollection.length;o++)this.toastCollection[o].element[0]===e&&(r=this.toastCollection[o],this.toastCollection.splice(o,1));var l={options:this,cancel:!1,type:t,element:e,toastContainer:this.toastContainer},h=this.animation.hide,d={duration:h.duration,name:"None"===h.effect&&"Enable"===s.QM?"FadeOut":h.effect,timingFunction:h.easing},p=parseInt(e.id.split("toast_")[1],10),u=this.isBlazorServer()?{options:r,toastContainer:this.toastContainer}:{options:r,toastContainer:this.toastContainer,toastObj:this};this.trigger("beforeClose",l,function(f){f.cancel||(!(0,s.hX)(n.progressObj[p])&&!(0,s.hX)(e.querySelector("."+Sh))&&(n.progressObj[p].progressEle.style.width="0%"),d.end=function(){n.clearProgress(p),(!n.isBlazorServer()||(0,s.hX)(r))&&(0,s.Yo)(e),n.trigger("close",u),0===n.toastContainer.childElementCount&&n.clearContainerPos(!0),h=null,d=null},new s.X5(d).animate(e))})},i.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},i.prototype.setAria=function(){(0,s.uK)(this.toastEle,{role:"alert"})},i.prototype.setPositioning=function(e){this.isBlazorServer()||(isNaN(parseFloat(e.X))&&isNaN(parseFloat(e.Y))?this.toastContainer.classList.add(rn+"-"+e.Y.toString().toLowerCase()+"-"+e.X.toString().toLowerCase()):(this.customPosition=!0,(0,s.sN)(this.toastContainer,{left
1:(0,s.IV)(e.X),top:(0,s.IV)(e.Y)})))},i.prototype.setCloseButton=function(){if(this.showCloseButton){this.l10n=new s.Wo("toast",{close:"Close"},this.locale),this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close"),n=this.createElement("div",{className:Cu+" e-icons ",attrs:{tabindex:"0","aria-label":t,role:"button"}});this.toastEle.classList.add("e-toast-header-close-icon"),this.toastEle.appendChild(n)}},i.prototype.setProgress=function(){if(this.timeOut>0){var e=parseInt(this.toastEle.id.split("toast_")[1],10);this.intervalId[e]=window.setTimeout(this.destroyToast.bind(this,this.toastEle),this.timeOut),this.progressObj[e]={hideEta:null,intervalId:null,maxHideTime:null,element:null,timeOutId:null,progressEle:null},this.progressObj[e].maxHideTime=parseFloat(this.timeOut+""),this.progressObj[e].hideEta=(new Date).getTime()+this.progressObj[e].maxHideTime,this.progressObj[e].element=this.toastEle,this.extendedTimeout>0&&(s.Jm.add(this.toastEle,"mouseover",this.toastHoverAction.bind(this,e)),s.Jm.add(this.toastEle,"mouseleave",this.delayedToastProgress.bind(this,e)),this.progressObj[e].timeOutId=this.intervalId[e]),this.showProgressBar&&(this.progressBarEle=this.createElement("div",{className:Sh}),this.toastEle.insertBefore(this.progressBarEle,this.toastEle.children[0]),this.progressObj[e].intervalId=setInterval(this.updateProgressBar.bind(this,this.progressObj[e]),10),this.progressObj[e].progressEle=this.progressBarEle)}},i.prototype.toastHoverAction=function(e){clearTimeout(this.progressObj[e].timeOutId),clearInterval(this.progressObj[e].intervalId),this.progressObj[e].hideEta=0,(0,s.hX)(this.progressObj[e].element.querySelector("."+Sh))||(this.progressObj[e].progressEle.style.width="0%")},i.prototype.delayedToastProgress=function(e){var t=this.progressObj[e];if(!(0,s.hX)(t)){var n=t.element;t.timeOutId=window.setTimeout(this.destroyToast.bind(this,n),this.extendedTimeout),t.maxHideTime=parseFloat(this.extendedTimeout+""),t.hideEta=(new Date).getTime()+t.maxHideTime,(0,s.hX)(n.querySelector("."+Sh))||(t.intervalId=setInterval(this.updateProgressBar.bind(this,t),10))}},i.prototype.updateProgressBar=function(e){var t=(e.hideEta-(new Date).getTime())/e.maxHideTime*100;e.progressEle.style.width=(t="Ltr"===this.progressDirection?100-t:t)+"%"},i.prototype.setIcon=function(){if(!(0,s.hX)(this.icon)&&0!==this.icon.length){var e=this.createElement("div",{className:"e-toast-icon e-icons "+this.icon});this.toastEle.classList.add("e-toast-header-icon"),this.toastEle.appendChild(e)}},i.prototype.setTitle=function(){if(!(0,s.hX)(this.title)){var e=this.createElement("div",{className:l0});e=this.fetchEle(e,this.title,"title");var t=this.createElement("div",{className:yh});t.appendChild(e),this.toastEle.appendChild(t)}},i.prototype.setContent=function(){var e=this.createElement("div",{className:h0}),t=this.element;if((0,s.hX)(this.content)||""===this.content){var n=""!==this.element.innerHTML.replace(/\s/g,"");if((t.children.length>0||n)&&(!t.firstElementChild||!t.firstElementChild.classList.contains(rn))){this.innerEle=document.createDocumentFragment();for(var r=this.createElement("div");0!==t.childNodes.length;)this.innerEle.appendChild(this.element.childNodes[0]);e.appendChild(this.innerEle),[].slice.call(e.children).forEach(function(o){r.appendChild(o.cloneNode(!0))}),this.content=r,this.appendMessageContainer(e)}}else"object"!=typeof this.content||(0,s.hX)(this.content.tagName)?(e=this.fetchEle(e,this.content,"content"),this.appendMessageContainer(e)):(e.appendChild(this.content),this.content=this.content.cloneNode(!0),this.appendMessageContainer(e))},i.prototype.appendMessageContainer=function(e){if(this.toastEle.querySelectorAll("."+yh).length>0)this.toastEle.querySelector("."+yh).appendChild(e);else{var t=this.createElement("div",{className:yh});t.appendChild(e),this.toastEle.appendChild(t)}},i.prototype.actionButtons=function(){var e=this,t=this.createElement("div",{className:"e-toast-actions"});[].slice.call(this.buttons).forEach(function(n){if(!(0,s.hX)(n.model)){var r=e.createElement("button");r.setAttribute("type","button"),((0,s.hX)(n.model.cssClass)||0===n.model.cssClass.length)&&(n.model.cssClass="e-primary "+e.cssClass),r.classList.add("e-small"),new ke.$n(n.model,r),!(0,s.hX)(n.click)&&"function"==typeof n.click&&s.Jm.add(r,"click",n.click),t.appendChild(r)}}),t.childElementCount>0&&this.appendMessageContainer(t)},i.prototype.appendToTarget=function(e){var t=this,n=this.isBlazorServer()?{options:e,element:this.toastEle,cancel:!1}:{options:e,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",n,function(r){if(r.cancel){if(t.isBlazorServer()){var o=parseInt(t.toastEle.id.split("toast_")[1],10);t.clearProgress(o),(0,s.Yo)(t.toastEle),0===t.toastContainer.childElementCount&&t.clearContainerPos()}}else t.isBlazorServer()||(t.toastEle.style.display="none"),t.newestOnTop&&0!==t.toastContainer.childElementCount?t.toastContainer.insertBefore(t.toastEle,t.toastContainer.children[0]):t.isBlazorServer()||t.toastContainer.appendChild(t.toastEle),(0,s.vy)([t.toastEle],"e-blazor-toast-hidden"),s.Jm.add(t.toastEle,"click",t.clickHandler,t),s.Jm.add(t.toastEle,"keydown",t.keyDownHandler,t),t.toastContainer.style.zIndex=(0,ae.OL)(t.toastContainer)+"",t.displayToast(t.toastEle,e)})},i.prototype.clickHandler=function(e){var t=this;this.isBlazorServer()||e.stopPropagation();var n=e.target,r=(0,s.kp)(n,"."+rn),o=this.isBlazorServer()?{element:r,cancel:!1,clickToClose:!1,originalEvent:e}:{element:r,cancel:!1,clickToClose:!1,originalEvent:e,toastObj:this},l=n.classList.contains(Cu);this.trigger("click",o,function(h){(l&&!h.cancel||h.clickToClose)&&t.destroyToast(r,"click")})},i.prototype.keyDownHandler=function(e){if(e.target.classList.contains(Cu)&&(13===e.keyCode||32===e.keyCode)){var n=(0,s.kp)(e.target,"."+rn);this.destroyToast(n,"key")}},i.prototype.displayToast=function(e,t){var n=this,r=this.animation.show,o={duration:r.duration,name:"None"===r.effect&&"Enable"===s.QM?"FadeIn":r.effect,timingFunction:r.easing},l=this.isBlazorServer()?{options:t,element:this.toastEle}:{options:t,toastObj:this,element:this.toastEle};o.begin=function(){e.style.display=""},o.end=function(){n.trigger("open",l)},new s.X5(o).animate(e)},i.prototype.getContainer=function(){return this.element.classList.add(Yo),this.element},i.prototype.onPropertyChanged=function(e,t){for(var n=this.element,r=0,o=Object.keys(e);r<o.length;r++)"enableRtl"===o[r]&&(e.enableRtl?n.classList.add(Eu):n.classList.remove(Eu))},Ke([(0,s.mA)("300px")],i.prototype,"width",void 0),Ke([(0,s.mA)("auto")],i.prototype,"height",void 0),Ke([(0,s.mA)(null)],i.prototype,"title",void 0),Ke([(0,s.mA)(null)],i.prototype,"content",void 0),Ke([(0,s.mA)(!0)],i.prototype,"enableHtmlSanitizer",void 0),Ke([(0,s.mA)(null)],i.prototype,"icon",void 0),Ke([(0,s.mA)(null)],i.prototype,"cssClass",void 0),Ke([(0,s.mA)(null)],i.prototype,"template",void 0),Ke([(0,s.mA)(!0)],i.prototype,"newestOnTop",void 0),Ke([(0,s.mA)(!1)],i.prototype,"showCloseButton",void 0),Ke([(0,s.mA)(!1)],i.prototype,"showProgressBar",void 0),Ke([(0,s.mA)(5e3)],i.prototype,"timeOut",void 0),Ke([(0,s.mA)("Rtl")],i.prototype,"progressDirection",void 0),Ke([(0,s.mA)(1e3)],i.prototype,"extendedTimeout",void 0),Ke([(0,s.pr)({},NT)],i.prototype,"animation",void 0),Ke([(0,s.pr)({},LT)],i.prototype,"position",void 0),Ke([(0,s.pM)([{}],RT)],i.prototype,"buttons",void 0),Ke([(0,s.mA)(null)],i.prototype,"target",void 0),Ke([(0,s.Jh)()],i.prototype,"created",void 0),Ke([(0,s.Jh)()],i.prototype,"beforeSanitizeHtml",void 0),Ke([(0,s.Jh)()],i.prototype,"destroyed",void 0),Ke([(0,s.Jh)()],i.prototype,"open",void 0),Ke([(0,s.Jh)()],i.prototype,"beforeOpen",void 0),Ke([(0,s.Jh)()],i.prototype,"beforeClose",void 0),Ke([(0,s.Jh)()],i.prototype,"close",void 0),Ke([(0,s.Jh)()],i.prototype,"click",void 0),Ke([s.kc],i)}(s.uA);(_u||(_u={})).show=function i(e,t,n){var r,o;
1if(document.querySelector("."+Yo)?r=document.querySelector("."+Yo):(r=(0,s.n)("div",{className:rn+" "+Yo+" e-toast-util"}),document.body.appendChild(r)),"string"==typeof e){var l=void 0,h=void 0;if((0,s.hX)(t))l="",h="";else switch(t){case"Warning":l="e-toast-warning",h="e-toast-warning-icon";break;case"Success":l="e-toast-success",h="e-toast-success-icon";break;case"Error":l="e-toast-danger",h="e-toast-error-icon";break;case"Information":l="e-toast-info",h="e-toast-info-icon"}o={content:e,cssClass:l,icon:h,timeOut:(0,s.hX)(n)?5e3:n}}else o=e;var d=new VT(o);return d.appendTo(r),d.show(),d};var jT=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),ms=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},Du={TEXTSHAPE:"e-skeleton-text",CIRCLESHAPE:"e-skeleton-circle",SQUARESHAPE:"e-skeleton-square",RECTANGLESHAPE:"e-skeleton-rectangle",WAVEEFFECT:"e-shimmer-wave",PULSEEFFECT:"e-shimmer-pulse",FADEEFFECT:"e-shimmer-fade",VISIBLENONE:"e-visible-none"},u0=function(a){function i(e,t){return a.call(this,e,t)||this}return jT(i,a),i.prototype.getModuleName=function(){return"skeleton"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.preRender=function(){this.element.id||(this.element.id=(0,s.Lz)("e-"+this.getModuleName())),this.updateCssClass(),(0,s.uK)(this.element,{role:"alert","aria-busy":"true","aria-live":"polite","aria-label":this.label})},i.prototype.render=function(){this.initialize()},i.prototype.onPropertyChanged=function(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"width":case"height":this.updateDimension();break;case"shape":this.updateShape();break;case"shimmerEffect":this.updateEffect();break;case"visible":this.updateVisibility();break;case"label":this.element.setAttribute("aria-label",this.label);break;case"cssClass":t.cssClass&&(0,s.vy)([this.element],t.cssClass.split(" ")),this.updateCssClass()}},i.prototype.destroy=function(){a.prototype.destroy.call(this);var e=["role","aria-live","aria-busy","aria-label"],t=[];this.cssClass&&(t=t.concat(this.cssClass.split(" ")));for(var n=0;n<e.length;n++)this.element.removeAttribute(e[parseInt(n.toString(),10)]);t=(t=t.concat(this.element.classList.value.match(/(e-skeleton-[^\s]+)/g)||[])).concat(this.element.classList.value.match(/(e-shimmer-[^\s]+)/g)||[]),(0,s.vy)([this.element],t)},i.prototype.initialize=function(){this.updateShape(),this.updateEffect(),this.updateVisibility()},i.prototype.updateShape=function(){if(!(0,s.hX)(this.shape)){var e=Du[this.shape.toUpperCase()+"SHAPE"],t=this.element.classList.value.match(/(e-skeleton-[^\s]+)/g)||[];this.updateDimension(),t&&(0,s.vy)([this.element],t),(0,s.iQ)([this.element],[e])}},i.prototype.updateDimension=function(){var e=!this.width&&["Text","Rectangle"].indexOf(this.shape)>-1?"100%":(0,s.IV)(this.width),t=["Circle","Square"].indexOf(this.shape)>-1?e:(0,s.IV)(this.height);this.element.style.width=e,this.element.style.height=t},i.prototype.updateEffect=function(){var e=this.element.classList.value.match(/(e-shimmer-[^\s]+)/g)||[];e&&(0,s.vy)([this.element],e),(0,s.hX)(this.shimmerEffect)||(0,s.iQ)([this.element],[Du[this.shimmerEffect.toUpperCase()+"EFFECT"]])},i.prototype.updateVisibility=function(){this.element.classList[this.visible?"remove":"add"](Du.VISIBLENONE)},i.prototype.updateCssClass=function(){this.cssClass&&(0,s.iQ)([this.element],this.cssClass.split(" "))},ms([(0,s.mA)("")],i.prototype,"width",void 0),ms([(0,s.mA)("")],i.prototype,"height",void 0),ms([(0,s.mA)(!0)],i.prototype,"visible",void 0),ms([(0,s.mA)("Text")],i.prototype,"shape",void 0),ms([(0,s.mA)("Wave")
1],i.prototype,"shimmerEffect",void 0),ms([(0,s.mA)("Loading...")],i.prototype,"label",void 0),ms([(0,s.mA)("")],i.prototype,"cssClass",void 0),ms([s.kc],i)}(s.uA),sn="",_h="",cl="",pi=[],Th="";function hl(a,i,e,t,n,r,o,l,h){var d;if(r&&""!==sn?sn===_h&&(cl=String.fromCharCode(a)):""!==cl?(sn=cl+String.fromCharCode(a),cl=""):sn+=String.fromCharCode(a),l?(setTimeout(function(){cl=""},700),setTimeout(function(){sn=""},3e3)):setTimeout(function(){sn=""},1e3),sn=t?sn.toLowerCase():sn,Th!==n||_h!==sn||h){var u=i,f=sn.length,g=void 0;p=e=e?e+1:0,pi=[];do{p===u.length&&(p=-1),g=u[d=-1===p?0:p],(t?g.innerText.toLowerCase():g.innerText).substr(0,f)===sn&&pi.push(u[d]),p++}while(p!==e);if(_h=sn,Th=n,l){for(var v=!1,b=0;b<pi.length;b++)if(o&&pi[b].textContent.toLowerCase()===o.toLowerCase()){d=b,v=!0;break}return o&&v&&(d+=1),pi[d]?pi[d]:pi[0]}return pi[0]}for(var p=0;p<pi.length;p++){if(pi[p].classList.contains("e-active")){d=p;break}if(o&&pi[p].textContent.toLowerCase()===o.toLowerCase()){d=p;break}}return d+=1,l?pi[d]&&pi.length-1!==d?pi[d]:pi[pi.length]:pi[d]?pi[d]:pi[0]}function Pn(a,i,e,t,n,r,o,l){var h=i;t=null==t||t;var d={item:null,index:null};if(a&&a.length&&i){var p=a.length,u=t?a.toLocaleLowerCase():a;u=function qT(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(u);for(var f=function(b,y){var E,S=y[b];if(i&&n){var _=S,T=r.text.split(".");n.filter(function(w){Array.prototype.slice.call(T).forEach(function(A){("object"===o&&!w.isHeader&&-1!==_.textContent.toString().indexOf(w[A])&&null!=w[r.value]&&_.getAttribute("data-value")===w[r.value].toString()||"string"===o&&-1!==_.textContent.toString().indexOf(w))&&(E="object"===o?w[A]:w)})})}var I=n&&E?(t?E.toString().toLocaleLowerCase():E).replace(/^\s+|\s+$/g,""):(t?S.textContent.toLocaleLowerCase():S.textContent).replace(/^\s+|\s+$/g,"");if(l&&I&&u&&(I=I.normalize("NFD").replace(/[\u0300-\u036f]/g,""),u=u.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),"Equal"===e&&I===u||"StartsWith"===e&&I.substr(0,p)===u||"EndsWith"===e&&I.substr(I.length-u.length)===u||"Contains"===e&&new RegExp(u,"g").test(I))return d.item=S,d.index=b,{value:{item:S,index:b}}},m=0,g=h;m<g.length;m++){var v=f(m,g);if("object"==typeof v)return v.value}return d}return d}function gs(a,i,e,t){if(/<[^>]*>/g.test(a.innerText)&&(a.innerText=a.innerText.replace(/[\u00A0-\u9999<>&]/g,function(l){return"&#"+l.charCodeAt(0)+";"})),""!==i){var r=e?"gim":"gm";i=/^[a-zA-Z0-9- ]*$/.test(i)?i:i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),f0(a,new RegExp("StartsWith"===t?"^("+i+")":"EndsWith"===t?"("+i+")$":"("+i+")",r))}}function f0(a,i){for(var e=0;a.childNodes&&e<a.childNodes.length;e++){if(3===a.childNodes[e].nodeType&&""!==a.childNodes[e].textContent.trim()){var t=a.childNodes[e].nodeValue.trim().replace(i,'<span class="e-highlight">$1</span>');a.childNodes[e].nodeValue="",a.innerHTML=a.innerHTML.trim()+t;break}f0(a.childNodes[e],i)}}function m0(a){for(var i=a.querySelectorAll(".e-highlight"),e=i.length-1;e>=0;e--){var t=i[e].parentNode,n=document.createTextNode(i[e].textContent);t.replaceChild(n,i[e])}}var g0=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Rt=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},Ih=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return g0(i,a),Rt([(0,s.mA)()],i.prototype,"text",void 0),Rt([(0,s.mA)()],i.prototype,"value",void 0),Rt([(0,s.mA)()],i.prototype,"iconCss",void 0),Rt([(0,s.mA)()],i.prototype,"groupBy",void 0),Rt([(0,s.mA)()],i.prototype,"htmlAttributes",void 0),Rt([(0,s.mA)()],i.prototype,"disabled",void 0),i}(s.I1),P_root="e-dropdownbase",P_noData="e-nodata",P_focus="e-item-focus",P_li="e-list-item",P_group="e-list-group-item",xh=function(a){function i(e,t){var n=a.call(this,e,t)||this;return n.preventChange=!1,n.isPreventChange=!1,n.isDynamicDataChange=!1,n.addedNewItem=!1,n.isAddNewItemTemplate=!1,n.isRequesting=!1,n.isVirtualizationEnabled=!1,n.isCustomDataUpdated=!1,n.isAllowFiltering=!1,n.virtualizedItemsCount=0,n.isCheckBoxSelection=!1,n.totalItemCount=0,n.dataCount=0,n.remoteDataCount=-1,n.isRemoteDataUpdated=!1,n.isIncrementalRequest=!1,n.itemCount=30,n.virtualListHeight=0,n.isVirtualScrolling=!1,n.isPreventScrollAction=!1,n.scrollPreStartIndex=0,n.isScrollActionTriggered=!1,n.previousStartIndex=0,n.isMouseScrollAction=!1,n.isKeyBoardAction=!1,n.isScrollChanged=!1,n.isUpwardScrolling=!1,n.startIndex=0,n.currentPageNumber=0,n.pageCount=0,n.isPreventKe
1yAction=!1,n.generatedDataObject={},n.skeletonCount=32,n.isVirtualTrackHeight=!1,n.virtualSelectAll=!1,n.isVirtualReorder=!1,n.incrementalQueryString="",n.incrementalEndIndex=0,n.incrementalStartIndex=0,n.incrementalPreQueryString="",n.isObjectCustomValue=!1,n.appendUncheckList=!1,n.getInitialData=!1,n.preventPopupOpen=!0,n.virtualSelectAllState=!1,n.CurrentEvent=null,n.isDynamicData=!1,n.isPrimitiveData=!1,n.isCustomFiltering=!1,n.debounceTimer=null,n.virtualListInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:0},n.viewPortInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:0},n.selectedValueInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:0},n}return g0(i,a),i.prototype.getPropObject=function(e,t,n){var r=new Object,o=new Object;r[e]=t[e],o[e]=n[e];var h=new Object;return h.newProperty=r,h.oldProperty=o,h},i.prototype.getValueByText=function(e,t,n){var r=null;return(0,s.hX)(this.listData)||(r=this.checkValueCase(e,!!t,n)),r},i.prototype.checkValueCase=function(e,t,n,r){var o=this,l=null;if(r&&(l=e),!(0,s.hX)(this.listData)){var h=this.listData,d=this.fields,p=this.typeOfData(h).typeof;if("string"===p||"number"===p||"boolean"===p)for(var u=0,f=h;u<f.length;u++){var m=f[u];(0,s.hX)(m)||(n?l=this.checkingAccent(String(m),e,t):t?this.checkIgnoreCase(String(m),e)&&(l=this.getItemValue(String(m),e,t)):this.checkNonIgnoreCase(String(m),e)&&(l=this.getItemValue(String(m),e,t,r)))}else if(t)h.filter(function(v){var b=(0,s._W)(d.value,v);!(0,s.hX)(b)&&o.checkIgnoreCase((0,s._W)(d.text,v).toString(),e)&&(l=(0,s._W)(d.value,v))});else if(r){var g=null;g=l,h.filter(function(v){var b=(0,s._W)(d.value,v);!(0,s.hX)(b)&&!(0,s.hX)(l)&&b.toString()===g.toString()&&(l=(0,s._W)(d.text,v))})}else h.filter(function(v){o.checkNonIgnoreCase((0,s._W)(d.text,v),e)&&(l=(0,s._W)(d.value,v))})}return l},i.prototype.checkingAccent=function(e,t,n){var r=x.$j.ignoreDiacritics(String(e)),o=x.$j.ignoreDiacritics(t.toString()),l=null;return n?this.checkIgnoreCase(r,o)&&(l=this.getItemValue(String(e),t,n)):this.checkNonIgnoreCase(String(e),t)&&(l=this.getItemValue(String(e),t,n)),l},i.prototype.checkIgnoreCase=function(e,t){return String(e).toLowerCase()===t.toString().toLowerCase()},i.prototype.checkNonIgnoreCase=function(e,t){return String(e)===t.toString()}
1,i.prototype.getItemValue=function(e,t,n,r){var h=this.typeOfData(this.listData).typeof;return r?e.toString():n?"string"===h?String(e):this.getFormattedValue(String(e)):"string"===h?t:this.getFormattedValue(t)},i.prototype.templateCompiler=function(e){var t=!1;if("function"!=typeof e&&e)try{t=!!(0,s.Ub)(e,document).length}catch{t=!1}return t},i.prototype.l10nUpdate=function(e){var t="listbox"===this.getModuleName()?this.ulElement:this.list;if(!(0,s.hX)(this.noRecordsTemplate)&&"No records found"!==this.noRecordsTemplate||"Request failed"!==this.actionFailureTemplate){var n=e?this.actionFailureTemplate:this.noRecordsTemplate,r=void 0,o=e?this.actionFailureTemplateId:this.noRecordsTemplateId;t.innerHTML="";var l=this.templateCompiler(n);r=(0,s.wE)("function"!=typeof n&&l?(0,s.Lt)(n,document).innerHTML.trim():n);var h=e?"actionFailureTemplate":"noRecordsTemplate",d=void 0;if((d=this.isReact&&"function"==typeof n?r({},this,h,o,this.isStringTemplate,null):r({},this,h,o,this.isStringTemplate,null,t))&&d.length>0)for(var p=0;p<d.length;p++)"listbox"===this.getModuleName()&&"noRecordsTemplate"===h?"#text"===d[p].nodeName?((u=this.createElement("li")).textContent=d[p].textContent,u.classList.add("e-list-nrt"),u.setAttribute("role","option"),t.appendChild(u)):(d[p].classList.add("e-list-nr-template"),t.appendChild(d[p])):(d[p]instanceof HTMLElement||d[p]instanceof Text&&""!==d[p].textContent)&&t.appendChild(d[p]);this.renderReactTemplates()}else{var m=new s.Wo(this.getLocaleName(),{},this.locale);this.l10n=""!==m.getConstant("actionFailureTemplate")||""!==m.getConstant("noRecordsTemplate")?m:new s.Wo("listbox"===this.getModuleName()?"listbox":"mention"===this.getModuleName()?"mention":"dropdowns",{noRecordsTemplate:"No records found",actionFailureTemplate:"Request failed"},this.locale);var u,g=this.l10n.getConstant(e?"actionFailureTemplate":"noRecordsTemplate");"listbox"===this.getModuleName()?((u=this.createElement("li")).textContent=g,t.appendChild(u),u.classList.add("e-list-nrt"),u.setAttribute("role","option")):(0,s.hX)(t)||(t.innerHTML=g)}},i.prototype.checkAndResetCache=function(){this.isVirtualizationEnabled&&(this.generatedDataObject={},this.virtualItemStartIndex=this.virtualItemEndIndex=0,this.viewPortInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:this.itemCount},this.selectedValueInfo=null)},i.prototype.updateIncrementalInfo=function(e,t){this.viewPortInfo.startIndex=e,this.viewPortInfo.endIndex=t,this.updateVirtualItemIndex(),this.isIncrementalRequest=!0,this.resetList(this.dataSource,this.fields,this.query),this.isIncrementalRequest=!1},i.prototype.updateIncrementalView=function(e,t){this.viewPortInfo.startIndex=e,this.viewPortInfo.endIndex=t,this.updateVirtualItemIndex(),this.resetList(this.dataSource,this.fields,this.query),this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll("."+P_li),this.ulElement=this.list.querySelector("ul")},i.prototype.updateVirtualItemIndex=function(){this.virtualItemStartIndex=this.viewPortInfo.startIndex,this.virtualItemEndIndex=this.viewPortInfo.endIndex,this.virtualListInfo=this.viewPortInfo},i.prototype.getFilteringSkeletonCount=function(){var e=this.skeletonCount;this.getSkeletonCount(!0),this.skeletonCount=this.dataCount<2*this.itemCount&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&this.totalItemCount<=this.itemCount)?0:this.skeletonCount;var t=!0;if(("autocomplete"===this.getModuleName()||"multiselect"===this.getModuleName())&&this.totalItemCount<2*this.itemCount&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&this.totalItemCount<=this.itemCount)&&(this.skeletonCount=0,t=!1),!this.list.classList.contains(P_noData)){if(e!==this.skeletonCount&&t?this.UpdateSkeleton(!0,Math.abs(e-this.skeletonCount)):this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll(".e-list-item"),this.list.getElementsByClassName("e-virtual-ddl").length>0)this.list.getElementsByClassName("e-virtual-ddl")[0].style=this.GetVirtualTrackHeight();else if(!this.list.querySelector(".e-virtual-ddl")&&this.skeletonCount>0&&this.list.querySelector(".e-dropdownbase")){var n=this.createElement("div",{id:this.element.i
1d+"_popup",className:"e-virtual-ddl",styles:this.GetVirtualTrackHeight()});this.list.querySelector(".e-dropdownbase").appendChild(n)}this.list.getElementsByClassName("e-virtual-ddl-content").length>0&&(this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues())}},i.prototype.getSkeletonCount=function(e){this.virtualListHeight=null!=this.listContainerHeight?parseInt(this.listContainerHeight,10):this.virtualListHeight;var t=this.virtualListHeight>0&&this.listItemHeight>0?Math.floor(this.virtualListHeight/this.listItemHeight):0;this.skeletonCount=4*t<this.itemCount?this.itemCount:4*t,this.itemCount=e?this.itemCount:this.skeletonCount,this.virtualItemCount=this.itemCount,this.skeletonCount=Math.floor(this.skeletonCount/2)},i.prototype.GetVirtualTrackHeight=function(){var e=this.totalItemCount===this.viewPortInfo.endIndex?this.totalItemCount*this.listItemHeight-this.itemCount*this.listItemHeight:this.totalItemCount*this.listItemHeight,t="height: "+((e=this.isVirtualTrackHeight?0:e)-this.itemCount*this.listItemHeight)+"px;";return"autocomplete"!==this.getModuleName()&&"multiselect"!==this.getModuleName()||0!==this.skeletonCount?t:"height: 0px;"},i.prototype.getTransformValues=function(){var e=this.viewPortInfo.startIndex*this.listItemHeight;return e-=this.skeletonCount*this.listItemHeight,"transform: translate(0px, "+(e=0===this.viewPortInfo.startIndex&&this.listData&&0===this.listData.length||0===this.skeletonCount?0:e)+"px);"},i.prototype.UpdateSkeleton=function(e,t){var n=this.list.querySelector(".e-virtual-ddl-content"),r=this.list.querySelector(".e-virtual-list");if(n&&(!r||e)&&this.isVirtualizationEnabled){for(var o=e?t:this.skeletonCount,l=0;l<o;l++){var h=this.createElement("li",{className:"e-list-item e-virtual-list",styles:"overflow: inherit"});this.isVirtualizationEnabled&&this.itemTemplate&&(h.style.height=this.listItemHeight-parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom,10)+"px"),(d=new u0({shape:"Text",height:"10px",width:"95%",cssClass:"e-skeleton-text"})).appendTo(this.createElement("div")),h.appendChild(d.element),n.firstChild&&n.firstChild.insertBefore(h,n.firstChild.children[0])}if("multiselect"===this.getModuleName()&&!this.isVirtualReorder&&!n.firstChild.classList.contains("e-reorder")){for(l=0;l<o&&this.totalItemCount!==this.viewPortInfo.endIndex;l++){var d;h=this.createElement("li",{className:"e-list-item e-virtual-list e-virtual-list-end",styles:"overflow: inherit"}),this.isVirtualizationEnabled&&this.itemTemplate&&(h.style.height=this.listItemHeight-parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom,10)+"px"),(d=new u0({shape:"Text",height:"10px",width:"95%",cssClass:"e-skeleton-text-end"})).appendTo(this.createElement("div")),h.appendChild(d.element),n.firstChild&&n.firstChild.appendChild(h)}this.totalItemCount===this.viewPortInfo.endIndex&&n.querySelectorAll(".e-virtual-list-end").forEach(function(p){return p.remove()})}}},i.prototype.getLocaleName=function(){return"drop-down-base"},i.prototype.getTextByValue=function(e){return this.checkValueCase(e,!1,!1,!0)},i.prototype.getFormattedValue=function(e){if(this.listData&&this.listData.length){var t;if(t=this.typeOfData(this.properties.allowCustomValue&&this.properties.value&&this.properties.value instanceof Array&&this.properties.value.length>0?this.properties.value:this.listData),"number"==typeof(0,s._W)(this.fields.value?this.fields.value:"value",t.item)||"number"===t.typeof)return parseFloat(e);if("boolean"==typeof(0,s._W)(this.fields.value?this.fields.value:"value",t.item)||"boolean"===t.typeof)return"true"===e||""+e=="true"}return e},i.prototype.setEnableRtl=function(){(0,s.hX)(this.enableRtlElements)||(this.list&&this.enableRtlElements.push(this.list),this.enableRtl?(0,s.iQ)(this.enableRtlElements,"e-rtl"):(0,s.vy)(this.enableRtlElements,"e-rtl"))},i.prototype.initialize=function(e){if(this.bindEvent=!0,this.preventPopupOpen=!0,this.actionFailureTemplateId=this.element.id+"ActionFailureTemplate","UL"===this.element.tagName){var t=ce.iY.createJsonFromElement(this.element);this.setProperties({fields:{text:"text",value:"text"}},!0),this.resetList(t,this.fields)}else"SELECT"===this.element.tagName?(this.dataSource instanceof Array?this.dataSource.length>0:!(0,s.hX)(this.dataSource))?this.isDynamicDataChange&&this.setListData(this.dataSource,this.fields,this.query):this.renderItemsBySelect():this.setListData(this.dataSource,this.fields,this.query,e)},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.updateDataAttribute=function(e){for(var t=["class","style","id","type","aria-expanded","aria-autocomplete","aria-readonly"],n={},r=0;r<this.element.attributes.length;r++)-1===t.indexOf(this.element.attributes[r].name)&&("dropdownlist"!==this.getModuleName()||"readonly"!==this.element.attributes[r].name)&&(n[this.element.attributes[r].name]=this.element.getAttribute(this.element.attributes[r].name));(0,s.X$)(n,e,n),this.setProperties({htmlAttributes:n},!0)},i.prototype.renderItemsBySelect=function(){var n,e=this.element,t=e.querySelectorAll("select>optgroup"),r="multiselect"===this.getModuleName()&&this.isGroupChecking&&t.length>0;n=r?{value:"value",text:"text",groupBy:"categeory"}:n={value:"value",text:"text"};var o=[],l=e.querySelectorAll("select>option");if(this.getJSONfromOption(o,l,n),t.length){for(var h=0;h<t.length;h++){var d=t[h],p={};p[n.text]=d.label,p.isHeader=!0;var u=d.querySelectorAll("option");r?this.getJSONfromOption(o,u,n,d.label):(o.push(p),this.getJSONfromOption(o,u,n))}e.querySelectorAll("select>option")}this.updateFields(n.text,n.value,r?n.groupBy:this.fields.groupBy,this.fields.htmlAttributes,this.fields.iconCss,this.fields.disabled),this.resetList(o,n)},i.prototype.updateFields=function(e,t,n,r,o,l){var h={fields:{text:e,value:t,groupBy:(0,s.hX)(n)?this.fields&&this.fields.groupBy:n,htmlAttributes:(0,s.hX)(r)?this.fields&&this.fields.htmlAttributes:r,iconCss:(0,s.hX)(o)?this.fields&&this.fields.iconCss:o,disabled:(0,s.hX)(l)?this.fields&&this.fields.disabled:l}};this.setProperties(h,!0)},i.prototype.getJSONfromOption=function(e,t,n,r){void 0===r&&(r=null);for(var o=0,l=t;o<l.length;o++){var h=l[o],d={};d[n.text]=h.innerText,d[n.value]=(0,s.hX)(h.getAttribute(n.value))?h.innerText:h.getAttribute(n.value),(0,s.hX)(r)||(
1d[n.groupBy]=r),e.push(d)}},i.prototype.preRender=function(){this.scrollTimer=-1,this.enableRtlElements=[],this.isRequested=!1,this.isDataFetched=!1,this.itemTemplateId=this.element.id+"ItemTemplate",this.displayTemplateId=this.element.id+"DisplayTemplate",this.spinnerTemplateId=this.element.id+"SpinnerTemplate",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"},i.prototype.setListData=function(e,t,n,r){var l,o=this;t=t||this.fields,this.isActive=!0;var h={cancel:!1,data:e,query:n};this.isPreventChange=!(!this.isAngular||!this.preventChange)||this.isPreventChange,this.isRequesting||this.trigger("actionBegin",h,function(d){if(!d.cancel)if(o.isRequesting=!0,o.showSpinner(),e instanceof x.M1){o.isRequested=!0;var p=!1;if(o.isDataFetched)return void o.emptyDataRequest(t);d.data.executeQuery(o.getQuery(d.query)).then(function(S){o.isPreventChange=!(!o.isAngular||!o.preventChange)||o.isPreventChange;var E=!0;if(!o.virtualSelectAll){for(var _=o.getQuery(d.query),T=0;T<_.queries.length;T++)"onWhere"===_.queries[T].fn&&(p=!0);if(o.isVirtualizationEnabled&&0!==S.count&&S.count<2*o.itemCount){if(_)for(T=0;T<_.queries.length;T++)"onTake"===_.queries[T].fn&&(_.queries[T].e.nos=S.count),"multiselect"===o.getModuleName()&&("or"===_.queries[T].e.condition||"equal"===_.queries[T].e.operator)&&!o.isCustomFiltering&&(E=!1)}else if(o.isVirtualTrackHeight=!1,_)for(T=0;T<_.queries.length;T++)"multiselect"===o.getModuleName()&&(_.queries[T].e&&"or"===_.queries[T].e.condition||_.queries[T].e&&"equal"===_.queries[T].e.operator)&&(E=!1)}E&&(o.dataCount=o.totalItemCount=S.count),o.trigger("actionComplete",S,function(I){if(!I.cancel){o.isRequesting=!1,o.isCustomFiltering=!1;var w=I.result;if(o.isIncrementalRequest)return void(l=o.renderItems(w,t));if((!o.isVirtualizationEnabled&&0===w.length||o.isVirtualizationEnabled&&0===w.length&&!p)&&(o.isDataFetched=!0),p||(o.remoteDataCount=I.count),o.dataCount=o.virtualSelectAll?o.dataCount:I.count,o.totalItemCount=o.virtualSelectAll?o.totalItemCount:I.count,l=o.renderItems(w,t),o.appendUncheckList=!1,o.onActionComplete(l,w,I),o.groupTemplate&&o.renderGroupTemplate(l),o.isRequested=!1,o.bindChildItems(w,l,t,I),o.getInitialData)return o.getInitialData=!1,void(o.preventPopupOpen=!1);var A=!1;o.isVirtualizationEnabled&&o.setCurrentView&&(A=!0,o.notify("setCurrentViewDataAsync",{module:"VirtualScroll"})),null!=o.keyboardEvent&&o.handleVirtualKeyboardActions(o.keyboardEvent,o.pageCount);var M="multiselect"!==o.getModuleName()||"multiselect"===o.getModuleName()&&(!(o.dataSource instanceof x.M1)||o.dataSource instanceof x.M1&&!A);o.isVirtualizationEnabled&&M&&(o.getFilteringSkeletonCount(),o.updatePopupPosition()),o.virtualSelectAll&&o.virtualSelectAllData&&(o.virtualSelectionAll(o.virtualSelectAllState,o.liCollections,o.CurrentEvent),o.virtualSelectAllState=!1,o.CurrentEvent=null,o.virtualSelectAll=!1)}})}).catch(function(S){o.isRequested=!1,o.isRequesting=!1,o.onActionFailure(S),o.hideSpinner()})}else{o.isRequesting=!1;var u=!0,f=void 0;if(o.isVirtualizationEnabled&&!o.virtualGroupDataSource&&o.fields.groupBy){var m=new x.M1(o.dataSource).executeLocal((new x.XK).group(o.fields.groupBy));o.virtualGroupDataSource=m.records}var g=new x.M1(o.isVirtualizationEnabled&&o.virtualGroupDataSource&&!o.isCustomDataUpdated?o.virtualGroupDataSource:d.data);if(f=o.getQuery(d.query).executeLocal(g),!o.virtualSelectAll){var v=o.getQuery(d.query);if(o.isVirtualizationEnabled&&0!==f.count&&f.count<2*o.itemCount&&!o.appendUncheckList){if(v){for(var b=0;b<v.queries.length;b++)"onTake"===v.queries[b].fn&&(v.queries[b].e.nos=f.count,f=v.executeLocal(g)),"multiselect"===o.getModuleName()&&("or"===v.queries[b].e.condition||"equal"===v.queries[b].e.operator)&&!o.isCustomFiltering&&(u=!1);u&&(f=v.executeLocal(g),o.isVirtualTrackHeight=!(o.dataSource instanceof x.M1||o.isCustomDataUpdated))}}else if(o.isVirtualTrackHeight=!1,v)for(b=0;b<v.queries.length;b++)"multiselect"===o.getModuleName()&&(v.queries[b].e&&"or"===v.queries[b].e.condition||v.queries[b].e&&"equal"===v.queries[b].e.operator)&&(u=!1)}u&&!(o.dataSource instanceof x.M1)&&!o.isCustomDataUpdated&&!o.virtualSelectAll&&(o.dataCount=o.totalItemCount=o.virtualSelectAll?f.length:f.count);var y={cancel:!1,result:f=o.isVirtualizationEnabled?f.result:f};o.isPreventChange=!(!o.isAngular||!o.preventChange)||o.isPreventChange,o.trigger("actionComplete",y,function(S){if(o.isCustomFiltering=!1,o.isIncrementalRequest)l=o.renderItems(S.result,t);else if(!S.cancel){if(l=o.renderItems(S.result,t),o.onActionComplete(l,S.result,r),o.groupTemplate&&o.renderGroupTemplate(l),o.bindChildItems(S.result,l,t),o.getInitialData)return o.getInitialData=!1,void(o.preventPopupOpen=!1);setTimeout(function(){"multiselect"===o.getModuleName()&&null!=o.itemTemplate&&l.childElementCount>0&&(l.children[0].childElementCount>0||o.fields.groupBy&&l.children[1]&&l.children[1].childElementCount>0)&&o.updateDataList()})}})}})},i.prototype.handleVirtualKeyboardActions=function(e,t){},i.prototype.updatePopupState=function(){},i.prototype.updatePopupPosition=function(){},i.prototype.virtualSelectionAll=function(e,t,n){},i.prototype.updateRemoteData=function(){this.setListData(this.dataSource,this.fields,this.query)},i.prototype.bindChildItems=function(e,t,n,r){var o=this;e.length>=100&&"autocomplete"===this.getModuleName()?setTimeout(function(){var l=o.remainingItems(o.sortedData,n);(0,s.BC)(l,t),o.liCollections=o.list.querySelectorAll("."+P_li),o.updateListV
1alues(),o.raiseDataBound(e,r)},0):this.raiseDataBound(e,r)},i.prototype.isObjectInArray=function(e,t){return t.some(function(n){return Object.keys(e).every(function(r){return Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e[r]})})},i.prototype.updateListValues=function(){},i.prototype.findListElement=function(e,t,n,r){var o=null;if(e)for(var l=[].slice.call(e.querySelectorAll(t)),h=0;h<l.length;h++)if(l[h].getAttribute(n)===r+""){o=l[h];break}return o},i.prototype.raiseDataBound=function(e,t){this.hideSpinner(),this.trigger("dataBound",{items:e,e:t})},i.prototype.remainingItems=function(e,t){var n=new x.M1(e).executeLocal((new x.XK).skip(100));if(this.itemTemplate){var r=this.templateListItem(n,t);return[].slice.call(r.childNodes)}var o=this.typeOfData(n).typeof;return"string"===o||"number"===o||"boolean"===o?ce.iY.createListItemFromArray(this.createElement,n,!0,this.listOption(n,t),this):ce.iY.createListItemFromJson(this.createElement,n,this.listOption(n,t),1,!0,this)},i.prototype.emptyDataRequest=function(e){var t=[];this.onActionComplete(this.renderItems(t,e),t),this.isRequested=!1,this.isRequesting=!1,this.hideSpinner()},i.prototype.showSpinner=function(){},i.prototype.hideSpinner=function(){},i.prototype.onActionFailure=function(e){this.liCollections=[],this.trigger("actionFailure",e),this.l10nUpdate(!0),(0,s.hX)(this.list)||(0,s.iQ)([this.list],P_noData)},i.prototype.onActionComplete=function(e,t,n){var r=this;if(this.listData=t,this.isVirtualizationEnabled&&!this.isCustomDataUpdated&&!this.virtualSelectAll&&this.notify("setGeneratedData",{module:"VirtualScroll"}),"listbox"!==this.getModuleName()&&e.setAttribute("tabindex","0"),this.isReact&&this.clearTemplate(["itemTemplate","groupTemplate","actionFailureTemplate","noRecordsTemplate"]),this.isVirtualizationEnabled||(this.fixedHeaderElement=(0,s.hX)(this.fixedHeaderElement)?this.fixedHeaderElement:null),"multiselect"===this.getModuleName()&&this.properties.allowCustomValue&&this.fields.groupBy)for(var o=0;o<e.childElementCount;o++)e.children[o].classList.contains("e-list-group-item")&&((0,s.hX)(e.children[o].innerHTML)||""===e.children[o].innerHTML)&&(0,s.iQ)([e.children[o]],"e-hide-group-header"),e.children[0].classList.contains("e-hide-group-header")&&(0,s.sN)(e.children[1],{zIndex:11});if("multiselect"===this.getModuleName()&&this.isAngular&&this.ngEle){var l=this.list;l&&(l.style.height=l.offsetHeight+"px")}if((0,s.hX)(this.list)||this.isVirtualizationEnabled||(this.list.innerHTML="",this.list.appendChild(e),this.liCollections=this.list.querySelectorAll("."+P_li),this.ulElement=this.list.querySelector("ul"),this.postRender(this.list,t,this.bindEvent)),"multiselect"===this.getModuleName()&&this.isAngular&&this.ngEle){var d=this.list;d&&setTimeout(function(){d.style.height="",r.refreshPopup()},0)}},i.prototype.postRender=function(e,t,n){if(this.fields.disabled)for(var r=e.querySelectorAll("."+P_li),o="None"!==this.sortOrder?(0,s.hX)(this.fields.groupBy)?this.sortedData:this.sortedData.filter(function(g){return!("isHeader"in g)||!0!==g.isHeader}):this.listData,l=0;l<r.length;l++)if(JSON.parse(JSON.stringify(o[l]))[this.fields.disabled])if((0,s.hX)(this.fields.groupBy))this.disableListItem(r[l]);else{var d=(0,s._W)(this.fields.value?this.fields.value:"value",o[l]),p=e.querySelector('li[data-value="'+d+'"]');(0,s.hX)(p)||this.disableListItem(p)}var u=e.querySelector(this.fields.disabled?"."+P_li+":not(.e-disabled":"."+P_li),f=e.querySelector(".e-active");if(u&&!f){if(this.isVirtualizationEnabled&&0!==this.viewPortInfo.startIndex){var m=this.ulElement.querySelectorAll("li."+P_li+":not(.e-virtual-list):not(.e-hide-listitem)");u=m&&m.length>0?m[2]:u}u&&u.classList.add(P_focus)}t.length<=0?(this.l10nUpdate(),(0,s.iQ)([e],P_noData)):e.classList.remove(P_noData)},i.prototype.getQuery=function(e){return e||(this.query?this.query:new x.XK)},i.prototype.performFiltering=function(e){},i.prototype.debouncedFiltering=function(e,t){var n=this;null!==this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){n.performFiltering(e)},t)},i.prototype.updateVirtualizationProperties=function(e,t,n){this.isVirtualizationEnabled=!0,this.virtualizedItemsCount=e,this.isAllowFiltering=t,this.isCheckBoxSelection=n},i.prototype.renderGroupTemplate=function(e){if(null!==this.fields.groupBy&&this.dataSource||this.element.querySelector("."+P_group)){var t=this.dataSource,n={groupTemplateID:this.groupTemplateId,isStringTemplate:this.isStringTemplate},r=e.querySelectorAll("."+P_group),o=this.templateCompiler(this.groupTemplate);
1if("function"!=typeof this.groupTemplate&&o){var l=(0,s.Lt)(this.groupTemplate,document).innerHTML.trim(),h=ce.iY.renderGroupTemplate(l,t,this.fields.properties,r,n,this);if(this.isGroupChecking)for(var d=0;d<h.length;d++)this.notify("addItem",{module:"CheckBoxSelection",item:h[d]})}else if(h=ce.iY.renderGroupTemplate(this.groupTemplate,t,this.fields.properties,r,n,this),this.isGroupChecking)for(d=0;d<h.length;d++)this.notify("addItem",{module:"CheckBoxSelection",item:h[d]});this.renderReactTemplates()}},i.prototype.createListItems=function(e,t){if(e){t.groupBy||this.element.querySelector("optgroup")?(t.groupBy&&("None"!==this.sortOrder&&(e=this.getSortedDataSource(e)),e=ce.iY.groupDataSource(e,t.properties||t,this.sortOrder)),(0,s.iQ)([this.list],"e-dd-group")):("listbox"!==this.getModuleName()||"listbox"===this.getModuleName()&&!this.preventDefActionFilter)&&(e=this.getSortedDataSource(e));var r=this.listOption(e,t),o=e.length>100?new x.M1(e).executeLocal((new x.XK).take(100)):e;return this.sortedData=e,ce.iY.createList(this.createElement,"autocomplete"===this.getModuleName()?o:e,r,!0,this)}return null},i.prototype.listOption=function(e,t){var n=!(0,s.hX)(t.iconCss),r=(0,s.hX)(t.properties)?t:t.properties;return(0,s.X$)({},null!==t.text||null!==t.value?{fields:r,showIcon:n,ariaAttributes:{groupItemRole:"presentation"}}:{fields:{value:"text"}},t,!0)},i.prototype.setFloatingHeader=function(e){!(0,s.hX)(this.list)&&!this.list.classList.contains(P_noData)&&((0,s.hX)(this.fixedHeaderElement)&&(this.fixedHeaderElement=this.createElement("div",{className:"e-fixed-head"}),!(0,s.hX)(this.list)&&!this.list.querySelector("li").classList.contains(P_group)&&(this.fixedHeaderElement.style.display="none"),!(0,s.hX)(this.fixedHeaderElement)&&!(0,s.hX)(this.list)&&(0,s.Hs)([this.fixedHeaderElement],this.list),this.setFixedHeader()),!(0,s.hX)(this.fixedHeaderElement)&&"0"===this.fixedHeaderElement.style.zIndex&&this.setFixedHeader(),this.scrollStop(e))},i.prototype.scrollStop=function(e,t){for(var n=(0,s.hX)(e)?this.list:e.target,r=getComputedStyle(this.getValidLi(),null).getPropertyValue("height"),o=getComputedStyle(this.getValidLi(),null).getPropertyValue("margin-bottom"),l=parseInt(o,10),h="multiselect"===this.getModuleName()?parseFloat(r):parseInt(r,10),d=Math.round(n.scrollTop/(h+l)),p=this.list.querySelectorAll("li:not(.e-hide-listitem)"),u=this.list.querySelectorAll(".e-virtual-list").length,f=d;f>-1;f--){var m=this.isVirtualizationEnabled?f+u:f;if(this.isVirtualizationEnabled){if(this.fixedHeaderElement&&this.updateGroupHeader(m,p,n))break;t&&(!(0,s.hX)(p[m])&&p[m].classList.contains("e-active")&&"autocomplete"!==this.getModuleName()||!(0,s.hX)(p[m])&&p[m].classList.contains(P_focus)&&this.getModuleName())}else if(this.updateGroupHeader(m,p,n))break}},i.prototype.getPageCount=function(e){if(this.list){var t=this.list.classList.contains(P_noData)?null:getComputedStyle(this.getItems()[0],null).getPropertyValue("height"),n=Math.round(this.list.getBoundingClientRect().height/parseInt(t,10));return e?n:Math.round(n)}return 0},i.prototype.updateGroupHeader=function(e,t,n){return!(0,s.hX)(t[e])&&t[e].classList.contains(P_group)?(this.updateGroupFixedHeader(t[e],n),!0):(this.fixedHeaderElement.style.display="none",this.fixedHeaderElement.style.top="none",!1)},i.prototype.updateGroupFixedHeader=function(e,t){this.fixedHeaderElement&&((0,s.hX)(e.innerHTML)||(this.fixedHeaderElement.innerHTML=e.innerHTML),this.fixedHeaderElement.style.position="fixed",this.fixedHeaderElement.style.top=this.list.parentElement.offsetTop+this.list.offsetTop-window.scrollY+"px",this.fixedHeaderElement.style.display="block")},i.prototype.getValidLi=function(){return this.isVirtualizationEnabled&&this.liCollections[0].classList.contains("e-virtual-list")?this.liCollections[this.skeletonCount]:this.liCollections[0]},i.prototype.renderItems=function(e,t,n,r){var o;if(this.itemTemplate&&e){"multiselect"===this.getModuleName()&&this.virtualSelectAll&&(this.virtualSelectAllData=e,e=e.slice(this.virtualItemStartIndex,this.virtualItemEndIndex));var l=e;l&&t.groupBy?("None"!==this.sortOrder&&(l=this.getSortedDataSource(l)),l=ce.iY.groupDataSource(l,t.properties,this.sortOrder)):("listbox"!==this.getModuleName()||"listbox"===this.getModuleName()&&!this.preventDefActionFilter)&&(l=this.getSortedDataSource(l)),this.sortedData=l;var h=l.length>100?new x.M1(l).executeLocal((new x.XK).take(100)):l;if(o=this.templateListItem("autocomplete"===this.getModuleName()?h:l,t),this.isIncrementalRequest)return this.incrementalLiCollections=o.querySelectorAll("."+P_li),this.incrementalUlElement=o,this.incrementalListData=e,o;
1if(this.isVirtualizationEnabled){var d=this.list.querySelector(".e-list-parent"),p=this.list.querySelector(".e-virtual-ddl-content");if(e.length>=this.virtualizedItemsCount&&d&&p||d&&p&&this.isAllowFiltering||d&&p&&"autocomplete"===this.getModuleName()){"multiselect"===this.getModuleName()&&this.isCheckBoxSelection&&this.appendUncheckList&&this.list&&this.list.querySelector(".e-active")?(p.appendChild(o),n=!0):p.replaceChild(o,d);var u=this.list.querySelectorAll(".e-reorder");this.list.querySelector(".e-virtual-ddl-content")&&u&&u.length>0&&!n&&this.list.querySelector(".e-virtual-ddl-content").removeChild(u[0]),this.updateListElements(e)}else p||(this.list.innerHTML="",this.createVirtualContent(),this.list.querySelector(".e-virtual-ddl-content").appendChild(o),this.updateListElements(e))}}else{if("multiselect"===this.getModuleName()&&this.virtualSelectAll&&!r&&(this.virtualSelectAllData=e,e=e.slice(this.virtualItemStartIndex,this.virtualItemEndIndex)),o=this.createListItems(e,t),this.isIncrementalRequest)return this.incrementalLiCollections=o.querySelectorAll("."+P_li),this.incrementalUlElement=o,this.incrementalListData=e,o;this.isVirtualizationEnabled&&(d=this.list.querySelector(".e-list-parent:not(.e-reorder)"),p=this.list.querySelector(".e-virtual-ddl-content"),(!d&&this.list.querySelector(".e-list-parent.e-reorder")||d&&this.isVirtualReorder&&this.list.querySelector(".e-list-parent.e-reorder"))&&(d=this.list.querySelector(".e-list-parent.e-reorder")),e.length>=this.virtualizedItemsCount&&d&&p||d&&p&&this.isAllowFiltering||d&&p&&("autocomplete"===this.getModuleName()||"multiselect"===this.getModuleName())?(("multiselect"!==this.getModuleName()||"multiselect"===this.getModuleName()&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&!this.setCurrentView))&&(this.appendUncheckList?p.appendChild(o):p.replaceChild(o,d)),this.updateListElements(e)):(!p||!p.firstChild)&&(this.list.innerHTML="",this.createVirtualContent(),this.list.querySelector(".e-virtual-ddl-content").appendChild(o),this.updateListElements(e)))}return o},i.prototype.createVirtualContent=function(){this.list.querySelector(".e-virtual-ddl-content")||this.list.appendChild(this.createElement("div",{className:"e-virtual-ddl-content"}))},i.prototype.updateListElements=function(e){this.liCollections=this.list.querySelectorAll("."+P_li),this.ulElement=this.list.querySelector("ul"),this.listData=e,this.postRender(this.list,e,this.bindEvent)},i.prototype.templateListItem=function(e,t){var n=this.listOption(e,t);n.templateID=this.itemTemplateId,n.isStringTemplate=this.isStringTemplate;var o,r=this.templateCompiler(this.itemTemplate);if("function"!=typeof this.itemTemplate&&r){var l=(0,s.Lt)(this.itemTemplate,document).innerHTML.trim();return o=ce.iY.renderContentTemplate(this.createElement,l,e,t.properties,n,this),this.isVirtualizationEnabled&&this.isReact&&this.renderReactTemplates(),o}return o=ce.iY.renderContentTemplate(this.createElement,this.itemTemplate,e,t.properties,n,this),this.isVirtualizationEnabled&&this.isReact&&this.renderReactTemplates(),o},i.prototype.typeOfData=function(e){for(var n=0;!(0,s.hX)(e)&&n<e.length;n++)if(!(0,s.hX)(e[n])&&!(0,s.hX)("string"==typeof e[n]||"number"==typeof e[n]||"boolean"==typeof e[n]?e[n]:(0,s._W)(this.fields.value?this.fields.value:"value",e[n])))return{typeof:typeof e[n],item:e[n]};return{typeof:null,item:null}},i.prototype.setFixedHeader=function(){(0,s.hX)(this.list)||(this.list.parentElement.style.display="block");var e=0;if(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)),!(0,s.hX)(this.liCollections)){var l=this.getValidLi().offsetWidth-e;this.fixedHeaderElement.style.width=l.toString()+"px"}(0,s.sN)(this.fixedHeaderElement,{zIndex:10});var h=this.ulElement.querySelector("."+P_group+":not(.e-hide-listitem)");(0,s.hX)(h)||(this.fixedHeaderElement.innerHTML=h.innerHTML)},i.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=ce.iY.getDataSource(e,ce.iY.addSorting(this.sortOrder,t))}return e},i.prototype.getIndexByValue=function(e){var t,n=[];n=this.fields.disabled&&"multiselect"===this.getModuleName()&&this.liCollections?this.liCollections:this.getItems();for(var r=0;r<n.length;r++)if(!(0,s.hX)(e)&&n[r].getAttribute("data-value")===e.toString()){t=r;break}return t},i.prototype.getIndexByValueFilter=function(e,t){var n;if(!t)return null;var r=t.querySelectorAll("li:not(.e-list-group-item)");if(r)for(var o=0;o<r.length;o++)if(!(0,s.hX)(e)&&r[o].getAttribute("data-value")===e.toString()){n=o;break}return n},i.prototype.dispatchEvent=function(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!1,!0),e&&e.dispatchEvent(n)},i.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.isPrimitiveData=!0,this.updateFields("text","text"))},i.prototype.resetList=function(e,t,n,r){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:!(0,s.hX)(e))&&this.selectData&&this.selectData.length>0&&(e=this.selectData),e="combobox"===this.getModuleName()&&this.selectData&&e instanceof Array&&e.length<this.selectData.length&&this.addedNewItem?this.selectData:e,this.addedNewItem=!1,this.setListData(e,t,n,r))},i.prototype.updateSelectElementData=function(e){(e||this.isVirtualizationEnabled)&&(0,s.hX)(this.selectData)&&this.listData&&this.listData.length>0&&(this.selectData=this.listData)},i.prototype.updateSelection=function(){},i.prototype.renderList=function(){this.render()},i.prototype.updateDataSource=function(e,t){this.resetList(this.dataSource),this.totalItemCount=this.dataSource instanceof x.M1?this.dataSource.dataSource.json.length:0},i.prototype.setUpdateInitial=function(e,t,n){this.isDataFetched=!1,this.isPrimitiveData=!1;for(var r={},o=0;e.length>
1o;o++)t[e[o]]&&"fields"===e[o]?(this.setFields(),r[e[o]]=t[e[o]]):t[e[o]]&&(r[e[o]]=t[e[o]]);Object.keys(r).length>0&&(-1===Object.keys(r).indexOf("dataSource")&&(r.dataSource=this.dataSource),"listbox"===this.getModuleName()?(!this.isReact||this.isReact&&(!(0,s.hX)(t.dataSource)||!(0,s.hX)(t.sortOrder)))&&this.updateDataSource(r,n):(this.isDynamicData=!0,this.updateDataSource(r,n)))},i.prototype.onPropertyChanged=function(e,t){"dropdownbase"===this.getModuleName()&&this.setUpdateInitial(["fields","query","dataSource"],e),this.setUpdateInitial(["sortOrder","itemTemplate"],e);for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"query":case"sortOrder":case"dataSource":case"itemTemplate":break;case"enableRtl":this.setEnableRtl();break;case"groupTemplate":if(this.renderGroupTemplate(this.list),this.ulElement&&this.fixedHeaderElement){var l=this.ulElement.querySelector("."+P_group);this.fixedHeaderElement.innerHTML=l.innerHTML}break;case"locale":this.list&&!(0,s.hX)(this.liCollections)&&0===this.liCollections.length&&this.l10nUpdate();break;case"zIndex":this.setProperties({zIndex:e.zIndex},!0),this.setZIndex()}},i.prototype.render=function(e,t){this.list="listbox"===this.getModuleName()?this.createElement("div",{className:"e-content",attrs:{tabindex:"0"}}):this.createElement("div",{className:"e-content"}),this.list.classList.add(P_root),this.setFields(),this.rippleFun=(0,s.CF)(this.list,{duration:300,selector:"."+P_li});var r=this.element.querySelector("select>optgroup");if((this.fields.groupBy||!(0,s.hX)(r))&&!this.isGroupChecking){s.Jm.add(this.list,"scroll",this.setFloatingHeader,this);for(var o=this.getScrollableParent(),l=0;l<o.length;l++)s.Jm.add(o[l],"scroll",this.updateGroupFixedHeader,this)}if("dropdownbase"===this.getModuleName()){this.element.getAttribute("tabindex")&&this.list.setAttribute("tabindex",this.element.getAttribute("tabindex")),(0,s.vy)([this.element],P_root),this.element.style.display="none";var d=this.createElement("div");this.element.parentElement.insertBefore(d,this.element),d.appendChild(this.element),d.appendChild(this.list)}this.setEnableRtl(),t||this.initialize(e)},i.prototype.getScrollableParent=function(){for(var e=getComputedStyle(this.element),t=[],n=/(auto|scroll)/,r=this.element.parentElement;r&&"HTML"!==r.tagName;){var o=getComputedStyle(r);!("absolute"===e.position&&"static"===o.position)&&n.test(o.overflow+o.overflowY+o.overflowX)&&t.push(r),r=r.parentElement}return t.push(document),t},i.prototype.removeScrollEvent=function(){this.list&&s.Jm.remove(this.list,"scroll",this.setFloatingHeader)},i.prototype.getModuleName=function(){return"dropdownbase"},i.prototype.getItems=function(){return this.ulElement.querySelectorAll("."+P_li)},i.prototype.addItem=function(e,t){if((!this.list||this.list.textContent===this.noRecordsTemplate&&"listbox"!==this.getModuleName())&&this.renderList(),"None"!==this.sortOrder&&(0,s.hX)(t)){var n=[].slice.call(this.listData);n.push(e),n=this.getSortedDataSource(n),this.fields.groupBy&&(n=ce.iY.groupDataSource(n,this.fields.properties,this.sortOrder)),t=n.indexOf(e)}var h,r=this.getItems().length,o=0===r,l=this.list.querySelector(".e-active");e=e instanceof Array?e:[e],h=(0,s.hX)(t)||t<0||t>r-1?r:t;var d=this.fields;e&&d.groupBy&&(e=ce.iY.groupDataSource(e,d.properties));for(var p=[],u=0;u<e.length;u++){var f=e[u],m=f.isHeader,g=this.createElement("li",{className:m?P_group:P_li,id:"option-add-"+u}),v=f instanceof Object?(0,s._W)(d.text,f):f;if(m&&(g.innerText=v),this.itemTemplate&&!m){var b=this.templateCompiler(this.itemTemplate),S=(0,s.wE)("function"!=typeof this.itemTemplate&&b?(0,s.Lt)(this.itemTemplate,document).innerHTML.trim():this.itemTemplate)(f,this,"itemTemplate",this.itemTemplateId,this.isStringTemplate,null,g);S&&(0,s.BC)(S,g)}else m||g.appendChild(document.createTextNode(v));g.setAttribute("data-value",f instanceof Object?(0,s._W)(d.value,f):f),g.setAttribute("role","option"),this.notify("addItem",{module:"CheckBoxSelection",item:g}),p.push(g),"listbox"===this.getModuleName()?(this.listData.splice(o?this.listData.length:h,0,f),this.listData.length!==this.sortedData.length&&(this.sortedData=this.listData)):this.listData.push(f),"None"===this.sortOrder&&(0,s.hX)(t)&&0===h&&(h=null),"listbox"===this.getModuleName()?this.updateActionCompleteData(g,f,o?null:h+u):this.updateActionCompleteData(g,f,h),this.trigger("beforeItemRender",{element:g,item:f})}if(0===r&&(0,s.hX)(this.list.querySelector("ul")))(0,s.hX)(this.list)||(this.list.innerHTML="",this.list.classList.remove(P_noD
1ata),this.isAddNewItemTemplate=!0,(0,s.hX)(this.ulElement)||this.list.appendChild(this.ulElement)),this.liCollections=p,!(0,s.hX)(p)&&!(0,s.hX)(this.ulElement)&&(0,s.BC)(p,this.ulElement),this.updateAddItemList(this.list,r);else{"listbox"===this.getModuleName()&&0===r&&(this.ulElement.innerHTML="");var E=[];for(u=0;u<e.length;u++){for(var _=this.ulElement.querySelectorAll(".e-list-group-item"),T=0;T<_.length;T++)E[T]=_[T].innerText;if(E.indexOf(p[u].innerText)>-1&&d.groupBy){for(T=0;T<_.length;T++)if(E[T]===p[u].innerText){this.ulElement.insertBefore(p[u+1],"None"===this.sortOrder?_[T+1]:this.ulElement.childNodes[t]),u+=1;break}}else this.liCollections[h]&&this.liCollections[h].parentNode?this.liCollections[h].parentNode.insertBefore(p[u],this.liCollections[h]):t&&"listbox"===this.getModuleName()?this.ulElement.insertBefore(p[u],this.ulElement.childNodes[t+u]):this.ulElement.appendChild(p[u]);var I=[].slice.call(this.liCollections);I.splice(h,0,p[u]),this.liCollections=I,h+=1,"multiselect"===this.getModuleName()&&this.updateDataList()}}"listbox"===this.getModuleName()&&this.isReact&&this.renderReactTemplates(),(l||0===t)&&this.updateSelection(),this.addedNewItem=!0},i.prototype.isDisabledElement=function(e){return!(!e||!e.classList.contains("e-disabled"))},i.prototype.isDisabledItemByIndex=function(e){return!(!this.fields.disabled||!this.liCollections)&&this.isDisabledElement(this.liCollections[e])},i.prototype.disableListItem=function(e){e.classList.add("e-disabled"),e.setAttribute("aria-disabled","true"),e.setAttribute("aria-selected","false")},i.prototype.validationAttribute=function(e,t){var n=e.getAttribute("name")?e.getAttribute("name"):e.getAttribute("id");t.setAttribute("name",n),e.removeAttribute("name");for(var r=["required","aria-required","form"],o=0;o<r.length;o++)if(e.getAttribute(r[o])){var l=e.getAttribute(r[o]);t.setAttribute(r[o],l),e.removeAttribute(r[o])}},i.prototype.setZIndex=function(){},i.prototype.updateActionCompleteData=function(e,t,n){},i.prototype.updateAddItemList=function(e,t){},i.prototype.updateDataList=function(){},i.prototype.getDataByValue=function(e){if(!(0,s.hX)(this.listData)){var t=this.typeOfData(this.listData).typeof;if("string"===t||"number"===t||"boolean"===t){for(var n=0,r=this.listData;n<r.length;n++)if(!(0,s.hX)(o=r[n])&&o===e)return o}else for(var l=0,h=this.listData;l<h.length;l++){var o;if(!(0,s.hX)(o=h[l])&&(0,s._W)(this.fields.value?this.fields.value:"value",o)===e)return o}}return null},i.prototype.destroy=function(){document&&(s.Jm.remove(document,"scroll",this.updateGroupFixedHeader),document.body.contains(this.list)&&(s.Jm.remove(this.list,"scroll",this.setFloatingHeader),(0,s.hX)(this.rippleFun)||this.rippleFun(),(0,s.Yo)(this.list))),this.liCollections=null,this.ulElement=null,this.list=null,this.enableRtlElements=null,this.rippleFun=null,a.prototype.destroy.call(this)},Rt([(0,s.pr)({text:null,value:null,iconCss:null,groupBy:null,disabled:null},Ih)],i.prototype,"fields",void 0),Rt([(0,s.mA)(null)],i.prototype,"itemTemplate",void 0),Rt([(0,s.mA)(null)],i.prototype,"groupTemplate",void 0),Rt([(0,s.mA)("No records found")],i.prototype,"noRecordsTemplate",void 0),Rt([(0,s.mA)("Request failed")],i.prototype,"actionFailureTemplate",void 0),Rt([(0,s.mA)("None")],i.prototype,"sortOrder",void 0),Rt([(0,s.mA)([])],i.prototype,"dataSource",void 0),Rt([(0,s.mA)(null)],i.prototype,"query",void 0),Rt([(0,s.mA)("StartsWith")],i.prototype,"filterType",void 0),Rt([(0,s.mA)(!0)],i.prototype,"ignoreCase",void 0),Rt([(0,s.mA)(1e3)],i.prototype,"zIndex",void 0),Rt([(0,s.mA)(!1)],i.prototype,"ignoreAccent",void 0),Rt([(0,s.mA)()],i.prototype,"locale",void 0),Rt([(0,s.Jh)()],i.prototype,"actionBegin",void 0),Rt([(0,s.Jh)()],i.prototype,"actionComplete",void 0),Rt([(0,s.Jh)()],i.prototype,"actionFailure",void 0),Rt([(0,s.Jh)()],i.prototype,"select",void 0),Rt([(0,s.Jh)()],i.prototype,"dataBound",void 0),Rt([(0,s.Jh)()],i.prototype,"created",void 0),Rt([(0,s.Jh)()],i.prototype,"destroyed",void 0),Rt([s.kc],i)}(s.uA),lI=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Ze=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},he={root:"e-dropdownlist",hover:"e-hover",selected:"e-active",rtl:"e-rtl",li:P_li,disable:"e-disabled",base:P_root,focus:P_focus,content:"e-content",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",resizeIcon:"e-resizer-right e-icons",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",virtualList:"e-list-item e-virtual-list"},cI={container:null,buttons:[]},vs=function(a){function i(e,t){var n=a.call(this,e,t)||this;return n.isListSearched=!1,n.preventChange=!1,n.isTouched=!1,n.isFocused=!1,n.autoFill=!1,n.isUpdateHeaderHeight=!1,n.isUpdateFooterHeight=!1,n.isReactTemplateUpdate=!1,n}return lI(i,a),i.prototype.preRender=function(){this.valueTempElement=null,this.element.style.opacity="0",this.initializeData(),a.prototype.preRender.call(this),this.activeIndex=this.index,this.queryString=""},i.prototype.initializeData=function(){this.isPopupOpen=!1,this.isDocumentClick=!1,this.isPopupRender=!1,this.isInteracted=!1,this.isFilterFocus=!1,this.beforePopupOpen=!1,this.initial=!0,this.initialRemoteRender=!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.isCu
1stomFilter=!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"},this.viewPortInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:this.itemCount}},i.prototype.setZIndex=function(){this.popupObj&&this.popupObj.setProperties({zIndex:this.zIndex})},i.prototype.requiredModules=function(){var e=[];return this.enableVirtualization&&e.push({args:[this],member:"VirtualScroll"}),e},i.prototype.renderList=function(e,t){a.prototype.render.call(this,e,t),this.dataSource instanceof x.M1||(this.totalItemCount=this.dataSource&&this.dataSource.length?this.dataSource.length:0),this.enableVirtualization&&this.isFiltering()&&"combobox"===this.getModuleName()&&(this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll("."+P_li),this.ulElement=this.list.querySelector("ul")),this.unWireListEvents(),this.wireListEvents()},i.prototype.floatLabelChange=function(){if("dropdownlist"===this.getModuleName()&&"Auto"===this.floatLabelType){var e=this.inputWrapper.container.querySelector(".e-float-text");""!==this.inputElement.value||this.isInteracted?(0,s.pP)(e,["e-label-top"],["e-label-bottom"]):(0,s.pP)(e,["e-label-bottom"],["e-label-top"])}},i.prototype.resetHandler=function(e){e.preventDefault(),this.clearAll(e),this.enableVirtualization&&(this.list.scrollTop=0,this.virtualListInfo=null,this.previousStartIndex=0,this.previousEndIndex=0)},i.prototype.resetFocusElement=function(){if(this.removeHover(),this.removeSelection(),this.removeFocus(),this.list.scrollTop=0,"autocomplete"!==this.getModuleName()&&!(0,s.hX)(this.ulElement)){var e=this.ulElement.querySelector(this.fields.disabled?"."+he.li+":not(.e-disabled)":"."+he.li);this.enableVirtualization&&(e=this.liCollections[this.skeletonCount]),e&&e.classList.add(he.focus)}},i.prototype.clearAll=function(e,t){this.previousItemData=(0,s.hX)(this.itemData)?null:this.itemData,((0,s.hX)(t)||!(0,s.hX)(t)&&((0,s.hX)(t.dataSource)||!(t.dataSource instanceof x.M1)&&0===t.dataSource.length))&&(this.isActive=!0,this.resetSelection(t));var n=this.getItemData();if(!this.allowObjectBinding&&this.previousValue===n.value||this.allowObjectBinding&&this.previousValue&&this.isObjectInArray(this.previousValue,[this.allowCustom?this.value?this.value:n:n.value?this.getDataByValue(n.value):n]))return this.checkAndResetCache(),void(this.enableVirtualization&&this.list&&this.updateInitialData());this.onChangeEvent(e),this.checkAndResetCache(),this.enableVirtualization&&this.updateInitialData()},i.prototype.resetSelection=function(e){this.list&&((0,s.hX)(e)||!(0,s.hX)(e.dataSource)&&(e.dataSource instanceof x.M1||0!==e.dataSource.length)?(this.allowFiltering&&"autocomplete"!==this.getModuleName()&&!(0,s.hX)(this.actionCompleteData.ulElement)&&!(0,s.hX)(this.actionCompleteData.list)&&this.actionCompleteData.list.length>0&&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))),(0,s.hX)(this.hiddenElement)||(this.hiddenElement.innerHTML=""),(0,s.hX)(this.inputElement)||(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&&((0,s.Yo)(this.valueTempElement),this.inputElement.style.display="block",this.valueTempElement=null),this.setSelection(null,null),this.isSelectCustom=!1,this.updateIconState(),this.cloneElements()},i.prototype.setHTMLAttributes=function(){if(Object.keys(this.htmlAttributes).length)for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var n=t[e];if("class"===n){var r=this.htmlAttributes[""+n].replace(/\s+/g," ").trim();""!==r&&(0,s.iQ)([this.inputWrapper.container],r.split(" "))}else if("disabled"===n&&"disabled"===this.htmlAttributes[""+n])this.enabled=!1,this.setEnable();else if("readonly"!==n||(0,s.hX)(this.htmlAttributes[""+n]))if("style"===n)this.inputWrapper.container.setAttribute("style",this.htmlAttributes[""+n]);else if("aria-label"===n)"autocomplete"!==this.getModuleName()&&"combobox"!==this.getModuleName()||this.readonly?"dropdownlist"===this.getModuleName()&&this.inputWrapper.container.setAttribute("aria-label",this.htmlAttributes[""+n]):this.inputElement.setAttribute("aria-label",this.htmlAttributes[""+n]);else{var o=["title","id","placeholder","role","autocomplete","autocapitalize","spellcheck","minlength","maxlength"];("autocomplete"===this.getModuleName()||"combobox"===this.getModuleName())&&o.push("tabindex"),["name","required"].indexOf(n)>-1||0===n.indexOf("data")?this.hiddenElement.setAttribute(n,this.htmlAttributes[""+n]):o.indexOf(n)>-1?"placeholder"===n&&this.element.getAttribute("placeholder")!==this.htmlAttributes[""+n]?J.pd.setPlaceholder(this.htmlAttributes[""+n],this.inputElement):"placeholder"!==n&&this.inputElement.setAttribute(n,this.htmlAttributes[""+n]):this.inputWrapper.container.setAttribute(n,this.htmlAttributes[""+n])}else this.readonly=!0,this.dataBind()}("autocomplete"===this.getModuleName()||"combobox"===this.getModuleName())&&this.inputWrapper.container.removeAttribute("tabindex")},i.prototype.getAriaAttributes=function(){return{"aria-disabled":"false",role:"combobox","aria-expanded":"false","aria-live":"polite","aria-labelledby":this.hiddenElement.id}},i.prototype.setEnableRtl=function(){!(0,s.hX)(this.inputElement)&&!(0,s.hX)(this.inputElement.parentElement)&&J.pd.setEnableRtl(this.enableRtl,[this.inputElement.parentElement]),this.popupObj&&(this.popupObj.enableRtl=this.enableRtl,this.popupObj.dataBind())},i.prototype.setEnable=function(){J.pd.setEnabled(this.enabled,this.inputElement),this.enabled?((0,s.vy)([this.inputWrapper.container],he.disable),this.inputElement.setAttribute("aria-disabled","false"),this.targetElement().setAttribute("tabindex",this.tabIndex),this.inputWrapper&&this.inputWrapper.container&&(this.inputWrapper.container.setAttribute("aria-disabled","false"),this.inputWrapper.container.removeAttribute("disabled"))):(this.hidePopup(),(0,s.iQ)([this.inputWrapper.container],he.disable),this.inputElement.setAttribute("aria-disabled","true"),this.targetElement().tabIndex=-1,this.inputWrapper&&this.inputWrapper.container&&(this.inputWrapper.container.setAttribute("aria-disabled","true"),this.inputWrapper.container.setAttribute("disabled","")))},i.prototype.getPersistData=function(){return this.addOnPersist(["value"])},i.prototype.getLocaleName=function(){return"drop-down-list"},i.prototype.preventTabIndex=function(e){"dropdownlist"===this.getModuleName()&&(e.tabIndex=-1)},i.prototype.targetElement=function(){return(0,s.hX)(this.inputWrapper)?null:this.inputWrapper.container},i.prototype.getNgDirective=function(){return"EJS-DROPDOWNLIST"},i.prototype.getElementByText=function(e){return this.getElementByValue(this.getValueByText(e))},i.prototype.getElementByValue=function(e){for(var t,r=0,o=this.getItems();r<o.length;r++){var l=o[r];if(this.getFormattedValue(l.getAttribute("data-value"))===e){t=l;break}}return t},i.prototype.initValue=function(){this.viewPortInfo.startIndex=this.virtualItemStartIndex=0,this.viewPortInfo.endIndex=this.virtualItemEndIndex=this.itemCount,this.renderList(),this.dataSource instanceof x.M1?this.initialRemoteRender=!0:this.updateV
1alues()},i.prototype.isDisableItemValue=function(e){if("object"==typeof e){var t=JSON.parse(JSON.stringify(e))[this.fields.value];return this.isDisabledItemByIndex(this.getIndexByValue(t))}return this.isDisabledItemByIndex(this.getIndexByValue(e))},i.prototype.updateValues=function(){if(this.fields.disabled&&(null!=this.value&&(this.value=this.isDisableItemValue(this.value)?null:this.value),null!=this.text&&(this.text=this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text)))?null:this.text),null!=this.index&&(this.index=this.isDisabledItemByIndex(this.index)?null:this.index,this.activeIndex=this.index)),this.selectedValueInfo=this.viewPortInfo,(0,s.hX)(this.value))if(this.text&&(0,s.hX)(this.value)){var t=this.getElementByText(this.text);if((0,s.hX)(t))return void this.setProperties({text:null});this.setSelection(t,null)}else this.setSelection(this.liCollections[this.activeIndex],null);else{var e=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value;this.setSelection(this.getElementByValue(e),null)}this.setHiddenValue(),J.pd.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton)},i.prototype.onBlurHandler=function(e){if(this.enabled){var t=e.relatedTarget,n=e.target,r=this.isPreventBlur;if(this.isPreventBlur=!1,r&&!this.isDocumentClick&&this.isPopupOpen&&(!(0,s.hX)(n)||!this.isFilterLayout()&&(0,s.hX)(t)))return void("dropdownlist"===this.getModuleName()&&this.allowFiltering&&this.isPopupOpen?this.filterInput.focus():this.targetElement().focus());if(this.isDocumentClick||!(0,s.hX)(this.popupObj)&&document.body.contains(this.popupObj.element)&&this.popupObj.element.classList.contains(he.mobileFilter))return void(this.beforePopupOpen||(this.isDocumentClick=!1));("dropdownlist"===this.getModuleName()&&!this.isFilterFocus&&t!==this.inputElement&&(document.activeElement!==t||document.activeElement===t&&n.classList.contains(he.inputFocus))||(0,s.hX)(t)&&"dropdownlist"===this.getModuleName()&&this.allowFiltering&&n!==this.inputWrapper.container||"dropdownlist"!==this.getModuleName()&&!this.inputWrapper.container.contains(t)||this.isTabKey)&&(this.isDocumentClick=!!this.isPopupOpen,this.focusOutAction(e),this.isTabKey=!1),this.isRequested&&!this.isPopupOpen&&!this.isPreventBlur&&(this.isActive=!1,this.beforePopupOpen=!1),this.isFocused=!1}},i.prototype.focusOutAction=function(e){this.isInteracted=!1,this.focusOut(e),this.onFocusOut(e)},i.prototype.onFocusOut=function(e){this.enabled&&(this.isSelected&&(this.isSelectCustom=!1,this.onChangeEvent(e)),this.floatLabelChange(),this.dispatchEvent(this.hiddenElement,"change"),"dropdownlist"===this.getModuleName()&&"INPUT"!==this.element.tagName&&this.dispatchEvent(this.inputElement,"blur"),this.inputWrapper.clearButton&&(0,s.iQ)([this.inputWrapper.clearButton],he.clearIconHide),this.trigger("blur"))},i.prototype.onFocus=function(e){this.isInteracted||(this.isInteracted=!0,this.trigger("focus",{isInteracted:!!e,event:e})),this.updateIconState(),this.isFocused=!0},i.prototype.resizingWireEvent=function(){s.Jm.add(document,"mousemove",this.resizePopup,this),s.Jm.add(document,"mouseup",this.stopResizing,this),s.Jm.add(document,"touchmove",this.resizePopup,this),s.Jm.add(document,"touchend",this.stopResizing,this)},i.prototype.resizingUnWireEvent=function(){s.Jm.remove(document,"mousemove",this.resizePopup),s.Jm.remove(document,"mouseup",this.stopResizing),s.Jm.remove(document,"touchmove",this.resizePopup),s.Jm.remove(document,"touchend",this.stopResizing)},i.prototype.resetValueHandler=function(e){var t=(0,s.kp)(this.inputElement,"form");if(t&&e.target===t){var n=this.element.tagName===this.getNgDirective()?null:this.inputElement.getAttribute("value");this.text=n}},i.prototype.wireEvent=function(){s.Jm.add(this.inputWrapper.container,"mousedown",this.dropDownClick,this),s.Jm.add(this.inputWrapper.container,"focus",this.focusIn,this),s.Jm.add(this.inputWrapper.container,"keypress",this.onSearch,this),s.Jm.add(window,"resize",this.windowResize,this),this.bindCommonEvent()},i.prototype.bindCommonEvent=function(){s.Jm.add(this.targetElement(),"blur",this.onBlurHandler,this);var e=(0,s.kp)(this.inputElement,"form");e&&s.Jm.add(e,"reset",this.resetValueHandler,this),this.keyboardModule=new s.j9(this.targetElement(),s.Pw.isDevice?{keyAction:this.mobileKeyActionHandler.bind(this),keyConfigs:this.keyConfigure,eventName:"keydown"}:{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigure,eventName:"keydown"}),this.bindClearEvent()},i.prototype.windowResize=function(){this.isPopupOpen&&this.popupObj.refreshPosition(this.inputWrapper.container)},i.prototype.bindClearEvent=function(){this.showClearButton&&s.Jm.add(this.inputWrapper.clearButton,"mousedown",this.resetHandler,this)},i.prototype.unBindCommonEvent=function(){!(0,s.hX)(this.inputWrapper)&&this.targetElement()&&s.Jm.remove(this.targetElement(),"blur",this.onBlurHandler);var e=this.inputElement&&(0,s.kp)(this.inputElement,"form");e&&s.Jm.remove(e,"reset",this.resetValueHandler),s.Pw.isDevice||this.keyboardModule.destroy(),this.showClearButton&&s.Jm.remove(this.inputWrapper.clearButton,"mousedown",this.resetHandler)},i.prototype.updateIconState=function(){this.showClearButton&&(""===this.inputElement.value||this.readonly?(0,s.iQ)([this.inputWrapper.clearButton],he.clearIconHide):(0,s.vy)([this.inputWrapper.clearButton],he.clearIconHide))},i.prototype.wireListEvents=function(){(0,s.hX)(this.list)||(s.Jm.add(this.list,"click",this.onMouseClick,this),s.Jm.add(this.list,"mouseover",this.onMouseOver,this),s.Jm.add(this.list,"mouseout",this.onMouseLeave,this))},i.prototype.onSearch=function(e){32!==e.charCode&&13!==e.charCode&&(void 0===this.list&&this.renderList(),this.searchKeyEvent=e,this.onServerIncrementalSearch(e))},i.prototype.onServerIncrementalSearch=function(e){!this.isRequested&&!(0,s.hX)(this.list)&&!(0,s.hX)(this.list.querySelector("li"))&&this.enabled&&!this.readonly&&this.incrementalSearch(e)},i.prototype.startResizing=function(e){this.isResizing=!0,this.trigger("resizeStart",e);var t=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,n=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;this.list&&this.list.parentElement&&(this.originalWidth=this.list.parentElement.offsetWidth,this.originalHeight=this.list.parentElement.offsetHeight,this.originalMouseX=t,this.originalMouseY=n),this.resizingWireEvent(),e&&e.preventDefault()},i.prototype.resizePopup=function(e){if(this.isResizing){this.trigger("resizing",e);var t=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,n=e instanceof MouseEvent?e.clientY:e.touches[0].clientY,r=t-this.originalMouseX,o=n-this.originalMouseY;if(this.list&&this.list.parentElement){var l=parseInt(window.getComputedStyle(this.list.parentElement).minWidth,10),h=
1parseInt(window.getComputedStyle(this.list.parentElement).minHeight,10);l=l||100,h=h||120,this.resizeWidth=Math.max(this.originalWidth+r,l),this.resizeHeight=Math.max(this.originalHeight+o,h),this.list.parentElement.style.width=this.resizeWidth+"px",this.list.parentElement.style.height=this.resizeHeight+"px",this.list.parentElement.style.maxHeight=this.resizeHeight+"px",this.list.style.maxHeight=this.resizeHeight+"px",this.fixedHeaderElement&&this.ulElement&&(this.fixedHeaderElement.style.width=this.ulElement.offsetWidth+"px")}e&&e.preventDefault()}},i.prototype.stopResizing=function(e){this.isResizing&&(this.isResizing=!1,this.trigger("resizeStop",e),this.resizingUnWireEvent()),e&&e.preventDefault()},i.prototype.onMouseClick=function(e){var t=e.target;this.keyboardEvent=null;var n=(0,s.kp)(t,"."+P_li);this.isValidLI(n)&&!this.isDisabledElement(n)&&(this.setSelection(n,e),s.Pw.isDevice&&this.isFilterLayout()?history.back():this.closePopup(100,e))},i.prototype.onMouseOver=function(e){var t=(0,s.kp)(e.target,"."+P_li);this.setHover(t)},i.prototype.setHover=function(e){this.enabled&&this.isValidLI(e)&&!e.classList.contains("e-hover")&&(this.removeHover(),(0,s.iQ)([e],"e-hover"))},i.prototype.onMouseLeave=function(){this.removeHover()},i.prototype.removeHover=function(){if(this.list){var e=this.list.querySelectorAll(".e-hover");e&&e.length&&(0,s.vy)(e,"e-hover")}},i.prototype.isValidLI=function(e){return e&&e.hasAttribute("role")&&"option"===e.getAttribute("role")},i.prototype.updateIncrementalItemIndex=function(e,t){this.incrementalStartIndex=e,this.incrementalEndIndex=t},i.prototype.incrementalSearch=function(e){if(this.liCollections.length>0)if(this.enableVirtualization){var t=!1,n=!1,r=this.ulElement.getElementsByClassName("e-active")[0],o=r?r.textContent:null;""===this.incrementalQueryString?(this.incrementalQueryString=String.fromCharCode(e.charCode),this.incrementalPreQueryString=this.incrementalQueryString):String.fromCharCode(e.charCode).toLocaleLowerCase()===this.incrementalPreQueryString.toLocaleLowerCase()?n=!0:this.incrementalQueryString=String.fromCharCode(e.charCode),(this.viewPortInfo.endIndex>=this.incrementalEndIndex&&this.incrementalEndIndex<=this.totalItemCount||0===this.incrementalEndIndex)&&(t=!0,this.incrementalStartIndex=this.incrementalEndIndex,this.incrementalEndIndex=0===this.incrementalEndIndex?100>this.totalItemCount?this.totalItemCount:100:this.incrementalEndIndex+100>this.totalItemCount?this.totalItemCount:this.incrementalEndIndex+100,this.updateIncrementalInfo(this.incrementalStartIndex,this.incrementalEndIndex),t=!0),(0!==this.viewPortInfo.startIndex||t)&&this.updateIncrementalView(0,this.itemCount);for(var l=hl(e.charCode,this.incrementalLiCollections,this.activeIndex,!0,this.element.id,n,o,!0);(0,s.hX)(l)&&this.incrementalEndIndex<this.totalItemCount&&(this.updateIncrementalItemIndex(this.incrementalEndIndex,this.incrementalEndIndex+100>this.totalItemCount?this.totalItemCount:this.incrementalEndIndex+100),this.updateIncrementalInfo(this.incrementalStartIndex,this.incrementalEndIndex),t=!0,(0!==this.viewPortInfo.startIndex||t)&&this.updateIncrementalView(0,this.itemCount),l=hl(e.charCode,this.incrementalLiCollections,0,!0,this.element.id,n,o,!0,!0),(0,s.hX)(l));)if((0,s.hX)(l)&&this.incrementalEndIndex>=this.totalItemCount){this.updateIncrementalItemIndex(0,100>this.totalItemCount?this.totalItemCount:100);break}(0,s.hX)(l)&&this.incrementalEndIndex>=this.totalItemCount&&(this.updateIncrementalItemIndex(0,100>this.totalItemCount?this.totalItemCount:100),this.updateIncrementalInfo(this.incrementalStartIndex,this.incrementalEndIndex),t=!0,(0!==this.viewPortInfo.startIndex||t)&&this.updateIncrementalView(0,this.itemCount),l=hl(e.charCode,this.incrementalLiCollections,0,!0,this.element.id,n,o,!0,!0));var h=l&&this.getIndexByValue(l.getAttribute("data-value"));if(h)h-=this.skeletonCount;else for(var d=0;d<this.incrementalLiCollections.length;d++)if(!(0,s.hX)(l)&&!(0,s.hX)(l.getAttribute("data-value"))&&this.incrementalLiCollections[d].getAttribute("data-value")===l.getAttribute("data-value").toString()){h=this.incrementalStartIndex+(h=d);break}!h||this.viewPortInfo.startIndex>=h&&h>=this.viewPortInfo.endIndex||this.updateIncrementalView(h-(this.itemCount/2-2)>0?h-(this.itemCount/2-2):0,this.viewPortInfo.startIndex+this.itemCount>this.totalItemCount?this.totalItemCount:this.viewPortInfo.startIndex+this.itemCount),(0,s.hX)(l)?(this.updateIncrementalView(0,this.itemCount),this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues(),this.list.scrollTop=0):(this.getIndexByValue(l.getAttribute("data-value"))-this.skeletonCount>this.itemCount/2&&this.updateIncrementalView(this.viewPortInfo.startIndex+(this.itemCount/2-2)<this.totalItemCount?this.viewPortInfo.startIndex+(this.itemCount/2-2):this.totalItemCount,this.viewPortInfo.startIndex+this.itemCount>this.totalItemCount?this.totalItemCount:this.viewPortInfo.startIndex+this.itemCount),l=this.getElementByValue(l.getAttribute("data-value")),this.setSelection(l,e),this.setScrollPosition(),this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues(),this.enableVirtualization&&!this.fields.groupBy&&(this.list.scrollTop=(this.virtualListInfo&&this.virtualListInfo.startIndex?this.selectedLI.offsetTop+this.virtualListInfo.startIndex*this.selectedLI.offsetHeight:this.selectedLI.offsetTop)-this.list.querySelectorAll(".e-virtual-list").length*this.selectedLI.offsetHeight),this.incrementalPreQueryString=this.incrementalQueryString)}else{if(l=void 0,this.fields.disabled){var g=this.list.querySelectorAll("."+P_li+":not(.e-disabled)");
1l=hl(e.charCode,g,this.activeIndex,!0,this.element.id)}else l=hl(e.charCode,this.liCollections,this.activeIndex,!0,this.element.id);(0,s.hX)(l)||(this.setSelection(l,e),this.setScrollPosition())}},i.prototype.hideSpinner=function(){(0,s.hX)(this.spinnerElement)||((0,ae.W$)(this.spinnerElement),(0,s.vy)([this.spinnerElement],he.disableIcon),this.spinnerElement.innerHTML="",this.spinnerElement=null)},i.prototype.showSpinner=function(){(0,s.hX)(this.spinnerElement)&&(this.spinnerElement=s.Pw.isDevice&&!(0,s.hX)(this.filterInputObj)&&this.filterInputObj.buttons[1]||!(0,s.hX)(this.filterInputObj)&&this.filterInputObj.buttons[0]||this.inputWrapper.buttons[0],(0,s.iQ)([this.spinnerElement],he.disableIcon),(0,ae.GF)({target:this.spinnerElement,width:s.Pw.isDevice?"16px":"14px"},this.createElement),(0,ae.xc)(this.spinnerElement))},i.prototype.keyActionHandler=function(e){if(this.enabled){this.keyboardEvent=e,this.isPreventKeyAction&&this.enableVirtualization&&e.preventDefault();var t="pageUp"===e.action||"pageDown"===e.action,n="dropdownlist"!==this.getModuleName()&&("home"===e.action||"end"===e.action);this.isEscapeKey="escape"===e.action,this.isTabKey=!this.isPopupOpen&&"tab"===e.action;var r="down"===e.action||"up"===e.action||"pageUp"===e.action||"pageDown"===e.action||"home"===e.action||"end"===e.action;if((!(this.isEditTextBox()||t||n)||this.isPopupOpen)&&!this.readonly){var o="tab"===e.action||"close"===e.action;if((0,s.hX)(this.list)&&!this.isRequested&&!o&&"escape"!==e.action&&(this.searchKeyEvent=e,(!this.enableVirtualization||this.enableVirtualization&&"autocomplete"!==this.getModuleName()&&"mousedown"!==e.type&&(40===e.keyCode||38===e.keyCode))&&(this.renderList(e),this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll("."+P_li),this.ulElement=this.list.querySelector("ul"))),(0,s.hX)(this.list)||!(0,s.hX)(this.liCollections)&&r&&0===this.liCollections.length||this.isRequested)return;switch((o&&"autocomplete"!==this.getModuleName()&&this.isPopupOpen||"escape"===e.action)&&e.preventDefault(),this.isSelected="escape"!==e.action&&this.isSelected,this.isTyped=!r&&"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.isMouseScrollAction=!0,this.updateHomeEndAction(e);break;case"space":"dropdownlist"===this.getModuleName()&&(this.beforePopupOpen||(this.showPopup(),e.preventDefault()));break;case"open":this.showPopup(e);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))}}}},i.prototype.updateUpDownAction=function(e,t){if(!this.fields.disabled||!this.list||0!==this.list.querySelectorAll(".e-list-item:not(.e-disabled)").length){if(this.allowFiltering&&!this.enableVirtualization&&"autocomplete"!==this.getModuleName()){var n=this.getItemData().value;(0,s.hX)(n)&&(n="null");var r=this.getIndexByValue(n);(0,s.hX)(r)||(this.activeIndex=r)}var g,o=this.list.querySelector("."+he.focus);if(this.isSelectFocusItem(o)&&!t){if(this.setSelection(o,e),this.enableVirtualization){var l=this.virtualListInfo&&this.virtualListInfo.startIndex?this.selectedLI.offsetTop+this.virtualListInfo.startIndex*this.selectedLI.offsetHeight:this.selectedLI.offsetTop;this.fields.groupBy&&(l=this.virtualListInfo&&0===this.virtualListInfo.startIndex?this.selectedLI.offsetHeight-l:l-this.selectedLI.offsetHeight),this.list.scrollTop=l-this.list.querySelectorAll(".e-virtual-list").length*this.selectedLI.offsetHeight}}else if(!(0,s.hX)(this.liCollections)){var d="down"===e.action?this.activeIndex+1:this.activeIndex-1;d=t?this.activeIndex:d;var p=0;"autocomplete"===this.getModuleName()&&(p="down"===e.action&&(0,s.hX)(this.activeIndex)?0:this.liCollections.length-1,d=d<0?this.liCollections.length-1:d===this.liCollections.length?0:d);var u=void 0;if(("autocomplete"!==this.getModuleName()||"autocomplete"===this.getModuleName()&&this.isPopupOpen)&&(this.enableVirtualization?t?"autocomplete"===this.getModuleName()?(n=this.getFormattedValue(this.selectedLI.getAttribute("data-value")),u=this.getElementByValue(n)):u=this.getElementByValue(this.getItemData().value):(u=(0,s.hX)(this.activeIndex)?this.liCollections[this.skeletonCount]:this.liCollections[d],u=(0,s.hX)(u)||u.classList.contains("e-virtual-list")?null:u):u=(0,s.hX)(this.activeIndex)?this.liCollections[p]:this.liCollections[d]),(0,s.hX)(u)){if(this.enableVirtualization&&!this.isPopupOpen&&"autocomplete"!==this.getModuleName()&&(this.viewPortInfo.endIndex!==this.totalItemCount&&"down"===e.action||0!==this.viewPortInfo.startIndex&&"up"===e.action)){if
1("down"===e.action)this.viewPortInfo.startIndex=this.viewPortInfo.startIndex+this.itemCount<this.totalItemCount-this.itemCount?this.viewPortInfo.startIndex+this.itemCount:this.totalItemCount-this.itemCount,this.viewPortInfo.endIndex=this.viewPortInfo.startIndex+this.itemCount,this.updateVirtualItemIndex(),this.isCustomFilter="combobox"===this.getModuleName()||this.isCustomFilter,this.resetList(this.dataSource,this.fields,this.query),this.isCustomFilter="combobox"!==this.getModuleName()&&this.isCustomFilter,n="null"!==this.liCollections[0].getAttribute("data-value")?this.getFormattedValue(this.liCollections[0].getAttribute("data-value")):null,(m=this.getDataByValue(n))&&(this.itemData=m);else if("up"===e.action){var m;this.viewPortInfo.startIndex=this.viewPortInfo.startIndex-this.itemCount>0?this.viewPortInfo.startIndex-this.itemCount:0,this.viewPortInfo.endIndex=this.viewPortInfo.startIndex+this.itemCount,this.updateVirtualItemIndex(),this.isCustomFilter="combobox"===this.getModuleName()||this.isCustomFilter,this.resetList(this.dataSource,this.fields,this.query),this.isCustomFilter="combobox"!==this.getModuleName()&&this.isCustomFilter,n="null"!==this.liCollections[this.liCollections.length-1].getAttribute("data-value")?this.getFormattedValue(this.liCollections[this.liCollections.length-1].getAttribute("data-value")):null,(m=this.getDataByValue(n))&&(this.itemData=m)}this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll("."+P_li),this.ulElement=this.list.querySelector("ul"),this.handleVirtualKeyboardActions(e,this.pageCount)}}else{var f=this.liCollections[this.skeletonCount]&&this.liCollections[this.skeletonCount].classList.contains("e-item-focus");this.setSelection(u,e),f&&this.enableVirtualization&&"autocomplete"===this.getModuleName()&&!t&&(l=this.virtualListInfo&&this.virtualListInfo.startIndex?this.selectedLI.offsetTop+this.virtualListInfo.startIndex*this.selectedLI.offsetHeight:this.selectedLI.offsetTop,this.list.scrollTop=(l=this.virtualListInfo&&0===this.virtualListInfo.startIndex&&this.fields.groupBy?this.selectedLI.offsetHeight-l:l-this.selectedLI.offsetHeight)-this.list.querySelectorAll(".e-virtual-list").length*this.selectedLI.offsetHeight)}}for(this.allowFiltering&&!this.enableVirtualization&&"autocomplete"!==this.getModuleName()&&(n=this.getItemData().value,r=this.getIndexByValueFilter(n,this.actionCompleteData.ulElement),(0,s.hX)(r)||(this.activeIndex=r)),this.allowFiltering&&"dropdownlist"===this.getModuleName()&&this.filterInput&&((0,s.hX)(this.ulElement)||(0,s.hX)(this.ulElement.getElementsByClassName("e-item-focus")[0])?!(0,s.hX)(this.ulElement)&&!(0,s.hX)(this.ulElement.getElementsByClassName("e-active")[0])&&(0,s.uK)(this.filterInput,{"aria-activedescendant":this.ulElement.getElementsByClassName("e-active")[0].id}):(0,s.uK)(this.filterInput,{"aria-activedescendant":this.ulElement.getElementsByClassName("e-item-focus")[0].id})),d=0;d<this.liCollections.length;d++)if(this.liCollections[d].classList.contains(he.focus)||this.liCollections[d].classList.contains(he.selected)){g=d;break}null!=g&&this.isDisabledElement(this.liCollections[g])&&("autocomplete"!==this.getModuleName()&&(this.liCollections.length-1===g&&"down"===e.action&&(e.action="up"),0===g&&"up"===e.action&&(e.action="down")),this.updateUpDownAction(e)),e.preventDefault()}},i.prototype.updateHomeEndAction=function(e,t){if("dropdownlist"===this.getModuleName()){var n=0;if("home"===e.action?(n=0,this.enableVirtualization&&this.isPopupOpen?n=this.skeletonCount:this.enableVirtualization&&!this.isPopupOpen&&0!==this.viewPortInfo.startIndex&&(this.viewPortInfo.startIndex=0,this.viewPortInfo.endIndex=this.itemCount,this.updateVirtualItemIndex(),this.resetList(this.dataSource,this.fields,this.query))):(this.enableVirtualization&&!this.isPopupOpen&&this.viewPortInfo.endIndex!==this.totalItemCount&&(this.viewPortInfo.startIndex=this.totalItemCount-this.itemCount,this.viewPortInfo.endIndex=this.totalItemCount,this.updateVirtualItemIndex(),this.resetList(this.dataSource,this.fields,this.query)),n=this.getItems().length-1),e.preventDefault(),this.activeIndex===n)return void(t&&this.setSelection(this.liCollections[n],e));if(!this.enableVirtualization&&this.liCollections[n]&&this.liCollections[n].classList.contains("e-disabled"))return;this.setSelection(this.liCollections[n],e)}},i.prototype.selectCurrentValueOnTab=function(e){"autocomplete"===this.getModuleName()?this.selectCurrentItem(e):this.isPopupOpen&&(this.hidePopup(e),this.focusDropDown(e))},i.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()),(0,s.hX)(this.list)||!(0,s.hX)(this.liCollections)&&0===this.liCollections.length||this.isRequested)return;"enter"===e.action&&this.selectCurrentItem(e)}},i.prototype.handleVirtualKeyboardActions=function(e,t){switch(e.action){case"down":case"up":(null!=this.itemData||"autocomplete"===this.getModuleName())&&this.updateUpDownAction(e,!0);break;case"pageUp":this.activeIndex="autocomplete"===this.getModuleName()?this.getIndexByValue(this.selectedLI.getAttribute("data-value"))+this.getPageCount()-1:this.getIndexByValue(this.previousValue),this.pageUpSelection(this.activeIndex-this.getPageCount(),e,!0),e.preventDefault();break;case"pageDown":this.activeIndex="autocomplete"===this.getModuleName()?this.getIndexByValue(this.selectedLI.getAttribute("data-value"))-this.getPageCount():this.getIndexByValue(this.previousValue),this.pageDownSelection((0,s.hX)(this.activeIndex)?2*this.getPageCount():this.activeIndex+this.getPageCount(),e,!0),e.preventDefault();break;case"home":case"end":this.isMouseScrollAction=!0,this.updateHomeEndAction(e,!0)}this.keyboardEvent=null},i.prototype.selectCurrentItem=function(e){if(this.isPopupOpen){var t=this.list.querySelector("."+he.focu
1s);if(this.isDisabledElement(t))return;t&&(this.setSelection(t,e),this.isTyped=!1),this.isSelected&&(this.isSelectCustom=!1,this.onChangeEvent(e)),this.hidePopup(e),this.focusDropDown(e)}else this.showPopup()},i.prototype.isSelectFocusItem=function(e){return!(0,s.hX)(e)},i.prototype.pageUpSelection=function(e,t,n){var r=e>=0?this.liCollections[e+1]:this.liCollections[0];if(!this.enableVirtualization&&r&&r.classList.contains("e-disabled"))for(var o=e>=0?e+1:0;o<this.liCollections.length&&(!(r=this.liCollections[o])||r.classList.contains("e-disabled"));)if(--o<0)return;this.enableVirtualization&&null==this.activeIndex&&(r=this.liCollections.length>=e&&e>=0?this.liCollections[e+this.skeletonCount+1]:this.liCollections[0]),!(0,s.hX)(r)&&r.classList.contains("e-virtual-list")&&(r=this.liCollections[this.skeletonCount]),this.PageUpDownSelection(r,t),this.allowFiltering&&"dropdownlist"===this.getModuleName()&&((0,s.hX)(this.ulElement)||(0,s.hX)(this.ulElement.getElementsByClassName("e-item-focus")[0])?!(0,s.hX)(this.ulElement)&&!(0,s.hX)(this.ulElement.getElementsByClassName("e-active")[0])&&(0,s.uK)(this.filterInput,{"aria-activedescendant":this.ulElement.getElementsByClassName("e-active")[0].id}):(0,s.uK)(this.filterInput,{"aria-activedescendant":this.ulElement.getElementsByClassName("e-item-focus")[0].id}))},i.prototype.PageUpDownSelection=function(e,t){this.enableVirtualization?!(0,s.hX)(e)&&("autocomplete"!==this.getModuleName()&&!e.classList.contains("e-active")||"autocomplete"===this.getModuleName()&&!e.classList.contains("e-item-focus"))&&this.setSelection(e,t):this.setSelection(e,t)},i.prototype.pageDownSelection=function(e,t,n){var r=this.getItems(),o=e<=r.length?this.liCollections[e-1]:this.liCollections[r.length-1];if(!this.enableVirtualization&&o&&o.classList.contains("e-disabled"))for(;e>=0&&e<this.liCollections.length&&(!(o=e<=r.length?this.liCollections[e-1]:this.liCollections[r.length-1])||o.classList.contains("e-disabled"));)e++;this.enableVirtualization&&this.skeletonCount>0&&(o=(e="dropdownlist"===this.getModuleName()&&this.allowFiltering?e+1:e)<r.length?this.liCollections[e]:this.liCollections[r.length-1]),this.enableVirtualization&&null==this.activeIndex&&(o=e<=r.length?this.liCollections[e+this.skeletonCount-1]:this.liCollections[r.length-1]),this.PageUpDownSelection(o,t),this.allowFiltering&&"dropdownlist"===this.getModuleName()&&((0,s.hX)(this.ulElement)||(0,s.hX)(this.ulElement.getElementsByClassName("e-item-focus")[0])?!(0,s.hX)(this.ulElement)&&!(0,s.hX)(this.ulElement.getElementsByClassName("e-active")[0])&&(0,s.uK)(this.filterInput,{"aria-activedescendant":this.ulElement.getElementsByClassName("e-active")[0].id}):(0,s.uK)(this.filterInput,{"aria-activedescendant":this.ulElement.getElementsByClassName("e-item-focus")[0].id}))},i.prototype.unWireEvent=function(){(0,s.hX)(this.inputWrapper)||(s.Jm.remove(this.inputWrapper.container,"mousedown",this.dropDownClick),s.Jm.remove(this.inputWrapper.container,"keypress",this.onSearch),s.Jm.remove(this.inputWrapper.container,"focus",this.focusIn),s.Jm.remove(window,"resize",this.windowResize)),this.unBindCommonEvent()},i.prototype.unWireListEvents=function(){this.list&&(s.Jm.remove(this.list,"click",this.onMouseClick),s.Jm.remove(this.list,"mouseover",this.onMouseOver),s.Jm.remove(this.list,"mouseout",this.onMouseLeave))},i.prototype.checkSelector=function(e){return'[id="'+e.replace(/(:|\.|\[|\]|,|=|@|\\|\/|#)/g,"\\$1")+'"]'},i.prototype.onDocumentClick=function(e){var t=e.target;if(!(0,s.hX)(this.popupObj)&&(0,s.kp)(t,this.checkSelector(this.popupObj.element.id))||(0,s.hX)(this.inputWrapper)||this.inputWrapper.container.contains(e.target))t!==this.inputElement&&(!this.allowFiltering||t!==this.filterInput)&&("combobox"!==this.getModuleName()||this.allowFiltering||!s.Pw.isDevice||t!==this.inputWrapper.buttons[0])&&(this.isPreventBlur=(s.Pw.isIE||"edge"===s.Pw.info.name)&&(document.activeElement===this.targetElement()||document.activeElement===this.filterInput),e.preventDefault());else if(this.inputWrapper.container.classList.contains(he.inputFocus)||this.isPopupOpen){this.isDocumentClick=!0;var n=this.isRequested;"combobox"===this.getModuleName()&&this.isTyped&&(this.isInteracted=!1),this.hidePopup(e),this.isInteracted=!1,n||(this.onFocusOut(e),this.inputWrapper.container.classList.remove(he.inputFocus))}},i.prototype.activeStateChange=function(){this.isDocumentClick&&(this.hidePopup(),this.onFocusOut(),this.inputWrapper.container.classList.remove(he.inputFocus))}
1,i.prototype.focusDropDown=function(e){!this.initial&&this.isFilterLayout()&&this.focusIn(e)},i.prototype.dropDownClick=function(e){if(3!==e.which&&2!==e.button&&(this.keyboardEvent=null,!this.targetElement().classList.contains(he.disable)&&this.inputWrapper.clearButton!==e.target)){var t=e.target;if(t!==this.inputElement&&!(this.allowFiltering&&t===this.filterInput)&&"combobox"!==this.getModuleName()&&e.preventDefault(),this.readonly)this.focusIn(e);else{this.isPopupOpen||this.popupObj&&document.body.contains(this.popupObj.element)&&this.beforePopupOpen&&this.isPopupRender?(this.hidePopup(e),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(e));var n=this,r=this.dataSource instanceof x.M1&&this.groupTemplate?700:this.element.tagName===this.getNgDirective()&&this.itemTemplate?500:100;this.isSecondClick||setTimeout(function(){n.cloneElements(),n.isSecondClick=!0,n.isSecondClick=!(n.isReact&&n.isFiltering()&&n.dataSource instanceof x.M1&&!n.list.querySelector("ul"))},r)}}},i.prototype.cloneElements=function(){if(this.list){var e=this.list.querySelector("ul");e&&(e=e.cloneNode?e.cloneNode(!0):e,this.actionCompleteData.ulElement=e)}},i.prototype.updateSelectedItem=function(e,t,n,r){var o=this;this.removeSelection(),e.classList.add("e-active"),this.removeHover();var l=null!==e.getAttribute("data-value")?this.getFormattedValue(e.getAttribute("data-value")):null,h=this.getDataByValue(l);if(this.initial||n||(0,s.hX)(t))this.selectEventCallback(e,t,n,h,l),r&&this.setSelectOptions(e,t);else{var d=this.detachChanges(h);this.isSelected=!0,this.trigger("select",{e:t,item:e,itemData:d,isInteracted:!!t,cancel:!1},function(u){u.cancel?e.classList.remove("e-active"):(o.selectEventCallback(e,t,n,h,l),r&&o.setSelectOptions(e,t))})}},i.prototype.selectEventCallback=function(e,t,n,r,o){this.previousItemData=(0,s.hX)(this.itemData)?null:this.itemData,this.itemData!==r&&(this.previousValue=(0,s.hX)(this.itemData)?null:"object"!=typeof this.itemData||this.allowObjectBinding?this.itemData:this.checkFieldValue(this.itemData,this.fields.value.split("."))),this.item=e,this.itemData=r;var l=this.list.querySelector("."+P_focus);if(l&&(0,s.vy)([l],P_focus),e.setAttribute("aria-selected","true"),(0,s.hX)(o)&&(o="null"),this.allowFiltering&&!this.enableVirtualization&&"autocomplete"!==this.getModuleName()){var h=this.getIndexByValueFilter(o,this.actionCompleteData.ulElement);this.activeIndex=(0,s.hX)(h)?this.getIndexByValue(o):h}else this.enableVirtualization&&null==this.activeIndex&&this.dataSource instanceof x.M1&&(this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll("."+P_li),this.ulElement=this.list.querySelector("ul")),this.activeIndex=this.getIndexByValue(o)},i.prototype.activeItem=function(e){this.isValidLI(e)&&!e.classList.contains("e-active")&&(this.removeSelection(),e.classList.add("e-active"),this.removeHover(),e.setAttribute("aria-selected","true"))},i.prototype.setValue=function(e){var t=this.getItemData();this.isTouched=!(0,s.hX)(e),J.pd.setValue(null===t.value?null:t.text,this.inputElement,this.floatLabelType,this.showClearButton),this.valueTemplate&&null!==this.itemData?this.setValueTemplate():!(0,s.hX)(this.valueTempElement)&&this.inputElement.previousSibling===this.valueTempElement&&((0,s.Yo)(this.valueTempElement),this.inputElement.style.display="block"),!(0,s.hX)(t.value)&&!this.enableVirtualization&&this.allowFiltering&&(this.activeIndex=this.getIndexByValueFilter(t.value,this.actionCompleteData.ulElement));var n=he.clearIcon,o=this.isFiltering()&&this.filterInput&&"combobox"===this.getModuleName()&&this.filterInput.parentElement.querySelector("."+n);return this.isFiltering()&&o&&o.style.removeProperty("visibility"),!this.allowObjectBinding&&this.previousValue===t.value||this.allowObjectBinding&&null!=this.previousValue&&this.isObjectInArray(this.previousValue,[this.allowCustom&&this.isObjectCustomValue?this.value?this.value:t:t.value?this.getDataByValue(t.value):t])?(this.isSelected=!1,!0):(this.isSelected=!this.initial,this.isSelectCustom=!1,"dropdownlist"===this.getModuleName()&&this.updateIconState(),!1)},i.prototype.setSelection=function(e,t){if(this.isValidLI(e)&&(!e.classList.contains("e-active")||this.isPopupOpen&&this.isSelected&&e.classList.contains("e-active")))this.updateSelectedItem(e,t,!1,!0);else if(this.setSelectOptions(e,t),this.enableVirtualization&&this.value){var o,n=this.isPrimitiveData?"":this.fields.value,r=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value;if(this.dataSource instanceof x.M1){if((o=new x.M1(this.virtualGroupDataSource).executeLocal((new x.XK).where(new x.mT(n,"equal",r))))&&o.length>0){this.itemData=o[0];var l=this.getItemData(),h=this.allowObjectBinding?this.getDataByValue(l.value):l.value;(this.value===l.value&&this.text!==l.text||this.value!==l.value&&this.text===l.text)&&this.setProperties({text:l.text?l.text.toString():l.text,value:h})}}else(o=new x.M1(this.dataSource).executeLocal((new x.XK).where(new x.mT(n,"equal",r))))&&o.length>0&&(this.itemData=o[0],l=this.getItemData(),h=this.allowObjectBinding?this.getDataByValue(l.value):l.value,(this.value===l.value&&this.text!==l.text||this.value!==l.value&&this.text===l.text)&&(this.setProperties({text:l.text?l.text.toString():l.text,value:h}),(0,s.hX)(e)&&(this.previousValue=this.value)))}},i.prototype.setSelectOptions=function(e,t){this.list&&this.removeHover(),this.previousSelectedLI=(0,s.hX)(this.selectedLI)?null:this.selectedLI,this.selectedLI=e,!this.setValue(t)&&((!this.isPopupOpen&&!(0,s.hX)(e)||this.isPopupOpen&&!(0,s.hX)(t)&&("keydown"!==t.type||"ke
1ydown"===t.type&&"enter"===t.action))&&(this.isSelectCustom=!1,this.onChangeEvent(t)),this.isPopupOpen&&!(0,s.hX)(this.selectedLI)&&null!==this.itemData&&(!t||"click"!==t.type)&&this.setScrollPosition(t),"mozilla"!==s.Pw.info.name&&this.targetElement()&&((0,s.uK)(this.targetElement(),{"aria-describedby":""!==this.inputElement.id?this.inputElement.id:this.element.id}),this.targetElement().removeAttribute("aria-live")),!this.isPopupOpen||(0,s.hX)(this.ulElement)||(0,s.hX)(this.ulElement.getElementsByClassName("e-item-focus")[0])?this.isPopupOpen&&!(0,s.hX)(this.ulElement)&&!(0,s.hX)(this.ulElement.getElementsByClassName("e-active")[0])&&(0,s.uK)(this.targetElement(),{"aria-activedescendant":this.ulElement.getElementsByClassName("e-active")[0].id}):(0,s.uK)(this.targetElement(),{"aria-activedescendant":this.ulElement.getElementsByClassName("e-item-focus")[0].id}))},i.prototype.dropdownCompiler=function(e){var t=!1;if("function"!=typeof e&&e)try{t=!!document.querySelectorAll(e).length}catch{t=!1}return t},i.prototype.setValueTemplate=function(){this.isReact&&(this.clearTemplate(["valueTemplate"]),this.valueTempElement&&((0,s.Yo)(this.valueTempElement),this.inputElement.style.display="block",this.valueTempElement=null)),this.valueTempElement||(this.valueTempElement=this.createElement("span",{className:he.value}),this.inputElement.parentElement.insertBefore(this.valueTempElement,this.inputElement),this.inputElement.style.display="none"),this.isReact||(this.valueTempElement.innerHTML="");var t=this.dropdownCompiler(this.valueTemplate),n=(0,s.wE)("function"!=typeof this.valueTemplate&&t?document.querySelector(this.valueTemplate).innerHTML.trim():this.valueTemplate)(this.itemData,this,"valueTemplate",this.valueTemplateId,this.isStringTemplate,null,this.valueTempElement);n&&n.length>0&&(0,s.BC)(n,this.valueTempElement),this.renderReactTemplates()},i.prototype.removeSelection=function(){if(this.list){var e=this.list.querySelectorAll(".e-active");e.length&&((0,s.vy)(e,"e-active"),e[0].removeAttribute("aria-selected"))}},i.prototype.getItemData=function(){var t,n,r,e=this.fields;return(0,s.hX)(t=this.itemData)||(n=(0,s._W)(e.value,t),r=(0,s._W)(e.text,t)),{value:(0,s.hX)(t)||(0,s.b0)(n)?t:n,text:(0,s.hX)(t)||(0,s.b0)(n)?t:r}},i.prototype.onChangeEvent=function(e,t){var n=this,r=this.getItemData(),o=this.isSelectCustom?null:this.activeIndex;if(this.enableVirtualization){var l=this.dataSource instanceof x.M1?this.virtualGroupDataSource:this.dataSource;if(r.value&&l&&l.length>0){var h=l.findIndex(function(p){return!(0,s.hX)(r.value)&&(0,s._W)(n.fields.value,p)===r.value});-1!==h&&(o=h)}}var d=this.allowObjectBinding?t?this.value:this.getDataByValue(r.value):r.value;this.setProperties({index:o,text:r.text?r.text.toString():r.text,value:d},!0),this.detachChangeEvent(e)},i.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},i.prototype.detachChangeEvent=function(e){if(this.isSelected=!1,this.previousValue=this.value,this.activeIndex=this.enableVirtualization?this.getIndexByValue(this.value):this.index,this.typedString=(0,s.hX)(this.text)?"":this.text,!this.initial){var n,t=this.detachChanges(this.itemData);n="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 r={e,item:this.item,itemData:t,previousItem:this.previousSelectedLI,previousItemData:n,isInteracted:!!e,value:this.value,element:this.element,event:e};this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",r)}((0,s.hX)(this.value)||""===this.value)&&"Always"!==this.floatLabelType&&(0,s.vy)([this.inputWrapper.container],"e-valid-input")},i.prototype.setHiddenValue=function(){if((0,s.hX)(this.value))this.hiddenElement.innerHTML="";else{var e=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value;if(this.hiddenElement.querySelector("option"))(t=this.hiddenElement.querySelector("option")).textContent=this.text,t.setAttribute("value",e.toString());else if(!(0,s.hX)(this.hiddenElement)){var t,n=document.createElement("option");n.text=this.text,n.setAttribute("selected",""),this.hiddenElement.appendChild(n),(t=this.hiddenElement.querySelector("option")).setAttribute("value",e.toString())}}},i.prototype.onFilterUp=function(e){if(e.ctrlKey&&86===e.keyCode||!this.isValidKey&&40!==e.ke
1yCode&&38!==e.keyCode)this.isValidKey=!1;else switch(this.isValidKey=!1,this.filterArgs=e,this.firstItem=this.dataSource&&this.dataSource.length>0?this.dataSource[0]:null,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,"autocomplete"===this.getModuleName()&&!(0,s.hX)(this.ulElement)&&!(0,s.hX)(this.ulElement.getElementsByClassName("e-item-focus")[0])&&(0,s.uK)(this.targetElement(),{"aria-activedescendant":this.ulElement.getElementsByClassName("e-item-focus")[0].id}),e.preventDefault();break;case 46:case 8:this.typedString=this.filterInput.value,!this.isPopupOpen&&""!==this.typedString||this.isPopupOpen&&this.queryString.length>0||""===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.isFiltering()&&"combobox"===this.getModuleName()&&(0,s.hX)(this.list)&&(this.getInitialData=!0,this.renderList(),!this.isSecondClick&&!this.isDropDownClick&&this.executeCloneElements()),this.typedString=this.filterInput.value,this.preventAutoFill=!1,this.getInitialData||this.searchLists(e),(this.enableVirtualization&&"autocomplete"!==this.getModuleName()||"autocomplete"===this.getModuleName()&&!(this.dataSource instanceof x.M1)||"autocomplete"===this.getModuleName()&&this.dataSource instanceof x.M1&&0!==this.totalItemCount)&&this.getFilteringSkeletonCount()}},i.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}},i.prototype.removeFillSelection=function(){if(this.isInteracted){var e=this.getSelectionPoints();this.inputElement.setSelectionRange(e.end,e.end)}},i.prototype.getQuery=function(e){var t;if(!this.isCustomFilter&&this.allowFiltering&&this.filterInput){t=e?e.clone():this.query?this.query.clone():new x.XK;
1var n=""===this.typedString?"contains":this.filterType,r=this.typeOfData(this.dataSource).typeof;(this.dataSource instanceof x.M1||"string"!==r)&&"number"!==r?("combobox"!==this.getModuleName()||this.isFiltering()&&"combobox"===this.getModuleName()&&""!==this.typedString)&&t.where(this.fields.text?this.fields.text:"",n,this.typedString,this.ignoreCase,this.ignoreAccent):t.where("",n,this.typedString,this.ignoreCase,this.ignoreAccent)}else t=this.enableVirtualization&&!(0,s.hX)(this.customFilterQuery)?this.customFilterQuery.clone():e?e.clone():this.query?this.query.clone():new x.XK;if(this.enableVirtualization&&0!==this.viewPortInfo.endIndex){var l=this.getTakeValue(),h=!1;if(t)for(var d=0;d<t.queries.length;d++)if("onSkip"===t.queries[d].fn){h=!0;break}var p=0,u=0;if(t&&t.queries.length>0)for(d=0;d<t.queries.length;d++)"onSkip"===t.queries[d].fn&&(u=t.queries[d].e.nos),"onTake"===t.queries[d].fn&&(p=l<=t.queries[d].e.nos?t.queries[d].e.nos:l);if(p<=0&&this.query&&this.query.queries.length>0)for(d=0;d<this.query.queries.length;d++)"onTake"===this.query.queries[d].fn&&(p=l<=this.query.queries[d].e.nos?this.query.queries[d].e.nos:l);if(t&&t.queries.length>0)for(d=0;d<t.queries.length;d++)"onSkip"!==t.queries[d].fn?"onTake"===t.queries[d].fn&&(p=t.queries[d].e.nos<=p?p:t.queries[d].e.nos,t.queries.splice(d,1),--d):(u=t.queries[d].e.nos,t.queries.splice(d,1),h=!1,--d);(this.allowFiltering||!this.isPopupOpen||!h)&&t.skip(u>0?u:this.virtualItemStartIndex),t.take(this.isIncrementalRequest?this.incrementalEndIndex:p>0?p:l),t.requiresCount()}return t},i.prototype.getSelectionPoints=function(){var e=this.inputElement;return{start:Math.abs(e.selectionStart),end:Math.abs(e.selectionEnd)}},i.prototype.performFiltering=function(e){var t=this;this.checkAndResetCache(),this.isRequesting=!1;var n={preventDefaultAction:!1,text:this.filterInput.value,updateData:function(r,o,l){n.cancel||(t.isCustomFilter=!0,t.customFilterQuery=o&&o.clone(),t.filteringAction(r,o,l))},baseEventArgs:e,cancel:!1};this.trigger("filtering",n,function(r){!r.cancel&&!t.isCustomFilter&&!r.preventDefaultAction&&t.filteringAction(t.dataSource,null,t.fields)})},i.prototype.searchLists=function(e){this.isTyped=!0,this.activeIndex=null,this.isListSearched=!0,this.filterInput.parentElement.querySelector("."+he.clearIcon)&&(this.filterInput.parentElement.querySelector("."+he.clearIcon).style.visibility=""===this.filterInput.value?"hidden":"visible"),this.isDataFetched=!1,this.isFiltering()&&(""!==this.typedString&&this.debounceDelay>0?this.debouncedFiltering(e,this.debounceDelay):this.performFiltering(e))},i.prototype.filter=function(e,t,n){this.isCustomFilter=!0,this.filteringAction(e,t,n)},i.prototype.filteringAction=function(e,t,n){if(!(0,s.hX)(this.filterInput)){this.beforePopupOpen=!(!this.isPopupOpen&&"combobox"===this.getModuleName()&&""===this.filterInput.value||this.getInitialData);var r=this.list.classList.contains(P_noData);if(""!==this.filterInput.value.trim()||this.itemTemplate)this.isNotSearchList=!1,t=""===this.filterInput.value.trim()?null:t,this.enableVirtualization&&this.isFiltering()&&this.isTyped&&(this.isPreventScrollAction=!0,this.list.scrollTop=0,this.previousStartIndex=0,this.virtualListInfo=null),this.resetList(e,n,t),"dropdownlist"===this.getModuleName()&&this.list.classList.contains(P_noData)&&(this.popupContentElement.setAttribute("role","status"),this.popupContentElement.setAttribute("id","no-record"),(0,s.uK)(this.filterInputObj.container,{"aria-activedescendant":"no-record"})),this.enableVirtualization&&r&&!this.list.classList.contains(P_noData)&&(this.list.querySelector(".e-virtual-ddl-content")||((o=this.createElement("div",{className:"e-virtual-ddl-content"})).style.cssText=this.getTransformValues(),this.list.appendChild(o).appendChild(this.list.querySelector(".e-list-parent"))),this.list.querySelector(".e-virtual-ddl")||((l=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl"})).style.cssText=this.GetVirtualTrackHeight(),this.list.parentElement.querySelector(".e-dropdownbase").appendChild(l)));else{if(this.actionCompleteData.isUpdated=!1,this.isTyped=!1,!(0,s.hX)(this.actionCompleteData.ulElement)&&!(0,s.hX)(this.actionCompleteData.list)){var o,l;if(this.enableVirtualization&&(this.isFiltering()&&(this.isPreventScrollAction=!0,this.list.scrollTop=0,this.previousStartIndex=0,this.virtualListInfo=null),this.totalItemCount=this.dataSource&&this.dataSource.length?this.dataSource.length:0,this.resetList(e,n,t),r&&!this.list.classList.contains(P_noData)))this.list.querySelector(".e-virtual-ddl-content")||((o=this.createElement("div",{className:"e-virtual-ddl-content"})).style.cssText=this.getTransformValues(),this.list.appendChild(o).appendChild(this.list.querySelector(".e-list-parent"))),this.list.querySelector(".e-virtual-ddl")||((l=this.createElement("div",{id:this.element.i
1d+"_popup",className:"e-virtual-ddl"})).style.cssText=this.GetVirtualTrackHeight(),this.list.parentElement.querySelector(".e-dropdownbase").appendChild(l));this.onActionComplete(this.actionCompleteData.ulElement,this.actionCompleteData.list)}this.isTyped=!0,!(0,s.hX)(this.itemData)&&"dropdownlist"===this.getModuleName()&&(this.focusIndexItem(),this.setScrollPosition()),this.isNotSearchList=!0}this.enableVirtualization&&this.getFilteringSkeletonCount(),this.renderReactTemplates(),this.filterInput&&""===this.filterInput.value&&"combobox"===this.getModuleName()&&this.executeCloneElements()}},i.prototype.setSearchBox=function(e){if(this.isFiltering()){var t=e.querySelector("."+he.filterParent)?e.querySelector("."+he.filterParent):this.createElement("span",{className:he.filterParent});this.filterInput=this.createElement("input",{attrs:{type:"text"},className:he.filterInput}),this.element.parentNode.insertBefore(this.filterInput,this.element);var n=!1;return s.Pw.isDevice&&this.isDeviceFullScreen&&(n=!0),this.filterInputObj=J.pd.createInput({element:this.filterInput,buttons:n?[he.backIcon,he.filterBarClearIcon]:[he.filterBarClearIcon],properties:{placeholder:this.filterBarPlaceholder}},this.createElement),(0,s.hX)(this.cssClass)||(-1!==this.cssClass.split(" ").indexOf("e-outline")?(0,s.iQ)([this.filterInputObj.container],"e-outline"):-1!==this.cssClass.split(" ").indexOf("e-filled")&&(0,s.iQ)([this.filterInputObj.container],"e-filled")),(0,s.BC)([this.filterInputObj.container],t),(0,s.Hs)([t],e),(0,s.uK)(this.filterInput,{"aria-disabled":"false",role:"combobox",autocomplete:"off",autocapitalize:"off",spellcheck:"false"}),this.clearIconElement=this.filterInput.parentElement.querySelector("."+he.clearIcon),!s.Pw.isDevice&&this.clearIconElement&&(s.Jm.add(this.clearIconElement,"click",this.clearText,this),this.clearIconElement.style.visibility="hidden"),this.searchKeyModule=new s.j9(this.filterInput,s.Pw.isDevice?{keyAction:this.mobileKeyActionHandler.bind(this),keyConfigs:this.keyConfigure,eventName:"keydown"}:{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigure,eventName:"keydown"}),s.Jm.add(this.filterInput,"input",this.onInput,this),s.Jm.add(this.filterInput,"keyup",this.onFilterUp,this),s.Jm.add(this.filterInput,"keydown",this.onFilterDown,this),s.Jm.add(this.filterInput,"blur",this.onBlurHandler,this),s.Jm.add(this.filterInput,"paste",this.pasteHandler,this),this.filterInputObj}return cI},i.prototype.onInput=function(e){!(0,s.hX)(e)&&!(0,s.hX)(e.data)&&e.data.length>1&&this.autoFill&&("combobox"===this.getModuleName()||"autocomplete"===this.getModuleName())&&(this.inputElement.value=e.data),this.isValidKey=!0,"combobox"===this.getModuleName()&&this.updateIconState(),s.Pw.isDevice&&"mozilla"===s.Pw.info.name&&(this.typedString=this.filterInput.value,this.preventAutoFill=!0,this.searchLists(e))},i.prototype.pasteHandler=function(e){var t=this;setTimeout(function(){t.typedString=t.filterInput.value,"combobox"===t.getModuleName()&&t.isFiltering()&&(0,s.hX)(t.list)&&t.renderList(),t.searchLists(e)})},i.prototype.onActionFailure=function(e){a.prototype.onActionFailure.call(this,e),this.beforePopupOpen&&this.renderPopup()},i.prototype.getTakeValue=function(){return this.allowFiltering&&"dropdownlist"===this.getModuleName()&&s.Pw.isDevice?Math.round(window.outerHeight/this.listItemHeight):this.itemCount},i.prototype.onActionComplete=function(e,t,n,r){var o=this;if(this.dataSource instanceof x.M1&&!(0,s.hX)(n)&&!this.virtualGroupDataSource&&(this.totalItemCount=n.count),!this.isNotSearchList||this.enableVirtualization){if(this.getInitialData)return this.updateActionCompleteDataValues(e,t),this.enableVirtualization&&this.updateSelectElementData(this.allowFiltering),this.getInitialData=!1,this.isReactTemplateUpdate=!0,this.typedString=this.filterInput.value,void this.searchLists(this.filterArgs);var l=this.itemCount;if(this.isActive||!(0,s.hX)(e)){var h=this.selectedLI?this.selectedLI.cloneNode(!0):null;if(a.prototype.onActionComplete.call(this,e,t,n),this.skeletonCount=0!==this.totalItemCount&&this.totalItemCount<2*this.itemCount&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&this.totalItemCount<=this.itemCount)?0:this.skeletonCount,this.updateSelectElementData(this.allowFiltering),this.isRequested&&!(0,s.hX)(this.searchKeyEvent)&&"keydown"===this.searchKeyEvent.type&&(this.isRequested=!1,this.keyActionHandler(this.searchKeyEvent),this.searchKeyEvent=null),this.isRequested&&!(0,s.hX)(this.searchKeyEvent)&&(this.incrementalSearch(this.searchKeyEvent),this.searchKeyEvent=null),this.enableVirtualization||(this.list.scrollTop=0),(0,s.hX)(e)||(0,s.uK)(e,{id:this.element.i
1d+"_options",role:"listbox","aria-hidden":"false","aria-label":"listbox"}),this.initialRemoteRender){if(this.initial=!0,this.activeIndex=this.index,this.initialRemoteRender=!1,this.value&&this.dataSource instanceof x.M1){var d=(0,s.hX)(this.fields.value)?this.fields.text:this.fields.value,p=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(d,this.value):this.value,u=this.fields.value.split("."),f=t.some(function(y){return(0,s.hX)(y[d])&&u.length>1?o.checkFieldValue(y,u)===p:y[d]===p});this.enableVirtualization&&this.virtualGroupDataSource&&(f=this.virtualGroupDataSource.some(function(y){return(0,s.hX)(y[d])&&u.length>1?o.checkFieldValue(y,u)===p:y[d]===p})),f?this.updateValues():this.dataSource.executeQuery(this.getQuery(this.query).where(new x.mT(d,"equal",p))).then(function(y){y.result.length>0&&(o.enableVirtualization||o.addItem(y.result,t.length)),o.updateValues()})}else this.updateValues();this.initial=!1}else"autocomplete"===this.getModuleName()&&this.value&&this.setInputValue();if("autocomplete"!==this.getModuleName()&&this.isFiltering()&&!this.isTyped){if((!this.actionCompleteData.isUpdated||!this.isCustomFilter&&!this.isFilterFocus||(0,s.hX)(this.itemData)&&this.allowFiltering&&(this.dataSource instanceof x.M1||!(0,s.hX)(this.dataSource)&&!(0,s.hX)(this.dataSource.length)&&0!==this.dataSource.length))&&(this.itemTemplate&&("EJS-COMBOBOX"===this.element.tagName||this.isReact)&&this.allowFiltering?setTimeout(function(){o.updateActionCompleteDataValues(e,t)},0):this.updateActionCompleteDataValues(e,t)),this.isDynamicData){var m=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value;this.itemData=this.getDataByValue(m),this.selectedLI=this.getElementByValue(m),this.isDynamicData=!1}if((this.allowCustom||this.allowFiltering&&!this.isValueInList(t,this.value)&&this.dataSource instanceof x.M1)&&!this.enableVirtualization)this.addNewItem(t,h);else if((this.allowCustom||this.allowFiltering&&this.isValueInList(t,this.value))&&!this.enableVirtualization){var g=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value;!(0,s.hX)(this.value)&&h&&h.getAttribute("data-value")===g.toString()&&this.addNewItem(t,h)}(!(0,s.hX)(this.itemData)||(0,s.hX)(this.itemData)&&this.enableVirtualization)&&(this.getSkeletonCount(),this.skeletonCount=0!==this.totalItemCount&&this.totalItemCount<2*this.itemCount&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&this.totalItemCount<=this.itemCount)?0:this.skeletonCount,this.UpdateSkeleton(),this.focusIndexItem()),this.enableVirtualization&&this.updateActionCompleteDataValues(e,t)}else if(this.enableVirtualization&&"autocomplete"!==this.getModuleName()&&!this.isFiltering()){g=this.getItemData().value,this.activeIndex=this.getIndexByValue(g);var b=this.findListElement(this.list,"li","data-value",g);this.selectedLI=b}else this.enableVirtualization&&"autocomplete"===this.getModuleName()&&(this.activeIndex=this.skeletonCount);this.beforePopupOpen&&(this.renderPopup(n),this.enableVirtualization&&(this.list.querySelector(".e-virtual-list")||(this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll(".e-list-item"))),this.enableVirtualization&&l!==this.itemCount&&this.resetList(this.dataSource,this.fields))}}else this.isNotSearchList=!1},i.prototype.isValueInList=function(e,t){if(Array.isArray(e)){for(var n=0;n<e.length;n++)if(e[n]===t)return!0}else if("object"==typeof e&&null!==e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&e[r]===t)return!0;return!1},i.prototype.checkFieldValue=function(e,t){var n=e;return t.forEach(function(r){n=n[r]}),n},i.prototype.updateActionCompleteDataValues=function(e,t){this.actionCompleteData={ulElement:e.cloneNode(!0),list:t,isUpdated:!0},this.actionData.list!==this.actionCompleteData.list&&this.actionCompleteData.ulElement&&this.actionCompleteData.list&&(this.actionData=this.actionCompleteData)},i.prototype.addNewItem=function(e,t){var n=this;if(!(0,s.hX)(this.itemData)&&!(0,s.hX)(t)){var r=this.getItemData().value;e.some(function(l){return("string"==typeof l||"number"==typeof l||"boolean"==typeof l)&&l===r||(0,s._W)(n.fields.value,l)===r})||this.addItem(this.itemData)}},i.prototype.updateActionCompleteData=function(e,t,n){var r=this;"autocomplete"!==this.getModuleName()&&this.actionCompleteData.ulElement&&(this.itemTemplate&&"EJS-COMBOBOX"===this.element.tagName&&this.allowFiltering?setTimeout(function(){r.actionCompleteDataUpdate(e,t,n)},0):this.actionCompleteDataUpdate(e,t,n))},i.prototype.actionCompleteDataUpdate=function(e,t,n){null!==n?this.actionCompleteData.ulElement.insertBefore(e.cloneNode(!0),this.actionCompleteData.ulElement.childNodes[n]):this.actionCompleteData.ulElement.appendChild(e.cloneNode(!0)),this.isFiltering()&&this.actionCompleteData.list&&this.actionCompleteData.list.indexOf(t)<0&&this.actionCompleteData.list.push(t)}
1,i.prototype.focusIndexItem=function(){var e=this.getItemData().value;this.activeIndex=this.enableVirtualization&&!(0,s.hX)(e)||!this.enableVirtualization?this.getIndexByValue(e):this.activeIndex;var t=this.findListElement(this.list,"li","data-value",e);this.selectedLI=t,this.activeItem(t),this.enableVirtualization&&(0,s.hX)(t)||this.removeFocus()},i.prototype.updateSelection=function(){var e=this.list.querySelector(".e-active");e?(this.setProperties({index:this.getIndexByValue(e.getAttribute("data-value"))}),this.activeIndex=this.index):(this.removeFocus(),this.list.querySelector("."+P_li).classList.add(he.focus))},i.prototype.updateSelectionList=function(){if(!(this.list&&this.list.querySelector(".e-active")||(0,s.hX)(this.value)||"autocomplete"===this.getModuleName())){var t=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value,n=this.findListElement(this.list,"li","data-value",t);n&&n.classList.add("e-active")}},i.prototype.removeFocus=function(){var e=this.list.querySelectorAll("."+he.focus);e&&e.length&&(0,s.vy)(e,he.focus)},i.prototype.renderPopup=function(e){var t=this;this.popupObj&&document.body.contains(this.popupObj.element)?this.refreshPopup():this.trigger("beforeOpen",{cancel:!1},function(r){var o;if(r.cancel)t.beforePopupOpen=!1;else{var l=t.createElement("div",{id:t.element.id+"_popup",className:"e-ddl e-popup "+(null!==t.cssClass?t.cssClass:"")});l.setAttribute("aria-label",t.element.id),l.setAttribute("role","dialog");var h=t.setSearchBox(l);if(t.listContainerHeight=t.allowFiltering&&"dropdownlist"===t.getModuleName()&&s.Pw.isDevice?(0,s.IV)(Math.round(window.outerHeight).toString()+"px"):(0,s.IV)(t.popupHeight),t.headerTemplate&&(t.setHeaderTemplate(l),t.isUpdateHeaderHeight=0!==t.header.offsetHeight),(0,s.BC)([t.list],l),t.footerTemplate&&(t.setFooterTemplate(l),t.isUpdateFooterHeight=0!==t.footer.offsetHeight),document.body.appendChild(l),l.style.top="0px",o=l.clientHeight,t.enableVirtualization&&(t.itemTemplate||t.isAngular)){var d=l.querySelectorAll("li.e-list-item:not(.e-virtual-list)"),p=l.querySelectorAll("li.e-virtual-list"),u=d&&d.length>0?Math.ceil(d[0].getBoundingClientRect().height)+parseInt(window.getComputedStyle(d[0]).marginBottom,10):0;u!==(p&&p.length>0?Math.ceil(p[0].getBoundingClientRect().height)+parseInt(window.getComputedStyle(p[0]).marginBottom,10):0)&&p&&p.length>0&&p.forEach(function(V){V.parentNode.removeChild(V)}),t.listItemHeight=u}if(t.enableVirtualization&&!t.list.classList.contains(P_noData)){if(t.getSkeletonCount(),t.skeletonCount=t.totalItemCount<2*t.itemCount&&(!(t.dataSource instanceof x.M1)||t.dataSource instanceof x.M1&&t.totalItemCount<=t.itemCount)?0:t.skeletonCount,t.list.querySelector(".e-virtual-ddl-content"))t.list.getElementsByClassName("e-virtual-ddl-content")[0].style=t.getTransformValues();else{var m=t.createElement("div",{className:"e-virtual-ddl-content"});m.style.cssText=t.getTransformValues(),t.list.appendChild(m).appendChild(t.list.querySelector(".e-list-parent"))}if(t.UpdateSkeleton(),t.liCollections=t.list.querySelectorAll("."+P_li),t.virtualItemCount=t.itemCount,t.list.querySelector(".e-virtual-ddl"))t.list.getElementsByClassName("e-virtual-ddl")[0].style=t.GetVirtualTrackHeight();else{var g=t.createElement("div",{id:t.element.id+"_popup",className:"e-virtual-ddl"});g.style.cssText=t.GetVirtualTrackHeight(),l.querySelector(".e-dropdownbase").appendChild(g)}}if(l.style.visibility="hidden","auto"!==t.popupHeight){if(t.searchBoxHeight=0,!(0,s.hX)(h.container)&&"combobox"!==t.getModuleName()&&"autocomplete"!==t.getModuleName()&&(t.searchBoxHeight=h.container.parentElement.getBoundingClientRect().height,t.listContainerHeight=(parseInt(t.listContainerHeight,10)-t.searchBoxHeight).toString()+"px"),t.headerTemplate){t.header=t.header?t.header:l.querySelector(".e-ddl-header");var v=Math.round(t.header.getBoundingClientRect().height);t.listContainerHeight=(parseInt(t.listContainerHeight,10)-(v+t.searchBoxHeight)).toString()+"px"}t.footerTemplate&&(t.footer=t.footer?t.footer:l.querySelector(".e-ddl-footer"),v=Math.round(t.footer.getBoundingClientRect().height),t.listContainerHeight=(parseInt(t.listContainerHeight,10)-(v+t.searchBoxHeight)).toString()+"px"),t.list.style.maxHeight=(parseInt(t.listContainerHeight,10)-2).toString()+"px",l.style.maxHeight=(0,s.IV)(t.popupHeight)}else l.style.height="auto";var b=0,y=void 0;if(t.isPreventScrollAction=!0,!(0,s.hX)(t.selectedLI)&&!(0,s.hX)(t.activeIndex)&&t.activeIndex>=0||t.enableVirtualization?t.setScrollPosition():t.list.scrollTop=0,s.Pw.isDevice&&t.isDeviceFullScreen&&!t.allowFiltering&&("dropdownlist"===t.getModuleName()||t.isDropDownClick&&"combobox"===t.getModuleName())){b=t.getOffsetValue(l);var S=t.isEmptyList()?t.list:t.liCollections[0];(0,s.hX)(t.inputElement)||(y=-(parseInt(getComputedStyle(S).textIndent,10)-parseInt(getComputedStyle(t.inputElement).paddingLeft,10)+parseInt(getComputedStyle(t.inputElement.parentElement).borderLeftWidth,10)))}t.createPopup(l,b,y),t.popupContentElement=t.popupObj.element.querySelector(".e-content"),t.getFocusElement(),t.checkCollision(l),s.Pw.isDevice&&(parseInt(t.popupWidth.toString(),10)>window.outerWidth&&!("dropdownlist"===t.getModuleName()&&t.allowFiltering)&&t.popupObj.element.classList.add("e-wide-popup"),t.popupObj.element.classList.add(he.device),("dropdownlist"===t.getModuleName()||"combobox"===t.getModuleName()&&!t.allowFiltering&&t.isDropDownClick)&&(t.popupObj.collision={X:"fit",Y:"fit"}),t.isFilterLayout()&&t.isDeviceFullScreen&&(t.popupObj.element.classList.add(he.mobileFilter),t.popupObj.position={X:0,Y:0},t.popupObj.dataBind(),(0,s.uK)(t.popupObj.element,{style:"left:0px;right:0px;top:0px;bottom:0px;"}),(0,s.iQ)([document.body,t.popupObj.element],he.popupFullScreen),t.setSearchBoxPosition(),t.backIconElement=h.container.querySelector(".e-back-icon"),t.clearIconElement=h.container.querySelector("."+he.clearIcon),s.Jm.add(t.backIconElement,"click",t.clickOnBackIcon,t),s.Jm.add(t.clearIconElement,"click",t.clearText,t))),l.style.visibility="visible",(0,s.iQ)([l],"e-popup-close");for(var _=0,T=t.popupObj.getScrollableParent(t.inputWrapper.container);_<T.length;_++)s.Jm.add(T[_],"scroll",t.scrollHandler,t);(0,s.hX)(t.list)||(t.unWireListEvents(),t.wireListEvents()),t.selectedElementID=t.selectedLI?t.selectedLI.id:null,t.enableVirtualization&&(t.notify("bindScrollEvent",{module:"VirtualScroll",component:t.getModuleName(),enable:t.enableVirtualization}),setTimeout(function(){(t.value||t.list.querySelector(".e-active"))&&(t.updateSelectionList(),t.selectedValueInfo&&t.viewPortInfo&&t.viewPortInfo.offsets.top?t.list.scrollTop=t.viewPortInfo.offsets.top:t.scrollBottom(!0,!0))},5)),(0,s.uK)(t.targetElement(),{"aria-expanded":"true","aria-owns":t.element.i
1d+"_popup","aria-controls":t.element.id}),"dropdownlist"!==t.getModuleName()&&t.list.classList.contains("e-nodata")&&((0,s.uK)(t.targetElement(),{"aria-activedescendant":"no-record"}),t.popupContentElement.setAttribute("role","status"),t.popupContentElement.setAttribute("id","no-record")),t.inputElement.setAttribute("aria-expanded","true"),t.inputElement.setAttribute("aria-controls",t.element.id+"_popup");var w=t.isFiltering()?t.filterInput.parentElement:t.inputWrapper.container;(0,s.iQ)([w],[he.inputFocus]),t.beforePopupOpen=!0,t.trigger("open",{popup:t.popupObj,event:e,cancel:!1,animation:{name:"FadeIn",duration:100}},function(V){V.cancel?(t.beforePopupOpen=!1,t.destroyPopup()):((0,s.hX)(t.inputWrapper)||(0,s.iQ)([t.inputWrapper.container],[he.iconAnimation]),t.renderReactTemplates(),t.isReact&&t.isFiltering()&&t.dataSource instanceof x.M1&&t.list.querySelector("ul")&&!t.isSecondClick&&t.executeCloneElements(),(0,s.hX)(t.popupObj)||(t.popupObj.show(new s.X5(V.animation),1e3===t.zIndex?t.element:null),t.isPopupRender=!0),t.isReact&&setTimeout(function(){if(t.popupHeight&&t.list&&"auto"!==t.popupHeight&&("dropdownlist"!==t.getModuleName()||!t.allowFiltering)){var G="string"==typeof t.popupHeight?parseInt(t.popupHeight,10):t.popupHeight;if(!t.isUpdateHeaderHeight&&t.headerTemplate&&t.header){var W=""===t.list.style.maxHeight?G:parseInt(t.list.style.maxHeight,10);t.list.style.maxHeight=(W-t.header.offsetHeight).toString()+"px",t.isUpdateHeaderHeight=!0}!t.isUpdateFooterHeight&&t.footerTemplate&&t.footer&&(W=""===t.list.style.maxHeight?G:parseInt(t.list.style.maxHeight,10),t.list.style.maxHeight=(W-t.footer.offsetHeight).toString()+"px",t.isUpdateFooterHeight=!0)}},15))}),!t.allowResize||"dropdownlist"===t.getModuleName()&&s.Pw.isDevice&&t.isDeviceFullScreen&&t.allowFiltering||(t.resizer=t.createElement("div",{id:t.element.id+"_resize-popup",className:he.resizeIcon}),t.list&&t.list.parentElement&&(t.list.parentElement.classList.add("e-resize"),"auto"!==t.popupHeight.toString().toLowerCase()&&o>=parseInt(t.popupHeight.toString(),10)-2&&(t.list.parentElement.style.height="100%"),t.list.parentElement.style.paddingBottom="dropdownlist"===t.getModuleName()&&t.allowFiltering&&t.searchBoxHeight?(t.searchBoxHeight+16).toString()+"px":16..toString()+"px",(t.header||t.footer||t.itemTemplate)&&(t.list.parentElement.style.paddingBottom=(parseInt(t.list.parentElement.style.maxHeight,10)-parseInt(t.list.style.maxHeight,10)+16).toString()+"px"),t.list.parentElement.appendChild(t.resizer),t.list.parentElement.style.width=t.resizeWidth+"px",t.list.parentElement.style.height=t.resizeHeight+"px",t.list.parentElement.style.maxHeight=t.resizeHeight+"px",t.list.style.maxHeight=t.resizeHeight+"px"),s.Jm.add(t.resizer,"mousedown",t.startResizing,t),s.Jm.add(t.resizer,"touchstart",t.startResizing,t))}})},i.prototype.checkCollision=function(e){(!s.Pw.isDevice||s.Pw.isDevice&&"dropdownlist"!==this.getModuleName()&&!this.isDropDownClick)&&((0,ae.D$)(e).length>0&&(e.style.marginTop=-parseInt(getComputedStyle(e).marginTop,10)+"px"),this.popupObj.resolveCollision())},i.prototype.getOffsetValue=function(e){var t=getComputedStyle(e),n=parseInt(t.borderTopWidth,10),r=parseInt(t.borderBottomWidth,10);return this.setPopupPosition(n+r)},i.prototype.createPopup=function(e,t,n){var r=this;this.popupObj=new ae.zD(e,{width:this.setWidth(),targetType:"relative",relateTo:this.inputWrapper.container,collision:this.enableRtl?{X:"fit",Y:"flip"}:{X:"flip",Y:"flip"},offsetY:t,enableRtl:this.enableRtl,offsetX:n,position:this.enableRtl?{X:"right",Y:"bottom"}:{X:"left",Y:"bottom"},zIndex:this.zIndex,close:function(){r.isDocumentClick||r.focusDropDown(),r.isReact&&r.clearTemplate(["headerTemplate","footerTemplate"]),r.isNotSearchList=!1,r.isDocumentClick=!1,r.destroyPopup(),r.isFiltering()&&r.actionCompleteData.list&&r.actionCompleteData.list.length>0?(r.isActive=!0,r.isReactTemplateUpdate&&r.isReact&&r.itemTemplate&&!r.enableVirtualization&&(r.actionCompleteData.ulElement=r.renderItems(r.actionCompleteData.list,r.fields),r.isReactTemplateUpdate=!1),r.enableVirtualization?r.onActionComplete(r.ulElement,r.listData,null,!0):r.onActionComplete(r.actionCompleteData.ulElement,r.actionCompleteData.list,null,!0)):r.enableVirtualization&&r.focusIndexItem()},open:function(){s.Jm.add(document,"mousedown",r.onDocumentClick,r),r.isPopupOpen=!0;var o=r.actionCompleteData&&r.actionCompleteData.ulElement&&r.actionCompleteData.ulElement.querySelector("li"),l=r.list.querySelector("ul li");(0,s.hX)(r.ulElement)||(0,s.hX)(r.ulElement.getElementsByClassName("e-item-focus")[0])?!(0,s.hX)(r.ulElement)&&!(0,s.hX)(r.ulElement.getElementsByClassName("e-active")[0])&&(0,s.uK)(r.targetElement(),{"aria-activedescendant":r.ulElement.getElementsByClassName("e-active")[0].id}):(0,s.uK)(r.targetElement(),{"aria-activedescendant":r.ulElement.getElementsByClassName("e-item-focus")[0].id}),r.isFiltering()&&r.itemTemplate&&r.element.tagName===r.getNgDirective()&&o&&l&&o.textContent!==l.textContent&&"EJS-COMBOBOX"!==r.element.tagName&&r.cloneElements(),r.isFilterLayout()&&((0,s.vy)([r.inputWrapper.container],[he.inputFocus]),r.isFilterFocus=!0,r.filterInput.focus(),r.inputWrapper.clearButton&&(0,s.iQ)([r.inputWrapper.clearButton],he.clearIconHide)),r.activeStateChange()},targetExitViewport:function(){s.Pw.isDevice||r.hidePopup()}})},i.prototype.isEmptyList=function(){return!(0,s.hX)(this.liCollections)&&0===this.liCollections.length},i.prototype.getFocusElement=function(){},i.prototype.isFilterLayout=function(){return"dropdownlist"===this.getModuleName()&&this.allowFiltering},i.prototype.scrollHandler=function(){s.Pw.isDevice&&("dropdownlist"===this.getModuleName()&&!this.isFilterLayout()||"combobox"===this.getModuleName()&&!this.allowFiltering&&this.isDropDownClick)&&this.element&&!this.isElementInViewport(this.element)&&this.hidePopup()},i.prototype.isElementInViewport=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth},i.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 t=this.filterInput.parentElement.querySelector("."+he.clearIcon);(0,s.Yo)(this.filterInput),t.parentElement.insertBefore(this.filterInput,t)},i.prototype.setPopupPosition=function(e){var t,n=e,r=this.list.querySelector("."+he.focu
1s)||this.selectedLI,o=this.isEmptyList()?this.list:this.liCollections[0],l=this.isEmptyList()?this.list:this.liCollections[this.getItems().length-1],h=o.getBoundingClientRect().height;this.listItemHeight=h+parseInt(window.getComputedStyle(o).marginBottom,10);var d=this.list.offsetHeight/2,p=(0,s.hX)(r)?o.offsetTop:r.offsetTop;if(l.offsetTop-d<p&&!(0,s.hX)(this.liCollections)&&this.liCollections.length>0&&!(0,s.hX)(r)){var f=this.list.offsetHeight/h,m=parseInt(getComputedStyle(this.list).paddingBottom,10);t=(f-(this.liCollections.length-this.activeIndex))*h-n+m,this.list.scrollTop=r.offsetTop}else p>d&&!this.enableVirtualization?(t=d-h/2,this.list.scrollTop=p-d+h/2):t=p;return-(t=t+h+n-(h-this.inputWrapper.container.offsetHeight)/2)},i.prototype.setWidth=function(){var e=(0,s.IV)(this.popupWidth);if(e.indexOf("%")>-1&&(e=(this.inputWrapper.container.offsetWidth*parseFloat(e)/100).toString()+"px"),s.Pw.isDevice&&e.indexOf("px")>-1&&!this.allowFiltering&&("dropdownlist"===this.getModuleName()||this.isDropDownClick&&"combobox"===this.getModuleName())){var n=this.isEmptyList()?this.list:this.liCollections[0];e=parseInt(e,10)+2*(parseInt(getComputedStyle(n).textIndent,10)-parseInt(getComputedStyle(this.inputElement).paddingLeft,10)+parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth,10))+"px"}return e},i.prototype.scrollBottom=function(e,t,n){var r=this;if(void 0===t&&(t=!1),void 0===n&&(n=null),(0,s.hX)(this.selectedLI)&&this.enableVirtualization&&(this.selectedLI=this.list.querySelector("."+P_li),!(0,s.hX)(this.selectedLI)&&this.selectedLI.classList.contains("e-virtual-list")&&(this.selectedLI=this.liCollections[this.skeletonCount])),!(0,s.hX)(this.selectedLI)){var o=this.selectedLI&&!isNaN(parseInt(window.getComputedStyle(this.selectedLI).marginBottom,10))?parseInt(window.getComputedStyle(this.selectedLI).marginBottom,10):0;this.isUpwardScrolling=!1;var l=this.list.querySelectorAll(".e-virtual-list").length,h=this.list.querySelector("li:last-of-type")?this.list.querySelector("li:last-of-type").getAttribute("data-value"):null,d=this.virtualListInfo&&this.virtualListInfo.startIndex?this.selectedLI.offsetTop+this.virtualListInfo.startIndex*(this.selectedLI.offsetHeight+o):this.selectedLI.offsetTop,p=this.list.offsetHeight,u=d-l*(this.selectedLI.offsetHeight+o)+(this.selectedLI.offsetHeight+o)-this.list.scrollTop,f=this.list.scrollTop+u-p,m=!1;f=e?f+2*parseInt(getComputedStyle(this.list).paddingTop,10):f+parseInt(getComputedStyle(this.list).paddingTop,10);var g=d-l*(this.selectedLI.offsetHeight+o)+(this.selectedLI.offsetHeight+o)-this.list.scrollTop;if(g=this.fields.groupBy&&!(0,s.hX)(this.fixedHeaderElement)?g-this.fixedHeaderElement.offsetHeight:g,0!==this.activeIndex||this.enableVirtualization){if(u>p||!(g>0&&this.list.offsetHeight>g)){var v=this.selectedLI?this.selectedLI.getAttribute("data-value"):null,b="pageDown"===n?this.getPageCount()-2:1;!this.enableVirtualization||this.isKeyBoardAction||t?this.isKeyBoardAction&&this.enableVirtualization&&h&&v===h&&"end"!==n&&!this.isVirtualScrolling?(this.isPreventKeyAction=!0,this.enableVirtualization&&this.itemTemplate?this.list.scrollTop+=f:(this.enableVirtualization&&(b="pageDown"===n?this.getPageCount()+1:b),this.list.scrollTop+=(this.selectedLI.offsetHeight+o)*b),this.isPreventKeyAction=!this.IsScrollerAtEnd()&&this.isPreventKeyAction,this.isKeyBoardAction=!1,this.isPreventScrollAction=!1):this.enableVirtualization&&"end"===n?(this.isPreventKeyAction=!1,this.isKeyBoardAction=!1,this.isPreventScrollAction=!1,this.list.scrollTop=this.list.scrollHeight):("pageDown"===n&&this.enableVirtualization&&!this.isVirtualScrolling&&(this.isPreventKeyAction=!1,this.isKeyBoardAction=!1,this.isPreventScrollAction=!1),this.list.scrollTop=f):this.list.scrollTop=this.virtualListInfo&&this.virtualListInfo.startIndex?e&&this.virtualListInfo.startIndex?this.virtualListInfo.startIndex*this.listItemHeight+2*this.listItemHeight:this.virtualListInfo.startIndex*this.listItemHeight:0,m=this.isKeyBoardAction}}else this.list.scrollTop=0,m=this.isKeyBoardAction;this.isKeyBoardAction=m,this.enableVirtualization&&this.fields.groupBy&&this.fixedHeaderElement&&"down"===n&&setTimeout(function(){r.scrollStop(null,!0)},100)}},i.prototype.scrollTop=function(e){if(void 0===e&&(e=null),!(0,s.hX)(this.selectedLI)){var t=this.selectedLI&&!isNaN(parseInt(window.getComputedStyle(this.selectedLI).marginBottom,10))?parseInt(window.getComputedStyle(this.selectedLI).marginBottom,10):0,n=this.list.querySelectorAll(".e-virtual-list").length,r=this.virtualListInfo&&this.virtualListInfo.startIndex?this.selectedLI.offsetTop+this.virtualListInfo.startIndex*(this.selectedLI.offsetHeight+t):this.selectedLI.offsetTop,o=r-n*(this.selectedLI.offsetHeight+t)-this.list.scrollTop,l=this.list.querySelector("li.e-list-item:not(.e-virtual-list)")?this.list.querySelector("li.e-list-item:not(.e-virtual-list)").getAttribute("data-value"):null;o=this.fields.groupBy&&!(0,s.hX)(this.fixedHeaderElement)?o-this.fixedHeaderElement.offsetHeight:o;var h=r-n*(this.selectedLI.offsetHeight+t)+(this.selectedLI.offsetHeight+t)-this.list.scrollTop,d=this.enableVirtualization&&"autocomplete"===this.getModuleName()&&o<=0;if(0!==this.activeIndex||this.enableVirtualization)if(o<0||d){var p=this.selectedLI?this.selectedLI.getAttribute("data-value"):null,u="pageUp"===e?this.getPageCount()-2:1;this.enableVirtualization&&(u="pageUp"===e?this.getPageCount():u),this.enableVirtualization&&this.isKeyBoardAction&&l&&p===l&&"home"!==e&&!this.isVirtualScrolling?(this.isUpwardScrolling=!0,this.isPreventKe
1yAction=!0,this.list.scrollTop-=(this.selectedLI.offsetHeight+t)*u,this.isPreventKeyAction=0!==this.list.scrollTop&&this.isPreventKeyAction,this.isKeyBoardAction=!1,this.isPreventScrollAction=!1):this.enableVirtualization&&"home"===e?(this.isPreventScrollAction=!1,this.isPreventKeyAction=!0,this.isKeyBoardAction=!1,this.list.scrollTo(0,0)):("pageUp"===e&&this.enableVirtualization&&!this.isVirtualScrolling&&(this.isPreventKeyAction=!1,this.isKeyBoardAction=!1,this.isPreventScrollAction=!1),this.list.scrollTop=this.list.scrollTop+o)}else h>0&&this.list.offsetHeight>h||(this.list.scrollTop=this.selectedLI.offsetTop-(this.fields.groupBy&&!(0,s.hX)(this.fixedHeaderElement)?this.fixedHeaderElement.offsetHeight:0));else this.list.scrollTop=0}},i.prototype.IsScrollerAtEnd=function(){return this.list&&this.list.scrollTop+this.list.clientHeight>=this.list.scrollHeight},i.prototype.isEditTextBox=function(){return!1},i.prototype.isFiltering=function(){return this.allowFiltering},i.prototype.isPopupButton=function(){return!0},i.prototype.setScrollPosition=function(e){if(this.isPreventScrollAction=!0,(0,s.hX)(e))this.scrollBottom(!0);else switch(e.action){case"pageDown":case"down":case"end":this.isKeyBoardAction=!0,this.scrollBottom(!1,!1,e.action);break;default:this.isKeyBoardAction="up"===e.action||"pageUp"===e.action||"open"===e.action,this.scrollTop(e.action)}this.isKeyBoardAction=!1},i.prototype.clearText=function(){this.filterInput.value=this.typedString="",this.searchLists(null),this.enableVirtualization&&(this.list.scrollTop=0,this.totalItemCount=this.dataCount=this.dataSource&&this.dataSource.length?this.dataSource.length:0,this.list.getElementsByClassName("e-virtual-ddl")[0]&&(this.list.getElementsByClassName("e-virtual-ddl")[0].style=this.GetVirtualTrackHeight()),this.getSkeletonCount(),this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll(".e-list-item"),this.list.getElementsByClassName("e-virtual-ddl-content")[0]&&(this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues()))},i.prototype.setEleWidth=function(e){(0,s.hX)(e)||("number"==typeof e?this.inputWrapper.container.style.width=(0,s.IV)(e):"string"==typeof e&&(this.inputWrapper.container.style.width=e.match(/px|%|em/)?e:(0,s.IV)(e)))},i.prototype.closePopup=function(e,t){var n=this,r=!(0,s.hX)(this.filterInput)&&!(0,s.hX)(this.filterInput.value)&&""!==this.filterInput.value;if(this.getModuleName(),this.isTyped=!1,this.isVirtualTrackHeight=!1,this.popupObj&&document.body.contains(this.popupObj.element)&&this.beforePopupOpen){this.keyboardEvent=null,s.Jm.remove(document,"mousedown",this.onDocumentClick),this.isActive=!1,this.isDropDownClick=!1,this.preventAutoFill=!1;for(var h=0,d=this.popupObj.getScrollableParent(this.inputWrapper.container);h<d.length;h++)s.Jm.remove(d[h],"scroll",this.scrollHandler);s.Pw.isDevice&&this.isFilterLayout()&&this.isDeviceFullScreen&&(0,s.vy)([document.body,this.popupObj.element],he.popupFullScreen),this.isFilterLayout()&&(s.Pw.isDevice||(this.searchKeyModule.destroy(),this.clearIconElement&&s.Jm.remove(this.clearIconElement,"click",this.clearText)),this.backIconElement&&(s.Jm.remove(this.backIconElement,"click",this.clickOnBackIcon),s.Jm.remove(this.clearIconElement,"click",this.clearText)),(0,s.hX)(this.filterInput)||(s.Jm.remove(this.filterInput,"input",this.onInput),s.Jm.remove(this.filterInput,"keyup",this.onFilterUp),s.Jm.remove(this.filterInput,"keydown",this.onFilterDown),s.Jm.remove(this.filterInput,"blur",this.onBlurHandler),s.Jm.remove(this.filterInput,"paste",this.pasteHandler)),this.allowFiltering&&"dropdownlist"===this.getModuleName()&&(this.filterInput.removeAttribute("aria-activedescendant"),this.filterInput.removeAttribute("aria-disabled"),this.filterInput.removeAttribute("role"),this.filterInput.removeAttribute("autocomplete"),this.filterInput.removeAttribute("autocapitalize"),this.filterInput.removeAttribute("spellcheck")),this.filterInput=null),(0,s.uK)(this.targetElement(),{"aria-expanded":"false"}),this.inputElement.setAttribute("aria-expanded","false"),this.targetElement().removeAttribute("aria-owns"),this.targetElement().removeAttribute("aria-activedescendant"),this.inputWrapper.container.classList.remove(he.iconAnimation),this.isFiltering()&&(this.actionCompleteData.isUpdated=!1),this.enableVirtualization&&(null==this.value||this.isTyped?(this.viewPortInfo.endIndex=this.viewPortInfo&&this.viewPortInfo.endIndex>0?this.viewPortInfo.endIndex:this.itemCount,("autocomplete"===this.getModuleName()||"dropdownlist"===this.getModuleName()&&!(0,s.hX)(this.typedString)&&""!==this.typedString||"combobox"===this.getModuleName()&&this.allowFiltering&&!(0,s.hX)(this.typedString)&&""!==this.typedString)&&this.checkAndResetCache()):"autocomplete"===this.getModuleName()&&this.checkAndResetCache(),("dropdownlist"===this.getModuleName()||"combobox"===this.getModuleName())&&0!==this.skeletonCount&&this.get
1SkeletonCount(!0)),this.beforePopupOpen=!1;var g,m={popup:this.popupObj,cancel:!1,animation:{name:"FadeOut",duration:100,delay:e||0},event:t||null};this.trigger("close",m,function(v){if("dropdownlist"===n.getModuleName()&&J.pd.destroy({element:n.filterInput,floatLabelType:n.floatLabelType,properties:{placeholder:n.filterBarPlaceholder},buttons:n.clearIconElement},n.clearIconElement),n.filterInputObj=null,!(0,s.hX)(n.popupObj)&&!(0,s.hX)(n.popupObj.element.querySelector(".e-fixed-head"))){var b=n.popupObj.element.querySelector(".e-fixed-head");b.parentNode.removeChild(b),n.fixedHeaderElement=null}v.cancel||("autocomplete"===n.getModuleName()&&n.rippleFun(),n.isPopupOpen?(n.isPopupRender=!1,n.popupObj.hide(new s.X5(v.animation))):n.destroyPopup())}),s.Pw.isDevice&&!m.cancel&&this.popupObj.element.classList.contains("e-wide-popup")&&this.popupObj.element.classList.remove("e-wide-popup"),g=this.dataSource instanceof x.M1?this.virtualGroupDataSource&&this.virtualGroupDataSource.length?this.virtualGroupDataSource.length:0:this.dataSource&&this.dataSource.length?this.dataSource.length:0,this.customFilterQuery=null,this.enableVirtualization&&this.isFiltering()&&r&&this.totalItemCount!==g&&(this.updateInitialData(),this.checkAndResetCache())}},i.prototype.updateInitialData=function(){var e=this.selectData;if(!(0,s.hX)(e)){var t=this.renderItems(e,this.fields);if(this.list.scrollTop=0,this.virtualListInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:this.itemCount},"combobox"===this.getModuleName()&&(this.typedString=""),this.previousStartIndex=0,this.previousEndIndex=0,this.dataSource instanceof x.M1?this.remoteDataCount>=0?this.totalItemCount=this.dataCount=this.remoteDataCount:this.resetList(this.dataSource):this.totalItemCount=this.dataCount=this.dataSource&&this.dataSource.length?this.dataSource.length:0,this.list.getElementsByClassName("e-virtual-ddl")[0])this.list.getElementsByClassName("e-virtual-ddl")[0].style=this.GetVirtualTrackHeight();else if(!this.list.querySelector(".e-virtual-ddl")&&this.list.parentElement){var n=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl"});n.style.cssText=this.GetVirtualTrackHeight(),this.list.parentElement.querySelector(".e-dropdownbase").appendChild(n)}"autocomplete"!==this.getModuleName()&&0!==this.totalItemCount&&this.totalItemCount>2*this.itemCount&&this.getSkeletonCount(),this.UpdateSkeleton(),this.listData=e,this.updateActionCompleteDataValues(t,e),this.liCollections=this.list.querySelectorAll(".e-list-item"),this.list.getElementsByClassName("e-virtual-ddl-content")[0]&&(this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues())}},i.prototype.destroyPopup=function(){this.isPopupOpen=!1,this.isFilterFocus=!1,this.inputElement.removeAttribute("aria-controls"),this.popupObj&&(this.resizer&&(s.Jm.remove(this.resizer,"mousedown",this.startResizing),s.Jm.remove(this.resizer,"touchstart",this.startResizing)),this.popupObj.destroy(),(0,s.Yo)(this.popupObj.element))},i.prototype.clickOnBackIcon=function(){this.hidePopup(),this.focusIn()},i.prototype.render=function(){this.preselectedIndex=(0,s.hX)(this.index)?null:this.index,"INPUT"===this.element.tagName?(this.inputElement=this.element,(0,s.hX)(this.inputElement.getAttribute("role"))&&this.inputElement.setAttribute("role","combobox"),(0,s.hX)(this.inputElement.getAttribute("type"))&&this.inputElement.setAttribute("type","text"),this.inputElement.setAttribute("aria-expanded","false")):(this.inputElement=this.createElement("input",{attrs:{role:"combobox",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;!(0,s.hX)(this.cssClass)&&""!==this.cssClass&&(e=this.cssClass.replace(/\s+/g," ").trim()),!(0,s.hX)((0,s.kp)(this.element,"fieldset"))&&(0,s.kp)(this.element,"fieldset").disabled&&(this.enabled=!1),this.inputWrapper=J.pd.createInput({element:this.inputElement,buttons:this.isPopupButton()?[he.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:he.hiddenElement}}),(0,s.Hs)([this.hiddenElement],this.inputWrapper.container),this.hiddenElement.hasAttribute("aria-label")||this.hiddenElement.setAttribute("aria-label",this.getModuleName()),this.validationAttribute(this.element,this.hiddenElement),this.setReadOnly(),this.setFields(),this.inputWrapper.container.style.width=(0,s.IV)(this.width),this.inputWrapper.container.classList.add("e-ddl"),"Never"!==this.floatLabelType&&J.pd.calculateWidth(this.inputElement,this.inputWrapper.container),!(0,s.hX)(this.inputWrapper.buttons[0])&&this.inputWrapper.container.getElementsByClassName("e-float-text-content")[0]&&"Never"!==this.floatLabelType&&this.inputWrapper.container.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon"),this.wireEvent(),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.removeAttribute("tabindex");var t=this.element.getAttribute("id")?this.element.getAttribute("id"):(0,s.Lz)("ej2_dropdownlist");
1if(this.element.id=t,this.hiddenElement.id=t+"_hidden",this.targetElement().setAttribute("tabindex",this.tabIndex),"autocomplete"!==this.getModuleName()&&"combobox"!==this.getModuleName()||this.readonly?"dropdownlist"===this.getModuleName()&&(this.targetElement().hasAttribute("aria-label")||(0,s.uK)(this.targetElement(),{"aria-label":this.getModuleName()}),this.inputElement.hasAttribute("aria-label")||this.inputElement.setAttribute("aria-label",this.getModuleName()),this.inputElement.setAttribute("aria-expanded","false")):this.inputElement.hasAttribute("aria-label")||this.inputElement.setAttribute("aria-label",this.getModuleName()),(0,s.uK)(this.targetElement(),this.getAriaAttributes()),this.updateDataAttribute(this.htmlAttributes),this.setHTMLAttributes(),this.targetElement()===this.inputElement&&this.inputElement.removeAttribute("aria-labelledby"),null!==this.value||null!==this.activeIndex||null!==this.text)this.enableVirtualization&&(this.listItemHeight=this.getListHeight(),this.getSkeletonCount(),this.updateVirtualizationProperties(this.itemCount,this.allowFiltering),null!==this.index&&(this.activeIndex=this.index+this.skeletonCount)),this.initValue(),this.selectedValueInfo=this.viewPortInfo,this.enableVirtualization&&(this.activeIndex=this.activeIndex+this.skeletonCount);else if("SELECT"===this.element.tagName&&this.element.options[0]){var n=this.element;this.value=this.allowObjectBinding?this.getDataByValue(n.options[n.selectedIndex].value):n.options[n.selectedIndex].value,this.text=(0,s.hX)(this.value)?null:n.options[n.selectedIndex].textContent,this.initValue()}this.setEnabled(),this.preventTabIndex(this.element),this.enabled||(this.targetElement().tabIndex=-1),this.initial=!1,this.element.style.opacity="",this.inputElement.onselect=function(o){o.stopImmediatePropagation()},this.inputElement.onchange=function(o){o.stopImmediatePropagation()},this.element.hasAttribute("autofocus")&&this.focusIn(),(0,s.hX)(this.text)||this.inputElement.setAttribute("value",this.text),this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false");var r=this.inputWrapper.container.getElementsByClassName("e-float-text")[0];!(0,s.hX)(this.element.id)&&""!==this.element.id&&!(0,s.hX)(r)&&(r.id="label_"+this.element.id.replace(/ /g,"_"),(0,s.uK)(this.inputElement,{"aria-labelledby":r.id})),this.renderComplete(),this.listItemHeight=this.getListHeight(),this.getSkeletonCount(),this.enableVirtualization&&this.updateVirtualizationProperties(this.itemCount,this.allowFiltering),this.viewPortInfo.startIndex=this.virtualItemStartIndex=0,this.viewPortInfo.endIndex=this.virtualItemEndIndex=this.viewPortInfo.startIndex>0?this.viewPortInfo.endIndex:this.itemCount},i.prototype.getListHeight=function(){var e=this.createElement("div",{className:"e-dropdownbase"}),t=this.createElement("li",{className:"e-list-item"}),n=(0,s.IV)(this.popupHeight);e.style.height=parseInt(n,10).toString()+"px",e.appendChild(t),document.body.appendChild(e),this.virtualListHeight=e.getBoundingClientRect().height;var r=Math.ceil(t.getBoundingClientRect().height)+parseInt(window.getComputedStyle(t).marginBottom,10);return e.remove(),r},i.prototype.setFooterTemplate=function(e){this.footer?this.isReact&&"function"==typeof this.footerTemplate?this.clearTemplate(["footerTemplate"]):this.footer.innerHTML="":(this.footer=this.createElement("div"),(0,s.iQ)([this.footer],he.footer));var n=this.dropdownCompiler(this.footerTemplate),r=(0,s.wE)("function"!=typeof this.footerTemplate&&n?(0,s.Lt)(this.footerTemplate,document).innerHTML.trim():this.footerTemplate)({},this,"footerTemplate",this.footerTemplateId,this.isStringTemplate,null,this.footer);r&&r.length>0&&(0,s.BC)(r,this.footer),(0,s.BC)([this.footer],e)},i.prototype.setHeaderTemplate=function(e){this.header?this.header.innerHTML="":(this.header=this.createElement("div"),(0,s.iQ)([this.header],he.header));var n=this.dropdownCompiler(this.headerTemplate),r=(0,s.wE)("function"!=typeof this.headerTemplate&&n?(0,s.Lt)(this.headerTemplate,document).innerHTML.trim():this.headerTemplate)({},this,"headerTemplate",this.headerTemplateId,this.isStringTemplate,null,this.header);r&&r.length&&(0,s.BC)(r,this.header);var o=e.querySelector("div.e-content");e.insertBefore(this.header,o)},i.prototype.setEnabled=function(){this.element.setAttribute("aria-disabled",this.enabled?"false":"true")},i.prototype.setOldText=function(e){this.text=e},i.prototype.setOldValue=function(e){this.value=e}
1,i.prototype.refreshPopup=function(){!(0,s.hX)(this.popupObj)&&document.body.contains(this.popupObj.element)&&(this.allowFiltering&&(!s.Pw.isDevice||!this.isFilterLayout())||"autocomplete"===this.getModuleName())&&((0,s.vy)([this.popupObj.element],"e-popup-close"),this.popupObj.refreshPosition(this.inputWrapper.container),this.popupObj.resolveCollision())},i.prototype.checkData=function(e){e.dataSource&&!(0,s.hX)(Object.keys(e.dataSource))&&this.itemTemplate&&this.allowFiltering&&!(this.isListSearched&&e.dataSource instanceof x.M1)&&(this.list&&!this.isReact?this.list.innerHTML="":this.list=null,this.actionCompleteData={ulElement:null,list:null,isUpdated:!1}),this.isListSearched=!1;var t=-1!==Object.keys(e).indexOf("value")&&(0,s.hX)(e.value),n=-1!==Object.keys(e).indexOf("text")&&(0,s.hX)(e.text);"autocomplete"!==this.getModuleName()&&this.allowFiltering&&(t||n)&&(this.itemData=null),this.allowFiltering&&e.dataSource&&!(0,s.hX)(Object.keys(e.dataSource))?(this.actionCompleteData={ulElement:null,list:null,isUpdated:!1},this.actionData=this.actionCompleteData):this.allowFiltering&&e.query&&!(0,s.hX)(Object.keys(e.query))&&(this.actionCompleteData="combobox"===this.getModuleName()?{ulElement:null,list:null,isUpdated:!1}:this.actionCompleteData,this.actionData=this.actionCompleteData)},i.prototype.updateDataSource=function(e,t){(""!==this.inputElement.value||!(0,s.hX)(e)&&((0,s.hX)(e.dataSource)||!(e.dataSource instanceof x.M1)&&0===e.dataSource.length))&&this.clearAll(null,e),this.fields.groupBy&&e.fields&&!this.isGroupChecking&&this.list&&(s.Jm.remove(this.list,"scroll",this.setFloatingHeader),s.Jm.add(this.list,"scroll",this.setFloatingHeader,this)),(!(!(0,s.hX)(e)&&((0,s.hX)(e.dataSource)||!(e.dataSource instanceof x.M1)&&0===e.dataSource.length))||e.dataSource instanceof x.M1||!(0,s.hX)(e)&&Array.isArray(e.dataSource)&&!(0,s.hX)(t)&&Array.isArray(t.dataSource)&&e.dataSource.length!==t.dataSource.length)&&(this.typedString="",this.resetList(this.dataSource)),!this.isCustomFilter&&!this.isFilterFocus&&document.activeElement!==this.filterInput&&this.checkCustomValue()},i.prototype.checkCustomValue=function(){var e=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value;this.itemData=this.getDataByValue(e);var t=this.getItemData(),n=this.allowObjectBinding?this.itemData:t.value,r=(0,s.hX)(n)?null:this.index;(0,s.hX)(r)&&e===n||this.isAngular?this.setProperties({text:t.text?t.text.toString():t.text,value:n}):this.setProperties({text:t.text?t.text.toString():t.text,index:r,value:n})},i.prototype.updateInputFields=function(){"dropdownlist"===this.getModuleName()&&J.pd.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton)},i.prototype.onPropertyChanged=function(e,t){var n=this;!(0,s.hX)(e.dataSource)&&!this.isTouched&&(0,s.hX)(e.value)&&(0,s.hX)(e.index)&&!(0,s.hX)(this.preselectedIndex)&&!(0,s.hX)(this.index)&&(e.index=this.index),(!(0,s.hX)(e.value)||!(0,s.hX)(e.index))&&(this.isTouched=!0),"dropdownlist"===this.getModuleName()&&(this.checkData(e),this.setUpdateInitial(["fields","query","dataSource"],e));for(var r=function(u){switch(u){case"query":case"dataSource":o.getSkeletonCount(),o.checkAndResetCache();break;case"htmlAttributes":o.setHTMLAttributes();break;case"width":o.setEleWidth(e.width),J.pd.calculateWidth(o.inputElement,o.inputWrapper.container);break;case"placeholder":J.pd.setPlaceholder(e.placeholder,o.inputElement);break;case"filterBarPlaceholder":o.filterInput&&J.pd.setPlaceholder(e.filterBarPlaceholder,o.filterInput);break;case"readonly":"dropdownlist"!==o.getModuleName()&&J.pd.setReadonly(e.readonly,o.inputElement),o.setReadOnly();break;case"cssClass":o.setCssClass(e.cssClass,t.cssClass),J.pd.calculateWidth(o.inputElement,o.inputWrapper.container);break;case"enableRtl":o.setEnableRtl();break;case"enabled":o.setEnable();break;case"text":if(o.fields.disabled&&(e.text=e.text&&!o.isDisabledItemByIndex(o.getIndexByValue(o.getValueByText(e.text)))?e.text:null),null===e.text){o.clearAll();break}
1if(o.enableVirtualization){o.updateValues(),o.updateInputFields(),o.notify("setCurrentViewDataAsync",{module:"VirtualScroll"});break}if(o.list||(o.dataSource instanceof x.M1&&(o.initialRemoteRender=!0),o.renderList()),!o.initialRemoteRender){var f=o.getElementByText(e.text);if(!o.checkValidLi(f))if(o.liCollections&&100===o.liCollections.length&&"autocomplete"===o.getModuleName()&&o.listData.length>100)o.setSelectionData(e.text,t.text,"text");else if(e.text&&o.dataSource instanceof x.M1){var m=o.getItems().length,g=(0,s.hX)(o.fields.text)?o.fields.value:o.fields.text;o.typedString="",o.dataSource.executeQuery(o.getQuery(o.query).where(new x.mT(g,"equal",e.text))).then(function(T){T.result.length>0?(n.addItem(T.result,m),n.updateValues()):n.setOldText(t.text)})}else"autocomplete"===o.getModuleName()?o.setInputValue(e,t):o.setOldText(t.text);o.updateInputFields()}break;case"value":if(o.fields.disabled&&(e.value=null==e.value||o.isDisableItemValue(e.value)?null:e.value),null===e.value){o.clearAll();break}if(o.allowObjectBinding&&!(0,s.hX)(e.value)&&!(0,s.hX)(t.value)&&o.isObjectInArray(e.value,[t.value]))return{value:void 0};if(o.enableVirtualization){o.updateValues(),o.updateInputFields(),o.notify("setCurrentViewDataAsync",{module:"VirtualScroll"}),o.preventChange=o.isAngular&&o.preventChange?!o.preventChange:o.preventChange;break}if(o.notify("beforeValueChange",{newProp:e}),o.list||(o.dataSource instanceof x.M1&&(o.initialRemoteRender=!0),o.renderList()),!o.initialRemoteRender){var v=o.allowObjectBinding&&!(0,s.hX)(e.value)?(0,s._W)(o.fields.value?o.fields.value:"",e.value):e.value,b=o.getElementByValue(v);if(!o.checkValidLi(b))if(o.liCollections&&100===o.liCollections.length&&"autocomplete"===o.getModuleName()&&o.listData.length>100)o.setSelectionData(e.value,t.value,"value");else if(e.value&&o.dataSource instanceof x.M1){var y=o.getItems().length;g=(0,s.hX)(o.fields.value)?o.fields.text:o.fields.value,o.typedString="";var S=o.allowObjectBinding&&!(0,s.hX)(e.value)?(0,s._W)(g,e.value):e.value;o.dataSource.executeQuery(o.getQuery(o.query).where(new x.mT(g,"equal",S))).then(function(I){I.result.length>0?(n.addItem(I.result,y),n.updateValues()):n.setOldValue(t.value)})}else"autocomplete"===o.getModuleName()?o.setInputValue(e,t):o.setOldValue(t.value);o.updateInputFields(),o.preventChange=o.isAngular&&o.preventChange?!o.preventChange:o.preventChange}break;case"index":if(o.fields.disabled&&(e.index=null==e.index||o.isDisabledItemByIndex(e.index)?null:e.index),null===e.index){o.clearAll();break}o.list||(o.dataSource instanceof x.M1&&(o.initialRemoteRender=!0),o.renderList()),!o.initialRemoteRender&&o.liCollections&&(o.checkValidLi(o.liCollections[e.index])||(o.liCollections&&100===o.liCollections.length&&"autocomplete"===o.getModuleName()&&o.listData.length>100?o.setSelectionData(e.index,t.index,"index"):o.index=t.index),o.updateInputFields());break;case"footerTemplate":o.popupObj&&o.setFooterTemplate(o.popupObj.element);break;case"headerTemplate":o.popupObj&&o.setHeaderTemplate(o.popupObj.element);break;case"valueTemplate":!(0,s.hX)(o.itemData)&&null!==o.valueTemplate&&o.setValueTemplate();break;case"allowFiltering":o.allowFiltering&&(o.actionCompleteData={ulElement:o.ulElement,list:o.listData,isUpdated:!0},o.actionData=o.actionCompleteData,o.updateSelectElementData(o.allowFiltering));break;case"floatLabelType":J.pd.removeFloating(o.inputWrapper),J.pd.addFloating(o.inputElement,e.floatLabelType,o.placeholder,o.createElement),!(0,s.hX)(o.inputWrapper.buttons[0])&&o.inputWrapper.container.getElementsByClassName("e-float-text-overflow")[0]&&"Never"!==o.floatLabelType&&o.inputWrapper.container.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon");break;case"showClearButton":o.inputWrapper.clearButton||(J.pd.setClearButton(e.showClearButton,o.inputElement,o.inputWrapper,null,o.createElement),o.bindClearEvent());break;default:var _=o.getPropObject(u,e,t);a.prototype.onPropertyChanged.call(o,_.newProperty,_.oldProperty)}},o=this,l=0,h=Object.keys(e);l<h.length;l++){var p=r(h[l]);if("object"==typeof p)return p.value}},i.prototype.checkValidLi=function(e){return!!this.isValidLI(e)&&(this.setSelection(e,null),!0)},i.prototype.setSelectionData=function(e,t,n){var o,r=this;
1this.updateListValues=function(){if("text"===n)o=r.getElementByText(e),r.checkValidLi(o)||r.setOldText(t);else if("value"===n){var l=r.fields.value?r.fields.value:"";r.allowObjectBinding&&!(0,s.hX)(e)&&(0,s._W)(l,e),o=r.getElementByValue(e),r.checkValidLi(o)||r.setOldValue(t)}else"index"===n&&(r.checkValidLi(o=r.liCollections[e])||(r.index=t))}},i.prototype.updatePopupState=function(){this.beforePopupOpen&&(this.beforePopupOpen=!1,this.showPopup())},i.prototype.setReadOnly=function(){this.readonly?(0,s.iQ)([this.inputWrapper.container],["e-readonly"]):(0,s.vy)([this.inputWrapper.container],["e-readonly"])},i.prototype.setInputValue=function(e,t){},i.prototype.setCssClass=function(e,t){(0,s.hX)(t)||(t=t.replace(/\s+/g," ").trim()),(0,s.hX)(e)||(e=e.replace(/\s+/g," ").trim()),J.pd.setCssClass(e,[this.inputWrapper.container],t),this.popupObj&&J.pd.setCssClass(e,[this.popupObj.element],t)},i.prototype.getModuleName=function(){return"dropdownlist"},i.prototype.showPopup=function(e){if(this.enabled){if("dropdownlist"===this.getModuleName()&&this.beforePopupOpen&&!this.isPopupOpen&&(this.beforePopupOpen=!1),this.firstItem=this.dataSource&&this.dataSource.length>0?this.dataSource[0]:null,this.isReact&&"combobox"===this.getModuleName()&&this.itemTemplate&&this.isCustomFilter&&this.isAddNewItemTemplate&&(this.renderList(),this.isAddNewItemTemplate=!1),this.isFiltering()&&this.dataSource instanceof x.M1&&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)):((0,s.hX)(this.list)||!(0,s.b0)(this.list)&&(this.list.classList.contains(P_noData)||this.list.querySelectorAll("."+P_li).length<=0))&&(this.isReact&&this.isFiltering()&&null!=this.itemTemplate&&(this.isSecondClick=!1),this.renderList(e)),this.enableVirtualization&&this.listData&&this.listData.length&&(!(0,s.hX)(this.value)&&("dropdownlist"===this.getModuleName()||"combobox"===this.getModuleName())&&this.removeHover(),this.beforePopupOpen||this.notify("setCurrentViewDataAsync",{module:"VirtualScroll"})),this.beforePopupOpen&&this.invokeRenderPopup(e),this.enableVirtualization&&!this.allowFiltering&&null!=this.selectedValueInfo&&this.selectedValueInfo.startIndex>0&&null!=this.value&&this.notify("dataProcessAsync",{module:"VirtualScroll",isOpen:!0}),!this.isSecondClick&&!this.isDropDownClick&&this.executeCloneElements()}},i.prototype.executeCloneElements=function(){var e=this,t=this.element.tagName===this.getNgDirective()&&this.itemTemplate?500:100;this.isReact&&this.isFiltering()&&null!=this.itemTemplate&&setTimeout(function(){e.cloneElements(),e.isSecondClick=!(e.isReact&&e.isFiltering()&&e.dataSource instanceof x.M1&&!e.list.querySelector("ul"))},t)},i.prototype.invokeRenderPopup=function(e){if(s.Pw.isDevice&&this.isFilterLayout()){var t=this;window.onpopstate=function(){t.hidePopup()},history.pushState({},"")}!(0,s.hX)(this.list)&&(!(0,s.hX)(this.list.children[0])||this.list.classList.contains(P_noData))&&this.renderPopup(e)},i.prototype.renderHightSearch=function(){},i.prototype.hidePopup=function(e){if(this.isEscapeKey&&"dropdownlist"===this.getModuleName())if((0,s.hX)(this.inputElement)||J.pd.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton),this.isEscapeKey=!1,(0,s.hX)(this.index))this.resetSelection();else{var t=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value,n=this.findListElement(this.ulElement,"li","data-value",t);this.selectedLI=this.liCollections[this.index]||n,this.selectedLI&&(this.updateSelectedItem(this.selectedLI,null,!0),this.valueTemplate&&null!==this.itemData&&this.setValueTemplate())}this.isVirtualTrackHeight=!1,this.customFilterQuery=null,this.closePopup(0,e);var r=this.getItemData(),o=!(0,s.hX)(this.selectedLI);o&&this.enableVirtualization&&this.selectedLI.classList&&(o=this.selectedLI.classList.contains("e-active")),this.inputElement&&""===this.inputElement.value&&!this.isInteracted&&(this.isSelectCustom||o&&this.inputElement.value!==r.text)&&(this.isSelectCustom=!1,this.clearAll(e))}
1,i.prototype.focusIn=function(e){if(this.enabled&&!this.targetElement().classList.contains(he.disable)){var t=!1;this.preventFocus&&s.Pw.isDevice&&(this.inputWrapper.container.tabIndex=1,this.inputWrapper.container.focus(),this.preventFocus=!1,t=!0),t||this.targetElement().focus(),(0,s.iQ)([this.inputWrapper.container],[he.inputFocus]),this.onFocus(e),"Never"!==this.floatLabelType&&J.pd.calculateWidth(this.inputElement,this.inputWrapper.container)}},i.prototype.focusOut=function(e){this.enabled&&(!this.enableVirtualization&&("combobox"===this.getModuleName()||"autocomplete"===this.getModuleName())&&(this.isTyped=!0),this.hidePopup(e),this.targetElement()&&this.targetElement().blur(),(0,s.vy)([this.inputWrapper.container],[he.inputFocus]),"Never"!==this.floatLabelType&&J.pd.calculateWidth(this.inputElement,this.inputWrapper.container))},i.prototype.disableItem=function(e){if(this.fields.disabled){this.list||this.renderList();var t=-1;if(this.liCollections&&this.liCollections.length>0&&this.listData&&this.fields.disabled){if("string"==typeof e)t=this.getIndexByValue(e);else if("object"==typeof e)if(e instanceof HTMLLIElement){for(var n=0;n<this.liCollections.length;n++)if(this.liCollections[n]===e){t=this.getIndexByValue(e.getAttribute("data-value"));break}}else{var r=JSON.parse(JSON.stringify(e))[this.fields.value];for(n=0;n<this.listData.length;n++)if(JSON.parse(JSON.stringify(this.listData[n]))[this.fields.value]===r){t=this.getIndexByValue(r);break}}else t=e;if(t<this.liCollections.length&&t>-1&&!JSON.parse(JSON.stringify(this.listData[t]))[this.fields.disabled]){var l=this.liCollections[t];if(l){this.disableListItem(l);var h=JSON.parse(JSON.stringify(this.listData[t]));h[this.fields.disabled]=!0,this.listData[t]=h,this.dataSource=this.listData,l.classList.contains(he.focus)&&this.removeFocus(),l.classList.contains(he.selected)&&this.clear()}}}}},i.prototype.destroy=function(){if(this.isActive=!1,this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),function GT(a){Th===a&&(Th="",_h="",sn="",pi=[])}(this.element.id),this.isReact&&this.clearTemplate(),this.hidePopup(),this.popupObj&&(this.isPopupRender=!1,this.popupObj.hide()),this.unWireEvent(),this.list&&this.unWireListEvents(),!this.element||this.element.classList.contains("e-"+this.getModuleName())){if(this.inputElement){for(var e=["readonly","aria-disabled","placeholder","aria-labelledby","aria-expanded","autocomplete","aria-readonly","autocapitalize","spellcheck","aria-autocomplete","aria-live","aria-describedby","aria-label"],t=0;t<e.length;t++)this.inputElement.removeAttribute(e[t]);this.inputElement.setAttribute("tabindex",this.tabIndex),this.inputElement.classList.remove("e-input"),J.pd.setValue("",this.inputElement,this.floatLabelType,this.showClearButton)}this.element.removeAttribute("tabindex"),this.element.style.display="block",this.inputWrapper.container&&this.inputWrapper.container.parentElement&&(this.inputWrapper.container.parentElement.tagName===this.getNgDirective()||this.inputWrapper.container.parentElement.insertBefore(this.element,this.inputWrapper.container),(0,s.Yo)(this.inputWrapper.container)),delete this.hiddenElement,this.filterInput=null,this.keyboardModule=null,this.ulElement=null,this.list=null,this.clearIconElement=null,this.popupObj=null,this.popupContentElement=null,this.rippleFun=null,this.selectedLI=null,this.liCollections=null,this.item=null,this.footer=null,this.header=null,this.previousSelectedLI=null,this.valueTempElement=null,this.actionData.ulElement=null,this.inputElement&&!(0,s.hX)(this.inputElement.onchange)&&(this.inputElement.onchange=null),this.inputElement&&!(0,s.hX)(this.inputElement.onselect)&&(this.inputElement.onselect=null),J.pd.destroy({element:this.inputElement,floatLabelType:this.floatLabelType,properties:this.properties,buttons:this.inputWrapper.container.querySelectorAll(".e-input-group-icon")[0]},this.clearButton),this.clearButton=null,this.inputElement=null,this.inputWrapper=null,a.prototype.destroy.call(this)}},i.prototype.getItems=function(){return this.list||(this.dataSource instanceof x.M1&&(this.initialRemoteRender=!0),this.renderList()),this.ulElement?a.prototype.getItems.call(this):[]},i.prototype.getDataByValue=function(e){return a.prototype.getDataByValue.call(this,e)},i.prototype.clear=function(){this.value=null},Ze([(0,s.mA)(null)],i.prototype,"cssClass",void 0),Ze([(0,s.mA)("100%")],i.prototype,"width",void 0),Ze([(0,s.mA)(!0)],i.prototype,"enabled",void 0),Ze([(0,s.mA)(!1)],i.prototype,"enablePersistence",void 0),Ze([(0,s.mA)("300px")],i.prototype,"popupHeight",void 0),Ze([(0,s.mA)("100%")],i.prototype,"popupWidth",void 0),Ze([(0,s.mA)(null)],i.prototype,"placeholder",void 0),Ze([(0,s.mA)(null)],i.prototype,"filterBarPlaceholder",void 0),Ze([(0,s.mA)({})],i.prototype,"htmlAttributes",void 0),Ze([(0,s.mA)(null)],i.prototype,"query",void 0),Ze([(0,s.mA)(null)],i.prototype,"valueTemplate",void 0),Ze([(0,s.mA)(null)],i.prototype,"headerTemplate",void 0),Ze([(0,s.mA)(null)],i.prototype,"footerTemplate",void 0),Ze([(0,s.mA)(!1)],i.prototype,"allowFiltering",void 0),Ze([(0,s.mA)(300)],i.prototype,"debounceDelay",void 0),Ze([(0,s.mA)(!0)],i.prototype,"isDeviceFullScreen",void 0),Ze([(0,s.mA)(!1)],i.prototype,"readonly",void 0),Ze([(0,s.mA)(!1)],i.prototype,"enableVirtualization",void 0),Ze([(0,s.mA)(!1)],i.prototype,"allowResize",void 0),Ze([(0,s.mA)(null)],i.prototype,"text",void 0),Ze([(0,s.mA)(null)],i.prototype,"value",void 0),Ze([(0,s.mA)(!1)],i.prototype,"allowObjectBinding",void 0),Ze([(0,s.mA)(null)],i.prototype,"index",void 0),Ze([(0,s.mA)("Never")],i.prototype,"floatLabelType",void 0),Ze([(0,s.mA)(!1)],i.prototype,"showClearButton",void 0),Ze([(0,s.Jh)()],i.prototype,"filtering",void 0),Ze([(0,s.Jh)()],i.prototype,"change",void 0),Ze([(0,s.Jh)()],i.prototype,"beforeOpen",void 0),Ze([(0,s.Jh)()],i.prototype,"open",void 0),Ze([(0,s.Jh)()],i.prototype,"close",void 0),Ze([(0,s.Jh)()],i.prototype,"blur",void 0),Ze([(0,s.Jh)()],i.prototype,"focus",void 0),Ze([(0,s.Jh)()],i.prototype,"resizeStop",void 0),Ze([(0,s.Jh)()],i.prototype,"resizing",void 0),Ze([(0,s.Jh)()],i.prototype,"resizeStart",void 0),Ze([s.kc],i)}
1(xh),Mu=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),me=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},b0="e-ddt-hidden",y0="e-input-group-icon e-ddt-icon e-icons",Xi="e-show-chip",Qs="e-show-clear",Lu="e-show-dd-icon",ui="e-chip-input",Js="e-input-focus",S0="e-input-group",C0="e-icon-anim",Ru="e-chips",E0="e-chipcontent",Nu="e-chips-close",Ye="e-icon-hide",wh="e-ddt-icon-hide",_0="e-list-parent",T0="e-dropdown",I0="e-disabled",Oh="e-selectall-parent",Ah="e-hide-selectall",x0="e-all-text",Vu="e-frame",dl="e-check",Fu="e-checkbox-wrapper",w0="e-filter-wrap",O0="e-ddt-icon",A0="e-ddt-footer",P0="e-ddt-header",Ks="e-no-data",Bu="e-remain",Hu="e-overflow",Zs="e-show-text",pl="e-total-count",Qo="e-wrap-count",II=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return Mu(i,a),me([(0,s.mA)("child")],i.prototype,"child",void 0),me([(0,s.mA)([])],i.prototype,"dataSource",void 0),me([(0,s.mA)("expanded")],i.prototype,"expanded",void 0),me([(0,s.mA)("hasChildren")],i.prototype,"hasChildren",void 0),me([(0,s.mA)("htmlAttributes")],i.prototype,"htmlAttributes",void 0),me([(0,s.mA)("iconCss")],i.prototype,"iconCss",void 0),me([(0,s.mA)("imageUrl")],i.prototype,"imageUrl",void 0),me([(0,s.mA)("parentValue")],i.prototype,"parentValue",void 0),me([(0,s.mA)(null)],i.prototype,"query",void 0),me([(0,s.mA)("selectable")],i.prototype,"selectable",void 0),me([(0,s.mA)("selected")],i.prototype,"selected",void 0),me([(0,s.mA)(null)],i.prototype,"tableName",void 0),me([(0,s.mA)("text")],i.prototype,"text",void 0),me([(0,s.mA)("tooltip")],i.prototype,"tooltip",void 0),me([(0,s.mA)("value")],i.prototype,"value",void 0),i}(s.I1),xI=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return Mu(i,a),me([(0,s.mA)(!1)],i.prototype,"autoCheck",void 0),me([(0,s.mA)(!0)],i.prototype,"checkDisabledChildren",void 0),me([(0,s.mA)("Auto")],i.prototype,"expandOn",void 0),me([(0,s.mA)(!1)],i.prototype,"loadOnDemand",void 0),i}(s.I1),wI=function(a){function i(e,t){var n=a.call(this,e,t)||this;return n.filterTimer=null,n.isFilteredData=!1,n.isFilterRestore=!1,n.selectedData=[],n.filterDelayTime=300,n.isClicked=!1,n.documentClickContext=n.onDocumentClick.bind(n),n.isCheckAllCalled=!1,n.isFromFilterChange=!1,n}return Mu(i,a),i.prototype.getPersistData=function(){return this.addOnPersist(["value"])},i.prototype.getLocaleName=function(){return"drop-down-tree"},i.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.headerTemplateId=this.element.id+"HeaderTemplate",this.footerTemplateId=this.element.id+"FooterTemplate",this.actionFailureTemplateId=this.element.id+"ActionFailureTemplate",this.noRecordsTemplateId=this.element.id+"NoRecordsTemplate",this.customTemplateId=this.element.id+"CustomTemplate",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"}},i.prototype.render=function(){var e=(0,s.Lt)("#"+this.element.i
1d+"_tree",document);if(e){var t=(0,s.Lt)("#"+this.element.id+"_options",document);(0,s.Yo)(t||e.parentElement)}"INPUT"===this.element.tagName?(this.inputEle=this.element,(0,s.hX)(this.inputEle.getAttribute("role"))&&(this.inputEle.setAttribute("aria-expanded","false"),this.inputEle.setAttribute("role","combobox"),this.inputEle.setAttribute("aria-haspopup","tree"),this.inputEle.setAttribute("aria-controls",this.element.id+"_options")),(0,s.hX)(this.inputEle.getAttribute("type"))&&this.inputEle.setAttribute("type","text")):(this.inputEle=(0,s.hX)(this.element.id)?this.createElement("input",{attrs:{role:"textbox",type:"text"}}):this.createElement("input",{attrs:{role:"textbox",type:"text",id:this.element.id+"_textbox"}}),this.element.parentElement.insertBefore(this.inputEle,this.element)),this.inputObj=J.pd.createInput({element:this.inputEle,floatLabelType:this.floatLabelType,buttons:this.showDropDownIcon?[y0]: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(S0)||this.inputWrapper.classList.add(S0),this.showDropDownIcon&&this.inputWrapper.classList.add(Lu),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.updateDataAttribute(),this.setHTMLAttributes(),this.setAttributes(),this.popupDiv=this.createElement("div",{className:"e-popup-content"}),this.popupDiv.classList.add(T0),this.tree=this.createElement("div",{id:this.element.id+"_tree"}),this.popupDiv.appendChild(this.tree),this.destroyPopupOnHide||document.body.appendChild(this.popupDiv),this.wireTreeEvents(),(0,s.iQ)([this.popupDiv],wh),this.renderTree(),this.isRemoteData=this.fields.dataSource instanceof x.M1,(this.allowMultiSelection||this.showCheckBox)&&("Delimiter"!==this.mode&&this.createChip(),!this.wrapText&&"Custom"!==this.mode&&(this.overFlowWrapper=this.createElement("span",{className:Hu+" "+Ye}),this.inputWrapper.insertBefore(this.overFlowWrapper,this.hiddenElement),"Box"!==this.mode&&(0,s.iQ)([this.overFlowWrapper],Zs))),this.isRemoteData||(this.setTreeValue(),this.setTreeText(),this.updateHiddenValue(),this.setSelectedValue(),this.wrapText||this.updateView()),this.wireEvents();var n=(0,s.Lt)("."+_0,this.treeObj.element);n&&n.getAttribute("aria-multiselectable")&&n.removeAttribute("aria-multiselectable"),this.setOldValue(),this.isRemoteData||(this.isInitialized=!0),this.hasTemplate=this.itemTemplate||this.headerTemplate||this.footerTemplate||this.actionFailureTemplate||this.noRecordsTemplate||this.customTemplate||this.valueTemplate,this.renderComplete()},i.prototype.hideCheckAll=function(e){var t=(0,s.hX)(this.popupEle)?null:this.popupEle.querySelector("."+Oh);(0,s.hX)(t)||(e&&!t.classList.contains(Ah)?(0,s.iQ)([t],Ah):!e&&t.classList.contains(Ah)&&(0,s.vy)([t],Ah))},i.prototype.renderFilter=function(){this.filterContainer=this.createElement("div",{id:this.element.id+"_filter_wrap",className:w0});var e=this.createElement("input",{id:this.element.id+"_filter",attrs:{autocomplete:"off","aria-label":this.filterBarPlaceholder}});this.filterContainer.appendChild(e),(0,s.Hs)([this.filterContainer],this.popupEle),this.filterObj=new J.fI({value:"",showClearButton:!0,placeholder:this.filterBarPlaceholder,input:this.filterChangeHandler.bind(this)}),this.filterObj.appendTo("#"+this.element.id+"_filter"),this.keyboardModule=new s.j9(this.filterObj.element,{keyAction:this.filterKeyAction.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},i.prototype.filterKeyAction=function(e){var r,t=this;this.trigger("keyPress",{cancel:!1,event:e},function(o){if(!o.cancel)switch(e.action){case"altUp":t.isPopupOpen&&t.hidePopup();break;case"shiftTab":(0,s.iQ)([t.inputWrapper],[Js]);break;case"moveDown":e.preventDefault(),t.filterObj.element.blur(),(r=t.treeObj.element.querySelector("li"))&&r.focus()}})},i.prototype.filterChangeHandler=function(e){var t=this;(0,s.hX)(e.value)||(window.clearTimeout(this.filterTimer),this.filterTimer=window.setTimeout(function(){t.filterHandler(e.value,e.event)},this.filterDelayTime))},i.prototype.isChildObject=function(){return"object"==typeof this.treeObj.fields.child},i.prototype.filterHandler=function(e,t){var n=this;this.isFromFilterChange=!0,this.isFilteredData||(this.isRemoteData&&(this.treeObj.expandedNodes=[]),this.treeData=this.treeObj.getTreeData());var r=this.cloneFields(this.fields),o={cancel:!1,preventDefaultAction:!1,event:t,text:e.trim(),fields:r};this.trigger("filtering",o,function(l){if(!l.cancel){var h=!1,d=void 0;if(n.isFilteredData=!0,""===l.text?(n.isFilteredData=!1,n.isFilterRestore=!0,d=n.cloneFields(n.fields),n.treeObj.element.classList.remove("e-filtering")):l.preventDefaultAction?(d=l.fields,n.treeObj.element.classList.add("e-filtering")):(1===n.treeDataType?d=n.selfReferencefilter(l.text,l.fields):n.fields.dataSource instanceof x.M1?((d=n.remoteDataFilter(l.text,l.fields)).child=n.fields.child,n.treeObj.fields=n.getTreeFields(l.fields),n.treeObj.dataBind(),h=!0):d=n.nestedFilter(l.text,l.fields),n.treeObj.element.classList.add("e-filtering")),n.hideCheckAll(n.isFilteredData),h)return;if(n.isRemoteData&&(n.isChildObject()?d.child=n.fields.child:d=l.fields),n.treeObj.fields=n.getTreeFields(d),(n.previousFilterText&&""!==n.previousFilterText&&""!==l.text&&-1!==n.previousFilterText.indexOf(l.text)||l.text&&""!==l.text&&""!==n.previousFilterText&&-1!==l.text.indexOf(n.previousFilterText))&&(n.isFilterRestore=!0),n.previousFilterText=l.text,n.treeObj.dataBind(),n.popupObj&&n.popupObj.refreshPosition(),n.hasTemplate&&n.portals&&n.treeObj.portals){for(var p=0;p<n.treeObj.portals.length;p++)-1===n.portals.indexOf(n.treeObj.portals[p])&&n.portals.push(n.treeObj.portals[p]);n.isReact&&n.renderReactTemplates()}}})},i.prototype.remoteDataFilter=function(e,t){var n=this;return t.dataSource=this.treeData.map(function(r){return n.remoteChildFilter(e,r)}).filter(function(r){return!(0,s.hX)(r)}),t},i.prototype.remoteChildFilter=function(e,t,n,r){var o=this.isChildObject()?t.child:t[this.fields.child];if((0,s.hX)(o))return this.isMatchedNode(e,t,n,r)?t:null;for(var l=[],h=0;h<o.length;h++){var d=this.remoteChildFilter(e,o[h],!0,!0);(0,s.hX)(d)||l.push(d)}var p=Object.assign({},t);return r=!1,0!==l.length?p.child=l:(p.child=null,p=this.isMatchedNode(e,p)?p:null),p},i.prototype.nestedFilter=function(e,t){for(var n=[],r=0;r<this.treeData.length;r++){var o=this.nestedChildFilter(e,this.treeData[parseInt(r.toString(),10)]);(0,s.hX)(o)||n.push(o)}return t.dataSource=n,t},i.prototype.nestedChildFilter=function(e,t){var n=t[this.fields.child];if((0,s.hX)(n))return this.isMatchedNode(e,t)?t:null;for(var r=[],o=0;o<n.length;o++){var l=this.nestedChildFilter(e,n[parseInt(o.toString(),10)]);(0,s.hX)(l)||r.push(l)}var h=Object.assign({},t);return 0!==r.length?(h[this.fields.child]=r,h):(h[this.fields.child]=null,this.isMatchedNode(e,h)?h:null)},i.prototype.selfReferencefilter=function(e,t){for(var n=[],r=[],o=0;o<this.treeData.length;o++)this.isMatchedNode(e,this.treeData[o])&&n.push(this.treeData[o]);for(o=0;o<n.length;o++)if(-1===r.indexOf(n[o])){r.push(n[o]);for(var l=n[parseInt(o.toString(),10)][this.fields.parentValue];!(0,s.hX)(l);){for(var h=null,d=0;d<this.treeData.length;d++){var p=this.treeData[parseInt(d.toString(),10)][this.fields.value];if(!(0,s.hX)(p)&&p===l){h=this.treeData[d];break}}if((0,s.hX)(h)||-1!==r.indexOf(h))break;r.push(h),l=h[this.fields.parentValue]}}return t.dataSource=r,t},i.prototype.isMatchedNode=function(e,t,n,r){var o;if(!(o=n&&r&&this.isChildObject()?t[this.fields.child.text]:t[this.fields.text])&&!(0,s.hX)(this.fields.child.text)){for(var h=this.fields.child;!t[h.text];)h=h.child;o=t[h.text]}return this.ignoreCase&&(o=o.toLowerCase(),e=e.toLowerCase()),this.ignoreAccent&&(o=x.$j.ignoreDiacritics(o),e=x.$j.ignoreDiacritics(e)),"StartsWith"===this.filterType?o.slice(0,e.length)===e:"EndsWith"===this.filterType?o.slice(-e.length)===e:-1!==o.indexOf(e)},i.prototype.wireEvents=function(){s.Pw.isIos&&s.Jm.add(this.inputWrapper,"touchstart",this.handleIosTouch,this),s.Jm.add(this.inputWrapper,"mouseup",this.dropDownClick,this),s.Jm.add(this.inputWrapper,"focus",this.focusIn,this),s.Jm.add(this.inputWrapper,"blur",this.focusOut,this),s.Jm.add(this.inputWrapper,"mousemove",this.mouseIn,this),s.Jm.add(this.inputWrapper,"mouseout",this.onMouseLeave,this),s.Jm.add(this.overAllClear,"mousedown",this.clearAll,this),s.Jm.add(window,"resize",this.windowResize,this);var e=(0,s.kp)(this.inputWrapper,"form");e&&s.Jm.add(e,"reset",this.resetValueHandler,this),this.keyboardModule=new s.j9(this.inputWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},i.prototype.wireTreeEvents=function(){this.keyboardModule=new s.j9(this.tree,{keyAction:this.treeAction.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},i.prototype.wireCheckAllWrapperEvents=function(){this.keyboardModule=new s.j9(this.checkAllParent,{
1keyAction:this.checkAllAction.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},i.prototype.unWireEvents=function(){s.Pw.isIos&&s.Jm.remove(this.inputWrapper,"touchstart",this.handleIosTouch),s.Jm.remove(this.inputWrapper,"mouseup",this.dropDownClick),s.Jm.remove(this.inputWrapper,"focus",this.focusIn),s.Jm.remove(this.inputWrapper,"blur",this.focusOut),s.Jm.remove(this.inputWrapper,"mousemove",this.mouseIn),s.Jm.remove(this.inputWrapper,"mouseout",this.onMouseLeave),s.Jm.remove(this.overAllClear,"mousedown",this.clearAll),s.Jm.remove(window,"resize",this.windowResize);var e=(0,s.kp)(this.inputWrapper,"form");e&&s.Jm.remove(e,"reset",this.resetValueHandler),this.keyboardModule.destroy(),this.showSelectAll&&this.checkAllParent&&s.Jm.remove(this.checkAllParent,"mouseup",this.clickHandler),document.removeEventListener("mousedown",this.documentClickContext)},i.prototype.handleIosTouch=function(e){e.preventDefault(),this.dropDownClick(e)},i.prototype.dropDownClick=function(e){if(this.enabled&&!this.readonly){if(this.isClearButtonClick)return void(this.isClearButtonClick=!1);this.isPopupOpen?this.hidePopup():!(e instanceof TouchEvent)&&2!==e.button&&(this.focusIn(e),this.renderPopup()),this.showOverAllClear()}},i.prototype.mouseIn=function(){(this.enabled||!this.readonly)&&this.showOverAllClear()},i.prototype.onMouseLeave=function(){this.inputFocus||((0,s.iQ)([this.overAllClear],Ye),(0,s.vy)([this.inputWrapper],Qs))},i.prototype.getDirective=function(){return"EJS-DROPDOWNTREE"},i.prototype.focusOut=function(e){if(this.enabled&&!this.readonly&&this.inputFocus&&(!s.Pw.isIE&&"edge"!==s.Pw.info.name||e.target!==this.inputWrapper)){var t=e.relatedTarget;t!==this.inputEle&&(0,s.hX)(t)&&(e.target!==this.inputWrapper||!this.isPopupOpen)&&this.onFocusOut(e)}},i.prototype.onFocusOut=function(e){if(this.inputFocus=!1,this.isPopupOpen&&this.hidePopup(),this.isClearButtonClick&&(this.isClearButtonClick=!1),this.showClearButton&&(this.clearIconWidth=(0,s.Lt)(".e-clear-icon",this.inputWrapper).offsetWidth,(0,s.iQ)([this.overAllClear],Ye),(0,s.vy)([this.inputWrapper],Qs)),(0,s.vy)([this.inputWrapper],[Js]),this.allowMultiSelection||this.showCheckBox){var t=!!this.value&&!!this.value.length;"Delimiter"!==this.mode&&"Custom"!==this.mode&&this.chipWrapper&&"Default"===this.mode&&((0,s.iQ)([this.chipWrapper],Ye),(0,s.vy)([this.inputWrapper],Xi),(0,s.vy)([this.inputEle],ui)),t&&"Custom"!==this.mode&&this.showOrHideValueTemplate(!0),!this.wrapText&&t&&this.updateView()}this.changeOnBlur&&this.triggerChangeEvent(e),this.removeValue=!1,this.setOldValue(),this.trigger("blur")},i.prototype.updateView=function(){!this.showCheckBox&&!this.allowMultiSelection||"Custom"===this.mode||this.inputFocus||("Box"!==this.mode?(0,s.iQ)([this.inputWrapper,this.overFlowWrapper],Zs):(0,s.iQ)([this.inputWrapper],Xi),this.value&&0!==this.value.length&&(this.inputWrapper.contains(this.chipWrapper)&&(0,s.iQ)([this.chipWrapper],Ye),(0,s.iQ)([this.inputEle],ui),this.updateOverFlowView()),this.ensurePlaceHolder())},i.prototype.triggerChangeEvent=function(e){this.ddtCompareValues(this.oldValue,this.value)&&!this.isChipDelete||this.removeValue||(this.trigger("change",{e,oldValue:this.oldValue,value:this.value,isInteracted:!!e,element:this.element}),this.setOldValue())},i.prototype.ddtCompareValues=function(e,t){if(null===e||null===t)return(null===e||0===e.length)&&t===e;if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},i.prototype.focusIn=function(e){!this.enabled||this.readonly||this.inputFocus||(this.showOverAllClear(),this.inputFocus=!0,(0,s.iQ)([this.inputWrapper],[Js]),(this.allowMultiSelection||this.showCheckBox)&&("Delimiter"!==this.mode&&this.inputFocus&&(this.chipWrapper&&this.value&&0!==this.value.length&&((0,s.vy)([this.chipWrapper],Ye),(0,s.iQ)([this.inputEle],ui),this.showOrHideValueTemplate(!1,!0)),(0,s.iQ)([this.inputWrapper],Xi),this.popupObj&&this.popupObj.refreshPosition()),!this.wrapText&&"Custom"!==this.mode&&(this.inputWrapper.contains(this.overFlowWrapper)&&(0,s.iQ)([this.overFlowWrapper],Ye),"Delimiter"===this.mode?((0,s.vy)([this.inputWrapper],Xi),(0,s.vy)([this.inputEle],ui),this.showOrHideValueTemplate(!0)):(0,s.iQ)([this.inputWrapper],Xi),(0,s.vy)([this.inputWrapper],Zs),this.ensurePlaceHolder())),this.trigger("focus",{isInteracted:!!e,event:e}))},i.prototype.treeAction=function(e){var t=this;this.trigger("keyPress",{cancel:!1,event:e},function(r){if(r.cancel)e.stopImmediatePropagation();else switch(e.action){case"escape":case"altUp":t.inputWrapper.focu
1s(),e.preventDefault(),t.isPopupOpen&&t.hidePopup();break;case"tab":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)}})},i.prototype.keyActionHandler=function(e){var t=this;this.trigger("keyPress",{cancel:!1,event:e},function(r){if(!r.cancel)switch(e.action){case"escape":case"altUp":t.isPopupOpen&&t.hidePopup();break;case"shiftTab":t.isPopupOpen&&t.hidePopup(),t.inputFocus&&t.onFocusOut();break;case"altDown":t.isPopupOpen||(t.showPopup(),e.preventDefault());break;case"moveDown":t.showSelectAll&&t.showCheckBox&&t.checkAllParent.focus();break;case"tab":!t.isPopupOpen&&t.inputFocus&&t.onFocusOut()}})},i.prototype.checkAllAction=function(e){var r,t=this;this.trigger("keyPress",{cancel:!1,event:e},function(o){if(!o.cancel)switch(e.action){case"space":t.clickHandler(e);break;case"moveDown":e.preventDefault(),(r=t.treeObj.element.querySelector('li[tabindex="0"]')||t.treeObj.element.querySelector("li")).focus(),(0,s.iQ)([r],["e-node-focus"])}})},i.prototype.windowResize=function(){this.popupObj&&(this.popupObj.setProperties({width:this.setWidth()}),this.popupObj.refreshPosition())},i.prototype.resetValueHandler=function(e){var t=(0,s.kp)(this.inputWrapper,"form");t&&e.target===t&&(this.isDynamicChange=!0,this.setProperties({value:null},!0),this.resetValue(!0),this.isDynamicChange=!1)},i.prototype.getAriaAttributes=function(){return{}},i.prototype.updateOverFlowView=function(){if(this.overFlowWrapper.classList.remove(pl),(0,s.vy)([this.overFlowWrapper],Ye),this.value&&this.value.length){var e="",t=void 0,n=void 0,r=void 0,o=1,l=void 0,h=void 0,d=0;this.overFlowWrapper.innerHTML="",this.l10n=new s.Wo(this.getLocaleName(),{overflowCountTemplate:"+${count} more..",totalCountTemplate:"${count} selected"},this.locale);var u=this.l10n.getConstant("overflowCountTemplate"),f=this.l10n.getConstant("totalCountTemplate"),m=this.createElement("span",{className:Bu});this.overFlowWrapper.appendChild(m),m.innerText=u.replace("${count}",this.value.length.toString());var g=m.offsetWidth;if((0,s.TF)(m),this.showDropDownIcon&&(d=(0,s.Lt)("."+O0,this.inputWrapper).offsetWidth),!(0,s.hX)(this.value))if("Box"!==this.mode){if(this.valueTemplate)return h=this.updateChipAndValueTemplate(!1,d,g),this.checkRemainingTemplate(h,m,u,f),void this.updateDelimMode();for(var v=0;!(0,s.hX)(this.value[v]);v++){if(e+=0===v?"":this.delimiterChar+" ",e+=n=this.getOverflowVal(v),n=this.overFlowWrapper.innerHTML,this.enableHtmlSanitizer?this.overFlowWrapper.innerText=s.r4.sanitize(e):this.overFlowWrapper.innerHTML=e,(l=this.overFlowWrapper.offsetWidth)+d+this.clearIconWidth>(t=this.inputWrapper.offsetWidth)){for(void 0!==r&&""!==r&&(n=r,v=o+1),this.overFlowWrapper.innerHTML=n,h=this.value.length-v,l=this.overFlowWrapper.offsetWidth;l+g+d+this.clearIconWidth>=t&&0!==l&&""!==this.overFlowWrapper.innerHTML;){var b=this.overFlowWrapper.innerHTML.split(this.delimiterChar);b.pop(),this.overFlowWrapper.innerHTML=b.join(this.delimiterChar),h++,l=this.overFlowWrapper.offsetWidth}break}l+g+d+this.clearIconWidth<=t?(r=e,o=v):0===v&&(r="",o=-1)}}else h=this.updateChipAndValueTemplate(!0,d,g);this.checkRemainingTemplate(h,m,u,f)}else this.overFlowWrapper.innerHTML="",(0,s.iQ)([this.overFlowWrapper],Ye);this.updateDelimMode()},i.prototype.checkRemainingTemplate=function(e,t,n,r){e>0&&this.overFlowWrapper.appendChild(this.updateRemainTemplate(t,e,n,r)),"Box"===this.mode&&!this.overFlowWrapper.classList.contains(pl)&&(0,s.iQ)([t],Qo)},i.prototype.updateChipAndValueTemplate=function(e,t,n){void 0===t&&(t=0);var o,l,h,p,u,r="",d=1;(0,s.iQ)([e?this.chipWrapper:this.valueTemplateContainer],Ye);for(var f=(e?this.chipWrapper:this.valueTemplateContainer).cloneNode(!0),m=e?(0,s.Ub)("."+Ru,f):Array.prototype.slice.call(f.children),g=0;g<m.length;g++){if(l=this.overFlowWrapper.innerHTML,this.overFlowWrapper.appendChild(m[g]),r=this.overFlowWrapper.innerHTML,(p=this.overFlowWrapper.offsetWidth)+t+this.clearIconWidth>
1(o=this.inputWrapper.offsetWidth)){for(void 0!==h&&""!==h&&(l=h,g=d+1),this.overFlowWrapper.innerHTML=l,u=this.value.length-g,p=this.overFlowWrapper.offsetWidth;p+n+t+this.clearIconWidth>=o&&0!==p&&""!==this.overFlowWrapper.innerHTML;)this.overFlowWrapper.removeChild(this.overFlowWrapper.lastChild),u++,p=this.overFlowWrapper.offsetWidth;break}p+n+t+this.clearIconWidth<=o?(h=r,d=g):0===g&&(h="",d=-1)}return u},i.prototype.updateRemainTemplate=function(e,t,n,r){return this.overFlowWrapper.firstChild&&3===this.overFlowWrapper.firstChild.nodeType&&""===this.overFlowWrapper.firstChild.nodeValue&&this.overFlowWrapper.removeChild(this.overFlowWrapper.firstChild),e.innerHTML="",e.innerText=this.overFlowWrapper.firstChild&&(3===this.overFlowWrapper.firstChild.nodeType||"Box"===this.mode||this.valueTemplateContainer)?n.replace("${count}",t.toString()):r.replace("${count}",t.toString()),!this.overFlowWrapper.firstChild||3!==this.overFlowWrapper.firstChild.nodeType&&"Box"!==this.mode?((0,s.iQ)([this.overFlowWrapper],pl),(0,s.vy)([this.overFlowWrapper],Qo)):(0,s.vy)([this.overFlowWrapper],pl),e},i.prototype.getOverflowVal=function(e){var t=this.getSelectedData(this.value[parseInt(e.toString(),10)]);return(0,s._W)(this.treeSettings.loadOnDemand?this.fields.text:"text",t)},i.prototype.updateDelimMode=function(){"Box"!==this.mode?(0,s.Lt)("."+Bu,this.overFlowWrapper)&&!this.overFlowWrapper.classList.contains(pl)?((0,s.iQ)([this.overFlowWrapper],Qo),(0,s.iQ)([this.overFlowWrapper],Zs)):(this.overFlowWrapper.classList.remove(Qo),(0,s.vy)([this.overFlowWrapper],Qo)):(0,s.Lt)("."+Bu,this.overFlowWrapper)&&this.overFlowWrapper.classList.remove(Qo)},i.prototype.createHiddenElement=function(){this.hiddenElement=this.createElement("select",this.allowMultiSelection||this.showCheckBox?{attrs:{"aria-hidden":"true",class:b0,tabindex:"-1",multiple:"","aria-label":this.getModuleName()}}:{attrs:{"aria-hidden":"true",tabindex:"-1",class:b0,"aria-label":this.getModuleName()}}),(0,s.Hs)([this.hiddenElement],this.inputWrapper),this.validationAttribute()},i.prototype.createClearIcon=function(){this.overAllClear=this.createElement("span",{className:"e-clear-icon e-icons"}),(0,s.iQ)([this.overAllClear],Ye),(0,s.vy)([this.inputWrapper],Qs),this.showClearButton&&this.inputWrapper.insertBefore(this.overAllClear,this.inputObj.buttons[0])},i.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"],n=0;n<t.length;n++){var r=this.inputEle.getAttribute(t[n]);r&&(this.hiddenElement.setAttribute(t[n],r),this.inputEle.removeAttribute(t[n]))}},i.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),(0,s.iQ)([this.inputWrapper],Xi),this.getValidMode()&&null!==this.value&&this.value&&0!==this.value.length?(0,s.iQ)([this.inputEle],ui):(null===this.value||this.value&&0===this.value.length||this.checkWrapper)&&(0,s.iQ)([this.chipWrapper],Ye))},i.prototype.getValidMode=function(){return!(!this.allowMultiSelection&&!this.showCheckBox||"Box"!==this.mode&&("Default"!==this.mode||!this.inputFocus))},i.prototype.createSelectAllWrapper=function(){this.checkAllParent=this.createElement("div",{className:Oh,attrs:{tabindex:"0"}}),this.selectAllSpan=this.createElement("span",{className:x0}),this.selectAllSpan.textContent="";var e=(0,s.kp)(this.element,".e-bigger"),t=(0,s.hX)(e)?"":"e-small";this.checkBoxElement=(0,ke.OK)(this.createElement,!0,{cssClass:t}),this.checkBoxElement.setAttribute("role","checkbox"),this.checkAllParent.appendChild(this.checkBoxElement),this.checkAllParent.appendChild(this.selectAllSpan),this.setLocale(),s.Jm.add(this.checkAllParent,"mouseup",this.clickHandler,this),this.wireCheckAllWrapperEvents()},i.prototype.clickHandler=function(e){var t;if(t=e.currentTarget&&e.currentTarget.classList.contains(Oh)?e.currentTarget.firstElementChild.lastElementChild:e.target,this.checkWrapper=(0,s.kp)(t,"."+Fu),!(0,s.hX)(this.checkWrapper)){this.isClicked=!0;var n=(0,s.Lt)("."+Vu,this.checkWrapper);this.changeState(this.checkWrapper,n.classList.contains(dl)?"uncheck":"check",e),this.isClicked=!1}e.preventDefault()},i.prototype.changeState=function(e,t,n){var r,o=e.getElementsByClassName(Vu)[0];"check"!==t||o.classList.contains(dl)?"uncheck"===t&&o.classList.contains(dl)&&(o.classList.remove(dl),r="false",this.isReverseUpdate||(this.treeObj.uncheckAll(),this.changeOnBlur||this.triggerChangeEvent(n)),this.setLocale(!1)):(o.classList.add(dl),r="true",this.isReverseUpdate||(this.setOldValue(),this.isCheckAllCalled=!0,this.treeObj.checkAll(),this.changeOnBlur||this.triggerChangeEvent(n)),this.setLocale(!0)),this.setMultiSelect(),this.ensurePlaceHolder(),(0,s.hX)(r="check"===t?"true":"false")||e.parentElement.setAttribute("aria-checked",r)},i.prototype.setLocale=function(e){if(this.selectAllSpan)if("Select All"!==this.selectAllText||"Unselect All"!==this.unSelectAllText){var t=e?this.unSelectAllText:this.selectAllText;this.selectAllSpan.textContent="";for(var o=0,l=(0,s.wE)(t)({},this,e?"unSelectAllText":"selectAllText",null,!this.isStringTemplate);o<l.length;o++)this.selectAllSpan.textContent=l[o].textContent}else this.selectAllSpan.textContent=e?this.unSelectAllText:this.selectAllText},i.prototype.setAttributes=function(){this.inputEle.setAttribute("tabindex","-1"),this.inputEle.setAttribute("aria-label",this.getModuleName());var e=this.element.getAttribute("id");this.hiddenElement.id=e+"_hidden",this.inputWrapper.setAttribute("tabindex",this.inputWrapper.classList.contains("e-disabled")?"-1":"0"),this.inputWrapper.setAttribute("aria-label",this.getModuleName()),(0,s.uK)(this.inputWrapper,this.getAriaAttributes())},i.prototype.setHTMLAttributes=function(){if(Object.keys(this.htmlAttributes).length)for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var n=t[e];"class"===n?this.inputWrapper.classList.add(this.htmlAttributes[""+n]):"disabled"===n?(this.setProperties({enabled:!1},!0),this.setEnable()):"readonly"===n?(this.setProperties({readonly:!0},!0),this.dataBind()):"style"===n?this.inputWrapper.style.cssText=this.htmlAttributes[""+n]:0===n.indexOf("data")||["name","required"].indexOf(n)>-1?this.hiddenElement.setAttribute(n,this.htmlAttributes[""+n]):["title","id","placeholder","aria-placeholder","role","autocorrect","autocomplete","autocapitalize","spellcheck","minlength","maxlength"].indexOf(n)>-1&&"placeholder"===n?J.pd.setPlaceholder(this.htmlAttributes[""+n],this.inputEle):this.inputEle.setAttribute(n,this.htmlAttributes[""+n])}},i.prototype.updateDataAttribute=function(){for(var e=this.htmlAttributes,t=["class","style","id","type"],n={},r=0;r<this.element.attributes.length;r++)-1===t.indexOf(this.element.attributes[r].name)&&"readonly"!==this.element.attributes[r].name&&(n[this.element.attributes[r].name]=this.element.getAttribute(this.element.attributes[r].name));(0,s.X$)(n,e,n),this.setProperties({htmlAttributes:n},!0)},i.prototype.showOverAllClear=function(){this.enabled&&!this.readonly&&this.overAllClear&&(this.value&&this.value.length&&this.showClearButton?((0,s.vy)([this.overAllClear],Ye),(0,s.iQ)([this.inputWrapper],Qs)):((0,s.iQ)([this.overAllClear],Ye),(0,s.vy)([this.inputWrapper],Qs)))},i.prototype.setTreeValue=function(){if(null!==this.value&&0!==this.value.length){var e=void 0;if(this.showCheckBox||this.allowMultiSelection){for(var t=this.value.length-1;t>=0;t--)e=this.treeObj.getTreeData(this.value[t])[0],(0,s.hX)(e)&&this.value.splice(t,1);0!==this.value.length&&this.setValidValue()}else e=this.treeObj.getTreeData(this.value[0])[0],(0,s.hX)(e)?this.setProperties({value:this.currentValue},!0):(this.setProperties({text:e[this.fields.text]},!0),this.setValidValue())}},i.prototype.setTreeText=function(){if((null===this.value||this.isInitialized)&&null!==this.text){var e=void 0,t=[];if(this.showCheckBox||this.allowMultiSelection){for(var n=this.text.split(this.delimiterChar),r=0;r<n.length;r++)e=this.getItems(n[r]),(0,s.hX)(e)||t.push(e[this.fields.value].toString());0!==t.length?(this.setOldValue(),this.setProperties({value:t},!0),this.setValidValue()):this.setProperties({text:this.currentText},!0)}else e=this.getItems(this.text),(0,s.hX)(e)?this.setProperties({text:this.currentText},!0):(this.setOldValue(),this.setProperties({value:[e[this.fields.value].toString()]},!0),this.setValidValue())}},i.prototype.setSelectedValue=function(){null!==this.value&&0!==this.value.length||this.isInitialized||(this.setOldValue(),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),(0,s.KY)("selectedNodes",[],this.treeObj),this.treeObj.dataBind(),this.updateMode()),this.updateSelectedValues(),this.currentText=this.text,this.currentValue=this.value)},i.prototype.setValueTemplate=function(){var e=this;if(this.valueTemplate){var t=this.initializeValueTemplate();this.getValueTemplateElement(this.value[0],t),this.hasTemplate&&this.portals&&(this.treeObj.portals&&(this.portals=this.portals.concat(this.treeObj.portals.filter(function(n){return!e.portals.includes(n)}))),this.isReact&&this.renderReactTemplates(this.reactCallBack)),this.showOrHideValueTemplate(!0)}},i.prototype.getValueTemplateElement=function(e,t){var r=t(this.getNodeData(e,this.isFilteredData?this.treeData:this.treeItems),this,"valueTemplate",this.element.i
1d+"valueTemplate",this.isStringTemplate,void 0,this.valueTemplateContainer);r&&(r=Array.prototype.slice.call(r),(0,s.BC)(r,this.valueTemplateContainer))},i.prototype.setValidValue=function(){var e=this;if(this.showCheckBox||this.allowMultiSelection)this.showCheckBox?(this.value.length!==this.treeObj.checkedNodes.length||this.value.filter(function(r){return-1===e.treeObj.checkedNodes.indexOf(r)}).length>0||this.treeSettings.autoCheck)&&(this.treeObj.checkedNodes=this.value.slice(),this.treeObj.dataBind(),this.setMultiSelect()):(this.treeObj.selectedNodes=this.value.slice(),this.selectedText=[],this.updateSelectedValues()),this.treeObj.dataBind();else{J.pd.setValue(this.text,this.inputEle,this.floatLabelType),this.setValueTemplate();var t=this.value[0].toString();this.treeObj.selectedNodes[0]!==t&&((0,s.KY)("selectedNodes",[t],this.treeObj),this.fields.dataSource instanceof x.M1&&this.updateSelectedValues())}this.currentText=this.text,this.currentValue=this.value,!(0,s.hX)(this.value)&&this.value.length>0&&!(0,s.hX)(this.currentText)&&this.inputWrapper.setAttribute("aria-label",this.currentText.replace(/,/g,", ")),this.isInitialized&&this.triggerChangeEvent()},i.prototype.getItems=function(e){var t;if(1===this.treeDataType)for(var n=0;n<this.treeItems.length;n++){var r=(0,s._W)(this.fields.text,this.treeItems[parseInt(n.toString(),10)]);if(!(0,s.hX)(this.treeItems[n])&&!(0,s.hX)(r)&&r===e){t=this.treeItems[n];break}}else t=this.getNestedItems(this.treeItems,this.fields,e);return t},i.prototype.getNestedItems=function(e,t,n){for(var r,o=0,l=e.length;o<l;o++){var h=(0,s._W)(this.fields.text,e[parseInt(o.toString(),10)]);if(e[o]&&h&&h.toString()===n)return e[o];if("string"!=typeof t.child||(0,s.hX)((0,s._W)(t.child,e[o]))){if(this.fields.dataSource instanceof x.M1&&!(0,s.hX)((0,s._W)("child",e[o]))&&void 0!==(r=this.getNestedItems((0,s._W)("child",e[parseInt(o.toString(),10)]),this.getChildType(t),n)))break}else{var d=(0,s._W)(t.child,e[parseInt(o.toString(),10)]);if(void 0!==(r=this.getNestedItems(d,this.getChildType(t),n)))break}}return r},i.prototype.getChildType=function(e){return"string"==typeof e.child||(0,s.hX)(e.child)?e:e.child},i.prototype.renderTree=function(){this.treeObj=new Av({fields:this.getTreeFields(this.fields),enableRtl:this.enableRtl,nodeSelected:this.onNodeSelected.bind(this),nodeChecked:this.onNodeChecked.bind(this),nodeChecking:this.beforeCheck.bind(this),nodeExpanded:this.onNodeExpanded.bind(this),actionFailure:this.onActionFailure.bind(this),nodeClicked:this.onNodeClicked.bind(this),dataBound:this.OnDataBound.bind(this),allowMultiSelection:this.allowMultiSelection,enableHtmlSanitizer:this.enableHtmlSanitizer,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,checkDisabledChildren:this.treeSettings.checkDisabledChildren,checkOnClick:!0}),this.treeObj.root=this.root?this.root:this,this.treeObj.appendTo(this.tree)},i.prototype.renderPopup=function(){var e=this;this.isFilteredData&&(this.treeObj.element.classList.remove("e-filtering"),this.filterObj.value="",this.treeObj.fields=this.getTreeFields(this.fields),this.isFilterRestore=!0,this.isFilteredData=!1,this.hideCheckAll(!1));var t=!1;this.trigger("beforeOpen",{cancel:!1},function(r){if(r.cancel?t=!0:((0,s.iQ)([e.inputWrapper],[C0]),e.isReact&&e.isFilterRestore&&e.treeObj.refresh(),e.isFirstRender?(e.popupEle=e.createElement("div",{id:e.element.id+"_options",className:"e-ddt e-popup "+(null!=e.cssClass?e.cssClass:"")}),e.popupEle.setAttribute("role","region"),e.popupEle.setAttribute("aria-label",e.element.id),document.body.appendChild(e.popupEle),e.createPopup(e.popupEle)):(e.popupEle=e.popupObj.element,e.isReact&&e.isFilterRestore&&(e.isFilteredData=!0,e.popupEle.removeChild(e.filterContainer)))),(e.isFirstRender&&!t||e.isFilteredData)&&(e.isFilteredData=!1,(0,s.Hs)([e.popupDiv],e.popupEle),(0,s.vy)([e.popupDiv],wh),e.allowFiltering&&e.renderFilter(),e.showCheckBox&&e.showSelectAll&&!e.popupDiv.classList.contains(Ks)&&(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.treeObj.portals&&(e.portals=e.portals.concat(e.treeObj.portals.filter(function(f){return!e.portals.includes(f)}))),e.isReact&&e.renderReactTemplates(e.reactCallBack))),!t){if((0,s.uK)(e.inputEle,{"aria-expanded":"true"}),e.popupObj.show(null,1e3===e.zIndex?e.inputEle:null),(0,s.vy)([e.popupEle],wh),e.updatePopupHeight(),e.popupObj.refreshPosition(),e.checkCollision(e.popupEle),!e.showSelectAll&&!e.allowFiltering&&!e.popupDiv.classList.contains(Ks)&&e.treeItems.length>0){if(o=null!=e.value&&null!=e.text?e.treeObj.element.querySelector('[data-uid="'+e.value[e.value.length-1]+'"]'):null)e.treeObj.element.querySelector("li").setAttribute("tabindex","-1"),o.setAttribute("tabindex","0");else{var l=e.treeObj.element.querySelector(".e-node-focus");o=e.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable)')||e.treeObj.element.querySelector("li:not(.e-disable)"),e.removeFocus(o,l)}e.updateFocus(o)}if(e.treeObj.checkedNodes.length>0&&!e.isFilterRestore){var h=e.treeObj.element.querySelectorAll("li:not(.e-disable)");if(e.treeObj.element.querySelectorAll("li[aria-checked=true]").length===
1h.length&&e.checkBoxElement){var p=(0,s.kp)(e.checkBoxElement,"."+Fu);e.changeState(p,"check"),e.checkSelectAll=!1}}if(e.showSelectAll&&!e.allowFiltering){l=e.treeObj.element.querySelector(".e-node-focus");var o=e.popupEle.querySelector(".e-selectall-parent");e.removeFocus(o,l),e.updateFocus(o)}e.allowFiltering&&(o=e.treeObj.element.querySelector("li.e-node-focus"),(0,s.hX)(o)||(0,s.vy)([o],"e-node-focus"),(0,s.vy)([e.inputWrapper],[Js]),e.filterObj.element.focus()),e.trigger("open",{popup:e.popupObj})}})},i.prototype.checkCollision=function(e){(0,ae.D$)(e).length>0&&(e.style.marginTop=-parseInt(getComputedStyle(e).marginTop,10)+"px"),this.popupObj.resolveCollision()},i.prototype.removeFocus=function(e,t){t&&t!==e&&(t.setAttribute("tabindex","-1"),(0,s.vy)([t],"e-node-focus"))},i.prototype.updateFocus=function(e){(0,s.hX)(e)||(e.focus(),(0,s.iQ)([e],["e-node-focus"]))},i.prototype.reactCallBack=function(){(0,s.hX)(this.popupObj)||(this.updatePopupHeight(),this.popupObj.refreshPosition())},i.prototype.updatePopupHeight=function(){if(!this.isFirstRender){var e=this.getHeight();if(this.popupEle.style.maxHeight=e,this.allowFiltering){var t=Math.round(this.filterContainer.getBoundingClientRect().height);e=(0,s.IV)(parseInt(e,10)-t+"px")}this.headerTemplate&&(t=Math.round(this.header.getBoundingClientRect().height),e=(0,s.IV)(parseInt(e,10)-t+"px")),this.showCheckBox&&this.showSelectAll&&!this.popupDiv.classList.contains(Ks)&&(t=Math.round(this.checkAllParent.getBoundingClientRect().height),e=(0,s.IV)(parseInt(e,10)-t+"px")),this.footerTemplate&&(t=Math.round(this.footer.getBoundingClientRect().height),e=(0,s.IV)(parseInt(e,10)-t+"px"));var n=parseInt(window.getComputedStyle(this.popupEle).borderTopWidth,10);n+=parseInt(window.getComputedStyle(this.popupEle).borderBottomWidth,10),e=(0,s.IV)(parseInt(e,10)-n+"px"),this.popupDiv.style.maxHeight=e}},i.prototype.createPopup=function(e){var t=this;this.isFirstRender&&(this.popupObj=new ae.zD(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(){t.isPopupOpen=!1},open:function(){document.addEventListener("mousedown",t.documentClickContext),t.isPopupOpen=!0},targetExitViewport:function(){s.Pw.isDevice||t.hidePopup()}}))},i.prototype.setElementWidth=function(e){var t=this.inputWrapper;(0,s.hX)(e)||("number"==typeof e?t.style.width=(0,s.IV)(e):"string"==typeof e&&(t.style.width=e.match(/px|%|em/)?e:(0,s.IV)(e)))},i.prototype.setWidth=function(){var e=(0,s.IV)(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},i.prototype.getHeight=function(){var e=(0,s.IV)(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},i.prototype.onDocumentClick=function(e){var t=e.target,n=(0,s.kp)(t,"."+_0),r=(0,s.kp)(t,"."+w0),o=(0,s.kp)(t,"."+P0),l=(0,s.kp)(t,"."+A0),h=!!t.classList.contains(T0)||(0,s.cK)(t,".e-ddt .e-popup")||(0,s.cK)(t,".e-ddt .e-treeview");this.isPopupOpen&&(!(0,s.hX)(this.inputWrapper)&&this.inputWrapper.contains(t)||n||h||o||l)||(this.allowMultiSelection||this.showCheckBox)&&(this.isPopupOpen&&t.classList.contains(Nu)||this.isPopupOpen&&(t.classList.contains(Oh)||t.classList.contains(x0)||t.classList.contains(Vu)))?(this.isDocumentClick=!1,e.preventDefault()):!(0,s.hX)(this.inputWrapper)&&!this.inputWrapper.contains(t)&&this.inputFocus&&!r&&this.focusOut(e)},i.prototype.onActionFailure=function(e){this.trigger("actionFailure",e),this.l10nUpdate(!0),(0,s.iQ)([this.popupDiv],Ks)},i.prototype.OnDataBound=function(e){this.treeItems=e.data,this.treeItems.length<=0?(this.l10nUpdate(),(0,s.iQ)([this.popupDiv],Ks),this.hideCheckAll(!0)):this.popupDiv.classList.contains(Ks)&&this.treeItems.length>=1&&((0,s.vy)([this.popupDiv],Ks),this.hideCheckAll(!1)),this.isFilteredData||(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(),this.isInitialized=!0),this.trigger("dataBound",{data:e.data}),null===this.filterObj&&(this.isFilteredData=!1),this.isFilteredData&&this.treeObj.expandAll(
1),this.isFilterRestore&&(this.restoreFilterSelection(),this.showSelectAll||(this.isFilterRestore=!1))},i.prototype.restoreFilterSelection=function(){this.showCheckBox?this.treeObj.checkedNodes=this.value?this.value:[]:this.treeObj.selectedNodes=this.value?this.value:[]},i.prototype.setCssClass=function(e,t){var n=this.popupObj?[this.inputWrapper,this.popupObj.element]:[this.inputWrapper];!(0,s.hX)(t)&&""!==t&&(0,s.vy)(n,t.split(" ")),!(0,s.hX)(e)&&""!==e&&(0,s.iQ)(n,e.split(" "))},i.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())},i.prototype.setEnable=function(){J.pd.setEnabled(this.enabled,this.inputEle),this.enabled?((0,s.vy)([this.inputWrapper],I0),this.inputEle.setAttribute("aria-disabled","false"),this.inputWrapper.setAttribute("aria-disabled","false")):(this.isPopupOpen&&this.hidePopup(),(0,s.iQ)([this.inputWrapper],I0),this.inputWrapper&&this.inputWrapper.classList.contains(Js)&&(0,s.vy)([this.inputWrapper],[Js]),this.inputEle.setAttribute("aria-disabled","true"),this.inputWrapper.setAttribute("aria-disabled","true"))},i.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,selectable:e.selectable,tableName:e.tableName,tooltip:e.tooltip}},i.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,selectable:e.selectable,tableName:e.tableName,tooltip:e.tooltip}},i.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,selectable:e.selectable,selected:e.selected,tableName:e.tableName,tooltip:e.tooltip}},i.prototype.getTreeChildren=function(e){if("string"==typeof e)return e;if(!(0,s.hX)(e)){var t=e=this.getActualProperties(e);return e.value&&(t.id=e.value),e.parentValue&&(t.parentID=e.parentValue),e.child&&(t.child=this.getTreeChildren(e.child)),e.selected&&this.showCheckBox&&(t.isChecked=e.selected),t}return null},i.prototype.getTreeDataType=function(e,t){if(this.fields.dataSource instanceof x.M1){for(var n=0;n<e.length;n++)if("string"==typeof t.child&&(0,s.hX)((0,s._W)(t.child,e[n])))return 1;return 2}(0,s.hX)(this.fields.dataSource)&&(this.fields.dataSource=[]),n=0;for(var r=this.fields.dataSource.length;n<r;n++){if("string"==typeof t.child&&!(0,s.hX)((0,s._W)(t.child,this.fields.dataSource[n])))return 2;if(!(0,s.hX)((0,s._W)(t.parentValue,this.fields.dataSource[n]))||!(0,s.hX)((0,s._W)(t.hasChildren,this.fields.dataSource[n])))return 1}return 1},i.prototype.setFields=function(){this.resetValue(),this.hasTemplate&&this.updateTemplate(),this.treeObj.fields=this.getTreeFields(this.fields),this.setProperties({value:this.oldValue},!0),this.treeObj.dataBind(),this.updateValue(this.value)},i.prototype.getEventArgs=function(e){var r;return this.showCheckBox&&("check"===e.action?r="select":"uncheck"===e.action&&(r="un-select")),{action:this.showCheckBox?r:e.action,isInteracted:!!this.isClicked||e.isInteracted,item:e.node,itemData:this.showCheckBox?e.data[0]:e.nodeData}},i.prototype.onBeforeSelect=function(e){e.isInteracted&&(this.setOldValue(),null===this.value&&this.setProperties({value:[]},!0))},i.prototype.updateHiddenValue=function(){this.allowMultiSelection||this.showCheckBox||(this.hiddenElement.innerHTML=this.value&&this.value.length?'<option selected value ="'+this.value[0]+'">'+this.text+"</option>":"")},i.prototype.onNodeSelected=function(e){if(!this.showCheckBox){var n,t=this.getEventArgs(e);if(this.trigger("select",t),e.isInteracted){var r=(0,s._W)("id",e.nodeData).toString();this.allowMultiSelection?this.allowMultiSelection&&this.setMultiSelect():(this.hiddenElement.innerHTML="",this.setProperties({value:[r]},!0),n=this.itemTemplate?(0,s._W)("text",this.treeObj.getNode(r)):(0,s._W)("text",e.nodeData).toString(),J.pd.setValue(n,this.inputEle,this.floatLabelType),this.setProperties({text:n},!0),this.currentText=this.text,this.currentValue=this.value,this.setValueTemplate(),!(0,s.hX)(this.value)&&this.value.length>0&&this.inputWrapper.setAttribute("aria-label",e.nodeData.text.toString()),(0,s.uK)(this.inputWrapper,{"aria-describedby":this.element.i
1d}),(0,s.uK)(this.inputWrapper,{"aria-activedescendant":r.toString()}),this.updateHiddenValue(),this.showOverAllClear(),this.hidePopup(),this.isNodeSelected=!0)}this.isValueChange&&!this.changeOnBlur&&(this.triggerChangeEvent(this.keyEventArgs),this.isValueChange=!1)}},i.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&&(this.setMultiSelect(),this.ensurePlaceHolder()),!this.changeOnBlur&&(this.allowMultiSelection||this.showCheckBox)&&this.triggerChangeEvent(e.event)},i.prototype.onNodeChecked=function(e){var t=this.getEventArgs(e);if(this.trigger("select",t),this.isFilteredData&&"uncheck"===e.action){var n=(0,s._W)("id",e.data[0]).toString();this.removeSelectedData(n,!0)}if((!this.isChipDelete&&e.isInteracted||!this.isFilteredData&&"check"===e.action&&this.isFromFilterChange)&&(this.setMultiSelect(),this.ensurePlaceHolder()),this.showSelectAll&&this.checkBoxElement){var r=this.treeObj.element.querySelectorAll("li:not(.e-disable)"),o=this.treeObj.element.querySelectorAll("li[aria-checked=true]"),l=(0,s.kp)(this.checkBoxElement,"."+Fu);l&&"uncheck"===e.action&&(e.isInteracted||0===o.length||!(0,s.hX)(e.data[0])&&"false"===e.data[0].isChecked)||!e.isInteracted&&this.isFilterRestore?(this.isFilterRestore=!1,this.isReverseUpdate=!0,this.changeState(l,"uncheck"),this.isReverseUpdate=!1):l&&"check"===e.action&&o.length===r.length&&(e.isInteracted||this.isCheckAllCalled||!(0,s.hX)(e.data[0])&&"true"===e.data[0].isChecked)&&(this.isReverseUpdate=!0,this.isCheckAllCalled=!1,this.changeState(l,"check"),this.isReverseUpdate=!1)}this.isValueChange&&!this.changeOnBlur&&(this.triggerChangeEvent(this.keyEventArgs),this.isValueChange=!1)},i.prototype.beforeCheck=function(e){e.isInteracted&&this.setOldValue()},i.prototype.onNodeExpanded=function(){if(this.hasTemplate&&this.portals&&this.treeObj.portals){for(var e=0;e<this.treeObj.portals.length;e++)-1===this.portals.indexOf(this.treeObj.portals[e])&&this.portals.push(this.treeObj.portals[e]);this.renderReactTemplates()}},i.prototype.updateClearButton=function(e){if(e?this.inputWrapper.contains(this.overAllClear)?((0,s.vy)([this.overAllClear],Ye),(0,s.iQ)([this.inputWrapper],Qs)):this.inputEle.parentElement.insertBefore(this.overAllClear,this.inputEle.nextSibling):((0,s.iQ)([this.overAllClear],Ye),(0,s.vy)([this.inputWrapper],Qs)),(this.allowMultiSelection||this.showCheckBox)&&this.chipWrapper)for(var t=(0,s.Ub)("."+Nu,this.chipWrapper),n=0;n<t.length;n++)e?(0,s.vy)([t[n]],Ye):(0,s.iQ)([t[n]],Ye)},i.prototype.updateDropDownIconState=function(e){var t=(0,s.Lt)("."+O0,this.inputWrapper);e?(t?(0,s.vy)([t],Ye):J.pd.appendSpan(y0,this.inputWrapper,this.createElement),(0,s.iQ)([this.inputWrapper],Lu)):((0,s.iQ)([t],Ye),(0,s.vy)([this.inputWrapper],Lu))},i.prototype.updateMode=function(){if("Custom"!==this.mode)if("Delimiter"!==this.mode){this.inputWrapper.contains(this.chipWrapper)||this.createChip();var e=this.getValidMode();this.chipWrapper.classList.contains(Ye)&&e?((0,s.vy)([this.chipWrapper],Ye),this.showOrHideValueTemplate(!1,!0),(0,s.iQ)([this.inputWrapper],Xi)):e||((0,s.iQ)([this.chipWrapper],Ye),(0,s.vy)([this.inputWrapper],Xi),this.showOrHideValueTemplate(!0)),e&&null!==this.value&&0!==this.value.length?(0,s.iQ)([this.inputEle],ui):(0,s.vy)([this.inputEle],ui)}else this.inputEle.classList.contains(ui)&&((0,s.vy)([this.inputEle],ui),this.chipWrapper&&((0,s.iQ)([this.chipWrapper],Ye),(0,s.vy)([this.inputWrapper],Xi),this.showOrHideValueTemplate(!0)))},i.prototype.ensurePlaceHolder=function(){((0,s.hX)(this.value)||null!==this.value&&0===this.value.length)&&((0,s.vy)([this.inputEle],ui),this.chipWrapper&&((0,s.iQ)([this.chipWrapper],Ye),this.showOrHideValueTemplate(!0)))},i.prototype.ensureClearIconPosition=function(e){"Never"!==e&&this.inputWrapper.insertBefore(this.overAllClear,this.inputObj.buttons[0])},i.prototype.setMultiSelectValue=function(e){var t=this;if(this.isFilteredData){var n=(0,s.hX)(this.value)?[]:this.value;n=n.filter(function(o){var l=t.treeObj.getTreeData(o);return!Array.isArray(l)||l.every(function(h){return h.selected})});for(var r=0;r<e.length;r++)((0,s.hX)(this.value)||-1===this.value.indexOf(e[r]))&&n.push(e[r]);this.setProperties({value:n},!0)}else this.setProperties({value:this.isFromFilterChange&&e&&0===e.length?this.value:e},!0),this.isFromFilterChange=!1,e&&0!==e.length&&!this.showCheckBox&&!this.ddtCompareValues(this.treeObj.selectedNodes,this.value.slice())&&(this.treeObj.selectedNodes=this.value.slice(),this.treeObj.dataBind())},i.prototype.setMultiSelect=function(){this.showCheckBox&&!this.isDynamicChange?this.setMultiSelectValue(this.treeObj.checkedNodes.slice()):(this.setMultiSelectValue(this.allowMultiSelection?this.showCheckBox?this.treeObj.checkedNodes:this.treeObj.selectedNodes:this.value?this.showCheckBox?this.value:[this.value[0]]:null),this.showCheckBox&&null!==this.value&&(this.treeObj.checkedNodes=this.value,this.treeObj.dataBind())),this.selectedText=[];var t=!!this.allowMultiSelection||!!this.showCheckBox;this.inputWrapper.contains(this.chipWrapper)&&!t&&((0,s.vy)([this.inputEle],ui),(0,s.Yo)(this.chipWrapper)),this.getValidMode()&&null!==this.value&&((0,s.iQ)([this.inputEle],ui),this.chipWrapper&&((0,s.vy)([this.chipWrapper],Ye),this.showOrHideValueTemplate(!1,!0))),this.chipWrapper&&"Box"===this.mode&&!(this.value&&this.value.length)&&((0,s.iQ)([this.chipWrapper],Ye),(0,s.vy)([this.inputEle],ui),this.showOrHideValueTemplate(!0)),this.updateSelectedValues()},i.prototype.getSelectedData=function(e){var t=null;if(this.isFilteredData)for(var n=0;n<this.selectedData.length;n++)if((0,s._W)(this.treeSettings.loadOnDemand?this.fields.value:"id",this.selectedData[n]).toString()===e){t=this.selectedData[n];break}return(0,s.hX)(t)&&(t=this.treeSettings.loadOnDemand?this.getNodeData(e,this.treeItems):this.treeObj.getNode(e),(0,s.hX)(t)||this.selectedData.push(t)),t},i.prototype.getNodeData=function(e,t){var n;if((0,s.hX)(e))return n;if(1!==this.treeDataType)return this.getChildNodeData(t,this.fields,e);for(var r=0,o=t.length;r<o;r++){var l=(0,s._W)(this.fields.value,t[r]);if(!(0,s.hX)(t[r])&&!(0,s.hX)(l)&&l.toString()===e)return t[r]}return n},i.prototype.getChildNodeData=function(e,t,n){var r;if((0,s.hX)(e))return r;for(var o=0,l=e.length;o<l;o++){var h=(0,s._W)(t.value,e[o]);if(e[o]&&h&&h.toString()===n)return e[o];if("string"!=typeof t.child||(0,s.hX)((0,s._W)(t.child,e[o]))){if(this.fields.dataSource instanceof x.M1&&!(0,s.hX)((0,s._W)("child",e[o]))&&void 0!==(r=this.getChildNodeData((0,s._W)("child",e[o]),this.getChildMapperFields(t),n)))break}else{var d=(0,s._W)(t.child,e[o]);if(void 0!==(r=this.getChildNodeData(d,this.getChildMapperFields(t),n)))break}}return r},i.prototype.getChildMapperFields=function(e){return"string"==typeof e.child||(0,s.hX)(e.child)?e:e.child},i.prototype.removeSelectedData=function(e,t){var n=(0,s.hX)(this.value)?[]:this.value.slice();n.splice(n.indexOf(e),1),this.setProperties({value:n},t);for(var r=0;r<this.selectedData.length;r++)if((0,s._W)(this.treeSettings.loadOnDemand?this.fields.value:"id",this.selectedData[r]).toString()===e){this.selectedData.splice(r,1);break}},i.prototype.initializeValueTemplate=function(){if(!this.valueTemplate)return null;if(this.valueTemplateContainer)for(;this.valueTemplateContainer.firstChild;)this.valueTemplateContainer.removeChild(this.valueTemplateContainer.firstChild);else this.valueTemplateContainer=this.createElement("span",{className:Hu+" "+Zs+" e-input-value "+Ye});return this.inputWrapper.insertBefore(this.valueTemplateContainer,this.inputEle),this.templateComplier(this.valueTemplate)},i.prototype.showOrHideValueTemplate=function(e,t){void 0===t&&(t=!1),this.valueTemplateContainer&&"Box"!==this.mode&&(e?((0,s.vy)([this.valueTemplateContainer],Ye),(0,s.iQ)([this.inputWrapper],Xi),(0,s.iQ)([this.inputEle],ui)):((0,s.iQ)([this.valueTemplateContainer],Ye),t||((0,s.vy)([this.inputWrapper],Xi),(0,s.vy)([this.inputEle],ui))))},i.prototype.updateSelectedValues=function(){var e=this;this.dataValue="";var t,n,o,r="";this.hiddenElement.innerHTML="";var l="";if((!this.isChipDelete||this.treeSettings.autoCheck)&&this.inputWrapper.contains(this.chipWrapper)&&(this.chipCollection.innerHTML=""),this.isFilteredData||(this.selectedData=[]),!(0,s.hX)(this.value)){for(var h=this.initializeValueTemplate(),d=0,p=this.value.length;d<p;d++)o=this.getSelectedData(this.value[d]),n=(0,s._W)(this.treeSettings.loadOnDemand?this.fields.text:"text",o),this.selectedText.push(n),t=this.selectedText[this.selectedText.length-1],this.selectedText.length>1?(this.dataValue+=this.delimiterChar+" "+t,r+=","+t):(this.dataValue+=t,r+=t),"Custom"!==this.mode&&"Delimiter"!==this.mode&&(!this.isChipDelete||this.treeSettings.autoCheck)&&(this.allowMultiSelection||this.showCheckBox)&&this.setChipValues(t,this.value[d]),l+='<option selected value ="'+this.value[d]+'">'+this.selectedText[this.selectedText.length-1]+"</option>",this.valueTemplate&&this.getValueTemplateElement(this.value[d],h);this.hasTemplate&&this.portals&&(this.treeObj.portals&&(this.portals=this.portals.concat(this.treeObj.portals.filter(function(f){return!e.portals.includes(f)}))),this.isReact&&this.renderReactTemplates(this.reactCallBack)),this.selectedText.length>=1&&this.setProperties({text:r},!0),this.hiddenElement.innerHTML=l,"Custom"===this.mode&&(this.allowMultiSelection||this.showCheckBox)&&this.setTagValues()}var u=this.getValidMode();"Custom"!==this.mode&&"Box"!==this.mode&&(this.allowMultiSelection||this.showCheckBox)&&!u&&(this.chipWrapper&&((0,s.iQ)([this.chipWrapper],Ye),(0,s.vy)([this.inputWrapper],Xi)),this.showOrHideValueTemplate(!0)),J.pd.setValue(this.dataValue,this.inputEle,this.floatLabelType),this.setProperties(""===r?{text:null}:{text:r},!0),this.showClearButton&&this.inputFocus&&this.showOverAllClear(),(this.allowMultiSelection||this.showCheckBox)&&this.popupObj&&this.popupObj.refreshPosition(),this.currentText=this.text,this.currentValue=this.value,!(0,s.hX)(this.value)&&this.value.length>0&&!(0,s.hX)(this.currentText)?this.inputWrapper.setAttribute("aria-label",this.currentText.replace(/,/g,", ")):this.inputWrapper.setAttribute("aria-label",this.getModuleName())},i.prototype.setChipValues=function(e,t){this.inputWrapper.contains(this.chipWrapper)||this.createChip();var n=this.createElement("span",{className:Ru,attrs:{"data-value":t}}),r=this.createElement("span",{className:E0}),o=this.createElement("span",{className:Nu+" e-icons"});this.enableHtmlSanitizer?r.innerText=s.r4.sanitize(e):r.innerHTML=e,n.appendChild(r),this.chipCollection.appendChild(n),this.showClearButton&&(n.appendChild(o),s.Jm.add(o,"mouseup",this.removeChip,this))},i.prototype.setTagValues=function(){if(null!==this.value&&null!=this.text&&0!==this.value.length){this.inputWrapper.contains(this.chipWrapper)||this.createChip(),this.inputWrapper.classList.contains(Xi)||(0,s.iQ)([this.inputWrapper],Xi);var e=this.createElement("span",{className:Ru});this.inputEle.classList.contains(ui)||(0,s.iQ)([this.inputEle],ui),this.chipWrapper.classList.contains(Ye)&&((0,s.vy)([this.chipWrapper],Ye),this.showOrHideValueTemplate(!1,!0));var t=this.createElement("span",{className:E0}),r=this.customTemplateId,h=this.templateComplier(this.customTemplate)({value:this.value,text:this.text},this,"customTemplate",r,this.isStringTemplate,void 0,t);h&&(h=Array.prototype.slice.call(h),(0,s.BC)(h,t)),e.appendChild(t),this.chipCollection.appendChild(e),this.isReact&&this.renderReactTemplates()}else this.inputWrapper.contains(this.chipWrapper)&&(0,s.iQ)([this.chipWrapper],Ye)},i.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)&&((0,s.Yo)(this.checkAllParent),this.checkAllParent=null))},i.prototype.setHeaderTemplate=function(){this.header?this.header.innerHTML="":(this.header=this.createElement("div"),(0,s.iQ)([this.header],P0));var t=this.templateComplier(this.headerTemplate)({},this,"headerTemplate",this.headerTemplateId,this.isStringTemplate,void 0,this.header);t&&(t=Array.prototype.slice.call(t),(0,s.BC)(t,this.header)),this.popupEle.insertBefore(this.header,this.checkAllParent?this.checkAllParent:this.popupDiv)},i.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&document.querySelectorAll(e).length?(0,s.wE)(document.querySelector(e).innerHTML.trim()):(0,s.wE)(e)}catch{return(0,s.wE)(e)}return(0,s.wE)(e)},i.prototype.setFooterTemplate=function(){this.footer?this.isReact&&"function"==typeof this.footerTemplate?this.clearTemplate(["footerTemplate"]):this.footer.innerHTML="":(this.footer=this.createElement("div"),(0,s.iQ)([this.footer],A0));var t=this.templateComplier(this.footerTemplate)({},this,"footerTemplate",this.footerTemplateId,this.isStringTemplate,void 0,this.footer);t&&(t=Array.prototype.slice.call(t),(0,s.BC)(t,this.footer)),(0,s.BC)([this.footer],this.popupEle)},i.prototype.clearAll=function(e){!this.enabled||this.readonly||
1(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))},i.prototype.removeChip=function(e){if(this.enabled&&!this.readonly){e.target.classList.contains("e-chips-close")&&!this.isPopupOpen&&(e.stopPropagation(),e.preventDefault());var t=e.target.parentElement,n=t.getAttribute("data-value");this.chipCollection&&t&&(0,s.TF)(t),this.isChipDelete=!0,this.isClearButtonClick=!0,this.removeSelectedData(n,!0),this.selectedText=[],this.allowMultiSelection&&(this.treeObj.selectedNodes=this.value.slice(),this.updateSelectedValues()),this.showCheckBox&&(this.treeObj.uncheckAll([n]),this.clearCheckAll(),this.setMultiSelect()),this.triggerChangeEvent(e),this.isChipDelete=!1,this.ensurePlaceHolder()}},i.prototype.resetValue=function(e){Array.isArray(this.value)&&0===this.value.length&&null==this.text||(J.pd.setValue(null,this.inputEle,this.floatLabelType),e||(this.setOldValue(),this.setProperties({value:[]},!0),this.showOrHideValueTemplate(!1)),((0,s.hX)(this.value)||0===this.value.length)&&this.inputWrapper.setAttribute("aria-label",this.getModuleName()),this.dataValue=null,this.setProperties({text:null},!0),this.selectedData=[],(0,s.KY)("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()))},i.prototype.clearCheckAll=function(){this.showSelectAll&&this.value&&0===this.value.length&&this.setLocale(!1)},i.prototype.setOldValue=function(){this.oldValue=Array.isArray(this.value)?this.value.slice():this.value},i.prototype.selectAllItems=function(e){if(this.showCheckBox)e?(this.isCheckAllCalled=!0,this.treeObj.checkAll()):this.treeObj.uncheckAll(),this.checkSelectAll=e;else if(this.allowMultiSelection)if(e){for(var t=(0,s.Ub)("li",this.treeObj.element),n=void 0,r=[],o=0;o<t.length;o++)n=t[o].getAttribute("data-uid").toString(),r.push(n);this.treeObj.selectedNodes=r}else this.treeObj.selectedNodes=[];this.updateMode(),this.setMultiSelect(),this.wrapText||(e?this.updateView():this.updateOverflowWrapper(!0))},i.prototype.updateTreeSettings=function(e){if("autoCheck"===e)this.treeObj.autoCheck=this.treeSettings.autoCheck;else if("loadOnDemand"===e)this.treeObj.loadOnDemand=this.treeSettings.loadOnDemand;else{if("expandOn"===e)return this.treeObj.expandOn=this.treeSettings.expandOn,void this.treeObj.dataBind();"checkDisabledChildren"===e&&(this.treeObj.checkDisabledChildren=this.treeSettings.checkDisabledChildren)}this.treeObj.dataBind(),this.setMultiSelect(),this.updateValue(this.value)},i.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},i.prototype.updateTemplate=function(){this.popupObj&&(this.clearTemplate(),this.portals=[],this.popupObj.destroy(),this.isPopupOpen?(this.hidePopup(),this.isFirstRender=!0,this.renderPopup()):this.isFirstRender=!0)},i.prototype.l10nUpdate=function(e){if(this.noRecord?this.noRecord.innerHTML="":this.noRecord=this.createElement("div"),"No Records Found"!==this.noRecordsTemplate||"The Request Failed"!==this.actionFailureTemplate){var n=e?this.actionFailureTemplateId:this.noRecordsTemplateId,r=e?"actionFailureTemplate":"noRecordsTemplate",l=this.templateComplier(e?this.actionFailureTemplate:this.noRecordsTemplate)({},this,r,n,this.isStringTemplate,void 0,this.noRecord);l&&(l=Array.prototype.slice.call(l),(0,s.BC)(l,this.noRecord))}else this.l10n=new s.Wo(this.getLocaleName(),{noRecordsTemplate:"No Records Found",actionFailureTemplate:"The Request Failed"},this.locale),this.noRecord.innerHTML=this.l10n.getConstant(e?"actionFailureTemplate":"noRecordsTemplate");(0,s.iQ)([this.noRecord],"e-ddt-nodata"),(0,s.Hs)([this.noRecord],this.popupDiv),this.treeObj&&this.treeObj.element.removeAttribute("aria-activedescendant")},i.prototype.updateRecordTemplate=function(e){this.treeItems&&this.treeItems.length<=0&&(this.l10nUpdate(e),this.hasTemplate&&this.updateTemplate())},i.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:Hu+" "+Ye}),this.inputWrapper.insertBefore(this.overFlowWrapper,this.hiddenElement))},i.prototype.updateMultiSelection=function(e){this.wrapText||this.updateOverflowWrapper(!1),this.treeObj.allowMultiSelection=e,this.treeObj.dataBind(),this.updateOption(),this.allowMultiSelection&&this.updateMode(),this.setMultiSelect()},i.prototype.updateAllowFiltering=function(e){this.isFirstRender||(e?this.renderFilter():this.destroyFilter())},i.prototype.updateFilterPlaceHolder=function(){this.filterObj&&(this.filterObj.placeholder=this.filterBarPlaceholder,this.filterObj.element.setAttribute("aria-label",this.filterBarPlaceholder))},i.prototype.updateValue=function(e){this.isDynamicChange=!0,(0,s.hX)(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},i.prototype.updateText=function(e){(0,s.hX)(e)?this.resetValue():(this.setTreeText(),(this.allowMultiSelection||this.showCheckBox)&&!this.wrapText&&(this.updateOverflowWrapper(!1),this.updateView())),this.updateHiddenValue()},i.prototype.updateModelMode=function(){if(this.allowMultiSelection||this.showCheckBox){if(!this.wrapText){var t=(0,s.Lt)(".e-overflow:not(.e-input-value)",this.inputWrapper);t&&(t.innerHTML="")}this.updateMode(),this.setMultiSelect(),!this.wrapText&&this.value&&0!==this.value.length&&(this.updateOverFlowView(),(0,s.iQ)([this.inputEle],ui),"Box"===this.mode?(0,s.vy)([this.overFlowWrapper,this.inputWrapper],Zs):(0,s.iQ)([this.overFlowWrapper,this.inputWrapper],Zs))}},i.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","")},i.prototype.onPropertyChanged=function(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"width":this.setElementWidth(e.width),this.popupObj&&(this.popupObj.element.style.width=this.setWidth());break;case"placeholder":J.pd.setPlaceholder(e.placeholder,this.inputEle);break;case"cssClass":this.setCssClass(e.cssClass,t.cssClass);break;case"enableRtl":this.setEnableRTL(this.enableRtl);break;case"fields":this.setFields();break;case"readonly":J.pd.setReadonly(e.readonly,this.inputEle);break;case"enabled":this.setEnable();break;case"floatLabelType":J.pd.removeFloating(this.inputObj),J.pd.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":JSON.stringify(t.value)!==JSON.stringify(e.value)&&(this.oldValue=t.value,this.updateV
1alue(e.value));break;case"text":this.updateText(e.text);break;case"allowMultiSelection":this.updateMultiSelection(e.allowMultiSelection);break;case"mode":if(!this.showCheckBox&&!this.allowMultiSelection)return;"Custom"===this.mode?(this.overFlowWrapper&&(0,s.Yo)(this.overFlowWrapper),this.chipWrapper&&(0,s.Yo)(this.chipWrapper),this.setTagValues()):("Custom"===t.mode&&this.updateOverflowWrapper(this.wrapText),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":for(var l=0,h=Object.keys(e.treeSettings);l<h.length;l++)this.updateTreeSettings(h[l]);break;case"customTemplate":if("Custom"!==this.mode)return;this.chipCollection.innerHTML="",this.setTagValues();break;case"sortOrder":this.hasTemplate&&this.updateTemplate(),this.treeObj.sortOrder=e.sortOrder,this.treeObj.dataBind(),this.updateValue(this.value);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?((0,s.iQ)([this.overFlowWrapper],Ye),this.chipWrapper&&"Box"===this.mode?(0,s.vy)([this.chipWrapper],Ye):((0,s.vy)([this.inputWrapper],Xi),(0,s.vy)([this.inputEle],ui)),this.ensurePlaceHolder()):this.updateView()}},i.prototype.clear=function(){this.clearAll(),this.inputFocus?this.onFocusOut():(this.changeOnBlur&&this.triggerChangeEvent(),this.removeValue=!1)},i.prototype.destroy=function(){for(this.clearTemplate(),this.unWireEvents(),this.setCssClass(null,this.cssClass),this.setProperties({text:null},!0),this.treeObj.destroy(),this.destroyFilter(),this.popupObj&&(this.popupObj.destroy(),(0,s.Yo)(this.popupObj.element)),this.element.tagName!==this.getDirective()&&this.inputWrapper.parentElement.insertBefore(this.element,this.inputWrapper),J.pd.setValue(null,this.inputEle,this.floatLabelType),(0,s.Yo)(this.inputWrapper),(0,s.Yo)(this.popupDiv),(0,s.Yo)(this.hiddenElement),J.pd.setRipple(!1,[this.inputObj]),this.element.classList.remove("e-input"),(this.showCheckBox||this.allowMultiSelection||this.value&&this.valueTemplateContainer)&&this.element.classList.remove(ui),(0,s.Yo)(this.inputObj.container),this.inputObj.buttons.length&&(0,s.Yo)(this.inputObj.buttons[0]),this.inputObj=null;this.hiddenElement.options.length>0;)this.hiddenElement.remove(0);if(this.hiddenElement.innerHTML="",this.hiddenElement=null,this.inputWrapper.innerHTML="",this.inputWrapper=null,this.popupDiv=null,this.tree=null,this.popupObj=null,this.treeObj=null,this.overAllClear=null,this.chipCollection)for(var t=0,n=(0,s.Ub)(".e-chips-close",this.chipCollection);t<n.length;t++)s.Jm.remove(n[t],"mouseup",this.removeChip);this.chipWrapper=null,this.chipCollection=null,this.checkAllParent=null,this.selectAllSpan=null,this.checkBoxElement=null,this.checkWrapper=null,this.popupEle=null,this.header=null,this.footer=null,this.overFlowWrapper=null,this.keyboardModule=null,a.prototype.destroy.call(this),this.setProperties({value:[]},!0)},i.prototype.destroyFilter=function(){this.filterObj&&(this.filterObj.destroy(),(0,s.Yo)(this.filterObj.element),(0,s.Yo)(this.filterContainer),this.filterObj=null)},i.prototype.destroyPopup=function(){this.isPopupOpen=!1,this.isReact&&this.clearTemplate(["headerTemplate","footerTemplate","itemTemplate","actionFailureTemplate","noRecordsTemplate"]),this.popupObj&&(this.popupObj.destroy(),(0,s.Yo)(this.popupObj.element))},i.prototype.ensureVisible=function(e){this.treeObj.ensureVisible(e)},i.prototype.getData=function(e){return this.treeObj.getTreeData(e)},i.prototype.hidePopup=function(){var e={popup:this.popupObj,cancel:!1};this.trigger("close",e),!e.cancel&&(this.inputWrapper.classList.remove(C0),this.popupEle&&(0,s.iQ)([this.popupEle],wh),(0,s.uK)(this.inputEle,{"aria-expanded":"false"}),this.popupObj&&this.isPopupOpen&&(this.popupObj.hide(),this.inputFocus&&
1(this.inputWrapper.focus(),this.allowFiltering&&(0,s.iQ)([this.inputWrapper],[Js])),this.isFilteredData&&(this.treeObj.treeData=this.treeData),this.destroyPopupOnHide&&(this.isFirstRender=!0,this.destroyPopup())))},i.prototype.selectAll=function(e){this.selectAllItems(e)},i.prototype.showPopup=function(){!this.enabled||this.readonly||this.isPopupOpen||(this.renderPopup(),this.focusIn())},i.prototype.getModuleName=function(){return"dropdowntree"},me([(0,s.mA)("The Request Failed")],i.prototype,"actionFailureTemplate",void 0),me([(0,s.mA)(!1)],i.prototype,"allowFiltering",void 0),me([(0,s.mA)(!1)],i.prototype,"allowMultiSelection",void 0),me([(0,s.mA)(!0)],i.prototype,"changeOnBlur",void 0),me([(0,s.mA)("")],i.prototype,"cssClass",void 0),me([(0,s.mA)("${value.length} item(s) selected")],i.prototype,"customTemplate",void 0),me([(0,s.mA)(",")],i.prototype,"delimiterChar",void 0),me([(0,s.mA)(!0)],i.prototype,"enabled",void 0),me([(0,s.pr)({},II)],i.prototype,"fields",void 0),me([(0,s.mA)(null)],i.prototype,"filterBarPlaceholder",void 0),me([(0,s.mA)("StartsWith")],i.prototype,"filterType",void 0),me([(0,s.mA)("Never")],i.prototype,"floatLabelType",void 0),me([(0,s.mA)(null)],i.prototype,"footerTemplate",void 0),me([(0,s.mA)(!1)],i.prototype,"ignoreAccent",void 0),me([(0,s.mA)(!0)],i.prototype,"ignoreCase",void 0),me([(0,s.mA)(null)],i.prototype,"headerTemplate",void 0),me([(0,s.mA)({})],i.prototype,"htmlAttributes",void 0),me([(0,s.mA)(null)],i.prototype,"itemTemplate",void 0),me([(0,s.mA)("Default")],i.prototype,"mode",void 0),me([(0,s.mA)("No Records Found")],i.prototype,"noRecordsTemplate",void 0),me([(0,s.mA)(null)],i.prototype,"placeholder",void 0),me([(0,s.mA)("300px")],i.prototype,"popupHeight",void 0),me([(0,s.mA)("100%")],i.prototype,"popupWidth",void 0),me([(0,s.mA)(!1)],i.prototype,"readonly",void 0),me([(0,s.mA)(!1)],i.prototype,"showSelectAll",void 0),me([(0,s.mA)("Select All")],i.prototype,"selectAllText",void 0),me([(0,s.mA)(!1)],i.prototype,"showCheckBox",void 0),me([(0,s.mA)(!0)],i.prototype,"destroyPopupOnHide",void 0),me([(0,s.mA)(!0)],i.prototype,"enableHtmlSanitizer",void 0),me([(0,s.mA)(!0)],i.prototype,"showClearButton",void 0),me([(0,s.mA)(!0)],i.prototype,"showDropDownIcon",void 0),me([(0,s.mA)("None")],i.prototype,"sortOrder",void 0),me([(0,s.mA)(null)],i.prototype,"text",void 0),me([(0,s.pr)({},xI)],i.prototype,"treeSettings",void 0),me([(0,s.mA)("Unselect All")],i.prototype,"unSelectAllText",void 0),me([(0,s.mA)(null)],i.prototype,"value",void 0),me([(0,s.mA)(null)],i.prototype,"valueTemplate",void 0),me([(0,s.mA)("100%")],i.prototype,"width",void 0),me([(0,s.mA)(1e3)],i.prototype,"zIndex",void 0),me([(0,s.mA)(!1)],i.prototype,"wrapText",void 0),me([(0,s.Jh)()],i.prototype,"actionFailure",void 0),me([(0,s.Jh)()],i.prototype,"beforeOpen",void 0),me([(0,s.Jh)()],i.prototype,"change",void 0),me([(0,s.Jh)()],i.prototype,"close",void 0),me([(0,s.Jh)()],i.prototype,"blur",void 0),me([(0,s.Jh)()],i.prototype,"created",void 0),me([(0,s.Jh)()],i.prototype,"dataBound",void 0),me([(0,s.Jh)()],i.prototype,"destroyed",void 0),me([(0,s.Jh)()],i.prototype,"filtering",void 0),me([(0,s.Jh)()],i.prototype,"focus",void 0),me([(0,s.Jh)()],i.prototype,"keyPress",void 0),me([(0,s.Jh)()],i.prototype,"open",void 0),me([(0,s.Jh)()],i.prototype,"select",void 0),me([s.kc],i)}(s.uA),OI=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),jt=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},D0="e-atc-spinner-icon";he.root="e-combobox";var AI={container:null,buttons:[]},k0=function(a){function i(e,t){return a.call(this,e,t)||this}return OI(i,a),i.prototype.preRender=function(){a.prototype.preRender.call(this)},i.prototype.getLocaleName=function(){return"combo-box"},i.prototype.wireEvent=function(){"combobox"===this.getModuleName()&&(s.Jm.add(this.inputWrapper.buttons[0],"mousedown",this.preventBlur,this),s.Jm.add(this.inputWrapper.container,"blur",this.onBlurHandler,this)),(0,s.hX)(this.inputWrapper.buttons[0])||s.Jm.add(this.inputWrapper.buttons[0],"mousedown",this.dropDownClick,this),s.Jm.add(this.inputElement,"focus",this.targetFocus,this),this.readonly||
1(s.Jm.add(this.inputElement,"input",this.onInput,this),s.Jm.add(this.inputElement,"keyup",this.onFilterUp,this),s.Jm.add(this.inputElement,"keydown",this.onFilterDown,this),s.Jm.add(this.inputElement,"paste",this.pasteHandler,this),s.Jm.add(window,"resize",this.windowResize,this)),this.bindCommonEvent()},i.prototype.preventBlur=function(e){(!this.allowFiltering&&document.activeElement!==this.inputElement&&!document.activeElement.classList.contains(he.input)&&s.Pw.isDevice||!s.Pw.isDevice)&&e.preventDefault()},i.prototype.onBlurHandler=function(e){var t=this.inputElement&&""===this.inputElement.value?null:this.inputElement&&this.inputElement.value,n=(0,s.hX)(this.text)?this.text:this.text.replace(/\r\n|\n|\r/g,"");!(0,s.hX)(this.listData)&&!(0,s.hX)(t)&&t!==n&&this.customValue(e),a.prototype.onBlurHandler.call(this,e)},i.prototype.targetElement=function(){return this.inputElement},i.prototype.setOldText=function(e){J.pd.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton),this.customValue(),this.removeSelection()},i.prototype.setOldValue=function(e){this.allowCustom?(this.selectedLI=this.getElementByValue(this.value),this.valueMuteChange(this.value)):this.valueMuteChange(null),this.removeSelection(),this.setHiddenValue()},i.prototype.valueMuteChange=function(e){e=this.allowObjectBinding&&!(0,s.hX)(e)?(0,s._W)(this.fields.value?this.fields.value:"",e):e;var t=(0,s.hX)(e)?null:e.toString();J.pd.setValue(t,this.inputElement,this.floatLabelType,this.showClearButton);var n={};if(this.allowObjectBinding&&(e=this.getDataByValue(e),(0,s.hX)(e))){var r=this.fields,o=!1,l=!1;if(this.allowObjectBinding){var h=Object.keys(this.value);h.forEach(function(u){u!==r.value||(l=!0)}),h.forEach(function(u){u!==r.text||(o=!0)})}n={text:l?(0,s._W)(o?r.text:r.value,this.value):null,value:l?this.value:null,index:null}}this.setProperties(this.allowObjectBinding?n:{value:e,text:e&&e.toString(),index:null},!0),this.activeIndex=this.index;var d=this.fields,p={};p[d.text]=(0,s.hX)(e)?null:e.toString(),p[d.value]=(0,s.hX)(e)?null:e.toString(),this.itemData=p,this.item=null,(!this.allowObjectBinding&&this.previousValue!==this.value||this.allowObjectBinding&&this.previousValue&&this.value&&!this.isObjectInArray(this.previousValue,[this.value]))&&this.detachChangeEvent(null)},i.prototype.updateValues=function(){var e=this;if(this.fields.disabled&&(null!=this.value&&(this.value=this.isDisableItemValue(this.value)?null:this.value),null!=this.text&&(this.text=this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text)))?null:this.text),null!=this.index&&(this.index=this.isDisabledItemByIndex(this.index)?null:this.index,this.activeIndex=this.index)),(0,s.hX)(this.value))this.text&&(0,s.hX)(this.value)?(n=this.getElementByText(this.text))?this.setSelection(n,null):(J.pd.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton),this.customValue()):this.setSelection(this.liCollections[this.activeIndex],null);else{var t=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value,n=this.getElementByValue(t),r=!(0,s.hX)(n);if(this.enableVirtualization&&this.value){var o=this.fields.value?this.fields.value:"",l=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value;if(this.dataSource instanceof x.M1)this.dataSource.executeQuery((new x.XK).where(new x.mT(o,"equal",l))).then(function(u){if(u.result.length>0){e.itemData=u.result[0];var f=e.getItemData(),m=e.allowObjectBinding?e.getDataByValue(f.value):f.value;(e.value===f.value&&e.text!==f.text||e.value!==f.value&&e.text===f.text)&&e.setProperties({text:f.text?f.text.toString():f.text,value:m})}else e.valueMuteChange(null)});else{var h=new x.M1(this.dataSource).executeLocal((new x.XK).where(new x.mT(o,"equal",l)));if(h&&h.length>0){this.itemData=h[0],r=!0;var d=this.getItemData(),p=this.allowObjectBinding?this.getDataByValue(d.value):d.value;(this.value===d.value&&this.text!==d.text||this.value!==d.value&&this.text===d.text)&&(this.setProperties({text:d.text?d.text.toString():d.text,value:p}),(0,s.hX)(n)&&(this.previousValue=this.value))}}}n?this.setSelection(n,null):!this.enableVirtualization&&this.allowCustom||this.allowCustom&&this.enableVirtualization&&!r?this.valueMuteChange(this.value):(!this.enableVirtualization||this.enableVirtualization&&!(this.dataSource instanceof x.M1)&&!r)&&this.valueMuteChange(null)}this.setHiddenValue(),J.pd.setValue(this.text,this.inputElement,this.floatLabelType,this.showClearButton)},i.prototype.updateIconState=function(){this.showClearButton&&(this.inputElement&&""!==this.inputElement.value&&!this.readonly?(0,s.vy)([this.inputWrapper.clearButton],he.clearIconHide):(0,s.iQ)([this.inputWrapper.clearButton],he.clearIconHide))},i.prototype.getAriaAttributes=function(){return{role:"combobox","aria-autocomplete":"both","aria-labelledby":this.hiddenElement.id,"aria-expanded":"false","aria-readonly":this.readonly?this.readonly.toString():"false",autocomplete:"off",autocapitalize:"off",spellcheck:"false"}},i.prototype.searchLists=function(e){this.isTyped=!0,this.isFiltering()?(a.prototype.searchLists.call(this,e),this.ulElement&&""===this.filterInput.value.trim()&&this.setHoverList(this.ulElement.querySelector("."+he.li))):(this.ulElement&&""===this.inputElement.value&&this.preventAutoFill&&this.setHoverList(this.ulElement.querySelector("."+he.li)),this.incrementalSearch(e))},i.prototype.getNgDirective=function(){return"EJS-COMBOBOX"},i.prototype.setSearchBox=function(){return this.filterInput=this.inputElement,this.isFiltering()||this.isReact&&"combobox"===this.getModuleName()?this.inputWrapper:AI},i.prototype.onActionComplete=function(e,t,n,r){var o=this;a.prototype.onActionComplete.call(this,e,t,n),this.isSelectCustom&&this.removeSelection(),!this.preventAutoFill&&"combobox"===this.getModuleName()&&this.isTyped&&!this.enableVirtualization&&setTimeout(function(){o.inl
1ineSearch()})},i.prototype.getFocusElement=function(){var e=this.isSelectCustom?{text:""}:this.getItemData(),t=(0,s.hX)(this.list)?this.list:this.list.querySelector("."+he.selected);if(e.text&&e.text.toString()===this.inputElement.value&&!(0,s.hX)(t))return t;if((s.Pw.isDevice&&!this.isDropDownClick||!s.Pw.isDevice)&&!(0,s.hX)(this.liCollections)&&this.liCollections.length>0){var r=this.inputElement.value,o=this.sortedData,l=this.typeOfData(o).typeof,h=Pn(r,this.liCollections,this.filterType,!0,o,this.fields,l,this.ignoreAccent);if(this.enableVirtualization&&""!==r&&"autocomplete"!==this.getModuleName()&&this.isTyped&&!this.allowFiltering){var d=!1,u=0===this.incrementalEndIndex;for((this.viewPortInfo.endIndex>=this.incrementalEndIndex&&this.incrementalEndIndex<=this.totalItemCount||u)&&(d=!0,this.incrementalStartIndex=this.incrementalEndIndex,this.incrementalEndIndex=u?Math.min(100,this.totalItemCount):Math.min(this.incrementalEndIndex+100,this.totalItemCount),this.updateIncrementalInfo(this.incrementalStartIndex,this.incrementalEndIndex),d=!0),(0!==this.viewPortInfo.startIndex||d)&&this.updateIncrementalView(0,this.itemCount),h=Pn(r,this.incrementalLiCollections,this.filterType,!0,o,this.fields,l);(0,s.hX)(h.item)&&this.incrementalEndIndex<this.totalItemCount;){if(this.incrementalStartIndex=this.incrementalEndIndex,this.incrementalEndIndex=this.incrementalEndIndex+100>this.totalItemCount?this.totalItemCount:this.incrementalEndIndex+100,this.updateIncrementalInfo(this.incrementalStartIndex,this.incrementalEndIndex),d=!0,(0!==this.viewPortInfo.startIndex||d)&&this.updateIncrementalView(0,this.itemCount),h=Pn(r,this.incrementalLiCollections,this.filterType,!0,o,this.fields,l),!(0,s.hX)(h)){h.index=h.index+this.incrementalStartIndex;break}if((0,s.hX)(h)&&this.incrementalEndIndex>=this.totalItemCount){this.incrementalStartIndex=0,this.incrementalEndIndex=100>this.totalItemCount?this.totalItemCount:100;break}}var f=h.index-(this.itemCount/2-2)>0?h.index-(this.itemCount/2-2):0;f!==this.viewPortInfo.startIndex&&this.updateIncrementalView(f,this.viewPortInfo.startIndex+this.itemCount>this.totalItemCount?this.totalItemCount:this.viewPortInfo.startIndex+this.itemCount),(0,s.hX)(h.item)?(this.updateIncrementalView(0,this.itemCount),this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues(),this.list.scrollTop=0):(this.updateIncrementalView(this.viewPortInfo.startIndex+(this.itemCount/2-2)<this.totalItemCount?this.viewPortInfo.startIndex+(this.itemCount/2-2):this.totalItemCount,this.viewPortInfo.startIndex+this.itemCount>this.totalItemCount?this.totalItemCount:this.viewPortInfo.startIndex+this.itemCount),h.item=this.getElementByValue(h.item.getAttribute("data-value"))),h&&h.item&&(h.item=this.getElementByValue(h.item.getAttribute("data-value")))}var b=h.item,y=this.getItemData();if(!(0,s.hX)(b)&&!this.enableVirtualization||this.enableVirtualization&&this.isTyped&&(0,s.hX)(y)&&(0,s.hX)(y.value)&&y.value.toString()===b.getAttribute("data-value").toString()){var S=this.getIndexByValue(b.getAttribute("data-value"))-1,E=parseInt(getComputedStyle(this.liCollections[0],null).getPropertyValue("height"),10);if(!isNaN(E)&&"autocomplete"!==this.getModuleName()){this.removeFocus();var _=this.fields.groupBy?this.liCollections[0].offsetHeight:0;if(this.enableVirtualization){if(this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues(),this.enableVirtualization&&!this.fields.groupBy){var A=b.offsetHeight,M=b.offsetTop+(this.virtualListInfo&&this.virtualListInfo.startIndex?this.virtualListInfo.startIndex:0)*A,D=this.list.querySelectorAll(".e-virtual-list").length;this.list.scrollTop=M-D*A}}else this.list.scrollTop=S*E+_;(0,s.iQ)([b],he.focus)}}else this.isSelectCustom&&""!==this.inputElement.value.trim()&&(this.removeFocus(),this.enableVirtualization||(this.list.scrollTop=0));return b}return null},i.prototype.setValue=function(e){return(e&&"keydown"===e.type&&"enter"===e.action||e&&"click"===e.type)&&this.removeFillSelection(),this.autofill&&"combobox"===this.getModuleName()&&e&&"keydown"===e.type&&"enter"!==e.action?(this.preventAutoFill=!1,this.inlineSearch(e),!1):a.prototype.setValue.call(this,e)},i.prototype.checkCustomValue=function(){var e=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value;this.itemData=this.getDataByValue(e);var t=this.getItemData(),n=this.allowObjectBinding?this.itemData:t.value;this.allowCustom&&(0,s.hX)(t.value)&&(0,s.hX)(t.text)||this.setProperties({value:n},!this.allowCustom)},i.prototype.showSpinner=function(){(0,s.hX)(this.spinnerElement)&&(this.spinnerElement="autocomplete"===this.getModuleName()?this.inputWrapper.buttons[0]||this.inputWrapper.clearButton||J.pd.appendSpan("e-input-group-icon "+D0,this.inputWrapper.container,this.createElement):this.inputWrapper.buttons[0]||this.inputWrapper.clearButton,(0,s.iQ)([this.spinnerElement],he.disableIcon),(0,ae.GF)({target:this.spinnerElement,width:s.Pw.isDevice?"16px":"14px"},this.createElement),(0,ae.xc)(this.spinnerElement))},i.prototype.hideSpinner=function(){(0,s.hX)(this.spinnerElement)||((0,ae.W$)(this.spinnerElement),(0,s.vy)([this.spinnerElement],he.disableIcon),this.spinnerElement.classList.contains(D0)?(0,s.Yo)(this.spinnerElement):this.spinnerElement.innerHTML="",this.spinnerElement=null)},i.prototype.setAutoFill=function(e,t){if(t||this.setHoverList(e),this.autofill&&!this.preventAutoFill){var n=this.getTextByValue(e.getAttribute("data-value")).toString(),r=this.getFormattedValue(e.getAttribute("data-value"));"combobox"===this.getModuleName()&&(!this.isSelected&&!this.allowObjectBinding&&this.previousValue!==r||this.allowObjectBinding&&this.previousValue&&r&&!this.isObjectInArray(this.previousValue,[this.getDataByValue(r)])?(this.updateSelectedItem(e,null),this.isSelected=!0,this.previousValue=this.allowObjectBinding?this.getDataByValue(this.getFormattedValue(e.getAttribute("data-value"))):this.getFormattedValue(e.getAttribute("data-value"))):this.updateSelectedItem(e,null,!0)),this.isAndroidAutoFill(n)||this.setAutoFillSelection(n,t)}},i.prototype.isAndroidAutoFill=function(e){if(s.Pw.isAndroid){var t=this.getSelectionPoints(),n=this.prevSelectPoints.end,r=t.end,o=this.prevSelectPoints.start,l=t.start;return 0!==n&&(n===e.length&&o===e.length||o>l&&n>r||n===r&&o===l)}return!1},i.prototype.clearAll=function(e,t){((0,s.hX)(t)||!(0,s.hX)(t)&&(0,s.hX)(t.dataSource))&&a.prototype.clearAll.call(this,e),this.isFiltering()&&!(0,s.hX)(e)&&e.target===this.inputWrapper.clearButton&&(this.t
1ypedString=this.filterInput.value,this.searchLists(e))},i.prototype.isSelectFocusItem=function(e){return!(0,s.hX)(e)},i.prototype.inlineSearch=function(e){var t=e&&("down"===e.action||"up"===e.action||"home"===e.action||"end"===e.action||"pageUp"===e.action||"pageDown"===e.action),n=t?this.liCollections[this.activeIndex]:this.getFocusElement();if((0,s.hX)(n)){if((0,s.hX)(this.inputElement)||""!==this.inputElement.value)this.activeIndex=null,this.removeSelection(),this.liCollections&&this.liCollections.length>0&&!this.isCustomFilter&&this.removeFocus();else if(this.activeIndex=null,!(0,s.hX)(this.list)){this.enableVirtualization||(this.list.scrollTop=0);var o=this.list.querySelector("."+he.li);this.setHoverList(o)}}else{if(!t){var r=this.getFormattedValue(n.getAttribute("data-value"));this.activeIndex=this.getIndexByValue(r),this.activeIndex=(0,s.hX)(this.activeIndex)?null:this.activeIndex}this.preventAutoFill=""!==this.inputElement.value&&this.preventAutoFill,this.setAutoFill(n,t)}},i.prototype.incrementalSearch=function(e){this.showPopup(e),(0,s.hX)(this.listData)||(this.inlineSearch(e),e.preventDefault())},i.prototype.setAutoFillSelection=function(e,t){void 0===t&&(t=!1);var n=this.getSelectionPoints(),r=this.inputElement.value.substr(0,n.start);if(r&&r.toLowerCase()===e.substr(0,n.start).toLowerCase()){var o=r+e.substr(r.length,e.length);J.pd.setValue(o,this.inputElement,this.floatLabelType,this.showClearButton),this.inputElement.setSelectionRange(n.start,this.inputElement.value.length)}else t&&(J.pd.setValue(e,this.inputElement,this.floatLabelType,this.showClearButton),this.inputElement.setSelectionRange(0,this.inputElement.value.length))},i.prototype.getValueByText=function(e){return a.prototype.getValueByText.call(this,e,!0,this.ignoreAccent)},i.prototype.unWireEvent=function(){"combobox"===this.getModuleName()&&(s.Jm.remove(this.inputWrapper.buttons[0],"mousedown",this.preventBlur),s.Jm.remove(this.inputWrapper.container,"blur",this.onBlurHandler)),(0,s.hX)(this.inputWrapper.buttons[0])||s.Jm.remove(this.inputWrapper.buttons[0],"mousedown",this.dropDownClick),this.inputElement&&(s.Jm.remove(this.inputElement,"focus",this.targetFocus),this.readonly||(s.Jm.remove(this.inputElement,"input",this.onInput),s.Jm.remove(this.inputElement,"keyup",this.onFilterUp),s.Jm.remove(this.inputElement,"keydown",this.onFilterDown),s.Jm.remove(this.inputElement,"paste",this.pasteHandler),s.Jm.remove(window,"resize",this.windowResize))),this.unBindCommonEvent()},i.prototype.setSelection=function(e,t){a.prototype.setSelection.call(this,e,t),!(0,s.hX)(e)&&!this.autofill&&!this.isDropDownClick&&this.removeFocus()},i.prototype.selectCurrentItem=function(e){var t;if(this.isPopupOpen){if(t=this.list.querySelector(this.isSelected?"."+he.selected:"."+he.focus),this.isDisabledElement(t))return;t&&(this.setSelection(t,e),this.isTyped=!1),this.isSelected&&(this.isSelectCustom=!1,this.onChangeEvent(e))}"enter"===e.action&&""===this.inputElement.value?this.clearAll(e):this.isTyped&&!this.isSelected&&(0,s.hX)(t)&&this.customValue(e),this.hidePopup(e)},i.prototype.setHoverList=function(e){this.removeSelection(),this.isValidLI(e)&&!e.classList.contains(he.selected)&&(this.removeFocus(),e.classList.add(he.focus))},i.prototype.targetFocus=function(e){s.Pw.isDevice&&!this.allowFiltering&&(this.preventFocus=!1),this.onFocus(e),J.pd.calculateWidth(this.inputElement,this.inputWrapper.container)},i.prototype.dropDownClick=function(e){e.preventDefault(),s.Pw.isDevice&&!this.isFiltering()&&(this.preventFocus=!0),a.prototype.dropDownClick.call(this,e)},i.prototype.customValue=function(e){var t=this,n=this.getValueByText(this.inputElement.value);if(this.allowCustom||""===this.inputElement.value)if(""!==this.inputElement.value){var l=this.value;if((0,s.hX)(n)){var h=""===this.inputElement.value?null:this.inputElement.value,d={text:h,item:{}};this.isObjectCustomValue=!0,this.initial?this.updateCustomValueCallback(h,d,l):this.trigger("customValueSpecifier",d,function(p){t.updateCustomValueCallback(h,p,l,e)})}else this.isSelectCustom=!1,n=this.allowObjectBinding?this.getDataByValue(n):n,this.setProperties({value:n}),(!this.allowObjectBinding&&l!==this.value||this.allowObjectBinding&&l&&this.value&&!this.isObjectInArray(l,[this.value]))&&this.onChangeEvent(e)}else this.allowCustom&&this.isFocused&&(this.isSelectCustom=!0);else{var r=this.previousValue,o=this.value;n=this.allowObjectBinding?this.getDataByValue(n):n,this.setProperties({value:n}),(0,s.hX)(this.value)&&J.pd.setValue("",this.inputElement,this.floatLabelType,this.showClearButton),this.autofill&&(!this.allowObjectBinding&&r===this.value||this.allowObjectBinding&&r&&this.isObjectInArray(r,[this.value]))&&(!this.allowObjectBinding&&o!==this.value||this.allowObjectBinding&&o&&!this.isObjectInArray(o,[this.value]))&&this.onChangeEvent(null)}},i.prototype.updateCustomValueCallback=function(e,t,n,r){var o=this,l=this.fields,h=t.item,d={};h&&(0,s._W)(l.text,h)&&(0,s._W)(l.value,h)?d=h:((0,s.KY)(l.text,e,d),(0,s.KY)(l.value,e,d)),this.itemData=d;var p={};if(this.allowObjectBinding){var u=Object.keys(this.listData&&this.listData.length>0?this.listData[0]:this.itemData);!(this.listData&&this.listData.length>0)&&("autocomplete"===this.getModuleName()||"combobox"===this.getModuleName()&&this.allowFiltering)&&(u=Object.keys(this.firstItem?this.firstItem:this.itemData)),u.forEach(function(m){p[m]=m===l.value||m===l.text?(0,s._W)(l.value,o.itemData):null})}var f={text:(0,s._W)(l.text,this.itemData),value:this.allowObjectBinding?p:(0,s._W)(l.value,this.itemData),index:null};this.setProperties(f,!0),this.setSelection(null,null),this.isSelectCustom=!0,this.isObjectCustomValue=!1,(!this.allowObjectBinding&&n!==this.value||this.allowObjectBinding&&(null==n&&null!==this.value||n&&!this.isObjectInArray(n,[this.value])))&&this.onChangeEvent(r,!0)},i.prototype.onPropertyChanged=function(e,t){"combobox"===this.getModuleName()&&(this.checkData(e),this.setUpdateInitial(["fields","query","dataSource"],e,t));for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];switch(o){case"readonly":J.pd.setReadonly(this.readonly,this.inputElement),this.readonly?(s.Jm.remove(this.inputElement,"input",this.onInput),s.Jm.remove(this.inputElement,"keyup",this.onFilterUp),s.Jm.remove(this.inputElement,"keydown",this.onFilterDown)):(s.Jm.add(this.inputElement,"input",this.onInput,this),s.Jm.add(this.inputElement,"keyup",this.onFilterUp,this),s.Jm.add(this.inputElement,"keydown",this.onFilterDown,this)),this.setReadOnly();break;case"allowFiltering":this.setSearchBox(),this.isFiltering()&&"combobox"===this.getModuleName()&&(0,s.hX)(this.list)&&a.prototype.renderList.call(this);break;case"allowCustom":break;default:var l=this.getPropObject(o,e,t);a.prototype.onPropertyChanged.call(this,l.newProperty,l.oldProperty),this.isFiltering()&&"dataSource"===o&&(0,s.hX)(this.list)&&this.itemTemplate&&"combobox"===this.getModuleName()&&a.prototype.renderList.call(this)}}},i.prototype.render=function(){a.prototype.render.call(this),this.setSearchBox(),this.renderComplete(),this.autoFill=this.autofill},i.prototype.getModuleName=function(){return"combobox"},i.prototype.addItem=function(e,t){a.prototype.addItem.call(this,e,t)},i.prototype.filter=function(e,t,n){a.prototype.filter.call(this,e,t,n)},i.prototype.showPopup=function(e){a.prototype.showPopup.call(this,e)},i.prototype.hidePopup=function(e){var t=this.inputElement&&""===this.inputElement.value?null:this.inputElement&&this.inputElement.value;if(!(0,s.hX)(this.listData)){var n=this.isEscapeKey;
1this.isEscapeKey&&(J.pd.setValue(this.typedString,this.inputElement,this.floatLabelType,this.showClearButton),this.isEscapeKey=!1),this.autofill&&this.removeFillSelection();var r=this.isSelectCustom?{text:""}:this.getItemData(),o=(0,s.hX)(r.text)?r.text:r.text.toString().replace(/\r\n|\n|\r/g,""),l=(0,s.hX)(this.list)?null:this.list.querySelector("."+he.selected);if(this.inputElement&&o===this.inputElement.value&&!(0,s.hX)(l))return this.isSelected&&(this.onChangeEvent(e),this.isSelectCustom=!1),void a.prototype.hidePopup.call(this,e);if("combobox"===this.getModuleName()&&""!==this.inputElement.value.trim()){var h=this.sortedData,d=this.typeOfData(h).typeof,p=Pn(this.inputElement.value,this.liCollections,"Equal",!0,h,this.fields,d);this.selectedLI=p.item,(0,s.hX)(p.index)&&(p.index=Pn(this.inputElement.value,this.liCollections,"StartsWith",!0,h,this.fields,d).index),this.activeIndex=p.index,(0,s.hX)(this.selectedLI)?n&&(this.isSelectCustom=!0,this.removeSelection()):this.updateSelectedItem(this.selectedLI,null,!0)}!this.isEscapeKey&&this.isTyped&&!this.isInteracted&&this.customValue(e)}var u=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value;(0,s.hX)(this.listData)&&this.allowCustom&&!(0,s.hX)(t)&&t!==u&&this.customValue(),a.prototype.hidePopup.call(this,e)},i.prototype.focusIn=function(){this.enabled&&(s.Pw.isDevice&&!this.isFiltering()&&(this.preventFocus=!0),a.prototype.focusIn.call(this))},i.prototype.clear=function(){this.value=null},i.prototype.focusOut=function(e){a.prototype.focusOut.call(this,e)},i.prototype.getItems=function(){return a.prototype.getItems.call(this)},i.prototype.getDataByValue=function(e){return a.prototype.getDataByValue.call(this,e)},i.prototype.renderHightSearch=function(){},jt([(0,s.mA)(!1)],i.prototype,"autofill",void 0),jt([(0,s.mA)(!0)],i.prototype,"allowCustom",void 0),jt([(0,s.mA)({})],i.prototype,"htmlAttributes",void 0),jt([(0,s.mA)(!1)],i.prototype,"allowFiltering",void 0),jt([(0,s.mA)(!0)],i.prototype,"isDeviceFullScreen",void 0),jt([(0,s.mA)(null)],i.prototype,"query",void 0),jt([(0,s.mA)(null)],i.prototype,"index",void 0),jt([(0,s.mA)(!0)],i.prototype,"showClearButton",void 0),jt([(0,s.Jh)()],i.prototype,"customValueSpecifier",void 0),jt([(0,s.Jh)()],i.prototype,"filtering",void 0),jt([(0,s.mA)(null)],i.prototype,"valueTemplate",void 0),jt([(0,s.mA)("Never")],i.prototype,"floatLabelType",void 0),jt([(0,s.mA)(null)],i.prototype,"filterBarPlaceholder",void 0),jt([(0,s.mA)(null)],i.prototype,"cssClass",void 0),jt([(0,s.mA)(null)],i.prototype,"headerTemplate",void 0),jt([(0,s.mA)(null)],i.prototype,"footerTemplate",void 0),jt([(0,s.mA)(null)],i.prototype,"placeholder",void 0),jt([(0,s.mA)("100%")],i.prototype,"width",void 0),jt([(0,s.mA)("300px")],i.prototype,"popupHeight",void 0),jt([(0,s.mA)("100%")],i.prototype,"popupWidth",void 0),jt([(0,s.mA)(!1)],i.prototype,"readonly",void 0),jt([(0,s.mA)(null)],i.prototype,"text",void 0),jt([(0,s.mA)(null)],i.prototype,"value",void 0),jt([(0,s.mA)(!1)],i.prototype,"allowObjectBinding",void 0),jt([s.kc],i)}(vs),PI=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),xi=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};he.root="e-autocomplete",he.icon="e-input-group-icon e-ddl-icon e-search-icon";var DI=function(a){function i(e,t){var n=a.call(this,e,t)||this;return n.isFiltered=!1,n.searchList=!1,n}return PI(i,a),i.prototype.preRender=function(){a.prototype.preRender.call(this)},i.prototype.getLocaleName=function(){return"auto-complete"},i.prototype.getNgDirective=function(){return"EJS-AUTOCOMPLETE"},i.prototype.getQuery=function(e){var t=e?e.clone():this.query?this.query.clone():new x.XK,n=this.allowObjectBinding&&!(0,s.hX)(this.value)?(0,s._W)(this.fields.value?this.fields.value:"",this.value):this.value,r=""!==this.queryString||(0,s.hX)(n)?this.filterType:"equal",o=""!==this.queryString||(0,s.hX)(n)?this.queryString:n;if(this.isFiltered)if(this.enableVirtualization&&!(0,s.hX)(this.customFilterQuery))t=this.customFilterQuery.clone();else if(!this.enableVirtualization)return t;if(null!==this.queryString&&""!==this.queryString){var l=this.typeOfData(this.dataSource).typeof;if((this.dataSource instanceof x.M1||"string"!==l)&&"number"!==l){var h=(0,s.hX)(this.fields.value)?"":this.fields.value;t.where(h,r,o,this.ignoreCase,this.ignoreAccent)}else t.where("",r,o,this.ignoreCase,this.ignoreAccent)}if(!(0,s.hX)(this.suggestionCount)&&!this.enableVirtualization){if(20!==this.suggestionCount)for(var d=0;d<t.queries.length;d++)"onTake"===t.queries[d].fn&&t.queries.splice(d,1);t.take(this.suggestionCount)}if(this.enableVirtualization){var p=0,u=0,f=this.getTakeValue();if(t&&t.queries.length>0)for(d=0;d<t.queries.length;d++)"onSkip"===t.queries[d].fn&&(u=t.queries[d].e.nos),"onTake"===t.queries[d].fn&&(p=f<=t.queries[d].e.nos?t.queries[d].e.nos:f);if(p<=0&&this.query&&this.query.queries.length>0)for(d=0;d<this.query.queries.length;d++)if("onTake"===this.query.queries[d].fn){var m=this.query.queries[d].e.nos;p=f<=m?m:f}if(t&&t.queries.length>0)for(d=0;d<t.queries.length;d++)if("onSkip"!==t.queries[d].fn){if("onTake"===t.queries[d].fn){var g=t.queries[d].e.nos;p=g<=p?p:g,t.queries.splice(d,1),--d}}else u=t.queries[d].e.nos,t.queries.splice(d,1),--d;t.skip(u>0&&this.virtualItemStartIndex<=u?u:this.virtualItemStartIndex),t.take(p>0&&f<=p?p:f),t.requiresCount()}return t},i.prototype.performFiltering=function(e){var t=this,n={preventDefaultAction:!1,text:this.filterInput?this.filterInput.value:null,updateData:function(r,o,l){n.cancel||(t.isFiltered=!0,t.customFilterQuery=o,t.filterAction(r,o,l))},cancel:!1};this.trigger("filtering",n,function(r){!r.cancel&&!t.isFiltered&&!r.preventDefaultAction&&(t.searchList=!0,t.filterAction(t.dataSource,null,t.fields,e))})},i.prototype.searchLists=function(e){if(this.isTyped=!0,this.isDataFetched=this.isSelectCustom=!1,this.firstItem=this.dataSource&&this.dataSource.length>0?this.dataSource[0]:null,this.checkAndResetCache(),(0,s.hX)(this.list)&&a.prototype.renderList.call(this,e,!0),this.queryString=this.filterInput.value,"mousedown"!==e.type&&(40===e.keyCode||38===e.keyCode))return this.queryString=""===this.queryString?null:this.queryString,this.beforePopupOpen=!0,void this.resetList(this.dataSource,this.fields,null,e);this.isSelected=!1,this.activeIndex=null,this.isRequesting=!1,""!==this.queryString&&this.debounceDelay>0?this.debouncedFiltering(e,this.debounceDelay):this.performFiltering(e)},i.prototype.filter=function(e,t,n){this.isFiltered=!0,this.filterAction(e,t,n)},i.prototype.filterAction=function(e,t,n,r){this.beforePopupOpen=!0;
1var o=this.list.classList.contains("e-nodata");if(""!==this.queryString&&this.queryString.length>=this.minLength){var l;if(this.enableVirtualization&&this.isFiltering()&&this.isTyped&&(this.isPreventScrollAction=!0,this.list.scrollTop=0,this.previousStartIndex=0,this.virtualListInfo=null),this.resetList(e,n,t,r),o=this.list.classList.contains("e-nodata"),this.enableVirtualization&&!o)!this.list.querySelector(".e-virtual-ddl-content")&&this.list.querySelector(".e-list-parent")&&((l=this.createElement("div",{className:"e-virtual-ddl-content"})).style.cssText=this.getTransformValues(),this.list.appendChild(l).appendChild(this.list.querySelector(".e-list-parent"))),!this.list.querySelector(".e-virtual-ddl")&&this.list.parentElement&&((l=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl"})).style.cssText=this.GetVirtualTrackHeight(),this.list.parentElement.querySelector(".e-dropdownbase").appendChild(l));("autocomplete"===this.getModuleName()&&!(this.dataSource instanceof x.M1)||"autocomplete"===this.getModuleName()&&this.dataSource instanceof x.M1&&0!==this.totalItemCount)&&this.getFilteringSkeletonCount()}else this.hidePopup(r),this.beforePopupOpen=!1;this.renderReactTemplates()},i.prototype.clearAll=function(e,t){((0,s.hX)(t)||!(0,s.hX)(t)&&(0,s.hX)(t.dataSource))&&(a.prototype.clearAll.call(this,e),this.checkAndResetCache()),this.beforePopupOpen&&this.hidePopup()},i.prototype.onActionComplete=function(e,t,n,r){this.enableVirtualization||(this.fixedHeaderElement=null),("autocomplete"===this.getModuleName()&&!(this.dataSource instanceof x.M1)||"autocomplete"===this.getModuleName()&&this.dataSource instanceof x.M1&&0!==this.totalItemCount)&&this.getFilteringSkeletonCount(),a.prototype.onActionComplete.call(this,e,t,n);var o=this.list.querySelector("."+he.li);(0,s.hX)(o)||(0,s.vy)([o],he.focus),!(0,s.hX)(this.itemData)&&!this.enableVirtualization&&this.focusIndexItem(),this.postBackAction()},i.prototype.postBackAction=function(){if(this.autofill&&!(0,s.hX)(this.liCollections[0])&&this.searchList){var e=[this.liCollections[0]],t=this.listData,n=this.typeOfData(t).typeof,r=Pn(this.inputElement.value,e,"StartsWith",this.ignoreCase,t,this.fields,n);this.searchList=!1,(0,s.hX)(r.item)||a.prototype.setAutoFill.call(this,this.liCollections[0],!0)}},i.prototype.setSelection=function(e,t){if(this.isValidLI(e))if(!(0,s.hX)(t)&&"keydown"===t.type&&"enter"!==t.action&&"tab"!==t.action&&this.isValidLI(e)){var n=this.getFormattedValue(e.getAttribute("data-value"));this.activeIndex=this.getIndexByValue(n),this.setHoverList(e),this.selectedLI=e,this.setScrollPosition(t),this.autofill&&this.isPopupOpen&&(this.preventAutoFill=!1,a.prototype.setAutoFill.call(this,e,t&&"down"===t.action||"up"===t.action||"home"===t.action||"end"===t.action||"pageUp"===t.action||"pageDown"===t.action))}else a.prototype.setSelection.call(this,e,t),this.isFiltered=!1;else this.selectedLI=e},i.prototype.listOption=function(e,t){var n=this,r=a.prototype.listOption.call(this,e,t);if((0,s.hX)(r.itemCreated))r.itemCreated=function(l){n.highlight&&(n.element.tagName===n.getNgDirective()&&n.itemTemplate?setTimeout(function(){gs(l.item,n.queryString,n.ignoreCase,n.filterType)},0):gs(l.item,n.queryString,n.ignoreCase,n.filterType))};else{var o=r.itemCreated;r.itemCreated=function(l){n.highlight&&gs(l.item,n.queryString,n.ignoreCase,n.filterType),o.apply(n,[l])}}return r},i.prototype.isFiltering=function(){return!0},i.prototype.renderPopup=function(e){this.enableVirtualization||(this.list.scrollTop=0),a.prototype.renderPopup.call(this,e)},i.prototype.isEditTextBox=function(){return!1},i.prototype.isPopupButton=function(){return this.showPopupButton},i.prototype.isSelectFocusItem=function(e){return!1},i.prototype.setInputValue=function(e,t){var n=t&&t.text?t.text:t&&t.value,r=e&&e.text?e.text:e&&e.value?e.value:this.value;if(this.allowObjectBinding&&(n=(0,s.hX)(n)?n:(0,s._W)(this.fields.value?this.fields.value:"",n),r=(0,s.hX)(r)?r:(0,s._W)(this.fields.value?this.fields.value:"",r)),!r||""!==this.typedString||this.allowCustom||this.dataSource instanceof x.M1)e&&(e.text?this.setOldText(n):this.setOldValue(n));else{var o="string"===this.typeOfData(this.dataSource).typeof?"":this.fields.value,l=this.getItems().length,h=new x.XK,d=this;new x.M1(this.dataSource).executeQuery(h.where(new x.mT(o,"equal",r))).then(function(p){p.result.length>0?(d.value=""!==o?d.allowObjectBinding?p.result[0]:p.result[0][d.fields.value].toString():p.result[0].toString(),d.addItem(p.result,l),d.updateV
1alues()):e&&e.text?d.setOldText(n):e&&e.value?d.setOldValue(n):d.updateValues()})}},i.prototype.showPopup=function(e){if(this.enabled){if(this.beforePopupOpen)return void this.refreshPopup();this.beforePopupOpen=!0,this.preventAutoFill=!0,(0,s.hX)(this.list)?this.renderList(e):this.resetList(this.dataSource,this.fields,null,e)}},i.prototype.hidePopup=function(e){a.prototype.hidePopup.call(this,e),this.activeIndex=null,this.virtualListInfo=this.viewPortInfo,this.previousStartIndex=this.viewPortInfo.startIndex,this.startIndex=this.viewPortInfo.startIndex,this.previousEndIndex=this.viewPortInfo.endIndex},i.prototype.onPropertyChanged=function(e,t){"autocomplete"===this.getModuleName()&&this.setUpdateInitial(["fields","query","dataSource"],e);for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];if("showPopupButton"===o)if(this.showPopupButton){var l=J.pd.appendSpan(he.icon,this.inputWrapper.container,this.createElement);this.inputWrapper.buttons[0]=l,J.pd.calculateWidth(this.inputElement,this.inputWrapper.container),!(0,s.hX)(this.inputWrapper.buttons[0])&&!(0,s.hX)(this.inputWrapper.container.getElementsByClassName("e-float-text-overflow")[0])&&"Never"!==this.floatLabelType&&this.inputWrapper.container.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon"),this.inputWrapper&&this.inputWrapper.buttons&&this.inputWrapper.buttons[0]&&s.Jm.add(this.inputWrapper.buttons[0],"click",this.dropDownClick,this)}else(0,s.Yo)(this.inputWrapper.buttons[0]),this.inputWrapper.buttons[0]=null;else{var h=this.getPropObject(o,e,t);a.prototype.onPropertyChanged.call(this,h.newProperty,h.oldProperty)}}},i.prototype.renderHightSearch=function(){if(this.highlight)for(var e=0;e<this.liCollections.length;e++){var t=this.ulElement.querySelector(".e-active");t||(m0(this.liCollections[e]),gs(this.liCollections[e],this.queryString,this.ignoreCase,this.filterType)),t=null}},i.prototype.getModuleName=function(){return"autocomplete"},i.prototype.render=function(){a.prototype.render.call(this)},xi([(0,s.pr)({value:null,iconCss:null,groupBy:null,disabled:null},Ih)],i.prototype,"fields",void 0),xi([(0,s.mA)(!0)],i.prototype,"ignoreCase",void 0),xi([(0,s.mA)(!1)],i.prototype,"showPopupButton",void 0),xi([(0,s.mA)(!1)],i.prototype,"highlight",void 0),xi([(0,s.mA)(20)],i.prototype,"suggestionCount",void 0),xi([(0,s.mA)({})],i.prototype,"htmlAttributes",void 0),xi([(0,s.mA)(null)],i.prototype,"query",void 0),xi([(0,s.mA)(1)],i.prototype,"minLength",void 0),xi([(0,s.mA)("Contains")],i.prototype,"filterType",void 0),xi([(0,s.Jh)()],i.prototype,"filtering",void 0),xi([(0,s.mA)(null)],i.prototype,"index",void 0),xi([(0,s.mA)("Never")],i.prototype,"floatLabelType",void 0),xi([(0,s.mA)(null)],i.prototype,"valueTemplate",void 0),xi([(0,s.mA)(null)],i.prototype,"filterBarPlaceholder",void 0),xi([(0,s.mA)(!1)],i.prototype,"allowFiltering",void 0),xi([(0,s.mA)(null)],i.prototype,"text",void 0),xi([s.kc],i)}(k0),zu="e-float-line",ul="e-float-text",Jo="e-label-top",eo="e-label-bottom";function M0(a,i,e,t,n,r,o){var l=(0,s.n)("span",{className:zu}),h=(0,s.n)("label",{className:ul}),d=e.getAttribute("id")?e.getAttribute("id"):(0,s.Lz)("ej2_multiselect");e.id=d,!(0,s.hX)(e.id)&&""!==e.id&&(h.id="label_"+e.id.replace(/ /g,"_"),h.setAttribute("for",e.id),(0,s.uK)(t,{"aria-labelledby":h.id})),!(0,s.hX)(t.placeholder)&&""!==t.placeholder&&(h.innerText=Xu(t.placeholder),t.removeAttribute("placeholder")),h.innerText=Xu(o),i.appendChild(l),i.appendChild(h),a.classList.add("e-float-input"),function kI(a,i){a&&a.length>0?((0,s.iQ)([i],Jo),(0,s.vy)([i],eo)):((0,s.vy)([i],Jo),(0,s.iQ)([i],eo))}(n,h),"Always"===r&&(h.classList.contains(eo)&&(0,s.vy)([h],eo),(0,s.iQ)([h],Jo))}function L0(a,i,e){i.placeholder=a&&a.length?"":e}function Xu(a){var i="";if(!(0,s.hX)(a)&&""!==a){var e=document.createElement("span");e.innerHTML='<input  placeholder="'+a+'"/>',i=e.children[0].placeholder}return i}var NI=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),ve=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},to="e-input-focus",fl="e-disabled",rt="e-hide-listitem",Ko="e-chips",Ph="e-chips-close",bs="e-chip-selected",R0="e-delimiter",Dh="e-zero-size",N0="e-chips-close e-close-hooker",V0="e-delim-values",ju="e-close-icon-hide",B0="e-ddl-disable-icon",H0="e-ms-spinner-icon",z0="e-input-group-icon e-ddl-icon",X0="e-icon-anim",kh="e-delim-total",j0="e-search-custom-width",Uu="e-input-filter",U0=function(a){function i(e,t){var n=a.call(this,e,t)||this;return n.clearIconWidth=0,n.previousFilterText="",n.storedSelectAllHeight=0,n.isUpdateHeaderHeight=!1,n.isUpdateFooterHeight=!1,n.isBlurDispatching=!1,n.isFilterPrevented=!1,n.isFilteringAction=!1,n.isValidKey=!1,n.selectAllEventData=[],n.selectAllEventEle=[],n.preventSetCurrentData=!1,n.isSelectAllLoop=!1,n.scrollFocusStatus=!1,n.keyDownStatus=!1,n}return NI(i,a),i.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())},i.prototype.requiredModules=function(){var e=[];
1if(this.enableVirtualization&&e.push({args:[this],member:"VirtualScroll"}),"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},i.prototype.updateHTMLAttribute=function(){if(Object.keys(this.htmlAttributes).length)for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var n=t[e];switch(n){case"class":var r=this.htmlAttributes[""+n].replace(/\s+/g," ").trim();""!==r&&((0,s.iQ)([this.overAllWrapper],r.split(" ")),(0,s.iQ)([this.popupWrapper],r.split(" ")));break;case"disabled":this.enable(!1);break;case"placeholder":this.placeholder||(this.inputElement.setAttribute(n,this.htmlAttributes[""+n]),this.setProperties({placeholder:this.inputElement.placeholder},!0),this.refreshPlaceHolder());break;default:["id"].indexOf(n)>-1?this.element.setAttribute(n,this.htmlAttributes[""+n]):0===n.indexOf("data")||["name","required","aria-required","form"].indexOf(n)>-1?this.hiddenElement.setAttribute(n,this.htmlAttributes[""+n]):["title","role","style","class"].indexOf(n)>-1?this.overAllWrapper.setAttribute(n,this.htmlAttributes[""+n]):"size"!==n&&!(0,s.hX)(this.inputElement)&&this.inputElement.setAttribute(n,this.htmlAttributes[""+n])}}},i.prototype.updateReadonly=function(e){(0,s.hX)(this.inputElement)||(e||"CheckBox"===this.mode?this.inputElement.setAttribute("readonly","true"):this.inputElement.removeAttribute("readonly"))},i.prototype.updateClearButton=function(e){e?(this.overAllClear.parentNode?this.overAllClear.style.display="":this.componentWrapper.appendChild(this.overAllClear),this.componentWrapper.classList.remove(ju)):(this.overAllClear.style.display="none",this.componentWrapper.classList.add(ju))},i.prototype.updateCssClass=function(){if(!(0,s.hX)(this.cssClass)&&""!==this.cssClass){var e=this.cssClass;""!==(e=this.cssClass.replace(/\s+/g," ").trim())&&((0,s.iQ)([this.overAllWrapper],e.split(" ")),(0,s.iQ)([this.popupWrapper],e.split(" ")))}},i.prototype.updateOldPropCssClass=function(e){!(0,s.hX)(e)&&""!==e&&""!==(e=e.replace(/\s+/g," ").trim())&&((0,s.vy)([this.overAllWrapper],e.split(" ")),(0,s.vy)([this.popupWrapper],e.split(" ")))},i.prototype.onPopupShown=function(e){var t=this;if(s.Pw.isDevice&&"CheckBox"===this.mode&&this.allowFiltering){var n=this;window.onpopstate=function(){n.hidePopup(),n.inputElement.focus()},history.pushState({},"")}this.trigger("open",{popup:this.popupObj,event:e,cancel:!1,animation:{name:"FadeIn",duration:100}},function(l){l.cancel||(t.focusAtFirstListItem(!0),t.popupObj&&document.body.appendChild(t.popupObj.element),"CheckBox"===t.mode&&t.enableGroupCheckBox&&!(0,s.hX)(t.fields.groupBy)&&t.updateListItems(t.list.querySelectorAll("li.e-list-item"),t.mainList.querySelectorAll("li.e-list-item")),("CheckBox"===t.mode||t.showDropDownIcon)&&(0,s.iQ)([t.overAllWrapper],[X0]),t.refreshPopup(),t.renderReactTemplates(),t.popupObj&&t.popupObj.show(l.animation,1e3===t.zIndex?t.element:null),t.isReact&&setTimeout(function(){if(t.popupHeight&&t.list&&"auto"!==t.popupHeight){var h="string"==typeof t.popupHeight?parseInt(t.popupHeight,10):t.popupHeight;if(!t.isUpdateHeaderHeight&&t.headerTemplate&&t.header){var d=""===t.list.style.maxHeight?h:parseInt(t.list.style.maxHeight,10);t.list.style.maxHeight=(d-t.header.offsetHeight).toString()+"px",t.isUpdateHeaderHeight=!0}!t.isUpdateFooterHeight&&t.footerTemplate&&t.footer&&(d=""===t.list.style.maxHeight?h:parseInt(t.list.style.maxHeight,10),t.list.style.maxHeight=(d-t.footer.offsetHeight).toString()+"px",t.isUpdateFooterHeight=!0)}},15),(0,s.uK)(t.inputElement,{"aria-expanded":"true","aria-owns":t.element.id+"_popup","aria-controls":t.element.id}),t.updateAriaActiveDescendant(),t.isFirstClick&&(t.enableVirtualization||t.loadTemplate()),"CheckBox"===t.mode&&t.showSelectAll&&s.Jm.add(t.popupObj.element,"click",t.clickHandler,t))})},i.prototype.updateVirtualReOrderList=function(e){var t=this.getForQuery(this.value,!0).clone();if(this.isVirtualReorder=!0,this.resetList(this.enableVirtualization&&this.dataSource instanceof x.M1?this.selectedListData:this.dataSource,this.fields,t),this.UpdateSkeleton(),this.isVirtualReorder=!1,this.liCollections=this.list.querySelectorAll("."+P_li),this.virtualItemCount=this.itemCount,"CheckBox"!==this.mode&&(this.totalItemCount=this.value&&this.value.length?this.totalItemCount-this.value.length:this.totalItemCount),this.list.querySelector(".e-virtual-ddl"))this.list.getElementsByClassName("e-virtual-ddl")[0].style=this.GetVirtualTrackHeight();
1else{var n=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl"});n.style.cssText=this.GetVirtualTrackHeight(),this.popupWrapper.querySelector(".e-dropdownbase").appendChild(n)}this.list.querySelector(".e-virtual-ddl-content")&&(this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues()),e&&this.loadTemplate()},i.prototype.updateListItems=function(e,t){for(var n=0;n<e.length;n++)this.findGroupStart(e[n]),this.findGroupStart(t[n]);this.deselectHeader()},i.prototype.loadTemplate=function(){if(this.refreshListItems(null),this.enableVirtualization&&this.list&&"CheckBox"===this.mode){var e=this.list.querySelectorAll(".e-reorder")[0];this.list.querySelector(".e-virtual-ddl-content")&&e&&this.list.querySelector(".e-virtual-ddl-content").removeChild(e)}"CheckBox"===this.mode&&this.removeFocus(),this.notify("reOrder",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,e:this}),this.isPreventScrollAction=!0},i.prototype.setScrollPosition=function(){if((!this.hideSelectedItem&&"CheckBox"!==this.mode||"CheckBox"===this.mode&&!this.enableSelectionOrder)&&!(0,s.hX)(this.value)&&this.value.length>0){var e=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[this.value.length-1]):this.value[this.value.length-1],t=this.findListElement(this.hideSelectedItem?this.ulElement:this.list,"li","data-value",e);(0,s.hX)(t)||this.scrollBottom(t,void 0,!1,null,!0)}if(this.enableVirtualization){var n=this.list.querySelector("."+P_focus);this.isKeyBoardAction=!1,this.scrollBottom(n,void 0,!1,null,!0)}},i.prototype.focusAtFirstListItem=function(e){if(this.ulElement&&this.ulElement.querySelector("li."+P_li)){var t=void 0;if("CheckBox"===this.mode)return void this.removeFocus();if(this.enableVirtualization){if(this.fields.disabled)t=this.ulElement.querySelector("li."+P_li+":not(.e-virtual-list):not(.e-hide-listitem):not(."+fl+")"),e&&this.viewPortInfo&&0!==this.viewPortInfo.startIndex&&(t=(n=this.ulElement.querySelectorAll("li."+P_li+":not(.e-virtual-list):not(.e-hide-listitem)"))&&n.length>0?n[2]:t);else if(t=this.ulElement.querySelector("li."+P_li+":not(.e-virtual-list):not(.e-hide-listitem)"),e&&this.viewPortInfo&&0!==this.viewPortInfo.startIndex){var n;t=(n=this.ulElement.querySelectorAll("li."+P_li+":not(.e-virtual-list):not(.e-hide-listitem)"))&&n.length>0?n[2]:t}}else t=this.ulElement.querySelector(this.fields.disabled?"li."+P_li+":not(."+rt+"):not(."+fl+")":"li."+P_li+":not(."+rt+")");null!==t&&(this.removeFocus(),this.addListFocus(t))}},i.prototype.focusAtLastListItem=function(e){var t;e?t=Pn(e,this.liCollections,"StartsWith",this.ignoreCase):this.value&&this.value.length?Pn(this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[this.value.length-1]):this.value[this.value.length-1],this.liCollections,"StartsWith",this.ignoreCase):t=null,t&&null!==t.item&&(this.addListFocus(t.item),((this.allowCustomValue||this.allowFiltering)&&this.isPopupOpen()&&this.closePopupOnSelect&&!this.enableVirtualization||this.closePopupOnSelect&&!this.enableVirtualization)&&this.scrollBottom(t.item,t.index))},i.prototype.getAriaAttributes=function(){return{"aria-disabled":"false",role:"combobox","aria-expanded":"false"}},i.prototype.updateListARIA=function(){(0,s.hX)(this.ulElement)||(0,s.uK)(this.ulElement,{id:this.element.id+"_options",role:"listbox","aria-hidden":"false","aria-label":"list"});var e=!((0,s.hX)(this.inputElement)||!this.inputElement.disabled);!this.isPopupOpen()&&!(0,s.hX)(this.inputElement)&&(0,s.uK)(this.inputElement,this.getAriaAttributes()),e&&(0,s.uK)(this.inputElement,{"aria-disabled":"true"}),this.ensureAriaDisabled(e?"true":"false")},i.prototype.ensureAriaDisabled=function(e){if(this.htmlAttributes&&this.htmlAttributes["aria-disabled"]){var t=this.htmlAttributes;(0,s.X$)(t,{"aria-disabled":e},t),this.setProperties({htmlAttributes:t},!0)}},i.prototype.removelastSelection=function(e){if(null===this.chipCollectionWrapper.querySelector("span."+bs)){var n=this.chipCollectionWrapper.querySelectorAll("span."+Ko),r=n[n.length-1].getAttribute("data-value");(0,s.hX)(this.value)||(this.tempValues=this.value.slice());var o=this.allowObjectBinding?this.enableVirtualization?this.getVirtualDataByValue(this.getFormattedValue(r)):this.getDataByValue(this.getFormattedValue(r)):this.getFormattedValue(r);this.allowCustomValue&&("false"!==r&&!1===o||!(0,s.hX)(o)&&"NaN"===o.toString())&&
1(o=r),this.removeValue(o,e),this.removeChipSelection(),this.updateDelimeter(this.delimiterChar,e),this.makeTextBoxEmpty(),this.mainList&&this.listData&&this.refreshSelection(),this.checkPlaceholderSize()}else this.removeSelectedChip(e)},i.prototype.onActionFailure=function(e){a.prototype.onActionFailure.call(this,e),this.renderPopup(),this.onPopupShown()},i.prototype.targetElement=function(){return this.targetInputElement=this.inputElement,"CheckBox"===this.mode&&this.allowFiltering&&this.notify("targetElement",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),this.targetInputElement?this.targetInputElement.value:null},i.prototype.getForQuery=function(e,t){var n,r=this.isPrimitiveData?"":this.fields.value;if(this.enableVirtualization&&e){if(t){for(var o=this.viewPortInfo.startIndex,l=o+this.viewPortInfo.endIndex<=e.length&&e[o+this.viewPortInfo.endIndex]?o+this.viewPortInfo.endIndex:e.length,h=o;h<l;h++){var d=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",e[h]):e[h];n=h===o?new x.mT(r,"equal",d):n.or(r,"equal",d)}return(new x.XK).where(n)}for(h=0;h<e.length;h++)d=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",e[h]):e[h],n=this.isaddNonPresentItems?0===h?new x.mT(r,"equal",e[h]):n.or(r,"equal",e[h]):0===h?n=new x.mT(r,"notequal",d):n.and(r,"notequal",d);return(new x.XK).where(n)}for(h=0;h<e.length;h++)n=0===h?new x.mT(r,"equal",e[h]):n.or(r,"equal",e[h]);return this.dataSource instanceof x.M1&&this.dataSource.adaptor instanceof x.sb?(new x.XK).where(n):this.getQuery(this.query).clone().where(n)},i.prototype.onActionComplete=function(e,t,n,r){var o=this;if(this.dataSource instanceof x.M1&&!(0,s.hX)(n)&&!this.virtualGroupDataSource&&(this.totalItemCount=n.count),this.value&&t&&t.length>0&&this.allowFiltering&&"CheckBox"!==this.mode&&!this.enableVirtualization&&!this.isFilterPrevented&&!this.allowCustomValue&&this.isFilteringAction&&t.every(function(v){var b=(0,s._W)(o.fields.value?o.fields.value:"",v);return o.value.some(function(y){var S=o.allowObjectBinding?(0,s._W)(o.fields.value?o.fields.value:"",y):y;return b===S})})&&(e.innerHTML="",t=[]),a.prototype.onActionComplete.call(this,e,t,n),this.skeletonCount=0!==this.totalItemCount&&this.totalItemCount<2*this.itemCount&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&this.totalItemCount<=this.itemCount)?0:this.skeletonCount,this.updateSelectElementData(this.allowFiltering),!(0,s.hX)(this.value)&&!this.allowCustomValue&&!this.enableVirtualization&&this.listData&&this.listData.length>0)for(var d=0;d<this.value.length;d++){var p=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[d]):this.value[d];!this.findListElement(this.allowFiltering&&!(0,s.hX)(this.mainList)?this.mainList:e,"li","data-value",p)&&!(this.dataSource instanceof x.M1)&&(this.value.splice(d,1),d-=1)}var f=[];(0,s.hX)(this.value)||(f=this.presentItemValue(this.ulElement));var m=f.some(function(v){return null!==v});if(f.length>0&&this.dataSource instanceof x.M1&&!(0,s.hX)(this.value)&&null!=this.listData&&m?(this.isaddNonPresentItems=!0,this.addNonPresentItems(f,this.ulElement,this.listData),this.isaddNonPresentItems=!1):this.updateActionList(e,t,n),this.dataSource instanceof x.M1&&this.allowCustomValue&&!this.isCustomRendered&&this.inputElement.value&&""!==this.inputElement.value){var g=new x.XK;g=this.allowFiltering?g.where(this.fields.text,"startswith",this.inputElement.value,this.ignoreCase,this.ignoreAccent):g,this.checkForCustomValue(g,this.fields),this.isCustomRendered=!0,this.remoteCustomValue=!this.enableVirtualization&&this.remoteCustomValue}"CheckBox"===this.mode&&this.enableGroupCheckBox&&!(0,s.hX)(this.fields.groupBy)&&!(0,s.hX)(this.fields.disabled)&&this.disableGroupHeader(),this.dataSource instanceof x.M1&&"CheckBox"===this.mode&&this.allowFiltering&&this.removeFocus()},i.prototype.updateActionList=function(e,t,n,r){"CheckBox"===this.mode&&this.showSelectAll&&this.notify("selectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),this.mainList||this.mainData?((0,s.hX)(this.mainData)||0===this.mainData.length)&&(this.mainData=t):(this.mainList=e.cloneNode?e.cloneNode(!0):e,this.mainData=t,this.mainListCollection=this.liCollections),!((this.remoteCustomValue||t.length<=0)&&this.allowCustomValue&&this.inputFocus&&this.allowFiltering&&this.inputElement.value&&""!==this.inputElement.value&&(this.checkForCustomValue(this.tempQuery,this.fields),this.isCu
1stomRendered))&&(this.value&&this.value.length&&("CheckBox"!==this.mode&&!(0,s.hX)(this.inputElement)&&""!==this.inputElement.value.trim()||"CheckBox"===this.mode||(8===this.keyCode||46===this.keyCode)&&this.allowFiltering&&this.allowCustomValue&&this.dataSource instanceof x.M1&&""===this.inputElement.value)&&this.refreshSelection(),this.updateListARIA(),this.unwireListEvents(),this.wireListEvents(),(0,s.hX)(this.setInitialValue)||this.setInitialValue(),(0,s.hX)(this.selectAllAction)||this.selectAllAction(),this.setDynValue&&(!(0,s.hX)(this.text)&&((0,s.hX)(this.value)||0===this.value.length)&&this.initialTextUpdate(),this.enableVirtualization?this.dataSource instanceof x.M1||this.initialValueUpdate():this.isRemoveSelection?this.initialValueUpdate():this.initialValueUpdate(this.listData,!0),this.initialUpdate(),this.refreshPlaceHolder(),"CheckBox"!==this.mode&&this.changeOnBlur&&this.updateValueState(null,this.value,null)),this.renderPopup(),this.beforePopupOpen&&(this.beforePopupOpen=!1,this.onPopupShown(n)))},i.prototype.refreshSelection=function(){var e,t,n=this.hideSelectedItem?rt:"e-active";if(!(0,s.hX)(this.value))for(var r=0;!(0,s.hX)(this.value[r]);r++)if(e=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[r]):this.value[r],t=this.findListElement(this.list,"li","data-value",e)){if((0,s.iQ)([t],n),this.hideSelectedItem&&t.previousSibling&&t.previousElementSibling.classList.contains(P_group)&&(!t.nextElementSibling||t.nextElementSibling.classList.contains(P_group))&&(0,s.iQ)([t.previousElementSibling],n),this.hideSelectedItem&&this.fields.groupBy&&!t.previousElementSibling.classList.contains(rt)&&this.hideGroupItem(e),this.hideSelectedItem&&t.classList.contains(P_focus)){(0,s.vy)([t],P_focus);var o=t.parentElement.querySelectorAll("."+P_li+":not(."+rt+"):not(."+fl+")");o.length>0?((0,s.iQ)([o[0]],P_focus),this.updateAriaActiveDescendant()):this.list&&this.list.querySelectorAll("."+P_li).length>0||(this.l10nUpdate(),(0,s.iQ)([this.list],P_noData))}t.setAttribute("aria-selected","true"),"CheckBox"===this.mode&&t.classList.contains("e-active")&&0===t.getElementsByClassName("e-check").length&&this.notify("updatelist",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,li:t,e:null})}this.checkSelectAll(),this.checkMaxSelection()},i.prototype.hideGroupItem=function(e){var t,n,r=this.hideSelectedItem?rt:"e-active";n=t=this.findListElement(this.ulElement,"li","data-value",e);var o=0,l=0,h=!0,d=!0;do{t&&t.previousElementSibling&&!t.previousElementSibling.classList.contains(rt)&&t.previousElementSibling.classList.contains(P_li)&&(h=!1),!h||!t||t.previousElementSibling&&t.previousElementSibling.classList.contains(P_group)?o=10:t=t.previousElementSibling,n&&n.nextElementSibling&&!n.nextElementSibling.classList.contains(rt)&&n.nextElementSibling.classList.contains(P_li)&&(d=!1),!d||!n||n.nextElementSibling&&n.nextElementSibling.classList.contains(P_group)?l=10:n=n.nextElementSibling}while(o<10||l<10);h&&d&&!t.previousElementSibling.classList.contains(rt)?(0,s.iQ)([t.previousElementSibling],r):h&&d&&t.previousElementSibling.classList.contains(rt)&&(0,s.vy)([t.previousElementSibling],r)},i.prototype.getValidLi=function(){var e=this.ulElement.querySelector("li."+P_li+":not(."+rt+")");return(0,s.hX)(e)?this.liCollections[0]:e},i.prototype.checkSelectAll=function(){var e=(0,s.hX)(this.fields.disabled)?this.list.querySelectorAll("li.e-list-group-item.e-active").length:this.list.querySelectorAll("li.e-list-group-item.e-active:not(.e-disabled)").length,t=this.list.querySelectorAll("li.e-list-item"),n=this.enableVirtualization?this.list.querySelectorAll("li."+P_li+":not(.e-virtual-list)").length:(0,s.hX)(this.fields.disabled)?this.list.querySelectorAll("li."+P_li).length:this.list.querySelectorAll("li."+P_li+":not(.e-disabled)").length,r=this.list.querySelectorAll("li.e-active").length;if(this.enableGroupCheckBox&&!(0,s.hX)(this.fields.groupBy)&&(r-=e),!this.enableVirtualization&&(n===r||r===this.maximumSelectionLength)&&"CheckBox"===this.mode&&this.showSelectAll||this.enableVirtualization&&"CheckBox"===this.mode&&this.showSelectAll&&this.value&&this.value.length===this.totalItemCount?this.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"check"}):n!==r&&"CheckBox"===this.mode&&this.showSelectAll&&this.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"uncheck"}),this.enableGroupCheckBox&&this.fields.groupBy&&!this.enableSelectionOrder){for(var o=0;o<t.length;o++)this.findGroupStart(t[o]);this.deselectHeader()}},i.prototype.openClick=function(e){this.openOnClick||"CheckBox"===this.mode||this.isPopupOpen()?!this.openOnClick&&"CheckBox"===this.mode&&!this.isPopupOpen()&&this.showPopup():""!==this.targetElement()?this.showPopup():this.hidePopup(e)},i.prototype.keyUp=function(e){if("CheckBox"===this.mode&&!this.openOnClick){var n=String.fromCharCode(e.keyCode).match(/\w/);(0,s.hX)(n)||(this.isValidKey=!0)}this.isValidKey=this.isPopupOpen()&&8===e.keyCode||this.isValidKey,this.isValidKey=(!e.ctrlKey||86!==e.ke
1yCode)&&this.isValidKey,this.isValidKey&&this.inputElement&&(this.isValidKey=!1,this.expandTextbox(),this.showOverAllClear(),this.search(e))},i.prototype.filter=function(e,t,n){this.isFiltered=!0,this.remoteFilterAction=!0,this.dataUpdater(e,t,n)},i.prototype.getQuery=function(e){var t=e?e.clone():this.query?this.query.clone():new x.XK;if(this.isFiltered){if(this.enableVirtualization&&!(0,s.hX)(this.customFilterQuery))return t=this.customFilterQuery.clone(),this.virtualFilterQuery(t);if(!this.enableVirtualization)return t}if(this.filterAction){if(null!==this.targetElement()&&!this.enableVirtualization||this.enableVirtualization&&null!==this.targetElement()&&""!==this.targetElement().trim()){var n=this.typeOfData(this.dataSource).typeof;if((this.dataSource instanceof x.M1||"string"!==n)&&"number"!==n){if(this.enableVirtualization&&""!==this.targetElement()&&!this.isClearAllAction||!this.enableVirtualization){var r=this.fields;t.where((0,s.hX)(r.text)?"":r.text,this.filterType,this.targetElement(),this.ignoreCase,this.ignoreAccent)}}else t.where("",this.filterType,this.targetElement(),this.ignoreCase,this.ignoreAccent)}return this.enableVirtualization&&0!==this.viewPortInfo.endIndex&&!this.virtualSelectAll?this.virtualFilterQuery(t):this.virtualSelectAll?e?e.skip(0).take(this.maximumSelectionLength).requiresCount():this.query?this.query.skip(0).take(this.maximumSelectionLength).requiresCount():(new x.XK).skip(0).take(this.maximumSelectionLength).requiresCount():t}return this.enableVirtualization&&0!==this.viewPortInfo.endIndex&&!this.virtualSelectAll?this.virtualFilterQuery(t):this.virtualSelectAll?e?e.skip(0).take(this.maximumSelectionLength).requiresCount():this.query?this.query.skip(0).take(this.maximumSelectionLength).requiresCount():(new x.XK).skip(0).take(this.maximumSelectionLength).requiresCount():e||(this.query?this.query:new x.XK)},i.prototype.virtualFilterQuery=function(e){for(var t=this.getTakeValue(),n=!0,r=!0,o=0;o<e.queries.length;o++)"multiselect"===this.getModuleName()&&(e.queries[o].e&&"or"===e.queries[o].e.condition||e.queries[o].e&&"equal"===e.queries[o].e.operator)&&(n=!1),"onSkip"===e.queries[o].fn&&(r=!1);var l=0;if(e&&e.queries.length>0)for(o=0;o<e.queries.length;o++)"onTake"===e.queries[o].fn&&(l=t<=e.queries[o].e.nos?e.queries[o].e.nos:t);if(l<=0&&this.query&&this.query.queries.length>0)for(o=0;o<this.query.queries.length;o++)"onTake"===this.query.queries[o].fn&&(l=t<=this.query.queries[o].e.nos?this.query.queries[o].e.nos:t);if(e&&e.queries.length>0)for(o=0;o<e.queries.length;o++)"onTake"===e.queries[o].fn&&(l=e.queries[o].e.nos<=l?l:e.queries[o].e.nos,e.queries.splice(o,1),--o);return(this.allowFiltering&&r||!n||!this.allowFiltering&&r)&&!this.isVirtualReorder&&e.skip(n?this.virtualItemStartIndex:this.viewPortInfo.startIndex),e.take(this.isIncrementalRequest?this.incrementalEndIndex:l>0?l:t),e.requiresCount(),this.customFilterQuery=null,e},i.prototype.getTakeValue=function(){return this.allowFiltering&&s.Pw.isDevice?Math.round(window.outerHeight/this.listItemHeight):this.itemCount},i.prototype.dataUpdater=function(e,t,n){this.isDataFetched=!1;var r=this.list.classList.contains(P_noData);if(""===this.targetElement().trim()){var o=this.enableVirtualization?this.list.cloneNode(!0):this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;if(this.backCommand||this.enableVirtualization&&"CheckBox"===this.mode&&this.value&&this.value.length>0){this.remoteCustomValue=!1;var l=!1;this.allowCustomValue&&0===o.querySelectorAll("li").length&&this.mainData.length>0&&(this.mainData=[]),this.enableVirtualization&&(this.allowFiltering&&(this.isPreventScrollAction=!0,this.list.scrollTop=0,this.previousStartIndex=0,this.virtualListInfo=null),this.value&&this.value.length>0&&"CheckBox"===this.mode?(this.notify("setCurrentViewDataAsync",{component:this.getModuleName(),module:"VirtualScroll"}),l=!0):(this.totalItemCount=this.dataSource&&this.dataSource.length?this.dataSource.length:0,this.resetList(e,n,t),"CheckBox"!==this.mode&&(this.totalItemCount=this.value&&this.value.length?this.totalItemCount-this.value.length:this.totalItemCount),this.UpdateSkeleton(),!r&&!this.allowCustomValue||this.list.classList.contains(P_noData)||(this.list.querySelector(".e-virtual-ddl-content")||((h=this.createElement("div",{className:"e-virtual-ddl-content"})).style.cssText=this.getTransformValues(),this.list.appendChild(h).appendChild(this.list.querySelector(".e-list-parent"))),this.list.querySelector(".e-virtual-ddl")||((d=this.createElement("div",{id:this.element.i
1d+"_popup",className:"e-virtual-ddl"})).style.cssText=this.GetVirtualTrackHeight(),document.getElementsByClassName("e-multi-select-list-wrapper")[0].querySelector(".e-dropdownbase").appendChild(d))))),this.onActionComplete(o,this.mainData),this.value&&this.value.length&&this.refreshSelection(),8!==this.keyCode&&this.focusAtFirstListItem(),l||this.notify("reOrder",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,e:this})}}else{var h,d;if(this.enableVirtualization&&this.allowFiltering&&(this.isPreventScrollAction=!0,this.list.scrollTop=0,this.previousStartIndex=0,this.virtualListInfo=null,this.list.querySelector(".e-list-parent.e-reorder")&&this.list.querySelector(".e-list-parent.e-reorder").remove()),this.resetList(e,n,t),this.enableVirtualization&&(r||this.allowCustomValue)&&!this.list.classList.contains(P_noData))this.list.querySelector(".e-virtual-ddl-content")||((h=this.createElement("div",{className:"e-virtual-ddl-content"})).style.cssText=this.getTransformValues(),this.list.appendChild(h).appendChild(this.list.querySelector(".e-list-parent"))),"CheckBox"!==this.mode&&(this.totalItemCount=this.value&&this.value.length?this.totalItemCount-this.value.length:this.totalItemCount),this.list.querySelector(".e-virtual-ddl")||((d=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl"})).style.cssText=this.GetVirtualTrackHeight(),document.getElementsByClassName("e-multi-select-list-wrapper")[0].querySelector(".e-dropdownbase").appendChild(d));this.allowCustomValue&&(e instanceof x.M1?(this.remoteCustomValue=!0,this.tempQuery=t):this.checkForCustomValue(t,n))}this.enableVirtualization&&this.allowFiltering&&this.getFilteringSkeletonCount(),this.refreshPopup(),this.allowResize&&this.setResize(),"CheckBox"===this.mode&&this.removeFocus()},i.prototype.checkForCustomValue=function(e,t){var n=!this.getValueByText(this.inputElement.value,this.ignoreCase),r=t||this.fields;if(this.allowCustomValue&&n){var o=this.inputElement.value,l=!(0,s.hX)(this.mainData)&&this.mainData.length>0?this.mainData[0]:this.mainData;if(l&&"string"!=typeof l&&"number"!=typeof l&&"boolean"!=typeof l){var h={};(0,s.KY)(r.text,o,h),"number"==typeof(0,s._W)(this.fields.value?this.fields.value:"value",l)&&this.fields.value!==this.fields.text?(0,s.KY)(r.value,Math.random(),h):(0,s.KY)(r.value,o,h);var d={};if(this.allowObjectBinding){var p=Object.keys(this.listData&&this.listData.length>0?this.listData[0]:this.firstItem?this.firstItem:h),u="number"==typeof(0,s._W)(this.fields.value?this.fields.value:"value",l)&&this.fields.value!==this.fields.text;p.forEach(function(y){d[y]=y===t.value||y===t.text?(0,s._W)(y===t.text&&u?t.text:t.value,h):null})}if(h=this.allowObjectBinding?d:h,this.enableVirtualization){this.virtualCustomData=h;var f=this.dataSource instanceof x.M1?JSON.parse(JSON.stringify(this.listData)):JSON.parse(JSON.stringify(this.dataSource));this.virtualCustomSelectData&&this.virtualCustomSelectData.length>0&&f.concat(this.virtualCustomSelectData),f.splice(0,0,h),this.isCustomDataUpdated=!0;var g=this.totalItemCount;this.viewPortInfo.startIndex=this.virtualItemStartIndex=0,this.viewPortInfo.endIndex=this.virtualItemEndIndex=this.itemCount,this.resetList(f,r,e),this.isCustomDataUpdated=!1,this.totalItemCount=this.enableVirtualization&&this.dataSource instanceof x.M1?g:this.totalItemCount}else this.dataSource instanceof x.M1&&this.allowCustomValue&&this.allowFiltering&&(this.remoteCustomValue=!1),(f=JSON.parse(JSON.stringify(this.listData))).splice(0,0,h),this.resetList(f,r,e)}else this.listData&&((f=JSON.parse(JSON.stringify(this.listData))).splice(0,0,this.inputElement.value),f[0]="number"!=typeof l||isNaN(parseFloat(f[0]))?f[0]:parseFloat(f[0]),f[0]="boolean"==typeof l?"true"===f[0]||"false"!==f[0]&&f[0]:f[0],this.resetList(f,r),this.focusAtLastListItem(o))}else if(this.listData&&this.mainData&&!n&&this.allowCustomValue)if(this.allowFiltering&&this.isRemoteSelection&&this.remoteCustomValue)this.isRemoteSelection=!1,this.enableVirtualization||this.resetList(this.listData,r,e);else if(!this.allowFiltering&&this.list){var v=this.list.querySelectorAll("li."+P_li+":not(.e-hide-listitem)"),b=Pn(this.targetElement(),v,"StartsWith",this.ignoreCase);b&&null!==b.item&&this.addListFocus(b.item)}this.value&&this.value.length&&this.refreshSelection()},i.prototype.getNgDirective=function(){return"EJS-MULTISELECT"},i.prototype.wrapperClick=function(e){if(this.setDynValue=!1,this.keyboardEvent=null,this.isKeyBoardAction=!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(Ph))return void(this.isPopupOpen()&&this.refreshPopup());!this.isPopupOpen()&&(this.openOnClick||this.showDropDownIcon&&e.target&&e.target.className===z0)?this.showPopup(e):(this.hidePopup(e),"CheckBox"===this.mode&&(this.showOverAllClear(),this.inputFocus=!0,this.overAllWrapper.classList.contains(to)||this.overAllWrapper.classList.add(to)))}this.targetElement()&&""!==this.targetElement()||e.preventDefault(),this.checkAndScrollParent()}},i.prototype.checkAndScrollParent=function(){for(var e=this.overAllWrapper?this.overAllWrapper.parentElement:null;e;){var t=getComputedStyle(e),n=parseFloat(t.maxHeight)||parseFloat(t.height);if(!isNaN(n)&&this.isPopupOpen()){var r=t.overflowY,o=this.overAllWrapper.getBoundingClientRect().bottom,l=e.getBoundingClientRect().bottom;if(("auto"===r||"scroll"===r)&&o>l)return void(e.scrollTop+=o-l+10)}e=e.parentElement}},i.prototype.enable=function(e){e?(this.overAllWrapper.classList.remove(fl),this.inputElement.removeAttribute("disabled"),(0,s.uK)(this.inputElement,{"aria-disabled":"false"}),this.ensureAriaDisabled("false")):(this.overAllWrapper.classList.add(fl),this.inputElement.setAttribute("disabled","true"),(0,s.uK)(this.inputElement,{"aria-disabled":"true"}),this.ensureAriaDisabled("true")),this.enabled!==e&&(this.enabled=e),this.hidePopup()},i.prototype.onBlurHandler=function(e,t){var n;if(this.isBlurDispatching&&this.isAngular)this.isBlurDispatching=!1;else if((0,s.hX)(e)||(n=e.relatedTarget),this.popupObj&&document.body.contains(this.popupObj.element)&&this.popupObj.element.contains(n))"CheckBox"!==this.mode?this.inputElement.focus():"Auto"===this.floatLabelType&&(this.overAllWrapper.classList.contains("e-outline")||this.overAllWrapper.classList.contains("e-filled"))&&(0,s.iQ)([this.overAllWrapper],"e-valid-input");else{if("Auto"===this.floatLabelType&&this.overAllWrapper.classList.contains("e-outline")&&"CheckBox"===this.mode&&((0,s.hX)(this.value)||0===this.value.length)&&(0,s.vy)([this.overAllWrapper],"e-valid-input"),"CheckBox"===this.mode&&s.Pw.isIE&&!(0,s.hX)(e)&&!t)return this.inputFocus=!1,void this.overAllWrapper.classList.remove(to);if(this.scrollFocusStatus)return(0,s.hX)(e)||e.preventDefault(),this.inputElement.focus(),void(this.scrollFocusStatus=!1);if(this.inputFocus=!1,this.overAllWrapper.classList.remove(to),this.addTagOnBlur){var r=this.getValueByText(this.inputElement.value,this.ignoreCase,this.ignoreAccent),o=this.findListElement(this.list,"li","data-value",r);o&&!o.classList.contains(this.hideSelectedItem?rt:"e-active")&&(this.updateListSelection(o,e),"Delimiter"===this.mode&&this.updateDelimeter(this.delimiterChar))}this.updateDataList(),this.refreshListItems(null),"Box"!==this.mode&&"CheckBox"!==this.mode&&this.updateDelimView(),this.changeOnBlur&&(this.updateV
1alueState(e,this.value,this.tempValues),this.dispatchEvent(this.hiddenElement,"change")),this.overAllClear.style.display="none",this.isPopupOpen()&&this.hidePopup(e),this.makeTextBoxEmpty(),this.trigger("blur"),this.focused=!0,s.Pw.isDevice&&"Delimiter"!==this.mode&&"CheckBox"!==this.mode&&this.removeChipFocus(),this.removeChipSelection(),this.refreshInputHight(),function RI(a,i,e,t,n){a.classList.remove("e-input-focus");var r=i.querySelector("."+ul);e&&e.length<=0&&"Auto"===t&&!(0,s.hX)(r)&&(r.classList.contains(Jo)&&(0,s.vy)([r],Jo),(0,s.iQ)([r],eo))}(this.overAllWrapper,this.componentWrapper,this.value,this.floatLabelType),this.refreshPlaceHolder(),(this.allowFiltering||!0===this.enableSelectionOrder&&"CheckBox"===this.mode)&&!(0,s.hX)(this.mainList)&&(this.ulElement=this.mainList),this.checkPlaceholderSize(),J.pd.createSpanElement(this.overAllWrapper,this.createElement),this.calculateWidth(),!(0,s.hX)(this.overAllWrapper)&&!(0,s.hX)(this.overAllWrapper.getElementsByClassName("e-ddl-icon")[0]&&this.overAllWrapper.getElementsByClassName("e-float-text-content")[0]&&"Never"!==this.floatLabelType)&&this.overAllWrapper.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon"),this.isBlurDispatching=!0,this.isAngular&&this.dispatchEvent(this.inputElement,"blur")}},i.prototype.calculateWidth=function(){var e;if(this.overAllWrapper){if(!this.showDropDownIcon||this.overAllWrapper.querySelector(".e-label-top"))e=this.overAllWrapper.clientWidth-2*parseInt(getComputedStyle(this.inputElement).paddingRight,10);else{var t=this.dropIcon.offsetWidth+parseInt(getComputedStyle(this.dropIcon).marginRight,10);e=this.overAllWrapper.clientWidth-(t+2*parseInt(getComputedStyle(this.inputElement).paddingRight,10))}"Never"!==this.floatLabelType&&J.pd.calculateWidth(e,this.overAllWrapper,this.getModuleName())}},i.prototype.checkPlaceholderSize=function(){if(this.showDropDownIcon){var e=this.dropIcon.offsetWidth+parseInt(window.getComputedStyle(this.dropIcon).marginRight,10);this.setPlaceholderSize(e)}else(0,s.hX)(this.dropIcon)||this.setPlaceholderSize(this.showDropDownIcon?this.dropIcon.offsetWidth:0)},i.prototype.setPlaceholderSize=function(e){(0,s.hX)(this.value)||0===this.value.length?0!==this.dropIcon.offsetWidth?this.searchWrapper.style.width="calc(100% - "+(e+10)+"px":(0,s.iQ)([this.searchWrapper],j0):(0,s.hX)(this.value)||(this.searchWrapper.removeAttribute("style"),(0,s.vy)([this.searchWrapper],j0))},i.prototype.refreshInputHight=function(){(0,s.hX)(this.searchWrapper)||(this.value&&this.value.length||!(0,s.hX)(this.text)&&""!==this.text?this.searchWrapper.classList.add(Dh):this.searchWrapper.classList.remove(Dh))},i.prototype.validateValues=function(e,t){return JSON.stringify(e.slice().sort())!==JSON.stringify(t.slice().sort())},i.prototype.updateValueState=function(e,t,n){if(this.initStatus&&this.validateValues(t||[],n||[])){var l={e,oldValue:n,value:t,isInteracted:!!e,element:this.element,event:e};this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",l),this.enableVirtualization&&this.enableSelectionOrder&&"CheckBox"===this.mode&&(this.preventSetCurrentData=!1),this.updateTempValue(),this.changeOnBlur||this.dispatchEvent(this.hiddenElement,"change")}this.selectedValueInfo=this.viewPortInfo},i.prototype.updateTempValue=function(){this.tempValues=this.value?this.value.slice():this.value},i.prototype.updateAriaActiveDescendant=function(){!(0,s.hX)(this.ulElement)&&!(0,s.hX)(this.ulElement.getElementsByClassName("e-item-focus")[0])&&(0,s.uK)(this.inputElement,{"aria-activedescendant":this.ulElement.getElementsByClassName("e-item-focus")[0].id})},i.prototype.pageUpSelection=function(e,t){var n=this.list.querySelectorAll("li."+P_li+":not(."+rt+"):not(.e-reorder-hide)"),r=e>=0?n[e+1]:n[0];if(this.fields.disabled&&r&&!this.enableVirtualization){for(;r&&(r.classList.contains("e-disabled")||r.classList.contains(rt)||r.classList.contains(".e-reorder-hide")||r.classList.contains("e-list-group-item"));)r=r.previousElementSibling;if(!r)return}this.enableVirtualization&&t&&(r=this.liCollections.length>=e&&e>=0?this.liCollections[e]:this.liCollections[this.skeletonCount]),!(0,s.hX)(r)&&r.classList.contains("e-virtual-list")&&(r=this.liCollections[this.skeletonCount]),this.enableVirtualization?((0,s.hX)(r)||r.classList.contains("e-item-focus")?0===this.viewPortInfo.startIndex&&(this.isKeyBoardAction=!0,this.scrollTop(r,this.getIndexByValue(r.getAttribute("data-value")),this.keyboardEvent.keyCode)):(this.isKeyBoardAction=!0,this.addListFocus(r),this.scrollTop(r,this.getIndexByValue(r.getAttribute("data-value")),this.keyboardEvent.keyCode)),this.previousFocusItem=r):(this.isKeyBoardAction=!0,this.addListFocus(r),this.scrollTop(r,this.getIndexByValue(r.getAttribute("data-value")),this.keyboardEvent.keyCode))},i.prototype.pageDownSelection=function(e,t){var n=this.getItems(),r=this.list.querySelectorAll("li."+P_li+":not(."+rt+"):not(.e-reorder-hide):not(.e-virtual-list-end)"),o=e<=r.length?r[e-1]:r[r.length-1];if(this.fields.disabled&&o&&!this.enableVirtualization){for(;o&&(o.classList.contains("e-disabled")||o.classList.contains(rt)||o.classList.contains(".e-reorder-hide")||o.classList.contains("e-list-group-item"));)o=o.nextElementSibling;if(!o)return}this.enableVirtualization&&this.skeletonCount>0&&(o=e<n.length?this.liCollections[e]:this.liCollections[n.length-1]),this.enableVirtualization&&t&&(o=e<=n.length?this.liCollections[e]:this.liCollections[n.length-1]),this.enableVirtualization&&o&&o.classList.contains("e-virtual-list-end")&&(o=r[r.length-1]),this.isKeyBoardAction=!0,this.addListFocus(o),this.previousFocusItem=o,this.scrollBottom(o,this.getIndexByValue(o.getAttribute("data-value")),!1,this.keyboardEvent.keyCode)},i.prototype.getItems=function(){return this.list||a.prototype.render.call(this),this.ulElement&&this.ulElement.querySelectorAll("."+P_li).length>0?this.ulElement.querySelectorAll("."+P_li+":not(."+rt+")"):[]}
1,i.prototype.focusInHandler=function(e){var t=this;return!!this.enabled&&(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(Dh),this.checkPlaceholderSize(),this.focused&&(this.trigger("focus",{isInteracted:!!e,event:e}),this.focused=!1),this.overAllWrapper.classList.contains(to)||this.overAllWrapper.classList.add(to),function LI(a,i){a.classList.add("e-input-focus");var e=i.querySelector("."+ul);(0,s.hX)(e)||((0,s.iQ)([e],Jo),e.classList.contains(eo)&&(0,s.vy)([e],eo))}(this.overAllWrapper,this.componentWrapper),this.isPopupOpen()&&this.refreshPopup(),this.allowResize&&this.setResize(),setTimeout(function(){t.calculateWidth()},150),!0)},i.prototype.showDelimWrapper=function(){"CheckBox"===this.mode?this.viewWrapper.style.display="":this.delimiterWrapper.style.display="",this.componentWrapper.classList.add(R0)},i.prototype.hideDelimWrapper=function(){this.delimiterWrapper.style.display="none",this.componentWrapper.classList.remove(R0)},i.prototype.expandTextbox=function(){var e=5;if(this.placeholder){var t=this.placeholder.charCodeAt(0);e=e>this.inputElement.placeholder.length?e:this.inputElement.placeholder.length*(44032<=t&&t<=55215?1.5:19968<=t&&t<=40959?2:1)}this.inputElement.size=this.inputElement.value.length>e?this.inputElement.value.length:e},i.prototype.isPopupOpen=function(){return null!==this.popupWrapper&&null!==this.popupWrapper.parentElement},i.prototype.refreshPopup=function(){this.popupObj&&this.mobFilter&&(this.popupObj.setProperties({width:this.calcPopupWidth()}),this.popupObj.refreshPosition(this.overAllWrapper),this.popupObj.resolveCollision())},i.prototype.checkTextLength=function(){return this.targetElement().length<1},i.prototype.popupKeyActions=function(e){switch(e.keyCode){case 38:this.hidePopup(e),"CheckBox"===this.mode&&this.inputElement.focus(),e.preventDefault();break;case 40:this.isPopupOpen()||(this.showPopup(e),e.preventDefault())}},i.prototype.updatePopupPosition=function(){this.refreshPopup()},i.prototype.updateAriaAttribute=function(){var e=this.list.querySelector("."+P_focus);if(!(0,s.hX)(e))if(this.inputElement.setAttribute("aria-activedescendant",e.id),this.allowFiltering){var t=this.popupWrapper.querySelector("."+Uu);t&&t.setAttribute("aria-activedescendant",e.id)}else"CheckBox"===this.mode&&this.overAllWrapper.setAttribute("aria-activedescendant",e.id)},i.prototype.homeNavigation=function(e,t){if(this.removeFocus(),this.enableVirtualization)if(e)this.enableVirtualization&&0!==this.viewPortInfo.startIndex&&(this.viewPortInfo.startIndex=0,this.viewPortInfo.endIndex=this.itemCount,this.updateVirtualItemIndex(),this.resetList(this.dataSource,this.fields,this.query));else if(this.enableVirtualization&&(!this.value&&this.viewPortInfo.endIndex!==this.totalItemCount||this.value&&this.value.length>0&&this.viewPortInfo.endIndex!==this.totalItemCount+this.value.length)){this.viewPortInfo.startIndex=this.totalItemCount-this.itemCount,this.viewPortInfo.endIndex=this.totalItemCount,this.updateVirtualItemIndex();var n=(new x.XK).clone();this.value&&this.value.length>0&&(n=(n=this.getForQuery(this.value).clone()).skip(this.totalItemCount-this.itemCount)),this.resetList(this.dataSource,this.fields,n)}this.UpdateSkeleton();var r=this.ulElement.querySelectorAll("li."+P_li+":not(."+rt+"):not(.e-reorder-hide)");if(r.length>0){var o=r[e?0:r.length-1];this.enableVirtualization&&e&&(o=r[this.skeletonCount]),this.removeFocus(),o.classList.add(P_focus),this.enableVirtualization&&e?this.scrollTop(o,void 0,this.keyboardEvent.keyCode):t||this.scrollBottom(o,void 0,!1,this.keyboardEvent.keyCode),this.updateAriaActiveDescendant()}},i.prototype.updateSelectionList=function(){if(!(0,s.hX)(this.value)&&this.value.length)for(var e=0;e<this.value.length;e++){var t=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[e]):this.value[e],n=this.getElementByValue(t);n&&!n.classList.contains("e-active")&&n.classList.add("e-active")}},i.prototype.handleVirtualKeyboardActions=function(e,t){var r,n=this.list.querySelector("."+P_focus);switch(this.isKeyBoardAction=!0,e.keyCode){case 40:this.arrowDown(e,!0);break;case 38:this.arrowUp(e,!0);break;case 33:e.preventDefault(),n&&(r=this.getIndexByValue(this.previousFocusItem.getAttribute("data-value"))-1,this.pageUpSelection(r,!0),this.updateAriaAttribute());break;case 34:e.preventDefault(),n&&(r=this.getIndexByValue(this.previousFocusItem.getAttribute("data-value")),this.pageDownSelection(r,!0),this.updateAriaAttribute());break;case 35:case 36:this.isMouseScrollAction=!0,this.homeNavigation(36===e.keyCode,!0),this.isPreventScrollAction=!0}
1this.keyboardEvent=null,this.isScrollChanged=!0,this.isKeyBoardAction=!1},i.prototype.onKeyDown=function(e){if(!this.readonly&&(this.enabled||"CheckBox"===this.mode)&&(this.preventSetCurrentData=!1,this.keyboardEvent=e,this.isPreventKeyAction&&this.enableVirtualization&&e.preventDefault(),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("."+P_focus),n=void 0;switch(e.keyCode){case 36:case 35:this.isMouseScrollAction=!0,this.isKeyBoardAction=!0,this.homeNavigation(36===e.keyCode);break;case 33:return e.preventDefault(),void(t&&(n=this.getIndexByValue(t.getAttribute("data-value")),this.pageUpSelection(n-this.getPageCount()-1),this.updateAriaAttribute()));case 34:return e.preventDefault(),void(t&&(n=this.getIndexByValue(t.getAttribute("data-value")),this.pageDownSelection(n+this.getPageCount()),this.updateAriaAttribute()));case 38:this.isKeyBoardAction=!0,this.arrowUp(e);break;case 40:this.isKeyBoardAction=!0,this.arrowDown(e);break;case 27:return e.preventDefault(),this.isKeyBoardAction=!0,this.hidePopup(e),"CheckBox"===this.mode&&this.inputElement.focus(),void(this.isKeyBoardAction=!1);case 13:return e.preventDefault(),this.isKeyBoardAction=!0,"CheckBox"!==this.mode&&this.selectByKey(e),this.checkPlaceholderSize(),void(this.isKeyBoardAction=!1);case 32:return this.isKeyBoardAction=!0,this.spaceKeySelection(e),void(this.isKeyBoardAction=!1);case 9:e.preventDefault(),this.isKeyBoardAction=!0,this.hidePopup(e),this.inputElement.focus(),this.overAllWrapper.classList.add(to)}}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.allowFiltering&&(this.previousFilterText=this.targetElement()),this.checkBackCommand(e)),this.expandTextbox(),"CheckBox"===this.mode&&this.showSelectAll||this.refreshPopup(),this.allowResize&&this.setResize(),this.isKeyBoardAction=!1}},i.prototype.arrowDown=function(e,t){e.preventDefault(),this.moveByList(1,t),this.keyAction=!0,(document.activeElement.classList.contains(Uu)||"CheckBox"===this.mode&&!this.allowFiltering&&document.activeElement!==this.list)&&s.Jm.add(this.list,"keydown",this.onKeyDown,this),this.updateAriaAttribute()},i.prototype.arrowUp=function(e,t){e.preventDefault(),this.keyAction=!0;var n=this.list.querySelectorAll("li."+P_li+":not(."+rt+"):not(.e-reorder-hide)");this.enableGroupCheckBox&&"CheckBox"===this.mode&&!(0,s.hX)(this.fields.groupBy)&&(n=this.list.querySelectorAll("li."+P_li+",li."+P_group+":not(."+rt+"):not(.e-reorder-hide)"));var r=this.list.querySelector("li."+P_focus);if(this.focusFirstListItem=!(0,s.hX)(this.liCollections[0])&&this.liCollections[0].classList.contains("e-item-focus"),this.list&&this.list.querySelector(".e-list-parent.e-ul.e-reorder")){var o=this.list.querySelectorAll("li."+P_li+":not(."+rt+"):not(.e-reorder-hide):not(.e-virtual-list-end)");o.length>0&&(this.focusFirstListItem=!(0,s.hX)(o[0])&&o[0].classList.contains("e-item-focus"))}Array.prototype.slice.call(n).indexOf(r)<=0&&"CheckBox"===this.mode&&this.allowFiltering&&(this.keyAction=!1,this.notify("inputFocus",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"focus"})),this.moveByList(-1,t),this.updateAriaAttribute()},i.prototype.spaceKeySelection=function(e){if("CheckBox"===this.mode){var t=this.list.querySelector("li."+P_focus),n=document.getElementsByClassName("e-selectall-parent")[0];if((!(0,s.hX)(t)||n&&n.classList.contains("e-item-focus"))&&(e.preventDefault(),this.keyAction=!0),this.selectByKey(e),this.keyAction){var r=this.list.querySelector("li."+P_focus);!(0,s.hX)(r)&&n&&n.classList.contains("e-item-focus")&&r.classList.remove("e-item-focus")}}this.checkPlaceholderSize()},i.prototype.checkBackCommand=function(e){this.backCommand=8===e.keyCode&&this.allowFiltering?this.targetElement()===this.previousFilterText:""!==this.targetElement()},i.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.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[this.value.length-1]):this.value[this.value.length-1];this.removeValue(this.value[this.value.length-1],e),this.updateDelimeter(this.delimiterChar,e),this.focusAtLastListItem(t)}},i.prototype.selectByKey=function(e){this.removeChipSelection(),this.selectListByKey(e),this.hideSelectedItem&&this.focusAtFirstListItem()},i.prototype.escapeAction=function(){var e=this.tempValues?this.tempValues.slice():[];this.allowObjectBinding&&(e=this.tempValues?this.tempValues.slice():[]),this.value&&this.validateValues(this.value,e)&&("CheckBox"!==this.mode&&(this.value=e,(this.allowFiltering||this.allowCustomValue)&&this.refreshListItems(null),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()},i.prototype.scrollBottom=function(e,t,n,r,o){void 0===n&&(n=!1),void 0===r&&(r=null),void 0===o&&(o=!1),(!(0,s.hX)(e)&&e.classList.contains("e-virtual-list")||this.enableVirtualization&&(0,s.hX)(e))&&(e=this.liCollections[this.skeletonCount]);var l=e&&!isNaN(parseInt(window.getComputedStyle(e).marginBottom,10))?parseInt(window.getComputedStyle(e).marginBottom,10):0;this.isUpwardScrolling=!1;var h=this.list.querySelectorAll(".e-virtual-list:not(.e-virtual-list-end)").length,d=this.list.querySelectorAll("li:not(.e-virtual-list-end)"),p=d&&d.length>0&&d[d.length-1]?d[d.length-1].getAttribute("data-value"):null,u=this.virtualListInfo&&this.virtualListInfo.startIndex?e.offsetTop+this.virtualListInfo.startIndex*(e.offsetHeight+l):e.offsetTop,f=this.list.offsetHeight,m=u-h*(e.offsetHeight+l)+(e.offsetHeight+l)-this.list.scrollTop,g=this.list.scrollTop+m-f,v=!1,b=u-h*(e.offsetHeight+l)+(e.offsetHeight+l)-this.list.scrollTop;if(b=this.fields.groupBy&&!(0,s.hX)(this.fixedHeaderElement)?b-this.fixedHeaderElement.offsetHeight:b,0!==t||this.enableVirtualization){if(m>f||!(b>0&&this.list.offsetHeight>b)){var y=e?e.getAttribute("data-value"):null,S=34===r?this.getPageCount()-1:1;!this.enableVirtualization||this.isKeyBoardAction||n?this.isKeyBoardAction&&this.enableVirtualization&&p&&y===p&&35!==r&&!this.isVirtualScrolling?(this.isPreventKe
1yAction=!0,this.list.scrollTop+=(e.offsetHeight+l)*S,this.isPreventKeyAction=!this.isScrollerAtEnd()&&this.isPreventKeyAction,this.isKeyBoardAction=!1,this.isPreventScrollAction=!1):this.enableVirtualization&&35===r?(this.isPreventKeyAction=!1,this.isKeyBoardAction=!1,this.isPreventScrollAction=!1,this.list.scrollTop=this.list.scrollHeight):(34===r&&this.enableVirtualization&&!this.isVirtualScrolling&&(this.isPreventKeyAction=!1,this.isKeyBoardAction=!1,this.isPreventScrollAction=!1),this.list.scrollTop=g):this.list.scrollTop=this.virtualListInfo&&this.virtualListInfo.startIndex?o&&this.virtualListInfo.startIndex?this.virtualListInfo.startIndex*this.listItemHeight+2*this.listItemHeight:this.virtualListInfo.startIndex*this.listItemHeight:0,v=this.isKeyBoardAction}}else this.list.scrollTop=0;this.isKeyBoardAction=v},i.prototype.scrollTop=function(e,t,n){void 0===n&&(n=null);var r=this.list.querySelectorAll(".e-virtual-list:not(.e-virtual-list-end)").length,o=e&&!isNaN(parseInt(window.getComputedStyle(e).marginBottom,10))?parseInt(window.getComputedStyle(e).marginBottom,10):0,l=this.virtualListInfo&&this.virtualListInfo.startIndex?e.offsetTop+this.virtualListInfo.startIndex*(e.offsetHeight+o):e.offsetTop,h=l-r*(e.offsetHeight+o)-this.list.scrollTop,d=this.list.querySelector("li.e-list-item:not(.e-virtual-list)")?this.list.querySelector("li.e-list-item:not(.e-virtual-list)").getAttribute("data-value"):null;h=this.fields.groupBy&&!(0,s.b0)(this.fixedHeaderElement)?h-this.fixedHeaderElement.offsetHeight:h;var p=l-r*(e.offsetHeight+o)+(e.offsetHeight+o)-this.list.scrollTop,u=this.enableVirtualization&&"autocomplete"===this.getModuleName()&&h<=0;if(0!==t||this.enableVirtualization)if(h<0||u){var f=e?e.getAttribute("data-value"):null,m=33===n?this.getPageCount()-2:1;this.enableVirtualization&&this.isKeyBoardAction&&d&&f===d&&36!==n&&!this.isVirtualScrolling?(this.isUpwardScrolling=!0,this.isPreventKeyAction=!0,this.isKeyBoardAction=!1,this.list.scrollTop-=(e.offsetHeight+o)*m,this.isPreventKeyAction=0!==this.list.scrollTop&&this.isPreventKeyAction,this.isPreventScrollAction=!1):this.enableVirtualization&&36===n?(this.isPreventScrollAction=!1,this.isPreventKeyAction=!0,this.isKeyBoardAction=!1,this.list.scrollTo(0,0)):(33===n&&this.enableVirtualization&&!this.isVirtualScrolling&&(this.isPreventKeyAction=!1,this.isKeyBoardAction=!1,this.isPreventScrollAction=!1),this.list.scrollTop=this.list.scrollTop+h)}else p>0&&this.list.offsetHeight>p||(this.list.scrollTop=e.offsetTop-(this.fields.groupBy&&!(0,s.hX)(this.fixedHeaderElement)?this.fixedHeaderElement.offsetHeight:0));else this.list.scrollTop=0},i.prototype.isScrollerAtEnd=function(){return this.list&&this.list.scrollTop+this.list.clientHeight>=this.list.scrollHeight},i.prototype.selectListByKey=function(e){var t=this.list.querySelector("li."+P_focus),n=this.value&&this.value.length?this.value.length:0;if(null!==t){if(e.preventDefault(),t.classList.contains("e-active")&&(n-=1),this.isValidLI(t)&&n<this.maximumSelectionLength){this.updateListSelection(t,e),this.addListFocus(t),"CheckBox"===this.mode?(this.updateDelimView(),this.updateDelimeter(this.delimiterChar,e),this.refreshInputHight(),this.checkPlaceholderSize(),this.enableGroupCheckBox&&!(0,s.hX)(this.fields.groupBy)&&(this.findGroupStart(t.firstElementChild.lastElementChild),this.deselectHeader())):this.updateDelimeter(this.delimiterChar,e);var o=""!==this.targetElement().trim();this.makeTextBoxEmpty(),"CheckBox"!==this.mode&&this.refreshListItems(t.textContent,o),this.changeOnBlur||this.updateValueState(e,this.value,this.tempValues),this.refreshPopup()}else!this.isValidLI(t)&&n<this.maximumSelectionLength&&(t.firstElementChild.lastElementChild.classList.contains("e-check")?this.selectAllItem(!1,e,t):this.selectAllItem(!0,e,t));this.refreshSelection(),this.closePopupOnSelect&&this.hidePopup(e)}var l=document.getElementsByClassName("e-selectall-parent")[0];if(l&&l.classList.contains("e-item-focus")){var h=l.childNodes[0];h.classList.contains("e-check")?(h.classList.remove("e-check"),this.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"check",name:"checkSelectAll"}),this.selectAllItem(!1,e,t)):(h.classList.add("e-check"),this.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"check",name:"checkSelectAll"}),this.selectAllItem(!0,e,t))}this.refreshPlaceHolder()},i.prototype.refreshListItems=function(e,t){if((this.allowFiltering||"CheckBox"===this.mode&&!0===this.enableSelectionOrder||this.allowCustomValue)&&this.mainList&&this.listData){var n=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;if(this.enableVirtualization)if(this.allowCustomValue&&this.virtualCustomData&&null==e&&this.virtualCustomData&&this.viewPortInfo&&0===this.viewPortInfo.startIndex&&this.viewPortInfo.endIndex===this.itemCount)this.virtualCustomData=null,this.renderItems(this.mainData,this.fields);else if(this.allowFiltering&&t){if(this.updateInitialData(),this.onActionComplete(n,this.mainData),this.isVirtualTrackHeight=!1,this.list.getElementsByClassName("e-virtual-ddl")[0])this.list.getElementsByClassName("e-virtual-ddl")[0].style=this.GetVirtualTrackHeight();else if(!this.list.querySelector(".e-virtual-ddl")&&this.skeletonCount>
10){var r=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl"});r.style.cssText=this.GetVirtualTrackHeight(),this.popupWrapper.querySelector(".e-dropdownbase").appendChild(r)}}else this.onActionComplete(this.list,this.listData);else this.onActionComplete(n,this.mainData);this.focusAtLastListItem(e),this.value&&this.value.length&&this.refreshSelection()}else!(0,s.hX)(this.fields.groupBy)&&this.value&&this.value.length&&this.refreshSelection()},i.prototype.removeSelectedChip=function(e){var n,t=this.chipCollectionWrapper.querySelector("span."+bs);if(null!==t){(0,s.hX)(this.value)||(this.tempValues=this.value.slice()),null!==(n=t.nextElementSibling)&&(this.removeChipSelection(),this.addChipSelection(n,e));var r=this.allowObjectBinding?this.getDataByValue(this.getFormattedValue(t.getAttribute("data-value"))):t.getAttribute("data-value");this.removeValue(r,e),this.updateDelimeter(this.delimiterChar,e),this.makeTextBoxEmpty()}this.closePopupOnSelect&&this.hidePopup(e),this.checkPlaceholderSize()},i.prototype.moveByTop=function(e){var n,t=this.list.querySelectorAll("li."+P_li);t.length>1&&(this.removeFocus(),this.addListFocus(t[n=e?0:t.length-1]),this.scrollBottom(t[n],n)),this.updateAriaAttribute()},i.prototype.clickHandler=function(e){var n=e.target.className,r=document.getElementsByClassName("e-selectall-parent")[0];("e-input-filter e-input"===n||"e-input-group e-control-wrapper e-input-focus"===n)&&r.classList.contains("e-item-focus")&&r.classList.remove("e-item-focus")},i.prototype.moveByList=function(e,t){if(this.list){var n=this.list.querySelectorAll("li."+P_li+":not(."+rt+"):not(.e-reorder-hide):not(.e-virtual-list-end)");"CheckBox"===this.mode&&this.enableGroupCheckBox&&!(0,s.hX)(this.fields.groupBy)&&(n=this.list.querySelectorAll("li."+P_li+",li."+P_group+":not(."+rt+"):not(.e-reorder-hide):not(.e-virtual-list-end)"));var r=this.list.querySelector("li."+P_focus);this.enableVirtualization&&t&&!(0,s.hX)(this.currentFocuedListElement)&&(r=this.getElementByValue(this.getFormattedValue(this.currentFocuedListElement.getAttribute("data-value"))));var o=-1,l=document.getElementsByClassName("e-selectall-parent")[0];if("CheckBox"===this.mode&&this.showSelectAll&&1===e&&!(0,s.hX)(l)&&!l.classList.contains("e-item-focus")&&0===this.list.getElementsByClassName("e-item-focus").length&&this.liCollections.length>1)!this.focusFirstListItem&&l.classList.contains("e-item-focus")?l.classList.remove("e-item-focus"):l.classList.contains("e-item-focus")||l.classList.add("e-item-focus");else if(n.length){"CheckBox"===this.mode&&this.showSelectAll&&!(0,s.hX)(l&&-1===e)&&(this.focusFirstListItem&&1!==e||!l.classList.contains("e-item-focus")?this.focusFirstListItem&&!l.classList.contains("e-item-focus")&&(1!==e||!this.list.querySelector(".e-item-focus"))&&l.classList.add("e-item-focus"):l.classList.remove("e-item-focus"));for(var h=0;h<n.length;h++)if(n[h]===r){o=h;break}if(e>0)o<n.length-1&&(this.removeFocus(),this.enableVirtualization&&t?this.addListFocus(n[o]):this.enableVirtualization&&n[o+1].classList.contains("e-virtual-list")?this.addListFocus(n[this.skeletonCount]):this.addListFocus(n[++o]),o>-1&&(this.updateCheck(n[o]),this.scrollBottom(n[o],o),this.currentFocuedListElement=n[o]));else if(o>0)if(this.enableVirtualization){var d=n[o-1].classList.contains("e-virtual-list"),p=t?o:o-1;(t||!d)&&this.removeFocus(),(t||!d)&&(this.addListFocus(n[p]),this.updateCheck(n[p]),this.scrollTop(n[p],o),this.currentFocuedListElement=n[p])}else this.removeFocus(),this.addListFocus(n[--o]),this.updateCheck(n[o]),this.scrollTop(n[o],o)}}var u=this.list?this.list.querySelector(".e-item-focus"):null;if(this.isDisabledElement(u)){if(0===this.list.querySelectorAll(".e-list-item:not(.e-hide-listitem):not(.e-disabled)").length||38===this.keyCode&&"CheckBox"===this.mode&&this.enableGroupCheckBox&&!(0,s.hX)(this.fields.groupBy)&&u===this.list.querySelector("li.e-list-group-item"))return void this.removeFocus();0===(h=this.getIndexByValue(u.getAttribute("data-value")))&&(e=1),h===this.list.querySelectorAll(".e-list-item:not(.e-hide-listitem)").length-1&&(e=-1),this.moveByList(e)}},i.prototype.getElementByValue=function(e){for(var t,r=0,o=this.getItems();r<o.length;r++){var l=o[r];if(this.getFormattedValue(l.getAttribute("data-value"))===e){t=l;break}}return t},i.prototype.updateCheck=function(e){"CheckBox"===this.mode&&this.enableGroupCheckBox&&!(0,s.hX)(this.fields.groupBy)&&(e.firstElementChild.lastElementChild.classList.contains("e-check")?e.classList.add("e-active"):e.classList.remove("e-active"))},i.prototype.moveBy=function(e,t){var n,r=this.chipCollectionWrapper.querySelectorAll("span."+Ko),o=this.chipCollectionWrapper.querySelector("span."+bs);null===o?e<0&&this.addChipSelection(r[r.length-1],t):e<0?null!==(n=o.previousElementSibling)&&(this.removeChipSelection(),this.addChipSelection(n,t)):(n=o.nextElementSibling,this.removeChipSelection(),null!==n&&this.addChipSelection(n,t))},i.prototype.chipClick=function(e){if(this.enabled){var t=(0,s.kp)(e.target,"."+Ko);this.removeChipSelection(),this.addChipSelection(t,e)}},i.prototype.removeChipSelection=function(){this.chipCollectionWrapper&&this.removeChipFocus()},i.prototype.addChipSelection=function(e,t){(0,s.iQ)([e],bs),this.trigger("chipSelection",t)},i.prototype.getVirtualDataByValue=function(e){if(!(0,s.hX)(this.selectedListData)){var t=this.t
1ypeOfData(this.selectedListData).typeof;if("string"===t||"number"===t||"boolean"===t){for(var n=0,r=this.selectedListData;n<r.length;n++)if(!(0,s.hX)(o=r[n])&&o===e)return o}else for(var l=0,h=this.selectedListData;l<h.length;l++){var o;if(!(0,s.hX)(o=h[l])&&(0,s._W)(this.fields.value?this.fields.value:"value",o)===e)return o}}return null},i.prototype.onChipRemove=function(e){if(3!==e.which&&2!==e.button&&this.enabled&&!this.readonly){var n=e.target.parentElement.getAttribute("data-value"),r=this.allowObjectBinding?this.enableVirtualization?this.getVirtualDataByValue(this.getFormattedValue(n)):this.getDataByValue(this.getFormattedValue(n)):this.getFormattedValue(n);if(this.allowCustomValue&&("false"!==n&&!1===r||!(0,s.hX)(r)&&"NaN"===r.toString())&&(r=n),this.isPopupOpen()&&"CheckBox"!==this.mode&&this.hidePopup(e),this.inputFocus||this.inputElement.focus(),this.removeValue(r,e),r=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",r):r,(0,s.hX)(this.findListElement(this.list,"li","data-value",r))&&this.mainList&&this.listData){var o=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;this.onActionComplete(o,this.mainData)}this.updateDelimeter(this.delimiterChar,e),this.placeholder&&"Never"===this.floatLabelType?(this.makeTextBoxEmpty(),this.checkPlaceholderSize()):this.inputElement.value="",e.preventDefault()}},i.prototype.makeTextBoxEmpty=function(){this.inputElement.value="",this.refreshPlaceHolder()},i.prototype.refreshPlaceHolder=function(){this.placeholder&&"Never"===this.floatLabelType?this.inputElement.placeholder=this.value&&this.value.length||!(0,s.hX)(this.text)&&""!==this.text?"":Xu(this.placeholder):(this.setFloatLabelType(),J.pd.createSpanElement(this.overAllWrapper,this.createElement)),this.expandTextbox()},i.prototype.removeAllItems=function(e,t,n,r,o){var l=this.allowObjectBinding?this.indexOfObjectInArray(e,this.value):this.value.indexOf(e),h=this.value.slice(0);h.splice(l,1),this.setProperties({value:[].concat([],h)},!0),r.setAttribute("aria-selected","false"),(0,s.vy)([r],this.hideSelectedItem?rt:"e-active"),this.notify("activeList",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,li:r,e:this,index:l}),this.invokeCheckboxSelection(r,t,n);var p=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",e):e;this.updateMainList(!0,p,o),this.updateChipStatus()},i.prototype.invokeCheckboxSelection=function(e,t,n){this.notify("updatelist",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,li:e,e:t}),this.updateAriaActiveDescendant(),this.value&&this.value.length!==this.mainData.length&&"CheckBox"===this.mode&&this.showSelectAll&&!this.isSelectAll&&!n&&this.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,value:"uncheck"})},i.prototype.removeValue=function(e,t,n,r){var o=this,l=this.allowObjectBinding?this.indexOfObjectInArray(e,this.value):this.value.indexOf(this.getFormattedValue(e));-1===l&&this.allowCustomValue&&!(0,s.hX)(e)&&(l=this.allowObjectBinding?this.indexOfObjectInArray(e,this.value):this.value.indexOf(e.toString()));var h=t&&t.target;r=!!(r||h&&h.classList.contains("e-close-hooker"))||null;var d=this.hideSelectedItem?rt:"e-active";if(-1!==l){var p=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",e):e,u=this.virtualSelectAll?null:this.findListElement(this.list,"li","data-value",p),f=this.allowObjectBinding?e:this.getDataByValue(e);this.trigger("removing",{e:t,item:u,itemData:f,isInteracted:!!t,cancel:!1},function(g){if(g.cancel)o.removeIndex++;else{o.isRemoveSelection=!!o.enableVirtualization||o.isRemoveSelection,o.currentRemoveValue=o.allowObjectBinding?(0,s._W)(o.fields.value?o.fields.value:"",e):e,o.virtualSelectAll=!1;var v=o.value.slice(0);if(v.splice(l,1),o.enableVirtualization&&o.selectedListData&&o.selectedListData.splice(l,1),o.setProperties({value:[].concat([],v)},!0),o.enableVirtualization){var b=0===l&&o.text.split(o.delimiterChar)&&1===o.text.split(o.delimiterChar).length?o.text.replace(o.text.split(o.delimiterChar)[l],""):o.text.replace(0===l?o.text.split(o.delimiterChar)[l]+o.delimiterChar:o.delimiterChar+o.text.split(o.delimiterChar)[l],"");o.setProperties({text:b.toString()},!0)}if(null!==u){var y=o.allowObjectBinding?(0,s._W)(o.fields.value?o.fields.value:"",e):e,S=o.findListElement(o.mainList,"li","data-value",y);u.setAttribute("aria-selected","false"),(0,s.vy)([u],d),S&&(S.setAttribute("aria-selected","false"),(0,s.vy)([u,S],d)),o.notify("activeList",{module:"CheckBoxSelection",enable:"CheckBox"===o.mode,li:u,e:o,index:l}),o.invokeCheckboxSelection(u,t,r)}var E=o.allowObjectBinding?(0,s._W)(o.fields.value?o.fields.value:"",e):e;if(o.hideSelectedItem&&o.fields.groupBy&&u&&o.hideGroupItem(E),o.hideSelectedItem&&o.fixedHeaderElement&&o.fields.groupBy&&"CheckBox"!==o.mode&&o.isPopupOpen()&&a.prototype.scrollStop.call(o),o.updateMainList(!0,E),o.removeChip(E,r),o.updateChipStatus(),(o.value&&o.value.length?o.value.length:0)<o.maximumSelectionLength){var T=o.list.querySelectorAll("li."+P_li+":not(.e-active)");(0,s.vy)(T,"e-disable")}o.trigger("removed",g);var I=t&&t.currentTarget,w=!(!I||!I.classList.contains("e-selectall-parent"))||null;
1!o.changeOnBlur&&!r&&t&&n&&!w&&o.isSelectAllTarget&&o.updateValueState(t,o.value,o.tempValues),n&&(o.selectAllEventData.push(f),o.selectAllEventEle.push(u)),1===n&&(o.changeOnBlur||o.updateValueState(t,o.value,o.tempValues),o.trigger("selectedAll",{event:t,items:o.selectAllEventEle,itemData:o.selectAllEventData,isInteracted:!!t,isChecked:!1}),o.selectAllEventData=[],o.selectAllEventEle=[]),r&&(1===n||null===n)&&o.clearAllCallback(t,r),o.isPopupOpen()&&u&&u.parentElement.classList.contains("e-reorder")&&(o.hideSelectedItem&&o.value&&Array.isArray(o.value)&&o.value.length>0&&o.totalItemsCount(),o.notify("setCurrentViewDataAsync",{module:"VirtualScroll"}))}})}},i.prototype.updateMainList=function(e,t,n){if(this.allowFiltering||"CheckBox"===this.mode){var r=n||this.findListElement(this.mainList,"li","data-value",t);r&&(e?(r.setAttribute("aria-selected","false"),(0,s.vy)([r],this.hideSelectedItem?rt:"e-active"),"CheckBox"===this.mode&&(0,s.vy)([r.firstElementChild.lastElementChild],"e-check")):(r.setAttribute("aria-selected","true"),(0,s.iQ)([r],this.hideSelectedItem?rt:"e-active"),"CheckBox"===this.mode&&(0,s.iQ)([r.firstElementChild.lastElementChild],"e-check")))}},i.prototype.removeChip=function(e,t){if(this.chipCollectionWrapper&&(!this.enableVirtualization||!t)){var n=this.findListElement(this.chipCollectionWrapper,"span","data-value",e);n&&(0,s.TF)(n)}},i.prototype.setWidth=function(e){(0,s.hX)(e)||("number"==typeof e?this.overAllWrapper.style.width=(0,s.IV)(e):"string"==typeof e&&(this.overAllWrapper.style.width=e.match(/px|%|em/)?e:(0,s.IV)(e)))},i.prototype.updateChipStatus=function(){this.value&&this.value.length?((0,s.hX)(this.chipCollectionWrapper)||(this.chipCollectionWrapper.style.display=""),("Delimiter"===this.mode||"CheckBox"===this.mode)&&this.showDelimWrapper(),this.showOverAllClear()):((0,s.hX)(this.chipCollectionWrapper)||(this.chipCollectionWrapper.style.display="none"),(0,s.hX)(this.delimiterWrapper)||(this.delimiterWrapper.style.display="none"),this.hideOverAllClear())},i.prototype.indexOfObjectInArray=function(e,t){for(var n=function(l){var h=t[l];if(Object.keys(e).every(function(d){return h.hasOwnProperty(d)&&h[d]===e[d]}))return{value:l}},r=0;r<t.length;r++){var o=n(r);if("object"==typeof o)return o.value}return-1},i.prototype.addValue=function(e,t,n){this.value||(this.value=[]);var r=this.allowObjectBinding?this.getDataByValue(e):e;if(this.allowObjectBinding&&!this.isObjectInArray(this.getDataByValue(e),this.value)||!this.allowObjectBinding&&this.value.indexOf(r)<0){if(this.setProperties({value:[].concat([],this.value,[r])},!0),this.enableVirtualization&&!this.isSelectAllLoop){var o=this.viewWrapper.innerHTML,l=void 0;o+=1===this.value.length?"":this.delimiterChar+" ",o+=l=this.getOverflowVal(this.value.length-1),l=this.viewWrapper.innerHTML,this.updateWrapperText(this.viewWrapper,o)}if(this.enableVirtualization&&"CheckBox"===this.mode){var h=[];this.allowObjectBinding&&(0,s._W)(this.fields.value?this.fields.value:"",this.value[this.value.length-1]),l=t,h.push(null!=this.text&&""!==this.text?this.text+this.delimiterChar+l:l),this.setProperties({text:h.toString()},!0)}}var u=this.findListElement(this.list,"li","data-value",e);this.removeFocus(),u&&(this.addListFocus(u),this.addListSelection(u)),"Delimiter"!==this.mode&&"CheckBox"!==this.mode&&this.addChip(t,e,n),this.hideSelectedItem&&this.fields.groupBy&&this.hideGroupItem(e),this.updateChipStatus(),this.checkMaxSelection()},i.prototype.checkMaxSelection=function(){var e=this.value&&this.value.length?this.value.length:0;if(e===this.maximumSelectionLength){var t=this.list.querySelectorAll("li."+P_li+".e-active");(0,s.vy)(t,"e-disable");var n=this.list.querySelectorAll("li."+P_li+":not(.e-active)");(0,s.iQ)(n,"e-disable")}if(e<this.maximumSelectionLength){var r=this.list.querySelectorAll("li."+P_li);(0,s.vy)(r,"e-disable")}},i.prototype.dispatchSelect=function(e,t,n,r,o,l,h){var d=this,p=this.listData;if(this.initStatus&&!r&&(!this.allowObjectBinding||this.allowObjectBinding&&e)){e=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",e):e;var u=l||this.getDataByValue(e);this.trigger("select",{e:t,item:n,itemData:u,isInteracted:!!t,cancel:!1},function(m){m.cancel||(o&&(d.selectAllEventData.push(u),d.selectAllEventEle.push(n)),1===o&&(d.trigger("selectedAll",{event:t,items:d.selectAllEventEle,itemData:d.selectAllEventData,isInteracted:!!t,isChecked:!0}),d.selectAllEventData=[]),d.allowCustomValue&&d.isServerRendered&&d.listData!==p&&(d.listData=p),e=d.allowObjectBinding?d.getDataByValue(e):e,d.enableVirtualization&&((0,s.hX)(d.selectedListData)?d.selectedListData=d.allowObjectBinding?[e]:[d.getDataByValue(e)]:l?Array.isArray(d.selectedListData)?d.selectedListData.push(l):d.selectedListData=[d.selectedListData,l]:Array.isArray(d.selectedListData)?d.selectedListData.push(d.allowObjectBinding?e:d.getDataByValue(e)):d.selectedListData=[d.selectedListData,d.allowObjectBinding?e:d.getDataByValue(e)]),(d.enableVirtualization&&e||!d.enableVirtualization)&&d.updateListSelectEventCallback(e,n,t,h),d.hideSelectedItem&&d.fixedHeaderElement&&d.fields.groupBy&&"CheckBox"!==d.mode&&a.prototype.scrollStop.call(d))})}},i.prototype.addChip=function(e,t,n){this.chipCollectionWrapper&&this.getChip(e,t,n)},i.prototype.removeChipFocus=function(){var e=this.chipCollectionWrapper.querySelectorAll("span."+Ko+"."+bs);if((0,s.vy)(e,bs),s.Pw.isDevice)for(var t=this.chipCollectionWrapper.querySelectorAll("span."+Ph.split(" ")[0]),n=0;n<t.length;n++)t[n].style.display="none"},i.prototype.onMobileChipInteraction=function(e){var t=(0,s.kp)(e.target,"."+Ko),n=t.querySelector("span."+Ph.split(" ")[0]);this.enabled&&!this.readonly&&(t.classList.contains(bs)||(this.removeChipFocus(),n.style.display="",t.classList.add(bs)),this.refreshPopup(),e.preventDefault())},i.prototype.multiCompiler=function(e){var t=!1;if("function"!=typeof e&&e)try{t=!!(0,s.Ub)(e,document).length}catch{t=!1}return t},i.prototype.encodeHtmlEntities=function(e){return e.replace(/[\u00A0-\u9999<>&]/g,function(t){return"&#"+t.charCodeAt(0)+";"})},i.prototype.getChip=function(e,t,n){var r=this,o={text:t,value:t},l=this.createElement("span",{className:Ko,attrs:{"data-value":t,title:e}}),d=this.createElement("span",{className:"e-chipcontent"}),p=this.createElement("span",{className:Ph});if(this.mainData&&(o=this.getDataByValue(t)),this.valueTemplate&&!(0,s.hX)(o)){var u=this.multiCompiler(this.valueTemplate),f=(0,s.wE)("function"!=typeof this.valueTemplate&&u?(0,s.Lt)(this.valueTemplate,document).innerHTML.trim():this.valueTemplate)(o,this,"valueTemplate",this.valueTemplateId,this.isStringTemplate,null,d);f&&f.length>0&&(0,s.BC)(f,d),this.renderReactTemplates()}else this.enableHtmlSanitizer?d.innerText=e:d.innerHTML=this.encodeHtmlEntities(e.toString());l.appendChild(d);var m={isInteracted:!!n,itemData:o,e:n,setClass:function(g){(0,s.iQ)([l],g)},cancel:!1};this.isPreventChange=this.isAngular&&this.preventChange,this.trigger("tagging",m,function(g){g.cancel||(s.Pw.isDevice?(l.classList.add("e-mob-chip"),(0,s.BC)([p],l),p.style.display="none",s.Jm.add(l,"click",r.onMobileChipInteraction,r)):(s.Jm.add(l,"mousedown",r.chipClick,r),r.showClearButton&&l.appendChild(p)),s.Jm.add(p,"mousedown",r.onChipRemove,r),r.chipCollectionWrapper.appendChild(l),!r.changeOnBlur&&n&&r.updateValueState(n,r.value,r.tempValues))})},i.prototype.calcPopupWidth=function(){var e=(0,s.IV)(this.popupWidth);return e.indexOf("%")>-1&&(e=(this.componentWrapper.offsetWidth*parseFloat(e)/100).toString()+"px"),this.allowResize&&this.resizeWidth?this.resizeWidth+"px":e},i.prototype.mouseIn=function(){this.enabled&&!this.readonly&&this.showOverAllClear()},i.prototype.mouseOut=function(){this.inputFocus||(this.overAllClear.style.display="none")},i.prototype.listOption=function(e,t){var n=!(0,s.hX)(t.iconCss),r=(0,s.hX)(t.properties)?t:t.properties;return this.listCurrentOptions=null!==t.text||null!==t.value?{fields:r,showIcon:n,ariaAttributes:{groupItemRole:"presentation"}}:{fields:{value:"text"}},(0,s.X$)(this.listCurrentOptions,this.listCurrentOptions,t,!0),"CheckBox"===this.mode&&this.notify("listoption",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,dataSource:e,fieldProperty:r}),this.listCurrentOptions},i.prototype.renderPopup=function(){var e=this;if(this.list||a.prototype.render.call(this),this.popupObj&&document.body.contains(this.popupObj.element)&&this.allowFiltering)this.refreshPopup();else if(!this.popupObj&&!(0,s.hX)(this.popupWrapper)){document.body.appendChild(this.popupWrapper);var t=this.popupWrapper.querySelector(".e-filter-parent");"CheckBox"===this.mode&&!this.allowFiltering&&t&&this.filterParent&&(t.remove(),this.filterParent=null);var n=parseInt(this.popupHeight,10);if(this.popupWrapper.style.visibility="hidden",this.headerTemplate&&(this.setHeaderTemplate(),n-=this.header.offsetHeight,this.isUpdateHeaderHeight=0!==this.header.offsetHeight),(0,s.BC)([this.list],this.popupWrapper),!this.list.classList.contains(P_noData)&&this.getItems()[1]&&(this.listItemHeight=this.getItems()[1].offsetHeight+parseInt(window.getComputedStyle(this.getItems()[1]).marginBottom,10)),this.enableVirtualization&&!this.list.classList.contains(P_noData)){if
1(!this.list.querySelector(".e-virtual-ddl-content")&&this.list.querySelector(".e-list-parent")){var r=this.createElement("div",{className:"e-virtual-ddl-content"});r.style.cssText=this.getTransformValues(),this.list.appendChild(r).appendChild(this.list.querySelector(".e-list-parent"))}else this.list.querySelector(".e-virtual-ddl-content")&&(this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues());if(this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll("."+P_li),this.virtualItemCount=this.itemCount,"CheckBox"!==this.mode&&this.totalItemsCount(),this.list.querySelector(".e-virtual-ddl"))this.list.getElementsByClassName("e-virtual-ddl")[0].style=this.GetVirtualTrackHeight();else{var o=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl"});o.style.cssText=this.GetVirtualTrackHeight(),this.popupWrapper.querySelector(".e-dropdownbase").appendChild(o)}}this.footerTemplate&&(this.setFooterTemplate(),n-=this.footer.offsetHeight,this.isUpdateFooterHeight=0!==this.footer.offsetHeight),"CheckBox"===this.mode&&this.showSelectAll?(this.notify("selectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),n-=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}),n=parseInt(this.popupHeight,10),this.headerTemplate&&this.header&&(n-=this.header.offsetHeight),this.footerTemplate&&this.footer&&(n-=this.footer.offsetHeight)):(this.notify("selectAll",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),n=parseInt(this.popupHeight,10)),"CheckBox"===this.mode&&(this.allowFiltering&&(this.notify("searchBox",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode,popupElement:this.popupWrapper}),n-=this.searchBoxHeight),(0,s.iQ)([this.popupWrapper],"e-checkbox")),"auto"!==this.popupHeight?(this.list.style.maxHeight=(0,s.IV)(n),this.popupWrapper.style.maxHeight=(0,s.IV)(this.popupHeight)):this.list.style.maxHeight=(0,s.IV)(this.popupHeight),this.popupObj=new ae.zD(this.popupWrapper,{width:this.calcPopupWidth(),targetType:"relative",position:this.enableRtl?{X:"right",Y:"bottom"}:{X:"left",Y:"bottom"},relateTo:this.overAllWrapper,collision:this.enableRtl?{X:"fit",Y:"flip"}:{X:"flip",Y:"flip"},offsetY:1,enableRtl:this.enableRtl,zIndex:this.zIndex,close:function(){if(e.popupObj.element.parentElement){e.popupObj.unwireScrollEvents();var h=e.popupWrapper.querySelector("."+Uu);"CheckBox"===e.mode&&h&&document.activeElement===h&&h.blur(),(0,s.Yo)(e.popupObj.element)}},open:function(){if(e.popupObj.resolveCollision(),!e.isFirstClick){var h=e.list.querySelector("ul");h&&("CheckBox"!==e.mode&&(e.allowFiltering||e.allowCustomValue)&&""!==e.targetElement().trim()||(e.mainList=h.cloneNode?h.cloneNode(!0):h)),e.isFirstClick=!0}e.popupObj.wireScrollEvents(),!("CheckBox"!==e.mode&&(e.allowFiltering||e.allowCustomValue)&&""!==e.targetElement().trim())&&!e.enableVirtualization&&(e.loadTemplate(),e.enableVirtualization&&"CheckBox"===e.mode&&e.UpdateSkeleton()),e.isPreventScrollAction=!0,e.setScrollPosition(),!e.list.classList.contains(P_noData)&&e.getItems()[1]&&0!==e.getItems()[1].offsetHeight&&(e.listItemHeight=e.getItems()[1].offsetHeight+parseInt(window.getComputedStyle(e.getItems()[1]).marginBottom,10),e.list.getElementsByClassName("e-virtual-ddl-content")[0]&&(e.list.getElementsByClassName("e-virtual-ddl-content")[0].style=e.getTransformValues())),e.allowFiltering&&e.notify("inputFocus",{module:"CheckBoxSelection",enable:"CheckBox"===e.mode,value:"focus"}),e.enableVirtualization&&(e.notify("bindScrollEvent",{module:"VirtualScroll",component:e.getModuleName(),enable:e.enableVirtualization}),setTimeout(function(){e.value?e.updateSelectionList():e.viewPortInfo&&e.viewPortInfo.offsets.top&&(e.list.scrollTop=e.viewPortInfo.offsets.top)},5))},targetExitViewport:function(){s.Pw.isDevice||e.hidePopup()}}),this.checkCollision(this.popupWrapper),this.popupContentElement=this.popupObj.element.querySelector(".e-content"),"CheckBox"===this.mode&&s.Pw.isDevice&&this.allowFiltering&&this.isDeviceFullScreen&&this.notify("deviceSearchBox",{module:"CheckBoxSelection",enable:"CheckBox"===this.mode}),this.allowResize&&this.setResize(),this.popupObj.close(),this.popupWrapper.style.visibility=""}},i.prototype.checkCollision=function(e){"CheckBox"===this.mode&&s.Pw.isDevice&&this.allowFiltering&&this.isDeviceFullScreen||((0,ae.D$)(e).length>0&&(e.style.marginTop=-parseInt(getComputedStyle(e).marginTop,10)+"px"),this.popupObj.resolveCollision())},i.prototype.setHeaderTemplate=function(){this.header&&this.header.remove(),this.header=this.createElement("div"),(0,s.iQ)([this.header],"e-ddl-header");var t=this.multiCompiler(this.headerTemplate),n=(0,s.wE)("function"!=typeof this.headerTemplate&&t?(0,s.Lt)(this.headerTemplate,document).innerHTML.trim():this.headerTemplate)({},this,"headerTemplate",this.headerTemplateId,this.isStringTemplate,null,this.header);n&&n.length>0&&(0,s.BC)(n,this.header),"CheckBox"===this.mode&&this.showSelectAll?(0,s.Hs)([this.header],this.popupWrapper):(0,s.BC)([this.header],this.popupWrapper),s.Jm.add(this.header,"mousedown",this.onListMouseDown,this)},i.prototype.setFooterTemplate=function(){this.footer&&this.footer.remove(),this.footer=this.createElement("div"),(0,s.iQ)([this.footer],"e-ddl-footer");var t=this.multiCompiler(this.footerTemplate),n=(0,s.wE)("function"!=typeof this.footerTemplate&&t?(0,s.Lt)(this.footerTemplate,document).innerHTML.trim():this.footerTemplate)({},this,"footerTemplate",this.footerTemplateId,this.isStringTemplate,null,this.footer);n&&n.length>0&&(0,s.BC)(n,this.footer),(0,s.BC)([this.footer],this.popupWrapper),s.Jm.add(this.footer,"mousedown",this.onListMouseDown,this)},i.prototype.updateInitialData=function(){var e=this.selectData;if(this.renderItems(e,this.fields,!1,this.isClearAllAction),this.list.scrollTop=0,this.virtualListInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:this.itemCount},this.previousStartIndex=0,this.previousEndIndex=this.itemCount,this.dataSource instanceof x.M1?this.remoteDataCount>=0?this.totalItemCount=this.dataCount=this.remoteDataCount:this.resetList(this.dataSource):this.totalItemCount=this.dataCount=this.dataSource&&this.dataSource.length?this.dataSource.length:0,"CheckBox"!==this.mode&&(this.totalItemCount=this.value&&this.value.length?this.totalItemCount-this.value.length:this.totalItemCount),this.get
1SkeletonCount(),this.skeletonCount=0!==this.totalItemCount&&this.totalItemCount<2*this.itemCount&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&this.totalItemCount<=this.itemCount)?0:this.skeletonCount,this.UpdateSkeleton(),this.list.getElementsByClassName("e-virtual-ddl")[0])this.list.getElementsByClassName("e-virtual-ddl")[0].style=this.GetVirtualTrackHeight();else if(!this.list.querySelector(".e-virtual-ddl")&&this.skeletonCount>0){var n=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl"});n.style.cssText=this.GetVirtualTrackHeight(),this.popupWrapper.querySelector(".e-dropdownbase").appendChild(n)}this.listData=e,this.liCollections=this.list.querySelectorAll(".e-list-item"),this.list.getElementsByClassName("e-virtual-ddl-content")[0]&&(this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues()),this.enableVirtualization&&this.notify("setGeneratedData",{module:"VirtualScroll"})},i.prototype.clearAll=function(e){if(this.enabled&&!this.readonly){var t=void 0;if(this.setDynValue=!1,this.isClearAllAction=!0,this.value&&this.value.length>0){this.allowFiltering&&(this.refreshListItems(null),"CheckBox"===this.mode&&this.targetInputElement&&(this.targetInputElement.value=""));var n=this.list&&this.list.querySelectorAll("li.e-list-item");if(n&&n.length>0)this.selectAllItems(!1,e);else for(this.removeIndex=0,t=this.value[this.removeIndex];this.removeIndex<this.value.length;t=this.value[this.removeIndex])this.removeValue(t,e,null,!0);this.selectedElementID=null,this.inputElement.removeAttribute("aria-activedescendant")}else this.clearAllCallback(e);this.checkAndResetCache(),J.pd.createSpanElement(this.overAllWrapper,this.createElement),this.calculateWidth(),!(0,s.hX)(this.overAllWrapper)&&!(0,s.hX)(this.overAllWrapper.getElementsByClassName("e-ddl-icon")[0]&&this.overAllWrapper.getElementsByClassName("e-float-text-content")[0]&&"Never"!==this.floatLabelType)&&this.overAllWrapper.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon"),this.enableVirtualization&&(this.updateInitialData(),this.chipCollectionWrapper&&(this.chipCollectionWrapper.innerHTML=""),this.isCustomDataUpdated||this.notify("setGeneratedData",{module:"VirtualScroll"})),this.enableVirtualization&&(this.list.scrollTop=0,this.virtualListInfo=null,this.previousStartIndex=0,this.previousEndIndex=this.itemCount),this.isClearAllAction=!1}this.isClearAllItem=!0,s.Jm.add(document,"mouseup",this.preventSelection,this)},i.prototype.preventSelection=function(e){this.isClearAllItem&&e.stopPropagation(),this.isClearAllItem=!1,s.Jm.remove(document,"mouseup",this.preventSelection)},i.prototype.clearAllCallback=function(e,t){var n=this.value?this.value.slice():[];if(this.mainList&&this.listData&&(this.allowFiltering&&"CheckBox"!==this.mode||this.allowCustomValue)){var r=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;this.onActionComplete(r,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.allowResize&&this.setResize(),this.inputFocus||(this.changeOnBlur&&this.updateValueState(e,this.value,n),"CheckBox"!==this.mode&&this.inputElement.focus()),"CheckBox"===this.mode&&(this.refreshPlaceHolder(),this.refreshInputHight(),this.changeOnBlur&&t&&((0,s.hX)(this.value)||0===this.value.length)&&this.updateValueState(e,this.value,this.tempValues)),!this.changeOnBlur&&t&&((0,s.hX)(this.value)||0===this.value.length)&&this.updateValueState(e,this.value,this.tempValues),"CheckBox"===this.mode&&this.enableGroupCheckBox&&!(0,s.hX)(this.fields.groupBy)&&this.updateListItems(this.list.querySelectorAll("li.e-list-item"),this.mainList.querySelectorAll("li.e-list-item")),e.preventDefault()},i.prototype.windowResize=function(){this.refreshPopup(),(!this.inputFocus||"CheckBox"===this.mode)&&this.viewWrapper&&this.viewWrapper.parentElement&&this.updateDelimView()},i.prototype.resetValueHandler=function(e){if(!(0,s.hX)(this.inputElement)){var t=(0,s.kp)(this.inputElement,"form");if(t&&e.target===t){var n=this.element.tagName===this.getNgDirective()?null:this.element.getAttribute("data-initial-value");this.text=n}}},i.prototype.wireEvent=function(){s.Jm.add(this.componentWrapper,"mousedown",this.wrapperClick,this),s.Jm.add(window,"resize",this.windowResize,this),s.Jm.add(this.inputElement,"focus",this.focusInHandler,this),s.Jm.add(this.inputElement,"keydown",this.onKeyDown,this),s.Jm.add(this.inputElement,"keyup",this.keyUp,this),"CheckBox"!==this.mode&&s.Jm.add(this.inputElement,"input",this.onInput,this),s.Jm.add(this.inputElement,"blur",this.onBlurHandler,this),s.Jm.add(this.componentWrapper,"mouseover",this.mouseIn,this);var e=(0,s.kp)(this.inputElement,"form");e&&s.Jm.add(e,"reset",this.resetValueHandler,this),s.Jm.add(this.componentWrapper,"mouseout",this.mouseOut,this),s.Jm.add(this.overAllClear,"mousedown",this.clearAll,this),s.Jm.add(this.inputElement,"paste",this.pasteHandler,this)},i.prototype.onInput=function(e){this.isValidKey=!!this.keyDownStatus,this.keyDownStatus=!1,s.Pw.isDevice&&"mozilla"===s.Pw.info.name&&this.search(e)},i.prototype.pasteHandler=function(e){var t=this;setTimeout(function(){t.expandTextbox(),t.search(e)})},i.prototype.performFiltering=function(e){var t=this,n={preventDefaultAction:!1,text:this.targetElement(),updateData:function(r,o,l){n.cancel||(t.isFiltered=!0,t.customFilterQuery=o,t.remoteFilterAction=!0,t.isCustomFiltering=!0,t.dataUpdater(r,o,l))},event:e,cancel:!1};this.trigger("filtering",n,function(r){t.isFilterPrevented=r.cancel,r.cancel||!t.isFiltered&&!r.preventDefaultAction&&(t.filterAction=!0,t.isFilteringAction=!0,t.dataSource instanceof x.M1&&t.allowCustomValue&&(t.isCustomRendered=!1),t.dataUpdater(t.dataSource,null,t.fields),t.isFilteringAction=!1)})},i.prototype.search=function(e){if(this.preventSetCurrentData=!1,this.firstItem=this.dataSource&&this.dataSource.length>0?this.dataSource[0]:null,(0,s.hX)(e)||(this.keyCode=e.keyCode),!this.isPopupOpen()&&this.openOnClick&&this.showPopup(e),this.openClick(e),!this.checkTextLength()||this.allowFiltering||(0,s.hX)(e)||8===e.keyCode){var t=this.targetElement();if(this.allowFiltering)this.allowCustomValue&&(this.isRemoteSelection=!0),this.checkAndResetCache(),this.isRequesting=!1,""!==this.targetElement()&&this.debounceDelay>0?this.debouncedFiltering(e,this.debounceDelay):this.performFiltering(e);else if(this.allowCustomValue){var n=new x.XK;n=this.allowFiltering&&""!==t?n.where(this.fields.text,"startswith",t,this.ignoreCase,this.ignoreAccent):n,this.dataUpdater(this.enableVirtualization?this.dataSource:this.mainData,n,this.fields),this.UpdateSkeleton()}else{var r=this.list.querySelectorAll("li."+P_li+":not(.e-hide-listitem)"),o=this.typeOfData(this.listData).typeof,l=Pn(this.targetElement(),r,"StartsWith",this.ignoreCase);if(this.enableVirtualization&&""!==this.targetElement().trim()&&!this.allowFiltering){var d,h=!1;for((this.viewPortInfo.endIndex>=this.incrementalEndIndex&&this.incrementalEndIndex<=this.totalItemCount||0===this.incrementalEndIndex)&&(h=!0,this.incrementalStartIndex=0,this.incrementalEndIndex=100>this.totalItemCount?this.totalItemCount:100,this.updateIncrementalInfo(this.incrementalStartIndex,this.incrementalEndIndex),h=!1),(0!==this.viewPortInfo.startIndex||h)&&this.updateIncrementalView(0,this.itemCount),l=Pn(this.targetElement(),this.incrementalLiCollections,this.filterType,!0,this.listData,this.fields,o);(0,s.hX)(l)&&this.incrementalEndIndex<this.totalItemCount&&(this.incrementalStartIndex=this.incrementalEndIndex,this.incrementalEndIndex=this.incrementalEndIndex+100>this.totalItemCount?this.totalItemCount:this.incrementalEndIndex+100,this.updateIncrementalInfo(this.incrementalStartIndex,this.incrementalEndIndex),h=!0,(0!==this.viewPortInfo.startIndex||h)&&this.updateIncrementalView(0,this.itemCount),l=Pn(this.targetElement(),this.incrementalLiCollections,this.filterType,!0,this.listData,this.fields,o),(0,s.hX)(l));)if((0,s.hX)(l)&&this.incrementalEndIndex>=this.totalItemCount){this.incrementalStartIndex=0,this.incrementalEndIndex=100>this.totalItemCount?this.totalItemCount:100;break}if(l.index&&(!(this.viewPortInfo.startIndex>=l.index)||!(l.index>
1=this.viewPortInfo.endIndex))){var p=(d=l.index-(this.itemCount/2-2)>0?l.index-(this.itemCount/2-2):0)+this.itemCount>this.totalItemCount?this.totalItemCount:d+this.itemCount;d!==this.viewPortInfo.startIndex&&this.updateIncrementalView(d,p)}if((0,s.hX)(l.item))this.updateIncrementalView(0,this.itemCount),this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues(),this.list.scrollTop=0;else this.getIndexByValue(l.item.getAttribute("data-value"))-this.skeletonCount>this.itemCount/2&&this.updateIncrementalView(d=this.viewPortInfo.startIndex+(this.itemCount/2-2)<this.totalItemCount?this.viewPortInfo.startIndex+(this.itemCount/2-2):this.totalItemCount,p=this.viewPortInfo.startIndex+this.itemCount>this.totalItemCount?this.totalItemCount:this.viewPortInfo.startIndex+this.itemCount),l.item=this.getElementByValue(l.item.getAttribute("data-value"));l&&l.item&&(l.item=this.getElementByValue(l.item.getAttribute("data-value")))}l&&l.item?(this.addListFocus(l.item),this.list.scrollTop=l.item.offsetHeight*l.index):""!==this.targetElement()?this.removeFocus():this.focusAtFirstListItem()}}else this.focusAtFirstListItem();this.enableVirtualization&&this.allowFiltering&&this.getFilteringSkeletonCount()},i.prototype.preRender=function(){null===this.allowFiltering&&(this.allowFiltering="CheckBox"===this.mode),this.preventSetCurrentData=!1,this.initializeData(),this.updateDataAttribute(this.htmlAttributes),a.prototype.preRender.call(this)},i.prototype.getLocaleName=function(){return"multi-select"},i.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,this.isCustomRendered=!1,this.isRemoteSelection=!1,this.isSelectAllTarget=!0,this.isaddNonPresentItems=!1,this.viewPortInfo={currentPageNumber:null,direction:null,sentinelInfo:{},offsets:{},startIndex:0,endIndex:this.itemCount}},i.prototype.updateData=function(e,t,n){var h,r="",o="Delimiter"===this.mode||"CheckBox"===this.mode,l=[],d=this.listData;if(this.enableVirtualization||(this.listData=this.mainData),!(0,s.hX)(this.hiddenElement)&&!this.enableVirtualization&&(this.hiddenElement.innerHTML=""),!(0,s.hX)(this.value)){for(var g,p=this.value.length,u="",f=function(_){var T=m.allowObjectBinding?(0,s._W)(m.fields.value?m.fields.value:"",m.value[_]):m.value[_],I=m.findListElement((0,s.hX)(m.mainList)?m.ulElement:m.mainList,"li","data-value",T);if(m.enableVirtualization&&(I=m.findListElement((0,s.hX)(m.list)?m.ulElement:m.list,"li","data-value",T)),(0,s.hX)(I)&&!m.allowCustomValue&&!m.enableVirtualization&&m.listData&&m.listData.length>0)m.value.splice(_,1),_-=1,p-=1;else{if(m.listData){if(m.enableVirtualization){o&&!m.isDynamicRemoteVirtualData&&!n&&(r=m.delimiterWrapper&&""===m.delimiterWrapper.innerHTML?r:m.delimiterWrapper.innerHTML);var w=m.allowObjectBinding?(0,s._W)(m.fields.value?m.fields.value:"",m.value[m.value.length-1]):m.value[m.value.length-1];if(m.isRemoveSelection)r=m.text.replace(/,/g,e+" ")+e+" ",l=m.text.split(e);else{h=n&&o?m.text.replace(/,/g,e+" "):m.getTextByValue(w);var A=m.isDynamicRemoteVirtualData&&null!=w&&""!==w&&!n?m.getTextByValue(w):n?m.text:m.text&&""!==m.text?m.text+m.delimiterChar+h:h;r+=h+e+" ",l.push(A),u=m.hiddenElement.innerHTML}if(t&&t.currentTarget&&t.currentTarget.classList.contains("e-chips-close")||t&&"Backspace"===t.key){var M=t.target.parentElement.getAttribute("data-value");if("Backspace"===t.key){var D=m.hiddenElement.lastChild;D&&m.hiddenElement.removeChild(D)}else m.hiddenElement.childNodes.forEach(function(L){L.value===M&&L.parentNode.removeChild(L)});u=m.hiddenElement.innerHTML}else u+="<option selected value='"+w+"'>"+_+"</option>";return g=_,"break"}h=m.getTextByValue(T)}else h=T;r+=h+e+" ",l.push(h)}u+='<option selected value="'+T+'">'+_+"</option>",g=_},m=this,v=0;v<p;v++){var b=f(v);if(v=g,"break"===b)break}(0,s.hX)(this.hiddenElement)||(this.isRemoveSelection?(this.findListElement(this.hiddenElement,"option","value",this.currentRemoveValue)&&this.hiddenElement.removeChild(this.findListElement(this.hiddenElement,"option","value",this.currentRemoveValue)),this.isRemoveSelection=!1):this.hiddenElement.innerHTML=u)}var y=t&&t.target&&t.target.classList.contains("e-chips-close");(!this.enableVirtualization||this.enableVirtualization&&"CheckBox"!==this.mode&&!y)&&this.setProperties({text:l.toString()},!0),o&&(this.updateWrapperText(this.delimiterWrapper,r),this.delimiterWrapper.setAttribute("id",(0,s.Lz)("delim_val")),this.inputElement.setAttribute("aria-describedby",this.delimiterWrapper.id));var S=t&&t.target,E=!(!S||!S.classList.contains("e-close-hooker"))||null;(!this.changeOnBlur&&t&&!E||this.isSelectAll)&&(this.isSelectAll=!1,this.updateV
1alueState(t,this.value,this.tempValues)),this.listData=d,this.addValidInputClass()},i.prototype.initialTextUpdate=function(){if((0,s.hX)(this.text))this.setProperties({value:null},!0);else{for(var e=this.text.split(this.delimiterChar),t=[],n=0;e.length>n;n++){var r=this.getValueByText(e[n]);(0,s.hX)(r)?this.allowCustomValue&&t.push(e[n]):t.push(r)}if(t&&t.length){var o=this.allowObjectBinding?this.getDataByValue(t):t;this.setProperties({value:o},!0)}}},i.prototype.renderList=function(e){!e&&this.allowCustomValue&&this.list&&(this.list.textContent===this.noRecordsTemplate||this.list.querySelector(".e-ul")&&0===this.list.querySelector(".e-ul").childElementCount)&&(e=!0),a.prototype.render.call(this,null,e),this.totalItemCount=this.dataSource&&this.dataSource.length?this.dataSource.length:0,this.unwireListEvents(),this.wireListEvents()},i.prototype.initialValueUpdate=function(e,t){if(this.list){var n=void 0,r=void 0,o=void 0;if(this.chipCollectionWrapper&&(this.chipCollectionWrapper.innerHTML=""),this.removeListSelection(),!(0,s.hX)(this.value))for(var l=0;!(0,s.hX)(this.value[l]);l++){o=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[l]):this.value[l],r=this.findListElement(this.hideSelectedItem?this.ulElement:this.list,"li","data-value",o);var h=!1;if(this.enableVirtualization){if(n=null,null!=e&&e.length>0)for(var d=0;d<e.length;d++)if(this.isPrimitiveData&&e[d]===o||!this.isPrimitiveData&&(0,s._W)(this.fields.value?this.fields.value:"value",e[d])===o){n=this.isPrimitiveData?e[d]:(0,s._W)(this.fields.text,e[d]),this.enableVirtualization&&((0,s.hX)(this.selectedListData)?this.selectedListData=[e[d]]:(this.allowObjectBinding&&!this.isObjectInArray(e[d],this.selectedListData)||!this.allowObjectBinding)&&(Array.isArray(this.selectedListData)?this.selectedListData.push(e[d]):this.selectedListData=[this.selectedListData,e[d]]));break}(0,s.hX)(n)&&this.allowCustomValue&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&t)?(n=this.getTextByValue(o),h=!0):(0,s.hX)(n)&&!this.allowCustomValue&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&t)&&(this.value.splice(l,1),l-=1)}else n=this.getTextByValue(o);if(r&&"true"!==r.getAttribute("aria-selected")||r&&"true"===r.getAttribute("aria-selected")&&this.hideSelectedItem&&("Box"===this.mode||"Default"===this.mode)||this.enableVirtualization&&null!=o&&null!=n&&!h){var p=[],u=this.isDynamicRemoteVirtualData&&null!=n&&""!==n&&0===l||null==this.text||""===this.text||this.text.includes(n)?n:this.text+this.delimiterChar+n;p.push(u),this.setProperties({text:p.toString()},!0),this.addChip(n,o),this.addListSelection(r)}else if(!this.enableVirtualization&&o&&this.allowCustomValue||this.enableVirtualization&&o&&this.allowCustomValue&&(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&t)){var f=this.listData.length,m={};(0,s.KY)(this.fields.text,o,m),(0,s.KY)(this.fields.value,o,m);var g=this.popupWrapper.querySelector(".e-nodata");this.enableVirtualization||this.addItem(m,f),this.enableVirtualization&&(this.virtualCustomSelectData&&this.virtualCustomSelectData.length>=0?this.virtualCustomSelectData.push(m):this.virtualCustomSelectData=[m]),r=r||this.findListElement(this.hideSelectedItem?this.ulElement:this.list,"li","data-value",o),this.popupWrapper.contains(g)&&(this.list.setAttribute("style",g.getAttribute("style")),this.popupWrapper.replaceChild(this.list,g),this.wireListEvents()),(p=[]).push(u=null!=this.text&&""!==this.text?this.text+this.delimiterChar+n:n),this.setProperties({text:p.toString()},!0),this.addChip(n,o),this.addListSelection(r)}}"CheckBox"===this.mode?(this.updateDelimView(),this.changeOnBlur&&this.updateValueState(null,this.value,this.tempValues),this.updateDelimeter(this.delimiterChar),this.refreshInputHight()):this.updateDelimeter(this.delimiterChar,null,t),"CheckBox"===this.mode&&this.showSelectAll&&((0,s.hX)(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()}},i.prototype.updateActionCompleteData=function(e,t){this.value&&(!this.allowObjectBinding&&this.value.indexOf(e.getAttribute("data-value"))>-1||this.allowObjectBinding&&this.isObjectInArray(this.getDataByValue(e.getAttribute("data-value")),this.value))&&(this.mainList=this.ulElement,this.hideSelectedItem&&(0,s.iQ)([e],rt))},i.prototype.updateAddItemList=function(e,t){this.popupObj&&this.popupObj.element&&this.popupObj.element.querySelector(".e-nodata")&&e?(this.list=e,this.mainList=this.ulElement=e.querySelector("ul"),(0,s.TF)(this.popupWrapper.querySelector(".e-content")),this.popupObj=null,this.renderPopup()):this.allowCustomValue&&(this.list=e,this.mainList=this.ulElement=e.querySelector("ul"))},i.prototype.updateDataList=function(){this.mainList&&this.ulElement&&!(this.isFiltered||this.filterAction||this.targetElement().trim())&&(this.mainList.childElementCount<this.ulElement.childElementCount||this.ulElement.childElementCount>0&&this.ulElement.children[0].childElementCount>0&&this.mainList.children[0]&&this.mainList.children[0].childElementCount<this.ulElement.children[0].childElementCount||this.itemTemplate&&this.ulElement.childElementCount>0&&!(this.ulElement.childElementCount<this.mainList.childElementCount)&&(this.ulElement.children[0].childElementCount>0||this.fields.groupBy&&this.ulElement.children[1]&&this.ulElement.children[1].childElementCount>0))&&(this.mainList=this.ulElement)},i.prototype.isValidLI=function(e){return e&&!e.classList.contains("e-disabled")&&!e.classList.contains(P_group)&&e.classList.contains(P_li)},i.prototype.updateListSelection=function(e,t,n){var r=e.getAttribute("data-value"),o=this.allowObjectBinding?this.getDataByValue(this.getFormattedValue(r)):this.getFormattedValue(r);this.allowCustomValue&&("false"!==r&&!1===o||!(0,s.hX)(o)&&"NaN"===o.toString())&&
1(o=r),this.removeHover(),!this.value||!this.allowObjectBinding&&-1===this.value.indexOf(o)||this.allowObjectBinding&&-1===this.indexOfObjectInArray(o,this.value)?this.dispatchSelect(o,t,e,"true"===e.getAttribute("aria-selected"),n):this.removeValue(o,t,n),this.checkAndScrollParent()},i.prototype.updateListSelectEventCallback=function(e,t,n,r){var o=this;e=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",e):e;var l=r||this.getTextByValue(e);if((this.allowCustomValue||this.allowFiltering)&&!this.findListElement(this.mainList,"li","data-value",e)&&(!this.enableVirtualization||this.enableVirtualization&&this.virtualCustomData)){var h=t&&t.cloneNode(!0);this.allowCustomValue&&this.mainData.length&&"number"==typeof(0,s._W)(this.fields.value?this.fields.value:"value",this.mainData[0])&&(e=isNaN(parseFloat(e.toString()))?e:parseFloat(e.toString()));var p=this.getDataByValue(e);this.trigger("customValueSelection",{newData:p,cancel:!1},function(f){f.cancel||(o.enableVirtualization&&o.virtualCustomData?(o.virtualCustomSelectData&&o.virtualCustomSelectData.length>=0?o.virtualCustomSelectData.push(p):o.virtualCustomSelectData=[p],o.remoteCustomValue=!1,o.addValue(e,l,n)):((0,s.BC)([h],o.mainList),o.mainData.push(p),o.remoteCustomValue=!1,o.addValue(e,l,n)))})}else this.remoteCustomValue=!1,this.addValue(e,l,n)},i.prototype.removeListSelection=function(){var e=this.hideSelectedItem?rt:"e-active",t=this.list.querySelectorAll("."+e),n=t.length;if(t&&t.length)for((0,s.vy)(t,e);n>0;)t[n-1].setAttribute("aria-selected","false"),n--;if(!(0,s.hX)(this.mainList)){var r=this.mainList.querySelectorAll("."+e),o=r.length;if(r&&r.length)for((0,s.vy)(r,e);o>0;)r[o-1].setAttribute("aria-selected","false"),"CheckBox"===this.mode&&(t&&t.length>o-1&&(0,s.vy)([t[o-1].firstElementChild.lastElementChild],"e-check"),(0,s.vy)([r[o-1].firstElementChild.lastElementChild],"e-check")),o--}},i.prototype.removeHover=function(){var e=this.list.querySelectorAll(".e-hover");e&&e.length&&(0,s.vy)(e,"e-hover")},i.prototype.removeFocus=function(){if(this.list&&this.mainList){var e=this.list.querySelectorAll("."+P_focus),t=this.mainList.querySelectorAll("."+P_focus);e&&e.length&&((0,s.vy)(e,P_focus),(0,s.vy)(t,P_focus))}},i.prototype.addListHover=function(e){(this.enabled&&this.isValidLI(e)||null!==e&&e.classList.contains("e-list-group-item")&&this.enableGroupCheckBox&&"CheckBox"===this.mode&&!(0,s.hX)(this.fields.groupBy))&&(this.removeHover(),(0,s.iQ)([e],"e-hover"))},i.prototype.addListFocus=function(e){this.enabled&&(this.isValidLI(e)||this.fields.disabled&&this.isDisabledElement(e))?(this.removeFocus(),(0,s.iQ)([e],P_focus),this.updateAriaActiveDescendant()):this.enableGroupCheckBox&&"CheckBox"===this.mode&&!(0,s.hX)(this.fields.groupBy)&&((0,s.iQ)([e],P_focus),this.updateAriaActiveDescendant())},i.prototype.addListSelection=function(e,t){var n=this.hideSelectedItem?rt:"e-active";this.isValidLI(e)&&!e.classList.contains("e-hover")&&((0,s.iQ)([e],n),this.updateMainList(!1,e.getAttribute("data-value"),t),e.setAttribute("aria-selected","true"),"CheckBox"===this.mode&&e.classList.contains("e-active")&&0===e.getElementsByClassName("e-check").length&&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(),this.selectedElementID=e.id)},i.prototype.updateDelimeter=function(e,t,n){this.updateData(e,t,n)},i.prototype.onMouseClick=function(e){var t=this;if(!this.isClearAllItem){this.keyCode=null,this.scrollFocusStatus=!1,this.keyboardEvent=null;var n=e.target,r=(0,s.kp)(n,"."+P_li);if(this.enableVirtualization&&r&&r.classList.contains("e-virtual-list"))return;if((0,s.kp)(n,"."+P_group)&&this.enableGroupCheckBox&&"CheckBox"===this.mode&&this.fields.groupBy)(n=n.classList.contains("e-list-group-item")?n.firstElementChild.lastElementChild:e.target).classList.contains("e-check")?(this.selectAllItem(!1,e),n.classList.remove("e-check"),n.classList.remove("e-stop"),(0,s.kp)(n,".e-list-group-item").
1classList.remove("e-active"),n.setAttribute("aria-selected","false")):(this.selectAllItem(!0,e),n.classList.remove("e-stop"),n.classList.add("e-check"),(0,s.kp)(n,".e-list-group-item").classList.add("e-active"),n.setAttribute("aria-selected","true")),this.refreshSelection(),this.checkSelectAll();else{if(this.isValidLI(r)){var l=this.value&&this.value.length?this.value.length:0;r.classList.contains("e-active")&&(l-=1),l<this.maximumSelectionLength&&(this.updateListSelection(r,e),this.checkPlaceholderSize(),this.addListFocus(r),(this.allowCustomValue||this.allowFiltering)&&this.mainList&&this.listData?"CheckBox"!==this.mode&&(this.focusAtLastListItem(r.getAttribute("data-value")),this.refreshSelection()):this.makeTextBoxEmpty()),"CheckBox"===this.mode?(this.updateDelimView(),this.value&&this.value.length>50?setTimeout(function(){t.updateDelimeter(t.delimiterChar,e)},0):this.updateDelimeter(this.delimiterChar,e),this.refreshInputHight()):this.updateDelimeter(this.delimiterChar,e),this.checkSelectAll(),this.refreshPopup(),this.allowResize&&this.setResize(),this.hideSelectedItem&&this.focusAtFirstListItem(),this.closePopupOnSelect?this.hidePopup(e):e.preventDefault();var h=""!==this.targetElement().trim();this.makeTextBoxEmpty(),this.findGroupStart(n),"CheckBox"!==this.mode&&this.refreshListItems((0,s.hX)(r)?null:r.textContent,h)}else e.preventDefault();if(this.enableVirtualization&&this.hideSelectedItem){var d=this.list.querySelectorAll("li."+P_li+":not(."+rt+"):not(.e-reorder-hide):not(.e-virtual-list)");if(d.length){var p=this.virtualListHeight>0?Math.floor(this.virtualListHeight/this.listItemHeight):0;if(d.length<p+2){var u=this.getForQuery(this.value).clone();if(u=u.skip(this.virtualItemStartIndex),this.resetList(this.dataSource,this.fields,u),this.UpdateSkeleton(),this.liCollections=this.list.querySelectorAll("."+P_li),this.virtualItemCount=this.itemCount,"CheckBox"!==this.mode&&(this.totalItemCount=this.value&&this.value.length?this.totalItemCount-this.value.length:this.totalItemCount),this.list.querySelector(".e-virtual-ddl"))this.list.getElementsByClassName("e-virtual-ddl")[0].style=this.GetVirtualTrackHeight();else{var f=this.createElement("div",{id:this.element.id+"_popup",className:"e-virtual-ddl"});f.style.cssText=this.GetVirtualTrackHeight(),this.popupWrapper.querySelector(".e-dropdownbase").appendChild(f)}this.list.querySelector(".e-virtual-ddl-content")&&(this.list.getElementsByClassName("e-virtual-ddl-content")[0].style=this.getTransformValues())}}}this.refreshPlaceHolder(),this.deselectHeader()}}},i.prototype.findGroupStart=function(e){if(this.enableGroupCheckBox&&"CheckBox"===this.mode&&!(0,s.hX)(this.fields.groupBy)){var o=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),o=this.findGroupAttrtibutes(e,0,0,0,0),o=this.findGroupAttrtibutes(e,o[0],o[1],o[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,o[0],o[1],o[2])}},i.prototype.findGroupAttrtibutes=function(e,t,n,r,o){for(;!e.classList.contains("e-list-group-item")&&(this.fields.disabled&&this.isDisabledElement(e)||(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")&&n++,r++),null!=(e=o?e.nextElementSibling:e.previousElementSibling)););return[t,n,r]},i.prototype.updateCheckBox=function(e,t,n,r){if(null!==e&&((0,s.hX)(this.fields.disabled)||0!==r)){var o=e.getElementsByClassName("e-frame")[0];r===t?(o.classList.remove("e-stop"),o.classList.add("e-check"),(0,s.kp)(o,".e-list-group-item").
1classList.add("e-active"),e.setAttribute("aria-selected","true")):r===n?(o.classList.remove("e-check"),o.classList.remove("e-stop"),(0,s.kp)(o,".e-list-group-item").classList.remove("e-active"),e.setAttribute("aria-selected","false")):this.maximumSelectionLength===t-1?(o.classList.remove("e-stop"),e.setAttribute("aria-selected","true"),(0,s.kp)(o,".e-list-group-item").classList.add("e-active"),o.classList.add("e-check")):(o.classList.remove("e-check"),o.classList.add("e-stop"),(0,s.kp)(o,".e-list-group-item").classList.add("e-active"),e.setAttribute("aria-selected","false"))}},i.prototype.disableGroupHeader=function(){var e=this.list.querySelectorAll("li.e-list-group-item");if(e)for(var t=0;t<e.length;t++){for(var n=!0,r=e[t].nextElementSibling;!r.classList.contains("e-list-group-item");){if(!this.isDisabledElement(r)){n=!1;break}if(null==(r=r.nextElementSibling))break}n&&this.disableListItem(e[t])}},i.prototype.deselectHeader=function(){var e=this.value&&this.value.length?this.value.length:0,t=this.list.querySelectorAll("li.e-list-group-item:not(.e-active)");e<this.maximumSelectionLength&&(0,s.vy)(t,"e-disable"),e===this.maximumSelectionLength&&(0,s.iQ)(t,"e-disable")},i.prototype.onMouseOver=function(e){var t=(0,s.kp)(e.target,"."+P_li);null===t&&"CheckBox"===this.mode&&!(0,s.hX)(this.fields.groupBy)&&this.enableGroupCheckBox&&(t=(0,s.kp)(e.target,"."+P_group)),this.addListHover(t)},i.prototype.onMouseLeave=function(){this.removeHover()},i.prototype.onListMouseDown=function(e){e.preventDefault(),this.scrollFocusStatus=!0},i.prototype.onDocumentClick=function(e){if("CheckBox"!==this.mode){var t=e.target;this.scrollFocusStatus=!!(!(0,s.hX)(this.popupObj)&&(0,s.kp)(t,'[id="'+this.popupObj.element.id+'"]')||this.overAllWrapper.contains(e.target))&&(s.Pw.isIE||"edge"===s.Pw.info.name)&&document.activeElement===this.inputElement}},i.prototype.wireListEvents=function(){(0,s.hX)(this.list)||(s.Jm.add(document,"mousedown",this.onDocumentClick,this),s.Jm.add(this.list,"mousedown",this.onListMouseDown,this),s.Jm.add(this.list,"mouseup",this.onMouseClick,this),s.Jm.add(this.list,"mouseover",this.onMouseOver,this),s.Jm.add(this.list,"mouseout",this.onMouseLeave,this))},i.prototype.unwireListEvents=function(){s.Jm.remove(document,"mousedown",this.onDocumentClick),this.list&&(s.Jm.remove(this.list,"mousedown",this.onListMouseDown),s.Jm.remove(this.list,"mouseup",this.onMouseClick),s.Jm.remove(this.list,"mouseover",this.onMouseOver),s.Jm.remove(this.list,"mouseout",this.onMouseLeave))},i.prototype.hideOverAllClear=function(){(!this.value||!this.value.length||""===this.inputElement.value)&&(this.overAllClear.style.display="none")},i.prototype.showOverAllClear=function(){this.overAllClear.style.display=(this.value&&this.value.length||""!==this.inputElement.value)&&this.showClearButton&&!0!==this.readonly?"":"none"},i.prototype.focusIn=function(){document.activeElement!==this.inputElement&&this.enabled&&this.inputElement.focus()},i.prototype.focusOut=function(){document.activeElement===this.inputElement&&this.enabled&&this.inputElement.blur()},i.prototype.showSpinner=function(){if((0,s.hX)(this.spinnerElement)){var e=this.filterParent&&this.filterParent.querySelector(".e-clear-icon.e-icons");"none"!==this.overAllClear.style.display||e?this.spinnerElement=e||this.overAllClear:(this.spinnerElement=this.createElement("span",{className:N0+" "+H0}),this.componentWrapper.appendChild(this.spinnerElement)),(0,ae.GF)({target:this.spinnerElement,width:s.Pw.isDevice?"16px":"14px"},this.createElement),(0,s.iQ)([this.spinnerElement],B0),(0,ae.xc)(this.spinnerElement)}},i.prototype.hideSpinner=function(){(0,s.hX)(this.spinnerElement)||((0,ae.W$)(this.spinnerElement),(0,s.vy)([this.spinnerElement],B0),this.spinnerElement.classList.contains(H0)?(0,s.Yo)(this.spinnerElement):this.spinnerElement.innerHTML="",this.spinnerElement=null)},i.prototype.updateWrapperText=function(e,t){this.valueTemplate||!this.enableHtmlSanitizer?e.innerHTML=this.encodeHtmlEntities(t):e.innerText=t},i.prototype.updateDelimView=function(){if(this.delimiterWrapper&&this.hideDelimWrapper(),this.chipCollectionWrapper&&(this.chipCollectionWrapper.style.display="none"),(0,s.hX)(this.viewWrapper)||(this.viewWrapper.style.display="",this.viewWrapper.style.width="",this.viewWrapper.classList.remove(kh)),this.value&&this.value.length){var e="",t=void 0,n=void 0,r=1,o=void 0,l=void 0,h=0,d=void 0;this.enableVirtualization||this.updateWrapperText(this.viewWrapper,e);
1var p={noRecordsTemplate:"No records found",actionFailureTemplate:"Request failed",overflowCountTemplate:"+${count} more..",totalCountTemplate:"${count} selected"},u=new s.Wo(this.getLocaleName(),p,this.locale);""===u.getConstant("actionFailureTemplate")&&(u=new s.Wo("dropdowns",p,this.locale)),""===u.getConstant("noRecordsTemplate")&&(u=new s.Wo("dropdowns",p,this.locale));var f=u.getConstant("overflowCountTemplate"),m=u.getConstant("totalCountTemplate"),g=this.createElement("span",{className:"e-remain"}),v=f.replace("${count}",this.value.length.toString());g.innerText=v,this.viewWrapper.appendChild(g),this.renderReactTemplates();var b=g.offsetWidth;if((0,s.TF)(g),this.showDropDownIcon&&(h=this.dropIcon.offsetWidth+parseInt(window.getComputedStyle(this.dropIcon).marginRight,10)),this.checkClearIconWidth(),!(0,s.hX)(this.value)&&(this.allowCustomValue||this.listData&&this.listData.length>0))for(var y=0;!(0,s.hX)(this.value[y]);y++){var S=this.text&&this.text.split(this.delimiterChar);if(this.enableVirtualization?S&&(e+=0===y?"":this.delimiterChar+" ",e+=t=S[y],t=this.viewWrapper.innerHTML,this.updateWrapperText(this.viewWrapper,e)):(e+=0===y?"":this.delimiterChar+" ",e+=t=this.getOverflowVal(y),t=this.viewWrapper.innerHTML,this.updateWrapperText(this.viewWrapper,e)),o=this.viewWrapper.offsetWidth+parseInt(window.getComputedStyle(this.viewWrapper).paddingRight,10)+parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft,10),d=this.componentWrapper.offsetWidth-parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft,10)-parseInt(window.getComputedStyle(this.componentWrapper).paddingRight,10),o+h+this.clearIconWidth>d){for(void 0!==n&&""!==n&&(t=n,y=r+1),this.updateWrapperText(this.viewWrapper,t),l=this.value.length-y,o=this.viewWrapper.offsetWidth+parseInt(window.getComputedStyle(this.viewWrapper).paddingRight,10)+parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft,10);o+b+h+this.clearIconWidth>d&&0!==o&&""!==this.viewWrapper.innerHTML;)this.viewWrapper.innerHTML=[].join(this.delimiterChar),l=this.value.length,o=this.viewWrapper.offsetWidth+parseInt(window.getComputedStyle(this.viewWrapper).paddingRight,10)+parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft,10);break}o+b+h+this.clearIconWidth<=d?(n=e,r=y):0===y&&(n="",r=-1)}if(l>0){var _=d-h-this.clearIconWidth;this.viewWrapper.appendChild(this.updateRemainTemplate(g,this.viewWrapper,l,f,m,_)),this.updateRemainWidth(this.viewWrapper,_),this.updateRemainingText(g,h,l,f,m)}}else(0,s.hX)(this.viewWrapper)||(this.viewWrapper.innerHTML="",this.viewWrapper.style.display="none")},i.prototype.checkClearIconWidth=function(){this.showClearButton&&(this.clearIconWidth=parseInt(window.getComputedStyle(this.overAllClear).width,10)||this.overAllClear.offsetWidth)},i.prototype.updateRemainWidth=function(e,t){e.classList.contains(kh)&&t<e.offsetWidth+parseInt(window.getComputedStyle(e).paddingLeft,10)+parseInt(window.getComputedStyle(e).paddingRight,10)&&(e.style.width=t+"px")},i.prototype.updateRemainTemplate=function(e,t,n,r,o,l){t.firstChild&&3===t.firstChild.nodeType&&""===t.firstChild.nodeValue&&t.removeChild(t.firstChild),e.innerHTML="";var h=r.replace("${count}",n.toString()),d=o.replace("${count}",n.toString());return e.innerText=t.firstChild&&3===t.firstChild.nodeType?h:d,t.firstChild&&3===t.firstChild.nodeType?t.classList.remove(kh):(t.classList.add(kh),this.updateRemainWidth(t,l)),e},i.prototype.updateRemainingText=function(e,t,n,r,o){var l=this.componentWrapper.offsetWidth-parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft,10)-parseInt(window.getComputedStyle(this.componentWrapper).paddingRight,10),h=this.viewWrapper.offsetWidth+parseInt(window.getComputedStyle(this.viewWrapper).paddingRight,10);if(h+t>=l&&0!==h&&this.viewWrapper.firstChild&&3===this.viewWrapper.firstChild.nodeType){for(;h+t>l&&0!==h&&this.viewWrapper.firstChild&&3===this.viewWrapper.firstChild.nodeType;){var d=this.viewWrapper.firstChild.nodeValue.split(this.delimiterChar);d.pop(),this.viewWrapper.firstChild.nodeValue=d.join(this.delimiterChar),""===this.viewWrapper.firstChild.nodeValue&&this.viewWrapper.removeChild(this.viewWrapper.firstChild),n++,h=this.viewWrapper.offsetWidth}this.updateRemainTemplate(e,this.viewWrapper,n,r,o,l-t)}},i.prototype.getOverflowVal=function(e){var t;if(this.mainData&&this.mainData.length){var n=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[e]):this.value[e];if("CheckBox"===this.mode){var r=this.listData;this.listData=this.mainData,t=this.getTextByValue(n),this.listData=r}else t=this.getTextByValue(n)}else t=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[e]):this.value[e];return t},i.prototype.unWireEvent=function(){if((0,s.hX)(this.componentWrapper)||s.Jm.remove(this.componentWrapper,"mousedown",this.wrapperClick),s.Jm.remove(window,"resize",this.windowResize),!(0,s.hX)(this.inputElement)){s.Jm.remove(this.inputElement,"focus",this.focusInHandler),s.Jm.remove(this.inputElement,"keydown",this.onKeyDown),"CheckBox"!==this.mode&&s.Jm.remove(this.inputElement,"input",this.onInput),s.Jm.remove(this.inputElement,"keyup",this.keyUp);var e=(0,s.kp)(this.inputElement,"form");e&&s.Jm.remove(e,"reset",this.resetValueHandler),s.Jm.remove(this.inputElement,"blur",this.onBlurHandler)}(0,s.hX)(this.componentWrapper)||(s.Jm.remove(this.componentWrapper,"mouseover",this.mouseIn),s.Jm.remove(this.componentWrapper,"mouseout",this.mouseOut)),(0,s.hX)(this.overAllClear)||s.Jm.remove(this.overAllClear,"mousedown",this.clearAll),(0,s.hX)(this.inputElement)||s.Jm.remove(this.inputElement,"paste",this.pasteHandler)},i.prototype.resizingWireEvent=function(){s.Jm.add(document,"mousemove",this.resizePopup,this),s.Jm.add(document,"mouseup",this.stopResizing,this),s.Jm.add(document,"touchmove",this.resizePopup,this),s.Jm.add(document,"touchend",this.stopResizing,this)},i.prototype.resizingUnWireEvent=function(){s.Jm.remove(document,"mousemove",this.resizePopup),s.Jm.remove(document,"mouseup",this.stopResizing),s.Jm.remove(document,"touchmove",this.resizePopup),s.Jm.remove(document,"touchend",this.stopResizing)},i.prototype.selectAllItem=function(e,t,n){var r;if((0,s.hX)(this.list)||(r=this.list.querySelectorAll(e?'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)':'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)')),this.value&&this.value.length&&t&&t.target&&(0,s.kp)(t.target,".e-close-hooker")&&this.allowFiltering&&(r=this.mainList.querySelectorAll(e?'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)':'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)')),this.enableGroupCheckBox&&"CheckBox"===this.mode&&!(0,s.hX)(this.fields.groupBy)){var o=t?this.groupTemplate?(0,s.kp)(t.target,".e-list-group-item"):t.target:null;if((o=(o=t&&32===t.keyCode?n:o)&&o.classList.contains("e-frame")?o.parentElement.parentElement:o)&&o.classList.contains("e-list-group-item")){var l=o.nextElementSibling;if((0,s.hX)(l))return;for(;l.classList.contains("e-list-item");){if(!this.fields.disabled||!this.isDisabledElement(l))if(e){if(!l.firstElementChild.lastElementChild.classList.contains("e-check")){var h=this.value&&this.value.length?this.value.length:0;l.classList.contains("e-active")&&(h-=1),h<this.maximumSelectionLength&&this.updateListSelection(l,t)}}else l.firstElementChild.lastElementChild.classList.contains("e-check")&&this.updateListSelection(l,t);if(null==(l=l.nextElementSibling))break}if(o.classList.contains("e-list-group-item")){var d=this.list.getElementsByClassName("e-item-focus")[0];d&&d.classList.remove("e-item-focus"),e?o.classList.add("e-active"):o.classList.remove("e-active"),o.classList.add("e-item-focus"),this.updateAriaActiveDescendant()}this.textboxValueUpdate(),this.checkPlaceholderSize(),!this.changeOnBlur&&t&&this.updateV
1alueState(t,this.value,this.tempValues)}else this.updateValue(t,r,e)}else this.updateValue(t,r,e);this.addValidInputClass()},i.prototype.virtualSelectionAll=function(e,t,n){var r=this,o=0,l=t.length,h=this.maximumSelectionLength;if(e){this.virtualSelectAll=!0,l=this.virtualSelectAllData&&0!==this.virtualSelectAllData.length?this.virtualSelectAllData.length:l,this.listData=this.virtualSelectAllData;var p=this.createListItems(this.virtualSelectAllData.slice(0,30),this.fields).querySelectorAll("li"),u=document.createDocumentFragment();p.forEach(function(b){u.appendChild(b.cloneNode(!0))}),t.forEach(function(b){u.appendChild(b.cloneNode(!0))});var f=u.childNodes;if(this.virtualSelectAllData instanceof Array){for(;o<l&&o<=50&&o<h;){if(this.isSelectAllTarget=l===o+1,f[o]){var m=this.allowObjectBinding?this.getDataByValue(f[o].getAttribute("data-value")):this.getFormattedValue(f[o].getAttribute("data-value"));if(!this.allowObjectBinding&&this.value&&this.value.indexOf(m)>=0||this.allowObjectBinding&&this.indexOfObjectInArray(m,this.value)>=0){o++;continue}this.updateListSelection(f[o],n,l-o)}else{if(m=(0,s._W)(this.fields.value?this.fields.value:"",this.virtualSelectAllData[o]),m=this.allowObjectBinding?this.getDataByValue(m):m,!this.allowObjectBinding&&this.value&&this.value.indexOf(m)>=0||this.allowObjectBinding&&this.indexOfObjectInArray(m,this.value)>=0){o++;continue}this.value&&null!=m&&Array.isArray(this.value)&&(!this.allowObjectBinding&&this.value.indexOf(m)<0||this.allowObjectBinding&&!this.isObjectInArray(m,this.value))&&this.dispatchSelect(m,n,null,!1,l)}o++}l>50&&setTimeout(function(){if(r.virtualSelectAllData&&r.virtualSelectAllData.length>0&&r.virtualSelectAllData.map(function(y){if(r.value&&null!=y[r.fields.value]&&Array.isArray(r.value)&&(!r.allowObjectBinding&&r.value.indexOf(y[r.fields.value])<0||r.allowObjectBinding&&!r.isObjectInArray(y[r.fields.value],r.value))){var S=y[r.fields.value],E=y[r.fields.text].toString();r.dispatchSelect(S,n,null,!1,l,y,E)}}),r.updatedataValueItems(n),r.isSelectAllLoop=!1,r.changeOnBlur||(r.updateValueState(n,r.value,r.tempValues),r.isSelectAll=r.isSelectAll?!r.isSelectAll:r.isSelectAll),r.updateHiddenElement(!0),r.popupWrapper&&t[o-1]&&t[o-1].classList.contains("e-item-focus")){var b=document.getElementsByClassName("e-selectall-parent")[0];b&&b.classList.contains("e-item-focus")&&t[o-1].classList.remove("e-item-focus")}r.checkSelectAll()},0)}}else this.virtualSelectAllData&&this.virtualSelectAllData.length>0&&this.virtualSelectAllData.map(function(b){r.virtualSelectAll=!0,r.removeValue(r.value[o],n,r.value.length-o)}),this.updatedataValueItems(n),this.changeOnBlur||(this.updateValueState(n,this.value,this.tempValues),this.isSelectAll=this.isSelectAll?!this.isSelectAll:this.isSelectAll),this.updateHiddenElement(),this.setProperties({value:[]},!0),this.selectedListData=[],this.virtualSelectAll=!1,!(0,s.hX)(this.viewPortInfo.startIndex)&&!(0,s.hX)(this.viewPortInfo.endIndex)&&this.notify("setCurrentViewDataAsync",{component:this.getModuleName(),module:"VirtualScroll"});this.checkSelectAll();var g=this.list.getElementsByClassName("e-virtual-ddl")[0];g&&(g.style=this.GetVirtualTrackHeight()),this.UpdateSkeleton();var v=this.list.getElementsByClassName("e-virtual-ddl-content")[0];v&&(v.style=this.getTransformValues())},i.prototype.updateValue=function(e,t,n){var r=this,o=t.length,l={event:e,items:n?t:[],itemData:n?this.listData:[],isInteracted:!!e,isChecked:n,preventSelectEvent:!1};if(this.trigger("beforeSelectAll",l),t&&t.length||this.enableVirtualization&&!n){var d,h=0;if(d=this.enableGroupCheckBox?n?this.maximumSelectionLength-(this.value?this.value.length:0):t.length:n?this.maximumSelectionLength-(this.value?this.value.length:0):this.maximumSelectionLength,l.preventSelectEvent){for(var p=0;p<t.length&&p<d;p++){this.removeHover();var u=t[p].getAttribute("data-value"),f=this.getFormattedValue(u);f=this.allowObjectBinding?this.getDataByValue(f):f;var m=this.mainList?this.mainList.querySelectorAll(n?'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)':'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)')[p]:null;n?(this.value=this.value?this.value:[],(!this.allowObjectBinding&&this.value.indexOf(f)<0||this.allowObjectBinding&&!this.isObjectInArray(f,this.value))&&this.setProperties({value:[].concat([],this.value,[f])},!0),this.removeFocus(),this.addListSelection(t[p],m),this.updateChipStatus(),this.checkMaxSelection()):this.removeAllItems(f,e,!1,t[p],m),this.enableGroupCheckBox&&this.findGroupStart(t[p])}if(!n&&(this.value&&this.value.length?this.value.length:0)<this.maximumSelectionLength){var v=this.list.querySelectorAll("li."+P_li+":not(.e-active)");(0,s.vy)(v,"e-disable")}this.trigger("selectedAll",{event:e,items:n?t:[],itemData:n?this.listData:[],isInteracted:!!e,isChecked:n})}else if(this.enableVirtualization)this.virtualSelectAllState=n,this.virtualSelectAll=!0,this.CurrentEvent=e,this.virtualSelectAllData||this.resetList(this.dataSource,this.fields,new x.XK),this.virtualSelectAllData&&this.virtualSelectionAll(n,t,e);else{for(;h<o&&h<=50&&h<d;)this.isSelectAllTarget=o===h+1,this.updateListSelection(t[h],e,o-h),this.enableGroupCheckBox&&this.findGroupStart(t[h]),h++;o>50&&setTimeout(function(){for(;h<o&&h<d;)r.isSelectAllTarget=o===h+1,r.updateListSelection(t[h],e,o-h),r.enableGroupCheckBox&&r.findGroupStart(t[h]),h++;if(r.updatedataValueItems(e),r.changeOnBlur||(r.updateValueState(e,r.value,r.tempValues),r.isSelectAll=r.isSelectAll?!r.isSelectAll:r.isSelectAll),r.updateHiddenElement(),r.popupWrapper&&t[h-1].classList.contains("e-item-focus")){var y=document.getElementsByClassName("e-selectall-parent")[0];y&&y.classList.contains("e-item-focus")&&t[h-1].classList.remove("e-item-focus")}},0)}}this.updatedataValueItems(e),this.checkPlaceholderSize(),o<=50&&!l.preventSelectEvent&&(this.changeOnBlur||(this.updateV
1alueState(e,this.value,this.tempValues),this.isSelectAll=this.isSelectAll?!this.isSelectAll:this.isSelectAll),(this.enableVirtualization&&this.value&&this.value.length>0||!this.enableVirtualization)&&this.updateHiddenElement())},i.prototype.updateHiddenElement=function(e){var t=this,n="",r="",o="",l=[];"CheckBox"===this.mode&&(this.value.map(function(h,d){n+='<option selected value ="'+h+'">'+d+"</option>",e||(o=t.listData?t.getTextByValue(h):h,r+=o+t.delimiterChar+" ",l.push(o))}),this.hiddenElement.innerHTML=n,e||(this.updateWrapperText(this.delimiterWrapper,r),this.setProperties({text:l.toString()},!0)),this.delimiterWrapper.setAttribute("id",(0,s.Lz)("delim_val")),this.inputElement.setAttribute("aria-describedby",this.delimiterWrapper.id),this.refreshInputHight(),this.refreshPlaceHolder())},i.prototype.updatedataValueItems=function(e){this.deselectHeader(),this.textboxValueUpdate(e)},i.prototype.textboxValueUpdate=function(e){var t=e&&e.target&&((0,s.kp)(e.target,".e-selectall-parent")||(0,s.kp)(e.target,".e-close-hooker"));"Box"===this.mode||this.isPopupOpen()||"CheckBox"===this.mode&&(this.isSelectAll||t)?this.searchWrapper.classList.remove(Dh):this.updateDelimView(),"CheckBox"===this.mode?(this.updateDelimView(),(!(t||this.isSelectAll)&&this.isSelectAllTarget||this.isSelectAll&&this.isSelectAllTarget)&&this.updateDelimeter(this.delimiterChar,e),this.refreshInputHight()):this.updateDelimeter(this.delimiterChar,e),this.refreshPlaceHolder()},i.prototype.setZIndex=function(){this.popupObj&&this.popupObj.setProperties({zIndex:this.zIndex})},i.prototype.updateDataSource=function(e){this.checkAndResetCache(),(0,s.hX)(this.list)?this.renderPopup():this.resetList(this.dataSource),this.value&&this.value.length&&(this.setProperties({value:this.value}),this.refreshSelection())},i.prototype.onLoadSelect=function(){this.setDynValue=!0,this.renderPopup()},i.prototype.selectAllItems=function(e,t){var n=this;(0,s.hX)(this.list)?(this.selectAllAction=function(){"CheckBox"===n.mode&&n.showSelectAll&&n.notify("checkSelectAll",{module:"CheckBoxSelection",enable:"CheckBox"===n.mode,value:e?"check":"uncheck"}),n.selectAllItem(e,t),n.selectAllAction=null},a.prototype.render.call(this)):(this.selectAllAction=null,"CheckBox"===this.mode&&this.showSelectAll&&this.notify("checkSelectAll",{value:e?"check":"uncheck",enable:"CheckBox"===this.mode,module:"CheckBoxSelection"}),this.selectAllItem(e,t)),(!(this.dataSource instanceof x.M1)||this.dataSource instanceof x.M1&&this.virtualSelectAllData)&&(this.virtualSelectAll=!1)},i.prototype.getPersistData=function(){return this.addOnPersist(["value"])},i.prototype.onPropertyChanged=function(e,t){(e.dataSource&&!(0,s.hX)(Object.keys(e.dataSource))||e.query&&!(0,s.hX)(Object.keys(e.query)))&&(this.mainList=null,this.mainData=null,this.isFirstClick=!1,this.isDynamicDataChange=!0),"multiselect"===this.getModuleName()&&(this.filterAction=!1,this.setUpdateInitial(["fields","query","dataSource"],e));for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];switch(o){case"query":case"dataSource":"CheckBox"===this.mode&&this.showSelectAll&&((0,s.hX)(this.popupObj)||(this.popupObj.destroy(),this.popupObj=null),this.renderPopup());break;case"htmlAttributes":this.updateHTMLAttribute();break;case"showClearButton":this.updateClearButton(e.showClearButton);break;case"text":this.fields.disabled&&(this.text=this.text&&!this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text)))?this.text:null),this.updateVal(this.value,this.value,"text");break;case"value":if(this.fields.disabled&&this.removeDisabledItemsValue(this.value),this.updateVal(this.value,t.value,"value"),this.addValidInputClass(),!this.closePopupOnSelect&&this.isPopupOpen()&&this.refreshPopup(),this.isPopupOpen()&&"CheckBox"===this.mode&&this.list&&this.list.querySelector(".e-active.e-disable")){var l=this.list.querySelectorAll("li."+P_li+".e-active.e-disable");(0,s.vy)(l,"e-disable")}this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange;break;case"width":this.setWidth(e.width),this.popupObj.setProperties({width:this.calcPopupWidth()});break;case"placeholder":this.refreshPlaceHolder();break;case"filterBarPlaceholder":this.allowFiltering&&this.notify("filterBarPlaceholder",{filterBarPlaceholder:e.filterBarPlaceholder});break;case"delimiterChar":"Box"!==this.mode&&this.updateDelimView(),this.updateData(e.delimiterChar);break;case"cssClass":this.updateOldPropCssClass(t.cssClass),this.updateCssClass(),this.calculateWidth();break;case"enableRtl":this.enableRTL(e.enableRtl),a.prototype.onPropertyChanged.call(this,e,t);break;case"allowResize":if(this.allowResize=e.allowResize,!this.allowResize&&this.popupObj
1){var h=parseInt(this.popupHeight,10);"auto"!==this.popupHeight?(this.list.style.maxHeight=(0,s.IV)(h),this.popupWrapper.style.height=(0,s.IV)(this.popupHeight),this.popupWrapper.style.maxHeight=(0,s.IV)(this.popupHeight)):this.list.style.maxHeight=(0,s.IV)(this.popupHeight)}break;case"readonly":this.updateReadonly(e.readonly),this.hidePopup();break;case"enabled":this.hidePopup(),this.enable(e.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(),J.pd.createSpanElement(this.overAllWrapper,this.createElement),this.calculateWidth(),!(0,s.hX)(this.overAllWrapper)&&!(0,s.hX)(this.overAllWrapper.getElementsByClassName("e-ddl-icon")[0]&&this.overAllWrapper.getElementsByClassName("e-float-text-content")[0]&&"Never"!==this.floatLabelType)&&this.overAllWrapper.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon");break;case"enableSelectionOrder":break;case"selectAllText":this.notify("selectAllText",!1);break;case"popupHeight":this.popupObj&&(h=parseInt(this.popupHeight,10),"auto"!==this.popupHeight?(this.list.style.maxHeight=(0,s.IV)(h),this.popupWrapper.style.maxHeight=(0,s.IV)(this.popupHeight)):this.list.style.maxHeight=(0,s.IV)(this.popupHeight));break;case"headerTemplate":case"footerTemplate":this.reInitializePoup();break;case"allowFiltering":"CheckBox"===this.mode&&this.popupObj&&this.reInitializePoup(),this.updateSelectElementData(this.allowFiltering);break;case"fields":(0,s.hX)(this.fields.groupBy)&&this.removeScrollEvent();break;default:var d=this.getPropObject(o,e,t);a.prototype.onPropertyChanged.call(this,d.newProperty,d.oldProperty)}}},i.prototype.reInitializePoup=function(){this.popupObj&&(this.popupObj.destroy(),this.popupObj=null),this.renderPopup()},i.prototype.totalItemsCount=function(){var e;if(this.dataSource instanceof x.M1?this.remoteDataCount>=0?e=this.totalItemCount=this.dataCount=this.remoteDataCount:this.resetList(this.dataSource):e=this.dataSource&&this.dataSource.length?this.dataSource.length:0,"CheckBox"===this.mode)this.totalItemCount=0!==e?e:this.totalItemCount;else if(this.hideSelectedItem){if(this.totalItemCount=0!==e&&this.value?e-this.value.length:this.totalItemCount,this.allowCustomValue&&this.virtualCustomSelectData&&this.virtualCustomSelectData.length>0)for(var t=0;t<this.virtualCustomSelectData.length;t++)for(var n=0;n<this.value.length;n++)(this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[n]):this.value[n])===(0,s._W)(this.fields.value?this.fields.value:"",this.virtualCustomSelectData[t])&&(this.totalItemCount+=1)}else this.totalItemCount=0!==e?e:this.totalItemCount,this.allowCustomValue&&this.virtualCustomSelectData&&this.virtualCustomSelectData.length>0&&(this.totalItemCount+=this.virtualCustomSelectData.length)},i.prototype.presentItemValue=function(e){for(var t=[],n=0;n<this.value.length;n++){var r=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[n]):this.value[n];if(!this.findListElement(this.allowFiltering&&!(0,s.hX)(this.mainList)?this.mainList:e,"li","data-value",r)){var l=this.allowObjectBinding?this.getDataByValue(this.value[n]):this.value[n];t.push(l)}}return t},i.prototype.addNonPresentItems=function(e,t,n,r){var o=this;this.dataSource.executeQuery(this.getForQuery(e)).then(function(l){l.result.length>0&&o.addItem(l.result,n.length),o.updateActionList(t,n,r)})},i.prototype.updateVal=function(e,t,n){var r=this;if(this.list)if(!(this.dataSource instanceof x.M1)||this.listData&&this.mainList&&this.mainData){var o=[];!(0,s.hX)(this.value)&&!this.allowCustomValue&&(o=this.presentItemValue(this.ulElement));var l=o.some(function(m){return null!==m});if("value"===n&&o.length>0&&this.dataSource instanceof x.M1&&!(0,s.hX)(this.value)&&null!=this.listData&&l)this.mainData=null,this.setDynValue=!0,this.isaddNonPresentItems=!0,this.addNonPresentItems(o,this.ulElement,this.listData),this.isaddNonPresentItems=!1;else{if(this.selectedListData=[],"text"===n&&(this.initialTextUpdate(),e=this.value),((0,s.hX)(this.value)||0===this.value.length)&&(this.tempValues=t),this.allowCustomValue&&("Default"===this.mode||"Box"===this.mode)&&this.isReact&&this.inputFocus&&this.isPopupOpen()&&this.mainData!==this.listData){var h=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;this.onActionComplete(h,this.mainData)}if(this.enableVirtualization)if(!this.enableVirtualization||this.dataSource instanceof x.M1){if(!this.isInitRemoteVirtualData)if(this.allowObjectBinding&&!l&&this.value&&this.value.length){for(var d=this.isPrimitiveData?"":this.fields.value,p=void 0,u=0;u<this.value.length;u++){var f=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[u]):this.value[u];p=0===u?new x.mT(d,"equal",f):p.or(d,"equal",f)}this.dataSource instanceof x.M1&&this.dataSource.executeQuery((new x.XK).where(p)).then(function(m){if(m.result.length>0){var g=m.result;r.isDynamicRemoteVirtualData=!0,setTimeout(function(){r.initialValueUpdate(g,!0),r.isDynamicRemoteVirtualData=!1,(!r.inputFocus||r.inputFocus&&"Default"!==r.mode)&&r.initialUpdate()},100)}})}else this.isDynamicRemoteVirtualData=!0,this.initialValueUpdate(this.listData,!0),this.isDynamicRemoteVirtualData=!1,this.initialUpdate()}else this.initialValueUpdate(this.dataSource,!0);else this.initialValueUpdate();"Box"!==this.mode&&!this.inputFocus&&this.updateDelimView(),this.inputFocus||this.refreshInputHight(),this.refreshPlaceHolder(),"CheckBox"!==this.mode&&this.changeOnBlur&&this.updateV
1alueState(null,e,t),this.checkPlaceholderSize()}}else this.onLoadSelect();else this.onLoadSelect(),this.enableVirtualization&&(this.setProperties({text:""},!0),this.selectedListData=[],this.checkInitialValue());this.changeOnBlur||this.updateValueState(null,e,t)},i.prototype.addItem=function(e,t){a.prototype.addItem.call(this,e,t)},i.prototype.hidePopup=function(e){var t=this;if(this.isPopupOpen()){this.customFilterQuery=null,this.trigger("close",{popup:this.popupObj,cancel:!1,animation:{name:"FadeOut",duration:100,delay:100},event:e||null},function(l){if(!l.cancel){t.fields.groupBy&&"CheckBox"!==t.mode&&t.fixedHeaderElement&&((0,s.TF)(t.fixedHeaderElement),t.fixedHeaderElement=null),t.beforePopupOpen=!1,t.overAllWrapper.classList.remove(X0);var h="CheckBox"===t.mode?t.targetElement():null;if(t.popupObj.hide(new s.X5(l.animation)),(0,s.uK)(t.inputElement,{"aria-expanded":"false"}),t.inputElement.removeAttribute("aria-owns"),t.inputElement.removeAttribute("aria-activedescendant"),t.allowFiltering&&t.notify("inputFocus",{module:"CheckBoxSelection",enable:"CheckBox"===t.mode,value:"clear"}),t.popupObj.hide(),(0,s.vy)([document.body,t.popupObj.element],"e-popup-full-page"),s.Jm.remove(t.list,"keydown",t.onKeyDown),"CheckBox"===t.mode&&t.showSelectAll&&s.Jm.remove(t.popupObj.element,"click",t.clickHandler),t.list&&t.list.parentElement&&t.allowResize){t.resizer&&t.list.parentElement.contains(t.resizer)&&t.list.parentElement.removeChild(t.resizer),t.list.parentElement.classList.contains("e-resize")&&t.list.parentElement.classList.remove("e-resize"),t.list.parentElement.style.boxSizing="",t.list.parentElement.style.paddingBottom="";var d=parseInt(t.popupHeight,10);t.list.style.maxHeight=(0,s.IV)(d),"auto"!==t.popupHeight.toString().toLowerCase()&&t.initialPopupHeight>=parseInt(t.popupHeight.toString(),10)-2&&(t.list.parentElement.style.height=(0,s.IV)(t.popupHeight)),t.list.parentElement.style.maxHeight=(0,s.IV)(t.popupHeight)}t.resizer&&(s.Jm.remove(t.resizer,"mousedown",t.startResizing),t.resizer.remove()),t.enableVirtualization&&"CheckBox"===t.mode&&t.value&&t.value.length>0&&t.enableSelectionOrder&&(t.viewPortInfo.startIndex=t.virtualItemStartIndex=0,t.viewPortInfo.endIndex=t.virtualItemEndIndex=t.viewPortInfo.startIndex>0?t.viewPortInfo.endIndex:t.itemCount,t.virtualListInfo=t.viewPortInfo,t.previousStartIndex=0,t.previousEndIndex=t.itemCount);var p=void 0;t.dataSource instanceof x.M1?t.remoteDataCount>=0?t.totalItemCount=t.dataCount=t.remoteDataCount:t.resetList(t.dataSource):p=t.dataSource&&t.dataSource.length?t.dataSource.length:0,t.enableVirtualization&&(t.allowFiltering||t.allowCustomValue)&&(t.targetElement()||h)&&t.totalItemCount!==p&&(t.checkAndResetCache(),t.updateInitialData()),t.virtualCustomData&&t.viewPortInfo&&0===t.viewPortInfo.startIndex&&t.viewPortInfo.endIndex===t.itemCount&&t.renderItems(t.mainData,t.fields),t.virtualCustomData=null,t.isVirtualTrackHeight=!1}})}},i.prototype.showPopup=function(e){var t=this;this.enabled&&(this.firstItem=this.dataSource&&this.dataSource.length>0?this.dataSource[0]:null,this.trigger("beforeOpen",{cancel:!1},function(r){if(!r.cancel){if(!t.ulElement)return t.beforePopupOpen=!0,"CheckBox"===t.mode&&s.Pw.isDevice&&t.allowFiltering&&t.isDeviceFullScreen&&t.notify("popupFullScreen",{module:"CheckBoxSelection",enable:"CheckBox"===t.mode}),void a.prototype.render.call(t,e);"CheckBox"===t.mode&&s.Pw.isDevice&&t.allowFiltering&&t.isDeviceFullScreen&&t.notify("popupFullScreen",{module:"CheckBoxSelection",enable:"CheckBox"===t.mode});var o=t.ulElement.querySelectorAll("li.e-list-item").length,l=t.ulElement.querySelectorAll("li."+P_li+"."+rt).length;if(o>0&&o===l&&l===t.mainData.length&&(""===t.targetElement()||!t.allowCustomValue))return void(t.beforePopupOpen=!1);if(t.onPopupShown(e),t.enableVirtualization&&t.listData&&t.listData.length&&(!(0,s.hX)(t.value)&&("dropdownlist"===t.getModuleName()||"combobox"===t.getModuleName())&&t.removeHover(),t.beforePopupOpen||(t.hideSelectedItem&&t.value&&Array.isArray(t.value)&&t.value.length>0&&t.totalItemsCount(),!t.preventSetCurrentData&&!(0,s.hX)(t.viewPortInfo.startIndex)&&!(0,s.hX)(t.viewPortInfo.endIndex)&&t.notify("setCurrentViewDataAsync",{component:t.getModuleName(),module:"VirtualScroll"}))),t.enableVirtualization&&!t.allowFiltering&&null!=t.selectedValueInfo&&t.selectedValueInfo.startIndex>0&&null!=t.value&&t.notify("dataProcessAsync",{module:"VirtualScroll",isOpen:!0}),t.enableVirtualization)t.updatevirtualizationList();else if(t.value&&t.value.length)for(var h=void 0,p=(t.getItems(),0),u=t.value;p<u.length;p++){var f=u[p],m=t.allowObjectBinding?(0,s._W)(t.fields.value?t.fields.value:"",f):f;(h=t.getElementByValue(m))&&t.addListSelection(h)}t.allowResize&&t.setResize(),t.preventSetCurrentData=!0}}))},i.prototype.selectAll=function(e){this.isSelectAll=!0,this.selectAllItems(e)},i.prototype.getModuleName=function(){return"multiselect"},i.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)},i.prototype.render=function(){!(0,s.hX)(this.value)&&this.value.length>0&&(this.value=this.value.slice()),this.setDynValue=this.initStatus=!1,this.isSelectAll=!1,this.selectAllEventEle=[],this.searchWra
1pper=this.createElement("span",{className:"e-searcher "+("Box"===this.mode?"e-multiselect-box":"")}),this.viewWrapper=this.createElement("span",{className:"e-delim-view "+V0}),this.viewWrapper.style.display="none",this.overAllClear=this.createElement("span",{className:N0}),this.overAllClear.style.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&&(0,s.iQ)([this.overAllWrapper],"e-checkbox"),s.Pw.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"}),this.popupWrapper.setAttribute("aria-label",this.element.id),this.popupWrapper.setAttribute("role","dialog"),"Delimiter"===this.mode||"CheckBox"===this.mode?(this.delimiterWrapper=this.createElement("span",{className:V0}),this.delimiterWrapper.style.display="none",this.componentWrapper.appendChild(this.delimiterWrapper)):(this.chipCollectionWrapper=this.createElement("span",{className:"e-chips-collection"}),this.chipCollectionWrapper.style.display="none","Default"===this.mode?this.chipCollectionWrapper.setAttribute("id",(0,s.Lz)("chip_default")):"Box"===this.mode&&this.chipCollectionWrapper.setAttribute("id",(0,s.Lz)("chip_box")),this.componentWrapper.appendChild(this.chipCollectionWrapper)),"Box"!==this.mode&&this.componentWrapper.appendChild(this.viewWrapper),this.componentWrapper.appendChild(this.searchWrapper),this.showClearButton&&!s.Pw.isDevice?this.componentWrapper.appendChild(this.overAllClear):this.componentWrapper.classList.add(ju),this.dropDownIcon(),this.inputElement=this.createElement("input",{className:"e-dropdownbase",attrs:{spellcheck:"false",type:"text",autocomplete:"off",tabindex:"0",role:"combobox"}}),("Default"===this.mode||"Box"===this.mode)&&this.inputElement.setAttribute("aria-describedby",this.chipCollectionWrapper.id),(0,s.hX)(this.inputElement)||((0,s.uK)(this.inputElement,{"aria-expanded":"false"}),this.inputElement.hasAttribute("aria-label")||this.inputElement.setAttribute("aria-label",this.getModuleName())),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?M0(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"):(0,s.Lz)("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(),!(0,s.hX)((0,s.kp)(this.element,"fieldset"))&&(0,s.kp)(this.element,"fieldset").disabled&&(this.enabled=!1),this.wireEvent(),this.enable(this.enabled),this.enableRTL(this.enableRtl),this.enableVirtualization&&this.updateVirtualizationProperties(this.itemCount,this.allowFiltering,"CheckBox"===this.mode),this.listItemHeight=this.getListHeight(),this.getSkeletonCount(),this.viewPortInfo.startIndex=this.virtualItemStartIndex=0,this.viewPortInfo.endIndex=this.virtualItemEndIndex=this.viewPortInfo.startIndex>0?this.viewPortInfo.endIndex:this.itemCount,this.checkInitialValue(),this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),J.pd.createSpanElement(this.overAllWrapper,this.createElement),this.calculateWidth(),!(0,s.hX)(this.overAllWrapper)&&!(0,s.hX)(this.overAllWrapper.getElementsByClassName("e-ddl-icon")[0]&&this.overAllWrapper.getElementsByClassName("e-float-text-content")[0]&&"Never"!==this.floatLabelType)&&this.overAllWrapper.getElementsByClassName("e-float-text-content")[0].classList.add("e-icon"),this.renderComplete()},i.prototype.setResize=function(){if(this.list&&this.list.parentElement&&(0,s.hX)(this.list.parentElement.querySelector(".e-resizer-right.e-icons"))&&(this.resizer=this.createElement("div",{id:this.element.i
1d+"_resize-popup",className:"e-resizer-right e-icons"})),"CheckBox"===this.mode&&this.showSelectAll&&this.selectAllHeight&&0!==this.selectAllHeight&&(this.storedSelectAllHeight=this.selectAllHeight),this.list&&this.list.parentElement&&(this.list.parentElement.classList.add("e-resize"),this.initialPopupHeight=this.list.parentElement.clientHeight,"auto"!==this.popupHeight.toString().toLowerCase()&&this.initialPopupHeight>=parseInt(this.popupHeight.toString(),10)-2&&(this.list.parentElement.style.height="100%"),this.list.parentElement.style.boxSizing="border-box",this.list.parentElement.style.paddingBottom=("CheckBox"===this.mode&&this.searchBoxHeight?this.searchBoxHeight+16+(this.showSelectAll?this.storedSelectAllHeight:0):16)+"px",this.list.parentElement.appendChild(this.resizer),this.list.parentElement.style.width=this.resizeWidth+"px",this.list.parentElement.style.height=this.resizeHeight+"px",this.list.parentElement.style.maxHeight=this.resizeHeight+"px",this.list.style.maxHeight=this.resizeHeight+"px",this.headerTemplate)){var n=this.list.parentElement.querySelector(".e-ddl-header");n&&n.offsetHeight&&(this.headerTemplateHeight=n.offsetHeight),this.list.style.maxHeight=this.resizeHeight?this.resizeHeight-this.headerTemplateHeight-16+"px":parseInt(this.list.style.maxHeight,10)-16+"px"}this.resizer&&(s.Jm.add(this.resizer,"mousedown",this.startResizing,this),s.Jm.add(this.resizer,"touchstart",this.startResizing,this))},i.prototype.startResizing=function(e){this.isResizing=!0,this.trigger("resizeStart",e);var t=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,n=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;this.list&&this.list.parentElement&&(this.originalWidth=this.list.parentElement.offsetWidth,this.originalHeight=this.list.parentElement.offsetHeight,this.originalMouseX=t,this.originalMouseY=n),this.resizingWireEvent(),e&&e.preventDefault()},i.prototype.resizePopup=function(e){if(this.isResizing){this.trigger("resizing",e);var t=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,n=e instanceof MouseEvent?e.clientY:e.touches[0].clientY,r=t-this.originalMouseX,o=n-this.originalMouseY;if(this.resizeWidth=Math.max(this.originalWidth+r,100),this.resizeHeight=Math.max(this.originalHeight+o,130),this.list&&this.list.parentElement){var d=parseInt(window.getComputedStyle(this.list.parentElement).minWidth,10),p=parseInt(window.getComputedStyle(this.list.parentElement).minHeight,10);d=d||100,p=p||120,this.resizeWidth=Math.max(this.originalWidth+r,d),this.resizeHeight=Math.max(this.originalHeight+o,p),this.list.parentElement.style.width=this.resizeWidth+"px",this.list.parentElement.style.height=this.resizeHeight+"px",this.list.parentElement.style.maxHeight=this.resizeHeight+"px",this.list.style.maxHeight=this.resizeHeight+"px",this.headerTemplate&&(this.list.style.maxHeight=this.resizeHeight-this.headerTemplateHeight-16+"px"),this.fixedHeaderElement&&this.ulElement&&(this.fixedHeaderElement.style.width=this.ulElement.offsetWidth+"px")}e&&e.preventDefault()}},i.prototype.stopResizing=function(e){this.isResizing&&(this.isResizing=!1,this.trigger("resizeStop",e),this.resizingUnWireEvent()),e&&e.preventDefault()},i.prototype.getListHeight=function(){var e=this.createElement("div",{className:"e-dropdownbase"}),t=this.createElement("li",{className:"e-list-item"}),n=(0,s.IV)(this.popupHeight);e.style.height=parseInt(n,10).toString()+"px",e.appendChild(t),document.body.appendChild(e),this.virtualListHeight=e.getBoundingClientRect().height;var r=Math.ceil(t.getBoundingClientRect().height)+parseInt(window.getComputedStyle(t).marginBottom,10);return e.remove(),r},i.prototype.removeDisabledItemsValue=function(e){if(e){for(var t=[],n=0,r=0;r<e.length;r++){var o=e[r];"object"==typeof o&&(o=JSON.parse(JSON.stringify(o))[this.fields.value]),null!=o&&!this.isDisabledItemByIndex(this.getIndexByValue(o))&&(t[n++]=e[r])}this.value=t.length>0?t:null}},i.prototype.checkInitialValue=function(){var e=this;this.fields.disabled&&this.removeDisabledItemsValue(this.value);var t=this.dataSource instanceof Array?this.dataSource.length>0:!(0,s.hX)(this.dataSource);if((!this.value||!this.value.length)&&(0,s.hX)(this.text)&&!t&&"SELECT"===this.element.tagName&&this.element.options.length>0){for(var n=this.element.options,r=[],o="",l=0,h=n.length;l<h;l++){var d=n[l];if(!(0,s.hX)(d.getAttribute("selected")))if(d.getAttribute("value")){var p=this.allowObjectBinding?this.getDataByValue(d.getAttribute("value")):d.getAttribute("value");r.push(p)}else o+=d.text+this.delimiterChar}r.length>0?this.setProperties({value:r},!0):""!==o&&this.setProperties({text:o},!0),(r.length>0||""!==o)&&(this.refreshInputHight(),this.refreshPlaceHolder())}if((this.value&&this.value.length||!(0,s.hX)(this.text))&&(this.list||a.prototype.render.call(this)),this.fields.disabled&&(this.text=this.text&&!this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text)))?this.text:null),!(0,s.hX)(this.text)&&((0,s.hX)(this.value)||0===this.value.length)&&this.initialTextUpdate(),this.value&&this.value.length){var u;if(this.enableVirtualization){for(var f=this.isPrimitiveData?"":this.fields.value,m=void 0,g=0;g<this.value.length;g++)p=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",this.value[g]):this.value[g],m=0===g?new x.mT(f,"equal",p):m.or(f,"equal",p);this.dataSource instanceof x.M1?this.dataSource.executeQuery((new x.XK).where(m)).then(function(v){v.result.length>0&&(u=v.result,e.initStatus=!1,e.isInitRemoteVirtualData=!0,setTimeout(function(){e.initialValueUpdate(u,!0),e.initialUpdate(),e.isInitRemoteVirtualData=!1},100),e.initStatus=!0)}):u=new x.M1(this.dataSource).executeLocal((new x.XK).where(m))}this.dataSource instanceof x.M1?this.setInitialValue=function(){e.initStatus=!1,(!e.enableVirtualization||e.enableVirtualization&&!(e.dataSource instanceof x.M1))&&e.initialValueUpdate(u),e.initialUpdate(),e.setInitialValue=null,e.initStatus=!0}:(this.initialValueUpdate(u,!0),this.initialUpdate()),this.updateTempValue()}else this.initialUpdate();this.initStatus=!0,this.checkAutoFocus(),(0,s.hX)(this.text)||this.element.setAttribute("data-initial-value",this.text)},i.prototype.checkAutoFocus=function(){this.element.hasAttribute("autofocus")&&this.inputElement.focus()},i.prototype.updatevirtualizationList=function(){if(this.value&&this.value.length){for(var e=void 0,t=0,n=this.value;t<n.length;t++){var r=n[t],o=this.allowObjectBinding?(0,s._W)(this.fields.value?this.fields.value:"",r):r;(e=this.getElementByValue(o))&&this.addListSelection(e)}if(this.enableVirtualization&&this.hideSelectedItem){var l=this.list.querySelectorAll("li."+P_li+":not(."+rt+"):not(.e-reorder-hide):not(.e-virtual-list)");if(l.length){var h=this.virtualListHeight>0?Math.floor(this.virtualListHeight/this.listItemHeight):0;if(l.length<h+2){var d=this.getForQuery(this.value).clone();d=d.skip(this.viewPortInfo.startIndex),this.resetList(this.dataSource,this.fields,d)}}}}},i.prototype.setFloatLabelType=function(){(function MI(a,i,e,t,n,r,o){var d,l=i.querySelector("."+ul),h=i.querySelector("."+zu);(0,s.hX)(l)?L0(n,t,d=null!==o?o:""):(d=l.innerText,(0,s.Yo)(e.querySelector("."+ul)),L0(n,t,d),(0,s.hX)(h)||(0,s.Yo)(e.querySelector("."+zu))),a.classList.remove("e-float-input")}
1)(this.overAllWrapper,this.componentWrapper,this.searchWrapper,this.inputElement,this.value,0,this.placeholder),"Never"!==this.floatLabelType&&M0(this.overAllWrapper,this.searchWrapper,this.element,this.inputElement,this.value,this.floatLabelType,this.placeholder)},i.prototype.addValidInputClass=function(){(0,s.hX)(this.overAllWrapper)||(!(0,s.hX)(this.value)&&this.value.length||"Always"===this.floatLabelType?(0,s.iQ)([this.overAllWrapper],"e-valid-input"):(0,s.vy)([this.overAllWrapper],"e-valid-input"))},i.prototype.dropDownIcon=function(){this.showDropDownIcon?(this.dropIcon=this.createElement("span",{className:z0}),this.componentWrapper.appendChild(this.dropIcon),(0,s.iQ)([this.componentWrapper],["e-down-icon"])):(0,s.hX)(this.dropIcon)||(this.dropIcon.parentElement.removeChild(this.dropIcon),(0,s.vy)([this.componentWrapper],["e-down-icon"]))},i.prototype.initialUpdate=function(){"Box"!==this.mode&&!(this.setDynValue&&"Default"===this.mode&&this.inputFocus)&&this.updateDelimView(),this.viewPortInfo.startIndex=this.virtualItemStartIndex=0,this.viewPortInfo.endIndex=this.virtualItemEndIndex=this.itemCount,this.updateCssClass(),this.updateHTMLAttribute(),this.updateReadonly(this.readonly),this.refreshInputHight(),this.checkPlaceholderSize()},i.prototype.disableItem=function(e){if(this.fields.disabled){this.list||this.renderList();var t=-1;if(this.liCollections&&this.liCollections.length>0&&this.listData&&this.fields.disabled){if("string"==typeof e)t=this.getIndexByValue(e);else if("object"==typeof e)if(e instanceof HTMLLIElement){for(var n=0;n<this.liCollections.length;n++)if(this.liCollections[n]===e){t=this.getIndexByValue(e.getAttribute("data-value"));break}}else{var r=JSON.parse(JSON.stringify(e))[this.fields.value];for(n=0;n<this.listData.length;n++)if(JSON.parse(JSON.stringify(this.listData[n]))[this.fields.value]===r){t=this.getIndexByValue(r);break}}else t=e;if(t<this.liCollections.length&&t>-1&&!JSON.parse(JSON.stringify(this.listData[t]))[this.fields.disabled]){var l=this.liCollections[t];if(l){this.disableListItem(l);var h=JSON.parse(JSON.stringify(this.listData[t]));if(h[this.fields.disabled]=!0,this.listData[t]=h,l.classList.contains(P_focus)&&this.removeFocus(),l.classList.contains(rt)||l.classList.contains("e-active")){var d=this.value;this.removeDisabledItemsValue(this.value),this.updateVal(this.value,d,"value")}"CheckBox"===this.mode&&this.enableGroupCheckBox&&!(0,s.hX)(this.fields.groupBy)&&this.disableGroupHeader()}}}}},i.prototype.destroy=function(){this.isReact&&this.clearTemplate(),(0,s.hX)(this.popupObj)||(this.popupObj.hide(),this.popupObj.destroy()),this.notify("destroy",{}),this.unwireListEvents(),this.unWireEvent();var e=["readonly","aria-disabled","placeholder","aria-label","aria-expanded"],t=e.length;if(!(0,s.hX)(this.inputElement))for(;t>0;)this.inputElement.removeAttribute(e[t-1]),t--;for((0,s.hX)(this.element)||(this.element.removeAttribute("data-initial-value"),this.element.style.display="block"),this.overAllWrapper&&this.overAllWrapper.parentElement&&(this.overAllWrapper.parentElement.tagName===this.getNgDirective()||this.overAllWrapper.parentElement.insertBefore(this.element,this.overAllWrapper),(0,s.TF)(this.overAllWrapper)),this.popupWrapper&&this.popupWrapper.parentElement&&this.popupWrapper.parentElement.remove();this.searchWrapper&&this.searchWrapper.firstChild;)this.searchWrapper.removeChild(this.searchWrapper.firstChild);this.searchWrapper&&this.searchWrapper.parentElement&&this.searchWrapper.parentElement.remove(),this.viewWrapper&&this.viewWrapper.parentElement&&this.viewWrapper.parentElement.remove(),this.overAllClear&&this.overAllClear.parentElement&&this.overAllClear.parentElement.remove(),this.delimiterWrapper&&this.delimiterWrapper.parentElement&&this.delimiterWrapper.parentElement.remove();var n=this.overAllWrapper.querySelector("select.e-multi-hidden");for(n&&n.parentElement&&n.parentElement.remove();this.componentWrapper&&this.componentWrapper.firstChild;)this.componentWrapper.removeChild(this.componentWrapper.firstChild);for(this.componentWrapper&&this.componentWrapper.parentElement&&(this.componentWrapper.removeAttribute("class"),this.componentWrapper.parentElement.remove());this.popupWrapper&&this.popupWrapper.firstChild;)this.popupWrapper.removeChild(this.popupWrapper.firstChild);if(this.inputElement)for(var r=["readonly","aria-disabled","placeholder","aria-labelledby","aria-expanded","autocomplete","aria-readonly","autocapitalize","spellcheck","aria-autocomplete","aria-live","aria-label","aria-hidden","tabindex","aria-controls","aria-describedby","size","role","type","class"],o=0;o<r.length;o++)this.inputElement.removeAttribute(r[o]);this.inputElement&&this.inputElement.remove(),this.list=null,this.popupObj=null,this.mainData=null,this.filterParent=null,this.ulElement=null,this.componentWrapper=null,this.overAllClear=null,this.overAllWrapper=null,this.hiddenElement=null,this.searchWra
1pper=null,this.viewWrapper=null,this.chipCollectionWrapper=null,this.targetInputElement=null,this.popupWrapper=null,this.inputElement=null,this.delimiterWrapper=null,this.liCollections=null,this.popupContentElement=null,this.header=null,this.mainList=null,this.mainListCollection=null,this.footer=null,this.selectAllEventEle=null,a.prototype.destroy.call(this)},ve([(0,s.pr)({text:null,value:null,iconCss:null,groupBy:null,disabled:null},Ih)],i.prototype,"fields",void 0),ve([(0,s.mA)(!1)],i.prototype,"enablePersistence",void 0),ve([(0,s.mA)(null)],i.prototype,"groupTemplate",void 0),ve([(0,s.mA)("No records found")],i.prototype,"noRecordsTemplate",void 0),ve([(0,s.mA)("Request failed")],i.prototype,"actionFailureTemplate",void 0),ve([(0,s.mA)("None")],i.prototype,"sortOrder",void 0),ve([(0,s.mA)(!0)],i.prototype,"enabled",void 0),ve([(0,s.mA)(!0)],i.prototype,"enableHtmlSanitizer",void 0),ve([(0,s.mA)(!1)],i.prototype,"enableVirtualization",void 0),ve([(0,s.mA)([])],i.prototype,"dataSource",void 0),ve([(0,s.mA)(null)],i.prototype,"query",void 0),ve([(0,s.mA)("StartsWith")],i.prototype,"filterType",void 0),ve([(0,s.mA)(1e3)],i.prototype,"zIndex",void 0),ve([(0,s.mA)(!1)],i.prototype,"ignoreAccent",void 0),ve([(0,s.mA)()],i.prototype,"locale",void 0),ve([(0,s.mA)(!1)],i.prototype,"enableGroupCheckBox",void 0),ve([(0,s.mA)(null)],i.prototype,"cssClass",void 0),ve([(0,s.mA)("100%")],i.prototype,"width",void 0),ve([(0,s.mA)("300px")],i.prototype,"popupHeight",void 0),ve([(0,s.mA)("100%")],i.prototype,"popupWidth",void 0),ve([(0,s.mA)(null)],i.prototype,"placeholder",void 0),ve([(0,s.mA)(null)],i.prototype,"filterBarPlaceholder",void 0),ve([(0,s.mA)({})],i.prototype,"htmlAttributes",void 0),ve([(0,s.mA)(null)],i.prototype,"valueTemplate",void 0),ve([(0,s.mA)(null)],i.prototype,"headerTemplate",void 0),ve([(0,s.mA)(null)],i.prototype,"footerTemplate",void 0),ve([(0,s.mA)(null)],i.prototype,"itemTemplate",void 0),ve([(0,s.mA)(null)],i.prototype,"allowFiltering",void 0),ve([(0,s.mA)(300)],i.prototype,"debounceDelay",void 0),ve([(0,s.mA)(!0)],i.prototype,"isDeviceFullScreen",void 0),ve([(0,s.mA)(!0)],i.prototype,"changeOnBlur",void 0),ve([(0,s.mA)(!1)],i.prototype,"allowCustomValue",void 0),ve([(0,s.mA)(!0)],i.prototype,"showClearButton",void 0),ve([(0,s.mA)(1e3)],i.prototype,"maximumSelectionLength",void 0),ve([(0,s.mA)(!1)],i.prototype,"readonly",void 0),ve([(0,s.mA)(!1)],i.prototype,"allowResize",void 0),ve([(0,s.mA)(null)],i.prototype,"text",void 0),ve([(0,s.mA)(null)],i.prototype,"value",void 0),ve([(0,s.mA)(!1)],i.prototype,"allowObjectBinding",void 0),ve([(0,s.mA)(!0)],i.prototype,"hideSelectedItem",void 0),ve([(0,s.mA)(!0)],i.prototype,"closePopupOnSelect",void 0),ve([(0,s.mA)("Default")],i.prototype,"mode",void 0),ve([(0,s.mA)(",")],i.prototype,"delimiterChar",void 0),ve([(0,s.mA)(!0)],i.prototype,"ignoreCase",void 0),ve([(0,s.mA)(!1)],i.prototype,"showDropDownIcon",void 0),ve([(0,s.mA)("Never")],i.prototype,"floatLabelType",void 0),ve([(0,s.mA)(!1)],i.prototype,"showSelectAll",void 0),ve([(0,s.mA)("Select All")],i.prototype,"selectAllText",void 0),ve([(0,s.mA)("Unselect All")],i.prototype,"unSelectAllText",void 0),ve([(0,s.mA)(!0)],i.prototype,"enableSelectionOrder",void 0),ve([(0,s.mA)(!0)],i.prototype,"openOnClick",void 0),ve([(0,s.mA)(!1)],i.prototype,"addTagOnBlur",void 0),ve([(0,s.Jh)()],i.prototype,"change",void 0),ve([(0,s.Jh)()],i.prototype,"removing",void 0),ve([(0,s.Jh)()],i.prototype,"removed",void 0),ve([(0,s.Jh)()],i.prototype,"beforeSelectAll",void 0),ve([(0,s.Jh)()],i.prototype,"selectedAll",void 0),ve([(0,s.Jh)()],i.prototype,"beforeOpen",void 0),ve([(0,s.Jh)()],i.prototype,"open",void 0),ve([(0,s.Jh)()],i.prototype,"close",void 0),ve([(0,s.Jh)()],i.prototype,"blur",void 0),ve([(0,s.Jh)()],i.prototype,"focus",void 0),ve([(0,s.Jh)()],i.prototype,"chipSelection",void 0),ve([(0,s.Jh)()],i.prototype,"resizeStop",void 0),ve([(0,s.Jh)()],i.prototype,"resizing",void 0),ve([(0,s.Jh)()],i.prototype,"resizeStart",void 0),ve([(0,s.Jh)()],i.prototype,"filtering",void 0),ve([(0,s.Jh)()],i.prototype,"tagging",void 0),ve([(0,s.Jh)()],i.prototype,"customValueSelection",void 0),ve([s.kc],i)}
1(xh),$u=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),st=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},h1=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return $u(i,a),st([(0,s.mA)("Multiple")],i.prototype,"mode",void 0),st([(0,s.mA)(!1)],i.prototype,"showCheckbox",void 0),st([(0,s.mA)(!1)],i.prototype,"showSelectAll",void 0),st([(0,s.mA)("Left")],i.prototype,"checkboxPosition",void 0),i}(s.I1),d1=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return $u(i,a),st([(0,s.mA)([])],i.prototype,"items",void 0),st([(0,s.mA)("Right")],i.prototype,"position",void 0),i}(s.I1),p1=function(a){function i(t,n){var r=a.call(this,t,n)||this;return r.isValidKey=!1,r.isBackSpace=!1,r.isDataSourceUpdate=!1,r.keyDownStatus=!1,r}var e;return $u(i,a),e=i,i.prototype.addItem=function(t,n){a.prototype.addItem.call(this,t,n),this.allowFiltering&&""!==this.filterInput.value&&this.filteringAction(this.jsonData,new x.XK,this.fields)},i.prototype.render=function(){if(this.isAngular&&this.allowFiltering){var t=this.element,n=t.cloneNode(!0);t.parentNode.replaceChild(n,t),this.element=n,(0,s.KY)("ej2_instances",[this],this.element)}this.inputString="",this.initLoad=!0,this.isCustomFiltering=!1,this.initialSelectedOptions=this.value,this.inputFormName=this.element.getAttribute("name"),a.prototype.render.call(this),this.setEnabled(),this.renderComplete()},i.prototype.initWrapper=function(){var t=this.createElement("select",{className:"e-hidden-select",attrs:{multiple:""}});t.style.visibility="hidden",this.list.classList.add("e-listbox-wrapper"),this.list.querySelector(".e-list-parent").setAttribute("role","presentation");for(var n=this.list.querySelectorAll(".e-list-group-item"),r=0;r<n.length;r++)n[r].removeAttribute("tabindex"),n[r].setAttribute("role","option");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&&this.element.parentElement.insertBefore(this.list,this.element),this.list.insertBefore(this.element,this.list.firstChild),this.element.style.display="none"),this.list.insertBefore(t,this.list.firstChild),this.list.getElementsByClassName("e-list-item")[0]&&this.list.getElementsByClassName("e-list-item")[0].classList.remove(P_focus),this.itemTemplate&&this.renderReactTemplates(),(0,s.vy)([this.list],["e-content",P_root]),this.validationAttribute(this.element,t),this.list.setAttribute("role","listbox"),(0,s.uK)(this.list,{role:"listbox","aria-label":"listbox","aria-multiselectable":"Multiple"===this.selectionSettings.mode?"true":"false"}),this.updateSelectionSettings()},i.prototype.updateSelectionSettings=function(){if(this.selectionSettings.showCheckbox&&this.selectionSettings.showSelectAll&&this.liCollections.length){var t=new s.Wo(this.getModuleName(),{selectAllText:"Select All",unSelectAllText:"Unselect All"},this.locale);this.showSelectAll=!0,this.selectAllText=t.getConstant("selectAllText"),this.unSelectAllText=t.getConstant("unSelectAllText"),this.popupWrapper=this.list,this.checkBoxSelectionModule.checkAllParent=null,this.filterParent&&(this.filterParent=null),this.notify("selectAll",{})}},i.prototype.initDraggable=function(){var t=this;this.ulElement&&(this.ulElement.id=this.element.id+"_parent"),this.allowDragAndDrop&&new ce.L1(this.ulElement,{scope:this.scope,itemClass:"e-list-item",beforeDragStart:this.triggerDragStart.bind(this),drag:this.triggerDrag.bind(this),beforeDrop:this.beforeDragEnd.bind(this),drop:this.dragEnd.bind(this),placeHolder:function(){return t.createElement("span",{className:"e-placeholder"})},helper:function(n){var r=t.list.cloneNode(),o=n.sender.cloneNode(!0);r.appendChild(o);var l=t.getItems()[0];return r.style.width=l.offsetWidth+"px",r.style.height=l.offsetHeight+"px",(t.value&&t.value.length)>1&&t.isSelected(o)&&o.appendChild(t.createElement("span",{className:"e-list-badge",innerHTML:t.value.length+""})),r.style.zIndex=(0,ae.OL)(t.element)+"",r}})},i.prototype.updateActionCompleteData=function(t,n,r){this.jsonData.splice(null===r?this.jsonData.length:r,0,n)},i.prototype.initToolbar=function(){var t=this.toolbarSettings.position,n=this.element.getAttribute("data-value");if(this.toolbarSettings.items=(0,s.hX)(this.toolbarSettings.items)?[]:this.toolbarSettings.items,this.toolbarSettings.items.length){var r=this.createElement("div",{className:"e-listbox-tool",attrs:{role:"toolbar"}}),o=this.createElement("div",{className:"e-listboxtool-wrapper e-lib e-"+t.toLowerCase()});this.list.parentElement.insertBefore(o,this.list),o.appendChild("Right"===t?this.list:r),o.appendChild("Right"===t?r:this.list),this.createButtons(r),this.element.i
1d||(this.element.id=(0,s.Lz)("e-"+this.getModuleName())),this.scope?document.querySelector(this.scope).setAttribute("data-value",this.element.id):this.updateToolBarState()}var l=this.element.getAttribute("data-value");n&&l&&n!==l?(this.tBListBox=(0,s.QQ)(document.getElementById(n),this.getModuleName()),this.tBListBox.updateToolBarState()):l?(this.tBListBox=(0,s.QQ)(document.getElementById(l),this.getModuleName()),this.tBListBox.updateToolBarState()):this.refreshing&&this.updateToolBarState()},i.prototype.createButtons=function(t){var o,l,n=this,h=new s.Wo(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(d){l=h.getConstant(d),o=n.createElement("button",{attrs:{type:"button","data-value":d,title:l,"aria-label":l}}),t.appendChild(o),new ke.$n({iconCss:"e-icons e-"+d.toLowerCase()},o).createElement=n.createElement})},i.prototype.validationAttribute=function(t,n){this.inputFormName&&t.setAttribute("name",this.inputFormName),a.prototype.validationAttribute.call(this,t,n),n.required=t.required,t.required=!1},i.prototype.setHeight=function(){(this.toolbarSettings.items.length?this.list.parentElement:this.list).style.height=(0,s.IV)(this.height),this.allowFiltering&&this.height.toString().indexOf("%")<0?(0,s.iQ)([this.list],"e-filter-list"):(0,s.vy)([this.list],"e-filter-list")},i.prototype.setCssClass=function(){this.cssClass&&(0,s.iQ)([this.toolbarSettings.items.length?this.list.parentElement:this.list],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.enableRtl&&(0,s.iQ)([this.list],"e-rtl")},i.prototype.setEnable=function(){var t=this.toolbarSettings.items.length?this.list.parentElement:this.list;this.enabled?(0,s.vy)([t],ce.oF.disabled):(0,s.iQ)([t],ce.oF.disabled)},i.prototype.showSpinner=function(){this.spinner||(this.spinner=this.createElement("div",{className:"e-listbox-wrapper"})),this.spinner.style.height=(0,s.IV)(this.height),this.element.parentElement&&this.element.parentElement.insertBefore(this.spinner,this.element.nextSibling),(0,ae.GF)({target:this.spinner},this.createElement),(0,ae.xc)(this.spinner)},i.prototype.hideSpinner=function(){this.spinner.querySelector(".e-spinner-pane")&&(0,ae.W$)(this.spinner),this.spinner.parentElement&&(0,s.Yo)(this.spinner)},i.prototype.onInput=function(){this.isDataSourceUpdate=!1,this.isValidKey=!!this.keyDownStatus,this.keyDownStatus=!1,this.refreshClearIcon()},i.prototype.clearText=function(){this.filterInput.value="",this.refreshClearIcon();var t=document.createEvent("KeyboardEvent");this.isValidKey=!0,this.KeyUp(t)},i.prototype.refreshClearIcon=function(){this.filterInput.parentElement.querySelector("."+Zo.clearIcon)&&(this.filterInput.parentElement.querySelector("."+Zo.clearIcon).style.visibility=""===this.filterInput.value?"hidden":"visible")},i.prototype.onActionComplete=function(t,n,r){var l,h,d,o=this;if(this.allowFiltering&&this.list.getElementsByClassName("e-filter-parent")[0]&&(l=this.list.getElementsByClassName("e-filter-parent")[0].cloneNode(!0)),0===n.length){var p=t.childNodes[0];p&&t.removeChild(p)}if(this.allowFiltering&&(h=this.list.getElementsByClassName("e-input-filter")[0])&&(d=h.selectionStart),a.prototype.onActionComplete.call(this,t,n,r),this.allowFiltering&&!(0,s.hX)(l)){this.list.insertBefore(l,this.list.firstElementChild),this.filterParent=this.list.getElementsByClassName("e-filter-parent")[0],this.filterWireEvents(l);var u=l.querySelector(".e-input-filter");u&&(u.addEventListener("focus",function(){l.childNodes[0].classList.contains("e-input-focus")||l.childNodes[0].classList.add("e-input-focus")}),u.addEventListener("blur",function(){l.childNodes[0].classList.contains("e-input-focus")&&l.childNodes[0].classList.remove("e-input-focus")}))}if(this.initWrapper(),this.setSelection(this.value,!0,!1,!this.isRendered),this.initDraggable(),this.mainList=this.ulElement,this.initLoad)this.jsonData=[],(0,s.X$)(this.jsonData,n,[]),this.initToolbarAndStyles(),this.wireEvents(),this.showCheckbox&&this.setCheckboxPosition(),this.allowFiltering&&this.setFiltering();else if(this.isDataSourceUpdate&&(this.jsonData=[],(0,s.X$)(this.jsonData,n,[]),this.isDataSourceUpdate=!1),this.allowFiltering){if(h=this.list.getElementsByClassName("e-input-filter")[0],(0,s.hX)(h))return;h.selectionStart=d,h.selectionEnd=d,(""!==h.value||""===h.value&&this.isBackSpace)&&(h.focus(),setTimeout(function(){o.isBackSpace=!1}))}if(this.toolbarSettings.items.length&&this.scope&&this.scope.indexOf("#")>-1&&!(0,s.hX)(r)){var f=this.scope.replace("#","");(0,s.QQ)(document.getElementById(f),this.getModuleName()).initToolbar()}this.initLoad=!1},i.prototype.initToolbarAndStyles=function(){this.initToolbar(),this.setCssClass(),this.setEnable(),this.setHeight()},i.prototype.triggerDragStart=function(t){var r,n=this,o=(0,s.X$)(this.getDragArg
1s(t),{dragSelected:!0},{cancel:!1});s.Pw.isIos&&(this.list.style.overflow="hidden"),this.trigger("dragStart",o,function(l){n.allowDragAll=l.dragSelected,n.allowDragAll||(r=n.ulElement.getElementsByClassName("e-list-badge")[0])&&(0,s.Yo)(r),l.cancel&&(t.cancel=!0)})},i.prototype.triggerDrag=function(t){var r,o,n=this,h=10;if(this.itemTemplate&&t.target)if(t.target&&t.target.closest(".e-list-item"))h=t.target.closest(".e-list-item").scrollHeight;else{var d=t.element.querySelector(".e-list-item");d&&(h=d.scrollHeight)}var u,p=t.event;this.stopTimer(),t.target&&(t.target.classList.contains("e-listbox-wrapper")||t.target.classList.contains("e-list-item")||t.target.classList.contains("e-filter-parent")||t.target.classList.contains("e-input-group")||t.target.closest(".e-list-item"))&&(u=t.target.classList.contains("e-list-item")||t.target.classList.contains("e-filter-parent")||t.target.classList.contains("e-input-group")||t.target.closest(".e-list-item")?t.target.closest(".e-listbox-wrapper"):t.target,(r=this.allowFiltering?u.querySelector(".e-list-parent"):u)&&((o=r.getBoundingClientRect()).y+r.offsetHeight-(p.clientY+36)<1?this.timer=window.setInterval(function(){n.setScrollDown(r,h,!0)},70):p.clientY-36-o.y<1&&(this.timer=window.setInterval(function(){n.setScrollDown(r,h,!1)},70)))),null!==t.target&&this.trigger("drag",this.getDragArgs(t))},i.prototype.setScrollDown=function(t,n,r){t.scrollTop=r?t.scrollTop+n:t.scrollTop-n},i.prototype.stopTimer=function(){window.clearInterval(this.timer)},i.prototype.beforeDragEnd=function(t){this.stopTimer();var n=[];this.dragValue=this.getFormattedValue(t.droppedElement.getAttribute("data-value")),t.items=this.value.indexOf(this.dragValue)>-1?this.getDataByValues(this.value):this.getDataByValues([this.dragValue]),(0,s.X$)(n,t.items),this.trigger("beforeDrop",t),JSON.stringify(t.items)!==JSON.stringify(n)&&(this.customDraggedItem=t.items)},i.prototype.dragEnd=function(t){var r,o,l,h,d,p,n=this,u=this.getFormattedValue(t.droppedElement.getAttribute("data-value")),f=this.getComponent(t.droppedElement),m=this.getDragArgs({target:t.droppedElement},!0),g={previousData:this.dataSource},v={previousData:f.dataSource},b=(0,s.X$)({},m,{target:t.target,source:{previousData:this.dataSource},previousIndex:t.previousIndex,currentIndex:t.currentIndex});if(f!==this){var y=(0,s.X$)(g,{currentData:this.listData});b=(0,s.X$)(b,{source:y,destination:v})}s.Pw.isIos&&(this.list.style.overflow="");var S=this.getComponent(t.target);if(S&&0===S.listData.length){var E=S.ulElement.childNodes[0];E&&S.ulElement.removeChild(E)}if(f===this){var _=this.ulElement;r=[].slice.call(this.listData),o=[].slice.call(this.liCollections),l=[].slice.call(this.jsonData),p=[].slice.call(this.sortedData);var T=t.currentIndex,I=t.currentIndex=this.getCurIdx(this,t.currentIndex),w=r.indexOf(this.getDataByValue(u)),A=l.indexOf(this.getDataByValue(u)),M=p.indexOf(this.getDataByValue(u));r.splice(I,0,r.splice(w,1)[0]),p.splice(T,0,p.splice(M,1)[0]),l.splice(I,0,l.splice(A,1)[0]),o.splice(I,0,o.splice(w,1)[0]),this.allowDragAll&&(d=this.value&&Array.prototype.indexOf.call(this.value,u)>-1?this.value:[u],(0,s.hX)(this.customDraggedItem)||(d=[],this.customDraggedItem.forEach(function(de){d.push((0,s._W)(n.fields.value,de))})),d.forEach(function(de){if(de!==u){var At=r.indexOf(n.getDataByValue(de)),_t=l.indexOf(n.getDataByValue(de)),ut=p.indexOf(n.getDataByValue(de));At>I&&I++,l.splice(I,0,l.splice(_t,1)[0]),r.splice(I,0,r.splice(At,1)[0]),p.splice(T,0,p.splice(ut,1)[0]),o.splice(I,0,o.splice(At,1)[0]),_.insertBefore(n.getItems()[n.getIndexByValue(de)],_.getElementsByClassName("e-placeholder")[0])}})),this.listData=r,this.jsonData=l,this.sortedData=p,this.liCollections=o}else{var D,L=[].slice.call(this.liCollections),V=t.currentIndex=this.getCurIdx(f,t.currentIndex),G=f.ulElement;r=[].slice.call(f.listData),o=[].slice.call(f.liCollections),l=[].slice.call(f.jsonData),p=[].slice.call(f.sortedData),d=this.value&&Array.prototype.indexOf.call(this.value,u)>-1&&this.allowDragAll?this.value:[u],(0,s.hX)(this.customDraggedItem)||(d=[],this.customDraggedItem.forEach(function(de){d.push((0,s._W)(n.fields.value,de))}));var W=[].slice.call(this.listData),te=[].slice.call(this.sortedData);
1if(d.forEach(function(de){h=n.getDataByValue(de);var At=n.listData.indexOf(h),_t=n.jsonData.indexOf(h),ut=n.sortedData.indexOf(h);W.splice(At,1),n.jsonData.splice(_t,1),te.splice(ut,1),n.listData=W,n.sortedData=te;var Vt=de===u?t.currentIndex:V;if(r.splice(Vt,0,h),l.splice(Vt,0,h),p.splice(Vt,0,h),o.splice(Vt,0,L.splice(At,1)[0]),de)D=n.getItems()[n.getIndexByValue(de)];else for(var gi=n.getItems(),li=0;li<gi.length;li++)if(null===gi[li].getAttribute("data-value")&&gi[li].classList.contains("e-list-item")){D=gi[li];break}D||(D=t.helper),n.removeSelected(n,de===u?[t.droppedElement]:[D]),G.insertBefore(D,G.getElementsByClassName("e-placeholder")[0]),V++}),this.fields.groupBy){var $=this.renderItems(this.listData,this.fields);this.updateListItems($,this.ulElement),this.setSelection()}if("None"!==f.sortOrder||this.selectionSettings.showCheckbox!==f.selectionSettings.showCheckbox||f.fields.groupBy||f.itemTemplate||this.itemTemplate){var Se=(0,s.QQ)(G,"sortable");$=f.renderItems(r,f.fields),f.updateListItems($,G),this.setSelection(),Se.placeHolderElement&&G.appendChild(Se.placeHolderElement),G.appendChild(t.helper),f.setSelection()}this.liCollections=L,f.liCollections=o,f.jsonData=(0,s.X$)([],[],l,!1),f.listData=(0,s.X$)([],[],r,!1),"None"===f.sortOrder&&(f.sortedData=(0,s.X$)([],[],p,!1)),0===this.listData.length&&this.l10nUpdate()}if(this===f)y=(0,s.X$)(g,{currentData:r}),b=(0,s.X$)(b,{source:y});else{var Ie=(0,s.X$)(v,{currentData:r});b=(0,s.X$)(b,{destination:Ie})}(0,s.hX)(this.customDraggedItem)||(b.items=this.customDraggedItem),this.trigger("drop",b);var Re=b.elements;if(Re.length)for(var Ne=0;Ne<Re.length;Ne++)Re[Ne].classList.remove("e-grabbed");this.toolbarSettings.items.length>0?this.updateToolBarState():this.tBListBox&&this.tBListBox.toolbarSettings.items.length>0&&this.tBListBox.updateToolBarState()},i.prototype.updateListItems=function(t,n){n.innerHTML="",n.append.apply(n,t.childNodes)},i.prototype.removeSelected=function(t,n){t.selectionSettings.showCheckbox?n.forEach(function(r){r.getElementsByClassName("e-frame")[0].classList.remove("e-check")}):(0,s.vy)(n,ce.oF.selected)},i.prototype.getCurIdx=function(t,n){return t.fields.groupBy&&(n-=[].slice.call(t.ulElement.children).slice(0,n).filter(function(r){return r.classList.contains(ce.oF.group)}).length),n},i.prototype.getComponent=function(t){var n,r="EJS-LISTBOX"===this.element.tagName?(0,s.kp)(t,".e-listbox"):(0,s.kp)(t,".e-listbox-wrapper")&&(0,s.kp)(t,".e-listbox-wrapper").querySelector(".e-listbox");return r&&(n=(0,s.QQ)(r,this.getModuleName())),n},i.prototype.setEnabled=function(){this.element.setAttribute("aria-disabled",this.enabled?"false":"true")},i.prototype.listOption=function(t,n){return this.listCurrentOptions=a.prototype.listOption.call(this,t,n),this.listCurrentOptions=(0,s.X$)({},this.listCurrentOptions,{itemCreated:this.triggerBeforeItemRender.bind(this)},!0),this.notify("listoption",{module:"CheckBoxSelection"}),this.listCurrentOptions},i.prototype.triggerBeforeItemRender=function(t){t.item.setAttribute("tabindex","-1"),this.trigger("beforeItemRender",{element:t.item,item:t.curData})},i.prototype.requiredModules=function(){var t=[];return this.selectionSettings.showCheckbox&&t.push({member:"CheckBoxSelection",args:[this]}),t},i.prototype.enableItems=function(t,n,r){var l,o=this;if(void 0===n&&(n=!0),t.forEach(function(u){(l=o.findListElement(o.list,"li","data-value",r?u:o.getValueByText(u)))&&(n?((0,s.vy)([l],ce.oF.disabled),l.removeAttribute("aria-disabled")):((0,s.iQ)([l],ce.oF.disabled),l.setAttribute("aria-disabled","true")))}),this.allowFiltering&&this.filterInput&&""!==this.filterInput.value&&this.toolbarSettings.items.length>0){var h=!1;this.ulElement.childNodes.forEach(function(u){u.classList.contains("e-disabled")||(h=!0)}),h||(this.list.parentElement.getElementsByClassName("e-listbox-tool")[0].querySelector('[data-value="moveAllTo"]').disabled=!0)}},i.prototype.selectItems=function(t,n,r){void 0===n&&(n=!0),n&&!this.selectionSettings.showCheckbox&&"Single"===this.selectionSettings.mode&&this.getSelectedItems().forEac
1h(function(p){p.classList.remove("e-active"),p.removeAttribute("aria-selected"),(0,s.vy)([p],ce.oF.selected)}),this.setSelection(t,n,!r),this.updateSelectedOptions();for(var o=[],l=0;l<t.length;l++)for(var h=this.list.querySelectorAll('[aria-selected="true"]'),d=0;d<h.length;d++)t[l]===this.getFormattedValue(h[d].getAttribute("data-value"))&&o.push(h[d]);this.triggerChange(o,null)},i.prototype.selectAll=function(t){void 0===t&&(t=!0),this.selectAllItems(t)},i.prototype.addItems=function(t,n){a.prototype.addItem.call(this,t,n),this.allowFiltering&&""!==this.filterInput.value&&this.filteringAction(this.jsonData,new x.XK,this.fields)},i.prototype.removeItems=function(t,n){this.removeItem(t,n)},i.prototype.removeItem=function(t,n){var r=this,o=[],l=this.list.querySelectorAll("."+P_li);if(t){t=t instanceof Array?t:[t];var h=this.fields,d=void 0,p={},u=[];(0,s.X$)(u,[],this.jsonData);for(var f=[],m=[],g=0;g<u.length;g++)p[u[g]instanceof Object?u[g][h.value]:u[g].toString()]=g;for(var b=0;b<t.length;b++)if(d=t[b]instanceof Object?t[b][h.value]:t[b].toString(),Object.prototype.hasOwnProperty.call(p,d)){var y=p[d];o.push(l[y]),f.push(y),m.push(y)}f.sort(function(_,T){return T-_}).forEach(function(_){r.listData.splice(_,1),r.jsonData.splice(_,1)});for(var E=m.length-1;E>=0;E--)this.updateLiCollection(m[E])}else o.push(l[n=n||0]),this.listData.splice(n,1),this.jsonData.splice(n,1),this.updateLiCollection(n);for(g=0;g<o.length;g++)this.ulElement.removeChild(o[g]);0===this.listData.length&&this.l10nUpdate(),this.listData.length!==this.sortedData.length&&(this.sortedData=this.listData),this.value=[],this.updateToolBarState()},i.prototype.getDataByValues=function(t){for(var n=[],r=0;r<t.length;r++)n.push(this.getDataByValue(t[r]));return n},i.prototype.moveUp=function(t){var n=t?this.getElemByValue(t):this.getSelectedItems();this.moveUpDown(!0,!1,n)},i.prototype.moveDown=function(t){var n=t?this.getElemByValue(t):this.getSelectedItems();this.moveUpDown(!1,!1,n)},i.prototype.moveTop=function(t){var n=t?this.getElemByValue(t):this.getSelectedItems();this.moveUpDown(null,!1,n,!0)},i.prototype.moveBottom=function(t){var n=t?this.getElemByValue(t):this.getSelectedItems();this.moveUpDown(!0,!1,n,!1,!0)},i.prototype.moveTo=function(t,n,r){var o=t?this.getElemByValue(t):this.getSelectedItems(),l=r?(0,s.QQ)(r,e):this.getScopedListBox();this.moveData(this,l,!1,o,n)},i.prototype.moveAllTo=function(t,n){if(this.toolbarAction="moveAllTo",this.listData.length>0){var r=t?(0,s.QQ)(t,e):this.getScopedListBox();this.moveAllData(this,r,!1,n)}},i.prototype.getDataList=function(){return this.jsonData},i.prototype.getSortedList=function(){var t,n;if(t=n=this.sortedData,this.fields.groupBy){t=[];for(var r=0;r<n.length;r++)n[r].isHeader||t.push(n[r])}return t},i.prototype.getElemByValue=function(t){for(var n=[],r=0;r<t.length;r++)n.push(this.ulElement.querySelector('[data-value ="'+t[r]+'"]'));return n},i.prototype.updateLiCollection=function(t){var n=[].slice.call(this.liCollections);n.splice(t,1),this.liCollections=n},i.prototype.selectAllItems=function(t,n){var r=this;if([].slice.call(this.getItems()).forEach(function(f){if(!f.classList.contains(ce.oF.disabled))if(r.selectionSettings.showCheckbox){var m=f.getElementsByClassName("e-check")[0];(!m&&t||m&&!t)&&(r.notify("updatelist",{li:f,module:"listbox"}),r.maximumSelectionLength>=r.list.querySelectorAll(".e-list-item span.e-check").length&&r.checkMaxSelection())}else t?f.classList.add(ce.oF.selected):f.classList.remove(ce.oF.selected)}),this.updateSelectedOptions(),this.allowFiltering&&this.selectionSettings.showCheckbox){var o=this.list.getElementsByTagName("li"),l=0;if(t){var h=function(){var f=d.getFormattedValue(o[l].getAttribute("data-value"));d.value.some(function(m){return m===f})||d.value.push(d.getFormattedValue(o[l].getAttribute("data-value")))},d=this;for(l=0;l<o.length;l++)h()}else{var p=function(){var f=u.getFormattedValue(o[l].getAttribute("data-value"));u.value=u.value.filter(function(m){return m!==f})},u=this;for(l=0;l<o.length;l++)p()}document.querySelectorAll("ul").length<2&&this.updateMainList()}this.triggerChange(this.getSelectedItems(),n)},i.prototype.updateMainList=function(){var t=this.mainList.querySelectorAll(".e-list-item"),n=this.ulElement.querySelectorAll(".e-list-item"),r=t.length,o=n.length;if(this.selectionSettings.showCheckbox||document.querySelectorAll("ul").length>1||r!==o)for(var l=0,h=0,d=0;l<r;){if(this.value)for(;h<this.value.length;h++)t[l].getAttribute("data-value")===this.value[h]&&d++;!d&&this.selectionSettings.showCheckbox&&t[l].getElementsByClassName("e-frame")[0].classList.remove("e-check"),document.querySelectorAll("ul").length>1&&d&&r!==o?(this.mainList.removeChild(this.mainList.getElementsByTagName("li")[l]),l=0):l++,d=0,h=0}},i.prototype.wireEvents=function(){var t=(0,s.kp)(this.element,"form"),n="EJS-LISTBOX"===this.element.tagName?this.element:this.list;s.Jm.add(this.list,"click",this.clickHandler,this),s.Jm.add(n,"keydown",this.keyDownHandler,this),s.Jm.add(n,"focusout",this.focusOutHandler,this),this.wireToolbarEvent(),this.selectionSettings.showCheckbox&&s.Jm.remove(document,"mousedown",this.checkBoxSelectionModule.onDocumentClick),(this.fields.groupBy||this.element.querySelector("select>optgroup"))&&s.Jm.remove(this.list,"scroll",this.setFloatingHeader),t&&s.Jm.add(t,"reset",this.formResetHandler,this),window.addEventListener("resize",this.resizeHandler.bind(this))},i.prototype.wireToolbarEvent=function(){this.toolbarSettings.items.length&&s.Jm.add(this.getToolElem(),"click",this.toolbarClickHandler,this)},i.prototype.unwireEvents=function(){var t=(0,s.kp)(this.element,"form"),n="EJS-LISTBOX"===this.element.tagName?this.element:this.list;s.Jm.remove(this.list,"click",this.clickHandler),s.Jm.remove(n,"keydown",this.keyDownHandler),s.Jm.remove(n,"focu
1sout",this.focusOutHandler),this.allowFiltering&&this.clearFilterIconElem&&s.Jm.remove(this.clearFilterIconElem,"click",this.clearText),this.toolbarSettings.items.length&&s.Jm.remove(this.getToolElem(),"click",this.toolbarClickHandler),t&&s.Jm.remove(t,"reset",this.formResetHandler),window.removeEventListener("resize",this.resizeHandler.bind(this))},i.prototype.clickHandler=function(t){var n=(0,s.kp)(t.target,".e-list-item");(0,s.hX)(n)||this.selectHandler(t)},i.prototype.checkSelectAll=function(){for(var t=0,n=this.list.querySelectorAll("li."+P_li),r=0;r<n.length;r++)n[r].classList.contains("e-disabled")||t++;var o=this.getSelectedItems().length;this.showSelectAll&&t&&this.notify("checkSelectAll",{module:"CheckBoxSelection",value:t===o?"check":0===o?"uncheck":"indeterminate"})},i.prototype.getQuery=function(t){var n=t?t.clone():this.query?this.query.clone():new x.XK;if(this.allowFiltering){var r=""===this.inputString?"contains":this.filterType,o=this.typeOfData(this.dataSource).typeof;null===o&&(o=this.typeOfData(this.jsonData).typeof),n.where((this.dataSource instanceof x.M1||"string"!==o)&&"number"!==o&&this.fields.text?this.fields.text:"",r,this.inputString,this.ignoreCase,this.ignoreAccent)}else n=t||(this.query?this.query:new x.XK);return n},i.prototype.setFiltering=function(){var t;if(this.initLoad||(0,s.hX)(this.filterParent))return this.filterParent=this.createElement("span",{className:Zo.filterParent}),this.filterInput=this.createElement("input",{attrs:{type:"text"},className:Zo.filterInput}),this.element.parentNode.insertBefore(this.filterInput,this.element),t=J.pd.createInput({element:this.filterInput,buttons:[Zo.filterBarClearIcon],properties:{placeholder:this.filterBarPlaceholder}},this.createElement),(0,s.BC)([t.container],this.filterParent),(0,s.Hs)([this.filterParent],this.list),(0,s.uK)(this.filterInput,{"aria-disabled":"false","aria-label":"search list item",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox"}),this.height.toString().indexOf("%")<0?(0,s.iQ)([this.list],"e-filter-list"):this.height.toString().indexOf("%")>0&&(this.ulElement.style.height=this.ulElement.offsetHeight-this.filterParent.offsetHeight+"px"),this.inputString=this.filterInput.value,this.filterWireEvents(),t},i.prototype.filterWireEvents=function(t){t&&(this.filterInput=t.querySelector(".e-input-filter")),this.clearFilterIconElem=this.filterInput.parentElement.querySelector("."+Zo.clearIcon),this.clearFilterIconElem&&(s.Jm.add(this.clearFilterIconElem,"click",this.clearText,this),t||(this.clearFilterIconElem.style.visibility="hidden")),s.Jm.add(this.filterInput,"input",this.onInput,this),s.Jm.add(this.filterInput,"keyup",this.KeyUp,this),s.Jm.add(this.filterInput,"keydown",this.onKeyDown,this)},i.prototype.selectHandler=function(t,n){var o,r=!0,l=(0,s.kp)(t.target,".e-list-item"),h=[l];if(l&&l.parentElement){if(o=[].slice.call(l.parentElement.children).indexOf(l),this.selectionSettings.showCheckbox?r=!l.getElementsByClassName("e-frame")[0].classList.contains("e-check"):(t.ctrlKey||t.metaKey||s.Pw.isDevice)&&this.isSelected(l)?(l.classList.remove(ce.oF.selected),l.removeAttribute("aria-selected"),r=!1):"Multiple"===this.selectionSettings.mode&&(t.ctrlKey||t.metaKey||s.Pw.isDevice)||(this.getSelectedItems().forEac
1h(function(u){u.removeAttribute("aria-selected")}),(0,s.vy)(this.getSelectedItems(),ce.oF.selected)),t.shiftKey&&!this.selectionSettings.showCheckbox&&"Single"!==this.selectionSettings.mode?h=[].slice.call(l.parentElement.children).slice(Math.min(o,this.prevSelIdx),Math.max(o,this.prevSelIdx)+1).filter(function(u){return u.classList.contains("e-list-item")}):this.prevSelIdx=[].slice.call(l.parentElement.children).indexOf(l),r?(this.selectionSettings.showCheckbox||(0,s.iQ)(h,ce.oF.selected),h.forEach(function(u){u.setAttribute("aria-selected","true")}),this.list.setAttribute("aria-activedescendant",l.id)):h.forEach(function(u){u.setAttribute("aria-selected","false")}),!n&&(this.maximumSelectionLength>(this.value&&this.value.length)||!r)&&(this.maximumSelectionLength>=(this.value&&this.value.length)||!r)&&!(this.maximumSelectionLength<(this.value&&this.value.length))&&this.notify("updatelist",{li:l,e:t,module:"listbox"}),this.allowFiltering&&!n){var d=this.getFormattedValue(l.getAttribute("data-value"));if(r){var p=[];(0,s.X$)(p,this.value),p.push(d),this.value=p}else this.value=this.value.filter(function(u){return u!==d});document.querySelectorAll("ul").length<2&&this.updateMainList()}this.updateSelectedOptions(),this.triggerChange(this.getSelectedItems(),t),this.list&&this.checkMaxSelection()}},i.prototype.triggerChange=function(t,n){this.trigger("change",{elements:t,items:this.getDataByElements(t),value:this.value,event:n})},i.prototype.getDataByElems=function(t){for(var n=[],r=t.length,o=0;o<r;o++){var h=t[o].getAttribute("data-value"),d=this.getFormattedValue(h);n.push(this.getDataByValue(d))}return n},i.prototype.getDataByElements=function(t){var r,n=[],o=0;if(!(0,s.hX)(this.listData)){var l=this.typeOfData(this.listData).typeof;if("string"===l||"number"===l||"boolean"===l)for(var h=0,d=this.listData;h<d.length;h++){for(var p=d[h],u=o,f=t.length;u<f;u++)if(r=this.getFormattedValue(t[u].getAttribute("data-value")),!(0,s.hX)(p)&&p===r){o=u,n.push(p);break}if(t.length===n.length)break}else for(var m=0,g=this.listData;m<g.length;m++){for(p=g[m],u=o,f=t.length;u<f;u++)if(r=this.getFormattedValue(t[u].getAttribute("data-value")),!(0,s.hX)(p)&&(0,s._W)(this.fields.value?this.fields.value:"value",p)===r){o=u,n.push(p);break}if(t.length===n.length)break}return n}return null},i.prototype.checkMaxSelection=function(){var t=this.list.querySelectorAll(".e-list-item span.e-check").length;if(this.selectionSettings.showCheckbox)for(var n=0,r=this.list.getElementsByClassName("e-list-item");n<r.length;n++)r[n].querySelector(".e-frame.e-check")||(t===this.maximumSelectionLength?r[n].classList.add("e-disable"):r[n].classList.contains("e-disable")&&r[n].classList.remove("e-disable"))},i.prototype.toolbarClickHandler=function(t){var n=(0,s.kp)(t.target,"button");if(n){if(this.toolbarAction=n.getAttribute("data-value"),n.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})}}},i.prototype.moveUpDown=function(t,n,r,o,l){var h=this,d=this.getSelectedItems();if(r&&(d=r),!(t&&this.isSelected(this.ulElement.firstElementChild)||!t&&this.isSelected(this.ulElement.lastElementChild))||r){var p=this.getDataByElems(d),u={cancel:!1,items:p,eventName:this.toolbarAction};this.trigger("actionBegin",u),!u.cancel&&((t?d:d.reverse()).forEach(function(f){var m=Array.prototype.indexOf.call(h.ulElement.querySelectorAll(".e-list-item"),f),g=Array.prototype.indexOf.call(h.ulElement.children,f);o?((0,ce.tw)(h.ulElement,h.ulElement,[g],0),h.changeData(g,0,m,f)):l?((0,ce.tw)(h.ulElement,h.ulElement,[g],h.ulElement.querySelectorAll(".e-list-item").length),h.changeData(g,h.ulElement.querySelectorAll(".e-list-item").length,m,f)):((0,ce.tw)(h.ulElement,h.ulElement,[g],t?g-1:g+2),h.changeData(g,t?g-1:g+1,t?m-1:m+1,f))}),this.trigger("actionComplete",{items:p,eventName:this.toolbarAction}),d[0].focus(),!n&&this.toolbarSettings.items.length&&this.getToolElem().querySelector("[data-value="+(t?"moveUp":"moveDown")+"]").focus(),this.updateToolBarState())}}
1,i.prototype.moveItemTo=function(){this.moveData(this,this.getScopedListBox())},i.prototype.moveItemFrom=function(){this.moveData(this.getScopedListBox(),this)},i.prototype.moveData=function(t,n,r,o,l){var h=[],d=[],p=[],u=[],f=[].slice.call(t.listData),m=[].slice.call(n.listData),g=[].slice.call(t.sortedData),v=[].slice.call(n.sortedData),b=[].slice.call(t.liCollections),y=[],S=[].slice.call(n.liCollections),E=[],_=[],T=t.getSelectedItems();o&&(T=o);var I="None"!==n.sortOrder||n.selectionSettings.showCheckbox!==t.selectionSettings.showCheckbox||n.fields.groupBy||n.itemTemplate||t.itemTemplate;if(t.value=[],T.length){this.removeSelected(t,T);var V,w=Array.prototype.slice.call(t.ulElement.children),A=Array.prototype.slice.call(t.ulElement.querySelectorAll(".e-list-item")),M=t.listData,D=t.sortedData,L=t.jsonData,G={};if(T.length>199)for(var W=0,te=t.listData;W<te.length;W++){var $=te[W];if(!(0,s.hX)($)){var Se=t.getFormattedValue((0,s._W)(t.fields.value?t.fields.value:"value",$));G[Se]=$}}T.forEach(function(Be){if(T.length<200)V=t.getDataByElems([Be])[0];else{var Kt=Be.getAttribute("data-value"),Ns=t.getFormattedValue(Kt);V=G[Ns]}h.push(w.indexOf(Be)),y.push(A.indexOf(Be)),d.push(M.indexOf(V)),u.push(D.indexOf(V)),p.push(L.indexOf(V))}),"None"!==this.sortOrder?u.forEach(function(Be){E.push(t.sortedData[Be])}):p.forEach(function(Be){E.push(t.jsonData[Be])});var Ie={cancel:!1,items:E,eventName:this.toolbarAction};if(t.trigger("actionBegin",Ie),Ie.cancel)return;var Re=[];if(y.sort(function(Be,Kt){return Be-Kt}).reverse().forEach(function(Be){Re.push(b.splice(Be,1)[0])}),t.liCollections=b,l){var Ne=S.splice(0,l);n.liCollections=Ne.concat(Re.reverse()).concat(S)}else n.liCollections=S.concat(Re.reverse());if(0===n.listData.length){var de=n.ulElement.childNodes[0];de&&n.ulElement.removeChild(de)}if(d.sort(function(Be,Kt){return Kt-Be}).forEach(function(Be){f.splice(Be,1)}),u.sort(function(Be,Kt){return Kt-Be}).forEach(function(Be){g.splice(Be,1)}),p.slice().reverse().forEach(function(Be){_.push(t.jsonData.splice(Be,1)[0])}),I)if(t.fields.groupBy){var At=t.renderItems(f,t.fields);t.updateListItems(At,t.ulElement)}else T.forEach(function(Be){(0,s.Yo)(Be)});else(0,ce.tw)(t.ulElement,n.ulElement,h,l),t.trigger("actionComplete",{items:E,eventName:this.toolbarAction});n.mainList.childElementCount!==n.jsonData.length&&(n.mainList=n.ulElement);var _t=[].slice.call(n.jsonData);v=[].slice.call(n.sortedData),this.selectNextList(T,y,d,t),r&&this.list.focus(),t.listData=f,t.sortedData=g,l=l||m.length;for(var ut=E.length-1;ut>=0;ut--)m.splice(l,0,E[ut]),_t.splice(l,0,E[ut]),v.splice(l,0,E[ut]);n.listData=m,n.jsonData=_t,n.sortedData=v,I&&(At=n.renderItems(m,n.fields),n.updateListItems(At,n.ulElement),n.setSelection(),t.trigger("actionComplete",{items:E,eventName:this.toolbarAction})),t.updateSelectedOptions(),0===t.listData.length&&t.l10nUpdate()}if(1===t.value.length&&t.getSelectedItems().length&&(t.value[0]=t.getFormattedValue(t.getSelectedItems()[0].getAttribute("data-value"))),t.liCollections.length===t.ulElement.querySelectorAll(".e-disabled").length&&this.toolbarAction){var Vt=this.list.parentElement.getElementsByClassName("e-listbox-tool")[0];Vt&&(Vt.querySelector('[data-value="'+("moveFrom"===this.toolbarAction?"moveAllFrom":"moveAllTo")+'"]').disabled=!0)}},i.prototype.selectNextList=function(t,n,r,o){var h,d,l=o.ulElement.querySelectorAll(".e-list-item").length,p=-1;1===t.length&&l&&!o.selectionSettings.showCheckbox&&(d=l<=n[0]?l-1:n[0],h=o.ulElement.querySelectorAll(".e-list-item")[d],(p=o.getValidIndex(h,d,l===r[0]?38:40))>-1&&o.ulElement.querySelectorAll(".e-list-item")[p].classList.add(ce.oF.selected))},i.prototype.moveAllItemTo=function(){this.moveAllData(this,this.getScopedListBox())},i.prototype.moveAllItemFrom=function(){this.moveAllData(this.getScopedListBox(),this)},i.prototype.moveAllData=function(t,n,r,o){var l=[].slice.call(n.listData),h=[].slice.call(n.jsonData),d="None"!==n.sortOrder||n.selectionSettings.showCheckbox!==t.selectionSettings.showCheckbox||n.fields.groupBy||n.itemTemplate||t.itemTemplate,p=[],u=[],f=[];this.removeSelected(t,t.getSelectedItems());var m=[].slice.call(t.listData),g={cancel:!1,items:m,eventName:this.toolbarAction};if(t.trigger("actionBegin",g),!g.cancel){if(0===n.listData.length){var v=n.ulElement.childNodes[0];v&&n.ulElement.removeChild(v)}t.listData.length>0&&(f=Array.apply(null,{length:t.ulElement.childElementCount}).map(Number.call,Number));for(var b=t.ulElement.childNodes,y=t.ulElement.childElementCount,S=[],E=0;E<y;E++){var _=b[E];_.classList.contains("e-disabled")?(p.push(_),u.push(null!=this.sortOrder?t.sortedData[E]:t.listData[E])):S.push(E)}for((0,ce.tw)(t.ulElement,n.ulElement,f=S,o),t.trigger("actionComplete",{items:m,eventName:this.toolbarAction}),r&&this.list.focus(),o=o||l.length,E=0;E<f.length;E++)l.splice(o+E,0,null!=this.sortOrder?t.sortedData[f[E]]:t.listData[f[E]]);for(E=0;E<f.length;E++)h.splice(o+E,0,t.jsonData[f[E]]);var T=[];p.length>0?(t.liCollections=p,T=[].slice.call(t.liCollections)):(T=[].slice.call(t.liCollections),t.liCollections=[]);var I=[].slice.call(n.liCollections);if(o){var w=I.splice(0,o);
1n.liCollections=w.concat(T).concat(I)}else n.liCollections=I.concat(T);t.value=[];var A=(l=(l=l.filter(function(W){return void 0!==W})).filter(function(W){return!0!==W.isHeader})).filter(function(W){return-1===n.jsonData.indexOf(W)});for(E=0;E<A.length;E++)n.jsonData.splice(o+E,0,A[E]);if(n.listData=l,t.listData.length===t.jsonData.length)t.listData=t.sortedData=t.jsonData=u;else if(t.allowFiltering){var M=[];if(p.length>0){for(E=0;E<p.length;E++)M.push(t.getDataByValue(p[E].getAttribute("data-value")));t.listData=t.listData.filter(function(W){return!M.some(function(te){return W===te})})}for(E=0;E<t.listData.length;E++)for(var D=0;D<t.jsonData.length;D++)t.listData[E]===t.jsonData[D]&&t.jsonData.splice(D,1);p.length>0?(t.listData=M,t.sortedData=[]):t.listData=t.sortedData=[]}if(d){var L=n.renderItems(l,n.fields);n.updateListItems(L,n.ulElement)}else n.sortedData=l;t.updateSelectedOptions(),p.length>0&&(this.list.parentElement.getElementsByClassName("e-listbox-tool")[0].querySelector('[data-value="'+this.toolbarAction+'"]').disabled=!0),0===t.listData.length&&0===p.length&&t.l10nUpdate()}},i.prototype.changeData=function(t,n,r,o){var l=[].slice.call(this.listData),h=[].slice.call(this.jsonData),d=[].slice.call(this.sortedData),p=Array.prototype.indexOf.call(this.jsonData,this.getDataByElems([o])[0]),u=Array.prototype.indexOf.call(this.sortedData,this.getDataByElems([o])[0]),f=[].slice.call(this.liCollections);l.splice(n,0,l.splice(t,1)[0]),h.splice(r,0,h.splice(p,1)[0]),d.splice(n,0,d.splice(u,1)[0]),f.splice(n,0,f.splice(t,1)[0]),this.listData=l,this.jsonData=h,this.liCollections=f,this.sortedData=d},i.prototype.getSelectedItems=function(){var t=[];return this.selectionSettings.showCheckbox?[].slice.call(this.ulElement.getElementsByClassName("e-check")).forEach(function(n){t.push((0,s.kp)(n,".e-list-item"))}):t=[].slice.call(this.ulElement.getElementsByClassName(ce.oF.selected)),t},i.prototype.getScopedListBox=function(){var n,t=this;return this.scope&&[].slice.call(document.querySelectorAll(this.scope)).forEach(function(r){(0,s.QQ)(r,t.getModuleName())&&(n=(0,s.QQ)(r,t.getModuleName()))}),n},i.prototype.getGrabbedItems=function(t){for(var n=!1,r=0;r<this.value.length;r++)if(this.value[r]===this.getFormattedValue(t.target.getAttribute("data-value"))){n=!0;break}if(n)for(r=0;r<this.value.length;r++)for(var o=this.list.querySelectorAll('[aria-selected="true"]'),l=0;l<o.length;l++)this.value[r]===this.getFormattedValue(o[l].getAttribute("data-value"))&&o[l].classList.add("e-grabbed");return Array.prototype.slice.call(this.isAngular?this.element.getElementsByClassName("e-list-parent")[0].querySelectorAll(".e-grabbed"):this.element.nextElementSibling.querySelectorAll(".e-grabbed"))},i.prototype.getDragArgs=function(t,n){var r=this.getGrabbedItems(t);return r.length?n&&r.push(t.target):r=[t.target],{elements:r,event:t.event,items:this.getDataByElems(r)}},i.prototype.onKeyDown=function(t){this.keyDownHandler(t),t.stopPropagation()},i.prototype.keyDownHandler=function(t){if([32,35,36,37,38,39,40,65].indexOf(t.keyCode)>-1&&(!this.allowFiltering||this.allowFiltering&&t.target!==this.filterInput)){if(t.target&&t.target.className.indexOf("e-edit-template")>-1)return;if(t.preventDefault(),32===t.keyCode&&this.ulElement.children.length)this.selectHandler({target:this.ulElement.getElementsByClassName("e-focused")[0],ctrlKey:t.ctrlKey,shiftKey:t.shiftKey});else if(65===t.keyCode&&t.ctrlKey&&"Multiple"===this.selectionSettings.mode)this.selectAll();else if((38===t.keyCode||40===t.keyCode)&&t.ctrlKey&&t.shiftKey)this.moveUpDown(38===t.keyCode,!0);else if(!this.toolbarSettings.items.length&&!this.tBListBox||39!==t.keyCode&&37!==t.keyCode||!t.ctrlKey)37!==t.keyCode&&39!==t.keyCode&&"KeyA"!==t.code&&this.upDownKeyHandler(t);else{var n=this.tBListBox||this.getScopedListBox();39===t.keyCode?t.shiftKey?this.moveAllData(this,n,!0):this.moveData(this,n,!0):t.shiftKey?this.moveAllData(n,this,!0):this.moveData(n,this,!0)}}else this.allowFiltering&&(40===t.keyCode||38===t.keyCode)&&this.upDownKeyHandler(t)},i.prototype.upDownKeyHandler=function(t){var n=this.ulElement,o=40===t.keyCode||36===t.keyCode?0:n.childElementCount-1,l=n.getElementsByClassName("e-focused")[0]||n.getElementsByClassName(ce.oF.selected)[0];if(l){if(35!==t.keyCode&&36!==t.keyCode&&(o=Array.prototype.indexOf.call(n.children,l),40===t.keyCode?o++:o--,o<0||o>n.childElementCount-1))return;(0,s.vy)([l],"e-focused")}var h=n.children[o];if(h){if(-1===(o=this.getValidIndex(h,o,t.keyCode)))return void(0,s.iQ)([l],"e-focused");
1if(n.children[o].focus(),n.children[o].classList.add("e-focused"),(!t.ctrlKey||!this.selectionSettings.showCheckbox&&t.shiftKey&&(36===t.keyCode||35===t.keyCode))&&this.selectHandler({target:n.children[o],ctrlKey:t.ctrlKey,shiftKey:t.shiftKey},!0),this.selectionSettings.showCheckbox&&t.ctrlKey&&t.shiftKey&&(36===t.keyCode||35===t.keyCode))for(var d=Array.prototype.indexOf.call(n.children,l),u="Home"===t.code?d:n.children.length-1,f="Home"===t.code?0:d;f<=u;f++)this.notify("updatelist",{li:n.children[f],e:{target:this.ulElement.getElementsByClassName("e-focused")[0],ctrlKey:t.ctrlKey,shiftKey:t.shiftKey},module:"listbox"})}},i.prototype.KeyUp=function(t){var n=this;if(this.allowFiltering&&t.ctrlKey&&65===t.keyCode)t.preventDefault();else{var r=String.fromCharCode(t.keyCode),o=r.match(/\w/),l=r.match(/[A-Za-z0-9\u00C0-\u024F ]/);if((!(0,s.hX)(o)||!(0,s.hX)(l))&&(this.isValidKey=!0),this.isBackSpace=8===t.keyCode,this.isValidKey=8===t.keyCode||46===t.keyCode||this.isValidKey,this.isValidKey&&(this.isValidKey=!1,this.allowFiltering)){var h={preventDefaultAction:!1,text:this.targetElement(),updateData:function(d,p,u){h.cancel||(n.isFiltered=!0,n.remoteFilterAction=!0,n.preventDefActionFilter=h.preventDefaultAction,n.dataUpdater(d,p,u),n.preventDefActionFilter=!1)},event:t,cancel:!1};this.trigger("filtering",h,function(d){n.isDataFetched=!1,!(d.cancel||""!==n.filterInput.value&&n.isFiltered)&&(n.preventDefActionFilter=!1,!d.cancel&&!n.isCustomFiltering&&!d.preventDefaultAction&&(n.inputString=n.filterInput.value,n.filteringAction(n.jsonData,new x.XK,n.fields),n.toolbarSettings.items.length>0&&n.updateToolBarState()),!n.isFiltered&&!n.isCustomFiltering&&!d.preventDefaultAction&&n.dataUpdater(n.jsonData,new x.XK,n.fields))})}}},i.prototype.filter=function(t,n,r){this.isCustomFiltering=!0,this.filteringAction(t,n,r)},i.prototype.filteringAction=function(t,n,r){this.resetList(t,r,n)},i.prototype.targetElement=function(){return this.targetInputElement=this.list.getElementsByClassName("e-input-filter")[0],(0,s.hX)(this.targetInputElement)?null:this.targetInputElement.value},i.prototype.dataUpdater=function(t,n,r){if(this.isDataFetched=!1,this.targetElement()&&""===this.targetElement().trim()){var o=this.mainList.cloneNode?this.mainList.cloneNode(!0):this.mainList;this.remoteCustomValue=!1,this.isAngular&&this.itemTemplate&&(o=this.renderItems(this.listData,r)),this.onActionComplete(o,this.jsonData),this.notify("reOrder",{module:"CheckBoxSelection",enable:this.selectionSettings.showCheckbox,e:this})}else this.resetList(t,r,n)},i.prototype.focusOutHandler=function(){var t=this.list.getElementsByClassName("e-focused")[0];t&&t.classList.remove("e-focused"),this.allowFiltering&&this.refreshClearIcon()},i.prototype.resizeHandler=function(){this.list&&!(this.cssClass&&this.cssClass.indexOf("e-horizontal-listbox")>-1)&&this.list.getElementsByClassName("e-filter-parent").length>0&&this.allowFiltering&&this.ulElement.style.setProperty("height","calc(100% - "+this.filterParent.offsetHeight+"px)","important")},i.prototype.getValidIndex=function(t,n,r){var o=this.ulElement;return(t.classList.contains("e-disabled")||t.classList.contains(ce.oF.group))&&(40===r||36===r?n++:n--),n<0||n===o.childElementCount?-1:(((t=o.childNodes[n]).classList.contains("e-disabled")||t.classList.contains(ce.oF.group))&&(n=this.getValidIndex(t,n,r)),n)},i.prototype.updateSelectedOptions=function(){var t=this,n=[],r=[];
1if((0,s.X$)(r,this.value),this.getSelectedItems().forEach(function(l){l.classList.contains("e-grabbed")||n.push(t.getFormattedValue(l.getAttribute("data-value")))}),this.mainList.childElementCount===this.ulElement.childElementCount)if(this.allowFiltering&&this.selectionSettings.showCheckbox){for(var o=0;o<n.length;o++)r.indexOf(n[o])>-1||r.push(n[o]);this.setProperties({value:r},!0)}else this.setProperties({value:n},!0);this.updateSelectTag(),this.updateToolBarState(),this.tBListBox&&this.tBListBox.updateToolBarState()},i.prototype.clearSelection=function(t){var r,n=this;void 0===t&&(t=this.value),this.selectionSettings.showCheckbox&&this.getSelectedItems().forEach(function(o){r=n.getFormattedValue(o.getAttribute("data-value")),t.indexOf(r)<0&&(o.getElementsByClassName("e-check")[0].classList.remove("e-check"),o.removeAttribute("aria-selected"))})},i.prototype.setSelection=function(t,n,r,o){var h,d,l=this;void 0===t&&(t=this.value),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=!0),t&&t.forEach(function(p){var u;if("string"==typeof(u=r?l.getValueByText(p):p))if(-1!==u.indexOf("\n")){var f=CSS.escape(u);h=l.list.querySelector('[data-value="'+f+'"]')}else u=u.split("\\").join("\\\\"),h=l.list.querySelector('[data-value="'+u.replace(/"/g,'\\"')+'"]');else h=l.list.querySelector('[data-value="'+u+'"]');h&&(d=l.selectionSettings.showCheckbox&&!h.classList.contains("e-disabled")?h.getElementsByClassName("e-frame")[0].classList.contains("e-check"):h.classList.contains("e-selected"),(!n&&d||n&&!d&&h)&&(l.selectionSettings.showCheckbox&&!h.classList.contains("e-disabled")?(l.notify("updatelist",{li:h,module:"listbox"}),o&&h.focus()):n&&!h.classList.contains("e-disabled")?(h.classList.add(ce.oF.selected),h.setAttribute("aria-selected","true"),o&&h.focus()):(h.classList.remove(ce.oF.selected),h.removeAttribute("aria-selected"))))}),this.updateSelectTag()},i.prototype.updateSelectTag=function(){var t=this.getSelectTag(),n="";if(!(0,s.hX)(t)){if(t.innerHTML="",this.value){for(var r=0,o=this.value.length;r<o;r++)n+="<option selected>"+this.value[r]+"</option>";for(t.innerHTML+=n,r=0,o=t.childNodes.length;r<o;r++)t.childNodes[r].setAttribute("value",this.value[r].toString())}this.checkSelectAll()}},i.prototype.checkDisabledState=function(t){return(0,s.hX)(t.ulElement)?!(!(0,s.hX)(this.dataSource)&&(0,s.hX)(this.dataSource.length)):t.ulElement.querySelectorAll(".e-disabled").length>0?t.liCollections.length===t.ulElement.querySelectorAll(".e-disabled").length:0===t.ulElement.querySelectorAll("."+ce.oF.li).length},i.prototype.updateToolBarState=function(){var t=this;if(this.toolbarSettings.items.length){var n=this.getScopedListBox(),r=this.list.parentElement.getElementsByClassName("e-listbox-tool")[0];this.toolbarSettings.items.forEach(function(o){var l=r.querySelector('[data-value="'+o+'"]');switch(o){case"moveAllTo":l.disabled=t.checkDisabledState(t);break;case"moveAllFrom":l.disabled=t.checkDisabledState(n);break;case"moveFrom":l.disabled=!(n.value&&n.value.length);break;case"moveUp":l.disabled=!(t.value&&t.value.length&&!t.isSelected(t.ulElement.children[0]));break;case"moveDown":l.disabled=!(t.value&&t.value.length&&!t.isSelected(t.ulElement.children[t.ulElement.childElementCount-1]));break;default:l.disabled=!(t.value&&t.value.length)}})}},i.prototype.setCheckboxPosition=function(){var t=this.list;!this.initLoad&&"Left"===this.selectionSettings.checkboxPosition&&t.classList.remove("e-right"),"Right"===this.selectionSettings.checkboxPosition&&t.classList.add("e-right")},i.prototype.showCheckbox=function(t){var n=0,r=this.list.lastElementChild.querySelectorAll("li"),o=this.list.lastElementChild.getElementsByClassName("e-list-item").length;if(t){if(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 l=new s.Wo(this.getModuleName(),{selectAllText:"Select All",unSelectAllText:"Unselect All"},this.locale);this.showSelectAll=!0,this.selectAllText=l.getConstant("selectAllText"),this.unSelectAllText=l.getConstant("unSelectAllText"),this.popupWrapper=this.list,this.checkBoxSelectionModule.checkAllParent=null,this.notify("selectAll",{}),this.checkSelectAll()}}else{for(this.list.getElementsByClassName("e-selectall-parent")[0]&&this.list.removeChild(this.list.getElementsByClassName("e-selectall-parent")[0]);n<o;n++)r[n].classList.contains("e-list-item")&&r[n].removeChild(r[n].getElementsByClassName("e-checkbox-wrapper")[0]),r[n].hasAttribute("aria-selected")&&r[n].removeAttribute("aria-selected");this.mainList=this.ulElement}this.value=[]},i.prototype.isSelected=function(t){return!(0,s.hX)(t)&&(t.classList.contains(ce.oF.selected)||null!==t.querySelector(".e-check"))},i.prototype.getSelectTag=function(){return this.list.getElementsByClassName("e-hidden-select")[0]},i.prototype.getToolElem=function(){return this.list.parentElement.getElementsByClassName("e-listbox-tool")[0]},i.prototype.formResetHandler=function(){this.value=this.initialSelectedOptions},i.prototype.getModuleName=function(){return"listbox"},i.prototype.getPersistData=function(){return this.addOnPersist(["value"])},i.prototype.getLocaleName=function(){return"listbox"},i.prototype.destroy=function(){this.unwireEvents(),"EJS-LISTBOX"===this.element.tagName?this.element.innerHTML="":(this.element.style.display="inline-block",this.toolbarSettings.items.length&&(this.list.parentElement.parentElement.insertBefore(this.list,this.list.parentElement),(0,s.Yo)(this.list.nextElementSibling)),this.list.parentElement.insertBefore(this.element,this.list)),a.prototype.destroy.call(this),this.enableRtlElements=[],this.liCollections=null,this.list=null,this.ulElement=null,this.mainList=null,this.spinner=null,this.rippleFun=null,this.itemTemplate&&this.clearTemplate()},i.prototype.onPropertyChanged=function(t,n){var r=this.toolbarSettings.items.length?this.list.parentElement:this.list;a.prototype.onPropertyChanged.call(this,t,n),this.setUpdateInitial(["fields","query","dataSource"],t);for(var o=0,l=Object.keys(t);o<l.length;o++)switch(l[o]){case"cssClass":n.cssClass&&(0,s.vy)([r],n.cssClass.split(" ")),t.cssClass&&(0,s.iQ)([r],t.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":t.enableRtl?this.list.classList.add("e-rtl"):this.list.classList.remove("e-rtl");break;case"value":(0,s.vy)(this.list.querySelectorAll("."+ce.oF.selected),ce.oF.selected),this.clearSelection(this.value),this.setSelection();break;case"height":this.setHeight();break;case"enabled":this.setEnable();break;case"allowDragAndDrop":t.allowDragAndDrop?this.initDraggable():this.ulElement.classList.contains("e-sortable")&&(0,s.QQ)(this.ulElement,"sortable").destroy();break;case"allowFiltering":this.allowFiltering?this.setFiltering():(this.list.removeChild(this.list.getElementsByClassName("e-filter-parent")[0]),this.filterParent=null,(0,s.vy)([this.list],"e-filter-list"));break;case"filterBarPlaceholder":this.allowFiltering&&this.filterInput&&J.pd.setPlaceholder(t.filterBarPlaceholder,this.filterInput);break;case"scope":this.allowDragAndDrop&&((0,s.QQ)(this.ulElement,"sortable").scope=t.scope),this.toolbarSettings.items.length&&(n.scope&&((0,s.QQ)(document.querySelector(n.scope),this.getModuleName()).tBListBox=null),t.scope&&((0,s.QQ)(document.querySelector(t.scope),this.getModuleName()).tBListBox=this));break;case"toolbarSettings":var d=void 0,p=t.toolbarSettings.position,u=this.getToolElem();p&&((0,s.vy)([r],["e-right","e-left"]),r.classList.add("e-"+p.toLowerCase()),"Left"===p?r.insertBefore(u,this.list):r.appendChild(u)),t.toolbarSettings.items&&(n.toolbarSettings.items=(0,s.hX)(n.toolbarSettings.items)?[]:n.toolbarSettings.items,n.toolbarSettings&&n.toolbarSettings.items.length&&((d=this.list.parentElement).parentElement.insertBefore(this.list,d),(0,s.Yo)(d)),this.initToolbarAndStyles(),this.wireToolbarEvent());break;case"selectionSettings":var f=t.selectionSettings.showSelectAll,m=t.selectionSettings.showCheckbox;if(!(0,s.hX)(f)){if(this.showSelectAll=f,this.showSelectAll){var g=new s.Wo(this.getModuleName(),{selectAllText:"Select All",unSelectAllText:"Unselect All"},this.locale);this.checkBoxSelectionModule.checkAllParent=null,this.showSelectAll=!0,this.selectAllText=g.getConstant("selectAllText"),this.unSelectAllText=g.getConstant("selectAllText"),this.popupWrapper=this.list}this.notify("selectAll",{}),this.checkSelectAll()}(0,s.hX)(m)||this.showCheckbox(m),this.selectionSettings.showCheckbox&&this.setCheckboxPosition();break;case"dataSource":this.isDataSourceUpdate=!0,this.jsonData=[].slice.call(this.dataSource)}},st([(0,s.mA)("")],i.prototype,"cssClass",void 0),st([(0,s.mA)([])],i.prototype,"value",void 0),st([(0,s.mA)("")],i.prototype,"height",void 0),st([(0,s.mA)(!0)],i.prototype,"enabled",void 0),st([(0,s.mA)(!1)],i.prototype,"enablePersistence",void 0),st([(0,s.mA)(!1)],i.prototype,"allowDragAndDrop",void 0),st([(0,s.mA)(1e3)],i.prototype,"maximumSelectionLength",void 0),st([(0,s.mA)(!1)],i.prototype,"allowFiltering",void 0),st([(0,s.mA)("")],i.prototype,"scope",void 0),st([(0,s.mA)(!0)],i.prototype,"ignoreCase",void 0),st([(0,s.mA)(null)],i.prototype,"filterBarPlaceholder",void 0),st([(0,s.mA)("None")],i.prototype,"sortOrder",void 0),st([(0,s.Jh)()],i.prototype,"beforeItemRender",void 0),st([(0,s.Jh)()],i.prototype,"filtering",void 0),st([(0,s.Jh)()],i.prototype,"select",void 0),st([(0,s.Jh)()],i.prototype,"change",void 0),st([(0,s.Jh)()],i.prototype,"beforeDrop",void 0),st([(0,s.Jh)()],i.prototype,"dragStart",void 0),st([(0,s.Jh)()],i.prototype,"drag",void 0),st([(0,s.Jh)()],i.prototype,"drop",void 0),st([(0,s.Jh)()],i.prototype,"dataBound",void 0),st([(0,s.mA)(null)],i.prototype,"groupTemplate",void 0),st([(0,s.mA)("Request failed")],i.prototype,"actionFailureTemplate",void 0),st([(0,s.mA)(1e3)],i.prototype,"zIndex",void 0),st([(0,s.mA)(!1)],i.prototype,"ignoreAccent",void 0),st([(0,s.pr)({},d1)],i.prototype,"toolbarSettings",void 0),st([(0,s.pr)({},h1)],i.prototype,"selectionSettings",void 0),e=st([s.kc],i)}(xh),Zo={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"},ea=function(){function a(){}return a.save=function(i,e){if(null==i||""===i)throw new Error("ArgumentException: fileName cannot be undefined, null or empty");var t=i.substring(i.lastIndexOf(".")+1,i.length),n=this.getMimeType(t);if(""!==n&&(e=new Blob([e],{type:n})),this.isMicrosoftBrowser)navigator.msSaveBlob(e,i);else{var r=document.createElementNS("http://www.w3.org/1999/xhtml","a");this.saveInternal(i,t,e,r,"download"in r)}},a.saveInternal=function(i,e,t,n,r){if(r){n.download=i;var o=window.URL.createObjectURL(t);n.href=o;var l=document.createEvent("MouseEvent");l.initEvent("click",!0,!0),n.dispatchEvent(l),setTimeout(function(){window.URL.revokeObjectURL(o),o=void 0})}else if("docx"!==e&&"xlsx"!==e){var h=window.URL.createObjectURL(t);window.open(h,"_blank")||(window.location.href=h)}else{var p=new FileReader;p.onloadend=function(){window.open(p.result,"_blank")||(window.location.href=p.result)},p.readAsDataURL(t)}},a.getMimeType=function(i){var e="";switch(i){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},a}(),Rh=function(){function a(i){this.emitBOM=!0,this.encodingType="Ansi",this.initBOM(i)}return Object.defineProperty(a.prototype,"includeBom",{get:function(){return this.emitBOM},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"type",{get:function(){return this.encodingType},set:function(i){this.encodingType=i},enumerable:!0,configurable:!0}),a.prototype.initBOM=function(i){this.emitBOM=null==i||i},a.prototype.getByteCount=function(i){return Hr(i,"string"),""===i?this.utf8Len(i.charCodeAt(0)):(null==this.type&&(this.t
1ype="Ansi"),this.getByteCountInternal(i,0,i.length))},a.prototype.utf8Len=function(i){return i<=127?1:i<=2047?2:i<=65535?3:i<=2097151?4:0},a.prototype.isHighSurrogate=function(i){return i>=55296&&i<=56319},a.prototype.toCodepoint=function(i,e){return 65536+((i=(1023&i)<<10)|1023&e)},a.prototype.getByteCountInternal=function(i,e,t){var n=0;if("Utf8"===this.encodingType||"Unicode"===this.encodingType){for(var r="Utf8"===this.encodingType,o=0;o<t;o++){var l=i.charCodeAt(r?e:e++);if(this.isHighSurrogate(l))if(r){var h=l,d=i.charCodeAt(++e);n+=this.utf8Len(this.toCodepoint(h,d))}else n+=4,++o;else n+=r?this.utf8Len(l):2;r&&e++}return n}return t},a.prototype.getBytes=function(i,e,t){if(Hr(i,"string"),Hr(e,"charIndex"),Hr(t,"charCount"),e<0||t<0)throw new RangeError("Argument Out Of Range Exception: charIndex or charCount is less than zero");if(i.length-e<t)throw new RangeError("Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string");if(""===i)return new ArrayBuffer(0);null==this.type&&(this.type="Ansi");var r=this.getByteCountInternal(i,e,t);switch(this.type){case"Utf8":return this.getBytesOfUtf8Encoding(r,i,e,t);case"Unicode":return this.getBytesOfUnicodeEncoding(r,i,e,t);default:return this.getBytesOfAnsiEncoding(r,i,e,t)}},a.prototype.getString=function(i,e,t){if(Hr(i,"bytes"),Hr(e,"index"),Hr(t,"count"),e<0||t<0)throw new RangeError("Argument Out Of Range Exception: index or c
1ount is less than zero");if(i.byteLength-e<t)throw new RangeError("Argument Out Of Range Exception: index and count do not denote a valid range in bytes");if(0===i.byteLength||0===t)return"";null==this.type&&(this.type="Ansi");var n="",r=new Uint8Array(i);switch(this.type){case"Utf8":return this.getStringOfUtf8Encoding(r,e,t);case"Unicode":var l=new Uint16Array(i);return this.getStringofUnicodeEncoding(l,e,t);default:for(var h=e,d=0;d<t;d++)n+=String.fromCharCode(r[h]),h++;return n}},a.prototype.getBytesOfAnsiEncoding=function(i,e,t,n){for(var r=new ArrayBuffer(i),o=new Uint8Array(r),l=0,h=0;h<n;h++){var d=e.charCodeAt(t++);o[l]=d<2048?d:63,l++}return r},a.prototype.getBytesOfUtf8Encoding=function(i,e,t,n){for(var r=new ArrayBuffer(i),o=new Uint8Array(r),l=t,h=0,d=0;d<n;d++){var p=e.charCodeAt(l);p<=127?o[h]=p:p<2048?(o[h]=192|p>>6,o[++h]=128|63&p):p<55296||p>=57344?(o[h]=224|p>>12,o[++h]=128|p>>6&63,o[++h]=128|63&p):(o[h]=239,o[++h]=191,o[++h]=189),++h,++l}return r},a.prototype.getBytesOfUnicodeEncoding=function(i,e,t,n){for(var r=new ArrayBuffer(i),o=new Uint16Array(r),l=0;l<n;l++){var h=e.charCodeAt(l);o[l]=h}return r},a.prototype.getStringOfUtf8Encoding=function(i,e,t){for(var n=0,r=e,o="";n<t;n++){for(var l=i[r++];r>i.length;)return o;l>127&&(l>191&&l<224&&r<t?l=(31&l)<<6|63&i[r]:l>223&&l<240&&r<i.byteLength?l=(15&l)<<12|(63&i[r])<<6|63&i[++r]:l>239&&l<248&&r<i.byteLength&&(l=(7&l)<<18|(63&i[r])<<12|(63&i[++r])<<6|63&i[++r]),++r),o+=String.fromCharCode(l)}return o},a.prototype.getStringofUnicodeEncoding=function(i,e,t){if(t>i.length)throw new RangeError("ArgumentOutOfRange_Count");for(var n=new Uint16Array(t),o=0;o<t&&o<i.length;o++)n[o]=i[e++];return String.fromCharCode.apply(null,n)},a.prototype.destroy=function(){this.emitBOM=void 0,this.encodingType=void 0},a}();function Hr(a,i){if(null==a)throw new Error("ArgumentException: "+i+" cannot be null or undefined")}var si=function(){function a(){}return a.bitReverse=function(i){return a.reverseBits[15&i]<<12|a.reverseBits[i>>4&15]<<8|a.reverseBits[i>>8&15]<<4|a.reverseBits[i>>12]},a.bitConverterToInt32=function(i,e){return i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24},a.bitConverterToInt16=function(i,e){return i[e]|i[e+1]<<8},a.bitConverterToUInt32=function(i){var e=new Uint32Array(1);return e[0]=i,e[0]},a.bitConverterToUInt16=function(i,e){var t=new Uint16Array(1);return t[0]=i[e]|i[e+1]<<8,t[0]},a.bitConverterUintToInt32=function(i){var e=new Int32Array(1);return e[0]=i,e[0]},a.bitConverterInt32ToUint=function(i){var e=new Uint32Array(1);return e[0]=i,e[0]},a.bitConverterInt32ToInt16=function(i){var e=new Int16Array(1);return e[0]=i,e[0]},a.byteToString=function(i){for(var e="",t=0;t<i.length;t++)e+=String.fromCharCode(i[t]);return e},a.byteIntToString=function(i){for(var e="",t=0;t<i.length;t++)e+=String.fromCharCode(i[t]);return e},a.arrayCopy=function(i,e,t,n,r){var l=new Uint8Array(i.buffer,e).subarray(0,r);t.set(l,n)},a.mergeArray=function(i,e){var t=new Uint8Array(i.length+e.length);return t.set(i),t.set(e,i.length),t},a.encodedString=function(i){var n,r,o,l,h,d,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",p=0,u=0,f=3*(i=i.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(i.charAt(i.length-1)===e.charAt(64)&&f--,i.charAt(i.length-2)===e.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(var m=new Uint8Array(0|f);p<i.length;)o=e.indexOf(i.charAt(p++)),n=(15&(l=e.indexOf(i.charAt(p++))))<<4|(h=e.indexOf(i.charAt(p++)))>>2,r=(3&h)<<6|(d=e.indexOf(i.charAt(p++))),m[u++]=o<<2|l>>4,64!==h&&(m[u++]=n),64!==d&&(m[u++]=r);return m},a.reverseBits=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],a.huffCodeLengthOrders=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],a}(),Nh=[],Li=function(){function a(){0===Nh.length&&a.initCrc32Table(),this.files=[],this.level="Normal",ea.isMicrosoftBrowser=!!navigator.msSaveBlob}return Object.defineProperty(a.prototype,"items",{get:function(){return this.files},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"compressionLevel",{get:function(){return this.level},set:function(i){this.level=i},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"length",{get:function(){return void 0===this.files?0:this.files.length},enumerable:!0,configurable:!0}),a.prototype.addItem=function(i){if(null==i)throw new Error("ArgumentException: item cannot be null or undefined");for(var e=0;e<this.files.length;e++){var t=this.files[e];if(t instanceof ia&&t.name===i.name)throw new Error("item with same name already exist")}this.files.push(i)},a.prototype.addDirectory=function(i){if(null==i)throw new Error("ArgumentException: string cannot be null or undefined");if(0===i.length)throw new Error("ArgumentException: string cannot be empty");if("/"!==i.slice(-1)&&(i+="/"),-1!==this.files.indexOf(i))throw new Error("item with same name already exist");this.files.push(i)},a.prototype.getItem=function(i){if(i>=0&&i<this.files.length)return this.files[i]},a.prototype.contains=function(i){return-1!==this.files.indexOf(i)},a.prototype.open=function(i){var e=si.encodedString(i);if(0==e.length)throw new DOMException("stream");var t=new Fh(e),n=a.findValueFromEnd(t,101010256,65557);if(n<0)throw new DOMException("Can't locate end of central directory record. Possible wrong file format or archive is corrupt.");t.position=n+12;var r=a.ReadInt32(t);t.position=n-r,this.readCentralDirectoryDataAndExtractItems(t)},a.prototype.readCentralDirectoryDataAndExtractItems=function(i){if(null==i)throw new DOMException("stream");for(var e;33639248==a.ReadInt32(i);)(e=new b1).readCentralDirectoryData(i);e.readData(i,e.checkCrc),e.decompressData(),this.files.push(new ia(e.unCompressedStream.buffer,e.name))},a.prototype.save=function(i){if(null==i||0===i.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(n,r){e.saveInternal(i,!1).then(function(){n(e)})})},a.prototype.saveAsBlob=function(){var i=this;return new Promise(function(t,n){i.saveInternal("",!0).then(function(r){t(r)})})},a.prototype.saveInternal=function(i,e){var t=this,n=this;return new Promise(function(o,l){for(var h=[],d=0,p=0;p<n.files.length;p++)t.getCompressedData(t.files[p]).then(function(f){if(d=n.constructZippedObject(h,f,d,f.isDirectory),h.length===n.files.length){var m=n.writeZippedContent(i,h,d,e);o(m)}})})},a.prototype.destroy=function(){if(void 0!==this.files&&this.files.length>0){for(var i=0;i<this.files.length;i++){var e=this.files[i];e instanceof ia&&e.destroy(),e=void 0}this.files=[]}this.files=void 0,this.level=void 0},a.prototype.getCompressedData=function(i){var e=this;return new Promise(function(n,r){if(i instanceof ia){var o=new FileReader;
1o.onload=function(){var h=new Uint8Array(o.result),d={fileName:i.name,crc32Value:0,compressedData:[],compressedSize:void 0,uncompressedDataSize:h.length,compressionType:void 0,isDirectory:!1};if("Normal"===e.level){e.compressData(h,d,Nh);for(var p=0,u=0;u<d.compressedData.length;u++)p+=d.compressedData[u].length;d.compressedSize=p,d.compressionType="\b\0"}else d.compressedSize=h.length,d.crc32Value=e.calculateCrc32Value(0,h,Nh),d.compressionType="\0\0",d.compressedData.push(h);n(d)},o.readAsArrayBuffer(i.data)}else n({fileName:i,crc32Value:0,compressedData:"",compressedSize:0,uncompressedDataSize:0,compressionType:"\0\0",isDirectory:!0})})},a.prototype.compressData=function(i,e,t){var n=new y1(!0),r=0,o=0;do{if(r>=i.length){n.close();break}o=Math.min(i.length,r+16384);var l=i.subarray(r,o);e.crc32Value=this.calculateCrc32Value(e.crc32Value,l,t),n.write(l,0,o-r),r=o}while(r<=i.length);e.compressedData=n.compressedData,n.destroy()},a.prototype.constructZippedObject=function(i,e,t,n){var r=0;n&&(r|=16),r|=0;var l=this.writeHeader(e,new Date),h="PK\x03\x04"+l+e.fileName,d=this.writeCentralDirectory(e,l,t,r);return i.push({localHeader:h,centralDir:d,compressedData:e}),t+h.length+e.compressedSize},a.prototype.writeHeader=function(i,e){var t="";return t+="\n\0\0\0",t+=i.compressionType,t+=this.getBytes(this.getModifiedTime(e),2),t+=this.getBytes(this.getModifiedDate(e),2),t+=this.getBytes(i.crc32Value,4),t+=this.getBytes(i.compressedSize,4),t+=this.getBytes(i.uncompressedDataSize,4),(t+=this.getBytes(i.fileName.length,2))+this.getBytes(0,2)},a.prototype.writeZippedContent=function(i,e,t,n){for(var r=0,o=[],l=0;l<e.length;l++){var h=e[l];for(r+=h.centralDir.length,o.push(this.getArrayBuffer(h.localHeader));h.compressedData.compressedData.length;)o.push(h.compressedData.compressedData.shift().buffer)}for(l=0;l<e.length;l++)o.push(this.getArrayBuffer(e[l].centralDir));o.push(this.getArrayBuffer(this.writeFooter(e,r,t)));var d=new Blob(o,{type:"application/zip"});return n||ea.save(i,d),d},a.prototype.writeCentralDirectory=function(i,e,t,n){return"PK\x01\x02"+this.getBytes(20,2)+e+this.getBytes(0,2)+"\0\0\0\0"+this.getBytes(n,4)+this.getBytes(t,4)+i.fileName},a.prototype.writeFooter=function(i,e,t){return"PK\x05\x06\0\0\0\0"+this.getBytes(i.length,2)+this.getBytes(i.length,2)+this.getBytes(e,4)+this.getBytes(t,4)+this.getBytes(0,2)},a.prototype.getArrayBuffer=function(i){for(var e=new Uint8Array(i.length),t=0;t<i.length;++t)e[t]=255&i.charCodeAt(t);return e.buffer},a.prototype.getBytes=function(i,e){for(var t="",n=0;n<e;n++)t+=String.fromCharCode(255&i),i>>>=8;return t},a.prototype.getModifiedTime=function(i){var e=i.getHours();return e<<=6,e|=i.getMinutes(),(e<<=5)|i.getSeconds()/2},a.prototype.getModifiedDate=function(i){var e=i.getFullYear()-1980;return e<<=4,e|=i.getMonth()+1,(e<<=5)|i.getDate()},a.prototype.calculateCrc32Value=function(i,e,t){i^=-1;for(var n=0;n<e.length;n++)i=i>>>8^t[255&(i^e[n])];return~i},a.initCrc32Table=function(){for(var i,e=0;e<256;e++){i=e;for(var t=0;t<8;t++)i=1&i?3988292384^i>>>1:i>>>1;Nh[e]=i}},a.findValueFromEnd=function(i,e,t){if(null==i)throw new DOMException("stream");var n=i.inputStream.buffer.byteLength;if(n<4)return-1;var r=new Uint8Array(4),o=Math.max(0,n-t),l=n-1-4;i.position=l,i.read(r,0,4);var h=r[0],d=h==e;if(!d)for(;l>o;)if(h<<=8,l--,i.position=l,(h+=i.readByte())==e){d=!0;break}return d?l:-1},a.ReadInt32=function(i){var e=new Uint8Array(4);if(4!=i.read(e,0,4))throw new DOMException("Unable to read value at the specified position - end of stream was reached.");return si.bitConverterToInt32(e,0)},a.ReadInt16=function(i){var e=new Uint8Array(2);if(2!=i.read(e,0,2))throw new DOMException("Unable to read value at the specified position - end of stream was reached.");return si.bitConverterToInt16(e,0)},a.ReadUInt16=function(i){var e=new Uint8Array(2);if(2!=i.read(e,0,2))throw new DOMException("Unable to read value at the specified position - end of stream was reached.");return si.bitConverterToInt16(e,0)},a}(),b1=function(){function a(){this.headerSignature=67324752,this.checkCrc=!0,this.crc32=0}return a.prototype.readCentralDirectoryData=function(i){i.position+=4,this.options=Li.ReadInt16(i),this.compressionMethod=Li.ReadInt16(i),this.checkCrc=99!=this.compressionMethod,Li.ReadInt32(i),this.crc32=si.bitConverterToUInt32(Li.ReadInt32(i)),this.compressedSize=Li.ReadInt32(i),this.originalSize=Li.ReadInt32(i);var t=Li.ReadInt16(i),n=Li.ReadInt16(i),r=Li.ReadInt16(i);i.position+=4,this.externalAttributes=Li.ReadInt32(i),this.localHeaderOffset=Li.ReadInt32(i);var o=new Uint8Array(t);i.read(o,0,t);var l=si.byteToString(o);l=l.replace("\\","/"),this.name=l,i.position+=n+r,0!=this.options&&(this.options=0)},a.prototype.readData=function(i,e){if(0==i.length)throw new DOMException("stream");i.position=this.localHeaderOffset,this.checkCrc=e,this.readLocalHeader(i),this.readCompressedData(i)},a.prototype.decompressData=function(){8==this.compressionMethod&&this.originalSize>0&&this.decompressDataOld()},a.prototype.decompressDataOld=function(){var e,i=new E1(this.compressedStream,!0);this.originalSize>0&&(e=new Fh(new Uint8Array(this.originalSize)));for(var n,t=new Uint8Array(4096);(n=i.read(t,0,4096))>0;)e.write(t.subarray(0,n),0,n);
1this.unCompressedStream=e.toByteArray()},a.prototype.readLocalHeader=function(i){if(0==i.length)throw new DOMException("stream");if(Li.ReadInt32(i)!=this.headerSignature)throw new DOMException("Can't find local header signature - wrong file format or file is corrupt.");i.position+=22;var e=Li.ReadInt16(i),t=Li.ReadUInt16(i);if(99!=this.compressionMethod)if(t>2){if(i.position+=e,23==Li.ReadInt16(i))throw new DOMException("UnSupported");i.position+=t-2}else i.position+=e+t},a.prototype.readCompressedData=function(i){var e;if(this.compressedSize>0){var t=this.compressedSize;e=new Fh(new Uint8Array(t));for(var n=new Uint8Array(4096);t>0;){var r=Math.min(t,4096);if(i.read(n,0,r)!=r)throw new DOMException("End of file reached - wrong file format or file is corrupt.");e.write(n.subarray(0,r),0,r),t-=r}this.compressedStream=new Uint8Array(e.inputStream)}},a}(),ia=function(){function a(i,e){if(null==i)throw new Error("ArgumentException: data cannot be null or undefined");if(null==e)throw new Error("ArgumentException: string cannot be null or undefined");if(0===e.length)throw new Error("string cannot be empty");this.data=i,this.name=e}return Object.defineProperty(a.prototype,"dataStream",{get:function(){return this.decompressedStream},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"name",{get:function(){return this.fileName},set:function(i){this.fileName=i},enumerable:!0,configurable:!0}),a.prototype.destroy=function(){this.fileName=void 0,this.data=void 0},a}(),vl=new Int16Array(286),na=new Uint8Array(286),Q0=new Int16Array(30),qu=new Uint8Array(30),y1=function(){function a(i){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,a.isHuffmanTreeInitiated||(a.initHuffmanTree(),a.isHuffmanTreeInitiated=!0),this.treeLiteral=new ur(this,286,257,15),this.treeDistances=new ur(this,30,1,15),this.treeCodeLengths=new ur(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=i,i||this.writeZLibHeader()}return Object.defineProperty(a.prototype,"compressedData",{get:function(){return this.stream},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"getCompressedString",{get:function(){var i="";if(void 0!==this.stream)for(var e=0;e<this.stream.length;e++)i+=String.fromCharCode.apply(null,this.stream[e]);return i},enumerable:!0,configurable:!0}),a.prototype.write=function(i,e,t){if(null==i)throw new Error("ArgumentException: data cannot null or undefined");var n=e+t;if(0>e||e>n||n>i.length)throw new Error("ArgumentOutOfRangeException: Offset or length is incorrect");if("string"==typeof i){var r=new Rh(!1);r.type="Utf8",n=e+(i=new Uint8Array(r.getBytes(i,0,i.length))).length}for(this.inputBuffer=i,this.inputOffset=e,this.inputEnd=n,this.noWrap||(this.checkSum=S1.checksumUpdate(this.checkSum,this.inputBuffer,this.inputOffset,n));this.inputEnd!==this.inputOffset||0!==this.pendingBufLength;)this.pendingBufferFlush(),this.compressData(!1)},a.prototype.writeZLibHeader=function(){var i=30720;i|=64,this.pendingBufferWriteShortBytes(i+=31-i%31)},a.prototype.pendingBufferWriteShortBytes=function(i){this.pendingBuffer[this.pendingBufLength++]=i>>8,this.pendingBuffer[this.pendingBufLength++]=i},a.prototype.compressData=function(i){var e;do{this.fillWindow(),e=this.compressSlow(i&&this.inputEnd===this.inputOffset,i)}while(0===this.pendingBufLength&&e);return e},a.prototype.compressSlow=function(i,e){if(this.lookAhead<262&&!i)return!1;for(;this.lookAhead>=262||i;){if(0===this.lookAhead)return this.lookAheadCompleted(e);this.stringStart>=2*this.windowSize-262&&this.slideWindow();var t=this.matchStart,n=this.matchLength;if(this.lookAhead>=3&&this.discardMatch(),n>=3&&this.matchLength<=n?n=this.matchPreviousBest(t,n):this.matchPreviousAvailable(),this.bufferPosition>=16384)return this.huffmanIsFull(e)}return!0},a.prototype.discardMatch=function(){var i=this.insertString();0!==i&&this.stringStart-i<=this.maxDist&&this.findLongestMatch(i)&&this.matchLength<=5&&3===this.matchLength&&this.stringStart-this.matchStart>4096&&(this.matchLength=2)},a.prototype.matchPreviousAvailable=function(){this.matchPrevAvail&&this.huffmanTallyLit(255&this.dataWindow[this.stringStart-1]),this.matchPrevAvail=!0,this.stringStart++,this.lookAhead--},a.prototype.matchPreviousBest=function(i,e){this.huffmanTallyDist(this.stringStart-1-i,e),e-=2;do{this.stringStart++,this.lookAhead--,this.lookAhead>=3&&this.insertString()}while(--e>0);return this.stringStart++,this.lookAhead--,this.matchPrevAvail=!1,this.matchLength=2,e},a.prototype.lookAheadCompleted=function(i){return this.matchPrevAvail&&this.huffmanTallyLit(255&this.dataWindow[this.stringStart-1]),this.matchPrevAvail=!1,this.huffmanFlushBlock(this.dataWindow,this.blockStart,this.stringStart-this.blockStart,i),this.blockStart=this.stringStart,!1},a.prototype.huffmanIsFull=function(i){var e=this.stringStart-this.blockStart;this.matchPrevAvail&&e--;var t=i&&0===this.lookAhead&&!this.matchPrevAvail;return this.huffmanFlushBlock(this.dataWindow,this.blockStart,e,t),this.blockStart+=e,!t},a.prototype.fillWindow=function(){for(this.stringStart>=this.windowSize+this.maxDist&&this.slideWindow();this.lookAhead<262&&this.inputOffset<this.inputEnd;){var i=2*this.windowSize-this.lookAhead-this.stringStart;i>this.inputEnd-this.inputOffset&&(i=this.inputEnd-this.inputOffset),this.dataWindow.set(this.inputBuffer.subarray(this.inputOffset,this.inputOffset+i),this.stringStart+this.lookAhead),this.inputOffset+=i,this.totalBytesIn+=i,this.lookAhead+=i}this.lookAhead>=3&&this.updateHash()},a.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(var i=0;i<this.hashSize;
1++i)this.hashHead[i]=(e=65535&this.hashHead[i])>=this.windowSize?e-this.windowSize:0;for(i=0;i<this.windowSize;i++){var e;this.hashPrevious[i]=(e=65535&this.hashPrevious[i])>=this.windowSize?e-this.windowSize:0}},a.prototype.insertString=function(){var i,e=(this.currentHash<<this.hashShift^this.dataWindow[this.stringStart+2])&this.hashMask;return this.hashPrevious[this.stringStart&this.windowMask]=i=this.hashHead[e],this.hashHead[e]=this.stringStart,this.currentHash=e,65535&i},a.prototype.findLongestMatch=function(i){var r,e=4096,t=258,n=this.stringStart,o=this.stringStart+this.matchLength,l=Math.max(this.matchLength,2),h=Math.max(this.stringStart-this.maxDist,0),d=this.stringStart+258-1,p=this.dataWindow[o-1],u=this.dataWindow[o],f=this.dataWindow;l>=32&&(e>>=2),t>this.lookAhead&&(t=this.lookAhead);do{if(f[i+l]===u&&f[i+l-1]===p&&f[i]===f[n]&&f[i+1]===f[n+1]){for(r=i+2,n+=2;f[++n]===f[++r]&&f[++n]===f[++r]&&f[++n]===f[++r]&&f[++n]===f[++r]&&f[++n]===f[++r]&&f[++n]===f[++r]&&f[++n]===f[++r]&&f[++n]===f[++r]&&n<d;);if(n>o){if(this.matchStart=i,o=n,(l=n-this.stringStart)>=t)break;p=f[o-1],u=f[o]}n=this.stringStart}}while((i=65535&this.hashPrevious[i&this.windowMask])>h&&0!=--e);return this.matchLength=Math.min(l,this.lookAhead),this.matchLength>=3},a.prototype.updateHash=function(){this.currentHash=this.dataWindow[this.stringStart]<<this.hashShift^this.dataWindow[this.stringStart+1]},a.prototype.huffmanTallyLit=function(i){return this.arrDistances[this.bufferPosition]=0,this.arrLiterals[this.bufferPosition++]=i,this.treeLiteral.codeFrequencies[i]++,this.bufferPosition>=16384},a.prototype.huffmanTallyDist=function(i,e){this.arrDistances[this.bufferPosition]=i,this.arrLiterals[this.bufferPosition++]=e-3;var t=this.huffmanLengthCode(e-3);this.treeLiteral.codeFrequencies[t]++,t>=265&&t<285&&(this.extraBits+=Math.floor((t-261)/4));var n=this.huffmanDistanceCode(i-1);return this.treeDistances.codeFrequencies[n]++,n>=4&&(this.extraBits+=Math.floor(n/2-1)),this.bufferPosition>=16384},a.prototype.huffmanFlushBlock=function(i,e,t,n){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 r=4,o=18;o>r;o--)this.treeCodeLengths.codeLengths[ur.huffCodeLengthOrders[o]]>0&&(r=o+1);var l=14+3*r+this.treeCodeLengths.getEncodedLength()+this.treeLiteral.getEncodedLength()+this.treeDistances.getEncodedLength()+this.extraBits,h=this.extraBits;for(o=0;o<286;o++)h+=this.treeLiteral.codeFrequencies[o]*na[o];for(o=0;o<30;o++)h+=this.treeDistances.codeFrequencies[o]*qu[o];l>=h&&(l=h),e>=0&&t+4<l>>3?this.huffmanFlushStoredBlock(i,e,t,n):l==h?(this.pendingBufferWriteBits(2+(n?1:0),3),this.treeLiteral.setStaticCodes(vl,na),this.treeDistances.setStaticCodes(Q0,qu),this.huffmanCompressBlock(),this.huffmanReset()):(this.pendingBufferWriteBits(4+(n?1:0),3),this.huffmanSendAllTrees(r),this.huffmanCompressBlock(),this.huffmanReset())},a.prototype.huffmanFlushStoredBlock=function(i,e,t,n){this.pendingBufferWriteBits(0+(n?1:0),3),this.pendingBufferAlignToByte(),this.pendingBufferWriteShort(t),this.pendingBufferWriteShort(~t),this.pendingBufferWriteByteBlock(i,e,t),this.huffmanReset()},a.prototype.huffmanLengthCode=function(i){if(255===i)return 285;for(var e=257;i>=8;)e+=4,i>>=1;return e+i},a.prototype.huffmanDistanceCode=function(i){for(var e=0;i>=4;)e+=2,i>>=1;return e+i},a.prototype.huffmanSendAllTrees=function(i){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(i-4,4);for(var e=0;e<i;e++)this.pendingBufferWriteBits(this.treeCodeLengths.codeLengths[ur.huffCodeLengthOrders[e]],3);this.treeLiteral.writeTree(this.treeCodeLengths),this.treeDistances.writeTree(this.treeCodeLengths)},a.prototype.huffmanReset=function(){this.bufferPosition=0,this.extraBits=0,this.treeLiteral.reset(),this.treeDistances.reset(),this.treeCodeLengths.reset()},a.prototype.huffmanCompressBlock=function(){for(var i=0;i<this.bufferPosition;i++){var e=255&this.arrLiterals[i],t=this.arrDistances[i];if(0!=t--){var n=this.huffmanLengthCode(e);this.treeLiteral.writeCodeToStream(n);var r=Math.floor((n-261)/4);r>0&&r<=5&&this.pendingBufferWriteBits(e&(1<<r)-1,r);var o=this.huffmanDistanceCode(t);this.treeDistances.writeCodeToStream(o),(r=Math.floor(o/2-1))>0&&this.pendingBufferWriteBits(t&(1<<r)-1,r)}else this.treeLiteral.writeCodeToStream(e)}this.treeLiteral.writeCodeToStream(256)},a.prototype.pendingBufferWriteBits=function(i,e){var t=new Uint32Array(1);t[0]=this.pendingBufCache|i<<this.pendingBufBitsInCache,this.pendingBufCache=t[0],this.pendingBufBitsInCache+=e,this.pendingBufferFlushBits()},a.prototype.pendingBufferFlush=function(i){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},a.prototype.pendingBufferFlushBits=function(){for(var i=0;this.pendingBufBitsInCache>=8&&this.pendingBufLength<65536;)this.pendingBuffer[this.pendingBufLength++]=this.pendingBufCache,this.pendingBufCache>>=8,this.pendingBufBitsInCache-=8,i++;return i},a.prototype.pendingBufferWriteByteBlock=function(i,e,t){var n=i.subarray(e,e+t);this.pendingBuffer.set(n,this.pendingBufLength),this.pendingBufLength+=t},a.prototype.pendingBufferWriteShort=function(i){this.pendingBuffer[this.pendingBufLength++]=i,this.pendingBuffer[this.pendingBufLength++]=i>>8},a.prototype.pendingBufferAlignToByte=function(){this.pendingBufBitsInCache>0&&(this.pendingBuffer[this.pendingBufLength++]=this.pendingBufCache),this.pendingBufCache=0,this.pendingBufBitsInCache=0},a.initHuffmanTree=function(){for(var i=0;i<144;)vl[i]=ur.bitReverse(48+i<<8),na[i++]=8;for(;i<256;)vl[i]=ur.bitReverse(256+i<<7),na[i++]=9;for(;i<280;)vl[i]=ur.bitReverse(-256+i<<9),na[i++]=7;for(;i<286;)vl[i]=ur.bitReverse(-88+i<<8),na[i++]=8;for(i=0;i<30;i++)Q0[i]=ur.bitReverse(i<<11),qu[i]=5},a.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)},a.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},a.isHuffmanTreeInitiated=!1,a}
1(),ur=function(){function a(i,e,t,n){this.writer=i,this.codeMinCount=t,this.maxLength=n,this.codeFrequency=new Uint16Array(e),this.lengthCount=new Int32Array(n)}return Object.defineProperty(a.prototype,"treeLength",{get:function(){return this.codeCount},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"codeLengths",{get:function(){return this.codeLength},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"codeFrequencies",{get:function(){return this.codeFrequency},enumerable:!0,configurable:!0}),a.prototype.setStaticCodes=function(i,e){var t=new Int16Array(i.length);t.set(i,0),this.codes=t;var n=new Uint8Array(e.length);n.set(e,0),this.codeLength=n},a.prototype.reset=function(){for(var i=0;i<this.codeFrequency.length;i++)this.codeFrequency[i]=0;this.codes=void 0,this.codeLength=void 0},a.prototype.writeCodeToStream=function(i){this.writer.pendingBufferWriteBits(65535&this.codes[i],this.codeLength[i])},a.prototype.buildCodes=function(){var i=new Int32Array(this.maxLength);this.codes=new Int16Array(this.codeCount);for(var e=0,t=0;t<this.maxLength;t++)i[t]=e,e+=this.lengthCount[t]<<15-t;for(var n=0;n<this.codeCount;n++){var r=this.codeLength[n];r>0&&(this.codes[n]=a.bitReverse(i[r-1]),i[r-1]+=1<<16-r)}},a.bitReverse=function(i){return a.reverseBits[15&i]<<12|a.reverseBits[i>>4&15]<<8|a.reverseBits[i>>8&15]<<4|a.reverseBits[i>>12]},a.prototype.getEncodedLength=function(){for(var i=0,e=0;e<this.codeFrequency.length;e++)i+=this.codeFrequency[e]*this.codeLength[e];return i},a.prototype.calculateBLFreq=function(i){for(var e,t,n,r=-1,o=0;o<this.codeCount;){n=1;var l=this.codeLength[o];for(0===l?(e=138,t=3):(e=6,t=3,r!==l&&(i.codeFrequency[l]++,n=0)),r=l,o++;o<this.codeCount&&r===this.codeLength[o]&&(o++,!(++n>=e)););n<t?i.codeFrequency[r]+=n:0!==r?i.codeFrequency[16]++:n<=10?i.codeFrequency[17]++:i.codeFrequency[18]++}},a.prototype.writeTree=function(i){for(var e,t,n,r=-1,o=0;o<this.codeCount;){n=1;var l=this.codeLength[o];for(0===l?(e=138,t=3):(e=6,t=3,r!==l&&(i.writeCodeToStream(l),n=0)),r=l,o++;o<this.codeCount&&r===this.codeLength[o]&&(o++,!(++n>=e)););if(n<t)for(;n-- >0;)i.writeCodeToStream(r);else 0!==r?(i.writeCodeToStream(16),this.writer.pendingBufferWriteBits(n-3,2)):n<=10?(i.writeCodeToStream(17),this.writer.pendingBufferWriteBits(n-3,3)):(i.writeCodeToStream(18),this.writer.pendingBufferWriteBits(n-11,7))}},a.prototype.buildTree=function(){for(var i=this.codeFrequency.length,e=new Int32Array(i),t=0,n=0,r=0;r<i;r++){var o=this.codeFrequency[r];if(0!==o){for(var l=t++,h=0;l>0&&this.codeFrequency[e[h=Math.floor((l-1)/2)]]>o;)e[l]=e[h],l=h;e[l]=r,n=r}}for(;t<2;)e[t++]=n<2?++n:0;this.codeCount=Math.max(n+1,this.codeMinCount);for(var p=t,u=new Int32Array(4*t-2),f=new Int32Array(2*t-1),m=0;m<t;m++){var g=e[m],v=2*m;u[v]=g,u[v+1]=-1,f[m]=this.codeFrequency[g]<<8,e[m]=m}this.constructHuffmanTree(e,t,f,p,u),this.buildLength(u)},a.prototype.constructHuffmanTree=function(i,e,t,n,r){do{for(var o=i[0],l=i[--e],h=t[l],d=0,p=1;p<e;)p+1<e&&t[i[p]]>t[i[p+1]]&&p++,i[d]=i[p],p=2*(d=p)+1;for(;(p=d)>0&&t[i[d=Math.floor((p-1)/2)]]>h;)i[p]=i[d];i[p]=l;var u=i[0];r[2*(l=n++)]=o,r[2*l+1]=u;var f=Math.min(255&t[o],255&t[u]);for(t[l]=h=t[o]+t[u]-f+1,d=0,p=1;p<e;)p+1<e&&t[i[p]]>t[i[p+1]]&&p++,i[d]=i[p],p=2*(d=p)+1;for(;(p=d)>0&&t[i[d=Math.floor((p-1)/2)]]>h;)i[p]=i[d];i[p]=l}while(e>1)},a.prototype.buildLength=function(i){this.codeLength=new Uint8Array(this.codeFrequency.length);for(var e=Math.floor(i.length/2),t=Math.floor((e+1)/2),n=0,r=0;r<this.maxLength;r++)this.lengthCount[r]=0;if(0!==(n=this.calculateOptimalCodeLength(i,n,e))){var o=this.maxLength-1;do{for(;0===this.lengthCount[--o];);do{this.lengthCount[o]--,this.lengthCount[++o]++,n-=1<<this.maxLength-1-o}while(n>0&&o<this.maxLength-1)}while(n>0);this.recreateTree(i,n,t)}},a.prototype.recreateTree=function(i,e,t){this.lengthCount[this.maxLength-1]+=e,this.lengthCount[this.maxLength-2]-=e;for(var n=2*t,r=this.maxLength;0!==r;r--)for(var o=this.lengthCount[r-1];o>0;){var l=2*i[n++];-1===i[l+1]&&(this.codeLength[i[l]]=r,o--)}},a.prototype.calculateOptimalCodeLength=function(i,e,t){var n=new Int32Array(t);n[t-1]=0;for(var r=t-1;r>=0;r--){var l,o=2*r+1;-1!==i[o]?((l=n[r]+1)>this.maxLength&&(l=this.maxLength,e++),n[i[o-1]]=n[i[o]]=l):(this.lengthCount[(l=n[r])-1]++,this.codeLength[i[o-1]]=n[r])}return e},a.reverseBits=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],a.huffCodeLengthOrders=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],a}(),S1=function(){function a(){}
1return a.checksumUpdate=function(i,e,t,n){var r=new Uint32Array(1);r[0]=i;for(var o=r[0],l=r[0]=65535&o,h=r[0]=o>>a.checkSumBitOffset;n>0;){var d=Math.min(n,a.checksumIterationCount);for(n-=d;--d>=0;)h+=l+=r[0]=255&e[t++];l%=a.checksumBase,h%=a.checksumBase}return h<<a.checkSumBitOffset|l},a.checkSumBitOffset=16,a.checksumBase=65521,a.checksumIterationCount=3800,a}(),ra=function(){function a(i){this.buildTree(i)}return a.init=function(){var i,e;for(i=new Uint8Array(288),e=0;e<144;)i[e++]=8;for(;e<256;)i[e++]=9;for(;e<280;)i[e++]=7;for(;e<288;)i[e++]=8;for(a.m_LengthTree=new a(i),i=new Uint8Array(32),e=0;e<32;)i[e++]=5;a.m_DistanceTree=new a(i)},a.prototype.prepareData=function(i,e,t){for(var n=0,r=512,o=0;o<t.length;o++){var l=t[o];l>0&&i[l]++}for(var h=1;h<=a.MAX_BITLEN;h++)e[h]=n,n+=i[h]<<16-h,h>=10&&(r+=(130944&n)-(130944&e[h])>>16-h);return{code:n,treeSize:r}},a.prototype.treeFromData=function(i,e,t,n,r){for(var o=new Int16Array(r),l=512,d=a.MAX_BITLEN;d>=10;d--)for(var p=130944&n,f=130944&(n-=i[d]<<16-d);f<p;f+=128)o[si.bitReverse(f)]=si.bitConverterInt32ToInt16(-l<<4|d),l+=1<<d-9;for(f=0;f<t.length;f++)if(0!=(d=t[f])){var m=si.bitReverse(n=e[d]);if(d<=9)do{o[m]=si.bitConverterInt32ToInt16(f<<4|d),m+=1<<d}while(m<512);else{var g=o[511&m],v=1<<(15&g);g=-(g>>4);do{o[g|m>>9]=si.bitConverterInt32ToInt16(f<<4|d),m+=1<<d}while(m<v)}e[d]=n+(1<<16-d)}return o},a.prototype.buildTree=function(i){var e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=this.prepareData(e,t,i);this.m_Tree=this.treeFromData(e,t,i,n.code,n.treeSize)},a.prototype.unpackSymbol=function(i){var e,t;if((e=i.peekBits(9))>=0){if((t=this.m_Tree[e])>=0)return i.skipBits(15&t),t>>4;var o,n=-(t>>4);return(e=i.peekBits(15&t))>=0?(i.skipBits(15&(t=this.m_Tree[n|e>>9])),t>>4):(e=i.peekBits(o=i.availableBits),(15&(t=this.m_Tree[n|e>>9]))<=o?(i.skipBits(15&t),t>>4):-1)}return e=i.peekBits(o=i.availableBits),(t=this.m_Tree[e])>=0&&(15&t)<=o?(i.skipBits(15&t),t>>4):-1},Object.defineProperty(a,"lengthTree",{get:function(){return this.m_LengthTree},enumerable:!0,configurable:!0}),Object.defineProperty(a,"distanceTree",{get:function(){return this.m_DistanceTree},enumerable:!0,configurable:!0}),a.MAX_BITLEN=15,a}(),C1=function(){function a(){}return a.ChecksumUpdate=function(i,e,t,n){for(var r=i,o=65535&r,l=r>>this.DEF_CHECKSUM_BIT_OFFSET;n>0;){var h=Math.min(n,this.DEF_CHECKSUM_ITERATIONSCOUNT);for(n-=h;--h>=0;)l+=o+=255&e[t++];o%=this.DEF_CHECKSUM_BASE,l%=this.DEF_CHECKSUM_BASE}i=r=l<<this.DEF_CHECKSUM_BIT_OFFSET|o},a.ChecksumGenerate=function(i,e,t){return a.ChecksumUpdate(1,i,e,t),1},a.DEF_CHECKSUM_BIT_OFFSET=16,a.DEF_CHECKSUM_BASE=65521,a.DEF_CHECKSUM_ITERATIONSCOUNT=3800,a}(),E1=function(){function a(i,e){if(this.defaultHuffmanDynamicTree=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],this.DEF_HEADER_METHOD_MASK=3840,this.DEF_HEADER_INFO_MASK=61440,this.DEF_HEADER_FLAGS_FCHECK=31,this.DEF_HEADER_FLAGS_FDICT=32,this.DEF_HEADER_FLAGS_FLEVEL=192,this.DEF_MAX_WINDOW_SIZE=65535,this.DEF_HUFFMAN_REPEATE_MAX=258,this.DEF_HUFFMAN_END_BLOCK=256,this.DEF_HUFFMAN_LENGTH_MINIMUMCODE=257,this.DEF_HUFFMAN_LENGTH_MAXIMUMCODE=285,this.DEF_HUFFMAN_DISTANCE_MAXIMUMCODE=29,this.mCheckSum=1,this.tBuffer=0,this.mBufferedBits=0,this.mTempBuffer=new Uint8Array(4),this.mBlockBuffer=new Uint8Array(this.DEF_MAX_WINDOW_SIZE),this.mbNoWrap=!1,this.mWindowSize=0,this.mCurrentPosition=0,this.mDataLength=0,this.mbCanReadNextBlock=!0,this.mbCanReadMoreData=!0,this.mbCheckSumRead=!1,null==i)throw new DOMException("stream");if(0===i.length)throw new DOMException("stream - string can not be empty");ra.init(),this.mInputStream=new Fh(i),this.mbNoWrap=e,this.mbNoWrap||this.readZLibHeader(),this.decodeBlockHeader()}return Object.defineProperty(a.prototype,"mBuffer",{get:function(){return this.tBuffer},set:function(i){this.tBuffer=i},enumerable:!0,configurable:!0}),a.prototype.peekBits=function(i){if(i<0)throw new DOMException("count","Bits count can not be less than zero.");if(i>32)throw new DOMException("count","Count of bits is too large.");return this.mBufferedBits<i&&this.fillBuffer(),this.mBufferedBits<i?-1:si.bitConverterUintToInt32(this.mBuffer&~(4294967295<<i))},a.prototype.fillBuffer=function(){var i=4-(this.mBufferedBits>>3)-(7&this.mBufferedBits?1:0);if(0!==i)for(var e=this.mInputStream.read(this.mTempBuffer,0,i),t=0;t<e;t++)this.mBuffer=si.bitConverterInt32ToUint(this.mBuffer|si.bitConverterInt32ToUint(this.mTempBuffer[t]<<this.mBufferedBits)),this.mBufferedBits+=8},a.prototype.skipBits=function(i){if(i<0)throw new DOMException("c
1ount","Bits count can not be less than zero.");0!==i&&(i>=this.mBufferedBits?(i-=this.mBufferedBits,this.mBufferedBits=0,this.mBuffer=0,i>0&&(this.mInputStream.position+=i>>3,(i&=7)>0&&(this.fillBuffer(),this.mBufferedBits-=i,this.mBuffer=si.bitConverterInt32ToUint(this.mBuffer>>>i)))):(this.mBufferedBits-=i,this.mBuffer=si.bitConverterInt32ToUint(this.mBuffer>>>i)))},Object.defineProperty(a.prototype,"availableBits",{get:function(){return this.mBufferedBits},enumerable:!0,configurable:!0}),a.prototype.readZLibHeader=function(){var i=this.readInt16();if(-1===i)throw new DOMException("Header of the stream can not be read.");if(i%31!=0)throw new DOMException("Header checksum illegal");if(2048!=(i&this.DEF_HEADER_METHOD_MASK))throw new DOMException("Unsupported compression method.");if(this.mWindowSize=Math.pow(2,8+((i&this.DEF_HEADER_INFO_MASK)>>12)),this.mWindowSize>65535)throw new DOMException("Unsupported window size for deflate compression method.");if((i&this.DEF_HEADER_FLAGS_FDICT)>>5==1)throw new DOMException("Custom dictionary is not supported at the moment.")},a.prototype.readInt16=function(){return this.readBits(8)<<8|this.readBits(8)},a.prototype.readBits=function(i){var e=this.peekBits(i);return-1===e?-1:(this.mBufferedBits-=i,this.mBuffer=si.bitConverterInt32ToUint(this.mBuffer>>>i),e)},a.prototype.decodeBlockHeader=function(){if(!this.mbCanReadNextBlock)return!1;var i=this.readBits(1);if(-1===i)return!1;var e=this.readBits(2);if(-1===e)return!1;switch(this.mbCanReadNextBlock=0===i,e){case 0:this.mbReadingUncompressed=!0,this.skipToBoundary();var t=this.readInt16Inverted();if(t!==(65535^this.readInt16Inverted()))throw new DOMException("Wrong block length.");if(t>65535)throw new DOMException("Uncompressed block length can not be more than 65535.");this.mUncompressedDataLength=t,this.mCurrentLengthTree=null,this.mCurrentDistanceTree=null;break;case 1:this.mbReadingUncompressed=!1,this.mUncompressedDataLength=-1,this.mCurrentLengthTree=ra.lengthTree,this.mCurrentDistanceTree=ra.distanceTree;break;case 2:this.mbReadingUncompressed=!1,this.mUncompressedDataLength=-1;var r=this.decodeDynamicHeader(this.mCurrentLengthTree,this.mCurrentDistanceTree);this.mCurrentLengthTree=r.lengthTree,this.mCurrentDistanceTree=r.distanceTree;break;default:throw new DOMException("Wrong block type.")}return!0},a.prototype.skipToBoundary=function(){this.mBuffer=si.bitConverterInt32ToUint(this.mBuffer>>>(7&this.mBufferedBits)),this.mBufferedBits&=-8},a.prototype.readInt16Inverted=function(){return this.readBits(8)|this.readBits(8)<<8},a.prototype.decodeDynamicHeader=function(i,e){var t=0,n=this.readBits(5),r=this.readBits(5),o=this.readBits(4);if(n<0||r<0||o<0)throw new DOMException("Wrong dynamic huffman codes.");var l=(n+=257)+(r+=1),h=new Uint8Array(l),d=new Uint8Array(19);o+=4;for(var p=0;p<o;){var u=this.readBits(3);if(u<0)throw new DOMException("Wrong dynamic huffman codes.");d[this.defaultHuffmanDynamicTree[p++]]=u}var f=new ra(d);for(p=0;;){var m=void 0,g=!1;for(m=f.unpackSymbol(this);!(-16&m);){if(h[p++]=t=m,p===l){g=!0;break}m=f.unpackSymbol(this)}if(g)break;if(m<0)throw new DOMException("Wrong dynamic huffman codes.");if(m>=17)t=0;else if(0===p)throw new DOMException("Wrong dynamic huffman codes.");var v=m-16,y=this.readBits(a.DEF_HUFFMAN_DYNTREE_REPEAT_BITS[v]);if(y<0)throw new DOMException("Wrong dynamic huffman codes.");if(p+(y+=a.DEF_HUFFMAN_DYNTREE_REPEAT_MINIMUMS[v])>l)throw new DOMException("Wrong dynamic huffman codes.");for(;y-- >0;)h[p++]=t;if(p===l)break}var S=new Uint8Array(n);return S.set(h.subarray(0,n),0),i=new ra(S),S=h.slice(n,n+r),{lengthTree:i,distanceTree:new ra(S)}},a.prototype.readHuffman=function(){for(var i=this.DEF_MAX_WINDOW_SIZE-(this.mDataLength-this.mCurrentPosition),e=!1,t={};i>=this.DEF_HUFFMAN_REPEATE_MAX;){var n=void 0;for(n=this.mCurrentLengthTree.unpackSymbol(this);!(-256&n);){if(t[(this.mDataLength+1)%this.DEF_MAX_WINDOW_SIZE]=n,this.mBlockBuffer[this.mDataLength++%this.DEF_MAX_WINDOW_SIZE]=n,e=!0,--i<this.DEF_HUFFMAN_REPEATE_MAX)return!0;n=this.mCurrentLengthTree.unpackSymbol(this)}if(n<this.DEF_HUFFMAN_LENGTH_MINIMUMCODE){if(n<this.DEF_HUFFMAN_END_BLOCK)throw new DOMException("Illegal code.");var r=e?1:0;return this.mbCanReadMoreData=this.decodeBlockHeader(),!!(r|(this.mbCanReadMoreData?1:0))}if(n>this.DEF_HUFFMAN_LENGTH_MAXIMUMCODE)throw new DOMException("Illegal repeat code length.");var l=a.DEF_HUFFMAN_REPEAT_LENGTH_BASE[n-this.DEF_HUFFMAN_LENGTH_MINIMUMCODE],h=a.DEF_HUFFMAN_REPEAT_LENGTH_EXTENSION[n-this.DEF_HUFFMAN_LENGTH_MINIMUMCODE];if(h>0){if((d=this.readBits(h))<0)throw new DOMException("Wrong data.");l+=d}if((n=this.mCurrentDistanceTree.unpackSymbol(this))<0||n>a.DEF_HUFFMAN_REPEAT_DISTANCE_BASE.length)throw new DOMException("Wrong distance code.");var p=a.DEF_HUFFMAN_REPEAT_DISTANCE_BASE[n];
1if((h=a.DEF_HUFFMAN_REPEAT_DISTANCE_EXTENSION[n])>0){var d;if((d=this.readBits(h))<0)throw new DOMException("Wrong data.");p+=d}for(var u=0;u<l;u++)this.mBlockBuffer[this.mDataLength%this.DEF_MAX_WINDOW_SIZE]=this.mBlockBuffer[(this.mDataLength-p)%this.DEF_MAX_WINDOW_SIZE],this.mDataLength++,i--;e=!0}return e},a.prototype.read=function(i,e,t){if(null==i)throw new DOMException("buffer");if(e<0||e>i.length-1)throw new DOMException("offset","Offset does not belong to specified buffer.");if(t<0||t>i.length-e)throw new DOMException("length","Length is illegal.");for(var n=t;t>0;)if(this.mCurrentPosition<this.mDataLength){var r=this.mCurrentPosition%this.DEF_MAX_WINDOW_SIZE,o=Math.min(this.DEF_MAX_WINDOW_SIZE-r,this.mDataLength-this.mCurrentPosition);o=Math.min(o,t),si.arrayCopy(this.mBlockBuffer,r,i,e,o),this.mCurrentPosition+=o,e+=o,t-=o}else{if(!this.mbCanReadMoreData)break;var l=this.mDataLength;if(this.mbReadingUncompressed)if(0===this.mUncompressedDataLength){if(this.mbCanReadMoreData=this.decodeBlockHeader(),!this.mbCanReadMoreData)break}else{r=this.mDataLength%this.DEF_MAX_WINDOW_SIZE;var h=Math.min(this.mUncompressedDataLength,this.DEF_MAX_WINDOW_SIZE-r),d=this.readPackedBytes(this.mBlockBuffer,r,h);if(h!==d)throw new DOMException("Not enough data in stream.");this.mUncompressedDataLength-=d,this.mDataLength+=d}else if(!this.readHuffman())break;if(l<this.mDataLength){var p=l%this.DEF_MAX_WINDOW_SIZE,u=this.mDataLength%this.DEF_MAX_WINDOW_SIZE;p<u?this.checksumUpdate(this.mBlockBuffer,p,u-p):(this.checksumUpdate(this.mBlockBuffer,p,this.DEF_MAX_WINDOW_SIZE-p),u>0&&this.checksumUpdate(this.mBlockBuffer,0,u))}}if(!this.mbCanReadMoreData&&!this.mbCheckSumRead&&!this.mbNoWrap){if(this.skipToBoundary(),this.readInt32()!==this.mCheckSum)throw new DOMException("Checksum check failed.");this.mbCheckSumRead=!0}return n-t},a.prototype.readPackedBytes=function(i,e,t){if(null==i)throw new DOMException("buffer");if(e<0||e>i.length-1)throw new DOMException('offset", "Offset can not be less than zero or greater than buffer length - 1.');if(t<0)throw new DOMException('length", "Length can not be less than zero.');if(t>i.length-e)throw new DOMException('length", "Length is too large.');if(7&this.mBufferedBits)throw new DOMException("Reading of unalligned data is not supported.");if(0===t)return 0;for(var n=0;this.mBufferedBits>0&&t>0;)i[e++]=this.mBuffer,this.mBufferedBits-=8,this.mBuffer=si.bitConverterInt32ToUint(this.mBuffer>>>8),t--,n++;return t>0&&(n+=this.mInputStream.read(i,e,t)),n},a.prototype.readInt32=function(){var i=this.readBits(8)<<24;return i|=this.readBits(8)<<16,(i|=this.readBits(8)<<8)|this.readBits(8)},a.prototype.checksumUpdate=function(i,e,t){C1.ChecksumUpdate(this.mCheckSum,i,e,t)},a.DEF_REVERSE_BITS=new Uint8Array([0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15]),a.DEF_HUFFMAN_DYNTREE_REPEAT_MINIMUMS=[3,3,11],a.DEF_HUFFMAN_DYNTREE_REPEAT_BITS=[2,3,7],a.DEF_HUFFMAN_REPEAT_LENGTH_BASE=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],a.DEF_HUFFMAN_REPEAT_LENGTH_EXTENSION=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a.DEF_HUFFMAN_REPEAT_DISTANCE_BASE=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],a.DEF_HUFFMAN_REPEAT_DISTANCE_EXT
1ENSION=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a}(),Fh=function(){function a(i){this.position=0,this.inputStream=new Uint8Array(i.buffer)}return Object.defineProperty(a.prototype,"length",{get:function(){return this.inputStream.buffer.byteLength},enumerable:!0,configurable:!0}),a.prototype.read=function(i,e,t){var r=new Uint8Array(this.inputStream.buffer,this.position+e).subarray(0,t);return i.set(r,0),this.position+=r.byteLength,r.byteLength},a.prototype.readByte=function(){return this.inputStream[this.position++]},a.prototype.write=function(i,e,t){si.arrayCopy(i,0,this.inputStream,this.position+e,t),this.position+=t},a.prototype.toByteArray=function(){return new Uint8Array(this.inputStream.buffer)},a}(),ys=function(){return function a(){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.strikeThrough=!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 eb,this.isGlobalStyle=!1}}(),J0=function(){return function a(){this.sz=10.5,this.name="Calibri",this.u=!1,this.b=!1,this.i=!1,this.color="FF000000",this.strike=!1}}(),_1=function(){return function a(){}}(),T1=function(){return function a(){}}(),I1=function(){return function a(){}}(),K0=function(){return function a(){this.name="Normal",this.xfId=0}}(),Z0=function(){return function a(i,e){this.numFmtId=i,this.formatCode=e}}(),bl=function(){return function a(i,e){this.lineStyle=i,this.color=e}}(),eb=function(){return function a(){this.left=new bl("none","#FFFFFF"),this.right=new bl("none","#FFFFFF"),this.top=new bl("none","#FFFFFF"),this.bottom=new bl("none","#FFFFFF"),this.all=new bl("none","#FFFFFF")}}(),x1=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),tb=function(){return function a(){}}(),ib=function(a){function i(){var e=null!==a&&a.apply(this,arguments)||this;return e.add=function(t){for(var n=!1,r=0,o=0,l=e;o<l.length;o++)l[o].index===t.index&&(e[r]=t,n=!0),r++;n||e.push(t)},e}return x1(i,a),i}(Array),w1=function(){return function a(){}}(),O1=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),nb=function(){return function a(){}}(),A1=function(a){function i(){var e=null!==a&&a.apply(this,arguments)||this;return e.add=function(t){e.push(t)},e}return O1(i,a),i}(Array),P1=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),D1=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return P1(i,a),i}(Array),k1=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),M1=function(){return function a(){this.isSummaryRowBelow=!0,this.showGridLines=!0,this.enableRtl=!1}}(),rb=function(){return function a(){}}(),L1=function(){return function a(){}}(),R1=function(){return function a(){}}(),sb=function(){return function a(){}}(),N1=function(a){function i(){var e=null!==a&&a.apply(this,arguments)||this;return e.add=function(t){for(var n=!1,r=0,o=0,l=e;o<l.length;o++){var h=l[o];if(i.isIntersecting(h,t)){var d=new sb;d.x=Math.min(h.x,t.x),d.y=Math.min(h.Y,t.y),d.width=Math.max(h.Width+h.X,t.width+t.x),d.height=Math.max(h.Height+h.Y,t.height+t.y),d.ref=e[r].ref.split(":")[0]+":"+t.ref.split(":")[1],e[r]=d,t=d,n=!0}r++}return n||e.push(t),t},e}return k1(i,a),i.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},i}(Array),V1=function(){return function a(){}}(),F1=function(){function a(i){this.intl=new s.DL}return a.prototype.getFormatFunction=function(i,e){return i.type?(e&&(i.isServerRendered=!0),this.intl.getDateFormat(i)):this.intl.getNumberFormat(i)},a.prototype.toView=function(i,e){var t=i;return!(0,s.hX)(e)&&!(0,s.hX)(i)&&(t=e(i)),t},a.prototype.displayText=function(i,e,t){return this.toView(i,this.getFormatFunction(e,t))},a}(),B1=function(){function a(i,e){if(this.csvStr="",this.separator=null==e?",":e,this.formatter=new F1,this.isMicrosoftBrowser=!!navigator.msSaveBlob,null!=i.isServerRendered&&(this.isServerRendered=i.isServerRendered),null!=i.styles){this.globalStyles=new Map;for(var t=0;t<i.styles.length;t++)void 0!==i.styles[t].name&&void 0!==i.styles[t].numberFormat&&this.globalStyles.set(i.styles[t].name,i.styles[t].numberFormat)}null!=i.worksheets&&this.parseWorksheet(i.worksheets[0])}return a.prototype.parseWorksheet=function(i){null!=i.rows&&this.parseRows(i.rows)},a.prototype.parseRows=function(i){for(var e=1,t=0,n=i;t<n.length;t++){var r=n[t];if(null==r.index)throw Error("Row index is missing.");for(;e<r.index;)this.csvStr+="\r\n",e++;this.parseRow(r)}this.csvStr+="\r\n"},a.prototype.parseRow=function(i){if(null!=i.cells)for(var e=1,t=0,n=i.cells;t<n.length;t++){var r=n[t];if(null==r.index)throw Error("Cell index is missing.");for(;e<r.index;)this.csvStr+=this.separator,e++;this.parseCell(r)}},a.prototype.parseCell=function(i){var e=this.csvStr;if(void 0!==i.value)if(i.value instanceof Date)if(void 0!==i.style&&void 0!==i.style.numberFormat)try{e+=this.parseCellValue(this.formatter.displayText(i.value,{type:"dateTime",skeleton:i.style.numberFormat},this.isServerRendered))}catch{e+=this.parseCellValue(this.formatter.displayText(i.value,{type:"dateTime",format:i.style.numberFormat},this.isServerRendered))}else if(void 0!==i.style&&void 0!==i.style.name&&this.globalStyles.has(i.style.name))try{e+=this.parseCellValue(this.formatter.displayText(i.value,{type:"dateTime",skeleton:this.globalStyles.get(i.style.name)},this.isServerRendered))}catch{e+=this.parseCellValue(this.formatter.displayText(i.value,{type:"dateTime",format:this.globalStyles.get(i.style.name)},this.isServerRendered))}else e+=i.value;else"boolean"==typeof i.value?e+=i.value?"TRUE":"FALSE":"number"==typeof i.value?void 0!==i.style&&void 0!==i.style.numberFormat?e+=this.parseCellValue(this.formatter.displayText(i.value,{format:i.style.numberFormat,ignoreCurrency:!0},this.isServerRendered)):void 0!==i.style&&void 0!==i.style.name&&this.globalStyles.has(i.style.name)?e+=this.parseCellValue(this.formatter.displayText(i.value,{format:this.globalStyles.get(i.style.name),ignoreCurrency:!0},this.isServerRendered)):e+=i.value:e+=this.parseCellValue(i.value);this.csvStr=e},a.prototype.parseCellValue=function(i){for(var e="",t=i.length,n=0;n<t;n++)e+='"'===i[n]?i[n].replace('"','""'):i[n];return-1!==(i=e).indexOf(this.separator)||-1!==i.indexOf("\n")||-1!==i.indexOf('"')?i='"'+i+'"':i},a.prototype.save=function(i){if(this.buffer=new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"}),this.isMicrosoftBrowser)navigator.msSaveBlob(this.buffer,i);else{var e=window.URL.createObjectURL(this.buffer),t=document.createElementNS("http://www.w3.org/1999/xhtml","a");t.download=i,t.href=e;var n=document.createEvent("MouseEvent");n.initEvent("click",!0,!0),t.dispatchEvent(n),setTimeout(function(){window.URL.revokeObjectURL(e)})}},a.prototype.saveAsBlob=function(i){if(null!=i){var e=new Rh,t="UTF-8";"ANSI"==i.toUpperCase()?(e.type="Ansi",t="ANSI"):"UNICODE"==i.toUpperCase()?(e.type="Unicode",t="UNICODE"):(e.type="Utf8",t
1="UTF-8");var n=e.getBytes(this.csvStr,0,this.csvStr.length);return new Blob([n],{type:"text/csv;charset="+t})}return new Blob(["\ufeff"+this.csvStr],{type:"text/csv;charset=UTF-8"})},a}(),ob=function(){function a(){this.parts=[]}return a.prototype.append=function(i){this.parts.push(i),this.blob=void 0},a.prototype.getBlob=function(){return new Blob(this.parts,{type:"text/plain"})},a}(),H1=function(){return function a(){}}(),z1=function(){function a(i,e,t,n,r){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!==t?t:"en-US",this.currency=void 0!==n?n:"USD",this.intl=new s.DL(this.culture),this.mSaveType=e,"xlsx"===e){if(this.mArchive=new Li,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 ys),this.mFonts.push(new J0),this.cellStyles.set("Normal",new K0),this.mCellXfs=[],this.mCellStyleXfs=[],this.drawingCount=0,this.imageCount=0,null!=i.styles){this.globalStyles=new Map;for(var o=0;o<i.styles.length;o++)if(void 0!==i.styles[o].name){if(this.cellStyles.has(i.styles[o].name))throw Error("Style name "+i.styles[o].name+" is already existed");var l=new ys;l.isGlobalStyle=!0,this.parserCellStyle(i.styles[o],l,"none");var h=new K0;h.name=l.name,h.xfId=l.index-1,this.cellStyles.set(h.name,h);var d={};void 0!==i.styles[o].numberFormat&&(d.format=i.styles[o].numberFormat),d.type=void 0!==i.styles[o].type?i.styles[o].type:"datetime",void 0!==d.format&&this.globalStyles.set(i.styles[o].name,d)}}if(null==i.worksheets)throw Error("Worksheet is expected.");this.parserWorksheets(i.worksheets),null!=i.builtInProperties&&(this.builtInProperties=new X1,this.parserBuiltInProperties(i.builtInProperties,this.builtInProperties))}else this.csvHelper=new B1(i,r)}return a.prototype.parserBuiltInProperties=function(i,e){null!=i.author&&(e.author=i.author),null!=i.comments&&(e.comments=i.comments),null!=i.category&&(e.category=i.category),null!=i.company&&(e.company=i.company),null!=i.manager&&(e.manager=i.manager),null!=i.subject&&(e.subject=i.subject),null!=i.title&&(e.title=i.title),null!=i.createdDate&&(e.createdDate=i.createdDate),null!=i.modifiedDate&&(e.modifiedDate=i.modifiedDate),null!=i.tags&&(e.tags=i.tags),null!=i.status&&(e.status=i.status)},a.prototype.parserWorksheets=function(i){this.worksheets=new D1;for(var e=i.length,t=0;t<e;t++){var n=i[t],r=new M1;this.mergeCells=new N1,this.mergedCellsStyle=new Map,this.mHyperLinks=[],r.name=null!=n.name?n.name:"Sheet"+(t+1).toString(),null!=n.enableRtl&&(r.enableRtl=n.enableRtl),r.index=t+1,null!=n.columns&&this.parserColumns(n.columns,r),null!=n.rows&&this.parserRows(n.rows,r),null!=n.showGridLines&&(r.showGridLines=n.showGridLines),null!=n.freeze&&this.parserFreezePanes(n.freeze,r),null!=n.printTitle&&this.parserPrintTitle(n.printTitle,r),void 0!==n.pageSetup&&void 0!==n.pageSetup.isSummaryRowBelow&&(r.isSummaryRowBelow=n.pageSetup.isSummaryRowBelow),void 0!==n.images&&this.parserImages(n.images,r),null!=n.autoFilters&&this.parseFilters(n.autoFilters,r),r.index=t+1,r.mergeCells=this.mergeCells,r.hyperLinks=this.mHyperLinks,this.worksheets.push(r)}},a.prototype.mergeOptions=function(i,e){var t={};return this.applyProperties(i,t),this.applyProperties(e,t),t},a.prototype.applyProperties=function(i,e){for(var t=Object.keys(i),n=0;n<t.length;n++)"name"!==t[n]&&(e[t[n]]=i[t[n]])},a.prototype.getCellName=function(i,e){return this.getColumnName(e)+i.toString()},a.prototype.getColumnName=function(i){i--;var e="";do{var t=i%26;i=i/26-1,e=String.fromCharCode(65+t)+e}while(i>=0);return e},a.prototype.parserPrintTitle=function(i,e){var n,l,t="";if(null!=i.fromRow&&(n="$"+i.fromRow+":$"+(null!=i.toRow?i.toRow:i.fromRow)),null!=i.fromColumn){var d;d=null!=i.toColumn?i.toColumn:i.fromColumn,l="$"+this.getColumnName(i.fromColumn)+":$"+this.getColumnName(d)}void 0!==n&&(t+=e.name+"!"+n),void 0!==l&&void 0!==n?t+=","+e.name+"!"+l:void 0!==l&&(t+=e.name+"!"+l),""!==t&&this.printTitles.set(e.index-1,t)},a.prototype.parserFreezePanes=function(i,e){e.freezePanes=new R1,e.freezePanes.row=null!=i.row?i.row:0,e.freezePanes.column=null!=i.column?i.column:0,e.freezePanes.leftCell=this.getCellName(e.freezePanes.row+1,e.freezePanes.column+1)},a.prototype.parserColumns=function(i,e){var t=i.length;e.columns=[];for(var n=0;n<t;n++){var r=new w1;if(null==i[n].index)throw Error("Column index is missing.");r.index=i[n].index,null!=i[n].width&&(r.width=i[n].width),e.columns.push(r)}},a.prototype.parserRows=function(i,e){var t=i.length;e.rows=new A1;for(var n=0,r=0;r<t;r++){var o=this.parserRow(i[r],n);n=o.index,e.rows.add(o)}this.insertMergedCellsStyle(e)},a.prototype.insertMergedCellsStyle=function(i){var e=this;this.mergeCells.length>0&&this.mergedCellsStyle.forEach(function(t,n){var r=i.rows.filter(function(u){return u.index===t.y})[0];if((0,s.hX)(r)){var d=i.rows.filter(function(f){return f.index<=t.y}),p=new nb;p.index=t.y,p.cells=new ib,p.cells.add(e.createCell(t,n));var h=0;d.length>0&&(h=i.rows.indexOf(d[d.length-1])+1),i.rows.splice(h,0,p)}else{var o=r.cells.filter(function(u){return u.index===t.x})[0];if((0,s.hX)(o)){var l=r.cells.filter(function(u){return u.index<=t.x});h=0,l.length>0&&(h=r.cells.indexOf(l[l.length-1])+1),r.cells.splice(h,0,e.createCell(t,n))}else o.styleIndex=t.styleIndex}})},a.prototype.createCell=function(i,e){var t=new tb;return t.refName=e,t.index=i.x,t.cellStyle=new ys,t.styleIndex=i.styleIndex,t},a.prototype.parserRow=function(i,e){var t=new nb;if(null!=i.height&&(t.height=i.height),null==i.index)throw Error("Row index is missing.");return t.index=i.index,null!=i.grouping&&this.parseGrouping(i.grouping,t),this.parseCells(i.cells,t),t},a.prototype.parseGrouping=function(i,e){e.grouping=new L1,void 0!==i.outlineLevel&&(e.grouping.outlineLevel=i.outlineLevel),void 0!==i.isCollapsed&&(e.grouping.isCollapsed=i.isCollapsed),void 0!==i.isHidden&&(e.grouping.isHidden=i.isHidden)},a.prototype.parseCells=function(i,e){e.cells=new ib;for(var t=void 0!==i?i.length:0,n=1,r=1,l=0;l<t;l++){var h=i[l],d=new tb;if(null==h.index)throw Error("Cell index is missing.");if(d.index=h.index,d.index<n?n=d.index:d.index>r&&(r=d.index),d.refName=this.getCellName(e.index,d.index),d.rowSpan=null!=h.rowSpan?h.rowSpan-1:0,d.colSpan=null!=h.colSpan?h.colSpan-1:0,null!=h.hyperlink){var p=new rb;void 0!==h.hyperlink.target&&(p.target=h.hyperlink.target,d.value=void 0!==h.hyperlink.displayText?h.hyperlink.displayText:h.hyperlink.target,d.type=this.getCellValueType(d.value),p.ref=d.refName,p.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(p),d.cellStyle=new ys,this.parserCellStyle(void 0!==h.style?this.mergeOptions(h.style,this.hyperlinkStyle):this.hyperlinkStyle,d.cellStyle,"string"),d.styleIndex=d.cellStyle.index)}
1null!=h.formula&&(d.formula=h.formula,d.type="formula"),null!=h.value&&(void 0!==d.formula?d.value=0:(d.value=h.value,d.type=this.getCellValueType(d.value))),null!=h.style&&void 0===d.styleIndex?(d.cellStyle=new ys,d.value instanceof Date?this.parserCellStyle(h.style,d.cellStyle,d.type,14):this.parserCellStyle(h.style,d.cellStyle,d.type),d.styleIndex=d.cellStyle.index):d.value instanceof Date&&(d.cellStyle=new ys,this.parserCellStyle({},d.cellStyle,d.type,14),d.styleIndex=d.cellStyle.index),this.parseCellType(d),this.mergeCells=this.processMergeCells(d,e.index,this.mergeCells),e.cells.add(d)}e.spans=n+":"+r},a.prototype.GetColors=function(){var i;return(i=new Map).set("WHITE","FFFFFFFF"),i.set("SILVER","FFC0C0C0"),i.set("GRAY","FF808080"),i.set("BLACK","FF000000"),i.set("RED","FFFF0000"),i.set("MAROON","FF800000"),i.set("YELLOW","FFFFFF00"),i.set("OLIVE","FF808000"),i.set("LIME","FF00FF00"),i.set("GREEN","FF008000"),i.set("AQUA","FF00FFFF"),i.set("TEAL","FF008080"),i.set("BLUE","FF0000FF"),i.set("NAVY","FF000080"),i.set("FUCHSIA","FFFF00FF"),i.set("PURPLE","FF800080"),i},a.prototype.processColor=function(i){return 0===i.indexOf("#")?i.replace("#","FF"):(i=i.toUpperCase(),this.rgbColors=this.GetColors(),i=this.rgbColors.has(i)?this.rgbColors.get(i):"FF000000")},a.prototype.processCellValue=function(i,e){var t=i;if(-1!==i.indexOf("<font")||-1!==i.indexOf("<a")||-1!==i.indexOf("<b>")||-1!==i.indexOf("<i>")||-1!==i.indexOf("<u>")){var n="",r=i.indexOf("<",0),o=i.indexOf(">",r+1);if(r>=0&&o>=0){for(0!==r&&(n+='<r><t xml:space="preserve">'+this.processString(i.substring(0,r))+"</t></r>");r>=0&&o>=0;)if((o=i.indexOf(">",r+1))>=0){var l=i.substring(r+1,o);(r=i.indexOf("<",o+1))<0&&(r=t.length);var h=t.substring(o+1,r);if(0!==h.length){var d=l.split(" ");if(d.length>0&&(n+="<r><rPr>"),d.length>1)for(var p=0,u=d;p<u.length;p++){var f=u[p];switch(f.trim().substring(0,5)){case"size=":n+='<sz val="'+f.substring(6,f.length-1)+'"/>';break;case"face=":n+='<rFont val="'+f.substring(6,f.length-1)+'"/>';break;case"color":n+='<color rgb="'+this.processColor(f.substring(7,f.length-1))+'"/>';break;case"href=":var g=new rb;g.target=f.substring(6,f.length-1).trim(),g.ref=e.refName,g.rId=this.mHyperLinks.length+1,this.mHyperLinks.push(g),n+='<color rgb="FF0000FF"/><u/><b/>'}}else if(1===d.length)switch(d[0].trim()){case"b":n+="<b/>";break;case"i":n+="<i/>";break;case"u":n+="<u/>"}n+='</rPr><t xml:space="preserve">'+this.processString(h)+"</t></r>"}}return""===n?t:n}return t}return t},a.prototype.applyGlobalStyle=function(i,e){this.cellStyles.has(i.name)&&(e.index=this.mStyles.filter(function(t){return t.name===i.name})[0].index,e.name=i.name)},a.prototype.parserCellStyle=function(i,e,t,n){if(null!=i.name){if(!e.isGlobalStyle)return void this.applyGlobalStyle(i,e);e.name=i.name}null!=i.backColor&&(e.backColor=i.backColor),e.borders=new eb,null!=i.borders&&this.parserBorder(i.borders,e.borders.all),null!=i.leftBorder&&this.parserBorder(i.leftBorder,e.borders.left),null!=i.rightBorder&&this.parserBorder(i.rightBorder,e.borders.right),null!=i.topBorder&&this.parserBorder(i.topBorder,e.borders.top),null!=i.bottomBorder&&this.parserBorder(i.bottomBorder,e.borders.bottom),null!=i.fontName&&(e.fontName=i.fontName),null!=i.fontSize&&(e.fontSize=i.fontSize),null!=i.fontColor&&(e.fontColor=i.fontColor),null!=i.italic&&(e.italic=i.italic),null!=i.bold&&(e.bold=i.bold),null!=i.hAlign&&(e.hAlign=i.hAlign.toLowerCase()),null!=i.indent&&(e.indent=i.indent,"left"===e.hAlign||"right"===e.hAlign||(e.hAlign="left")),null!=i.rotation&&(e.rotation=i.rotation),null!=i.vAlign&&(e.vAlign=i.vAlign.toLowerCase()),null!=i.underline&&(e.underline=i.underline),null!=i.strikeThrough&&(e.strikeThrough=i.strikeThrough),null!=i.wrapText&&(e.wrapText=i.wrapText),null!=i.numberFormat?e.numberFormat=this.getNumberFormat(i.numberFormat,null!=i.type?i.type:t):(void 0!==n&&(e.numFmtId=14),e.numberFormat="GENERAL"),e.index=this.processCellStyle(e)},a.prototype.switchNumberFormat=function(i,e){var t=this.getNumberFormat(i,e);if(t!==i){var n=this.mNumFmt.get(i);if(void 0!==n&&(n.formatCode=t,this.mNumFmt.has(t))){for(var r=0,o=this.mCellStyleXfs;r<o.length;r++){var l=o[r];l.numFmtId===n.numFmtId&&(l.numFmtId=this.mNumFmt.get(t).numFmtId)}for(var h=0,d=this.mCellXfs;h<d.length;h++){var p=d[h];p.numFmtId===n.numFmtId&&(p.numFmtId=this.mNumFmt.get(t).numFmtId)}}}},a.prototype.changeNumberFormats=function(i){if("string"==typeof i){var e=new RegExp(this.currency,"g");i=i.replace(e,"[$"+this.currency+"]")}else if("object"==typeof i)for(var t=0;t<i.length;t++)i[t]=i[t].replace(this.currency,"[$"+this.currency+"]");return i},a.prototype.getNumberFormat=function(i,e){var t;switch(e){case"number":try{t=this.intl.getNumberPattern({format:i,currency:this.currency,useGrouping:!0},!0),this.currency.length>1&&(t=this.changeNumberFormats(t))}catch{t=i}break;case"datetime":try{t=this.intl.getDatePattern({skeleton:i,type:"dateTime"},!0)}catch{try{t=this.intl.getDatePattern({format:i,type:"dateTime"},!0)}catch{t=i}}break;case"date":try{t=this.intl.getDatePattern({skeleton:i,type:"date"},!0)}catch{try{t=this.intl.getDatePattern({format:i,type:"date"},!0)}catch{t=i}}break;case"time":try{t=this.intl.getDatePattern({skeleton:i,type:"time"},!0)}catch{try{t=this.intl.getDatePattern({format:i,type:"time"},!0)}catch{t=i}}break;default:t=i}return t},a.prototype.parserBorder=function(i,e){e.color=null!=i.color?i.color:"#000000",e.lineStyle=null!=i.lineStyle?i.lineStyle:"thin"},a.prototype.processCellStyle=function(i){if(i.isGlobalStyle)return this.processNumFormatId(i),this.mStyles.push(i),this.mStyles.length;var e=this.compareStyle(i);return e.result?e.index:(this.processNumFormatId(i),this.mStyles.push(i),this.mStyles.length)},a.prototype.processNumFormatId=function(i){"GENERAL"===i.numberFormat||this.mNumFmt.has(i.numberFormat)||this.mNumFmt.set(i.numberFormat,new Z0(this.mNumFmt.size+164,
1i.numberFormat))},a.prototype.isNewFont=function(i){for(var e=!1,t=0,n=0,r=this.mFonts;n<r.length;n++){var o=r[n];t++;var l=void 0;if(void 0!==i.fontColor&&(l="FF"+i.fontColor.replace("#","")),e=o.color===l&&o.b===i.bold&&o.i===i.italic&&o.u===i.underline&&o.strike===i.strikeThrough&&o.name===i.fontName&&o.sz===i.fontSize)break}return{index:t-=1,result:e}},a.prototype.isNewBorder=function(i){var e=new ys;return this.isAllBorder(i.borders)?e.borders.all.color===i.borders.all.color&&e.borders.all.lineStyle===i.borders.all.lineStyle:e.borders.left.color===i.borders.left.color&&e.borders.left.lineStyle===i.borders.left.lineStyle&&e.borders.right.color===i.borders.right.color&&e.borders.right.lineStyle===i.borders.right.lineStyle&&e.borders.top.color===i.borders.top.color&&e.borders.top.lineStyle===i.borders.top.lineStyle&&e.borders.bottom.color===i.borders.bottom.color&&e.borders.bottom.lineStyle===i.borders.bottom.lineStyle},a.prototype.isAllBorder=function(i){var e=new ys;return e.borders.all.color!==i.all.color&&e.borders.all.lineStyle!==i.all.lineStyle},a.prototype.compareStyle=function(i){for(var e=!0,t=0,n=0,r=this.mStyles;n<r.length;n++){var o=r[n];if(e=!o.isGlobalStyle&&o.backColor===i.backColor&&o.bold===i.bold&&o.numFmtId===i.numFmtId&&o.numberFormat===i.numberFormat&&o.type===i.type&&o.fontColor===i.fontColor&&o.fontName===i.fontName&&o.fontSize===i.fontSize&&o.hAlign===i.hAlign&&o.italic===i.italic&&o.underline===i.underline&&o.strikeThrough===i.strikeThrough&&o.vAlign===i.vAlign&&o.indent===i.indent&&o.rotation===i.rotation&&o.wrapText===i.wrapText&&o.borders.all.color===i.borders.all.color&&o.borders.all.lineStyle===i.borders.all.lineStyle&&o.borders.left.color===i.borders.left.color&&o.borders.left.lineStyle===i.borders.left.lineStyle&&o.borders.right.color===i.borders.right.color&&o.borders.right.lineStyle===i.borders.right.lineStyle&&o.borders.top.color===i.borders.top.color&&o.borders.top.lineStyle===i.borders.top.lineStyle&&o.borders.bottom.color===i.borders.bottom.color&&o.borders.bottom.lineStyle===i.borders.bottom.lineStyle){t=o.index;break}}return{index:t,result:e}},a.prototype.contains=function(i,e){var t=i.indexOf(e);return t>-1&&t<i.length},a.prototype.getCellValueType=function(i){return i instanceof Date?"datetime":"boolean"==typeof i?"boolean":"number"==typeof i?"number":"string"},a.prototype.parseCellType=function(i){var t,n=i.value;switch(i.type){case"datetime":if(n=this.toOADate(n),void 0!==i.cellStyle&&void 0!==i.cellStyle.name&&this.globalStyles.has(i.cellStyle.name)){var r=this.globalStyles.get(i.cellStyle.name);this.switchNumberFormat(r.format,r.type)}t="n";break;case"boolean":n=n?1:0,t="b";break;case"number":t="n",void 0!==i.cellStyle&&void 0!==i.cellStyle.name&&this.globalStyles.has(i.cellStyle.name)&&this.switchNumberFormat(this.globalStyles.get(i.cellStyle.name).format,"number");break;case"string":this.sharedStringCount++,t="s";var o=this.processCellValue(n,i);this.contains(this.sharedString,o)||this.sharedString.push(o),n=this.sharedString.indexOf(o)}i.saveType=t,i.value=n},a.prototype.parserImages=function(i,e){var t=i.length;e.images=[];for(var n=0;n<t;n++){var r=this.parserImage(i[n]);e.images.push(r)}},a.prototype.parseFilters=function(i,e){if(e.autoFilters=new H1,null==i.row)throw new Error("Argument Null Exception: row null or empty");if(e.autoFilters.row=i.row,null==i.lastRow)throw new Error("Argument Null Exception: lastRow cannot be null or empty");if(e.autoFilters.lastRow=i.lastRow,null==i.column)throw new Error("Argument Null Exception: column cannot be null or empty");if(e.autoFilters.column=i.column,null===i.lastColumn||void 0===i.row)throw new Error("Argument Null Exception: lastColumn cannot be null or empty");e.autoFilters.lastColumn=i.lastColumn},a.prototype.parserImage=function(i){var e=new V1;return null!=i.image&&(e.image=i.image),null!=i.row&&(e.row=i.row),null!=i.column&&(e.column=i.column),null!=i.lastRow&&(e.lastRow=i.lastRow),null!=i.lastColumn&&(e.lastColumn=i.lastColumn),null!=i.width&&(e.width=i.width),null!=i.height&&(e.height=i.height),null!=i.horizontalFlip&&(e.horizontalFlip=i.horizontalFlip),null!=i.verticalFlip&&(e.verticalFlip=i.verticalFlip),null!=i.rotation&&(e.rotation=i.rotation),e},a.prototype.saveAsBlob=function(i,e){var t=this;return new Promise("text/csv"===i?function(n,r){var o={};o.blobData=t.csvHelper.saveAsBlob(e),n(o)}:function(n,r){t.saveInternal(),t.mArchive.saveAsBlob().then(function(o){var l={};l.blobData=new Blob([o],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),n(l)})})},a.prototype.save=function(i,e){var t=this;if(null==i||""===i)throw new Error("Argument Null Exception: fileName cannot be null or empty");var n=i.match(".xlsx$"),r=i.match(".csv$");if(null!==n&&n[0]==="."+this.mSaveType)this.saveInternal(),this.mArchive.save(i).then(function(){t.mArchive.destroy()});else{if(null===r||r[0]!=="."+this.mSaveType)throw Error("Save type and file extension is different.");this.csvHelper.save(i)}},a.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()},a.prototype.saveWorkbook=function(){for(var i='<?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>',e="<sheets>",t=this.worksheets.length,n=0;n<t;n++){var r=this.worksheets[n].name;e+='<sheet name="'+(r=(r=(r=(r=r.replace("&","&amp;")).replace("<","&lt;")).replace(">","&gt;")).replace('"',"&quot;"))+'" sheetId="'+(n+1).toString()+'" r:id ="rId'+(n+1).toString()+'" />'}if(i+=e+="</sheets>",this.printTitles.size>0){var o="<definedNames>";
1this.printTitles.forEach(function(l,h){o+='<definedName name="_xlnm.Print_Titles" localSheetId="'+h+'">'+l+"</definedName>"}),i+=o+="</definedNames>"}this.addToArchive(i+"</workbook>","xl/workbook.xml")},a.prototype.saveWorksheets=function(){for(var i=this.worksheets.length,e=0;e<i;e++)this.saveWorksheet(this.worksheets[e],e)},a.prototype.saveWorksheet=function(i,e){var t=new ob,n='<?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(n+=i.isSummaryRowBelow?"<sheetPr />":'<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>',n+=this.saveSheetView(i),void 0!==i.columns){for(var r="<cols>",o=0,l=i.columns;o<l.length;o++){var h=l[o];r+=void 0!==h.width?'<col min="'+h.index+'" max="'+h.index+'" width="'+this.pixelsToColumnWidth(h.width)+'" customWidth="1" />':'<col min="'+h.index+'" max="'+h.index+'" width="8.43" customWidth="1" />'}n+=r+"</cols>"}if(t.append(n+="<sheetData>"),n="",void 0!==i.rows)for(var d=0,p=i.rows;d<p.length;d++){var u=p[d],f='<row r="'+u.index+'" ';(0,s.hX)(u.spans)||(f+='spans="'+u.spans+'" '),void 0!==u.height&&(f+='ht="'+this.pixelsToRowHeight(u.height)+'" customHeight="1" '),void 0!==u.grouping&&(u.grouping.isHidden&&(f+='hidden="1" '),void 0!==u.grouping.outlineLevel&&(f+='outlineLevel="'+u.grouping.outlineLevel+'" '),u.grouping.isCollapsed&&(f+='collapsed="1" ')),f+=">";for(var m=0,g=u.cells;m<g.length;m++){var v=g[m];void 0!==v&&(void 0!==v.value||void 0!==v.cellStyle)&&(f+='<c r="'+v.refName+'" ',void 0!==v.saveType&&(f+='t="'+v.saveType+'" '),void 0!==v.styleIndex&&(f+='s="'+v.styleIndex+'" '),f+=" >",void 0!==v.formula&&(f+="<f>"+v.formula+"</f>"),f+=void 0!==v.value?"<v>"+v.value+"</v></c>":"</c>")}t.append(f+="</row>")}if(n+="</sheetData>",null!=i.autoFilters&&(n+='<autoFilter ref="'+this.getCellName(i.autoFilters.row,i.autoFilters.column)+":"+this.getCellName(i.autoFilters.lastRow,i.autoFilters.lastColumn)+'"/>'),i.mergeCells.length>0){n+='<mergeCells count="'+i.mergeCells.length+'">';for(var b=0,y=i.mergeCells;b<y.length;b++)n+='<mergeCell ref="'+y[b].ref+'" />';n+="</mergeCells>"}if(i.hyperLinks.length>0){n+="<hyperlinks>";for(var E=0,_=i.hyperLinks;E<_.length;E++){var T=_[E];n+='<hyperlink ref="'+T.ref+'" r:id="rId'+T.rId+'" />'}n+="</hyperlinks>"}n+='<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" />',null!=i.images&&i.images.length>0&&(this.drawingCount++,this.saveDrawings(i,i.index),n+='<drawing r:id="rId'+(i.hyperLinks.length+1)+'"/>'),this.addToArchive(this.saveSheetRelations(i),"xl/worksheets/_rels/sheet"+i.index+".xml.rels"),t.append(n+"</worksheet>"),this.addToArchive(t.getBlob(),"xl/worksheets/sheet"+(e+1)+".xml")},a.prototype.saveDrawings=function(i,e){var t=new ob,n='<xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">';if(void 0!==i.images){for(var r=0,o=0,l=i.images;o<l.length;o++){var h=l[o];void 0!==h.height&&void 0!==h.width?(this.updatelastRowOffset(i,h),this.updatelastColumnOffSet(i,h),h.lastRow-=1,h.lastColumn-=1):void 0!==h.lastRow&&void 0!==h.lastColumn&&(h.lastRowOffset=0,h.lastColOffset=0),r++,n+='<xdr:twoCellAnchor editAs="oneCell">',n+="<xdr:from><xdr:col>",n+=h.column-1,n+="</xdr:col><xdr:colOff>",n+=0,n+="</xdr:colOff><xdr:row>",n+=h.row-1,n+="</xdr:row><xdr:rowOff>",n+=0,n+="</xdr:rowOff></xdr:from>",n+="<xdr:to><xdr:col>",n+=h.lastColumn,n+="</xdr:col><xdr:colOff>",n+=h.lastColOffset,n+="</xdr:colOff><xdr:row>",n+=h.lastRow,n+="</xdr:row><xdr:rowOff>",n+=h.lastRowOffset,n+="</xdr:rowOff></xdr:to>",n+="<xdr:pic>",n+="<xdr:nvPicPr>",n+='<xdr:cNvPr id="'+r+'" name="Picture '+r+'"> </xdr:cNvPr>',n+='<xdr:cNvPicPr><a:picLocks noChangeAspect="1"/></xdr:cNvPicPr> </xdr:nvPicPr>',n+="<xdr:blipFill>",n+='<a:blip xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:embed="rId'+r+'" cstate="print">',n+="</a:blip><a:stretch><a:fillRect /></a:stretch></xdr:blipFill>",n+="<xdr:spPr>",n+="<a:xfrm",null!=h.rotation&&h.rotation<=3600&&h.rotation>=-3600&&(n+=' rot="'+6e4*h.rotation+'"'),null!=h.verticalFlip&&0!=h.verticalFlip&&(n+=' flipV="1"'),null!=h.horizontalFlip&&0!=h.horizontalFlip&&(n+=' flipH="1"'),n+="/>",n+='<a:prstGeom prst="rect"><a:avLst /></a:prstGeom>
1</xdr:spPr>',n+="</xdr:pic><xdr:clientData /></xdr:twoCellAnchor>";var d=this.convertBase64toImage(h.image);this.imageCount+=1,this.addToArchive(d,"xl/media/image"+this.imageCount+".png")}t.append(n),t.append("</xdr:wsDr>"),this.saveDrawingRelations(i),this.addToArchive(t.getBlob(),"xl/drawings/drawing"+this.drawingCount+".xml")}},a.prototype.updatelastRowOffset=function(i,e){for(var t=e.height,n=e.row,r=0;t>=0;){var o,l=(o=this.convertToPixels(void 0!==i.rows&&void 0!==i.rows[n-1]?void 0===i.rows[n-1].height?15:i.rows[n-1].height:15))-r*o/256;if(l>t){e.lastRow=n,e.lastRowOffset=r+256*t/o;var h;h=this.convertToPixels(void 0!==i.rows&&void 0!==i.rows[n-1]?void 0===i.rows[n-1].height?15:i.rows[n-1].height:15),e.lastRowOffset=h*e.lastRowOffset/256,e.lastRowOffset=Math.round(e.lastRowOffset/this.unitsProportions[7]);break}t-=l,n++,r=0}},a.prototype.updatelastColumnOffSet=function(i,e){for(var t=e.width,n=e.column,r=0;t>=0;){var o,l=(o=this.ColumnWidthToPixels(void 0!==i.columns&&void 0!==i.columns[n-1]?void 0===i.columns[n-1].width?8.43:i.columns[n-1].width:8.43))-r*o/1024;if(l>t){e.lastColumn=n,e.lastColOffset=r+1024*t/o;var h;h=this.ColumnWidthToPixels(void 0!==i.columns&&void 0!==i.columns[n-1]?void 0===i.columns[n-1].width?8.43:i.columns[n-1].width:8.43),e.lastColOffset=h*e.lastColOffset/1024,e.lastColOffset=Math.round(e.lastColOffset/this.unitsProportions[7]);break}t-=l,n++,r=0}},a.prototype.convertToPixels=function(i){return i*this.unitsProportions[6]},a.prototype.convertBase64toImage=function(i){for(var e=window.atob(i),t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return new Blob([n],{type:"image/png"})},a.prototype.saveDrawingRelations=function(i){for(var e='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',t=i.images.length,n=this.imageCount-i.images.length,r=1;r<=t;r++)e+='<Relationship Id="rId'+r+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image'+ ++n+'.png" />';this.addToArchive(e+"</Relationships>","xl/drawings/_rels/drawing"+this.drawingCount+".xml.rels")},a.prototype.pixelsToColumnWidth=function(i){var t=i>12?this.trunc((i-5)/7*100+.5)/100:i/12;return t>1?(7*t+5)/7*256/256:12*t/7*256/256},a.prototype.ColumnWidthToPixels=function(i){return this.trunc((256*(i>1?(7*i+5)/7*256/256:12*i/7*256/256)+this.trunc(128/7))/256*7)},a.prototype.trunc=function(i){var e=i-i%1;return 0===e&&(i<0||0===i&&1/i!=1/0)?-0:e},a.prototype.pixelsToRowHeight=function(i){return i*this.unitsProportions[5]/this.unitsProportions[6]},a.prototype.saveSheetRelations=function(i){for(var e='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',t=0,n=i.hyperLinks;t<n.length;t++){var r=n[t];e+='<Relationship Id="rId'+r.rId+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+this.processString(r.target)+'" TargetMode="External" />'}return null!=i.images&&i.images.length>0&&(e+='<Relationship Id="rId'+(i.hyperLinks.length+1)+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing" Target="../drawings/drawing'+this.drawingCount+'.xml" />'),e+"</Relationships>"},a.prototype.saveSheetView=function(i){var e='<sheetViews><sheetView workbookViewId="0" ';return!0===i.enableRtl&&(e+='rightToLeft="1"'),e+=!1===i.showGridLines?'showGridLines="0" >':">",void 0!==i.freezePanes&&(e+='<pane state="frozen" topLeftCell="'+i.freezePanes.leftCell+'" ',0!==i.freezePanes.row&&(e+='ySplit="'+i.freezePanes.row+'" '),0!==i.freezePanes.column&&(e+='xSplit="'+i.freezePanes.column+'" '),e+="/>"),e+"</sheetView></sheetViews > "},a.prototype.saveSharedString=function(){var i=this.sharedString.length;if(i>0){for(var e='<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="'+i+'" count="'+this.sharedStringCount+'" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">',t="",n=0;n<i;n++)0!==this.sharedString[n].indexOf("<r>")?(t+="<si><t>",t+=this.processString(this.sharedString[n]),t+="</t></si>"):(t+="<si>",t+=this.sharedString[n],t+="</si>");this.addToArchive(e+(t+="</sst>"),"xl/sharedStrings.xml")}},a.prototype.processString=function(i){if("string"==typeof i)-1!==i.indexOf("&")&&(i=i.replace(/&/g,"&amp;")),-1!==i.indexOf("<")&&(i=i.replace(/</g,"&lt;")),-1!==i.indexOf(">")&&(i=i.replace(/>/g,"&gt;")),-1!==i.indexOf("\v")&&(i=i.replace(/\v/g,"_x000B_"));else if("object"==typeof i)for(var e=0;e<i.length;e++)-1!==i[e].indexOf("&")&&(i[e]=i[e].replace(/&/g,"&amp;")),-1!==i[e].indexOf("<")&&(i[e]=i[e].replace(/</g,"&lt;")),-1!==i[e].indexOf(">")&&(i[e]=i[e].replace(/>/g,"&gt;")),-1!==i[e].indexOf("\v")&&(i[e]=i[e].replace(/\v/g,"_x000B_"));return i},a.prototype.saveStyles=function(){this.updateCellXfsStyleXfs();var i='<?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">';i+=this.saveNumberFormats(),i+=this.saveFonts(),i+=this.saveFills(),i+=this.saveBorders(),i+=this.saveCellStyleXfs(),i+=this.saveCellXfs(),i+=this.saveCellStyles(),this.addToArchive(i+"</styleSheet>","xl/styles.xml")},a.prototype.updateCellXfsStyleXfs=function(){for(var i=0,e=this.mStyles;i<e.length;i++){var t=e[i],n=void 0;t.isGlobalStyle?(n=new I1).xfId=t.index-1:(n=new _1).xfId=0;var r=this.isNewFont(t);if(r.result)n.fontId=r.index;else{var o=new J0;o.b=t.bold,o.i=t.italic,o.name=t.fontName,o.sz=t.fontSize,o.u=t.underline,o.strike=t.strikeThrough,o.color="FF"+t.fontColor.replace("#",""),this.mFonts.push(o),n.fontId=this.mFonts.length-1}if("none"!==t.backColor){var l="FF"+t.backColor.replace("#","");if(this.mFills.has(l)){var h=this.mFills.get(l);n.fillId=h}else this.mFills.set(l,h=this.mFills.size+2),n.fillId=h}else n.fillId=0;if(this.isNewBorder(t)?n.borderId=0:(this.mBorders.push(t.borders),n.borderId=this.mBorders.length),"GENERAL"!==t.numberFormat)if(this.mNumFmt.has(t.numberFormat)){var d=this.mNumFmt.get(t.numberFormat);n.numFmtId=d.numFmtId}else{var p=this.mNumFmt.size+164;this.mNumFmt.set(t.numberFormat,new Z0(p,t.numberFormat)),n.numFmtId=p}else n.numFmtId="GENERAL"===t.numberFormat&&14===t.numFmtId?14:0;
1t.isGlobalStyle||(n.applyAlignment=1),n.alignment=new T1,n.alignment.indent=t.indent,n.alignment.horizontal=t.hAlign,n.alignment.vertical=t.vAlign,n.alignment.wrapText=t.wrapText?1:0,n.alignment.rotation=t.rotation,t.isGlobalStyle?(this.mCellStyleXfs.push(n),this.mCellXfs.push(n)):this.mCellXfs.push(n)}},a.prototype.saveNumberFormats=function(){if(this.mNumFmt.size>=1){var i='<numFmts count="'+this.mNumFmt.size+'">';return this.mNumFmt.forEach(function(e,t){i+='<numFmt numFmtId="'+e.numFmtId+'" formatCode="'+e.formatCode.replace(/"/g,"&quot;")+'" />'}),i+="</numFmts>"}return""},a.prototype.saveFonts=function(){var i='<fonts count="'+this.mFonts.length+'">';if(this.mFonts.length>=1)for(var e=0,t=this.mFonts;e<t.length;e++){var n=t[e];i+="<font>",n.b&&(i+="<b />"),n.i&&(i+="<i />"),n.u&&(i+="<u />"),n.strike&&(i+="<strike />"),i+='<sz val="'+n.sz+'" />',i+='<color rgb="'+n.color+'" />',i+='<name val="'+n.name+'" /></font>'}return i+"</fonts>"},a.prototype.saveFills=function(){var i='<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(e,t){i+='<fill><patternFill patternType="solid"><fgColor rgb="'+t+'" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>'}),i+"</fills>"},a.prototype.saveBorders=function(){var i='<borders count="'+(this.mBorders.length+1)+'"><border><left /><right /><top /><bottom /><diagonal /></border>';if(this.mBorders.length>=1)for(var e=0,t=this.mBorders;e<t.length;e++){var n=t[e];if(this.isAllBorder(n)){var r=n.all.color.replace("#",""),o=n.all.lineStyle;i+='<border><left style="'+o+'"><color rgb="FF'+r+'" /></left><right style="'+o+'"><color rgb="FF'+r+'" /></right><top style="'+o+'"><color rgb="FF'+r+'" /></top><bottom style="'+o+'"><color rgb="FF'+r+'" /></bottom></border>'}else i+='<border><left style="'+n.left.lineStyle+'"><color rgb="FF'+n.left.color.replace("#","")+'" /></left><right style="'+n.right.lineStyle+'"><color rgb="FF'+n.right.color.replace("#","")+'" /></right><top style="'+n.top.lineStyle+'"><color rgb="FF'+n.top.color.replace("#","")+'" /></top><bottom style="'+n.bottom.lineStyle+'"><color rgb="FF'+n.bottom.color.replace("#","")+'" /></bottom></border>'}return i+"</borders>"},a.prototype.saveCellStyles=function(){var i=this,e='<cellStyles  count="'+this.cellStyles.size+'">';return this.cellStyles.forEach(function(t,n){e+='<cellStyle name="'+n+'" xfId="'+i.cellStyles.get(n).xfId+'"',"Normal"===n&&(e+=' builtinId="0"'),e+=" />"}),e+="</cellStyles>"},a.prototype.saveCellStyleXfs=function(){var i='<cellStyleXfs count="'+(this.mCellStyleXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';if(this.mCellStyleXfs.length>=1)for(var e=0,t=this.mCellStyleXfs;e<t.length;e++){var n=t[e];i+='<xf numFmtId="'+n.numFmtId+'" fontId="'+n.fontId+'" fillId="'+n.fillId+'" borderId="'+n.borderId+'" ',i+=void 0!==n.alignment?">"+this.saveAlignment(n)+"</xf>":" />"}return i+"</cellStyleXfs>"},a.prototype.saveCellXfs=function(){var i='<cellXfs count="'+(this.mCellXfs.length+1)+'"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';if(this.mCellXfs.length>=1)for(var e=0,t=this.mCellXfs;e<t.length;e++){var n=t[e];i+='<xf numFmtId="'+n.numFmtId+'" fontId="'+n.fontId+'" fillId="'+n.fillId+'" borderId="'+n.borderId+'" xfId="'+n.xfId+'" ',1===n.applyAlignment&&(i+='applyAlignment="1"'),i+=">"+this.saveAlignment(n)+"</xf>"}return i+"</cellXfs>"},a.prototype.saveAlignment=function(i){var e="<alignment ";return void 0!==i.alignment.horizontal&&(e+='horizontal="'+i.alignment.horizontal+'" '),void 0!==i.alignment.indent&&0!==i.alignment.indent?e+='indent="'+i.alignment.indent+'" ':void 0!==i.alignment.rotation&&0!==i.alignment.rotation&&(e+='textRotation="'+i.alignment.rotation+'" '),void 0!==i.alignment.vertical&&(e+='vertical="'+i.alignment.vertical+'" '),e+'wrapText="'+i.alignment.wrapText+'" />'},a.prototype.saveApp=function(i){var e='<?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!==i&&(void 0!==i.manager&&(e+="<Manager>"+i.manager+"</Manager>"),void 0!==i.company&&(e+="<Company>"+i.company+"</Company>")),this.addToArchive(e+"</Properties>","docProps/app.xml")},a.prototype.saveCore=function(i){var e=new Date,t='<?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!==i.author&&(t+="<dc:creator>"+i.author+"</dc:creator>"),void 0!==i.subject&&(t+="<dc:subject>"+i.subject+"</dc:subject>"),void 0!==i.category&&(t+="<cp:category>"+i.category+"</cp:category>"),void 0!==i.comments&&(t+="<dc:description>"+i.comments+"</dc:description>"),void 0!==i.title&&(t+="<dc:title>"+i.title+"</dc:title>"),void 0!==i.tags&&(t+="<cp:keywords>"+i.tags+"</cp:keywords>"),void 0!==i.status&&(t+="<cp:contentStatus>"+i.status+"</cp:contentStatus>"),t+=void 0!==i.createdDate?'<dcterms:created xsi:type="dcterms:W3CDTF">'+i.createdDate.toISOString()+"</dcterms:created>":'<dcterms:created xsi:type="dcterms:W3CDTF">'+e.toISOString()+"</dcterms:created>",t+=void 0!==i.modifiedDate?'<dcterms:modified xsi:type="dcterms:W3CDTF">'+i.modifiedDate.toISOString()+"</dcterms:modified>":'<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.toISOString()+"</dcterms:modified>"):(t+='<dcterms:created xsi:type="dcterms:W3CDTF">'+e.toISOString()+"</dcterms:created>",t+='<dcterms:modified xsi:type="dcterms:W3CDTF">'+e.toISOString()+"</dcterms:modified>"),this.addToArchive(t+="</cp:coreProperties>","docProps/core.xml")},a.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")},a.prototype.saveWorkbookRelation=function(){for(var i='<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">',e=this.worksheets.length,t=0,n=0;n<e;n++,t++)i+='<Relationship Id="rId'+(n+1).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(n+1).toString()+'.xml" />';i+='<Relationship Id="rId'+(++t).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />',this.sharedStringCount>0&&(i+='<Relationship Id="rId'+(++t).toString()+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />'),this.addToArchive(i+"</Relationships>","xl/_rels/workbook.xml.rels")},a.prototype.saveContentType=function(){for(var i='<?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" />
1<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" />',e="",t=this.worksheets.length,n=0,r=0;r<t;r++)e+='<Override PartName="/xl/worksheets/sheet'+(r+1).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />',null!=this.worksheets[r].images&&this.worksheets[r].images.length>0&&(e+='<Override PartName="/xl/drawings/drawing'+(++n).toString()+'.xml" ContentType="application/vnd.openxmlformats-officedocument.drawing+xml" />');this.imageCount>0&&(e+='<Default Extension="png" ContentType="image/png" />'),this.sharedStringCount>0&&(i+='<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />'),this.addToArchive(i+e+"</Types>","[Content_Types].xml")},a.prototype.addToArchive=function(i,e){if("string"==typeof i){var t=new Blob([i],{type:"text/plain"}),n=new ia(t,e);this.mArchive.addItem(n)}else n=new ia(i,e),this.mArchive.addItem(n)},a.prototype.processMergeCells=function(i,e,t){if(0!==i.rowSpan||0!==i.colSpan){var n=new sb;n.x=i.index,n.width=i.colSpan,n.y=e,n.height=i.rowSpan;var r=this.getCellName(n.y,n.x),o=this.getCellName(e+n.height,i.index+n.width);n.ref=r+":"+o,t.add(n),this.updatedMergedCellStyles({x:n.x,y:n.y},{x:i.index+n.width,y:e+n.height},i)}return t},a.prototype.updatedMergedCellStyles=function(i,e,t){for(var n=i.x;n<=e.x;n++)for(var r=i.y;r<=e.y;r++)this.mergedCellsStyle.set(this.getCellName(r,n),{x:n,y:r,styleIndex:t.styleIndex})},a.prototype.dateToTicks=function(i,e,t){if(i>=1&&i<=9999&&e>=1&&e<=12){var h=i-1;return 864e9*(365*h+(h/4|0)-(h/100|0)+(h/400|0)+(this.isLeapYear(i)?[0,31,60,91,121,152,182,213,244,274,305,335,366]:[0,31,59,90,120,151,181,212,243,273,304,334,365])[e-1]+t-1)}throw new Error("Not a valid date")},a.prototype.timeToTicks=function(i,e,t){if(i>=0&&i<24&&e>=0&&e<60&&t>=0&&t<60)return 1e4*(3600*i+60*e+t)*1e3;throw new Error("Not valid time")},a.prototype.isLeapYear=function(i){return i%4==0&&(i%100!=0||i%400==0)},a.prototype.toOADate=function(i){var e;if(0===(e=this.dateToTicks(i.getFullYear(),i.getMonth()+1,i.getDate())+this.timeToTicks(i.getHours(),i.getMinutes(),i.getSeconds())))return 0;if(e<31241376e9)throw new Error("Arg_OleAutDateInvalid");return(e-599264352e9)/1e4/864e5},a}(),X1=function(){return function a(){}}(),fr="cellClick",yl="select",ji="actionBegin",zr="actionComplete",Sl="actionFailure",Gu="navigating",ti="renderCell",sa="eventClick",oa="eventRendered",Cl="popupOpen",Bh="popupClose",aa="inlineClick",ab="cellSelect",Yu="virtualScrollStart",lb="virtualScrollStop",Qu="noEvents",cb="agendaCells",hb="dateHeader",db="beforePrint",Ju="print",un="data-ready",Ss="events-loaded",Ri="content-ready",El="virtual-scroll",fn="scroll-ui-update",Ku="ui-update",Xr="document-click",Zu="document-paste",ef="cell-mouse-down",bt=864e5,wt=6e4;function fb(a){var i=getComputedStyle(a);return window.WebKitCSSMatrix?new WebKitCSSMatrix(i.webkitTransform).m42:0}function mb(a){var i=getComputedStyle(a);return window.WebKitCSSMatrix?new WebKitCSSMatrix(i.webkitTransform).m41:0}function Ui(a,i){var e=new Date(a.getTime());return i=(i-e.getDay()-7)%7,new Date(e.setDate(e.getDate()+(isNaN(i)?0:i)))}function Hh(a,i){var e=Ui(a,i),t=new Date(e.getFullYear(),e.getMonth(),e.getDate()+6);return new Date(t.getTime())}function la(a){return new Date(a.getFullYear(),a.getMonth(),1)}function no(a){return new Date(a.getFullYear(),a.getMonth()+1,0)}function tf(a){var i=new Date(a.getFullYear(),0,1).valueOf(),e=new Date(a.getFullYear(),a.getMonth(),a.getDate()).valueOf();return Math.ceil((e-i+bt)/bt/7)}function nf(a,i){var e=a.getTimezoneOffset(),t=new Date(a.getTime()+i),n=t.getTimezoneOffset()-e;return a.setTime(t.getTime()+n*wt),a}function k(a){return new Date(a.getFullYear(),a.getMonth(),a.getDate())}
1function jr(a){var i=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0).getTimezoneOffset(),t=a.getTimezoneOffset()-i;return a.getTime()-new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0).getTime()-60*t*1e3}function K(a,i){return a=new Date(""+a),new Date(a.setDate(a.getDate()+i))}function er(a,i){var e=(a=new Date(""+a)).getDate();return a.setDate(1),a.setMonth(a.getMonth()+i),a.setDate(Math.min(e,gb(a))),a}function Vi(a,i,e){var t=new Date(a.getTime());t.setHours(i.getHours()),t.setMinutes(i.getMinutes()),t.setSeconds(i.getSeconds());var n=new Date(a.getTime());return 0===e.getHours()?n=K(n,1):(n.setHours(e.getHours()),n.setMinutes(e.getMinutes()),n.setSeconds(e.getSeconds())),{startHour:t,endHour:n}}function gb(a){return no(a).getDate()}function rf(a,i){var e=k(new Date(a)),t=k(new Date(i));return Math.round((t.getTime()-e.getTime())/bt)}function vb(a){return-1!==a.indexOf("Date")?new Date(parseInt(a.match(/\d+/g).toString(),10)):-1!==a.indexOf("T")?new Date(a):new Date(a.replace(/-/g,"/"))}var zh=null,_l=null;function Xh(){if(null!==zh)return zh;null===_l&&(_l=window.devicePixelRatio||window.screen.availWidth/document.documentElement.clientWidth);var i,a=(0,s.n)("div");a.style.cssText="width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;",document.body.appendChild(a);var e=devicePixelRatio?"1.10"===devicePixelRatio.toFixed(2)||devicePixelRatio<=1?Math.ceil(devicePixelRatio%1):Math.floor(devicePixelRatio%1):0;return i=a.offsetWidth-a.clientWidth-e|0,document.body.removeChild(a),zh=i}function Tl(a,i,e,t,n){for(var r=0,o=a.length;r<o;r++)if(a[parseInt(r.toString(),10)][""+i]===e){if(!t)return r;var l=n.slice(-2)[0].field;if((t[""+l]instanceof Array?t[""+l]:[t[""+l]]).join(",").includes(a[parseInt(r.toString(),10)][n.slice(-1)[0].groupIDField]))return r}return-1}function sf(a){var i=getComputedStyle(a);return a.offsetHeight+(parseInt(i.marginTop,10)||0)+(parseInt(i.marginBottom,10)||0)}function Dn(a){for(var e=0,t=[].slice.call(a.children);e<t.length;e++)a.removeChild(t[e])}function dx(a){var i=new Date(a.getFullYear(),0,1),e=new Date(a.getFullYear(),6,1);return a.getTimezoneOffset()<Math.max(i.getTimezoneOffset(),e.getTimezoneOffset())}function Bt(a){var i=a.getFullYear(),e=a.getMonth(),t=a.getDate(),n=a.getHours(),r=a.getMinutes(),o=a.getSeconds(),l=a.getMilliseconds();return Date.UTC(i,e,t,n,r,o,l)}function yt(a,i){if("multiple"===i)a=a.split(" ").map(function(t){return t.charAt(0).toLocaleUpperCase()+t.substring(1)}).join(" ");else if("single"===i){if(a[0]>="0"&&a[0]<="9"){var e=a.match(/[a-zA-Z]/);a=(0,s.hX)(e)?a:a.slice(0,e.index)+a[e.index].toLocaleUpperCase()+a.slice(e.index+1)}a=a[0].toLocaleUpperCase()+a.slice(1)}return a}function bb(a,i){return i?a.offsetWidth:a.getBoundingClientRect().width}function yb(a,i){return i?a.offsetHeight:a.getBoundingClientRect().height}var jh="e-schedule",of="e-rtl",ca="e-device",Sb="e-adaptive",af="e-multi-drag",Nt="e-icons",Cs="e-enable",ot="e-disable",kn="e-table-container",lf="e-schedule-table",it="e-all-day-cells",mr="e-all-day-row",nt="e-content-table",ie="e-work-cells",ha="e-work-hours",Qt="e-popup-open",bi="e-date-header-wrap",Il="e-date-header-container",Wt="e-header-cells",xl="e-work-days",pt="e-other-month",Uh="e-current-day",cf="e-current-date",hf="e-current-panel",df="e-previous-panel",Cb="e-next-panel",da="e-translate",Eb="e-left-indent",pf="e-left-indent-wrap",Ur="e-event-table",Es="e-resource-group-cells",Wh="e-resource-text",Wi="e-resource-column-wrap",_s="e-resource-column-table",_b="e-child-node",tr="e-parent-node",ro="e-resource-expand",gr="e-resource-collapse",pa="e-resource-tree-icon",on="e-resource-cells",uf="e-time-cells-wrap",Tb="e-time-cells",ua="e-time-slots",Ib="e-alternate-cells",ff="e-current-time",fa="e-current-timeline",xb="e-previous-timeline",mf="e-hide-childs",gf="e-scroll-container",wb="e-timeline-wrapper",Ct="e-appointment-wrapper",wl="e-appointment-wrapper-hidden",$h="e-day-wrapper",Ol="e-schedule-resource-toolbar-container",Ob="e-schedule-toolbar",vf="e-schedule-resource-toolbar",so="e-selected-cell",qh="e-week-number-wrapper",Gh="e-week-number",Yh="e-appointment-wrap",Al="e-wrapper-container",mn="e-appointment-container",Ce="e-appointment",ma="e-block-appointment",Qh="e-block-indicator",Ts="e-appointment-border",Jh="e-appointment-details",Kh="e-subject-wrap",Ab="e-resource-name",vr="e-time",Zh="e-table-wrap",ed="e-outer-table",we="e-content-wrap",Pl="e-virtual-track",br="e-agenda-cells",Pb="e-current-day",td="e-active-appointment-agenda",Dl="e-month-header",Db="e-day-date-header",kb="e-date-column",oo="e-navigate",ga="e-date-header",Mb="e-day-border",bf="e-d
1ate-time",yf="e-no-event",Sf="e-appointment-indicator",id="e-indicator",Lb="e-left-icon",Rb="e-right-icon",yr="e-event-action",nd="e-new-event",Is="e-schedule-event-clone",Cf="e-clone-time-indicator",Nb="e-drag-clone",kl="e-event-resize",Ef="e-resize-clone",rd="e-left-handler",sd="e-right-handler",_f="e-top-handler",Tf="e-bottom-handler",Ml="e-recurrence-icon",Ll="e-recurrence-edit-icon",If="e-header-row",gn="e-all-day-appointment-wrapper",wi="e-all-day-appointment",Vb="e-appointment-hide",Rl="e-row-count-wrapper",Nl="e-all-day-appointment-section",od="e-appointment-expand",Fb="e-appointment-collapse",Fi="e-more-indicator",xf="e-cell-popup",wf="e-event-popup",Of="e-popup-header",Bb="e-header-icon-wrapper",Af="e-popup-footer",Hb="e-date-time-details",ad="e-event-details",ld="e-event-create",va="e-event-edit",Wr="e-event-delete",Oi="e-text-ellipsis",Sr="e-more-popup-wrapper",ao="e-more-event-popup",Pf="e-more-event-date-header",zb="e-header-day",ba="e-header-date",Df="e-more-event-close",cd="e-more-event-content",kf="e-more-appointment-wrapper",Mf="e-quick-dialog-occurrence-event",Lf="e-quick-dialog-series-event",Xb="e-quick-dialog-following-events",jb="e-following-events-dialog",Rf="e-quick-dialog-delete",Vl="e-quick-dialog-cancel",xs="e-quick-alertok",Cr="e-quick-alertcancel",Ub="e-quick-alertfollowing",Wb="e-quick-dialog-alert-btn",$r="e-schedule-dialog",qr="e-schedule-form",Fl="e-all-day",ws="e-time-zone",Bl="e-repeat",Ut="e-subject",lo="e-location",$b="e-location-details",Os="e-start",co="e-end",ya="e-description",qb="e-description-details",Hl="e-time-zone-row",zl="e-start-time-zone",Xl="e-end-time-zone",Gb="e-save-icon",Yb="e-event-cancel",hd="e-event-save",Qb="e-title-text",Jb="e-icon-disable",ho="e-edit",dd="e-edit-icon",jl="e-delete",Kb="e-delete-icon",po="e-close",pd="e-close-icon",Zb="e-schedule-error",Nf="e-tooltip-hidden",Vf="e-animate",Ai="e-hidden",Gr="e-disable-dates",Yr="e-quick-popup-wrapper",ey="e-resource-menu",ty="e-icon-menu",iy="e-resource-level-title",ny="e-resource-tree-popup-overlay",Ul="e-resource-tree-popup",ry="e-resource",sy="e-resource-icon",Ff="e-resource-details",oy="e-date-time-icon",Bf="e-virtual-scroll",ay="e-icon-disable",Hf="e-auto-height",ly="e-ignore-whitespace",Wl="e-read-only",uo="e-month-header-wrapper",an="e-inline-subject",$l="e-inline-appointment",cy="e-scroll-hidden",ql="e-all-day-scroll",ud="e-all-day-auto",As=function(){return As=Object.assign||function(a){for(var i,e=1,t=arguments.length;e<t;e++)for(var n in i=arguments[e])Object.prototype.hasOwnProperty.call(i,n)&&(a[n]=i[n]);return a},As.apply(this,arguments)},zf=function(){function a(i){this.parent=i,this.l10n=this.parent.localeObj,this.renderHeader(),this.addEventListener()}return a.prototype.addEventListener=function(){this.parent.on(Xr,this.closeHeaderPopup,this)},a.prototype.removeEventListener=function(){this.parent.off(Xr,this.closeHeaderPopup)},a.prototype.closeHeaderPopup=function(i){var e=(0,s.kp)(i.event.target,".e-date-range,.e-header-popup,.e-day,.e-selected"),t=(0,s.kp)(i.event.target,".e-hor-nav,.e-toolbar-pop"),n=this.parent.element.querySelector("."+we),r=this.parent.element.querySelector(".e-toolbar-pop");if(this.parent.isAdaptive)if((0,s.hX)(t)||!t.classList.contains("e-toolbar-pop")&&!t.classList.contains("e-hor-nav")||t.classList.contains("e-hor-nav")&&r&&r.classList.contains(Qt)){(0,s.vy)([n],cy);var o=this.element.querySelector(".e-toolbar-pop");if(!(0,s.hX)(o)){var l=o.ej2_instances[0];l&&((0,s.hX)(t)||!t.classList.contains("e-hor-nav")||!o.classList.contains(Qt))&&l.hide()}}else(0,s.iQ)([n],cy);(0,s.hX)(e)&&this.hideHeaderPopup()},a.prototype.hideHeaderPopup=function(){this.headerPopup&&this.headerPopup.hide()},a.prototype.renderHeader=function(){this.element=(0,s.n)("div",{className:"e-schedule-toolbar-container"});var i=(0,s.n)("div",{className:Ob});this.element.appendChild(i),this.parent.element.insertBefore(this.element,this.parent.element.firstElementChild),this.renderToolbar()},a.prototype.renderToolbar=function(){var i=this,e=this.parent.toolbarItems&&this.parent.toolbarItems.length>0?this.getToolbarItems():this.getItems();this.parent.trigger(ji,{requestType:"toolbarItemRendering",items:e},function(t){i.toolbarObj=new rv({items:t.items,overflowMode:"Popup",clicked:i.toolbarClickHandler.bind(i),created:i.toolbarCreateHandler.bind(i),enableRtl:i.parent.enableRtl,enableHtmlSanitizer:i.parent.enableHtmlSanitizer,locale:i.parent.locale}),i.toolbarObj.isStringTemplate=!0,i.toolbarObj.root=i.parent.root?i.parent.root:i.parent,i.toolbarObj.appendTo(i.parent.element.querySelector("."+Ob)),i.toolbarObj.element.setAttribute("aria-label","Scheduler");var n=i.toolbarObj.element.querySelector(".e-prev");n&&n.firstElementChild.setAttribute("title",i.l10n.getConstant("previous"));var r=i.toolbarObj.element.querySelector(".e-next");r&&r.firstElementChild.setAttribute("title",i.l10n.getConstant("next")),i.updateAddIcon(),i.updateActiveView(),i.parent.trigger(zr,{requestType:"toolBarItemRendered",items:i.toolbarObj.items})})},a.prototype.updateItems=function(){var i=this;if(this.toolbarObj){var e=this.getItems();this.parent.trigger(ji,{requestType:"toolbarItemRendering",items:e},function(t){i.toolbarObj.items=t.items,i.toolbarObj.dataBind(),i.parent.trigger(zr,{requestType:"toolBarItemRendered",items:i.toolbarObj.items})})}},a.prototype.getPopUpRelativeElement=function(){return this.parent.isAdaptive?this.toolbarObj.element:this.element.querySelector(".e-date-range")},a.prototype.setDayOfWeek=function(i){this.headerCalendar&&(this.headerCalendar.firstDayOfWeek=i,this.headerCalendar.dataBind())},a.prototype.setCalendarDate=function(i){this.headerCalendar&&(this.headerCalendar.value=i,this.headerCalendar.dataBind())},a.prototype.setCalendarMinMaxDate=function(){this.headerCalendar&&(this.headerCalendar.min=this.parent.minDate,this.headerCalendar.max=this.parent.maxDate,this.headerCalendar.dataBind())},a.prototype.getCalendarView=function(){return["Month","MonthAgenda","TimelineMonth"].indexOf(this.parent.currentView)>-1?"Year":["Year","TimelineYear"].indexOf(this.parent.currentView)>-1?"Decade":"Month"},a.prototype.setCalendarView=function(){if(this.headerCalendar){var i=this.getCalendarView();this.headerCalendar.depth=i,this.headerCalendar.start=i,this.headerCalendar.refresh()}},a.prototype.updateActiveView=function(){var i=[].slice.call(this.toolbarObj.element.querySelectorAll(".e-views"));(0,s.vy)(i,["e-active-view"]),i.length>0&&i[this.parent.viewIndex]&&(0,s.iQ)([i[this.parent.viewIndex]],["e-active-view"])},a.prototype.updateDateRange=function(i){var e=this.toolbarObj.element.querySelector(".e-date-range");if(e){e.firstElementChild.setAttribute("aria-haspopup","true");var t=e.querySelector(".e-tbar-btn-text");if(this.parent.activeViewOptions.dateRangeTemplate){t.textContent="";var n={startDate:this.parent.activeView.getStartDate(),endDate:this.parent.activeView.getEndDate(),currentView:this.parent.currentView}
1,o=this.parent.element.id+"_"+this.parent.activeViewOptions.dateRangeTemplateName+"dateRangeTemplate",l=[].slice.call(this.parent.getDateRangeTemplate()(n,this.parent,"dateRangeTemplate",o,!1,void 0,void 0,this.parent.root));(0,s.BC)(l,t)}else{var h=this.parent.activeView.getDateRangeText(i);e.firstElementChild.setAttribute("aria-label",h),t.textContent=h}this.refresh()}},a.prototype.refresh=function(){this.toolbarObj&&this.toolbarObj.refreshOverflow()},a.prototype.updateAddIcon=function(){var i=this.toolbarObj.element.querySelector(".e-add");i&&(this.parent.eventSettings.allowAdding?(0,s.vy)([i],Ai):(0,s.iQ)([i],Ai))},a.prototype.getDateRangeText=function(){return yt(this.parent.globalize.formatDate(this.parent.selectedDate,{format:"MMMM y",calendar:this.parent.getCalendarMode()}),"single")},a.prototype.getItemModel=function(i){var e={};return i.id&&(e.id=i.id),i.text&&(e.text=i.text),i.tooltipText&&(e.tooltipText=i.tooltipText),i.prefixIcon&&(e.prefixIcon=i.prefixIcon),i.cssClass&&(e.cssClass=i.cssClass),"Both"!==i.showTextOn&&(e.showTextOn=i.showTextOn),i.template&&(e.template=i.template),i.disabled&&(e.disabled=i.disabled),"auto"!==i.width&&(e.width=i.width),i.suffixIcon&&(e.suffixIcon=i.suffixIcon),"Left"!==i.align&&(e.align=i.align),"None"!==i.overflow&&(e.overflow=i.overflow),i.htmlAttributes&&(e.htmlAttributes=i.htmlAttributes),"Button"!==i.type&&(e.type=i.type),!0!==i.visible&&(e.visible=i.visible),i.showAlwaysInPopup&&(e.showAlwaysInPopup=i.showAlwaysInPopup),-1!==i.tabIndex&&(e.tabIndex=i.tabIndex),e},a.prototype.getToolbarItems=function(){for(var e,i=[],t=0,n=this.parent.toolbarItems;t<n.length;t++){var r=n[t];e=this.getItemModel(r);var o=void 0;if(r.name)switch(r.name){case"Today":(o={showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-today",text:this.l10n.getConstant("today"),cssClass:"e-today",overflow:"Show"}).align=e.align?e.align:r.align,i.push(As({},o,e));break;case"Previous":(o={prefixIcon:"e-icon-prev",tooltipText:"Previous",overflow:"Show",cssClass:"e-prev",htmlAttributes:{role:"navigation"}}).align=e.align?e.align:r.align,i.push(As({},o,e));break;case"Next":(o={prefixIcon:"e-icon-next",tooltipText:"Next",overflow:"Show",cssClass:"e-next",htmlAttributes:{role:"navigation"}}).align=e.align?e.align:r.align,i.push(As({},o,e));break;case"DateRangeText":(o={text:this.getDateRangeText(),suffixIcon:"e-icon-down-arrow",cssClass:"e-date-range",overflow:"Show",htmlAttributes:{"aria-atomic":"true","aria-live":"assertive",role:"navigation"}}).align=e.align?e.align:r.align,i.push(As({},o,e));break;case"NewEvent":(o={showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-add",text:this.l10n.getConstant("newEvent"),cssClass:"e-add",overflow:"Show"}).align=e.align?e.align:r.align,i.push(As({},o,e));break;case"Views":if(!(0,s.hX)(this.parent.views)&&this.parent.views.length>1)for(var l=0,h=this.parent.views;l<h.length;l++)(o=this.getItemObject(h[l])).align=e.align?e.align:r.align,i.push(As({},o,e));break;case"Custom":i.push(r)}else i.push(r)}return i},a.prototype.getItems=function(){var i=[];if(i.push({align:"Left",prefixIcon:"e-icon-prev",tooltipText:"Previous",overflow:"Show",cssClass:"e-prev"}),i.push({align:"Left",prefixIcon:"e-icon-next",tooltipText:"Next",overflow:"Show",cssClass:"e-next"}),i.push({align:"Left",text:this.getDateRangeText(),suffixIcon:"e-icon-down-arrow",cssClass:"e-date-range",overflow:"Show",htmlAttributes:{"aria-atomic":"true","aria-live":"assertive"}}),this.parent.isAdaptive||this.parent.enableAdaptiveUI?(i.push({align:"Right",showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-add",text:this.l10n.getConstant("newEvent"),cssClass:"e-add",overflow:"Show"}),i.push({align:"Right",showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-today",text:this.l10n.getConstant("today"),cssClass:"e-today",overflow:"Show"})):(i.push({align:"Right",showAlwaysInPopup:this.parent.isAdaptive||this.parent.enableAdaptiveUI,prefixIcon:"e-icon-today",text:this.l10n.getConstant("today"),
1cssClass:"e-today",overflow:"Show"}),!(0,s.hX)(this.parent.views)&&this.parent.views.length>1&&i.push({align:"Right",type:"Separator",cssClass:"e-schedule-seperator"})),!(0,s.hX)(this.parent.views)&&this.parent.views.length>1)for(var e=0,t=this.parent.views;e<t.length;e++)i.push(this.getItemObject(t[e]));return i},a.prototype.getItemObject=function(i){var e,t;"string"==typeof i?(e=i.toLowerCase(),t=null):(e=i.option.toLowerCase(),t=i.displayName);var n,o=this.parent.isAdaptive||this.parent.enableAdaptiveUI;switch(e){case"day":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-day",text:t||this.l10n.getConstant("day"),cssClass:"e-views e-day"};break;case"week":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-week",text:t||this.l10n.getConstant("week"),cssClass:"e-views e-week"};break;case"workweek":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-workweek",text:t||this.l10n.getConstant("workWeek"),cssClass:"e-views e-work-week"};break;case"month":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-month",text:t||this.l10n.getConstant("month"),cssClass:"e-views e-month"};break;case"year":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-year",text:t||this.l10n.getConstant("year"),cssClass:"e-views e-year"};break;case"agenda":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-agenda",text:t||this.l10n.getConstant("agenda"),cssClass:"e-views e-agenda"};break;case"monthagenda":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-month-agenda",text:t||this.l10n.getConstant("monthAgenda"),cssClass:"e-views e-month-agenda"};break;case"timelineday":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-timeline-day",text:t||this.l10n.getConstant("timelineDay"),cssClass:"e-views e-timeline-day"};break;case"timelineweek":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-timeline-week",text:t||this.l10n.getConstant("timelineWeek"),cssClass:"e-views e-timeline-week"};break;case"timelineworkweek":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-timeline-workweek",text:t||this.l10n.getConstant("timelineWorkWeek"),cssClass:"e-views e-timeline-work-week"};break;case"timelinemonth":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-timeline-month",text:t||this.l10n.getConstant("timelineMonth"),cssClass:"e-views e-timeline-month"};break;case"timelineyear":n={align:"Right",showAlwaysInPopup:o,prefixIcon:"e-icon-timeline-year-"+("Vertical"===i.orientation?"vertical":"horizontal"),text:t||this.l10n.getConstant("timelineYear"),cssClass:"e-views e-timeline-year"}}return n},a.prototype.renderHeaderPopup=function(){var i=(0,s.n)("div",{className:"e-header-popup"}),e=(0,s.n)("div",{className:"e-header-calendar"});i.appendChild(e),this.element.appendChild(i),this.headerPopup=new ae.zD(i,{actionOnScroll:"hide",targetType:"relative",relateTo:this.getPopUpRelativeElement(),position:{X:"left",Y:"bottom"},collision:{X:"fit"},viewPortElement:this.element,enableRtl:this.parent.enableRtl});var t=this.getCalendarView(),n="Month"===this.parent.currentView&&!(0,s.hX)(this.parent.activeViewOptions.displayDate)&&!this.hasSelectedDate();this.headerCalendar=new Su.Vv({value:n?this.parent.activeViewOptions.displayDate:this.parent.selectedDate,min:this.parent.minDate,max:this.parent.maxDate,firstDayOfWeek:this.parent.activeViewOptions.firstDayOfWeek,weekNumber:this.parent.activeViewOptions.showWeekNumber,enableRtl:this.parent.enableRtl,locale:this.parent.locale,depth:t,start:t,calendarMode:this.parent.calendarMode,change:this.calendarChange.bind(this)}),this.setCalendarTimezone(),this.headerCalendar.appendTo(e),this.headerPopup.hide()},a.prototype.calendarChange=function(i){if(i.value.getTime()!==this.parent.selectedDate.getTime()){var e=k(new Date(i.value));this.parent.changeDate(e)}this.headerPopup.hide()},a.prototype.setCalendarTimezone=function(){this.headerCalendar&&(this.headerCalendar.timezone=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName())},a.prototype.calculateViewIndex=function(i){var e=(0,s.kp)(i.originalEvent.target,".e-views");return[].slice.call(this.element.querySelectorAll(".e-views")).indexOf(e)},a.prototype.toolbarCreateHandler=function(){this.parent&&this.parent.portals&&this.toolbarObj&&this.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.toolbarObj.portals),this.parent.renderReactTemplates())},a.prototype.toolbarClickHandler=function(i){if(i.item){var t,n,r;switch(i.item.cssClass.replace("e-views ","")){case"e-date-range":this.headerPopup||this.renderHeaderPopup(),this.headerPopup.element.classList.contains(Qt)?this.headerPopup.hide():this.headerPopup.show();break;case"e-day":this.parent.changeView("Day",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-week":this.parent.changeView("Week",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-work-week":this.parent.changeView("WorkWeek",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-month":this.parent.changeView("Month",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-year":this.parent.changeView("Year",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-agenda":this.parent.changeView("Agenda",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-month-agenda":this.parent.changeView("MonthAgenda",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-timeline-day":this.parent.changeView("TimelineDay",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-timeline-week":this.parent.changeView("TimelineWeek",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-timeline-work-week":this.parent.changeView("TimelineWorkWee
1k",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-timeline-month":this.parent.changeView("TimelineMonth",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-timeline-year":this.parent.changeView("TimelineYear",i.originalEvent,void 0,this.calculateViewIndex(i));break;case"e-today":r=k(this.parent.getCurrentTime()),("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView||!this.parent.isSelectedDate(r)||"Month"===this.parent.currentView&&this.parent.activeViewOptions.displayDate&&!this.hasSelectedDate()&&k(this.parent.activeViewOptions.displayDate)!==r||"Month"===this.parent.currentView&&this.parent.activeViewOptions.numberOfWeeks>0&&!this.hasSelectedDate()&&k(la(this.parent.selectedDate))!==r)&&this.parent.changeDate(r,i.originalEvent);break;case"e-prev":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("Previous"),i.originalEvent);break;case"e-next":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("Next"),i.originalEvent);break;case"e-add":if(n=this.parent.activeCellsData.startTime.getTime()===this.parent.activeCellsData.endTime.getTime(),this.parent.activeCellsData&&!n)t=this.parent.activeCellsData;else{var h=this.parent.activeViewOptions.timeScale.interval*wt/this.parent.activeViewOptions.timeScale.slotCount,d=new Date(this.parent.selectedDate.getTime()),p=this.parent.getCurrentTime();d.setHours(p.getHours(),Math.round(d.getMinutes()/h)*h,0);var u=new Date(new Date(d.getTime()).setMilliseconds(d.getMilliseconds()+h));t={startTime:d,endTime:u,isAllDay:!1}}this.parent.eventWindow.openEditor((0,s.X$)(t,{cancel:!1,event:i.originalEvent}),"Add")}if(!(0,s.hX)(this.toolbarObj)){var f=this.toolbarObj.element.querySelector(".e-toolbar-pop");f&&"Input"!==i.item.type&&f.ej2_instances[0].hide({name:"SlideUp",duration:100})}}},a.prototype.hasSelectedDate=function(){var i=k(this.parent.selectedDate).getTime();return i>=this.parent.activeView.getStartDate().getTime()&&i<=this.parent.activeView.getEndDate().getTime()},a.prototype.getHeaderElement=function(){return this.toolbarObj.element},a.prototype.updateHeaderItems=function(i){var e=this.toolbarObj.element.querySelector(".e-prev"),t=this.toolbarObj.element.querySelector(".e-next"),n=this.toolbarObj.element.querySelector(".e-date-range");e&&("add"===i?(0,s.iQ)([e],Ai):(0,s.vy)([e],Ai)),t&&("add"===i?(0,s.iQ)([t],Ai):(0,s.vy)([t],Ai)),n&&("add"===i?(0,s.iQ)([n],Oi):(0,s.vy)([n],Oi))},a.prototype.previousNextIconHandler=function(){var i="Agenda"===this.parent.currentView?[this.parent.getCurrentViewDates()[0]]:this.parent.getCurrentViewDates(),e=this.toolbarObj.element.querySelector(".e-prev"),t=this.toolbarObj.element.querySelector(".e-next"),n=new Date(i[0].getTime()),r=new Date(i[i.length-1].getTime());if("WorkWeek"===this.parent.currentView||"TimelineWorkWeek"===this.parent.currentView)r=K(n=Ui(k(this.parent.selectedDate),this.parent.activeViewOptions.firstDayOfWeek),7*this.parent.activeViewOptions.interval);else if("Month"===this.parent.currentView){var o=!(0,s.hX)(this.parent.activeViewOptions.displayDate)||this.parent.activeViewOptions.numberOfWeeks>0;n=o?this.parent.activeView.getStartDate():la(this.parent.selectedDate),r=o?this.parent.activeView.getEndDate():no(er(n,this.parent.activeViewOptions.interval-1))}(0,s.hX)(e)||this.toolbarObj.enableItems(e,n>k(this.parent.minDate)),(0,s.hX)(t)||this.toolbarObj.enableItems(t,r<k(this.parent.maxDate)),this.setCalendarMinMaxDate()},a.prototype.getModuleName=function(){return"headerbar"},a.prototype.destroy=function(){this.headerPopup&&!this.headerPopup.isDestroyed&&(this.headerPopup.destroy(),this.headerPopup=null),this.headerCalendar&&!this.headerCalendar.isDestroyed&&(this.headerCalendar.destroy(),this.headerCalendar=null),this.toolbarObj&&!this.toolbarObj.isDestroyed&&(this.toolbarObj.destroy(),this.removeEventListener(),(0,s.TF)(this.element),this.toolbarObj=null),this.element=null,this.parent=null,this.l10n=null},a}(),nw=function(){function a(i){this.parent=i,this.addEventListener()}return a.prototype.getModuleName=function(){return"scroll"},a.prototype.setWidth=function(){this.parent.element.style.width=(0,s.IV)(this.parent.width)},a.prototype.setHeight=function(){this.parent.element.style.height=(0,s.IV)(this.parent.height)},a.prototype.addEventListener=function(){this.parent.on(Ri,this.setDimensions,this),this.parent.on(Ku,this.onPropertyChanged,this)},a.prototype.removeEventListener=function(){this.parent.off(Ri,this.setDimensions),this.parent.off(Ku,this.onPropertyChanged)},a.prototype.setDimensions=function(){this.setWidth(),this.setHeight();var i={cssProperties:this.parent.getCssProperties(),module:this.getModuleName()};this.parent.notify(fn,i)},a.prototype.onPropertyChanged=function(){this.setDimensions()},a.prototype.destroy=function(){this.removeEventListener()},a}(),rw=function(){function a(i){this.parent=i,this.element=this.parent.element.querySelector("."+kn),this.touchObj=new s.Up(this.element,{scroll:this.scrollHandler.bind(this),swipe:this.swipeHandler.bind(this),tapHold:this.tapHoldHandler.bind(this),swipeSettings:{swipeThresholdDistance:1}}),s.Jm.add(this.element,"transitionend",this.onTransitionEnd,this),this.touchLeftDirection=this.parent.enableRtl?"Right":"Left",this.touchRightDirection=this.parent.enableRtl?"Left":"Right"}return a.prototype.scrollHandler=function(i){(0,s.hX)(this.parent.eventTooltip)||this.parent.eventTooltip.close();var e=!this.parent.isAdaptive&&i.originalEvent&&i.originalEvent.target&&!(0,s.hX)((0,s.kp)(i.originalEvent.target,"."+Ce));if(this.parent.uiStateValues.isTouchScroll=e&&"touchmove"===i.originalEvent.type&&!this.parent.uiStateValues.action,!e&&"Agenda"!==this.parent.currentView&&!this.parent.uiStateValues.action&&this.parent.allowSwiping&&!this.parent.uiStateValues.isTapHold){if(this.parent.uiStateValues.isSwipeScroll=!0,this.timeStampStart||(this.timeStampStart=Date.now()),this.element.classList.contains(da)&&this.onTransitionEnd(),"Left"===i.scrollDirection||"Right"===i.scrollDirection){var t={requestType:"dateNavigate",cancel:!1,event:i.originalEvent};if(this.parent.trigger(ji,t),t.cancel)return;var n=this.element.querySelector("."+we);if(n&&n.scrollWidth>n.clientWidth)return;this.isScrollTriggered=!0,i.originalEvent.preventDefault(),i.originalEvent.stopPropagation()}if(i.scrollDirection===this.touchLeftDirection){this.nextPanel||(this.renderPanel(Cb,"Next"),this.nextPanel={element:this.parent.activeView.getPanel(),selectedDate:new Date(this.parent.selectedDate.getTime()),renderDates:this.parent.activeView.renderDates,colLevels:this.parent.activeView.colLevels},this.setDimensions(this.nextPanel.element));var r=this.parent.enableRtl?i.distanceX:-i.distanceX;this.element.style.transform="translatex("+(this.getTranslateX(this.element)+r)+"px)"}else if(i.scrollDirection===this.touchRightDirection){var o=0;this.previousPanel||(this.renderPanel(df,"Previous"),this.previousPanel={element:this.parent.activeView.getPanel(),selectedDate:new Date(this.parent.selectedDate.getTime()),renderDates:this.parent.activeView.renderDates,colLevels:this.parent.activeView.colLevels},this.setDimensions(this.previousPanel.element),o=this.previousPanel.element.offsetWidth),r=this.parent.enableRtl?o-i.distanceX:-o+i.distanceX,this.element.style.transform="translatex("+(this.getTranslateX(this.element)+r)+"px)"}}},a.prototype.swipeHandler=function(i){if(this.isScrollTriggered&&!this.parent.uiStateValues.action&&this.parent.allowSwiping&&!this.parent.uiStateValues.isTapHold){this.isScrollTriggered=!1;var e="Left"===i.swipeDirection?this.parent.activeView.renderDates[0]:this.parent.activeView.renderDates.slice(-1)[0];if("Left"===i.swipeDirection&&e<this.parent.maxDate||"Right"===i.swipeDirection&&e>=this.parent.minDate){var t=Date.now()-this.timeStampStart,n=i.distanceX*(s.Pw.isDevice?6:1.66);n>t||i.distanceX>this.parent.element.offsetWidth/2?(this.swapPanels(i.swipeDirection),n>t&&i.distanceX>this.parent.element.offsetWidth/2&&(this.element.style.transitionDuration=(s.Pw.isDevice?i.distanceX:n)/t/10+"s"),this.confirmSwipe(i.swipeDirection)):this.cancelSwipe(),this.parent.trigger(zr,{requestType:"dateNavigate",cancel:!1,event:i.originalEvent})}else this.cancelSwipe();this.timeStampStart=null}},a.prototype.tapHoldHandler=function(i){var e=(0,s.kp)(i.originalEvent.target,"."+Ce);(0,s.hX)(e)||(this.parent.uiStateValues.isTapHold=!0,this.parent.isAdaptive?(s.Pw.isIos&&s.Jm.add(this.element,"touchend",this.preventEventClick,this),this.parent.quickPopup.tapHoldEventPopup(i.originalEvent),this.triggerResizeStart(i.originalEvent)):["Agenda","MonthAgenda","Year"].indexOf(this.parent.currentView)<0&&(this.parent.selectedElements=[],this.parent.eventBase.getSelectedEventElements(e),this.triggerResizeStart(i.originalEvent)))},a.prototype.triggerResizeStart=function(i){this.parent.resizeModule&&(0,s.kp)(i.target,"."+kl)&&this.parent.resizeModule.resizeStart(i)},a.prototype.preventEventClick=function(i){i.preventDefault(),s.Jm.remove(this.element,"touchend",this.preventEventClick)},a.prototype.renderPanel=function(i,e){this.currentPanel?this.parent.setProperties({selectedDate:this.currentPanel.selectedDate},!0):(this.currentPanel={element:this.parent.activeView.getPanel(),selectedDate:new Date(this.parent.selectedDate.getTime()),renderDates:this.parent.activeView.renderDates,colLevels:this.parent.activeView.colLevels},this.setDimensions(this.currentPanel.element)),this.parent.setProperties({selectedDate:this.parent.activeView.getNextPreviousDate(e)},!0),this.parent.headerModule&&this.parent.headerModule.setCalendarDate(this.parent.selectedDate),this.parent.activeView.getRenderDates(),this.parent.activeView.renderLayout(i)},a.prototype.swapPanels=function(i){if(i===this.touchLeftDirection){var e=this.nextPanel;this.nextPanel=this.currentPanel,this.currentPanel=e}else e=this.previousPanel,this.previousPanel=this.currentPanel,this.currentPanel=e},a.prototype.confirmSwipe=function(i){var e=this;this.parent.trigger(Gu,{action:"date",cancel:!1,previousDate:i===this.touchLeftDirection?this.nextPanel.selectedDate:this.previousPanel.selectedDate,currentDate:this.currentPanel.selectedDate},function(r){if(r.cancel)e.swapPanels(i),e.cancelSwipe();else{e.parent.activeView.setPanel(e.currentPanel.element),e.parent.setProperties({selectedDate:e.currentPanel.selectedDate},!0);var o;o=e.parent.enableRtl?i===e.touchLeftDirection?e.previousPanel?e.previousPanel.element.offsetLeft:e.currentPanel.element.offsetWidth:0:i===e.touchLeftDirection?-e.currentPanel.element.offsetLeft:0,e.parent.activeView.renderDates=e.currentPanel.renderDates,e.parent.activeView.colLevels=e.currentPanel.colLevels,(0,s.iQ)([e.element],da),e.element.style.transform="translatex("+o+"px)",e.parent.headerModule&&e.parent.headerModule.updateDateRange(),e.parent.renderTemplates(),e.parent.crudModule.refreshDataManager()}})},a.prototype.cancelSwipe=function(){var i=this;if(this.parent.activeView.setPanel(this.currentPanel.element),this.parent.setProperties({selectedDate:this.currentPanel.selectedDate},!0),this.parent.activeView.renderDates=this.currentPanel.renderDates,this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.lastResourceLevel.length>0){var e=this.parent.resourceBase.resourceCollection[0].workDaysField;this.parent.resourceBase.lastResourceLevel.forEach(function(n){if(e){var o=Array.isArray(n[e])&&(!i.parent.showWeekend||"WorkWee
1k"===i.parent.currentView);n.renderDates=o?i.calculateResourceSpecificDates(n,e):i.currentPanel.renderDates}else n.renderDates=i.currentPanel.renderDates})}this.parent.activeView.colLevels=this.currentPanel.colLevels,(0,s.iQ)([this.element],da),this.element.style.transform="translatex("+(this.parent.enableRtl?this.previousPanel?this.previousPanel.element.offsetWidth:0:-this.currentPanel.element.offsetLeft)+"px)"},a.prototype.calculateResourceSpecificDates=function(i,e){var t=[],n=i[e];return this.currentPanel.renderDates.forEach(function(r){Array.isArray(n)&&-1!==n.indexOf(r.getDay())&&t.push(r)}),t},a.prototype.onTransitionEnd=function(){!(0,s.hX)(this.element)&&!this.element.classList.contains(da)||(this.parent.uiStateValues.isSwipeScroll=!1,(0,s.vy)([this.element],da),this.element.style.transitionDuration="",this.element.style.transform="",this.previousPanel&&((0,s.TF)(this.previousPanel.element),this.previousPanel=null,(0,s.vy)([this.currentPanel.element],df),(0,s.iQ)([this.currentPanel.element],hf)),this.nextPanel&&((0,s.TF)(this.nextPanel.element),this.nextPanel=null,(0,s.vy)([this.currentPanel.element],Cb),(0,s.iQ)([this.currentPanel.element],hf)),this.currentPanel=null,this.parent.activeView.getPanel().style.width="")},a.prototype.getTranslateX=function(i){var e=window.getComputedStyle(i);return new WebKitCSSMatrix(e.webkitTransform).m41},a.prototype.setDimensions=function(i){i.style.width=this.parent.element.clientWidth+"px"},a.prototype.resetValues=function(){this.currentPanel=null,this.previousPanel=null,this.nextPanel=null,this.timeStampStart=null,this.element.style.transform="",this.element.style.transitionDuration="",Dn(this.element),(0,s.vy)([this.element],da)},a.prototype.destroy=function(){this.touchObj&&(this.touchObj.destroy(),this.touchObj=null),s.Jm.remove(this.element,"transitionend",this.onTransitionEnd),this.resetValues()},a}(),fd=function(){return fd=Object.assign||function(a){for(var i,e=1,t=arguments.length;e<t;e++)for(var n in i=arguments[e])Object.prototype.hasOwnProperty.call(i,n)&&(a[n]=i[n]);return a},fd.apply(this,arguments)},hy=function(){function a(i){this.selectedCells=[],this.isCutContentPasted=!1,this.isCutAction=!1,this.keyConfigs={downArrow:"downarrow",upArrow:"uparrow",rightArrow:"rightarrow",leftArrow:"leftarrow",shiftDownArrow:"shift+downarrow",shiftUpArrow:"shift+uparrow",shiftRightArrow:"shift+rightarrow",shiftLeftArrow:"shift+leftarrow",ctrlLeftArrow:"ctrl+leftarrow",ctrlRightArrow:"ctrl+rightarrow",altOne:"alt+1",altTwo:"alt+2",altThree:"alt+3",altFour:"alt+4",altFive:"alt+5",altSix:"alt+6",altSeven:"alt+7",altEight:"alt+8",altNine:"alt+9",enter:"enter",escape:"escape",delete:"delete",backspace:"backspace",home:"home",pageUp:"pageup",pageDown:"pagedown",tab:"tab",shiftTab:"shift+tab",ctrlShiftUpArrow:"ctrl+shift+uparrow",ctrlShiftDownArrow:"ctrl+shift+downarrow",ctrlShiftLeftArrow:"ctrl+shift+leftarrow",ctrlShiftRightArrow:"ctrl+shift+rightarrow",shiftAltY:"shift+alt+y",shiftAltN:"shift+alt+n",cut:"ctrl+x",copy:"ctrl+c",cmdCut:"cmd+x",cmdCopy:"cmd+c"},this.parent=i,this.parent.element.tabIndex=-1===this.parent.element.tabIndex?0:this.parent.element.tabIndex,this.keyboardModule=new s.j9(this.parent.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.addEventListener(),this.createClipboardElement()}return a.prototype.keyActionHandler=function(i){var e=i.target;if(!("home"===i.action&&e&&["INPUT","TEXTAREA","SELECT"].indexOf(e.tagName)>-1&&e.closest(".e-quick-popup-wrapper")))switch(i.action){case"downArrow":case"shiftDownArrow":this.processDown(i,i.shiftKey);break;case"upArrow":case"shiftUpArrow":this.processUp(i,i.shiftKey);break;case"leftArrow":case"shiftLeftArrow":this.processLeft(i,i.shiftKey);break;case"rightArrow":case"shiftRightArrow":this.processRight(i,i.shiftKey);break;case"ctrlLeftArrow":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("Previous"),i),this.parent.headerModule&&this.parent.headerModule.element.querySelector(".e-prev button").focus();break;case"ctrlRightArrow":this.parent.changeDate(this.parent.activeView.getNextPreviousDate("Next"),i),this.parent.headerModule&&this.parent.headerModule.element.querySelector(".e-next button").focus();break;case"altOne":case"altTwo":case"altThree":case"altFour":case"altFive":case"altSix":case"altSeven":case"altEight":case"altNine":this.processViewNavigation(i);break;case"enter":this.processEnter(i);break;
1case"home":this.focusFirstCell();break;case"tab":case"shiftTab":this.processTab(i,i.shiftKey);break;case"delete":case"backspace":this.processDelete(i);break;case"ctrlShiftUpArrow":case"ctrlShiftDownArrow":case"ctrlShiftLeftArrow":case"ctrlShiftRightArrow":this.processCtrlShiftNavigationArrows(i);break;case"escape":this.processEscape(i);break;case"fTwelve":this.parent.allowInline&&this.parent.inlineModule&&(i.preventDefault(),this.processFTwelve(i));break;case"shiftAltY":this.parent.changeDate(new Date,i);break;case"shiftAltN":if("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView||"Year"===this.parent.currentView)return;this.processShiftAltN(i);break;case"cut":case"cmdCut":(i.ctrlKey||i.metaKey)&&this.processClipboardAction(!0,void 0,i);break;case"copy":case"cmdCopy":(i.ctrlKey||i.metaKey)&&this.processClipboardAction(!1,void 0,i)}},a.prototype.processShiftAltN=function(i){var e=this.parent.getSelectedCells(),t=i.target,n=(0,s.X$)({},null,!0);if(e.length>0&&((0,s.kp)(t,"."+ie)||(0,s.kp)(t,"."+it)||(0,s.kp)(t,"."+Wt)))n=this.getSelectedElements(t);else if((0,s.kp)(t,"."+Ce)&&!(0,s.hX)(this.parent.activeEventData.event)){var r=this.parent.activeEventData.event;n.startTime=r.StartTime,n.endTime=r.EndTime,n.isAllDay=r.IsAllDay}else{var o=this.parent.getStartEndTime(this.parent.workHours.start),l=this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount;n.startTime=new Date(this.parent.selectedDate),n.startTime.setHours(o.getHours(),o.getMinutes(),0,0),n.endTime=new Date(n.startTime.getTime()+6e4*l)}var h=(0,s.X$)(n,{cancel:!1,event:i});null!=h&&this.parent.eventWindow.openEditor(h,"Add")},a.prototype.processFTwelve=function(i){var e=i.target;if(e.classList.contains(ie)||e.classList.contains(it)){this.parent.activeCellsData=this.getSelectedElements(e);var t=(0,s.X$)(this.parent.activeCellsData,{cancel:!1,event:i});this.parent.notify(aa,{element:t.element,groupIndex:t.groupIndex,type:"Cell"})}e.classList.contains(Ce)&&e.click()},a.prototype.addEventListener=function(){this.parent.on(ef,this.onCellMouseDown,this),this.parent.allowClipboard&&this.parent.on(Zu,this.pasteHandler,this)},a.prototype.removeEventListener=function(){this.parent.off(ef,this.onCellMouseDown),this.parent.off(Zu,this.pasteHandler)},a.prototype.onCellMouseDown=function(i){if(!i.event.shiftKey&&(this.initialTarget=this.getClosestCell(i.event),!this.parent.activeViewOptions.readonly&&"MonthAgenda"!==this.parent.currentView&&this.initialTarget&&(i.event.target.classList.contains(ie)&&3!==i.event.which&&(this.parent.removeSelectedClass(),s.Jm.add(this.parent.getContentTable(),"mousemove",this.onMouseSelection,this),s.Jm.add(this.parent.getContentTable(),"mouseup mouseleave",this.onMoveUp,this)),i.event.target.classList.contains(it)&&3!==i.event.which))){this.parent.removeSelectedClass();var e=this.parent.getAllDayRow();s.Jm.add(e,"mousemove",this.onMouseSelection,this),s.Jm.add(e,"mouseup mouseleave",this.onMoveUp,this)}},a.prototype.onMouseSelection=function(i){var e=[].slice.call(this.parent.element.querySelectorAll("."+Ce));(0,s.iQ)(e,"e-allow-select");var t=this.parent.boundaryValidation(i.pageY,i.pageX);if(t.bottom||t.top||t.left||t.right){var n=this.parent.element.querySelector("."+we),o=n.offsetWidth<=n.scrollWidth&&n.scrollLeft>=0&&n.scrollLeft+n.offsetWidth<=n.scrollWidth;n.offsetHeight<=n.scrollHeight&&n.scrollTop>=0&&n.scrollTop+n.offsetHeight<=n.scrollHeight&&(t.top||t.bottom)&&(n.scrollTop+=t.top?-i.target.offsetHeight:i.target.offsetHeight),o&&(t.left||t.right)&&(n.scrollLeft+=t.left?-i.target.offsetWidth:i.target.offsetWidth)}var l=this.getClosestCell(i);l&&this.selectCells(!0,l)},a.prototype.getClosestCell=function(i){return(0,s.kp)(i.target,"."+ie+",."+it)},a.prototype.onMoveUp=function(i){var e=this,t=[].slice.call(this.parent.element.querySelectorAll("."+Ce));if((0,s.vy)(t,"e-allow-select"),s.Jm.remove(this.parent.getContentTable(),"mousemove",this.onMouseSelection),s.Jm.remove(this.parent.getContentTable(),"mouseup mouseleave",this.onMoveUp),i.target.classList.contains(it)){var n=this.parent.getAllDayRow();s.Jm.remove(n,"mousemove",this.onMouseSelection),s.Jm.remove(n,"mouseup mouseleave",this.onMoveUp)}if(!this.isPreventAction(i)){var o=(0,s.kp)(i.target,"."+ie+",."+it+",."+Wt);if(o){var l=this.parent.getSelectedCells();if(l.length>0&&-1===l.indexOf(o)&&(o=l[l.length-1]),"TimelineYear"!==this.parent.currentView||!o.classList.contains(pt)){this.parent.activeCellsData=this.getSelectedElements(o);var h={};this.parent.eventWindow&&this.parent.eventWindow.convertToEventData(this.parent.activeCellsData,h),this.parent.trigger(yl,{data:h,element:this.parent.activeCellsData.element,event:i,requestType:ab,showQuickPopup:!1},function(p){if((p.showQuickPopup||e.parent.quickInfoOnSelectionEnd)&&l.length>1){var f=(0,s.X$)(e.parent.activeCellsData,{cancel:!1,event:i,name:"cellClick"});e.parent.notify(fr,f)}})}}}},a.prototype.processEnter=function(i){if(!(this.parent.activeViewOptions.readonly&&!i.target.classList.contains(Ce)||this.isPreventAction(i)||"TimelineYear"===this.parent.currentView&&i.target.classList.contains(pt))){var e=i.target;if((0,s.kp)(e,"."+Yr))return void(e.classList.contains(ad)||e.classList.contains(ld)||e.classList.contains(va)||e.classList.contains(Wr)||e.classList.contains(po)?(e.click(),i.preventDefault()):e.classList.contains(Ut)&&(this.parent.element.querySelector("."+ld).click(),i.preventDefault()));if(e.classList.contains(on)&&e.classList.contains(tr)){var t=e.querySelector("."+pa);return void(t&&t.click())}if(e.classList.contains(ie)||e.classList.contains(it)){this.parent.activeCellsData=this.getSelectedElements(e);var n=(0,s.X$)(this.parent.activeCellsData,{cancel:!1,event:i});return void(this.parent.allowInline?this.parent.notify(aa,{element:n.element,groupIndex:n.groupIndex,type:"Cell"}):"Year"===this.parent.currentView?e.click():this.parent.notify(fr,n))}if(e.classList.contains(an)&&this.parent.inlineModule)return void this.parent.inlineModule.inlineCrudActions(e);if(e.classList.contains(Ce)||e.classList.contains(Df)||e.classList.contains(Nl)||e.classList.contains(Fi))return void e.click();if(e.classList.contains(ba))return this.parent.setProperties({selectedDate:this.parent.getDateFromElement(e)},!0),this.parent.changeView(this.parent.getNavigateView(),i),void this.processEscape(i)}},a.prototype.getSelectedElements=function(i){var e;if(this.selectedCells.length>1&&i.classList.contains(so)){var t=this.parent.getCellDetails(this.selectedCells[0]),n=this.parent.getCellDetails(this.selectedCells.slice(-1)[0]);t.endTime=n.endTime,t.element=i,e=t}else e=this.parent.getCellDetails(i);return e},a.prototype.getCells=function(i,e,t){var n=this.parent.getContentTable(),r="TimelineYear"===this.parent.currentView,l=[].slice.call(n.querySelectorAll(r&&!i?"."+ie+":not(."+pt+")":"td")),h=n.rows.length,d=n.rows[0].cells.length;if(e&&e.classList.contains(it)){var p=this.parent.getAllDayRow();l=[].slice.call(p.cells),h=1,d=p.cells.length}var u=l.indexOf(e),f=l.indexOf(t),m=[];
1if(i){for(var g=0;g<d;g++)for(var v=0;v<h;v++){var b=l[d*v+g];r&&b.classList.contains(pt)||m.push(b)}u=m.indexOf(e),f=m.indexOf(t)}if(u>f){var y=u;u=f,f=y}return(i?m:l).slice(u,f+1)},a.prototype.focusFirstCell=function(){if("Agenda"===this.parent.currentView){var i=this.parent.getContentTable().querySelector("."+br);return i.setAttribute("tabindex","0"),void i.focus()}if(this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.activeView.isTimelineView()&&"TimelineYear"!==this.parent.currentView){var e=this.parent.element.querySelector("."+nt+" tr:not(."+Ai+") ."+ie+":not(."+Es+")");this.selectCells(!1,e)}else if(this.parent.currentView.indexOf("Year")>-1){var t="."+ie+":not(."+pt+"):not(."+Es+")";t+="TimelineYear"===this.parent.currentView&&"Vertical"===this.parent.activeViewOptions.orientation?'[data-date="'+this.parent.activeView.startDate().getTime()+'"]':"",this.selectCells(!1,this.parent.element.querySelector(t))}else this.selectCells(!1,this.parent.getWorkCellElements()[0])},a.prototype.isInverseTableSelect=function(){return this.parent.activeView.isInverseTableSelect},a.prototype.selectCells=function(i,e){var t=this;this.parent.removeSelectedClass();var n=e instanceof Array?e.slice(-1)[0]:e;if(i){var r,o=["Day","Week","WorkWeek","TimelineDay","TimelineWeek","TimelineWorkWeek","TimelineMonth","TimelineYear"],l={element:e,requestType:"mousemove",allowMultipleRow:!0};this.parent.inlineModule.removeInlineAppointmentElement(),this.parent.trigger(yl,l,function(h){if(!h.allowMultipleRow||!t.parent.allowMultiRowSelection){var p="TimelineYear"===t.parent.currentView;p&&"Horizontal"===t.parent.activeViewOptions.orientation||"Month"===t.parent.currentView?n=p&&t.parent.activeViewOptions.group.resources.length>0?t.initialTarget:t.initialTarget.parentElement.children[n.cellIndex]:o.indexOf(t.parent.currentView)>-1&&(n=n.parentElement.children[t.initialTarget.cellIndex])}var f=t.getCells(t.isInverseTableSelect(),t.initialTarget,n);if(t.parent.activeViewOptions.group.resources.length>0){r=t.initialTarget.getAttribute("data-group-index");for(var m=[],g=0,v=f;g<v.length;g++)(b=v[g]).getAttribute("data-group-index")===r&&m.push(b);f=m}if(t.parent.allowMultiCellSelection||(f=[t.initialTarget]),t.selectedCells=f,f.length>2&&!n.classList.contains(it)){var y=t.getAllDayCells(f);if(t.parent.activeViewOptions.group.resources.length>0){for(var S=[],E=0,_=y;E<_.length;E++){var b;(b=_[E]).getAttribute("data-group-index")===r&&S.push(b)}y=S}f=f.concat(y)}n.getAttribute("data-group-index")!==r&&t.parent.activeViewOptions.group.resources.length>0&&(n=t.selectedCells[t.selectedCells.length-1]),t.parent.addSelectedClass(f,n)})}else this.parent.trigger(yl,l={element:n,requestType:ab},function(){t.initialTarget=n,t.selectedCells=[n],t.parent.addSelectedClass([n],n)})},a.prototype.selectAppointment=function(i,e){var t=this.getAppointmentElements();if(!(t.length<0)){var n;if(this.parent.eventBase.removeSelectedAppointmentClass(),e.classList.contains(Ce)){var r=t.indexOf(e);n=t[i?r-1:r+1]}else n=i?t[t.length-1]:t[0];n&&(this.parent.eventBase.addSelectedAppointments([n],!0),n.focus(),(0,s.iQ)([n],td))}},a.prototype.selectAppointmentElementFromWorkCell=function(i,e){var t=this;if(this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.removeSelectedClass(),e.classList.contains(ie)||e.classList.contains(it)){var n=this.getUniqueAppointmentElements(),r=[],o=this.parent.getDateFromElement(e).getTime();if(this.parent.eventsProcessed.filter(function(p){return i?p[t.parent.eventFields.startTime].getTime()<=o:p[t.parent.eventFields.startTime].getTime()>=o}).filter(function(p){n.filter(function(u){JSON.stringify(p.Guid)===JSON.stringify(u.getAttribute("data-guid"))&&r.push(u)})}),r.length>0){var d=this.getAppointmentElementsByGuid((i?r[r.length-1]:r[0]).getAttribute("data-guid"));this.parent.eventBase.addSelectedAppointments(d,!0),d[d.length-1].focus()}}},a.prototype.getAllDayCells=function(i){var e=this.parent.getAllDayRow();if(!e)return[];var t=i[0],n=i[i.length-1],r=this.parent.getCellDetails(t);return this.parent.getCellDetails(n).endTime.getTime()-r.startTime.getTime()>=bt?[].slice.call(e.cells).slice(t.cellIndex,n.cellIndex+1):[]},a.prototype.getAppointmentElements=function(){return[].slice.call(this.parent.element.querySelectorAll("."+Ce))},a.prototype.getAppointmentElementsByGuid=function(i){return[].slice.call(this.parent.element.querySelectorAll('div[data-guid="'+i+'"]'))},a.prototype.getUniqueAppointmentElements=function(){var i=this.getAppointmentElements(),e=[];return i.map(function(t){return t.getAttribute("data-guid")}).filter(function(t,n,r){r.indexOf(t)===n&&e.push(i[parseInt(n.toString(),10)])}),e},a.prototype.getWorkCellFromAppointmentElement=function(i){var e=this.parent.eventBase.getEventByGuid(i.getAttribute("data-guid"));return this.parent.eventBase.selectWorkCellByTime([e])},a.prototype.processViewNavigation=function(i){if(!(0,s.hX)(i.code)){var e=parseInt(i.code.slice(i.code.length-1),10)-1;if(!isNaN(e)&&!(0,s.hX)(this.parent.views)&&e<this.parent.views.length){var t=this.parent.viewCollections[parseInt(e.toString(),10)].option;this.parent.changeView(t,i,void 0,e),this.parent.headerModule&&this.parent.headerModule.element.querySelector(".e-active-view button").focus()}}},a.prototype.isCalendarTarget=function(i){var e=i.currentTarget||i.target;return!(!e||(0,s.hX)(e.querySelector(".e-header-popup.e-popup-open")))},a.prototype.cancelUpDownAction=function(i){return!!(i&&"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0||i&&this.initialTarget.classList.contains(pt)||this.parent.activeView.isTimelineView()&&!i||"MonthAgenda"===this.parent.currentView)},a.prototype.processUp=function(i,e){var t="TimelineYear"===this.parent.currentView;if(!(e&&this.cancelUpDownAction(t)||this.isCalendarTarget(i))){var n=i.target,r=this.parent.getSelectedCells(),o=this.parent.eventBase.getSelectedAppointments(),l=this.parent.element.querySelector("."+Sr),h=this.getQuickPopupElement();if(r.length>0&&!i.target.classList.contains(ie)&&(n=r[r.length-1]),o.length>0&&!l.classList.contains(Qt)&&!h.classList.contains(Qt)&&-1!==["Day","Week","WorkWee
1k","Month"].indexOf(this.parent.currentView)&&(n=this.getWorkCellFromAppointmentElement(o[o.length-1]),this.parent.eventBase.removeSelectedAppointmentClass()),n)if(n.classList.contains(ie)&&!this.parent.element.querySelector("."+Qt)){var d=this.parent.getTableRows(),p=d.indexOf(n.parentElement),u=void 0;if(t&&e&&0===this.parent.activeViewOptions.group.resources.length&&(u=this.isInverseTableSelect()?this.getVerticalUpDownCell(d,n,p,!0):this.getHorizontalUpDownCell(d,n,p,!0)),(p>0||u)&&p<d.length){if(u=u||d[p-1].cells[n.cellIndex],"Year"===this.parent.currentView&&u.classList.contains(pt)){if(!(this.parent.activeView.getStartDate().getTime()<+u.getAttribute("data-date")))return;u=this.getYearUpDownCell(d,p-1,n.cellIndex,!0)}i.preventDefault(),this.selectCells(e,u)}}else("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView)&&this.selectAppointment(!0,n)}},a.prototype.processDown=function(i,e){var t="TimelineYear"===this.parent.currentView;if(!(e&&this.cancelUpDownAction(t)||this.isCalendarTarget(i))){var n=i.target,r=this.parent.getSelectedCells(),o=this.parent.eventBase.getSelectedAppointments(),l=this.parent.element.querySelector("."+Sr),h=this.getQuickPopupElement();r.length>0&&!i.target.classList.contains(ie)&&(n=r[r.length-1]),o.length>0&&!l.classList.contains(Qt)&&!h.classList.contains(Qt)&&-1!==["Day","Week","WorkWeek","Month"].indexOf(this.parent.currentView)&&(n=this.getWorkCellFromAppointmentElement(o[o.length-1]),this.parent.eventBase.removeSelectedAppointmentClass());var d=this.parent.getTableRows();if(n)if(n.classList.contains(ie)&&!this.parent.element.querySelector("."+Qt)){var p=d.indexOf(n.parentElement),u=void 0;if(t&&e&&0===this.parent.activeViewOptions.group.resources.length&&(u=this.isInverseTableSelect()?this.getVerticalUpDownCell(d,n,p,!1):this.getHorizontalUpDownCell(d,n,p,!1)),p>=0&&(p<d.length-1||u)){if(u=u||d[p+1].cells[n.cellIndex],"Year"===this.parent.currentView&&u.classList.contains(pt)){if(!(this.parent.activeView.getEndDate().getTime()>+u.getAttribute("data-date")))return;u=this.getYearUpDownCell(d,p+1,n.cellIndex,!1)}i.preventDefault(),this.selectCells(e,u)}}else("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView)&&this.selectAppointment(!1,n)}},a.prototype.getYearUpDownCell=function(i,e,t,n){for(;i[parseInt(e.toString(),10)]&&i[parseInt(e.toString(),10)].cells[parseInt(t.toString(),10)].classList.contains(pt);)e+=n?-1:1;return i[parseInt(e.toString(),10)].cells[parseInt(t.toString(),10)]},a.prototype.getHorizontalUpDownCell=function(i,e,t,n){var r=i[t+(n?-1:1)],o=r?r.cells[e.cellIndex]:e;if(o.classList.contains(pt)){var l=r.querySelector("."+ie+":not(."+pt+")"),h=new Date(+l.getAttribute("data-date")),d='[data-date="'+new Date(h.getFullYear(),h.getMonth()+1,0).getTime()+'"]';o=o.cellIndex<l.cellIndex?l:r.querySelector(d)}return o},a.prototype.getVerticalUpDownCell=function(i,e,t,n){var o=n&&t>0||!n&&t<i.length-1?i[t+(n?-1:1)].cells[e.cellIndex]:void 0;if(!o||o.classList.contains(pt)){if(i[parseInt(t.toString(),10)].cells[e.cellIndex-(n?1:-1)]){var h=+e.getAttribute("data-date")-(n?bt:-bt);return this.parent.getContentTable().querySelector("."+ie+'[data-date="'+h+'"]')}o=e}return o},a.prototype.processLeftRight=function(i){var e="Year"===this.parent.currentView?i.closest("tbody"):this.parent.getContentTable(),t=i.parentNode.sectionRowIndex;return{element:e,rowIndex:t,columnIndex:i.cellIndex,maxIndex:e.rows[parseInt(t.toString(),10)].cells.length}},a.prototype.getQuickPopupElement=function(){return(this.parent.isAdaptive?document.body:this.parent.element).querySelector("."+Yr)},a.prototype.isCancelLeftRightAction=function(i,e,t){var n="MonthAgenda"===this.parent.currentView||t&&this.initialTarget.classList.contains(pt);if("Agenda"===this.parent.currentView||e&&n||this.isPreventAction(i)&&e)return!0;var r=this.parent.element.querySelector("."+Sr),o=this.getQuickPopupElement();return!(!r.classList.contains(Qt)&&!o.classList.contains(Qt))},a.prototype.processRight=function(i,e){var t="TimelineYear"===this.parent.currentView;if(!this.isCancelLeftRightAction(i,e,t)&&!this.isCalendarTarget(i)){var r,n=this.parent.getSelectedCells(),o=this.parent.eventBase.getSelectedAppointments(),l=i.target;if(n.length>0&&!l.classList.contains(ie)&&!l.classList.contains(it)&&(l=n[n.length-1]),!(o.length>0)||(l=this.getWorkCellFromAppointmentElement(o[o.length-1]),this.parent.eventBase.removeSelectedAppointmentClass(),l))if(l.classList.contains(ie)&&i.target.classList.contains(ie)){var h=this.processLeftRight(l),d=new Date(+l.getAttribute("data-date")),p="Year"===this.parent.currentView&&d.getTime()===no(d).getTime();if(h.columnIndex>=0&&h.columnIndex<h.maxIndex-1&&!p)r=this.calculateNextPrevDate(l,h.element.rows[h.rowIndex].cells[l.cellIndex+1],"right"),t&&e&&r.classList.contains(pt)&&(r=this.getTimelineYearTargetCell(h,l,!0)),(0,s.hX)(r)||this.selectCells(e,r);else if(h.columnIndex===h.maxIndex-1||p)if(!this.isInverseTableSelect()&&h.rowIndex<h.element.rows.length-1&&!p){r=this.calculateNextPrevDate(l,h.element.rows[h.rowIndex+1].cells[0],"right");var u=t&&e&&r.classList.contains(pt);r=u?this.getHorizontalLeftRightCell(h,l,!0):r,(0,s.hX)(r)||this.selectCells(e,r)}else if(!e){if(p&&d.getTime()!==this.parent.activeView.getEndDate().getTime())return void this.selectCells(e,this.parent.element.querySelector(":not(."+pt+')[data-date="'+(d.getTime()+bt)+'"]'));var f=this.isInverseTableSelect()?h.rowIndex:0;this.parent.changeDate(this.parent.activeView.getNextPreviousDate("Next"),i);var m=this.parent.getContentTable(),g=p?m.rows[parseInt(f.toString(),10)].querySelector("."+ie+":not(."+pt+")"):m.rows[parseInt(f.toString(),10)].cells[0];this.selectCells(!1,g)}}else if(l.classList.contains(it)){var v=l.cellIndex,b=this.parent.getAllDayRow(),y=b.cells.length;if(v>=0&&v<y-1)this.selectCells(e,b.cells[v+1]);else if(v===y-1&&!e){this.parent.changeDate(this.parent.activeView.getNextPreviousDate("Next"),i);var S=this.parent.getAllDayRow();this.selectCells(!1,S.cells[0])}}}},a.prototype.processLeft=function(i,e){var t="TimelineYear"===this.parent.currentView;if(!this.isCancelLeftRightAction(i,e,t)&&!this.isCalendarTarget(i)){var o,n=i.target,r=this.parent.getSelectedCells();r.length>0&&!n.classList.contains(ie)&&!n.classList.contains(it)&&(n=r[r.length-1]);var l=this.parent.eventBase.getSelectedAppointments();if(!(l.length>0)||(n=this.getWorkCellFromAppointmentElement(l[l.length-1]),this.parent.eventBase.removeSelectedAppointmentClass(),n))if(i.target.classList.contains(ie)&&n.classList.contains(ie)){var h=this.processLeftRight(n),d=new Date(+n.getAttribute("data-date")),p="Year"===this.parent.currentView&&d.getTime()===la(d).getTime();if(h.columnIndex>0&&h.columnIndex<h.maxIndex&&!p)o=this.calculateNextPrevDate(n,h.element.rows[h.rowIndex].cells[n.cellIndex-1],"left"),t&&e&&o.classList.contains(pt)&&(o=this.getTimelineYearTargetCell(h,n,!1)),(0,s.hX)(o)||this.selectCells(e,o);else if(0===h.columnIndex||p)if(!this.isInverseTableSelect()&&h.rowIndex>0){o=this.calculateNextPrevDate(n,h.element.rows[h.rowIndex-1].cells[h.maxIndex-1],"left");var u=t&&e&&o.classList.contains(pt);o=u?this.getHorizontalLeftRightCell(h,n,!1):o,(0,s.hX)(o)||this.selectCells(e,o)}else if(!e){if(p&&d.getTime()!==this.parent.activeView.getStartDate().getTime())return void this.selectCells(e,this.parent.element.querySelector('[data-date="'+(d.getTime()-bt)+'"]'));this.parent.changeDate(this.parent.activeView.getNextPreviousDate("Previous"),i);var f=this.parent.getContentTable(),m=this.isInverseTableSelect()?h.rowIndex:f.rows.length-1,g=f.rows[parseInt(m.toString(),10)].cells[h.maxIndex-1];if(p){var v=this.parent.element.querySelectorAll("."+nt+" tbody");g=v.item(v.length-1).querySelector(":not(."+pt+')[data-date="'+this.parent.activeView.getEndDate().getTime()+'"]')}this.selectCells(!1,g)}}else if(n.classList.contains(it)){var b=n.cellIndex,y=this.parent.getAllDayRow(),S=y.cells.length;if(b>0&&b<S)this.selectCells(e,y.cells[b-1]);else if(0===b&&!e){this.parent.changeDate(this.parent.activeView.getNextPreviousDate("Previous"),i);var E=this.parent.getAllDayRow();this.selectCells(!1,E.cells[S-1])}}}},a.prototype.getTimelineYearTargetCell=function(i,e,t){return this.isInverseTableSelect()?this.getVerticalLeftRightCell(e,t):this.getHorizontalLeftRightCell(i,e,t)},a.prototype.getHorizontalLeftRightCell=function(i,e,t){var n=i.element.rows[e.parentNode.sectionRowIndex+(t?1:-1)];if(n){var r=t?"."+ie+":not(."+pt+")":'[data-date="'+(+e.getAttribute("data-date")-bt)+'"]';return n.querySelector(r)}return e},a.prototype.getVerticalLeftRightCell=function(i,e){var t=new Date(+i.getAttribute("data-date")),n=new Date(t.getFullYear(),t.getMonth()+(e?1:-1),1
1),r=this.parent.getContentTable(),o=r.querySelector('[data-date="'+n.getTime()+'"]');return o.parentNode.sectionRowIndex>i.parentNode.sectionRowIndex?o:r.querySelector('[data-date="'+new Date(n.getFullYear(),n.getMonth()+1,0).getTime()+'"]')},a.prototype.calculateNextPrevDate=function(i,e,t){var n=this.initialTarget.getAttribute("data-group-index");if(this.parent.activeViewOptions.group.resources.length>0&&"Month"===this.parent.currentView&&i&&e&&e.getAttribute("data-group-index")!==n){var r=this.parent.getDateFromElement(i),o="right"===t?new Date(r.setDate(r.getDate()+1)):new Date(r.setDate(r.getDate()-1));e=[].slice.call(this.parent.element.querySelectorAll('td[data-date="'+o.getTime().toString()+'"][data-group-index="'+n+'"]'))[0]}return e},a.prototype.getFocusableElements=function(i){return[].slice.call(i.querySelectorAll('a[href]:not([tabindex="-1"]),input:not([disabled]):not([tabindex="-1"]),textarea:not([disabled]):not([tabindex="-1"]),button:not([disabled]):not([tabindex="-1"]),select:not([disabled]):not([tabindex="-1"]),[tabindex]:not([tabindex="-1"]),[contentEditable=true]:not([tabindex="-1"])'))},a.prototype.processTabOnPopup=function(i,e){var t=this,n=this.getFocusableElements(e),r=(n=n.filter(function(l){var h=t.parent.element.querySelector("."+Af);return h&&h.offsetParent?!(l.classList.contains(ho)||l.classList.contains(jl)):!(l.classList.contains(va)||l.classList.contains(Wr))}))[0],o=n[n.length-1];!(0,s.hX)(o)&&document.activeElement===o&&!i.shiftKey&&(i.preventDefault(),r.focus()),!(0,s.hX)(r)&&document.activeElement===r&&i.shiftKey&&(i.preventDefault(),o.focus())},a.prototype.processTab=function(i,e){var t=i.target;if(t.classList.contains(an)&&this.parent.inlineModule&&(t=t.closest(".e-appointment"),this.parent.inlineModule.inlineCrudActions(i.target)),"TimelineYear"===this.parent.currentView&&t.classList.contains(pt))t.classList.contains(so)&&this.parent.removeSelectedClass();else{var n=(0,s.kp)(t,"."+Yr+",."+Sr);if(n&&n.classList.contains(Qt))return n.classList.contains(Sr)&&this.parent.eventBase.removeSelectedAppointmentClass(),void this.processTabOnPopup(i,n);if(t.classList.contains(jh))this.parent.eventBase.removeSelectedAppointmentClass();else if(t.classList.contains(on)&&this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0){var r=parseInt(t.getAttribute("data-group-index"),10);if((l=[].slice.call(this.parent.element.querySelectorAll("."+Ce+'[data-group-index="'+(e?r-1:r)+'"]'))).length>0){this.parent.eventBase.removeSelectedAppointmentClass();var h=e?l.slice(-1)[0]:l[0];this.parent.eventBase.addSelectedAppointments([h],!0),h.focus(),i.preventDefault()}else if(r+1===this.parent.resourceBase.lastResourceLevel.length)this.parent.element.focus(),i.preventDefault();else if(this.parent.virtualScrollModule){var d=this.parent.element.querySelector("."+Pl),p=Math.round(d.offsetHeight/this.parent.resourceBase.expandedResources.length);this.parent.element.querySelector(".e-content-wrap").scrollTop=(e?r-1:r+1)*p,this.parent.virtualScrollModule.virtualScrolling()}else this.setScrollPosition(r)}else if(t.classList.contains(Ce)){var l=[].slice.call(this.parent.element.querySelectorAll("."+Ce)),u="TimelineYear"===this.parent.currentView;if((this.parent.activeView.isTimelineView()&&!u||u&&"Vertical"===this.parent.activeViewOptions.orientation)&&this.parent.activeViewOptions.group.resources.length>0){r=parseInt(t.getAttribute("data-group-index"),10),l=[].slice.call(this.parent.element.querySelectorAll("."+Ce+'[data-group-index="'+r+'"]'));var g=this.parent.element.querySelector("."+on+'[data-group-index="'+(e?r:r+1)+'"]');if(g&&(e&&t.getAttribute("data-guid")===l[0].getAttribute("data-guid")||!e&&t.getAttribute("data-guid")===l.slice(-1)[0].getAttribute("data-guid")))return this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.virtualScrollModule?g.focus({preventScroll:!0}):g.focus(),this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&(0,s.hX)(this.parent.virtualScrollModule)&&this.setScrollPosition(r),void i.preventDefault()}var v=this.parent.eventBase.getSelectedAppointments();if(v.length>0&&(t=v[v.length-1]),this.parent.eventBase.removeSelectedAppointmentClass(),!e&&t.getAttribute("data-guid")===l[l.length-1].getAttribute("data-guid")||e&&t.getAttribute("data-guid")===l[0].getAttribute("data-guid"))return;("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView)&&(this.selectAp
1pointment(e,t),i.preventDefault())}else{var b=this.parent.getSelectedCells();if(b.length>0&&!t.classList.contains(Ce))return this.selectAppointmentElementFromWorkCell(e,t=b[b.length-1]),void i.preventDefault();t&&!t.classList.contains(on)&&this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&this.processTabOnResourceCells(t,e)}}},a.prototype.processDelete=function(i){var e=document.activeElement;if("MonthAgenda"===this.parent.currentView){var t=this.parent.eventBase.getSelectedEvents().element;e=t&&(0,s.hX)(t.length)?t:t[0]}if(e&&e.classList.contains(Ce)){if((0,s.iQ)([e],Ts),this.parent.activeEventData=this.parent.eventBase.getSelectedEvents(),this.parent.activeViewOptions.readonly||e.classList.contains(Wl)||!this.parent.eventSettings.allowDeleting)return;this.parent.quickPopup.deleteClick(i)}},a.prototype.processCtrlShiftNavigationArrows=function(i){if(this.parent.activeViewOptions.group.resources.length>0&&document.activeElement.classList.contains(Ce)){var e=parseInt(document.activeElement.getAttribute("data-group-index"),10);t=(t="ctrlShiftLeftArrow"===i.action||"ctrlShiftUpArrow"===i.action?e-1:e+1)<0?0:t>this.parent.resourceBase.lastResourceLevel.length?this.parent.resourceBase.lastResourceLevel.length:t;for(var n=[];0===n.length&&t>=0&&t<=this.parent.resourceBase.lastResourceLevel.length;)n=[].slice.call(this.parent.element.querySelectorAll("."+Ce+'[data-group-index="'+t+'"]')),t="ctrlShiftLeftArrow"===i.action||"ctrlShiftUpArrow"===i.action?t-1:t+1;var r=n[0];r&&(this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.eventBase.addSelectedAppointments([r],!0),r.focus())}else if(this.parent.activeViewOptions.group.resources.length>0&&!document.activeElement.classList.contains(Ce)){var t,l=[].slice.call(this.parent.element.querySelectorAll("."+Ce+'[data-group-index="'+(t=this.parent.resourceBase.renderedResources[0].groupIndex)+'"]'));if(l.length>0){this.parent.eventBase.removeSelectedAppointmentClass();var h=l[0];this.parent.eventBase.addSelectedAppointments([h],!0),h.focus(),i.preventDefault()}}},a.prototype.processEscape=function(i){this.parent.quickPopup.onClosePopup(i),this.parent.quickPopup.morePopup.hide(),this.parent.headerModule&&this.parent.headerModule.hideHeaderPopup(),this.parent.inlineModule&&this.parent.inlineModule.removeInlineAppointmentElement()},a.prototype.isPreventAction=function(i){var e=(0,s.kp)(i.target,"."+Es);return!(!this.parent.activeView.isTimelineView()||(0,s.hX)(e))},a.prototype.processTabOnResourceCells=function(i,e){var t=[].slice.call(this.parent.element.querySelectorAll('[tabIndex="0"]')),n=t.indexOf(i),r=e?t[n-1]:t[n+1];if(r&&r.classList.contains(on)){var o=parseInt(r.getAttribute("data-group-index"),10);if(this.parent.virtualScrollModule){var l=this.parent.element.querySelector("."+Wi);[].slice.call(this.parent.element.querySelectorAll("."+on)).forEach(function(d){d.getBoundingClientRect().top<l.getBoundingClientRect().top&&d.setAttribute("tabindex","-1")})}else this.setScrollPosition(o)}},a.prototype.setScrollPosition=function(i){var e=this.parent.element.querySelector("."+ie+'[data-group-index="'+i+'"]');e&&(this.parent.element.querySelector("."+we).scrollTop=e.offsetTop)},a.prototype.createClipboardElement=function(){this.parent.allowClipboard&&(this.clipBoardTextArea=this.parent.createElement("textarea",{className:"e-clipboard",attrs:{tabindex:"-1"}}),this.parent.element.appendChild(this.clipBoardTextArea))},a.prototype.setCopy=function(i,e){var t=this;if(""===window.getSelection().toString()){this.clipBoardTextArea.value="";var n={elements:[],eventDatas:[]};if(i){var r=this.filterReadOnlyEvent(i);n.eventDatas=r}else{if(!this.parent||!this.parent.eventBase)return;var o=this.parent.eventBase.getSelectedEvents();o.event=o&&o.event?Array.isArray(o.event)?this.filterReadOnlyEvent(o.event):this.filterReadOnlyEvent([o.event]):void 0,o.element&&o.event?n={elements:o.element,eventDatas:o.event}:(n.element=[e.target],n.eventDatas=[this.parent.getEventDetails(e.target)])}this.clipBoardTextArea.value=JSON.stringify(n.eventDatas,void 0,2),/ipad|ipod|iphone/i.test(s.Pw.userAgent)?this.clipBoardTextArea.setSelectionRange(0,this.clipBoardTextArea.value.length):this.clipBoardTextArea.select(),(0,s.hX)(navigator.clipboard)||navigator.clipboard.writeText(this.clipBoardTextArea.value).then(function(){if(t.clipBoardTextArea.blur(),window.getSelection().removeAllRanges(),e){var l=e.target.closest("."+Ce);l&&l.focus()}}).catch(function(l){throw l})}},a.prototype.filterReadOnlyEvent=function(i){var e=this;return i.filter(function(t){return!t[e.parent.eventFields.isReadonly]})},a.prototype.processClipboardAction=function(i,e,t){this.parent.allowClipboard&&(this.isCutAction=i,this.isCutContentPasted=!1,this.parent.closeQuickInfoPopup(),this.setCopy(e||void 0,t))},a.prototype.pasteHandler=function(i,e){var t=this;if(this.parent.allowClipboard&&!this.isCutContentPasted){var n=this.parent.getSelectedCells().length>0?this.parent.getSelectedCells():e?[e]:[];
1if(0!==n.length&&!this.parent.eventWindow.dialogObject.visible&&!this.parent.quickPopup.quickPopup.element.classList.contains(Qt)){var o=(i.clipboardData||i.event.clipboardData||window.clipboardData).getData("text");if("[]"!==o&&""!==o){var l;try{l=JSON.parse(o)}catch{l=o}this.parent.trigger("beforePaste",{cancel:!1,data:l,element:n},function(d){d.cancel?t.parent.closeQuickInfoPopup():Array.isArray(d.data)&&d.data.every(function(p){return"object"==typeof p})?(t.processPaste(d.data,e),t.isCutAction&&(t.isCutContentPasted=!0)):t.clipBoardTextArea.value=""})}}}},a.prototype.processPaste=function(i,e){if(this.parent&&this.parent.eventWindow&&this.parent.eventBase&&i&&i.length){var t=this.getTargetElements(e),n=this.parent.getCellDetails(t),r={};this.parent.eventWindow.convertToEventData(n,r);var o=this.isAllDayEvent(t),l=this.parent.getResourcesByIndex(n.groupIndex),h=this.processEventData(i,o,n,l),d=this.parent.eventBase.sortByDateTime(h),p=this.prepareEventData(d,r);(0,s.vy)(t,so),p.length>0&&(this.isCutAction?this.parent.saveEvent(p):this.parent.addEvent(p))}},a.prototype.getTargetElements=function(i){return this.parent.getSelectedCells().length>0?this.parent.getSelectedCells():i?[i]:[]},a.prototype.isAllDayEvent=function(i){return!i.some(function(e){return e.classList.contains(ie)})},a.prototype.processEventData=function(i,e,t,n){var r=this;return i.map(function(o){var l,h=fd({},o,((l={})[r.parent.eventFields.startTime]=new Date(o[r.parent.eventFields.startTime]),l[r.parent.eventFields.endTime]=new Date(o[r.parent.eventFields.endTime]),l[r.parent.eventFields.recurrenceID]=null,l[r.parent.eventFields.isAllDay]=e,l));return r.adjustEventTime(h,e,o.IsAllDay,t),n&&n.groupData&&Object.assign(h,n.groupData),h})},a.prototype.adjustEventTime=function(i,e,t,n){var r=this.parent.activeViewOptions.timeScale.enable;-1!==["Day","Week","WorkWeek"].indexOf(this.parent.currentView)&&r?e?(i[this.parent.eventFields.endTime]=new Date(i[this.parent.eventFields.startTime]),i[this.parent.eventFields.endTime].setDate(i[this.parent.eventFields.startTime].getDate()+1)):t&&(i[this.parent.eventFields.startTime]=new Date(i[this.parent.eventFields.startTime].setHours(0,0,0,0)),i[this.parent.eventFields.endTime]=new Date(i[this.parent.eventFields.startTime].getTime()+(n.endTime.getTime()-n.startTime.getTime()))):t&&(i[this.parent.eventFields.isAllDay]=!0,i[this.parent.eventFields.startTime]=new Date(i[this.parent.eventFields.startTime].setHours(0,0,0,0)),i[this.parent.eventFields.endTime]=new Date(i[this.parent.eventFields.startTime].getTime()+(i[this.parent.eventFields.endTime].getTime()-i[this.parent.eventFields.startTime].getTime())))},a.prototype.prepareEventData=function(i,e){var t=this,n=new Date(i[0][this.parent.eventFields.startTime]),r=this.parent.getEventMaxID();return i.map(function(o){var l=t.calculateTotalDuration(o,e,n),h=t.isCutAction?o:fd({},o);return o[t.parent.eventFields.recurrenceRule]||(h[t.parent.eventFields.startTime]=new Date(new Date(h[t.parent.eventFields.startTime]).setMilliseconds(l)),h[t.parent.eventFields.endTime]=new Date(new Date(h[t.parent.eventFields.endTime]).setMilliseconds(l))),t.isCutAction||(h[t.parent.eventFields.id]=r++),h})},a.prototype.calculateTotalDuration=function(i,e,t){if(-1===["Month","TimelineMonth","TimelineYear"].indexOf(this.parent.currentView)&&this.parent.activeViewOptions.timeScale.enable)return e[this.parent.eventFields.startTime].getTime()-t.getTime();var n=new Date(i[this.parent.eventFields.startTime]);return e[this.parent.eventFields.startTime].getTime()-t.getTime()+(36e5*n.getHours()+6e4*n.getMinutes()+1e3*n.getSeconds())},a.prototype.getModuleName=function(){return"keyboard"},a.prototype.destroy=function(){this.removeEventListener(),this.selectedCells=[],this.clipBoardTextArea=null,this.keyboardModule.destroy()},a}(),dy=function(){function a(i,e,t){this.parent=i,this.initDataManager(e,t)}return a.prototype.initDataManager=function(i,e){this.dataManager=i instanceof x.M1?i:new x.M1(i),this.query=e instanceof x.XK?e:new x.XK},a.prototype.generateQuery=function(i,e){var t=this.query.clone();if(this.parent&&i&&e){if(this.parent.activeViewOptions&&this.parent.activeViewOptions.enableLazyLoading&&!(0,s.hX)(this.parent.activeViewOptions.group.resources)&&this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase&&this.parent.resourceBase.resourceCollection.length>0&&this.parent.resourceBase.renderedResources.length>0){var n=[];this.parent.resourceBase.resourceCollection.forEach(function(){return n.push([])}
1),this.parent.resourceBase.renderedResources.forEach(function(l){n.forEach(function(h,d){var p=l.groupOrder[parseInt(d.toString(),10)];p&&h.indexOf(p)<0&&h.push(p)})}),this.parent.resourceBase.resourceCollection.forEach(function(l,h){t.addParams(l.field,n[parseInt(h.toString(),10)].toString())})}if(this.parent.timezone&&(i=this.parent.tzModule.remove(new Date(+i.getTime()),this.parent.timezone),e=this.parent.tzModule.remove(new Date(+e.getTime()),this.parent.timezone)),this.parent.eventSettings.includeFiltersInQuery){var r=this.getStartEndQuery(i,e),o=new x.mT(this.parent.eventFields.recurrenceRule,"notequal",null).and(new x.mT(this.parent.eventFields.recurrenceRule,"notequal",""));return t.where(r.or(o))}t.addParams("StartDate",i.toISOString()),t.addParams("EndDate",e.toISOString())}return t},a.prototype.getStartEndQuery=function(i,e){var t=this.parent.eventFields;return new x.mT(t.startTime,"greaterthanorequal",i).and(new x.mT(t.endTime,"greaterthanorequal",i)).and(new x.mT(t.startTime,"lessthan",e)).or(new x.mT(t.startTime,"lessthanorequal",i).and(new x.mT(t.endTime,"greaterthan",i)))},a.prototype.getData=function(i){return this.dataManager.executeQuery(i)},a.prototype.destroy=function(){this.dataManager=null,this.query=null},a}(),py=function(){function a(){}return a.prototype.firstDateOfMonth=function(i){return new Date(i.getFullYear(),i.getMonth())},a.prototype.lastDateOfMonth=function(i){return new Date(i.getFullYear(),i.getMonth()+1,0)},a.prototype.isMonthStart=function(i){return 1===i.getDate()},a.prototype.getLeapYearDaysCount=function(){return 366},a.prototype.getYearDaysCount=function(i,e){return(i.getFullYear()+e)%4==0?366:365},a.prototype.getDate=function(i){return i.getDate()},a.prototype.getMonth=function(i){return i.getMonth()+1},a.prototype.getFullYear=function(i){return i.getFullYear()},a.prototype.getYearLastDate=function(i,e){return new Date(i.getFullYear()+e,0,0)},a.prototype.getMonthDaysCount=function(i){return this.lastDateOfMonth(i).getDate()},a.prototype.getMonthStartDate=function(i){return new Date(i.getFullYear(),i.getMonth(),1,i.getHours(),i.getMinutes())},a.prototype.getMonthEndDate=function(i){return i.setDate(1),new Date(i.setMonth(i.getMonth()+1))},a.prototype.getExpectedDays=function(i,e){return e},a.prototype.setDate=function(i,e){i.setDate(e)},a.prototype.setValidDate=function(i,e,t,n,r){(0,s.hX)(r)?i.setMonth(i.getMonth()+e,t):i.setMonth((r?n:i.getMonth())+e)},a.prototype.setMonth=function(i,e,t){i.setDate(1),i.setFullYear(i.getFullYear()),i.setMonth(e-1);var n=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();i.setDate(Math.min(t,n))},a.prototype.addYears=function(i,e){i.setFullYear(i.getFullYear()+e)},a.prototype.isSameMonth=function(i,e){return i.getMonth()===e.getMonth()},a.prototype.checkMonth=function(i,e){return-1===e.indexOf(i.getMonth()+1)},a.prototype.compareMonth=function(i,e){return i.getMonth()>e.getMonth()},a.prototype.isSameYear=function(i,e){return i.getFullYear()===e.getFullYear()},a.prototype.isLastMonth=function(i){return 11===i.getMonth()},a.prototype.isLeapYear=function(i,e){return(i+e)%4==0},a}(),uy=function(){function a(){}return a.prototype.firstDateOfMonth=function(i){var e=this.getHijriDate(i);return s.cg.toGregorian(e.year,e.month,1)},a.prototype.lastDateOfMonth=function(i){var e=this.getHijriDate(i),t=this.getDaysInMonth(e.month,e.year),n=s.cg.toGregorian(e.year,e.month,t),r=new Date(n.getTime());r=new Date(r.setDate(r.getDate()+1));var o=this.getHijriDate(r);return e.month===o.month?r:(o=this.getHijriDate(n),e.month===o.month?n:new Date(n.setDate(n.getDate()-1)))},a.prototype.isMonthStart=function(i){return 1===this.getHijriDate(i).date},a.prototype.getLeapYearDaysCount=function(){return 355},a.prototype.getYearDaysCount=function(i,e){var t=this.getHijriDate(i);return this.isLeapYear(t.year,e)?355:354},a.prototype.getDate=function(i){return this.getHijriDate(i).date},a.prototype.getMonth=function(i){return this.getHijriDate(i).month},a.prototype.getFullYear=function(i){return this.getHijriDate(i).year},a.prototype.getYearLastDate=function(i,e){var t=this.getHijriDate(i);return s.cg.toGregorian(t.year+e,1,0)},a.prototype.getMonthDaysCount=function(i){var e=this.lastDateOfMonth(i);return this.getHijriDate(e).date},a.prototype.getMonthStartDate=function(i){var e=this.firstDateOfMonth(i);return new Date(e.getFullYear(),e.getMonth(),e.getDate(),i.getHours(),i.getMinutes())},a.prototype.getMonthEndDate=function(i){var e=this.lastDateOfMonth(i);return e.setDate(e.getDate()+1),new Date(e.setMonth(e.getMonth()))},a.prototype.getExpectedDays=function(i,e){for(var t=this.getHijriDate(i),n=[],r=0;r<e.length;r++){var o=s.cg.toGregorian(t.year,t.month,e[parseInt(r.toString(),10)]);n.push(o.getDate())}return n},a.prototype.setDate=function(i,e){var t=this.getHijriDate(i),n=s.cg.toGregorian(t.year,t.month,e);this.updateDateObj(i,n)},a.prototype.setValidDate=function(i,e,t,n,r){var o=(0,s.hX)(r)?i:this.firstDateOfMonth(r),l=this.getHijriDate(o),h=s.cg.toGregorian(l.year,l.month+e,t);this.updateDateObj(i,h)},a.prototype.setMonth=function(i,e,t){var n=this.getHijriDate(i),r=s.cg.toGregorian(n.year,e,t);this.updateDateObj(i,r)},a.prototype.addYears=function(i,e,t){var n=this.getHijriDate(i),r=s.cg.toGregorian(n.year+e,t,1);this.updateDateObj(i,r)},a.prototype.isSameMonth=function(i,e){var t=this.getHijriDate(i),n=this.getHijriDate(e);return t.month===n.month},a.prototype.checkMonth=function(i,e){var t=this.getHijriDate(i);return-1===e.indexOf(t.month)},a.prototype.compareMonth=function(i,e){var t=this.getHijriDate(i),n=this.getHijriDate(e);return t.month>n.month},a.prototype.isSameYear=function(i,e){var t=this.getHijriDate(i),n=this.getHijriDate(e);return t.year===n.year},a.prototype.isLastMonth=function(i){return 12===this.getHijriDate(i).month},a.prototype.updateDateObj=function(i,e){i.setFullYear(e.getFullYear(),e.getMonth(),e.getDate())},a.prototype.isLeapYear=function(i,e){return(14+11*(i+e))%30<11},a.prototype.getDaysInMonth=function(i,e){var t=0;return t=29+(i+1)%2,11===i&&this.isLeapYear(e,0)&&t++,t},a.prototype.getHijriDate=function(i){return s.cg.getHijriDate(i)},a}(),fy=function(){function a(){this.timezoneData=[],this.timezoneData=this.getTimezoneData()}return a.prototype.offset=function(i,e){var t=i.getTimezoneOffset();
1try{var n=new Date(i.toLocaleString("en-US",{timeZone:e}));return isNaN(n.getTime())?0:(i.getTime()-n.getTime())/6e4+t}catch{return 0}},a.prototype.convert=function(i,e,t){"string"==typeof e&&(e=this.offset(i,e)),"string"==typeof t&&(t=this.offset(i,t));var n=i.getTimezoneOffset(),r=(i=new Date(i.getTime()+6e4*(e-t))).getTimezoneOffset();return new Date(i.getTime()+6e4*(r-n))},a.prototype.add=function(i,e){return this.convert(i,i.getTimezoneOffset(),e)},a.prototype.remove=function(i,e){return this.convert(i,e,i.getTimezoneOffset())},a.prototype.removeLocalOffset=function(i){return new Date(i.getTime()-6e4*i.getTimezoneOffset())},a.prototype.getLocalTimezoneName=function(){return window.Intl&&Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"},a.prototype.getTimezoneData=function(){return my},a}(),my=[{Value:"Pacific/Niue",Text:"(UTC-11:00) Niue"},{Value:"Pacific/Pago_Pago",Text:"(UTC-11:00) Pago Pago"},{Value:"Pacific/Honolulu",Text:"(UTC-10:00) Hawaii Time"},{Value:"Pacific/Rarotonga",Text:"(UTC-10:00) Rarotonga"},{Value:"Pacific/Tahiti",Text:"(UTC-10:00) Tahiti"},{Value:"Pacific/Marquesas",Text:"(UTC-09:30) Marquesas"},{Value:"America/Anchorage",Text:"(UTC-09:00) Alaska Time"},{Value:"Pacific/Gambier",Text:"(UTC-09:00) Gambier"},{Value:"America/Los_Angeles",Text:"(UTC-08:00) Pacific Time"},{Value:"America/Tijuana",Text:"(UTC-08:00) Pacific Time - Tijuana"},{Value:"America/Vancouver",Text:"(UTC-08:00) Pacific Time - Vancouver"},{Value:"America/Whitehorse",Text:"(UTC-08:00) Pacific Time - Whitehorse"},{Value:"Pacific/Pitcairn",Text:"(UTC-08:00) Pitcairn"},{Value:"America/Denver",Text:"(UTC-07:00) Mountain Time"},{Value:"America/Phoenix",Text:"(UTC-07:00) Mountain Time - Arizona"},{Value:"America/Mazatlan",Text:"(UTC-07:00) Mountain Time - Chihuahua, Mazatlan"},{Value:"America/Dawson_Creek",Text:"(UTC-07:00) Mountain Time - Dawson Creek"},{Value:"America/Edmonton",Text:"(UTC-07:00) Mountain Time - Edmonton"},{Value:"America/Hermosillo",Text:"(UTC-07:00) Mountain Time - Hermosillo"},{Value:"America/Yellowknife",Text:"(UTC-07:00) Mountain Time - Yellowknife"},{Value:"America/Belize",Text:"(UTC-06:00) Belize"},{Value:"America/Chicago",Text:"(UTC-06:00) Central Time"},{Value:"America/Mexico_City",Text:"(UTC-06:00) Central Time - Mexico City"},{Value:"America/Regina",Text:"(UTC-06:00) Central Time - Regina"},{Value:"America/Tegucigalpa",Text:"(UTC-06:00) Central Time - Tegucigalpa"},{Value:"America/Winnipeg",Text:"(UTC-06:00) Central Time - Winnipeg"},{Value:"America/Costa_Rica",Text:"(UTC-06:00) Costa Rica"},{Value:"America/El_Salvador",Text:"(UTC-06:00) El Salvador"},{Value:"Pacific/Galapagos",Text:"(UTC-06:00) Galapagos"},{Value:"America/Guatemala",Text:"(UTC-06:00) Guatemala"},{Value:"America/Managua",Text:"(UTC-06:00) Managua"},{Value:"America/Cancun",Text:"(UTC-05:00) America Cancun"},{Value:"America/Bogota",Text:"(UTC-05:00) Bogota"},{Value:"Pacific/Easter",Text:"(UTC-05:00) Easter Island"},{Value:"America/New_York",Text:"(UTC-05:00) Eastern Time"},{Value:"America/Iqaluit",Text:"(UTC-05:00) Eastern Time - Iqaluit"},{Value:"America/Toronto",Text:"(UTC-05:00) Eastern Time - Toronto"},{Value:"America/Guayaquil",Text:"(UTC-05:00) Guayaquil"},{Value:"America/Havana",Text:"(UTC-05:00) Havana"},{Value:"America/Jamaica",Text:"(UTC-05:00) Jamaica"},{Value:"America/Lima",Text:"(UTC-05:00) Lima"},{Value:"America/Nassau",Text:"(UTC-05:00) Nassau"},{Value:"America/Panama",Text:"(UTC-05:00) Panama"},{Value:"America/Port-au-Prince",Text:"(UTC-05:00) Port-au-Prince"},{Value:"America/Rio_Branco",Text:"(UTC-05:00) Rio Branco"},{Value:"America/Halifax",Text:"(UTC-04:00) Atlantic Time - Halifax"},{Value:"America/Barbados",Text:"(UTC-04:00) Barbados"},{Value:"Atlantic/Bermuda",Text:"(UTC-04:00) Bermuda"},{Value:"America/Boa_Vista",Text:"(UTC-04:00) Boa Vista"},{Value:"America/Caracas",Text:"(UTC-04:00) Caracas"},{Value:"America/Curacao",Text:"(UTC-04:00) Curacao"},{Value:"America/Grand_Turk",Text:"(UTC-04:00) Grand Turk"},{Value:"America/Guyana",Text:"(UTC-04:00) Guyana"},{Value:"America/La_Paz",Text:"(UTC-04:00) La Paz"},{Value:"America/Manaus",Text:"(UTC-04:00) Manaus"},{Value:"America/Martinique",Text:"(UTC-04:00) Martinique"},{Value:"America/Port_of_Spain",Text:"(UTC-04:00) Port of Spain"},{Value:"America/Porto_Velho",Text:"(UTC-04:00) Porto Velho"},{Value:"America/Puerto_Rico",Text:"(UTC-04:00) Puerto Rico"},{Value:"America/Santo_Domingo",Text:"(UTC-04:00) Santo Domingo"},{Value:"America/Thule",Text:"(UTC-04:00) Thule"},{Value:"America/St_Johns",Text:"(UTC-03:30) Newfoundland Time - St. Johns"},{Value:"America/Araguaina",Text:"(UTC-03:00) Araguaina"},{Value:"America/Asuncion",Text:"(UTC-03:00) Asuncion"},{Value:"America/Belem",Text:"(UTC-03:00) Belem"},{Value:"America/Argentina/Buenos_Aires",Text:"(UTC-03:00) Buenos Aires"},{Value:"America/Campo_Grande",Text:"(UTC-03:00) Campo Grande"},{Value:"America/Cayenne",Text:"(UTC-03:00) Cayenne"},{Value:"America/Cuiaba",Text:"(UTC-03:00) Cuiaba"},{Value:"America/Fortaleza",Text:"(UTC-03:00) Fortaleza"}
1,{Value:"America/Godthab",Text:"(UTC-03:00) Godthab"},{Value:"America/Maceio",Text:"(UTC-03:00) Maceio"},{Value:"America/Miquelon",Text:"(UTC-03:00) Miquelon"},{Value:"America/Montevideo",Text:"(UTC-03:00) Montevideo"},{Value:"Antarctica/Palmer",Text:"(UTC-03:00) Palmer"},{Value:"America/Paramaribo",Text:"(UTC-03:00) Paramaribo"},{Value:"America/Punta_Arenas",Text:"(UTC-03:00) Punta Arenas"},{Value:"America/Recife",Text:"(UTC-03:00) Recife"},{Value:"Antarctica/Rothera",Text:"(UTC-03:00) Rothera"},{Value:"America/Bahia",Text:"(UTC-03:00) Salvador"},{Value:"America/Santiago",Text:"(UTC-03:00) Santiago"},{Value:"Atlantic/Stanley",Text:"(UTC-03:00) Stanley"},{Value:"America/Noronha",Text:"(UTC-02:00) Noronha"},{Value:"America/Sao_Paulo",Text:"(UTC-02:00) Sao Paulo"},{Value:"Atlantic/South_Georgia",Text:"(UTC-02:00) South Georgia"},{Value:"Atlantic/Azores",Text:"(UTC-01:00) Azores"},{Value:"Atlantic/Cape_Verde",Text:"(UTC-01:00) Cape Verde"},{Value:"America/Scoresbysund",Text:"(UTC-01:00) Scoresbysund"},{Value:"Africa/Abidjan",Text:"(UTC+00:00) Abidjan"},{Value:"Africa/Accra",Text:"(UTC+00:00) Accra"},{Value:"Africa/Bissau",Text:"(UTC+00:00) Bissau"},{Value:"Atlantic/Canary",Text:"(UTC+00:00) Canary Islands"},{Value:"Africa/Casablanca",Text:"(UTC+00:00) Casablanca"},{Value:"America/Danmarkshavn",Text:"(UTC+00:00) Danmarkshavn"},{Value:"Europe/Dublin",Text:"(UTC+00:00) Dublin"},{Value:"Africa/El_Aaiun",Text:"(UTC+00:00) El Aaiun"},{Value:"Atlantic/Faroe",Text:"(UTC+00:00) Faeroe"},{Value:"Etc/UTC",Text:"(UTC+00:00) UTC (no daylight saving)"},{Value:"Europe/Lisbon",Text:"(UTC+00:00) Lisbon"},{Value:"Europe/London",Text:"(UTC+00:00) London"},{Value:"Africa/Monrovia",Text:"(UTC+00:00) Monrovia"},{Value:"Atlantic/Reykjavik",Text:"(UTC+00:00) Reykjavik"},{Value:"UTC",Text:"UTC"},{Value:"Africa/Algiers",Text:"(UTC+01:00) Algiers"},{Value:"Europe/Amsterdam",Text:"(UTC+01:00) Amsterdam"},{Value:"Europe/Andorra",Text:"(UTC+01:00) Andorra"},{Value:"Europe/Berlin",Text:"(UTC+01:00) Berlin"},{Value:"Europe/Brussels",Text:"(UTC+01:00) Brussels"},{Value:"Europe/Budapest",Text:"(UTC+01:00) Budapest"},{Value:"Europe/Belgrade",Text:"(UTC+01:00) Central European Time - Belgrade"},{Value:"Europe/Prague",Text:"(UTC+01:00) Central European Time - Prague"},{Value:"Africa/Ceuta",Text:"(UTC+01:00) Ceuta"},{Value:"Europe/Copenhagen",Text:"(UTC+01:00) Copenhagen"},{Value:"Europe/Gibraltar",Text:"(UTC+01:00) Gibraltar"},{Value:"Africa/Lagos",Text:"(UTC+01:00) Lagos"},{Value:"Europe/Luxembourg",Text:"(UTC+01:00) Luxembourg"},{Value:"Europe/Madrid",Text:"(UTC+01:00) Madrid"},{Value:"Europe/Malta",Text:"(UTC+01:00) Malta"},{Value:"Europe/Monaco",Text:"(UTC+01:00) Monaco"},{Value:"Africa/Ndjamena",Text:"(UTC+01:00) Ndjamena"},{Value:"Europe/Oslo",Text:"(UTC+01:00) Oslo"},{Value:"Europe/Paris",Text:"(UTC+01:00) Paris"},{Value:"Europe/Rome",Text:"(UTC+01:00) Rome"},{Value:"Europe/Stockholm",Text:"(UTC+01:00) Stockholm"},{Value:"Europe/Tirane",Text:"(UTC+01:00) Tirane"},{Value:"Africa/Tunis",Text:"(UTC+01:00) Tunis"},{Value:"Europe/Vienna",Text:"(UTC+01:00) Vienna"},{Value:"Europe/Warsaw",Text:"(UTC+01:00) Warsaw"},{Value:"Europe/Zurich",Text:"(UTC+01:00) Zurich"},{Value:"Asia/Amman",Text:"(UTC+02:00) Amman"},{Value:"Europe/Athens",Text:"(UTC+02:00) Athens"},{Value:"Asia/Beirut",Text:"(UTC+02:00) Beirut"},{Value:"Europe/Bucharest",Text:"(UTC+02:00) Bucharest"},{Value:"Africa/Cairo",Text:"(UTC+02:00) Cairo"},{Value:"Europe/Chisinau",Text:"(UTC+02:00) Chisinau"},{Value:"Asia/Damascus",Text:"(UTC+02:00) Damascus"},{Value:"Asia/Gaza",Text:"(UTC+02:00) Gaza"},{Value:"Europe/Helsinki",Text:"(UTC+02:00) Helsinki"},{Value:"Asia/Jerusalem",Text:"(UTC+02:00) Jerusalem"},{Value:"Africa/Johannesburg",Text:"(UTC+02:00) Johannesburg"},{Value:"Africa/Khartoum",Text:"(UTC+02:00) Khartoum"},{Value:"Europe/Kiev",Text:"(UTC+02:00) Kiev"},{Value:"Africa/Maputo",Text:"(UTC+02:00) Maputo"},{Value:"Europe/Kaliningrad",Text:"(UTC+02:00) Moscow-01 - Kaliningrad"},{Value:"Asia/Nicosia",Text:"(UTC+02:00) Nicosia"},{Value:"Europe/Riga",Text:"(UTC+02:00) Riga"},{Value:"Europe/Sofia",Text:"(UTC+02:00) Sofia"},{Value:"Europe/Tallinn",Text:"(UTC+02:00) Tallinn"}
1,{Value:"Africa/Tripoli",Text:"(UTC+02:00) Tripoli"},{Value:"Europe/Vilnius",Text:"(UTC+02:00) Vilnius"},{Value:"Africa/Windhoek",Text:"(UTC+02:00) Windhoek"},{Value:"Asia/Baghdad",Text:"(UTC+03:00) Baghdad"},{Value:"Europe/Istanbul",Text:"(UTC+03:00) Istanbul"},{Value:"Europe/Minsk",Text:"(UTC+03:00) Minsk"},{Value:"Europe/Moscow",Text:"(UTC+03:00) Moscow+00 - Moscow"},{Value:"Africa/Nairobi",Text:"(UTC+03:00) Nairobi"},{Value:"Asia/Qatar",Text:"(UTC+03:00) Qatar"},{Value:"Asia/Riyadh",Text:"(UTC+03:00) Riyadh"},{Value:"Antarctica/Syowa",Text:"(UTC+03:00) Syowa"},{Value:"Asia/Tehran",Text:"(UTC+03:30) Tehran"},{Value:"Asia/Baku",Text:"(UTC+04:00) Baku"},{Value:"Asia/Dubai",Text:"(UTC+04:00) Dubai"},{Value:"Indian/Mahe",Text:"(UTC+04:00) Mahe"},{Value:"Indian/Mauritius",Text:"(UTC+04:00) Mauritius"},{Value:"Europe/Samara",Text:"(UTC+04:00) Moscow+01 - Samara"},{Value:"Indian/Reunion",Text:"(UTC+04:00) Reunion"},{Value:"Asia/Tbilisi",Text:"(UTC+04:00) Tbilisi"},{Value:"Asia/Yerevan",Text:"(UTC+04:00) Yerevan"},{Value:"Asia/Kabul",Text:"(UTC+04:30) Kabul"},{Value:"Asia/Aqtau",Text:"(UTC+05:00) Aqtau"},{Value:"Asia/Aqtobe",Text:"(UTC+05:00) Aqtobe"},{Value:"Asia/Ashgabat",Text:"(UTC+05:00) Ashgabat"},{Value:"Asia/Dushanbe",Text:"(UTC+05:00) Dushanbe"},{Value:"Asia/Karachi",Text:"(UTC+05:00) Karachi"},{Value:"Indian/Kerguelen",Text:"(UTC+05:00) Kerguelen"},{Value:"Indian/Maldives",Text:"(UTC+05:00) Maldives"},{Value:"Antarctica/Mawson",Text:"(UTC+05:00) Mawson"},{Value:"Asia/Yekaterinburg",Text:"(UTC+05:00) Moscow+02 - Yekaterinburg"},{Value:"Asia/Tashkent",Text:"(UTC+05:00) Tashkent"},{Value:"Asia/Colombo",Text:"(UTC+05:30) Colombo"},{Value:"Asia/Kolkata",Text:"(UTC+05:30) India Standard Time"},{Value:"Asia/Katmandu",Text:"(UTC+05:45) Katmandu"},{Value:"Asia/Almaty",Text:"(UTC+06:00) Almaty"},{Value:"Asia/Bishkek",Text:"(UTC+06:00) Bishkek"},{Value:"Indian/Chagos",Text:"(UTC+06:00) Chagos"},{Value:"Asia/Dhaka",Text:"(UTC+06:00) Dhaka"},{Value:"Asia/Omsk",Text:"(UTC+06:00) Moscow+03 - Omsk"},{Value:"Asia/Thimphu",Text:"(UTC+06:00) Thimphu"},{Value:"Antarctica/Vostok",Text:"(UTC+06:00) Vostok"},{Value:"Indian/Cocos",Text:"(UTC+06:30) Cocos"},{Value:"Asia/Yangon",Text:"(UTC+06:30) Rangoon"},{Value:"Asia/Bangkok",Text:"(UTC+07:00) Bangkok"},{Value:"Indian/Christmas",Text:"(UTC+07:00) Christmas"},{Value:"Antarctica/Davis",Text:"(UTC+07:00) Davis"},{Value:"Asia/Saigon",Text:"(UTC+07:00) Hanoi"},{Value:"Asia/Hovd",Text:"(UTC+07:00) Hovd"},{Value:"Asia/Jakarta",Text:"(UTC+07:00) Jakarta"},{Value:"Asia/Krasnoyarsk",Text:"(UTC+07:00) Moscow+04 - Krasnoyarsk"},{Value:"Asia/Brunei",Text:"(UTC+08:00) Brunei"},{Value:"Asia/Shanghai",Text:"(UTC+08:00) China Time - Beijing"},{Value:"Asia/Choibalsan",Text:"(UTC+08:00) Choibalsan"},{Value:"Asia/Hong_Kong",Text:"(UTC+08:00) Hong Kong"},{Value:"Asia/Kuala_Lumpur",Text:"(UTC+08:00) Kuala Lumpur"},{Value:"Asia/Macau",Text:"(UTC+08:00) Macau"},{Value:"Asia/Makassar",Text:"(UTC+08:00) Makassar"},{Value:"Asia/Manila",Text:"(UTC+08:00) Manila"},{Value:"Asia/Irkutsk",Text:"(UTC+08:00) Moscow+05 - Irkutsk"},{Value:"Asia/Singapore",Text:"(UTC+08:00) Singapore"},{Value:"Asia/Taipei",Text:"(UTC+08:00) Taipei"},{Value:"Asia/Ulaanbaatar",Text:"(UTC+08:00) Ulaanbaatar"},{Value:"Australia/Perth",Text:"(UTC+08:00) Western Time - Perth"},{Value:"Asia/Pyongyang",Text:"(UTC+08:30) Pyongyang"},{Value:"Asia/Dili",Text:"(UTC+09:00) Dili"},{Value:"Asia/Jayapura",Text:"(UTC+09:00) Jayapura"},{Value:"Asia/Yakutsk",Text:"(UTC+09:00) Moscow+06 - Yakutsk"},{Value:"Pacific/Palau",Text:"(UTC+09:00) Palau"},{Value:"Asia/Seoul",Text:"(UTC+09:00) Seoul"},{Value:"Asia/Tokyo",Text:"(UTC+09:00) Tokyo"},{Value:"Australia/Darwin",Text:"(UTC+09:30) Central Time - Darwin"},{Value:"Antarctica/DumontDUrville",Text:'(UTC+10:00) Dumont D"Urville'},{Value:"Australia/Brisbane",Text:"(UTC+10:00) Eastern Time - Brisbane"},{Value:"Pacific/Guam",Text:"(UTC+10:00) Guam"},{Value:"Asia/Vladivostok",Text:"(UTC+10:00) Moscow+07 - Vladivostok"},{Value:"Pacific/Port_Moresby",Text:"(UTC+10:00) Port Moresby"},{Value:"Pacific / Chuuk",Text:"(UTC+10:00) Truk"},{Value:"Australia/Adelaide",Text:"(UTC+10:30) Central Time - Adelaide"},{Value:"Antarctica/Casey",Text:"(UTC+11:00) Casey"},{Value:"Australia/Hobart",Text:"(UTC+11:00) Eastern Time - Hobart"},{Value:"Australia/Sydney",Text:"(UTC+11:00) Eastern Time - Melbourne, Sydney"},{Value:"Pacific/Efate",Text:"(UTC+11:00) Efate"},{Value:"Pacific/Guadalcanal",Text:"(UTC+11:00) Guadalcanal"},{Value:"Pacific/Kosrae",Text:"(UTC+11:00) Kosrae"},{Value:"Asia/Magadan",Text:"(UTC+11:00) Moscow+08 - Magadan"},{Value:"Pacific / Norfolk",Text:"(UTC+11:00) Norfolk"},{Value:"Pacific/Noumea",Text:"(UTC+11:00) Noumea"},{Value:"Pacific/Pohnpei",Text:"(UTC+11:00) Ponape"},{Value:"Pacific/Funafuti",Text:"(UTC+12:00) Funafuti"},{Value:"Pacific/Kwajalein",Text:"(UTC+12:00) Kwajalein"},{Value:"Pacific/Majuro",Text:"(UTC+12:00) Majuro"}
1,{Value:"Asia/Kamchatka",Text:"(UTC+12:00) Moscow+09 - Petropavlovsk - Kamchatskiy"},{Value:"Pacific / Nauru",Text:"(UTC+12:00) Nauru"},{Value:"Pacific/Tarawa",Text:"(UTC+12:00) Tarawa"},{Value:"Pacific/Wake",Text:"(UTC+12:00) Wake"},{Value:"Pacific/Wallis",Text:"(UTC+12:00) Wallis"},{Value:"Pacific/Auckland",Text:"(UTC+13:00) Auckland"},{Value:"Pacific/Enderbury",Text:"(UTC+13:00) Enderbury"},{Value:"Pacific/Fakaofo",Text:"(UTC+13:00) Fakaofo"},{Value:"Pacific/Fiji",Text:"(UTC+13:00) Fiji"},{Value:"Pacific/Tongatapu",Text:"(UTC+13:00) Tongatapu"},{Value:"Pacific/Apia",Text:"(UTC+14:00) Apia"},{Value:"Pacific/Kiritimati",Text:"(UTC+14:00) Kiritimati"}];function gy(a,i,e){var t="";if(a.monthDay.length)t+=a.monthDay[0];else if(a.day){var n=a.setPosition-1;t+=e.getConstant(Iy[n>-1?n:Iy.length-1])+" "+yt((0,s._W)(xy[a.day[0]],i),"single")}return t}function Xf(a,i,e,t,n,r,o,l){void 0===n&&(n=ww),void 0===r&&(r=null),void 0===o&&(o="Gregorian"),void 0===l&&(l=null);var d,h=Gf(i);Ee=Yf(o);var p=[],u=new Date(a.getTime());vd=[];var f=(0,s.hX)(e)?[]:e.split(","),m=new fy;if(f.forEach(function(v){var b=md(v);l&&(b=m.add(new Date(b.getTime()),l)),vd.push(new Date(b.getTime()).setHours(0,0,0,0))}),h.recExceptionCount=(0,s.hX)(h.count)?0:vd.length,mo=r&&r>a&&!h.count?new Date(new Date(r.getTime()).setHours(0,0,0)):null,!h.until&&mo&&((d=new Date(mo.getTime())).setDate(mo.getDate()+n*h.interval),h.until=d),h.until&&a>h.until)return p;if(Ty=n,t=t||0,function xw(a){for(;Qr[0]!==a;)Iw(Qr)}(oi[parseInt(t.toString(),10)]),h.until){var g=k(h.until);h.until=new Date(g.getFullYear(),g.getMonth(),g.getDate(),23,59,59)}switch(h.freq){case"DAILY":!function ow(a,i,e,t){for(var n=new Date(a.getTime()),r=t.interval,o=Er(a,t),h=t.day;Mn(n,i)&&!(gd(n,t)&&(h.indexOf(oi[n.getDay()])>-1||0===h.length)&&(jf(e,n.getTime()),o&&e.length+t.recExceptionCount>=o));)n.setDate(n.getDate()+r),n.getHours()!==a.getHours()&&n.setHours(a.getHours())}(u,h.until,p,h);break;case"WEEKLY":!function aw(a,i,e,t,n){var r=new Date(a.getTime());t.day.length||t.day.push(oi[a.getDay()]);var p,o=t.interval,l=t.day,h=Er(a,t),d=!0,u=[];if(l.length>1)for(((0,s.hX)(t.wkst)||""===t.wkst)&&(t.wkst=Qr[0]),p=oi.indexOf(t.wkst);Mn(r,i);){var f=oi.indexOf(oi[r.getDay()])-p,m=K(r,-(f=-1===f?6:f)),g=K(m,6),v=new Date(r.getTime());for(g=k(g),v=k(v);g>=v&&(l.indexOf(oi[r.getDay()])>-1&&u.push([r.getTime()]),!(h&&e.length+t.recExceptionCount>=h));)r.setDate(r.getDate()+1),r.getHours()!==a.getHours()&&r.setHours(a.getHours()),v=k(v=new Date(r.getTime()));if(r.setDate(r.getDate()-1),h&&e.length+t.recExceptionCount>=h)break;r.setDate(r.getDate()+1+7*(o-1)),Uf(u,d,a,i,e,t),u=[]}else{for(r=fi(a,t.day),o>1&&Qr.indexOf(t.day[0])<a.getDay()-n&&r.setDate(r.getDate()+7*(o-1));Mn(r,i)&&((d=gd(r,t))&&l.indexOf(oi[r.getDay()])>-1&&jf(e,r.getTime()),!(h&&e.length+t.recExceptionCount>=h));)r.setDate(r.getDate()+7*o);Uf(u,d,a,i,e,t),u=[]}}(u,h.until,p,h,t);break;case"MONTHLY":vy(u,h.until,p,h);break;case"YEARLY":!function lw(a,i,e,t){switch(function dw(a){return a.yearDay.length?"YEARDAY":a.weekNo.length?"WEEKNO":"MONTH"}(t)){case"MONTH":vy(a,i,e,t);break;case"WEEKNO":!function cw(a,i,e,t){for(var r,l,d,u,f,m,n=Ee.getYearLastDate(a,0),o=Er(a,t),p=t.weekNo,g=[],v=t.day;Mn(n,i);){d=6-Qr.indexOf(oi[n.getDay()])+1;for(var b=0;b<p.length;b++)for(f=1===(u=(u=p[parseInt(b.toString(),10)])>0?u:53+u+1)?d:d+7*(u-1),m=1===u?d-7:d+7*(u-2);m<f;)r=new Date(n.getTime()+bt*m),(0===v.length||v.indexOf(oi[r.getDay()])>-1)&&((0,s.hX)(t.setPosition)?Gl(l,a,i,e,t,r.getTime()):g.push([r.getTime()])),m++;if((0,s.hX)(t.setPosition)||Ps(g,l,a,i,e,t),o&&e.length+t.recExceptionCount>=o)return;n=Ee.getYearLastDate(r,t.interval),g=[]}}(a,i,e,t);break;case"YEARDAY":!function hw(a,i,e,t){for(var r,l,d,n=Ee.getYearLastDate(a,0),o=Er(a,t),h=[],p=t.day;Mn(n,i);){for(var u=0;u<t.yearDay.length;u++)d=t.yearDay[parseInt(u.toString(),10)],r=new Date(n.getTime()),d!==Ee.getLeapYearDaysCount()&&d!==-Ee.getLeapYearDaysCount()||Ee.isLeapYear(Ee.getFullYear(r),1)?(r.setDate(r.getDate()+(d<0?Ee.getYearDaysCount(r,1)+1+d:d)),(0===p.length||p.indexOf(oi[r.getDay()])>-1)&&(null==t.setPosition?Gl(l,a,i,e,t,r.getTime()):h.push([r.getTime()]))):r.setDate(r.getDate()+1);if((0,s.hX)(t.setPosition)||Ps(h,l,a,i,e,t),o&&e.length+t.recExceptionCount>=o)return;n=Ee.getYearLastDate(r,t.interval),h=[]}}(a,i,e,t)}}(u,h.until,p,h)}return p}function md(a){return new Date(a.substr(0,4)+"-"+a.substr(4,2)+"-"+a.substr(6,5)+":"+a.substr(11,2)+":"+a.substr(13))}function jf(a,i){var e=new Date(i).setHours(0,0,0,0);-1===vd.indexOf(e)&&(!mo||e>=mo.getTime())&&a.push(i)}function Er(a,i){var e=Ty;return i.count?e=i.count:i.until&&("DAILY"===i.freq||"WEEKLY"===i.freq?e=Math.floor((i.until.getTime()-a.getTime())/bt)+1:("MONTHLY"===i.freq||"YEARLY"===i.freq)&&(e=Math.floor((i.until.getMonth()+12*i.until.getFullYear()-(a.getMonth()+12*a.getFullYear()))/i.interval)+(i.day.length>1?Math.floor((i.until.getTime()-a.getTime())/bt)+1:1),"YEARLY"===i.freq&&(e=i.month.length>1?e*i.month.length:e))),e}function vy(a,i,e,t){t.month.length||t.day.length||t.monthDay.length?t.month.length>0&&!t.day.length&&!t.monthDay.length&&t.monthDay.push(a.getDate()):(t.monthDay.push(a.getDate()),"YEARLY"===t.freq&&t.month.push(a.getMonth()+1));var n=function Tw(a){return a.monthDay.length&&!a.day.length?"date":!a.monthDay.length&&a.day.length?"day":"both"}(t);switch(n){case"day":switch(t.freq){case"MONTHLY":Cy(a,i,e,t);break;case"YEARLY":!function fw(a,i,e,t){var n=t.day,r=n.map(function(f){return Kf.test(f)});if(n.length>1&&r.indexOf(!0)>-1)!function mw(a,i,e,t){var p,u,m,g,n=t.day,r=Er(a,t),o=new Date(a.getTime()),l=t.interval,h=[],d=[],f=0;o=Ee.getMonthStartDate(o);var b=[];
1for(t.month.length&&Ee.setMonth(o,t.month[0],1),o=fi(o,t.day);Mn(o,i);){m=new Date(o.getTime());for(var y=0;y<=t.month.length;y++)for(var S=0;S<=n.length-1;S++){for(o=fi(o=Ee.getMonthStartDate(o),t.day),h=[];Ee.isSameYear(m,o)&&r&&e.length+t.recExceptionCount<=r;)for(;Ee.isSameYear(m,o);){if(m=new Date(o.getTime()),0===t.month.length||t.month.length>0&&t.month[parseInt(y.toString(),10)]===Ee.getMonth(m)){var E=n[parseInt(S.toString(),10)].match(bd),_=parseInt(E[0],10);for(g=new Date(o.getTime());Ee.isSameYear(g,o)&&Ee.isSameMonth(g,o);)E[E.length-1]===oi[g.getDay()]&&h.push([g.getTime()]),g.setDate(g.getDate()+1);g.setDate(g.getDate()-1),p=E[0].indexOf("-")>-1?h.length- -1*_:_-1,p=isNaN(p)?0:p}f=fo(o,t,f,undefined,1),o=fi(o,t.day)}if(o=0===S&&g?new Date(g.getTime()):new Date(m.getTime()),h.length>0&&((0,s.hX)(t.setPosition)?Ps(h,u,a,i,e,t,p):d=[$f(h,p,b)]),r&&e.length+t.recExceptionCount>=r)return}(0,s.hX)(t.setPosition)||(qf(d,u,a,i,e,t),b=[]),Ee.isLastMonth(o)?(Ee.setValidDate(o,1,1),o.setFullYear(o.getFullYear()+l-1)):o.setFullYear(o.getFullYear()+l),o=fi(o,t.day),t.month.length&&Ee.setMonth(o,t.month[0],o.getDate())}}(a,i,e,t);else if(t.month.length&&1===n.length&&r.indexOf(!0)>-1)Cy(a,i,e,t);else{var l,o=new Date(a.getTime()),h=Er(a,t),d=t.interval,p=[];for(t.month.length&&Ee.setMonth(o,t.month[0],o.getDate()),(0,s.hX)(t.setPosition)&&0===t.month.length&&0===t.weekNo.length&&o.setFullYear(a.getFullYear(),0,1),o=fi(o=Ee.getMonthStartDate(o),t.day);Mn(o,i);){for(l=new Date(o.getTime());Ee.isSameYear(l,o)&&h&&e.length+t.recExceptionCount<=h;)for(l=new Date(o.getTime());Ee.isSameYear(l,o);){if(!(0===t.month.length||t.month.length>0&&!Ee.checkMonth(o,t.month))){Ee.setValidDate(o,1,1),o=fi(o,t.day);break}if(n.length>1){if(Ee.compareMonth(l,o)){Ee.setValidDate(o,1,1),o=fi(o,t.day);break}n.indexOf(oi[l.getDay()])>-1&&p.push([l.getTime()]),l.setDate(l.getDate()+1)}else{if(l.getFullYear()>o.getFullYear()){Ee.setValidDate(o,1,1),o=fi(o,t.day);break}var u=_y(n[0]);oi[l.getDay()]===u&&new Date(l.getFullYear(),l.getMonth(),0)>new Date(a.getFullYear())&&p.push([l.getTime()]),l.setDate(l.getDate()+7)}}if(o.setFullYear(l.getFullYear(),l.getMonth(),l.getDate()),Ey(p,a,i,e,t),Ee.isLastMonth(o)&&(Ee.setValidDate(o,1,1),o=fi(o,t.day)),o.setFullYear(o.getFullYear()+d-1),h&&e.length+t.recExceptionCount>=h)return;o=fi(o,t.day),p=[]}}}(a,i,e,t)}break;case"both":case"date":switch(t.freq){case"MONTHLY":yy(a,i,e,t);break;case"YEARLY":!function pw(a,i,e,t){if(t.month.length)yy(a,i,e,t);else{var r,n=by(a,t);for(n.tempDate=n.mainDate=Ee.getMonthStartDate(n.tempDate);Mn(n.tempDate,i);){for(r=new Date(n.tempDate.getTime());Ee.isSameYear(r,n.tempDate)&&n.expectedCount&&e.length+t.recExceptionCount<=n.expectedCount;){if(!(0===t.month.length||t.month.length>0&&!Ee.checkMonth(n.tempDate,t.month))){Ee.setValidDate(n.tempDate,1,1),n.tempDate=fi(n.tempDate,t.day);break}Sy(t,n,i,!1),n.beginDate=new Date(n.tempDate.getTime()),n.monthInit=fo(n.tempDate,t,n.monthInit,n.beginDate)}if(n.tempDate.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),Uf(n.dateCollection,n.state,a,i,e,t),Ee.isLastMonth(n.tempDate)&&(Ee.setValidDate(n.tempDate,1,1),n.tempDate=fi(n.tempDate,t.day)),n.expectedCount&&e.length+t.recExceptionCount>=n.expectedCount)return;n.tempDate.setFullYear(n.tempDate.getFullYear()+t.interval-1),n.tempDate=fi(n.tempDate,t.day),n.monthInit=fo(n.tempDate,t,n.monthInit,n.beginDate),n.dateCollection=[]}}}(a,i,e,t)}}}function by(a,i){var e={monthCollection:[],index:0,tempDate:new Date(a.getTime()),mainDate:new Date(a.getTime()),expectedCount:Er(a,i),monthInit:0,dateCollection:[]};return i.month.length&&Ee.setMonth(e.tempDate,i.month[0],e.tempDate.getDate()),e}function yy(a,i,e,t){var n=by(a,t);if(n.tempDate=n.mainDate=Ee.getMonthStartDate(n.tempDate),!(("MONTHLY"===t.freq&&12===t.interval||"YEARLY"===t.freq)&&Ee.getMonthDaysCount(a)<t.monthDay[0]))for(;Mn(n.tempDate,i);){if(n.beginDate=new Date(n.tempDate.getTime()),Sy(t,n,i,!0,a,e),(0,s.hX)(t.setPosition)||Ps(n.dateCollection,n.state,a,i,e,t),n.expectedCount&&e.length+t.recExceptionCount>=n.expectedCount)return;n.monthInit=fo(n.tempDate,t,n.monthInit,n.beginDate),n.dateCollection=[]}}function Sy(a,i,e,t,n,r){for(var o=0;o<a.monthDay.length;o++){i.date=a.monthDay[parseInt(o.toString(),10)],i.tempDate=Ee.getMonthStartDate(i.tempDate);var l=Ee.getMonthDaysCount(i.tempDate);if(i.date=i.date>0?i.date:l+i.date+1,yw(i.tempDate,i.date,i.mainDate)&&i.date>0){if(Ee.setDate(i.tempDate,i.date),e&&i.tempDate>e)return;(0===a.day.length||a.day.indexOf(oi[i.tempDate.getDay()])>-1)&&(t&&(0,s.hX)(a.setPosition)&&i.expectedCount&&r.length+a.recExceptionCount<i.expectedCount?Gl(i.state,n,e,r,a,i.tempDate.getTime()):i.dateCollection.push([i.tempDate.getTime()]))}}}function fo(a,i,e,t,n){void 0===t&&(t=null);var r=t?t.getMonth():0,o=Ee.getMonthStartDate(a);return n=(0,s.hX)(n)?i.interval:n,a.setFullYear(o.getFullYear()),a.setMonth(o.getMonth()),a.setDate(o.getDate()),i.month.length?(e++,e%=i.month.length,Ee.setMonth(a,i.month[parseInt(e.toString(),10)],1),0===e&&Ee.addYears(a,n,i.month[0])):(t&&t.getFullYear()<a.getFullYear()&&(r=a.getMonth()-1),Ee.setValidDate(a,n,1,r,t)),e}function Cy(a,i,e,t){if(t.day.length>1)!function uw(a,i,e,t){var n=t.day,r=new Date(a.getTime());r=Ee.getMonthStartDate(r);var d,p,m,o=[],l=[],h=[],u=Er(a,t),f=0;
1for(t.month.length&&Ee.setMonth(r,t.month[0],1),r=fi(r,t.day);Mn(r,i)&&u&&e.length+t.recExceptionCount<u;){var g=new Date(r.getTime());if(n.map(function(M){return Kf.test(M)}).indexOf(!0)>-1){for(var b=0;b<=n.length-1;b++){var y=n[parseInt(b.toString(),10)].match(bd),S=parseInt(y[0],10);for(r=new Date(r.getTime()),r=fi(r=Ee.getMonthStartDate(r),n),g.setFullYear(r.getFullYear(),r.getMonth(),r.getDate());Ee.isSameYear(g,r)&&Ee.isSameMonth(g,r);)y[y.length-1]===oi[g.getDay()]&&o.push([g.getTime()]),g.setDate(g.getDate()+1);if(g.setDate(g.getDate()-1),d=y[0].indexOf("-")>-1?o.length- -1*S:S-1,d=isNaN(d)?0:d,o.length>0&&((0,s.hX)(t.setPosition)?Ps(o,p,a,i,e,t,d):l=[$f(o,d,h)]),u&&e.length+t.recExceptionCount>=u)return;o=[]}(0,s.hX)(t.setPosition)||(qf(l,p,a,i,e,t),h=[]),f=fo(r,t,f,m),r=fi(r,t.day),o=[]}else{var E=[],_=Sw(n);g.setFullYear(r.getFullYear(),r.getMonth(),r.getDate());var T=new Date(r.getTime());for(m=new Date(r.getTime());Ee.isSameMonth(T,r);)E.push(r.getTime()),n.indexOf(oi[r.getDay()])>-1&&(o.push(E),E=[]),r.setDate(r.getDate()+_[oi[r.getDay()]]);if(d=t.setPosition<1?o.length+t.setPosition:t.setPosition-1,(0,s.hX)(t.setPosition)){d=0;for(var I=[],w=0;w<o.length;w++)for(var A=0;A<o[parseInt(w.toString(),10)].length;A++)I.push(o[parseInt(w.toString(),10)][parseInt(A.toString(),10)]);o=[I]}if(o.length>0&&Ps(o,p,a,i,e,t,d),u&&e.length+t.recExceptionCount>=u)return;f=fo(r,t,f,m),r=fi(r,t.day),o=[]}}}(a,i,e,t);else{var h,r=new Date(a.getTime()),o=Er(a,t),l=[],d=0;for(r=Ee.getMonthStartDate(r),t.month.length&&Ee.setMonth(r,t.month[0],1),r=fi(r,t.day);Mn(r,i)&&o&&e.length+t.recExceptionCount<o;){h=new Date(r.getTime());for(var p=new Date(r.getTime());Ee.isSameMonth(r,p);)l.push([p.getTime()]),p.setDate(p.getDate()+7);Ey(l,a,i,e,t),d=fo(r,t,d,h),r=fi(r,t.day),l=[]}}}function Uf(a,i,e,t,n,r){var o=r.setPosition<1?a.length+r.setPosition:r.setPosition-1;(0,s.hX)(r.setPosition)&&(o=0,a=Wf(a)),a.length>0&&Ps(a,i,e,t,n,r,o)}function Wf(a){for(var i=[],e=0;e<a.length;e++)for(var t=0;t<a[parseInt(e.toString(),10)].length;t++)i.push(new Date(a[parseInt(e.toString(),10)][parseInt(t.toString(),10)]).getTime());return i.length>0?[i]:[]}function Ey(a,i,e,t,n){var o,l=[],d=function gw(a,i){var e,t={monthCollection:[],index:0};if(1===i.length){var n=i[0].match(bd),r=void 0;n.length>1?e=(r=parseInt(n[0],10))<1?a.length+r:r-1:(e=0,a=Wf(a))}else e=0,a=Wf(a);return t.monthCollection=a,t.index=e,t}(a,n.day);a=d.monthCollection;var p=d.index;null!=n.setPosition?qf([$f(a,p,l)],o,i,e,t,n):a.length>0&&Ps(a,o,i,e,t,n,p),l=[]}function $f(a,i,e){for(var t=0;t<a[parseInt(i.toString(),10)].length;t++)e.push(a[parseInt(i.toString(),10)][parseInt(t.toString(),10)]);return e}function Gl(a,i,e,t,n,r){var o=Er(i,n),l=new Date(r);a=gd(l,n),l>=i&&Mn(l,e)&&a&&o&&t.length+n.recExceptionCount<o&&jf(t,r)}function vw(a,i,e,t,n){var r=i||0,o=new Date(a,n.month[0]-1,1),h=new Date(a,n.month[0],0).getDate(),d=(o.getDay()-r+7)%7,u=Math.ceil((d+h)/7)-1,f=e[parseInt(t.toString(),10)][parseInt(u.toString(),10)];return gd(new Date(f),n)?u:u-1}function qf(a,i,e,t,n,r){if(a.length>0)for(var o=0;o<a.length;o++){a[parseInt(o.toString(),10)].sort();var h=r.day.map(function(f){return Kf.test(f)}),d="YEARLY"===r.freq&&r.validRules.indexOf("BYMONTH")>-1&&!(h.indexOf(!0)>-1)?vw(new Date(a[0][0]).getFullYear(),0,a,o,r):a[parseInt(o.toString(),10)].length+r.setPosition,p=r.setPosition<1?d:r.setPosition-1;Gl(i,e,t,n,r,a[parseInt(o.toString(),10)][parseInt(p.toString(),10)])}}function Ps(a,i,e,t,n,r,o){if(a.length>0){o=(0,s.hX)(o)?r.setPosition<1?a.length+r.setPosition:r.setPosition-1:o,a[parseInt(o.toString(),10)].sort();for(var l=0;l<a[parseInt(o.toString(),10)].length;l++)Gl(i,e,t,n,r,a[parseInt(o.toString(),10)][parseInt(l.toString(),10)])}}function Mn(a,i){return!i||a<=i}function _y(a){return a.replace(Rw,"")}function fi(a,i){var t,e=new Date(a.getTime());if(i.length>0){for(var n=[],r=0;r<=i.length-1;r++)t=_y(i[parseInt(r.toString(),10)]),n.push(t);if(-1===n.indexOf(oi[e.getDay()]))do{e.setDate(e.getDate()+1)}while(-1===n.indexOf(oi[e.getDay()]))}return e}function Gf(a){var i={freq:null,interval:1,count:null,until:null,day:[],wkst:null,month:[],weekNo:[],monthDay:[],yearDay:[],setPosition:null,validRules:[]},e=a.split(";"),t=[];if(e.forEach(function(o){switch((t=o.split("="))[0]){case"UNTIL":i.until=md(t[1]);break;case"BYDAY":i.day=t[1].split(","),i.validRules.push(t[0]);break;case"BYMONTHDAY":i.monthDay=t[1].split(",").map(Number),i.validRules.push(t[0]);break;case"BYMONTH":i.month=t[1].split(",").map(Number),i.validRules.push(t[0]);break;case"BYYEARDAY":i.yearDay=t[1].split(",").map(Number),i.validRules.push(t[0]);break;case"BYWEEKNO":i.weekNo=t[1].split(",").map(Number),i.validRules.push(t[0]);break;case"INTERVAL":i.interval=parseInt(t[1],10);break;case"COUNT":i.count=parseInt(t[1],10);break;case"BYSETPOS":i.setPosition=parseInt(t[1],10)>4?-1:parseInt(t[1],10);break;case"FREQ":i.freq=t[1];break;case"WKST":i.wkst=t[1]}}),"MONTHLY"===i.freq&&0===i.monthDay.length){var r=i.validRules.indexOf("BYDAY");i.validRules.splice(r,1)}return i}function yw(a,i,e){return i<=Ee.getMonthDaysCount(a)&&a>=e}function Sw(a){var i={};return a.forEach(function(e,t){if(t===a.length-1){for(var n=Qr.indexOf(e),r=n;r%7!==Qr.indexOf(a[0]);)r++;i[""+e]=r-n}else i[""+e]=Qr.indexOf(a[t+1])-Qr.indexOf(e)}),i}function Iw(a){var i=a.shift();a.push(i)}function gd(a,i){var e=!0,t=i.day,n=i.month,r=Ee.getExpectedDays(a,i.monthDay),o=i.yearDay;
1return i.validRules.forEach(function(l){switch(l){case"BYDAY":(function bw(a,i){var e=[];return i.forEach(function(t){var n=t.match(bd);e.push(2===n.length?n[1]:n[0])}),-1===e.indexOf(oi[parseInt(a.toString(),10)])})(a.getDay(),t)&&(e=!1);break;case"BYMONTH":Ee.checkMonth(a,n)&&(e=!1);break;case"BYMONTHDAY":(function Cw(a,i){var t,e=i.slice(0),n=Ee.getMonthDaysCount(a);for(t=e.shift();t;){if(t<0&&(t=t+n+1),t===a.getDate())return!1;t=e.shift()}return!0})(a,r)&&(e=!1);break;case"BYYEARDAY":(function Ew(a,i){var t,e=i.slice(0),n=function _w(a){Qf[Ee.getFullYear(a)]||(Qf[Ee.getFullYear(a)]=Ee.getYearLastDate(a,0));var i=Qf[Ee.getFullYear(a)],e=a.getTime()-i.getTime();return Math.ceil(e/bt)}(a);for(t=e.shift();t;){if(t<0&&(t=t+Ee.getYearDaysCount(a,0)+1),t===n)return!1;t=e.shift()}return!0})(a,o)&&(e=!1)}}),e}function Yf(a){return"Islamic"===a?new uy:new py}var vd,Ty,mo,Ee,Qf={},Qr=["SU","MO","TU","WE","TH","FR","SA"],oi=["SU","MO","TU","WE","TH","FR","SA"],ww=43,Iy=["first","second","third","fourth","last"],Jf="summaryOn",xy={SU:"sun",MO:"mon",TU:"tue",WE:"wed",TH:"thu",FR:"fri",SA:"sat"},Kf=/\d/,Rw=/[^A-Z]+/,bd=/[a-z]+|[^a-z]+/gi;function Jr(a){return[a.getUTCFullYear(),Yl(a.getUTCMonth()+1),Yl(a.getUTCDate()),"T",Yl(a.getUTCHours()),Yl(a.getUTCMinutes()),Yl(a.getUTCSeconds()),"Z"].join("")}function Yl(a){return("0"+a).slice(-2)}var Zf=function(){function a(i){this.slots=[],this.processedData=[],this.isDoubleTapped=!1,this.parent=i}return a.prototype.processData=function(i,e,t){var n=this,r=this.parent.activeView.startDate(),o=this.parent.activeView.endDate(),l=this.parent.eventFields,h=[],d=1,p=!1,u=this.parent.resourceBase?this.parent.resourceBase.resourceCollection:[];i.length>0&&(0,s.hX)(i[0][l.id])&&(p=!0);for(var f=function($){p&&($[l.id]=d++),$=m.updateEventDateTime($),e?m.processTimezoneChange($,t):!m.parent.isPrinting&&!m.parent.uiStateValues.isPreventTimezone&&($=m.processTimezone($));for(var Se=0;Se<u.length;Se++)(null===$[u[parseInt(Se.toString(),10)].field]||0===$[u[parseInt(Se.toString(),10)].field])&&($[u[parseInt(Se.toString(),10)].field]=void 0);if(!(0,s.hX)($[l.recurrenceRule])&&""===$[l.recurrenceRule]&&($[l.recurrenceRule]=null),(0,s.hX)($[l.recurrenceRule])||!(0,s.hX)($[l.recurrenceID])||m.parent.crudModule&&m.parent.crudModule.crudObj.isCrudAction)if(m.parent.crudModule&&m.parent.crudModule.crudObj.isCrudAction)if(!(0,s.hX)($[l.recurrenceRule])&&(0,s.hX)($[l.recurrenceID]))for(var Re=function(ut){var Vt=m.parent.eventsProcessed.filter(function(gi){return gi[l.startTime].getTime()-ut[l.startTime].getTime()==0&&gi[l.id]===ut[l.id]});ut.Guid=Vt.length>0?Vt[0].Guid:m.generateGuid(),h.push(ut)},Ne=0,de=m.generateOccurrence($,null,!0);Ne<de.length;Ne++)Re(de[Ne]);else{var _t=m.parent.eventsProcessed.filter(function(ut){return ut[n.parent.eventFields.id]===$[n.parent.eventFields.id]});$.Guid=_t.length>0?_t[0].Guid:m.generateGuid(),h.push($)}else $.Guid=m.generateGuid(),h.push($);else h=h.concat(m.generateOccurrence($,null,!0))},m=this,g=0,v=i;g<v.length;g++)f(v[g]);this.parent.eventsProcessed=[];var y=h.filter(function($){return!$[n.parent.eventFields.isBlock]});if(this.parent.eventsProcessed=this.filterEvents(r,o,y),!this.parent.activeViewOptions.allowOverlap&&this.parent.eventsProcessed.length>0){this.processedData=this.parent.eventsProcessed;for(var S=[],E=this.parent.eventFields,_=0,T=this.parent.eventsProcessed;_<T.length;_++){var I=T[_],w=this.findOverlappingData(I,S);if(w){if(!this.parent.eventSettings.sortComparer&&(new Date(I[E.endTime]).getTime()-new Date(I[E.startTime]).getTime()>new Date(w[E.endTime]).getTime()-new Date(w[E.startTime]).getTime()&&I[E.startTime]===w[E.startTime]||!0===I[E.isAllDay])){var D=S.indexOf(w);-1!==D&&S.splice(D,1),S.push(I)}}else S.push(I)}this.parent.eventsProcessed=S}for(var L=h.filter(function($){return $[n.parent.eventFields.isBlock]}),V=0,G=L;V<G.length;V++){var W=G[V];W[l.isAllDay]&&(k(new Date(W[l.startTime].getTime()))<k(new Date(W[l.endTime].getTime()))||(W[l.startTime]=k(W[l.startTime]),W[l.endTime]=K(k(W[l.endTime]),1)))}return this.parent.blockProcessed=L,y},a.prototype.findOverlappingData=function(i,e){for(var t=this.parent.activeViewOptions.group.resources.length>0,n=t?this.parent.resourceBase.resourceCollection:[],r=t?n[n.length-1].field:null,o=this.parent.eventFields,l=new Date(i[o.startTime]),h=new Date(i[o.endTime]),d=0,p=e;d<p.length;d++){var u=p[d];if(l<u[o.endTime]&&h>u[o.startTime]&&u[o.id]!==i[o.id]&&(!t||(0,s.hX)(r)||this.compareResourceValues(u[""+r],i[""+r])))return u}},a.prototype.isOverlapRange=function(i,e){var t=this;void 0===e&&(e=null);for(var n=this.parent.activeViewOptions.group.resources.length>0,r=n?this.parent.resourceBase.resourceCollection:[],o=n?r[r.length-1].field:null,l=Array.isArray(i)?i:[i],h=this.parent.eventFields,d=function(_){return t.processedData.filter(function(T){return _[h.startTime]<T[h.endTime]&&_[h.endTime]>T[h.startTime]&&T[h.id]!==_[h.id]&&(!n||(0,s.hX)(o)||t.compareResourceValues(T[""+o],_[""+o]))})},p=[],u=!1,f=0,m=l;f<m.length;f++)for(var g=m[f],b=0,y=(0,s.hX)(g[h.recurrenceRule])||!(0,s.hX)(g[h.recurrenceID])&&g[h.recurrenceID]!==g[h.id]||!(0,s.hX)(g[h.recurrenceID])&&"EditSeries"!==e?[g]:this.generateOccurrence(g);b<y.length;b++){var S=y[b],E=d(S);E.length>
10&&p.push.apply(p,E),this.findOverlappingData(S,this.parent.eventsProcessed)&&(u=!0)}return this.parent.overlapAppointments=p,u},a.prototype.compareResourceValues=function(i,e){var t=function(n){return Array.isArray(n)?n[0]:n};return t(i)===t(e)},a.prototype.checkOverlap=function(i){return!(this.parent.activeViewOptions.allowOverlap||!this.isOverlapRange(i)||(this.parent.quickPopup.openValidationError("overlapAlert",i),0))},a.prototype.updateEventDateTime=function(i){return"string"==typeof i[this.parent.eventFields.startTime]&&(i[this.parent.eventFields.startTime]=vb(i[this.parent.eventFields.startTime])),"string"==typeof i[this.parent.eventFields.endTime]&&(i[this.parent.eventFields.endTime]=vb(i[this.parent.eventFields.endTime])),i},a.prototype.getProcessedEvents=function(i){void 0===i&&(i=this.parent.eventsData);for(var e=[],t=0,n=i;t<n.length;t++){var r=n[t];!(0,s.hX)(r[this.parent.eventFields.recurrenceRule])&&(0,s.hX)(r[this.parent.eventFields.recurrenceID])?e=e.concat(this.generateOccurrence(r)):e.push(r)}return e},a.prototype.timezonePropertyChange=function(i){var e=this.parent.eventsData.concat(this.parent.blockData),t=this.processData(e,!0,i);this.parent.notify(un,{processedData:t})},a.prototype.timezoneConvert=function(i){var e=this.parent.eventFields;if(i[e.startTimezone]=i[e.startTimezone]||i[e.endTimezone],i[e.endTimezone]=i[e.endTimezone]||i[e.startTimezone],this.parent.timezone){var n=i[e.endTimezone];i[e.startTime]=this.parent.tzModule.convert(i[e.startTime],this.parent.timezone,i[e.startTimezone]),i[e.endTime]=this.parent.tzModule.convert(i[e.endTime],this.parent.timezone,n)}},a.prototype.processTimezoneChange=function(i,e){var t=this.parent.eventFields;i[t.isAllDay]||(e&&this.parent.timezone?(i[t.startTime]=this.parent.tzModule.convert(i[t.startTime],e,this.parent.timezone),i[t.endTime]=this.parent.tzModule.convert(i[t.endTime],e,this.parent.timezone)):!e&&this.parent.timezone?(i[t.startTime]=this.parent.tzModule.add(i[t.startTime],this.parent.timezone),i[t.endTime]=this.parent.tzModule.add(i[t.endTime],this.parent.timezone)):e&&!this.parent.timezone&&(i[t.startTime]=this.parent.tzModule.remove(i[t.startTime],e),i[t.endTime]=this.parent.tzModule.remove(i[t.endTime],e)))},a.prototype.processTimezone=function(i,e){void 0===e&&(e=!1);var t=this.parent.eventFields;if(i[t.isAllDay])return i;if(i[t.startTimezone]||i[t.endTimezone]){var n=i[t.startTimezone]||i[t.endTimezone],r=i[t.endTimezone]||i[t.startTimezone];e?this.parent.timezone?(i[t.startTime]=this.parent.tzModule.convert(i[t.startTime],n,this.parent.timezone),i[t.endTime]=this.parent.tzModule.convert(i[t.endTime],r,this.parent.timezone),i[t.startTime]=this.parent.tzModule.remove(i[t.startTime],this.parent.timezone),i[t.endTime]=this.parent.tzModule.remove(i[t.endTime],this.parent.timezone)):(i[t.startTime]=this.parent.tzModule.remove(i[t.startTime],n),i[t.endTime]=this.parent.tzModule.remove(i[t.endTime],r)):(i[t.startTime]=this.parent.tzModule.add(i[t.startTime],n),i[t.endTime]=this.parent.tzModule.add(i[t.endTime],r),this.parent.timezone&&(i[t.startTime]=this.parent.tzModule.convert(i[t.startTime],n,this.parent.timezone),i[t.endTime]=this.parent.tzModule.convert(i[t.endTime],r,this.parent.timezone)))}else this.parent.timezone&&(e?(i[t.startTime]=this.parent.tzModule.remove(i[t.startTime],this.parent.timezone),i[t.endTime]=this.parent.tzModule.remove(i[t.endTime],this.parent.timezone)):(i[t.startTime]=this.parent.tzModule.add(i[t.startTime],this.parent.timezone),i[t.endTime]=this.parent.tzModule.add(i[t.endTime],this.parent.timezone)));return i},a.prototype.filterBlockEvents=function(i){var r,e=this.parent.eventFields,t=i[e.startTime],n=i[e.endTime];if(this.parent.activeViewOptions.group.resources.length>0){var o=this.getGroupIndexFromEvent(i);r=this.parent.resourceBase.lastResourceLevel[parseInt(o.toString(),10)]}for(var l=(0,s.X$)([],this.parent.blockProcessed,null,!0),h=0,d=l;h<d.length;h++){var p=d[h];p[e.isAllDay]&&p[e.endTime].getTime()>k(new Date(p[e.endTime].getTime())).getTime()&&(p[e.startTime]=k(p[e.startTime]),p[e.endTime]=K(k(p[e.endTime]),1))}return this.filterEvents(t,n,l,r)},a.prototype.filterEvents=function(i,e,t,n){void 0===t&&(t=this.parent.eventsProcessed);var r=this.parent.dataModule.getStartEndQuery(i,e),o=new x.M1({json:t}).executeLocal((new x.XK).where(r));return n&&(o=this.filterEventsByResource(n,o)),this.sortByTime(o)},a.prototype.filterEventsByRange=function(i,e,t){var r,n=this;return r=e&&t?this.filterEvents(e,t,i):e&&!t?i.filter(function(o){return o[n.parent.eventFields.startTime]>=e}):!e&&t?i.filter(function(o){return o[n.parent.eventFields.endTime]<=t}):i,this.sortByTime(r)},a.prototype.filterEventsByResource=function(i,e){void 0===e&&(e=this.parent.eventsProcessed);for(var t={},n=this.parent.resourceBase.resourceCollection,r=0;r<n.length;r++)t[n[parseInt(r.toString(),10)].field]=i.groupOrder[parseInt(r.toString(),10)];var o=Object.keys(t);return e.filter(function(h){return o.every(function(d){return h[""+d]instanceof Array?h[""+d].indexOf(t[""+d])>-1:h[""+d]===t[""+d]})})},a.prototype.sortByTime=function(i){if(!this.parent.eventSettings.sortComparer||"function"!=typeof this.parent.eventSettings.sortComparer&&"string"!=typeof this.parent.eventSettings.sortComparer){var e=this.parent.eventFields;i.sort(function(t,n){var o=n[e.startTime];
1return t[e.startTime].getTime()-o.getTime()})}else i=this.customSorting(i);return i},a.prototype.sortByDateTime=function(i){if(!this.parent.eventSettings.sortComparer||"function"!=typeof this.parent.eventSettings.sortComparer&&"string"!=typeof this.parent.eventSettings.sortComparer){var e=this.parent.eventFields;i.sort(function(t,n){var r=t[e.startTime],o=n[e.startTime],h=n[e.endTime],d=t[e.endTime].getTime()-r.getTime(),p=h.getTime()-o.getTime();return r.getTime()-o.getTime()||p-d})}else i=this.customSorting(i);return i},a.prototype.customSorting=function(i){if("function"==typeof this.parent.eventSettings.sortComparer)return this.parent.eventSettings.sortComparer.call(this.parent,i);if("string"==typeof this.parent.eventSettings.sortComparer){var e=this.parent.eventSettings.sortComparer.split("."),t=void 0;if((0,s.hX)(window)||(t=window[e[e.length-1]]),t)return t(i)}return i},a.prototype.getSmallestMissingNumber=function(i){for(var e=Math.max.apply(Math,i),t=0;t<e;t++)if(-1===i.indexOf(t))return t;return e+1},a.prototype.splitEventByDay=function(i){var e=this.parent.eventFields,t=[],n=i[e.startTime],r=i[e.endTime];if(k(new Date(n.getTime()))<k(new Date(r.getTime())))for(var l=new Date(n.getTime()),h=K(k(new Date(n.getTime())),1),d=0===r.getHours()&&0===r.getMinutes()?r:K(r,1),p=1,u=rf(n.getTime(),d.getTime());h<=r&&l.getTime()!==h.getTime();){var f=(0,s.X$)({},i);f[e.startTime]=l,f[e.endTime]=h,f.data={index:p,count:u},f.Guid=this.generateGuid(),f.isSpanned=!0,t.push(f),l=h,k(new Date(l.getTime())).getTime()===k(new Date(r.getTime())).getTime()&&h.getTime()!==r.getTime()?(h=new Date(l.getTime()),h=new Date(h.setHours(r.getHours(),r.getMinutes(),r.getSeconds()))):h=K(k(new Date(l.getTime())),1),p++}else t.push(i);return t},a.prototype.splitEvent=function(i,e){var t=this.parent.eventFields,n=k(i[t.startTime]).getTime(),r=k(i[t.endTime]).getTime();jr(i[t.endTime])<=0&&(r=n>(o=K(k(i[t.endTime]),-1).getTime())?n:o);var l=n,h=r,d=[];if(n!==r){n<e[0].getTime()&&(n=e[0].getTime()),r>e[e.length-1].getTime()&&(r=e[e.length-1].getTime());for(var p=n,u=0;u<this.slots.length;u++){var f=this.slots[parseInt(u.toString(),10)];if("WorkWeek"===this.parent.currentView||"TimelineWorkWeek"===this.parent.currentView||this.parent.activeViewOptions.group.byDate||this.parent.activeViewOptions.showWeekend){for(var m=[],g=0,v=f;g<v.length;g++)m.push(new Date(v[g]));var y=this.getRenderedDates(m);if(!(0,s.hX)(y)&&y.length>0){f=[];for(var S=0,E=y;S<E.length;S++)f.push(E[S].getTime())}}if("number"==typeof f){var o=f;(f=[]).push(o)}var T=f[0];if((p=p<=T&&r>=T?T:p)>r||T>r)break;if(!this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.showWeekend&&"WorkWeek"!==this.parent.currentView&&"TimelineWorkWeek"!==this.parent.currentView){var I=f.indexOf(p);if(-1!==I){var w=f.indexOf(r),A=-1!==w,M=(w=A?w:f.length-1)-I+1,D=f[parseInt(I.toString(),10)]!==l,L=f[parseInt(w.toString(),10)]!==h;if(d.push(this.cloneEventObject(i,f[parseInt(I.toString(),10)],f[parseInt(w.toString(),10)],M,D,L)),A)break}}else if(this.dateInRange(p,f[0],f[f.length-1])){for(var V=[],G=0;G<f.length;G++)this.dateInRange(f[parseInt(G.toString(),10)],l,h)&&V.push(f[parseInt(G.toString(),10)]);if(V.length>0)if(this.parent.activeViewOptions.group.byDate)for(var W=0,te=V;W<te.length;W++){var $=te[W];d.push(this.cloneEventObject(i,$,$,1,$!==l,$!==h))}else d.push(this.cloneEventObject(i,V[0],V[V.length-1],V.length,D=V[0]!==l,L=V[V.length-1]!==h))}}}else d.push(this.cloneEventObject(i,n,r,1,!1,!1));return d},a.prototype.cloneEventObject=function(i,e,t,n,r,o){var l=this.parent.eventFields,h=(0,s.X$)({},i,null,!0),d={count:n,isLeft:r,isRight:o};return d[l.startTime]=i[l.startTime],d[l.endTime]=i[l.endTime],h.data=d,h[l.startTime]=new Date(e),h[l.endTime]=new Date(t),h},a.prototype.dateInRange=function(i,e,t){return e<=i&&i<=t},a.prototype.getSelectedEventElements=function(i){if(this.removeSelectedAppointmentClass(),this.parent.selectedElements.length<=0)this.parent.selectedElements.push(i);else if(this.parent.selectedElements.filter(function(d){return d.getAttribute("data-guid")===i.getAttribute("data-guid")}).length<=0)for(var t='div[data-guid="'+i.getAttribute("data-guid")+'"]',r=0,o=[].slice.call(this.parent.element.querySelectorAll(t));r<o.length;r++)this.parent.selectedElements.push(o[r]);else{var h=this.parent.selectedElements.filter(function(d){return d.getAttribute("data-guid")!==i.getAttribute("data-guid")});this.parent.selectedElements=h}return i&&this.parent.selectedElements.length>0&&this.addSelectedAppointments(this.parent.selectedElements,!1),this.parent.selectedElements},a.prototype.getSelectedEvents=function(){var i=this,e=[],t=[];return[].slice.call(this.parent.element.querySelectorAll("."+Ts)).filter(function(r){0===e.filter(function(l){return l.Guid===r.getAttribute("data-guid")}).length&&e.push(i.getEventByGuid(r.getAttribute("data-guid"))),t.push(r)}),{event:e.length>1?e:e[0],element:t.length>1?t:t[0]}},a.prototype.removeSelectedAppointmentClass=function(){var i=this.getSelectedAppointments();(0,s.vy)(i,Ts),("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView)&&(0,s.vy)(i,td)},a.prototype.addSelectedAppointments=function(i,e){"MonthAgenda"!==this.parent.currentView&&this.parent.removeSelectedClass(),(0,s.iQ)(i,Ts),i.length>0&&!e&&i[i.length-1].focus()},a.prototype.getSelectedAppointments=function(){return[].slice.call(this.parent.element.querySelectorAll("."+Ts+",."+Ce+":focus"))}
1,a.prototype.focusElement=function(i){if(!this.parent.eventWindow.dialogObject||!this.parent.eventWindow.dialogObject.visible){var e=document.activeElement,t=this.parent.getSelectedCells();if(t.length>0&&(e&&(this.parent.element.contains(e)||-1!==t.indexOf(e))||i)){if(this.parent.keyboardInteractionModule){var n=!(0,s.hX)(this.parent.activeCellsData)&&this.parent.activeCellsData.element||t[t.length-1];this.parent.keyboardInteractionModule.selectCells(n instanceof Array,n)}return}var r=this.getSelectedAppointments();if(r.length>0)return this.parent.activeEventData&&this.parent.activeEventData.element&&r.indexOf(this.parent.activeEventData.element)>-1?void this.parent.activeEventData.element.focus():void r[r.length-1].focus()}},a.prototype.selectWorkCellByTime=function(i){var e;if("Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView)return e;if(i.length>0){var r,t=i[i.length-1],n=t[this.parent.eventFields.startTime],o=this.isAllDayAppointment(t);r="Month"===this.parent.currentView||o||!this.parent.activeViewOptions.timeScale.enable?new Date(+n).setHours(0,0,0,0):this.findNearestSlot(n);var l=void 0;l=o&&-1!==["Day","Week","WorkWeek"].indexOf(this.parent.currentView)?this.parent.getAllDayRow():this.parent.getContentTable();var h='[data-date="'+new Date(r).getTime()+'"]';if(!(0,s.hX)(this.parent.activeViewOptions.group.resources)&&this.parent.activeViewOptions.group.resources.length>0&&(h+='[data-group-index="'+this.getGroupIndexFromEvent(t)+'"]'),e=l.querySelector(h))return this.parent.activeCellsData=this.parent.getCellDetails(e),this.parent.keyboardInteractionModule&&this.parent.keyboardInteractionModule.selectCells(!1,e),e}return e},a.prototype.findNearestSlot=function(i){var t=this.parent.activeViewOptions.timeScale.interval*wt/this.parent.activeViewOptions.timeScale.slotCount,n=Math.round(bt/t),r=new Date(i);r.setHours(0,0,0,0);var l=Array.from({length:n},function(h,d){return new Date(r.getTime()+d*t)}).reduce(function(h,d){var p=Math.abs(i.getTime()-d.getTime());return!h||p<Math.abs(i.getTime()-h.getTime())?d:h},null);return 1e3*Math.trunc(l.getTime()/1e3)},a.prototype.getGroupIndexFromEvent=function(i){for(var e,t,n,r,o=this.parent.resourceBase.resourceCollection.length-1;o>=0;o--){var l=i[this.parent.resourceBase.resourceCollection[parseInt(o.toString(),10)].field];if(!(0,s.hX)(l)){t=this.parent.resourceBase.resourceCollection[parseInt(o.toString(),10)],e=o,n=t.name,r=t.field;break}}(0,s.hX)(n)&&(0,s.hX)(e)&&(n=this.parent.resourceCollection.slice(-1)[0].name,e=this.parent.resourceCollection.length-1,r=this.parent.resourceCollection.slice(-1)[0].field,t=this.parent.resourceCollection.filter(function(p,u){return p.name===n?(e=u,p):null})[0]);var h=i[""+r]instanceof Array?i[""+r][0]:i[""+r];return e>0?this.parent.resourceBase.getIndexFromResourceId(h,n,t,i,this.parent.resourceCollection[e-1].field):this.parent.resourceBase.getIndexFromResourceId(h,n,t)},a.prototype.isAllDayAppointment=function(i){var e=this.parent.eventFields,t=i[e.isAllDay],n=(Bt(i[e.endTime])-Bt(i[e.startTime]))/bt>=1;return!!(t||"TimeSlot"!==this.parent.eventSettings.spannedEventPlacement&&n)},a.prototype.addEventListener=function(){this.parent.on(Xr,this.appointmentBorderRemove,this)},a.prototype.removeEventListener=function(){this.parent.off(Xr,this.appointmentBorderRemove)},a.prototype.appointmentBorderRemove=function(i){var e=i.event.target;if((0,s.kp)(e,"."+Ce))"MonthAgenda"!==this.parent.currentView&&this.parent.removeSelectedClass();else if(!(0,s.kp)(e,"."+Qt)){if(this.parent.uiStateValues.isTapHold&&(0,s.kp)(e,"."+ie+",."+it))return;this.parent.uiStateValues.isTapHold=!1,this.removeSelectedAppointmentClass(),this.parent.selectedElements=[]}},a.prototype.wireAppointmentEvents=function(i,e,t){void 0===t&&(t=!1);var n=!(0,s.hX)(e)&&e[this.parent.eventFields.isReadonly];s.Jm.add(i,"click",this.eventClick,this),!this.parent.isAdaptive&&!this.parent.activeViewOptions.readonly&&!n&&(s.Jm.add(i,"touchend",this.eventTouchClick,this),s.Jm.add(i,"dblclick",this.eventDoubleClick,this)),!this.parent.activeViewOptions.readonly&&!n&&!t&&(this.parent.resizeModule&&this.parent.resizeModule.wireResizeEvent(i),this.parent.dragAndDropModule&&this.parent.dragAndDropModule.wireDragEvent(i))},a.prototype.eventTouchClick=function(i){var e=this;this.parent.uiStateValues.isTouchScroll||this.parent.uiStateValues.isTapHold||this.parent.uiStateValues.action?this.parent.uiStateValues.isTouchScroll=this.parent.uiStateValues.isTapHold=!1:(setTimeout(function(){return e.isDoubleTapped=!1},250),i.preventDefault(),this.isDoubleTapped?this.eventDoubleClick(i):this.isDoubleTapped||(this.isDoubleTapped=!0,this.eventClick(i)))},a.prototype.renderResizeHandler=function(i,e,t){if(this.parent.resizeModule&&this.parent.allowResizing&&!this.parent.activeViewOptions.readonly&&!t)for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n],l=(0,s.n)("div",{className:kl});switch(o){case"isLeft":e.isLeft||(l.appendChild((0,s.n)("div",{className:"e-left-right-resize"})),(0,s.iQ)([l],this.parent.enableRtl?sd:rd),(0,s.Hs)([l],i));break;case"isRight":e.isRight||(l.appendChild((0,s.n)("div",{className:"e-left-right-resize"})),(0,s.iQ)([l],this.parent.enableRtl?rd:sd),(0,s.BC)([l],i));break;case"isTop":e.isTop||(l.appendChild((0,s.n)("div",{className:"e-top-bottom-resize"})),(0,s.iQ)([l],_f),(0,s.Hs)([l],i));break;case"isBottom":e.isBottom||(l.appendChild((0,s.n)("div",{className:"e-top-bottom-resize"})),(0,s.iQ)([l],Tf),(0,s.BC)([l],i))}}},a.prototype.eventClick=function(i){var e=this,t=i.target;if(!(t.classList.contains(Nb)||t.classList.contains(Ef)||t.classList.contains(an)))if((i.ctrlKey||i.metaKey)&&1===i.which&&this.parent.keyboardInteractionModule){this.parent.quickPopup.quickPopup.hide(),this.parent.selectedElements=[].slice.call(this.parent.element.querySelectorAll("."+Ts));var n=(0,s.kp)(i.target,"."+Ce);
1this.getSelectedEventElements(n),this.activeEventData(i,!1),this.parent.trigger(yl,{data:this.parent.activeEventData.event,element:this.parent.activeEventData.element,event:i,requestType:"eventSelect"});var o=(0,s.X$)(this.parent.activeEventData,{cancel:!1,originalEvent:i});this.parent.trigger(sa,o)}else this.removeSelectedAppointmentClass(),this.activeEventData(i,!0),this.parent.trigger(yl,{data:this.parent.activeEventData.event,element:this.parent.activeEventData.element,event:i,requestType:"eventSelect"}),o=(0,s.X$)(this.parent.activeEventData,{cancel:!1,originalEvent:i}),this.parent.trigger(sa,o,function(d){d.cancel?(e.removeSelectedAppointmentClass(),e.parent.selectedElements=[],e.parent.quickPopup&&e.parent.quickPopup.quickPopupHide()):(("Agenda"===e.parent.currentView||"MonthAgenda"===e.parent.currentView)&&(0,s.iQ)([e.parent.activeEventData.element],td),e.parent.allowInline?e.parent.notify(aa,{data:d.event,element:d.element,type:"Event"}):e.parent.notify(sa,d))})},a.prototype.eventDoubleClick=function(i){var e=this;if(this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(!0),"touchend"===i.type&&this.activeEventData(i,!0),this.removeSelectedAppointmentClass(),this.parent.selectedElements=[],!this.parent.activeEventData.element.classList.contains($l)&&!this.parent.activeEventData.element.querySelector("."+an)){var t=(0,s.X$)(this.parent.activeEventData,{cancel:!1,originalEvent:i});this.parent.trigger("eventDoubleClick",t,function(n){n.cancel||(!(0,s.hX)(e.parent.activeEventData.event)&&(0,s.hX)(e.parent.activeEventData.event[e.parent.eventFields.recurrenceID])?e.parent.eventWindow.openEditor(e.parent.activeEventData.event,"Save"):(e.parent.currentAction="EditOccurrence",e.parent.quickPopup.openRecurrenceAlert()))})}},a.prototype.getEventByGuid=function(i){return this.parent.eventsProcessed.filter(function(e){return e.Guid===i})[0]},a.prototype.getEventById=function(i){var e=this;return this.parent.eventsData.filter(function(t){return t[e.parent.eventFields.id]===i})[0]},a.prototype.generateGuid=function(){return"xyxxxxyx-xxxy-yxxx-xyxx-xxyxxxxyyxxx".replace(/[xy]/g,function(i){var e=16*Math.random()|0;return("x"===i?e:3&e|8).toString(16)})},a.prototype.getEventIDType=function(){return 0!==this.parent.eventsData.length?typeof this.parent.eventsData[0][this.parent.eventFields.id]:0!==this.parent.blockData.length?typeof this.parent.blockData[0][this.parent.eventFields.id]:"string"},a.prototype.getEventMaxID=function(i){var e=this;if(this.parent.eventsData.length<1&&this.parent.blockData.length<1)return 1;var t,n=this.getEventIDType();if("string"===n&&(t=this.generateGuid()),"number"===n){var l=this.parent.eventsData.concat(this.parent.blockData).map(function(h){return h[e.parent.eventFields.id]}).reduce(function(h,d){return Math.max(h,d)});t=(l=(0,s.hX)(i)?l:l+i)+1}return t},a.prototype.activeEventData=function(i,e){var t=this,n=(0,s.kp)(i.target,"."+Ce),r=n.getAttribute("data-guid");e&&(this.addSelectedAppointments([].slice.call(this.parent.element.querySelectorAll('div[data-guid="'+r+'"]')),!0),n.focus());var o=this.getEventByGuid(r);o&&o.isSpanned&&(o=this.parent.eventsData.filter(function(l){return l[t.parent.eventFields.id]===o[t.parent.eventFields.id]})[0]),this.parent.activeEventData={event:o,element:n}},a.prototype.generateOccurrence=function(i,e,t){var n=this,r=i[this.parent.eventFields.startTime],o=i[this.parent.eventFields.endTime],l=i[this.parent.eventFields.recurrenceRule],h=o.getTimezoneOffset()-r.getTimezoneOffset(),d=o.getTime()-r.getTime()-6e4*h;e=new Date((e||this.parent.activeView.startDate()).getTime()-d);var u,p=i[this.parent.eventFields.recurrenceException];"Agenda"!==this.parent.currentView&&t&&(u=function lx(a,i){return Math.ceil((i.getTime()-a.getTime())/bt)}(e,this.parent.activeView.endDate())+1);var f=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName(),m=this.parent.activeViewOptions.firstDayOfWeek,g=this.parent.calendarMode;i[this.parent.eventFields.recurrenceRule]&&this.isDayBasedRecurrence(i)&&this.parent.timezone&&i[this.parent.eventFields.startTimezone]&&i[this.parent.eventFields.endTimezone]&&(r=this.parent.tzModule.convert(i[this.parent.eventFields.startTime],this.parent.timezone,i[this.parent.eventFields.startTimezone]));var v=Xf(r,l,p,m,u,e,g,f);"Agenda"===this.parent.currentView&&-1===l.indexOf("COUNT")&&-1===l.indexOf("UNTIL")&&((0,s.hX)(i.generatedDates)?i.generatedDates={start:new Date(v[0]),end:new Date(v[v.length-1])}:(v[0]<i.generatedDates.start.getTime()&&(i.generatedDates.start=new Date(v[0])),v[v.length-1]>i.generatedDates.end.getTime()&&(i.generatedDates.end=new Date(v[v.length-1]))));var b=!1,y=[];i[this.parent.eventFields.recurrenceRule]&&this.isDayBasedRecurrence(i)&&this.parent.timezone&&i[this.parent.eventFields.startTimezone]&&i[this.parent.eventFields.endTimezone]&&(b=!0,y.push.apply(y,v.map(function(w){return n.parent.tzModule.convert(new Date(w),i[n.parent.eventFields.startTimezone],n.parent.timezone).getTime()})));for(var S=[],E=0,_=y=y.length>0?y:v;E<_.length;E++){var T=_[E],I=(0,s.X$)({},i,null,!0);T=b?T:this.getDSTAdjustedTime(T,I),I[this.parent.eventFields.startTime]=new Date(T),I[this.parent.eventFields.endTime]=new Date(new Date(T).setMilliseconds(d)),I[this.parent.eventFields.recurrenceID]=I[this.parent.eventFields.id],delete I[this.parent.eventFields.recurrenceException],delete I[this.parent.eventFields.followingID],I.Guid=this.generateGuid(),S.push(I)}return S},a.prototype.isDayBasedRecurrence=function(i){return i[this.parent.eventFields.recurrenceRule].includes("BYMONTHDAY")||i[this.parent.eventFields.recurrenceRule].includes("BYDAY")},a.prototype.getDSTAdjustedTime=function(i,e){var t=i;if(this.parent.timezone&&(e[this.parent.eventFields.startTimezone]||e[this.parent.eventFields.endTimezone])){var n=this.getDSTDiff(e[this.parent.eventFields.startTime],new Date(i),e[this.parent.eventFields.startTimezone]),r=this.getDSTDiff(e[this.parent.eventFields.startTime],new Date(i),this.parent.timezone);t=new Date(i).getTime()-6e4*(n-r)}return t},a.prototype.getDSTDiff=function(i,e,t){return this.parent.tzModule.offset(new Date(i),t)-this.parent.tzModule.offset(new Date(e),t)},a.prototype.getParentEvent=function(i,e){var t;void 0===e&&(e=!1);do{(i=this.getFollowingEvent(i))&&(t=(0,s.X$)({},i,null,!0))}while(i&&e);
1if(e&&t){var n=this.getEventCollections(t),r=n.follow.slice(-1)[0];n.occurrence.length>0&&!t[this.parent.eventFields.recurrenceException]&&(r=n.occurrence.slice(-1)[0]),r&&(t[this.parent.eventFields.recurrenceRule]=r[this.parent.eventFields.recurrenceRule])}return t},a.prototype.getEventCollections=function(i,e){var t=[],n=[],r=i;do{(r=this.getFollowingEvent(r,!0))&&t.push(r),n=n.concat(this.getOccurrenceEvent(r||i))}while(r);var o={};if(e){var l=this.parent.eventFields;o={follow:t.filter(function(h){return h[l.startTime]>=e[l.startTime]}),occurrence:n.filter(function(h){return h[l.startTime]>=e[l.startTime]})}}else o={follow:t,occurrence:n};return o},a.prototype.getFollowingEvent=function(i,e){var n,t=this.parent.eventFields;return n=e?i[t.id]:i[t.recurrenceID]||i[t.followingID],this.parent.eventsData.filter(function(o){return o[e?t.followingID:t.id]===n}).shift()},a.prototype.isFollowingEvent=function(i,e){var t=i[this.parent.eventFields.startTime],n=e[this.parent.eventFields.startTime];return t.getHours()===n.getHours()&&t.getMinutes()===n.getMinutes()&&t.getSeconds()===n.getSeconds()},a.prototype.getOccurrenceEvent=function(i,e,t){void 0===e&&(e=!1),void 0===t&&(t=!1);var n=e?"Guid":t?this.parent.eventFields.followingID:this.parent.eventFields.recurrenceID,r=e?"Guid":this.parent.eventFields.id;return(e?this.parent.eventsProcessed:this.parent.eventsData).filter(function(l){return l[""+n]===i[""+r]})},a.prototype.getOccurrencesByID=function(i){for(var e=this.parent.eventFields,t=[],r=0,o=this.parent.eventsData.filter(function(h){return h[e.id]===i});r<o.length;r++){var l=o[r];(0,s.hX)(l[e.recurrenceRule])||(t=t.concat(this.generateOccurrence(l)))}return t},a.prototype.getOccurrencesByRange=function(i,e){for(var t=this.parent.eventFields,n=[],r=0,o=this.parent.eventsData;r<o.length;r++){var l=o[r];(0,s.hX)(l[t.recurrenceRule])||(n=n.concat(this.generateOccurrence(l)))}return n.filter(function(d){return d[t.startTime]>=i&&d[t.endTime]<=e&&!(0,s.hX)(d[t.recurrenceID])})},a.prototype.getDeletedOccurrences=function(i){var t,e=this.parent.eventFields,n=[];if((t="string"==typeof i||"number"==typeof i?this.parent.eventsData.filter(function(p){return p[e.id]===i})[0]:(0,s.X$)({},i,null,!0))[e.recurrenceException])for(var r=t[e.recurrenceException].split(","),o=function(p,u){if(0===l.parent.eventsData.filter(function(S){return S[e.recurrenceID]===t[e.id]&&S[e.recurrenceException]===r[parseInt(p.toString(),10)]}).length){var m=md(r[parseInt(p.toString(),10)]),g=(0,s.X$)({},i,null,!0);g[e.recurrenceID]=t[e.id],delete g[e.followingID],g[e.recurrenceException]=r[parseInt(p.toString(),10)];var v=new Date(m.getTime()),b=t[e.endTime].getTime()-t[e.startTime].getTime(),y=new Date(v.getTime());y.setMilliseconds(b),g[e.startTime]=new Date(v.getTime()),g[e.endTime]=new Date(y.getTime()),n.push(g)}},l=this,h=0,d=r.length;h<d;h++)o(h);return n},a.prototype.applyResourceColor=function(i,e,t,n,r){if(this.parent.resourceBase){var l=this.parent.resourceBase.getResourceColor(e,n);l&&(i.style[t]=(0,s.hX)(r)?l:(d=r,h=(h=l).replace("#",""),"rgba("+parseInt(h.substring(0,h.length/3),16)+", "+parseInt(h.substring(h.length/3,2*h.length/3),16)+", "+parseInt(h.substring(2*h.length/3,3*h.length/3),16)+", "+d+")"))}var h,d},a.prototype.createBlockAppointmentElement=function(i,e,t){var o,n=i[this.parent.eventFields.subject]||this.parent.eventSettings.fields.subject.default,r=(0,s.n)("div",{className:ma,attrs:{"data-id":"Appointment_"+i[this.parent.eventFields.id],"aria-disabled":"true"}});if((0,s.hX)(this.parent.activeViewOptions.eventTemplate)){var u=(0,s.n)("div",{className:Ut});this.parent.sanitize(n,u),o=[u]}else{var d=this.parent.element.id+"_"+this.parent.activeViewOptions.eventTemplateName+"eventTemplate",p=t&&-1===this.parent.currentView.indexOf("Year")?this.parent.getEventTemplateName(e):"eventTemplate";o=this.parent.getAppointmentTemplate()(i,this.parent,p,d,!1,void 0,void 0,this.parent.root)}return(0,s.BC)(o,r),this.setWrapperAttributes(r,e),r},a.prototype.setWrapperAttributes=function(i,e){(0,s.hX)(this.cssClass)||(0,s.iQ)([i],this.cssClass),this.parent.activeViewOptions.group.resources.length>0&&i.setAttribute("data-group-index",e.toString())},a.prototype.getReadonlyAttribute=function(i){return(i[this.parent.eventFields.isReadonly]||this.parent.readonly).toString()},a.prototype.isBlockRange=function(i){for(var t=!1,n=this.parent.eventFields,r=0,o=i instanceof Array?i:[i];r<o.length;r++){var l=o[r],h=[];(0,s.hX)(l[n.recurrenceRule])||!(0,s.hX)(l[n.recurrenceID])&&l[n.id]!==l[n.recurrenceID]?h.push(l):h=this.generateOccurrence(l);for(var d=0,p=h;d<p.length;d++)if(this.filterBlockEvents(p[d]).length>0){t=!0;break}}return this.parent.uiStateValues.isBlock=t,t},a.prototype.getFilterEventsList=function(i,e){return new x.M1(i).executeLocal((new x.XK).where(e))},a.prototype.getSeriesEvents=function(i,e){var t=this.parent.eventFields;e=(0,s.hX)(e)?i[t.startTime]:e;var n,r,d,o=[],l=i[t.id],h=i[t.followingID],p="EditSeries"===this.parent.currentAction?"greaterthan":"greaterthanorequal";do{d=new x.mT(t.followingID,"equal",l).and(new x.mT(t.startTime,p,e)),n=(r=this.getFilterEventsList(this.parent.eventsData,d)).slice(-1)[0],(0,s.hX)(n)||n[t.id]===h?h=null:(o.push(n),l=n[t.id],h=n[t.followingID])}while(1===r.length&&!(0,s.hX)(n[t.followingID]));return o},a.prototype.getEditedOccurrences=function(i,e){for(var r,t=this.parent.eventFields,n=[],o=0,l=i;o<l.length;
1o++){var h=l[o],d=new x.mT(t.recurrenceID,"equal",h[t.id]).or(new x.mT(t.recurrenceID,"equal",h[t.followingID]).and(new x.mT(t.recurrenceID,"notequal",void 0)).and(new x.mT(t.recurrenceID,"notequal",null)));("EditFollowingEvents"===this.parent.currentAction||"DeleteFollowingEvents"===this.parent.currentAction)&&(d=d.and(new x.mT(t.startTime,"greaterthanorequal",e))),r=this.getFilterEventsList(this.parent.eventsData,d),n=n.concat(r)}return n},a.prototype.getRenderedDates=function(i){var n,e=0,t=i.length,r=(0,s.hX)(this.parent.maxDate)?new Date(2099,11,31):this.parent.maxDate,o=(0,s.hX)(this.parent.minDate)?new Date(1900,0,1):this.parent.minDate;if(i[0]<o&&i[i.length-1]>r){for(var l=0;l<i.length;l++)k(i[parseInt(l.toString(),10)]).getTime()===k(new Date(o)).getTime()&&(e=l),k(i[parseInt(l.toString(),10)]).getTime()===k(new Date(r)).getTime()&&(t=l);n=i.filter(function(h){return h>=i[parseInt(e.toString(),10)]&&h<=i[parseInt(t.toString(),10)]})}return n},a.prototype.isValidEvent=function(i,e,t,n){var r=t.getTime()>n.startHour.getTime()&&e.getTime()<n.endHour.getTime(),o=n.startHour.getTime()<=e.getTime()&&i[this.parent.eventFields.startTime].getTime()>=n.startHour.getTime()&&i[this.parent.eventFields.endTime].getTime()<n.endHour.getTime()&&e.getTime()===t.getTime();return r||o},a.prototype.allDayExpandScroll=function(i){var e=0;[].slice.call(this.parent.element.querySelectorAll("."+If)).forEach(function(n){[].slice.call(n.children).forEach(function(o){o.style.top=e+"px"}),e+=n.offsetHeight}),e=i.offsetHeight-e,this.parent.element.querySelector("."+it).style.height=e/12+"em",this.parent.uiStateValues.expand?(0,s.iQ)([i],ql):(0,s.vy)([i],ql)},a.prototype.updateEventMinimumDuration=function(i,e,t){if((e.getTime()<t.getTime()||e.getTime()===t.getTime()&&i.startHour.getTime()<t.getTime()&&i.endHour.getTime()>e.getTime()&&-1===this.parent.currentView.indexOf("Timeline"))&&(Bt(t)-Bt(e))/wt<this.parent.eventSettings.minimumEventDuration){var r=new Date(e);if(r.setMinutes(r.getMinutes()+this.parent.eventSettings.minimumEventDuration),(t=r).getTime()>i.endHour.getTime()){var o=new Date(i.endHour.getTime());o.setMinutes(o.getMinutes()-this.parent.eventSettings.minimumEventDuration),e=o,t=i.endHour}}return{startDate:e,endDate:t}},a.prototype.createEventWrapper=function(i,e){void 0===i&&(i=""),void 0===e&&(e=0);for(var t=(0,s.n)("tr"),n=this.parent.activeView.colLevels.slice(-1)[0],r=this.parent.isReact&&this.parent.activeViewOptions.eventTemplate?" "+wl:"",o=0,l=n.length;o<l;o++){var h=n[parseInt(o.toString(),10)],d=(0,s.n)("td",{className:"allDay"===i?gn+r:"timeIndicator"===i?wb:$h+r,attrs:{"data-date":h.date.getTime().toString()}});if((0,s.hX)(h.groupIndex)||d.setAttribute("data-group-index",h.groupIndex.toString()),""===i){var p=(0,s.n)("div",{id:Ct+"-"+e.toString(),className:Ct});d.appendChild(p)}t.appendChild(d),e+=1}return t},a.prototype.getPageCoordinates=function(i){if((0,s.hX)(i))return i;var e=i.event;return e&&e.changedTouches?e.changedTouches[0]:i.changedTouches?i.changedTouches[0]:e||i},a.prototype.renderSpannedIcon=function(i,e){var t=(0,s.n)("div",{className:id+" "+Nt});if(e.isLeft){var n=t.cloneNode();(0,s.iQ)([n],Lb),(0,s.Hs)([n],i)}if(e.isRight){var r=t.cloneNode();(0,s.iQ)([r],Rb),(0,s.BC)([r],i)}if(e.isTop){var o=t.cloneNode();(0,s.iQ)([o],"e-up-icon"),(0,s.Hs)([o],i)}if(e.isBottom){var l=t.cloneNode();(0,s.iQ)([l],"e-down-icon"),(0,s.BC)([l],i)}},a.prototype.addCellHeight=function(i,e,t,n,r,o){if(void 0===o&&(o=!0),this.parent.activeViewOptions.maxEventsPerRow&&!this.parent.rowAutoHeight){for(var l=[].slice.call(this.parent.element.querySelectorAll(i)),h=this.parent.showWeekNumber?[].slice.call(this.parent.element.querySelectorAll("."+qh+" tbody tr")):[],d=0,p=l;d<p.length;d++){var u=p[d],f=this.parent.activeViewOptions.maxEventsPerRow*(e+("Month"===this.parent.currentView?t:2))+n+r;h.length>0&&(0,s.sN)(h[l.indexOf(u)].firstElementChild,{height:f+"px"}),(0,s.sN)(u.firstElementChild,{height:f+"px"})}!this.parent.enablePersistence&&!this.parent.activeViewOptions.allowVirtualScrolling&&o&&this.parent.notify(Ri,{})}},a.prototype.unWireEvents=function(){for(var e=0,t=[].slice.call(this.parent.element.querySelectorAll("."+Ce));e<t.length;e++)s.Jm.clearEvents(t[e])},a.prototype.destroy=function(){this.unWireEvents(),this.parent=null},a}
1(),Nw=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),em=function(a){function i(e){var t=a.call(this,e)||this;return t.dateRender=[],t.renderedEvents=[],t.renderedAllDayEvents=[],t.overlapEvents=[],t.moreEvents=[],t.overlapList=[],t.allDayEvents=[],t.slotCount=t.parent.activeViewOptions.timeScale.slotCount,t.interval=t.parent.activeViewOptions.timeScale.interval,t.allDayLevel=0,t.startHour=t.getStartEndHours(t.parent.activeViewOptions.startHour),t.endHour=t.getStartEndHours(t.parent.activeViewOptions.endHour),t.element=t.parent.activeView.getPanel(),t.fields=t.parent.eventFields,t.animation=new s.X5({progress:t.animationUiUpdate.bind(t)}),t.addEventListener(),t}return Nw(i,a),i.prototype.renderAppointments=function(){var e=this;if(!(0,s.hX)(this.parent)){this.parent.dragAndDropModule&&this.parent.dragAndDropModule.setDragArea(),this.isResourceEventTemplate=this.parent.isSpecificResourceEvents();for(var t=[].slice.call(this.parent.element.querySelectorAll("."+ma+",."+Ce+",."+Rl)),n=!(!this.parent.crudModule||!this.parent.crudModule.crudObj.isCrudAction),r=function(m){if(e.parent.isReact&&!(0,s.hX)(e.parent.activeViewOptions.eventTemplate)){var g=(0,s.kp)(m,"."+$h+",."+gn);g&&!g.classList.contains(wl)&&(0,s.iQ)([g],wl)}},o=0,l=t;o<l.length;o++){var h=l[o];if(!n||h.classList.contains(wi)||h.classList.contains(Rl))r(h),(0,s.TF)(h);else for(var d=parseInt(h.getAttribute("data-group-index"),10),p=0,u=this.parent.crudModule.crudObj.sourceEvent.length;p<u;p++)(d===this.parent.crudModule.crudObj.sourceEvent[parseInt(p.toString(),10)].groupIndex||d===this.parent.crudModule.crudObj.targetEvent[parseInt(p.toString(),10)].groupIndex)&&(r(h),(0,s.TF)(h))}if(this.element.querySelector("."+ie)&&(this.parent.virtualScrollModule&&this.parent.virtualScrollModule.updateFocusedWorkCell(),this.allDayElement=[].slice.call(this.element.querySelectorAll("."+it)),this.setAllDayRowHeight(0),0!==this.parent.eventsProcessed.length||0!==this.parent.blockProcessed.length)){var f=this.element.querySelector("."+Nl);s.Jm.remove(f,"click",this.rowExpandCollapse),s.Jm.add(f,"click",this.rowExpandCollapse,this),this.renderedEvents=[],this.renderedAllDayEvents=[],this.initializeValues(),this.processBlockEvents(),this.renderEvents("normalEvents"),this.allDayEvents.length>0&&(this.allDayEvents=this.allDayEvents.filter(function(m,g,v){return g===v.map(function(b){return b.Guid}).indexOf(m.Guid)}),(0,s.vy)(this.allDayElement,Vf),this.slots.push(this.parent.activeView.renderDates.map(function(m){return+m})),this.renderEvents("allDayEvents"),this.animation.animate(this.allDayElement[0])),this.parent.notify(Ri,{}),(0,s.iQ)(this.allDayElement,Vf),n&&(this.parent.crudModule.crudObj.isCrudAction=!1),this.parent.renderTemplates(function(){if(e.parent&&e.parent.isReact&&e.parent.activeViewOptions.eventTemplate){var m=[].slice.call(e.parent.element.querySelectorAll("."+wl));(0,s.vy)(m,wl)}})}}},i.prototype.initializeValues=function(){if(this.resources=this.parent.activeViewOptions.group.resources.length>0?this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.resourceBase.lastResourceLevel:[],this.resources.length>0&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.virtualScrollModule&&(this.resources=this.parent.resourceBase.renderedResources),this.cellHeight=parseFloat(this.parent.getElementHeight(this.parent.element.querySelector(".e-content-wrap tbody tr")).toFixed(2)),this.dateRender[0]=this.parent.activeView.renderDates,this.parent.activeViewOptions.group.resources.length>0)for(var e=0,t=this.resources.length;e<t;e++)this.dateRender[parseInt(e.toString(),10)]=this.resources[parseInt(e.toString(),10)].renderDates},i.prototype.getHeight=function(e,t){var n=(Bt(t)-Bt(e))/wt*(this.cellHeight*this.slotCount)/this.interval;return n<=0?this.cellHeight:n},i.prototype.appendEvent=function(e,t,n,r){var o=this.element.querySelector("."+Ct+'[id="'+Ct+"-"+n+'"]');(0,s.sN)(t,this.parent.enableRtl?{right:r}:{left:r});var l=t.classList.contains(ma)?"blockEvent":"event",h={data:(0,s.X$)({},e,null,!0),element:t,cancel:!1,type:l};this.parent.trigger(oa,h,function(d){d.cancel||o.appendChild(t)})},i.prototype.processBlockEvents=function(){for(var e=this.getResourceList(),t=this.getStartCount(),n=0,r=e;n<r.length;n++)for(var o=r[n],l=this.dateRender[parseInt(o.toString(),10)],h=0,d=l.length;h<d;h++){for(var p=new Date(l[parseInt(h.toString(),10)].getTime()),u=k(K(l[parseInt(h.toString(),10)],1)),m=0,g=this.filterEvents(p,u,this.parent.blockProcessed,this.resources[parseInt(o.toString(),10)]);m<g.length;m++){var v=g[m];this.parent.resourceBase&&this.setValues(v,o),this.renderBlockEvents(v,h,o,t),this.cssClass=null,this.groupOrder=null}t+=1}},i.prototype.renderBlockEvents=function(e,t,n,r){var o=this.isSpannedEvent(e,t,n),l=o[this.fields.startTime],h=o[this.fields.endTime],p=Vi(k(new Date(this.dateRender[parseInt(n.toString(),10)][parseInt(t.toString(),10)].getTime())),this.startHour,this.endHour);if(l<=h&&this.isValidEvent(e,l,h,p)&&this.isWorkDayAvailable(n,l)){var u=void 0,f=void 0;if(o[this.fields.isAllDay]){var m=this.parent.element.querySelector("."+we+" table");f=(0,s.IV)(m.offsetHeight),u=(0,s.IV)(0)}else f=(0,s.IV)(this.getHeight(l,h)),u=(0,s.IV)(this.getTopValue(l));e.IsBlock&&(f=(0,s.IV)(parseInt(f,10)-1));var g=this.createBlockAppointmentElement(e,n,this.isResourceEventTemplate);(0,s.sN)(g,{width:e.IsBlock?"99%":"100%",height:f,top:u});var b=this.getDayIndex(t,n,r);this.appendEvent(e,g,b,e.IsBlock?"0.5px":"0px")}},i.prototype.renderEvents=function(e){(0,s.vy)(this.allDayElement,Vf);for(var o,t="allDayEvents"===e?this.sortByDateTime(this.allDayEvents):void 0,n=this.getResourceList(),r=this.getStartCount(),l="allDayEvents"===e?this.parent.getElementHeightFromClass(this.element.querySelector("."+gn),Ce):0,h="allDayEvents"===e&&this.allDayElement.length>0?this.allDayElement[0].offsetTop:0,d=function(g){o=!0,p.parent.crudModule&&p.parent.crudModule.crudObj.isCrudAction&&"allDayEvents"!==e&&!p.parent.uiStateValues.isGroupAdaptive&&0===p.parent.crudModule.crudObj.sourceEvent.filter(function(V){return V.groupIndex===g}).length&&0===p.parent.crudModule.crudObj.targetEvent.filter(function(V){return V.groupIndex===g}).length&&(o=!1),p.slots=[];var v=p.dateRender[parseInt(g.toString(),10)],b=p.getRenderedDates(v)||v;p.slots.push(v.map(function(V){return+V}));for(var y=0,S=v.length;y<S&&v[parseInt(y.toString(),10)]<=b[b.length-1];y++){p.renderedEvents=[];var E=new Date(v[parseInt(y.toString(),10)].getTime()),_=k(K(v[parseInt(y.toString(),10)],1)),T=p.filterEvents(E,_,t,p.resources[parseInt(g.toString(),10)]);if(o)for(var I=0,w=T;I<w.length;I++){var A=w[I];if(p.parent.resourceBase&&p.setValues(A,g),"allDayEvents"===e)p.renderAllDayEvents(A,y,g,r,!1,h,l);else if(p.isAllDayAppointment(A))p.allDayEvents.push((0,s.X$)({},A,null,!0));else{if(p.parent.eventSettings.enableMaxHeight&&p.getOverlapIndex(A,y,!1,g)>0)continue;p.renderNormalEvents(A,y,g,r)}p.cssClass=null,p.groupOrder=null}else for(var M=0,D=T;M<D.length;M++){var L=D[M];p.isAllDayAppointment(L)&&p.allDayEvents.push((0,s.X$)({},L,null,!0))}r+=1}},p=this,u=0,f=n;u<f.length;u++)d(f[u])},i.prototype.getStartCount=function(){return this.parent.virtualScrollModule&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.timeScale.enable?parseInt(this.element.querySelector("."+Ct).getAttribute("id").split("-").slice(-1)[0],10):0},i.prototype.getDayIndex=function(e,t,n){var r=this;if(!this.parent.activeViewOptions.group.byDate)return n;if(this.parent.activeViewOptions.group.byDate&&!this.parent.activeViewOptions.group.hideNonWorkingDays){var o=this.parent.resourceBase.lastResourceLevel[0].renderDates.indexOf(this.dateRender[parseInt(t.toString(),10)][parseInt(e.toString(),10)]);return this.resources.length*o+t}for(var l=0,h=this.parent.activeView.colLevels[0],d=this.dateRender[parseInt(t.toString(),10)][parseInt(e.toString(),10)].getTime(),p=[],u=0;u<h.length&&(p=this.parent.resourceBase.resourceDateTree[parseInt(u.toString(),10)],d!==h[parseInt(u.toString(),10)].date.getTime());u++)l+=h[parseInt(u.toString(),10)].colSpan;var f=p.findIndex(function(m){return m.groupOrder.toString()===r.resources[parseInt(t.toString(),10)].groupOrder.toString()});return f<0?l:l+f},i.prototype.setValues=function(e,t){this.parent.activeViewOptions.group.resources.length>0?(this.cssClass=this.resources[parseInt(t.toString(),10)].cssClass,this.groupOrder=this.resources[parseInt(t.toString(),10)].groupOrder):this.cssClass=this.parent.resourceBase.getCssClass(e)},i.prototype.getResourceList=function(){return Array.apply(null,{length:this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.resources.length:1}).map(function(t,n){return n})},i.prototype.createAppointmentElement=function(e,t,n,r){var o=this.parent.eventFields,l=e[o.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),h=(0,s.n)("div",{className:Ce,attrs:{"data-id":"Appointment_"+e[o.id],"data-guid":e.Guid,role:"button",tabindex:"0","aria-disabled":this.parent.eventBase.getReadonlyAttribute(e),"aria-label":this.parent.getAnnouncementString(e)}});e[this.fields.isReadonly]&&(0,s.iQ)([h],"e-read-only");var d=(0,s.n)("div",{className:Jh});h.appendChild(d),this.parent.activeViewOptions.group.resources.length>0&&h.setAttribute("data-group-index",(this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:r).toString());var u,f=n;if((0,s.hX)(this.parent.activeViewOptions.eventTemplate)){var S=(0,s.n)("div",{className:Ut});if(this.parent.sanitize(l,S),t)if(e[o.isAllDay])u=[S];else{u=[];var E=(0,s.n)("div",{className:vr+(this.parent.isAdaptive?" "+ot:""),innerHTML:this.parent.getTimeString(e[o.startTime])}),_=(0,s.n)("div",{className:vr+(this.parent.isAdaptive?" "+ot:""),innerHTML:this.parent.getTimeString(e[o.endTime])});(0,s.iQ)([S],"e-text-center"),f.isLeft||u.push(E),u.push(S),f.isRight||u.push(_)}else{var T=this.parent.getTimeString(e[o.startTime])+" - "+this.parent.getTimeString(e[o.endTime]),I=(0,s.n)("div",{className:vr+(this.parent.isAdaptive?" "+ot:""),innerHTML:T}),w=(0,s.n)("div",{className:lo});this.parent.sanitize(e[o.location]||this.parent.eventSettings.fields.location.default||"",w),u=[S,I,w]}}
1else{var v=this.parent.element.id+"_"+this.parent.activeViewOptions.eventTemplateName+"eventTemplate",y=this.isResourceEventTemplate?this.parent.getEventTemplateName(this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:r):"eventTemplate";u=this.parent.getAppointmentTemplate()(e,this.parent,y,v,!1,void 0,void 0,this.parent.root)}if((0,s.BC)(u,d),!(this.parent.isAdaptive||(0,s.hX)(e[o.recurrenceRule])&&(0,s.hX)(e[o.recurrenceID]))){var M=(0,s.n)("div",{className:Nt+" "+(e[o.id]===e[o.recurrenceID]?Ml:Ll)});t?d.appendChild(M):h.appendChild(M)}return this.parent.eventBase.renderSpannedIcon(t?d:h,f),(0,s.hX)(this.cssClass)||(0,s.iQ)([h],this.cssClass),this.applyResourceColor(h,e,"backgroundColor",this.groupOrder),this.renderResizeHandler(h,f,e[this.fields.isReadonly]),h},i.prototype.createMoreIndicator=function(e,t,n){var r=n+t,o=e[parseInt(r.toString(),10)];if(o.childElementCount<=0){var l=(0,s.n)("div",{className:Rl,id:Rl+"-"+r.toString()}),h=(0,s.n)("div",{className:Fi,attrs:{tabindex:"0","data-index":r.toString(),"data-count":"1"},innerHTML:"+1&nbsp;"+(this.parent.isAdaptive?"":this.parent.localeObj.getConstant("more"))});l.appendChild(h),o.appendChild(l),s.Jm.add(h,"click",this.rowExpandCollapse,this)}else{var d=o.querySelector("."+Fi),p=parseInt(d.getAttribute("data-count"),10)+1;d.setAttribute("data-count",p.toString()),d.innerHTML="+"+this.parent.globalize.formatNumber(p)+"&nbsp;"+(this.parent.isAdaptive?"":this.parent.localeObj.getConstant("more"))}},i.prototype.isSpannedEvent=function(e,t,n){var r=k(this.dateRender[parseInt(n.toString(),10)][parseInt(t.toString(),10)]),o=this.getRenderedDates(this.dateRender[parseInt(n.toString(),10)])||[r];0===o.filter(function(f){return f.getDay()===t}).length&&(r=k(o[0]));var h=this.parent.eventFields,d=Vi(r,this.startHour,this.endHour),p=(0,s.X$)({},e,null,!0);p.isSpanned={isBottom:!1,isTop:!1,isSameDuration:p[h.startTime].getTime()===p[h.endTime].getTime()},e[h.startTime].getTime()<d.startHour.getTime()&&(p[h.startTime]=d.startHour,p.isSpanned.isTop=!0),e[h.endTime].getTime()>d.endHour.getTime()&&(p[h.endTime]=d.endHour,p.isSpanned.isBottom=!0);var u=this.updateEventMinimumDuration(d,p[h.startTime],p[h.endTime]);return p[h.startTime]=u.startDate,p[h.endTime]=u.endDate,p},i.prototype.isWorkDayAvailable=function(e,t){if(this.parent.activeViewOptions.group.hideNonWorkingDays&&this.resources.length>0){var n=this.resources[parseInt(e.toString(),10)].resourceData[this.resources[parseInt(e.toString(),10)].resource.workDaysField]||this.parent.activeViewOptions.workDays;return n&&n.indexOf(t.getDay())>=0}return!0},i.prototype.renderAllDayEvents=function(e,t,n,r,o,l,h){var d=this,p=this.getRenderedDates(this.dateRender[parseInt(n.toString(),10)])||this.dateRender[parseInt(n.toString(),10)];this.parent.activeViewOptions.group.byDate&&(this.slots[0]=[this.dateRender[parseInt(n.toString(),10)][parseInt(t.toString(),10)].getTime()],p=[this.dateRender[parseInt(n.toString(),10)][parseInt(t.toString(),10)]]);var u=this.splitEvent(e,p)[0],f=new Date(u[this.parent.eventFields.startTime].getTime()),m=new Date(u[this.parent.eventFields.endTime].getTime()),g=0,v=1,b=p[0].getTime()<=f.getTime()&&K(p.slice(-1)[0],1).getTime()>=f.getTime();if(f<=m&&b&&this.isWorkDayAvailable(n,f)){var y=[];if(this.renderedAllDayEvents[parseInt(n.toString(),10)]&&(y=this.renderedAllDayEvents[parseInt(n.toString(),10)].filter(function(L){return L.Guid===e.Guid}),this.parent.activeViewOptions.group.byDate&&(y=y.filter(function(L){return L[d.parent.eventFields.startTime]>=p[parseInt(t.toString(),10)]&&L[d.parent.eventFields.endTime]<=K(new Date(+p[parseInt(t.toString(),10)]),1)}))),0===y.length){var S=u.data.count,E=this.getOverlapIndex(u,t,!0,n);u.Index=E,this.allDayLevel=this.allDayLevel<E?E:this.allDayLevel,S>=0&&(g=100*S-(this.parent.activeViewOptions.allowOverlap?u.data.isRight?0:"Day"===this.parent.currentView?4:7:0)),(0,s.hX)(this.renderedAllDayEvents[parseInt(n.toString(),10)])&&(this.renderedAllDayEvents[parseInt(n.toString(),10)]=[]),this.renderedAllDayEvents[parseInt(n.toString(),10)].push((0,s.X$)({},u,null,!0));var A,T=[].slice.call(this.element.querySelector("."+mr).children),I=this.getDayIndex(t,n,r),w=this.element.querySelector("."+gn+":nth-child("+(I+1)+")");A=o?this.parent.inlineModule.createInlineAppointmentElement(e):this.createAppointmentElement(e,!0,u.data,n),(0,s.iQ)([A],wi);var M=(0,s.X$)({},u.data,null,!0);e.data=M,this.parent.trigger(oa,{data:e,element:A,cancel:!1},function(L){if(!L.cancel){if(w.appendChild(A),(0,s.sN)(A,{width:g+"%",top:(0,s.IV)(v+=(0===E?l:l+E*h)+1)}),E>1){d.moreEvents.push(A);for(var V=0,G=S;V<G;V++)d.createMoreIndicator(T,V,I)}d.allDayElement[0].setAttribute("data-count",d.allDayLevel.toString()),d.setAllDayRowHeight(4+(!d.parent.uiStateValues.expand&&d.allDayLevel>2?3*h:(d.allDayLevel+1)*h)),d.addOrRemoveClass(),d.wireAppointmentEvents(A,e)}})}}},i.prototype.renderNormalEvents=function(e,t,n,r,o){var l=this.isSpannedEvent(e,t,n),h=l[this.fields.startTime],d=l[this.fields.endTime],p="0%",f=0,g=Vi(k(new Date(this.dateRender[parseInt(n.toString(),10)][parseInt(t.toString(),10)].getTime())),this.startHour,this.endHour),v=this.isValidEvent(e,h,d,g);if(!(h.getTime()<this.parent.minDate.getTime()||d.getTime()>K(this.parent.maxDate,1).getTime())&&h<=d&&v&&this.isWorkDayAvailable(n,h)){var b=l.isSpanned.isSameDuration?this.cellHeight:this.getHeight(h,d);h.getTime()>=g.startHour.getTime()&&(f=this.getTopValue(h));var y=this.getOverlapIndex(l,t,!1,n);l.Index=y,this.overlapList.push(l),this.overlapList.length>1?((0,s.hX)(this.overlapEvents[parseInt(y.toString(),10)])&&(this.overlapEvents[parseInt(y.toString(),10)]=[]),this.overlapEvents[parseInt(y.toString(),10)].push(l)):(this.overlapEvents=[],this.overlapEvents.push([l])),p=this.getEventWidth();var E=this.adjustOverlapElements({index:y,left:"0%",width:p,day:r,dayIndex:t,record:l,resource:n});p=E.appWidth,(0,s.hX)(this.renderedEvents[parseInt(n.toString(),10)])&&(this.renderedEvents[parseInt(n.toString(),10)]=[]),this.renderedEvents[parseInt(n.toString(),10)].push((0,s.X$)({},l,null,!0));var _=void 0;_=o?this.parent.inlineModule.createInlineAppointmentElement(e):this.createAppointmentElement(e,!1,l.isSpanned,n),(0,s.sN)(_,{width:this.parent.eventSettings.enableMaxHeight||!this.parent.activeViewOptions.allowOverlap?"100%":E.appWidth,height:b+"px",to
1p:f+"px"});var I=b-40-15*_.querySelectorAll("."+id).length,w=_.querySelector("."+Ut);!this.parent.isAdaptive&&w&&(w.style.maxHeight=(0,s.IV)(I));var A=this.getDayIndex(t,n,r),M={};M[this.fields.startTime]=e[this.fields.startTime],M[this.fields.endTime]=e[this.fields.endTime],l.data=M,this.appendEvent(l,_,A,E.appLeft),this.wireAppointmentEvents(_,e)}},i.prototype.getEventWidth=function(){var t=(("Day"===this.parent.currentView?97:94)-this.overlapEvents.length)/this.overlapEvents.length;return(t<0?0:t)+"%"},i.prototype.getEventLeft=function(e,t){var n=(parseFloat(e)+1)*t;return(n>99?99:n)+"%"},i.prototype.getStartEndHours=function(e){if(!(0,s.hX)(e)&&""!==e){var t=new Date(2e3,0,0,0),n=e.split(":");return 2===n.length&&t.setHours(parseInt(n[0],10),parseInt(n[1],10),0),t}return null},i.prototype.getTopValue=function(e){var t=this.getStartEndHours(this.parent.activeViewOptions.startHour),n=60*(e.getHours()-t.getHours())+(e.getMinutes()-t.getMinutes());return this.parent.activeViewOptions.timeScale.enable?n*this.cellHeight*this.slotCount/this.interval:0},i.prototype.getOverlapIndex=function(e,t,n,r){var o=this,l=this.parent.eventFields,h=[],d=-1;if(this.overlapEvents=[],n){if(!(0,s.hX)(this.renderedAllDayEvents[parseInt(r.toString(),10)])){var p=k(new Date(this.dateRender[parseInt(r.toString(),10)][parseInt(t.toString(),10)].getTime()));h=this.renderedAllDayEvents[parseInt(r.toString(),10)].filter(function(A){return k(A[l.startTime]).getTime()<=p.getTime()&&k(A[l.endTime]).getTime()>=p.getTime()}),this.parent.activeViewOptions.group.resources.length>0&&(h=this.filterEventsByResource(this.resources[parseInt(r.toString(),10)],h))}}else{var u=(0,s.hX)(this.renderedEvents[parseInt(r.toString(),10)])?[]:this.renderedEvents[parseInt(r.toString(),10)],f=[],m=e[l.startTime],g=e[l.endTime];this.overlapList=u.filter(function(A){return A[l.endTime]>m&&A[l.startTime]<=g||A[l.startTime]>
1=g&&A[l.endTime]<=m||A[l.endTime].getTime()===A[l.startTime].getTime()&&A[l.startTime].getTime()===m.getTime()&&A[l.endTime]<g}),this.parent.activeViewOptions.group.resources.length>0&&(this.overlapList=this.filterEventsByResource(this.resources[parseInt(r.toString(),10)],this.overlapList));var v=[];this.overlapList.forEach(function(A){v.push(A);for(var M=[],D=new Set,L=function(){var W=v.shift();if(u.filter(function($){return $[l.endTime]>W[l.startTime]&&$[l.startTime]<=W[l.endTime]&&!D.has($[l.id])}).forEach(function($){M.push($),D.add($[l.id]),v.push($)}),D.size<u.length-1)return"break"};v.length>0&&"break"!==L(););o.parent.activeViewOptions.group.resources.length>0&&(M=o.filterEventsByResource(o.resources[parseInt(r.toString(),10)],M));var G=M.filter(function(W){return-1===o.overlapList.indexOf(W)});G.length>0&&(f=f.concat(G))});for(var b=0;b<f.length-1;b++)for(var y=b+1;y<f.length;y++)f[parseInt(b.toString(),10)][l.id]===f[parseInt(y.toString(),10)][l.id]&&(f.splice(y,1),y--);this.overlapList=this.overlapList.concat(f);for(var S=0,E=h=this.overlapList;S<E.length;S++){var _=E[S],I=_.Index;(0,s.hX)(this.overlapEvents[parseInt(I.toString(),10)])?this.overlapEvents[parseInt(I.toString(),10)]=[_]:this.overlapEvents[parseInt(I.toString(),10)].push(_)}}if(n||(h=h.filter(function(A){return A[l.startTime]===e[l.startTime]&&A[l.endTime]>e[l.endTime]||A[l.endTime]>e[l.startTime]&&A[l.startTime]<e[l.endTime]||A[l.endTime]===e[l.startTime]&&A[l.startTime]===e[l.endTime]||A[l.startTime].getTime()===e[l.startTime].getTime()&&A[l.endTime].getTime()===e[l.endTime].getTime()||A[l.startTime].getTime()===e[l.startTime].getTime()&&A[l.endTime].getTime()<e[l.endTime].getTime()||A[l.endTime].getTime()>e[l.endTime].getTime()})),h.length>0){var w=h.map(function(A){return A.Index});d=w.length>0?this.getSmallestMissingNumber(w):0}return-1===d?0:d},i.prototype.adjustOverlapElements=function(e){for(var t={appWidth:e.width,appLeft:e.left},n=0,r=this.overlapEvents.length;n<r;n++)if(!(0,s.hX)(this.overlapEvents[parseInt(n.toString(),10)]))for(var o=0,l=this.overlapEvents[parseInt(n.toString(),10)].length;o<l;o++){var h=this.getDayIndex(e.dayIndex,e.resource,e.day),d=this.element.querySelector("#e-appointment-wrapper-"+h);if(d&&d.childElementCount>0){var p=this.overlapEvents[parseInt(n.toString(),10)][parseInt(o.toString(),10)].Guid;if(d.querySelectorAll('div[data-guid="'+p+'"]').length>0&&p!==e.record.Guid){var u=d.querySelector('div[data-guid="'+p+'"]');parseFloat(e.width)<=parseFloat(u.style.width)&&(this.parent.enableRtl?u.style.right=this.getEventLeft(e.width,n):u.style.left=this.getEventLeft(e.width,n),u.style.width=parseFloat(e.width)+"%"),t.appWidth=u.style.width}else{var f=e.width;(0,s.hX)(this.overlapEvents[n-1])&&(f=this.getEventWidth()),t.appWidth=f,t.appLeft=this.getEventLeft(f,e.index)}}}return t},i.prototype.setAllDayRowHeight=function(e){var t=this.parent.element.querySelector("."+bi);("auto"===this.parent.height||!this.parent.enableAllDayScroll)&&(0,s.iQ)([t],ud);var n=this.parent.element.querySelector("."+mr);if(n.style.height="",this.parent.uiStateValues.expand&&"auto"!==this.parent.height&&this.parent.enableAllDayScroll)n.style.height=e/12+"em",this.parent.eventBase.allDayExpandScroll(t);else{for(var r=0,o=this.allDayElement;r<o.length;r++)o[r].style.height=e/12+"em";(0,s.vy)([t],ql)}},i.prototype.addOrRemoveClass=function(){var e=this;this.moreEvents.filter(function(r){!e.parent.uiStateValues.expand&&e.allDayLevel>2?((0,s.iQ)([r],Vb),r.setAttribute("tabindex","-1")):((0,s.vy)([r],Vb),r.setAttribute("tabindex","0"))});var t=this.element.querySelector("."+Nl);this.parent.uiStateValues.expand?((0,s.vy)([t],od),(0,s.iQ)([t],Fb)):((0,s.vy)([t],Fb),(0,s.iQ)([t],od)),this.allDayLevel>2?(0,s.vy)([t],ot):(0,s.iQ)([t],ot),[].slice.call(this.element.querySelectorAll("."+Rl)).forEac
1h(function(r){!e.parent.uiStateValues.expand&&e.allDayLevel>2?(0,s.vy)([r],ot):(0,s.iQ)([r],ot)})},i.prototype.getEventHeight=function(){var e=(0,s.n)("div",{className:Ce,styles:"visibility:hidden"});this.element.querySelector("."+gn+":first-child").appendChild(e);var n=e.offsetHeight;return(0,s.TF)(e),n},i.prototype.rowExpandCollapse=function(){var t,e=this.element.querySelector("."+Nl);this.parent.uiStateValues.expand=e.classList.contains(od),this.parent.uiStateValues.expand?(e.setAttribute("title",this.parent.localeObj.getConstant("collapseAllDaySection")),e.setAttribute("aria-label",this.parent.localeObj.getConstant("collapseAllDaySection")),t=(this.allDayLevel+1)*this.getEventHeight()+4):(e.setAttribute("title",this.parent.localeObj.getConstant("expandAllDaySection")),e.setAttribute("aria-label",this.parent.localeObj.getConstant("expandAllDaySection")),t=3*this.getEventHeight()+4,this.parent.element.querySelector("."+bi).scrollTop=0),this.setAllDayRowHeight(t),this.animation.animate(this.allDayElement[0]),this.addOrRemoveClass(),this.animation.animate(e)},i.prototype.animationUiUpdate=function(){this.parent.notify(Ri,{})},i.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.removeEventListener(),this.allDayElement=null,this.renderedAllDayEvents=null,this.renderedEvents=null,this.slotCount=null,this.interval=null,this.startHour=null,this.endHour=null,this.element=null,this.fields=null,this.animation=null,a.prototype.destroy.call(this))},i}(Zf),Vw=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Sa=function(a){function i(e){var t=a.call(this,e)||this;return t.renderedEvents=[],t.monthHeaderHeight=0,t.moreIndicatorHeight=19,t.renderType="day",t.element=t.parent.activeView.getPanel(),t.fields=t.parent.eventFields,t.maxHeight=t.parent.eventSettings.enableMaxHeight&&!t.parent.eventSettings.enableIndicator&&!t.parent.rowAutoHeight,t.withIndicator=t.parent.eventSettings.enableMaxHeight&&t.parent.eventSettings.enableIndicator&&!t.parent.rowAutoHeight,t.maxOrIndicator=t.maxHeight||t.withIndicator,t.moreIndicatorHeight=t.parent.rowAutoHeight&&t.parent.eventSettings.ignoreWhitespace?0:t.moreIndicatorHeight,t.addEventListener(),t}return Vw(i,a),i.prototype.removeEventWrapper=function(e){if(e.length>0)for(var t=0,n=e="Month"===this.parent.currentView||!this.parent.activeView.isTimelineView()&&!this.parent.activeViewOptions.timeScale.enable?e:[e[0]];t<n.length;t++){var r=n[t];r.parentElement&&r.parentElement.parentNode&&(0,s.TF)(r.parentElement)}},i.prototype.renderAppointments=function(){this.parent.dragAndDropModule&&this.parent.dragAndDropModule.setDragArea(),this.isResourceEventTemplate=this.parent.isSpecificResourceEvents();var e=this.parent.element.querySelector("."+we);this.parent.rowAutoHeight&&(this.parent.uiStateValues.top=e.scrollTop,this.parent.uiStateValues.left=e.scrollLeft);var t=[].slice.call(this.element.querySelectorAll("."+Ct));if(this.parent.crudModule&&this.parent.crudModule.crudObj.isCrudAction)for(var n=0,r=this.parent.crudModule.crudObj.sourceEvent.length;n<r;n++){var o=[].slice.call(this.element.querySelectorAll('.e-appointment-wrapper [data-group-index="'+this.parent.crudModule.crudObj.sourceEvent[parseInt(n.toString(),10)].groupIndex+'"]'));if(this.removeEventWrapper(o),this.parent.crudModule.crudObj.targetEvent[parseInt(n.toString(),10)]&&this.parent.crudModule.crudObj.sourceEvent[parseInt(n.toString(),10)].groupIndex!==this.parent.crudModule.crudObj.targetEvent[parseInt(n.toString(),10)].groupIndex){var l=[].slice.call(this.element.querySelectorAll('.e-appointment-wrapper [data-group-index="'+this.parent.crudModule.crudObj.targetEvent[parseInt(n.toString(),10)].groupIndex+'"]'));this.removeEventWrapper(l)}}else for(var h=0,d=t;h<d.length;h++)(0,s.TF)(d[h]);if(this.removeHeightProperty(nt),this.element.querySelector("."+ie)){if("Month"===this.parent.currentView){var u=(0,s.n)("div",{className:Ct}),f=this.parent.element.querySelector("."+ie);f.appendChild(u),this.monthHeaderHeight=u.offsetTop-f.offsetTop,f.removeChild(u)}this.eventHeight=this.parent.getElementHeightFromClass(this.element,Ce),this.addCellHeight("."+nt+" tbody tr",this.eventHeight,"Month"===this.parent.currentView?0:2,this.monthHeaderHeight,this.moreIndicatorHeight);var g=e.scrollTop;if(this.parent.rowAutoHeight&&this.parent.virtualScrollModule&&!this.parent.virtualScrollModule.isHorizontalScroll&&!(0,s.hX)(this.parent.currentAction)&&(e.scrollTop=e.scrollTop-1),this.parent.activeViewOptions.group.resources.length>0?(this.renderResourceEvents(),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.updateFocusedWorkCell()):this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays),this.parent.rowAutoHeight){this.updateBlockElements();var v={cssProperties:this.parent.getCssProperties(),module:this.parent.getModuleName(),isPreventScrollUpdate:!0,scrollPosition:{left:this.parent.uiStateValues.left,top:this.parent.uiStateValues.top}};if(this.parent.virtualScrollModule&&!this.parent.virtualScrollModule.isHorizontalScroll&&(this.parent.currentAction?(e.scrollTop=g,this.parent.currentAction=null):this.parent.virtualScrollModule.updateVirtualScrollHeight()),this.parent.enablePersistence||this.parent.notify(Ri,{}),this.parent.notify(fn,v),"Month"===this.parent.currentView&&this.parent.showWeekNumber){var b=[].slice.call(this.parent.element.querySelectorAll(".e-content-wrap table tr td:first-child"));[].slice.call(this.parent.element.querySelectorAll("."+Gh)).forEac
1h(function(S,E){var _=b[parseInt(E.toString(),10)].offsetHeight;(0,s.sN)(S,{height:_+"px"})}),this.parent.element.querySelector("."+qh).scrollTop=this.parent.element.querySelector("."+we).scrollTop}}this.parent.renderTemplates()}},i.prototype.renderEventsHandler=function(e,t,n){this.renderedEvents=[];var r,o,l=0;if(n?(l=n.groupIndex,this.cssClass=n.cssClass,this.groupOrder=n.groupOrder,r=this.parent.eventBase.filterEventsByResource(n,this.parent.eventsProcessed),o=this.parent.eventBase.filterEventsByResource(n,this.parent.blockProcessed),this.workCells=[].slice.call(this.element.querySelectorAll("."+ie+'[data-group-index="'+l+'"]'))):(r=this.parent.eventsProcessed,o=this.parent.blockProcessed,this.workCells=[].slice.call(this.element.querySelectorAll("."+ie))),this.sortByDateTime(r),this.sortByDateTime(o),"Month"===this.parent.currentView&&this.parent.rowAutoHeight&&0===this.parent.activeViewOptions.group.resources.length){var h=[].slice.call(this.parent.element.querySelectorAll(".e-content-wrap table tr td:first-child")),d=this.parent.element.querySelector("."+nt).clientHeight/h.length;h.forEach(function(A){(0,s.sN)(A,{height:d+"px"})})}var p=this.workCells[this.parent.activeView.isTimelineView()?0:this.workCells.length-1];this.cellWidth=this.parent.getElementWidth(p),this.cellHeight=this.parent.getElementHeight(p),this.dateRender=e;var u=this.getRenderedDates(e);this.getSlotDates(t||this.parent.activeViewOptions.workDays),this.processBlockEvents(o,l,n);for(var f=[],m=0,g=r;m<g.length;m++){var v=g[m];this.parent.resourceBase&&!n&&(this.cssClass=this.parent.resourceBase.getCssClass(v)),f=f.concat(this.splitEvent(v,u||this.dateRender))}for(var b=0;b<this.slots.length;b++){this.renderedEvents=[];for(var y=this.slots[parseInt(b.toString(),10)],S=K(new Date(y[y.length-1]),1),_=0,T=this.filterEvents(new Date(y[0]),S,f);_<T.length;_++){var I=T[_];
1if(this.maxHeight){var w="Month"===this.parent.currentView?I[this.fields.startTime]:this.getStartTime(I,I.data);if(this.getIndex(w)>0)continue}this.updateIndicatorIcon(I),this.renderEvents(I,l,r)}}this.cssClass=null,this.groupOrder=null},i.prototype.processBlockEvents=function(e,t,n){for(var r=0,o=e;r<o.length;r++){var l=o[r];this.parent.resourceBase&&!n&&(this.cssClass=this.parent.resourceBase.getCssClass(l));var h=[];if("day"!==this.renderType||l[this.fields.isAllDay])h.push(l);else{var u,d=(0,s.X$)({},l,null,!0),p=this.isSameDate(d[this.fields.startTime],d[this.fields.endTime]);d.isBlockIcon=p,!p&&jr(d[this.fields.startTime])>0&&((u=(0,s.X$)({},l,null,!0))[this.fields.endTime]=K(k(new Date(l[this.fields.startTime]+"")),1),u.isBlockIcon=!0,d[this.fields.startTime]=u[this.fields.endTime],h.push(u)),!(p=this.isSameDate(d[this.fields.startTime],d[this.fields.endTime]))&&jr(d[this.fields.endTime])>0&&((u=(0,s.X$)({},l,null,!0))[this.fields.startTime]=k(new Date(l[this.fields.endTime]+"")),u.isBlockIcon=!0,h.push(u),d[this.fields.endTime]=u[this.fields.startTime]),h.push(d)}for(var f=0,m=h;f<m.length;f++)for(var g=m[f],b=0,y=this.splitEvent(g,this.dateRender);b<y.length;b++)this.renderBlockEvents(y[b],t,!!g.isBlockIcon)}},i.prototype.isSameDate=function(e,t){return new Date(+e).setHours(0,0,0,0)===new Date(+t).setHours(0,0,0,0)},i.prototype.renderBlockEvents=function(e,t,n){var r=e.data,o=this.getStartTime(e,r),l=this.getEndTime(e,r),h=this.parent.getIndexOfDate(this.dateRender,k(new Date(o.getTime())));if(!(h<0||o>l)){var d=this.getCellTd(h),p=this.getPosition(o,l,e[this.fields.isAllDay],h);if(n)this.renderBlockIndicator(d,p,t);else{var f=this.getEventWidth(o,l,e[this.fields.isAllDay],r.count);f=f<=0?this.cellWidth:f,f=e.IsBlock?f-1:f;var m=this.parent.enableRtl?0:e.IsBlock?p+1:p,g=this.parent.enableRtl?e.IsBlock?p+1:p:0,v=this.cellHeight-this.monthHeaderHeight;v=e.IsBlock?v-1:v;var b=this.getRowTop(t),y=this.createBlockAppointmentElement(e,t,this.isResourceEventTemplate);(0,s.sN)(y,{width:f+"px",height:v+"px",left:m+"px",right:g+"px",top:b+"px"}),this.renderEventElement(e,y,d)}}},i.prototype.renderBlockIndicator=function(e,t,n){var r=(0,s.n)("div",{className:"e-icons "+Qh});(0,s.hX)(e.querySelector("."+Qh))&&e.appendChild(r)},i.prototype.getStartTime=function(e,t){return e[this.fields.startTime]},i.prototype.getEndTime=function(e,t){return e[this.fields.endTime]},i.prototype.getCellTd=function(e){return this.workCells[parseInt(e.toString(),10)]},i.prototype.getEventWidth=function(e,t,n,r){return r*this.cellWidth-1},i.prototype.getPosition=function(e,t,n,r){return 0},i.prototype.getRowTop=function(e){return 0},i.prototype.updateIndicatorIcon=function(e){if(-1!==this.parent.currentView.indexOf("Timeline")&&"TimelineMonth"!==this.parent.currentView&&!e[this.fields.isAllDay]){var t=e.data,n=this.parent.activeView.getStartHour(),r=this.parent.activeView.getEndHour(),o=Vi(e[this.fields.startTime],n,r),l=Vi(e[this.fields.endTime],n,r),h=t[this.fields.startTime],d=t[this.fields.endTime];if(t.isLeft=t.isLeft||h.getTime()<o.startHour.getTime(),t.isRight=t.isRight||d.getTime()>l.endHour.getTime(),k(h).getTime()!==k(d).getTime()){var p=o.startHour,u=l.endHour,f=new Date(k(h));if(f.setHours(u.getHours(),u.getMinutes(),u.getSeconds()),t.isLeft=t.isLeft||h.getTime()>=(p.getDate()===o.endHour.getDate()?f.getTime():K(f,1).getTime()),d.getTime()!==k(d).getTime()){var m=new Date(k(d));t.isRight=t.isRight||d.getTime()<=m.setHours(p.getHours(),p.getMinutes(),p.getSeconds())}}}},i.prototype.renderResourceEvents=function(){var e=this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.resourceBase.renderedResources;if(this.parent.crudModule&&this.parent.crudModule.crudObj.isCrudAction){for(var t=0,n=this.parent.crudModule.crudObj.sourceEvent.length;t<n;t++){var r=this.parent.crudModule.crudObj.sourceEvent[parseInt(t.toString(),10)];if((!this.parent.uiStateValues.isGroupAdaptive||this.parent.uiStateValues.groupIndex===r.groupIndex&&this.parent.uiStateValues.isGroupAdaptive)&&this.renderEventsHandler(r.renderDates,r.workDays,r),this.parent.crudModule.crudObj.sourceEvent[parseInt(t.toString(),10)].groupIndex!==this.parent.crudModule.crudObj.targetEvent[parseInt(t.toString(),10)].groupIndex){var o=this.parent.crudModule.crudObj.targetEvent[parseInt(t.toString(),10)];this.renderEventsHandler(o.renderDates,o.workDays,o)}}this.parent.crudModule.crudObj.isCrudAction=!1}else for(var l=0,h=e;l<h.length;l++){var d=h[l];this.renderEventsHandler(d.renderDates,d.workDays,d)}},i.prototype.getSlotDates=function(e){this.slots=[];for(var t=this.dateRender.map(function(r){return+r}),n=!this.parent.activeViewOptions.showWeekend||this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.group.hideNonWorkingDays?e.length:7;t.length>0;)this.slots.push(t.splice(0,n))},i.prototype.createAppointmentElement=function(e,t,n){void 0===n&&(n=!1);var r=e[this.fields.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),o=(0,s.X$)({},e,e.data,!0),l={"data-id":"Appointment_"+e[this.fields.id],role:"button",tabindex:"0","aria-disabled":this.parent.eventBase.getReadonlyAttribute(e),"aria-label":this.parent.getAnnouncementString(o,r)};n||(l["data-guid"]=e.Guid),this.parent.activeViewOptions.group.resources.length>0&&(l["data-group-index"]=t.toString());var h=(0,s.n)("div",{className:Ce,attrs:l});(0,s.hX)(this.cssClass)||(0,s.iQ)([h],this.cssClass),e[this.fields.isReadonly]&&(0,s.iQ)([h],"e-read-only");var d=(0,s.n)("div",{className:Jh});h.appendChild(d);var p,u=e.data,f=this.getEventData(e);if((0,s.hX)(this.parent.activeViewOptions.eventTemplate)){var y=e[this.fields.location]||this.parent.eventSettings.fields.location.default||"",S=(0,s.n)("div",{className:Ut});this.parent.sanitize(r+(y?"; "+y:""),S);var E=(0,s.n)("div",{className:vr+(this.parent.isAdaptive?" "+ot:""),innerHTML:this.parent.getTimeString(u[this.fields.startTime])}),_=(0,s.n)("div",{className:vr+(this.parent.isAdaptive?" "+ot:""),innerHTML:this.parent.getTimeString(u[this.fields.endTime])});if("Month"===this.parent.currentView)e[this.fields.isAllDay]?(p=[S],(0,s.iQ)([S],"e-text-center")):u.count<=1&&!u.isLeft&&!u.isRight?p=[E,S]:(p=[],(0,s.iQ)([S],"e-text-center"),u.isLeft||p.push(E),p.push(S),u.isRight||p.push(_));else{var T=void 0;if(e[this.fields.isAllDay])T=[S,(0,s.n)("div",{className:vr,innerHTML:this.parent.localeObj.getConstant("allDay")})];else{var w=this.parent.getTimeString(u[this.fields.startTime])+" - "+this.parent.getTimeString(u[this.fields.endTime]),A=(0,s.n)("div",{className:vr+(this.parent.isAdaptive?" "+ot:""),innerHTML:w}),M=(0,s.n)("div",{className:lo});this.parent.sanitize(y,M),T=[S,A,M]}var D=(0,s.n)("div",{className:"e-inner-wrap"});(0,s.BC)(T,D),p=[D]}}
1else{var v=this.parent.element.id+"_"+this.parent.activeViewOptions.eventTemplateName+"eventTemplate",b=this.isResourceEventTemplate?this.parent.getEventTemplateName(t):"eventTemplate";p=this.parent.getAppointmentTemplate()(f,this.parent,b,v,!1,void 0,void 0,this.parent.root)}return(0,s.BC)(p,d),this.appendEventIcons(e,d),this.renderResizeHandler(h,e.data,e[this.fields.isReadonly]),h},i.prototype.appendEventIcons=function(e,t){var n=e.data;if((0,s.hX)(e[this.fields.recurrenceRule])&&(0,s.hX)(e[this.fields.recurrenceID])||t.appendChild((0,s.n)("div",{className:Nt+" "+(e[this.fields.id]===e[this.fields.recurrenceID]?Ml:Ll)+(this.parent.isAdaptive?" "+ot:"")})),n.isLeft){var o=(0,s.n)("div",{className:id+" "+Nt+" "+Lb});(0,s.Hs)([o],t)}if(n.isRight){var l=(0,s.n)("div",{className:id+" "+Nt+" "+Rb});(0,s.BC)([l],t)}},i.prototype.renderEvents=function(e,t,n){var r=e[this.fields.startTime],o=e[this.fields.endTime],l=this.parent.getIndexOfDate(this.dateRender,k(r));if(!(l<0||r.getTime()<this.parent.minDate.getTime()||o.getTime()>this.parent.maxDate.getTime())){var h=this.parent.rowAutoHeight?1:this.parent.activeViewOptions.maxEventsPerRow,d=this.getIndex(r);e.Index=d;var p=e.data.count;if(r.getTime()<=o.getTime()){var u=p*this.cellWidth-5,f=this.workCells[parseInt(l.toString(),10)],m=d*(this.eventHeight+0),g=this.monthHeaderHeight+(d+1)*(this.eventHeight+0)+this.moreIndicatorHeight;if(this.parent.rowAutoHeight||(!this.parent.activeViewOptions.maxEventsPerRow||this.parent.rowAutoHeight||this.parent.eventSettings.enableIndicator?this.maxOrIndicator?d<1:this.cellHeight>g:d<h)){this.renderedEvents.push((0,s.X$)({},e,null,!0));var b;if(b=this.inlineValue?this.parent.inlineModule.createInlineAppointmentElement():this.createAppointmentElement(e,t),this.applyResourceColor(b,e,"backgroundColor",this.groupOrder),this.wireAppointmentEvents(b,e),(0,s.sN)(b,{width:u+"px",top:m+"px"}),this.renderEventElement(e,b,f),this.parent.rowAutoHeight){var y=this.parent.element.querySelector("."+we),S=this.parent.getElementWidth(y),E=y.offsetHeight===y.clientHeight&&y.offsetWidth===y.clientWidth;this.updateCellHeight(f.parentElement.firstElementChild,g),E&&(y.offsetWidth>y.clientWidth||S!==this.parent.getElementWidth(y))&&this.adjustAppointments(S)}}else for(var T=0;T<p;T++)if(this.workCells[l+T]){var I=this.workCells[l+T].querySelector("."+Fi);if(I){var w=parseInt(I.getAttribute("data-count"),10)+1;I.setAttribute("data-count",w.toString()),I.setAttribute("aria-label",w+" "+this.parent.localeObj.getConstant("moreEvents")),I.innerHTML=this.getMoreIndicatorText(w)}else{var A=new Date(this.dateRender[l+T].getTime()),M=K(this.dateRender[l+T],1),D=this.workCells[l+T].getAttribute("data-group-index"),L=this.getMoreIndicatorElement(1,A,M);(0,s.hX)(D)||L.setAttribute("data-group-index",D),L.style.top=this.cellHeight-this.monthHeaderHeight-this.moreIndicatorHeight+"px",L.style.width=this.cellWidth-2+"px",this.renderElement(this.workCells[l+T],L),s.Jm.add(L,"click",this.moreIndicatorClick,this)}}}}},i.prototype.adjustAppointments=function(e){var t=this,n=this.parent.element.querySelector("."+nt+" tbody tr"),r=this.parent.getElementWidth(this.workCells[0]);this.cellWidth=r/+(this.workCells[0].getAttribute("colspan")||1);var o=r*n.children.length/(e/100);[].slice.call(this.parent.element.querySelectorAll("."+Ce)).forEach(function(h){t.parent.enableRtl&&"0px"!==h.style.right?h.style.right=parseFloat(h.style.right)/100*o+"px":"0px"!==h.style.left&&(h.style.left=parseFloat(h.style.left)/100*o+"px"),h.style.width=parseFloat(h.style.width)/100*o+"px"})},i.prototype.updateCellHeight=function(e,t){t>e.offsetHeight&&(0,s.sN)(e,{height:t+"px"})},i.prototype.updateBlockElements=function(){for(var t=0,n=[].slice.call(this.element.querySelectorAll("."+ma));t<n.length;t++){var r=n[t],o=(0,s.kp)(r,"tr");this.monthHeaderHeight=r.offsetParent.offsetTop-o.offsetTop,r.style.height=o.offsetHeight-1-this.monthHeaderHeight+"px";var l=o.firstElementChild,h=Math.round(r.offsetWidth/l.offsetWidth);r.style.width=l.offsetWidth*h+"px"}},i.prototype.getFilteredEvents=function(e,t,n,r){var o;if((0,s.hX)(n))o=this.filterEvents(e,t);else{var l=this.parent.resourceBase.lastResourceLevel[parseInt(n,10)];o=this.filterEvents(e,t,(0,s.hX)(r)?void 0:r,l)}return o},i.prototype.getOverlapEvents=function(e,t){for(var n=[],r=k(e).getTime(),o=0,l=t;o<l.length;o++){var h=l[o];k(h[this.fields.startTime]).getTime()<=r&&k(h[this.fields.endTime]).getTime()>=r&&n.push(h)}return n},i.prototype.getIndex=function(e){var t=-1,n=this.renderedEvents;if(n.length>0){var o=this.getOverlapEvents(e,n).map(function(l){return l.Index});t=o.length>
10?this.getSmallestMissingNumber(o):0}return-1===t?0:t},i.prototype.moreIndicatorClick=function(e){var t=this,n=(0,s.kp)(e.target,"."+Fi),r=new Date(parseInt(n.getAttribute("data-start-date"),10)),o=new Date(parseInt(n.getAttribute("data-end-date"),10)),l=n.getAttribute("data-group-index"),h={cancel:!1,event:e,element:n,isPopupOpen:!0,startTime:r,endTime:o,viewName:this.parent.getNavigateView()};l&&(h.groupIndex=parseInt(l,10)),this.parent.trigger("moreEventsClick",h,function(d){if(!d.cancel)if(d.isPopupOpen){var p=t.getFilteredEvents(r,o,l);t.parent.quickPopup.moreEventClick({date:r,event:p,element:e.target},o,l)}else t.parent.setProperties({selectedDate:r},!0),t.parent.changeView(d.viewName,e)})},i.prototype.renderEventElement=function(e,t,n){var r=this,o=t.classList.contains(ma)?"blockEvent":"event",l=t.classList.contains(Ce),h="Month"===this.parent.currentView?this.getSpannedTime(e):this.getEventData(e);this.parent.trigger(oa,{data:h,element:t,cancel:!1,type:o},function(p){p.cancel?r.renderedEvents.pop():r.renderElement(n,t,l)})},i.prototype.getSpannedTime=function(e){var t=(0,s.X$)({},e,null,!0);return t[this.fields.startTime].getDate()===t.data[this.fields.startTime].getDate()&&(t[this.fields.startTime]=t.data[this.fields.startTime]),t[this.fields.endTime].getDate()===t.data[this.fields.endTime].getDate()&&(t[this.fields.endTime]=t.data[this.fields.endTime]),t},i.prototype.getEventData=function(e){var t=(0,s.X$)({},e,null,!0);return t[this.fields.startTime]=e.data[this.fields.startTime],t[this.fields.endTime]=e.data[this.fields.endTime],t},i.prototype.renderElement=function(e,t,n){void 0===n&&(n=!1),this.maxOrIndicator&&n&&this.setMaxEventHeight(t,e);var r=e.querySelector("."+Ct);if(r)r.appendChild(t);else{var o=(0,s.n)("div",{className:Ct});o.appendChild(t),e.appendChild(o)}},i.prototype.getMoreIndicatorElement=function(e,t,n){return(0,s.n)("div",{className:Fi,innerHTML:this.getMoreIndicatorText(e),attrs:{role:"button",tabindex:"0","aria-label":this.parent.globalize.formatNumber(e)+" "+this.parent.localeObj.getConstant("moreEvents"),"data-count":e.toString(),"data-start-date":t.getTime().toString(),"data-end-date":n.getTime().toString()}})},i.prototype.getMoreIndicatorText=function(e){return"+"+this.parent.globalize.formatNumber(e)+"&nbsp;"+(this.parent.isAdaptive?"":this.parent.localeObj.getConstant("more"))},i.prototype.removeHeightProperty=function(e){for(var n=0,r=[].slice.call(this.element.querySelectorAll("."+e+" tbody tr"));n<r.length;n++)r[n].firstElementChild.style.height=""},i.prototype.setMaxEventHeight=function(e,t){var n=sf(t.querySelector("."+ga));(0,s.sN)(e,{height:t.offsetHeight-n-(this.maxHeight?0:this.moreIndicatorHeight)+"px","align-items":"center"})},i.prototype.destroy=function(){this.element=null,this.fields=null,this.maxHeight=null,this.withIndicator=null,this.maxOrIndicator=null,this.moreIndicatorHeight=null,this.removeEventListener(),a.prototype.destroy.call(this)},i}(Zf),Fw=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Ca=function(a){function i(e,t){var n=a.call(this,e)||this;n.startHour=n.parent.activeView.getStartHour(),n.endHour=n.parent.activeView.getEndHour(),n.slotCount=n.parent.activeViewOptions.timeScale.slotCount,n.interval=n.parent.activeViewOptions.timeScale.interval,n.day=0,n.rowIndex=0,n.cellTops=[],n.renderType=t,n.eventContainers=[].slice.call(n.element.querySelectorAll("."+mn));var r=[].slice.call(n.element.querySelectorAll("."+nt+" tbody tr"));return n.dayLength=0===r.length?0:r[0].children.length,n.content=n.parent.element.querySelector("."+lf+"."+nt),n}return Fw(i,a),i.prototype.getSlotDates=function(){if(this.slots=[],this.slots.push(this.parent.activeView.renderDates.map(function(t){return+t})),this.parent.activeViewOptions.headerRows.length>0&&"Hour"!==this.parent.activeViewOptions.headerRows.slice(-1)[0].option){this.renderType="day";var e=this.content.querySelector("."+ie);this.cellWidth=this.parent.getElementWidth(e)/+(e.getAttribute("colspan")||1),this.slotsPerDay=1}else this.slotsPerDay=this.dayLength/this.dateRender.length},i.prototype.getOverlapEvents=function(e,t){var n=[];if("day"===this.renderType)for(var r=0,o=t;r<o.length;r++)k((l=o[r])[this.fields.startTime]).getTime()<=k(new Date(e.getTime())).getTime()&&k(l[this.fields.endTime]).getTime()>=k(new Date(e.getTime())).getTime()&&n.push(l);else for(var h=0,d=t;h<d.length;h++){var l,p=(l=d[h]).data;(p.trimStartTime.getTime()<=e.getTime()&&p.trimEndTime.getTime()>e.getTime()||p.trimStartTime.getTime()===e.getTime()&&p.trimEndTime.getTime()===e.getTime())&&n.push(l)}return n},i.prototype.getSortComparerIndex=function(e,t){var n=-1,r=this.renderedEvents;if(r.length>0){var l=this.getOverlapSortComparerEvents(e,t,r).map(function(h){return h.Index});n=l.length>
10?this.getSmallestMissingNumber(l):0}return-1===n?0:n},i.prototype.getOverlapSortComparerEvents=function(e,t,n){for(var r=[],o=function(u){if("day"===l.renderType){var f=k(e).getTime(),m=k(t).getTime(),g=k(u[l.fields.startTime]).getTime(),v=k(u[l.fields.endTime]).getTime();(g<=f&&v>=f||v>=(S=f>(S=m-(jr(t)<=0?bt:0))?f:S)&&g<=S||g>f&&v<m)&&r.push(u)}else{var y=u.data;(y.trimStartTime.getTime()<=e.getTime()&&e.getTime()<y.trimEndTime.getTime()||e.getTime()<=y.trimStartTime.getTime()&&y.trimStartTime.getTime()<t.getTime())&&r.push(u)}var S},l=this,h=0,d=n;h<d.length;h++)o(d[h]);return r},i.prototype.renderResourceEvents=function(){this.removeHeightProperty(_s),this.addCellHeight("."+_s+" tbody tr",this.eventHeight,2,this.moreIndicatorHeight,0,!1);var t=this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.resourceBase.renderedResources;if(this.parent.crudModule&&this.parent.crudModule.crudObj.isCrudAction){for(var n=0,r=this.parent.crudModule.crudObj.sourceEvent.length;n<r;n++){var o=this.parent.crudModule.crudObj.sourceEvent[parseInt(n.toString(),10)];if(this.rowIndex=o.groupIndex,(!this.parent.uiStateValues.isGroupAdaptive||this.parent.uiStateValues.groupIndex===o.groupIndex&&this.parent.uiStateValues.isGroupAdaptive)&&this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays,o),this.parent.crudModule.crudObj.targetEvent[parseInt(n.toString(),10)]&&this.parent.crudModule.crudObj.sourceEvent[parseInt(n.toString(),10)].groupIndex!==this.parent.crudModule.crudObj.targetEvent[parseInt(n.toString(),10)].groupIndex){var l=this.parent.crudModule.crudObj.targetEvent[parseInt(n.toString(),10)];this.rowIndex=l.groupIndex,this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays,l)}}this.parent.crudModule.crudObj.isCrudAction=!1}else for(n=0;n<t.length;n++)this.rowIndex=n,this.renderEventsHandler(this.parent.activeView.renderDates,this.parent.activeViewOptions.workDays,t[parseInt(n.toString(),10)])},i.prototype.renderEvents=function(e,t,n){var r=e[this.fields.startTime],o=e[this.fields.endTime];if(!(r.getTime()<this.parent.minDate.getTime()||o.getTime()>this.parent.maxDate.getTime())){var l=e.data;r=this.getStartTime(e,l),o=this.getEndTime(e,l);var h=Vi(e[this.fields.startTime],this.startHour,this.endHour),d=this.updateEventMinimumDuration(h,r,o);if(r=d.startDate,o=d.endDate,this.day=this.parent.getIndexOfDate(this.dateRender,k(new Date(r.getTime()))),!(this.day<0)){var p=this.getCellTd(),u=this.parent.rowAutoHeight?1:this.parent.activeViewOptions.maxEventsPerRow,f=(0,s.hX)(this.parent.eventSettings.sortComparer)?this.getIndex(r):this.getSortComparerIndex(r,o);e.Index=f;var m=this.eventHeight,g=l.count,v=(0,s.X$)({},e,null,!0);v[this.fields.startTime]=l[this.fields.startTime],v[this.fields.endTime]=l[this.fields.endTime];var S,y=Vi(k(new Date(this.dateRender[this.day].getTime())),this.startHour,this.endHour);if(S=!(!this.isDayProcess()&&!v[this.fields.isAllDay])||this.isValidEvent(v,r,o,y),r<=o&&S){var E=this.getEventWidth(r,o,e[this.fields.isAllDay],g);E="day"===this.renderType?E-2:E;var _,T,I=this.getPosition(r,o,e[this.fields.isAllDay],this.day);E=E<=0?this.cellWidth:E,this.renderedEvents.push((0,s.X$)({},e,null,!0)),(0,s.hX)(this.cellTops[parseInt(t.toString(),10)])&&(this.cellTops[parseInt(t.toString(),10)]=this.getRowTop(t));var w=this.cellTops[parseInt(t.toString(),10)],A=w+(this.maxHeight?0:2)+f*(m+2);_=this.parent.enableRtl?0:I,T=this.parent.enableRtl?I:0;var M=(f+1)*(m+2)+this.moreIndicatorHeight;if(this.parent.rowAutoHeight||(!this.parent.activeViewOptions.maxEventsPerRow||this.parent.rowAutoHeight||this.parent.eventSettings.enableIndicator?this.maxOrIndicator?f<1:this.cellHeight>M:f<u)){var L;if(L=(0,s.hX)(this.inlineValue)?this.createAppointmentElement(e,t):this.parent.inlineModule.createInlineAppointmentElement(),this.applyResourceColor(L,e,"backgroundColor",this.groupOrder),(0,s.sN)(L,{width:E+"px",left:_+"px",right:T+"px",to
1p:A+"px"}),this.wireAppointmentEvents(L,e),this.parent.rowAutoHeight){var V=this.parent.element.querySelector("."+we),G=this.parent.getElementWidth(V),W=V.offsetHeight===V.clientHeight&&V.offsetWidth===V.clientWidth;this.renderEventElement(e,L,p);var te=this.getFirstChild(t);this.updateCellHeight(te,M),W&&(V.offsetWidth>V.clientWidth||G!==this.parent.getElementWidth(V))&&this.adjustAppointments(G)}else this.renderEventElement(e,L,p)}else for(var $=0;$<g;$++){var Se=p.querySelector("."+Fi),Ie=this.parent.enableRtl?T:_;Ie=Math.floor(Ie/this.cellWidth)*this.cellWidth;var Re=this.interval/this.slotCount,Ne="TimelineMonth"===this.parent.activeViewOptions.option||"day"===this.renderType||0!==$?new Date(this.dateRender[this.day+$].getTime()):new Date(r),de=K(this.dateRender[this.day+$],1);if("TimelineMonth"===this.parent.activeViewOptions.option||"day"===this.renderType){var At=this.getPosition(Ne,de,e[this.fields.isAllDay],this.day+$);this.renderTimelineMoreIndicator(r,Ne,de,m,Re,t,n,w,_,T,p,Se,Ie,At)}else for(var _t=(Bt(o)-Bt(r))/wt*this.slotCount/this.interval,ut=0;ut<_t&&(Ne=0===ut?new Date(Ne.getTime()):new Date(Ne.getTime()+6e4*Re),_t<1&&(Ne=this.adjustToNearestTimeSlot(Ne,Re)),de=new Date(Ne.getTime()+6e4*Re),!(_t>=1&&de.getTime()>o.getTime()));ut++){var Vt=this.getPosition(Ne,de,!1,this.day+$);if(Ie>Vt)break;this.renderTimelineMoreIndicator(r,Ne,de,m,Re,t,n,w,_,T,p,Se,Ie=Vt,Vt)}}}this.parent.renderTemplates()}}},i.prototype.adjustToNearestTimeSlot=function(e,t){var n=new Date(e),r=60*n.getHours()*60*1e3+60*n.getMinutes()*1e3,o=Math.floor(r/(60*t*1e3))*(60*t*1e3),l=new Date(n.getTime());return l.setHours(o/36e5%24),l.setMinutes(o%36e5/6e4),l},i.prototype.renderTimelineMoreIndicator=function(e,t,n,r,o,l,h,d,p,u,f,m,g,v){if(p=this.parent.enableRtl?u=v:v,g=this.parent.enableRtl?u:p,g=Math.floor(g/this.cellWidth)*this.cellWidth,f&&(0,s.hX)(m)||!this.isAlreadyAvail(g,f)){var b="TimelineMonth"===this.parent.activeViewOptions.option||"day"===this.renderType?new Date(+e):t,y=new Date(b.setMinutes(Math.floor(b.getMinutes()/o)*o)),S=new Date(y.getTime()+6e4*o),E=void 0;this.parent.activeViewOptions.group.resources.length>0&&!(0,s.hX)(l)&&(E=l.toString());var _=this.getFilterEvents(t,n,y,S,E,h),T=this.cellHeight-this.moreIndicatorHeight;r=this.withIndicator?T-2:r;var I=Math.floor(T/(r+2)),w=this.parent.activeViewOptions.maxEventsPerRow&&!this.parent.eventSettings.enableIndicator?_.length-this.parent.activeViewOptions.maxEventsPerRow:_.length-I<=0?1:_.length-I,A=void 0;A="day"===this.renderType?this.getMoreIndicatorElement(w,t,n):this.getMoreIndicatorElement(w,y,S),(0,s.hX)(E)||A.setAttribute("data-group-index",E),A.style.top=d+T+"px",A.style.width=this.cellWidth+"px",A.style.left=Math.floor(p/this.cellWidth)*this.cellWidth+"px",A.style.right=Math.floor(u/this.cellWidth)*this.cellWidth+"px",this.renderElement(f,A),s.Jm.add(A,"click",this.moreIndicatorClick,this)}},i.prototype.updateCellHeight=function(e,t){if(t>(""===e.style.height?this.cellHeight:parseInt(e.style.height,10))){if((0,s.sN)(e,{height:t+"px"}),this.parent.activeViewOptions.group.resources.length>0){var r=this.parent.element.querySelector("."+_s+' tbody td[data-group-index="'+e.getAttribute("data-group-index")+'"]');r&&(0,s.sN)(r,{height:t+"px"})}var o=this.parent.element.querySelector(".e-month-header-wrapper table tr:nth-child("+(e.parentElement.rowIndex+1)+") td");o&&(0,s.sN)(o,{height:t+"px"})}},i.prototype.getFirstChild=function(e){var t="."+nt+" tbody td",n="";return this.parent.activeViewOptions.group.resources.length>0&&(n='[data-group-index="'+e.toString()+'"]'),this.parent.element.querySelector(t+n)},i.prototype.updateBlockElements=function(){for(var t=0,n=[].slice.call(this.element.querySelectorAll("."+ma));t<n.length;t++){var r=n[t],o=parseInt(r.getAttribute("data-group-index"),10),l=this.getFirstChild(o);r.style.height=l.offsetHeight-1+"px",r.style.width=l.offsetWidth*(r.offsetWidth/l.offsetWidth)+"px"}for(var p=0,u=[].slice.call(this.element.querySelectorAll("."+Qh));p<u.length;p++)r=u[p],o=parseInt(r.getAttribute("data-group-index"),10),r.style.top=this.getRowTop(o)+this.getFirstChild(o).offsetHeight-18+"px"},i.prototype.getStartTime=function(e,t){var n=e[this.fields.startTime],r=Vi(n,this.startHour,this.endHour);return n=this.isDayProcess()?e[this.fields.startTime]:r.startHour.getTime()>=t[this.fields.startTime]?r.startHour:r.endHour.getTime()<=t[this.fields.startTime]?this.getNextDay(r.startHour,t):t[this.fields.startTime],t.trimStartTime=e[this.fields.isAllDay]?r.startHour:t[this.fields.startTime],n},i.prototype.getNextDay=function(e,t){for(var n,r=1;r<=this.dateRender.length;r++)if(n=K(e,r),-1!==this.parent.getIndexOfDate(this.dateRender,k(new Date(e.getTime()))))return t.count=t.count-1,n;return n},i.prototype.getEndTime=function(e,t){var n=e[this.fields.endTime],r=Vi(n,this.startHour,this.endHour);return this.isDayProcess()?n=t[this.fields.endTime]:(n=t[this.fields.endTime],(r.endHour.getTime()<=t[this.fields.endTime]||e[this.fields.isAllDay])&&(n=r.endHour),r.startHour.getTime()>=t[this.fields.endTime].getTime()&&!e[this.fields.isAllDay]&&(n=this.getPreviousDay(r.startHour,r.endHour,t))),t.trimEndTime=e[this.fields.isAllDay]?r.endHour:t[this.fields.endTime],n},i.prototype.getPreviousDay=function(e,t,n){for(var r=1;r<=this.dateRender.length;r++){var o=K(t,-r);if(-1!==this.parent.getIndexOfDate(this.dateRender,k(new Date(e.getTime())))){(o=k(new Date(o.getTime()))).setHours(t.getHours(),t.getMinutes(),t.getSeconds());var l=n.count,h=n[this.fields.endTime];return n.count=0!==h.getHours()||0!==h.getMinutes()?l-1:l,o}}return n[this.fields.endTime]},i.prototype.getEventWidth=function(e,t,n,r){return"day"===this.renderType||n?r*this.slotsPerDay*this.cellWidth:this.isSameDay(e,t)?this.get
1SameDayEventsWidth(e,t):this.getSpannedEventsWidth(e,t,r)},i.prototype.getSameDayEventsWidth=function(e,t){return(Bt(t)-Bt(e))/wt*(this.cellWidth*this.slotCount)/this.getIntervalInMinutes(e)},i.prototype.getSpannedEventsWidth=function(e,t,n){var o,r=n*this.slotsPerDay*this.cellWidth,l=Vi(k(new Date(e.getTime())),this.startHour,this.endHour),h=this.getSameDayEventsWidth(l.startHour,e);if(-1===this.parent.getIndexOfDate(this.dateRender,k(new Date(t.getTime()))))o=0;else{var d=Vi(k(new Date(t.getTime())),this.startHour,this.endHour),u=d.endHour,m=this.getEndTimeOfLastSlot(d.startHour,u,this.interval/this.slotCount);o=this.getSameDayEventsWidth(t,u<m?u:m),o=this.slotsPerDay*this.cellWidth===o?0:o}var v=h+o;return r>v?r-v:r-h},i.prototype.getEndTimeOfLastSlot=function(e,t,n){var r=(t.getTime()-e.getTime())/6e4,o=Math.floor(r/n)*n,l=new Date(e);return l.setMinutes(o),l},i.prototype.isSameDay=function(e,t){return this.parent.getIndexOfDate(this.dateRender,k(new Date(e.getTime())))===this.parent.getIndexOfDate(this.dateRender,k(new Date(t.getTime())))},i.prototype.getAppointmentLeft=function(e,t,n){var r=this.isSameDay(t,e.startHour)?(Bt(t)-Bt(e.startHour))/(wt*this.getIntervalInMinutes(t))*this.slotCount:0;return 0===n?r:Math.round((Bt(e.endHour)-Bt(e.startHour))/this.interval/wt*this.slotCount)*n+r},i.prototype.getPosition=function(e,t,n,r){if("day"===this.renderType||n)return r*this.slotsPerDay*this.cellWidth;var l=Vi(k(new Date(this.dateRender[parseInt(r.toString(),10)].getTime())),this.startHour,this.endHour);return(l.endHour.getTime()<=t.getTime()&&l.startHour.getTime()>=e.getTime()?this.getAppointmentLeft(l,l.startHour,r):l.endHour.getTime()<=t.getTime()?this.getAppointmentLeft(l,e,r):l.startHour.getTime()>=e.getTime()?this.getAppointmentLeft(l,l.startHour,r):this.getAppointmentLeft(l,e,r))*this.cellWidth},i.prototype.getFilterEvents=function(e,t,n,r,o,l){return"day"===this.renderType?this.getFilteredEvents(e,t,o,l):this.getFilteredEvents(n,r,o,l)},i.prototype.getIntervalInMinutes=function(e){if(1!==this.slotsPerDay)return this.interval;var t=Vi(k(new Date(e.getTime())),this.startHour,this.endHour);return(t.endHour.getTime()-t.startHour.getTime())/wt},i.prototype.isAlreadyAvail=function(e,t){for(var n=[].slice.call(t.querySelectorAll("."+Fi)),r=0;r<n.length;r++){var o=void 0;if(n&&(o=this.parent.enableRtl?n[parseInt(r.toString(),10)].style.right:n[parseInt(r.toString(),10)].style.left),parseInt(o,10)===Math.floor(e))return!0}return!1},i.prototype.getRowTop=function(e){return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.parent.element.querySelector("."+we+' tbody td[data-group-index="'+e.toString()+'"]').offsetTop:0},i.prototype.getCellTd=function(){return this.eventContainers[parseInt((this.parent.uiStateValues.isGroupAdaptive?0:this.rowIndex).toString(),10)]},i.prototype.renderBlockIndicator=function(e,t,n){if(!(this.parent.headerRows.length>0&&("Hour"!==this.parent.headerRows[this.parent.headerRows.length-1].option||"Date"!==this.parent.headerRows[this.parent.headerRows.length-1].option)||(t=Math.floor(t/this.cellWidth)*this.cellWidth+this.cellWidth-22,this.isAlreadyAvail(t,e)))){var r=(0,s.n)("div",{className:"e-icons "+Qh});this.parent.activeViewOptions.group.resources.length>0&&r.setAttribute("data-group-index",n.toString()),this.parent.enableRtl?r.style.right=t+"px":r.style.left=t+"px",r.style.top=this.getRowTop(n)+this.cellHeight-18+"px",this.renderElement(e,r)}},i.prototype.setMaxEventHeight=function(e,t){(0,s.sN)(e,{height:this.cellHeight-(this.maxHeight?0:2)-(this.maxHeight?0:this.moreIndicatorHeight)+"px"})},i.prototype.isDayProcess=function(){return"TimelineMonth"===this.parent.currentView||!this.parent.activeViewOptions.timeScale.enable||this.parent.activeViewOptions.headerRows.length>0&&"Hour"!==this.parent.activeViewOptions.headerRows.slice(-1)[0].option},i.prototype.destroy=function(){this.renderType=null,this.eventContainers=null,this.dayLength=null,this.content=null,a.prototype.destroy.call(this),this.parent=null},i}(Sa),Hw=function(){function a(i){this.parent=i,this.parent.on(aa,this.inlineEdit,this)}return a.prototype.inlineEdit=function(i){if(this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(),"Cell"===i.type){var e=this.parent.element.querySelector("."+Sr);e&&e.classList.contains(Qt)&&this.parent.quickPopup.morePopup.hide(),this.removeInlineAppointmentElement(),this.cellEdit(i)}else this.parent.element.querySelector("."+an)!==i.element.querySelector("."+an)&&this.removeInlineAppointmentElement(),this.eventEdit(i)},a.prototype.cellEdit=function(i){var e=this.generateEventData(),t=i.element.cellIndex,n=this.getEventDaysCount(e);n>1&&(n=Math.round(n),t-=--n);var r=k(new Date(""+e[this.parent.eventFields.startTime])).getTime(),o=k(new Date(""+e[this.parent.eventFields.endTime])).getTime(),l=i.groupIndex||0,h="Day"===this.parent.currentView||"Week"===this.parent.currentView||"WorkWee
1k"===this.parent.currentView;if(this.parent.activeViewOptions.timeScale.enable&&h){var d=e[this.parent.eventFields.startTime].getDay();this.createVerticalViewInline(e,d,l,t)}else"Month"===this.parent.currentView||!this.parent.activeViewOptions.timeScale.enable&&h?this.createMonthViewInline(e,l,r,o):this.createTimelineViewInline(e,r,o,l);var p=this.parent.element.querySelector("."+an);p&&p.focus()},a.prototype.eventEdit=function(i){var t,e=i.element.querySelector("."+an);if(e)t=e.value;else{var n=i.element.querySelector("."+Ut);if((0,s.hX)(n)?t=i.data[this.parent.eventFields.subject]:((0,s.iQ)([n],ot),t=n.innerText),e=this.inlineInputEle=(0,s.n)("input",{className:an,attrs:{value:t}}),(0,s.kp)(i.element,"."+Sr))i.element.insertBefore(e,n);else if(["Agenda","MonthAgenda"].indexOf(this.parent.currentView)>-1){var r=i.element.querySelector("."+Kh);(0,s.hX)(r)&&(r=(0,s.n)("div",{className:Kh}),i.element.prepend(r)),r.insertBefore(e,r.firstChild)}else{var o=["TimelineDay","TimelineWeek","TimelineWorkWeek","TimelineMonth"].indexOf(this.parent.currentView)>-1?".e-inner-wrap":".e-appointment-details",l=i.element.querySelector(o);(0,s.hX)(l)?i.element.querySelector(".e-appointment-details").prepend(e):l.prepend(e)}e.focus()}e.setSelectionRange(t.length,t.length)},a.prototype.createVerticalViewInline=function(i,e,t,n){var r,o=this.getEventDaysCount(i),l=new em(this.parent);l.initializeValues();var h=l.dateRender[parseInt(t.toString(),10)].map(function(m){return m.getDay()}).indexOf(e);if(o>=1){l.allDayElement=[].slice.call(this.parent.element.querySelectorAll("."+it)),(r=l.slots).push.apply(r,this.parent.activeView.renderDates.map(function(m){return+m}));var d=[].slice.call(this.parent.element.querySelectorAll("."+wi)),p=0;d.length>0&&(p=Math.floor(this.parent.getElementHeight(this.parent.element.querySelector("."+mr))/d[0].offsetHeight)-1),l.allDayLevel=p;var u=this.parent.getElementHeightFromClass(this.parent.element.querySelector("."+gn),Ce);l.renderAllDayEvents(i,h,t,n,this.parent.allowInline,l.allDayElement.length>0?l.allDayElement[0].offsetTop:0,u)}else l.renderNormalEvents(i,h,t,n,this.parent.allowInline)},a.prototype.createMonthViewInline=function(i,e,t,n){var r=this.getEventDaysCount(i),o=this.parent.eventBase.cloneEventObject(i,t,n,r,!1,!1),l=new Sa(this.parent);l.dateRender=this.parent.activeView.renderDates,l.inlineValue=this.parent.allowInline;var h=this.parent.activeView.renderDates,d=this.parent.activeViewOptions.workDays,p="."+ie;if(this.parent.activeViewOptions.group.resources.length>0){p+='[data-group-index="'+e+'"]';var u=this.parent.resourceBase.lastResourceLevel[parseInt(e.toString(),10)];h=u.renderDates,d=u.workDays}l.dateRender=h,l.workCells=[].slice.call(this.parent.element.querySelectorAll(p)),l.cellWidth=l.workCells[0].offsetWidth,l.cellHeight=l.workCells[0].offsetHeight,l.eventHeight=this.parent.getElementHeightFromClass(this.parent.monthModule.element||l.element,Ce),l.getSlotDates(d);for(var f=l.getRenderedDates(h),g=0,v=l.splitEvent(o,f||h);g<v.length;g++)l.renderEvents(v[g],e);this.parent.element.querySelector("."+an).focus()},a.prototype.createTimelineViewInline=function(i,e,t,n){var r=this.getEventDaysCount(i),o=this.parent.eventBase.cloneEventObject(i,e,t,r,!1,!1),l=new Ca(this.parent,this.parent.activeViewOptions.timeScale.enable?"hour":"day");l.dateRender=this.parent.activeView.renderDates,l.eventContainers=[].slice.call(this.parent.element.querySelectorAll("."+mn));var h=this.parent.element.querySelector("."+ie);l.inlineValue=this.parent.allowInline,l.cellWidth=h.offsetWidth,l.cellHeight=h.offsetHeight;var d=0===this.parent.element.querySelectorAll("."+nt+" tbody tr").length?0:this.parent.element.querySelectorAll("."+nt+" tbody tr")[0].children.length;l.slotsPerDay=d/l.dateRender.length,l.eventHeight=this.parent.getElementHeightFromClass(l.element,Ce),l.renderEvents(o,n)},a.prototype.getEventDaysCount=function(i){var e=i[this.parent.eventFields.startTime];return Math.abs(i[this.parent.eventFields.endTime].getTime()-e.getTime())/bt},a.prototype.generateEventData=function(i){var e=this.parent.element.querySelector("."+an),t=e?e.value:i?i.innerHTML:"",n={};return n[this.parent.eventFields.id]=this.parent.eventBase.getEventMaxID(),n[this.parent.eventFields.subject]=t,n[this.parent.eventFields.startTime]=this.parent.activeCellsData.startTime,n[this.parent.eventFields.endTime]=this.parent.activeCellsData.endTime,n[this.parent.eventFields.isAllDay]=this.parent.activeCellsData.isAllDay,this.parent.eventWindow.setDefaultValueToObject(n),this.parent.resourceBase&&this.parent.resourceBase.setResourceValues(n,this.parent.activeCellsData.groupIndex),n},a.prototype.documentClick=function(i){i&&""!==i.value?this.inlineCrudActions(i):this.removeInlineAppointmentElement()},a.prototype.inlineCrudActions=function(i){if((0,s.kp)(i,"."+$l)){var e=this.generateEventData(i);this.parent.addEvent(e)}else{var t=(0,s.kp)(i,"."+Ce),n=this.parent.getEventDetails(t);n[this.parent.eventFields.subject]=i.value;var r=void 0;n[this.parent.eventFields.id]===n[this.parent.eventFields.recurrenceID]&&(r="EditOccurrence",n[this.parent.eventFields.id]=this.parent.eventBase.getEventMaxID()),this.parent.saveEvent(n,r)}this.removeInlineAppointmentElement()},a.prototype.createInlineAppointmentElement=function(i){var e=(0,s.n)("div",{className:Ce+" "+$l}),t=(0,s.n)("div",{className:Jh});e.appendChild(t);
1var n=this.inlineInputEle=(0,s.n)("input",{className:an});return t.appendChild(n),i&&this.parent.eventBase.applyResourceColor(e,i,"backgroundColor"),e},a.prototype.removeInlineAppointmentElement=function(){var i=[].slice.call(this.parent.element.querySelectorAll("."+$l));i.length>0&&i.forEach(function(r){var o=r.querySelector("."+an);(0,s.hX)(o)||o.blur(),(0,s.TF)(r)});var e=this.getInlineElement();if(e){var n=(0,s.kp)(e,"."+Ce).querySelector("."+Ut);(0,s.hX)(n)||(0,s.vy)([n],ot),(0,s.TF)(e)}this.inlineInputEle=null},a.prototype.getInlineElement=function(){return this.inlineInputEle},a.prototype.destroy=function(){this.inlineInputEle=null,this.parent.off(aa,this.inlineEdit)},a}(),Oy=function(){function a(){}return a.prototype.renderFormValidator=function(i,e,t,n){var r=this;this.element=t,this.formObj=new J.tL(i,{locale:n,customPlacement:function(o,l){r.errorPlacement(o,l)},rules:e,validationComplete:function(o){r.validationComplete(o)},focusout:function(o){r.focusOut(o)}})},a.prototype.focusOut=function(i){var e=i.relatedTarget;this.ignoreError=!(!e||!(e.classList.contains("e-dlg-closeicon-btn")||e.classList.contains("e-close")||e.classList.contains(it)||e.classList.contains(Wt)||e.classList.contains(ad)||e.classList.contains(ie)||e.classList.contains(Yb)))},a.prototype.validationComplete=function(i){var e=this.element.querySelector("#"+i.inputName+"_Error");e&&(e.style.display="failure"===i.status?"":"none")},a.prototype.errorPlacement=function(i,e){var t=e.getAttribute("for"),n=this.element.querySelector("#"+t+"_Error");!n&&!this.ignoreError&&this.createTooltip(i,e,t,""),(0,s.hX)(n)||(n.querySelector(".e-error").innerHTML=e.innerHTML)},a.prototype.createTooltip=function(i,e,t,n){var r,o,l=i.getBoundingClientRect();this.element.classList.contains(Yr)?(r=this.element,o=this.element.getBoundingClientRect()):o=(r=this.element.querySelector(".e-schedule-dialog .e-dlg-content")).getBoundingClientRect();var h=(0,s.n)("div",{className:"e-tooltip-wrap e-popup "+Zb,id:t+"_Error",styles:"display:"+n+";top:"+(l.bottom-o.top+r.scrollTop+9)+"px;left:"+(l.left-o.left+r.scrollLeft+l.width/2)+"px;"}),d=(0,s.n)("div",{className:"e-tip-content"});d.appendChild(e);var p=(0,s.n)("div",{className:"e-arrow-tip e-tip-top"});p.appendChild((0,s.n)("div",{className:"e-arrow-tip-outer e-tip-top"})),p.appendChild((0,s.n)("div",{className:"e-arrow-tip-inner e-tip-top"})),h.appendChild(d),h.appendChild(p),r.appendChild(h),h.style.left=parseInt(h.style.left,10)-h.offsetWidth/2+"px"},a.prototype.destroyToolTip=function(){if(this.element)for(var e=0,t=[].slice.call(this.element.querySelectorAll("."+Zb));e<t.length;e++)(0,s.TF)(t[e]);this.formObj&&this.formObj.element&&this.formObj.reset()},a.prototype.destroy=function(){this.formObj&&this.formObj.element&&!this.formObj.isDestroyed&&this.formObj.destroy(),this.formObj=null,this.element=null},a}(),Ay=function(){function a(i){this.isMultipleEventSelect=!1,this.isCrudAction=!1,this.parent=i,this.l10n=this.parent.localeObj,this.fieldValidator=new Oy,this.render(),this.addEventListener()}return a.prototype.render=function(){this.renderQuickPopup(),this.renderMorePopup(),this.renderQuickDialog()},a.prototype.renderQuickPopup=function(){var i=(0,s.n)("div",{className:Yr+" e-popup-close",attrs:{role:"dialog"}});this.parent.isAdaptive?(document.body.appendChild(i),(0,s.iQ)([i],ca)):this.parent.element.appendChild(i),this.quickPopup=new ae.zD(i,{targetType:this.parent.isAdaptive?"container":"relative",enableRtl:this.parent.enableRtl,open:this.quickPopupOpen.bind(this),close:this.quickPopupClose.bind(this),hideAnimation:this.parent.isAdaptive?{name:"ZoomOut"}:{name:"FadeOut",duration:150},showAnimation:this.parent.isAdaptive?{name:"ZoomIn"}:{name:"FadeIn",duration:150},collision:this.parent.isAdaptive?{X:"fit",Y:"fit"}:this.parent.enableRtl?{X:"flip",Y:"fit"}:{X:"none",Y:"fit"},position:this.parent.isAdaptive||this.parent.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"},viewPortElement:this.parent.isAdaptive?document.body:this.parent.element,zIndex:this.parent.isAdaptive?1004:3})},a.prototype.renderMorePopup=function(){var i='<div class="'+ao+'"><div class="e-more-event-header"><div class="'+Df+'" title="'+this.l10n.getConstant("close")+'" tabindex="0" role="button"></div><div class="'+Pf+'">
1<div class="'+zb+'" id="'+this.parent.element.id+'_more_popup"></div><div class="'+ba+" "+oo+'" tabindex="0" role="link"></div></div></div></div>',e=(0,s.n)("div",{className:Sr+" e-popup-close",innerHTML:i});this.parent.isAdaptive?(document.body.appendChild(e),(0,s.iQ)([e],ca)):this.parent.element.appendChild(e),this.morePopup=new ae.zD(e,{targetType:this.parent.isAdaptive?"container":"relative",enableRtl:this.parent.enableRtl,hideAnimation:{name:"ZoomOut",duration:300},showAnimation:{name:"ZoomIn",duration:300},open:this.morePopupOpen.bind(this),close:this.morePopupClose.bind(this),collision:this.parent.isAdaptive?{X:"fit",Y:"fit"}:this.parent.enableRtl?{X:"flip",Y:"fit"}:{X:"flip",Y:"flip"},viewPortElement:this.parent.isAdaptive?document.body:this.parent.element,zIndex:this.parent.isAdaptive?1002:2}),this.morePopup.element.setAttribute("role","dialog"),this.morePopup.element.setAttribute("aria-labelledby",this.parent.element.id+"_more_popup");var t=this.morePopup.element.querySelector("."+Df);this.renderButton("e-round",Nt+" "+pd,!1,t,this.closeClick),s.Jm.add(this.morePopup.element.querySelector("."+ba),"click",this.navigationClick,this)},a.prototype.renderQuickDialog=function(){var i=[{buttonModel:{cssClass:"e-quick-alertok e-flat",isPrimary:!0},click:this.dialogButtonClick.bind(this)},{buttonModel:{cssClass:"e-quick-alertcancel e-flat",isPrimary:!1},click:this.dialogButtonClick.bind(this)},{buttonModel:{cssClass:"e-quick-dialog-cancel e-disable e-flat",isPrimary:!1},click:this.dialogButtonClick.bind(this)}];if(this.parent.eventSettings.editFollowingEvents){var e={buttonModel:{cssClass:"e-quick-alertfollowing e-flat",isPrimary:!1},click:this.dialogButtonClick.bind(this)};i.splice(1,0,e)}this.quickDialog=new ae.lG({animationSettings:{effect:"Zoom"},buttons:i,cssClass:"e-quick-dialog",closeOnEscape:!0,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeClose:this.beforeQuickDialogClose.bind(this),isModal:!0,position:{X:"center",Y:"center"},showCloseIcon:!0,target:document.body,visible:!1,width:"auto"});var t=(0,s.n)("div",{id:this.parent.element.id+"QuickDialog"});this.parent.element.appendChild(t),this.quickDialog.appendTo(t);var n=this.quickDialog.element.querySelector("."+xs);n&&(n.setAttribute("aria-label",this.l10n.getConstant("occurrence")),n.setAttribute("aria-label",n.innerHTML));var r=this.quickDialog.element.querySelector("."+Cr);r&&(r.setAttribute("aria-label",this.l10n.getConstant("series")),r.setAttribute("aria-label",r.innerHTML)),this.quickDialog.element.querySelector(".e-dlg-closeicon-btn")&&this.quickDialog.element.querySelector(".e-dlg-closeicon-btn").setAttribute("title",this.l10n.getConstant("close"))},a.prototype.renderButton=function(i,e,t,n,r){new ke.$n({cssClass:i,disabled:t,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,iconCss:e}).appendTo(n),s.Jm.add(n,"click",r,this),(0,s.vy)([n],Nt)},a.prototype.quickDialogClass=function(i){var e=[Mf,Lf,Rf,Vl,Wb,ot],t=this.quickDialog.element.querySelector("."+xs),n=this.quickDialog.element.querySelector("."+Cr),r=this.quickDialog.element.querySelector("."+Ub);switch((0,s.vy)([t,n],e),(0,s.iQ)([this.quickDialog.element.querySelector("."+Vl)],ot),this.parent.eventSettings.editFollowingEvents&&((0,s.iQ)([r],ot),(0,s.vy)([this.quickDialog.element],jb)),i){case"Recurrence":(0,s.iQ)([t],Mf),(0,s.iQ)([n],Lf),this.parent.eventSettings.editFollowingEvents&&((0,s.vy)([r],ot),(0,s.iQ)([this.quickDialog.element],jb),(0,s.iQ)([r],Xb));break;case"Delete":(0,s.iQ)([t],Rf),(0,s.iQ)([n],Vl);break;case"Alert":(0,s.iQ)([t],[xs,Wb]),(0,s.iQ)([n],[Cr,ot])}},a.prototype.applyFormValidation=function(){var i=this.quickPopup.element.querySelector("."+qr),e={};e[this.parent.eventSettings.fields.subject.name]=this.parent.eventSettings.fields.subject.validation,this.fieldValidator.renderFormValidator(i,e,this.quickPopup.element,this.parent.locale)},a.prototype.openRecurrenceAlert=function(){var i=this.quickDialog.element.querySelector("."+xs);i&&(i.innerHTML=this.l10n.getConstant("Delete"===this.parent.currentAction?"deleteEvent":"editEvent"),i.setAttribute("aria-label",i.innerHTML));var e=this.quickDialog.element.querySelector("."+Ub);e&&(e.innerHTML=this.l10n.getConstant("editFollowingEvent"),e.setAttribute("aria-label",e.innerHTML));var t=this.quickDialog.element.querySelector("."+Cr);t&&(t.innerHTML=this.l10n.getConstant("Delete"===this.parent.currentAction?"deleteSeries":"editSeries"),t.setAttribute("aria-label",t.innerHTML)),this.quickDialog.content=this.l10n.getConstant("editContent"),this.quickDialog.header=this.l10n.getConstant("Delete"===this.parent.currentAction?"deleteTitle":"editTitle"),this.quickDialogClass("Recurrence"),this.showQuickDialog("RecurrenceAlert")},a.prototype.openRecurrenceValidationAlert=function(i){this.quickDialogClass("Alert");var e=this.quickDialog.element.querySelector("."+xs);e.innerHTML=this.l10n.getConstant("ok"),e.setAttribute("aria-label",e.innerHTML);var n,t=this.quickDialog.element.querySelector("."+Cr);switch(t.innerHTML=this.l10n.getConstant("cancel"),t.setAttribute("aria-label",t.innerHTML),this.quickDialog.header=this.l10n.getConstant("alert"),i){case"wrongPattern":(0,s.iQ)([t],ot),this.quickDialog.content=this.l10n.getConstant("wrongPattern");break;case"createError":(0,s.iQ)([t],ot),this.quickDialog.content=this.l10n.getConstant("createError");break;case"sameDayAlert":(0,s.iQ)([t],ot),this.quickDialog.content=this.l10n.getConstant("sameDayAlert");break;case"seriesChangeAlert":n=this.quickDialog.element.querySelector("."+Vl),(0,s.vy)([t,n],ot),this.quickDialog.content=this.l10n.getConstant("seriesChangeAlert"),e.innerHTML=this.l10n.getConstant("yes"),t.innerHTML=this.l10n.getConstant("no"),n.innerHTML=this.l10n.getConstant("cancel");break;case"occurrenceAlert":(0,s.iQ)([t],ot),this.quickDialog.content=this.l10n.getConstant("occurenceAlert")}(!this.parent.enableRecurrenceValidation&&"wrongPattern"===i||this.parent.enableRecurrenceValidation)&&this.showQuickDialog("RecurrenceValidationAlert")},a.prototype.openDeleteAlert=function(){if(!this.parent.activeViewOptions.readonly){var i=this.quickDialog.element.querySelector("."+xs);i&&(i.innerHTML=this.l10n.getConstant("delete"),i.setAttribute("aria-label",i.innerHTML));var e=this.quickDialog.element.querySelector("."+Cr);e&&(e.innerHTML=this.l10n.getConstant("cancel"),e.setAttribute("aria-label",e.innerHTML)),this.quickDialog.content=this.l10n.getConstant(this.parent.activeEventData.event.length>1?"deleteMultipleContent":"deleteContent"),this.quickDialog.header=this.l10n.getConstant(this.parent.activeEventData.event.length>1?"deleteMultipleEvent":"deleteEvent"),this.quickDialogClass("Delete"),this.showQuickDialog("DeleteAlert")}},a.prototype.openValidationError=function(i,e){this.quickDialog.header=this.l10n.getConstant("alert"),this.quickDialog.content=this.l10n.getConstant(i);var t=this.quickDialog.element.querySelector("."+xs);t&&(t.innerHTML=this.l10n.getConstant("ok"),t.setAttribute("aria-label",t.innerHTML));var n=this.quickDialog.element.querySelector("."+Cr);n&&(n.innerHTML=this.l10n.getConstant("cancel"),t.setAttribute("aria-label",n.innerHTML)),this.quickDialogClass("Alert"),this.showQuickDialog("overlapAlert"===i?"OverlapAlert":"ValidationAlert",e)},a.prototype.showQuickDialog=function(i,e){var t=this;this.quickDialog.dataBind();var n={type:i,cancel:!1,element:this.quickDialog.element,data:(0,s.X$)({},e||this.parent.activeEventData.event,null,!0)};this.parent.activeViewOptions.allowOverlap||(n.overlapEvents=this.parent.overlapAppointments),this.parent.trigger(Cl,n,function(r){r.cancel||t.quickDialog.show()})},a.prototype.createMoreEventList=function(i,e,t){var n=this,r=this.parent.eventFields,o=(0,s.n)("div",{className:cd}),l=(0,s.n)("div",{className:kf});if(0===i.length)l=(0,s.n)("div",{className:cd,innerHTML:this.l10n.getConstant("emptyContainer")});else for(var h=function(m){var g=m[r.subject]||d.parent.eventSettings.fields.subject.default||d.parent.localeObj.getConstant("addTitle"),v=(0,s.n)("div",{className:Ce,attrs:{"data-id":""+m[r.id],"data-guid":m.Guid,role:"button",tabindex:"0","aria-disabled":d.parent.eventBase.getReadonlyAttribute(m),"aria-label":d.parent.getAnnouncementString(m)}});m[r.isReadonly]&&(0,s.iQ)([v],"e-read-only");var b=void 0;if((0,s.hX)(d.parent.activeViewOptions.eventTemplate))v.appendChild((0,s.n)("div",{className:Ut})),d.parent.sanitize(g,v.firstElementChild);
1else{var y=d.parent.element.id+"_"+d.parent.activeViewOptions.eventTemplateName+"eventTemplate";b=d.parent.getAppointmentTemplate()(m,d.parent,"eventTemplate",y,!1,void 0,void 0,d.parent.root),(0,s.BC)(b,v)}(0,s.hX)(t)||v.setAttribute("data-group-index",t),(0,s.hX)(m[r.recurrenceRule])||v.appendChild((0,s.n)("div",{className:Nt+" "+(m[r.id]===m[r.recurrenceID]?Ml:Ll)}));var E={data:(0,s.X$)({},m,null,!0),element:v,cancel:!1};d.parent.trigger(oa,E,function(_){_.cancel||(l.appendChild(v),n.parent.eventBase.wireAppointmentEvents(v,m,n.parent.isAdaptive||"Year"===n.parent.currentView),n.parent.eventBase.applyResourceColor(v,m,"backgroundColor",e))})},d=this,p=0,u=i;p<u.length;p++)h(u[p]);return o.appendChild(l),o},a.prototype.tapHoldEventPopup=function(i){var e=(0,s.kp)(i.target,"."+Ce);this.parent.selectedElements=[],this.isMultipleEventSelect=!0,this.parent.eventBase.getSelectedEventElements(e),this.parent.activeEventData=this.parent.eventBase.getSelectedEvents();var t=e.getAttribute("data-guid"),n=this.parent.eventBase.getEventByGuid(t);if(!(0,s.hX)(n)){var r=n[this.parent.eventFields.subject]||this.l10n.getConstant("noTitle"),o='<div class="e-multiple-event-popup"><div class="'+Of+'"><button class="'+po+'" title="'+this.l10n.getConstant("close")+'"></button><div class="'+Ut+'">'+r+'</div><button class="e-edit" title="'+this.l10n.getConstant("edit")+'"></button><button class="'+jl+'" title="'+this.l10n.getConstant("delete")+'"></button></div></div>';this.quickPopup.element.innerHTML=o;var l=this.quickPopup.element.querySelector("."+po);this.renderButton("e-flat e-round e-small",Nt+" "+pd,!1,l,this.closeClick);var h=this.parent.activeViewOptions.readonly||n[this.parent.eventFields.isReadonly],d=!this.parent.eventSettings.allowEditing||h,p=!this.parent.eventSettings.allowDeleting||h,u=this.quickPopup.element.querySelector("."+ho);u&&this.renderButton("e-flat e-round e-small",Nt+" "+dd,d,u,this.editClick);var f=this.quickPopup.element.querySelector("."+jl);f&&this.renderButton("e-flat e-round e-small",Nt+" "+Kb,p,f,this.deleteClick),this.beforeQuickPopupOpen(e,this.parent.eventBase.getPageCoordinates(i))}},a.prototype.isCellBlocked=function(i){var e={};if(e[this.parent.eventFields.startTime]=this.parent.activeCellsData.startTime,e[this.parent.eventFields.endTime]=this.parent.activeCellsData.endTime,e[this.parent.eventFields.isAllDay]=this.parent.activeCellsData.isAllDay,this.parent.activeViewOptions.group.resources.length>0){var n=parseInt((i.element instanceof Array?i.element[0]:i.element).getAttribute("data-group-index"),10);this.parent.resourceBase.setResourceValues(e,isNaN(n)?null:n)}return this.parent.eventBase.isBlockRange(e)},a.prototype.cellClick=function(i){var e=new Date(i.startTime.getTime());if(this.parent.showQuickInfo&&this.parent.eventSettings.allowAdding&&"MonthAgenda"!==this.parent.currentView&&!this.isCellBlocked(i)&&this.parent.isMinMaxDate(new Date(e.setHours(0,0,0,0)))){var t=(0,s.hX)(i.event)?i.element:i.event.target;if(this.parent.isAdaptive){this.quickPopupHide();var n=this.parent.element.querySelector("."+nd);(0,s.hX)(n)&&(n=(0,s.n)("div",{className:nd,innerHTML:'<div class="e-title">+ '+this.l10n.getConstant("newEvent")+"</div>"}));var r=(0,s.kp)(t,"."+ie+",."+it);r&&r.appendChild(n)}else{var o=(0,s.kp)(t,"."+ie+",."+it+",."+Wt);if(!(0,s.hX)(o)&&!t.classList.contains(Fi)){if(this.quickPopup.relateTo===o&&this.quickPopup.element.classList.contains(Qt)){var h=this.quickPopup.element.querySelector("."+Ut);return void(h&&h.focus())}this.quickPopup.element&&this.destroyPopupButtons("quickPopup");var d={};d[this.parent.eventFields.startTime]=this.parent.activeCellsData.startTime,d[this.parent.eventFields.endTime]=this.parent.activeCellsData.endTime,d[this.parent.eventFields.isAllDay]=this.parent.activeCellsData.isAllDay;var p=(0,s.n)("div",{className:xf});p.appendChild(this.getPopupHeader("Cell",d)),p.appendChild(this.getPopupContent("Cell",i,d)),p.appendChild(this.getPopupFooter("Cell",d)),this.quickPopup.element.setAttribute("aria-label",this.l10n.getConstant("newEvent"));var u=p.querySelector("."+Ut);u&&J.pd.createInput({element:u,properties:{placeholder:this.l10n.getConstant("addTitle")}}),(0,s.hX)(this.parent.eventSettings.fields.subject.default)||(u.value=this.parent.eventSettings.fields.subject.default);var f=p.querySelector("."+po);f&&this.renderButton("e-flat e-round e-small",Nt+" "+pd,!1,f,this.popupClose);var m=p.querySelector("."+ad);m&&this.renderButton("e-flat","",!1,m,this.detailsClick);var g=p.querySelector("."+ld);g&&this.renderButton("e-flat e-primary","",this.parent.activeViewOptions.readonly,g,this.saveClick),this.morePopup&&this.morePopup.hide(),this.quickPopup.content=p,this.quickPopup.relateTo=o,this.quickPopup.dataBind(),this.beforeQuickPopupOpen(o,this.parent.eventBase.getPageCoordinates(i.event))}}}else this.quickPopupHide()},a.prototype.isSameEventClick=function(i){if(this.quickPopup.relateTo===(0,s.kp)(i.element,"."+Ce)&&this.quickPopup.element.classList.contains(Qt)){var t=this.quickPopup.element.querySelector("."+ho);if(t&&t.focus(),!this.parent.isAdaptive){var n=this.quickPopup.element.querySelector("."+va);n&&n.focus()}return!0}return!1},a.prototype.isQuickTemplate=function(i){return"Both"===this.parent.quickInfoTemplates.templateType||this.parent.quickInfoTemplates.templateType===i},a.prototype.eventClick=function(i){if(this.parent.eventTooltip&&this.parent.eventTooltip.close(),this.parent.showQuickInfo)if(this.parent.isAdaptive&&this.isMultipleEventSelect)this.updateTapHoldEventPopup((0,s.kp)(i.element,"."+Ce));else{var e=this.isSameEventClick(i);if(this.parent.selectedElements=[],e)return;this.quickPopup.element&&this.destroyPopupButtons("quickPopup");var t=i.event,n=(0,s.n)("div",{className:wf});n.appendChild(this.getPopupHeader("Event",t)),n.appendChild(this.getPopupContent("Event",i,t)),n.appendChild(this.getPopupFooter("Event",t)),this.quickPopup.element.setAttribute("aria-label",this.l10n.getConstant("editEvent"));var r=this.parent.activeViewOptions.readonly||t[this.parent.eventFields.isReadonly],o=!this.parent.eventSettings.allowEditing||r,l=!this.parent.eventSettings.allowDeleting||r,h=n.querySelector("."+ho),d="e-flat e-round e-small";h&&this.renderButton(d,Nt+" "+dd,o,h,this.editClick);var p=n.querySelector("."+jl);p&&this.renderButton(d,Nt+" "+Kb,l,p,this.deleteClick);var u=n.querySelector("."+po);u&&this.renderButton(d,Nt+" "+pd,!1,u,this.popupClose);var f=n.querySelector("."+va);f&&this.renderButton("e-flat e-primary","",o,f,this.editClick);var m=n.querySelector("."+Wr);m&&this.renderButton("e-flat","",l,m,this.deleteClick),this.morePopup&&!(0,s.kp)(i.element,"."+kf)&&this.morePopup.hide(),this.quickPopup.content=n,this.quickPopup.relateTo=this.parent.isAdaptive?document.body:(0,s.kp)(i.element,"."+Ce),this.quickPopup.dataBind(),this.beforeQuickPopupOpen(i.element,this.parent.eventBase.getPageCoordinates(i.originalEvent))}},a.prototype.getPopupHeader=function(i,e){var t=(0,s.n)("div",{className:Of});if(this.isQuickTemplate(i)&&this.parent.quickInfoTemplates.header){var n=(0,s.X$)({},e,{elementType:i.toLowerCase()}
1,!0),r=this.parent.element.id,o=[].slice.call(this.parent.getQuickInfoTemplatesHeader()(n,this.parent,"header",r+"_headerTemplate",!1));(0,s.BC)([].slice.call(o),t)}else{var l=void 0,h=void 0;switch(i){case"Cell":l='<div class="'+Bb+'"><button class="'+po+'" title="'+this.l10n.getConstant("close")+'"></button></div>';break;case"Event":h=this.getFormattedString(e),l='<div class="'+Bb+'"><button class="e-edit '+Nt+'" title="'+this.l10n.getConstant("edit")+'"></button><button class="'+jl+" "+Nt+'" title="'+this.l10n.getConstant("delete")+'"></button><button class="'+po+'" title="'+this.l10n.getConstant("close")+'"></button></div><div class="'+Kh+'"><div class="'+Ut+" "+Oi+'" title="'+(h.eventSubject?h.eventSubject.replaceAll('"',"'"):h.eventSubject)+'"></div></div >'}var d=(0,s.n)("div",{innerHTML:l});if("Event"===i){var p=d.querySelector("."+Ut);this.parent.sanitize(h.eventSubject,p)}(0,s.BC)([].slice.call(d.childNodes),t)}return t},a.prototype.getPopupContent=function(i,e,t){var n=(0,s.n)("div",{className:"e-popup-content"});if(this.isQuickTemplate(i)&&this.parent.quickInfoTemplates.content){var r=(0,s.X$)({},t,{elementType:i.toLowerCase()},!0),o=this.parent.element.id,l=[].slice.call(this.parent.getQuickInfoTemplatesContent()(r,this.parent,"content",o+"_contentTemplate",!1));(0,s.BC)([].slice.call(l),n)}else{var h=void 0,d=void 0,p=void 0,u=this.getResourceText(e,i.toLowerCase());switch(i){case"Cell":d=this.getFormattedString(t),h='<table class="e-popup-table"><tbody><tr><td><form class="'+qr+'">\n                    <input class="'+Ut+' e-field" type="text" name="'+this.parent.eventFields.subject+'" /></form></td></tr><tr><td><div class="'+bf+'"><div class="'+oy+" "+Nt+'"></div><div class="'+Hb+" "+Oi+'">'+d.details+"</div></div>"+(this.parent.activeViewOptions.group.resources.length>0?'<div class="'+ry+'"><div class="'+sy+" "+Nt+' "></div><div class="'+Ff+" "+Oi+'"></div></div>':"")+"</td></tr></tbody></table>";break;case"Event":p=this.getFormattedString(t),h='<div class="'+bf+'"><div class="'+oy+" "+Nt+'"></div><div class="e-date-time-wrapper '+Oi+'"><div class="'+Hb+" "+Oi+'">'+p.details+"</div>",t[this.parent.eventFields.recurrenceRule]&&(h+='<div class="e-recurrence-summary '+Oi+'">'+this.getRecurrenceSummary(t)+"</div>"),h+="</div></div>",t[this.parent.eventFields.location]&&(h+='<div class="'+lo+'"><div class="e-location-icon '+Nt+'"></div><div class="'+$b+" "+Oi+'"></div></div>'),(t[this.parent.eventFields.startTimezone]||t[this.parent.eventFields.endTimezone])&&(h+='<div class="'+ws+'"><div class="e-time-zone-icon '+Nt+'"></div><div class="e-time-zone-details '+Oi+'">'+this.getTimezone(t)+"</div></div>"),t[this.parent.eventFields.description]&&(h+='<div class="'+ya+'"><div class="e-description-icon '+Nt+'"></div><div class="'+qb+" "+Oi+'"></div></div>'),this.parent.resourceCollection.length>0&&(h+='<div class="'+ry+'"><div class="'+sy+" "+Nt+'"></div><div class="'+Ff+" "+Oi+'"></div></div>')}var f=(0,s.n)("div",{innerHTML:h}),m=f.querySelector("form");if(m&&(m.onsubmit=function(){return!1}),t[this.parent.eventFields.location]){var g=f.querySelector("."+$b);(0,s.hX)(g)||this.parent.sanitize(t[this.parent.eventFields.location],g)}if(t[this.parent.eventFields.description]){var v=f.querySelector("."+qb);(0,s.hX)(v)||this.parent.sanitize(t[this.parent.eventFields.description],v)}if(u){var b=f.querySelector("."+Ff);(0,s.hX)(b)||this.parent.sanitize(u,b)}(0,s.BC)([].slice.call(f.childNodes),n)}return n},a.prototype.getPopupFooter=function(i,e){var t=(0,s.n)("div",{className:Af});if(this.isQuickTemplate(i)&&this.parent.quickInfoTemplates.footer){var n=(0,s.X$)({},e,{elementType:i.toLowerCase()},!0),r=this.parent.element.id,o=[].slice.call(this.parent.getQuickInfoTemplatesFooter()(n,this.parent,"footer",r+"_footerTemplate",!1));(0,s.BC)([].slice.call(o),t)}else{var l=void 0;switch(i){case"Cell":l='<button class="'+ad+" "+Oi+'" title="'+this.l10n.getConstant("moreDetails")+'">'+this.l10n.getConstant("moreDetails")+'</button><button class="'+ld+" "+Oi+'" title="'+this.l10n.getConstant("save")+'">'+this.l10n.getConstant("save")+"</button>";break;case"Event":l=this.parent.isAdaptive?"":'<button class="'+va+" "+Oi+'" title="'+this.l10n.getConstant("edit")+'">'+this.l10n.getConstant("edit")+'</button><button class="'+Wr+" "+Oi+'" title="'+this.l10n.getConstant("delete")+'">'+this.l10n.getConstant("delete")+"</button>"}var h=(0,s.n)("div",{innerHTML:l});(0,s.BC)([].slice.call(h.childNodes),t)}return t},a.prototype.getResourceText=function(i,e){if(0===this.parent.resourceCollection.length)return null;var t="";if(0===this.parent.activeViewOptions.group.resources.length){var n=this.parent.resourceBase.resourceCollection.slice(-1)[0],r=n.dataSource;if("event"===e)for(var o=i.event,l=function(S){var E=o[n.field];if(E instanceof Array){if(E.indexOf(S[n.idField])>-1){var _=E[E.indexOf(S[n.idField])],T=r.filter(function(I){return I[n.idField]===_})[0];t+=""===t?T[n.textField]:", "+T[n.textField]}}else S[n.idField]===E&&(t=S[n.textField].toString())},h=0,d=r;h<d.length;h++)l(d[h]);else t=r[0][n.textField].toString()}else if("event"===e){o=i.event,r=void 0;for(var u,f=this.parent.resourceBase.resourceCollection.length-1;f>=0;f--)if(r=o[this.parent.resourceBase.resourceCollection[parseInt(f.toString(),10)].field],!(0,s.hX)(r)){u=this.parent.resourceBase.resourceCollection[parseInt(f.toString(),10)];break}Array.isArray(r)||(r=[r]);var m=[],g=u.dataSource;r.forEach(function(_){var T,I=Tl(g,u.idField,_);I>-1&&(T=g[parseInt(I.toString(),10)][u.textField]),T&&m.push(T)}),t=m.join(", ")}else{var v=i,b=(0,s.hX)(v.groupIndex)?0:v.groupIndex,y=this.parent.resourceBase.lastResourceLevel[parseInt(b.toString(),10)];t=y.resourceData[y.resource.textField]}return t},a.prototype.getFormattedString=function(i){var e=this.parent.eventFields,t=i[e.subject]||this.l10n.getConstant("noTitle"),n=i[e.startTime],r=i[e.endTime],o=this.getDateFormat(n,"long"),l=i[e.isAllDay]&&0===r.getHours()&&0===r.getMinutes()?this.getDateFormat(K(new Date(r.getTime()),-1),"long"):this.getDateFormat(r,"long"),h=this.parent.getTimeString(n),d=this.parent.getTimeString(r),p="",u=r.getDate()!==n.getDate()&&(r.getTime()-n.getTime())/36e5<24?1:0;return i[e.isAllDay]?(p=o+" ("+this.l10n.getConstant("allDay")+")",(Bt(r)-Bt(n))/bt>1&&(p+="&nbsp;-&nbsp;"+l+" ("+this.l10n.getConstant("allDay")+")")):p=(Bt(r)-Bt(n))/bt>=1||u>0?o+" ("+h+")&nbsp;-&nbsp;"+l+" ("+d+")":o+" ("+h+"&nbsp;-&nbsp;"+d+")",{eventSubject:t,details:p}},a.prototype.moreEventClick=function(i,e,t){var n=this;this.quickPopupHide(!0);var r=this.morePopup.element.querySelector("."+cd);r&&(0,s.TF)(r);var o=i.date.getTime().toString(),l=(0,s.kp)(i.element,"."+Fi+",."+ie),h=this.parent.globalize.formatDate(i.date,{format:"E",calendar:this.parent.getCalendarMode()});this.morePopup.element.querySelector("."+zb).innerHTML=yt(h,"single");var p,d=this.morePopup.element.querySelector("."+ba);d.innerHTML=this.getDateFormat(i.date,"d"),d.setAttribute("data-date",o),d.setAttribute("data-end-date",e.getTime().toString()),(0,s.hX)(t)||(d.setAttribute("data-group-index",t),p=this.parent.resourceBase.lastResourceLevel[parseInt(t,10)].groupOrder);var u=this.createMoreEventList(i.event,p,t);
1if(this.morePopup.element.querySelector("."+ao).appendChild(u),(0,s.vy)(this.morePopup.element.querySelector("."+Pf).childNodes,cf),k(i.date).getTime()===k(this.parent.getCurrentTime()).getTime()&&(0,s.iQ)(this.morePopup.element.querySelector("."+Pf).childNodes,cf),!this.parent.isAdaptive)if(-1!==this.parent.currentView.indexOf("Timeline")){var f=l.getAttribute("data-group-index"),m=new Date(parseInt(l.getAttribute("data-start-date"),10));m.setHours(m.getHours(),m.getMinutes(),0);var g=m.getTime().toString();if((0,s.hX)(f))this.morePopup.relateTo=this.parent.element.querySelector("."+we+' tbody tr td[data-date="'+g+'"]');else if(this.morePopup.relateTo=this.parent.element.querySelector("."+we+' tbody tr td[data-group-index="'+f+'"][data-date="'+g+'"]'),(0,s.hX)(this.morePopup.relateTo))for(var v=[].slice.call(this.parent.element.querySelectorAll("."+we+' tbody tr td[data-group-index="'+f+'"]')),b=0;b<v.length;b++)v[parseInt(b.toString(),10)].getAttribute("data-date")<g&&(this.morePopup.relateTo=v[parseInt(b.toString(),10)])}else this.morePopup.relateTo=(0,s.kp)(l,"."+ie);this.parent.renderTemplates(function(){n.parent.trigger(Cl,{type:"EventContainer",cancel:!1,element:n.morePopup.element,data:i},function(E){E.cancel||n.morePopup.show()})})},a.prototype.saveClick=function(i){this.applyFormValidation(),this.dialogEvent=i,this.isCrudAction=!0,this.quickPopupHide()},a.prototype.detailsClick=function(i){var e=this.quickPopup.element.querySelector("."+Ut);e&&""!==e.value&&(0,s.X$)(this.parent.activeCellsData,{subject:e.value}),this.dialogEvent=i,this.isCrudAction=!1,this.fieldValidator.destroyToolTip(),this.quickPopupHide(),this.parent.eventWindow.openEditor(this.parent.activeCellsData,"Add")},a.prototype.editClick=function(i){this.dialogEvent=i,this.quickPopupHide(!0);var e=this.parent.activeEventData.event;this.parent.currentAction="EditSeries",(0,s.hX)(e[this.parent.eventFields.recurrenceRule])?this.parent.eventWindow.openEditor(e,this.parent.currentAction):(this.parent.currentAction="EditOccurrence",this.openRecurrenceAlert())},a.prototype.deleteClick=function(i){this.dialogEvent=i,this.quickPopupHide(!0),this.parent.currentAction="Delete",this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule]?this.openRecurrenceAlert():this.openDeleteAlert()},a.prototype.updateMoreEventContent=function(){if(!this.morePopup.element.classList.contains("e-popup-close")){var i=this.morePopup.element.querySelector("."+cd);i&&(0,s.TF)(i);var o,l,e=this.morePopup.element.querySelector("."+ba),t=new Date(parseInt(e.getAttribute("data-date"),10)),n=new Date(parseInt(e.getAttribute("data-end-date"),10)),r=e.getAttribute("data-group-index");(0,s.hX)(r)||(l=(o=this.parent.resourceBase.lastResourceLevel[parseInt(r,10)]).groupOrder);var h=this.parent.eventBase.filterEvents(t,n,this.parent.eventsProcessed,o),d=this.createMoreEventList(h,l,r);this.morePopup.element.querySelector("."+ao).appendChild(d)}},a.prototype.closeClick=function(i){this.dialogEvent=i,"Year"===this.parent.currentView&&this.parent.activeCellsData&&this.parent.activeCellsData.element&&this.parent.selectCell(this.parent.activeCellsData.element),this.quickPopupHide(),this.morePopup.hide()},a.prototype.dialogButtonClick=function(i){this.dialogEvent=i,this.quickDialog.hide();var e=i.target,t=this.quickDialog.element.querySelector("."+Cr),n=this.parent.activeEventData.event;if(e.classList.contains(Mf))switch(this.parent.currentAction="Delete"===this.parent.currentAction?"DeleteOccurrence":"EditOccurrence",this.parent.currentAction){case"EditOccurrence":this.parent.eventWindow.openEditor(n,this.parent.currentAction);break;case"DeleteOccurrence":this.parent.crudModule.deleteEvent(n,this.parent.currentAction)}else if(e.classList.contains(Xb))switch(this.parent.currentAction="Delete"===this.parent.currentAction?"DeleteFollowingEvents":"EditFollowingEvents",this.parent.currentAction){case"EditFollowingEvents":this.parent.eventWindow.openEditor(n,this.parent.currentAction);break;case"DeleteFollowingEvents":this.parent.crudModule.deleteEvent(n,this.parent.currentAction)}else if(e.classList.contains(Lf))switch(this.parent.currentAction="Delete"===this.parent.currentAction?"DeleteSeries":"EditSeries",this.parent.currentAction){case"EditSeries":this.parent.eventWindow.openEditor(this.parent.eventBase.getParentEvent(n,!0),this.parent.currentAction);break;case"DeleteSeries":this.parent.crudModule.deleteEvent(n,this.parent.currentAction)}else e.classList.contains(Rf)?this.parent.crudModule.deleteEvent(n,this.parent.currentAction):!t.classList.contains(ot)&&(e.classList.contains(xs)||e.classList.contains(Cr)&&!t.classList.contains(Vl))&&(this.parent.uiStateValues.isIgnoreOccurrence=e.classList.contains(Cr),this.parent.eventWindow.eventSave(i,this.l10n.getConstant("ok")))},a.prototype.updateTapHoldEventPopup=function(i){var e=this.parent.eventBase.getSelectedEventElements(i);if(this.parent.activeEventData=this.parent.eventBase.getSelectedEvents(),e.length>0){var t=this.parent.eventBase.getEventByGuid(e[0].getAttribute("data-guid")),n=1===e.length?t[this.parent.eventFields.subject]||this.l10n.getConstant("noTitle"):"("+e.length+")&nbsp;"+this.l10n.getConstant("selectedItems");this.quickPopup.element.querySelector("."+Ut).innerHTML=n,e.length>1?(0,s.iQ)([this.quickPopup.element.querySelector("."+dd)],Ai):(0,s.vy)([this.quickPopup.element.querySelector("."+dd)],Ai)}else this.parent.selectedElements=[],this.quickPopupHide()},a.prototype.getTimezone=function(i){var e="";return e+=i[this.parent.eventFields.startTimezone]||"",(e+=""===e?"":" - ")+(i[this.parent.eventFields.endTimezone]||"")},a.prototype.getRecurrenceSummary=function(i){var e=this.parent.eventWindow.getRecurrenceEditorInstance();if(e){var t=e.getRuleSummary(i[this.parent.eventFields.recurrenceRule]);return t.charAt(0).toUpperCase()+t.slice(1)}return""},a.prototype.getDateFormat=function(i,e){return yt(this.parent.globalize.formatDate(i,{skeleton:e,calendar:this.parent.getCalendarMode()}),"single")},a.prototype.getDataFromTarget=function(i){if(i.classList.contains(Ce))return this.parent.activeEventData.event;var e={startTime:this.parent.activeCellsData.startTime,endTime:this.parent.activeCellsData.endTime,isAllDay:this.parent.activeCellsData.isAllDay,groupIndex:this.parent.activeCellsData.groupIndex};return this.parent.eventWindow.convertToEventData(this.parent.activeCellsData,e),e},a.prototype.beforeQuickDialogClose=function(i){var e=this,t={event:i.event||this.dialogEvent,type:(0,s.hX)(this.parent.activeEventData.event)?"ValidationAlert":(0,s.hX)(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])?"DeleteAlert":"RecurrenceAlert",cancel:!1,data:this.parent.activeEventData.event,element:this.quickDialog.element};this.parent.trigger(Bh,t,function(n){n.cancel||e.parent.eventBase.focusElement(!0)})},a.prototype.beforeQuickPopupOpen=function(i,e){var t=this;this.parent.renderTemplates(function(){var n=t.quickPopup.element.querySelector("."+wf),r=t.parent.isAdaptive?n?"ViewEventInfo":"EditEventInfo":"QuickInfo",o={type:r,cancel:!1,data:(0,s.X$)({},t.getDataFromTarget(i),null,!0),target:i,element:t.quickPopup.element};t.parent.trigger(Cl,o,function(l){if(l.cancel)t.quickPopupHide(),t.destroyPopupButtons("quickPopup"),l.element.classList.contains(Qt)&&t.quickPopupClose(),Dn(t.quickPopup.element),t.isMultipleEventSelect=!1;else{var h=t.quickPopup.element.style.display;
1if(t.quickPopup.element.style.display="block",t.parent.isAdaptive)t.quickPopup.element.removeAttribute("style"),t.quickPopup.element.style.display="block",t.quickPopup.element.style.height=(0,s.IV)("EditEventInfo"===r?65:window.innerHeight);else{var d=t.parent.virtualScrollModule&&t.parent.virtualScrollModule.isHorizontalScroll&&!(0,s.hX)((0,s.kp)(i,"."+nt)),p=t.parent.element.querySelector("."+we+" table");t.quickPopup.offsetX=d&&!t.parent.enableRtl?mb(p)+10:10,t.quickPopup.offsetY=t.parent.virtualScrollModule&&!t.parent.virtualScrollModule.isHorizontalScroll?t.quickPopup.offsetY:0,t.quickPopup.collision={X:t.parent.enableRtl?"flip":"none",Y:"fit"},t.quickPopup.position={X:t.parent.enableRtl?"left":"right",Y:t.parent.enableRtl?"bottom":"top"},t.quickPopup.dataBind(),t.quickPopup.refreshPosition(null,!0);var u=(0,ae.D$)(t.quickPopup.element,t.parent.element);if(u.indexOf(t.parent.enableRtl?"left":"right")>-1&&(t.quickPopup.offsetX=-i.offsetWidth-10-t.quickPopup.element.offsetWidth,d&&!t.parent.enableRtl&&(t.quickPopup.offsetX=mb(p)+t.quickPopup.offsetX),t.quickPopup.dataBind(),t.quickPopup.refreshPosition(null,!0),(0,ae.D$)(t.quickPopup.element,t.parent.element).indexOf("left")>-1&&(t.quickPopup.position={X:"center",Y:"center"},t.quickPopup.collision={X:"fit",Y:"fit"},t.quickPopup.offsetX=-t.quickPopup.element.offsetWidth/2,t.quickPopup.dataBind())),t.parent.virtualScrollModule&&!t.parent.virtualScrollModule.isHorizontalScroll&&(u.indexOf("top")>-1||u.indexOf("bottom")>-1)){var m=fb(p);t.quickPopup.offsetY=m,t.quickPopup.dataBind(),t.quickPopup.refreshPosition(null,!0)}if("center"===t.quickPopup.position.X&&"center"===t.quickPopup.position.Y&&!(0,s.hX)(e)&&e.clientX&&e.clientY){var g=e.clientX,v=e.clientY,b=i.getBoundingClientRect(),y=e.offsetY||Math.ceil(v-b.y),S=t.quickPopup.offsetY,E=(0,ae.D$)(t.quickPopup.element,i),_=t.quickPopup.element.getBoundingClientRect(),T=document.elementFromPoint(g,v);(E.indexOf("top")>-1||E.indexOf("bottom")>-1||(0,s.kp)(T,"."+Yr))&&(_.top<=v&&v<=_.top+_.height?(t.quickPopup.offsetY=S-_.height-10,t.quickPopup.dataBind(),(E=(0,ae.D$)(t.quickPopup.element,t.parent.element)).indexOf("top")>-1&&(t.quickPopup.offsetY=S+y+10,t.quickPopup.dataBind())):(0,ae.D$)(t.quickPopup.element,t.parent.element).indexOf("bottom")>-1&&(t.quickPopup.offsetY=S-y-Math.ceil(_.height)-10,t.quickPopup.dataBind()))}}n&&t.applyEventColor(),t.quickPopup.element.style.display=h,t.quickPopup.dataBind(),t.quickPopup.show()}})})},a.prototype.applyEventColor=function(){var e=this.parent.activeEventData.element.style["Agenda"===this.parent.currentView||"MonthAgenda"===this.parent.currentView?this.parent.enableRtl?"border-right-color":"border-left-color":"background-color"];if(""!==e){var t=this.quickPopup.element.querySelector("."+Of),n=this.quickPopup.element.querySelector("."+Af);n&&n.offsetParent&&(t=this.quickPopup.element.querySelector("."+Ut))&&(t.style.borderLeftColor=e,e="rgba("+e.match(/\d+/g).join()+",0.3)"),t&&(t.style.backgroundColor=e)}},a.prototype.quickPopupOpen=function(){if(this.parent.isAdaptive)this.quickPopup.element.style.top="0px";else if(this.quickPopup.element.querySelector("."+xf)){var i=this.quickPopup.element.querySelector("."+Ut);i&&i.focus()}else{var e=this.quickPopup.element.querySelector("."+va);e&&e.focus();var t=this.quickPopup.element.querySelector("."+ho);t&&t.focus()}},a.prototype.quickPopupClose=function(){this.parent.eventBase.focusElement(),this.quickPopup.relateTo="."+ie,this.fieldValidator.destroyToolTip(),this.quickPopup.element.querySelectorAll(".e-formvalidator").length&&this.fieldValidator.destroy(),this.destroyPopupButtons("quickPopup"),Dn(this.quickPopup.element)},a.prototype.morePopupOpen=function(){if(this.parent.isAdaptive)return this.morePopup.element.style.top="0px",this.morePopup.element.style.left="0px",void(this.morePopup.element.style.height=(0,s.IV)(window.innerHeight));this.morePopup.element.querySelector("."+ba).focus(),this.morePopup.refreshPosition()},a.prototype.morePopupClose=function(){var i=this.parent.element.querySelector("."+kf);i&&(0,s.TF)(i)},a.prototype.popupClose=function(i){this.dialogEvent=i,this.isCrudAction=!1,this.quickPopupHide(!0)},a.prototype.quickPopupHide=function(i){var e=this;if(this.quickPopup.element.classList.contains(Qt)){var n,t=this.quickPopup.element.querySelector("."+xf);if(t){var r=this.quickPopup.element.querySelector(".e-formvalidator");if(this.isCrudAction&&r&&!r.ej2_instances[0].validate())return;var o=this.parent.eventFields,l=this.parent.eventWindow.getObjectFromFormData(Yr);this.parent.eventWindow.setDefaultValueToObject(l),l[o.id]=this.parent.eventBase.getEventMaxID(),l[o.startTime]=this.parent.activeCellsData.startTime,l[o.endTime]=this.parent.activeCellsData.endTime,l[o.isAllDay]=this.parent.activeCellsData.isAllDay,this.parent.resourceBase&&this.parent.resourceBase.setResourceValues(l),n=l}else n=this.parent.activeEventData.event;var h=this.quickPopup.element.querySelector("."+wf);this.parent.trigger(Bh,{event:this.dialogEvent,type:this.parent.isAdaptive?h?"Vie
1wEventInfo":"EditEventInfo":"QuickInfo",cancel:!1,data:n,element:this.quickPopup.element,target:t?this.parent.activeCellsData.element:this.parent.activeEventData.element},function(p){if(!p.cancel&&e.quickPopup.element.classList.contains("e-popup-open")){if(t&&e.isCrudAction&&(e.parent.currentAction="Add",e.parent.crudModule.addEvent(p.data)),i){var u=e.quickPopup.hideAnimation;e.quickPopup.hideAnimation=null,e.quickPopup.hide(),e.quickPopup.hideAnimation=u}else e.quickPopup.hide();e.isMultipleEventSelect=!1,e.isCrudAction=!1}})}},a.prototype.navigationClick=function(i){var e=(0,s.kp)(i.target,"."+oo);if(!(0,s.hX)(e)){var t=this.parent.getDateFromElement(i.currentTarget);(0,s.hX)(t)||(this.closeClick(i),this.parent.setProperties({selectedDate:t},!0),this.parent.changeView(this.parent.getNavigateView(),i))}},a.prototype.documentClick=function(i){var e=i.event.target,t=!!(0,s.kp)(e,".e-dialog"),n="."+Yr+",."+Wt+",."+it+",."+ie+",."+Ce;t||(n+=",.e-popup");var r=this.parent.element.querySelector("."+Yr);(r&&r.childElementCount>0&&!(0,s.kp)(e,n)||!(0,s.kp)(e,n))&&(this.quickPopupHide(),this.parent.removeNewEventElement());var o=this.parent.allowInline?this.parent.inlineModule.getInlineElement():null;o&&o!==e&&this.parent.inlineModule.documentClick(o),(0,s.kp)(e,"."+Ce+",."+Wt)&&this.parent.removeNewEventElement(),!(0,s.kp)(e,"."+Sr)&&e.classList&&!e.classList.contains(Fi)&&!(0,s.kp)(e,"."+Sr+"."+Qt)&&!(0,s.kp)(e,"."+ie)&&this.morePopup.hide()},a.prototype.onClosePopup=function(i){(0,s.hX)(i)||(this.dialogEvent=i),this.quickPopupHide(),((0,s.hX)(i)||!(0,s.hX)(i)&&"escape"!==i.action||this.parent.inlineModule&&this.parent.element.querySelector("."+$l))&&this.parent.eventBase.focusElement()},a.prototype.addEventListener=function(){this.parent.on(fr,this.cellClick,this),this.parent.on(sa,this.eventClick,this),this.parent.on(Xr,this.documentClick,this),this.parent.on(un,this.updateMoreEventContent,this)},a.prototype.removeEventListener=function(){this.parent.off(fr,this.cellClick),this.parent.off(sa,this.eventClick),this.parent.off(Xr,this.documentClick),this.parent.off(un,this.updateMoreEventContent)},a.prototype.destroyPopupButtons=function(i){for(var e="quickPopup"===i?this.quickPopup:this.morePopup,n=0,r=[].slice.call(e.element.querySelectorAll(".e-control.e-btn"));n<r.length;n++){var l=r[n].ej2_instances[0];l&&l.destroy()}if("quickPopup"===i){var h=e.element.querySelector("input."+Ut);h&&h.remove();var d=this.quickPopup.element.querySelector("form."+qr);d&&(Dn(d),d.remove()),this.parent.resetTemplates(["content","header","footer"])}},a.prototype.refreshQuickDialog=function(){this.destroyQuickDialog(),this.renderQuickDialog()},a.prototype.refreshQuickPopup=function(){this.destroyQuickPopup(),this.renderQuickPopup()},a.prototype.refreshMorePopup=function(){this.destroyMorePopup(),this.renderMorePopup()},a.prototype.destroyQuickDialog=function(){this.quickDialog.element&&(this.quickDialog.destroy(),(0,s.TF)(this.quickDialog.element),this.quickDialog=null)},a.prototype.destroyQuickPopup=function(){this.quickPopup.element&&(this.destroyPopupButtons("quickPopup"),this.quickPopup.destroy(),(0,s.TF)(this.quickPopup.element),this.quickPopup=null)},a.prototype.destroyMorePopup=function(){this.morePopup.element&&(this.destroyPopupButtons("morePopup"),this.morePopup.destroy(),(0,s.TF)(this.morePopup.element),this.morePopup=null)},a.prototype.destroy=function(){this.quickPopup.element.querySelectorAll(".e-formvalidator").length&&this.fieldValidator.destroy(),this.removeEventListener(),this.destroyQuickPopup(),this.destroyMorePopup(),this.destroyQuickDialog(),this.dialogEvent=null,this.parent=null,this.l10n=null,this.isCrudAction=null,this.fieldValidator=null,this.isMultipleEventSelect=null},a}(),im=function(){function a(i){this.parent=i,this.tooltipObj=new ae.m_({animation:{close:{effect:"FadeOut"}},content:"No title",position:"BottomRight",offsetY:10,mouseTrail:!this.parent.isAdaptive,showTipPointer:!1,cssClass:this.parent.cssClass+" e-schedule-event-tooltip",target:this.getTargets(),beforeRender:this.onBeforeRender.bind(this),beforeClose:this.onTooltipClose.bind(this),beforeOpen:this.onTooltipOpen.bind(this),enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer}),this.tooltipObj.appendTo(this.parent.element)}return a.prototype.getTargets=function(){var i=[];return this.parent.activeViewOptions.group.headerTooltipTemplate&&i.push("."+on),this.parent.eventSettings.enableTooltip&&i.push("."+Ce),i.join(",")},a.prototype.onBeforeRender=function(i){var e=this;if(this.parent.uiStateValues.isSwipeScroll)i.cancel=!0;
1else if((0,s.hX)(i.target.getAttribute("data-tooltip-id"))){if(i.target.classList.contains(on)&&this.parent.activeViewOptions.group.resources.length>0){var t=void 0;if(this.parent.activeView.isTimelineView()){var n=parseInt(i.target.getAttribute("data-group-index"),10);t=this.parent.resourceBase.lastResourceLevel[parseInt(n.toString(),10)]}else{var r=i.target.parentNode.sectionRowIndex,o=i.target.cellIndex;t=this.parent.activeView.getColumnLevels()[parseInt(r.toString(),10)][parseInt(o.toString(),10)]}var l={resource:t.resource,resourceData:t.resourceData},h=(0,s.n)("div"),d=this.parent.element.id+"_headerTooltipTemplate",p=[].slice.call(this.parent.getHeaderTooltipTemplate()(l,this.parent,"headerTooltipTemplate",d,!1));return(0,s.BC)(p,h),this.setContent(h),void this.parent.renderTemplates()}var u=this.parent.eventBase.getEventByGuid(i.target.getAttribute("data-guid"));if(!(0,s.hX)(u)){if((0,s.hX)(this.parent.eventSettings.tooltipTemplate)){var f=this.parent.globalize,m=this.parent.eventFields,g=new Date(""+u[m.startTime]),v=new Date(""+u[m.endTime]);v=v.getTime()-g.getTime()!=0&&0===v.getHours()&&0===v.getMinutes()?new Date(v.setMilliseconds(-1e3)):v;var b=k(new Date(""+g)),y=k(new Date(""+v)),S=u[m.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),E=(0,s.hX)(u[m.location])?"":u[m.location],_="",T="",I="";_=f.formatDate(g,{type:"date",skeleton:"MMMd",calendar:this.parent.getCalendarMode()}),T=f.formatDate(g,{type:"date",skeleton:"medium",calendar:this.parent.getCalendarMode()}),I=f.formatDate(v,{type:"date",skeleton:"medium",calendar:this.parent.getCalendarMode()}),_=yt(_,"single"),T=yt(T,"single"),I=yt(I,"single");var w=this.parent.getTimeString(g),A=this.parent.getTimeString(v),L='<div><div class="e-subject">'+S+'</div><div class="e-location">'+E+'</div><div class="e-details">'+(b.getTime()===y.getTime()?yt(f.formatDate(g,{type:"date",skeleton:"long",calendar:this.parent.getCalendarMode()}),"single"):b.getFullYear()===y.getFullYear()?_+" - "+I:T+" - "+I)+'</div><div class="e-all-day">'+(u[m.isAllDay]?this.parent.localeObj.getConstant("allDay"):w+" - "+A)+"</div></div>";this.setContent((0,s.dG)(function(){return L}))}else h=(0,s.n)("div"),d=this.parent.element.id+"_tooltipTemplate",p=[].slice.call(this.parent.getEventTooltipTemplate()(u,this.parent,"tooltipTemplate",d,!1)),(0,s.BC)(p,h),this.setContent(h);this.parent.renderTemplates(function(){if(e.parent&&e.parent.isReact&&!(0,s.hX)(e.parent.eventSettings.tooltipTemplate)){var G=document.querySelector("."+Nf);G&&(0,s.vy)([G],Nf)}})}}},a.prototype.onTooltipOpen=function(i){i.element&&this.parent.isReact&&!(0,s.hX)(this.parent.eventSettings.tooltipTemplate)&&(0,s.iQ)([i.element],Nf);var e=this.parent.eventBase.getEventByGuid(i.target.getAttribute("data-guid"));(0,s.hX)(e)||this.parent.trigger("tooltipOpen",{cancel:!1,data:e,content:i.element,target:i.target},function(n){n.cancel?i.cancel=!0:i.element=n.content})},a.prototype.onTooltipClose=function(i){i.element&&((0,s.vy)([i.element],Qt),(0,s.iQ)([i.element],"e-popup-close")),this.parent.isReact&&this.parent.eventWindow.dialogObject&&this.parent.eventWindow.dialogObject.visible||this.parent.resetTemplates(["tooltipTemplate","headerTooltipTemplate"])},a.prototype.setContent=function(i){this.tooltipObj.setProperties({content:i,windowCollision:!0},!0)},a.prototype.close=function(){this.tooltipObj.close()},a.prototype.destroy=function(){this.tooltipObj.destroy(),(0,s.iQ)([this.parent.element],"e-control"),this.tooltipObj=null,this.parent=null},a}(),Xw=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),$i=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},_r="e-input-wrapper",nm="e-input-wrapper-side",rm="e-repeat-element",Ql="e-repeat-interval",Py="e-interval",Tr="e-days",yd="e-non-week",Sd="e-year-expander",Dy="e-year-expander-element",sm="e-month-expander",ky="e-month-expander-element",My="e-month-expander-checkbox-wrapper",Jl="e-form-left",Cd="e-form-right",om="e-month-day",Ly="e-month-expander-wrapper",Ry="e-month-pos",Ny="e-month-week",am="e-end-on",Vy="e-end-on-element",lm="e-end-on-date",Fy="e-until-date",cm="e-end-on-count",Kl="e-recurrence-count",Ir="e-hide-recurrence-element",vo="e-primary",Hy="e-active",zy="e-recurrence-table",Xy="e-repeat-content",Zl="none",ec="daily",tc="weekly",ic="monthly",nc="yearly",hm="never",rc="until",sc="count",Ed="text",_d="value",Yy="MONTHLY",Ln=";",fO={none:"",daily:"days",weekly:"weeks",monthly:"months",yearly:"years"},Td={sun:"SU",mon:"MO",tue:"TU",wed:"WE",thu:"TH",fri:"FR",sat:"SA"},rS=[Tr,yd,am,Py,Sd,sm],mO=[yd],gO=[Tr,Sd],vO=[Tr],bO=[Tr,yd,Sd,sm],sS=[lm,cm],yO=[lm],SO=[cm],CO=function(a){function i(e,t){var n=a.call(this,e,t)||this;return n.defaultLocale={none:"None",daily:"Daily",weekly:"Weekly",monthly:"Monthly",month:"Month",yearly:"Yearly",never:"Never",until:"Until",count:"Count",first:"First",second:"Second",third:"Third",fourth:"Fourth",last:"Last",repeat:"Repeat",repeatEvery:"Repeat every",on:"Repeat On",end:"End",onDay:"Day",days:"Day(s)",weeks:"Week(s)",months:"Month(s)",years:"Year(s)",every:"every",summaryTimes:"time(s)",summaryOn:"on",summaryUntil:"until",summaryRepeat:"Repeats",summaryDay:"day(s)",summaryWeek:"week(s)",summaryMonth:"month(s)",summaryYear:"year(s)",monthWeek:"Month Week",monthPosition:"Month Position",monthExpander:"Month Expander",yearExpander:"Year Expander",repeatInterval:"Repeat Interval"},n.renderStatus=!1,n.dayButtons=[],n.monthButtons=[],n}
1return Xw(i,a),i.prototype.startState=function(e,t,n){this.showFormElement(),this.updateForm(e),this.freshOnEndForm(),this.updateEndOnForm(t),this.selectMonthDay(n),this.updateUntilDate(n),this.onMonthDay.setProperties({checked:!0})},i.prototype.preRender=function(){this.localeObj=new s.Wo(this.getModuleName(),this.defaultLocale,this.locale),this.calendarUtil=Yf(this.calendarMode)},i.prototype.applyCustomClass=function(e){e&&(0,s.iQ)([this.element],e.split(" "))},i.prototype.initialize=function(){(0,s.iQ)([this.element],"e-"+this.getModuleName()),this.renderComponent(),"string"==typeof this.startDate&&this.setProperties({startDate:new Date(this.startDate)},!1),(0,s.hX)(this.value)||""===this.value?((0,s.hX)(this.repeatType.value)||(this.startState(this.repeatType.value.toString().toUpperCase(),this.endTypes[0],this.startDate),this.updateForm(this.repeatType.value.toString())),this.selectedType>0&&this.setProperties({value:this.getRecurrenceRule()},!1)):this.setRecurrenceRule(this.value),this.applyCustomClass(this.cssClass)},i.prototype.triggerChangeEvent=function(){var e=this;if(this.renderStatus){var t=this.getRecurrenceRule();this.trigger("change",{value:t},function(n){return e.setProperties({value:n.value},!1)})}},i.prototype.resetDayButton=function(){[].slice.call(this.element.querySelectorAll(".e-days button")).forEach(function(t){return(0,s.vy)([t],[Hy,vo])})},i.prototype.daySelection=function(e){this.resetDayButton();var t=[0,1,2,3,4,5,6];this.rotateArray(t,this.firstDayOfWeek);var n=this.element.querySelector('.e-days button[data-index="'+t.indexOf(e)+'"]');n&&(0,s.iQ)([n],[Hy,vo])},i.prototype.rtlClass=function(e){e?(0,s.iQ)([this.element],"e-rtl"):(0,s.vy)([this.element],"e-rtl")},i.prototype.updateUntilDate=function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+60),this.untilDateObj.setProperties({value:t})},i.prototype.selectMonthDay=function(e){this.monthDate.setProperties({value:this.calendarUtil.getDate(e)}),this.monthWeekDays.setProperties({value:Td[["sun","mon","tue","wed","thu","fri","sat"][e.getDay()]]}),this.monthValue.setProperties({value:""+this.calendarUtil.getMonth(e)}),this.monthWeekPos.setProperties({value:this.getDayPosition(e)}),this.daySelection(e.getDay())},i.prototype.updateForm=function(e){var t=this;this.repeatType.setProperties({value:e});var n=this.element.querySelector("."+am);switch(e===ec?(0,s.pP)(n,[Jl],[Cd]):(0,s.pP)(n,[Cd],[Jl]),e){case Zl:rS.forEach(function(r){return(0,s.iQ)([t.element.querySelector("."+r)],Ir)});break;case tc:mO.forEach(function(r){return(0,s.iQ)([t.element.querySelector("."+r)],Ir)});break;case ic:gO.forEach(function(r){return(0,s.iQ)([t.element.querySelector("."+r)],Ir)});break;case nc:vO.forEach(function(r){return(0,s.iQ)([t.element.querySelector("."+r)],Ir)});break;case ec:bO.forEach(function(r){return(0,s.iQ)([t.element.querySelector("."+r)],Ir)})}},i.prototype.updateEndOnForm=function(e){var t=this;switch(this.endType.setProperties({value:e}),e){case hm:sS.forEach(function(n){return(0,s.iQ)([t.element.querySelector("."+n)],Ir)});break;case rc:SO.forEach(function(n){return(0,s.iQ)([t.element.querySelector("."+n)],Ir)});break;case sc:yO.forEach(function(n){return(0,s.iQ)([t.element.querySelector("."+n)],Ir)})}},i.prototype.freshOnEndForm=function(){var e=this;sS.forEach(function(t){var n=e.element.querySelector("."+t);n&&(0,s.vy)([n],Ir)})},i.prototype.showFormElement=function(){var e=this;rS.forEach(function(t){var n=e.element.querySelector("."+t);n&&(0,s.vy)([n],Ir)})},i.prototype.renderDropdowns=function(){var e=this,t=this;this.repeatType=new vs({dataSource:this.getRepeatData(),floatLabelType:"Always",enableRtl:this.enableRtl,index:this.selectedType,fields:{text:Ed,value:_d},placeholder:this.localeObj.getConstant("repeat"),htmlAttributes:{title:this.localeObj.getConstant("repeat")},change:function(r){t.setProperties({selectedType:e.frequencies.indexOf(r.value)},!1),t.element.querySelector("."+Xy).innerHTML=t.localeObj.getConstant(fO[r.value]),t.showFormElement(),t.updateForm(r.value),t.resetFormValues(),t.triggerChangeEvent()}}),this.repeatType.appendTo(this.element.querySelector("."+rm)),this.endType=new vs({dataSource:this.getEndData(),popupWidth:this.getPopupWidth(),floatLabelType:"Always",placeholder:this.localeObj.getConstant("end"),enableRtl:this.enableRtl,index:1,fields:{text:Ed,value:_d},change:function(r){t.freshOnEndForm(),t.updateEndOnForm(r.value),t.resetFormValues(),t.triggerChangeEvent()}}),this.endType.appendTo(this.element.querySelector("."+Vy));var n=function(r){return new vs({dataSource:r,popupWidth:e.getPopupWidth(),enableRtl:e.enableRtl,fields:{text:Ed,value:_d},index:1,change:function(o){t.onWeekDay.setProperties({checked:!0}),t.resetFormValues(),t.triggerChangeEvent()}})};this.monthWeekPos=n(this.getMonthPosData()),this.monthWeekPos.appendTo(this.element.querySelector("."+Ry)),this.monthWeekDays=n(this.getDayData("wide")),this.monthWeekDays.appendTo(this.element.querySelector("."+Ny)),this.monthValue=new vs({dataSource:this.getMonthData(),fields:{text:Ed,value:_d},enableRtl:this.enableRtl,index:7,change:function(r){t.resetFormValues(),t.triggerChangeEvent()}}),this.monthValue.appendTo(this.element.querySelector("."+Dy))},i.prototype.setDefaultValue=function(){for(var t=0,n=[].slice.call(this.element.querySelectorAll(".e-control .e-numerictextbox"));t<n.length;t++){var o=n[t].ej2_instances[0];o.element.classList.contains(Ql)?(o.value=1,o.dataBind()):o.element.classList.contains(Kl)&&(o.value=10,o.dataBind())}},i.prototype.resetFormValues=function(){for(var t=0,n=[].slice.call(this.element.querySelectorAll('.e-control [type="text"]'));t<n.length;t++){var r=n[t],o=void 0;if(r.classList.contains("e-datepicker"))(o=r.ej2_instances[0]).value?(o.value=o.value,o.dataBind()):this.updateUntilDate(this.startDate);else if(r.classList.contains("e-dropdownlist"))(o=r.ej2_instances[0]).index=o.index||0,o.dataBind();else if(r.classList.contains("e-numerictextbox")){var l;l=(o=r.ej2_instances[0]).element.classList.contains(Ql)?1:o.element.classList.contains(Kl)?10:this.startDate.getDate(),o.value=o.value||l,o.dataBind()}}},i.prototype.getPopupWidth=function(){return s.Pw.isDevice?"100%":"auto"},i.prototype.renderDatePickers=function(){var e=this;this.untilDateObj=new Su.lr({firstDayOfWeek:this.firstDayOfWeek,enableRtl:this.enableRtl,locale:this.locale,min:this.minDate,max:this.maxDate,format:(0,s.hX)(this.dateFormat)?this.getFormat("dateFormats"):this.dateFormat,change:function(t){t.value&&e.triggerChangeEvent()}}),this.untilDateObj.appendTo(this.element.querySelector("."+Fy))},i.prototype.getFormat=function(e){return"en"===this.locale||"en-US"===this.locale?(0,s._W)(e+".short",(0,s.P)(this.getCalendarMode())):(0,s._W)("main."+this.locale+".dates.calendars."+this.getCalendarMode()+"."+e+".short",s.pE)},i.prototype.dayButtonRender=function(){for(var e=this,t=[].slice.call(this.element.querySelectorAll(".e-days button")),n=this,r=0,o=t;r<o.length;r++){var l=o[r],h=new ke.$n({isToggle:!0,enableRtl:this.enableRtl},l);this.dayButtons.push(h),s.Jm.add(l,"click",function(d){var p=[].slice.call(e.element.querySelectorAll(".e-days button."+vo)),u=d.target;u.classList.contains(vo)?p.length>1&&((0,s.vy)([u],vo),n.triggerChangeEvent()):((0,s.iQ)([u],vo),n.triggerChangeEvent())})}},i.prototype.radioButtonRender=function(){var e=this;this.onMonthDay=new ke.a({label:this.localeObj.getConstant("onDay"),enableRtl:this.enableRtl,name:"monthType",value:"day",change:function(){e.resetFormValues(),e.triggerChangeEvent()}}),this.onMonthDay.appendTo(this.element.querySelector("."+ky)),this.monthButtons.push(this.onMonthDay),this.onWeekDay=new ke.a({label:this.localeObj.getConstant("monthExpander"),cssClass:"e-month-type",name:"monthType",enableRtl:this.enableRtl,value:"daypos",change:function(){e.resetFormValues(),e.triggerChangeEvent()}}),this.onWeekDay.appendTo(this.element.querySelector("."+Ly)),this.monthButtons.push(this.onWeekDay)},i.prototype.numericTextboxRender=function(){var e=this;this.recurrenceCount=new J.uI({value:10,format:"#",enableRtl:this.enableRtl,min:1,max:999,change:function(){e.triggerChangeEvent()}}),this.recurrenceCount.appendTo(this.element.querySelector("."+Kl)),this.monthDate=new J.uI({value:1,format:"#",enableRtl:this.enableRtl,min:1,max:31,change:function(){e.onMonthDay.setProperties({checked:!0}),e.triggerChangeEvent()}}
1),this.monthDate.appendTo(this.element.querySelector("."+om)),this.repeatInterval=new J.uI({value:1,format:"#",min:1,max:999,enableRtl:this.enableRtl,floatLabelType:"Always",placeholder:this.localeObj.getConstant("repeatEvery"),change:function(){e.triggerChangeEvent()}}),this.repeatInterval.appendTo(this.element.querySelector("."+Ql))},i.prototype.renderComponent=function(){this.setTemplate(),this.renderDropdowns(),this.renderDatePickers(),this.dayButtonRender(),this.radioButtonRender(),this.numericTextboxRender()},i.prototype.rotateArray=function(e,t){for(var n,r=0;r<t;r++)n=e.shift(),e.push(n)},i.prototype.getEndData=function(){var e=this,t=[];return this.endTypes.forEach(function(n){t.push({text:e.localeObj.getConstant(n),value:n})}),t},i.prototype.getDayPosition=function(e){var t=new Date(e.getTime()),n=new Date(e.getTime()),r=e.getDay(),o=[];for(t=this.calendarUtil.getMonthStartDate(t),n=this.calendarUtil.getMonthEndDate(n);t<n;)t.getDay()===r&&o.push(t.getTime()),t.setDate(t.getDate()+1);return o.indexOf(e.getTime())===o.length-1?-1:o.indexOf(e.getTime())+1},i.prototype.getRepeatData=function(){var e=[],t=this;return this.frequencies.forEach(function(n){e.push({text:t.localeObj.getConstant(n===Zl?hm:n),value:n})}),e},i.prototype.getMonthPosData=function(){var t={first:1,second:2,third:3,fourth:4,last:-1},n=this,r=[];return["first","second","third","fourth","last"].forEach(function(o){r.push({text:n.localeObj.getConstant(o),value:t[""+o]})}),r},i.prototype.getDayData=function(e){var r,t=["sun","mon","tue","wed","thu","fri","sat"],n=[];if(this.rotateArray(t,this.firstDayOfWeek),"en"===this.locale||"en-US"===this.locale)r=(0,s._W)((o="days.stand-alone.")+e,(0,s.P)(this.getCalendarMode()));else{var o="main."+this.locale+".dates.calendars."+this.getCalendarMode()+".days.stand-alone."+e;r=(0,s._W)(o,s.pE)}for(var l=0,h=t;l<h.length;l++){var d=h[l],p=(0,s._W)(d,r);n.push({text:"narrow"===e?p:yt(p,"single"),value:Td[""+d]})}return n},i.prototype.getMonthData=function(){var t,e=[];if("en"===this.locale||"en-US"===this.locale)t=(0,s._W)(n="months.stand-alone.wide",(0,s.P)(this.getCalendarMode()));else{var n="main."+this.locale+".dates.calendars."+this.getCalendarMode()+".months.stand-alone.wide";t=(0,s._W)(n,s.pE)}for(var r=0,o=Object.keys(t);r<o.length;r++){var l=o[r];e.push({text:yt((0,s._W)(l,t),"single"),value:l})}return e},i.prototype.setTemplate=function(){var e=this.getDayData("narrow"),t=this.getDayData("wide");this.element.innerHTML='<div class="e-editor"><div class="'+_r+" "+Jl+'"><input type="text" tabindex="0" class="'+rm+'"label="'+rm.substr(2)+'" /></div><div class="'+_r+" "+Py+" "+Cd+'"><table  class="'+zy+' e-repeat-content-wrapper"  role="none"><tr><td><input type="text" tabindex="0" id="'+this.element.id+"_"+Ql+'" class="'+Ql+'"title="'+this.localeObj.getConstant("repeatEvery")+'" /></td><td><span class="'+Xy+'"></span></td></tr></table></div><div class="'+nm+" "+Tr+" "+Jl+'"><div class=e-week-expander-label>'+this.localeObj.getConstant("on")+'</div><button type="button" class="e-round" data-index="0" title="'+t[0].text+'">'+e[0].text+'</button><button type="button" class="e-round" data-index="1" title="'+t[1].text+'">'+e[1].text+'</button><button type="button" class="e-round" data-index="2" title="'+t[2].text+'">'+e[2].text+'</button><button type="button" class="e-round" data-index="3" title="'+t[3].text+'">'+e[3].text+'</button><button type="button" class="e-round" data-index="4" title="'+t[4].text+'">'+e[4].text+'</button><button type="button" class="e-round" data-index="5" title="'+t[5].text+'">'+e[5].text+'</button><button type="button" class="e-round" data-index="6" title="'+t[6].text+'">'+e[6].text+'</button></div><div class="'+nm+" "+yd+" "+Jl+'"><div class=e-month-expander-label>'+this.localeObj.getConstant("on")+'</div><div class="'+Sd+'"><input class="'+Dy+'" type="text" tabindex="0" title="'+this.localeObj.getConstant("yearExpander")+'"/></div><div class="'+sm+'"><table class="'+zy+' e-month-expand-wrapper" role="none"><tr><td><div class="'+_r+" "+My+'"><input class="'+ky+'"title="'+this.localeObj.getConstant("monthExpander")+'" type="radio"></div></td><td colspan="2"><div class="'+_r+' e-monthday-element">
1<input type="text" tabindex="0" id="'+this.element.id+"_"+om+'" class="'+om+'"title="'+this.localeObj.getConstant("on")+'" /></div></td></tr><tr><td><div class="'+_r+" "+My+' e-repeat-on-week-selector"><input class="'+Ly+'"title="'+this.localeObj.getConstant("monthExpander")+'" type="radio"></div></td><td><div class="'+_r+' e-week-position" ><input type="text" tabindex="0" class="'+Ry+'"title="'+this.localeObj.getConstant("monthPosition")+'" /></div></td><td><div class="'+_r+' e-day-position"><input type="text" tabindex="0" class="'+Ny+'"title="'+this.localeObj.getConstant("monthWeek")+'" /></div></td></tr></table></div></div><div class="'+nm+" "+am+" "+Cd+'"><div class="'+_r+' e-end-on-left"><input type="text" tabindex="0" class="'+Vy+'"title="'+this.localeObj.getConstant("end")+'" /></div><div class="'+_r+" "+lm+'" ><input type="text" tabindex="0" class="'+Fy+'"title="'+this.localeObj.getConstant(rc)+'" /></div><div class="'+_r+" "+cm+'"><input type="text" tabindex="0" id="'+this.element.id+"_"+Kl+'" class="'+Kl+'"title="'+this.localeObj.getConstant(sc)+'" /></div></div></div></div>'},i.prototype.getSelectedDaysData=function(){var e="BYDAY=",t=[].slice.call(this.element.querySelectorAll(".e-days button."+vo)),n=["SU","MO","TU","WE","TH","FR","SA"];this.rotateArray(n,this.firstDayOfWeek);for(var r=0;r<t.length;r++)e+=n[parseInt(t[parseInt(r.toString(),10)].getAttribute("data-index"),10)]+(r===t.length-1?"":",");return e+Ln},i.prototype.getSelectedMonthData=function(){return this.onWeekDay.checked?"BYDAY="+this.monthWeekDays.value+";BYSETPOS="+this.monthWeekPos.value+Ln:"BYMONTHDAY="+this.monthDate.value+Ln},i.prototype.getIntervalData=function(){return"INTERVAL="+this.repeatInterval.value+Ln},i.prototype.getEndOnCount=function(){return"COUNT="+this.recurrenceCount.value+Ln},i.prototype.getYearMonthRuleData=function(){return"BYMONTH="+this.monthValue.value+Ln},i.prototype.updateWeekButton=function(e){var t=["SU","MO","TU","WE","TH","FR","SA"];this.rotateArray(t,this.firstDayOfWeek);for(var n=0,r=this.dayButtons;n<r.length;n++){var o=r[n],l=parseInt(o.element.getAttribute("data-index"),10);-1!==e.indexOf(t[parseInt(l.toString(),10)])?o.setProperties({isPrimary:!0}):o.setProperties({isPrimary:!1})}},i.prototype.updateMonthUI=function(){if(this.ruleObject.monthDay.length)this.monthDate.setProperties({value:this.ruleObject.monthDay[0]}),this.onMonthDay.setProperties({checked:!0});else{this.onWeekDay.setProperties({checked:!0}),this.monthWeekPos.setProperties({value:this.ruleObject.setPosition});for(var e=0,t=Object.keys(Td);e<t.length;e++)if(Td[""+t[e]]===this.ruleObject.day[0]){this.monthWeekDays.setProperties({value:this.ruleObject.day[0]});break}}},i.prototype.updateUI=function(e,t){switch(this.repeatInterval.setProperties({value:this.ruleObject.interval}),t){case rc:this.untilDateObj.setProperties({value:this.ruleObject.until});break;case sc:this.recurrenceCount.setProperties({value:this.ruleObject.count})}switch(e){case tc:this.updateWeekButton(this.ruleObject.day);break;case nc:this.monthValue.setProperties({index:this.ruleObject.month[0]-1}),this.updateMonthUI();break;case ic:this.updateMonthUI()}},i.prototype.getUntilData=function(){return this.untilDateObj.value?"UNTIL="+Jr(this.untilDateObj.value)+Ln:""},i.prototype.destroyComponents=function(){this.recurrenceCount.isDestroyed||(this.recurrenceCount.destroy(),this.recurrenceCount=null),this.monthDate.isDestroyed||(this.monthDate.destroy(),this.monthDate=null),this.repeatInterval.isDestroyed||(this.repeatInterval.destroy(),this.repeatInterval=null),this.untilDateObj.isDestroyed||(this.untilDateObj.destroy(),this.untilDateObj=null),this.repeatType.isDestroyed||(this.repeatType.destroy(),this.repeatType=null),this.endType.isDestroyed||(this.endType.destroy(),this.endType=null),this.monthWeekPos.isDestroyed||(this.monthWeekPos.destroy(),this.monthWeekPos=null),this.monthWeekDays.isDestroyed||(this.monthWeekDays.destroy(),this.monthWeekDays=null),this.monthValue.isDestroyed||(this.monthValue.destroy(),this.monthValue=null),this.onMonthDay.isDestroyed||(this.onMonthDay.destroy(),this.onMonthDay=null),this.onWeekDay.isDestroyed||(this.onWeekDay.destroy(),this.onWeekDay=null),this.dayButtons.forEach(function(e){e.isDestroyed||e.destroy()}),this.dayButtons=[],this.monthButtons.forEach(function(e){e.isDestroyed||e.destroy()}),this.monthButtons=[]},i.prototype.resetFields=function(){this.startState(Zl,this.endTypes[0],this.startDate),this.setDefaultValue()},i.prototype.updateRuleUntilDate=function(e){if(this.untilDateObj.value&&e){var t=this.untilDateObj.value,n=new Date(t.getFullYear(),t.getMonth(),t.getDate(),e.getHours(),e.getMinutes(),e.getMilliseconds());this.untilDateObj.setProperties({value:n})}},i.prototype.getCalendarMode=function(){return(0,s.hX)(this.calendarMode)?"gregorian":this.calendarMode.toLowerCase()},i.prototype.getRuleSummary=function(e){return void 0===e&&(e=this.getRecurrenceRule()),function sw(a,i,e,t){void 0===t&&(t="Gregorian");var o,l,n=Gf(a),r=i.getConstant("every")+" ",h=t.toLowerCase();if("en"===e||"en-US"===e){var p="days.stand-alone.abbreviated";l=(0,s._W)("months.stand-alone.abbreviated",(0,s.P)(h)),o=(0,s._W)(p,(0,s.P)(h))}else p="main."+e+".dates.calendars."+h+".days.stand-alone.abbreviated",l=(0,s._W)("main."+e+".dates.calendars."+h+".months.stand-alone.abbreviated",s.pE),o=(0,s._W)(p,s.pE);switch(n.interval>1&&(r+=n.interval+" "),n.freq){case"DAILY":r+=i.getConstant("summaryDay");break;case"WEEKLY":r+=i.getConstant("summaryWeek")+" "+i.getConstant(Jf)+" ",n.day.forEach(function(f,m){r+=yt((0,s._W)(xy[""+f],o),"single"),r+=n.day.length-1===m?"":", "});break;case"MONTHLY":r+=i.getConstant("summaryMonth")+" "+i.getConstant(Jf)+" ",r+=gy(n,o,i);break;case"YEARLY":r+=i.getConstant("summaryYear")+" "+i.getConstant(Jf)+" ",r+=yt((0,s._W)(n.month[0].toString(),l),"single")+" ",r+=gy(n,o,i)}if(n.count)r+=", "+n.count+" "+i.getConstant("summaryTimes");else if(n.until){var u=n.until;r+=", "+i.getConstant("summaryUntil")+" "+u.getDate()+" "+yt((0,s._W)((u.getMonth()+1).toString(),l),"single")+" "+u.getFullYear()}return r}(e,this.localeObj,this.locale,this.calendarMode)},i.prototype.getRecurrenceDates=function(e,t,n,r,o){return o=(0,s.hX)(o)?this.startDate:o,Xf(e,t,n,this.firstDayOfWeek,r,o,this.calendarMode)},i.prototype.getRecurrenceRule=function(){var e="FREQ=";switch(this.repeatType.value){case ec:e+="DAILY;";break;case tc:e+="WEEKLY;"+this.getSelectedDaysData();break;case ic:e+=Yy+Ln+this.getSelectedMonthData();break;case nc:e+="YEARLY;"+this.getSelectedMonthData()+this.getYearMonthRuleData();break;case Zl:return""}switch(e+=this.getIntervalData(),this.endType.value){case rc:e+=this.getUntilData();break;case sc:e+=this.getEndOnCount()}return e},i.prototype.setRecurrenceRule=function(e,t){if(void 0===t&&(t=this.startDate),e){this.renderStatus=!1,this.ruleObject=Gf(e);var n=this.ruleObject.count?sc:this.ruleObject.until?rc:hm;switch(this.ruleObject.freq){case"DAILY":this.startState(ec,n,t),this.updateUI(ec,n);break;case"WEEKLY":this.startState(tc,n,t),this.updateUI(tc,n);break;case Yy:this.startState(ic,n,t),this.updateUI(ic,n);break;case"YEARLY":this.startState(nc,n,t),this.updateUI(nc,n)}this.renderStatus=!0,this.triggerChangeEvent()}else this.repeatType.setProperties({value:Zl})}
1,i.prototype.detachInputs=function(){for(var t=0,n=[].slice.call(this.element.querySelectorAll("input"));t<n.length;t++)(0,s.Yo)(n[t])},i.prototype.destroy=function(){if(!this.isDestroyed){this.destroyComponents(),a.prototype.destroy.call(this);var e=["e-"+this.getModuleName()];for(this.cssClass&&(e=e.concat(this.cssClass.split(" "))),(0,s.vy)([this.element],e),this.detachInputs();this.element.firstElementChild;)this.element.removeChild(this.element.firstElementChild)}},i.prototype.getModuleName=function(){return"recurrenceeditor"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.render=function(){this.initialize(),this.rtlClass(this.enableRtl),this.renderStatus=!0,this.renderComplete()},i.prototype.onPropertyChanged=function(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++)switch(r[n]){case"startDate":this.selectMonthDay(e.startDate),this.updateUntilDate(e.startDate),this.endType.setProperties({index:0});break;case"enableRtl":this.rtlClass(e.enableRtl);break;case"cssClass":t.cssClass&&(0,s.vy)([this.element],t.cssClass.split(" ")),e.cssClass&&(0,s.iQ)([this.element],e.cssClass.split(" "));break;case"selectedType":this.repeatType.setProperties({index:this.selectedType});break;case"minDate":this.untilDateObj.setProperties({min:this.minDate});break;case"maxDate":this.untilDateObj.setProperties({max:this.maxDate});break;case"value":this.getRecurrenceRule()!==this.value&&this.setRecurrenceRule(this.value);break;case"calendarMode":this.calendarMode=e.calendarMode,this.calendarUtil=Yf(e.calendarMode);break;case"locale":case"frequencies":case"firstDayOfWeek":case"endTypes":this.refresh();break;case"dateFormat":this.untilDateObj.setProperties({format:e.dateFormat})}},$i([(0,s.mA)(["none","daily","weekly","monthly","yearly"])],i.prototype,"frequencies",void 0),$i([(0,s.mA)(["never","until","count"])],i.prototype,"endTypes",void 0),$i([(0,s.mA)(0)],i.prototype,"firstDayOfWeek",void 0),$i([(0,s.mA)(new Date)],i.prototype,"startDate",void 0),$i([(0,s.mA)()],i.prototype,"dateFormat",void 0),$i([(0,s.mA)("Gregorian")],i.prototype,"calendarMode",void 0),$i([(0,s.mA)()],i.prototype,"cssClass",void 0),$i([(0,s.mA)()],i.prototype,"value",void 0),$i([(0,s.mA)(new Date(1900,0,1))],i.prototype,"minDate",void 0),$i([(0,s.mA)(new Date(2099,11,31))],i.prototype,"maxDate",void 0),$i([(0,s.mA)(0)],i.prototype,"selectedType",void 0),$i([(0,s.Jh)()],i.prototype,"change",void 0),$i([(0,s.Jh)()],i.prototype,"created",void 0),$i([(0,s.Jh)()],i.prototype,"destroyed",void 0),$i([s.kc],i)}(s.uA),Zr="e-field",oc="e-recurrence-container",bo="e-hide",oS=function(){function a(i){this.parent=i,this.l10n=this.parent.localeObj,this.fields=this.parent.eventFields,this.eventWindowTime={startTime:new Date,endTime:new Date},this.renderEventWindow()}return a.prototype.renderEventWindow=function(){this.element=(0,s.n)("div",{id:this.parent.element.id+"_dialog_wrapper"}),this.parent.element.appendChild(this.element);var i={animationSettings:{effect:"Zoom"},content:this.getEventWindowContent(),cssClass:$r,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,height:this.parent.isAdaptive?"100%":"auto",minHeight:"300px",isModal:!0,showCloseIcon:!this.parent.isAdaptive,target:document.body,visible:!1,width:"500px",beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this)};this.parent.isAdaptive?(i.cssClass=$r+" "+ca,this.parent.editorHeaderTemplate||(i.header='<div class="e-title-header"><div class="e-back-icon e-icons"></div><div class="e-title-text">'+this.l10n.getConstant("newEvent")+'</div><div class="e-save-icon e-icons"></div></div>')):(this.parent.editorFooterTemplate||this.renderDialogButtons(i),this.parent.editorHeaderTemplate||(i.header='<div class="e-title-text">'+this.l10n.getConstant("newEvent")+"</div>")),this.dialogObject=new ae.lG(i,this.element),this.dialogObject.element.querySelector(".e-dlg-closeicon-btn")&&this.dialogObject.element.querySelector(".e-dlg-closeicon-btn").setAttribute("title",this.l10n.getConstant("close")),this.addEventHandlers(),(0,s.iQ)([this.element.parentElement],$r+"-container"),s.Jm.add(this.dialogOb
1ject.element,"keydown",this.preventEventSave,this),this.applyFormValidation()},a.prototype.renderDialogButtons=function(i){i.buttons=[{buttonModel:{content:this.l10n.getConstant("deleteButton"),cssClass:Wr,disabled:!this.parent.eventSettings.allowDeleting||this.parent.readonly},click:this.eventDelete.bind(this)},{buttonModel:{content:this.l10n.getConstant("saveButton"),cssClass:"e-primary "+hd,isPrimary:!0,disabled:!this.parent.eventSettings.allowAdding||this.parent.readonly},click:this.eventSave.bind(this)},{buttonModel:{cssClass:Yb,content:this.l10n.getConstant("cancelButton")},click:this.dialogClose.bind(this)}]},a.prototype.addEventHandlers=function(){var i=this.element.querySelector(".e-back-icon"),e=this.element.querySelector("."+Gb);this.parent.isAdaptive&&!(0,s.hX)(i)&&!(0,s.hX)(e)&&(s.Jm.add(i,"click",this.dialogClose,this),s.Jm.add(e,"click",this.eventSave,this))},a.prototype.refresh=function(){this.destroy(!0),this.renderEventWindow()},a.prototype.refreshRecurrenceEditor=function(){if(this.recurrenceEditor){var i=this.recurrenceEditor.element;this.recurrenceEditor.destroy(),this.createRecurrenceEditor(i)}},a.prototype.setRecurrenceEditor=function(i){this.parent.editorTemplate&&(this.recurrenceEditor=i)},a.prototype.openEditor=function(i,e,t,n){if(this.parent.currentAction=e,this.parent.removeNewEventElement(),this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(!0),this.parent.inlineModule.removeInlineAppointmentElement(),"Add"===e){var r={};this.cellClickAction=!t,this.parent.activeCellsData=i;var o=i;this.cellClickAction?this.convertToEventData(o,r):(this.parent.activeCellsData={startTime:o.startTime||o[this.fields.startTime],endTime:o.endTime||o[this.fields.endTime],isAllDay:o.isAllDay||o[this.fields.isAllDay],element:o.element,groupIndex:o.groupIndex},r=o),i=r}(0,s.hX)(this.parent.editorHeaderTemplate)||(this.parent.resetTemplates(["editorHeaderTemplate"]),this.dialogObject.header=this.parent.isAdaptive&&!this.parent.editorFooterTemplate?this.createAdaptiveHeaderElement(i):this.getDialogHeader(i)),(0,s.hX)(this.parent.editorFooterTemplate)||(this.parent.resetTemplates(["editorFooterTemplate"]),this.dialogObject.footerTemplate=this.getDialogFooter(i)),(!(0,s.hX)(this.parent.editorHeaderTemplate)||!(0,s.hX)(this.parent.editorFooterTemplate))&&(this.dialogObject.dataBind(),this.addEventHandlers()),(0,s.hX)(this.parent.editorTemplate)?this.setEditorContent(i,e,n):this.renderFormElements(this.element.querySelector(".e-schedule-form"),i,e,n)},a.prototype.setEditorContent=function(i,e,t){switch(!this.parent.isAdaptive&&(0,s.hX)(this.parent.editorTemplate)&&(0,s.vy)([this.dialogObject.element.querySelector(".e-recurrenceeditor")],ot),this.recurrenceEditor&&(this.recurrenceEditor.firstDayOfWeek=this.parent.activeViewOptions.firstDayOfWeek),e){case"Add":this.onCellDetailsUpdate(i,t);break;case"Save":case"EditOccurrence":case"EditSeries":case"EditFollowingEvents":"EditOccurrence"===e&&!this.parent.isAdaptive&&(0,s.hX)(this.parent.editorTemplate)&&(0,s.iQ)([this.dialogObject.element.querySelector(".e-recurrenceeditor")],ot),this.cellClickAction=!1,this.onEventDetailsUpdate(i)}},a.prototype.setDialogContent=function(){this.dialogObject.content=this.getEventWindowContent(),this.dialogObject.dataBind(),this.applyFormValidation()},a.prototype.setDialogHeader=function(){(0,s.hX)(this.parent.editorHeaderTemplate)?this.dialogObject.header=this.parent.isAdaptive?'<div class="e-title-header"><div class="e-back-icon e-icons"></div><div class="e-title-text">'+this.l10n.getConstant("newEvent")+'</div><div class="e-save-icon e-icons"></div></div>':'<div class="e-title-text">'+this.l10n.getConstant("newEvent")+"</div>":(this.parent.resetTemplates(["editorHeaderTemplate"]),this.dialogObject.header=this.parent.isAdaptive&&!this.parent.editorFooterTemplate?this.createAdaptiveHeaderElement():this.getDialogHeader()),this.dialogObject.dataBind(),this.addEventHandlers()},a.prototype.setDialogFooter=function(){(0,s.hX)(this.parent.editorFooterTemplate)?!this.parent.isAdaptive&&(0,s.hX)(this.parent.editorFooterTemplate)?this.renderDialogButtons(this.dialogOb
1ject):this.parent.isAdaptive&&(0,s.hX)(this.parent.editorFooterTemplate)&&(this.dialogObject.footerTemplate=null):(this.parent.resetTemplates(["editorFooterTemplate"]),this.dialogObject.footerTemplate=this.getDialogFooter()),this.dialogObject.dataBind()},a.prototype.createAdaptiveHeaderElement=function(i){var e=(0,s.n)("div",{className:"e-title-header"}),t=(0,s.n)("div",{className:"e-back-icon e-icons"});e.appendChild(t);var n=this.getDialogHeader(i);e.appendChild(n);var r=(0,s.n)("div",{className:"e-save-icon e-icons"});return e.appendChild(r),e},a.prototype.getDialogHeader=function(i){var e,t=this.parent.element.id+"_editorHeaderTemplate",n=document.createElement("div");return e=[].slice.call(this.parent.getEditorHeaderTemplate()(i||{},this.parent,"editorHeaderTemplate",t,!1)),(0,s.BC)(e,n),n},a.prototype.getDialogFooter=function(i){var e,t=this.parent.element.id+"_editorFooterTemplate",n=document.createElement("div");return e=[].slice.call(this.parent.getEditorFooterTemplate()(i||{},this.parent,"editorFooterTemplate",t,!1)),(0,s.BC)(e,n),n},a.prototype.preventEventSave=function(i){this.parent&&!this.parent.allowKeyboardInteraction&&"Enter"===i.code&&(this.isEnterKey=!0)},a.prototype.onBeforeOpen=function(i){var e=this,t=this.eventData[this.fields.endTime].getTime(),n={type:"Editor",data:this.eventData,cancel:!1,element:this.element,target:this.cellClickAction?this.parent.activeCellsData.element:this.parent.activeEventData.element};this.cellClickAction&&(n.duration=this.getSlotDuration());var r=this.getInstance(hd);r&&(r.disabled=!(this.cellClickAction?this.parent.eventSettings.allowAdding:this.parent.eventSettings.allowEditing),r.dataBind());var o=this.getInstance(Wr);o&&(o.disabled=!this.parent.eventSettings.allowDeleting,o.dataBind());var l=new x.cY;return this.parent.trigger(Cl,n,function(h){if(i.cancel=h.cancel,i.maxHeight=e.parent.isAdaptive?"max-content":i.maxHeight,e.duration=e.cellClickAction?h.duration:null,e.eventData[e.fields.endTime].getTime()===t&&!e.cellClickAction&&0===e.eventData[e.fields.endTime].getHours()&&0===e.eventData[e.fields.endTime].getMinutes()&&(e.eventData=(0,s.X$)({},e.eventData,null,!0),e.trimAllDay(e.eventData)),e.refreshDateTimePicker(e.duration),e.cellClickAction&&h.duration!==e.getSlotDuration()&&(0,s.hX)(e.parent.editorTemplate)){var d=e.getInstance(Os),p=e.getInstance(co);p.value=new Date(d.value.getTime()+wt*h.duration),p.dataBind()}e.parent.editorTemplate&&e.element.querySelector(".e-recurrenceeditor")&&!e.recurrenceEditor&&(e.recurrenceEditor=e.getInstance("e-recurrenceeditor")),l.resolve(i)}),l},a.prototype.onBeforeClose=function(i){var e=this;i.isInteracted&&(this.isCrudAction=!1);var t={type:"Editor",event:i.event||this.dialogEvent,data:this.eventCrudData,cancel:!1,element:this.element,target:this.cellClickAction?this.parent.activeCellsData.element:this.parent.activeEventData.element},n=new x.cY;return this.parent.trigger(Bh,t,function(r){i.cancel=r.cancel,r.cancel||(e.isCrudAction&&(i.cancel=e.processCrudActions(r.data),e.isCrudAction=i.cancel),e.isCrudAction||(e.resetForm(),e.parent.eventBase.focusElement(!0),e.eventCrudData=null)),n.resolve(i)}),n},a.prototype.getEventWindowContent=function(){var i=(0,s.n)("div",{className:"e-form-container"}),e=(0,s.n)("form",{id:this.parent.element.id+"EditForm",className:qr});return e.onsubmit=function(){return!1},this.renderFormElements(e),i.appendChild(e),i},a.prototype.renderFormElements=function(i,e,t,n){var r=this;if((0,s.hX)(this.parent.editorTemplate))i.appendChild(this.getDefaultEventWindowContent()),e&&this.setEditorContent(e,t,n);else{if(e&&(this.fieldValidator&&(this.fieldValidator.destroy(),this.fieldValidator=null),this.recurrenceEditor&&(this.recurrenceEditor.destroy(),this.recurrenceEditor=null),this.destroyComponents(),this.parent.resetTemplates(["editorTemplate"]),s.Jm.clearEvents(i),!this.parent.isReact))for(var l=0,h=[].slice.call(i.children);l<h.length;l++)(0,s.TF)(h[l]);var p=this.parent.element.id+"_editorTemplate",u=[].slice.call(this.parent.getEditorTemplate()(e||{},this.parent,"editorTemplate",p,!1));(0,s.BC)(u,i),this.parent.renderTemplates(function(){r.element&&(r.applyFormValidation(),e&&r.setEditorContent(e,t,n))})}},a.prototype.getDefaultEventWindowContent=function(){var i=this.createDivElement("e-dialog-parent"),e=this.createDivElement("e-title-location-row");i.appendChild(e),e.appendChild(this.renderTextBox(Ut)),e.appendChild(this.renderTextBox(lo));var t=this.createDivElement("e-start-end-row");i.appendChild(t),t.appendChild(this.renderDateTimePicker(Os,this.onTimeChange.bind(this))),t.appendChild(this.renderDateTimePicker(co));var n=this.createDivElement("e-all-day-time-zone-row");i.appendChild(n),n.appendChild(this.renderCheckBox(Fl)),n.appendChild(this.renderCheckBox(ws));var r=this.createDivElement(Hl);i.appendChild(r),r.appendChild(this.renderDropDown(zl)),r.appendChild(this.renderDropDown(Xl));var o=this.createDivElement("e-repeat-parent-row");
1i.appendChild(o);var l=this.renderCheckBox(Bl),h=(0,s.n)("span",{className:oc}),d=(0,s.n)("button",{className:"e-recurrence-edit-button",attrs:{type:"button",title:this.l10n.getConstant("editRecurrence")}});if(this.buttonObj=new ke.$n({iconCss:"e-recurrence-edit e-icons",cssClass:"e-medium "+this.parent.cssClass}),h.appendChild(d),this.buttonObj.appendTo(d),l.appendChild(h),o.appendChild(l),this.parent.isAdaptive?s.Jm.add(d,"click",this.loadRecurrenceEditor,this):this.createRecurrenceEditor(i),this.parent.resourceCollection.length>0){for(var p=this.createDivElement("e-resources-row"),u=0,f=this.parent.resourceBase.resourceCollection;u<f.length;u++)p.appendChild(this.renderResourceDetails(f[u]));i.appendChild(p)}var g=this.createDivElement(ya+"-row");g.appendChild(this.renderTextBox(ya)),i.appendChild(g);var v=(0,s.n)("button",{attrs:{type:"hidden",title:"submit"}});return v.style.display="none",i.appendChild(v),i},a.prototype.createRecurrenceEditor=function(i){var e=(0,s.n)("div",{id:this.parent.element.id+"_recurrence_editor"});i.appendChild(e),this.recurrenceEditor=this.renderRecurrenceEditor(),this.recurrenceEditor.appendTo(e),this.updateMinMaxDateToEditor()},a.prototype.createDivElement=function(i){return(0,s.n)("div",{className:i})},a.prototype.createInputElement=function(i,e,t){return(0,s.n)(t||"input",{className:i,attrs:{type:"text",name:e,value:"",id:e}})},a.prototype.getSlotDuration=function(){return this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount},a.prototype.renderDateTimePicker=function(i,e){var t=this.createDivElement(i+"-container"),n=this.getFieldName(i),r=this.createInputElement(i+" "+Zr,n);
1return t.appendChild(r),new Su.K7({change:e,firstDayOfWeek:this.parent.activeViewOptions.firstDayOfWeek,calendarMode:this.parent.calendarMode,min:this.parent.minDate,max:new Date(new Date(+this.parent.maxDate).setHours(23,59,59)),cssClass:this.parent.cssClass,enableRtl:this.parent.enableRtl,locale:this.parent.locale,floatLabelType:"Always",strictMode:!0,timeFormat:this.parent.activeViewOptions.timeFormat,format:((0,s.hX)(this.parent.dateFormat)?this.getFormat("dateFormats"):this.parent.dateFormat)+" "+this.parent.activeViewOptions.timeFormat,placeholder:this.getFieldLabel(i),step:this.getSlotDuration(),width:"100%"}).appendTo(r),t},a.prototype.refreshDateTimePicker=function(i){for(var n=0,r=[].slice.call(this.element.querySelectorAll("."+Os+",."+co));n<r.length;n++){var l=r[n].ej2_instances[0];l.firstDayOfWeek=this.parent.activeViewOptions.firstDayOfWeek,l.timeFormat=this.parent.activeViewOptions.timeFormat,l.step=i||this.getSlotDuration(),l.dataBind()}},a.prototype.onTimeChange=function(){var i=this.getInstance(Os);if(i.element.parentElement.classList.contains("e-input-focus")){var e=this.getInstance(co),t=0;this.cellClickAction?(t=wt*this.duration,this.eventWindowTime.startTime=i.value):t=this.eventData[this.fields.endTime].getTime()-this.eventData[this.fields.startTime].getTime();var n=(0,s.hX)(i.value)?null:new Date(i.value.getTime()+t);this.cellClickAction&&(this.eventWindowTime.endTime=n),e.value=n,e.dataBind()}this.recurrenceEditor&&this.recurrenceEditor.updateRuleUntilDate(this.eventWindowTime.startTime)},a.prototype.renderResourceDetails=function(i){var e=this,t=i.field,n="e-"+t,r=i.title,o=this.createDivElement(n+"-container e-resources"),l=this.createInputElement(n+" "+Zr,t);o.appendChild(l);var h=function(u){return s.r4.sanitize('<div class="e-resource-template">\n                <div class="e-resource-color" data-resource-color="'+u[i.colorField]+'"></div>\n                <div class="e-resource-text">'+u[i.textField]+"</div></div>")};return(0,s.dG)(h,i),i.allowMultiple?new U0({enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,cssClass:this.parent.cssClass||"",dataSource:i.dataSource,change:this.onMultiselectResourceChange.bind(this),itemTemplate:h,fields:{text:i.textField,value:i.idField},htmlAttributes:{name:t},floatLabelType:"Always",placeholder:r,popupHeight:"230px",popupWidth:"447px",mode:"Box",open:function(u){Promise.resolve().then(function(){e.applyStylesAfterRender(u)})}}).appendTo(l):new vs({cssClass:this.parent.cssClass||"",change:this.onDropdownResourceChange.bind(this),dataSource:i.dataSource,enableRtl:this.parent.enableRtl,fields:{text:i.textField,value:i.idField},htmlAttributes:{name:t},floatLabelType:"Always",placeholder:r,popupHeight:"230px",popupWidth:"447px",itemTemplate:h,open:function(u){Promise.resolve().then(function(){e.applyStylesAfterRender(u)})}}).appendTo(l),o},a.prototype.applyStylesAfterRender=function(i){i.popup&&i.popup.element&&i.popup.element.querySelectorAll(".e-resource-color[data-resource-color]").forEach(function(t){var n=t.getAttribute("data-resource-color");n&&(t.style.backgroundColor=n)})},a.prototype.renderDropDown=function(i){var e=this,t=this.getFieldName(i),n=this.createDivElement(i+"-container"),r=this.createInputElement(i+" "+Zr,t);return n.appendChild(r),new vs({allowFiltering:!0,change:this.onTimezoneChange.bind(this),cssClass:this.parent.cssClass||"",dataSource:this.parent.timezoneDataSource,enableRtl:this.parent.enableRtl,fields:{text:"Text",value:"Value"},filterBarPlaceholder:this.parent.localeObj.getConstant("searchTimezone"),noRecordsTemplate:this.parent.localeObj.getConstant("noRecords"),filtering:function(l){var h=new x.XK;h=""!==l.text?h.where("Text","contains",l.text,!0):h,l.updateData(e.parent.timezoneDataSource,h)},htmlAttributes:{title:this.getFieldLabel(i),name:t},floatLabelType:"Always",placeholder:this.getFieldLabel(i),popupHeight:"230px"}).appendTo(r),n},a.prototype.onMultiselectResourceChange=function(i){if(i.value&&this.parent.activeViewOptions.group.byGroupID&&!(this.parent.resourceCollection.length<=1))for(var e=this.parent.resourceBase.resourceCollection,t=i.element.getAttribute("name")||this.getColumnName(i.element),n=0;n<e.length;n++)if(e[parseInt(n.toString(),10)].field===t&&n<e.length-1){for(var r=this.createInstance(n),o=[],l=function(p){var u=e[n+1],f=u.dataSource.filter(function(v){return v[u.groupIDField]===i.value[parseInt(p.toString(),10)]})[0],m=(0,s.hX)(f)?null:f[e[n+1].groupIDField],g=h.filterDatasource(n,m);o=o.concat(g)},h=this,d=0;d<i.value.length;d++)l(d);r.dataSource=o,r.dataBind()}},a.prototype.createInstance=function(i){var t=this.element.querySelector(".e-"+this.parent.resourceBase.resourceCollection[i+1].field).ej2_instances[0];return t.clear(),t},a.prototype.onDropdownResourceChange=function(i){if(i.value&&!(this.parent.resourceCollection.length<=1)&&this.parent.activeViewOptions.group.byGroupID)for(var e=i.element.getAttribute("name")||this.getColumnName(i.element),t=this.parent.resourceBase.resourceCollection,n=0;n<t.length;n++)if(n<t.length-1&&t[parseInt(n.toString(),10)].field===e){var r=this.createInstance(n),o=i.itemData[t[parseInt(n.toString(),10)].idField];r.dataSource=this.filterDatasource(n,o),r.dataBind();var l=r.dataSource.length>0?r.dataSource[0][t[n+1].idField]:null;r.value=t[n+1].allowMultiple?[l]:l,r.dataBind()}},a.prototype.filterDatasource=function(i,e){var t=this.parent.resourceBase.resourceCollection[i+1];return t.dataSource.filter(function(n){return n[t.groupIDField]===e})},a.prototype.onTimezoneChange=function(i){if((i.element.getAttribute("name")||this.getColumnName(i.element))===this.parent.eventFields.startTimezone){var t=this.getInstance(zl),n=this.getInstance(Xl);n.value=t.value,n.dataBind()}},a.prototype.renderCheckBox=function(i){var e=this.createDivElement(i+"-container"),t=this.getFieldName(i),n=this.createInputElement(i+" "+Zr,t);e.appendChild(n);var r=new ke.oV({change:this.onChange.bind(this),cssClass:i+" "+this.parent.cssClass,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,label:this.getFieldLabel(i)});return r.appendTo(n),n.setAttribute("name",t),"Repeat"===t&&(this.repeatStatus=r),e},a.prototype.renderTextBox=function(i){var e=this.createDivElement(i+"-container"),t=this.getFieldName(i),r=this.createInputElement(i+" "+Zr,t,i===ya?"textarea":"input");return e.appendChild(r),J.pd.createInput({element:r,floatLabelType:"Always",properties:{enableRtl:this.parent.enableRtl,placeholder:this.getFieldLabel(i)}}),e},a.prototype.getFieldName=function(i){var e="";switch(i){case Ut:e=this.fields.subject;break;case lo:e=this.fields.location;break;case Os:e=this.fields.startTime;break;case co:e=this.fields.endTime;break;case ya:e=this.fields.description;break;case Fl:e=this.fields.isAllDay;break;case zl:e=this.fields.startTimezone;break;case Xl:e=this.fields.endTimezone;break;case ws:e="Timezone";break;case Bl:e="Repeat"}return e},a.prototype.getFieldLabel=function(i){var e="";switch(i){case Ut:e=this.parent.editorTitles.subject;break;case lo:e=this.parent.editorTitles.location;break;case ya:e=this.parent.editorTitles.description;break;case Os:e=this.parent.editorTitles.startTime;break;case co:e=this.parent.editorTitles.endTime;break;case zl:e=this.parent.editorTitles.startTimezone;break;case Xl:e=this.parent.editorTitles.endTimezone;break;case Bl:e=this.parent.editorTitles.recurrenceRule;break;case Fl:e=this.parent.editorTitles.isAllDay;break;case ws:e=this.l10n.getConstant("timezone")}return e},a.prototype.onChange=function(i){if(i.event&&i.event.target){var t=(0,s.kp)(i.event.target,"."+Fl+",."+ws+",."+Bl);t.classList.contains(Fl)?this.onAllDayChange(i.checked):t.classList.contains(ws)?this.timezoneChangeStyle(i.checked):t.classList.contains(Bl)&&this.onRepeatChange(i.checked)}},a.prototype.renderRepeatDialog=function(){var i=(0,s.n)("div");
1this.repeatDialogObject=new ae.lG({header:this.l10n.getConstant("recurrence"),visible:!1,content:'<div class="e-rec-editor"></div>',closeOnEscape:!0,width:"90%",buttons:[{click:this.repeatSaveDialog.bind(this),buttonModel:{content:this.l10n.getConstant("save"),cssClass:"e-save",isPrimary:!0}},{click:this.repeatCancelDialog.bind(this),buttonModel:{cssClass:"e-cancel",content:this.l10n.getConstant("cancel")}}],target:this.element,animationSettings:{effect:"Zoom"},enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,isModal:!0,cssClass:"e-recurrence-dialog",open:this.repeatOpenDialog.bind(this)}),this.element.appendChild(i),this.repeatDialogObject.appendTo(i),this.createRecurrenceEditor(this.repeatDialogObject.element.querySelector(".e-rec-editor"))},a.prototype.loadRecurrenceEditor=function(){this.repeatDialogObject.show(),this.recurrenceEditor&&this.repeatRule&&this.recurrenceEditor.setRecurrenceRule(this.repeatRule)},a.prototype.onRepeatChange=function(i){if(i)this.repeatDialogObject||this.renderRepeatDialog(),this.recurrenceEditor.setProperties({startDate:this.repeatStartDate,selectedType:0}),this.loadRecurrenceEditor();else{this.repeatDialogObject&&this.repeatDialogObject.hide(),this.repeatRule="",this.recurrenceEditor&&(this.recurrenceEditor.setRecurrenceRule(this.repeatRule),this.updateRepeatLabel(this.repeatRule));var e=this.element.querySelector("."+oc);(0,s.iQ)([e],bo)}},a.prototype.repeatSaveDialog=function(){this.repeatRule=this.recurrenceEditor.getRecurrenceRule();var i=this.element.querySelector("."+oc);this.recurrenceEditor.getRecurrenceRule()?(0,s.vy)([i],bo):((0,s.iQ)([i],bo),this.repeatStatus.setProperties({checked:!1})),this.updateRepeatLabel(this.repeatRule),this.closeRepeatDialog()},a.prototype.closeRepeatDialog=function(){this.repeatDialogObject.hide()},a.prototype.repeatCancelDialog=function(){this.closeRepeatDialog(),this.recurrenceEditor&&this.recurrenceEditor.setRecurrenceRule(this.repeatTempRule),this.repeatTempRule||this.repeatStatus.setProperties({checked:!1})},a.prototype.repeatOpenDialog=function(){this.repeatTempRule=this.recurrenceEditor.getRecurrenceRule()},a.prototype.onCellDetailsUpdate=function(i,e){if(this.parent.eventSettings.allowAdding){this.parent.isAdaptive&&e&&!this.repeatDialogObject&&this.renderRepeatDialog(),this.element.querySelector("."+qr).removeAttribute("data-id"),(0,s.hX)(this.parent.editorHeaderTemplate)&&(this.element.querySelector("."+Qb).innerHTML=this.l10n.getConstant("newEvent")),i.Timezone=!1,this.repeatStartDate=i[this.fields.startTime],this.repeatRule="",(0,s.hX)(this.parent.eventSettings.fields.subject.default)||(i[this.fields.subject]=this.parent.eventSettings.fields.subject.default),(0,s.hX)(this.parent.eventSettings.fields.location.default)||(i[this.fields.location]=this.parent.eventSettings.fields.location.default),(0,s.hX)(this.parent.eventSettings.fields.description.default)||(i[this.fields.description]=this.parent.eventSettings.fields.description.default),this.showDetail
1s(i),i[this.fields.recurrenceRule]&&this.recurrenceEditor&&(this.recurrenceEditor.setRecurrenceRule(i[this.fields.recurrenceRule],i[this.fields.startTime]),this.repeatRule=i[this.fields.recurrenceRule]);var t=this.element.querySelector("."+Wr);if(t&&(0,s.iQ)([t],ot),this.recurrenceEditor&&(this.recurrenceEditor.setProperties({startDate:i[this.fields.startTime],selectedType:(0,s.hX)(e)?(0,s.hX)(i[this.fields.recurrenceRule])?0:this.recurrenceEditor.selectedType:e}),this.repeatRule=this.recurrenceEditor.value),this.parent.isAdaptive&&(0,s.hX)(this.parent.editorTemplate)){var n=this.element.querySelector("."+oc);i[this.fields.recurrenceRule]||e?((0,s.vy)([n],bo),this.repeatStatus.setProperties({checked:!0})):((0,s.iQ)([n],bo),this.repeatStatus.setProperties({checked:!1})),this.updateRepeatLabel(this.repeatRule)}else{var r=this.element.querySelector("."+hd);this.disableButton(r,!1)}this.dialogObject.show()}},a.prototype.convertToEventData=function(i,e){i&&(i.subject&&(e[this.fields.subject]=i.subject),e[this.fields.startTime]=i.startTime,e[this.fields.endTime]=i.endTime,e[this.fields.isAllDay]=i.isAllDay,i.RecurrenceRule&&(e[this.fields.recurrenceRule]=i.RecurrenceRule),(this.parent.resourceCollection.length>0||this.parent.activeViewOptions.group.resources.length>0)&&this.parent.resourceBase.setResourceValues(e))},a.prototype.applyFormValidation=function(){var i=this.element.querySelector("."+qr);if(i){var e=function(d){return d&&Object.keys(d).length>0?d:void 0},t={},n=e(this.parent.eventSettings.fields.subject.validation);(0,s.hX)(n)||(t[this.parent.eventSettings.fields.subject.name]=n);var r=e(this.parent.eventSettings.fields.location.validation);(0,s.hX)(r)||(t[this.parent.eventSettings.fields.location.name]=r);var o=e(this.parent.eventSettings.fields.startTime.validation);(0,s.hX)(o)||(t[this.parent.eventSettings.fields.startTime.name]=o);var l=e(this.parent.eventSettings.fields.endTime.validation);(0,s.hX)(l)||(t[this.parent.eventSettings.fields.endTime.name]=l);var h=e(this.parent.eventSettings.fields.description.validation);(0,s.hX)(h)||(t[this.parent.eventSettings.fields.description.name]=h),this.fieldValidator&&(this.fieldValidator.destroy(),this.fieldValidator=null),this.fieldValidator=new Oy,this.fieldValidator.renderFormValidator(i,t,this.element,this.parent.locale)}},a.prototype.showDetails=function(i){this.eventData=i;var e=(0,s.X$)({},i,null,!0),t=this.getFormElements($r);(!this.cellClickAction||this.cellClickAction&&!(0,s.hX)(this.parent.editorTemplate))&&0===e[this.fields.endTime].getHours()&&0===e[this.fields.endTime].getMinutes()&&this.trimAllDay(e);for(var n=Object.keys(e),r=0,o=t;r<o.length;r++){var l=o[r],h=l.name||this.getColumnName(l);!(0,s.hX)(h)&&""!==h&&(-1!==n.indexOf(h)?this.setValueToElement(l,e[""+h]):this.setDefaultValueToElement(l))}if((0,s.hX)(this.parent.editorTemplate)){this.onAllDayChange(e[this.fields.isAllDay]);var d=this.getInstance(ws+"."+Zr);(0,s.hX)(e[this.fields.startTimezone])&&(0,s.hX)(e[this.fields.endTimezone])||(d.checked=!0,d.dataBind()),this.timezoneChangeStyle(d.checked),delete e.Timezone}},a.prototype.getColumnName=function(i){var e=i.getAttribute("data-name")||"";if(""===e){var t=!1,n="";i.classList.contains("e-dropdownlist")?(n="e-ddl",t=!0):i.classList.contains("e-multiselect")?(n="e-multiselect",t=!0):i.classList.contains("e-datetimepicker")?n="e-datetimepicker":i.classList.contains("e-datepicker")?n="e-datepicker":i.classList.contains("e-checkbox")?n="e-checkbox":i.classList.contains("e-numerictextbox")&&(n="e-numerictextbox");var o=(0,s.kp)(i,t?"."+n+":not(.e-control)":"."+n)||i.querySelector("."+n);if(o){var l=o.querySelector("[name]");l&&(e=l.name)}}return e},a.prototype.onAllDayChange=function(i){var r,e=this.getInstance(Os),t=this.getInstance(co),n=this.element.querySelector(".e-time-zone-container");i?(r=(0,s.hX)(this.parent.dateFormat)?this.getFormat("dateFormats"):this.parent.dateFormat,(0,s.iQ)(this.element.querySelectorAll(".e-time-icon"),Jb),(0,s.iQ)([n],ot),this.element.querySelector("."+Hl)&&(0,s.vy)([this.element.querySelector("."+Hl)],Cs),e.format=t.format=r):(r=(0,s.hX)(this.parent.dateFormat)?this.getFormat("dateFormats")+" "+this.parent.activeViewOptions.timeFormat:this.parent.dateFormat+" "+this.parent.activeViewOptions.timeFormat,(0,s.vy)(this.element.querySelectorAll(".e-time-icon"),Jb),(0,s.vy)([n],ot),this.element.querySelector(".e-checkbox-wrapper .e-time-zone").checked&&(0,s.iQ)([this.element.querySelector("."+Hl)],Cs),e.format=t.format=r),this.cellClickAction&&this.updateDateTime(i,e,t),e.dataBind(),t.dataBind(),(0,s.hX)(this.recurrenceEditor)||this.recurrenceEditor.updateRuleUntilDate(e.value)},a.prototype.updateDateTime=function(i,e,t){var n,r;if(!(0,s.hX)(this.eventWindowTime.startTime)||!(0,s.hX)(this.eventWindowTime.endTime)){if(i)if(n=k(new Date(this.eventWindowTime.startTime.getTime())),this.parent.activeCellsData.isAllDay){var o=K(new Date(this.eventWindowTime.endTime.getTime()),-1).getTime();r=+this.eventWindowTime.startTime>o?this.eventWindowTime.endTime:new Date(o)}else r=k(new Date(this.eventWindowTime.endTime.getTime()));else{var l=this.parent.activeCellsData.startTime;if((n=new Date(this.eventWindowTime.startTime.getTime())).setHours(l.getHours(),l.getMinutes(),l.getSeconds()),this.parent.activeCellsData.isAllDay){var h=this.parent.getStartEndTime(this.parent.workHours.start);n.setHours(h.getHours(),h.getMinutes(),h.getSeconds()),(r=new Date(n.getTime())).setMilliseconds(wt*this.getSlotDuration())}else(r=new Date(n.getTime())).setMilliseconds(this.parent.activeCellsData.endTime.getTime()-this.parent.activeCellsData.startTime.getTime())}this.eventWindowTime={startTime:new Date(n.getTime()),endTime:new Date(r.getTime())},e.value=n,t.value=r,e.dataBind(),t.dataBind()}},a.prototype.getFormat=function(i){return(0,s.hX)(this.parent.locale)||"en"===this.parent.locale||"en-US"===this.parent.locale?(0,s._W)(i+".short",(0,s.P)(this.parent.getCalendarMode())):(0,s._W)("main."+this.parent.locale+".dates.calendars."+this.parent.getCalendarMode()+"."+i+".short",s.pE)},a.prototype.onEventDetailsUpdate=function(i){if(this.parent.eventSettings.allowEditing){if(!this.parent.isAdaptive&&(0,s.hX)(this.parent.editorFooterTemplate)&&(0,s.vy)([this.element.querySelector("."+Wr)],ot),(0,s.hX)(this.parent.editorHeaderTemplate)&&(this.element.querySelector("."+Qb).innerHTML=this.l10n.getConstant("editEvent")),this.element.querySelector("."+qr).setAttribute("data-id",i[this.fields.id].toString()),(0,s.hX)(this.parent.editorTemplate)){i=(0,s.X$)({},i,null,!0);var e=this.getInstance(ws+"."+Zr),t=void 0;i[this.fields.startTimezone]||i[this.fields.endTimezone]?(t=!0,this.parent.eventBase.timezoneConvert(i)):t=!1,i.Timezone=t,e.checked=t,e.dataBind()}
1if(this.showDetails(i),i[this.fields.recurrenceRule]&&this.recurrenceEditor?this.recurrenceEditor.setRecurrenceRule(i[this.fields.recurrenceRule],i[this.fields.startTime]):!this.parent.isAdaptive&&this.recurrenceEditor&&(this.recurrenceEditor.setProperties({startDate:i[this.fields.startTime]}),this.recurrenceEditor.setRecurrenceRule("")),this.repeatStartDate=i[this.fields.startTime],this.repeatRule="",i[this.fields.recurrenceRule]&&(this.recurrenceEditor&&this.recurrenceEditor.setRecurrenceRule(i[this.fields.recurrenceRule],i[this.fields.startTime]),this.repeatRule=i[this.fields.recurrenceRule]),this.parent.isAdaptive&&(0,s.hX)(this.parent.editorTemplate)){var n=this.element.querySelector("."+oc);i[this.fields.recurrenceRule]?((0,s.vy)([n],bo),this.repeatStatus.setProperties({checked:!0})):((0,s.iQ)([n],bo),this.repeatStatus.setProperties({checked:!1})),this.updateRepeatLabel(this.repeatRule)}var r=this.parent.readonly||i[this.fields.isReadonly];if(this.parent.isAdaptive){var h=this.element.querySelector("."+Gb);h&&(r?(0,s.iQ)([h],ay):(0,s.vy)([h],ay))}else{var o=this.element.querySelector("."+hd),l=this.element.querySelector("."+Wr);this.disableButton(o,r),this.disableButton(l,r)}this.dialogObject.show()}},a.prototype.disableButton=function(i,e){i&&(i.ej2_instances[0].disabled=e)},a.prototype.renderRecurrenceEditor=function(){return new CO({calendarMode:this.parent.calendarMode,cssClass:this.parent.cssClass,dateFormat:this.parent.dateFormat,enableRtl:this.parent.enableRtl,firstDayOfWeek:this.parent.activeViewOptions.firstDayOfWeek,locale:this.parent.locale})},a.prototype.updateMinMaxDateToEditor=function(){var i=this.element.querySelector(".e-start"),e=this.element.querySelector(".e-end");if(i&&e){var t=i.ej2_instances[0],n=e.ej2_instances[0];t.min=this.parent.minDate,t.max=this.parent.maxDate,n.min=this.parent.minDate,n.max=this.parent.maxDate,t.dataBind(),n.dataBind()}if(this.recurrenceEditor){var r=this.recurrenceEditor.element.querySelector(".e-until-date");if(r){var o=r.ej2_instances[0];o.min=this.parent.minDate,o.max=this.parent.maxDate,o.dataBind()}}},a.prototype.updateRepeatLabel=function(i){this.parent.isAdaptive&&!this.repeatDialogObject&&this.renderRepeatDialog();var e=i?this.l10n.getConstant("repeats")+" "+this.recurrenceEditor.getRuleSummary(i):this.l10n.getConstant("repeat");this.repeatStatus.setProperties({label:e})},a.prototype.dialogClose=function(i){this.isEnterKey?this.isEnterKey=!1:(this.dialogEvent=i,this.isCrudAction=!1,this.parent.activeEventData={event:void 0,element:void 0},this.parent.currentAction=null,this.dialogObject.hide())},a.prototype.resetForm=function(){this.fieldValidator.destroyToolTip(),this.resetFormFields(),!this.parent.isAdaptive&&this.recurrenceEditor&&!this.recurrenceEditor.isDestroyed&&this.recurrenceEditor.resetFields()},a.prototype.timezoneChangeStyle=function(i){var e=this.element.querySelector("."+Hl),t=this.parent.tzModule.getLocalTimezoneName();if(i){(0,s.iQ)([e],Cs);var n=this.getInstance(zl),r=this.getInstance(Xl),o=n.dataSource;n.value&&this.parent.timezone||o.some(function(h){return h.Value===t})||(o.push({Value:t,Text:t}),n.dataSource=o,r.dataSource=o,n.dataBind(),r.dataBind()),n.value=n.value||this.parent.timezone||t,r.value=r.value||this.parent.timezone||t,n.dataBind(),r.dataBind()}else(0,s.vy)([e],Cs)},a.prototype.resetFormFields=function(){for(var e=0,t=this.getFormElements($r);e<t.length;e++){var n=t[e],r=n.name||this.getColumnName(n);!(0,s.hX)(r)&&""!==r&&this.setDefaultValueToElement(n)}},a.prototype.eventSave=function(i,e){if(this.isEnterKey)this.isEnterKey=!1;else{var t=this.element.querySelector("."+qr);if(!t||!t.classList.contains("e-formvalidator")||t.ej2_instances[0].validate()){var n=this.getEventDataFromEditor();this.processEventValidation(n.tempData,e)||(this.eventCrudData=n.eventData,this.dialogEvent=i,this.isCrudAction=!0,this.dialogObject.hide())}}},a.prototype.getEventDataFromEditor=function(){var i=(0,s.X$)({},this.getObjectFromFormData($r));i.Timezone||(i[this.fields.startTimezone]=null,i[this.fields.endTimezone]=null),delete i.Timezone,delete i.Repeat,this.setDefaultValueToObject(i),i[this.fields.recurrenceRule]=this.recurrenceEditor?this.recurrenceEditor.getRecurrenceRule()||null:void 0;var e=(0,s.X$)({},i,null,!0);return i[this.fields.isAllDay]&&(i[this.fields.startTime]=(0,s.hX)(i[this.fields.startTime])?null:k(new Date(i[this.fields.startTime].getTime())),i[this.fields.endTime]=(0,s.hX)(i[this.fields.endTime])?null:K(k(new Date(i[this.fields.endTime].getTime())),1)),{eventData:i,tempData:e}},a.prototype.processEventValidation=function(i,e){var t;if((0,s.hX)(this.parent.editorTemplate)){if(!i[this.fields.startTime]||!i[this.fields.endTime])return this.parent.quickPopup.openValidationError("invalidDateError"),!0;if(i[this.fields.startTime]>i[this.fields.endTime])return this.parent.quickPopup.openValidationError("startEndError"),!0}if(this.recurrenceEditor&&this.recurrenceEditor.value&&""!==this.recurrenceEditor.value){"EditOccurrence"!==this.parent.currentAction&&(t=this.recurrenceValidation(i[this.fields.startTime],i[this.fields.endTime],e));var n=!0;if("seriesChangeAlert"===t&&this.parent.uiStateValues.isIgnoreOccurrence&&(n=!1),!(0,s.hX)(t)&&n&&(!this.parent.enableRecurrenceValidation&&"wrongPattern"===t||this.parent.enableRecurrenceValidation))return this.parent.quickPopup.openRecurrenceValidationAlert(t),!0}return!1},a.prototype.processCrudActions=function(i){var e=this;this.parent.uiStateValues.isBlock=!1;var t=this.getResourceData(i),n=(this.parent.activeViewOptions.group.resources.length>0||this.parent.resourceCollection.length>0)&&!this.parent.activeViewOptions.group.allowGroupEdit&&!(0,s.hX)(t),r=this.getEventIdFromForm();if((0,s.hX)(r)){if(this.parent.currentAction="Add",this.parent.eventBase.checkOverlap(i))return!0;n?this.resourceSaveEvent(i,this.parent.currentAction):(i[this.fields.id]=this.parent.eventBase.getEventMaxID(),this.parent.addEvent(i))}else{var o="string"===this.parent.eventBase.getEventIDType()?r:parseInt(r,10),l=this.parent.eventsData.filter(function(d){return d[e.fields.id]===o})[0];if((0,s.hX)(l)&&(l=this.parent.blockData.filter(function(d){return d[e.fields.id]===o})[0]),(i=(0,s.X$)({},l,i))[this.fields.isReadonly])return!1;if(this.parent.eventBase.checkOverlap(i))return!0;var h=void 0;if(!(0,s.hX)(l[this.fields.recurrenceRule])){if(h=this.parent.currentAction,i.Guid=this.parent.activeEventData.event.Guid,"EditOccurrence"===this.parent.currentAction&&(i[this.fields.recurrenceID]?(o=i[this.fields.recurrenceID],h=null):(i[this.fields.id]=this.parent.eventBase.getEventMaxID(),i.Guid=this.parent.activeEventData.event.Guid),this.parent.enableRecurrenceValidation&&this.editOccurrenceValidation(o,i)))return!0;
1"EditSeries"===this.parent.currentAction||i[this.fields.id]!==l[this.fields.id]?i[this.fields.recurrenceID]=l[this.fields.id]:"EditFollowingEvents"===this.parent.currentAction&&(i[this.fields.id]=this.parent.eventBase.getEventMaxID(),i[this.fields.followingID]=l[this.fields.id])}n?this.resourceSaveEvent(i,"Save",h):this.parent.saveEvent(i,h)}return this.parent.uiStateValues.isBlock},a.prototype.getResourceData=function(i){var e=null;return!(0,s.hX)(this.parent.resourceBase)&&!(0,s.hX)(this.parent.resourceBase.resourceCollection)&&this.parent.resourceBase.resourceCollection.length>0&&(e=i[this.parent.resourceBase.resourceCollection.slice(-1)[0].field]),e},a.prototype.getObjectFromFormData=function(i){for(var t={},n=0,r=this.getFormElements(i);n<r.length;n++){var o=r[n],l=o.name||this.getColumnName(o);!(0,s.hX)(l)&&""!==l&&(t[""+l]=this.getValueFromElement(o))}return t},a.prototype.setDefaultValueToObject=function(i){(0,s.hX)(i[this.fields.subject])||(i[this.fields.subject]=i[this.fields.subject]||this.parent.eventSettings.fields.subject.default||this.l10n.getConstant("addTitle")),(0,s.hX)(i[this.fields.location])||(i[this.fields.location]=i[this.fields.location]||this.parent.eventSettings.fields.location.default),(0,s.hX)(i[this.fields.description])||(i[this.fields.description]=i[this.fields.description]||this.parent.eventSettings.fields.description.default)},a.prototype.recurrenceValidation=function(i,e,t){var n,r=this.recurrenceEditor,o=this.getInstance("e-repeat-interval.e-numerictextbox").value;if(t!==this.l10n.getConstant("ok")){var l=this.parent.activeEventData.event,h=[];if(("EditSeries"===this.parent.currentAction||"EditFollowingEvents"===this.parent.currentAction)&&!(0,s.hX)(l)){var d=l[this.parent.eventFields.startTime],p=this.parent.eventBase.getSeriesEvents(this.eventData,d);if(p.length>0)h=this.parent.eventBase.getEditedOccurrences(p,d);else{var u=this.parent.eventBase.getEventById(l[this.parent.eventFields.id]);h=this.parent.eventBase.getEditedOccurrences([u],d)}"EditSeries"===this.parent.currentAction&&!(0,s.hX)(this.eventData[this.parent.eventFields.recurrenceException])&&h.push(this.eventData)}if(h.length>0&&(n="seriesChangeAlert"),"until"===this.getInstance("e-end-on-left .e-ddl .e-dropdownlist").value&&this.getInstance("e-end-on-date .e-datepicker").value<i&&(n="wrongPattern"),(0,s.hX)(n)){var f=r.value.split(";")[1].split("=")[1].split(","),m={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},g=[],v=[],b=void 0;switch(r.value.split(";")[0].split("=")[1]){case"DAILY":(e.getTime()-i.getTime())/36e5>24*o&&(n="createError");break;case"WEEKLY":f=r.value.split(";")[1].split("=")[1].split(",");for(var y=0;y<f.length*(o+1);y++)g[parseInt(y.toString(),10)]=f.length>y?m[f[parseInt(y.toString(),10)]]:g[y-f.length]+7*o;for(b=g.sort(function(S,E){return S-E}),y=1;y<b.length;y++)v.push(b[parseInt(y.toString(),10)]-b[y-1]);((e.getTime()-i.getTime())/36e5>=24*Math.min.apply(Math,v)||(0,s.hX)(o))&&(n="createError");break;case"MONTHLY":e.getTime()>=new Date(+i).setMonth(i.getMonth()+o)&&(n="createError");break;case"YEARLY":e.getTime()>=new Date(+i).setFullYear(i.getFullYear()+o)&&(n="createError")}}}else e.getTime()>=new Date(+i).setMonth(i.getMonth()+o)&&(n="createError"),(0,s.hX)(n)&&this.parent.quickPopup.quickDialog.hide();return(0,s.hX)(o)&&(n="createError"),n},a.prototype.getRecurrenceIndex=function(i,e){for(var t,n=0;n<i.length;n++)if(e[this.fields.startTime].valueOf()===i[parseInt(n.toString(),10)][this.fields.startTime].valueOf()){t=n;break}return t},a.prototype.trimAllDay=function(i){if(i[this.fields.isAllDay]){var e=K(new Date(+i[this.fields.endTime]),-1).getTime();i[this.fields.endTime]=+i[this.fields.startTime]>e?i[this.fields.endTime]:new Date(e)}},a.prototype.editOccurrenceValidation=function(i,e,t){var n=this;void 0===t&&(t=this.eventData);var r=this.parent.getOccurrencesByID(i);this.parent.eventsData.filter(function(S){return S[n.fields.recurrenceID]===i}).map(function(S){return r.push((0,s.X$)({},S))}),e=(0,s.X$)({},e),this.trimAllDay(e);for(var l=0,h=r;l<h.length;l++)this.trimAllDay(h[l]);this.parent.eventBase.sortByTime(r);var p=this.getRecurrenceIndex(r,t);if((0,s.hX)(p))return!1;var m,g,u=new Date(+e[this.fields.startTime]),f=new Date(+e[this.fields.endTime]);p!==r.length-1&&(m=new Date(+r[p+1][this.fields.startTime]),g=new Date(+r[p+1][this.fields.endTime]));var v=new Date(+r[r.length-1][this.fields.endTime]);if(0===p){if(!(0,s.hX)(r[p+1])){if(!(m.getTime()>=f.getTime())&&k(v).getTime()>=k(u).getTime()||k(v).getTime()<k(u).getTime())return this.parent.quickPopup.openRecurrenceValidationAlert("occurrenceAlert"),!0;if(!(k(u).getTime()<k(m).getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("sameDayAlert"),!0}return!1}var b=new Date(+r[p-1][this.fields.startTime]),y=new Date(+r[p-1][this.fields.endTime]);if(p===r.length-1){if(k(new Date(+r[r.length-1-p][this.fields.startTime])).getTime()>k(u).getTime())return this.parent.quickPopup.openRecurrenceValidationAlert("occurrenceAlert"),!0;if(!(y.getTime()<=u.getTime()&&k(u).getTime()>k(b).getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("sameDayAlert"),!0}else{if(!(k(b).getTime()<k(u).getTime()||k(new Date(+r[0][this.fields.startTime])).getTime()>k(u).getTime())||!(k(m).getTime()>k(u).getTime()||v.getTime()<u.getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("sameDayAlert"),!0;if(!(y.getTime()<=u.getTime()&&m.getTime()>=f.getTime())||k(g).getTime()<k(u).getTime()||k(b).getTime()>k(f).getTime()||!(k(u).getTime()<k(m).getTime()))return this.parent.quickPopup.openRecurrenceValidationAlert("occurrenceAlert"),!0}return!1},a.prototype.resourceSaveEvent=function(i,e,t){var n=this,r=this.parent.resourceBase.resourceCollection.slice(-1)[0],o=i[r.field];o=o instanceof Array?o.reverse():[o].reverse();for(var l=this.parent.resourceBase.lastResourceLevel,h=[],d=function(b){var y=(0,s.X$)({},i,null,!0);y[p.fields.id]=p.parent.eventBase.getEventMaxID();var S=[],E=function(){if("Save"===e&&b===o.length-1)if(S.length>0){S[0][n.fields.id]=i[n.fields.id];for(var te=1;te<S.length;te++)S[parseInt(te.toString(),10)][n.fields.id]=n.parent.eventBase.getEventMaxID(b),h.push(S[parseInt(te.toString(),10)]),n.parent.saveEvent(S[0],t)}else y[n.fields.id]=i[n.fields.id],n.parent.saveEvent(y,t);else if(S.length>0)for(var $=0;$<S.length;$++)S[parseInt($.toString(),10)][n.fields.id]=n.parent.eventBase.getEventMaxID($),h.push(S[parseInt($.toString(),10)]);else y[n.fields.id]=n.parent.eventBase.getEventMaxID(b),h.push(y)};if(p.parent.activeViewOptions.group.byGroupID&&!(0,s.hX)(l)){var _=r.dataSource,T=p.parent.resourceCollection,I=void 0;if((I=T.length>1?Tl(_,r.idField,o[parseInt(b.toString(),10)],y,T):Tl(_,r.idField,o[parseInt(b.toString(),10)]))<0)return{value:void 0};for(var w=_[parseInt(I.toString(),10)][r.groupIDField],M=l.filter(function(te){return te.resourceData[r.idField]===o[parseInt(b.toString(),10)]}).filter(function(te){return te.resourceData[r.groupIDField]===w})[0].groupOrder,D=0;D<p.parent.resourceBase.resourceCollection.length;D++){var L=p.parent.resourceBase.resourceCollection[parseInt(D.toString(),10)].field;y[""+L]=M[parseInt(D.toString(),10)]instanceof Array?M[parseInt(D.toString(),10)][0]:M[parseInt(D.toString(),10)]}E()}else{for(I=0;I<p.parent.resourceBase.resourceCollection.length-1;I++)if(L=p.parent.resourceBase.resourceCollection[parseInt(I.toString(),10)].field,y[""+L]instanceof Array&&y[""+L].length>1)for(var V=0;V<y[""+L].length;V++){var G=(0,s.X$)({},y,null,!0);G[""+L]=i[""+L][parseInt(V.toString(),10)],G[r.field]=o[parseInt(b.toString(),10)],S.push(G)}else if(0===S.length)y[""+L]=i[""+L]instanceof Array?i[""+L][0]:i[""+L],y[r.field]=o[parseInt(b.toString(),10)];else for(var W=0;W<S.length;W++)S[parseInt(W.toString(),10)][""+L]=i[""+L]instanceof Array?i[""+L][0]:i[""+L];y[r.field]=o[parseInt(b.toString(),10)],E()}},p=this,u=0;u<o.length;u++){var f=d(u);if("object"==typeof f)return f.value}if(h.length>0){for(var m=0,g=h;m<g.length;m++){var v=g[m];v[this.fields.recurrenceException]=null,v[this.fields.recurrenceID]=null}this.parent.addEvent(h)}},a.prototype.getEventIdFromForm=function(){return this.element.querySelector("."+qr).getAttribute("data-id")},a.prototype.getFormElements=function(i){return[].slice.call(i===$r?this.element.querySelectorAll("."+Zr):this.parent.element.querySelectorAll("."+i+" ."+Zr))},a.prototype.getValueFromElement=function(i){return i.classList.contains("e-datepicker")||i.classList.contains("e-datetimepicker")||i.classList.contains("e-dropdownlist")||i.classList.contains("e-multiselect")?i.ej2_instances[0].value:i.classList.contains("e-checkbox")?i.ej2_instances[0].checked:i.classList.contains("e-numerictextbox")?i.ej2_instances[0].value:"checkbox"===i.type?i.checked:this.parent.enableHtmlSanitizer?s.r4.sanitize(i.value):i.value},a.prototype.setValueToElement=function(i,e){if(i.classList.contains("e-datepicker"))(t=i.ej2_instances[0]).value=e,t.dataBind();else if(i.classList.contains("e-datetimepicker"))(t=i.ej2_instances[0]).element.classList.contains(Os)?this.eventWindowTime.startTime=new Date(""+e):this.eventWindowTime.endTime=new Date(""+e),t.value=e,t.dataBind();else if(i.classList.contains("e-dropdownlist"))(t=i.ej2_instances[0]).value=e,t.dataBind();else if(i.classList.contains("e-multiselect"))(t=i.ej2_instances[0]).value=[],t.value=e instanceof Array?e:[e],t.dataBind();else if(i.classList.contains("e-checkbox"))(t=i.ej2_instances[0]).checked=e,t.dataBind();else if(i.classList.contains("e-numerictextbox")){var t;(t=i.ej2_instances[0]).value=e,t.dataBind()}else"checkbox"!==i.type?i.value=e||"":i.checked=e},a.prototype.setDefaultValueToElement=function(i){if(i.classList.contains("e-datepicker"))(e=i.ej2_instances[0]).value=this.parent.getCurrentTime(),e.dataBind();else if(i.classList.contains("e-datetimepicker")){var e=i.ej2_instances[0],t=this.parent.getCurrentTime();this.eventWindowTime={startTime:t,endTime:t},e.value=t,e.dataBind()}else i.classList.contains("e-dropdownlist")?((e=i.ej2_instances[0]).value=null,e.dataBind()):i.classList.contains("e-multiselect")?((e=i.ej2_instances[0]).value=[],e.dataBind()):i.classList.contains("e-checkbox")?((e=i.ej2_instances[0]).checked=!1,e.dataBind()):i.classList.contains("e-numerictextbox")?((e=i.ej2_instances[0]).value=null,e.dataBind()):"checkbox"===i.type?i.checked=!1:i.value=""},a.prototype.getInstance=function(i){var e=this.element.querySelector("."+i);return e?e.ej2_instances[0]:null},a.prototype.eventDelete=function(i){if(this.isEnterKey)this.isEnterKey=!1;else{switch(this.parent.currentAction){case"EditOccurrence":this.parent.currentAction=(0,s.hX)(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])?"Delete":"DeleteOccurrence";break;case"EditSeries":this.parent.currentAction="DeleteSeries";break;case"Save":this.parent.currentAction="Delete";break;case"EditFollowingEvents":(0,s.hX)(this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule])||(this.parent.currentAction="DeleteFollowingEvents")}
1this.dialogEvent=i,this.isCrudAction=!1,this.dialogObject.hide(),this.parent.quickPopup.openDeleteAlert()}},a.prototype.getRecurrenceEditorInstance=function(){return this.parent.isAdaptive&&!this.repeatDialogObject&&this.renderRepeatDialog(),this.recurrenceEditor},a.prototype.destroyComponents=function(){for(var e=0,t=this.getFormElements($r);e<t.length;e++){var n=t[e],r=void 0;(n.classList.contains("e-datetimepicker")||n.classList.contains("e-datepicker")||n.classList.contains("e-checkbox")||n.classList.contains("e-dropdownlist")||n.classList.contains("e-multiselect")||n.classList.contains("e-numerictextbox"))&&(r=n.ej2_instances),r&&r[0]&&r[0].destroy()}this.buttonObj&&this.buttonObj.destroy()},a.prototype.detachComponents=function(){for(var e=0,t=this.getFormElements($r);e<t.length;e++)(0,s.Yo)(t[e])},a.prototype.destroy=function(i){if(this.parent&&!this.parent.isDestroyed&&this.parent.resetTemplates(["editorTemplate","editorHeaderTemplate","editorFooterTemplate"]),this.destroyComponents(),this.recurrenceEditor&&(this.recurrenceEditor.destroy(),(0,s.Yo)(this.recurrenceEditor.element),this.recurrenceEditor=null),this.fieldValidator&&(this.fieldValidator.destroy(),this.fieldValidator=null),this.repeatDialogObject&&(this.repeatDialogObject.destroy(),this.repeatDialogObject=null),this.detachComponents(),this.dialogObject){if(this.dialogObject.element){var e=this.dialogObject.element.querySelector("form");Dn(e),(0,s.Yo)(e),s.Jm.remove(this.dialogObject.element,"keydown",this.preventEventSave)}this.dialogObject.destroy(),this.dialogObject=null}this.element&&((0,s.TF)(this.element),this.element=null),i||(this.l10n=null,this.parent=null,this.fields=null,this.buttonObj=null,this.repeatStatus=null,this.eventWindowTime=null,this.dialogEvent=null)},a}(),IO=function(){function a(i){this.translateY=0,this.itemSize=60,this.renderedLength=0,this.averageRowHeight=0,this.startIndex=0,this.existingDataCollection=[],this.enableTransition=!0,this.parent=i,this.bufferCount=i.activeViewOptions.overscanCount<3?3:i.activeViewOptions.overscanCount,this.addEventListener()}return a.prototype.addEventListener=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.parent.on(El,this.virtualScrolling,this)},a.prototype.removeEventListener=function(){!this.parent||this.parent&&this.parent.isDestroyed||this.parent.off(El,this.virtualScrolling)},a.prototype.getRenderedCount=function(){return this.setItemSize(),this.renderedLength=Math.ceil((this.isHorizontalScroll?this.parent.element.clientWidth:this.parent.element.clientHeight)/this.itemSize)+this.bufferCount,this.renderedLength},a.prototype.renderVirtualTrack=function(i){var e=(0,s.n)("div",{className:Pl});this.isHorizontalScroll?e.style.width=this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1].length*this.itemSize+"px":e.style.height=this.parent.resourceBase.expandedResources.length*this.itemSize+"px",i.appendChild(e)},a.prototype.updateVirtualScrollHeight=function(){var i=this.parent.element.querySelector("."+Pl);if(this.parent.resourceBase.renderedResources[this.parent.resourceBase.renderedResources.length-1].groupIndex!==this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex){var n=this.parent.element.querySelector("."+nt);this.renderedLength=n.querySelector("tbody").children.length,i.style.height=n.offsetHeight+(this.parent.resourceBase.expandedResources.length-this.renderedLength)*n.offsetHeight/this.renderedLength+"px";var r=this.parent.element.querySelector("."+we);r.scrollHeight-r.scrollTop<r.offsetHeight*this.bufferCount&&(i.style.height=parseInt(i.style.height,10)+r.offsetHeight*this.bufferCount+"px")}else i.style.height="";this.averageRowHeight=i.offsetHeight/this.parent.resourceBase.expandedResources.length},a.prototype.updateVirtualTrackHeight=function(i){var e=this.parent.resourceBase.renderedResources.length;if(e!==this.getRenderedCount()){i.style.height=this.parent.element.querySelector(".e-content-wrap").clientHeight+"px";var t=this.parent.element.querySelector("."+Wi),n=this.parent.element.querySelector("."+we),r=this.parent.element.querySelector("."+Ur);this.translateY=0,this.setTranslate(t,n,r)}
1else{var h=e+(this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex-this.parent.resourceBase.renderedResources[e-1].groupIndex);i.style.height=(h=h>this.parent.resourceBase.expandedResources.length?this.parent.resourceBase.expandedResources.length:h)*this.itemSize+"px"}},a.prototype.setItemSize=function(){this.itemSize=this.isHorizontalScroll?function ox(a,i,e){var t,n=(0,s.n)("div",{className:i}).cloneNode();return n.style.visibility="hidden",n.style.position="absolute",a.appendChild(n),t=bb(n,e),(0,s.TF)(n),t}(this.parent.activeView.element,ie,this.parent.uiStateValues.isTransformed)||this.itemSize:this.parent.getElementHeightFromClass(this.parent.activeView.element,ie)||this.itemSize},a.prototype.refreshLayout=function(){var i=this.parent.uiStateValues.scheduleHeight;if(this.parent.uiStateValues.scheduleHeight=this.parent.element.offsetHeight,this.parent.uiStateValues.scheduleHeight!==i){this.renderedLength<this.getRenderedCount()&&(this.isRemoteRefresh=!0);var t=this.parent.element.querySelector("."+Wi),n=this.parent.element.querySelector("."+we),r=this.parent.element.querySelector("."+Ur);this.parent.rowAutoHeight||(this.enableTransition=!1,(0,s.vy)([n,t],"e-transition"));var o=parseInt(t.querySelector("tbody td").getAttribute("data-group-index"),10),l=o+this.renderedLength;o=(o=l>this.parent.resourceBase.expandedResources.length?this.parent.resourceBase.expandedResources.length-this.renderedLength:o)<0?0:o,this.existingDataCollection=this.parent.resourceBase.renderedResources,this.parent.resourceBase.renderedResources=this.parent.resourceBase.expandedResources.slice(o,l),this.parent.resourceBase.renderedResources.length>0&&this.updateContent(t,n,r,this.parent.resourceBase.renderedResources)}},a.prototype.renderEvents=function(){this.setTabIndex();var i=this.triggerScrollEvent(lb);if(this.parent.activeViewOptions&&this.parent.activeViewOptions.enableLazyLoading&&this.parent.crudModule)return i.length>0?(this.parent.crudModule.refreshProcessedData(!0,i),void this.parent.hideSpinner()):void this.parent.crudModule.refreshDataManager();this.parent.crudModule&&this.parent.crudModule.refreshProcessedData(!0),"Month"!==this.parent.currentView&&this.parent.notify(Ri,{}),this.parent.hideSpinner()},a.prototype.virtualScrolling=function(){var i=this;this.parent.quickPopup&&(this.parent.quickPopup.quickPopupHide(),this.parent.quickPopup.morePopup.hide());var e=this.parent.element.querySelector("."+we);if(this.isHorizontalScroll)this.horizontalScrolling(e);else{var t=this.parent.element.querySelector("."+Wi),n=this.parent.element.querySelector("."+Ur),r=this.parent.element.querySelector("."+fa),o=this.parent.element.querySelector("."+nt);this.parent.rowAutoHeight||(0,s.iQ)([e,t],"e-transition"),this.renderedLength=t.querySelector("tbody").children.length;var l=parseInt(t.querySelector("tbody td").getAttribute("data-group-index"),10),h=this.parent.rowAutoHeight?o.offsetHeight-e.offsetHeight:this.bufferCount*this.itemSize,d=[];if(this.existingDataCollection=this.parent.resourceBase.renderedResources,e.scrollTop-this.translateY<0?d=this.upScroll(e,l):(e.scrollTop+e.clientHeight>=e.scrollHeight-this.itemSize||e.scrollTop>this.translateY+h)&&(d=this.downScroll(e,l)),!(0,s.hX)(d)&&d.length>0){this.triggerScrollEvent(Yu);var p=this.parent.getSelectedCells();this.focusedEle=p[p.length-1]||this.focusedEle,this.updateContent(t,e,n,d),this.setTranslate(t,e,n,r),this.parent.dragAndDropModule&&"drag"===this.parent.dragAndDropModule.actionObj.action&&this.parent.dragAndDropModule.navigationWrapper(),window.clearTimeout(this.timeValue),this.timeValue=window.setTimeout(function(){i.renderEvents()},250)}}},a.prototype.horizontalScrolling=function(i){var e=this,t=[],n=this.bufferCount*this.itemSize;if(Math.abs(i.scrollLeft)-Math.abs(this.translateY)<0?t=this.leftScroll(i):Math.abs(i.scrollLeft)-Math.abs(this.translateY)>n&&(t=this.rightScroll(i)),!(0,s.hX)(t)&&t.length>0){if(this.parent.resourceBase.expandedResources.length!==t.length||this.parent.resourceBase.expandedResources[0]!==t[0]||this.parent.resourceBase.expandedRes
1ources[this.parent.resourceBase.expandedResources.length-1]!==t[t.length-1]){this.triggerScrollEvent(Yu);var r=this.parent.activeView.colLevels.slice(0);this.updateHorizontalContent(i,t),(0,s.sN)(i.querySelector("table"),{transform:"translateX("+this.translateY+"px)"}),this.parent.activeView.colLevels=r,this.parent.dragAndDropModule&&"drag"===this.parent.dragAndDropModule.actionObj.action&&this.parent.dragAndDropModule.navigationWrapper()}window.clearTimeout(this.timeValue),this.timeValue=window.setTimeout(function(){e.renderEvents()},250)}},a.prototype.triggerScrollEvent=function(i){var e=this,t=[];if(!this.parent.activeView)return t;var n={startDate:this.parent.activeView.startDate(),endDate:this.parent.activeView.endDate(),startIndex:this.parent.resourceBase.renderedResources[0].groupIndex,endIndex:this.parent.resourceBase.renderedResources[this.parent.resourceBase.renderedResources.length-1].groupIndex,resourceData:this.parent.resourceBase.renderedResources.map(function(r){return r.resourceData}),name:i};return this.parent.trigger(i,n,function(r){i===Yu?e.parent.showSpinner():i===lb&&!(0,s.hX)(r.eventData)&&r.eventData.length>0&&(t=r.eventData)}),t},a.prototype.upScroll=function(i,e){var t=0;t=~~(i.scrollTop/this.itemSize)+Math.ceil(i.clientHeight/this.itemSize)-this.renderedLength,this.parent.rowAutoHeight&&(t=t>e?e-this.bufferCount:t);var n=this.getBufferCollection(t=t>0?t:0,t+this.renderedLength);if(this.parent.resourceBase.renderedResources=n,0===e)this.translateY=i.scrollTop;else{var r=this.parent.rowAutoHeight?this.averageRowHeight:this.itemSize;this.translateY=i.scrollTop-this.bufferCount*(r=r>0?r:this.itemSize)>0?i.scrollTop-this.bufferCount*r:0}return n},a.prototype.downScroll=function(i,e){if(this.parent.resourceBase.renderedResources[this.parent.resourceBase.renderedResources.length-1].groupIndex===this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex)return null;var r=0;r=~~(i.scrollTop/this.itemSize),this.parent.rowAutoHeight&&(r=(r=~~((i.scrollTop-this.translateY)/this.averageRowHeight)+e)>e+this.bufferCount?r:e+this.bufferCount);var o=r+this.renderedLength,l=this.getBufferCollection((o=o>this.parent.resourceBase.expandedResources.length?r+(this.parent.resourceBase.expandedResources.length-r):o)-this.renderedLength,o);return this.translateY=i.scrollTop,l},a.prototype.leftScroll=function(i){var e=0;return e=~~(Math.abs(i.scrollLeft)/this.itemSize)+Math.ceil(i.clientWidth/this.itemSize)-this.renderedLength,this.getCollection(e=e>0?e:0,e+this.renderedLength)},a.prototype.rightScroll=function(i){var e=this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1],n=~~(Math.abs(i.scrollLeft)/this.itemSize)+this.renderedLength;return this.getCollection((n=n>e.length-1?e.length-1:n)-this.renderedLength,n)},a.prototype.getCollection=function(i,e){this.translateY=i*this.itemSize;var t=this.getResCollection(i=i<0?0:i,e);return this.parent.enableRtl&&(this.translateY=-this.translateY),t},a.prototype.getResCollection=function(i,e){var t=this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1];e=e>t.length?t.length-1:e;var n=[],r={startIndex:0,endIndex:0};if(this.parent.activeViewOptions.group.byDate){if(t[parseInt(i.toString(),10)].date.getTime()===this.parent.resourceBase.expandedResources[0].date.getTime()&&t[parseInt(e.toString(),10)].date.getTime()===this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].date.getTime())return this.parent.resourceBase.expandedResources;n=this.getByDateCollection(t[parseInt(i.toString(),10)],t[parseInt(e.toString(),10)],r),this.setRenderedDates(n)}else{if(t[parseInt(i.toString(),10)].groupIndex===this.parent.resourceBase.expandedResources[0].groupIndex&&t[parseInt(e.toString(),10)].groupIndex===this.parent.resourceBase.expandedResources[this.parent.resourceBase.expandedResources.length-1].groupIndex)return this.parent.resourceBase.expandedResources;n=this.getByIdCollection(t[parseInt(i.toString(),10)],t[parseInt(e.toString(),10)],r)}
1return"Month"!==this.parent.currentView&&(this.startIndex=r.startIndex,n=t.slice(r.startIndex,r.endIndex)),this.translateY=r.startIndex*this.itemSize,n},a.prototype.getByDateCollection=function(i,e,t){var n=this.parent.activeView.colLevels[0].filter(function(r){return i.date.getTime()<=r.date.getTime()&&r.date.getTime()<=e.date.getTime()});return this.setStartEndIndex(this.parent.activeView.colLevels[0],n[0],n[n.length-1],t),n},a.prototype.getByIdCollection=function(i,e,t){var n=this.parent.resourceBase.lastResourceLevel.filter(function(r){return i.groupIndex<=r.groupIndex&&r.groupIndex<=e.groupIndex});return this.parent.resourceBase.renderedResources=n,this.setStartEndIndex(this.parent.resourceBase.lastResourceLevel,n[0],n[n.length-1],t),n},a.prototype.setStartEndIndex=function(i,e,t,n){var r=0;i.filter(function(o){e===o?n.startIndex=r:t===o&&(n.endIndex=r+o.colSpan),r+=o.colSpan}),e===t&&(n.endIndex=n.startIndex+t.colSpan)},a.prototype.updateContent=function(i,e,t,n){var r=i.querySelector("tbody").children.length;document.activeElement&&document.activeElement.classList.contains(on)&&(this.isResourceCell=!0,this.parent.element.focus());for(var o=0;o<r;o++)(0,s.TF)(t.querySelector("div"));this.parent.resourceBase.renderedResources=n;var l=this.parent.activeView.getGroupIndices(n),h=this.parent.activeView.getGroupIndices(this.existingDataCollection),d=l.filter(function(S){return h.indexOf(S)<0}),p=Array.from(i.querySelectorAll("tbody tr")),u=Array.from(e.querySelectorAll("tbody tr")),f=i.querySelector("tbody"),m=e.querySelector("tbody");this.removeObsoleteRows(p,l),this.removeObsoleteRows(u,l);var g=this.parent.resourceBase.getContentRows(n,!0),v=this.parent.activeView.getContentRows(),b=this.parent.activeView.getEventRows(n.length);for(o=0;o<d.length;o++){var y=l.indexOf(d[parseInt(o.toString(),10)]);0===y?((0,s.Hs)([g[parseInt(o.toString(),10)]],f),(0,s.Hs)([v[parseInt(o.toString(),10)]],m)):f&&m&&f.children[parseInt(y.toString(),10)]&&m.children[parseInt(y.toString(),10)]?(f.insertBefore(g[parseInt(o.toString(),10)],f.children[parseInt(y.toString(),10)]),m.insertBefore(v[parseInt(o.toString(),10)],m.children[parseInt(y.toString(),10)])):((0,s.BC)([g[parseInt(o.toString(),10)]],f),(0,s.BC)([v[parseInt(o.toString(),10)]],m))}(0,s.BC)(b,t)},a.prototype.removeObsoleteRows=function(i,e){i.forEach(function(t){var n=parseInt(t.firstElementChild.getAttribute("data-group-index"),10);e.indexOf(n)<0&&(0,s.TF)(t)})},a.prototype.updateHorizontalContent=function(i,e){this.existingDataCollection=this.parent.resourceBase.expandedResources,this.parent.resourceBase.expandedResources=e;var t=this.parent.getSelectedCells();this.focusedEle=t[t.length-1]||this.focusedEle;var n=i.querySelector("tbody"),r=Array.from(n.querySelectorAll("tr"));"Month"===this.parent.currentView?this.updateMonthViewContent(i,e):this.updateOtherViewContent(i,e,r)},a.prototype.updateMonthViewContent=function(i,e){for(var t=i.querySelectorAll(" tr").length,n=0;n<t;n++)(0,s.TF)(i.querySelector("tbody tr"));this.parent.activeViewOptions.group.byDate?this.parent.activeView.colLevels[0]=e:this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-2]=e;var r=this.parent.activeView.getContentRows();(0,s.BC)(r,i.querySelector("tbody"))},a.prototype.updateOtherViewContent=function(i,e,t){var n=i.querySelector("tbody"),r=i.querySelector("colgroup"),o=i.querySelector("thead"),l=i.querySelector("table");this.parent.activeView.colLevels[this.parent.activeView.colLevels.length-1]=e;var h=new Set(e.map(function(m){return m.groupIndex}));t.forEach(function(m){m.querySelectorAll("td").forEach(function(v){var b=parseInt(v.getAttribute("data-group-index"),10);h.has(b)||v.remove()})});for(var d=[].slice.call(i.querySelector("colgroup").children),p=0;p<d.length;p++)(0,s.TF)(d[parseInt(p.toString(),10)]);e.forEach(function(){return r.appendChild((0,s.n)("col"))});var u=[].slice.call(i.querySelector("thead").children);for(p=0;p<u.length;p++)(0,s.TF)(u[parseInt(p.toString(),10)]);o.appendChild(this.parent.eventBase.createEventWrapper("",this.startIndex>0?this.startIndex:0)),this.parent.activeViewOptions.timeScale.enable&&o.appendChild(this.parent.eventBase.createEventWrapper("timeIndicator")),(0,s.Hs)([o],l);var f=this.parent.activeView.getContentRows();this.mergeNewTdData(n,f)},a.prototype.mergeNewTdData=function(i,e){Array.from(i.querySelectorAll("tr")).forEac
1h(function(n,r){if(r<e.length){var o=e[parseInt(r.toString(),10)],l=Array.from(n.querySelectorAll("td"));Array.from(o.querySelectorAll("td")).forEach(function(d){for(var p=parseInt(d.getAttribute("data-group-index").toString(),10),u=!1,f=0,m=l;f<m.length;f++){var g=m[f];if(p<parseInt(g.getAttribute("data-group-index").toString(),10)){n.insertBefore(d,g),u=!0;break}}u||n.appendChild(d)})}})},a.prototype.getBufferCollection=function(i,e){return this.parent.resourceBase.expandedResources.slice(i,e)},a.prototype.setTranslate=function(i,e,t,n){(0,s.sN)(i.querySelector("table"),{transform:"translateY("+this.translateY+"px)"}),(0,s.sN)(e.querySelector("table"),{transform:"translateY("+this.translateY+"px)"}),(0,s.sN)(t,{transform:"translateY("+this.translateY+"px)"}),(0,s.hX)(n)||(0,s.sN)(n,{transform:"translateY("+this.translateY+"px)"})},a.prototype.updateFocusedWorkCell=function(){if(this.focusedEle){var i=parseInt(this.focusedEle.getAttribute("data-date"),10),e=parseInt(this.focusedEle.getAttribute("data-group-index"),10),t=this.parent.element.querySelector("."+ie+'[data-date="'+i+'"][data-group-index="'+e+'"]');t&&this.parent.addSelectedClass([t],t,!0),this.focusedEle=null}},a.prototype.setRenderedDates=function(i){if("Month"!==this.parent.currentView){var e=i.map(function(r){return r.date});this.parent.resourceBase.renderedResources.forEach(function(r){return r.renderDates=e})}else{var t=i.map(function(r){return r.date.getDay()}),n=this.parent.activeView.renderDates.filter(function(r){return t.indexOf(r.getDay())>=0});this.parent.resourceBase.renderedResources.forEach(function(r){return r.renderDates=n})}},a.prototype.setTabIndex=function(){var i=this.parent.element.querySelector("."+Wi),e=[].slice.call(this.parent.element.querySelectorAll("."+on));e&&i&&e.forEach(function(n){n.getBoundingClientRect().top>=i.getBoundingClientRect().top&&n.setAttribute("tabindex","0")});var t=this.parent.element.querySelector("."+on+'[tabindex="0"]');this.isResourceCell&&t&&(t.focus(),this.isResourceCell=!1)},a.prototype.destroy=function(){this.removeEventListener(),this.focusedEle=null},a}(),xO=function(){function a(i){this.parent=i}return a.prototype.render=function(i,e){void 0===e&&(e=!0),this.initializeLayout(i),this.parent.activeView&&e&&this.parent.crudModule.refreshDataManager()},a.prototype.initializeLayout=function(i){if(this.parent.activeView){var e=["cellTemplate","tooltipTemplate","majorSlotTemplate","minorSlotTemplate","headerTooltipTemplate","dateHeaderTemplate","dayHeaderTemplate","monthHeaderTemplate","headerIndentTemplate","resourceHeaderTemplate","cellHeaderTemplate","dateRangeTemplate"];this.parent.activeEventTemplates.length>0?(e=e.concat(this.parent.activeEventTemplates),this.parent.activeEventTemplates=[]):e.push("eventTemplate"),this.parent.resetTemplates(e),this.parent.activeView.removeEventListener(),this.parent.activeView.destroy()}switch(i){case"Day":this.parent.activeView=this.parent.dayModule;break;case"Week":this.parent.activeView=this.parent.weekModule;break;case"WorkWeek":this.parent.activeView=this.parent.workWeekModule;break;case"Month":this.parent.activeView=this.parent.monthModule;break;case"Year":this.parent.activeView=this.parent.yearModule;break;case"Agenda":this.parent.activeView=this.parent.agendaModule;break;case"MonthAgenda":this.parent.activeView=this.parent.monthAgendaModule;break;case"TimelineDay":this.parent.activeView=this.parent.timelineViewsModule,(0,s.hX)(this.parent.activeView)||(this.parent.activeView.viewClass="e-timeline-day-view");break;case"TimelineWorkWeek":this.parent.activeView=this.parent.timelineViewsModule,(0,s.hX)(this.parent.activeView)||(this.parent.activeView.viewClass="e-timeline-work-week-view");break;case"TimelineWeek":this.parent.activeView=this.parent.timelineViewsModule,(0,s.hX)(this.parent.activeView)||(this.parent.activeView.viewClass="e-timeline-week-view");break;case"TimelineMonth":this.parent.activeView=this.parent.timelineMonthModule;break;case"TimelineYear":this.parent.activeView=this.parent.timelineYearModule}if((0,s.hX)(this.parent.activeView)){var t=this.parent.viewCollections[0].option;if(t)return this.parent.setProperties({currentView:t},!0),this.parent.headerModule&&(this.parent.headerModule.updateActiveView(),this.parent.headerModule.setCalendarView()),console.warn('[WARNING] :: Module "'+i+'" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),this.initializeLayout(t);throw Error("Inject required modules")}this.parent.uiStateValues.scheduleHeight=this.parent.element.offsetHeight,this.parent.activeView.viewIndex=this.parent.viewIndex,this.updateLabelText(i),this.parent.activeView.addEventListener(),this.parent.activeView.getRenderDates(),this.parent.uiStateValues.isGroupAdaptive=this.parent.activeViewOptions.group.resources.length>0&&(this.parent.enableAdaptiveUI&&!this.parent.isAdaptive||this.parent.isAdaptive&&this.parent.activeViewOptions.group.enableCompactView),this.parent.virtualScrollModule&&(this.parent.virtualScrollModule.destroy(),this.parent.virtualScrollModule=null),(-1===["Agenda","MonthAgenda","Year","TimelineYear"].indexOf(this.parent.currentView)||"TimelineYear"===this.parent.currentView&&"Vertical"===this.parent.activeViewOptions.orientation)&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(this.parent.virtualScrollModule=new IO(this.parent),this.parent.activeView.isTimelineView()?this.parent.uiStateValues.top=0:(this.parent.virtualScrollModule.isHorizontalScroll=!0,this.parent.uiStateValues.left=0)),this.updateHeader(),this.parent.currentTimezoneDate=this.parent.getCurrentTime(),this.parent.activeView.renderLayout(hf),this.parent.renderTemplates(),this.parent.eventTooltip&&(this.parent.eventTooltip.destroy(),this.parent.eventTooltip=null),(this.parent.eventSettings.enableTooltip||this.parent.activeViewOptions.group.resources.length>0&&this.parent.activeViewOptions.group.headerTooltipTemplate)&&(this.parent.eventTooltip=new im(this.parent))},a.prototype.updateHeader=function(){this.parent.headerModule&&(this.parent.headerModule.setDayOfWeek(this.parent.activeViewOptions.firstDayOfWeek),this.parent.activeViewOptions.readonly?(0,s.iQ)([this.parent.element],Wl):this.parent.element.classList.contains(Wl)&&(0,s.vy)([this.parent.element],Wl),this.parent.headerModule.updateDateRange(),this.parent.headerModule.updateHeaderItems("remove"))},a.prototype.updateLabelText=function(i){this.parent.element.setAttribute("role","application"),this.parent.element.removeAttribute("aria-labelledby"),this.parent.element.removeAttribute("aria-label"),"Year"===i?this.parent.element.setAttribute("aria-label",this.parent.activeView.getLabelText(i)):this.parent.element.setAttribute("aria-labelledby",this.parent.element.i
1d+"_table")},a}(),wO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),bm=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},OO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return wO(i,a),bm([(0,s.mA)(!0)],i.prototype,"highlight",void 0),bm([(0,s.mA)("09:00")],i.prototype,"start",void 0),bm([(0,s.mA)("18:00")],i.prototype,"end",void 0),i}(s.I1),AO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),ac=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},PO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return AO(i,a),ac([(0,s.mA)(!0)],i.prototype,"enable",void 0),ac([(0,s.mA)(60)],i.prototype,"interval",void 0),ac([(0,s.mA)(2)],i.prototype,"slotCount",void 0),ac([(0,s.mA)()],i.prototype,"minorSlotTemplate",void 0),ac([(0,s.mA)()],i.prototype,"majorSlotTemplate",void 0),i}(s.I1),DO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Id=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},kO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return DO(i,a),Id([(0,s.mA)("Both")],i.prototype,"templateType",void 0),Id([(0,s.mA)()],i.prototype,"header",void 0),Id([(0,s.mA)()],i.prototype,"content",void 0),Id([(0,s.mA)()],i.prototype,"footer",void 0),i}(s.I1),MO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),aS=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},LO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return MO(i,a),aS([(0,s.mA)()],i.prototype,"option",void 0),aS([(0,s.mA)()],i.prototype,"template",void 0),i}(s.I1),RO=function(){function a(i){this.parent=i,this.crudObj={sourceEvent:null,targetEvent:null,isCrudAction:!1}}return a.prototype.getQuery=function(){var i=this.parent.activeView.startDate(),e=this.parent.activeView.endDate();return this.parent.dataModule.generateQuery(i,e)},a.prototype.getTable=function(){return this.parent.eventSettings.query?this.parent.eventSettings.query.clone().fromTable:null},a.prototype.refreshDataManager=function(){var i=this;if(this.parent.activeView){if(this.parent.uiStateValues&&this.parent.uiStateValues.isPreventEventRefresh)return this.parent.uiStateValues.isPreventEventRefresh=!1,this.parent.refreshEvents(!1),void this.parent.hideSpinner();var e=this.parent.activeView.startDate(),t=this.parent.activeView.endDate();this.parent.dataModule.getData(this.parent.dataModule.generateQuery(e,t)).then(function(r){return i.dataManagerSuccess(r)}).catch(function(r){return i.dataManagerFailure(r)})}},a.prototype.dataManagerSuccess=function(i){var e=this;!this.parent||this.parent&&this.parent.isDestroyed||this.parent.trigger("dataBinding",i,function(t){if(!t.cancel){var n=(0,s.X$)([],t.result,null,!0);e.parent.eventsData=n.filter(function(r){return!r[e.parent.eventFields.isBlock]}),e.parent.blockData=n.filter(function(r){return r[e.parent.eventFields.isBlock]}),e.refreshProcessedData(),e.parent.dragAndDropModule&&"drag"===e.parent.dragAndDropModule.actionObj.action&&e.parent.dragAndDropModule.navigationWrapper(),e.parent.trigger("dataBound",null,function(){e.parent.hideSpinner(),e.parent.isPrinting&&setTimeout(function(){e.parent.notify(Ju,{})},100)})}})},a.prototype.dataManagerFailure=function(i){var e=this;!this.parent||this.parent&&this.parent.isDestroyed||this.parent.trigger(Sl,{error:i},function(){return e.parent.hideSpinner()})},a.prototype.refreshProcessedData=function(i,e){if(void 0===i&&(i=!1),this.parent.dragAndDropModule&&(this.parent.dragAndDropModule.actionObj.action="",(0,s.vy)([this.parent.element],"e-event-action")),this.parent.activeViewOptions&&this.parent.activeViewOptions.eventTemplate){var t=["eventTemplate"];
1if(this.crudObj.isCrudAction&&-1===["Agenda","MonthAgenda","Year","TimelineYear"].indexOf(this.parent.currentView)){t=[];for(var n=0,r=this.crudObj.sourceEvent.length;n<r;n++)t.push("eventTemplate_"+this.crudObj.sourceEvent[parseInt(n.toString(),10)].groupIndex),this.crudObj.targetEvent[parseInt(n.toString(),10)]&&this.crudObj.sourceEvent[parseInt(n.toString(),10)].groupIndex!==this.crudObj.targetEvent[parseInt(n.toString(),10)].groupIndex&&t.push("eventTemplate_"+this.crudObj.targetEvent[parseInt(n.toString(),10)].groupIndex)}t.length>0&&this.parent.resetTemplates(t)}if(i)this.parent.notify(un,{processedData:e?this.parent.eventBase.processData(e):this.parent.eventsProcessed});else{var h=(this.parent.eventsData||[]).concat(this.parent.blockData||[]);this.parent.notify(un,{processedData:this.parent.eventBase?this.parent.eventBase.processData(h):[]})}},a.prototype.refreshData=function(i){var e=this,t={requestType:i.requestType,cancel:!1,data:i.data,addedRecords:i.editParams.addedRecords,changedRecords:i.editParams.changedRecords,deletedRecords:i.editParams.deletedRecords};if(this.parent.dragAndDropModule&&this.parent.dragAndDropModule.actionObj&&this.parent.dragAndDropModule.actionObj.element&&this.parent.dragAndDropModule.actionObj.action&&(this.parent.dragAndDropModule.actionObj.element.style.display="none"),this.parent.resizeModule&&this.parent.resizeModule.actionObj&&this.parent.resizeModule.actionObj.element&&this.parent.resizeModule.actionObj.action&&(this.parent.resizeModule.actionObj.element.style.display="none"),this.parent.isSpecificResourceEvents()&&("eventCreated"===i.requestType||"eventRemoved"===i.requestType)){this.crudObj.isCrudAction=!0,this.crudObj.sourceEvent=[];for(var r=function(p){o.crudObj.isCrudAction=!("eventRemoved"===i.requestType&&!(0,s.hX)(p.parent));var u=o.parent.eventBase.getGroupIndexFromEvent(p);u>-1&&0===o.parent.crudModule.crudObj.sourceEvent.filter(function(f){return f.groupIndex===u}).length&&o.crudObj.isCrudAction&&o.crudObj.sourceEvent.push(o.parent.resourceBase.lastResourceLevel[parseInt(u.toString(),10)])},o=this,l=0,h=i.data instanceof Array?0===i.data.length&&"eventRemoved"===i.requestType?i.editParams.deletedRecords:i.data:"string"!=typeof i.data&&"number"!=typeof i.data||"eventRemoved"!==i.requestType?[i.data]:i.editParams.deletedRecords;l<h.length;l++)r(h[l]);this.crudObj.targetEvent=this.crudObj.sourceEvent}this.parent.dataModule.dataManager.dataSource.offline?this.parent.trigger(zr,t,function(p){p.cancel||e.refreshDataManager()}):i.promise.then(function(){!e.parent||e.parent&&e.parent.isDestroyed||e.parent.trigger(zr,t,function(p){p.cancel||e.refreshDataManager()})}).catch(function(p){!e.parent||e.parent&&e.parent.isDestroyed||e.parent.trigger(Sl,{error:p})})},a.prototype.processAddEvent=function(i){var n,e=this.parent.eventFields,t={addedRecords:[],changedRecords:[],deletedRecords:[]};if(i.addedRecords instanceof Array){for(var r=0,o=i.addedRecords;r<o.length;r++){var l=o[r];l=this.parent.eventBase.updateEventDateTime(l);var h=(0,s.X$)({},this.parent.eventBase.processTimezone(l,!0),null,!0);t.addedRecords.push(h)}n=this.parent.dataModule.dataManager.saveChanges(t,e.id,this.getTable(),this.getQuery())}else{var d=this.parent.eventBase.processTimezone(i.addedRecords,!0);t.addedRecords.push(d),n=this.parent.dataModule.dataManager.insert(d,this.getTable(),this.getQuery())}this.refreshData({requestType:"eventCreated",cancel:!1,data:i.addedRecords,promise:n,editParams:t})},a.prototype.processSaveEvent=function(i){var e,t=this.parent.eventFields,n={addedRecords:[],changedRecords:[],deletedRecords:[]};if(i.changedRecords instanceof Array){for(var r=0,o=i.changedRecords;r<o.length;r++){var l=o[r];l=this.parent.eventBase.updateEventDateTime(l);var h=(0,s.X$)({},this.parent.eventBase.processTimezone(l,!0),null,!0);n.changedRecords.push(h)}e=this.parent.dataModule.dataManager.saveChanges(n,t.id,this.getTable(),this.getQuery())}else{var d=this.parent.eventBase.processTimezone(i.changedRecords,!0);n.changedRecords.push(d),e=this.parent.dataModule.dataManager.update(t.id,d,this.getTable(),this.getQuery())}var p=(0,s.X$)({},i.changedRecords[i.changedRecords.length-1],null,!0);this.parent.eventBase.selectWorkCellByTime([this.parent.eventBase.processTimezone(p)]),this.refreshData({requestType:"eventChanged",cancel:!1,data:i.changedRecords,promise:e,editParams:n})},a.prototype.processDeleteEvent=function(i){var e,t=this.parent.eventFields,n={addedRecords:[],changedRecords:[],deletedRecords:[]};i.deletedRecords.length>1?(n.deletedRecords=n.deletedRecords.concat(i.deletedRecords),e=this.parent.dataModule.dataManager.saveChanges(n,t.id,this.getTable(),this.getQuery())):(n.deletedRecords.push(i.deletedRecords[0]),e=this.parent.dataModule.dataManager.remove(t.id,i.deletedRecords[0],this.getTable(),this.getQuery())),this.parent.eventBase.selectWorkCellByTime(i.deletedRecords),this.refreshData({requestType:"eventRemoved",cancel:!1,data:i.deletedRecords,promise:e,editParams:n})},a.prototype.addEvent=function(i){var e=this;if(this.parent.eventSettings.allowAdding&&!this.parent.activeViewOptions.readonly){if(!this.isBlockEvent(i)&&this.parent.eventBase.isBlockRange(i))return void this.parent.quickPopup.openValidationError("blockAlert",i);if(this.parent.eventBase.checkOverlap(i))return;var t=i instanceof Array?i:[i];if(0===t.length)return;this.parent.trigger(ji,{requestType:"eventCreate",cancel:!1,data:t,addedRecords:t,changedRecords:[],deletedRecords:[]},function(r){r.cancel||(r.promise?r.promise.then(function(o){!e.parent||e.parent&&e.parent.isDestroyed||o&&e.processAddEvent(r)}
1).catch(function(o){!e.parent||e.parent&&e.parent.isDestroyed||e.parent.trigger(Sl,{error:o})}):e.processAddEvent(r))})}},a.prototype.saveEvent=function(i,e){var t=this;if(this.parent.eventSettings.allowEditing&&!this.parent.activeViewOptions.readonly){if("EditFollowingEvents"!==this.parent.currentAction&&!this.isBlockEvent(i)&&this.parent.eventBase.isBlockRange(i))return this.parent.quickPopup.openValidationError("blockAlert",i),void(this.parent.crudModule.crudObj.isCrudAction=!1);var n=i instanceof Array?i:[i];if(0===n.length)return;if(this.parent.currentAction=e,e)switch(e){case"Save":this.processSave(i);break;case"EditOccurrence":this.processOccurrences(i,e);break;case"EditFollowingEvents":this.processFollowSeries(i,e);break;case"EditSeries":this.processEntireSeries(i,e)}else{if(this.parent.eventBase.checkOverlap(i))return;this.parent.trigger(ji,{requestType:"eventChange",cancel:!1,data:i,addedRecords:[],changedRecords:n,deletedRecords:[]},function(o){o.cancel||(o.promise?o.promise.then(function(l){!t.parent||t.parent&&t.parent.isDestroyed||l&&t.processSaveEvent(o)}).catch(function(l){!t.parent||t.parent&&t.parent.isDestroyed||t.parent.trigger(Sl,{error:l})}):t.processSaveEvent(o))})}}},a.prototype.deleteEvent=function(i,e){var t=this;if(this.parent.eventSettings.allowDeleting&&!this.parent.activeViewOptions.readonly){this.parent.currentAction=e;var n;if(0===(n="string"==typeof i||"number"==typeof i?this.parent.eventsData.filter(function(o){return o[t.parent.eventFields.id]===i}):i instanceof Array?i:[i]).length)return;if(e)switch(e){case"Delete":this.processDelete(n);break;case"DeleteOccurrence":this.processOccurrences(n,e);break;case"DeleteFollowingEvents":this.processFollowSeries(n,e);break;case"DeleteSeries":this.processEntireSeries(n,e)}else this.parent.trigger(ji,{requestType:"eventRemove",cancel:!1,data:i,addedRecords:[],changedRecords:[],deletedRecords:n},function(o){o.cancel||(o.promise?o.promise.then(function(l){!t.parent||t.parent&&t.parent.isDestroyed||l&&t.processDeleteEvent(o)}).catch(function(l){!t.parent||t.parent&&t.parent.isDestroyed||t.parent.trigger(Sl,{error:l})}):t.processDeleteEvent(o))})}},a.prototype.processOccurrences=function(i,e){var t=this,n=[],r=!1;if(i instanceof Array)for(var o=0,l=i;o<l.length;o++){var h=l[o];n.push({occurrence:h,parent:this.getParentEvent(h)})}else n={occurrence:i,parent:this.getParentEvent(i)};var p={requestType:"EditOccurrence"===e?"eventChange":"eventRemove",cancel:!1,addedRecords:[],changedRecords:i instanceof Array?i:[i],deletedRecords:[]};p.data=n,this.parent.trigger(ji,p,function(u){if(!u.cancel){for(var f=t.parent.eventFields,m={addedRecords:[],changedRecords:[],deletedRecords:[]},g=n instanceof Array?n:[n],v=function(T,I){var w=u.changedRecords[parseInt(T.toString(),10)],A=g[parseInt(T.toString(),10)].parent,M=A[f.recurrenceException],D=void 0,L=void 0;switch(e){case"EditOccurrence":D=t.parent.eventsProcessed.filter(function(V){return V.Guid===w.Guid})[0],(L=t.excludeDateCheck(D[f.startTime],M))!==A[f.recurrenceException]?(A[f.recurrenceException]=L,w[f.recurrenceException]=Jr(D[f.startTime]),w[f.recurrenceID]=A[f.id],w[f.followingID]=null,m.changedRecords.push(t.parent.eventBase.processTimezone(A,!0)),m.addedRecords.push(t.parent.eventBase.processTimezone(w,!0))):m.changedRecords.push(t.parent.eventBase.processTimezone(w,!0));break;case"DeleteOccurrence":w[f.recurrenceException]||(A[f.recurrenceException]=t.excludeDateCheck(w[f.startTime],M),m.changedRecords.push(t.parent.eventBase.processTimezone(A,!0))),w[f.id]!==A[f.id]&&(m.deletedRecords.push(t.parent.eventBase.processTimezone(w,!0)),r=!0)}},b=0,y=u.changedRecords.length;b<y;b++)v(b);var S=t.parent.dataModule.dataManager.saveChanges(m,f.id,t.getTable(),t.getQuery()),E=(0,s.X$)({},u.changedRecords[u.changedRecords.length-1],null,!0);t.parent.eventBase.selectWorkCellByTime("EditOccurrence"===e?[t.parent.eventBase.processTimezone(E)]:[E]),t.refreshData({requestType:"EditOccurrence"===e?"eventChanged":"eventRemoved",cancel:!1,data:r?u.deletedRecords:u.changedRecords,promise:S,editParams:m})}})}
1,a.prototype.processFollowSeries=function(i,e){var t=this,n=[];if(i instanceof Array)for(var r=0,o=i;r<o.length;r++){var l=o[r];n.push({occurrence:l,parent:this.getParentEvent(l)})}else n={occurrence:i,parent:this.getParentEvent(i)};var d={requestType:"EditFollowingEvents"===e?"eventChange":"eventRemove",cancel:!1,addedRecords:[],changedRecords:i instanceof Array?i:[i],deletedRecords:[]};d.data=n,this.parent.trigger(ji,d,function(p){if(!p.cancel){for(var u=t.parent.eventFields,f={addedRecords:[],changedRecords:[],deletedRecords:[]},m=n instanceof Array?n:[n],g=function(_,T){var I=p.changedRecords[parseInt(_.toString(),10)],w=m[parseInt(_.toString(),10)].parent,A=t.parent.eventBase.getEventCollections(w,I),M=void 0;switch(e){case"EditFollowingEvents":if(t.processRecurrenceRule(w,I),M=!t.parent.eventBase.isFollowingEvent(w,I),I[u.followingID]=M?null:w[u.id],I[u.recurrenceID]=null,f.addedRecords.push(t.parent.eventBase.processTimezone(I,!0)),f.changedRecords.push(t.parent.eventBase.processTimezone(w,!0)),!t.parent.uiStateValues.isIgnoreOccurrence){if(I[u.recurrenceException]=null,A.occurrence.length>0){var D=A.occurrence.slice(-1)[0][u.recurrenceRule];-1===D.indexOf("COUNT")&&(I[u.recurrenceRule]=D)}A.follow.length>0&&(I[u.recurrenceRule]=A.follow.slice(-1)[0][u.recurrenceRule],f.deletedRecords=f.deletedRecords.concat(A.follow)),M&&(A.occurrence=A.occurrence.filter(function(L){return L[u.recurrenceID]===w[u.id]})),f.deletedRecords=f.deletedRecords.concat(A.occurrence)}break;case"DeleteFollowingEvents":t.processRecurrenceRule(w,I[u.startTime]),f.changedRecords.push(t.parent.eventBase.processTimezone(w,!0)),f.deletedRecords=f.deletedRecords.concat(A.occurrence).concat(A.follow)}},v=0,b=p.changedRecords.length;v<b;v++)g(v);var y=t.parent.dataModule.dataManager.saveChanges(f,u.id,t.getTable(),t.getQuery()),S=(0,s.X$)({},p.changedRecords[p.changedRecords.length-1],null,!0);t.parent.eventBase.selectWorkCellByTime("EditFollowingEvents"===e?[t.parent.eventBase.processTimezone(S)]:[S]),t.refreshData({requestType:"EditFollowingEvents"===e?"eventChanged":"eventRemoved",cancel:!1,data:p.changedRecords,promise:y,editParams:f})}})},a.prototype.processEntireSeries=function(i,e){var t=this,n=[],r=!1;if(i instanceof Array)for(var o=0,l=i;o<l.length;o++)n.push(this.getParentEvent(l[o],!0));else n=this.getParentEvent(i,!0);var d=i instanceof Array?i:[i],p={requestType:"EditSeries"===e?"eventChange":"eventRemove",cancel:!1,addedRecords:[],changedRecords:[],deletedRecords:[]};if(p.data=n,"EditSeries"===e?p.changedRecords=d:p.deletedRecords=d,"EditSeries"===e&&!this.parent.uiStateValues.isIgnoreOccurrence)for(var u=n instanceof Array?n:[n],f=0,m=p.changedRecords.length;f<m;f++){var g=u[parseInt(f.toString(),10)],v=this.parent.eventBase.getEventCollections(g),b=v.follow.concat(v.occurrence);p.deletedRecords=p.deletedRecords.concat(b)}this.parent.trigger(ji,p,function(y){if(!y.cancel){for(var S=t.parent.eventFields,E={addedRecords:[],changedRecords:[],deletedRecords:[]},_=n instanceof Array?n:[n],T="EditSeries"===e?y.changedRecords:y.deletedRecords,I=function(V,G){var W=T[parseInt(V.toString(),10)],te=_[parseInt(V.toString(),10)],$=t.parent.eventBase.getEventCollections(te),Se=$.follow.concat($.occurrence);switch(e){case"EditSeries":if(W[S.id]=te[S.id],W[S.recurrenceID]=null,W[S.followingID]=null,t.parent.uiStateValues.isIgnoreOccurrence&&W[S.recurrenceException]){var Ie=t.parent.eventsData.filter(function(Re){return Re[S.id]===W[S.id]});Ie.length>0&&(W[S.recurrenceRule]=Ie[0][S.recurrenceRule])}else W[S.recurrenceException]=null,E.deletedRecords=E.deletedRecords.concat(Se);E.changedRecords.push(t.parent.eventBase.processTimezone(W,!0)),t.parent.uiStateValues.isIgnoreOccurrence=!1;break;case"DeleteSeries":E.deletedRecords=E.deletedRecords.concat(Se.concat(t.parent.eventBase.processTimezone(te,!0))),r=!0}},w=0,A=T.length;w<A;w++)I(w);var M=t.parent.dataModule.dataManager.saveChanges(E,S.id,t.getTable(),t.getQuery()),D=(0,s.X$)({},T[T.length-1],null,!0);t.parent.eventBase.selectWorkCellByTime("EditSeries"===e?[t.parent.eventBase.processTimezone(D)]:[D]),t.refreshData({requestType:"EditSeries"===e?"eventChanged":"eventRemoved",cancel:!1,data:r?y.deletedRecords:y.changedRecords,promise:M,editParams:E})}})},a.prototype.processDelete=function(i){for(var e=this,t=[],n=0,r=i;n<r.length;n++){var o=r[n];t.push(o[this.parent.eventFields.recurrenceRule]?{occurrence:o,parent:this.getParentEvent(o)}:o)}var l={requestType:"eventRemove",cancel:!1,addedRecords:[],changedRecords:[],deletedRecords:i};l.data=t,this.parent.trigger(ji,l,function(h){if(!h.cancel){for(var d=e.parent.eventFields,p={addedRecords:[],changedRecords:[],deletedRecords:[]},u=(0,s.X$)([],h.deletedRecords,null,!0),f=function(y,S){var E=(0,s.hX)(h.deletedRecords[parseInt(y.toString(),10)][e.parent.eventFields.recurrenceRule]);if(!E){var _=t[parseInt(y.toString(),10)].parent,T=p.changedRecords.filter(function(L){return L[d.id]===_[d.id]}),I=h.deletedRecords[parseInt(y.toString(),10)][d.startTime];if(T.length>0){var w=T[0];w[d.recurrenceException]=e.excludeDateCheck(I,w[d.recurrenceException])}else _[d.recurrenceException]=e.excludeDateCheck(I,_[d.recurrenceException]);0===T.length&&p.changedRecords.push(e.parent.eventBase.processTimezone(_,!0)),E=h.deletedRecords[parseInt(y.toString(),10)][d.id]!==_[d.id]}if(E){if(h.deletedRecords instanceof Array)for(var A=0,M=h.deletedRecords;A<M.length;A++)e.parent.eventBase.processTimezone(M[A],!0);p.deletedRecords.push(h.deletedRecords[parseInt(y.toString(),10)])}},m=0,g=h.deletedRecords.length;m<g;m++)f(m);var v=e.parent.dataModule.dataManager.saveChanges(p,d.id,e.getTable(),e.getQuery());e.parent.eventBase.selectWorkCellByTime(u),e.refreshData({requestType:"eventRemoved",cancel:!1,data:h.deletedRecords,promise:v,editParams:p})}})},a.prototype.processSave=function(i){for(var e=this,t=i instanceof Array?i:[i],n=[],r=0,o=t;r<o.length;r++){var l=o[r];n.push(l[this.parent.eventFields.recurrenceRule]?{occurrence:l,parent:this.getParentEvent(l)}:l)}var h={requestType:"eventChange",cancel:!1,addedRecords:[],changedRecords:t,deletedRecords:[]};h.data=n,this.parent.trigger(ji,h,function(d){if(!d.cancel){for(var p=e.parent.eventFields,u={addedRecords:[],changedRecords:[],deletedRecords:[]},f=0,m=d.changedRecords;f<m.length;f++){var g=m[f];if(!(0,s.hX)(g[p.recurrenceRule])&&(0,s.hX)(g[p.recurrenceException])){var v=Jr(g[p.startTime]),b=e.getParentEvent(g);b[p.recurrenceException]=(0,s.hX)(b[p.recurrenceException])?v:b[p.recurrenceException].concat(","+v),g[p.id]=e.parent.getEventMaxID(),g[p.recurrenceException]=v,u.addedRecords.push(e.parent.eventBase.processTimezone(g,!0)),u.changedRecords.push(e.parent.eventBase.processTimezone(b,!0))}else u.changedRecords.push(e.parent.eventBase.processTimezone(g,!0))}var y=e.parent.dataModule.dataManager.saveChanges(u,p.id,e.getTable(),e.getQuery()),S=(0,s.X$)({},d.changedRecords[d.changedRecords.length-1],null,!0);e.parent.eventBase.selectWorkCellByTime([e.parent.eventBase.processTimezone(S)]),e.refreshData({requestType:"eventChanged",cancel:!1,data:d.changedRecords,promise:y,editParams:u})}})},a.prototype.getParentEvent=function(i,e){void 0===e&&(e=!1);var t=this.parent.eventBase.getParentEvent(i,e)||i;return(t[this.parent.eventFields.startTimezone]||t[this.parent.eventFields.endTimezone])&&this.parent.eventBase.timezoneConvert(t),t},a.prototype.excludeDateCheck=function(i,e){var t=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName();t&&(i=this.parent.tzModule.remove(new Date(+i.getTime()),t));var n=Jr(i);
1return(0,s.hX)(e)?e=n:-1===e.indexOf(n)&&(e=(0,s.hX)(e)?n:e+","+n),e},a.prototype.processRecurrenceRule=function(i,e){var r,t=this.parent.eventFields,n=i[t.recurrenceRule];if(e instanceof Date)r=new Date(+e);else{r=new Date(+e[t.startTime]);var o=e[t.recurrenceRule];if(o){var l=i[t.startTime],d=Xf(l,o,"DeleteFollowingEvents"===this.parent.currentAction?e[t.recurrenceException]:null,this.parent.activeViewOptions.firstDayOfWeek),p=new Date(d.slice(-1)[0]);p.setHours(r.getHours(),r.getMinutes(),r.getSeconds()),r.setHours(l.getHours(),l.getMinutes(),l.getSeconds()),e[t.recurrenceRule]=this.getUpdatedRecurrenceRule(o,new Date(+p),!1)}}i[t.recurrenceRule]=this.getUpdatedRecurrenceRule(n,K(new Date(r.getTime()),-1),!0)},a.prototype.getUpdatedRecurrenceRule=function(i,e,t){for(var r="",o=0,l=i.split(";");o<l.length;o++){var h=l[o];if(""!==h){var d=h.split("=")[0],p=h.split("=")[1];("COUNT"===d||"UNTIL"===d)&&(p=Jr(e),h=h.replace(h,"UNTIL="+p)),r+=h+";"}}return t&&-1===r.indexOf("UNTIL")&&(r+="UNTIL="+Jr(e)),r},a.prototype.isBlockEvent=function(i){for(var t=!1,n=0,r=i instanceof Array?i:[i];n<r.length;n++)t=r[n][this.parent.eventFields.isBlock]||!1;return t},a.prototype.destroy=function(){this.crudObj=null,this.parent=null},a}(),NO=function(){function a(i){this.parent=i,s.Jm.add(this.parent.element,"mouseover",this.onHover,this)}return a.prototype.cellMouseDown=function(i){this.isPreventAction(i)||this.parent.notify(ef,{event:i})},a.prototype.cellClick=function(i){var e=this;if(!this.isPreventAction(i)){var n=(0,s.kp)(i.target,"."+ie+",."+it+",."+Wt);if(!(0,s.hX)(n)){if(!(0,s.hX)((0,s.kp)(i.target,"."+nd)))return void this.parent.eventWindow.openEditor(this.parent.activeCellsData,"Add");var r=n.classList.contains(ie)||n.classList.contains(it);this.parent.uiStateValues.isTapHold&&!this.parent.uiStateValues.action&&r&&(this.parent.uiStateValues.isTapHold=!1,this.parent.eventBase.removeSelectedAppointmentClass(),this.parent.selectedElements=[]);var o=(0,s.kp)(i.target,"."+oo),l=this.parent.getNavigateView(),h=this.parent.currentView===l;if((0,s.hX)(o)||h||(0,s.hX)(this.parent.viewOptions[l.charAt(0).toLowerCase()+l.slice(1)])){if(this.parent.activeViewOptions.readonly&&"MonthAgenda"!==this.parent.currentView)return void(this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide());if(this.parent.isAdaptive&&(i.target.classList.contains(Fi)||(0,s.kp)(i.target,"."+Fi)))return;if(r&&i.shiftKey&&1===i.which&&this.parent.keyboardInteractionModule)return void this.parent.keyboardInteractionModule.onMouseSelection(i);this.parent.activeCellsData=this.parent.getCellDetails(n);var d=(0,s.X$)(this.parent.activeCellsData,{cancel:!1,event:i,name:"cellClick"});this.parent.trigger(fr,d,function(u){u.cancel?e.parent.quickPopup&&e.parent.quickPopup.quickPopupHide():(r&&e.parent.selectCell(n),e.parent.allowInline?e.parent.notify(aa,{element:u.element,groupIndex:u.groupIndex,type:"Cell"}):e.parent.notify(fr,u))})}else{var p=this.parent.getDateFromElement(n);!(0,s.hX)(p)&&this.parent.isMinMaxDate(p)&&(this.parent.setProperties({selectedDate:p},!0),this.parent.changeView(this.parent.getNavigateView(),i))}}}},a.prototype.cellDblClick=function(i){var e=this,n=(0,s.kp)(i.target,"."+ie+",."+it+",."+Wt);if(!(this.parent.activeViewOptions.readonly||this.isPreventAction(i)||(0,s.hX)(n))){var r=(0,s.X$)(this.parent.activeCellsData,{cancel:!1,event:i,name:"cellDoubleClick"});this.parent.trigger("cellDoubleClick",r,function(o){if(o.startTime){var l=new Date(o.startTime.getTime());e.parent.isMinMaxDate(new Date(l.setHours(0,0,0,0)))&&(o.cancel||e.parent.eventWindow.openEditor(e.parent.activeCellsData,"Add"))}})}},a.prototype.onHover=function(i){var t=(0,s.kp)(i.target,"."+ie+",."+ua+",."+it+",."+Wt+",."+on+",."+Ce+",."+Gh+",."+Dl);t&&this.parent.trigger("hover",{element:t,event:i})},a.prototype.isPreventAction=function(i){if((0,s.kp)(i.target,"."+oo))return!1;if((0,s.kp)(i.target,"."+Ct)&&!(0,s.kp)(i.target,"."+Fi))return!0;var e=(0,s.kp)(i.target,"."+Ce+",."+Es);return!((0,s.hX)(e)&&(e=(0,s.kp)(i.target,"."+Wt),!this.parent.activeView||!this.parent.activeView.isTimelineView()||(0,s.hX)(e)))},a.prototype.destroy=function(){s.Jm.remove(this.parent.element,"mouseover",this.onHover)},a}
1(),VO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),xd=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},ir=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return VO(i,a),xd([(0,s.mA)()],i.prototype,"name",void 0),xd([(0,s.mA)()],i.prototype,"default",void 0),xd([(0,s.mA)()],i.prototype,"title",void 0),xd([(0,s.mA)({})],i.prototype,"validation",void 0),i}(s.I1),FO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),qi=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},BO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return FO(i,a),qi([(0,s.mA)("Id")],i.prototype,"id",void 0),qi([(0,s.mA)("IsBlock")],i.prototype,"isBlock",void 0),qi([(0,s.pr)({name:"Subject"},ir)],i.prototype,"subject",void 0),qi([(0,s.pr)({name:"StartTime"},ir)],i.prototype,"startTime",void 0),qi([(0,s.pr)({name:"EndTime"},ir)],i.prototype,"endTime",void 0),qi([(0,s.pr)({name:"StartTimezone"},ir)],i.prototype,"startTimezone",void 0),qi([(0,s.pr)({name:"EndTimezone"},ir)],i.prototype,"endTimezone",void 0),qi([(0,s.pr)({name:"Location"},ir)],i.prototype,"location",void 0),qi([(0,s.pr)({name:"Description"},ir)],i.prototype,"description",void 0),qi([(0,s.pr)({name:"IsAllDay"},ir)],i.prototype,"isAllDay",void 0),qi([(0,s.pr)({name:"RecurrenceID"},ir)],i.prototype,"recurrenceID",void 0),qi([(0,s.pr)({name:"RecurrenceRule"},ir)],i.prototype,"recurrenceRule",void 0),qi([(0,s.pr)({name:"RecurrenceException"},ir)],i.prototype,"recurrenceException",void 0),qi([(0,s.mA)("IsReadonly")],i.prototype,"isReadonly",void 0),qi([(0,s.mA)("FollowingID")],i.prototype,"followingID",void 0),i}(s.I1),HO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Ei=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},zO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return HO(i,a),Ei([(0,s.mA)()],i.prototype,"template",void 0),Ei([(0,s.mA)([])],i.prototype,"dataSource",void 0),Ei([(0,s.mA)()],i.prototype,"query",void 0),Ei([(0,s.pr)({},BO)],i.prototype,"fields",void 0),Ei([(0,s.mA)(!1)],i.prototype,"enableTooltip",void 0),Ei([(0,s.mA)("AllDayRow")],i.prototype,"spannedEventPlacement",void 0),Ei([(0,s.mA)(1)],i.prototype,"minimumEventDuration",void 0),Ei([(0,s.mA)()],i.prototype,"tooltipTemplate",void 0),Ei([(0,s.mA)()],i.prototype,"resourceColorField",void 0),Ei([(0,s.mA)(!1)],i.prototype,"editFollowingEvents",void 0),Ei([(0,s.mA)(!0)],i.prototype,"allowAdding",void 0),Ei([(0,s.mA)(!0)],i.prototype,"allowEditing",void 0),Ei([(0,s.mA)(!0)],i.prototype,"allowDeleting",void 0),Ei([(0,s.mA)(!1)],i.prototype,"enableMaxHeight",void 0),Ei([(0,s.mA)(!1)],i.prototype,"enableIndicator",void 0),Ei([(0,s.mA)(!1)],i.prototype,"ignoreWhitespace",void 0),Ei([(0,s.mA)()],i.prototype,"sortComparer",void 0),Ei([(0,s.mA)()],i.prototype,"includeFiltersIn
1Query",void 0),i}(s.I1),XO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),yo=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},jO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return XO(i,a),yo([(0,s.mA)(!1)],i.prototype,"byDate",void 0),yo([(0,s.mA)(!0)],i.prototype,"byGroupID",void 0),yo([(0,s.mA)(!1)],i.prototype,"allowGroupEdit",void 0),yo([(0,s.mA)([])],i.prototype,"resources",void 0),yo([(0,s.mA)(!0)],i.prototype,"enableCompactView",void 0),yo([(0,s.mA)()],i.prototype,"headerTooltipTemplate",void 0),yo([(0,s.mA)(!1)],i.prototype,"hideNonWorkingDays",void 0),i}(s.I1),UO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Gi=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},WO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return UO(i,a),Gi([(0,s.mA)()],i.prototype,"field",void 0),Gi([(0,s.mA)()],i.prototype,"title",void 0),Gi([(0,s.mA)()],i.prototype,"name",void 0),Gi([(0,s.mA)(!1)],i.prototype,"allowMultiple",void 0),Gi([(0,s.mA)([])],i.prototype,"dataSource",void 0),Gi([(0,s.mA)()],i.prototype,"query",void 0),Gi([(0,s.mA)("Id")],i.prototype,"idField",void 0),Gi([(0,s.mA)("Text")],i.prototype,"textField",void 0),Gi([(0,s.mA)("Expanded")],i.prototype,"expandedField",void 0),Gi([(0,s.mA)("GroupID")],i.prototype,"groupIDField",void 0),Gi([(0,s.mA)("Color")],i.prototype,"colorField",void 0),Gi([(0,s.mA)("StartHour")],i.prototype,"startHourField",void 0),Gi([(0,s.mA)("EndHour")],i.prototype,"endHourField",void 0),Gi([(0,s.mA)("WorkDays")],i.prototype,"workDaysField",void 0),Gi([(0,s.mA)("CssClass")],i.prototype,"cssClassField",void 0),i}(s.I1),$O=function(){function a(i){this.resourceCollection=[],this.leftPixel=25,this.resourceDateTree=[],this.parent=i}return a.prototype.renderResourceHeaderIndent=function(i){var e=(0,s.n)("td",{className:"e-resource-left-td"}),t=(0,s.n)("div",{className:Wh});this.parent.activeViewOptions.headerIndentTemplate?this.parent.renderHeaderIndentTemplate({className:[e.className],type:"emptyCells"},e):e.appendChild(t),this.parent.trigger(ti,{elementType:"emptyCells",element:e}),i.appendChild(e)},a.prototype.hideResourceRows=function(i){if(!(this.resourceCollection.length<=1||this.parent.virtualScrollModule))for(var e=this.lastResourceLevel.length,t=0;t<e;t++){var n=this.lastResourceLevel[parseInt(t.toString(),10)].resourceData,r=this.lastResourceLevel[parseInt(t.toString(),10)].resource;if(n.ClassName===tr&&!n[r.expandedField]&&!(0,s.hX)(n[r.expandedField])){var l=[].slice.call(i.children).slice(t+1,t+(parseInt(n.Count,10)+1));(0,s.iQ)(l,Ai)}}},a.prototype.createResourceColumn=function(){var i=this.resourceCollection,e=(0,s.n)("div",{className:Wi}),t=this.parent.activeView.createTableLayout(_s);!this.parent.uiStateValues.isGroupAdaptive&&this.parent.rowAutoHeight&&this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&(0,s.iQ)([t],Hf);var n=t.querySelector("tbody"),r=this.generateTreeData(!0);if(this.countCalculation(i.slice(0,-2),i.slice(0,-1)),this.renderedResources=this.lastResourceLevel,this.parent.virtualScrollModule){var o=this.parent.virtualScrollModule.getRenderedCount();
1this.setExpandedResources(),r=this.expandedResources.slice(0,o),this.renderedResources=r}return(0,s.BC)(this.getContentRows(r),n),this.hideResourceRows(n),t.appendChild(n),e.appendChild(t),e},a.prototype.setRenderedResources=function(){var i=this.resourceCollection;this.generateTreeData(!0),this.countCalculation(i.slice(0,-2),i.slice(0,-1)),this.renderedResources=this.lastResourceLevel},a.prototype.setExpandedResources=function(){for(var i=[],e=0;e<this.lastResourceLevel.length;e++){var t=this.lastResourceLevel[parseInt(e.toString(),10)].resourceData,n=t.Count;i.push(this.lastResourceLevel[parseInt(e.toString(),10)]);var r=t[this.lastResourceLevel[parseInt(e.toString(),10)].resource.expandedField];!(0,s.hX)(r)&&!r&&n>0&&(e+=n)}this.expandedResources=i},a.prototype.getContentRows=function(i,e){for(var n,r,t=[],o=this.resourceCollection,l=(0,s.n)("tr"),h=(0,s.n)("td",{attrs:{tabindex:e?"-1":"0"}}),d=this.parent.activeView.getGroupIndices(),p=0;p<i.length;p++)if(!(d.length>0&&d.indexOf(i[parseInt(p.toString(),10)].groupIndex)>-1)){var u=h.cloneNode();if((r=Tl(o,"name",i[parseInt(p.toString(),10)].resource.name))===o.length-1?((0,s.X$)(i[parseInt(p.toString(),10)].resourceData,{ClassName:_b}),this.renderedResources[parseInt(p.toString(),10)].className=[_b]):((0,s.X$)(i[parseInt(p.toString(),10)].resourceData,{ClassName:tr}),this.renderedResources[parseInt(p.toString(),10)].className=[tr]),n=r*this.leftPixel+"px",i[parseInt(p.toString(),10)].resourceData.ClassName===tr&&!(0,s.hX)(i[parseInt(p.toString(),10)].resourceData.Count)&&i[parseInt(p.toString(),10)].resourceData.Count>0){var f;f=i[parseInt(p.toString(),10)].resourceData[o[parseInt(r.toString(),10)].expandedField]||
1(0,s.hX)(i[parseInt(p.toString(),10)].resourceData[o[parseInt(r.toString(),10)].expandedField])?gr:ro;var m=(0,s.n)("div");(0,s.iQ)([m],[pa,f]),this.setMargin(m,n),u.appendChild(m),this.resourceCollection.length>1&&s.Jm.add(m,"click",this.onTreeIconClick,this)}this.parent.activeView.setResourceHeaderContent(u,i[parseInt(p.toString(),10)],Wh),u.setAttribute("data-group-index",i[parseInt(p.toString(),10)].groupIndex.toString()),u.setAttribute("aria-label",i[parseInt(p.toString(),10)].resourceData[i[parseInt(p.toString(),10)].resource.textField]+" resource"),this.parent.activeViewOptions.resourceHeaderTemplate||this.setMargin(u.querySelector("."+Wh),n);var g=[on,i[parseInt(p.toString(),10)].resourceData.ClassName];(0,s.iQ)([u],g);var v={elementType:"resourceHeader",element:u,groupIndex:i[parseInt(p.toString(),10)].groupIndex};this.parent.trigger(ti,v);var b=l.cloneNode();b.appendChild(u),t.push(b)}return t},a.prototype.setMargin=function(i,e){this.parent.enableRtl?i.style.marginRight=e:i.style.marginLeft=e},a.prototype.countCalculation=function(i,e){for(var t,n=0;n<i.length;n++){for(var r=i[i.length-(n+1)].dataSource,o=0;o<r.length;o++){var l=0;if(this.parent.activeViewOptions.group.byGroupID){var h=(new x.XK).where(e[e.length-1].groupIDField,"equal",r[parseInt(o.toString(),10)][i[i.length-(n+1)].idField]);t=new x.M1(e[e.length-1].dataSource).executeLocal(h)}else t=e[e.length-1].dataSource;for(var d=0;d<t.length;d++)l+=parseInt(t[parseInt(d.toString(),10)].Count,10);l+=parseInt(r[parseInt(o.toString(),10)].Count,10),(0,s.X$)(r[parseInt(o.toString(),10)],{Count:l})}e=e.slice(0,-1)}},a.prototype.onTreeIconClick=function(i){var e=this;this.parent.eventTooltip&&this.parent.eventTooltip.close();var n,t=i.target,r=(0,s.kp)(t,"."+tr).parentElement,o=parseInt(r.children[0].getAttribute("data-group-index"),10),l={cancel:!1,event:i,groupIndex:o,requestType:t.classList.contains(gr)?"resourceCollapse":"resourceExpand"};this.parent.trigger(ji,l,function(h){if(!h.cancel){t.classList.contains(gr)?((0,s.pP)(t,[ro],[gr]),n=!0):((0,s.pP)(t,[gr],[ro]),n=!1);for(var p=0,u=[].slice.call(e.parent.element.querySelectorAll("."+Ce+",."+Fi));p<u.length;p++)(0,s.TF)(u[p]);e.parent.virtualScrollModule?e.updateVirtualContent(o,n,i,t):e.updateContent(o,n);var m={cssProperties:e.parent.getCssProperties(),module:"scroll"};e.parent.notify(fn,m),l={cancel:!1,event:i,groupIndex:o,requestType:t.classList.contains(gr)?"resourceExpanded":"resourceCollapsed"},e.parent.refreshEvents(!1),e.parent.trigger(zr,l)}})},a.prototype.updateContent=function(i,e){for(var o,t=[],n=[],r=[],l=this.lastResourceLevel[parseInt(i.toString(),10)].resourceData,h=[].slice.call(this.parent.element.querySelectorAll("."+Wi+" tr")),d=[].slice.call(this.parent.element.querySelectorAll("."+we+" tbody tr")),p=[].slice.call(this.parent.element.querySelectorAll("."+we+" ."+mn)),u=0;u<l.Count;u++)t.push(h[i+u+1]),n.push(d[i+u+1]),r.push(p[i+u+1]);for(var f=this.lastResourceLevel,m=0;m<t.length;m++){var g=!0;if(o=t[parseInt(m.toString(),10)].children[0].classList.contains(tr),f[parseInt(i.toString(),10)].resourceData[f[parseInt(i.toString(),10)].resource.expandedField]=!e,e)o&&(v=t[parseInt(m.toString(),10)].querySelector("."+pa))&&(0,s.pP)(v,[ro],[gr]),t[parseInt(m.toString(),10)].classList.contains(Ai)||(0,s.iQ)([t[parseInt(m.toString(),10)],n[parseInt(m.toString(),10)],r[parseInt(m.toString(),10)]],Ai);else{if(o){var v,b=t[parseInt(m.toString(),10)].rowIndex;!f[parseInt(b.toString(),10)].resourceData[f[parseInt(b.toString(),10)].resource.expandedField]&&!(0,s.hX)(f[parseInt(b.toString(),10)].resourceData[f[parseInt(b.toString(),10)].resource.expandedField])&&(t.splice(m+1,parseInt(f[parseInt(b.toString(),10)].resourceData.Count,10)),n.splice(m+1,parseInt(f[parseInt(b.toString(),10)].resourceData.Count,10)),r.splice(m+1,parseInt(f[parseInt(b.toString(),10)].resourceData.Count,10)),g=!1),g&&(v=t[parseInt(m.toString(),10)].querySelector("."+pa))&&(0,s.pP)(v,[gr],[ro])}t[parseInt(m.toString(),10)].classList.contains(Ai)&&(0,s.vy)([t[parseInt(m.toString(),10)],n[parseInt(m.toString(),10)],r[parseInt(m.toString(),10)]],Ai)}}},a.prototype.updateVirtualContent=function(i,e,t,n){this.lastResourceLevel[parseInt(i.toString(),10)].resourceData[this.lastResourceLevel[parseInt(i.toString(),10)].resource.expandedField]=!e,this.setExpandedRes
1ources();var r=this.parent.virtualScrollModule.getRenderedCount(),o=this.expandedResources.indexOf(this.renderedResources[0]);if(this.parent.virtualScrollModule.existingDataCollection=this.renderedResources,this.renderedResources=this.expandedResources.slice(o,o+r),this.renderedResources.length<r){var l=this.expandedResources.length-r;this.renderedResources=this.expandedResources.slice(l=l>0?l:0,this.expandedResources.length)}var h=this.parent.element.querySelector("."+Pl);this.parent.virtualScrollModule.updateVirtualTrackHeight(h);var d=this.parent.element.querySelector("."+Wi+" table"),p=this.parent.element.querySelector("."+we+" table"),u=this.parent.element.querySelector("."+Ur);this.parent.virtualScrollModule.updateContent(d,p,u,this.renderedResources);var f=this.parent.element.querySelector("."+fa);(0,s.hX)(f)||(f.style.height=this.parent.element.querySelector("."+nt).offsetHeight+"px")},a.prototype.renderResourceHeader=function(){var i=(0,s.n)("div",{className:Ol});if(i.innerHTML='<div class="'+vf+'"><div class="'+ey+'"><div class="e-icons '+ty+'"></div></div><div class="'+iy+'"></div></div>',"MonthAgenda"===this.parent.currentView){var e=this.parent.activeView.getPanel().querySelector("."+we);e.insertBefore(i,e.querySelector("."+Al))}else this.parent.element.insertBefore(i,this.parent.element.querySelector("."+kn));this.renderResourceHeaderText(),s.Jm.add(i.querySelector("."+ty),"click",this.menuClick,this)},a.prototype.renderResourceTree=function(){this.popupOverlay=(0,s.n)("div",{className:ny});var i=(0,s.n)("div",{className:Ul+" e-popup-close"});if("MonthAgenda"===this.parent.currentView){var e=this.parent.activeView.getPanel().querySelector("."+Al);e.insertBefore(i,e.children[0]),e.appendChild(this.popupOverlay)}else this.parent.element.querySelector("."+kn).appendChild(i),this.parent.element.querySelector("."+kn).appendChild(this.popupOverlay);var t=(0,s.n)("div",{className:"e-resource-tree"});i.appendChild(t),this.treeViewObj=new Av({cssClass:this.parent.cssClass,enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,fields:{dataSource:[].slice.call(this.generateTreeData()),id:"resourceId",text:"resourceName",child:"resourceChild"},nodeTemplate:this.parent.resourceHeaderTemplate,nodeClicked:this.resourceClick.bind(this),created:this.resourceTreeCreated.bind(this)}),this.treeViewObj.root=this.parent.root?this.parent.root:this.parent,this.treeViewObj.appendTo(t),this.treeViewObj.expandAll(
1),this.treePopup=new ae.zD(i,{targetType:"relative",actionOnScroll:"none",content:this.treeViewObj.element,relateTo:this.parent.element.querySelector("."+kn),enableRtl:this.parent.enableRtl,hideAnimation:{name:"SlideLeftOut",duration:500},showAnimation:{name:"SlideLeftIn",duration:500},viewPortElement:this.parent.element.querySelector("."+("MonthAgenda"===this.parent.currentView?Al:kn))}),this.parent.on(Xr,this.documentClick,this)},a.prototype.resourceTreeCreated=function(){this.parent.activeViewOptions.resourceHeaderTemplate&&this.parent.portals&&this.treeViewObj.portals&&(this.parent.portals=this.parent.portals.concat(this.treeViewObj.portals),this.parent.renderTemplates())},a.prototype.generateTreeData=function(i){for(var e=this,t=[],n=[],r=0,o=function(p,u){var f=function(m,g,v){var y,S,b=e.resourceCollection[parseInt(g.toString(),10)];i?(n.push(S={type:"resourceHeader",resource:m.resource,resourceData:m.resourceData,groupIndex:r,groupOrder:m.groupOrder}),r++):y={resourceId:v,resourceName:m.resourceData[b.textField],resource:m.resource,resourceData:m.resourceData},m.child.length>0&&!i&&(y.resourceChild=[]);for(var E=1,_=0,T=m.child;_<T.length;_++){var I=T[_];i?f(I,g+1,v+"-"+E):y.resourceChild.push(f(I,g+1,v+"-"+E)),E+=1}return i&&(0,s.X$)(S.resourceData,{Count:E-1}),y};i?f(l.resourceTreeLevel[parseInt(p.toString(),10)],0,(p+1).toString()):t.push(f(l.resourceTreeLevel[parseInt(p.toString(),10)],0,(p+1).toString()))},l=this,h=0,d=this.resourceTreeLevel.length;h<d;h++)o(h);return i?(this.lastResourceLevel=n,n):t},a.prototype.renderResourceHeaderText=function(){for(var i=this.lastResourceLevel[this.parent.uiStateValues.groupIndex],e=[],t=function(f,m){var g=n.resourceCollection[parseInt(f.toString(),10)],v=g.dataSource.filter(function(S){return S[g.idField]===i.groupOrder[parseInt(f.toString(),10)]}),b=(0,s.n)("div",{className:Ab});n.parent.sanitize(v[0][g.textField],b),e.push(b);var y=(0,s.n)("div",{className:"e-icons e-icon-next"});e.push(y)},n=this,r=0,o=i.groupOrder.length;r<o;r++)t(r);e.pop();var h=("MonthAgenda"===this.parent.currentView?this.parent.activeView.getPanel():this.parent.element).querySelector("."+iy);Dn(h);for(var d=0,p=e;d<p.length;d++)h.appendChild(p[d]);1===this.lastResourceLevel.length&&(0,s.iQ)([this.parent.element.querySelector("."+ey)],ot)},a.prototype.menuClick=function(i){if(this.parent.element.querySelector("."+Ul).classList.contains(Qt))this.treePopup.hide(),(0,s.vy)([this.popupOverlay],Cs);else{var e=[].slice.call(this.treeViewObj.element.querySelectorAll(".e-list-item:not(.e-has-child)"));(0,s.vy)(e,"e-active"),(0,s.iQ)([e[this.parent.uiStateValues.groupIndex]],"e-active"),this.treePopup.show(),(0,s.iQ)([this.popupOverlay],Cs)}},a.prototype.selectResourceByIndex=function(i){this.lastResourceLevel&&i>-1&&i<this.lastResourceLevel.length&&this.triggerEvents(i)},a.prototype.resourceClick=function(i){if(!i.node.classList.contains("e-has-child")){this.treePopup.hide(),(0,s.vy)([this.popupOverlay],Cs);var t=[].slice.call(this.treeViewObj.element.querySelectorAll(".e-list-item:not(.e-has-child)")).indexOf(i.node);this.triggerEvents(t,i),i.event.preventDefault()}},a.prototype.triggerEvents=function(i,e){var t=this,n={cancel:!1,event:e?e.event:null,groupIndex:i,requestType:"resourceChange"};this.parent.trigger(ji,n,function(r){r.cancel||(t.parent.uiStateValues.groupIndex=r.groupIndex,t.parent.renderModule.render(t.parent.currentView),n={cancel:!1,event:e?e.event:null,groupIndex:t.parent.uiStateValues.groupIndex,requestType:"resourceChanged"},t.parent.adaptiveGroupIndex=t.parent.uiStateValues.groupIndex,t.parent.trigger(zr,n))})},a.prototype.documentClick=function(i){if(!(0,s.kp)(i.event.target,"."+Ul)){var e=this.parent.element.querySelector("."+Ul);e&&e.classList.contains(Qt)&&(this.treePopup.hide(),(0,s.vy)([this.popupOverlay],Cs))}},a.prototype.bindResourcesData=function(i){var e=this;this.parent.showSpinner();for(var t=[],n=0,r=this.parent.resources;n<r.length;n++){var o=r[n],l=new dy(this.parent,o.dataSource,o.query);t.push(l.getData(l.generateQuery()))}Promise.all(t).then(function(h){return e.dataManagerSuccess(h,i)}).catch(function(h){return e.parent.crudModule.dataManagerFailure(h)})},a.prototype.dataManagerSuccess=function(i,e){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){this.parent.resourceCollection=[];for(var t=0,n=i.length;t<n;t++){var r=this.parent.resources[parseInt(t.toString(),10)],o=this.getResourceModel(r,i[parseInt(t.toString(),10)].result);this.parent.resourceCollection.push(o)}this.refreshLayout(e)}},a.prototype.getResourceModel=function(i,e){return{field:i.field,title:i.title,name:i.name,allowMultiple:i.allowMultiple,dataSource:e||i.dataSource,idField:i.idField,textField:i.textField,groupIDField:i.groupIDField,colorField:i.colorField,startHourField:i.startHourField,endHourField:i.endHourField,workDaysField:i.workDaysField,expandedField:i.expandedField,cssClassField:i.cssClassField}},a.prototype.refreshLayout=function(i){((0,s.hX)(this.parent.uiStateValues.groupIndex)||!this.parent.enablePersistence)&&(this.parent.uiStateValues.groupIndex=0),this.parent.renderElements(i)},a.prototype.setResourceCollection=function(){var i=[];if(this.resourceCollection=[],this.colorIndex=null,this.parent.activeViewOptions.group.resources.length>0)for(var e=0,t=this.parent.activeViewOptions.group.resources;e<t.length;e++){var r=Tl(this.parent.resourceCollection,"name",n=t[e]);r>=0&&i.push(this.parent.resourceCollection[parseInt(r.toString(),10)])}else this.parent.resourceCollection.length>0&&(i=this.parent.resourceCollection);for(var o=0,l=0,h=i;l<h.length;l++){var n,d=this.getResourceModel(n=h[l]);n.name===this.parent.eventSettings.resourceColorField&&(this.colorIndex=o),o++,this.resourceCollection.push(d)}(0,s.hX)(this.colorIndex)&&(this.colorIndex=this.resourceCollection.length-1)},a.prototype.generateResourceLevels=function(i,e){var t=this,r=[],o=[],l=function(h,d,p,u,f){var m=[],g=h[0];if(g){var v=void 0;if(u&&t.parent.activeViewOptions.group.byGroupID){var b=u[p.idField];v=g.dataSource.filter(function(G){return G[g.groupIDField]===b})}else v=g.dataSource;for(var y=0;y<v.length;y++){var S=[];f&&f.length>0&&(S=S.concat(f)),S.push(v[parseInt(y.toString(),10)][g.idField]);var E=l(h.slice(1),d+1,g,v[parseInt(y.toString(),10)],S);if(!(0===d&&0===E.length&&t.resourceCollection.length>1)){var _=[],T=t.parent.activeView.renderDates,I=void 0;if(!t.parent.activeViewOptions.group.byDate&&d+1===t.resourceCollection.length){var w=v[parseInt(y.toString(),10)][g.workDaysField],A=v[parseInt(y.toString(),10)][g.startHourField],M=v[parseInt(y.toString(),10)][g.endHourField];w&&w.length>0?(T=t.parent.activeView.getRenderDates(w),I=w,_=t.parent.activeView.getDateSlots(T,w)):(I=t.parent.activeViewOptions.workDays,_=i);var D=t.generateCustomHours(_,A,M,S);o=o.concat(D)}var L=v[parseInt(y.toString(),10)][g.cssClassField],V={type:"resourceHeader",className:["e-resource-cells"],resourceLevelIndex:d,groupOrder:S,resource:g,resourceData:v[parseInt(y.toString(),10)],colSpan:t.parent.activeViewOptions.group.byDate?1:_.length,renderDates:T,workDays:I,cssClass:L,child:E};m.push(V)}}return r[parseInt(d.toString(),10)]||(r[parseInt(d.toString(),10)]=[]),m.length>0&&r[parseInt(d.toString(),10)].push(m),m}return[]};return this.resourceTreeLevel=l(this.resourceCollection,0),e?[]:this.generateHeaderLevels(r,o,i)},a.prototype.generateCustomHours=function(i,e,t,n){for(var r=(0,s.X$)([],i,null,!0),o=0,l=r;o<l.length;o++){var h=l[o];e&&(h.startHour=this.parent.getStartEndTime(e)),t&&(h.endHour=this.parent.getStartEndTime(t)),n&&(h.groupOrder=n)}return r},a.prototype.generateHeaderLevels=function(i,e,t){for(var n=[],r=i.length-1;r>=0;r--)for(var o=0,l=0,h=i[parseInt(r.toString(),10)];l<h.length;l++)for(var p=0,u=h[l];p<u.length;p++){var f=u[p];if(i[r+1]&&i[r+1].length>0){var m=i[parseInt((r+1).toString(),10)][parseInt(o.toString(),10)];if(!m)continue;for(var g=0,v=0,b=m;v<b.length;v++){var y=b[v];(!this.parent.activeViewOptions.group.byGroupID||this.parent.activeViewOptions.group.byGroupID&&y.resourceData[y.resource.groupIDField]===f.resourceData[f.resource.idField])&&(g+=y.colSpan)}f.colSpan=g}f.groupIndex=o,o++,n[f.resourceLevelIndex]=n[f.resourceLevelIndex]||[],n[f.resourceLevelIndex].push(f)}if(this.lastResourceLevel=n.slice(-1)[0]||[],!this.parent.activeViewOptions.group.byDate){for(var S=0,E=0,_=this.lastResourceLevel;E<_.length;E++){var T=_[E];for(r=0;r<T.colSpan;r++)e[parseInt(S.toString(),10)].groupIndex=T.groupIndex,S++}return n.push(e),n}var I=[],w=(0,s.X$)([],n,null,!0),A=[];
1if(this.parent.activeViewOptions.group.hideNonWorkingDays){for(var M=[],D=0,L=function(Be){V.resourceDateTree[parseInt(D.toString(),10)]=[];for(var Kt=[],Ns=function(ar){var Oo=V.lastResourceLevel[parseInt(ar.toString(),10)].resourceData[V.lastResourceLevel[parseInt(ar.toString(),10)].resource.workDaysField];if(Oo||(Oo=V.parent.activeViewOptions.workDays),-1!==Oo.indexOf(Be.date.getDay())){var Te=(0,s.X$)({},V.lastResourceLevel[parseInt(ar.toString(),10)],null,!0);Te.date=Be.date,V.lastResourceLevel[parseInt(ar.toString(),10)].workDays=Oo,Te.startHour=V.parent.getStartEndTime(Te.resourceData[Te.resource.startHourField])||Be.startHour,Te.endHour=V.parent.getStartEndTime(Te.resourceData[Te.resource.endHourField])||Be.endHour,V.resourceDateTree[parseInt(D.toString(),10)].push(Te);for(var w8=function(is){if(Kt[parseInt(is.toString(),10)]||(Kt[parseInt(is.toString(),10)]=[]),is===Te.groupOrder.length-1){M[parseInt(ar.toString(),10)]||(M[parseInt(ar.toString(),10)]=[]);var O8=Te.renderDates.filter(function(Ao){return Ao.getDay()===Be.date.getDay()});return M[parseInt(ar.toString(),10)]=M[parseInt(ar.toString(),10)].concat(O8),Kt[parseInt(is.toString(),10)].push(Te),"continue"}var Wg=w[parseInt(is.toString(),10)].filter(function(Ao){return Ao.resourceData[Ao.resource.idField]===Te.groupOrder[parseInt(is.toString(),10)]});if(Wg&&Wg.length>0){var $g=Kt[parseInt(is.toString(),10)].filter(function(Ao){return Ao.resourceData[Ao.resource.idField]===Te.groupOrder[parseInt(is.toString(),10)]});if($g&&$g.length>0)$g[0].colSpan+=1;else{var v_=(0,s.X$)({},Wg[0],null,!0);v_.colSpan=1,Kt[parseInt(is.toString(),10)].push(v_)}}},Ug=0;Ug<Te.groupOrder.length;Ug++)w8(Ug)}},Vs=0;Vs<V.lastResourceLevel.length;Vs++)Ns(Vs);if(Kt.length>0){for(var Dr=0;Dr<w.length;Dr++)I[parseInt(Dr.toString(),10)]||(I[parseInt(Dr.toString(),10)]=[]),I[parseInt(Dr.toString(),10)]=I[parseInt(Dr.toString(),10)].concat(Kt[parseInt(Dr.toString(),10)]);Be.colSpan=Kt[Kt.length-1].length,A.push(Be)}D++},V=this,G=0,W=t;G<W.length;G++)L(te=W[G]);return this.resourceDateTree=this.resourceDateTree.filter(function(Be){return Be.length>0}),this.lastResourceLevel.forEach(function(Be,Kt){M[parseInt(Kt.toString(),10)]&&(Be.renderDates=M[parseInt(Kt.toString(),10)].sort(function(Ns,Vs){return Ns.getTime()-Vs.getTime()}))}),I.unshift(A),I}for(var $=0,Se=0,Ie=w[0];Se<Ie.length;Se++)$+=Ie[Se].colSpan;for(var Ne=0,de=t;Ne<de.length;Ne++){var te;(te=de[Ne]).colSpan=$,A.push(te);for(var At=(0,s.X$)([],w,null,!0),_t=0,ut=At.length;_t<ut;_t++){if(_t===At.length-1)for(var Vt=0,gi=At[parseInt(_t.toString(),10)];Vt<gi.length;Vt++){var li=gi[Vt];li.date=te.date,li.workDays=te.workDays,li.startHour=this.parent.getStartEndTime(li.resourceData[li.resource.startHourField])||te.startHour,li.endHour=this.parent.getStartEndTime(li.resourceData[li.resource.endHourField])||te.endHour}I[parseInt(_t.toString(),10)]||(I[parseInt(_t.toString(),10)]=[]),I[parseInt(_t.toString(),10)]=I[parseInt(_t.toString(),10)].concat(At[parseInt(_t.toString(),10)])}}return I.unshift(A),I},a.prototype.setResourceValues=function(i,e){var t=this,n=function(h,d,p){i[""+d]=t.resourceCollection[parseInt(h.toString(),10)].allowMultiple&&t.parent.activeViewOptions.group.allowGroupEdit?[p]:p};if(void 0===e&&(e=this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:this.parent.activeCellsData.groupIndex),this.parent.activeViewOptions.group.resources.length>0&&!(0,s.hX)(e))for(var r=this.lastResourceLevel[parseInt(e.toString(),10)].groupOrder,o=0;o<this.resourceCollection.length;o++)n(o,this.resourceCollection[parseInt(o.toString(),10)].field,r[parseInt(o.toString(),10)]);else if(this.parent.resourceCollection.length>0)for(o=0;o<this.resourceCollection.length;o++){var l=this.resourceCollection[parseInt(o.toString(),10)].dataSource[0];l&&n(o,this.resourceCollection[parseInt(o.toString(),10)].field,l[this.resourceCollection[parseInt(o.toString(),10)].idField])}},a.prototype.getResourceColor=function(i,e){var t=!(0,s.hX)(e)&&this.colorIndex>e.length-1?e.length-1:this.colorIndex,n=this.resourceCollection[parseInt(t.toString(),10)];if(!((0,s.hX)(e)&&this.parent.activeViewOptions.group.allowGroupEdit&&n.allowMultiple)){var r=(0,s.hX)(e)?i[n.field]:e[parseInt(t.toString(),10)],o=this.filterData(n.dataSource,n.idField,r);if(o.length>0)return o[0][n.colorField]}},a.prototype.getCssClass=function(i){var e=this.resourceCollection.slice(-1)[0];if(!this.parent.activeViewOptions.group.allowGroupEdit||!e.allowMultiple){var t=this.filterData(e.dataSource,e.idField,i[e.field]);if(t.length>0)return t[0][e.cssClassField]}},a.prototype.getResourceRenderDates=function(){var i=[].concat.apply([],this.lastResourceLevel.map(function(r){return r.renderDates})),e=i.map(function(r){return r.getTime()}),n=i.filter(function(o,l){return e.indexOf(o.getTime())===l});return n.sort(function(r,o){return r.getTime()-o.getTime()}),n},a.prototype.filterData=function(i,e,t){return i.filter(function(n){return n[""+e]===t})},a.prototype.getResourceData=function(i,e,t){if(this.parent.activeViewOptions.group.allowGroupEdit){for(var n={},r=0,o=t;r<o.length;r++)for(var h=this.lastResourceLevel[parseInt(o[r].toString(),10)].groupOrder,d=0,p=h.length;d<p;d++){var u=this.resourceCollection[parseInt(d.toString(),10)].field;(0,s.hX)(n[""+u])&&(n[""+u]=[]),n[""+u].push(h[parseInt(d.toString(),10)])}i=(0,s.X$)(i,n)}else{d=0;for(var f=this.resourceCollection.length;d<f;d++)this.lastResourceLevel[parseInt(e.toString(),10)]&&(i[this.resourceCollection[parseInt(d.toString(),10)].field]=this.lastResourceLevel[parseInt(e.toString(),10)].groupOrder[parseInt(d.toString(),10)])}},a.prototype.addResource=function(i,e,t){for(var n=i instanceof Array?i:[i],r=function(p){if(p.name===e)return n.forEac
1h(function(u,f){return new x.M1({json:p.dataSource}).insert(u,null,null,t+f)}),"break"},o=0,l=this.parent.resourceCollection;o<l.length&&"break"!==r(l[o]);o++);this.refreshLayout(!0)},a.prototype.removeResource=function(i,e){for(var t=i instanceof Array?i:[i],n=function(d){if(d.name===e)return t.forEach(function(p){return new x.M1({json:d.dataSource}).remove(d.idField,p)}),"break"},r=0,o=this.parent.resourceCollection;r<o.length&&"break"!==n(o[r]);r++);this.refreshLayout(!0)},a.prototype.getIndexFromResourceId=function(i,e,t,n,r){if(e=e||this.parent.resourceCollection.slice(-1)[0].name,(0,s.hX)(t)&&(t=this.resourceCollection.filter(function(l){return l.name===e})[0],(0,s.hX)(t)))return null;var o=t.dataSource.filter(function(l){return n&&l[t.idField]===i?l[t.groupIDField]===n[""+r]?l[t.idField]===i:null:l[t.idField]===i})[0];return this.lastResourceLevel.map(function(l){return l.resourceData}).indexOf(o)},a.prototype.resourceExpand=function(i,e,t){var r,n=this.parent.resourceCollection.filter(function(h){return h.name===e?h:null})[0],o=n.dataSource.filter(function(h){return h[n.idField]===i})[0];r=this.parent.activeViewOptions.group.byGroupID?this.lastResourceLevel.map(function(h){return h.resourceData}).indexOf(o):this.getIndexFromResourceId(i,e,n);var l=this.parent.element.querySelector("."+Wi+' [data-group-index="'+r+'"] .'+pa);l&&(l.classList.contains(ro)&&!t||l.classList.contains(gr)&&t)&&l.click()},a.prototype.resourceScroll=function(i,e){if(!(this.parent.isAdaptive||["Agenda","MonthAgenda"].indexOf(this.parent.currentView)>-1)){var t=e||this.parent.resourceCollection.slice(-1)[0].name,n=this.parent.resourceCollection.length-1,r=this.parent.resourceCollection.filter(function(g,v){return g.name===t?(n=v,g):null})[0],o=this.parent.element.querySelector("."+we),l=0;if(this.parent.activeView.isTimelineView()){if(this.parent.activeViewOptions.group.byGroupID){var h=r.dataSource.filter(function(g){return g[r.idField]===i})[0];l=this.lastResourceLevel.map(function(g){return g.resourceData}).indexOf(h)}else l=this.getIndexFromResourceId(i,t,r);if(this.parent.virtualScrollModule){var d=this.parent.element.querySelector("."+Pl),p=Math.round(d.offsetHeight/this.expandedResources.length);this.parent.rowAutoHeight&&(o.scrollTop=0,this.parent.virtualScrollModule.virtualScrolling()),o.scrollTop=l*p-(this.parent.virtualScrollModule.bufferCount-1)*p,this.parent.virtualScrollModule.virtualScrolling(),this.parent.rowAutoHeight?(u=this.parent.element.querySelector("."+ie+'[data-group-index="'+l+'"]'))&&!u.parentElement.classList.contains(Ai)&&(o.scrollTop=o.scrollTop<u.offsetTop?u.offsetTop:o.scrollTop+u.offsetTop):o.scrollTop=l*p}else{var u;(u=this.parent.element.querySelector("."+ie+'[data-group-index="'+l+'"]'))&&!u.parentElement.classList.contains(Ai)&&(o.scrollTop=u.offsetTop)}}else{l=this.parent.activeViewOptions.group.byGroupID?t===this.parent.resourceCollection.slice(-1)[0].name?this.lastResourceLevel.map(function(g){return g.resourceData[r.idField]}).indexOf(i):r.dataSource.map(function(g){return g[r.idField]}).indexOf(i):this.getIndexFromResourceId(i,t,r);var f=this.parent.element.querySelector("Month"===this.parent.currentView?"."+bi+" tbody tr:nth-child("+(n+1)+")":"."+If+":nth-child("+(n+1)+")"),m=[].slice.call(f.children).map(function(g){return g.offsetLeft});o.scrollLeft=m[parseInt(l.toString(),10)]}}},a.prototype.destroy=function(){if(this.parent.off(Xr,this.documentClick),this.treeViewObj){if(this.treeViewObj.portals&&this.treeViewObj.portals.length>0){var i=this.treeViewObj.portals.map(function(t){return t.propName});i.length>0&&this.parent.resetTemplates(i)}this.treeViewObj.destroy(),this.treeViewObj=null}this.treePopup&&(this.treePopup.destroy(),this.treePopup=null,(0,s.TF)(this.parent.element.querySelector("."+Ul)),(0,s.TF)(this.parent.element.querySelector("."+ny)));var e=this.parent.element.querySelector("."+Ol);e&&(0,s.TF)(e)},a}(),qO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),yi=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},GO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return qO(i,a),yi([(0,s.mA)("")],i.prototype,"id",void 0),yi([(0,s.mA)("")],i.prototype,"text",void 0),yi([(0,s.mA)("auto")],i.prototype,"width",void 0),yi([(0,s.mA)("")],i.prototype,"cssClass",void 0),yi([(0,s.mA)(!1)],i.prototype,"showAlwaysInPopup",void 0),yi([(0,s.mA)(!1)],i.prototype,"disabled",void 0),yi([(0,s.mA)("")],i.prototype,"prefixIcon",void 0),yi([(0,s.mA)("")],i.prototype,"suffixIcon",void 0),yi([(0,s.mA)(!0)],i.prototype,"visible",void 0),yi([(0,s.mA)("None")],i.prototype,"overflow",void 0),yi([(0,s.mA)("")],i.prototype,"template",void 0),yi([(0,s.mA)("Button")],i.prototype,"type",void 0),yi([(0,s.mA)("Both")],i.prototype,"showTextOn",void 0),yi([(0,s.mA)(null)],i.prototype,"htmlAttributes",void 0),yi([(0,s.mA)("")],i.prototype,"tooltipText",void 0),yi([(0,s.mA)("Left")],i.prototype,"align",void 0),yi([(0,s.mA)(-1)],i.prototype,"tabIndex",void 0),yi([(0,s.mA)("Custom")],i.prototype,"name",void 0),yi([(0,s.Jh)()],i.prototype,"click",void 0),i}
1(s.I1),YO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Z=function(a,i,e,t){var o,n=arguments.length,r=n<3?i:null===t?t=Object.getOwnPropertyDescriptor(i,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(a,i,e,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(r=(n<3?o(r):n>3?o(i,e,r):o(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r},lS=function(a){function i(e,t){var n=a.call(this,e,t)||this;return n.adaptiveGroupIndex=0,n}return YO(i,a),i.prototype.render=function(){var e=[],t=[];if(e.push(jh),this.enableRtl?e.push(of):t.push(of),this.isAdaptive?e.push(ca):t.push(ca),this.enableAdaptiveUI?e.push(Sb):t.push(Sb),this.allowMultiDrag?e.push(af):t.push(af),this.cssClass)for(var r=0,o=this.cssClass.split(" ");r<o.length;r++)e.push(o[r]);(0,s.pP)(this.element,e,t),this.validateDate(),(0,ae.GF)({target:this.element}),this.scrollModule=new nw(this),this.scrollModule.setWidth(),this.scrollModule.setHeight(),this.renderModule=new xO(this),this.eventBase=new Zf(this),this.workCellAction=new NO(this),this.allowKeyboardInteraction&&(this.keyboardInteractionModule=new hy(this)),this.inlineModule=new Hw(this),this.initializeDataModule(),this.renderTableContainer(),this.activeViewOptions=this.getActiveViewOptions(),this.initializeResources(),this.wireEvents()},i.prototype.renderTableContainer=function(){this.element.querySelector("."+kn)||this.element.appendChild(this.createElement("div",{className:kn}))},i.prototype.getEventTemplateName=function(e){var t="eventTemplate_"+e;return this.activeEventTemplates.indexOf(t)<0&&this.activeEventTemplates.push(t),t},i.prototype.getElementWidth=function(e){return bb(e,this.uiStateValues.isTransformed)},i.prototype.getElementHeight=function(e){return yb(e,this.uiStateValues.isTransformed)},i.prototype.getElementHeightFromClass=function(e,t){return function sx(a,i,e){var t,n=(0,s.n)("div",{className:i}).cloneNode();return n.style.visibility="hidden",n.style.position="absolute",a.appendChild(n),t=yb(n,e),(0,s.TF)(n),t}(e,t,this.uiStateValues.isTransformed)},i.prototype.renderTemplates=function(e){this.isReact?this.renderReactTemplates(e):e&&e()},i.prototype.resetTemplates=function(e){(this.isAngular||this.isReact)&&this.clearTemplate(e)},i.prototype.sanitize=function(e,t){this.enableHtmlSanitizer?t.innerText=s.r4.sanitize(e):t.innerHTML=e},i.prototype.initializeResources=function(e){void 0===e&&(e=!1),this.resources.length>0?(this.resourceBase=new $O(this),this.resourceBase.bindResourcesData(e)):(this.resourceBase=null,this.resourceCollection=[],this.renderElements(e))},i.prototype.destroyEditorWindow=function(){this.eventWindow&&(this.eventWindow.destroy(),this.eventWindow=null),this.eventWindow=new oS(this)},i.prototype.renderElements=function(e){if(e)return this.initializeView(this.currentView),void this.eventWindow.refresh();this.destroyHeaderModule(),this.showHeaderBar&&(this.headerModule=new zf(this)),this.renderTableContainer(),this.uiStateValues.isTransformed=Math.round(this.element.getBoundingClientRect().width)!==this.element.offsetWidth,(s.Pw.isDevice||s.Pw.isTouch)&&(this.scheduleTouchModule=new rw(this)),this.initializeView(this.currentView),this.destroyPopups(),this.isPrinting||this.initializePopups()},i.prototype.validateDate=function(e){void 0===e&&(e=this.selectedDate);var t=e instanceof Date?new Date(e.getTime()):new Date(e),n=(0,s.hX)(this.minDate)?new Date(1900,0,1):this.minDate instanceof Date?new Date(this.minDate.getTime()):new Date(this.minDate),r=(0,s.hX)(this.maxDate)?new Date(2099,11,31):this.maxDate instanceof Date?new Date(this.maxDate.getTime()):new Date(this.maxDate);if(!(n<=r))throw Error("minDate should be equal or less than maxDate");t<n&&(t=n),t>r&&(t=r),this.setProperties({selectedDate:new Date(""+t),minDate:new Date(""+n),maxDate:new Date(""+r)},!0),this.eventWindow&&this.eventWindow.updateMinMaxDateToEditor()},i.prototype.getViewIndex=function(e){for(var t=0;t<this.viewCollections.length;t++)if(this.viewCollections[parseInt(t.toString(),10)].option===e)return t;return-1},i.prototype.setViewOptions=function(e){if(void 0===e&&(e=!1),!(0,s.hX)(this.views)&&0!==this.views.length){this.viewOptions={},this.viewCollections=[];var t,n,r=this.viewIndex,o=0;this.viewIndex=-1;for(var l=0,h=this.views;l<h.length;
1l++){var d=h[l],p="string"!=typeof d;"string"==typeof d?this.currentView===(t=d)&&(n=t,this.viewIndex=o):(t=d.option,d.isSelected&&(n=t,this.viewIndex=o));var u=(0,s.X$)({option:t},p?d:{}),f=t.charAt(0).toLowerCase()+t.slice(1);u.cellHeaderTemplateName=u.cellHeaderTemplate?u.option:"",u.dateHeaderTemplateName=u.dateHeaderTemplate?u.option:"",u.dateRangeTemplateName=u.dateRangeTemplate?u.option:"",u.cellTemplateName=u.cellTemplate?u.option:"",u.dayHeaderTemplateName=u.dayHeaderTemplate?u.option:"",u.monthHeaderTemplateName=u.monthHeaderTemplate?u.option:"",u.resourceHeaderTemplateName=u.resourceHeaderTemplate?u.option:"",u.headerIndentTemplateName=u.headerIndentTemplate?u.option:"",u.eventTemplateName=u.eventTemplate?u.option:"",!(0,s.hX)(u.firstDayOfWeek)&&0===u.firstDayOfWeek&&delete u.firstDayOfWeek,!(0,s.hX)(u.interval)&&1===u.interval&&delete u.interval,this.viewCollections.push(u),(0,s.hX)(this.viewOptions[""+f])?this.viewOptions[""+f]=[u]:this.viewOptions[""+f].push(u),o++}if(!e&&n&&this.setProperties({currentView:n},!0),-1===this.viewIndex){var m=this.getViewIndex(this.currentView);this.viewIndex="string"==typeof this.views[0]||(0,s.hX)(r)||-1===r?-1===m?0:m:r}}},i.prototype.getActiveViewOptions=function(){var e={enable:this.timeScale.enable,interval:this.timeScale.interval,slotCount:this.timeScale.slotCount,majorSlotTemplate:this.timeScale.majorSlotTemplate,minorSlotTemplate:this.timeScale.minorSlotTemplate},n={byDate:!(this.viewCollections[this.viewIndex].option.indexOf("Year")>-1)&&this.group.byDate,byGroupID:this.group.byGroupID,allowGroupEdit:this.group.allowGroupEdit,resources:(0,s.hX)(this.group.resources)?[]:this.group.resources,headerTooltipTemplate:this.group.headerTooltipTemplate,enableCompactView:this.group.enableCompactView,hideNonWorkingDays:["Day","Week","WorkWeek","Month"].indexOf(this.currentView)>-1&&this.group.hideNonWorkingDays},l=this.viewCollections[this.viewIndex],h=(0,s.X$)({dateFormat:this.dateFormat,endHour:this.endHour,isSelected:!1,option:null,readonly:this.readonly,startHour:this.startHour,allowVirtualScrolling:!1,allowOverlap:this.allowOverlap,overscanCount:this.overscanCount,cellHeaderTemplate:this.cellHeaderTemplate,dayHeaderTemplate:this.dayHeaderTemplate,monthHeaderTemplate:this.monthHeaderTemplate,cellTemplate:this.cellTemplate,eventTemplate:this.eventSettings.template,dateHeaderTemplate:this.dateHeaderTemplate,dateRangeTemplate:this.dateRangeTemplate,resourceHeaderTemplate:this.resourceHeaderTemplate,headerIndentTemplate:this.headerIndentTemplate,firstMonthOfYear:this.firstMonthOfYear,firstDayOfWeek:this.firstDayOfWeek,workDays:this.viewCollections[this.viewIndex].workDays?[]:this.workDays,monthsCount:this.monthsCount,showWeekend:this.showWeekend,showWeekNumber:this.showWeekNumber,displayName:null,interval:1,timeScale:e,timeFormat:this.internalTimeFormat,group:n,headerRows:this.headerRows,orientation:"Horizontal",numberOfWeeks:0,displayDate:null,enableLazyLoading:!1},l,void 0,!0);return 0!==this.firstDayOfWeek&&l.firstDayOfWeek&&this.firstDayOfWeek!==l.firstDayOfWeek&&(h.firstDayOfWeek=this.firstDayOfWeek),h.displayDate&&(h.displayDate=h.displayDate instanceof Date?new Date(h.displayDate.getTime()):new Date(h.displayDate)),h.enableLazyLoading&&!(0,s.hX)(h.group.resources)&&h.group.resources.length>0&&(-1===["Agenda","MonthAgenda","Year","TimelineYear"].indexOf(h.option)||"TimelineYear"===h.option&&"Vertical"===h.orientation)&&(h.allowVirtualScrolling=!0),h},i.prototype.initializeDataModule=function(){this.eventFields={id:this.eventSettings.fields.id,isBlock:this.eventSettings.fields.isBlock,subject:this.eventSettings.fields.subject.name,startTime:this.eventSettings.fields.startTime.name,endTime:this.eventSettings.fields.endTime.name,startTimezone:this.eventSettings.fields.startTimezone.name,endTimezone:this.eventSettings.fields.endTimezone.name,location:this.eventSettings.fields.location.name,description:this.eventSettings.fields.description.name,isAllDay:this.eventSettings.fields.isAllDay.name,recurrenceID:this.eventSettings.fields.recurrenceID.name,recurrenceRule:this.eventSettings.fields.recurrenceRule.name,recurrenceException:this.eventSettings.fields.recurrenceException.name,isReadonly:this.eventSettings.fields.isReadonly,followingID:this.eventSettings.fields.followingID},this.setEditorTitles(),this.dataModule=new dy(this,this.eventSettings.dataSource,this.eventSettings.query),this.crudModule=new RO(this)},i.prototype.setEditorTitles=function(){this.editorTitles={subject:this.eventSettings.fields.subject.title||this.localeObj.getConstant("title"),startTime:this.eventSettings.fields.startTime.title||this.localeObj.getConstant("start"),endTime:this.eventSettings.fields.endTime.title||this.localeObj.getConstant("end"),isAllDay:this.eventSettings.fields.isAllDay.title||this.localeObj.getConstant("allDay"),startTimezone:this.eventSettings.fields.startTimezone.title||this.localeObj.getConstant("startTimezone"),endTimezone:this.eventSettings.fields.endTimezone.title||this.localeObj.getConstant("endTimezone"),location:this.eventSettings.fields.location.title||this.localeObj.getConstant("location"),description:this.eventSettings.fields.description.title||this.localeObj.getConstant("description"),recurrenceRule:this.eventSettings.fields.recurrenceRule.title||this.localeObj.getConstant("repeat")}},i.prototype.initializeView=function(e){this.showSpinner(),this.activeViewOptions=this.getActiveViewOptions(),this.resourceBase&&this.resourceBase.setResourceCollection(),this.initializeTemplates(),this.renderModule.render(e)},i.prototype.initializeTemplates=function(){this.cellHeaderTemplateFn=this.templateParser(this.activeViewOptions.cellHeaderTemplate),this.dayHeaderTemplateFn=this.templateParser(this.activeViewOptions.dayHeaderTemplate),this.monthHeaderTemplateFn=this.templateParser(this.activeViewOptions.monthHeaderTemplate),this.cellTemplateFn=this.templateParser(this.activeViewOptions.cellTemplate),this.dateHeaderTemplateFn=this.templateParser(this.activeViewOptions.dateHeaderTemplate),this.dateRangeTemplateFn=this.templateParser(this.activeViewOptions.dateRangeTemplate),this.majorSlotTemplateFn=this.templateParser(this.activeViewOptions.timeScale.majorSlotTemplate),this.minorSlotTemplateFn=this.templateParser(this.activeViewOptions.timeScale.minorSlotTemplate),this.appointmentTemplateFn=this.templateParser(this.activeViewOptions.eventTemplate),this.resourceHeaderTemplateFn=this.templateParser(this.activeViewOptions.resourceHeaderTemplate),this.headerIndentTemplateFn=this.templateParser(this.activeViewOptions.headerIndentTemplate),this.headerTooltipTemplateFn=this.templateParser(this.activeViewOptions.group.headerTooltipTemplate),this.eventTooltipTemplateFn=this.templateParser(this.eventSettings.tooltipTemplate),this.editorTemplateFn=this.templateParser(this.editorTemplate),this.editorHeaderTemplateFn=this.templateParser(this.editorHeaderTemplate),this.editorFooterTemplateFn=this.templateParser(this.editorFooterTemplate),this.quickInfoTemplatesHeaderFn=this.templateParser(this.quickInfoTemplates.header),this.quickInfoTemplatesContentFn=this.templateParser(this.quickInfoTemplates.content),this.quickInfoTemplatesFooterFn=this.templateParser(this.quickInfoTemplates.footer)},i.prototype.initializePopups=function(){this.eventWindow=new oS(this),this.quickPopup=new Ay(this)},i.prototype.getDayNames=function(e){var n,t=[],r="";(0,s.hX)(this.locale)||"en"===this.locale||"en-US"===this.locale?n=(0,s._W)((r="days.stand-alone.")+e,(0,s.P)(this.getCalendarMode())):(r="main."+this.locale+".dates.calendars."+this.getCalendarMode()+".days.format."+e,n=(0,s._W)(r,s.pE));for(var o=0,l=Object.keys(n);o<l.length;o++)t.push((0,s._W)(l[o],n));return t},i.prototype.setCldrTimeFormat=function(){this.internalTimeFormat=(0,s.hX)(this.timeFormat)?(0,s.hX)(this.locale)||"en"===this.locale||"en-US"===this.locale?(0,s._W)("timeFormats.short",(0,s.P)(this.getCalendarMode())):(0,s._W)("main."+this.locale+".dates.calendars."+this.getCalendarMode()+".timeFormats.short",s.pE):this.timeFormat},i.prototype.getCalendarMode=function(){return(0,s.hX)(this.calendarMode)?"gregorian":this.calendarMode.toLowerCase()},i.prototype.getTimeString=function(e){return this.globalize.formatDate(e,{format:this.activeViewOptions.timeFormat,type:"time",calendar:this.getCalendarMode()}).toLocaleUpperCase()},i.prototype.getDateTime=function(e){return e instanceof Date?new Date(e.getTime()):new Date(e)},i.prototype.setCalendarMode=function(){this.calendarUtil="Islamic"===this.calendarMode?new uy:new py},i.prototype.changeView=function(e,t,n,r){var o=this;if((0,s.hX)(r)&&(r=this.getViewIndex(e)),!(!n&&r===this.viewIndex&&this.currentView===e||r<0)){var l=this.activeViewOptions?this.activeViewOptions.option:this.currentView,h={requestType:"viewNavigate",cancel:!1,event:t};this.trigger(ji,h,function(d){d.cancel?o.currentView=l:o.trigger(Gu,{action:"view",cancel:!1,currentDate:o.selectedDate,previousView:l,currentView:e,viewIndex:r},function(u){if(u.cancel)o.currentView=l;
1else{var f=["Day","Week","WorkWeek"].indexOf(e)>-1&&["Day","Week","WorkWeek"].indexOf(l)<0;o.uiStateValues.isInitial=f||e.indexOf("Timeline")>-1||e.indexOf("Year")>-1,o.uiStateValues.top=e.indexOf("Timeline")>-1&&l.indexOf("Timeline")<0?0:o.uiStateValues.top,o.viewIndex=u.viewIndex,o.setProperties({currentView:e},!0),o.headerModule&&(o.headerModule.updateActiveView(),o.headerModule.setCalendarDate(o.selectedDate),o.headerModule.setCalendarView()),o.initializeView(o.currentView),o.animateLayout(),o.trigger(zr,h={requestType:"viewNavigate",cancel:!1,event:t})}})})}},i.prototype.changeDate=function(e,t){var n=this,r={requestType:"dateNavigate",cancel:!1,event:t};this.trigger(ji,r,function(o){o.cancel||n.trigger(Gu,{action:"date",cancel:!1,previousDate:n.selectedDate,currentDate:e},function(h){h.cancel||(n.uiStateValues.isInitial=n.activeView.isTimelineView()&&"TimelineYear"!==n.currentView,n.validateDate(h.currentDate),n.headerModule&&n.headerModule.setCalendarDate(h.currentDate),"MonthAgenda"===n.currentView&&n.monthAgendaModule&&(n.monthAgendaModule.monthAgendaDate=new Date(""+n.selectedDate)),n.initializeView(n.currentView),n.animateLayout(),n.trigger(zr,r={requestType:"dateNavigate",cancel:!1,event:t}))})})},i.prototype.isMinMaxDate=function(e){void 0===e&&(e=this.selectedDate);var t=(0,s.hX)(this.maxDate)?new Date(2099,11,31):this.maxDate,n=(0,s.hX)(this.minDate)?new Date(1900,0,1):this.minDate;return e.getTime()>=n.getTime()&&e.getTime()<=t.getTime()},i.prototype.isSelectedDate=function(e){return e.setHours(0,0,0,0)===new Date(""+this.selectedDate).setHours(0,0,0,0)},i.prototype.getCurrentTime=function(e){return void 0===e&&(e=new Date),this.timezone?this.tzModule.convert(e,this.tzModule.getLocalTimezoneName(),this.timezone):e},i.prototype.getNavigateView=function(){return this.activeView.isTimelineView()?"TimelineMonth"===this.currentView||"TimelineYear"===this.currentView?"TimelineDay":"Agenda":"Day"},i.prototype.animateLayout=function(){this.activeView.element&&new s.X5({duration:600,name:"FadeIn",timingFunction:"easeIn"}).animate(this.activeView.element)},i.prototype.requiredModules=function(){var e=[];this.setViewOptions(!0);for(var t=0,n=Object.keys(this.viewOptions);t<n.length;t++){var r=n[t];e.push({member:r="timelineDay"===r||"timelineWeek"===r||"timelineWorkWeek"===r?"timelineViews":r,args:[this]})}return this.allowDragAndDrop&&e.push({member:"dragAndDrop",args:[this]}),this.allowResizing&&e.push({member:"resize",args:[this]}),e.push({member:"excelExport",args:[this]}),e.push({member:"iCalendarExport",args:[this]}),e.push({member:"iCalendarImport",args:[this]}),e.push({member:"print",args:[this]}),e},i.prototype.preRender=function(){this.isAdaptive=s.Pw.isDevice||function ux(){return window.navigator.userAgent.toLowerCase().indexOf("ipad")>-1}(),this.globalize=new s.DL(this.locale),this.tzModule=new fy,(this&&(0,s.hX)(this.uiStateValues)||!this.enablePersistence)&&(this.uiStateValues={expand:!1,isInitial:!0,left:0,top:0,isGroupAdaptive:!1,isIgnoreOccurrence:!1,groupIndex:this.adaptiveGroupIndex,action:!1,isBlock:!1,isCustomMonth:!0,isPreventTimezone:!1,isTransformed:!1}),this.currentTimezoneDate=this.getCurrentTime(),this.activeCellsData={startTime:new Date(this.currentTimezoneDate),endTime:new Date(this.currentTimezoneDate),isAllDay:!1},this.activeEventData={event:void 0,element:void 0},this.getDefaultLocale(),this.localeObj=new s.Wo(this.getModuleName(),this.defaultLocale,this.locale),this.setCldrTimeFormat(),this.setCalendarMode(),this.eventsData=[],this.eventsProcessed=[],this.blockData=[],this.blockProcessed=[],this.resourceCollection=[],this.currentAction=null,this.selectedElements=[],this.activeEventTemplates=[],this.setViewOptions()},i.prototype.getDefaultLocale=function(){this.defaultLocale={day:"Day",week:"Week",workWeek:"Work Week",month:"Month",year:"Year",agenda:"Agenda",weekAgenda:"Week Agenda",workWeekAgenda:"Work Week Agenda",monthAgenda:"Month Agenda",today:"Today",noEvents:"No events",emptyContainer:"There are no events scheduled on this day.",allDay:"All day",start:"Start",end:"End",more:"more",close:"Close",cancel:"Cancel",noTitle:"(No Title)",delete:"Delete",deleteEvent:"Delete Event",deleteMultipleEvent:"Delete Multiple Events",selectedItems:"Items selected",deleteSeries:"Entire Series",edit:"Edit",editSeries:"Entire Series",editEvent:"Edit Event",createEvent:"Create",subject:"Subject",addTitle:"Add title",moreDetails:"More Details",moreEvents:"More Events",save:"Save",editContent:"How would you like to change the appointment in the series?",deleteContent:"Are you sure you want to delete this event?",deleteMultipleContent:"Are you sure you want to delete the selected events?",newEvent:"New Event",title:"Title",location:"Location",description:"Description",timezone:"Timezone",startTimezone:"Start Timezone",endTimezone:"End Timezone",repeat:"Repeat",saveButton:"Save",cancelButton:"Cancel",deleteButton:"Delete",recurrence:"Recurrence",wrongPattern:"The recurrence pattern is not val
1id.",seriesChangeAlert:"Do you want to cancel the changes made to specific instances of this series and match it to the whole series again?",createError:"The duration of the event must be shorter than how frequently it occurs. Shorten the duration, or change the recurrence pattern in the recurrence event editor.",sameDayAlert:"Two occurrences of the same event cannot occur on the same day.",occurenceAlert:"Cannot reschedule an occurrence of the recurring appointment if it skips over a later occurrence of the same appointment.",editRecurrence:"Edit Recurrence",recurringEvent:"Recurring Event",repeats:"Repeats",alert:"Alert",startEndError:"The selected end date occurs before the start date.",invalidDateError:"The entered date value is invalid.",blockAlert:"Events cannot be scheduled within the blocked time range.",overlapAlert:"Events cannot be scheduled during the chosen time as it overlaps with another event.",ok:"Ok",yes:"Yes",no:"No",of:"of",occurrence:"Occurrence",series:"Series",previous:"Previous",next:"Next",timelineDay:"Timeline Day",timelineWeek:"Timeline Week",timelineWorkWeek:"Timeline Work Week",timelineMonth:"Timeline Month",timelineYear:"Timeline Year",editFollowingEvent:"Following Events",deleteTitle:"Delete Event",editTitle:"Edit Event",beginFrom:"Begin From",endAt:"Ends At",expandAllDaySection:"Expand-all-day-section",collapseAllDaySection:"Collapse-
1all-day-section",searchTimezone:"Search Timezone",noRecords:"No records found"}},i.prototype.wireEvents=function(){s.Jm.add(window,"resize",this.onScheduleResize,this),s.Jm.add(window,"orientationchange",this.onScheduleResize,this),s.Jm.add(document,s.Pw.touchStartEvent,this.onDocumentClick,this),this.allowClipboard&&s.Jm.add(document,"paste",this.onDocumentPaste,this)},i.prototype.removeSelectedClass=function(){for(var e=this.getSelectedCells(),t=0,n=e;t<n.length;t++)n[t].removeAttribute("tabindex");(0,s.vy)(e,so),this.keyboardInteractionModule&&this.keyboardInteractionModule.selectedCells.length>0&&(this.keyboardInteractionModule.selectedCells=[])},i.prototype.addSelectedClass=function(e,t,n){(0,s.iQ)(e,so),t&&(t.setAttribute("tabindex","0"),t.focus({preventScroll:n||!1}))},i.prototype.selectCell=function(e){this.removeSelectedClass(),this.addSelectedClass([e],e)},i.prototype.getAllDayRow=function(){return this.element.querySelector("."+mr)},i.prototype.getContentTable=function(){return this.activeView.element.querySelector("."+nt+" tbody")},i.prototype.getTableRows=function(){return[].slice.call(this.element.querySelectorAll("."+nt+" tbody tr:not(."+Ai+")"))},i.prototype.getWorkCellElements=function(){return[].slice.call(this.element.querySelectorAll("."+ie))},i.prototype.getIndexOfDate=function(e,t){return e.map(Number).indexOf(+t)},i.prototype.isAllDayCell=function(e){return!!(["Month","TimelineMonth","TimelineYear","MonthAgenda"].indexOf(this.currentView)>-1||e.classList.contains(it)||e.classList.contains(Wt)||!this.activeViewOptions.timeScale.enable||this.activeView.isTimelineView()&&this.activeViewOptions.headerRows.length>0&&"Hour"!==this.activeViewOptions.headerRows.slice(-1)[0].option)},i.prototype.getDateFromElement=function(e){var t;if((0,s.hX)(e)||(t=e.getAttribute("data-date")),!(0,s.hX)(t)){var n=parseInt(t,10);return new Date(n)}},i.prototype.getTargetElement=function(e,t,n){var o,r=document.elementFromPoint(t,n);return r&&(o=r.closest(e)),o?[o]:null},i.prototype.getCellHeaderTemplate=function(){return this.cellHeaderTemplateFn},i.prototype.getDayHeaderTemplate=function(){return this.dayHeaderTemplateFn},i.prototype.getMonthHeaderTemplate=function(){return this.monthHeaderTemplateFn},i.prototype.getCellTemplate=function(){return this.cellTemplateFn},i.prototype.getDateHeaderTemplate=function(){return this.dateHeaderTemplateFn},i.prototype.getDateRangeTemplate=function(){return this.dateRangeTemplateFn},i.prototype.getMajorSlotTemplate=function(){return this.majorSlotTemplateFn},i.prototype.getMinorSlotTemplate=function(){return this.minorSlotTemplateFn},i.prototype.getAppointmentTemplate=function(){return this.appointmentTemplateFn},i.prototype.getEventTooltipTemplate=function(){return this.eventTooltipTemplateFn},i.prototype.getHeaderTooltipTemplate=function(){return this.headerTooltipTemplateFn},i.prototype.getEditorTemplate=function(){return this.editorTemplateFn},i.prototype.getEditorHeaderTemplate=function(){return this.editorHeaderTemplateFn},i.prototype.getEditorFooterTemplate=function(){return this.editorFooterTemplateFn},i.prototype.getQuickInfoTemplatesHeader=function(){return this.quickInfoTemplatesHeaderFn},i.prototype.getQuickInfoTemplatesContent=function(){return this.quickInfoTemplatesContentFn},i.prototype.getQuickInfoTemplatesFooter=function(){return this.quickInfoTemplatesFooterFn},i.prototype.getResourceHeaderTemplate=function(){return this.resourceHeaderTemplateFn},i.prototype.getHeaderIndentTemplate=function(){return this.headerIndentTemplateFn},i.prototype.getCssProperties=function(){return{border:this.enableRtl?"borderLeftWidth":"borderRightWidth",padding:this.enableRtl?"paddingLeft":"paddingRight",rtlBorder:this.enableRtl?"borderRightWidth":"borderLeftWidth",rtlPadding:this.enableRtl?"paddingRight":"paddingLeft"}},i.prototype.removeNewEventElement=function(){var e=this.element.querySelector("."+nd);(0,s.hX)(e)||(0,s.TF)(e)},i.prototype.getStartEndTime=function(e){if(!(0,s.hX)(e)&&""!==e){var t=k(new Date(this.currentTimezoneDate)||this.getCurrentTime()),n=e.split(":");return 2===n.length&&t.setHours(parseInt(n[0],10),parseInt(n[1],10),0),t}return null},i.prototype.onDocumentClick=function(e){this.notify(Xr,{event:e})},i.prototype.onDocumentPaste=function(e){this.notify(Zu,{event:e})},i.prototype.onScheduleResize=function(){if(!((0,s.hX)(this.activeView)||(this.isAdaptive||function px(){return window.navigator.userAgent.toLowerCase().indexOf("mobi")>-1}())&&document.activeElement&&(document.activeElement.classList.contains(Ut)||document.activeElement.classList.contains(an))||this.uiStateValues.isTapHold))if(this.virtualScrollModule&&this.activeView.isTimelineView()&&this.virtualScrollModule.refreshLayout(),this.activeViewOptions.timeScale.enable&&this.activeView&&this.activeView.highlightCurrentTime(),this.quickPopup&&this.quickPopup.onClosePopup(),function hx(){var a=window.devicePixelRatio||window.screen.availWi
1dth/document.documentElement.clientWidth;_l&&_l!==a&&(zh=null,_l=a)}(),"Month"===this.currentView||"Agenda"!==this.currentView&&"MonthAgenda"!==this.currentView&&!this.activeViewOptions.timeScale.enable||this.activeView.isTimelineView()){this.activeView.resetColWidth(),this.notify(fn,{cssProperties:this.getCssProperties(),isPreventScrollUpdate:!0});var e=!1;if(this.activeViewOptions.enableLazyLoading&&this.virtualScrollModule&&this.virtualScrollModule.isRemoteRefresh&&(e=this.virtualScrollModule.isRemoteRefresh,this.virtualScrollModule.isRemoteRefresh=!1),this.refreshEvents(e),this.virtualScrollModule&&!this.virtualScrollModule.enableTransition){var t=this.element.querySelector("."+Wi),n=this.element.querySelector("."+we);this.virtualScrollModule.enableTransition=!0,(0,s.iQ)([n,t],"e-transition")}}else this.notify(Ri,{})},i.prototype.templateParser=function(e){if(e)try{return"function"==typeof e?(0,s.wE)(e):document.querySelectorAll(e).length?(0,s.wE)(document.querySelector(e).innerHTML.trim()):(0,s.wE)(e)}catch{return(0,s.wE)(e)}},i.prototype.getSelectedCells=function(){return[].slice.call(this.element.querySelectorAll("."+so))},i.prototype.getAnnouncementString=function(e,t){var n;this.quickPopup&&this.activeViewOptions.group.resources.length>0&&(n=this.quickPopup.getResourceText({event:e},"event")+'"s event - ');var o=t||e[this.eventFields.subject]||this.eventSettings.fields.subject.default,l=e[this.eventFields.location]||this.eventSettings.fields.location.default,h="full",d=this.globalize.formatDate(e[this.eventFields.startTime],{type:"dateTime",skeleton:h,calendar:this.getCalendarMode()}),p=this.globalize.formatDate(e[this.eventFields.endTime],{type:"dateTime",skeleton:h,calendar:this.getCalendarMode()}),u=o+" "+this.localeObj.getConstant("beginFrom")+" "+d+" "+this.localeObj.getConstant("endAt")+" "+p;return n&&(u=n+" "+u),l&&""!==l&&(u=u+" "+this.localeObj.getConstant("location")+" "+l),e[this.eventFields.recurrenceRule]&&""!==e[this.eventFields.recurrenceRule]&&e[this.eventFields.id]===e[this.eventFields.recurrenceID]&&(u=u+" "+this.localeObj.getConstant("recurringEvent")),u},i.prototype.boundaryValidation=function(e,t){var r={left:!1,right:!1,top:!1,bottom:!1},o=this.element.querySelector("."+we).getBoundingClientRect();return e<o.top+30+window.pageYOffset&&e>o.top+window.pageYOffset&&(r.top=!0),e>o.bottom-30+window.pageYOffset&&e<o.bottom+window.pageYOffset&&(r.bottom=!0),t<o.left+30+window.pageXOffset&&t>o.left+window.pageXOffset&&(r.left=!0),t>o.right-30+window.pageXOffset&&t<o.right+window.pageXOffset&&(r.right=!0),r},i.prototype.getWeekNumberContent=function(e){var t;if("FirstDay"===this.weekRule){var n=Hh(e.slice(-1)[0],this.firstDayOfWeek);t=this.globalize.formatNumber(tf(n))}else if("FirstFourDayWeek"===this.weekRule){var l=function ax(a,i){return new Date(i.valueOf()-(i.valueOf()-a.valueOf())/2)}(r=Ui(e.slice(-1)[0],this.firstDayOfWeek),Hh(e.slice(-1)[0],this.firstDayOfWeek));t=this.globalize.formatNumber(tf(l))}else if("FirstFullWeek"===this.weekRule){var r=Ui(e.slice(-1)[0],this.firstDayOfWeek);t=this.globalize.formatNumber(tf(r))}return t},i.prototype.renderHeaderIndentTemplate=function(e,t){if(this.activeViewOptions.headerIndentTemplate){var o=this.element.id+"_"+this.activeViewOptions.headerIndentTemplateName+"headerIndentTemplate",l=[].slice.call(this.getHeaderIndentTemplate()(e,this,"headerIndentTemplate",o,!1,void 0,void 0,this.root));(0,s.BC)(l,t)}},i.prototype.isSpecificResourceEvents=function(){return this.activeViewOptions.group.resources.length>0&&!this.activeViewOptions.group.allowGroupEdit&&!this.rowAutoHeight&&!this.virtualScrollModule&&this.activeViewOptions.group.byGroupID},i.prototype.unWireEvents=function(){s.Jm.remove(window,"resize",this.onScheduleResize),s.Jm.remove(window,"orientationchange",this.onScheduleResize),s.Jm.remove(document,s.Pw.touchStartEvent,this.onDocumentClick),s.Jm.remove(document,"paste",this.onDocumentPaste)},i.prototype.getModuleName=function(){return"schedule"},i.prototype.getPersistData=function(){return this.addOnPersist(["currentView","selectedDate","scrollTop","scrollLeft","adaptiveGroupIndex"])},i.prototype.onPropertyChanged=function(e,t){if(!this.isReact||!(0,s.hX)(this.activeView)){for(var n={isRefresh:!1,isResource:!1,isDate:!1,isView:!1,isLayout:!1,isDataManager:!1},r=0,o=Object.keys(e);r<o.length;r++){var l=o[r];switch(l){case"views":this.setViewOptions(),this.headerModule&&this.headerModule.updateItems(),n.isView=!0;break;case"currentView":n.isView=!0;break;case"minDate":case"maxDate":case"selectedDate":n.isDate=!0;break;case"dateFormat":this.activeViewOptions=this.getActiveViewOptions(),this.headerModule&&this.headerModule.updateDateRange();break;case"showHeaderBar":case"toolbarItems":this.destroyHeaderModule(),e.showHeaderBar&&(this.headerModule=new zf(this),this.headerModule.updateDateRange()),this.notify(fn,{cssProperties:this.getCssProperties()}),this.activeView.isTimelineView()&&this.refreshEvents(!1);break;case"workDays":JSON.stringify(t.workDays)!==JSON.stringify(e.workDays)&&(n.isLayout=!0);break;case"showWeekend":case"startHour":case"endHour":case"workHours":case"readonly":case"headerRows":case"showWeekNumber":case"rowAutoHeight":n.isLayout=!0;break;case"locale":case"calendarMode":this.globalize=new s.DL(this.locale),this.localeObj=new s.Wo(this.getModuleName(),this.defaultLocale,this.locale),this.setCldrTimeFormat(),this.setCalendarMode(),n.isRefresh=!0;break;case"firstDayOfWeek":this.activeViewOptions.firstDayOfWeek=e.firstDayOfWeek,this.eventWindow&&this.eventWindow.refreshRecurrenceEditor(),n.isLayout=!0;break;case"showTimeIndicator":this.activeViewOptions.timeScale.enable&&this.activeView&&this.activeView.highlightCurrentTime();break;case"cellHeaderTemplate":this.activeViewOptions.cellHeaderTemplate=e.cellHeaderTemplate,this.cellHeaderTemplateFn=this.templateParser(this.activeViewOptions.cellHeaderTemplate),n.isLayout=!0;break;case"cellTemplate":this.activeViewOptions.cellTemplate=e.cellTemplate,this.cellTemplateFn=this.templateParser(this.activeViewOptions.cellTemplate),n.isLayout=!0;break;case"dateHeaderTemplate":this.activeViewOptions.dateHeaderTemplate=e.dateHeaderTemplate,this.dateHeaderTemplateFn=this.templateParser(this.activeViewOptions.dateHeaderTemplate),n.isLayout=!0;break;case"dateRangeTemplate":this.activeViewOptions.dateRangeTemplate=e.dateRangeTemplate,this.dateRangeTemplateFn=this.templateParser(this.activeViewOptions.dateRangeTemplate),this.headerModule&&this.headerModule.updateDateRange();break;case"dayHeaderTemplate":this.activeViewOptions.dayHeaderTemplate=e.dayHeaderTemplate,this.dayHeaderTemplateFn=this.templateParser(this.activeViewOptions.dayHeaderTemplate),n.isLayout=!0;break;case"monthHeaderTemplate":this.activeViewOptions.monthHeaderTemplate=e.monthHeaderTemplate,this.monthHeaderTemplateFn=this.templateParser(this.activeViewOptions.monthHeaderTemplate),n.isLayout=!0;break;case"resourceHeaderTemplate":this.activeViewOptions.resourceHeaderTemplate=e.resourceHeaderTemplate,this.resourceHeaderTemplateFn=this.templateParser(this.activeViewOptions.resourceHeaderTemplate),n.isLayout=!0;break;case"timezone":this.eventBase.timezonePropertyChange(t.timezone),this.headerModule&&this.headerModule.setCalendarTimezone();break;case"enableRtl":this.setRtlClass(),n.isRefresh=!0;break;default:this.extendedPropertyChange(l,e,t,n)}}this.propertyChangeAction(n)}},i.prototype.propertyChangeAction=function(e){e.isRefresh?this.refresh():e.isResource?this.initializeResources(!0):e.isView?this.changeView(this.currentView,null,!0):e.isDate?((0,s.hX)(this.selectedDate)&&this.setProperties({selectedDate:this.getCurrentTime()},!0),this.changeDate(this.selectedDate)):e.isLayout?(this.activeCellsData=null,this.initializeView(this.currentView)):e.isDataManager&&this.crudModule&&(this.dragAndDropModule&&(this.dragAndDropModule.actionObj.action="",(0,s.vy)([this.element],yr)),this.crudModule.refreshDataManager())},i.prototype.allDayRowScrollUpdate=function(){var e=this.element.querySelector("."+bi),t=this.element.querySelector("."+mr);if("auto"!==this.height&&this.enableAllDayScroll)e.classList.contains(ud)&&(0,s.vy)([e],ud),this.eventBase.allDayExpandScroll(e);else if((0,s.iQ)([e],ud),e.classList.contains(ql)&&(0,s.vy)([e],ql),this.uiStateValues.expand){var n=[].slice.call(this.element.querySelectorAll("."+it));n[0].style.height=t.style.height?t.style.height:n[1].style.height}this.uiStateValues.expand||(t.style.height="")},i.prototype.extendedPropertyChange=function(e,t,n,r){switch(e){case"width":case"height":case"enableAllDayScroll":["Day","Week","WorkWee
1k"].indexOf(this.currentView)>-1&&this.allDayRowScrollUpdate(),this.notify(Ku,{module:"scroll",properties:{width:t.width,height:t.height}});break;case"cssClass":n.cssClass&&(0,s.vy)([this.element],n.cssClass.split(" ")),t.cssClass&&(0,s.iQ)([this.element],t.cssClass.split(" "));break;case"hideEmptyAgendaDays":case"agendaDaysCount":this.activeViewOptions=this.getActiveViewOptions(),r.isView=!0;break;case"eventSettings":this.onEventSettingsPropertyChanged(t.eventSettings,n.eventSettings,r);break;case"allowKeyboardInteraction":case"allowClipboard":this.keyboardInteractionModule&&(this.keyboardInteractionModule.destroy(),this.keyboardInteractionModule=null),(t.allowKeyboardInteraction||t.allowClipboard)&&(this.keyboardInteractionModule=new hy(this));break;case"timezoneDataSource":this.eventWindow&&this.eventWindow.refresh();break;case"editorTemplate":(0,s.hX)(this.editorTemplate)||(this.editorTemplateFn=this.templateParser(this.editorTemplate)),this.eventWindow&&this.eventWindow.setDialogContent();break;case"editorHeaderTemplate":(0,s.hX)(this.editorHeaderTemplate)||(this.editorHeaderTemplateFn=this.templateParser(this.editorHeaderTemplate)),this.eventWindow&&this.eventWindow.setDialogHeader();break;case"editorFooterTemplate":(0,s.hX)(this.editorFooterTemplate)||(this.editorFooterTemplateFn=this.templateParser(this.editorFooterTemplate)),this.eventWindow&&this.eventWindow.setDialogFooter();break;case"quickInfoTemplates":this.quickInfoTemplates.header&&(this.quickInfoTemplatesHeaderFn=this.templateParser(this.quickInfoTemplates.header)),this.quickInfoTemplates.content&&(this.quickInfoTemplatesContentFn=this.templateParser(this.quickInfoTemplates.content)),this.quickInfoTemplates.footer&&(this.quickInfoTemplatesFooterFn=this.templateParser(this.quickInfoTemplates.footer));break;case"group":this.onGroupSettingsPropertyChanged(t.group,n.group,r);break;case"resources":r.isResource=!0;break;case"timeScale":this.activeViewOptions.timeScale.interval=t.timeScale.interval||this.activeViewOptions.timeScale.interval,this.activeViewOptions.timeScale.slotCount=t.timeScale.slotCount||this.activeViewOptions.timeScale.slotCount,this.eventWindow&&this.eventWindow.refreshDateTimePicker(),r.isLayout=!0;break;case"allowDragAndDrop":case"allowResizing":case"eventDragArea":case"allowOverlap":this.refreshEvents(!1);break;case"weekRule":r.isLayout=!0;break;case"firstMonthOfYear":this.activeViewOptions.firstMonthOfYear=t.firstMonthOfYear,this.viewIndex=this.activeView.viewIndex,r.isLayout=!0;break;case"monthsCount":this.activeViewOptions.monthsCount=t.monthsCount,this.viewIndex=this.activeView.viewIndex,r.isLayout=!0;break;case"timeFormat":this.internalTimeFormat=t.timeFormat||this.activeViewOptions.timeFormat,this.eventWindow&&this.eventWindow.refreshDateTimePicker(),r.isLayout=!0;break;case"enableAdaptiveUI":this.showHeaderBar&&this.headerModule&&(this.destroyHeaderModule(),this.headerModule=new zf(this),this.headerModule.updateDateRange()),r.isLayout=!0;break;case"headerIndentTemplate":this.activeViewOptions.headerIndentTemplate=t.headerIndentTemplate,this.headerIndentTemplateFn=this.templateParser(this.activeViewOptions.headerIndentTemplate),r.isLayout=!0}},i.prototype.setRtlClass=function(){this.enableRtl?(0,s.iQ)([this.element],"e-rtl"):(0,s.vy)([this.element],"e-rtl")},i.prototype.onGroupSettingsPropertyChanged=function(e,t,n){for(var r=0,o=Object.keys(e);r<o.length;r++)"headerTooltipTemplate"===o[r]?this.headerTooltipTemplateFn=this.templateParser(e.headerTooltipTemplate):(n.isLayout=!0,this.eventWindow&&this.eventWindow.refresh())},i.prototype.onEventSettingsPropertyChanged=function(e,t,n){for(var r=0,o=Object.keys(e);r<o.length;r++)switch(o[r]){case"dataSource":case"query":case"fields":case"includeFiltersInQuery":this.initializeDataModule(),n.isDataManager=!0;break;case"template":this.activeViewOptions.eventTemplate=e.template,this.appointmentTemplateFn=this.templateParser(this.activeViewOptions.eventTemplate),n.isDataManager=!0;break;case"enableTooltip":this.eventTooltip&&(this.eventTooltip.destroy(),this.eventTooltip=null),e.enableTooltip&&(this.eventTooltip=new im(this));break;case"tooltipTemplate":this.eventTooltipTemplateFn=this.templateParser(this.eventSettings.tooltipTemplate);break;case"resourceColorField":this.resourceBase&&this.resourceBase.setResourceCollection(),n.isDataManager=!0;break;case"editFollowingEvents":this.quickPopup&&this.quickPopup.refreshQuickDialog();break;case"allowAdding":case"allowEditing":case"allowDeleting":this.showHeaderBar&&this.headerModule&&this.headerModule.updateAddIcon(),this.eventWindow&&this.eventWindow.refresh();break;case"spannedEventPlacement":case"minimumEventDuration":case"enableMaxHeight":case"enableIndicator":this.refreshEvents(!1);break;case"ignoreWhitespace":n.isLayout=!0}},i.prototype.destroyHeaderModule=function(){this.headerModule&&(this.headerModule.destroy(),this.headerModule=null)},i.prototype.destroyPopups=function(){this.quickPopup&&(this.quickPopup.destroy(),this.quickPopup=null),this.eventWindow&&(this.eventWindow.destroy(),this.eventWindow=null)},i.prototype.showSpinner=function(){(0,ae.xc)(this.element)},i.prototype.hideSpinner=function(){(0,ae.W$)(this.element)},i.prototype.setWorkHours=function(e,t,n,r){var o;o=this.getWorkHourCells(e,t,n,r),(0,s.iQ)(o,ha)},i.prototype.resetWorkHours=function(e,t,n,r){if(void 0===e&&(e=this.activeView.renderDates),e&&t&&n){var o=this.getWorkHourCells(e,t,n,r);(0,s.vy)(o,ha)}else{var l=[].slice.call(this.element.querySelectorAll("."+ha));(0,s.vy)(l,ha)}},i.prototype.getWorkHourCells=function(e,t,n,r){if(["Agenda","MonthAgenda","Month","TimelineMonth"].indexOf(this.currentView)>-1)return[];var o=this.getStartEndTime(t),l=this.getStartEndTime(n),h=this.getContentTable();if((0,s.hX)(o)||(0,s.hX)(l)||!h)return[];o.setMilliseconds(0),l.setMilliseconds(0);var d=this.activeView.getStartHour();o<d&&(o=d);var p=this.activeView.getEndHour();l>
1p&&(l=p);for(var f=this.activeViewOptions.timeScale.interval*wt/this.activeViewOptions.timeScale.slotCount,m=(d.getTimezoneOffset()-o.getTimezoneOffset())*wt,g=Math.abs((d.getTimezoneOffset()-l.getTimezoneOffset())*wt),v=Math.round((o.getTime()-d.getTime()+m)/f),b=Math.ceil((l.getTime()-d.getTime()-g)/f),y=v,S=b,E=[],_=0,T=e;_<T.length;_++){var I=T[_];k(I=this.getDateTime(I));var w=this.activeView.renderDates;!(0,s.hX)(r)&&this.resourceBase&&!this.activeView.isTimelineView()&&(w=this.resourceBase.lastResourceLevel[parseInt(r.toString(),10)].renderDates);var A=this.getIndexOfDate(w,I);if(A>=0){if(this.activeView.isTimelineView()){var M=Math.round((p.getTime()-d.getTime())/f);v=y+A*M,b=S+A*M}for(var D=v;D<b;D++)if(this.activeView.isTimelineView()){var L=(0,s.hX)(r)?0:r;E.push(h.rows[parseInt(L.toString(),10)].cells[parseInt(D.toString(),10)])}else if((0,s.hX)(r))E.push(h.rows[parseInt(D.toString(),10)].cells[parseInt(A.toString(),10)]);else{var V="."+ie+'[data-group-index="'+r+'"]',G=[].slice.call(h.rows[parseInt(D.toString(),10)].querySelectorAll(V));E.push(G[parseInt(A.toString(),10)])}}}return E},i.prototype.getCellDetails=function(e){var t=e instanceof Array?e:[e],n=(0,s.V6)(t[0]),r=(0,s.V6)(t.slice(-1)[0]),o=this.getDateFromElement(n),l=this.getDateFromElement(r);if(!(0,s.hX)(o)&&!(0,s.hX)(l)){var h=this.activeView.isTimelineView()&&!(0,s.hX)(r.getAttribute("colSpan"))&&this.headerRows.length>0,d=h?parseInt(r.getAttribute("colSpan"),10):1,p={startTime:o,endTime:l=!this.activeViewOptions.timeScale.enable||h||r.classList.contains(it)||r.classList.contains(Wt)?K(new Date(l.getTime()),d):this.activeView.getEndDateFromStartDate(l),isAllDay:this.isAllDayCell(n),element:e},u=n.getAttribute("data-group-index");return(0,s.hX)(u)||(p.groupIndex=parseInt(u,10)),p}},i.prototype.getSelectedElements=function(){return this.keyboardInteractionModule&&this.keyboardInteractionModule.selectedCells.length>0?this.keyboardInteractionModule.selectedCells:this.getSelectedCells()},i.prototype.getResourceCollections=function(){return this.resourceCollection},i.prototype.setResourceCollections=function(e,t){void 0===t&&(t=!0),!t&&this.uiStateValues&&(this.uiStateValues.isPreventEventRefresh=!0),this.setProperties({resources:e},!1)},i.prototype.changeCurrentView=function(e,t){var n=this.getViewIndex(e),r=e.charAt(0).toLowerCase()+e.slice(1),o=this.viewOptions[""+r];o&&(n=this.viewCollections.indexOf(o[t||0])),-1!==n&&n!==this.viewIndex&&this.changeView(e,null,null,n)},i.prototype.getCurrentViewIndex=function(){return this.viewIndex},i.prototype.getResourcesByIndex=function(e){if(this.resourceBase&&this.resourceBase.lastResourceLevel){if(e<0||e>=this.resourceBase.lastResourceLevel.length)return;var t=this.resourceBase.lastResourceLevel[parseInt(e.toString(),10)],n={};return this.resourceBase.setResourceValues(n,e),{resource:t.resource,resourceData:t.resourceData,groupData:n}}},i.prototype.expandResource=function(e,t){this.activeView.isTimelineView()&&this.resourceBase&&this.resourceCollection.length>1&&this.resourceBase.resourceExpand(e,t,!1)},i.prototype.collapseResource=function(e,t){this.activeView.isTimelineView()&&this.resourceBase&&this.resourceCollection.length>1&&this.resourceBase.resourceExpand(e,t,!0)},i.prototype.scrollTo=function(e,t){this.currentView.indexOf("Agenda")<0&&(0,s.hX)(this.element.querySelector(".e-work-cells"))||(this.activeView.scrollToDate&&(0,s.hX)(e)&&t?this.activeView.scrollToDate(t):this.activeView.scrollToHour&&this.activeView.scrollToHour(e,t))},i.prototype.scrollToResource=function(e,t){this.resourceBase&&this.resourceBase.lastResourceLevel&&this.resourceBase.resourceScroll(e,t)},i.prototype.exportToICalendar=function(e,t){if(!this.iCalendarExportModule)throw console.warn('[WARNING] :: Module "ICalendarExport" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject ICalendarExport module");this.iCalendarExportModule.initializeCalendarExport(e,t)},i.prototype.importICalendar=function(e){if(!this.iCalendarImportModule)throw console.warn('[WARNING] :: Module "ICalendarImport" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject ICalendarImport module");this.iCalendarImportModule.initializeCalendarImport(e)},i.prototype.addEvent=function(e){this.crudModule.addEvent(e)},i.prototype.generateEventOccurrences=function(e,t){return this.eventBase?this.eventBase.generateOccurrence(e,t):[]}
1,i.prototype.exportToExcel=function(e){if(!this.excelExportModule)throw console.warn('[WARNING] :: Module "ExcelExport" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject ExcelExport module");this.excelExportModule.initializeExcelExport(e)},i.prototype.print=function(e){if(!this.printModule)throw console.warn('[WARNING] :: Module "Print" is not available in Schedule component! You either misspelled the module name or forgot to load it.'),Error("Inject Print module");this.printModule.print(e)},i.prototype.saveEvent=function(e,t){this.crudModule.saveEvent(e,t)},i.prototype.deleteEvent=function(e,t){this.crudModule.deleteEvent(e,t)},i.prototype.getEvents=function(e,t,n){var r=[];return r=n?this.eventBase.getProcessedEvents():this.eventsData,e&&(e=this.getDateTime(e)),t&&(t=this.getDateTime(t)),this.eventBase.filterEventsByRange(r,e,t)},i.prototype.getBlockEvents=function(e,t,n){var r=[];return r=n?this.eventBase.getProcessedEvents(this.blockData):this.blockData,e&&(e=this.getDateTime(e)),t&&(t=this.getDateTime(t)),this.eventBase.filterEventsByRange(r,e,t)},i.prototype.getOccurrencesByID=function(e){return this.eventBase.getOccurrencesByID(e)},i.prototype.getOccurrencesByRange=function(e,t){return e=this.getDateTime(e),t=this.getDateTime(t),this.eventBase.getOccurrencesByRange(e,t)},i.prototype.getCurrentViewDates=function(){return this.activeView?this.activeView.renderDates:[]},i.prototype.setRecurrenceEditor=function(e){this.eventWindow.setRecurrenceEditor(e)},i.prototype.getEventMaxID=function(){return this.eventBase.getEventMaxID()},i.prototype.getDeletedOccurrences=function(e){return this.eventBase.getDeletedOccurrences(e)},i.prototype.getCurrentViewEvents=function(){return this.eventsProcessed},i.prototype.refreshEvents=function(e){void 0===e&&(e=!0),e?(this.dragAndDropModule&&(this.dragAndDropModule.actionObj.action="",(0,s.vy)([this.element],yr)),this.crudModule.refreshDataManager()):(this.uiStateValues&&(this.uiStateValues.isPreventTimezone=!0),this.crudModule&&this.crudModule.refreshProcessedData(),this.uiStateValues&&(this.uiStateValues.isPreventTimezone=!1))},i.prototype.refreshTemplates=function(e){switch(e?this.resetTemplates([e]):this.resetTemplates(),e){case"eventTemplate":this.appointmentTemplateFn=this.templateParser(this.activeViewOptions.eventTemplate),this.refreshEvents(!1);break;case"dateHeaderTemplate":this.dateHeaderTemplateFn=this.templateParser(this.activeViewOptions.dateHeaderTemplate),this.activeView.refreshHeader();break;case"dateRangeTemplate":this.dateRangeTemplateFn=this.templateParser(this.activeViewOptions.dateRangeTemplate),this.headerModule&&this.headerModule.refresh();break;case"resourceHeaderTemplate":this.resourceHeaderTemplateFn=this.templateParser(this.activeViewOptions.resourceHeaderTemplate),this.activeView.isTimelineView()?this.activeView.refreshResourceHeader():this.activeView.refreshHeader();break;case"quickInfoTemplates":this.quickPopup&&(this.quickPopup.destroy(),this.quickPopup=null),this.quickPopup=new Ay(this),this.quickInfoTemplatesHeaderFn=this.templateParser(this.quickInfoTemplates.header),this.quickInfoTemplatesContentFn=this.templateParser(this.quickInfoTemplates.content),this.quickInfoTemplatesFooterFn=this.templateParser(this.quickInfoTemplates.footer);break;case"editorTemplate":this.destroyEditorWindow(),this.editorTemplateFn=this.templateParser(this.editorTemplate);break;case"editorHeaderTemplate":this.destroyEditorWindow(),this.editorHeaderTemplateFn=this.templateParser(this.editorHeaderTemplate);break;case"editorFooterTemplate":this.destroyEditorWindow(),this.editorFooterTemplateFn=this.templateParser(this.editorFooterTemplate);break;case"tooltipTemplate":case"headerTooltipTemplate":this.eventTooltip&&(this.eventTooltip.destroy(),this.eventTooltip=null),this.eventTooltip=new im(this),this.eventTooltipTemplateFn=this.templateParser(this.eventSettings.tooltipTemplate),this.headerTooltipTemplateFn=this.templateParser(this.activeViewOptions.group.headerTooltipTemplate);break;default:this.initializeView(this.currentView)}},i.prototype.refreshLayout=function(){this.onScheduleResize(),this.headerModule&&this.headerModule.refresh(),this.eventWindow&&this.eventWindow.refresh()},i.prototype.getEventDetails=function(e){var t=(e=(0,s.V6)(e)).getAttribute("data-guid");return t?this.eventBase.getEventByGuid(t):{}},i.prototype.isSlotAvailable=function(e,t,n){var o,l,r=this,h=this.activeEventData.event;if(e instanceof Date||"string"==typeof e?(o=e,l=t):(h=e,o=e[this.eventFields.startTime],l=e[this.eventFields.endTime],this.resourceBase&&(n=this.eventBase.getGroupIndexFromEvent(e))),(0,s.hX)(o)||(0,s.hX)(l))return!0;o=this.getDateTime(o),l=this.getDateTime(l);var d=this.eventBase.filterEvents(o,l);return!(0,s.hX)(n)&&this.resourceBase&&this.resourceBase.lastResourceLevel.length>0&&(d=this.eventBase.filterEventsByResource(this.resourceBase.lastResourceLevel[parseInt(n.toString(),10)],d)),h&&(d=d.filter(h.Guid?function(p){return p.Guid!==h.Guid}:function(p){return p[r.eventFields.id]!==h[r.eventFields.id]})),!(d.length>0)},i.prototype.copy=function(e){this.processCutCopyActions(e,!1)},i.prototype.cut=function(e){this.processCutCopyActions(e,!0)},i.prototype.paste=function(e){var t=this;if(this.allowClipboard&&this.allowKeyboardInteraction&&(e.classList.contains("e-work-cells")||e.classList.contains("e-all-day-cells"))){var n=new DataTransfer;(0,s.hX)(navigator.clipboard)||navigator.clipboard.readText().then(function(r){n.setData("text/plain",r);var o=new ClipboardEvent("paste",{bubbles:!0,cancelable:!0});Object.defineProperty(o,"clipboardData",{value:n}),t.keyboardInteractionModule.pasteHandler(o,e)}).catch(function(r){throw r})}},i.prototype.processCutCopyActions=function(e,t){var n=this;if(e&&this.allowClipboard&&this.allowKeyboardInteraction){var o=[];e.forEach(function(l){if(l.classList.contains(Ce)){var h=n.getEventDetails(l);h&&o.push(h)}}),o.length>0&&this.keyboardInteractionModule.processClipboardAction(t,o)}},i.prototype.openEditor=function(e,t,n,r){"Add"!==t||n?(e[this.eventFields.startTime]=this.getDateTime(e[this.eventFields.startTime]),e[this.eventFields.endTime]=this.getDateTime(e[this.eventFields.endTime])):(e.startTime=this.getDateTime(e.startTime),e.endTime=this.getDateTime(e.endTime),(0,s.hX)(e.element)||(e.element=(0,s.V6)(e.element))),this.currentAction=t,"Add"!==t&&(this.activeEventData.event=e),this.eventWindow.openEditor(e,t,n,r)},i.prototype.closeEditor=function(){this.eventWindow&&this.eventWindow.dialogClose()},i.prototype.openQuickInfoPopup=function(e){var t=this;if("Year"!==this.currentView&&!(0,s.hX)(e))if((0,s.hX)(e[this.eventFields.id])){if("Agenda"===this.currentView||"MonthAgenda"===this.currentView||(0,s.hX)(this.activeView))return;var n={startTime:this.activeCellsData.startTime=this.getDateTime(e[this.eventFields.startTime]),endTime:this.activeCellsData.endTime=this.getDateTime(e[this.eventFields.endTime]),isAllDay:this.activeCellsData.isAllDay=!(0,s.hX)(e[this.eventFields.isAllDay])&&e[this.eventFields.isAllDay]},r=this.activeView.getAdjustedDate(new Date(n.startTime));if(r){var o="."+ie+'[data-date="'+r.getTime()+'"]';this.activeViewOptions.group.resources.length>0&&!this.uiStateValues.isGroupAdaptive&&this.resourceBase&&this.eventBase&&(n.groupIndex=this.eventBase.getGroupIndexFromEvent(e),o="."+ie+'[data-date="'+r.getTime()+'"][data-group-index="'+n.groupIndex+'"]');var l=this.element.querySelector(o);l&&(l.focus(),n.element=l,this.notify(fr,n))}}else{var h=this.getCurrentViewEvents().filter(function(f){return e[t.eventFields.id]===f[t.eventFields.id]});if(h.length<=0)return;var d=h[0];if(e[this.eventFields.recurrenceRule]){var p=h.filter(function(f){return f[t.eventFields.startTime].getTime()===e[t.eventFields.startTime].getTime()});p.length>0&&(d=p[0])}var u=this.element.querySelector('div[data-guid="'+d.Guid+'"]');u&&(this.eventBase.removeSelectedAppointmentClass(),this.eventBase.addSelectedAppointments([u],!1),this.activeEventData={event:d,element:u},("Agenda"===this.currentView||"MonthAgenda"===this.currentView)&&(0,s.iQ)([this.activeEventData.element],td),this.notify(sa,this.activeEventData))}},i.prototype.closeQuickInfoPopup=function(){this.quickPopup&&this.quickPopup.quickPopupHide(!0)},i.prototype.openOverlapAlert=function(e){var t=this;this.quickPopup&&this.trigger(Cl,{type:"OverlapAlert",cancel:!1,element:this.quickPopup.quickDialog.element,data:e.data,overlapEvents:e.overlapEvents},function(r){r.cancel||t.quickPopup.openValidationError("overlapAlert",e.data)})},i.prototype.closeOverlapAlert=function(){var e=this;this.quickPopup&&this.trigger(Bh,{type:"OverlapAlert",cancel:!1,data:this.activeEventData.event,element:this.quickPopup.quickDialog.element},function(n){n.cancel||e.quickPopup.quickDialog.hide()})},i.prototype.closeTooltip=function(){this.eventTooltip&&this.eventTooltip.close()},i.prototype.getDateRangeText=function(e){return(0,s.hX)(e)&&0===e.length||!this.activeView?"":this.activeView.getDateRangeText(e[0],e)},i.prototype.getViewDates=function(e){if(void 0===e&&(e="Current"),!this.activeView)return[];switch(e){case"Previous":case"Next":return this.activeView.getRenderDates(void 0,this.activeView.getNextPreviousDate(e));case"Current":return this.getCurrentViewDates()}},i.prototype.selectResourceByIndex=function(e){this.resourceBase&&this.uiStateValues.isGroupAdaptive&&this.resourceBase.selectResourceByIndex(e)},i.prototype.getIndexFromResourceId=function(e,t){return this.resourceBase?this.resourceBase.getIndexFromResourceId(e,t):null},i.prototype.addResource=function(e,t,n){this.resourceBase.addResource(e,t,n)},i.prototype.removeResource=function(e,t){this.resourceBase.removeResource(e,t)},i.prototype.destroy=function(){this.eventTooltip&&(this.eventTooltip.destroy(),this.eventTooltip=null),this.destroyPopups(),this.hideSpinner(),this.unWireEvents(),this.destroyHeaderModule(),this.eventBase&&(this.eventBase.destroy(),this.eventBase=null),this.workCellAction&&(this.workCellAction.destroy(),this.workCellAction=null),this.inlineModule&&(this.inl
1ineModule.destroy(),this.inlineModule=null),this.keyboardInteractionModule&&(this.keyboardInteractionModule.destroy(),this.keyboardInteractionModule=null),this.scrollModule&&(this.scrollModule.destroy(),this.scrollModule=null),this.printModule&&this.printModule.destroy(),this.activeView&&(this.resetTemplates(),this.activeView.removeEventListener(),this.activeView.destroy(),this.activeView=null),this.scheduleTouchModule&&(this.scheduleTouchModule.destroy(),this.scheduleTouchModule=null),this.crudModule&&(this.crudModule.destroy(),this.crudModule=null),this.dataModule&&(this.dataModule.destroy(),this.dataModule=null),a.prototype.destroy.call(this);for(var t=0,n=["dayModule","weekModule","workWeekModule","monthModule","monthAgendaModule","yearModule","agendaModule","timelineViewsModule","timelineMonthModule","timelineYearModule","resizeModule","dragAndDropModule","excelExportModule","printModule","iCalendarExportModule","iCalendarImportModule","tzModule","eventsData","eventsProcessed","blockData","blockProcessed","uiStateValues","viewCollections","viewOptions","defaultLocale","localeObj","selectedElements","resourceCollection","editorTitles","eventFields","activeViewOptions","activeEventData","activeCellsData","renderModule"];t<n.length;t++)this[""+n[t]]=null;Dn(this.element);var o=[jh,of,ca,af];
1this.cssClass&&(o=o.concat(this.cssClass.split(" "))),(0,s.vy)([this.element],o)},Z([(0,s.mA)("auto")],i.prototype,"width",void 0),Z([(0,s.mA)("auto")],i.prototype,"height",void 0),Z([(0,s.mA)(!0)],i.prototype,"showHeaderBar",void 0),Z([(0,s.mA)(!0)],i.prototype,"showTimeIndicator",void 0),Z([(0,s.mA)(!0)],i.prototype,"allowSwiping",void 0),Z([(0,s.mA)(!0)],i.prototype,"allowOverlap",void 0),Z([(0,s.mA)(3)],i.prototype,"overscanCount",void 0),Z([(0,s.pM)([],GO)],i.prototype,"toolbarItems",void 0),Z([(0,s.mA)("Week")],i.prototype,"currentView",void 0),Z([(0,s.mA)(["Day","Week","WorkWeek","Month","Agenda"])],i.prototype,"views",void 0),Z([(0,s.mA)(new Date)],i.prototype,"selectedDate",void 0),Z([(0,s.mA)(new Date(1900,0,1))],i.prototype,"minDate",void 0),Z([(0,s.mA)(new Date(2099,11,31))],i.prototype,"maxDate",void 0),Z([(0,s.mA)()],i.prototype,"dateFormat",void 0),Z([(0,s.mA)("Gregorian")],i.prototype,"calendarMode",void 0),Z([(0,s.mA)(!0)],i.prototype,"showWeekend",void 0),Z([(0,s.mA)(0)],i.prototype,"firstDayOfWeek",void 0),Z([(0,s.mA)("FirstDay")],i.prototype,"weekRule",void 0),Z([(0,s.mA)([1,2,3,4,5])],i.prototype,"workDays",void 0),Z([(0,s.mA)(12)],i.prototype,"monthsCount",void 0),Z([(0,s.mA)("00:00")],i.prototype,"startHour",void 0),Z([(0,s.mA)("24:00")],i.prototype,"endHour",void 0),Z([(0,s.mA)(null)],i.prototype,"timeFormat",void 0),Z([(0,s.mA)(!0)],i.prototype,"enableHtmlSanitizer",void 0),Z([(0,s.mA)(!1)],i.prototype,"enableAllDayScroll",void 0),Z([(0,s.mA)(!1)],i.prototype,"enableAdaptiveUI",void 0),Z([(0,s.mA)(!0)],i.prototype,"allowResizing",void 0),Z([(0,s.pr)({},OO)],i.prototype,"workHours",void 0),Z([(0,s.pr)({},PO)],i.prototype,"timeScale",void 0),Z([(0,s.mA)(!0)],i.prototype,"allowKeyboardInteraction",void 0),Z([(0,s.mA)(!0)],i.prototype,"allowDragAndDrop",void 0),Z([(0,s.mA)()],i.prototype,"dateHeaderTemplate",void 0),Z([(0,s.mA)()],i.prototype,"dateRangeTemplate",void 0),Z([(0,s.mA)()],i.prototype,"cellHeaderTemplate",void 0),Z([(0,s.mA)()],i.prototype,"dayHeaderTemplate",void 0),Z([(0,s.mA)()],i.prototype,"monthHeaderTemplate",void 0),Z([(0,s.mA)()],i.prototype,"cellTemplate",void 0),Z([(0,s.mA)(!1)],i.prototype,"readonly",void 0),Z([(0,s.mA)(!0)],i.prototype,"showQuickInfo",void 0),Z([(0,s.mA)(!1)],i.prototype,"allowInline",void 0),Z([(0,s.mA)(!0)],i.prototype,"allowMultiCellSelection",void 0),Z([(0,s.mA)(!0)],i.prototype,"allowMultiRowSelection",void 0),Z([(0,s.mA)(!1)],i.prototype,"quickInfoOnSelectionEnd",void 0),Z([(0,s.mA)(!1)],i.prototype,"showWeekNumber",void 0),Z([(0,s.mA)(!1)],i.prototype,"rowAutoHeight",void 0),Z([(0,s.mA)(!1)],i.prototype,"allowMultiDrag",void 0),Z([(0,s.mA)(0)],i.prototype,"firstMonthOfYear",void 0),Z([(0,s.mA)()],i.prototype,"editorTemplate",void 0),Z([(0,s.mA)()],i.prototype,"editorHeaderTemplate",void 0),Z([(0,s.mA)()],i.prototype,"editorFooterTemplate",void 0),Z([(0,s.pr)({},kO)],i.prototype,"quickInfoTemplates",void 0),Z([(0,s.mA)(7)],i.prototype,"agendaDaysCount",void 0),Z([(0,s.mA)(!0)],i.prototype,"hideEmptyAgendaDays",void 0),Z([(0,s.mA)(!0)],i.prototype,"enableRecurrenceValidation",void 0),Z([(0,s.mA)()],i.prototype,"timezone",void 0),Z([(0,s.pr)({},zO)],i.prototype,"eventSettings",void 0),Z([(0,s.mA)(my)],i.prototype,"timezoneDataSource",void 0),Z([(0,s.mA)()],i.prototype,"resourceHeaderTemplate",void 0),Z([(0,s.mA)()],i.prototype,"headerIndentTemplate",void 0),Z([(0,s.pr)({},jO)],i.prototype,"group",void 0),Z([(0,s.pM)([],WO)],i.prototype,"resources",void 0),Z([(0,s.pM)([],LO)],i.prototype,"headerRows",void 0),Z([(0,s.mA)()],i.prototype,"cssClass",void 0),Z([(0,s.mA)(!1)],i.prototype,"allowClipboard",void 0),Z([(0,s.mA)()],i.prototype,"eventDragArea",void 0),Z([(0,s.Jh)()],i.prototype,"created",void 0),Z([(0,s.Jh)()],i.prototype,"destroyed",void 0),Z([(0,s.Jh)()],i.prototype,"cellClick",void 0),Z([(0,s.Jh)()],i.prototype,"cellDoubleClick",void 0),Z([(0,s.Jh)()],i.prototype,"moreEventsClick",void 0),Z([(0,s.Jh)()],i.prototype,"hover",void 0),Z([(0,s.Jh)()],i.prototype,"select",void 0),Z([(0,s.Jh)()],i.prototype,"actionBegin",void 0),Z([(0,s.Jh)()],i.prototype,"actionComplete",void 0),Z([(0,s.Jh)()],i.prototype,"actionFailure",void 0),Z([(0,s.Jh)()],i.prototype,"navigating",void 0),Z([(0,s.Jh)()],i.prototype,"renderCell",void 0),Z([(0,s.Jh)()],i.prototype,"eventClick",void 0),Z([(0,s.Jh)()],i.prototype,"eventDoubleClick",void 0),Z([(0,s.Jh)()],i.prototype,"eventRendered",void 0),Z([(0,s.Jh)()],i.prototype,"dataBinding",void 0),Z([(0,s.Jh)()],i.prototype,"popupOpen",void 0),Z([(0,s.Jh)()],i.prototype,"popupClose",void 0),Z([(0,s.Jh)()],i.prototype,"dragStart",void 0),Z([(0,s.Jh)()],i.prototype,"drag",void 0),Z([(0,s.Jh)()],i.prototype,"dragStop",void 0),Z([(0,s.Jh)()],i.prototype,"resizeStart",void 0),Z([(0,s.Jh)()],i.prototype,"resizing",void 0),Z([(0,s.Jh)()],i.prototype,"resizeStop",void 0),Z([(0,s.Jh)()],i.prototype,"virtualScrollStart",void 0),Z([(0,s.Jh)()],i.prototype,"virtualScrollStop",void 0),Z([(0,s.Jh)()],i.prototype,"dataBound",void 0),Z([(0,s.Jh)()],i.prototype,"beforePaste",void 0),Z([(0,s.Jh)()],i.prototype,"beforePrint",void 0),Z([(0,s.Jh)()],i.prototype,"excelExport",void 0),Z([(0,s.Jh)()],i.prototype,"tooltipOpen",void 0),Z([s.kc],i)}(s.uA),cS=function(){function a(i){this.daysVariation=0,this.parent=i,this.actionObj={X:0,Y:0,groupIndex:0,cellWidth:0,cellHeight:0,slotInterval:0,interval:0,actionIndex:0,cloneElement:[],originalElement:[],action:null,isAllDay:null,excludeSelectors:null,index:0,navigationInterval:null,scrollInterval:null},this.scrollArgs={element:null,width:0,height:0},this.resizeEdges={left:!1,right:!1,top:!1,bottom:!1},this.scrollEdges={left:!1,right:!1,top:!1,bottom:!1}}return a.prototype.getChangedData=function(i){var e=this,t=(0,s.X$)({},this.actionObj.event,null,!0);if(t[this.parent.eventFields.startTime]=this.actionObj.start,t[this.parent.eventFields.endTime]=this.actionObj.end,(0,s.hX)(this.actionObj.isAllDay)||(t[this.parent.eventFields.isAllDay]=this.actionObj.isAllDay),this.parent.activeViewOptions.group.resources.length>0){var n=this.getOriginalElement(this.actionObj.element);if(n){var r=n.map(function(l){return parseInt(l.getAttribute("data-group-index"),10)});if(-1===r.indexOf(this.actionObj.groupIndex)||!(0,s.hX)(i)&&i.length>0){var o=parseInt(this.actionObj.clone.getAttribute("data-group-index"),10);(r=r.filter(function(l){return l!==o})).push(this.actionObj.groupIndex),i&&i.length>
10?i.forEach(function(l){e.parent.resourceBase.getResourceData(l,e.actionObj.groupIndex,r)}):this.parent.resourceBase.getResourceData(t,this.actionObj.groupIndex,r)}}}return t},a.prototype.saveChangedData=function(i,e){void 0===e&&(e=!1),this.parent.activeEventData.event=this.actionObj.event,this.parent.currentAction="Save";var t,n=[i.data];e&&(n=i.selectedData);for(var r=0,o=n;r<o.length;r++){var l=o[r],h=!(this.parent.activeViewOptions.group.resources.length>0)||parseInt(this.actionObj.element.getAttribute("data-group-index"),10)===this.actionObj.groupIndex;if(+l[this.parent.eventFields.startTime]==+this.actionObj.event[this.parent.eventFields.startTime]&&+l[this.parent.eventFields.endTime]==+this.actionObj.event[this.parent.eventFields.endTime]&&h)return void(this.parent.crudModule.crudObj.isCrudAction=!1);if(l[this.parent.eventFields.recurrenceRule]){var d=l[this.parent.eventFields.recurrenceID]||l[this.parent.eventFields.id];if(l[this.parent.eventFields.id]===l[this.parent.eventFields.recurrenceID]&&(l[this.parent.eventFields.id]=this.parent.eventBase.getEventMaxID(),t="EditOccurrence"),this.parent.enableRecurrenceValidation&&this.parent.eventWindow.editOccurrenceValidation(d,l,this.actionObj.event))return}else t=null;(l[this.parent.eventFields.startTimezone]||l[this.parent.eventFields.endTimezone])&&this.parent.eventBase.timezoneConvert(l),this.parent.crudModule.saveEvent(l,t)}},a.prototype.calculateIntervalTime=function(i){var e=k(i).getTime(),t=this.parent.activeView.getStartHour(),n=wt*this.actionObj.interval;return e+=(60*t.getHours()+t.getMinutes())*wt+1e3*t.getSeconds(),e+=Math.floor((i.getTime()-e)/n)*n,new Date(e)},a.prototype.getContentAreaDimension=function(){var i=this.parent.element.querySelector("."+we),e=[].slice.call(i.querySelector("tr").children);!this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.isAdaptive&&!this.parent.enableAdaptiveUI&&!this.parent.virtualScrollModule&&(e=this.getResourceElements(e));var t=e[0].getBoundingClientRect(),n=e.slice(-1)[0].getBoundingClientRect();return{bottom:i.scrollHeight-5,left:this.parent.enableRtl?n.left:t.left,right:this.parent.enableRtl?t.right:n.right,top:0,leftOffset:this.parent.enableRtl?n.right:t.right,rightOffset:this.parent.enableRtl?t.left:n.left}},a.prototype.getIndex=function(i){var e=[].slice.call(this.parent.getContentTable().querySelector("tr").children),t={minIndex:0,maxIndex:e.length-1};if("resize"===this.actionObj.action&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&!this.parent.activeView.isTimelineView()){var n=this.getResourceElements(e);t.minIndex=n[0].cellIndex,t.maxIndex=n.slice(-1)[0].cellIndex}return i<t.minIndex&&(i=t.minIndex),i>t.maxIndex&&(i=t.maxIndex),i},a.prototype.updateTimePosition=function(i,e){for(var t=0,n=0,r=this.actionObj.cloneElement;n<r.length;n++){var l=r[n].querySelector("."+vr);if(l){var h=this.actionObj.start,d=this.actionObj.end;e&&e.length>0&&(h=e[parseInt(t.toString(),10)][this.parent.eventFields.startTime],d=e[parseInt(t.toString(),10)][this.parent.eventFields.endTime]),l.innerHTML=this.parent.getTimeString(h)+" - "+this.parent.getTimeString(d)}t++}if(this.parent.activeViewOptions.timeScale.enable&&this.parent.isAdaptive&&"Month"!==this.parent.currentView&&"TimelineMonth"!==this.parent.currentView){var p=this.parent.element.querySelector("."+Cf);if(!p){p=(0,s.n)("div",{className:Cf});var u=this.parent.activeView.isTimelineView()?bi:uf;this.parent.element.querySelector("."+u).appendChild(p)}if(p.innerHTML=this.parent.getTimeString(i),this.parent.activeView.isTimelineView())if(this.parent.enableRtl){var m=parseInt(this.actionObj.clone.style.right,10);p.style.right=(0,s.IV)("drag"===this.actionObj.action||this.resizeEdges.left?m+this.actionObj.clone.offsetWidth:m)}else{var g=parseInt(this.actionObj.clone.style.left,10);p.style.left=(0,s.IV)("drag"===this.actionObj.action||this.resizeEdges.left?g:g+this.actionObj.clone.offsetWidth)}else p.style.top=(0,s.IV)("drag"===this.actionObj.action||this.resizeEdges.top?this.actionObj.clone.offsetTop:this.actionObj.clone.offsetTop+this.actionObj.clone.offsetHeight)}},a.prototype.getResourceElements=function(i){var e=this;return i.filter(function(t){return parseInt(t.getAttribute("data-group-index"),10)===e.actionObj.groupIndex})},a.prototype.getOriginalElement=function(i){var e,t=i.getAttribute("data-guid");if(i.offsetParent&&i.offsetParent.classList.contains(ao)||this.parent.activeView.isTimelineView()||"resize"!==this.actionObj.action&&this.parent.virtualScrollModule)e=[].slice.call(this.parent.element.querySelectorAll('[data-guid="'+t+'"]'));else{var r=(0,s.kp)(i,"tr");r&&(e=[].slice.call(r.querySelectorAll('[data-guid="'+t+'"]')))}return e},a.prototype.createCloneElement=function(i){var e=document.createElement("div");e.appendChild(i.cloneNode(!0));var t=e.children[0],n=[Is];n.push("drag"===this.actionObj.action?Nb:Ef),("Month"===this.parent.currentView||"TimelineMonth"===this.parent.currentView)&&n.push("e-month-event"),(0,s.iQ)([t],n),(0,s.iQ)([i],yr),(0,s.hX)(i.parentElement)||i.parentElement.appendChild(t),t.style.width=(0,s.IV)(t.offsetWidth-2);var r=document.querySelector(this.parent.eventDragArea);return this.parent.eventDragArea&&"drag"===this.actionObj.action&&r&&r.appendChild(t),(0,s.sN)(t,{border:"0px"}),t},a.prototype.removeCloneElementClasses=function(){var i=this.actionObj.originalElement;("Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView||"Day"===this.parent.currentView||"Week"===this.parent.currentView||"WorkWee
1k"===this.parent.currentView)&&(i=[].slice.call(this.parent.element.querySelectorAll("."+yr))),(0,s.vy)(i,yr)},a.prototype.removeCloneElement=function(){this.actionObj.originalElement=[];for(var e=0,t=[].slice.call(this.parent.element.querySelectorAll(".e-dynamic-clone"));e<t.length;e++)(0,s.TF)(t[e]);for(var r=0,o=this.actionObj.cloneElement;r<o.length;r++){var l=o[r];(0,s.hX)(l.parentNode)||(0,s.TF)(l)}this.actionObj.cloneElement=[];var h=this.parent.element.querySelector("."+Cf);h&&(0,s.TF)(h)},a.prototype.getCursorElement=function(i){var e=this.parent.eventBase.getPageCoordinates(i);return document.elementFromPoint(e.clientX,e.clientY)},a.prototype.autoScroll=function(){var i=this.parent.element.querySelector("."+we),n=i.offsetHeight<=i.scrollHeight&&i.scrollTop>=0&&i.scrollTop+i.offsetHeight<=i.scrollHeight,r=i.offsetWidth<=i.scrollWidth&&i.scrollLeft>=0&&i.scrollLeft+i.offsetWidth<=i.scrollWidth;if("resize"===this.actionObj.action&&this.scrollEdges.right&&i.scrollLeft+i.offsetWidth>i.scrollWidth){var o=[].slice.call(this.parent.getContentTable().querySelector("tr").children).length-1;r=Math.ceil((this.actionObj.clone.offsetLeft+this.actionObj.clone.offsetWidth)/this.actionObj.cellWidth)===o}n&&(this.scrollEdges.top||this.scrollEdges.bottom)&&(i.scrollTop+=this.scrollEdges.top?-this.actionObj.scroll.scrollBy:this.actionObj.scroll.scrollBy,"resize"===this.actionObj.action&&i.scrollHeight!==i.offsetHeight+i.scrollTop&&i.scrollTop>0&&(this.actionObj.Y+=this.scrollEdges.top?this.actionObj.scroll.scrollBy:-this.actionObj.scroll.scrollBy)),r&&(this.scrollEdges.left||this.scrollEdges.right)&&(i.scrollLeft+=this.scrollEdges.left?-this.actionObj.scroll.scrollBy:this.actionObj.scroll.scrollBy,"resize"===this.actionObj.action&&i.scrollWidth!==i.offsetWidth+i.scrollLeft&&i.scrollLeft>0&&(this.actionObj.X+=this.scrollEdges.left?this.actionObj.scroll.scrollBy:-this.actionObj.scroll.scrollBy))},a.prototype.autoScrollValidation=function(){if(!this.actionObj.scroll.enable)return!1;var i=this.parent.boundaryValidation(this.actionObj.pageY,this.actionObj.pageX);return this.scrollEdges=i,i.bottom||i.top||i.left||i.right},a.prototype.actionClass=function(i){"addClass"===i?(0,s.iQ)([this.parent.element],yr):(0,s.vy)([this.parent.element],yr)},a.prototype.updateScrollPosition=function(i){var e=this;this.scrollEventArgs=i,this.actionObj.scroll.enable&&(0,s.hX)(this.actionObj.scrollInterval)&&(this.actionObj.scrollInterval=window.setInterval(function(){if(e.autoScrollValidation()&&!e.actionObj.clone.classList.contains(wi)){if(e.parent.activeView.isTimelineView()&&e.parent.activeViewOptions.group.resources.length>0&&e.actionObj.groupIndex<0)return;e.autoScroll(),"drag"===e.actionObj.action?e.parent.dragAndDropModule.updateDraggingDateTime(e.scrollEventArgs):e.parent.resizeModule.updateResizingDirection(e.scrollEventArgs)}},this.actionObj.scroll.timeDelay))},a.prototype.updateOriginalElement=function(i){var e='[data-id="'+i.getAttribute("data-id")+'"]';this.parent.activeViewOptions.group.resources.length>0&&(e=e.concat('[data-group-index = "'+i.getAttribute("data-group-index")+'"]'));var t=[].slice.call(this.parent.element.querySelectorAll(e));(0,s.iQ)(t,yr);var n=[].slice.call(this.parent.element.querySelectorAll("."+Is));(0,s.vy)(n,yr)},a.prototype.getUpdatedEvent=function(i,e,t){var n=JSON.parse(JSON.stringify(t));return n[this.parent.eventFields.startTime]=i,n[this.parent.eventFields.endTime]=e,n},a.prototype.dynamicYearlyEventsRendering=function(i,e){if(void 0===e&&(e=!1),(0,s.hX)(this.parent.eventDragArea)){var n,t=this.actionObj.cellWidth-7;e&&(this.resizeEdges.left||this.resizeEdges.right)&&(t=this.actionObj.cellWidth*i.count),e||"Horizontal"!==this.parent.activeViewOptions.orientation||0!==this.parent.activeViewOptions.group.resources.length||((n=this.yearEvent.isSpannedEvent(i,i[this.parent.eventFields.startTime]))[this.parent.eventFields.startTime].getTime()===n[this.parent.eventFields.endTime].getTime()&&(n.isSpanned.count=1),t=n.isSpanned.count*this.actionObj.cellWidth),e||"Vertical"!==this.parent.activeViewOptions.orientation||0===this.parent.activeViewOptions.group.resources.length||(t=(n=this.yearEvent.isSpannedEvent(i,i[this.parent.eventFields.startTime])).isSpanned.count*this.actionObj.cellWidth);var r=this.createAppointmentElement(this.actionObj.groupIndex,i[this.parent.eventFields.subject]);r.setAttribute("drag","true"),(0,s.iQ)([r],Is),(0,s.sN)(r,{width:t+"px",border:"0px","pointer-events":"none",position:"absolute",overflow:"hidden",padding:"3px"}),""!==this.actionObj.clone.style.backgroundColor&&(0,s.sN)(r,{backgroundColor:this.actionObj.clone.style.backgroundColor});var o=k(i[this.parent.eventFields.startTime]).getTime(),l="."+ie+'[data-date="'+o+'"]';this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(l="."+ie+'[data-date="'+o+'"][data-group-index="'+this.actionObj.groupIndex+'"]');var h=this.parent.element.querySelector(l);
1if(!(0,s.hX)(h)){if(e){var d=h.querySelector("."+ga),p=this.actionObj.cellHeight*i.count-(d?d.offsetHeight:0)-7;(this.resizeEdges.right||this.resizeEdges.left)&&(p=parseInt(this.actionObj.clone.style.height,10)),(0,s.sN)(r,{height:p+"px"})}this.renderDynamicElement(h,r,!0),this.actionObj.cloneElement.push(r)}}},a.prototype.renderDynamicElement=function(i,e,t){if(i.querySelector("."+Ct))i.querySelector("."+Ct).appendChild(e);else{var n=(0,s.n)("div",{className:Ct});n.appendChild(e),i.appendChild(n)}},a.prototype.createAppointmentElement=function(i,e){var t=(0,s.n)("div",{className:Ce,innerHTML:e});return this.parent.activeViewOptions.group.resources.length>0&&t.setAttribute("data-group-index",i.toString()),t},a.prototype.dynamicEventsRendering=function(i){var e=this;if((0,s.hX)(this.parent.eventDragArea)){var o,t=this.parent.activeView.renderDates,n=[].slice.call(this.parent.element.querySelectorAll("."+ie)),r=this.parent.activeViewOptions.workDays;if(this.parent.activeViewOptions.group.resources.length>0){var h=(this.parent.virtualScrollModule&&this.parent.virtualScrollModule.isHorizontalScroll?this.parent.resourceBase.renderedResources:this.parent.resourceBase.lastResourceLevel).filter(function(w){return w.groupIndex===e.actionObj.groupIndex});t=h[0].renderDates,n=[].slice.call(this.parent.element.querySelectorAll("."+ie+'[data-group-index="'+this.actionObj.groupIndex+'"]')),r=h[0].workDays,o=h[0].groupOrder}if(this.monthEvent.dateRender=t,this.monthEvent.getSlotDates(r),this.resizeEdges.left||this.resizeEdges.right)for(var u=0,f=[].slice.call(this.parent.element.querySelectorAll("."+Is));u<f.length;u++)(0,s.TF)(f[u]);for(var v=0,b=this.monthEvent.splitEvent(i,t);v<b.length;v++){var y=b[v],S=this.parent.getIndexOfDate(t,k(y[this.monthEvent.fields.startTime])),_=y.data.count*this.actionObj.cellWidth-7,T=this.monthEvent.createAppointmentElement(y,this.actionObj.groupIndex,!0);T.setAttribute("drag","true"),(0,s.iQ)([T],Is),this.monthEvent.applyResourceColor(T,y,"backgroundColor",o),(0,s.sN)(T,{width:_+"px",border:"0px","pointer-events":"none"});var I=n[parseInt(S.toString(),10)];I&&(this.monthEvent.renderElement(I,T,!0),this.actionObj.cloneElement.push(T))}}},a.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.actionObj={},this.scrollArgs={},this.resizeEdges={left:!1,right:!1,top:!1,bottom:!1},this.scrollEdges={left:!1,right:!1,top:!1,bottom:!1})},a}(),QO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),JO=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return QO(i,a),i.prototype.wireResizeEvent=function(e){for(var n=0,r=[].slice.call(e.querySelectorAll("."+kl));n<r.length;n++)s.Jm.add(r[n],s.Pw.touchStartEvent,this.resizeStart,this)},i.prototype.resizeHelper=function(){if(this.parent.activeViewOptions.group.resources.length>0&&this.parent.activeViewOptions.group.allowGroupEdit)for(var e=0,t=this.actionObj.originalElement.length;e<t;e++){var n=this.createCloneElement(this.actionObj.originalElement[parseInt(e.toString(),10)]);this.actionObj.cloneElement[parseInt(e.toString(),10)]=n,this.actionObj.element===this.actionObj.originalElement[parseInt(e.toString(),10)]&&(this.actionObj.clone=n)}else this.actionObj.element&&(this.actionObj.clone=this.createCloneElement(this.actionObj.element)),this.actionObj.cloneElement=[this.actionObj.clone],this.actionObj.originalElement=[this.actionObj.element]},i.prototype.resizeStart=function(e){var t=this;if(!e||"touchstart"!==e.type||this.parent.uiStateValues.isTapHold&&(0,s.kp)(e.target,"."+Ts)){this.parent.eventBase.removeSelectedAppointmentClass(),this.actionObj.action="resize",this.actionObj.slotInterval=this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount,this.actionObj.interval=this.actionObj.slotInterval;var n=(0,s.kp)(e.target,"."+kl);this.actionObj.element=(0,s.kp)(n,"."+Ce),this.actionObj.event=this.parent.eventBase.getEventByGuid(this.actionObj.element.getAttribute("data-guid"));var r=(0,s.X$)({},this.actionObj.event,null,!0);this.parent.trigger("resizeStart",{cancel:!1,data:r,element:this.actionObj.element,event:e,interval:this.actionObj.interval,scroll:{enable:!0,scrollBy:30,timeDelay:100}},function(l){if(!l.cancel){t.actionClass("addClass"),t.parent.uiStateValues.action=!0,t.resizeEdges={left:n.classList.contains(rd),right:n.classList.contains(sd),top:n.
1classList.contains(_f),bottom:n.classList.contains(Tf)},t.actionObj.groupIndex=t.parent.uiStateValues.isGroupAdaptive?t.parent.uiStateValues.groupIndex:0;var h=t.parent.element.querySelector("."+ie);t.actionObj.cellWidth=t.parent.getElementWidth(h),t.actionObj.cellHeight=t.parent.getElementHeight(h);var d=t.parent.activeViewOptions.headerRows.map(function(_){return _.option});if(t.parent.activeView.isTimelineView()&&d.length>0&&["Date","Hour"].indexOf(d.slice(-1)[0])<0){for(var p=t.parent.getContentTable().querySelector("tr"),u=0,m=0,g=[].slice.call(p.children);m<g.length;m++)u+=parseInt(g[m].getAttribute("colspan"),10);var b=p.getBoundingClientRect();t.actionObj.cellWidth=b.width/u,t.actionObj.cellHeight=b.height}var y=t.parent.eventBase.getPageCoordinates(e);t.actionObj.X=y.pageX,t.actionObj.Y=y.pageY,t.actionObj.groupIndex=parseInt(t.actionObj.element.getAttribute("data-group-index")||"0",10),t.actionObj.interval=l.interval,t.actionObj.scroll=l.scroll,t.actionObj.start=new Date(r[t.parent.eventFields.startTime].getTime()),t.actionObj.end=new Date(r[t.parent.eventFields.endTime].getTime()),t.actionObj.originalElement=t.getOriginalElement(t.actionObj.element),"Month"===t.parent.currentView&&(t.daysVariation=-1,t.monthEvent=new Sa(t.parent));var S=t.parent.element.querySelector("."+we);if(t.scrollArgs={element:S,width:S.scrollWidth,height:S.scrollHeight},["Month","TimelineYear"].indexOf(t.parent.currentView)<0){var E=Math.round(t.scrollArgs.width/t.actionObj.cellWidth)*t.actionObj.cellWidth;t.scrollArgs.width=t.scrollArgs.width<E?E:t.scrollArgs.width}s.Jm.add(document,s.Pw.touchMoveEvent,t.resizing,t),s.Jm.add(document,s.Pw.touchEndEvent,t.resizeStop,t)}})}},i.prototype.resizing=function(e){if(e&&"touchmove"===e.type&&e.preventDefault(),this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(),0===this.parent.element.querySelectorAll("."+Ef).length&&this.resizeHelper(),(0,s.hX)(e.target)||!e.target.classList.contains(Gr)){var t=this.parent.eventBase.getPageCoordinates(e);if("Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView){var n=document.documentElement,r=(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0),o=(window.pageYOffset||n.scrollTop)-(n.clientTop||0);this.actionObj.pageX=t.pageX-r,this.actionObj.pageY=t.pageY-o}else this.actionObj.pageX=t.pageX,this.actionObj.pageY=t.pageY;this.updateScrollPosition(e),this.updateResizingDirection(e);var h={cancel:!1,data:(0,s.X$)({},this.actionObj.event,null,!0),element:this.actionObj.element,event:e,startTime:this.actionObj.start,endTime:this.actionObj.end};this.parent.group.resources.length>0&&(h.groupIndex=this.actionObj.groupIndex),this.parent.trigger("resizing",h)}},i.prototype.updateResizingDirection=function(e){if("Month"!==this.parent.currentView&&"TimelineYear"!==this.parent.currentView){var t=this.resizeValidation(e);if(this.resizeEdges.left){if(t){var n=this.getLeftRightStyles(e,!0);if(parseInt(n.width,10)<1)return;for(var r=0,o=this.actionObj.cloneElement;r<o.length;r++)(0,s.sN)(l=o[r],n),(0,s.iQ)([l],rd)}this.horizontalResizing(!this.parent.enableRtl)}if(this.resizeEdges.right){if(t){var h=this.getLeftRightStyles(e,!1);if(parseInt(h.width,10)<1)return;for(var d=0,p=this.actionObj.cloneElement;d<p.length;d++)(0,s.sN)(l=p[d],h),(0,s.iQ)([l],sd)}this.horizontalResizing(this.parent.enableRtl)}if(this.resizeEdges.top){if(t){var u=this.getTopBottomStyles(e,!0);if(parseInt(u.height,10)<1)return;for(var f=0,m=this.actionObj.cloneElement;f<m.length;f++)(0,s.sN)(l=m[f],u),(0,s.iQ)([l],_f)}this.verticalResizing(!0)}if(this.resizeEdges.bottom){if(t){var g=this.getTopBottomStyles(e,!1);if(parseInt(g.height,10)<1)return;for(var v=0,b=this.actionObj.cloneElement;v<b.length;v++){var l;(0,s.sN)(l=b[v],g),(0,s.iQ)([l],Tf)}}this.verticalResizing(!1)}}else this.monthResizing()},i.prototype.monthResizing=function(){if(this.removeCloneElement(),!(0,s.hX)(this.actionObj.pageX)&&!(0,s.hX)(this.actionObj.pageY)){var e=document.elementFromPoint(this.actionObj.pageX,this.actionObj.pageY);if(!(0,s.hX)(e)){var t=this.parent.getDateFromElement(e),n=!(this.parent.activeViewOptions.group.resources.length>0)||parseInt(e.getAttribute("data-group-index"),10)===this.actionObj.groupIndex,r=new Date(this.actionObj.event[this.parent.eventFields.startTime].getTime()),o=new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime());if(!this.parent.enableRtl&&this.resizeEdges.left||this.parent.enableRtl&&this.resizeEdges.right||this.resizeEdges.top?r=t:(!this.parent.enableRtl&&this.resizeEdges.right||this.parent.enableRtl&&this.resizeEdges.left||this.resizeEdges.bottom)&&(o=K(t,1)),n&&r<o){this.actionObj.start=r,this.actionObj.end=o;var l=this.getUpdatedEvent(this.actionObj.start,this.actionObj.end,this.actionObj.event);"TimelineYear"===this.parent.currentView?this.yearEventsRendering(l):this.dynamicEventsRendering(l),this.updateOriginalElement(this.actionObj.clone)}}}},i.prototype.yearEventsRendering=function(e){for(var n=0,r=[].slice.call(this.parent.element.querySelectorAll("."+Is));n<r.length;n++)(0,s.TF)(r[n]);var l=new Date(e[this.parent.eventFields.endTime]),h=0;0===this.parent.activeViewOptions.group.resources.length&&(h=this.getMonthDiff(e[this.parent.eventFields.startTime],K(l,-1)));for(var d=0;d<=h;d++){var p=void 0;0===this.parent.activeViewOptions.group.resources.length?p=this.getEventC
1ount(e,this.actionObj.start.getMonth()+d):(p=(0,s.X$)({},e,null,!0),l=this.resizeEdges.left||this.resizeEdges.right?K(l,-1):l,p.count=this.getMonthDiff(e[this.parent.eventFields.startTime],l)+1),this.dynamicYearlyEventsRendering(p,!0)}},i.prototype.getMonthDiff=function(e,t){var n;return n=12*(t.getFullYear()-e.getFullYear()),n-=e.getMonth(),(n+=t.getMonth())<=0?0:n},i.prototype.getEventCount=function(e,t){var n=(0,s.X$)({},e,null,!0),r=n[this.parent.eventFields.startTime],o=n[this.parent.eventFields.endTime],l=new Date(this.parent.selectedDate.getFullYear(),t,1),h=K(new Date(this.parent.selectedDate.getFullYear(),t+1,0),1),d=1;return r.getTime()<l.getTime()&&(n[this.parent.eventFields.startTime]=l),o.getTime()>h.getTime()&&(n[this.parent.eventFields.endTime]=h),0===this.parent.activeViewOptions.group.resources.length&&(d=Math.ceil((n[this.parent.eventFields.endTime].getTime()-n[this.parent.eventFields.startTime].getTime())/bt)),n.count=d,n},i.prototype.resizeStop=function(e){var t=this;s.Jm.remove(document,s.Pw.touchMoveEvent,this.resizing),s.Jm.remove(document,s.Pw.touchEndEvent,this.resizeStop),clearInterval(this.actionObj.scrollInterval),this.actionObj.scrollInterval=null,this.actionObj.action=null,this.removeCloneElementClasses(),this.removeCloneElement(),this.actionClass("removeClass"),this.parent.uiStateValues.action=this.parent.uiStateValues.isTapHold=!1;var n={cancel:!1,data:this.getChangedData(),element:this.actionObj.element,event:e};this.parent.trigger("resizeStop",n,function(r){r.cancel||t.parent.eventBase.checkOverlap(r.data)||(t.parent.isSpecificResourceEvents()&&(t.parent.crudModule.crudObj.sourceEvent=[t.parent.resourceBase.lastResourceLevel[parseInt(r.element.getAttribute("data-group-index"),10)]],t.parent.crudModule.crudObj.targetEvent=t.parent.crudModule.crudObj.sourceEvent,t.parent.crudModule.crudObj.isCrudAction=!0),t.saveChangedData(r))})},i.prototype.verticalResizing=function(e){var t=this.actionObj.clone.offsetTop;e||(t+=this.actionObj.clone.offsetHeight);var n=t/Math.round(this.actionObj.cellHeight)*this.actionObj.slotInterval,r=this.actionObj.clone.offsetParent;if(!(0,s.hX)(r)){var o=k(this.parent.getDateFromElement(r));o.setHours(this.parent.activeView.getStartHour().getHours()),o.setMinutes(n+this.parent.activeView.getStartHour().getMinutes()),e?this.actionObj.start=this.calculateIntervalTime(o):this.actionObj.end=this.calculateIntervalTime(o),this.updateTimePosition(o)}},i.prototype.horizontalResizing=function(e){var r,t=new Date(this.actionObj.event[this.parent.eventFields.startTime].getTime()),n=new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime()),o=this.parent.currentView,l="TimelineMonth"===this.parent.currentView;if(this.parent.activeView.isTimelineView()){var h=this.parent.getContentTable().querySelector("tr");if(this.parent.activeViewOptions.headerRows.length>0){var d=this.parent.activeViewOptions.headerRows.map(function(G){return G.option});o=d.slice(-1)[0],l&&"Hour"===o&&(o=d.slice(-2)[0]||"Month")}r=e?t:n;var p=0,u=[].slice.call(h.children),f=!1,m=this.actionObj.cellWidth/(this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount),g=parseFloat(this.parent.enableRtl?this.actionObj.clone.style.right:this.actionObj.clone.style.left);if(g=Math.round(g/m)*m,-1!==["Year","Month","Week","Date"].indexOf(o)){for(var v=0,b=0,y=u;b<y.length;b++)v+=parseInt(y[b].getAttribute("colspan"),10);var E=this.parent.enableRtl?parseInt(this.actionObj.clone.style.right,10):parseInt(this.actionObj.clone.style.left,10);E=Math.round(E/this.actionObj.cellWidth)*this.actionObj.cellWidth,e||(E+=this.parent.getElementWidth(this.actionObj.clone)-this.actionObj.cellWidth),p=l?Math.floor(E/Math.floor(this.parent.getElementWidth(h)/v)):Math.round(E/(this.parent.getElementWidth(h)/v)),f=(p=e?p:l?p+1:p)===u.length,p=p<0?0:p>=v?v-1:p}else{var _=this.actionObj.cellWidth;if(p=e?Math.round(g/this.actionObj.cellWidth):Math.ceil((g+(this.parent.getElementWidth(this.actionObj.clone)-_))/this.actionObj.cellWidth),this.parent.enableRtl){var T=Math.round(g/this.actionObj.cellWidth)*this.actionObj.cellWidth+(e?0:this.parent.getElementWidth(this.actionObj.clone)-this.actionObj.cellWidth);p=Math.floor(T/this.actionObj.cellWidth)}f=p===u.length,p=this.getIndex(p)}var I=void 0;if(I=-1!==["Year","Month","Week","Date"].indexOf(o)?new Date(this.parent.activeView.renderDates[parseInt(p.toString(),10)].getTime()):this.parent.getDateFromElement(h.children[parseInt(p.toString(),10)]),-1===["TimelineMonth","Year","Month","Week","Date"].indexOf(o)&&this.parent.activeViewOptions.timeScale.enable){e||(g+=this.parent.getElementWidth(this.actionObj.clone));var w=Math.floor(this.actionObj.slotInterval/this.actionObj.cellWidth*(g-Math.floor(g/this.actionObj.cellWidth)*this.actionObj.cellWidth));w=f||!e&&0===w?this.actionObj.slotInterval:w,r=new Date(I.getTime()),r=new Date(I.getTime()+w*wt),this.updateTimePosition(r)}else r=new Date(I.setHours(r.getHours(),r.getMinutes(),r.getSeconds()))}else{var A=(0,s.kp)(this.actionObj.clone,"td").cellIndex,M=Math.ceil((e?this.parent.getElementWidth(this.actionObj.element):0)/this.actionObj.cellWidth)*this.actionObj.cellWidth,D=(v=Math.ceil((this.parent.getElementWidth(this.actionObj.clone)-M)/this.actionObj.cellWidth),h=(0,s.kp)(this.actionObj.clone,"tr"),e?A-v:A+v-1);D=this.getIndex(D),r=this.parent.getDateFromElement(h.children[parseInt(D.toString(),10)]),e?r.setHours(t.getHours(),t.getMinutes(),t.getSeconds()):r.setHours(n.getHours(),n.getMinutes(),n.getSeconds())}
1var L=-1!==["TimelineMonth","Year","Month","Week","WorkWeek","Date","Day"].indexOf(o)||!this.parent.activeViewOptions.timeScale.enable;if(e)n.getTime()-r.getTime()<=0&&(r=L?k(n):t),this.actionObj.start=L?r:this.calculateIntervalTime(r);else{var V=L&&0===r.getHours()&&0===r.getMinutes()?K(r,1):r;L&&V.getTime()-t.getTime()<=0&&(V=K(k(t),1)),this.actionObj.end=L?V:this.calculateIntervalTime(V)}},i.prototype.getTopBottomStyles=function(e,t){var n=this.parent.element.querySelector("."+we),r=this.actionObj.cellHeight/this.actionObj.slotInterval*this.actionObj.interval,o=t?this.actionObj.element.offsetHeight+(this.actionObj.Y-this.actionObj.pageY):this.actionObj.element.offsetHeight+(this.actionObj.pageY-this.actionObj.Y),l=t?this.actionObj.element.offsetTop-(this.actionObj.Y-this.actionObj.pageY):this.actionObj.clone.offsetTop;return o=l<0||this.actionObj.clone.offsetTop+this.actionObj.clone.offsetHeight>this.scrollArgs.height?this.actionObj.clone.offsetHeight:o,l=l<0?0:l,o=(l=t?Math.floor(l/r)*r:l)+o>=n.scrollHeight?n.scrollHeight-l:Math.ceil(o/r)*r,!t&&this.actionObj.clone.offsetTop+o>=this.parent.getContentTable().offsetHeight&&(o=this.parent.getContentTable().offsetHeight-this.actionObj.clone.offsetTop),{height:(0,s.IV)(o<this.actionObj.cellHeight?Math.floor(o/r)*r:o),top:(0,s.IV)(o<this.actionObj.cellHeight&&t?Math.ceil(l/r)*r:l),left:"0px",right:"0px",width:"100%"}},i.prototype.getLeftRightStyles=function(e,t){var n={},r=this.parent.activeView.isTimelineView(),o=["TimelineDay","TimelineWeek","TimelineWorkWeek"].indexOf(this.parent.currentView)>-1&&this.parent.activeViewOptions.timeScale.enable,l=this.actionObj.cellWidth/this.actionObj.slotInterval*this.actionObj.interval,h=t?this.actionObj.X-this.actionObj.pageX:this.actionObj.pageX-this.actionObj.X,d=r?Math.round(this.parent.getElementWidth(this.actionObj.element)/this.actionObj.cellWidth)*this.actionObj.cellWidth:"Month"===this.parent.currentView?this.parent.getElementWidth(this.actionObj.element):Math.ceil(this.parent.getElementWidth(this.actionObj.element)/this.actionObj.cellWidth)*this.actionObj.cellWidth,p=d+Math.ceil(h/this.actionObj.cellWidth)*this.actionObj.cellWidth,u=this.parent.enableRtl?parseInt(this.actionObj.element.style.right,10):this.actionObj.clone.offsetLeft;if(u=Math.round(u/l)*l,o){if(p=d+Math.ceil(h/l)*l,!t){var f=(+parseFloat(this.actionObj.element.style[this.parent.enableRtl?"right":"left"])).toFixed(1),m=Math.round(d/l)*l;(f!==u.toFixed(1)||m!==d)&&(p=Math.round((u+p)/l)*l-u)}this.actionObj.event[this.parent.eventFields.isAllDay]=!1}var g=!t&&Math.floor(p+this.actionObj.clone.offsetLeft)>this.scrollArgs.width?this.parent.getElementWidth(this.actionObj.clone):p;if(this.parent.enableRtl){var v=r?parseInt(this.actionObj.element.style.right,10):-(p-this.actionObj.cellWidth);v=r?v:t||v>0?0:v,r&&!t&&(v=Math.round(v/l)*l,(v-=Math.ceil((this.actionObj.pageX-this.actionObj.X)/l)*l)<0&&(v=parseInt(this.actionObj.clone.style.right,10),g=parseInt(this.actionObj.clone.style.width,10))),n.right=(0,s.IV)(v=v>=this.scrollArgs.width?this.scrollArgs.width-this.actionObj.cellWidth:v),g=g+v>this.scrollArgs.width?this.parent.getElementWidth(this.actionObj.clone):g}else{var b=t?this.actionObj.element.offsetLeft-(this.actionObj.X-this.actionObj.pageX):this.parent.enableRtl?this.actionObj.element.offsetLeft:0;r&&(b=t?b:parseInt(this.actionObj.clone.style.left,10),b=this.parent.enableRtl?t?b:this.actionObj.pageX<this.actionObj.X-this.parent.getElementWidth(this.actionObj.clone)?parseInt(this.actionObj.clone.style.right,10):b:t&&this.actionObj.pageX>this.actionObj.X+this.parent.getElementWidth(this.actionObj.clone)&&this.parent.getElementWidth(this.actionObj.clone)===this.actionObj.cellWidth?parseInt(this.actionObj.clone.style.left,10):b);var y=b;(b=r?o?t?this.actionObj.element.offsetLeft-Math.ceil((this.actionObj.element.offsetLeft-b)/l)*l:b:Math.floor(b/this.actionObj.cellWidth)*this.actionObj.cellWidth:Math.ceil(Math.abs(b)/this.actionObj.cellWidth)*this.actionObj.cellWidth)<0&&(r&&t&&b%l?(b=parseInt(this.actionObj.clone.style.left,10),g=parseInt(this.actionObj.clone.style.width,10)):(b=0,g=this.parent.getElementWidth(this.actionObj.clone)));var S=Math.ceil(this.parent.getElementWidth(this.actionObj.clone)/this.actionObj.cellWidth)*this.actionObj.cellWidth;
1t&&(n.left=(0,s.IV)(r?b:t?y<0?-b:Math.ceil((d-S)/this.actionObj.cellWidth)*this.actionObj.cellWidth:b))}return n.width=(0,s.IV)(g),n},i.prototype.resizeValidation=function(e){var t=this.parent.eventBase.getPageCoordinates(e),n=this.getContentAreaDimension(),r=this.parent.activeView.isTimelineView()&&this.parent.activeViewOptions.timeScale.enable,o=this.actionObj.cellWidth,l=!1;return this.resizeEdges.left&&(t.pageX<n.leftOffset&&t.pageX>=n.left&&r&&(o=0),l=t.pageX-o>=n.left),this.resizeEdges.right&&(t.pageX>n.rightOffset&&t.pageX<=n.right&&r&&(o=0),l=t.pageX+o<=n.right),this.resizeEdges.top&&(l=this.actionObj.clone.offsetTop>=n.top),this.resizeEdges.bottom&&(l=this.actionObj.clone.offsetTop+this.actionObj.clone.offsetHeight<=this.scrollArgs.height),l},i.prototype.getModuleName=function(){return"resize"},i}(cS),KO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),hS=function(a){function i(e){var t=a.call(this,e,"day")||this;return t.isResource=!1,t}return KO(i,a),i.prototype.renderAppointments=function(){this.parent.dragAndDropModule&&this.parent.dragAndDropModule.setDragArea(),this.fields=this.parent.eventFields;for(var n=0,r=[].slice.call(this.parent.element.querySelectorAll("Year"===this.parent.currentView?"."+ie+" ."+Ce:"."+Ct+",."+Fi));n<r.length;n++)(0,s.TF)(r[n]);this.renderedEvents=[],"Year"===this.parent.currentView?this.yearViewEvents():(this.removeCellHeight(),this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?(this.isResource=!0,this.timelineResourceEvents()):this.timelineYearViewEvents()),this.parent.renderTemplates(),this.parent.notify(Ri,{})},i.prototype.yearViewEvents=function(){for(var e=this.getMonths(),t=0,n=e;t<n.length;t++)for(var r=n[t],o=".e-month-calendar:nth-child("+(e.indexOf(r)+1)+") td.e-work-cells",l=[].slice.call(this.parent.element.querySelectorAll(o)),h=new Date(this.parent.selectedDate.getFullYear(),r,1),d=this.parent.calendarUtil.getMonthStartDate(new Date(h.getTime())),p=this.parent.calendarUtil.getMonthEndDate(new Date(h.getTime())),u=Ui(d,this.parent.activeViewOptions.firstDayOfWeek),f=K(Hh(p,this.parent.activeViewOptions.firstDayOfWeek),1),m=0;u.getTime()<f.getTime();m++){var g=k(new Date(u.getTime())),v=K(new Date(g.getTime()),1);if(u=K(new Date(u.getTime()),1),this.parent.isMinMaxDate(g)&&this.parent.eventBase.filterEvents(g,v).length>0){var y=l[parseInt(m.toString(),10)];y&&y.appendChild((0,s.n)("div",{className:Ce}))}}},i.prototype.timelineYearViewEvents=function(){var e=this,t=this.parent.element.querySelector("."+ie+":not(."+pt+")");this.cellWidth=this.parent.getElementWidth(t),this.cellHeader=sf(t.querySelector("."+ga));var n=this.parent.element.querySelector("."+Ur);this.eventHeight=this.parent.getElementHeightFromClass(n,Ce),this.addCellHeight("."+uo+" tbody tr,."+_s+" tbody tr,."+nt+" tbody tr",this.eventHeight,2,this.cellHeader,this.moreIndicatorHeight);for(var o=[].slice.call(this.parent.element.querySelectorAll("."+mn)),l=this.getMonths(),h=this.parent.activeViewOptions.group.resources.length>0&&this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:void 0,d=0;d<l.length;d++){var p=o[parseInt(d.toString(),10)],u=d+1,f=(0,s.n)("div",{className:Ct});p.appendChild(f);var m=new Date(this.parent.selectedDate.getFullYear(),l[parseInt(d.toString(),10)],1),g=new Date(m.getFullYear(),m.getMonth()+1,0),v=m.getDay(),b=[];for("Horizontal"===this.parent.activeViewOptions.orientation&&(this.renderedEvents=[]);m.getTime()<=g.getTime();){var y=void 0,S=void 0;if("Vertical"===this.parent.activeViewOptions.orientation){var E=o[parseInt(v.toString(),10)];u=v+1,(f=E.querySelector("."+Ct))||(f=(0,s.n)("div",{className:Ct}),E.appendChild(f)),this.parent.enableRtl?S=d*this.cellWidth:y=d*this.cellWidth}else this.parent.enableRtl?S=(v+m.getDate()-1)*this.cellWidth:y=(v+m.getDate()-1)*this.cellWidth;var _=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+u+") td");this.cellHeight=_.offsetHeight;var T=k(new Date(m.getTime())),I=K(new Date(T.getTime()),1),w=void 0;this.parent.uiStateValues.isGroupAdaptive&&(w=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]);var A=this.parent.eventBase.filterEvents(T,I,void 0,w);A=this.parent.eventBase.sortByDateTime(A);for(var M=function(te,$){var Se=(0,s.X$)({},A[parseInt(te.toString(),10)],null,!0);D.updateSpannedEvents(Se,T,I);var Ie=D.getIndex(T);Se.Index=Ie;var Re=D.cellHeader+D.eventHeight*(Ie+1)+2+D.moreIndicatorHeight,de=Math.floor((D.cellHeight-D.cellHeader-D.moreIndicatorHeight)/(D.eventHeight+2)),At=D.parent.rowAutoHeight?1:D.parent.activeViewOptions.maxEventsPerRow,_t=D.parent.activeViewOptions.maxEventsPerRow?$-At:$-de<=0?1:$-de;if("Horizontal"===D.parent.activeViewOptions.orientation){var ut=D.renderedEvents.filter(function(Be){return Be.Guid===Se.Guid}),Vt=b.filter(function(Be){return Be.Guid===Se.Guid});if(ut.length>0&&ut[0].MoreIndicator||Vt.length>0&&Vt[0].MoreIndicator)return D.renderMoreIndicator(f,_t,T,"Horizontal"===D.parent.activeViewOptions.orientation?d:v,y,S,h),"continue";if(ut.length>0||Vt.length>0)return"continue"}D.parent.rowAutoHeight||D.maxOrIndicator||Ie<At||D.cellHeight>Re||D.cellHeight>Re?(D.renderEvent(f,Se,d,y,S,m,v),(D.parent.rowAutoHeight||D.cellHeight>Re)&&D.updateCellHeight(_,Re),b.push(Se)):(D.renderMoreIndicator(f,_t,T,"Horizontal"===D.parent.activeViewOptions.orientation?d:v,y,S,h),"Horizontal"===D.parent.activeViewOptions.orientation&&(Se.MoreIndicator=!0,D.renderedEvents.push(Se),b.push(Se)))},D=this,L=0,V=A.length;L<V;L++)M(L,V);m=K(new Date(m.getTime()),1),"Vertical"===this.parent.activeViewOptions.orientation&&(v++,this.renderedEvents=[])}}if(this.parent.rowAutoHeight&&"Vertical"===this.parent.activeViewOptions.orientation){var G=[].slice.call(this.parent.element.querySelectorAll("."+mn)),W=[].slice.call(this.parent.element.querySelectorAll("."+nt+" tbody tr"));G.forEach(function(te,$){var Se=[].slice.call(te.querySelectorAll("."+Ce)),Ie=W[parseInt($.toString(),10)].offsetTop+e.cellHeader+2;Se.forEach(function(Re){var Ne=parseInt(Re.getAttribute("data-index"),10);Re.style.top=Ie+Ne*e.eventHeight+"px",Re.removeAttribute("data-index")})})}},i.prototype.updateSpannedEvents=function(e,t,n){var r=this.isResource&&"Vertical"===this.parent.activeViewOptions.orientation||!this.isResource&&"Horizontal"===this.parent.activeViewOptions.orientation,o={isLeft:!0,isRight:!0,isBottom:!0,isTop:!0};t.getTime()<=e[this.fields.startTime].getTime()&&(r?o.isLeft=!1:o.isTop=!1),(n.getTime()>=e[this.fields.endTime].getTime()||r&&!this.isResource&&K(n,-1).getMonth()===e[this.fields.endTime].getMonth()||r&&this.isResource&&n.getTime()<=e[this.fields.endTime].getTime())&&(r?o.isRight=!1:o.isBottom=!1),e.data=o},i.prototype.timelineResourceEvents=function(){var e=this,t=this.parent.element.querySelector("."+we),n=t.offsetWidth>t.clientWidth,r=this.parent.element.querySelector("."+ie);this.cellWidth=this.parent.getElementWidth(r),this.cellHeader=0;var o=this.parent.element.querySelector("."+Ur);this.eventHeight=this.parent.getElementHeightFromClass(o,Ce),this.addCellHeight("."+uo+" tbody tr,."+_s+" tbody tr,."+nt+" tbody tr",this.eventHeight,2,this.cellHeader,this.moreIndicatorHeight);var h=[].slice.call(this.parent.element.querySelectorAll("."+mn)),d=this.parent.uiStateValues.isGroupAdaptive?[this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex]]:this.parent.activeViewOptions.allowVirtualScrolling?this.parent.resourceBase.renderedResources:this.parent.resourceBase.lastResourceLevel,p=this.getMonths();if("Horizontal"===this.parent.activeViewOptions.orientation)for(var u=0;u<p.length;u++)for(var f=new Date(this.parent.selectedDate.getFullYear(),p[parseInt(u.toString(),10)],1),m=0,g=d.length;m<g;m++)this.renderedEvents=[],this.renderResourceEvent(h[parseInt(u.toString(),10)],d[parseInt(m.toString(),10)],u,m,f);else for(m=0,g=d.length;m<g;m++)for(this.renderedEvents=[],u=0;u<p.length;u++)f=new Date(this.parent.selectedDate.getFullYear(),p[parseInt(u.toString(),10)],1),this.renderResourceEvent(h[parseInt(m.toString(),10)],d[parseInt(m.toString(),10)],u,m,f);if(this.parent.rowAutoHeight&&!n&&t.offsetWidth>t.clientWidth){[].slice.call(this.parent.element.querySelectorAll("."+Ce)).forEac
1h(function(E){E.style.removeProperty("left"),E.style.removeProperty("right")});var b=[].slice.call(this.parent.element.querySelectorAll("."+mn)),y=this.parent.element.querySelector("."+nt),S=[].slice.call(y.querySelectorAll("tbody tr"));b.forEach(function(E,_){var T=[].slice.call(E.children),I=S[parseInt(_.toString(),10)];T.forEach(function(w,A){var M=I.querySelector("td:nth-child("+(A+1)+")"),D=[].slice.call(w.children),L=e.parent.getElementWidth(M),V=M.offsetLeft;if(e.parent.enableRtl){var G=y.offsetWidth-V-M.offsetWidth;D.forEach(function(W){W.style.width=Math.floor(parseInt(W.style.width,10)/L)*L+"px",W.style.right=G+"px"})}else D.forEach(function(W){W.style.width=Math.floor(parseInt(W.style.width,10)/L)*L+"px",W.style.left=V+"px"})})})}},i.prototype.renderResourceEvent=function(e,t,n,r,o){var l=(0,s.n)("div",{className:Ct});e.appendChild(l);var h=K(no(new Date(o.getTime())),1),d=this.parent.eventBase.filterEvents(o,h,void 0,t),u=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+(("Vertical"===this.parent.activeViewOptions.orientation?r:n)+1)+") td");this.cellHeight=u.offsetHeight,this.groupOrder=t.groupOrder;for(var f=[],m=function(y){var S=d[parseInt(y.toString(),10)],E=void 0,_=(0,s.X$)({},S,null,!0);if(g.parent.activeViewOptions.group.resources.length>0){var T=g.isSpannedEvent(_,o);E=g.getIndex(T[g.fields.startTime]),_.Index=E}else E=g.getIndex(_[g.fields.startTime]),_.Index=E;var I=g.cellHeader+g.eventHeight*(y+1)+2+g.moreIndicatorHeight,w="Vertical"===g.parent.activeViewOptions.orientation?n*g.cellWidth:r*g.cellWidth;if(!g.parent.isMinMaxDate(_[g.fields.startTime]))return{value:void 0};if("Vertical"===g.parent.activeViewOptions.orientation&&g.parent.activeViewOptions.group.resources.length>0){var A=g.renderedEvents.filter(function(V){return V.Guid===_.Guid}),M=f.filter(function(V){return V.Guid===_.Guid});if(A.length>0||M.length>0)return"continue"}if(!(g.parent.rowAutoHeight||g.cellHeight>I)){if(g.renderMoreIndicator(l,d.length-y,o,"Horizontal"===g.parent.activeViewOptions.orientation?n:r,w,w,r),"Horizontal"===g.parent.activeViewOptions.orientation)for(var L=r;L<d.length;L++)g.renderedEvents.push((0,s.X$)({},d[parseInt(L.toString(),10)],{Index:E+L},!0));return"break"}g.renderEvent(l,_,n,w,w,o,r),g.updateCellHeight(u,I),f.push(_)},g=this,v=0;v<d.length;v++){var b=m(v);if("object"==typeof b)return b.value;if("break"===b)break}},i.prototype.renderEvent=function(e,t,n,r,o,l,h){var f,m,d=this,p=this.isSpannedEvent(t,l),u=this.createEventElement(p);if(1===p.isSpanned.count){var g=K(p[this.fields.endTime],-1);p[this.fields.endTime]=g>p[this.fields.startTime]?g:p[this.fields.endTime]}if(!(p[this.fields.startTime]>p[this.fields.endTime])){"Horizontal"===this.parent.activeViewOptions.orientation?(m=n+1,p[this.fields.startTime].getTime()===p[this.fields.endTime].getTime()&&(p.isSpanned.count=1),f=p.isSpanned.count*this.cellWidth):(m=h+1,f=this.isResource?p.isSpanned.count*this.cellWidth:this.cellWidth);var v=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+m+") td");(0,s.sN)(u,{width:f+"px",height:this.eventHeight+"px",left:r+"px",right:o+"px",top:v.offsetTop+this.cellHeader+this.eventHeight*p.Index+2+"px"}),!this.isResource&&this.parent.rowAutoHeight&&"Vertical"===this.parent.activeViewOptions.orientation&&u.setAttribute("data-index",p.Index.toString()),this.parent.trigger(oa,{data:p,element:u,cancel:!1,type:"event"},function(S){S.cancel||(e.appendChild(u),d.wireAppointmentEvents(u,p),(d.parent.activeViewOptions.group.resources.length>0||"Vertical"===d.parent.activeViewOptions.orientation||(p.isSpanned.isRight||p.isSpanned.isLeft)&&"Horizontal"===d.parent.activeViewOptions.orientation||!p.isSpanned.isRight)&&d.renderedEvents.push((0,s.X$)({},p,null,!0)))})}},i.prototype.renderMoreIndicator=function(e,t,n,r,o,l,h){if(0!==this.parent.activeViewOptions.group.resources.length||!e.querySelector('[data-start-date="'+n.getTime()+'"]')){var d;d=K(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?no(new Date(n.getTime())):new Date(n.getTime()),1);var p=this.getMoreIndicatorElement(t,n,d),f=this.parent.element.querySelector(".e-content-wrap tr:nth-child("+(r+1)+")").offsetTop+(this.cellHeight-this.moreIndicatorHeight);o=Math.floor(o/this.cellWidth)*this.cellWidth,l=Math.floor(l/this.cellWidth)*this.cellWidth,(0,s.sN)(p,{width:this.cellWidth+"px",left:o+"px",right:l+"px",to
1p:f+"px"}),(0,s.hX)(h)||p.setAttribute("data-group-index",h.toString()),e.appendChild(p),s.Jm.add(p,"click",this.moreIndicatorClick,this)}},i.prototype.createEventElement=function(e){var t=e[this.fields.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),n=(0,s.n)("div",{className:Ce,attrs:{"data-id":"Appointment_"+e[this.fields.id],"data-guid":e.Guid,role:"button",tabindex:"0","aria-disabled":this.parent.eventBase.getReadonlyAttribute(e),"aria-label":this.parent.getAnnouncementString(e)}});if(this.cssClass&&(0,s.iQ)([n],this.cssClass),e[this.fields.isReadonly]&&(0,s.iQ)([n],Wl),this.parent.activeViewOptions.group.resources.length>0){var r=this.getGroupIndexFromEvent(e);n.setAttribute("data-group-index",r.toString())}var o=[],l=(0,s.X$)({},e,null,!0);if(this.parent.activeViewOptions.eventTemplate){var h=this.parent.element.id+"_"+this.parent.activeViewOptions.eventTemplateName+"eventTemplate";o=this.parent.getAppointmentTemplate()(l,this.parent,"eventTemplate",h,!1,void 0,void 0,this.parent.root)}else{var d=e[this.fields.location]||this.parent.eventSettings.fields.location.default||"",p=(0,s.n)("div",{className:Ut,innerHTML:t+(d?";&nbsp"+d:"")}),u=(0,s.n)("div",{className:vr+(this.parent.isAdaptive?" "+ot:""),innerHTML:this.parent.getTimeString(l[this.fields.startTime])}),f=(0,s.n)("div",{className:vr+(this.parent.isAdaptive?" "+ot:""),innerHTML:this.parent.getTimeString(l[this.fields.endTime])});(0,s.iQ)([p],"e-text-center"),e[this.fields.isAllDay]?o=[p]:l.isLeft||l.isRight?(l.isLeft||o.push(u),o.push(p),l.isRight||o.push(f)):o=[u,p,f]}var m=(0,s.n)("div",{className:Jh});return(0,s.BC)(o,m),n.appendChild(m),this.parent.eventBase.renderSpannedIcon(n,e.isSpanned),this.renderResizeHandler(n,e.data,e[this.fields.isReadonly]),this.applyResourceColor(n,l,"backgroundColor",this.groupOrder),n},i.prototype.isSpannedEvent=function(e,t){var n=new Date(t.getFullYear(),t.getMonth(),1),r=K(new Date(t.getFullYear(),t.getMonth()+1,0),1),o=(0,s.X$)({},e,null,!0),l=o[this.fields.startTime],h=o[this.fields.endTime],d={isLeft:!1,isRight:!1,count:1},p=new Date(this.parent.selectedDate.getFullYear(),this.parent.firstMonthOfYear,1),u=er(p,this.parent.monthsCount);if(this.isResource&&this.updateSpannedEvents(e,n,r),"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0){this.updateSpannedEventDetails(l,h,p,u,o,d);var f=o[this.fields.startTime],m=new Date(o[this.fields.endTime]-1);d.count=m.getMonth()-f.getMonth()+this.parent.monthsCount*(m.getFullYear()-f.getFullYear())+1}else if(this.updateSpannedEventDetails(l,h,n,r,o,d),0===this.parent.activeViewOptions.group.resources.length||this.parent.uiStateValues.isGroupAdaptive){var g=k(o[this.fields.endTime]).getTime(),v=k(o[this.fields.startTime]).getTime();(e[this.fields.isAllDay]&&g===e[this.fields.endTime].getTime()||d.isRight)&&(g=K(new Date(g),-1).getTime()),d.count=Math.round((g-v)/bt)+1}return o.isSpanned=d,k(l).getTime()<k(this.parent.minDate).getTime()&&(o[this.fields.startTime]=this.parent.minDate),k(h).getTime()>k(this.parent.maxDate).getTime()&&(o[this.fields.endTime]=this.parent.maxDate),o},i.prototype.updateSpannedEventDetails=function(e,t,n,r,o,l){e.getTime()<n.getTime()&&(o[this.fields.startTime]=n,l.isLeft=!0),t.getTime()>r.getTime()&&(o[this.fields.endTime]=r,l.isRight=!0)},i.prototype.getOverlapEvents=function(e,t){var r,o,n=[];if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var l=this.parent.calendarUtil.getMonthStartDate(new Date(e.getTime())),h=K(this.parent.calendarUtil.getMonthEndDate(new Date(e.getTime())),-1);r=k(new Date(l.getTime())).getTime(),o=k(new Date(h.getTime())).getTime()}else this.parent.rowAutoHeight?(r=k(new Date(e.getTime())).getTime(),o=K(k(new Date(e.getTime())),1).getTime()):r=o=k(new Date(e.getTime())).getTime();for(var d=0,p=t;d<p.length;d++){var u=p[d],f=new Date(u[this.fields.startTime].getTime()),m=new Date(u[this.fields.endTime].getTime()),g=u[this.fields.isAllDay]?k(m).getTime()>r:k(m).getTime()>=r;(k(f).getTime()<=r&&g||k(f).getTime()>=r&&k(m).getTime()<=o||"Vertical"===this.parent.activeViewOptions.orientation&&k(f).getTime()>=r&&k(m).getTime()>=o)&&n.push(u)}return n},i.prototype.getMonths=function(){var e=this;return Array.apply(null,{length:this.parent.monthsCount}).map(function(t,n){return e.parent.firstMonthOfYear+n})},i.prototype.removeCellHeight=function(){for(var n=0,r=[].slice.call(this.element.querySelectorAll("."+uo+" tbody tr,."+_s+" tbody tr,."+nt+" tbody tr"));n<r.length;n++)r[n].firstElementChild.style.height=""},i.prototype.destroy=function(){a.prototype.destroy.call(this),this.parent=null},i}
1(Ca),ZO=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),eA=function(a){function i(){var e=null!==a&&a.apply(this,arguments)||this;return e.widthUptoCursorPoint=0,e.heightUptoCursorPoint=0,e.cursorPointIndex=0,e.isHeaderRows=!1,e.isTimelineDayProcess=!1,e.widthPerMinute=0,e.heightPerMinute=0,e.minDiff=0,e.isStepDragging=!1,e.isMorePopupOpened=!1,e.isAllDayDrag=!1,e.isMultiSelect=!1,e.multiData=[],e.updatedData=[],e.swagData=[],e.startTime=0,e.isAllDayTarget=!1,e.targetTd=null,e.isCursorAhead=!1,e.enableCurrentViewDrag=!1,e.isPreventMultiDrag=!1,e.slotsUptoCursor=-1,e.eleTop=0,e.distanceUptoCursor=0,e}return ZO(i,a),i.prototype.wireDragEvent=function(e){new s.sx(e,{abort:"."+kl,clone:!0,isDragScroll:!0,enableTailMode:!!this.parent.eventDragArea,cursorAt:this.parent.eventDragArea?{left:-20,top:-20}:{left:0,top:0},dragArea:this.dragArea,dragStart:this.dragStart.bind(this),drag:this.drag.bind(this),dragStop:this.dragStop.bind(this),enableAutoScroll:!1,helper:this.dragHelper.bind(this),queryPositionInfo:this.dragPosition.bind(this)})},i.prototype.setDragArea=function(){var e=document.querySelector(this.parent.eventDragArea);this.dragArea=this.parent.eventDragArea&&e?e:this.parent.element.querySelector("."+nt)},i.prototype.dragHelper=function(e){var t=this;if(e.sender&&"touchmove"===e.sender.type&&(!this.parent.uiStateValues.isTapHold||!e.element.classList.contains(Ts)))return null;if(this.setDragActionDefaultValues(),this.actionObj.element=e.element,e.sender&&["Day","Week","WorkWeek"].indexOf(this.parent.currentView)>-1){var n=this.parent.eventBase.getPageCoordinates(e.sender);this.distanceUptoCursor=n.clientY-this.actionObj.element.getBoundingClientRect().top,this.eleTop=parseFloat(this.actionObj.element.style.top),this.slotsUptoCursor=-1}this.actionObj.action="drag";var r=[];return!this.parent.allowMultiDrag||(0,s.hX)(this.parent.selectedElements)||0===this.parent.selectedElements.length||this.parent.selectedElements.length>0&&-1===this.parent.selectedElements.indexOf(this.actionObj.element)?r=[e.element]:(r=this.parent.selectedElements,this.isMultiSelect=!0),r.forEach(function(o){var l=t.createCloneElement(o);o.getAttribute("data-guid")===t.actionObj.element.getAttribute("data-guid")&&(t.actionObj.clone=l,!t.parent.eventDragArea&&"Month"!==t.parent.currentView&&t.parent.activeViewOptions.timeScale.enable&&!t.parent.activeView.isTimelineView()&&!t.actionObj.element.classList.contains(wi)&&(0,s.sN)(t.actionObj.clone,{cursor:"move",left:"0%",right:"0%",width:"100%"}),t.actionObj.clone.style.top=(0,s.IV)(t.actionObj.element.offsetTop)),t.actionObj.cloneElement.push(l),t.actionObj.originalElement.push(o)}),this.actionObj.clone},i.prototype.dragPosition=function(e){if(this.parent.eventDragArea)return{left:e.left,top:e.top};var r,t=this.actionObj.cellHeight/this.actionObj.slotInterval*this.actionObj.interval,n=(0,s.IV)(0);"Month"===this.parent.currentView&&(n=e.left),r=this.isStepDragging?Math.ceil(this.actionObj.clone.getBoundingClientRect().right)+this.actionObj.interval:this.actionObj.clone.getBoundingClientRect().right;var h,l=this.parent.element.querySelector("."+we).getBoundingClientRect().right;if(this.parent.activeView.isTimelineView()&&"TimelineYear"!==this.parent.currentView&&!this.parent.enableRtl&&this.actionObj.pageX>r&&!this.isMorePopupOpened&&!(this.actionObj.pageX>l)&&(this.isCursorAhead=!0),this.parent.activeView.isTimelineView()&&(n=(0,s.IV)(this.actionObj.clone.offsetLeft)),this.parent.activeView.isTimelineView()||!this.parent.timeScale.enable||!(0,s.hX)(this.actionObj.clone.offsetParent)&&this.actionObj.clone.offsetParent.classList.contains(ao))h=(0,s.IV)(this.actionObj.clone.offsetTop);else if("Month"===this.parent.currentView)h=(0,s.IV)(0);else if(this.actionObj.clone.classList.contains(wi))h=(0,s.IV)(this.parent.element.querySelector("."+mr).offsetTop),(0,s.sN)(this.actionObj.clone,{width:(0,s.IV)(Math.ceil(this.actionObj.clone.offsetWidth/this.actionObj.cellWidth)*this.actionObj.cellWidth),right:this.parent.enableRtl&&(0,s.IV)(0)});else{this.actionObj.element.classList.contains(wi)&&!this.actionObj.clone.classList.contains(wi)&&(0,s.sN)(this.actionObj.clone,{height:(0,s.IV)(this.actionObj.cellHeight),width:(0,s.IV)(this.actionObj.cellWidth-1),pointerEvents:"none"});var d=parseInt(e.top,10);if(d=d<0?0:d,this.slotsUptoCursor<0){var p=Math.floor((this.eleTop+this.distanceUptoCursor)/t),u=Math.floor(this.eleTop/t);this.slotsUptoCursor=p-u}d=(Math.floor((d+this.distanceUptoCursor+1)/t)-this.slotsUptoCursor)*t,h=(0,s.IV)(d<0?0:d);var f=this.parent.element.querySelector(".e-content-wrap").scrollHeight,m=parseInt(h,10)+this.actionObj.clone.offsetHeight;m>f&&(h=parseInt(h,10)-(m-f)+"px"),this.isPreventMultiDrag&&(h=(0,s.IV)(this.actionObj.clone.offsetTop))}return{left:n,top:h}},i.prototype.setDragActionDefaultValues=function(){this.actionObj.action="drag",this.actionObj.isAllDay=null,this.actionObj.slotInterval=this.parent.activeViewOptions.timeScale.interval/this.parent.activeViewOptions.timeScale.slotCount,this.actionObj.interval=this.actionObj.slotInterval;var e=this.parent.element.querySelector("."+ie);this.actionObj.cellWidth=e.offsetWidth,this.actionObj.cellHeight=e.offsetHeight},i.prototype.dragStart=function(e){var t=this,n=this.actionObj.element.getAttribute("data-guid");this.actionObj.event=this.parent.eventBase.getEventByGuid(n);var r=(0,s.X$)({},this.actionObj.event,null,!0);(0,s.hX)(r)||(this.startTime=r[this.parent.eventFields.startTime].getTime()),this.parent.allowMultiDrag||this.parent.eventBase.removeSelectedAppointmentClass();var o={cancel:!1,data:r,selectedData:this.getSelectedData(),event:e,excludeSelectors:null,element:this.actionObj.element,interval:this.actionObj.interval,navigation:{enable:!1,timeDelay:2e3},scroll:{enable:!0,scrollBy:30,timeDelay:100}};this.parent.trigger("dragStart",o,function(l){if(l.cancel||!(0,s.hX)(t.actionObj.element)&&(0,s.hX)(t.actionObj.element.parentElement)){var h=t.actionObj.element.ej2_instances[0];return(0,s.hX)(h)||h.intDestroy(e.event),t.actionObj.action="",t.removeCloneElementClasses(),void t.removeCloneElement()}t.actionClass("addClass"),t.parent.uiStateValues.action=!0,t.actionObj.start=r[t.parent.eventFields.startTime],t.actionObj.end=r[t.parent.eventFields.endTime],t.actionObj.groupIndex=
1parseInt(t.actionObj.element.getAttribute("data-group-index")||"0",10),t.actionObj.interval=l.interval,t.actionObj.navigation=l.navigation,t.actionObj.scroll=l.scroll,t.enableCurrentViewDrag=o.dragWithinRange&&!o.navigation.enable&&t.parent.allowMultiDrag,t.actionObj.excludeSelectors=l.excludeSelectors;var d=t.parent.element.querySelector("."+we);if(t.scrollArgs={element:d,width:d.scrollWidth,height:d.scrollHeight},t.widthPerMinute=t.actionObj.cellWidth/t.actionObj.slotInterval*t.actionObj.interval,t.heightPerMinute=t.actionObj.cellHeight/t.actionObj.slotInterval*t.actionObj.interval,t.widthUptoCursorPoint=0,t.heightUptoCursorPoint=0,t.cursorPointIndex=-1,t.isHeaderRows=!1,t.isTimelineDayProcess=!1,t.minDiff=0,t.isMorePopupOpened=!1,t.daysVariation=-1,t.isAllDayTarget=t.actionObj.clone.classList.contains(wi),(t.parent.activeView.isTimelineView()||!t.parent.timeScale.enable)&&"TimelineYear"!==t.parent.currentView){!(0,s.hX)(t.actionObj.clone.offsetParent)&&t.actionObj.clone.offsetParent.classList.contains(ao)&&(t.isMorePopupOpened=!0),t.actionObj.pageX=e.event.pageX;var p=t.parent.activeViewOptions.headerRows;t.isHeaderRows=p.length>0&&"Hour"!==p[p.length-1].option&&"Date"!==p[p.length-1].option,t.isTimelineDayProcess=!t.parent.activeViewOptions.timeScale.enable||t.isHeaderRows||"TimelineMonth"===t.parent.currentView||p.length>0&&"Date"===p[p.length-1].option,t.isAllDayDrag=!t.isTimelineDayProcess&&r[t.parent.eventFields.isAllDay],t.isStepDragging=!t.isTimelineDayProcess&&!t.isAllDayDrag&&t.actionObj.slotInterval!==t.actionObj.interval,t.timelineEventModule=new Ca(t.parent,t.isTimelineDayProcess?"day":"hour")}"TimelineYear"===t.parent.currentView&&(t.yearEvent=new hS(t.parent)),"Month"===t.parent.currentView&&(t.startTime=k(new Date(t.startTime)).getTime(),t.updateOriginalElement(t.actionObj.clone),t.monthEvent=new Sa(t.parent)),("Day"===t.parent.currentView||"Week"===t.parent.currentView||"WorkWeek"===t.parent.currentView)&&(t.verticalEvent=new em(t.parent),t.verticalEvent.initializeValues(),t.splitEvent(t.actionObj.event).forEach(function(f){var m='.e-day-wrapper[data-date="'+k(f[t.parent.eventFields.startTime]).getTime()+'"]';t.parent.activeViewOptions.group.resources.length>0&&(m=m.concat('[data-group-index = "'+t.actionObj.groupIndex+'"]'));var g=t.parent.element.querySelector(m);if(g){var v=g.querySelector('[data-id="'+t.actionObj.clone.getAttribute("data-id")+'"]');v&&(0,s.iQ)([v],yr)}}))})},i.prototype.getSelectedData=function(){if(this.isMultiSelect&&0===this.multiData.length&&this.parent.selectedElements.length>0)for(var e=0,t=this.parent.selectedElements;e<t.length;e++){var r=t[e].getAttribute("data-guid"),o=this.parent.eventBase.getEventByGuid(r);this.multiData.push((0,s.X$)({},o,null,!0))}return this.multiData},i.prototype.drag=function(e){if(e.event&&"touchmove"===e.event.type&&e.event.preventDefault(),this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(!0),(0,s.hX)(e.target)||!e.target.classList||!e.target.classList.contains(Gr)){var t=(0,s.X$)({},this.actionObj.event,null,!0),n=this.parent.eventBase.getPageCoordinates(e);if(this.actionObj.Y=this.actionObj.pageY=n.pageY,this.actionObj.X=this.actionObj.pageX=n.pageX,this.actionObj.target=e.target,this.widthUptoCursorPoint=0===this.widthUptoCursorPoint?Math.ceil(Math.abs(this.actionObj.clone.getBoundingClientRect().left-this.actionObj.X)/this.widthPerMinute)*this.widthPerMinute:this.widthUptoCursorPoint,this.widthUptoCursorPoint=this.isMorePopupOpened?this.actionObj.cellWidth:this.widthUptoCursorPoint,this.heightUptoCursorPoint=0===this.heightUptoCursorPoint?Math.ceil(Math.abs(this.actionObj.clone.getBoundingClientRect().top-this.actionObj.Y)/this.heightPerMinute)*this.heightPerMinute:this.heightUptoCursorPoint,["Day","Week","WorkWeek"].indexOf(this.parent.currentView)>-1&&(this.isAllDayDrag=this.parent.activeViewOptions.timeScale.enable?this.actionObj.clone.classList.contains(wi):this.actionObj.event[this.parent.eventFields.isAllDay]),this.isStepDragging&&0===this.minDiff&&this.calculateMinutesDiff(t),("Month"===this.parent.currentView||this.isAllDayDrag)&&this.daysVariation<0){var r=this.parent.getDateFromElement(this.actionObj.target);if((0,s.hX)(r))this.daysVariation=0;else{var o=k(r),l=k(new Date(t[this.parent.eventFields.startTime].getTime()));this.daysVariation=(o.getTime()-l.getTime())/bt}}else this.daysVariation=0;if(this.parent.eventDragArea){var h=n.target;this.actionObj.clone.style.top=(0,s.IV)(h.offsetTop),this.actionObj.clone.style.left=(0,s.IV)(h.offsetLeft),(0,s.kp)(h,"."+jh)?"Week"===this.parent.currentView||"WorkWee
1k"===this.parent.currentView||"Day"===this.parent.currentView||(this.actionObj.clone.style.width=(0,s.IV)(this.actionObj.element.offsetWidth)):(this.actionObj.clone.style.height="",this.actionObj.clone.style.width="")}this.updateScrollPosition(e),this.updateNavigatingPosition(e),this.updateDraggingDateTime(e);var p={data:t,event:e,element:this.actionObj.element,startTime:this.actionObj.start,endTime:this.actionObj.end,selectedData:this.updatedData};this.parent.group.resources.length>0&&(p.groupIndex=this.actionObj.groupIndex),this.parent.trigger("drag",p)}},i.prototype.calculateMinutesDiff=function(e){this.minDiff=this.parent.enableRtl?(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint)/this.widthPerMinute*this.actionObj.interval:this.widthUptoCursorPoint/this.widthPerMinute*this.actionObj.interval;var t=e[this.parent.eventFields.startTime],r=Vi(this.parent.activeView.renderDates[0],this.parent.activeView.getStartHour(),this.parent.activeView.getEndHour());r.startHour.getTime()>t.getTime()&&(this.minDiff=this.minDiff+(r.startHour.getTime()-t.getTime())/wt)},i.prototype.dragStop=function(e){var t=this;if(this.isCursorAhead=!1,this.isPreventMultiDrag=!1,this.removeCloneElementClasses(),this.removeCloneElement(),clearInterval(this.actionObj.navigationInterval),this.actionObj.navigationInterval=null,clearInterval(this.actionObj.scrollInterval),this.actionObj.scrollInterval=null,this.actionClass("removeClass"),this.parent.uiStateValues.action=this.parent.uiStateValues.isTapHold=!1,!this.isAllowDrop(e)){var n=e.target.classList&&!e.target.classList.contains("e-work-cells")&&this.parent.cellTemplate?(0,s.kp)(e.target,".e-work-cells"):e.target,r={cancel:!1,data:this.getChangedData(this.updatedData),selectedData:this.updatedData,event:e,element:this.actionObj.element,target:n};this.actionObj.action=null,this.parent.trigger("dragStop",r,function(o){if(!o.cancel&&!t.parent.eventBase.checkOverlap(o.data)){if(t.parent.isSpecificResourceEvents()){t.parent.crudModule.crudObj.isCrudAction=!0,t.parent.crudModule.crudObj.sourceEvent=[t.parent.resourceBase.lastResourceLevel[parseInt(r.element.getAttribute("data-group-index"),10)]];var l=parseInt(r.target.getAttribute("data-group-index"),10)||t.actionObj.groupIndex;t.parent.crudModule.crudObj.targetEvent=[t.parent.resourceBase.lastResourceLevel[parseInt(l.toString(),10)]]}t.saveChangedData(o,t.isMultiSelect)}}),this.updatedData=[],this.multiData=[],this.isMultiSelect=!1,this.parent.selectedElements=[]}},i.prototype.updateNavigatingPosition=function(e){var t=this;if(this.actionObj.navigation.enable){var n=this.parent.getCurrentTime();(0,s.hX)(this.actionObj.navigationInterval)&&(this.actionObj.navigationInterval=window.setInterval(function(){if(n){var o=t.parent.getCurrentTime().getSeconds(),l=n.getSeconds()+t.actionObj.navigation.timeDelay/1e3;(l=l>=60?l-60:l)===o&&(n=t.parent.getCurrentTime(),t.viewNavigation(e),t.updateDraggingDateTime(e))}},this.actionObj.navigation.timeDelay))}},i.prototype.updateDraggingDateTime=function(e){!(0,s.hX)(this.actionObj.clone.offsetParent)&&this.actionObj.clone.offsetParent.classList.contains(ao)?this.morePopupEventDragging(e):this.parent.activeView.isTimelineView()&&"TimelineYear"!==this.parent.currentView?(this.timelineEventModule.dateRender=this.parent.activeView.renderDates,this.timelineEventModule.cellWidth=this.actionObj.cellWidth,this.timelineEventModule.getSlotDates(),this.actionObj.cellWidth=this.isHeaderRows?this.timelineEventModule.cellWidth:this.parent.getElementWidth(this.parent.element.querySelector("."+ie)),this.calculateTimelineTime(e)):"Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView?this.calculateVerticalDate(e):this.calculateVerticalTime(e)},i.prototype.navigationWrapper=function(){if(this.parent.activeView.isTimelineView()){var p=void 0;if(p=this.parent.activeViewOptions.group.resources.length>0?this.parent.element.querySelectorAll(".e-appointment-container:not(.e-hidden)").item(this.actionObj.index):this.parent.element.querySelector("."+mn),!(0,s.hX)(p)){var u=p.querySelector("."+Ct);u||(u=(0,s.n)("div",{className:Ct}),p.appendChild(u)),this.actionObj.cloneElement.forEach(function(f){u.appendChild(f)})}}else if("Month"!==this.parent.currentView&&this.parent.timeScale.enable){var n=this.actionObj.clone.classList.contains(wi)?"."+gn:"."+Ct;if(this.parent.element.querySelectorAll(n).item(this.actionObj.index).appendChild(this.actionObj.clone),n==="."+gn){var r=this.getAllDayEventHeight(),o=[].slice.call(this.parent.element.querySelectorAll("."+it+":first-child"));if(o[0].offsetHeight<r)for(var l=0,h=o;l<h.length;l++)h[l].style.height=(r+2)/12+"em";this.actionObj.clone.style.height=(0,s.IV)(r)}this.actionObj.height=parseInt(this.actionObj.clone.style.height,10)}else{var e=[].slice.call(this.parent.element.querySelectorAll("."+ie));this.actionObj.index=this.parent.activeView.renderDates.length<this.actionObj.index?this.parent.activeView.renderDates.length-1:this.actionObj.index;var t=e[this.actionObj.index].querySelector("."+Ct);t||(t=(0,s.n)("div",{className:Ct}),e[this.actionObj.index].appendChild(t)),t.appendChild(this.actionObj.clone)}},i.prototype.viewNavigation=function(e){var t,n=this.parent.element.querySelector("."+we);n&&(!this.scrollEdges.top&&!this.scrollEdges.bottom||(0,s.kp)(this.actionObj.clone,"."+gn))&&(0===n.scrollLeft&&Math.round(this.actionObj.X)<=Math.round(n.getBoundingClientRect().left+this.actionObj.cellWidth+window.pageXOffset)?t=this.parent.enableRtl?"Next":"Previous":Math.round(n.scrollLeft)+n.clientWidth===n.scrollWidth&&Math.round(this.actionObj.X)>=Math.round(n.getBoundingClientRect().right-this.actionObj.cellWidth+window.pageXOffset)&&(t=this.parent.enableRtl?"Previous":"Next"),t&&this.parent.changeDate(this.parent.activeView.getNextPreviousDate(t)))},i.prototype.morePopupEventDragging=function(e){if(!((0,s.hX)(e.target)||e.target&&(0,s.hX)((0,s.kp)(e.target,"td")))){var t=(0,s.X$)({},this.actionObj.event,null,!0),n=t[this.parent.eventFields.endTime].getTime()-t[this.parent.eventFields.startTime].getTime(),r=(0,s.kp)(e.target,"td");if("TimelineYear"!==this.parent.currentView||r.classList.contains(ie)&&!r.classList.contains(pt)){var o=this.parent.getDateFromElement(r),l=new Date(o.getTime());l.setMilliseconds(n),this.parent.activeViewOptions.group.resources.length>
10&&(this.actionObj.groupIndex=parseInt(r.getAttribute("data-group-index"),10)),this.actionObj.start=new Date(o.getTime()),this.actionObj.end=new Date(l.getTime()),this.actionObj.clone.style.top=(0,s.IV)(r.offsetParent.offsetTop),this.actionObj.clone.style.left=(0,s.IV)(r.offsetLeft),this.actionObj.clone.style.width=(0,s.IV)(r.offsetWidth);var d,h=r;if(this.parent.activeView.isTimelineView()){var p=(0,s.kp)(r,"tr").rowIndex;h=this.parent.element.querySelectorAll(".e-appointment-container").item(p)}(d=h.querySelector("."+Ct))||(d=(0,s.n)("div",{className:Ct}),h.appendChild(d)),this.appendCloneElement(d)}}},i.prototype.calculateVerticalTime=function(e){var t=this;if(!((0,s.hX)(this.actionObj.target)||this.actionObj.target&&(0,s.hX)((0,s.kp)(this.actionObj.target,"tr")))&&((0,s.hX)((0,s.kp)(this.actionObj.target,"td"))||(0,s.kp)(this.actionObj.target,"td").classList.contains(ie)||(0,s.kp)(this.actionObj.target,"td").classList.contains(it))){this.parent.activeViewOptions.timeScale.enable&&this.swapDragging(e);var n=this.parent.element.querySelector("."+we),r=(0,s.X$)({},this.actionObj.event,null,!0),o=r[this.parent.eventFields.startTime],h=Bt(r[this.parent.eventFields.endTime])-Bt(o),d=Math.floor(parseInt(this.actionObj.clone.style.top,10)/this.actionObj.cellHeight)*this.actionObj.cellHeight;d=d<0?0:d,(this.scrollEdges.top||this.scrollEdges.bottom)&&(d=this.scrollEdges.top?n.scrollTop-this.heightUptoCursorPoint+this.actionObj.cellHeight+window.pageYOffset:n.scrollTop+n.offsetHeight-this.actionObj.clone.offsetHeight+window.pageYOffset+(this.actionObj.clone.offsetHeight-this.heightUptoCursorPoint),d=Math.round(d/this.actionObj.cellHeight)*this.actionObj.cellHeight,n.scrollTop>0&&d<n.scrollHeight&&(this.actionObj.clone.style.top=(0,s.IV)(d)));var m,v,p=this.parent.activeViewOptions.timeScale.enable?d/this.actionObj.cellHeight:0,u=this.actionObj.cellHeight/this.actionObj.slotInterval,f=parseInt(this.actionObj.clone.style.top,10)-d;m=this.isAllDayDrag?this.parent.element.querySelector("."+mr):[].slice.call(this.parent.getContentTable().querySelectorAll("tr"))[parseInt(p.toString(),10)],!(0,s.hX)((0,s.kp)(this.actionObj.target,"td"))&&((0,s.kp)(this.actionObj.target,"td").classList.contains(ie)||(0,s.kp)(this.actionObj.target,"td").classList.contains(it))&&(v=(0,s.kp)(this.actionObj.target,"td").cellIndex);var b=(0,s.hX)(v)?(0,s.kp)(this.actionObj.clone,"td").cellIndex:v;if(this.actionObj.index=b,!(0,s.hX)(m)){var S,E,y=m.children[parseInt(b.toString(),10)];this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(this.actionObj.groupIndex=parseInt(y.getAttribute("data-group-index"),10)),this.parent.activeViewOptions.timeScale.enable&&!this.isAllDayDrag?((!this.enableCurrentViewDrag||0===this.multiData.length)&&this.appendCloneElement(this.getEventWrapper(b)),(S=this.parent.getDateFromElement(y)).setMinutes(S.getMinutes()+f/u),E=new Date(S.getTime()),this.actionObj.element.classList.contains(wi)?E.setMinutes(E.getMinutes()+this.actionObj.slotInterval):E.setMilliseconds(h)):((S=this.parent.getDateFromElement(y)).setDate(S.getDate()-this.daysVariation),S.setHours(o.getHours(),o.getMinutes(),o.getSeconds()),(E=new Date(S.getTime())).setMilliseconds(h),!this.actionObj.element.classList.contains(wi)&&this.actionObj.clone.classList.contains(wi)&&(E=K(k(E),1)),this.updateAllDayEvents(S,E,this.parent.activeViewOptions.group.byDate||this.parent.virtualScrollModule&&!this.parent.activeViewOptions.timeScale.enable?b:void 0)),this.actionObj.start=new Date(+S),this.actionObj.end=new Date(+E);for(var T=this.getUpdatedEvent(this.actionObj.start,this.actionObj.end,this.actionObj.event),w=0,A=[].slice.call(this.parent.element.querySelectorAll(".e-dynamic-clone"));w<A.length;w++)(0,s.TF)(M=A[w]);if(this.multiData.length>0){if(this.isAllDayTarget&&this.isAllDayDrag&&!(0,s.hX)(this.actionObj.isAllDay)&&!this.actionObj.isAllDay){var D=parseInt((0,s.kp)(this.actionObj.target,"td").getAttribute("data-date"),10);this.multiData.forEach(function(Ne){if(t.swagData.push((0,s.X$)({},Ne,null,!0)),Ne[t.parent.eventFields.isAllDay]){Ne[t.parent.eventFields.startTime]=new Date(Ne[t.parent.eventFields.startTime].getTime()+(D-t.startTime));var de=new Date(Ne[t.parent.eventFields.startTime]),At=new Date(de.setMinutes(de.getMinutes()+t.actionObj.slotInterval));Ne[t.parent.eventFields.endTime]=At,Ne[t.parent.eventFields.isAllDay]=!1}}),this.startTime=D}if(this.isAllDayTarget&&this.isAllDayDrag&&!(0,s.hX)(this.actionObj.isAllDay)&&this.actionObj.isAllDay&&this.swagData.length>0){this.multiData=this.swagData,this.swagData=[];var L=(0,s.X$)({},this.actionObj.event,null,!0);this.startTime=L[this.parent.eventFields.startTime].getTime()}var V=T[this.parent.eventFields.startTime].getTime()-this.startTime;if(this.enableCurrentViewDrag)for(var G=this.getRenderedDates(),W=0;W<this.multiData.length;W++){var te=(0,s.X$)({},this.multiData[parseInt(W.toString(),10)],null,!0),$=new Date(te[this.parent.eventFields.startTime].getTime()+V);if((Se=this.parent.getIndexOfDate(G,k($)))<0){this.isPreventMultiDrag=!0;break}this.isPreventMultiDrag=!1}if(!this.isPreventMultiDrag)for(var Ie=0;Ie<this.multiData.length;Ie++){var Se;if(this.updatedData[parseInt(Ie.toString(),10)]=this.updateMultipleData(this.multiData[parseInt(Ie.toString(),10)],V),(Se=this.getDayIndex(this.updatedData[parseInt(Ie.toString(),10)]))>=0){var Re=this.updatedData[parseInt(Ie.toString(),10)][this.parent.eventFields.isAllDay],M=this.getEventWrapper(Se,Re);this.appendCloneElement(M,this.actionObj.cloneElement[parseInt(Ie.toString(),10)]),this.updateEventHeight(this.updatedData[parseInt(Ie.toString(),10)],Ie,Se)}else(0,s.hX)(this.actionObj.cloneElement[parseInt(Ie.toString(),10)].parentNode)||(0,s.TF)(this.actionObj.cloneElement[parseInt(Ie.toString(),10)])}}else this.updateEventHeight(T);this.updateTimePosition(this.actionObj.start,this.updatedData)}}},i.prototype.splitEvent=function(e){var t=this.parent.eventFields,n=[],r=e[t.startTime],o=e[t.endTime];if(k(new Date(r.getTime()))<k(new Date(o.getTime()))){for(var l=k(new Date(r.getTime())),h=new Date(l.getTime()),d=0;l<new Date(o.getTime());d++){h=new Date(h.setDate(l.getDate()+1));var p=(0,s.X$)({},e,null,!0);p[t.startTime]=new Date(l),p[t.endTime]=new Date(h),l=new Date(l.setDate(l.getDate()+1)),n.push(p)}var u=n.length-1;n[0][t.startTime]=r,n[parseInt(u.toString(),10)][t.endTime]=o}else n.push(e);return n},i.prototype.updateMultipleData=function(e,t){var n=(0,s.X$)({},e,null,!0);!(0,s.hX)(this.actionObj.isAllDay)&&this.parent.activeViewOptions.timeScale.enable&&(this.isAllDayTarget&&n[this.parent.eventFields.isAllDay]||!this.isAllDayTarget&&!n[this.parent.eventFields.isAllDay])&&(n[this.parent.eventFields.isAllDay]=this.actionObj.isAllDay);var r=n[this.parent.eventFields.endTime].getTime()-n[this.parent.eventFields.startTime].getTime();if(n[this.parent.eventFields.isAllDay]){var o=Math.ceil(t/864e5),l=Math.ceil(r/864e5),h=new Date(n[this.parent.eventFields.startTime]);n[this.parent.eventFields.startTime]=k(new Date(h.setDate(h.getDate()+o))),n[this.parent.eventFields.endTime]=K(n[this.parent.eventFields.startTime],l)}else n[this.parent.eventFields.startTime]=new Date(n[this.parent.eventFields.startTime].getTime()+t),n[this.parent.eventFields.endTime]=new Date(n[this.parent.eventFields.startTime].getTime()+r);return n},i.prototype.getDayIndex=function(e){var t=(0,s.X$)({},e,null,!0),n=k(t[this.parent.eventFields.startTime]);if(this.parent.activeViewOptions.timeScale.enable&&!t[this.parent.eventFields.isAllDay]){var r=this.parent.activeView.getStartHour();n.setMilliseconds(r.getTime()-k(r).getTime())}var o=n.getTime(),l="";return l="."+(this.parent.activeViewOptions.timeScale.enable&&t[this.parent.eventFields.isAllDay]?gn:ie)+'[data-date="'+o+'"]',this.parent.activeViewOptions.group.resources.length>0&&(l=l+'[data-group-index="'+this.actionObj.groupIndex+'"]'),this.targetTd=this.parent.element.querySelector(l),(0,s.hX)(this.targetTd)?-1:this.targetTd.cellIndex},i.prototype.updateEventHeight=function(e,t,n){this.verticalEvent.initializeValues();var r=this.verticalEvent.getStartCount();if(!this.parent.uiStateValues.isGroupAdaptive)for(var o=0;o<this.actionObj.groupIndex;o++)this.verticalEvent.dateRender[parseInt(o.toString(),10)]&&(r+=this.verticalEvent.dateRender[parseInt(o.toString(),10)].length);var l=this.parent.uiStateValues.isGroupAdaptive?r:this.actionObj.groupIndex;if(this.parent.activeViewOptions.group.byDate&&!(0,s.hX)(this.parent.getDateFromElement(this.actionObj.target))||!this.parent.activeViewOptions.group.byDate){var d=-1,p=this.parent.activeViewOptions.group.byDate?this.parent.getIndexOfDate(this.verticalEvent.dateRender[parseInt(l.toString(),10)],k(this.parent.getDateFromElement((0,s.hX)(t)?this.actionObj.target:this.targetTd))):(0,s.hX)(t)?this.actionObj.index-r:n-r,u=this.splitEvent(e),f=this.parent.eventBase.isAllDayAppointment(e)||u.length>2||"TimeSlot"!==this.parent.eventSettings.spannedEventPlacement?[e]:u;for(o=0;o<f.length;o++){if(o>0){var m='.e-day-wrapper[data-date="'+k(f[parseInt(o.toString(),10)][this.parent.eventFields.startTime]).getTime()+'"]';this.parent.activeViewOptions.group.resources.length>0&&(m=m.concat('[data-group-index = "'+this.actionObj.groupIndex+'"]'));var g=this.parent.element.querySelector(m);g?(p+=1,d=g.cellIndex):p=-1}if(p>=0){var v=this.verticalEvent.isSpannedEvent(f[parseInt(o.toString(),10)],p,l),b=v[this.verticalEvent.fields.startTime],S=this.parent.activeViewOptions.timeScale.enable?this.verticalEvent.getHeight(b,v[this.verticalEvent.fields.endTime]):this.actionObj.element.offsetHeight,E=this.parent.activeViewOptions.timeScale.enable?this.verticalEvent.getTopValue(b):this.actionObj.element.offsetTop;if((0,s.hX)(t))0===o?(this.actionObj.clone.style.top=(0,s.IV)(E),this.actionObj.clone.style.height=(0,s.IV)(S)):this.renderSpannedEvents(v,d,E,S);else{var _=this.actionObj.cellWidth;if(e[this.parent.eventFields.isAllDay]){E=this.parent.element.querySelector("."+mr).offsetTop,S=this.getAllDayEventHeight();var T=e[this.parent.eventFields.endTime].getTime()-e[this.parent.eventFields.startTime].getTime(),I=Math.ceil(T/864e5);I>=0&&(_=I*this.actionObj.cellWidth)}this.actionObj.cloneElement[parseInt(t.toString(),10)]&&(0===o?(this.actionObj.cloneElement[parseInt(t.toString(),10)].style.top=(0,s.IV)(E),this.actionObj.cloneElement[parseInt(t.toString(),10)].style.height=(0,s.IV)(S),this.actionObj.cloneElement[parseInt(t.toString(),10)].style.width=(0,s.IV)(_),this.actionObj.cloneElement[parseInt(t.toString(),10)].style.left=(0,s.IV)(0)):this.renderSpannedEvents(v,d,E,S))}}}}},i.prototype.renderSpannedEvents=function(e,t,n,r){if(e[this.parent.eventFields.startTime].getTime()!==e[this.parent.eventFields.endTime].getTime()){var h=this.verticalEvent.createAppointmentElement(e,!1,e.isSpanned,this.actionObj.groupIndex);(0,s.iQ)([h],[Is,"e-dynamic-clone"]),(0,s.sN)(h,{width:"100%",height:r+"px",to
1p:n+"px",border:"0px"}),[].slice.call(this.parent.element.querySelectorAll("."+Ct))[parseInt(t.toString(),10)].appendChild(h)}},i.prototype.getRenderedDates=function(){var t,n,e=this,r=this.parent.activeView.renderDates;if((t=this.parent.eventBase.slots).push.apply(t,this.parent.activeView.renderDates.map(function(l){return+l})),this.parent.activeViewOptions.group.resources.length>0){this.parent.eventBase.slots=[];var o=this.parent.resourceBase.lastResourceLevel.filter(function(l){return l.groupIndex===e.actionObj.groupIndex});(n=this.parent.eventBase.slots).push.apply(n,(r=o[0].renderDates).map(function(l){return+l}))}return r},i.prototype.updateAllDayEvents=function(e,t,n){this.parent.eventBase.slots=[];var r=this.getUpdatedEvent(e,t,this.actionObj.event),o=this.getRenderedDates(),l=this.parent.eventBase.splitEvent(r,o),h='.e-all-day-cells[data-date="'+l[0][this.parent.eventFields.startTime].getTime()+'"]';this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(h=h.concat('[data-group-index = "'+this.actionObj.groupIndex+'"]'));var d=[].slice.call(this.parent.element.querySelectorAll(h));if(d.length>0||!(0,s.hX)(n)){var p=(0,s.hX)(n)?d[0].cellIndex:n;this.appendCloneElement(this.getEventWrapper(p)),this.actionObj.clone.style.width=(0,s.IV)(l[0].data.count*this.actionObj.cellWidth)}},i.prototype.swapDragging=function(e){if(!this.isPreventMultiDrag){var t=!(0,s.hX)((0,s.kp)(this.actionObj.target,"td"))&&(0,s.kp)(this.actionObj.target,"td").cellIndex;if((0,s.kp)(this.actionObj.target,"."+bi)&&!(0,s.kp)(this.actionObj.clone,"."+gn)){(0,s.iQ)([this.actionObj.clone],wi),this.appendCloneElement(this.getEventWrapper(t)),this.actionObj.isAllDay=!0;var n=this.getAllDayEventHeight(),r=[].slice.call(this.parent.element.querySelectorAll("."+it+":first-child"));if(r[0].offsetHeight<n)for(var o=0,l=r;o<l.length;o++)l[o].style.height=(n+2)/12+"em";(0,s.sN)(this.actionObj.clone,{width:(0,s.IV)(this.actionObj.cellWidth),height:(0,s.IV)(n),top:(0,s.IV)(this.parent.element.querySelector("."+mr).offsetTop)})}if((0,s.kp)(this.actionObj.target,"."+ie)&&!(0,s.kp)(this.actionObj.clone,"."+$h)){(0,s.vy)([this.actionObj.clone],wi),this.appendCloneElement(this.getEventWrapper(t)),this.actionObj.isAllDay=!1;var d=0===this.actionObj.element.offsetHeight?this.actionObj.height:this.actionObj.element.offsetHeight;(0,s.sN)(this.actionObj.clone,{left:(0,s.IV)(0),height:(0,s.IV)(d),width:(0,s.IV)(this.actionObj.cellWidth)})}}},i.prototype.calculateVerticalDate=function(e){if(!((0,s.hX)(e.target)||e.target&&(0,s.hX)((0,s.kp)(e.target,"tr"))||e.target&&"DIV"===e.target.tagName)){var t=(0,s.X$)({},this.actionObj.event,null,!0);(0,s.hX)(this.parent.eventDragArea)&&this.removeCloneElement();var n=Bt(t[this.parent.eventFields.endTime])-Bt(t[this.parent.eventFields.startTime]),r=(0,s.kp)(this.actionObj.target,"td");if(!(0,s.hX)(r)){var o=r.parentElement;this.actionObj.index=o.rowIndex*o.children.length+r.cellIndex;var l=[].slice.call(this.parent.element.querySelectorAll("."+ie)),h=this.parent.getDateFromElement(r=l[this.actionObj.index]);if(!(0,s.hX)(h)){this.parent.activeViewOptions.group.resources.length>0&&(this.actionObj.groupIndex=parseInt(r.getAttribute("data-group-index"),10));var d=new Date(h.setDate(h.getDate()-this.daysVariation)),p=new Date(d.getTime()),u=Bt(t[this.parent.eventFields.startTime])-Bt(k(new Date(+t[this.parent.eventFields.startTime])));p.setMilliseconds(u);var f=new Date(p.getTime());f.setMilliseconds(n),this.actionObj.start=new Date(p.getTime()),this.actionObj.end=new Date(f.getTime())}}var m=this.getUpdatedEvent(this.actionObj.start,this.actionObj.end,this.actionObj.event);if((0,s.hX)(this.parent.eventDragArea))for(var v=0,b=[].slice.call(this.parent.element.querySelectorAll("."+Is));v<b.length;v++)(0,s.TF)(b[v]);if(this.multiData&&this.multiData.length>0){var S=k(new Date(m[this.parent.eventFields.startTime]));u=S.getTime()-this.startTime,"TimelineYear"===this.parent.currentView&&this.parent.group.resources.length>0&&(u=12*(S.getFullYear()-new Date(this.startTime).getFullYear()),u-=new Date(this.startTime).getMonth(),u+=S.getMonth());for(var E=0;E<this.multiData.length;E++)this.updatedData[parseInt(E.toString(),10)]=this.updateMultipleVerticalDate(this.multiData[parseInt(E.toString(),10)],u),"TimelineYear"===this.parent.currentView?this.dynamicYearlyEventsRendering(this.updatedData[parseInt(E.toString(),10)]):this.dynamicEventsRendering(this.updatedData[parseInt(E.toString(),10)])}else"TimelineYear"===this.parent.currentView?this.dynamicYearlyEventsRendering(m):this.dynamicEventsRendering(m)}},i.prototype.updateMultipleVerticalDate=function(e,t){var n=(0,s.X$)({},e,null,!0),r=n[this.parent.eventFields.endTime].getTime()-n[this.parent.eventFields.startTime].getTime(),o=new Date(n[this.parent.eventFields.startTime]);if("TimelineYear"===this.parent.currentView&&this.parent.group.resources.length>0)n[this.parent.eventFields.startTime]=new Date(o.setMonth(o.getMonth()+t));else{var l=Math.ceil(t/bt);n[this.parent.eventFields.startTime]=new Date(o.setDate(o.getDate()+l))}return n[this.parent.eventFields.endTime]=new Date(n[this.parent.eventFields.startTime].getTime()+r),n},i.prototype.calculateTimelineTime=function(e){var o,t=(0,s.X$)({}
1,this.actionObj.event,null,!0),n=Bt(t[this.parent.eventFields.endTime])-Bt(t[this.parent.eventFields.startTime]),r=this.parent.enableRtl?Math.abs(this.actionObj.clone.offsetLeft)-this.actionObj.clone.offsetWidth:parseInt(this.actionObj.clone.style.left,10);r=Math.round(r/this.actionObj.cellWidth)*this.actionObj.cellWidth,this.parent.enableRtl&&(o=Math.abs(parseInt(this.actionObj.clone.style.right,10)),this.actionObj.clone.style.right=(0,s.IV)(o)),r=this.getOffsetValue(r,o);var l=this.getColumnIndex(r),h=this.parent.element.querySelector("."+we),d=h.getBoundingClientRect().right,p=this.parent.activeView.isTimelineView()&&!this.parent.enableRtl&&this.actionObj.pageX>this.actionObj.clone.getBoundingClientRect().right&&!this.isMorePopupOpened&&!(this.actionObj.pageX>d),u=this.parent.eventDragArea?h.scrollLeft-h.offsetLeft:0;(this.isCursorAhead||p)&&!this.isStepDragging&&(this.isCursorAhead=!0);var f=Math.floor((this.actionObj.pageX-this.actionObj.clone.getBoundingClientRect().left+u)/this.actionObj.cellWidth);this.parent.enableRtl&&(f=Math.abs(Math.floor((this.actionObj.pageX-this.actionObj.clone.getBoundingClientRect().right)/this.actionObj.cellWidth))-1),this.cursorPointIndex<0&&this.cursorIndex(e,t,r,f);var m=this.parent.getContentTable().querySelector("tr"),g=this.getCursorCurrentIndex(l,f,m);g=g<0?0:g;var v=this.isHeaderRows?new Date(this.timelineEventModule.dateRender[parseInt(g.toString(),10)].getTime()):this.parent.getDateFromElement(m.children[parseInt(g.toString(),10)]);if(v=this.isAllDayDrag?k(v):v,this.isStepDragging){var b=this.getWidthDiff(m,g);if(0!==b){var y=Math.ceil(b/this.widthPerMinute);if(v.setMinutes(v.getMinutes()+y*this.actionObj.interval),this.isCursorAhead||p)v.setMilliseconds(-n);else{v.setMinutes(v.getMinutes()-this.minDiff);var S=this.actionObj.interval*wt;y=Math.abs(v.getTime()-this.actionObj.start.getTime())/S;var E=Math.trunc(y);E!==y&&(y=E*S*(v>this.actionObj.start?1:-1),v=new Date(this.actionObj.start.getTime()+y))}}else v=this.actionObj.start}else if(!this.isCursorAhead&&!p||this.isAllDayDrag)v.setMinutes(v.getMinutes()-this.cursorPointIndex*(this.isTimelineDayProcess||this.isAllDayDrag?1440:this.actionObj.slotInterval));else{var _=this.isTimelineDayProcess||this.isAllDayDrag?1440:this.actionObj.slotInterval;v.setMinutes(v.getMinutes()+_),v.setMilliseconds(-n),v.getTime()===k(v).getTime()&&0===v.getMinutes()&&0===n&&v.setMinutes(-_)}if(this.isStepDragging||(v=this.calculateIntervalTime(v)),(this.isTimelineDayProcess||this.isAllDayDrag)&&v.setHours((T=t[this.parent.eventFields.startTime]).getHours(),T.getMinutes(),T.getSeconds()),this.parent.eventDragArea){var I=this.parent.getDateFromElement(e.target);if(!(0,s.hX)(I))if(this.parent.activeViewOptions.timeScale.enable&&"TimelineMonth"!==this.parent.currentView)v=I;else{var T=t[this.parent.eventFields.startTime];v=new Date(I.setHours(T.getHours(),T.getMinutes(),T.getSeconds()))}}var w=new Date(v.getTime());w.setMilliseconds(n);var A=[this.getUpdatedEvent(v,w,this.actionObj.event)];if(this.multiData.length>0){for(var M=A[0][this.parent.eventFields.startTime].getTime()-this.startTime,D=0;D<this.multiData.length;D++)this.updatedData[parseInt(D.toString(),10)]=this.updateMultipleData(this.multiData[parseInt(D.toString(),10)],M);A=this.updatedData}for(var L=0;L<A.length;L++){var V=this.multiData.length>0?this.actionObj.cloneElement[parseInt(L.toString(),10)]:this.actionObj.clone;if((0,s.hX)(this.parent.eventDragArea)){var G=this.timelineEventModule.splitEvent(A[parseInt(L.toString(),10)],this.timelineEventModule.dateRender),W=G[0].data,te=this.timelineEventModule.getStartTime(G[0],W),$=this.timelineEventModule.getEndTime(G[0],W),Se=this.timelineEventModule.getEventWidth(te,$,t[this.parent.eventFields.isAllDay],W.count),Ie=this.parent.getIndexOfDate(this.timelineEventModule.dateRender,k(new Date(te.getTime()))),Re=this.timelineEventModule.getPosition(te,$,t[this.parent.eventFields.isAllDay],Ie=Ie<0?0:Ie);this.parent.enableRtl?V.style.right=(0,s.IV)(Re):V.style.left=(0,s.IV)(Re),this.isMorePopupOpened||(V.style.width=(0,s.IV)(Se))}this.parent.activeViewOptions.group.resources.length>0&&this.calculateResourceGroupingPosition(e,V),this.actionObj.start=new Date(v.getTime()),this.actionObj.end=new Date(w.getTime()),this.updateTimePosition(this.actionObj.start,this.updatedData)}},i.prototype.getOffsetValue=function(e,t){if(this.scrollEdges.left||this.scrollEdges.right){var n=this.parent.element.querySelector("."+we);this.parent.enableRtl?(t=n.offsetWidth-n.scrollLeft,this.scrollEdges.right?t=t-n.offsetWidth+this.actionObj.clone.offsetWidth-(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint):(t+=this.widthUptoCursorPoint)-this.widthUptoCursorPoint>=n.scrollWidth&&(this.actionObj.clone.style.width=(0,s.IV)(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint+this.actionObj.cellWidth),t=n.scrollLeft-n.scrollWidth),(0,s.hX)(this.parent.eventDragArea)&&(this.actionObj.clone.style.left=(0,s.IV)(t))):(this.scrollEdges.left?(e=n.scrollLeft-this.widthUptoCursorPoint+this.actionObj.cellWidth,n.scrollLeft+n.offsetWidth>=n.offsetWidth?n.scrollLeft=n.scrollLeft-1:0===this.actionObj.clone.offsetLeft&&(e=n.scrollLeft)):e=n.scrollLeft+n.offsetWidth-this.actionObj.clone.offsetWidth+(this.actionObj.clone.offsetWidth-this.widthUptoCursorPoint),e=e<0?0:e,(0,s.hX)(this.parent.eventDragArea)&&(this.actionObj.clone.style.left=(0,s.IV)(e)))}return e},i.prototype.getWidthDiff=function(e,t){var n=this.scrollArgs.element.getBoundingClientRect();if(n.left<=this.actionObj.pageX&&n.right>=this.actionObj.pageX){var r=e.children[parseInt(t.toString(),10)].offsetLeft,o=this.actionObj.pageX-n.left;return this.parent.enableRtl?r+this.actionObj.cellWidth-(this.scrollArgs.element.scrollLeft+o):this.scrollArgs.element.scrollLeft+o-r}return 0},i.prototype.getColumnIndex=function(e){var t=Math.round(e/this.actionObj.cellWidth);return this.isHeaderRows?t:this.getIndex(t)},i.prototype.getCursorCurrentIndex=function(e,t,n){var r=e+t;if(this.isHeaderRows){var o=Math.floor(n.offsetWidth/this.actionObj.cellWidth);return r>o-1?o-1:r}return r>n.children.length-1?n.children.length-1:r},i.prototype.cursorIndex=function(e,t,n,r){var o=(0,s.kp)(e.target,".e-work-cells");if((0,s.hX)(o)||this.isMorePopupOpened)this.cursorPointIndex=0;else{var l=this.parent.getDateFromElement(o);if(l=this.isAllDayDrag?k(l):l,this.isHeaderRows){var h=Math.floor(n/this.actionObj.cellWidth);l=new Date(this.timelineEventModule.dateRender[h+r].getTime())}var d=l.getTime()-t[this.parent.eventFields.startTime].getTime();if(this.isTimelineDayProcess||this.isAllDayDrag)this.cursorPointIndex=Math.abs(Math.ceil(d/bt));else{var p=Math.floor(d/wt/(this.actionObj.slotInterval/this.actionObj.cellWidth));this.cursorPointIndex=Math.floor(p/this.actionObj.cellWidth),this.cursorPointIndex=this.cursorPointIndex<0?0:this.cursorPointIndex}}},i.prototype.calculateResourceGroupingPosition=function(e,t){var n=this.parent.element.querySelector("."+we),r=[].slice.call(this.parent.element.querySelectorAll(".e-content-wrap .e-content-table tr:not(.e-hidden)")),o=fb(n.querySelector("table"));o=(0,s.hX)(o)?0:o;var l=this.parent.rowAutoHeight?~~(n.querySelector("table").offsetHeight/r.length):this.actionObj.cellHeight,h=Math.floor(Math.floor(this.actionObj.Y+(n.scrollTop-o-(window.scrollY||window.pageYOffset))-function fx(a,i){return i?a.offsetTop:a.getBoundingClientRect().top}(n,this.parent.uiStateValues.isTransformed))/l);this.actionObj.index=h=h<0?0:h>r.length-1?r.length-1:h;var d=this.parent.element.querySelectorAll(".e-appointment-container:not(.e-hidden)").item(h),p=d.querySelector("."+Ct);p||(p=(0,s.n)("div",{className:Ct}),d.appendChild(p)),this.appendCloneElement(p,t);var u=(0,s.kp)(this.actionObj.target,"td");if(this.actionObj.groupIndex=u&&!isNaN(parseInt(u.getAttribute("data-group-index"),10))?parseInt(u.getAttribute("data-group-index"),10):this.actionObj.groupIndex,(0,s.hX)(this.parent.eventDragArea)){var f=this.parent.getElementHeight(r[parseInt(h.toString(),10)])*h;if(this.parent.rowAutoHeight){var m=this.getCursorElement(e);m&&(f=m.classList.contains(ie)?m.offsetTop:m.offsetParent&&m.offsetParent.classList.contains(Ce)?m.offsetParent.offsetTop:f)}t.style.top=(0,s.IV)(f)}},i.prototype.appendCloneElement=function(e,t){void 0===t&&(t=null),t=(0,s.hX)(t)?this.actionObj.clone:t;var n=document.querySelector(this.parent.eventDragArea);this.parent.eventDragArea&&n?n.appendChild(t):e.appendChild(t)},i.prototype.getEventWrapper=function(e,t){var n;if((0,s.hX)(t)&&(t=this.actionObj.clone.classList.contains(wi)),this.parent.activeViewOptions.timeScale.enable)n=this.parent.element.querySelectorAll(t?"."+gn:"."+Ct).item(e);else{var o=this.parent.element.querySelectorAll("."+ie).item(e);(n=o.querySelector("."+Ct))||(n=(0,s.n)("div",{className:Ct}),o.appendChild(n))}return n},i.prototype.getAllDayEventHeight=function(){var e=(0,s.n)("div",{className:Ce});this.parent.element.querySelector("."+gn).appendChild(e);var t=e.offsetHeight;return(0,s.TF)(e),t},i.prototype.isAllowDrop=function(e){if(!this.actionObj.excludeSelectors)return!1;for(var n=!1,r=0,o=this.actionObj.excludeSelectors.split(",");r<o.length;r++)if(e.target.classList.contains(o[r])){n=!0;break}return n},i.prototype.getModuleName=function(){return"dragAndDrop"},i}(cS),wd=function(){function a(i){this.previousNextAction="Next",this.parent=i}return a.prototype.isTimelineView=function(){return-1!==this.parent.currentView.indexOf("Timeline")},a.prototype.getContentRows=function(){return[]},a.prototype.refreshHeader=function(){},a.prototype.refreshResourceHeader=function(){var i=this.element.querySelector("."+_s),e=Array.from(i.querySelectorAll("."+on));
1e.forEach(function(h){Array.from(h.children).forEach(function(p){!p.classList.contains(ro)&&!p.classList.contains(gr)&&(0,s.TF)(p)})});var t=this.parent.resourceBase.renderedResources;if(!(0,s.hX)(t)&&t.length>0)for(var n=0;n<e.length;n++){var r=e[parseInt(n.toString(),10)],o=t[parseInt(n.toString(),10)];!this.parent.activeView||(0,s.hX)(r)||(0,s.hX)(o)||parseInt(r.getAttribute("data-group-index"),10)!==o.groupIndex||(this.parent.activeView.setResourceHeaderContent(r,o,Wh),this.parent.trigger(ti,{element:r,elementType:"resourceHeader",groupIndex:o.groupIndex}))}this.parent.renderTemplates(),this.parent.notify(Ri,{})},a.prototype.getDayName=function(i){return this.parent.getDayNames("abbreviated")[i.getDay()]},a.prototype.getDate=function(i){return this.parent.globalize.formatDate(i,{format:"d",calendar:this.parent.getCalendarMode()})},a.prototype.getTime=function(i){return this.parent.isAdaptive?this.parent.globalize.formatDate(i,"HH:mm"===this.parent.activeViewOptions.timeFormat||"HH.mm"===this.parent.activeViewOptions.timeFormat?{format:"H",calendar:this.parent.getCalendarMode()}:{skeleton:"h",calendar:this.parent.getCalendarMode()}):this.parent.getTimeString(i)},a.prototype.getTimelineDate=function(i){return yt(this.parent.globalize.formatDate(i,{skeleton:"MMMd",calendar:this.parent.getCalendarMode()})+", "+this.parent.getDayNames("wide")[i.getDay()],"multiple")},a.prototype.createEventTable=function(i){var e=(0,s.n)("div",{className:Ur});return(0,s.BC)(this.getEventRows(i),e),e},a.prototype.getEventRows=function(i){for(var t,e=[],n=0;n<i;n++)t=(0,s.n)("div",{className:mn}),this.parent.resourceBase&&!this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.renderedResources&&t.setAttribute("data-group-index",this.parent.resourceBase.renderedResources[parseInt(n.toString(),10)].groupIndex.toString()),e.push(t);return e},a.prototype.collapseRows=function(i){this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(this.parent.resourceBase.hideResourceRows(i.querySelector("tbody")),this.parent.resourceBase.hideResourceRows(i.querySelector("."+Ur)))},a.prototype.createTableLayout=function(i){var t=(0,s.n)("table",{className:lf+" "+(i||"")}),n=(0,s.n)("tbody");return t.appendChild(n),t},a.prototype.setAriaAttributes=function(i){i.setAttribute("role","grid"),"Year"!==this.parent.currentView&&i.setAttribute("id",this.parent.element.id+"_table"),i.setAttribute("aria-label",this.getLabelText(this.parent.currentView))},a.prototype.createColGroup=function(i,e){if(!(0,s.hX)(e)){var t=e.length;e[0]&&e[0].colSpan&&(t=e.map(function(o){return o.colSpan}).reduce(function(o,l){return o+l}));for(var n=(0,s.n)("colgroup"),r=0;r<t;r++)n.appendChild((0,s.n)("col"));(0,s.Hs)([n],i)}},a.prototype.getScrollXIndent=function(i){return i.offsetHeight-i.clientHeight>0?Xh():0},a.prototype.scrollTopPanel=function(i){this.getDatesHeaderElement().firstElementChild.scrollLeft=i.scrollLeft},a.prototype.scrollHeaderLabels=function(i){for(var e=this.element.querySelector(".e-date-header-wrap table"),t=e.offsetWidth/e.querySelectorAll("colgroup col").length,n=function(m,g){for(var v,b=0,y=0,S=g?-i.scrollLeft:i.scrollLeft,E=0,_=m;E<_.length;E++){var T=_[E];if((y+=parseInt(T.getAttribute("colSpan"),10))>Math.floor(S/t)){v=T;break}b+=T.offsetWidth}(0,s.hX)(v)||(v.children[0].style[g?"right":"left"]=S-b+"px")},o=0,l=[".e-header-year-cell",".e-header-month-cell",".e-header-week-cell",".e-header-cells"];o<l.length;o++){var d=[].slice.call(this.element.querySelectorAll(l[o]));if(d.length>0){for(var p=0,u=d;p<u.length;p++)u[p].children[0].style[this.parent.enableRtl?"right":"left"]="";n(d,this.parent.enableRtl)}}},a.prototype.addAttributes=function(i,e){i.template&&(0,s.BC)(i.template,e),i.colSpan&&e.setAttribute("colspan",i.colSpan.toString()),i.className&&(0,s.iQ)([e],i.className)},a.prototype.getHeaderBarHeight=function(){var i=2;if(this.parent.headerModule&&(i+=sf(this.parent.headerModule.getHeaderElement())),this.parent.uiStateValues.isGroupAdaptive){var e=this.parent.element.querySelector("."+vf);e&&(i+=e.offsetHeight)}return i},a.prototype.renderPanel=function(i){i===df?(0,s.Hs)([this.element],this.parent.element.querySelector("."+kn)):this.parent.element.querySelector("."+kn).appendChild(this.element)},a.prototype.setPanel=function(i){this.element=i},a.prototype.getPanel=function(){return this.element},a.prototype.getDatesHeaderElement=function(){return this.element.querySelector("."+Il)},a.prototype.getDateSlots=function(i,e){return[]},a.prototype.generateColumnLevels=function(){return[]},a.prototype.getColumnLevels=function(){return this.colLevels},a.prototype.highlightCurrentTime=function(){},a.prototype.getStartDate=function(){return this.renderDates[0]},a.prototype.getEndDate=function(){return this.renderDates[this.renderDates.length-1]},a.prototype.startDate=function(){return this.renderDates[0]},a.prototype.endDate=function(){return K(this.renderDates[this.renderDates.length-1],1)},a.prototype.getStartHour=function(){var i=this.parent.getStartEndTime(this.parent.activeViewOptions.startHour);return(0,s.hX)(i)&&(i=new Date(2e3,0,0,0)),i},a.prototype.getEndHour=function(){var i=this.parent.getStartEndTime(this.parent.activeViewOptions.endHour);return(0,s.hX)(i)&&(i=new Date(2e3,0,0,0)),i},a.prototype.isCurrentDate=function(i){return i.setHours(0,0,0,0)===new Date(this.parent.currentTimezoneDate).setHours(0,0,0,0)},a.prototype.isCurrentMonth=function(i){return this.parent.activeViewOptions.displayDate||this.parent.activeViewOptions.numberOfWeeks>0?this.parent.activeView.getStartDate().getTime()<=this.parent.getCurrentTime().getTime()&&this.parent.activeView.getEndDate().getTime()>=this.parent.getCurrentTime().getTime():i.getFullYear()===this.parent.getCurrentTime().getFullYear()&&i.getMonth()===this.parent.getCurrentTime().getMonth()},a.prototype.isWorkDay=function(i,e){return void 0===e&&(e=this.parent.activeViewOptions.workDays),!(0,s.hX)(e)&&e.indexOf(i.getDay())>=0},a.prototype.isWorkHour=function(i,e,t,n){return!((0,s.hX)(e)||(0,s.hX)(t)||(e.setMilliseconds(0),t.setMilliseconds(0),k(i).getTime()!==k(e).getTime()&&(e=new Date(2e3,0,0,e.getHours(),e.getMinutes(),e.getMilliseconds()),t=new Date(2e3,0,0,t.getHours(),t.getMinutes(),t.getMilliseconds())),jr(i)<jr(e)||jr(i)>=jr(t)||!this.isWorkDay(i,n)))},a.prototype.getRenderDates=function(i,e){void 0===e&&(e=this.parent.selectedDate);var t=[];if("Week"===this.parent.currentView||"TimelineWeek"===this.parent.currentView)for(var r=Ui(k(e),this.parent.activeViewOptions.firstDayOfWeek),o=0,l=7*this.parent.activeViewOptions.interval;o<l;o++)(this.parent.activeViewOptions.showWeekend||this.isWorkDay(r,i))&&t.pu
1sh(r),r=K(r,1);else if("WorkWeek"===this.parent.currentView||"TimelineWorkWeek"===this.parent.currentView){r=Ui(k(e),this.parent.activeViewOptions.firstDayOfWeek),o=0;for(var h=7*this.parent.activeViewOptions.interval;o<h;o++)this.isWorkDay(r,i)&&t.push(r),r=K(r,1)}else{var d="Agenda"===this.parent.currentView?this.parent.agendaDaysCount:this.parent.activeViewOptions.interval;r=k(e);do{(this.parent.activeViewOptions.showWeekend||this.isWorkDay(r,i))&&t.push(r),r=K(r,1)}while(d!==t.length)}return i||(this.renderDates=t),this.parent.headerModule&&this.parent.headerModule.previousNextIconHandler(),t},a.prototype.getNextPreviousDate=function(i){if(this.previousNextAction=i,"Day"===this.parent.currentView||"TimelineDay"===this.parent.currentView){if(this.parent.activeViewOptions.showWeekend){var e=this.parent.activeViewOptions.interval;return K(this.parent.selectedDate,"Next"===i?e:-e)}var t=void 0;if("Next"===i)for(t=K(this.renderDates.slice(-1)[0],1);!this.isWorkDay(t);)t=K(t,1);else{t=K(this.renderDates[0],-1);var n=0;do{this.isWorkDay(t)&&(n+=1),this.parent.activeViewOptions.interval!==n&&(t=K(t,-1))}while(this.parent.activeViewOptions.interval!==n)}return t}return K(this.parent.selectedDate,("Next"===i?7:-7)*this.parent.activeViewOptions.interval)},a.prototype.formatViewLabel=function(i,e,t){var n={type:"date",skeleton:"full",calendar:this.parent.getCalendarMode()};return this.parent.localeObj.getConstant(i)+" "+this.parent.localeObj.getConstant("start")+" "+this.parent.globalize.formatDate(e,n)+" "+this.parent.localeObj.getConstant("endAt")+" "+this.parent.globalize.formatDate(t,n)},a.prototype.getLabelText=function(i){var e=i.charAt(0).toLowerCase()+i.substring(1);return"Year"===i||"TimelineYear"===i?this.formatViewLabel(e,this.parent.activeView.getStartDate(),this.parent.activeView.getEndDate()):this.renderDates.length>0?"Day"===this.parent.currentView||"TimelineDay"===this.parent.currentView?this.parent.localeObj.getConstant(e)+" of "+yt(this.parent.globalize.formatDate(this.parent.selectedDate,{type:"date",skeleton:"full",calendar:this.parent.getCalendarMode()}),"single"):this.formatViewLabel(e,this.renderDates[0],this.renderDates[this.renderDates.length-1]):""},a.prototype.getDateRangeText=function(i,e){return void 0===i&&(i=this.renderDates[0]),void 0===e&&(e=this.renderDates),this.parent.isAdaptive?yt(this.parent.globalize.formatDate(this.parent.selectedDate,{format:this.parent.activeViewOptions.dateFormat?this.parent.activeViewOptions.dateFormat:"MMMM y",calendar:this.parent.getCalendarMode()}),"single"):this.formatDateRange(i,e[e.length-1])},a.prototype.formatDateRange=function(i,e){var l,t=this.parent.globalize,n=this.parent.getCalendarMode();if(i===e&&(e=null),!(0,s.hX)(this.parent.activeViewOptions.dateFormat))return yt(e?t.formatDate(i,{format:this.parent.activeViewOptions.dateFormat,calendar:n})+" - "+t.formatDate(e,{format:this.parent.activeViewOptions.dateFormat,calendar:n}):t.formatDate(i,{format:this.parent.activeViewOptions.dateFormat,calendar:n}),"multiple");if(l=(0,s.hX)(this.parent.locale)||"en"===this.parent.locale||"en-US"===this.parent.locale?(0,s._W)("dateFormats.long",(0,s.P)(n)):(0,s._W)("main."+this.parent.locale+".dates.calendars."+n+".dateFormats.long",s.pE),!e)return yt(t.formatDate(i,{format:l,calendar:n}),"single");var h=l.trim().toLocaleLowerCase();return yt("d"===h.substr(0,1)?i.getFullYear()===e.getFullYear()?i.getMonth()===e.getMonth()?t.formatDate(i,{format:"dd",calendar:n})+" - "+t.formatDate(e,{format:"dd MMMM yyyy",calendar:n}):t.formatDate(i,{format:"dd MMM",calendar:n})+" - "+t.formatDate(e,{format:"dd MMM yyyy",calendar:n}):t.formatDate(i,{format:"dd MMM yyyy",calendar:n})+" - "+t.formatDate(e,{format:"dd MMM yyyy",calendar:n}):"m"===h.substr(0,1)?i.getFullYear()===e.getFullYear()?i.getMonth()===e.getMonth()?t.formatDate(i,{format:"MMMM dd",calendar:n})+" - "+t.formatDate(e,{format:"dd, yyyy",calendar:n}):t.formatDate(i,{format:"MMM dd",calendar:n})+" - "+t.formatDate(e,{format:"MMM dd, yyyy",calendar:n}):t.formatDate(i,{format:"MMM dd, yyyy",calendar:n})+" - "+t.formatDate(e,{format:"MMM dd, yyyy",calendar:n}):t.formatDate(i,{format:l,calendar:n})+" - "+t.formatDate(e,{format:l,calendar:n}),"multiple")},a.prototype.getMobileDateElement=function(i,e){return(0,s.n)("div",{className:e,innerHTML:'<div class="e-m-date">'+this.parent.globalize.formatDate(i,{format:"d",calendar:this.parent.getCalendarMode()})+'</div><div class="e-m-day">'+yt(this.parent.globalize.formatDate(i,{format:"E",calendar:this.parent.getCalendarMode()}),"single")+"</div>"})},a.prototype.setResourceHeaderContent=function(i,e,t){if(void 0===t&&(t=Oi),this.parent.activeViewOptions.resourceHeaderTemplate){var n={resource:e.resource,resourceData:e.resourceData}
1,l=this.parent.element.id+"_"+this.parent.activeViewOptions.resourceHeaderTemplateName+"resourceHeaderTemplate",h=[].slice.call(this.parent.getResourceHeaderTemplate()(n,this.parent,"resourceHeaderTemplate",l,!1,void 0,void 0,this.parent.root));(0,s.BC)(h,i)}else{var d=(0,s.n)("div",{className:t});this.parent.sanitize(e.resourceData[e.resource.textField],d),i.appendChild(d)}},a.prototype.renderResourceMobileLayout=function(){this.parent.resourceBase.lastResourceLevel&&this.parent.resourceBase.lastResourceLevel.length<=0||(this.parent.resourceBase.renderResourceHeader(),this.parent.resourceBase.renderResourceTree())},a.prototype.addAutoHeightClass=function(i){!this.parent.uiStateValues.isGroupAdaptive&&this.parent.rowAutoHeight&&this.isTimelineView()&&this.parent.activeViewOptions.group.resources.length>0&&(0,s.iQ)([i],Hf)},a.prototype.getColElements=function(){return[].slice.call(this.element.querySelectorAll("."+we+" col, ."+bi+" col"))},a.prototype.setColWidth=function(i){if(this.isTimelineView()){var e=this.getColElements(),t=this.element.querySelector("."+nt+" tbody"),n=this.parent.getElementWidth(t)/(e.length/2);if(i.offsetHeight!==i.clientHeight){var r=this.parent.element.querySelector("."+Wi);!(0,s.hX)(r)&&r.offsetHeight!==i.clientHeight&&(0,s.sN)(r,{height:(0,s.IV)(i.clientHeight)})}[].slice.call(this.element.querySelectorAll("."+Wt+",."+ua+",.e-header-week-cell,.e-header-month-cell,.e-header-year-cell")).forEach(function(h){var d=(0,s.hX)(h.getAttribute("colspan"))?"1":h.getAttribute("colspan"),p=parseInt(d,10);(0,s.sN)(h,{width:(0,s.IV)(n*p)})})}},a.prototype.resetColWidth=function(){for(var e=0,t=this.getColElements();e<t.length;e++)t[e].style.width=""},a.prototype.getContentAreaElement=function(){return this.element.querySelector("."+we)},a.prototype.wireExpandCollapseIconEvents=function(){if(this.parent.resourceBase&&this.parent.resourceBase.resourceCollection.length>1)for(var e=0,t=[].slice.call(this.element.querySelectorAll("."+pa));e<t.length;e++){var n=t[e];s.Jm.clearEvents(n),s.Jm.add(n,"click",this.parent.resourceBase.onTreeIconClick,this.parent.resourceBase)}},a.prototype.scrollToDate=function(i){if(-1!==["Month","TimelineMonth"].indexOf(this.parent.currentView)&&!(0,s.hX)(i)){var e=this.getContentAreaElement(),t=new Date(k(new Date(+i)).getTime()).getTime(),n=e.querySelector("."+ie+'[data-date="'+t+'"]');"Month"===this.parent.currentView&&n&&(e.scrollWidth>e.clientWidth&&(e.scrollLeft=this.parent.enableRtl?-(this.parent.getContentTable().offsetWidth-n.offsetLeft-n.offsetWidth):n.offsetLeft),e.scrollTop=n.offsetTop),"TimelineMonth"===this.parent.currentView&&n&&(e.scrollLeft=this.parent.enableRtl?-(this.parent.getContentTable().offsetWidth-n.offsetLeft-n.offsetWidth):n.offsetLeft)}},a.prototype.setPersistence=function(){if(this.parent.enablePersistence){var i=this.element.querySelector(".e-content-wrap");(0,s.hX)(i)||(this.parent.scrollLeft=i.scrollLeft,this.parent.scrollTop=i.scrollTop)}},a.prototype.retainScrollPosition=function(){if(this.parent.enablePersistence){var i=this.parent.element.querySelector(".e-content-wrap");!(0,s.hX)(i)&&!(0,s.hX)(this.parent.scrollLeft)&&!(0,s.hX)(this.parent.scrollTop)&&(i.scrollTop=this.parent.scrollTop,i.scrollLeft=this.parent.scrollLeft)}},a.prototype.getViewStartDate=function(){var i=this.renderDates[0];return this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.lastResourceLevel.length>0&&(i=this.parent.resourceBase.getResourceRenderDates()[0]),i},a.prototype.getViewEndDate=function(){var i=K(this.renderDates[this.renderDates.length-1],1);return this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.lastResourceLevel.length>0&&(i=K(this.parent.resourceBase.getResourceRenderDates().slice(-1)[0],1)),i},a.prototype.getAdjustedDate=function(i){return!this.parent.activeViewOptions.timeScale.enable||"Month"===this.parent.currentView||"TimelineYear"===this.parent.currentView&&0===this.parent.activeViewOptions.group.resources.length?new Date(i.setHours(0,0,0,0)):"TimelineYear"===this.parent.currentView&&this.parent.activeViewOptions.group.resources.length>0?(i.setHours(0,0,0,0),new Date(i.setDate(1))):null},a.prototype.resetColLevels=function(){this.parent.resourceBase.expandedRes
1ources=[];for(var i=this.parent.virtualScrollModule.getRenderedCount(),e=this.parent.activeViewOptions.group.byDate?this.colLevels[0]:this.parent.resourceBase.renderedResources,t=0,n=0;n<e.length&&!(t>=i);n++)t+=e[parseInt(n.toString(),10)].colSpan,this.parent.resourceBase.expandedResources.push(e[parseInt(n.toString(),10)]);this.parent.activeViewOptions.group.byDate?(this.colLevels[0]=this.parent.resourceBase.expandedResources,this.parent.virtualScrollModule.setRenderedDates(this.parent.resourceBase.expandedResources)):(this.colLevels[this.colLevels.length-2]=this.parent.resourceBase.expandedResources,this.parent.resourceBase.renderedResources=this.parent.resourceBase.expandedResources),"Month"!==this.parent.currentView&&(this.colLevels[this.colLevels.length-1]=this.colLevels[this.colLevels.length-1].slice(0,t),this.parent.resourceBase.expandedResources=this.colLevels[this.colLevels.length-1])},a.prototype.getGroupIndices=function(i){var e=[];return this.parent.virtualScrollModule&&this.parent.activeViewOptions.group.resources.length>0&&(i||this.parent.virtualScrollModule.existingDataCollection.length>0)&&!this.parent.uiStateValues.isGroupAdaptive&&(e=(i=(0,s.hX)(i)?this.parent.virtualScrollModule.existingDataCollection:i).map(function(t){return t.groupIndex})),e},a.prototype.destroy=function(){this.element&&this.element.parentNode&&(0,s.TF)(this.element),this.element=null,this.renderDates=null,this.colLevels=null},a}(),tA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Od=function(a){function i(e){var t=a.call(this,e)||this;return t.viewClass="e-day-view",t.isInverseTableSelect=!0,t.baseCssClass="e-vertical-view",t.appointment=null,t}return tA(i,a),i.prototype.getModuleName=function(){return"verticalView"},i.prototype.addEventListener=function(){this.parent.on(fn,this.scrollUiUpdate,this),this.parent.on(un,this.renderEvents,this)},i.prototype.removeEventListener=function(){this.parent&&(this.parent.off(fn,this.scrollUiUpdate),this.parent.off(un,this.renderEvents))},i.prototype.renderEvents=function(){this.appointment=this.parent.activeViewOptions.timeScale.enable?new em(this.parent):new Sa(this.parent),this.appointment.renderAppointments(),this.parent.notify(Ss,{})},i.prototype.onContentScroll=function(e){this.parent.removeNewEventElement();var t=e.target;this.parent.notify(El,e),this.scrollLeftPanel(t),this.scrollTopPanel(t),this.parent.isAdaptive||(this.parent.uiStateValues.top=t.scrollTop),this.parent.uiStateValues.left=t.scrollLeft,!(0,s.hX)(this.parent.quickPopup)&&!this.parent.uiStateValues.isTapHold&&this.parent.quickPopup.quickPopupHide(),this.setPersistence()},i.prototype.onAdaptiveMove=function(e){this.parent.uiStateValues.action&&e.preventDefault()},i.prototype.onAdaptiveScroll=function(e){this.parent&&!this.parent.isDestroyed&&(this.parent.removeNewEventElement(),this.parent.uiStateValues.top=e.target.scrollTop)},i.prototype.scrollLeftPanel=function(e){var t=this.getLeftPanelElement();(0,s.hX)(t)||(t.scrollTop=e.scrollTop)},i.prototype.scrollUiUpdate=function(e){if(this.parent){var t=this.parent.element.querySelector("."+bi),n=this.getHeaderBarHeight(),r=this.getLeftPanelElement(),o=this.getScrollableElement(),l=this.getDatesHeaderElement();this.setContentHeight(o,r,this.parent.element.offsetHeight-n-l.offsetHeight),this.setColWidth(o);var d=Xh();l.firstElementChild.style[e.cssProperties.rtlBorder]="",l.style[e.cssProperties.rtlPadding]="";var p=!this.parent.enableAllDayScroll||!(o.offsetWidth-o.clientWidth<=t.offsetWidth-t.clientWidth&&t.classList.contains("e-all-day-scroll"));o.offsetWidth-o.clientWidth>0&&p?(l.firstElementChild.style[e.cssProperties.border]=d>0?"1px":"0px",l.style[e.cssProperties.padding]=d>0?d-1+"px":"0px"):(l.firstElementChild.style[e.cssProperties.border]="",l.style[e.cssProperties.padding]=""),e.isPreventScrollUpdate||(this.parent.uiStateValues.isInitial?(this.parent.currentView.indexOf("Timeline")>-1&&(o.scrollTop=this.parent.uiStateValues.top),this.scrollToWorkHour(),this.parent.uiStateValues.isInitial=!1):(r&&(r.scrollTop=this.parent.uiStateValues.top),o.scrollTop=this.parent.uiStateValues.top,o.scrollLeft=this.parent.uiStateValues.left)),this.parent.activeViewOptions.timeScale.enable&&this.highlightCurrentTime(),this.retainScrollPosition(),!(0,s.hX)(r)&&!(0,s.hX)(o)&&r.scrollTop!==o.scrollTop&&(r.scrollTop=o.scrollTop)}},i.prototype.setContentHeight=function(e,t,n){this.parent.isAdaptive&&!this.isTimelineView()||(0,s.hX)(t)||(t.style.height="auto"===this.parent.height?"auto":(0,s.IV)(n-this.getScrollXIndent(e))),e.style.height="auto"===this.parent.height?"auto":(0,s.IV)(n)},i.prototype.scrollToWorkHour=function(){if(this.parent.workHours.highlight){var e=this.element.querySelector("."+ha);e&&(this.getScrollableElement().scrollTop=e.offsetTop,this.parent.uiStateValues.top=e.offsetTop,this.parent.uiStateValues.left=0)}},i.prototype.scrollToHour=function(e,t){var n=this.parent.getStartEndTime(e);
1if(!(0,s.hX)(t)){var r=this.element.querySelector("."+Wt+'[data-date="'+new Date(k(t)).getTime()+'"]');if(r)if(this.parent.enableRtl){var o=this.element.querySelector("."+nt);this.getScrollableElement().scrollLeft=-(o.offsetWidth-r.offsetLeft-r.offsetWidth)}else this.getScrollableElement().scrollLeft=r.offsetLeft}(0,s.hX)(n)||(this.getScrollableElement().scrollTop=this.getTopFromDateTime(n))},i.prototype.scrollToDate=function(e){this.scrollToHour(null,e)},i.prototype.generateColumnLevels=function(){var e=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays),t=[];if(this.parent.activeViewOptions.group.resources.length>0){if(t=this.parent.resourceBase.generateResourceLevels(e),this.parent.activeViewOptions.group.hideNonWorkingDays)for(;0===t[0].length;)this.parent.setProperties({selectedDate:this.parent.activeView.getNextPreviousDate(this.previousNextAction)},!0),this.parent.activeView.getRenderDates(),this.parent.headerModule&&(this.parent.headerModule.setCalendarDate(this.parent.selectedDate),this.parent.headerModule.updateDateRange()),e=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays),t=this.parent.resourceBase.generateResourceLevels(e);if(this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.lastResourceLevel.length>0){var n=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];t=[this.getDateSlots(n.renderDates,n.workDays,n.resourceData[n.resource.startHourField],n.resourceData[n.resource.endHourField])]}}else t.push(e);return this.colLevels=t,t},i.prototype.getDateSlots=function(e,t,n,r){void 0===n&&(n=this.parent.workHours.start),void 0===r&&(r=this.parent.workHours.end);for(var o=[],l=this.parent.getStartEndTime(n),h=this.parent.getStartEndTime(r),d=0,p=e;d<p.length;d++){var u=p[d],f=[Wt];this.isCurrentDate(u)&&f.push(Uh),o.push({date:u,type:"dateHeader",className:f,colSpan:1,workDays:t,startHour:new Date(+l),endHour:new Date(+h)})}return o},i.prototype.isWorkHourRange=function(e){return this.getStartHour().getTime()<=e.getTime()&&this.getEndHour().getTime()>=e.getTime()},i.prototype.highlightCurrentTime=function(){var e=this;if(!(this.parent.activeViewOptions.headerRows.length>0&&"Hour"!==this.parent.activeViewOptions.headerRows.slice(-1)[0].option)){var t=this.parent.getCurrentTime();if(this.parent.showTimeIndicator&&this.isWorkHourRange(t))if(this.getCurrentTimeIndicatorIndex().length>0&&!(0,s.hX)(this.element.querySelector("."+ie))){if(this.changeCurrentTimePosition(),(0,s.hX)(this.currentTimeIndicatorTimer)){var r=wt-(1e3*t.getSeconds()+t.getMilliseconds());r<=59e3&&window.setTimeout(function(){(0,s.hX)(e.currentTimeIndicatorTimer)||(e.clearCurrentTimeIndicatorTimer(),e.changeCurrentTimePosition(),e.updateCurrentTimeIndicatorTimer())},r),this.updateCurrentTimeIndicatorTimer()}}else this.clearCurrentTimeIndicatorTimer();else this.clearCurrentTimeIndicatorTimer()}},i.prototype.getCurrentTimeIndicatorIndex=function(){var e=[];if(!(0,s.hX)(this.parent.resourceBase)&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var t=0,n=k(this.parent.getCurrentTime());if(this.parent.virtualScrollModule&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.activeViewOptions.group.byDate)for(var r=0,o=this.parent.resourceBase.expandedResources;r<o.length;r++)k((l=o[r]).date).getTime()===n.getTime()&&e.push(t),t+=1;else for(var h=0,d=this.parent.resourceBase.renderedResources;h<d.length;h++){var l;(p=this.parent.getIndexOfDate((l=d[h]).renderDates,n))>=0&&e.push(this.parent.activeViewOptions.group.byDate?this.parent.resourceBase.lastResourceLevel.length*p+t:t+p),t+=this.parent.activeViewOptions.group.byDate?1:l.renderDates.length}}else{var p;(p=this.parent.getIndexOfDate(this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.lastResourceLevel.length>0?this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].renderDates:this.renderDates,k(this.parent.getCurrentTime())))>=0&&e.push(p)}return e},i.prototype.clearCurrentTimeIndicatorTimer=function(){(0,s.hX)(this.currentTimeIndicatorTimer)||(window.clearInterval(this.currentTimeIndicatorTimer),this.currentTimeIndicatorTimer=null,this.removeCurrentTimeIndicatorElements())},i.prototype.updateCurrentTimeIndicatorTimer=function(){var e=this;this.currentTimeIndicatorTimer=window.setInterval(function(){e.changeCurrentTimePosition()},wt)},i.prototype.removeCurrentTimeIndicatorElements=function(){for(var n=0,r=[].slice.call(this.element.querySelectorAll("."+xb+",."+fa+",."+ff));n<r.length;n++)(0,s.TF)(r[n])},i.prototype.changeCurrentTimePosition=function(){if(!this.parent||this.parent&&this.parent.isDestroyed)this.parent=null;else{this.removeCurrentTimeIndicatorElements();var e=this.getCurrentTimeIndicatorIndex(),t=this.parent.getContentTable().rows[0],n=this.getTopFromDateTime(this.parent.getCurrentTime()),r=(0,s.IV)(n),o=Math.floor(n/t.cells[0].offsetHeight),l=this.getLeftPanelElement(),h=[].slice.call(l.querySelectorAll("tr"));if(!(0,s.hX)(o)&&!isNaN(o)&&o!==h.length){for(var d=[].slice.call(this.element.querySelectorAll("."+wb)),p=0,u=e[0];p<u;p++)d[parseInt(p.toString(),10)].appendChild((0,s.n)("div",{className:xb,styles:"top:"+r}));for(var f=0,m=e;f<m.length;f++){var g=m[f];d.length>g&&d[parseInt(g.toString(),10)].appendChild((0,s.n)("div",{className:fa,styles:"top:"+r}))}var v=(0,s.n)("div",{innerHTML:this.parent.getTimeString(this.parent.getCurrentTime()),className:ff,styles:"top:"+r});o<=h.length&&((0,s.vy)(l.querySelectorAll("."+mf),mf),h[parseInt(o.toString(),10)]&&(0,s.iQ)([h[parseInt(o.toString(),10)].lastElementChild],mf),(0,s.Hs)([v],l),v.style.top=(0,s.IV)(v.offsetTop-v.offsetHeight/2))}}},i.prototype.getTopFromDateTime=function(e){var d,t=this.getStartEndHours(this.parent.activeViewOptions.startHour),n=this.getStartEndHours(this.parent.activeViewOptions.endHour),r=60*(e.getHours()-t.getHours())+(e.getMinutes()-t.getMinutes()),o=Vi(k(new Date(e.getTime())),t,n),l=(o.endHour.getTime()-o.startHour.getTime())/wt,h=this.parent.activeViewOptions.timeScale.interval;return d=0===t.getHours()&&0===t.getMinutes()&&0===n.getHours()&&0===n.getMinutes()||1!==this.parent.activeViewOptions.timeScale.slotCount?h:h>l?l:h,r*this.getWorkCellHeight()*this.parent.activeViewOptions.timeScale.slotCount/d},i.prototype.getWorkCellHeight=function(){return parseFloat(this.parent.getElementHeight(this.element.querySelector("."+ie)).toFixed(2))},i.prototype.getTdContent=function(e,t,n){var r,o=(0,s.n)("div"),l="",h=this.parent.element.i
1d+"_";switch(t){case"dateHeader":if(this.parent.activeViewOptions.dateHeaderTemplate){l="dateHeaderTemplate";var d={date:e,type:t},p=this.parent.activeViewOptions.dateHeaderTemplateName;r=[].slice.call(this.parent.getDateHeaderTemplate()(d,this.parent,l,h+p+l,!1,void 0,void 0,this.parent.root))}else o.innerHTML=this.parent.activeView.isTimelineView()?'<span class="e-header-date e-navigate">'+this.getTimelineDate(e)+"</span>":'<div class="e-header-day">'+yt(this.getDayName(e),"single")+'</div><div class="e-header-date e-navigate" role="link">'+this.getDate(e)+"</div>",r=[].slice.call(o.childNodes);break;case"majorSlot":this.parent.activeViewOptions.timeScale.majorSlotTemplate?(l="majorSlotTemplate",d={date:e,type:t},r=[].slice.call(this.parent.getMajorSlotTemplate()(d,this.parent,l,h+l,!1,void 0,void 0,this.parent.root))):(o.innerHTML="<span>"+this.getTime(e)+"</span>",r=[].slice.call(o.childNodes));break;case"minorSlot":this.parent.activeViewOptions.timeScale.minorSlotTemplate?(l="minorSlotTemplate",d={date:e,type:t},r=[].slice.call(this.parent.getMinorSlotTemplate()(d,this.parent,l,h+l,!1,void 0,void 0,this.parent.root))):r=[].slice.call(o.childNodes);break;case"alldayCells":this.parent.activeViewOptions.cellTemplate&&(p=this.parent.activeViewOptions.cellTemplateName,l="cellTemplate",d={date:e,type:t,groupIndex:n},r=[].slice.call(this.parent.getCellTemplate()(d,this.parent,l,h+p+l,!1,void 0,void 0,this.parent.root)))}return r},i.prototype.refreshHeader=function(){(0,s.TF)(this.element.querySelector("tbody tr")),this.renderHeader(),this.parent.notify(Ri,{});var e=this.element.querySelector("."+bi);e&&(e.scrollLeft=this.parent.uiStateValues.left)},i.prototype.renderLayout=function(e){this.setPanel((0,s.n)("div",{className:Zh}));var t=[this.baseCssClass,this.viewClass];t.push(e),this.parent.activeViewOptions.group.byDate&&t.push("e-by-date"),this.parent.activeViewOptions.timeScale.enable||(0,s.iQ)([this.element],["e-timescale-disable",this.viewClass]),this.parent.activeViewOptions.allowVirtualScrolling&&!this.parent.uiStateValues.isGroupAdaptive&&t.push(Bf),this.parent.rowAutoHeight&&this.parent.eventSettings.ignoreWhitespace&&t.push(ly),this.renderPanel(e),(0,s.iQ)([this.element],t),this.element.appendChild(this.createTableLayout(ed)),this.element.querySelector("table").setAttribute("role","presentation"),this.colLevels=this.generateColumnLevels(),this.renderHeader(),this.renderContent(),this.parent.uiStateValues.isGroupAdaptive&&!this.parent.element.querySelector("."+Ol)&&this.renderResourceMobileLayout(),this.parent.notify(Ri,{})},i.prototype.renderHeader=function(){var e=(0,s.n)("tr"),t=(0,s.n)("td");if(t.appendChild(this.renderDatesHeader()),this.parent.activeViewOptions.timeScale.enable){var n=(0,s.n)("td",{className:Eb});n.appendChild(this.renderLeftIndent()),e.appendChild(n)}e.appendChild(t),(0,s.Hs)([e],this.element.querySelector("tbody"))},i.prototype.renderContent=function(){this.parent.activeViewOptions.group.resources.length>0&&(this.parent.resourceBase.renderedResources=(0,s.X$)([],this.parent.resourceBase.lastResourceLevel,null,!0));var e=(0,s.n)("tr"),t=(0,s.n)("td");if(this.parent.isAdaptive){t.setAttribute("colspan",this.parent.activeViewOptions.timeScale.enable?"2":"1");var n=(0,s.n)("div",{className:gf});this.parent.activeViewOptions.timeScale.enable&&n.appendChild(this.renderTimeCells()),n.appendChild(this.renderContentArea()),t.appendChild(n),s.Jm.add(n,"scroll",this.onAdaptiveScroll,this),s.Jm.add(n,s.Pw.touchMoveEvent,this.onAdaptiveMove,this),e.appendChild(t)}else{var r=this.colLevels.slice(0);this.parent.virtualScrollModule&&this.resetColLevels();var o=this.renderContentArea();if(t.appendChild(o),this.parent.activeViewOptions.timeScale.enable){var l=(0,s.n)("td");l.appendChild(this.renderTimeCells()),e.appendChild(l)}e.appendChild(t),this.parent.virtualScrollModule&&(this.colLevels=r,this.parent.virtualScrollModule.renderVirtualTrack(o))}this.element.querySelector("tbody").appendChild(e)},i.prototype.renderLeftIndent=function(){for(var o,e=(0,s.n)("div",{className:pf}),t=this.createTableLayout(),n=(0,s.n)("tr"),r=this.colLevels.length,l=0;l<r;l++){var h=n.cloneNode(),d={className:[this.colLevels[parseInt(l.toString(),10)][0]&&this.colLevels[parseInt(l.toString(),10)][0].className[0]],type:"emptyCells"};if(this.parent.activeViewOptions.showWeekNumber&&-1!==d.className.indexOf(Wt)){d.className.push(Gh);var p=this.parent.getWeekNumberContent(this.renderDates);d.template=[(0,s.n)("span",{innerHTML:""+p,attrs:{title:this.parent.localeObj.getConstant("week")+" "+p}})]}o=this.createTd(d),this.parent.renderHeaderIndentTemplate(d,o),h.appendChild(o),t.querySelector("tbody").appendChild(h)}var u=n.cloneNode(),f=(0,s.n)("div",{attrs:{tabindex:"0",role:"button",title:this.parent.localeObj.getConstant("expandAllDaySection"),"aria-disabled":"false","aria-label":this.parent.localeObj.getConstant("expandAllDaySection")},className:Nl+" "+od+" "+Nt+" "+ot}),m={className:[it],type:"emptyCells"};return(o=this.createTd(m)).appendChild(f),this.parent.renderHeaderIndentTemplate(m,o),u.appendChild(o),t.querySelector("tbody").appendChild(u),e.appendChild(t),e},i.prototype.renderDatesHeader=function(){var e=(0,s.n)("div",{className:Il}),t=(0,s.n)("div",{className:bi});e.appendChild(t);for(var n=this.createTableLayout(),r=(0,s.n)("tr",{className:If}),o=this.colLevels.length,l=this.colLevels[o-1],h=0;h<o;h++){for(var d=r.cloneNode(),p=this.colLevels[parseInt(h.toString(),10)],u=0;u<p.length;u++)d.appendChild(this.createTd(p[parseInt(u.toString(),10)]));n.querySelector("tbody").appendChild(d)}return this.createAllDayRow(n,l),this.createColGroup(n,l),t.appendChild(n),e},i.prototype.createAllDayRow=function(e,t){for(var n=(0,s.n)("tr",{className:mr}),r=0;r<t.length;r++){var o=(0,s.X$)({},t[parseInt(r.toString(),10)]);o.className=[it],o.type="alldayCells";var l=this.createTd(o);l.setAttribute("data-date",o.date.getTime().toString()),(0,s.hX)(o.groupIndex)?this.parent.uiStateValues.isGroupAdaptive&&l.setAttribute("data-group-index",""+this.parent.uiStateValues.groupIndex):l.setAttribute("data-group-index",""+o.groupIndex),this.wireCellEvents(l),n.appendChild(l)}e.querySelector("tbody").appendChild(n);var h=(0,s.n)("thead");h.appendChild(this.parent.eventBase.createEventWrapper("allDay")),(0,s.Hs)([h],e)},i.prototype.createTd=function(e){var t=(0,s.n)("td");
1if(this.addAttributes(e,t),e.date&&e.type){var n=this.getTdContent(e.date,e.type,e.groupIndex);n&&n.length&&(0,s.BC)(n,t)}return this.parent.isMinMaxDate(k(new Date(""+e.date)))||(0,s.iQ)([t],Gr),"resourceHeader"===e.type&&this.setResourceHeaderContent(t,e),"dateHeader"===e.type&&e.className.indexOf(Wt)>=0&&(t.setAttribute("data-date",e.date.getTime().toString()),(0,s.hX)(e.groupIndex)||t.setAttribute("data-group-index",""+e.groupIndex),this.wireMouseEvents(t)),this.parent.trigger(ti,{elementType:e.type,element:t,date:e.date,groupIndex:e.groupIndex}),t},i.prototype.wireCellEvents=function(e){s.Jm.add(e,"mousedown",this.parent.workCellAction.cellMouseDown,this.parent.workCellAction),this.wireMouseEvents(e)},i.prototype.wireMouseEvents=function(e){s.Jm.add(e,"click",this.parent.workCellAction.cellClick,this.parent.workCellAction),this.parent.isAdaptive||s.Jm.add(e,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)},i.prototype.renderTimeCells=function(){var e=this,t=(0,s.n)("div",{className:uf}),n=this.createTableLayout(),r=(0,s.n)("tr");return this.getTimeSlotRows(function(l){l.type=l.first?"majorSlot":"minorSlot",l.className=l.last?[Tb,ua]:[ua];var h=r.cloneNode();return h.appendChild(e.createTd({date:l.date,type:l.type,className:l.className})),n.querySelector("tbody").appendChild(h),l}),t.appendChild(n),t},i.prototype.renderContentArea=function(){var e=(0,s.n)("div",{className:we}),t=this.createTableLayout(nt);return this.setAriaAttributes(t),this.addAutoHeightClass(t),this.renderContentTable(t),this.createColGroup(t,this.colLevels.slice(-1)[0]),e.appendChild(t),this.wireCellEvents(t.querySelector("tbody")),s.Jm.add(e,"scroll",this.onContentScroll,this),s.Jm.add(e,s.Pw.touchMoveEvent,this.onAdaptiveMove,this),e},i.prototype.renderContentTable=function(e){var t=e.querySelector("tbody");(0,s.BC)(this.getContentRows(),t),this.renderContentTableHeader(e)},i.prototype.getContentRows=function(){var e=this,t=[],n=(0,s.n)("tr"),r=(0,s.n)("td"),o=this.getGroupIndices();return this.getTimeSlotRows(function(h){for(var d=n.cloneNode(),p=0,u=e.colLevels[e.colLevels.length-1];p<u.length;p++){var f=u[p],m=!0;if(e.parent.virtualScrollModule&&e.parent.activeViewOptions.group.resources.length>0&&o.indexOf(f.groupIndex)>-1&&(m=!1),m){var g=e.createContentTd(f,h,r);d.appendChild(g)}}return t.push(d),h}),t},i.prototype.createContentTd=function(e,t,n){var r=n.cloneNode();e.colSpan&&r.setAttribute("colspan",e.colSpan.toString());var o=this.getContentTdClass(t),l=k(e.date);this.parent.isMinMaxDate(l)||o.push(Gr),l=new Date(l.setHours(t.date.getHours(),t.date.getMinutes(),t.date.getSeconds(),t.date.getMilliseconds()));var h="workCells";if(-1!==e.className.indexOf(tr)&&(o.push(Es),h="resourceGroupCells"),this.parent.workHours.highlight&&(this.parent.activeViewOptions.timeScale.enable&&this.isWorkHour(l,e.startHour,e.endHour,e.workDays)||!this.parent.activeViewOptions.timeScale.enable&&this.isWorkDay(l,e.workDays))&&o.push(ha),(0,s.iQ)([r],o),this.parent.activeViewOptions.cellTemplate){var d={date:l,type:h,groupIndex:e.groupIndex},f=this.parent.element.id+"_"+this.parent.activeViewOptions.cellTemplateName+"cellTemplate",m=[].slice.call(this.parent.getCellTemplate()(d,this.parent,"cellTemplate",f,!1,void 0,void 0,this.parent.root));(0,s.BC)(m,r)}r.setAttribute("data-date",l.getTime().toString());var g="full";if(this.parent.activeViewOptions.timeScale.enable){var b=this.parent.globalize.formatDate(l,{type:"dateTime",skeleton:g,calendar:this.parent.getCalendarMode()}),y=this.parent.globalize.formatDate(this.getEndDateFromStartDate(l),{type:"dateTime",skeleton:g,calendar:this.parent.getCalendarMode()});r.setAttribute("aria-label",b+" "+this.parent.localeObj.getConstant("endAt")+" "+y)}else{var v=this.parent.globalize.formatDate(e.date,{skeleton:g,calendar:this.parent.getCalendarMode()});r.setAttribute("aria-label",v)}return(0,s.hX)(e.groupIndex)&&!this.parent.uiStateValues.isGroupAdaptive||r.setAttribute("data-group-index",""+(this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:e.groupIndex)),this.parent.trigger(ti,{elementType:h,element:r,date:l,groupIndex:e.groupIndex}),r},i.prototype.getContentTdClass=function(e){return e.last?[ie]:[ie,Ib]},i.prototype.renderContentTableHeader=function(e){var t=(0,s.n)("thead");t.appendChild(this.parent.eventBase.createEventWrapper()),this.parent.activeViewOptions.timeScale.enable&&t.appendChild(this.parent.eventBase.createEventWrapper("timeIndicator")),(0,s.Hs)([t],e)},i.prototype.getScrollableElement=function(){return this.parent.isAdaptive&&!this.isTimelineView()?this.element.querySelector("."+gf):this.getContentAreaElement()},i.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+uf)},i.prototype.getEndDateFromStartDate=function(e){var n=this.parent.activeViewOptions.timeScale.interval*wt/this.parent.activeViewOptions.timeScale.slotCount,r=new Date(e.getTime());return r.setMilliseconds(r.getMilliseconds()+n),r},i.prototype.getStartEndHours=function(e){if(!(0,s.hX)(e)&&""!==e){var t=new Date(2e3,0,0,0),n=e.split(":");return 2===n.length&&t.setHours(parseInt(n[0],10),parseInt(n[1],10),0),t}return new Date(2e3,0,0,0)},i.prototype.getTimeSlotRows=function(e){var t=[],n=this.getStartEndHours(this.parent.activeViewOptions.startHour),r=this.getStartEndHours(this.parent.activeViewOptions.endHour),o=this.parent.activeViewOptions.timeScale.interval*wt,l=o/this.parent.activeViewOptions.timeScale.slotCount,h=Math.round(bt/l),d=n.getTime(),p=r.getTime();if(d!==p){var u=n.getTimezoneOffset()!==r.getTimezoneOffset()?p-d-36e5:p-d;h=Math.round(u/l)}this.parent.activeViewOptions.timeScale.enable||(h=1);for(var f=this.parent.getStartEndTime(this.parent.workHours.start),m=this.parent.getStartEndTime(this.parent.workHours.end),g=0;g<h;g++){var v=new Date(d+l*g);if(dx(v)||new Date(d).getTimezoneOffset()!==v.getTimezoneOffset()){var b=new Date(d).getTimezoneOffset()-v.getTimezoneOffset();v=new Date(v.getTime()-6e4*b)}var y=g%(o/l),S={date:new Date(""+v),startHour:f,endHour:m,first:0===y,middle:y<this.parent.activeViewOptions.timeScale.slotCount-1,last:y===this.parent.activeViewOptions.timeScale.slotCount-1,type:""};e&&e(S),t.push(S)}return t},i.prototype.getAdjustedDate=function(e){if(!this.parent.activeViewOptions.timeScale.enable)return new Date(e.setHours(0,0,0,0));for(var t=this.getTimeSlotRows(),n=new Date(new Date(t[0].date.getTime()).setHours(e.getHours(),e.getMinutes(),e.getMilliseconds())),r=0;r<t.length;r++)if(t[parseInt(r.toString(),10)].date.getTime()>n.getTime())return e.setHours(t[r-1].date.getHours(),t[r-1].date.getMinutes(),t[r-1].date.getMilliseconds()),new Date(e);return null},i.prototype.destroy=function(){if(!this.parent||this.parent&&this.parent.isDestroyed)this.parent=null;else if(this.clearCurrentTimeIndicatorTimer(),this.element){this.appointment&&(this.appointment.destroy(),this.appointment=null);var e=this.getContentAreaElement();e&&(s.Jm.remove(e,"scroll",this.onContentScroll),s.Jm.remove(e,s.Pw.touchMoveEvent,this.onAdaptiveMove)),this.parent.resourceBase&&this.parent.resourceBase.destroy(),this.parent.scheduleTouchMo
1dule&&this.parent.scheduleTouchModule.resetValues(),a.prototype.destroy.call(this)}},i}(wd),iA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),pS=function(a){function i(e){var t=a.call(this,e)||this;return t.viewClass="e-day-view",t}return iA(i,a),i.prototype.getModuleName=function(){return"day"},i}(Od),nA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),uS=function(a){function i(e){var t=a.call(this,e)||this;return t.viewClass="e-week-view",t}return nA(i,a),i.prototype.startDate=function(){return this.getViewStartDate()},i.prototype.endDate=function(){return this.getViewEndDate()},i.prototype.getModuleName=function(){return"week"},i}(Od),rA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),fS=function(a){function i(e){var t=a.call(this,e)||this;return t.viewClass="e-work-week-view",t}return rA(i,a),i.prototype.startDate=function(){return this.getViewStartDate()},i.prototype.endDate=function(){return this.getViewEndDate()},i.prototype.getModuleName=function(){return"workWeek"},i}(Od),sA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),Ad=function(a){function i(e){var t=a.call(this,e)||this;return t.dayNameFormat="wide",t.viewClass="e-month-view",t.isInverseTableSelect=!1,t.monthEvent=null,t.monthDates={},t}return sA(i,a),i.prototype.addEventListener=function(){this.parent.on(fn,this.onScrollUIUpdate,this),this.parent.on(un,this.onDataReady,this),this.parent.on(fr,this.onCellClick,this)},i.prototype.removeEventListener=function(){this.parent&&(this.parent.off(fn,this.onScrollUIUpdate),this.parent.off(un,this.onDataReady),this.parent.off(fr,this.onCellClick))},i.prototype.onDataReady=function(e){this.monthEvent=new Sa(this.parent),this.monthEvent.renderAppointments(),this.parent.notify(Ss,{})},i.prototype.onCellClick=function(e){},i.prototype.onContentScroll=function(e){this.parent.removeNewEventElement(),this.parent.notify(El,e),this.scrollTopPanel(e.target),this.scrollLeftPanel(e.target),this.parent.uiStateValues.top=e.target.scrollTop,this.parent.uiStateValues.left=e.target.scrollLeft,this.setPersistence()},i.prototype.scrollLeftPanel=function(e){var t=this.getLeftPanelElement();t&&(t.scrollTop=e.scrollTop)},i.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+qh)},i.prototype.onScrollUIUpdate=function(e){var t=this.getHeaderBarHeight(),n=this.getDatesHeaderElement(),r=this.getContentAreaElement(),o=this.parent.element.offsetHeight-t-n.offsetHeight,l=this.getLeftPanelElement();"auto"!==this.parent.height&&this.setContentHeight(r,l,o);var h=Xh();if(n.firstElementChild.style[e.cssProperties.rtlBorder]="",n.style[e.cssProperties.rtlPadding]="",r.offsetWidth-r.clientWidth>0?(n.firstElementChild.style[e.cssProperties.border]=h>0?"1px":"0px",n.style[e.cssProperties.padding]=h>0?h-1+"px":"0px"):(n.firstElementChild.style[e.cssProperties.border]="",n.style[e.cssProperties.padding]=""),this.setColWidth(r),e.scrollPosition||!e.isPreventScrollUpdate&&"TimelineMonth"===this.parent.currentView){var d="TimelineMonth"===this.parent.currentView?this.parent.uiStateValues.top:e.scrollPosition.top;l&&(l.scrollTop=d),r.scrollTop=d,this.parent.uiStateValues.isInitial?(this.scrollToSelectedDate(
1),this.parent.uiStateValues.isInitial=!1):r.scrollLeft="TimelineMonth"===this.parent.currentView?this.parent.uiStateValues.left:e.scrollPosition.left}this.retainScrollPosition()},i.prototype.scrollToSelectedDate=function(){var e=new Date(this.parent.selectedDate);e.setHours(0,0,0,0);var t=this.element.querySelector("."+Wt+'[data-date="'+e.getTime().toString()+'"]'),n=this.getContentAreaElement();n.scrollLeft=(0,s.hX)(t)?0:this.parent.enableRtl?-(this.parent.getContentTable().offsetWidth-t.offsetLeft-t.offsetWidth):t.offsetLeft,0===n.scrollLeft&&this.parent.uiStateValues.isInitial&&(this.parent.uiStateValues.left=0)},i.prototype.setContentHeight=function(e,t,n){e.style.height="auto","Month"===this.parent.currentView&&(e.style.height=(0,s.IV)(n)),t&&("MonthAgenda"===this.parent.currentView&&(n=this.parent.activeViewOptions.interval>1?this.getContentAreaElement().firstElementChild.offsetHeight:this.element.querySelector("."+nt).offsetHeight),t.style.height="auto",t.style.height=(0,s.IV)(n-this.getScrollXIndent(e)))},i.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);if(this.parent.activeViewOptions.group.resources.length>0){if(e=this.parent.resourceBase.generateResourceLevels(t),"MonthAgenda"===this.parent.currentView&&(e=[t]),this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.lastResourceLevel.length>0){var n=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex],r=this.getDateSlots(n.renderDates,n.workDays);if(this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.group.hideNonWorkingDays){var o=r.findIndex(function(l,h){return 0!==h&&l.date.getDay()===r[0].date.getDay()});r=o>-1?r.slice(0,o):r}e=[r]}}else e.push(t);return this.colLevels=e,e},i.prototype.getDateSlots=function(e,t){for(var n=this.parent.activeViewOptions.showWeekend?7:t.length,r=[],o=this.isCurrentMonth(this.parent.selectedDate),l=0;l<n;l++){var h=[Wt],d=e.slice(0,n).map(function(p){return p.getDay()});o&&d.indexOf(this.parent.currentTimezoneDate.getDay())===l&&h.push(Uh),r.push({date:e[parseInt(l.toString(),10)],type:"monthDay",className:h,colSpan:1,workDays:t})}return r},i.prototype.getDayNameFormat=function(){return this.parent.isAdaptive||this.parent.activeViewOptions.group.resources.length>0?"abbreviated":"wide"},i.prototype.renderLayout=function(e){this.dayNameFormat=this.getDayNameFormat(),this.setPanel((0,s.n)("div",{className:Zh}));var t=[this.viewClass];t.push(e),this.parent.activeViewOptions.group.byDate&&(t.push("e-by-date"),"Month"!==this.parent.currentView&&(this.parent.activeViewOptions.group.hideNonWorkingDays=!1)),this.parent.activeViewOptions.allowVirtualScrolling&&!this.parent.uiStateValues.isGroupAdaptive&&t.push(Bf),this.parent.rowAutoHeight&&this.parent.eventSettings.ignoreWhitespace&&t.push(ly),(0,s.iQ)([this.element],t),this.renderPanel(e),this.element.appendChild(this.createTableLayout(ed)),this.element.querySelector("table").setAttribute("role","presentation"),this.colLevels=this.generateColumnLevels(),this.renderHeader(),this.renderContent();var n="MonthAgenda"===this.parent.currentView?this.parent.activeView.getPanel():this.parent.element;this.parent.uiStateValues.isGroupAdaptive&&!n.querySelector("."+Ol)&&this.renderResourceMobileLayout(),this.parent.notify(Ri,{}),this.parent.uiStateValues.isCustomMonth&&(this.parent.uiStateValues.isCustomMonth=!1)},i.prototype.refreshHeader=function(){(0,s.TF)(this.element.querySelector("tbody tr")),this.renderHeader(),this.parent.notify(Ri,{});var e=this.element.querySelector("."+bi),t=this.element.querySelector("."+we);e&&(e.scrollLeft=this.parent.uiStateValues.left),t&&(t.scrollLeft=this.parent.uiStateValues.left)},i.prototype.wireCellEvents=function(e){s.Jm.add(e,"mousedown",this.parent.workCellAction.cellMouseDown,this.parent.workCellAction),s.Jm.add(e,"click",this.parent.workCellAction.cellClick,this.parent.workCellAction),this.parent.isAdaptive||s.Jm.add(e,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)},i.prototype.renderHeader=function(){var e=(0,s.n)("tr");this.renderLeftIndent(e);var t=(0,s.n)("td");t.appendChild(this.renderDatesHeader()),e.appendChild(t),(0,s.Hs)([e],this.element.querySelector("tbody"))},i.prototype.renderLeftIndent=function(e){this.parent.activeViewOptions.showWeekNumber&&e.appendChild((0,s.n)("td",{className:"e-left-indent"}))},i.prototype.renderContent=function(){this.parent.activeViewOptions.group.resources.length>0&&(this.parent.resourceBase.renderedResources=(0,s.X$)([],this.parent.resourceBase.lastResourceLevel,null,!0));var e=(0,s.n)("tr");this.parent.activeViewOptions.showWeekNumber&&e.appendChild(this.renderWeekNumberContent());var t=(0,s.n)("td"),n=this.colLevels.slice(0);this.parent.virtualScrollModule&&this.resetColLevels();var r=(0,s.n)("div",{className:we}),o=this.renderContentArea();if("Month"===this.parent.currentView)r.appendChild(o);else{var l=(0,s.n)("div",{className:kn});l.appendChild(o),r.appendChild(l)}s.Jm.add(r,"scroll",this.onContentScroll,this),t.appendChild(r),e.a
1ppendChild(t),this.parent.virtualScrollModule&&(this.colLevels=n,this.parent.virtualScrollModule.renderVirtualTrack(r)),this.element.querySelector("tbody").appendChild(e),this.renderAppointmentContainer()},i.prototype.renderWeekNumberContent=function(){var e=this.renderDates.map(function(u){return new Date(+u)}),t=(0,s.n)("td"),n=(0,s.n)("div",{className:qh});t.appendChild(n);var r=this.createTableLayout();n.appendChild(r);for(var o=this.parent.activeViewOptions.showWeekend?7:this.parent.activeViewOptions.workDays.length,l=0,h=this.renderDates.length/o;l<h;l++){var d=e.splice(0,o),p=this.parent.getWeekNumberContent(d);r.querySelector("tbody").appendChild(this.createWeekNumberElement(p))}return t},i.prototype.renderAppointmentContainer=function(){},i.prototype.renderDatesHeader=function(){var e=(0,s.n)("div",{className:Il}),t=(0,s.n)("div",{className:bi});e.appendChild(t);var n=this.createTableLayout();if("Month"===this.parent.currentView){var r=(0,s.n)("thead");r.appendChild((0,s.n)("tr")),(0,s.Hs)([r],n)}this.createColGroup(n,this.colLevels[this.colLevels.length-1]);for(var o=(0,s.n)("tr"),l=0;l<this.colLevels.length;l++){for(var h=this.colLevels[parseInt(l.toString(),10)],d=o.cloneNode(),p=0;p<h.length;p++){var u=h[parseInt(p.toString(),10)];d.appendChild(this.createHeaderCell(u))}n.querySelector("tbody").appendChild(d)}return t.appendChild(n),e},i.prototype.createHeaderCell=function(e){var t=(0,s.n)("td");if(this.addAttributes(e,t),"monthDay"===e.type){var n=(0,s.n)("span",{innerHTML:yt(this.parent.getDayNames(this.dayNameFormat)[e.date.getDay()],"single")});t.appendChild(n)}if("resourceHeader"===e.type&&this.setResourceHeaderContent(t,e),"dateHeader"===e.type){if((0,s.iQ)([t],ga),t.setAttribute("data-date",e.date.getTime().toString()),this.parent.activeViewOptions.dateHeaderTemplate){var r={date:e.date,type:e.type},h=this.parent.element.id+"_"+this.parent.activeViewOptions.dateHeaderTemplateName+"dateHeaderTemplate",d=[].slice.call(this.parent.getDateHeaderTemplate()(r,this.parent,"dateHeaderTemplate",h,!1,void 0,void 0,this.parent.root));d&&d.length&&(0,s.BC)(d,t)}else{n=(0,s.n)("span",{className:oo});var u=this.parent.globalize.formatDate(e.date,{skeleton:"full",calendar:this.parent.getCalendarMode()});n.setAttribute("title",yt(u,"multiple"));var f=!this.parent.calendarUtil.isMonthStart(e.date)||this.isCurrentDate(e.date)||this.parent.isAdaptive?this.parent.globalize.formatDate(e.date,{skeleton:"d",calendar:this.parent.getCalendarMode()}):this.parent.globalize.formatDate(e.date,{format:"MMM d",calendar:this.parent.getCalendarMode()});n.innerHTML=yt(f,"single"),t.appendChild(n)}this.wireCellEvents(t)}return this.parent.trigger(ti,{elementType:e.type,element:t,date:e.date,groupIndex:e.groupIndex}),t},i.prototype.getContentSlots=function(){if(!this.colLevels[this.colLevels.length-1]||!this.colLevels[this.colLevels.length-1][0])return[];var e=[],t=function(I,w,A,M){var D={date:new Date(+w),groupIndex:A.groupIndex,workDays:A.workDays,type:"monthCells",className:M||[ie]};e[parseInt(I.toString(),10)]||(e[parseInt(I.toString(),10)]=[]),e[parseInt(I.toString(),10)].push(D)},n="MonthAgenda"!==this.parent.currentView&&this.parent.activeViewOptions.group.resources.length>0;if(!n||this.parent.uiStateValues.isGroupAdaptive||this.parent.activeViewOptions.group.byDate){h=this.renderDates.map(function(A){return new Date(+A)}),d=this.parent.activeViewOptions.showWeekend?7:this.parent.activeViewOptions.workDays.length;var v=this.colLevels.slice(0,1)[0],b=this.renderDates.map(Number).indexOf(+v[0].date);for(p=0;p<this.renderDates.length/d;p++){u=h.splice(0,d);for(var _,y=b,S=function(D){var L=u[parseInt(y.toString(),10)];if(y++,n){var V=E.colLevels[E.colLevels.length-1],W=V.slice(0,V.length/d);if(E.parent.activeViewOptions.group.hideNonWorkingDays&&0===(W=V.filter(function(Se){return Se.date.getDay()===L.getDay()})).length)return _=D-=1,"continue";for(var te=0;te<W.length;te++){var $=void 0;0!==te&&($=[ie,"e-disable-date"]),t(p,L,W[parseInt(te.toString(),10)],$)}}else t(p,L,E.colLevels[E.colLevels.length-1][0]);_=D},E=this,T=b;T<this.colLevels[0].length+b&&T<u.length;T++)S(T),T=_}}else for(var r=0,o=this.colLevels[this.colLevels.length-2];r<o.length;r++)for(var l=o[r],h=l.renderDates.map(function(I){return new Date(+I)}),d=this.parent.activeViewOptions.showWeekend?7:l.workDays.length,p=0;p<l.renderDates.length/d;p++)for(var u,f=0,m=u=h.splice(0,d);f<m.length;f++)t(p,m[f],l);return e}
1,i.prototype.updateClassList=function(e){!this.isCustomMonth()&&this.isOtherMonth(e.date)&&e.className.push(pt),this.parent.isMinMaxDate(e.date)||e.className.push(Gr),this.updateSelectedCellClass(e)},i.prototype.updateSelectedCellClass=function(e){},i.prototype.isOtherMonth=function(e){return e.getTime()<this.monthDates.start.getTime()||e.getTime()>this.monthDates.end.getTime()},i.prototype.renderContentArea=function(){var e=this.createTableLayout(nt);this.setAriaAttributes(e),this.addAutoHeightClass(e),"TimelineMonth"===this.parent.currentView&&this.createColGroup(e,this.colLevels[this.colLevels.length-1]);var t=new Date(this.parent.selectedDate.getTime());this.monthDates={start:this.parent.calendarUtil.firstDateOfMonth(t),end:this.parent.calendarUtil.lastDateOfMonth(er(t,this.parent.activeViewOptions.interval-1))};var n=e.querySelector("tbody");return(0,s.BC)(this.getContentRows(),n),this.wireCellEvents(n),e},i.prototype.getContentRows=function(){for(var e=[],t=(0,s.n)("tr"),n=(0,s.n)("td"),r=this.getContentSlots(),l="TimelineMonth"===this.parent.currentView?this.getGroupIndices():[],h=0;h<r.length;h++)if(!(l.length>0&&l.indexOf(r[parseInt(h.toString(),10)][0].groupIndex)>-1)){for(var d=t.cloneNode(),p=0;p<r[parseInt(h.toString(),10)].length;p++){var u=this.createContentTd(r[parseInt(h.toString(),10)][parseInt(p.toString(),10)],n);d.appendChild(u)}e.push(d)}return e},i.prototype.createContentTd=function(e,t){var n=t.cloneNode();e.colSpan&&n.setAttribute("colspan",e.colSpan.toString()),this.updateClassList(e);var r=e.type;if(-1!==e.className.indexOf(tr)&&(e.className.push(Es),r="resourceGroupCells"),this.parent.workHours.highlight&&this.isWorkDay(e.date,e.workDays)&&e.className.push(xl),this.isCurrentDate(e.date)&&e.className.push(cf),(0,s.iQ)([n],e.className),n.setAttribute("data-date",e.date.getTime().toString()),(!(0,s.hX)(e.groupIndex)||this.parent.uiStateValues.isGroupAdaptive)&&n.setAttribute("data-group-index",""+(this.parent.uiStateValues.isGroupAdaptive?this.parent.uiStateValues.groupIndex:e.groupIndex)),this.renderDateHeaderElement(e,n),this.parent.activeViewOptions.cellTemplate){var l={date:e.date,type:r,groupIndex:e.groupIndex},p=this.parent.element.id+"_"+this.parent.activeViewOptions.cellTemplateName+"cellTemplate",u=[].slice.call(this.parent.getCellTemplate()(l,this.parent,"cellTemplate",p,!1,void 0,void 0,this.parent.root));(0,s.BC)(u,n)}return this.parent.trigger(ti,{elementType:r,element:n,date:e.date,groupIndex:e.groupIndex}),n},i.prototype.renderDateHeaderElement=function(e,t){if("TimelineMonth"!==this.parent.currentView){var n=(0,s.n)("div",{className:ga});if(this.parent.activeViewOptions.cellHeaderTemplate){var r={date:e.date,type:e.type,groupIndex:e.groupIndex},h=this.parent.element.id+"_"+this.parent.activeViewOptions.cellHeaderTemplateName+"cellHeaderTemplate",d=[].slice.call(this.parent.getCellHeaderTemplate()(r,this.parent,"cellHeaderTemplate",h,!1,void 0,void 0,this.parent.root));(0,s.BC)(d,n)}else{var p=!this.parent.calendarUtil.isMonthStart(e.date)||this.isCurrentDate(e.date)||this.parent.isAdaptive?this.parent.globalize.formatDate(e.date,{skeleton:"d",calendar:this.parent.getCalendarMode()}):this.parent.globalize.formatDate(e.date,{format:"MMM d",calendar:this.parent.getCalendarMode()});n.innerHTML=yt(p,"single")}if(t.appendChild(n),"month"===this.getModuleName()){(0,s.iQ)([n],oo);var f=this.parent.globalize.formatDate(e.date,{skeleton:"full",calendar:this.parent.getCalendarMode()});t.setAttribute("aria-label",f)}}},i.prototype.getMonthStart=function(e){var r=Ui("Month"!==this.parent.currentView||(0,s.hX)(this.parent.activeViewOptions.displayDate)||this.parent.uiStateValues.isSwipeScroll||!this.parent.uiStateValues.isCustomMonth&&!this.isCustomRange()?this.parent.uiStateValues.isCustomMonth||!this.parent.uiStateValues.isSwipeScroll&&this.isCustomRange()||!this.isCustomMonth()?this.parent.calendarUtil.firstDateOfMonth(e):e:this.parent.activeViewOptions.displayDate,this.parent.activeViewOptions.firstDayOfWeek);return new Date(r.getFullYear(),r.getMonth(),r.getDate())}
1,i.prototype.getMonthEnd=function(e){if(this.isCustomMonth())return K(this.getMonthStart(e),7*(this.parent.activeViewOptions.numberOfWeeks>0?this.parent.activeViewOptions.numberOfWeeks:6)-1);var r=er(e,this.parent.activeViewOptions.interval-1);return K(Ui(this.parent.calendarUtil.lastDateOfMonth(r),this.parent.activeViewOptions.firstDayOfWeek),6)},i.prototype.isCustomRange=function(){var e=this.parent.getCurrentViewDates();if(e&&e.length>0){var t=k(this.parent.selectedDate).getTime(),n=Ui(e[e.length-1],this.parent.activeViewOptions.firstDayOfWeek);return!(t>=Ui(e[0],this.parent.activeViewOptions.firstDayOfWeek).getTime()&&t<=K(n,6).getTime())}return!1},i.prototype.getRenderDates=function(e,t){void 0===t&&(t=this.parent.selectedDate);var n=[],r=k(t),o=this.getMonthStart(r),l=this.getMonthEnd(r);do{(this.parent.activeViewOptions.showWeekend||this.isWorkDay(o,e))&&n.push(o),(o=K(o,1)).getHours()>0&&(o=k(o))}while(o.getTime()<=l.getTime());return e||(this.renderDates=n),this.parent.headerModule&&this.parent.headerModule.previousNextIconHandler(),n},i.prototype.getNextPreviousDate=function(e){if(this.isCustomMonth()){var t=this.parent.getCurrentViewDates();return K(Ui("Next"===e?t[t.length-1]:t[0],this.parent.activeViewOptions.firstDayOfWeek),"Next"===e?7:7*-(this.parent.activeViewOptions.numberOfWeeks>0?this.parent.activeViewOptions.numberOfWeeks:6))}return er(this.parent.selectedDate,("Next"===e?1:-1)*this.parent.activeViewOptions.interval)},i.prototype.getStartDate=function(){return this.getMonthStart(this.parent.selectedDate)},i.prototype.getEndDate=function(){return this.getMonthEnd(this.parent.selectedDate)},i.prototype.getEndDateFromStartDate=function(e){return K(new Date(e.getTime()),1)},i.prototype.getDateRangeText=function(e,t){if(void 0===e&&(e=this.parent.selectedDate),void 0===t&&(t=null),this.parent.isAdaptive||(0,s.hX)(this.parent.activeViewOptions.dateFormat)){e=!(0,s.hX)(t)&&t.length>6?t[6]:e;var r=void 0,o=!1;if(this.isCustomMonth()){var l=!(0,s.hX)(t)&&t.length>0?t:this.parent.getCurrentViewDates();(o=l[0].getMonth()!==l[l.length-1].getMonth()||l[0].getFullYear()!==l[l.length-1].getFullYear())&&(e=l[0],r=l[l.length-1])}var h="Month"!==this.parent.currentView||!this.isCustomMonth();return this.parent.activeViewOptions.interval>1&&h||o?(r=r||er(no(e),this.parent.activeViewOptions.interval-1),e.getFullYear()===r.getFullYear()?yt(this.parent.globalize.formatDate(e,{format:"MMMM",calendar:this.parent.getCalendarMode()})+" - "+this.parent.globalize.formatDate(r,{format:"MMMM ",calendar:this.parent.getCalendarMode()})+this.parent.globalize.formatDate(r,{skeleton:"y",calendar:this.parent.getCalendarMode()}),"single"):yt(this.parent.globalize.formatDate(e,{format:"MMMM",calendar:this.parent.getCalendarMode()})+" "+e.getFullYear()+" - "+this.parent.globalize.formatDate(r,{format:"MMMM ",calendar:this.parent.getCalendarMode()})+this.parent.globalize.formatDate(r,{skeleton:"y",calendar:this.parent.getCalendarMode()}),"single")):yt(this.parent.globalize.formatDate(e,{format:this.parent.activeViewOptions.dateFormat?this.parent.activeViewOptions.dateFormat:"MMMM y",calendar:this.parent.getCalendarMode()}),"single")}return this.formatDateRange(!(0,s.hX)(t)&&t.length>0?t[0]:this.parent.selectedDate)},i.prototype.getLabelText=function(e){var t=e.charAt(0).toLowerCase()+e.substring(1);return this.formatViewLabel(t,this.getStartDate(),this.getEndDate())},i.prototype.createWeekNumberElement=function(e){var t=(0,s.n)("tr"),n=(0,s.n)("td",{className:Gh,attrs:{title:e?this.parent.localeObj.getConstant("week")+" "+e:""},innerHTML:e||""});return t.appendChild(n),this.parent.trigger(ti,{elementType:"weekNumberCell",element:n}),t},i.prototype.unWireEvents=function(){var e=this.element.querySelector("."+we);e&&s.Jm.remove(e,"scroll",this.onContentScroll)},i.prototype.isCustomMonth=function(){return"Month"===this.parent.currentView&&(!(0,s.hX)(this.parent.activeViewOptions.displayDate)||this.parent.activeViewOptions.numberOfWeeks>0)},i.prototype.getModuleName=function(){return"month"},i.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed?this.parent=null:this.element&&(this.monthEvent&&(this.monthEvent.destroy(),this.monthEvent=null),this.unWireEvents(),this.parent.resourceBase&&this.parent.resourceBase.destroy(),this.parent.scheduleTouchMo
1dule&&this.parent.scheduleTouchModule.resetValues(),a.prototype.destroy.call(this))},i}(wd),oA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),ym=function(a){function i(e){var t=a.call(this,e)||this;return t.viewClass="e-year-view",t.isInverseTableSelect=!1,t.yearEventModule=null,t}return oA(i,a),i.prototype.getModuleName=function(){return"year"},i.prototype.renderLayout=function(e){this.parent.resourceBase&&this.parent.resourceBase.generateResourceLevels([{renderDates:this.parent.activeView.renderDates}]),this.setPanel((0,s.n)("div",{className:Zh})),(0,s.iQ)([this.element],[this.viewClass,"Horizontal"===this.parent.activeViewOptions.orientation?"e-horizontal":"e-vertical",e]),this.renderPanel(e),this.parent.activeViewOptions.allowVirtualScrolling&&(0,s.iQ)([this.element],[Bf]);var n=this.createTableLayout(ed);this.element.appendChild(n),this.element.querySelector("table").setAttribute("role","presentation");var r=n.querySelector("tbody");this.rowCount=this.getRowColumnCount("row"),this.columnCount=this.getRowColumnCount("column"),this.renderHeader(r),this.renderContent(r),"Year"!==this.parent.currentView&&this.parent.uiStateValues.isGroupAdaptive&&(this.generateColumnLevels(),this.renderResourceMobileLayout()),s.Jm.add(this.element.querySelector("."+we),"scroll",this.onContentScroll,this),this.parent.notify(Ri,{})},i.prototype.renderHeader=function(e){},i.prototype.renderContent=function(e){var t=(0,s.n)("tr");e.appendChild(t);var n=(0,s.n)("td");t.appendChild(n),this.element.querySelector("tbody").appendChild(t);var r=(0,s.n)("div",{className:we});n.appendChild(r);var o=this.createTableLayout("e-calendar-table");r.appendChild(o);var l=(0,s.n)("tr");o.querySelector("tbody").appendChild(l);var h=(0,s.n)("td");l.appendChild(h);var d=(0,s.n)("div",{className:"e-calendar-wrapper"});h.appendChild(d);for(var u=0,f=this.getMonths();u<f.length;u++){var m=f[u],g=new Date(this.parent.selectedDate.getFullYear(),m,1),v=(0,s.n)("div",{className:"e-month-calendar e-calendar",attrs:{"data-role":"calendar"}});v.appendChild(this.renderCalendarHeader(g)),v.appendChild(this.renderCalendarContent(g)),d.appendChild(v)}this.renderDates.splice(0,1)},i.prototype.renderCalendarHeader=function(e){var t=(0,s.n)("div",{className:"e-header e-month"}),n=(0,s.n)("div",{className:"e-day e-title"});if(this.parent.activeViewOptions.monthHeaderTemplate){var r={date:e,type:"monthHeader"};this.renderTemplates(this.parent.getMonthHeaderTemplate(),r,"monthHeaderTemplate",this.parent.activeViewOptions.monthHeaderTemplateName,n)}else n.innerHTML=this.getMonthName(e);return t.appendChild(n),this.parent.trigger(ti,{elementType:"headerCells",element:n,date:e}),t},i.prototype.renderCalendarContent=function(e){var t=this.getMonthDates(e),n=(0,s.n)("div",{className:"e-content e-month"}),r=this.createTableLayout("e-calendar-table "+nt);n.appendChild(r),this.setAriaAttributes(r);var o=(0,s.n)("thead",{className:"e-week-header"}),l=(0,s.n)("tr"),h=Ui(la(e),this.parent.activeViewOptions.firstDayOfWeek);this.parent.activeViewOptions.showWeekNumber&&l.appendChild((0,s.n)("th"));for(var d=0;d<7;d++){if(this.parent.activeViewOptions.dayHeaderTemplate){var p=(0,s.n)("th"),u={date:h,type:"dayHeader"};this.renderTemplates(this.parent.getDayHeaderTemplate(),u,"dayHeaderTemplate",this.parent.activeViewOptions.dayHeaderTemplateName,p),l.appendChild(p)}else l.appendChild((0,s.n)("th",{innerHTML:this.parent.getDayNames("narrow")[h.getDay()]}));var f=new Date(h.getTime()+bt);h=f.getDate()===h.getDate()?K(f,1):f}o.appendChild(l),(0,s.Hs)([o],r);for(var m=r.querySelector("tbody");t.length>0;){var g=t.splice(0,7),v=(0,s.n)("tr");if(this.parent.activeViewOptions.showWeekNumber){var b=this.parent.getWeekNumberContent(g),y=(0,s.n)("td",{className:"e-week-number",attrs:{title:this.parent.localeObj.getConstant("week")+" "+b},innerHTML:b});v.appendChild(y),this.parent.trigger(ti,{elementType:"weekNumberCells",element:y})}for(var S=0,E=g;S<E.length;S++){var _=E[S];if(y=(0,s.n)("td",{className:"e-cell "+ie,attrs:{"data-date":_.getTime().toString()}}),this.parent.activeViewOptions.cellHeaderTemplate)u={date:_,type:"monthCells"},this.renderTemplates(this.parent.getCellHeaderTemplate(),u,"cellHeaderTemplate",this.parent.activeViewOptions.cellHeaderTemplateName,y);else{var T=(0,s.n)("span",{className:"e-day",innerHTML:this.parent.globalize.formatDate(_,{skeleton:"d",calendar:this.parent.getCalendarMode()}),attrs:{title:this.parent.globalize.formatDate(_,{type:"date",skeleton:"full"})}});y.appendChild(T)}this.parent.activeViewOptions.cellTemplate&&(u={date:_,type:"monthCells"},this.renderTemplates(this.parent.getCellTemplate(),u,"cellTemplate",this.parent.activeViewOptions.cellTemplateName,y));var I=[];e.getMonth()!==_.getMonth()&&(I.push(pt),y.firstElementChild&&!this.parent.activeViewOptions.cellTemplate&&y.firstElementChild.setAttribute("aria-disabled","true")),this.isCurrentDate(_)&&e.getMonth()===_.getMonth()&&(I=I.concat(["e-today","e-selected"])),I.length>0&&(0,s.iQ)([y],I),v.appendChild(y),e.getMonth()===_.getMonth()&&this.renderDates.push(new Date(_)),this.parent.isMinMaxDate(_)?(s.Jm.add(y,"click",this.onCellClick,this),this.parent.isAdaptive||s.Jm.add(y,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)):(0,s.iQ)([y],Gr),this.parent.trigger(ti,{elementType:"workCells",element:y,date:_})}m.appendChild(v)}return n},i.prototype.createTableColGroup=function(e){for(var t=(0,s.n)("colgroup"),n=0;n<e;n++)t.appendChild((0,s.n)("col"));return t},i.prototype.getMonthName=function(e){return yt(this.parent.globalize.formatDate(e,{format:this.parent.activeViewOptions.dateFormat||"MMMM y",calendar:this.parent.getCalendarMode()}),"multiple")},i.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots([this.parent.selectedDate],this.parent.activeViewOptions.workDays);return this.parent.activeViewOptions.group.resources.length>0?(e=this.parent.resourceBase.generateResourceLevels(t),this.parent.uiStateValues.isGroupAdaptive&&(e=[this.getDateSlots([this.parent.selectedDate],this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].workDays)])):e.push(t),e.pop(),this.colLevels=e,e},i.prototype.getDateSlots=function(e,t,n,r){return void 0===n&&(n=this.parent.workHours.start),void 0===r&&(r=this.parent.workHours.end),[{date:e[0],type:"dateHeader",className:[Wt],colSpan:1,workDays:t,startHour:new Date(+this.parent.globalize.parseDate(n,{skeleton:"Hm"})),endHour:new Date(+this.parent.globalize.parseDate(r,{skeleton:"Hm"}))}]},i.prototype.getMonthDates=function(e){for(var t=Ui(la(e),this.parent.activeViewOptions.firstDayOfWeek),n=K(new Date(+t),42),r=[],o=t;o.getTime()<n.getTime();o=K(o,1))r.push(k(new Date(o)));return r},i.prototype.getRowColumnCount=function(e){for(var t=this.getMonths(),n=this.parent.selectedDate.getFullYear(),r=[],o=0,l=t;o<l.length;o++){var h=l[o];r.push(new Date(n,h,1).getDay()+new Date(n,h+1,0).getDate())}var d=Math.max.apply(Math,r);return"row"===e?"Horizontal"===this.parent.activeViewOptions.orientation?t.length:d:"Horizontal"===this.parent.activeViewOptions.orientation?d:t.length},i.prototype.isCurrentDate=function(e){return k(new Date).getTime()===k(new Date(e.getTime())).getTime()},i.prototype.getMonths=function(){var e=this;return Array.apply(null,{length:this.parent.activeViewOptions.monthsCount}).map(function(t,n){return e.parent.firstMonthOfYear+n})},i.prototype.renderTemplates=function(e,t,n,r,o){var h=[].slice.call(e(t,this.parent,n,this.parent.element.i
1d+"_"+r+n,!1,void 0,void 0,this.parent.root));(0,s.BC)(h,o)},i.prototype.onCellClick=function(e){var t=(0,s.kp)(e.target,"."+ie),n=this.parent.getDateFromElement(t);this.parent.activeCellsData=this.parent.getCellDetails(t);var r=n.getTime()<this.getStartDate().getTime();if(r||n.getTime()>this.getEndDate().getTime()){this.parent.changeDate(this.parent.activeView.getNextPreviousDate(r?"Previous":"Next"),e);var o=this.parent.activeCellsData.startTime.getTime(),h=o>=this.getStartDate().getTime()&&o<=this.getEndDate().getTime()?o:(r?this.getEndDate():this.getStartDate()).getTime(),d=this.parent.element.querySelector(":not(."+pt+')[data-date="'+h+'"]');this.parent.selectCell(d),this.parent.activeCellsData=this.parent.getCellDetails(d)}else{var p=K(new Date(n.getTime()),1),f={date:n,event:this.parent.eventBase.filterEvents(n,p),element:e.target};t.classList.contains(pt)&&(t=this.parent.element.querySelector(":not(."+pt+')[data-date="'+t.getAttribute("data-date")+'"]')),this.parent.activeCellsData=this.parent.getCellDetails(t);var m=(0,s.X$)(this.parent.activeCellsData,{cancel:!1,event:e,name:"cellClick"});this.parent.trigger(fr,m),this.parent.quickPopup.moreEventClick(f,p)}},i.prototype.onContentScroll=function(e){var t=e.target,n=this.getDatesHeaderElement();this.parent.notify(El,e),n&&(n.firstElementChild.scrollLeft=t.scrollLeft);var o=this.element.querySelector("."+uo+",."+Wi);o&&(o.scrollTop=t.scrollTop),this.parent.isAdaptive||(this.parent.uiStateValues.top=e.target.scrollTop),this.parent.uiStateValues.left=e.target.scrollLeft,this.setPersistence()},i.prototype.onScrollUiUpdate=function(e){var t=this.parent.element.offsetHeight-this.getHeaderBarHeight(),n=this.element.querySelector("."+Il);n&&(t-=n.offsetHeight);var r=this.element.querySelector("."+we);if(r&&(r.style.height=(0,s.IV)(t)),!this.parent.isAdaptive&&n){var o=Xh();r.offsetWidth-r.clientWidth>0?(n.firstElementChild.style[e.cssProperties.border]=o>0?"1px":"0px",n.style[e.cssProperties.padding]=o>0?o-1+"px":"0px"):(n.firstElementChild.style[e.cssProperties.border]="",n.style[e.cssProperties.padding]="")}this.setColWidth(this.getContentAreaElement());var h=this.element.querySelector("."+uo+",."+Wi);h&&(h.style.height=(0,s.IV)(t-(r.scrollWidth>r.clientWidth?17:0))),e.isPreventScrollUpdate||(this.parent.uiStateValues.isInitial?(this.parent.uiStateValues.isInitial=!1,this.parent.uiStateValues.top=this.parent.uiStateValues.left=0):(h&&(h.scrollTop=this.parent.uiStateValues.top),r.scrollTop=this.parent.uiStateValues.top,r.scrollLeft=this.parent.uiStateValues.left)),this.retainScrollPosition()},i.prototype.getStartDate=function(){return new Date(this.parent.selectedDate.getFullYear(),this.parent.firstMonthOfYear%12,1)},i.prototype.getEndDate=function(){return K(er(this.getStartDate(),this.parent.monthsCount),-1)},i.prototype.startDate=function(){return"Year"===this.parent.currentView?Ui(this.getStartDate(),this.parent.activeViewOptions.firstDayOfWeek):this.getStartDate()},i.prototype.endDate=function(){return K("Year"===this.parent.currentView?Hh(this.getEndDate(),this.parent.activeViewOptions.firstDayOfWeek):this.getEndDate(),1)},i.prototype.getEndDateFromStartDate=function(e){var t=new Date(e.getTime());return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(t=no(t)),K(new Date(t.getTime()),1)},i.prototype.getNextPreviousDate=function(e){return function cx(a,i){var e=(a=new Date(""+a)).getDate();return a.setDate(1),a.setFullYear(a.getFullYear()+i),a.setDate(Math.min(e,gb(a))),a}(this.parent.selectedDate,"Next"===e?1:-1)},i.prototype.getDateRangeText=function(e,t){void 0===e&&(e=this.parent.selectedDate),void 0===t&&(t=null);var n=!(0,s.hX)(t)&&t.length>0,r=n?t[0]:this.getStartDate(),o=n?t[t.length-1]:this.getEndDate();return r.getFullYear()!==o.getFullYear()?this.parent.globalize.formatDate(r,{skeleton:"yMMM"})+" - "+this.parent.globalize.formatDate(o,{skeleton:"yMMM"}):this.parent.globalize.formatDate(n?t[0]:e,{skeleton:"y"})},i.prototype.addEventListener=function(){this.parent.on(fn,this.onScrollUiUpdate,this),this.parent.on(un,this.onDataReady,this)},i.prototype.removeEventListener=function(){this.parent&&(this.parent.off(fn,this.onScrollUiUpdate),this.parent.off(un,this.onDataReady))},i.prototype.onDataReady=function(e){this.yearEventModule=new hS(this.parent),this.yearEventModule.renderAppointments(),this.parent.notify(Ss,e)},i.prototype.scrollToDate=function(e){var t=+new Date(k(e)),n=this.element.querySelector("."+ie+":not(."+pt+')[data-date="'+t+'"]');
1n&&(n=(0,s.kp)(n,".e-month-calendar"),this.getContentAreaElement().scrollTop=n.offsetTop)},i.prototype.destroy=function(){if(!this.parent||this.parent&&this.parent.isDestroyed)this.parent=null;else if(this.element){var e=this.element.querySelector("."+we);e&&s.Jm.remove(e,"scroll",this.onContentScroll),this.yearEventModule&&(this.yearEventModule.destroy(),this.yearEventModule=null),this.parent.resourceBase&&this.parent.resourceBase.destroy(),a.prototype.destroy.call(this)}},i}(wd),aA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),mS=function(a){function i(e){return a.call(this,e)||this}return aA(i,a),i.prototype.createAgendaContentElement=function(e,t,n,r,o){var h,l=this,d=this.parent.eventFields;if("noEvents"===e){var p=[{subject:this.parent.localeObj.getConstant("noEvents")}];0===(h=ce.iY.createList(this.parent.createElement,p,{moduleName:"agenda",listClass:this.parent.activeView.viewClass,itemClass:this.parent.activeView.viewClass,template:(0,s.dG)(function(){return'<div class="'+yf+'">'+l.parent.localeObj.getConstant("noEvents")+"</div>"})})).querySelector(".e-agenda-item").children.length&&h.firstElementChild.appendChild((0,s.n)("div",{className:yf,innerHTML:this.parent.localeObj.getConstant("noEvents")}))}else h=ce.iY.createList(this.parent.createElement,t,{moduleName:"agenda",listClass:this.parent.activeView.viewClass,itemClass:this.parent.activeView.viewClass}),[].slice.call(h.children).forEach(function(f,m){var v,g=(0,s.n)("div",{className:Ce,attrs:{"data-id":"Appointment_"+t[parseInt(m.toString(),10)][""+l.parent.eventFields.id],"data-guid":t[parseInt(m.toString(),10)].Guid,role:"button",tabindex:"0","aria-disabled":l.parent.eventBase.getReadonlyAttribute(t[parseInt(m.toString(),10)]),"aria-label":l.parent.getAnnouncementString(t[parseInt(m.toString(),10)])}});if((0,s.hX)(o)||g.setAttribute("data-group-index",o.toString()),l.parent.eventBase.applyResourceColor(g,t[parseInt(m.toString(),10)],"borderColor",r),(0,s.hX)(l.parent.activeViewOptions.eventTemplate))v=l.createAppointment(t[parseInt(m.toString(),10)]);else{(0,s.iQ)([g],"e-template");var S=l.parent.element.id+"_"+l.parent.activeViewOptions.eventTemplateName+"eventTemplate";if(v=l.parent.getAppointmentTemplate()(t[parseInt(m.toString(),10)],l.parent,"eventTemplate",S,!1,void 0,void 0,l.parent.root),!(0,s.hX)(t[parseInt(m.toString(),10)][d.recurrenceRule])){var E=t[parseInt(m.toString(),10)][d.id]===t[parseInt(m.toString(),10)][d.recurrenceID]?Ml:Ll;g.appendChild((0,s.n)("div",{className:Nt+" "+E}))}}(0,s.BC)([].slice.call(v),g),Dn(f),f.appendChild(g);var _={data:(0,s.X$)({},t[parseInt(m.toString(),10)],null,!0),element:f,cancel:!1};l.parent.trigger(oa,_,function(T){T.cancel&&(0,s.TF)(f)})});return n.appendChild(h),("MonthAgenda"===this.parent.currentView&&this.parent.activeViewOptions.group.resources.length>0||"Agenda"===this.parent.currentView)&&(0,s.iQ)([n],Mb),this.parent.renderTemplates(),n},i.prototype.createAppointment=function(e){var t=this.parent.eventFields,n=e[t.subject]||this.parent.eventSettings.fields.subject.default||this.parent.localeObj.getConstant("addTitle"),r=e[t.location]||this.parent.eventSettings.fields.location.default,o=(0,s.n)("div",{className:Kh});!(0,s.hX)(r)&&""!==r&&(n+=",");var l=(0,s.n)("div",{className:Ut});if(this.parent.sanitize(n,l),o.appendChild(l),!(0,s.hX)(r)&&""!==r){var h=(0,s.n)("div",{className:lo});this.parent.sanitize(r,h),o.appendChild(h)}(0,s.hX)(e[t.recurrenceRule])||o.appendChild((0,s.n)("div",{className:Nt+" "+(e[t.id]===e[t.recurrenceID]?Ml:Ll)}));var p=e[t.startTime],u=e[t.endTime],f=e[t.isAllDay],m=this.parent.localeObj.getConstant("allDay"),g=this.parent.getTimeString(p)+" - "+this.parent.getTimeString(u);(0,s.hX)(e.data)||(m=((u.getTimezoneOffset()!==p.getTimezoneOffset()?u.getTime()-p.getTime()+36e5:u.getTime()-p.getTime())/bt>=1?m:g)+" ("+this.parent.localeObj.getConstant("day")+" "+e.data.index+"/"+e.data.count+")");var y=!(0,s.hX)(e.data)||f?m:g;return[o,(0,s.n)("div",{className:bf,innerHTML:y})]},i.prototype.processAgendaEvents=function(e){var t=[];if((0,s.hX)(e))return t;for(var n=0,r=e;n<r.length;n++){var o=r[n],l=this.parent.eventBase.splitEventByDay(o);t=t.concat(l.length>1?l:o)}return t},i.prototype.wireEventActions=function(){for(var t=0,n=[].slice.call(this.parent.element.querySelectorAll("."+Ce));t<n.length;t++)this.parent.eventBase.wireAppointmentEvents(r=n[t],this.parent.getEventDetails(r),!0);for(var l=0,h=[].slice.call(this.parent.element.querySelectorAll(".e-m-date"));l<h.length;l++){var r;s.Jm.add(r=h[l],"click",this.parent.agendaModule.dayNavigationClick,this)}},i.prototype.calculateResourceTableElement=function(e,t,n,r){if(void 0===r&&(r=null),(0,s.hX)(this.parent.resourceBase.lastResourceLevel)){var o=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);this.parent.resourceBase.generateResourceLevels(o)}for(var l=K(new Date(n.getTime()),t),h=this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView?t:1,d=this.parent.resourceBase.resourceCollection,p=this.parent.resourceBase.lastResourceLevel,u=n,f=n,m=this.parent.activeViewOptions.showWeekend,g=0;g<h;g++){var v=[],b=[],y=0,S=void 0,E=void 0,_=K(f,g);if("Agenda"===this.parent.currentView&&this.parent.activeViewOptions.group.byDate&&this.parent.activeViewOptions.allowVirtualScrolling&&!m&&!this.isWorkDay(_)){do{
1if((_=K(_,1))>=r)break}while(!this.isWorkDay(_)||this.parent.eventBase.filterEvents(_,K(_,1)).length<1);if(_>=r)break;f=K(_,-g),l=K(_,1)}var T=this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView?K(_,1):l,I=this.parent.eventBase.filterEvents(_,T);if(I.length>0||!this.parent.hideEmptyAgendaDays||"MonthAgenda"===this.parent.currentView){for(var w=0;w<p.length;w++){t=this.parent.activeViewOptions.group.byDate&&"MonthAgenda"!==this.parent.currentView?1:t;var A=[],M=this.parent.eventBase.filterEvents(n=_,l,I,p[parseInt(w.toString(),10)]);if(M.length>0||!this.parent.hideEmptyAgendaDays||"MonthAgenda"===this.parent.currentView)for(var D=0;D<t;D++){var L=this.parent.eventBase.filterEvents(n,K(n,1),M,void 0);if(((m||!m&&(this.parent.group.byDate?this.isWorkDay(n):this.isWorkDay(n,p[parseInt(w.toString(),10)].workDays)))&&(L.length>0||!this.parent.hideEmptyAgendaDays)||"MonthAgenda"===this.parent.currentView)&&(A.push(L[0]),S={rowSpan:1,type:"eventColumn",resource:d[d.length-1],groupIndex:p[parseInt(w.toString(),10)].groupIndex,groupOrder:p[parseInt(w.toString(),10)].groupOrder,resourceData:p[parseInt(w.toString(),10)].resourceData,eventData:L,date:n},E={rowSpan:1,type:"dateColumn",resource:d[parseInt((d.length-1).toString(),10)],groupOrder:p[parseInt(w.toString(),10)].groupOrder,resourceData:p[parseInt(w.toString(),10)].resourceData,date:n},v[parseInt(y.toString(),10)]||(v[parseInt(y.toString(),10)]=[]),v[parseInt(y.toString(),10)].push(S),v[parseInt(y.toString(),10)].push(E),y++),(n=K(n,1)).getTime()>=l.getTime()||this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView){if(A.length>0){v[v.length-1][1].cssClass=Mb;var V={rowSpan:A.length,type:"resourceColumn",resource:d[parseInt((d.length-1).toString(),10)],groupOrder:p[parseInt(w.toString(),10)].groupOrder.slice(0,-1),resourceData:p[parseInt(w.toString(),10)].resourceData,groupIndex:v.length-A.length,className:[Ab],date:n};v[parseInt((v.length-A.length).toString(),10)].push(V),b.push((0,s.X$)({},V,null,!0))}break}}}for(var G=d.slice(0,-1),W=[],te=0,$=0;$<G.length;$++){A=G[G.length-($+1)].dataSource;for(var Se=0;Se<A.length;Se++)for(var Ie=0,Re=0;Re<b.length;Re++)b[parseInt(Re.toString(),10)].groupOrder[G.length-($+1)]===A[parseInt(Se.toString(),10)][G[G.length-($+1)].idField]&&(te+=b[parseInt(Re.toString(),10)].rowSpan,W.push((0,s.X$)({},b[parseInt(Re.toString(),10)],null,!0))),++Ie===b.length&&W.length>0&&(W[0].rowSpan=te,W[0].type="parentColumnLevel_"+($+1),W[0].resource=G[G.length-($+1)],W[0].resourceData=A[parseInt(Se.toString(),10)],W[0].date=n,v[W[0].groupIndex].push(W[0]),W=[],te=0)}this.createResourceTableRow(v,e)}}0===this.parent.eventBase.filterEvents(u,l).length&&!this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays&&this.renderEmptyContent(e,u)},i.prototype.createResourceTableRow=function(e,t){var r,l,d,n=(0,s.n)("tr"),o=(0,s.n)("td"),h=0;if(this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView){for(var p=[],u=this.parent.resourceBase.resourceCollection.slice(0,-1),f=0;f<e.length;f++)p=p.concat(e[parseInt(f.toString(),10)]);d=u.length>0?"parentColumnLevel_"+u.length:"resourceColumn";for(var m=p.filter(function(D){return D.type===d}),g=0;g<m.length;g++)h+=m[parseInt(g.toString(),10)].rowSpan}for(var v=0;v<e.length;v++){r=n.cloneNode();for(var b=e[parseInt(v.toString(),10)].length-1;b>=0;b--){var y=e[parseInt(v.toString(),10)][parseInt(b.toString(),10)],S=o.cloneNode();if("dateColumn"===y.type){if(this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView){l=e[parseInt(v.toString(),10)][parseInt(b.toString(),10)];continue}S.setAttribute("data-date",y.date.getTime().toString()),S.appendChild(this.createDateHeaderElement(y.date));var E=[br,kb];y.cssClass&&E.push(y.cssClass),(0,s.iQ)([S],E),this.isCurrentDate(new Date(y.date.getTime()))&&(0,s.iQ)(S.childNodes,Pb),r.appendChild(S)}else if("eventColumn"===y.type){for(var _=0===y.eventData.length?"noEvents":"data",T=0;T<r.childNodes.length;T++){var I=r.childNodes.item(T),w=I.classList.contains("e-resource-column")?"resourceHeader":hb;this.parent.trigger(ti,{elementType:w,element:I,date:y.date,groupIndex:y.groupIndex})}(S=this.createAgendaContentElement(_,y.eventData,S,y.groupOrder,y.groupIndex)).setAttribute("data-date",y.date.getTime().toString()),(this.parent.activeViewOptions.group.byDate||"MonthAgenda"===this.parent.currentView)&&(0,s.iQ)([S],[br,"e-day-padding"]),r.appendChild(S),this.parent.trigger(ti,{elementType:0===y.eventData.length?Qu:cb,element:S,date:y.date,groupIndex:y.groupIndex})}else S.setAttribute("rowspan",y.rowSpan.toString()),(0,s.iQ)([S],"e-resource-column"),this.setResourceHeaderContent(S,y,y.className[0]),r.appendChild(S)}if(this.parent.activeViewOptions.group.byDate&&0===v&&"MonthAgenda"!==this.parent.currentView){(S=o.cloneNode()).setAttribute("data-date",l.date.getTime().toString()),S.setAttribute("rowspan",h.toString()),S.appendChild(this.createDateHeaderElement(l.date)),(0,s.iQ)([S],[br,kb,"e-date-border"]);var M=rf(this.parent.selectedDate.getTime(),l.date.getTime());if(r.setAttribute("data-row-index",M.toString()),this.parent.element.querySelector('.e-agenda-view tr[data-row-index="'+M+'"]'))break;r.insertBefore(S,r.childNodes[0])}t.appendChild(r)}},i.prototype.createDateHeaderElement=function(e){var t;if(this.parent.activeViewOptions.dateHeaderTemplate){t=(0,s.n)("div",{className:Db});var n={date:e,type:"dateHeader"}
1,l=this.parent.element.id+"_"+this.parent.activeViewOptions.dateHeaderTemplateName+"dateHeaderTemplate",h=[].slice.call(this.parent.getDateHeaderTemplate()(n,this.parent,"dateHeaderTemplate",l,!1,void 0,void 0,this.parent.root));(0,s.BC)(h,t)}else t=this.getMobileDateElement(e,Db);return t},i.prototype.renderEmptyContent=function(e,t,n){var r=this.createTableRowElement(t,"noEvents"),o=r.children[0],l=(0,s.n)("div",{className:"e-empty-event",innerHTML:this.parent.localeObj.getConstant("noEvents")});o.appendChild(l),e.appendChild(r),n&&this.parent.trigger(ti,{elementType:Qu,element:o,date:t})},i.prototype.createTableRowElement=function(e,t){var n=rf(this.parent.selectedDate.getTime(),e.getTime()),r=(0,s.n)("tr",{attrs:{"data-row-index":n.toString()}}),o=(0,s.n)("td",{attrs:{class:"monthHeader"===t?Dl:br,"aria-selected":"false","data-column-index":n.toString(),"data-date":e.getTime().toString()}}),l=o.cloneNode(),h=o.cloneNode();return r.appendChild(l),"noEvents"!==t&&r.appendChild(h),r},i.prototype.destroy=function(){a.prototype.destroy.call(this)},i}(wd),lA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),gS=function(a){function i(e){var t=a.call(this,e)||this;return t.viewClass="e-agenda-view",t.isInverseTableSelect=!1,t.agendaDates={},t.virtualScrollTop=1,t}return lA(i,a),i.prototype.getModuleName=function(){return"agenda"},i.prototype.renderLayout=function(){this.agendaDates={},this.element=(0,s.n)("div",{className:Zh}),(0,s.iQ)([this.element],this.viewClass),this.element.appendChild(this.createTableLayout(ed)),this.element.querySelector("table").setAttribute("role","presentation"),this.parent.element.querySelector("."+kn).appendChild(this.element);var e=(0,s.n)("tr");this.element.querySelector("tbody").appendChild(e);var t=(0,s.n)("td");e.appendChild(t);var n=(0,s.n)("div",{className:we});t.appendChild(n);var r=this.createTableLayout(nt);this.setAriaAttributes(r),n.appendChild(r);var o=r.querySelector("tbody"),l=k(this.parent.selectedDate);this.renderEmptyContent(o,l),this.wireEvents(),this.parent.resourceBase&&this.parent.resourceBase.generateResourceLevels([{renderDates:this.parent.activeView.renderDates}]),this.parent.uiStateValues.isGroupAdaptive&&!this.parent.element.querySelector("."+Ol)&&this.renderResourceMobileLayout(),this.parent.notify(Ri,{})},i.prototype.eventLoad=function(e){this.dataSource=(0,s.X$)([],this.parent.eventsData,null,!0);for(var t=0,n=this.parent.eventsData;t<n.length;t++)delete n[t].generatedDates;var o=this.parent.activeViewOptions.allowVirtualScrolling?e.processedData:this.parent.eventsProcessed;if(this.parent.uiStateValues.isGroupAdaptive){var l=this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex];this.dataSource=this.parent.eventBase.filterEventsByResource(l,this.dataSource),o=this.parent.eventBase.filterEventsByResource(l,o)}this.parent.eventsProcessed=this.processAgendaEvents(o);var h=k(this.parent.selectedDate),d=this.element.querySelector("."+nt+" tbody");Dn(d),this.renderInitialContent(d,h),this.wireEventActions(),(0,s.kp)(d,"."+we).scrollTop=1,this.parent.notify(Ss,{}),this.parent.activeViewOptions.allowVirtualScrolling||this.retainScrollPosition()},i.prototype.refreshEvent=function(e){for(var t=[],n=this.parent.eventFields,r=0,o=this.dataSource;r<o.length;r++){var l=o[r];(0,s.hX)(l[n.recurrenceID])&&!(0,s.hX)(l[n.recurrenceRule])&&!(0,s.hX)(l.generatedDates)&&e>=l.generatedDates.end&&(t=t.concat(this.parent.eventBase.generateOccurrence(l,e)))}this.parent.eventsProcessed=this.parent.eventsProcessed.concat(this.processAgendaEvents(t))},i.prototype.refreshHeader=function(){var e=this.element.querySelector("."+nt+" tbody");this.parent.activeViewOptions.group.byDate?Dn(e):(0,s.TF)(e.firstElementChild);var t=k(this.parent.selectedDate),n=(0,s.n)("tbody"),r=new Date(t.getTime()),o=this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgend
1aDays?this.getEndDateFromStartDate(r):K(r,this.parent.agendaDaysCount);this.renderContent(n,r,o),(0,s.BC)([].slice.call(n.childNodes),e)},i.prototype.renderInitialContent=function(e,t){var n=(0,s.n)("tbody"),r=new Date(t.getTime()),o=this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays?this.getEndDateFromStartDate(r):K(r,this.parent.agendaDaysCount);if(this.renderContent(n,r,o),(0,s.BC)([].slice.call(n.childNodes),e),this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays&&this.parent.eventsData.length>0)for(var l=this.getContentAreaElement(),h=l.querySelector(".e-content-table");l.offsetWidth<=l.clientWidth&&!(this.parent.isAdaptive&&h.offsetHeight>=l.clientHeight);){var d=(0,s.n)("tbody");if(r=K(o=r,-this.parent.agendaDaysCount),this.renderContent(d,r,o),(0,s.Hs)([].slice.call(d.childNodes),e),r<=this.parent.minDate)break}e.childNodes.length<=0&&this.renderEmptyContent(e,t,!0)},i.prototype.renderContent=function(e,t,n){var u,r=this.parent.eventFields,o=new Date(t.getTime()),l=this.appointmentFiltering(o,n);if(l.length>0&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.hideEmptyAgendaDays)if(this.parent.activeViewOptions.showWeekend||this.isAgendaWorkDay(l[0][r.startTime]))t=new Date(new Date(l[0][r.startTime].getTime()).setHours(0,0,0,0)),this.updateHeaderText(l[0][r.startTime]);else for(var h=0,d=l;h<d.length;h++){var p=d[h];if(this.isAgendaWorkDay(p[r.startTime])){t=new Date(new Date(p[r.startTime].getTime()).setHours(0,0,0,0)),this.updateHeaderText(p[r.startTime]);break}}if(!this.parent.hideEmptyAgendaDays||this.parent.agendaDaysCount>0&&l.length>0){if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var f=t;this.parent.activeViewOptions.group.byDate||(this.parent.activeViewOptions.allowVirtualScrolling=!1,f=o,this.parent.headerModule&&(this.parent.headerModule.updateDateRange(),this.parent.headerModule.updateHeaderItems("remove"))),this.calculateResourceTableElement(e,this.parent.agendaDaysCount,f,n)}else for(var m=0;m<this.parent.agendaDaysCount;m++){var g=this.createTableRowElement(t,"data"),v=this.element.querySelector('tr[data-row-index="'+ +g.dataset.rowIndex+'"]');if(v||!this.parent.activeViewOptions.showWeekend&&!this.isAgendaWorkDay(t)){if(t=K(t,1),!v&&this.parent.activeViewOptions.allowVirtualScrolling&&m--,t.getTime()>n.getTime())break}else{var b=g.children[0],y=g.children[1],S=this.appointmentFiltering(t);if(S.length>0||!this.parent.hideEmptyAgendaDays&&0===S.length){var E=this.parent.hideEmptyAgendaDays||0!==S.length?"data":"noEvents";b.appendChild(this.createDateHeaderElement(t)),g.appendChild(b),this.parent.trigger(ti,{elementType:hb,element:b,date:t});var _=this.createAgendaContentElement(E,S,y);g.appendChild(_),_.querySelectorAll("li").length>0&&e.appendChild(g),this.parent.trigger(ti,{elementType:this.parent.hideEmptyAgendaDays||0!==S.length?cb:Qu,element:_,date:t})}else this.parent.activeViewOptions.allowVirtualScrolling&&m--;if(this.isCurrentDate(new Date(t.getTime()))&&(0,s.iQ)(b.childNodes,Pb),(t=K(t,1)).getTime()>n.getTime())break}}u=new Date(t.getTime()-bt)}this.agendaDates={start:o,end:u}},i.prototype.isAgendaWorkDay=function(e){return this.parent.uiStateValues.isGroupAdaptive&&!this.parent.group.byDate?this.isWorkDay(e,this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex].workDays):this.isWorkDay(e)},i.prototype.agendaScrolling=function(e){this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide(),this.parent.activeViewOptions.allowVirtualScrolling&&this.virtualScrolling(e),this.parent.activeViewOptions.allowVirtualScrolling||this.setPersistence()},i.prototype.virtualScrolling=function(e){var m,t=e.target,n=t.scrollTop,r=t.scrollHeight,l=n+t.clientHeight,h=this.virtualScrollTop<n?"next":"previous",d=t.querySelector("tbody"),p=(0,s.n)("tbody"),u=this.getElementFromScrollerPosition(e),f=this.parent.getDateFromElement(u);if(0===n){if(m=this.getPreviousNextDate(K(f,-1),h),this.appointmentFiltering(m.start,m.end).length>
10||!this.parent.hideEmptyAgendaDays){this.renderContent(p,m.start,m.end),(0,s.Hs)([].slice.call(p.childNodes),d),this.wireEventActions();for(var v=0,b=d.children;v<b.length;v++)if(b[parseInt(v.toString(),10)].getAttribute("data-row-index")===u.getAttribute("data-column-index")){var y=b[parseInt(v.toString(),10)].offsetTop-this.element.querySelector(".e-agenda-item").offsetHeight;t.scrollTop=y;break}this.updateHeaderText(f)}}else l>=r-5?(m=this.getPreviousNextDate(K(f,1),h),(this.appointmentFiltering(m.start,m.end).length>0||!this.parent.hideEmptyAgendaDays)&&(this.renderContent(p,m.start,m.end),(0,s.BC)([].slice.call(p.childNodes),d),this.wireEventActions(),this.updateHeaderText(f))):this.updateHeaderText(f);this.virtualScrollTop=n;var S=this.parent.eventBase.getSelectedAppointments();S.length>0&&S[S.length-1].focus()},i.prototype.getElementFromScrollerPosition=function(e){var t,p,n=e.target,r=n.scrollTop,o=n.scrollHeight,h=r+n.clientHeight,d=[].slice.call(n.querySelectorAll(".e-agenda-item"));if(d.length>0)if(0===r)t=(0,s.kp)(p=d[0],"."+br);else if(h===o)t=(0,s.kp)(p=d[d.length-1],"."+br);else for(var f=0,m=d.length;f<m;f++)if((p=d[parseInt(f.toString(),10)]).getBoundingClientRect().top>=0){t=(0,s.kp)(p,"."+br);break}return t},i.prototype.updateHeaderText=function(e){this.parent.showHeaderBar&&this.parent.headerModule.updateDateRange(e)},i.prototype.getPreviousNextDate=function(e,t){var n=new Date(e.getTime()),r=this.getStartDateFromEndDate(e),o=this.getEndDateFromStartDate(e),l=0;do{if((this.parent.activeViewOptions.showWeekend||!this.parent.activeViewOptions.showWeekend&&this.isAgendaWorkDay(n))&&(this.appointmentFiltering(n).length>0||!this.parent.hideEmptyAgendaDays)&&l++,(n=K(n,"next"===t?1:-1))<r||n>o)break}while(l!==this.parent.agendaDaysCount);var d=K(n,"next"===t?-1:1);return"next"===t?{start:e,end:K(d,1)}:{start:d,end:K(e,1)}},i.prototype.appointmentFiltering=function(e,t){var r,o,n=this;!(0,s.hX)(e)&&(0,s.hX)(t)?(r=k(new Date(e.getTime())),o=nf(new Date(r.getTime()),bt)):(r=new Date(e.getTime()),o=new Date(t.getTime()));var l=this.parent.eventBase.filterEvents(r,o);if(0===l.length&&(this.refreshEvent(e),l=this.parent.eventBase.filterEvents(r,o)),!(0,s.hX)(this.parent.minDate)||!(0,s.hX)(this.parent.maxDate)){var h=this.parent.eventFields;l=l.filter(function(d){var u=d[h.endTime];return!(d[h.startTime].getTime()<n.parent.minDate.getTime()||u.getTime()>K(n.parent.maxDate,1).getTime())})}return l},i.prototype.getStartDateFromEndDate=function(e){var t,n=this.parent.eventFields;if(this.parent.eventsProcessed.length>0){var r=Math.min.apply(Math,this.parent.eventsProcessed.map(function(o){return o[n.startTime].getTime()}));t=this.parent.hideEmptyAgendaDays?new Date(r):this.parent.minDate}else t=this.parent.hideEmptyAgendaDays?er(e,-1):this.parent.minDate;return k(t)},i.prototype.getEndDateFromStartDate=function(e){var t,n=this.parent.eventFields;if(this.parent.eventsProcessed.length>0){var r=Math.max.apply(Math,this.parent.eventsProcessed.map(function(o){return o[n.endTime].getTime()}));t=this.parent.hideEmptyAgendaDays?new Date(r):this.parent.maxDate}else t=this.parent.hideEmptyAgendaDays?er(e,1):this.parent.maxDate;return k(K(t,1))},i.prototype.getNextPreviousDate=function(e){return K(this.parent.selectedDate,"Next"===e?1:-1)},i.prototype.startDate=function(){return k(this.parent.selectedDate)},i.prototype.endDate=function(){return this.parent.activeViewOptions.allowVirtualScrolling?this.getEndDateFromStartDate(this.startDate()):K(this.startDate(),this.parent.agendaDaysCount)},i.prototype.getDateRangeText=function(e){var t=this.parent.activeViewOptions.dateFormat?this.parent.activeViewOptions.dateFormat:"MMMM y";if(this.parent.activeViewOptions.allowVirtualScrolling||this.parent.isAdaptive){var n=(0,s.hX)(e)?this.parent.selectedDate:e;return yt(this.parent.globalize.formatDate(n,{format:t,calendar:this.parent.getCalendarMode()}),"multiple")}var r=this.parent.selectedDate,o=K(r,this.parent.agendaDaysCount-1);return this.formatDateRange(r,o)},i.prototype.dayNavigationClick=function(e){var t=(0,s.kp)(e.currentTarget,"."+br),n=this.parent.getDateFromElement(t);!(0,s.hX)(n)&&!this.parent.isAdaptive&&this.parent.isMinMaxDate(n)&&(this.parent.setProperties({selectedDate:n},!0),this.parent.changeView("Day",e))},i.prototype.wireEvents=function(){s.Jm.add(this.element.querySelector("."+we),"scroll",this.agendaScrolling,this)},i.prototype.unWireEvents=function(){s.Jm.remove(this.element.querySelector("."+we),"scroll",this.agendaScrolling);for(var t=0,n=[].slice.call(this.element.querySelectorAll(".e-m-date"));t<n.length;t++)s.Jm.remove(n[t],"click",this.dayNavigationClick)},i.prototype.addEventListener=function(){this.parent.on(fn,this.onAgendaScrollUiUpdate,this),this.parent.on(un,this.eventLoad,this)},i.prototype.removeEventListener=function(){this.parent&&(this.parent.off(fn,this.onAgendaScrollUiUpdate),this.parent.off(un,this.eventLoad))},i.prototype.onAgendaScrollUiUpdate=function(){var e=this.getHeaderBarHeight();this.parent.headerModule&&this.parent.headerModule.updateHeaderItems(this.parent.activeViewOptions.allowVirtualScrolling?"add":"remove");var t=this.element.querySelector("."+we);"auto"!==this.parent.height&&(t.style.height=(0,s.IV)(this.parent.element.offsetHeight-e))},i.prototype.scrollToDate=function(e){var t=new Date(+k(e));if(this.parent.activeViewOptions.allowVirtualScrolling)(!this.parent.hideEmptyAgend
1aDays||this.parent.getEvents(t,K(t,1),!0).length>0)&&this.parent.changeDate(t);else{var n=this.element.querySelector("."+br+'[data-date="'+t.getTime()+'"]');n&&(this.getContentAreaElement().scrollTop=n.offsetTop)}},i.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed?this.parent=null:this.element&&(this.unWireEvents(),this.parent.resourceBase&&this.parent.resourceBase.destroy(),this.parent.headerModule&&this.parent.activeViewOptions.allowVirtualScrolling&&this.parent.headerModule.updateHeaderItems("remove"),a.prototype.destroy.call(this))},i}(mS),cA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),vS=function(a){function i(e){var t=a.call(this,e)||this;return t.dayNameFormat="narrow",t.viewClass="e-month-agenda-view",t.monthAgendaDate=new Date(""+e.selectedDate),t}return cA(i,a),i.prototype.getModuleName=function(){return"monthAgenda"},i.prototype.renderAppointmentContainer=function(){var e=this.getContentAreaElement(),t=(0,s.n)("div",{className:Al});e.appendChild(t);var n=(0,s.n)("div",{className:Yh});t.appendChild(n),this.appendAppContainer(n),this.setEventWrapperHeight()},i.prototype.getDayNameFormat=function(){return this.parent.isAdaptive?"narrow":"abbreviated"},i.prototype.updateSelectedCellClass=function(e){k(e.date).getTime()===k(new Date(""+this.parent.selectedDate)).getTime()&&e.className.push(so)},i.prototype.setEventWrapperHeight=function(){var e=(this.parent.headerModule?this.parent.headerModule.getHeaderElement().offsetHeight:0)+2,t=this.parent.element.querySelector("."+vf);t&&(e+=t.offsetHeight);var n=this.getContentAreaElement().firstElementChild,r=this.element.querySelector("."+bi),o=this.parent.element.offsetHeight-e-r.offsetHeight,l=this.parent.activeViewOptions.interval>1?Math.round(.8*o):n.offsetHeight,h=o-l,d=this.element.querySelector("."+Al),p=this.element.querySelector("."+Yh);"auto"!==this.parent.height&&(this.parent.activeViewOptions.interval>1&&(n.style.height=(0,s.IV)(l),s.Jm.add(n,"scroll",this.onContentScroll,this)),d.style.height=p.style.height=(0,s.IV)(h))},i.prototype.onDataReady=function(e){this.setEventWrapperHeight(),this.clearElements();var t=e.processedData;this.parent.uiStateValues.isGroupAdaptive&&(t=this.parent.eventBase.filterEventsByResource(this.parent.resourceBase.lastResourceLevel[this.parent.uiStateValues.groupIndex],t)),this.agendaBase=this.getAgendaBase(),this.parent.eventsProcessed=this.agendaBase.processAgendaEvents(t);for(var r=0,o=0,l=this.renderDates;o<l.length;o++){var h=l[o],d=this.appointmentFiltering(h),p=this.element.querySelectorAll("."+ie)[parseInt(r.toString(),10)];d.length>0&&(p.querySelector("."+Sf)||p.appendChild((0,s.n)("div",{className:Sf})),h.getTime()===k(new Date(this.monthAgendaDate.getTime())).getTime()&&this.onEventRender(d,h)),r++}this.parent.notify(Ss,{})},i.prototype.onCellClick=function(e){this.parent.quickPopup&&this.parent.quickPopup.quickPopupHide();var t=this.appointmentFiltering(e.startTime);this.onEventRender(t,e.startTime),this.parent.notify(Ss,{}),this.monthAgendaDate=new Date(""+e.startTime),this.parent.setProperties({selectedDate:this.monthAgendaDate},!0)},i.prototype.onEventRender=function(e,t){this.agendaBase=this.getAgendaBase();var n=this.element.querySelector("."+Yh);if(Dn(n),0===this.parent.activeViewOptions.group.resources.length||this.parent.uiStateValues.isGroupAdaptive)if(e.length>0){var r=(0,s.n)("div",{className:mn});n.appendChild(this.agendaBase.createAgendaContentElement("data",e,r))}else this.appendAppContainer(n);else if(e.length>0){var o=this.createTableLayout(),l=o.querySelector("tbody");this.agendaBase.calculateResourceTableElement(l,1,t),o.appendChild(l),n.appendChild(o)}else this.appendAppContainer(n);this.agendaBase.wireEventActions()},i.prototype.appointmentFiltering=function(e){var t=k(new Date(e.getTime())),n=nf(new Date(t.getTime()),bt);return this.parent.eventBase.filterEvents(t,n)},i.prototype.clearElements=function(){for(var t=0,n=[].slice.call(this.element.querySelectorAll("."+Sf));t<n.length;t++)(0,s.TF)(n[t]);this.appendAppContainer(this.element.querySelector("."+Yh))},i.prototype.appendAppContainer=function(e){var t=(0,s.n)("div",{className:mn});(0,s.iQ)([t],yf),t.innerHTML=this.parent.localeObj.getConstant("noEvents"),Dn(e),e.appendChild(t)},i.prototype.getNextPreviousDate=function(e){var t=this.parent.selectedDate,r=er(this.parent.selectedDate,"Next"===e?this.parent.activeViewOptions.interval:-this.parent.activeViewOptions.interval),o="Next"===e?2:0,l=new Date(t.getFullYear(),t.getMonth()+o,0
1).getDate(),h=l>=this.monthAgendaDate.getDate()?this.monthAgendaDate.getDate():l;return this.monthAgendaDate=new Date(r.getFullYear(),r.getMonth(),h),this.monthAgendaDate},i.prototype.getAgendaBase=function(){return this.agendaBase||new mS(this.parent)},i.prototype.destroy=function(){this.agendaBase&&(this.agendaBase.destroy(),this.agendaBase=null),a.prototype.destroy.call(this)},i}(Ad),bS=function(){function a(i,e){this.parent=i,this.renderDates=e}return a.prototype.groupByYear=function(i){for(var e={},t=0,n=i;t<n.length;t++){var r=n[t],o=r.getFullYear();e[parseInt(o.toString(),10)]=e[parseInt(o.toString(),10)]||[],e[parseInt(o.toString(),10)].push(r)}return e},a.prototype.groupByMonth=function(i){for(var e={},t=0,n=i;t<n.length;t++){var r=n[t],o=12*(r.getFullYear()-1970)+r.getMonth();e[parseInt(o.toString(),10)]=e[parseInt(o.toString(),10)]||[],e[parseInt(o.toString(),10)].push(r)}return e},a.prototype.groupByWeek=function(i){for(var e={},t=0,n=i;t<n.length;t++){var r=n[t],o=+new Date(1970,0,1),l=r.getTimezoneOffset()-new Date(1970,0,1).getTimezoneOffset(),h=Math.ceil(((+r-o-60*l*1e3)/bt+new Date(o).getDay()+1)/7);this.parent.activeViewOptions.firstDayOfWeek&&this.parent.activeViewOptions.firstDayOfWeek>new Date(+r).getDay()&&(h-=1),e[parseInt(h.toString(),10)]=e[parseInt(h.toString(),10)]||[],e[parseInt(h.toString(),10)].push(r)}return e},a.prototype.generateSlots=function(i,e,t,n,r){for(var o=this,l=function(y,S){return o.parent.globalize.formatDate(y,{format:S,calendar:o.parent.getCalendarMode()})},h=[],d=Object.keys(i),p=0;p<d.length;p++){var u=i[d[parseInt(p.toString(),10)]],f=void 0;if(t.template){var m={date:u[0],type:r},g=this.parent.element.id+"_headerRowTemplate";f=[].slice.call(this.parent.templateParser(t.template)(m,this.parent,"template",g,!1))}else{var v=void 0;switch(t.option){case"Year":v='<span class="e-header-year">'+l(u[0],"y")+"</span>";break;case"Month":v='<span class="e-header-month">'+yt(l(u[0],"MMMM"),"single")+"</span>";break;case"Week":v='<span class="e-header-week">'+this.parent.getWeekNumberContent(u)+"</span>"}var b=(0,s.n)("div",{innerHTML:v});f=[].slice.call(b.childNodes)}h.push({date:u[0],type:r,className:[n],colSpan:u.length*e,template:f})}return h},a.prototype.generateColumnLevels=function(i,e){var t=[],n=this.parent.activeViewOptions.headerRows,r=1;"Hour"===n[n.length-1].option&&e.length>0&&(r=e.length/i.length);for(var l,h,d,o=[],p=0,u=n;p<u.length;p++){var f=u[p];switch(f.option){case"Year":l=this.groupByYear(this.renderDates),o=this.generateSlots(l,r,f,"e-header-year-cell","yearHeader"),t.push(o);break;case"Month":h=this.groupByMonth(this.renderDates),o=this.generateSlots(h,r,f,"e-header-month-cell","monthHeader"),t.push(o);break;case"Week":d=this.groupByWeek(this.renderDates),o=this.generateSlots(d,r,f,"e-header-week-cell","weekHeader"),t.push(o);break;case"Date":o=(o=i).map(function(m){return m.colSpan=r,m}),t.push(o);break;case"Hour":e.length>0&&t.push(e)}}return t},a}(),hA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),yS=function(a){function i(e){var t=a.call(this,e)||this;return t.timelineAppointment=null,t.baseCssClass="e-timeline-view",t}return hA(i,a),i.prototype.getModuleName=function(){return"timelineViews"},i.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+Wi)},i.prototype.scrollTopPanel=function(e){a.prototype.scrollTopPanel.call(this,e),this.scrollHeaderLabels(e)},i.prototype.scrollToWorkHour=function(){var e=this.parent.getStartEndTime(this.parent.workHours.start),t=this.isWorkDay(this.parent.selectedDate)&&this.parent.workHours.highlight&&!(0,s.hX)(e)?new Date(+this.parent.selectedDate).setHours(e.getHours(),e.getMinutes(),0,0):new Date(+this.parent.selectedDate).setHours(0,0,0,0),n='[data-date="'+new Date(t).getTime().toString()+'"]',r=this.element.querySelector(n);r&&(this.getContentAreaElement().scrollLeft=this.parent.enableRtl?-(this.parent.getContentTable().offsetWidth-r.offsetLeft-r.offsetWidth):r.offsetLeft)},i.prototype.scrollToHour=function(e,t){var n,r,l;if(t&&(r=this.parent.getIndexOfDate(this.renderDates,k(t)))>=0&&(n=t,!(0,s.hX)(e))){var o=e.split(":");2===o.length&&(n=new Date(t.setHours(parseInt(o[0],10),parseInt(o[1],10),0)))}n=(0,s.hX)(t)?this.parent.getStartEndTime(e):n,(0,s.hX)(n)||(l=(0,s.hX)(e)||!this.parent.activeViewOptions.timeScale.enable?r*this.parent.getElementWidth(this.element.querySelector(".e-work-cells")):(0,s.hX)(t)?this.getLeftFromDateTime(null,n):this.getLeftFromDateTime([r],n),this.get
1ScrollableElement().scrollLeft=this.parent.enableRtl?-l:l)},i.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);e.push(t),this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.generateResourceLevels(t,!this.parent.uiStateValues.isGroupAdaptive);var n=[];return this.parent.activeViewOptions.timeScale.enable&&(n=this.generateTimeSlots(e[e.length-1]),e.push(n)),this.parent.activeViewOptions.headerRows.length>0&&(e=new bS(this.parent,this.renderDates).generateColumnLevels(t,n)),e},i.prototype.generateTimeSlots=function(e){for(var t=this,r=this.getTimeSlotRows(function(v){return v.type=v.first?"majorSlot":"minorSlot",v.className=v.first?[ua]:[ua,Tb],v.workDays=t.parent.activeViewOptions.workDays,v}),o=[],l=0,h=e;l<h.length;l++){var d=h[l];d.colSpan=r.length;for(var u=0,f=(0,s.X$)([],r,null,!0);u<f.length;u++){var m=f[u],g=k(new Date(""+d.date));m.date=nf(g,jr(m.date)),o.push(m)}}return o},i.prototype.changeCurrentTimePosition=function(){if(!(!this.parent||this.parent&&this.parent.isDestroyed)){this.removeCurrentTimeIndicatorElements();var e=this.getCurrentTimeIndicatorIndex(),t=this.getLeftFromDateTime(e,this.parent.getCurrentTime()),n=this.element.querySelector("."+nt).offsetHeight,r=this.element.querySelector("."+bi);if(this.element.querySelector("."+we).appendChild((0,s.n)("div",{className:fa,styles:(this.parent.enableRtl?"right":"left")+":"+(0,s.IV)(t)+"; height:"+(0,s.IV)(n)})),this.parent.virtualScrollModule){var l=this.parent.element.querySelector("."+fa),h=this.parent.element.querySelector("."+we+" table");(0,s.sN)(l,{transform:h.style.transform})}var d=(0,s.n)("div",{innerHTML:this.parent.getTimeString(this.parent.getCurrentTime()),className:ff});r.appendChild(d),d.style[this.parent.enableRtl?"right":"left"]=(0,s.IV)(t-d.offsetWidth/2)}},i.prototype.getLeftFromDateTime=function(e,t){var u,n=this.getStartHour(),r=this.getEndHour(),o=0,l=60*(t.getHours()-n.getHours())+(t.getMinutes()-n.getMinutes()),h=Vi(k(new Date(t.getTime())),n,r),d=(h.endHour.getTime()-h.startHour.getTime())/wt,p=this.parent.activeViewOptions.timeScale.interval;if(u=0===n.getHours()&&0===n.getMinutes()&&0===r.getHours()&&0===r.getMinutes()||1!==this.parent.activeViewOptions.timeScale.slotCount?p:p>d?d:p,!(0,s.hX)(e)&&0!==e[0]){var f=this.parent.activeView.colLevels.findIndex(function(v){return"dateHeader"===v[0].type});if(this.parent.activeView.colLevels[parseInt(f.toString(),10)]&&this.parent.activeView.colLevels[parseInt(f.toString(),10)][0].colSpan)o=e[0]*this.parent.activeView.colLevels[parseInt(f.toString(),10)][0].colSpan*this.parent.getElementWidth(this.element.querySelector(".e-work-cells"));else{var m=this.getEndHour(),g=0===m.getHours()?24:m.getHours();l+=e[0]*(60*(g-n.getHours())+(m.getMinutes()-n.getMinutes()))}}return o+l*this.parent.getElementWidth(this.element.querySelector(".e-work-cells"))*this.parent.activeViewOptions.timeScale.slotCount/u},i.prototype.renderHeader=function(){var e=(0,s.n)("tr");this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.renderResourceHeaderIndent(e);var t=(0,s.n)("td");t.appendChild(this.renderDatesHeader()),e.appendChild(t),(0,s.Hs)([e],this.element.querySelector("tbody"))},i.prototype.createAllDayRow=function(e,t){},i.prototype.getCurrentTimeIndicatorIndex=function(){var e=[],t=this.parent.getIndexOfDate(this.renderDates,k(this.parent.getCurrentTime()));return t>=0&&e.push(t),e},i.prototype.renderContent=function(){var e=(0,s.n)("tr");if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var t=(0,s.n)("td");t.appendChild(this.parent.resourceBase.createResourceColumn()),e.appendChild(t)}var n=(0,s.n)("td"),r=this.renderContentArea();r.appendChild(this.createEventTable(this.getRowCount())),this.collapseRows(r),n.appendChild(r),e.appendChild(n),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.renderVirtualTrack(r),this.element.querySelector("tbody").appendChild(e)},i.prototype.getRowCount=function(){return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.parent.resourceBase.renderedResources.length:1},i.prototype.getResourceTdData=function(e,t){var n=this.parent.resourceBase.renderedResources[parseInt(e.toString(),10)],o=n.resourceData[n.resource.endHourField]||this.parent.workHours.end;return t.startHour=this.parent.getStartEndTime(n.resourceData[n.resource.startHourField]||this.parent.workHours.start),t.endHour=this.parent.getStartEndTime(o),t.workDays=n.resourceData[n.resource.w
1orkDaysField]||this.parent.workDays,t.className=n.className,t.groupIndex=n.groupIndex,t.groupOrder=n.groupOrder,t},i.prototype.renderContentTable=function(e){var t=e.querySelector("tbody");(0,s.BC)(this.getContentRows(),t)},i.prototype.getContentRows=function(){for(var e=[],t=(0,s.n)("tr"),n=(0,s.n)("td"),r=this.getRowCount(),o=this.getGroupIndices(),l=0;l<r;l++)if(!(o.length>0&&o.indexOf(this.parent.resourceBase.renderedResources[parseInt(l.toString(),10)].groupIndex)>-1)){for(var h=t.cloneNode(),d=0,p=this.colLevels[this.colLevels.length-1];d<p.length;d++){var u=p[d];this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(u=this.getResourceTdData(l,u));var f=this.createContentTd(u,u,n);h.appendChild(f)}e.push(h)}return e},i.prototype.getContentTdClass=function(e){return e.first||!this.parent.activeViewOptions.timeScale.enable?[ie]:[ie,Ib]},i.prototype.renderEvents=function(){this.timelineAppointment=new Ca(this.parent,this.parent.activeViewOptions.timeScale.enable?"hour":"day"),this.timelineAppointment.renderAppointments(),this.parent.notify(Ss,{})},i.prototype.getAdjustedDate=function(e){if(!this.parent.activeViewOptions.timeScale.enable)return new Date(e.setHours(0,0,0,0));for(var t=this.colLevels[this.colLevels.length-1],n=0;n<t.length;n++)if(t[parseInt(n.toString(),10)].date.getTime()>e.getTime())return t[n-1].date;return null},i.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed?this.parent=null:(this.timelineAppointment&&(this.timelineAppointment.destroy(),this.timelineAppointment=null),a.prototype.destroy.call(this))},i}(Od),dA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),SS=function(a){function i(e){var t=a.call(this,e)||this;return t.viewClass="e-timeline-month-view",t.isInverseTableSelect=!0,t.appointment=null,t}return dA(i,a),i.prototype.getModuleName=function(){return"timelineMonth"},i.prototype.onDataReady=function(){this.appointment=new Ca(this.parent,"day"),this.appointment.renderAppointments(),this.parent.notify(Ss,{})},i.prototype.getLeftPanelElement=function(){return this.element.querySelector("."+Wi)},i.prototype.scrollTopPanel=function(e){a.prototype.scrollTopPanel.call(this,e),this.scrollHeaderLabels(e)},i.prototype.setContentHeight=function(e,t,n){t&&(t.style.height=(0,s.IV)(n-this.getScrollXIndent(e))),e.style.height=(0,s.IV)(n)},i.prototype.getDateSlots=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var l=o[r],h=[Wt];this.isCurrentDate(l)&&h.push(Uh),n.push({date:l,type:"dateHeader",className:h,colSpan:1,workDays:t})}return n},i.prototype.renderLeftIndent=function(e){this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&this.parent.resourceBase.renderResourceHeaderIndent(e)},i.prototype.renderContent=function(){var e=(0,s.n)("tr");if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var t=(0,s.n)("td");t.appendChild(this.parent.resourceBase.createResourceColumn()),e.appendChild(t)}var n=(0,s.n)("td");this.element.querySelector("tbody").appendChild(e);var r=(0,s.n)("div",{className:we});r.appendChild(this.renderContentArea()),r.appendChild(this.createEventTable(this.getRowCount())),this.collapseRows(r),s.Jm.add(r,"scroll",this.onContentScroll,this),n.appendChild(r),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.renderVirtualTrack(r),e.appendChild(n)},i.prototype.getRowCount=function(){return this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?this.parent.resourceBase.renderedResources.length:1},i.prototype.getContentSlots=function(){for(var e=[],t=0;t<this.getRowCount();t++)for(var n=0,r=this.colLevels[this.colLevels.length-1];n<r.length;n++){var o=r[n];if(o.className=[ie],this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var l=this.parent.resourceBase.renderedResources[parseInt(t.toString(),10)];
1o.workDays=l.resourceData[l.resource.workDaysField]||this.parent.workDays,o.className=o.className.concat(l.className),o.groupIndex=l.groupIndex,o.groupOrder=l.groupOrder}var h={date:new Date(+o.date),colSpan:o.colSpan,groupIndex:o.groupIndex,workDays:o.workDays,type:"monthCells",className:o.className};e[parseInt(t.toString(),10)]||(e[parseInt(t.toString(),10)]=[]),e[parseInt(t.toString(),10)].push(h)}return e},i.prototype.updateClassList=function(e){this.parent.isMinMaxDate(e.date)||e.className.push(Gr)},i.prototype.unWireEvents=function(){s.Jm.remove(this.getContentAreaElement(),"scroll",this.onContentScroll)},i.prototype.getMonthStart=function(e){var t=this.parent.calendarUtil.firstDateOfMonth(k(e));return new Date(t.getFullYear(),t.getMonth(),t.getDate())},i.prototype.getMonthEnd=function(e){var t=this.parent.calendarUtil.firstDateOfMonth(k(e));return this.parent.calendarUtil.lastDateOfMonth(er(new Date(+t),this.parent.activeViewOptions.interval-1))},i.prototype.generateColumnLevels=function(){var e=[],t=this.getDateSlots(this.renderDates,this.parent.activeViewOptions.workDays);return e.push(t),this.parent.activeViewOptions.group.resources.length>0&&this.parent.resourceBase.generateResourceLevels(t,!this.parent.uiStateValues.isGroupAdaptive),this.parent.activeViewOptions.headerRows.length>0&&(e=new bS(this.parent,this.renderDates).generateColumnLevels(t,[])),this.colLevels=e,e},i.prototype.getAdjustedDate=function(e){for(var t=this.colLevels[this.colLevels.length-1],n=0;n<t.length;n++)if(t[parseInt(n.toString(),10)].date.getTime()>e.getTime())return t[n-1].date;return null},i.prototype.destroy=function(){if(!this.parent||this.parent&&this.parent.isDestroyed)this.parent=null;else{if(this.element){var e=this.element.querySelector("."+we);e&&s.Jm.remove(e,"scroll",this.onContentScroll)}this.appointment&&(this.appointment.destroy(),this.appointment=null),a.prototype.destroy.call(this)}},i}(Ad),pA=function(){var a=function(i,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(i,e)};return function(i,e){function t(){this.constructor=i}a(i,e),i.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}}(),CS=function(a){function i(e){var t=a.call(this,e)||this;return t.viewClass="e-timeline-year-view",t.isInverseTableSelect=!0,t}return pA(i,a),i.prototype.getModuleName=function(){return"timelineYear"},i.prototype.renderHeader=function(e){var t=(0,s.n)("tr");if(e.appendChild(t),"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive)this.parent.resourceBase.renderResourceHeaderIndent(t);else{var n=(0,s.n)("td",{className:Eb});t.appendChild(n),n.appendChild(this.renderResourceHeader(pf))}this.isInverseTableSelect=!("Horizontal"===this.parent.activeViewOptions.orientation&&!(this.parent.activeViewOptions.group.resources.length>0));var l=(0,s.n)("td");t.appendChild(l);var h=(0,s.n)("div",{className:Il});if(l.appendChild(h),"Horizontal"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive)h.appendChild(this.renderResourceHeader(bi)),this.columnCount=this.colLevels.slice(-1)[0].length;else{var d=(0,s.n)("div",{className:bi});h.appendChild(d);var p=this.createTableLayout();d.appendChild(p),p.appendChild(this.createTableColGroup(this.columnCount));var u=(0,s.n)("tr");p.querySelector("tbody").appendChild(u);for(var f=this.getMonths(),m=this.getMonthDates(new Date(this.parent.selectedDate.getFullYear(),f[0],1)),g=0;g<this.columnCount;g++){var v=new Date(this.parent.selectedDate.getFullYear(),f[parseInt(g.toString(),10)],1),b=(0,s.n)("td",{className:Wt});"Horizontal"===this.parent.activeViewOptions.orientation?this.parent.dayHeaderTemplate?(0,s.BC)(this.renderDayMonthHeaderTemplate(m[parseInt(g.toString(),10)],g,"dayHeaderTemplate"),b):b.innerHTML="<span>"+this.parent.getDayNames("abbreviated")[g%7]+"</span>":(this.parent.monthHeaderTemplate?(0,s.BC)(this.renderDayMonthHeaderTemplate(v,f[parseInt(g.toString(),10)],"monthHeaderTemplate"),b):b.innerHTML="<span>"+this.getMonthName(v)+"</span>",b.setAttribute("data-date",v.getTime().toString())),u.appendChild(b),this.parent.trigger(ti,{elementType:"headerCells",element:b})}}},i.prototype.renderResourceHeader=function(e){var t=(0,s.n)("div",{className:e}),n=this.createTableLayout();t.appendChild(n);var r=(0,s.n)("tr");this.colLevels=this.parent.activeViewOptions.group.resources.length>0?this.generateColumnLevels():[[{className:[Wt],type:"headerCell"}]];for(var l=0,h=this.colLevels;l<h.length;l++){for(var d=h[l],p=r.cloneNode(),f=0,m=e===bi?d:[d[0]];f<m.length;f++){var g=m[f],v=(0,s.n)("td");g.className&&(0,s.iQ)([v],g.className),e===bi&&(g.template&&(0,s.BC)(g.template,v),g.colSpan&&v.setAttribute("colspan",g.colSpan.toString()),g.groupIndex>-1&&v.setAttribute("data-group-index",g.groupIndex.toString()),this.setResourceHeaderContent(v,g)),e===pf&&this.parent.renderHeaderIndentTemplate(g,v),this.parent.trigger(ti,{elementType:g.type,element:v,date:g.date,groupIndex:g.groupIndex}),p.appendChild(v)}n.querySelector("tbody").appendChild(p)}return e===bi&&n.appendChild(this.createTableColGroup(this.colLevels.slice(-1)[0].length)),t},i.prototype.renderContent=function(e){var t=(0,s.n)("tr");e.appendChild(t);var l,n=(0,s.n)("td"),r=(0,s.n)("td"),o=[];if("Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive)o.push(n),n.appendChild(this.parent.resourceBase.createResourceColumn()),this.rowCount=this.parent.resourceBase.renderedResources.length;else{o.push(n);var h=(0,s.n)("div",{className:uo});n.appendChild(h),h.appendChild(this.createTableLayout()),l=h.querySelector("tbody")}o.push(r),(0,s.BC)(o,t);var d=(0,s.n)("div",{className:we});r.appendChild(d);var p=this.createTableLayout(nt);this.setAriaAttributes(p),d.appendChild(p);var u=(0,s.n)("div",{className:Ur});d.appendChild(u),this.parent.virtualScrollModule&&this.parent.virtualScrollModule.renderVirtualTrack(d);var f=p.querySelector("tbody");if(this.parent.rowAutoHeight){var m=[p],g=this.parent.element.querySelector("."+uo+" ."+lf);g&&m.push(g),(0,s.iQ)(m,Hf)}if(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive){var v="Horizontal"===this.parent.activeViewOptions.orientation?this.colLevels.slice(-1)[0].length:this.columnCount;p.appendChild(this.createTableColGroup(v)),this.renderResourceContent(u,l,f)}else p.appendChild(this.createTableColGroup(this.columnCount)),this.renderDefaultContent(u,l,f)},i.prototype.renderDefaultContent=function(e,t,n){for(var r=this.getMonths(),o=this.getMonthDates(new Date(this.parent.selectedDate.getFullYear(),r[0],1)),l=0;l<this.rowCount;l++){e.appendChild((0,s.n)("div",{className:mn}));var h=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(l.toString(),10)],1),d=this.parent.calendarUtil.getMonthStartDate(new Date(h.getTime())),p=this.parent.calendarUtil.getMonthEndDate(new Date(h.getTime())),u=(0,s.n)("tr"),f=u.cloneNode();t.appendChild(f);var m=u.cloneNode();n.appendChild(m);var g=(0,s.n)("td",{className:Dl});"Horizontal"===this.parent.activeViewOptions.orientation?(this.parent.monthHeaderTemplate?(0,s.BC)(this.renderDayMonthHeaderTemplate(d,l,"monthHeaderTemplate"),g):g.innerHTML="<span>"+this.getMonthName(h)+"</span>",g.setAttribute("data-date",h.getTime().toString())):this.parent.dayHeaderTemplate?(0,s.BC)(this.renderDayMonthHeaderTemplate(o[parseInt(l.toString(),10)],l,"dayHeaderTemplate"),g):g.innerHTML="<span>"+this.parent.getDayNames("abbreviated")[l%7]+"</span>",f.appendChild(g),this.parent.trigger(ti,{elementType:"leftHeaderCells",element:g});for(var v=new Date(d.getTime()),b=0;b<this.columnCount;b++){var y=void 0;if("Vertical"===this.parent.activeViewOptions.orientation){h=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(b.toString(),10)],1),d=this.parent.calendarUtil.getMonthStartDate(new Date(h.getTime())),p=this.parent.calendarUtil.getMonthEndDate(new Date(h.getTime()));var S=l-d.getDay()+1;v=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(b.toString(),10)],S),y=S>0&&v.getTime()<p.getTime()}else y=b>=d.getDay()&&v.getTime()<p.getTime();var E=this.parent.globalize.formatDate(v,{skeleton:"full",calendar:this.parent.getCalendarMode()}),_=(0,s.n)("td",{className:ie,attrs:{"aria-label":E}});m.appendChild(_);var T=(0,s.n)("div",{className:ga+" "+oo,innerHTML:y?this.parent.globalize.formatDate(v,{skeleton:"d",calendar:this.parent.getCalendarMode()}):""});if(y){var I=[_],w=[];this.parent.activeViewOptions.workDays.indexOf(v.getDay())>-1&&w.push(xl),this.parent.isMinMaxDate(v)||(0,s.iQ)([_],Gr),this.isCurrentDate(v)&&(w.push(Uh),I.push("Horizontal"===this.parent.activeViewOptions.orientation?this.element.querySelector("."+Wt+":nth-child("+(b
1+1)+")"):this.element.querySelectorAll("."+Dl).item(l))),w.length>0&&(0,s.iQ)(I,w)}else(0,s.iQ)([_],pt),this.parent.isMinMaxDate(v)||(0,s.iQ)([_],Gr);_.classList.contains(pt)||(this.renderDates.push(new Date(v)),_.appendChild(T),y&&(_.setAttribute("data-date",v.getTime().toString()),this.wireEvents(_)),this.renderCellTemplate({date:v,type:"workCells"},_),this.parent.trigger(ti,{elementType:"workCells",element:_,date:v}),y&&"Horizontal"===this.parent.activeViewOptions.orientation&&(v=K(new Date(v.getTime()),1)))}}this.renderDates.splice(0,1)},i.prototype.getContentRows=function(){for(var e=[],t=this.getMonths(),n=this.getGroupIndices(),r=0;r<this.parent.resourceBase.renderedResources.length;r++){var o=void 0;if(!(this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(o=this.parent.resourceBase.renderedResources[parseInt(r.toString(),10)],n.length>0&&n.indexOf(o.groupIndex)>-1))){var l=(0,s.n)("tr");e.push(l);for(var h=new Date(this.parent.selectedDate.getFullYear(),t[parseInt(r.toString(),10)],1),d=this.parent.calendarUtil.getMonthStartDate(new Date(h.getTime())),p=0;p<this.columnCount;p++){var u=[],f=o.groupIndex;(u=u.concat(o.className)).indexOf(tr)>-1?u.push(Es):u.push(xl),h=new Date(this.parent.selectedDate.getFullYear(),t[parseInt(p.toString(),10)],1),d=this.parent.calendarUtil.getMonthStartDate(new Date(h.getTime()));var m=(0,s.n)("td",{className:ie,attrs:{"aria-selected":"false","data-date":d.getTime().toString()}});(0,s.iQ)([m],u),m.setAttribute("data-group-index",f.toString()),this.renderCellTemplate({date:d,type:"resourceGroupCells",groupIndex:f},m),this.wireEvents(m),this.parent.trigger(ti,{elementType:"resourceGroupCells",element:m,date:d}),l.appendChild(m)}}}return e},i.prototype.renderResourceContent=function(e,t,n){for(var r=this.getMonths(),o=0;o<this.rowCount;o++){e.appendChild((0,s.n)("div",{className:mn}));var l=(0,s.n)("tr");n.appendChild(l);var h=void 0;"Vertical"===this.parent.activeViewOptions.orientation&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive&&(h=this.parent.resourceBase.renderedResources[parseInt(o.toString(),10)]);var d=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(o.toString(),10)],1),p=this.parent.calendarUtil.getMonthStartDate(new Date(d.getTime()));if("Horizontal"===this.parent.activeViewOptions.orientation){var u=l.cloneNode();t.appendChild(u);var f=(0,s.n)("td",{className:Dl,attrs:{"data-date":p.getTime().toString()}});this.parent.monthHeaderTemplate?(0,s.BC)(this.renderDayMonthHeaderTemplate(d,o,"monthHeaderTemplate"),f):f.innerHTML="<span>"+this.getMonthName(d)+"</span>",u.appendChild(f)}for(var m=0;m<this.columnCount;m++){var g=[],v=void 0;"Vertical"===this.parent.activeViewOptions.orientation?(v=h.groupIndex,(g=g.concat(h.className)).indexOf(tr)>-1?g.push(Es):g.push(xl),d=new Date(this.parent.selectedDate.getFullYear(),r[parseInt(m.toString(),10)],1),p=this.parent.calendarUtil.getMonthStartDate(new Date(d.getTime()))):(v=this.colLevels.slice(-1)[0][parseInt(m.toString(),10)].groupIndex,g.push(xl));var b=this.parent.globalize.formatDate(p,{type:"dateTime",skeleton:"full",calendar:this.parent.getCalendarMode()}),y=this.parent.globalize.formatDate(this.parent.calendarUtil.getMonthEndDate(new Date(d.getTime())),{type:"dateTime",skeleton:"full",calendar:this.parent.getCalendarMode()}),S=(0,s.n)("td",{className:ie,attrs:{"aria-selected":"false","data-date":p.getTime().toString(),"aria-label":b+" "+this.parent.localeObj.getConstant("endAt")+" "+y}});(0,s.iQ)([S],g),S.setAttribute("data-group-index",v.toString()),this.renderCellTemplate({date:p,type:"resourceGroupCells",groupIndex:v},S),this.wireEvents(S),l.appendChild(S),this.parent.trigger(ti,{elementType:"resourceGroupCells",element:S,date:p})}}"Vertical"===this.parent.activeViewOptions.orientation&&this.collapseRows(this.parent.element.querySelector("."+we))},i.prototype.renderDayMonthHeaderTemplate=function(e,t,n){var r={date:e,type:"dayHeaderTemplate"===n?"dayHeader":"monthHeader"},o="schedule_"+this.parent.activeViewOptions.dayHeaderTemplateName+"dayHeaderTemplate",l="schedule_"+this.parent.activeViewOptions.dayHeaderTemplateName+"monthHeaderTemplate";return"dayHeaderTemplate"===n?(r.day=this.parent.getDayNames("wide")[t%7],[].slice.call(this.parent.getDayHeaderTemplate()(r,this.parent,"dayHeaderTemplate",o,!1,void 0,void 0,this.parent.root))):[].slice.call(this.parent.getMonthHeaderTemplate()(r,this.parent,"monthHeaderTemplate",l,!1,void 0,void 0,this.parent.root))},i.prototype.renderCellTemplate=function(e,t){if(this.parent.activeViewOptions.cellTemplate&&!t.classList.contains(pt)){var n={date:e.date,type:e.type};e.groupIndex&&(n.groupIndex=e.groupIndex);
1var l=this.parent.element.id+"_"+this.parent.activeViewOptions.cellTemplateName+"cellTemplate",h=[].slice.call(this.parent.getCellTemplate()(n,this.parent,"cellTemplate",l,!1,void 0,void 0,this.parent.root));(0,s.BC)(h,t)}},i.prototype.scrollToDate=function(e){var t;t=null!==this.parent.activeViewOptions.group.resources&&this.parent.activeViewOptions.group.resources.length>0&&!this.parent.uiStateValues.isGroupAdaptive?+new Date(k(la(e))):+new Date(k(e));var n=this.element.querySelector('[data-date="'+t+'"]');if(n){var r=this.getScrollableElement();if(this.parent.enableRtl){var o=this.element.querySelector("."+nt);r.scrollLeft=-(o.offsetWidth-n.offsetLeft-n.offsetWidth)}else r.scrollLeft=n.offsetLeft;r.scrollTop=n.offsetTop}},i.prototype.getScrollableElement=function(){return this.parent.isAdaptive&&!this.isTimelineView()?this.element.querySelector("."+gf):this.getContentAreaElement()},i.prototype.wireEvents=function(e){s.Jm.add(e,"mousedown",this.parent.workCellAction.cellMouseDown,this.parent.workCellAction),s.Jm.add(e,"click",this.parent.workCellAction.cellClick,this.parent.workCellAction),this.parent.isAdaptive||s.Jm.add(e,"dblclick",this.parent.workCellAction.cellDblClick,this.parent.workCellAction)},i}(ym),uA=function(){function a(i){this.parent=i}return a.prototype.initializeCalendarExport=function(i,e){var t=this.getCalendarString(i,e);this.download(t,i)},a.prototype.getCalendarString=function(i,e){var t=this,n=e||(0,s.X$)([],this.parent.eventsData,null,!0);n=this.parent.eventBase.sortByTime(n);var r=-1!==navigator.appVersion.indexOf("Win")?"\r\n":"\n",o=[],l=[],h=this.parent.timezone||this.parent.tzModule.getLocalTimezoneName(),d=this.parent.eventFields;return n.forEach(function(f){var m=f[d.id]||f.Guid||t.parent.eventBase.generateGuid(),g=[];if(f[d.recurrenceID]){var v=t.filterEvents(l,d.id,f[d.recurrenceID]);m=v.length>0?v[0].UID:m}if(!f[d.recurrenceID]&&f[d.recurrenceRule]&&f[d.recurrenceException]){var b=f[d.recurrenceException].split(",");t.filterEvents(n,d.recurrenceID,f[d.id]).forEach(function(D){g.push(Jr(D[d.startTime]))});var S=b.filter(function(D){return-1===g.indexOf(D)});f[d.recurrenceException]=S.length>0?S.join(",")+",":""}var E=f[d.startTimezone]||h,_=f[d.endTimezone]||h,I=["BEGIN:VEVENT","LOCATION:"+(f[d.location]||""),"SUMMARY:"+(f[d.subject]||""),"UID:"+m,"DESCRIPTION:"+(f[d.description]||""),"ISREADONLY:"+(!!f[d.isReadonly]&&f[d.isReadonly]),"END:VEVENT"];if(f[d.isAllDay]?(I.splice(4,0,"DTEND;VALUE=DATE:"+t.convertDateToString(f[d.endTime],!0)),I.splice(4,0,"DTSTART;VALUE=DATE:"+t.convertDateToString(f[d.startTime],!0))):f[d.isAllDay]||f[d.recurrenceRule]?(I.splice(4,0,'DTEND;TZID="'+_+'":'+t.convertDateToString(f[d.endTime])),I.splice(4,0,'DTSTART;TZID="'+E+'":'+t.convertDateToString(f[d.startTime]))):(I.splice(4,0,"DTEND:"+t.convertDateToString(f[d.endTime])),I.splice(4,0,"DTSTART:"+t.convertDateToString(f[d.startTime]))),f[d.recurrenceRule]&&I.splice(4,0,"RRULE:"+f[d.recurrenceRule]),f[d.recurrenceException]){b=f[d.recurrenceException].split(",");for(var w=0;w<b.length-1;w++)I.splice(5,0,"EXDATE:"+t.convertDateToString(md(b[parseInt(w.toString(),10)]),f[d.isAllDay]))}f[d.recurrenceID]&&I.splice(4,0,'RECURRENCE-ID;TZID="'+E+'":'+t.convertDateToString(f[d.startTime],f[d.isAllDay]));var A=t.customFieldFilter(f,d);A.length>0&&A.forEach(function(D){return I.splice(4,0,D+":"+(f[""+D]||""))});var M=(0,s.X$)({},f);M.UID=m,l.push(M),o.push(I.join(r))}),["BEGIN:VCALENDAR","PRODID:-//Syncfusion Inc//Scheduler//EN","VERSION:2.0","CALSCALE:GREGORIAN","METHOD:PUBLISH","X-WR-CALNAME:"+(i||"Calendar"),"X-WR-TIMEZONE:"+h].join(r)+r+o.join(r)+r+"END:VCALENDAR"},a.prototype.customFieldFilter=function(i,e){var t=Object.keys(e).map(function(r){return e[""+r]});return Object.keys(i).filter(function(r){return-1===t.indexOf(r)&&"Guid"!==r})},a.prototype.convertDateToString=function(i,e){var t=("0000"+i.getFullYear().toString()).slice(-4),n=("00"+(i.getMonth()+1).toString()).slice(-2),r=("00"+i.getDate().toString()).slice(-2),o=("00"+i.getHours().toString()).slice(-2),l=("00"+i.getMinutes().toString()).slice(-2),h=("00"+i.getSeconds().toString()).slice(-2);return e?t+n+r:t+n+r+"T"+o+l+h},a.prototype.download=function(i,e){var t=new Blob([i],{type:"data:text/calendar;charset=utf8"});if(e=(e||"Calendar")+".ics",navigator.msSaveBlob)navigator.msSaveBlob(t,e);else{var n=document.createElementNS("http://www.w3.org/1999/xhtml","a");n.download=e,n.href=URL.createObjectURL(t);var r=document.createEvent("MouseEvent");r.initEvent("click",!0,!0),n.dispatchEvent(r),setTimeout(function(){URL.revokeObjectURL(n.href),n.href=void 0})}},a.prototype.filterEvents=function(i,e,t){return i.filter(function(n){return n[""+e]===t})},a.prototype.getModuleName=function(){return"iCalendarExport"},a.prototype.destroy=function(){!this.parent||this.parent&&this.parent.isDestroyed||(this.parent=null)},a}(),fA=function(){function a(i){this.allDay=!1,this.parent=i}return a.prototype.initializeCalendarImport=function(i){var e=this;if(i&&i instanceof Blob){var t=new FileReader;t.onload=function(){e.iCalendarParser(t.result)},t.readAsText(i,"UTF-8")}else i&&"string"==typeof i&&this.iCalendarParser(i)},a.prototype.iCalendarParser=function(i){var o,l,e={isEvent:!1,curEvent:null,id:this.parent.eventBase.getEventMaxID(),count:0,events:[],key:null},t=i.length,n=i.search(/[^ \t]/),r=n;do{0===(r=i.indexOf("\n",n)+1)?(r=t,l=0):l=r>1&&"\r"===i[r-2]?2:1;var h=i.charAt(n);" "===h||"\n"===h||"\t"===h?o+=i.slice(n+1,r-l):(o&&(e=this.updateEventData(o,e)),o=i.slice(n,r-l)),n=r}while(r!==t);(o=o.trim()).length&&(e=this.updateEventData(o,e));var d=(0,s.X$)([],e.events,null,!0);this.parent.addEvent(this.processOccurrence(d,e.id))},a.prototype.updateEventData=function(i,e){var t=this.parent.eventFields,r=e.id,o=e.events,l=e.isEvent,h=e.count,d=e.curEvent,p=e.key;if(!l&&"BEGIN:VEVENT"===i&&(l=!0,d={}),l&&"END:VEVENT"===i&&(l=!1,o.push(d),d=null),l){var u=i.indexOf(":"),f=i.substring(0,u).replace(/^\s\s*/,"").replace(/\s\s*$/,""),m=i.substring(u+1,i.length).replace(/^\s\s*/,"").replace(/\s\s*$/,"");
1if(-1!==i.indexOf("SUMMARY")&&(f="SUMMARY"),-1!==i.indexOf("DTSTART"))d[t.startTime]=this.dateParsing(i),d[t.isAllDay]=this.allDay,this.allDay=!1;else if(-1!==i.indexOf("DTEND"))d[t.endTime]=this.dateParsing(i);else if(-1!==i.indexOf("EXDATE"))m=Jr(this.dateParsing(i)),d[t.recurrenceException]=(0,s.hX)(d[t.recurrenceException])?m:d[t.recurrenceException]+","+m;else if(-1!==i.indexOf("RECURRENCE-ID"))m=Jr(this.dateParsing(i)),d[t.recurrenceException]=m,d[t.recurrenceID]=m;else switch(p=f||p,p){case"BEGIN":break;case"UID":d[""+f]=m,"number"==typeof r?(d[t.id]=parseInt(m,10),isNaN(d[t.id])&&(d[t.id]=r+h,h++)):d[t.id]=m;break;case"SUMMARY":d[t.subject]=this.getFormattedString(m);break;case"LOCATION":d[t.location]=this.getFormattedString(m);break;case"DESCRIPTION":d[t.description]=this.getFormattedString(d[t.description]?d[t.description]+"\r\n"+m:m);break;case"ISREADONLY":d[t.isReadonly]=m.indexOf("true")>-1;break;case"RRULE":d[t.recurrenceRule]=m;break;default:if(this.parent.resourceCollection.length>0){var g=this.parent.resourceCollection.filter(function(v){return v.field===f});d[""+f]=g.length>0&&"number"==typeof g[0].dataSource[0][g[0].idField]?parseInt(m,10):m}else d[""+f]=m}}return{isEvent:l,curEvent:d,id:r,count:h,events:o,key:p}},a.prototype.processOccurrence=function(i,e){var t=this,n=[],r="UID",o=this.parent.eventFields,l=[];return this.parent.eventsData.forEach(function(h){l.push(h[o.id])}
1),i.forEach(function(h){var d,p;if(h.hasOwnProperty(o.recurrenceID)||(d=h,p=h[o.id]),l.indexOf(h[o.id])<0){var u=i.filter(function(g){return g.UID===h[""+r]});if(u.length>1&&(0,s.hX)(h[o.recurrenceID])){p="number"==typeof e?e++:p;for(var f=0;f<u.length;f++)if(u[parseInt(f.toString(),10)].hasOwnProperty(o.recurrenceID)){var m=u[parseInt(f.toString(),10)][o.recurrenceID];u[parseInt(f.toString(),10)][o.id]="number"==typeof e?e++:t.parent.eventBase.generateGuid(),u[parseInt(f.toString(),10)][o.recurrenceID]=p,u[parseInt(f.toString(),10)][o.recurrenceException]=null,d[o.recurrenceException]=t.getExcludeDateString(d[o.recurrenceException],m),delete u[parseInt(f.toString(),10)][""+r],n.push(u[parseInt(f.toString(),10)])}delete d[""+r],d[o.id]=p,n.push(d)}else h.hasOwnProperty(o.recurrenceID)||(delete h[""+r],h[o.id]="number"==typeof e?e++:p,n.push(h))}}),n},a.prototype.getExcludeDateString=function(i,e){if((0,s.hX)(i))return e;if((0,s.hX)(e))return i;var t=i.split(",").map(function(o){return o.split("T")[0]}),n=e.split(",").map(function(o){return o.split("T")[0]});return t.filter(function(o){return n.indexOf(o)>-1}).length>0?i:i+","+e},a.prototype.getFormattedString=function(i){return(i=i||"").replace(/\\\,/g,",").replace(/\\\;/g,";").replace(/\\[nN]/g,"\n").replace(/\\\\/g,"\\")},a.prototype.dateParsing=function(i){var e=i.split(":"),t=e[e.length-1],n=new Date(this.getFormattedString(t));if(i&&(i.indexOf("VALUE=DATE")>-1||i.indexOf("RECURRENCE-ID;TZID")>-1)){var r=/^(\d{4})(\d{2})(\d{2})$/.exec(t);null!==r&&(n=new Date(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10))),i.indexOf("DTSTART")>-1&&(this.allDay=!0)}var o=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(Z)?$/.exec(t);return null!==o&&(n="Z"===o[7]?new Date(Date.UTC(parseInt(o[1],10),parseInt(o[2],10)-1,parseInt(o[3],10),parseInt(o[4],10),parseInt(o[5],10),parseInt(o[6],10))):new Date(parseInt(o[1],10),parseInt(o[2],10)-1,parseInt(o[3],10),parseInt(o[4],10),parseInt(o[5],10),parseInt(o[6],10))),n},a.prototype.getModuleName=function(){return"iCalendarImport"},a.prototype.destroy=function(){},a}(),mA=function(){function a(i){this.parent=i}return a.prototype.initializeExcelExport=function(i){void 0===i&&(i={});var o,l,e=this.getExportColumns(i),t=i.fileName||"Schedule",n=i.exportType||"xlsx",r=i.includeOccurrences||!1;!(0,s.hX)(i.separator)&&","!==i.separator&&(o=i.separator),l=i.customData?r?this.parent.eventBase.getProcessedEvents(i.customData):i.customData:r?this.parent.eventsProcessed:this.parent.eventsData,this.processWorkbook(e,t,n,l,o)},a.prototype.processWorkbook=function(i,e,t,n,r){var o=this,l=[],h=[],d=[];i.forEach(function(m,g){l.push({index:g+1,width:"Id"===m.name?50:150})});var p={fontSize:12,borders:{color:"#E0E0E0"},bold:!0};i.forEach(function(m,g){d.push({index:g+1,value:m.text,style:p})}),h.push({index:1,cells:d}),n.forEach(function(m,g){var v=[];i.forEach(function(b,y){var S={index:y+1,value:m[b.name]||""};b.name!==o.parent.eventFields.startTime&&b.name!==o.parent.eventFields.endTime||(S=(0,s.X$)({},S,{style:{fontSize:12,numberFormat:"m/d/yyyy h:mm a"}},!0)),v.push(S)}),h.push({index:g+2,cells:v})}),this.parent.trigger("excelExport",{cancel:!1,worksheets:[{columns:l,rows:h}]},function(m){m.cancel||new z1({worksheets:m.worksheets},t,o.parent.locale,void 0,r).save(e+"."+t)})},a.prototype.getExportColumns=function(i){var e=this,t=i.fieldsInfo||[];return 0===t.length&&(i.fields||Object.keys(this.parent.eventFields).map(function(r){return e.parent.eventFields[""+r]})).forEach(function(r){t.push({name:r,text:r})}),t},a.prototype.getModuleName=function(){return"excelExport"},a.prototype.destroy=function(){this.parent=null},a}(),gA=function(){function a(i){this.parent=i}return a.prototype.print=function(i){(0,s.hX)(i)?this.printScheduler():this.printSchedulerWithModel(i)},a.prototype.printScheduler=function(){var i=this,e=this.parent.element.cloneNode(!0);e.id=this.parent.element.id+"_print",this.parent.trigger(db,{cancel:!1,printElement:e},function(n){if(!n.cancel){document.body.appendChild(e);for(var r="MonthAgenda"===i.parent.currentView?".e-appointment-wrap":".e-content-wrap",o=i.parent.element.querySelector(r),h="",d=0,p=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style"));d<p.length;d++)h+=p[d].outerHTML;var f=(0,s.n)("div");e.style.width=i.parent.element.offsetWidth+"px";var m=100*Math.round(parseInt(e.style.width,10)/100);f.appendChild(e);var g=window.open("","print","height=550,width="+m+",tabbar=no");g.document.write("<!DOCTYPE html><html><head>"+h+"</head><body>"+f.innerHTML+"<script>(function() { window.ready = true; })();<\/script></body></html>
1"),g.document.close(),g.focus(),setTimeout(function(){if(g.ready&&o){o.scrollLeft=o.scrollLeft,o.scrollTop=o.scrollTop;var v=g.document.querySelector(".e-date-header-wrap");v&&(v.scrollLeft=o.scrollLeft);var b=g.document.querySelector(".e-time-cells-wrap");b&&(b.scrollTop=o.scrollTop);var y=g.document.querySelector(r);y&&(y.scrollLeft=o.scrollLeft,y.scrollTop=o.scrollTop),g.print(),g.close()}},500)}})},a.prototype.printSchedulerWithModel=function(i){var e=this,t=(0,s.n)("div",{id:this.parent.element.id+"_print",className:"e-print-schedule"});document.body.appendChild(t),lS.Inject(pS,uS,fS,Ad,gS,vS,yS,SS,ym,CS),this.printInstance=new lS(this.getPrintScheduleModel(i)),this.printInstance.isPrinting=!0,this.printInstance.registeredTemplate=this.parent.registeredTemplate,this.printInstance.root=this.parent.root?this.parent.root:this.parent,this.printInstance.appendTo(t),this.parent.trigger(db,{cancel:!1,printElement:t},function(r){r.cancel?e.printCleanup():(e.printInstance.on(Ju,e.contentReady,e),e.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),e.printWindow.moveTo(0,0),e.printWindow.resizeTo(screen.availWidth,screen.availHeight))})},a.prototype.getPrintScheduleModel=function(i){for(var o,l,h,d,e={},n=["cellHeaderTemplate","dayHeaderTemplate","monthHeaderTemplate","cellTemplate","dateHeaderTemplate","dateRangeTemplate","eventTemplate","resourceHeaderTemplate","headerIndentTemplate"],r=["actionBegin","actionComplete","actionFailure","created","dataBinding","dataBound","destroyed","eventRendered","moreEventsClick","navigating","popupOpen","popupClose","renderCell"],p=0,u=["agendaDaysCount","calendarMode","cssClass","currentView","dateFormat","enableRtl","endHour","eventSettings","firstDayOfWeek","firstMonthOfYear","group","height","locale","maxDate","minDate","readonly","resources","rowAutoHeight","selectedDate","showHeaderBar","showTimeIndicator","showWeekNumber","showWeekend","startHour","timeFormat","timeScale","timezone","views","width","workDays","workHours","dateHeaderTemplate","dateRangeTemplate","cellHeaderTemplate","dayHeaderTemplate","monthHeaderTemplate","cellTemplate","resourceHeaderTemplate","headerIndentTemplate","actionBegin","actionComplete","actionFailure","created","dataBinding","dataBound","destroyed","eventRendered","moreEventsClick","navigating","popupOpen","popupClose","renderCell"];p<u.length;p++){var f=u[p];switch(f){case"eventSettings":(o=Object.assign({},this.parent.eventSettings.properties)).dataSource=this.parent.eventsData;var m=(0,s.hX)(i.eventSettings)||(0,s.hX)(i.eventSettings.template)?o.template:i.eventSettings.template;o.template=this.parent.isAngular||"function"!=typeof m?m:null,e.eventSettings=o;break;case"group":(l=(0,s.hX)(i.group)?this.parent.group:i.group).headerTooltipTemplate=null,e.group=l;break;case"timeScale":h=(0,s.hX)(i.timeScale)?this.parent.timeScale:i.timeScale,this.parent.isAngular||(h.majorSlotTemplate="function"==typeof h.majorSlotTemplate?null:h.majorSlotTemplate,h.minorSlotTemplate="function"==typeof h.minorSlotTemplate?null:h.minorSlotTemplate),e.timeScale=h;break;case"views":if(d=(0,s.hX)(i.views)?this.parent.views:i.views,!this.parent.isAngular&&d&&d.length>0&&"object"==typeof d[0])for(var g=function(S){n.forEach(function(E){(0,s.hX)(S[""+E])||(S[""+E]="function"==typeof S[""+E]?null:S[""+E])})},v=0,b=d;v<b.length;v++)g(b[v]);e.views=d;break;default:if(n.indexOf(f)>-1){e[""+f]=(0,s.hX)(i[""+f])?this.parent.isAngular||"function"!=typeof this.parent[""+f]?this.parent[""+f]:null:this.parent.isAngular||"function"!=typeof i[""+f]?i[""+f]:null;break}if(r.indexOf(f)>-1){e[""+f]=i[""+f];break}e[""+f]=(0,s.hX)(i[""+f])?this.parent[""+f]:i[""+f]}}return e},a.prototype.contentReady=function(){var i=this;this.printWindow=(0,s.yy)(this.printInstance.element,this.printWindow),this.closePrintWindow(this.printWindow,!0),this.printWindow.onbeforeunload=function(){i.printCleanup()}},a.prototype.closePrintWindow=function(i,e){var t=this;if(s.Pw.isIos)var n=setInterval(function(){i.opener?i.close():(0,s.hX)(i.opener)&&(e&&t.printCleanup(),clearInterval(n))},500)},a.prototype.printCleanup=function(){this.printInstance&&(this.printInstance.off(Ju,this.contentReady),this.printInstance.element.remove(),this.printInstance.destroy(),this.printInstance=null),this.printWindow&&(this.printWindow.onbeforeunload=null,this.printWindow=null)},a.prototype.getModuleName=function(){return"print"},a.prototype.destroy=function(){this.parent=null},a}(),Qe=H(60177);let Sm=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=c.$C({type:a}),a.\u0275inj=c.G2t({imports:[[Qe.MD]]}),a})();const ES={provide:"ScheduleDay",useValue:pS},_S={provide:"ScheduleWeek",useValue:uS},TS={provide:"ScheduleWorkWeek",useValue:fS},IS={provide:"ScheduleMonth",useValue:Ad},vA={provide:"ScheduleYear",useValue:ym},xS={provide:"ScheduleAgenda",useValue:gS},wS={provide:"ScheduleMonthAgenda",useValue:vS},bA={provide:"ScheduleTimelineViews",useValue:yS},yA={provide:"ScheduleTimelineMonth",useValue:SS},SA={provide:"ScheduleTimelineYear",useValue:CS},OS={provide:"ScheduleResize",useValue:JO},AS={provide:"ScheduleDragAndDrop",useValue:eA},CA={provide:"ScheduleExcelExport",useValue:mA},EA={provide:"ScheduleICalendarExport",useValue:uA},_A={provide:"ScheduleICalendarImport",useValue:fA},TA={provide:"SchedulePrint",useValue:gA};let IA=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=c.$C({type:a}),a.\u0275inj=c.G2t({providers:[ES,_S,TS,IS,vA,xS,wS,bA,yA,SA,OS,AS,CA,EA,_A,TA],imports:[[Qe.MD,Sm],Sm]}),a})(),Cm=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=c.$C({type:a}),a.\u0275inj=c.G2t({imports:[[Qe.MD]]}),a})(),xA=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=c.$C({type:a}),a.\u0275inj=c.G2t({providers:[],imports:[[Qe.MD,Cm],Cm]}),a})();var Pe=H(31635),oe=H(89417);const lc=["footerTemplate"],cc=["headerTemplate"],Em=["valueTemplate"],Pd=["groupTemplate"],Ea=["itemTemplate"],_a=["noRecordsTemplate"],hc=["actionFailureTemplate"];var _m;const wA=["actionBegin","actionComplete","actionFailure","beforeOpen","blur","change","close","created","dataBound","destroyed","filtering","focus","open","resizeStart","resizeStop","resizing","select","valueChange"],OA=["value"];let Bi=_m=class extends vs{constructor(i,e,t,n,r){super(),this.ngEle=i,this.srenderer=e,this.viewContainerRef
1=t,this.injector=n,this.cdr=r,this.skipFromEvent=!0,this.element=this.ngEle.nativeElement,this.injectedModules=this.injectedModules||[];try{let o=this.injector.get("DropDownsVirtualScroll");-1===this.injectedModules.indexOf(o)&&this.injectedModules.push(o)}catch{}this.registerEvents(wA),this.addTwoWay.call(this,OA),(0,re.KY)("currentInstance",this,this.viewContainerRef),this.formContext=new re.C7,this.formCompContext=new re.xu}registerOnChange(i){}registerOnTouched(i){}writeValue(i){}setDisabledState(i){}ngOnInit(){this.formCompContext.ngOnInit(this)}ngAfterViewInit(){this.formContext.ngAfterViewInit(this)}ngOnDestroy(){this.formCompContext.ngOnDestroy(this)}ngAfterContentChecked(){this.formCompContext.ngAfterContentChecked(this)}};Bi.\u0275fac=function(i){return new(i||Bi)(c.rXU(c.aKT),c.rXU(c.sFG),c.rXU(c.c1b),c.rXU(c.zZn),c.rXU(c.gRc))},Bi.\u0275cmp=c.VBU({type:Bi,selectors:[["ejs-dropdownlist"]],contentQueries:function(i,e,t){if(1&i&&(c.wni(t,lc,5),c.wni(t,cc,5),c.wni(t,Em,5),c.wni(t,Pd,5),c.wni(t,Ea,5),c.wni(t,_a,5),c.wni(t,hc,5)),2&i){let n;c.mGM(n=c.lsd())&&(e.footerTemplate=n.first),c.mGM(n=c.lsd())&&(e.headerTemplate=n.first),c.mGM(n=c.lsd())&&(e.valueTemplate=n.first),c.mGM(n=c.lsd())&&(e.groupTemplate=n.first),c.mGM(n=c.lsd())&&(e.itemTemplate=n.first),c.mGM(n=c.lsd())&&(e.noRecordsTemplate=n.first),c.mGM(n=c.lsd())&&(e.actionFailureTemplate=n.first)}},inputs:{actionFailureTemplate:"actionFailureTemplate",allowFiltering:"allowFiltering",allowObjectBinding:"allowObjectBinding",allowResize:"allowResize",cssClass:"cssClass",dataSource:"dataSource",debounceDelay:"debounceDelay",enablePersistence:"enablePersistence",enableRtl:"enableRtl",enableVirtualization:"enableVirtualization",enabled:"enabled",fields:"fields",filterBarPlaceholder:"filterBarPlaceholder",filterType:"filterType",floatLabelType:"floatLabelType",footerTemplate:"footerTemplate",groupTemplate:"groupTemplate",headerTemplate:"headerTemplate",htmlAttributes:"htmlAttributes",ignoreAccent:"ignoreAccent",ignoreCase:"ignoreCase",index:"index",isDeviceFullScreen:"isDeviceFullScreen",itemTemplate:"itemTemplate",locale:"locale",noRecordsTemplate:"noRecordsTemplate",placeholder:"placeholder",popupHeight:"popupHeight",popupWidth:"popupWidth",query:"query",readonly:"readonly",showClearButton:"showClearButton",sortOrder:"sortOrder",text:"text",value:"value",valueTemplate:"valueTemplate",width:"width",zIndex:"zIndex"},outputs:{actionBegin:"actionBegin",actionComplete:"actionComplete",actionFailure:"actionFailure",beforeOpen:"beforeOpen",blur:"blur",change:"change",close:"close",created:"created",dataBound:"dataBound",destroyed:"destroyed",filtering:"filtering",focus:"focus",open:"open",resizeStart:"resizeStart",resizeStop:"resizeStop",resizing:"resizing",select:"select",valueChange:"valueChange"},features:[c.Jv_([{provide:oe.kq,useExisting:(0,c.Rfq)(()=>_m),multi:!0}]),c.Vt3],decls:0,vars:0,template:function(i,e){},encapsulation:2,changeDetection:0}),(0,Pe.Cg)([(0,re.Bj)()],Bi.prototype,"footerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Bi.prototype,"headerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Bi.prototype,"valueTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Bi.prototype,"groupTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Bi.prototype,"itemTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("No records found")],Bi.prototype,"noRecordsTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("Request failed")],Bi.prototype,"actionFailureTemplate",void 0),Bi=_m=(0,Pe.Cg)([(0,re.yZ)([re.xu,re.C7])],Bi);let Dd=(()=>{class a{}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=c.$C({type:a}),a.\u0275inj=c.G2t({imports:[[Qe.MD]]}),a})();var Tm;const AA=["actionBegin","actionComplete","actionFailure","beforeOpen","blur","change","close","created","customValueSpecifier","dataBound","destroyed","filtering","focus","open","resizeStart","resizeStop","resizing","select","valueChange"],PA=["value"];let Rn=Tm=class extends k0{constructor(i,e,t,n,r){super(),this.ngEle=i,this.srenderer=e,this.viewContainerRef=t,this.injector=n,this.cdr=r,this.skipFromEvent=!0,this.element=this.ngEle.nativeElement,this.injectedModules=this.injectedModules||[];try{let o=this.injector.get("DropDownsVirtualScroll");-1===this.injectedModules.indexOf(o)&&this.injectedModules.push(o)}catch{}this.registerEvents(AA),this.addTwoWay.call(this,PA),(0,re.KY)("currentInstance",this,this.viewContainerRef),this.formContext=new re.C7,this.formCompContext=new re.xu}registerOnChange(i){}registerOnTouched(i){}writeValue(i){}setDisabledState(i){}ngOnInit(){this.formCompContext.ngOnInit(this)}ngAfterViewInit(){this.formContext.ngAfterViewInit(this)}ngOnDestroy(){this.formCompContext.ngOnDestroy(this)}ngAfterContentChecked(){this.formCompContext.ngAfterContentChecked(this)}};var Im;Rn.\u0275fac=function(i){return new(i||Rn)(c.rXU(c.aKT),c.rXU(c.sFG),c.rXU(c.c1b),c.rXU(c.zZn),c.rXU(c.gRc))},Rn.\u0275cmp=c.VBU({type:Rn,selectors:[["ejs-combobox"]],contentQueries:function(i,e,t){if(1&i&&(c.wni(t,lc,5),c.wni(t,cc,5),c.wni(t,Pd,5),c.wni(t,Ea,5),c.wni(t,_a,5),c.wni(t,hc,5)),2&i){let n;c.mGM(n=c.lsd())&&(e.footerTemplate=n.first),c.mGM(n=c.lsd())&&(e.headerTemplate=n.first),c.mGM(n=c.lsd())&&(e.groupTemplate=n.first),c.mGM(n=c.lsd())&&(e.itemTemplate=n.first),c.mGM(n=c.lsd())&&(e.noRecordsTemplate=n.first),c.mGM(n=c.lsd())&&(e.actionFailureTemplate=n.first)}},inputs:{actionFailureTemplate:"actionFailureTemplate",allowCustom:"allowCustom",allowFiltering:"allowFiltering",allowObjectBinding:"allowObjectBinding",allowResize:"allowResize",autofill:"autofill",cssClass:"cssClass",dataSource:"dataSource",debounceDelay:"debounceDelay",enablePersistence:"enablePersistence",enableRtl:"enableRtl",enableVirtualization:"enableVirtualization",enabled:"enabled",fields:"fields",filterBarPlaceholder:"filterBarPlaceholder",filterType:"filterType",floatLabelType:"floatLabelType",footerTemplate:"footerTemplate",groupTemplate:"groupTemplate",headerTemplate:"headerTemplate",htmlAttributes:"htmlAttributes",ignoreAccent:"ignoreAccent",ignoreCase:"ignoreCase",index:"index",isDeviceFullScreen:"isDeviceFullScreen",itemTemplate:"itemTemplate",locale:"locale",noRecordsTemplate:"noRecordsTemplate",placeholder:"placeholder",popupHeight:"popupHeight",popupWidth:"popupWidth",query:"query",readonly:"readonly",showClearButton:"showClearButton",sortOrder:"sortOrder",text:"text",value:"value",valueTemplate:"valueTemplate",width:"width",zIndex:"zIndex"},outputs:{actionBegin:"actionBegin",actionComplete:"actionComplete",actionFailure:"actionFailure",beforeOpen:"beforeOpen",blur:"blur",change:"change",close:"close",created:"created",customValueSpecifier:"customValueSpecifier",dataBound:"dataBound",destroyed:"destroyed",filtering:"filtering",focus:"focus",open:"open",resizeStart:"resizeStart",resizeStop:"resizeStop",resizing:"resizing",select:"select",valueChange:"valueChange"},features:[c.Jv_([{provide:oe.kq,useExisting:(0,c.Rfq)(()=>Tm),multi:!0}]),c.Vt3],decls:0,vars:0,template:function(i,e){},encapsulation:2,changeDetection:0}),(0,Pe.Cg)([(0,re.Bj)()],Rn.prototype,"footerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Rn.prototype,"headerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Rn.prototype,"groupTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Rn.prototype,"itemTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("No records foun
1d")],Rn.prototype,"noRecordsTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("Request failed")],Rn.prototype,"actionFailureTemplate",void 0),Rn=Tm=(0,Pe.Cg)([(0,re.yZ)([re.xu,re.C7])],Rn);const DA=["actionBegin","actionComplete","actionFailure","beforeOpen","blur","change","close","created","customValueSpecifier","dataBound","destroyed","filtering","focus","open","resizeStart","resizeStop","resizing","select","valueChange"],kA=["value"];let Nn=Im=class extends DI{constructor(i,e,t,n,r){super(),this.ngEle=i,this.srenderer=e,this.viewContainerRef=t,this.injector=n,this.cdr=r,this.skipFromEvent=!0,this.element=this.ngEle.nativeElement,this.injectedModules=this.injectedModules||[];try{let o=this.injector.get("DropDownsVirtualScroll");-1===this.injectedModules.indexOf(o)&&this.injectedModules.push(o)}catch{}this.registerEvents(DA),this.addTwoWay.call(this,kA),(0,re.KY)("currentInstance",this,this.viewContainerRef),this.formContext=new re.C7,this.formCompContext=new re.xu}registerOnChange(i){}registerOnTouched(i){}writeValue(i){}setDisabledState(i){}ngOnInit(){this.formCompContext.ngOnInit(this)}ngAfterViewInit(){this.formContext.ngAfterViewInit(this)}ngOnDestroy(){this.formCompContext.ngOnDestroy(this)}ngAfterContentChecked(){this.formCompContext.ngAfterContentChecked(this)}};var xm;Nn.\u0275fac=function(i){return new(i||Nn)(c.rXU(c.aKT),c.rXU(c.sFG),c.rXU(c.c1b),c.rXU(c.zZn),c.rXU(c.gRc))},Nn.\u0275cmp=c.VBU({type:Nn,selectors:[["ejs-autocomplete"]],contentQueries:function(i,e,t){if(1&i&&(c.wni(t,lc,5),c.wni(t,cc,5),c.wni(t,Pd,5),c.wni(t,Ea,5),c.wni(t,_a,5),c.wni(t,hc,5)),2&i){let n;c.mGM(n=c.lsd())&&(e.footerTemplate=n.first),c.mGM(n=c.lsd())&&(e.headerTemplate=n.first),c.mGM(n=c.lsd())&&(e.groupTemplate=n.first),c.mGM(n=c.lsd())&&(e.itemTemplate=n.first),c.mGM(n=c.lsd())&&(e.noRecordsTemplate=n.first),c.mGM(n=c.lsd())&&(e.actionFailureTemplate=n.first)}},inputs:{actionFailureTemplate:"actionFailureTemplate",allowCustom:"allowCustom",allowFiltering:"allowFiltering",allowObjectBinding:"allowObjectBinding",allowResize:"allowResize",autofill:"autofill",cssClass:"cssClass",dataSource:"dataSource",debounceDelay:"debounceDelay",enablePersistence:"enablePersistence",enableRtl:"enableRtl",enableVirtualization:"enableVirtualization",enabled:"enabled",fields:"fields",filterBarPlaceholder:"filterBarPlaceholder",filterType:"filterType",floatLabelType:"floatLabelType",footerTemplate:"footerTemplate",groupTemplate:"groupTemplate",headerTemplate:"headerTemplate",highlight:"highlight",htmlAttributes:"htmlAttributes",ignoreAccent:"ignoreAccent",ignoreCase:"ignoreCase",index:"index",isDeviceFullScreen:"isDeviceFullScreen",itemTemplate:"itemTemplate",locale:"locale",minLength:"minLength",
1noRecordsTemplate:"noRecordsTemplate",placeholder:"placeholder",popupHeight:"popupHeight",popupWidth:"popupWidth",query:"query",readonly:"readonly",showClearButton:"showClearButton",showPopupButton:"showPopupButton",sortOrder:"sortOrder",suggestionCount:"suggestionCount",text:"text",value:"value",valueTemplate:"valueTemplate",width:"width",zIndex:"zIndex"},outputs:{actionBegin:"actionBegin",actionComplete:"actionComplete",actionFailure:"actionFailure",beforeOpen:"beforeOpen",blur:"blur",change:"change",close:"close",created:"created",customValueSpecifier:"customValueSpecifier",dataBound:"dataBound",destroyed:"destroyed",filtering:"filtering",focus:"focus",open:"open",resizeStart:"resizeStart",resizeStop:"resizeStop",resizing:"resizing",select:"select",valueChange:"valueChange"},features:[c.Jv_([{provide:oe.kq,useExisting:(0,c.Rfq)(()=>Im),multi:!0}]),c.Vt3],decls:0,vars:0,template:function(i,e){},encapsulation:2,changeDetection:0}),(0,Pe.Cg)([(0,re.Bj)()],Nn.prototype,"footerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Nn.prototype,"headerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Nn.prototype,"groupTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Nn.prototype,"itemTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("No records found")],Nn.prototype,"noRecordsTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("Request failed")],Nn.prototype,"actionFailureTemplate",void 0),Nn=Im=(0,Pe.Cg)([(0,re.yZ)([re.xu,re.C7])],Nn);const MA=["actionBegin","actionComplete","actionFailure","beforeOpen","beforeSelectAll","blur","change","chipSelection","close","created","customValueSelection","dataBound","destroyed","filtering","focus","open","removed","removing","resizeStart","resizeStop","resizing","select","selectedAll","tagging","valueChange"],LA=["value"];let vn=xm=class extends U0{constructor(i,e,t,n,r){super(),this.ngEle=i,this.srenderer=e,this.viewContainerRef=t,this.injector=n,this.cdr=r,this.skipFromEvent=!0,this.element=this.ngEle.nativeElement,this.injectedModules=this.injectedModules||[];try{let o=this.injector.get("DropDownsCheckBoxSelection");-1===this.injectedModules.indexOf(o)&&this.injectedModules.push(o)}catch{}try{let o=this.injector.get("DropDownsVirtualScroll");-1===this.injectedModules.indexOf(o)&&this.injectedModules.push(o)}catch{}this.registerEvents(MA),this.addTwoWay.call(this,LA),(0,re.KY)("currentInstance",this,this.viewContainerRef),this.formContext=new re.C7,this.formCompContext=new re.xu}registerOnChange(i){}registerOnTouched(i){}writeValue(i){}setDisabledState(i){}ngOnInit(){this.formCompContext.ngOnInit(this)}ngAfterViewInit(){this.formContext.ngAfterViewInit(this)}ngOnDestroy(){this.formCompContext.ngOnDestroy(this)}ngAfterContentChecked(){this.formCompContext.ngAfterContentChecked(this)}};var wm;vn.\u0275fac=function(i){return new(i||vn)(c.rXU(c.aKT),c.rXU(c.sFG),c.rXU(c.c1b),c.rXU(c.zZn),c.rXU(c.gRc))},vn.\u0275cmp=c.VBU({type:vn,selectors:[["ejs-multiselect"]],contentQueries:function(i,e,t){if(1&i&&(c.wni(t,lc,5),c.wni(t,cc,5),c.wni(t,Em,5),c.wni(t,Ea,5),c.wni(t,Pd,5),c.wni(t,_a,5),c.wni(t,hc,5)),2&i){let n;c.mGM(n=c.lsd())&&(e.footerTemplate=n.first),c.mGM(n=c.lsd())&&(e.headerTemplate=n.first),c.mGM(n=c.lsd())&&(e.valueTemplate=n.first),c.mGM(n=c.lsd())&&(e.itemTemplate=n.first),c.mGM(n=c.lsd())&&(e.groupTemplate=n.first),c.mGM(n=c.lsd())&&(e.noRecordsTemplate=n.first),c.mGM(n=c.lsd())&&(e.actionFailureTemplate=n.first)}},inputs:{actionFailureTemplate:"actionFailureTemplate",addTagOnBlur:"addTagOnBlur",allowCustomValue:"allowCustomValue",allowFiltering:"allowFiltering",allowObjectBinding:"allowObjectBinding",allowResize:"allowResize",changeOnBlur:"changeOnBlur",closePopupOnSelect:"closePopupOnSelect",cssClass:"cssClass",dataSource:"dataSource",debounceDelay:"debounceDelay",delimiterChar:"delimiterChar",enableGroupCheckBox:"enableGroupCheckBox",enableHtmlSanitizer:"enableHtmlSanitizer",enablePersistence:"enablePersistence",enableRtl:"enableRtl",enableSelectionOrder:"enableSelectionOrder",enableVirtualization:"enableVirtualization",enabled:"enabled",fields:"fields",filterBarPlaceholder:"filterBarPlaceholder",filterType:"filterType",floatLabelType:"floatLabelType",footerTemplate:"footerTemplate",groupTemplate:"groupTemplate",headerTemplate:"headerTemplate",hideSelectedItem:"hideSelectedItem",htmlAttributes:"htmlAttributes",ignoreAccent:"ignoreAccent",ignoreCase:"ignoreCase",isDeviceFullScreen:"isDeviceFullScreen",itemTemplate:"itemTemplate",locale:"locale",maximumSelectionLength:"maximumSelectionLength",mode:"mode",noRecordsTemplate:"noRecordsTemplate",openOnClick:"openOnClick",placeholder:"placeholder",popupHeight:"popupHeight",popupWidth:"popupWidth",query:"query",readonly:"readonly",selectAllText:"selectAllText",showClearButton:"showClearButton",showDropDownIcon:"showDropDownIcon",showSelectAll:"showSelectAll",sortOrder:"sortOrder",text:"text",unSelectAllText:"unSelectAllText",value:"value",valueTemplate:"valueTemplate",width:"width",zIndex:"zIndex"},outputs:{actionBegin:"actionBegin",actionComplete:"actionComplete",actionFailure:"actionFailure",beforeOpen:"beforeOpen",beforeSelectAll:"beforeSelectAll",blur:"blur",change:"change",chipSelection:"chipSelection",close:"close",created:"created",customValueSelection:"customValueSelection",dataBound:"dataBound",destroyed:"destroyed",filtering:"filtering",focus:"focus",open:"open",removed:"removed",removing:"removing",resizeStart:"resizeStart",resizeStop:"resizeStop",resizing:"resizing",select:"select",selectedAll:"selectedAll",tagging:"tagging",valueChange:"valueChange"},features:[c.Jv_([{provide:oe.kq,useExisting:(0,c.Rfq)(()=>xm),multi:!0}]),c.Vt3],decls:0,vars:0,template:function(i,e){},encapsulation:2,changeDetection:0}),(0,Pe.Cg)([(0,re.Bj)()],vn.prototype,"footerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],vn.prototype,"headerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],vn.prototype,"valueTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],vn.prototype,"itemTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],vn.prototype,"groupTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("No records foun
1d")],vn.prototype,"noRecordsTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("Request failed")],vn.prototype,"actionFailureTemplate",void 0),vn=xm=(0,Pe.Cg)([(0,re.yZ)([re.xu,re.C7])],vn);const RA=["focus","blur","actionBegin","actionComplete","actionFailure","beforeDrop","beforeItemRender","change","created","dataBound","destroyed","drag","dragStart","drop","filtering","select","valueChange"],NA=["value"];let Ds=wm=class extends p1{constructor(i,e,t,n,r){super(),this.ngEle=i,this.srenderer=e,this.viewContainerRef=t,this.injector=n,this.cdr=r,this.element=this.ngEle.nativeElement,this.injectedModules=this.injectedModules||[];try{let o=this.injector.get("DropDownsCheckBoxSelection");-1===this.injectedModules.indexOf(o)&&this.injectedModules.push(o)}catch{}this.registerEvents(RA),this.addTwoWay.call(this,NA),(0,re.KY)("currentInstance",this,this.viewContainerRef),this.formContext=new re.C7,this.formCompContext=new re.xu}registerOnChange(i){}registerOnTouched(i){}writeValue(i){}setDisabledState(i){}ngOnInit(){this.formCompContext.ngOnInit(this)}ngAfterViewInit(){this.formContext.ngAfterViewInit(this)}ngOnDestroy(){this.formCompContext.ngOnDestroy(this)}ngAfterContentChecked(){this.formCompContext.ngAfterContentChecked(this)}};var Om;Ds.\u0275fac=function(i){return new(i||Ds)(c.rXU(c.aKT),c.rXU(c.sFG),c.rXU(c.c1b),c.rXU(c.zZn),c.rXU(c.gRc))},Ds.\u0275cmp=c.VBU({type:Ds,selectors:[["ejs-listbox"]],contentQueries:function(i,e,t){if(1&i&&(c.wni(t,Ea,5),c.wni(t,_a,5)),2&i){let n;c.mGM(n=c.lsd())&&(e.itemTemplate=n.first),c.mGM(n=c.lsd())&&(e.noRecordsTemplate=n.first)}},inputs:{actionFailureTemplate:"actionFailureTemplate",allowDragAndDrop:"allowDragAndDrop",allowFiltering:"allowFiltering",cssClass:"cssClass",dataSource:"dataSource",enablePersistence:"enablePersistence",enableRtl:"enableRtl",enabled:"enabled",fields:"fields",filterBarPlaceholder:"filterBarPlaceholder",filterType:"filterType",groupTemplate:"groupTemplate",height:"height",ignoreAccent:"ignoreAccent",ignoreCase:"ignoreCase",itemTemplate:"itemTemplate",locale:"locale",maximumSelectionLength:"maximumSelectionLength",noRecordsTemplate:"noRecordsTemplate",query:"query",scope:"scope",selectionSettings:"selectionSettings",sortOrder:"sortOrder",toolbarSettings:"toolbarSettings",value:"value",zIndex:"zIndex"},outputs:{focus:"focus",blur:"blur",actionBegin:"actionBegin",actionComplete:"actionComplete",actionFailure:"actionFailure",beforeDrop:"beforeDrop",beforeItemRender:"beforeItemRender",change:"change",created:"created",dataBound:"dataBound",destroyed:"destroyed",drag:"drag",dragStart:"dragStart",drop:"drop",filtering:"filtering",select:"select",valueChange:"valueChange"},features:[c.Jv_([{provide:oe.kq,useExisting:(0,c.Rfq)(()=>wm),multi:!0}]),c.Vt3],decls:0,vars:0,template:function(i,e){},encapsulation:2,changeDetection:0}),(0,Pe.Cg)([(0,re.Bj)()],Ds.prototype,"itemTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("No records found")],Ds.prototype,"noRecordsTemplate",void 0),Ds=wm=(0,Pe.Cg)([(0,re.yZ)([re.xu,re.C7])],Ds);const VA=["actionFailure","beforeOpen","blur","change","close","created","dataBound","destroyed","filtering","focus","keyPress","open","select","valueChange"],FA=["value"];let Vn=Om=class extends wI{constructor(i,e,t,n,r){super(),this.ngEle=i,this.srenderer=e,this.viewContainerRef=t,this.injector=n,this.cdr=r,this.skipFromEvent=!0,this.element=this.ngEle.nativeElement,this.injectedModules=this.injectedModules||[],this.registerEvents(VA),this.addTwoWay.call(this,FA),(0,re.KY)("currentInstance",this,this.viewContainerRef),this.formContext=new re.C7,this.formCompContext=new re.xu}registerOnChange(i){}registerOnTouched(i){}writeValue(i){}setDisabledState(i){}ngOnInit(){this.formCompContext.ngOnInit(this)}ngAfterViewInit(){this.formContext.ngAfterViewInit(this)}ngOnDestroy(){this.formCompContext.ngOnDestroy(this)}ngAfterContentChecked(){this.formCompContext.ngAfterContentChecked(this)}};Vn.\u0275fac=function(i){return new(i||Vn)(c.rXU(c.aKT),c.rXU(c.sFG),c.rXU(c.c1b),c.rXU(c.zZn),c.rXU(c.gRc))},Vn.\u0275cmp=c.VBU({type:Vn,selectors:[["ejs-dropdowntree"]],contentQueries:function(i,e,t){if(1&i&&(c.wni(t,lc,5),c.wni(t,cc,5),c.wni(t,Em,5),c.wni(t,Ea,5),c.wni(t,_a,5),c.wni(t,hc,5)),2&i){let n;c.mGM(n=c.lsd())&&(e.footerTemplate=n.first),c.mGM(n=c.lsd())&&(e.headerTemplate=n.first),c.mGM(n=c.lsd())&&(e.valueTemplate=n.first),c.mGM(n=c.lsd())&&(e.itemTemplate=n.first),c.mGM(n=c.lsd())&&(e.noRecordsTemplate=n.first),c.mGM(n=c.lsd())&&(e.actionFailureTemplate=n.first)}},inputs:{actionFailureTemplate:"actionFailureTemplate",allowFiltering:"allowFiltering",allowMultiSelection:"allowMultiSelection",changeOnBlur:"changeOnBlur",cssClass:"cssClass",customTemplate:"customTemplate",delimiterChar:"delimiterChar",destroyPopupOnHide:"destroyPopupOnHide",enableHtmlSanitizer:"enableHtmlSanitizer",enablePersistence:"enablePersistence",enableRtl:"enableRtl",enabled:"enabled",fields:"fields",filterBarPlaceholder:"filterBarPlaceholder",filterType:"filterType",floatLabelType:"floatLabelType",footerTemplate:"footerTemplate",headerTemplate:"headerTemplate",htmlAttributes:"htmlAttributes",ignoreAccent:"ignoreAccent",ignoreCase:"ignoreCase",itemTemplate:"itemTemplate",locale:"locale",mode:"mode",noRecordsTemplate:"noRecordsTemplate",placeholder:"placeholder",popupHeight:"popupHeight",popupWidth:"popupWidth",readonly:"readonly",selectAllText:"selectAllText",showCheckBox:"showCheckBox",showClearButton:"showClearButton",showDropDownIcon:"showDropDownIcon",showSelectAll:"showSelectAll",sortOrder:"sortOrder",text:"text",treeSettings:"treeSettings",unSelectAllText:"unSelectAllText",value:"value",valueTemplate:"valueTemplate",width:"width",wrapText:"wrapText",zIndex:"zIndex"},outputs:{actionFailure:"actionFailure",beforeOpen:"beforeOpen",blur:"blur",change:"change",close:"close",created:"created",dataBound:"dataBound",destroyed:"destroyed",filtering:"filtering",focus:"focus",keyPress:"keyPress",open:"open",select:"select",valueChange:"valueChange"},features:[c.Jv_([{provide:oe.kq,useExisting:(0,c.Rfq)(()=>Om),multi:!0}]),c.Vt3],decls:0,vars:0,template:function(i,e){},encapsulation:2,changeDetection:0}),(0,Pe.Cg)([(0,re.Bj)()],Vn.prototype,"footerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Vn.prototype,"headerTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Vn.prototype,"valueTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)()],Vn.prototype,"itemTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("No Records Found")],Vn.prototype,"noRecordsTemplate",void 0),(0,Pe.Cg)([(0,re.Bj)("The Request Failed")],Vn.prototype,"actionFailureTemplate",void 0),Vn=Om=(0,Pe.Cg)([(0,re.yZ)([re.xu,re.C7])],Vn);var ye=H(77339),BA=H(97586),Q=H.n(BA),Fn=H(35052),pe=H(51564),HA=H(59030);function PS(a,i,e){return(0,HA.v)(()=>a()?i:e)}var nr=H(7673),DS=H(27468),ue=H(96354),ai=H(88141),be=H(17370),St=H(99437);const Ve="/visite/pc";let Pi=(()=>{var a;class i{constructor(){this.backend=(0,c.WQX)(be.m3)}saveInspectionReservation(t,n){return n.isoTime={startDate:n.startDate.toISOString(),endDate:n.endDate.toISOString(),startDateOffset:n.startDate.getTimezoneOffset(),endDateOffset:n.endDate.getTimezoneOffset()},this.backend.post(`${Ve}/rendezvous/reservation`,{origin:"PC",action:"UPDATE",citoyen:t,reservation:n}).pipe((0,ue.T)(r=>{var o,l;return{errorCode:null!==(o=null===(l=r.data)||void 0===l?void 0:l.errorCode)&&void 0!==o?o:0}}),(0,St.W)(()=>(0,nr.of)({errorCode:1})))}getPlageHoraires(){return this.backend.get(`${Ve}/plage-horaires`).pipe((0,ue.T)(t=>t.map(n=>{const{labels:r,...o}=n,l={enumPlageLabels:new Map,...o};for(const h of r)l.enumPlageLabels.set(h.tag,h.label);return l})))}getInvitationRendezvous(t){return this.backend.get(`${Ve}/rendezvous/invitation/${t}`)}getVisiteRendezvous(t){return this.backend.get(`${Ve}/rendezvous/visite/${t}?offset=${(new Date).getTimezoneOffset()}`).pipe((0,ue.T)(n=>({...n,dateDebut:new Date(n.dateDebut),dateFin:new Date(n.dateFin)})))}getInvitationRendezvousByVisiteId(t){return this.backend.get(`${Ve}/rendezvous/visite/${t}/invitation`)}getContactCitoyenByVisiteId(t){return this.backend.get(`${Ve}/rendezvous/visite/${t}/citoyen`)}updateStatutVisite(t,n,r,o){return this.backend.put(`${Ve}/inspection-visite-statut`,{id:t,statutId:n,isFromSessionVisite:r,raisonAnnulation:o,origin:"PC"})}fetchInspectionConversations(t){return this.backend.get(`${Ve}/visite-session/${t}/conversations`).pipe((0,ue.T)(n=>n.map(({dateCreation:r,...o}
1)=>({...o,dateCreation:r?new Date(r):null}))))}saveInspectionConversation(t,n){return this.backend.put(`${Ve}/visite-session/${t}/conversation`,n).pipe((0,ue.T)(r=>{const o=r.data.conversations.map(({dateCreation:l,...h})=>({...h,dateCreation:l?new Date(l):null}));return{message:r.message,code:r.code,data:{conversations:o}}}))}upsertLogDevice(t){return this.backend.put(`${Ve}/log-device`,t)}fetchHoraire(){return this.backend.get(`${Ve}/horaire`)}changeMessagesReadStatus(t){return this.backend.put(`${Ve}/messages-read-status`,t)}getAideTelephone(){return this.backend.get(`${Ve}/aide-telephone`)}getVisiteSession(t){return this.backend.get(`${Ve}/visite-session/${t}`).pipe((0,ue.T)(n=>({statut:n.statut,dateDemarrage:n.dateDemarrage?new Date(n.dateDemarrage):null,recordAccepted:!!n.recordAccepted,backgroundImageId:n.backgroundImageId,infos:{id:n.id,dateVisite:new Date(n.dateVisite),participant:n.participant,inspecteur:n.inspecteur,adresse:n.adresse,code:n.code,duree:n.duree,lienProblemeInspecteur:n.lienProblemeInspecteur,lienSondage:n.lienSondage}})))}getVisiteSessionEnded(t){return this.backend.get(`${Ve}/visite-session/${t}/ended`).pipe((0,ue.T)(({dateVisite:n,...r})=>({...r,dateVisite:new Date(n)})))}getVisiteSessionRoomConnected(t){return this.backend.get(`${Ve}/visite-session/${t}/room-connected`)}fetchInspectionNotes(t){return this.backend.get(`${Ve}/visite-session/${t}/notes`).pipe((0,ue.T)(n=>n.map(({dateCreation:r,dateModification:o,...l})=>({...l,dateCreation:r?new Date(r):null,dateModification:o?new Date(o):null}))))}getStatutVisite(t){return this.backend.get(`${Ve}/visite-session/${t}/statut`).pipe((0,ue.T)(n=>n.statut))}fetchVisiteDocuments(t){return this.backend.get(`${Ve}/visite-session/${t}/documents`).pipe((0,ue.T)(n=>n.map(({dateCreation:r,...o})=>({...o,dateCreation:r?new Date(r):null}))))}getVisiteDocument(t,n){return this.backend.get(`${Ve}/visite-session/${t}/document/${n}`).pipe((0,ue.T)(({dateCreation:r,...o})=>({...o,dateCreation:r?new Date(r):null})))}getVisiteSessionAccessToken(t,n,r){return this.backend.get(`${Ve}/visite-session/${t}/token/${n}`,{role:r}).pipe((0,ue.T)(o=>o.token))}updateVisiteSessionRecordAccord(t,n){return this.backend.put(`${Ve}/visite-session/${t}/record/accord`,{accepted:n})}updateVisiteSessionRecordState(t,n){return this.backend.put(`${Ve}/visite-session/${t}/record/state`,{recording:n})}publishVisiteSessionSnapshot(t,n){return this.backend.post(`${Ve}/visite-session/${t}
1/snapshot`,n).pipe((0,ue.T)(({dateCreation:r,...o})=>({...o,dateCreation:r?new Date(r):null})))}insertVisiteSessionDocument(t,n,r){return this.backend.post(`${Ve}/visite-session/${t}/document`,{docId:n,typDocId:r})}upsertSessionSnapshotEtiquette(t,n,r){return this.backend.put(`${Ve}/visite-session/${t}/snapshot/${n}/etiquette`,{etiquetteId:r})}deleteSessionDocument(t,n){return this.backend.delete(`${Ve}/visite-session/${t}/document/${n}`)}updateVisiteGeoreference(t,n,r){return this.backend.put(`${Ve}/visite-session/${t}/georeference`,{latitude:n,longitude:r})}getVisiteSessionAccessAuthorization(t){return this.backend.get(`${Ve}/visite-session/${t}/access-auth`)}disconnectVisiteSessionCitoyen(t){return this.backend.delete(`${Ve}/visite-session/${t}/disconnect-citoyen`)}fetchInspecteurs(){return this.backend.get(`${Ve}/inspecteurs?onlyActif=true`)}getInspectionEvenementValidateurs(){return this.backend.get(`${Ve}/inspection-evenement/validateurs?offset=${(new Date).getTimezoneOffset()}`).pipe((0,ue.T)(t=>{const n=new Map;for(const r of t)n.set(r.id,{id:r.id,ueId:r.ueId,inspecteurId:r.inspecteurId,type:r.type,inspectionModeId:r.inspectionModeId,dateDebut:Q()(r.dateDebut),dateFin:Q()(r.dateFin),emplacement:r.ueId?{latitude:r.emplacementLatitude,longitude:r.emplacementLongitude}:null});return n}))}getVisiteConfigs(){return this.backend.get(`${Ve}/visite-configs`).pipe((0,ue.T)(t=>{const n=new Map;for(const{id:r,inspectionModeId:o,...l}of t)n.set(o,{...l});return n}))}getParametresJourFerier(){return this.backend.get(`${Ve}/parametres/jour-ferier`).pipe((0,ue.T)(t=>t.joursFeries.reduce((r,o)=>{const l={id:o.id,date:new Date(o.date),description:o.id,isChanged:!!o.isChanged};return l.date.setMinutes(l.date.getMinutes()+l.date.getTimezoneOffset()),r.push(l),r},[])))}getLimitationRdv(){return this.backend.get(`${Ve}/limitation-rdv`)}getPlageHoraireConfigs(){return this.backend.get(`${Ve}/plage-horaire-configs`)}getMessageInspecteur(t){return this.backend.get(`${Ve}/message-inspecteur-inspection?visiteId=${t}`)}getMessageAideCitoyen(){return this.backend.get(`${Ve}/message-aide-citoyen`)}enregistrerNote(t){return this.backend.post("/notes/pc/upsert",{note:t})}getEtiquetteList(){return this.backend.get(`${Ve}/etiquettes`)}fetchVisiteBackgroundImages(){return this.backend.get(`${Ve}/visite-background-images`)}updateInspecteurArrierePlan(t,n){return this.backend.put(`${Ve}/arriere-plan-inspecteur`,{usrId:t,arrPlaId:n})}getNotificationDemandeCitoyen(t){return this.backend.get(`${Ve}/visite-session/${t}/notification-demande-citoyen`)}notificationActionCitoyen(t,n){return this.backend.put(`${Ve}/visite-session/${t}/notification-action-citoyen`,{pseudo:n})}notificationActionValidation(t,n){return this.backend.put(`${Ve}/visite-session/${t}/notification-action-validation`,{response:n})}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275prov=c.jDH({token:a,factory:a.\u0275fac}),i})(),ks=(()=>{var a;class i{constructor(t,n){this.appConfig=t,this.visiteService=n,this.preliminaireCompleted=!1,this.finitionCompleted=!1,this.isModeLibre=!1,this.preferredDays=[],this.preferredPlages=[],this.initObservables()}setInvitation(t){this.invitation=t}setVisite(t){this.visite=t}setLangueCitoyen(t){this.langueCitoyen=t,this.clearFinitionCache()}setPreferredDays(t){this.preferredDays=t,this.clearFinitionCache()}setPreferredPlages(t){this.preferredPlages=t,this.clearFinitionCache()}getPreferredDays(){return this.preferredDays}getPreferredPlages(){return this.preferredPlages}setModeLibre(){this.isModeLibre=!0}getPropositionResults(){return PS(()=>this.finitionCompleted,(0,nr.of)(this.finitionCache),this.finitionObject$)}clearCache(){this.clearFinitionCache(),this.preliminaireCompleted=!1,this.preliminaireCache=null}isCacheCleared(){return!this.finitionCompleted}clearFinitionCache(){this.finitionCompleted=!1,this.finitionCache=null}getPreliminaireStack(){return PS(()=>this.preliminaireCompleted,(0,nr.of)(this.preliminaireCache),this.preliminaireStack$)}initObservables(){this.preliminaireStack$=(0,DS.p)([this.visiteService.getInspectionEvenementValidateurs(),this.visiteService.fetchHoraire(),this.visiteService.getParametresJourFerier(),this.visiteService.fetchInspecteurs(),this.visiteService.getLimitationRdv(),this.visiteService.getVisiteConfigs()]).pipe((0,ue.T)(([t,n,r,o,l,h])=>{var d,p;this.visiteConfig={...h.get(this.inspectionModeId),allowSecteurOnTLI:!!this.appConfig.appConfig.paramList.allowSecteurOnTLI,optimisationDeplacement:l.optimisationDeplacement},this.inspecteurList=o,this.evenementList=t;let u=Q()().add(1,"day").startOf("day"),f=Q()().add(15,"day").startOf("day");const m=new Map,g=new Map,v=r.reduce((w,A)=>(Q()().isSameOrBefore(A.date,"day")&&w.add(Q()(A.date).startOf("day").unix()),w),new Set),b=new Map,y=null!==(d=null===(p=n.horaireGlobal.find(w=>w.typVisId===this.inspectionModeId))||void 0===p?void 0:p.horaire)&&void 0!==d?d:[];for(const w of n.horaireUsers)b.has(w.usrId)||b.set(w.usrId,y),w.typVisId===this.inspectionModeId&&b.set(w.usrId,w.horaire);for(const w of this.inspecteurList)b.has(w.id)||b.set(w.id,y);const S=new Map;if(l.choixIsMemeJour){u=Q()().startOf("day");const w=l.memeJourDelaiMin;S.set(Q()().startOf("day").unix(),[{dateDebut:Q()().startOf("day"),dateFin:Q()().add(w+1,"hour").startOf("hour")}])}if(l.choixIsAutresJour&&(u=Q()().add(l.autresNbJour,"day").startOf("day")),l.choixIsDelaiMax&&(f=Q()().add(l.delaiMaxNbJour,"day").startOf("day")),l.choixIsLendemain&&Q()().startOf("day").add(l.lendemainVeilleA,"hour").isBefore(new Date)){const A=Q()().startOf("day");let M=!1;for(;!M&&A.isBefore(f,"day");)if(A.add(1,"day").startOf("day"),!v.has(A.unix()))for(const D of this.inspecteurList){var E,_;if(M=null!==(E=null===(_=b.get(D.id)[A.isoWeekday()-1])||void 0===_?void 0:_.jourActif)&&void 0!==E&&E,M)break}S.has(Q()(A).startOf("day").unix())||S.set(Q()(A).startOf("day").unix(),[]),S.get(Q()(A).startOf("day").unix()).push({dateDebut:Q()(A).startOf("day"),dateFin:Q()(A).startOf("day").add(l.lendemainApartirDe,"hour")})}this.inspecteurMapNombreVisites=new Map;for(const w of this.evenementList.values())w.id===this.invitation.visiteId||u.isAfter(w.dateFin,"day")||f.isBefore(w.dateDebut,"day")||(w.type===pe.$f.Visite?this.pushVisiteEvent(m,w):w.type===pe.$f.Indisponibilite&&this.pushIndisponibiliteEvent(g,w));const T=[];let I=-1;T.push({stage:"constructPlageHoraireDisponibilite",segments:[]}),I++;for(const w of this.inspecteurList)T[I].segments.push(...this.constructPlageHoraireDisponibilite(w.id,b.get(w.id),u,f,v));return T.push({stage:"appendInspectionVisite",segments:[]}
1),I++,T[I-1].segments.forEach((w,A)=>{var M,D;T[I].segments.push(...this.appendInspectionVisite(w,A,this.inspectionDuree,null!==(M=null===(D=m.get(w.inspecteurId))||void 0===D?void 0:D.get(Q()(w.dateDebut).startOf("day").unix()))&&void 0!==M?M:[]))}),T.push({stage:"reduceByIndisponibiliteGlobales",segments:[]}),I++,T[I-1].segments.forEach((w,A)=>{var M;T[I].segments.push(...this.reduceByIndisponibilites(w,A,this.inspectionDuree,null!==(M=S.get(Q()(w.dateDebut).startOf("day").unix()))&&void 0!==M?M:[]))}),T.push({stage:"reduceByIndisponibiliteInspecteur",segments:[]}),I++,T[I-1].segments.forEach((w,A)=>{var M,D;T[I].segments.push(...this.reduceByIndisponibilites(w,A,this.inspectionDuree,null!==(M=null===(D=g.get(w.inspecteurId))||void 0===D?void 0:D.get(Q()(w.dateDebut).startOf("day").unix()))&&void 0!==M?M:[]))}),T}),(0,ai.M)(t=>{this.preliminaireCache||(this.preliminaireCache=t,this.preliminaireCompleted=!0)})),this.finitionObject$=this.preliminaireStack$.pipe((0,ue.T)(t=>{let n=t.length-1;t.push({stage:"filterBySelectedInspecteurs",segments:[]}),n++,t[n-1].segments.forEach((o,l)=>{t[n].segments.push(...this.filterBySelectedInspecteurs(o,l,this.getInspecteurPoolIds()))}),this.preferredDays.length>0&&(t.push({stage:"filterBySelectedWeekDay",segments:[]}),n++,t[n-1].segments.forEach((o,l)=>{t[n].segments.push(...this.filterBySelectedWeekDay(o,l,new Set(this.preferredDays)))})),this.preferredPlages.length>0&&(t.push({stage:"reduceBySelectedTimeslots",segments:[]}),n++,t[n-1].segments.forEach((o,l)=>{t[n].segments.push(...this.reduceBySelectedTimeslots(o,l,this.inspectionDuree,this.preferredPlages))})),t.push({stage:"reduceByExactAvalaibleTime",segments:[]}),n++,t[n-1].segments.forEach((o,l)=>{t[n].segments.push(...this.reduceByExactAvalaibleTime(o,l,this.evenementList,this.inspectionDuree,this.visiteConfig.inspectionRechargeMinute,this.visiteConfig.inspectionTrajetMinute))});const r=[];if(!this.isModeLibre&&this.inspectionModeId===pe.sd.Presentielle&&this.visiteConfig.optimisationDeplacement){const o=[],l=[];for(const h of t[n].segments)h.distanceRajout?l.push(h):o.push(h);for(l.sort((h,d)=>h.distanceRajout>d.distanceRajout||h.distanceRajout===d.distanceRajout&&h.dateDebut.isAfter(d.dateDebut,"minute")?1:-1),o.sort((h,d)=>h.dateDebut.isAfter(d.dateDebut,"minute")||Q()(h.dateDebut).isSame(d.dateDebut,"minute")&&h.charge>d.charge?1:-1);r.length<this.visiteConfig.rendezvousPropositions&&l.length>0;){const h=l.shift();(0===r.length||!Q()(r[r.length-1].slot.startDate).isSame(h.dateDebut,"minute"))&&r.push(this.createPropositionTimeSlot(h))}for(;r.length<this.visiteConfig.rendezvousPropositions&&o.length>0;){const h=o.shift();(0===r.length||!Q()(r[r.length-1].slot.startDate).isSame(h.dateDebut,"minute"))&&r.push(this.createPropositionTimeSlot(h))}}return{propositions:r,tranches:this.createTranchesTimeSlots(t[n].segments)}}),(0,ai.M)(t=>{this.finitionCompleted||(this.finitionCache=t,this.finitionCompleted=!0)}))}get inspectionModeId(){return this.visite?this.visite.inspectionModeId:this.invitation.inspectionModeId}get inspectionDuree(){return this.invitation.inspectionDuree}get secteurId(){return this.visite?this.visite.secteurId:this.invitation.secteurId}get dossierEmplacement(){return this.visite?{latitude:this.visite.emplacementLatitude,longitude:this.visite.emplacementLongitude}:{latitude:this.invitation.emplacementLatitude,longitude:this.invitation.emplacementLongitude}}getInspecteurPoolIds(){return this.invitation&&this.invitation.inspecteurId?new Set([this.invitation.inspecteurId]):this.visite&&this.visiteConfig.inspecteurPreservation?new Set([this.visite.inspecteurId]):this.inspecteurList.reduce((n,r)=>{const o=!this.langueCitoyen||r.langues.map(d=>d.id).includes(this.langueCitoyen),h=!(this.inspectionModeId===pe.sd.Presentielle||this.visiteConfig.allowSecteurOnTLI)||!this.secteurId||r.secteurs.map(d=>d.id).includes(this.secteurId);return o&&h&&n.add(r.id),n},new Set)}createTranchesTimeSlots(t){const n=new Map;for(const o of t)for(const l of this.trancheTimeSlotGenerator(o,this.visiteConfig.rendezvousTrancheMinute,this.inspectionDuree))n.has(l)?n.get(l).charge>o.charge&&(n.get(l).inspecteurId=o.inspecteurId,n.get(l).charge=o.charge):n.set(l,{inspecteurId:o.inspecteurId,charge:o.charge});const r=[];for(const[o,{inspecteurId:l}]of n.entries())r.push({slot:{startDate:new Date(1e3*o),endDate:Q()(1e3*o).add({minute:this.inspectionDuree}).toDate()},inspecteurId:l});return r.sort((o,l)=>o.slot.startDate.getTime()-l.slot.startDate.getTime()),r}constructPlageHoraireDisponibilite(t,n,r,o,l){const h=[];for(let p=Q()(r).startOf("day");p.isSameOrBefore(o,"day");p.add(1,"day")){const u=n[p.isoWeekday()-1];if(l.has(p.unix())||null==u||!u.jourActif)continue;const f=this.calculateChargeInspecteur(t,p);for(const m of null!==(d=u.horairePlageList)&&void 0!==d?d:[]){var d;h.push({inspecteurId:t,charge:f,dateDebut:Q()(p).set({hour:Number(m.timeFrom.split(":")[0]),minute:Number(m.timeFrom.split(":")[1])}).startOf("minute"),dateFin:Q()(p).set({hour:Number(m.timeTo.split(":")[0]),minute:Number(m.timeTo.split(":")[1])}).startOf("minute"),distanceDebut:0,distanceFin:0,distanceRajout:0})}}return h}appendInspectionVisite(t,n,r,o){var l,h,d,p;let u=null,f=null;const m=[];for(const te of o)if(te.dateDebut.isAfter(t.dateDebut,"minute")&&te.dateFin.isBefore(t.dateFin,"minute"))m.push(te);else if(te.dateDebut.isSameOrBefore(t.dateDebut,"minute")&&(u=te),te.dateFin.isSameOrAfter(t.dateFin,"minute")){f=te;break}if(f&&f===u)return[];const g={parentIndex:n,inspecteurId:t.inspecteurId,charge:t.charge};let v=u,b=null!==(l=u)&&void 0!==l&&l.dateFin&&null!==(h=u)&&void 0!==h&&h.dateFin.isAfter(t.dateDebut)?Q()(u.dateFin):Q()(t.dateDebut);const y=[];for(const te of m){if(te.dateDebut.diff(b,"minute")>=r){var S,E,_,T;const $=this.calculteDistance(null===(S=v)||void 0===S?void 0:S.emplacement,this.dossierEmplacement),Se=this.calculteDistance(this.dossierEmplacement,te.emplacement),Ie=this.calculteDistance(null===(E=v)||void 0===E?void 0:E.emplacement,te.emplacement);y.push({...g,inspectionDebutId:null!==(_=null===(T=v)||void 0===T?void 0:T.id)&&void 0!==_?_:null,inspectionFinId:te.id,distanceDebut:$,distanceFin:Se,distanceRajout:(null!=$?$:0)+(null!=Se?Se:0)-(null!=Ie?Ie:0),dateDebut:b,dateFin:Q()(te.dateDebut)})}v=te,b=Q()(te.dateFin)}const I=null!==(d=f)&&void 0!==d&&d.dateFin&&null!==(p=f)&&void 0!==p&&p.dateDebut.isBefore(t.dateFin)?Q()(f.dateDebut):Q()(t.dateFin);if(I.diff(b,"minute")>=r){var w,A,M,D,L,V,G,W;const te=this.calculteDistance(null===(w=v)||void 0===w?void 0:w.emplacement,this.dossierEmplacement),$=this.calculteDistance(this.dossierEmplacement,null===(A=f)||void 0===A?void 0:A.emplacement),Se=this.calculteDistance(null===(M=v)||void 0===M?void 0:M.emplacement,null===(D=f)||void 0===D?void 0:D.emplacement);y.push({...g,inspectionDebutId:null!==(L=null===(V=v)||void 0===V?void 0:V.id)&&void 0!==L?L:null,inspectionFinId:null!==(G=null===(W=f)||void 0===W?void 0:W.id)&&void 0!==G?G:null,distanceDebut:te,distanceFin:$,distanceRajout:(null!=te?te:0)+(null!=$?$:0)-(null!=Se?Se:0),dateDebut:b,dateFin:I})}return y}
1reduceByIndisponibilites(t,n,r,o){var l,h,d,p;let u=null,f=null;const m=[];for(const S of o)if(S.dateDebut.isAfter(t.dateDebut,"minute")&&S.dateFin.isBefore(t.dateFin,"minute"))m.push(S);else if(S.dateDebut.isSameOrBefore(t.dateDebut,"minute")&&S.dateFin.isSameOrAfter(t.dateDebut,"minute")&&(u=S),S.dateDebut.isSameOrBefore(t.dateFin,"minute")&&S.dateFin.isSameOrAfter(t.dateFin,"minute")){f=S;break}if(f&&f===u)return[];const g={parentIndex:n,inspecteurId:t.inspecteurId,charge:t.charge,inspectionDebutId:t.inspectionDebutId,inspectionFinId:t.inspectionFinId,distanceDebut:t.distanceDebut,distanceFin:t.distanceFin,distanceRajout:t.distanceRajout};let v=null!==(l=u)&&void 0!==l&&l.dateFin&&null!==(h=u)&&void 0!==h&&h.dateFin.isAfter(t.dateDebut)?Q()(u.dateFin):Q()(t.dateDebut);const b=[];for(const S of m)S.dateDebut.diff(v,"minute")>=r&&b.push({...g,dateDebut:v,dateFin:Q()(S.dateDebut)}),v=Q()(S.dateFin);const y=Q()(null!==(d=null===(p=f)||void 0===p?void 0:p.dateDebut)&&void 0!==d?d:t.dateFin);return y.diff(v,"minute")>=r&&b.push({...g,dateDebut:v,dateFin:y}),b}filterBySelectedInspecteurs(t,n,r){return r.has(t.inspecteurId)?[{...t,parentIndex:n,dateDebut:Q()(t.dateDebut),dateFin:Q()(t.dateFin)}]:[]}filterBySelectedWeekDay(t,n,r){return r.has(t.dateDebut.isoWeekday()-1)?[{...t,parentIndex:n,dateDebut:Q()(t.dateDebut),dateFin:Q()(t.dateFin)}]:[]}reduceBySelectedTimeslots(t,n,r,o){const l={parentIndex:n,inspecteurId:t.inspecteurId,charge:t.charge,inspectionDebutId:t.inspectionDebutId,inspectionFinId:t.inspectionFinId,distanceDebut:t.distanceDebut,distanceFin:t.distanceFin,distanceRajout:t.distanceRajout},h=[];for(const d of o){const p=Q()(t.dateDebut).set({hour:Number(d.timeFrom.split(":")[0]),minute:Number(d.timeFrom.split(":")[1])}),u=Q()(t.dateDebut).set({hour:Number(d.timeTo.split(":")[0]),minute:Number(d.timeTo.split(":")[1])}),f=Q()(u).add({minute:r});if(p.isSameOrAfter(t.dateFin,"minute")||f.isSameOrBefore(t.dateDebut,"minute"))continue;const m=p.isSameOrBefore(t.dateDebut,"minute")?Q()(t.dateDebut):Q()(p),g=f.isSameOrAfter(t.dateFin,"minute")?Q()(t.dateFin):Q()(f);g.diff(m,"minute")>=r&&h.push({...l,dateDebut:m,dateFin:g})}return h}reduceByExactAvalaibleTime(t,n,r,o,l,h){const d={parentIndex:n,inspecteurId:t.inspecteurId,charge:t.charge,inspectionDebutId:t.inspectionDebutId,inspectionFinId:t.inspectionFinId,distanceDebut:t.distanceDebut,distanceFin:t.distanceFin,distanceRajout:t.distanceRajout},p=Math.max(l,h),u=t.inspectionDebutId?Q()(r.get(t.inspectionDebutId).dateFin).add({minute:p}):Q()(t.dateDebut),f=t.inspectionFinId?Q()(r.get(t.inspectionFinId).dateDebut).add({minute:-p}):Q()(t.dateFin),m=u.isSameOrBefore(t.dateDebut,"minute")?Q()(t.dateDebut):u,g=f.isSameOrAfter(t.dateFin,"minute")?Q()(t.dateFin):f,v=[];return g.diff(m,"minute")>=o&&v.push({...d,dateDebut:m,dateFin:g}),v}pushVisiteEvent(t,n){t.has(n.inspecteurId)||t.set(n.inspecteurId,new Map),this.inspecteurMapNombreVisites.has(n.inspecteurId)||this.inspecteurMapNombreVisites.set(n.inspecteurId,new Map);const r=t.get(n.inspecteurId),o=this.inspecteurMapNombreVisites.get(n.inspecteurId);for(let l=Q()(n.dateDebut);l.isSameOrBefore(n.dateFin,"day");l.add(1,"day").startOf("day"))r.has(Q()(l).startOf("day").unix())||r.set(Q()(l).startOf("day").unix(),[]),o.has(Q()(l).startOf("day").unix())||o.set(Q()(l).startOf("day").unix(),0),r.get(Q()(l).startOf("day").unix()).push({id:n.id,ueId:n.ueId,inspecteurId:n.inspecteurId,inspectionModeId:n.inspectionModeId,dateDebut:Q()(l),dateFin:l.isSame(n.dateFin,"day")?Q()(n.dateFin):Q()(l).endOf("day"),emplacement:n.inspectionModeId===pe.sd.Presentielle?n.emplacement:null}),o.set(Q()(l).startOf("day").unix(),o.get(Q()(l).startOf("day").unix())+1)}pushIndisponibiliteEvent(t,n){t.has(n.inspecteurId)||t.set(n.inspecteurId,new Map);const r=t.get(n.inspecteurId);for(let o=Q()(n.dateDebut);o.isSameOrBefore(n.dateFin,"day");o.add(1,"day").startOf("day"))r.has(Q()(o).startOf("day").unix())||r.set(Q()(o).startOf("day").unix(),[]),r.get(Q()(o).startOf("day").unix()).push({dateDebut:Q()(o),dateFin:o.isSame(n.dateFin,"day")?Q()(n.dateFin):Q()(o).endOf("day")})}*trancheTimeSlotGenerator(t,n,r){const o=Q()(t.dateDebut);let l=0;for(;Q()(o).add({minute:r}).isSameOrBefore(t.dateFin,"minute");)l++,yield o.unix(),o.add({minute:n});return l}calculateChargeInspecteur(t,n){var r;let o=(null===(r=this.visite)||void 0===r?void 0:r.inspecteurId)===t?this.visiteConfig.rendezvousFacteurInspecteur:0;if(!this.inspecteurMapNombreVisites.has(t))return o;const l=this.inspecteurMapNombreVisites.get(t);for(const[h,d]of l)o+=(n.isSame(h,"day")?this.visiteConfig.rendezvousFacteurMemeJour:this.visiteConfig.rendezvousFacteurAutreJour)*d;return o}createPropositionTimeSlot(t){return!t.distanceDebut&&!t.distanceFin||t.distanceFin>t.distanceDebut&&t.distanceDebut>0?{slot:{startDate:t.dateDebut.toDate(),endDate:Q()(t.dateDebut).add({minute:this.inspectionDuree}).toDate()},inspecteurId:t.inspecteurId}:{slot:{startDate:Q()(t.dateFin).add({minute:-this.inspectionDuree}).toDate(),endDate:t.dateFin.toDate()},inspecteurId:t.inspecteurId}}calculteDistance(t,n){return t&&n?6371*Math.acos(Math.cos(this.radians(n.latitude))*Math.cos(this.radians(t.latitude))*Math.cos(this.radians(t.longitude)-this.radians(n.longitude))+Math.sin(this.radians(n.latitude))*Math.sin(this.radians(t.latitude))):null}radians(t){return t*Math.PI/180}}return(a=i).\u0275fac=function(t){return new(t||a)(c.KVO(Fn.o),c.KVO(Pi))}
1,a.\u0275prov=c.jDH({token:a,factory:a.\u0275fac}),i})();var es=H(98377),$t=H(88834);function XA(a,i){if(1&a){const e=c.RV6();c.j41(0,"a",1),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.changeLocalisation(n.EnumLocalizationTag.FR))}),c.nrm(1,"i",2),c.EFF(2,"FR"),c.k0s()}}function jA(a,i){if(1&a){const e=c.RV6();c.j41(0,"a",1),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.changeLocalisation(n.EnumLocalizationTag.EN))}),c.nrm(1,"i",2),c.EFF(2,"EN"),c.k0s()}}let UA=(()=>{var a;class i{constructor(){this.localisationService=(0,c.WQX)(es.A),this.currentLocalisation=this.localisationService.getCurrentLocalisation(),this.EnumLocalizationTag=pe.fi,this.boutonTraduction="Cliquer pour passer \xE0 une traduction en Anglais"}changeLocalisation(t){this.localisationService.redirectLocalisation(t)}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-button-localisation"]],standalone:!0,features:[c.aNF],decls:3,vars:2,consts:[["id","translate_button",3,"title"],["mat-button","",1,"localisation-button","with-icon",3,"click"],[1,"icon-globe"]],template:function(t,n){if(1&t&&(c.j41(0,"div",0),c.DNE(1,XA,3,0)(2,jA,3,0),c.k0s()),2&t){let r;c.Y8G("title",n.boutonTraduction),c.R7$(),c.vxM(1,(r=n.currentLocalisation)===n.EnumLocalizationTag.EN?1:r===n.EnumLocalizationTag.FR?2:-1)}},dependencies:[Qe.MD,$t.Hl,$t.It],styles:[".full-width[_nghost-%COMP%]   div[_ngcontent-%COMP%]{position:relative}.full-width[_nghost-%COMP%]   a[_ngcontent-%COMP%]{left:90%}"]}),i})();var O=H(9310);const He=(0,O.UX)("visite"),WA=(0,O.Mz)(He,a=>a.lobby),kd=(0,O.Mz)(He,a=>a.statutVisite),ln=(0,O.Mz)(He,a=>a.role),$A=(0,O.Mz)(He,a=>a.reconnecting),qA=(0,O.Mz)(He,a=>a.disconnected),Ot=(0,O.Mz)(He,a=>a.visiteInfos),GA=(0,O.Mz)(He,a=>a.messageInspecteur),YA=(0,O.Mz)(He,a=>a.messageAideCitoyen),dc=(0,O.Mz)(He,a=>a.sideMenu),kS=(0,O.Mz)(He,a=>a.parleurDevices),MS=(0,O.Mz)(He,a=>a.audioDevices),LS=(0,O.Mz)(He,a=>a.videoDevices),Am=(0,O.Mz)(He,a=>a.parleurDeviceId),Pm=(0,O.Mz)(He,a=>a.audioDeviceId),Dm=(0,O.Mz)(He,a=>a.videoDeviceId),Ta=(0,O.Mz)(He,a=>a.plateform),RS=(0,O.Mz)(He,a=>a.screenSharing),QA=(0,O.Mz)(He,a=>a.takingSnapshot),pc=(0,O.Mz)(He,a=>a.recording),NS=(0,O.Mz)(He,a=>a.recordingAccepted),km=(0,O.Mz)(He,a=>a.parleurMute),uc=(0,O.Mz)(He,a=>a.microphoneMute),JA=(0,O.Mz)(He,a=>a.parleurVolume),fc=(0,O.Mz)(He,a=>a.cameraMute),Mm=(0,O.Mz)(He,a=>a.cameraMode),VS=(0,O.Mz)(He,a=>a.unreadMessages),FS=(0,O.Mz)(He,a=>a.unreadDocuments),Lm=(0,O.Mz)(He,a=>a.dateDemarrage),KA=(0,O.Mz)(He,a=>a.conversations),Md=(0,O.Mz)(He,a=>a.intervenants),Ld=(0,O.Mz)(He,a=>a.connexionDemandes),BS=(0,O.Mz)(He,a=>a.coords),ZA=(0,O.Mz)(He,a=>a.notes),eP=(0,O.Mz)(He,a=>a.currentNote),tP=(0,O.Mz)(He,a=>a.photoPrises),HS=(0,O.Mz)(He,a=>a.photoPartagees),iP=(0,O.Mz)(He,a=>a.fichierPartages),zS=(0,O.Mz)(He,a=>a.etiquettes),XS=(0,O.Mz)(He,a=>a.backgroundImages),jS=(0,O.Mz)(He,a=>a.currentBackgroundImageId),US=(0,O.Mz)(He,a=>a.pseudo),nP=(0,O.Mz)(He,a=>a.networkQualityLevel),Ia=(0,O.Mz)(ln,Ot,(a,i)=>i?"citoyen"===a?i.participant.id:i.inspecteur.id:null),WS=(0,O.Mz)(ln,Ot,(a,i)=>i?"citoyen"===a?`${i.participant.prenom} ${i.participant.nom}`:`${i.inspecteur.prenom} ${i.inspecteur.nom}`:null),rP=(0,O.Mz)(XS,jS,(a,i)=>a.find(e=>e.id===i)),$S=(0,O.Mz)(ln,Ot,(a,i)=>i?`${a}:${"citoyen"===a?i.participant.id:i.inspecteur.id}`:null),qS=((0,O.Mz)(ln,Ot,(a,i)=>i?`${a}:${"inspecteur"===a?i.participant.id:i.inspecteur.id}`:null),(0,O.Mz)($S,US,(a,i)=>`${a}:${i}`));var Rm=H(10916);const mc=(0,O.VP)("[Visite] UPDATE_STATUT_VISITE",(0,O.xk)()),GS=(0,O.VP)("[Visite] UPDATE_STATUT_VISITE_SUCCESS",(0,O.xk)()),YS=(0,O.VP)("[Visite] UPDATE_STATUT_VISITE_ECHEC"),QS=((0,O.VP)("[Visite session] SAVE_SNAPSHOT",(0,O.xk)()),(0,O.VP)("[Visite session] PUSH_CONVERSATION",(0,O.xk)())),Rd=(0,O.VP)("[Visite session] SET_CONVERSATION",(0,O.xk)()),JS=(0,O.VP)("[Visite session] SAVING_SNAPSHOT",(0,O.xk)()),Nd=(0,O.VP)("[Visite session] SNAPSHOT_SUCCEED",(0,O.xk)()),Nm=(0,O.VP)("[Visite session] SNAPSHOT_FAILED"),KS=(0,O.VP)("[Visite session] SAVING_SNAPSHOT_ETIQUETTE",(0,O.xk)()),ZS=(0,O.VP)("[Visite session] SAVING_SNAPSHOT_ETIQUETTE_SUCCESS",(0,O.xk)()),Vd=(0,O.VP)("[Visite session] DELETING_SESSION_DOCUMENT",(0,O.xk)()),gc=(0,O.VP)("[Visite] DELETING_SESSION_DOCUMENT_SUCCESS",(0,O.xk)()),eC=(0,O.VP)("[Visite] cITOYEN_SESSION_DOCUMENT_SHARED",(0,O.xk)()),Fd=(0,O.VP)("[Visite session] SAVE_VISITE_SESSION_DOCUMENT",(0,O.xk)()),Vm=(0,O.VP)("[Visite session] PUSH_VISITE_SESSION_DOCUMENT",(0,O.xk)()),tC=(0,O.VP)("[Visite session] VISITE_SESSION_DOCUMENT_SAVED",(0,O.xk)()),iC=(0,O.VP)("[Visite session] SET_NOTES",(0,O.xk)()),nC=(0,O.VP)("[Visite session] SET_ETIQUETTES",(0,O.xk)()),Bd=(0,O.VP)("[Visite session] SET_VISITE_DOCUMENTS",(0,O.xk)()),Hd=(0,O.VP)("[Visite session] SET_CURRENT_NOTE",(0,O.xk)()),rC=(0,O.VP)("[Visite session] SET_BACKGROUND_IMAGES",(0,O.xk)()),sC=(0,O.VP)("[Visite session] SET_CURRENT_BACKGROUND_IMAGE",(0,O.xk)()),oC=(0,O.VP)("[Visite session] CHANGE_MESSAGES_READ_STATUS",(0,O.xk)()),sP=(0,O.VP)("[Visite] CHANGE_MESSAGES_READ_STATUS_SUCCESS"),aC=(0,O.VP)("[Visite session] ENTERING_SESSION"),lC=(0,O.VP)("[Visite session] JOINING_ROOM"),cC=(0,O.VP)("[Visite session] DEMARRER_SESSION"),hC=(0,O.VP)("[Visite session] JOINDRE_SESSION"),dC=(0,O.VP)("[Visite session] TERMINER_SESSION"),pC=(0,O.VP)("[Visite session] ANNULER_SESSION",(0,O.xk)()),zd=(0,O.VP)("[Visite session] ENDING_SESSION"),vc=(0,O.VP)("[Visite session] TOGGLE_SIDE_PANEL_SESSION",(0,O.xk)()),bc=(0,O.VP)("[Visite session] SET_STATUT_VISITE",(0,O.xk)()),Fm=(0,O.VP)("[Visite session] SET_CONNEXION_DEMANDES",(0,O.xk)()),yc=(0,O.VP)("[Visite session] CONFIRM_CONNEXION_DEMANDES",(0,O.xk)()),uC=(0,O.VP)("[Visite session] REMOVE_CONNEXION_DEMANDES"),Bm=(0,O.VP)("[Visite session] PUSH_INTERVENANT",(0,O.xk)()),fC=(0,O.VP)("[Visite session] REMOVE_INTERVENANT",(0,O.xk)()),bn=(0,O.VP)("[Visite session] UPDATE_INTERVENANT",(0,O.xk)()),mC=(0,O.VP)("[Visite session] SET_ROLE",(0,O.xk)()),Xd=(0,O.VP)("[Visite session] SET_P
1SEUDO",(0,O.xk)()),Hm=(0,O.VP)("[Visite session] SET_COORDS",(0,O.xk)()),zm=(0,O.VP)("[Visite session] SET_PLATEFORM",(0,O.xk)()),oP=(0,O.VP)("[Visite session] SET_RECONNECTING",(0,O.xk)()),gC=(0,O.VP)("[Visite session] SET_DISCONNECTED",(0,O.xk)()),vC=(0,O.VP)("[Visite session] SET_RECORDING_ACCEPTED",(0,O.xk)()),Sc=(0,O.VP)("[Visite session] SET_RECORDING_ACCEPTED_SUCCESS",(0,O.xk)()),bC=(0,O.VP)("[Visite session] RECORDING_STARTED"),Xm=(0,O.VP)("[Visite session] RECORDING_STOPPED"),xa=(0,O.VP)("[Visite session] SET_RECORDING_STATE",(0,O.xk)()),jd=(0,O.VP)("[Visite session] SET_DATE_DEMARRAGE",(0,O.xk)()),yC=(0,O.VP)("[Visite session] REFRESH_PARLEUR_VOLUME"),SC=(0,O.VP)("[Visite session] SET_PARLEUR_VOLUME",(0,O.xk)()),Ud=(0,O.VP)("[Visite session] SWITCH_PARLEUR_MUTE"),Wd=(0,O.VP)("[Visite session] SWITCH_MICROPHONE_MUTE"),$d=(0,O.VP)("[Visite session] SWITCH_CAMERA_MUTE"),qd=(0,O.VP)("[Visite session] SWITCH_CAMERA_MODE"),jm=(0,O.VP)("[Visite session] SWITCH_RECORDING"),wa=(0,O.VP)("[Visite session] SWITCH_SCREEN_SHARING"),Gd=(0,O.VP)("[Visite session] SWITCH_TAKING_SNAPSHOT"),Um=(0,O.VP)("[Visite session] SET_VISITE_INFOS",(0,O.xk)()),CC=(0,O.VP)("[Visite session] SET_MESSAGE_AIDE_CITOYEN",(0,O.xk)()),EC=(0,O.VP)("[Visite session] SET_MESSAGE_INSPECTEUR",(0,O.xk)()),_C=(0,O.VP)("[Visite session] INC_UNREAD_MESSAGES"),TC=(0,O.VP)("[Visite session] SET_UNREAD_MESSAGES",(0,O.xk)()),Wm=(0,O.VP)("[Visite session] SET_UNREAD_DOCUMENTS",(0,O.xk)()),IC=(0,O.VP)("[Visite session] SET_AUDIO_DEVICES",(0,O.xk)()),xC=(0,O.VP)("[Visite session] SET_PARLEUR_DEVICES",(0,O.xk)()),wC=(0,O.VP)("[Visite session] SET_VIDEO_DEVICES",(0,O.xk)()),Cc=(0,O.VP)("[Visite session] SET_AUDIO_DEVICE_ID",(0,O.xk)()),Ec=(0,O.VP)("[Visite session] SET_PARLEUR_DEVICE_ID",(0,O.xk)()),_c=(0,O.VP)("[Visite session] SET_VIDEO_DEVICE_ID",(0,O.xk)()),aP=(0,O.VP)("[Visite session] VIDEO_DEVICE_CHANGED"),OC=(0,O.VP)("[Visite session] AUDIO_DEVICE_CHANGED"),lP=(0,O.VP)("[Visite session] PARLEUR_DEVICE_CHANGED"),Yd=(0,O.VP)("[Visite session] CHANGE_BACKGROUND_IMAGE",(0,O.xk)()),AC=(0,O.VP)("[Visite session] SET_NETWORK_QUALITY_LEVEL",(0,O.xk)());var Et=H(88974),cP=H(95390);function hP(a,i){1&a&&c.nrm(0,"ion-spinner",9)}function dP(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",10),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.joinVisite())}),c.pXf(1,1),c.k0s()}}function pP(a,i){if(1&a&&(c.j41(0,"div",8),c.DNE(1,hP,1,0,"ion-spinner",9)(2,dP,2,0),c.k0s()),2&a){const e=c.XpG();c.R7$(),c.vxM(1,e.loading()?1:2)}}function uP(a,i){1&a&&(c.j41(0,"div",11),c.nrm(1,"i",12),c.j41(2,"span"),c.pXf(3,2),c.k0s()())}let PC=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.role=c.hFB.required(),this.loading=(0,c.vPA)(!1),this.messageInspecteur=this.store.selectSignal(GA)}joinVisite(){this.loading.set(!0),this.store.dispatch(hC())}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-card-visite-demarree"]],inputs:{role:[c.Mj6.SignalBased,"role"]},standalone:!0,features:[c.aNF],decls:8,vars:2,consts:()=>{let e,t,n;return e="Avant de commencer",t="Accepter et d\xE9marrer",n="Pour poursuivre, inviter le citoyen \xE0 cliquer sur \"Accepter et d\xE9marrer\"",[e,t,n,[1,"visite-flat-window"],[1,"text-center"],[1,"icon-center"],[1,"icon-security"],[3,"content"],[1,"inline-block"],["name","dots"],["mat-flat-button","",1,"custom-button-standard","custom-button-full","radius-10",3,"click"],[1,"inspecteur-waiting-text"],[1,"icon-form-info"]]},template:function(t,n){1&t&&(c.j41(0,"div",3)(1,"h2",4),c.pXf(2,0),c.k0s(),c.j41(3,"div",5),c.nrm(4,"i",6),c.k0s(),c.nrm(5,"vplus-froala-container",7),c.DNE(6,pP,3,1,"div",8)(7,uP,4,0),c.k0s()),2&t&&(c.R7$(5),c.Y8G("content",n.messageInspecteur()),c.R7$(),c.vxM(6,"citoyen"===n.role()?6:7))},dependencies:[Rm.G,$t.$z,Et.w2,cP.m],styles:["[_nghost-%COMP%]{position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:auto;background:var(--light-grey-color)}[_nghost-%COMP%]   .visite-flat-window[_ngcontent-%COMP%]{padding:0 18px;display:flex;flex-direction:column;align-items:center;padding-bottom:6rem;gap:2rem}[_nghost-%COMP%]   .visite-flat-window.visite-attente[_ngcontent-%COMP%]{padding:18px}@media (max-height: 799px){[_nghost-%COMP%]   .visite-flat-window[_ngcontent-%COMP%]{padding-bottom:12rem}}@media (min-width: 960px){[_nghost-%COMP%]   .visite-flat-window[_ngcontent-%COMP%]{padding:24px 24px 6rem;margin-top:56px}[_nghost-%COMP%]   .visite-flat-window[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin-top:0}}[_nghost-%COMP%]   .inline-block[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center}[_nghost-%COMP%]   .inline-block[_ngcontent-%COMP%]   .custom-button-standard[_ngcontent-%COMP%]{max-width:350px;flex:1}[_nghost-%COMP%]   .inspecteur-waiting-text[_ngcontent-%COMP%]{color:var(--primary-color);display:flex;gap:10px}[_nghost-%COMP%]   .inspecteur-waiting-text[_ngcontent-%COMP%]   [class^=icon-][_ngcontent-%COMP%]{margin-top:3px}[_nghost-%COMP%]   .icon-center[_ngcontent-%COMP%]{font-size:12rem;color:var(--primary-color)}[_nghost-%COMP%]   .radius-10[_ngcontent-%COMP%]{border-radius:10px!important}[_nghost-%COMP%]   ion-spinner[_ngcontent-%COMP%]{color:var(--primary-color)}"],changeDetection:0}),i})();var mi=H(30049),Qd=H(40605),ee=H(89079);function fP(a,i){1&a&&(c.j41(0,"h2"),c.EFF(1,"La t\xe9l\xe9inspection aurait d\xfb d\xe9buter depuis"),c.k0s())}function mP(a,i){1&a&&(c.j41(0,"h2"),c.EFF(1,"La t\xe9l\xe9inspection d\xe9butera dans"),c.k0s())}let gP=(()=>{var a;class i{constructor(){this.destroyRef=(0,c.WQX)(c.abz),this.appointmentDate=c.hFB.required({alias:"appointment-date"}
1),this.currentTime=(0,c.vPA)(new Date),this.isInitiallyOverdue=(0,c.vPA)(!1),this.labelJour="jour",this.labelHeure="heure",this.labelMinute="minute",this.timeRemaining=(0,c.EWP)(()=>{const t=this.currentTime(),n=new Date(this.appointmentDate()),r=Math.abs(n.getTime()-t.getTime()),o=(0,mi.Azn)(r,"days"),l=(0,mi.Azn)(r,"hours"),h=(0,mi.Azn)(r,"minutes");return this.isInitiallyOverdue()?{days:o,hours:l,minutes:h,isExpired:!1,isOverdue:!0}:r<=0?{days:0,hours:0,minutes:0,isExpired:!0,isOverdue:!1}:{days:o,hours:l,minutes:h,isExpired:!1,isOverdue:!1}})}ngOnInit(){const t=new Date,n=new Date(this.appointmentDate());this.isInitiallyOverdue.set(n.getTime()<t.getTime()),(0,Qd.Y)(1e3).pipe((0,ue.T)(()=>new Date),(0,ee.pQ)(this.destroyRef)).subscribe(r=>{this.currentTime.set(r)})}formatNumber(t){return(0,mi.Hgp)(t,2)}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-countdown"]],inputs:{appointmentDate:[c.Mj6.SignalBased,"appointment-date","appointmentDate"]},standalone:!0,features:[c.aNF],decls:20,vars:11,consts:[[1,"countdown-container"],[1,"countdown-text"],[1,"countdown-display"],[1,"time-unit"],[1,"time-value"],[1,"time-label"]],template:function(t,n){1&t&&(c.j41(0,"div",0)(1,"div",1),c.DNE(2,fP,2,0,"h2")(3,mP,2,0),c.k0s(),c.j41(4,"div",2)(5,"div",3)(6,"span",4),c.EFF(7),c.k0s(),c.j41(8,"span",5),c.EFF(9),c.k0s()(),c.j41(10,"div",3)(11,"span",4),c.EFF(12),c.k0s(),c.j41(13,"span",5),c.EFF(14),c.k0s()(),c.j41(15,"div",3)(16,"span",4),c.EFF(17),c.k0s(),c.j41(18,"span",5),c.EFF(19),c.k0s()()()()),2&t&&(c.R7$(2),c.vxM(2,n.isInitiallyOverdue()?2:3),c.R7$(2),c.AVh("expired",n.timeRemaining().isExpired&&!n.isInitiallyOverdue())("overdue",n.isInitiallyOverdue()),c.R7$(3),c.JRh(n.formatNumber(n.timeRemaining().days)),c.R7$(2),c.JRh(n.timeRemaining().days>1?n.labelJour+"s":n.labelJour),c.R7$(3),c.JRh(n.formatNumber(n.timeRemaining().hours)),c.R7$(2),c.JRh(n.timeRemaining().hours>1?n.labelHeure+"s":n.labelHeure),c.R7$(3),c.JRh(n.formatNumber(n.timeRemaining().minutes)),c.R7$(2),c.JRh(n.timeRemaining().minutes>1?n.labelMinute+"s":n.labelMinute))},dependencies:[Qe.MD],styles:[".countdown-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:1rem}.countdown-text[_ngcontent-%COMP%]{text-align:center;margin-bottom:1.5rem}.countdown-display[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2rem;flex-wrap:wrap;justify-content:center}.countdown-display.expired[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.25s linear infinite}@keyframes _ngcontent-%COMP%_blink{0%,50%{opacity:1}51%,to{opacity:.3}}.time-unit[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;min-width:80px}.time-value[_ngcontent-%COMP%]{font-size:2.5rem;font-weight:600;line-height:1;color:var(--primary-color)}.countdown-display.overdue[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > .time-value[_ngcontent-%COMP%]{color:var(--warn-color)}.time-label[_ngcontent-%COMP%]{margin-top:.25rem;font-size:.8rem;color:var(--standard-text-color);text-transform:uppercase}
1.time-separator[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;color:#a0aec0;margin:0 .5rem}@media (max-width: 640px){.countdown-container[_ngcontent-%COMP%]{padding:.5rem}.countdown-text[_ngcontent-%COMP%]{font-size:1rem;margin-bottom:1rem}.countdown-display[_ngcontent-%COMP%]{gap:1rem}.time-value[_ngcontent-%COMP%]{font-size:2rem}.time-separator[_ngcontent-%COMP%]{font-size:1.5rem;margin:0 .25rem}.time-unit[_ngcontent-%COMP%]{min-width:60px}}"]}),i})();const Jd=a=>({color:a});function vP(a,i){if(1&a){const e=c.RV6();c.j41(0,"i",1),c.bIt("click",function(){c.eBV(e);const n=c.XpG(3);return c.Njj(n.switchSessionRecording())}),c.k0s()}if(2&a){const e=c.XpG(3);c.Aen(c.eq3(2,Jd,e.recordingStyle()))}}function bP(a,i){if(1&a&&c.nrm(0,"i",2),2&a){const e=c.XpG(3);c.Aen(c.eq3(2,Jd,e.recordingStyle()))}}function yP(a,i){if(1&a&&(c.j41(0,"span"),c.EFF(1,"\xa0"),c.k0s(),c.DNE(2,vP,1,4,"i",0)(3,bP,1,4)),2&a){const e=c.XpG(2);c.R7$(2),c.vxM(2,e.recordingAccepted()&&"citoyen"===e.role()?2:3)}}function SP(a,i){if(1&a&&(c.EFF(0),c.DNE(1,yP,4,1)),2&a){const e=c.XpG();c.SpI(" ",e.timeFlow()," "),c.R7$(),c.vxM(1,e.allowRecordTeleinspectionParam&&e.startingDate()?1:-1)}}function CP(a,i){if(1&a){const e=c.RV6();c.j41(0,"i",5),c.bIt("click",function(){c.eBV(e);const n=c.XpG(3);return c.Njj(n.switchSessionRecording())}),c.k0s()}if(2&a){const e=c.XpG(3);c.Aen(c.eq3(2,Jd,e.recordingStyle()))}}function EP(a,i){if(1&a&&c.nrm(0,"i",6),2&a){const e=c.XpG(3);c.Aen(c.eq3(2,Jd,e.recordingStyle()))}}function _P(a,i){if(1&a&&c.DNE(0,CP,1,4,"i",4)(1,EP,1,4),2&a){const e=c.XpG(2);c.vxM(0,e.recordingAccepted()&&"citoyen"===e.role()?0:1)}}function TP(a,i){if(1&a&&(c.j41(0,"div",3),c.DNE(1,_P,2,1),c.EFF(2),c.k0s()),2&a){const e=c.XpG();c.AVh("black",e.visiteDemarree())("record",e.allowRecordTeleinspectionParam),c.R7$(),c.vxM(1,e.allowRecordTeleinspectionParam&&e.startingDate()?1:-1),c.R7$(),c.SpI(" ",e.timeFlow()," ")}}let $m=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.appConfig=(0,c.WQX)(Fn.o),this.destroyRef=(0,c.WQX)(c.abz),this.mode=c.hFB.required(),this.startingDate=c.hFB.required({alias:"starting-date"}),this.statut=c.hFB.required({alias:"visite-statut"}),this.recording=(0,ee.ot)(this.store.select(pc)),this.role=(0,ee.ot)(this.store.select(ln)),this.recordingAccepted=(0,ee.ot)(this.store.select(NS)),this.allowRecordTeleinspectionParam=!!this.appConfig.appConfig.paramList[pe.fW.AllowRecordTeleinspection],this.currentTime=(0,
1c.vPA)(new Date),this.recordingStyle=(0,c.EWP)(()=>this.recording()?"red":"gray"),this.visiteDemarree=(0,c.EWP)(()=>this.statut()===pe.CG.Demarree),this.timeFlow=(0,c.EWP)(()=>{if(this.startingDate()){const t=this.currentTime(),n=new Date(this.startingDate()),r=Math.abs(n.getTime()-t.getTime()),o=(0,mi.Azn)(r,"hours"),l=(0,mi.Azn)(r,"minutes"),h=(0,mi.Azn)(r,"seconds");return`${(0,mi.Hgp)(o,2)}:${(0,mi.Hgp)(l,2)}:${(0,mi.Hgp)(h,2)}`}return null})}ngOnInit(){(0,Qd.Y)(1e3).pipe((0,ue.T)(()=>new Date),(0,ee.pQ)(this.destroyRef)).subscribe(t=>{this.currentTime.set(t)})}switchSessionRecording(){this.store.dispatch(jm())}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-countup"]],inputs:{mode:[c.Mj6.SignalBased,"mode"],startingDate:[c.Mj6.SignalBased,"starting-date","startingDate"],statut:[c.Mj6.SignalBased,"visite-statut","statut"]},standalone:!0,features:[c.aNF],decls:2,vars:1,consts:[[1,"icon-video",2,"cursor","pointer",3,"style"],[1,"icon-video",2,"cursor","pointer",3,"click"],[1,"icon-video"],[1,"visite-timer","hide-mobile","toolbar-animation"],[1,"icon-record-circle-full",2,"cursor","pointer",3,"style"],[1,"icon-record-circle-full",2,"cursor","pointer",3,"click"],[1,"icon-record-circle-full"]],template:function(t,n){1&t&&c.DNE(0,SP,2,2)(1,TP,3,6),2&t&&c.vxM(0,"mobile"===n.mode()?0:1)},dependencies:[Qe.MD],encapsulation:2}),i})();var Xe=H(49823),Yi=H(34006),IP=H(39316),xP=H(22806);function wP(a,i){1&a&&(c.j41(0,"p"),c.pXf(1,3),c.k0s(),c.j41(2,"h3",53),c.pXf(3,4),c.k0s(),c.j41(4,"ol")(5,"li")(6,"span"),c.pXf(7,5),c.k0s(),c.EFF(8,"\xa0 "),c.nrm(9,"i",54)(10,"i",55),c.j41(11,"strong"),c.EFF(12,"Param\xe8tres"),c.k0s(),c.EFF(13,". "),c.k0s(),c.j41(14,"li")(15,"span"),c.pXf(16,6),c.k0s(),c.EFF(17,"\xa0"),c.j41(18,"strong"),c.pXf(19,7),c.k0s(),c.EFF(20,"."),c.k0s(),c.j41(21,"li")(22,"span"),c.pXf(23,8),c.k0s(),c.EFF(24,"\xa0"),c.j41(25,"strong"),c.pXf(26,9),c.k0s(),c.EFF(27,"\xa0"),c.j41(28,"span"),c.pXf(29,10),c.k0s(),c.EFF(30,"\xa0"),c.j41(31,"strong"),c.pXf(32,11),c.k0s(),c.EFF(33,"."),c.k0s(),c.j41(34,"li")(35,"span"),c.pXf(36,12),c.k0s(),c.j41(37,"ul")(38,"li")(39,"span"),c.pXf(40,13),c.k0s(),c.EFF(41,"\xa0"),c.j41(42,"strong"),c.pXf(43,14),c.k0s(),c.EFF(44,",\xa0"),c.j41(45,"span"),c.pXf(46,15),c.k0s(),c.nrm(47,"i",55),c.j41(48,"strong"),c.EFF(49," Acc\xe9der \xe0 votre micro "),c.k0s(),c.nrm(50,"i",55),c.j41(51,"strong"),c.EFF(52,"Autoriser"),c.k0s(),c.EFF(53,". "),c.k0s()()()(),c.j41(54,"h3",53),c.pXf(55,16),c.k0s(),c.j41(56,"p"),c.pXf(57,17),c.k0s(),c.j41(58,"ol")(59,"li")(60,"span"),c.pXf(61,18),c.k0s(),c.EFF(62,"\xa0"),c.j41(63,"strong"),c.pXf(64,19),c.k0s(),c.EFF(65,". "),c.k0s(),c.j41(66,"li")(67,"span"),c.pXf(68,20),c.k0s(),c.EFF(69,"\xa0"),c.j41(70,"strong"),c.pXf(71,21),c.k0s(),c.EFF(72,"."),c.k0s(),c.j41(73,"li"),c.pXf(74,22),c.k0s(),c.j41(75,"li")(76,"span"),c.pXf(77,23),c.k0s(),c.EFF(78,"\xa0"),c.j41(79,"strong"),c.pXf(80,24),c.k0s(),c.EFF(81,"."),c.k0s(),c.j41(82,"li")(83,"span"),c.pXf(84,25),c.k0s(),c.EFF(85,"\xa0 "),c.j41(86,"strong"),c.pXf(87,26),c.k0s(),c.EFF(88,"\xa0 "),c.j41(89,"span"),c.pXf(90,27),c.k0s(),c.EFF(91,"\xa0 "),c.j41(92,"strong"),c.pXf(93,28),c.k0s(),c.EFF(94,". "),c.k0s()())}function OP(a,i){1&a&&(c.j41(0,"h3",53),c.pXf(1,29),c.k0s(),c.j41(2,"p"),c.pXf(3,30),c.k0s(),c.j41(4,"ol")(5,"li")(6,"span"),c.pXf(7,31),c.k0s(),c.EFF(8,"\xa0"),c.j41(9,"strong"),c.pXf(10,32),c.k0s(),c.EFF(11,". "),c.k0s(),c.j41(12,"li")(13,"span"),c.pXf(14,33),c.k0s(),c.EFF(15,"\xa0"),c.j41(16,"strong"),c.EFF(17,"Safari"),c.k0s(),c.EFF(18,"."),c.k0s(),c.j41(19,"li"),c.pXf(20,34),c.k0s(),c.j41(21,"li")(22,"span"),c.pXf(23,35),c.k0s(),c.EFF(24,"\xa0"),c.j41(25,"strong"),c.pXf(26,36),c.k0s(),c.EFF(27,"\xa0"),c.j41(28,"span"),c.pXf(29,37),c.k0s(),c.EFF(30,"\xa0"),c.j41(31,"strong"),c.pXf(32,38),c.k0s(),c.EFF(33,"."),c.k0s()())}function AP(a,i){if(1&a&&(c.j41(0,"p"),c.pXf(1,39),c.k0s(),c.nrm(2,"img",56)),2&a){const e=c.XpG(2);c.R7$(2),c.Y8G("src",e.autorisationImgSrc,c.B4B)}}function PP(a,i){1&a&&(c.j41(0,"h3"),c.pXf(1,40),c.k0s(),c.j41(2,"ol")(3,"li")(4,"span"),c.pXf(5,41),c.k0s(),c.EFF(6,"\xa0 "),c.j41(7,"strong"),c.EFF(8,"Safari"),c.k0s(),c.EFF(9,"\xa0>\xa0 "),c.j41(10,"strong"),c.pXf(11,42),c.k0s(),c.EFF(12,". "),c.k0s(),c.j41(13,"li")(14,"span"),c.pXf(15,43),c.k0s(),c.EFF(16,"\xa0"),c.j41(17,"strong"),c.pXf(18,44),c.k0s(),c.EFF(19,"."),c.k0s(),c.j41(20,"li")(21,"span"),c.pXf(22,45),c.k0s(),c.EFF(23,"\xa0"),c.j41(24,"strong"),c.pXf(25,46),c.k0s(),c.EFF(26,"."),c.k0s()())}function DP(a,i){if(1&a&&(c.j41(0,"h2"),c.pXf(1,1),c.k0s(),c.j41(2,"div",52)(3,"p"),c.pXf(4,2),c.k0s(),c.DNE(5,wP,95,0)(6,OP,34,0)(7,AP,3,1)(8,PP,27,0),c.k0s()),2&a){const e=c.XpG();c.R7$(5),c.vxM(5,"android"===e.platformOS()?5:"ios"===e.platformOS()?6:e.isSafariDesktop()?8:7)}}function kP(a,i){1&a&&(c.j41(0,"div",52)(1,"p"),c.pXf(2,47),c.k0s()())}function MP(a,i){1&a&&(c.j41(0,"div",52)(1,"p"),c.pXf(2,48),c.k0s()())}var DC=function(a){return a.NotAllowedError="NotAllowedError",a.NotReadableError="NotReadableError",a.AbortError="AbortError",a}(DC||{});let kC=(()=>{var a;class i{constructor(){this.data=(0,c.WQX)(Yi.Vh),this.EnumMediaError=DC,this.platformOS=(0,c.vPA)(null),this.isSafariDesktop=(0,c.vPA)(!1),this.autorisationImgSrc="./../assets/img/tutoriels/visite/autorisation-peripherique.png",this.supportedBrowserImgSrc="./../assets/img/tutoriels/visite/supported-browser.png",(0,xP.H)(IP.p.getInfo()).subscribe(t=>{const n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);this.platformOS.set(t.operatingSystem),this.isSafariDesktop.set("ios"!==t.operatingSystem&&n)})}
1retry(){window.location.reload()}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-error-media-dialog"]],decls:7,vars:1,consts:()=>{let e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S,E,_,T,I,w,A,M,D,L,V,G,W,te,$,Se,Ie,Re,Ne,de,At,_t,ut,Vt,gi,li,Be,Kt,Ns,Vs,Dr,ar,Oo;return e="R\xE9essayer",t="V\xE9rifiez vos permissions",n="Vous n'avez pas autoris\xE9 l'utilisation de votre cam\xE9ra/micro, il est obligatoire d'autoriser leur utilisation pour continuer.",r="Veuillez suivre l'une des proc\xE9dures suivante pour l'autorisation :",o="Modifier les param\xE8tres d\u2019autorisation pour la cam\xE9ra et le micro d\u2019un site",l="\xC0 droite de la barre d'adresse, appuyez sur",h="Appuyez sur",d="Param\xE8tres du site",p="Appuyez sur",u="Micro",f="ou",m="Appareil photo",g="Appuyez pour activer ou d\xE9sactiver le micro ou la cam\xE9ra.",v="Si le site que vous voulez utiliser est indiqu\xE9 sous",b="Bloqu\xE9",y="appuyez sur le site",S="Activer ou d\xE9sactiver des autorisations",E="Si vous avez d\xE9s
1activ\xE9 l\u2019acc\xE8s au micro sur votre appareil, vous pouvez contr\xF4ler les autorisations de vos applications sur un appareil \xE9quip\xE9 d\u2019Android pour utiliser votre micro ou votre appareil photo. ",_="Sur votre appareil Android, ouvrez l\u2019application",T="Param\xE8tres",I="Appuyez sur",w="Applications et notifications",A="Appuyez sur l\u2019application que vous voulez mettre \xE0 jour.",M="Appuyez sur",D="Autorisations",L="S\xE9lectionnez les autorisations que vous souhaitez accorder \xE0 l\u2019application, telles que",V="Appareil photo",G="ou",W="Microphone",te="Activer ou d\xE9sactiver des autorisations",$="Si vous avez d\xE9sactiv\xE9 l'acc\xE8s au micro ou \xE0 la cam\xE9ra, vous pouvez activer les autorisations concernant le micro ou la cam\xE9ra dans les r\xE9glages de l'appareil. ",Se="Sur votre iPhone ou votre iPad, ouvrez l\u2019application",Ie="R\xE9glages",Re="Appuyez sur",Ne="Au bas de la page, appuyez sur le p\xE9riph\xE9rique que vous voulez mettre \xE0 jour.",de="S\xE9lectionnez",At="Autoriser",_t="ou",ut="Demander",Vt="Veuillez suivre la proc\xE9dure suivante pour l'autorisation :",gi="Veuillez suivre la proc\xE9dure suivante pour l'autorisation :",li="Dans la barre sup\xE9rieure, acc\xE9dez \xE0",Be="R\xE9glages pour ce site web",Kt="Dans le menu d\xE9roulant \xE0 c\xF4t\xE9 de la cam\xE9ra et du micro, s\xE9lectionnez",Ns="Autoriser",Vs="Rechargez la page Web. Une fen\xEAtre contextuelle s'affiche vous demandant si vous souhaitez rester sur la page ou la quitter. S\xE9lectionnez",Dr="Quitter",ar="Votre cam\xE9ra est en cours d'utilisation par d'autres applications. Veuillez fermer vos autres applications avant de poursuivre la t\xE9l\xE9inspection.",Oo="Une erreur s'est produite lors de test de l'utilisation de vos p\xE9riph\xE9riques (cam\xE9ra, micro).",[e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S,E,_,T,I,w,A,M,D,L,V,G,W,te,$,Se,Ie,Re,Ne,de,At,_t,ut,Vt,gi,li,Be,Kt,Ns,Vs,Dr,ar,Oo,[1,"device-tutoriel-dialog"],["mat-dialog-actions","",1,"custom-dialog-actions"],[1,"ion-custom-button-standard","ion-custom-button-full",3,"click"],["mat-dialog-content",""],[1,"margin-bottom-2"],[1,"icon-more-horizontal"],[1,"icon-chevron-right"],[3,"src"]]},template:function(t,n){1&t&&(c.j41(0,"div",49),c.DNE(1,DP,9,1)(2,kP,3,0)(3,MP,3,0),c.j41(4,"div",50)(5,"ion-button",51),c.bIt("click",function(){return n.retry()}),c.pXf(6,0),c.k0s()()()),2&t&&(c.R7$(),c.vxM(1,n.data.error===n.EnumMediaError.NotAllowedError?1:n.data.error===n.EnumMediaError.NotReadableError?2:n.data.error===n.EnumMediaError.AbortError?3:-1))},dependencies:[Yi.E7,Yi.Yi,Et.Jm],encapsulation:2}),i})();var rr=H(5964),Oa=H(96697),ii=H(25558),LP=H(71985);let RP=(()=>{var a;class i{constructor(){this.localisationService=(0,c.WQX)(es.A),this.code=c.hFB.required(),this.adresse=c.hFB.required(),this.nomCompletCitoyen=c.hFB.required(),this.nomCompletInspecteur=c.hFB.required(),this.dateDebut=c.hFB.required(),this.duree=c.hFB.required(),this.currentLocalisation=this.localisationService.getCurrentLocalisation(),this.dateFormat={[pe.f
1i.FR]:"D MMMM yyyy",[pe.fi.EN]:"MMMM D, yyyy"},this.hourFormat={[pe.fi.FR]:"HH:mm",[pe.fi.EN]:"h:mm A"},this.dateFormatee=(0,c.EWP)(()=>(Q().locale(this.currentLocalisation),(0,mi.Zrt)(Q()(this.dateDebut()).format(this.dateFormat[this.currentLocalisation]))+" \xE0 "+Q()(this.dateDebut()).format(this.hourFormat[this.currentLocalisation])))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-detail-rendezvous"]],inputs:{code:[c.Mj6.SignalBased,"code"],adresse:[c.Mj6.SignalBased,"adresse"],nomCompletCitoyen:[c.Mj6.SignalBased,"nomCompletCitoyen"],nomCompletInspecteur:[c.Mj6.SignalBased,"nomCompletInspecteur"],dateDebut:[c.Mj6.SignalBased,"dateDebut"],duree:[c.Mj6.SignalBased,"duree"]},standalone:!0,features:[c.aNF],decls:32,vars:6,consts:()=>{let e,t,n,r,o;return e="D\xE9tails du rendez-vous",t="T\xE9l\xE9inspection",n="Pour",r="Avec",o="Inspecteur",[e,t,n,r,o,[1,"container-header"],[1,"container-text"],[1,"container-item"],[1,"icon-video"],[1,"icon-home"],[1,"icon-user"],[1,"icon-calendar"],[1,"icon-check"]]},template:function(t,n){1&t&&(c.j41(0,"h4",5),c.pXf(1,0),c.k0s(),c.j41(2,"div",6)(3,"div",7),c.nrm(4,"i",8),c.j41(5,"p")(6,"span"),c.pXf(7,1),c.k0s(),c.EFF(8),c.k0s()(),c.j41(9,"div",7),c.nrm(10,"i",9),c.j41(11,"p"),c.EFF(12),c.k0s()(),c.j41(13,"div",7),c.nrm(14,"i",10),c.j41(15,"p")(16,"span"),c.pXf(17,2),c.k0s(),c.EFF(18),c.k0s()(),c.j41(19,"div",7),c.nrm(20,"i",11),c.j41(21,"p"),c.EFF(22),c.k0s()(),c.j41(23,"div",7),c.nrm(24,"i",12),c.j41(25,"p")(26,"span"),c.pXf(27,3),c.k0s(),c.EFF(28),c.j41(29,"span"),c.pXf(30,4),c.k0s(),c.EFF(31,")"),c.k0s()()()),2&t&&(c.R7$(8),c.SpI(" ",n.code(),""),c.R7$(4),c.JRh(n.adresse()),c.R7$(6),c.SpI(" ",n.nomCompletCitoyen(),""),c.R7$(4),c.Lme("",n.dateFormatee()," (",n.duree()," minutes)"),c.R7$(6),c.SpI(" ",n.nomCompletInspecteur()," ("))},styles:["[_nghost-%COMP%]   .container-header[_ngcontent-%COMP%]{border-radius:10px 10px 0 0;border-style:solid solid none;border-width:1px;border-color:#0000001a;margin-bottom:0;padding:15px 20px;font-size:16px}@media (min-width: 960px){[_nghost-%COMP%]   .container-header[_ngcontent-%COMP%]{margin:0}}[_nghost-%COMP%]   .container-text[_ngcontent-%COMP%]{border-style:solid;border-width:1px;border-color:#0000001a;display:flex;padding:15px 20px 20px;flex-direction:column;gap:20px;font-size:16px}[_nghost-%COMP%]   .container-text[_ngcontent-%COMP%]   .container-item[_ngcontent-%COMP%]{display:flex;gap:10px}[_nghost-%COMP%]   .container-text[_ngcontent-%COMP%]   .container-item[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:18px}[_nghost-%COMP%]   .container-text[_ngcontent-%COMP%]   .container-item[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;line-height:1.4}"],changeDetection:0}),i})();var xr=H(14823);const NP=(a,i)=>i.id;function VP(a,i){if(1&a&&(c.j41(0,"div",6),c.nrm(1,"i",7),c.j41(2,"span"),c.EFF(3),c.k0s()()),2&a){const e=c.XpG(2);c.R7$(3),c.JRh(e.motAucune)}}function FP(a,i){1&a&&(c.j41(0,"div",6),c.pXf(1,1),c.k0s())}function BP(a,i){if(1&a){const e=c.RV6();c.j41(0,"li")(1,"input",3),c.bIt("change",function(){const n=c.eBV(e).$implicit,r=c.XpG();return c.Njj(r.onClickBgImage(n))}),c.k0s(),c.j41(2,"label",4),c.nrm(3,"img",5),c.DNE(4,VP,4,1,"div",6)(5,FP,2,0,"div",6),c.k0s()()}if(2&a){const e=i.$implicit,t=c.XpG();c.R7$(),c.Mz_("id","cb-",e.id,""),c.Y8G("checked",e.id===t.currentBackgroundImageId()),c.R7$(),c.Mz_("for","cb-",e.id,""),c.R7$(),c.FS9("src",e.url,c.B4B),c.R7$(),c.vxM(4,e.url.includes("none.jpg")?4:-1),c.R7$(),c.vxM(5,e.url.includes("blur.jpg")?5:-1)}}let qm=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.dialogRef=(0,c.WQX)(Yi.CP,{optional:!0}),this.backgroundImages=this.store.selectSignal(XS),this.currentBackgroundImageId=this.store.selectSignal(jS),this.motAucune="Aucune"}onClickBgImage(t){var n;this.store.dispatch(Yd({payload:t})),null===(n=this.dialogRef)||void 0===n||n.close()}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-sidepanel-background-image"]],standalone:!0,features:[c.aNF],decls:6,vars:0,consts:()=>{let e,t;return e="Image arri\xE8re plan",t="Flouter l'arri\xE8re Plan",[e,t,[1,"bg-image-video"],["type","radio","name","bg-image",3,"change","checked","id"],[3,"for"],[3,"src"],[1,"centered-text"],[1,"icon-x-circle-full"]]},template:function(t,n){1&t&&(c.j41(0,"h3"),c.pXf(1,0),c.k0s(),c.j41(2,"div",2)(3,"ul"),c.Z7z(4,BP,6,8,"li",null,NP),c.k0s()()),2&t&&(c.R7$(4),c.Dyx(n.backgroundImages()))},dependencies:[Qe.MD],styles:['@charset "UTF-8";.bg-image-video[_ngcontent-%COMP%]{overflow:auto;max-height:calc(100vh - 190px)!important}.bg-image-video[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{list-style-type:none;padding:0}.bg-image-video[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:inline-block;width:50%}.bg-image-video[_ngcontent-%COMP%]   input[type=radio][id^=cb][_ngcontent-%COMP%]{display:none}.bg-image-video[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{border:1px solid #fff;display:block;position:relative;margin:10px;cursor:pointer}.bg-image-video[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]:before{background-color:#fff;color:#fff;content:" ";display:block;border-radius:50%;border:1px solid grey;position:absolute;top:-5px;left:-5px;width:25px;height:25px;text-align:center;line-height:28px;transition-duration:.4s;transform:scale(0)}.bg-image-video[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100px;width:100%;transition-duration:.2s;transform-origin:50% 50%}.bg-image-video[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{border-color:#ddd}.bg-image-video[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:before{content:"\\2713";background-color:#2814db;transform:scale(1);z-index:999}.bg-image-video[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{transform:scale(1);box-shadow:0 0 5px #333;z-index:-1}.bg-image-video[_ngcontent-%COMP%]   .centered-text[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;text-align:center}.bg-image-video[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px}.bg-image-video[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 5px gray;border-radius:10px}.bg-image-video[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#7a7a7a;border-radius:10px}.bg-image-video[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#7a7a7a}@media (min-width: 960px){.bg-image-video[_ngcontent-%COMP%]{max-height:calc(100vh - 226px)!important}}@media (min-width: 600px){.bg-image-video[_ngcontent-%COMP%]{max-height:calc(100vh - 262px)!important}}'],changeDetection:0}),i})();function HP(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",5),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.updateStateParleur())}),c.nrm(1,"i"),c.k0s()}if(2&a){const e=c.XpG();c.Y8G("matTooltip",e.visiteParleur()),c.R7$(),c.AVh("icon-volume",!e.muteParleur())("icon-volume-x",e.muteParleur())}}function zP(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",2),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.switchModeCamera())}),c.nrm(1,"i",6),c.k0s()}if(2&a){const e=c.XpG();c.Y8G("matTooltip",e.visiteCameraMode())("disabled",!e.videoTrackInitialized())}}function XP(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",7),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.openBackgoundDialog())}),c.nrm(1,"i",8),c.k0s()}}let MC=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.twilioVideoService=(0,c.WQX)(be.Z7),this.dialog=(0,c.WQX)(Yi.bZ),this.role=this.store.selectSignal(ln),this.sideMenu=this.store.selectSignal(dc),this.muteParleur=this.store.selectSignal(km),this.muteMicrophone=this.store.selectSignal(uc),this.muteCamera=this.store.selectSignal(fc),this.modeCamera=this.store.selectSignal(Mm),this.plateform=this.store.selectSignal(Ta),this.audioTrackInitialized=(0,ee.ot)(this.twilioVideoService.audioTrackInitialized$),this.videoTrackInitialized=(0,ee.ot)(this.twilioVideoService.videoTrackInitialized$),this.visiteParleur=(0,c.EWP)(()=>this.muteParleur()?"Activer le haut-parleur":"D\xE9sactiver le haut-parleur"),this.visiteCamera=(0,c.EWP)(()=>this.muteCamera()?"Activer la cam\xE9ra":"D\xE9sactiver la cam\xE9ra"),this.visiteMicro=(0,c.EWP)(()=>this.muteMicrophone()?"Activer le micro":"D\xE9sactiver le micro"),this.visiteCameraMode=(0,c.EWP)(()=>"user"===this.modeCamera()?"Cam\xE9ra arri\xE8re":"Cam\xE9ra frontale")}openBackgoundDialog(){this.dialog.open(qm,{width:pe.Uq.Large})}updateStateParleur(){this.store.dispatch(Ud())}updateStateMicro(){this.store.dispatch(Wd())}updateStateCamera(){this.store.dispatch($d())}switchModeCamera(){this.store.dispatch(qd())}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-mini-toolbar"]],standalone:!0,features:[c.aNF],decls:8,vars:15,consts:()=>{let e;return e="Image Arri\xE8re Plan",[[1,"visite-toolbar","mini-toolbar"],["mat-icon-button","",3,"matTooltip"],["mat-icon-button","",3,"click","matTooltip","disabled"],["mat-icon-button","",3,"matTooltip","disabled"],["matTooltip",e,"mat-icon-button",""],["mat-icon-button","",3,"click","matTooltip"],[1,"icon-camera-switch"],["matTooltip",e,"mat-icon-button","",3,"click"],[1,"icon-background-blur"]]},template:function(t,n){1&t&&(c.j41(0,"div",0),c.DNE(1,HP,2,5,"button",1),c.j41(2,"button",2),c.bIt("click",function(){return n.updateStateMicro()}),c.nrm(3,"i"),c.k0s(),c.j41(4,"button",2),c.bIt("click",function(){return n.updateStateCamera()}),c.nrm(5,"i"),c.k0s(),c.DNE(6,zP,2,2,"button",3)(7,XP,2,0,"button",4),c.k0s()),2&t&&(c.R7$(),c.vxM(1,"pc"===n.plateform()?1:-1),c.R7$(),c.Y8G("matTooltip",n.visiteMicro())("disabled",!n.audioTrackInitialized()),c.R7$(),c.AVh("icon-mic",!n.muteMicrophone())("icon-mic-off",n.muteMicrophone()),c.R7$(),c.Y8G("matTooltip",n.visiteCamera())("disabled",!n.videoTrackInitialized()),c.R7$(),c.AVh("icon-video",!n.muteC
1amera())("icon-video-off",n.muteCamera()),c.R7$(),c.vxM(6,"mobile"===n.plateform()?6:-1),c.R7$(),c.vxM(7,"inspecteur"===n.role()&&"pc"===n.plateform()?7:-1))},dependencies:[xr.uc,xr.oV,$t.Hl,$t.iY],styles:["[_nghost-%COMP%]   .mini-toolbar[_ngcontent-%COMP%]{justify-content:center;gap:2rem;border-radius:0 0 10px 10px}"],changeDetection:0}),i})();function jP(a,i){if(1&a&&(c.j41(0,"div",10)(1,"span",11,3),c.EFF(3),c.k0s()()),2&a){const e=i.$implicit,t=c.sdS(2);c.Y8G("matTooltip",e.text)("matTooltipDisabled",t.scrollWidth<=t.clientWidth),c.R7$(3),c.JRh(e.text)}}function UP(a,i){if(1&a&&(c.j41(0,"div",10)(1,"span",11,3),c.EFF(3),c.k0s()()),2&a){const e=i.$implicit,t=c.sdS(2);c.Y8G("matTooltip",e.text)("matTooltipDisabled",t.scrollWidth<=t.clientWidth),c.R7$(3),c.JRh(e.text)}}function WP(a,i){if(1&a&&(c.j41(0,"div",10)(1,"span",11,3),c.EFF(3),c.k0s()()),2&a){const e=i.$implicit,t=c.sdS(2);c.Y8G("matTooltip",e.text)("matTooltipDisabled",t.scrollWidth<=t.clientWidth),c.R7$(3),c.JRh(e.text)}}function $P(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",5,4),c.bIt("mouseenter",function(){c.eBV(e);const n=c.sdS(1),r=c.XpG();return c.Njj(r.updateVideoTooltipEnabled(n))}),c.nrm(2,"i",12),c.j41(3,"ejs-dropdownlist",7),c.bIt("select",function(n){c.eBV(e);const r=c.XpG();return c.Njj(r.changeVideoDevice(n))}),c.DNE(4,WP,4,3,"ng-template",null,1,c.C5r),c.k0s()()}if(2&a){const e=c.XpG();c.Y8G("matTooltip",e.selectedVideoDevicesLabel())("matTooltipDisabled",!e.videoTooltipEnabled()),c.R7$(3),c.Y8G("value",e.valueVideoDeviceId())("dataSource",e.videoDevicesValueLit())("allowObjectBinding",!0)("fields",e.fields)("placeholder",e.videoWatermak)("popupWidth",e.videoPopupWidth())}}let LC=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.parleurDevices=this.store.selectSignal(kS),this.audioDevices=this.store.selectSignal(MS),this.videoDevices=this.store.selectSignal(LS),this.parleurDeviceId=this.store.selectSignal(Am),this.audioDeviceId=this.store.selectSignal(Pm),this.videoDeviceId=this.store.selectSignal(Dm),this.plateform=this.store.selectSignal(Ta),this.isMobile=(0,c.EWP)(()=>"mobile"===this.plateform()),this.valueParleurDeviceId=(0,c.EWP)(()=>this.parleurDeviceId()?{value:this.parleurDeviceId()}:null),this.valueAudioDeviceId=(0,c.EWP)(()=>this.audioDeviceId()?{value:this.audioDeviceId()}:null),this.valueVideoDeviceId=(0,c.EWP)(()=>this.videoDeviceId()?{value:this.videoDeviceId()}:null),this.parleurDevicesValueLit=(0,c.EWP)(()=>this.parleurDevices().map(this.mapDeviceToValueList)),this.audioDevicesValueLit=(0,c.EWP)(()=>this.audioDevices().map(this.mapDeviceToValueList)),this.videoDevicesValueLit=(0,c.EWP)(()=>this.videoDevices().map(this.mapDeviceToValueList)),this.selectedParleurDevicesLabel=(0,c.EWP)(()=>{var t,n;return null!==(t=null===(n=this.parleurDevices().find(r=>r.deviceId===this.parleurDeviceId()))||void 0===n?void 0:n.label)&&void 0!==t?t:""}),this.selectedAudioDevicesLabel=(0,c.EWP)(()=>{var t,n;return null!==(t=null===(n=this.audioDevices().find(r=>r.deviceId===this.audioDeviceId()))||void 0===n?void 0:n.label)&&void 0!==t?t:""}),this.selectedVideoDevicesLabel=(0,c.EWP)(()=>{var t,n;return null!==(t=null===(n=this.videoDevices().find(r=>r.deviceId===this.videoDeviceId()))||void 0===n?void 0:n.label)&&void 0!==t?t:""}),this.parleurPopupWidth=(0,c.vPA)("100%"),this.audioPopupWidth=(0,c.vPA)("100%"),this.videoPopupWidth=(0,c.vPA)("100%"),this.parleurWatermak="Haut-parleur",this.audioWatermak="Microphone",this.videoWatermak="Cam\xE9ra",this.fields={text:"text",value:"value"},this.parleurTooltipEnabled=(0,c.vPA)(!1),this.audioTooltipEnabled=(0,c.vPA)(!1),this.videoTooltipEnabled=(0,c.vPA)(!1)}changeParleurDevice(t){this.store.dispatch(Ec({payload:t.itemData.value}))}changeAudioDevice(t){this.store.dispatch(Cc({payload:t.itemData.value}))}changeVideoDevice(t){this.store.dispatch(_c({payload:t.itemData.value}))}updateParleurTooltipEnabled(t){this.parleurTooltipEnabled.set(this.isSelectedTextTruncated(t))}updateAudioTooltipEnabled(t){this.audioTooltipEnabled.set(this.isSelectedTextTruncated(t))}updateVideoTooltipEnabled(t){this.videoTooltipEnabled.set(this.isSelectedTextTruncated(t))}isSelectedTextTruncated(t){const n=t.querySelector("input.e-input");return!!n&&n.scrollWidth>n.clientWidth}mapDeviceToValueList(t){return{text:t.label,value:t.deviceId}}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-parametre-toolbar"]],standalone:!0,features:[c.aNF],decls:13,vars:17,consts:[["parleurItem",""],["itemTemplate",""],["audioItem",""],["dropdownText",""],["videoItem",""],[1,"parametre-item",3,"mouseenter","matTooltip","matTooltipDisabled"],[1,"icon-volume"],["cssClass","device-dropdown",3,"select","value","dataSource","allowObjectBinding","fields","placeholder","popupWidth"],[1,"icon-m
1ic"],[1,"parametre-item",3,"matTooltip","matTooltipDisabled"],[1,"dropdown-item",3,"matTooltip","matTooltipDisabled"],[1,"dropdown-text"],[1,"icon-video"]],template:function(t,n){if(1&t){const r=c.RV6();c.j41(0,"div",5,0),c.bIt("mouseenter",function(){c.eBV(r);const l=c.sdS(1);return c.Njj(n.updateParleurTooltipEnabled(l))}),c.nrm(2,"i",6),c.j41(3,"ejs-dropdownlist",7),c.bIt("select",function(l){return c.eBV(r),c.Njj(n.changeParleurDevice(l))}),c.DNE(4,jP,4,3,"ng-template",null,1,c.C5r),c.k0s()(),c.j41(6,"div",5,2),c.bIt("mouseenter",function(){c.eBV(r);const l=c.sdS(7);return c.Njj(n.updateAudioTooltipEnabled(l))}),c.nrm(8,"i",8),c.j41(9,"ejs-dropdownlist",7),c.bIt("select",function(l){return c.eBV(r),c.Njj(n.changeAudioDevice(l))}),c.DNE(10,UP,4,3,"ng-template",null,1,c.C5r),c.k0s()(),c.DNE(12,$P,6,8,"div",9)}2&t&&(c.Y8G("matTooltip",n.selectedParleurDevicesLabel())("matTooltipDisabled",!n.parleurTooltipEnabled()),c.R7$(3),c.Y8G("value",n.valueParleurDeviceId())("dataSource",n.parleurDevicesValueLit())("allowObjectBinding",!0)("fields",n.fields)("placeholder",n.parleurWatermak)("popupWidth",n.parleurPopupWidth()),c.R7$(3),c.Y8G("matTooltip",n.selectedAudioDevicesLabel())("matTooltipDisabled",!n.audioTooltipEnabled()),c.R7$(3),c.Y8G("value",n.valueAudioDeviceId())("dataSource",n.audioDevicesValueLit())("allowObjectBinding",!0)("fields",n.fields)("placeholder",n.audioWatermak)("popupWidth",n.audioPopupWidth()),c.R7$(3),c.vxM(12,n.isMobile()?-1:12))},dependencies:[Dd,Bi,xr.uc,xr.oV],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}@media (min-width: 960px){[_nghost-%COMP%]{flex-direction:row;gap:2rem}}[_nghost-%COMP%]   .parametre-item[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:10px;width:100%}[_nghost-%COMP%]   .parametre-item[_ngcontent-%COMP%]   ejs-dropdownlist[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]     .e-input-group, [_nghost-%COMP%]     .e-input-focus{border:0!important;font-size:16px!important}[_nghost-%COMP%]     .cdk-overlay-container .mat-tooltip-panel{z-index:99999999!important}"],changeDetection:0}),i})();var RC=H(60565),Ms=H(59042),_i=H(32102),NC=H(9183),Tc=H(81405);const qP=["localMediaContainer"];function GP(a,i){1&a&&(c.j41(0,"div",23),c.nrm(1,"i",26),c.j41(2,"h3"),c.pXf(3,2),c.k0s()())}function YP(a,i){1&a&&(c.j41(0,"div",23),c.nrm(1,"mat-progress-spinner",27),c.j41(2,"h3"),c.pXf(3,3),c.k0s()())}function QP(a,i){1&a&&(c.j41(0,"h4"),c.pXf(1,4),c.k0s(),c.j41(2,"p"),c.pXf(3,5),c.k0s())}function JP(a,i){1&a&&(c.j41(0,"h4"),c.pXf(1,6),c.k0s())}function KP(a,i){if(1&a&&(c.j41(0,"div",25),c.DNE(1,QP,4,0)(2,JP,2,0),c.nrm(3,"ion-spinner",28),c.k0s()),2&a){const e=c.XpG();c.R7$(),c.vxM(1,"citoyen"===e.role()?1:2)}}function ZP(a,i){1&a&&(c.j41(0,"p"),c.pXf(1,8),c.k0s())}function eD(a,i){1&a&&(c.j41(0,"p"),c.pXf(1,9),c.k0s())}function tD(a,i){1&a&&(c.j41(0,"p"),c.pXf(1,10),c.k0s())}function iD(a,i){if(1&a&&c.DNE(0,ZP,2,0,"p")(1,eD,2,0)(2,tD,2,0),2&a){const e=c.XpG(2);c.vxM(0,e.isCitoyenInWaiting()?0:e.participantsInSession()>0?1:2)}}function nD(a,i){1&a&&(c.j41(0,"p"),c.pXf(1,11),c.k0s())}function rD(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",29),c.DNE(1,iD,3,1)(2,nD,2,0),c.j41(3,"button",30),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.rejoindreSalon())}),c.pXf(4,7),c.k0s()(),c.nrm(5,"vplus-session-detail-rendezvous",31)}if(2&a){const e=c.XpG();c.R7$(),c.vxM(1,"inspecteur"===e.role()?1:"citoyen"!==e.role()||e.isAppointmentTime()?-1:2),c.R7$(2),c.Y8G("disabled",e.actionDisabled()),c.R7$(2),c.Y8G("code",e.visite().code)("adresse",e.visite().adresse)("nomCompletCitoyen",e.participantNomComplet())("nomCompletInspecteur",e.inspecteurNomComplet())("dateDebut",e.visite().dateVisite)("duree",e.visite().duree)}}let Kd=(()=>{var a;class i{constructor(){this.destroyRef=(0,c.WQX)(c.abz),this.store=(0,c.WQX)(O.il),this.appConfig=(0,c.WQX)(Fn.o),this.twilioVideoService=(0,c.WQX)(be.Z7),this.visiteService=(0,c.WQX)(Pi),this.dialog=(0,c.WQX)(Yi.bZ),this.deviceDetectionService=(0,c.WQX)(be.vr),this.deviceChangedEmitter=(0,c.CGW)({alias:"deviceChange"}
1),this.isAppointmentTime=(0,c.vPA)(!1),this.role=this.store.selectSignal(ln),this.visite=this.store.selectSignal(Ot),this.sideMenu=this.store.selectSignal(dc),this.pseudo=this.store.selectSignal(US),this.identityPrefix=this.store.selectSignal($S),this.pseudoOriginal=this.store.selectSignal(WS),this.intervenantId=this.store.selectSignal(Ia),this.muteCamera=this.store.selectSignal(fc),this.muteMicrophone=this.store.selectSignal(uc),this.coords=this.store.selectSignal(BS),this.demandes=this.store.selectSignal(Ld),this.dateDemarrage=this.store.selectSignal(Lm),this.currentBackgroundImage=this.store.selectSignal(rP),this.audioTrackInitialized=(0,ee.ot)(this.twilioVideoService.audioTrackInitialized$),this.videoTrackInitialized=(0,ee.ot)(this.twilioVideoService.videoTrackInitialized$),this.allowLocalisationParam=!!this.appConfig.appConfig.paramList[pe.fW.AllowLocalisation],this.allowGeoreferencementCitoyen=!!this.appConfig.appConfig.paramList[pe.fW.AllowGeoreferencementCitoyen],this.videoLoaded=(0,c.vPA)(!1),this.loading=(0,c.vPA)(!1),this.participantsInSession=(0,c.vPA)(0),this.deviceChangeListener=null,this.actionDisabled=(0,c.EWP)(()=>!this.audioTrackInitialized()||!this.videoTrackInitialized()||this.loading()||"citoyen"===this.role()&&!this.isAppointmentTime()),this.participantNomComplet=(0,c.EWP)(()=>this.visite().participant.prenom+" "+this.visite().participant.nom),this.inspecteurNomComplet=(0,c.EWP)(()=>this.visite().inspecteur.prenom+" "+this.visite().inspecteur.nom),this.isCitoyenInWaiting=(0,c.EWP)(()=>this.demandes().length>0),this.pseudoFormControl=new oe.MJ("",{validators:[oe.k0.required,oe.k0.maxLength(70)]}),this.pseudoPatchValue=(0,c.QZP)(()=>{this.pseudoFormControl.patchValue(this.pseudo(),{emitEvent:!1,onlySelf:!0})}),this.localMediaContainer=(0,c.ebz)("localMediaContainer")}ngOnInit(){this.store.dispatch(Bm({payload:{id:this.intervenantId(),cameraMute:!1,microphoneMute:!1,pseudo:this.pseudo(),role:this.role()}})),this.visiteService.getVisiteSessionRoomConnected(this.visite().id).pipe((0,ee.pQ)(this.destroyRef)).subscribe(t=>{this.participantsInSession.set(t.connected)}),this.twilioVideoService.devicesInitialized$.pipe((0,rr.p)(t=>t),(0,Oa.s)(1),(0,ii.n)(()=>this.twilioVideoService.launchCamera()),(0,ee.pQ)(this.destroyRef)).subscribe({next:()=>{this.twilioVideoService.attachLocalVideoTrack(this.localMediaContainer()),this.videoLoaded.set(!0),"inspecteur"===this.role()&&this.currentBackgroundImage()&&this.store.dispatch(Yd({payload:this.currentBackgroundImage()}))}}),this.twilioVideoService.devicesInitialized$.pipe((0,rr.p)(t=>t),(0,Oa.s)(1),(0,ii.n)(()=>this.twilioVideoService.launchMicrophone()),(0,ee.pQ)(this.destroyRef)).subscribe(),this.twilioVideoService.initializeDevices().pipe((0,ee.pQ)(this.destroyRef)).subscribe({next:t=>this.deviceChangedEmitter.emit(t),error:t=>{this.dialog.open(kC,{data:{error:t.name,mediaStopVolontairement:!0},width:pe.Uq.Medium,disableClose:!0})}}),this.pseudoFormControl.valueChanges.pipe((0,ee.pQ)(this.destroyRef)).subscribe(t=>{""===t&&this.pseudoFormControl.patchValue(this.pseudoOriginal(),{emitEvent:!1,onlySelf:!0})}),this.deviceChangeListener=()=>{navigator.mediaDevices.enumerateDevices().then(t=>this.deviceChangedEmitter.emit(t))},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeListener),"citoyen"===this.role()&&this.allowGeoreferencementCitoyen&&!this.coords()&&navigator.geolocation&&this.getGeolocationPosition().pipe((0,ue.T)(t=>({latitude:t.coords.latitude,longitude:t.coords.longitude})),(0,ai.M)(t=>this.store.dispatch(Hm({payload:t}))),(0,ii.n)(t=>this.visiteService.updateVisiteGeoreference(this.visite().id,t.latitude,t.longitude)),(0,ee.pQ)(this.destroyRef)).subscribe({error:()=>this.store.dispatch(new Xe.Actions.ShowSnackBar("Impossible d'enregistrer votre position, veuillez r\xE9essayer.",Xe.EnumSnackBarType.Echec))}),this.destroyRef.onDestroy(()=>{this.deviceChangeListener&&(navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeListener),this.deviceChangeListener=null)}),this.preloadNetworkSvgs()}ngAfterViewInit(){if("citoyen"===this.role()){var t,n,r;const o=this.visite().dateVisite.getTime()-(new Date).getTime();this.dateDemarrage()||o<=6e5?this.isAppointmentTime.set(!0):(0,Qd.Y)(6e4).pipe((0,ue.T)(()=>this.visite().dateVisite.getTime()-(new Date).getTime()),(0,rr.p)(g=>g<=6e5),(0,Oa.s)(1),(0,ee.pQ)(this.destroyRef)).subscribe(()=>{this.isAppointmentTime.set(!0)});const l={idVis:this.visite().id,browser:null,browserVersion:null,device:null,os:null,osVersion:null,userAgent:null,rawInfo:null},h=new RC.O(navigator.userAgent).getResult(),d=/safari/i.test(h.browser.name),p=/samsung/i.test(h.browser.name),u=this.deviceDetectionService.isWebview();l.browser=d?be.gJ.Safari:p?be.gJ.Samsung:u?be.gJ.WebView:h.browser.name,l.browserVersion=h.browser.major;const m=/mac/i.test(h.os.name)?be.u1.Mac:h.os.name;l.os=m!==be.u1.Mac&&m!==be.u1.iOS||h.device.type!==be.gC.Tablet&&!this.deviceDetectionService.isTablet(navigator.userAgent)?m:be.u1.IPadOS,l.osVersion=m!==be.u1.Mac||h.device.type!==be.gC.Tablet&&!this.deviceDetectionService.isTablet(navigator.userAgent)?null!==(t=parseFloat(h.os.version))&&void 0!==t?t:null:this.deviceDetectionService.getIPadVersion(),l.device=m!==be.u1.Mac&&m!==be.u1.iOS||h.device.type!==be.gC.Tablet&&!this.deviceDetectionService.isTablet(navigator.userAgent)?null!==(n=null===(r=h.device)||void 0===r?void 0:r.type)&&void 0!==n?n:be.gC.Desktop:be.gC.Tablet,l.userAgent=h.ua,l.rawInfo=JSON.stringify(h),this.visiteService.upsertLogDevice(l).pipe((0,ee.pQ)(this.destroyRef)).subscribe()}}joinRoom(){this.twilioVideoService.detachLocalVideoTrack(),this.store.dispatch(lC())}confirmConnexionDemande(t,n){t?this.prepareDemarrerSession(n):this.handleConnexionError("Votre demande d'admission a \xE9t\xE9 refus\xE9e par l'inspecteur. Veuillez r\xE9essayer plus tard.")}sessionStarted(){this.isAppointmentTime.set(!0)}getGeolocationPosition(){return new LP.c(t=>{navigator.geolocation.getCurrentPosition(n=>{t.next(n),t.complete()},n=>t.error(n))})}rejoindreSalon(){!this.pseudoFormControl.valid||this.loading()||(this.loading.set(!0),this.pseudoFormControl.disable(),"citoyen"===this.role()?this.visiteService.n
1otificationActionCitoyen(this.visite().id,this.pseudoFormControl.getRawValue()).pipe((0,ee.pQ)(this.destroyRef)).subscribe():this.visiteService.getStatutVisite(this.visite().id).pipe((0,ee.pQ)(this.destroyRef)).subscribe({error:()=>this.handleConnexionError(),next:t=>this.prepareDemarrerSession(t)}))}prepareDemarrerSession(t){this.store.dispatch(bc({payload:t})),this.store.dispatch(Xd({payload:this.pseudoFormControl.getRawValue()})),this.store.dispatch(bn({id:this.intervenantId(),payload:{key:"pseudo",value:this.pseudoFormControl.getRawValue()}})),t===pe.CG.Terminee||t===pe.CG.Annulee?this.store.dispatch(zd()):this.visiteService.getVisiteSessionAccessToken(this.visite().id,`${this.identityPrefix()}:${this.pseudoFormControl.getRawValue()}`,this.role()).pipe((0,ii.n)(n=>this.twilioVideoService.connectToRoom(n,this.muteMicrophone())),(0,ee.pQ)(this.destroyRef)).subscribe({error:()=>this.handleConnexionError(),next:()=>{t===pe.CG.Planifiee?this.store.dispatch(cC()):this.joinRoom()}})}handleConnexionError(t="Impossible de rejoindre la session, veuillez r\xE9essayer."){this.store.dispatch(new Xe.Actions.ShowSnackBar(t,Xe.EnumSnackBarType.Echec)),this.loading.set(!1),this.pseudoFormControl.enable()}preloadNetworkSvgs(){for(const t of Object.values(pe.sC))(new Image).src=t.svgPath}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-salle-introduction"]],viewQuery:function(t,n){1&t&&c.wEZ(n.localMediaContainer,qP,5),2&t&&c.NyB()},outputs:{deviceChangedEmitter:"deviceChange"},standalone:!0,features:[c.aNF],decls:20,vars:10,consts:()=>{let e,t,n,r,o,l,h,d,p,u,f,m;return e="Pr\xE9nom et nom",t="Bienvenue",n="Cam\xE9ra d\xE9sactiv\xE9e",r="Chargement...",o="Demande de participation...",l="Vous pourrez participer \xE0 cette t\xE9l\xE9inspection lorsque l'inspecteur vous y autorisera.",h="Connexion en cours...",d="D\xE9marrer",p="Un citoyen attend. Pour l'autoriser \xE0 participer, rejoignez l'appel.",u="Un citoyen est dans l'appel.",f="Personne d'autre ne participe \xE0 cet appel.",m="Vous pourrez d\xE9marrer la t\xE9l\xE9inspection 10 minutes avant l'heure de votre rendez-vous. Veuillez patienter jusqu'\xE0 l'ouverture de la session.",[["localMediaContainer",""],t,n,r,o,l,h,d,p,u,f,m,[1,"hide-desktop","mobile-header","full-width",3,"menuId","headerTitle","returnButtonType","modeLocalisationOnly","minimalistHeader"],[1,"main-page-container"],[1,"main-page"],[1,"header-welcome"],[1,"header-label"],["floatLabel","never",1,"margin-bottom--7"],["matInput","","type","text","placeholder",e,3,"readonly","formControl"],[1,"main-content"],[1,"section-visio"],[1,"video-preview-area"],[1,"video-area"],[1,"video-fallback"],[1,"section-detail"],[1,"full-height","action-loading"],[1,"icon-video-off"],["color","primary","mode","indeterminate",1,"loading-spinner"],["name","circles"],[1,"action-demarrer","text-center"],["mat-raised-button","","type","button",1,"custom-button-full","custom-button-standard",3,"click","disabled"],[3,"code","adresse","nomCompletCitoyen","nomCompletInspecteur","dateDebut","duree"]]},template:function(t,n){1&t&&(c.nrm(0,"vplus-mobile-header",12),c.j41(1,"div",13)(2,"div",14)(3,"div",15)(4,"h3",16),c.pXf(5,1),c.k0s(),c.j41(6,"mat-form-field",17),c.nrm(7,"input",18),c.k0s()(),c.j41(8,"div",19)(9,"div",20)(10,"div",21)(11,"div",22,0),c.DNE(13,GP,4,0,"div",23)(14,YP,4,0,"div",23),c.k0s(),c.nrm(15,"vplus-session-mini-toolbar"),c.k0s(),c.nrm(16,"vplus-session-parametre-toolbar"),c.k0s(),c.j41(17,"div",24),c.DNE(18,KP,4,1,"div",25)(19,rD,6,8),c.k0s()()()()),2&t&&(c.Y8G("menuId","teleinspection")("headerTitle","")("returnButtonType","home-button")("modeLocalisationOnly",!0)("minimalistHeader",!n.allowLocalisationParam),c.R7$(7),c.Y8G("readonly","inspecteur"===n.role())("formControl",n.pseudoFormControl),c.R7$(6),c.vxM(13,n.muteCamera()?13:-1),c.R7$(),c.vxM(14,n.videoLoaded()?-1:14),c.R7$(4),c.vxM(18,n.loading()?18:19))},dependencies:[Rm.G,Ms.fg,_i.rl,$t.$z,NC.LG,oe.me,oe.BC,oe.l_,Tc.f,Et.w2,RP,MC,LC],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;flex:1;overflow-y:auto;width:100%}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .main-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:640px;padding-inline:20px}@media (min-width: 960px){[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .main-page[_ngcontent-%COMP%]{max-width:1400px}}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .main-page[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}@media (min-width: 960px){[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .main-page[_ngcontent-%COMP%]   .main-content[_ngcontent-%COMP%]{flex-direction:row;gap:50px}}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .section-visio[_ngcontent-%COMP%]{flex:7;
1display:flex;flex-direction:column;min-height:0;margin-bottom:2rem}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .header-welcome[_ngcontent-%COMP%]{display:flex;gap:20px;align-items:center;flex-shrink:0;padding:1rem 1rem 1rem 0}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .video-preview-area[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden;border-radius:10px;margin-bottom:1rem}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .video-preview-area[_ngcontent-%COMP%]   .video-area[_ngcontent-%COMP%]{aspect-ratio:16/9;width:100%;display:flex;justify-content:center;align-items:center;background:#000;position:relative;overflow:hidden}@media (min-width: 960px){[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .video-preview-area[_ngcontent-%COMP%]   .video-area[_ngcontent-%COMP%]{aspect-ratio:2}}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .video-preview-area[_ngcontent-%COMP%]   .video-area[_ngcontent-%COMP%]   .video-fallback[_ngcontent-%COMP%]{position:absolute}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .video-preview-area[_ngcontent-%COMP%]   .video-area[_ngcontent-%COMP%]     video{width:100%;height:100%;object-fit:cover;position:absolute}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .section-detail[_ngcontent-%COMP%]{flex:3;margin-bottom:3rem;display:flex;flex-direction:column;gap:2rem}@media (min-width: 960px){[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .section-detail[_ngcontent-%COMP%]{display:flex;flex-direction:column-reverse;justify-content:flex-end;gap:20px}}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .header-label[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .action-demarrer[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:16px}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]     .mdc-text-field--no-label .mat-mdc-form-field-infix{min-height:0;padding-bottom:3px}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .custom-button-full[_ngcontent-%COMP%]{width:100%;border-radius:10px!important}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .video-fallback[_ngcontent-%COMP%]{background:var(--light-grey-color);width:100%;display:flex;align-items:center;justify-content:center;padding:4rem 2rem;flex-direction:column;height:100%}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .video-fallback[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:4rem;color:var(--primary-color);margin-bottom:1rem}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .action-loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .action-loading[_ngcontent-%COMP%]   ion-spinner[_ngcontent-%COMP%]{width:100px;height:100px;color:var(--primary-color)}[_nghost-%COMP%]   .main-page-container[_ngcontent-%COMP%]   .action-loading[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),i})();var Bn=H(51188);function sD(a,i){if(1&a){const e=c.RV6();c.j41(0,"div")(1,"div")(2,"button",11),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.lancerLienProblemeInspecteur())}),c.pXf(3,1),c.k0s()()()}}function oD(a,i){if(1&a){const e=c.RV6();c.j41(0,"div")(1,"h5",12),c.pXf(2,2),c.k0s(),c.j41(3,"h5",12),c.pXf(4,3),c.k0s(),c.j41(5,"div",13)(6,"button",14),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.ajouterFichier())}),c.pXf(7,4),c.k0s(),c.j41(8,"button",11),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.lancerSondage())}),c.pXf(9,5),c.k0s()()()}}function aD(a,i){if(1&a&&(c.j41(0,"div",8)(1,"div",9),c.nrm(2,"i",10),c.k0s(),c.j41(3,"h3"),c.pXf(4,0),c.k0s(),c.DNE(5,sD,4,0,"div")(6,oD,10,0),c.k0s()),2&a){const e=c.XpG();c.R7$(5),c.vxM(5,"inspecteur"===e.role()?5:"citoyen"===e.role()?6:-1)}}function lD(a,i){if(1&a){const e=c.RV6();c.j41(0,"div")(1,"button",11),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.lancerLienProblemeInspecteur())}),c.pXf(2,7),c.k0s()()}}function cD(a,i){if(1&a&&(c.j41(0,"div",8)(1,"div",9),c.nrm(2,"i",10),c.k0s(),c.j41(3,"h3",15),c.pXf(4,6),c.k0s(),c.DNE(5,lD,3,0,"div"),c.k0s()),2&a){const e=c.XpG();c.R7$(5),c.vxM(5,"inspecteur"===e.role()?5:-1)}}let VC=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.router=(0,c.WQX)(Bn.Ix),this.role=(0,ee.ot)(this.store.select(ln)),this.visite=(0,ee.ot)(this.store.select(Ot)),this.statut=(0,ee.ot)(this.store.select(kd)),this.visiteAnnulee=(0,c.EWP)(()=>this.statut()===pe.CG.Annulee),this.visiteTerminee=(0,c.EWP)(()=>this.statut()===pe.CG.Terminee)}ajouterFichier(){this.router.navigate([`teleinspection/ajout-fichiers/${this.visite().id}`])}lancerSondage(){this.router.navigate(this.visite().lienSondage.split("/").splice(1),{queryParams:{invite:1,ref:this.visite().id}})}lancerLienProblemeInspecteur(){this.router.navigate(this.visite().lienProblemeInspecteur.split("/").splice(1),{queryParams:{invite:1,ref:this.visite().id}})}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-salle-terminus"]],standalone:!0,features:[c.aNF],decls:2,vars:1,consts:()=>{let e,t,n,r,o,l,h,d;return e="La t\xE9l\xE9inspection est termin\xE9e.",t=" J'ai rencontr\xE9 un probl\xE8me",n=" Nous vous remercions d'avoir particip\xE9 \xE0 la t\xE9l\xE9inspection. Afin de nous aider \xE0 comprendre et \xE0 am\xE9liorer votre exp\xE9rience, nous vous invitons \xE0 compl\xE9ter ce bref sondage.",r=" De plus, il vous est possible d'ajouter \xE0 votre dossier des photos, vid\xE9os ou autres fichiers.",o=" Ajouter des fichiers",l="Sondage",h="La t\xE9l\xE9inspection est annul\xE9e.",d="J'ai rencontr\xE9 un probl\xE8me",[e,t,n,r,o,l,h,d,[1,"info-card"],[1,"icon-avatar-container","margin-bottom-2"],[1,"icon-visite-virtuelle"],["mat-raised-button","","color","primary",1,"options-actions-element",3,"click"],["Align","justify"],[1,"btn-fin-visite"],["mat-raised-button","","color","primary",1,"options-actions-element","btn-fichier",3,"click"],[1,"margin-bottom-2"]]},template:function(t,n){1&t&&c.DNE(0,aD,7,1,"div",8)(1,cD,6,1),2&t&&c.vxM(0,n.visiteTerminee()?0:n.visiteAnnulee()?1:-1)},dependencies:[Qe.MD,$t.$z],styles:[".btn-fin-visite[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:1rem}"]}),i})(),hD=(()=>{var a;class i{transform(t,n,r){return n[t]||r[t]||t}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275pipe=c.EJ8({name:"vplusVisiteChatAuthorName",type:a,pure:!0,standalone:!0}),i})();const dD=["panelBody"],pD=(a,i)=>i.id;
1function uD(a,i){if(1&a&&(c.j41(0,"div",10)(1,"div",11)(2,"strong"),c.EFF(3),c.nI1(4,"vplusVisiteChatAuthorName"),c.k0s()(),c.j41(5,"p",12),c.EFF(6),c.k0s(),c.j41(7,"div",13)(8,"small"),c.EFF(9),c.nI1(10,"date"),c.k0s()()()),2&a){const e=i.$implicit,t=c.XpG();c.AVh("author",e.author===t.authorId()),c.R7$(3),c.JRh(c.brH(4,5,e.author,t.intervenantsMap(),t.intervenantsDefaultMap())),c.R7$(3),c.JRh(e.bodyMessage),c.R7$(3),c.JRh(c.i5U(10,9,e.dateCreation,"dd/MM/yyyy HH:mm:ss"))}}let FC=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.authorId=(0,ee.ot)(this.store.select(Ia)),this.intervenants=(0,ee.ot)(this.store.select(Md)),this.visite=(0,ee.ot)(this.store.select(Ot)),this.conversations=(0,ee.ot)(this.store.select(KA).pipe((0,ai.M)(()=>setTimeout(()=>this.scrollToEnd(),50)))),this.messageControl=new oe.MJ("",[oe.k0.required]),this.errorStateMatcher={isErrorState:()=>!1},this.intervenantsMap=(0,c.EWP)(()=>{const t=this.intervenants();return t?t.reduce((n,r)=>(n[r.id]=r.pseudo,n),{}):{}}),this.intervenantsDefaultMap=(0,c.EWP)(()=>{const t=this.visite();return{[t.participant.id]:`${t.participant.prenom} ${t.participant.nom}`,[t.inspecteur.id]:`${t.inspecteur.prenom} ${t.inspecteur.nom}`}}),this.markReaded=(0,c.QZP)(()=>{const t=this.conversations().filter(n=>n.author!==this.authorId()&&!n.isRead).map(n=>n.id);t.length>0&&(this.store.dispatch(oC({payload:t})),this.store.dispatch(TC({payload:0})))},{allowSignalWrites:!0})}ngAfterViewInit(){this.scrollToEnd(),this.addMarginToMessageField()}scrollToEnd(){this.panelBodyRef&&(this.panelBodyRef.nativeElement.scrollTop=this.panelBodyRef.nativeElement.scrollHeight)}
1addMarginToMessageField(){if(navigator.userAgent.toLowerCase().indexOf("iphone")>-1){const t=document.querySelector(".panel-footer").getBoundingClientRect(),n=t.top+t.height-Math.max(document.documentElement.clientHeight||0,window.innerHeight||0);n>0&&document.querySelector(".panel-footer").setAttribute("style",`margin-bottom: ${n}px;`)}}onSubmit(){this.messageControl.valid&&(this.store.dispatch(QS({payload:this.messageControl.value})),this.messageControl.reset())}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-sidepanel-chat"]],viewQuery:function(t,n){if(1&t&&c.GBs(dD,5),2&t){let r;c.mGM(r=c.lsd())&&(n.panelBodyRef=r.first)}},standalone:!0,features:[c.aNF],decls:13,vars:2,consts:()=>{let e,t;return e="Saisir votre message",t="Conversation",[["panelBody",""],t,[1,"panel-chat"],[1,"panel-body"],[1,"chat-item",3,"author"],[1,"panel-footer"],[3,"ngSubmit"],["type","text","matInput","","placeholder",e,3,"formControl","errorStateMatcher"],["mat-icon-button","","matSuffix","","type","submit"],[1,"icon-send"],[1,"chat-item"],[1,"chat-header"],[1,"chat-message"],[1,"chat-footer"]]},template:function(t,n){if(1&t){const r=c.RV6();c.j41(0,"h3"),c.pXf(1,1),c.k0s(),c.j41(2,"div",2)(3,"div",3,0),c.Z7z(5,uD,11,12,"div",4,pD),c.k0s(),c.j41(7,"div",5)(8,"form",6),c.bIt("ngSubmit",function(){return c.eBV(r),c.Njj(n.onSubmit())}),c.j41(9,"mat-form-field"),c.nrm(10,"input",7),c.j41(11,"button",8),c.nrm(12,"i",9),c.k0s()()()()()}2&t&&(c.R7$(5),c.Dyx(n.conversations()),c.R7$(5),c.Y8G("formControl",n.messageControl)("errorStateMatcher",n.errorStateMatcher))},dependencies:[Qe.MD,Qe.vh,oe.X1,oe.qT,oe.me,oe.BC,oe.cb,oe.l_,oe.YN,oe.cV,_i.RG,_i.rl,_i.yw,Ms.fS,Ms.fg,$t.Hl,$t.iY,hD],styles:[".panel-chat[_ngcontent-%COMP%]{height:calc(100vh - 72px);display:flex;flex-direction:column;padding-bottom:2rem}.panel-body[_ngcontent-%COMP%]{flex-grow:1;overflow:auto;font-size:.8rem;padding-right:10px}.chat-item[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:12px;width:85%;margin-left:15%;margin-bottom:24px}.chat-item[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:12px 0;line-height:1.25}.chat-item[_ngcontent-%COMP%]   .chat-footer[_ngcontent-%COMP%]{text-align:right;width:100%}.chat-item.author[_ngcontent-%COMP%]{background:var(--primary-color);color:#fff;margin-left:0;margin-right:15%}"]}),i})();var fD=H(39974),mD=H(85343),BC=H(54360),gD=H(58750),bD=H(23294),yD=H(1807);const SD=(a,i)=>i.id;function CD(a,i){if(1&a&&(c.j41(0,"div",4)(1,"div",7)(2,"strong"),c.EFF(3),c.k0s()(),c.nrm(4,"p",8),c.j41(5,"div",9)(6,"small"),c.EFF(7),c.nI1(8,"date"),c.k0s()()()),2&a){const e=i.$implicit;c.R7$(3),c.JRh(e.createurNom),c.R7$(),c.Y8G("innerHTML",e.contenu,c.npT),c.R7$(3),c.JRh(c.i5U(8,3,e.dateCreation,"dd/MM/yyyy HH:mm:ss"))}}let HC=(()=>{var a;class i{constructor(){this.destroyRef=(0,c.WQX)(c.abz),this.store=(0,c.WQX)(O.il),this.visiteService=(0,c.WQX)(Pi),this.notes=(0,ee.ot)(this.store.select(ZA)),this.visite=(0,ee.ot)(this.store.select(Ot)),this.currentNote=(0,ee.ot)(this.store.select(eP)),this.noteControl=new oe.MJ(""),this.patchControl=(0,c.QZP)(()=>{this.noteControl.patchValue(this.currentNote(),{onlySelf:!0,emitEvent:!1})})}ngOnInit(){const t=localStorage.getItem("noteId");this.noteControl.valueChanges.pipe(function vD(a){return(0,fD.N)((i,e)=>{let t=!1,n=null,r=null;const o=()=>{if(null==r||r.unsubscribe(),r=null,t){t=!1;const l=n;n=null,e.next(l)}};i.subscribe((0,BC._)(e,l=>{null==r||r.unsubscribe(),t=!0,n=l,r=(0,BC._)(e,o,mD.l),(0,gD.Tg)(a(l)).subscribe(r)},()=>{o(),e.complete()},void 0,()=>{n=r=null}))})}(()=>(0,yD.O)(2e3)),(0,bD.F)(),(0,ue.T)(n=>({id:t,createurId:this.visite().inspecteur.id,createurNom:`${this.visite().inspecteur.prenom} ${this.visite().inspecteur.nom}`,targetId:this.visite().id,targetModule:"visite",contenu:null==n?void 0:n.replace(/\n/g,"<br>\n")})),(0,ii.n)(n=>this.visiteService.enregistrerNote(n)),(0,ee.pQ)(this.destroyRef)).subscribe()}ngOnDestroy(){this.store.dispatch(Hd({payload:this.noteControl.value}))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-sidepanel-note"]],standalone:!0,features:[c.aNF],decls:11,vars:1,consts:()=>{let e,t;return e="Saisissez votre note",t="Notes",[["panelBody",""],t,[1,"panel-note"],[1,"panel-body"],[1,"n
1ote-item","author"],[1,"panel-footer"],["placeholder",e,"rows","5","matInput","",1,"hide-scroll",3,"formControl"],[1,"note-header"],[1,"note-message",3,"innerHTML"],[1,"note-footer"]]},template:function(t,n){1&t&&(c.j41(0,"h3"),c.pXf(1,1),c.k0s(),c.j41(2,"div",2)(3,"div",3,0),c.Z7z(5,CD,9,6,"div",4,SD),c.k0s(),c.j41(7,"div",5)(8,"form")(9,"mat-form-field"),c.nrm(10,"textarea",6),c.k0s()()()()),2&t&&(c.R7$(5),c.Dyx(n.notes()),c.R7$(5),c.Y8G("formControl",n.noteControl))},dependencies:[Qe.MD,Qe.vh,oe.YN,oe.qT,oe.me,oe.BC,oe.cb,oe.cV,_i.RG,_i.rl,Ms.fS,Ms.fg,oe.X1,oe.l_],styles:[".note[_ngcontent-%COMP%]{background:#fff}.panel-note[_ngcontent-%COMP%]{height:calc(100vh - 72px);display:flex;flex-direction:column;padding-bottom:2rem}.panel-body[_ngcontent-%COMP%]{flex-grow:1;overflow:auto;font-size:.8rem}.note-item[_ngcontent-%COMP%]{background:#fff;border-radius:8px;padding:12px;width:85%;margin-left:15%;margin-bottom:24px}.note-item[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:12px 0;line-height:1.25}.note-item[_ngcontent-%COMP%]   .note-footer[_ngcontent-%COMP%]{text-align:right;width:100%}.note-item.author[_ngcontent-%COMP%]{background:var(--primary-color);color:#fff;margin-left:0;margin-right:15%}"]}),i})();var xe=H(10467);const zC=window.AudioContext||window.webkitAudioContext,Zd=zC?new zC:null;function Gm(){return Gm=(0,xe.A)(function*(a,i){if(!Zd)return;yield Zd.resume();const e=Zd.createAnalyser();e.fftSize=1024,e.smoothingTimeConstant=.5;const t=new MediaStream([a.mediaStreamTrack]);Zd.createMediaStreamSource(t).connect(e);const r=new Uint8Array(e.frequencyBinCount);let o=null;requestAnimationFrame(function l(){e.getByteFrequencyData(r);const h=function ED(a){const i=a.reduce((e,t)=>e+t*t,0);return Math.sqrt(i/a.length)}(r),d=h&&Math.log2(h),p=Math.ceil(10*d/8);o!==p&&(o=p,i(o)),"live"===a.mediaStreamTrack.readyState?requestAnimationFrame(l):requestAnimationFrame(()=>i(0))})}),Gm.apply(this,arguments)}var XC=H(82765),Ym=H(82798),Aa=H(86600);const Qm=(a,i)=>i.deviceId;function ID(a,i){if(1&a&&(c.j41(0,"mat-option",7),c.EFF(1),c.k0s()),2&a){const e=i.$implicit;c.Y8G("value",e.deviceId),c.R7$(),c.JRh(e.label)}}function xD(a,i){if(1&a){const e=c.RV6();c.j41(0,"mat-form-field")(1,"mat-label"),c.pXf(2,1),c.k0s(),c.j41(3,"mat-select",6),c.bIt("selectionChange",function(n){c.eBV(e);const r=c.XpG();return c.Njj(r.onParleurDeviceChange(n))}),c.Z7z(4,ID,2,2,"mat-option",7,Qm),c.k0s()()}if(2&a){const e=c.XpG();c.R7$(3),c.Y8G("value",e.parleurDeviceId()),c.R7$(),c.Dyx(e.parleurDevices())}}function wD(a,i){if(1&a&&(c.j41(0,"mat-option",7),c.EFF(1),c.k0s()),2&a){const e=i.$implicit;c.Y8G("value",e.deviceId),c.R7$(),c.JRh(e.label)}}function OD(a,i){if(1&a){const e=c.RV6();c.j41(0,"mat-form-field")(1,"mat-label"),c.pXf(2,2),c.k0s(),c.j41(3,"mat-select",6),c.bIt("selectionChange",function(n){c.eBV(e);const r=c.XpG();return c.Njj(r.onAudioDeviceChange(n))}),c.Z7z(4,wD,2,2,"mat-option",7,Qm),c.k0s()(),c.nrm(6,"progress",8)}if(2&a){const e=c.XpG();c.R7$(3),c.Y8G("value",e.audioDeviceId()),c.R7$(),c.Dyx(e.audioDevices()),c.R7$(2),c.Y8G("value",e.audioLevel())}}function AD(a,i){if(1&a&&(c.j41(0,"mat-option",7),c.EFF(1),c.k0s()),2&a){const e=i.$implicit;c.Y8G("value",e.deviceId),c.R7$(),c.JRh(e.label)}}function PD(a,i){if(1&a){const e=c.RV6();c.j41(0,"mat-form-field")(1,"mat-label"),c.pXf(2,3),c.k0s(),c.j41(3,"mat-select",6),c.bIt("selectionChange",function(n){c.eBV(e);const r=c.XpG();return c.Njj(r.onVideoDeviceChange(n))}),c.Z7z(4,AD,2,2,"mat-option",7,Qm),c.k0s()()}if(2&a){const e=c.XpG();c.R7$(3),c.Y8G("value",e.videoDeviceId()),c.R7$(),c.Dyx(e.videoDevices())}}function DD(a,i){if(1&a){const e=c.RV6();c.j41(0,"mat-checkbox",9),c.bIt("change",function(n){c.eBV(e);const r=c.XpG();return c.Njj(r.recordingAccord(n.checked))}),c.pXf(1,4),c.k0s()}if(2&a){const e=c.XpG();c.Y8G("checked",e.recordingAccepted())}}let jC=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.actions$=(0,c.WQX)(ye.En),this.appConfig=(0,c.WQX)(Fn.o),this.twilioVideoService=(0,c.WQX)(be.Z7),this.destroyRef=(0,c.WQX)(c.abz),this.role=(0,ee.ot)(this.store.select(ln)),this.parleurDevices=(0,ee.ot)(this.store.select(kS)),this.audioDevices=(0,ee.ot)(this.store.select(MS)),this.videoDevices=(0,ee.ot)(this.store.select(LS)),this.parleurDeviceId=(0,ee.ot)(this.store.select(Am)),this.audioDeviceId=(0,ee.ot)(this.store.select(Pm)),this.videoDeviceId=(0,ee.ot)(this.store.select(Dm)),this.plateform=(0,ee.ot)(this.store.select(Ta)),this.recordingAccepted=(0,ee.ot)(this.store.select(NS)),this.audioLevel=(0,c.vPA)(0),this.allowRecordTeleinspectionParam=!!this.appConfig.appConfig.paramList[pe.fW.AllowRecordTeleinspection]}ngAfterViewInit(){this.twilioVideoService.audioTrackInitialized$.pipe((0,ee.pQ)(this.destroyRef)).subscribe(t=>{t&&this.testMicrophoneLevel()}),this.actions$.pipe((0,ye.gp)(OC),(0,ee.pQ)(this.destroyRef)).subscribe(()=>{this.testMicrophoneLevel()})}testMicrophoneLevel(){var t=this;return(0,xe.A)(function*(){t.twilioVideoService.getLocalAudioTrack()?function _D(a,i){Gm.apply(this,arguments)}
1(t.twilioVideoService.getLocalAudioTrack(),n=>t.audioLevel.set(Number(n))):t.audioLevel.set(0)})()}onParleurDeviceChange(t){this.store.dispatch(Ec({payload:t.value}))}onAudioDeviceChange(t){this.store.dispatch(Cc({payload:t.value}))}onVideoDeviceChange(t){this.store.dispatch(_c({payload:t.value}))}recordingAccord(t){this.store.dispatch(vC({payload:t}))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-sidepanel-parametre"]],standalone:!0,features:[c.aNF],decls:6,vars:4,consts:()=>{let e,t,n,r,o;return e="Param\xE8tres",t="Haut-parleur",n="Micro",r="Cam\xE9ra",o=" J'autorise l'enregistrement de la session\n",[e,t,n,r,o,[1,"font-size-14",3,"checked"],["panelClass","ellipsis-panel",3,"selectionChange","value"],[3,"value"],["max","10",3,"value"],[1,"font-size-14",3,"change","checked"]]},template:function(t,n){1&t&&(c.j41(0,"h3"),c.pXf(1,0),c.k0s(),c.DNE(2,xD,6,1,"mat-form-field")(3,OD,7,2)(4,PD,6,1,"mat-form-field")(5,DD,2,1,"mat-checkbox",5)),2&t&&(c.R7$(2),c.vxM(2,n.parleurDevices().length>0?2:-1),c.R7$(),c.vxM(3,n.audioDevices().length>0?3:-1),c.R7$(),c.vxM(4,"pc"===n.plateform()&&n.videoDevices().length>0?4:-1),c.R7$(),c.vxM(5,"citoyen"===n.role()&&n.allowRecordTeleinspectionParam?5:-1))},dependencies:[Qe.MD,_i.RG,_i.rl,_i.nJ,Ym.Ve,Ym.VO,Aa.wT,XC.g7,XC.So],encapsulation:2}),i})();const kD=(a,i)=>i.id,MD=(a,i)=>i.pseudo;function LD(a,i){if(1&a&&(c.j41(0,"ul",9)(1,"li",10),c.EFF(2),c.j41(3,"div",11),c.nrm(4,"i")(5,"i"),c.k0s()()()),2&a){const e=i.$implicit;c.R7$(2),c.Lme(" ",e.pseudo," (",e.role,") "),c.R7$(2),c.AVh("icon-video",!e.cameraMute)("icon-video-off",e.cameraMute),c.R7$(),c.AVh("icon-mic",!e.microphoneMute)("icon-mic-off",e.microphoneMute)}}function RD(a,i){if(1&a){const e=c.RV6();c.j41(0,"ul",9)(1,"li",10),c.EFF(2),c.j41(3,"div",12)(4,"button",13),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.decisionDemande("accepter"))}),c.pXf(5,3),c.k0s(),c.j41(6,"button",14),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.decisionDemande("refuser"))}),c.pXf(7,4),c.k0s()()()()}if(2&a){const e=i.$implicit;c.R7$(2),c.SpI(" ",e.pseudo," ")}}function ND(a,i){if(1&a&&(c.j41(0,"h4",8),c.pXf(1,2),c.k0s(),c.Z7z(2,RD,8,1,"ul",9,MD)),2&a){const e=c.XpG();c.R7$(2),c.Dyx(e.demandes())}}function VD(a,i){if(1&a){const e=c.RV6();c.j41(0,"a",16),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.positionCitoyen())}),c.nrm(1,"i",17),c.j41(2,"span"),c.pXf(3,5),c.k0s()()}}function FD(a,i){1&a&&(c.j41(0,"p"),c.pXf(1,6),c.k0s())}function BD(a,i){if(1&a&&c.DNE(0,VD,4,0,"a",15)(1,FD,2,0),2&a){const e=c.XpG();c.vxM(0,e.citoyenCoords()?0:1)}}let UC=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.appConfig=(0,c.WQX)(Fn.o),this.role=this.store.selectSignal(ln),this.intervenants=this.store.selectSignal(Md),this.demandes=this.store.selectSignal(Ld),this.citoyenCoords=this.store.selectSignal(BS),this.allowGeoreferencementCitoyen=(0,c.vPA)(!!this.appConfig.appConfig.paramList[pe.fW.AllowGeoreferencementCitoyen]),this.citoyenJoined=(0,c.EWP)(()=>!!this.intervenants().find(t=>"citoyen"===t.role))}positionCitoyen(){const t=`https://maps.google.com/?q=${this.citoyenCoords().latitude},${this.citoyenCoords().longitude}`;window.open(t,"_blank").focus()}decisionDemande(t){this.store.dispatch(yc({payload:"accepter"===t}))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-sidepanel-participants"]],standalone:!0,features:[c.aNF],decls:9,vars:2,consts:()=>{let e,t,n,r,o,l,h;return e="Participants",t="Dans cet appel",n="Dans la salle d'attente",r="Accepter",o="Refuser",l="Localisation",h="Localisation non disponible",[e,t,n,r,o,l,h,[1,"margin-bottom-2"],[1,"section-header"],[1,"no-indent-list"],[1,"participant-item"],[1,"btn-icon"],[1,"btn-actions"],["type","button","matButton","",1,"e-accept",3,"click"],["type","button","matButton","",1,"e-reject",3,"click"],["mat-button","",1,"localisation-button","with-icon"],["mat-button","",1,"localisation-button","with-icon",3,"click"],[1,"icon-map-pin"]]},template:function(t,n){1&t&&(c.j41(0,"h3"),c.pXf(1,0),c.k0s(),c.j41(2,"div",7)(3,"h4",8),c.pXf(4,1),c.k0s(),c.Z7z(5,LD,6,10,"ul",9,kD),c.k0s(),c.DNE(7,ND,4,0)(8,BD,2,1)),2&t&&(c.R7$(5),c.Dyx(n.intervenants()),c.R7$(2),c.vxM(7,n.demandes().length>0?7:-1),c.R7$(),c.vxM(8,n.allowGeoreferencementCitoyen()&&"inspecteur"===n.role()&&n.citoyenJoined()?8:-1))},dependencies:[$t.Hl,$t.It],styles:["[_nghost-%COMP%]   .section-header[_ngcontent-%COMP%]{font-size:1rem}[_nghost-%COMP%]   .no-indent-list[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0}),i})();var WC=H(14819);const $C=(a,i)=>i.id,HD=(a,i)=>i.etiquetteId;function zD(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",8),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.downloadPhotos())}),c.nrm(1,"i",9),c.k0s()}}function XD(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",10)(1,"div",18)(2,"ejs-dropdownlist",19),c.bIt("change",function(n){c.eBV(e);const r=c.XpG().$implicit,o=c.XpG();return c.Njj(o.etiquetteChange(n,r.id))})("filtering",function(n){c.eBV(e);const r=c.XpG(2);return c.Njj(r.onFilteringEtiquette(n))}),c.k0s()()()}if(2&a){const e=i.$implicit,t=c.XpG(2);c.R7$(2),c.Y8G("showClearButton",!0)("ignoreAccent",!0)("dataSource",t.etiquettes())("value",e.etiquetteId)("allowFiltering",!0)("fields",t.etiquetteFields)}}function jD(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",7),c.Z7z(1,XD,3,6,"div",10,HD),c.j41(3,"div",11)(4,"button",12),c.bIt("click",function(){const n=c.eBV(e).$implicit,r=c.XpG();return c.Njj(r.deleteSnapshot(n.id))}),c.nrm(5,"i",13),c.k0s(),c.j41(6,"a",14),c.nrm(7,"i",15),c.k0s()(),c.j41(8,"div",16),c.nrm(9,"img",17),c.k0s()()}if(2&a){const e=i.$implicit;c.R7$(),c.Dyx(e.etiquettes),c.R7$(5),c.Y8G("href",e.url,c.B4B),c.R7$(3),c.Y8G("src",e.url,c.B4B)}}function UD(a,i){if(1&a&&(c.j41(0,"div",7)(1,"div",11)(2,"a",20),c.nrm(3,"i",15),c.k0s()(),c.j41(4,"div",16),c.nrm(5,"img",17),c.k0s()()),2&a){const e=i.$implicit;c.R7$(2),c.Y8G("href",e.url,c.B4B),c.R7$(3),c.Y8G("src",e.url,c.B4B)}}let qC=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.destroyRef=(0,c.WQX)(c.abz),this.fileService=(0,c.WQX)(WC.E),this.visite=(0,ee.ot)(this.store.select(Ot)),this.etiquettes=(0,ee.ot)(this.store.select(zS)),this.photoPrises=(0,ee.ot)(this.store.select(tP)),this.photoPartagees=(0,ee.ot)(this.store.select(HS)),this.etiquetteFields={text:"titre",value:"id"},this.enteteSectionPrises=(0,c.EWP)(()=>`${this.photoPrises().length} Photo${this.photoPrises.length>
11?"s":""}`),this.enteteSectionPartagees=(0,c.EWP)(()=>`${this.photoPartagees().length} Photo${this.photoPartagees.length>1?"s":""}`),this.onFilteringEtiquette=t=>{let n=new x.XK;n=""!==t.text?n.where("titre","contains",t.text,!0):n,t.updateData(this.etiquettes(),n)}}ngAfterViewInit(){this.store.dispatch(Wm({payload:!1}))}downloadPhotos(){const t=[];let n=1;for(const r of this.photoPrises()){const o={};o.path=r.url,o.nom="photo_"+n,o.extension="jpeg",t.push(o),n++}for(const r of this.photoPartagees()){const o={};o.path=r.url,o.nom="photo_"+n,o.extension="jpeg",t.push(o),n++}this.fileService.downloadDocumentsV2(t,"Photos_T\xe9l\xe9inspection_"+this.visite().id).pipe((0,ee.pQ)(this.destroyRef)).subscribe()}etiquetteChange(t,n){t.e&&this.store.dispatch(KS({payload:{etiquetteId:t.itemData.id,docId:n}}))}deleteSnapshot(t){this.store.dispatch(Vd({payload:t}))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-sidepanel-photos"]],standalone:!0,features:[c.aNF],decls:17,vars:3,consts:()=>{let e,t,n,r,o,l,h;return e="T\xE9l\xE9charger tout",t="Photos",n="Photos Citoyen",r=" Supprimer",o="T\xE9l\xE9charger",l=" \xC9tiquette",h="T\xE9l\xE9charger",[t,n,[1,"visite-photo-list-files-title"],["matTooltip",e,"mat-ripple",""],[1,"panel-photo"],[1,"visite-photo-list-wrapper"],[1,"visite-photo-list"],[1,"visite-photo"],["matTooltip",e,"mat-ripple","",3,"click"],[1,"icon-download",2,"font-size","larger"],[1,"field-custom-wrapper","block","full-width","margin-bottom-1"],[1,"visite-photo-actions"],["matTooltip",r,"mat-ripple","","type","button",2,"cursor","pointer",3,"click"],[1,"icon-trash"],["matTooltip",o,"mat-ripple","",3,"href"],[1,"icon-download"],[1,"visite-photo-image-wrapper"],[3,"src"],[1,"full-width"],["filterBarPlaceholder","","placeholder",l,"floatLabelType","Auto",3,"change","filtering","showClearButton","ignoreAccent","dataSource","value","allowFiltering","fields"],["matTooltip",h,"mat-ripple","",3,"href"]]},template:function(t,n){1&t&&(c.j41(0,"h3"),c.pXf(1,0),c.k0s(),c.j41(2,"h4",2),c.EFF(3),c.DNE(4,zD,2,0,"button",3),c.k0s(),c.j41(5,"div",4)(6,"div",5)(7,"div",6),c.Z7z(8,jD,10,2,"div",7,$C),c.k0s()(),c.j41(10,"h3"),c.pXf(11,1),c.k0s(),c.j41(12,"h4",2),c.EFF(13),c.k0s(),c.j41(14,"div",6),c.Z7z(15,UD,6,2,"div",7,$C),c.k0s()()),2&t&&(c.R7$(3),c.SpI(" ",n.enteteSectionPrises()," "),c.R7$(),c.vxM(4,n.photoPrises().length>0?4:-1),c.R7$(4),c.Dyx(n.photoPrises()),c.R7$(5),c.JRh(n.enteteSectionPartagees()),c.R7$(2),c.Dyx(n.photoPartagees()))},dependencies:[Qe.MD,Dd,Bi,Aa.pZ,Aa.r6,xr.uc,xr.oV,oe.X1],styles:[".panel-photo[_ngcontent-%COMP%]{overflow-y:auto;height:calc(100vh - 180px)}"]}),i})();var WD=H(72785),Jm=H.n(WD),C=(H(81018),H(20564)),se=H(1656);const Je=(a,...i)=>console.warn(`[Ionic Warning]: ${a}`,...i);H(84878);var _e=H(45531);const qt=(a,i)=>null!==i.closest(a),Jt=(a,i)=>"string"==typeof a&&a.length>0?Object.assign({"ion-color":!0,[`ion-color-${a}`]:!0},i):i,dk=/^[a-z][a-z0-9+\-.]*:/,nE=function(){var a=(0,xe.A)(function*(i,e,t,n){if(null!=i&&"#"!==i[0]&&!dk.test(i)){const r=document.querySelector("ion-router");if(r)return null!=e&&e.preventDefault(),r.push(i,t,n)}return!1});return function(e,t,n,r){return a.apply(this,arguments)}}();H(46031),H(90555),H(88875);var zk=H(33726);const jk=(0,C.w$)(class extends C.wt{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.type="bounded"}addRipple(i,e){var t=this;return(0,xe.A)(function*(){return new Promise(n=>{(0,C.gv)(()=>{const r=t.el.getBoundingClientRect(),o=r.width,l=r.height,h=Math.sqrt(o*o+l*l),d=Math.max(l,o),p=t.unbounded?d:h+Wk,u=Math.floor(d*$k),f=p/u;let m=i-r.left,g=e-r.top;t.unbounded&&(m=.5*o,g=.5*l);const v=m-.5*u,b=g-.5*u,y=.5*o-m,S=.5*l-g;(0,C.bN)(()=>{const E=document.createElement("div");E.classList.add("ripple-effect");const _=E.style;_.top=b+"px",_.left=v+"px",_.width=_.height=u+"px",_.setProperty("--final-scale",`${f}`),_.setProperty("--translate-end",`${y}px, ${S}px`),(t.el.shadowRoot||t.el).appendChild(E),setTimeout(()=>{n(()=>{Uk(E)})},325)})})})})()}get unbounded(){return"unbounded"===this.type}render(){const i=(0,_e.b)(this);return(0,C.h)(C.xr,{key:"f1129019a6d556b008c754aeb79618c69baea9f8",role:"presentation",class:{[i]:!0,unbounded:this.unbounded}})}get el(){return this}static get style(){return":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;-webkit-animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1));-webkit-animation:150ms fadeOutAnimation forwards;animation:150ms fadeOutAnimation forwards}@-webkit-keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@-webkit-keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}
1to{opacity:0.16}}@keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@-webkit-keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}@keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}"}},[1,"ion-ripple-effect",{type:[1],addRipple:[64]}]),Uk=a=>{a.classList.add("fade-out"),setTimeout(()=>{a.remove()},200)},Wk=10,$k=.5;const Yk=(0,C.w$)(class extends C.wt{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.ionFocus=(0,C.lh)(this,"ionFocus",7),this.ionBlur=(0,C.lh)(this,"ionBlur",7),this.inItem=!1,this.inListHeader=!1,this.inToolbar=!1,this.formButtonEl=null,this.formEl=null,this.inheritedAttributes={},this.handleClick=i=>{const{el:e}=this;"button"===this.type?nE(this.href,i,this.routerDirection,this.routerAnimation):(0,se.h)(e)&&this.submitForm(i)},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.color=void 0,this.buttonType="button",this.disabled=!1,this.expand=void 0,this.fill=void 0,this.routerDirection="forward",this.routerAnimation=void 0,this.download=void 0,this.href=void 0,this.rel=void 0,this.shape=void 0,this.size=void 0,this.strong=!1,this.target=void 0,this.type="button",this.form=void 0}disabledChanged(){const{disabled:i}=this;this.formButtonEl&&(this.formButtonEl.disabled=i)}renderHiddenButton(){const i=this.formEl=this.findForm();if(i){const{formButtonEl:e}=this;if(null!==e&&i.contains(e))return;const t=this.formButtonEl=document.createElement("button");t.type=this.type,t.style.display="none",t.disabled=this.disabled,i.appendChild(t)}}componentWillLoad(){this.inToolbar=!!this.el.closest("ion-buttons"),this.inListHeader=!!this.el.closest("ion-list-header"),this.inItem=!!this.el.closest("ion-item")||!!this.el.closest("ion-item-divider"),this.inheritedAttributes=(0,se.i)(this.el)}get hasIconOnly(){return!!this.el.querySelector('[slot="icon-only"]')}get rippleType(){return(void 0===this.fill||"clear"===this.fill)&&this.hasIconOnly&&this.inToolbar?"unbounded":"bounded"}findForm(){const{form:i}=this;if(i instanceof HTMLFormElement)return i;if("string"==typeof i){const e=document.getElementById(i);return e?e instanceof HTMLFormElement?e:(Je(`Form with selector: "#${i}" could not be found. Verify that the id is attached to a <form> element.`,this.el),null):(Je(`Form with selector: "#${i}" could not be found. Verify that the id is correct and the form is rendered in the DOM.`,this.el),null)}return void 0!==i?(Je('The provided "form" element is invalid. Verify that the form is a HTMLFormElement and rendered in the DOM.',this.el),null):this.el.closest("form")}submitForm(i){this.formEl&&this.formButtonEl&&(i.preventDefault(),this.formButtonEl.click())}render(){const i=(0,_e.b)(this),{buttonType:e,type:t,disabled:n,rel:r,target:o,size:l,href:h,color:d,expand:p,hasIconOnly:u,shape:f,strong:m,inheritedAttributes:g}=this,v=void 0===l&&this.inItem?"small":l,b=void 0===h?"button":"a",y="button"===b?{type:t}:{download:this.download,href:h,rel:r,target:o};let S=this.fill;return null==S&&(S=this.inToolbar||this.inListHeader?"clear":"solid"),"button"!==t&&this.renderHiddenButton(),(0,C.h)(C.xr,{key:"54569350aae49882123f0e22a720956eddee33f5",onClick:this.handleClick,"aria-disabled":n?"true":null,class:Jt(d,{[i]:!0,[e]:!0,[`${e}-${p}`]:void 0!==p,[`${e}-${v}`]:void 0!==v,[`${e}-${f}`]:void 0!==f,[`${e}-${S}`]:!0,[`${e}-strong`]:m,"in-toolbar":qt("ion-toolbar",this.el),"in-toolbar-color":qt("ion-toolbar[color]",this.el),"in-buttons":qt("ion-buttons",this.el),"button-has-icon-only":u,"button-disabled":n,"ion-activatable":!0,"ion-focusable":!0})},(0,C.h)(b,Object.assign({key:"95c196fc5bf080ef308532c3627e2a9d68f24996"},y,{class:"button-native",part:"native",disabled:n,onFocus:this.onFocus,onBlur:this.onBlur},g),(0,C.h)("span",{key:"e247013b847158187258d28f37ab23905fe49110",class:"button-inner"},(0,C.h)("slot",{key:"58ac0bd8f643f4392ddbe465fab26eedffe02b7a",name:"icon-only"}),(0,C.h)("slot",{key:"2289d37a37a64472ffe818b3b1126945cebf101e",name:"start"}),(0,C.h)("slot",{key:"b69a915dff465d251f0466449b91450d4a4048a9"}),(0,C.h)("slot",{key:"594a80d6707fd5edabc03e467f7aae3011d020f6",name:"end"})),"md"===i&&(0,C.h)("ion-ripple-effect",{key:"b034770cadefe74922ed6564a17147ddc6c9fdb1",type:this.rippleType})))}get el(){return this}static get watchers(){return{disabled:["disabledChanged"]}}static get style(){return{ios:':host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);
1--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;-webkit-font-kerning:none;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #3880ff);--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;
1-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-native::-moz-focus-inner{border:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted(ion-icon){font-size:1.35em;pointer-events:none}::slotted(ion-icon[slot=start]){-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=end]){-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=icon-only]){font-size:1.8em}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:14px;--padding-top:13px;--padding-bottom:13px;--padding-start:1em;--padding-end:1em;--transition:background-color, opacity 100ms linear;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:4px;margin-bottom:4px;min-height:3.1em;font-size:min(1rem, 48px);font-weight:500;letter-spacing:0}:host(.button-solid){--background-activated:var(--ion-color-primary-shade, #3171e0);--background-focused:var(--ion-color-primary-shade, #3171e0);--background-hover:var(--ion-color-primary-tint, #4c8dff);--background-activated-opacity:1;--background-focused-opacity:1;--background-hover-opacity:1}:host(.button-outline){--border-radius:14px;--border-width:1px;--border-style:solid;--background-activated:var(--ion-color-primary, #3880ff);--background-focused:var(--ion-color-primary, #3880ff);--background-hover:transparent;--background-focused-opacity:.1;--color-activated:var(--ion-color-primary-contrast, #fff)}:host(.button-clear){--background-activated:transparent;--background-activated-opacity:0;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:transparent;--background-focused-opacity:.1;font-size:min(1.0625rem, 51px);font-weight:normal}:host(.in-buttons){font-size:clamp(17px, 1.0625rem, 21.08px);font-weight:400}:host(.button-large){--border-radius:16px;--padding-top:17px;--padding-start:1em;--padding-end:1em;--padding-bottom:17px;min-height:3.1em;font-size:min(1.25rem, 60px)}:host(.button-small){--border-radius:6px;--padding-top:4px;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:4px;min-height:2.1em;font-size:min(0.8125rem, 39px)}:host(.button-has-icon-only){--padding-top:0;--padding-bottom:0}:host(.button-round){--border-radius:64px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-strong){font-weight:600}:host(.button-outline.ion-focused.ion-color) .button-native,:host(.button-clear.ion-focused.ion-color) .button-native{color:var(--ion-color-base)}:host(.button-outline.ion-focused.ion-color) .button-native::after,:host(.button-clear.ion-focused.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-shade)}@media (any-hover: hover){:host(.button-clear:not(.ion-activated):hover),:host(.button-outline:not(.ion-activated):hover){opacity:0.6}
1:host(.button-clear.ion-color:hover) .button-native,:host(.button-outline.ion-color:hover) .button-native{color:var(--ion-color-base)}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:transparent}:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-tint)}:host(:hover.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color):not(.ion-activated)) .button-native::after{background:#fff;opacity:0.1}}:host(.button-clear.ion-activated){opacity:0.4}:host(.button-outline.ion-activated.ion-color) .button-native{color:var(--ion-color-contrast)}:host(.button-outline.ion-activated.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-activated) .button-native::after{background:var(--ion-color-shade)}:host(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--color));color:var(--ion-toolbar-background, var(--background), var(--ion-color-primary-contrast, #fff))}',md:':host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;-webkit-font-kerning:none;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #3880ff);--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;
1-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-native::-moz-focus-inner{border:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted(ion-icon){font-size:1.35em;pointer-events:none}::slotted(ion-icon[slot=start]){-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=end]){-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em;margin-top:0;margin-bottom:0}::slotted(ion-icon[slot=icon-only]){font-size:1.8em}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:4px;--padding-top:8px;--padding-bottom:8px;--padding-start:1.1em;--padding-end:1.1em;--transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),\n                background-color 15ms linear,\n                color 15ms linear;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:4px;margin-bottom:4px;min-height:36px;font-size:0.875rem;font-weight:500;letter-spacing:0.06em;text-transform:uppercase}:host(.button-solid){--background-activated:transparent;--background-hover:var(--ion-color-primary-contrast, #fff);--background-focused:var(--ion-color-primary-contrast, #fff);--background-activated-opacity:0;--background-focused-opacity:.24;--background-hover-opacity:.08;--box-shadow:0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)}:host(.button-solid.ion-activated){--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12)}:host(.button-outline){--border-width:2px;--border-style:solid;--box-shadow:none;--background-activated:transparent;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:var(--ion-color-primary, #3880ff);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-outline.ion-activated.ion-color) .button-native{background:transparent}:host(.button-clear){--background-activated:transparent;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:var(--ion-color-primary, #3880ff);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-round){--border-radius:64px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-large){--padding-top:14px;--padding-start:1em;--padding-end:1em;--padding-bottom:14px;min-height:2.8em;font-size:1.25rem}:host(.button-small){--padding-top:4px;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:4px;min-height:2.1em;font-size:0.8125rem}:host(.button-has-icon-only){--padding-top:0;--padding-bottom:0}:host(.button-strong){font-weight:bold}::slotted(ion-icon[slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-contrast)}:host(.button-clear.ion-color.ion-focused) .button-native::after,:host(.button-outline.ion-color.ion-focused) .button-native::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-contrast)}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}:host(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-background, var(--color));color:var(--ion-toolbar-color, var(--background), var(--ion-color-primary-contrast, #fff))}'}}},[33,"ion-button",{color:[513],buttonType:[1025,"button-type"],disabled:[516],expand:[513],fill:[1537],routerDirection:[1,"router-direction"],routerAnimation:[16],download:[1],href:[1],rel:[1],shape:[513],size:[513],strong:[4],target:[1],type:[1],form:[1]},void 0,{disabled:["disabledChanged"]}]);const Qk=function hE(){typeof customElements>"u"||["ion-button","ion-ripple-effect"].forEach(i=>
1{switch(i){case"ion-button":customElements.get(i)||customElements.define(i,Yk);break;case"ion-ripple-effect":customElements.get(i)||function Eo(){typeof customElements>"u"||["ion-ripple-effect"].forEach(i=>{"ion-ripple-effect"===i&&(customElements.get(i)||customElements.define(i,jk))})}()}})},dE={bubbles:{dur:1e3,circles:9,fn:(a,i,e)=>{const t=a*i/e-a+"ms",n=2*Math.PI*i/e;return{r:5,style:{top:32*Math.sin(n)+"%",left:32*Math.cos(n)+"%","animation-delay":t}}}},circles:{dur:1e3,circles:8,fn:(a,i,e)=>{const t=i/e,n=a*t-a+"ms",r=2*Math.PI*t;return{r:5,style:{top:32*Math.sin(r)+"%",left:32*Math.cos(r)+"%","animation-delay":n}}}},circular:{dur:1400,elmDuration:!0,circles:1,fn:()=>({r:20,cx:48,cy:48,fill:"none",viewBox:"24 24 48 48",transform:"translate(0,0)",style:{}})},crescent:{dur:750,circles:1,fn:()=>({r:26,style:{}})},dots:{dur:750,circles:3,fn:(a,i)=>({r:6,style:{left:32-32*i+"%","animation-delay":-110*i+"ms"}})},lines:{dur:1e3,lines:8,fn:(a,i,e)=>({y1:14,y2:26,style:{transform:`rotate(${360/e*i+(i<e/2?180:-180)}deg)`,"animation-delay":a*i/e-a+"ms"}})},"lines-small":{dur:1e3,lines:8,fn:(a,i,e)=>({y1:12,y2:20,style:{transform:`rotate(${360/e*i+(i<e/2?180:-180)}deg)`,"animation-delay":a*i/e-a+"ms"}})},"lines-sharp":{dur:1e3,lines:12,fn:(a,i,e)=>({y1:17,y2:29,style:{transform:`rotate(${30*i+(i<6?180:-180)}deg)`,"animation-delay":a*i/e-a+"ms"}})},"lines-sharp-small":{dur:1e3,lines:12,fn:(a,i,e)=>({y1:12,y2:20,style:{transform:`rotate(${30*i+(i<6?180:-180)}deg)`,"animation-delay":a*i/e-a+"ms"}})}},Kk=(0,C.w$)(class extends C.wt{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.color=void 0,this.duration=void 0,this.name=void 0,this.paused=!1}getName(){const i=this.name||_e.c.get("spinner"),e=(0,_e.b)(this);return i||("ios"===e?"lines":"circular")}render(){var i;const e=this,t=(0,_e.b)(e),n=e.getName(),r=null!==(i=dE[n])&&void 0!==i?i:dE.lines,o="number"==typeof e.duration&&e.duration>10?e.duration:r.dur,l=[];if(void 0!==r.circles)for(let h=0;h<r.circles;h++)l.push(Zk(r,o,h,r.circles));else if(void 0!==r.lines)for(let h=0;h<r.lines;h++)l.push(eM(r,o,h,r.lines));return(0,C.h)(C.xr,{key:"9e08bf306b28bdd76884d353dcaaf31c1bb591f2",class:Jt(e.color,{[t]:!0,[`spinner-${n}`]:!0,"spinner-paused":e.paused||_e.c.getBoolean("_testing")}),role:"progressbar",style:r.elmDuration?{animationDuration:o+"ms"}:{}},l)}static get style(){return":host{display:inline-block;position:relative;width:28px;height:28px;color:var(--color);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.ion-color){color:var(--ion-color-base)}svg{-webkit-transform-origin:center;transform-origin:center;position:absolute;top:0;left:0;width:100%;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0)}:host-context([dir=rtl]) svg{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] svg{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){svg:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}:host(.spinner-lines) line,:host(.spinner-lines-small) line{stroke-width:7px}:host(.spinner-lines-sharp) line,:host(.spinner-lines-sharp-small) line{stroke-width:4px}:host(.spinner-lines) line,:host(.spinner-lines-small) line,:host(.spinner-lines-sharp) line,:host(.spinner-lines-sharp-small) line{stroke-linecap:round;stroke:currentColor}:host(.spinner-lines) svg,:host(.spinner-lines-small) svg,:host(.spinner-lines-sharp) svg,:host(.spinner-lines-sharp-small) svg{-webkit-animation:spinner-fade-out 1s linear infinite;animation:spinner-fade-out 1s linear infinite}:host(.spinner-bubbles) svg{-webkit-animation:spinner-scale-out 1s linear infinite;animation:spinner-scale-out 1s linear infinite;fill:currentColor}:host(.spinner-circles) svg{-webkit-animation:spinner-fade-out 1s linear infinite;animation:spinner-fade-out 1s linear infinite;fill:currentColor}:host(.spinner-crescent) circle{fill:transparent;stroke-width:4px;stroke-dasharray:128px;stroke-dashoffset:82px;stroke:currentColor}:host(.spinner-crescent) svg{-webkit-animation:spinner-rotate 1s linear infinite;animation:spinner-rotate 1s linear infinite}:host(.spinner-dots) circle{stroke-width:0;fill:currentColor}:host(.spinner-dots) svg{-webkit-animation:spinner-dots 1s linear infinite;animation:spinner-dots 1s linear infinite}:host(.spinner-circular) svg{-webkit-animation:spinner-circular linear infinite;animation:spinner-circular linear infinite}:host(.spinner-circular) circle{-webkit-animation:spinner-circular-inner ease-in-out infinite;animation:spinner-circular-inner ease-in-out infinite;stroke:currentColor;stroke-dasharray:80px, 200px;stroke-dashoffset:0px;stroke-width:5.6;fill:none}:host(.spinner-paused),:host(.spinner-paused) svg,:host(.spinner-paused) circle{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes spinner-fade-out{0%{opacity:1}100%{opacity:0}
1}@keyframes spinner-fade-out{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes spinner-scale-out{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}100%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}}@keyframes spinner-scale-out{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}100%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}}@-webkit-keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner-dots{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}50%{-webkit-transform:scale(0.4, 0.4);transform:scale(0.4, 0.4);opacity:0.3}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}}@keyframes spinner-dots{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}50%{-webkit-transform:scale(0.4, 0.4);transform:scale(0.4, 0.4);opacity:0.3}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}}@-webkit-keyframes spinner-circular{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-circular{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner-circular-inner{0%{stroke-dasharray:1px, 200px;stroke-dashoffset:0px}50%{stroke-dasharray:100px, 200px;stroke-dashoffset:-15px}100%{stroke-dasharray:100px, 200px;stroke-dashoffset:-125px}}@keyframes spinner-circular-inner{0%{stroke-dasharray:1px, 200px;stroke-dashoffset:0px}50%{stroke-dasharray:100px, 200px;stroke-dashoffset:-15px}100%{stroke-dasharray:100px, 200px;stroke-dashoffset:-125px}}"}},[1,"ion-spinner",{color:[513],duration:[2],name:[1],paused:[4]}]),Zk=(a,i,e,t)=>{const n=a.fn(i,e,t);return n.style["animation-duration"]=i+"ms",(0,C.h)("svg",{viewBox:n.viewBox||"0 0 64 64",style:n.style},(0,C.h)("circle",{transform:n.transform||"translate(32,32)",cx:n.cx,cy:n.cy,r:n.r,style:a.elmDuration?{animationDuration:i+"ms"}:{}}))},eM=(a,i,e,t)=>{const n=a.fn(i,e,t);return n.style["animation-duration"]=i+"ms",(0,C.h)("svg",{viewBox:n.viewBox||"0 0 64 64",style:n.style},(0,C.h)("line",{transform:"translate(32,32)",y1:n.y1,y2:n.y2}))},iM=function tM(){typeof customElements>"u"||["ion-spinner"].forEach(i=>{"ion-spinner"===i&&(customElements.get(i)||customElements.define(i,Kk))})},fg=a=>{const i=a.getTimezoneOffset();return a.setMinutes(a.getMinutes()-i),a};fg(new Date("2022T01:00")),fg(new Date("2022T13:00")),H(2104);const yn=["*"],lV=(a,i)=>{const e=a.prototype;i.forEach(t=>{Object.defineProperty(e,t,{get(){return this.el[t]},set(n){this.z.runOutsideAngular(()=>this.el[t]=n)},configurable:!0})})},cV=(a,i)=>{const e=a.prototype;i.forEach(t=>{e[t]=function(){const n=arguments;return this.z.runOutsideAngular(()=>this.el[t].apply(this.el,n))}})};function Sn(a){return function(e){const{defineCustomElementFn:t,inputs:n,methods:r}=a;return void 0!==t&&t(),n&&lV(e,n),r&&cV(e,r),e}}let hV=(()=>{let a=class{constructor(e,t,n){this.z=n,e.detach(),this.el=t.nativeElement,((a,i,e)=>{e.forEach(t=>a[t]=(0,zk.R)(i,t))})(this,this.el,["ionFocus","ionBlur"])}};return a.\u0275fac=function(e){return new(e||a)(c.rXU(c.gRc),c.rXU(c.aKT),c.rXU(c.SKi))},a.\u0275cmp=c.VBU({type:a,selectors:[["ion-button"]],inputs:{buttonType:"buttonType",color:"color",disabled:"disabled",download:"download",expand:"expand",fill:"fill",form:"form",href:"href",mode:"mode",rel:"rel",routerAnimation:"routerAnimation",routerDirection:"routerDirection",shape:"shape",size:"size",strong:"strong",target:"target",type:"type"},standalone:!0,features:[c.aNF],ngContentSelectors:yn,decls:1,vars:0,template:function(e,t){1&e&&(c.NAR(),c.SdG(0))},encapsulation:2,changeDetection:0}),a=(0,Pe.Cg)([Sn({defineCustomElementFn:Qk,inputs:["buttonType","color","disabled","download","expand","fill","form","href","mode","rel","routerAnimation","routerDirection","shape","size","strong","target","type"]})],a),a})(),dV=(()=>{let a=class{constructor(e,t,n){this.z=n,e.detach(),this.el=t.nativeElement}};return a.\u0275fac=function(e){return new(e||a)(c.rXU(c.gRc),c.rXU(c.aKT),c.rXU(c.SKi))}
1,a.\u0275cmp=c.VBU({type:a,selectors:[["ion-spinner"]],inputs:{color:"color",duration:"duration",name:"name",paused:"paused"},standalone:!0,features:[c.aNF],ngContentSelectors:yn,decls:1,vars:0,template:function(e,t){1&e&&(c.NAR(),c.SdG(0))},encapsulation:2,changeDetection:0}),a=(0,Pe.Cg)([Sn({defineCustomElementFn:iM,inputs:["color","duration","name","paused"]})],a),a})();const GV=["canvas"];function YV(a,i){1&a&&c.nrm(0,"ion-spinner",8)}function QV(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",9),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.cancelSnapshot())}),c.pXf(1,1),c.k0s(),c.j41(2,"button",10),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.saveSnapshot())}),c.pXf(3,2),c.k0s()}}let bp=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.destroyRef=(0,c.WQX)(c.abz),this.actions$=(0,c.WQX)(ye.En),this.canvas=(0,c.ebz)("canvas"),this.videoWidth=c.hFB.required({alias:"video-width"}),this.videoHeight=c.hFB.required({alias:"video-height"}),this.takingSnapshot=c.hFB.required({alias:"taking-snapshot"}),this.etiquettes=(0,ee.ot)(this.store.select(zS)),this.working=(0,c.vPA)(!1),this.fieldsEtiquette={text:"titre",value:"id"},this.etiquetteControl=new oe.MJ(null)}ngOnInit(){this.actions$.pipe((0,ye.gp)(Nm,Nd),(0,ee.pQ)(this.destroyRef)).subscribe(({type:t})=>{this.working.set(!1),this.store.dispatch("[Visite session] SNAPSHOT_FAILED"===t?new Xe.Actions.ShowSnackBar("Une erreur est survenue lors de la prise de photo. Veuillez r\xE9essayer",Xe.EnumSnackBarType.Echec):new Xe.Actions.ShowSnackBar("Photo enregistr\xE9e avec succ\xE8s",Xe.EnumSnackBarType.Succes)),this.etiquetteControl.reset()})}saveSnapshot(){this.working.set(!0);const t=this.canvas().nativeElement.toDataURL("image/jpeg"),n={};
1n[Jm().ExifIFD.DateTimeOriginal]=Q().parseZone(Q()()).utcOffset(0,!0).format("YYYY:MM:DD HH:mm:ss");const r={Exif:n},o=Jm().dump(r),h=Jm().insert(o,t).replace("data:image/jpeg;base64,","");this.store.dispatch(JS({payload:{etiquetteId:this.etiquetteControl.value,blob:h}}))}cancelSnapshot(){this.store.dispatch(Gd())}onFilteringEtiquette(t){let n=new x.XK;n=""!==t.text?n.where("titre","contains",t.text,!0):n,t.updateData(this.etiquettes(),n)}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-snapshot"]],viewQuery:function(t,n){1&t&&c.wEZ(n.canvas,GV,5),2&t&&c.NyB()},inputs:{videoWidth:[c.Mj6.SignalBased,"video-width","videoWidth"],videoHeight:[c.Mj6.SignalBased,"video-height","videoHeight"],takingSnapshot:[c.Mj6.SignalBased,"taking-snapshot","takingSnapshot"]},standalone:!0,features:[c.aNF],decls:8,vars:12,consts:()=>{let e,t,n,r;return e="Rechercher",t="\xC9tiquette",n=" Annuler",r="Enregistrer",[["canvas",""],n,r,[1,"snapshot-window"],["id","canvasRemotePreview",2,"max-width","100%",3,"width","height"],[1,"visite-photo-list-wrapper",2,"width","50%"],["filterBarPlaceholder",e,"placeholder",t,"floatLabelType","Auto",3,"filtering","ignoreAccent","formControl","dataSource","showClearButton","allowFiltering","fields","readonly"],[1,"space-around"],["name","dots"],["mat-flat-button","",1,"custom-button-standard","custom-button-stroked",3,"click"],["mat-flat-button","",1,"custom-button-standard","custom-button-full",3,"click"]]},template:function(t,n){if(1&t){const r=c.RV6();c.j41(0,"div",3),c.nrm(1,"canvas",4,0),c.j41(3,"div",5)(4,"ejs-dropdownlist",6),c.bIt("filtering",function(l){return c.eBV(r),c.Njj(n.onFilteringEtiquette(l))}),c.k0s()(),c.j41(5,"div",7),c.DNE(6,YV,1,0,"ion-spinner",8)(7,QV,4,0),c.k0s()()}2&t&&(c.AVh("invisible",!n.takingSnapshot()),c.R7$(),c.Y8G("width",n.videoWidth())("height",n.videoHeight()),c.R7$(3),c.Y8G("ignoreAccent",!0)("formControl",n.etiquetteControl)("dataSource",n.etiquettes())("showClearButton",!0)("allowFiltering",!0)("fields",n.fieldsEtiquette)("readonly",n.working()),c.R7$(2),c.vxM(6,n.working()?6:7))},dependencies:[Qe.MD,$t.Hl,$t.$z,Dd,Bi,oe.X1,oe.BC,oe.l_,dV],encapsulation:2}),i})();var Na=H(66560),JV=H(65245),Ht=H(53993),zt=H(18810);let KV=(()=>{var a;class i{constructor(){this.actions$=(0,c.WQX)(ye.En),this.store=(0,c.WQX)(O.il),this.visiteService=(0,c.WQX)(Pi),this.twilioVideoService=(0,c.WQX)(be.Z7),this.fileService=(0,c.WQX)(WC.E),this.destroyRef=(0,c.WQX)(c.abz),this.setPseudo$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Xd),(0,JV.i)(1),(0,Ht.E)(this.store.select(WS),this.store.select(Ia)),(0,ai.M)(([{payload:t},n])=>t===n?localStorage.removeItem("tli-pseudo"):localStorage.setItem("tli-pseudo",t)),(0,ue.T)(([{payload:t},,n])=>bn({id:n,payload:{key:"pseudo",value:t}})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.visiteDemarrerSession$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(cC),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([,t])=>mc({payload:{id:t.id,statutId:pe.CG.Demarree,isFromSessionVisite:!0}})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.visiteJoindreSession$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(hC),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([,t])=>mc({payload:{id:t.id,statutId:pe.CG.EnCours,isFromSessionVisite:!0}})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.visiteTerminerSession$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(dC),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([,t])=>mc({payload:{id:t.id,statutId:pe.CG.Terminee,isFromSessionVisite:!0}})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.visiteAnnulerSession$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(pC),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([t,n])=>mc({payload:{id:n.id,statutId:pe.CG.Annulee,isFromSessionVisite:!0,raisonAnnulation:t.payload}})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.updateStatutVisite$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(mc),(0,ue.T)(t=>t.payload),(0,ii.n)(({id:t,statutId:n,isFromSessionVisite:r,raisonAnnulation:o})=>this.visiteService.updateStatutVisite(t,n,r,o)),(0,ue.T)(t=>"OK"===t.code?GS({payload:t.data.statutId}):YS()),(0,St.W)(()=>(0,nr.of)(YS())))),this.updateStatutVisiteSuccess$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(GS),(0,ue.T)(t=>t.payload),(0,ue.T)(t=>bc({payload:t})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.saveConversationV2$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(QS),(0,ue.T)(t=>t.payload),(0,Ht.E)(this.store.select(Ot),this.store.select(Ia)),(0,ii.n)(([t,{id:n},r])=>this.visiteService.saveInspectionConversation(n,{author:r,message:t})),(0,ue.T)(t=>Rd({payload:t.data.conversations})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.changeMessagesReadStatus$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(oC),(0,ue.T)(t=>t.payload),(0,ii.n)(t=>this.visiteService.changeMessagesReadStatus(t)),(0,ue.T)(()=>sP()),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.switchMicrophoneMute$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Wd),(0,Ht.E)(this.store.select(uc)),(0,ue.T)(([,t])=>t),(0,ai.M)(t=>t?this.twilioVideoService.disableLocalAudioTrack():this.twilioVideoService.enableLocalAudioTrack()),(0,St.W)(t=>(0,zt.$)(()=>t)),(0,Ht.E)(this.store.select(Ia)),(0,ue.T)(([t,n])=>bn({id:n,payload:{key:"microphoneMute",value:t}})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.switchCameraMute$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)($d),(0,Ht.E)(this.store.select(fc)),(0,ue.T)(([,t])=>t),(0,ai.M)(t=>t?this.twilioVideoService.disableLocalVideoTrack():this.twilioVideoService.enableLocalVideoTrack()),(0,Ht.E)(this.store.select(Ia)),(0,ue.T)(([t,n])=>bn({id:n,payload:{key:"cameraMute",value:t}})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.parleurLevelChanged$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Ud,SC,yC),(0,Ht.E)(this.store.select(km),this.store.select(JA)),(0,ue.T)(([,t,n])=>({isMute:t,volume:n})),(0,ai.M)(t=>this.twilioVideoService.changeVolumeParleur(t.isMute?0:t.volume)),(0,St.W)(t=>(0,zt.$)(()=>t))),{dispatch:!1}),this.recordingAccepted$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(vC),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([{payload:t},n])=>({id:n.id,accepted:t})),(0,ai.M)(({id:t,accepted:n})=>this.visiteService.updateVisiteSessionRecordAccord(t,n).pipe((0,ee.pQ)(this.destroyRef)).subscribe()),(0,ue.T)(({accepted:t})=>Sc({payload:t})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.recordingAcceptedSuccess$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Sc),(0,Ht.E)(this.store.select(pc)),(0,rr.p)(([{payload:t},n])=>!t&&n),(0,ue.T)(()=>Xm()),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.switchRecording$=(0,ye.EH)(()=>
1this.actions$.pipe((0,ye.gp)(jm),(0,Ht.E)(this.store.select(pc)),(0,ue.T)(([,t])=>t?Xm():bC()),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.recordingStateChanged$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(bC,Xm),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([t,n])=>({id:n.id,recording:"[Visite session] RECORDING_STARTED"===t.type})),(0,ai.M)(({id:t,recording:n})=>{localStorage.setItem("confEnreg",JSON.stringify({visId:t,recording:n}))}),(0,ai.M)(({id:t,recording:n})=>this.visiteService.updateVisiteSessionRecordState(t,n).pipe((0,ee.pQ)(this.destroyRef)).subscribe()),(0,ue.T)(({recording:t})=>xa({payload:t})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.savingSnapshot$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(JS),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([t,n])=>({id:n.id,props:t.payload})),(0,ii.n)(({id:t,props:n})=>this.visiteService.publishVisiteSessionSnapshot(t,n).pipe((0,ue.T)(r=>Nd({payload:r})),(0,St.W)(()=>(0,nr.of)(Nm())))))),this.snapshotSucceed$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Nd,Nm),(0,ue.T)(()=>Gd()))),this.validateConnexionDemande$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(yc),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([t,n])=>({id:n.id,response:t.payload})),(0,ai.M)(()=>this.store.dispatch(uC())),(0,ii.n)(({id:t,response:n})=>this.visiteService.notificationActionValidation(t,n)),(0,St.W)(t=>(0,zt.$)(()=>t))),{dispatch:!1}),this.toggleSidePanelDocuments$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(vc),(0,rr.p)(({payload:t})=>"documents"===t||"photos"===t),(0,Oa.s)(1),(0,Ht.E)(this.store.select(Ot)),(0,ii.n)(([,{id:t}])=>this.visiteService.fetchVisiteDocuments(t)),(0,ue.T)(t=>Bd({payload:t})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.savingSnapshotEtiquette$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(KS),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([{payload:t},{id:n}])=>({id:n,...t})),(0,ai.M)(({id:t,docId:n,etiquetteId:r})=>this.visiteService.upsertSessionSnapshotEtiquette(t,n,r).pipe((0,ee.pQ)(this.destroyRef)).subscribe({next:()=>this.store.dispatch(new Na.ShowSnackBar("\xC9tiquette enregistr\xE9e avec succ\xE8s",Xe.EnumSnackBarType.Succes)),error:()=>this.store.dispatch(new Na.ShowSnackBar("L'\xE9tiquette n'a pas pu \xEAtre sauvegard\xE9e, veuillez r\xE9essayer",Xe.EnumSnackBarType.Echec))})),(0,ue.T)(({docId:t,etiquetteId:n})=>ZS({payload:{docId:t,etiquetteId:n}})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.deletingSessionDocument$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Vd),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([{payload:t},{id:n}])=>({id:n,docId:t})),(0,ai.M)(({id:t,docId:n})=>this.visiteService.deleteSessionDocument(t,n).pipe((0,ee.pQ)(this.destroyRef)).subscribe({next:()=>this.store.dispatch(new Na.ShowSnackBar("Photo supprim\xE9e avec succ\xE8s",Xe.EnumSnackBarType.Succes)),error:()=>this.store.dispatch(new Na.ShowSnackBar("La photo n'a pas pu \xEAtre sauvegard\xE9e, veuillez r\xE9essayer",Xe.EnumSnackBarType.Echec))})),(0,ue.T)(({docId:t})=>gc({payload:t})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.saveVisiteSessionDocument$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Fd),(0,ai.M)(({payload:t})=>this.store.dispatch(Vm({payload:t}))),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([{payload:t},{id:n}])=>({id:n,typDocId:t.typDocId,document:t.document})),(0,ai.M)(({id:t,typDocId:n,document:r})=>{const o=n===pe.OL.PartagePhotoCitoyen?"Photo partag\xE9e avec succ\xE8s":"Fichier partag\xE9 avec succ\xE8s",l=n===pe.OL.PartagePhotoCitoyen?"Photo partag\xE9e non enregistr\xE9e, veuillez r\xE9essayer":"Fichier partag\xE9 non enregistr\xE9, veuillez r\xE9essayer";this.visiteService.insertVisiteSessionDocument(t,r.id,n).pipe((0,ee.pQ)(this.destroyRef)).subscribe({next:()=>this.store.dispatch(new Na.ShowSnackBar(o,Xe.EnumSnackBarType.Succes)),error:()=>this.store.dispatch(new Na.ShowSnackBar(l,Xe.EnumSnackBarType.Echec))})}),(0,ue.T)(({typDocId:t})=>tC({payload:t})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.citoyenSessionDocumentShared$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(eC),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([{payload:t},{id:n}])=>({id:n,docId:t})),(0,ii.n)(({id:t,docId:n})=>this.visiteService.getVisiteDocument(t,n)),(0,ue.T)(t=>
1Vm({payload:{typDocId:t.typDocId,document:{id:t.id,url:t.url,filePath:t.filePath,nameNewAdd:t.nameNewAdd}}})),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.videoDeviceChanged$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(_c,qd),(0,Ht.E)(this.store.select(Dm),this.store.select(Mm),this.store.select(Ta)),(0,ue.T)(([,t,n,r])=>({deviceId:t,mode:n,plateform:r})),(0,ii.n)(({deviceId:t,mode:n,plateform:r})=>this.twilioVideoService.videoDeviceChanged(t,n,r)),(0,ue.T)(()=>aP()),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.audioDeviceChanged$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Cc),(0,Ht.E)(this.store.select(Pm)),(0,ue.T)(([,t])=>({deviceId:t})),(0,ii.n)(({deviceId:t})=>this.twilioVideoService.audioDeviceChanged(t)),(0,ue.T)(()=>OC()),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.parleurDeviceChanged$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Ec),(0,Ht.E)(this.store.select(Am)),(0,ue.T)(([,t])=>({deviceId:t})),(0,ii.n)(({deviceId:t})=>this.twilioVideoService.parleurDeviceChanged(t)),(0,ue.T)(()=>lP()),(0,St.W)(t=>(0,zt.$)(()=>t)))),this.changeBackgroun
1dImage$=(0,ye.EH)(()=>this.actions$.pipe((0,ye.gp)(Yd),(0,Ht.E)(this.store.select(Ot)),(0,ue.T)(([{payload:t},{inspecteur:n}])=>({...t,inspId:n.id})),(0,ai.M)(({id:t,inspId:n})=>this.visiteService.updateInspecteurArrierePlan(n,t).subscribe()),(0,ii.n)(({url:t})=>t.includes("none.jpg")?(this.twilioVideoService.removeLocalTrackBackgroungImage(),(0,nr.of)()):t.includes("blur.jpg")?this.twilioVideoService.changeLocalTrackBackgroungImage({type:"blur"}):this.fileService.getBase64FromUrl(t).pipe((0,ii.n)(n=>this.twilioVideoService.changeLocalTrackBackgroungImage({type:"image",base64:n}))))),{dispatch:!1}),this.networkQualityLevel$=(0,ye.EH)(()=>this.twilioVideoService.networkQualityLevel$.pipe((0,ee.pQ)(this.destroyRef),(0,ue.T)(t=>AC({payload:t})),(0,St.W)(t=>(0,zt.$)(()=>t))))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275prov=c.jDH({token:a,factory:a.\u0275fac}),i})();const yp={HALL:"hall",ROOM:"room",TERMINUS:"terminus"},r_={CHAT:"chat",PARAMETRES:"parametres",PARTICIPANTS:"participants",NOTES:"notes",PHOTOS:"photos",BACKGROUND_IMAGES:"background-images",DOCUMENTS:"documents"};function Ar(a){const i=a.split(":");return{role:i[0],id:i[1],pseudo:i[2]}}var or=function(a){return a.Connection="connection",a.ConnexionInspection="connexion-inspection",a.ConnexionResponse="connexion-response",a.DisconnectDevices="disconnect-devices",a.UpdateStatut="visite-statut",a.ChatMessage="visite-push-message",a.UploadSnapshot="visite-upload-snapshot",a.PhotoCitoyen="visite-photo-citoyen",a.GeoreferenceUpdate="visite-georeference-update",a.StatutEnregistrementVisite="visite-enregistrement",a.CitoyenEnregistrementVisite="citoyen-enregistrement-visite",a}(or||{});const ZV=a=>{switch(a){case 2e5:return "La prise de rendez-vous ne peut \xEAtre compl\xE9t\xE9e. L'inspection de votre propri\xE9t\xE9 a \xE9t\xE9 annul\xE9e.";case 200001:return "La plage horaire selectionn\xE9e n'est plus disponible. Veuillez choisir une autre plage.";default:return "Veuillez r\xE9essayer plus tard, prise de rendez-vous impossible pour l'instant."}},e2=(0,O.vy)(null,(0,O.on)(aC,()=>yp.HALL),(0,O.on)(lC,()=>yp.ROOM),(0,O.on)(zd,()=>yp.TERMINUS)),n2=(0,O.vy)([],(0,O.on)(Bm,(a,{payload:i})=>[...a,i]),(0,O.on)(fC,(a,{payload:i})=>a.filter(e=>e.id!==i)),(0,O.on)(bn,(a,{id:i,payload:{key:e,value:t}})=>a.map(n=>n.id===i?{...n,[e]:t}:n))),s2=(0,O.vy)([],(0,O.on)(Fm,(a,{payload:i})=>[{pseudo:i}]),(0,O.on)(uC,()=>[])),a2=(0,O.vy)(1,(0,O.on)(SC,(a,{payload:i})=>i)),c2=(0,O.vy)([],(0,O.on)(rC,(a,{payload:i})=>i)),d2=(0,O.vy)(null,(0,O.on)(Hm,(a,{payload:i})=>i)),u2=(0,O.vy)(null,(0,O.on)(Xd,(a,{payload:i})=>i)),m2=(0,O.vy)(null,(0,O.on)(sC,(a,{payload:i})=>i),(0,O.on)(Yd,(a,{payload:{id:i}})=>i)),v2=(0,O.vy)([],(0,O.on)(nC,(a,{payload:i})=>i)),y2=(0,O.vy)([],(0,O.on)(Bd,(a,{payload:i})=>i.filter(e=>e.typDocId===pe.OL.PartagePhotoCitoyen)),(0,O.on)(gc,(a,{payload:i})=>a.filter(e=>e.id!==i)),(0,O.on)(Vm,(a,{payload:i})=>{if(i.typDocId===pe.OL.PartagePhotoCitoyen){const e=[...a];return e.push({id:i.document.id,typDocId:pe.OL.PartagePhotoCitoyen,etiquettes:[],key:i.document.filePath,url:i.document.url,dateCreation:new Date}),e}return a})),C2=(0,O.vy)([],(0,O.on)(Bd,(a,{payload:i})=>i.filter(e=>e.typDocId===pe.OL.PartageFichierCitoyen)),(0,O.on)(gc,(a,{payload:i})=>a.filter(e=>e.id!==i)),(0,O.on)(Fd,(a,{payload:i})=>{if(i.typDocId===pe.OL.PartageFichierCitoyen){const e=[...a];return e.push({id:i.document.id,typDocId:pe.OL.PartageFichierCitoyen,key:i.document.filePath,url:i.document.url,dateCreation:new Date,filePath:i.document.filePath,nameNewAdd:i.document.nameNewAdd,isFromDB:!1}),e}return a})),_2=(0,O.vy)([],(0,O.on)(Bd,(a,{payload:i})=>i.filter(e=>e.typDocId===pe.OL.PhotoInspecteur)),(0,O.on)(Nd,(a,{payload:i})=>[...a,i]),(0,O.on)(gc,(a,{payload:i})=>a.filter(e=>e.id!==i)),(0,O.on)(ZS,(a,{payload:{docId:i,etiquetteId:e}})=>a.map(t=>t.id===i?{...t,etiquetteId:e}:t))),I2=(0,O.vy)(null,(0,O.on)(vc,(a,{payload:i})=>i===a?null:i)),w2=(0,O.vy)([],(0,O.on)(iC,(a,{payload:i})=>i)),A2=(0,O.vy)(null,(0,O.on)(Hd,(a,{payload:i})=>i)),D2=(0,O.vy)([],(0,O.on)(Rd,(a,{payload:i})=>i)),M2=(0,O.vy)(null,(0,O.on)(bc,(a,{payload:i})=>i)),R2=(0,O.vy)(null,(0,O.on)(mC,(a,{payload:i})=>i)),s_=(0,O.vy)(null,(0,O.on)(jd,(a,{payload:i})=>i)),V2=(0,O.vy)(null,(0,O.on)(zm,(a,{payload:i})=>i)),B2=(0,O.vy)(!1,(0,O.on)(oP,(a,{payload:i})=>i)),z2=(0,O.vy)(!1,(0,O.on)(gC,(a,{payload:i})=>i)),j2=(0,O.vy)(!1,(0,O.on)(Sc,(a,{payload:i})=>i)),W2=(0,O.vy)(!1,(0,O.on)(xa,(a,{payload:i})=>i)),q2=(0,O.vy)(!1,(0,O.on)(Ud,a=>!a)),Y2=(0,O.vy)(!1,(0,O.on)(Wd,a=>!a)),J2=(0,O.vy)(!1,(0,O.on)($d,a=>!a)),Z2=(0,O.vy)(null,(0,O.on)(Um,(a,{payload:i})=>i)),t4=(0,O.vy)(null,(0,O.on)(CC,(a,{payload:i})=>i)),n4=(0,O.vy)(null,(0,O.on)(EC,(a,{payload:i})=>i)),s4=(0,O.vy)([],(0,O.on)(IC,(a,{payload:i})=>i)),a4=(0,O.vy)(null,(0,O.on)(Cc,(a,{payload:i})=>i)),c4=(0,O.vy)([],(0,O.on)(xC,(a,{payload:i})=>i)),d4=(0,O.vy)(null,(0,O.on)(Ec,(a,{payload:i})=>i)),u4=(0,O.vy)([],(0,O.on)(wC,(a,{payload:i})=>i)),m4=(0,O.vy)(null,(0,O.on)(_c,(a,{payload:i})=>i)),v4=(0,O.vy)("user",(0,O.on)(qd,a=>"user"===a?"environment":"user")),y4=(0,O.vy)(0,(0,O.on)(TC,(a,{payload:i})=>i),(0,O.on)(_C,a=>++a)),C4=(0,O.vy)(!1,(0,O.on)(Wm,(a,{payload:i})=>i)),_4=(0,O.vy)(!1,(0,O.on)(Gd,a=>!a)),I4=(0,O.vy)(!1,(0,O.on)(wa,a=>!a)),w4=(0,O.vy)(5,(0,O.on)(AC,(a,{payload:i})=>i)),A4={lobby:function t2(a,i){return e2(a,i)},role:function N2(a,i){return R2(a,i)},plateform:function F2(a,i){return V2(a,i)},statutVisite:function L2(a,i){return M2(a,i)},sideMenu:function x2(a,i){return I2(a,i)},reconnecting:function H2(a,i){return B2(a,i)},disconnected:function X2(a,i){return z2(a,i)},recording:function $2(a,i){return W2(a,i)},screenSharing:function x4(a,i){return I4(a,i)},takingSnapshot:function T4(a,i){return _4(a,i)},recordingAccepted:function U2(a,i){return j2(a,i)},cameraMute:function K2(a,i){return J2(a,i)},microphoneMute:function Q2(a,i){return Y2(a,i)},parleurMute:function G2(a,i){return q2(a,i)},cameraMode:function b4(a,i){return v4(a,i)},visiteInfos:function e4(a,i){return Z2(a,i)},messageAideCitoyen:function i4(a,i){return t4(a,i)},messageInspecteur:function r4(a,i){return n4(a,i)},audioDeviceId:function l4(a,i){return a4(a,i)},parleurDeviceId:function p4(a,i){return d4(a,i)},videoDeviceId:function g4(a,i){return m4(a,i)},audioDevices:function o4(a,i){return s4(a,i)},parleurDevices:function h4(a,i){return c4(a,i)},videoDevices:function f4(a,i){return u4(a,i)},unreadMessages:function S4(a,i){return y4(a,i)},unreadDocuments:function E4(a,i){return C4(a,i)},dateDemarrage:s_,conversations:function k2(a,i){return D2(a,i)},intervenants:function r2(a,i){return n2(a,i)},connexionDemandes:function o2(a,i){return s2(a,i)},coords:function p2(a,i){return d2(a,i)},notes:function O2(a,i){return w2(a,i)},currentNote:function P2(a,i){return A2(a,i)},etiquettes:function b2(a,i){return v2(a,i)},photoPartagees:function S2(a,i){return y2(a,i)},fichierPartages:function E2(a,i){return C2(a,i)},photoPrises:function T2(a,i){return _2(a,i)},backgroundImages:function h2(a,i){return c2(a,i)}
1,currentBackgroundImageId:function g2(a,i){return m2(a,i)},parleurVolume:function l2(a,i){return a2(a,i)},pseudo:function f2(a,i){return u2(a,i)},networkQualityLevel:function O4(a,i){return w4(a,i)}};var o_=H(28528);let P4=(()=>{var a;class i{constructor(){this.visiteService=(0,c.WQX)(Pi),this.router=(0,c.WQX)(Bn.Ix),this.store=(0,c.WQX)(O.il),this.visite=(0,ee.ot)(this.store.select(Ot)),this.uploadPhotoPath=(0,c.EWP)(()=>`_visite/post-visite/${this.visite().id}/photos`),this.uploadFichierPath=(0,c.EWP)(()=>`_visite/post-visite/${this.visite().id}/fichiers-divers`),this.EnumTypeDocumentVisiteId=pe.OL}backVisiteTermine(){this.router.navigate([`teleinspection/citoyen/${this.visite().id}`])}onUploadSuccess(t,n){this.store.dispatch(Fd({payload:{typDocId:n,document:t}}))}onRemoveFileSuccess(t){this.store.dispatch(Vd({payload:t.id}))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-ajout-fichier-tli"]],decls:21,vars:6,consts:()=>{let e,t,n,r,o;return e="Retour",t="Ajouter des fichiers",n=" Merci d'ajouter les photographies ou vid\xE9os que vous souhaitez inclure dans votre dossier de propri\xE9t\xE9 ",r="Photo(s)",o="Autre type de fichier(s)",[e,t,n,r,o,["id","ajout-fichier"],[1,"main-page-container","visite",2,"overflow-y","auto"],[1,"standard-page-content"],[1,"back-button",2,"background-color","transparent","margin-bottom","20px",3,"click"],[1,"icon-left-arrow"],[1,"flat-window-container"],[1,"flat-window"],[1,"flat-window-title"],[1,"flat-window-content"],[2,"margin-bottom","0px"],["accept","image/*",1,"primary-file-upload",3,"uploadSuccess","removeSuccess","multiple","uploadPath","isPublic"],[1,"primary-file-upload",3,"uploadSuccess","removeSuccess","multiple","uploadPath","isPublic"]]},template:function(t,n){1&t&&(c.j41(0,"ion-content",5)(1,"div",6)(2,"div",7)(3,"button",8),c.bIt("click",function(){return n.backVisiteTermine()}),c.nrm(4,"i",9),c.j41(5,"span"),c.pXf(6,0),c.k0s()(),c.j41(7,"div",10)(8,"div",11)(9,"div",12)(10,"h4"),c.pXf(11,1),c.k0s()(),c.j41(12,"div",13)(13,"span"),c.pXf(14,2),c.k0s(),c.j41(15,"p",14),c.pXf(16,3),c.k0s(),c.j41(17,"vplus-file-uploader",15),c.bIt("uploadSuccess",function(o){return n.onUploadSuccess(o,n.EnumTypeDocumentVisiteId.PartagePhotoCitoyen)})("removeSuccess",function(o){return n.onRemoveFileSuccess(o)}),c.k0s(),c.j41(18,"p"),c.pXf(19,4),c.k0s(),c.j41(20,"vplus-file-uploader",16),c.bIt("uploadSuccess",function(o){return n.onUploadSuccess(o,n.EnumTypeDocumentVisiteId.PartageFichierCitoyen)})("removeSuccess",function(o){return n.onRemoveFileSuccess(o)}),c.k0s()()()()()()()),2&t&&(c.R7$(17),c.Y8G("multiple",!0)("uploadPath",n.uploadPhotoPath)("isPublic",!1),c.R7$(3),c.Y8G("multiple",!0)("uploadPath",n.uploadFichierPath)("isPublic",!1))},dependencies:[o_.e,Et.W9],styles:["@media only screen and (max-width: 600px){  .primary-file-upload-overflowContainer .mat-mdc-button .mdc-button__label{font-size:x-small}  .e-upload .e-file-select-wrap .e-file-drop, .e-bigger.e-small[_ngcontent-%COMP%]   .e-upload[_ngcontent-%COMP%]   .e-file-select-wrap[_ngcontent-%COMP%]   .e-file-drop[_ngcontent-%COMP%]{font-size:x-small}  .e-upload .e-upload-files .e-upload-file-list .e-file-container, .e-bigger.e-small[_ngcontent-%COMP%]   .e-upload[_ngcontent-%COMP%]   .e-upload-files[_ngcontent-%COMP%]   .e-upload-file-list[_ngcontent-%COMP%]   .e-file-container[_ngcontent-%COMP%]{font-size:x-small}}"]}),i})();const D4="Votre prise de rendez-vous en cours sera perdue. \xCAtes-vous s\xFBr de vouloir quitter?",Rg=a=>{if(null==a||!a.hasUnsavedChanges)return!0;if("function"==typeof(null==a?void 0:a.confirmLeave))return a.confirmLeave();const i=window.confirm(D4);var e;return i&&(null==a||null===(e=a.onLeaveConfirmed)||void 0===e||e.call(a)),i};class M4{constructor(i,e){this._document=e;const t=this._textarea=this._document.createElement("textarea"),n=t.style;n.position="fixed",n.top=n.opacity="0",n.left="-999em",t.setAttribute("aria-hidden","true"),t.value=i,t.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(t)}copy(){const i=this._textarea;let e=!1;try{if(i){const t=this._document.activeElement;i.select(),i.setSelectionRange(0,i.value.length),e=this._document.execCommand("copy"),t&&t.focus()}}catch{}return e}destroy(){const i=this._textarea;i&&(i.remove(),this._textarea=void 0)}}let L4=(()=>{var a;class i{constructor(t){this._document=t}copy(t){const n=this.beginCopy(t),r=n.copy();return n.destroy(),r}beginCopy(t){return new M4(t,this._document)}}return(a=i).\u0275fac=function(t){return new(t||a)(c.KVO(Qe.qQ))}
1,a.\u0275prov=c.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}),i})();function R4(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",6),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.copyToClipboard())}),c.EFF(1),c.k0s(),c.j41(2,"ion-button",7),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.copyToClipboard())}),c.EFF(3),c.k0s()}if(2&a){const e=c.XpG(2);c.R7$(),c.JRh(e.data().url),c.R7$(2),c.SpI(" ",e.data().buttonText," ")}}function N4(a,i){if(1&a&&c.nrm(0,"div",4),2&a){const e=c.XpG(2);c.Y8G("innerHtml",e.data().otherTextMessage,c.npT)}}function V4(a,i){if(1&a&&c.nrm(0,"ul",5),2&a){const e=c.XpG(2);c.Y8G("innerHtml",e.data().otherTextOs,c.npT)}}function F4(a,i){if(1&a&&c.nrm(0,"div",4),2&a){const e=c.XpG(2);c.Y8G("innerHtml",e.data().otherTextMessageWithTel,c.npT)}}function B4(a,i){if(1&a){const e=c.RV6();c.nrm(0,"vplus-mobile-header",0),c.j41(1,"ion-content",1),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.onContentClick())}),c.j41(2,"div",2),c.nrm(3,"h1",3)(4,"div",4),c.DNE(5,R4,4,2)(6,N4,1,1,"div",4)(7,V4,1,1,"ul",5)(8,F4,1,1,"div",4),c.k0s()()}if(2&a){const e=c.XpG();c.Y8G("headerTitle","")("returnButtonType","home-button")("menuId","navigateurIncompatible"),c.R7$(),c.AVh("filter-searche-global-active",e.selectIsSearchHeaderVisible()),c.R7$(2),c.Y8G("innerHtml",e.data().title,c.npT),c.R7$(),c.Y8G("innerHtml",e.data().htmlContent,c.npT),c.R7$(),c.vxM(5,e.data().browserRecommande&&!e.data().isWebView?5:-1),c.R7$(),c.vxM(6,e.data().isWebView?6:-1),c.R7$(),c.vxM(7,e.data().otherTextOs?7:-1),c.R7$(),c.vxM(8,e.data().otherTextMessageWithTel?8:-1)}}let H4=(()=>{var a;class i{constructor(){this.location=(0,c.WQX)(Qe.aZ),this.store=(0,c.WQX)(O.il),this.clipboard=(0,c.WQX)(L4),this.router=(0,c.WQX)(Bn.Ix),this.selectIsSearchHeaderVisible=(0,ee.ot)(this.store.select(Xe.selectIsSearchHeaderVisible)),this.data=(0,c.vPA)(null)}ngOnInit(){var t;const n=null===(t=this.router.getCurrentNavigation())||void 0===t||null===(t=t.extras.state)||void 0===t?void 0:t.dataContent;n?this.data.set(n):this.location.back()}onContentClick(){this.store.dispatch(Xe.Actions.setIsSearchHeaderVisible({payload:!1}))}copyToClipboard(){this.data().url&&(this.clipboard.copy(this.data().url),this.store.dispatch(new Xe.Actions.ShowSnackBar("Contenu copi\xE9 !")))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-navigateur-incompatible"]],decls:1,vars:1,consts:[[1,"hide-desktop","mobile-header",3,"headerTitle","returnButtonType","menuId"],["id","navigateurIncompatible",3,"click"],[1,"main-page-container","standard-page-content","max-720"],[1,"margin-bottom-2",3,"innerHtml"],[3,"innerHtml"],[1,"margin-bottom-10","margin-top-10",3,"innerHtml"],["mat-ripple","",1,"pastable-link","margin-bottom-2",3,"click"],["mode","md","expand","block",1,"ion-custom-button-standard","ion-custom-button-full",3,"click"]],template:function(t,n){1&t&&c.DNE(0,B4,9,11),2&t&&c.vxM(0,n.data()?0:-1)},dependencies:[Aa.r6,Tc.f,Et.Jm,Et.W9],encapsulation:2}),i})();var Ng=H(50154),Vg=H(84572);const z4={ChoixPlage:"Choix de plage horaire",Action:"Action",CodeInvitation:"Code d'invitation",ContactInfos:"Informations de contact",Confirmation:"Confirmation",ContactDispos:"Votre disponibilit\xE9",Verification:"V\xE9rification"},a_=Object.values({Fr:{label:"Fran\xE7ais",value:"6026D299-6F2B-C145-B3F2-3647EB51DA5F"},Ang:{label:"Anglais",value:"F29369CA-0C03-DF40-A59B-1872897404F6"}});var Fg=H(89549),X4=H(97457),j4=H(37403),Sp=H(36013),wo=H(75824),U4=H(87748),kc=H(84412),Va=H(53387),Pr=H(56977),Mc=H(373);function W4(a,i){1&a&&c.nrm(0,"ion-spinner",17)}let $4=(()=>{var a;class i extends be.dI{set citoyen(t){this.citoyenSubject.next(t)}set visite(t){this.visitesSubject.next(t)}constructor(t,n,r,o,l,h){super(),this.appConfig=t,this.dialog=n,this.rendezvousService=r,this.store=o,this.visiteService=l,this.localisationService=h,this.previous=new c.bkB,this.next=new c.bkB,this.motA=" \xE0 ",this.currentLocalisation=this.localisationService.getCurrentLocalisation(),this.citoyenSubject=new kc.t(null),this.visitesSubject=ne
1w kc.t(null)}ngOnInit(){this.citoyenResume$=this.citoyenSubject.pipe((0,rr.p)(t=>!!t),(0,ue.T)(t=>{let n=null,r=null;const o=t.telephones.find(d=>d.typTelId===Va._m.Fixe.value),l=t.telephones.find(d=>d.typTelId===Va._m.Mobile.value);return o&&(r=Ng.Ay.createMask(this.appConfig.appConfig.telMaskObjet).resolve(o.numero)),l&&(n=Ng.Ay.createMask(this.appConfig.appConfig.telMaskObjet).resolve(l.numero)),{nom:t.nom,prenom:t.prenom,courriel:t.courriel,telephoneMobileFormat:n,telephoneFixeFormat:r,langue:a_.filter(d=>d.value===t.langCom)[0].label}})),this.visiteResume$=(0,Vg.z)([this.visitesSubject.asObservable().pipe((0,rr.p)(t=>!!t)),this.visiteService.fetchInspecteurs()]).pipe((0,ue.T)(([t,n])=>{const r="fr"!==this.currentLocalisation?"h:mma":"H:mm",o="fr"!==this.currentLocalisation?"MMMM DD, yyyy":"DD MMMM yyyy";return{date:Q()(t.startDate).format(o),heureDebut:Q()(t.startDate).format(r),heureFin:Q()(t.endDate).format(r),inspecteur:n.find(l=>l.id===t.inspecteurId).nomComplet}}))}stepperPrevious(){this.previous.emit()}stepperNext(){this.isSubmitting=!0;const t=this.citoyenSubject.value,n=this.visitesSubject.value;n.note=this.noteCitoyen.trim()?this.noteCitoyen:null,this.visiteService.saveInspectionReservation(t,n).pipe((0,ii.n)(r=>r.errorCode>0?(this.isSubmitting=!1,this.dialog.open(Mc.V,{data:{title:"Impossible de confirmer",content:ZV(r.errorCode),closeActionFull:!0},width:pe.Uq.Medium}).afterClosed()):(0,nr.of)(!0)),(0,Pr.Q)(this.destroy$)).subscribe({next:r=>{this.isSubmitting=!1,r?this.next.emit():(this.rendezvousService.clearCache(),this.stepperPrevious())},error:()=>{this.store.dispatch(new Xe.Actions.ShowSnackBar("Veuillez r\xE9essayer plus tard, prise de rendez-vous impossible pour l'instant"))}})}}return(a=i).\u0275fac=function(t){return new(t||a)(c.rXU(Fn.o),c.rXU(Yi.bZ),c.rXU(ks),c.rXU(O.il),c.rXU(Pi),c.rXU(es.A))},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-prdv-step-proposition-resume"]],inputs:{isModification:"isModification",citoyen:"citoyen",visite:"visite",detailsRendezVous:"detailsRendezVous",noteCitoyen:"noteCitoyen"},outputs:{previous:"previous",next:"next"},features:[c.Vt3],decls:30,vars:6,consts:()=>{let e,t,n,r;return e="\xC9tape pr\xE9c\xE9dente",t=" D\xE9tails du rendez-vous : ",n=" Pour",r="Confirmer",[e,t,n,r,[1,"flat-window-container"],[1,"stepper-form-content"],[1,"requete-resume"],[1,"no-margin-left","previous-button","hide-mobile",3,"click"],[1,"icon-left-arrow"],[1,"resume-title","form-section-underline-title","no-padding-top","no-margin-top"],[1,"icon-smartphone","padding-right-6"],[1,"icon-map-pin-house","padding-right-6"],[1,"icon-user","padding-right-6"],[1,"icon-calendar","padding-right-6"],[1,"stepper-bottom-actions"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click","disabled"],["color","primary",4,"ngIf"],["color","primary"]]},template:function(t,n){1&t&&(c.j41(0,"div",4)(1,"div",5)(2,"div",6)(3,"button",7),c.bIt("click",function(){return n.stepperPrevious()}),c.nrm(4,"i",8),c.j41(5,"span"),c.pXf(6,0),c.k0s()(),c.j41(7,"h2",9),c.pXf(8,1),c.k0s(),c.qex(9),c.j41(10,"p"),c.nrm(11,"i",10),c.EFF(12),c.k0s(),c.j41(13,"p"),c.nrm(14,"i",11),c.EFF(15),c.k0s(),c.j41(16,"p"),c.nrm(17,"i",12),c.j41(18,"span")(19,"span"),c.pXf(20,2),c.k0s(),c.EFF(21),c.k0s()(),c.j41(22,"p"),c.nrm(23,"i",13),c.EFF(24),c.k0s(),c.bVm(),c.j41(25,"div",14)(26,"button",15),c.bIt("click",function(){return n.stepperNext()}),c.DNE(27,W4,1,0,"ion-spinner",16),c.j41(28,"ion-label"),c.pXf(29,3),c.k0s()()()()()()),2&t&&(c.R7$(12),c.SpI(" ",n.detailsRendezVous.inspectionMode,""),c.R7$(3),c.SpI(" ",n.detailsRendezVous.adresse,""),c.R7$(6),c.SpI(" ",n.detailsRendezVous.citoyenNomComplet,""),c.R7$(3),c.SpI(" ",n.detailsRendezVous.dateFormatte,""),c.R7$(2),c.Y8G("disabled",n.isSubmitting),c.R7$(),c.Y8G("ngIf",n.isSubmitting))},dependencies:[$t.$z,Qe.bT,Et.he,Et.w2],styles:["[_nghost-%COMP%]     ion-spinner{margin-right:10px;width:20px;height:20px}.requete-resume[_ngcontent-%COMP%]{margin-bottom:0}.resume-title[_ngcontent-%COMP%]{font-size:27px}.custom-button-stepper[_ngcontent-%COMP%]{margin-top:16px!important}p[_ngcontent-%COMP%]{margin:0 0 10px;display:flex;align-items:flex-start}p[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{padding-right:6px;padding-top:5px;flex-shrink:0}"]}),i})();
1var q4=H(43811),G4=H(98239),Y4=H(32430);const Q4=()=>["courrielConfirmation"];function J4(a,i){if(1&a&&c.nrm(0,"vplus-loading-spinner",24),2&a){const e=c.XpG();c.Y8G("loadingFailed",e.dataLoadingFailed)("showBackButtonOnError",!1)}}function K4(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,12),c.k0s())}function Z4(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,13),c.k0s())}function e3(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,14),c.k0s())}function t3(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,15),c.k0s())}function i3(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,16),c.k0s())}function n3(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,17),c.k0s())}function r3(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,18),c.k0s())}function s3(a,i){if(1&a&&(c.j41(0,"mat-option",43),c.EFF(1),c.k0s()),2&a){const e=i.$implicit;c.Y8G("value",e.value),c.R7$(),c.SpI(" ",e.label," ")}}function o3(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,19),c.k0s())}function a3(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,20),c.k0s())}function l3(a,i){if(1&a&&(c.j41(0,"mat-option",43),c.EFF(1),c.k0s()),2&a){const e=i.$implicit;c.Y8G("value",e.value),c.R7$(),c.SpI(" ",e.label," ")}}function c3(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,21),c.k0s())}function h3(a,i){1&a&&c.nrm(0,"ion-spinner",44)}function d3(a,i){if(1&a){const e=c.RV6();c.qex(0),c.j41(1,"button",25),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.stepperPrevious())}),c.nrm(2,"i",26),c.j41(3,"span"),c.pXf(4,0),c.k0s()(),c.j41(5,"mat-label"),c.pXf(6,1),c.k0s(),c.j41(7,"form",27)(8,"div",28)(9,"div",29)(10,"mat-form-field")(11,"mat-label"),c.pXf(12,2),c.k0s(),c.nrm(13,"input",30),c.DNE(14,K4,2,0,"mat-error",23)(15,Z4,2,0,"mat-error",23),c.k0s(),c.j41(16,"mat-form-field")(17,"mat-label"),c.pXf(18,3),c.k0s(),c.nrm(19,"input",31),c.DNE(20,e3,2,0,"mat-error",23)(21,t3,2,0,"mat-error",23),c.k0s()(),c.j41(22,"div",29)(23,"mat-form-field")(24,"mat-label"),c.pXf(25,4),c.k0s(),c.nrm(26,"input",32),c.DNE(27,i3,2,0,"mat-error",23)(28,n3,2,0,"mat-error",23),c.k0s(),c.j41(29,"mat-form-field")(30,"mat-label"),c.pXf(31,5),c.k0s(),c.nrm(32,"input",33),c.DNE(33,r3,2,0,"mat-error",23),c.k0s(),c.j41(34,"div",34)(35,"mat-form-field")(36,"mat-label"),c.pXf(37,6),c.k0s(),c.j41(38,"mat-select",35),c.DNE(39,s3,2,2,"mat-option",36),c.k0s(),c.j41(40,"mat-error"),c.pXf(41,7),c.k0s()(),c.j41(42,"mat-form-field")(43,"mat-label"),c.pXf(44,8),c.k0s(),c.nrm(45,"input",37),c.DNE(46,o3,2,0,"mat-error",23)(47,a3,2,0,"mat-error",23),c.k0s()(),c.j41(48,"mat-form-field")(49,"mat-label"),c.pXf(50,9),c.k0s(),c.j41(51,"mat-select",38),c.DNE(52,l3,2,2,"mat-option",36),c.k0s(),c.DNE(53,c3,2,0,"mat-error",23),c.k0s()(),c.j41(54,"span",39),c.pXf(55,10),c.k0s()()(),c.j41(56,"div",40)(57,"button",41),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.stepperNext())}),c.DNE(58,h3,1,0,"ion-spinner",42),c.j41(59,"ion-label"),c.pXf(60,11),c.k0s()()(),c.bVm()}if(2&a){const e=c.XpG();c.R7$(7),c.Y8G("formGroup",e.citoyenForm),c.R7$(7),c.Y8G("ngIf",e.citoyenPrenom.touched&&e.citoyenPrenom.hasError("required")),c.R7$(),c.Y8G("ngIf",e.citoyenPrenom.touched&&e.citoyenPrenom.hasError("invalidName")&&!e.citoyenPrenom.hasError("required")),c.R7$(5),c.Y8G("ngIf",e.citoyenNom.touched&&e.citoyenNom.hasError("required")),c.R7$(),c.Y8G("ngIf",e.citoyenNom.touched&&e.citoyenNom.hasError("invalidName")&&!e.citoyenNom.hasError("required")),c.R7$(6),c.Y8G("ngIf",e.citoyenCourriel.touched&&e.citoyenCourriel.hasError("required")),c.R7$(),c.Y8G("ngIf",e.citoyenCourriel.touched&&e.citoyenCourriel.hasError("invalidEmail")),c.R7$(5),c.Y8G("ngIf",e.citoyenForm.get(c.lJ4(18,Q4)).invalid),c.R7$(5),c.Y8G("required",e.citoyenTelep
1honeCellulaire&&(null==e.citoyenTelephoneCellulaire.value?null:e.citoyenTelephoneCellulaire.value.length)>0),c.R7$(),c.Y8G("ngForOf",e.EnumTypeTelephoneArray),c.R7$(6),c.Y8G("imask",e.telephoneMask)("unmask",!0),c.R7$(),c.Y8G("ngIf",e.citoyenTelephoneCellulaire.touched&&e.citoyenTelephoneCellulaire.hasError("pattern")),c.R7$(),c.Y8G("ngIf",e.citoyenTelephoneCellulaire.touched&&e.citoyenTelephoneCellulaire.hasError("required")),c.R7$(5),c.Y8G("ngForOf",e.langueCommunicationArray),c.R7$(),c.Y8G("ngIf",e.citoyenLangueCom.touched&&e.citoyenLangueCom.hasError("required")),c.R7$(4),c.Y8G("disabled",e.citoyenForm.invalid||e.isSubmitting),c.R7$(),c.Y8G("ngIf",e.isSubmitting)}}let p3=(()=>{var a;class i extends be.dI{constructor(t,n,r,o,l){super(),this.appConfig=t,this.formBuilder=n,this.localisationService=r,this.rendezvousService=o,this.store=l,this.previous=new c.bkB,this.next=new c.bkB,this.dataLoaded=!1,this.dataLoadingFailed=!1,this.contactCheckGroupLabel="Rappel du rendez-vous *",this.langueCommunicationArray=a_,this.EnumTypeTelephoneArray=Object.values(Va.vR),this.telephoneMask=this.appConfig.appConfig.telMaskObjet,this.locale=this.localisationService.getCurrentLocalisation()}ngOnInit(){var t,n,r,o,l,h,d,p,u,f;const m=null!==(t=null===(n=this.citoyen)||void 0===n||null===(n=n.telephones.find(v=>v.typTelId===Va._m.Mobile.value))||void 0===n?void 0:n.numero)&&void 0!==t?t:null,g=Object.values(Va.DP).find(v=>v.shortedLabel===this.locale.toUpperCase());this.citoyenForm=this.formBuilder.group({nom:[null!==(r=null===(o=this.citoyen)||void 0===o?void 0:o.nom)&&void 0!==r?r:null,[oe.k0.required,(0,mi.zl_)()]],prenom:[null!==(l=null===(h=this.citoyen)||void 0===h?void 0:h.prenom)&&void 0!==l?l:null,[oe.k0.required,(0,mi.zl_)()]],courriel:[null!==(d=null===(p=this.citoyen)||void 0===p?void 0:p.courriel)&&void 0!==d?d:null,[oe.k0.required,(0,mi.Bjz)()]],courrielConfirmation:["",(0,q4.L8)("courriel").bind(this)],telephoneCellulaire:[m,[oe.k0.required,oe.k0.pattern(this.appConfig.appConfig.telPattern)]],typTelId:[null],langueCom:[null!==(u=null===(f=this.citoyen)||void 0===f?void 0:f.langCom)&&void 0!==u?u:g.value,[oe.k0.required]]}),this.store.select(Xe.selectCurrentUser).pipe((0,Oa.s)(1)).subscribe(v=>{var b,y,S,E,_,T,I,w,A,M,D,L;v&&this.citoyenForm.patchValue({nom:null!==(b=v.nom)&&void 0!==b?b:null===(y=this.citoyen)||void 0===y?void 0:y.nom,prenom:null!==(S=v.prenom)&&void 0!==S?S:null===(E=this.citoyen)||void 0===E?void 0:E.prenom,courriel:null!==(_=v.courriel)&&void 0!==_?_:null===(T=this.citoyen)||void 0===T?void 0:T.courriel,courrielConfirmation:null!==(I=v.courriel)&&void 0!==I?I:"",telephoneCellulaire:null!==(w=v.telephone)&&void 0!==w?w:m,typTelId:null!==(A=v.typTelId)&&void 0!==A?A:null,langueCom:null!==(M=null!==(D=v.langCom)&&void 0!==D?D:null===(L=this.citoyen)||void 0===L?void 0:L.langCom)&&void 0!==M?M:g.value})}),this.dataLoaded=!0}stepperPrevious(){this.citoyenForm.markAllAsTouched(),this.previous.emit()}stepperNext(){const t=this.citoyenForm.value,n={nom:t.nom,prenom:t.prenom,courriel:t.courriel,telephones:[],langCom:t.langueCom,contacterParCourriel:!0,contacterParSms:!(!t.telephoneCellulaire||t.typTelId!==Va._m.Mobile.value)};let r=1;t.telephoneCellulaire&&n.telephones.push({typTelId:t.typTelId,numero:t.telephoneCellulaire,principal:!0,ordre:r++}),this.languePreferred!==n.langCom&&(this.rendezvousService.setLangueCitoyen(n.langCom),this.languePreferred=n.langCom),this.next.emit(n)}get citoyenNom(){return this.citoyenForm.get("nom")}get citoyenPrenom(){return this.citoyenForm.get("prenom")}get citoyenCourriel(){return this.citoyenForm.get("courriel")}
1get citoyenTelephoneCellulaire(){return this.citoyenForm.get("telephoneCellulaire")}get citoyenLangueCom(){return this.citoyenForm.get("langueCom")}}return(a=i).\u0275fac=function(t){return new(t||a)(c.rXU(Fn.o),c.rXU(oe.ze),c.rXU(es.A),c.rXU(ks),c.rXU(O.il))},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-prdv-step-citoyen-contact"]],inputs:{citoyen:"citoyen",isSubmitting:"isSubmitting"},outputs:{previous:"previous",next:"next"},features:[c.Vt3],decls:2,vars:2,consts:()=>{let e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S,E,_,T,I,w;return e="\xC9tape pr\xE9c\xE9dente",t="Pour qui prenez-vous ce rendez-vous?",n="Pr\xE9nom",r="Nom",o="Courriel",l="Confirmation du courriel",h="Type",d=" Champ obligatoire ",p="T\xE9l\xE9phone",u="Langue de pr\xE9f\xE9rence",f="Vous recevrez un rappel concernant votre rendez-vous la veille de l'inspection, ainsi qu'une heure avant, par courriel et par message texte si vous avez fourni un num\xE9ro mobile.",m="Suivant",g=" Champ obligatoire ",v=" Ce champ est invalide ",b=" Champ obligatoire ",y=" Ce champ est invalide ",S=" Champ obligatoire ",E=" Courriel non valide ",_="Les courriels saisis ne sont pas identiques",T=" T\xE9l\xE9phone non valide ",I=" Champ obligatoire ",w=" Champ obligatoire ",[e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S,E,_,T,I,w,[3,"loadingFailed","showBackButtonOnError",4,"ngIf"],[4,"ngIf"],[3,"loadingFailed","showBackButtonOnError"],[1,"no-margin-left","previous-button","hide-mobile",3,"click"],[1,"icon-left-arrow"],[1,"margin-bottom-2","margin-top-12",3,"formGroup"],[1,"stepper-form-content"],[1,"form-field-inline-section"],["required","","matInput","","type","text","formControlName","prenom"],["required","","matInput","","type","text","formControlName","nom"],["required","","matInput","","type","email","formControlName","courriel"],["required","","matInput","","type","email","formControlName","courrielConfirmation",3,"preventCopyPasteDirective"],[1,"form-subdivision"],["formControlName","typTelId",3,"required"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","tel","formControlName","telephoneCellulaire",3,"imask","unmask"],["required","","formControlName","langueCom"],[1,"rdv-info","font-size-15"],[1,"stepper-bottom-actions","spacing-top"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click","disabled"],["color","primary",4,"ngIf"],[3,"value"],["color","primary"]]},template:function(t,n){1&t&&c.DNE(0,J4,1,2,"vplus-loading-spinner",22)(1,d3,61,19,"ng-container",23),2&t&&(c.Y8G("ngIf",!n.dataLoaded),c.R7$(),c.Y8G("ngIf",n.dataLoaded))},dependencies:[Ms.fg,_i.rl,_i.nJ,_i.TL,Aa.wT,Ym.VO,$t.$z,Qe.Sq,Qe.bT,oe.qT,oe.me,oe.BC,oe.cb,oe.YS,oe.j4,oe.JD,G4.e,Y4.Zq,Et.he,Et.w2,wo.N],encapsulation:2}),i})();var Bg=H(70980);function u3(a,i){if(1&a&&c.nrm(0,"vplus-loading-spinner",4),2&a){const e=c.XpG();c.Y8G("loadingFailed",e.dataLoadingFailed)("showBackButtonOnError",!1)}}function f3(a,i){if(1&a&&(c.j41(0,"mat-error"),c.EFF(1),c.k0s()),2&a){const e=c.XpG(2);c.R7$(),c.SpI(" ",e.errorMessage," ")}}function m3(a,i){1&a&&(c.j41(0,"mat-error"),c.pXf(1,1),c.k0s())}function g3(a,i){1&a&&c.nrm(0,"ion-spinner",10)}function v3(a,i){if(1&a){const e=c.RV6();c.qex(0),c.j41(1,"mat-label"),c.EFF(2),c.k0s(),c.j41(3,"form")(4,"div")(5,"mat-form-field",5),c.nrm(6,"input",6),c.DNE(7,f3,2,1,"mat-error",3)(8,m3,2,0,"mat-error",3),c.k0s()()(),c.j41(9,"div",7)(10,"button",8),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.stepperNext())}),c.DNE(11,g3,1,0,"ion-spinner",9),c.j41(12,"ion-label"),c.pXf(13,0),c.k0s()()(),c.bVm()}if(2&a){const e=c.XpG();c.R7$(2),c.JRh(e.entete),c.R7$(3),c.Y8G("floatLabel","never"),c.R7$(),c.Y8G("formControl",e.invitationCodeFC),c.R7$(),c.Y8G("ngIf",null==e.invitationCodeFC.errors?null:e.invitationCodeFC.errors.invalid),c.R7$(),c.Y8G("ngIf",e.invitationCodeFC.touched&&e.invitationCodeFC.hasError("required")),c.R7$(2),c.Y8G("disabled",!e.invitationCodeFC.value||e.isSubmitting),c.R7$(),c.Y8G("ngIf",e.isSubmitting)}}let b3=(()=>{var a;class i extends be.dI{constructor(t,n){super(),this.visiteService=t,this.rendezvousService=n,this.next=new c.bkB,this.dataLoaded=!1,this.dataLoadingFailed=!1,this.entete="Veuillez saisir le code re\xE7u dans la lettre d'invitation :",this.errorMessage="Le co
1de n'est pas valide ou a d\xE9j\xE0 \xE9t\xE9 saisi",this.isSubmitting=!1}ngOnInit(){this.invitationCodeFC=new oe.hs(null,{validators:oe.k0.required}),this.invitationCodeFC.valueChanges.pipe((0,Pr.Q)(this.destroy$)).subscribe(()=>{this.invitationCodeFC.setErrors(null)}),this.dataLoaded=!0}stepperNext(){this.invitationCodeFC.value!==this.codeFetched?(this.isSubmitting=!0,this.codeFetched=null,this.visiteService.getInvitationRendezvous(this.invitationCodeFC.value).pipe((0,Pr.Q)(this.destroy$),(0,ai.M)(n=>{if(!n)throw new Error("404")}),(0,Bg.j)(()=>{this.isSubmitting=!1})).subscribe({next:n=>{this.codeFetched=n.code,this.rendezvousService.setInvitation(n),this.next.emit(n)},error:()=>{this.invitationCodeFC.setErrors({invalid:!0})}})):this.next.emit()}}return(a=i).\u0275fac=function(t){return new(t||a)(c.rXU(Pi),c.rXU(ks))},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-prdv-step-invitation-code"]],outputs:{next:"next"},features:[c.Vt3],decls:2,vars:2,consts:()=>{let e,t,n;return e="Code *",t="Suivant",n=" Champ obligatoire ",[t,n,[3,"loadingFailed","showBackButtonOnError",4,"ngIf"],[4,"ngIf"],[3,"loadingFailed","showBackButtonOnError"],[3,"floatLabel"],["matInput","","placeholder",e,3,"formControl"],[1,"stepper-bottom-actions"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click","disabled"],["color","primary",4,"ngIf"],["color","primary"]]},template:function(t,n){1&t&&c.DNE(0,u3,1,2,"vplus-loading-spinner",2)(1,v3,14,7,"ng-container",3),2&t&&(c.Y8G("ngIf",!n.dataLoaded),c.R7$(),c.Y8G("ngIf",n.dataLoaded))},dependencies:[Ms.fg,_i.rl,_i.nJ,_i.TL,$t.$z,Qe.bT,oe.qT,oe.me,oe.BC,oe.cb,oe.cV,oe.l_,Et.he,Et.w2,wo.N],styles:["ion-spinner[_ngcontent-%COMP%]{height:20px}@media (max-width: 959px){mat-label[_ngcontent-%COMP%]{font-weight:300}}@media (max-width: 959px){.standard-page-content[_ngcontent-%COMP%]{width:100%}}form[_ngcontent-%COMP%]{min-height:auto!important}@media (max-width: 959px){form[_ngcontent-%COMP%]{margin-top:20px}}form[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{width:100%}.custom-button-stepper[_ngcontent-%COMP%]{margin-top:10px;margin-left:0;width:100%;justify-content:center}"]}),i})();function y3(a,i){if(1&a&&c.nrm(0,"vplus-loading-spinner",8),2&a){const e=c.XpG();c.Y8G("loadingFailed",e.dataLoadingFailed)("showBackButtonOnError",!1)}}function S3(a,i){1&a&&c.nrm(0,"ion-spinner",19)}function C3(a,i){1&a&&c.nrm(0,"ion-spinner",19)}function E3(a,i){if(1&a){const e=c.RV6();c.qex(0),c.j41(1,"div")(2,"span",9),c.pXf(3,0),c.k0s(),c.j41(4,"div",10)(5,"p"),
1c.nrm(6,"i",11),c.EFF(7),c.k0s(),c.j41(8,"p"),c.nrm(9,"i",12),c.EFF(10),c.k0s(),c.j41(11,"p"),c.nrm(12,"i",13),c.j41(13,"span")(14,"span"),c.pXf(15,1),c.k0s(),c.EFF(16),c.k0s()(),c.j41(17,"p"),c.nrm(18,"i",14),c.EFF(19),c.k0s(),c.j41(20,"p"),c.nrm(21,"i",13),c.j41(22,"span")(23,"span"),c.pXf(24,2),c.k0s(),c.EFF(25),c.j41(26,"span"),c.pXf(27,3),c.k0s()()()()(),c.j41(28,"div",15)(29,"button",16),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.stepperUpdate())}),c.DNE(30,S3,1,0,"ion-spinner",17),c.j41(31,"ion-label"),c.pXf(32,4),c.k0s()(),c.j41(33,"button",18),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.stepperCancel())}),c.DNE(34,C3,1,0,"ion-spinner",17),c.j41(35,"ion-label"),c.pXf(36,5),c.k0s()()(),c.bVm()}if(2&a){const e=c.XpG();c.R7$(7),c.SpI(" ",e.visite.inspectionMode,""),c.R7$(3),c.SpI(" ",e.visite.adresse,""),c.R7$(6),c.SpI(" ",e.visite.citoyenNomComplet,""),c.R7$(3),c.SpI(" ",e.visite.dateFormatte,""),c.R7$(6),c.SpI(" ",e.visite.inspecteurNomComplet," "),c.R7$(4),c.Y8G("disabled",e.isSubmitting||e.isCanceling),c.R7$(),c.Y8G("ngIf",e.isSubmitting),c.R7$(3),c.Y8G("disabled",e.isSubmitting||e.isCanceling),c.R7$(),c.Y8G("ngIf",e.isCanceling)}}let _3=(()=>{var a;class i extends be.dI{constructor(t,n,r,o){super(),this.dialog=t,this.store=n,this.visiteService=r,this.rendezvousService=o,this.next=new c.bkB,this.dataLoaded=!1,this.dataLoadingFailed=!1,this.annulationDialogHeader="Annulation du rendez-vous",this.annulationDialogContent="<p>"+"Vous \xEAtes sur le point d'annuler votre rendez-vous d'inspection. \xCAtes-vous s\xFBr de vouloir continuer ?"+"</p>"}ngOnInit(){this.dataLoaded=!0}stepperCancel(){this.dialog.open(Mc.V,{data:{title:this.annulationDialogHeader,htmlContent:this.annulationDialogContent,actionAnnulerConfirmer:!0},width:pe.Uq.Small}).afterClosed().pipe((0,rr.p)(n=>n),(0,ai.M)(()=>this.isCanceling=!0),(0,ii.n)(()=>this.visiteService.updateStatutVisite(this.visite.id,pe.CG.Annulee,!1,"VISAN015")),(0,Bg.j)(()=>this.isCanceling=!1),(0,Pr.Q)(this.destroy$)).subscribe({next:()=>{this.next.emit({action:"CANCEL"})},error:()=>{this.store.dispatch(new Xe.Actions.ShowSnackBar("Impossible d'entamer la modification",Xe.EnumSnackBarType.Echec))}})}stepperUpdate(){if(this.isSubmitting=!0,this.citoyen&&this.invitation)return this.next.emit({action:"UPDATE",invitation:this.invitation,citoyen:this.citoyen}),void(this.isSubmitting=!1);(0,DS.p)([this.visiteService.getInvitationRendezvousByVisiteId(this.visite.id),this.visiteService.getContactCitoyenByVisiteId(this.visite.id)]).pipe((0,Bg.j)(()=>this.isSubmitting=!1),(0,Pr.Q)(this.destroy$)).subscribe({next:([t,n])=>{this.citoyen=n,this.invitation=t,this.invitation||(this.invitation={id:null,code:null,visiteId:this.visite.id,ueId:this.visite.ueId,inspectionModeId:this.visite.inspectionModeId,inspecteurId:this.visite.inspecteurId,inspecteurNomComplet:this.visite.inspecteurNomComplet,secteurId:this.visite.secteurId,emplacementLatitude:this.visite.emplacementLatitude,emplacementLongitude:this.visite.emplacementLongitude,adresse:this.visite.adresse,inspectionDuree:Q()(this.visite.dateFin).diff(this.visite.dateDebut,"minute")}),this.rendezvousService.setLangueCitoyen(this.citoyen.langCom),this.rendezvousService.setInvitation(this.invitation),this.next.emit({action:"UPDATE",invitation:this.invitation,citoyen:this.citoyen})},error:()=>{this.store.dispatch(new Xe.Actions.ShowSnackBar("Impossible d'entamer la modification",Xe.EnumSnackBarType.Echec))}})}ngOnDestroy(){super.ngOnDestroy()}}return(a=i).\u0275fac=function(t){return new(t||a)(c.rXU(Yi.bZ),c.rXU(O.il),c.rXU(Pi),c.rXU(ks))},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-prdv-step-modification-action"]],inputs:{visite:"visite"},outputs:{next:"next"},features:[c.Vt3],decls:2,vars:2,consts:()=>{let e,t,n,r,o,l;return e=" D\xE9tails du rendez-vous ",t=" Pour",n=" Avec",r="(Inspecteur)",o="Modifier",l="Annuler le rendez-vous",[e,t,n,r,o,l,[3,"loadingFailed","showBackButtonOnError",4,"ngIf"],[4,"ngIf"],[3,"loadingFailed","showBackButtonOnError"],[1,"font-weight-600","hide-mobile"],[1,"modification-detail
1s"],[1,"icon-smartphone","padding-right-6"],[1,"icon-map-pin-house","padding-right-6"],[1,"icon-user","padding-right-6"],[1,"icon-calendar","padding-right-6"],[1,"stepper-bottom-actions"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click","disabled"],["color","primary",4,"ngIf"],["type","button","mat-raised-button","","color","warn",1,"custom-button-stepper","cancel-button",3,"click","disabled"],["color","primary"]]},template:function(t,n){1&t&&c.DNE(0,y3,1,2,"vplus-loading-spinner",6)(1,E3,37,9,"ng-container",7),2&t&&(c.Y8G("ngIf",!n.dataLoaded),c.R7$(),c.Y8G("ngIf",n.dataLoaded))},dependencies:[$t.$z,Qe.bT,Et.he,Et.w2,wo.N],styles:[".stepper-bottom-actions[_ngcontent-%COMP%]{flex-direction:column;gap:10px}.stepper-bottom-actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{justify-content:center}.stepper-bottom-actions[_ngcontent-%COMP%]   .cancel-button[_ngcontent-%COMP%]{background-color:transparent;box-shadow:none;color:var(--primary-color);display:flex}.modification-details[_ngcontent-%COMP%]{padding:20px 0 10px}p[_ngcontent-%COMP%]{margin:0 0 10px;display:flex;align-items:flex-start}p[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{padding-right:6px;padding-top:5px;flex-shrink:0}"]}),i})();var Hg=H(9454),T3=H(30450),l_=H(65571),I3=H(88821);const x3=(a,i)=>i.day,w3=a=>({"display-none":a}),O3=(a,i)=>({"icon-chevron-up":a,"icon-chevron-down":i}),A3=a=>({"color-plage-take":a});function P3(a,i){if(1&a&&c.nrm(0,"vplus-loading-spinner",18),2&a){const e=c.XpG();c.Y8G("loadingFailed",e.dataLoadingFailed)("showBackButtonOnError",!1)}}function D3(a,i){if(1&a){const e=c.RV6();c.j41(0,"mat-slide-toggle",27),c.bIt("change",function(n){c.eBV(e);const r=c.XpG(2);return c.Njj(r.onToggleChange(n.checked))}),c.pXf(1,3),c.k0s()}if(2&a){const e=c.XpG(2);c.Y8G("checked",e.ignoreDisponibilites)}}function k3(a,i){if(1&a&&(c.j41(0,"p")(1,"span"),c.pXf(2,5),c.k0s(),c.j41(3,"span",36),c.EFF(4),c.k0s()()),2&a){const e=c.XpG(4);c.R7$(4),c.SpI(" ",e.suggestionDate," ")}}function M3(a,i){if(1&a&&(c.j41(0,"div",33),c.DNE(1,k3,5,1,"p"),c.k0s()),2&a){const e=i;c.R7$(),c.vxM(1,e.length&&e[0].suggestions.length?1:-1)}}function L3(a,i){1&a&&(c.nrm(0,"i",37),c.j41(1,"span"),c.pXf(2,6),c.k0s())}function R3(a,i){1&a&&(c.j41(0,"span"),c.pXf(1,7),c.k0s())}function N3(a,i){if(1&a){const e=c.RV6();c.j41(0,"div")(1,"mat-label"),c.pXf(2,4),c.k0s(),c.EFF(3,"\xa0"),c.j41(4,"span",28),c.EFF(5),c.
1k0s(),c.j41(6,"div",29)(7,"div",30)(8,"div",31),c.nrm(9,"i",32),c.k0s(),c.DNE(10,M3,2,1,"div",33),c.nI1(11,"async"),c.k0s()(),c.j41(12,"div",34)(13,"button",35),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.nextProposition())}),c.DNE(14,L3,3,0)(15,R3,2,0),c.k0s()()()}if(2&a){let e;const t=c.XpG(2);c.R7$(5),c.JRh(t.rdvDuration),c.R7$(5),c.vxM(10,(e=c.bMT(11,3,t.suggestionReservation$))?10:-1,e),c.R7$(4),c.vxM(14,3!==t.suggestionNumber?14:15)}}function V3(a,i){if(1&a&&(c.j41(0,"div")(1,"mat-label"),c.pXf(2,8),c.k0s(),c.EFF(3,"\xa0"),c.j41(4,"span",28),c.EFF(5),c.k0s()()),2&a){const e=c.XpG(3);c.R7$(5),c.JRh(e.rdvDuration)}}function F3(a,i){if(1&a&&(c.j41(0,"mat-label")(1,"span"),c.pXf(2,9),c.k0s()(),c.j41(3,"span",28),c.EFF(4),c.k0s()),2&a){const e=c.XpG(3);c.R7$(4),c.SpI(" ",e.rdvDuration,"")}}function B3(a,i){if(1&a&&(c.j41(0,"mat-button-toggle",45)(1,"div")(2,"strong"),c.EFF(3),c.k0s()()()),2&a){const e=i.$implicit;c.Y8G("ngClass",c.eq3(3,A3,e.reserved))("value",e),c.R7$(3),c.JRh(e.plageHoraire)}}function H3(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",46)(1,"button",47),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2).$implicit,r=c.XpG(),o=c.XpG(3);return c.Njj(o.loadMoreSuggestions(n.day,r,o.visibleSuggestionsPerDay))}),c.pXf(2,10),c.k0s()()}}function z3(a,i){if(1&a){const e=c.RV6();c.j41(0,"mat-expansion-panel",40,0)(2,"mat-expansion-panel-header",41)(3,"mat-panel-title")(4,"span",42),c.EFF(5),c.nI1(6,"vplusCapitalizeFirstLetter"),c.k0s()(),c.nrm(7,"i",43),c.k0s(),c.j41(8,"mat-button-toggle-group",44),c.bIt("change",function(n){c.eBV(e);const r=c.XpG(5);return c.Njj(r.reserver(n.value))}),c.Z7z(9,B3,4,5,"mat-button-toggle",45,c.fX1),c.k0s(),c.DNE(11,H3,3,0,"div",46),c.k0s()}
1if(2&a){const e=c.sdS(1),t=c.XpG(),n=t.$implicit,r=t.$index,o=c.XpG(4);c.Y8G("expanded",o.isPanelOpen(r,n.suggestions)),c.R7$(2),c.Y8G("collapsedHeight","fit-content")("expandedHeight","fit-content"),c.R7$(3),c.JRh(c.bMT(6,7,n.day)),c.R7$(2),c.Y8G("ngClass",c.l_i(9,O3,!e.expanded,e.expanded)),c.R7$(),c.Y8G("value",o.suggestionPicked),c.R7$(),c.Dyx(n.visibleSuggestions),c.R7$(2),c.vxM(11,n.hasMoreSuggestions?11:-1)}}function X3(a,i){if(1&a&&c.DNE(0,z3,12,12,"mat-expansion-panel",40),2&a){const e=i.$implicit;c.vxM(0,e.visibleSuggestions&&e.visibleSuggestions.length>0?0:-1)}}function j3(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",39)(1,"button",47),c.bIt("click",function(){c.eBV(e);const n=c.XpG(4);return c.Njj(n.loadMoreDays())}),c.pXf(2,11),c.k0s()()}}function U3(a,i){if(1&a&&(c.j41(0,"div",38),c.Z7z(1,X3,1,1,null,null,x3),c.nI1(3,"slice"),c.DNE(4,j3,3,0,"div",39),c.k0s()),2&a){const e=i,t=c.XpG(3);c.R7$(),c.Dyx(c.brH(3,1,e,0,t.visibleDays)),c.R7$(3),c.vxM(4,e.length>t.visibleDays?4:-1)}}function W3(a,i){if(1&a&&(c.j41(0,"div",23),c.DNE(1,V3,6,1,"div")(2,F3,5,1)(3,U3,5,5,"div",38),c.nI1(4,"async"),c.k0s()),2&a){let e;const t=c.XpG(2);c.R7$(),c.vxM(1,t.isModeModification?2:1),c.R7$(2),c.vxM(3,(e=c.bMT(4,2,t.suggestionReservation$))?3:-1,e)}}function $3(a,i){if(1&a&&(c.j41(0,"span"),c.pXf(1,13),c.k0s(),c.j41(2,"span",50),c.EFF(3),c.k0s()),2&a){const e=c.XpG(4);c.R7$(3),c.JRh(e.aideTelephone)}}function q3(a,i){1&a&&(c.j41(0,"span"),c.pXf(1,14),c.k0s())}function G3(a,i){if(1&a&&(c.j41(0,"div",48),c.nrm(1,"i",49),c.j41(2,"h4"),c.pXf(3,12),c.k0s(),c.DNE(4,$3,4,1)(5,q3,2,0),c.k0s()),2&a){const e=c.XpG(3);c.R7$(4),c.vxM(4,e.aideTelephone?4:5)}}function Y3(a,i){if(1&a&&(c.j41(0,"span",51),c.pXf(1,16),c.k0s(),c.j41(2,"span",50),c.EFF(3),c.k0s()),2&a){const e=c.XpG(4);c.R7$(3),c.JRh(e.aideTelephone)}}function Q3(a,i){1&a&&(c.j41(0,"span",51),c.pXf(1,17),c.k0s())}function J3(a,i){if(1&a&&(c.j41(0,"div",48),c.nrm(1,"i",49),c.j41(2,"h4"),c.pXf(3,15),c.k0s(),c.DNE(4,Y3,4,1)(5,Q3,2,0),c.k0s()),2&a){const e=c.XpG(3);c.R7$(4),c.vxM(4,e.aideTelephone?4:5)}}function K3(a,i){if(1&a&&c.DNE(0,G3,6,1,"div",48)(1,J3,6,1),2&a){const e=c.XpG(2);c.vxM(0,e.hidePlageCitoyen?0:1)}}function Z3(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",19)(1,"button",20),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.stepperPrevious())}),c.nrm(2,"i",21),c.j41(3,"span"),c.pXf(4,1),c.k0s()(),c.DNE(5,D3,2,1,"mat-slide-toggle",22),c.k0s(),c.DNE(6,N3,16,5,"div")(7,W3,5,4,"div",23),c.nI1(8,"async"),c.DNE(9,K3,2,1),c.nI1(10,"async"),c.j41(11,"div",24)(12,"div",25)(13,"button",26),c.nI1(14,"async"),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.stepperNext())}),c.j41(15,"ion-label"),c.pXf(16,2),c.k0s()()()()}if(2&a){const e=c.XpG();c.R7$(5),c.vxM(5,!e.hidePlageCitoyen&&e.isModeLibre?5:-1),c.R7$(),c.vxM(6,e.isModeLibre?-1:6),c.R7$(),c.vxM(7,e.isModeLibre&&e.hasAvailableSuggestions(c.bMT(8,6,e.suggestionReservation$))?7:-1),c.R7$(2),c.vxM(9,e.hasAvailableSuggestions(c.bMT(10,8,e.suggestionReservation$))?-1:9),c.R7$(4),c.Y8G("ngClass",c.eq3(12,w3,!e.hasAvailableSuggestions(c.bMT(14,10,e.suggestionReservation$))))("disabled",!e.reservation||!e.hasChooseOnce||e.isModeModification&&!e.plageChanged)}}let e5=(()=>{var a;class i{set isActif(t){this.isInitialized&&t&&this.rendezvousService.isCacheCleared()&&(this.hasChooseOnce=!1,this.reservation=null,this.suggestionReservationPickedSubject.next(null),this.ignoreDisponibilites=!1,this.fetchResultat())}constructor(){this.previous=new c.bkB,this.next=new c.bkB,this.localisationService=(0,c.WQX)(es.A),this.rendezvousService=(0,c.WQX)(ks),this.appConfig=(0,c.WQX)(Fn.o),this.destroyRef=(0,c.WQX)(c.abz),this.dataLoaded=!1,this.dataLoadingFailed=!1,this.hasChooseOnce=!1,this.isModeLibre=!1,this.suggestionDefaultLabel="R\xE9server",this.suggestionReservedLabel="Plage s\xE9lectionn\xE9e",this.visibleDays=6,this.visibleSuggestionsPerDay=10,this.suggestionNumber=0,this.ignoreDisponibilites=!1,this.telMaskOQLFObjet=this.appConfig.appConfig.telMaskOQLFObjet,this.plageChanged=!1,this.savedDays=[],this.savedPlages=[],this.displayedColumns=["PlageHoraire","Reserver"],this.motDe="de",this.motA="\xE0",this.reservedSlotHeaderLabel="Vous avez r\xE9serv\xE9 la plage horaire suivante :",this.isInitialized=!1,this.localCode="fr-CA",this.minDate=new Date,this.maxDate=new Date,this.suggestionReservationSortSubject=ne
1w kc.t({active:null,direction:""}),this.resultatPropositions=[],this.suggestionsSubject=new kc.t([]),this.suggestionReservationPickedSubject=new kc.t(null),this.currentLocalisation=this.localisationService.getCurrentLocalisation(),this.formatHeure=this.currentLocalisation===pe.fi.FR?"HH:mm":"h:mm A",this.formatDate=this.currentLocalisation===pe.fi.FR?"dddd DD MMMM":"dddd, MMMM D",this.isModeLibre=this.isModeLibre||this.isModeModification}ngOnInit(){(0,s.Ls)(this.currentLocalisation),Q().locale(this.currentLocalisation),this.localCode=this.currentLocalisation===pe.fi.EN?"en-US":"fr-CA",this.onInit(),this.visite&&this.reserver({plageHoraire:"",label:"",reserved:!1,startDate:this.visite.dateDebut,endDate:this.visite.dateFin,inspecteurId:this.visite.inspecteurId},!0),this.inspectionDuree&&(this.rdvDuration="(dur\xE9e moyenne "+this.inspectionDuree+"min)"),this.fetchResultat()}onInit(){this.savedDays=this.rendezvousService.getPreferredDays(),this.savedPlages=this.rendezvousService.getPreferredPlages(),this.suggestionReservation$=(0,Vg.z)([this.suggestionsSubject.asObservable(),this.suggestionReservationPickedSubject.asObservable()]).pipe((0,ue.T)(([t,n])=>{this.hasChooseOnce=!1;const r=t.reduce((l,h)=>{const d=Q()(h.slot.startDate).format("dddd D MMMM");l[d]||(l[d]=[]);const p={plageHoraire:Q()(h.slot.startDate).format("LT"),label:"",reserved:n&&Q()(n.startDate).isSame(h.slot.startDate,"minute"),startDate:h.slot.startDate,endDate:h.slot.endDate,inspecteurId:h.inspecteurId};return p.label=p.reserved?this.suggestionReservedLabel:this.suggestionDefaultLabel,p.reserved&&(this.hasChooseOnce=!0,this.elementReserved=p),l[d].push(p),l},{}),o=Object.entries(r).map(([l,h])=>{const d=h.some(p=>p.reserved);if(l=this.currentLocalisation===pe.fi.EN?Q()(l).format(this.formatDate):l,d){const p=h.findIndex(g=>g.reserved),m=[...h.slice(0,this.visibleSuggestionsPerDay),...p>=this.visibleSuggestionsPerDay?h.slice(this.visibleSuggestionsPerDay,p+1):[]];return{day:l,suggestions:h,visibleSuggestions:m,hasMoreSuggestions:h.length>m.length}}return{day:l,suggestions:h,visibleSuggestions:h.slice(0,this.visibleSuggestionsPerDay),hasMoreSuggestions:h.length>this.visibleSuggestionsPerDay}});if(1===o.length){const{suggestions:l}=o[0];l&&l.length>0&&this.reserver(l[0])}return this.calculateVisibleDays(o),o}))}loadMoreDays(){this.visibleDays+=6}loadMoreSuggestions(t,n,r){const o=n.find(h=>h.day===t);if(o){var l;const h=o.suggestions,d=(null===(l=o.visibleSuggestions)||void 0===l?void 0:l.length)||0,p=h.slice(d,d+r);o.visibleSuggestions=[...o.visibleSuggestions||[],...p],o.hasMoreSuggestions=h.length>o.visibleSuggestions.length}}calculateVisibleDays(t){const n=t.findIndex(r=>r.suggestions.some(o=>o.reserved));this.visibleDays=-1!==n&&n>this.visibleDays?n+1:this.visibleDays}hasAvailableSuggestions(t){return t.some(n=>n.suggestions&&n.suggestions.length>0)}isPanelOpen(t,n){return this.isModeModification?n.some(r=>r.reserved):0===t}onToggleChange(t){this.ignoreDisponibilites=t,t?(this.savedDays=this.rendezvousService.getPreferredDays(),this.savedPlages=this.rendezvousService.getPreferredPlages(),this.rendezvousService.setPreferredDays([]),this.rendezvousService.setPreferredPlages([]),this.fetchResultat()):(this.savedDays=this.savedDays?this.savedDays:this.rendezvousService.getPreferredDays(),this.savedPlages=this.savedPlages?this.savedPlages:this.rendezvousService.getPreferredPlages(),this.rendezvousService.setPreferredDays(this.savedDays),this.rendezvousService.setPreferredPlages(this.savedPlages),this.fetchResultat())}fetchResultat(){this.dataLoaded=!1,this.suggestionNumber=0,this.rendezvousService.getPropositionResults().pipe((0,ee.pQ)(this.destroyRef)).subscribe({next:t=>{this.isInitialized=!0,this.resultatPropositions=[],t.propositions.forEach(n=>{this.resultatPropositions.push([n])}),this.resultatPropositions.push(t.tranches),this.nextProposition()}})}nextProposition(){this.dataLoaded=!1,(0,Qd.Y)(500).pipe((0,Oa.s)(1)).subscribe(()=>{const t=this.resultatPropositions.shift();if(t){if(this.suggestionNumber++,this.resultatPropositions.length>0){const n=this.currentLocalisation===pe.fi.FR?"dddd DD MMMM yyyy":"dddd, MMMM D, yyyy",r=t[0].slot.startDate;this.suggestionDate=(0,mi.Zrt)(Q()(r).format(n))+" \xE0 "+Q()(r).format(this.formatHeure),this.suggestionsSubject.next([t[0]])}else{const n=new Set;t.forEach(o=>{n.add(Q()(o.slot.startDate).startOf("day").unix())});const r=[];for(const o of n.values())r.push(new Date(1e3*o));this.suggestionsSubject.next(t),this.isModeLibre=!0,this.rendezvousService.setModeLibre()}this.dataLoaded=!0}else this.dataLoaded=!0})}
1reserver(t,n=!1){t.reserved||(this.hasChooseOnce=this.hasChooseOnce||!!t.inspecteurId,this.suggestionPicked=t,this.reservation={date:Q()(t.startDate).format(this.formatDate),heureDebut:Q()(t.startDate).format(this.formatHeure),heureFin:Q()(t.endDate).format(this.formatHeure)},t.reserved=!0,this.elementReserved&&(this.elementReserved.reserved=!1),this.elementReserved=t,n&&(this.initialElementReserved=this.suggestionPicked,this.suggestionReservationPickedSubject.next(this.suggestionPicked)),this.isModeModification&&(this.plageChanged=!Q()(this.initialElementReserved.startDate).isSame(this.suggestionPicked.startDate,"minute")))}sortData(t){this.suggestionReservationSortSubject.next(t)}stepperPrevious(){this.previous.emit()}stepperNext(){this.next.emit({startDate:this.suggestionPicked.startDate,endDate:this.suggestionPicked.endDate,inspecteurId:this.suggestionPicked.inspecteurId})}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-prdv-step-plage-disponibilite"]],inputs:{isModeModification:"isModeModification",visite:"visite",aideTelephone:"aideTelephone",hidePlageCitoyen:"hidePlageCitoyen",dispoChanged:"dispoChanged",inspectionDuree:"inspectionDuree",isActif:"isActif"},outputs:{previous:"previous",next:"next"},decls:2,vars:2,consts:()=>{let e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S;return e="\xC9tape pr\xE9c\xE9dente",t="Suivant",n=" Ignorer mes pr\xE9f\xE9rences ",r="Choisissez votre date de rendez-vous",o="Cr\xE9neau recommand\xE9 :",l="G\xC9N\xC9RER UNE AUTRE RECOMMANDATION",h="VOIR PLUS DE DATES",d="Choisissez votre date de rendez-vous",p=" Pour modifier votre rendez-vous choisissez une nouvelle plage horaire et cliquez sur le bouton \xAB Suivant \xBB.",u=" VOIR PLUS ",f="VOIR PLUS DE DATES",m="D\xE9sol\xE9, la r\xE9servation est impossible",g="Aucune disponibilit\xE9 en ligne. Pour prendre rendez-vous, appelez le : ",v=" Aucune disponibilit\xE9 en ligne. Pour prendre rendez-vous, contactez nous par t\xE9l\xE9phone.",b="D\xE9sol\xE9, la r\xE9servation est impossible",y=" Aucune disponibilit\xE9 en ligne pour vos pr\xE9f\xE9rences. Veuillez retourner \xE0 l'\xE9tape pr\xE9c\xE9dente pour modifier vos pr\xE9f\xE9rences ou appelez le : ",S=" Aucune disponibilit\xE9 en ligne pour vos pr\xE9f\xE9rences. Veuillez retourner \xE0 l'\xE9tape pr\xE9c\xE9dente pour modifier vos pr\xE9f\xE9rences ou contactez nous par t\xE9l\xE9phone.",[["expansionPanel",""],e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S,[3,"loadingFailed","showBackButtonOnError"],[1,"inline-container"],[1,"no-margin-left","previous-button","hide-mobile",3,"click"],[1,"icon-left-arrow"],[3,"checked"],[1,"stepper-form-content"],[1,"stepper-bottom-actions"],[1,"full-width","flex-end"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click","ngClass","disabled"],[3,"change","checked"],[1,"duree-span"],[1,"appointment-card"],[1,"appointment-info"],[1,"appointment-icon"],[1,"icon-thumbs-up"],[1,"appointment-details"],[1,"reschedule-button-container"],[1,"reschedule-button",3,"click"],[2,"font-weight","bold"],[1,"icon-refresh-cw"],[1,"margin-top-24"],[1,"see-more"],["hideToggle","true",1,"outline-expansion-panel",3,"expanded"],[1,"side-menu-element","list-categorie-item",3,"collapsedHeight","expandedHeight"],[1,"header-text"],[3,"ngClass"],[3,"change","value"],[3,"ngClass","value"],[1,"margin-top-12","see-more","with-border-top"],["type","button",3,"click"],[1,"no-suggestions-message"],[1,"icon-calendar-cancel-full"],[1,"font-weight-600","padding-top-3"],[1,"message"]]},template:function(t,n){1&t&&c.DNE(0,P3,1,2,"vplus-loading-spinner",18)(1,Z3,17,14),2&t&&(c.vxM(0,n.dataLoaded?-1:0),c.R7$(),c.vxM(1,n.dataLoaded?1:-1))},dependencies:[Hg.GK,Hg.Z2,Hg.WN,T3.sG,_i.nJ,$t.$z,l_.ec,l_.pc,Qe.YU,Et.he,wo.N,Qe.Jj,Qe.P9,I3.X],styles:[".margine_text[_ngcontent-%COMP%]{margin:0!important;text-align:center}.marge_haute[_ngcontent-%COMP%]{margin-top:7px;margin-bottom:17px}.div-reservation[_ngcontent-%COMP%]{overflow-y:auto;height:324px}.table-empty[_ngcontent-%COMP%]{height:100px}.color-plage-take[_ngcontent-%COMP%]{background-color:var(--primary-color)!important;color:var(--primary-color-contrast-text)!important}  mat-button-toggle.color-plage-take .mat-pseudo-checkbox-checked:after{color:var(--primary-color-contrast-text)!important;border-color:var(--primary-color-contrast-text)!important}.td-text[_ngcontent-%COMP%]{text-align:center}.td-horaire-text[_ngcontent-%COMP%]{text-align:left}.duree-span[_ngcontent-%COMP%]{font-weight:400;font-size:13px}@media (max-width: 959px){.duree-span[_ngcontent-%COMP%]{display:block}}.inline-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:25px}.inline-container[_ngcontent-%COMP%]   .previous-button[_ngcontent-%COMP%]{margin-right:auto;margin-bottom:0}.inline-container[_ngcontent-%COMP%]   .mat-slide-toggle[_ngcontent-%COMP%]{font-size:16px;margin-left:auto}@media (max-width: 959px){.inline-container[_ngcontent-%COMP%]   .mat-slide-toggle[_ngcontent-%COMP%]{margin-bottom:25px}}.plage-disponibilite-flex-container[_ngcontent-%COMP%]{display:flex;gap:18px;flex-direction:column}@media (min-width: 600px){.plage-disponibilite-flex-container[_ngcontent-%COMP%]{flex-direction:row}}.plage-disponibilite-flex-container[_ngcontent-%COMP%]   .plage-disponibilite-widget[_ngcontent-%COMP%]{background:var(--light-grey-color);height:100%;padding:18px}.plage-disponibilite-flex-container[_ngcontent-%COMP%]   .plage-disponibilite-widget[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{display:block;padding-bottom:1rem;
1border-bottom:1px solid var(--divider-color)}.plage-disponibilite-flex-container[_ngcontent-%COMP%]   .plage-disponibilite-widget[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:1rem}.plage-disponibilite-flex-container[_ngcontent-%COMP%]   .plage-disponibilite-widget[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{margin-right:10px;color:var(--light-text-color)}.plage-disponibilite-flex-container[_ngcontent-%COMP%]   .plage-disponibilite-widget[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;font-weight:500}.appointment-card[_ngcontent-%COMP%]{background-color:#e3f2fd;border:1px solid var(--divider-color);border-radius:8px;text-align:center;margin-bottom:20px;margin-top:10px}.appointment-card[_ngcontent-%COMP%]   .appointment-info[_ngcontent-%COMP%]{display:flex;flex-direction:column}@media (min-width: 600px){.appointment-card[_ngcontent-%COMP%]   .appointment-info[_ngcontent-%COMP%]{flex-direction:row}}.appointment-card[_ngcontent-%COMP%]   .appointment-info[_ngcontent-%COMP%]   .appointment-icon[_ngcontent-%COMP%]{font-size:35px;background-color:var(--primary-color);color:var(--primary-color-contrast-text)!important;border-radius:8px 0 0 8px;padding:20px}@media (max-width: 599px){.appointment-card[_ngcontent-%COMP%]   .appointment-info[_ngcontent-%COMP%]   .appointment-icon[_ngcontent-%COMP%]{border-radius:8px 8px 0 0}}@media (min-width: 959px) and (max-width: 1460px){.appointment-card[_ngcontent-%COMP%]   .appointment-info[_ngcontent-%COMP%]   .appointment-icon[_ngcontent-%COMP%]{font-size:60px}}.appointment-card[_ngcontent-%COMP%]   .appointment-info[_ngcontent-%COMP%]   .appointment-details[_ngcontent-%COMP%]{margin:10px;font-size:16px;width:100%}@media (max-width: 959px){.appointment-card[_ngcontent-%COMP%]   .appointment-info[_ngcontent-%COMP%]   .appointment-details[_ngcontent-%COMP%]{margin:10px 0}}.reschedule-button-container[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-bottom:20px}.reschedule-button[_ngcontent-%COMP%]{display:flex;align-items:center;background-color:transparent;color:var(--link-file-color);border:none;font-size:14px;cursor:pointer;text-decoration:none;font-weight:600}@media (max-width: 959px){.reschedule-button[_ngcontent-%COMP%]{font-size:12px}}.reschedule-button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:18px;margin-right:5px}@media (max-width: 959px){.reschedule-button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:16px}}mat-expansion-panel[_ngcontent-%COMP%]{margin-bottom:10px}mat-expansion-panel[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]{border-bottom:1px solid var(--divider-color)!important}mat-button-toggle-group[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,100px);gap:8px;border:none!important;padding:1rem!important}mat-button-toggle-group[_ngcontent-%COMP%]   .mat-button-toggle[_ngcontent-%COMP%]{border:1px solid var(--primary-color-opacity-15);border-radius:10px;background-color:var(--primary-color-opacity-15)}mat-button-toggle-group[_ngcontent-%COMP%]   .mat-button-toggle-label-content[_ngcontent-%COMP%]{padding:0!important}.outline-expansion-panel.mat-expansion-panel[_ngcontent-%COMP%]   .mat-expansion-panel-header[_ngcontent-%COMP%]{padding:1rem 1.2rem;font-size:18px;border:1px solid var(--divider-color)!important;background-color:#fff}.outline-expansion-panel.mat-expansion-panel[_ngcontent-%COMP%]   .mat-expansion-panel-header.mat-expanded[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid var(--divider-color)!important;border-radius:0}.outline-expansion-panel.mat-expansion-panel[_ngcontent-%COMP%]   .mat-expansion-panel-header[_ngcontent-%COMP%]   .mat-expansion-panel-header-title[_ngcontent-%COMP%]{font-weight:600px!important}  vplus-prdv-step-plage-disponibilite .mat-expansion-panel-body{padding:0!important}.see-more[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:10px 20px 20px}.see-more.with-border-top[_ngcontent-%COMP%]{padding:20px 0;
1border-top:1px solid var(--divider-color);margin:0}.see-more[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-weight:600;color:var(--primary-color);background-color:transparent}.no-suggestions-message[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center}.no-suggestions-message[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:var(--primary-color);font-size:60px}.no-suggestions-message[_ngcontent-%COMP%]   .message[_ngcontent-%COMP%]{line-height:1.5}.display-none[_ngcontent-%COMP%]{display:none!important}"]}),i})();function t5(a,i){if(1&a&&c.nrm(0,"vplus-loading-spinner",5),2&a){const e=c.XpG();c.Y8G("loadingFailed",e.dataLoadingFailed)("showBackButtonOnError",!1)}}function i5(a,i){if(1&a&&(c.j41(0,"ion-item",15)(1,"ion-checkbox",21),c.EFF(2),c.k0s()()),2&a){const e=i.$implicit;c.Y8G("formGroupName",i.$index),c.R7$(2),c.SpI(" ",e.value.label," ")}}function n5(a,i){if(1&a&&(c.j41(0,"ion-item",15),c.nrm(1,"ion-checkbox",22),c.j41(2,"ion-label",23)(3,"ion-text"),c.EFF(4),c.k0s(),c.nrm(5,"br"),c.j41(6,"ion-text",20)(7,"sub"),c.EFF(8),c.k0s()()()()),2&a){const e=i.$implicit;c.Y8G("formGroupName",i.$index),c.R7$(4),c.JRh(e.value.label),c.R7$(4),c.Lme("",e.value.timeFrom," - ",e.value.timeTo,"")}}function r5(a,i){1&a&&c.nrm(0,"ion-spinner",20)}function s5(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",6)(1,"button",7),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.stepperPrevious())}),c.nrm(2,"i",8),c.j41(3,"span"),c.pXf(4,0),c.k0s()(),c.j41(5,"mat-label",9),c.pXf(6,1),c.k0s(),c.j41(7,"ion-grid",10)(8,"ion-row",11)(9,"ion-col")(10,"ion-item",12)(11,"ion-checkbox",13),c.pXf(12,2),c.k0s()(),c.j41(13,"ion-list",14),c.Z7z(14,i5,3,2,"ion-item",15,c.Vm6),c.k0s()(),c.j41(16,"ion-col")(17,"ion-item",12)(18,"ion-checkbox",16),c.pXf(19,3),c.k0s()(),c.j41(20,"ion-list",17),c.Z7z(21,n5,9,4,"ion-item",15,c.Vm6),c.k0s()()()()(),c.j41(23,"div",18)(24,"button",19),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.stepperNext())}),c.DNE(25,r5,1,0,"ion-spinner",20),c.j41(26,"ion-label"),c.pXf(27,4),c.k0s()()()}if(2&a){const e=c.XpG();c.R7$(8),c.Y8G("formGroup",e.disponibiliteForm),c.R7$(3),c.Y8G("indeterminate",null===e.enteteJours.value),c.R7$(3),c.Dyx(e.disponibiliteJours.controls),c.R7$(4),c.Y8G("indeterminate",null===e.entetePlages.value),c.R7$(3),c.Dyx(e.disponibilitePlages.controls),c.R7$(3),c.Y8G("disabled",!1===e.enteteJours.value||!1===e.entetePlages.value||e.isSubmitting),c.R7$(),c.vxM(25,e.isSubmitting?25:-1)}}let o5=(()=>{var a;class i extends be.dI{constructor(t,n,r,o){super(),this.formBuilder=t,this.rendezvousService=n,this.localisationService=r,this.visiteService=o,this.previous=new c.bkB,this.next=new c.bkB,this.dataLoaded=!1,this.dataLoadingFailed=!1,this.isSubmitting=!1,this.dayOfTheWeek=[{value:0,text:"Lundi"},{value:1,text:"Mardi"},{value:2,text:"Mercredi"},{value:3,text:"Jeudi"},{value:4,text:"Vendredi"},{value:5,text:"Samedi"},{value:6,text:"Dimanche"}],this.localisation=this.localisationService.getCurrentLocalisation()}ngOnInit(){this.visiteService.getPlageHoraires().pipe((0,Pr.Q)(this.destroy$)).subscribe({next:t=>{this.plageHoraires=t.reduce((n,r)=>(r.inspectionModeId===this.inspectionModeId&&r.isActif&&n.push({label:r.enumPlageLabels.get(this.localisation),plage:{timeFrom:r.startTime,timeTo:r.endTime}}),n),[]),this.onInit(),this.dataLoaded=!0},error:()=>{this.dataLoadingFailed=!0}})}onInit(){this.disponibiliteForm=this.formBuilder.group({enteteJours:[!1],jours:this.formBuilder.array([]),entetePlages:[!1],plages:this.formBuilder.array([])});for(const n of this.dayOfTheWeek)this.disponibiliteJours.push(this.formBuilder.group({label:n.text,indice:n.value,checked:!1}));for(const n of this.plageHoraires)this.disponibilitePlages.push(this.formBuilder.group({label:n.label,timeFrom:n.plage.timeFrom,timeTo:n.plage.timeTo,checked:!1}));this.enteteJours.valueChanges.pipe((0,Pr.Q)(this.destroy$)).subscribe(n=>{for(const r of this.disponibiliteJours.controls)r.patchValue({checked:n},{emitEvent:!1,onlySelf:!0})}),this.disponibiliteJours.valueChanges.pipe((0,Pr.Q)(this.destroy$)).subscribe(n=>{const r=new Set(n.map(l=>l.checked)),o=r.size>1?null:[...r][0];this.enteteJours.patchValue(o,{emitEvent:!1,onlySelf:!0})}),this.entetePlages.valueChanges.pipe((0,Pr.Q)(this.destroy$)).subscribe(n=>{for(const r of this.disponibilitePlages.controls)r.patchValue({checked:n},{emitEvent:!1,onlySelf:!0})}),this.disponibilitePlages.valueChanges.pipe((0,Pr.Q)(this.destroy$)).subscribe(n=>{const r=new Set(n.map(l=>l.checked)),o=r.size>1?null:[...r][0];this.entetePlages.patchValue(o,{emitEvent:!1,onlySelf:!0})})}get enteteJours(){return this.disponibiliteForm.get("enteteJours")}get disponibiliteJours(){return this.disponibiliteForm.get("jours")}get disponibiliteJoursValue(){return this.disponibiliteJours.value}get entetePlages(){return this.disponibiliteForm.get("entetePlages")}
1get disponibilitePlages(){return this.disponibiliteForm.get("plages")}get disponibilitePlagesValue(){return this.disponibilitePlages.value}stepperPrevious(){this.previous.emit()}stepperNext(){this.isSubmitting=!0;const t=!!this.enteteJours.value,n=this.disponibiliteJoursValue.filter(u=>t||u.checked),r=Number(n.reduce((u,f)=>`${f.indice}${u}`,"")),o=this.selectedJours!==r,l=!!this.entetePlages.value,h=this.disponibilitePlagesValue.filter(u=>l||u.checked),d=h.reduce((u,f)=>`${f.timeFrom}->${u}`,"");(o||this.selectedPlages!==d)&&(this.selectedJours=r,this.selectedPlages=d,this.rendezvousService.setPreferredDays(n.map(u=>u.indice)),this.rendezvousService.setPreferredPlages(h)),this.next.emit(),this.isSubmitting=!1}}return(a=i).\u0275fac=function(t){return new(t||a)(c.rXU(oe.ze),c.rXU(ks),c.rXU(es.A),c.rXU(Pi))},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-prdv-step-citoyen-disponibilite"]],inputs:{inspectionModeId:"inspectionModeId"},outputs:{previous:"previous",next:"next"},features:[c.Vt3],decls:2,vars:1,consts:()=>{let e,t,n,r,o;return e="\xC9tape pr\xE9c\xE9dente",t=" Quelles sont vos disponibilit\xE9s? ",n=" Tous les jours",r="Toutes les plages horaires",o="Suivant",[e,t,n,r,o,[3,"loadingFailed","showBackButtonOnError"],[1,"stepper-form-content"],[1,"no-margin-left","previous-button","hide-mobile",3,"click"],[1,"icon-left-arrow"],[1,"margin-bottom-1","block"],[1,"disponibilite-grid"],[3,"formGroup"],["mode","md",1,"ion-item-bold","ion-item-title"],["labelPlacement","end","justify","start","formControlName","enteteJours",3,"indeterminate"],["lines","none","formArrayName","jours","mode","md"],[3,"formGroupName"],["slot","start","formControlName","entetePlages","labelPlacement","end","justify","start",3,"indeterminate"],["lines","none","formArrayName","plages","mode","md"],[1,"stepper-bottom-actions"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click","disabled"],["color","primary"],["slot","start","formControlName","checked","labelPlacement","end","justify","start"],["slot","start","formControlName","checked"],[1,"time-frame"]]},template:function(t,n){1&t&&c.DNE(0,t5,1,2,"vplus-loading-spinner",5)(1,s5,28,5),2&t&&c.vxM(0,n.dataLoaded?1:0)},dependencies:[_i.nJ,$t.$z,oe.BC,oe.cb,oe.j4,oe.JD,oe.$R,oe.v8,Et.eY,Et.hU,Et.lO,Et.uz,Et.he,Et.nf,Et.ln,Et.w2,Et.IO,Et.hB,wo.N],styles:["vplus-prdv-step-citoyen-disponibilite ion-grid,   vplus-prdv-step-citoyen-disponibilite ion-col{padding-left:0!important}@media (max-width: 959px){  vplus-prdv-step-citoyen-disponibilite ion-grid,   vplus-prdv-step-citoyen-disponibilite ion-col{margin-bottom:15px}}  vplus-prdv-step-citoyen-disponibilite ion-grid ion-item.ion-item-title,   vplus-prdv-step-citoyen-disponibilite ion-col ion-item.ion-item-title{--inner-border-width: 0;border-bottom:1px solid var(--divider-color)}  vplus-prdv-step-citoyen-disponibilite ion-col:first-child{padding-right:20px!important}  vplus-prdv-step-citoyen-disponibilite ion-checkbox{margin-right:18px!important;font-size:16px}  vplus-prdv-step-citoyen-disponibilite .time-frame{font-size:16px!important}"]}),i})();function a5(a,i){1&a&&(c.j41(0,"h3"),c.pXf(1,1),c.k0s())}function l5(a,i){1&a&&(c.j41(0,"h3")(1,"span"),c.pXf(2,2),c.k0s(),c.nrm(3,"br"),c.j41(4,"span"),c.pXf(5,3),c.k0s()())}function c5(a,i){1&a&&(c.j41(0,"h3"),c.pXf(1,4),c.k0s())}let h5=(()=>{var a;class i{}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-prdv-step-confirmation"]],inputs:{isModification:"isModification",isAnnulation:"isAnnulation"},decls:9,vars:3,consts:()=>{let e,t,n,r,o;return e="Un courriel de confirmation vous sera envoy\xE9 sous peu. Si vous ne le recevez pas d\u2019ici quelques minutes, pensez \xE0 v\xE9rifier votre dossier de courriers ind\xE9sirables (spam).",t="Votre rendez-vous est confirm\xE9 !",n="Votre rendez-vous est",r="modifi\xE9 !",o="Votre rendez-vous a \xE9t\xE9 annul\xE9 !",[e,t,n,r,o,[1,"flat-window-container"],[1,"stepper-form-content"],[1,"confirmation-content","center"],[1,"icon-calendar-check-full"],[4,"ngIf"]]},template:function(t,n){1&t&&(c.j41(0,"div",5)(1,"div",6)(2,"div",7),c.nrm(3,"i",8),c.DNE(4,a5,2,0,"h3",9)(5,l5,6,0,"h3",9)(6,c5,2,0,"h3",9),c.j41(7,"p"),
1c.pXf(8,0),c.k0s()()()()),2&t&&(c.R7$(4),c.Y8G("ngIf",!n.isAnnulation&&!n.isModification),c.R7$(),c.Y8G("ngIf",!n.isAnnulation&&n.isModification),c.R7$(),c.Y8G("ngIf",n.isAnnulation&&n.isModification))},dependencies:[Qe.bT],styles:[".confirmation-content[_ngcontent-%COMP%]{padding:50px 18px 24px}.confirmation-content[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:80px;color:var(--primary-color)}.confirmation-content.center[_ngcontent-%COMP%]{text-align:center}.confirmation-content[_ngcontent-%COMP%]   .custom-button-center[_ngcontent-%COMP%]{min-width:50%}"]}),i})();const d5=["stepper"],p5=a=>({"filter-searche-global-active":a}),c_=a=>({"hide-mobile":a});function u5(a,i){if(1&a&&c.nrm(0,"vplus-loading-spinner",38),2&a){const e=c.XpG();c.Y8G("loadingFailed",e.dataLoadingFailed)("showBackButtonOnError",!1)}}function f5(a,i){1&a&&(c.j41(0,"span"),c.pXf(1,1),c.k0s())}function m5(a,i){1&a&&(c.j41(0,"span"),c.pXf(1,2),c.k0s(),c.j41(2,"span",55),c.pXf(3,3),c.k0s())}function g5(a,i){1&a&&(c.j41(0,"span"),c.pXf(1,4),c.k0s())}function v5(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",50)(1,"button",51),c.bIt("click",function(){c.eBV(e);const n=c.XpG(3);return c.Njj(n.onStepperPrevious())}),c.nrm(2,"i",52),c.k0s(),c.j41(3,"div",53),c.DNE(4,f5,2,0,"span")(5,m5,4,0)(6,g5,2,0),c.j41(7,"span",54),c.EFF(8),c.k0s()()()}if(2&a){const e=c.XpG(3);c.R7$(4),c.vxM(4,e.modeModification||e.isVerificationStep?e.modeModification&&!e.isVerificationStep?5:e.isVerificationStep?6:-1:4),c.R7$(4),c.JRh(e.detailsRendezVous.inspectionMode)}}function b5(a,i){if(1&a&&c.DNE(0,v5,9,2,"div",50),2&a){const e=c.XpG(2);c.vxM(0,e.isConfirmationStep?-1:0)}}function y5(a,i){1&a&&(c.j41(0,"h3"),c.pXf(1,5),c.k0s())}function S5(a,i){1&a&&(c.j41(0,"h3"),c.pXf(1,6),c.k0s(),c.j41(2,"span",55),c.pXf(3,7),c.k0s())}function C5(a,i){if(1&a&&(c.j41(0,"div",42),c.DNE(1,y5,2,0,"h3")(2,S5,4,0),c.k0s()),2&a){const e=c.XpG(2);c.R7$(),c.vxM(1,e.modeModification?2:1)}}function E5(a,i){1&a&&(c.j41(0,"span"),c.pXf(1,9),c.k0s())}function _5(a,i){if(1&a&&(c.j41(0,"h3"),c.pXf(1,8),c.k0s(),c.DNE(2,E5,2,0,"span")),2&a){const e=c.XpG(2);c.R7$(2),c.vxM(2,e.isConfirmationStep?-1:2)}}function T5(a,i){1&a&&(c.j41(0,"h3"),c.pXf(1,10),c.k0s(),c.j41(2,"span"),c.pXf(3,11),c.k0s())}function I5(a,i){1&a&&(c.j41(0,"span",55),c.pXf(1,13),c.k0s())}function x5(a,i){if(1&a&&(c.j41(0,"h3"),c.pXf(1,12),c.k0s(),c.DNE(2,I5,2,0,"span",55)),2&a){const e=c.XpG(2);c.R7$(2),c.vxM(2,e.isConfirmationStep?-1:2)}}function w5(a,i){1&a&&(c.j41(0,"span"),c.pXf(1,14),c.k0s())}function O5(a,i){1&a&&c.nrm(0,"i",56)}function A5(a,i){if(1&a){const e=c.RV6();c.j41(0,"vplus-prdv-step-invitation-code",57),c.bIt("next",function(n){c.eBV(e);const r=c.XpG(3);return c.Njj(r.onInvitationCodeNext(n))}),c.k0s()}}function P5(a,i){if(1&a&&(c.j41(0,"mat-step",48),c.DNE(1,A5,1,0,"ng-template",49),c.k0s()),2&a){const e=c.XpG(2);c.Y8G("label",e.EnumRendezvousSteps.CodeInvitation)}}function D5(a,i){if(1&a){const e=c.RV6();c.j41(0,"vplus-prdv-step-modification-action",58),c.bIt("next",function(n){c.eBV(e);const r=c.XpG(3);return c.Njj(r.onModificationActionNext(n))}),c.k0s()}if(2&a){const e=c.XpG(3);c.Y8G("visite",e.visiteInitial)}}function k5(a,i){if(1&a&&(c.j41(0,"mat-step",48),c.DNE(1,D5,1,1,"ng-template",49),c.k0s()),2&a){const e=c.XpG(2);c.Y8G("label",e.EnumRendezvousSteps.Action)}}function M5(a,i){if(1&a){const e=c.RV6();c.j41(0,"vplus-prdv-step-citoyen-contact",59),c.bIt("previous",function(){c.eBV(e);const n=c.XpG(3);return c.Njj(n.onStepperPrevious())})("next",function(n){c.eBV(e);const r=c.XpG(3);return c.Njj(r.onCitoyencontactNext(n))}),c.k0s()}if(2&a){const e=c.XpG(3);c.Y8G("citoyen",e.citoyenInitial)}}function L5(a,i){if(1&a&&(c.j41(0,"mat-step",48),c.DNE(1,M5,1,1,"ng-template",49),c.k0s()),2&a){const e=c.XpG(2);c.Y8G("label",e.EnumRendezvousSteps.ContactInfos)}}function R5(a,i){if(1&a){const e=c.RV6();c.j41(0,"vplus-prdv-step-citoyen-disponibilite",60),c.bIt("previous",function(){c.eBV(e);const n=c.XpG(3);return c.Njj(n.onStepperPrevious())})("next",function(){c.eBV(e);const n=c.XpG(3);return c.Njj(n.onCitoyenDispoNext())}),c.k0s()}if(2&a){const e=c.XpG(3);c.Y8G("inspectionModeId",e.inspectionModeId)}}function N5(a,i){if(1&a&&(c.j41(0,"mat-step",48),c.DNE(1,R5,1,1,"ng-template",49),c.k0s()),2&a){const e=c.XpG(2);c.Y8G("label",e.EnumRendezvousSteps.ContactDispos)}}function V5(a,i){if(1&a){const e=c.RV6();c.j41(0,"vplus-prdv-step-plage-disponibilite",61),c.bIt("previous",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.onStepperPrevious())})("next",function(n){c.eBV(e);const r=c.XpG(2);return c.Njj(r.onPlageDisponibiliteNext(n))}),c.k0s()}if(2&a){const e=c.XpG(2);c.Y8G("isActif",e.stepperReference.selectedIndex===e.stepIndexes.choixPlage)("isModeModification",e.modeModification)("visite",e.visiteInitial)("hidePlageCitoyen",e.hidePlageCitoyen)("aideTelephone",e.detailsRendezVous.telephone)("inspectionDuree",e.inspectionDuree)}}function F5(a,i){if(1&a){const e=c.RV6();c.j41(0,"vplus-prdv-step-proposition-resume",62),c.bIt("previous",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.onStepperPrevious())})("next",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.onPropositionResumeNext())}),c.k0s()}if(2&a){const e=c.XpG(2);c.Y8G("isModification",e.modeModification)("citoyen",e.citoyen)("visite",e.proposition)("detailsRendezVous",e.detailsRendezVous)("noteCitoyen",e.noteCitoyenFC.value)}}function B5(a,i){if(1&a&&c.nrm(0,"vplus-prdv-step-confirmation",63),2&a){const e=c.XpG(2);c.Y8G("isModification",e.modeModification)("isAnnulation",e.modeAnnulation)}}function H5(a,i){if(1&a&&(c.j41(0,"div",65)(1,"div",68),c.EFF(2),c.k0s(),c.j41(3,"div",69)(4,"div",70),c.EFF(5),c.
1k0s(),c.j41(6,"div")(7,"span"),c.pXf(8,15),c.k0s()()()()),2&a){const e=c.XpG(4);c.R7$(2),c.SpI(" ",e.detailsRendezVous.inspecteurInitialLetters," "),c.R7$(3),c.SpI(" ",e.detailsRendezVous.inspecteurNomComplet," ")}}function z5(a,i){1&a&&(c.j41(0,"h4"),c.pXf(1,16),c.k0s())}function X5(a,i){if(1&a&&(c.j41(0,"p"),c.nrm(1,"i",56),c.EFF(2),c.k0s(),c.j41(3,"p"),c.nrm(4,"i",56),c.EFF(5),c.k0s()),2&a){const e=c.XpG(4);c.R7$(2),c.SpI(" ",e.detailsRendezVous.inspectionMode,""),c.R7$(3),c.SpI(" ",e.detailsRendezVous.adresse,"")}}function j5(a,i){if(1&a&&(c.j41(0,"p"),c.nrm(1,"i",56),c.EFF(2),c.k0s(),c.j41(3,"p"),c.nrm(4,"i",56),c.EFF(5),c.k0s(),c.j41(6,"p"),c.nrm(7,"i",56),c.j41(8,"span")(9,"span"),c.pXf(10,17),c.k0s(),c.EFF(11),c.k0s()()),2&a){const e=c.XpG(4);c.R7$(2),c.SpI(" ",e.detailsRendezVous.inspectionMode,""),c.R7$(3),c.SpI(" ",e.detailsRendezVous.adresse,""),c.R7$(6),c.SpI(" ",e.detailsRendezVous.citoyenNomComplet,"")}}function U5(a,i){if(1&a&&(c.j41(0,"span",74)(1,"span"),c.pXf(2,19),c.k0s(),c.EFF(3),c.k0s()),2&a){const e=c.XpG(5);c.R7$(3),c.SpI(" ",e.detailsRendezVous.telephone,".")}}function W5(a,i){1&a&&(c.j41(0,"p"),c.pXf(1,20),c.k0s())}function $5(a,i){if(1&a&&(c.j41(0,"p"),c.pXf(1,18),c.k0s(),c.j41(2,"mat-form-field",71)(3,"textarea",72),c.EFF(4,"                    "),c.k0s()(),c.j41(5,"div",73),c.DNE(6,U5,4,1,"span",74)(7,W5,2,0),c.k0s()),2&a){const e=c.XpG(4);c.R7$(3),c.FS9("placeholder",e.labels.placeholder),c.Y8G("formControl",e.noteCitoyenFC),c.R7$(3),c.vxM(6,e.detailsRendezVous.telephone?6:7)}}function q5(a,i){if(1&a&&(c.j41(0,"p"),c.nrm(1,"i",56),c.EFF(2),c.k0s(),c.j41(3,"p"),c.nrm(4,"i",56),c.EFF(5),c.
1k0s(),c.j41(6,"p"),c.nrm(7,"i",56),c.j41(8,"span")(9,"span"),c.pXf(10,21),c.k0s(),c.EFF(11),c.k0s()(),c.j41(12,"p"),c.nrm(13,"i",56),c.EFF(14),c.k0s(),c.j41(15,"p"),c.nrm(16,"i",56),c.j41(17,"span")(18,"span"),c.pXf(19,22),c.k0s(),c.EFF(20),c.j41(21,"span"),c.pXf(22,23),c.k0s()()()),2&a){const e=c.XpG(4);c.R7$(2),c.SpI(" ",e.detailsRendezVous.inspectionMode,""),c.R7$(3),c.SpI(" ",e.detailsRendezVous.adresse,""),c.R7$(6),c.SpI(" ",e.detailsRendezVous.citoyenNomComplet,""),c.R7$(3),c.SpI(" ",e.detailsRendezVous.dateFormatte,""),c.R7$(6),c.SpI(" ",e.detailsRendezVous.inspecteurNomComplet," ")}}function G5(a,i){if(1&a&&(c.j41(0,"div",64),c.DNE(1,H5,9,2,"div",65)(2,z5,2,0),c.nrm(3,"div",66),c.j41(4,"div",67),c.DNE(5,X5,6,2)(6,j5,12,3)(7,$5,8,3)(8,q5,23,5),c.k0s()()),2&a){const e=c.XpG(3);c.Y8G("ngClass",c.eq3(6,c_,!e.isVerificationStep&&!e.isConfirmationStep)),c.R7$(),c.vxM(1,!e.hidePlageCitoyen&&4===e.stepperReference.selectedIndex||e.hidePlageCitoyen&&3===e.stepperReference.selectedIndex?1:2),c.R7$(4),c.vxM(5,1===e.stepperReference.selectedIndex?5:-1),c.R7$(),c.vxM(6,2===e.stepperReference.selectedIndex||3===e.stepperReference.selectedIndex&&!e.hidePlageCitoyen?6:-1),c.R7$(),c.vxM(7,4===e.stepperReference.selectedIndex&&!e.hidePlageCitoyen||e.hidePlageCitoyen&&3===e.stepperReference.selectedIndex?7:-1),c.R7$(),c.vxM(8,5===e.stepperReference.selectedIndex||e.hidePlageCitoyen&&4===e.stepperReference.selectedIndex?8:-1)}}function Y5(a,i){if(1&a&&(c.j41(0,"span"),c.pXf(1,25),c.k0s(),c.j41(2,"span"),c.EFF(3),c.k0s()),2&a){const e=c.XpG(4);c.R7$(3),c.SpI(" ",e.detailsRendezVous.telephone,".")}}function Q5(a,i){1&a&&(c.j41(0,"span"),c.pXf(1,26),c.k0s())}function J5(a,i){if(1&a&&(c.j41(0,"div",75)(1,"h4"),c.pXf(2,24),c.k0s(),c.nrm(3,"div",66),c.j41(4,"div",67),c.DNE(5,Y5,4,1)(6,Q5,2,0),c.k0s()()),2&a){const e=c.XpG(3);c.R7$(5),c.vxM(5,e.detailsRendezVous.telephone?5:6)}}function K5(a,i){if(1&a&&c.DNE(0,G5,9,8,"div",64)(1,J5,7,1),2&a){const e=c.XpG(2);c.vxM(0,e.stepperReference&&0!==e.stepperReference.selectedIndex?0:1)}}function Z5(a,i){if(1&a&&(c.j41(0,"div",65)(1,"div",68),c.EFF(2),c.k0s(),c.j41(3,"div",69)(4,"div",70),c.EFF(5),c.
1k0s(),c.j41(6,"div")(7,"span"),c.pXf(8,27),c.k0s()()()()),2&a){const e=c.XpG(4);c.R7$(2),c.SpI(" ",e.detailsRendezVous.inspecteurInitialLetters," "),c.R7$(3),c.SpI(" ",e.detailsRendezVous.inspecteurNomComplet," ")}}function eF(a,i){1&a&&(c.j41(0,"h4"),c.pXf(1,28),c.k0s())}function tF(a,i){if(1&a&&(c.j41(0,"p"),c.nrm(1,"i",56),c.EFF(2),c.k0s(),c.j41(3,"p"),c.nrm(4,"i",56),c.EFF(5),c.k0s(),c.j41(6,"p"),c.nrm(7,"i",56),c.j41(8,"span")(9,"span"),c.pXf(10,29),c.k0s(),c.EFF(11),c.k0s()()),2&a){const e=c.XpG(4);c.R7$(2),c.SpI(" ",e.detailsRendezVous.inspectionMode,""),c.R7$(3),c.SpI(" ",e.detailsRendezVous.adresse,""),c.R7$(6),c.SpI(" ",e.detailsRendezVous.citoyenNomComplet,"")}}function iF(a,i){if(1&a&&(c.j41(0,"span",74)(1,"span"),c.pXf(2,31),c.k0s(),c.EFF(3),c.k0s()),2&a){const e=c.XpG(5);c.R7$(3),c.SpI(" ",e.detailsRendezVous.telephone,".")}}function nF(a,i){1&a&&(c.j41(0,"p"),c.pXf(1,32),c.k0s())}function rF(a,i){if(1&a&&(c.j41(0,"p"),c.pXf(1,30),c.k0s(),c.j41(2,"mat-form-field",71)(3,"textarea",72),c.EFF(4,"                    "),c.k0s()(),c.j41(5,"div",73),c.DNE(6,iF,4,1,"span",74)(7,nF,2,0),c.k0s()),2&a){const e=c.XpG(4);c.R7$(3),c.FS9("placeholder",e.labels.placeholder),c.Y8G("formControl",e.noteCitoyenFC),c.R7$(3),c.vxM(6,e.detailsRendezVous.telephone?6:7)}}function sF(a,i){if(1&a&&(c.j41(0,"p"),c.nrm(1,"i",56),c.EFF(2),c.k0s(),c.j41(3,"p"),c.nrm(4,"i",56),c.EFF(5),c.
1k0s(),c.j41(6,"p"),c.nrm(7,"i",56),c.j41(8,"span")(9,"span"),c.pXf(10,33),c.k0s(),c.EFF(11),c.k0s()(),c.j41(12,"p"),c.nrm(13,"i",56),c.EFF(14),c.k0s(),c.j41(15,"p"),c.nrm(16,"i",56),c.j41(17,"span")(18,"span"),c.pXf(19,34),c.k0s(),c.EFF(20),c.j41(21,"span"),c.pXf(22,35),c.k0s()()()),2&a){const e=c.XpG(4);c.R7$(2),c.SpI(" ",e.detailsRendezVous.inspectionMode,""),c.R7$(3),c.SpI(" ",e.detailsRendezVous.adresse,""),c.R7$(6),c.SpI(" ",e.detailsRendezVous.citoyenNomComplet,""),c.R7$(3),c.SpI(" ",e.detailsRendezVous.dateFormatte,""),c.R7$(6),c.SpI(" ",e.detailsRendezVous.inspecteurNomComplet," ")}}function oF(a,i){if(1&a&&(c.j41(0,"div",64),c.DNE(1,Z5,9,2,"div",65)(2,eF,2,0),c.nrm(3,"div",66),c.j41(4,"div",67),c.DNE(5,tF,12,3)(6,rF,8,3)(7,sF,23,5),c.k0s()()),2&a){const e=c.XpG(3);c.Y8G("ngClass",c.eq3(5,c_,!e.isVerificationStep&&!e.isConfirmationStep)),c.R7$(),c.vxM(1,!e.hidePlageCitoyen&&3===e.stepperReference.selectedIndex||e.hidePlageCitoyen&&2===e.stepperReference.selectedIndex?1:2),c.R7$(4),c.vxM(5,!e.hidePlageCitoyen&&(1===e.stepperReference.selectedIndex||2===e.stepperReference.selectedIndex)||e.hidePlageCitoyen&&1===e.stepperReference.selectedIndex?5:-1),c.R7$(),c.vxM(6,!e.hidePlageCitoyen&&3===e.stepperReference.selectedIndex||e.hidePlageCitoyen&&2===e.stepperReference.selectedIndex?6:-1),c.R7$(),c.vxM(7,!e.hidePlageCitoyen&&4===e.stepperReference.selectedIndex||e.hidePlageCitoyen&&3===e.stepperReference.selectedIndex?7:-1)}}function aF(a,i){if(1&a&&c.DNE(0,oF,8,7,"div",64),2&a){const e=c.XpG(2);c.vxM(0,!e.modeAnnulation&&e.stepperReference&&0!==e.stepperReference.selectedIndex?0:-1)}}function lF(a,i){if(1&a&&(c.j41(0,"div",39)(1,"div",40),c.DNE(2,b5,1,1),c.k0s(),c.j41(3,"div",41),c.DNE(4,C5,3,1,"div",42),c.j41(5,"div",43),c.DNE(6,_5,3,1)(7,T5,4,0)(8,x5,3,1)(9,w5,2,0,"span"),c.k0s(),c.j41(10,"div",44)(11,"div",45)(12,"mat-horizontal-stepper",46,0),c.DNE(14,O5,1,0,"ng-template",47)(15,P5,2,1,"mat-step",48)(16,k5,2,1)(17,L5,2,1,"mat-step",48)(18,N5,2,1,"mat-step",48),c.j41(19,"mat-step",48),c.DNE(20,V5,1,6,"ng-template",49),c.k0s(),c.j41(21,"mat-step",48),c.DNE(22,F5,1,5,"ng-template",49),c.k0s(),c.j41(23,"mat-step",48),c.DNE(24,B5,1,2,"ng-template",49),c.k0s()()(),c.DNE(25,K5,2,1)(26,aF,1,1),c.k0s()(),c.nrm(27,"app-copyright-footer"),c.k0s()),2&a){const e=c.XpG();c.R7$(2),c.vxM(2,e.stepperReference&&0!==e.stepperReference.selectedIndex?2:-1),c.R7$(2),c.vxM(4,e.stepperReference&&0!==e.stepperReference.selectedIndex?-1:4),c.R7$(2),c.vxM(6,e.modeModification||e.isVerificationStep?-1:6),c.R7$(),c.vxM(7,e.isVerificationStep?7:-1),c.R7$(),c.vxM(8,e.modeModification&&!e.isVerificationStep?8:-1),c.R7$(),c.vxM(9,e.isConfirmationStep?9:-1),c.R7$(3),c.Y8G("@.disabled",!0)("linear",!0),c.R7$(3),c.vxM(15,e.modeModification?16:15),c.R7$(2),c.vxM(17,e.modeModification?-1:17),c.R7$(),c.vxM(18,e.hidePlageCitoyen?-1:18),c.R7$(),c.Y8G("label",e.EnumRendezvousSteps.ChoixPlage),c.R7$(2),c.Y8G("label",e.EnumRendezvousSteps.Verification),c.R7$(2),c.Y8G("label",e.EnumRendezvousSteps.Confirmation),c.R7$(2),c.vxM(25,e.modeModification?26:25)}}let zg=(()=>{var a;class i{constructor(){this.leaveMessage="Votre prise de rendez-vous en cours sera perdue. \xCAtes-vous s\xFBr de vouloir quitter?",this.store=(0,c.WQX)(O.il),this.activatedRoute=(0,c.WQX)(Bn.nX),this.router=(0,c.WQX)(Bn.Ix),this.rendezvousService=(0,c.WQX)(ks),this.visiteService=(0,c.WQX)(Pi),this.appConfig=(0,c.WQX)(Fn.o),this.localisationService=(0,c.WQX)(es.A),this.destroyRef=(0,c.WQX)(c.abz),this.leavePageWarningService=(0,c.WQX)(X4.g),this.dataLoaded=!1,this.dataLoadingFailed=!1,this.EnumRendezvousSteps=z4,this.hidePlageCitoyen=!0,this.modeModification=!1,this.modeAnnulation=!1,this.visiteInitial=null,this.citoyenInitial=null,this.citoyen=null,this.noteCitoyenFC=new oe.MJ(""),this.telMaskOQLFObjet=this.appConfig.appConfig.telMaskOQLFObjet,this.hasUnsavedChanges=!1,this.skipNextLeaveConfirmation=!1,this.labels={placeholder:"Exemples : Sonnez \xE0 la porte arri\xE8re, connexion Wi-Fi instable, stationnement \xE0 gauche du garage, etc."},this.selectIsSearchHeaderVisible$=this.store.select(Xe.selectIsSearchHeaderVisible),this.currentLocalisation=this.localisationService.getCurrentLocalisation(),this.plageHoraireConfig=[],this.formatHeure=this.currentLocalisation===pe.fi.FR?"HH:mm":"h:mm A",this.formatDate=this.currentLocalisation===pe.fi.FR?"dddd DD MMMM":"dddd, MMMM D,"}ngOnInit(){this.unregisterLeavePageHandler=this.leavePageWarningService.registerCanLeaveHandler(()=>this.confirmLeave()),this.destroyRef.onDestroy(()=>{var t;return null===(t=this.unregisterLeavePageHandler)||void 0===t?void 0:t.call(this)}),Q().locale(this.currentLocalisation),(0,Vg.z)([this.visiteService.getPlageHoraireConfigs(),this.activatedRoute.data,this.visiteService.getAideTelephone()]).pipe((0,ee.pQ)(this.destroyRef)).subscribe({next:([t,{visite:n},r])=>{this.plageHoraireConfig=t,this.visiteInitial=n,this.modeModification=!!this.visiteInitial,this.modeModification&&(this.rendezvousService.setModeLibre(),this.visiteInitial={...this.visiteInitial,inspectionMode:Fg.JH[n.inspectionModeId],adresse:n.adresse,citoyenNomComplet:n.citoyenNomComplet,inspecteurNomComplet:n.inspecteurNomComplet,inspecteurInitialLetters:this.getInitialsLetters(n.inspecteurNomComplet),dateFormatte:(0,mi.Zrt)(Q()(n.dateDebut).format(this.formatDate))+" \xE0 "+Q()(n.dateDebut).format(this.formatHeure)}),this.stepIndexes=this.craftStepIndexes(),this.rendezvousService.setVisite(this.visiteInitial),this.detailsRendezVous={...this.detailsRendezVous,telephone:this.getFormattedTelephone(r)},this.dataLoaded=!0},error:()=>{this.dataLoadingFailed=!0}})}onContentClick(){this.store.dispatch(Xe.Actions.setIsSearchHeaderVisible({payload:!1}))}get inspectionModeId(){var t,n,r;return null!==(t=null===(n=this.visiteInitial)||void 0===n?void 0:n.inspectionModeId)&&void 0!==t?t:null===(r=this.invitation)||void 0===r?void 0:r.inspectionModeId}onInvitationCodeNext(t){this.markAsDirty(),this.onStepperNext(),t&&(this.invitation=t,this.inspectionDuree=this.invitation.inspectionDuree,this.detailsRendezVous={...this.detailsRendezVous,inspectionMode:Fg.JH[this.invitation.inspectionModeId],adresse:this.invitation.adresse},this.hidePlageCitoyen=!this.plageHoraireConfig.find(n=>n.inspectionModeId===this.inspectionModeId).isActif,this.stepIndexes=this.craftStepIndexes())}onModificationActionNext(t){if("CANCEL"===t.action)return this.markAsDirty(),this.modeAnnulation=!0,this.stepperReference.linear=!1,this.stepperReference.selectedIndex=this.stepIndexes.confirmation,void this.refreshStep();this.citoyenInitial||(this.markAsDirty(),this.citoyen=t.citoyen,this.invitation=t.invitation,this.inspectionDuree=this.invitation.inspectionDuree,this.citoyenInitial=t.citoyen,this.hidePlageCitoyen=!this.plageHoraireConfig.find(n=>n.inspectionModeId===this.invitation.inspectionModeId).isActif,this.stepIndexes=this.craftStepIndexes(),this.rendezvousService.setInvitation(this.invitation),this.rendezvousService.setLangueCitoyen(this.citoyen.langCom),this.detailsRendezVous={...this.detailsRendezVous,inspectionMode:Fg.JH[this.invitation.inspectionModeId],adresse:this.invitation.adresse,citoyenNomComplet:this.citoyen.prenom+" "+this.citoyen.nom}),this.onStepperNext()}onCitoyencontactNext(t){this.citoyen=t,this.detailsRendezVous={...this.detailsRendezVous,citoyenNomComplet:this.citoyen.prenom+" "+this.citoyen.nom},this.onStepperNext()}onCitoyenDispoNext(){this.onStepperNext()}onPlageDisponibiliteNext(t){this.proposition={...t,invId:this.invitation.id,visiteId:this.invitation.visiteId,inspectionModeId:this.invitation.inspectionModeId,ueId:this.invitation.ueId},this.detailsRendezVous={...this.detailsRendezVous,inspecteurNomComplet:this.invitation.inspecteurNomComplet,inspecteurInitialLetters:this.getInitialsLetters(this.invitation.inspecteurNomComplet),date:this.proposition.startDate,dateFormatte:(0,mi.Zrt)(Q()(this.proposition.startDate).format(this.formatDate)+" \xE0 "+Q()(this.proposition.startDate).format(this.formatHeure))},this.visiteService.fetchInspecteurs().pipe((0,ee.pQ)(this.destroyRef)).subscribe(n=>{const r=n.find(o=>o.id===t.inspecteurId).nomComplet;this.detailsRendezVous={...this.detailsRendezVous,inspecteurNomComplet:r,inspecteurInitialLetters:this.getInitialsLetters(r),date:this.proposition.startDate,dateFormatte:(0,mi.Zrt)(Q()(this.proposition.startDate).format(this.formatDate)+" \xE0 "+Q()(this.proposition.startDate).format(this.formatHeure))},this.onStepperNext()})}getInitialsLetters(t){if(!t)return"";const n=t.trim().split(" ");return 1===n.length?n[0].substring(0,2).toUpperCase():(n[0].charAt(0)+n[n.length-1].charAt(0)).toUpperCase()}onPropositionResumeNext(){this.onStepperNext()}onStepperPrevious(){this.stepperReference.previous(),this.refreshStep(),0===this.stepperReference.selectedIndex&&this.resetLeaveProtection()}onStepperNext(){this.stepperReference.next(),this.refreshStep()}
1onBeforeUnload(t){!this.isPriseRendezvousRouteActive()||!this.hasUnsavedChanges||(t.preventDefault(),t.returnValue="")}confirmLeave(){if(!this.isPriseRendezvousRouteActive())return!0;if(this.skipNextLeaveConfirmation)return this.skipNextLeaveConfirmation=!1,!0;if(!this.hasUnsavedChanges)return!0;const t=window.confirm(this.leaveMessage);return t&&(this.skipNextLeaveConfirmation=!0,setTimeout(()=>{this.skipNextLeaveConfirmation=!1})),t}isPriseRendezvousRouteActive(){return this.router.url.includes("/teleinspection/rdv")}onLeaveConfirmed(){this.clearLeaveProtection()}refreshStep(){this.isConfirmationStep=this.hidePlageCitoyen&&this.stepperReference.selectedIndex===(this.modeModification?3:4)||!this.hidePlageCitoyen&&this.stepperReference.selectedIndex===(this.modeModification?4:5),this.isVerificationStep=this.hidePlageCitoyen&&this.stepperReference.selectedIndex===(this.modeModification?2:3)||!this.hidePlageCitoyen&&this.stepperReference.selectedIndex===(this.modeModification?3:4),this.isConfirmationStep&&this.resetLeaveProtection()}markAsDirty(){this.hasUnsavedChanges=!0}resetLeaveProtection(){this.clearLeaveProtection()}clearLeaveProtection(){this.hasUnsavedChanges=!1,this.skipNextLeaveConfirmation=!1}craftStepIndexes(){const t={codeInvitation:0,contactInfos:null,citoyenDispos:null,choixPlage:1,verification:2,confirmation:3};var n;return this.modeModification||(t.contactInfos=1,t.choixPlage++,t.verification++,t.confirmation++),this.hidePlageCitoyen||(t.citoyenDispos=(null!==(n=t.contactInfos)&&void 0!==n?n:0)+1,t.choixPlage++,t.verification++,t.confirmation++),t}getFormattedTelephone(t){return t.telephone?`${Ng.Ay.createMask(this.currentLocalisation===pe.fi.FR?this.appConfig.appConfig.telMaskOQLFObjet:this.appConfig.appConfig.telMaskObjet).resolve(t.telephone).substring(this.currentLocalisation===pe.fi.FR?1:0)}${t.telNumPoste?this.currentLocalisation===pe.fi.FR?`, poste ${t.telNumPoste}`:` #${t.telNumPoste}`:""}`:null}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-prise-rendezvous"]],viewQuery:function(t,n){if(1&t&&c.GBs(d5,5),2&t){let r;c.mGM(r=c.lsd())&&(n.stepperReference=r.first)}},hostBindings:function(t,n){1&t&&c.bIt("beforeunload",function(o){return n.onBeforeUnload(o)},!1,c.tSv)},decls:5,vars:11,consts:()=>{let e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S,E,_,T,I,w,A,M,D,L,V,G,W,te,$,Se,Ie,Re,Ne;return e="Prise de rendez-vous en ligne",t="G\xE9rer votre rendez-vous",n="Consultez, modifiez ou annulez votre rendez-vous",r="Confirmer le rendez-vous",o="Prise de rendez-vous en ligne",l="G\xE9rer votre rendez-vous",h="Consultez, modifiez ou annulez votre rendez-vous",d="Prise de rendez-vous en ligne",p="Renseignez les informations suivantes",u="Confirmer le rendez-vous",f="Veuillez v\xE9rifier les informations de votre rendez-vous ci-dessous avant de confirmer",m="G\xE9rer votre rendez-vous",g="Consultez, modifiez ou annulez votre rendez-vous",v="Confirmation du rendez-vous",b="Inspecteur",y="D\xE9tails du rendez-vous",S=" Pour",E="Si n\xE9cessaire, saisissez ci-dessous une note ou consigne \xE0 l\u2019attention de l\u2019inspecteur concernant le jour de l\u2019inspection :",_="Pour toute question, contactez le",T="Pour toute question, vous pouvez nous contacter par t\xE9l\xE9phone.",I=" Pour",w=" Avec",A="(Inspecteur)",M="Besoin d'aide?",D="Pour toute question, vous pouvez communiquer avec nous au num\xE9ro",L="Pour toute question, vous pouvez nous contacter par t\xE9l\xE9phone.",V="Inspecteur",G="D\xE9tails du rendez-vous",W=" Pour",te="Si n\xE9cessaire, saisissez ci-dessous une note ou consigne \xE0 l\u2019attention de l\u2019inspecteur concernant le jour de l\u2019inspection :",$="Pour toute question, contactez le",Se="Pour toute question, vous pouvez nous contacter par t\xE9l\xE9phone.",Ie=" Pour",Re=" Avec",Ne="(Inspecteur)",[["stepper",""],e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S,E,_,T,I,w,A,M,D,L,V,G,W,te,$,Se,Ie,Re,Ne,[1,"hide-desktop","mobile-header",3,"menuId","headerTitle","returnButtonType"],["id","creerRdv",3,"click","ngClass"],[3,"loadingFailed","showBackButtonOnError"],[1,"main-page-container"],[1,"hide-desktop"],[1,"standard-page-content"],[1,"rdv-title","hide-desktop"],[1,"rdv-title","hide-mobile"],[1,"rdv-container"],[1,"stepper-form"],[3,"linear"],["matStepperIcon","edit"],[3,"label"],["matStepContent",""],[1,"previous-banner"],[1,"no-margin-left",3,"click"],[1,"icon-left-arrow"],[1,"banner-infos"],[1,"font-weight-500"],[1,"font-weight-300"],[1,"icon-check"],[3,"next"],[3,"next","visite"],[3,"previous","next","citoyen"],[3,"previous","next","inspectionModeId"],[3,"previous","next","isActif","isModeModification","visite","hidePlageCitoyen","aideTelephone","inspectionDuree"],[3,"previous","next","isModification","citoyen","visite","detailsRendezVous","noteCitoyen"],[3,"isModification","isAnnulation"],[1,"info-container",3,"ngClass"],[1,"container"],[1,"info-container-space"],[1,"info-container-text"],[1,"circle"],[1,"inspector-container","display-block"],[1,"full-name"],["appearance","outline",1,"note-field","full-width"],["maxlength","500","cdkTextareaAutosize","","cdkAutosizeMinRows","3","matInput","",3,"formControl","placeholder"],[1,"detailsTelep
1hone"],[1,"detailsRendezVous"],[1,"info-container"]]},template:function(t,n){1&t&&(c.nrm(0,"vplus-mobile-header",36),c.j41(1,"ion-content",37),c.nI1(2,"async"),c.bIt("click",function(){return n.onContentClick()}),c.DNE(3,u5,1,2,"vplus-loading-spinner",38)(4,lF,28,15),c.k0s()),2&t&&(c.Y8G("menuId","creerRdv")("headerTitle","")("returnButtonType","home-button"),c.R7$(),c.AVh("no-scroll",!1),c.Y8G("ngClass",c.eq3(9,p5,c.bMT(2,7,n.selectIsSearchHeaderVisible$))),c.R7$(2),c.vxM(3,n.dataLoaded?4:3))},dependencies:[Ms.fg,_i.rl,j4.xb,Sp.V5,Sp.M6,Sp.xJ,Sp.yS,Qe.YU,oe.me,oe.BC,oe.tU,oe.l_,Tc.f,Et.W9,wo.N,U4.G,$4,p3,b3,_3,e5,o5,h5,Qe.Jj],styles:[".no-scroll[_ngcontent-%COMP%]{--overflow: hidden}  vplus-prise-rendezvous ion-spinner{margin-right:10px;width:20px;height:20px}  vplus-prise-rendezvous mat-label{font-weight:600}  vplus-prise-rendezvous vplus-prdv-step-citoyen-contact mat-label{font-weight:400!important}  vplus-prise-rendezvous .mat-stepper-horizontal{padding:30px 40px 0;border-radius:10px}@media (max-width: 959px){  vplus-prise-rendezvous .mat-stepper-horizontal{padding:0!important;background-color:transparent}}  vplus-prise-rendezvous .mat-horizontal-stepper-header-container{display:none}  vplus-prise-rendezvous .mat-horizontal-content-container{padding-top:0!important}@media (max-width: 959px){  vplus-prise-rendezvous .inline-container{margin-bottom:0!important}}  vplus-prise-rendezvous .custom-button-stepper{margin-top:6px;margin-left:0;width:100%;justify-content:center}  vplus-prise-rendezvous .mat-form-field.note-field .mat-form-field-wrapper{padding-bottom:0!important}  vplus-prise-rendezvous .previous-button{display:flex;align-items:center;background-color:transparent;border:none;font-size:16px;cursor:pointer;text-decoration:none;font-weight:600;padding:0!important;margin-bottom:25px}  vplus-prise-rendezvous .previous-button i{margin-left:-2px;margin-right:5px}@media (max-width: 959px){.standard-page-content[_ngcontent-%COMP%]{padding-top:0}}@media (min-width: 960px){.standard-page-content[_ngcontent-%COMP%]{padding-bottom:80px}}.hide-desktop.rdv-title[_ngcontent-%COMP%]{padding-top:30px}.hide-desktop[_ngcontent-%COMP%]   .previous-banner[_ngcontent-%COMP%]{display:flex;margin-bottom:25px;padding:10px!important;background-color:var(--primary-color)}.hide-desktop[_ngcontent-%COMP%]   .previous-banner[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background-color:transparent;color:var(--primary-color-contrast-text);padding-right:15px!important;font-size:15px}
1.hide-desktop[_ngcontent-%COMP%]   .previous-banner[_ngcontent-%COMP%]   .banner-infos[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:block;color:var(--primary-color-contrast-text)}.hide-desktop[_ngcontent-%COMP%]   .previous-banner[_ngcontent-%COMP%]   .banner-infos[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:last-child{margin-top:5px}  vplus-prise-rendezvous .previous-button:hover{background-color:transparent}.main-page-container[_ngcontent-%COMP%]{background-color:var(--primary-color-opacity-5)}.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;gap:60px;margin-top:25px}@media (max-width: 959px){.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]{margin-top:0;flex-direction:column;gap:20px}}.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .stepper-form[_ngcontent-%COMP%]{width:70%}@media (max-width: 959px){.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .stepper-form[_ngcontent-%COMP%]{width:100%}}.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]{width:30%;background-color:#fff;border-radius:10px;max-height:-moz-fit-content;max-height:fit-content}@media (max-width: 959px){.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]{width:100%}}.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{padding-left:20px;font-weight:600;font-size:18px}@media (min-width: 960px){.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-size:16px}}.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   .info-container-space[_ngcontent-%COMP%]{height:2px;background-color:var(--primary-color-opacity-5)}.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   .info-container-text[_ngcontent-%COMP%]{padding:10px 20px 20px}@media (min-width: 960px){.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   .info-container-text[_ngcontent-%COMP%]{font-size:16px}}.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   .info-container-text[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 0 10px;display:flex;align-items:flex-start}.main-page-container[_ngcontent-%COMP%]   .rdv-container[_ngcontent-%COMP%]   .info-container[_ngcontent-%COMP%]   .info-container-text[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{padding-right:6px;padding-top:7px;flex-shrink:0}.main-page-container[_ngcontent-%COMP%]   .container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}
1.main-page-container[_ngcontent-%COMP%]   .circle[_ngcontent-%COMP%]{width:50px;height:50px;background-color:var(--primary-color);border-radius:50%;display:flex;justify-content:center;align-items:center;color:#fff;font-size:20px;font-weight:700;text-align:center;margin:20px 10px 20px 20px}.main-page-container[_ngcontent-%COMP%]   .inspector-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.main-page-container[_ngcontent-%COMP%]   .full-name[_ngcontent-%COMP%]{font-size:18px;font-weight:600;padding-bottom:4px}@media (max-width: 959px){.main-page-container[_ngcontent-%COMP%]   .full-name[_ngcontent-%COMP%]{font-size:16px}}.main-page-container[_ngcontent-%COMP%]   .display-block[_ngcontent-%COMP%]{display:block}.note-field[_ngcontent-%COMP%]{font-size:14px;margin-bottom:-20px}textarea[_ngcontent-%COMP%]{box-sizing:border-box;outline:none;box-shadow:none;border:1px solid #ccc;transform:translateZ(0)}textarea[_ngcontent-%COMP%]:hover{border-color:#000}p[_ngcontent-%COMP%], .detailsRendezVous[_ngcontent-%COMP%]{line-height:1.5rem}.detailsTelephone[_ngcontent-%COMP%]{margin-top:5px}"]}),i})();const cF=(a,i)=>i[0];function hF(a,i){if(1&a){const e=c.RV6();c.j41(0,"span",10),c.bIt("click",function(){const n=c.eBV(e).$implicit,r=c.XpG();return c.Njj(r.selectChip(n[0]))}),c.EFF(1),c.k0s()}if(2&a){const e=i.$implicit,t=c.XpG();c.AVh("selected",t.raisonSelected()===e[0]),c.R7$(),c.SpI(" ",e[1]," ")}}let dF=(()=>{var a;class i{constructor(){this.dialogRef=(0,c.WQX)(Yi.CP),this.enumRaisonAnnulationEntries=Object.entries(pe.$E),this.raisonSelected=(0,c.vPA)(null)}close(t){this.dialogRef.close(t?this.raisonSelected():null)}selectChip(t){this.raisonSelected.set(t)}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["ng-component"]],standalone:!0,features:[c.aNF],decls:13,vars:1,consts:()=>{let e,t,n,r;return e="Vous \xEAtes sur le point d'annuler l'inspection",t="Pour continuer veuillez s\xE9lectionner la raison d'annulation :",n="Annuler",r="Confirmer",[e,t,n,r,["mat-dialog-content",""],[1,"custom-chip-list","column"],[1,"custom-chip",3,"selected"],["mat-dialog-actions","",1,"custom-dialog-actions"],["mat-button","","tabindex","1",1,"ion-custom-button-standard","ion-custom-button-outline",3,"click"],["tabindex","2",1,"ion-custom-button-standard","ion-custom-button-full",3,"click","disabled"],[1,"custom-chip",3,"click"]]},template:function(t,n){1&t&&(c.j41(0,"h3"),c.pXf(1,0),c.k0s(),c.j41(2,"div",4)(3,"p"),c.pXf(4,1),c.k0s(),c.j41(5,"div",5),c.Z7z(6,hF,2,3,"span",6,cF),c.k0s()(),c.j41(8,"div",7)(9,"ion-button",8),c.bIt("click",function(){return n.close(!1)}),c.pXf(10,2),c.k0s(),c.j41(11,"ion-button",9),c.bIt("click",function(){return n.close(!0)}),c.pXf(12,3),c.k0s()()),2&t&&(c.R7$(6),c.Dyx(n.enumRaisonAnnulationEntries),c.R7$(5),c.Y8G("disabled",!n.raisonSelected()))},dependencies:[Yi.hM,Yi.E7,Yi.Yi,hV],styles:[".custom-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end;margin-bottom:0!important}.custom-dialog-actions[_ngcontent-%COMP%]   .ion-custom-button-full[_ngcontent-%COMP%]{margin-left:1rem}.custom-chip-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-bottom:.5rem}.custom-chip-list.column[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}.custom-chip-list[_ngcontent-%COMP%]   .custom-chip[_ngcontent-%COMP%]{display:block;background:var(--light-grey-color);color:var(--dark-text-color);padding:8px 14px;transition:ease .15s;border-radius:36px;margin:0 .8rem .8rem 0;font-weight:500;cursor:pointer;font-size:1rem}@media (min-width: 1280px){.custom-chip-list[_ngcontent-%COMP%]   .custom-chip[_ngcontent-%COMP%]{font-size:.9rem}}.custom-chip-list[_ngcontent-%COMP%]   .custom-chip.selected[_ngcontent-%COMP%]{background:var(--primary-color);color:#fff}"],changeDetection:0}),i})();var h_=H(99327),d_=H(1975);function pF(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",4)(1,"button",27),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.takeSnapshot())}),c.nrm(2,"i",28),c.k0s()()}}function uF(a,i){1&a&&c.nrm(0,"i",29)}function fF(a,i){if(1&a&&(c.EFF(0),c.DNE(1,uF,1,0,"i",29)),2&a){const e=c.XpG(2);c.Lme(" ",e.visite().inspecteur.prenom," ",e.visite().inspecteur.nom," "),c.R7$(),c.vxM(1,e.inspecteurMicroMute()?1:-1)}}function mF(a,i){1&a&&c.nrm(0,"i",29)}function gF(a,i){if(1&a&&(c.EFF(0),c.DNE(1,mF,1,0,"i",29)),2&a){const e=c.XpG(2);c.Lme(" ",e.visite().participant.prenom," ",e.visite().participant.nom," "),c.R7$(),c.vxM(1,e.citoyenMicroMute()?1:-1)}}function vF(a,i){if(1&a&&(c.j41(0,"div",5),c.DNE(1,fF,2,3)(2,gF,2,3),c.k0s()),2&a){let e;const t=c.XpG();c.R7$(),c.vxM(1,"citoyen"===(e=t.role())?1:"inspecteur"===e?2:-1)}}function bF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",30,1),c.bIt("click",function(n){c.eBV(e);const r=c.sdS(1),o=c.XpG();return c.Njj(o.onNetworkQualityClick(r,n))}),c.nrm(2,"img",31),c.k0s()}if(2&a){const e=c.XpG();c.Y8G("matTooltip",e.networkQualityVm().label),c.BMQ("aria-label",e.networkQualityVm().label),c.R7$(2),c.Y8G("src",e.networkQualityVm().svgPath,c.B4B)("alt",e.networkQualityVm().label)}}function yF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",32),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.toggleSideMenu(n.EnumSessionSidePanel.PHOTOS))}),c.nrm(1,"i",33),c.k0s()}if(2&a){const e=c.XpG();c.AVh("active",e.sideMenu()===e.EnumSessionSidePanel.PHOTOS),c.Y8G("matBadgeHidden",!e.unreadDocuments())}}function SF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",34),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.toggleSideMenu(n.EnumSessionSidePanel.DOCUMENTS))}),c.nrm(1,"i",35),c.k0s()}}function CF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",36),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.toggleSideMenu(n.EnumSessionSidePanel.NOTES))}),c.nrm(1,"i",37),c.k0s()}if(2&a){const e=c.XpG();c.AVh("active",e.sideMenu()===e.EnumSessionSidePanel.NOTES)}}function EF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",38),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.shareScreen())}),c.nrm(1,"i",39)(2,"i",40),c.k0s()}if(2&a){const e=c.XpG();
1c.AVh("active",e.screenSharing()),c.Y8G("disabled",e.screenSharing())}}function _F(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",41),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.toggleSideMenu(n.EnumSessionSidePanel.BACKGROUND_IMAGES))}),c.nrm(1,"i",42),c.k0s()}if(2&a){const e=c.XpG();c.AVh("active",e.sideMenu()===e.EnumSessionSidePanel.BACKGROUND_IMAGES)}}function TF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",43),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.help())}),c.nrm(1,"i",44),c.k0s()}}function IF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",45),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.updateStateParleur())}),c.nrm(1,"i"),c.k0s()}if(2&a){const e=c.XpG();c.Y8G("matTooltip",e.visiteParleur()),c.R7$(),c.AVh("icon-volume",!e.muteParleur())("icon-volume-x",e.muteParleur())}}function xF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",24),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.switchModeCamera())}),c.nrm(1,"i",46),c.k0s()}if(2&a){const e=c.XpG();c.Y8G("disabled",!e.videoTrackInitialized())("matTooltip",e.visiteCameraMode())}}function wF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",49),c.bIt("click",function(){c.eBV(e);const n=c.XpG(2);return c.Njj(n.finish())}),c.pXf(1,3),c.k0s()}}function OF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",47),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.cancel())}),c.pXf(1,2),c.k0s(),c.DNE(2,wF,2,0,"button",48)}if(2&a){const e=c.XpG();c.R7$(2),c.vxM(2,e.visiteEnCours()?2:-1)}}let AF=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.twilioVideoService=(0,c.WQX)(be.Z7),this.snapshotEvent=(0,c.CGW)({alias:"snapshot"}),this.sharingEmitter=(0,c.CGW)({alias:"sharing"}),this.aideCitoyen=(0,c.CGW)({alias:"help"}),this.cancelSession=(0,c.CGW)({alias:"cancel"}),this.terminateSession=(0,c.CGW)({alias:"terminate"}),this.visite=this.store.selectSignal(Ot),this.role=this.store.selectSignal(ln),this.statut=this.store.selectSignal(kd),this.sideMenu=this.store.selectSignal(dc),this.muteParleur=this.store.selectSignal(km),this.muteMicrophone=this.store.selectSignal(uc),this.muteCamera=this.store.selectSignal(fc),this.modeCamera=this.store.selectSignal(Mm),this.plateform=this.store.selectSignal(Ta),this.screenSharing=this.store.selectSignal(RS),this.demandes=this.store.selectSignal(Ld),this.audioTrackInitialized=(0,ee.ot)(this.twilioVideoService.audioTrackInitialized$),this.videoTrackInitialized=(0,ee.ot)(this.twilioVideoService.videoTrackInitialized$),this.networkQualityLevel=this.store.selectSignal(nP),this.intervenants=this.store.selectSignal(Md),this.isRecording=this.store.selectSignal(pc),this.unreadMessages=this.store.selectSignal(VS),this.unreadDocuments=this.store.selectSignal(FS),this.visiteDemaree=(0,c.EWP)(()=>this.statut()===pe.CG.Demarree),this.visiteEnCours=(0,c.EWP)(()=>this.statut()===pe.CG.EnCours),this.visiteParleur=(0,c.EWP)(()=>this.muteParleur()?"Activer le haut-parleur":"D\xE9sactiver le haut-parleur"),this.visiteCamera=(0,c.EWP)(()=>this.muteCamera()?"Activer la cam\xE9ra":"D\xE9sactiver la cam\xE9ra"),this.visiteMicro=(0,c.EWP)(()=>this.muteMicrophone()?"Activer le micro":"D\xE9sactiver le micro"),this.visiteCameraMode=(0,c.EWP)(()=>"user"===this.modeCamera()?"Cam\xE9ra arri\xE8re":"Cam\xE9ra frontale"),this.showBadgeMessages=(0,c.EWP)(()=>this.unreadMessages()>0),this.showParticipantBadge=(0,c.EWP)(()=>this.demandes().length>0),this.inspecteur=(0,c.EWP)(()=>this.intervenants().find(t=>"inspecteur"===t.role)),this.citoyen=(0,c.EWP)(()=>this.intervenants().find(t=>"citoyen"===t.role)),this.inspecteurMicroMute=(0,c.EWP)(()=>{var t;return null===(t=this.inspecteur())||void 0===t?void 0:t.microphoneMute}),this.citoyenMicroMute=(0,c.EWP)(()=>{var t;return null===(t=this.citoyen())||void 0===t?void 0:t.microphoneMute}),this.networkQualityVm=(0,c.EWP)(()=>{const t=this.networkQualityLevel();return null===t?{label:"\xC9tat du r\xE9seau indisponible",svgPath:"assets/img/tutoriels/visite/network/signal-null.svg"}:pe.sC[t]}),this.EnumSessionSidePanel=r_,this.isTouchDevice=!1,this.tooltipOpened=!1}ngOnInit(){this.isTouchDevice=window.matchMedia("(pointer: coarse)").matches}onNetworkQualityClick(t,n){this.isTouchDevice&&(n.preventDefault(),n.stopPropagation(),this.tooltipOpened=!this.tooltipOpened,this.tooltipOpened?t.show():t.hide())}takeSnapshot(){this.snapshotEvent.emit()}shareScreen(){this.sharingEmitter.emit()}updateStateParleur(){this.store.dispatch(Ud())}updateStateMicro(){this.store.dispatch(Wd())}updateStateCamera(){this.store.dispatch($d())}switchModeCamera(){this.store.dispatch(qd())}toggleSideMenu(t){this.store.dispatch(vc({payload:t}))}help(){this.aideCitoyen.emit()}cancel(){this.cancelSession.emit()}finish(){this.terminateSession.emit()}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-teleinspection-footer"]],outputs:{snapshotEvent:"snapshot",sharingEmitter:"sharing",aideCitoyen:"help",cancelSession:"cancel",terminateSession:"terminate"},decls:30,vars:36,consts:()=>{let e,t,n,r,o,l,h,d,p,u,f,m;
1return e="Photos",t="Partage de fichiers",n="Participants",r="Conversation",o="Notes",l="Param\xE8tres",h="Partage d'\xE9cran",d="Image arri\xE8re plan",p="Aide",u="Prendre une photo",f=" Annuler la t\xE9l\xE9inspection ",m="Terminer la t\xE9l\xE9inspection",[["networkQualityBtn",""],["t","matTooltip"],f,m,[1,"insp-snapshot-button-margin"],[1,"visite-insp"],[1,"visite-toolbar","toolbar-animation"],[1,"left","hide-mobile"],["mat-icon-button","","matTooltip",e,"matBadge","i","matBadgeColor","primary",3,"active","matBadgeHidden"],["mat-icon-button","","matTooltip",t],["matBadge","i","mat-icon-button","","matTooltip",n,3,"click","matBadgeHidden"],[1,"icon-users"],["matBadgeColor","primary","mat-icon-button","","matTooltip",r,3,"click","matBadge","matBadgeHidden"],[1,"icon-message-square"],["mat-icon-button","","matTooltip",o,3,"active"],["mat-icon-button","","matTooltip",l,3,"click"],[1,"icon-parametres"],["mat-icon-button","","matTooltip",h,1,"visite-screen-share",3,"active","disabled"],["mat-icon-button","","matTooltip",d,3,"active"],["mat-icon-button","","matTooltip",p],[3,"ngTemplateOutlet"],[1,"center"],[1,"hide-desktop"],["mat-icon-button","",3,"matTooltip"],["mat-icon-button","",3,"click","disabled","matTooltip"],["mat-icon-button","",3,"disabled","matTooltip"],[1,"right","hide-mobile"],["mat-icon-button","","matTooltip",u,1,"snapshot-button",3,"click"],[1,"icon-camera"],[1,"icon-mic-off"],["mat-icon-button","","type","button","matTooltipPosition","above","matTooltipTouchGestures","on",1,"network-quality-button",3,"click","matTooltip"],[1,"network-quality-svg",3,"src","alt"],["mat-icon-button","","matTooltip",e,"matBadge","i","matBadgeColor","primary",3,"click","matBadgeHidden"],[1,"icon-image"],["mat-icon-button","","matTooltip",t,3,"click"],[1,"icon-file-plus"],["mat-icon-button","","matTooltip",o,3,"click"],[1,"icon-info-formulaire-login"],["mat-icon-button","","matTooltip",h,1,"visite-screen-share",3,"click","disabled"],[1,"icon-external-link"],[1,"icon-external-link-stop"],["mat-icon-button","","matTooltip",d,3,"click"],[1,"icon-background-blur"],["mat-icon-button","","matTooltip",p,3,"click"],[1,"icon-form-help"],["mat-icon-button","",3,"click","matTooltip"],[1,"icon-camera-switch"],["color","warn","mat-button","",3,"click"],["mat-button",""],["mat-button","",3,"click"]]},template:function(t,n){if(1&t){const r=c.RV6();c.DNE(0,pF,3,0,"div",4)(1,vF,3,1,"div",5)(2,bF,3,4,"ng-template",null,0,c.C5r),c.j41(4,"div",6)(5,"div",7),c.DNE(6,yF,2,3,"button",8)(7,SF,2,0,"button",9),c.j41(8,"button",10),c.bIt("click",function(){return c.eBV(r),c.Njj(n.toggleSideMenu(n.EnumSessionSidePanel.PARTICIPANTS))}),c.nrm(9,"i",11),c.k0s(),c.j41(10,"button",12),c.bIt("click",function(){return c.eBV(r),c.Njj(n.toggleSideMenu(n.EnumSessionSidePanel.CHAT))}),c.nrm(11,"i",13),c.k0s(),c.DNE(12,CF,2,2,"button",14),c.j41(13,"button",15),c.bIt("click",function(){return c.eBV(r),c.Njj(n.toggleSideMenu(n.EnumSessionSidePanel.PARAMETRES))}),c.nrm(14,"i",16),c.k0s(),c.DNE(15,EF,3,3,"button",17)(16,_F,2,2,"button",18)(17,TF,2,0,"button",19),c.eu8(18,20),c.k0s(),c.j41(19,"div",21)(20,"div",22),c.eu8(21,20),c.k0s(),c.DNE(22,IF,2,5,"button",23),c.j41(23,"button",24),c.bIt("click",function(){return c.eBV(r),c.Njj(n.updateStateMicro())}),c.nrm(24,"i"),c.k0s(),c.j41(25,"button",24),c.bIt("click",function(){return c.eBV(r),c.Njj(n.updateStateCamera())}),c.nrm(26,"i"),c.k0s(),c.DNE(27,xF,2,2,"button",25),c.k0s(),c.j41(28,"div",26),c.DNE(29,OF,3,1),c.k0s()()}if(2&t){const r=c.sdS(3);c.vxM(0,"inspecteur"===n.role()&&n.visiteEnCours()?0:-1),c.R7$(),c.vxM(1,n.visiteEnCours()?1:-1),c.R7$(3),c.AVh("transparent",n.visiteEnCours()),c.R7$(2),c.vxM(6,"inspecteur"===n.role()&&n.visiteEnCours()?6:-1),c.R7$(),c.vxM(7,"citoyen"===n.role()&&n.visiteEnCours()?7:-1),c.R7$(),c.AVh("active",n.sideMenu()===n.EnumSessionSidePanel.PARTICIPANTS),c.Y8G("matBadgeHidden",!n.showParticipantBadge()),c.R7$(2),c.AVh("active",n.sideMenu()===n.EnumSessionSidePanel.CHAT),c.Y8G("matBadge",n.unreadMessages())("matBadgeHidden",!n.showBadgeMessages()),c.R7$(2),c.vxM(12,"inspecteur"===n.role()?12:-1),c.R7$(),c.AVh("active",n.sideMenu()===n.EnumSessionSidePanel.PARAMETRES),c.R7$(2),c.vxM(15,"inspecteur"===n.role()&&n.visiteEnCours()?15:-1),c.R7$(),c.vxM(16,"inspecteur"===n.role()?16:-1),c.R7$(),c.vxM(17,"citoyen"===n.role()?17:-1),c.R7$(),c.Y8G("ngTemplateOutlet",r),c.R7$(3),c.Y8G("ngTemplateOutlet",r),c.R7$(),c.vxM(22,"pc"===n.plateform()?22:-1),c.R7$(),c.Y8G("disabled",!n.audioTrackInitialized())("matTooltip",n.visiteMicro()),c.R7$(),c.AVh("icon-mic",!n.muteMicrophone())("icon-mic-off",n.muteMicrophone()),c.R7$(),c.Y8G("disabled",!n.videoTrackInitialized())("matTooltip",n.visiteCamera()),c.R7$(),c.AVh("icon-video",!n.muteC
1amera())("icon-video-off",n.muteCamera),c.R7$(),c.vxM(27,"mobile"===n.plateform()?27:-1),c.R7$(2),c.vxM(29,"inspecteur"===n.role()?29:-1)}},dependencies:[$t.$z,$t.iY,xr.oV,d_.k,Qe.T3],encapsulation:2}),i})();function PF(a,i){if(1&a&&c.nrm(0,"vplus-session-countup",4),2&a){const e=c.XpG();c.Y8G("mode","mobile")("visite-statut",e.statut())("starting-date",e.dateDemarrage())}}function DF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",18),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.toggleSideMenu(n.EnumSessionSidePanel.PHOTOS))}),c.nrm(1,"i",19),c.k0s()}if(2&a){const e=c.XpG();c.Y8G("matBadge","i")("matBadgeHidden",!e.unreadDocuments())}}function kF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",20),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.toggleSideMenu(n.EnumSessionSidePanel.DOCUMENTS))}),c.nrm(1,"i",21),c.k0s()}}function MF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",22),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.help())}),c.nrm(1,"i",23),c.k0s()}}function LF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",24),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.cancel())}),c.pXf(1,0),c.k0s()}}function RF(a,i){if(1&a){const e=c.RV6();c.j41(0,"button",25),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.finish())}),c.pXf(1,1),c.k0s()}}let NF=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.appConfig=(0,c.WQX)(Fn.o),this.aideCitoyen=(0,c.CGW)({alias:"help"}),this.cancelSession=(0,c.CGW)({alias:"cancel"}),this.terminateSession=(0,c.CGW)({alias:"terminate"}),this.role=(0,ee.ot)(this.store.select(ln)),this.dateDemarrage=(0,ee.ot)(this.store.select(Lm)),this.statut=(0,ee.ot)(this.store.select(kd)),this.isRecording=(0,ee.ot)(this.store.select(pc)),this.unreadMessages=(0,ee.ot)(this.store.select(VS)),this.unreadDocuments=(0,ee.ot)(this.store.select(FS)),this.visiteEnCours=(0,c.EWP)(()=>this.statut()===pe.CG.EnCours),this.visiteDemaree=(0,c.EWP)(()=>this.statut()===pe.CG.Demarree),this.showBadgeMessages=(0,c.EWP)(()=>this.unreadMessages()>0),this.EnumSessionSidePanel=r_,this.allowRecordTeleinspectionParam=!!this.appConfig.appConfig.paramList[pe.fW.AllowRecordTeleinspection]}switchSessionRecording(){this.store.dispatch(jm())}toggleSideMenu(t){this.store.dispatch(vc({payload:t}))}help(){this.aideCitoyen.emit()}cancel(){this.cancelSession.emit()}finish(){this.terminateSession.emit()}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-teleinspection-header-mobile"]],outputs:{aideCitoyen:"help",cancelSession:"cancel",terminateSession:"terminate"},decls:16,vars:8,consts:()=>{let e,t,n,r,o,l,h,d;return e="Photos",t="Partage de fichiers",n="Participants",r="Conversation",o="Param\xE8tres",l="Aide",h="Annuler la t\xE9l\xE9inspection",d="Terminer la t\xE9l\xE9inspection",[h,d,[1,"visite-mobile-header-top"],[1,"left"],[3,"mode","visite-statut","starting-date"],[1,"right"],["mat-icon-button","","matTooltip",e,"matBadgeColor","primary",3,"matBadge","matBadgeHidden"],["mat-icon-button","","matTooltip",t],["mat-icon-button","","matTooltip",n,3,"click"],[1,"icon-users"],["matBadgeColor","primary","mat-icon-button","","matTooltip",r,3,"click","matBadge","matBadgeHidden"],[1,"icon-message-square"],["mat-icon-button","","matTooltip",o,3,"click"],[1,"icon-parametres"],["mat-icon-button","","matTooltip",l],[1,"visite-mobile-header-bottom"],["color","warn","mat-button",""],["mat-button",""],["mat-icon-button","","matTooltip",e,"matBadgeColor","primary",3,"click","matBadge","matBadgeHidden"],[1,"icon-background-blur"],["mat-icon-button","","matTooltip",t,3,"click"],[1,"icon-file-plus"],["mat-icon-button","","matTooltip",l,3,"click"],[1,"icon-form-help"],["color","warn","mat-button","",3,"click"],["mat-button","",3,"click"]]},template:function(t,n){1&t&&(c.j41(0,"div",2)(1,"div",3),c.DNE(2,PF,1,3,"vplus-session-countup",4),c.k0s(),c.j41(3,"div",5),c.DNE(4,DF,2,2,"button",6)(5,kF,2,0,"button",7),c.j41(6,"button",8),c.bIt("click",function(){return n.toggleSideMenu(n.EnumSessionSidePanel.PARTICIPANTS)}),c.nrm(7,"i",9),c.k0s(),c.j41(8,"button",10),c.bIt("click",function(){return n.toggleSideMenu(n.EnumSessionSidePanel.CHAT)}),c.nrm(9,"i",11),c.k0s(),c.j41(10,"button",12),c.bIt("click",function(){return n.toggleSideMenu(n.EnumSessionSidePanel.PARAMETRES)}),c.nrm(11,"i",13),c.k0s(),c.DNE(12,MF,2,0,"button",14),c.k0s()(),c.j41(13,"div",15),c.DNE(14,LF,2,0,"button",16)(15,RF,2,0,"button",17),c.k0s()),2&t&&(c.R7$(2),c.vxM(2,n.visiteDemaree()||n.visiteEnCours()?2:-1),c.R7$(2),c.vxM(4,"inspecteur"===n.role()&&n.visiteEnCours()?4:-1),c.R7$(),c.vxM(5,"citoyen"===n.role()&&n.visiteEnCours()?5:-1),c.R7$(3),c.Y8G("matBadge",n.unreadMessages())("matBadgeHidden",!n.showBadgeMessages()),c.R7$(4),c.vxM(12,"citoyen"===n.role()?12:-1),c.R7$(2),c.vxM(14,"inspecteur"===n.role()?14:-1),c.R7$(),c.vxM(15,"inspecteur"===n.role()&&n.visiteEnCours()?15:-1))},dependencies:[$t.$z,$t.iY,xr.oV,d_.k,$m],encapsulation:2}),i})();
1const p_=(a,i)=>i.id;function VF(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",9)(1,"div",13)(2,"button",14),c.bIt("click",function(){const n=c.eBV(e).$implicit,r=c.XpG();return c.Njj(r.supprimerDocumentCitoyen(n))}),c.nrm(3,"i",15),c.k0s(),c.j41(4,"a",16),c.nrm(5,"i",17),c.k0s()(),c.j41(6,"div",18),c.nrm(7,"img",19),c.k0s()()}if(2&a){const e=i.$implicit,t=c.XpG();c.R7$(2),c.Y8G("disabled",t.showImageLoader()),c.R7$(2),c.Y8G("href",e.url,c.B4B),c.R7$(3),c.Y8G("src",e.url,c.B4B)}}function FF(a,i){1&a&&c.nrm(0,"vplus-loading-spinner",10),2&a&&c.Y8G("message",null)}function BF(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",20)(1,"button",21),c.bIt("click",function(){c.eBV(e);const n=c.XpG().$implicit,r=c.XpG();return c.Njj(r.supprimerDocumentCitoyen(n))}),c.k0s(),c.j41(2,"a",22),c.EFF(3),c.k0s()()}if(2&a){const e=c.XpG().$implicit,t=c.XpG();c.R7$(),c.Y8G("disabled",t.showFileLoader()),c.R7$(),c.Y8G("href",e.url,c.B4B),c.R7$(),c.JRh(e.nameNewAdd)}}function HF(a,i){1&a&&c.DNE(0,BF,4,3,"div",20),2&a&&c.vxM(0,i.$implicit.nameNewAdd?0:-1)}function zF(a,i){1&a&&c.nrm(0,"vplus-loading-spinner",12),2&a&&c.Y8G("message",null)}let XF=(()=>{var a;class i{constructor(){this.actions$=(0,c.WQX)(ye.En),this.store=(0,c.WQX)(O.il),this.destroyRef=(0,c.WQX)(c.abz),this.visite=(0,ee.ot)(this.store.select(Ot)),this.photoPartagees=(0,ee.ot)(this.store.select(HS)),this.fichierPartages=(0,ee.ot)(this.store.select(iP)),this.showImageLoader=(0,c.vPA)(!1),this.showFileLoader=(0,c.vPA)(!1),this.uploadPhotoPath=(0,c.EWP)(()=>`_visite/${this.visite().id}/citoyen/photos`),this.uploadFichierPath=(0,c.EWP)(()=>`_visite/${this.visite().id}/citoyen/fichiers`),this.EnumTypeDocumentVisiteId=pe.OL}ngOnInit(){this.actions$.pipe((0,ye.gp)(tC),(0,ee.pQ)(this.destroyRef)).subscribe(({payload:t})=>{t===pe.OL.PartagePhotoCitoyen?this.showImageLoader.set(!1):this.showFileLoader.set(!1)})}onSelectFile(t){t===pe.OL.PartagePhotoCitoyen?this.showImageLoader.set(!0):this.showFileLoader.set(!0)}onUploadSuccess(t,n){this.store.dispatch(Fd({payload:{typDocId:t,document:n}}))}supprimerDocumentCitoyen(t){this.store.dispatch(Vd({payload:t.id}))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-sidepanel-partage"]],decls:18,vars:8,consts:()=>{let e,t,n,r,o;return e="Partage de fichiers",t="Ajouter une photo",n="Ajouter un fichier",r=" Supprimer",o="T\xE9l\xE9charger",[e,t,n,[1,"no-margin-bottom"],[1,"panel-partage-files"],["autocomplete","off"],["accept","image/*",1,"primary-file-upload",3,"onSelectFile","uploadSuccess","multiple","uploadPath","disabled"],[1,"visite-photo-list-wrapper"],[1,"visite-photo-list"],[1,"visite-photo"],[1,"visite-photo",3,"message"],[1,"primary-file-upload",3,"onSelectFile","uploadSuccess","multiple","uploadPath","disabled"],[3,"message"],[1,"visite-photo-actions"],["matTooltip",r,"mat-ripple","","type","button",3,"click","disabled"],[1,"icon-trash"],["matTooltip",o,"mat-ripple","",3,"href"],[1,"icon-download"],[1,"visite-photo-image-wrapper"],[3,"src"],[1,"file-container","margin-bottom-5-px"],["type","button",1,"close","icon-x-circle-full","file-icon",3,"click","disabled"],[1,"file-name","font-size-14",3,"href"]]},template:function(t,n){1&t&&(c.j41(0,"h3",3),c.pXf(1,0),c.k0s(),c.j41(2,"div",4)(3,"form",5)(4,"p",3),c.pXf(5,1),c.k0s(),c.j41(6,"vplus-file-uploader",6),c.bIt("onSelectFile",function(){return n.onSelectFile(n.EnumTypeDocumentVisiteId.PartagePhotoCitoyen)})("uploadSuccess",function(o){return n.onUploadSuccess(n.EnumTypeDocumentVisiteId.PartagePhotoCitoyen,o)}),c.k0s(),c.j41(7,"div",7)(8,"div",8),c.Z7z(9,VF,8,3,"div",9,p_),c.DNE(11,FF,1,1,"vplus-loading-spinner",10),c.k0s()(),c.j41(12,"p",3),c.pXf(13,2),c.k0s(),c.j41(14,"vplus-file-uploader",11),c.bIt("onSelectFile",function(){return n.onSelectFile(n.EnumTypeDocumentVisiteId.PartageFichierCitoyen)})("uploadSuccess",function(o){return n.onUploadSuccess(n.EnumTypeDocumentVisiteId.PartageFichierCitoyen,o)}),c.k0s(),c.Z7z(15,HF,1,1,null,null,p_),c.DNE(17,zF,1,1,"vplus-loading-spinner",12),c.k0s()()),2&t&&(c.R7$(6),c.Y8G("multiple",!1)("uploadPath",n.uploadPhotoPath())("disabled",n.showImageLoader()),c.R7$(3),c.Dyx(n.photoPartagees()),c.R7$(2),c.vxM(11,n.showImageLoader()?11:-1),c.R7$(3),c.Y8G("multiple",!1)("uploadPath",n.uploadFichierPath())("disabled",n.showFileLoader()),c.R7$(),c.Dyx(n.fichierPartages()),c.R7$(2),c.vxM(17,n.showFileLoader()?17:-1))},dependencies:[xr.oV,Aa.r6,oe.qT,oe.cb,oe.cV,o_.e,wo.N],styles:[".e-file-drop{display:none}  .e-upload{border:none;padding-bottom:10px}  .e-upload ul.e-upload-files{display:none}.panel-partage-files[_ngcontent-%COMP%]{overflow-y:auto;height:calc(100vh - 110px);margin-top:0}"]}),i})();const jF=["inspecteurVideo"],UF=["citoyenVideo"];function WF(a,i){if(1&a&&c.nrm(0,"vplus-session-card-visite-demarree",8),2&a){const e=c.XpG();c.Y8G("role",e.role())}}function $F(a,i){if(1&a&&c.nrm(0,"vplus-session-snapshot",10),2&a){const e=c.XpG(),t=c.sdS(9);
1c.Y8G("taking-snapshot",e.takingSnapshot())("video-width",t.clientWidth)("video-height",t.clientHeight)}}function qF(a,i){if(1&a&&(c.j41(0,"div",11),c.nrm(1,"i",20),c.j41(2,"h3"),c.EFF(3),c.k0s()()),2&a){let e;const t=c.XpG();c.R7$(3),c.JRh(null==(e=t.citoyen())?null:e.pseudo)}}function GF(a,i){if(1&a&&(c.j41(0,"div",14),c.nrm(1,"i",20),c.j41(2,"h3"),c.EFF(3),c.k0s()()),2&a){let e;const t=c.XpG();c.R7$(3),c.JRh(null==(e=t.citoyen())?null:e.pseudo)}}function YF(a,i){if(1&a&&(c.j41(0,"div",15),c.nrm(1,"i",20),c.j41(2,"h3",21),c.EFF(3),c.k0s()()),2&a){let e;const t=c.XpG();c.R7$(3),c.JRh(null==(e=t.inspecteur())?null:e.pseudo)}}function QF(a,i){1&a&&c.nrm(0,"vplus-session-sidepanel-parametre")}function JF(a,i){1&a&&c.nrm(0,"vplus-session-sidepanel-background-image")}function KF(a,i){1&a&&c.nrm(0,"vplus-session-sidepanel-chat")}function ZF(a,i){1&a&&c.nrm(0,"vplus-session-sidepanel-participants")}function e8(a,i){1&a&&c.nrm(0,"vplus-session-sidepanel-note")}function t8(a,i){1&a&&c.nrm(0,"vplus-session-sidepanel-photos")}function i8(a,i){1&a&&c.nrm(0,"vplus-session-sidepanel-partage")}let Xg=(()=>{var a;class i{constructor(){this.actions$=(0,c.WQX)(ye.En),this.serviceDocument=(0,c.WQX)(Qe.qQ),this.store=(0,c.WQX)(O.il),this.destroyRef=(0,c.WQX)(c.abz),this.localisationService=(0,c.WQX)(es.A),this.visiteService=(0,c.WQX)(Pi),this.appConfig=(0,c.WQX)(Fn.o),this.dialog=(0,c.WQX)(Yi.bZ),this.twilioVideoService=(0,c.WQX)(be.Z7),this.breakpointObserver=(0,c.WQX)(h_.QP),this.deviceChangedEmitter=(0,c.CGW)({alias:"deviceChange"}),this.dateDemarrage=this.store.selectSignal(Lm),this.visite=this.store.selectSignal(Ot),this.role=this.store.selectSignal(ln),this.statut=this.store.selectSignal(kd),this.sideMenu=this.store.selectSignal(dc),this.messageAideCitoyen=this.store.selectSignal(YA),this.screenSharing=this.store.selectSignal(RS),this.takingSnapshot=this.store.selectSignal(QA),this.identity=this.store.selectSignal(qS),this.muteCamera=this.store.selectSignal(fc),this.muteMicrophone=this.store.selectSignal(uc),this.plateform=this.store.selectSignal(Ta),this.demandes=this.store.selectSignal(Ld),this.intervenants=this.store.selectSignal(Md),this.loading=(0,c.vPA)(!1),this.locale=this.localisationService.getCurrentLocalisation(),this.allowLocalisationParam=!!this.appConfig.appConfig.paramList[pe.fW.AllowLocalisation],this.allowRecordTeleinspectionParam=!!this.appConfig.appConfig.paramList[pe.fW.AllowRecordTeleinspection],this.deviceChangeListener=null,this.snapshotSection=(0,c.ebz)(bp),this.visiteDemarree=(0,c.EWP)(()=>this.statut()===pe.CG.Demarree),this.visiteEnCours=(0,c.EWP)(()=>this.statut()===pe.CG.EnCours),this.sidePanelOpened=(0,c.EWP)(()=>null!==this.sideMenu()),this.localMediaContainer=(0,c.EWP)(()=>"citoyen"===this.role()?this.citoyenMediaContainer:this.inspecteurMediaContainer),this.remoteMediaContainer=(0,c.EWP)(()=>"inspecteur"===this.role()?this.citoyenMediaContainer:this.inspecteurMediaContainer),this.inspecteur=(0,c.EWP)(()=>this.intervenants().find(t=>"inspecteur"===t.role)),this.citoyen=(0,c.EWP)(()=>this.intervenants().find(t=>"citoyen"===t.role)),this.inspecteurCameraMute=(0,c.EWP)(()=>{var t;return null===(t=this.inspecteur())||void 0===t?void 0:t.cameraMute}),this.citoyenCameraMute=(0,c.EWP)(()=>{var t;return null===(t=this.citoyen())||void 0===t?void 0:t.cameraMute}),this.toastPositionInitial={X:"10px",Y:"75%"},this.toastWidthInitial="400px",this.toastPosition=(0,c.vPA)(this.toastPositionInitial),this.toastButtons=[{model:{content:"Accepter",cssClass:"e-accept"},click:this.acceptIntervenant.bind(this)},{model:{content:"Refuser",cssClass:"e-reject"},click:this.rejectIntervenant.bind(this)}],this.toastWidth=(0,c.vPA)(this.toastWidthInitial),this.monitoringSideMenu=(0,c.QZP)(()=>{"participants"===this.sideMenu()&&this.toastObj&&this.fermerToast()})}ngOnInit(){if(this.breakpointObserver.observe(h_.Rp.HandsetPortrait).pipe((0,ee.pQ)(this.destroyRef)).subscribe(({matches:t})=>{this.toastWidth.set(t?"100%":this.toastWidthInitial),this.toastPosition.set(t?{X:"Left",Y:"Bottom"}:this.toastPositionInitial)}),this.allowRecordTeleinspectionParam&&localStorage.getItem("confEnreg")){const t=JSON.parse(localStorage.getItem("confEnreg"));this.store.dispatch(xa({payload:!!t.recording}))}this.visiteService.fetchInspectionConversations(this.visite().id).pipe((0,ee.pQ)(this.destroyRef)).subscribe(t=>{this.store.dispatch(Rd({payload:t}))}),this.visiteService.fetchInspectionNotes(this.visite().id).pipe((0,ee.pQ)(this.destroyRef)).subscribe(t=>{localStorage.getItem("visiteId")!==this.visite().id?(localStorage.setItem("noteId",(0,mi.SiN)()),localStorage.setItem("visiteId",this.visite().id),this.store.dispatch(Hd({payload:""}))):t.length>0&&localStorage.getItem("noteId")===t[0].id?this.store.dispatch(Hd({payload:t[0].contenu.replace(/<br>/g,"")})):localStorage.setItem("noteId",(0,mi.SiN)()),this.store.dispatch(iC({payload:t.filter(n=>n.id!==localStorage.getItem("noteId"))}))}),this.visiteService.getEtiquetteList().pipe((0,ee.pQ)(this.destroyRef)).subscribe(t=>{this.store.dispatch(nC({payload:t}))}),this.twilioVideoService.participantConnected$.pipe((0,ee.pQ)(this.destroyRef)).subscribe(t=>{const{role:n,id:r,pseudo:o}=Ar(t.identity);this.store.dispatch(Bm({payload:{id:r,pseudo:o,role:n,cameraMute:!0,microphoneMute:!0}})),this.store.dispatch(new Xe.Actions.ShowSnackBar("Participant"+" "+o+" "+"est arriv\xE9"))}),this.twilioVideoService.participantDisconnected$.pipe((0,ee.pQ)(this.destroyRef)).subscribe(t=>{const{id:n,pseudo:r}=Ar(t.identity);this.store.dispatch(fC({payload:n})),this.store.dispatch(new Xe.Actions.ShowSnackBar("Participant"+" "+r+" "+"a quitt\xE9"))}),this.twilioVideoService.recordingStarted$.pipe((0,ee.pQ)(this.destroyRef)).subscribe(()=>{this.store.dispatch(xa({payload:!0})),this.store.dispatch(new Xe.Actions.ShowSnackBar("L'enregistrement a repris"))}),this.twilioVideoService.recordingStopped$.pipe((0,ee.pQ)(this.destroyRef)).subscribe(()=>{this.store.dispatch(xa({payload:!1})),this.store.dispatch(new Xe.Actions.ShowSnackBar("L'enregistrement a \xE9t\xE9 arr\xEAt\xE9"))}),this.twilioVideoService.trackSubscribed$.pipe((0,ee.pQ)(this.destroyRef)).subscribe(({track:t,participant:n})=>{if(t.name===be.oT&&"video"===t.kind)this.store.dispatch(wa()),this.twilioVideoService.detachLocalVideoTrack(),this.localMediaContainer().nativeElement.appendChild(t.attach());else if("video"===t.kind){const{id:r}=Ar(n.identity);this.store.dispatch(bn({id:r,payload:{key:"cameraMute",value:!t.isEnabled}}))}else if("audio"===t.kind){const{id:r}=Ar(n.identity);this.store.dispatch(bn({id:r,payload:{key:"microphoneMute",value:!t.isEnabled}})),this.store.dispatch(yC())}}),this.twilioVideoService.trackUnsubscribed$.pipe((0,ee.pQ)(this.destroyRef)).subscribe(({track:t,participant:n})=>{if(t.name===be.oT)this.store.dispatch(wa()),this.twilioVideoService.attachLocalVideoTrack(this.localMediaContainer());else if("video"===t.kind){const{id:r}=Ar(n.identity);this.store.dispatch(bn({id:r,payload:{key:"cameraMute",value:!0}}))}else if("audio"===t.kind){const{id:r}=Ar(n.identity);this.store.dispatch(bn({id:r,payload:{key:"microphoneMute",value:!0}}))}}),this.twilioVideoService.trackEnabled$.pipe((0,ee.pQ)(this.destroyRef)).subscribe(({participant:t,publication:n})=>{if("video"===n.track.kind){const{id:r}=Ar(t.identity);this.store.dispatch(bn({id:r,payload:{key:"cameraMute",value:!1}}))}else if("audio"===n.track.kind){const{id:r}=Ar(t.identity);this.store.dispatch(bn({id:r,payload:{key:"microphoneMute",value:!1}}))}}),this.twilioVideoService.trackDisabled$.pipe((0,ee.pQ)(this.destroyRef)).subscribe(({participant:t,publication:n})=>{if("video"===n.track.kind){const{id:r}=Ar(t.identity);this.store.dispatch(bn({id:r,payload:{key:"cameraMute",value:!0}}))}else if("audio"===n.track.kind){const{id:r}=Ar(t.identity);this.store.dispatch(bn({id:r,payload:{key:"microphoneMute",value:!0}}))}}),this.deviceChangeListener=()=>{navigator.mediaDevices.enumerateDevices().then(t=>this.deviceChangedEmitter.emit(t))},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeListener),this.destroyRef.onDestroy(()=>{this.twilioVideoService.disconnectFromRoom(),this.deviceChangeListener&&(navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeListener),this.deviceChangeListener=null)}),this.actions$.pipe((0,ye.gp)(yc),(0,ee.pQ)(this.destroyRef)).subscribe(()=>{this.fermerToast()})}ngAfterViewInit(){this.localMediaContainer()?this.twilioVideoService.attachLocalVideoTrack(this.localMediaContainer()):this.store.dispatch(new Xe.Actions.ShowSnackBar("Impossible d'attacher la vid\xE9o locale, veuillez r\xE9essayer.",Xe.EnumSnackBarType.Ec
1hec)),this.remoteMediaContainer()?this.twilioVideoService.setRemoteVideoContainerRef(this.remoteMediaContainer()):this.store.dispatch(new Xe.Actions.ShowSnackBar("Impossible d'attacher la vid\xE9o distante, veuillez r\xE9essayer.",Xe.EnumSnackBarType.Echec)),this.demandes().length>0&&this.afficherToast(this.demandes()[0].pseudo)}closeSidePanel(){this.store.dispatch(vc({payload:null}))}annulerSession(){this.dialog.open(dF,{panelClass:"standard-dialog"}).afterClosed().pipe((0,rr.p)(t=>!!t),(0,ee.pQ)(this.destroyRef)).subscribe(t=>{this.store.dispatch(pC({payload:t}))})}terminerSession(){const t="Vous \xEAtes sur le point de terminer la t\xE9l\xE9inspection .",n="Voulez-vous continuer ?";this.dialog.open(Mc.V,{data:{title:"Terminer la t\xE9l\xE9inspection",htmlContent:"<p>"+t+"</p>"+n+"<br/><br/>",actionAnnulerConfirmer:!0},width:pe.Uq.Small}).afterClosed().pipe((0,rr.p)(o=>o),(0,ee.pQ)(this.destroyRef)).subscribe(()=>{this.store.dispatch(dC()),this.twilioVideoService.disconnectFromRoom()})}takeSnapshot(){if(this.citoyenMediaContainer){const t=this.snapshotSection().canvas().nativeElement,n=t.getContext("2d");n.clearRect(0,0,t.width,t.height);const r=this.citoyenMediaContainer.nativeElement.querySelector("video");r&&(n.drawImage(r,0,0,t.width,t.height),this.store.dispatch(Gd()))}}shareScreen(){this.store.dispatch(wa()),this.twilioVideoService.launchScreenSharing().pipe((0,ii.n)(t=>this.twilioVideoService.publishLocalVideoTrack(t)),(0,ee.pQ)(this.destroyRef)).subscribe({complete:()=>this.store.dispatch(wa()),error:t=>{this.store.dispatch(wa()),"NotAllowedError"!==t.name&&this.store.dispatch(new Xe.Actions.ShowSnackBar("Impossible d'attacher la vid\xE9o locale, veuillez r\xE9essayer.",Xe.EnumSnackBarType.Echec))}})}dialogAideCitoyen(){const t="<p>"+this.messageAideCitoyen().contenu+"</p>";this.dialog.open(Mc.V,{data:{title:this.messageAideCitoyen().titre,htmlContent:t},width:pe.Uq.Medium})}afficherToast(t){this.toastObj||(this.toastObj=_u.show({target:".visite-flex-content",width:this.toastWidth(),content:`${t} `+"veut participer \xE0 cet appel",timeOut:0,position:this.toastPosition(),showCloseButton:!0,buttons:this.toastButtons}))}acceptIntervenant(t){this.store.dispatch(yc({payload:!0}))}rejectIntervenant(t){this.store.dispatch(yc({payload:!1}))}fermerToast(){this.toastObj.hide(),this.toastObj=null}unloadHandler(){this.twilioVideoService.disconnectFromRoom()}visibilitychange(){"mobile"===this.plateform()&&this.twilioVideoService.isConnected()&&("hidden"===this.serviceDocument.visibilityState?(this.twilioVideoService.disableLocalVideoTrack(),this.twilioVideoService.disableLocalAudioTrack()):(this.muteCamera()||this.twilioVideoService.enableLocalVideoTrack(),this.muteMicrophone()||this.twilioVideoService.enableLocalAudioTrack()))}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-salle-conference"]],viewQuery:function(t,n){if(1&t&&(c.wEZ(n.snapshotSection,bp,5),c.GBs(jF,7),c.GBs(UF,7)),2&t){let r;c.NyB(),c.mGM(r=c.lsd())&&(n.inspecteurMediaContainer=r.first),c.mGM(r=c.lsd())&&(n.citoyenMediaContainer=r.first)}},hostBindings:function(t,n){1&t&&c.bIt("pagehide",function(){return n.unloadHandler()},!1,c.tSv)("unload",function(){return n.unloadHandler()},!1,c.tSv)("visibilitychange",function(){return n.visibilitychange()},!1,c.EBC)},outputs:{deviceChangedEmitter:"deviceChange"},decls:28,vars:23,consts:()=>{let e;return e="Fermer ",[["mobileHeader",""],["citoyenVideo",""],["inspecteurVideo",""],[1,"visite-flex-container"],[1,"visite-flex-content"],[1,"visite-mobile-header","hide-desktop","toolbar-animation"],[3,"help","cancel","terminate"],[3,"mode","visite-statut","starting-date"],[3,"role"],["id","remote"],[3,"taking-snapshot","video-width","video-height"],[1,"citoyen-video-desactive"],[1,"visite-footer"],[3,"sharing","snapshot","help","cancel","terminate"],[1,"citoyen-video-desactive-salle-attente"],["id","local",1,"inspecteur-video","inspecteur-video-desactive"],["id","local",1,"inspecteur-video"],[1,"visite-side-menu","session"],["matTooltip",e,"mat-icon-button","",1,"side-menu-close",3,"click"],[1,"icon-close"],[1,"icon-video-off"],[1,"video-desactive-texte"]]},template:function(t,n){if(1&t){const r=c.RV6();c.j41(0,"div",3)(1,"div",4)(2,"div",5,0)(4,"vplus-session-teleinspection-header-mobile",6),c.bIt("help",function(){return c.eBV(r),c.Njj(n.dialogAideCitoyen())})("cancel",function(){return c.eBV(r),c.Njj(n.annulerSession())})("terminate",function(){return c.eBV(r),c.Njj(n.terminerSession())}),c.k0s()(),c.nrm(5,"vplus-session-countup",7),c.DNE(6,WF,1,1,"vplus-session-card-visite-demarree",8),c.j41(7,"div"),c.nrm(8,"div",9,1),c.DNE(10,$F,1,3,"vplus-session-snapshot",10),c.k0s(),c.DNE(11,qF,4,1,"div",11),c.j41(12,"div",12)(13,"vplus-session-teleinspection-footer",13),c.bIt("sharing",function(){return c.eBV(r),c.Njj(n.shareScreen())})("snapshot",function(){return c.eBV(r),c.Njj(n.takeSnapshot())})("help",function(){return c.eBV(r),c.Njj(n.dialogAideCitoyen())})("cancel",function(){return c.eBV(r),c.Njj(n.annulerSession())})("terminate",function(){return c.eBV(r),c.Njj(n.terminerSession())}),c.k0s(),c.DNE(14,GF,4,1,"div",14)(15,YF,4,1,"div",15),c.nrm(16,"div",16,2),c.k0s()(),c.j41(18,"div",17)(19,"button",18),c.bIt("click",function(){return c.eBV(r),c.Njj(n.closeSidePanel())}),c.nrm(20,"i",19),c.k0s(),c.DNE(21,QF,1,0)(22,JF,1,0)(23,KF,1,0)(24,ZF,1,0)(25,e8,1,0)(26,t8,1,0)(27,i8,1,0),c.k0s()()}if(2&t){let r;c.R7$(2),c.AVh("transparent",n.visiteEnCours()),c.R7$(3),c.Y8G("mode","pc")("visite-statut",n.statut())("starting-date",n.dateDemarrage()),c.R7$(),c.vxM(6,n.visiteDemarree()?6:-1),c.R7$(),c.AVh("video-container",n.visiteEnCours()),c.R7$(),c.AVh("citoyen-video",n.visiteEnCours())("citoyen-video-thumbnail",!n.visiteEnCours())("sharing-screen",n.screenSharing(
1)),c.R7$(2),c.vxM(10,"inspecteur"===n.role()?10:-1),c.R7$(),c.vxM(11,n.citoyenCameraMute()&&n.visiteEnCours()?11:-1),c.R7$(),c.AVh("footer-menu-open",n.sidePanelOpened()),c.R7$(2),c.vxM(14,n.citoyenCameraMute()&&n.visiteDemarree()?14:-1),c.R7$(),c.vxM(15,n.inspecteurCameraMute()?15:-1),c.R7$(3),c.AVh("invisible",!n.sidePanelOpened()),c.R7$(3),c.vxM(21,"parametres"===(r=n.sideMenu())?21:"background-images"===r?22:"chat"===r?23:"participants"===r?24:"notes"===r?25:"photos"===r?26:"documents"===r?27:-1)}},dependencies:[$t.iY,xr.oV,jC,qm,FC,HC,UC,qC,bp,$m,PC,AF,NF,XF],styles:["[_nghost-%COMP%]     .e-toast-container .e-toast{background-color:#fff;padding:28px;border-radius:10px}[_nghost-%COMP%]     .e-toast-container .e-toast .e-toast-message{gap:20px}[_nghost-%COMP%]     .e-toast-container .e-toast .e-toast-message .e-toast-content{color:var(--ion-text-color, #000);font-size:18px;font-family:var(--ion-font-family, inherit)}[_nghost-%COMP%]     .e-toast-container .e-toast .e-toast-actions .e-btn.e-accept{color:var(--approved-color)}[_nghost-%COMP%]     .e-toast-container .e-toast .e-toast-actions .e-btn.e-reject{color:var(--warn-color)}"],changeDetection:0}),i})();function n8(a,i){1&a&&(c.j41(0,"div",3),c.nrm(1,"mat-spinner",4),c.j41(2,"h3",5),c.pXf(3,0),c.k0s()())}function r8(a,i){1&a&&(c.j41(0,"div",3)(1,"div",6),c.nrm(2,"i",7),c.k0s(),c.j41(3,"h3"),c.pXf(4,1),c.k0s()())}function s8(a,i){if(1&a){const e=c.RV6();c.j41(0,"vplus-session-salle-introduction",8),c.bIt("deviceChange",function(n){c.eBV(e);const r=c.XpG(2);return c.Njj(r.handleDeviceChange(n))}),c.k0s()}}function o8(a,i){if(1&a){const e=c.RV6();c.j41(0,"vplus-session-salle-conference",8),c.bIt("deviceChange",function(n){c.eBV(e);const r=c.XpG(2);return c.Njj(r.handleDeviceChange(n))}),c.k0s()}}function a8(a,i){1&a&&c.nrm(0,"vplus-session-salle-terminus")}function l8(a,i){1&a&&c.EFF(0," en attente de direction ")}function c8(a,i){if(1&a&&c.DNE(0,s8,1,0)(1,o8,1,0)(2,a8,1,0)(3,l8,1,0),2&a){let e;const t=c.XpG();c.vxM(0,(e=t.lobbySession())===t.EnumSessionLobby.HALL?0:e===t.EnumSessionLobby.ROOM?1:e===t.EnumSessionLobby.TERMINUS?2:3)}}let u_=(()=>{var a;class i{constructor(){this.store=(0,c.WQX)(O.il),this.destroyRef=(0,c.WQX)(c.abz),this.visiteService=(0,c.WQX)(Pi),this.sseService=(0,c.WQX)(be.L5),this.localisationService=(0,c.WQX)(es.A),this.documentDOM=(0,c.WQX)(Qe.qQ),this.lobbySession=this.store.selectSignal(WA),this.reconnecting=this.store.selectSignal($A),this.disconnected=this.store.selectSignal(qA),this.role=this.store.selectSignal(ln),this.identity=this.store.selectSignal(qS),this.sideMenu=this.store.selectSignal(dc),this.visite=this.store.selectSignal(Ot),this.sessionSalleIntroductionComponent=(0,c.ebz)(Kd),this.sessionSalleConferenceComponent=(0,c.ebz)(Xg),this.EnumSessionLobby=yp,this.appElement=this.documentDOM.querySelector(".app-container"),this.monitoringLobby=(0,c.QZP)(()=>{"room"===this.lobbySession()&&this.appElement.classList.add("hide-header")})}ngOnInit(){const t=this.localisationService.getCurrentLocalisation();"inspecteur"===this.role()&&this.visiteService.getNotificationDemandeCitoyen(this.visite().id).pipe((0,rr.p)(n=>n.length>0),(0,ee.pQ)(this.destroyRef)).subscribe(n=>{const r=n[0]?n[0]:`${this.visite().participant.prenom} ${this.visite().participant.nom}`;this.store.dispatch(Fm({payload:r}))}),this.visiteService.getMessageInspecteur(this.visite().id).pipe((0,ee.pQ)(this.destroyRef)).subscribe(n=>{var r;const o=null==n||null===(r=n.messageInspecteurLocalisations)||void 0===r||null===(r=r.find(l=>l.lclzTag===t))||void 0===r?void 0:r.contenu;this.store.dispatch(EC({payload:o}))}),this.visiteService.getMessageAideCitoyen().pipe((0,ee.pQ)(this.destroyRef)).subscribe(n=>{var r,o;const l=null==n||null===(r=n.messageAideCitoyenLocalisations)||void 0===r?void 0:r.find(p=>p.lclzTag===t),h=null==l?void 0:l.nom,d=null==l||null===(o=l.contenu)||void 0===o?void 0:o.replace(/@CodeTeleinspection/gi,this.visite().code);this.store.dispatch(CC({payload:{titre:h,contenu:d}}))}),this.visiteService.fetchVisiteBackgroundImages().pipe((0,ee.pQ)(this.destroyRef)).subscribe(n=>{if(n.length>0){const r=n.findIndex(d=>d.url.includes("none.jpg")),o=n[r];n.splice(r,1),n.splice(0,0,o);const l=n.findIndex(d=>d.url.includes("blur.jpg")),h=n[l];n.splice(l,1),n.splice(1,0,h)}this.store.dispatch(rC({payload:n}))}),this.sseService.connect(`/visite/pc/visite-session/${this.visite().id}/notifications?role=${this.role()}`,{reconnect:!0,reconnectIntervalms:3e3,maxReconnectAttempts:2400}).pipe((0,ee.pQ)(this.destroyRef)).subscribe({next:n=>{"message"===n.type&&this.handleSSEMessage(n.data)}}),this.destroyRef.onDestroy(()=>{this.sseService.disconnect()})}removeDuplicateDefaultDevice(t){var n,r;const o=/Default - |Par d\xe9faut - |Communications - /,l=null!==(n=null===(r=t.find(d=>o.test(d.label)))||void 0===r?void 0:r.label)&&void 0!==n?n:"",h=l.replace(o,"");return t.filter(d=>d.label!==l&&!d.label.includes("Communications - ")).sort(d=>d.label===h?-1:1)}handleDeviceChange(t){const n=this.removeDuplicateDefaultDevice(t.filter(l=>"audiooutput"===l.kind)),r=this.removeDuplicateDefaultDevice(t.filter(l=>"audioinput"===l.kind)),o=t.filter(l=>"videoinput"===l.kind);this.store.dispatch(xC({payload:n})),this.store.dispatch(IC({payload:r})),this.store.dispatch(wC({payload:o})),n.length>0&&this.store.dispatch(Ec({payload:n[0].deviceId})),r.length>0&&this.store.dispatch(Cc({payload:r[0].deviceId})),o.length>0&&this.store.dispatch(_c({payload:o[0].deviceId}))}ionViewDidLeave(){this.appElement.classList.remove("hide-header")}handleSSEMessage(t){switch(t.type){case or.UpdateStatut:if(this.store.dispatch(bc({payload:t.data.statutId})),t.data.statutId===pe.CG.Terminee||t.data.statutId===pe.CG.Annulee)this.store.dispatch(zd());else if(t.data.statutId===pe.CG.Demarree)if(this.store.dispatch(jd({payload:new Date(t.data.dateDemarrage)})),"inspecteur"===this.role()){var n;null===(n=this.sessionSalleIntroductionComponent())||void 0===n||n.joinRoom()}else{var r;null===(r=this.sessionSalleIntroductionComponent())||void 0===r||r.sessionStarted()}break;case or.ChatMessage:if(t.data.author!==this.identity()){const h=t.data.conversations.map(({dateCreation:d,...p})=>({...p,dateCreation:d?new Date(d):null}));this.store.dispatch(Rd({payload:h})),"chat"!==this.sideMenu()&&this.store.dispatch(_C())}break;case or.CitoyenEnregistrementVisite:{this.store.dispatch(Sc({payload:t.data.accepted}));const h=t.data.accepted?"Enregistrement vid\xE9o accept\xE9.":"Enregistrement vid\xE9o refus\xE9.";this.store.dispatch(new Xe.Actions.ShowSnackBar(h));break}case or.StatutEnregistrementVisite:this.store.dispatch(xa({payload:t.data.recording}));break;case or.GeoreferenceUpdate:this.store.dispatch(Hm({payload:{latitude:t.data.latitude,longitude:t.data.longitude}}));break;
1case or.PhotoCitoyen:"inspecteur"===this.role()&&(t.data.isDelete?this.store.dispatch(gc({payload:t.data.id})):(this.store.dispatch(eC({payload:t.data.id})),"photos"!==this.sideMenu()&&this.store.dispatch(Wm({payload:!0}))));break;case or.UploadSnapshot:if("citoyen"===this.role()){const h=new Audio;h.src="assets/audio/visite/camera-beep.mp3",h.load(),h.play(),this.store.dispatch(new Xe.Actions.ShowSnackBar("L'inspecteur vient d'enregistrer une photo "))}break;case or.ConnexionInspection:var o;"inspecteur"===this.role()&&(this.store.dispatch(Fm({payload:t.data.pseudo})),null===(o=this.sessionSalleConferenceComponent())||void 0===o||o.afficherToast(t.data.pseudo));break;case or.ConnexionResponse:var l;"citoyen"===this.role()&&(this.store.dispatch(jd({payload:new Date(t.data.dateDemarrage)})),null===(l=this.sessionSalleIntroductionComponent())||void 0===l||l.confirmConnexionDemande(t.data.valid,t.data.statut));break;case or.DisconnectDevices:"citoyen"===this.role()&&(this.sseService.disconnect(),this.store.dispatch(gC({payload:!0})))}}}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-session-teleinspection"]],viewQuery:function(t,n){1&t&&(c.wEZ(n.sessionSalleIntroductionComponent,Kd,5),c.wEZ(n.sessionSalleConferenceComponent,Xg,5)),2&t&&c.NyB(2)},decls:4,vars:1,consts:()=>{let e,t;return e="En attente de connexion...",t="Vous \xEAtes actuellement hors connexion. Veuillez r\xE9essayez.",[e,t,["id","session-teleinspection"],[1,"info-card","transparent-bg"],[1,"margin-auto"],[1,"margin-top-2"],[1,"icon-avatar-container","light-bg","margin-bottom-2"],[1,"icon-cloud-x"],[3,"deviceChange"]]},template:function(t,n){1&t&&(c.j41(0,"ion-content",2),c.DNE(1,n8,4,0,"div",3)(2,r8,5,0)(3,c8,4,1),c.k0s()),2&t&&(c.R7$(),c.vxM(1,n.reconnecting()?1:n.disconnected()?2:3))},dependencies:[NC.LG,Et.W9,VC,Kd,Xg],encapsulation:2}),i})();const p8=a=>({"filter-searche-global-active":a});let u8=(()=>{var a;class i{constructor(t,n){this.store=t,this.router=n,this.selectIsSearchHeaderVisible$=this.store.select(Xe.selectIsSearchHeaderVisible)}retourAccueil(){this.router.navigate(["/accueil"])}onContentClick(){this.store.dispatch(Xe.Actions.setIsSearchHeaderVisible({payload:!1}))}}return(a=i).\u0275fac=function(t){return new(t||a)(c.rXU(O.il),c.rXU(Bn.Ix))},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-page-session-teleinspection-duplication"]],decls:15,vars:8,consts:()=>{let e,t,n;return e="Plusieurs sessions ouvertes",t=" Nous avons remarqu\xE9 que vous avez une session pour la m\xEAme t\xE9l\xE9inspection ouverte ailleurs. Veuillez fermer tout navigateur ou onglet suppl\xE9mentaire, puis actualiser la page. ",n="Retour vers l'accueil",[e,t,n,[1,"hide-desktop","mobile-header",3,"menuId","headerTitle","returnButtonType"],["id","manySessionTli",3,"click","ngClass"],[1,"standard-page-content"],[1,"flat-window-container"],[1,"flat-window"],[1,"flat-window-title"],[1,"flat-window-content"],[1,"margin-bottom-2"],[1,"stepper-bottom-actions","btn-retour"],["type","button",1,"ion-custom-button-standard","ion-custom-button-full",3,"click"]]},template:function(t,n){1&t&&(c.nrm(0,"vplus-mobile-header",3),c.j41(1,"ion-content",4),c.nI1(2,"async"),c.bIt("click",function(){return n.onContentClick()}),c.j41(3,"div",5)(4,"div",6)(5,"div",7)(6,"div",8)(7,"h4"),c.pXf(8,0),c.k0s()(),c.j41(9,"div",9)(10,"div",10),c.pXf(11,1),c.k0s(),c.j41(12,"div",11)(13,"ion-button",12),c.bIt("click",function(){return n.retourAccueil()}),c.pXf(14,2),c.k0s()()()()()()()),2&t&&(c.Y8G("menuId","manySessionTli")("headerTitle","")("returnButtonType","home-button"),c.R7$(),c.Y8G("ngClass",c.eq3(6,p8,c.bMT(2,4,n.selectIsSearchHeaderVisible$))))},dependencies:[Qe.YU,Tc.f,Et.Jm,Et.W9,Qe.Jj],styles:[".btn-retour[_ngcontent-%COMP%]{justify-content:center!important}"]}),i})();const f8=a=>({"filter-searche-global-active":a});function m8(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",24)(1,"p"),c.pXf(2,1),c.k0s(),c.j41(3,"p"),c.pXf(4,2),c.k0s(),c.j41(5,"div",25)(6,"ion-button",26),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.tester())}),c.pXf(7,3),c.k0s()()()}}function g8(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",24)(1,"div",27),c.nrm(2,"i",28),c.k0s(),c.j41(3,"p",29),c.pXf(4,4),c.k0s(),c.j41(5,"div",25)(6,"ion-button",26),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.retourAccueil())}),c.pXf(7,5),c.k0s()()()}}function v8(a,i){if(1&a){const e=c.RV6();c.j41(0,"div",24)(1,"div",30),c.nrm(2,"i",31),c.j41(3,"p",32)(4,"strong")(5,"span"),c.pXf(6,6),c.k0s()()()(),c.j41(7,"p")(8,"span"),c.pXf(9,7),c.k0s()(),c.j41(10,"ol")(11,"li")(12,"span"),c.pXf(13,8),c.k0s()(),c.j41(14,"li")(15,"span"),c.pXf(16,9),c.k0s()()(),c.j41(17,"div",33)(18,"div",34),c.nrm(19,"i",35),c.j41(20,"strong")(21,"span"),c.pXf(22,10),c.k0s()()(),c.j41(23,"ul",36)(24,"li")(25,"span"),c.pXf(26,11),c.k0s(),c.j41(27,"span",37),c.EFF(28," Safari"),c.k0s()(),c.j41(29,"li")(30,"span"),c.pXf(31,12),c.k0s(),c.j41(32,"span",37),c.EFF(33," IOS 15 "),c.k0s(),c.j41(34,"span",37),c.pXf(35,13),c.k0s()()(),c.j41(36,"p")(37,"em")(38,"span"),c.pXf(39,14),c.k0s()()()(),c.j41(40,"div",33)(41,"div",34),c.nrm(42,"i",38),c.j41(43,"strong")(44,"span"),c.pXf(45,15),c.k0s()()(),c.j41(46,"ul",36)(47,"li")(48,"span"),c.pXf(49,16),c.k0s(),c.j41(50,"span",37),c.EFF(51," Chrome, Firefox, Edge"),c.k0s()(),c.j41(52,"li")(53,"span"),c.pXf(54,17),c.k0s(),c.j41(55,"span",37),c.EFF(56," Android 9 "),c.k0s(),c.j41(57,"span",37),c.pXf(58,18),c.k0s()()()(),c.j41(59,"div",25)(60,"ion-button",26),c.bIt("click",function(){c.eBV(e);const n=c.XpG();return c.Njj(n.retourAccueil())}),c.j41(61,"span"),c.pXf(62,19),c.k0s()()()()}}let b8=(()=>{var a;class i{constructor(t,n,r,o){this.store=t,this.deviceDetectionService=n,this.dialog=r,this.router=o,this.testEffectue=!1,this.estCompatible=!1,this.devicesParleur=[],this.devicesAudio=[],this.devicesVideo=[],this.errorMedia=null,this.mediaStopVolontairement=!1,this.selectIsSearchHeaderVisible$=this.store.select(Xe.selectIsSearchHeaderVisible)}retourAccueil(){this.router.navigate(["/accueil"])}onContentClick(){this.store.dispatch(Xe.Actions.setIsSearchHeaderVisible({payload:!1}))}tester(){var t=this;return(0,xe.A)(function*(){t.deviceDetectionService.checkBrowserAndOs()?(yield t.initDevices(),t.errorMedia?t.dialog.open(kC,{data:{error:t.errorMedia,mediaStopVolontairement:t.mediaStopVolontairement},width:pe.Uq.Medium,disableClose:!0}):(t.testEffectue=!0,t.estCompatible=!0)):(t.testEffectue=!0,t.estCompatible=!1)})()}initDevices(){var t=this;return(0,xe.A)(function*(){t.mediaStopVolontairement=!1;let r,n=yield navigator.mediaDevices.enumerateDevices();if(t.devicesParleur=n.filter(o=>"audiooutput"===o.kind),t.devicesAudio=n.filter(o=>"audioinput"===o.kind),t.devicesVideo=n.filter(o=>"videoinput"===o.kind),t.devicesAudio.length>0||t.devicesVideo.length>0){t.errorMedia=null;try{r=yield navigator.mediaDevices.getUserMedia({audio:t.devicesAudio.length>0,video:t.devicesVideo.length>0})}catch(o){t.mediaStopVolontairement=!0,t.errorMedia=o.name}if(t.errorMedia)return;n=yield navigator.mediaDevices.enumerateDevices(),t.devicesParleur=n.filter(o=>"audiooutput"===o.kind),t.devicesAudio=n.filter(o=>"audioinput"===o.kind),t.devicesVideo=n.filter(o=>
1"videoinput"===o.kind),r.getTracks().forEach(function(){var o=(0,xe.A)(function*(l){return yield l.stop()});return function(l){return o.apply(this,arguments)}}())}})()}}return(a=i).\u0275fac=function(t){return new(t||a)(c.rXU(O.il),c.rXU(be.vr),c.rXU(Yi.bZ),c.rXU(Bn.Ix))},a.\u0275cmp=c.VBU({type:a,selectors:[["vplus-test-compatibilite-appareil"]],decls:10,vars:11,consts:()=>{let e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S,E,_,T;return e="Test de compatibilit\xE9 des appareils",t="Bienvenue dans l'environnement de test de compatibilit\xE9 des appareils. Ici, vous pouvez tester votre appareil mobile et vous assurer qu'il est compatible avec notre portail. De cette fa\xE7on, vous serez mieux pr\xE9par\xE9 pour votre t\xE9l\xE9inspection. ",n=" Pour commencer, veuillez cliquer sur tester et autoriser notre plateforme \xE0 utiliser le microphone et la cam\xE9ra sur votre appareil. ",r=" Tester ",o="F\xE9licitations, votre appareil mobile est compatible",l="Retour vers l'accueil ",h="Votre appareil ou navigateur est incompatible",d="Cela arrive g\xE9n\xE9ralement pour une ou plusieurs des raisons suivantes :",p="Votre t\xE9l\xE9phone/tablette a un syst\xE8me d'exploitation trop ancien.",u="Votre navigateur n\u2019est pas compatible.",f="Appareils Apple (iPhone / iPad)",m="Navigateur(s) compatibles(s) :",g="Version minimale du syst\xE8me d'exploitation :",v="ou plus r\xE9cent",b=" Les navigateurs comme Chrome ou Firefox ne sont pas compatibles sur iPhone/iPad pour acc\xE9der \xE0 la t\xE9l\xE9inspection. ",y="Appareils Android",S="Navigateur(s) compatible(s) :",E="Version minimale du syst\xE8me d'exploitation :",_="ou plus r\xE9cent",T="Retour vers l'accueil",[e,t,n,r,o,l,h,d,p,u,f,m,g,v,b,y,S,E,_,T,[1,"hide-desktop","mobile-header",3,"menuId","headerTitle","returnButtonType"],["id","testCompatibilite",3,"click","ngClass"],[1,"main-page-container"],[1,"requete-title"],[1,"standard-page-content"],[1,"stepper-bottom-actions"],["type","button",1,"ion-custom-button-standard","ion-custom-button-full",3,"click"],[1,"icon-container"],[1,"icon-validate","icon-state","valid"],[1,"text-valid"],[1,"incompat-title"],[1,"icon-x-circle","icon-state","invalid"],[1,"text-invalid"],[1,"compat-device"],[1,"device-title"],[1,"icon-apple-logo","margin-right-10"],[1,"list-recommandation"],[1,"fw-normal"],[1,"icon-android-logo","margin-right-10"]]},template:function(t,n){1&t&&(c.nrm(0,"vplus-mobile-header",20),c.j41(1,"ion-content",21),c.nI1(2,"async"),c.bIt("click",function(){return n.onContentClick()}),c.j41(3,"div",22)(4,"div",23)(5,"h3",24),c.pXf(6,0),c.k0s()(),c.DNE(7,m8,8,0,"div",24)(8,g8,8,0,"div",24)(9,v8,63,0,"div",24),c.k0s()()),2&t&&(c.Y8G("menuId","testCompatibilite")("headerTitle","")("returnButtonType","home-button"),c.R7$(),c.Y8G("ngClass",c.eq3(9,f8,c.bMT(2,7,n.selectIsSearchHeaderVisible$))),c.R7$(6),c.vxM(7,n.testEffectue?-1:7),c.R7$(),c.vxM(8,n.testEffectue&&n.estCompatible?8:-1),c.R7$(),c.vxM(9,n.testEffectue&&!n.estCompatible?9:-1))},dependencies:[Qe.YU,Tc.f,Et.Jm,Et.W9,Qe.Jj],styles:[".main-page-container[_ngcontent-%COMP%]{padding-bottom:0!important}.title[_ngcontent-%COMP%]{margin-bottom:0}.list-recommandation[_ngcontent-%COMP%]{font-weight:700}.list-recommandation[_ngcontent-%COMP%]   .fw-normal[_ngcontent-%COMP%]{font-weight:400}.incompat-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.incompat-title[_ngcontent-%COMP%]   .text-invalid[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{width:100%}.icon-container[_ngcontent-%COMP%], .text-valid[_ngcontent-%COMP%], .actions-container[_ngcontent-%COMP%]{width:100%;text-align:center}.icon-state[_ngcontent-%COMP%]{font-size:50px}.valid[_ngcontent-%COMP%]{color:#228b22}.invalid[_ngcontent-%COMP%]{color:red}"]}),i})();const f_=(a,i,e=(0,c.WQX)(c.abz),t=(0,c.WQX)(Pi),n=(0,c.WQX)(Yi.bZ))=>"inspecteur"===a.data.role||t.getVisiteSessionAccessAuthorization(a.params.room).pipe((0,ii.n)(({code:o})=>{if("authorize"===o)return(0,nr.of)(!0);{const l="Nous avons remarqu\xE9 que vous avez une session pour la m\xEAme t\xE9l\xE9inspection ouverte ailleurs. En continuant ici, vous serez d\xE9connect\xE9 de vos autres appareils.";return n.open(Mc.V,{data:{title:"Plusieurs sessions ouvertes",htmlContent:l,understandAction:!0}
1,width:pe.Uq.Medium}).afterClosed().pipe((0,ii.n)(()=>t.disconnectVisiteSessionCitoyen(a.params.room)),(0,ue.T)(()=>!0))}}),(0,ee.pQ)(e)),m_=(a,i,e=(0,c.WQX)(Fn.o),t=(0,c.WQX)(O.il),n=(0,c.WQX)(Bn.Ix),r=(0,c.WQX)(be.vr))=>{var o,l;const h=null!==(o=e.appConfig.paramList[pe.fW.TelAndPosteMunicipalite])&&void 0!==o?o:null,d=new RC.O(navigator.userAgent).getResult(),p=/safari/i.test(d.browser.name),u=/samsung/i.test(d.browser.name),f=r.isWebview(),m=p?be.gJ.Safari:u?be.gJ.Samsung:f?be.gJ.WebView:d.browser.name,v=/mac/i.test(d.os.name)?be.u1.Mac:d.os.name,b=r.isSupportedOsAndBrowser(v,m),y={nomOsInput:v!==be.u1.Mac&&v!==be.u1.iOS||d.device.type!==be.gC.Tablet&&!r.isTablet(navigator.userAgent)?v:be.u1.IPadOS,versionOsInput:v!==be.u1.Mac||d.device.type!==be.gC.Tablet&&!r.isTablet(navigator.userAgent)?null!==(l=r.versionOs(d.os.version))&&void 0!==l?l:null:r.getIPadVersion(),nomBrowserInput:m,verionBrowserInput:parseInt(d.browser.major,10),recommandBrowserForOs:v===be.u1.Android||v===be.u1.Windows||v===be.u1.Linux?be.gJ.Chrome:be.gJ.Safari},S=r.checkSupportedOsVersion(v),E=S.recommandeBrowsers;d.device.type===be.gC.Mobile||d.device.type===be.gC.Tablet||r.isTablet(navigator.userAgent)?t.dispatch(zm({payload:"mobile"})):t.dispatch(zm({payload:"pc"}));let _=null;return b.os?b.os&&f?_=jg(d,be.gJ.WebView,E[0],!0,h):b.os&&!S.isSupOsVersion?_=function C8(a,i,e){const t="<p>"+"Vous utilisez pr\xE9sentement"+" "+a.nomOsInput+" "+a.versionOsInput+", "+"qui n'est pas une version support\xE9e par la t\xE9l\xE9inspection."+"<br>"+" Veuillez mettre \xE0 jour"+" "+a.nomOsInput+" vers une version sup\xE9rieure \xE0"+" "+i+" "+"ou utilisez un autre appareil."+"</p>";return{title:"Mise \xE0 jour"+" "+a.nomOsInput,htmlContent:t,url:window.location.origin+window.location.pathname,buttonText:"",otherTextMessageWithTel:e?"Pour assistance, veuillez nous contacter au"+"<br>"+e+".":null,browserRecommande:!1,isWebView:!1,otherTextMessage:null,otherTextOs:null}}(y,S.minVersionOsSupported,h):b.os&&S.isSupOsVersion&&(null!=E&&E.includes(y.nomBrowserInput)?r.isExceptionBrowserVersion(y.nomOsInput,y.nomBrowserInput)&&(_=y.nomBrowserInput===be.gJ.Samsung?jg(d,m,E[0],!1,h):function E8(a,i,e){const n="<p>"+"La version du navigateur que vous utilisez pr\xE9sentement,"+(a.device.type===be.gC.Mobile?"<br>":"")+" "+Lc(i)+" "+i+" "+"ne supporte pas la t\xE9l\xE9inspection."+"<br>"+"Veuillez mettre \xE0 jour votre navigateur."+"</p>";return{title:"Veuillez mettre \xE0 jour le navigateur"+" "+Lc(i)+" "+i,htmlContent:n,url:window.location.origin+window.location.pathname,buttonText:"",otherTextMessageWithTel:e?"Pour assistance, veuillez nous contacter au"+"<br>"+e+".":null,browserRecommande:!1,isWebView:!1,otherTextMessage:null,otherTextOs:null}}(d,m,h)):_=jg(d,m,E[0],!1,h)):_=function _8(a,i,e){const t=[];a.OSsSupported.forEach(r=>{t.push(function T8(a){let i="";switch(a){case be.u1.Android:i='<img  alt="Firefox" src="assets/img/os/android.png" width="20" height="20">';break;case be.u1.iOS:i='<img  alt="Firefox" src="assets/img/os/ios.png" width="20" height="20">';break;case be.u1.Linux:i='<img  alt="Firefox" src="assets/img/os/linux.png" width="20" height="20">';break;case be.u1.Mac:i='<img  alt="Firefox" src="assets/img/os/mac.png" width="20" height="20">';break;case be.u1.Windows:i='<img  alt="Firefox" src="assets/img/os/windows.png" width="20" height="20">'}return i}(r)+" "+r)});const n="<p>"+"Vous utilisez pr\xE9sentement le syst\xE8me"+"<br>d'exploitation "+i+", qui n'est pas support\xe9 par la t\xe9l\xe9inspection.<br>"+" Voici la liste des syst\xE8mes d'exploitation support\xE9s :"+"</p>";return{title:"Syst\xE8me d'exploitation non support\xE9",htmlContent:n,url:window.location.origin+window.location.pathname,buttonText:"",otherTextOs:"<li>"+t.join("</li><br><li>")+"</li>",otherTextMessageWithTel:e?"Pour assistance, veuillez nous contacter au"+"<br>"+e+".":null,browserRecommande:null,isWebView:!1,otherTextMessage:null}}(b,v,h),!_||n.navigate(["teleinspection/navigateur-incompatible"],{state:{dataContent:_},skipLocationChange:!0})};function jg(a,i,e,t,n){const o=t?"<p>"+"Le navigateur"+" "+i+" "+"que vous utilisez pr\xE9sentement ne supporte pas la t\xE9l\xE9inspection."+"<br>"+"Veuillez suivre les \xE9tapes suivantes :"+"</p>":"<p>"+"Le navigateur que vous utilisez pr\xE9sentement"+(a.device.type===be.gC.Mobile?"<br>":"")+" "+Lc(i)+" "+i+", "+"ne supporte pas la t\xE9l\xE9inspection."+"<br>"+"Veuillez copier le lien suivant et le coller dans le navigateur"+" "+Lc(e)+" "+e+". </p>";return{title:"Veuillez utiliser le navigateur"+" "+Lc(e)+" "+e,htmlContent:o,url:window.location.origin+window.location.pathname,buttonText:"Copier le lien",otherTextMessage:"<ol><li>"+"Copier le lien depuis le courriel de confirmation de rendez-vous"+"</li><br><li>"+"Coller le lien sur"+" "+e+"</li></ol>",browserRecommande:!0,otherTextMessageWithTel:n?"<br>"+"Si vous n'\xEAtes pas en mesure de le faire, "+"veuillez nous contacter au "+"<br>"+n+".":null,isWebView:t,otherTextOs:null}}function Lc(a){let i="";switch(a){case be.gJ.Firefox:i='<a href="https://www.mozilla.org/fr-CA/firefox/new/"><img  alt="Firefox" src="assets/img/navigateurs/firefox.png" width="20" height="20"></a>';break;case be.gJ.Safari:i='<a href="https://www.apple.com/ca/safari/"><img  alt="Safari" src="assets/img/navigateurs/safari.png" width="20" height="20"></a>';break;case be.gJ.Chrome:i='<a href="https://www.google.com/chrome/"><img  alt="Chrome" src="assets/img/navigateurs/chrome.png" width="20" height="20"></a>';break;case be.gJ.Opera:i='<a href="https://www.opera.com/"><img alt="Opera" src="assets/img/navigateurs/opera.png"  width="30" height="20" ></a>';break;
1case be.gJ.Edge:i='<a href="https://www.microsoft.com/en-us/edge"><img  alt="Edge" src="assets/img/navigateurs/edge.png" width="20" height="20"></a>';break;case be.gJ.Samsung:i='<a href="https://www.samsung.com"><img  src="assets/img/navigateurs/samsung.png" width="20" height="20"></a>';break;case be.gJ.DuckDuckGo:i='<a href="https://duckduckgo.com"><img  src="assets/img/navigateurs/duckduckgo.png" width="20" height="20"></a>'}return i}const g_=(a,i,e=(0,c.WQX)(Bn.Ix),t=(0,c.WQX)(Pi),n=(0,c.WQX)(O.il))=>t.getVisiteSession(a.params.room).pipe((0,ai.M)(({statut:r,recordAccepted:o,backgroundImageId:l,dateDemarrage:h,infos:d})=>{const p=a.data.role;let u=null;const f=localStorage.getItem("tli-pseudo");switch(u="citoyen"===p?null!=f?f:`${d.participant.prenom} ${d.participant.nom}`:`${d.inspecteur.prenom} ${d.inspecteur.nom}`,n.dispatch(mC({payload:p})),n.dispatch(Xd({payload:u})),n.dispatch(bc({payload:r})),n.dispatch(Um({payload:d})),n.dispatch(jd({payload:h})),n.dispatch(Sc({payload:o})),n.dispatch(sC({payload:l})),r){case pe.CG.Terminee:case pe.CG.Annulee:n.dispatch(zd());break;default:n.dispatch(aC())}}),(0,ue.T)(()=>!0),(0,St.W)(()=>(e.navigateByUrl("page-non-trouvee",{skipLocationChange:!0}),(0,nr.of)(!1)))),I8=Bn.iI.forChild([{path:"",component:zg,canDeactivate:[Rg]},{path:"rdv",component:zg,canDeactivate:[Rg]},{path:"rdv/:visiteId",component:zg,canDeactivate:[Rg],resolve:{visite:(a,i,e=(0,c.WQX)(Bn.Ix),t=(0,c.WQX)(Pi))=>t.getVisiteRendezvous(a.paramMap.get("visiteId")).pipe((0,St.W)(()=>(e.navigateByUrl("page-non-trouvee",{skipLocationChange:!0}),(0,nr.of)(null))))}},{path:"citoyen/:room",component:u_,resolve:{visite:g_,navIncompatible:m_,dupe:f_},data:{role:"citoyen"}},{path:"inspecteur/:room",component:u_,resolve:{visite:g_,navIncompatible:m_,dupe:f_},data:{role:"inspecteur"}},{path:"ajout-fichiers/:room",component:P4,resolve:{visite:(a,i,e=(0,c.WQX)(Bn.Ix),t=(0,c.WQX)(Pi),n=(0,c.WQX)(O.il))=>t.getVisiteSessionEnded(a.params.room).pipe((0,ai.M)(r=>n.dispatch(Um({payload:r}))),(0,ue.T)(()=>!0),(0,St.W)(()=>(e.navigateByUrl("page-non-trouvee",{skipLocationChange:!0}),(0,nr.of)(!1))))}},{path:"navigateur-incompatible",component:H4},{path:"test-compatibilite-appareil",component:b8},{path:"session-teleinspection-duplication",component:u8}]);let x8=(()=>{var a;class i{}return(a=i).\u0275fac=function(t){return new(t||a)},a.\u0275mod=c.$C({type:a}),a.\u0275inj=c.G2t({providers:[Pi,be.Z7,ks,be.L5,ES,_S,TS,IS,wS,xS,AS,OS],imports:[I8,Rm.G,O.md.forFeature("visite",A4),ye.Vm.forFeature([KV]),IA,Sm,Cm,xA,Dd,gP,UA,MC,LC,jC,qm,FC,HC,UC,qC,VC,bp,$m,Kd,PC]}),i})()},72785:(ns,Di)=>{!function(){"use strict";var H={};function s(R){return Ae(">"+Me("B",R.length),R)}function ae(R){return Ae(">"+Me("H",R.length),R)}function ce(R){return Ae(">"+Me("L",R.length),R)}function ke(R,N,X){var z,F,j,U="",Y="";if("Byte"==N)(z=R.length)<=4?Y=s(R)+Me("\0",4-z):(Y=Ae(">L",[X]),U=s(R));else if("Short"==N)(z=R.length)<=2?Y=ae(R)+Me("\0\0",2-z):(Y=Ae(">L",[X]),U=ae(R));else if("Long"==N)(z=R.length)<=1?Y=ce(R):(Y=Ae(">L",[X]),U=ce(R));else if("Ascii"==N)(z=(F=R+"\0").length)>4?(Y=Ae(">L",[X]),U=F):Y=F+Me("\0",4-z);else if("Rational"==N){if("number"==typeof R[0])z=1,j=R[1],F=Ae(">L",[R[0]])+Ae(">L",[j]);else{z=R.length,F="";for(var q=0;q<z;q++)j=R[q][1],F+=Ae(">L",[R[q][0]])+Ae(">L",[j])}Y=Ae(">L",[X]),U=F}else if("SRational"==N){if("number"==typeof R[0])z=1,j=R[1],F=Ae(">l",[R[0]])+Ae(">l",[j]);else for(z=R.length,F="",q=0;q<z;q++)j=R[q][1],F+=Ae(">l",[R[q][0]])+Ae(">l",[j]);Y=Ae(">L",[X]),U=F}else"Undefined"==N&&((z=R.length)>4?(Y=Ae(">L",[X]),U=R):Y=R+Me("\0",4-z));return[Ae(">L",[z]),Y,U]}function x(R,N,X){var F,Y=Object.keys(R).length,z=Ae(">H",[Y]);F=["0th","1st"].indexOf(N)>-1?2+12*Y+4:2+12*Y;var B="",j="";for(var q in R)if("string"==typeof q&&(q=parseInt(q)),!("0th"==N&&[34665,34853].indexOf(q)>-1)){if("Exif"==N&&40965==q)continue;if("1st"==N&&[513,514].indexOf(q)>-1)continue;var le=R[q],fe=Ae(">H",[q]),De=Ft[N][q].type,It=Ae(">H",[mt[De]]);"number"==typeof le&&(le=[le]);var ei=ke(le,De,8+F+X+j.length);B+=fe+It+ei[0]+ei[1],j+=ei[2]}return[z+B,j]}function J(R){var X;if("\xff\xd8"==R.slice(0,2))X=function at(R){for(var N,X=0;X<R.length;X++)if("\xff\xe1"==(N=R[X]).slice(0,2)&&"Exif\0\0"==N.slice(4,10))return N;return null}(Pt(R)),this.tiftag=X?X.slice(10):null;else if(["II","MM"].indexOf(R.slice(0,2))>-1)this.tiftag=R;else{if("Exif"!=R.slice(0,4))throw new Error("Given file is neither JPEG nor TIFF.");this.tiftag=R.slice(6)}}if(H.version="1.0.4",H.remove=function(R){var N=!1;if("\xff\xd8"!=R.slice(0,2)){if("data:image/jpeg;base64,"!=R.slice(0,23)&&"data:image/jpg;base64,"!=R.slice(0,22))throw new Error("Given data is not jpeg.");R=Zt(R.split(",")[1]),N=!0}var Y=Pt(R).filter(function(z){return!("\xff\xe1"==z.slice(0,2)&&"Exif\0\0"==z.slice(4,10))}).join("");return N&&(Y="data:image/jpeg;base64,"+ft(Y)),Y},H.insert=function(R,N){var X=!1;if("Exif\0\0"!=R.slice(0,6))throw new Error("Given data is not exif.");if("\xff\xd8"!=N.slice(0,2)){if("data:image/jpeg;base64,"!=N.slice(0,23)&&"data:image/jpg;base64,"!=N.slice(0,22))throw new Error("Given data is not jpeg.");N=Zt(N.split(",")[1]),X=!0}var U="\xff\xe1"+Ae(">H",[R.length+2])+R,z=function lt(R,N){var X=!1,U=[];return R.forEach(function(Y,z){"\xff\xe1"==Y.slice(0,2)&&"Exif\0\0"==Y.slice(4,10)&&(X?U.unshift(z):(R[z]=N,X=!0))}
1),U.forEach(function(Y){R.splice(Y,1)}),!X&&N&&(R=[R[0],N].concat(R.slice(1))),R.join("")}(Pt(N),U);return X&&(z="data:image/jpeg;base64,"+ft(z)),z},H.load=function(R){var N;if("string"!=typeof R)throw new Error("'load' gots invalid type argument.");if("\xff\xd8"==R.slice(0,2))N=R;else if("data:image/jpeg;base64,"==R.slice(0,23)||"data:image/jpg;base64,"==R.slice(0,22))N=Zt(R.split(",")[1]);else{if("Exif"!=R.slice(0,4))throw new Error("'load' gots invalid file data.");N=R.slice(6)}var U={"0th":{},Exif:{},GPS:{},Interop:{},"1st":{},thumbnail:null},Y=new J(N);if(null===Y.tiftag)return U;Y.endian_mark="II"==Y.tiftag.slice(0,2)?"<":">";var z=ne(Y.endian_mark+"L",Y.tiftag.slice(4,8))[0];U["0th"]=Y.get_ifd(z,"0th");var F=U["0th"].first_ifd_pointer;if(delete U["0th"].first_ifd_pointer,34665 in U["0th"]&&(U.Exif=Y.get_ifd(z=U["0th"][34665],"Exif")),34853 in U["0th"]&&(U.GPS=Y.get_ifd(z=U["0th"][34853],"GPS")),40965 in U.Exif&&(U.Interop=Y.get_ifd(z=U.Exif[40965],"Interop")),"\0\0\0\0"!=F&&(z=ne(Y.endian_mark+"L",F)[0],U["1st"]=Y.get_ifd(z,"1st"),513 in U["1st"]&&514 in U["1st"])){var j=Y.tiftag.slice(U["1st"][513],U["1st"][513]+U["1st"][514]);U.thumbnail=j}return U},H.dump=function(R){var j,q,le,fe,De,X=function c(R){return JSON.parse(JSON.stringify(R))}(R),Y=!1,z=!1,F=!1,B=!1;j="0th"in X?X["0th"]:{},"Exif"in X&&Object.keys(X.Exif).length||"Interop"in X&&Object.keys(X.Interop).length?(j[34665]=1,Y=!0,q=X.Exif,"Interop"in X&&Object.keys(X.Interop).length?(q[40965]=1,F=!0,le=X.Interop):Object.keys(q).indexOf(H.ExifIFD.InteroperabilityTag.toString())>-1&&delete q[40965]):Object.keys(j).indexOf(H.ImageIFD.ExifTag.toString())>-1&&delete j[34665],"GPS"in X&&Object.keys(X.GPS).length?(j[H.ImageIFD.GPSTag]=1,z=!0,fe=X.GPS):Object.keys(j).indexOf(H.ImageIFD.GPSTag.toString())>-1&&delete j[H.ImageIFD.GPSTag],"1st"in X&&"thumbnail"in X&&null!=X.thumbnail&&(B=!0,X["1st"][513]=1,X["1st"][514]=1,De=X["1st"]);var ei,ss,Hi,It=x(j,"0th",0),tt=It[0].length+12*Y+12*z+4+It[1].length,Ki="",ci=0,kr="",Xt=0,rs="",Po=0,Cn="";if(Y&&(ci=(ei=x(q,"Exif",tt))[0].length+12*F+ei[1].length),z&&(Xt=(kr=x(fe,"GPS",tt+ci).join("")).length),F&&(Po=(rs=x(le,"Interop",tt+ci+Xt).join("")).length),B&&(ss=x(De,"1st",tt+ci+Xt+Po),Hi=function re(R){for(var N=Pt(R);"\xff\xe0"<=N[1].slice(0,2)&&N[1].slice(0,2)<="\xff\xef";)N=[N[0]].concat(N.slice(2));return N.join("")}(X.thumbnail),Hi.length>64e3))throw new Error("Given thumbnail is too large. max 64kB");var En="",Fs="",Ue="",Bs="\0\0\0\0";if(Y){var Tt=Ae(">L",[_n=8+tt]);En=Ae(">H",[34665])+Ae(">H",[mt.Long])+Ae(">L",[1])+Tt}if(z&&(Tt=Ae(">L",[_n=8+tt+ci]),Fs=Ae(">H",[34853])+Ae(">H",[mt.Long])+Ae(">L",[1])+Tt),F&&(Tt=Ae(">L",[_n=8+tt+ci+Xt]),Ue=Ae(">H",[40965])+Ae(">H",[mt.Long])+Ae(">L",[1])+Tt),B){var _n;Bs=Ae(">L",[_n=8+tt+ci+Xt+Po]);var Mr="\x02\x01\0\x04\0\0\0\x01"+Ae(">L",[_n+ss[0].length+24+4+ss[1].length]),Wn="\x02\x02\0\x04\0\0\0\x01"+Ae(">L",[Hi.length]);Cn=ss[0]+Mr+Wn+"\0\0\0\0"+ss[1]+Hi}return Y&&(Ki=ei[0]+Ue+ei[1]),"Exif\0\0MM\0*\0\0\0\b"+(It[0]+En+Fs+Bs+It[1])+Ki+kr+rs+Cn},J.prototype={get_ifd:function(R,N){var z,X={},U=ne(this.endian_mark+"H",this.tiftag.slice(R,R+2))[0],Y=R+2;z=["0th","1st"].indexOf(N)>-1?"Image":N;for(var F=0;F<U;F++){var B=ne(this.endian_mark+"H",this.tiftag.slice(R=Y+12*F,R+2))[0],j=ne(this.endian_mark+"H",this.tiftag.slice(R+2,R+4))[0],q=ne(this.endian_mark+"L",this.tiftag.slice(R+4,R+8))[0],le=this.tiftag.slice(R+8,R+12);B in Ft[z]&&(X[B]=this.convert_value([j,q,le]))}return"0th"==N&&(X.first_ifd_pointer=this.tiftag.slice(R=Y+12*U,R+4)),X},convert_value:function(R){var z,N=null,X=R[0],U=R[1],Y=R[2];if(1==X)U>4?(z=ne(this.endian_mark+"L",Y)[0],N=ne(this.endian_mark+Me("B",U),this.tiftag.slice(z,z+U))):N=ne(this.endian_mark+Me("B",U),Y.slice(0,U));else if(2==X)U>4?(z=ne(this.endian_mark+"L",Y)[0],N=this.tiftag.slice(z,z+U-1)):N=Y.slice(0,U-1);else if(3==X)U>2?(z=ne(this.endian_mark+"L",Y)[0],N=ne(this.endian_mark+Me("H",U),this.tiftag.slice(z,z+2*U))):N=ne(this.endian_mark+Me("H",U),Y.slice(0,2*U));else if(4==X)U>1?(z=ne(this.endian_mark+"L",Y)[0],N=ne(this.endian_mark+Me("L",U),this.tiftag.slice(z,z+4*U))):N=ne(this.endian_mark+Me("L",U),Y);else if(5==X)if(z=ne(this.endian_mark+"L",Y)[0],U>1){N=[];for(var F=0;F<U;F++)N.push([ne(this.endian_mark+"L",this.tiftag.slice(z+8*F,z+4+8*F))[0],ne(this.endian_mark+"L",this.tiftag.slice(z+4+8*F,z+8+8*F))[0]])}else N=[ne(this.endian_mark+"L",this.tiftag.slice(z,z+4))[0],ne(this.endian_mark+"L",this.tiftag.slice(z+4,z+8))[0]];else if(7==X)U>4?(z=ne(this.endian_mark+"L",Y)[0],N=this.tiftag.slice(z,z+U)):N=Y.slice(0,U);else if(9==X)U>1?(z=ne(this.endian_mark+"L",Y)[0],N=ne(this.endian_mark+Me("l",U),this.tiftag.slice(z,z+4*U))):N=ne(this.endian_mark+Me("l",U),Y);else{if(10!=X)throw new Error("Exif might be wrong. Got incorrect value type to decode. type:"+X);if(z=ne(this.endian_mark+"L",Y)[0],U>1)for(N=[],F=0;F<U;F++)N.push([ne(this.endian_mark+"l",this.tiftag.slice(z+8*F,z+4+8*F))[0],ne(this.endian_mark+"l",this.tiftag.slice(z+4+8*F,z+8+8*F))[0]]);else N=[ne(this.endian_mark+"l",this.tiftag.slice(z,z+4))[0],ne(this.endian_mark+"l",this.tiftag.slice(z+4,z+8))[0]]}return N instanceof Array&&1==N.length?N[0]:N}},typeof window<"u"&&"function"==typeof window.btoa)var ft=window.btoa;if(typeof ft>"u"&&(ft=function(N){for(var U,Y,z,F,B,j,q,X="",le=0,fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/=";le<N.length;)F=(U=N.charCodeAt(le++))>>2,B=(3&U)<<4|(Y=N.charCodeAt(le++))>>4,j=(15&Y)<<2|(z=N.charCodeAt(le++))>>6,q=63&z,isNaN(Y)?j=q=64:isNaN(z)&&(q=64),X=X+fe.charAt(F)+fe.charAt(B)+fe.charAt(j)+fe.charAt(q);return X}),typeof window<"u"&&"function"==typeof window.atob)var Zt=window.atob;function Ae(R,N){if(!(N instanceof Array))throw new Error("'pack' error. Got invalid type argument.");if(R.length-1!=N.length)throw new Error("'pack' error. "+(R.length-1)+" marks, "+N.length+" elements.");var X;if("<"==R[0])X=!0;else{if(">"!=R[0])throw new Error("");X=!1}for(var U="",Y=1,z=null,F=null,B=null;F=R[Y];){if("b"==F.toLowerCase()){if(z=N[Y-1],"b"==F&&z<0&&(z+=256),z>255||z<0)throw new Error("'pack' error.");B=String.fromCharCode(z)}else if("H"==F){if((z=N[Y-1])>65535||z<0)throw new Error("'pack' error.");B=String.fromCharCode(Math.floor(z%65536/256))+String.fromCharCode(z%256),X&&(B=B.split("").reverse().join(""))}else{if("l"!=F.toLowerCase())throw new Error("'pack' error.");if(z=N[Y-1],"l"==F&&z<0&&(z+=4294967296),z>4294967295||z<0)throw new Error("'pack' error.");B=String.fromCharCode(Math.floor(z/16777216))+String.fromCharCode(Math.floor(z%16777216/65536))+String.fromCharCode(Math.floor(z%65536/256))+String.fromCharCode(z%256),X&&(B=B.split("").reverse().join(""))}U+=B,Y+=1}return U}function ne(R,N){if("string"!=typeof N)throw new Error("'unpack' error. Got invalid type argument.");for(var X=0,U=1;U<R.length;U++)if("b"==R[U].toLowerCase())X+=1;else if("h"==R[U].toLowerCase())X+=2;else{if("l"!=R[U].toLowerCase())throw new Error("'unpack' error. Got invalid mark.");X+=4}if(X!=N.length)throw new Error("'unpack' error. Mismatch between symbol and string length. "+X+":"+N.length);var Y;if("<"==R[0])Y=!0;else{if(">"!=R[0])throw new Error("'unpack' error.");Y=!1}for(var z=[],F=0,B=1,j=null,q=null,le=null,fe="";q=R[B];){if("b"==q.toLowerCase())j=(fe=N.slice(F,F+(le=1))).charCodeAt(0),"b"==q&&j>=128&&(j-=256);else if("H"==q)fe=N.slice(F,F+(le=2)),Y&&(fe=fe.split("").reverse().join("")),j=256*fe.charCodeAt(0)+fe.charCodeAt(1);else{if("l"!=q.toLowerCase())throw new Error("'unpack' error. "+q);fe=N.slice(F,F+(le=4)),Y&&(fe=fe.split("").reverse().join("")),j=16777216*fe.charCodeAt(0)+65536*fe.charCodeAt(1)+256*fe.charCodeAt(2)+fe.charCodeAt(3),"l"==q&&j>=2147483648&&(j-=4294967296)}z.push(j),F+=le,B+=1}return z}function Me(R,N){for(var X="",U=0;U<N;U++)X+=R;return X}function Pt(R){if("\xff\xd8"!=R.slice(0,2))throw new Error("Given data isn't JPEG.");for(var N=2,X=["\xff\xd8"];;){if("\xff\xda"==R.slice(N,N+2)){X.push(R.slice(N));break}var Y=N+ne(">H",R.slice(N+2,N+4))[0]+2;if(X.push(R.slice(N,Y)),(N=Y)>=R.length)throw new Error("Wrong JPEG data.")}return X}typeof Zt>"u"&&(Zt=function(N){var Y,z,F,B,j,q,X="",le=0,fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(N=N.replace(/[^A-Za-z0-9\+\/\=]/g,"");le<N.length;)F=fe.indexOf(N.charAt(le++)),Y=(15&(B=fe.indexOf(N.charAt(le++))))<<4|(j=fe.indexOf(N.charAt(le++)))>>2,z=(3&j)<<6|(q=fe.indexOf(N.charAt(le++))),X+=String.fromCharCode(F<<2|B>>4),64!=j&&(X+=String.fromCharCode(Y)),64!=q&&(X+=String.fromCharCode(z));return X});var mt={Byte:1,Ascii:2,Short:3,Long:4,Rational:5,Undefined:7,SLong:9,SRational:10},Ft={Image:{11:{name:"ProcessingSoftware",type:"Ascii"},254:{name:"NewSubfileType",type:"Long"},255:{name:"SubfileType",type:"Short"},256:{name:"ImageWidth",type:"Long"},257:{name:"ImageLength",type:"Long"},258:{name:"BitsPerSample",type:"Short"},259:{name:"Compression",type:"Short"},262:{name:"PhotometricInterpretation",type:"Short"},263:{name:"Threshholding",type:"Short"},264:{name:"CellWidth",type:"Short"},265:{name:"CellLength",type:"Short"},266:{name:"FillOrder",type:"Short"},269:{name:"DocumentName",type:"Ascii"},270:{name:"ImageDescription",type:"Ascii"},271:{name:"Make",type:"Ascii"},272:{name:"Model",type:"Ascii"},273:{name:"StripOffsets",type:"Long"},274:{name:"Orientation",type:"Short"},277:{name:"SamplesPerPixel",type:"Short"},278:{name:"RowsPerStrip",type:"Long"},279:{name:"StripByteCounts",type:"Long"},282:{name:"XResolution",type:"Rational"},283:{name:"YResolution",type:"Rational"},284:{name:"PlanarConfiguration",type:"Short"},290:{name:"GrayResponseUnit",type:"Short"},291:{name:"GrayResponseCurve",type:"Short"},292:{name:"T4Options",type:"Long"},293:{name:"T6Options",type:"Long"},296:{name:"ResolutionUnit",type:"Short"},301:{name:"TransferFunction",type:"Short"},305:{name:"Software",type:"Ascii"},306:{name:"DateTime",type:"Ascii"},315:{name:"Artist",type:"Ascii"},316:{name:"HostComputer",type:"Ascii"},317:{name:"Predictor",type:"Short"},318:{name:"WhitePoint",type:"Rational"},319:{name:"PrimaryChromaticities",type:"Rational"},320:{name:"ColorMap",type:"Short"},321:{name:"HalftoneHints",type:"Short"},322:{name:"TileWidth",type:"Short"},323:{name:"TileLength",type:"Short"},324:{name:"TileOffsets",type:"Short"},325:{name:"TileByteCounts",type:"Short"},330:{name:"SubIFDs",type:"Long"},332:{name:"InkSet",type:"Short"},333:{name:"InkNames",type:"Ascii"},334:{name:"NumberOfInks",type:"Short"},336:{name:"DotRange",type:"Byte"},337:{name:"TargetPrinter",type:"Ascii"},338:{name:"ExtraSamples",type:"Short"},339:{name:"SampleFormat",type:"Short"},340:{name:"SMinSampleValue",type:"Short"},341:{name:"SMaxSampleValue",type:"Short"},342:{name:"TransferRange",type:"Short"},343:{name:"ClipPath",type:"Byte"},344:{name:"XClipPathUnits",type:"Long"},345:{name:"YClipPathUnits",type:"Long"},346:{name:"Indexed",type:"Short"},347:{name:"JPEGTables",type:"Undefined"},351:{name:"OPIProxy",type:"Short"},512:{name:"JPEGProc",type:"Long"},513:{name:"JPEGInterchangeFormat",type:"Long"},514:{name:"JPEGInterchangeFormatLength",type:"Long"},515:{name:"JPEGRestartInterval",type:"Short"},517:{name:"JPEGLosslessPredictors",type:"Short"},518:{name:"JPEGPointTransforms",type:"Short"},519:{name:"JPEGQTables",type:"Long"},520:{name:"JPEGDCTables",type:"Long"},521:{name:"JPEGACTables",type:"Long"},529:{name:"YCbCrCoefficients",type:"Rational"},530:{name:"YCbCrSubSampling",type:"Short"},531:{name:"YCbCrPositioning",type:"Short"},532:{name:"ReferenceBlackWhite",type:"Rational"},700:{name:"XMLPacket",type:"Byte"},18246:{name:"Rating",type:"Short"}
1,18249:{name:"RatingPercent",type:"Short"},32781:{name:"ImageID",type:"Ascii"},33421:{name:"CFARepeatPatternDim",type:"Short"},33422:{name:"CFAPattern",type:"Byte"},33423:{name:"BatteryLevel",type:"Rational"},33432:{name:"Copyright",type:"Ascii"},33434:{name:"ExposureTime",type:"Rational"},34377:{name:"ImageResources",type:"Byte"},34665:{name:"ExifTag",type:"Long"},34675:{name:"InterColorProfile",type:"Undefined"},34853:{name:"GPSTag",type:"Long"},34857:{name:"Interlace",type:"Short"},34858:{name:"TimeZoneOffset",type:"Long"},34859:{name:"SelfTimerMode",type:"Short"},37387:{name:"FlashEnergy",type:"Rational"},37388:{name:"SpatialFrequencyResponse",type:"Undefined"},37389:{name:"Noise",type:"Undefined"},37390:{name:"FocalPlaneXResolution",type:"Rational"},37391:{name:"FocalPlaneYResolution",type:"Rational"},37392:{name:"FocalPlaneResolutionUnit",type:"Short"},37393:{name:"ImageNumber",type:"Long"},37394:{name:"SecurityClassification",type:"Ascii"},37395:{name:"ImageHistory",type:"Ascii"},37397:{name:"ExposureIndex",type:"Rational"},37398:{name:"TIFFEPStandardID",type:"Byte"},37399:{name:"SensingMethod",type:"Short"},40091:{name:"XPTitle",type:"Byte"},40092:{name:"XPComment",type:"Byte"},40093:{name:"XPAuthor",type:"Byte"},40094:{name:"XPKeywords",type:"Byte"},40095:{name:"XPSubject",type:"Byte"},50341:{name:"PrintImageMatching",type:"Undefined"},50706:{name:"DNGVersion",type:"Byte"},50707:{name:"DNGBackwardVersion",type:"Byte"},50708:{name:"UniqueCameraModel",type:"Ascii"},50709:{name:"LocalizedCameraModel",type:"Byte"},50710:{name:"CFAPlaneColor",type:"Byte"},50711:{name:"CFALayout",type:"Short"},50712:{name:"LinearizationTable",type:"Short"},50713:{name:"BlackLevelRepeatDim",type:"Short"},50714:{name:"BlackLevel",type:"Rational"},50715:{name:"BlackLevelDeltaH",type:"SRational"},50716:{name:"BlackLevelDeltaV",type:"SRational"},50717:{name:"WhiteLevel",type:"Short"},50718:{name:"DefaultScale",type:"Rational"},50719:{name:"DefaultCropOrigin",type:"Short"},50720:{name:"DefaultCropSize",type:"Short"},50721:{name:"ColorMatrix1",type:"SRational"},50722:{name:"ColorMatrix2",type:"SRational"},50723:{name:"CameraCalibration1",type:"SRational"},50724:{name:"CameraCalibration2",type:"SRational"},50725:{name:"ReductionMatrix1",type:"SRational"},50726:{name:"ReductionMatrix2",type:"SRational"},50727:{name:"AnalogBalance",type:"Rational"},50728:{name:"AsShotNeutral",type:"Short"},50729:{name:"AsShotWhiteXY",type:"Rational"},50730:{name:"BaselineExposure",type:"SRational"},50731:{name:"BaselineNoise",type:"Rational"},50732:{name:"BaselineSharpness",type:"Rational"},50733:{name:"BayerGreenSplit",type:"Long"},50734:{name:"LinearResponseLimit",type:"Rational"},50735:{name:"CameraSerialNumber",type:"Ascii"},50736:{name:"LensInfo",type:"Rational"},50737:{name:"ChromaBlurRadius",type:"Rational"},50738:{name:"AntiAliasStrength",type:"Rational"},50739:{name:"ShadowScale",type:"SRational"},50740:{name:"DNGPrivateData",type:"Byte"},50741:{name:"MakerNoteSafety",type:"Short"},50778:{name:"CalibrationIlluminant1",type:"Short"},50779:{name:"CalibrationIlluminant2",type:"Short"},50780:{name:"BestQualityScale",type:"Rational"},50781:{name:"RawDataUniqueID",type:"Byte"},50827:{name:"OriginalRawFileName",type:"Byte"},50828:{name:"OriginalRawFileData",type:"Undefined"},50829:{name:"ActiveArea",type:"Short"},50830:{name:"MaskedAreas",type:"Short"},50831:{name:"AsShotICCProfile",type:"Undefined"},50832:{name:"AsShotPreProfileMatrix",type:"SRational"},50833:{name:"CurrentICCProfile",type:"Undefined"},50834:{name:"CurrentPreProfileMatrix",type:"SRational"},50879:{name:"ColorimetricReference",type:"Short"},50931:{name:"CameraCalibrationSignature",type:"Byte"},50932:{name:"ProfileCalibrationSignature",type:"Byte"},50934:{name:"AsShotProfileName",type:"Byte"},50935:{name:"NoiseReductionApplied",type:"Rational"},50936:{name:"ProfileName",type:"Byte"},50937:{name:"ProfileHueSatMapDims",type:"Long"},50938:{name:"ProfileHueSatMapData1",type:"Float"},50939:{name:"ProfileHueSatMapData2",type:"Float"},50940:{name:"ProfileToneCurve",type:"Float"}
1,50941:{name:"ProfileEmbedPolicy",type:"Long"},50942:{name:"ProfileCopyright",type:"Byte"},50964:{name:"ForwardMatrix1",type:"SRational"},50965:{name:"ForwardMatrix2",type:"SRational"},50966:{name:"PreviewApplicationName",type:"Byte"},50967:{name:"PreviewApplicationVersion",type:"Byte"},50968:{name:"PreviewSettingsName",type:"Byte"},50969:{name:"PreviewSettingsDigest",type:"Byte"},50970:{name:"PreviewColorSpace",type:"Long"},50971:{name:"PreviewDateTime",type:"Ascii"},50972:{name:"RawImageDigest",type:"Undefined"},50973:{name:"OriginalRawFileDigest",type:"Undefined"},50974:{name:"SubTileBlockSize",type:"Long"},50975:{name:"RowInterleaveFactor",type:"Long"},50981:{name:"ProfileLookTableDims",type:"Long"},50982:{name:"ProfileLookTableData",type:"Float"},51008:{name:"OpcodeList1",type:"Undefined"},51009:{name:"OpcodeList2",type:"Undefined"},51022:{name:"OpcodeList3",type:"Undefined"}},Exif:{33434:{name:"ExposureTime",type:"Rational"},33437:{name:"FNumber",type:"Rational"},34850:{name:"ExposureProgram",type:"Short"},34852:{name:"SpectralSensitivity",type:"Ascii"},34855:{name:"ISOSpeedRatings",type:"Short"},34856:{name:"OECF",type:"Undefined"},34864:{name:"SensitivityType",type:"Short"},34865:{name:"StandardOutputSensitivity",type:"Long"},34866:{name:"RecommendedExposureIndex",type:"Long"},34867:{name:"ISOSpeed",type:"Long"},34868:{name:"ISOSpeedLatitudeyyy",type:"Long"},34869:{name:"ISOSpeedLatitudezzz",type:"Long"},36864:{name:"ExifVersion",type:"Undefined"},36867:{name:"DateTimeOriginal",type:"Ascii"},36868:{name:"DateTimeDigitized",type:"Ascii"},37121:{name:"ComponentsConfiguration",type:"Undefined"},37122:{name:"CompressedBitsPerPixel",type:"Rational"},37377:{name:"ShutterSpeedValue",type:"SRational"},37378:{name:"ApertureValue",type:"Rational"},37379:{name:"BrightnessValue",type:"SRational"},37380:{name:"ExposureBiasValue",type:"SRational"},37381:{name:"MaxApertureValue",type:"Rational"},37382:{name:"SubjectDistance",type:"Rational"},37383:{name:"MeteringMode",type:"Short"},37384:{name:"LightSource",type:"Short"},37385:{name:"Flash",type:"Short"},37386:{name:"FocalLength",type:"Rational"},37396:{name:"SubjectArea",type:"Short"},37500:{name:"MakerNote",type:"Undefined"},37510:{name:"UserComment",type:"Ascii"},37520:{name:"SubSecTime",type:"Ascii"},37521:{name:"SubSecTimeOriginal",type:"Ascii"},37522:{name:"SubSecTimeDigitized",type:"Ascii"},40960:{name:"FlashpixVersion",type:"Undefined"},40961:{name:"ColorSpace",type:"Short"},40962:{name:"PixelXDimension",type:"Long"},40963:{name:"PixelYDimension",type:"Long"},40964:{name:"RelatedSoundFile",type:"Ascii"},40965:{name:"InteroperabilityTag",type:"Long"},41483:{name:"FlashEnergy",type:"Rational"},41484:{name:"SpatialFrequencyResponse",type:"Undefined"},41486:{name:"FocalPlaneXResolution",type:"Rational"},41487:{name:"FocalPlaneYResolution",type:"Rational"},41488:{name:"FocalPlaneResolutionUnit",type:"Short"},41492:{name:"SubjectLocation",type:"Short"},41493:{name:"ExposureIndex",type:"Rational"},41495:{name:"SensingMethod",type:"Short"},41728:{name:"FileSource",type:"Undefined"},41729:{name:"SceneType",type:"Undefined"},41730:{name:"CFAPattern",type:"Undefined"},41985:{name:"CustomRendered",type:"Short"},41986:{name:"ExposureMode",type:"Short"},41987:{name:"WhiteBalance",type:"Short"},41988:{name:"DigitalZoomRatio",type:"Rational"},41989:{name:"FocalLengthIn35mmFilm",type:"Short"},41990:{name:"SceneCaptureType",type:"Short"},41991:{name:"GainControl",type:"Short"},41992:{name:"Contrast",type:"Short"},41993:{name:"Saturation",type:"Short"},41994:{name:"Sharpness",type:"Short"},41995:{name:"DeviceSettingDescription",type:"Undefined"},41996:{name:"SubjectDistanceRange",type:"Short"},42016:{name:"ImageUniqueID",type:"Ascii"},42032:{name:"CameraOwnerName",type:"Ascii"},42033:{name:"BodySerialNumber",type:"Ascii"},42034:{name:"LensSpecification",type:"Rational"},42035:{name:"LensMake",type:"Ascii"},42036:{name:"LensModel",type:"Ascii"},42037:{name:"LensSerialNumber",type:"Ascii"},42240:{name:"Gamma",type:"Rational"}},GPS:{0:{name:"GPSVersionID",type:"Byte"},1:{name:"GPSLatitudeRef",type:"Ascii"},2:{name:"GPSLatitude",type:"Rational"},3:{name:"GPSLongitudeRef",type:"Ascii"},4:{name:"GPSLongitude",type:"Rational"},5:{name:"GPSAltitudeRef",type:"Byte"},6:{name:"GPSAltitude",type:"Rational"},7:{name:"GPSTimeStamp",type:"Rational"},8:{name:"GPSSatellites",type:"Ascii"},9:{name:"GPSStatus",type:"Ascii"},10:{name:"GPSMeasureMode",type:"Ascii"},11:{name:"GPSDOP",type:"Rational"},12:{name:"GPSSpeedRef",type:"Ascii"},13:{name:"GPSSpeed",type:"Rational"},14:{name:"GPSTrackRef",type:"Ascii"},15:{name:"GPSTrack",type:"Rational"},16:{name:"GPSImgDirectionRef",type:"Ascii"}
1,17:{name:"GPSImgDirection",type:"Rational"},18:{name:"GPSMapDatum",type:"Ascii"},19:{name:"GPSDestLatitudeRef",type:"Ascii"},20:{name:"GPSDestLatitude",type:"Rational"},21:{name:"GPSDestLongitudeRef",type:"Ascii"},22:{name:"GPSDestLongitude",type:"Rational"},23:{name:"GPSDestBearingRef",type:"Ascii"},24:{name:"GPSDestBearing",type:"Rational"},25:{name:"GPSDestDistanceRef",type:"Ascii"},26:{name:"GPSDestDistance",type:"Rational"},27:{name:"GPSProcessingMethod",type:"Undefined"},28:{name:"GPSAreaInformation",type:"Undefined"},29:{name:"GPSDateStamp",type:"Ascii"},30:{name:"GPSDifferential",type:"Short"},31:{name:"GPSHPositioningError",type:"Rational"}},Interop:{1:{name:"InteroperabilityIndex",type:"Ascii"}}};Ft["0th"]=Ft.Image,Ft["1st"]=Ft.Image,H.TAGS=Ft,H.ImageIFD={ProcessingSoftware:11,NewSubfileType:254,SubfileType:255,ImageWidth:256,ImageLength:257,BitsPerSample:258,Compression:259,PhotometricInterpretation:262,Threshholding:263,CellWidth:264,CellLength:265,FillOrder:266,DocumentName:269,ImageDescription:270,Make:271,Model:272,StripOffsets:273,Orientation:274,SamplesPerPixel:277,RowsPerStrip:278,StripByteCounts:279,XResolution:282,YResolution:283,PlanarConfiguration:284,GrayResponseUnit:290,GrayResponseCurve:291,T4Options:292,T6Options:293,ResolutionUnit:296,TransferFunction:301,Software:305,DateTime:306,Artist:315,HostComputer:316,Predictor:317,WhitePoint:318,PrimaryChromaticities:319,ColorMap:320,HalftoneHints:321,TileWidth:322,TileLength:323,TileOffsets:324,TileByteCounts:325,SubIFDs:330,InkSet:332,InkNames:333,NumberOfInks:334,DotRange:336,TargetPrinter:337,ExtraSamples:338,SampleFormat:339,SMinSampleValue:340,SMaxSampleValue:341,TransferRange:342,ClipPath:343,XClipPathUnits:344,YClipPathUnits:345,Indexed:346,JPEGTables:347,OPIProxy:351,JPEGProc:512,JPEGInterchangeFormat:513,JPEGInterchangeFormatLength:514,JPEGRestartInterval:515,JPEGLosslessPredictors:517,JPEGPointTransforms:518,JPEGQTables:519,JPEGDCTables:520,JPEGACTables:521,YCbCrCoefficients:529,YCbCrSubSampling:530,YCbCrPositioning:531,ReferenceBlackWhite:532,XMLPacket:700,Rating:18246,RatingPercent:18249,ImageID:32781,CFARepeatPatternDim:33421,CFAPattern:33422,BatteryLevel:33423,Copyright:33432,ExposureTime:33434,ImageResources:34377,ExifTag:34665,InterColorProfile:34675,GPSTag:34853,Interlace:34857,TimeZoneOffset:34858,SelfTimerMode:34859,FlashEnergy:37387,SpatialFrequencyResponse:37388,Noise:37389,FocalPlaneXResolution:37390,FocalPlaneYResolution:37391,FocalPlaneResolutionUnit:37392,ImageNumber:37393,SecurityClassification:37394,ImageHistory:37395,ExposureIndex:37397,TIFFEPStandardID:37398,SensingMethod:37399,XPTitle:40091,XPComment:40092,XPAuthor:40093,XPKeywords:40094,XPSubject:40095,PrintImageMatching:50341,DNGVersion:50706,DNGBackwardVersion:50707,UniqueCameraModel:50708,LocalizedCameraModel:50709,CFAPlaneColor:50710,CFALayout:50711,LinearizationTable:50712,BlackLevelRepeatDim:50713,BlackLevel:50714,BlackLevelDeltaH:50715,BlackLevelDeltaV:50716,WhiteLevel:50717,DefaultScale:50718,DefaultCropOrigin:50719,DefaultCropSize:50720,ColorMatrix1:50721,ColorMatrix2:50722,CameraCalibration1:50723,CameraCalibration2:50724,ReductionMatrix1:50725,ReductionMatrix2:50726,AnalogBalance:50727,AsShotNeutral:50728,AsShotWhiteXY:50729,BaselineExposure:50730,BaselineNoise:50731,BaselineSharpness:50732,BayerGreenSplit:50733,LinearResponseLimit:50734,CameraSerialNumber:50735,LensInfo:50736,ChromaBlurRadius:50737,AntiAliasStrength:50738,ShadowScale:50739,DNGPrivateData:50740,MakerNoteSafety:50741,CalibrationIlluminant1:50778,CalibrationIlluminant2:50779,BestQualityScale:50780,RawDataUniqueID:50781,OriginalRawFileName:50827,OriginalRawFileData:50828,ActiveArea:50829,MaskedAreas:50830,AsShotICCProfile:50831,AsShotPreProfileMatrix:50832,CurrentICCProfile:50833,CurrentPreProfileMatrix:50834,ColorimetricReference:50879,CameraCalibrationSignature:50931,ProfileCalibrationSignature:50932,AsShotProfileName:50934,NoiseReductionApplied:50935,ProfileName:50936,ProfileHueSatMapDims:50937,ProfileHueSatMapData1:50938,ProfileHueSatMapData2:50939,ProfileToneCurve:50940,ProfileEmbedPolicy:50941,ProfileCopyright:50942,ForwardMatrix1:50964,ForwardMatrix2:50965,PreviewApplicationName:50966,PreviewApplicationVersion:50967,PreviewSettingsName:50968,PreviewSettingsDigest:50969,PreviewColorSpace:50970,PreviewDateTime:50971,RawImageDigest:50972,OriginalRawFileDigest:50973,SubTileBlockSize:50974,RowInterleaveFactor:50975,ProfileLookTableDims:50981,ProfileLookTableData:50982,OpcodeList1:51008,OpcodeList2:51009,OpcodeList3:51022,NoiseProfile:51041},H.ExifIFD={ExposureTime:33434,FNumber:33437,ExposureProgram:34850,SpectralSensitivity:34852,ISOSpeedRatings:34855,OECF:34856,SensitivityType:34864,StandardOutputSensitivity:34865,RecommendedExposureIndex:34866,ISOSpeed:34867,ISOSpeedLatitudeyyy:34868,ISOSpeedLatitudezzz:34869,ExifVersion:36864,DateTimeOriginal:36867,DateTimeDigitized:36868,ComponentsConfiguration:37121,CompressedBitsPerPixel:37122,ShutterSpeedValue:37377,ApertureValue:37378,BrightnessValue:37379,ExposureBiasValue:37380,MaxApertureValue:37381,SubjectDistance:37382,MeteringMode:37383,LightSource:37384,Flash:37385,FocalLength:37386,SubjectArea:37396,MakerNote:37500,UserComment:37510,SubSecTime:37520,SubSecTimeOriginal:37521,SubSecTimeDigitized:37522,FlashpixVersion:40960,ColorSpace:40961,PixelXDimension:40962,PixelYDimension:40963,RelatedSoundFile:40964,InteroperabilityTag:40965,FlashEnergy:41483,SpatialFrequencyResponse:41484,FocalPlaneXResolution:41486,FocalPlaneYResolution:41487,FocalPlaneResolutionUnit:41488,SubjectLocation:41492,ExposureIndex:41493,SensingMethod:41495,FileSource:41728,SceneType:41729,CFAPattern:41730,CustomRendered:41985,ExposureMode:41986,WhiteBalance:41987,DigitalZoomRatio:41988,FocalLengthIn35mmFilm:41989,SceneCaptureType:41990,GainControl:41991,Contrast:41992,Saturation:41993,Sharpness:41994,DeviceSettingDescription:41995,SubjectDistanceRange:41996,ImageUniqueID:42016,CameraOwnerName:42032,BodySerialNumber:42033,LensSpecification:42034,LensMake:42035,LensModel:42036,LensSerialNumber:42037,Gamma:42240},H.GPSIFD={GPSVersionID:0,GPSLatitudeRef:1,GPSLatitude:2,GPSLongitudeRef:3,GPSLongitude:4,GPSAltitudeRef:5,GPSAltitude:6,GPSTimeStamp:7,GPSSatellites:8,GPSStatus:9,GPSMeasureMode:10,GPSDOP:11,GPSSpeedRef:12,GPSSpeed:13,GPSTrackRef:14,GPSTrack:15,GPSImgDirectionRef:16,GPSImgDirection:17,GPSMapDatum:18,GPSDestLatitudeRef:19,GPSDestLatitude:20,GPSDestLongitudeRef:21,GPSDestLongitude:22,GPSDestBearingRef:23,GPSDestBearing:24,GPSDestDistanceRef:25,GPSDestDistance:26,GPSProcessingMethod:27,GPSAreaInformation:28,GPSDateStamp:29,GPSDifferential:30,GPSHPositioningError:31},H.InteropIFD={InteroperabilityIndex:1},H.GPSHelper={degToDmsRational:function(R){var N=Math.abs(R),X=N%1*60,U=X%1*60;return[[Math.floor(N),1],[Math.floor(X),1],[Math.round(100*U),100]]},dmsRationalToDeg:function(R,N){return(R[0][0]/R[0][1]+R[1][0]/R[1][1]/60+R[2][0]/R[2][1]/3600)*("S"===N||"W"===N?-1:1)}},ns.exports&&(Di=ns.exports=H),Di.piexif=H}()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.