/*! * filename: ej2-pdfviewer.min.js * version : 19.1.66 * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ this.ej=this.ej||{},this.ej.pdfviewer=function(t,e,i,n,o,s,a,r,l,u,M,L,d){"use strict";function w(t){return"Line"===t.shapeAnnotationType||"LineWidthArrowHead"===t.shapeAnnotationType||"Distance"===t.shapeAnnotationType||"Polygon"===t.shapeAnnotationType}function h(t,e){if(t&&e){var i="#ffffff00"===t.fillColor?"transparent":t.fillColor;e.style.fill=i,e.style.strokeColor=t.strokeColor,e.style.color=t.strokeColor,e.style.strokeWidth=t.thickness,"Image"===t.shapeAnnotationType&&(e.style.strokeWidth=0),e.style.strokeDashArray=t.borderDashArray,e.style.opacity=t.opacity}}function p(t){for(var e=0,n=0;n-1){var l=t.wrapper.children[0].bounds.center;0===o?(s={x:t.sourcePoint.x,y:t.sourcePoint.y-t.leaderHeight},l=t.sourcePoint):(s={x:t.targetPoint.x,y:t.targetPoint.y-t.leaderHeight},l=t.targetPoint);var u=i.identityMatrix();if(i.rotateMatrix(u,r,l.x,l.y),n=i.transformPointByMatrix(u,{x:s.x,y:s.y}),e==="Leader"+o)return{leader:"leader"+o,point:n};o++}}return{leader:"",point:n}}function m(t,e){Math.abs(t.sourcePoint.x-t.targetPoint.x),Math.abs(t.sourcePoint.y-t.targetPoint.y);var i=(e=t.vertexPoints).slice(0);return i&&i.length>0&&(t.sourcePoint=i[0],t.targetPoint=i[i.length-1]),i}function f(t,e){for(var i,n="",o=[],s=0;s0&&(n+=" L"+i.x+" "+i.y);return n}function T(t,e,n){var o,s=new i.Rect;return o=f(t,e),s=i.Rect.toBounds(e),n.width=s.width,n.height=s.height,n.offsetX=s.x+n.width/2,n.offsetY=s.y+n.height/2,n.data=o,t.wrapper&&(t.wrapper.offsetX=n.offsetX,t.wrapper.offsetY=n.offsetY,t.wrapper.width=s.width,t.wrapper.height=s.height),n}function N(t,e){var i=[];return i=m(t),e.staticSize=!0,e=T(t,i,e),h(t,e),e}function x(t,e,n,o,s){var a,r;e.offsetX=n.x,e.offsetY=n.y,r=i.Point.findAngle(n,o);var l=t.thickness<=5?5:t.thickness;a=W(s?t.sourceDecoraterShapes:t.taregetDecoraterShapes);var u=new i.Size(2*l,2*l);e.transform=i.RotateTransform.Self,h(t,e),e.style.fill="tranparent"!==t.fillColor?t.fillColor:"white",e.rotateAngle=r,e.data=a,e.canMeasurePath=!0,e.width=u.width,e.height=u.height,"Butt"===t.sourceDecoraterShapes&&(e.width=u.width-10,e.height=u.height+10)}function D(t,e,n,o){var s=new i.PathElement;return x(t,s,e,n,o),s}function I(t,e){return e[0]=E(t,e,!0),e[e.length-1]=E(t,e,!1),e}function E(t,e,n){var o={x:0,y:0},s={x:0,y:0},a={x:0,y:0},r=e.length;s=n?e[0]:e[r-1],a=n?e[1]:e[r-2];var l=i.Point.distancePoints(s,a);l=0===l?1:l;var u=t.thickness;o.x=Math.round(s.x+u*(a.x-s.x)/l),o.y=Math.round(s.y+u*(a.y-s.y)/l);return o=i.Point.adjustPoint(o,a,!0,.5)}function v(t,e,n,o){var s,a=[],r=i.Point.findAngle(e[0],e[1]);return s=B(t,r),!o.enableImportAnnotationMeasurement&&t.notes&&""!==t.notes?s.content=t.notes:s.content=n.setConversion(p([e[0],e[1]])*n.pixelToPointFactor,t),s.rotateValue={y:-10,angle:r},!0===t.enableShapeLabel&&(s.style.strokeColor=t.labelBorderColor,s.style.fill=t.labelFillColor,s.style.fontSize=t.fontSize,s.style.color=t.fontColor,s.style.fontFamily=t.fontFamily),a.push(s),a}function b(t,i,n){for(var o,s=0;si.Point.findLength(n,t)?n:e;var s=i.Point.findAngle(e,n),a=i.Point.findAngle(o,t),r=i.Point.findLength(o,t),l=a+2*(s-a);return{x:o.x+r*Math.cos(l*Math.PI/180),y:o.y+r*Math.sin(l*Math.PI/180)}}function W(t){return Kt[t]}function _(t,e,i,n){if(i&&e.activeElements.activePageID>-1){var o=R(e,i,t),s=G(o,t,e,i);return n?o:s}}function R(t,e,i){var n=t.currentPosition||{x:i.offsetX,y:i.offsetY};return q(n={x:n.x/t.getZoomFactor(),y:n.y/t.getZoomFactor()},e.getPageTable(t.activeElements.activePageID).objects)}function G(t,e,n,o){var s,a,r,l=null;if(e&&e.type&&-1!==e.type.indexOf("touch")){if(s=e,o.annotation){var u=n.getElement("_pageDiv_"+o.annotation.getEventPageNumber(e));if(u){var M=u.getBoundingClientRect();a=s.changedTouches[0].clientX-M.left,r=s.changedTouches[0].clientY-M.top}}}else a=isNaN(e.offsetX)?e.position?e.position.x:0:e.offsetX,r=isNaN(e.offsetY)?e.position?e.position.y:0:e.offsetY;for(var L=0,d=0;da&&(j.y-5-g)*n.getZoomFactor()r)if(n.tool instanceof re)l=t[d];else if(L){var y=a-(j.x-5)*n.getZoomFactor()+((j.x+j.width+5)*n.getZoomFactor()-a)+(r-(j.y-5-g)*n.getZoomFactor())+((j.y+j.height+5)*n.getZoomFactor()-r);L>y&&(l=t[d],L=y)}else l=t[d],L=a-(j.x-5)*n.getZoomFactor()+((j.x+j.width+5)*n.getZoomFactor()-a)+(r-(j.y-5-g)*n.getZoomFactor())+((j.y+j.height+5)*n.getZoomFactor()-r)}return l}function H(t,e){var n=t.sourcePoint,o=t.targetPoint;if("Distance"===t.shapeAnnotationType){var s=e,a=void 0,r=i.Point.findAngle(t.sourcePoint,t.targetPoint);if(s.id.indexOf("leader")>-1){var l=t.wrapper.children[0].bounds.center;s.id.indexOf("leader1")>-1?(a={x:t.sourcePoint.x,y:t.sourcePoint.y-t.leaderHeight},l=n):(a={x:t.targetPoint.x,y:t.targetPoint.y-t.leaderHeight},l=o);var u=i.identityMatrix();return i.rotateMatrix(u,r,l.x,l.y),i.transformPointByMatrix(u,{x:a.x,y:a.y})}}}function Z(t,e,i){return K(t.wrapper,e,i)}function X(t,e,i){if(0===i.length)i.push(t);else if(1===i.length)i[0][e]>t[e]?i.splice(0,0,t):i.push(t);else if(i.length>1){for(var n=0,o=i.length-1,s=Math.floor((n+o)/2);s!==n;)i[s][e]t[e]&&(o=s,s=Math.floor((n+o)/2));i[o][e]t[e]?i.splice(n,0,t):i[n][e]t[e]&&i.splice(o,0,t)}}function K(t,e,n){if(t&&t.children)for(var o=t.children.length-1;o>=0;o--){var s=t.children[o];if(s&&s.bounds.containsPoint(e,10)){if(s instanceof i.Container){var a=this.findTargetElement(s,e);if(a)return a}if(s.bounds.containsPoint(e,10))return s}}return t&&t.bounds.containsPoint(e,n)&&"none"!==t.style.fill?t:null}function q(t,e){for(var i=[],n=0,o=e;n0&&(i=parseInt(n[n.length-1]))}return i}function tt(t,e,n,o,s){var a=i.createHtmlElement("div",{id:s.element.id+o+"_diagramAdornerLayer",style:"width:"+t.width+"px;height:"+t.height+"px;"+e});if(!i.getDiagramElement(a.id)){var r=et(s.element.id+o+"_diagramAdorner_svg",t.width,t.height);r.setAttribute("class","e-adorner-layer"+o),r.setAttribute("style","pointer-events:none;"),s.adornerSvgLayer=i.createSvgElement("g",{id:s.element.id+"_diagramAdorner"}),s.adornerSvgLayer.setAttribute("style"," pointer-events: all; "),r.appendChild(s.adornerSvgLayer),a.appendChild(r),n.parentElement.appendChild(a);var l=i.createSvgElement("g",{id:s.element.id+"_SelectorElement"});s.adornerSvgLayer.appendChild(l),i.setAttributeSvg(r,{style:"pointer-events:none;"})}s.viewerBase.applyElementStyles(a,o)}function et(t,e,n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");return i.setAttributeSvg(o,{id:t,width:e,height:n}),o}function it(t,e,i,n){switch(t){case"Create":nt({type:n,target:document.querySelector(e.target),cssClass:e.cssClass,label:e.label,width:e.width});break;case"Show":Ot(document.querySelector(i));break;case"Hide":Yt(document.querySelector(i));break;case"Set":Bt({cssClass:e.cssClass,type:n})}}function nt(t,i){if(t.target){var n,o=e.isNullOrUndefined(i)?e.createElement:i,s=mt(t.target,o);if(e.isNullOrUndefined(t.cssClass)||s.wrap.classList.add(t.cssClass),e.isNullOrUndefined(t.template)&&e.isNullOrUndefined(xe)){var a=e.isNullOrUndefined(t.type)?Mt(s.wrap):t.type;n=jt(e.isNullOrUndefined(t.width)?void 0:t.width,a),Lt(a,s.wrap,n,o),e.isNullOrUndefined(t.label)||ot(s.inner_wrap,t.label,o)}else{var r=e.isNullOrUndefined(t.template)?xe:t.template;s.wrap.classList.add(_e),Ct(s.wrap,r,De)}s.wrap.classList.add(Ve),s=null}}function ot(t,e,i){var n=i("div",{});return n.classList.add(We),n.textContent=e,t.appendChild(n),n}function st(t,e,i){var n=yt();Ne[n]={timeOut:0,type:"Material",radius:e},St(t,n,i,ke),Nt(e,t,"Material",ke)}function at(t,e,i){var n=yt();Ne[n]={timeOut:0,type:"Bootstrap4",radius:e},St(t,n,i,Ye),Nt(e,t,"Bootstrap4",Ye)}function rt(t,e,i){var n={};Ne[e].timeOut=0,n[e]=gt(e,i,0,0),ft({uniqueID:e,container:t,globalInfo:n,timeOutVar:0})}function lt(t,e,i){var n=yt();Ne[n]={timeOut:0,type:"Fabric",radius:e},At(t,n,Oe,i),bt(e,t,Oe)}function ut(t,e,i){var n=yt();Ne[n]={timeOut:0,type:"HighContrast",radius:e},At(t,n,Be,i),bt(e,t,Be)}function Mt(t){return window.getComputedStyle(t,":after").getPropertyValue("content").replace(/['"]+/g,"")}function Lt(t,i,n,o){var s=i.querySelector("."+Fe),a=s.querySelector("svg");switch(e.isNullOrUndefined(a)||s.removeChild(a),t){case"Material":st(s,n,o);break;case"Fabric":lt(s,n,o);break;case"Bootstrap":dt(s,n,o);break;case"HighContrast":ut(s,n,o);break;case"Bootstrap4":at(s,n,o)}}function dt(t,e,i){var n=yt();Ne[n]={timeOut:0,type:"Bootstrap",radius:e},wt(t,n,i),ht(t,e)}function wt(t,e,i){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("id",e),n.setAttribute("class",Pe),n.setAttribute("viewBox","0 0 64 64"),t.insertBefore(n,t.firstChild);for(var o=0;o<=7;o++){var s=document.createElementNS("http://www.w3.org/2000/svg","circle");s.setAttribute("class",Ue+"_"+o),s.setAttribute("r","2"),s.setAttribute("transform","translate(32,32)"),n.appendChild(s)}}function ht(t,e){var i=t.querySelector("svg.e-spin-bootstrap");i.style.width=i.style.height=e+"px";for(var n=90,o=0;o<=7;o++){var s=zt(0,0,24,n),a=i.querySelector("."+Ue+"_"+o);a.setAttribute("cx",s.x+""),a.setAttribute("cy",s.y+""),n=n>=360?0:n,n+=45}}function pt(t,e){function i(t){n.push(t),t===s&&1!==r||(t<=o&&t>1&&!a?t=parseFloat((t-.2).toFixed(2)):1===t?(t=7,t=parseFloat((t+.2).toFixed(2)),a=!0):t<8&&a?8===(t=parseFloat((t+.2).toFixed(2)))&&(a=!1):t<=8&&!a&&(t=parseFloat((t-.2).toFixed(2))),++r,i(t))}var n=[],o=t,s=e,a=!1,r=1;return i(o),n}function ct(t){for(var e=t.querySelector("svg.e-spin-bootstrap").getAttribute("id"),i=1;i<=8;i++)!function(t,e,i,n,o){function s(e){Ne[o].isAnimate&&(++a,t.setAttribute("r",e+""),a>=n.length&&(a=0),Ne[o].timeOut=setTimeout(s.bind(null,n[a]),18))}var a=0;s(e)}(t.getElementsByClassName("e-path-circle_"+(8===i?0:i))[0],i,0,pt(i,i),e)}function Ct(t,i,n){e.isNullOrUndefined(n)||t.classList.add(n),t.querySelector(".e-spinner-inner").innerHTML=i}function jt(t,e){var i;switch(e){case"Material":i=Ie;break;case"Fabric":i=Ee;break;case"Bootstrap4":i=be;break;default:i=ve}return t=t?parseFloat(t+""):i,"Bootstrap"===e?t:t/2}function gt(t,e,i,n){return{radius:e,count:i,previousId:n}}function yt(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function At(t,e,i,n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("id",e),o.setAttribute("class",i);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",Ue);var a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("class",Je),t.insertBefore(o,t.firstChild),o.appendChild(s),o.appendChild(a)}function St(t,e,i,n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("class",n),o.setAttribute("id",e);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",Ue),t.insertBefore(o,t.firstChild),o.appendChild(s)}function mt(t,e){var i=e("div",{});i.classList.add(Qe);var n=e("div",{});return n.classList.add(Fe),t.appendChild(i),i.appendChild(n),{wrap:i,inner_wrap:n}}function ft(t){Tt(1,149,vt,1333,t.globalInfo[t.uniqueID].count,75,t),t.globalInfo[t.uniqueID].count=++t.globalInfo[t.uniqueID].count%4}function Tt(t,i,n,o,s,a,r){function l(e){var i=Math.max(0,Math.min((new Date).getTime()-L,o));u(n(i,t,d,o),e.container),M===e.globalInfo[e.uniqueID].previousId&&i=0){var r=s.getAttribute("id");clearTimeout(Ne[r].timeOut)}Lt(i,t,a,o)}var Ut=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jt=function(t,e,i,n){var o,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},Wt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Ut(n,t),Jt([e.Property(0)],n.prototype,"x",void 0),Jt([e.Property(0)],n.prototype,"y",void 0),Jt([e.Property(0)],n.prototype,"width",void 0),Jt([e.Property(0)],n.prototype,"height",void 0),Jt([e.Property(0)],n.prototype,"left",void 0),Jt([e.Property(0)],n.prototype,"top",void 0),Jt([e.Property(0)],n.prototype,"right",void 0),Jt([e.Property(0)],n.prototype,"bottom",void 0),Jt([e.Complex({x:0,y:0},i.Point)],n.prototype,"location",void 0),Jt([e.Complex(new i.Size(0,0),i.Size)],n.prototype,"size",void 0),n}(e.ChildProperty),_t=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ut(i,t),Jt([e.Property(!1)],i.prototype,"isBold",void 0),Jt([e.Property(!1)],i.prototype,"isItalic",void 0),Jt([e.Property(!1)],i.prototype,"isUnderline",void 0),Jt([e.Property(!1)],i.prototype,"isStrikeout",void 0),i}(e.ChildProperty),Rt=function(t){function i(e,i,n,o){return t.call(this,e,i,n,o)||this}return Ut(i,t),Jt([e.Property("")],i.prototype,"id",void 0),Jt([e.Property("Rectangle")],i.prototype,"shapeAnnotationType",void 0),Jt([e.Property("")],i.prototype,"measureType",void 0),Jt([e.Property("")],i.prototype,"author",void 0),Jt([e.Property("")],i.prototype,"modifiedDate",void 0),Jt([e.Property("")],i.prototype,"subject",void 0),Jt([e.Property("")],i.prototype,"notes",void 0),Jt([e.Property(!1)],i.prototype,"isCommentLock",void 0),Jt([e.Property("black")],i.prototype,"strokeColor",void 0),Jt([e.Property("#ffffff00")],i.prototype,"fillColor",void 0),Jt([e.Property("#ffffff00")],i.prototype,"stampFillColor",void 0),Jt([e.Property("black")],i.prototype,"stampStrokeColor",void 0),Jt([e.Property("")],i.prototype,"data",void 0),Jt([e.Property(1)],i.prototype,"opacity",void 0),Jt([e.Property(1)],i.prototype,"thickness",void 0),Jt([e.Property("")],i.prototype,"borderStyle",void 0),Jt([e.Property("")],i.prototype,"borderDashArray",void 0),Jt([e.Property(0)],i.prototype,"rotateAngle",void 0),Jt([e.Property(!1)],i.prototype,"isCloudShape",void 0),Jt([e.Property(0)],i.prototype,"cloudIntensity",void 0),Jt([e.Property(40)],i.prototype,"leaderHeight",void 0),Jt([e.Property(null)],i.prototype,"lineHeadStart",void 0),Jt([e.Property(null)],i.prototype,"lineHeadEnd",void 0),Jt([e.Property([])],i.prototype,"vertexPoints",void 0),Jt([e.Property(null)],i.prototype,"sourcePoint",void 0),Jt([e.Property("None")],i.prototype,"sourceDecoraterShapes",void 0),Jt([e.Property("None")],i.prototype,"taregetDecoraterShapes",void 0),Jt([e.Property(null)],i.prototype,"targetPoint",void 0),Jt([e.Property([])],i.prototype,"segments",void 0),Jt([e.Complex({x:0,y:0},Wt)],i.prototype,"bounds",void 0),Jt([e.Property(0)],i.prototype,"pageIndex",void 0),Jt([e.Property(-1)],i.prototype,"zIndex",void 0),Jt([e.Property(null)],i.prototype,"wrapper",void 0),Jt([e.Property(!1)],i.prototype,"isDynamicStamp",void 0),Jt([e.Property("")],i.prototype,"dynamicText",void 0),Jt([e.Property("")],i.prototype,"annotName",void 0),Jt([e.Property({})],i.prototype,"review",void 0),Jt([e.Property([])],i.prototype,"comments",void 0),Jt([e.Property("#000")],i.prototype,"fontColor",void 0),Jt([e.Property(16)],i.prototype,"fontSize",void 0),Jt([e.Property("Helvetica")],i.prototype,"fontFamily",void 0),Jt([e.Property(!1)],i.prototype,"enableShapeLabel",void 0),Jt([e.Property("label")],i.prototype,"labelContent",void 0),Jt([e.Property("#ffffff00")],i.prototype,"labelFillColor",void 0),Jt([e.Property(15)],i.prototype,"labelMaxLength",void 0),Jt([e.Property(1)],i.prototype,"labelOpacity",void 0),Jt([e.Property("")],i.prototype,"annotationSelectorSettings",void 0),Jt([e.Property("#ffffff00")],i.prototype,"labelBorderColor",void 0),Jt([e.Property("left")],i.prototype,"textAlign",void 0),Jt([e.Property("")],i.prototype,"signatureName",void 0),Jt([e.Property(0)],i.prototype,"minHeight",void 0),Jt([e.Property(0)],i.prototype,"minWidth",void 0),Jt([e.Property(0)],i.prototype,"maxHeight",void 0),Jt([e.Property(0)],i.prototype,"maxWidth",void 0),Jt([e.Property(!1)],i.prototype,"isLock",void 0),Jt([e.Property("UI Drawn Annotation")],i.prototype,"annotationAddMode",void 0),Jt([e.Property("")],i.prototype,"annotationSettings",void 0),Jt([e.Property(16)],i.prototype,"previousFontSize",void 0),Jt([e.Complex({isBold:!1,isItalic:!1,isStrikeout:!1,isUnderline:!1},_t)],i.prototype,"font",void 0),Jt([e.Complex({x:0,y:0},Wt)],i.prototype,"labelBounds",void 0),Jt([e.Property(null)],i.prototype,"customData",void 0),Jt([e.Property(["None"])],i.prototype,"allowedInteractions",void 0),Jt([e.Property(!0)],i.prototype,"isPrint",void 0),Jt([e.Property(!1)],i.prototype,"isReadonly",void 0),i}(e.ChildProperty),Gt=function(){function t(){this.pageIdTemp=0,this.zIndexTemp=-1,this.childNodesTemp=[],this.objects=[],this.zIndexTemp=-1,this.pageIdTemp=0}return Object.defineProperty(t.prototype,"pageId",{get:function(){return this.pageIdTemp},set:function(t){this.pageIdTemp=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"zIndex",{get:function(){return this.zIndexTemp},set:function(t){this.zIndexTemp=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objects",{get:function(){return this.childNodesTemp},set:function(t){this.childNodesTemp=t},enumerable:!0,configurable:!0}),t}(),Ht=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zt=function(t,e,i,n){var o,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},Xt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Ht(n,t),n.prototype.init=function(t){var e=new i.Container;e.measureChildren=!1;new i.Size;if(e.children=[],this.annotations)for(var n=0;nu&&(c.width=u,t.bounds.width=u),c.height=t.bounds.height/2,d&&t.bounds.height>l&&(c.height=l/2,t.bounds.height=l/2),c.rotateValue=void 0,c.margin.left=10,c.margin.bottom=-5,c.relativeMode="Point",c.setOffsetWithRespectToBounds(0,.1,null);C=c;c.style.fill=t.fillColor,c.style.strokeColor=t.strokeColor,c.style.opacity=t.opacity,n.width=t.bounds.width+20,n.height=t.bounds.height+20,n.style.opacity=t.opacity,e.children.push(C)}else{e.horizontalAlignment="Left",(n=s=new i.DrawingElement).cornerRadius=10,n.style.fill=t.stampFillColor,n.style.strokeColor=t.stampStrokeColor,e.children.push(n);var c=new i.PathElement;c.id=i.randomId()+"_stamp",c.data=t.data,c.width=t.bounds.width,d&&t.bounds.width>u&&(c.width=u,t.bounds.width=u),c.height=t.bounds.height,d&&t.bounds.height>l&&(c.height=l,t.bounds.height=l),c.minWidth=c.width/2,c.minHeight=c.height/2;var C=c;c.style.fill=t.fillColor,c.style.strokeColor=t.strokeColor,c.style.opacity=t.opacity,n.width=t.bounds.width+20,n.height=t.bounds.height+20,n.minWidth=c.width/2,n.minHeight=c.height/2,n.style.opacity=t.opacity,e.children.push(C),e.minHeight=n.minHeight+20,e.minWidth=n.minWidth+20}break;case"Image":case"SignatureImage":var j=new i.ImageElement;j.source=t.data,n=j,e.children.push(n);break;case"Rectangle":if(s=new i.DrawingElement,n=s,e.children.push(n),t.enableShapeLabel){var g=this.textElement(t);g.content=t.labelContent,g.style.color=t.fontColor,g.style.strokeColor=t.labelBorderColor,g.style.fill=t.labelFillColor,g.style.fontSize=t.fontSize,g.style.fontFamily=t.fontFamily,g.style.opacity=t.labelOpacity,e.children.push(g)}break;case"Perimeter":(o=new i.PathElement).data="M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",n=o,h(t,o),e.children.push(n),(s=new i.DrawingElement).id="perimeter_"+i.randomId(),s.height=.2,s.width=.2,s.transform=i.RotateTransform.Self,s.horizontalAlignment="Stretch",this.setNodePosition(s,t),s.rotateAngle=t.rotateAngle,h(t,s),e.children.push(s);var y=this.textElement(t);(y=new i.TextElement).content=y.content=p([{x:t.bounds.x,y:t.bounds.y},{x:t.bounds.x+t.bounds.width,y:t.bounds.y+t.bounds.height}]).toString(),y.rotateValue={y:-10,angle:t.rotateAngle},e.children.push(y);break;case"Radius":(o=new i.PathElement).data="M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",n=o,h(t,o),e.children.push(n),(s=new i.DrawingElement).id="radius_"+i.randomId(),s.height=.2,s.width=t.bounds.width/2,s.transform=i.RotateTransform.Self,this.setNodePosition(s,t),s.rotateAngle=t.rotateAngle,h(t,s),e.children.push(s);var A=this.textElement(t);t.enableShapeLabel&&(A.style.color=t.fontColor,A.style.strokeColor=t.labelBorderColor,A.style.fill=t.labelFillColor,A.style.fontSize=t.fontSize,A.style.fontFamily=t.fontFamily,A.style.opacity=t.labelOpacity);var S=p([{x:t.bounds.x,y:t.bounds.y},{x:t.bounds.x+t.bounds.width,y:t.bounds.y+t.bounds.height}]);!this.pdfViewer.enableImportAnnotationMeasurement&&t.notes&&""!==t.notes?A.content=t.notes:A.content=this.pdfViewer.annotation.measureAnnotationModule.setConversion(S/2*this.pdfViewer.annotation.measureAnnotationModule.pixelToPointFactor,t),A.rotateValue={y:-10,x:t.bounds.width/4,angle:t.rotateAngle},e.children.push(A);break;case"StickyNotes":var m=new i.ImageElement;m.source=t.data,m.width=t.bounds.width,m.height=t.bounds.height,m.style.strokeColor=t.strokeColor,m.style.strokeWidth=0,n=m,e.children.push(n);break;case"SignatureText":n=new i.DrawingElement,e.children.push(n);var f=this.textElement(t);f.style.fontFamily=t.fontFamily,f.style.fontSize=t.fontSize,f.style.textAlign="Left",f.rotateValue=void 0,f.content=t.data,f.margin.top=t.fontSize/2,f.style.textWrapping="Wrap",e.children.push(f);break;case"FreeText":n=new i.DrawingElement,e.children.push(n);var T=this.textElement(t);(T=new i.TextElement).style.fontFamily=t.fontFamily,T.style.fontSize=t.fontSize,T.style.textAlign="Left","center"===t.textAlign.toLowerCase()?T.style.textAlign="Center":"right"===t.textAlign.toLowerCase()?T.style.textAlign="Right":"justify"===t.textAlign.toLowerCase()&&(T.style.textAlign="Justify"),T.style.color=t.fontColor,T.style.bold=t.font.isBold,T.style.italic=t.font.isItalic,!0===t.font.isUnderline?T.style.textDecoration="Underline":!0===t.font.isStrikeout&&(T.style.textDecoration="LineThrough"),T.rotateValue=void 0,T.content=t.dynamicText,T.style.opacity=t.opacity,T.margin.left=2,T.margin.top=5,T.style.textWrapping="Wrap",T.relativeMode="Point",T.setOffsetWithRespectToBounds(0,0,null),T.relativeMode="Point",e.children.push(T)}return n.id=t.id+"_content",n.relativeMode="Object",a||(void 0!==t.bounds.width&&(n.width=t.bounds.width,d&&(n.widthu)&&(n.widthu&&(n.width=u))),n.horizontalAlignment="Stretch",void 0!==t.bounds.height&&(n.height=t.bounds.height,d&&(n.heightl)&&(n.heightl&&(n.height=l))),h(t,n)),n.isRectElement=!0,n.verticalAlignment="Stretch",n},t.prototype.textElement=function(t){var e=new i.TextElement;return h(t,e),e.horizontalAlignment="Center",e.verticalAlignment="Top",e.relativeMode="Object",e.setOffsetWithRespectToBounds(.5,.5,"Absolute"),e},t.prototype.setNodePosition=function(t,e){if("Perimeter"===e.shapeAnnotationType)t.offsetX=e.bounds.x+e.bounds.width/2,t.offsetY=e.bounds.y+e.bounds.height/2;else if("Radius"===e.shapeAnnotationType){var n={x:e.bounds.x+e.bounds.width/2+e.bounds.width/4,y:e.bounds.y+e.bounds.height/2},o={x:e.bounds.x+e.bounds.width/2,y:e.bounds.y+e.bounds.height/2},s=i.identityMatrix();i.rotateMatrix(s,e.rotateAngle,o.x,o.y);var a=i.transformPointByMatrix(s,n),r={x:a.x,y:a.y};t.offsetX=r.x,t.offsetY=r.y,t.width=e.bounds.width/2}},t.prototype.initContainer=function(t){t.id||(t.id=i.randomId());var e;return e=new i.Canvas,e.id=t.id,e.offsetX=t.bounds.x+.5*t.bounds.width,e.offsetY=t.bounds.y+.5*t.bounds.height,e.style.fill="transparent",e.style.strokeColor="transparent",e.rotateAngle=t.rotateAngle,t.wrapper=e,e},t.prototype.initLine=function(t){t.id||(t.id=i.randomId());var e=new i.Canvas,n=new i.PathElement;n.id=t.id+"_path";var o=new i.PathElement,s=new i.PathElement;if(t.vertexPoints.length){t.sourcePoint=t.vertexPoints[0],t.targetPoint=t.vertexPoints[t.vertexPoints.length-1];for(w=0;w0)for(w=0;w0)for(var w=0;w0;s--)(o=n[s-1]).parentNode.removeChild(o)}},t.prototype.renderSelector=function(t,e,n,o){if(!n||o){var s=new i.Size,a=this.pdfViewer.selectedItems;if(this.clearSelectorLayer(t),a.wrapper){a.wrapper.measure(s);var r=this.pdfViewer.viewerBase.getZoomFactor();a.wrapper.arrange(a.wrapper.desiredSize),a.width=a.wrapper.actualSize.width,a.height=a.wrapper.actualSize.height,a.offsetX=a.wrapper.offsetX,a.offsetY=a.wrapper.offsetY,1===a.annotations.length&&(a.rotateAngle=a.annotations[0].rotateAngle,a.wrapper.rotateAngle=a.annotations[0].rotateAngle);a.wrapper.bounds;var l=void 0;if(a.annotations.length)for(var u=0;u2&&(L=[L[0],L[1]]),l.dashArray=L.toString()}else this.getBorderSelector(d,l)}else{l.x*=n.scale,l.y*=n.scale,l.width*=n.scale,l.height*=n.scale,l.fill="transparent";var d=void 0;if(d=this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType,i&&"object"!=typeof i&&""!==i){M=""===(u=JSON.parse(i)).selectionBorderColor?"black":u.selectionBorderColor;l.stroke=M,l.strokeWidth=1===i.selectionBorderThickness?1:u.selectionBorderThickness,(L=0===u.selectorLineDashArray.length?[6,3]:u.selectorLineDashArray).length>2&&(L=[L[0],L[1]]),l.dashArray=L.toString()}else"HandWrittenSignature"===d||"Ink"===d?this.getSignBorder(d,l):this.getBorderSelector(d,l);l.class="e-pv-diagram-border",a&&(l.class+=" e-diagram-lane"),l.id="borderRect",l.id="borderRect",o||(l.class+=" e-disabled"),s&&(l.class+=" e-thick-border"),l.cornerRadius=0}var w=this.getParentSvg(t,"selector");this.svgRenderer.drawRectangle(e,l,this.pdfViewer.element.id,void 0,!0,w)},t.prototype.getSignBorder=function(t,i){if("HandWrittenSignature"===t&&this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings){a=void 0;a=e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderColor?"#0000ff":this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderColor,i.stroke=a;n=void 0;n=e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectionBorderThickness,i.strokeWidth=n;o=void 0;(o=e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.selectorLineDashArray).length>2&&(o=[o[0],o[1]]),i.dashArray=o.toString()}else if("Ink"===t&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings){a=void 0;a=e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderColor?"#0000ff":this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderColor,i.stroke=a;var n=void 0;n=e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectionBorderThickness,i.strokeWidth=n;var o=void 0;(o=e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.selectorLineDashArray).length>2&&(o=[o[0],o[1]]),i.dashArray=o.toString()}else{var s=this.pdfViewer.annotationSelectorSettings,a=""===s.selectionBorderColor?"black":s.selectionBorderColor;i.stroke=a,i.strokeWidth=1===s.selectionBorderThickness?1:s.selectionBorderThickness,(o=0===s.selectorLineDashArray.length?[6,3]:s.selectorLineDashArray).length>2&&(o=[o[0],o[1]]),i.dashArray=o.toString()}},t.prototype.getBorderSelector=function(t,i){var n=this.pdfViewer.annotationSelectorSettings,o=e.isNullOrUndefined(n.selectionBorderColor)||""===n.selectionBorderColor?"black":n.selectionBorderColor;i.stroke=o,i.strokeWidth=e.isNullOrUndefined(n.selectionBorderThickness)||1===n.selectionBorderThickness?1:n.selectionBorderThickness;var s=e.isNullOrUndefined(n.selectorLineDashArray)||0===n.selectorLineDashArray.length?[6,3]:n.selectorLineDashArray;if(s.length>2&&(s=[s[0],s[1]]),i.dashArray=s.toString(),"Rectangle"===t&&this.pdfViewer.rectangleSettings.annotationSelectorSettings){var a=e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=a;C=e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=C;var r=e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.rectangleSettings.annotationSelectorSettings.selectorLineDashArray;r.length>2&&(r=[r[0],r[1]]),i.dashArray=r.toString()}else if("Ellipse"===t&&this.pdfViewer.circleSettings.annotationSelectorSettings){var l=e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=l;C=e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.circleSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=C;var u=e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.circleSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.circleSettings.annotationSelectorSettings.selectorLineDashArray;u.length>2&&(u=[u[0],u[1]]),i.dashArray=u.toString()}else if("Radius"===t&&this.pdfViewer.radiusSettings.annotationSelectorSettings){var M=e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=M;C=e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.radiusSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=C;var L=e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.radiusSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.radiusSettings.annotationSelectorSettings.selectorLineDashArray;L.length>2&&(L=[L[0],L[1]]),i.dashArray=L.toString()}else if("FreeText"===t&&this.pdfViewer.freeTextSettings.annotationSelectorSettings){var d=e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=d;C=e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=C;var w=e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.freeTextSettings.annotationSelectorSettings.selectorLineDashArray;w.length>2&&(w=[w[0],w[1]]),i.dashArray=w.toString()}else if("StickyNotes"===t&&this.pdfViewer.stickyNotesSettings.annotationSelectorSettings){var h=e.isNullOrUndefined(this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderColor?"black":this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=h;C=e.isNullOrUndefined(this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=C;var p=e.isNullOrUndefined(this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectorLineDashArray.length?[6,3]:this.pdfViewer.stickyNotesSettings.annotationSelectorSettings.selectorLineDashArray;p.length>2&&(p=[p[0],p[1]]),i.dashArray=p.toString()}else if("Stamp"===t&&this.pdfViewer.stampSettings.annotationSelectorSettings){var c=e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderColor)||""===this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderColor?"#0000ff":this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderColor;i.stroke=c;var C=e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderThickness)?1:this.pdfViewer.stampSettings.annotationSelectorSettings.selectionBorderThickness;i.strokeWidth=C;var j=e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.selectorLineDashArray)||0===this.pdfViewer.stampSettings.annotationSelectorSettings.selectorLineDashArray.length?[4]:this.pdfViewer.stampSettings.annotationSelectorSettings.selectorLineDashArray;j.length>2&&(j=[j[0],j[1]]),i.dashArray=j.toString()}},t.prototype.renderCircularHandle=function(t,e,n,o,s,a,r,l,u,M,L,d,w,h){var p=e,c={x:n,y:o};if(l=l||{scale:1,tx:0,ty:0},0!==p.rotateAngle||0!==p.parentTransform){var j=i.identityMatrix();i.rotateMatrix(j,p.rotateAngle+p.parentTransform,p.offsetX,p.offsetY),c=i.transformPointByMatrix(j,c)}var g,y=C(p);g=this.pdfViewer.selectedItems.annotations[0].measureType?this.pdfViewer.selectedItems.annotations[0].measureType:this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType,this.getResizerColors(g,y,h,l),this.getShapeSize(g,y,h,l),y.strokeWidth=1,void 0!==d&&(y.id="segmentEnd_"+d),y.centerX=(c.x+l.tx)*l.scale,y.centerY=(c.y+l.ty)*l.scale,y.angle=0,y.id=t,y.visible=a,y.class=w,y.opacity=1,u&&(y.class+=" e-connected"),M&&(y.visible=!1),y.x=c.x*l.scale-y.width/2,y.y=c.y*l.scale-y.height/2;var A=this.getParentSvg(e,"selector");"Square"===this.getShape(g,h)?this.svgRenderer.drawRectangle(s,y,t,void 0,!0,A):"Circle"===this.getShape(g,h)&&this.svgRenderer.drawCircle(s,y,1)},t.prototype.getShapeSize=function(t,i,n,o){if(n&&"object"!=typeof n&&""!==n){s=JSON.parse(n);i.radius=(e.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)/2,i.width=(e.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)*o.scale}else{var s=this.pdfViewer.annotationSelectorSettings;i.radius=(e.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)/2,i.width=(e.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(s.resizerSize)||8===s.resizerSize?8:s.resizerSize)*o.scale,"Line"===t&&this.pdfViewer.lineSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.lineSettings.annotationSelectorSettings.resizerSize)*o.scale):"LineWidthArrowHead"===t&&this.pdfViewer.arrowSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerSize)*o.scale):"Rectangle"===t&&this.pdfViewer.rectangleSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerSize)*o.scale):"Ellipse"===t&&this.pdfViewer.circleSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.circleSettings.annotationSelectorSettings.resizerSize)*o.scale):"Distance"===t&&this.pdfViewer.distanceSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerSize)*o.scale):"Polygon"===t&&this.pdfViewer.polygonSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerSize)*o.scale):"Radius"===t&&this.pdfViewer.radiusSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerSize)*o.scale):"Stamp"===t&&this.pdfViewer.stampSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.stampSettings.annotationSelectorSettings.resizerSize)*o.scale):"FreeText"===t&&this.pdfViewer.freeTextSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerSize)*o.scale):"HandWrittenSignature"===t&&this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerSize)*o.scale):"Perimeter"===t&&this.pdfViewer.perimeterSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerSize)*o.scale):"Area"===t&&this.pdfViewer.areaSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.areaSettings.annotationSelectorSettings.resizerSize)*o.scale):"Volume"===t&&this.pdfViewer.volumeSettings.annotationSelectorSettings?(i.radius=(e.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerSize)*o.scale):"Ink"===t&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings&&(i.radius=(e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)/2,i.width=(e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)*o.scale,i.height=(e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)||8===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize?8:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerSize)*o.scale)}},t.prototype.getShape=function(t,i){var n;if(i&&"object"!=typeof i&&""!==i){o=JSON.parse(i);n=e.isNullOrUndefined(o.resizerShape)||"Square"===o.resizerShape?"Square":o.resizerShape}else{var o=this.pdfViewer.annotationSelectorSettings;n=e.isNullOrUndefined(o.resizerShape)||"Square"===o.resizerShape?"Square":o.resizerShape,"Line"===t&&this.pdfViewer.lineSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.lineSettings.annotationSelectorSettings.resizerShape:"LineWidthArrowHead"===t&&this.pdfViewer.arrowSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerShape:"Rectangle"===t&&this.pdfViewer.rectangleSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerShape:"Ellipse"===t&&this.pdfViewer.circleSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.circleSettings.annotationSelectorSettings.resizerShape:"Polygon"===t&&this.pdfViewer.polygonSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerShape:"Distance"===t&&this.pdfViewer.distanceSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerShape:"Radius"===t&&this.pdfViewer.radiusSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerShape:"Stamp"===t&&this.pdfViewer.stampSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.stampSettings.annotationSelectorSettings.resizerShape:"FreeText"===t&&this.pdfViewer.freeTextSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerShape:"HandWrittenSignature"===t&&this.pdfViewer.handWrittenSignatureSettings&&this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerShape:"Perimeter"===t&&this.pdfViewer.perimeterSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerShape:"Area"===t&&this.pdfViewer.areaSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.areaSettings.annotationSelectorSettings.resizerShape:"Volume"===t&&this.pdfViewer.volumeSettings.annotationSelectorSettings?n=e.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerShape:"Ink"===t&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings&&(n=e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerShape)||"Square"===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerShape?"Square":this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerShape)}return n},t.prototype.getResizerColors=function(t,i,n,o){if(n&&"object"!=typeof n&&""!==n){s=JSON.parse(n);i.stroke=e.isNullOrUndefined(s.resizerBorderColor)||"black"===s.resizerBorderColor?"black":s.resizerBorderColor,i.fill=e.isNullOrUndefined(s.resizerFillColor)||"#FF4081"===s.resizerFillColor?"#FF4081":s.resizerFillColor}else{var s=this.pdfViewer.annotationSelectorSettings;i.stroke=e.isNullOrUndefined(s.resizerBorderColor)||"black"===s.resizerBorderColor?"black":s.resizerBorderColor,i.fill=e.isNullOrUndefined(s.resizerFillColor)||"#FF4081"===s.resizerFillColor?"#FF4081":s.resizerFillColor,"Line"===t&&this.pdfViewer.lineSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.lineSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.lineSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.lineSettings.annotationSelectorSettings.resizerFillColor):"LineWidthArrowHead"===t&&this.pdfViewer.arrowSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerFillColor):"Rectangle"===t&&this.pdfViewer.rectangleSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerFillColor):"Ellipse"===t&&this.pdfViewer.circleSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.circleSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.circleSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.circleSettings.annotationSelectorSettings.resizerFillColor):"Distance"===t&&this.pdfViewer.distanceSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerFillColor):"Polygon"===t&&this.pdfViewer.polygonSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerFillColor):"Radius"===t&&this.pdfViewer.radiusSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerFillColor):"Stamp"===t&&this.pdfViewer.stampSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.stampSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.stampSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.stampSettings.annotationSelectorSettings.resizerFillColor):"FreeText"===t&&this.pdfViewer.freeTextSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerFillColor):"HandWrittenSignature"===t&&this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerFillColor):"Perimeter"===t&&this.pdfViewer.perimeterSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerFillColor):"Area"===t&&this.pdfViewer.areaSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.areaSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.areaSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.areaSettings.annotationSelectorSettings.resizerFillColor):"Volume"===t&&this.pdfViewer.volumeSettings.annotationSelectorSettings?(i.stroke=e.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerFillColor):"Ink"===t&&this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings&&(i.stroke=e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerBorderColor)||"black"===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerBorderColor?"black":this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerBorderColor,i.fill=e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerFillColor)||"#FF4081"===this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerFillColor?"#FF4081":this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerFillColor)}},t.prototype.renderRotateThumb=function(t,e,n,o,s){new i.PathElement;var a,r=t.offsetY-t.actualSize.height*t.pivot.y,l=t.offsetX-t.actualSize.width*t.pivot.x+t.pivot.x*t.actualSize.width,u=r;if(l=(l+n.tx)*n.scale,u=(u+n.ty)*n.scale,a={x:l,y:u-25},0!==t.rotateAngle||0!==t.parentTransform){var M=i.identityMatrix();i.rotateMatrix(M,t.rotateAngle+t.parentTransform,(n.tx+t.offsetX)*n.scale,(n.ty+t.offsetY)*n.scale),a=i.transformPointByMatrix(M,a)}var L=C(t);L.stroke="black",L.strokeWidth=1,L.opacity=1,L.fill="#FF4081",L.centerX=a.x,L.centerY=a.y,L.radius=4,L.angle=0,L.visible=!0,L.class="e-diagram-rotate-handle",L.id="rotateThumb",this.svgRenderer.drawCircle(e,L,i.ThumbsConstraints.Rotate,{"aria-label":"Thumb to rotate the selected object"})},t.prototype.renderResizeHandle=function(t,e,n,o,s,a,r,l,u,M,L,d){var w=t.offsetX-t.actualSize.width*t.pivot.x,h=t.offsetY-t.actualSize.height*t.pivot.y,p=t.actualSize.height,c=t.actualSize.width,C={scale:o,tx:0,ty:0};l&&(this.renderPivotLine(t,e,C),this.renderRotateThumb(t,e,C)),L&&(l=!0),this.renderBorder(t,e,d,C,a,r,!0,u);var j=t.actualSize.width*o,g=t.actualSize.height*o,y=this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType,A=this.pdfViewer.selectedItems.annotations[0],S=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(A),m=!1;(this.pdfViewer.annotationModule.checkIsLockSettings(A)||A.annotationSettings.isLock)&&this.getAllowedInteractions(S)&&(m=!0);var f=this.getResizerLocation(y,d);(f<1||f>3)&&(f=3);var T=!1;!this.pdfViewer.selectedItems.annotations[0]||"Ellipse"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Radius"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Rectangle"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Ink"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||(T=!0),r||u||M||m||((l||T&&j>=40&&g>=40&&(1===f||3===f))&&(this.renderCircularHandle("resizeNorthWest",t,w,h,e,!0,n&i.ThumbsConstraints.ResizeNorthWest,C,void 0,s,{"aria-label":"Thumb to resize the selected object on top left side direction"},void 0,"e-pv-diagram-resize-handle e-northwest",d),this.renderCircularHandle("resizeNorthEast",t,w+c,h,e,!0,n&i.ThumbsConstraints.ResizeNorthEast,C,void 0,s,{"aria-label":"Thumb to resize the selected object on top right side direction"},void 0,"e-pv-diagram-resize-handle e-northeast",d),this.renderCircularHandle("resizeSouthWest",t,w,h+p,e,!0,n&i.ThumbsConstraints.ResizeSouthWest,C,void 0,s,{"aria-label":"Thumb to resize the selected object on bottom left side direction"},void 0,"e-pv-diagram-resize-handle e-southwest",d),this.renderCircularHandle("resizeSouthEast",t,w+c,h+p,e,!0,n&i.ThumbsConstraints.ResizeSouthEast,C,void 0,s,{"aria-label":"Thumb to resize the selected object on bottom right side direction"},void 0,"e-pv-diagram-resize-handle e-southeast",d)),(l||T)&&(!T||2!==f&&3!==f&&(j>=40&&g>=40||1!==f))||(this.renderCircularHandle("resizeNorth",t,w+c/2,h,e,!0,n&i.ThumbsConstraints.ResizeNorth,C,void 0,s,{"aria-label":"Thumb to resize the selected object on top side direction"},void 0,"e-pv-diagram-resize-handle e-north",d),this.renderCircularHandle("resizeSouth",t,w+c/2,h+p,e,!0,n&i.ThumbsConstraints.ResizeSouth,C,void 0,s,{"aria-label":"Thumb to resize the selected object on bottom side direction"},void 0,"e-pv-diagram-resize-handle e-south",d),this.renderCircularHandle("resizeWest",t,w,h+p/2,e,!0,n&i.ThumbsConstraints.ResizeWest,C,void 0,s,{"aria-label":"Thumb to resize the selected object on left side direction"},void 0,"e-pv-diagram-resize-handle e-west",d),this.renderCircularHandle("resizeEast",t,w+c,h+p/2,e,!0,n&i.ThumbsConstraints.ResizeEast,C,void 0,s,{"aria-label":"Thumb to resize the selected object on right side direction"},void 0,"e-pv-diagram-resize-handle e-east",d)))},t.prototype.getAllowedInteractions=function(t){if(t&&t.length>0)for(var e=0;e-1){var C=t.wrapper.children[0].bounds.center;0===w?(p={x:t.sourcePoint.x,y:t.sourcePoint.y-t.leaderHeight},C=M):(p={x:t.targetPoint.x,y:t.targetPoint.y-t.leaderHeight},C=L);var j=i.identityMatrix();i.rotateMatrix(j,c,C.x,C.y);var g=i.transformPointByMatrix(j,{x:p.x,y:p.y});this.renderCircularHandle("leaderThumb_"+(u+1),d,g.x,g.y,e,!0,n&i.ThumbsConstraints.ConnectorSource,o,s,null,null,u,null,l),w++}}},t.prototype.initSelectorWrapper=function(){this.pdfViewer.selectedItems.init(this)},t.prototype.select=function(t,e,i,n){for(var o=this.pdfViewer.selectedItems,s=0;s-1||a.indexOf("radius")>-1))this.setNodePosition(o[s],t);else if(a.length&&a.indexOf("srcDec")>-1)o[s].offsetX=t.vertexPoints[0].x,o[s].offsetY=t.vertexPoints[0].y;else if(a.length&&a.indexOf("tarDec")>-1)o[s].offsetX=t.vertexPoints[t.vertexPoints.length-1].x,o[s].offsetY=t.vertexPoints[t.vertexPoints.length-1].y;else if(a.length&&a.indexOf("stamp")>-1){var r=0,l=2;if(void 0!=t.wrapper.width&&void 0!=t.wrapper.height&&(r=20,l=2.9),t.isDynamicStamp){o[s].width=t.bounds.width-r,o[s].height=t.bounds.height/2-r;var u=o[1],M=this.pdfViewer.stampSettings?this.pdfViewer.stampSettings:this.pdfViewer.annotationSettings;M&&(M.maxHeight||M.maxWidth)&&t.bounds.height>60?3*t.bounds.heightt.bounds.width?u.style.fontSize=t.bounds.width/8/l:2*t.bounds.height1&&"Justify"===t.textAlign?o[1].horizontalAlignment="Center":o[1].horizontalAlignment="Auto")),void 0!==e.thickness&&(t.thickness=e.thickness,t.wrapper.children[0].style.strokeWidth=e.thickness),void 0!==e.borderDashArray&&(t.borderDashArray=e.borderDashArray,t.wrapper.children[0].style.strokeDashArray=e.borderDashArray),void 0!==e.borderStyle&&(t.borderStyle=e.borderStyle),void 0!==e.author&&(t.author=e.author),void 0!==e.modifiedDate&&(t.modifiedDate=e.modifiedDate),void 0!==e.subject&&(t.subject=e.subject),void 0!==e.vertexPoints&&(t.vertexPoints=e.vertexPoints,this.pdfViewer.nameTable[t.id].vertexPoints=e.vertexPoints,this.updateConnector(t,e.vertexPoints)),void 0!==e.leaderHeight&&"Polygon"!==t.shapeAnnotationType&&(t.leaderHeight=e.leaderHeight,this.updateConnector(t,t.vertexPoints)),void 0!==e.notes&&(t.notes=e.notes),void 0!==e.annotName&&(t.annotName=e.annotName),"Distance"===t.shapeAnnotationType){for(n=0;n-1&&this.setLineDistance(t,A,y,!1),y.id.indexOf("leader2")>-1&&this.setLineDistance(t,A,y,!0)}this.updateConnector(t,t.vertexPoints)}if("Polygon"===t.shapeAnnotationType&&e.vertexPoints){t.data=Y(t.vertexPoints);var S=t.wrapper.children[0];S.data=t.data,S.canMeasurePath=!0}if(w(t))for(var f=0;f1&&"Justify"===t.textAlign?o[1].horizontalAlignment="Center":1===o[1].childNodes.length&&("Justify"===t.textAlign?(o[1].horizontalAlignment="Left",o[1].setOffsetWithRespectToBounds(0,0,null)):"Right"===t.textAlign?(o[1].horizontalAlignment="Right",o[1].setOffsetWithRespectToBounds(.97,0,null)):"Left"===t.textAlign?(o[1].horizontalAlignment="Left",o[1].setOffsetWithRespectToBounds(0,0,null)):"Center"===t.textAlign&&(o[1].horizontalAlignment="Center",o[1].setOffsetWithRespectToBounds(.46,0,null)));for(var N=0;N0){o[N].isDirt=!0;var x=o[N].textNodes.length*o[N].textNodes[0].dy,D=t.bounds.height-x;if(D>0&&Dt.bounds.height){for(var I="",E=0;Et.bounds.height)break;I+=o[N].textNodes[E].text}o[N].content=I}}o[N].width=t.bounds.width-8}}t.wrapper.measure(new i.Size(t.wrapper.bounds.width,t.wrapper.bounds.height)),t.wrapper.arrange(t.wrapper.desiredSize)}this.pdfViewer.renderDrawing(void 0,t.pageIndex),t&&"FreeText"===t.shapeAnnotationType&&t.wrapper&&t.wrapper.children&&t.wrapper.children.length&&(1==(o=t.wrapper.children)[1].childNodes.length&&"Justify"===t.textAlign?(o[1].horizontalAlignment="Left",o[1].setOffsetWithRespectToBounds(.5,0,null)):o[1].childNodes.length>1&&"Justify"===t.textAlign&&(o[1].horizontalAlignment="Center",o[1].setOffsetWithRespectToBounds(0,0,null)))},t.prototype.setLineDistance=function(t,e,i,n){var o;o=n?F(t,e[1],e[0],n):F(t,e[0],e[1],n),i.data=o.data,i.offsetX=o.offsetX,i.offsetY=o.offsetY,i.rotateAngle=o.rotateAngle,i.width=o.width,i.height=o.height,i.pivot=o.pivot,i.canMeasurePath=!0,i.isDirt=!0},t.prototype.scaleSelectedItems=function(t,e,i){var n=this.pdfViewer.selectedItems;return this.scale(n,t,e,i)},t.prototype.scale=function(t,e,i,n){var o=!0;if(t instanceof Xt){if(t.annotations&&t.annotations.length)for(var s=0,a=t.annotations;s0&&(L.wrapper.width=r,L.wrapper.offsetX=d.x),l>0&&(L.wrapper.height=l,L.wrapper.offsetY=d.y),L.wrapper.offsetX-L.wrapper.actualSize.width,L.wrapper.offsetY-L.wrapper.actualSize.height,this.nodePropertyChange(o,{bounds:{width:L.wrapper.width,height:L.wrapper.height,x:L.wrapper.offsetX,y:L.wrapper.offsetY}})}}},t.prototype.scaleAnnotation=function(t,e,i,n,o){var s=this.pdfViewer.nameTable[t.id],a=s.wrapper;o||(o=t);var r=o.wrapper,l=r.offsetX-r.actualSize.width*r.pivot.x,u=r.offsetY-r.actualSize.height*r.pivot.y,M=this.getShapePoint(l,u,r.actualSize.width,r.actualSize.height,r.rotateAngle,r.offsetX,r.offsetY,n);if(void 0!==a.actualSize.width&&void 0!==a.actualSize.height){this.scaleObject(e,i,M,s,a,o);this.getShapeBounds(t.wrapper)}var L=this.checkBoundaryConstraints(void 0,void 0,t.pageIndex,t.wrapper.bounds);return L||this.scaleObject(1/e,1/i,M,s,a,o),L},t.prototype.checkBoundaryConstraints=function(t,e,i,n,o,s){var a=n?void 0:this.pdfViewer.selectedItems.wrapper.bounds,r=n,l=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+i),u=10;if(l){var M=l.clientWidth/this.pdfViewer.viewerBase.getZoomFactor(),L=l.clientHeight/this.pdfViewer.viewerBase.getZoomFactor(),d=(n?r.right:a.right)+(t||0),w=(n?r.left:a.left)+(t||0),h=(n?r.top:a.top)+(e||0),p=(n?r.bottom:a.bottom)+(e||0);if(o&&(u=50,this.pdfViewer.viewerBase.eventArgs&&this.pdfViewer.viewerBase.eventArgs.source&&this.RestrictStamp(this.pdfViewer.viewerBase.eventArgs.source)))return!1;if(d<=M-10&&w>=10&&p<=L-10&&h>=u||s)return!0}return!1},t.prototype.RestrictStamp=function(t){return!(!t||void 0===t.pageIndex||!this.pdfViewer.viewerBase.activeElements||t.pageIndex===this.pdfViewer.viewerBase.activeElements.activePageID)},t.prototype.getShapeBounds=function(t){var e,n=new i.Rect,o=(e=i.cornersPointsBeforeRotation(t)).middleLeft,s=e.topCenter,a=e.bottomCenter,r=e.middleRight,l=e.topLeft,u=e.topRight,M=e.bottomLeft,L=e.bottomRight;if(t.corners={topLeft:l,topCenter:s,topRight:u,middleLeft:o,middleRight:r,bottomLeft:M,bottomCenter:a,bottomRight:L},0!==t.rotateAngle||0!==t.parentTransform){var d=i.identityMatrix();i.rotateMatrix(d,t.rotateAngle+t.parentTransform,t.offsetX,t.offsetY),t.corners.topLeft=l=i.transformPointByMatrix(d,l),t.corners.topCenter=s=i.transformPointByMatrix(d,s),t.corners.topRight=u=i.transformPointByMatrix(d,u),t.corners.middleLeft=o=i.transformPointByMatrix(d,o),t.corners.middleRight=r=i.transformPointByMatrix(d,r),t.corners.bottomLeft=M=i.transformPointByMatrix(d,M),t.corners.bottomCenter=a=i.transformPointByMatrix(d,a),t.corners.bottomRight=L=i.transformPointByMatrix(d,L)}return n=i.Rect.toBounds([l,u,M,L]),t.corners.left=n.left,t.corners.right=n.right,t.corners.top=n.top,t.corners.bottom=n.bottom,t.corners.center=n.center,t.corners.width=n.width,t.corners.height=n.height,n},t.prototype.getShapePoint=function(t,e,n,o,s,a,r,l){var u={x:0,y:0},M=i.identityMatrix();switch(i.rotateMatrix(M,s,a,r),l.x){case 1:switch(l.y){case 1:u=i.transformPointByMatrix(M,{x:t+n,y:e+o});break;case 0:u=i.transformPointByMatrix(M,{x:t+n,y:e});break;case.5:u=i.transformPointByMatrix(M,{x:t+n,y:e+o/2})}break;case 0:switch(l.y){case.5:u=i.transformPointByMatrix(M,{x:t,y:e+o/2});break;case 1:u=i.transformPointByMatrix(M,{x:t,y:e+o});break;case 0:u=i.transformPointByMatrix(M,{x:t,y:e})}break;case.5:switch(l.y){case 0:u=i.transformPointByMatrix(M,{x:t+n/2,y:e});break;case.5:u=i.transformPointByMatrix(M,{x:t+n/2,y:e+o/2});break;case 1:u=i.transformPointByMatrix(M,{x:t+n/2,y:e+o})}}return{x:u.x,y:u.y}},t.prototype.dragConnectorEnds=function(t,e,n,o,s,a,r){var l,u,M;if(l=e instanceof Xt?e.annotations[0]:e,n={x:n.x/this.pdfViewer.viewerBase.getZoomFactor(),y:n.y/this.pdfViewer.viewerBase.getZoomFactor()},this.checkBoundaryConstraints(void 0,void 0,l.pageIndex,l.wrapper.bounds)){if("Distance"===l.shapeAnnotationType){var L=S(l,t);if("Leader0"===t)this.pdfViewer.viewerBase.tool instanceof ue?(l.vertexPoints[0].x=n.x,l.vertexPoints[0].y=n.y):(u=n.x-L.point.x,M=n.y-L.point.y,l.vertexPoints[0].x+=u,l.vertexPoints[0].y+=M);else if("Leader1"===t){var d=l.vertexPoints.length-1;this.pdfViewer.viewerBase.tool instanceof ue?(l.vertexPoints[d].x=n.x,l.vertexPoints[d].y=n.y):(u=n.x-L.point.x,M=n.y-L.point.y,l.vertexPoints[d].x+=u,l.vertexPoints[d].y+=M)}else{var w=i.Point.findAngle(l.sourcePoint,l.targetPoint),h=e.wrapper.children[0].bounds.center,p=i.identityMatrix();i.rotateMatrix(p,-w,h.x,h.y);var c=i.transformPointByMatrix(p,{x:n.x,y:n.y});if("ConnectorSegmentPoint"===t.split("_")[0]){p=i.identityMatrix();i.rotateMatrix(p,-w,h.x,h.y);var C=i.transformPointByMatrix(p,l.vertexPoints[0]),j=i.transformPointByMatrix(p,l.vertexPoints[l.vertexPoints.length-1]);if(M=c.y-C.y,0===l.leaderHeight&&null!=l.leaderHeight)l.leaderHeight=this.pdfViewer.distanceSettings.leaderLength;else{l.leaderHeight+=M,C.y+=M,j.y+=M;p=i.identityMatrix();i.rotateMatrix(p,w,h.x,h.y),l.vertexPoints[0]=i.transformPointByMatrix(p,C),l.vertexPoints[l.vertexPoints.length-1]=i.transformPointByMatrix(p,j)}}}}else if("ConnectorSegmentPoint"===t.split("_")[0]){var g=Number(t.split("_")[1]);u=n.x-l.vertexPoints[g].x,M=n.y-l.vertexPoints[g].y,l.vertexPoints[g].x+=u,l.vertexPoints[g].y+=M,l.vertexPoints.length>2&&"Perimeter"!==e.measureType&&(0===parseFloat(t.split("_")[1])?(l.vertexPoints[l.vertexPoints.length-1].x+=u,l.vertexPoints[l.vertexPoints.length-1].y+=M):parseFloat(t.split("_")[1])===l.vertexPoints.length-1&&(l.vertexPoints[0].x+=u,l.vertexPoints[0].y+=M))}this.nodePropertyChange(l,{vertexPoints:l.vertexPoints}),this.renderSelector(l.pageIndex,r)}return this.pdfViewer.renderDrawing(),!0},t.prototype.dragSourceEnd=function(t,e,i,n){var o=this.pdfViewer.nameTable[t.id];return o.vertexPoints[n].x+=e,o.vertexPoints[n].y+=i,this.pdfViewer.renderDrawing(),!0},t.prototype.updateConnector=function(t,e){var i;t.vertexPoints=e,T(t,e,t.wrapper.children[0]),t.sourcePoint,i=t.vertexPoints;var n=t.wrapper.children[0];n.canMeasurePath=!0;for(var o=0;o-1&&x(t,n,e[0],i[1],!0),t.targetPoint,n.id.indexOf("tarDec")>-1&&x(t,n,e[e.length-1],i[i.length-2],!1))},t.prototype.copy=function(){return this.pdfViewer.clipboardData.pasteIndex=1,this.pdfViewer.clipboardData.clipObject=this.copyObjects(),this.pdfViewer.clipboardData.clipObject},t.prototype.copyObjects=function(){var t=[],e=[];if(this.pdfViewer.clipboardData.childTable={},this.pdfViewer.selectedItems.annotations.length>0){t=this.pdfViewer.selectedItems.annotations;for(var i=0;iS&&xm&&Ny)&&(L=xA)&&(M=NA&&(M=A-s.width),h=(s.width-M)/c;break;case"ResizeEast":M=(w=i.transformPointByMatrix(l,{x:M,y:L})).x,L=w.y,L=0,f&&s.width+M>A&&(M=A-s.width),h=(s.width+M)/c,p=1;break;case"ResizeNorth":h=1,M=(w=i.transformPointByMatrix(l,{x:M,y:L})).x,L=w.y,f&&s.height-L>y&&(L=y-s.height),p=(s.height-L)/C;break;case"ResizeSouth":h=1,M=(w=i.transformPointByMatrix(l,{x:M,y:L})).x,L=w.y,f&&s.height+L>y&&(L=y-s.height),p=(s.height+L)/C;break;case"ResizeNorthEast":M=(w=i.transformPointByMatrix(l,{x:M,y:L})).x,L=w.y,f&&(s.width+M>A&&(M=A-s.width),s.height-L>y&&(L=y-s.height)),h=(s.width+M)/c,p=(s.height-L)/C;break;case"ResizeNorthWest":M=(w=i.transformPointByMatrix(l,{x:M,y:L})).x,L=w.y,f&&(s.width-M>A&&(M=A-s.width),s.height-L>y&&(L=y-s.height)),h=(s.width-M)/c,p=(s.height-L)/C;break;case"ResizeSouthEast":M=(w=i.transformPointByMatrix(l,{x:M,y:L})).x,L=w.y,f&&(s.width+M>A&&(M=A-s.width),s.height+L>y&&(L=y-s.height)),p=(s.height+L)/C,h=(s.width+M)/c;break;case"ResizeSouthWest":M=(w=i.transformPointByMatrix(l,{x:M,y:L})).x,L=w.y,f&&(s.width-M>A&&(M=A-s.width),s.height+L>y&&(L=y-s.height)),h=(s.width-M)/c,p=(s.height+L)/C}return{width:h,height:p}},t.prototype.getPivot=function(t){switch(t){case"ResizeWest":return{x:1,y:.5};case"ResizeEast":return{x:0,y:.5};case"ResizeNorth":return{x:.5,y:1};case"ResizeSouth":return{x:.5,y:0};case"ResizeNorthEast":return{x:0,y:1};case"ResizeNorthWest":return{x:1,y:1};case"ResizeSouthEast":return{x:0,y:0};case"ResizeSouthWest":return{x:1,y:0}}return{x:.5,y:.5}},t.prototype.getPositions=function(t,e,i){switch(t){case"ResizeEast":return{x:e,y:0};case"ResizeSouthEast":return{x:e,y:i};case"ResizeSouth":return{x:0,y:i};case"ResizeNorth":return{x:0,y:-i};case"ResizeNorthEast":return{x:e,y:-i};case"ResizeNorthWest":return{x:-e,y:-i};case"ResizeWest":return{x:-e,y:0};case"ResizeSouthWest":return{x:-e,y:i}}return{x:e,y:i}},t}(),ee=function(t){function e(e,i){return t.call(this,e,i,!0)||this}return $t(e,t),e.prototype.mouseDown=function(e){this.inAction=!0,this.mouseEventHelper(e),t.prototype.mouseDown.call(this,e)},e.prototype.mouseEventHelper=function(t){this.commandHandler&&this.commandHandler.annotationModule&&(this.commandHandler.annotationModule.overlappedCollections=_(t,this.pdfViewerBase,this.commandHandler,!0));var e=_(t,this.pdfViewerBase,this.commandHandler),i=!1;if(e&&"StickyNotes"===e.shapeAnnotationType&&e.annotationSettings&&e.annotationSettings.isLock&&(i=!this.commandHandler.annotationModule.checkAllowedInteractions("Select",e)),!i){var n=void 0;if(n=t.source&&null!==t.annotationSelectorSettings?t.source.annotationSelectorSettings:"",this.commandHandler){var o=this.commandHandler.selectedItems;if(o){var s=this.commandHandler.selectedItems.annotations[0],a=t.source;o.annotations.length&&t.info&&!t.info.ctrlKey&&this.commandHandler.annotationModule&&!1===this.commandHandler.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus?this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID):t.info&&t.info.ctrlKey&&(a&&"FreeText"===a.shapeAnnotationType||this.commandHandler.selectedItems.annotations[0]&&"FreeText"===this.commandHandler.selectedItems.annotations[0].shapeAnnotationType)&&this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),e&&(this.commandHandler.select([e.id],n),this.commandHandler.viewerBase.isAnnotationMouseDown=!0),0===o.annotations.length&&s&&"Stamp"!==s.shapeAnnotationType&&this.commandHandler.fireAnnotationUnSelect(s.annotName,s.pageIndex,s)}}}},e.prototype.mouseMove=function(e){return t.prototype.mouseMove.call(this,e),!this.blocked},e.prototype.mouseUp=function(e){this.mouseEventHelper(e),this.inAction=!1,t.prototype.mouseUp.call(this,e)},e.prototype.mouseLeave=function(t){this.inAction&&this.mouseUp(t)},e}(te),ie=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.currentTarget=null,n.prevNode=null,n}return $t(e,t),e.prototype.mouseDown=function(e){t.prototype.mouseDown.call(this,e),this.offset={x:e.source.wrapper.offsetX,y:e.source.wrapper.offsetY},this.startPosition=e.position;var i=g(e.source);this.redoElement={bounds:{x:i.wrapper.offsetX,y:i.wrapper.offsetY,width:i.wrapper.actualSize.width,height:i.wrapper.actualSize.height}},w(i)&&(this.redoElement.vertexPoints=i.vertexPoints,this.redoElement.leaderHeight=i.leaderHeight),this.inAction=!0},e.prototype.mouseUp=function(e){if(this.commandHandler){this.commandHandler.selectedItems&&this.commandHandler.selectedItems.annotations?this.commandHandler.selectedItems.annotations[0].annotName===e.source.annotName&&(this.commandHandler.viewerBase.isAnnotationMouseMove=!0):this.commandHandler.viewerBase.isAnnotationMouseMove=!1;var i=e.source.annotationSelectorSettings;this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.commandHandler.select([e.source.id],i),this.commandHandler.dragSelectedObjects(this.calculateMouseActionXDiff(e),this.calculateMouseActionYDiff(e),this.pdfViewerBase.activeElements.activePageID,i,null),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,i),this.commandHandler.viewerBase.isAnnotationMouseMove=!1;var n={bounds:{x:e.source.wrapper.offsetX,y:e.source.wrapper.offsetY,width:e.source.wrapper.actualSize.width,height:e.source.wrapper.actualSize.height},modifiedDate:e.source.modifiedDate};w(e.source)&&(n.vertexPoints=e.source.vertexPoints,n.leaderHeight=e.source.leaderHeight),this.commandHandler.annotation.addAction(this.pageIndex,null,e.source,"Drag","",this.redoElement,n),this.commandHandler.annotation.stampAnnotationModule.updateSessionStorage(e.source,null,"Drag"),this.commandHandler.annotation.stickyNotesAnnotationModule.updateStickyNotes(e.source,null)}t.prototype.mouseUp.call(this,e)},e.prototype.calculateMouseXDiff=function(){return this.currentPosition&&this.startPosition?this.currentPosition.x-this.startPosition.x:0},e.prototype.calculateMouseYDiff=function(){return this.currentPosition&&this.startPosition?this.currentPosition.y-this.startPosition.y:0},e.prototype.calculateMouseActionXDiff=function(t){var e=this.calculateMouseXDiff()/this.commandHandler.viewerBase.getZoomFactor();return this.offset?this.offset.x+e-t.source.wrapper.offsetX:0},e.prototype.calculateMouseActionYDiff=function(t){var e=this.calculateMouseYDiff()/this.commandHandler.viewerBase.getZoomFactor();return this.offset?this.offset.y+e-t.source.wrapper.offsetY:0},e.prototype.mouseMove=function(e,i,n){if(t.prototype.mouseMove.call(this,e),this.inAction){this.currentPosition=e.position,this.currentTarget=e.target;var o=e.source.annotationSelectorSettings,s=this.calculateMouseXDiff()/this.commandHandler.viewerBase.getZoomFactor(),a=this.calculateMouseYDiff()/this.commandHandler.viewerBase.getZoomFactor(),r=this.offset.x+s,l=this.offset.y+a,u=this.calculateMouseActionXDiff(e),M=this.calculateMouseActionYDiff(e);if(this.helper)u=r-this.helper.wrapper.offsetX,M=l-this.helper.wrapper.offsetY;else{this.commandHandler.selectedItems.annotations[0];var L=g(this.commandHandler.selectedItems.annotations[0]);L.wrapper&&(u=r-L.wrapper.offsetX,M=l-L.wrapper.offsetY,L.bounds=this.commandHandler.selectedItems.annotations[0].wrapper.bounds),L.wrapper=void 0,L.id="diagram_helper","Stamp"===L.shapeAnnotationType?(L.strokeColor="",L.borderDashArray="",L.fillColor="transparent",L.stampFillColor="transparent",L.data=""):"FreeText"===L.shapeAnnotationType?(L.strokeColor="blue",L.fillColor="transparent",L.thickness=1,L.opacity=1,L.dynamicText=""):(L.strokeColor="red",L.borderDashArray="5,5",L.fillColor="transparent",L.thickness=2,L.opacity=1),!0===L.enableShapeLabel&&(L.labelContent=""),i?L=this.helper=e.source:this.helper=L=this.commandHandler.add(L),this.commandHandler.selectedItems.annotations=[L]}this.helper&&"Stamp"===this.helper.shapeAnnotationType&&(i=!0),this.commandHandler.checkBoundaryConstraints(u,M,this.pdfViewerBase.activeElements.activePageID,this.helper.wrapper.bounds,i,n)?(this.commandHandler.dragSelectedObjects(u,M,this.pdfViewerBase.activeElements.activePageID,o,this.helper),this.prevNode=this.helper,this.prevPosition=this.currentPosition):this.currentPosition=this.prevPosition}return!0},e.prototype.mouseLeave=function(e){var i=e.source.annotationSelectorSettings,n=this.offset.x+this.calculateMouseXDiff(),o=this.offset.y+this.calculateMouseYDiff(),s=n-e.source.wrapper.offsetX,a=o-e.source.wrapper.offsetY;this.commandHandler.dragSelectedObjects(s,a,this.prevPageId,i,null),this.commandHandler.renderSelector(this.prevPageId,i),t.prototype.mouseLeave.call(this,e)},e.prototype.endAction=function(){t.prototype.endAction.call(this),this.currentTarget=null,this.prevPosition=null},e}(te),ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $t(e,t),e.prototype.mouseDown=function(e){t.prototype.mouseUp.call(this,e)},e.prototype.mouseMove=function(e){var i;if(!this.inAction){var n=this.pdfViewerBase.activeElements.activePageID;this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID);var o=this.commandHandler.annotation.stampAnnotationModule.moveStampElement(e.position.x,e.position.y,n);i=this.commandHandler.add(o),e.source=this.commandHandler.annotations[this.commandHandler.annotations.length-1],e.sourceWrapper=e.source.wrapper,this.inAction=!0;var s=e.source;s&&"HandWrittenSignature"===s.shapeAnnotationType?this.offset={x:e.source.wrapper.offsetX-e.source.wrapper.bounds.width/2,y:e.source.wrapper.offsetY-e.source.wrapper.bounds.height/2}:this.offset={x:e.source.wrapper.offsetX,y:e.source.wrapper.offsetY},this.startPosition=e.position,this.commandHandler.select([i.id])}var a=e.source.annotationSelectorSettings;return t.prototype.mouseMove.call(this,e,!0,!0),this.commandHandler.renderSelector(e.source.pageIndex,a),this.inAction},e}(ie),oe=function(t){function e(e,i,n){var o=t.call(this,e,i)||this;return o.sourceObject=n,o}return $t(e,t),e.prototype.mouseDown=function(e){this.pdfViewerBase.disableTextSelectionMode(),t.prototype.mouseDown.call(this,e),this.inAction=!0;var i={currentPosition:this.currentPosition,prevPosition:this.prevPosition};this.commandHandler.annotation.inkAnnotationModule.drawInkInCanvas(i,this.pdfViewerBase.activeElements.activePageID)},e.prototype.mouseMove=function(e){if(t.prototype.mouseMove.call(this,e),this.inAction){var i={currentPosition:this.currentPosition,prevPosition:this.pdfViewerBase.prevPosition};this.commandHandler.annotation.inkAnnotationModule.drawInkInCanvas(i,this.pdfViewerBase.activeElements.activePageID)}return this.inAction},e.prototype.mouseUp=function(t){return this.commandHandler.annotation.inkAnnotationModule.storePathData(),!0},e.prototype.mouseLeave=function(t){},e.prototype.endAction=function(){t.prototype.endAction.call(this)},e}(te),se=function(t){function e(e,i,n){var o=t.call(this,e,i,!0)||this;return o.endPoint=n,o}return $t(e,t),e.prototype.mouseDown=function(e){this.inAction=!0,this.undoElement=void 0,t.prototype.mouseDown.call(this,e);e.source&&e.source.annotations&&({x:this.prevPosition.x,y:this.prevPosition.y},e.source.annotations[0]),this.initialPosition=e.position,this.prevSource=this.commandHandler.selectedItems.annotations[0];var i=g(e.source);this.redoElement={bounds:{x:i.wrapper.offsetX,y:i.wrapper.offsetY,width:i.wrapper.actualSize.width,height:i.wrapper.actualSize.height}},w(i)&&(this.redoElement.vertexPoints=i.vertexPoints,this.redoElement.leaderHeight=i.leaderHeight,"Distance"!==i.measureType&&"Perimeter"!==i.measureType&&"Area"!==i.measureType&&"Volume"!==i.measureType||(this.redoElement.notes=i.notes)),this.currentPosition=e.position},e.prototype.mouseUp=function(e){if(this.commandHandler){var i=this.commandHandler.selectedItems.annotations[0];if(i){var n=this.commandHandler.annotationModule.findAnnotationSettings(i),o=0,s=0,a=0,r=0;if((n.minWidth||n.maxWidth||n.minHeight||n.maxHeight)&&(o=n.maxHeight?n.maxHeight:2e3,s=n.maxWidth?n.maxWidth:2e3,a=n.minHeight?n.minHeight:0,r=n.minWidth?n.minWidth:0),i.vertexPoints.length>3){var l=this.commandHandler.viewerBase.checkAnnotationWidth(i.vertexPoints),u=l.width,M=l.height;a||r||o||s?(M>a&&Mr&&ui.vertexPoints[1].x?i.vertexPoints[0].x-i.vertexPoints[1].x:i.vertexPoints[1].x-i.vertexPoints[0].x)>(d=i.vertexPoints[0].y>i.vertexPoints[1].y?i.vertexPoints[0].y-i.vertexPoints[1].y:i.vertexPoints[1].y-i.vertexPoints[0].y)?L:d;h<(o||s)&&h>(a||r)&&this.commandHandler.nodePropertyChange(this.prevSource,{vertexPoints:i.vertexPoints,leaderHeight:i.leaderHeight})}else this.commandHandler.nodePropertyChange(this.prevSource,{vertexPoints:i.vertexPoints,leaderHeight:i.leaderHeight});var p=e.source.annotationSelectorSettings;this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.commandHandler.select([this.prevSource.id],p),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,p);var c={bounds:{x:e.source.wrapper.offsetX,y:e.source.wrapper.offsetY,width:e.source.wrapper.actualSize.width,height:e.source.wrapper.actualSize.height}};"Distance"!==i.measureType&&"Perimeter"!==i.measureType&&"Area"!==i.measureType&&"Volume"!==i.measureType||(this.commandHandler.annotation.updateCalibrateValues(this.commandHandler.selectedItems.annotations[0]),c.notes=e.source.notes),w(e.source)&&(c.vertexPoints=e.source.vertexPoints,c.leaderHeight=e.source.leaderHeight),this.commandHandler.annotation.addAction(this.pageIndex,null,this.prevSource,"Resize","",this.redoElement,c)}}t.prototype.mouseUp.call(this,e)},e.prototype.mouseMove=function(e){t.prototype.mouseMove.call(this,e);if(this.currentPosition=e.position,this.currentPosition&&this.prevPosition){var i=this.currentPosition.x-this.prevPosition.x,n=this.currentPosition.y-this.prevPosition.y;if(e.source&&e.source.annotations&&({x:this.currentPosition.x,y:this.currentPosition.y},{x:this.prevPosition.x,y:this.prevPosition.y},e.source.annotations[0]),this.inAction&&void 0!==this.endPoint&&0!==i||0!==n){if(!this.helper){var o=g(this.commandHandler.selectedItems.annotations[0]);o.id="diagram_helper",o.strokeColor="red",o.borderDashArray="5,5",o.fillColor="transparent",o.thickness=2,o.opacity=1,!0===o.enableShapeLabel&&(o.labelContent=""),this.helper=o=this.commandHandler.add(o),this.commandHandler.selectedItems.annotations=[o]}var s=e.source.annotationSelectorSettings;this.blocked=!this.commandHandler.dragConnectorEnds(this.endPoint,this.helper,this.currentPosition,this.selectedSegment,e.target,null,s),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,s)}}return this.prevPosition=this.currentPosition,!this.blocked},e.prototype.mouseLeave=function(t){this.mouseUp(t)},e.prototype.endAction=function(){t.prototype.endAction.call(this),this.prevPosition=null,this.endPoint=null},e}(te),ae=function(t){function e(e,n,o){var s=t.call(this,e,n,!0)||this;return s.initialBounds=new i.Rect,s.corner=o,s}return $t(e,t),e.prototype.mouseDown=function(e){t.prototype.mouseDown.call(this,e),this.initialBounds.x=e.source.wrapper.offsetX,this.initialBounds.y=e.source.wrapper.offsetY,this.initialBounds.height=e.source.wrapper.actualSize.height,this.initialBounds.width=e.source.wrapper.actualSize.width,this.initialPosition=e.position;var i=g(e.source);this.redoElement={bounds:{x:i.wrapper.offsetX,y:i.wrapper.offsetY,width:i.wrapper.actualSize.width,height:i.wrapper.actualSize.height}},w(i)&&(this.redoElement.vertexPoints=i.vertexPoints,this.redoElement.leaderHeight=i.leaderHeight),"Radius"===i.measureType&&(this.redoElement.notes=i.notes),this.prevSource=this.commandHandler.selectedItems.annotations[0]},e.prototype.mouseUp=function(e,i){if(e.source,this.commandHandler){this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.commandHandler.viewerBase.isAnnotationSelect=!0,this.commandHandler.select([this.prevSource.id],this.prevSource.annotationSelectorSettings);var n=this.updateSize(this.prevSource,this.currentPosition,this.initialPosition,this.corner,this.initialBounds,null,!0);if(this.blocked=this.scaleObjects(n.width,n.height,this.corner,this.currentPosition,this.initialPosition,this.prevSource),this.commandHandler.selectedItems&&this.commandHandler.selectedItems.annotations&&this.commandHandler.selectedItems.annotations[0]&&"Stamp"===this.commandHandler.selectedItems.annotations[0].shapeAnnotationType&&(this.commandHandler.stampSettings.minHeight||this.commandHandler.stampSettings.minWidth)&&this.commandHandler.select([this.prevSource.id],this.prevSource.annotationSelectorSettings),this.commandHandler.renderSelector(this.prevPageId,this.prevSource.annotationSelectorSettings),this.commandHandler.annotation&&e.source.wrapper){var o={bounds:{x:e.source.wrapper.offsetX,y:e.source.wrapper.offsetY,width:e.source.wrapper.actualSize.width,height:e.source.wrapper.actualSize.height}};w(e.source)&&(o.vertexPoints=e.source.vertexPoints,o.leaderHeight=e.source.leaderHeight),"Radius"===this.prevSource.measureType&&(o.notes=e.source.notes,this.commandHandler.annotation.updateCalibrateValues(this.prevSource)),"FreeText"===this.prevSource.shapeAnnotationType&&this.commandHandler.selectedItems.annotations&&this.commandHandler.selectedItems.annotations.length>0&&this.commandHandler.nodePropertyChange(this.commandHandler.selectedItems.annotations[0],{}),this.commandHandler.annotation.addAction(this.pageIndex,null,this.prevSource,"Resize","",this.redoElement,o)}this.commandHandler.annotation.stampAnnotationModule.updateSessionStorage(e.source,this.prevSource.id,"Resize")}return t.prototype.mouseUp.call(this,e),!this.blocked},e.prototype.mouseMove=function(e){t.prototype.mouseMove.call(this,e);var n;n=e.source,this.currentPosition=e.position;var o=this.currentPosition.x-this.startPosition.x,s=this.currentPosition.y-this.startPosition.y;o/=this.commandHandler.viewerBase.getZoomFactor(),s/=this.commandHandler.viewerBase.getZoomFactor();var a=e.source,r=this.getPoints(o,s),l=a.width+r.x,u=a.height+r.y,M=n;n&&n.annotations&&(M=n.annotations[0]);var L=this.commandHandler.annotationModule.findAnnotationSettings(M),d=0,w=0,h=0,p=0;(L.minWidth||L.maxWidth||L.minHeight||L.maxHeight)&&(d=L.maxHeight?L.maxHeight:2e3,w=L.maxWidth?L.maxWidth:2e3,h=L.minHeight?L.minHeight:0,p=L.minWidth?L.minWidth:0),(h||p||d||w)&&(u>=h&&u<=d&&l>=p&&l<=w?(o=o,s=s):((ud)&&(s=uw)&&(o=l=l&&h=r&&ws&&(t.bounds.width=s),t.bounds.height>o&&(t.bounds.height=o),t.bounds.height<=o&&t.bounds.width<=s&&this.commandHandler.nodePropertyChange(t,{bounds:t.bounds})):this.commandHandler.nodePropertyChange(t,{bounds:t.bounds})},e.prototype.updateRadiusLinePosition=function(t,e){var n={x:e.bounds.x+e.bounds.width/4,y:e.bounds.y},o={x:e.bounds.x+e.bounds.width/2,y:e.bounds.y+e.bounds.height/2},s=i.identityMatrix();i.rotateMatrix(s,e.rotateAngle,o.x,o.y);var a=i.transformPointByMatrix(s,n),r={x:a.x,y:a.y};t.offsetX=r.x,t.offsetY=r.y,t.width=e.bounds.width/2;var l=this.commandHandler.annotationModule.findAnnotationSettings(e),u=0;l.maxWidth&&(u=l.maxWidth?l.maxWidth:2e3,e.bounds.width>u&&(e.bounds.width=u,t.width=e.bounds.width/2)),this.commandHandler.renderDrawing(void 0,e.pageIndex)},e}(te),le=function(t){function n(e,i,n){var o=t.call(this,e,i)||this;return o.action=n,o}return $t(n,t),n.prototype.mouseDown=function(e){if(t.prototype.mouseDown.call(this,e),this.inAction=!0,this.drawingObject){var i=void 0,n=this.drawingObject;i={x:(i=n.vertexPoints[n.vertexPoints.length-1]).x,y:i.y};var o=this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length-1];o.x===i.x&&o.x===i.y||this.drawingObject.vertexPoints.push(i),this.commandHandler.nodePropertyChange(n,{vertexPoints:n.vertexPoints})}else{this.startPoint={x:this.startPosition.x,y:this.startPosition.y};var s={bounds:{x:this.currentPosition.x,y:this.currentPosition.y,width:5,height:5},vertexPoints:[{x:this.startPoint.x/this.pdfViewerBase.getZoomFactor(),y:this.startPoint.y/this.pdfViewerBase.getZoomFactor()},{x:this.currentPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.currentPosition.y/this.pdfViewerBase.getZoomFactor()}],shapeAnnotationType:"Line",fillColor:this.commandHandler.drawingObject.fillColor,strokeColor:this.commandHandler.drawingObject.strokeColor,pageIndex:this.pdfViewerBase.activeElements.activePageID,notes:this.commandHandler.drawingObject.notes,thickness:this.commandHandler.drawingObject.thickness,author:this.commandHandler.drawingObject.author,subject:this.commandHandler.drawingObject.subject,borderDashArray:this.commandHandler.drawingObject.borderDashArray,modifiedDate:this.commandHandler.drawingObject.modifiedDate,borderStyle:this.commandHandler.drawingObject.borderStyle,measureType:this.commandHandler.drawingObject.measureType,enableShapeLabel:this.commandHandler.enableShapeLabel,opacity:this.commandHandler.drawingObject.opacity};this.pdfViewerBase.updateFreeTextProperties(s),this.drawingObject=this.commandHandler.add(s)}},n.prototype.mouseMove=function(e){if(t.prototype.mouseMove.call(this,e),this.inAction&&!1===i.Point.equals(this.currentPosition,this.prevPosition)){this.dragging=!0;var n=this.drawingObject;this.drawingObject&&this.currentPosition&&(n.vertexPoints[n.vertexPoints.length-1].x=this.currentPosition.x/this.pdfViewerBase.getZoomFactor(),n.vertexPoints[n.vertexPoints.length-1].y=this.currentPosition.y/this.pdfViewerBase.getZoomFactor(),this.commandHandler.nodePropertyChange(n,{vertexPoints:n.vertexPoints})),"Perimeter"===n.measureType&&k(n,n.vertexPoints,this.commandHandler.annotation.measureAnnotationModule)}return!0},n.prototype.mouseUp=function(n,o,s){t.prototype.mouseMove.call(this,n);var a;if(n.source&&null!==n.annotationSelectorSettings&&(a=n.source.annotationSelectorSettings),this.drawingObject){var r=new i.Rect(this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length-1].x-20,this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length-1].y-20,40,40),l={x:this.drawingObject.vertexPoints[0].x,y:this.drawingObject.vertexPoints[0].y};if((r.containsPoint(l)||o)&&this.dragging){if(this.inAction&&(this.inAction=!1,this.drawingObject)){if(s||this.drawingObject.vertexPoints.length>2&&this.drawingObject.vertexPoints.splice(this.drawingObject.vertexPoints.length-1,1),"Polygon"===this.action){s?this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length]=this.drawingObject.vertexPoints[0]:this.drawingObject.vertexPoints[this.drawingObject.vertexPoints.length-1]=this.drawingObject.vertexPoints[0],this.commandHandler.nodePropertyChange(this.drawingObject,{vertexPoints:this.drawingObject.vertexPoints});var u=g(this.drawingObject);u.shapeAnnotationType="Polygon",u.bounds.width=u.wrapper.actualSize.width,u.bounds.height=u.wrapper.actualSize.height,u.bounds.x=this.drawingObject.wrapper.bounds.x,u.bounds.y=this.drawingObject.wrapper.bounds.y,this.commandHandler.add(u),this.commandHandler.remove(this.drawingObject),this.commandHandler.select([u.id],a);var M=this.commandHandler.selectedItems.annotations[0];M&&(this.commandHandler.enableShapeAnnotation&&(e.isNullOrUndefined(M.measureType)||""===M.measureType)&&this.commandHandler.annotation.shapeAnnotationModule.renderShapeAnnotations(M,M.pageIndex),!this.commandHandler.enableMeasureAnnotation||"Area"!==M.measureType&&"Volume"!==M.measureType||("Area"===M.measureType?(M.notes=this.commandHandler.annotation.measureAnnotationModule.calculateArea(M.vertexPoints),this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(M.annotName,M.notes)):"Volume"===M.measureType&&(M.notes=this.commandHandler.annotation.measureAnnotationModule.calculateVolume(M.vertexPoints),this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(M.annotName,M.notes)),M.enableShapeLabel&&(M.labelContent=M.notes,this.commandHandler.nodePropertyChange(M,{vertexPoints:M.vertexPoints,notes:M.notes})),this.commandHandler.annotation.measureAnnotationModule.renderMeasureShapeAnnotations(M,M.pageIndex)))}else s||o&&this.drawingObject.vertexPoints.splice(this.drawingObject.vertexPoints.length-1,1),this.commandHandler.nodePropertyChange(this.drawingObject,{vertexPoints:this.drawingObject.vertexPoints,sourceDecoraterShapes:this.commandHandler.drawingObject.sourceDecoraterShapes,taregetDecoraterShapes:this.commandHandler.drawingObject.taregetDecoraterShapes}),this.commandHandler.select([this.drawingObject.id],a),this.commandHandler.enableMeasureAnnotation&&"Perimeter"===this.drawingObject.measureType&&(this.commandHandler.renderDrawing(null,this.drawingObject.pageIndex),this.drawingObject.notes=this.commandHandler.annotation.measureAnnotationModule.calculatePerimeter(this.drawingObject),this.drawingObject.enableShapeLabel&&(this.drawingObject.labelContent=this.drawingObject.notes,this.commandHandler.nodePropertyChange(this.drawingObject,{vertexPoints:this.drawingObject.vertexPoints,notes:this.drawingObject.notes})),this.commandHandler.annotation.stickyNotesAnnotationModule.addTextToComments(this.drawingObject.annotName,this.drawingObject.notes),this.commandHandler.annotation.measureAnnotationModule.renderMeasureShapeAnnotations(this.drawingObject,this.drawingObject.pageIndex));var L=this.commandHandler.selectedItems.annotations[0];this.commandHandler.annotation.addAction(this.pageIndex,null,L,"Addition","",L,L),this.drawingObject=null}this.endAction()}else this.inAction&&!this.dragging&&this.commandHandler.remove(this.drawingObject)}},n.prototype.mouseLeave=function(t){this.mouseUp(t,!0,!0)},n.prototype.mouseWheel=function(e){t.prototype.mouseWheel.call(this,e),this.mouseMove(e)},n.prototype.endAction=function(){this.inAction=!1,this.drawingObject=null,this.commandHandler.tool=""},n}(te),ue=function(t){function e(e,i,n,o){var s=t.call(this,e,i,!0)||this;return s.endPoint=n,s.drawingObject=o,s}return $t(e,t),e.prototype.mouseDown=function(e){this.inAction=!0,this.undoElement=void 0,t.prototype.mouseDown.call(this,e);if(e.source&&e.source.annotations&&({x:this.prevPosition.x,y:this.prevPosition.y},this.drawingObject),this.initialPosition=e.position,this.prevSource=this.drawingObject,this.currentPosition=e.position,this.drawingObject){if(!this.dragging){var i={bounds:{x:this.currentPosition.x,y:this.currentPosition.y,width:5,height:5},vertexPoints:[{x:this.startPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.startPosition.y/this.pdfViewerBase.getZoomFactor()},{x:this.currentPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.currentPosition.y/this.pdfViewerBase.getZoomFactor()}],shapeAnnotationType:this.drawingObject.shapeAnnotationType,sourceDecoraterShapes:this.drawingObject.sourceDecoraterShapes,taregetDecoraterShapes:this.drawingObject.taregetDecoraterShapes,fillColor:this.drawingObject.fillColor,strokeColor:this.drawingObject.strokeColor,pageIndex:this.pdfViewerBase.activeElements.activePageID,opacity:this.drawingObject.opacity||1,borderDashArray:this.drawingObject.borderDashArray,thickness:this.drawingObject.thickness,modifiedDate:this.drawingObject.modifiedDate,author:this.drawingObject.author,subject:this.drawingObject.subject,lineHeadEnd:this.drawingObject.lineHeadEnd,lineHeadStart:this.drawingObject.lineHeadStart,measureType:this.commandHandler.drawingObject.measureType,enableShapeLabel:this.commandHandler.enableShapeLabel};this.pdfViewerBase.updateFreeTextProperties(i),this.drawingObject=this.commandHandler.add(i)}}else{var n=this.commandHandler.annotation.measureAnnotationModule,o={vertexPoints:[{x:this.startPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.startPosition.y/this.pdfViewerBase.getZoomFactor()},{x:this.currentPosition.x/this.pdfViewerBase.getZoomFactor(),y:this.currentPosition.y/this.pdfViewerBase.getZoomFactor()}],bounds:{x:this.currentPosition.x,y:this.currentPosition.y,width:5,height:5},sourceDecoraterShapes:this.commandHandler.drawingObject.sourceDecoraterShapes,taregetDecoraterShapes:this.commandHandler.drawingObject.taregetDecoraterShapes,measureType:"Distance",fillColor:this.commandHandler.drawingObject.fillColor,notes:this.commandHandler.drawingObject.notes,strokeColor:this.commandHandler.drawingObject.strokeColor,opacity:this.commandHandler.drawingObject.opacity,thickness:this.commandHandler.drawingObject.thickness,borderDashArray:this.commandHandler.drawingObject.borderDashArray,shapeAnnotationType:"Distance",pageIndex:this.pdfViewerBase.activeElements.activePageID,author:this.commandHandler.drawingObject.author,subject:this.commandHandler.drawingObject.subject,enableShapeLabel:this.commandHandler.enableShapeLabel,leaderHeight:n.leaderLength};this.pdfViewerBase.updateFreeTextProperties(o),this.drawingObject=this.commandHandler.add(o)}},e.prototype.mouseUp=function(e){if(this.dragging){if(t.prototype.mouseMove.call(this,e),this.commandHandler){var i=void 0;i=e.source&&null!==e.annotationSelectorSettings?e.source.annotationSelectorSettings:"";var n=this.drawingObject;this.commandHandler.nodePropertyChange(n,{vertexPoints:n.vertexPoints,leaderHeight:n.leaderHeight}),this.commandHandler.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.commandHandler.select([n.id],i),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,i)}this.endPoint&&this.endPoint.indexOf("ConnectorSegmentPoint")>-1&&this.dragging&&(this.commandHandler.annotation.updateCalibrateValues(this.drawingObject),this.commandHandler.annotation.addAction(this.pageIndex,null,this.drawingObject,"Addition","",this.drawingObject,this.drawingObject),this.drawingObject=null,this.dragging=!1,t.prototype.mouseUp.call(this,e)),this.drawingObject&&(this.endPoint="ConnectorSegmentPoint_1")}else this.drawingObject&&this.commandHandler.remove(this.drawingObject)},e.prototype.mouseMove=function(e){if(t.prototype.mouseMove.call(this,e),this.inAction&&!1===i.Point.equals(this.currentPosition,this.prevPosition)){if(this.currentPosition=e.position,this.dragging=!0,this.currentPosition&&this.prevPosition){var n=this.currentPosition.x-this.prevPosition.x,o=this.currentPosition.y-this.prevPosition.y;this.drawingObject;var s=void 0;s=e.source&&null!==e.annotationSelectorSettings?e.source.annotationSelectorSettings:"",(this.inAction&&this.commandHandler&&this.drawingObject&&void 0!==this.endPoint&&0!==n||0!==o)&&(this.blocked=!this.commandHandler.dragConnectorEnds(this.endPoint,this.drawingObject,this.currentPosition,this.selectedSegment,e.target,null,s),this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,s))}this.prevPosition=this.currentPosition}return!this.blocked},e.prototype.mouseLeave=function(t){this.mouseUp(t)},e.prototype.endAction=function(){t.prototype.endAction.call(this),this.prevPosition=null,this.endPoint=null},e}(te),Me=function(t){function e(e,i){return t.call(this,e,i,!0)||this}return $t(e,t),e.prototype.mouseDown=function(e){var i=g(e.source);this.undoElement={bounds:{x:i.wrapper.offsetX,y:i.wrapper.offsetY,width:i.wrapper.actualSize.width,height:i.wrapper.actualSize.height},rotateAngle:i.rotateAngle},t.prototype.mouseDown.call(this,e)},e.prototype.mouseUp=function(e){var i;i=e.source;var n;if(this.undoElement.rotateAngle!==i.wrapper.rotateAngle){i.wrapper.rotateAngle;g(e.source);var o=e.source.annotations[0].annotationSelectorSettings;this.commandHandler.renderSelector(this.pdfViewerBase.activeElements.activePageID,o),n={bounds:{x:e.source.wrapper.offsetX,y:e.source.wrapper.offsetY,width:e.source.wrapper.actualSize.width,height:e.source.wrapper.actualSize.height},rotateAngle:e.source.wrapper.rotateAngle}}this.commandHandler.annotation.addAction(this.pageIndex,null,e.source,"Rotate","",this.undoElement,n),this.commandHandler.annotation.stampAnnotationModule.updateSessionStorage(e.source,null,"Rotate"),this.commandHandler.annotation.stickyNotesAnnotationModule.updateStickyNotes(e.source,null),t.prototype.mouseUp.call(this,e)},e.prototype.mouseMove=function(e){t.prototype.mouseMove.call(this,e);var n;n=e.source;var o=e.source.annotations[0].annotationSelectorSettings;if(this.currentPosition=e.position,n.wrapper){var s={x:n.wrapper.offsetX,y:n.wrapper.offsetY},a=i.Point.findAngle(s,this.currentPosition)+90;a=(a+360)%360;n.wrapper.rotateAngle;this.blocked=!this.commandHandler.rotate(a-n.wrapper.rotateAngle,o)}return!this.blocked},e.prototype.getTooltipContent=function(t){return Math.round(t.rotateAngle%360).toString()+"°"},e.prototype.mouseLeave=function(t){this.mouseUp(t)},e.prototype.endAction=function(){t.prototype.endAction.call(this)},e}(te),Le=function(){function t(){this.activePage=void 0,this.activePageID=void 0}return Object.defineProperty(t.prototype,"activePageID",{get:function(){return this.activePage},set:function(t){this.activePage=t,this.activePage},enumerable:!0,configurable:!0}),t}(),de=function(){function t(t,e){this.inputBoxCount=0,this.isFreeTextValueChange=!1,this.isInuptBoxInFocus=!1,this.freeTextPageNumbers=[],this.selectedText="",this.isTextSelected=!1,this.selectionStart=0,this.selectionEnd=0,this.isBold=!1,this.isItalic=!1,this.isUnderline=!1,this.isStrikethrough=!1,this.isReadonly=!1,this.previousText="Type Here",this.pdfViewer=t,this.pdfViewerBase=e,this.updateTextProperties(),this.inputBoxElement=document.createElement("textarea"),this.inputBoxElement.style.position="absolute",this.inputBoxElement.style.Width=this.defautWidth,this.inputBoxElement.style.Height=this.defaultHeight,this.inputBoxElement.style.zIndex="5",this.inputBoxElement.style.fontSize=this.fontSize+"px",this.inputBoxElement.className="free-text-input",this.inputBoxElement.style.resize="none",this.inputBoxElement.style.borderColor=this.borderColor,this.inputBoxElement.style.background=this.fillColor,this.inputBoxElement.style.borderStyle=this.borderStyle,this.inputBoxElement.style.borderWidth=this.borderWidth+"px",this.inputBoxElement.style.padding="2px",this.inputBoxElement.style.borderRadius="2px",this.inputBoxElement.style.fontFamily=this.fontFamily,this.inputBoxElement.style.color=this.pdfViewer.freeTextSettings.fontColor?this.pdfViewer.freeTextSettings.fontColor:"#000",this.inputBoxElement.style.overflow="hidden",this.inputBoxElement.style.wordBreak="break-all",this.inputBoxElement.readOnly=this.isReadonly,this.inputBoxElement.addEventListener("focusout",this.onFocusOutInputBox.bind(this)),this.inputBoxElement.addEventListener("keydown",this.onKeyDownInputBox.bind(this)),this.inputBoxElement.addEventListener("mouseup",this.onMouseUpInputBox.bind(this)),this.freeTextPageNumbers=[]}return t.prototype.updateTextProperties=function(){this.defautWidth=this.pdfViewer.freeTextSettings.width?this.pdfViewer.freeTextSettings.width:151,this.defaultHeight=this.pdfViewer.freeTextSettings.height?this.pdfViewer.freeTextSettings.height:24.6,this.borderColor=this.pdfViewer.freeTextSettings.borderColor?this.pdfViewer.freeTextSettings.borderColor:"#ffffff00",this.fillColor=this.pdfViewer.freeTextSettings.fillColor?this.pdfViewer.freeTextSettings.fillColor:"#fff",this.borderStyle=this.pdfViewer.freeTextSettings.borderStyle?this.pdfViewer.freeTextSettings.borderStyle:"solid",this.borderWidth=this.pdfViewer.freeTextSettings.borderWidth?this.pdfViewer.freeTextSettings.borderWidth:1,this.fontSize=this.pdfViewer.freeTextSettings.fontSize?this.pdfViewer.freeTextSettings.fontSize:16,this.opacity=this.pdfViewer.freeTextSettings.opacity?this.pdfViewer.freeTextSettings.opacity:1,this.fontColor=this.pdfViewer.freeTextSettings.fontColor?this.pdfViewer.freeTextSettings.fontColor:"#000",this.author="Guest"!==this.pdfViewer.freeTextSettings.author?this.pdfViewer.freeTextSettings.author:this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:"Guest",this.fontFamily=this.pdfViewer.freeTextSettings.fontFamily?this.pdfViewer.freeTextSettings.fontFamily:"Helvetica",this.textAlign=this.pdfViewer.freeTextSettings.textAlignment?this.pdfViewer.freeTextSettings.textAlignment:"Left",this.defaultText=this.pdfViewer.freeTextSettings.defaultText?this.pdfViewer.freeTextSettings.defaultText:"Type here",this.isReadonly=!1,(this.pdfViewer.freeTextSettings.isLock||this.pdfViewer.annotationSettings.isLock||this.pdfViewer.freeTextSettings.isReadonly)&&(this.isReadonly=!0),1===this.pdfViewer.freeTextSettings.fontStyle?this.isBold=!0:2===this.pdfViewer.freeTextSettings.fontStyle?this.isItalic=!0:4===this.pdfViewer.freeTextSettings.fontStyle?this.isUnderline=!0:8===this.pdfViewer.freeTextSettings.fontStyle?this.isStrikethrough=!0:3===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isItalic=!0):5===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isUnderline=!0):9===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isStrikethrough=!0):7===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isItalic=!0,this.isUnderline=!0):11===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isItalic=!0,this.isStrikethrough=!0):14===this.pdfViewer.freeTextSettings.fontStyle?(this.isBold=!0,this.isUnderline=!0,this.isStrikethrough=!0):6===this.pdfViewer.freeTextSettings.fontStyle&&(this.isUnderline=!0,this.isItalic=!0)},t.prototype.renderFreeTextAnnotations=function(t,e,i){var n=!1;if(!i)for(var o=0;o=1){this.freeTextPageNumbers.push(e);for(var s=0;sr;r++){this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));var l=a.annotations[r].strokeColor;a.annotations[r].strokeColor=JSON.stringify(this.getRgbCode(l));var u=a.annotations[r].fillColor;a.annotations[r].fillColor=JSON.stringify(this.getRgbCode(u));var M=a.annotations[r].fontColor;a.annotations[r].fontColor=JSON.stringify(this.getRgbCode(M)),a.annotations[r].vertexPoints=JSON.stringify(a.annotations[r].vertexPoints),null!==a.annotations[r].rectangleDifference&&(a.annotations[r].rectangleDifference=JSON.stringify(a.annotations[r].rectangleDifference))}s=a.annotations}e[a.pageIndex]=s}return JSON.stringify(e)},t.prototype.manageAnnotations=function(t,e){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_freetext");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_freetext"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_freetext");var o=this.pdfViewer.annotationModule.getPageCollection(n,e);n[o]&&(n[o].annotations=t);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_freetext"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_freetext",s)}},t.prototype.getAnnotations=function(t,e){var i,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_freetext");if(this.pdfViewerBase.isStorageExceed&&(n=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_freetext"]),n){var o=JSON.parse(n),s=this.pdfViewer.annotationModule.getPageCollection(o,t);i=o[s]?o[s].annotations:e}else i=e;return i},t.prototype.getRgbCode=function(t){t.match(/#([a-z0-9]+)/gi)||t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(t=this.pdfViewer.annotationModule.nameToHash(t));var i=t.split(",");return e.isNullOrUndefined(i[1])&&(i=(t=this.pdfViewer.annotationModule.getValue(t,"rgba")).split(",")),{r:parseInt(i[0].split("(")[1]),g:parseInt(i[1]),b:parseInt(i[2]),a:parseInt(i[3])}},t.prototype.onFocusOutInputBox=function(){if(this.pdfViewerBase.isFreeTextContextMenu)this.inputBoxElement.focus(),this.isTextSelected||window.getSelection().removeAllRanges();else{this.pdfViewer.fireBeforeAddFreeTextAnnotation(this.inputBoxElement.value);var t=this.pdfViewerBase.currentPageNumber-1,e=this.pdfViewerBase.getElement("_pageDiv_"+t),i=parseFloat(this.inputBoxElement.style.height),n=parseFloat(this.inputBoxElement.style.width),o=parseFloat(this.inputBoxElement.style.left);if(this.pdfViewerBase.isMixedSizeDocument){var s=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+t);this.inputBoxElement.style.left=o-s.offsetLeft}var a=parseFloat(this.inputBoxElement.style.top),r=this.pdfViewerBase.getZoomFactor();this.pdfViewer.isValidFreeText&&(this.inputBoxElement.value="Type Here",this.pdfViewer.isValidFreeText=!1);var l=this.inputBoxElement.value,u=!1;if(!0===this.isNewFreeTextAnnot){var M=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),L=this.pdfViewer.annotation.createGUID();this.isNewFreeTextAnnot=!1,u=!0;var d=void 0,w=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("freeText",t+1);w&&(document.getElementById(w).id=L);var h=this.pdfViewer.freeTextSettings.annotationSelectorSettings?this.pdfViewer.freeTextSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings,p=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.freeTextSettings);this.author=this.author?this.author:this.pdfViewer.freeTextSettings.author?this.pdfViewer.freeTextSettings.author:"Guest";var c=this.pdfViewer.freeTextSettings.allowedInteractions?this.pdfViewer.freeTextSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions;d={author:this.author,modifiedDate:M,subject:"Text Box",id:"free_text"+this.inputBoxCount,rotateAngle:0,dynamicText:l,strokeColor:this.borderColor,thickness:this.borderWidth,fillColor:this.fillColor,bounds:{left:o/r,top:a/r,x:o/r,y:a/r,width:n,height:i},annotName:L,shapeAnnotationType:"FreeText",pageIndex:t,fontColor:this.fontColor,fontSize:this.fontSize,fontFamily:this.fontFamily,opacity:this.opacity,comments:[],textAlign:this.textAlign,font:{isBold:this.isBold,isItalic:this.isItalic,isStrikeout:this.isStrikethrough,isUnderline:this.isUnderline},review:{state:"Unmarked",stateModel:"None",modifiedDate:M,author:this.author},annotationSelectorSettings:h,annotationSettings:p,customData:this.pdfViewer.annotationModule.getData("FreeText"),isPrint:this.pdfViewer.freeTextSettings.isPrint,allowedInteractions:c,isReadonly:this.isReadonly},this.pdfViewer.enableRtl&&(d.textAlign="Right");var C=this.pdfViewer.add(d),j={left:d.bounds.x,top:d.bounds.y,width:d.bounds.width,height:d.bounds.height},g={opacity:d.opacity,borderColor:d.strokeColor,borderWidth:d.thickness,author:C.author,subject:C.subject,modifiedDate:C.modifiedDate,fillColor:d.fillColor,fontSize:d.fontSize,width:d.bounds.width,height:d.bounds.height,fontColor:d.fontColor,fontFamily:d.fontFamily,defaultText:d.dynamicText,fontStyle:d.font,textAlignment:d.textAlign};this.pdfViewer.annotation.storeAnnotations(t,d,"_annotations_freetext"),this.pdfViewer.fireAnnotationAdd(d.pageIndex,d.annotName,"FreeText",j,g),this.pdfViewer.annotation.addAction(t,null,d,"Addition","",d,d),this.pdfViewer.renderSelector(d.pageIndex),this.pdfViewer.clearSelection(d.pageIndex),this.pdfViewer.isDocumentEdited=!0,this.selectedAnnotation=C}if(this.isInuptBoxInFocus=!1,this.selectedAnnotation&&this.pdfViewer.selectedItems.annotations){n=(n-1)/r;var y=(i=(i-1)/r)-this.selectedAnnotation.bounds.height,A=void 0;y>0&&(A=(A=this.selectedAnnotation.wrapper.offsetY+y/2)>0?A:void 0),this.selectedAnnotation.bounds.width=n,this.selectedAnnotation.bounds.height=i,this.pdfViewer.annotation.modifyDynamicTextValue(l,this.selectedAnnotation.annotName),this.selectedAnnotation.dynamicText=l,this.modifyInCollection("dynamicText",t,this.selectedAnnotation,u),this.pdfViewer.nodePropertyChange(this.selectedAnnotation,{bounds:{width:this.selectedAnnotation.bounds.width,height:this.selectedAnnotation.bounds.height,y:A}});var S=document.getElementById(this.selectedAnnotation.annotName);S&&S.childNodes&&(S.childNodes[0].ej2_instances?S.childNodes[0].ej2_instances[0].value=l:S.childNodes[0].childNodes&&S.childNodes[0].childNodes[1].ej2_instances&&(S.childNodes[0].childNodes[1].ej2_instances[0].value=l)),this.pdfViewer.renderSelector(this.selectedAnnotation.pageIndex,this.selectedAnnotation.annotationSelectorSettings)}this.isNewFreeTextAnnot=!1,this.inputBoxElement.parentElement&&(e&&e.id===this.inputBoxElement.parentElement.id?e.removeChild(this.inputBoxElement):this.inputBoxElement.parentElement.removeChild(this.inputBoxElement));var m=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+t);this.pdfViewer.renderDrawing(m,t),this.inputBoxCount+=1,u||this.previousText===l||this.pdfViewer.annotationModule.triggerAnnotationPropChange(this.selectedAnnotation,!1,!1,!1,!1,!1,!1,!1,!0,this.previousText,l)}},t.prototype.onKeyDownInputBox=function(t){this.selectedAnnotation=this.pdfViewer.selectedItems.annotations?this.pdfViewer.selectedItems.annotations[0]:this.selectedAnnotation;var e=this;9===t.which&&t.preventDefault(),setTimeout(function(){e.defaultHeight0?s=e.selectedAnnotation.wrapper.offsetY+o/2:(o=Math.abs(o),s=e.selectedAnnotation.wrapper.offsetY-o/2),e.selectedAnnotation.bounds.width=n,e.selectedAnnotation.bounds.height=i,e.pdfViewer.nodePropertyChange(e.selectedAnnotation,{bounds:{width:e.selectedAnnotation.bounds.width,height:e.selectedAnnotation.bounds.height,y:s}}),e.pdfViewer.renderSelector(e.selectedAnnotation.pageIndex,this.selectedAnnotation.annotationSelectorSettings)}},t.prototype.onMouseUpInputBox=function(t){var e=t.target;this.selectionStart=0,this.selectionEnd=0,3===t.which&&e&&(this.selectionStart=e.selectionStart,this.selectionEnd=e.selectionEnd),3===t.which&&null!=window.getSelection()&&""!==window.getSelection().toString()?this.isTextSelected=!0:this.isTextSelected=!1},t.prototype.addInuptElemet=function(t,i,n){void 0===i&&(i=null),e.isNullOrUndefined(n)&&(n=this.pdfViewerBase.currentPageNumber-1),i&&(n=i.pageIndex),this.inputBoxElement.id=this.pdfViewer.element.id+"_freeText_"+n+"_"+this.inputBoxCount;var o=this.pdfViewerBase.getElement("_pageDiv_"+n),s=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+n),a=this.pdfViewerBase.getZoomFactor();this.inputBoxElement.value=i&&i.dynamicText?i.dynamicText:this.defaultText,this.inputBoxElement.style.boxSizing="border-box",this.inputBoxElement.style.left=t.x+"px",this.inputBoxElement.style.top=t.y+"px",i?this.applyFreetextStyles(a,i.isReadonly):this.applyFreetextStyles(a),this.isBold?this.inputBoxElement.style.fontWeight="bold":this.inputBoxElement.style.fontWeight="normal",this.isItalic?this.inputBoxElement.style.fontStyle="italic":this.inputBoxElement.style.fontStyle="normal",this.inputBoxElement.style.textDecoration="none",this.isUnderline&&(this.inputBoxElement.style.textDecoration="underline"),this.isStrikethrough&&(this.inputBoxElement.style.textDecoration="line-through"),this.pdfViewer.enableRtl?(this.inputBoxElement.style.textAlign="right",this.inputBoxElement.style.direction="rtl",this.inputBoxElement.style.left=t.x-this.defautWidth*a/2):this.inputBoxElement.style.textAlign=this.textAlign.toLowerCase(),this.inputBoxElement.style.borderColor=this.borderColor,this.inputBoxElement.style.color=this.fontColor,this.inputBoxElement.style.background=this.fillColor,i&&i.wrapper&&i.wrapper.children[0]&&(this.inputBoxElement.style.opacity=i.wrapper.children[0].style.opacity),!0===this.isNewFreeTextAnnot&&this.pdfViewer.clearSelection(n),i&&i.wrapper&&i.wrapper.bounds&&(i.wrapper.bounds.left&&(this.inputBoxElement.style.left=i.wrapper.bounds.left*a+"px"),i.wrapper.bounds.top&&(this.inputBoxElement.style.top=i.wrapper.bounds.top*a+"px"),this.inputBoxElement.style.height=i.wrapper.bounds.height?i.wrapper.bounds.height*a+1+"px":this.defaultHeight*a+"px",this.inputBoxElement.style.width=i.wrapper.bounds.width?i.wrapper.bounds.width*a+1+"px":this.defautWidth*a+"px",this.selectedAnnotation=i,this.previousText=this.selectedAnnotation.dynamicText,this.selectedAnnotation.dynamicText="",this.inputBoxElement.style.borderColor=this.selectedAnnotation.strokeColor,this.inputBoxElement.style.color=this.selectedAnnotation.fontColor,this.inputBoxElement.style.background=this.selectedAnnotation.fillColor,!0===this.selectedAnnotation.font.isBold&&(this.inputBoxElement.style.fontWeight="bold"),!0===this.selectedAnnotation.font.isItalic&&(this.inputBoxElement.style.fontStyle="italic"),!0===this.selectedAnnotation.font.isUnderline&&(this.inputBoxElement.style.textDecoration="underline"),!0===this.selectedAnnotation.font.isStrikeout&&(this.inputBoxElement.style.textDecoration="line-through"),this.pdfViewer.enableRtl?(this.inputBoxElement.style.textAlign="right",this.inputBoxElement.style.direction="rtl"):this.selectedAnnotation.textAlign&&(this.inputBoxElement.style.textAlign=this.selectedAnnotation.textAlign),this.inputBoxElement.style.fontSize=this.selectedAnnotation.fontSize*a+"px",this.inputBoxElement.style.fontFamily=this.selectedAnnotation.fontFamily,this.pdfViewer.nodePropertyChange(this.selectedAnnotation,{})),this.pdfViewerBase.isMixedSizeDocument&&(this.inputBoxElement.style.left=t.x+s.offsetLeft+"px"),this.pdfViewer.annotation.freeTextAnnotationModule.isFreeTextValueChange=!1,o.appendChild(this.inputBoxElement),this.defaultHeightthis.maxWidth*o?this.maxWidth*o:s,e.wrapper.bounds.left&&(this.inputBoxElement.style.left=(e.wrapper.bounds.left+e.wrapper.bounds.width/2-s/(2*o))*o+"px"),e.wrapper.bounds.top&&("Line"===e.shapeAnnotationType||"LineWidthArrowHead"===e.shapeAnnotationType||"Distance"===e.shapeAnnotationType||"Polygon"===e.shapeAnnotationType?this.inputBoxElement.style.top=(e.wrapper.bounds.top+e.wrapper.bounds.height/2-this.maxHeight)*o+"px":this.inputBoxElement.style.top=(e.wrapper.bounds.top+e.wrapper.bounds.height/2-this.maxHeight/2)*o+"px"),this.inputBoxElement.maxLength=e.labelMaxLength,this.inputBoxElement.fontFamily=e.fontFamily,this.inputBoxElement.style.color=e.fontColor,this.inputBoxElement.style.border="1px solid #ffffff00",this.inputBoxElement.style.padding="2px",this.inputBoxElement.style.background=e.labelFillColor}n.appendChild(this.inputBoxElement),this.isInFocus=!0,this.inputBoxElement.focus()},t.prototype.onFocusOutInputBox=function(){var t=this.pdfViewerBase.currentPageNumber-1,e=this.pdfViewerBase.getElement("_pageDiv_"+t),i=parseFloat(this.inputBoxElement.style.height),n=parseFloat(this.inputBoxElement.style.width);this.isInFocus=!1;var o=this.pdfViewer.selectedItems.annotations[0];if(o){n=(n-1)/this.pdfViewerBase.getZoomFactor(),i=(i-1)/this.pdfViewerBase.getZoomFactor(),o.labelContent=this.inputBoxElement.value,o.notes=this.inputBoxElement.value,"Rectangle"===o.shapeAnnotationType||"Ellipse"===o.shapeAnnotationType||"Line"===o.shapeAnnotationType||"LineWidthArrowHead"===o.shapeAnnotationType?this.pdfViewer.annotation.shapeAnnotationModule.modifyInCollection("labelContent",t,o):"Radius"===o.shapeAnnotationType&&o.measureType&&this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("labelContent",t,o),this.pdfViewer.nodePropertyChange(o,{}),this.pdfViewer.renderSelector(o.pageIndex,this.pdfViewer.annotationSelectorSettings);var s=document.getElementById(this.pdfViewer.selectedItems.annotations[0].annotName);s&&s.childNodes&&"label"!==this.inputBoxElement.value&&(s.childNodes[0].ej2_instances?s.childNodes[0].ej2_instances[0].value=this.inputBoxElement.value:s.childNodes[0].childNodes&&s.childNodes[0].childNodes[1].ej2_instances&&(s.childNodes[0].childNodes[1].ej2_instances[0].value=this.inputBoxElement.value))}e.removeChild(this.inputBoxElement);var a=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+t);this.pdfViewer.renderDrawing(a,t)},t.prototype.calculateLabelBounds=function(t,e){var i={};if(t){var n=0,o=0,s=0;void 0===e&&(e=this.pdfViewerBase.currentPageNumber-1);var a=this.pdfViewerBase.pageSize[e].rotation;t.width&&(s=(s=t.width/2)>0&&s<151?s:151),t.left&&(o=t.left+t.width/2-s/2),t.top&&(n=t.top+t.height/2-12.3),i=1===a||3===a?{left:o,top:n,width:s-24.6+s/2,height:49.2+s,right:0,bottom:0}:{left:o,top:n,width:s,height:24.6,right:0,bottom:0}}return i},t.prototype.calculateLabelBoundsFromLoadedDocument=function(t){var e={};if(t){var i=0,n=0,o=0;t.Width&&(o=(o=t.Width/2)>0&&o<151?o:151),t.Left&&(n=t.Left+t.Width/2-o/2),t.Top&&(i=t.Top+t.Height/2-12.3),e={left:n,top:i,width:o,height:24.6,right:0,bottom:0}}return e},t}(),he=function(){function i(t,e){this.isUndoRedoAction=!1,this.isUndoAction=!1,this.annotationSelected=!0,this.isShapeCopied=!1,this.actionCollection=[],this.redoCollection=[],this.isPopupNoteVisible=!1,this.undoCommentsElement=[],this.redoCommentsElement=[],this.selectAnnotationId=null,this.isAnnotationSelected=!1,this.annotationPageIndex=null,this.previousIndex=null,this.overlappedAnnotations=[],this.overlappedCollections=[],this.removedAnnotationCollection=[],this.pdfViewer=t,this.pdfViewerBase=e,this.pdfViewer.enableTextMarkupAnnotation&&(this.textMarkupAnnotationModule=new je(this.pdfViewer,this.pdfViewerBase)),this.pdfViewer.enableShapeAnnotation&&(this.shapeAnnotationModule=new ye(this.pdfViewer,this.pdfViewerBase)),this.pdfViewer.enableMeasureAnnotation&&(this.measureAnnotationModule=new ge(this.pdfViewer,this.pdfViewerBase)),this.stampAnnotationModule=new Ae(this.pdfViewer,this.pdfViewerBase),this.stickyNotesAnnotationModule=new Se(this.pdfViewer,this.pdfViewerBase),this.freeTextAnnotationModule=new de(this.pdfViewer,this.pdfViewerBase),this.inputElementModule=new we(this.pdfViewer,this.pdfViewerBase),this.inkAnnotationModule=new me(this.pdfViewer,this.pdfViewerBase)}return i.prototype.setAnnotationMode=function(e,i,n,o){if("None"===e)this.clearAnnotationMode();else if("Highlight"===e||"Strikethrough"===e||"Underline"===e)this.textMarkupAnnotationModule&&(this.textMarkupAnnotationModule.isSelectionMaintained=!1,this.textMarkupAnnotationModule.drawTextMarkupAnnotations(e.toString()));else if("Line"===e||"Arrow"===e||"Rectangle"===e||"Circle"===e||"Polygon"===e)this.shapeAnnotationModule&&this.shapeAnnotationModule.setAnnotationType(e);else if("Distance"===e||"Perimeter"===e||"Area"===e||"Radius"===e||"Volume"===e)this.measureAnnotationModule&&this.measureAnnotationModule.setAnnotationType(e);else if("FreeText"===e&&this.freeTextAnnotationModule)this.freeTextAnnotationModule.setAnnotationType("FreeText"),this.freeTextAnnotationModule.isNewFreeTextAnnot=!0,this.freeTextAnnotationModule.isNewAddedAnnot=!0;else if("HandWrittenSignature"===e)this.pdfViewerBase.signatureModule.setAnnotationMode();else if("Ink"===e)this.inkAnnotationModule.setAnnotationMode();else if("StickyNotes"===e){this.pdfViewerBase.isCommentIconAdded=!0,this.pdfViewerBase.isAddComment=!0;var s=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+(this.pdfViewerBase.currentPageNumber-1));s&&s.addEventListener("mousedown",this.pdfViewer.annotationModule.stickyNotesAnnotationModule.drawIcons.bind(this))}else if("Stamp"===e)if(this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!0,this.pdfViewer.annotationModule.stampAnnotationModule.isStampAnnotSelected=!0,this.pdfViewerBase.stampAdded=!0,i){a=t.DynamicStampItem[i];this.pdfViewerBase.isDynamicStamp=!0,this.stampAnnotationModule.retrieveDynamicStampAnnotation(a)}else if(n){a=t.SignStampItem[n];this.pdfViewerBase.isDynamicStamp=!1,this.stampAnnotationModule.retrievestampAnnotation(a)}else if(o){var a=t.StandardBusinessStampItem[o];this.pdfViewerBase.isDynamicStamp=!1,this.stampAnnotationModule.retrievestampAnnotation(a)}},i.prototype.deleteAnnotationById=function(t){t&&(this.annotationSelected=!1,this.selectAnnotation(t),this.deleteAnnotation())},i.prototype.clearAnnotationMode=function(){if(this.textMarkupAnnotationModule&&(this.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1),this.freeTextAnnotationModule&&(this.freeTextAnnotationModule.isNewFreeTextAnnot=!1,this.freeTextAnnotationModule.isNewAddedAnnot=!1),this.pdfViewerBase.isTextMarkupAnnotationModule()&&(this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode=""),this.pdfViewerBase.isShapeAnnotationModule()&&(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode=""),this.pdfViewerBase.isCalibrateAnnotationModule()&&(this.pdfViewer.annotation.measureAnnotationModule.currentAnnotationMode=""),this.pdfViewer.annotationModule.inkAnnotationModule){var t=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(t)}},i.prototype.deleteAnnotation=function(){this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.deleteTextMarkupAnnotation();var t=!1;if(this.pdfViewer.selectedItems.annotations.length>0){var i=this.pdfViewer.selectedItems.annotations[0];if(i.annotationSettings&&(t=i.annotationSettings.isLock)&&this.checkAllowedInteractions("Delete",i)&&(t=!1),!t){var n=i.pageIndex,o=i.shapeAnnotationType,s=void 0;"Line"===o||"LineWidthArrowHead"===o||"Polygon"===o||"Ellipse"===o||"Rectangle"===o||"Radius"===o||"Distance"===o?(e.isNullOrUndefined(i.measureType)||""===i.measureType?(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(i,"shape"),this.updateImportAnnotationCollection(i,n,"shapeAnnotation")):(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(i,"measure"),this.updateImportAnnotationCollection(i,n,"measureShapeAnnotation")),s=this.modifyInCollections(i,"delete")):"FreeText"===o?(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(i,"FreeText","delete"),s=this.modifyInCollections(i,"delete"),this.updateImportAnnotationCollection(i,n,"freeTextAnnotation")):"HandWrittenSignature"===o?s=this.modifyInCollections(i,"delete"):"Ink"===o?(this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(i,"Ink","delete"),s=this.modifyInCollections(i,"delete"),this.updateImportAnnotationCollection(i,n,"inkAnnotation")):(s=this.pdfViewer.selectedItems.annotations[0],this.pdfViewer.annotation.stickyNotesAnnotationModule.findPosition(s,s.shapeAnnotationType,"delete"),this.pdfViewer.annotation.stampAnnotationModule.updateSessionStorage(i,null,"delete")),"StickyNotes"===o&&this.updateImportAnnotationCollection(i,n,"stickyNotesAnnotation"),this.updateImportAnnotationCollection(i,n,"stampAnnotations"),this.pdfViewer.annotation.addAction(n,null,i,"Delete","",s,i);var a=void 0;""!==i.annotName?a=document.getElementById(i.annotName):s&&""!==s.annotName&&(a=document.getElementById(s.annotName)),a&&(1===a.parentElement.childElementCount?this.stickyNotesAnnotationModule.updateAccordionContainer(a):a.remove());var r=this.pdfViewer.selectedItems.annotations[0],l=r.annotName,u=this.getAnnotationType(r.shapeAnnotationType,r.measureType);if("Path"===o||"SignatureText"===o||"SignatureImage"===o){var M=document.getElementById(r.id);M&&"e-pdfviewer-signatureformfields-signature"===M.className&&(M.className="e-pdfviewer-signatureformfields",M.style.pointerEvents="",M.parentElement.style.pointerEvents="",this.pdfViewer.formFieldsModule.updateDataInSession(M,""));for(var L=this.pdfViewer.retrieveFormFields(),d=0;d4500){for(var t=window.sessionStorage.length,e=[],i=0;i=0){if("textMarkup"===e.shapeAnnotationType)if(e.rect||e.bounds){var a=((r=this.pdfViewerBase.pageSize[n].top*this.pdfViewerBase.getZoomFactor()+this.getAnnotationTop(e)*this.pdfViewerBase.getZoomFactor())-20).toString();this.pdfViewerBase.viewerContainer.scrollTop=parseInt(a)}else this.pdfViewer.navigation&&this.pdfViewer.navigation.goToPage(n+1);else if(e.bounds){var r=this.pdfViewerBase.pageSize[n].top*this.pdfViewerBase.getZoomFactor()+e.bounds.top*this.pdfViewerBase.getZoomFactor();"Ink"===e.shapeAnnotationType&&(r=this.pdfViewerBase.pageSize[n].top*this.pdfViewerBase.getZoomFactor()+e.bounds.y*this.pdfViewerBase.getZoomFactor());var l=(r-20).toString();this.pdfViewerBase.viewerContainer.scrollTop=parseInt(l)}else this.pdfViewer.navigation&&this.pdfViewer.navigation.goToPage(n+1);if(o){if(this.previousIndex&&this.pdfViewer.clearSelection(this.previousIndex),this.pdfViewer.clearSelection(n),this.previousIndex=n,"textMarkup"===e.shapeAnnotationType){this.pdfViewer.annotationModule.textMarkupAnnotationModule.clearCurrentAnnotationSelection(n,!0);var u=this.pdfViewerBase.getElement("_annotationCanvas_"+n),M=this.getTextMarkupAnnotations(n,e);M&&(this.textMarkupAnnotationModule.currentTextMarkupAnnotation=null,this.textMarkupAnnotationModule.isSelectedAnnotation=!0,this.textMarkupAnnotationModule.showHideDropletDiv(!0),this.textMarkupAnnotationModule.annotationClickPosition=null,this.textMarkupAnnotationModule.selectAnnotation(M,u,n,null,!0),this.textMarkupAnnotationModule.currentTextMarkupAnnotation=M,this.textMarkupAnnotationModule.selectTextMarkupCurrentPage=n,this.textMarkupAnnotationModule.enableAnnotationPropertiesTool(!0),this.textMarkupAnnotationModule.isSelectedAnnotation=!1,this.pdfViewer.toolbarModule&&this.pdfViewer.enableAnnotationToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem)))}else"stamp"===e.shapeAnnotationType||"stamp"===e.ShapeAnnotationType?(this.pdfViewer.select([e.uniqueKey],s),this.pdfViewer.annotation.onAnnotationMouseDown()):"sticky"===e.shapeAnnotationType||"sticky"===e.ShapeAnnotationType?(this.pdfViewer.select([e.annotationId],s),this.pdfViewer.annotation.onAnnotationMouseDown()):(this.pdfViewer.select([e.uniqueKey],s),this.pdfViewer.annotation.onAnnotationMouseDown());var L=document.getElementById(this.pdfViewer.element.id+"_commantPanel");if(L&&"block"===L.style.display){var d=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+this.pdfViewer.currentPageNumber);d&&d.ej2_instances[0].expandItem(!0);var w=document.getElementById(i);w&&(w.classList.contains("e-pv-comments-border")||w.firstChild.click())}}else this.selectAnnotationId=i,this.isAnnotationSelected=!0,this.annotationPageIndex=n}}},i.prototype.clearSelection=function(){if(this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.currentTextMarkupAnnotation)this.textMarkupAnnotationModule.clearCurrentSelectedAnnotation(),this.textMarkupAnnotationModule.clearCurrentAnnotationSelection(this.textMarkupAnnotationModule.selectTextMarkupCurrentPage);else if(this.pdfViewer.selectedItems&&this.pdfViewer.selectedItems.annotations[0]){var t=this.pdfViewer.selectedItems.annotations[0];this.pdfViewer.clearSelection(t.pageIndex)}else this.pdfViewer.clearSelection(this.pdfViewer.currentPageNumber-1)},i.prototype.getAnnotationTop=function(t){return t.rect?t.rect.Top?t.rect.Top:t.rect.top:t.bounds[0].Top?t.bounds[0].Top:t.bounds[0].top},i.prototype.selectAnnotationFromCodeBehind=function(){if(this.isAnnotationSelected&&this.selectAnnotationId){var t=this.getAnnotationsFromAnnotationCollections(this.selectAnnotationId),e=this.selectAnnotationId,i=t.pageNumber,n=this.pdfViewer.annotationSelectorSettings;if(t&&this.annotationPageIndex>=0&&this.annotationPageIndex===i){if(this.previousIndex&&this.pdfViewer.clearSelection(this.previousIndex),this.pdfViewer.clearSelection(i),this.previousIndex=i,"textMarkup"===t.shapeAnnotationType){this.pdfViewer.annotationModule.textMarkupAnnotationModule.clearCurrentAnnotationSelection(i,!0);var o=this.pdfViewerBase.getElement("_annotationCanvas_"+i),s=this.getTextMarkupAnnotations(i,t);s&&(this.textMarkupAnnotationModule.currentTextMarkupAnnotation=null,this.textMarkupAnnotationModule.isSelectedAnnotation=!0,this.textMarkupAnnotationModule.showHideDropletDiv(!0),this.textMarkupAnnotationModule.annotationClickPosition=null,this.textMarkupAnnotationModule.selectAnnotation(s,o,i),this.textMarkupAnnotationModule.currentTextMarkupAnnotation=s,this.textMarkupAnnotationModule.selectTextMarkupCurrentPage=i,this.textMarkupAnnotationModule.enableAnnotationPropertiesTool(!0),this.textMarkupAnnotationModule.isSelectedAnnotation=!1,this.pdfViewer.toolbarModule&&this.pdfViewer.enableAnnotationToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem)))}else"stamp"===t.shapeAnnotationType||"stamp"===t.ShapeAnnotationType?(this.pdfViewer.select([t.uniqueKey],n),this.pdfViewer.annotation.onAnnotationMouseDown()):"sticky"===t.shapeAnnotationType||"sticky"===t.ShapeAnnotationType?(this.pdfViewer.select([t.annotationId],n),this.pdfViewer.annotation.onAnnotationMouseDown()):t.uniqueKey?(this.pdfViewer.select([t.uniqueKey],n),this.pdfViewer.annotation.onAnnotationMouseDown()):(this.pdfViewer.select([t.annotationId],n),this.pdfViewer.annotation.onAnnotationMouseDown());var a=document.getElementById(this.pdfViewer.element.id+"_commantPanel");if(a&&"block"===a.style.display){var r=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+this.pdfViewer.currentPageNumber);r&&r.ej2_instances[0].expandItem(!0);var l=document.getElementById(e);l&&(l.classList.contains("e-pv-comments-border")||l.firstChild.click())}}this.isAnnotationSelected=!1,this.selectAnnotationId=null,this.annotationPageIndex=null}},i.prototype.findRenderPageList=function(t){var e=!1,i=this.pdfViewerBase.renderedPagesList;if(i)for(var n=0;ns.width&&(l-=a.width),r+a.height>s.height&&(r-=a.height),this.popupNote.style.top=r+"px",this.popupNote.style.left=l+"px"},i.prototype.hidePopupNote=function(){this.popupNote&&(this.popupNote.style.display="none")},i.prototype.createTextMarkupPopup=function(){var t=this,i=this.pdfViewer.element.id;this.popupElement=e.createElement("div",{id:i+"_popup_annotation_note",className:"e-pv-annotation-popup-menu",styles:"display:none"});var n=e.createElement("div",{id:i+"_popup_header",className:"e-pv-annotation-popup-header"});this.authorPopupElement=e.createElement("div",{id:i+"_popup_author",className:"e-pv-annotation-popup-author"}),n.appendChild(this.authorPopupElement);var o=e.createElement("span",{id:i+"_popup_close",className:"e-pv-annotation-popup-close e-pv-icon"});n.appendChild(o),this.popupElement.appendChild(n),this.modifiedDateElement=e.createElement("div",{id:i+"_popup_modified_time",className:"e-pv-annotation-modified-time"}),this.popupElement.appendChild(this.modifiedDateElement);var s=e.createElement("div",{id:i+"_popup_content_container",className:"e-pv-annotation-popup-note-container"});this.noteContentElement=e.createElement("div",{id:i+"_popup_content",className:"e-pv-annotation-popup-content"}),this.noteContentElement.contentEditable="true",s.appendChild(this.noteContentElement),this.popupElement.appendChild(s),this.pdfViewerBase.viewerContainer.appendChild(this.popupElement),o.addEventListener("click",this.saveClosePopupMenu.bind(this)),o.addEventListener("touchend",this.saveClosePopupMenu.bind(this)),this.popupElement.addEventListener("mousedown",this.onPopupElementMoveStart.bind(this)),this.popupElement.addEventListener("mousemove",this.onPopupElementMove.bind(this)),window.addEventListener("mouseup",this.onPopupElementMoveEnd.bind(this)),this.popupElement.addEventListener("touchstart",this.onPopupElementMoveStart.bind(this)),this.popupElement.addEventListener("touchmove",this.onPopupElementMove.bind(this)),window.addEventListener("touchend",this.onPopupElementMoveEnd.bind(this)),this.noteContentElement.addEventListener("mousedown",function(){t.noteContentElement.focus()})},i.prototype.onPopupElementMoveStart=function(t){if("touchstart"===t.type&&(t=t.changedTouches[0]),t.target.id!==this.noteContentElement.id||!t.target.contains(this.noteContentElement.childNodes[0])){this.isPopupMenuMoved=!0;var e=this.popupElement.getBoundingClientRect();this.clientX=t.clientX-e.left,this.clientY=t.clientY-e.top+this.pdfViewerBase.pageSize[this.currentAnnotPageNumber].top*this.pdfViewerBase.getZoomFactor()}},i.prototype.onPopupElementMove=function(t){if("touchmove"===t.type&&(t=t.changedTouches[0]),this.isPopupMenuMoved&&(t.target.id!==this.noteContentElement.id||!t.target.contains(this.noteContentElement.childNodes[0]))){var e=t.clientX-this.clientX+parseFloat(this.popupElement.style.left),i=t.clientY-this.clientY+parseFloat(this.popupElement.style.top);this.clientX=t.clientX,this.clientY=t.clientY;var n=this.popupElement.getBoundingClientRect(),o=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+this.currentAnnotPageNumber);e>parseFloat(o.style.left)&&e+n.widthparseFloat(o.style.top)&&i+n.heightparseFloat(i.style.left)+parseFloat(i.style.width)?this.popupElement.style.left=s-e.width+"px":this.popupElement.style.left=s+"px",o+e.height>parseFloat(i.style.top)+parseFloat(i.style.height)?this.popupElement.style.top=o-e.height+"px":this.popupElement.style.top=o+"px",this.isPopupNoteVisible=!0}},i.prototype.modifyOpacity=function(t,e){var i=this.pdfViewer.selectedItems.annotations[0],n=g(i),o=g(i),s=1;s=e?t/100:t.value/100,i.opacity!==s&&(o.opacity=s,this.pdfViewer.nodePropertyChange(i,{opacity:s}),"StickyNotes"===i.shapeAnnotationType?this.stickyNotesAnnotationModule.updateOpacityValue(i):this.modifyInCollections(i,"opacity"),"HandWrittenSignature"===i.shapeAnnotationType?this.pdfViewer.fireSignaturePropertiesChange(i.pageIndex,i.signatureName,i.shapeAnnotationType,!1,!0,!1,n.opacity,o.opacity):this.triggerAnnotationPropChange(i,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(i.pageIndex,null,i,"Shape Opacity","",n,o),this.pdfViewer.renderDrawing())},i.prototype.modifyFontColor=function(t){var e=this.pdfViewer.selectedItems.annotations[0],i=g(e),n=g(e);n.fontColor=t,this.pdfViewer.nodePropertyChange(e,{fontColor:t}),this.modifyInCollections(e,"fontColor"),this.triggerAnnotationPropChange(e,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(e.pageIndex,null,e,"fontColor","",i,n),this.pdfViewer.renderDrawing()},i.prototype.modifyFontFamily=function(t){var e=this.pdfViewer.selectedItems.annotations[0],i=g(e),n=g(e);n.fontFamily=t,this.pdfViewer.nodePropertyChange(e,{fontFamily:t}),this.modifyInCollections(e,"fontFamily"),this.triggerAnnotationPropChange(e,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(e.pageIndex,null,e,"fontFamily","",i,n),this.pdfViewer.renderDrawing()},i.prototype.modifyFontSize=function(t){var e=this.pdfViewer.selectedItems.annotations[0],i=g(e),n=g(e);n.fontSize=t;var o=this.freeTextAnnotationModule,s=e.bounds.x,a=e.bounds.y;if(e.fontSize=t,o.addInuptElemet({x:s,y:a},e),e){e.previousFontSize>t&&(o.inputBoxElement.style.height="auto",o.inputBoxElement.style.height=o.inputBoxElement.scrollHeight+5+"px");var r=parseFloat(o.inputBoxElement.style.height),l=parseFloat(o.inputBoxElement.style.width),u=this.pdfViewerBase.getZoomFactor();l=(l-1)/u;var M=(r=(r-1)/u)-e.bounds.height,L=void 0;M>0?L=(L=e.wrapper.offsetY+M/2)>0?L:void 0:(M=Math.abs(M),L=(L=e.wrapper.offsetY-M/2)>0?L:void 0),e.bounds.width=l,e.bounds.height=r,this.pdfViewer.nodePropertyChange(e,{fontSize:t,bounds:{width:e.bounds.width,height:e.bounds.height,y:L}}),this.pdfViewer.renderSelector(e.pageIndex,this.pdfViewer.annotationSelectorSettings),e.previousFontSize=t}this.modifyInCollections(e,"fontSize"),this.modifyInCollections(e,"bounds"),this.triggerAnnotationPropChange(e,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(e.pageIndex,null,e,"fontSize","",i,n),this.pdfViewer.renderDrawing()},i.prototype.modifyTextAlignment=function(t){var e=this.pdfViewer.selectedItems.annotations[0],i=g(e),n=g(e);n.textAlign=t,this.pdfViewer.nodePropertyChange(e,{textAlign:t}),this.modifyInCollections(e,"textAlign"),this.triggerAnnotationPropChange(e,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(e.pageIndex,null,e,"textAlign","",i,n),this.pdfViewer.renderDrawing()},i.prototype.modifyTextProperties=function(t,e){var i=this.pdfViewer.selectedItems.annotations[0],n=g(i),o=g(i);"bold"===e?o.font.isBold=t.isBold:"italic"===e?o.font.isItalic=t.isItalic:"underline"===e?(o.font.isUnderline=t.isUnderline,o.font.isUnderline&&o.font.isStrikeout&&(o.font.isStrikeout=!1)):"strikeout"===e&&(o.font.isStrikeout=t.isStrikeout,o.font.isUnderline&&o.font.isStrikeout&&(o.font.isUnderline=!1)),this.pdfViewer.nodePropertyChange(i,{font:t}),this.modifyInCollections(i,"textPropertiesChange"),this.triggerAnnotationPropChange(i,!1,!1,!1,!0),this.pdfViewer.annotation.addAction(i.pageIndex,null,i,"textPropertiesChange","",n,o),this.pdfViewer.renderDrawing()},i.prototype.modifyThickness=function(t){var e=this.pdfViewer.selectedItems.annotations[0],i=g(e),n=g(e);n.thickness=t,this.pdfViewer.nodePropertyChange(e,{thickness:t}),this.modifyInCollections(e,"thickness"),"HandWrittenSignature"===e.shapeAnnotationType?this.pdfViewer.fireSignaturePropertiesChange(e.pageIndex,e.signatureName,e.shapeAnnotationType,!1,!1,!0,i.thickness,n.thickness):this.triggerAnnotationPropChange(e,!1,!1,!0,!1),this.pdfViewer.annotation.addAction(e.pageIndex,null,e,"Shape Thickness","",i,n),this.pdfViewer.renderDrawing()},i.prototype.modifyStrokeColor=function(t){var e=this.pdfViewer.selectedItems.annotations[0],i=g(e),n=g(e);n.strokeColor=t,this.pdfViewer.nodePropertyChange(e,{strokeColor:t}),this.modifyInCollections(e,"stroke"),"HandWrittenSignature"===e.shapeAnnotationType?this.pdfViewer.fireSignaturePropertiesChange(e.pageIndex,e.signatureName,e.shapeAnnotationType,!0,!1,!1,i.strokeColor,n.strokeColor):this.triggerAnnotationPropChange(e,!1,!0,!1,!1),this.pdfViewer.annotation.addAction(e.pageIndex,null,e,"Shape Stroke","",i,n),this.pdfViewer.renderDrawing()},i.prototype.modifyFillColor=function(t){var e=this.pdfViewer.selectedItems.annotations[0],i=g(e),n=g(e);n.fillColor=t,this.pdfViewer.nodePropertyChange(this.pdfViewer.selectedItems.annotations[0],{fillColor:t}),this.modifyInCollections(e,"fill"),this.triggerAnnotationPropChange(e,!0,!1,!1,!1),this.pdfViewer.annotation.addAction(e.pageIndex,null,e,"Shape Fill","",i,n),this.pdfViewer.renderDrawing()},i.prototype.modifyDynamicTextValue=function(t,e){var i=null;if(i=this.pdfViewer.selectedItems.annotations.filter(function(t){return t.annotName===e})[0]){var n=g(i),o=g(i);i.dynamicText=t,o.dynamicText=t,""===n.dynamicText&&(n.dynamicText=this.freeTextAnnotationModule.previousText),this.pdfViewer.nodePropertyChange(this.pdfViewer.selectedItems.annotations[0],{dynamicText:t}),this.pdfViewer.annotation.addAction(i.pageIndex,null,i,"dynamicText Change","",n,o),this.modifyInCollections(i,"dynamicText"),this.pdfViewer.renderDrawing()}},i.prototype.modifyInCollections=function(t,i){var n;return""===t.measureType||e.isNullOrUndefined(t.measureType)?n="FreeText"===t.shapeAnnotationType?this.freeTextAnnotationModule.modifyInCollection(i,t.pageIndex,t):"HandWrittenSignature"===t.shapeAnnotationType?this.pdfViewerBase.signatureModule.modifySignatureCollection(i,t.pageIndex,t):"Stamp"===t.shapeAnnotationType?this.stampAnnotationModule.modifyInCollection(i,t.pageIndex,t):"Ink"===t.shapeAnnotationType?this.inkAnnotationModule.modifySignatureInkCollection(i,t.pageIndex,t):this.shapeAnnotationModule.modifyInCollection(i,t.pageIndex,t):"Distance"!==t.measureType&&"Perimeter"!==t.measureType&&"Radius"!==t.measureType&&"Area"!==t.measureType&&"Volume"!==t.measureType||(n=this.measureAnnotationModule.modifyInCollection(i,t.pageIndex,t)),this.isUndoRedoAction?(this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(t,null,!0),this.isUndoAction&&(t.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime())):"bounds"!==i&&this.stickyNotesAnnotationModule.updateAnnotationModifiedDate(t),n},i.prototype.createPropertiesWindow=function(){var t=this;if(e.isBlazor()){var i=document.querySelector("#"+this.pdfViewer.element.id+"_properties_line_start"),n=document.querySelector("#"+this.pdfViewer.element.id+"_properties_line_end"),s=document.querySelector("#"+this.pdfViewer.element.id+"_line_thickness"),a=document.querySelector("#"+this.pdfViewer.element.id+"_properties_style"),r=document.querySelector("#"+this.pdfViewer.element.id+"_properties_fill_color_button"),l=document.querySelector("#"+this.pdfViewer.element.id+"_properties_stroke_color_button"),u=document.querySelector("#"+this.pdfViewer.element.id+"_properties_opacity"),M=document.querySelector("#"+this.pdfViewer.element.id+"_properties_leader_length");i&&n&&(i.value=this.getArrowString(this.pdfViewer.selectedItems.annotations[0].sourceDecoraterShapes),n.value=this.getArrowString(this.pdfViewer.selectedItems.annotations[0].taregetDecoraterShapes)),s.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeWidth,r.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill,l.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor,this.onStrokeColorChange(l.value),this.onFillColorChange(r.value),u.value=100*this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.opacity,parseInt(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray)>=3?a.value="Dashed":"2"===this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray?a.value="Dotted":"0"===this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray&&(a.value="Solid"),"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(M.value=parseInt(this.pdfViewer.selectedItems.annotations[0].leaderHeight.toString())),this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenPropertiesDialog")}else{var L=this.pdfViewer.element.id,d=e.createElement("div",{id:L+"_properties_window",className:"e-pv-properties-window"}),w=this.createAppearanceTab();this.pdfViewerBase.pageContainer.appendChild(d),this.propertiesDialog=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("Line Properties"),target:this.pdfViewer.element,content:w,close:function(){t.destroyPropertiesWindow()}}),!e.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.propertiesDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.onOkClicked.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.onCancelClicked.bind(this)}]:this.propertiesDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.onCancelClicked.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.onOkClicked.bind(this)}],this.pdfViewer.enableRtl&&(this.propertiesDialog.enableRtl=!0),this.propertiesDialog.appendTo(d),this.pdfViewer.selectedItems.annotations[0]&&"Line"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(document.getElementById(this.pdfViewer.element.id+"_properties_fill_color").disabled=!0),this.startArrowDropDown.content=this.createContent(this.getArrowString(this.pdfViewer.selectedItems.annotations[0].sourceDecoraterShapes)).outerHTML,this.endArrowDropDown.content=this.createContent(this.getArrowString(this.pdfViewer.selectedItems.annotations[0].taregetDecoraterShapes)).outerHTML,this.thicknessBox.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeWidth,this.fillColorPicker.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill,this.refreshColorPicker(this.fillColorPicker),this.strokeColorPicker.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor,this.refreshColorPicker(this.strokeColorPicker),this.updateColorInIcon(this.fillDropDown.element,this.fillColorPicker.value),this.updateColorInIcon(this.strokeDropDown.element,this.strokeColorPicker.value),this.opacitySlider.value=100*this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.opacity,this.updateOpacityIndicator(),parseInt(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray)>=3?this.lineStyleDropDown.content=this.createDropDownContent("dashed").outerHTML:"2"===this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray?this.lineStyleDropDown.content=this.createDropDownContent("dotted").outerHTML:"0"===this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray&&(this.lineStyleDropDown.content=this.createDropDownContent("solid").outerHTML),this.selectedLineStyle=this.pdfViewer.selectedItems.annotations[0].borderStyle,this.selectedLineDashArray=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeDashArray,"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(this.leaderLengthBox.value=this.pdfViewer.selectedItems.annotations[0].leaderHeight)}},i.prototype.destroyPropertiesWindow=function(){this.strokeColorPicker&&(this.strokeColorPicker.destroy(),this.strokeColorPicker=null),this.fillColorPicker&&(this.fillColorPicker.destroy(),this.fillColorPicker=null),this.endArrowDropDown&&(this.endArrowDropDown.destroy(),this.endArrowDropDown=null),this.startArrowDropDown&&(this.startArrowDropDown.destroy(),this.startArrowDropDown=null),this.opacitySlider&&(this.opacitySlider.destroy(),this.opacitySlider=null),this.thicknessBox&&(this.thicknessBox.destroy(),this.thicknessBox=null),this.lineStyleDropDown&&(this.lineStyleDropDown.destroy(),this.lineStyleDropDown=null),this.leaderLengthBox&&(this.leaderLengthBox.destroy(),this.leaderLengthBox=null),this.propertiesDialog&&(this.propertiesDialog.destroy(),this.propertiesDialog=null);var t=this.pdfViewerBase.getElement("_properties_window");t&&t.parentElement.removeChild(t)},i.prototype.refreshColorPicker=function(t){t.setProperties({value:t.value},!0),t.refresh()},i.prototype.createAppearanceTab=function(){var t=this,i=this.pdfViewer.element.id,o=[{text:this.pdfViewer.localeObj.getConstant("None")},{text:this.pdfViewer.localeObj.getConstant("Open Arrow")},{text:this.pdfViewer.localeObj.getConstant("Closed Arrow")},{text:this.pdfViewer.localeObj.getConstant("Round Arrow")},{text:this.pdfViewer.localeObj.getConstant("Square Arrow")},{text:this.pdfViewer.localeObj.getConstant("Diamond Arrow")}],a=e.createElement("div",{id:i+"_properties_appearance"}),r=e.createElement("div",{className:"e-pv-properties-line-style-prop"});a.appendChild(r);var l=this.createInputElement(this.pdfViewer.localeObj.getConstant("Start Arrow"),r,"text","button",!0,"e-pv-properties-line-start",i+"_properties_line_start");this.startArrowDropDown=new s.DropDownButton({items:o,cssClass:"e-pv-properties-line-start",select:this.onStartArrowHeadStyleSelect.bind(this)},l);var u=this.createInputElement(this.pdfViewer.localeObj.getConstant("End Arrow"),r,"text","button",!0,"e-pv-properties-line-end",i+"_properties_line_end"),M=e.createElement("div",{className:"e-pv-properties-border-style"});a.appendChild(M),this.endArrowDropDown=new s.DropDownButton({items:o,cssClass:"e-pv-properties-line-end",select:this.onEndArrowHeadStyleSelect.bind(this)},u);var L=this.createInputElement(this.pdfViewer.localeObj.getConstant("Line Style"),M,"text","button",!0,"e-pv-properties-line-style",i+"_properties_line_style"),d=this.createStyleList();this.lineStyleDropDown=new s.DropDownButton({cssClass:"e-pv-properties-line-style",target:d},L);var w=this.createInputElement(this.pdfViewer.localeObj.getConstant("Line Thickness"),M,"text","input",!0,"e-pv-properties-line-thickness",i+"_properties_thickness");this.thicknessBox=new n.NumericTextBox({value:0,format:"## pt",cssClass:"e-pv-properties-line-thickness",min:0,max:12},w);var h=e.createElement("div",{className:"e-pv-properties-color-style"});a.appendChild(h);var p=this.createInputElement(this.pdfViewer.localeObj.getConstant("Fill Color"),h,"color","button",!0,"e-pv-properties-line-fill-color",i+"_properties_fill_color");this.fillColorPicker=this.createColorPicker(i+"_properties_fill_color",!0),this.fillColorPicker.change=function(e){var i=""===e.currentValue.hex?"#ffffff00":e.currentValue.hex;t.fillDropDown.toggle(),t.updateColorInIcon(t.fillDropDown.element,i)},this.fillDropDown=this.createDropDownButton(p,"e-pv-properties-fill-color-icon",this.fillColorPicker.element.parentElement),this.fillDropDown.beforeOpen=this.onFillDropDownBeforeOpen.bind(this),this.fillDropDown.open=function(){t.fillColorPicker.refresh()};var c=this.createInputElement(this.pdfViewer.localeObj.getConstant("Line Color"),h,"color","button",!0,"e-pv-properties-line-stroke-color",i+"_properties_stroke_color");this.strokeColorPicker=this.createColorPicker(i+"_properties_stroke_color",!1),this.strokeColorPicker.change=function(e){var i=""===e.currentValue.hex?"#ffffff00":e.currentValue.hex;t.strokeDropDown.toggle(),t.updateColorInIcon(t.strokeDropDown.element,i)},this.strokeDropDown=this.createDropDownButton(c,"e-pv-properties-stroke-color-icon",this.strokeColorPicker.element.parentElement),this.strokeDropDown.beforeOpen=this.onStrokeDropDownBeforeOpen.bind(this),this.strokeDropDown.open=function(){t.strokeColorPicker.refresh()};var C=e.createElement("div",{className:"e-pv-properties-opacity-style"});a.appendChild(C);var j=this.createInputElement(this.pdfViewer.localeObj.getConstant("Opacity"),C,"","div",!0,"e-pv-properties-line-opacity",i+"_properties_opacity");if(this.opacitySlider=new n.Slider({type:"MinRange",max:100,min:0,cssClass:"e-pv-properties-line-opacity",change:function(){t.updateOpacityIndicator()}},j),"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType){var g=this.createInputElement(this.pdfViewer.localeObj.getConstant("Leader Length"),C,"text","input",!0,"e-pv-properties-line-leader-length",i+"_properties_leader_length");this.leaderLengthBox=new n.NumericTextBox({value:0,format:"## pt",cssClass:"e-pv-properties-line-leader-length",min:0,max:100},g)}return a},i.prototype.createContent=function(t){var i=e.createElement("div",{className:"e-pv-properties-line-style-content"});return i.textContent=t,i},i.prototype.onStrokeDropDownBeforeOpen=function(){1===this.pdfViewer.selectedItems.annotations.length&&(this.strokeColorPicker.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor),this.strokeColorPicker.refresh()},i.prototype.onFillDropDownBeforeOpen=function(){1===this.pdfViewer.selectedItems.annotations.length&&(this.fillColorPicker.value=this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor),this.fillColorPicker.refresh()},i.prototype.createStyleList=function(){var t=this,i=e.createElement("ul");document.body.appendChild(i);var n=this.createListForStyle("solid");n.addEventListener("click",function(){t.setThickness("0","solid")}),i.appendChild(n);var o=this.createListForStyle("dotted");o.addEventListener("click",function(){t.setThickness("2","dotted")}),i.appendChild(o);var s=this.createListForStyle("dashed");return s.addEventListener("click",function(){t.setThickness("3","dashed")}),i.appendChild(s),i},i.prototype.createColorPicker=function(t,i){var o=e.createElement("input",{id:t+"_target"});document.body.appendChild(o);var s=new n.ColorPicker({inline:!0,mode:"Palette",enableOpacity:!1,value:"#000000",showButtons:!1,modeSwitcher:!1,noColor:i});return this.pdfViewer.enableRtl&&(s.enableRtl=!0),s.appendTo(o),s},i.prototype.createDropDownButton=function(t,e,i){var n=new s.DropDownButton({iconCss:e+" e-pv-icon",target:i});return this.pdfViewer.enableRtl&&(n.enableRtl=!0),n.appendTo(t),n},i.prototype.updateColorInIcon=function(t,e){t.childNodes[0].style.borderBottomColor=e},i.prototype.onFillColorChange=function(t){var e=document.querySelector("#"+this.pdfViewer.element.id+"_properties_fill_color_button");"transparent"!==t&&(e.children[0].style.borderBottomColor=t)},i.prototype.onStrokeColorChange=function(t){var e=document.querySelector("#"+this.pdfViewer.element.id+"_properties_stroke_color_button");"transparent"!==t&&(e.children[0].style.borderBottomColor=t)},i.prototype.setThickness=function(t,e,i){i||(this.lineStyleDropDown.content=this.createDropDownContent(e).outerHTML),this.selectedLineDashArray=t,"0"===t?this.selectedLineStyle="Solid":"2"!==t&&"3"!==t||(this.selectedLineStyle="Dashed")},i.prototype.createDropDownContent=function(t){var i=e.createElement("div",{className:"e-pv-line-styles-content-container"}),n=e.createElement("span",{className:"e-pv-line-styles-content",styles:"border-bottom-style:"+t});return i.appendChild(n),i},i.prototype.createListForStyle=function(t){var i=e.createElement("li",{className:"e-menu-item"}),n=e.createElement("div",{className:"e-pv-line-styles-container"}),o=e.createElement("span",{className:"e-pv-line-styles-item",styles:"border-bottom-style:"+t});return n.appendChild(o),i.appendChild(n),i},i.prototype.onStartArrowHeadStyleSelect=function(t){this.startArrowDropDown.content=this.createContent(t.item.text).outerHTML},i.prototype.onEndArrowHeadStyleSelect=function(t){this.endArrowDropDown.content=this.createContent(t.item.text).outerHTML},i.prototype.createInputElement=function(t,i,n,o,s,a,r){var l=e.createElement("div",{id:r+"_container",className:a+"-container"});if(s){var u=e.createElement("div",{id:r+"_label",className:a+"-label"});u.textContent=t,l.appendChild(u)}this.pdfViewer.localeObj.getConstant("Opacity")===t&&(this.opacityIndicator=e.createElement("span",{className:"e-pv-properties-opacity-indicator"}),l.appendChild(this.opacityIndicator));var M=e.createElement(o,{id:r});return"input"===o&&(M.type=n),l.appendChild(M),i.appendChild(l),M},i.prototype.updateOpacityIndicator=function(){this.opacityIndicator.textContent=this.opacitySlider.value+"%"},i.prototype.onOkClicked=function(){var t,i,n,o,s,a;if(e.isBlazor()){var r=document.querySelector("#"+this.pdfViewer.element.id+"_properties_line_start"),l=document.querySelector("#"+this.pdfViewer.element.id+"_properties_line_end"),u=document.querySelector("#"+this.pdfViewer.element.id+"_line_thickness"),M=document.querySelector("#"+this.pdfViewer.element.id+"_properties_style"),L=document.querySelector("#"+this.pdfViewer.element.id+"_properties_fill_color_button"),d=document.querySelector("#"+this.pdfViewer.element.id+"_properties_stroke_color_button"),w=document.querySelector("#"+this.pdfViewer.element.id+"_properties_opacity");t=this.getArrowTypeFromDropDown(r.value,!0),i=this.getArrowTypeFromDropDown(l.value,!0),n=parseInt(u.value),o=""===(o=this.getValue(d.children[0].style.borderBottomColor,"hex"))?"#ffffff00":o,s=""===(s=this.getValue(L.children[0].style.borderBottomColor,"hex"))?"#ffffff00":s,a=w.value/100,M.value&&("Solid"===M.value?this.setThickness("0","solid",!0):"Dotted"===M.value?this.setThickness("2","dotted",!0):"Dashed"===M.value&&this.setThickness("3","dashed",!0))}else t=this.getArrowTypeFromDropDown(this.startArrowDropDown.content),i=this.getArrowTypeFromDropDown(this.endArrowDropDown.content),n=this.thicknessBox.value,o=""===(o=this.strokeColorPicker.getValue(this.strokeColorPicker.value,"hex"))?"#ffffff00":o,s=""===(s=this.fillColorPicker.getValue(this.fillColorPicker.value,"hex"))||"#transp"===s||"#ffffff00"===this.fillColorPicker.value?"#ffffff00":s,a=this.opacitySlider.value/100;var h=this.pdfViewer.selectedItems.annotations[0],p=g(h),c=g(h),C={},j=!1,y=!1,A=!1,S=!1,m=!1,f=!1,T=!1;if(t!==h.sourceDecoraterShapes&&(C.sourceDecoraterShapes=t,c.lineHeadStart=this.getArrowString(t),m=!0),i!==h.taregetDecoraterShapes&&(C.taregetDecoraterShapes=i,c.lineHeadEnd=this.getArrowString(i),f=!0),n!==h.wrapper.children[0].style.strokeWidth&&(C.thickness=n,c.thickness=n,A=!0),o!==h.wrapper.children[0].style.strokeColor&&(C.strokeColor=o,c.strokeColor=o,y=!0),s!==h.wrapper.children[0].style.fill&&(C.fillColor=s,c.fillColor=s,j=!0),a!==h.wrapper.children[0].style.opacity&&(C.opacity=a,c.opacity=a,S=!0),this.selectedLineDashArray!==h.wrapper.children[0].style.strokeDashArray&&(C.borderDashArray=this.selectedLineDashArray,C.borderStyle=this.selectedLineStyle,c.borderDashArray=C.borderDashArray,c.borderStyle=C.borderStyle,T=!0),e.isBlazor()){var N=document.querySelector("#"+this.pdfViewer.element.id+"_properties_leader_length");"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&parseInt(N.value)!==this.pdfViewer.selectedItems.annotations[0].leaderHeight&&(C.leaderHeight=parseInt(N.value))}else"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&this.leaderLengthBox.value!==this.pdfViewer.selectedItems.annotations[0].leaderHeight&&(C.leaderHeight=this.leaderLengthBox.value);this.pdfViewer.nodePropertyChange(this.pdfViewer.selectedItems.annotations[0],C),this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill=s,this.triggerAnnotationPropChange(this.pdfViewer.selectedItems.annotations[0],j,y,A,S,m,f,T),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"thickness"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"stroke"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"fill"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"opacity"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"dashArray"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"startArrow"),this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"endArrow"),"Distance"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&this.modifyInCollections(this.pdfViewer.selectedItems.annotations[0],"leaderLength"),this.pdfViewer.annotation.addAction(h.pageIndex,null,h,"Line properties change","",p,c),this.renderAnnotations(h.pageIndex,null,null,null),e.isBlazor()||this.propertiesDialog.hide()},i.prototype.onCancelClicked=function(){this.propertiesDialog.hide()},i.prototype.getArrowTypeFromDropDown=function(t,e){e||(t=t.split("")[0].split('">')[1]);var i="None";switch(t){case this.pdfViewer.localeObj.getConstant("None"):i="None";break;case this.pdfViewer.localeObj.getConstant("Open Arrow"):i="OpenArrow";break;case this.pdfViewer.localeObj.getConstant("Closed Arrow"):i="Arrow";break;case this.pdfViewer.localeObj.getConstant("Round Arrow"):i="Circle";break;case this.pdfViewer.localeObj.getConstant("Square Arrow"):i="Square";break;case this.pdfViewer.localeObj.getConstant("Diamond Arrow"):i="Diamond";break;case this.pdfViewer.localeObj.getConstant("Butt"):i="Butt"}return i},i.prototype.getArrowString=function(t){var e=this.pdfViewer.localeObj.getConstant("None");switch(t){case"Arrow":e=this.pdfViewer.localeObj.getConstant("Closed");break;case"OpenArrow":e=this.pdfViewer.localeObj.getConstant("Open Arrow");break;case"Circle":e=this.pdfViewer.localeObj.getConstant("Round");break;case"None":case"Square":case"Diamond":e=this.pdfViewer.localeObj.getConstant(t);break;case"Butt":e=this.pdfViewer.localeObj.getConstant("Butt")}return e},i.prototype.onAnnotationMouseUp=function(){if(0!==this.pdfViewer.selectedItems.annotations.length)this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&(this.enableBasedOnType(),this.pdfViewer.toolbar.annotationToolbarModule.selectAnnotationDeleteItem(!0),this.pdfViewer.toolbar.annotationToolbarModule.updateAnnnotationPropertyItems()),this.pdfViewerBase.disableTextSelectionMode();else if(this.pdfViewer.textSelectionModule&&!this.pdfViewerBase.isPanMode&&this.pdfViewer.textSelectionModule.enableTextSelectionMode(),this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&(!e.Browser.isDevice||this.pdfViewer.enableDesktopMode)){var t=this.pdfViewer.toolbar.annotationToolbarModule.inkAnnotationSelected;!this.pdfViewer.annotation.freeTextAnnotationModule||this.pdfViewer.annotation.freeTextAnnotationModule.isInuptBoxInFocus||t||(this.pdfViewer.toolbar.annotationToolbarModule.enableAnnotationPropertiesTools(!1),this.pdfViewer.toolbar.annotationToolbarModule.enableFreeTextAnnotationPropertiesTools(!1)),this.pdfViewer.toolbar.annotationToolbarModule.updateAnnnotationPropertyItems(),this.pdfViewer.toolbar.annotationToolbarModule.selectAnnotationDeleteItem(!1)}},i.prototype.onShapesMouseup=function(t,i){if(t=e.isNullOrUndefined(t)?this.pdfViewer.selectedItems.annotations[0]:t){if(this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.currentTextMarkupAnnotation&&(this.textMarkupAnnotationModule.currentTextMarkupAnnotation=null,this.textMarkupAnnotationModule.selectTextMarkupCurrentPage=null),(this.pdfViewerBase.tool instanceof re||this.pdfViewerBase.tool instanceof ue)&&!this.pdfViewerBase.tool.dragging){var n={opacity:t.opacity,fillColor:t.fillColor,strokeColor:t.strokeColor,thickness:t.thickness,author:t.author,subject:t.subject,modifiedDate:t.modifiedDate};this.getAnnotationIndex(t.pageIndex,t.id),t.bounds.x,t.bounds.y,t.bounds.width,t.bounds.height;this.pdfViewerBase.tool instanceof ue&&(n.lineHeadStartStyle=this.getArrowString(t.sourceDecoraterShapes),n.lineHeadEndStyle=this.getArrowString(t.taregetDecoraterShapes),n.borderDashArray=t.borderDashArray),this.pdfViewerBase.isAnnotationAdded||(""===t.measureType||e.isNullOrUndefined(t.measureType)?this.shapeAnnotationModule.renderShapeAnnotations(t,this.pdfViewer.annotation.getEventPageNumber(i)):"Distance"!==t.measureType&&"Perimeter"!==t.measureType&&"Radius"!==t.measureType||this.measureAnnotationModule.renderMeasureShapeAnnotations(t,this.pdfViewer.annotation.getEventPageNumber(i))),this.pdfViewer.isDocumentEdited=!0}else this.pdfViewerBase.tool instanceof ie||this.pdfViewerBase.tool instanceof ae?(this.pdfViewer.isDocumentEdited=!0,""===t.measureType||e.isNullOrUndefined(t.measureType)?"FreeText"===t.shapeAnnotationType?this.pdfViewer.annotation.freeTextAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),t):"HandWrittenSignature"===t.shapeAnnotationType?this.pdfViewerBase.signatureModule.modifySignatureCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),t):"Ink"===t.shapeAnnotationType?this.inkAnnotationModule.modifySignatureInkCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),t):"Stamp"===t.shapeAnnotationType||"Image"===t.shapeAnnotationType?this.stampAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),t):this.pdfViewer.annotation.shapeAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),t):"Distance"!==t.measureType&&"Perimeter"!==t.measureType&&"Radius"!==t.measureType&&"Area"!==t.measureType&&"Volume"!==t.measureType||this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),t),this.pdfViewerBase.tool instanceof ae&&this.triggerAnnotationResize(t),this.pdfViewerBase.tool instanceof ie&&"Select"!==this.pdfViewerBase.action&&this.triggerAnnotationMove(t)):this.pdfViewerBase.tool instanceof se&&(this.pdfViewer.isDocumentEdited=!0,""===t.measureType||e.isNullOrUndefined(t.measureType)?"Line"!==t.shapeAnnotationType&&"LineWidthArrowHead"!==t.shapeAnnotationType&&"Polygon"!==t.shapeAnnotationType||this.pdfViewer.annotation.shapeAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),t):"Distance"!==t.measureType&&"Perimeter"!==t.measureType&&"Area"!==t.measureType&&"Volume"!==t.measureType||("Distance"===t.measureType&&this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("leaderLength",this.pdfViewer.annotation.getEventPageNumber(i),t),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("bounds",this.pdfViewer.annotation.getEventPageNumber(i),t)),this.triggerAnnotationResize(t));this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.annotationMenuObj&&this.pdfViewer.isSignatureEditable&&"HandWrittenSignature"===t.shapeAnnotationType&&(this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export Annotations")],!0),this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export XFDF")],!0)),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.enableAnnotationToolbar&&(this.pdfViewer.toolbarModule.annotationToolbarModule.clearTextMarkupMode(),""===t.measureType||e.isNullOrUndefined(t.measureType)?this.pdfViewer.toolbarModule.annotationToolbarModule.clearMeasureMode():"Distance"!==t.measureType&&"Perimeter"!==t.measureType&&"Area"!==t.measureType&&"Volume"!==t.measureType&&"Radius"!==t.measureType||this.pdfViewer.toolbarModule.annotationToolbarModule.clearShapeMode(),this.pdfViewer.toolbarModule.annotationToolbarModule.enableAnnotationPropertiesTools(!0),e.isBlazor()||(this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(!0),this.pdfViewer.toolbarModule.annotationToolbarModule.setCurrentColorInPicker(),this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem)))}},i.prototype.updateCalibrateValues=function(t,e){"Distance"===t.measureType?(t.notes=b(t,t.vertexPoints,this.measureAnnotationModule),!0===t.enableShapeLabel&&(t.labelContent=t.notes),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",t.pageIndex,t,e),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(t.annotName,t.notes),this.renderAnnotations(t.pageIndex,null,null,null,null)):"Radius"===t.measureType?(t.notes=z(t,this.measureAnnotationModule),!0===t.enableShapeLabel&&(t.labelContent=t.notes),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",t.pageIndex,t,e),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(t.annotName,t.notes),this.renderAnnotations(t.pageIndex,null,null,null,null)):"Perimeter"===t.measureType?(t.notes=k(t,t.vertexPoints,this.measureAnnotationModule),!0===t.enableShapeLabel&&(t.labelContent=t.notes),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",t.pageIndex,t,e),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(t.annotName,t.notes),this.renderAnnotations(t.pageIndex,null,null,null,null)):"Area"===t.measureType?(t.notes=this.measureAnnotationModule.calculateArea(t.vertexPoints,t.id,t.pageIndex),!0===t.enableShapeLabel&&(t.labelContent=t.notes,P(t)),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",t.pageIndex,t,e),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(t.annotName,t.notes),this.renderAnnotations(t.pageIndex,null,null,null,null)):"Volume"===t.measureType&&(t.notes=this.measureAnnotationModule.calculateVolume(t.vertexPoints,t.id,t.pageIndex),!0===t.enableShapeLabel&&(t.labelContent=t.notes,P(t)),this.pdfViewer.annotation.measureAnnotationModule.modifyInCollection("notes",t.pageIndex,t,e),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(t.annotName,t.notes),this.renderAnnotations(t.pageIndex,null,null,null,null))},i.prototype.onAnnotationMouseDown=function(){1===this.pdfViewer.selectedItems.annotations.length&&this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&(this.enableBasedOnType(),this.pdfViewer.toolbar.annotationToolbarModule.selectAnnotationDeleteItem(!0))},i.prototype.enableBasedOnType=function(){var t=!1,i=this.pdfViewer.selectedItems.annotations[0];i&&i.annotationSettings&&(t=i.annotationSettings.isLock)&&this.checkAllowedInteractions("PropertyChange",i)&&(t=!1),!e.Browser.isDevice||this.pdfViewer.enableDesktopMode?t||("Stamp"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"Image"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableStampAnnotationPropertiesTools(!0):"StickyNotes"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableStampAnnotationPropertiesTools(!0):"Path"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"SignatureImage"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||"SignatureText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableAnnotationPropertiesTools(!1):"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableFreeTextAnnotationPropertiesTools(!0):"HandWrittenSignature"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableSignaturePropertiesTools(!0):"Ink"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.pdfViewer.toolbar.annotationToolbarModule.enableSignaturePropertiesTools(!0):this.pdfViewer.toolbar.annotationToolbarModule.enableAnnotationPropertiesTools(!0)):"Path"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.toolbarModule.annotationToolbarModule.createMobileAnnotationToolbar(!0,!0)},i.prototype.getProperDate=function(t){var e=new Date(t.toString());if(isNaN(e.getFullYear())){var i=t.slice(2,16);i=i.slice(0,4)+"/"+i.slice(4,6)+"/"+i.slice(6,8)+" "+i.slice(8,10)+":"+i.slice(10,12)+":"+i.slice(12,14),e=new Date(i)}return e.getMonth()+1+"/"+e.getDate()+"/"+e.getFullYear()+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds()},i.prototype.getPageCollection=function(t,e){for(var i=null,n=0;n0)for(var s=0;s4500&&(this.clearAnnotationStorage(),this.pdfViewerBase.isStorageExceed=!0);var n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+i);this.pdfViewerBase.isStorageExceed&&(n=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+i]);var o=0;if(n){this.storeAnnotationCollections(e,t);var s=JSON.parse(n);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+i);var a=this.pdfViewer.annotationModule.getPageCollection(s,t);if(s[a])s[a].annotations.push(e),o=s[a].annotations.indexOf(e);else{var r={pageIndex:t,annotations:[]};r.annotations.push(e),o=r.annotations.indexOf(e),s.push(r)}M=JSON.stringify(s);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+i]=M:window.sessionStorage.setItem(this.pdfViewerBase.documentId+i,M)}else{this.storeAnnotationCollections(e,t);var l={pageIndex:t,annotations:[]};l.annotations.push(e),o=l.annotations.indexOf(e);var u=[];u.push(l);var M=JSON.stringify(u);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+i]=M:window.sessionStorage.setItem(this.pdfViewerBase.documentId+i,M)}return o},i.prototype.getArrowType=function(t){var e="None";switch(t){case"ClosedArrow":case"Closed":e="Arrow";break;case"OpenArrow":case"Open":e="OpenArrow";break;case"Square":e="Square";break;case"Circle":case"Round":e="Circle";break;case"Diamond":e="Diamond";break;case"Butt":e="Butt"}return e},i.prototype.getArrowTypeForCollection=function(t){var e;switch(t){case"Arrow":e="ClosedArrow";break;case"OpenArrow":case"Square":case"Circle":case"Diamond":case"None":e=t.toString();break;case"Butt":e="Butt"}return e},i.prototype.getBounds=function(t,e){var i=this.pdfViewerBase.pageSize[e];return i?1===i.rotation?{left:t.top,top:i.width-(t.left+t.width),width:t.height,height:t.width}:2===i.rotation?{left:i.width-t.left-t.width,top:i.height-t.top-t.height,width:t.width,height:t.height}:3===i.rotation?{left:i.height-t.top-t.height,top:t.left,width:t.height,height:t.width}:t:t},i.prototype.getVertexPoints=function(t,e){if(t){var i=this.pdfViewerBase.pageSize[e];if(1===i.rotation){for(var n=[],o=0;o=h.x&&w.top<=h.y&&w.top+w.height>=h.y&&(L=!0):L=!0}L||l.splice(M,1)}if(l&&l.length>0){n=l;for(M=0;M2||Math.abs(i.X-n.X)>2)){var o={x:n.X+n.Width/2,y:n.Y+n.Height/2,width:n.Width,height:n.Height};this.pdfViewer.nodePropertyChange(t,{bounds:o}),this.pdfViewer.clearSelection(this.pdfViewerBase.activeElements.activePageID),this.triggerAnnotationPropChange(t,!1,!1,!1,!1)}},i.prototype.updateFreeTextProperties=function(t){t.labelSettings&&(t.labelSettings.fillColor&&(t.labelFillColor=t.labelSettings.fillColor),t.labelSettings.fontColor&&(t.fontColor=t.labelSettings.fontColor),t.labelSettings.fontSize&&(t.fontSize=t.labelSettings.fontSize),t.labelSettings.fontFamily&&(t.fontFamily=t.labelSettings.fontFamily),t.labelSettings.opacity&&(t.labelOpacity=t.labelSettings.opacity),t.labelSettings.labelContent&&(t.labelContent=t.labelSettings.labelContent))},i.prototype.updateAnnotationComments=function(t,e){var i=document.getElementById(t);i&&i.childNodes&&(i.childNodes[0].ej2_instances?i.childNodes[0].ej2_instances[0].value=e:i.childNodes[0].childNodes&&i.childNodes[0].childNodes[1].ej2_instances&&(i.childNodes[0].childNodes[1].ej2_instances[0].value=e))},i.prototype.addFreeTextProperties=function(t,e){this.pdfViewer.enableShapeLabel&&t&&e&&(e.labelSettings={fontColor:t.fontColor,fontSize:t.fontSize,fontFamily:t.fontFamily,opacity:t.labelOpacity,labelContent:t.labelContent,fillColor:t.labelFillColor})},i.prototype.updateMeasurementSettings=function(){if(this.pdfViewer.enableAnnotation&&this.pdfViewer.enableMeasureAnnotation){var t="1 "+this.pdfViewer.measurementSettings.conversionUnit+" = "+this.pdfViewer.measurementSettings.scaleRatio+" "+this.pdfViewer.measurementSettings.displayUnit;this.measureAnnotationModule.updateMeasureValues(t,this.pdfViewer.measurementSettings.displayUnit,this.pdfViewer.measurementSettings.conversionUnit,this.pdfViewer.measurementSettings.depth)}},i.prototype.updateCollection=function(t,e,i,n){var o,s=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_"+n);if(this.pdfViewerBase.isStorageExceed&&(s=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_"+n]),s){var a=JSON.parse(s),r=this.getPageCollection(a,e);if(a[r]&&null!==(o=a[r].annotations)){for(var l=0;l0)for(f=0;f0)for(f=0;f0)for(f=0;f0)for(f=0;f0)for(f=0;f0)for(f=0;f0)for(var f=0;f=parseInt(L.left)||o<=parseInt(L.left+L.width)&&r>=parseInt(L.left+L.width))&&(w=!0),w&&(w=s<=parseInt(L.top)&&a>=parseInt(L.top)||s<=parseInt(L.top+L.height)&&a>=parseInt(L.top+L.height)),w?this.checkOverlappedCollections(i[l],this.overlappedAnnotations):((parseInt(L.left)<=o&&parseInt(L.left+L.width)>=o||r>=parseInt(L.left)&&r<=parseInt(L.left+L.width))&&(w=!0),w&&(w=parseInt(L.top)<=s&&parseInt(L.top+L.height)>=s||a>=parseInt(L.top)&&a<=parseInt(L.top+L.height)),w?this.checkOverlappedCollections(i[l],this.overlappedAnnotations):((o<=parseInt(L.left)&&r>=parseInt(L.left)||o<=parseInt(L.left+L.width)&&r>=parseInt(L.left+L.width))&&(w=!0),w&&(w=parseInt(L.top)<=s&&parseInt(L.top+L.height)>=s||a>=parseInt(L.top)&&a<=parseInt(L.top+L.height)),w?this.checkOverlappedCollections(i[l],this.overlappedAnnotations):((parseInt(L.left)<=o&&parseInt(L.left+L.width)>=o||r>=parseInt(L.left)&&r<=parseInt(L.left+L.width))&&(w=!0),w&&(w=s<=parseInt(L.top)&&a>=parseInt(L.top)||s<=parseInt(L.top+L.height)&&a>=parseInt(L.top+L.height)),w&&this.checkOverlappedCollections(i[l],this.overlappedAnnotations))))}}}},i.prototype.findAnnotationMode=function(t,e,i){var n=this.pdfViewer.viewerBase.importedAnnotation[e];if(n){var o=void 0;if("shape"===i?o=n.shapeAnnotation:"shape_measure"===i?o=n.measureShapeAnnotation:"freeText"===i?o=n.freeTextAnnotation:"stamp"===i?o=n.stampAnnotations:"sticky"===i?o=n.stickyNotesAnnotation:"textMarkup"===i&&(o=n.textMarkupAnnotation),o)for(var s=0;s0){for(var i=!1,n=0;n0)for(var e=0;e=12?12===i?i+":"+t.split(" ")[1].split(":")[1]+":"+t.split(" ")[1].split(":")[2]+" PM":i-12+":"+t.split(" ")[1].split(":")[1]+":"+t.split(" ")[1].split(":")[2]+" PM":i+":"+t.split(" ")[1].split(":")[1]+":"+t.split(" ")[1].split(":")[2]+" AM";var n=t.split(" ")[0];return t.split(",").length>1?n+" "+e:n+", "+e},i.prototype.clear=function(){this.shapeAnnotationModule&&(this.shapeAnnotationModule.shapeCount=0),this.measureAnnotationModule&&(this.measureAnnotationModule.measureShapeCount=0),this.textMarkupAnnotationModule&&this.textMarkupAnnotationModule.clear(),this.stickyNotesAnnotationModule&&this.stickyNotesAnnotationModule.clear(),this.pdfViewer.refresh(),this.undoCommentsElement=[],this.redoCommentsElement=[],this.overlappedAnnotations=[],this.previousIndex=null,this.pdfViewer.annotation&&this.pdfViewer.annotation.stampAnnotationModule&&(this.pdfViewer.annotation.stampAnnotationModule.stampPageNumber=[]),this.pdfViewer.annotation&&this.pdfViewer.annotation.freeTextAnnotationModule&&(this.pdfViewer.annotation.freeTextAnnotationModule.freeTextPageNumbers=[],this.freeTextAnnotationModule.previousText="Type Here"),this.pdfViewer.annotation&&this.pdfViewer.annotation.inkAnnotationModule&&(this.pdfViewer.annotation.inkAnnotationModule.inkAnnotationindex=[]),window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_shape"),window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_shape_measure"),window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_stamp"),window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_sticky")},i.prototype.retrieveAnnotationCollection=function(){return this.pdfViewer.annotationCollection},i.prototype.checkAllowedInteractions=function(t,e){var i=this.updateAnnotationAllowedInteractions(e);if(i&&i.length>0)for(var n=0;n>16&255),n.push(i>>8&255),n.push(255&i),n.push(e),n},i.prototype.rgbToHsv=function(t,i,n,o){t/=255,i/=255,n/=255;var s,a,r=Math.max(t,i,n),l=Math.min(t,i,n),u=r,M=r-l;if(a=0===r?0:M/r,r===l)s=0;else{switch(r){case t:s=(i-n)/M+(i0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0&&n.length>0&&this.renderWebLink(i,n,e),o&&o.length>0&&s.length>0&&this.renderDocumentLink(o,s,a,e)}},t.prototype.renderWebLink=function(t,i,n){for(var o=this,s=this,a=!1,r=this,l=0;l0){var M=a.pdfViewerBase.pageSize[o].height,L=void 0,d=void 0;0!==n.length?(L=n[r],d=a.pdfViewerBase.pageSize[i[r]].top*a.pdfViewerBase.getZoomFactor()+(M-L)*a.pdfViewerBase.getZoomFactor()):d=a.pdfViewerBase.pageSize[i[r]].top*a.pdfViewerBase.getZoomFactor(),void 0!==d&&(l.name=d.toString(),l.onclick=function(){return!(s.pdfViewerBase.tool instanceof ue||s.pdfViewerBase.tool instanceof le)&&(s.pdfViewerBase.viewerContainer.scrollTop=parseInt(l.name),!1)}),document.getElementById(a.pdfViewer.element.id+"_pageDiv_"+o).appendChild(l)}}(r)},t.prototype.setHyperlinkProperties=function(t,e,i){return t.className="e-pv-hyperlink",t.style.background="transparent",t.style.position="absolute",t.style.left=e.Left*this.pdfViewerBase.getZoomFactor()+"px",t.style.top=e.Top*this.pdfViewerBase.getZoomFactor()+"px",t.style.width=e.Width*this.pdfViewerBase.getZoomFactor()+"px",e.Height<0?(t.style.height=-e.Height*this.pdfViewerBase.getZoomFactor()+"px",t.style.top=(e.Top+e.Height)*this.pdfViewerBase.getZoomFactor()+"px"):t.style.height=(e.Height<0?-e.Height:e.Height)*this.pdfViewerBase.getZoomFactor()+"px",t.style.color="transparent",this.pdfViewerBase.applyElementStyles(t,i),t},t.prototype.modifyZindexForTextSelection=function(t,e){if(this.pdfViewerBase.pageCount>0){var i=this.pdfViewerBase.getElement("_pageDiv_"+t);if(i)for(var n=i.childNodes,o=0;o=0;n--)i[n].parentNode.removeChild(i[n])}}},t.prototype.getModuleName=function(){return"LinkAnnotation"},t}(),je=function(){function t(t,e){var i=this;this.currentTextMarkupAddMode="",this.selectTextMarkupCurrentPage=null,this.currentTextMarkupAnnotation=null,this.currentAnnotationIndex=null,this.isAnnotationSelect=!1,this.isDropletClicked=!1,this.isRightDropletClicked=!1,this.isLeftDropletClicked=!1,this.isSelectionMaintained=!1,this.isExtended=!1,this.isNewAnnotation=!1,this.selectedTextMarkup=null,this.multiPageCollection=[],this.triggerAddEvent=!1,this.isSelectedAnnotation=!1,this.dropletHeight=20,this.annotationClickPosition={},this.maintainSelection=function(t){i.isDropletClicked=!0,i.pdfViewer.textSelectionModule.initiateSelectionByTouch(),i.isExtended=!0,i.pdfViewer.textSelectionModule.selectionRangeArray=[]},this.selectionEnd=function(t){i.isDropletClicked&&(i.isDropletClicked=!1)},this.annotationLeftMove=function(t){i.isDropletClicked&&(i.isLeftDropletClicked=!0)},this.annotationRightMove=function(t){i.isDropletClicked&&(i.isRightDropletClicked=!0)},this.pdfViewer=t,this.pdfViewerBase=e}return t.prototype.createAnnotationSelectElement=function(){this.dropDivAnnotationLeft=e.createElement("div",{id:this.pdfViewer.element.id+"_droplet_left",className:"e-pv-drop"}),this.dropDivAnnotationLeft.style.borderRight="2px solid",this.dropDivAnnotationRight=e.createElement("div",{id:this.pdfViewer.element.id+"_droplet_right",className:"e-pv-drop"}),this.dropDivAnnotationRight.style.borderLeft="2px solid",this.dropElementLeft=e.createElement("div",{className:"e-pv-droplet",id:this.pdfViewer.element.id+"_dropletspan_left"}),this.dropElementLeft.style.transform="rotate(0deg)",this.dropDivAnnotationLeft.appendChild(this.dropElementLeft),this.dropElementRight=e.createElement("div",{className:"e-pv-droplet",id:this.pdfViewer.element.id+"_dropletspan_right"}),this.dropElementRight.style.transform="rotate(-90deg)",this.dropDivAnnotationRight.appendChild(this.dropElementRight),this.pdfViewerBase.pageContainer.appendChild(this.dropDivAnnotationLeft),this.pdfViewerBase.pageContainer.appendChild(this.dropDivAnnotationRight),this.dropElementLeft.style.top="20px",this.dropElementRight.style.top="20px",this.dropElementRight.style.left="-8px",this.dropElementLeft.style.left="-8px",this.dropDivAnnotationLeft.style.display="none",this.dropDivAnnotationRight.style.display="none",this.dropDivAnnotationLeft.addEventListener("mousedown",this.maintainSelection),this.dropDivAnnotationLeft.addEventListener("mousemove",this.annotationLeftMove),this.dropDivAnnotationLeft.addEventListener("mouseup",this.selectionEnd),this.dropDivAnnotationRight.addEventListener("mousedown",this.maintainSelection),this.dropDivAnnotationRight.addEventListener("mousemove",this.annotationRightMove),this.dropDivAnnotationRight.addEventListener("mouseup",this.selectionEnd)},t.prototype.textSelect=function(t,e,i){if(this.isLeftDropletClicked){var n=this.dropDivAnnotationRight.getBoundingClientRect(),o=this.dropDivAnnotationLeft.getBoundingClientRect(),s=e,a=i;t.classList.contains("e-pv-text")&&(o.top-25>n.top?this.pdfViewer.textSelectionModule.textSelectionOnDrag(t,s,a,!0):this.pdfViewer.textSelectionModule.textSelectionOnDrag(t,s,a,!1),this.updateLeftposition(s,a))}else if(this.isRightDropletClicked){var n=this.dropDivAnnotationLeft.getBoundingClientRect(),s=e,a=i;t.classList.contains("e-pv-text")&&(a>=n.top?this.pdfViewer.textSelectionModule.textSelectionOnDrag(t,s,a,!0):this.pdfViewer.textSelectionModule.textSelectionOnDrag(t,s,a,!1),this.updatePosition(s,a))}},t.prototype.showHideDropletDiv=function(t){var e=this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode;this.isEnableTextMarkupResizer(e)&&this.dropDivAnnotationLeft&&this.dropDivAnnotationRight&&(t?(this.dropDivAnnotationLeft.style.display="none",this.dropDivAnnotationRight.style.display="none"):(this.dropDivAnnotationLeft.style.display="",this.dropDivAnnotationRight.style.display="",this.updateDropletStyles(e)))},t.prototype.isEnableTextMarkupResizer=function(t){var e=!1;return t?"Highlight"===t&&this.pdfViewer.highlightSettings.enableTextMarkupResizer?e=!0:"Underline"===t&&this.pdfViewer.underlineSettings.enableTextMarkupResizer?e=!0:"Strikethrough"===t&&this.pdfViewer.strikethroughSettings.enableTextMarkupResizer?e=!0:this.pdfViewer.enableTextMarkupResizer&&(e=!0):this.pdfViewer.enableTextMarkupResizer?e=!0:this.pdfViewer.highlightSettings.enableTextMarkupResizer?e=!0:this.pdfViewer.underlineSettings.enableTextMarkupResizer?e=!0:this.pdfViewer.strikethroughSettings.enableTextMarkupResizer&&(e=!0),e},t.prototype.updateDropletStyles=function(t){this.isEnableTextMarkupResizer(t)&&this.dropDivAnnotationLeft&&this.dropDivAnnotationLeft.offsetWidth>0&&(this.dropDivAnnotationLeft.style.width=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropDivAnnotationRight.style.width=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementLeft.style.width=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementRight.style.width=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropDivAnnotationLeft.style.height=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropDivAnnotationRight.style.height=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementLeft.style.height=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementRight.style.height=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementLeft.style.top=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px",this.dropElementRight.style.top=this.dropletHeight*this.pdfViewerBase.getZoomFactor()+"px")},t.prototype.updateAnnotationBounds=function(){this.isSelectionMaintained=!1;var t=this.currentTextMarkupAnnotation;t&&t.isMultiSelect?(this.showHideDropletDiv(!0),this.updateMultiAnnotBounds(t)):t&&t.bounds&&(this.retreieveSelection(t,null),this.pdfViewer.textSelectionModule.maintainSelection(this.selectTextMarkupCurrentPage,!1),this.isSelectionMaintained=!0,window.getSelection().removeAllRanges())},t.prototype.updateMultiAnnotBounds=function(t){if(!t.annotpageNumbers&&(a=this.getAnnotations(t.pageNumber,null)))for(u=0;u=i&&(i=o),o<=e&&(e=o)}for(var s=e;s<=i;s++){var a=this.getAnnotations(s,null);if(a)for(var r=0;r0&&!this.isSelectionMaintained&&this.convertSelectionToTextMarkup(t,i,this.pdfViewerBase.getZoomFactor()),this.isEnableTextMarkupResizer(t)&&this.isExtended&&window.getSelection().toString()){if((s=this.getDrawnBounds())[0]&&s[0].bounds)for(var n=this.currentTextMarkupAnnotation,o=0;o0)for(var r=0;r0?t.length-1===e&&this.pdfViewer.fireAnnotationResize(t[e].pageIndex,n.annotName,n.textMarkupAnnotationType,n.bounds,s,n.textMarkupContent,n.textMarkupStartIndex,n.textMarkupEndIndex,null,a):this.pdfViewer.fireAnnotationResize(t[e].pageIndex,n.annotName,n.textMarkupAnnotationType,n.bounds,s,n.textMarkupContent,n.textMarkupStartIndex,n.textMarkupEndIndex,null)}this.currentAnnotationIndex=null,this.selectTextMarkupCurrentPage=null}}},t.prototype.multiPageCollectionList=function(t){var e=[];if(t.isMultiSelect&&t.annotNameCollection){e.push(t);for(var i=0;ir;r++){this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.getBoundsForSave(a.annotations[r].bounds,o));var l=a.annotations[r].color;a.annotations[r].color=JSON.stringify(this.getRgbCode(l)),a.annotations[r].rect=JSON.stringify(a.annotations[r].rect)}s=a.annotations}e[a.pageIndex]=s}return JSON.stringify(e)},t.prototype.deleteTextMarkupAnnotation=function(){if(this.currentTextMarkupAnnotation){var t=!1;if(this.currentTextMarkupAnnotation.annotationSettings&&(t=this.currentTextMarkupAnnotation.annotationSettings.isLock,this.pdfViewer.annotationModule.checkAllowedInteractions("Delete",this.currentTextMarkupAnnotation)&&(t=!1)),!t){var i=null;this.showHideDropletDiv(!0);var n=this.currentTextMarkupAnnotation;this.currentTextMarkupAnnotation.isMultiSelect&&n.annotNameCollection&&this.deletMultiPageAnnotation(n);var o=this.getAnnotations(this.selectTextMarkupCurrentPage,null);if(o){for(var s=0;s0?(u.push(i),this.pdfViewer.fireAnnotationRemove(this.selectTextMarkupCurrentPage,r,i.textMarkupAnnotationType,l,i.textMarkupContent,i.textMarkupStartIndex,i.textMarkupEndIndex,u)):this.pdfViewer.fireAnnotationRemove(this.selectTextMarkupCurrentPage,r,i.textMarkupAnnotationType,l,i.textMarkupContent,i.textMarkupStartIndex,i.textMarkupEndIndex),this.currentAnnotationIndex=null,this.selectTextMarkupCurrentPage=null,e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.pdfViewer.toolbarModule.annotationToolbarModule.hideMobileAnnotationToolbar(),this.pdfViewer.toolbarModule.showToolbar(!0))}}}},t.prototype.modifyColorProperty=function(t){if(this.currentTextMarkupAnnotation){var e=this.modifyAnnotationProperty("Color",t,null);this.manageAnnotations(e,this.selectTextMarkupCurrentPage),this.pdfViewer.annotationModule.renderAnnotations(this.selectTextMarkupCurrentPage,null,null,null),this.pdfViewer.isDocumentEdited=!0;var i=this.currentTextMarkupAnnotation,n=this.multiPageCollectionList(i);n.length>0?(this.pdfViewer.fireAnnotationPropertiesChange(this.selectTextMarkupCurrentPage,i.annotName,i.textMarkupAnnotationType,!0,!1,!1,!1,i.textMarkupContent,i.textMarkupStartIndex,i.textMarkupEndIndex,n),this.currentAnnotationIndex=null):(this.pdfViewer.fireAnnotationPropertiesChange(this.selectTextMarkupCurrentPage,i.annotName,i.textMarkupAnnotationType,!0,!1,!1,!1,i.textMarkupContent,i.textMarkupStartIndex,i.textMarkupEndIndex),this.currentAnnotationIndex=null)}},t.prototype.modifyOpacityProperty=function(t,e){if(this.currentTextMarkupAnnotation){var i=void 0;if((i=e?this.modifyAnnotationProperty("Opacity",e,"changed"):this.modifyAnnotationProperty("Opacity",t.value/100,t.name))&&(this.manageAnnotations(i,this.selectTextMarkupCurrentPage),this.pdfViewer.annotationModule.renderAnnotations(this.selectTextMarkupCurrentPage,null,null,null),e||"changed"===t.name)){this.pdfViewer.isDocumentEdited=!0;var n=this.currentTextMarkupAnnotation,o=this.multiPageCollectionList(n);o.length>0?(this.pdfViewer.fireAnnotationPropertiesChange(this.selectTextMarkupCurrentPage,n.annotName,n.textMarkupAnnotationType,!1,!0,!1,!1,n.textMarkupContent,n.textMarkupStartIndex,n.textMarkupEndIndex,o),this.currentAnnotationIndex=null):(this.pdfViewer.fireAnnotationPropertiesChange(this.selectTextMarkupCurrentPage,n.annotName,n.textMarkupAnnotationType,!1,!0,!1,!1,n.textMarkupContent,n.textMarkupStartIndex,n.textMarkupEndIndex),this.currentAnnotationIndex=null)}}},t.prototype.modifyAnnotationProperty=function(t,e,i,n){var o=this.currentTextMarkupAnnotation;o.isMultiSelect&&o.annotNameCollection&&this.modifyMultiPageAnnotations(o,t,e);var s=this.getAnnotations(this.selectTextMarkupCurrentPage,null);if(s)for(var a=0;a=0?t-2:0,n=t+2-1||e.id.indexOf("_annotationCanvas")>-1||e.classList.contains("e-pv-hyperlink"))&&this.pdfViewer.annotation){i=this.pdfViewer.annotation.getEventPageNumber(t);var n=this.pdfViewerBase.getElement("_annotationCanvas_"+i),o=this.getCurrentMarkupAnnotation(t.clientX,t.clientY,i,n);if(o){e.style.cursor="pointer";var s=this.pdfViewerBase.getMousePosition(t),a=this.pdfViewerBase.relativePosition(t),r={left:a.x,top:a.y},l={left:s.x,top:s.y},u={opacity:o.opacity,color:o.color,author:o.author,subject:o.subject,modifiedDate:o.modifiedDate};this.pdfViewerBase.isMousedOver=!0,this.pdfViewer.fireAnnotationMouseover(o.annotName,o.pageNumber,o.textMarkupAnnotationType,o.bounds,u,l,r)}else this.pdfViewer.annotationModule.hidePopupNote(),this.pdfViewerBase.isPanMode&&!this.pdfViewerBase.getAnnotationToolStatus()?e.style.cursor="grab":e.style.cursor="auto",this.pdfViewerBase.isMousedOver&&(this.pdfViewer.fireAnnotationMouseLeave(i),this.pdfViewerBase.isMousedOver=!1)}},t.prototype.showPopupNote=function(t,e){e.note&&this.pdfViewer.annotationModule.showPopupNote(t,e.color,e.author,e.note,e.textMarkupAnnotationType)},t.prototype.getCurrentMarkupAnnotation=function(t,e,i,n){var o=[];if(n){var s=n.parentElement.getBoundingClientRect();n.clientWidth!==n.parentElement.clientWidth&&(s=n.getBoundingClientRect());var a=t-s.left,r=e-s.top,l=this.getAnnotations(i,null),u=!1;if(l)for(var M=0;M=this.getMagnifiedValue(h,this.pdfViewerBase.getZoomFactor())&&a<=this.getMagnifiedValue(h+c,this.pdfViewerBase.getZoomFactor())&&r>=this.getMagnifiedValue(p,this.pdfViewerBase.getZoomFactor())&&r<=this.getMagnifiedValue(p+C,this.pdfViewerBase.getZoomFactor()))o.push(L),u=!0;else if(u){u=!1;break}}var j=null;return o.length>1?j=this.compareCurrentAnnotations(o):1===o.length&&(j=o[0]),j}return null},t.prototype.compareCurrentAnnotations=function(t){for(var e,i=null,n=0;n2&&(r=[r[0],r[1]]),a.setLineDash(r),a.globalAlpha=1,a.rect(e,i,n,o),a.closePath();l=""===JSON.parse(s.annotationSelectorSettings).selectionBorderColor?"#0000ff":JSON.parse(s.annotationSelectorSettings).selectionBorderColor;a.strokeStyle=l,a.lineWidth=1===JSON.parse(s.annotationSelectorSettings).selectionBorderThickness?1:s.annotationSelectorSettings.selectionBorderThickness,a.stroke(),a.save()}else{var r=0===s.annotationSelectorSettings.selectorLineDashArray.length?[4]:s.annotationSelectorSettings.selectorLineDashArray;r.length>2&&(r=[r[0],r[1]]),a.setLineDash(r),a.globalAlpha=1,a.rect(e,i,n,o),a.closePath();var l=""===s.annotationSelectorSettings.selectionBorderColor?"#0000ff":s.annotationSelectorSettings.selectionBorderColor;a.strokeStyle=l,a.lineWidth=s.annotationSelectorSettings.selectionBorderThickness?1:s.annotationSelectorSettings.selectionBorderThickness,a.stroke(),a.save()}}},t.prototype.enableAnnotationPropertiesTool=function(t){if(this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-color-container")),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.createMobileAnnotationToolbar(t),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.isMobileAnnotEnabled&&0===this.pdfViewer.selectedItems.annotations.length&&this.pdfViewer.toolbarModule.annotationToolbarModule){this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(t);var i=t;this.isTextMarkupAnnotationMode&&(i=!0),this.pdfViewer.toolbarModule.annotationToolbarModule.enableTextMarkupAnnotationPropertiesTools(i),this.currentTextMarkupAnnotation?e.isBlazor()?this.pdfViewer.toolbarModule.annotationToolbarModule.updateColorInIcon(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElementInBlazor,this.currentTextMarkupAnnotation.color):this.pdfViewer.toolbarModule.annotationToolbarModule.updateColorInIcon(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElement,this.currentTextMarkupAnnotation.color):this.isTextMarkupAnnotationMode?this.pdfViewer.toolbarModule.annotationToolbarModule.setCurrentColorInPicker():e.isBlazor()?this.pdfViewer.toolbarModule.annotationToolbarModule.updateColorInIcon(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElementInBlazor,"#000000"):this.pdfViewer.toolbarModule.annotationToolbarModule.updateColorInIcon(this.pdfViewer.toolbarModule.annotationToolbarModule.colorDropDownElement,"#000000")}},t.prototype.maintainAnnotationSelection=function(){if(this.currentTextMarkupAnnotation){var t=this.pdfViewerBase.getElement("_annotationCanvas_"+this.selectTextMarkupCurrentPage);t&&this.selectAnnotation(this.currentTextMarkupAnnotation,t,this.selectTextMarkupCurrentPage)}},t.prototype.manageAnnotations=function(t,e){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_textMarkup");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_textMarkup"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_textMarkup");var o=this.pdfViewer.annotationModule.getPageCollection(n,e);n[o]&&(n[o].annotations=t);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_textMarkup"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_textMarkup",s)}},t.prototype.getAnnotations=function(t,e,i){var n;null!=i&&void 0!=i||(i="_annotations_textMarkup");var o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+i);if(this.pdfViewerBase.isStorageExceed&&(o=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+i]),o){var s=JSON.parse(o),a=this.pdfViewer.annotationModule.getPageCollection(s,t);n=s[a]?s[a].annotations:e}else n=e;return n},t.prototype.getAddedAnnotation=function(t,e,i,n,o,s,a,r,l,u,M,L,d,w,h,p){var c=a||this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),C=this.pdfViewer.annotation.createGUID(),j=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("textMarkup",M+1,t);j&&(document.getElementById(j).id=C);var g=this.getAnnotationSettings(t),y=this.getIsPrintValue(t),A={textMarkupAnnotationType:t,color:e,opacity:i,bounds:n,author:o,allowedInteractions:p,subject:s,modifiedDate:c,note:r,rect:u,annotName:C,comments:[],review:{state:"",stateModel:"",author:o,modifiedDate:c},shapeAnnotationType:"textMarkup",pageNumber:M,textMarkupContent:L,textMarkupStartIndex:d,textMarkupEndIndex:w,isMultiSelect:h,annotationSelectorSettings:this.getSelector(t),customData:this.pdfViewer.annotation.getTextMarkupData(s),annotationAddMode:this.annotationAddMode,annotationSettings:g,isPrint:y,isCommentLock:l};h&&this.multiPageCollection.push(A);var S=!1;h&&this.isExtended&&(S=!0),document.getElementById(C)&&!S&&document.getElementById(C).addEventListener("mouseup",this.annotationDivSelect(A,M));var m=this.pdfViewer.annotationModule.storeAnnotations(M,A,"_annotations_textMarkup");return this.pdfViewer.annotationModule.addAction(M,m,A,"Text Markup Added",null),A},t.prototype.getSelector=function(t){var e=this.pdfViewer.annotationSelectorSettings;return"Highlight"===t&&this.pdfViewer.highlightSettings.annotationSelectorSettings?e=this.pdfViewer.highlightSettings.annotationSelectorSettings:"Underline"===t&&this.pdfViewer.underlineSettings.annotationSelectorSettings?e=this.pdfViewer.underlineSettings.annotationSelectorSettings:"Strikethrough"===t&&this.pdfViewer.strikethroughSettings.annotationSelectorSettings&&(e=this.pdfViewer.strikethroughSettings.annotationSelectorSettings),e},t.prototype.getAnnotationSettings=function(t){var e={isLock:!1};return"Highlight"===t&&this.pdfViewer.highlightSettings.isLock?e={isLock:!0}:"Underline"===t&&this.pdfViewer.underlineSettings.isLock?e={isLock:!0}:"Strikethrough"===t&&this.pdfViewer.strikethroughSettings.isLock?e={isLock:!0}:this.pdfViewer.annotationSettings.isLock&&(e={isLock:!0}),e},t.prototype.getIsPrintValue=function(t){var e=!0;return"Highlight"===t&&(e=this.pdfViewer.highlightSettings.isPrint),"Underline"===t&&(e=this.pdfViewer.underlineSettings.isPrint),"Strikethrough"===t&&(e=this.pdfViewer.strikethroughSettings.isPrint),e},t.prototype.annotationDivSelect=function(t,i){var n=this.pdfViewerBase.getElement("_annotationCanvas_"+i);if(this.selectAnnotation(t,n,i),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.enableAnnotationToolbar){this.pdfViewer.toolbarModule.annotationToolbarModule.clearShapeMode(),this.pdfViewer.toolbarModule.annotationToolbarModule.clearMeasureMode();var o=!1;t.annotationSettings&&t.annotationSettings.isLock&&(o=t.annotationSettings.isLock),o?(this.pdfViewer.annotationModule.checkAllowedInteractions("PropertyChange",t)&&(this.pdfViewer.toolbarModule.annotationToolbarModule.enableTextMarkupAnnotationPropertiesTools(!0),this.pdfViewer.toolbarModule.annotationToolbarModule.setCurrentColorInPicker()),this.pdfViewer.annotationModule.checkAllowedInteractions("Delete",t)&&this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(!0)):(this.pdfViewer.toolbarModule.annotationToolbarModule.enableTextMarkupAnnotationPropertiesTools(!0),this.pdfViewer.toolbarModule.annotationToolbarModule.selectAnnotationDeleteItem(!0),this.pdfViewer.toolbarModule.annotationToolbarModule.setCurrentColorInPicker()),this.pdfViewer.toolbarModule.annotationToolbarModule.isToolbarHidden=!0,e.isBlazor()||this.pdfViewer.toolbarModule.annotationToolbarModule.showAnnotationToolbar(this.pdfViewer.toolbarModule.annotationItem)}},t.prototype.getPageContext=function(t){var e=this.pdfViewerBase.getElement("_annotationCanvas_"+t),i=null;return e&&(i=e.getContext("2d")),i},t.prototype.getDefaultValue=function(t){return t/this.pdfViewerBase.getZoomFactor()},t.prototype.getMagnifiedValue=function(t,e){return t*e},t.prototype.saveImportedTextMarkupAnnotations=function(t,e){var i=null;t.Author=this.pdfViewer.annotationModule.updateAnnotationAuthor("textMarkup",t.Subject),t.AnnotationSettings&&t.AnnotationSettings.isLock?t.AnnotationSettings={isLock:t.AnnotationSettings.isLock}:t.AnnotationSettings=this.getAnnotationSettings(t.TextMarkupAnnotationType),t.allowedInteractions=this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(t),i={textMarkupAnnotationType:t.TextMarkupAnnotationType,color:t.Color,opacity:t.Opacity,allowedInteractions:t.allowedInteractions,bounds:t.Bounds,author:t.Author,subject:t.Subject,modifiedDate:t.ModifiedDate,note:t.Note,rect:t.Rect,annotName:t.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(t.Comments,t,t.Author),review:{state:t.State,stateModel:t.StateModel,modifiedDate:t.ModifiedDate,author:t.Author},shapeAnnotationType:"textMarkup",pageNumber:e,textMarkupContent:"",textMarkupStartIndex:0,textMarkupEndIndex:0,annotationSelectorSettings:this.getSettings(t),customData:this.pdfViewer.annotation.getCustomData(t),isMultiSelect:t.IsMultiSelect,annotNameCollection:t.AnnotNameCollection,annotpageNumbers:t.AnnotpageNumbers,annotationAddMode:this.annotationAddMode,annotationSettings:t.AnnotationSettings,isPrint:t.isPrint,isCommentLock:t.IsCommentLock},this.pdfViewer.annotationModule.storeAnnotations(e,i,"_annotations_textMarkup")},t.prototype.updateTextMarkupAnnotationCollections=function(t,e){return t.allowedInteractions=t.AllowedInteractions?t.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(t),{textMarkupAnnotationType:t.TextMarkupAnnotationType,allowedInteractions:t.allowedInteractions,color:t.Color,opacity:t.Opacity,bounds:t.Bounds,author:t.Author,subject:t.Subject,modifiedDate:t.ModifiedDate,note:t.Note,rect:t.Rect,annotationId:t.AnnotName,comments:this.pdfViewer.annotationModule.getAnnotationComments(t.Comments,t,t.Author),review:{state:t.State,stateModel:t.StateModel,modifiedDate:t.ModifiedDate,author:t.Author},shapeAnnotationType:"textMarkup",pageNumber:e,isMultiSelect:t.IsMultiSelect,annotNameCollection:t.AnnotNameCollection,annotpageNumbers:t.AnnotpageNumbers,customData:this.pdfViewer.annotation.getCustomData(t),isPrint:t.isPrint,isCommentLock:t.IsCommentLock}},t.prototype.updateTextMarkupSettings=function(t){"highlightSettings"===t&&(this.highlightColor=this.pdfViewer.highlightSettings.color?this.pdfViewer.highlightSettings.color:this.highlightColor,this.highlightOpacity=this.pdfViewer.highlightSettings.opacity?this.pdfViewer.highlightSettings.opacity:this.highlightOpacity),"underlineSettings"===t&&(this.underlineColor=this.pdfViewer.underlineSettings.color?this.pdfViewer.underlineSettings.color:this.underlineColor,this.underlineOpacity=this.pdfViewer.underlineSettings.opacity?this.pdfViewer.underlineSettings.opacity:this.underlineOpacity),"strikethroughSettings"===t&&(this.strikethroughColor=this.pdfViewer.strikethroughSettings.color?this.pdfViewer.strikethroughSettings.color:this.strikethroughColor,this.strikethroughOpacity=this.pdfViewer.strikethroughSettings.opacity?this.pdfViewer.strikethroughSettings.opacity:this.strikethroughOpacity)},t.prototype.clear=function(){this.selectTextMarkupCurrentPage=null,this.currentTextMarkupAnnotation=null,this.annotationClickPosition=null,window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_textMarkup")},t}(),ge=function(){function t(t,e){this.measureShapeCount=0,this.pdfViewer=t,this.pdfViewerBase=e}return Object.defineProperty(t.prototype,"pixelToPointFactor",{get:function(){return.75},enumerable:!0,configurable:!0}),t.prototype.renderMeasureShapeAnnotations=function(t,e,i){if(t)if(t.length>=1){if(!this.pdfViewer.annotation.getStoredAnnotations(e,t,"_annotations_shape_measure")||i)for(var n=0;nr;r++){this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));var l=a.annotations[r].strokeColor;a.annotations[r].strokeColor=JSON.stringify(this.getRgbCode(l));var u=a.annotations[r].fillColor;if(a.annotations[r].fillColor=JSON.stringify(this.getRgbCode(u)),a.annotations[r].vertexPoints=JSON.stringify(this.pdfViewer.annotation.getVertexPoints(a.annotations[r].vertexPoints,a.pageIndex)),null!==a.annotations[r].rectangleDifference&&(a.annotations[r].rectangleDifference=JSON.stringify(a.annotations[r].rectangleDifference)),a.annotations[r].calibrate=this.getStringifiedMeasure(a.annotations[r].calibrate),!0===a.annotations[r].enableShapeLabel){a.annotations[r].labelBounds=JSON.stringify(this.pdfViewer.annotationModule.inputElementModule.calculateLabelBounds(JSON.parse(a.annotations[r].bounds),a.pageIndex));var M=a.annotations[r].labelFillColor;a.annotations[r].labelFillColor=JSON.stringify(this.getRgbCode(M));var L=a.annotations[r].labelBorderColor;a.annotations[r].labelBorderColor=JSON.stringify(this.getRgbCode(L));var d=a.annotations[r].fontColor;a.annotations[r].fontColor=JSON.stringify(this.getRgbCode(d))}}s=a.annotations}e[a.pageIndex]=s}return JSON.stringify(e)},t.prototype.createScaleRatioWindow=function(){var t=this;if(e.isBlazor())this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenScaleRatioDialog");else{var i=this.pdfViewer.element.id,n=e.createElement("div",{id:i+"_scale_ratio_window",className:"e-pv-scale-ratio-window"});this.pdfViewerBase.pageContainer.appendChild(n);var s=this.createRatioUI();this.scaleRatioDialog=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("Scale Ratio"),target:this.pdfViewer.element,content:s,close:function(){t.sourceTextBox.destroy(),t.convertUnit.destroy(),t.destTextBox.destroy(),t.dispUnit.destroy(),t.scaleRatioDialog.destroy();var e=t.pdfViewerBase.getElement("_scale_ratio_window");e.parentElement.removeChild(e)}}),!e.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.scaleRatioDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.onOkClicked.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.onCancelClicked.bind(this)}]:this.scaleRatioDialog.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.onCancelClicked.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.onOkClicked.bind(this)}],this.pdfViewer.enableRtl&&(this.scaleRatioDialog.enableRtl=!0),this.scaleRatioDialog.appendTo(n),this.convertUnit.content=this.createContent(this.unit).outerHTML,this.dispUnit.content=this.createContent(this.displayUnit).outerHTML,this.depthUnit.content=this.createContent(this.displayUnit).outerHTML}},t.prototype.createRatioUI=function(){var t=e.createElement("div"),i=this.pdfViewer.element.id,o=[{text:"pt"},{text:"in"},{text:"mm"},{text:"cm"},{text:"p"},{text:"ft"},{text:"ft_in"},{text:"m"}],a=e.createElement("div",{id:i+"_scale_ratio_label",className:"e-pv-scale-ratio-text"});a.textContent=this.pdfViewer.localeObj.getConstant("Scale Ratio"),t.appendChild(a);var r=e.createElement("div",{id:i+"_scale_src_container"});t.appendChild(r);var l=this.createInputElement("input","e-pv-scale-ratio-src-input",i+"_src_input",r);this.sourceTextBox=new n.NumericTextBox({value:1,format:"##",cssClass:"e-pv-scale-ratio-src-input",min:1,max:100},l);var u=this.createInputElement("button","e-pv-scale-ratio-src-unit",i+"_src_unit",r);this.convertUnit=new s.DropDownButton({items:o,cssClass:"e-pv-scale-ratio-src-unit"},u),this.convertUnit.select=this.convertUnitSelect.bind(this);var M=e.createElement("div",{id:i+"_scale_dest_container"}),L=this.createInputElement("input","e-pv-scale-ratio-dest-input",i+"_dest_input",M);this.destTextBox=new n.NumericTextBox({value:1,format:"##",cssClass:"e-pv-scale-ratio-dest-input",min:1,max:100},L);var d=this.createInputElement("button","e-pv-scale-ratio-dest-unit",i+"_dest_unit",M);this.dispUnit=new s.DropDownButton({items:o,cssClass:"e-pv-scale-ratio-dest-unit"},d),this.dispUnit.select=this.dispUnitSelect.bind(this),t.appendChild(M);var w=e.createElement("div",{id:i+"_depth_label",className:"e-pv-depth-text"});w.textContent=this.pdfViewer.localeObj.getConstant("Depth"),t.appendChild(w);var h=e.createElement("div",{id:i+"_depth_container"});t.appendChild(h);var p=this.createInputElement("input","e-pv-depth-input",i+"_depth_input",h);this.depthTextBox=new n.NumericTextBox({value:this.volumeDepth,format:"##",cssClass:"e-pv-depth-input",min:1},p);var c=this.createInputElement("button","e-pv-depth-unit",i+"_depth_unit",h);return this.depthUnit=new s.DropDownButton({items:o,cssClass:"e-pv-depth-unit"},c),this.depthUnit.select=this.depthUnitSelect.bind(this),t},t.prototype.convertUnitSelect=function(t){this.convertUnit.content=this.createContent(t.item.text).outerHTML},t.prototype.dispUnitSelect=function(t){this.dispUnit.content=this.createContent(t.item.text).outerHTML,this.depthUnit.content=this.createContent(t.item.text).outerHTML},t.prototype.depthUnitSelect=function(t){this.depthUnit.content=this.createContent(t.item.text).outerHTML},t.prototype.createContent=function(t){var i=e.createElement("div",{className:"e-pv-scale-unit-content"});return i.textContent=t,i},t.prototype.createInputElement=function(t,i,n,o){var s=e.createElement("div",{id:n+"_container",className:i+"-container"}),a=e.createElement(t,{id:n});return"input"===t&&(a.type="text"),s.appendChild(a),o.appendChild(s),a},t.prototype.onOkClicked=function(){if(e.isBlazor()){var t=document.querySelector("#"+this.pdfViewer.element.id+"_src_unit"),i=document.querySelector("#"+this.pdfViewer.element.id+"_dest_unit"),n=document.querySelector("#"+this.pdfViewer.element.id+"_ratio_input"),o=document.querySelector("#"+this.pdfViewer.element.id+"_dest_input"),s=document.querySelector("#"+this.pdfViewer.element.id+"_depth_input");t&&i&&n&&o&&s&&(this.unit=t.value,this.displayUnit=i.value,this.ratio=parseInt(o.value)/parseInt(n.value),this.volumeDepth=parseInt(s.value)),this.scaleRatioString=parseInt(n.value)+" "+this.unit+" = "+parseInt(o.value)+" "+this.displayUnit,this.updateMeasureValues(this.scaleRatioString,this.displayUnit,this.unit,this.volumeDepth)}else this.unit=this.getContent(this.convertUnit.content),this.displayUnit=this.getContent(this.dispUnit.content),this.ratio=this.destTextBox.value/this.sourceTextBox.value,this.volumeDepth=this.depthTextBox.value,this.scaleRatioString=this.sourceTextBox.value+" "+this.unit+" = "+this.destTextBox.value+" "+this.displayUnit,this.scaleRatioDialog.hide(),this.updateMeasureValues(this.scaleRatioString,this.displayUnit,this.unit,this.volumeDepth)},t.prototype.updateMeasureValues=function(t,e,i,n){this.scaleRatioString=t,this.displayUnit=e,this.unit=i,this.volumeDepth=n;for(var o=0;o")[0].split('">')[1]},t.prototype.setConversion=function(t,e){var i;if(e){var n=e.pageIndex;"diagram_helper"===e.id&&(n=e.pageIndex?e.pageIndex:this.pdfViewerBase.activeElements.activePageID,e=this.getCurrentObject(n,null,e.annotName)),i=e?this.getCurrentValues(e.id,n):this.getCurrentValues()}else i=this.getCurrentValues();var o=t*i.ratio;return this.convertPointToUnits(i.factor,o,i.unit)},t.prototype.onCancelClicked=function(){this.scaleRatioDialog.hide()},t.prototype.modifyInCollection=function(t,e,i,n){n||(this.pdfViewer.isDocumentEdited=!0);var o=null,s=this.getAnnotations(e,null);if(null!=s&&i){for(var a=0;a=12){if(s=(Math.round(s/12*100)/100).toString(),(s=s.split("."))[1]){var a=0;return s[1].charAt(1)?(a=parseInt(s[1].charAt(0))+"."+parseInt(s[1].charAt(1)),a=Math.round(a)):a=s[1],a?s[0]+" sq ft "+a+" in":s[0]+" sq ft"}return s[0]+" sq ft"}return Math.round(100*o)/100+" sq in"}return"m"===n.unit?100*o/100+" sq "+n.unit:Math.round(100*o)/100+" sq "+n.unit},t.prototype.getArea=function(t,e,i){for(var n=0,o=t.length-1,s=0;s=12){if(a=(Math.round(a/12*100)/100).toString(),(a=a.split("."))[1]){var r=0;return a[1].charAt(1)?(r=parseInt(a[1].charAt(0))+"."+parseInt(a[1].charAt(1)),r=Math.round(r)):r=a[1],r?a[0]+" cu ft "+r+" in":a[0]+" cu ft"}return a[0]+" cu ft"}return Math.round(100*s)/100+" cu in"}return Math.round(100*s)/100+" cu "+n.unit},t.prototype.calculatePerimeter=function(t){var e=i.Point.getLengthFromListOfPoints(t.vertexPoints);return this.setConversion(e*this.pixelToPointFactor,t)},t.prototype.getFactor=function(t){var e;switch(t){case"in":e=1/72;break;case"cm":e=1/28.346;break;case"mm":e=1/2.835;break;case"pt":e=1;break;case"p":e=1/12;break;case"ft":e=1/864;break;case"ft_in":e=1/72;break;case"m":e=1/2834.64567}return e},t.prototype.convertPointToUnits=function(t,e,i){var n;if("ft_in"===i){var o=Math.round(e*t*100)/100;if(o>=12)if(o=(Math.round(o/12*100)/100).toString(),(o=o.split("."))[1]){var s=0;o[1].charAt(1)?(s=parseInt(o[1].charAt(0))+"."+parseInt(o[1].charAt(1)),s=Math.round(s)):s=o[1],n=s?o[0]+" ft "+s+" in":o[0]+" ft"}else n=o[0]+" ft";else n=Math.round(e*t*100)/100+" in"}else n=Math.round(e*t*100)/100+" "+i;return n},t.prototype.convertUnitToPoint=function(t){var e;switch(t){case"in":e=72;break;case"cm":e=28.346;break;case"mm":e=2.835;break;case"pt":e=1;break;case"p":e=12;break;case"ft":e=864;break;case"ft_in":e=72;break;case"m":e=2834.64567}return e},t.prototype.getStringifiedMeasure=function(t){return e.isNullOrUndefined(t)||(t.angle=JSON.stringify(t.angle),t.area=JSON.stringify(t.area),t.distance=JSON.stringify(t.distance),t.volume=JSON.stringify(t.volume)),JSON.stringify(t)},t.prototype.getRgbCode=function(t){t.match(/#([a-z0-9]+)/gi)||t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(t=this.pdfViewer.annotationModule.nameToHash(t));var i=t.split(",");return e.isNullOrUndefined(i[1])&&(i=(t=this.pdfViewer.annotationModule.getValue(t,"rgba")).split(",")),{r:parseInt(i[0].split("(")[1]),g:parseInt(i[1]),b:parseInt(i[2]),a:parseInt(i[3])}},t.prototype.saveImportedMeasureAnnotations=function(t,e){var i=null,n=null;if(t.VertexPoints){n=[];for(var o=0;o=1){if(!this.pdfViewer.annotation.getStoredAnnotations(e,t,"_annotations_shape")||i)for(var n=0;n0&&l<151?l:151),i.wrapper.bounds.left&&(r=i.wrapper.bounds.left+i.wrapper.bounds.width/2-l/2),i.wrapper.bounds.top&&(a=i.wrapper.bounds.top+i.wrapper.bounds.height/2-12.3),o[s].labelBounds={left:r,top:a,width:l,height:24.6,right:0,bottom:0}}}else if("fill"===t)o[s].fillColor=i.wrapper.children[0].style.fill;else if("stroke"===t)o[s].strokeColor=i.wrapper.children[0].style.strokeColor;else if("opacity"===t)o[s].opacity=i.wrapper.children[0].style.opacity;else if("thickness"===t)o[s].thickness=i.wrapper.children[0].style.strokeWidth;else if("dashArray"===t)o[s].borderDashArray=i.wrapper.children[0].style.strokeDashArray,o[s].borderStyle=i.borderStyle;else if("startArrow"===t)o[s].lineHeadStart=this.pdfViewer.annotation.getArrowTypeForCollection(i.sourceDecoraterShapes);else if("endArrow"===t)o[s].lineHeadEnd=this.pdfViewer.annotation.getArrowTypeForCollection(i.taregetDecoraterShapes);else if("notes"===t)o[s].note=i.notes;else{if("delete"===t){n=o.splice(s,1)[0];break}if("labelContent"===t){o[s].note=i.labelContent,o[s].labelContent=i.labelContent;break}"fontColor"===t?o[s].fontColor=i.fontColor:"fontSize"===t&&(o[s].fontSize=i.fontSize)}o[s].modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.pdfViewer.annotationModule.storeAnnotationCollections(o[s],e)}this.manageAnnotations(o,e)}return n},t.prototype.addInCollection=function(t,e){var i=this.getAnnotations(t,null);i&&i.push(e),this.manageAnnotations(i,t)},t.prototype.saveShapeAnnotations=function(){var t=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape");this.pdfViewerBase.isStorageExceed&&(t=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape"]);for(var e=new Array,i=0;ir;r++){this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));var l=a.annotations[r].strokeColor;a.annotations[r].strokeColor=JSON.stringify(this.getRgbCode(l));var u=a.annotations[r].fillColor;if(a.annotations[r].fillColor=JSON.stringify(this.getRgbCode(u)),a.annotations[r].vertexPoints=JSON.stringify(this.pdfViewer.annotation.getVertexPoints(a.annotations[r].vertexPoints,a.pageIndex)),null!==a.annotations[r].rectangleDifference&&(a.annotations[r].rectangleDifference=JSON.stringify(a.annotations[r].rectangleDifference)),!0===a.annotations[r].enableShapeLabel){a.annotations[r].labelBounds=JSON.stringify(this.pdfViewer.annotationModule.inputElementModule.calculateLabelBounds(JSON.parse(a.annotations[r].bounds)));var M=a.annotations[r].labelFillColor;a.annotations[r].labelFillColor=JSON.stringify(this.getRgbCode(M));var L=a.annotations[r].labelBorderColor;a.annotations[r].labelBorderColor=JSON.stringify(this.getRgbCode(L));var d=a.annotations[r].fontColor;a.annotations[r].fontColor=JSON.stringify(this.getRgbCode(d))}}s=a.annotations}e[a.pageIndex]=s}return JSON.stringify(e)},t.prototype.manageAnnotations=function(t,e){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_shape");var o=this.pdfViewer.annotationModule.getPageCollection(n,e);n[o]&&(n[o].annotations=t);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_shape",s)}},t.prototype.createAnnotationObject=function(t){var e,i,n=this.pdfViewer.annotation.createGUID(),o=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("shape",t.pageIndex+1,t.shapeAnnotationType);o&&(document.getElementById(o).id=n),t.annotName=n,t.wrapper.bounds?(e={left:t.wrapper.bounds.x,top:t.wrapper.bounds.y,height:t.wrapper.bounds.height,width:t.wrapper.bounds.width,right:t.wrapper.bounds.right,bottom:t.wrapper.bounds.bottom},i=this.pdfViewer.annotationModule.inputElementModule.calculateLabelBounds(t.wrapper.bounds)):(e={left:0,top:0,height:0,width:0,right:0,bottom:0},i={left:0,top:0,height:0,width:0,right:0,bottom:0}),"Line"===t.subject&&"Polygon"===t.shapeAnnotationType?t.author=this.pdfViewer.annotationModule.updateAnnotationAuthor("shape","Polygon"):t.author=this.pdfViewer.annotationModule.updateAnnotationAuthor("shape",t.subject),this.pdfViewer.annotation.stickyNotesAnnotationModule.addTextToComments(n,t.notes);var s=parseInt(t.borderDashArray);s=isNaN(s)?0:s;var a=this.pdfViewer.annotationModule.findAnnotationSettings(t,!0);return t.isPrint=a.isPrint,{id:t.id,shapeAnnotationType:this.getShapeAnnotType(t.shapeAnnotationType),author:t.author,allowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(t),subject:t.subject,note:t.notes,strokeColor:t.strokeColor,annotName:n,comments:[],review:{state:"",stateModel:"",modifiedDate:this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),author:t.author},fillColor:t.fillColor,opacity:t.opacity,thickness:t.thickness,borderStyle:t.borderStyle,borderDashArray:s,bounds:e,modifiedDate:this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),rotateAngle:"RotateAngle"+t.rotateAngle,isCloudShape:t.isCloudShape,cloudIntensity:t.cloudIntensity,vertexPoints:t.vertexPoints,lineHeadStart:this.pdfViewer.annotation.getArrowTypeForCollection(t.sourceDecoraterShapes),lineHeadEnd:this.pdfViewer.annotation.getArrowTypeForCollection(t.taregetDecoraterShapes),rectangleDifference:[],isLocked:a.isLock,labelContent:t.labelContent,enableShapeLabel:t.enableShapeLabel,labelFillColor:t.labelFillColor,fontColor:t.fontColor,labelBorderColor:t.labelBorderColor,fontSize:t.fontSize,labelBounds:i,annotationSelectorSettings:this.getSelector(t.shapeAnnotationType,t.subject),labelSettings:this.pdfViewer.shapeLabelSettings,annotationSettings:a,customData:this.pdfViewer.annotation.getShapeData(t.shapeAnnotationType,t.subject),isPrint:t.isPrint,isCommentLock:t.isCommentLock}},t.prototype.getSelector=function(t,e){var i=this.pdfViewer.annotationSelectorSettings;return"Line"===t&&"Arrow"!==e&&this.pdfViewer.lineSettings.annotationSelectorSettings?i=this.pdfViewer.lineSettings.annotationSelectorSettings:"LineWidthArrowHead"!==t&&"Arrow"!==e||!this.pdfViewer.lineSettings.annotationSelectorSettings?"Rectangle"!==t&&"Square"!==t||!this.pdfViewer.rectangleSettings.annotationSelectorSettings?"Ellipse"!==t&&"Circle"!==t||!this.pdfViewer.circleSettings.annotationSelectorSettings?"Polygon"===t&&this.pdfViewer.polygonSettings.annotationSelectorSettings&&(i=this.pdfViewer.polygonSettings.annotationSelectorSettings):i=this.pdfViewer.circleSettings.annotationSelectorSettings:i=this.pdfViewer.rectangleSettings.annotationSelectorSettings:i=this.pdfViewer.arrowSettings.annotationSelectorSettings,i},t.prototype.getAnnotations=function(t,e){var i,n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_shape");if(this.pdfViewerBase.isStorageExceed&&(n=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_shape"]),n){var o=JSON.parse(n),s=this.pdfViewer.annotationModule.getPageCollection(o,t);i=o[s]?o[s].annotations:e}else i=e;return i},t.prototype.getRgbCode=function(t){t.match(/#([a-z0-9]+)/gi)||t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(t=this.pdfViewer.annotationModule.nameToHash(t));var i=t.split(",");return e.isNullOrUndefined(i[1])&&(i=(t=this.pdfViewer.annotationModule.getValue(t,"rgba")).split(",")),{r:parseInt(i[0].split("(")[1]),g:parseInt(i[1]),b:parseInt(i[2]),a:parseInt(i[3])}},t.prototype.saveImportedShapeAnnotations=function(t,e){var i=null,n=null;if(t.Author=this.pdfViewer.annotationModule.updateAnnotationAuthor("shape",t.Subject),t.VertexPoints){n=[];for(var o=0;o0?i.pdfViewer.customStampSettings.width:100,l=i.pdfViewer.customStampSettings.height>0?i.pdfViewer.customStampSettings.height:100,u=0,M=0,L={width:r,height:l,left:u=i.pdfViewer.customStampSettings.left>0&&i.pdfViewer.customStampSettings.left0&&i.pdfViewer.customStampSettings.top0&&this.pdfViewer.customStampSettings.top>0,C=this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.customStampSettings),j=this.pdfViewer.stampSettings.allowedInteractions?this.pdfViewer.stampSettings.allowedInteractions:this.pdfViewer.annotationSettings.allowedInteractions;l?(d=u.AnnotName,w=u.Author,h=u.IsCommentLock,C=u.AnnotationSettings?u.AnnotationSettings:this.pdfViewer.annotationModule.updateSettings(this.pdfViewer.customStampSettings),j=u.AllowedInteractions?u.AllowedInteractions:this.pdfViewer.annotationModule.updateAnnotationAllowedInteractions(u),null===w&&(w="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.customStampSettings.author?this.pdfViewer.customStampSettings.author:"Guest")):(d=this.pdfViewer.annotation.createGUID(),w="Guest"!==this.pdfViewer.annotationSettings.author?this.pdfViewer.annotationSettings.author:this.pdfViewer.customStampSettings.author?this.pdfViewer.customStampSettings.author:"Guest",h=!1),o||(o=u.ModifiedDate?u.ModifiedDate:(new Date).toLocaleString());var g=u?u.annotationAddMode:"UI Drawn Annotation ",y=!0;y=l?"Imported Annotation"===u.annotationAddMode?u.IsPrint:u.AnnotationSettings.isPrint:this.pdfViewer.customStampSettings.isPrint,L={id:"stamp"+this.pdfViewerBase.customStampCount,allowedInteractions:j,bounds:{x:t.left,y:t.top,width:t.width,height:t.height},pageIndex:e,data:i.src,modifiedDate:o,shapeAnnotationType:"Image",opacity:a,rotateAngle:s,annotName:d,comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:w},annotationSettings:C,annotationAddMode:g,signatureName:M,isPrint:y,isCommentLock:h},this.currentStampAnnotation=L;var A=this.pdfViewer.stampSettings.annotationSelectorSettings?this.pdfViewer.stampSettings.annotationSelectorSettings:this.pdfViewer.annotationSelectorSettings;if(l||c){if(!u){this.isStampAnnotSelected=!1,(u=L).Note="",u.State="",u.StateModel="";var S=this.pdfViewer.annotation.stickyNotesAnnotationModule.addComments("stamp",e+1);S&&(document.getElementById(S).id=d)}p={stampAnnotationType:"image",author:w,allowedInteractions:j,modifiedDate:o,subject:"",note:u.Note,strokeColor:"",fillColor:"",opacity:a,rotateAngle:"0",creationDate:n,pageNumber:e,icon:"",stampAnnotationPath:i.src,randomId:"stamp"+this.pdfViewerBase.customStampCount,bounds:{left:t.left,top:t.top,width:t.width,height:t.height},stampFillcolor:"",isDynamicStamp:!1,annotName:d,comments:this.pdfViewer.annotationModule.getAnnotationComments(u.Comments,u,u.Author),review:{state:u.State,stateModel:u.StateModel,author:w,modifiedDate:o},shapeAnnotationType:"stamp",annotationSelectorSettings:A,annotationSettings:C,customData:this.pdfViewer.annotation.getCustomData(u),isPrint:y,isCommentLock:h,isMaskedImage:u.IsMaskedImage},this.storeStampInSession(e,p),L.comments=this.pdfViewer.annotationModule.getAnnotationComments(u.Comments,u,u.Author),L.review={state:u.State,stateModel:u.StateModel,author:w,modifiedDate:o},this.pdfViewer.add(L),r=void 0!=r&&null!=r?r:document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+e),this.pdfViewer.renderDrawing(r,e),this.pdfViewerBase.stampAdded&&this.pdfViewer.annotation.addAction(e,null,L,"Addition","",L,L)}this.pdfViewerBase.customStampCount+=1},t.prototype.retrieveDynamicStampAnnotation=function(t){var e;if(t){switch(t.trim()){case"Revised":e={iconName:"Revised",pathdata:"M19.68,21.22a3.94,3.94,0,0,1-1.1-1.9L16,11.87l-.21-.64a20.77,20.77,0,0,0,2.11-.58,7.24,7.24,0,0,0,2-1.09,5.65,5.65,0,0,0,1.72-2.12,5.4,5.4,0,0,0,.52-2.2A4.15,4.15,0,0,0,19.1,1.05a14.58,14.58,0,0,0-4.72-.6H5.31v.86a7,7,0,0,1,2,.33c.3.14.45.48.45,1a6.1,6.1,0,0,1-.14,1.08l-.21.8L3.31,19.32a3.35,3.35,0,0,1-.94,1.78,3.58,3.58,0,0,1-1.74.57v.86h9.83v-.86a6.22,6.22,0,0,1-2-.35c-.29-.15-.43-.52-.43-1.11,0-.1,0-.21,0-.31a2.36,2.36,0,0,1,0-.28l.28-1.14,1.95-6.86h.93l3.56,10.91h6.25v-.88A3.05,3.05,0,0,1,19.68,21.22ZM13.29,10.31a14,14,0,0,1-2.63.23l2-7.56a2.67,2.67,0,0,1,.52-1.17,1.4,1.4,0,0,1,1-.3,2.74,2.74,0,0,1,2.33.91,3.72,3.72,0,0,1,.69,2.3,6.4,6.4,0,0,1-.49,2.52,6.72,6.72,0,0,1-1.06,1.82A4.11,4.11,0,0,1,13.29,10.31ZM26,.45H43.74l-1.4,6.27-.88-.15a6,6,0,0,0-.78-3.4c-.84-1.12-2.54-1.69-5.11-1.69a2.9,2.9,0,0,0-1.68.32A2.34,2.34,0,0,0,33.26,3l-1.95,7.33a13.55,13.55,0,0,0,4.48-.56c.68-.32,1.44-1.3,2.27-2.92l.91.11-2.44,9-.91-.16a7.27,7.27,0,0,0,.09-.82q0-.35,0-.57a2.69,2.69,0,0,0-1-2.4A7.57,7.57,0,0,0,31,11.38l-2.17,8c0,.2-.09.38-.12.57a2.62,2.62,0,0,0,0,.43.92.92,0,0,0,.35.74,2.54,2.54,0,0,0,1.49.29,13.84,13.84,0,0,0,5.11-.84A9.85,9.85,0,0,0,40.73,16l.81.14-1.95,6.42h-18v-.9a3.43,3.43,0,0,0,1.42-.53A3.42,3.42,0,0,0,24,19.32L28,4.51c.1-.37.18-.72.25-1a4.23,4.23,0,0,0,.09-.78c0-.56-.15-.91-.44-1.06a6.85,6.85,0,0,0-2-.34ZM63.4,3.37,51,23.15H49.9L47.39,6.34a17.25,17.25,0,0,0-.93-4.24c-.25-.43-.93-.7-2.05-.79V.45h9.86v.86a5.47,5.47,0,0,0-1.72.19,1.14,1.14,0,0,0-.81,1.16,3,3,0,0,0,0,.31l0,.32L53.5,16.43l6.24-9.85c.49-.79.94-1.57,1.33-2.36a4.45,4.45,0,0,0,.6-1.85.88.88,0,0,0-.61-.9,6.11,6.11,0,0,0-1.52-.16V.45h6.34v.86a3.88,3.88,0,0,0-1.16.5A5.73,5.73,0,0,0,63.4,3.37ZM70.08,20c0,.11,0,.22,0,.31,0,.56.15.91.45,1.06a6.39,6.39,0,0,0,1.95.35v.86H62.63v-.86a3.58,3.58,0,0,0,1.74-.57,3.35,3.35,0,0,0,.94-1.78l4-14.81q.18-.63.27-1a3.78,3.78,0,0,0,.09-.75c0-.56-.16-.91-.47-1.06a7,7,0,0,0-2-.34V.45h9.83v.86a3.61,3.61,0,0,0-1.75.58,3.37,3.37,0,0,0-.91,1.78L70.4,18.48l-.26,1.14Zm19.26-7.23a6.37,6.37,0,0,1,1.07,3.62,6.58,6.58,0,0,1-2.06,4.71,7.54,7.54,0,0,1-5.65,2.1A10.15,10.15,0,0,1,80.89,23a11.42,11.42,0,0,1-1.8-.49l-.83-.3-.58-.2a2,2,0,0,0-.38,0,1,1,0,0,0-.78.26,3.89,3.89,0,0,0-.52.92H75l1.19-7.4,1,.07a14.63,14.63,0,0,0,.28,2.3,5.27,5.27,0,0,0,2.79,3.44,4.73,4.73,0,0,0,2.06.44,3.85,3.85,0,0,0,3.07-1.26,4.39,4.39,0,0,0,1.09-2.94q0-2.09-4.05-5.25c-2.7-2.22-4-4.26-4-6.14a6.31,6.31,0,0,1,1.78-4.53,6.51,6.51,0,0,1,5-1.87,9.67,9.67,0,0,1,1.82.18A6.54,6.54,0,0,1,88,.45l.84.28.56.13a2.59,2.59,0,0,0,.52.06,1.4,1.4,0,0,0,.88-.24,2.2,2.2,0,0,0,.53-.6h1L91,6.69l-.85-.12L90,5.49a6,6,0,0,0-1-2.62,3.82,3.82,0,0,0-3.38-1.73A3,3,0,0,0,82.9,2.53a3.6,3.6,0,0,0-.58,2,3.44,3.44,0,0,0,.59,2,6,6,0,0,0,1,1l2.85,2.33A12.75,12.75,0,0,1,89.34,12.72ZM110.27,16l.81.14-2,6.42H90.85v-.86a3.66,3.66,0,0,0,1.74-.57,3.42,3.42,0,0,0,.93-1.78l4-14.81c.1-.37.18-.72.25-1a4.23,4.23,0,0,0,.09-.78c0-.56-.14-.91-.44-1.06a6.85,6.85,0,0,0-2-.34V.45h17.77l-1.4,6.27L111,6.57a6,6,0,0,0-.78-3.4c-.84-1.12-2.54-1.69-5.1-1.69a2.92,2.92,0,0,0-1.69.32A2.34,2.34,0,0,0,102.8,3l-2,7.33a13.55,13.55,0,0,0,4.48-.56c.69-.32,1.44-1.3,2.27-2.92l.92.11-2.45,9-.91-.16a7.27,7.27,0,0,0,.09-.82q0-.35,0-.57a2.69,2.69,0,0,0-1-2.4,7.57,7.57,0,0,0-3.79-.64l-2.17,8c0,.2-.09.38-.12.57a2.62,2.62,0,0,0,0,.43.92.92,0,0,0,.35.74,2.54,2.54,0,0,0,1.49.29,13.84,13.84,0,0,0,5.11-.84A9.81,9.81,0,0,0,110.27,16Zm22.65-13Q130.39.45,125.52.45h-9.58v.86a7,7,0,0,1,2,.34c.31.15.47.5.47,1.06a3.61,3.61,0,0,1-.09.74c-.06.29-.15.64-.26,1.06L114,19.31a3.18,3.18,0,0,1-1.15,1.91,3.57,3.57,0,0,1-1.53.45v.86h9.47a14.87,14.87,0,0,0,10.95-4.14,12,12,0,0,0,3.75-8.77A8.94,8.94,0,0,0,132.92,2.94ZM129,15.36q-2.62,6.06-8.52,6.05a2.46,2.46,0,0,1-1.42-.29,1.05,1.05,0,0,1-.4-.93,2.24,2.24,0,0,1,0-.34,2.65,2.65,0,0,1,.08-.43l4.55-16.67a2,2,0,0,1,.54-.92,2.2,2.2,0,0,1,1.44-.35,4.74,4.74,0,0,1,4.47,2.22,7.9,7.9,0,0,1,.83,3.9A19.32,19.32,0,0,1,129,15.36Z",opacity:1,strokeColor:"",fillColor:"#192760",width:127.47,height:55.84601,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Reviewed":e={iconName:"Reviewed",pathdata:"M17.37,18.25a3.47,3.47,0,0,1-1-1.67L14.17,10c0-.07-.1-.26-.19-.56A14.71,14.71,0,0,0,15.83,9a6.08,6.08,0,0,0,1.76-1A4.92,4.92,0,0,0,19.1,6.14a4.71,4.71,0,0,0,.46-1.93A3.65,3.65,0,0,0,16.86.52,12.83,12.83,0,0,0,12.72,0h-8V.75a6.62,6.62,0,0,1,1.72.3c.26.12.39.41.39.88a4.56,4.56,0,0,1-.13.94c0,.2-.1.44-.17.7L3,16.58a2.87,2.87,0,0,1-.82,1.56,3.15,3.15,0,0,1-1.53.51v.75H9.27v-.75a5.88,5.88,0,0,1-1.74-.31c-.25-.13-.37-.46-.37-1a2.53,2.53,0,0,1,0-.28,1.44,1.44,0,0,1,0-.24l.24-1,1.71-6H10l3.13,9.59h5.49v-.77A2.71,2.71,0,0,1,17.37,18.25ZM11.75,8.67a12.06,12.06,0,0,1-2.3.19L11.2,2.22a2.2,2.2,0,0,1,.46-1,1.19,1.19,0,0,1,.87-.27,2.41,2.41,0,0,1,2.05.8,3.29,3.29,0,0,1,.6,2A5.63,5.63,0,0,1,14.75,6a6.06,6.06,0,0,1-.93,1.59A3.65,3.65,0,0,1,11.75,8.67ZM22.9,0H38.52L37.29,5.51l-.78-.13a5.34,5.34,0,0,0-.68-3c-.74-1-2.24-1.48-4.49-1.48a2.68,2.68,0,0,0-1.49.27,2.09,2.09,0,0,0-.54,1L27.59,8.67a12.08,12.08,0,0,0,3.94-.5,5.69,5.69,0,0,0,2-2.56l.81.1-2.16,7.93-.79-.15c0-.27.06-.51.08-.71s0-.37,0-.5a2.34,2.34,0,0,0-.85-2.11A6.61,6.61,0,0,0,27.3,9.6l-1.91,7.08a4.91,4.91,0,0,0-.1.5,2,2,0,0,0,0,.38.83.83,0,0,0,.31.65,2.29,2.29,0,0,0,1.31.25,12.21,12.21,0,0,0,4.49-.73,8.69,8.69,0,0,0,4.51-4.09l.71.12L34.86,19.4H19.05v-.79a2.88,2.88,0,0,0,1.28-.47,2.94,2.94,0,0,0,.82-1.56l3.56-13q.13-.49.21-.9A3.26,3.26,0,0,0,25,2q0-.73-.39-.93A6.44,6.44,0,0,0,22.9.75ZM55.79,2.57,44.86,20h-.93L41.72,5.17a16.05,16.05,0,0,0-.81-3.73c-.22-.37-.82-.6-1.81-.69V0h8.67V.75a5,5,0,0,0-1.52.17,1,1,0,0,0-.7,1,2.53,2.53,0,0,0,0,.28l0,.27L47.09,14l5.48-8.66C53,4.69,53.4,4,53.75,3.32a4,4,0,0,0,.52-1.63.78.78,0,0,0-.54-.8A5.88,5.88,0,0,0,52.4.75V0H58V.75a3.55,3.55,0,0,0-1,.44A5.18,5.18,0,0,0,55.79,2.57ZM62,18.34a6,6,0,0,0,1.71.31v.75H55.12v-.75a3.15,3.15,0,0,0,1.53-.51,2.94,2.94,0,0,0,.82-1.56L61,3.57c.1-.37.18-.68.23-.93A2.81,2.81,0,0,0,61.34,2c0-.49-.13-.8-.41-.93a6.61,6.61,0,0,0-1.71-.3V0h8.63V.75a3.17,3.17,0,0,0-1.53.51,3,3,0,0,0-.8,1.57l-3.58,13-.22,1a2.74,2.74,0,0,0,0,.28,1.41,1.41,0,0,0,0,.28C61.64,17.9,61.78,18.21,62,18.34ZM69.13,0H84.75L83.52,5.51l-.78-.13a5.34,5.34,0,0,0-.68-3c-.74-1-2.24-1.48-4.49-1.48a2.68,2.68,0,0,0-1.49.27,2.09,2.09,0,0,0-.54,1L73.82,8.67a12.08,12.08,0,0,0,3.94-.5,5.69,5.69,0,0,0,2-2.56l.81.1L78.4,13.64l-.79-.15c0-.27.07-.51.08-.71s0-.37,0-.5a2.34,2.34,0,0,0-.85-2.11,6.61,6.61,0,0,0-3.33-.57l-1.91,7.08a4.91,4.91,0,0,0-.1.5,2,2,0,0,0,0,.38.83.83,0,0,0,.31.65,2.29,2.29,0,0,0,1.31.25,12.21,12.21,0,0,0,4.49-.73,8.69,8.69,0,0,0,4.51-4.09l.71.12L81.1,19.4H65v-.75a3.15,3.15,0,0,0,1.53-.51,2.94,2.94,0,0,0,.82-1.56l3.56-13q.14-.49.21-.9A3.26,3.26,0,0,0,71.24,2q0-.73-.39-.93a6.44,6.44,0,0,0-1.72-.3Zm39.15,2.83L100,20h-.84L97.41,5.85,90.67,20h-.84L87.58,3.13A3.83,3.83,0,0,0,87,1.23,2.84,2.84,0,0,0,85.33.71V0h8.06V.75A2.55,2.55,0,0,0,92.27,1a1.33,1.33,0,0,0-.66,1.31c0,.06,0,.13,0,.19s0,.15,0,.26l1.15,10.16,4.32-9a1,1,0,0,0,0-.27,3.33,3.33,0,0,0-.64-2.38A2.5,2.5,0,0,0,95.06.71V0h7.78V.71a2.9,2.9,0,0,0-1.4.34c-.27.19-.41.6-.41,1.24,0,.13,0,.32,0,.55,0,.4.08.88.14,1.47l1,8.47,4.51-9.42a7.12,7.12,0,0,0,.29-.74,2.48,2.48,0,0,0,.14-.79.9.9,0,0,0-.48-.93,3.25,3.25,0,0,0-1.34-.19V0h5.41V.71a2.34,2.34,0,0,0-1.1.35A4.56,4.56,0,0,0,108.28,2.83Zm16.45,10.81.71.12-1.71,5.64H107.66v-.75a3.15,3.15,0,0,0,1.53-.51,2.87,2.87,0,0,0,.82-1.56l3.57-13q.12-.49.21-.9a3.17,3.17,0,0,0,.08-.69q0-.73-.39-.93a6.44,6.44,0,0,0-1.72-.3V0h15.62l-1.23,5.51-.78-.13a5.26,5.26,0,0,0-.68-3C124,1.4,122.46.91,120.2.91a2.64,2.64,0,0,0-1.48.27,2.09,2.09,0,0,0-.55,1l-1.72,6.45a12,12,0,0,0,3.94-.5,5.62,5.62,0,0,0,2-2.56l.81.1L121,13.64l-.79-.15c0-.27.06-.51.07-.71s0-.37,0-.5a2.34,2.34,0,0,0-.86-2.11,6.57,6.57,0,0,0-3.32-.57l-1.91,7.08a5,5,0,0,0-.11.5,3.14,3.14,0,0,0,0,.38.8.8,0,0,0,.31.65,2.25,2.25,0,0,0,1.3.25,12.26,12.26,0,0,0,4.5-.73A8.67,8.67,0,0,0,124.73,13.64ZM144.64,2.19Q142.41,0,138.14,0h-8.42V.75a6.61,6.61,0,0,1,1.71.3c.28.13.41.44.41.93a2.81,2.81,0,0,1-.08.66c0,.25-.12.56-.23.93l-3.56,13a2.78,2.78,0,0,1-1,1.68,3.44,3.44,0,0,1-1.35.4v.75h8.32a13.06,13.06,0,0,0,9.63-3.64,10.49,10.49,0,0,0,3.3-7.7A7.87,7.87,0,0,0,144.64,2.19ZM141.2,13.1q-2.31,5.32-7.48,5.32a2.27,2.27,0,0,1-1.26-.25,1,1,0,0,1-.34-.82,1.62,1.62,0,0,1,0-.3,2.16,2.16,0,0,1,.08-.38l4-14.65a1.63,1.63,0,0,1,.47-.81A2,2,0,0,1,138,.91a4.16,4.16,0,0,1,3.93,1.95,7,7,0,0,1,.72,3.42A16.82,16.82,0,0,1,141.2,13.1Z",opacity:1,strokeColor:"",fillColor:"#192760",width:127.70402,height:55.84601,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Received":e={iconName:"Received",pathdata:"M18.17,8.76a5,5,0,0,0,1.57-1.93,5,5,0,0,0,.47-2A3.76,3.76,0,0,0,17.42,1,13,13,0,0,0,13.13.48H4.89v.78a6.49,6.49,0,0,1,1.77.31c.27.12.41.43.41.91a5.87,5.87,0,0,1-.13,1c-.05.2-.12.44-.19.72L3.06,17.64a3,3,0,0,1-.84,1.61,3.36,3.36,0,0,1-1.59.53v.77H9.57v-.77a6.17,6.17,0,0,1-1.8-.32c-.26-.14-.39-.48-.39-1a2.46,2.46,0,0,1,0-.28,1.78,1.78,0,0,1,0-.26l.25-1,1.78-6.25h.84l3.24,9.92h5.66v-.8A2.76,2.76,0,0,1,18,19.36a3.57,3.57,0,0,1-1-1.72l-2.31-6.78c0-.07-.09-.27-.19-.58.87-.2,1.51-.38,1.92-.52A6.56,6.56,0,0,0,18.17,8.76Zm-2.93-2.1a6.19,6.19,0,0,1-1,1.65,3.85,3.85,0,0,1-2.14,1.14,12.92,12.92,0,0,1-2.39.2l1.81-6.87A2.5,2.5,0,0,1,12,1.72a1.27,1.27,0,0,1,.9-.27,2.5,2.5,0,0,1,2.12.83,3.35,3.35,0,0,1,.62,2.09A5.81,5.81,0,0,1,15.24,6.66ZM30.3,2.78,28.52,9.45a12.53,12.53,0,0,0,4.08-.51,5.91,5.91,0,0,0,2-2.66l.84.11-2.23,8.2-.82-.15c0-.28.07-.53.08-.74a5.17,5.17,0,0,0,0-.52A2.43,2.43,0,0,0,31.66,11a6.87,6.87,0,0,0-3.44-.58l-2,7.32a3.61,3.61,0,0,0-.11.51,2.31,2.31,0,0,0,0,.4.83.83,0,0,0,.32.67,2.32,2.32,0,0,0,1.35.26,12.58,12.58,0,0,0,4.65-.76,9,9,0,0,0,4.67-4.23l.73.13-1.77,5.83H19.8v-.83A2.83,2.83,0,0,0,21,19.25a3.09,3.09,0,0,0,.85-1.61L25.54,4.17c.09-.34.16-.65.22-.93a3.35,3.35,0,0,0,.09-.71c0-.5-.13-.82-.4-1a6.34,6.34,0,0,0-1.78-.31V.48H39.82l-1.27,5.7-.81-.13A5.44,5.44,0,0,0,37,3Q35.9,1.42,32.4,1.42a2.69,2.69,0,0,0-1.54.29A2.08,2.08,0,0,0,30.3,2.78ZM56.56,6.1c0-.07,0-.18,0-.33a4.89,4.89,0,0,0-1.12-3.53,3.75,3.75,0,0,0-2.82-1.16c-2.33,0-4.35,1.55-6.07,4.63a17.09,17.09,0,0,0-2.31,8.43c0,2.08.47,3.5,1.43,4.27a4.89,4.89,0,0,0,3.11,1.15,6.84,6.84,0,0,0,4.14-1.45A11.51,11.51,0,0,0,55,16l.91.66A10.08,10.08,0,0,1,52.26,20a9.33,9.33,0,0,1-4.34,1.11A8.56,8.56,0,0,1,42,19a7.25,7.25,0,0,1-2.35-5.67A13.53,13.53,0,0,1,43.22,4a11.19,11.19,0,0,1,8.56-4A12.34,12.34,0,0,1,55,.44,13.17,13.17,0,0,0,56.9.88a1,1,0,0,0,.71-.24A2.94,2.94,0,0,0,58.06,0H59L57.45,7l-.94-.18C56.54,6.42,56.55,6.17,56.56,6.1Zm18,8.49.74.13-1.78,5.83H56.87v-.77a3.31,3.31,0,0,0,1.58-.53,3.09,3.09,0,0,0,.85-1.61L63,4.17c.09-.34.16-.65.22-.93a3.35,3.35,0,0,0,.09-.71c0-.5-.14-.82-.4-1a6.34,6.34,0,0,0-1.78-.31V.48H77.26L76,6.18l-.81-.13A5.44,5.44,0,0,0,74.48,3q-1.14-1.54-4.64-1.54a2.69,2.69,0,0,0-1.54.29,2.08,2.08,0,0,0-.56,1.07L66,9.45A12.53,12.53,0,0,0,70,8.94a5.91,5.91,0,0,0,2-2.66l.84.11-2.23,8.2-.82-.15c0-.28.07-.53.08-.74a5.17,5.17,0,0,0,0-.52A2.43,2.43,0,0,0,69.1,11a6.87,6.87,0,0,0-3.44-.58l-2,7.32a3.61,3.61,0,0,0-.11.51,2.31,2.31,0,0,0,0,.4.83.83,0,0,0,.32.67,2.32,2.32,0,0,0,1.35.26,12.58,12.58,0,0,0,4.65-.76A8.91,8.91,0,0,0,74.52,14.59Zm31-11.45-11.31,18h-1L91,5.83A16.56,16.56,0,0,0,90.12,2c-.2-.34-.71-.56-1.51-.67a3,3,0,0,0-1.31.48,3.08,3.08,0,0,0-.82,1.62l-3.7,13.47-.24,1c0,.1,0,.2-.05.3s0,.2,0,.28c0,.51.14.83.41,1a6.21,6.21,0,0,0,1.77.32v.77H75.72v-.77a3.31,3.31,0,0,0,1.58-.53,3.09,3.09,0,0,0,.85-1.61L81.83,4.17c.11-.38.19-.7.25-.95a3.75,3.75,0,0,0,.08-.69c0-.5-.15-.82-.43-1A6.49,6.49,0,0,0,80,1.26V.48H97.22v.78a4.92,4.92,0,0,0-1.57.18,1,1,0,0,0-.73,1.05,2.81,2.81,0,0,0,0,.29l0,.28,1.56,12,5.67-9a24.21,24.21,0,0,0,1.21-2.14,4.07,4.07,0,0,0,.54-1.68.79.79,0,0,0-.55-.82A5.69,5.69,0,0,0,102,1.26V.48h5.76v.78a3.5,3.5,0,0,0-1,.46A5.16,5.16,0,0,0,105.52,3.14Zm16.83,11.45.73.13-1.77,5.83H104.69v-.77a3.31,3.31,0,0,0,1.58-.53,3,3,0,0,0,.85-1.61l3.69-13.47c.08-.34.16-.65.22-.93a4,4,0,0,0,.08-.71c0-.5-.13-.82-.4-1a6.34,6.34,0,0,0-1.78-.31V.48h16.16l-1.28,5.7-.8-.13A5.43,5.43,0,0,0,122.3,3q-1.14-1.54-4.64-1.54a2.67,2.67,0,0,0-1.53.29,2.16,2.16,0,0,0-.57,1.07l-1.78,6.67a12.53,12.53,0,0,0,4.08-.51,5.91,5.91,0,0,0,2.06-2.66l.83.11-2.22,8.2-.82-.15c0-.28.06-.53.08-.74s0-.38,0-.52a2.45,2.45,0,0,0-.88-2.18,6.9,6.9,0,0,0-3.44-.58l-2,7.32c-.05.18-.08.35-.11.51a3.58,3.58,0,0,0,0,.4.81.81,0,0,0,.32.67,2.28,2.28,0,0,0,1.35.26,12.62,12.62,0,0,0,4.65-.76A9,9,0,0,0,122.35,14.59ZM142.94,2.75Q140.63.48,136.21.48h-8.7v.78a6.66,6.66,0,0,1,1.77.31q.42.21.42,1a2.91,2.91,0,0,1-.08.68q-.08.39-.24,1L125.7,17.62a2.93,2.93,0,0,1-1,1.75,3.54,3.54,0,0,1-1.39.41v.77h8.61a13.5,13.5,0,0,0,10-3.76,10.84,10.84,0,0,0,3.41-8A8.14,8.14,0,0,0,142.94,2.75ZM139.38,14q-2.38,5.51-7.74,5.5a2.35,2.35,0,0,1-1.29-.26,1,1,0,0,1-.36-.85,1.78,1.78,0,0,1,0-.31,2.08,2.08,0,0,1,.08-.39l4.13-15.15a1.76,1.76,0,0,1,.49-.84A2,2,0,0,1,136,1.42a4.32,4.32,0,0,1,4.07,2A7.17,7.17,0,0,1,140.83,7,17.49,17.49,0,0,1,139.38,14Z",opacity:1,strokeColor:"",fillColor:"#192760",width:127.70402,height:55.84601,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Approved":e={iconName:"Approved",pathdata:"M19,20.22H10.55v-.71a4.26,4.26,0,0,0,1.79-.41,1.37,1.37,0,0,0,.53-1.29c0-.22,0-.75-.16-1.58,0-.17-.11-.89-.29-2.15H6.06l-1.72,3a4,4,0,0,0-.31.66,2,2,0,0,0-.14.69c0,.41.12.67.37.78a5.42,5.42,0,0,0,1.53.3v.71H0v-.71A4,4,0,0,0,1.21,19a5.68,5.68,0,0,0,1.28-1.56L13.45.07h.76L17,17a4.35,4.35,0,0,0,.7,2.08,2.4,2.4,0,0,0,1.31.44Zm-6.83-7.31L11.13,5.73,6.76,12.91Zm7.18,6.52a3,3,0,0,0,1.33-.49,3,3,0,0,0,.84-1.59L25.19,4.11c.07-.3.14-.6.2-.9a3.14,3.14,0,0,0,.1-.72,1,1,0,0,0-.58-1,5.68,5.68,0,0,0-1.57-.23V.48h8.47a9.68,9.68,0,0,1,3.57.57,4,4,0,0,1,2.71,4,4.93,4.93,0,0,1-2.2,4.22,9.53,9.53,0,0,1-5.69,1.58l-.85,0-1.71-.11L26,16.6l-.25,1a1,1,0,0,0-.05.3,2.83,2.83,0,0,0,0,.29c0,.5.14.81.4.94a6.31,6.31,0,0,0,1.76.31v.76H19.39Zm8.52-9.66.54.06h.48a5.81,5.81,0,0,0,2.3-.36,3.47,3.47,0,0,0,1.4-1.18,6.24,6.24,0,0,0,.86-2,8.94,8.94,0,0,0,.3-2,3.29,3.29,0,0,0-.58-2,2.3,2.3,0,0,0-2-.79,1.23,1.23,0,0,0-.93.28,2.71,2.71,0,0,0-.46,1Zm8,9.69a3.19,3.19,0,0,0,1.55-.52,3,3,0,0,0,.84-1.59L42,4.11c.07-.3.14-.6.2-.9a3.14,3.14,0,0,0,.1-.72,1,1,0,0,0-.58-1,5.68,5.68,0,0,0-1.57-.23V.48h8.47a9.68,9.68,0,0,1,3.57.57,4,4,0,0,1,2.71,4,4.93,4.93,0,0,1-2.2,4.22A9.53,9.53,0,0,1,47,10.87l-.85,0-1.71-.11L42.79,16.6l-.25,1a1.45,1.45,0,0,0,0,.3,2.83,2.83,0,0,0,0,.29c0,.5.14.81.4.94a6.31,6.31,0,0,0,1.76.31v.76h-8.7Zm8.74-9.69.54.06h.48A5.81,5.81,0,0,0,48,9.48a3.41,3.41,0,0,0,1.4-1.18,6.24,6.24,0,0,0,.86-2,9,9,0,0,0,.31-2,3.29,3.29,0,0,0-.59-2,2.3,2.3,0,0,0-2-.79,1.23,1.23,0,0,0-.93.28,2.88,2.88,0,0,0-.46,1Zm7.95,9.69a3.27,3.27,0,0,0,1.56-.52A3.06,3.06,0,0,0,55,17.35L58.64,4.11l.18-.71a4.72,4.72,0,0,0,.13-1c0-.47-.13-.77-.4-.9a6.74,6.74,0,0,0-1.74-.3V.48h8.11A13,13,0,0,1,69.14,1a3.7,3.7,0,0,1,2.74,3.75,4.8,4.8,0,0,1-.46,2,5,5,0,0,1-1.54,1.9,6.55,6.55,0,0,1-1.79,1,19.35,19.35,0,0,1-1.89.52c.1.3.16.49.2.57l2.27,6.66a3.49,3.49,0,0,0,1,1.7,3.08,3.08,0,0,0,1.6.41v.76H65.33l-3.19-9.76h-.83L59.57,16.6l-.25,1a1.87,1.87,0,0,0,0,.25,2.64,2.64,0,0,0,0,.28q0,.8.39,1a5.88,5.88,0,0,0,1.76.32v.76H52.62ZM63.94,9.3a3.79,3.79,0,0,0,2.11-1.13A6,6,0,0,0,67,6.55a5.84,5.84,0,0,0,.44-2.26,3.31,3.31,0,0,0-.61-2,2.47,2.47,0,0,0-2.09-.81,1.25,1.25,0,0,0-.88.26,2.34,2.34,0,0,0-.47,1.05L61.59,9.5A13.42,13.42,0,0,0,63.94,9.3ZM76.39,4.53Q80.26,0,85,0a7.34,7.34,0,0,1,5.23,1.92,6.76,6.76,0,0,1,2,5.19,13.9,13.9,0,0,1-3.62,9.07q-3.86,4.61-8.88,4.6a7.06,7.06,0,0,1-5.13-1.92,6.86,6.86,0,0,1-2-5.14A14,14,0,0,1,76.39,4.53ZM77.3,18a2.56,2.56,0,0,0,2.57,1.78A4.62,4.62,0,0,0,83,18.47,14.42,14.42,0,0,0,86,13.54a27.18,27.18,0,0,0,1.52-4.83,20.67,20.67,0,0,0,.54-4.11,4.38,4.38,0,0,0-.73-2.55A2.62,2.62,0,0,0,85,1q-3.68,0-6.19,6.54a24.29,24.29,0,0,0-1.9,8.26A5.91,5.91,0,0,0,77.3,18ZM102.23.48v.76a5.19,5.19,0,0,0-1.55.17,1,1,0,0,0-.72,1,2.46,2.46,0,0,0,0,.28L100,3l1.52,11.76L107.11,6c.44-.71.84-1.41,1.2-2.11a4.06,4.06,0,0,0,.53-1.66.79.79,0,0,0-.55-.81,6.11,6.11,0,0,0-1.35-.14V.48h5.67v.76a3.31,3.31,0,0,0-1,.45,5.33,5.33,0,0,0-1.18,1.4L99.26,20.78h-.94l-2.25-15A15.49,15.49,0,0,0,95.24,2c-.22-.39-.84-.62-1.83-.71V.48Zm7.35,19a3.19,3.19,0,0,0,1.55-.52,3,3,0,0,0,.84-1.59l3.62-13.24c.09-.34.16-.64.22-.92a3.27,3.27,0,0,0,.09-.7c0-.5-.14-.81-.4-.94a6.13,6.13,0,0,0-1.75-.31V.48h15.89l-1.25,5.6L127.6,6a5.32,5.32,0,0,0-.7-3q-1.12-1.52-4.56-1.51a2.61,2.61,0,0,0-1.51.28,2.12,2.12,0,0,0-.56,1.06L118.52,9.3a12.1,12.1,0,0,0,4-.51,5.8,5.8,0,0,0,2-2.61l.82.1-2.19,8.07-.81-.14c0-.28.07-.52.08-.73s0-.37,0-.51a2.4,2.4,0,0,0-.87-2.15,6.76,6.76,0,0,0-3.38-.57l-1.94,7.2a3.34,3.34,0,0,0-.11.51,3.67,3.67,0,0,0,0,.39.81.81,0,0,0,.32.66,2.3,2.3,0,0,0,1.33.26,12.39,12.39,0,0,0,4.57-.75A8.84,8.84,0,0,0,127,14.35l.72.13-1.74,5.74H109.58Zm18.27,0a3.27,3.27,0,0,0,1.37-.41,2.85,2.85,0,0,0,1-1.71l3.63-13.23c.1-.38.18-.69.23-1a3,3,0,0,0,.09-.67c0-.5-.15-.81-.42-.94A6.38,6.38,0,0,0,132,1.24V.48h8.57c2.9,0,5.1.74,6.62,2.22a8,8,0,0,1,2.26,6,10.72,10.72,0,0,1-3.35,7.84,13.3,13.3,0,0,1-9.8,3.7h-8.47ZM144.4,3.39a4.23,4.23,0,0,0-4-2,2,2,0,0,0-1.29.31,1.74,1.74,0,0,0-.48.83l-4.07,14.9a3.24,3.24,0,0,0-.07.39,1.69,1.69,0,0,0,0,.3,1,1,0,0,0,.36.84,2.27,2.27,0,0,0,1.27.26q5.26,0,7.62-5.42a17.25,17.25,0,0,0,1.43-6.94A7,7,0,0,0,144.4,3.39Z",opacity:1,strokeColor:"",fillColor:"#516c30",width:127.70402,height:55.84601,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"Confidential":e={iconName:"Confidential",pathdata:"M13.71,0,12.63,6.9,12,6.73c0-.41,0-.66,0-.73s0-.18,0-.32a6.16,6.16,0,0,0-.79-3.47,2.37,2.37,0,0,0-2-1.14c-1.64,0-3.07,1.51-4.29,4.55a22,22,0,0,0-1.64,8.29c0,2,.34,3.44,1,4.2A3,3,0,0,0,6.5,19.24a4.08,4.08,0,0,0,2.93-1.43,10.47,10.47,0,0,0,1.5-2.09l.64.65A8.84,8.84,0,0,1,9,19.72a5.24,5.24,0,0,1-3.08,1.09,5.16,5.16,0,0,1-4.21-2.08A8.68,8.68,0,0,1,0,13.16,16.5,16.5,0,0,1,2.55,3.92Q5.1,0,8.61,0a6.35,6.35,0,0,1,2.25.43,6.62,6.62,0,0,0,1.38.43.55.55,0,0,0,.5-.23A2.61,2.61,0,0,0,13.06,0ZM27.49,7.11a17.19,17.19,0,0,1-2.61,9.07q-2.77,4.61-6.39,4.6a4.42,4.42,0,0,1-3.7-1.92,8.47,8.47,0,0,1-1.43-5.14A17.31,17.31,0,0,1,16,4.53C17.88,1.51,20,0,22.25,0A4.53,4.53,0,0,1,26,1.92,8.27,8.27,0,0,1,27.49,7.11ZM24.42,4.6a5.71,5.71,0,0,0-.53-2.55A1.76,1.76,0,0,0,22.24,1q-2.65,0-4.45,6.54a31.93,31.93,0,0,0-1.37,8.26A8.15,8.15,0,0,0,16.67,18c.34,1.19,1,1.78,1.85,1.78a2.9,2.9,0,0,0,2.28-1.29,15.85,15.85,0,0,0,2.13-4.93A34.08,34.08,0,0,0,24,8.71,28.5,28.5,0,0,0,24.42,4.6ZM42.75,1.3l.3-.06V.48H38.69v.76a2.55,2.55,0,0,1,1.16.33,1.8,1.8,0,0,1,.51,1.48,10.11,10.11,0,0,1-.13,1.34c-.06.41-.14.87-.24,1.39l-1.65,8.34L33.73.48H29.45v.76a2.66,2.66,0,0,1,1,.24,1.88,1.88,0,0,1,.65,1.06l.09.3L28.81,15a20.72,20.72,0,0,1-1,3.61,1.61,1.61,0,0,1-1.19.9v.76h4.42v-.76a2.55,2.55,0,0,1-1.13-.32,1.67,1.67,0,0,1-.56-1.44,7.13,7.13,0,0,1,.05-.79c.06-.43.17-1.09.34-2L31.89,4.38l5.52,16.33h.52l3-15a22.58,22.58,0,0,1,.87-3.42A1.42,1.42,0,0,1,42.75,1.3ZM55.53.48H44.23v.76a3.63,3.63,0,0,1,1.26.3c.19.13.29.42.29.9a7.08,7.08,0,0,1-.09,1c0,.2-.08.44-.13.71L43,17.34a3.47,3.47,0,0,1-.59,1.58,1.91,1.91,0,0,1-1.13.54v.76h6.29v-.76a2.13,2.13,0,0,1-1-.19A1.23,1.23,0,0,1,46,18.1c0-.1,0-.21,0-.31s0-.23.05-.35l1.4-7.21a3.15,3.15,0,0,1,2.37.64A3.21,3.21,0,0,1,50.38,13c0,.11,0,.28,0,.49s0,.46-.06.75l.58.14,1.58-8.07-.59-.1a5.79,5.79,0,0,1-1.43,2.59,6.17,6.17,0,0,1-2.77.52l1.26-6.54a2.06,2.06,0,0,1,.42-1.08,1.39,1.39,0,0,1,1-.26c1.62,0,2.7.51,3.24,1.54a7.11,7.11,0,0,1,.49,3l.57.13Zm3.69,17.71c0-.08,0-.17,0-.27s0-.2,0-.3l.17-1L62.06,3.36a3.44,3.44,0,0,1,.59-1.6,2,2,0,0,1,1.12-.52V.48H57.44v.76a3.47,3.47,0,0,1,1.26.31c.2.13.3.44.3.94a4.25,4.25,0,0,1-.06.67c0,.26-.09.57-.17,1L56.16,17.35a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.12.52v.76h6.33v-.76a3.3,3.3,0,0,1-1.26-.32C59.32,19,59.22,18.69,59.22,18.19Zm18-9.51a13,13,0,0,1-2.42,7.84,8.31,8.31,0,0,1-7,3.7H61.6v-.76a2,2,0,0,0,1-.41,3.14,3.14,0,0,0,.73-1.71L65.93,4.11c.08-.38.13-.69.17-1a4.36,4.36,0,0,0,.06-.67c0-.5-.1-.81-.3-.94a3.47,3.47,0,0,0-1.26-.31V.48h6.17A5.52,5.52,0,0,1,75.53,2.7,9.91,9.91,0,0,1,77.17,8.68ZM74,6.87a9.22,9.22,0,0,0-.53-3.48,2.91,2.91,0,0,0-2.87-2,1.12,1.12,0,0,0-.93.31,1.81,1.81,0,0,0-.35.83l-2.93,14.9a3,3,0,0,0-.05.39c0,.11,0,.21,0,.3a1.17,1.17,0,0,0,.25.84,1.3,1.3,0,0,0,.92.26q3.8,0,5.49-5.42A23.26,23.26,0,0,0,74,6.87Zm11.3,11.65a6.72,6.72,0,0,1-3.29.75,1.3,1.3,0,0,1-1-.26,1,1,0,0,1-.23-.66,3.28,3.28,0,0,1,0-.39,4.88,4.88,0,0,1,.08-.51l1.4-7.2a3.73,3.73,0,0,1,2.43.57A2.87,2.87,0,0,1,85.43,13c0,.14,0,.31,0,.51s0,.45-.06.73l.59.14,1.57-8.07-.59-.1a5.79,5.79,0,0,1-1.46,2.61,6.5,6.5,0,0,1-2.89.51l1.26-6.56a2.41,2.41,0,0,1,.41-1.06c.16-.19.52-.28,1.08-.28,1.65,0,2.75.5,3.29,1.51a7,7,0,0,1,.5,3l.57.13.9-5.6H79.14v.76a3.35,3.35,0,0,1,1.26.31c.19.13.29.44.29.94a5,5,0,0,1-.07.7c0,.28-.09.58-.15.92L77.86,17.35a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.13.52v.76H87.91l1.25-5.74-.52-.13A7.69,7.69,0,0,1,85.34,18.52ZM105.8,1.24V.48h-4.37v.76a2.55,2.55,0,0,1,1.16.33,1.77,1.77,0,0,1,.52,1.48A10.58,10.58,0,0,1,103,4.39c-.06.41-.13.87-.23,1.39l-1.66,8.34L96.47.48H92.19v.76a2.61,2.61,0,0,1,1,.24,1.83,1.83,0,0,1,.65,1.06l.1.3L91.55,15a19,19,0,0,1-1,3.61,1.61,1.61,0,0,1-1.19.9v.76h4.42v-.76a2.59,2.59,0,0,1-1.13-.32,1.67,1.67,0,0,1-.56-1.44,7.13,7.13,0,0,1,0-.79c.06-.43.17-1.09.35-2L94.63,4.38l5.52,16.33h.53l2.95-15a22.93,22.93,0,0,1,.86-3.42,1.42,1.42,0,0,1,1-1Zm11.4,4.9L118,.48H106.28l-.82,5,.55.2a8,8,0,0,1,1.87-3.16,3.7,3.7,0,0,1,2.7-1.06l-3.12,15.85a2.94,2.94,0,0,1-.87,1.85,2.48,2.48,0,0,1-1.34.26v.76h7v-.76a4.24,4.24,0,0,1-1.43-.3c-.23-.13-.34-.45-.34-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.18-1,3-15.1a2.73,2.73,0,0,1,1.79.63c.75.7,1.13,2,1.17,3.94Zm3.57,12.05c0-.08,0-.17,0-.27s0-.2,0-.3l.17-1,2.62-13.24a3.44,3.44,0,0,1,.59-1.6,2,2,0,0,1,1.12-.52V.48H119v.76a3.47,3.47,0,0,1,1.26.31c.2.13.3.44.3.94a4.25,4.25,0,0,1-.06.67c0,.26-.09.57-.17,1l-2.61,13.24a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.12.52v.76h6.33v-.76a3.36,3.36,0,0,1-1.26-.32C120.87,19,120.77,18.69,120.77,18.19Zm28.86-3.71-1.24,5.74H130.3v-.71a2.48,2.48,0,0,0,1.3-.41,1.64,1.64,0,0,0,.37-1.29c0-.22,0-.75-.11-1.58,0-.17-.08-.89-.21-2.15h-4.58l-1.24,3a5.1,5.1,0,0,0-.22.66,2.45,2.45,0,0,0-.1.69c0,.41.09.67.26.78a3.05,3.05,0,0,0,1.11.3v.71h-4.17v-.71a2.66,2.66,0,0,0,.87-.53,5.79,5.79,0,0,0,.92-1.56L132.39.07h.55L135,17a5.53,5.53,0,0,0,.5,2.08,1.67,1.67,0,0,0,1.14.46v0a1.93,1.93,0,0,0,1.12-.52,3.52,3.52,0,0,0,.6-1.6l2.61-13.23c.08-.38.13-.69.17-1a4.36,4.36,0,0,0,.06-.67c0-.5-.1-.81-.3-.94a3.47,3.47,0,0,0-1.26-.31V.48h6.73v.76a3.23,3.23,0,0,0-1.49.48,3.06,3.06,0,0,0-.64,1.64l-2.77,14.08c0,.16-.05.3-.07.44s0,.29,0,.47a.79.79,0,0,0,.31.71,1.55,1.55,0,0,0,.87.21,6.83,6.83,0,0,0,3.79-1,8.42,8.42,0,0,0,2.81-3.88ZM131.5,12.91l-.78-7.18-3.14,7.18Z",opacity:1,strokeColor:"",fillColor:"#192760",width:127.70402,height:55.84601,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"NotApproved":case"Not Approved":e={iconName:"Not Approved",pathdata:"M0,19.46a1.56,1.56,0,0,0,1.16-.9A19.84,19.84,0,0,0,2.1,15L4.42,2.84l-.09-.3a1.82,1.82,0,0,0-.64-1.06,2.41,2.41,0,0,0-1-.24V.48H6.88l4.49,13.64L13,5.78c.09-.52.17-1,.22-1.39a10.11,10.11,0,0,0,.13-1.34,1.83,1.83,0,0,0-.49-1.48,2.49,2.49,0,0,0-1.13-.33V.48H16v.76l-.29.06a1.42,1.42,0,0,0-1,1,23.7,23.7,0,0,0-.84,3.42L11,20.71h-.51L5.1,4.38,3,15c-.17.87-.28,1.53-.33,2a5.32,5.32,0,0,0,0,.79,1.69,1.69,0,0,0,.54,1.44,2.48,2.48,0,0,0,1.1.32v.76H0ZM17.73,4.53C19.54,1.51,21.55,0,23.79,0a4.4,4.4,0,0,1,3.66,1.92,8.52,8.52,0,0,1,1.43,5.19,17.56,17.56,0,0,1-2.53,9.07q-2.7,4.61-6.21,4.6a4.24,4.24,0,0,1-3.6-1.92,8.6,8.6,0,0,1-1.39-5.14A17.68,17.68,0,0,1,17.73,4.53ZM18.37,18c.33,1.19.93,1.78,1.8,1.78a2.83,2.83,0,0,0,2.22-1.29,16.41,16.41,0,0,0,2.06-4.93,35.53,35.53,0,0,0,1.06-4.83A28.26,28.26,0,0,0,25.9,4.6a5.86,5.86,0,0,0-.52-2.55A1.7,1.7,0,0,0,23.78,1Q21.2,1,19.45,7.53a33,33,0,0,0-1.33,8.26A8.15,8.15,0,0,0,18.37,18Zm11.08,1.48a2.34,2.34,0,0,0,1.3-.26,3,3,0,0,0,.85-1.85l3-15.85A3.54,3.54,0,0,0,32,2.56a8,8,0,0,0-1.82,3.16l-.53-.2.8-5H41.81l-.74,5.66-.54-.07c0-1.92-.41-3.24-1.13-3.94a2.6,2.6,0,0,0-1.74-.63L34.79,16.6l-.17,1a2.43,2.43,0,0,0,0,.33,2.26,2.26,0,0,0,0,.26c0,.5.11.82.33.95a3.94,3.94,0,0,0,1.39.3v.76H29.45Zm26.65.76H50.18v-.71a2.28,2.28,0,0,0,1.25-.41,1.64,1.64,0,0,0,.37-1.29c0-.22,0-.75-.11-1.58,0-.17-.08-.89-.2-2.15H47l-1.2,3c-.08.2-.15.42-.22.66a2.84,2.84,0,0,0-.09.69c0,.41.08.67.25.78a2.91,2.91,0,0,0,1.08.3v.71H42.79v-.71a2.44,2.44,0,0,0,.85-.53,5.59,5.59,0,0,0,.9-1.56L52.21.07h.53l2,16.88A5.46,5.46,0,0,0,55.2,19a1.36,1.36,0,0,0,.9.43Zm-4.76-7.31-.76-7.18-3,7.18Zm4.95,6.53a1.82,1.82,0,0,0,1-.5,3.56,3.56,0,0,0,.58-1.59L60.42,4.11c.06-.3.1-.6.15-.9a5.46,5.46,0,0,0,.06-.72c0-.52-.13-.86-.4-1a2.88,2.88,0,0,0-1.1-.23V.48h5.93a5,5,0,0,1,2.5.57c1.26.73,1.9,2.07,1.9,4a5.81,5.81,0,0,1-1.54,4.22,5.32,5.32,0,0,1-4,1.58l-.59,0-1.2-.11L61,16.6l-.17,1a2.72,2.72,0,0,0,0,.3,2.81,2.81,0,0,0,0,.29c0,.5.09.81.28.94a3.26,3.26,0,0,0,1.23.31v.76h-6Zm6-9.67.38.06H63a3,3,0,0,0,1.62-.36,2.87,2.87,0,0,0,1-1.18,7.28,7.28,0,0,0,.6-2,11.67,11.67,0,0,0,.22-2,4.4,4.4,0,0,0-.41-2,1.44,1.44,0,0,0-1.39-.79.71.71,0,0,0-.65.28,3.7,3.7,0,0,0-.32,1Zm5.61,9.69A1.86,1.86,0,0,0,69,18.94a3.54,3.54,0,0,0,.59-1.59L72.15,4.11q.09-.45.15-.9a5.73,5.73,0,0,0,.07-.72,1.1,1.1,0,0,0-.41-1,2.88,2.88,0,0,0-1.1-.23V.48h5.93a5,5,0,0,1,2.5.57c1.27.73,1.9,2.07,1.9,4a5.77,5.77,0,0,1-1.54,4.22,5.31,5.31,0,0,1-4,1.58l-.6,0-1.2-.11L72.74,16.6l-.17,1a2.72,2.72,0,0,0,0,.3c0,.1,0,.19,0,.29,0,.5.1.81.29.94a3.15,3.15,0,0,0,1.23.31v.76h-6.1Zm6.12-9.69.38.06h.33a3,3,0,0,0,1.62-.36,3,3,0,0,0,1-1.18,7.67,7.67,0,0,0,.59-2,11.67,11.67,0,0,0,.22-2,4.4,4.4,0,0,0-.41-2,1.43,1.43,0,0,0-1.38-.79.73.73,0,0,0-.66.28,3.7,3.7,0,0,0-.32,1Zm5.57,9.69a1.9,1.9,0,0,0,1.09-.52,3.56,3.56,0,0,0,.58-1.59L83.84,4.11c0-.27.09-.51.13-.71a7.08,7.08,0,0,0,.09-1c0-.47-.1-.77-.28-.9a3.53,3.53,0,0,0-1.22-.3V.48h5.68a6.57,6.57,0,0,1,3,.53q1.92,1,1.92,3.75a6.79,6.79,0,0,1-.32,2,5.23,5.23,0,0,1-1.08,1.9,4.56,4.56,0,0,1-1.25,1,11.62,11.62,0,0,1-1.33.52c.07.3.12.49.14.57l1.59,6.66a4.07,4.07,0,0,0,.69,1.7,1.72,1.72,0,0,0,1.13.41v.76H88.52l-2.23-9.76h-.58L84.49,16.6l-.17,1a1,1,0,0,0,0,.25,2.62,2.62,0,0,0,0,.28c0,.53.09.86.26,1a3.11,3.11,0,0,0,1.24.32v.76H79.63ZM87.55,9.3A2.59,2.59,0,0,0,89,8.17a7.24,7.24,0,0,0,.66-1.62A8.18,8.18,0,0,0,90,4.29a4.32,4.32,0,0,0-.43-2,1.5,1.5,0,0,0-1.45-.81.71.71,0,0,0-.62.26,2.78,2.78,0,0,0-.33,1.05L85.91,9.5A6.63,6.63,0,0,0,87.55,9.3Zm8.72-4.77Q99,0,102.32,0A4.37,4.37,0,0,1,106,1.92a8.46,8.46,0,0,1,1.44,5.19,17.58,17.58,0,0,1-2.54,9.07q-2.7,4.61-6.21,4.6a4.27,4.27,0,0,1-3.6-1.92,8.67,8.67,0,0,1-1.38-5.14A17.68,17.68,0,0,1,96.27,4.53ZM96.9,18c.33,1.19.93,1.78,1.8,1.78a2.83,2.83,0,0,0,2.22-1.29A16.63,16.63,0,0,0,103,13.54a37.1,37.1,0,0,0,1.06-4.83,29.49,29.49,0,0,0,.38-4.11,5.86,5.86,0,0,0-.51-2.55A1.71,1.71,0,0,0,102.31,1C100.6,1,99.15,3.17,98,7.53a33.42,33.42,0,0,0-1.33,8.26A8.57,8.57,0,0,0,96.9,18ZM114.35.48v.76a2.57,2.57,0,0,0-1.08.17,1.07,1.07,0,0,0-.5,1,2.53,2.53,0,0,0,0,.28,2.64,2.64,0,0,0,0,.28l1.07,11.76L117.77,6c.31-.71.59-1.41.84-2.11A5.25,5.25,0,0,0,119,2.19a.85.85,0,0,0-.38-.81,3.09,3.09,0,0,0-.95-.14V.48h4v.76a2.08,2.08,0,0,0-.73.45,5.35,5.35,0,0,0-.82,1.4l-7.79,17.69h-.66L110,5.74A22,22,0,0,0,109.46,2c-.16-.39-.58-.62-1.28-.71V.48Zm5.15,19a1.83,1.83,0,0,0,1.08-.52,3.42,3.42,0,0,0,.59-1.59l2.54-13.24c.06-.34.11-.64.15-.92a4.83,4.83,0,0,0,.06-.7c0-.5-.09-.81-.28-.94a3.14,3.14,0,0,0-1.22-.31V.48h11.12l-.87,5.6L132.11,6a7,7,0,0,0-.49-3c-.52-1-1.59-1.51-3.19-1.51-.55,0-.9.09-1.06.28A2.44,2.44,0,0,0,127,2.74L125.76,9.3a6.21,6.21,0,0,0,2.81-.51A6,6,0,0,0,130,6.18l.58.1L129,14.35l-.56-.14c0-.28,0-.52,0-.73s0-.37,0-.51a2.92,2.92,0,0,0-.61-2.15,3.55,3.55,0,0,0-2.37-.57l-1.36,7.2a4.79,4.79,0,0,0-.07.51,3.28,3.28,0,0,0,0,.39,1,1,0,0,0,.22.66,1.24,1.24,0,0,0,.93.26,6.43,6.43,0,0,0,3.21-.75,7.67,7.67,0,0,0,3.21-4.17l.5.13-1.22,5.74H119.5Zm12.79,0a1.87,1.87,0,0,0,1-.41,3.23,3.23,0,0,0,.71-1.71L136.5,4.11c.07-.38.13-.69.17-1a5.89,5.89,0,0,0,.05-.67c0-.5-.1-.81-.29-.94a3.32,3.32,0,0,0-1.22-.31V.48h6a5.35,5.35,0,0,1,4.63,2.22,10.11,10.11,0,0,1,1.58,6,13.3,13.3,0,0,1-2.34,7.84,8,8,0,0,1-6.86,3.7h-5.93ZM143.87,3.39a2.84,2.84,0,0,0-2.79-2,1.08,1.08,0,0,0-.91.31,1.93,1.93,0,0,0-.34.83L137,17.44a3.1,3.1,0,0,0-.06.39c0,.11,0,.21,0,.3a1.22,1.22,0,0,0,.24.84,1.26,1.26,0,0,0,.9.26q3.67,0,5.33-5.42a23.91,23.91,0,0,0,1-6.94A9.45,9.45,0,0,0,143.87,3.39Z",opacity:1,strokeColor:"",fillColor:"#8a251a",width:127.70402,height:55.84601,stampFillColor:"#f6dedd",stampStrokeColor:""}}if(e.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.currentStampAnnotation=e,e)return e}},t.prototype.retrievestampAnnotation=function(t){if(t){var e=void 0;switch(t.trim()){case"Approved":e={iconName:"Approved",pathdata:"M19,20.22H10.55v-.71a4.26,4.26,0,0,0,1.79-.41,1.37,1.37,0,0,0,.53-1.29c0-.22,0-.75-.16-1.58,0-.17-.11-.89-.29-2.15H6.06l-1.72,3a4,4,0,0,0-.31.66,2,2,0,0,0-.14.69c0,.41.12.67.37.78a5.42,5.42,0,0,0,1.53.3v.71H0v-.71A4,4,0,0,0,1.21,19a5.68,5.68,0,0,0,1.28-1.56L13.45.07h.76L17,17a4.35,4.35,0,0,0,.7,2.08,2.4,2.4,0,0,0,1.31.44Zm-6.83-7.31L11.13,5.73,6.76,12.91Zm7.18,6.52a3,3,0,0,0,1.33-.49,3,3,0,0,0,.84-1.59L25.19,4.11c.07-.3.14-.6.2-.9a3.14,3.14,0,0,0,.1-.72,1,1,0,0,0-.58-1,5.68,5.68,0,0,0-1.57-.23V.48h8.47a9.68,9.68,0,0,1,3.57.57,4,4,0,0,1,2.71,4,4.93,4.93,0,0,1-2.2,4.22,9.53,9.53,0,0,1-5.69,1.58l-.85,0-1.71-.11L26,16.6l-.25,1a1,1,0,0,0-.05.3,2.83,2.83,0,0,0,0,.29c0,.5.14.81.4.94a6.31,6.31,0,0,0,1.76.31v.76H19.39Zm8.52-9.66.54.06h.48a5.81,5.81,0,0,0,2.3-.36,3.47,3.47,0,0,0,1.4-1.18,6.24,6.24,0,0,0,.86-2,8.94,8.94,0,0,0,.3-2,3.29,3.29,0,0,0-.58-2,2.3,2.3,0,0,0-2-.79,1.23,1.23,0,0,0-.93.28,2.71,2.71,0,0,0-.46,1Zm8,9.69a3.19,3.19,0,0,0,1.55-.52,3,3,0,0,0,.84-1.59L42,4.11c.07-.3.14-.6.2-.9a3.14,3.14,0,0,0,.1-.72,1,1,0,0,0-.58-1,5.68,5.68,0,0,0-1.57-.23V.48h8.47a9.68,9.68,0,0,1,3.57.57,4,4,0,0,1,2.71,4,4.93,4.93,0,0,1-2.2,4.22A9.53,9.53,0,0,1,47,10.87l-.85,0-1.71-.11L42.79,16.6l-.25,1a1.45,1.45,0,0,0,0,.3,2.83,2.83,0,0,0,0,.29c0,.5.14.81.4.94a6.31,6.31,0,0,0,1.76.31v.76h-8.7Zm8.74-9.69.54.06h.48A5.81,5.81,0,0,0,48,9.48a3.41,3.41,0,0,0,1.4-1.18,6.24,6.24,0,0,0,.86-2,9,9,0,0,0,.31-2,3.29,3.29,0,0,0-.59-2,2.3,2.3,0,0,0-2-.79,1.23,1.23,0,0,0-.93.28,2.88,2.88,0,0,0-.46,1Zm7.95,9.69a3.27,3.27,0,0,0,1.56-.52A3.06,3.06,0,0,0,55,17.35L58.64,4.11l.18-.71a4.72,4.72,0,0,0,.13-1c0-.47-.13-.77-.4-.9a6.74,6.74,0,0,0-1.74-.3V.48h8.11A13,13,0,0,1,69.14,1a3.7,3.7,0,0,1,2.74,3.75,4.8,4.8,0,0,1-.46,2,5,5,0,0,1-1.54,1.9,6.55,6.55,0,0,1-1.79,1,19.35,19.35,0,0,1-1.89.52c.1.3.16.49.2.57l2.27,6.66a3.49,3.49,0,0,0,1,1.7,3.08,3.08,0,0,0,1.6.41v.76H65.33l-3.19-9.76h-.83L59.57,16.6l-.25,1a1.87,1.87,0,0,0,0,.25,2.64,2.64,0,0,0,0,.28q0,.8.39,1a5.88,5.88,0,0,0,1.76.32v.76H52.62ZM63.94,9.3a3.79,3.79,0,0,0,2.11-1.13A6,6,0,0,0,67,6.55a5.84,5.84,0,0,0,.44-2.26,3.31,3.31,0,0,0-.61-2,2.47,2.47,0,0,0-2.09-.81,1.25,1.25,0,0,0-.88.26,2.34,2.34,0,0,0-.47,1.05L61.59,9.5A13.42,13.42,0,0,0,63.94,9.3ZM76.39,4.53Q80.26,0,85,0a7.34,7.34,0,0,1,5.23,1.92,6.76,6.76,0,0,1,2,5.19,13.9,13.9,0,0,1-3.62,9.07q-3.86,4.61-8.88,4.6a7.06,7.06,0,0,1-5.13-1.92,6.86,6.86,0,0,1-2-5.14A14,14,0,0,1,76.39,4.53ZM77.3,18a2.56,2.56,0,0,0,2.57,1.78A4.62,4.62,0,0,0,83,18.47,14.42,14.42,0,0,0,86,13.54a27.18,27.18,0,0,0,1.52-4.83,20.67,20.67,0,0,0,.54-4.11,4.38,4.38,0,0,0-.73-2.55A2.62,2.62,0,0,0,85,1q-3.68,0-6.19,6.54a24.29,24.29,0,0,0-1.9,8.26A5.91,5.91,0,0,0,77.3,18ZM102.23.48v.76a5.19,5.19,0,0,0-1.55.17,1,1,0,0,0-.72,1,2.46,2.46,0,0,0,0,.28L100,3l1.52,11.76L107.11,6c.44-.71.84-1.41,1.2-2.11a4.06,4.06,0,0,0,.53-1.66.79.79,0,0,0-.55-.81,6.11,6.11,0,0,0-1.35-.14V.48h5.67v.76a3.31,3.31,0,0,0-1,.45,5.33,5.33,0,0,0-1.18,1.4L99.26,20.78h-.94l-2.25-15A15.49,15.49,0,0,0,95.24,2c-.22-.39-.84-.62-1.83-.71V.48Zm7.35,19a3.19,3.19,0,0,0,1.55-.52,3,3,0,0,0,.84-1.59l3.62-13.24c.09-.34.16-.64.22-.92a3.27,3.27,0,0,0,.09-.7c0-.5-.14-.81-.4-.94a6.13,6.13,0,0,0-1.75-.31V.48h15.89l-1.25,5.6L127.6,6a5.32,5.32,0,0,0-.7-3q-1.12-1.52-4.56-1.51a2.61,2.61,0,0,0-1.51.28,2.12,2.12,0,0,0-.56,1.06L118.52,9.3a12.1,12.1,0,0,0,4-.51,5.8,5.8,0,0,0,2-2.61l.82.1-2.19,8.07-.81-.14c0-.28.07-.52.08-.73s0-.37,0-.51a2.4,2.4,0,0,0-.87-2.15,6.76,6.76,0,0,0-3.38-.57l-1.94,7.2a3.34,3.34,0,0,0-.11.51,3.67,3.67,0,0,0,0,.39.81.81,0,0,0,.32.66,2.3,2.3,0,0,0,1.33.26,12.39,12.39,0,0,0,4.57-.75A8.84,8.84,0,0,0,127,14.35l.72.13-1.74,5.74H109.58Zm18.27,0a3.27,3.27,0,0,0,1.37-.41,2.85,2.85,0,0,0,1-1.71l3.63-13.23c.1-.38.18-.69.23-1a3,3,0,0,0,.09-.67c0-.5-.15-.81-.42-.94A6.38,6.38,0,0,0,132,1.24V.48h8.57c2.9,0,5.1.74,6.62,2.22a8,8,0,0,1,2.26,6,10.72,10.72,0,0,1-3.35,7.84,13.3,13.3,0,0,1-9.8,3.7h-8.47ZM144.4,3.39a4.23,4.23,0,0,0-4-2,2,2,0,0,0-1.29.31,1.74,1.74,0,0,0-.48.83l-4.07,14.9a3.24,3.24,0,0,0-.07.39,1.69,1.69,0,0,0,0,.3,1,1,0,0,0,.36.84,2.27,2.27,0,0,0,1.27.26q5.26,0,7.62-5.42a17.25,17.25,0,0,0,1.43-6.94A7,7,0,0,0,144.4,3.39Z",opacity:1,strokeColor:"",fillColor:"#516c30",width:149.474,height:20.783,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"Confidential":e={iconName:"Confidential",pathdata:"M13.71,0,12.63,6.9,12,6.73c0-.41,0-.66,0-.73s0-.18,0-.32a6.16,6.16,0,0,0-.79-3.47,2.37,2.37,0,0,0-2-1.14c-1.64,0-3.07,1.51-4.29,4.55a22,22,0,0,0-1.64,8.29c0,2,.34,3.44,1,4.2A3,3,0,0,0,6.5,19.24a4.08,4.08,0,0,0,2.93-1.43,10.47,10.47,0,0,0,1.5-2.09l.64.65A8.84,8.84,0,0,1,9,19.72a5.24,5.24,0,0,1-3.08,1.09,5.16,5.16,0,0,1-4.21-2.08A8.68,8.68,0,0,1,0,13.16,16.5,16.5,0,0,1,2.55,3.92Q5.1,0,8.61,0a6.35,6.35,0,0,1,2.25.43,6.62,6.62,0,0,0,1.38.43.55.55,0,0,0,.5-.23A2.61,2.61,0,0,0,13.06,0ZM27.49,7.11a17.19,17.19,0,0,1-2.61,9.07q-2.77,4.61-6.39,4.6a4.42,4.42,0,0,1-3.7-1.92,8.47,8.47,0,0,1-1.43-5.14A17.31,17.31,0,0,1,16,4.53C17.88,1.51,20,0,22.25,0A4.53,4.53,0,0,1,26,1.92,8.27,8.27,0,0,1,27.49,7.11ZM24.42,4.6a5.71,5.71,0,0,0-.53-2.55A1.76,1.76,0,0,0,22.24,1q-2.65,0-4.45,6.54a31.93,31.93,0,0,0-1.37,8.26A8.15,8.15,0,0,0,16.67,18c.34,1.19,1,1.78,1.85,1.78a2.9,2.9,0,0,0,2.28-1.29,15.85,15.85,0,0,0,2.13-4.93A34.08,34.08,0,0,0,24,8.71,28.5,28.5,0,0,0,24.42,4.6ZM42.75,1.3l.3-.06V.48H38.69v.76a2.55,2.55,0,0,1,1.16.33,1.8,1.8,0,0,1,.51,1.48,10.11,10.11,0,0,1-.13,1.34c-.06.41-.14.87-.24,1.39l-1.65,8.34L33.73.48H29.45v.76a2.66,2.66,0,0,1,1,.24,1.88,1.88,0,0,1,.65,1.06l.09.3L28.81,15a20.72,20.72,0,0,1-1,3.61,1.61,1.61,0,0,1-1.19.9v.76h4.42v-.76a2.55,2.55,0,0,1-1.13-.32,1.67,1.67,0,0,1-.56-1.44,7.13,7.13,0,0,1,.05-.79c.06-.43.17-1.09.34-2L31.89,4.38l5.52,16.33h.52l3-15a22.58,22.58,0,0,1,.87-3.42A1.42,1.42,0,0,1,42.75,1.3ZM55.53.48H44.23v.76a3.63,3.63,0,0,1,1.26.3c.19.13.29.42.29.9a7.08,7.08,0,0,1-.09,1c0,.2-.08.44-.13.71L43,17.34a3.47,3.47,0,0,1-.59,1.58,1.91,1.91,0,0,1-1.13.54v.76h6.29v-.76a2.13,2.13,0,0,1-1-.19A1.23,1.23,0,0,1,46,18.1c0-.1,0-.21,0-.31s0-.23.05-.35l1.4-7.21a3.15,3.15,0,0,1,2.37.64A3.21,3.21,0,0,1,50.38,13c0,.11,0,.28,0,.49s0,.46-.06.75l.58.14,1.58-8.07-.59-.1a5.79,5.79,0,0,1-1.43,2.59,6.17,6.17,0,0,1-2.77.52l1.26-6.54a2.06,2.06,0,0,1,.42-1.08,1.39,1.39,0,0,1,1-.26c1.62,0,2.7.51,3.24,1.54a7.11,7.11,0,0,1,.49,3l.57.13Zm3.69,17.71c0-.08,0-.17,0-.27s0-.2,0-.3l.17-1L62.06,3.36a3.44,3.44,0,0,1,.59-1.6,2,2,0,0,1,1.12-.52V.48H57.44v.76a3.47,3.47,0,0,1,1.26.31c.2.13.3.44.3.94a4.25,4.25,0,0,1-.06.67c0,.26-.09.57-.17,1L56.16,17.35a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.12.52v.76h6.33v-.76a3.3,3.3,0,0,1-1.26-.32C59.32,19,59.22,18.69,59.22,18.19Zm18-9.51a13,13,0,0,1-2.42,7.84,8.31,8.31,0,0,1-7,3.7H61.6v-.76a2,2,0,0,0,1-.41,3.14,3.14,0,0,0,.73-1.71L65.93,4.11c.08-.38.13-.69.17-1a4.36,4.36,0,0,0,.06-.67c0-.5-.1-.81-.3-.94a3.47,3.47,0,0,0-1.26-.31V.48h6.17A5.52,5.52,0,0,1,75.53,2.7,9.91,9.91,0,0,1,77.17,8.68ZM74,6.87a9.22,9.22,0,0,0-.53-3.48,2.91,2.91,0,0,0-2.87-2,1.12,1.12,0,0,0-.93.31,1.81,1.81,0,0,0-.35.83l-2.93,14.9a3,3,0,0,0-.05.39c0,.11,0,.21,0,.3a1.17,1.17,0,0,0,.25.84,1.3,1.3,0,0,0,.92.26q3.8,0,5.49-5.42A23.26,23.26,0,0,0,74,6.87Zm11.3,11.65a6.72,6.72,0,0,1-3.29.75,1.3,1.3,0,0,1-1-.26,1,1,0,0,1-.23-.66,3.28,3.28,0,0,1,0-.39,4.88,4.88,0,0,1,.08-.51l1.4-7.2a3.73,3.73,0,0,1,2.43.57A2.87,2.87,0,0,1,85.43,13c0,.14,0,.31,0,.51s0,.45-.06.73l.59.14,1.57-8.07-.59-.1a5.79,5.79,0,0,1-1.46,2.61,6.5,6.5,0,0,1-2.89.51l1.26-6.56a2.41,2.41,0,0,1,.41-1.06c.16-.19.52-.28,1.08-.28,1.65,0,2.75.5,3.29,1.51a7,7,0,0,1,.5,3l.57.13.9-5.6H79.14v.76a3.35,3.35,0,0,1,1.26.31c.19.13.29.44.29.94a5,5,0,0,1-.07.7c0,.28-.09.58-.15.92L77.86,17.35a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.13.52v.76H87.91l1.25-5.74-.52-.13A7.69,7.69,0,0,1,85.34,18.52ZM105.8,1.24V.48h-4.37v.76a2.55,2.55,0,0,1,1.16.33,1.77,1.77,0,0,1,.52,1.48A10.58,10.58,0,0,1,103,4.39c-.06.41-.13.87-.23,1.39l-1.66,8.34L96.47.48H92.19v.76a2.61,2.61,0,0,1,1,.24,1.83,1.83,0,0,1,.65,1.06l.1.3L91.55,15a19,19,0,0,1-1,3.61,1.61,1.61,0,0,1-1.19.9v.76h4.42v-.76a2.59,2.59,0,0,1-1.13-.32,1.67,1.67,0,0,1-.56-1.44,7.13,7.13,0,0,1,0-.79c.06-.43.17-1.09.35-2L94.63,4.38l5.52,16.33h.53l2.95-15a22.93,22.93,0,0,1,.86-3.42,1.42,1.42,0,0,1,1-1Zm11.4,4.9L118,.48H106.28l-.82,5,.55.2a8,8,0,0,1,1.87-3.16,3.7,3.7,0,0,1,2.7-1.06l-3.12,15.85a2.94,2.94,0,0,1-.87,1.85,2.48,2.48,0,0,1-1.34.26v.76h7v-.76a4.24,4.24,0,0,1-1.43-.3c-.23-.13-.34-.45-.34-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.18-1,3-15.1a2.73,2.73,0,0,1,1.79.63c.75.7,1.13,2,1.17,3.94Zm3.57,12.05c0-.08,0-.17,0-.27s0-.2,0-.3l.17-1,2.62-13.24a3.44,3.44,0,0,1,.59-1.6,2,2,0,0,1,1.12-.52V.48H119v.76a3.47,3.47,0,0,1,1.26.31c.2.13.3.44.3.94a4.25,4.25,0,0,1-.06.67c0,.26-.09.57-.17,1l-2.61,13.24a3.52,3.52,0,0,1-.6,1.59,2,2,0,0,1-1.12.52v.76h6.33v-.76a3.36,3.36,0,0,1-1.26-.32C120.87,19,120.77,18.69,120.77,18.19Zm28.86-3.71-1.24,5.74H130.3v-.71a2.48,2.48,0,0,0,1.3-.41,1.64,1.64,0,0,0,.37-1.29c0-.22,0-.75-.11-1.58,0-.17-.08-.89-.21-2.15h-4.58l-1.24,3a5.1,5.1,0,0,0-.22.66,2.45,2.45,0,0,0-.1.69c0,.41.09.67.26.78a3.05,3.05,0,0,0,1.11.3v.71h-4.17v-.71a2.66,2.66,0,0,0,.87-.53,5.79,5.79,0,0,0,.92-1.56L132.39.07h.55L135,17a5.53,5.53,0,0,0,.5,2.08,1.67,1.67,0,0,0,1.14.46v0a1.93,1.93,0,0,0,1.12-.52,3.52,3.52,0,0,0,.6-1.6l2.61-13.23c.08-.38.13-.69.17-1a4.36,4.36,0,0,0,.06-.67c0-.5-.1-.81-.3-.94a3.47,3.47,0,0,0-1.26-.31V.48h6.73v.76a3.23,3.23,0,0,0-1.49.48,3.06,3.06,0,0,0-.64,1.64l-2.77,14.08c0,.16-.05.3-.07.44s0,.29,0,.47a.79.79,0,0,0,.31.71,1.55,1.55,0,0,0,.87.21,6.83,6.83,0,0,0,3.79-1,8.42,8.42,0,0,0,2.81-3.88ZM131.5,12.91l-.78-7.18-3.14,7.18Z",opacity:1,strokeColor:"",fillColor:"#192760",width:149.633,height:20.811,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Witness":e={iconName:"Witness",pathdata:"M19.63,2.67,12.77,16.84h-.69L10.63,5.17,5.05,16.84H4.36L2.5,2.92A3.13,3.13,0,0,0,2,1.35,2.38,2.38,0,0,0,.63.91V.33H7.3V1a2.27,2.27,0,0,0-.92.17A1.11,1.11,0,0,0,5.84,2.2v.16c0,.05,0,.13,0,.22L6.81,11l3.57-7.48a.79.79,0,0,0,0-.23,2.78,2.78,0,0,0-.53-2A2.23,2.23,0,0,0,8.68.91V.33h6.45V.91A2.42,2.42,0,0,0,14,1.2c-.23.16-.34.5-.34,1,0,.11,0,.26,0,.46s.07.73.12,1.21l.8,7L18.3,3.11c.09-.19.17-.4.25-.62a2.11,2.11,0,0,0,.11-.65.73.73,0,0,0-.4-.76,2.73,2.73,0,0,0-1.1-.17V.33h4.47V.91a1.92,1.92,0,0,0-.91.3A3.66,3.66,0,0,0,19.63,2.67ZM29.76.33H22.62V1A5.07,5.07,0,0,1,24,1.2c.23.11.34.36.34.77a2.86,2.86,0,0,1-.06.54c0,.21-.11.47-.19.77L21.17,14.05a2.47,2.47,0,0,1-.68,1.29,2.62,2.62,0,0,1-1.27.42v.62h7.15v-.62A5.09,5.09,0,0,1,25,15.51c-.22-.11-.33-.37-.33-.77a2,2,0,0,1,0-.23c0-.08,0-.16,0-.24l.19-.83,3-10.77a2.5,2.5,0,0,1,.66-1.3A2.76,2.76,0,0,1,29.76,1ZM41.9,4.88l.63,0,.86-4.6H30.2l-.93,4.1.62.16A6.6,6.6,0,0,1,32,2a5.22,5.22,0,0,1,3.06-.86L31.53,14.05a2.24,2.24,0,0,1-1,1.5,3.67,3.67,0,0,1-1.51.21v.62H37v-.62a6,6,0,0,1-1.62-.24c-.26-.1-.39-.36-.39-.77,0-.07,0-.14,0-.21s0-.16.05-.27l.2-.83L38.57,1.16a3.76,3.76,0,0,1,2,.52A3.69,3.69,0,0,1,41.9,4.88ZM59.24,1,59.58,1V.33H54.65V1A3.78,3.78,0,0,1,56,1.22a1.25,1.25,0,0,1,.58,1.2,6.26,6.26,0,0,1-.15,1.09c-.07.33-.16.71-.27,1.13l-1.87,6.79L49.05.33H44.21V1a3.51,3.51,0,0,1,1.13.2,1.51,1.51,0,0,1,.74.85l.1.25L43.49,12.1A13.5,13.5,0,0,1,42.4,15a1.87,1.87,0,0,1-1.35.72v.62h5v-.62a3.62,3.62,0,0,1-1.28-.26,1.19,1.19,0,0,1-.64-1.17,3.55,3.55,0,0,1,.06-.64q.11-.53.39-1.59L47,3.5,53.2,16.78h.59L57.13,4.6a15.29,15.29,0,0,1,1-2.78A1.51,1.51,0,0,1,59.24,1Zm7.26.31a2.11,2.11,0,0,1,1.23-.23c1.87,0,3.1.41,3.71,1.23A4.39,4.39,0,0,1,72,4.78l.64.11,1-4.56H60.75V1a5,5,0,0,1,1.42.25c.22.11.32.36.32.77a2.73,2.73,0,0,1-.07.57c0,.22-.1.47-.17.74l-3,10.77a2.47,2.47,0,0,1-.68,1.29,2.62,2.62,0,0,1-1.27.42v.62h13.3l1.42-4.66-.59-.11A7.1,7.1,0,0,1,67.75,15a10,10,0,0,1-3.72.61A1.86,1.86,0,0,1,63,15.4a.67.67,0,0,1-.26-.54,2.36,2.36,0,0,1,0-.32,3.38,3.38,0,0,1,.09-.41l1.58-5.86a5.48,5.48,0,0,1,2.75.47,2,2,0,0,1,.71,1.75c0,.11,0,.25,0,.41s0,.37-.06.6l.65.11L70.2,5.05,69.54,5a4.69,4.69,0,0,1-1.65,2.12,10.06,10.06,0,0,1-3.26.41l1.42-5.33A1.75,1.75,0,0,1,66.5,1.31ZM80.88.83a2.77,2.77,0,0,1,2.46,1.26A4.36,4.36,0,0,1,84,4l.08.78.62.08,1-4.8H85a1.77,1.77,0,0,1-.38.43A1,1,0,0,1,84,.67a2.76,2.76,0,0,1-.37,0l-.41-.1-.61-.2a4.78,4.78,0,0,0-.79-.2A6.71,6.71,0,0,0,80.46,0a4.76,4.76,0,0,0-3.62,1.36,4.61,4.61,0,0,0-1.29,3.29q0,2.05,2.94,4.47t2.94,3.82a3.19,3.19,0,0,1-.79,2.14,2.8,2.8,0,0,1-2.23.92,3.43,3.43,0,0,1-1.5-.33,3.82,3.82,0,0,1-2-2.5,10.33,10.33,0,0,1-.2-1.67L74,11.45l-.87,5.38h.73a2.85,2.85,0,0,1,.38-.67A.75.75,0,0,1,74.8,16a1.12,1.12,0,0,1,.27,0l.42.15.61.22a8.62,8.62,0,0,0,1.3.35,7.53,7.53,0,0,0,1.32.12,5.48,5.48,0,0,0,4.11-1.53,4.77,4.77,0,0,0,1.49-3.43,4.59,4.59,0,0,0-.77-2.63,9.31,9.31,0,0,0-1.87-2L79.61,5.5a4.31,4.31,0,0,1-.74-.77,2.55,2.55,0,0,1-.43-1.45,2.68,2.68,0,0,1,.42-1.44A2.23,2.23,0,0,1,80.88.83Zm12.31,0a2.8,2.8,0,0,1,2.47,1.26A4.49,4.49,0,0,1,96.35,4l.08.78.62.08,1-4.8h-.71a1.62,1.62,0,0,1-.39.43,1,1,0,0,1-.64.18,2.9,2.9,0,0,1-.38,0l-.41-.1-.61-.2a4.65,4.65,0,0,0-.78-.2A6.88,6.88,0,0,0,92.77,0a4.73,4.73,0,0,0-3.61,1.36,4.57,4.57,0,0,0-1.3,3.29q0,2.05,2.94,4.47c2,1.54,3,2.81,3,3.82a3.2,3.2,0,0,1-.8,2.14,2.78,2.78,0,0,1-2.23.92,3.36,3.36,0,0,1-1.49-.33A3.68,3.68,0,0,1,88,14.73a3.76,3.76,0,0,1-.81-1.56A10.6,10.6,0,0,1,87,11.5l-.7-.05-.86,5.38h.72a2.85,2.85,0,0,1,.38-.67.78.78,0,0,1,.57-.19,1.12,1.12,0,0,1,.27,0l.42.15.61.22a8.74,8.74,0,0,0,1.31.35,7.37,7.37,0,0,0,1.32.12,5.49,5.49,0,0,0,4.11-1.53,4.81,4.81,0,0,0,1.49-3.43,4.67,4.67,0,0,0-.77-2.63A9.57,9.57,0,0,0,94,7.2L91.93,5.5a4,4,0,0,1-.74-.77,2.48,2.48,0,0,1-.43-1.45,2.68,2.68,0,0,1,.42-1.44A2.2,2.2,0,0,1,93.19.83Z",opacity:1,strokeColor:"",fillColor:"#192760",width:97.39,height:16.84,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"InitialHere":case"Initial Here":e={iconName:"Initial Here",pathdata:"M6.36,15.51a5.09,5.09,0,0,0,1.42.25v.62H.63v-.62a2.62,2.62,0,0,0,1.27-.42,2.47,2.47,0,0,0,.68-1.29l3-10.77c.08-.3.15-.56.19-.77A2.86,2.86,0,0,0,5.78,2c0-.41-.11-.66-.34-.77A5.07,5.07,0,0,0,4,1V.33h7.14V1a2.76,2.76,0,0,0-1.27.42,2.5,2.5,0,0,0-.66,1.3l-3,10.77-.19.83c0,.08,0,.16,0,.24a2,2,0,0,0,0,.23C6,15.14,6.14,15.4,6.36,15.51ZM27,1,27.36,1V.33H22.43V1a3.78,3.78,0,0,1,1.31.27,1.25,1.25,0,0,1,.58,1.2,6.26,6.26,0,0,1-.15,1.09c-.07.33-.16.71-.27,1.13L22,11.43,16.83.33H12V1a3.49,3.49,0,0,1,1.12.2,1.51,1.51,0,0,1,.74.85l.11.25-2.7,9.85A13,13,0,0,1,10.18,15a1.85,1.85,0,0,1-1.35.72v.62h5v-.62a3.62,3.62,0,0,1-1.28-.26,1.19,1.19,0,0,1-.63-1.17,4.72,4.72,0,0,1,.05-.64q.1-.53.39-1.59l2.39-8.6L21,16.78h.6L24.91,4.6a15.29,15.29,0,0,1,1-2.78A1.51,1.51,0,0,1,27,1ZM35.78.33H28.64V1a5.16,5.16,0,0,1,1.41.25c.23.11.34.36.34.77a2.86,2.86,0,0,1-.06.54c0,.21-.11.47-.19.77L27.19,14.05a2.47,2.47,0,0,1-.68,1.29,2.66,2.66,0,0,1-1.27.42v.62h7.15v-.62A5.09,5.09,0,0,1,31,15.51c-.22-.11-.33-.37-.33-.77a2,2,0,0,1,0-.23,2,2,0,0,1,0-.24l.19-.83,3-10.77a2.5,2.5,0,0,1,.66-1.3A2.76,2.76,0,0,1,35.78,1Zm12.76,4.6.87-4.6H36.22l-.93,4.1.62.16A6.52,6.52,0,0,1,38,2a5.21,5.21,0,0,1,3-.86L37.55,14.05a2.24,2.24,0,0,1-1,1.5,3.7,3.7,0,0,1-1.51.21v.62H43v-.62a5.79,5.79,0,0,1-1.61-.24c-.26-.1-.39-.36-.39-.77a1.48,1.48,0,0,1,0-.21,2,2,0,0,1,0-.27l.2-.83L44.58,1.16a3.77,3.77,0,0,1,2,.52,3.74,3.74,0,0,1,1.31,3.2Zm4,9.81a.93.93,0,0,1,0-.23,2,2,0,0,1,0-.24l.18-.83,3-10.77a2.42,2.42,0,0,1,.67-1.3A2.72,2.72,0,0,1,57.72,1V.33H50.57V1A5.26,5.26,0,0,1,52,1.2c.23.11.34.36.34.77a2.28,2.28,0,0,1-.07.54,7.71,7.71,0,0,1-.19.77l-3,10.77a2.4,2.4,0,0,1-.68,1.29,2.58,2.58,0,0,1-1.26.42v.62h7.14v-.62a5.07,5.07,0,0,1-1.41-.25C52.69,15.4,52.58,15.14,52.58,14.74Zm32-3.13.57.11-1.4,4.66H63.34v-.57a3.65,3.65,0,0,0,1.46-.34c.29-.16.43-.51.43-1,0-.18,0-.61-.13-1.29,0-.14-.09-.73-.23-1.75H59.69l-1.4,2.44a3.38,3.38,0,0,0-.25.54,1.64,1.64,0,0,0-.11.56q0,.5.3.63a4.41,4.41,0,0,0,1.25.25v.57H54.76v-.57a3.36,3.36,0,0,0,1-.43,4.58,4.58,0,0,0,1-1.27L65.7,0h.62l2.3,13.72a3.49,3.49,0,0,0,.56,1.7,2.34,2.34,0,0,0,1.29.37v0a2.58,2.58,0,0,0,1.26-.42,2.46,2.46,0,0,0,.68-1.3L75.35,3.28c.09-.3.16-.56.2-.77A2.86,2.86,0,0,0,75.61,2c0-.41-.11-.66-.34-.77A5.17,5.17,0,0,0,73.85,1V.33h7.61V1a4.77,4.77,0,0,0-1.69.39A2.27,2.27,0,0,0,79,2.67L75.92,14.12c0,.13,0,.25-.07.36a2.21,2.21,0,0,0,0,.39.59.59,0,0,0,.35.57,2.33,2.33,0,0,0,1,.17,10.06,10.06,0,0,0,4.28-.84A7.67,7.67,0,0,0,84.6,11.61ZM64.7,10.44,63.81,4.6l-3.55,5.84Zm38,4.32a.71.71,0,0,1,0-.16s0-.16.07-.34l.2-.83L106,2.67a2.43,2.43,0,0,1,.79-1.39A2.78,2.78,0,0,1,107.9,1V.33h-7.15V1a4.45,4.45,0,0,1,1.27.19.81.81,0,0,1,.47.83,2.73,2.73,0,0,1-.07.57c0,.22-.1.47-.17.74l-1.14,4.16h-5.7L96.7,2.67a2.27,2.27,0,0,1,.73-1.33A4.77,4.77,0,0,1,99.12,1V.33H91.51V1a5.09,5.09,0,0,1,1.42.25c.22.11.33.36.33.77a2.93,2.93,0,0,1-.08.58c-.05.24-.1.48-.17.73L90.07,14a2.73,2.73,0,0,1-.65,1.29,2.47,2.47,0,0,1-1.3.43v.62h7.15v-.62a5.13,5.13,0,0,1-1.42-.24c-.21-.1-.31-.34-.31-.72a3.11,3.11,0,0,1,0-.57c0-.16.1-.43.19-.8L95.12,8.5h5.7L99.31,14a2.21,2.21,0,0,1-.74,1.33,4.36,4.36,0,0,1-1.69.39v.62h7.63v-.62a4.72,4.72,0,0,1-1.25-.17A.8.8,0,0,1,102.73,14.76Zm13.38.24a10.07,10.07,0,0,1-3.72.61,1.86,1.86,0,0,1-1.08-.21.67.67,0,0,1-.26-.54,2.36,2.36,0,0,1,0-.32,3.38,3.38,0,0,1,.09-.41l1.58-5.86a5.51,5.51,0,0,1,2.75.47,2,2,0,0,1,.7,1.75c0,.11,0,.25,0,.41s0,.37-.07.6l.66.11,1.78-6.56L117.89,5a4.63,4.63,0,0,1-1.65,2.12A10,10,0,0,1,113,7.5l1.43-5.33a1.6,1.6,0,0,1,.45-.86,2.07,2.07,0,0,1,1.23-.23c1.86,0,3.1.41,3.71,1.23a4.32,4.32,0,0,1,.56,2.47l.65.11,1-4.56H109.1V1a5.1,5.1,0,0,1,1.43.25c.21.11.32.36.32.77a3.63,3.63,0,0,1-.07.57c0,.22-.11.47-.18.74l-2.95,10.77a2.4,2.4,0,0,1-.68,1.29,2.58,2.58,0,0,1-1.26.42v.62H119l1.42-4.66-.58-.11A7.17,7.17,0,0,1,116.11,15ZM144.36,2.17,142.93,7.5a10.13,10.13,0,0,0,3.27-.41A4.69,4.69,0,0,0,147.84,5l.67.08-1.78,6.56-.66-.11c0-.23.06-.43.07-.6s0-.3,0-.41a2,2,0,0,0-.7-1.75,5.51,5.51,0,0,0-2.75-.47l-1.58,5.86a3.38,3.38,0,0,0-.09.41,2.36,2.36,0,0,0,0,.32.67.67,0,0,0,.26.54,1.86,1.86,0,0,0,1.08.21,10.07,10.07,0,0,0,3.72-.61,7.14,7.14,0,0,0,3.73-3.39l.58.11L149,16.38H131l-2.59-7.93h-.68l-1.42,5-.2.83,0,.2a1.77,1.77,0,0,0,0,.23c0,.43.1.7.31.81a4.87,4.87,0,0,0,1.43.25v.62h-7.14v-.62a2.58,2.58,0,0,0,1.26-.42,2.4,2.4,0,0,0,.68-1.29l3-10.77.15-.57a4.09,4.09,0,0,0,.1-.79c0-.38-.11-.62-.32-.72A4.8,4.8,0,0,0,124,1V.33h6.6a10.58,10.58,0,0,1,3.42.43,3,3,0,0,1,2.24,3.05,4,4,0,0,1-.38,1.6A4,4,0,0,1,134.66,7a5.47,5.47,0,0,1-1.45.8c-.33.11-.85.25-1.54.42a4.73,4.73,0,0,0,.16.46l1.85,5.42a2.81,2.81,0,0,0,.8,1.38,2.42,2.42,0,0,0,1.23.32,2.53,2.53,0,0,0,1.22-.41,2.47,2.47,0,0,0,.68-1.29l2.94-10.77c.07-.27.13-.52.18-.74A2.73,2.73,0,0,0,140.8,2c0-.41-.11-.66-.32-.77A5.1,5.1,0,0,0,139.05,1V.33H152l-1,4.56-.65-.11a4.32,4.32,0,0,0-.56-2.47c-.61-.82-1.85-1.23-3.71-1.23a2.07,2.07,0,0,0-1.23.23A1.67,1.67,0,0,0,144.36,2.17ZM131.54,6.59a5,5,0,0,0,.77-1.32,4.68,4.68,0,0,0,.36-1.84,2.74,2.74,0,0,0-.5-1.67,2,2,0,0,0-1.7-.66,1,1,0,0,0-.72.22,2,2,0,0,0-.38.85l-1.45,5.49a10.33,10.33,0,0,0,1.91-.16A3.07,3.07,0,0,0,131.54,6.59Z",opacity:1,strokeColor:"",fillColor:"#192760",width:151.345,height:16.781,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"SignHere":case"Sign Here":e={iconName:"Sign Here",pathdata:"M6.38,1.9A2.56,2.56,0,0,0,6,3.34a2.49,2.49,0,0,0,.44,1.45,3.9,3.9,0,0,0,.73.76l2.07,1.7a9.34,9.34,0,0,1,1.87,2.06,4.6,4.6,0,0,1,.78,2.63,4.78,4.78,0,0,1-1.5,3.43A5.46,5.46,0,0,1,6.23,16.9a7.34,7.34,0,0,1-1.31-.12,7.48,7.48,0,0,1-1.31-.36L3,16.2l-.42-.14a1.12,1.12,0,0,0-.27,0,.71.71,0,0,0-.57.19,2.85,2.85,0,0,0-.38.67H.63l.87-5.38.69,0a10.34,10.34,0,0,0,.2,1.68,3.82,3.82,0,0,0,2,2.5,3.42,3.42,0,0,0,1.5.32,2.76,2.76,0,0,0,2.23-.92A3.14,3.14,0,0,0,8.94,13c0-1-1-2.29-2.94-3.82S3.06,6.08,3.06,4.71A4.59,4.59,0,0,1,4.35,1.42,4.76,4.76,0,0,1,8,.06,6.71,6.71,0,0,1,9.29.19a4.78,4.78,0,0,1,.79.2l.61.2.41.1a2.76,2.76,0,0,0,.37,0,1,1,0,0,0,.65-.18A1.75,1.75,0,0,0,12.5.12h.72l-1,4.8-.62-.08-.09-.79a4.45,4.45,0,0,0-.69-1.91A2.78,2.78,0,0,0,8.39.89,2.2,2.2,0,0,0,6.38,1.9ZM22.8.39H15.66V1a4.71,4.71,0,0,1,1.41.25c.23.11.34.36.34.77a2.86,2.86,0,0,1-.06.54c0,.21-.11.47-.19.77L14.21,14.11a2.47,2.47,0,0,1-.68,1.29,2.62,2.62,0,0,1-1.27.42v.62h7.15v-.62A4.63,4.63,0,0,1,18,15.56c-.22-.1-.33-.36-.33-.77a1.8,1.8,0,0,1,0-.22c0-.08,0-.16,0-.24l.19-.83,3-10.77a2.5,2.5,0,0,1,.66-1.3A2.76,2.76,0,0,1,22.8,1ZM38.09,9.14V8.52H31.18v.62a5.05,5.05,0,0,1,1.44.28c.22.1.32.35.32.75a13.35,13.35,0,0,1-.54,2.54,19.13,19.13,0,0,1-.54,1.87A1.85,1.85,0,0,1,31,15.66a3.77,3.77,0,0,1-1.78.35A3.71,3.71,0,0,1,27,15.38c-1.09-.77-1.64-2.13-1.64-4.08a13.74,13.74,0,0,1,1.78-6.69q2.05-3.72,5-3.72a2.93,2.93,0,0,1,3,1.86,6.09,6.09,0,0,1,.4,2.48l.69.08L37.44,0h-.71a2.44,2.44,0,0,1-.41.53.82.82,0,0,1-.58.2A9.14,9.14,0,0,1,34.33.36,9.23,9.23,0,0,0,31.73,0a9.4,9.4,0,0,0-7.46,3.42,10.46,10.46,0,0,0-2.65,7,5.88,5.88,0,0,0,2.2,4.83,7.77,7.77,0,0,0,5,1.64A13.06,13.06,0,0,0,32,16.52a14.26,14.26,0,0,0,2.33-.75l.67-.3,1.2-4.36a4.15,4.15,0,0,1,.62-1.59A2.28,2.28,0,0,1,38.09,9.14ZM50.36,1a3.36,3.36,0,0,1,1.31.27,1.25,1.25,0,0,1,.58,1.2,6.26,6.26,0,0,1-.15,1.09c-.07.33-.16.7-.27,1.13L50,11.48,44.76.39H39.93V1a3.49,3.49,0,0,1,1.12.2,1.51,1.51,0,0,1,.74.85l.1.25L39.2,12.16a12.62,12.62,0,0,1-1.09,2.93,1.86,1.86,0,0,1-1.35.73v.62h5v-.62a3.62,3.62,0,0,1-1.28-.26,1.21,1.21,0,0,1-.63-1.17,4.72,4.72,0,0,1,0-.64q.1-.52.39-1.59l2.39-8.6,6.23,13.28h.6L52.84,4.66a15.29,15.29,0,0,1,1-2.78A1.52,1.52,0,0,1,55,1.05l.34,0V.39H50.36Zm22.33,13.8a.66.66,0,0,1,0-.15c0-.05,0-.16.07-.34l.2-.83L75.91,2.73a2.43,2.43,0,0,1,.79-1.39A2.78,2.78,0,0,1,77.86,1V.39H70.71V1A4.45,4.45,0,0,1,72,1.2a.81.81,0,0,1,.47.83,2.73,2.73,0,0,1-.07.57c0,.22-.1.47-.17.74L71.07,7.5h-5.7l1.29-4.77a2.27,2.27,0,0,1,.73-1.33A4.36,4.36,0,0,1,69.08,1V.39H61.47V1a4.73,4.73,0,0,1,1.42.25c.22.11.33.36.33.77a2.93,2.93,0,0,1-.08.58c0,.24-.1.48-.17.73L60,14.1a2.73,2.73,0,0,1-.65,1.29,2.47,2.47,0,0,1-1.3.43v.62h7.15v-.62a5.13,5.13,0,0,1-1.42-.24c-.21-.1-.31-.34-.31-.72a3,3,0,0,1,0-.57c0-.16.1-.43.19-.8l1.35-4.94h5.7L69.27,14.1a2.21,2.21,0,0,1-.74,1.33,4.77,4.77,0,0,1-1.69.39v.62h7.63v-.62a4.72,4.72,0,0,1-1.25-.17A.82.82,0,0,1,72.69,14.81Zm13.38.25a10.28,10.28,0,0,1-3.72.61,1.86,1.86,0,0,1-1.08-.21.67.67,0,0,1-.26-.54,2.23,2.23,0,0,1,0-.32,3.38,3.38,0,0,1,.09-.41l1.58-5.86a5.51,5.51,0,0,1,2.75.47,2,2,0,0,1,.7,1.75c0,.11,0,.24,0,.41s0,.37-.07.59l.66.12,1.78-6.56L87.85,5a4.75,4.75,0,0,1-1.64,2.12,10.13,10.13,0,0,1-3.27.41l1.43-5.33a1.56,1.56,0,0,1,.45-.86,2.07,2.07,0,0,1,1.23-.23c1.86,0,3.1.41,3.71,1.23a4.32,4.32,0,0,1,.56,2.47L91,5,92,.39H79.06V1a4.75,4.75,0,0,1,1.43.25c.21.11.32.36.32.77a2.73,2.73,0,0,1-.07.57c0,.22-.11.47-.18.74l-3,10.77a2.4,2.4,0,0,1-.68,1.29,2.58,2.58,0,0,1-1.26.42v.62H89l1.41-4.66-.58-.11A7.22,7.22,0,0,1,86.07,15.06ZM114.32,2.23l-1.43,5.33a10.13,10.13,0,0,0,3.27-.41A4.75,4.75,0,0,0,117.8,5l.67.08-1.78,6.56-.66-.12c0-.22.06-.42.07-.59s0-.3,0-.41a2,2,0,0,0-.71-1.75,5.51,5.51,0,0,0-2.75-.47l-1.58,5.86a3.38,3.38,0,0,0-.09.41,2.23,2.23,0,0,0,0,.32.67.67,0,0,0,.26.54,1.86,1.86,0,0,0,1.08.21,10.28,10.28,0,0,0,3.72-.61,7.22,7.22,0,0,0,3.73-3.39l.58.11-1.41,4.66h-18L98.33,8.51h-.68l-1.42,5-.2.83,0,.2a1.77,1.77,0,0,0,0,.23c0,.43.1.7.31.8a4.51,4.51,0,0,0,1.43.26v.62H90.59v-.62a2.58,2.58,0,0,0,1.26-.42,2.4,2.4,0,0,0,.68-1.29l3-10.77.15-.57a4.09,4.09,0,0,0,.1-.79c0-.38-.11-.62-.32-.73A5.3,5.3,0,0,0,94,1V.39h6.6A10.58,10.58,0,0,1,104,.82a3,3,0,0,1,2.24,3.05,4,4,0,0,1-.38,1.6A4.06,4.06,0,0,1,104.62,7a5.32,5.32,0,0,1-1.45.8c-.33.11-.84.25-1.54.42.08.24.13.4.16.46l1.85,5.42a2.81,2.81,0,0,0,.8,1.38,2.42,2.42,0,0,0,1.23.32,2.64,2.64,0,0,0,1.22-.41,2.47,2.47,0,0,0,.68-1.29l2.94-10.77c.07-.27.13-.52.18-.74a2.73,2.73,0,0,0,.07-.57c0-.41-.11-.66-.32-.77A4.75,4.75,0,0,0,109,1V.39h12.93l-1,4.56-.64-.11a4.39,4.39,0,0,0-.57-2.47c-.61-.82-1.85-1.23-3.71-1.23a2.07,2.07,0,0,0-1.23.23A1.7,1.7,0,0,0,114.32,2.23ZM101.5,6.64a4.76,4.76,0,0,0,.77-1.31,4.68,4.68,0,0,0,.36-1.84,2.72,2.72,0,0,0-.5-1.67,2,2,0,0,0-1.7-.66.94.94,0,0,0-.71.22,1.81,1.81,0,0,0-.39.85L97.88,7.72a10.33,10.33,0,0,0,1.91-.16A3,3,0,0,0,101.5,6.64Z",opacity:1,strokeColor:"",fillColor:"#192760",width:121.306,height:16.899,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Accepted":e={iconName:"Accepted",pathdata:"M22.409294,0.00021190348 C22.64747,0.0056831966 22.875833,0.11701412 23.023336,0.32638185 23.631345,1.1873664 25.36437,2.8183636 27.4584,4.1123583 28.000408,4.4483535 28.015407,5.227338 27.477398,5.5713293 23.803344,7.9272954 12.881201,15.464245 9.4751583,23.800168 9.2091556,24.452168 8.3321453,24.542164 7.9521352,23.95016 6.0691143,21.014182 1.8990528,14.526234 0.095028103,11.832258 -0.13796928,11.485277 0.081027784,11.023275 0.49603404,10.97927 1.9670546,10.824272 4.8490969,10.421291,6.5811144,9.5293013 6.9811216,9.3233086 7.4691268,9.5782811 7.5601316,10.019287 7.847138,11.400286 8.4021459,13.83224 8.952148,14.781236 8.952148,14.781236 16.385246,3.2303471 21.985326,0.10638282 22.119951,0.031756414 22.266389,-0.003070501 22.409294,0.00021190348 z",opacity:1,strokeColor:"",fillColor:"#516c30",width:27.873,height:24.346,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"Rejected":e={iconName:"Rejected",pathdata:"M3.8779989,0 L11.294,7.4140023 18.710001,0 22.588001,3.8779911 15.172998,11.293032 22.588001,18.707033 18.710001,22.586 11.294,15.169985 3.8779989,22.586 0,18.707033 7.4150017,11.293032 0,3.8779911 z",opacity:1,strokeColor:"",fillColor:"#8a251a",width:22.588,height:22.586,stampFillColor:"#f6dedd",stampStrokeColor:""};break;case"Rejected_with_border":e={iconName:"Rejected_with_border",pathdata:"M3.8779989,0 L11.294,7.4140023 18.710001,0 22.588001,3.8779911 15.172998,11.293032 22.588001,18.707033 18.710001,22.586 11.294,15.169985 3.8779989,22.586 0,18.707033 7.4150017,11.293032 0,3.8779911 z",opacity:1,strokeColor:"",fillColor:"#192760",width:22.588,height:24.346,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"NotApproved":case"Not Approved":e={iconName:"Not Approved",pathdata:"M0,19.46a1.56,1.56,0,0,0,1.16-.9A19.84,19.84,0,0,0,2.1,15L4.42,2.84l-.09-.3a1.82,1.82,0,0,0-.64-1.06,2.41,2.41,0,0,0-1-.24V.48H6.88l4.49,13.64L13,5.78c.09-.52.17-1,.22-1.39a10.11,10.11,0,0,0,.13-1.34,1.83,1.83,0,0,0-.49-1.48,2.49,2.49,0,0,0-1.13-.33V.48H16v.76l-.29.06a1.42,1.42,0,0,0-1,1,23.7,23.7,0,0,0-.84,3.42L11,20.71h-.51L5.1,4.38,3,15c-.17.87-.28,1.53-.33,2a5.32,5.32,0,0,0,0,.79,1.69,1.69,0,0,0,.54,1.44,2.48,2.48,0,0,0,1.1.32v.76H0ZM17.73,4.53C19.54,1.51,21.55,0,23.79,0a4.4,4.4,0,0,1,3.66,1.92,8.52,8.52,0,0,1,1.43,5.19,17.56,17.56,0,0,1-2.53,9.07q-2.7,4.61-6.21,4.6a4.24,4.24,0,0,1-3.6-1.92,8.6,8.6,0,0,1-1.39-5.14A17.68,17.68,0,0,1,17.73,4.53ZM18.37,18c.33,1.19.93,1.78,1.8,1.78a2.83,2.83,0,0,0,2.22-1.29,16.41,16.41,0,0,0,2.06-4.93,35.53,35.53,0,0,0,1.06-4.83A28.26,28.26,0,0,0,25.9,4.6a5.86,5.86,0,0,0-.52-2.55A1.7,1.7,0,0,0,23.78,1Q21.2,1,19.45,7.53a33,33,0,0,0-1.33,8.26A8.15,8.15,0,0,0,18.37,18Zm11.08,1.48a2.34,2.34,0,0,0,1.3-.26,3,3,0,0,0,.85-1.85l3-15.85A3.54,3.54,0,0,0,32,2.56a8,8,0,0,0-1.82,3.16l-.53-.2.8-5H41.81l-.74,5.66-.54-.07c0-1.92-.41-3.24-1.13-3.94a2.6,2.6,0,0,0-1.74-.63L34.79,16.6l-.17,1a2.43,2.43,0,0,0,0,.33,2.26,2.26,0,0,0,0,.26c0,.5.11.82.33.95a3.94,3.94,0,0,0,1.39.3v.76H29.45Zm26.65.76H50.18v-.71a2.28,2.28,0,0,0,1.25-.41,1.64,1.64,0,0,0,.37-1.29c0-.22,0-.75-.11-1.58,0-.17-.08-.89-.2-2.15H47l-1.2,3c-.08.2-.15.42-.22.66a2.84,2.84,0,0,0-.09.69c0,.41.08.67.25.78a2.91,2.91,0,0,0,1.08.3v.71H42.79v-.71a2.44,2.44,0,0,0,.85-.53,5.59,5.59,0,0,0,.9-1.56L52.21.07h.53l2,16.88A5.46,5.46,0,0,0,55.2,19a1.36,1.36,0,0,0,.9.43Zm-4.76-7.31-.76-7.18-3,7.18Zm4.95,6.53a1.82,1.82,0,0,0,1-.5,3.56,3.56,0,0,0,.58-1.59L60.42,4.11c.06-.3.1-.6.15-.9a5.46,5.46,0,0,0,.06-.72c0-.52-.13-.86-.4-1a2.88,2.88,0,0,0-1.1-.23V.48h5.93a5,5,0,0,1,2.5.57c1.26.73,1.9,2.07,1.9,4a5.81,5.81,0,0,1-1.54,4.22,5.32,5.32,0,0,1-4,1.58l-.59,0-1.2-.11L61,16.6l-.17,1a2.72,2.72,0,0,0,0,.3,2.81,2.81,0,0,0,0,.29c0,.5.09.81.28.94a3.26,3.26,0,0,0,1.23.31v.76h-6Zm6-9.67.38.06H63a3,3,0,0,0,1.62-.36,2.87,2.87,0,0,0,1-1.18,7.28,7.28,0,0,0,.6-2,11.67,11.67,0,0,0,.22-2,4.4,4.4,0,0,0-.41-2,1.44,1.44,0,0,0-1.39-.79.71.71,0,0,0-.65.28,3.7,3.7,0,0,0-.32,1Zm5.61,9.69A1.86,1.86,0,0,0,69,18.94a3.54,3.54,0,0,0,.59-1.59L72.15,4.11q.09-.45.15-.9a5.73,5.73,0,0,0,.07-.72,1.1,1.1,0,0,0-.41-1,2.88,2.88,0,0,0-1.1-.23V.48h5.93a5,5,0,0,1,2.5.57c1.27.73,1.9,2.07,1.9,4a5.77,5.77,0,0,1-1.54,4.22,5.31,5.31,0,0,1-4,1.58l-.6,0-1.2-.11L72.74,16.6l-.17,1a2.72,2.72,0,0,0,0,.3c0,.1,0,.19,0,.29,0,.5.1.81.29.94a3.15,3.15,0,0,0,1.23.31v.76h-6.1Zm6.12-9.69.38.06h.33a3,3,0,0,0,1.62-.36,3,3,0,0,0,1-1.18,7.67,7.67,0,0,0,.59-2,11.67,11.67,0,0,0,.22-2,4.4,4.4,0,0,0-.41-2,1.43,1.43,0,0,0-1.38-.79.73.73,0,0,0-.66.28,3.7,3.7,0,0,0-.32,1Zm5.57,9.69a1.9,1.9,0,0,0,1.09-.52,3.56,3.56,0,0,0,.58-1.59L83.84,4.11c0-.27.09-.51.13-.71a7.08,7.08,0,0,0,.09-1c0-.47-.1-.77-.28-.9a3.53,3.53,0,0,0-1.22-.3V.48h5.68a6.57,6.57,0,0,1,3,.53q1.92,1,1.92,3.75a6.79,6.79,0,0,1-.32,2,5.23,5.23,0,0,1-1.08,1.9,4.56,4.56,0,0,1-1.25,1,11.62,11.62,0,0,1-1.33.52c.07.3.12.49.14.57l1.59,6.66a4.07,4.07,0,0,0,.69,1.7,1.72,1.72,0,0,0,1.13.41v.76H88.52l-2.23-9.76h-.58L84.49,16.6l-.17,1a1,1,0,0,0,0,.25,2.62,2.62,0,0,0,0,.28c0,.53.09.86.26,1a3.11,3.11,0,0,0,1.24.32v.76H79.63ZM87.55,9.3A2.59,2.59,0,0,0,89,8.17a7.24,7.24,0,0,0,.66-1.62A8.18,8.18,0,0,0,90,4.29a4.32,4.32,0,0,0-.43-2,1.5,1.5,0,0,0-1.45-.81.71.71,0,0,0-.62.26,2.78,2.78,0,0,0-.33,1.05L85.91,9.5A6.63,6.63,0,0,0,87.55,9.3Zm8.72-4.77Q99,0,102.32,0A4.37,4.37,0,0,1,106,1.92a8.46,8.46,0,0,1,1.44,5.19,17.58,17.58,0,0,1-2.54,9.07q-2.7,4.61-6.21,4.6a4.27,4.27,0,0,1-3.6-1.92,8.67,8.67,0,0,1-1.38-5.14A17.68,17.68,0,0,1,96.27,4.53ZM96.9,18c.33,1.19.93,1.78,1.8,1.78a2.83,2.83,0,0,0,2.22-1.29A16.63,16.63,0,0,0,103,13.54a37.1,37.1,0,0,0,1.06-4.83,29.49,29.49,0,0,0,.38-4.11,5.86,5.86,0,0,0-.51-2.55A1.71,1.71,0,0,0,102.31,1C100.6,1,99.15,3.17,98,7.53a33.42,33.42,0,0,0-1.33,8.26A8.57,8.57,0,0,0,96.9,18ZM114.35.48v.76a2.57,2.57,0,0,0-1.08.17,1.07,1.07,0,0,0-.5,1,2.53,2.53,0,0,0,0,.28,2.64,2.64,0,0,0,0,.28l1.07,11.76L117.77,6c.31-.71.59-1.41.84-2.11A5.25,5.25,0,0,0,119,2.19a.85.85,0,0,0-.38-.81,3.09,3.09,0,0,0-.95-.14V.48h4v.76a2.08,2.08,0,0,0-.73.45,5.35,5.35,0,0,0-.82,1.4l-7.79,17.69h-.66L110,5.74A22,22,0,0,0,109.46,2c-.16-.39-.58-.62-1.28-.71V.48Zm5.15,19a1.83,1.83,0,0,0,1.08-.52,3.42,3.42,0,0,0,.59-1.59l2.54-13.24c.06-.34.11-.64.15-.92a4.83,4.83,0,0,0,.06-.7c0-.5-.09-.81-.28-.94a3.14,3.14,0,0,0-1.22-.31V.48h11.12l-.87,5.6L132.11,6a7,7,0,0,0-.49-3c-.52-1-1.59-1.51-3.19-1.51-.55,0-.9.09-1.06.28A2.44,2.44,0,0,0,127,2.74L125.76,9.3a6.21,6.21,0,0,0,2.81-.51A6,6,0,0,0,130,6.18l.58.1L129,14.35l-.56-.14c0-.28,0-.52,0-.73s0-.37,0-.51a2.92,2.92,0,0,0-.61-2.15,3.55,3.55,0,0,0-2.37-.57l-1.36,7.2a4.79,4.79,0,0,0-.07.51,3.28,3.28,0,0,0,0,.39,1,1,0,0,0,.22.66,1.24,1.24,0,0,0,.93.26,6.43,6.43,0,0,0,3.21-.75,7.67,7.67,0,0,0,3.21-4.17l.5.13-1.22,5.74H119.5Zm12.79,0a1.87,1.87,0,0,0,1-.41,3.23,3.23,0,0,0,.71-1.71L136.5,4.11c.07-.38.13-.69.17-1a5.89,5.89,0,0,0,.05-.67c0-.5-.1-.81-.29-.94a3.32,3.32,0,0,0-1.22-.31V.48h6a5.35,5.35,0,0,1,4.63,2.22,10.11,10.11,0,0,1,1.58,6,13.3,13.3,0,0,1-2.34,7.84,8,8,0,0,1-6.86,3.7h-5.93ZM143.87,3.39a2.84,2.84,0,0,0-2.79-2,1.08,1.08,0,0,0-.91.31,1.93,1.93,0,0,0-.34.83L137,17.44a3.1,3.1,0,0,0-.06.39c0,.11,0,.21,0,.3a1.22,1.22,0,0,0,.24.84,1.26,1.26,0,0,0,.9.26q3.67,0,5.33-5.42a23.91,23.91,0,0,0,1-6.94A9.45,9.45,0,0,0,143.87,3.39Z",opacity:1,strokeColor:"",fillColor:"#8a251a",width:147.425,height:20.783,stampFillColor:"#f6dedd",stampStrokeColor:""};break;case"Draft":e={iconName:"Draft",pathdata:"M24.92,3Q22,.46,16.4.46h-11v.87a9.38,9.38,0,0,1,2.24.35q.54.23.54,1.08a3.24,3.24,0,0,1-.1.76c-.07.29-.17.65-.31,1.08L3.08,19.69a3.26,3.26,0,0,1-1.32,1.95A4.67,4.67,0,0,1,0,22.1V23H10.91q7.8,0,12.61-4.22a11.56,11.56,0,0,0,4.32-8.94A8.58,8.58,0,0,0,24.92,3ZM20.41,15.66a10.18,10.18,0,0,1-9.8,6.18A3.18,3.18,0,0,1,9,21.54a1,1,0,0,1-.46-.95,2.47,2.47,0,0,1,0-.35,3,3,0,0,1,.1-.44l5.24-17a1.91,1.91,0,0,1,.62-.95,2.81,2.81,0,0,1,1.66-.35c2.44,0,4.15.76,5.15,2.27a7.29,7.29,0,0,1,.94,4A17.63,17.63,0,0,1,20.41,15.66ZM49.75,9.74a5.84,5.84,0,0,0,2-2.16,5.1,5.1,0,0,0,.59-2.24c0-2.1-1.18-3.53-3.54-4.27A18.67,18.67,0,0,0,43.36.46H32.92v.87a8.79,8.79,0,0,1,2.24.35c.35.14.52.48.52,1a5.36,5.36,0,0,1-.17,1.11c-.06.23-.14.5-.23.8L30.61,19.7a3.26,3.26,0,0,1-1.08,1.81,4.44,4.44,0,0,1-2,.59V23H38.85V22.1a8.54,8.54,0,0,1-2.28-.36c-.32-.15-.49-.53-.49-1.13,0-.11,0-.21,0-.32a1.15,1.15,0,0,1,.06-.28l.31-1.16,2.25-7h1.07L43.89,23h7.64V22.1a4.27,4.27,0,0,1-2.07-.47,3.91,3.91,0,0,1-1.27-1.93l-2.92-7.6a4.67,4.67,0,0,1-.25-.65c1.1-.23,1.91-.42,2.43-.59A8.49,8.49,0,0,0,49.75,9.74ZM46,7.39a6.73,6.73,0,0,1-1.21,1.84,5,5,0,0,1-2.72,1.29,19.56,19.56,0,0,1-3,.23L41.38,3A2.54,2.54,0,0,1,42,1.85a1.76,1.76,0,0,1,1.14-.31,3.38,3.38,0,0,1,2.69.93,3.52,3.52,0,0,1,.79,2.34A5.94,5.94,0,0,1,46,7.39Zm27.9,11.85L70.29,0h-1L55.21,19.78a6.61,6.61,0,0,1-1.66,1.78,5.3,5.3,0,0,1-1.55.6V23h7.45v-.81a8,8,0,0,1-2-.34.85.85,0,0,1-.47-.89,2,2,0,0,1,.17-.79,5.32,5.32,0,0,1,.4-.75L59.8,16H68c.22,1.44.35,2.25.37,2.45a16,16,0,0,1,.2,1.81,1.51,1.51,0,0,1-.67,1.47,6.38,6.38,0,0,1-2.31.46V23H77.1v-.81a4.28,4.28,0,0,1-2.28-.55A4.47,4.47,0,0,1,73.93,19.24ZM60.7,14.64l5.62-8.19,1.4,8.19ZM84,.46h20.2l-1.61,6.39-1-.15a5.61,5.61,0,0,0-.88-3.43Q99.2,1.52,94.86,1.51a3.56,3.56,0,0,0-1.76.3A2.05,2.05,0,0,0,92.34,3L90.1,10.5A16.53,16.53,0,0,0,95,9.91c.77-.33,1.62-1.32,2.56-3l1.06.12-2.82,9.2-1-.17c0-.33.08-.61.1-.85s0-.43,0-.56a2.76,2.76,0,0,0-1-2.38c-.66-.49-2.07-.73-4.23-.73l-2.5,8.22a3.56,3.56,0,0,0-.09.39,1.55,1.55,0,0,0,0,.37,1.32,1.32,0,0,0,1,1.33,5.52,5.52,0,0,0,1.78.21V23H78.58V22.1a4.35,4.35,0,0,0,2-.61,3.33,3.33,0,0,0,1.06-1.8L86.32,4.6c.09-.31.16-.58.23-.81a5.05,5.05,0,0,0,.16-1.1c0-.53-.17-.87-.52-1A8.7,8.7,0,0,0,84,1.33Zm24.1,0h20.89l-1.37,6.46-1-.08c-.07-2.2-.76-3.69-2.09-4.49a6.61,6.61,0,0,0-3.2-.72L116,18.84,115.7,20a2.63,2.63,0,0,0-.07.38,1.51,1.51,0,0,0,0,.3c0,.57.2.94.61,1.08a11.19,11.19,0,0,0,2.56.34V23H106.2V22.1a6.49,6.49,0,0,0,2.4-.3,3.19,3.19,0,0,0,1.56-2.1l5.58-18.07a9.07,9.07,0,0,0-4.83,1.2,9.52,9.52,0,0,0-3.34,3.61l-1-.23Z",opacity:1,strokeColor:"",fillColor:"#192760",width:128.941,height:22.97,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Final":e={iconName:"Final",pathdata:"M24.94,6l-1.06-.13a4.37,4.37,0,0,0-.91-3q-1.51-1.54-6-1.54a4.28,4.28,0,0,0-1.83.26,1.8,1.8,0,0,0-.78,1.08L12,9.21a20.26,20.26,0,0,0,5.15-.52A6.49,6.49,0,0,0,19.8,6.1l1.1.1L18,14.27l-1.09-.15a6.34,6.34,0,0,0,.11-.74c0-.22,0-.38,0-.5a2.26,2.26,0,0,0-1-2.09c-.68-.42-2.15-.63-4.39-.63L9,17.37a3.09,3.09,0,0,0-.1.34,1.22,1.22,0,0,0,0,.32,1.18,1.18,0,0,0,1,1.17,7,7,0,0,0,1.86.18v.77H0v-.77a5.14,5.14,0,0,0,2.11-.53,3,3,0,0,0,1.1-1.58L8.06,4c.09-.27.17-.5.23-.7a3.74,3.74,0,0,0,.18-1,.83.83,0,0,0-.55-.89,10.94,10.94,0,0,0-2.33-.3V.4h21Zm8.54,12.11a1.49,1.49,0,0,1,0-.28,2.46,2.46,0,0,1,.07-.29l.3-1L38.76,3.29a2.93,2.93,0,0,1,1.09-1.6A5.42,5.42,0,0,1,42,1.17V.4H30.17v.77a10.52,10.52,0,0,1,2.34.31.88.88,0,0,1,.56.94,2.58,2.58,0,0,1-.11.67c-.07.26-.18.57-.32,1L27.79,17.28a2.94,2.94,0,0,1-1.12,1.59,5.28,5.28,0,0,1-2.09.51v.77H36.36v-.77A10.22,10.22,0,0,1,34,19.07.89.89,0,0,1,33.48,18.12ZM66.19,2.24a2.53,2.53,0,0,1,1.87-1l.56-.06V.4H60.5v.77a8,8,0,0,1,2.16.33,1.47,1.47,0,0,1,1,1.48,5.61,5.61,0,0,1-.25,1.34c-.11.4-.25.87-.43,1.38l-3.08,8.35L51.26.4h-8v.77a8.44,8.44,0,0,1,1.86.24,2.26,2.26,0,0,1,1.22,1.05l.17.31L42.11,14.88a13.74,13.74,0,0,1-1.8,3.61,3.36,3.36,0,0,1-2.22.89v.77h8.23v-.77a7.75,7.75,0,0,1-2.1-.31,1.45,1.45,0,0,1-1-1.44,3.56,3.56,0,0,1,.1-.79,16.15,16.15,0,0,1,.64-2L47.85,4.31,58.11,20.64h1l5.5-15A15.48,15.48,0,0,1,66.19,2.24Zm23,17.13v.78H78.08v-.71A7.47,7.47,0,0,0,80.49,19a1.25,1.25,0,0,0,.7-1.29A13.26,13.26,0,0,0,81,16.16c0-.18-.16-.89-.39-2.15H72.06l-2.3,3a3.7,3.7,0,0,0-.42.66,1.54,1.54,0,0,0-.18.69.74.74,0,0,0,.49.78,10.28,10.28,0,0,0,2.06.3v.71H63.94v-.71a6.43,6.43,0,0,0,1.63-.53,6.63,6.63,0,0,0,1.72-1.56L82,0h1l3.78,16.88A3.69,3.69,0,0,0,87.7,19,3.53,3.53,0,0,0,89.24,19.37Zm-8.93-6.53L78.86,5.65,73,12.84Zm32.8,1.44a11.51,11.51,0,0,1-5.23,3.88,21.36,21.36,0,0,1-7,1A4.88,4.88,0,0,1,99.22,19a.74.74,0,0,1-.58-.71,2.33,2.33,0,0,1,0-.48c0-.13.08-.28.13-.43L104,3.29a2.72,2.72,0,0,1,1.19-1.64,9.4,9.4,0,0,1,2.79-.48V.4H95.4v.77a10.42,10.42,0,0,1,2.34.31.88.88,0,0,1,.56.94,2.58,2.58,0,0,1-.11.67c-.07.25-.17.57-.31.94L93,17.27a2.92,2.92,0,0,1-1.12,1.6,4.59,4.59,0,0,1-1.71.47v.81h21.55l2.32-5.74Z",opacity:1,strokeColor:"",fillColor:"#516c30",width:114.058,height:20.639,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"Completed":e={iconName:"Completed",pathdata:"M16.37,0,15.08,6.9l-.79-.17c0-.41,0-.66,0-.73a2.73,2.73,0,0,0,0-.32,5.33,5.33,0,0,0-.94-3.47A3,3,0,0,0,11,1.07c-2,0-3.68,1.51-5.13,4.55a18.84,18.84,0,0,0-2,8.29q0,3.06,1.2,4.2a3.82,3.82,0,0,0,2.64,1.13,5.3,5.3,0,0,0,3.51-1.43,10.75,10.75,0,0,0,1.78-2.09l.77.65a9.32,9.32,0,0,1-3.12,3.35A7,7,0,0,1,7,20.81a6.66,6.66,0,0,1-5-2.08,7.72,7.72,0,0,1-2-5.57A14.57,14.57,0,0,1,3.05,3.92Q6.1,0,10.29,0A8.92,8.92,0,0,1,13,.43a9.09,9.09,0,0,0,1.65.43.72.72,0,0,0,.6-.23A2.55,2.55,0,0,0,15.6,0ZM32.83,7.11a15.24,15.24,0,0,1-3.11,9.07q-3.31,4.61-7.63,4.6a5.63,5.63,0,0,1-4.42-1.92A7.47,7.47,0,0,1,16,13.72a15.27,15.27,0,0,1,3.18-9.19Q22.46,0,26.57,0a5.82,5.82,0,0,1,4.5,1.92A7.35,7.35,0,0,1,32.83,7.11ZM29.16,4.6a4.92,4.92,0,0,0-.63-2.55,2.14,2.14,0,0,0-2-1.06Q23.4,1,21.24,7.53a27.45,27.45,0,0,0-1.63,8.26A6.68,6.68,0,0,0,19.92,18a2.24,2.24,0,0,0,2.2,1.78,3.71,3.71,0,0,0,2.73-1.29,15,15,0,0,0,2.54-4.93,30.56,30.56,0,0,0,1.3-4.83A23,23,0,0,0,29.16,4.6Zm21.2,13.62a3.83,3.83,0,0,1,.08-.75,8.6,8.6,0,0,1,.19-.88L53.75,3.31a3,3,0,0,1,.85-1.67,2.72,2.72,0,0,1,1.21-.4V.48H50.42L42.66,14.39,41.21.48h-5.8v.76a4.65,4.65,0,0,1,1.45.21c.26.11.38.37.38.78a4.57,4.57,0,0,1-.08.75c-.06.28-.13.61-.23,1L34.34,15a16.85,16.85,0,0,1-1.16,3.65,1.9,1.9,0,0,1-1.42.86v.76h5.3v-.76a3.22,3.22,0,0,1-1.32-.29A1.48,1.48,0,0,1,35,17.74a8.32,8.32,0,0,1,.17-1.42c.07-.37.17-.82.3-1.37L38.06,4.23l1.71,16.38h.71L50,3.76l-3.2,13.58A2.84,2.84,0,0,1,46,19a4.06,4.06,0,0,1-1.76.49v.76h7.93v-.76a4.79,4.79,0,0,1-1.49-.31Q50.36,19,50.36,18.22ZM67.69,9.29a7.39,7.39,0,0,1-4.89,1.58l-.73,0-1.48-.11L59.21,16.6l-.21,1a1,1,0,0,0,0,.3,2.83,2.83,0,0,0,0,.29c0,.5.12.81.35.94a4.74,4.74,0,0,0,1.51.31v.76H53.31v-.76a2.52,2.52,0,0,0,1.33-.52,3.18,3.18,0,0,0,.72-1.59L58.48,4.11q.1-.45.18-.9a4.48,4.48,0,0,0,.08-.72,1,1,0,0,0-.49-1,4.36,4.36,0,0,0-1.36-.23V.48h7.29a7.29,7.29,0,0,1,3.07.57,4,4,0,0,1,2.33,4A5.22,5.22,0,0,1,67.69,9.29Zm-1.8-5a3.65,3.65,0,0,0-.51-2,1.85,1.85,0,0,0-1.7-.79,1,1,0,0,0-.8.28,3.27,3.27,0,0,0-.4,1l-1.66,7,.47.06h.41a4.37,4.37,0,0,0,2-.36,3.14,3.14,0,0,0,1.2-1.18,6.51,6.51,0,0,0,.74-2A9.87,9.87,0,0,0,65.89,4.25Zm16.9,10.1a8.71,8.71,0,0,1-3.35,3.88,9.36,9.36,0,0,1-4.53,1,2.15,2.15,0,0,1-1-.21.75.75,0,0,1-.37-.71,3.18,3.18,0,0,1,0-.47c0-.14,0-.28.08-.44l3.3-14.08a2.94,2.94,0,0,1,.77-1.64,4.47,4.47,0,0,1,1.79-.48V.48h-8v.76a4.8,4.8,0,0,1,1.5.31c.23.13.35.44.35.94a4.36,4.36,0,0,1-.06.67c0,.26-.12.57-.21,1L69.9,17.34a3.18,3.18,0,0,1-.72,1.6,2.53,2.53,0,0,1-1.34.52v.76H81.91l1.49-5.74ZM85.73,1.24a4.59,4.59,0,0,1,1.5.31c.23.13.34.44.34.94a3.84,3.84,0,0,1-.07.7c0,.28-.11.58-.19.92L84.2,17.35a3.18,3.18,0,0,1-.72,1.59,2.27,2.27,0,0,1-1.06.47h-.07v.8H96.2l1.5-5.74-.62-.13a8.14,8.14,0,0,1-3.94,4.17,9.39,9.39,0,0,1-3.94.75A1.75,1.75,0,0,1,88.06,19a.87.87,0,0,1-.27-.66,3.28,3.28,0,0,1,0-.39,5,5,0,0,1,.09-.51l1.67-7.2a5.16,5.16,0,0,1,2.91.57A2.58,2.58,0,0,1,93.24,13c0,.14,0,.31,0,.51s0,.45-.07.73l.7.14,1.88-8.07L95,6.18a5.62,5.62,0,0,1-1.74,2.61,9.05,9.05,0,0,1-3.45.51l1.51-6.56a2.23,2.23,0,0,1,.47-1.06,2,2,0,0,1,1.3-.28c2,0,3.29.5,3.93,1.51a6.13,6.13,0,0,1,.6,3l.68.13L99.4.48H85.73ZM114,6.14l.92-5.66h-14l-1,5,.66.2a7.81,7.81,0,0,1,2.23-3.16,4.91,4.91,0,0,1,3.23-1.06l-3.73,15.85a2.84,2.84,0,0,1-1,1.85,3.48,3.48,0,0,1-1.6.26v.76h8.4v-.76a5.82,5.82,0,0,1-1.71-.3c-.27-.13-.41-.45-.41-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.21-1,3.53-15.1a3.65,3.65,0,0,1,2.14.63c.89.7,1.35,2,1.39,3.94Zm9.44,12.38a9.39,9.39,0,0,1-3.94.75,1.77,1.77,0,0,1-1.14-.26.87.87,0,0,1-.27-.66,3.28,3.28,0,0,1,0-.39,5,5,0,0,1,.09-.51l1.67-7.2a5.12,5.12,0,0,1,2.91.57,2.58,2.58,0,0,1,.75,2.15c0,.14,0,.31,0,.51s0,.45-.07.73l.7.14L126,6.28l-.7-.1a5.78,5.78,0,0,1-1.74,2.61,9.16,9.16,0,0,1-3.46.51l1.51-6.56a2.14,2.14,0,0,1,.48-1.06,2,2,0,0,1,1.3-.28c2,0,3.28.5,3.92,1.51a6,6,0,0,1,.6,3l.68.13,1.08-5.6H116v.76a4.67,4.67,0,0,1,1.51.31c.22.13.34.44.34.94a4,4,0,0,1-.08.7c0,.28-.11.58-.18.92l-3.12,13.24a3.18,3.18,0,0,1-.72,1.59,2.56,2.56,0,0,1-1.34.52v.76h14.06l1.5-5.74-.62-.13A8.14,8.14,0,0,1,123.39,18.52Zm23.32-9.84a11.62,11.62,0,0,1-2.89,7.84,10.6,10.6,0,0,1-8.42,3.7h-7.29v-.76a2.58,2.58,0,0,0,1.18-.41,2.94,2.94,0,0,0,.88-1.71l3.11-13.23c.09-.38.16-.69.21-1a4.49,4.49,0,0,0,.07-.67c0-.5-.12-.81-.36-.94a4.8,4.8,0,0,0-1.5-.31V.48h7.36a7.16,7.16,0,0,1,5.69,2.22A8.72,8.72,0,0,1,146.71,8.68ZM143,6.87a8,8,0,0,0-.64-3.48,3.52,3.52,0,0,0-3.44-2,1.52,1.52,0,0,0-1.11.31,1.75,1.75,0,0,0-.41.83l-3.5,14.9c0,.14,0,.27-.07.39s0,.21,0,.3a1.06,1.06,0,0,0,.3.84,1.75,1.75,0,0,0,1.1.26q4.53,0,6.55-5.42A19.84,19.84,0,0,0,143,6.87Z",opacity:1,strokeColor:"",fillColor:"#516c30",width:146.706,height:20.811,stampFillColor:"#e6eddf",stampStrokeColor:""};break;case"ForPublicRelease":case"For Public Release":e={iconName:"For Public Release",pathdata:"M10.33.48l-.65,5.6L9.27,6a9.74,9.74,0,0,0-.36-3A2.27,2.27,0,0,0,6.57,1.4a.85.85,0,0,0-.71.26,2.67,2.67,0,0,0-.3,1.08L4.65,9.28a3.45,3.45,0,0,0,2-.52,6.65,6.65,0,0,0,1-2.59l.43.1L7,14.34l-.42-.14c0-.29,0-.54,0-.75s0-.38,0-.49a4.17,4.17,0,0,0-.39-2.09,1.91,1.91,0,0,0-1.71-.64l-1,7.21c0,.13,0,.24,0,.35s0,.21,0,.31a1.45,1.45,0,0,0,.38,1.17,1.17,1.17,0,0,0,.72.19v.76H0v-.76a1.31,1.31,0,0,0,.82-.54,4.39,4.39,0,0,0,.42-1.58L3.13,4.11c0-.27.06-.51.09-.71,0-.41.07-.73.07-1a1.34,1.34,0,0,0-.21-.9,2.13,2.13,0,0,0-.91-.3V.48ZM20.5,7.11a22.43,22.43,0,0,1-1.88,9.07q-2,4.61-4.62,4.6a3,3,0,0,1-2.67-1.92,10.91,10.91,0,0,1-1-5.14,22.46,22.46,0,0,1,1.92-9.19Q14.23,0,16.71,0a3.11,3.11,0,0,1,2.72,1.92A10.72,10.72,0,0,1,20.5,7.11ZM18.28,4.6a7.7,7.7,0,0,0-.38-2.55c-.26-.7-.65-1-1.19-1-1.28,0-2.35,2.17-3.22,6.53a43.69,43.69,0,0,0-1,8.26,10.72,10.72,0,0,0,.19,2.2c.24,1.18.69,1.77,1.33,1.77s1.16-.43,1.65-1.29a19.35,19.35,0,0,0,1.54-4.93A48.7,48.7,0,0,0,18,8.71,38.21,38.21,0,0,0,18.28,4.6Zm11.59.16a8.73,8.73,0,0,1-.24,2,5.64,5.64,0,0,1-.8,1.9,3.49,3.49,0,0,1-.93,1,7.31,7.31,0,0,1-1,.52c0,.3.08.49.1.57l1.18,6.66a4.54,4.54,0,0,0,.52,1.7,1.1,1.1,0,0,0,.83.41v.76H26.46l-1.65-9.76h-.43l-.91,6.14-.13,1a2,2,0,0,0,0,.25,2.62,2.62,0,0,0,0,.28,1.57,1.57,0,0,0,.2,1,1.77,1.77,0,0,0,.92.32v.76H19.86v-.76a1.33,1.33,0,0,0,.81-.52,4.35,4.35,0,0,0,.43-1.59L23,4.11c0-.27.07-.51.09-.71a8.23,8.23,0,0,0,.07-1,1.3,1.3,0,0,0-.21-.9,2.08,2.08,0,0,0-.91-.3V.48h4.22A3.79,3.79,0,0,1,28.44,1C29.4,1.66,29.87,2.91,29.87,4.76Zm-2.31-.47a5.77,5.77,0,0,0-.32-2,1.12,1.12,0,0,0-1.09-.81.5.5,0,0,0-.46.26,3.87,3.87,0,0,0-.24,1.05L24.52,9.5a3.73,3.73,0,0,0,1.22-.2,2.1,2.1,0,0,0,1.1-1.13,8.41,8.41,0,0,0,.49-1.62A10.75,10.75,0,0,0,27.56,4.29Zm14.92.78a7.06,7.06,0,0,1-1.14,4.22,3.5,3.5,0,0,1-3,1.58l-.44,0-.89-.11-.84,5.86-.12,1a1.45,1.45,0,0,0,0,.3,2.81,2.81,0,0,0,0,.29,1.38,1.38,0,0,0,.21.94,1.93,1.93,0,0,0,.91.31v.76H32.65v-.76a1.28,1.28,0,0,0,.8-.52,4.3,4.3,0,0,0,.44-1.59L35.77,4.11c0-.3.08-.6.11-.9a5.21,5.21,0,0,0,0-.72,1.29,1.29,0,0,0-.3-1,1.82,1.82,0,0,0-.81-.23V.48h4.4a3,3,0,0,1,1.86.57C42,1.78,42.48,3.12,42.48,5.07Zm-2.23-.82a5.74,5.74,0,0,0-.3-2,1.07,1.07,0,0,0-1-.79.5.5,0,0,0-.49.28,5.11,5.11,0,0,0-.24,1l-1,7,.28.06h.25a1.79,1.79,0,0,0,1.2-.36,2.88,2.88,0,0,0,.73-1.18,10.56,10.56,0,0,0,.44-2A15.74,15.74,0,0,0,40.25,4.25Zm12.91-3V.48H50v.76a1.46,1.46,0,0,1,.82.32A2,2,0,0,1,51.24,3a15,15,0,0,1-.14,1.57q0-.17-.15,1.17l-.89,6.16a29.63,29.63,0,0,1-1,4.77c-.55,1.63-1.31,2.44-2.28,2.44a1.59,1.59,0,0,1-1.38-.77,4.16,4.16,0,0,1-.5-2.23q0-.63.15-2c.06-.5.15-1.14.27-1.93l1.26-8.84a4.13,4.13,0,0,1,.46-1.66,1.66,1.66,0,0,1,1-.46V.48H43.34v.76a2,2,0,0,1,.9.3,1.3,1.3,0,0,1,.21.9,7.27,7.27,0,0,1,0,.75c0,.29-.07.59-.11.92l-1,7.24c-.16,1.14-.27,1.93-.32,2.38a19.16,19.16,0,0,0-.12,2,6.13,6.13,0,0,0,1,3.71,2.93,2.93,0,0,0,2.43,1.33c1.39,0,2.45-.9,3.17-2.69a29.58,29.58,0,0,0,1.23-5.61l1-6.74A24.45,24.45,0,0,1,52.3,2.1,1.22,1.22,0,0,1,53.16,1.24Zm7.14,9.82a5.87,5.87,0,0,1,.68,3,8.55,8.55,0,0,1-1,4.27,3.68,3.68,0,0,1-3.48,1.84H51.82v-.76a1.3,1.3,0,0,0,.72-.4,3.94,3.94,0,0,0,.52-1.71L55,4.1c0-.39.09-.72.12-1s0-.46,0-.6c0-.53-.07-.86-.23-1A1.64,1.64,0,0,0,54,1.24V.48h4.17a3.4,3.4,0,0,1,2.67,1,4.91,4.91,0,0,1,1,3.38,5.33,5.33,0,0,1-1.17,3.61,4.8,4.8,0,0,1-1.68,1.22A4.84,4.84,0,0,1,60.3,11.06Zm-1.66,2.45a3.81,3.81,0,0,0-.73-2.74,2.63,2.63,0,0,0-1.58-.52l-1,7.2a4,4,0,0,0-.05.4c0,.15,0,.32,0,.51a.9.9,0,0,0,.33.82,1.13,1.13,0,0,0,.59.12c1,0,1.67-.87,2.1-2.59A13.54,13.54,0,0,0,58.64,13.51Zm.12-5.29A5.92,5.92,0,0,0,59.4,6.1a12.74,12.74,0,0,0,.13-1.74,6.54,6.54,0,0,0-.29-2.11,1.11,1.11,0,0,0-1.13-.81.49.49,0,0,0-.49.32,3.52,3.52,0,0,0-.23,1l-.94,6.62A7.45,7.45,0,0,0,58,9,1.8,1.8,0,0,0,58.76,8.22Zm11.71,6.14a8.78,8.78,0,0,1-2,3.87,4,4,0,0,1-2.74,1,.89.89,0,0,1-.63-.21.93.93,0,0,1-.22-.7,3.4,3.4,0,0,1,0-.48c0-.14,0-.28,0-.44l2-14.08a3.8,3.8,0,0,1,.47-1.64,1.94,1.94,0,0,1,1.08-.48V.48H63.6v.76a2,2,0,0,1,.91.31,1.36,1.36,0,0,1,.22.94c0,.2,0,.42,0,.67s-.07.57-.13,1L62.68,17.34a4.31,4.31,0,0,1-.44,1.6,1.28,1.28,0,0,1-.8.52v.76h8.5l.9-5.74ZM76.89.48H72.32v.76a1.92,1.92,0,0,1,.9.31c.15.13.22.44.22.94a5.56,5.56,0,0,1,0,.67c0,.26-.07.57-.12,1L71.39,17.35A4.35,4.35,0,0,1,71,18.94a1.33,1.33,0,0,1-.81.52v.76h4.57v-.76a1.81,1.81,0,0,1-.91-.32,1.39,1.39,0,0,1-.21-.94c0-.09,0-.18,0-.28l0-.3.12-1L75.65,3.36a4.43,4.43,0,0,1,.43-1.6,1.3,1.3,0,0,1,.81-.52Zm8.46.15A.38.38,0,0,1,85,.87a4.12,4.12,0,0,1-1-.44A3.51,3.51,0,0,0,82.37,0Q79.84,0,78,3.92a21.42,21.42,0,0,0-1.84,9.24,11.15,11.15,0,0,0,1.2,5.57,3.51,3.51,0,0,0,3.05,2.08,3.15,3.15,0,0,0,2.21-1.09,8.92,8.92,0,0,0,1.89-3.35L84,15.72A11.08,11.08,0,0,1,83,17.81a2.71,2.71,0,0,1-2.12,1.43,2,2,0,0,1-1.59-1.13,8.33,8.33,0,0,1-.74-4.2A29.46,29.46,0,0,1,79.7,5.62Q81,1.08,82.8,1.07c.59,0,1.07.38,1.45,1.14a8,8,0,0,1,.57,3.47,2.73,2.73,0,0,1,0,.32c0,.08,0,.32,0,.73l.48.17L86.05,0h-.47A2.93,2.93,0,0,1,85.35.63Zm21.41,13.73.37.12-.9,5.74H94.72l-1.66-9.76h-.43l-.91,6.14-.13,1c0,.08,0,.16,0,.25s0,.19,0,.28a1.57,1.57,0,0,0,.2,1,1.81,1.81,0,0,0,.92.32v.76H88.11v-.76a1.3,1.3,0,0,0,.81-.52,4.35,4.35,0,0,0,.43-1.59L91.24,4.11c0-.27.07-.51.09-.71a8.23,8.23,0,0,0,.07-1,1.3,1.3,0,0,0-.21-.9,2.08,2.08,0,0,0-.91-.3V.48h4.23A3.81,3.81,0,0,1,96.7,1c1,.65,1.43,1.9,1.43,3.75a8.73,8.73,0,0,1-.24,2,5.66,5.66,0,0,1-.81,1.9,3.49,3.49,0,0,1-.93,1,6.73,6.73,0,0,1-1,.52c0,.3.09.49.1.57l1.18,6.66a4.74,4.74,0,0,0,.52,1.7,1,1,0,0,0,.78.39,1.23,1.23,0,0,0,.78-.5A4.3,4.3,0,0,0,99,17.35l1.88-13.24c.05-.34.09-.64.12-.92a6.28,6.28,0,0,0,0-.7,1.45,1.45,0,0,0-.2-.94,2,2,0,0,0-.91-.31V.48h8.26l-.65,5.6L107.1,6a9.57,9.57,0,0,0-.36-3,2.3,2.3,0,0,0-2.38-1.51c-.41,0-.67.09-.78.28a2.87,2.87,0,0,0-.29,1.06l-.91,6.56a3.57,3.57,0,0,0,2.08-.51,6.59,6.59,0,0,0,1.06-2.61l.42.1-1.14,8.08-.42-.15c0-.28,0-.52.05-.73s0-.37,0-.51a3.6,3.6,0,0,0-.46-2.15,2.14,2.14,0,0,0-1.75-.57l-1,7.2a4.7,4.7,0,0,0-.06.51c0,.16,0,.29,0,.39a1.12,1.12,0,0,0,.17.66.77.77,0,0,0,.69.26,3.77,3.77,0,0,0,2.37-.75A7.71,7.71,0,0,0,106.76,14.36ZM95.09,8.17a7.75,7.75,0,0,0,.49-1.62,10.75,10.75,0,0,0,.23-2.26,5.77,5.77,0,0,0-.32-2,1.11,1.11,0,0,0-1.08-.81.48.48,0,0,0-.46.26,3.44,3.44,0,0,0-.25,1.05L92.78,9.5A3.78,3.78,0,0,0,94,9.3,2.08,2.08,0,0,0,95.09,8.17Zm21.32,6.19a8.67,8.67,0,0,1-2,3.87,4,4,0,0,1-2.73,1,.89.89,0,0,1-.63-.21.93.93,0,0,1-.23-.7c0-.19,0-.35,0-.48s0-.28,0-.44l2-14.08a3.84,3.84,0,0,1,.46-1.64,2,2,0,0,1,1.08-.48V.48h-4.86v.76a2,2,0,0,1,.91.31,1.38,1.38,0,0,1,.21.94,5.56,5.56,0,0,1,0,.67c0,.26-.07.57-.12,1l-1.89,13.23a4.16,4.16,0,0,1-.43,1.6,1.27,1.27,0,0,1-.81.52v.76h8.51l.9-5.74Zm8.64,0a7.71,7.71,0,0,1-2.38,4.16,3.82,3.82,0,0,1-2.38.75.77.77,0,0,1-.69-.26,1.2,1.2,0,0,1-.17-.66c0-.1,0-.23,0-.39a4.7,4.7,0,0,1,.06-.51l1-7.2a2.17,2.17,0,0,1,1.76.57,3.69,3.69,0,0,1,.45,2.15c0,.14,0,.31,0,.51s0,.45,0,.73l.42.15,1.13-8.08-.42-.1a6.79,6.79,0,0,1-1,2.61,3.63,3.63,0,0,1-2.09.51l.91-6.56a2.87,2.87,0,0,1,.29-1.06c.12-.19.38-.28.78-.28A2.3,2.3,0,0,1,125,2.91a9.57,9.57,0,0,1,.36,3l.41.13.65-5.6h-8.26v.76a1.93,1.93,0,0,1,.91.31,1.45,1.45,0,0,1,.2.94,6.28,6.28,0,0,1,0,.7c0,.28-.07.58-.11.92l-1.89,13.24a4.35,4.35,0,0,1-.43,1.59,1.33,1.33,0,0,1-.81.52v.76h8.5l.91-5.74Zm10.29,5.15v.71h-4.65v-.71a1.44,1.44,0,0,0,.93-.41,2.08,2.08,0,0,0,.27-1.29c0-.22,0-.75-.08-1.58,0-.17-.06-.89-.15-2.15h-3.31l-.89,3a5.32,5.32,0,0,0-.16.66,3.4,3.4,0,0,0-.08.69,1.06,1.06,0,0,0,.2.78,1.68,1.68,0,0,0,.79.3v.71h-3v-.71a1.8,1.8,0,0,0,.63-.53,6.45,6.45,0,0,0,.67-1.56L132.19.07h.4L134.06,17a7.15,7.15,0,0,0,.36,2.08A1.13,1.13,0,0,0,135.34,19.51Zm-3.79-6.6L131,5.73l-2.27,7.18Zm9.6-4-1.32-2.09a4.57,4.57,0,0,1-.47-.94,5.12,5.12,0,0,1-.28-1.78,5.57,5.57,0,0,1,.27-1.77c.27-.83.7-1.24,1.29-1.24s1.21.51,1.57,1.54A8.78,8.78,0,0,1,142.65,5l.06,1,.39.1.63-5.91h-.46a2.09,2.09,0,0,1-.25.54.46.46,0,0,1-.41.21.57.57,0,0,1-.24-.05,1.23,1.23,0,0,1-.26-.12l-.39-.24a2.34,2.34,0,0,0-.5-.25,2.41,2.41,0,0,0-.85-.16,2.55,2.55,0,0,0-2.31,1.67,9.11,9.11,0,0,0-.83,4.05,10.47,10.47,0,0,0,1.88,5.5A9.21,9.21,0,0,1,141,16a6.49,6.49,0,0,1-.5,2.63,1.59,1.59,0,0,1-1.43,1.14,1.42,1.42,0,0,1-1-.4,3.55,3.55,0,0,1-.78-1.16,7.09,7.09,0,0,1-.52-1.92c-.05-.43-.1-1.12-.13-2.06l-.44-.06-.55,6.62h.46a4.11,4.11,0,0,1,.25-.82.36.36,0,0,1,.36-.23.47.47,0,0,1,.17,0,2.38,2.38,0,0,1,.27.18l.39.27a3.52,3.52,0,0,0,.84.43,2.48,2.48,0,0,0,.84.15,2.91,2.91,0,0,0,2.63-1.88,9.24,9.24,0,0,0,1-4.21,9.85,9.85,0,0,0-.49-3.24A12.1,12.1,0,0,0,141.15,8.92Zm7.75-7.24c.12-.19.38-.28.78-.28a2.3,2.3,0,0,1,2.38,1.51,9.57,9.57,0,0,1,.36,3l.41.13.65-5.6h-8.26v.76a1.93,1.93,0,0,1,.91.31c.14.13.2.44.2.94a6.28,6.28,0,0,1,0,.7c0,.28-.07.58-.11.92l-1.89,13.24a4.35,4.35,0,0,1-.43,1.59,1.33,1.33,0,0,1-.81.52v.76h8.5l.91-5.74-.38-.12a7.71,7.71,0,0,1-2.38,4.16,3.82,3.82,0,0,1-2.38.75.77.77,0,0,1-.69-.26,1.2,1.2,0,0,1-.17-.66c0-.1,0-.23,0-.39a4.7,4.7,0,0,1,.06-.51l1-7.2a2.17,2.17,0,0,1,1.76.57,3.69,3.69,0,0,1,.45,2.15c0,.14,0,.31,0,.51s0,.45,0,.73l.42.15,1.14-8.08-.43-.1a6.79,6.79,0,0,1-1.05,2.61,3.63,3.63,0,0,1-2.09.51l.91-6.56A2.87,2.87,0,0,1,148.9,1.68Z",opacity:1,strokeColor:"",fillColor:"#192760",width:153.485,height:20.812,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"NotForPublicRelease":case"Not For Public Release":e={iconName:"Not For Public Release",pathdata:"M9,2.35q-.21.9-.51,3.48L6.69,21.05H6.38L3.11,4.45,1.85,15.19c-.1.89-.17,1.56-.2,2s0,.55,0,.81A2.39,2.39,0,0,0,2,19.45a1.09,1.09,0,0,0,.67.33v.77H0v-.77a1.22,1.22,0,0,0,.71-.91,33.91,33.91,0,0,0,.57-3.68L2.7,2.88l-.06-.3a2.09,2.09,0,0,0-.39-1.07,1,1,0,0,0-.59-.25V.48H4.2L6.93,14.36l1-8.49c.06-.53.11-1,.14-1.4.06-.63.08-1.08.08-1.37a2.67,2.67,0,0,0-.3-1.5,1.07,1.07,0,0,0-.69-.34V.48H9.73v.78l-.18.06C9.29,1.41,9.09,1.75,9,2.35ZM16.74,2a13.19,13.19,0,0,1,.87,5.28,27.45,27.45,0,0,1-1.54,9.22q-1.65,4.66-3.79,4.67-1.35,0-2.19-1.95a13.31,13.31,0,0,1-.85-5.23A27.59,27.59,0,0,1,10.82,4.6C11.91,1.53,13.15,0,14.51,0,15.41,0,16.16.65,16.74,2Zm-.95,2.73a9.33,9.33,0,0,0-.31-2.59c-.21-.72-.54-1.08-1-1.08-1.05,0-1.92,2.21-2.64,6.64a54.69,54.69,0,0,0-.81,8.4,14.21,14.21,0,0,0,.15,2.23c.2,1.2.57,1.8,1.1,1.8s.95-.43,1.35-1.31a22.84,22.84,0,0,0,1.26-5c.28-1.55.49-3.19.65-4.91S15.79,5.74,15.79,4.68Zm2.3.93.32.21A10.7,10.7,0,0,1,19.52,2.6a1.87,1.87,0,0,1,1.6-1.08L19.27,17.63a4,4,0,0,1-.52,1.88,1,1,0,0,1-.79.27v.77h4.17v-.77a1.72,1.72,0,0,1-.85-.3,1.56,1.56,0,0,1-.2-1,2.44,2.44,0,0,1,0-.27c0-.08,0-.2,0-.33l.11-1L23,1.52A1.31,1.31,0,0,1,24,2.17a8.49,8.49,0,0,1,.69,4l.33.07L25.5.48H18.57ZM28.75.48v.78a1.39,1.39,0,0,1,.74.31,1.44,1.44,0,0,1,.18.9q0,.36-.06,1c0,.2-.05.44-.07.71L28,17.62a5.34,5.34,0,0,1-.35,1.61,1.05,1.05,0,0,1-.67.55v.77H30.7v-.77a.82.82,0,0,1-.6-.2,1.69,1.69,0,0,1-.31-1.18c0-.11,0-.22,0-.32l0-.35.83-7.33a1.42,1.42,0,0,1,1.4.64,5,5,0,0,1,.33,2.13c0,.12,0,.28,0,.5s0,.47,0,.76l.34.15.94-8.21-.35-.1a8.12,8.12,0,0,1-.85,2.64,2.42,2.42,0,0,1-1.64.52l.74-6.65a3.34,3.34,0,0,1,.25-1.1.64.64,0,0,1,.59-.26A1.91,1.91,0,0,1,34.28,3a11.32,11.32,0,0,1,.29,3.06l.34.13.54-5.7Zm15,6.75a27.46,27.46,0,0,1-1.55,9.22q-1.65,4.66-3.79,4.67-1.35,0-2.19-1.95a13.49,13.49,0,0,1-.85-5.23A27.59,27.59,0,0,1,37,4.6Q38.65,0,40.69,0c.91,0,1.65.65,2.23,2A13.17,13.17,0,0,1,43.8,7.23ZM42,4.68a9.3,9.3,0,0,0-.32-2.59c-.21-.72-.53-1.08-1-1.08Q39.12,1,38,7.65a54.69,54.69,0,0,0-.81,8.4,13,13,0,0,0,.16,2.23c.2,1.2.56,1.8,1.09,1.8s1-.43,1.35-1.31a23.28,23.28,0,0,0,1.27-5c.27-1.55.49-3.19.64-4.91S42,5.74,42,4.68ZM50.32,1c.78.66,1.17,1.93,1.17,3.8a11,11,0,0,1-.19,2,7.2,7.2,0,0,1-.66,1.93,3.45,3.45,0,0,1-.77,1,5.58,5.58,0,0,1-.8.52c0,.31.07.51.08.58l1,6.78a5.63,5.63,0,0,0,.42,1.72.85.85,0,0,0,.69.42v.77H48.69l-1.36-9.92H47l-.75,6.25-.1,1c0,.08,0,.16,0,.26v.28a1.94,1.94,0,0,0,.16,1,1.39,1.39,0,0,0,.75.32v.77H43.27v-.77a1.07,1.07,0,0,0,.66-.53,4.83,4.83,0,0,0,.36-1.61L45.84,4.18c0-.28.06-.52.08-.72,0-.42,0-.75,0-1a1.48,1.48,0,0,0-.17-.91,1.39,1.39,0,0,0-.74-.31V.48h3.46A2.67,2.67,0,0,1,50.32,1Zm-.73,3.34a7.2,7.2,0,0,0-.26-2.09c-.18-.55-.47-.83-.89-.83a.4.4,0,0,0-.38.27,4.46,4.46,0,0,0-.2,1.06L47.1,9.65a2.39,2.39,0,0,0,1-.2A2,2,0,0,0,49,8.31a10,10,0,0,0,.4-1.65A12.71,12.71,0,0,0,49.59,4.37Zm11.1-3.3c.77.74,1.16,2.1,1.16,4.09a8.51,8.51,0,0,1-.94,4.28A2.78,2.78,0,0,1,58.48,11h-.36l-.73-.12-.69,6-.11,1c0,.1,0,.2,0,.3s0,.2,0,.3a1.7,1.7,0,0,0,.17.95,1.47,1.47,0,0,0,.75.32v.77H53.77v-.77a1.07,1.07,0,0,0,.66-.53,4.83,4.83,0,0,0,.36-1.61L56.34,4.17l.09-.9c0-.31,0-.55,0-.74a1.58,1.58,0,0,0-.25-1,1.33,1.33,0,0,0-.67-.23V.48h3.62A2.11,2.11,0,0,1,60.69,1.07ZM60,4.32a7,7,0,0,0-.25-2.06c-.17-.53-.45-.8-.84-.8a.4.4,0,0,0-.4.29,6.14,6.14,0,0,0-.2,1L57.5,9.93l.23.06h.21a1.3,1.3,0,0,0,1-.36,3.17,3.17,0,0,0,.6-1.2,12.69,12.69,0,0,0,.36-2A19.64,19.64,0,0,0,60,4.32Zm10.6-3.06V.48H68v.78a1.17,1.17,0,0,1,.68.32A2.43,2.43,0,0,1,69,3.05c0,.32,0,.85-.11,1.6,0-.12,0,.27-.12,1.18l-.73,6.26a36.28,36.28,0,0,1-.8,4.86c-.45,1.65-1.07,2.47-1.87,2.47a1.27,1.27,0,0,1-1.13-.78,5.05,5.05,0,0,1-.41-2.27c0-.43,0-1.1.13-2,.05-.51.12-1.17.21-2l1-9a4.69,4.69,0,0,1,.38-1.69,1.24,1.24,0,0,1,.8-.47V.48H62.55v.78a1.39,1.39,0,0,1,.74.31,1.56,1.56,0,0,1,.17.91c0,.21,0,.47,0,.76s-.06.6-.1.94l-.85,7.36c-.14,1.15-.23,2-.27,2.42-.06.76-.1,1.44-.1,2a7.4,7.4,0,0,0,.81,3.78,2.35,2.35,0,0,0,2,1.35c1.14,0,2-.91,2.6-2.74a35.69,35.69,0,0,0,1-5.7l.79-6.85a30.83,30.83,0,0,1,.58-3.7A1.15,1.15,0,0,1,70.61,1.26Zm5.86,10a7.16,7.16,0,0,1,.56,3.1,10.31,10.31,0,0,1-.86,4.34,2.93,2.93,0,0,1-2.86,1.87h-3.8v-.77a1.07,1.07,0,0,0,.59-.41,4.64,4.64,0,0,0,.43-1.73L72.08,4.17c0-.4.08-.73.1-1s0-.46,0-.61a1.83,1.83,0,0,0-.19-1,1.22,1.22,0,0,0-.73-.28V.48h3.43a2.58,2.58,0,0,1,2.19,1.06A5.92,5.92,0,0,1,77.69,5a6.3,6.3,0,0,1-1,3.67,4.18,4.18,0,0,1-1.39,1.24A4.36,4.36,0,0,1,76.47,11.24Zm-1.36,2.49a4.59,4.59,0,0,0-.6-2.79,2,2,0,0,0-1.3-.52l-.84,7.32c0,.12,0,.25,0,.4s0,.33,0,.52a1.06,1.06,0,0,0,.27.84.77.77,0,0,0,.48.11c.8,0,1.38-.87,1.73-2.63A17.3,17.3,0,0,0,75.11,13.73Zm.1-5.38a7.33,7.33,0,0,0,.52-2.15,15,15,0,0,0,.11-1.77,7.89,7.89,0,0,0-.24-2.14c-.16-.55-.46-.83-.93-.83a.42.42,0,0,0-.4.33,4.42,4.42,0,0,0-.19,1l-.77,6.73a5.23,5.23,0,0,0,1.27-.36A1.77,1.77,0,0,0,75.21,8.35Zm9.61,6.24a9.73,9.73,0,0,1-1.66,3.94,2.93,2.93,0,0,1-2.25,1,.64.64,0,0,1-.51-.21,1,1,0,0,1-.19-.71c0-.19,0-.35,0-.49s0-.29,0-.44L81.91,3.41a4.53,4.53,0,0,1,.38-1.66,1.47,1.47,0,0,1,.88-.49V.48h-4v.78a1.39,1.39,0,0,1,.75.32,1.59,1.59,0,0,1,.18.95c0,.2,0,.43,0,.68s0,.58-.1,1L78.42,17.62a5.28,5.28,0,0,1-.35,1.63,1.12,1.12,0,0,1-.67.53v.77h7l.73-5.83ZM90.09,1.26V.48H86.34v.78a1.38,1.38,0,0,1,.74.32,1.59,1.59,0,0,1,.18.95q0,.3,0,.69c0,.25-.06.57-.11.95L85.58,17.64a5.41,5.41,0,0,1-.36,1.61,1.07,1.07,0,0,1-.66.53v.77h3.75v-.77a1.47,1.47,0,0,1-.75-.32,1.78,1.78,0,0,1-.17-1c0-.08,0-.18,0-.28s0-.2,0-.3l.1-1L89.07,3.41a5.68,5.68,0,0,1,.35-1.62A1.1,1.1,0,0,1,90.09,1.26Zm7-.62a.33.33,0,0,1-.3.24,3.1,3.1,0,0,1-.82-.44A2.5,2.5,0,0,0,94.59,0Q92.51,0,91,4a26.57,26.57,0,0,0-1.51,9.39,13.57,13.57,0,0,0,1,5.67c.66,1.41,1.49,2.11,2.5,2.11A2.46,2.46,0,0,0,94.79,20a9.66,9.66,0,0,0,1.55-3.4L96,16a12.68,12.68,0,0,1-.89,2.13c-.54,1-1.12,1.45-1.74,1.45-.47,0-.91-.39-1.31-1.15a10.33,10.33,0,0,1-.6-4.27,36.59,36.59,0,0,1,1-8.43c.72-3.08,1.57-4.63,2.54-4.63.48,0,.88.39,1.19,1.16a10,10,0,0,1,.47,3.53V6.1c0,.07,0,.32,0,.74L97,7l.64-7h-.38A4.28,4.28,0,0,1,97,.64Zm17.57,14,.31.13-.75,5.83h-9.45l-1.35-9.92H103l-.74,6.25-.11,1c0,.08,0,.16,0,.26v.28a1.94,1.94,0,0,0,.16,1,1.39,1.39,0,0,0,.75.32v.77H99.3v-.77a1.12,1.12,0,0,0,.67-.53,5.18,5.18,0,0,0,.35-1.61l1.55-13.46c0-.28.06-.52.08-.72,0-.42,0-.75,0-1a1.48,1.48,0,0,0-.17-.91,1.39,1.39,0,0,0-.74-.31V.48h3.46a2.64,2.64,0,0,1,1.8.55c.78.66,1.17,1.93,1.17,3.8a11,11,0,0,1-.19,2,6.57,6.57,0,0,1-.66,1.93,3.61,3.61,0,0,1-.76,1,6.48,6.48,0,0,1-.81.52c0,.31.07.51.08.58l1,6.78a5.63,5.63,0,0,0,.42,1.72.84.84,0,0,0,.65.4,1.06,1.06,0,0,0,.64-.51,5.41,5.41,0,0,0,.36-1.61l1.54-13.47c0-.34.07-.65.1-.92s0-.52,0-.72a1.61,1.61,0,0,0-.17-.95,1.31,1.31,0,0,0-.74-.32V.48h6.78l-.53,5.7-.34-.13a11.8,11.8,0,0,0-.3-3.09,1.92,1.92,0,0,0-2-1.54c-.33,0-.55.1-.64.29a3.46,3.46,0,0,0-.24,1.07L111,9.45a2.6,2.6,0,0,0,1.72-.51,7.79,7.79,0,0,0,.86-2.66l.35.11-.93,8.2-.35-.15c0-.28,0-.53,0-.74v-.52a4.42,4.42,0,0,0-.37-2.18,1.56,1.56,0,0,0-1.44-.58l-.83,7.32c0,.18,0,.35,0,.51s0,.3,0,.4a1.45,1.45,0,0,0,.13.67c.09.18.28.26.57.26a2.72,2.72,0,0,0,2-.76A8.33,8.33,0,0,0,114.61,14.59ZM105,8.31a9.81,9.81,0,0,0,.41-1.65,13.72,13.72,0,0,0,.18-2.29,6.87,6.87,0,0,0-.26-2.09c-.17-.55-.47-.83-.89-.83a.4.4,0,0,0-.38.27,5.05,5.05,0,0,0-.2,1.06l-.76,6.87a2.39,2.39,0,0,0,1-.2A2,2,0,0,0,105,8.31Zm17.51,6.28a9.86,9.86,0,0,1-1.67,3.94,2.93,2.93,0,0,1-2.25,1,.64.64,0,0,1-.51-.21,1.1,1.1,0,0,1-.19-.71c0-.19,0-.35,0-.49s0-.29,0-.44l1.64-14.32A4.53,4.53,0,0,1,120,1.75a1.47,1.47,0,0,1,.89-.49V.48h-4v.78a1.39,1.39,0,0,1,.75.32,1.59,1.59,0,0,1,.18.95c0,.2,0,.43,0,.68s0,.58-.1,1l-1.55,13.45a5.28,5.28,0,0,1-.35,1.63,1.1,1.1,0,0,1-.66.53v.77h7l.74-5.83Zm7.09,0a8.33,8.33,0,0,1-2,4.23,2.73,2.73,0,0,1-2,.76c-.29,0-.48-.08-.57-.26a1.45,1.45,0,0,1-.13-.67c0-.1,0-.23,0-.4s0-.33,0-.51l.83-7.32a1.58,1.58,0,0,1,1.44.58,4.42,4.42,0,0,1,.37,2.18c0,.14,0,.31,0,.52s0,.46,0,.74l.34.15.94-8.2-.35-.11a7.71,7.71,0,0,1-.87,2.66,2.56,2.56,0,0,1-1.71.51l.75-6.67A3.46,3.46,0,0,1,127,1.71c.09-.19.31-.29.64-.29a1.92,1.92,0,0,1,2,1.54,11.8,11.8,0,0,1,.3,3.09l.33.13.54-5.7H124v.78a1.31,1.31,0,0,1,.75.32,1.7,1.7,0,0,1,.17.95,6.75,6.75,0,0,1,0,.72c0,.27-.05.58-.09.92l-1.55,13.47a5.18,5.18,0,0,1-.35,1.61,1.12,1.12,0,0,1-.67.53v.77h7l.75-5.83Zm8.45,5.24v.72h-3.83v-.72a1.11,1.11,0,0,0,.77-.41,2.52,2.52,0,0,0,.23-1.31c0-.23,0-.77-.07-1.62,0-.17-.05-.9-.13-2.18h-2.71l-.74,3c0,.2-.09.43-.13.67a4.44,4.44,0,0,0-.06.71,1.27,1.27,0,0,0,.16.79,1.35,1.35,0,0,0,.65.3v.72h-2.47v-.72a1.66,1.66,0,0,0,.52-.54,7.25,7.25,0,0,0,.55-1.58L135.49.07h.33L137,17.23a8.87,8.87,0,0,0,.3,2.11A.9.9,0,0,0,138.08,19.83ZM135,13.12l-.47-7.3-1.86,7.3Zm7.88-4-1.09-2.13a6.38,6.38,0,0,1-.39-1,6.65,6.65,0,0,1-.23-1.82,6.93,6.93,0,0,1,.23-1.8q.33-1.26,1-1.26c.57,0,1,.53,1.3,1.57a10.87,10.87,0,0,1,.36,2.39l0,1,.33.1.51-6h-.38a2.26,2.26,0,0,1-.2.54.38.38,0,0,1-.34.22.54.54,0,0,1-.19-.05l-.22-.13-.32-.25a2.36,2.36,0,0,0-.41-.25,1.82,1.82,0,0,0-.7-.16c-.81,0-1.44.57-1.9,1.7a11.21,11.21,0,0,0-.68,4.12,12.36,12.36,0,0,0,1.55,5.58,10.74,10.74,0,0,1,1.54,4.78,7.8,7.8,0,0,1-.41,2.67c-.28.76-.67,1.15-1.17,1.15a1.07,1.07,0,0,1-.79-.4,3.78,3.78,0,0,1-.64-1.18,7.79,7.79,0,0,1-.42-1.95c-.05-.44-.08-1.14-.11-2.1l-.36-.06-.46,6.73h.38a6.32,6.32,0,0,1,.2-.83.31.31,0,0,1,.3-.24.21.21,0,0,1,.14,0,1.06,1.06,0,0,1,.22.18l.32.27a3,3,0,0,0,.69.44,1.72,1.72,0,0,0,.69.15c.92,0,1.64-.63,2.16-1.91a11.22,11.22,0,0,0,.78-4.28,12.2,12.2,0,0,0-.4-3.29A14.21,14.21,0,0,0,142.85,9.07Zm6.36-7.36c.09-.19.31-.29.64-.29a1.92,1.92,0,0,1,2,1.54,11.8,11.8,0,0,1,.3,3.09l.33.13L153,.48h-6.79v.78a1.31,1.31,0,0,1,.75.32,1.7,1.7,0,0,1,.17.95,6.75,6.75,0,0,1,0,.72c0,.27-.05.58-.09.92l-1.55,13.47a5.18,5.18,0,0,1-.35,1.61,1.12,1.12,0,0,1-.67.53v.77h7l.75-5.83-.31-.13a8.33,8.33,0,0,1-2,4.23,2.73,2.73,0,0,1-2,.76c-.29,0-.48-.08-.57-.26a1.45,1.45,0,0,1-.13-.67c0-.1,0-.23,0-.4s0-.33.05-.51l.83-7.32a1.58,1.58,0,0,1,1.44.58,4.42,4.42,0,0,1,.37,2.18c0,.14,0,.31,0,.52s0,.46,0,.74l.34.15.94-8.2-.35-.11a7.71,7.71,0,0,1-.87,2.66,2.56,2.56,0,0,1-1.71.51L149,2.78A3.46,3.46,0,0,1,149.21,1.71Z",opacity:1,strokeColor:"",fillColor:"#192760",width:152.969,height:21.152,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"ForComment":case"For Comment":e={iconName:"For Comment",pathdata:"M14.1.48l-.89,5.6L12.65,6a7.14,7.14,0,0,0-.48-3c-.54-1-1.6-1.54-3.19-1.54a1.37,1.37,0,0,0-1,.26,2.06,2.06,0,0,0-.42,1.08L6.35,9.28a6,6,0,0,0,2.73-.52,5.92,5.92,0,0,0,1.41-2.59l.58.1L9.52,14.34,9,14.2c0-.29,0-.54.05-.75s0-.38,0-.49a3.15,3.15,0,0,0-.55-2.09,3.07,3.07,0,0,0-2.32-.64L4.77,17.44c0,.13,0,.24-.06.35s0,.21,0,.31a1.23,1.23,0,0,0,.53,1.17,2,2,0,0,0,1,.19v.76H0v-.76a1.91,1.91,0,0,0,1.12-.54,3.56,3.56,0,0,0,.58-1.58L4.27,4.11c.05-.27.09-.51.12-.71a7.42,7.42,0,0,0,.1-1c0-.48-.1-.77-.29-.9A3.54,3.54,0,0,0,3,1.24V.48ZM28,7.11a17.42,17.42,0,0,1-2.57,9.07q-2.75,4.61-6.3,4.6a4.33,4.33,0,0,1-3.65-1.92,8.53,8.53,0,0,1-1.41-5.14,17.56,17.56,0,0,1,2.62-9.19Q19.43,0,22.82,0a4.48,4.48,0,0,1,3.72,1.92A8.46,8.46,0,0,1,28,7.11ZM25,4.6a5.72,5.72,0,0,0-.52-2.55,1.72,1.72,0,0,0-1.63-1c-1.74,0-3.2,2.17-4.39,6.53a32.66,32.66,0,0,0-1.35,8.26,8.24,8.24,0,0,0,.26,2.2c.33,1.18.94,1.77,1.82,1.77a2.88,2.88,0,0,0,2.25-1.29,16.48,16.48,0,0,0,2.1-4.93,37.09,37.09,0,0,0,1.07-4.83A28.26,28.26,0,0,0,25,4.6Zm15.83.16a6.49,6.49,0,0,1-.33,2,5.12,5.12,0,0,1-1.09,1.9,4.65,4.65,0,0,1-1.27,1,11.5,11.5,0,0,1-1.35.52c.07.3.12.49.14.57l1.62,6.66a3.79,3.79,0,0,0,.7,1.7,1.75,1.75,0,0,0,1.14.41v.76H36.13l-2.26-9.76h-.59L32,16.6l-.17,1,0,.25a2.62,2.62,0,0,0,0,.28q0,.8.27,1a3,3,0,0,0,1.25.32v.76H27.11v-.76a1.93,1.93,0,0,0,1.11-.52,3.54,3.54,0,0,0,.59-1.59L31.38,4.11c.06-.27.1-.51.13-.71a6,6,0,0,0,.1-1c0-.47-.1-.77-.29-.9a3.54,3.54,0,0,0-1.24-.3V.48h5.76a6.77,6.77,0,0,1,3,.53Q40.79,2,40.79,4.76Zm-3.16-.47a4.35,4.35,0,0,0-.44-2,1.54,1.54,0,0,0-1.48-.81.75.75,0,0,0-.63.26,2.78,2.78,0,0,0-.33,1.05L33.48,9.5a6.85,6.85,0,0,0,1.67-.2,2.55,2.55,0,0,0,1.49-1.13,6.37,6.37,0,0,0,.67-1.62A7.81,7.81,0,0,0,37.63,4.29ZM58.49,0a2.61,2.61,0,0,1-.32.63.55.55,0,0,1-.49.24A7,7,0,0,1,56.31.43,6.15,6.15,0,0,0,54.1,0q-3.47,0-6,3.92a16.73,16.73,0,0,0-2.51,9.24,8.73,8.73,0,0,0,1.64,5.57,5,5,0,0,0,7.19,1A8.89,8.89,0,0,0,57,16.37l-.64-.65a10.47,10.47,0,0,1-1.47,2.09A4,4,0,0,1,52,19.24a2.89,2.89,0,0,1-2.17-1.13c-.67-.75-1-2.15-1-4.2a22.2,22.2,0,0,1,1.62-8.29q1.8-4.54,4.23-4.55a2.33,2.33,0,0,1,2,1.14,6.16,6.16,0,0,1,.78,3.47c0,.14,0,.25,0,.32s0,.32,0,.73l.66.17L59.12,0ZM72.71,7.11a17.33,17.33,0,0,1-2.57,9.07c-1.82,3.07-3.93,4.6-6.3,4.6a4.34,4.34,0,0,1-3.65-1.92,8.53,8.53,0,0,1-1.4-5.14A17.55,17.55,0,0,1,61.4,4.53Q64.15,0,67.54,0a4.48,4.48,0,0,1,3.72,1.92A8.39,8.39,0,0,1,72.71,7.11Zm-3-2.51a5.72,5.72,0,0,0-.52-2.55,1.72,1.72,0,0,0-1.63-1c-1.74,0-3.2,2.17-4.39,6.53a32.66,32.66,0,0,0-1.35,8.26,8.24,8.24,0,0,0,.26,2.2c.33,1.18.94,1.77,1.82,1.77a2.85,2.85,0,0,0,2.25-1.29,16,16,0,0,0,2.1-4.93,34.08,34.08,0,0,0,1.07-4.83A28.26,28.26,0,0,0,69.68,4.6Zm17.5,13.62a4.63,4.63,0,0,1,.07-.75c0-.3.09-.59.15-.88L90,3.31a3.32,3.32,0,0,1,.7-1.67,2,2,0,0,1,1-.4V.48H87.23l-6.4,13.91L79.63.48H74.84v.76a3.29,3.29,0,0,1,1.2.21c.21.11.31.37.31.78a4.35,4.35,0,0,1-.07.75c0,.28-.11.61-.18,1L74,15a19.63,19.63,0,0,1-1,3.65,1.54,1.54,0,0,1-1.17.86v.76H76.2v-.76a2.31,2.31,0,0,1-1.09-.29,1.6,1.6,0,0,1-.58-1.43,8.8,8.8,0,0,1,.14-1.42c0-.37.14-.82.24-1.37L77,4.24l1.41,16.37H79L86.89,3.76,84.25,17.34A2.94,2.94,0,0,1,83.61,19a2.87,2.87,0,0,1-1.44.49v.76h6.54v-.76a3.39,3.39,0,0,1-1.23-.31Q87.18,19,87.18,18.22Zm17.73,0a4.63,4.63,0,0,1,.07-.75c0-.3.1-.59.16-.88l2.58-13.28a3.24,3.24,0,0,1,.69-1.67,2,2,0,0,1,1-.4V.48H105l-6.4,13.91L97.36.48H92.57v.76a3.29,3.29,0,0,1,1.2.21c.21.11.32.37.32.78A5.65,5.65,0,0,1,94,3c0,.28-.11.61-.19,1L91.69,15a19.63,19.63,0,0,1-1,3.65,1.54,1.54,0,0,1-1.17.86v.76h4.38v-.76a2.33,2.33,0,0,1-1.1-.29,1.6,1.6,0,0,1-.58-1.43,10.12,10.12,0,0,1,.14-1.42c.06-.37.14-.82.25-1.37L94.76,4.24l1.41,16.37h.59l7.86-16.85L102,17.34a3.1,3.1,0,0,1-.64,1.63,3,3,0,0,1-1.45.49v.76h6.55v-.76a3.46,3.46,0,0,1-1.24-.31Q104.91,19,104.91,18.22Zm11.52.3a6.56,6.56,0,0,1-3.25.75,1.27,1.27,0,0,1-.94-.26,1,1,0,0,1-.22-.66,3,3,0,0,1,0-.39,4.88,4.88,0,0,1,.08-.51l1.38-7.2a3.65,3.65,0,0,1,2.4.57,2.92,2.92,0,0,1,.62,2.15c0,.14,0,.31,0,.51s0,.45-.06.73l.58.15,1.55-8.08-.58-.1a5.92,5.92,0,0,1-1.44,2.61,6.32,6.32,0,0,1-2.85.51L115,2.74a2.44,2.44,0,0,1,.39-1.06,1.43,1.43,0,0,1,1.07-.28c1.63,0,2.71.5,3.25,1.51a7.37,7.37,0,0,1,.49,3l.56.13.89-5.6H110.31v.76a3.28,3.28,0,0,1,1.25.31c.19.13.28.44.28.94a4.83,4.83,0,0,1-.06.7c0,.28-.09.58-.16.92l-2.57,13.24a3.54,3.54,0,0,1-.59,1.59,1.93,1.93,0,0,1-1.11.52v.76H119l1.24-5.74-.51-.12A7.7,7.7,0,0,1,116.43,18.52ZM136.6,1.24V.48h-4.3v.76a2.5,2.5,0,0,1,1.14.33A1.8,1.8,0,0,1,134,3.05a10.58,10.58,0,0,1-.14,1.34c-.05.41-.13.87-.22,1.39L132,14.12,127.41.48h-4.22v.76a2.53,2.53,0,0,1,1,.24,1.82,1.82,0,0,1,.64,1.06l.1.3L122.55,15a19.54,19.54,0,0,1-1,3.61,1.59,1.59,0,0,1-1.18.9v.76h4.37v-.76a2.5,2.5,0,0,1-1.12-.32,1.67,1.67,0,0,1-.55-1.44,5.32,5.32,0,0,1,0-.79c0-.43.17-1.09.34-2l2.08-10.57L131,20.71h.52l2.91-15a24.72,24.72,0,0,1,.85-3.42,1.42,1.42,0,0,1,1-1Zm.48-.76-.81,5,.54.2a8.1,8.1,0,0,1,1.85-3.16,3.63,3.63,0,0,1,2.66-1.06l-3.08,15.85a3,3,0,0,1-.86,1.85,2.42,2.42,0,0,1-1.32.26v.76H143v-.76a4,4,0,0,1-1.41-.3c-.23-.13-.34-.45-.34-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.17-1,2.92-15.1a2.64,2.64,0,0,1,1.76.63c.74.7,1.12,2,1.15,3.94l.55.07L148.6.48Z",opacity:1,strokeColor:"",fillColor:"#192760",width:148.603,height:20.812,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"Void":e={iconName:"Void",pathdata:"M27.88,1.72a6.53,6.53,0,0,0-1.81,1.42L9,21.12H7.54L4.09,5.83A11.83,11.83,0,0,0,2.82,2Q2.3,1.4,0,1.26V.48H13.54v.78a11,11,0,0,0-2.37.18q-1.11.27-1.11,1.05a1.43,1.43,0,0,0,0,.29c0,.09,0,.19,0,.28l2.35,12,8.56-9a25.11,25.11,0,0,0,1.83-2.14,3.15,3.15,0,0,0,.82-1.68c0-.41-.28-.69-.84-.82a12.57,12.57,0,0,0-2.08-.15V.48h8.7v.78A7.11,7.11,0,0,0,27.88,1.72ZM57.37,7.23q0,4.85-5.56,9.22a21.41,21.41,0,0,1-13.62,4.67,14.41,14.41,0,0,1-7.89-1.95,6,6,0,0,1-3-5.23q0-4.92,5.66-9.34A21.12,21.12,0,0,1,46.2,0a15,15,0,0,1,8,2A6,6,0,0,1,57.37,7.23ZM50.82,4.68a3.46,3.46,0,0,0-1.13-2.59A4.93,4.93,0,0,0,46.17,1q-5.64,0-9.49,6.64c-1.94,3.36-2.92,6.16-2.92,8.4a4.27,4.27,0,0,0,.56,2.23q1.08,1.8,3.93,1.8a9.24,9.24,0,0,0,4.87-1.31,15.24,15.24,0,0,0,4.54-5A21.81,21.81,0,0,0,50,8.85,14.23,14.23,0,0,0,50.82,4.68ZM66,18.49a1.49,1.49,0,0,1,0-.28c0-.1,0-.2.08-.3l.35-1L72,3.41a2.94,2.94,0,0,1,1.25-1.62,6.79,6.79,0,0,1,2.4-.53V.48H62.19v.78a13.27,13.27,0,0,1,2.67.32.88.88,0,0,1,.64.95,2.38,2.38,0,0,1-.12.69c-.08.25-.2.57-.36.95L59.45,17.64a3,3,0,0,1-1.28,1.61,6.84,6.84,0,0,1-2.39.53v.77H69.27v-.77a13.72,13.72,0,0,1-2.67-.32A.9.9,0,0,1,66,18.49Zm38.25-9.67q0,4.59-5.15,8-5.73,3.77-15,3.76h-13v-.77a7.4,7.4,0,0,0,2.1-.41,3.08,3.08,0,0,0,1.57-1.75L80.28,4.17c.16-.38.28-.7.37-1a2.27,2.27,0,0,0,.12-.68.89.89,0,0,0-.64-.95,13.41,13.41,0,0,0-2.68-.32V.48H90.6q6.68,0,10.15,2.27A6.92,6.92,0,0,1,104.23,8.82ZM97.58,7a5.28,5.28,0,0,0-1.13-3.54q-1.77-2-6.14-2a4.24,4.24,0,0,0-2,.32,1.77,1.77,0,0,0-.74.84L81.35,17.73a1.72,1.72,0,0,0-.12.39,1.89,1.89,0,0,0,0,.31.89.89,0,0,0,.54.85,5.1,5.1,0,0,0,2,.26q8.07,0,11.68-5.5A12.61,12.61,0,0,0,97.58,7Z",opacity:1,strokeColor:"",fillColor:"#8a251a",width:104.233,height:21.123,stampFillColor:"#f6dedd",stampStrokeColor:""};break;case"PreliminaryResults":case"Preliminary Results":e={iconName:"Preliminary Results",pathdata:"M9.23,5.08q0-3-1.32-4.08A2.6,2.6,0,0,0,6.17.41H2v.78a1.5,1.5,0,0,1,.76.23,1.39,1.39,0,0,1,.28,1c0,.19,0,.43,0,.73s-.07.61-.1.91L1.17,17.56a4.76,4.76,0,0,1-.41,1.62A1.18,1.18,0,0,1,0,19.7v.78H4.25V19.7a1.77,1.77,0,0,1-.86-.31,1.5,1.5,0,0,1-.2-1c0-.09,0-.19,0-.3a1.36,1.36,0,0,1,0-.29l.12-1,.78-6L5,11h.41a3.21,3.21,0,0,0,2.78-1.6A7.57,7.57,0,0,0,9.23,5.08ZM7,6.32a10,10,0,0,1-.42,2,3,3,0,0,1-.68,1.21,1.63,1.63,0,0,1-1.13.36H4.53l-.27-.06,1-7.15a4.75,4.75,0,0,1,.22-1,.45.45,0,0,1,.46-.29,1,1,0,0,1,1,.8,6.22,6.22,0,0,1,.29,2.06A18,18,0,0,1,7,6.32ZM23.4,18.75a3.35,3.35,0,0,1-2.23.76.68.68,0,0,1-.64-.26,1.27,1.27,0,0,1-.16-.68c0-.09,0-.23,0-.39s0-.34.05-.51l.95-7.33a1.92,1.92,0,0,1,1.65.59,4,4,0,0,1,.42,2.18c0,.14,0,.31,0,.52s0,.46,0,.74l.4.15,1.07-8.21-.4-.1a7,7,0,0,1-1,2.65,3.15,3.15,0,0,1-2,.52l.85-6.67a3,3,0,0,1,.28-1.08c.11-.19.35-.28.73-.28a2.16,2.16,0,0,1,2.23,1.54A10.27,10.27,0,0,1,26,6l.39.13L27,.41H19.2v.78a1.67,1.67,0,0,1,.86.31,1.52,1.52,0,0,1,.19,1,6.58,6.58,0,0,1,0,.71c0,.28-.07.59-.11.93L18.33,17.56a4.59,4.59,0,0,1-.4,1.62,1.22,1.22,0,0,1-.74.51,1,1,0,0,1-.73-.4A5.08,5.08,0,0,1,16,17.56l-1.1-6.77c0-.08,0-.27-.1-.58a5.14,5.14,0,0,0,.92-.53,3.23,3.23,0,0,0,.87-1,6,6,0,0,0,.76-1.93,9.63,9.63,0,0,0,.22-2c0-1.87-.44-3.14-1.34-3.81a3.4,3.4,0,0,0-2-.54h-4v.78a1.78,1.78,0,0,1,.85.3,1.4,1.4,0,0,1,.19.91c0,.24,0,.56-.06,1,0,.21-.05.45-.09.73L9.31,17.56a4.53,4.53,0,0,1-.41,1.62,1.15,1.15,0,0,1-.75.52v.78h4.28V19.7a1.62,1.62,0,0,1-.86-.32,1.72,1.72,0,0,1-.18-1v-.29c0-.09,0-.18,0-.25l.12-1,.86-6.24h.4l1.55,9.92h10.8L26,14.65l-.35-.13A7.9,7.9,0,0,1,23.4,18.75ZM13.67,9.38a3.35,3.35,0,0,1-1.15.2l.87-6.87a4,4,0,0,1,.23-1.06.45.45,0,0,1,.43-.27,1.05,1.05,0,0,1,1,.83,6.14,6.14,0,0,1,.3,2.08,11.74,11.74,0,0,1-.21,2.29,9,9,0,0,1-.47,1.65A2,2,0,0,1,13.67,9.38ZM35,14.65l-.84,5.83h-8V19.7a1.24,1.24,0,0,0,.76-.52,4.73,4.73,0,0,0,.4-1.63L29.15,4.1q.08-.57.12-1c0-.26,0-.48,0-.68a1.42,1.42,0,0,0-.21-1,1.67,1.67,0,0,0-.85-.31V.41h4.56v.78a1.67,1.67,0,0,0-1,.49,4.17,4.17,0,0,0-.44,1.66L29.49,17.65c0,.16,0,.31,0,.45a3.47,3.47,0,0,0,0,.48,1,1,0,0,0,.21.72.8.8,0,0,0,.59.21,3.54,3.54,0,0,0,2.56-1.05,9.24,9.24,0,0,0,1.91-3.94Zm2.79,4.73a1.61,1.61,0,0,0,.85.32v.78H34.39V19.7a1.18,1.18,0,0,0,.76-.52,4.76,4.76,0,0,0,.41-1.62L37.33,4.1c.05-.38.09-.7.11-1a5.83,5.83,0,0,0,0-.68,1.5,1.5,0,0,0-.2-1,1.71,1.71,0,0,0-.85-.31V.41h4.29v.78a1.22,1.22,0,0,0-.77.52,4.9,4.9,0,0,0-.39,1.63L37.78,16.8l-.11,1,0,.29c0,.11,0,.2,0,.29A1.52,1.52,0,0,0,37.83,19.38Zm12.2,0a1.81,1.81,0,0,0,.85.31v.78h-4.5V19.7a1.64,1.64,0,0,0,1-.49,4,4,0,0,0,.44-1.66l1.81-13.8-5.4,17.12h-.4l-1-16.64L41.39,15.12c-.07.56-.13,1-.17,1.39-.06.61-.09,1.09-.09,1.45a2,2,0,0,0,.4,1.45,1.19,1.19,0,0,0,.75.29v.78h-3V19.7a1.21,1.21,0,0,0,.81-.87,29.47,29.47,0,0,0,.66-3.71L42.21,4c0-.38.09-.71.12-1a5.41,5.41,0,0,0,.05-.75c0-.42-.07-.69-.21-.8a1.69,1.69,0,0,0-.83-.21V.41h3.29l.83,14.14L49.85.41h3.07v.78a1.12,1.12,0,0,0-.69.41,4.08,4.08,0,0,0-.48,1.69L50,16.79c0,.29-.08.59-.11.89s0,.56,0,.76A1.41,1.41,0,0,0,50,19.39Zm5,0a1.61,1.61,0,0,0,.85.32v.78H51.56V19.7a1.18,1.18,0,0,0,.76-.52,4.76,4.76,0,0,0,.41-1.62L54.5,4.1c0-.38.09-.7.11-1a5.83,5.83,0,0,0,0-.68,1.5,1.5,0,0,0-.2-1,1.71,1.71,0,0,0-.85-.31V.41h4.29v.78a1.22,1.22,0,0,0-.77.52,4.9,4.9,0,0,0-.39,1.63L55,16.8l-.11,1,0,.29c0,.11,0,.2,0,.29A1.52,1.52,0,0,0,55,19.38ZM66.13,5.75,64.13,21h-.36L60,4.38,58.6,15.12c-.12.89-.2,1.55-.23,2a7.32,7.32,0,0,0,0,.81,2.17,2.17,0,0,0,.38,1.46,1.32,1.32,0,0,0,.77.32v.78h-3V19.7a1.26,1.26,0,0,0,.81-.91,29,29,0,0,0,.65-3.67L59.56,2.81,59.5,2.5a2,2,0,0,0-.45-1.06,1.21,1.21,0,0,0-.67-.25V.41h2.9L64.4,14.28,65.52,5.8c.07-.53.12-1,.16-1.41.06-.62.09-1.08.09-1.36a2.45,2.45,0,0,0-.34-1.51,1.39,1.39,0,0,0-.79-.33V.41h3v.78l-.21.06c-.29.08-.52.43-.68,1A34.22,34.22,0,0,0,66.13,5.75ZM83.27,1A3.41,3.41,0,0,0,81.21.41h-4v.78a1.74,1.74,0,0,1,.85.3c.14.13.2.43.2.91,0,.24,0,.56-.06,1,0,.21-.06.45-.09.73L76.38,17.56A4.53,4.53,0,0,1,76,19.18a1.18,1.18,0,0,1-.76.52v0a1,1,0,0,1-.67-.45,8.11,8.11,0,0,1-.34-2.12L72.83,0h-.38L67.11,17.64a6.42,6.42,0,0,1-.63,1.58,1.84,1.84,0,0,1-.59.54v.72h2.83v-.72a1.68,1.68,0,0,1-.75-.31,1.16,1.16,0,0,1-.18-.79,3.46,3.46,0,0,1,.07-.7,5.16,5.16,0,0,1,.15-.67l.84-3H72c.08,1.28.13,2,.13,2.18.06.85.08,1.39.08,1.61a2.26,2.26,0,0,1-.25,1.31,1.43,1.43,0,0,1-.88.42v.72H79.5V19.7a1.58,1.58,0,0,1-.86-.32,1.7,1.7,0,0,1-.19-1c0-.1,0-.2,0-.29a1.81,1.81,0,0,1,0-.25l.12-1,.85-6.24h.41l1.55,9.92h2.9V19.7a1,1,0,0,1-.79-.41A5.15,5.15,0,0,1,83,17.56l-1.11-6.77c0-.08,0-.27-.09-.58a5.53,5.53,0,0,0,.92-.53,3.52,3.52,0,0,0,.87-1,6.16,6.16,0,0,0,.75-1.93,9.67,9.67,0,0,0,.23-2C84.61,2.89,84.16,1.62,83.27,1ZM69.19,13.05l2.13-7.3.53,7.3Zm13-6.47a8.39,8.39,0,0,1-.46,1.65,2,2,0,0,1-1,1.15,3.29,3.29,0,0,1-1.14.2l.87-6.87a3.61,3.61,0,0,1,.23-1.06.45.45,0,0,1,.43-.27,1.05,1.05,0,0,1,1,.83,6.14,6.14,0,0,1,.3,2.08A11,11,0,0,1,82.22,6.58ZM90.48.41h3v.78a1.07,1.07,0,0,0-.55.41,6.13,6.13,0,0,0-.77,1.62l-2.72,8-.72,5.55c0,.22-.07.51-.1.86a7.29,7.29,0,0,0-.06.73,1.46,1.46,0,0,0,.29,1.07,1.61,1.61,0,0,0,.83.25v.78H85V19.7a1.56,1.56,0,0,0,.93-.39,3.7,3.7,0,0,0,.53-1.76l.85-6.45-1.26-8a6.07,6.07,0,0,0-.36-1.47.81.81,0,0,0-.7-.4V.41h4v.78a1.32,1.32,0,0,0-.76.23c-.15.12-.23.4-.23.84a4.46,4.46,0,0,0,0,.48c0,.19,0,.39.07.6l1,6.54,1.88-5.55c.1-.29.18-.55.24-.79a4.68,4.68,0,0,0,.14-1.11,1.35,1.35,0,0,0-.31-1,1.14,1.14,0,0,0-.66-.2Zm18.61,1.22c.1-.19.35-.28.73-.28a2.16,2.16,0,0,1,2.23,1.54A10.27,10.27,0,0,1,112.39,6l.38.13.62-5.7h-7.76v.78a1.67,1.67,0,0,1,.86.31,1.59,1.59,0,0,1,.19,1,6.58,6.58,0,0,1,0,.71c0,.28-.07.59-.11.93l-1.77,13.46a4.53,4.53,0,0,1-.41,1.62,1.17,1.17,0,0,1-.73.51,1,1,0,0,1-.73-.4,5.08,5.08,0,0,1-.49-1.73l-1.1-6.77c0-.08,0-.27-.1-.58a5.14,5.14,0,0,0,.92-.53,3.4,3.4,0,0,0,.88-1,6.16,6.16,0,0,0,.75-1.93,9.63,9.63,0,0,0,.22-2c0-1.87-.44-3.14-1.34-3.81a3.38,3.38,0,0,0-2-.54h-4v.78a1.78,1.78,0,0,1,.85.3,1.4,1.4,0,0,1,.19.91c0,.24,0,.56-.06,1,0,.21,0,.45-.09.73L95.74,17.56a4.53,4.53,0,0,1-.41,1.62,1.15,1.15,0,0,1-.75.52v.78h4.28V19.7a1.62,1.62,0,0,1-.86-.32,1.72,1.72,0,0,1-.18-1v-.29c0-.09,0-.18,0-.25l.12-1,.86-6.24h.4l1.55,9.92h10.8l.85-5.83-.35-.13a7.9,7.9,0,0,1-2.24,4.23,3.35,3.35,0,0,1-2.23.76.71.71,0,0,1-.65-.26,1.37,1.37,0,0,1-.15-.68c0-.09,0-.23,0-.39s0-.34.05-.51l.95-7.33a1.92,1.92,0,0,1,1.65.59,4,4,0,0,1,.42,2.18c0,.14,0,.31,0,.52s0,.46,0,.74l.4.15,1.07-8.21-.41-.1a7,7,0,0,1-1,2.65,3.15,3.15,0,0,1-2,.52l.85-6.67A3,3,0,0,1,109.09,1.63Zm-9,7.75a3.35,3.35,0,0,1-1.15.2l.87-6.87a4,4,0,0,1,.23-1.06.45.45,0,0,1,.43-.27,1.05,1.05,0,0,1,1,.83,6.14,6.14,0,0,1,.3,2.08,11.74,11.74,0,0,1-.21,2.29,9,9,0,0,1-.47,1.65A2,2,0,0,1,100.1,9.38ZM120.18.07h.43l-.59,6-.37-.1-.05-1a10.11,10.11,0,0,0-.41-2.39c-.34-1-.83-1.57-1.48-1.57s-.95.42-1.21,1.26a6.17,6.17,0,0,0-.25,1.8,5.92,5.92,0,0,0,.26,1.82,5.23,5.23,0,0,0,.44,1L118.19,9a12.6,12.6,0,0,1,1.12,2.57,10.75,10.75,0,0,1,.47,3.29,10,10,0,0,1-.9,4.29,2.76,2.76,0,0,1-2.46,1.91,2.17,2.17,0,0,1-.79-.15,3.28,3.28,0,0,1-.79-.44l-.36-.28-.26-.18a.38.38,0,0,0-.16,0,.34.34,0,0,0-.34.23,5.5,5.5,0,0,0-.23.84h-.43l.52-6.73.41.06c0,1,.07,1.66.12,2.09a7.13,7.13,0,0,0,.49,1.95,3.52,3.52,0,0,0,.73,1.18,1.25,1.25,0,0,0,.9.41c.57,0,1-.39,1.34-1.15a7.13,7.13,0,0,0,.47-2.68,9.86,9.86,0,0,0-1.76-4.77,11.23,11.23,0,0,1-1.77-5.58,9.8,9.8,0,0,1,.78-4.12A2.41,2.41,0,0,1,117.46,0a2.06,2.06,0,0,1,.79.16,1.9,1.9,0,0,1,.47.25l.37.25a1.15,1.15,0,0,0,.25.12.47.47,0,0,0,.22,0A.44.44,0,0,0,120,.62,2.6,2.6,0,0,0,120.18.07Zm10,2a26.67,26.67,0,0,0-.66,3.7l-.9,6.85a32.12,32.12,0,0,1-1.16,5.7c-.68,1.83-1.67,2.74-3,2.74a2.7,2.7,0,0,1-2.28-1.36,6.67,6.67,0,0,1-.92-3.77,19.46,19.46,0,0,1,.11-2c0-.46.15-1.26.3-2.42l1-7.36c0-.33.08-.64.11-.93s0-.55,0-.77a1.38,1.38,0,0,0-.2-.91,1.74,1.74,0,0,0-.85-.3V.41h4.43v.78a1.39,1.39,0,0,0-.91.47,4.25,4.25,0,0,0-.44,1.68l-1.18,9c-.11.8-.19,1.46-.25,2q-.15,1.37-.15,2a4.41,4.41,0,0,0,.48,2.27,1.44,1.44,0,0,0,1.29.78c.91,0,1.62-.82,2.13-2.48a30.62,30.62,0,0,0,.91-4.85L129,5.76c.1-.91.14-1.3.13-1.19a14.64,14.64,0,0,0,.13-1.6,2.12,2.12,0,0,0-.38-1.46,1.35,1.35,0,0,0-.77-.32V.41H131v.78A1.18,1.18,0,0,0,130.23,2.06Zm8.41,12.59-.84,5.83h-8V19.7a1.24,1.24,0,0,0,.76-.52,4.73,4.73,0,0,0,.4-1.63L132.75,4.1q.08-.57.12-1c0-.26,0-.48,0-.68,0-.51-.06-.83-.2-1a1.67,1.67,0,0,0-.85-.31V.41h4.56v.78a1.67,1.67,0,0,0-1,.49A4.17,4.17,0,0,0,135,3.34l-1.87,14.31c0,.16,0,.31-.05.45s0,.3,0,.48a1,1,0,0,0,.21.72.8.8,0,0,0,.59.21,3.54,3.54,0,0,0,2.56-1.05,9.24,9.24,0,0,0,1.91-3.94Zm7.72-8.56a7.63,7.63,0,0,0-.79-4,1.53,1.53,0,0,0-1.21-.64l-2,15.35-.12,1a2.47,2.47,0,0,0,0,.34,2.35,2.35,0,0,0,0,.26c0,.52.08.84.23,1a2,2,0,0,0,1,.3v.78h-4.76V19.7a1.18,1.18,0,0,0,.9-.26,3.75,3.75,0,0,0,.6-1.88l2.11-16.11a2.17,2.17,0,0,0-1.83,1.08,9.57,9.57,0,0,0-1.27,3.21l-.37-.2.56-5.13h7.91l-.52,5.76Zm3.41-3.79a6.17,6.17,0,0,0-.25,1.8,5.63,5.63,0,0,0,.26,1.82,5.23,5.23,0,0,0,.44,1L151.46,9a13.19,13.19,0,0,1,1.13,2.57,11.08,11.08,0,0,1,.46,3.29,10,10,0,0,1-.9,4.29,2.76,2.76,0,0,1-2.46,1.91,2.21,2.21,0,0,1-.79-.15,3.28,3.28,0,0,1-.79-.44l-.36-.28-.26-.18a.38.38,0,0,0-.16,0,.34.34,0,0,0-.34.23,5.5,5.5,0,0,0-.23.84h-.43l.52-6.73.41.06c0,1,.07,1.66.12,2.09a7.13,7.13,0,0,0,.49,1.95,3.52,3.52,0,0,0,.73,1.18,1.25,1.25,0,0,0,.9.41c.57,0,1-.39,1.34-1.15a7.13,7.13,0,0,0,.47-2.68,9.86,9.86,0,0,0-1.76-4.77,11.23,11.23,0,0,1-1.77-5.58,9.8,9.8,0,0,1,.78-4.12A2.41,2.41,0,0,1,150.73,0a2.06,2.06,0,0,1,.79.16,1.9,1.9,0,0,1,.47.25l.37.25a1.34,1.34,0,0,0,.24.12.56.56,0,0,0,.23,0,.44.44,0,0,0,.39-.21,2.6,2.6,0,0,0,.23-.55h.43l-.59,6-.37-.1,0-1a10.11,10.11,0,0,0-.41-2.39c-.34-1-.83-1.57-1.48-1.57S150,1.46,149.77,2.3Z",opacity:1,strokeColor:"",fillColor:"#192760",width:153.879,height:21.051,stampFillColor:"#dce3ef",stampStrokeColor:""};break;case"InformationOnly":case"Information Only":e={iconName:"Information Only",pathdata:"M4,19.14a2,2,0,0,0,1,.32v.76H0v-.76a1.42,1.42,0,0,0,.87-.52,4,4,0,0,0,.47-1.59l2-13.24c.06-.38.1-.69.13-1a5.73,5.73,0,0,0,0-.67c0-.5-.08-.81-.24-.94a2.2,2.2,0,0,0-1-.31V.48H7.26v.76a1.48,1.48,0,0,0-.88.52,4.14,4.14,0,0,0-.45,1.6l-2,13.24-.13,1c0,.1,0,.19,0,.3a2.72,2.72,0,0,0,0,.28A1.32,1.32,0,0,0,4,19.14ZM18.17,1.3l.24-.06V.48H15v.76a1.66,1.66,0,0,1,.9.33,2.08,2.08,0,0,1,.4,1.48,12.85,12.85,0,0,1-.1,1.34c-.05.41-.11.87-.18,1.39l-1.29,8.34L11.15.48H7.83v.76a1.69,1.69,0,0,1,.77.24,1.9,1.9,0,0,1,.51,1.06l.07.3L7.33,15a24.86,24.86,0,0,1-.76,3.61,1.32,1.32,0,0,1-.92.9v.76H9.09v-.76a1.67,1.67,0,0,1-.88-.32,1.92,1.92,0,0,1-.44-1.44,7.09,7.09,0,0,1,0-.79c0-.43.13-1.09.27-2L9.72,4.38,14,20.71h.41l2.3-15a28.78,28.78,0,0,1,.67-3.42C17.57,1.72,17.83,1.38,18.17,1.3ZM19.33.48v.76a2.32,2.32,0,0,1,1,.3c.15.13.23.42.23.9,0,.23,0,.55-.07,1,0,.2-.06.44-.1.71l-2,13.23a4,4,0,0,1-.46,1.58,1.39,1.39,0,0,1-.88.54v.76h4.89v-.76a1.36,1.36,0,0,1-.78-.19,1.39,1.39,0,0,1-.41-1.17c0-.1,0-.21,0-.31s0-.22,0-.35l1.09-7.21a2.09,2.09,0,0,1,1.83.64A3.81,3.81,0,0,1,24.1,13c0,.11,0,.28,0,.49s0,.46,0,.75l.45.14,1.22-8.07-.46-.1a6.19,6.19,0,0,1-1.11,2.59A3.89,3.89,0,0,1,22,9.28l1-6.54a2.43,2.43,0,0,1,.33-1.08.93.93,0,0,1,.76-.26,2.45,2.45,0,0,1,2.52,1.54A9,9,0,0,1,27,6l.44.13.7-5.6ZM39.06,7.11a21,21,0,0,1-2,9.07q-2.16,4.61-5,4.6a3.28,3.28,0,0,1-2.88-1.92,10.29,10.29,0,0,1-1.11-5.14,21.08,21.08,0,0,1,2.07-9.19Q32.31,0,35,0a3.37,3.37,0,0,1,2.93,1.92A10.14,10.14,0,0,1,39.06,7.11ZM36.68,4.6a7,7,0,0,0-.42-2.55A1.37,1.37,0,0,0,35,1c-1.37,0-2.52,2.17-3.46,6.53a40.81,40.81,0,0,0-1.07,8.26,10,10,0,0,0,.21,2.2c.26,1.18.74,1.77,1.43,1.77s1.24-.43,1.78-1.29a18.75,18.75,0,0,0,1.65-4.93,43.28,43.28,0,0,0,.85-4.83A36.93,36.93,0,0,0,36.68,4.6ZM61,19.15a2.25,2.25,0,0,0,1,.31v.76H56.84v-.76A2,2,0,0,0,58,19a3.6,3.6,0,0,0,.5-1.63L60.56,3.76l-6.2,16.85H53.9L52.78,4.24,51.12,15c-.09.55-.15,1-.2,1.37a13,13,0,0,0-.11,1.42,1.8,1.8,0,0,0,.46,1.43,1.54,1.54,0,0,0,.86.29v.76H45.49l-1.78-9.76h-.47l-1,6.14-.13,1,0,.25c0,.09,0,.19,0,.28a1.47,1.47,0,0,0,.22,1,2,2,0,0,0,1,.32v.76H38.37v-.76a1.42,1.42,0,0,0,.88-.52,4.21,4.21,0,0,0,.46-1.59l2-13.24c0-.27.08-.51.11-.71a8.23,8.23,0,0,0,.07-1,1.23,1.23,0,0,0-.23-.9,2.32,2.32,0,0,0-1-.3V.48h4.54A4.34,4.34,0,0,1,47.62,1c1,.65,1.54,1.9,1.54,3.75a7.78,7.78,0,0,1-.26,2A5.56,5.56,0,0,1,48,8.62a3.87,3.87,0,0,1-1,1,8.06,8.06,0,0,1-1.06.52c.05.3.09.49.11.57l1.27,6.66a4.58,4.58,0,0,0,.55,1.7,1.23,1.23,0,0,0,.83.39,1.31,1.31,0,0,0,.86-.84A23,23,0,0,0,50.36,15L52.05,4c.06-.37.11-.7.15-1a7.42,7.42,0,0,0,0-.75c0-.41-.08-.67-.25-.78a2.09,2.09,0,0,0-.94-.21V.48h3.77l1,13.91,5-13.91h3.51v.76a1.46,1.46,0,0,0-.79.4A3.71,3.71,0,0,0,63,3.31L61,16.59c0,.29-.09.58-.13.88s-.05.55-.05.75Q60.79,19,61,19.15Zm-15.14-11a7.46,7.46,0,0,0,.53-1.62,9.54,9.54,0,0,0,.25-2.26,5.31,5.31,0,0,0-.35-2,1.18,1.18,0,0,0-1.16-.81.54.54,0,0,0-.5.26,3.37,3.37,0,0,0-.26,1.05l-1,6.76a4.28,4.28,0,0,0,1.31-.2A2.17,2.17,0,0,0,45.89,8.17ZM73.21,19.51v.71h-5v-.71a1.61,1.61,0,0,0,1-.41,1.92,1.92,0,0,0,.3-1.29c0-.22,0-.75-.09-1.58,0-.17-.06-.89-.16-2.15H65.68l-1,3c-.06.2-.12.42-.17.66a3.4,3.4,0,0,0-.08.69q0,.62.21.78a1.9,1.9,0,0,0,.86.3v.71H62.29v-.71A2,2,0,0,0,63,19a6.47,6.47,0,0,0,.72-1.56L69.82.07h.43L71.83,17A6.77,6.77,0,0,0,72.22,19,1.23,1.23,0,0,0,73.21,19.51Zm-4.08-6.6-.61-7.18-2.44,7.18ZM82.52,6.14l.6-5.66H74l-.63,5,.42.2a8.71,8.71,0,0,1,1.46-3.16,2.57,2.57,0,0,1,2.1-1.06L75,17.35a3.36,3.36,0,0,1-.68,1.85,1.57,1.57,0,0,1-1,.26v.76H78.7v-.76a2.69,2.69,0,0,1-1.11-.3c-.18-.13-.27-.45-.27-.95a2.26,2.26,0,0,1,0-.26c0-.09,0-.2,0-.33l.14-1L79.8,1.5a1.87,1.87,0,0,1,1.39.63c.58.7.88,2,.91,3.94ZM88.84.48H83.92v.76a2.31,2.31,0,0,1,1,.31c.15.13.23.44.23.94a5.56,5.56,0,0,1,0,.67c0,.26-.08.57-.14,1l-2,13.24a4,4,0,0,1-.47,1.59,1.36,1.36,0,0,1-.87.52v.76H86.5v-.76a2,2,0,0,1-1-.32,1.32,1.32,0,0,1-.23-.94c0-.09,0-.18,0-.28s0-.2,0-.3l.13-1,2-13.24A4.09,4.09,0,0,1,88,1.76a1.45,1.45,0,0,1,.87-.52ZM99.11,7.11a21,21,0,0,1-2,9.07q-2.16,4.61-5,4.6a3.28,3.28,0,0,1-2.88-1.92,10.29,10.29,0,0,1-1.11-5.14,21.08,21.08,0,0,1,2.07-9.19C91.63,1.51,93.25,0,95,0A3.36,3.36,0,0,1,98,1.92,10,10,0,0,1,99.11,7.11ZM96.72,4.6a7.18,7.18,0,0,0-.41-2.55c-.28-.7-.7-1-1.29-1-1.37,0-2.52,2.17-3.46,6.53a40.7,40.7,0,0,0-1.06,8.26,10,10,0,0,0,.2,2.2c.26,1.18.74,1.77,1.43,1.77a2.2,2.2,0,0,0,1.78-1.29,18.75,18.75,0,0,0,1.65-4.93,41.1,41.1,0,0,0,.85-4.83A34.65,34.65,0,0,0,96.72,4.6Zm11.1-3.36a1.66,1.66,0,0,1,.9.33,2.08,2.08,0,0,1,.4,1.48,12.85,12.85,0,0,1-.1,1.34c0,.41-.11.87-.18,1.39l-1.29,8.34L104,.48h-3.33v.76a1.7,1.7,0,0,1,.78.24,2,2,0,0,1,.51,1.06l.07.3L100.13,15a24,24,0,0,1-.75,3.61,1.35,1.35,0,0,1-.93.9v.76h3.45v-.76a1.67,1.67,0,0,1-.88-.32,1.88,1.88,0,0,1-.44-1.44,7.09,7.09,0,0,1,0-.79c0-.43.13-1.09.27-2l1.64-10.57,4.29,16.33h.41l2.3-15a28.78,28.78,0,0,1,.67-3.42c.18-.59.44-.93.78-1l.23-.06V.48h-3.39ZM125,7.11a21,21,0,0,1-2,9.07c-1.45,3.07-3.1,4.6-5,4.6a3.28,3.28,0,0,1-2.87-1.92A10.29,10.29,0,0,1,114,13.72a21.22,21.22,0,0,1,2.06-9.19Q118.22,0,120.91,0a3.36,3.36,0,0,1,2.92,1.92A10,10,0,0,1,125,7.11ZM122.59,4.6a7,7,0,0,0-.41-2.55,1.37,1.37,0,0,0-1.28-1c-1.37,0-2.53,2.17-3.46,6.53a40.11,40.11,0,0,0-1.07,8.26,10.65,10.65,0,0,0,.2,2.2q.39,1.77,1.44,1.77a2.2,2.2,0,0,0,1.77-1.29,18.29,18.29,0,0,0,1.66-4.93,45.71,45.71,0,0,0,.85-4.83A36.53,36.53,0,0,0,122.59,4.6Zm14.26-3.3.24-.06V.48h-3.4v.76a1.74,1.74,0,0,1,.91.33,2.13,2.13,0,0,1,.4,1.48c0,.28,0,.73-.11,1.34,0,.41-.11.87-.18,1.39l-1.29,8.34L129.83.48h-3.32v.76a1.69,1.69,0,0,1,.77.24,1.9,1.9,0,0,1,.51,1.06l.07.3L126,15a27,27,0,0,1-.75,3.61,1.35,1.35,0,0,1-.93.9v.76h3.44v-.76a1.67,1.67,0,0,1-.88-.32,1.92,1.92,0,0,1-.44-1.44c0-.26,0-.52,0-.79.05-.43.13-1.09.27-2l1.65-10.57,4.29,16.33h.41l2.29-15a31.07,31.07,0,0,1,.67-3.42C136.25,1.72,136.52,1.38,136.85,1.3Zm8.52,13.06a8.55,8.55,0,0,1-2.19,3.87,4.44,4.44,0,0,1-2.94,1,1,1,0,0,1-.68-.21.9.9,0,0,1-.24-.7,3.4,3.4,0,0,1,0-.48c0-.14,0-.28,0-.44l2.15-14.08a3.69,3.69,0,0,1,.5-1.64,2.22,2.22,0,0,1,1.16-.48V.48H138v.76a2.2,2.2,0,0,1,1,.31c.16.13.24.44.24.94a5.73,5.73,0,0,1-.05.67c0,.26-.07.57-.13,1l-2,13.23a4,4,0,0,1-.47,1.6,1.36,1.36,0,0,1-.87.52v.76h9.16l1-5.74ZM151.79.48v.76a1.52,1.52,0,0,1,.76.2,1.21,1.21,0,0,1,.37,1,4.09,4.09,0,0,1-.17,1.09c-.07.24-.16.5-.27.79L150.32,9.8l-1.18-6.44a4.51,4.51,0,0,1-.08-.6,4.37,4.37,0,0,1,0-.46c0-.43.09-.71.27-.83a1.75,1.75,0,0,1,.87-.23V.48h-4.63v.76a.94.94,0,0,1,.8.4,5.08,5.08,0,0,1,.42,1.44L148.2,11l-1,6.35a3.35,3.35,0,0,1-.61,1.73,1.91,1.91,0,0,1-1.06.39v.76h5.32v-.76a2,2,0,0,1-.95-.25,1.29,1.29,0,0,1-.33-1.05,7.29,7.29,0,0,1,.06-.73q.06-.51.12-.84l.82-5.46,3.12-7.89a5.54,5.54,0,0,1,.89-1.59,1.28,1.28,0,0,1,.63-.41V.48Z",opacity:1,strokeColor:"",fillColor:"#192760",width:155.237,height:20.783,stampFillColor:"#dce3ef",stampStrokeColor:""}}if(e)return e.modifiedDate=this.pdfViewer.annotation.stickyNotesAnnotationModule.getDateAndTime(),this.currentStampAnnotation=e,e}},t.prototype.saveStampAnnotations=function(){var t=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_stamp");this.pdfViewerBase.isStorageExceed&&(t=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]);for(var e=new Array,i=0;ir;r++)this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));s=a.annotations}e[a.pageIndex]=s}return JSON.stringify(e)},t.prototype.storeStampInSession=function(t,e){var i=Math.round(JSON.stringify(window.sessionStorage).length/1024),n=Math.round(JSON.stringify(e).length/1024);(i>4500||n>4500)&&(this.pdfViewerBase.isStorageExceed=!0,this.pdfViewer.annotationModule.clearAnnotationStorage());var o=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_stamp"),s=0;if(this.pdfViewerBase.isStorageExceed&&(o=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]),o){this.pdfViewer.annotationModule.storeAnnotationCollections(e,t);var a=JSON.parse(o);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_stamp");var r=this.pdfViewer.annotationModule.getPageCollection(a,t);if(a[r])a[r].annotations.push(e),s=a[r].annotations.indexOf(e);else{var l={pageIndex:t,annotations:[]};l.annotations.push(e),s=l.annotations.indexOf(e),a.push(l)}L=JSON.stringify(a);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]=L:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_stamp",L)}else{this.pdfViewer.annotationModule.storeAnnotationCollections(e,t);var u={pageIndex:t,annotations:[]};u.annotations.push(e),s=u.annotations.indexOf(e);var M=[];M.push(u);var L=JSON.stringify(M);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_stamp"]=L:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_stamp",L)}return s},t.prototype.updateSessionStorage=function(t,e,i){if(null!=e)for(var n=0;n0)for(var n=0;n1?h.insertBefore(u,h.childNodes[h.childElementCount-1]):i.appendChild(u))}else i.appendChild(u);u.addEventListener("click",this.commentsDivClickEvent.bind(this)),u.addEventListener("dblclick",this.commentsDivDoubleClickEvent.bind(this)),M.actionSuccess=this.modifyProperty.bind(this,M)},t.prototype.createCommentsContainer=function(t,i,n){var o=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+i);if(!o){var s=document.getElementById(this.pdfViewer.element.id+"_accordionPageContainer"+i);s&&s.remove(),(o=this.createPageAccordion(i))&&o.ej2_instances[0].expandItem(!0)}var r=document.getElementById(this.pdfViewer.element.id+"_accordioncontent"+i);this.commentsContainer=e.createElement("div",{id:this.pdfViewer.element.id+"commentscontainer"+i+"_"+this.commentsCount,className:"e-pv-comments-container"}),this.commentsContainer.accessKey=i.toString(),t&&(this.commentsContainer.id=t.annotName),this.commentsContainer.addEventListener("mousedown",this.commentsAnnotationSelect.bind(this));var l=e.createElement("div",{id:this.pdfViewer.element.id+"_commentdiv"+i+"_"+this.commentsCount,className:"e-pv-comments-div"});if(this.commentsCount=this.commentsCount+1,this.commentsContainer.appendChild(l),this.updateCommentPanelScrollTop(i),t&&r&&(t.position||0===t.position?r.insertBefore(this.commentsContainer,r.children[t.position]):r.appendChild(this.commentsContainer)),t&&r)if(t.indent)this.commentsContainer.setAttribute("name","shape_measure"),this.createTitleContainer(l,"shape_measure",t.subject,t.modifiedDate,t.author);else if("sticky"===t.shapeAnnotationType||"stamp"===t.shapeAnnotationType){var u=this.createTitleContainer(l,t.shapeAnnotationType,null,t.modifiedDate,t.author);this.commentsContainer.setAttribute("name",u),"sticky"===u&&(n||this.addStickyNotesAnnotations(i-1,t))}else"textMarkup"===t.shapeAnnotationType?(this.commentsContainer.setAttribute("name","textMarkup"),this.createTitleContainer(l,"textMarkup",t.subject,t.modifiedDate,t.author)):"FreeText"===t.shapeAnnotationType?(t.note=t.dynamicText,this.commentsContainer.setAttribute("name","freetext"),this.createTitleContainer(l,"freeText",t.subject,t.modifiedDate)):"Ink"===t.shapeAnnotationType?(t.note=t.dynamicText,this.commentsContainer.setAttribute("name","ink"),this.createTitleContainer(l,"ink",t.subject,t.modifiedDate)):(this.commentsContainer.setAttribute("name","shape"),"Line"===t.shapeAnnotationType?this.createTitleContainer(l,"shape",t.subject,t.modifiedDate,t.author):this.createTitleContainer(l,"shape",t.shapeAnnotationType,t.modifiedDate,t.author));var M=e.createElement("div",{id:this.pdfViewer.element.id+"_commenttextbox",className:"e-pv-comment-textbox"}),L=new a.InPlaceEditor({mode:"Inline",type:"Text",model:{placeholder:this.pdfViewer.localeObj.getConstant("Add a comment")+".."},emptyText:"",editableOn:"EditIconClick",saveButton:{content:this.pdfViewer.localeObj.getConstant("Post"),cssClass:"e-outline",disabled:!0},cancelButton:{content:this.pdfViewer.localeObj.getConstant("Cancel"),cssClass:"e-outline"},submitOnEnter:!0});L.appendTo(M);for(var d=document.querySelectorAll(".e-editable-inline"),w=0;w0&&this.createCommentDiv(this.commentsContainer)}}return l.addEventListener("click",this.commentsDivClickEvent.bind(this)),l.addEventListener("mouseover",this.commentDivMouseOver.bind(this)),l.addEventListener("mouseleave",this.commentDivMouseLeave.bind(this)),l.addEventListener("mouseout",this.commentDivMouseLeave.bind(this)),l.addEventListener("focusout",this.commentDivMouseLeave.bind(this)),M.addEventListener("dblclick",this.openEditorElement.bind(this)),this.commentsContainer.id},t.prototype.modifyProperty=function(t){var e=t.element.parentElement.id,i=t.element.parentElement.parentElement.id,n=t.element.previousSibling.firstChild;this.updateModifiedDate(n),this.modifyCommentsProperty(t.value,e,i,t.prevValue)},t.prototype.createTitleContainer=function(t,i,n,o,s){var a;"stamp"===i||"Stamp"===i?a="stamp":"shape"===i||"Line"===i||"Radius"===i||"Rectangle"===i||"Ellipse"===i||"Polygon"===i||"LineWidthArrowHead"===i||"Square"===i||"Circle"===i?a="shape":"textMarkup"===i?a="textMarkup":"freeText"===i?a="freeText":"sticky"===i||"StickyNotes"===i?a="sticky":"measure"===i||"shape_measure"===i?a="measure":"ink"===i&&(a="ink");var r=e.createElement("div",{id:this.pdfViewer.element.id+"_commentTitleConatiner",className:"e-pv-comment-title-container"}),l=e.createElement("span",{id:this.pdfViewer.element.id+"_commenttype_icon"});l.style.opacity="0.6",this.updateCommentIcon(l,a,n);var u;u=s||this.pdfViewer.annotationModule.updateAnnotationAuthor(a,n),l.style.padding="8px",l.style.cssFloat="left",r.appendChild(l);var M=e.createElement("div",{id:this.pdfViewer.element.id+"_commentTitle",className:"e-pv-comment-title"});M.textContent=o?u+" - "+this.setExistingAnnotationModifiedDate(o):u+" - "+this.setModifiedDate(),r.appendChild(M);var L=e.createElement("button",{id:this.pdfViewer.element.id+"_more-options",className:"e-pv-more-options-button e-btn",attrs:{tabindex:"-1"}});L.style.visibility="hidden",L.style.zIndex="1001",L.setAttribute("type","button");var d=e.createElement("span",{id:this.pdfViewer.element.id+"_more-options_icon",className:"e-pv-more-icon e-pv-icon"});L.appendChild(d),d.style.opacity="0.87",r.appendChild(L),t.appendChild(r);var w=t.parentElement;if(w){var h=this.pdfViewer.annotationModule.updateAnnotationAuthor(a,n);w.setAttribute("author",h)}return this.isCreateContextMenu||this.createCommentContextMenu(),this.isCreateContextMenu=!0,r.addEventListener("dblclick",this.openTextEditor.bind(this)),L.addEventListener("mouseup",this.moreOptionsClick.bind(this)),a},t.prototype.createReplyDivTitleContainer=function(t,i,n){var o=e.createElement("div",{id:this.pdfViewer.element.id+"_replyTitleConatiner",className:"e-pv-reply-title-container"}),s=e.createElement("div",{id:this.pdfViewer.element.id+"_replyTitle",className:"e-pv-reply-title"});s.textContent=i?n+" - "+this.setExistingAnnotationModifiedDate(i):n+" - "+this.setModifiedDate(),o.appendChild(s);var a=e.createElement("button",{id:this.pdfViewer.element.id+"_more-options",className:"e-pv-more-options-button e-btn",attrs:{tabindex:"-1"}});a.style.visibility="hidden",a.style.zIndex="1001",a.setAttribute("type","button");var r=e.createElement("span",{id:this.pdfViewer.element.id+"_more-options_icon",className:"e-pv-more-icon e-pv-icon"});a.appendChild(r),r.style.opacity="0.87",o.appendChild(a),t.appendChild(o),o.addEventListener("dblclick",this.openTextEditor.bind(this)),a.addEventListener("mouseup",this.moreOptionsClick.bind(this))},t.prototype.updateCommentIcon=function(t,e,i){"sticky"===e?t.className="e-pv-comment-icon e-pv-icon":"stamp"===e?t.className="e-pv-stamp-icon e-pv-icon":"shape"===e?t.className="Line"===i?"e-pv-shape-line-icon e-pv-icon":"LineWidthArrowHead"===i||"Arrow"===i?"e-pv-shape-arrow-icon e-pv-icon":"Circle"===i||"Ellipse"===i||"Oval"===i?"e-pv-shape-circle-icon e-pv-icon":"Rectangle"===i||"Square"===i?"e-pv-shape-rectangle-icon e-pv-icon":"Polygon"===i?"e-pv-shape-pentagon-icon e-pv-icon":"e-pv-annotation-shape-icon e-pv-icon":"measure"===e?t.className="Distance"===i||"Distance calculation"===i?"e-pv-calibrate-distance-icon e-pv-icon":"Perimeter"===i||"Perimeter calculation"===i?"e-pv-calibrate-perimeter-icon e-pv-icon":"Radius"===i||"Radius calculation"===i?"e-pv-calibrate-radius-icon e-pv-icon":"Area"===i||"Area calculation"===i?"e-pv-calibrate-area-icon e-pv-icon":"Volume"===i||"Volume calculation"===i?"e-pv-calibrate-volume-icon e-pv-icon":"e-pv-annotation-calibrate-icon e-pv-icon":"textMarkup"===e?t.className="Highlight"===i?"e-pv-highlight-icon e-pv-icon":"Underline"===i?"e-pv-underline-icon e-pv-icon":"Strikethrough"===i?"e-pv-strikethrough-icon e-pv-icon":"e-pv-annotation-icon e-pv-icon":"freeText"===e?t.className="e-pv-freetext-icon e-pv-icon":"ink"!==e&&"Ink"!==i||(t.className="e-pv-inkannotation-icon e-pv-icon")},t.prototype.updateStatusContainer=function(t,e,i,n){"Accepted"===t?(i.style.backgroundColor="rgb(24,169,85)",e.className="e-pv-accepted-icon"):"Completed"===t?(i.style.backgroundColor="rgb(0,122,255)",e.className="e-pv-completed-icon"):"Cancelled"===t?(i.style.backgroundColor="rgb(245,103,0)",e.className="e-pv-cancelled-icon"):"Rejected"===t?(i.style.backgroundColor="rgb(255,59,48)",e.className="e-pv-rejected-icon"):(e.className="",n.remove())},t.prototype.updateAccordionContainer=function(t){var e=parseInt(t.accessKey),i=document.getElementById(this.pdfViewer.element.id+"_accordionContainer"+e);i&&i.remove();var n=document.getElementById(this.pdfViewer.element.id+"_accordionContentContainer");n&&0===n.childElementCount&&(n.style.display="none",document.getElementById(this.pdfViewer.element.id+"_commentsPanelText")&&(this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export Annotations")],!1),this.pdfViewerBase.navigationPane.annotationMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Export XFDF")],!1),document.getElementById(this.pdfViewer.element.id+"_commentsPanelText").style.display="block",this.updateCommentPanelTextTop()))},t.prototype.createCommentContextMenu=function(){this.commentContextMenu=[{text:this.pdfViewer.localeObj.getConstant("Edit")},{text:this.pdfViewer.localeObj.getConstant("Delete Context")},{text:this.pdfViewer.localeObj.getConstant("Set Status"),items:[{text:this.pdfViewer.localeObj.getConstant("None")},{text:this.pdfViewer.localeObj.getConstant("Accepted")},{text:this.pdfViewer.localeObj.getConstant("Cancelled")},{text:this.pdfViewer.localeObj.getConstant("Completed")},{text:this.pdfViewer.localeObj.getConstant("Rejected")}]}];var t=e.createElement("ul",{id:this.pdfViewer.element.id+"_comment_context_menu"});this.pdfViewer.element.appendChild(t),this.commentMenuObj=new r.ContextMenu({target:"#"+this.pdfViewer.element.id+"_more-options",items:this.commentContextMenu,beforeOpen:this.contextMenuBeforeOpen.bind(this),select:this.commentMenuItemSelect.bind(this)}),this.pdfViewer.enableRtl&&(this.commentMenuObj.enableRtl=!0),this.commentMenuObj.appendTo(t),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.commentMenuObj.animationSettings.effect="ZoomIn":this.commentMenuObj.animationSettings.effect="SlideDown"},t.prototype.contextMenuBeforeOpen=function(t){var e,i=document.querySelectorAll("#"+this.pdfViewer.element.id+"_more-options");if(i)for(var n=0;n0){for(var d=!1,w=0;w0){var a=document.getElementById(t.annotName),n=this.pdfViewerBase.currentPageNumber-1;a&&(n=(L=parseInt(a.accessKey))-1);var o=g(t),r=t.comments[t.comments.length-1],l=document.getElementById(r.annotName);return l&&l.remove(),t=i,this.updateUndoRedoCollections(t,n),o}}else if("Status Property Added"===e){if(t){var a=document.getElementById(t.annotName),n=this.pdfViewerBase.currentPageNumber-1;a&&(n=(L=parseInt(a.accessKey))-1);o=g(t);if(t.annotName===i.annotName)t.review=i.review,t.state=i.state,t.stateModel=i.stateModel,this.pdfViewer.annotation.redoCommentsElement.push(t);else for(var u=0;ur;r++)this.pdfViewer.annotationModule.updateModifiedDate(a.annotations[r]),a.annotations[r].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(a.annotations[r].bounds,a.pageIndex));s=a.annotations}e[a.pageIndex]=s}return JSON.stringify(e)},t.prototype.deleteStickyNotesAnnotations=function(t,e){var i=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_annotations_sticky");if(this.pdfViewerBase.isStorageExceed&&(i=this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_sticky"]),i){var n=JSON.parse(i);this.pdfViewerBase.isStorageExceed||window.sessionStorage.removeItem(this.pdfViewerBase.documentId+"_annotations_sticky");var o=this.pdfViewer.annotationModule.getPageCollection(n,e);n[o]&&(n[o].annotations=t);var s=JSON.stringify(n);this.pdfViewerBase.isStorageExceed?this.pdfViewerBase.annotationStorage[this.pdfViewerBase.documentId+"_annotations_sticky"]=s:window.sessionStorage.setItem(this.pdfViewerBase.documentId+"_annotations_sticky",s)}},t.prototype.addStickyNotesAnnotations=function(t,e){var i=this.getAnnotations(t,null,"sticky");i&&i.push(e),this.manageAnnotations(i,t,"sticky")},t.prototype.addTextToComments=function(t,e){var i=document.getElementById(t);i&&(i.firstChild.firstChild.nextSibling.ej2_instances[0].value=e)},t.prototype.updateAnnotationCollection=function(t,e,i){var n=this.findAnnotationType(e),o=this.getAnnotations(e.pageIndex,null,n);if(i&&(o=this.pdfViewer.annotationModule.removedAnnotationCollection),null!==o)for(var s=0;s=12?12===t?t+":"+e+" PM":t-12+":"+e+" PM":t+":"+e+" AM"},t.prototype.setModifiedDate=function(t){var e;e=t?this.getDateAndTime(t):this.getDateAndTime();var i,n=new Date(e),o=n.toString().split(" ").splice(1,2).join(" ");if(2===n.toLocaleTimeString().split(" ").length)i=n.toLocaleTimeString().split(" ")[0].split(":").splice(0,2).join(":")+" "+n.toLocaleTimeString().split(" ")[1];else{var s=parseInt(n.toLocaleTimeString().split(":")[0]),a=n.toLocaleTimeString().split(":")[1];i=this.updateModifiedTime(s,a)}return o+", "+i},t.prototype.updateModifiedDate=function(t){t.id===this.pdfViewer.element.id+"_commenttype_icon"&&(t=t.nextSibling);var e=t.textContent.split("-")[0];t.textContent=e+" - "+this.setModifiedDate()},t.prototype.updateAnnotationModifiedDate=function(t,e,i){var n;if(t){var o=document.getElementById(t.annotName);if(o){if(e){var s=this.findAnnotationType(t),a=this.getAnnotations(t.pageIndex,null,s);if(null!=a&&t)for(var r=0;rl;l++){this.pdfViewer.annotationModule.updateModifiedDate(r.annotations[l]);var u=r.annotations[l].strokeColor;r.annotations[l].strokeColor=JSON.stringify(this.pdfViewerBase.signatureModule.getRgbCode(u)),r.annotations[l].bounds=JSON.stringify(r.annotations[l].bounds);var M=i.processPathData(r.annotations[l].data),L=i.splitArrayCollection(M);r.annotations[l].data=JSON.stringify(L)}a=r.annotations}e[r.pageIndex]=a}return JSON.stringify(e)},t.prototype.addInCollection=function(t,e){if(e){var i=this.getAnnotations(t,null);i&&i.push(e),this.manageInkAnnotations(i,t)}},t.prototype.calculateInkSize=function(){for(var t=-1,e=-1,n=-1,o=-1,s=i.processPathData(this.outputString),a=this.pdfViewerBase.getZoomFactor(),r=0;r=u&&(t=u),e>=M&&(e=M),n<=u&&(n=u),o<=M&&(o=M)}}return{x:t/a,y:e/a,width:(n-t)/a,height:(o-e)/a}},t.prototype.renderExistingInkSignature=function(t,e,n){var o,s=!1;if(!n)for(var a=0;a0&&-1===this.inkAnnotationindex.indexOf(e)&&this.inkAnnotationindex.push(e);for(var r=0;r1&&s.includes("json"))(a=new FileReader).readAsDataURL(n),a.onload=function(e){if(e.currentTarget.result){var i=e.currentTarget.result.split(",")[1],n=atob(i);if(n){var s=JSON.parse(n);o.pdfViewerBase.importAnnotations(s,t.AnnotationDataFormat.Json)}}};else if(n.name.split(".xfdf").length>1&&s.includes("xfdf")){var a=new FileReader;a.readAsDataURL(n),a.onload=function(e){if(e.currentTarget.result){var i=e.currentTarget.result.split(",")[1];atob(i)&&o.pdfViewerBase.importAnnotations(i,t.AnnotationDataFormat.Xfdf,!0)}}}else o.pdfViewer.fireImportFailed(n,o.pdfViewer.localeObj.getConstant("Import Failed")),o.pdfViewerBase.openImportExportNotificationPopup(o.pdfViewer.localeObj.getConstant("Import Failed"))}}},this.resizeIconMouseOver=function(t){t.srcElement.style.cursor="default"},this.resizePanelMouseDown=function(t){var e=o;e.offset=[e.sideBarResizer.offsetLeft-t.clientX,e.sideBarResizer.offsetTop-t.clientY,e.sideBarResizer.offsetParent.clientWidth],o.previousX=t.clientX,e.isDown=!0,e.isNavigationPaneResized=!0,e.pdfViewerBase.viewerContainer.style.cursor="e-resize",e.sideBarContentContainer&&(e.sideBarContentContainer.style.cursor="e-resize")},this.resizeViewerMouseLeave=function(t){var e=o;e.isDown=!1,e.isNavigationPaneResized&&e.sideBarContentContainer&&(e.pdfViewerBase.viewerContainer.style.cursor="default",e.sideBarContentContainer.style.cursor="default",e.isNavigationPaneResized=!1),e.commentPanelContainer&&e.isCommentPanelShow&&(o.commentPanelMouseLeave(t),e.isCommentPanelShow=!1)},this.resizePanelMouseMove=function(t){var e=o;if(!o.pdfViewerBase.getPopupNoteVisibleStatus()){var i=t.target;if(o.pdfViewerBase.skipPreventDefault(i)&&t.preventDefault(),e.isDown&&o.sideBarContentContainer){if(o.pdfViewer.enableRtl)(n=o.previousX-t.clientX+e.offset[2])>(s=Math.floor(o.outerContainerWidth/2))&&(n=s),ns&&(n=s),n(n=Math.floor(o.outerContainerWidth/2))&&(i=n),in&&(i=n),i';n=[{prefixIcon:"e-pv-backward-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Go Back"),id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)},{template:o},{prefixIcon:"e-pv-search-icon e-pv-icon",id:this.pdfViewer.element.id+"_search_box-icon",click:function(){var t=i.pdfViewerBase.getElement("_search_box-icon").firstElementChild;t.classList.contains("e-pv-search-close")&&i.enableSearchItems(!1),i.pdfViewer.textSearchModule.searchButtonClick(t,i.searchInput)}},{prefixIcon:"e-pv-prev-search-icon e-pv-icon",id:this.pdfViewer.element.id+"_prev_occurrence",click:function(t){i.pdfViewer.textSearchModule.searchPrevious()}},{prefixIcon:"e-pv-next-search-icon e-pv-icon",id:this.pdfViewer.element.id+"_next_occurrence",click:function(t){i.pdfViewer.textSearchModule.searchNext()}}]}else n=[{prefixIcon:"e-pv-backward-icon e-pv-icon",id:this.pdfViewer.element.id+"_backward",click:this.goBackToToolbar.bind(this)},{text:this.pdfViewer.localeObj.getConstant("Bookmarks")}];this.toolbar=new r.Toolbar({items:n,width:"",height:"",overflowMode:"Popup"}),this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.toolbarElement),"search"===t?this.initiateSearchBox():this.initiateBookmarks()},i.prototype.initiateSearchBox=function(){var t=this;this.searchInput=this.pdfViewerBase.getElement("_search_input"),this.pdfViewer.textSearchModule.searchBtn=this.pdfViewerBase.getElement("_search_box-icon").firstElementChild,this.searchInput.addEventListener("keyup",function(e){t.enableSearchItems(!0);t.searchInput.value;13===e.which?t.initiateTextSearch():t.pdfViewer.textSearchModule.resetVariables()}),this.pdfViewer.textSearchModule.searchInput=this.searchInput,this.setSearchInputWidth(),this.enableSearchItems(!1),this.searchInput.focus()},i.prototype.enableSearchItems=function(t){e.isBlazor()?this.pdfViewer._dotnetInstance.invokeMethodAsync("EnableSearchItems",t):(this.toolbar.enableItems(this.pdfViewerBase.getElement("_prev_occurrence").parentElement,t),this.toolbar.enableItems(this.pdfViewerBase.getElement("_next_occurrence").parentElement,t))},i.prototype.initiateBookmarks=function(){e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.pdfViewerBase.mobileScrollerContainer.style.display="none");var t=e.createElement("div",{id:this.pdfViewer.element.id+"_bookmarks_container",className:"e-pv-bookmark-container"});t.style.width="100%",t.style.height=this.pdfViewerBase.viewerContainer.style.height,this.pdfViewerBase.getElement("_viewerMainContainer").appendChild(t),this.pdfViewerBase.viewerContainer.style.display="none",this.isBookmarkListOpen=!0,this.pdfViewer.bookmarkViewModule.renderBookmarkContentMobile()},i.prototype.initiateTextSearch=function(){var t=this.searchInput.value;this.pdfViewer.textSearchModule.initiateSearch(t)},i.prototype.goBackToToolbar=function(){if(this.isNavigationToolbarVisible=!1,(!e.isBlazor()||e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode)&&e.isBlazor()||this.pdfViewer.textSearchModule.cancelTextSearch(),this.searchInput=null,0!==this.pdfViewer.bookmarkViewModule.childNavigateCount)this.pdfViewer.bookmarkViewModule.bookmarkList.back(),this.pdfViewer.bookmarkViewModule.childNavigateCount--;else{null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);var t=this.pdfViewerBase.getElement("_bookmarks_container");t&&(t.parentElement.removeChild(t),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.pdfViewerBase.mobileScrollerContainer.style.display="")),this.toolbarElement&&null!=this.toolbarElement.parentElement&&this.toolbarElement.parentElement.removeChild(this.toolbarElement),this.pdfViewerBase.viewerContainer.style.display="block",this.isBookmarkListOpen=!1,e.isBlazor()?this.pdfViewerBase.onWindowResize():this.pdfViewer.toolbar.annotationToolbarModule.isMobileAnnotEnabled||(this.pdfViewer.toolbarModule.showToolbar(!0),this.pdfViewerBase.onWindowResize())}},i.prototype.setSearchInputWidth=function(){var t=this.searchInput.parentElement,i=window.getComputedStyle(t.parentElement,null).getPropertyValue("padding-left");e.isBlazor()&&e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.toolbarElement=this.pdfViewerBase.getElement("_navigationToolbar"));var n=this.toolbarElement.clientWidth-this.getParentElementSearchBox("_backward").clientWidth-this.getParentElementSearchBox("_search_box-icon").clientWidth-this.getParentElementSearchBox("_prev_occurrence").clientWidth-this.getParentElementSearchBox("_next_occurrence").clientWidth-6;""!==i&&(n-=2*parseFloat(i)),t.style.width=n+"px"},i.prototype.getParentElementSearchBox=function(t){return this.pdfViewerBase.getElement(t).parentElement},i.prototype.createTooltipMobile=function(t){if(this.isTooltipCreated){if(this.toastObject){this.toastObject.title=t;var e=this.pdfViewerBase.getElement("_container_tooltip").firstElementChild;if(e)e.style.width="auto",e.firstElementChild.firstElementChild.textContent=t;else{this.isTooltipCreated=!1;var i=this.pdfViewerBase.getElement("_container_tooltip");this.toastObject&&this.toastObject.destroy(),i.parentElement.removeChild(i),this.toastObject=null,this.createMobileTooltip(t)}}}else this.createMobileTooltip(t)},i.prototype.createMobileTooltip=function(t){var i=e.createElement("div",{className:"e-pv-container-tooltip",id:this.pdfViewer.element.id+"_container_tooltip"});this.pdfViewer.element.appendChild(i),this.toastObject=new l.Toast({title:t,target:this.pdfViewer.element,close:this.onTooltipClose.bind(this),position:{X:0,Y:0},animation:{hide:{duration:200,effect:"FadeOut"}}}),this.toastObject.appendTo(i);var n=.65*this.pdfViewer.element.clientHeight,o=(this.pdfViewer.element.clientWidth-i.clientWidth)/2;this.isTooltipCreated=!0,this.toastObject.show({position:{X:o,Y:n}});var s=i.firstElementChild;s&&(s.style.width="auto")},i.prototype.onTooltipClose=function(t){if(this.pdfViewer.textSearchModule){this.isTooltipCreated=!1;var e=this.pdfViewerBase.getElement("_container_tooltip");this.pdfViewer.textSearchModule.isMessagePopupOpened=!1,this.toastObject&&this.toastObject.destroy(),e.parentElement.removeChild(e),this.toastObject=null}},i.prototype.toolbarResize=function(){this.searchInput&&(this.searchInput.style.width="auto",this.setSearchInputWidth())},i.prototype.createSidebarToolBar=function(){if(e.isBlazor())this.thumbnailButton=this.pdfViewer.element.querySelector(".e-pv-thumbnail-view-button"),this.bookmarkButton=this.pdfViewer.element.querySelector(".e-pv-bookmark-button");else{this.thumbnailButton=e.createElement("button",{id:this.pdfViewer.element.id+"_thumbnail-view",attrs:{disabled:"disabled","aria-label":"Page Thumbnails",tabindex:"-1"}}),this.thumbnailButton.className="e-pv-tbar-btn e-pv-thumbnail-view-button e-btn",this.thumbnailButton.setAttribute("type","button");var t=e.createElement("span",{id:this.pdfViewer.element.id+"_thumbnail-view_icon",className:"e-pv-thumbnail-view-disable-icon e-pv-icon"});this.thumbnailButton.appendChild(t),new o.Tooltip({content:this.pdfViewer.localeObj.getConstant("Page Thumbnails"),opensOn:"Hover",beforeOpen:this.onTooltipBeforeOpen.bind(this)}).appendTo(this.thumbnailButton),this.bookmarkButton=e.createElement("button",{id:this.pdfViewer.element.id+"_bookmark",attrs:{disabled:"disabled","aria-label":"Bookmarks",tabindex:"-1"}}),this.bookmarkButton.setAttribute("type","button"),this.bookmarkButton.className="e-pv-tbar-btn e-pv-bookmark-button e-btn";var i=e.createElement("span",{id:this.pdfViewer.element.id+"_bookmark_icon",className:"e-pv-bookmark-disable-icon e-pv-icon"});this.bookmarkButton.appendChild(i),new o.Tooltip({content:this.pdfViewer.localeObj.getConstant("Bookmarks"),opensOn:"Hover",beforeOpen:this.onTooltipBeforeOpen.bind(this)}).appendTo(this.bookmarkButton),this.sideBarToolbar.appendChild(this.thumbnailButton),this.sideBarToolbar.appendChild(this.bookmarkButton)}this.thumbnailButton.addEventListener("click",this.sideToolbarOnClick),this.bookmarkButton.addEventListener("click",this.bookmarkButtonOnClick)},i.prototype.onTooltipBeforeOpen=function(t){this.pdfViewer.toolbarSettings.showTooltip||(t.cancel=!0)},i.prototype.enableThumbnailButton=function(){this.thumbnailButton&&(this.thumbnailButton.removeAttribute("disabled"),this.thumbnailButton.children[0].classList.remove("e-pv-thumbnail-view-disable-icon"),this.thumbnailButton.children[0].classList.add("e-pv-thumbnail-view-icon"))},i.prototype.enableBookmarkButton=function(){this.bookmarkButton&&(this.bookmarkButton.removeAttribute("disabled"),this.bookmarkButton.children[0].classList.remove("e-pv-bookmark-disable-icon"),this.bookmarkButton.children[0].classList.add("e-pv-bookmark-icon"))},i.prototype.createSidebarTitleCloseButton=function(){this.closeDiv=e.createElement("button",{id:this.pdfViewer.element.id+"_close_btn"}),this.closeDiv.setAttribute("aria-label","close button"),this.closeDiv.setAttribute("type","button"),this.closeDiv.className="e-btn e-pv-tbar-btn e-pv-title-close-div e-btn",this.pdfViewer.enableRtl?this.closeDiv.style.left="8px":this.closeDiv.style.left=this.closeButtonLeft+"px";var t=e.createElement("span",{id:this.pdfViewer.element.id+"_close_icon",className:"e-pv-title-close-icon e-pv-icon"});this.closeDiv.appendChild(t),this.sideBarTitleContainer.appendChild(this.closeDiv),this.closeDiv.addEventListener("click",this.sideToolbarOnClose)},i.prototype.createResizeIcon=function(){this.resizeIcon=e.createElement("div",{id:this.pdfViewer.element.id+"_resize",className:"e-pv-resize-icon e-pv-icon"}),this.setResizeIconTop(),this.resizeIcon.style.position="absolute",this.resizeIcon.addEventListener("click",this.sideToolbarOnClose),this.resizeIcon.addEventListener("mouseover",this.resizeIconMouseOver),this.sideBarResizer.appendChild(this.resizeIcon)},i.prototype.setResizeIconTop=function(){this.sideBarToolbar&&this.sideBarToolbar.clientHeight&&""===this.resizeIcon.style.top&&(this.resizeIcon.style.top=this.sideBarToolbar.clientHeight/2+"px")},i.prototype.setCommentPanelResizeIconTop=function(){this.commentPanelContainer&&this.commentPanelContainer.clientHeight&&""===this.commentPanelResizeIcon.style.top&&(this.commentPanelResizeIcon.style.top=this.commentPanelContainer.clientHeight/2+"px")},Object.defineProperty(i.prototype,"outerContainerWidth",{get:function(){return this.mainContainerWidth||(this.mainContainerWidth=this.pdfViewerBase.mainContainer.clientWidth),this.mainContainerWidth},enumerable:!0,configurable:!0}),i.prototype.getViewerContainerScrollbarWidth=function(){return this.pdfViewerBase.viewerContainer.offsetWidth+this.pdfViewerBase.viewerContainer.offsetLeft-(this.pdfViewerBase.viewerContainer.clientWidth+this.pdfViewerBase.viewerContainer.offsetLeft)},Object.defineProperty(i.prototype,"sideToolbarWidth",{get:function(){return this.sideBarToolbar?this.sideBarToolbar.clientWidth:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sideBarContentContainerWidth",{get:function(){return this.sideBarContentContainer?this.sideBarContentContainer.clientWidth:0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"commentPanelContainerWidth",{get:function(){return this.commentPanelContainer?this.commentPanelContainer.offsetWidth:0},enumerable:!0,configurable:!0}),i.prototype.updateViewerContainerOnClose=function(){var t=this;t.sideBarContentContainer&&(t.sideBarContentContainer.style.display="none",this.pdfViewer.enableRtl?t.pdfViewerBase.viewerContainer.style.right=t.sideToolbarWidth+"px":t.pdfViewerBase.viewerContainer.style.left=t.sideToolbarWidth+"px",t.pdfViewerBase.viewerContainer.style.width=t.pdfViewer.element.clientWidth-t.sideToolbarWidth-t.getViewerContainerRight()+"px",t.pdfViewerBase.pageContainer.style.width=t.pdfViewerBase.viewerContainer.offsetWidth-t.getViewerContainerScrollbarWidth()+"px",t.pdfViewerBase.updateZoomValue())},i.prototype.updateViewerContainerOnExpand=function(){var t=this;t.sideBarContentContainer&&(t.sideBarContentContainer.style.display="block",this.pdfViewer.enableRtl?t.pdfViewerBase.viewerContainer.style.right=t.getViewerContainerLeft()+"px":t.pdfViewerBase.viewerContainer.style.left=t.getViewerContainerLeft()+"px",t.pdfViewerBase.viewerContainer.style.width=t.pdfViewer.element.clientWidth-this.getViewerContainerLeft()-this.getViewerContainerRight()+"px",t.pdfViewerBase.pageContainer.style.width=t.pdfViewerBase.viewerContainer.clientWidth+"px",t.pdfViewerBase.updateZoomValue(),t.pdfViewer.enableThumbnail&&t.pdfViewer.thumbnailViewModule.gotoThumbnailImage(t.pdfViewerBase.currentPageNumber-1))},i.prototype.getViewerContainerLeft=function(){return this.sideToolbarWidth+this.sideBarContentContainerWidth},i.prototype.getViewerContainerRight=function(){return this.commentPanelContainerWidth+this.commentPanelResizer.clientWidth},i.prototype.getViewerMainContainerWidth=function(){return this.pdfViewer.element.clientWidth-this.sideToolbarWidth},i.prototype.setThumbnailSelectionIconTheme=function(){this.thumbnailButton&&(this.thumbnailButton.children[0].classList.remove("e-pv-thumbnail-view-icon"),this.thumbnailButton.children[0].classList.add("e-pv-thumbnail-view-selection-icon"),this.thumbnailButton.classList.add("e-pv-thumbnail-view-button-selection"))},i.prototype.removeThumbnailSelectionIconTheme=function(){this.thumbnailButton&&(this.thumbnailButton.children[0].classList.add("e-pv-thumbnail-view-icon"),this.thumbnailButton.children[0].classList.remove("e-pv-thumbnail-view-selection-icon"),this.thumbnailButton.classList.remove("e-pv-thumbnail-view-button-selection"))},i.prototype.resetThumbnailIcon=function(){this.thumbnailButton&&(this.thumbnailButton.children[0].classList.remove("e-pv-thumbnail-view-icon"),this.thumbnailButton.children[0].classList.add("e-pv-thumbnail-view-disable-icon"))},i.prototype.resetThumbnailView=function(){this.sideBarContentContainer&&(this.sideBarContentContainer.style.display="none",this.pdfViewer.enableRtl?this.pdfViewerBase.viewerContainer.style.left="1px":this.pdfViewerBase.viewerContainer.style.left=this.sideToolbarWidth+"px",this.pdfViewerBase.viewerContainer.style.width=this.pdfViewer.element.clientWidth-this.sideToolbarWidth-this.getViewerContainerRight()+"px",this.pdfViewerBase.pageContainer&&(this.pdfViewerBase.pageContainer.style.width=this.pdfViewerBase.viewerContainer.clientWidth+"px"),this.thumbnailButton.setAttribute("disabled","disabled"),this.removeThumbnailSelectionIconTheme(),this.resetThumbnailIcon())},i.prototype.setBookmarkSelectionIconTheme=function(){this.bookmarkButton&&(this.bookmarkButton.children[0].classList.remove("e-pv-bookmark-icon"),this.bookmarkButton.children[0].classList.add("e-pv-bookmark-selection-icon"),this.bookmarkButton.classList.add("e-pv-bookmark-button-selection"))},i.prototype.removeBookmarkSelectionIconTheme=function(){this.bookmarkButton&&(this.bookmarkButton.children[0].classList.add("e-pv-bookmark-icon"),this.bookmarkButton.children[0].classList.remove("e-pv-bookmark-selection-icon"),this.bookmarkButton.classList.remove("e-pv-bookmark-button-selection"))},i.prototype.sideToolbarOnMouseup=function(t){t.target===this.sideBarToolbar&&this.pdfViewerBase.focusViewerContainer()},i.prototype.sideBarTitleOnMouseup=function(t){this.pdfViewerBase.focusViewerContainer()},i.prototype.openBookmarkcontentInitially=function(){var t=this;if(document.getElementById(this.pdfViewer.element.id+"_thumbnail_view")&&(document.getElementById(this.pdfViewer.element.id+"_thumbnail_view").style.display="none"),this.removeThumbnailSelectionIconTheme(),this.sideBarTitle.textContent=this.pdfViewer.localeObj.getConstant("Bookmarks"),this.sideBarContent.setAttribute("aria-label","Bookmark View Panel"),this.pdfViewer.bookmarkViewModule.renderBookmarkcontent(),this.sideBarContentContainer&&("none"!==t.sideBarContentContainer.style.display?this.isThumbnailOpen?(this.setBookmarkSelectionIconTheme(),this.isBookmarkOpen=!0,this.updateViewerContainerOnExpand()):(this.removeBookmarkSelectionIconTheme(),this.isBookmarkOpen=!1,this.updateViewerContainerOnClose()):(this.sideBarContent.focus(),this.setBookmarkSelectionIconTheme(),this.isBookmarkOpen=!0,this.updateViewerContainerOnExpand())),this.isThumbnailOpen=!1,this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var e=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(e)}},i.prototype.disableBookmarkButton=function(){this.sideBarContentContainer&&(this.sideBarContentContainer.style.display="none",this.bookmarkButton.setAttribute("disabled","disabled"),this.bookmarkButton.children[0].classList.add("e-pv-bookmark-disable-icon"))},i.prototype.clear=function(){this.removeBookmarkSelectionIconTheme(),this.removeThumbnailSelectionIconTheme(),this.closeCommentPanelContainer(),this.commentsContentContainer&&(this.commentsContentContainer.innerHTML="")},i.prototype.destroy=function(){this.annotationMenuObj&&this.annotationMenuObj.destroy()},i.prototype.getModuleName=function(){return"NavigationPane"},i}();!function(t){t[t.None=1]="None",t[t.Accepted=2]="Accepted",t[t.Canceled=3]="Canceled",t[t.Completed=4]="Completed",t[t.Rejected=5]="Rejected"}(t.CommentStatus||(t.CommentStatus={})),function(t){t[t.None=0]="None",t[t.Bold=1]="Bold",t[t.Italic=2]="Italic",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough"}(t.FontStyle||(t.FontStyle={})),function(t){t[t.Copy=0]="Copy",t[t.Highlight=1]="Highlight",t[t.Cut=2]="Cut",t[t.Underline=4]="Underline",t[t.Paste=8]="Paste",t[t.Delete=16]="Delete",t[t.ScaleRatio=32]="ScaleRatio",t[t.Strikethrough=64]="Strikethrough",t[t.Properties=128]="Properties",t[t.Comment=256]="Comment"}(t.ContextMenuItem||(t.ContextMenuItem={})),function(t){t.Draw="Draw",t.Type="Type",t.Image="Image"}(t.SignatureType||(t.SignatureType={})),function(t){t[t.Corners=1]="Corners",t[t.Edges=2]="Edges"}(t.AnnotationResizerLocation||(t.AnnotationResizerLocation={})),function(t){t.auto="auto",t.crossHair="crosshair",t.e_resize="e-resize",t.ew_resize="ew-resize",t.grab="grab",t.grabbing="grabbing",t.move="move",t.n_resize="n-resize",t.ne_resize="ne-resize",t.ns_resize="ns-resize",t.nw_resize="nw-resize",t.pointer="pointer",t.s_resize="s-resize",t.se_resize="se-resize",t.sw_resize="sw-resize",t.text="text",t.w_resize="w-resize"}(t.CursorType||(t.CursorType={})),function(t){t.Revised="Revised",t.Reviewed="Reviewed",t.Received="Received",t.Approved="Approved",t.Confidential="Confidential",t.NotApproved="NotApproved"}(t.DynamicStampItem||(t.DynamicStampItem={})),function(t){t.Witness="Witness",t.InitialHere="InitialHere",t.SignHere="SignHere",t.Accepted="Accepted",t.Rejected="Rejected"}(t.SignStampItem||(t.SignStampItem={})),function(t){t.Approved="Approved",t.NotApproved="NotApproved",t.Draft="Draft",t.Final="Final",t.Completed="Completed",t.Confidential="Confidential",t.ForPublicRelease="ForPublicRelease",t.NotForPublicRelease="NotForPublicRelease",t.ForComment="ForComment",t.Void="Void",t.PreliminaryResults="PreliminaryResults",t.InformationOnly="InformationOnly"}(t.StandardBusinessStampItem||(t.StandardBusinessStampItem={})),function(t){t.Select="Select",t.Move="Move",t.Resize="Resize",t.Delete="Delete",t.None="None",t.PropertyChange="PropertyChange"}(t.AllowedInteraction||(t.AllowedInteraction={})),function(t){t.Json="Json",t.Xfdf="Xfdf"}(t.AnnotationDataFormat||(t.AnnotationDataFormat={}));var Te=function(){function t(t,e){this.pdfViewer=t,this.pdfViewerBase=e}return t.prototype.createContextMenu=function(){var t=document.getElementsByClassName(this.pdfViewer.element.id+"_context_menu");if(t&&(this.contextMenuElement=t[0],this.contextMenuElement.children&&this.contextMenuElement.children.length>0)){var e=this.contextMenuElement.children[0];e.className=e.className+" e-pv-context-menu"}},t.prototype.open=function(t,e,i){this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenContextMenu",t,e)},t.prototype.close=function(){this.pdfViewer._dotnetInstance.invokeMethodAsync("CloseContextMenu")},t.prototype.destroy=function(){this.previousAction="",this.contextMenuElement=null},t.prototype.OnItemSelected=function(t){"string"==typeof t?this.pdfViewerBase.OnItemSelected(t):this.pdfViewerBase.OnItemSelected(t[0])},t}(),Ne={},xe=null,De=null,Ie=30,Ee=30,ve=30,be=36,ze="e-spin-show",Ve="e-spin-hide",ke="e-spin-material",Oe="e-spin-fabric",Pe="e-spin-bootstrap",Ye="e-spin-bootstrap4",Be="e-spin-high-contrast",Qe="e-spinner-pane",Fe="e-spinner-inner",Ue="e-path-circle",Je="e-path-arc",We="e-spin-label",_e="e-spin-template",Re=function(){function t(t,e){this.pdfViewer=null,this.pdfViewerBase=null,this.totalPageElement=null,this.currentPageBoxElementContainer=null,this.currentPageBoxElement=null,this.firstPageElement=null,this.previousPageElement=null,this.nextPageElement=null,this.lastPageElement=null,this.zommOutElement=null,this.zoomInElement=null,this.zoomDropDownElement=null,this.selectToolElement=null,this.handToolElement=null,this.undoElement=null,this.redoElement=null,this.commentElement=null,this.submitFormButton=null,this.searchElement=null,this.annotationElement=null,this.printElement=null,this.downloadElement=null,this.highlightElement=null,this.underlineElement=null,this.strikeThroughElement=null,this.shapeElement=null,this.calibrateElement=null,this.stampElement=null,this.freeTextElement=null,this.signatureElement=null,this.inkElement=null,this.annotationFontSizeInputElement=null,this.annotationFontFamilyInputElement=null,this.annotationColorElement=null,this.annotationStrokeColorElement=null,this.annotationThicknessElement=null,this.annotationOpacityElement=null,this.annotationFontColorElement=null,this.annotationFontFamilyElement=null,this.annotationFontSizeElement=null,this.annotationTextAlignElement=null,this.annotationTextColorElement=null,this.annotationTextPropertiesElement=null,this.annotationDeleteElement=null,this.annotationCloseElement=null,this.annotationCommentPanelElement=null,this.mobileToolbarContainerElement=null,this.mobileSearchPreviousOccurenceElement=null,this.mobileSearchNextOccurenceElement=null,this.cssClass="e-overlay",this.disableClass=" e-overlay",this.pdfViewer=t,this.pdfViewerBase=e,this.findToolbarElements()}return t.prototype.findToolbarElements=function(){this.totalPageElement=this.pdfViewerBase.getElement("_totalPage").children[0],this.currentPageBoxElementContainer=this.pdfViewerBase.getElement("_currentPageInput"),this.currentPageBoxElement=this.pdfViewerBase.getElement("_currentPageInput").children[0].children[0],this.firstPageElement=this.pdfViewerBase.getElement("_firstPage"),this.previousPageElement=this.pdfViewerBase.getElement("_previousPage"),this.nextPageElement=this.pdfViewerBase.getElement("_nextPage"),this.lastPageElement=this.pdfViewerBase.getElement("_lastPage"),this.zommOutElement=this.pdfViewerBase.getElement("_zoomOut"),this.zoomInElement=this.pdfViewerBase.getElement("_zoomIn"),this.zoomDropDownElement=this.pdfViewerBase.getElement("_zoomDropDown"),this.selectToolElement=this.pdfViewerBase.getElement("_selectTool"),this.handToolElement=this.pdfViewerBase.getElement("_handTool"),this.undoElement=this.pdfViewerBase.getElement("_undo"),this.redoElement=this.pdfViewerBase.getElement("_redo"),this.commentElement=this.pdfViewerBase.getElement("_comment"),this.submitFormButton=this.pdfViewerBase.getElement("_submitFormButton"),this.searchElement=this.pdfViewerBase.getElement("_search"),this.annotationElement=this.pdfViewerBase.getElement("_annotation"),this.printElement=this.pdfViewerBase.getElement("_print"),this.downloadElement=this.pdfViewerBase.getElement("_download"),this.highlightElement=this.pdfViewerBase.getElement("_highLight"),this.underlineElement=this.pdfViewerBase.getElement("_underline"),this.strikeThroughElement=this.pdfViewerBase.getElement("_strikethrough"),this.shapeElement=this.pdfViewerBase.getElement("_annotation_shapes"),this.calibrateElement=this.pdfViewerBase.getElement("_annotation_calibrate"),this.stampElement=this.pdfViewerBase.getElement("_annotation_stamp"),this.freeTextElement=this.pdfViewerBase.getElement("_annotation_freeTextEdit"),this.signatureElement=this.pdfViewerBase.getElement("_annotation_signature"),this.inkElement=document.getElementById("InkAnnotation"),this.annotationFontSizeInputElement=this.pdfViewerBase.getElement("_annotation_fontsize").children[0].children[0],this.annotationFontFamilyInputElement=this.pdfViewerBase.getElement("_annotation_fontname").children[0].children[0],this.annotationColorElement=this.pdfViewerBase.getElement("_annotation_color"),this.annotationStrokeColorElement=this.pdfViewerBase.getElement("_annotation_stroke"),this.annotationThicknessElement=this.pdfViewerBase.getElement("_annotation_thickness"),this.annotationOpacityElement=this.pdfViewerBase.getElement("_annotation_opacity"),this.annotationFontColorElement=this.pdfViewerBase.getElement("_annotation_textcolor"),this.annotationFontFamilyElement=this.pdfViewerBase.getElement("_annotation_fontname"),this.annotationFontSizeElement=this.pdfViewerBase.getElement("_annotation_fontsize"),this.annotationTextAlignElement=this.pdfViewerBase.getElement("_annotation_textalign"),this.annotationTextColorElement=this.pdfViewerBase.getElement("_annotation_textcolor"),this.annotationTextPropertiesElement=this.pdfViewerBase.getElement("_annotation_textproperties"),this.annotationDeleteElement=this.pdfViewerBase.getElement("_annotation_delete"),this.annotationCommentPanelElement=this.pdfViewerBase.getElement("_annotation_commentPanel"),this.annotationCloseElement=this.pdfViewerBase.getElement("_annotation_close"),this.mobileToolbarContainerElement=this.pdfViewerBase.getElement("_mobileToolbarContainer"),this.mobileSearchPreviousOccurenceElement=this.pdfViewerBase.getElement("_prev_occurrence"),this.mobileSearchNextOccurenceElement=this.pdfViewerBase.getElement("_next_occurrence")},t.prototype.updateTotalPage=function(){this.totalPageElement.textContent=this.pdfViewer.localeObj.getConstant("of")+this.pdfViewerBase.pageCount.toString()},t.prototype.updateCurrentPage=function(t){this.currentPageBoxElement.value=t.toString()},t.prototype.loadDocument=function(){this.pdfViewer.enableNavigation&&(this.currentPageBoxElementContainer.classList.remove(this.cssClass),this.currentPageBoxElement.value="1",this.totalPageElement.textContent=this.pdfViewer.localeObj.getConstant("of")+this.pdfViewerBase.pageCount.toString(),this.isEnabled(this.firstPageElement)||(this.firstPageElement.className+=this.disableClass),this.isEnabled(this.previousPageElement)||(this.previousPageElement.className+=this.disableClass),this.nextPageElement.classList.remove(this.cssClass),this.lastPageElement.classList.remove(this.cssClass),1===this.pdfViewerBase.pageCount&&(this.nextPageElement.classList.contains(this.cssClass)||(this.nextPageElement.className+=this.disableClass),this.lastPageElement.classList.contains(this.cssClass)||(this.lastPageElement.className+=this.disableClass))),this.pdfViewer.enableMagnification&&(this.zoomInElement.classList.remove(this.cssClass),this.zommOutElement.classList.remove(this.cssClass),this.zoomDropDownElement.classList.remove(this.cssClass)),this.pdfViewer.enableTextSelection&&this.selectToolElement.classList.remove(this.cssClass),this.handToolElement.classList.remove(this.cssClass),this.pdfViewer.enableStickyNotesAnnotation&&this.commentElement.classList.remove(this.cssClass),this.pdfViewer.enableTextSearch&&this.searchElement.classList.remove(this.cssClass),this.pdfViewer.isFormFieldDocument&&this.submitFormButton.classList.remove(this.cssClass),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableAnnotationToolbar&&this.annotationElement.classList.remove(this.cssClass),this.pdfViewer.enablePrint&&this.printElement.classList.remove(this.cssClass),this.pdfViewer.enableDownload&&this.downloadElement.classList.remove(this.cssClass),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableTextMarkupAnnotation&&(this.highlightElement.classList.remove(this.cssClass),this.underlineElement.classList.remove(this.cssClass),this.strikeThroughElement.classList.remove(this.cssClass)),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableShapeAnnotation&&this.shapeElement.classList.remove(this.cssClass),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableMeasureAnnotation&&this.calibrateElement.classList.remove(this.cssClass),this.pdfViewer.enableAnnotation&&this.pdfViewer.enableStampAnnotations&&this.stampElement.classList.remove(this.cssClass),this.pdfViewer.enableFreeText&&this.freeTextElement.classList.remove(this.cssClass),this.pdfViewer.enableHandwrittenSignature&&this.signatureElement.classList.remove(this.cssClass),this.pdfViewer.enableInkAnnotation&&this.inkElement.classList.remove(this.cssClass)},t.prototype.resetToolbar=function(){this.pdfViewer.enableToolbar&&(this.currentPageBoxElement.value="0",this.totalPageElement.textContent=this.pdfViewer.localeObj.getConstant("of")+"0",this.isEnabled(this.currentPageBoxElementContainer)||(this.currentPageBoxElementContainer.className+=this.disableClass),this.isEnabled(this.firstPageElement)||(this.firstPageElement.className+=this.disableClass),this.isEnabled(this.previousPageElement)||(this.previousPageElement.className+=this.disableClass),this.isEnabled(this.nextPageElement)||(this.nextPageElement.className+=this.disableClass),this.isEnabled(this.lastPageElement)||(this.lastPageElement.className+=this.disableClass),this.isEnabled(this.zoomInElement)||(this.zoomInElement.className+=this.disableClass),this.isEnabled(this.zommOutElement)||(this.zommOutElement.className+=this.disableClass),this.isEnabled(this.zoomDropDownElement)||(this.zoomDropDownElement.className+=this.disableClass),this.isEnabled(this.selectToolElement)||(this.selectToolElement.className+=this.disableClass),this.isEnabled(this.handToolElement)||(this.handToolElement.className+=this.disableClass),this.isEnabled(this.undoElement)||(this.undoElement.className+=this.disableClass),this.isEnabled(this.redoElement)||(this.redoElement.className+=this.disableClass),this.isEnabled(this.commentElement)||(this.commentElement.className+=this.disableClass),this.isEnabled(this.searchElement)||(this.searchElement.className+=this.disableClass),this.isEnabled(this.submitFormButton)||(this.submitFormButton.className+=this.disableClass),this.isEnabled(this.annotationElement)||(this.annotationElement.className+=this.disableClass),this.isEnabled(this.printElement)||(this.printElement.className+=this.disableClass),this.isEnabled(this.downloadElement)||(this.downloadElement.className+=this.disableClass)),this.pdfViewer.enableAnnotationToolbar&&(this.isEnabled(this.highlightElement)||(this.highlightElement.className+=this.disableClass),this.isEnabled(this.underlineElement)||(this.underlineElement.className+=this.disableClass),this.isEnabled(this.strikeThroughElement)||(this.strikeThroughElement.className+=this.disableClass),this.isEnabled(this.shapeElement)||(this.shapeElement.className+=this.disableClass),this.isEnabled(this.calibrateElement)||(this.calibrateElement.className+=this.disableClass),this.isEnabled(this.stampElement)||(this.stampElement.className+=this.disableClass),this.isEnabled(this.freeTextElement)||(this.freeTextElement.className+=this.disableClass),this.isEnabled(this.signatureElement)||(this.signatureElement.className+=this.disableClass),this.isEnabled(this.inkElement)||(this.inkElement.className+=this.disableClass),this.isEnabled(this.annotationFontFamilyElement)||(this.annotationFontFamilyElement.className+=this.disableClass),this.isEnabled(this.annotationFontSizeElement)||(this.annotationFontSizeElement.className+=this.disableClass),this.isEnabled(this.annotationTextColorElement)||(this.annotationTextColorElement.className+=this.disableClass),this.isEnabled(this.annotationTextAlignElement)||(this.annotationTextAlignElement.className+=this.disableClass),this.isEnabled(this.annotationTextPropertiesElement)||(this.annotationTextPropertiesElement.className+=this.disableClass),this.isEnabled(this.annotationColorElement)||(this.annotationColorElement.className+=this.disableClass),this.isEnabled(this.annotationStrokeColorElement)||(this.annotationStrokeColorElement.className+=this.disableClass),this.isEnabled(this.annotationThicknessElement)||(this.annotationThicknessElement.className+=this.disableClass),this.isEnabled(this.annotationOpacityElement)||(this.annotationOpacityElement.className+=this.disableClass),this.isEnabled(this.annotationOpacityElement)||(this.annotationDeleteElement.className+=this.disableClass),this.isEnabled(this.annotationCommentPanelElement)||(this.annotationCommentPanelElement.className+=this.disableClass))},t.prototype.pageChanged=function(t){this.pdfViewer.enableNavigation&&(this.currentPageBoxElement.value=t.toString()),t===this.pdfViewer.pageCount&&(this.isEnabled(this.nextPageElement)||(this.nextPageElement.className+=this.disableClass),this.previousPageElement.classList.remove(this.cssClass),this.isEnabled(this.lastPageElement)||(this.lastPageElement.className+=this.disableClass),this.firstPageElement.classList.remove(this.cssClass)),t0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0?i.pdfViewer.element.clientWidth:i.pdfViewer.element.style.width)-(i.navigationPane.sideBarToolbar?i.navigationPane.getViewerContainerLeft():0)-(i.navigationPane.commentPanelContainer?i.navigationPane.getViewerContainerRight():0);if(i.viewerContainer.style.width=o+"px",i.pdfViewer.toolbarModule){var s=e.isBlazor()?i.pdfViewer.element.querySelector(".e-pv-toolbar"):i.getElement("_toolbarContainer"),a=0;if(s&&(a=s.getBoundingClientRect().height),i.isAnnotationToolbarHidden()||e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode)i.viewerContainer.style.height=i.updatePageHeight(i.pdfViewer.element.getBoundingClientRect().height,a);else{var r=e.isBlazor()?i.pdfViewer.element.querySelector(".e-pv-annotation-toolbar"):i.getElement("_annotation_toolbar"),l=0;r&&(l=r.getBoundingClientRect().height),i.viewerContainer.style.height=i.updatePageHeight(i.pdfViewer.element.getBoundingClientRect().height,a+l)}}else i.viewerContainer.style.height=i.updatePageHeight(i.pdfViewer.element.getBoundingClientRect().height,0);if(i.pdfViewer.bookmarkViewModule&&e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode){var u=i.getElement("_bookmarks_container");u&&(u.style.height=i.updatePageHeight(i.pdfViewer.element.getBoundingClientRect().height,0))}"0px"===i.viewerContainer.style.height&&("auto"===i.pdfViewer.height.toString()?(i.pdfViewer.height=500,i.viewerContainer.style.height=i.pdfViewer.height+"px"):i.viewerContainer.style.height=i.pdfViewer.element.style.height),"0px"===i.viewerContainer.style.width&&("auto"===i.pdfViewer.width.toString()?(i.pdfViewer.width=500,i.viewerContainer.style.width=i.pdfViewer.width+"px"):i.viewerContainer.style.width=i.pdfViewer.element.style.width),i.pageContainer.style.width=i.viewerContainer.clientWidth+"px",0===i.viewerContainer.clientWidth&&(i.pageContainer.style.width=i.pdfViewer.element.style.width),e.isBlazor()||i.pdfViewer.toolbarModule&&i.pdfViewer.toolbarModule.onToolbarResize(i.navigationPane.sideBarToolbar?i.navigationPane.getViewerMainContainerWidth():i.pdfViewer.element.clientWidth),n.pdfViewer.enableToolbar&&n.pdfViewer.thumbnailViewModule&&i.pdfViewer.thumbnailViewModule.gotoThumbnailImage(i.currentPageNumber-1),!i.pdfViewer.textSearchModule||e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||i.pdfViewer.textSearchModule.textSearchBoxOnResize(),0!==o&&(i.navigationPane.isBookmarkListOpen||i.updateZoomValue()),e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode?(i.mobileScrollerContainer.style.left=o-parseFloat(i.mobileScrollerContainer.style.width)+"px",i.mobilePageNoContainer.style.left=o/2-parseFloat(i.mobilePageNoContainer.style.width)/2+"px",i.mobilePageNoContainer.style.top=i.pdfViewer.element.clientHeight/2+"px",i.updateMobileScrollerPosition()):(i.navigationPane.setResizeIconTop(),i.navigationPane.setCommentPanelResizeIconTop(),t&&"resize"===t.type&&i.signatureModule.updateCanvasSize()),i.navigationPane.sideBarToolbar&&(i.navigationPane.sideBarToolbar.style.height=i.viewerContainer.style.height)},this.viewerContainerOnMousedown=function(t){n.isFreeTextContextMenu=!1;var i=!1;if(n.isSelection=!0,0===t.button&&!n.getPopupNoteVisibleStatus()&&!n.isClickedOnScrollBar(t,!1)){n.isViewerMouseDown=!0;var o=t.target;1===t.detail&&"e-pdfviewer-formFields"!==o.className&&"free-text-input"!==o.className&&(i=!0,n.focusViewerContainer(!0)),n.scrollPosition=n.viewerContainer.scrollTop/n.getZoomFactor(),n.mouseX=t.clientX,n.mouseY=t.clientY,n.mouseLeft=t.clientX,n.mouseTop=t.clientY;var s=!!document.documentMode;!n.pdfViewer.textSelectionModule||n.isClickedOnScrollBar(t,!0)||n.isTextSelectionDisabled||(s||"e-pdfviewer-formFields"===o.className||"e-pdfviewer-ListBox"===o.className||t.preventDefault(),"e-pv-droplet"!==o.className&&n.pdfViewer.textSelectionModule.clearTextSelection())}n.isClickedOnScrollBar(t,!1)&&(n.isViewerMouseDown=!0),n.isPanMode&&(n.dragX=t.pageX,n.dragY=t.pageY,n.viewerContainer.contains(t.target)&&t.target!==n.viewerContainer&&t.target!==n.pageContainer&&n.isPanMode&&(n.viewerContainer.style.cursor="grabbing")),n.isShapeBasedAnnotationsEnabled()&&n.diagramMouseDown(t),n.pdfViewer.annotation&&n.pdfViewer.annotation.stickyNotesAnnotationModule.accordionContainer&&(i||(n.pdfViewer.annotationModule.stickyNotesAnnotationModule.isEditableElement=!1,n.updateCommentPanel(),i=!0)),e.isBlazor()&&n.mouseDownHandler(t)},this.viewerContainerOnMouseup=function(t){if(!n.getPopupNoteVisibleStatus()){n.isViewerMouseDown&&(n.scrollHoldTimer&&(clearTimeout(n.scrollHoldTimer),n.scrollHoldTimer=null),n.scrollPosition*n.getZoomFactor()!==n.viewerContainer.scrollTop&&n.pageViewScrollChanged(n.currentPageNumber)),n.isShapeBasedAnnotationsEnabled()&&(n.diagramMouseUp(t),n.pdfViewer.annotation.onAnnotationMouseUp()),n.isSelection=!1;var e=document.getElementById(n.pdfViewer.element.id+"_commantPanel");if(e&&"block"===e.style.display&&n.pdfViewer.selectedItems&&0!==n.pdfViewer.selectedItems.annotations.length){var i=document.getElementById(n.pdfViewer.element.id+"_accordionContainer"+n.pdfViewer.currentPageNumber);i&&i.ej2_instances[0].expandItem(!0);var o=document.getElementById(n.pdfViewer.selectedItems.annotations[0].annotName);o&&(o.classList.contains("e-pv-comments-border")||o.firstChild.click())}if(0===t.button&&!n.isClickedOnScrollBar(t,!1)){var s=t.target,a=t.clientX,r=t.clientY,l=n.getZoomFactor(),u=n.currentPageNumber;if(s){var M=s.id.split("_text_")[1]||s.id.split("_textLayer_")[1]||s.id.split("_annotationCanvas_")[1]||s.id.split("_pageDiv_")[1];u=parseInt(M)}var L=n.getElement("_pageDiv_"+u);if(L){var d=L.getBoundingClientRect();a=(t.clientX-d.left)/l,r=(t.clientY-d.top)/l}s&&s.classList&&!s.classList.contains("e-pv-hyperlink")&&!s.classList.contains("e-pv-page-container")&&(n.pdfViewer.firePageClick(a,r,u+1),n.pdfViewer.formFieldsModule&&n.pdfViewer.formFieldsModule.removeFocus()),n.isTextMarkupAnnotationModule()&&!n.isToolbarInkClicked&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.onTextMarkupAnnotationMouseUp(t),n.viewerContainer.contains(t.target)&&t.target!==n.viewerContainer&&t.target!==n.pageContainer&&n.isPanMode&&(n.viewerContainer.style.cursor="move",n.viewerContainer.style.cursor="-webkit-grab",n.viewerContainer.style.cursor="-moz-grab",n.viewerContainer.style.cursor="grab")}n.isViewerMouseDown=!1}},this.viewerContainerOnMouseWheel=function(t){if(n.isViewerMouseWheel=!0,n.getRerenderCanvasCreated()&&t.preventDefault(),t.ctrlKey){var e=25;n.pdfViewer.magnification.zoomFactor<1&&(e=10),n.pdfViewer.magnification.zoomFactor>=2&&(e=50),t.wheelDelta>0?n.pdfViewer.magnification.zoomTo(100*n.pdfViewer.magnification.zoomFactor+e):n.pdfViewer.magnification.zoomTo(100*n.pdfViewer.magnification.zoomFactor-e)}n.pdfViewer.magnificationModule&&(n.pdfViewer.magnificationModule.pageRerenderOnMouseWheel(),t.ctrlKey&&t.preventDefault(),n.pdfViewer.magnificationModule.fitPageScrollMouseWheel(t)),n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&n.isViewerMouseDown&&(t.target.classList.contains("e-pv-text")||n.pdfViewer.textSelectionModule.textSelectionOnMouseWheel(n.currentPageNumber-1))},this.viewerContainerOnKeyDown=function(t){var e=!!navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i),i=!!e&&t.metaKey;if(!n.isFreeTextAnnotationModule()||!n.pdfViewer.annotationModule||!0!==n.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus&&!0!==n.pdfViewer.annotationModule.inputElementModule.isInFocus){if(t.ctrlKey||i){if(t.shiftKey&&!e||e&&!t.shiftKey)switch(t.keyCode){case 38:case 33:t.preventDefault(),1!==n.currentPageNumber&&n.updateScrollTop(0);break;case 40:case 34:t.preventDefault(),n.currentPageNumber!==n.pageCount&&n.updateScrollTop(n.pageCount-1)}switch(t.keyCode){case 79:n.pdfViewer.toolbarModule&&n.pdfViewer.enableToolbar&&n.pdfViewer.toolbarModule.openFileDialogBox(t);break;case 67:n.pdfViewer.textSelectionModule&&n.pdfViewer.enableTextSelection&&!n.isTextSelectionDisabled&&(t.preventDefault(),n.pdfViewer.textSelectionModule.copyText()),n.pdfViewer.selectedItems.annotations.length&&(n.pdfViewer.copy(),n.contextMenuModule.previousAction="Copy");break;case 70:n.pdfViewer.textSearchModule&&n.pdfViewer.enableTextSearch&&(t.preventDefault(),n.pdfViewer.toolbarModule.textSearchButtonHandler());break;case 80:n.pdfViewer.printModule&&n.pdfViewer.enablePrint&&(t.preventDefault(),n.pdfViewer.print.print());break;case 90:n.pdfViewer.annotationModule&&n.pdfViewer.annotationModule.undo();break;case 88:n.pdfViewer.selectedItems.annotations.length&&(n.pdfViewer.cut(),n.contextMenuModule.previousAction="Cut");break;case 89:n.pdfViewer.annotationModule&&n.pdfViewer.annotationModule.redo();break;case 86:n.pdfViewer.annotation&&n.pdfViewer.annotation.isShapeCopied&&(n.pdfViewer.paste(),n.contextMenuModule.previousAction="Paste")}}else switch(t.keyCode){case 46:if(n.pdfViewer.annotation&&(n.isTextMarkupAnnotationModule()&&!n.getPopupNoteVisibleStatus()&&n.pdfViewer.annotationModule.deleteAnnotation(),n.pdfViewer.selectedItems.annotations.length>0)){var o=n.pdfViewer.selectedItems.annotations[0];o.annotationSettings&&o.annotationSettings.isLock?n.pdfViewer.annotationModule.checkAllowedInteractions("Delete",o)&&(n.pdfViewer.remove(o),n.pdfViewer.renderSelector(n.pdfViewer.annotation.getEventPageNumber(t))):(n.pdfViewer.remove(o),n.pdfViewer.renderSelector(n.pdfViewer.annotation.getEventPageNumber(t)))}break;case 27:if(n.pdfViewer.annotationModule&&n.pdfViewer.annotationModule.inkAnnotationModule){var s=parseInt(n.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);n.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(s)}n.pdfViewer.toolbar&&n.pdfViewer.toolbar.annotationToolbarModule&&n.pdfViewer.toolbar.annotationToolbarModule.deselectInkAnnotation()}n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.magnifyBehaviorKeyDown(t)}},this.viewerContainerOnMousemove=function(t){n.mouseX=t.clientX,n.mouseY=t.clientY;var e=!!document.documentMode,o=t.target;if("Drag"===n.action&&t.preventDefault(),n.isViewerMouseDown&&"Perimeter"!==n.action&&"Polygon"!==n.action&&"Line"!==n.action&&"DrawTool"!==n.action&&"Distance"!==n.action)if(n.pdfViewer.textSelectionModule&&n.pdfViewer.enableTextSelection&&!n.isTextSelectionDisabled&&!n.getPopupNoteVisibleStatus())if(e){var s=window.getSelection();s.type||s.isCollapsed||null===s.anchorNode||(n.pdfViewer.textSelectionModule.isTextSelection=!0)}else{t.preventDefault(),n.mouseX=t.clientX,n.mouseY=t.clientY;var a=n.pdfViewer.annotationModule;a&&a.textMarkupAnnotationModule&&a.textMarkupAnnotationModule.isDropletClicked&&a.textMarkupAnnotationModule.isEnableTextMarkupResizer(a.textMarkupAnnotationModule.currentTextMarkupAddMode)?a.textMarkupAnnotationModule.textSelect(t.target,n.mouseX,n.mouseY):n.pdfViewer.textSelectionModule.textSelectionOnMouseMove(t.target,n.mouseX,n.mouseY)}else n.skipPreventDefault(o)&&t.preventDefault();if(n.isTextMarkupAnnotationModule()&&!n.getPopupNoteVisibleStatus()&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.onTextMarkupAnnotationMouseMove(t),n.isPanMode&&n.panOnMouseMove(t),n.isShapeBasedAnnotationsEnabled()){var r=void 0;if(t.target&&(t.target.id.indexOf("_text")>-1||t.target.id.indexOf("_annotationCanvas")>-1||t.target.classList.contains("e-pv-hyperlink"))&&n.pdfViewer.annotation){var l=n.pdfViewer.annotation.getEventPageNumber(t),u=document.getElementById(n.pdfViewer.element.id+"_annotationCanvas_"+l);if(u){var M=u.getBoundingClientRect(),L=M.x?M.x:M.left,d=M.y?M.y:M.top;r=n.pdfViewer.annotationModule.stampAnnotationModule.currentStampAnnotation&&"Image"===n.pdfViewer.annotationModule.stampAnnotationModule.currentStampAnnotation.shapeAnnotationType?new i.Rect(L,d,M.width-10,M.height-10):new i.Rect(L+10,d+10,M.width-10,M.height-10)}}var w=n.pdfViewer.annotationModule.stampAnnotationModule;r&&r.containsPoint({x:n.mouseX,y:n.mouseY})&&!w.isStampAnnotSelected?(n.diagramMouseMove(t),n.annotationEvent=t):(n.diagramMouseLeave(t),n.isAnnotationDrawn&&"Ink"!==n.action&&(n.diagramMouseUp(t),n.isAnnotationAdded=!0)),n.pdfViewer.enableStampAnnotations&&w&&w.isStampAnnotSelected&&(n.pdfViewer.tool="Stamp",n.tool=new ne(n.pdfViewer,n),n.isMouseDown=!0,w.isStampAnnotSelected=!1,w.isNewStampAnnot=!0),n.isSignatureAdded&&n.pdfViewer.enableHandwrittenSignature&&(n.pdfViewer.tool="Stamp",n.tool=new ne(n.pdfViewer,n),n.isMouseDown=!0,n.isSignatureAdded=!1,n.isNewSignatureAdded=!0)}},this.panOnMouseMove=function(t){var e=!1;if("Drag"!==n.action&&-1===n.action.indexOf("Rotate")&&-1===n.action.indexOf("Resize")||(e=!0),n.viewerContainer.contains(t.target)&&t.target!==n.viewerContainer&&t.target!==n.pageContainer&&!e)if(n.isViewerMouseDown){var i=n.dragX-t.pageX,o=n.dragY-t.pageY;n.viewerContainer.scrollTop=n.viewerContainer.scrollTop+o,n.viewerContainer.scrollLeft=n.viewerContainer.scrollLeft+i,n.viewerContainer.style.cursor="move",n.viewerContainer.style.cursor="-webkit-grabbing",n.viewerContainer.style.cursor="-moz-grabbing",n.viewerContainer.style.cursor="grabbing",n.dragX=t.pageX,n.dragY=t.pageY}else n.navigationPane.isNavigationPaneResized||(n.viewerContainer.style.cursor="move",n.viewerContainer.style.cursor="-webkit-grab",n.viewerContainer.style.cursor="-moz-grab",n.viewerContainer.style.cursor="grab");else n.navigationPane.isNavigationPaneResized||(n.viewerContainer.style.cursor="auto")},this.viewerContainerOnMouseLeave=function(t){n.isViewerMouseDown&&n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&n.pdfViewer.textSelectionModule.textSelectionOnMouseLeave(t)},this.viewerContainerOnMouseEnter=function(t){n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&n.pdfViewer.textSelectionModule.clear()},this.viewerContainerOnMouseOver=function(t){var e=!!document.documentMode;n.isViewerMouseDown&&(e||t.preventDefault())},this.viewerContainerOnClick=function(t){if("dblclick"===t.type){if(!n.pdfViewer.textSelectionModule||n.isTextSelectionDisabled||n.getCurrentTextMarkupAnnotation())n.getCurrentTextMarkupAnnotation();else if(t.target.classList.contains("e-pv-text")){if(n.isViewerContainerDoubleClick=!0,!n.getTextMarkupAnnotationMode()){var e=parseFloat(t.target.id.split("_")[2]);n.pdfViewer.fireTextSelectionStart(e+1)}n.pdfViewer.textSelectionModule.selectAWord(t.target,t.clientX,t.clientY,!1),"MouseUp"===n.pdfViewer.contextMenuSettings.contextMenuAction&&n.pdfViewer.textSelectionModule.calculateContextMenuPosition(t.clientY,t.clientX),n.getTextMarkupAnnotationMode()?n.isTextMarkupAnnotationModule()&&n.getTextMarkupAnnotationMode()&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations(n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode):(n.pdfViewer.textSelectionModule.maintainSelectionOnZoom(!0,!1),n.dblClickTimer=setTimeout(function(){n.applySelection()},100),n.pdfViewer.textSelectionModule.fireTextSelectEnd())}if(n.action&&("Perimeter"===n.action||"Polygon"===n.action)&&n.tool){n.eventArgs.position=n.currentPosition,n.getMouseEventArgs(n.currentPosition,n.eventArgs,t,n.eventArgs.source);n.isMetaKey(t);var i={ctrlKey:t.ctrlKey,shiftKey:t.shiftKey};n.eventArgs.info=i,n.eventArgs.clickCount=t.detail,n.tool.mouseUp(n.eventArgs,!0)}if(n.pdfViewer.selectedItems||n.pdfViewer.annotation&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)if(0!==n.pdfViewer.selectedItems.annotations.length){var o=n.pdfViewer.selectedItems.annotations[0];if(n.pdfViewer.annotationModule.annotationSelect(o.annotName,o.pageIndex,o,null,!0),!1===n.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus)if(!0===n.isFreeTextAnnotation(n.pdfViewer.selectedItems.annotations))(s={}).x=n.pdfViewer.selectedItems.annotations[0].bounds.x,s.y=n.pdfViewer.selectedItems.annotations[0].bounds.y,n.pdfViewer.annotation.freeTextAnnotationModule.addInuptElemet(s,n.pdfViewer.selectedItems.annotations[0]);else if(!0===n.pdfViewer.selectedItems.annotations[0].enableShapeLabel){var s={};s.x=n.pdfViewer.selectedItems.annotations[0].bounds.x,s.y=n.pdfViewer.selectedItems.annotations[0].bounds.y,n.pdfViewer.annotation.inputElementModule.editLabel(s,n.pdfViewer.selectedItems.annotations[0])}else{(l=document.getElementById(n.pdfViewer.element.id+"_accordionContainer"+n.pdfViewer.currentPageNumber))&&l.ej2_instances[0].expandItem(!0);var a=document.getElementById(n.pdfViewer.selectedItems.annotations[0].annotName);a&&(a.classList.contains("e-pv-comments-border")||a.firstChild.click())}}else if(n.pdfViewer.annotation&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation){var r=n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation;n.pdfViewer.annotationModule.annotationSelect(r.annotName,n.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage,r,null,!0);var l=document.getElementById(n.pdfViewer.element.id+"_accordionContainer"+n.currentPageNumber);l&&l.ej2_instances[0].expandItem(!0);var u=document.getElementById(r.annotName);u&&u.firstChild.click()}}else 3===t.detail&&(n.isViewerContainerDoubleClick&&(clearTimeout(n.dblClickTimer),n.isViewerContainerDoubleClick=!1),!n.pdfViewer.textSelectionModule||n.isTextSelectionDisabled||n.getTextMarkupAnnotationMode()||(n.pdfViewer.textSelectionModule.selectEntireLine(t),n.pdfViewer.textSelectionModule.maintainSelectionOnZoom(!0,!1),n.pdfViewer.textSelectionModule.fireTextSelectEnd(),n.applySelection()))},this.viewerContainerOnDragStart=function(t){!!document.documentMode||t.preventDefault()},this.viewerContainerOnContextMenuClick=function(t){n.isViewerMouseDown=!1},this.onWindowMouseUp=function(t){n.isFreeTextContextMenu=!1,n.isNewStamp=!1,n.signatureAdded=!1;var e=n.pdfViewer.annotationModule;if(e&&e.textMarkupAnnotationModule&&e.textMarkupAnnotationModule.isEnableTextMarkupResizer(e.textMarkupAnnotationModule.currentTextMarkupAddMode)){var i=e.textMarkupAnnotationModule;i.isLeftDropletClicked=!1,i.isDropletClicked=!1,i.isRightDropletClicked=!1,i.currentTextMarkupAnnotation||null!==window.getSelection().anchorNode?i.currentTextMarkupAnnotation||""!==i.currentTextMarkupAddMode||(i.isTextMarkupAnnotationMode=!1):i.showHideDropletDiv(!0)}if(!n.getPopupNoteVisibleStatus()){if(0===t.button){if(n.isNewFreeTextAnnotation())if(!n.pdfViewer.textSelectionModule||n.isTextSelectionDisabled||n.getTextMarkupAnnotationMode()){if(n.getTextMarkupAnnotationMode()){var o=n.pdfViewer.element,s=t.target;o&&s&&o.id.split("_")[0]===s.id.split("_")[0]&&n.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations(n.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode)}}else{1!==t.detail||n.viewerContainer.contains(t.target)||n.contextMenuModule.contextMenuElement.contains(t.target)||null!==window.getSelection().anchorNode&&n.pdfViewer.textSelectionModule.textSelectionOnMouseup(t);var a=t.target;n.viewerContainer.contains(t.target)&&"e-pdfviewer-formFields"!==a.className&&(n.isClickedOnScrollBar(t,!0)||n.isScrollbarMouseDown?null!==window.getSelection().anchorNode&&n.pdfViewer.textSelectionModule.applySpanForSelection():n.pdfViewer.textSelectionModule.textSelectionOnMouseup(t))}}else 2===t.button&&n.viewerContainer.contains(t.target)&&n.skipPreventDefault(t.target)&&n.checkIsNormalText()&&window.getSelection().removeAllRanges();return!n.isViewerMouseDown||(n.isViewerMouseDown=!1,n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&(n.pdfViewer.textSelectionModule.clear(),n.pdfViewer.textSelectionModule.selectionStartPage=null),t.preventDefault(),t.stopPropagation(),!1)}},this.onWindowTouchEnd=function(t){n.signatureAdded=!1,n.pdfViewer.element.contains(t.target)||n.contextMenuModule.contextMenuElement.contains(t.target)||n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&n.pdfViewer.textSelectionModule.clearTextSelection()},this.viewerContainerOnTouchStart=function(t){var i=t.touches;n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.setTouchPoints(i[0].clientX,i[0].clientY);var o=t.target;1===i.length&&!o.classList.contains("e-pv-hyperlink")&&n.skipPreventDefault(o)&&n.preventTouchEvent(t),1===t.touches.length&&n.isTextMarkupAnnotationModule()&&!n.getPopupNoteVisibleStatus()&&(n.isToolbarInkClicked||n.pdfViewer.annotationModule.textMarkupAnnotationModule.onTextMarkupAnnotationTouchEnd(t)),n.touchClientX=i[0].clientX,n.touchClientY=i[0].clientY,n.scrollY=i[0].clientY,n.previousTime=(new Date).getTime(),1!==i.length||t.target.classList.contains("e-pv-touch-select-drop")||t.target.classList.contains("e-pv-touch-ellipse")||(e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&n.pageCount>0&&!n.isThumb&&!t.target.classList.contains("e-pv-hyperlink")?n.handleTaps(i):e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||n.handleTextBoxTaps(i),n.pdfViewer.textSelectionModule&&!n.isTextSelectionDisabled&&(n.pdfViewer.textSelectionModule.clearTextSelection(),n.contextMenuModule.close(),n.isLongTouchPropagated||(n.longTouchTimer=setTimeout(function(){n.viewerContainerOnLongTouch(t)},1e3)),n.isLongTouchPropagated=!0)),n.diagramMouseDown(t),"Drag"!==n.action&&-1===n.action.indexOf("Rotate")&&-1===n.action.indexOf("Resize")||t.preventDefault()},this.viewerContainerOnLongTouch=function(t){n.touchClientX=t.touches[0].clientX,n.touchClientY=t.touches[0].clientY,t.preventDefault(),n.pdfViewer.textSelectionModule&&(n.pdfViewer.textSelectionModule.initiateTouchSelection(t,n.touchClientX,n.touchClientY),e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(clearTimeout(n.singleTapTimer),n.tapCount=0))},this.viewerContainerOnPointerDown=function(t){"touch"===t.pointerType&&++n.pointerCount<=2&&(t.preventDefault(),n.pointersForTouch.push(t),2===n.pointerCount&&(n.pointerCount=0),n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.setTouchPoints(t.clientX,t.clientY))},this.viewerContainerOnTouchMove=function(t){e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(clearTimeout(n.singleTapTimer),n.tapCount=0),n.preventTouchEvent(t),n.isToolbarInkClicked&&t.preventDefault();var o=t.touches;n.pdfViewer.magnificationModule&&(n.isTouchScrolled=!0,o.length>1&&n.pageCount>0?(e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(n.isTouchScrolled=!1),n.pdfViewer.enablePinchZoom&&n.pdfViewer.magnificationModule.initiatePinchMove(o[0].clientX,o[0].clientY,o[1].clientX,o[1].clientY)):1===o.length&&n.getPagesPinchZoomed()&&(e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(n.isTouchScrolled=!1),n.pdfViewer.magnificationModule.pinchMoveScroll())),n.mouseX=o[0].clientX,n.mouseY=o[0].clientY;var s;if(t.target&&(t.target.id.indexOf("_text")>-1||t.target.id.indexOf("_annotationCanvas")>-1||t.target.classList.contains("e-pv-hyperlink"))&&n.pdfViewer.annotation){var a=n.pdfViewer.annotation.getEventPageNumber(t),r=document.getElementById(n.pdfViewer.element.id+"_annotationCanvas_"+a);if(r){var l=r.getBoundingClientRect(),u=l.x?l.x:l.left,M=l.y?l.y:l.top;s=new i.Rect(u+10,M+10,l.width-10,l.height-10)}}s&&s.containsPoint({x:n.mouseX,y:n.mouseY})?(n.diagramMouseMove(t),n.annotationEvent=t):(n.diagramMouseLeave(t),n.isAnnotationDrawn&&(n.diagramMouseUp(t),n.isAnnotationAdded=!0)),o=null},this.viewerContainerOnPointerMove=function(t){if("touch"===t.pointerType&&n.pageCount>0&&(t.preventDefault(),2===n.pointersForTouch.length)){for(var e=0;e1.5){var a=o+i*s;n.viewerContainer.scrollTop+=a,n.updateMobileScrollerPosition()}}n.diagramMouseUp(t),n.renderStampAnnotation(t)},this.viewerContainerOnPointerEnd=function(t){"touch"===t.pointerType&&(t.preventDefault(),n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.pinchMoveEnd(),n.pointersForTouch=[],n.pointerCount=0)},this.viewerContainerOnScroll=function(t){var i=n,o=0,s=0;if(t.touches&&e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode){var a=(n.viewerContainer.scrollHeight-n.viewerContainer.clientHeight)/(n.viewerContainer.clientHeight-n.toolbarHeight);if(n.isThumb){n.ispageMoved=!0,t.preventDefault(),n.mobilePageNoContainer.style.display="block",o=t.touches[0].pageX-n.scrollX,s=t.touches[0].pageY-n.viewerContainer.offsetTop,n.viewerContainer.scrollTop=s*a;var r=t.touches[0].pageY,l=n.pdfViewer.toolbarModule?0:50;0!==n.viewerContainer.scrollTop&&r<=n.viewerContainer.clientHeight-l&&(n.mobileScrollerContainer.style.top=r+"px")}else"e-pv-touch-ellipse"!==t.touches[0].target.className&&(n.isWebkitMobile&&e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||(n.mobilePageNoContainer.style.display="none",s=n.touchClientY-t.touches[0].pageY,o=n.touchClientX-t.touches[0].pageX,n.viewerContainer.scrollTop=n.viewerContainer.scrollTop+s,n.viewerContainer.scrollLeft=n.viewerContainer.scrollLeft+o),n.updateMobileScrollerPosition(),n.touchClientY=t.touches[0].pageY,n.touchClientX=t.touches[0].pageX)}n.scrollHoldTimer&&clearTimeout(n.scrollHoldTimer);var u=n.currentPageNumber;n.scrollHoldTimer=null,n.contextMenuModule.close();for(var M=n.viewerContainer.scrollTop,L=0;L=150&&d<300?125:d>=300&&d<500?200:300,M+n.pageStopValue<=n.getPageTop(L)+d){n.currentPageNumber=L+1,n.pdfViewer.currentPageNumber=L+1;break}}n.pdfViewer.magnificationModule&&"fitToPage"===n.pdfViewer.magnificationModule.fitType&&n.currentPageNumber>0&&n.pageSize[n.currentPageNumber-1]&&(n.viewerContainer.scrollTop=n.pageSize[n.currentPageNumber-1].top*n.getZoomFactor()),n.renderElementsVirtualScroll(n.currentPageNumber),(n.isViewerMouseDown||n.getPinchZoomed()||n.getPinchScrolled()||n.getPagesPinchZoomed())&&!n.isViewerMouseWheel?n.showPageLoadingIndicator(n.currentPageNumber-1,!1):(n.pageViewScrollChanged(n.currentPageNumber),n.isViewerMouseWheel=!1),n.pdfViewer.toolbarModule&&(e.isBlazor()||n.pdfViewer.toolbarModule.updateCurrentPage(n.currentPageNumber),n.viewerContainer.setAttribute("aria-labelledby",n.pdfViewer.element.id+"_pageDiv_"+(n.currentPageNumber-1)),e.isBlazor()||e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||n.pdfViewer.toolbarModule.updateNavigationButtons()),e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&(n.mobileSpanContainer.innerHTML=n.currentPageNumber.toString(),n.mobilecurrentPageContainer.innerHTML=n.currentPageNumber.toString()),u!==n.currentPageNumber&&(!i.pdfViewer.thumbnailViewModule||e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||(i.pdfViewer.thumbnailViewModule.gotoThumbnailImage(i.currentPageNumber-1),i.pdfViewer.thumbnailViewModule.isThumbnailClicked=!1),n.pdfViewer.firePageChange(u)),n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.updatePagesForFitPage(n.currentPageNumber-1);var w=n.getElement("_pageDiv_"+(n.currentPageNumber-1));if(w&&(w.style.visibility="visible"),n.isViewerMouseDown)if(n.getRerenderCanvasCreated()&&!n.isPanMode&&n.pdfViewer.magnificationModule.clearIntervalTimer(),n.getStoredData(n.currentPageNumber))n.isDataExits=!0,n.initiatePageViewScrollChanged(),n.isDataExits=!1;else{var h=n.pdfViewer.scrollSettings.delayPageRequestTimeOnScroll?n.pdfViewer.scrollSettings.delayPageRequestTimeOnScroll:100;n.scrollHoldTimer=setTimeout(function(){n.initiatePageViewScrollChanged()},h)}n.pdfViewer.annotation&&n.navigationPane.commentPanelContainer&&n.pdfViewer.annotation.stickyNotesAnnotationModule.updateCommentPanelScrollTop(n.currentPageNumber),e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode&&t.touches&&"e-pv-touch-ellipse"!==t.touches[0].target.className&&setTimeout(function(){n.updateMobileScrollerPosition()},500)},this.pdfViewer=t,this.navigationPane=new fe(this.pdfViewer,this),this.textLayer=new Xe(this.pdfViewer,this),this.signatureModule=new $e(this.pdfViewer,this),this.isWebkitMobile=/Chrome/.test(navigator.userAgent)||/Google Inc/.test(navigator.vendor)||-1!==navigator.userAgent.indexOf("Safari")}return s.prototype.initializeComponent=function(){var t=document.getElementById(this.pdfViewer.element.id);if(t){this.blazorUIAdaptor=e.isBlazor()?new Re(this.pdfViewer,this):null,e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.element.classList.add("e-pv-mobile-view");var i=void 0;this.viewerMainContainer=e.isBlazor()?t.querySelector(".e-pv-viewer-main-container"):e.createElement("div",{id:this.pdfViewer.element.id+"_viewerMainContainer",className:"e-pv-viewer-main-container"}),this.viewerContainer=e.isBlazor()?t.querySelector(".e-pv-viewer-container"):e.createElement("div",{id:this.pdfViewer.element.id+"_viewerContainer",className:"e-pv-viewer-container",attrs:{"aria-label":"pdfviewer scroll view"}}),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.createMobilePageNumberContainer(),this.viewerContainer.tabIndex=0,this.pdfViewer.enableRtl&&(this.viewerContainer.style.direction="rtl"),t.style.touchAction="pan-x pan-y",this.setMaximumHeight(t),this.mainContainer=e.isBlazor()?t.querySelector(".e-pv-main-container"):e.createElement("div",{id:this.pdfViewer.element.id+"_mainContainer",className:"e-pv-main-container"}),this.mainContainer.appendChild(this.viewerMainContainer),t.appendChild(this.mainContainer),this.applyViewerHeight(this.mainContainer),this.pdfViewer.toolbarModule?(this.navigationPane.initializeNavigationPane(),i=this.pdfViewer.toolbarModule.intializeToolbar("100%")):e.isBlazor()&&(this.navigationPane.initializeNavigationPane(),i=this.pdfViewer.element.querySelector(".e-pv-toolbar"),this.pdfViewer.enableToolbar||(this.toolbarHeight=0,i.style.display="none"),this.pdfViewer.enableNavigationToolbar||(this.navigationPane.sideBarToolbar.style.display="none",this.navigationPane.sideBarToolbarSplitter.style.display="none",(this.navigationPane.isBookmarkOpen||this.navigationPane.isThumbnailOpen)&&this.navigationPane.updateViewerContainerOnClose())),this.viewerContainer.style.height=i?this.updatePageHeight(this.pdfViewer.element.getBoundingClientRect().height,56):this.updatePageHeight(this.pdfViewer.element.getBoundingClientRect().height,0);var n=this.pdfViewer.element.clientWidth;e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(n=n-(this.navigationPane.sideBarToolbar?this.navigationPane.getViewerContainerLeft():0)-(this.navigationPane.commentPanelContainer?this.navigationPane.getViewerContainerRight():0)),this.viewerContainer.style.width=n+"px",this.viewerMainContainer.appendChild(this.viewerContainer),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.mobileScrollerContainer.style.left=n-parseFloat(this.mobileScrollerContainer.style.width)+"px",this.mobilePageNoContainer.style.left=n/2-parseFloat(this.mobilePageNoContainer.style.width)/2+"px",this.mobilePageNoContainer.style.top=this.pdfViewer.element.clientHeight/2+"px",this.mobilePageNoContainer.style.display="none",this.mobilePageNoContainer.appendChild(this.mobilecurrentPageContainer),this.mobilePageNoContainer.appendChild(this.mobilenumberContainer),this.mobilePageNoContainer.appendChild(this.mobiletotalPageContainer),this.viewerContainer.appendChild(this.mobilePageNoContainer),this.viewerMainContainer.appendChild(this.mobileScrollerContainer),this.mobileScrollerContainer.appendChild(this.mobileSpanContainer)),this.pageContainer=e.createElement("div",{id:this.pdfViewer.element.id+"_pageViewContainer",className:"e-pv-page-container",attrs:{tabindex:"0","aria-label":"pdfviewer Page View"}}),this.pdfViewer.enableRtl&&(this.pageContainer.style.direction="ltr"),this.viewerContainer.appendChild(this.pageContainer),this.pageContainer.style.width=this.viewerContainer.clientWidth+"px",i&&this.pdfViewer.thumbnailViewModule&&(!e.Browser.isDevice||this.pdfViewer.enableDesktopMode)&&this.pdfViewer.thumbnailViewModule.createThumbnailContainer(),this.createPrintPopup(),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.createGoToPagePopup();var o=e.createElement("div",{id:this.pdfViewer.element.id+"_loadingIndicator"});this.viewerContainer.appendChild(o),nt({target:o,cssClass:"e-spin-center"}),this.setLoaderProperties(o),e.isBlazor()?this.contextMenuModule=new Te(this.pdfViewer,this):this.contextMenuModule=new Ke(this.pdfViewer,this),this.contextMenuModule.createContextMenu(),this.createFileInputElement(),this.wireEvents(),!this.pdfViewer.textSearchModule||e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||this.pdfViewer.textSearchModule.createTextSearchBox(),this.pdfViewer.documentPath&&this.pdfViewer.load(this.pdfViewer.documentPath,null),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.initializeCollection()}},s.prototype.createMobilePageNumberContainer=function(){this.mobilePageNoContainer=e.createElement("div",{id:this.pdfViewer.element.id+"_mobilepagenoContainer",className:"e-pv-mobilepagenoscroll-container"}),this.mobilecurrentPageContainer=e.createElement("span",{id:this.pdfViewer.element.id+"_mobilecurrentpageContainer",className:"e-pv-mobilecurrentpage-container"}),this.mobilenumberContainer=e.createElement("span",{id:this.pdfViewer.element.id+"_mobiledashedlineContainer",className:"e-pv-mobiledashedline-container"}),this.mobiletotalPageContainer=e.createElement("span",{id:this.pdfViewer.element.id+"_mobiletotalpageContainer",className:"e-pv-mobiletotalpage-container"}),this.mobileScrollerContainer=e.createElement("div",{id:this.pdfViewer.element.id+"_mobilescrollContainer",className:"e-pv-mobilescroll-container"}),this.mobileSpanContainer=e.createElement("span",{id:this.pdfViewer.element.id+"_mobilespanContainer",className:"e-pv-mobilespanscroll-container"}),this.mobileSpanContainer.innerHTML="1",this.mobilecurrentPageContainer.innerHTML="1",this.mobilenumberContainer.innerHTML="―――――",this.mobileScrollerContainer.style.cssFloat="right",this.mobileScrollerContainer.style.width="40px",this.mobileScrollerContainer.style.height="32px",this.mobileScrollerContainer.style.zIndex="100",this.mobilePageNoContainer.style.width="120px",this.mobilePageNoContainer.style.height="100px",this.mobilePageNoContainer.style.zIndex="100",this.mobilePageNoContainer.style.position="fixed",this.mobileScrollerContainer.addEventListener("touchstart",this.mobileScrollContainerDown.bind(this)),this.mobileScrollerContainer.addEventListener("touchend",this.mobileScrollContainerEnd.bind(this)),this.mobileScrollerContainer.style.display="none"},s.prototype.initiatePageRender=function(t,e){this.loadedData=t,this.documentId=this.createGUID(),this.viewerContainer&&(this.viewerContainer.scrollTop=0),this.showLoadingIndicator(!0),this.hashId=" ",this.isFileName=!1,this.saveDocumentInfo(),"Pan"===this.pdfViewer.interactionMode&&this.initiatePanning(),t=this.checkDocumentData(t),this.setFileName(),this.pdfViewer.downloadFileName||(this.pdfViewer.downloadFileName=this.pdfViewer.fileName);var i=this.constructJsonObject(t,e);this.createAjaxRequest(i,t,e)},s.prototype.mobileScrollContainerDown=function(t){if(this.ispageMoved=!1,this.isThumb=!0,this.isTextMarkupAnnotationModule()&&null!=this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage&&e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){var i=this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage;this.pdfViewer.annotationModule.textMarkupAnnotationModule.selectTextMarkupCurrentPage=null,this.pdfViewer.annotationModule.textMarkupAnnotationModule.clearAnnotationSelection(i),this.pdfViewer.toolbar.showToolbar(!0)}this.mobileScrollerContainer.addEventListener("touchmove",this.viewerContainerOnScroll.bind(this),!0)},s.prototype.relativePosition=function(t){var e=this.viewerContainer.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}},s.prototype.setMaximumHeight=function(t){var i=t.getBoundingClientRect();(!e.Browser.isDevice||this.pdfViewer.enableDesktopMode||i&&0===i.height)&&(t.style.minHeight="500px"),this.updateWidth(),this.updateHeight()},s.prototype.applyViewerHeight=function(t){var i=t.getBoundingClientRect();e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&i&&0===i.height&&(t.style.minHeight="500px")},s.prototype.updateWidth=function(){"auto"!==this.pdfViewer.width.toString()&&(this.pdfViewer.element.style.width=this.pdfViewer.width)},s.prototype.updateHeight=function(){"auto"!==this.pdfViewer.height.toString()&&(this.pdfViewer.element.style.height=this.pdfViewer.height)},s.prototype.updateViewerContainer=function(){this.getElement("_sideBarContentContainer")?this.navigationPane.updateViewerContainerOnClose():this.updateViewerContainerSize();var t=this.pdfViewer.toolbarModule;t&&(e.isBlazor()?(this.pdfViewer.enableToolbar||this.pdfViewer.enableAnnotationToolbar)&&this.pdfViewer._dotnetInstance.invokeMethodAsync("RefreshToolbarItems"):(this.pdfViewer.enableToolbar&&t.toolbar.refreshOverflow(),this.pdfViewer.enableAnnotationToolbar&&t.annotationToolbarModule&&t.annotationToolbarModule.toolbar.refreshOverflow()))},s.prototype.updateViewerContainerSize=function(){this.viewerContainer.style.width=this.pdfViewer.element.clientWidth+"px",this.pageContainer.style.width=this.viewerContainer.offsetWidth+"px",this.updateZoomValue()},s.prototype.mobileScrollContainerEnd=function(t){this.ispageMoved||this.goToPagePopup.show(),this.isThumb=!1,this.ispageMoved=!1,this.mobileScrollerContainer.removeEventListener("touchmove",this.viewerContainerOnScroll.bind(this),!0),this.mobilePageNoContainer.style.display="none"},s.prototype.createAjaxRequest=function(t,e,i){var n=this;this.pdfViewer.serverActionSettings&&(this.loadRequestHandler=new qe(this.pdfViewer),this.loadRequestHandler.url=this.pdfViewer.serviceUrl+"/"+this.pdfViewer.serverActionSettings.load,this.loadRequestHandler.responseType="json",this.loadRequestHandler.mode=!0,t.action="Load",t.elementId=this.pdfViewer.element.id,this.loadRequestHandler.send(t),this.loadRequestHandler.onSuccess=function(t){var o=t.data;if(o){if("object"!=typeof o)try{o=JSON.parse(o)}catch(t){n.onControlError(500,o,this.pdfViewer.serverActionSettings.load),o=null}if(o){for(;"object"!=typeof o;)if(o=JSON.parse(o),"number"==typeof parseInt(o)&&!isNaN(parseInt(o))){o=parseInt(o);break}(o.uniqueId===n.documentId||"number"==typeof parseInt(o)&&!isNaN(parseInt(o)))&&n.requestSuccess(o,e,i)}}},this.loadRequestHandler.onFailure=function(t){"4"===t.status.toString().split("")[0]?n.openNotificationPopup("Client error"):n.openNotificationPopup(),n.showLoadingIndicator(!1),n.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,n.pdfViewer.serverActionSettings.load)},this.loadRequestHandler.onError=function(t){n.openNotificationPopup(),n.showLoadingIndicator(!1),n.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,n.pdfViewer.serverActionSettings.load)})},s.prototype.openNotificationPopup=function(t){this.pdfViewer.showNotificationDialog&&("Client error"===t?this.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant("Client error")):this.textLayer.createNotificationPopup(this.pdfViewer.localeObj.getConstant("Server error")),this.getElement("_notify")&&this.getElement("_notify").classList.add("e-pv-notification-large-content"))},s.prototype.showNotificationPopup=function(t){this.pdfViewer.showNotificationDialog||""===t||(this.textLayer.createNotificationPopup(t),this.getElement("_notify")&&this.getElement("_notify").classList.add("e-pv-notification-large-content"))},s.prototype.requestSuccess=function(t,i,n){if(t&&void 0!==t.pageCount){e.isBlazor()&&this.isPassword&&(this.isPassword=!1,this.isPasswordAvailable=!1,this.pdfViewer._dotnetInstance.invokeMethodAsync("ClosePasswordDialog")),this.pageCount=t.pageCount,this.pdfViewer.pageCount=t.pageCount,this.hashId=t.hashId,this.documentLiveCount=t.documentLiveCount,this.isAnnotationCollectionRemoved=!1,this.saveDocumentHashData(),this.saveFormfieldsData(t),this.pageRender(t);var o={pageCount:t.pageCount,pageSizes:t.pageSizes};if(window.sessionStorage.setItem(this.documentId+"_pagedata",JSON.stringify(o)),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){this.mobileScrollerContainer.style.display="";var s=this.pdfViewer.toolbarModule?this.toolbarHeight:0;this.mobileScrollerContainer.style.top=s+"px"}this.restrictionList=t.RestrictionSummary,this.RestrictionEnabled(this.restrictionList,!1)}else this.pageCount=0,this.currentPageNumber=0,e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.mobileScrollerContainer.style.display="none"),4===t?(e.isBlazor()&&(this.isPassword=!0),this.renderPasswordPopup(i,n)):3===t&&this.renderCorruptPopup(),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.updateToolbarItems();var a=this.pdfViewer.annotationModule;a&&a.textMarkupAnnotationModule&&a.textMarkupAnnotationModule.isEnableTextMarkupResizer(a.textMarkupAnnotationModule.currentTextMarkupAddMode)&&a.textMarkupAnnotationModule.createAnnotationSelectElement()},s.prototype.RestrictionEnabled=function(t,e){if(t)for(var i=0;i0&&(i=!0,this.isInitialPageMode=!0,this.pdfViewer.magnification.zoomTo(this.pdfViewer.zoomValue)),"FitToWidth"===this.pdfViewer.zoomMode?(this.isInitialPageMode=!0,this.pdfViewer.magnificationModule.fitToWidth()):"FitToPage"===this.pdfViewer.zoomMode&&(this.isInitialPageMode=!0,this.pdfViewer.magnificationModule.fitToPage()),this.documentLoaded=!0,this.pdfViewer.magnificationModule.isInitialLoading=!0,this.onWindowResize(),this.documentLoaded=!1,this.pdfViewer.magnificationModule.isInitialLoading=!1),this.isDocumentLoaded=!0;this.pageSize[0].width;if(-1===this.renderedPagesList.indexOf(0)&&!i){this.createRequestForRender(0);var n=1;if(no&&this.pageSize[n];)this.renderPageElement(n),this.createRequestForRender(n),o=this.getPageTop(n),n+=1}this.showLoadingIndicator(!1),e.isBlazor()||this.pdfViewer.toolbarModule&&(this.pdfViewer.toolbarModule.uploadedDocumentName=null,this.pdfViewer.toolbarModule.updateCurrentPage(this.currentPageNumber),this.pdfViewer.toolbarModule.updateToolbarItems(),this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&this.pdfViewer.toolbar.annotationToolbarModule.enableAnnotationAddTools(!0),this.viewerContainer.setAttribute("aria-labelledby",this.pdfViewer.element.id+"_pageDiv_"+(this.currentPageNumber-1))),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.mobileSpanContainer.innerHTML=this.currentPageNumber.toString(),this.mobilecurrentPageContainer.innerHTML=this.currentPageNumber.toString())},s.prototype.renderPasswordPopup=function(t,i){var n=this;if(e.isBlazor()){var o=document.getElementById(this.pdfViewer.element.id+"_prompt");o.textContent=this.pdfViewer.localeObj.getConstant("Enter Password");var s=document.querySelector("#"+this.pdfViewer.element.id+"_password_input");s.addEventListener("keyup",function(){""===s.value&&n.passwordDialogReset()}),s.addEventListener("focus",function(){s.parentElement.classList.add("e-input-focus")}),s.addEventListener("blur",function(){s.parentElement.classList.remove("e-input-focus")}),this.isPasswordAvailable?(this.pdfViewer.fireDocumentLoadFailed(!0,i),o.classList.add("e-pv-password-error"),o.textContent=this.pdfViewer.localeObj.getConstant("Invalid Password"),o.focus(),this.isFileName?this.document=t:this.document="data:application/pdf;base64,"+t):(this.isFileName?this.document=t:this.document="data:application/pdf;base64,"+t,this.isPasswordAvailable=!0,this.pdfViewer.fireDocumentLoadFailed(!0,null)),this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenPasswordDialog")}else this.isPasswordAvailable?(this.pdfViewer.fireDocumentLoadFailed(!0,i),this.promptElement.classList.add("e-pv-password-error"),this.promptElement.textContent=this.pdfViewer.localeObj.getConstant("Invalid Password"),this.promptElement.focus(),this.isFileName?this.document=t:this.document="data:application/pdf;base64,"+t,this.passwordPopup.show()):(this.isFileName?this.document=t:this.document="data:application/pdf;base64,"+t,this.isPasswordAvailable=!0,this.createPasswordPopup(),this.pdfViewer.fireDocumentLoadFailed(!0,null),this.passwordPopup.show())},s.prototype.renderCorruptPopup=function(){this.pdfViewer.fireDocumentLoadFailed(!1,null),this.documentId=null,e.isBlazor()?this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenCorruptedDialog"):(this.createCorruptedPopup(),this.corruptPopup.show())},s.prototype.constructJsonObject=function(t,e){var i;return e?(this.isPasswordAvailable=!0,this.passwordData=e,i={document:t,password:e,zoomFactor:1,isFileName:this.isFileName,uniqueId:this.documentId}):(this.isPasswordAvailable=!1,this.passwordData="",i={document:t,zoomFactor:1,isFileName:this.isFileName,uniqueId:this.documentId}),i},s.prototype.checkDocumentData=function(t){var e=t.split("base64,")[1];if(void 0===e){if(this.isFileName=!0,this.jsonDocumentId=t,null===this.pdfViewer.fileName){var i=-1!==t.indexOf("\\")?t.split("\\"):t.split("/");this.pdfViewer.fileName=i[i.length-1],this.jsonDocumentId=this.pdfViewer.fileName,e=t}}else this.jsonDocumentId=null;return e},s.prototype.setFileName=function(){null===this.pdfViewer.fileName&&(this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.uploadedDocumentName?(this.pdfViewer.fileName=this.pdfViewer.toolbarModule.uploadedDocumentName,this.jsonDocumentId=this.pdfViewer.fileName):(this.pdfViewer.fileName="undefined.pdf",this.jsonDocumentId=null))},s.prototype.saveDocumentInfo=function(){window.sessionStorage.setItem("currentDocument",this.documentId),window.sessionStorage.setItem("serviceURL",this.pdfViewer.serviceUrl),this.pdfViewer.serverActionSettings&&window.sessionStorage.setItem("unload",this.pdfViewer.serverActionSettings.unload)},s.prototype.saveDocumentHashData=function(){var t="";t=e.Browser.isIE||"edge"===e.Browser.info.name?encodeURI(this.hashId):this.hashId,window.sessionStorage.setItem("hashId",t),this.documentLiveCount&&window.sessionStorage.setItem("documentLiveCount",this.documentLiveCount.toString())},s.prototype.saveFormfieldsData=function(t){this.pdfViewer.isFormFieldDocument=!1,this.enableFormFieldButton(!1),t&&t.PdfRenderedFormFields&&t.PdfRenderedFormFields.length>0&&(this.formfieldvalue?(window.sessionStorage.setItem(this.documentId+"_formfields",JSON.stringify(this.formfieldvalue)),this.formfieldvalue=null):window.sessionStorage.setItem(this.documentId+"_formfields",JSON.stringify(t.PdfRenderedFormFields)),this.pdfViewer.enableFormFields&&this.pdfViewer.formFieldsModule.formFieldCollections(),this.pdfViewer.formFieldCollections.length>0&&(this.pdfViewer.isFormFieldDocument=!0,this.enableFormFieldButton(!0)))},s.prototype.enableFormFieldButton=function(t){this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.submitItem&&this.pdfViewer.toolbarModule.toolbar.enableItems(this.pdfViewer.toolbarModule.submitItem.parentElement,t)},s.prototype.updateWaitingPopup=function(t){if(null!=this.pageSize[t].top){var i=this.getElement("_pageDiv_"+t).getBoundingClientRect(),n=this.getElement("_pageDiv_"+t).firstChild.firstChild;i.top<0?this.toolbarHeight+this.viewerContainer.clientHeight/2-i.topthis.viewerContainer.clientWidth?n.style.left=this.viewerContainer.clientWidth/2+this.viewerContainer.scrollLeft+"px":this.getZoomFactor()>1.25&&i.width>this.viewerContainer.clientWidth?n.style.left=this.viewerContainer.clientWidth/2+"px":n.style.left=i.width/2+"px"}},s.prototype.createWaitingPopup=function(t){var e=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+t);e&&(nt({target:e}),this.setLoaderProperties(e))},s.prototype.showLoadingIndicator=function(t){var e=this.getElement("_loadingIndicator");e&&(t?Ot(e):Yt(e))},s.prototype.showPageLoadingIndicator=function(t,e){var i=this.getElement("_pageDiv_"+t);null!=i&&(e?Ot(i):Yt(i),this.updateWaitingPopup(t))},s.prototype.showPrintLoadingIndicator=function(t){var e=this.getElement("_printLoadingIndicator");null!=e&&(t?(this.printMainContainer.style.display="block",Ot(e)):(this.printMainContainer.style.display="none",Yt(e)))},s.prototype.setLoaderProperties=function(t){var e=t.firstChild.firstChild.firstChild;e&&(e.style.height="48px",e.style.width="48px",e.style.transformOrigin="24px 24px 24px")},s.prototype.updateScrollTop=function(t){var e=this;null!=this.pageSize[t]&&(this.viewerContainer.scrollTop=this.getPageTop(t),this.renderElementsVirtualScroll(t),-1===this.renderedPagesList.indexOf(t)&&this.createRequestForRender(t),setTimeout(function(){var i=t+1;i!==e.currentPageNumber&&(e.pdfViewer.currentPageNumber=i,e.currentPageNumber=i,e.pdfViewer.toolbarModule.updateCurrentPage(i))},800))},s.prototype.getZoomFactor=function(){return this.pdfViewer.magnificationModule?this.pdfViewer.magnificationModule.zoomFactor:1},s.prototype.getPinchZoomed=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isPinchZoomed},s.prototype.getMagnified=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isMagnified},s.prototype.getPinchScrolled=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isPinchScrolled},s.prototype.getPagesPinchZoomed=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isPagePinchZoomed},s.prototype.getPagesZoomed=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isPagesZoomed},s.prototype.getRerenderCanvasCreated=function(){return!!this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.isRerenderCanvasCreated},s.prototype.getDocumentId=function(){return this.documentId},s.prototype.download=function(){this.pageCount>0&&this.createRequestForDownload()},s.prototype.saveAsBlob=function(){var t=this;return this.pageCount>0?new Promise(function(e,i){t.saveAsBlobRequest().then(function(t){e(t)})}):null},s.prototype.saveAsBlobRequest=function(){var t=this,e=this;return new Promise(function(i,n){var o=e.constructJsonDownload();t.dowonloadRequestHandler=new qe(t.pdfViewer),t.dowonloadRequestHandler.url=e.pdfViewer.serviceUrl+"/"+e.pdfViewer.serverActionSettings.download,t.dowonloadRequestHandler.responseType="text",t.dowonloadRequestHandler.send(o),t.dowonloadRequestHandler.onSuccess=function(t){var n=t.data;if(n&&("object"==typeof n&&(n=JSON.parse(n)),"object"!=typeof n&&-1===n.indexOf("data:application/pdf")&&(e.onControlError(500,n,e.pdfViewer.serverActionSettings.download),n=null),n)){var o=e.createBlobUrl(n.split("base64,")[1],"application/pdf");i(o)}},t.dowonloadRequestHandler.onFailure=function(t){e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,e.pdfViewer.serverActionSettings.download)},t.dowonloadRequestHandler.onError=function(t){e.openNotificationPopup(),e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,e.pdfViewer.serverActionSettings.download)}})},s.prototype.clear=function(t){if(this.isPasswordAvailable=!1,this.isDocumentLoaded=!1,this.isInitialLoaded=!1,this.isImportAction=!1,this.annotationPageList=[],this.annotationComments=null,this.pdfViewer.isDocumentEdited=!1,this.pdfViewer.annotationCollection=[],this.pdfViewer.signatureCollection=[],this.isAnnotationCollectionRemoved=!1,this.documentAnnotationCollections=null,this.annotationRenderredList=[],this.isImportAction=!1,this.isImportedAnnotation=!1,this.importedAnnotation=[],this.isStorageExceed=!1,this.annotationStorage={},this.downloadCollections={},this.annotationEvent=null,this.highestWidth=0,this.highestHeight=0,this.requestLists=[],this.tilerequestLists=[],this.pdfViewer.formFieldCollections=[],this.initiateTextSelectMode(),this.RestrictionEnabled(this.restrictionList,!0),this.restrictionList=null,e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||this.navigationPane.sideBarToolbar&&this.navigationPane.clear(),this.pdfViewer.thumbnailViewModule&&this.pdfViewer.thumbnailViewModule.clear(),this.pdfViewer.bookmarkViewModule&&this.pdfViewer.bookmarkViewModule.clear(),this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.clearIntervalTimer(),this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.clearTextSelection(),this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.resetTextSearch(),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.clear(),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.initializeCollection(),this.pdfViewer.formFieldsModule&&(this.pdfViewer.formFieldsModule.readOnlyCollection=[],this.pdfViewer.formFieldsModule.signatureFieldCollection=[],this.pdfViewer.formFieldsModule.currentTarget=null),this.signatureModule&&(this.signatureModule.signaturecollection=[],this.signatureModule.outputcollection=[]),this.pageSize&&(this.pageSize=[]),this.renderedPagesList&&(this.renderedPagesList=[]),this.pageContainer)for(;this.pageContainer.hasChildNodes();)this.pageContainer.removeChild(this.pageContainer.lastChild);this.pageCount>0&&(this.unloadDocument(this),this.textLayer.characterBound=new Array),this.windowSessionStorageClear(),this.pinchZoomStorage&&(this.pinchZoomStorage=[]),!this.previousZoomValue&&0!==this.previousZoomValue||this.previousZoomValue===this.pdfViewer.zoomValue||(this.pdfViewer.zoomValue=this.previousZoomValue),t&&this.pageCount>0&&this.pdfViewer.fireDocumentUnload(this.pdfViewer.fileName),this.pdfViewer.fileName=null,this.pdfViewer.downloadFileName=null},s.prototype.destroy=function(){e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.element.classList.remove("e-pv-mobile-view"),this.unWireEvents(),this.clear(!1),this.pageContainer.parentNode.removeChild(this.pageContainer),this.viewerContainer.parentNode.removeChild(this.viewerContainer),this.contextMenuModule.destroy(),this.pdfViewer.toolbarModule&&this.navigationPane.destroy();var t=document.getElementById("measureElement");t&&(t=void 0)},s.prototype.unloadDocument=function(t){var i="";i=e.Browser.isIE||"edge"===e.Browser.info.name?decodeURI(window.sessionStorage.getItem("hashId")):window.sessionStorage.getItem("hashId");var n=window.sessionStorage.getItem("documentLiveCount");if(null!==i){var o={hashId:i,documentLiveCount:n,action:"Unload",elementId:t.pdfViewer.element.id},s=window.sessionStorage.getItem("unload");if(window.sessionStorage.getItem("serviceURL")&&"undefined"!==window.sessionStorage.getItem("serviceURL"))try{if("keepalive"in new Request("")){var a=this.setUnloadRequestHeaders(),r=this.pdfViewer.ajaxRequestSettings.withCredentials?"include":"omit";fetch(window.sessionStorage.getItem("serviceURL")+"/"+s,{method:"POST",credentials:r,headers:a,body:JSON.stringify(o)})}}catch(t){this.unloadRequestHandler=new qe(this.pdfViewer),this.unloadRequestHandler.send(o)}else window.sessionStorage.getItem("serviceURL")&&e.isBlazor()&&(this.unloadRequestHandler=new qe(this.pdfViewer),this.unloadRequestHandler.url=window.sessionStorage.getItem("serviceURL")+"/"+s,this.unloadRequestHandler.mode=!1,this.unloadRequestHandler.responseType=null,this.unloadRequestHandler.send(o),this.unloadRequestHandler.onSuccess=function(e){var i=e.data;i&&"object"!=typeof i&&-1===i.indexOf("Document")&&(t.onControlError(500,i,s),i=null)},this.unloadRequestHandler.onFailure=function(e){t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,s)},this.unloadRequestHandler.onError=function(e){t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText,s)})}this.pdfViewer.magnificationModule&&(this.pdfViewer.magnificationModule.zoomFactor=1),window.sessionStorage.removeItem("hashId"),window.sessionStorage.removeItem("documentLiveCount"),this.documentId&&(window.sessionStorage.removeItem(this.documentId+"_formfields"),window.sessionStorage.removeItem(this.documentId+"_annotations_shape"),window.sessionStorage.removeItem(this.documentId+"_annotations_shape_measure"),window.sessionStorage.removeItem(this.documentId+"_annotations_stamp"),window.sessionStorage.removeItem(this.documentId+"_annotations_sticky"),window.sessionStorage.removeItem(this.documentId+"_annotations_textMarkup"),window.sessionStorage.removeItem(this.documentId+"_annotations_freetext"),window.sessionStorage.removeItem(this.documentId+"_formfields"),window.sessionStorage.removeItem(this.documentId+"_annotations_sign"),window.sessionStorage.removeItem(this.documentId+"_annotations_ink"))},s.prototype.setUnloadRequestHeaders=function(){var t=new Headers;t.append("Content-Type","application/json;charset=UTF-8");for(var e=0;e0&&this.viewerContainer.setAttribute("aria-labelledby",this.pdfViewer.element.id+"_pageDiv_"+(this.currentPageNumber-1)),this.pdfViewer.annotation&&this.pdfViewer.annotation.stickyNotesAnnotationModule.accordionContainer&&this.updateCommentPanel(),(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>-1||-1!==navigator.userAgent.indexOf("Edge"))&&null!==n?(n.scrollLeft=o,n.scrollTop=s):null!==n&&n.scrollTo(o,s),window.scrollTo(e,i)},s.prototype.getScrollParent=function(t){if(null===t||"HTML"===t.nodeName)return null;var e=getComputedStyle(t);return this.viewerContainer.id===t.id||"scroll"!==e.overflowY&&"auto"!==e.overflowY?this.getScrollParent(t.parentNode):t},s.prototype.createCorruptedPopup=function(){var t=this,i=e.createElement("div",{id:this.pdfViewer.element.id+"_corrupted_popup",className:"e-pv-corrupted-popup"});this.pageContainer.appendChild(i),this.corruptPopup=new o.Dialog({showCloseIcon:!0,closeOnEscape:!0,isModal:!0,header:'
'+this.pdfViewer.localeObj.getConstant("File Corrupted")+"
",visible:!1,buttons:[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.closeCorruptPopup.bind(this)}],target:this.pdfViewer.element,beforeClose:function(){t.corruptPopup.destroy(),t.getElement("_corrupted_popup").remove(),t.corruptPopup=null;var e=t.getElement("_loadingIndicator");null!=e&&Yt(e)}}),this.pdfViewer.enableRtl?(this.corruptPopup.content='
'+this.pdfViewer.localeObj.getConstant("File Corrupted Content")+"
",this.corruptPopup.enableRtl=!0):this.corruptPopup.content='
'+this.pdfViewer.localeObj.getConstant("File Corrupted Content")+"
",this.corruptPopup.appendTo(i)},s.prototype.hideLoadingIndicator=function(){var t=this.getElement("_loadingIndicator");null!==t&&Yt(t)},s.prototype.closeCorruptPopup=function(){this.corruptPopup.hide();var t=this.getElement("_loadingIndicator");null!==t&&Yt(t)},s.prototype.createPrintPopup=function(){var t=document.getElementById(this.pdfViewer.element.id);this.printMainContainer=e.createElement("div",{id:this.pdfViewer.element.id+"_printcontainer",className:"e-pv-print-popup-container"}),t.appendChild(this.printMainContainer),this.printMainContainer.style.display="none";var i=e.createElement("div",{id:this.pdfViewer.element.id+"_printLoadingIndicator",className:"e-pv-print-loading-container"});this.printMainContainer.appendChild(i),nt({target:i,cssClass:"e-spin-center"}),this.setLoaderProperties(i)},s.prototype.createGoToPagePopup=function(){var t=this,i=e.createElement("div",{id:this.pdfViewer.element.id+"_goTopage_popup",className:"e-pv-gotopage-popup"});this.goToPageElement=e.createElement("span",{id:this.pdfViewer.element.id+"_prompt"}),this.goToPageElement.textContent=this.pdfViewer.localeObj.getConstant("Enter pagenumber"),i.appendChild(this.goToPageElement);var s=e.createElement("span",{className:"e-pv-text-input"});this.goToPageInput=e.createElement("input",{id:this.pdfViewer.element.id+"_page_input",className:"e-input"}),this.goToPageInput.type="text",this.goToPageInput.style.maxWidth="80%",this.pageNoContainer=e.createElement("span",{className:".e-pv-number-ofpages"}),s.appendChild(this.goToPageInput),s.appendChild(this.pageNoContainer),i.appendChild(s),this.pageContainer.appendChild(i),this.goToPagePopup=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("GoToPage"),visible:!1,buttons:[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.GoToPageCancelClick.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Apply"),disabled:!0,cssClass:"e-pv-gotopage-apply-btn",isPrimary:!0},click:this.GoToPageApplyClick.bind(this)}],close:this.closeGoToPagePopUp.bind(this)}),this.pdfViewer.enableRtl&&(this.goToPagePopup.enableRtl=!0),this.goToPagePopup.appendTo(i),e.isBlazor()||new n.NumericTextBox({format:"##",showSpinButton:!1}).appendTo(this.goToPageInput),this.goToPageInput.addEventListener("keyup",function(){var e=t.goToPageInput.value;""!==e&&parseFloat(e)>0&&t.pdfViewer.pageCount+1>parseFloat(e)?t.EnableApplyButton():t.DisableApplyButton()})},s.prototype.closeGoToPagePopUp=function(){this.goToPageInput.value="",this.DisableApplyButton()},s.prototype.EnableApplyButton=function(){document.getElementsByClassName("e-pv-gotopage-apply-btn")[0].removeAttribute("disabled")},s.prototype.DisableApplyButton=function(){document.getElementsByClassName("e-pv-gotopage-apply-btn")[0].setAttribute("disabled",!0)},s.prototype.GoToPageCancelClick=function(){this.goToPagePopup.hide()},s.prototype.GoToPageApplyClick=function(){this.goToPagePopup.hide();var t=this.goToPageInput.value;this.pdfViewer.navigation.goToPage(t),this.updateMobileScrollerPosition()},s.prototype.updateMobileScrollerPosition=function(){if(e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.mobileScrollerContainer){var t=(this.viewerContainer.scrollHeight-this.viewerContainer.clientHeight)/(this.viewerContainer.clientHeight-56),i=this.viewerContainer.scrollTop/t,n=this.pdfViewer.toolbarModule?this.toolbarHeight:0;this.mobileScrollerContainer.style.top=n+i+"px"}},s.prototype.createPasswordPopup=function(){var t=this,i=e.createElement("div",{id:this.pdfViewer.element.id+"_password_popup",className:"e-pv-password-popup",attrs:{tabindex:"-1"}});this.promptElement=e.createElement("span",{id:this.pdfViewer.element.id+"_prompt",attrs:{tabindex:"-1"}}),this.promptElement.textContent=this.pdfViewer.localeObj.getConstant("Enter Password"),i.appendChild(this.promptElement);var n=e.createElement("span",{className:"e-input-group e-pv-password-input"});this.passwordInput=e.createElement("input",{id:this.pdfViewer.element.id+"_password_input",className:"e-input"}),this.passwordInput.type="password",this.passwordInput.name="Required",n.appendChild(this.passwordInput),i.appendChild(n),this.pageContainer.appendChild(i),this.passwordPopup=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("Password Protected"),visible:!1,close:this.passwordCancel.bind(this),target:this.pdfViewer.element,beforeClose:function(){t.passwordPopup.destroy(),t.getElement("_password_popup").remove(),t.passwordPopup=null;var e=t.getElement("_loadingIndicator");null!=e&&Yt(e)}}),!e.Browser.isDevice||this.pdfViewer.enableDesktopMode?this.passwordPopup.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.applyPassword.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.passwordCancelClick.bind(this)}]:this.passwordPopup.buttons=[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("Cancel")},click:this.passwordCancelClick.bind(this)},{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.applyPassword.bind(this)}],this.pdfViewer.enableRtl&&(this.passwordPopup.enableRtl=!0),this.passwordPopup.appendTo(i),this.passwordInput.addEventListener("keyup",function(){""===t.passwordInput.value&&t.passwordDialogReset()}),this.passwordInput.addEventListener("focus",function(){t.passwordInput.parentElement.classList.add("e-input-focus")}),this.passwordInput.addEventListener("blur",function(){t.passwordInput.parentElement.classList.remove("e-input-focus")})},s.prototype.passwordCancel=function(t){t.isInteraction&&(this.clear(!1),this.passwordDialogReset(),this.passwordInput.value="");var e=this.getElement("_loadingIndicator");null!==e&&Yt(e)},s.prototype.passwordCancelClick=function(){this.clear(!1),this.passwordDialogReset(),this.passwordPopup.hide();var t=this.getElement("_loadingIndicator");null!==t&&Yt(t)},s.prototype.passwordDialogReset=function(){if(e.isBlazor()){var t=document.querySelector("#"+this.pdfViewer.element.id+"_password_input"),i=document.querySelector("#"+this.pdfViewer.element.id+"_prompt");i&&(i.classList.remove("e-pv-password-error"),i.textContent=this.pdfViewer.localeObj.getConstant("Enter Password"),t.value="")}else this.promptElement&&(this.promptElement.classList.remove("e-pv-password-error"),this.promptElement.textContent=this.pdfViewer.localeObj.getConstant("Enter Password"),this.passwordInput.value="")},s.prototype.applyPassword=function(){if(e.isBlazor())""!==(t=document.querySelector("#"+this.pdfViewer.element.id+"_password_input").value)&&this.pdfViewer.load(this.document,t);else{var t=this.passwordInput.value;""!==t&&this.pdfViewer.load(this.document,t)}this.focusViewerContainer()},s.prototype.createFileInputElement=function(){e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.pdfViewer.enableAnnotationToolbar&&this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.createCustomStampElement(),this.signatureModule&&this.signatureModule.createSignatureFileElement())},s.prototype.wireEvents=function(){var t=this;this.viewerContainer.addEventListener("scroll",this.viewerContainerOnScroll,!0),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.viewerContainer.addEventListener("touchmove",this.viewerContainerOnScroll,!0),this.viewerContainer.addEventListener("mousedown",this.viewerContainerOnMousedown),this.viewerContainer.addEventListener("mouseup",this.viewerContainerOnMouseup),this.viewerContainer.addEventListener("wheel",this.viewerContainerOnMouseWheel),this.viewerContainer.addEventListener("mousemove",this.viewerContainerOnMousemove),this.viewerContainer.addEventListener("mouseleave",this.viewerContainerOnMouseLeave),this.viewerContainer.addEventListener("mouseenter",this.viewerContainerOnMouseEnter),this.viewerContainer.addEventListener("mouseover",this.viewerContainerOnMouseOver),this.viewerContainer.addEventListener("click",this.viewerContainerOnClick),this.viewerContainer.addEventListener("dblclick",this.viewerContainerOnClick),this.viewerContainer.addEventListener("dragstart",this.viewerContainerOnDragStart),this.pdfViewer.element.addEventListener("keydown",this.viewerContainerOnKeyDown),window.addEventListener("mouseup",this.onWindowMouseUp),window.addEventListener("touchend",this.onWindowTouchEnd),this.unload=function(){return t.unloadDocument(t)},window.addEventListener("unload",this.unload),window.addEventListener("beforeunload",this.clearSessionStorage),window.addEventListener("resize",this.onWindowResize),-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Edge")||-1!==navigator.userAgent.indexOf("Trident")?(this.viewerContainer.addEventListener("pointerdown",this.viewerContainerOnPointerDown),this.viewerContainer.addEventListener("pointermove",this.viewerContainerOnPointerMove),this.viewerContainer.addEventListener("pointerup",this.viewerContainerOnPointerEnd),this.viewerContainer.addEventListener("pointerleave",this.viewerContainerOnPointerEnd)):(this.viewerContainer.addEventListener("touchstart",this.viewerContainerOnTouchStart),this.viewerContainer.addEventListener("touchmove",this.viewerContainerOnTouchMove),this.viewerContainer.addEventListener("touchend",this.viewerContainerOnTouchEnd),this.viewerContainer.addEventListener("touchleave",this.viewerContainerOnTouchEnd),this.viewerContainer.addEventListener("touchcancel",this.viewerContainerOnTouchEnd))},s.prototype.unWireEvents=function(){this.viewerContainer.removeEventListener("scroll",this.viewerContainerOnScroll,!0),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.viewerContainer.removeEventListener("touchmove",this.viewerContainerOnScroll,!0),this.viewerContainer.removeEventListener("mousedown",this.viewerContainerOnMousedown),this.viewerContainer.removeEventListener("mouseup",this.viewerContainerOnMouseup),this.viewerContainer.removeEventListener("wheel",this.viewerContainerOnMouseWheel),this.viewerContainer.removeEventListener("mousemove",this.viewerContainerOnMousemove),this.viewerContainer.removeEventListener("mouseleave",this.viewerContainerOnMouseLeave),this.viewerContainer.removeEventListener("mouseenter",this.viewerContainerOnMouseEnter),this.viewerContainer.removeEventListener("mouseover",this.viewerContainerOnMouseOver),this.viewerContainer.removeEventListener("click",this.viewerContainerOnClick),this.viewerContainer.removeEventListener("dragstart",this.viewerContainerOnDragStart),this.viewerContainer.removeEventListener("contextmenu",this.viewerContainerOnContextMenuClick),this.pdfViewer.element.removeEventListener("keydown",this.viewerContainerOnKeyDown),window.removeEventListener("mouseup",this.onWindowMouseUp),window.removeEventListener("unload",this.unload),window.removeEventListener("resize",this.onWindowResize),-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Edge")||-1!==navigator.userAgent.indexOf("Trident")?(this.viewerContainer.removeEventListener("pointerdown",this.viewerContainerOnPointerDown),this.viewerContainer.removeEventListener("pointermove",this.viewerContainerOnPointerMove),this.viewerContainer.removeEventListener("pointerup",this.viewerContainerOnPointerEnd),this.viewerContainer.removeEventListener("pointerleave",this.viewerContainerOnPointerEnd)):(this.viewerContainer.removeEventListener("touchstart",this.viewerContainerOnTouchStart),this.viewerContainer.removeEventListener("touchmove",this.viewerContainerOnTouchMove),this.viewerContainer.removeEventListener("touchend",this.viewerContainerOnTouchEnd),this.viewerContainer.removeEventListener("touchleave",this.viewerContainerOnTouchEnd),this.viewerContainer.removeEventListener("touchcancel",this.viewerContainerOnTouchEnd))},s.prototype.updateZoomValue=function(){this.pdfViewer.magnificationModule&&(this.pdfViewer.magnificationModule.isAutoZoom?this.pdfViewer.magnificationModule.fitToAuto():"FitToWidth"!==this.pdfViewer.zoomMode&&"fitToWidth"===this.pdfViewer.magnificationModule.fitType?this.pdfViewer.magnificationModule.fitToWidth():"fitToPage"===this.pdfViewer.magnificationModule.fitType&&this.pdfViewer.magnificationModule.fitToPage());for(var t=0;tt.clientX&&this.getVerticalValue(o.top)t.clientY&&(i=!0)}(e.Browser.isIE||"edge"===e.Browser.info.name)&&n&&(i=!0)}return i},s.prototype.getHorizontalClientValue=function(t){return t-this.getElement("_pageDiv_"+(this.currentPageNumber-1)).getBoundingClientRect().left},s.prototype.getVerticalClientValue=function(t){return t-this.getElement("_pageDiv_"+(this.currentPageNumber-1)).getBoundingClientRect().top},s.prototype.getHorizontalValue=function(t){var e=this.getElement("_pageDiv_"+(this.currentPageNumber-1)).getBoundingClientRect();return t*this.getZoomFactor()+e.left},s.prototype.getVerticalValue=function(t){var e=this.getElement("_pageDiv_"+(this.currentPageNumber-1)).getBoundingClientRect();return t*this.getZoomFactor()+e.top},s.prototype.checkIsNormalText=function(){var t=!0,e="",i=this.pdfViewer.textSelectionModule;return i&&i.selectionRangeArray&&1===i.selectionRangeArray.length?e=i.selectionRangeArray[0].textContent:window.getSelection()&&window.getSelection().anchorNode&&(e=window.getSelection().toString()),""!==e&&this.checkIsRtlText(e)&&(t=!1),t},s.prototype.initiatePanning=function(){this.isPanMode=!0,this.textLayer.modifyTextCursor(!1),this.disableTextSelectionMode(),this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule&&!e.isBlazor()&&this.pdfViewer.toolbar.annotationToolbarModule.deselectAllItems()},s.prototype.initiateTextSelectMode=function(){this.isPanMode=!1,this.viewerContainer&&(this.viewerContainer.style.cursor="auto",this.pdfViewer.textSelectionModule&&(this.textLayer.modifyTextCursor(!0),this.pdfViewer.textSelectionModule.enableTextSelectionMode()),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||e.isBlazor()||this.enableAnnotationAddTools(!0))},s.prototype.enableAnnotationAddTools=function(t){this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.enableAnnotationAddTools(t)},s.prototype.applySelection=function(){null!==window.getSelection().anchorNode&&this.pdfViewer.textSelectionModule.applySpanForSelection(),this.isViewerContainerDoubleClick=!1},s.prototype.handleTaps=function(t){var e=this;this.singleTapTimer?this.pdfViewer.enablePinchZoom&&(this.tapCount++,clearTimeout(this.singleTapTimer),this.singleTapTimer=null,this.onDoubleTap(t)):(this.singleTapTimer=setTimeout(function(){e.onSingleTap(t)},300),this.tapCount++)},s.prototype.handleTextBoxTaps=function(t){var e=this;setTimeout(function(){e.inputTapCount=0},300),this.inputTapCount++;setTimeout(function(){e.onTextBoxDoubleTap(t)},200);this.inputTapCount>2&&(this.inputTapCount=0)},s.prototype.onTextBoxDoubleTap=function(t){t[0].target;if(2===this.inputTapCount&&0!==this.pdfViewer.selectedItems.annotations.length)if(!0===this.isFreeTextAnnotation(this.pdfViewer.selectedItems.annotations))(e={}).x=this.pdfViewer.selectedItems.annotations[0].bounds.x,e.y=this.pdfViewer.selectedItems.annotations[0].bounds.y,this.pdfViewer.annotation.freeTextAnnotationModule.addInuptElemet(e,this.pdfViewer.selectedItems.annotations[0]);else if(!0===this.pdfViewer.selectedItems.annotations[0].enableShapeLabel){var e={};e.x=this.pdfViewer.selectedItems.annotations[0].bounds.x,e.y=this.pdfViewer.selectedItems.annotations[0].bounds.y,this.pdfViewer.annotation.inputElementModule.editLabel(e,this.pdfViewer.selectedItems.annotations[0])}},s.prototype.onSingleTap=function(t){var i=t[0].target,n=!1;if(this.singleTapTimer=null,i&&(i.classList.contains("e-pdfviewer-formFields")||i.classList.contains("e-pdfviewer-ListBox")||i.classList.contains("e-pdfviewer-signatureformfields"))&&(n=!0),!this.isLongTouchPropagated&&!this.navigationPane.isNavigationToolbarVisible&&!n&&this.pdfViewer.toolbarModule){if(this.touchClientX>=t[0].clientX-10&&this.touchClientX<=t[0].clientX+10&&this.touchClientY>=t[0].clientY-10&&this.touchClientY<=t[0].clientY+10){if(this.isTapHidden)e.isBlazor?this.viewerContainer.scrollTop+=this.pdfViewer.element.querySelector(".e-pv-mobile-toolbar").clientHeight*this.getZoomFactor():this.viewerContainer.scrollTop+=this.getElement("_toolbarContainer").clientHeight*this.getZoomFactor(),this.viewerContainer.style.height=this.updatePageHeight(this.pdfViewer.element.getBoundingClientRect().height,56);else if(e.isBlazor()?this.viewerContainer.scrollTop-=this.pdfViewer.element.querySelector(".e-pv-mobile-toolbar").clientHeight*this.getZoomFactor():this.viewerContainer.scrollTop-=this.getElement("_toolbarContainer").clientHeight*this.getZoomFactor(),this.viewerContainer.style.height=this.updatePageHeight(this.pdfViewer.element.getBoundingClientRect().height,0),this.pdfViewer.toolbar.moreDropDown){var o=this.getElement("_more_option-popup");o.firstElementChild&&(o.classList.remove("e-popup-open"),o.classList.add("e-popup-close"),o.removeChild(o.firstElementChild))}this.isTapHidden&&e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?(this.mobileScrollerContainer.style.display="",this.updateMobileScrollerPosition()):e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&null==this.getSelectTextMarkupCurrentPage()&&(this.mobileScrollerContainer.style.display="none"),null==this.getSelectTextMarkupCurrentPage()&&(e.isBlazor()?this.blazorUIAdaptor.tapOnMobileDevice(this.isTapHidden):this.pdfViewer.toolbarModule.showToolbar(this.isTapHidden),this.isTapHidden=!this.isTapHidden)}this.tapCount=0}},s.prototype.onDoubleTap=function(t){var e=t[0].target,i=!1;e&&(e.classList.contains("e-pdfviewer-formFields")||e.classList.contains("e-pdfviewer-ListBox")||e.classList.contains("e-pdfviewer-signatureformfields"))&&(i=!0),2!==this.tapCount||i||(this.tapCount=0,this.touchClientX>=parseInt((t[0].clientX-10).toString())&&this.touchClientX<=t[0].clientX+10&&this.touchClientY>=t[0].clientY-10&&this.touchClientY<=t[0].clientY+30&&(this.pdfViewer.magnification&&this.pdfViewer.magnification.onDoubleTapMagnification(),this.viewerContainer.style.height=this.updatePageHeight(this.pdfViewer.element.getBoundingClientRect().height,0),this.isTapHidden=!1,clearTimeout(this.singleTapTimer)))},s.prototype.preventTouchEvent=function(t){this.pdfViewer.textSelectionModule&&(this.isPanMode||!this.pdfViewer.enableTextSelection||this.isTextSelectionDisabled||null!=this.getSelectTextMarkupCurrentPage()||this.isWebkitMobile&&e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(t.preventDefault(),t.stopPropagation()))},s.prototype.renderStampAnnotation=function(t){if(this.pdfViewer.annotation){var e=this.getZoomFactor(),i=this.pdfViewer.annotation.getEventPageNumber(t),n=this.getElement("_pageDiv_"+i);if(this.pdfViewer.enableStampAnnotations){var o=this.pdfViewer.annotationModule.stampAnnotationModule;if(o&&o.isStampAnnotSelected&&n){s=n.getBoundingClientRect();o.renderStamp((t.changedTouches[0].clientX-s.left)/e,(t.changedTouches[0].clientY-s.top)/e,null,null,i,null,null,null,null),o.isStampAnnotSelected=!1}this.pdfViewer.annotation.onAnnotationMouseDown()}if(this.pdfViewer.enableHandwrittenSignature&&this.isSignatureAdded&&n){var s=n.getBoundingClientRect();this.signatureModule.renderSignature((t.changedTouches[0].clientX-s.left)/e,(t.changedTouches[0].clientY-s.top)/e),this.isSignatureAdded=!1}1===t.touches.length&&this.isTextMarkupAnnotationModule()&&!this.getPopupNoteVisibleStatus()&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.onTextMarkupAnnotationTouchEnd(t)}},s.prototype.initPageDiv=function(t){if(e.isBlazor()||this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.updateTotalPage(),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.mobiletotalPageContainer&&(this.mobiletotalPageContainer.innerHTML=this.pageCount.toString(),this.pageNoContainer.innerHTML="(1-"+this.pageCount.toString()+")"),this.pageCount>0){var i=0,n=0;this.isMixedSizeDocument=!1,this.pageCount>100?(n=100,this.pageLimit=n):n=this.pageCount;for(var o=!1,s=!1,a=!1,r=0;rthis.pageSize[r].width&&(o=!0),this.pageSize[r].width>this.pageSize[r].height&&(s=!0),r>0&&this.pageSize[r].width!==this.pageSize[r-1].width&&(a=!0);var L=this.pageSize[r].width;L>this.highestWidth&&(this.highestWidth=L);var d=this.pageSize[r].height;d>this.highestHeight&&(this.highestHeight=d)}(o&&s||a)&&(this.isMixedSizeDocument=!0);for(var w=this.pageCount<10?this.pageCount:10,r=0;rthis.pageCount&&(i=this.pageCount);for(o=t-1;o<=i;o++)-1!==o&&this.renderPageElement(o);var n=t-3;n<0&&(n=0);for(var o=t-1;o>=n;o--)-1!==o&&this.renderPageElement(o);for(var s=0;s100&&t.pdfViewer.fireDocumentLoad(u)}}}},this.virtualLoadRequestHandler.onFailure=function(e){t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText)},this.virtualLoadRequestHandler.onError=function(e){t.openNotificationPopup(),t.pdfViewer.fireAjaxRequestFailed(e.status,e.statusText)}},s.prototype.tileRenderPage=function(t,i){var n=this,o=this;if(t&&this.pageSize[i]){var s=this.getPageWidth(i),a=this.getPageHeight(i),r=this.getElement("_pageCanvas_"+i),l=this.getElement("_pageDiv_"+i);if(l&&(this.isMixedSizeDocument&&this.highestWidth>0?l.style.width=this.highestWidth*this.getZoomFactor()+"px":l.style.width=s+"px",l.style.height=a+"px",l.style.top=this.getPageTop(i)+"px",this.pdfViewer.enableRtl?l.style.right=this.updateLeftPosition(i)+"px":l.style.left=this.updateLeftPosition(i)+"px"),r){r.style.backgroundColor="#fff",r.style.width=s+"px",r.style.height=a+"px";var u=this.retrieveCurrentZoomFactor(),M=this.documentId+"_"+i+"_"+u+"_"+t.tileX+"_"+t.tileY;if(-1===this.tilerequestLists.indexOf(M)&&this.pdfViewer.restrictZoomRequest||!this.pdfViewer.restrictZoomRequest){this.tilerequestLists.push(M);var L=t.image,d=t.transformationMatrix;if(L){var w=new Image;w.onload=function(){var r=n.getElement("_pageCanvas_"+i);if(r){var l=e.isNullOrUndefined(t.scaleFactor)?1.5:t.scaleFactor,u=parseInt(r.width.toString()),M=parseInt((parseFloat(r.style.width)*l).toString());isNaN(parseFloat(r.style.width))||u===M||(r.style.width=s+"px",r.style.height=a+"px",r.height=parseInt((a*l).toString()),r.width=parseInt((s*l).toString())),o.tileRenderCount=o.tileRenderCount+1;var L=n.retrieveCurrentZoomFactor();t.zoomFactor&&(L=t.zoomFactor);var h=d.Elements[0]*n.getZoomFactor()/L,p=d.Elements[1]*n.getZoomFactor()/L,c=d.Elements[2]*n.getZoomFactor()/L,C=d.Elements[3]*n.getZoomFactor()/L,j=d.Elements[4]*n.getZoomFactor()/L,g=d.Elements[5]*n.getZoomFactor()/L,y=r.getContext("2d");y.setTransform(h,p,c,C,j,g),y.drawImage(w,0,0),n.showPageLoadingIndicator(i,!1);var A=t.tileX?t.tileX:0,S=t.tileY?t.tileY:0;if(0===A&&0===S&&0===i&&n.isDocumentLoaded){n.renderPDFInformations(),n.isInitialLoaded=!0;var m=window.sessionStorage.getItem(n.documentId+"_pagedata");n.pageCount<=100&&n.pdfViewer.fireDocumentLoad(m),n.isDocumentLoaded=!1,n.pdfViewer.textSearch&&n.pdfViewer.isExtractText&&n.pdfViewer.textSearchModule.getPDFDocumentTexts()}o.tileRenderCount===o.tileRequestCount&&(o.isTileImageRendered=!1,o.tileRenderCount=0,n.pdfViewer.magnificationModule&&n.pdfViewer.magnificationModule.rerenderCountIncrement()),w.onload=null,w=null}},w.src=L}}0===t.tileX&&0===t.tileY&&this.onPageRender(t,i,l)}}},s.prototype.calculateImageWidth=function(t,e,i,n){var o=t/this.getZoomFactor()*e*i;return parseInt(n.toString())===parseInt(o.toString())&&(n=o),n=n*this.getZoomFactor()/e},s.prototype.renderPage=function(t,i){var n=this;if(t&&this.pageSize[i]){var o=this.getPageWidth(i),s=this.getPageHeight(i),a=this.getElement("_pageCanvas_"+i),r=this.getElement("_pageDiv_"+i);if(r&&(this.isMixedSizeDocument&&this.highestWidth>0?r.style.width=this.highestWidth*this.getZoomFactor()+"px":r.style.width=o+"px",r.style.height=s+"px",r.style.top=this.getPageTop(i)+"px",this.pdfViewer.enableRtl?r.style.right=this.updateLeftPosition(i)+"px":r.style.left=this.updateLeftPosition(i)+"px"),a){a.style.width=o+"px",a.style.height=s+"px";var l=a.getContext("2d"),u=t.image,M=t.transformationMatrix;if(u){var L=new Image;L.onload=function(){var u=L.width,d=e.isNullOrUndefined(t.scaleFactor)?1.5:t.scaleFactor,w=n.retrieveCurrentZoomFactor();if(u=t.zoomFactor?n.calculateImageWidth(o,t.zoomFactor,d,u):n.calculateImageWidth(o,w,d,u),parseInt((o*d).toString())===parseInt(u.toString())){if(isNaN(parseFloat(a.style.width))||(a.style.width=o+"px",a.style.height=s+"px",a.height=s*window.devicePixelRatio,a.width=o*window.devicePixelRatio),o=0;s--)n[s].parentNode.removeChild(n[s]);if((this.pdfViewer.textSearchModule||this.pdfViewer.textSelectionModule||this.pdfViewer.annotationModule)&&this.renderTextContent(t,e),this.pdfViewer.formFieldsModule&&this.pdfViewer.formFieldsModule.renderFormFields(e),this.pdfViewer.enableHyperlink&&this.pdfViewer.linkAnnotationModule&&this.pdfViewer.linkAnnotationModule.renderHyperlinkContent(t,e),this.pdfViewer.textSelectionModule&&!this.isTextSelectionDisabled&&this.pdfViewer.textSelectionModule.applySelectionRangeOnScroll(e),this.documentAnnotationCollections){for(var a=!1,r=0;r0?s.style.width=this.highestWidth*this.getZoomFactor()+"px":s.style.width=i+"px",s.style.height=n+"px",this.pdfViewer.enableRtl?s.style.right=this.updateLeftPosition(t)+"px":s.style.left=this.updateLeftPosition(t)+"px",s.style.top=o+"px",this.pageContainer.appendChild(s),this.pageContainer.style.width=this.viewerContainer.clientWidth+"px",this.createWaitingPopup(t),this.orderPageDivElements(s,t),this.renderPageCanvas(s,i,n,t,"block"),!e.Browser.isDevice||this.pdfViewer.enableDesktopMode||this.isThumb||this.updateMobileScrollerPosition()},s.prototype.renderPDFInformations=function(){!this.pdfViewer.thumbnailViewModule||e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||this.pdfViewer.thumbnailViewModule.createRequestForThumbnails(),this.pdfViewer.bookmarkViewModule&&this.pdfViewer.bookmarkViewModule.createRequestForBookmarks(),this.pdfViewer.annotationModule&&(this.pdfViewer.toolbarModule&&this.pdfViewer.annotationModule.stickyNotesAnnotationModule.initializeAcccordionContainer(),this.pdfViewer.isCommandPanelOpen&&this.pdfViewer.annotation.showCommentsPanel(),this.pdfViewer.annotationModule.stickyNotesAnnotationModule.createRequestForComments())},s.prototype.orderPageDivElements=function(t,e){var i=this.getElement("_pageDiv_"+(e+1));i?this.pageContainer.insertBefore(t,i):this.pageContainer.appendChild(t)},s.prototype.renderPageCanvas=function(t,i,n,o,s){if(t){var a=e.createElement("canvas",{id:this.pdfViewer.element.id+"_pageCanvas_"+o,className:"e-pv-page-canvas"});return a.width=i,a.height=n,a.style.display=s,this.isMixedSizeDocument&&this.highestWidth>0&&(a.style.marginLeft="auto",a.style.marginRight="auto"),t.appendChild(a),(this.pdfViewer.textSearchModule||this.pdfViewer.textSelectionModule||this.pdfViewer.annotationModule)&&this.textLayer.addTextLayer(o,i,n,t),this.pdfViewer.annotationModule&&this.pdfViewer.annotation&&this.pdfViewer.annotationModule.createAnnotationLayer(t,i,n,o,s),a}},s.prototype.applyElementStyles=function(t,e){if(this.isMixedSizeDocument&&t){var i=document.getElementById(this.pdfViewer.element.id+"_pageCanvas_"+e),n=document.getElementById(this.pdfViewer.element.id+"_oldCanvas_"+e);t&&i&&i.offsetLeft>0?(t.style.marginLeft=i.offsetLeft+"px",t.style.marginRight=i.offsetLeft+"px"):n&&n.offsetLeft>0?(t.style.marginLeft=n.offsetLeft+"px",t.style.marginRight=n.offsetLeft+"px"):(t.style.marginLeft="auto",t.style.marginRight="auto")}},s.prototype.updateLeftPosition=function(t){var i,n=this.viewerContainer.getBoundingClientRect().width;if(0===n&&(n=parseFloat(this.pdfViewer.width.toString())),i=this.isMixedSizeDocument&&this.highestWidth>0?this.viewerContainer.clientWidth>0?(this.viewerContainer.clientWidth-this.highestWidth*this.getZoomFactor())/2:(n-this.highestWidth*this.getZoomFactor())/2:this.viewerContainer.clientWidth>0?(this.viewerContainer.clientWidth-this.getPageWidth(t))/2:(n-this.getPageWidth(t))/2,this.pageSize[t].width,this.pageSize[t].height,i<0||this.pdfViewer.magnificationModule&&(this.pdfViewer.magnificationModule.isAutoZoom&&this.getZoomFactor()<1||"fitToWidth"===this.pdfViewer.magnificationModule.fitType)){var o=i;(i=i>0&&e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?i:this.pageLeft)>0&&this.isMixedSizeDocument&&o>0&&(i=o)}return i},s.prototype.applyLeftPosition=function(t){var e;if(this.pageSize[t]){if(e=this.isMixedSizeDocument&&this.highestWidth>0?this.viewerContainer.clientWidth>0?(this.viewerContainer.clientWidth-this.highestWidth*this.getZoomFactor())/2:(this.viewerContainer.getBoundingClientRect().width-this.highestWidth*this.getZoomFactor())/2:this.viewerContainer.clientWidth>0?(this.viewerContainer.clientWidth-this.pageSize[t].width*this.getZoomFactor())/2:(this.viewerContainer.getBoundingClientRect().width-this.pageSize[t].width*this.getZoomFactor())/2,this.pageSize[t].width,this.pageSize[t].height,e<0||this.pdfViewer.magnificationModule&&(this.pdfViewer.magnificationModule.isAutoZoom&&this.getZoomFactor()<1||"fitToWidth"===this.pdfViewer.magnificationModule.fitType)){var i=e;e=this.pageLeft,i>0&&this.isMixedSizeDocument&&(e=i)}var n=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+t);n&&(this.pdfViewer.enableRtl?n.style.right=e+"px":n.style.left=e+"px")}},s.prototype.updatePageHeight=function(t,e){return(t-e)/t*100+"%"},s.prototype.initiatePageViewScrollChanged=function(){this.scrollHoldTimer&&clearTimeout(this.scrollHoldTimer),this.scrollHoldTimer=null,this.scrollPosition*this.getZoomFactor()!==this.viewerContainer.scrollTop&&(this.scrollPosition=this.viewerContainer.scrollTop,this.pageViewScrollChanged(this.currentPageNumber))},s.prototype.renderCountIncrement=function(){this.pdfViewer.magnificationModule&&this.pdfViewer.magnificationModule.renderCountIncrement()},s.prototype.pageViewScrollChanged=function(t){this.isPanMode?-1===this.renderedPagesList.indexOf(t-1)&&(this.reRenderedCount=0):this.reRenderedCount=0;var e=t-1;if(t!==this.previousPage&&t<=this.pageCount){n=!1;this.isDataExits&&!this.getStoredData(e)&&(n=!0),-1!==this.renderedPagesList.indexOf(e)||this.getMagnified()||n||(this.createRequestForRender(e),this.renderCountIncrement())}if(!this.getMagnified()&&!this.getPagesPinchZoomed()){var i=e-1,n=!1,o=this.getElement("_pageCanvas_"+i);this.isDataExits&&!this.getStoredData(i)&&(n=!0),null===o||n||-1!==this.renderedPagesList.indexOf(i)||this.getMagnified()||(this.createRequestForRender(i),this.renderCountIncrement()),this.isMinimumZoom&&this.renderPreviousPagesInScroll(i);var s=e+1,a=0;if(sa&&(s+=1)0&&(-1!==this.renderedPagesList.indexOf(e)||this.getMagnified()||(this.createRequestForRender(e),this.renderCountIncrement()),i>0&&(-1!==this.renderedPagesList.indexOf(i)||this.getMagnified()||(this.createRequestForRender(i),this.renderCountIncrement())))},s.prototype.downloadDocument=function(t){t=(URL||webkitURL).createObjectURL(t);var i=e.createElement("a");if(i.click)i.href=t,i.target="_parent","download"in i&&(i.download=this.pdfViewer.downloadFileName),(document.body||document.documentElement).appendChild(i),i.click(),i.parentNode.removeChild(i);else{if(window.top===window&&t.split("#")[0]===window.location.href.split("#")[0]){var n=-1===t.indexOf("?")?"?":"&";t=t.replace(/#|$/,n+"$&")}window.open(t,"_parent")}},s.prototype.downloadExportAnnotationJson=function(t,i){t=(URL||webkitURL).createObjectURL(t);var n=e.createElement("a");if(n.click)n.href=t,n.target="_parent","download"in n&&(null!==this.pdfViewer.exportAnnotationFileName?n.download=this.pdfViewer.exportAnnotationFileName.split(".")[0]+".json":n.download=this.pdfViewer.fileName.split(".")[0]+".json"),(document.body||document.documentElement).appendChild(n),n.click(),n.parentNode.removeChild(n),i?this.pdfViewer.fireFormExportSuccess(t,n.download):this.pdfViewer.fireExportSuccess(t,n.download);else{if(window.top===window&&t.split("#")[0]===window.location.href.split("#")[0]){var o=-1===t.indexOf("?")?"?":"&";t=t.replace(/#|$/,o+"$&")}window.open(t,"_parent"),i?this.pdfViewer.fireFormExportSuccess(t,this.pdfViewer.fileName.split(".")[0]+".json"):this.pdfViewer.fireExportSuccess(t,this.pdfViewer.fileName.split(".")[0]+".json")}},s.prototype.downloadExportedXFdfAnnotation=function(t){t=(URL||webkitURL).createObjectURL(t);var i=e.createElement("a");i.click&&(i.href=t,i.target="_parent","download"in i&&(null!==this.pdfViewer.exportAnnotationFileName?i.download=this.pdfViewer.exportAnnotationFileName.split(".")[0]+".xfdf":i.download=this.pdfViewer.fileName.split(".")[0]+".xfdf"),(document.body||document.documentElement).appendChild(i),i.click(),i.parentNode.removeChild(i),this.pdfViewer.fireExportSuccess(t,i.download))},s.prototype.exportFormFields=function(t){this.createRequestForExportFormfields(!1,t)},s.prototype.importFormFields=function(t){this.createRequestForImportingFormfields(t)},s.prototype.createRequestForExportFormfields=function(t,i){var n=this,o=this,s=new Promise(function(s,a){var r=o.createFormfieldsJsonData();o.pdfViewer.fireFormExportStarted(r.pdfAnnotation),r.action="ExportFormFields",r.hashId=o.hashId,r.fileName=o.pdfViewer.fileName,i&&""!==i&&!t&&(r.filePath=i),r.elementId=n.pdfViewer.element.id,o.jsonDocumentId&&(r.document=o.jsonDocumentId);var l=o.pdfViewer.serviceUrl+"/"+o.pdfViewer.serverActionSettings.exportFormFields;o.exportFormFieldsRequestHandler=new qe(n.pdfViewer),o.exportFormFieldsRequestHandler.url=l,o.exportFormFieldsRequestHandler.mode=!0,o.exportFormFieldsRequestHandler.responseType="text",o.exportFormFieldsRequestHandler.send(r),o.exportFormFieldsRequestHandler.onSuccess=function(i){var n=i.data;if(n&&n)if(t){var a=decodeURIComponent(escape(atob(n.split(",")[1])));s(a),o.pdfViewer.fireFormExportSuccess(a,o.pdfViewer.fileName)}else if(n.split("base64,")[1]){var r=o.createBlobUrl(n.split("base64,")[1],"application/json");e.Browser.isIE||"edge"===e.Browser.info.name?window.navigator.msSaveOrOpenBlob(r,o.pdfViewer.fileName.split(".")[0]+".json"):o.downloadExportAnnotationJson(r,!0)}},o.exportFormFieldsRequestHandler.onFailure=function(t){o.pdfViewer.fireFormExportFailed(r.pdfAnnotation,t.statusText)},o.exportFormFieldsRequestHandler.onError=function(t){o.pdfViewer.fireFormExportFailed(r.pdfAnnotation,t.statusText)}});return!t||s},s.prototype.createRequestForImportingFormfields=function(t){var e=this,i={};"object"==typeof t?i.data=JSON.stringify(t):(i.data=t,i.fileName=e.pdfViewer.fileName),e.pdfViewer.fireFormImportStarted(t),i.action="ImportFormFields",i.hashId=e.hashId,i.elementId=this.pdfViewer.element.id,e.jsonDocumentId&&(i.document=e.jsonDocumentId);var n=e.pdfViewer.serviceUrl+"/"+e.pdfViewer.serverActionSettings.importFormFields;e.importFormFieldsRequestHandler=new qe(this.pdfViewer),e.importFormFieldsRequestHandler.url=n,e.importFormFieldsRequestHandler.mode=!0,e.importFormFieldsRequestHandler.responseType="text",e.importFormFieldsRequestHandler.send(i),e.importFormFieldsRequestHandler.onSuccess=function(i){var n=i.data;if(n&&"null"!==n){if("object"!=typeof n)try{"object"!=typeof(n=JSON.parse(n))&&(e.onControlError(500,n,e.pdfViewer.serverActionSettings.importFormFields),e.pdfViewer.fireFormImportFailed(t,i.statusText),n=null)}catch(i){e.pdfViewer.fireFormImportFailed(t,e.pdfViewer.localeObj.getConstant("File not found")),e.openImportExportNotificationPopup(e.pdfViewer.localeObj.getConstant("File not found")),e.onControlError(500,n,e.pdfViewer.serverActionSettings.importFormFields),n=null}e.pdfViewer.fireFormImportSuccess(t),window.sessionStorage.removeItem(this.documentId+"_formfields"),e.saveFormfieldsData(n);for(var o=0;o2&&t<=1200?2:t/816;var i=parseInt(e.toFixed());return i<=0?1:this.pdfViewer.tileRenderingSettings.enableTileRendering?i:1}return 1},s.prototype.createRequestForRender=function(t){var e=this,i=e.getElement("_pageCanvas_"+t),n=e.getElement("_oldCanvas_"+t);if(this.pageSize&&this.pageSize[t]){var o=this.pageSize[t].width,s=(this.pageSize[t].height,this.getElement("_pageCanvas_"+t),1200),a=e.pdfViewer.element.clientHeight>0?e.pdfViewer.element.clientHeight:e.pdfViewer.element.style.height;s=parseInt(s),a=parseInt(a);var r=void 0,l=void 0,u=this.getTileCount(o);if(i){isNaN(parseFloat(i.style.width))&&!n||e.isInitialLoaded&&e.showPageLoadingIndicator(t,!1);var M=e.getStoredData(t);r=l=u;var L=e.pdfViewer.tileRenderingSettings;L.enableTileRendering&&L.x>0&&L.y>0&&(s2)&&(r=L.x,l=L.y),e.tileRequestCount=r*l;var d=this.retrieveCurrentZoomFactor(),w=void 0;if(1===u)M=e.getStoredData(t),w=e.pageRequestSent(t,0,0);else{var h=JSON.parse(e.getWindowSessionStorageTile(t,0,0,d));h&&(M=h)}if(M&&M.uniqueId===e.documentId){if(i.style.backgroundColor="#fff",e.pdfViewer.magnification&&e.pdfViewer.magnification.isPinchZoomed||!this.pageSize[t])return;var p=this.retrieveCurrentZoomFactor();if(s=p>2&&o<=1200?700:1200,e.pdfViewer.tileRenderingSettings.enableTileRendering||(s=1200),s>=o||!e.pdfViewer.tileRenderingSettings.enableTileRendering)e.renderPage(M,t);else{e.isTileImageRendered=!0,e.tileRenderCount=0,e.tileRenderPage(M,t);for(var c=0;c2&&o<=1200?700:1200,e.pdfViewer.tileRenderingSettings.enableTileRendering||(s=1200),y={xCoordinate:j,yCoordinate:g,viewPortWidth:s,viewPortHeight:a,pageNumber:t,hashId:e.hashId,tilecount:u,tileXCount:r,tileYCount:l,zoomFactor:A,action:"RenderPdfPages",uniqueId:this.documentId,elementId:e.pdfViewer.element.id},this.jsonDocumentId&&(y.documentId=this.jsonDocumentId),e.pageRequestHandler=new qe(this.pdfViewer),e.pageRequestHandler.url=e.pdfViewer.serviceUrl+"/"+e.pdfViewer.serverActionSettings.renderPages,e.pageRequestHandler.responseType="json",e.pageRequestHandler.send(y),e.requestLists.push(e.documentId+"_"+t+"_"+j+"_"+g+"_"+A),e.pageRequestHandler.onSuccess=function(i){if(!(e.pdfViewer.magnification&&e.pdfViewer.magnification.isPinchZoomed||!e.pageSize[t])){var n=i.data;if(n&&"object"!=typeof n)try{n=JSON.parse(n)}catch(t){e.onControlError(500,n,e.pdfViewer.serverActionSettings.renderPages),n=null}if(n){for(;"object"!=typeof n;)n=JSON.parse(n);if(n.image&&n.uniqueId===e.documentId){var a=void 0!==n.pageNumber?n.pageNumber:t;s>=o||!e.pdfViewer.tileRenderingSettings.enableTileRendering?e.storeWinData(n,a):e.storeWinData(n,a,n.tileX,n.tileY),s>=o||!e.pdfViewer.tileRenderingSettings.enableTileRendering?e.renderPage(n,a):e.tileRenderPage(n,a)}}}},this.pageRequestHandler.onFailure=function(t){e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,e.pdfViewer.serverActionSettings.renderPages)},this.pageRequestHandler.onError=function(t){e.openNotificationPopup(),e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,e.pdfViewer.serverActionSettings.renderPages)}}}e.renderedPagesList.push(t)}}},s.prototype.pageRequestSent=function(t,e,i){var n=this.retrieveCurrentZoomFactor(),o=this.documentId+"_"+t+"_"+e+"_"+i+"_"+n;return!!(this.requestLists&&this.requestLists.indexOf(o)>-1)},s.prototype.onControlError=function(t,e,i){this.openNotificationPopup(),this.pdfViewer.fireAjaxRequestFailed(t,e,i)},s.prototype.getStoredData=function(t){var e=this.retrieveCurrentZoomFactor();this.pdfViewer.restrictZoomRequest&&!this.pdfViewer.tileRenderingSettings.enableTileRendering&&(e=1);var i=this.getWindowSessionStorage(t,e)?this.getWindowSessionStorage(t,e):this.getPinchZoomPage(t),n=null;return i&&(n=i,this.isPinchZoomStorage||(n=JSON.parse(i)),this.isPinchZoomStorage=!1),n},s.prototype.storeWinData=function(t,e,i,n){var o,s=this.createBlobUrl(t.image.split("base64,")[1],"image/png"),a=(URL||webkitURL).createObjectURL(s);isNaN(i)&&isNaN(n)||0===i&&0===n?(o={image:a,transformationMatrix:t.transformationMatrix,hyperlinks:t.hyperlinks,hyperlinkBounds:t.hyperlinkBounds,linkAnnotation:t.linkAnnotation,linkPage:t.linkPage,annotationLocation:t.annotationLocation,textContent:t.textContent,textBounds:t.textBounds,pageText:t.pageText,rotation:t.rotation,scaleFactor:t.scaleFactor,uniqueId:t.uniqueId,zoomFactor:t.zoomFactor,tileX:i,tileY:n},this.pageSize[e]&&(this.pageSize[e].rotation=parseFloat(t.rotation)),this.textLayer.characterBound[e]=t.characterBounds):o={image:a,transformationMatrix:t.transformationMatrix,tileX:i,tileY:n,zoomFactor:t.zoomFactor};this.pageSize[e]&&this.pageSize[e].width,this.manageSessionStorage(e,o,i,n)},s.prototype.setCustomAjaxHeaders=function(t){for(var e=0;e1&&t<=2?t=2:t>2&&t<=3?t=3:t>3&&t<=4&&(t=4),t):(t<=0&&(t=1),t)},s.prototype.manageSessionStorage=function(t,e,i,n){var o=Math.round(JSON.stringify(window.sessionStorage).length/1024);if(o>=5e3){if(!this.isStorageExceed){for(var s=[],a=0;a=5e3){var r=window.sessionStorage.length;r>200&&(r=200);for(a=0;a0&&(o=_(i,this,this.pdfViewer))):o=_(i,this,this.pdfViewer);var s;return o&&(s=o.wrapper),n?(e.target=o,e.targetWrapper=s):(e.source=o,e.sourceWrapper=s),e.actualObject=this.eventArgs.actualObject,e},s.prototype.findToolToActivate=function(t,e){e={x:e.x/this.getZoomFactor(),y:e.y/this.getZoomFactor()};var n=this.pdfViewer.selectedItems.wrapper;if(t=t,n&&t){var o=n.bounds,s=new i.Rect(o.x,o.y,o.width,o.height);if("Line"===t.shapeAnnotationType||"LineWidthArrowHead"===t.shapeAnnotationType||"Distance"===t.shapeAnnotationType||"Polygon"===t.shapeAnnotationType){var a=this.pdfViewer.selectedItems.annotations[0];if(a)for(u=0;u-1){var L=t.wrapper.children[0].bounds.center;0===r?(l={x:t.sourcePoint.x,y:t.sourcePoint.y-t.leaderHeight},L=t.sourcePoint):(l={x:t.targetPoint.x,y:t.targetPoint.y-t.leaderHeight},L=t.targetPoint);var d=i.identityMatrix();i.rotateMatrix(d,M,L.x,L.y);var w=i.transformPointByMatrix(d,{x:l.x,y:l.y});if(i.contains(e,w,10))return"Leader"+r;r++}}}var h=10/this.getZoomFactor(),p=i.identityMatrix();i.rotateMatrix(p,t.rotateAngle+n.parentTransform,n.offsetX,n.offsetY);var c=n.offsetX-n.pivot.x*n.actualSize.width,C=n.offsetY-n.pivot.y*n.actualSize.height,j={x:c+(.5===n.pivot.x?2*n.pivot.x:n.pivot.x)*n.actualSize.width/2,y:C-30/this.getZoomFactor()};if(j=i.transformPointByMatrix(p,j),"Stamp"===t.shapeAnnotationType&&i.contains(e,j,h))return"Rotate";if((s=this.inflate(h,s)).containsPoint(e,0)){var g=this.checkResizeHandles(this.pdfViewer,n,e,p,c,C);if(g)return g}return this.pdfViewer.selectedItems.annotations.indexOf(t)>-1?"Drag":"Select"}return this.pdfViewer.tool||"Select"},s.prototype.inflate=function(t,e){return e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t,e},s.prototype.checkResizeHandles=function(t,e,i,n,o,s){var a;return a||(a=this.checkForResizeHandles(t,e,i,n,o,s)),a||null},s.prototype.checkForResizeHandles=function(t,e,n,o,s,a){t.selectedItems;var r=!1,l=!1,u=!1,M=!1,L=this.pdfViewer.annotationSelectorSettings.resizerLocation;if((L<1||L>3)&&(L=3),!this.pdfViewer.selectedItems.annotations[0]||"Stamp"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"FreeText"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Image"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"HandWrittenSignature"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||(r=!0),this.pdfViewer.selectedItems.annotations[0]&&"StickyNotes"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(l=!0),this.pdfViewer.selectedItems.annotations[0]&&"Ink"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(M=!0),!this.pdfViewer.selectedItems.annotations[0]||"Ellipse"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Radius"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&"Rectangle"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||(u=!0),!l){if(M||r||this.pdfViewer.selectedItems.annotations[0]&&"HandWrittenSignature"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType||e.actualSize.width>=40&&e.actualSize.height>=40&&u&&(1===L||3===L)){if(i.contains(n,i.transformPointByMatrix(o,{x:s+e.actualSize.width,y:a+e.actualSize.height}),10))return"ResizeSouthEast";if(i.contains(n,i.transformPointByMatrix(o,{x:s,y:a+e.actualSize.height}),10))return"ResizeSouthWest";if(i.contains(n,i.transformPointByMatrix(o,{x:s+e.actualSize.width,y:a}),10))return"ResizeNorthEast";if(i.contains(n,i.transformPointByMatrix(o,{x:s,y:a}),10))return"ResizeNorthWest"}if(M||!u||u&&(2===L||3===L||!(e.actualSize.width>=40&&e.actualSize.height>=40)&&1===L)){if(i.contains(n,i.transformPointByMatrix(o,{x:s+e.actualSize.width,y:a+e.actualSize.height/2}),10)&&!r)return"ResizeEast";if(i.contains(n,i.transformPointByMatrix(o,{x:s,y:a+e.actualSize.height/2}),10)&&!r)return"ResizeWest";if(i.contains(n,i.transformPointByMatrix(o,{x:s+e.actualSize.width/2,y:a+e.actualSize.height}),10)&&!r)return"ResizeSouth";if(i.contains(n,i.transformPointByMatrix(o,{x:s+e.actualSize.width/2,y:a}),10)&&!r)return"ResizeNorth"}}return null},s.prototype.diagramMouseMove=function(t){this.currentPosition=this.getMousePosition(t),this.pdfViewer.firePageMouseover(this.currentPosition.x,this.currentPosition.y),this.pdfViewer.annotation&&(this.activeElements.activePageID=this.pdfViewer.annotation.getEventPageNumber(t));var e=_(t,this,this.pdfViewer);if((this.tool instanceof re||this.tool instanceof ue)&&(e=this.pdfViewer.drawingObject),!1===i.Point.equals(this.currentPosition,this.prevPosition)||this.inAction){if(!1===this.isMouseDown){this.eventArgs={};e&&(this.tool=this.getTool(this.action),e.wrapper&&e.wrapper.children[0]);n=t.target;this.action=this.findToolToActivate(e,this.currentPosition),e&&e.annotationSettings&&e.annotationSettings.isLock&&("Select"===this.action&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Select",e)?this.action=this.action:this.action=""),"Drag"===this.action&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Move",e)?this.action=this.action:this.action="Select"),("ResizeSouthEast"===this.action||"ResizeNorthEast"===this.action||"ResizeNorthWest"===this.action||"ResizeSouthWest"===this.action||"ResizeNorth"===this.action||"ResizeWest"===this.action||"ResizeEast"===this.action||"ResizeSouth"===this.action||this.action.includes("ConnectorSegmentPoint")||this.action.includes("Leader"))&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Resize",e)?this.action=this.action:this.action="Select")),this.tool=this.getTool(this.action),this.setCursor(n,t)}else{if(this.eventArgs&&this.eventArgs.source){var n=t.target;this.updateDefaultCursor(this.eventArgs.source,n,t)}else this.setCursor(t.target,t);if(this.diagramMouseActionHelper(t),this.tool){var o=e;!o||"Path"!==o.shapeAnnotationType&&"SignatureImage"!==o.shapeAnnotationType&&"SignatureText"!==o.shapeAnnotationType||(this.tool=null),o&&"FreeText"===o.shapeAnnotationType&&this.pdfViewer.freeTextSettings.allowEditTextOnly&&((n=event.target).style.cursor="default",this.tool=null),null!=this.tool&&this.tool.mouseMove(this.eventArgs)}}this.prevPosition=this.currentPosition}},s.prototype.updateDefaultCursor=function(t,e,i){t&&void 0!==t.pageIndex&&t.pageIndex!==this.activeElements.activePageID&&e?this.isPanMode?e.style.cursor="grab":e.style.cursor="default":this.setCursor(e,i)},s.prototype.diagramMouseLeave=function(t){this.currentPosition=this.getMousePosition(t),this.pdfViewer.annotation&&(this.activeElements.activePageID=this.pdfViewer.annotation.getEventPageNumber(t));var e=_(t,this,this.pdfViewer),n=!1;if(!1===i.Point.equals(this.currentPosition,this.prevPosition)||this.inAction){if(!1===this.isMouseDown||n){this.eventArgs={};e&&(e.wrapper.children[0],n=!1)}else this.diagramMouseActionHelper(t),this.tool&&"Drag"!==this.action&&"Stamp"!==this.pdfViewer.tool&&this.tool.currentElement&&"Stamp"!==this.tool.currentElement.shapeAnnotationType&&(this.tool.mouseLeave(this.eventArgs),this.tool=null,this.pdfViewer.annotation&&this.pdfViewer.annotationModule.renderAnnotations(this.previousPage,null,null,null));this.prevPosition=this.currentPosition}},s.prototype.diagramMouseActionHelper=function(t){this.eventArgs.position=this.currentPosition,"Drag"===this.action&&this.eventArgs.source instanceof Xt&&this.getMouseEventArgs(this.currentPosition,this.eventArgs,t),this.getMouseEventArgs(this.currentPosition,this.eventArgs,t,this.eventArgs.source),this.inAction=!0,this.initialEventArgs=null},s.prototype.setCursor=function(t,i){var n,o=this.pdfViewer.annotationModule.freeTextAnnotationModule;if(this.tool instanceof ae)"ResizeNorthWest"===this.tool.corner?(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"nw-resize":n):"ResizeNorthEast"===this.tool.corner?(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"ne-resize":n):"ResizeSouthWest"===this.tool.corner?(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"sw-resize":n):"ResizeSouthEast"===this.tool.corner?(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"se-resize":n):"ResizeNorth"===this.tool.corner?(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"n-resize":n):"ResizeWest"===this.tool.corner?(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"w-resize":n):"ResizeEast"===this.tool.corner?(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"e-resize":n):"ResizeSouth"===this.tool.corner&&(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"s-resize":n);else if(this.isCommentIconAdded&&this.isAddComment)t.style.cursor="crosshair";else if(this.pdfViewer.enableHandwrittenSignature&&this.isNewSignatureAdded&&this.tool instanceof ne)t.style.cursor="crosshair";else if(this.tool instanceof ie)t.style.cursor="move";else if(this.tool instanceof re||this.tool instanceof ue||this.tool instanceof le||o&&o.isNewAddedAnnot||this.tool instanceof oe)t.style.cursor="crosshair";else if(this.tool instanceof se)this.tool.endPoint&&this.tool.endPoint.indexOf("Leader0")?(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"nw-resize":n):this.tool.endPoint&&this.tool.endPoint.indexOf("Leader1")?(n=this.setResizerCursorType(),t.style.cursor=e.isNullOrUndefined(n)?"ne-resize":n):this.tool.endPoint&&this.tool.endPoint.indexOf("ConnectorSegmentPoint")&&(t.style.cursor="sw-resize");else if(t.classList.contains("e-pv-text"))t.style.cursor="text";else if(t.classList.contains("e-pv-hyperlink"))t.style.cursor="pointer";else if(this.isPanMode){if(this.isViewerMouseDown&&"mousemove"===i.type)t.style.cursor="grabbing";else if((M=_(i,this,this.pdfViewer))&&"mousemove"===i.type){t.style.cursor="pointer";var s=M,a=this.getMousePosition(i),r={left:(d=this.relativePosition(i)).x,top:d.y},l={left:a.x,top:a.y},u={opacity:s.opacity,fillColor:s.fillColor,strokeColor:s.strokeColor,thicknes:s.thickness,author:s.author,subject:s.subject,modifiedDate:s.modifiedDate};this.isMousedOver=!0,this.pdfViewer.fireAnnotationMouseover(s.annotName,s.pageIndex,s.shapeAnnotationType,s.bounds,u,l,r)}else if(t.style.cursor="grab",this.isMousedOver){w=this.pdfViewer.annotation.getEventPageNumber(i);this.pdfViewer.fireAnnotationMouseLeave(w),this.isMousedOver=!1}}else{var M=_(i,this,this.pdfViewer);if(M&&0===this.pdfViewer.selectedItems.annotations.length&&"mousemove"===i.type){var s=M,L=this.pdfViewer.nameTable[s.id];"HandWrittenSignature"!==L.shapeAnnotationType&&"Ink"!==L.shapeAnnotationType&&void 0!==L.annotationSettings.isLock&&(L.annotationSettings.isLock=JSON.parse(L.annotationSettings.isLock)),L.annotationSettings.isLock?t.style.cursor="default":t.style.cursor="pointer";var a=this.getMousePosition(i),d=this.relativePosition(i),r={left:d.x,top:d.y},l={left:a.x,top:a.y},u={opacity:s.opacity,fillColor:s.fillColor,strokeColor:s.strokeColor,thicknes:s.thickness,author:s.author,subject:s.subject,modifiedDate:s.modifiedDate};this.isMousedOver=!0,this.pdfViewer.fireAnnotationMouseover(s.annotName,s.pageIndex,s.shapeAnnotationType,s.bounds,u,l,r)}else{if(this.isMousedOver){var w=this.pdfViewer.annotation.getEventPageNumber(i);this.pdfViewer.fireAnnotationMouseLeave(w),this.isMousedOver=!1,t.style.cursor="default"}M&&1===this.pdfViewer.selectedItems.annotations.length&&"mousemove"===i.type?t.style.cursor="pointer":t.style.cursor="default"}}},s.prototype.setResizerCursorType=function(){var t;return this.pdfViewer.selectedItems.annotations[0]&&e.isNullOrUndefined(this.pdfViewer.selectedItems.annotations[0].annotationSelectorSettings.resizerCursorType)?"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?t=e.isNullOrUndefined(this.pdfViewer.freeTextSettings.annotationSelectorSettings)?null:this.pdfViewer.freeTextSettings.annotationSelectorSettings.resizerCursorType:"Stamp"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?t=e.isNullOrUndefined(this.pdfViewer.stampSettings.annotationSelectorSettings)?null:this.pdfViewer.stampSettings.annotationSelectorSettings.resizerCursorType:"HandWrittenSignature"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?t=e.isNullOrUndefined(this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings)?null:this.pdfViewer.handWrittenSignatureSettings.annotationSelectorSettings.resizerCursorType:"Ink"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?t=e.isNullOrUndefined(this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings)?null:this.pdfViewer.inkAnnotationSettings.annotationSelectorSettings.resizerCursorType:this.pdfViewer.selectedItems.annotations[0].measureType?this.pdfViewer.selectedItems.annotations[0].measureType&&("Distance calculation"===this.pdfViewer.selectedItems.annotations[0].subject?t=e.isNullOrUndefined(this.pdfViewer.distanceSettings.annotationSelectorSettings)?null:this.pdfViewer.distanceSettings.annotationSelectorSettings.resizerCursorType:"Perimeter calculation"===this.pdfViewer.selectedItems.annotations[0].subject?t=e.isNullOrUndefined(this.pdfViewer.perimeterSettings.annotationSelectorSettings)?null:this.pdfViewer.perimeterSettings.annotationSelectorSettings.resizerCursorType:"Area calculation"===this.pdfViewer.selectedItems.annotations[0].subject?t=e.isNullOrUndefined(this.pdfViewer.areaSettings.annotationSelectorSettings)?null:this.pdfViewer.areaSettings.annotationSelectorSettings.resizerCursorType:"Radius calculation"===this.pdfViewer.selectedItems.annotations[0].subject?t=e.isNullOrUndefined(this.pdfViewer.radiusSettings.annotationSelectorSettings)?null:this.pdfViewer.radiusSettings.annotationSelectorSettings.resizerCursorType:"Volume calculation"===this.pdfViewer.selectedItems.annotations[0].subject&&(t=e.isNullOrUndefined(this.pdfViewer.volumeSettings.annotationSelectorSettings)?null:this.pdfViewer.volumeSettings.annotationSelectorSettings.resizerCursorType)):"Line"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?t=e.isNullOrUndefined(this.pdfViewer.lineSettings.annotationSelectorSettings)?null:this.pdfViewer.lineSettings.annotationSelectorSettings.resizerCursorType:"LineWidthArrowHead"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?t=e.isNullOrUndefined(this.pdfViewer.arrowSettings.annotationSelectorSettings)?null:this.pdfViewer.arrowSettings.annotationSelectorSettings.resizerCursorType:"Rectangle"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?t=e.isNullOrUndefined(this.pdfViewer.rectangleSettings.annotationSelectorSettings)?null:this.pdfViewer.rectangleSettings.annotationSelectorSettings.resizerCursorType:"Ellipse"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?t=e.isNullOrUndefined(this.pdfViewer.circleSettings.annotationSelectorSettings)?null:this.pdfViewer.circleSettings.annotationSelectorSettings.resizerCursorType:"Polygon"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(t=e.isNullOrUndefined(this.pdfViewer.polygonSettings.annotationSelectorSettings)?null:this.pdfViewer.polygonSettings.annotationSelectorSettings.resizerCursorType):this.pdfViewer.selectedItems.annotations[0]&&(t=this.pdfViewer.selectedItems.annotations[0].annotationSelectorSettings.resizerCursorType),t||(t=this.pdfViewer.annotationSelectorSettings.resizerCursorType),t},s.prototype.getTool=function(t){switch(t){case"Select":return new ee(this.pdfViewer,this);case"Drag":return new ie(this.pdfViewer,this);case"ResizeSouthEast":case"ResizeSouthWest":case"ResizeNorthEast":case"ResizeNorthWest":case"ResizeSouth":case"ResizeNorth":case"ResizeWest":case"ResizeEast":return new ae(this.pdfViewer,this,t);case"ConnectorSourceEnd":case"ConnectorTargetEnd":case"Leader":case"ConnectorSegmentPoint":return new se(this.pdfViewer,this,t);case"DrawTool":return new re(this.pdfViewer,this,this.pdfViewer.drawingObject);case"Polygon":return new le(this.pdfViewer,this,"Polygon");case"Distance":return new ue(this.pdfViewer,this,"Leader1",void 0);case"Line":return new ue(this.pdfViewer,this,"ConnectorSegmentPoint_1",this.pdfViewer.drawingObject);case"Perimeter":return new le(this.pdfViewer,this,"Perimeter");case"Rotate":return new Me(this.pdfViewer,this);case"Stamp":return new ne(this.pdfViewer,this);case"Ink":return new oe(this.pdfViewer,this,this.pdfViewer.drawingObject)}return t.indexOf("ConnectorSegmentPoint")>-1||t.indexOf("Leader")>-1?new se(this.pdfViewer,this,t):null},s.prototype.diagramMouseUp=function(t){if(this.tool){if(!this.inAction&&3!==t.which&&"Drag"===this.action){this.action="Select";n=_(t,this,this.pdfViewer)}if(this.tool instanceof le||this.tool instanceof ue||this.tool instanceof re||(this.inAction=!1,this.isMouseDown=!1),this.currentPosition=this.getMousePosition(t),this.tool){this.eventArgs.position=this.currentPosition,this.getMouseEventArgs(this.currentPosition,this.eventArgs,t,this.eventArgs.source);this.isMetaKey(t);var i={ctrlKey:t.ctrlKey,shiftKey:t.shiftKey};this.eventArgs.info=i,this.eventArgs.clickCount=t.detail,this.tool.mouseUp(this.eventArgs),this.isAnnotationMouseDown=!1,this.isAddComment=!1,(this.tool instanceof re||this.tool instanceof ue||this.tool instanceof le)&&!this.tool.dragging&&(this.inAction=!1,this.isMouseDown=!1);var n=_(t,this,this.pdfViewer);this.isShapeAnnotationModule()&&this.isCalibrateAnnotationModule()&&(!e.Browser.isDevice||this.pdfViewer.enableDesktopMode)&&this.pdfViewer.annotation.onShapesMouseup(n,t),this.isAnnotationDrawn=!1}}var o=t.target;t.cancelable&&this.skipPreventDefault(o)&&(!e.Browser.isDevice||this.pdfViewer.enableDesktopMode)&&t.preventDefault(),this.eventArgs={}},s.prototype.skipPreventDefault=function(t){var e=!1,i=!1;return this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus&&(i=!0),!t||t.classList.contains("e-pdfviewer-formFields")||t.classList.contains("e-pdfviewer-ListBox")||t.classList.contains("e-pdfviewer-signatureformfields")||"free-text-input"===t.className&&"TEXTAREA"===t.tagName||i||"e-pv-hyperlink"===t.className||(e=!0),e},s.prototype.isMetaKey=function(t){return navigator.platform.match("Mac")?t.metaKey:t.ctrlKey},s.prototype.diagramMouseDown=function(t){var n;n=t.touches,this.isMouseDown=!0,this.isAnnotationAdded=!1,this.currentPosition=this.prevPosition=this.getMousePosition(t),this.eventArgs={};var o=!1;"Stamp"===this.pdfViewer.tool&&(this.pdfViewer.tool="",o=!0),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.annotation&&(this.activeElements.activePageID=this.pdfViewer.annotation.getEventPageNumber(t));var s=_(t,this,this.pdfViewer);if(e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&s&&t.preventDefault(),this.pdfViewer.annotation&&this.pdfViewer.enableStampAnnotations){var a=this.pdfViewer.annotationModule.stampAnnotationModule;if(a&&a.isNewStampAnnot){var r=s;if(void 0===r&&this.pdfViewer.selectedItems.annotations[0]&&(r=this.pdfViewer.selectedItems.annotations[0]),r){if(this.isViewerMouseDown=!1,r.opacity=this.pdfViewer.stampSettings.opacity,this.isNewStamp=!0,this.pdfViewer.nodePropertyChange(r,{opacity:this.pdfViewer.stampSettings.opacity}),this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode=!1,"Image"===r.shapeAnnotationType&&!this.isAlreadyAdded){this.stampAdded=!0;var l=r.id;a.currentStampAnnotation&&a.currentStampAnnotation.signatureName&&(l=a.currentStampAnnotation.signatureName);for(var u=!1,M=0;M-1||t.target.id.indexOf("_annotationCanvas")>-1||t.target.classList.contains("e-pv-hyperlink"))&&this.pdfViewer.annotation){var c=this.pdfViewer.annotation.getEventPageNumber(t),C=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+c);if(C){var j=C.getBoundingClientRect(),g=j.x?j.x:j.left,y=j.y?j.y:j.top;p=new i.Rect(g+10,y+10,j.width-10,j.height-10)}}if(n&&(this.mouseX=n[0].clientX,this.mouseY=n[0].clientY),p&&p.containsPoint({x:this.mouseX,y:this.mouseY})&&w.isNewAddedAnnot){c=this.pdfViewer.annotation.getEventPageNumber(t);if(w.addInuptElemet(this.currentPosition,null,c),this.pdfViewer.toolbar&&this.pdfViewer.toolbar.annotationToolbarModule){var A=this.pdfViewer.toolbar.annotationToolbarModule;e.isBlazor()||A.primaryToolbar.deSelectItem(A.freeTextEditItem)}t.preventDefault(),w.isNewAddedAnnot=!1}}}s&&s.wrapper.children[0],(!this.tool||this.tool&&!this.tool.drawingObject)&&(o?(this.action="Select",this.tool=this.getTool(this.action)):(this.action=this.findToolToActivate(s,this.currentPosition),s&&s.annotationSettings&&s.annotationSettings.isLock&&("Select"===this.action&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Select",s)?this.action=this.action:this.action=""),"Drag"===this.action&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Move",s)?this.action=this.action:this.action="Select"),("ResizeSouthEast"===this.action||"ResizeNorthEast"===this.action||"ResizeNorthWest"===this.action||"ResizeSouthWest"===this.action||"ResizeSouth"===this.action||"ResizeNorth"===this.action||"ResizeWest"===this.action||"ResizeEast"===this.action||this.action.includes("ConnectorSegmentPoint")||this.action.includes("Leader"))&&(this.pdfViewer.annotationModule.checkAllowedInteractions("Resize",s)?this.action=this.action:this.action="Select")),this.tool=this.getTool(this.action),this.tool||(this.action=this.pdfViewer.tool||"Select",this.tool=this.getTool(this.action)))),this.getMouseEventArgs(this.currentPosition,this.eventArgs,t),this.eventArgs.position=this.currentPosition,this.tool&&(this.isAnnotationMouseDown=!1,this.isAnnotationMouseMove=!1,this.tool.mouseDown(this.eventArgs),this.isAnnotationDrawn=!0,this.signatureAdded=!0),this.pdfViewer.annotation&&this.pdfViewer.annotation.onAnnotationMouseDown(),this.initialEventArgs={source:this.eventArgs.source,sourceWrapper:this.eventArgs.sourceWrapper},this.initialEventArgs.position=this.currentPosition,this.initialEventArgs.info=this.eventArgs.info},s.prototype.exportAnnotationsAsObject=function(){var e=this;if(this.pdfViewer.annotationModule&&this.updateExportItem())return new Promise(function(i,n){e.createRequestForExportAnnotations(!0,t.AnnotationDataFormat.Json).then(function(t){i(t)})})},s.prototype.exportFormFieldsAsObject=function(){var t=this;if(this.pdfViewer.formFieldsModule)return new Promise(function(e,i){t.createRequestForExportFormfields(!0).then(function(t){e(t)})})},s.prototype.importAnnotations=function(t,e,i){this.pdfViewer.annotationModule&&this.createRequestForImportAnnotations(t,e,i)},s.prototype.exportAnnotations=function(t){this.pdfViewer.annotationModule&&this.updateExportItem()&&this.createRequestForExportAnnotations(!1,t)},s.prototype.createRequestForExportAnnotations=function(t,i,n){var o=this,s=this,a=new Promise(function(a,r){var l;"Json"===i?(l={hashId:s.hashId,action:"ExportAnnotations",pdfAnnotation:s.createAnnotationJsonData(),elementId:s.pdfViewer.element.id,annotationDataFormat:i},s.pdfViewer.fireExportStart(l.pdfAnnotation)):(l=o.constructJsonDownload(),s.pdfViewer.fireExportStart(l),l.annotationDataFormat=i,l.action="ExportAnnotations"),s.jsonDocumentId&&(l.document=s.jsonDocumentId);var u=s.pdfViewer.serviceUrl+"/"+s.pdfViewer.serverActionSettings.exportAnnotations;s.exportAnnotationRequestHandler=new qe(o.pdfViewer),s.exportAnnotationRequestHandler.url=u,s.exportAnnotationRequestHandler.mode=!0,s.exportAnnotationRequestHandler.responseType="text",s.exportAnnotationRequestHandler.send(l),s.exportAnnotationRequestHandler.onSuccess=function(o){var r=o.data;if(r){if("object"==typeof r&&(r=JSON.parse(r)),r)if(t)if(r.split("base64,")[1]){var u=atob(r.split(",")[1]),M=void 0;M="Json"===l.annotationDataFormat?JSON.parse(u):u,null!==s.pdfViewer.exportAnnotationFileName?s.pdfViewer.fireExportSuccess(M,s.pdfViewer.exportAnnotationFileName):s.pdfViewer.fireExportSuccess(M,s.pdfViewer.fileName),s.updateDocumentAnnotationCollections(),a(n?r:u)}else s.pdfViewer.fireExportFailed(l.pdfAnnotation,s.pdfViewer.localeObj.getConstant("Export Failed"));else if("Json"===i)if(r.split("base64,")[1]){L=s.createBlobUrl(r.split("base64,")[1],"application/json");e.Browser.isIE||"edge"===e.Browser.info.name?null!==s.pdfViewer.exportAnnotationFileName?window.navigator.msSaveOrOpenBlob(L,s.pdfViewer.exportAnnotationFileName.split(".")[0]+".json"):window.navigator.msSaveOrOpenBlob(L,s.pdfViewer.fileName.split(".")[0]+".json"):s.downloadExportAnnotationJson(L),s.updateDocumentAnnotationCollections()}else s.openImportExportNotificationPopup(s.pdfViewer.localeObj.getConstant("Export Failed")),s.pdfViewer.fireExportFailed(l.pdfAnnotation,s.pdfViewer.localeObj.getConstant("Export Failed"));else if(r.split("base64,")[1]){var L=s.createBlobUrl(r.split("base64,")[1],"application/vnd.adobe.xfdf");e.Browser.isIE||"edge"===e.Browser.info.name?window.navigator.msSaveOrOpenBlob(L,s.pdfViewer.fileName.split(".")[0]+".xfdf"):s.downloadExportedXFdfAnnotation(L)}else s.openImportExportNotificationPopup(s.pdfViewer.localeObj.getConstant("Export Failed")),s.pdfViewer.fireExportFailed(l,s.pdfViewer.localeObj.getConstant("Export Failed"));if("string"!=typeof r)try{"string"==typeof r&&(s.onControlError(500,r,s.pdfViewer.serverActionSettings.exportAnnotations),r=null)}catch(t){s.pdfViewer.fireExportFailed(l.pdfAnnotation,s.pdfViewer.localeObj.getConstant("Export Failed")),s.onControlError(500,r,s.pdfViewer.serverActionSettings.exportAnnotations),r=null}}else{var d=void 0;d=null!==s.pdfViewer.exportAnnotationFileName?s.pdfViewer.exportAnnotationFileName:s.pdfViewer.fileName,s.pdfViewer.fireExportSuccess("Exported data saved in server side successfully",d)}},s.exportAnnotationRequestHandler.onFailure=function(t){s.pdfViewer.fireExportFailed(l.pdfAnnotation,t.statusText)},s.exportAnnotationRequestHandler.onError=function(t){s.pdfViewer.fireExportFailed(l.pdfAnnotation,t.statusText)}});return!t||a},s.prototype.createRequestForImportAnnotations=function(t,e,i){var n,o=this;if("object"==typeof t)o.reRenderAnnotations(t.pdfAnnotation),o.isImportedAnnotation=!0,o.pdfViewer.isDocumentEdited=!0,o.pdfViewer.fireImportSuccess(t.pdfAnnotation);else{o.pdfViewer.fireImportStart(t),"Json"===e?n={fileName:t,action:"ImportAnnotations",elementId:o.pdfViewer.element.id}:(i||(t=btoa(t)),n={importedData:t,action:"ImportAnnotations",elementId:o.pdfViewer.element.id,hashId:this.hashId,uniqueId:this.documentId}),o.jsonDocumentId&&(n.document=o.jsonDocumentId);var s=o.pdfViewer.serviceUrl+"/"+o.pdfViewer.serverActionSettings.importAnnotations;o.importAnnotationRequestHandler=new qe(o.pdfViewer),o.importAnnotationRequestHandler.url=s,o.importAnnotationRequestHandler.mode=!0,o.importAnnotationRequestHandler.responseType="text",o.importAnnotationRequestHandler.send(n),o.importAnnotationRequestHandler.onSuccess=function(e){var i=e.data;if(i){if("object"!=typeof i)try{"object"!=typeof(i=JSON.parse(i))&&(o.onControlError(500,i,o.pdfViewer.serverActionSettings.importAnnotations),i=null)}catch(e){o.pdfViewer.fireImportFailed(t,o.pdfViewer.localeObj.getConstant("File not found")),o.openImportExportNotificationPopup(o.pdfViewer.localeObj.getConstant("File not found")),o.onControlError(500,i,o.pdfViewer.serverActionSettings.importAnnotations),i=null}i&&i.pdfAnnotation&&(o.reRenderAnnotations(i.pdfAnnotation),o.isImportedAnnotation=!0,o.pdfViewer.isDocumentEdited=!0,o.pdfViewer.fireImportSuccess(i.pdfAnnotation))}},o.importAnnotationRequestHandler.onFailure=function(e){o.pdfViewer.fireImportFailed(t,e.statusText)},o.importAnnotationRequestHandler.onError=function(e){o.pdfViewer.fireImportFailed(t,e.statusText)}}},s.prototype.openImportExportNotificationPopup=function(t){this.pdfViewer.showNotificationDialog&&this.textLayer.createNotificationPopup(t)},s.prototype.reRenderAnnotations=function(t){if(t){this.isImportAction=!0;var e=void 0;this.isImportedAnnotation?this.importedAnnotation=this.combineImportedData(this.importedAnnotation,t):this.pageCount>0&&(this.importedAnnotation=t),this.isImportedAnnotation||(e=0);for(var i=0;i0&&this.pdfViewer.annotationModule.stickyNotesAnnotationModule&&!this.pdfViewer.annotationModule.stickyNotesAnnotationModule.isAnnotationRendered){var p=this.createAnnotationsCollection();p&&(this.documentAnnotationCollections=this.pdfViewer.annotationModule.stickyNotesAnnotationModule.updateAnnotationsInDocumentCollections(this.importedAnnotation,p))}}},s.prototype.updateImportedAnnotationsInDocumentCollections=function(t,e){if(this.documentAnnotationCollections){var i=this.documentAnnotationCollections[e];if(i){if(t.textMarkupAnnotation&&0!==t.textMarkupAnnotation.length)for(n=0;n0&&(e=t.some(function(t){return"FreeText"===t.shapeAnnotationType&&"Text Box"===t.subject})),e},s.prototype.checkImportedData=function(t,e,i){for(o=0;ot[r].x?n=t[r].x:ot[r].y?s=t[r].y:a0){for(var l=[],u=0;u=1){for(var M=new Array,u=0;u=1){for(var w=new Array,u=0;u=i.width+i.left||n.width>i.width)&&(e.style.width="auto",e.style.width=e.clientWidth+"px")},t.prototype.clearTextLayers=function(){var t=this.pdfViewerBase.currentPageNumber-3;t=t>0?t:0;var e=this.pdfViewerBase.currentPageNumber+1;e=e1||1===o.childNodes.length&&"SPAN"===o.childNodes[0].tagName)&&(o.textContent="",o.textContent=s)}}},t.prototype.setStyleToTextDiv=function(t,e,i,n,o,s){t.style.left=e*this.pdfViewerBase.getZoomFactor()+"px",t.style.top=i*this.pdfViewerBase.getZoomFactor()+"px";var a=s*this.pdfViewerBase.getZoomFactor();t.style.height=a+"px",t.style.fontSize=s*this.pdfViewerBase.getZoomFactor()+"px"},t.prototype.getTextSelectionStatus=function(){return!!this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.isTextSelection},t.prototype.modifyTextCursor=function(t){for(var e=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+'_textLayer_"]'),i=0;it.focusOffset||e===Node.DOCUMENT_POSITION_PRECEDING)&&(i=!0),i},t.prototype.getPageIndex=function(t){var e=t.parentElement;return e||(e=t.parentNode),"e-pv-text-layer"===e.className?parseInt(t.id.split("_text_")[1]):parseInt(e.id.split("_text_")[1])},t.prototype.getTextIndex=function(t,e){var i=t.parentElement;return i||(i=t.parentNode),"e-pv-text-layer"===i.className?parseInt(t.id.split("_text_"+e+"_")[1]):parseInt(i.id.split("_text_"+e+"_")[1])},t.prototype.getPreviousZoomFactor=function(){return this.pdfViewer.magnificationModule?this.pdfViewer.magnificationModule.previousZoomFactor:1},t.prototype.getTextSearchStatus=function(){return!!this.pdfViewer.textSearchModule&&this.pdfViewer.textSearchModule.isTextSearch},t.prototype.createNotificationPopup=function(t){var i=this;if(!this.isMessageBoxOpen)if(e.isBlazor()){var n=document.getElementById(this.pdfViewer.element.id+"_notification_popup_content");n&&(n.textContent=t,n.innerHTML=t),this.pdfViewer.textSearchModule&&(this.pdfViewer.textSearch.isMessagePopupOpened=!1),this.pdfViewer._dotnetInstance.invokeMethodAsync("OpenNotificationPopup")}else{var s=e.createElement("div",{id:this.pdfViewer.element.id+"_notify",className:"e-pv-notification-popup"});this.pdfViewerBase.viewerContainer.appendChild(s),this.notifyDialog=new o.Dialog({showCloseIcon:!0,closeOnEscape:!1,isModal:!0,header:this.pdfViewer.localeObj.getConstant("PdfViewer"),buttons:[{buttonModel:{content:this.pdfViewer.localeObj.getConstant("OK"),isPrimary:!0},click:this.closeNotification.bind(this)}],content:'
'+t+"
",target:this.pdfViewer.element,beforeClose:function(){if(i.notifyDialog.destroy(),i.pdfViewer.element)try{i.pdfViewer.element.removeChild(s)}catch(t){s.parentElement.removeChild(s)}i.pdfViewer.textSearchModule&&(i.pdfViewer.textSearch.isMessagePopupOpened=!1),i.isMessageBoxOpen=!1}}),this.pdfViewer.enableRtl&&(this.notifyDialog.enableRtl=!0),this.notifyDialog.appendTo(s),this.isMessageBoxOpen=!0}},t}(),Ke=function(){function i(t,e){this.copyContextMenu=[],this.pdfViewer=t,this.pdfViewerBase=e,this.copyContextMenu=[{text:this.pdfViewer.localeObj.getConstant("Cut"),iconCss:"e-pv-cut-icon"},{text:this.pdfViewer.localeObj.getConstant("Copy"),iconCss:"e-pv-copy-icon"},{text:this.pdfViewer.localeObj.getConstant("Highlight context"),iconCss:"e-pv-highlight-icon"},{text:this.pdfViewer.localeObj.getConstant("Underline context"),iconCss:"e-pv-underline-icon"},{text:this.pdfViewer.localeObj.getConstant("Strikethrough context"),iconCss:"e-pv-strikethrough-icon"},{text:this.pdfViewer.localeObj.getConstant("Paste"),iconCss:"e-pv-paste-icon"},{text:this.pdfViewer.localeObj.getConstant("Delete Context"),iconCss:"e-pv-delete-icon"},{text:this.pdfViewer.localeObj.getConstant("Scale Ratio"),iconCss:"e-pv-scale-ratio-icon"},{separator:!0,id:t.element.id+"_context_menu_comment_separator"},{text:this.pdfViewer.localeObj.getConstant("Comment"),iconCss:"e-pv-comment-icon"},{separator:!0,id:t.element.id+"_context_menu_separator"},{text:this.pdfViewer.localeObj.getConstant("Properties")}]}return i.prototype.createContextMenu=function(){this.contextMenuElement=e.createElement("ul",{id:this.pdfViewer.element.id+"_context_menu",className:"e-pv-context-menu"}),this.pdfViewer.element.appendChild(this.contextMenuElement),this.contextMenuObj=new r.ContextMenu({target:"#"+this.pdfViewerBase.viewerContainer.id,items:this.copyContextMenu,beforeOpen:this.contextMenuOnBeforeOpen.bind(this),select:this.onMenuItemSelect.bind(this),created:this.contextMenuOnCreated.bind(this)}),this.pdfViewer.enableRtl&&(this.contextMenuObj.enableRtl=!0),this.contextMenuObj.appendTo(this.contextMenuElement),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.contextMenuObj.animationSettings.effect="ZoomIn":this.contextMenuObj.animationSettings.effect="SlideDown"},i.prototype.contextMenuOnCreated=function(t){var e=[this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context")];this.pdfViewer.annotationModule?this.pdfViewer.annotationModule.textMarkupAnnotationModule||this.contextMenuObj.enableItems(e,!1):this.contextMenuObj.enableItems(e,!1)},i.prototype.setTarget=function(t){var e=null;return t.event&&t.event.target&&(e=t.event.target,this.currentTarget=e),e},i.prototype.contextMenuOnBeforeOpen=function(t){var i=this.setTarget(t);if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule.isInuptBoxInFocus&&i&&"free-text-input"===i.className&&"TEXTAREA"===i.tagName&&(this.pdfViewerBase.isFreeTextContextMenu=!0),this.contextMenuObj.showItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Copy"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Scale Ratio"),this.pdfViewer.localeObj.getConstant("Comment"),this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.remove("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.remove("e-menu-hide"),this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Copy"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Delete Context")],!0),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.checkContextMenuDeleteItem(this.contextMenuObj),this.pdfViewer.textSelectionModule||this.pdfViewerBase.isShapeBasedAnnotationsEnabled()){if(t.event){var n=this.pdfViewerBase.isClickWithinSelectionBounds(t.event);this.pdfViewerBase.isFreeTextContextMenu?(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context"),this.pdfViewer.localeObj.getConstant("Properties"),this.pdfViewer.localeObj.getConstant("Comment"),this.pdfViewer.localeObj.getConstant("Scale Ratio"),this.pdfViewer.localeObj.getConstant("Delete Context")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.add("e-menu-hide"),this.pdfViewer.annotation.freeTextAnnotationModule&&this.pdfViewer.annotation.freeTextAnnotationModule.isTextSelected?(this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Copy")],!0),this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Cut")],!0)):(this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Copy")],!1),this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Cut")],!1),window.getSelection().removeAllRanges()),this.pdfViewer.annotation.freeTextAnnotationModule&&""!==this.pdfViewer.annotation.freeTextAnnotationModule.selectedText?this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Paste")],!0):this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Paste")],!1)):n&&this.pdfViewer.textSelectionModule?(!t.event.target.classList.contains("e-pv-maintaincontent")&&t.event.target.classList.contains("e-pv-text")||t.event.target.classList.contains("e-pv-text-layer")?this.pdfViewerBase.checkIsNormalText()&&(t.cancel=!0):(e.Browser.isIE||"edge"===e.Browser.info.name)&&t.event.target.classList.contains("e-pv-page-container")&&(t.cancel=!0),this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Scale Ratio"),this.pdfViewer.localeObj.getConstant("Comment"),this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.add("e-menu-hide")):0!==this.pdfViewer.selectedItems.annotations.length&&"HandWrittenSignature"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.onOpeningForShape(!1,!0):0!==this.pdfViewer.selectedItems.annotations.length&&"Path"!==this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.onOpeningForShape(!0):this.pdfViewer.annotation&&this.pdfViewer.annotation.isShapeCopied&&(t.event.target.classList.contains("e-pv-text-layer")||t.event.target.classList.contains("e-pv-text"))&&!this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?this.onOpeningForShape(!1):this.pdfViewerBase.isCalibrateAnnotationModule()&&this.pdfViewer.annotationModule.measureAnnotationModule.currentAnnotationMode?(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context"),this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.remove("e-menu-hide"),this.contextMenuObj.enableItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Copy"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Comment")],!1)):this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation?(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Highlight context"),this.pdfViewer.localeObj.getConstant("Underline context"),this.pdfViewer.localeObj.getConstant("Strikethrough context"),this.pdfViewer.localeObj.getConstant("Properties"),this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Copy"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Scale Ratio")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.remove("e-menu-hide"),this.contextMenuObj.showItems([this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Comment")],!1)):t.cancel=!0}else this.pdfViewer.textSelectionModule&&"MouseUp"===this.pdfViewer.contextMenuOption?(this.contextMenuObj.hideItems([this.pdfViewer.localeObj.getConstant("Cut"),this.pdfViewer.localeObj.getConstant("Paste"),this.pdfViewer.localeObj.getConstant("Delete Context"),this.pdfViewer.localeObj.getConstant("Scale Ratio"),this.pdfViewer.localeObj.getConstant("Comment"),this.pdfViewer.localeObj.getConstant("Properties")]),this.pdfViewerBase.getElement("_context_menu_separator").classList.add("e-menu-hide"),this.pdfViewerBase.getElement("_context_menu_comment_separator").classList.add("e-menu-hide")):this.hideContextItems();this.enableCommentPanelItem()}else t.cancel=!0;"None"===this.pdfViewer.contextMenuOption?t.cancel=!0:this.contextMenuItems(t),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.restrictContextMenu()&&(t.cancel=!0)},i.prototype.contextMenuItems=function(e){if(this.pdfViewer.contextMenuSettings.contextMenuItems.length){for(var i=[],n=this.contextMenuObj.getRootElement(),o=0;o0&&r===t.ContextMenuItem[this.pdfViewer.contextMenuSettings.contextMenuItems[o]]){"Strikethrough"===r&&(r="Strike through"),"ScaleRatio"===r&&(r="Scale Ratio");for(var l=0;l0&&(i=e.resendRequest(e,t)),i||e.stateChange(e)},this.httpRequest.onerror=function(){e.error(e)}},t.prototype.resendRequest=function(t,e){var i=!1,n=t.httpRequest.status,o=n.toString().split("")[0];if(4===t.httpRequest.readyState&&200===n){var s=void 0;if((s=null!==this.responseType?t.httpRequest.response:t.httpRequest.responseText)&&"object"!=typeof s)try{s=JSON.parse(s)}catch(t){"Document stream does not exist in the cache"!==s&&"Document Reference pointer does not exist in the cache"!==s||(i=!0)}}return("5"===o||i)&&(i=!0,this.retryCount--,t.pdfViewer.fireAjaxRequestFailed(n,t.httpRequest.statusText,e.action,!0),t.send(e)),i},t.prototype.sendRequest=function(t){this.httpRequest.open(this.type,this.url,this.mode),this.httpRequest.withCredentials=this.pdfViewer.ajaxRequestSettings.withCredentials,this.httpRequest.setRequestHeader("Content-Type",this.contentType),t=this.addExtraData(t),this.setCustomAjaxHeaders(),null!==this.responseType&&(this.httpRequest.responseType=this.responseType),this.httpRequest.send(JSON.stringify(t))},t.prototype.addExtraData=function(t){return this.pdfViewer.viewerBase.ajaxData="",this.pdfViewer.fireAjaxRequestInitiate(t),this.pdfViewer.viewerBase.ajaxData&&""!==this.pdfViewer.viewerBase.ajaxData&&(t=this.pdfViewer.viewerBase.ajaxData),t},t.prototype.stateChange=function(t){var e=t.httpRequest.status,i=e.toString().split("")[0];if(4===t.httpRequest.readyState&&200===e){var n=void 0,o={name:"onSuccess",data:n=null!==this.responseType?t.httpRequest.response:t.httpRequest.responseText,readyState:t.httpRequest.readyState,status:t.httpRequest.status};t.successHandler(o)}else if(4===t.httpRequest.readyState&&("4"===i||"5"===i)){o={name:"onFailure",status:t.httpRequest.status,statusText:t.httpRequest.statusText};t.failureHandler(o)}},t.prototype.error=function(t){var e={name:"onError",status:this.httpRequest.status,statusText:this.httpRequest.statusText};t.errorHandler(e)},t.prototype.successHandler=function(t){return this.onSuccess&&this.onSuccess(t),t},t.prototype.failureHandler=function(t){return this.onFailure&&this.onFailure(t),t},t.prototype.errorHandler=function(t){return this.onError&&this.onError(t),t},t.prototype.setCustomAjaxHeaders=function(){for(var t=0;t750?(s.width=715,s.style.width="715px"):(s.width=this.pdfViewer.element.offsetWidth-35,s.style.width=s.width+"px"),s.height=335,s.style.height="335px",s.style.border="1px dotted #bdbdbd",s.style.backgroundColor="white",s.addEventListener("mousedown",this.signaturePanelMouseDown.bind(this)),s.addEventListener("mousemove",this.signaturePanelMouseMove.bind(this)),s.addEventListener("mouseup",this.signaturePanelMouseUp.bind(this)),s.addEventListener("mouseleave",this.signaturePanelMouseUp.bind(this)),s.addEventListener("touchstart",this.signaturePanelMouseDown.bind(this)),s.addEventListener("touchmove",this.signaturePanelMouseMove.bind(this)),s.addEventListener("touchend",this.signaturePanelMouseUp.bind(this)),o.appendChild(s);var a;if(!this.pdfViewer.hideSaveSignature){var l=document.createElement("input");l.type="checkbox",l.id="checkbox",o.appendChild(l),(a=new u.CheckBox({label:this.pdfViewer.localeObj.getConstant("Save Signature"),disabled:!1,checked:!1})).appendTo(l)}if(this.isSaveSignature&&(a.checked=!0),this.pdfViewerBase.isToolbarSignClicked)return o;var M=e.createElement("div",{id:this.pdfViewer.element.id+"type_appearance",className:"e-pv-signature-apperance"}),L=document.createElement("input");L.type="text",L.id=this.pdfViewer.element.id+"_e-pv-Signtext-box",M.appendChild(L),new n.TextBox({placeholder:this.pdfViewer.localeObj.getConstant("Enter Signature as Name"),floatLabelType:"Auto"}).appendTo(L);var d=e.createElement("div",{id:this.pdfViewer.element.id+"_font_appearance"});d.style.width="715px",d.style.height="270px",d.style.border="1px dotted #bdbdbd",d.style.backgroundColor="white",M.appendChild(d);var w=e.createElement("div",{id:this.pdfViewer.element.id+"Signature_tab"}),h=e.createElement("div",{id:this.pdfViewer.element.id+"upload_appearance"});h.style.width="715px",h.style.height="335px",h.style.border="1px dotted #bdbdbd",h.style.backgroundColor="white";var p=document.createElement("div");p.id=this.pdfViewer.element.id+"_e-pv-upload-button",h.appendChild(p);var c=new u.Button({cssClass:"e-pv-sign-upload",content:this.pdfViewer.localeObj.getConstant("Browse Signature Image")});c.appendTo(p),c.element.style.position="absolute",c.element.style.left=parseFloat(h.style.width)/2-50+"px",c.element.style.top=parseFloat(h.style.height)/2+"px";var C=e.createElement("canvas",{id:this.pdfViewer.element.id+"_signatureuploadCanvas_",className:"e-pv-signature-uploadcanvas"});this.pdfViewer.element.offsetWidth>750?(C.width=715,C.style.width="715px"):(C.width=this.pdfViewer.element.offsetWidth-35,C.style.width=s.width+"px"),C.height=335,C.style.height="335px",C.style.border="1px dotted #bdbdbd",C.style.backgroundColor="white",C.style.zIndex="0",h.appendChild(C),this.signfontStyle=[{FontName:"Helvetica"},{FontName:"Times New Roman"},{FontName:"Courier"},{FontName:"Symbol"}];for(var j=[],g=0;g=M&&(n=M),o>=L&&(o=L),s<=M&&(s=M),a<=L&&(a=L)}}var d=s-n,w=a-o,h=document.createElement("canvas"),p=d/100,c=w/100,C=0,j=0;t?(h.width=e.currentWidth,h.height=e.currentHeight,p=d/t.width,c=w/t.height,C=t.x-e.currentLeft,j=t.y-e.currentTop):(h.width=100,h.height=100);var g=h.getContext("2d");g.beginPath();for(var y=0;y750?(t.width=715,t.style.width="715px"):(t.width=this.pdfViewer.element.offsetWidth-35,t.style.width=t.width+"px"))},t.prototype.signaturePanelMouseDown=function(t){"contextmenu"!==t.type&&(t.preventDefault(),this.findMousePosition(t),this.mouseDetection=!0,this.oldX=this.mouseX,this.oldY=this.mouseY,this.newObject=[],this.enableCreateButton(!1),this.drawMousePosition(t))},t.prototype.enableCreateButton=function(t){var e=document.getElementsByClassName("e-pv-createbtn")[0];e&&(e.disabled=t),this.enableClearbutton(t)},t.prototype.enableClearbutton=function(t){var e=document.getElementsByClassName("e-pv-clearbtn")[0];e&&(e.disabled=t)},t.prototype.signaturePanelMouseMove=function(t){this.mouseDetection&&(this.findMousePosition(t),this.drawMousePosition(t))},t.prototype.findMousePosition=function(t){if(-1!==t.type.indexOf("touch")){var e=(t=t).target.getBoundingClientRect();this.mouseX=t.touches[0].pageX-e.left,this.mouseY=t.touches[0].pageY-e.top}else t=t,this.mouseX=t.offsetX,this.mouseY=t.offsetY},t.prototype.drawMousePosition=function(t){this.mouseDetection&&(this.drawSignatureInCanvas(),this.oldX=this.mouseX,this.oldY=this.mouseY)},t.prototype.drawSignatureInCanvas=function(){var t=document.getElementById(this.pdfViewer.element.id+"_signatureCanvas_").getContext("2d");t.beginPath(),t.moveTo(this.oldX,this.oldY),t.lineTo(this.mouseX,this.mouseY),t.stroke(),t.lineWidth=2,t.arc(this.oldX,this.oldY,1,0,2*Math.PI,!0),t.closePath(),this.newObject.push(this.mouseX,this.mouseY)},t.prototype.signaturePanelMouseUp=function(){this.mouseDetection&&this.convertToPath(this.newObject),this.mouseDetection=!1},t.prototype.convertToPath=function(t){this.movePath(t[0],t[1]),this.linePath(t[0],t[1]);for(var e=2;el;l++){var u=r.annotations[l].strokeColor;r.annotations[l].strokeColor=JSON.stringify(this.getRgbCode(u)),r.annotations[l].bounds=JSON.stringify(this.pdfViewer.annotation.getBounds(r.annotations[l].bounds,r.pageIndex));var M=i.processPathData(r.annotations[l].data),L=i.splitArrayCollection(M);r.annotations[l].data=JSON.stringify(L)}a=r.annotations}e[r.pageIndex]=a}return JSON.stringify(e)},t.prototype.getRgbCode=function(t){t.match(/#([a-z0-9]+)/gi)||t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/)||(t=this.pdfViewer.annotationModule.nameToHash(t));var i=t.split(",");return e.isNullOrUndefined(i[1])&&(i=(t=this.pdfViewer.annotationModule.getValue(t,"rgba")).split(",")),{r:parseInt(i[0].split("(")[1]),g:parseInt(i[1]),b:parseInt(i[2]),a:parseInt(i[3])}},t.prototype.renderSignature=function(t,e){var i,n=this.pdfViewerBase.currentSignatureAnnot,o=this.pdfViewer.annotation.createGUID();if(n){i={id:n.id,bounds:{x:t,y:e,width:n.bounds.width,height:n.bounds.height},pageIndex:n.pageIndex,data:n.data,shapeAnnotationType:"HandWrittenSignature",opacity:n.opacity,strokeColor:n.strokeColor,thickness:n.thickness,signatureName:o},this.pdfViewer.add(i);var s=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+n.pageIndex);this.pdfViewer.renderDrawing(s,n.pageIndex),this.pdfViewerBase.signatureAdded=!0,this.pdfViewer.fireSignatureAdd(n.pageIndex,n.signatureName,n.shapeAnnotationType,n.bounds,n.opacity,n.strokeColor,n.thickness),this.storeSignatureData(n.pageIndex,i),this.pdfViewerBase.currentSignatureAnnot=null,this.pdfViewerBase.signatureCount++}},t.prototype.renderExistingSignature=function(t,e,n){for(var o,s=0;s400&&(t=400),this.fitType=null,this.isNotPredefinedZoom=!1,this.isAutoZoom&&this.isInitialLoading?this.pdfViewerBase.onWindowResize():(this.isAutoZoom=!1,this.onZoomChanged(t)),this.isInitialLoading=!1},t.prototype.zoomIn=function(){(this.fitType||this.isNotPredefinedZoom)&&(this.zoomLevel=this.lowerZoomLevel,this.fitType=null),this.isNotPredefinedZoom=!1,this.zoomLevel>=8?this.zoomLevel=8:this.zoomLevel++,this.isAutoZoom=!1,this.onZoomChanged(this.zoomPercentages[this.zoomLevel])},t.prototype.zoomOut=function(){(this.fitType||this.isNotPredefinedZoom)&&(this.zoomLevel=this.higherZoomLevel,this.fitType=null),this.isNotPredefinedZoom=!1,this.zoomLevel<=0?this.zoomLevel=0:this.zoomLevel--,this.isAutoZoom=!1,this.onZoomChanged(this.zoomPercentages[this.zoomLevel])},t.prototype.fitToWidth=function(){this.isAutoZoom=!1;var t=this.calculateFitZoomFactor("fitToWidth");this.onZoomChanged(t)},t.prototype.fitToAuto=function(){this.isAutoZoom=!0;var t=this.calculateFitZoomFactor("fitToWidth");this.onZoomChanged(t)},t.prototype.fitToPage=function(){var t=this.calculateFitZoomFactor("fitToPage");null!==t&&(this.isAutoZoom=!1,this.onZoomChanged(t),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.isWebkitMobile?this.pdfViewerBase.viewerContainer.style.overflowY="auto":this.pdfViewerBase.viewerContainer.style.overflowY="hidden":this.pdfViewerBase.viewerContainer.style.overflowY="auto",this.pdfViewerBase.viewerContainer.scrollTop=this.pdfViewerBase.pageSize[this.pdfViewerBase.currentPageNumber-1].top*this.zoomFactor)},t.prototype.calculateFitZoomFactor=function(t){var e=this.pdfViewerBase.viewerContainer.getBoundingClientRect().width,i=this.pdfViewerBase.viewerContainer.getBoundingClientRect().height;if(0===e&&0===i&&(e=parseFloat(this.pdfViewer.width.toString()),i=parseFloat(this.pdfViewer.height.toString())),isNaN(i)||isNaN(e))return null;if(this.fitType=t,"fitToWidth"===this.fitType){n=(e-this.scrollWidth)/this.pdfViewerBase.highestWidth;return this.isAutoZoom&&(this.fitType=null,1===(n=Math.min(1,n))&&(this.zoomLevel=2)),parseInt((100*n).toString())}this.isFitToPageMode=!0;var n=(e-this.scrollWidth-10)/this.pdfViewerBase.highestWidth,o=i/this.pdfViewerBase.highestHeight;return o>n&&(o=n,this.isFitToPageMode=!1),parseInt((100*o).toString())},t.prototype.pinchIn=function(){this.fitType=null;var t=this.zoomFactor-this.pinchStep;if(t<4&&t>2&&(t=this.zoomFactor-this.pinchStep),t<.1&&(t=.1),this.isPinchZoomed=!0,this.onZoomChanged(100*t),this.isTapToFitZoom=!0,e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&100*this.zoomFactor==50){var i=this.calculateFitZoomFactor("fitToWidth");this.fitType=null,i<=50&&this.fitToWidth()}},t.prototype.pinchOut=function(){this.fitType=null;var t=this.zoomFactor+this.pinchStep;e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?t>2&&(t=2):(t>2&&(t+=this.pinchStep),t>4&&(t=4)),this.isTapToFitZoom=!0,this.isPinchZoomed=!0,this.onZoomChanged(100*t)},t.prototype.getZoomLevel=function(t){for(var e=0,i=this.zoomPercentages.length-1;e<=i&&(0!==e||0!==i);){var n=Math.round((e+i)/2);this.zoomPercentages[n]<=t?e=n+1:this.zoomPercentages[n]>=t&&(i=n-1)}return this.higherZoomLevel=e,this.lowerZoomLevel=i,i},t.prototype.checkZoomFactor=function(){return this.zoomPercentages.indexOf(100*this.zoomFactor)>-1},t.prototype.onZoomChanged=function(t){if(t&&(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.closePopupMenu(),this.previousZoomFactor=this.zoomFactor,this.zoomLevel=this.getZoomLevel(t),this.zoomFactor=this.getZoomFactor(t),this.zoomFactor<=.25?this.pdfViewerBase.isMinimumZoom=!0:this.pdfViewerBase.isMinimumZoom=!1,e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.isWebkitMobile?this.pdfViewerBase.viewerContainer.style.overflowY="auto":this.pdfViewerBase.viewerContainer.style.overflowY="hidden":this.pdfViewerBase.viewerContainer.style.overflowY="auto",this.pdfViewerBase.pageCount>0&&(this.previousZoomFactor!==this.zoomFactor&&(this.isPinchZoomed?(e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(this.pdfViewerBase.mobilePageNoContainer.style.left=this.pdfViewer.element.clientWidth/2-parseFloat(this.pdfViewerBase.mobilePageNoContainer.style.width)/2+"px"),this.responsivePages()):this.magnifyPages()),e.isBlazor()||this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.updateZoomButtons(),this.isInitialLoading||this.previousZoomFactor!==this.zoomFactor&&(this.pdfViewer.zoomValue=parseInt((100*this.zoomFactor).toString()),this.pdfViewer.fireZoomChange())),this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.updateZoomPercentage(this.zoomFactor),this.isInitialLoading||this.previousZoomFactor!==this.zoomFactor&&(this.pdfViewer.zoomValue=parseInt((100*this.zoomFactor).toString()),this.pdfViewer.fireZoomChange()),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.isPinchZoomed)){var i=parseInt((100*this.zoomFactor).toString())+"%";this.pdfViewerBase.navigationPane.createTooltipMobile(i)}},t.prototype.setTouchPoints=function(t,e){this.touchCenterX=t,this.touchCenterY=e},t.prototype.initiatePinchMove=function(t,e,i,n){this.isPinchScrolled=!1,this.isMagnified=!1,this.reRenderPageNumber=this.pdfViewerBase.currentPageNumber,this.touchCenterX=(t+i)/2,this.touchCenterY=(e+n)/2,this.zoomOverPages(t,e,i,n)},t.prototype.magnifyPages=function(){this.clearRerenderTimer(),this.isPagesZoomed||(this.reRenderPageNumber=this.pdfViewerBase.currentPageNumber),this.pdfViewerBase.documentLoaded||this.pdfViewerBase.isInitialPageMode||(this.isPagesZoomed=!0);var t=this.getMagnifiedValue(this.pdfViewerBase.viewerContainer.scrollTop);this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.maintainSelectionOnZoom(!1,!0),this.isInitialLoading||(this.isMagnified=!0),this.updatePageLocation(),this.resizeCanvas(this.reRenderPageNumber),this.pdfViewer.textSelectionModule&&this.pdfViewer.textSelectionModule.resizeTouchElements();var e=this.pdfViewer.annotationModule;if(e&&e.textMarkupAnnotationModule&&this.pdfViewer.annotationModule.textMarkupAnnotationModule.updateCurrentResizerPosition(),this.pdfViewerBase.pageSize.length>0){this.pdfViewerBase.pageContainer.style.height=this.topValue+this.pdfViewerBase.getPageHeight(this.pdfViewerBase.pageSize.length-1)+"px";var i=this;this.pdfViewerBase.renderedPagesList=[],this.pdfViewerBase.pinchZoomStorage=[],this.pdfViewerBase.viewerContainer.scrollTop=t,this.pdfViewerBase.documentLoaded||(this.magnifyPageRerenderTimer=setTimeout(function(){i.rerenderMagnifiedPages()},800))}},t.prototype.updatePageLocation=function(){this.topValue=0;for(var t=1;t0?e:0,i=i0?e:0,i=i0&&this.pdfViewerBase.reRenderedCount++},t.prototype.resizeCanvas=function(t){if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var e=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(e)}var n=t-3,o=t+3;this.pdfViewerBase.isMinimumZoom&&(n=t-4,o=t+4),n=n>0?n:0,o=o0?a.style.width=this.pdfViewerBase.highestWidth*this.zoomFactor+"px":a.style.width=u+"px",a.style.height=M+"px",a.style.top=this.pdfViewerBase.pageSize[s].top*this.zoomFactor+"px",this.pdfViewer.enableRtl?a.style.right=this.pdfViewerBase.updateLeftPosition(s)+"px":a.style.left=this.pdfViewerBase.updateLeftPosition(s)+"px";var L=this.pdfViewerBase.getElement("_pageCanvas_"+s);if(L&&(L.style.width=u+"px",L.style.height=M+"px",this.pdfViewer.annotation&&this.pdfViewer.annotationModule.resizeAnnotations(u,M,s)),r){if(r.style.width=u+"px",r.style.height=M+"px",this.pdfViewer.textSelectionModule)if(this.isPinchZoomed)r.style.display="none";else if(this.isMagnified){var d=t-2==0?0:t-2,w=t===this.pdfViewerBase.pageCount?this.pdfViewerBase.pageCount-1:t+1;d<=s&&s<=w&&(this.pdfViewer.textSelectionModule.isTextSelection&&l||this.pdfViewerBase.textLayer.getTextSearchStatus()||this.pdfViewerBase.isInitialPageMode)?(this.pdfViewerBase.textLayer.resizeTextContentsOnZoom(s),this.pdfViewer.textSelectionModule.isTextSelection&&l&&this.pdfViewer.textSelectionModule.applySelectionRangeOnScroll(s)):r.style.display="none"}else r.style.display="none";this.pdfViewerBase.applyElementStyles(r,s)}var h=i.getDiagramElement(this.pdfViewer.element.id+"_textLayer_"+s);if(h){var p=i.getDiagramElement(this.pdfViewer.element.id+s+"_diagramAdorner_svg");p&&(p.style.width=u+"px",p.style.height=M+"px");var c=i.getDiagramElement(this.pdfViewer.element.id+s+"_diagramAdornerLayer");c&&(c.style.width=u+"px",c.style.height=M+"px"),h.style.width=u+"px",h.style.height=M+"px",this.pdfViewer.renderSelector(s,this.pdfViewer.annotationSelectorSettings),this.pdfViewerBase.applyElementStyles(c,s)}}}}},t.prototype.zoomOverPages=function(t,e,i,n){var o=Math.sqrt(Math.pow(t-i,2)+Math.pow(e-n,2));this.previousTouchDifference>-1&&(o>this.previousTouchDifference?this.pinchOut():o0?this.downwardScrollFitPage(this.pdfViewerBase.currentPageNumber-1):this.upwardScrollFitPage(this.pdfViewerBase.currentPageNumber-1))},t.prototype.magnifyBehaviorKeyDown=function(t){var e=!!!!navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i)&&t.metaKey;switch(t.keyCode){case 38:case 37:case 33:"fitToPage"!==this.fitType||(t.ctrlKey||e)&&t.shiftKey||(t.preventDefault(),this.upwardScrollFitPage(this.pdfViewerBase.currentPageNumber-1));break;case 40:case 39:case 34:"fitToPage"!==this.fitType||(t.ctrlKey||e)&&t.shiftKey||(t.preventDefault(),this.downwardScrollFitPage(this.pdfViewerBase.currentPageNumber-1));break;case 187:(t.ctrlKey||e)&&(t.preventDefault(),this.zoomIn());break;case 189:(t.ctrlKey||e)&&(t.preventDefault(),this.zoomOut());break;case 48:!t.ctrlKey&&!e||t.shiftKey||(t.preventDefault(),this.fitToPage());break;case 49:!t.ctrlKey&&!e||t.shiftKey||(t.preventDefault(),this.zoomTo(100))}},t.prototype.upwardScrollFitPage=function(t){t>0&&(this.pdfViewerBase.getElement("_pageDiv_"+(t-1)).style.visibility="visible",this.pdfViewerBase.viewerContainer.scrollTop=this.pdfViewerBase.pageSize[t-1].top*this.zoomFactor,this.isFitToPageMode&&(this.pdfViewerBase.getElement("_pageDiv_"+t).style.visibility="hidden"))},t.prototype.updatePagesForFitPage=function(t){"fitToPage"===this.fitType&&this.isFitToPageMode&&(t>0&&this.pdfViewerBase.getElement("_pageDiv_"+(t-1))&&(this.pdfViewerBase.getElement("_pageDiv_"+(t-1)).style.visibility="hidden"),t0&&this.pdfViewerBase.updateScrollTop(this.pageNumber-1)},t.prototype.goToPage=function(t){t>0&&t<=this.pdfViewerBase.pageCount&&this.pdfViewerBase.currentPageNumber!==t&&this.pdfViewerBase.updateScrollTop(t-1),this.pdfViewer.magnificationModule.resizeCanvas(t);var e=document.getElementById(this.pdfViewer.element.id+"_textLayer_"+(t-1));e&&(e.style.display="block")},t.prototype.goToFirstPage=function(){this.pageNumber=0,this.pdfViewerBase.updateScrollTop(this.pageNumber)},t.prototype.goToLastPage=function(){this.pageNumber=this.pdfViewerBase.pageCount-1,this.pdfViewerBase.updateScrollTop(this.pageNumber)},t.prototype.destroy=function(){this.pageNumber=0},t.prototype.getModuleName=function(){return"Navigation"},t}(),ii=function(){function t(t,e){var i=this;this.thumbnailLimit=30,this.thumbnailThreshold=50,this.thumbnailTopMargin=10,this.isThumbnailClicked=!1,this.thumbnailClick=function(t){var e=i,n=e.getPageNumberFromID(t.srcElement.id);if(e.previousElement&&(e.previousElement.classList.remove("e-pv-thumbnail-selection"),e.previousElement.classList.remove("e-pv-thumbnail-focus"),e.previousElement.classList.add("e-pv-thumbnail-selection-ring")),t.srcElement.parentElement.id===e.pdfViewer.element.id+"_thumbnail_Selection_Ring_"+n?(e.setSelectionStyle(t.srcElement.parentElement),e.previousElement=t.srcElement.parentElement):t.srcElement.id===e.pdfViewer.element.id+"_thumbnail_Selection_Ring_"+n&&(e.setSelectionStyle(t.srcElement),e.previousElement=t.srcElement),e.pdfViewer.fireThumbnailClick(n+1),e.isThumbnailClicked=!0,e.goToThumbnailPage(n+1),e.pdfViewerBase.focusViewerContainer(),i.pdfViewer.annotationModule&&i.pdfViewer.annotationModule.inkAnnotationModule){var o=parseInt(i.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);i.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(o)}},this.thumbnailMouseOver=function(t){var e=i,n=e.getPageNumberFromID(t.srcElement.id);t.srcElement.id===e.pdfViewer.element.id+"_thumbnail_Selection_Ring_"+n?e.setMouseOverStyle(t.srcElement):t.srcElement.id===e.pdfViewer.element.id+"_thumbnail_image_"+n&&e.setMouseOverStyle(t.srcElement.parentElement)},this.thumbnailMouseLeave=function(t){var e=i,n=e.getPageNumberFromID(t.srcElement.id);t.srcElement.parentElement.id===e.pdfViewer.element.id+"_thumbnail_view"?e.setMouseLeaveStyle(t.srcElement.children[0].children[0]):t.srcElement.parentElement.id===e.pdfViewer.element.id+"_thumbnail_"+n&&e.setMouseLeaveStyle(t.srcElement.parentElement.children[0])},this.pdfViewer=t,this.pdfViewerBase=e}return t.prototype.createThumbnailContainer=function(){this.thumbnailView=e.createElement("div",{id:this.pdfViewer.element.id+"_thumbnail_view",className:"e-pv-thumbnail-view e-pv-thumbnail-row"}),this.pdfViewerBase.navigationPane.sideBarContent.appendChild(this.thumbnailView)},t.prototype.openThumbnailPane=function(){this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.openThumbnailPane()},t.prototype.createRequestForThumbnails=function(){var t=this;return!!document.documentMode?(this.requestCreation(t),null):new Promise(function(e,i){t.requestCreation(t)})},t.prototype.requestCreation=function(t){t.isThumbnailCompleted?(t.startIndex=t.thumbnailLimit,t.thumbnailLimit=t.startIndex+t.thumbnailThreshold0){var o=this.getPageNumberFromID(i.first.id),s=n>1?this.getPageNumberFromID(i.last.id):o;t<=o||t>=s?e=!0:i.views.some(function(i){var n=i.id.split("_"),o=n[n.length-1];return parseInt(o)===t&&(e=i.percent<100,!0)})}}return e},t.prototype.getPageNumberFromID=function(t){var e=t.split("_"),i=e[e.length-1];return parseInt(i)},t.prototype.setFocusStyle=function(t,e){t.children[0].id===this.pdfViewer.element.id+"_thumbnail_Selection_Ring_"+e&&this.setMouseFocusStyle(t.children[0])},t.prototype.renderThumbnailImage=function(t){if(this.thumbnailView)for(var i=t&&isNaN(t.startPage)?t.startPage:this.startIndex,n=t&&isNaN(t.endPage)?t.endPage:this.thumbnailLimit,o=i;o0&&t<=this.pdfViewerBase.pageCount&&this.pdfViewerBase.currentPageNumber!==t?this.pdfViewerBase.updateScrollTop(t-1):this.isThumbnailClicked=!1},t.prototype.setSelectionStyle=function(t){t.classList.remove("e-pv-thumbnail-selection-ring"),t.classList.remove("e-pv-thumbnail-hover"),t.classList.remove("e-pv-thumbnail-focus"),t.classList.add("e-pv-thumbnail-selection")},t.prototype.setMouseOverStyle=function(t){t.classList.contains("e-pv-thumbnail-selection")||(t.classList.remove("e-pv-thumbnail-selection-ring"),t.classList.contains("e-pv-thumbnail-focus")||t.classList.add("e-pv-thumbnail-hover"))},t.prototype.setMouseLeaveStyle=function(t){t.classList.contains("e-pv-thumbnail-selection")?t.classList.contains("e-pv-thumbnail-selection")||(t.classList.remove("e-pv-thumbnail-selection"),t.classList.add("e-pv-thumbnail-focus")):(t.classList.contains("e-pv-thumbnail-focus")||t.classList.add("e-pv-thumbnail-selection-ring"),t.classList.remove("e-pv-thumbnail-hover"))},t.prototype.setMouseFocusStyle=function(t){t.classList.remove("e-pv-thumbnail-selection"),t.classList.remove("e-pv-thumbnail-hover"),t.classList.add("e-pv-thumbnail-focus")},t.prototype.setMouseFocusToFirstPage=function(){var t=this.thumbnailView.children[0];if(t){var e=t.children[0].children[0];this.setMouseFocusStyle(e),this.previousElement=e}},t.prototype.clear=function(){if(this.startIndex=0,this.thumbnailLimit=0,this.isThumbnailCompleted=!1,this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.sideBarContentContainer&&(this.pdfViewerBase.navigationPane.sideBarContentContainer.style.display="block",this.pdfViewerBase.navigationPane.sideBarContent.scrollTop=0,this.pdfViewerBase.navigationPane.sideBarContentContainer.style.display="none"),this.thumbnailView)for(;this.thumbnailView.hasChildNodes();)this.thumbnailView.removeChild(this.thumbnailView.lastChild);this.pdfViewerBase.navigationPane&&this.pdfViewerBase.navigationPane.resetThumbnailView(),this.unwireUpEvents()},t.prototype.getVisibleThumbs=function(){return this.getVisibleElements(this.pdfViewerBase.navigationPane.sideBarContent,this.thumbnailView.children)},t.prototype.getVisibleElements=function(t,e){function i(t){return t.offsetTop+t.clientTop+t.clientHeight>d}var n,o,s,a,r,l,u,M,L,d=t.scrollTop,w=d+t.clientHeight,h=t.scrollLeft,p=h+t.clientWidth,c=[],C=0===e.length?0:this.binarySearchFirstItem(e,i);e.length>0&&(C=this.backtrackBeforeAllVisibleElements(C,e,d));for(var j=-1,g=C,y=e.length;g=w&&(j=r);else if(s>j)break;r<=d||s>=w||M<=h||l>=p||(L=(a-(Math.max(0,d-s)+Math.max(0,r-w)))*(u-(Math.max(0,h-l)+Math.max(0,M-p)))*100/a/u|0,c.push({id:n.id,x:l,y:s,view:n,percent:L}))}return{first:c[0],last:c[c.length-1],views:c}},t.prototype.binarySearchFirstItem=function(t,e){var i=0,n=t.length-1;if(0===t.length||!e(this.getThumbnailElement(n)))return t.length-1;if(e(this.getThumbnailElement(i)))return i;for(;i>1;e(this.getThumbnailElement(o))?n=o:i=o+1}return i},t.prototype.backtrackBeforeAllVisibleElements=function(t,e,i){if(t<2)return t;var n=this.getThumbnailElement(t),o=n.offsetTop+n.clientTop;o>=i&&(o=(n=this.getThumbnailElement(t-1)).offsetTop+n.clientTop);for(var s=t-2;s>=0&&!((n=this.getThumbnailElement(s)).offsetTop+n.clientTop+n.clientHeight<=o);--s)t=s;return t},t.prototype.getThumbnailElement=function(t){return this.thumbnailView.children[t].children[0]},t.prototype.destroy=function(){this.clear()},t.prototype.getModuleName=function(){return"ThumbnailView"},t}(),ni=function(){function t(t,i){var n=this;this.isPageNavigationToolDisabled=!1,this.isMagnificationToolDisabled=!1,this.isSelectionToolDisabled=!1,this.isScrollingToolDisabled=!1,this.isOpenBtnVisible=!0,this.isNavigationToolVisible=!0,this.isMagnificationToolVisible=!0,this.isSelectionBtnVisible=!0,this.isScrollingBtnVisible=!0,this.isDownloadBtnVisible=!0,this.isPrintBtnVisible=!0,this.isSearchBtnVisible=!0,this.isTextSearchBoxDisplayed=!1,this.isUndoRedoBtnsVisible=!0,this.isAnnotationEditBtnVisible=!0,this.isCommentBtnVisible=!0,this.isSubmitbtnvisible=!0,this.onToolbarKeydown=function(t){var e=t.target.id;e!==n.pdfViewer.element.id+"_currentPageInput"&&e!==n.pdfViewer.element.id+"_zoomDropDown"&&(t.preventDefault(),t.stopPropagation())},this.toolbarClickHandler=function(t){if(!e.Browser.isDevice||n.pdfViewer.enableDesktopMode)if(t.originalEvent.target===n.zoomDropdownItem.parentElement.childNodes[1]||t.originalEvent.target===n.zoomDropdownItem.parentElement.childNodes[2])t.cancel=!0;else if(t.originalEvent.target.id===n.pdfViewer.element.id+"_openIcon"){var i=t.originalEvent.target.parentElement.dataset;if(i&&i.tooltipId){var o=document.getElementById(i.tooltipId);o&&(o.style.display="none")}}n.handleToolbarBtnClick(t);var s=t.originalEvent.target;e.Browser.isDevice&&!n.pdfViewer.enableDesktopMode||t.originalEvent.target!==n.zoomDropdownItem.parentElement.childNodes[1]&&t.originalEvent.target!==n.zoomDropdownItem.parentElement.childNodes[2]&&t.originalEvent.target!==n.currentPageBoxElement&&t.originalEvent.target!==n.textSearchItem.childNodes[0]&&s.parentElement.id!==n.pdfViewer.element.id+"_toolbarContainer_nav"&&s.id!==n.pdfViewer.element.id+"_toolbarContainer_nav"&&(t.originalEvent.target.blur(),n.pdfViewerBase.focusViewerContainer())},this.loadDocument=function(t){var e=t.target.files;if(null!==t.target.files[0]){var i=e[0];if(i){n.uploadedDocumentName=i.name;var o=new FileReader;o.readAsDataURL(i),o.onload=function(t){var e=t.currentTarget.result;n.pdfViewer.load(e,null)}}}},this.navigateToPage=function(t){if(13===t.which){var e=parseInt(n.currentPageBoxElement.value);null!==e&&e>0&&e<=n.pdfViewerBase.pageCount?n.pdfViewer.navigationModule&&n.pdfViewer.navigationModule.goToPage(e):n.updateCurrentPage(n.pdfViewerBase.currentPageNumber),n.currentPageBoxElement.blur(),n.pdfViewerBase.focusViewerContainer()}},this.textBoxFocusOut=function(){(null===n.currentPageBox.value||n.currentPageBox.value>=n.pdfViewerBase.pageCount||n.currentPageBox.value!==n.pdfViewerBase.currentPageNumber)&&n.updateCurrentPage(n.pdfViewerBase.currentPageNumber)},this.pdfViewer=t,this.pdfViewerBase=i}return t.prototype.intializeToolbar=function(t){var i;return e.isBlazor()?e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(i=this.pdfViewer.element.querySelector(".e-pv-toolbar"),this.toolbarElement=i):i=this.createToolbar(t),!!document.documentMode&&(e.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.totalPageElement.classList.add("e-pv-total-page-ms"):this.totalPageItem.classList.add("e-pv-total-page-ms")),this.createFileElement(i),this.wireEvent(),e.isBlazor()?(e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.initialEnableItems(),this.pdfViewerBase.navigationPane.adjustPane(),this.pdfViewer.enableToolbar&&this.bindOpenIconEvent()),this.annotationToolbarModule=new oi(this.pdfViewer,this.pdfViewerBase,this),(this.pdfViewer.enableToolbar&&this.pdfViewer.enableAnnotationToolbar||this.pdfViewer.enableDesktopMode&&e.Browser.isDevice)&&this.annotationToolbarModule.afterAnnotationToolbarCreationInBlazor()):(this.updateToolbarItems(),!e.Browser.isDevice||this.pdfViewer.enableDesktopMode?(this.applyToolbarSettings(),this.initialEnableItems(),this.pdfViewerBase.navigationPane.adjustPane()):this.initialEnableItems(),this.pdfViewer.annotationModule&&(this.annotationToolbarModule=new oi(this.pdfViewer,this.pdfViewerBase,this),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||this.annotationToolbarModule.initializeAnnotationToolbar())),i},t.prototype.bindOpenIconEvent=function(){var t=document.getElementById(this.pdfViewer.element.id+"_open");t&&t.addEventListener("click",this.openFileDialogBox.bind(this))},t.prototype.InitializeMobileToolbarInBlazor=function(){var t;t=this.pdfViewer.element.querySelector(".e-pv-mobile-toolbar"),this.createFileElement(t),this.wireEvent()},t.prototype.showToolbar=function(t){var i=this.toolbarElement;t?(i.style.display="block",e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&this.pdfViewer.toolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule&&this.pdfViewer.toolbarModule.annotationToolbarModule.hideMobileAnnotationToolbar()):(this.pdfViewerBase.toolbarHeight=0,i.style.display="none")},t.prototype.showNavigationToolbar=function(t){if(!e.Browser.isDevice||this.pdfViewer.enableDesktopMode){var i=this.pdfViewerBase.navigationPane.sideBarToolbar,n=this.pdfViewerBase.navigationPane.sideBarToolbarSplitter;t?(i.style.display="block",n.style.display="block",(this.pdfViewerBase.navigationPane.isBookmarkOpen||this.pdfViewerBase.navigationPane.isThumbnailOpen)&&this.pdfViewerBase.navigationPane.clear()):(i.style.display="none",n.style.display="none",(this.pdfViewerBase.navigationPane.isBookmarkOpen||this.pdfViewerBase.navigationPane.isThumbnailOpen)&&this.pdfViewerBase.navigationPane.updateViewerContainerOnClose())}},t.prototype.showAnnotationToolbar=function(t){t?(this.annotationToolbarModule.isToolbarHidden=!0,this.annotationToolbarModule.showAnnotationToolbar()):(this.annotationToolbarModule.isToolbarHidden=!1,this.annotationToolbarModule.showAnnotationToolbar())},t.prototype.showToolbarItem=function(t,e){for(var i=0;i0&&(this.toolbar.enableItems(this.downloadItem.parentElement,!0),this.toolbar.enableItems(this.printItem.parentElement,!0),this.toolbar.enableItems(this.pdfViewerBase.getElement("_currentPageInputContainer"),!0),this.toolbar.enableItems(this.pdfViewerBase.getElement("_zoomDropDownContainer"),!0),this.updateUndoRedoButtons(),this.updateNavigationButtons(),this.updateZoomButtons(),this.pdfViewer.magnificationModule&&(this.zoomDropDown.readonly=!1),this.updateInteractionItems(),this.pdfViewer.annotationModule&&this.pdfViewer.enableAnnotation&&this.toolbar.enableItems(this.annotationItem.parentElement,!0),this.pdfViewer.textSearchModule&&this.pdfViewer.enableTextSearch&&this.toolbar.enableItems(this.textSearchItem.parentElement,!0),this.pdfViewer.annotationModule&&this.pdfViewer.enableStickyNotesAnnotation&&this.toolbar.enableItems(this.commentItem.parentElement,!0)),this.pdfViewer.toolbarSettings.annotationToolbarItems&&(0!==this.pdfViewer.toolbarSettings.annotationToolbarItems.length&&this.pdfViewer.annotationModule&&this.pdfViewer.enableAnnotationToolbar||this.enableToolbarItem(["AnnotationEditTool"],!1)),this.pdfViewer.enableDownload||this.enableDownloadOption(!1),this.pdfViewer.enablePrint||this.enablePrintOption(!1)):0===this.pdfViewerBase.pageCount?(this.toolbar.enableItems(this.textSearchItem.parentElement,!1),this.toolbar.enableItems(this.moreOptionItem.parentElement,!1)):this.pdfViewerBase.pageCount>0&&(this.toolbar.enableItems(this.textSearchItem.parentElement,!0),this.toolbar.enableItems(this.moreOptionItem.parentElement,!0),this.updateUndoRedoButtons())},t.prototype.updateNavigationButtons=function(){this.pdfViewer.navigationModule&&!this.isPageNavigationToolDisabled?0===this.pdfViewerBase.pageCount||1===this.pdfViewerBase.currentPageNumber&&1===this.pdfViewerBase.pageCount?(this.toolbar.enableItems(this.firstPageItem.parentElement,!1),this.toolbar.enableItems(this.previousPageItem.parentElement,!1),this.toolbar.enableItems(this.nextPageItem.parentElement,!1),this.toolbar.enableItems(this.lastPageItem.parentElement,!1)):1===this.pdfViewerBase.currentPageNumber&&this.pdfViewerBase.pageCount>0?(this.toolbar.enableItems(this.firstPageItem.parentElement,!1),this.toolbar.enableItems(this.previousPageItem.parentElement,!1),this.toolbar.enableItems(this.nextPageItem.parentElement,!0),this.toolbar.enableItems(this.lastPageItem.parentElement,!0)):this.pdfViewerBase.currentPageNumber===this.pdfViewerBase.pageCount&&this.pdfViewerBase.pageCount>0?(this.toolbar.enableItems(this.firstPageItem.parentElement,!0),this.toolbar.enableItems(this.previousPageItem.parentElement,!0),this.toolbar.enableItems(this.nextPageItem.parentElement,!1),this.toolbar.enableItems(this.lastPageItem.parentElement,!1)):this.pdfViewerBase.currentPageNumber>1&&this.pdfViewerBase.currentPageNumber=4?(this.toolbar.enableItems(this.zoomInItem.parentElement,!1),this.toolbar.enableItems(this.zoomOutItem.parentElement,!0)):(this.toolbar.enableItems(this.zoomInItem.parentElement,!0),this.toolbar.enableItems(this.zoomOutItem.parentElement,!0)))},t.prototype.updateUndoRedoButtons=function(){this.pdfViewer.annotationModule&&this.pdfViewerBase.pageCount>0?e.isBlazor()?(this.enableCollectionAvailableInBlazor(this.pdfViewer.annotationModule.actionCollection,"undo"),this.enableCollectionAvailableInBlazor(this.pdfViewer.annotationModule.redoCollection,"redo")):(this.enableCollectionAvailable(this.pdfViewer.annotationModule.actionCollection,this.undoItem.parentElement),this.enableCollectionAvailable(this.pdfViewer.annotationModule.redoCollection,this.redoItem.parentElement)):e.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.disableUndoRedoButton():this.disableUndoRedoButtons()},t.prototype.enableCollectionAvailable=function(t,e){t.length>0?this.toolbar.enableItems(e,!0):this.toolbar.enableItems(e,!1)},t.prototype.enableCollectionAvailableInBlazor=function(t,e){t.length>0?this.pdfViewerBase.blazorUIAdaptor.updateUndoRedoButton(e,!0):this.pdfViewerBase.blazorUIAdaptor.updateUndoRedoButton(e,!1)},t.prototype.disableUndoRedoButtons=function(){this.toolbar.enableItems(this.undoItem.parentElement,!1),this.toolbar.enableItems(this.redoItem.parentElement,!1)},t.prototype.destroy=function(){e.isBlazor()||(this.unWireEvent(),this.moreDropDown&&this.moreDropDown.destroy(),this.annotationToolbarModule&&this.annotationToolbarModule.destroy(),this.toolbar.destroy(),this.toolbarElement.remove())},t.prototype.updateCurrentPage=function(t){!e.Browser.isDevice||this.pdfViewer.enableDesktopMode?(e.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.pageChanged(t):(this.currentPageBox.value===t&&(this.currentPageBoxElement.value=t.toString()),this.currentPageBox.value=t),this.pdfViewerBase.currentPageNumber=t,this.pdfViewer.currentPageNumber=t):(this.pdfViewerBase.mobileSpanContainer.innerHTML=t.toString(),this.pdfViewerBase.mobilecurrentPageContainer.innerHTML=t.toString())},t.prototype.updateTotalPage=function(){e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.pdfViewerBase.pageCount>0&&(this.currentPageBox.min=1),this.totalPageItem.textContent=this.pdfViewer.localeObj.getConstant("of")+this.pdfViewerBase.pageCount.toString())},t.prototype.openFileDialogBox=function(t){t.preventDefault(),this.fileInputElement.click()},t.prototype.createToolbar=function(t){var i=this;return this.toolbarElement=e.createElement("div",{id:this.pdfViewer.element.id+"_toolbarContainer",className:"e-pv-toolbar"}),this.pdfViewerBase.viewerMainContainer.appendChild(this.toolbarElement),!e.Browser.isDevice||this.pdfViewer.enableDesktopMode?(this.toolbar=new r.Toolbar({clicked:this.toolbarClickHandler,width:"",height:"",overflowMode:"Popup",items:this.createToolbarItems(),created:function(){i.createZoomDropdown(),i.createNumericTextBox(),i.toolbar.refreshOverflow()}}),this.toolbar.isStringTemplate=!0,this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.toolbar.appendTo(this.toolbarElement),this.applyToolbarSettings(),this.afterToolbarCreation(),this.updateTotalPage(),this.toolbarElement.addEventListener("keydown",this.onToolbarKeydown)):(this.createToolbarItemsForMobile(),this.pdfViewer.enableRtl&&(this.toolbar.enableRtl=!0),this.applyToolbarSettings(),this.disableUndoRedoButtons()),this.toolbarElement},t.prototype.createToolbarItems=function(){var t=this.createCurrentPageInputTemplate(),e=this.createTotalPageTemplate(),i=this.createZoomDropdownElement(),n=[],o='';return n.push({prefixIcon:"e-pv-open-document-icon e-pv-icon",cssClass:"e-pv-open-document-container",id:this.pdfViewer.element.id+"_open",text:this.pdfViewer.localeObj.getConstant("Open text"),align:"Left"}),n.push({type:"Separator",align:"Left"}),this.pdfViewer.enableRtl?(n.push({prefixIcon:"e-pv-last-page-navigation-icon e-pv-icon",cssClass:"e-pv-last-page-navigation-container",id:this.pdfViewer.element.id+"_firstPage",text:this.pdfViewer.localeObj.getConstant("First text"),align:"Left"}),n.push({prefixIcon:"e-pv-next-page-navigation-icon e-pv-icon",cssClass:"e-pv-next-page-navigation-container",id:this.pdfViewer.element.id+"_previousPage",text:this.pdfViewer.localeObj.getConstant("Previous text"),align:"Left"}),n.push({prefixIcon:"e-pv-previous-page-navigation-icon e-pv-icon",cssClass:"e-pv-previous-page-navigation-container",id:this.pdfViewer.element.id+"_nextPage",text:this.pdfViewer.localeObj.getConstant("Next text"),align:"Left"}),n.push({prefixIcon:"e-pv-first-page-navigation-icon e-pv-icon",cssClass:"e-pv-first-page-navigation-container",id:this.pdfViewer.element.id+"_lastPage",text:this.pdfViewer.localeObj.getConstant("Last text"),align:"Left"}),n.push({template:e,align:"Left"}),n.push({template:t,align:"Left"})):(n.push({prefixIcon:"e-pv-first-page-navigation-icon e-pv-icon",cssClass:"e-pv-first-page-navigation-container",id:this.pdfViewer.element.id+"_firstPage",text:this.pdfViewer.localeObj.getConstant("First text"),align:"Left"}),n.push({prefixIcon:"e-pv-previous-page-navigation-icon e-pv-icon",cssClass:"e-pv-previous-page-navigation-container",id:this.pdfViewer.element.id+"_previousPage",text:this.pdfViewer.localeObj.getConstant("Previous text"),align:"Left"}),n.push({prefixIcon:"e-pv-next-page-navigation-icon e-pv-icon",cssClass:"e-pv-next-page-navigation-container",id:this.pdfViewer.element.id+"_nextPage",text:this.pdfViewer.localeObj.getConstant("Next text"),align:"Left"}),n.push({prefixIcon:"e-pv-last-page-navigation-icon e-pv-icon",cssClass:"e-pv-last-page-navigation-container",id:this.pdfViewer.element.id+"_lastPage",text:this.pdfViewer.localeObj.getConstant("Last text"),align:"Left"}),n.push({template:t,align:"Left"}),n.push({template:e,align:"Left"})),n.push({type:"Separator",align:"Left"}),n.push({prefixIcon:"e-pv-zoom-out-icon e-pv-icon",cssClass:"e-pv-zoom-out-container",id:this.pdfViewer.element.id+"_zoomOut",text:this.pdfViewer.localeObj.getConstant("Zoom out text"),align:"Left"}),n.push({prefixIcon:"e-pv-zoom-in-icon e-pv-icon",cssClass:"e-pv-zoom-in-container",id:this.pdfViewer.element.id+"_zoomIn",text:this.pdfViewer.localeObj.getConstant("Zoom in text"),align:"Left"}),n.push({template:i,cssClass:"e-pv-zoom-drop-down-container",align:"Left"}),n.push({type:"Separator",align:"Left"}),n.push({prefixIcon:"e-pv-text-select-tool-icon e-pv-icon",cssClass:"e-pv-text-select-tool-container",id:this.pdfViewer.element.id+"_selectTool",text:this.pdfViewer.localeObj.getConstant("Selection text")}),n.push({prefixIcon:"e-pv-pan-tool-icon e-pv-icon",cssClass:"e-pv-pan-tool-container",id:this.pdfViewer.element.id+"_handTool",text:this.pdfViewer.localeObj.getConstant("Pan text")}),n.push({type:"Separator",align:"Left"}),n.push({prefixIcon:"e-pv-undo-icon e-pv-icon",cssClass:"e-pv-undo-container",id:this.pdfViewer.element.id+"_undo",text:this.pdfViewer.localeObj.getConstant("Undo"),align:"Left"}),n.push({prefixIcon:"e-pv-redo-icon e-pv-icon",cssClass:"e-pv-redo-container",id:this.pdfViewer.element.id+"_redo",text:this.pdfViewer.localeObj.getConstant("Redo"),align:"Left"}),n.push({type:"Separator",align:"Left"}),n.push({prefixIcon:"e-pv-comment-icon e-pv-icon",cssClass:"e-pv-comment-container",id:this.pdfViewer.element.id+"_comment",text:this.pdfViewer.localeObj.getConstant("Add Comments"),align:"Left"}),n.push({type:"Separator",align:"Left"}),n.push({template:o,cssClass:"e-pv-submit",align:"Left"}),n.push({prefixIcon:"e-pv-text-search-icon e-pv-icon",cssClass:"e-pv-text-search-container",id:this.pdfViewer.element.id+"_search",text:this.pdfViewer.localeObj.getConstant("Search text"),align:"Right"}),n.push({prefixIcon:"e-pv-annotation-icon e-pv-icon",cssClass:"e-pv-annotation-container",id:this.pdfViewer.element.id+"_annotation",text:this.pdfViewer.localeObj.getConstant("Annotation Edit text"),align:"Right"}),n.push({prefixIcon:"e-pv-print-document-icon e-pv-icon",cssClass:"e-pv-print-document-container",id:this.pdfViewer.element.id+"_print",text:this.pdfViewer.localeObj.getConstant("Print text"),align:"Right"}),n.push({prefixIcon:"e-pv-download-document-icon e-pv-icon",cssClass:"e-pv-download-document-container",id:this.pdfViewer.element.id+"_download",text:this.pdfViewer.localeObj.getConstant("Download"),align:"Right"}),n},t.prototype.afterToolbarCreation=function(){this.itemsContainer=this.toolbar.element.childNodes[0],this.itemsContainer.id=this.pdfViewer.element.id+"_toolbarItemsContainer",this.openDocumentItem=this.addClassToolbarItem("_open","e-pv-open-document",this.pdfViewer.localeObj.getConstant("Open")),this.undoItem=this.addClassToolbarItem("_undo","e-pv-undo",this.pdfViewer.localeObj.getConstant("Undo")),this.redoItem=this.addClassToolbarItem("_redo","e-pv-redo",this.pdfViewer.localeObj.getConstant("Redo")),this.pdfViewer.enableRtl?(this.firstPageItem=this.addClassToolbarItem("_firstPage","e-pv-last-page-navigation",this.pdfViewer.localeObj.getConstant("Go To First Page")),this.previousPageItem=this.addClassToolbarItem("_previousPage","e-pv-next-page-navigation",this.pdfViewer.localeObj.getConstant("Previous Page")),this.nextPageItem=this.addClassToolbarItem("_nextPage","e-pv-previous-page-navigation",this.pdfViewer.localeObj.getConstant("Next Page")),this.lastPageItem=this.addClassToolbarItem("_lastPage","e-pv-first-page-navigation",this.pdfViewer.localeObj.getConstant("Go To Last Page"))):(this.firstPageItem=this.addClassToolbarItem("_firstPage","e-pv-first-page-navigation",this.pdfViewer.localeObj.getConstant("Go To First Page")),this.previousPageItem=this.addClassToolbarItem("_previousPage","e-pv-previous-page-navigation",this.pdfViewer.localeObj.getConstant("Previous Page")),this.nextPageItem=this.addClassToolbarItem("_nextPage","e-pv-next-page-navigation",this.pdfViewer.localeObj.getConstant("Next Page")),this.lastPageItem=this.addClassToolbarItem("_lastPage","e-pv-last-page-navigation",this.pdfViewer.localeObj.getConstant("Go To Last Page"))),this.zoomOutItem=this.addClassToolbarItem("_zoomOut","e-pv-zoom-out",this.pdfViewer.localeObj.getConstant("Zoom Out")),this.zoomInItem=this.addClassToolbarItem("_zoomIn","e-pv-zoom-in",this.pdfViewer.localeObj.getConstant("Zoom In")),this.textSelectItem=this.addClassToolbarItem("_selectTool","e-pv-text-select-tool",this.pdfViewer.localeObj.getConstant("Text Selection")),this.panItem=this.addClassToolbarItem("_handTool","e-pv-pan-tool",this.pdfViewer.localeObj.getConstant("Panning")),this.commentItem=this.addClassToolbarItem("_comment","e-pv-comment",this.pdfViewer.localeObj.getConstant("Add Comments")),this.textSearchItem=this.addClassToolbarItem("_search","e-pv-text-search",this.pdfViewer.localeObj.getConstant("Text Search")),this.annotationItem=this.addClassToolbarItem("_annotation","e-pv-annotation",this.pdfViewer.localeObj.getConstant("Annotation")),this.printItem=this.addClassToolbarItem("_print","e-pv-print-document",this.pdfViewer.localeObj.getConstant("Print")),this.downloadItem=this.addClassToolbarItem("_download","e-pv-download-document",this.pdfViewer.localeObj.getConstant("Download file")),this.zoomDropdownItem=this.pdfViewerBase.getElement("_zoomDropDown"),this.createTooltip(this.zoomDropdownItem,this.pdfViewer.localeObj.getConstant("Zoom")),this.zoomDropdownItem.setAttribute("aria-label",this.pdfViewer.localeObj.getConstant("Zoom")),this.addPropertiesToolItemContainer(this.zoomDropdownItem.parentElement.parentElement,null,"_zoomDropDownContainer"),this.pdfViewerBase.getElement("_zoomDropDownContainer").style.minWidth="",this.createTooltip(this.currentPageBoxElement,this.pdfViewer.localeObj.getConstant("Page Number")),this.currentPageBoxElement.setAttribute("aria-label",this.pdfViewer.localeObj.getConstant("Page Number")),this.submitItem=this.pdfViewerBase.getElement("_submitForm"),this.addPropertiesToolItemContainer(this.submitItem.parentElement,"e-pv-submit","_submitForm"),this.createTooltip(this.submitItem,this.pdfViewer.localeObj.getConstant("SubmitForm")),this.addPropertiesToolItemContainer(this.currentPageBoxElement.parentElement.parentElement,"e-pv-current-page-container","_currentPageInputContainer"),this.pdfViewerBase.getElement("_currentPageInputContainer").style.minWidth="20px",this.totalPageItem=this.pdfViewerBase.getElement("_totalPage"),this.addPropertiesToolItemContainer(this.totalPageItem.parentElement,"e-pv-total-page-container","_totalPageContainer")},t.prototype.addClassToolbarItem=function(t,e,i){var n=this.pdfViewerBase.getElement(t);if(n.classList.add(e),n.classList.add("e-pv-tbar-btn"),n.setAttribute("aria-label",i),n.parentElement.classList.add(e+"-container"),n.parentElement.classList.add("e-popup-text"),n.parentElement.id=this.pdfViewer.element.id+t+"Container",n.childNodes.length>0){var o=n.childNodes[0];o.id=this.pdfViewer.element.id+t+"Icon",o.classList.remove("e-icons"),o.classList.remove("e-btn-icon"),this.pdfViewer.enableRtl&&o.classList.add("e-right");var s=n.childNodes[1];s&&s.classList.contains("e-tbar-btn-text")&&(s.id=this.pdfViewer.element.id+t+"Text")}return n.style.width="",this.createTooltip(n,i),n},t.prototype.addPropertiesToolItemContainer=function(t,e,i){null!==e&&t.classList.add(e),t.classList.add("e-popup-text"),t.id=this.pdfViewer.element.id+i},t.prototype.createZoomDropdownElement=function(){return this.createToolbarItem("input",this.pdfViewer.element.id+"_zoomDropDown",null).outerHTML},t.prototype.createZoomDropdown=function(){var t=[{percent:"10%",id:"0"},{percent:"25%",id:"1"},{percent:"50%",id:"2"},{percent:"75%",id:"3"},{percent:"100%",id:"4"},{percent:"125%",id:"5"},{percent:"150%",id:"6"},{percent:"200%",id:"7"},{percent:"400%",id:"8"},{percent:this.pdfViewer.localeObj.getConstant("Fit Page"),id:"9"},{percent:this.pdfViewer.localeObj.getConstant("Fit Width"),id:"10"},{percent:this.pdfViewer.localeObj.getConstant("Automatic"),id:"11"}];this.zoomDropDown=new M.ComboBox({dataSource:t,text:"100%",fields:{text:"percent",value:"id"},readonly:!0,cssClass:"e-pv-zoom-drop-down",popupHeight:"450px",showClearButton:!1}),this.zoomDropDown.appendTo(this.pdfViewerBase.getElement("_zoomDropDown"))},t.prototype.createCurrentPageInputTemplate=function(){return this.createToolbarItem("input",this.pdfViewer.element.id+"_currentPageInput",null).outerHTML},t.prototype.createTotalPageTemplate=function(){return this.createToolbarItem("span",this.pdfViewer.element.id+"_totalPage","e-pv-total-page").outerHTML},t.prototype.createNumericTextBox=function(){this.currentPageBox=new n.NumericTextBox({value:0,format:"##",cssClass:"e-pv-current-page-box",showSpinButton:!1}),this.currentPageBoxElement=this.pdfViewerBase.getElement("_currentPageInput"),this.currentPageBox.appendTo(this.currentPageBoxElement)},t.prototype.createToolbarItemsForMobile=function(){this.toolbarElement.classList.add("e-pv-mobile-toolbar");var t='';this.toolbar=new r.Toolbar({items:[{prefixIcon:"e-pv-open-document-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Open"),id:this.pdfViewer.element.id+"_open"},{type:"Separator",align:"Left"},{prefixIcon:"e-pv-undo-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Undo"),id:this.pdfViewer.element.id+"_undo"},{prefixIcon:"e-pv-redo-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Redo"),id:this.pdfViewer.element.id+"_redo"},{prefixIcon:"e-pv-text-search-icon e-pv-icon",tooltipText:this.pdfViewer.localeObj.getConstant("Text Search"),id:this.pdfViewer.element.id+"_search",align:"Right"},{template:t,align:"Right"}],clicked:this.toolbarClickHandler,width:"",height:"",overflowMode:"Popup"}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.toolbarElement),this.openDocumentItem=this.pdfViewerBase.getElement("_open"),this.openDocumentItem.classList.add("e-pv-open-document"),this.openDocumentItem.firstElementChild.id=this.pdfViewer.element.id+"_openIcon",this.textSearchItem=this.pdfViewerBase.getElement("_search"),this.textSearchItem.classList.add("e-pv-text-search"),this.textSearchItem.firstElementChild.id=this.pdfViewer.element.id+"_searchIcon",this.undoItem=this.pdfViewerBase.getElement("_undo"),this.undoItem.classList.add("e-pv-undo"),this.redoItem=this.pdfViewerBase.getElement("_redo"),this.redoItem.classList.add("e-pv-redo"),this.redoItem.firstElementChild.id=this.pdfViewer.element.id+"_redoIcon",this.undoItem.firstElementChild.id=this.pdfViewer.element.id+"_undoIcon",this.createMoreOption(this.pdfViewer.element.id+"_more_option")},t.prototype.createMoreOption=function(t){var e=this;this.moreOptionItem=document.getElementById(t);var i=[{text:this.pdfViewer.localeObj.getConstant("Download"),id:this.pdfViewer.element.id+"_menu_download",iconCss:"e-icons e-pv-download-document-icon e-pv-icon"},{text:this.pdfViewer.localeObj.getConstant("Bookmarks"),id:this.pdfViewer.element.id+"_menu_bookmarks",iconCss:"e-icons e-pv-bookmark-icon e-pv-icon"}];this.moreDropDown=new s.DropDownButton({items:i,iconCss:"e-pv-more-icon e-pv-icon",cssClass:"e-caret-hide",open:function(t){var i=e.moreDropDown.element.getBoundingClientRect();e.pdfViewer.enableRtl||(t.element.parentElement.style.left=i.left+i.width-t.element.parentElement.offsetWidth+"px")},select:function(t){switch(t.item.id){case e.pdfViewer.element.id+"_menu_download":e.pdfViewerBase.download();break;case e.pdfViewer.element.id+"_menu_bookmarks":e.showToolbar(!1),e.pdfViewerBase.navigationPane.createNavigationPaneMobile("bookmarks")}},beforeItemRender:function(t){t.item.id===e.pdfViewer.element.id+"_menu_bookmarks"&&(e.pdfViewer.bookmarkViewModule&&e.pdfViewer.bookmarkViewModule.bookmarks?t.element.classList.remove("e-disabled"):t.element.classList.add("e-disabled"))},close:function(t){e.moreOptionItem.blur(),e.pdfViewerBase.focusViewerContainer()}}),this.moreDropDown.appendTo("#"+t)},t.prototype.createToolbarItem=function(t,i,n){var o=e.createElement(t,{id:i});return null!==n&&(o.className=n),"input"===t&&i!==this.pdfViewer.element.id+"_zoomDropDown"&&(o.type="text"),o},t.prototype.createTooltip=function(t,e){null!==e&&new o.Tooltip({content:e,opensOn:"Hover",beforeOpen:this.onTooltipBeforeOpen.bind(this)}).appendTo(t)},t.prototype.onTooltipBeforeOpen=function(t){!this.pdfViewer.toolbarSettings.showTooltip&&this.toolbarElement.contains(t.target)&&(t.cancel=!0),this.annotationToolbarModule&&!this.pdfViewer.toolbarSettings.showTooltip&&this.annotationToolbarModule.toolbarElement.contains(t.target)&&(t.cancel=!0)},t.prototype.createFileElement=function(t){t&&(e.isBlazor()?this.fileInputElement=this.pdfViewer.element.querySelector(".e-pv-fileupload-element"):(this.fileInputElement=e.createElement("input",{id:this.pdfViewer.element.id+"_fileUploadElement",styles:"position:fixed; left:-100em",attrs:{type:"file"}}),this.fileInputElement.setAttribute("accept",".pdf"),this.fileInputElement.setAttribute("aria-label","file upload element")),t&&t.appendChild(this.fileInputElement))},t.prototype.wireEvent=function(){this.fileInputElement&&this.fileInputElement.addEventListener("change",this.loadDocument),e.isBlazor()||e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.toolbarElement.addEventListener("mouseup",this.toolbarOnMouseup.bind(this)),this.currentPageBoxElement.addEventListener("focusout",this.textBoxFocusOut),this.currentPageBoxElement.addEventListener("keypress",this.navigateToPage),this.zoomDropDown.change=this.zoomPercentSelect.bind(this),this.zoomDropDown.element.addEventListener("keypress",this.onZoomDropDownInput.bind(this)),this.zoomDropDown.element.addEventListener("click",this.onZoomDropDownInputClick.bind(this)))},t.prototype.unWireEvent=function(){this.fileInputElement&&this.fileInputElement.removeEventListener("change",this.loadDocument),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||e.isBlazor()||(this.toolbarElement.removeEventListener("mouseup",this.toolbarOnMouseup.bind(this)),this.currentPageBoxElement.removeEventListener("focusout",this.textBoxFocusOut),this.currentPageBoxElement.removeEventListener("keypress",this.navigateToPage),this.zoomDropDown.removeEventListener("change",this.zoomPercentSelect),this.zoomDropDown.element.removeEventListener("keypress",this.onZoomDropDownInput),this.zoomDropDown.element.removeEventListener("click",this.onZoomDropDownInputClick))},t.prototype.onToolbarResize=function(t){e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?this.pdfViewerBase.navigationPane.toolbarResize():this.toolbar.refreshOverflow()},t.prototype.toolbarOnMouseup=function(t){t.target!==this.itemsContainer&&t.target!==this.toolbarElement||this.pdfViewerBase.focusViewerContainer()},t.prototype.applyHideToToolbar=function(t,e,i){for(var n=!t,o=e;o<=i;o++)this.toolbar.hideItem(o,n)},t.prototype.handleOpenIconClick=function(t){this.fileInputElement.click(),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode&&(e.isBlazor()||t.originalEvent.target.blur(),this.pdfViewerBase.focusViewerContainer())},t.prototype.handleToolbarBtnClick=function(t){switch(this.addInkAnnotation(),t.originalEvent.target.id){case this.pdfViewer.element.id+"_open":case this.pdfViewer.element.id+"_openIcon":case this.pdfViewer.element.id+"_openText":this.handleOpenIconClick(t);break;case this.pdfViewer.element.id+"_download":case this.pdfViewer.element.id+"_downloadIcon":case this.pdfViewer.element.id+"_downloadText":this.pdfViewerBase.download();break;case this.pdfViewer.element.id+"_print":case this.pdfViewer.element.id+"_printIcon":case this.pdfViewer.element.id+"_printText":this.pdfViewer.printModule&&this.pdfViewer.firePrintStart();break;case this.pdfViewer.element.id+"_undo":case this.pdfViewer.element.id+"_undoIcon":case this.pdfViewer.element.id+"_undoText":this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.undo();break;case this.pdfViewer.element.id+"_redo":case this.pdfViewer.element.id+"_redoIcon":case this.pdfViewer.element.id+"_redoText":this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.redo();break;case this.pdfViewer.element.id+"_firstPage":case this.pdfViewer.element.id+"_firstPageIcon":case this.pdfViewer.element.id+"_firstPageText":this.pdfViewer.navigationModule&&this.pdfViewer.navigationModule.goToFirstPage();break;case this.pdfViewer.element.id+"_previousPage":case this.pdfViewer.element.id+"_previousPageIcon":case this.pdfViewer.element.id+"_previousPageText":this.pdfViewer.navigationModule&&this.pdfViewer.navigationModule.goToPreviousPage();break;case this.pdfViewer.element.id+"_nextPage":case this.pdfViewer.element.id+"_nextPageIcon":case this.pdfViewer.element.id+"_nextPageText":this.pdfViewer.navigationModule&&this.pdfViewer.navigationModule.goToNextPage();break;case this.pdfViewer.element.id+"_lastPage":case this.pdfViewer.element.id+"_lastPageIcon":case this.pdfViewer.element.id+"_lastPageText":this.pdfViewer.navigationModule&&this.pdfViewer.navigationModule.goToLastPage();break;case this.pdfViewer.element.id+"_zoomIn":case this.pdfViewer.element.id+"_zoomInIcon":case this.pdfViewer.element.id+"_zoomInText":this.pdfViewer.magnificationModule.zoomIn();break;case this.pdfViewer.element.id+"_zoomOut":case this.pdfViewer.element.id+"_zoomOutIcon":case this.pdfViewer.element.id+"_zoomOutText":this.pdfViewer.magnificationModule.zoomOut();break;case this.pdfViewer.element.id+"_selectTool":case this.pdfViewer.element.id+"_selectToolIcon":case this.pdfViewer.element.id+"_selectToolText":this.isSelectionToolDisabled||(this.pdfViewerBase.initiateTextSelectMode(),this.updateInteractionTools(!0));break;case this.pdfViewer.element.id+"_handTool":case this.pdfViewer.element.id+"_handToolIcon":case this.pdfViewer.element.id+"_handToolText":this.isScrollingToolDisabled||this.getStampMode()||(this.pdfViewerBase.initiatePanning(),this.updateInteractionTools(!1));break;case this.pdfViewer.element.id+"_search":case this.pdfViewer.element.id+"_searchIcon":case this.pdfViewer.element.id+"_searchText":this.textSearchButtonHandler();break;case this.pdfViewer.element.id+"_annotation":case this.pdfViewer.element.id+"_annotationIcon":case this.pdfViewer.element.id+"_annotationText":this.initiateAnnotationMode();break;case this.pdfViewer.element.id+"_comment":case this.pdfViewer.element.id+"_commentIcon":this.pdfViewerBase.isAddComment=!0,this.pdfViewerBase.isCommentIconAdded=!0,this.addComments(t.originalEvent.target);break;case this.pdfViewer.element.id+"_submitForm":this.pdfViewerBase.exportFormFields()}},t.prototype.addInkAnnotation=function(){if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var t=parseInt(this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber);this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(t)}this.annotationToolbarModule&&(this.annotationToolbarModule.inkAnnotationSelected=!1)},t.prototype.addComments=function(t){e.isBlazor()?(this.pdfViewerBase.isCommentIconAdded=!0,this.pdfViewerBase.isAddComment=!0,document.getElementById(this.pdfViewer.element.id+"_comment").classList.add("e-pv-select")):t.id===this.pdfViewer.element.id+"_comment"||t.id===this.pdfViewer.element.id+"_commentIcon"?t.id===this.pdfViewer.element.id+"_commentIcon"&&t.parentElement?t.parentElement.classList.add("e-pv-select"):t.classList.add("e-pv-select"):this.pdfViewer.enableRtl?t.className="e-pv-comment-selection-icon e-pv-icon e-icon-left e-right":t.className="e-pv-comment-selection-icon e-pv-icon e-icon-left",this.updateStampItems(),document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+(this.pdfViewerBase.currentPageNumber-1)).addEventListener("mousedown",this.pdfViewer.annotationModule.stickyNotesAnnotationModule.drawIcons.bind(this))},t.prototype.onZoomDropDownInput=function(t){if((t.which<48||t.which>57)&&8!==t.which&&13!==t.which)return t.preventDefault(),!1;if(13===t.which){t.preventDefault();var e=this.zoomDropDown.element.value;this.zoomDropDownChange(e)}return!0},t.prototype.onZoomDropDownInputClick=function(){this.zoomDropDown.element.select()},t.prototype.zoomPercentSelect=function(t){if(this.pdfViewerBase.pageCount>0)if(t.isInteracted){if(t.itemData){var e=t.itemData.percent;this.zoomDropDownChange(e)}}else this.updateZoomPercentage(this.pdfViewer.magnificationModule.zoomFactor)},t.prototype.zoomDropDownChange=function(t){t!==this.pdfViewer.localeObj.getConstant("Fit Width")&&t!==this.pdfViewer.localeObj.getConstant("Fit Page")&&t!==this.pdfViewer.localeObj.getConstant("Automatic")?(this.pdfViewer.magnificationModule.isAutoZoom=!1,this.pdfViewer.magnificationModule.zoomTo(parseFloat(t)),this.updateZoomPercentage(this.pdfViewer.magnificationModule.zoomFactor),this.zoomDropDown.focusOut()):t===this.pdfViewer.localeObj.getConstant("Fit Width")?(this.pdfViewer.magnificationModule.isAutoZoom=!1,this.pdfViewer.magnificationModule.fitToWidth(),this.zoomDropDown.focusOut()):t===this.pdfViewer.localeObj.getConstant("Fit Page")?(this.pdfViewer.magnificationModule.fitToPage(),this.zoomDropDown.focusOut()):t===this.pdfViewer.localeObj.getConstant("Automatic")&&(this.pdfViewer.magnificationModule.isAutoZoom=!0,this.pdfViewer.magnificationModule.fitToAuto(),this.zoomDropDown.focusOut())},t.prototype.updateZoomPercentage=function(t){if(!e.Browser.isDevice||this.pdfViewer.enableDesktopMode){var i=parseInt((100*t).toString())+"%";if(e.isBlazor()){var n=this.pdfViewerBase.getElement("_zoomDropDown");n&&n.children.length>0&&(n.children[0].children[0].value=i)}else this.zoomDropDown.text===i&&(this.zoomDropDown.element.value=i),11===this.zoomDropDown.index&&(this.zoomDropDown.value=4),this.pdfViewerBase.isMinimumZoom=t<=.25,this.zoomDropDown.text=i}},t.prototype.updateInteractionItems=function(){this.pdfViewer.textSelectionModule&&this.pdfViewer.enableTextSelection?this.toolbar.enableItems(this.textSelectItem.parentElement,!0):this.toolbar.enableItems(this.textSelectItem.parentElement,!1),this.toolbar.enableItems(this.panItem.parentElement,!0),"TextSelection"===this.pdfViewer.interactionMode?(this.selectItem(this.textSelectItem),this.deSelectItem(this.panItem)):(this.selectItem(this.panItem),this.deSelectItem(this.textSelectItem),this.pdfViewerBase.initiatePanning())},t.prototype.textSearchButtonHandler=function(){if(!e.Browser.isDevice||this.pdfViewer.enableDesktopMode){if(this.pdfViewer.textSearchModule&&this.pdfViewerBase.pageCount>0)if(this.isTextSearchBoxDisplayed=!this.isTextSearchBoxDisplayed,this.pdfViewer.textSearchModule.showSearchBox(this.isTextSearchBoxDisplayed),this.isTextSearchBoxDisplayed){e.isBlazor()||this.selectItem(this.textSearchItem);var t=document.getElementById(this.pdfViewer.element.id+"_search_input");t.select(),t.focus()}else e.isBlazor()||this.deSelectItem(this.textSearchItem)}else this.showToolbar(!1),this.pdfViewerBase.navigationPane.createNavigationPaneMobile("search")},t.prototype.initiateAnnotationMode=function(){this.annotationToolbarModule&&this.pdfViewer.enableAnnotationToolbar&&this.annotationToolbarModule.showAnnotationToolbar(this.annotationItem)},t.prototype.DisableInteractionTools=function(){this.deSelectItem(this.textSelectItem),this.deSelectItem(this.panItem)},t.prototype.selectItem=function(t){t&&t.classList.add("e-pv-select")},t.prototype.deSelectItem=function(t){t&&t.classList.remove("e-pv-select")},t.prototype.updateInteractionTools=function(t){t?(this.selectItem(this.textSelectItem),this.deSelectItem(this.panItem)):(this.selectItem(this.panItem),this.deSelectItem(this.textSelectItem))},t.prototype.initialEnableItems=function(){this.pdfViewer.enableToolbar?this.showToolbar(!0):this.showToolbar(!1),this.pdfViewer.enableNavigationToolbar?this.showNavigationToolbar(!0):this.showNavigationToolbar(!1),e.isBlazor()||(this.isPrintBtnVisible?this.showPrintOption(!0):this.showPrintOption(!1),this.isDownloadBtnVisible?this.showDownloadOption(!0):this.showDownloadOption(!1),this.isSearchBtnVisible?this.showSearchOption(!0):this.showSearchOption(!1),this.isCommentBtnVisible?this.showCommentOption(!0):this.showCommentOption(!1))},t.prototype.showSeparator=function(t){this.isOpenBtnVisible&&(!this.isOpenBtnVisible||1!==t.length)&&(this.isNavigationToolVisible||this.isMagnificationToolVisible||this.isSelectionBtnVisible||this.isScrollingBtnVisible||this.isUndoRedoBtnsVisible)||this.applyHideToToolbar(!1,1,1),(this.isNavigationToolVisible||this.isMagnificationToolVisible||this.isOpenBtnVisible)&&(!this.isOpenBtnVisible||this.isNavigationToolVisible)&&(this.isOpenBtnVisible||this.isNavigationToolVisible)&&(this.isMagnificationToolVisible||this.isScrollingBtnVisible||this.isSelectionBtnVisible)||this.applyHideToToolbar(!1,8,8),(!this.isMagnificationToolVisible&&!this.isSelectionBtnVisible&&!this.isScrollingBtnVisible||this.isMagnificationToolVisible&&!this.isSelectionBtnVisible&&!this.isScrollingBtnVisible||!this.isMagnificationToolVisible&&(this.isSelectionBtnVisible||this.isScrollingBtnVisible))&&this.applyHideToToolbar(!1,12,12),(this.isMagnificationToolVisible||this.isNavigationToolVisible||this.isScrollingBtnVisible||this.isSelectionBtnVisible||!this.isUndoRedoBtnsVisible)&&this.isUndoRedoBtnsVisible||this.applyHideToToolbar(!1,15,15)},t.prototype.applyToolbarSettings=function(){var t=this.pdfViewer.toolbarSettings.toolbarItems;t&&(-1!==t.indexOf("OpenOption")?this.showOpenOption(!0):this.showOpenOption(!1),-1!==t.indexOf("PageNavigationTool")?this.showPageNavigationTool(!0):this.showPageNavigationTool(!1),-1!==t.indexOf("MagnificationTool")?this.showMagnificationTool(!0):this.showMagnificationTool(!1),-1!==t.indexOf("SelectionTool")?this.showSelectionTool(!0):this.showSelectionTool(!1),-1!==t.indexOf("PanTool")?this.showScrollingTool(!0):this.showScrollingTool(!1),-1!==t.indexOf("PrintOption")?this.showPrintOption(!0):this.showPrintOption(!1),-1!==t.indexOf("DownloadOption")?this.showDownloadOption(!0):this.showDownloadOption(!1),-1!==t.indexOf("SearchOption")?this.showSearchOption(!0):this.showSearchOption(!1),-1!==t.indexOf("UndoRedoTool")?this.showUndoRedoTool(!0):this.showUndoRedoTool(!1),-1!==t.indexOf("AnnotationEditTool")?this.showAnnotationEditTool(!0):this.showAnnotationEditTool(!1),-1!==t.indexOf("CommentTool")?this.showCommentOption(!0):this.showCommentOption(!1),-1!==t.indexOf("SubmitForm")?this.showSubmitForm(!0):this.showSubmitForm(!1),this.showSeparator(t))},t.prototype.getStampMode=function(){return!(!this.pdfViewer.annotation||!this.pdfViewer.annotation.stampAnnotationModule)&&this.pdfViewer.annotation.stampAnnotationModule.isStampAddMode},t.prototype.stampBeforeOpen=function(t){if(this.annotationToolbarModule.resetFreeTextAnnot(),""===t.ParentItem.Text&&this.pdfViewer.customStampSettings.isAddToMenu&&t.Items.length>0){for(var e=null,i=0;i0)for(var s=0;s

',e.element.style.pointerEvents="auto",e.element.style.background="none",t.pdfViewerBase.getElement("_annotation_signature-popup").style.width="240px")}"ADD SIGNATURE"===e.item.text&&(e.element.innerHTML='ADD SIGNATURE',e.element.style.width="240",e.element.children[0].setAttribute("class","e-pv-align-sign"))},select:function(e){"ADD SIGNATURE"===e.item.text&&t.addSignature()}};new s.DropDownButton(i).appendTo(this.handWrittenSignatureItem)},i.prototype.updateSignatureCount=function(){var t=0;this.openSignaturePopup=!1;for(var e=this.pdfViewerBase.signatureModule.signaturecollection,i=0;i0){var s=[];o.push({text:this.pdfViewer.localeObj.getConstant("Dynamic"),items:s}),this.pdfViewer.stampSettings.dynamicStamps.forEach(function(e,i){var n=t.DynamicStampItem[e];switch(n){case"NotApproved":n="Not Approved"}s.push({text:n})})}if(this.pdfViewer.stampSettings.signStamps&&this.pdfViewer.stampSettings.signStamps.length>0){var a=[];o.push({text:this.pdfViewer.localeObj.getConstant("Sign Here"),items:a}),this.pdfViewer.stampSettings.signStamps.forEach(function(e,i){var n=t.SignStampItem[e];switch(n){case"InitialHere":n="Initial Here";break;case"SignHere":n="Sign Here"}a.push({text:n})})}if(this.pdfViewer.stampSettings.standardBusinessStamps&&this.pdfViewer.stampSettings.standardBusinessStamps.length>0){var l=[];o.push({text:this.pdfViewer.localeObj.getConstant("Standard Business"),items:l}),this.pdfViewer.stampSettings.standardBusinessStamps.forEach(function(e,i){var n=t.StandardBusinessStampItem[e];switch(n){case"NotApproved":n="Not Approved";break;case"ForPublicRelease":n="For Public Release";break;case"NotForPublicRelease":n="Not For Public Release";break;case"ForComment":n="For Comment";break;case"PreliminaryResults":n="Preliminary Results";break;case"InformationOnly":n="Information Only"}l.push({text:n})})}this.pdfViewer.customStampSettings.enableCustomStamp&&(o.length>0&&o.push({separator:!0}),o.push({text:this.pdfViewer.localeObj.getConstant("Custom Stamp"),items:[]})),this.stampMenu=[{iconCss:"e-pv-stamp-icon e-pv-icon",items:o}];var u={items:this.stampMenu,cssClass:"e-custom-scroll",showItemOnClick:!0,enableScrolling:!0,beforeOpen:function(t){if(i.resetFreeTextAnnot(),""===t.parentItem.text&&i.pdfViewer.customStampSettings.isAddToMenu&&t.items.length>0){for(var e=null,n=0;n0)for(var a=0;a0)for(var e=t.element.getElementsByTagName("button"),i=this.pdfViewer.selectedItems.annotations[0],n=0;n0)for(var e=t.element.getElementsByTagName("button"),i=this.pdfViewer.selectedItems.annotations[0],n=0;n${FontName}',allowCustom:!0,showClearButton:!1,width:"100px"}),this.fontFamily.isStringTemplate=!0,this.fontFamily.value="Helvetica",this.fontFamily.appendTo(t),this.primaryToolbar.createTooltip(t,this.pdfViewer.localeObj.getConstant("Font family")),this.fontFamily.addEventListener("change",function(){e.onFontFamilyChange(e)})},i.prototype.textPropertiesToolbarItems=function(){var t=[];return t.push({prefixIcon:"e-pv-bold-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_bold",align:"Left",value:"bold",click:this.onClickTextProperties.bind(this)}),t.push({prefixIcon:"e-pv-italic-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_italic",align:"Left",value:"italic",click:this.onClickTextProperties.bind(this)}),t.push({prefixIcon:"e-pv-strikeout-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_strikeout",align:"Left",value:"strikeout",click:this.onClickTextProperties.bind(this)}),t.push({prefixIcon:"e-pv-underlinetext-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_underline_textinput",align:"Left",value:"underline",click:this.onClickTextProperties.bind(this)}),t},i.prototype.createShapeToolbarItems=function(){var t=[];return t.push({prefixIcon:"e-pv-shape-line-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_line",text:this.pdfViewer.localeObj.getConstant("Line Shape"),align:"Left"}),t.push({prefixIcon:"e-pv-shape-arrow-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_arrow",text:this.pdfViewer.localeObj.getConstant("Arrow Shape"),align:"Left"}),t.push({prefixIcon:"e-pv-shape-rectangle-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_rectangle",text:this.pdfViewer.localeObj.getConstant("Rectangle Shape"),align:"Left"}),t.push({prefixIcon:"e-pv-shape-circle-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_circle",text:this.pdfViewer.localeObj.getConstant("Circle Shape"),align:"Left"}),t.push({prefixIcon:"e-pv-shape-pentagon-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_shape_pentagon",text:this.pdfViewer.localeObj.getConstant("Pentagon Shape"),align:"Left"}),t},i.prototype.createCalibrateToolbarItems=function(){var t=[];return t.push({prefixIcon:"e-pv-calibrate-distance-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_distance",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),t.push({prefixIcon:"e-pv-calibrate-perimeter-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_perimeter",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),t.push({prefixIcon:"e-pv-calibrate-area-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_area",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),t.push({prefixIcon:"e-pv-calibrate-radius-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_radius",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),t.push({prefixIcon:"e-pv-calibrate-volume-icon e-pv-icon",cssClass:"",id:this.pdfViewer.element.id+"_calibrate_volume",text:this.pdfViewer.localeObj.getConstant(""),align:"Left"}),t},i.prototype.onCalibrateToolbarClicked=function(t){var e=this.pdfViewer.element.id,i=this.pdfViewer.annotation.measureAnnotationModule;switch(this.deselectAllItems(),this.resetFreeTextAnnot(),t.originalEvent.target.id){case e+"_calibrate_distance":case e+"_calibrate_distanceIcon":i.setAnnotationType("Distance"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,i.distanceFillColor),this.updateColorInIcon(this.strokeDropDownElement,i.distanceStrokeColor);break;case e+"_calibrate_perimeter":case e+"_calibrate_perimeterIcon":i.setAnnotationType("Perimeter"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,i.perimeterFillColor),this.updateColorInIcon(this.strokeDropDownElement,i.perimeterStrokeColor);break;case e+"_calibrate_area":case e+"_calibrate_areaIcon":i.setAnnotationType("Area"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,i.areaFillColor),this.updateColorInIcon(this.strokeDropDownElement,i.areaStrokeColor);break;case e+"_calibrate_radius":case e+"_calibrate_radiusIcon":i.setAnnotationType("Radius"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,i.radiusFillColor),this.updateColorInIcon(this.strokeDropDownElement,i.radiusStrokeColor);break;case e+"_calibrate_volume":case e+"_calibrate_volumeIcon":i.setAnnotationType("Volume"),this.onShapeDrawSelection(!1),this.updateColorInIcon(this.colorDropDownElement,i.volumeFillColor),this.updateColorInIcon(this.strokeDropDownElement,i.volumeStrokeColor)}},i.prototype.onShapeDrawSelection=function(t){var e=this.pdfViewer.selectedItems.annotations[0];this.updateInteractionTools(),this.enableAnnotationPropertiesTools(!0),t?this.shapeDropDown.toggle():this.calibrateDropDown.toggle(),1===this.pdfViewer.selectedItems.annotations.length&&(this.pdfViewer.fireAnnotationUnSelect(e.annotName,e.pageIndex,e),this.pdfViewer.clearSelection(this.pdfViewer.selectedItems.annotations[0].pageIndex))},i.prototype.afterShapeToolbarCreation=function(){this.primaryToolbar.addClassToolbarItem("_shape_line","e-pv-shape-line",this.pdfViewer.localeObj.getConstant("Add line")),this.primaryToolbar.addClassToolbarItem("_shape_arrow","e-pv-shape-arrow",this.pdfViewer.localeObj.getConstant("Add arrow")),this.primaryToolbar.addClassToolbarItem("_shape_rectangle","e-pv-shape-rectangle",this.pdfViewer.localeObj.getConstant("Add rectangle")),this.primaryToolbar.addClassToolbarItem("_shape_circle","e-pv-shape-circle",this.pdfViewer.localeObj.getConstant("Add circle")),this.primaryToolbar.addClassToolbarItem("_shape_pentagon","e-pv-shape-pentagon",this.pdfViewer.localeObj.getConstant("Add polygon"))},i.prototype.afterCalibrateToolbarCreation=function(){this.primaryToolbar.addClassToolbarItem("_calibrate_distance","e-pv-calibrate-distance",this.pdfViewer.localeObj.getConstant("Calibrate Distance")),this.primaryToolbar.addClassToolbarItem("_calibrate_perimeter","e-pv-calibrate-perimeter",this.pdfViewer.localeObj.getConstant("Calibrate Perimeter")),this.primaryToolbar.addClassToolbarItem("_calibrate_area","e-pv-calibrate-area",this.pdfViewer.localeObj.getConstant("Calibrate Area")),this.primaryToolbar.addClassToolbarItem("_calibrate_radius","e-pv-calibrate-radius",this.pdfViewer.localeObj.getConstant("Calibrate Radius")),this.primaryToolbar.addClassToolbarItem("_calibrate_volume","e-pv-calibrate-volume",this.pdfViewer.localeObj.getConstant("Calibrate Volume"))},i.prototype.createColorPicker=function(t){var i=e.createElement("input",{id:t+"_target"});document.body.appendChild(i);var o=new n.ColorPicker({inline:!0,mode:"Palette",cssClass:"e-show-value",enableOpacity:!1,value:"#000000",showButtons:!1,modeSwitcher:!1});return this.pdfViewer.enableRtl&&(o.enableRtl=!0),o.appendTo(i),o},i.prototype.onColorPickerChange=function(t){var i;if(i=e.isBlazor()?t[0]:""===t.currentValue.hex?"#ffffff00":t.currentValue.hex,this.pdfViewer.annotationModule.textMarkupAnnotationModule)if(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAnnotation)this.pdfViewer.annotationModule.textMarkupAnnotationModule.modifyColorProperty(i);else switch(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode){case"Highlight":this.pdfViewer.annotationModule.textMarkupAnnotationModule.highlightColor=i;break;case"Underline":this.pdfViewer.annotationModule.textMarkupAnnotationModule.underlineColor=i;break;case"Strikethrough":this.pdfViewer.annotationModule.textMarkupAnnotationModule.strikethroughColor=i}if(1===this.pdfViewer.selectedItems.annotations.length)e.isBlazor()?t[0]!==t[1]&&this.pdfViewer.annotation.modifyFillColor(i):t.currentValue.hex!==t.previousValue.hex&&this.pdfViewer.annotation.modifyFillColor(i);else{if(this.pdfViewer.annotation.shapeAnnotationModule)switch(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode){case"Line":this.pdfViewer.annotation.shapeAnnotationModule.lineFillColor=i;break;case"Arrow":this.pdfViewer.annotation.shapeAnnotationModule.arrowFillColor=i;break;case"Rectangle":this.pdfViewer.annotation.shapeAnnotationModule.rectangleFillColor=i;break;case"Circle":this.pdfViewer.annotation.shapeAnnotationModule.circleFillColor=i;break;case"Polygon":this.pdfViewer.annotation.shapeAnnotationModule.polygonFillColor=i}this.pdfViewer.drawingObject&&(this.pdfViewer.drawingObject.fillColor=i,"FreeText"===this.pdfViewer.drawingObject.shapeAnnotationType&&(this.pdfViewer.freeTextSettings.fillColor=i,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties()))}e.isBlazor()?(this.colorDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-color-container"),this.updateColorInIcon(this.colorDropDownElementInBlazor,i)):(this.updateColorInIcon(this.colorDropDownElement,i),this.colorDropDown.toggle())},i.prototype.onStrokePickerChange=function(t){var i;if(i=e.isBlazor()?t[0]:""===t.currentValue.hex?"#ffffff00":t.currentValue.hex,1===this.pdfViewer.selectedItems.annotations.length)e.isBlazor()?t[0]!==t[1]&&this.pdfViewer.annotation.modifyStrokeColor(i):t.currentValue.hex!==t.previousValue.hex&&this.pdfViewer.annotation.modifyStrokeColor(i);else{if(this.pdfViewer.annotation.shapeAnnotationModule)switch(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode){case"Line":this.pdfViewer.annotation.shapeAnnotationModule.lineStrokeColor=i;break;case"Arrow":this.pdfViewer.annotation.shapeAnnotationModule.arrowStrokeColor=i;break;case"Rectangle":this.pdfViewer.annotation.shapeAnnotationModule.rectangleStrokeColor=i;break;case"Circle":this.pdfViewer.annotation.shapeAnnotationModule.circleStrokeColor=i;break;case"Polygon":this.pdfViewer.annotation.shapeAnnotationModule.polygonStrokeColor=i}var n=this.pdfViewer.annotation;n&&n.inkAnnotationModule&&(this.pdfViewer.inkAnnotationSettings.strokeColor=i),this.pdfViewer.drawingObject&&(this.pdfViewer.drawingObject.strokeColor=i),this.pdfViewer.drawingObject&&"FreeText"===this.pdfViewer.drawingObject.shapeAnnotationType&&(this.pdfViewer.freeTextSettings.borderColor=i,this.pdfViewer.annotationModule.freeTextAnnotationModule.updateTextProperties())}e.isBlazor()?(this.strokeDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-stroke-container"),this.updateColorInIcon(this.strokeDropDownElementInBlazor,i)):(this.updateColorInIcon(this.strokeDropDownElement,i),this.strokeDropDown.toggle())},i.prototype.updateColorInIcon=function(t,i){e.isBlazor()?t&&(t.children[0].style.borderBottomColor=i):t.childNodes[0].style.borderBottomColor=i},i.prototype.updateTextPropertySelection=function(t){"bold"===t?document.getElementById(this.pdfViewer.element.id+"_bold").classList.toggle("textprop-option-active"):"italic"===t?document.getElementById(this.pdfViewer.element.id+"_italic").classList.toggle("textprop-option-active"):"underline"===t?(document.getElementById(this.pdfViewer.element.id+"_underline_textinput").classList.toggle("textprop-option-active"),document.getElementById(this.pdfViewer.element.id+"_strikeout").classList.remove("textprop-option-active")):"strikeout"===t&&(document.getElementById(this.pdfViewer.element.id+"_strikeout").classList.toggle("textprop-option-active"),document.getElementById(this.pdfViewer.element.id+"_underline_textinput").classList.remove("textprop-option-active"))},i.prototype.updateFontFamilyInIcon=function(t){this.fontFamily.value=t},i.prototype.updateTextAlignInIcon=function(t){var i="e-btn-icon e-pv-left-align-icon e-pv-icon",n=document.getElementById(this.pdfViewer.element.id+"_left_align"),o=document.getElementById(this.pdfViewer.element.id+"_right_align"),s=document.getElementById(this.pdfViewer.element.id+"_center_align"),a=document.getElementById(this.pdfViewer.element.id+"_justify_align");e.isBlazor()||(n.classList.remove("textprop-option-active"),o.classList.remove("textprop-option-active"),s.classList.remove("textprop-option-active"),a.classList.remove("textprop-option-active")),"Left"===t?n.classList.add("textprop-option-active"):"Right"===t?(i="e-btn-icon e-pv-right-align-icon e-pv-icon",o.classList.add("textprop-option-active")):"Center"===t?(i="e-btn-icon e-pv-center-align-icon e-pv-icon",s.classList.add("textprop-option-active")):"Justify"===t&&(i="e-btn-icon e-pv-justfiy-align-icon e-pv-icon",a.classList.add("textprop-option-active")),document.getElementById(this.pdfViewer.element.id+"_annotation_textalign").children[0].className=i},i.prototype.updateFontSizeInIcon=function(t){this.fontSize.value=t+"px"},i.prototype.updateOpacityIndicator=function(){this.opacityIndicator.textContent=parseInt(Math.round(this.opacitySlider.value).toString())+"%"},i.prototype.updateThicknessIndicator=function(){this.thicknessIndicator.textContent=this.thicknessSlider.value+" pt"},i.prototype.createSlider=function(t){var i=e.createElement("div",{className:"e-pv-annotation-opacity-popup-container"});document.body.appendChild(i);var o=e.createElement("span",{id:t+"_label",className:"e-pv-annotation-opacity-label"});o.textContent=this.pdfViewer.localeObj.getConstant("Opacity");var s=e.createElement("div",{id:t+"_slider"});return this.opacitySlider=new n.Slider({type:"MinRange",cssClass:"e-pv-annotation-opacity-slider",max:100,min:0}),this.opacityIndicator=e.createElement("div",{id:t+"_opacity_indicator",className:"e-pv-annotation-opacity-indicator"}),this.opacityIndicator.textContent="100%",this.pdfViewer.enableRtl?(i.appendChild(this.opacityIndicator),i.appendChild(s),this.opacitySlider.enableRtl=!0,this.opacitySlider.appendTo(s),this.opacitySlider.element.parentElement.classList.add("e-pv-annotation-opacity-slider-container"),i.appendChild(o)):(i.appendChild(o),i.appendChild(s),this.opacitySlider.appendTo(s),this.opacitySlider.element.parentElement.classList.add("e-pv-annotation-opacity-slider-container"),i.appendChild(this.opacityIndicator)),i},i.prototype.createThicknessSlider=function(t){var i=e.createElement("div",{className:"e-pv-annotation-thickness-popup-container"});document.body.appendChild(i);var o=e.createElement("span",{id:t+"_label",className:"e-pv-annotation-thickness-label"});o.textContent=this.pdfViewer.localeObj.getConstant("Line Thickness");var s=e.createElement("div",{id:t+"_slider"});return this.thicknessSlider=new n.Slider({type:"MinRange",cssClass:"e-pv-annotation-thickness-slider",max:12,min:0}),this.thicknessIndicator=e.createElement("div",{id:t+"_thickness_indicator",className:"e-pv-annotation-thickness-indicator"}),this.thicknessIndicator.textContent="0 pt",this.pdfViewer.enableRtl?(i.appendChild(this.thicknessIndicator),i.appendChild(s),this.thicknessSlider.enableRtl=!0,this.thicknessSlider.appendTo(s),i.appendChild(o)):(i.appendChild(o),i.appendChild(s),this.thicknessSlider.appendTo(s),i.appendChild(this.thicknessIndicator)),this.thicknessSlider.element.parentElement.classList.add("e-pv-annotation-thickness-slider-container"),i},i.prototype.afterToolbarCreation=function(){this.highlightItem=this.primaryToolbar.addClassToolbarItem("_highlight","e-pv-highlight",this.pdfViewer.localeObj.getConstant("Highlight")),this.underlineItem=this.primaryToolbar.addClassToolbarItem("_underline","e-pv-underline",this.pdfViewer.localeObj.getConstant("Underline")),this.strikethroughItem=this.primaryToolbar.addClassToolbarItem("_strikethrough","e-pv-strikethrough",this.pdfViewer.localeObj.getConstant("Strikethrough")),this.deleteItem=this.primaryToolbar.addClassToolbarItem("_annotation_delete","e-pv-annotation-delete",this.pdfViewer.localeObj.getConstant("Delete")),this.freeTextEditItem=this.primaryToolbar.addClassToolbarItem("_annotation_freeTextEdit","e-pv-annotation-freeTextEdit",this.pdfViewer.localeObj.getConstant("Free Text")),this.inkAnnotationItem=this.primaryToolbar.addClassToolbarItem("_annotation_ink","e-pv-annotation-ink",this.pdfViewer.localeObj.getConstant("Draw Ink")),this.commentItem=this.primaryToolbar.addClassToolbarItem("_annotation_commentPanel","e-pv-annotation-comment-panel",this.pdfViewer.localeObj.getConstant("Comment Panel")),this.closeItem=this.primaryToolbar.addClassToolbarItem("_annotation_close","e-pv-annotation-tools-close",null),this.selectAnnotationDeleteItem(!1),this.enableTextMarkupAnnotationPropertiesTools(!1),this.enableCommentPanelTool(this.pdfViewer.enableCommentPanel)},i.prototype.onToolbarClicked=function(t){var e=this.pdfViewer.selectedItems.annotations[0];switch(t.originalEvent.target.id&&this.pdfViewer.toolbarModule.updateStampItems(),t.originalEvent.target.id){case this.pdfViewer.element.id+"_highlight":case this.pdfViewer.element.id+"_highlightIcon":this.pdfViewer.tool="",this.resetFreeTextAnnot(),this.handleHighlight();break;case this.pdfViewer.element.id+"_underline":case this.pdfViewer.element.id+"_underlineIcon":this.pdfViewer.tool="",this.resetFreeTextAnnot(),this.handleUnderline();break;case this.pdfViewer.element.id+"_strikethrough":case this.pdfViewer.element.id+"_strikethroughIcon":this.pdfViewer.tool="",this.resetFreeTextAnnot(),this.handleStrikethrough();break;case this.pdfViewer.element.id+"_annotation_delete":case this.pdfViewer.element.id+"_annotation_deleteIcon":this.pdfViewer.annotationModule.deleteAnnotation(),this.resetFreeTextAnnot();break;case this.pdfViewer.element.id+"_annotation_commentPanel":case this.pdfViewer.element.id+"_annotation_commentPanelIcon":this.inkAnnotationSelected=!1;var i=document.getElementById(this.pdfViewer.element.id+"_commantPanel");this.pdfViewer.annotation&&this.pdfViewer.annotation.textMarkupAnnotationModule&&this.pdfViewer.annotation.textMarkupAnnotationModule.showHideDropletDiv(!0),"block"===i.style.display?this.pdfViewerBase.navigationPane.closeCommentPanelContainer():this.pdfViewer.annotationModule.showCommentsPanel();break;case this.pdfViewer.element.id+"_annotation_close":case this.pdfViewer.element.id+"_annotation_closeIcon":this.inkAnnotationSelected=!1,"block"===document.getElementById(this.pdfViewer.element.id+"_commantPanel").style.display&&this.pdfViewerBase.navigationPane.closeCommentPanelContainer(),this.showAnnotationToolbar(this.primaryToolbar.annotationItem);break;case this.pdfViewer.element.id+"_annotation_freeTextEdit":case this.pdfViewer.element.id+"_annotation_freeTextEditIcon":this.resetFreeTextAnnot(),this.handleFreeTextEditor();break;case this.pdfViewer.element.id+"_annotation_signature":case this.pdfViewer.element.id+"_annotation_signatureIcon":this.inkAnnotationSelected=!1,this.updateSignatureCount();break;case this.pdfViewer.element.id+"_annotation_ink":case this.pdfViewer.element.id+"_annotation_inkIcon":if(e&&this.pdfViewer.fireAnnotationUnSelect(e.annotName,e.pageIndex,e),this.pdfViewer.clearSelection(this.pdfViewer.currentPageNumber-1),this.pdfViewer.annotationModule.inkAnnotationModule){var n=this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber;n&&""!==n&&(this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(parseInt(n)),this.primaryToolbar.deSelectItem(this.inkAnnotationItem))}this.inkAnnotationSelected?this.inkAnnotationSelected=!1:(this.deselectAllItems(),this.drawInkAnnotation())}},i.prototype.addInkAnnotation=function(){if(this.pdfViewer.clearSelection(this.pdfViewer.currentPageNumber-1),this.pdfViewer.annotationModule.inkAnnotationModule){var t=this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber;t&&""!==t&&(this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(parseInt(t)),e.isBlazor()||this.primaryToolbar.deSelectItem(this.inkAnnotationItem))}this.inkAnnotationSelected?this.inkAnnotationSelected=!1:(e.isBlazor()||this.deselectAllItems(),this.drawInkAnnotation())},i.prototype.deselectInkAnnotation=function(){this.primaryToolbar.deSelectItem(this.inkAnnotationItem)},i.prototype.drawInkAnnotation=function(){this.inkAnnotationSelected=!0,e.isBlazor()||(this.primaryToolbar.selectItem(this.inkAnnotationItem),this.enableSignaturePropertiesTools(!0)),this.pdfViewerBase.isToolbarInkClicked=!0,this.pdfViewer.annotationModule.inkAnnotationModule.drawInk()},i.prototype.resetFreeTextAnnot=function(){if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.freeTextAnnotationModule&&(this.pdfViewer.annotation.freeTextAnnotationModule.isNewFreeTextAnnot=!1,this.pdfViewer.annotation.freeTextAnnotationModule.isNewAddedAnnot=!1,this.freeTextEditItem&&!e.isBlazor()&&(this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.enableFreeTextAnnotationPropertiesTools(!1))),this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule){var t=this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber;t&&""!==t&&(this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(parseInt(t)),e.isBlazor()||this.primaryToolbar.deSelectItem(this.inkAnnotationItem))}this.inkAnnotationSelected=!1},i.prototype.updateInkannotationItems=function(){if(this.pdfViewer.annotationModule&&this.pdfViewer.annotationModule.inkAnnotationModule&&this.inkAnnotationSelected){var t=this.pdfViewer.annotationModule.inkAnnotationModule.currentPageNumber;t&&""!==t&&(this.pdfViewer.annotationModule.inkAnnotationModule.drawInkAnnotation(parseInt(t)),this.pdfViewerBase.isToolbarInkClicked=!0,this.pdfViewer.tool="Ink",this.pdfViewer.clearSelection(t))}},i.prototype.showSignaturepanel=function(){this.pdfViewerBase.isToolbarSignClicked=!0,this.pdfViewerBase.signatureModule.showSignatureDialog(!0)},i.prototype.handleFreeTextEditor=function(){var t=this.pdfViewer.selectedItems.annotations[0];this.enableFreeTextAnnotationPropertiesTools(!0),t&&this.pdfViewer.fireAnnotationUnSelect(t.annotName,t.pageIndex,t),this.pdfViewer.clearSelection(this.pdfViewer.currentPageNumber-1),this.pdfViewer.annotationModule.textMarkupAnnotationModule&&(this.pdfViewer.annotationModule.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1),this.isStrikethroughEnabled=!1,this.isHighlightEnabled=!1,this.isUnderlineEnabled=!1;var e=this.pdfViewer.annotation.freeTextAnnotationModule;e.setAnnotationType("FreeText"),e.isNewFreeTextAnnot=!0,e.isNewAddedAnnot=!0,this.updateInteractionTools(),this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.primaryToolbar.selectItem(this.freeTextEditItem),this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.annotationModule.freeTextAnnotationModule.fillColor),this.updateColorInIcon(this.strokeDropDownElement,this.pdfViewer.annotationModule.freeTextAnnotationModule.borderColor),this.updateColorInIcon(this.fontColorElement,this.pdfViewer.annotationModule.freeTextAnnotationModule.fontColor),this.updateFontFamilyInIcon(this.pdfViewer.annotationModule.freeTextAnnotationModule.fontFamily),this.updateFontSizeInIcon(this.pdfViewer.annotationModule.freeTextAnnotationModule.fontSize),this.updateTextAlignInIcon(this.pdfViewer.annotationModule.freeTextAnnotationModule.textAlign),this.updateFontFamily()},i.prototype.updateFontFamily=function(){this.pdfViewer.annotationModule.freeTextAnnotationModule.isBold?this.updateFontFamilyIcon("_bold",!0):this.updateFontFamilyIcon("_bold",!1),this.pdfViewer.annotationModule.freeTextAnnotationModule.isItalic?this.updateFontFamilyIcon("_italic",!0):this.updateFontFamilyIcon("_italic",!1),this.pdfViewer.annotationModule.freeTextAnnotationModule.isUnderline?(this.updateFontFamilyIcon("_underline_textinput",!0),this.updateFontFamilyIcon("_strikeout",!1)):this.updateFontFamilyIcon("_underline_textinput",!1),this.pdfViewer.annotationModule.freeTextAnnotationModule.isStrikethrough?(this.updateFontFamilyIcon("_strikeout",!0),this.updateFontFamilyIcon("_underline_textinput",!1)):this.updateFontFamilyIcon("_strikeout",!1)},i.prototype.updateFontFamilyIcon=function(t,e){var i=document.getElementById(this.pdfViewer.element.id+t);e?i.classList.add("textprop-option-active"):i.classList.remove("textprop-option-active")},i.prototype.showAnnotationToolbar=function(t,e){if(this.isToolbarHidden){var i=this.toolbarElement.style.display;this.toolbarElement.style.display="block",e||(this.pdfViewer.isAnnotationToolbarVisible=!0),t?this.primaryToolbar.selectItem(t):this.pdfViewer.enableToolbar&&this.primaryToolbar.selectItem(this.primaryToolbar.annotationItem),"none"===i&&this.adjustViewer(!0)}else{var n=this.pdfViewer.annotationModule;t?this.primaryToolbar.deSelectItem(t):this.pdfViewer.enableToolbar&&this.primaryToolbar.deSelectItem(this.primaryToolbar.annotationItem),this.adjustViewer(!1),n&&n.textMarkupAnnotationModule&&n.textMarkupAnnotationModule.currentTextMarkupAnnotation?this.enablePropertiesTool(n):this.deselectAllItems(),this.toolbarElement.style.display="none",e||(this.pdfViewer.isAnnotationToolbarVisible=!1),this.pdfViewerBase.isPanMode?this.primaryToolbar.updateInteractionTools(!1):this.primaryToolbar.updateInteractionTools(!0)}this.pdfViewer.magnification&&"fitToPage"===this.pdfViewer.magnification.fitType&&this.pdfViewer.magnification.fitToPage(),this.enableAnnotationAddTools(!0),this.isToolbarHidden=!this.isToolbarHidden},i.prototype.enablePropertiesTool=function(t){this.isHighlightEnabled=!1,this.isUnderlineEnabled=!1,this.isStrikethroughEnabled=!1,this.pdfViewerBase.isTextMarkupAnnotationModule()&&(t.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1),this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.enableTextMarkupAnnotationPropertiesTools(!0),this.updateColorInIcon(this.colorDropDownElement,t.textMarkupAnnotationModule.currentTextMarkupAnnotation.color),this.selectAnnotationDeleteItem(!0)},i.prototype.applyAnnotationToolbarSettings=function(){this.pdfViewer.toolbarSettings.annotationToolbarItems&&(-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("HighlightTool")?this.showHighlightTool(!0):this.showHighlightTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("UnderlineTool")?this.showUnderlineTool(!0):this.showUnderlineTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("StrikethroughTool")?this.showStrikethroughTool(!0):this.showStrikethroughTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("ShapeTool")?this.showShapeAnnotationTool(!0):this.showShapeAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("CalibrateTool")?this.showCalibrateAnnotationTool(!0):this.showCalibrateAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("ColorEditTool")?this.showColorEditTool(!0):this.showColorEditTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("StrokeColorEditTool")?this.showStrokeColorEditTool(!0):this.showStrokeColorEditTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("ThicknessEditTool")?this.showThicknessEditTool(!0):this.showThicknessEditTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("OpacityEditTool")?this.showOpacityEditTool(!0):this.showOpacityEditTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("AnnotationDeleteTool")?this.showAnnotationDeleteTool(!0):this.showAnnotationDeleteTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("StampAnnotationTool")?this.showStampAnnotationTool(!0):this.showStampAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("HandWrittenSignatureTool")?this.showSignatureTool(!0):this.showSignatureTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FreeTextAnnotationTool")?this.showFreeTextAnnotationTool(!0):this.showFreeTextAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontFamilyAnnotationTool")?this.showFontFamilyAnnotationTool(!0):this.showFontFamilyAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontSizeAnnotationTool")?this.showFontSizeAnnotationTool(!0):this.showFontSizeAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontStylesAnnotationTool")?this.showFontStylesAnnotationTool(!0):this.showFontStylesAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontAlignAnnotationTool")?this.showFontAlignAnnotationTool(!0):this.showFontAlignAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("FontColorAnnotationTool")?this.showFontColorAnnotationTool(!0):this.showFontColorAnnotationTool(!1),-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("CommentPanelTool")?this.showCommentPanelTool(!0):this.showCommentPanelTool(!1),this.showInkAnnotationTool(),this.showSeparator())},i.prototype.showInkAnnotationTool=function(){-1!==this.pdfViewer.toolbarSettings.annotationToolbarItems.indexOf("InkAnnotationTool")?this.showInkTool(!0):this.showInkTool(!1)},i.prototype.showSeparator=function(){this.isHighlightBtnVisible||this.isUnderlineBtnVisible||this.isStrikethroughBtnVisible||this.applyHideToToolbar(!1,3,3),this.isShapeBtnVisible||this.applyHideToToolbar(!1,5,5),this.isCalibrateBtnVisible||this.applyHideToToolbar(!1,7,7),this.isFreeTextBtnVisible||this.applyHideToToolbar(!1,9,9),this.isStampBtnVisible||this.applyHideToToolbar(!1,11,11),this.isSignatureBtnVisible||this.applyHideToToolbar(!1,13,13),this.isInkBtnVisible||this.applyHideToToolbar(!1,15,15),this.isFontFamilyToolVisible||this.isFontSizeToolVisible||this.isFontColorToolVisible||this.isFontAlignToolVisible||this.isFontStylesToolVisible||this.applyHideToToolbar(!1,21,21),(this.isColorToolVisible||this.isStrokeColorToolVisible||this.isThicknessToolVisible||this.isOpacityToolVisible)&&this.isDeleteAnnotationToolVisible||this.applyHideToToolbar(!1,26,26)},i.prototype.showHighlightTool=function(t){this.isHighlightBtnVisible=t,this.applyHideToToolbar(t,0,0)},i.prototype.showUnderlineTool=function(t){this.isUnderlineBtnVisible=t,this.applyHideToToolbar(t,1,1)},i.prototype.showStrikethroughTool=function(t){this.isStrikethroughBtnVisible=t,this.applyHideToToolbar(t,2,2)},i.prototype.showShapeAnnotationTool=function(t){this.isShapeBtnVisible=t,this.applyHideToToolbar(t,4,4)},i.prototype.showCalibrateAnnotationTool=function(t){this.isCalibrateBtnVisible=t,this.applyHideToToolbar(t,6,6)},i.prototype.showFreeTextAnnotationTool=function(t){this.isFreeTextBtnVisible=t,this.applyHideToToolbar(t,8,8)},i.prototype.showStampAnnotationTool=function(t){this.isStampBtnVisible=t,this.applyHideToToolbar(t,10,10)},i.prototype.showSignatureTool=function(t){this.isSignatureBtnVisible=t,this.applyHideToToolbar(t,12,12)},i.prototype.showInkTool=function(t){this.isInkBtnVisible=t,this.applyHideToToolbar(t,14,14)},i.prototype.showFontFamilyAnnotationTool=function(t){this.isFontFamilyToolVisible=t,this.applyHideToToolbar(t,16,16)},i.prototype.showFontSizeAnnotationTool=function(t){this.isFontSizeToolVisible=t,this.applyHideToToolbar(t,17,17)},i.prototype.showFontAlignAnnotationTool=function(t){this.isFontAlignToolVisible=t,this.applyHideToToolbar(t,18,18)},i.prototype.showFontColorAnnotationTool=function(t){this.isFontColorToolVisible=t,this.applyHideToToolbar(t,19,19)},i.prototype.showFontStylesAnnotationTool=function(t){this.isFontStylesToolVisible=t,this.applyHideToToolbar(t,20,20)},i.prototype.showColorEditTool=function(t){this.isColorToolVisible=t,this.applyHideToToolbar(t,22,22)},i.prototype.showStrokeColorEditTool=function(t){this.isStrokeColorToolVisible=t,this.applyHideToToolbar(t,23,23)},i.prototype.showThicknessEditTool=function(t){this.isThicknessToolVisible=t,this.applyHideToToolbar(t,24,24)},i.prototype.showOpacityEditTool=function(t){this.isOpacityToolVisible=t,this.applyHideToToolbar(t,25,25)},i.prototype.showAnnotationDeleteTool=function(t){this.isDeleteAnnotationToolVisible=t,this.applyHideToToolbar(t,27,27)},i.prototype.showCommentPanelTool=function(t){this.isCommentPanelBtnVisible=t,this.applyHideToToolbar(t,28,28)},i.prototype.applyHideToToolbar=function(t,e,i){for(var n=!t,o=e;o<=i;o++)this.toolbar.hideItem(o,n)},i.prototype.adjustViewer=function(t){var i,n,o;if(e.isBlazor()){i=this.pdfViewer.element.querySelector(".e-pv-sidebar-toolbar-splitter"),n=this.pdfViewer.element.querySelector(".e-pv-toolbar");var s=this.pdfViewer.element.querySelector(".e-pv-annotation-toolbar");o=this.getToolbarHeight(s)}else i=this.pdfViewerBase.getElement("_sideBarToolbarSplitter"),n=this.pdfViewerBase.getElement("_toolbarContainer"),o=this.getToolbarHeight(this.toolbarElement);var a=this.getToolbarHeight(n),r=this.pdfViewerBase.navigationPane.sideBarToolbar,l=this.pdfViewerBase.navigationPane.sideBarContentContainer,u=this.pdfViewerBase.navigationPane.commentPanelContainer,M=this.pdfViewerBase.navigationPane.commentPanelResizer;t?(this.pdfViewer.enableToolbar?(r.style.top=a+o+"px",l.style.top=a+o+"px",i.style.top=a+o+"px",u.style.top=a+o+"px",M.style.top=a+o+"px"):(r.style.top=o+"px",l.style.top=o+"px",i.style.top=o+"px",u.style.top=o+"px",M.style.top=a+o+"px"),this.pdfViewer.enableToolbar||(a=0),this.pdfViewerBase.viewerContainer.style.height=this.updateViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer),o+a)+"px",r.style.height=this.getNavigationToolbarHeight(o+a)+"px",i.style.height=this.getNavigationToolbarHeight(o+a)+"px"):(this.pdfViewer.enableToolbar?(r.style.top=a+"px",l.style.top=a+"px",i.style.top=a+"px",u.style.top=a+"px",M.style.top=a+"px"):(r.style.top="1px",r.style.height="100%",l.style.top="1px",l.style.height="100%",i.style.top="1px",i.style.height="100%",u.style.top="1px",u.style.height="100%",M.style.top="1px",M.style.height="100%"),this.pdfViewer.enableToolbar||(a=0),this.pdfViewerBase.viewerContainer.style.height=this.resetViewerHeight(this.getElementHeight(this.pdfViewerBase.viewerContainer),o)+"px",r.style.height=this.getNavigationToolbarHeight(a),i.style.height=this.getNavigationToolbarHeight(a),"0px"===this.pdfViewerBase.viewerContainer.style.height&&(this.pdfViewerBase.viewerContainer.style.height=parseInt(this.pdfViewer.element.style.height)-parseInt(r.style.top)+"px")),e.isBlazor()?this.updateContentContainerHeight(t,!0):this.updateContentContainerHeight(t)},i.prototype.updateContentContainerHeight=function(t,e){var i;if(e){var n=this.pdfViewer.element.querySelector(".e-pv-annotation-toolbar");i=this.getToolbarHeight(n)}else i=this.getToolbarHeight(this.toolbarElement);var o=this.pdfViewerBase.navigationPane.sideBarContentContainer.getBoundingClientRect();0!==o.height&&(this.pdfViewerBase.navigationPane.sideBarContentContainer.style.height=t?o.height-i+"px":o.height+i+"px")},i.prototype.getToolbarHeight=function(t){var e=t.getBoundingClientRect().height;return 0===e&&t===this.pdfViewerBase.getElement("_toolbarContainer")&&(e=parseFloat(window.getComputedStyle(t).height)+this.toolbarBorderHeight),e},i.prototype.getNavigationToolbarHeight=function(t){var e=this.pdfViewer.element.getBoundingClientRect().height;return 0!==e?e-t+"px":""},i.prototype.handleHighlight=function(){this.isHighlightEnabled?this.deselectAllItems():(this.updateInteractionTools(),this.clearShapeMode(),this.clearMeasureMode(),this.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations("Highlight"),this.primaryToolbar.selectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.primaryToolbar.deSelectItem(this.inkAnnotationItem),this.enableTextMarkupAnnotationPropertiesTools(!0),this.setCurrentColorInPicker(),this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.annotationModule.textMarkupAnnotationModule.highlightColor),this.isHighlightEnabled=!0,this.isUnderlineEnabled=!1,this.isStrikethroughEnabled=!1)},i.prototype.handleUnderline=function(){this.isUnderlineEnabled?this.deselectAllItems():(this.updateInteractionTools(),this.clearShapeMode(),this.clearMeasureMode(),this.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations("Underline"),this.primaryToolbar.selectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.primaryToolbar.deSelectItem(this.inkAnnotationItem),this.enableTextMarkupAnnotationPropertiesTools(!0),this.setCurrentColorInPicker(),this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.annotationModule.textMarkupAnnotationModule.underlineColor),this.isUnderlineEnabled=!0,this.isHighlightEnabled=!1,this.isStrikethroughEnabled=!1)},i.prototype.handleStrikethrough=function(){this.isStrikethroughEnabled?this.deselectAllItems():(this.updateInteractionTools(),this.clearShapeMode(),this.clearMeasureMode(),this.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations("Strikethrough"),this.primaryToolbar.selectItem(this.strikethroughItem),this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.primaryToolbar.deSelectItem(this.inkAnnotationItem),this.enableTextMarkupAnnotationPropertiesTools(!0),this.setCurrentColorInPicker(),this.updateColorInIcon(this.colorDropDownElement,this.pdfViewer.annotationModule.textMarkupAnnotationModule.strikethroughColor),this.isStrikethroughEnabled=!0,this.isHighlightEnabled=!1,this.isUnderlineEnabled=!1)},i.prototype.deselectAllItems=function(){this.isHighlightEnabled=!1,this.isUnderlineEnabled=!1,this.isStrikethroughEnabled=!1,this.pdfViewerBase.isTextMarkupAnnotationModule()&&(this.pdfViewer.annotationModule.textMarkupAnnotationModule.isTextMarkupAnnotationMode=!1,this.pdfViewer.annotationModule.textMarkupAnnotationModule.showHideDropletDiv(!0)),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.primaryToolbar.deSelectItem(this.highlightItem),this.primaryToolbar.deSelectItem(this.underlineItem),this.primaryToolbar.deSelectItem(this.strikethroughItem),this.primaryToolbar.deSelectItem(this.freeTextEditItem),this.primaryToolbar.deSelectItem(this.inkAnnotationItem)),this.resetFreeTextAnnot(),this.clearTextMarkupMode(),this.clearShapeMode(),this.clearMeasureMode(),this.pdfViewer.tool="",e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.enableTextMarkupAnnotationPropertiesTools(!1),this.enableFreeTextAnnotationPropertiesTools(!1),this.updateColorInIcon(this.colorDropDownElement,"#000000"),this.updateColorInIcon(this.strokeDropDownElement,"#000000"),this.updateColorInIcon(this.fontColorElement,"#000000"),this.selectAnnotationDeleteItem(!1)),this.pdfViewer.annotationModule&&(this.pdfViewer.annotationModule.freeTextAnnotationModule.isNewFreeTextAnnot=!1)},i.prototype.updateInteractionTools=function(){this.pdfViewerBase.initiateTextSelectMode(),this.pdfViewer.toolbar.updateInteractionTools(!0)},i.prototype.selectAnnotationDeleteItem=function(t){if(!e.isBlazor()&&this.toolbar)if(t){var i=this.pdfViewer.annotationModule.findCurrentAnnotation();i&&(i.annotationSettings&&i.annotationSettings.isLock?this.pdfViewer.annotationModule.checkAllowedInteractions("Delete",i)?this.toolbar.enableItems(this.deleteItem.parentElement,t):this.toolbar.enableItems(this.deleteItem.parentElement,!1):this.toolbar.enableItems(this.deleteItem.parentElement,t))}else this.toolbar.enableItems(this.deleteItem.parentElement,t)},i.prototype.enableTextMarkupAnnotationPropertiesTools=function(t){e.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.annotationSelect("TextMarkup"):(this.toolbar.enableItems(this.colorDropDownElement.parentElement,t),this.toolbar.enableItems(this.opacityDropDownElement.parentElement,t),e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode||(this.toolbar.enableItems(this.strokeDropDownElement.parentElement,!1),this.toolbar.enableItems(this.thicknessElement.parentElement,!1),this.toolbar.enableItems(this.fontFamilyElement.parentElement,!1),this.toolbar.enableItems(this.fontSizeElement.parentElement,!1),this.toolbar.enableItems(this.fontColorElement.parentElement,!1),this.toolbar.enableItems(this.textAlignElement.parentElement,!1),this.toolbar.enableItems(this.textPropElement.parentElement,!1)))},i.prototype.checkAnnotationPropertiesChange=function(){var t=this.pdfViewer.selectedItems.annotations[0];return!(t&&t.annotationSettings&&t.annotationSettings.isLock)||!!this.pdfViewer.annotationModule.checkAllowedInteractions("PropertyChange",t)},i.prototype.enableAnnotationPropertiesTools=function(t){var i=this.checkAnnotationPropertiesChange();t||(i=!0),e.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.enableAnnotationPropertiesTool(t,i):i&&(this.pdfViewer.selectedItems.annotations[0]&&"Line"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType?this.toolbar.enableItems(this.colorDropDownElement.parentElement,!1):this.toolbar.enableItems(this.colorDropDownElement.parentElement,t),this.toolbar.enableItems(this.opacityDropDownElement.parentElement,t),this.toolbar.enableItems(this.strokeDropDownElement.parentElement,t),this.toolbar.enableItems(this.thicknessElement.parentElement,t),this.pdfViewer.enableShapeLabel&&(this.toolbar.enableItems(this.fontFamilyElement.parentElement,t),this.toolbar.enableItems(this.fontSizeElement.parentElement,t),this.toolbar.enableItems(this.fontColorElement.parentElement,t)),this.toolbar.enableItems(this.textAlignElement.parentElement,!1),this.toolbar.enableItems(this.textPropElement.parentElement,!1))},i.prototype.enableSignaturePropertiesTools=function(t){var i=this.checkAnnotationPropertiesChange();t||(i=!0),e.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.enableSignaturePropertiesTools(t,i):i&&(this.toolbar.enableItems(this.colorDropDownElement.parentElement,!1),this.toolbar.enableItems(this.opacityDropDownElement.parentElement,t),this.toolbar.enableItems(this.strokeDropDownElement.parentElement,t),this.toolbar.enableItems(this.thicknessElement.parentElement,t),this.toolbar.enableItems(this.textAlignElement.parentElement,!1),this.toolbar.enableItems(this.textPropElement.parentElement,!1),this.toolbar.enableItems(this.fontFamilyElement.parentElement,!1),this.toolbar.enableItems(this.fontSizeElement.parentElement,!1),this.toolbar.enableItems(this.fontColorElement.parentElement,!1),this.toolbar.enableItems(this.textAlignElement.parentElement,!1))},i.prototype.enableStampAnnotationPropertiesTools=function(t){var i=this.checkAnnotationPropertiesChange();t||(i=!0),e.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.enableStampAnnotationPropertiesTools(t,i):i&&(this.toolbar.enableItems(this.opacityDropDownElement.parentElement,t),this.toolbar.enableItems(this.colorDropDownElement.parentElement,!1),this.toolbar.enableItems(this.strokeDropDownElement.parentElement,!1),this.toolbar.enableItems(this.thicknessElement.parentElement,!1),this.toolbar.enableItems(this.fontFamilyElement.parentElement,!1),this.toolbar.enableItems(this.fontSizeElement.parentElement,!1),this.toolbar.enableItems(this.fontColorElement.parentElement,!1),this.toolbar.enableItems(this.textAlignElement.parentElement,!1),this.toolbar.enableItems(this.textPropElement.parentElement,!1))},i.prototype.enableFreeTextAnnotationPropertiesTools=function(t){var i=this.checkAnnotationPropertiesChange();t||(i=!0),e.isBlazor()?this.pdfViewerBase.blazorUIAdaptor.enableFreeTextAnnotationPropertiesTools(t,i):i&&(this.toolbar.enableItems(this.opacityDropDownElement.parentElement,t),this.toolbar.enableItems(this.colorDropDownElement.parentElement,t),this.toolbar.enableItems(this.strokeDropDownElement.parentElement,t),this.toolbar.enableItems(this.thicknessElement.parentElement,t),this.toolbar.enableItems(this.fontFamilyElement.parentElement,t),this.toolbar.enableItems(this.fontSizeElement.parentElement,t),this.toolbar.enableItems(this.fontColorElement.parentElement,t),this.toolbar.enableItems(this.textAlignElement.parentElement,t),this.toolbar.enableItems(this.textPropElement.parentElement,t))},i.prototype.enableAnnotationAddTools=function(t){this.toolbar&&(this.pdfViewer.enableTextMarkupAnnotation&&(this.toolbar.enableItems(this.highlightItem.parentElement,t),this.toolbar.enableItems(this.underlineItem.parentElement,t),this.toolbar.enableItems(this.strikethroughItem.parentElement,t)),this.pdfViewer.enableShapeAnnotation&&this.toolbar.enableItems(this.shapeElement.parentElement,t),this.pdfViewer.enableStampAnnotations&&this.toolbar.enableItems(this.stampElement.parentElement,t),this.pdfViewer.enableMeasureAnnotation&&this.pdfViewerBase.isCalibrateAnnotationModule()&&this.toolbar.enableItems(this.calibrateElement.parentElement,t),this.pdfViewer.enableFreeText&&this.toolbar.enableItems(this.freeTextEditItem.parentElement,t),this.pdfViewer.enableHandwrittenSignature&&this.toolbar.enableItems(this.handWrittenSignatureItem.parentElement,t),this.pdfViewer.enableInkAnnotation&&this.toolbar.enableItems(this.inkAnnotationItem.parentElement,t),this.pdfViewer.enableCommentPanel&&this.enableCommentPanelTool(t))},i.prototype.isAnnotationButtonsEnabled=function(){var t=!1;return(this.isHighlightEnabled||this.isUnderlineEnabled||this.isStrikethroughEnabled)&&(t=!0),t},i.prototype.enableCommentPanelTool=function(t){this.toolbar.enableItems(this.commentItem.parentElement,t)},i.prototype.updateToolbarItems=function(){this.pdfViewer.enableTextMarkupAnnotation?this.enableTextMarkupAddTools(!0):this.enableTextMarkupAddTools(!1),this.toolbar.enableItems(this.shapeElement.parentElement,this.pdfViewer.enableShapeAnnotation),this.toolbar.enableItems(this.stampElement.parentElement,this.pdfViewer.enableStampAnnotations),this.toolbar.enableItems(this.calibrateElement.parentElement,this.pdfViewer.enableMeasureAnnotation),this.toolbar.enableItems(this.freeTextEditItem.parentElement,this.pdfViewer.enableFreeText),this.toolbar.enableItems(this.handWrittenSignatureItem.parentElement,this.pdfViewer.enableHandwrittenSignature),this.toolbar.enableItems(this.inkAnnotationItem.parentElement,this.pdfViewer.enableInkAnnotation)},i.prototype.enableTextMarkupAddTools=function(t){this.toolbar.enableItems(this.highlightItem.parentElement,t),this.toolbar.enableItems(this.underlineItem.parentElement,t),this.toolbar.enableItems(this.strikethroughItem.parentElement,t)},i.prototype.updateAnnnotationPropertyItems=function(){e.isBlazor()?(this.colorDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-color-container"),this.strokeDropDownElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-stroke-container"),this.fontColorElementInBlazor=this.pdfViewer.element.querySelector(".e-pv-annotation-textcolor-container"),1===this.pdfViewer.selectedItems.annotations.length?(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.colorDropDownElementInBlazor,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill,"fillColor")),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.strokeDropDownElementInBlazor,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor,"strokeColor")),"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.fontColorElementInBlazor,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].fontColor,"fontColor")),this.pdfViewerBase.blazorUIAdaptor.updateFontFamilyInIcon(this.pdfViewer.selectedItems.annotations[0].fontFamily),this.pdfViewerBase.blazorUIAdaptor.updateFontSizeInIcon(this.pdfViewer.selectedItems.annotations[0].fontSize))):(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.colorDropDownElementInBlazor,"#000000"),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.strokeDropDownElementInBlazor,"#000000"),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.fontColorElementInBlazor,"#000000"))):1===this.pdfViewer.selectedItems.annotations.length?(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.colorDropDownElement,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.fill,"fillColor")),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.strokeDropDownElement,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].wrapper.children[0].style.strokeColor,"strokeColor")),"FreeText"===this.pdfViewer.selectedItems.annotations[0].shapeAnnotationType&&(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.fontColorElement,this.getColorHexValue(this.pdfViewer.selectedItems.annotations[0].fontColor,"fontColor")),this.pdfViewer.toolbar.annotationToolbarModule.updateFontFamilyInIcon(this.pdfViewer.selectedItems.annotations[0].fontFamily),this.pdfViewer.toolbar.annotationToolbarModule.updateFontSizeInIcon(this.pdfViewer.selectedItems.annotations[0].fontSize),this.pdfViewer.toolbar.annotationToolbarModule.updateTextAlignInIcon(this.pdfViewer.selectedItems.annotations[0].textAlign))):(this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.colorDropDownElement,"#000000"),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.strokeDropDownElement,"#000000"),this.pdfViewer.toolbar.annotationToolbarModule.updateColorInIcon(this.fontColorElement,"#000000"))},i.prototype.getColorHexValue=function(t,i){return"#ffffff00"===t&&(t="#ffffff"),"red"===t.toLowerCase()&&(t="#FF0000"),"transparent"!==t?e.isBlazor()?t:this.colorPalette.getValue(t,"hex"):"fontColor"===i||"strokeColor"===i?"#000000":"#ffffff"},i.prototype.setColorInPicker=function(t,e){t.setProperties({value:e},!0)},i.prototype.resetToolbar=function(){this.adjustViewer(!1),this.updateToolbarItems(),(this.pdfViewer.isAnnotationToolbarOpen||this.pdfViewer.isAnnotationToolbarVisible)&&this.pdfViewer.enableAnnotationToolbar?(this.toolbarElement.style.display="",this.isToolbarHidden=!1,this.adjustViewer(!0),this.enableAnnotationAddTools(!1),this.pdfViewer.isAnnotationToolbarVisible=!0):(this.toolbarElement.style.display="none",this.isToolbarHidden=!0,this.pdfViewer.isAnnotationToolbarVisible=!1)},i.prototype.clearTextMarkupMode=function(){this.pdfViewerBase.isTextMarkupAnnotationModule()&&(this.pdfViewer.annotation.textMarkupAnnotationModule.currentTextMarkupAddMode="")},i.prototype.clearShapeMode=function(){this.pdfViewerBase.isShapeAnnotationModule()&&(this.pdfViewer.annotation.shapeAnnotationModule.currentAnnotationMode="")},i.prototype.clearMeasureMode=function(){this.pdfViewerBase.isCalibrateAnnotationModule()&&(this.pdfViewer.annotation.measureAnnotationModule.currentAnnotationMode="")},i.prototype.clear=function(){this.deselectAllItems()},i.prototype.destroy=function(){this.colorDropDown.destroy(),this.opacityDropDown.destroy(),this.strokeDropDown.destroy(),this.thicknessDropDown.destroy(),this.shapeDropDown.destroy(),this.calibrateDropDown.destroy(),this.toolbar.destroy(),this.fontColorDropDown.destroy(),this.textAlignDropDown.destroy(),this.textPropertiesDropDown.destroy();var t=document.getElementById(this.pdfViewer.element.id+"_stampElement");t&&t.parentElement.removeChild(t)},i.prototype.getElementHeight=function(t){try{return t.getBoundingClientRect().height}catch(t){return 0}},i.prototype.updateViewerHeight=function(t,e){return this.getElementHeight(this.pdfViewer.element)-e},i.prototype.resetViewerHeight=function(t,e){return t+e},i.prototype.afterAnnotationToolbarCreationInBlazor=function(){this.HighlightElement=document.getElementById(this.pdfViewer.element.id+"_highLight").children[0],this.UnderlineElement=document.getElementById(this.pdfViewer.element.id+"_underline").children[0],this.StrikethroughElement=document.getElementById(this.pdfViewer.element.id+"_strikethrough").children[0],this.HighlightElement=this.addClassToToolbarInBlazor(this.HighlightElement,"e-pv-highlight","_highLight"),this.UnderlineElement=this.addClassToToolbarInBlazor(this.UnderlineElement,"e-pv-underline","_underline"),this.StrikethroughElement=this.addClassToToolbarInBlazor(this.StrikethroughElement,"e-pv-strikethrough","_strikethrough")},i.prototype.addClassToToolbarInBlazor=function(t,e,i){if(t.classList.add(e),t.classList.add("e-pv-tbar-btn"),t.childNodes.length>0){var n=t.childNodes[0];n&&n.classList&&(n.id=this.pdfViewer.element.id+i+"Icon",n.classList.remove("e-icons"),n.classList.remove("e-btn-icon"),this.pdfViewer.enableRtl&&n.classList.add("e-right"))}return t},i.prototype.handleHighlightInBlazor=function(){this.HighlightElement.classList.contains("e-pv-select")?this.primaryToolbar.deSelectItem(this.HighlightElement):this.HighlightElement.classList.contains("e-pv-select")||this.primaryToolbar.selectItem(this.HighlightElement),this.StrikethroughElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.StrikethroughElement),this.UnderlineElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.UnderlineElement)},i.prototype.handleUnderlineInBlazor=function(){this.UnderlineElement.classList.contains("e-pv-select")?this.primaryToolbar.deSelectItem(this.UnderlineElement):this.UnderlineElement.classList.contains("e-pv-select")||this.primaryToolbar.selectItem(this.UnderlineElement),this.StrikethroughElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.StrikethroughElement),this.HighlightElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.HighlightElement)},i.prototype.handleStrikethroughInBlazor=function(){this.StrikethroughElement.classList.contains("e-pv-select")?this.primaryToolbar.deSelectItem(this.StrikethroughElement):this.StrikethroughElement.classList.contains("e-pv-select")||this.primaryToolbar.selectItem(this.StrikethroughElement),this.HighlightElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.HighlightElement),this.UnderlineElement.classList.contains("e-pv-select")&&this.primaryToolbar.deSelectItem(this.UnderlineElement)},i}(),si=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ai=function(t,e,i,n){var o,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s<3?o(a):s>3?o(e,i,a):o(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a},ri=function(t,e,i,n){return new(i||(i=Promise))(function(o,s){function a(t){try{l(n.next(t))}catch(t){s(t)}}function r(t){try{l(n.throw(t))}catch(t){s(t)}}function l(t){t.done?o(t.value):new i(function(e){e(t.value)}).then(a,r)}l((n=n.apply(t,e||[])).next())})},li=function(t,e){function i(t){return function(e){return n([t,e])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=2&i[0]?s.return:i[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]=0&&(s&&this.fireAnnotationUnSelect(s.annotName,s.pageIndex,s),this.clearSelection(this.viewerBase.activeElements.activePageID)),this.drawing.select(t,e,i,n)},n.prototype.getPageTable=function(t){return this.drawing.getPageTable(t)},n.prototype.dragSelectedObjects=function(t,e,i,n,o){return this.drawing.dragSelectedObjects(t,e,i,n,o)},n.prototype.scaleSelectedItems=function(t,e,i){return this.drawing.scaleSelectedItems(t,e,i)},n.prototype.dragConnectorEnds=function(t,e,i,n,o,s,a){return this.drawing.dragConnectorEnds(t,e,i,n,o,null,a)},n.prototype.clearSelection=function(t){var e=this.selectedItems;e.annotations.length>0&&(e.offsetX=0,e.offsetY=0,e.width=0,e.height=0,e.rotateAngle=0,e.annotations=[],e.wrapper=null),this.drawing.clearSelectorLayer(t),this.viewerBase.isAnnotationSelect=!1},n.prototype.add=function(t){return this.drawing.add(t)},n.prototype.remove=function(t){return this.drawing.remove(t)},n.prototype.copy=function(){return this.annotation.isShapeCopied=!0,this.drawing.copy()},n.prototype.rotate=function(t,e){return this.drawing.rotate(this.selectedItems,t,null,e)},n.prototype.paste=function(t){var e;return this.viewerBase.activeElements.activePageID&&(e=this.viewerBase.activeElements.activePageID),this.drawing.paste(t,e||0)},n.prototype.refresh=function(){for(var t=0;t=s.top?(i.dropElementRight.style.transform="rotate(-90deg)",i.dropElementLeft.style.transform="rotate(0deg)",M=i.selectTextByTouch(e.parentElement,a,r,!0,"right",u)):(i.dropElementRight.style.transform="rotate(0deg)",i.dropElementLeft.style.transform="rotate(-90deg)",M=i.selectTextByTouch(e.parentElement,a,r,!1,"right",u)),M){var L=i.pdfViewerBase.pageSize[i.pdfViewerBase.currentPageNumber-1].top,d=i.getClientValueTop(r,i.pdfViewerBase.currentPageNumber-1),w=i.dropDivElementRight.getBoundingClientRect();i.dropDivElementRight.style.top=L*i.pdfViewerBase.getZoomFactor()+d+"px";var h=a-i.pdfViewerBase.getElement("_pageDiv_"+(i.pdfViewerBase.currentPageNumber-1)).getBoundingClientRect().left;i.topStoreRight={pageTop:L,topClientValue:i.getMagnifiedValue(d),pageNumber:i.pdfViewerBase.currentPageNumber-1,left:i.getMagnifiedValue(h),isHeightNeeded:!1},i.dropDivElementRight.style.left=a-i.pdfViewerBase.viewerContainer.getBoundingClientRect().left-w.width/2+"px",i.previousScrollDifference=l}}}},this.pdfViewer=t,this.pdfViewerBase=e}return t.prototype.textSelectionOnMouseMove=function(t,e,i,n){var o=t;if(this.isTextSearched=!0,o.nodeType===o.TEXT_NODE){this.isSelectionStartTriggered||this.pdfViewerBase.getTextMarkupAnnotationMode()||(this.pdfViewer.fireTextSelectionStart(this.pdfViewerBase.currentPageNumber),this.isSelectionStartTriggered=!0),this.isBackwardPropagatedSelection=!1;var s=o.ownerDocument.createRange(),a=window.getSelection();if(null!==a.anchorNode){var r=a.anchorNode.compareDocumentPosition(a.focusNode);(!r&&a.anchorOffset>a.focusOffset||r===Node.DOCUMENT_POSITION_PRECEDING)&&(this.isBackwardPropagatedSelection=!0)}s.selectNodeContents(o);for(var l=0,u=s.endOffset;l=e&&parseInt(C.top.toString())<=i&&C.bottom>=i&&(null!==a.anchorNode&&a.anchorNode.parentNode.classList.contains("e-pv-text")&&s.setStart(a.anchorNode,a.anchorOffset),a.removeAllRanges(),a.addRange(s),this.isTextSelection||(this.selectionStartPage=this.pdfViewerBase.currentPageNumber-1),this.isTextSelection=!0,!!document.documentMode||(this.isBackwardPropagatedSelection?a.extend(o,l):n?a.extend(o,l):a.extend(o,l+1)),s.detach()),l+=1}var L=this.pdfViewer.annotationModule;if(L&&L.textMarkupAnnotationModule&&L.textMarkupAnnotationModule.isEnableTextMarkupResizer(L.textMarkupAnnotationModule.currentTextMarkupAddMode)){var d=document.getElementById(this.pdfViewer.element.id+"_droplet_left");if(this.pdfViewerBase.isSelection&&a&&a.rangeCount>0){var w=a.getRangeAt(0).getBoundingClientRect(),h=w.left,p=w.top;this.pdfViewer.annotation.textMarkupAnnotationModule.updateLeftposition(h,p),this.pdfViewerBase.isSelection=!1}else d&&"none"===d.style.display&&this.pdfViewer.annotation.textMarkupAnnotationModule.updateLeftposition(e,i);this.pdfViewer.annotation.textMarkupAnnotationModule.updatePosition(e,i)}}else for(var c=0;c=parseInt(e.toString())&&parseInt(C.top.toString())<=i&&C.bottom>=i?(s.detach(),this.textSelectionOnMouseMove(o.childNodes[c],e,i,n)):s.detach()}},t.prototype.textSelectionOnDrag=function(t,e,i,n){var o=t;if(this.isTextSearched=!0,o.nodeType===o.TEXT_NODE){this.isBackwardPropagatedSelection=!1;var s=o.ownerDocument.createRange(),a=window.getSelection();if(null!==a.anchorNode){var r=a.anchorNode.compareDocumentPosition(a.focusNode);(!r&&a.anchorOffset>a.focusOffset||r===Node.DOCUMENT_POSITION_PRECEDING)&&(this.isBackwardPropagatedSelection=!0)}s.selectNodeContents(o);for(var l=0,u=s.endOffset;l=e&&parseInt(h.top.toString())<=i&&h.bottom>=i)return n?(null!==a.anchorNode&&a.anchorNode.parentNode.classList.contains("e-pv-text")&&s.setStart(a.anchorNode,a.anchorOffset),a.removeAllRanges(),a.addRange(s),a.extend(o,l)):a.focusNode&&(s.setEnd(a.focusNode,a.focusOffset),a.removeAllRanges(),a.addRange(s)),this.isTextSelection||(this.selectionStartPage=this.pdfViewerBase.currentPageNumber-1),this.isTextSelection=!0,s.detach(),!0;l+=1}if(this.pdfViewerBase.isSelection){var M=a.getRangeAt(0).getBoundingClientRect(),L=M.left,d=M.top;this.pdfViewer.annotation.textMarkupAnnotationModule.updateLeftposition(L,d),this.pdfViewerBase.isSelection=!1}this.pdfViewer.annotation.textMarkupAnnotationModule.updatePosition(e,i)}else for(var w=0;w=e&&parseInt(h.top.toString())<=i&&h.bottom>=i?(s.detach(),this.textSelectionOnDrag(o.childNodes[w],e,i,n)):s.detach()}return null},t.prototype.selectTextRegion=function(t,e){for(var i=null,n=t-1,o=0;o=n&&t<=n)&&(o=!0),o},t.prototype.checkTopBounds=function(t,e,i){var n=!1;return t!==parseInt(i.toString())&&parseInt(t.toString())!==parseInt(i.toString())&&parseInt((t+1).toString())!==parseInt(i.toString())&&parseInt((t-1).toString())!==parseInt(i.toString())&&e!==parseInt(i.toString())&&e!==i||(n=!0),n},t.prototype.textSelectionOnMouseLeave=function(t){var e=this;t.preventDefault();var i=this.pdfViewerBase.viewerContainer.offsetTop;this.pdfViewer.magnificationModule&&"fitToPage"===this.pdfViewer.magnificationModule.fitType||(t.clientY>i?this.scrollMoveTimer=setInterval(function(){e.scrollForwardOnSelection()},500):this.scrollMoveTimer=setInterval(function(){e.scrollBackwardOnSelection()},500))},t.prototype.scrollForwardOnSelection=function(){this.isMouseLeaveSelection=!0,this.pdfViewerBase.viewerContainer.scrollTop=this.pdfViewerBase.viewerContainer.scrollTop+200,this.stichSelectionOnScroll(this.pdfViewerBase.currentPageNumber-1)},t.prototype.scrollBackwardOnSelection=function(){this.isMouseLeaveSelection=!0,this.pdfViewerBase.viewerContainer.scrollTop=this.pdfViewerBase.viewerContainer.scrollTop-200,this.stichSelectionOnScroll(this.pdfViewerBase.currentPageNumber-1)},t.prototype.clear=function(){this.scrollMoveTimer&&(this.isMouseLeaveSelection=!1,clearInterval(this.scrollMoveTimer))},t.prototype.selectAWord=function(t,i,n,o){if(t.nodeType===t.TEXT_NODE){var s=window.getSelection();(p=t.ownerDocument.createRange()).selectNodeContents(t);for(var a=0,r=p.endOffset;a=i&&c.top<=n&&c.bottom>=n){for(var l=t.textContent,u=[],M=void 0,L=void 0,d=0;da){M=0,L=u[w];break}a>u[w]&&au[w]&&(u[w+1]||(M=u[w]))}L||(L=l.length),0===M?p.setStart(t,M):p.setStart(t,M+1),p.setEnd(t,L),s.removeAllRanges(),s.addRange(p),this.isTextSelection=!0;var h=e.isNullOrUndefined(p.startContainer.parentElement)?p.startContainer.parentNode:p.startContainer.parentElement;this.selectionStartPage=parseInt(h.id.split("_text_")[1]),o&&(this.selectionAnchorTouch={anchorNode:s.anchorNode.parentElement.id,anchorOffset:s.anchorOffset},this.selectionFocusTouch={focusNode:s.focusNode.parentElement.id,focusOffset:s.focusOffset}),e.Browser.isIE||p.detach();break}a+=1}}else for(d=0;d=i&&c.top<=n&&c.bottom>=n?(p.detach(),this.selectAWord(t.childNodes[d],i,n,o)):p.detach()}},t.prototype.getSelectionRange=function(t,e){var i=e.childNodes[t].ownerDocument.createRange();return i.selectNodeContents(e.childNodes[t]),i},t.prototype.selectEntireLine=function(t){var e=[],i=t.target,n=i.getBoundingClientRect(),o=parseInt((n.top+n.height/2).toString()),s=parseInt(t.target.id.split("_text_")[1]),a=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+"_text_"+s+'"]');if(i.classList.contains("e-pv-text")){this.pdfViewer.fireTextSelectionStart(s+1);for(var r=0;ro&&n.bottom+10>M){var L=a[r].id;""!==L&&e.push(L)}}var d=window.getSelection();d.removeAllRanges();var w=document.createRange(),h=e.length-1,p=document.getElementById(e[0]),c=document.getElementById(e[h]);c.childNodes.length>0?(w.setStart(p.childNodes[0],0),w.setEnd(c.childNodes[0],c.textContent.length)):(w.setStart(p.childNodes[0],0),w.setEnd(c,1)),this.selectionStartPage=parseInt(w.startContainer.parentElement.id.split("_text_")[1]),d.addRange(w),this.isTextSelection=!0,null!=d&&"MouseUp"===this.pdfViewer.contextMenuSettings.contextMenuAction&&this.calculateContextMenuPosition(t.clientY,t.clientY)}},t.prototype.enableTextSelectionMode=function(){this.pdfViewerBase.isTextSelectionDisabled=!1,this.pdfViewerBase.viewerContainer.classList.remove("e-disable-text-selection"),this.pdfViewerBase.viewerContainer.classList.add("e-enable-text-selection"),this.pdfViewerBase.viewerContainer.addEventListener("selectstart",function(){return!0})},t.prototype.clearTextSelection=function(){if(this.isTextSelection){if(this.pdfViewerBase.textLayer.clearDivSelection(),window.getSelection&&window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges(),this.pdfViewer.linkAnnotationModule){var t=this.pdfViewerBase.currentPageNumber-3;t=t<0?0:t;var e=this.pdfViewer.currentPageNumber+1;e=e=s;r--)this.maintainSelectionOnScroll(r,e);else for(var r=o;r<=s;r++)this.maintainSelectionOnScroll(r,e)}t||i.removeAllRanges()}},t.prototype.isSelectionAvailableOnScroll=function(t){for(var e=!1,i=this.selectionRangeArray,n=0;nu&&u>l&&r!==l)M?n.extend(n.focusNode,n.focusOffset):(a.setStart(n.anchorNode,n.anchorOffset),a.setEnd(n.focusNode,n.focusOffset));else if(ru){var L=parseInt(i.startNode.split("_"+u+"_")[1]),d=parseInt(i.endNode.split("_"+u+"_")[1]);M?u!==this.selectionRangeArray[0].pageNumber?Lo&&t>n)return;if(n===o){var r=null,l=this.getSelectionBounds(i.getRangeAt(0),t),u=this.getSelectionRectangleBounds(i.getRangeAt(0),t),M=1===this.getNodeElementFromNode(i.anchorNode).childNodes.length?i.anchorOffset:this.getCorrectOffset(i.anchorNode,i.anchorOffset),L=1===this.getNodeElementFromNode(i.focusNode).childNodes.length?i.focusOffset:this.getCorrectOffset(i.focusNode,i.focusOffset);r={isBackward:a,startNode:this.getNodeElementFromNode(i.anchorNode).id,startOffset:M,endNode:this.getNodeElementFromNode(i.focusNode).id,endOffset:L,textContent:i.toString(),pageNumber:t,bound:l,rectangleBounds:u},this.pushSelectionRangeObject(r,t)}else(r=this.createRangeObjectOnScroll(t,n,o))&&(this.pushSelectionRangeObject(r,t),e&&this.stichSelection(a,i,t))}},t.prototype.getCorrectOffset=function(t,e){for(var i=0,n=this.getNodeElementFromNode(t),o=0;o0){var n=this.selectionRangeArray.indexOf(i[0]);return void this.selectionRangeArray.splice(n,1,t)}}var o=this.selectionRangeArray.filter(function(t){return t.pageNumber===e+1});if(0===o.length)if(this.isTouchSelection&&0!==this.selectionRangeArray.length){var s=this.selectionRangeArray.filter(function(t){return t.pageNumber===e-1});if(0!==s.length){var a=this.selectionRangeArray.indexOf(s[0]);this.selectionRangeArray.splice(a+1,0,t)}else{var r=this.selectionRangeArray[0];ei?(s=u.firstChild,a=u.lastChild,r=0,l=this.getTextLastLength(a)):t===i&&(s=this.getNodeElementFromNode(n.focusNode),a=u.lastChild,r=this.getCorrectOffset(n.focusNode,n.focusOffset),l=this.getTextLastLength(a)):t===e?(s=this.getNodeElementFromNode(n.anchorNode),a=u.lastChild,r=this.getCorrectOffset(n.anchorNode,n.anchorOffset),l=this.getTextLastLength(a)):t>e&&t0){for(var a=0;a0&&this.pdfViewer.clearSelection(this.pdfViewer.selectedItems.annotations[0].pageIndex);var n=t.target,o=document.elementsFromPoint(t.touches[0].clientX,t.touches[0].clientY);0!==o.length&&o[0].classList.contains("e-pv-hyperlink")&&o[1].classList.contains("e-pv-text")&&(n=o[1]);var s=parseFloat(n.id.split("_")[2]);this.pdfViewer.fireTextSelectionStart(s+1),this.selectAWord(n,e,i,!0),this.createTouchSelectElement(t),this.maintainSelectionOnZoom(!0,!1),this.fireTextSelectEnd(),this.applySpanForSelection()},t.prototype.selectTextByTouch=function(t,e,i,n,o,s){var a=!1;if(t.nodeType===t.TEXT_NODE){var r=t.ownerDocument.createRange(),l=window.getSelection();r.selectNodeContents(t);for(var u=0,M=r.endOffset;u=e&&w.top<=i&&w.bottom>=i)return null!=l.anchorNode&&(n&&r.setStart(l.anchorNode,l.anchorOffset),r=this.setTouchSelectionStartPosition(l,r,n,o,t,u,s),n&&l.extend(t,u),a=!0),r.detach(),a;u+=1}}else for(var L=0;L=e&&w.top<=i&&w.bottom>=i)return d.detach(),this.selectTextByTouch(t.childNodes[L],e,i,n,o,s);d.detach()}return a},t.prototype.setTouchSelectionStartPosition=function(t,e,i,n,o,s,a){if(i){if("left"===n){r=this.getTouchFocusElement(t,!0);e.setStart(r.focusNode,r.focusOffset),e.setEnd(o,s),this.selectionAnchorTouch={anchorNode:e.endContainer.parentElement.id,anchorOffset:e.endOffset}}else if("right"===n){r=this.getTouchAnchorElement(t,!1);e.setStart(r.anchorNode,r.anchorOffset),e.setEnd(o,s),this.selectionFocusTouch={focusNode:e.endContainer.parentElement.id,focusOffset:e.endOffset}}}else if("left"===n)if(a)e.setStart(o,s),e.setEnd(t.focusNode,t.focusOffset),this.selectionAnchorTouch={anchorNode:e.startContainer.parentElement.id,anchorOffset:e.startOffset};else{r=this.getTouchFocusElement(t,!1);e.setStart(o,s),e.setEnd(r.focusNode,r.focusOffset),""===e.toString()&&(e.setStart(o,s),e.setEnd(t.focusNode,t.focusOffset)),this.selectionAnchorTouch={anchorNode:e.startContainer.parentElement.id,anchorOffset:e.startOffset}}else if("right"===n){var r=this.getTouchAnchorElement(t,!0);e.setStart(o,s),e.setEnd(r.anchorNode,r.anchorOffset),""===e.toString()&&(e.setStart(r.anchorNode,r.anchorOffset),e.setEnd(o,s)),this.selectionFocusTouch={focusNode:e.startContainer.parentElement.id,focusOffset:e.startOffset}}return t.removeAllRanges(),t.addRange(e),e},t.prototype.getTouchAnchorElement=function(t,e){var i=document.getElementById(this.selectionAnchorTouch.anchorNode.toString()),n=null,o=0;return i?(n=i.childNodes[0],o=parseInt(this.selectionAnchorTouch.anchorOffset.toString())):e?(n=t.focusNode,o=t.focusOffset):(n=t.anchorNode,o=t.anchorOffset),{anchorNode:n,anchorOffset:o}},t.prototype.getTouchFocusElement=function(t,e){var i=document.getElementById(this.selectionFocusTouch.focusNode.toString()),n=null,o=0;return i?(n=i.childNodes[0],o=parseInt(this.selectionFocusTouch.focusOffset.toString())):e?(n=t.anchorNode,o=t.anchorOffset):(n=t.focusNode,o=t.focusOffset),{focusNode:n,focusOffset:o}},t.prototype.createTouchSelectElement=function(t){this.isTouchSelection=!0;var i=window.getSelection();if("Range"===i.type){this.dropDivElementLeft=e.createElement("div",{id:this.pdfViewer.element.id+"_touchSelect_droplet_left",className:"e-pv-touch-select-drop"}),this.dropDivElementRight=e.createElement("div",{id:this.pdfViewer.element.id+"_touchSelect_droplet_right",className:"e-pv-touch-select-drop"}),this.dropElementLeft=e.createElement("div",{className:"e-pv-touch-ellipse"}),this.dropElementLeft.style.transform="rotate(0deg)",this.dropDivElementLeft.appendChild(this.dropElementLeft),this.dropElementRight=e.createElement("div",{className:"e-pv-touch-ellipse"}),this.dropElementRight.style.transform="rotate(-90deg)",this.dropDivElementRight.appendChild(this.dropElementRight),this.pdfViewerBase.pageContainer.appendChild(this.dropDivElementLeft),this.pdfViewerBase.pageContainer.appendChild(this.dropDivElementRight);var n=i.getRangeAt(0).getBoundingClientRect(),o=this.dropDivElementLeft.getBoundingClientRect(),s=this.pdfViewerBase.pageSize[this.pdfViewerBase.currentPageNumber-1].top,a=this.pdfViewerBase.viewerContainer.getBoundingClientRect().left,r=this.getClientValueTop(n.top,this.pdfViewerBase.currentPageNumber-1),l=r+s*this.pdfViewerBase.getZoomFactor()+o.height/2*this.pdfViewerBase.getZoomFactor()+"px";this.dropDivElementLeft.style.top=l,this.dropDivElementLeft.style.left=n.left-(a+o.width)+"px",this.dropDivElementRight.style.top=l,this.dropDivElementRight.style.left=n.left+n.width-a+"px";var u=this.pdfViewerBase.getElement("_pageDiv_"+(this.pdfViewerBase.currentPageNumber-1)).getBoundingClientRect().left,M=n.left-u;this.topStoreLeft={pageTop:s,topClientValue:this.getMagnifiedValue(r),pageNumber:this.pdfViewerBase.currentPageNumber-1,left:this.getMagnifiedValue(M),isHeightNeeded:!0},this.topStoreRight={pageTop:s,topClientValue:this.getMagnifiedValue(r),pageNumber:this.pdfViewerBase.currentPageNumber-1,left:this.getMagnifiedValue(M+n.width),isHeightNeeded:!0},this.dropDivElementLeft.addEventListener("touchstart",this.onLeftTouchSelectElementTouchStart),this.dropDivElementLeft.addEventListener("touchmove",this.onLeftTouchSelectElementTouchMove),this.dropDivElementLeft.addEventListener("touchend",this.onLeftTouchSelectElementTouchEnd),this.dropDivElementRight.addEventListener("touchstart",this.onRightTouchSelectElementTouchStart),this.dropDivElementRight.addEventListener("touchmove",this.onRightTouchSelectElementTouchMove),this.dropDivElementRight.addEventListener("touchend",this.onRightTouchSelectElementTouchEnd),this.calculateContextMenuPosition(t.touches[0].clientY,t.touches[0].clientX)}},t.prototype.calculateContextMenuPosition=function(t,i){if(t-=this.pdfViewerBase.toolbarHeight,e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode){var n=t-this.contextMenuHeight;n0&&this.pdfViewer.fireTextSelectionStart(this.selectionRangeArray[0].pageNumber+1)},t.prototype.terminateSelectionByTouch=function(t){this.maintainSelectionOnZoom(!0,!1),this.applySpanForSelection(),this.pdfViewerBase.getTextMarkupAnnotationMode()?this.pdfViewer.annotationModule.textMarkupAnnotationModule.drawTextMarkupAnnotations(this.pdfViewer.annotationModule.textMarkupAnnotationModule.currentTextMarkupAddMode):(this.fireTextSelectEnd(),this.pdfViewerBase.contextMenuModule.open(t.changedTouches[0].clientY-this.pdfViewerBase.viewerContainer.offsetTop+this.pdfViewerBase.contextMenuModule.contextMenuElement.clientHeight,t.changedTouches[0].clientX-this.pdfViewerBase.viewerContainer.offsetLeft,this.pdfViewerBase.viewerContainer))},t.prototype.getNodeElement=function(t,e,i,n,o){if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e,i),o=this.onTouchElementScroll(t,o,i,n);else if(document.caretPositionFromPoint){var s=document.caretPositionFromPoint(e,i),a=document.caretPositionFromPoint(e,i);(t=document.createRange()).setStart(s.offsetNode,s.offset),t.setEnd(a.offsetNode,a.offset),o=this.onTouchElementScroll(t,o,i,n)}return o},t.prototype.isTouchedWithinContainer=function(t){var e=!1;return 0!==document.elementsFromPoint(t.touches[0].clientX,t.touches[0].clientY).length&&(e=!0),e},t.prototype.onTouchElementScroll=function(t,e,i,n){var o=this.pdfViewerBase.viewerContainer.scrollTop;if(null!=t){e=t.startContainer;var s=this.isScrolledOnScrollBar(n);this.pdfViewerBase.viewerContainer.contains(e.parentElement)&&!s||(it&&(e=!0),e},t.prototype.getClientValueTop=function(t,e){return this.pdfViewerBase.getElement("_pageDiv_"+e)?t-this.pdfViewerBase.getElement("_pageDiv_"+e).getBoundingClientRect().top:t},t.prototype.isScrolledOnScrollBar=function(t){var e=!1;return t.touches&&this.pdfViewerBase.viewerContainer.clientHeight+this.pdfViewerBase.viewerContainer.offsetTop0)for(var e=0;e0){this.pdfViewer.annotation&&(this.pdfViewer.annotation.isShapeCopied=!1);var i=document.createElement("textarea");i.contentEditable="true",i.textContent=t,this.pdfViewer.annotation&&this.pdfViewer.annotation.freeTextAnnotationModule&&(this.pdfViewer.annotation.freeTextAnnotationModule.selectedText=t),i.style.position="fixed",document.body.appendChild(i),i.select();try{document.execCommand("copy")}catch(t){console.warn("Copy to clipboard failed.",t)}finally{i&&document.body.removeChild(i)}}},t.prototype.destroy=function(){this.clear()},t.prototype.getModuleName=function(){return"TextSelection"},t}(),Xi=function(){function t(t,i){var n=this;this.isTextSearch=!1,this.searchCount=0,this.searchIndex=0,this.currentSearchIndex=0,this.searchPageIndex=null,this.searchString=null,this.isMatchCase=!1,this.searchRequestHandler=null,this.textContents=new Array,this.searchMatches=new Array,this.searchCollection=new Array,this.searchedPages=[],this.isPrevSearch=!1,this.tempElementStorage=new Array,this.isMessagePopupOpened=!1,this.isTextRetrieved=!1,this.isTextSearched=!1,this.isTextSearchEventTriggered=!1,this.checkBoxOnChange=function(t){if(e.isBlazor()?t.currentTarget&&t.currentTarget.checked?n.isMatchCase=!0:n.isMatchCase=!1:t.checked?n.isMatchCase=!0:n.isMatchCase=!1,n.isTextSearch){n.resetVariables(),n.clearAllOccurrences();var i=n.searchInput.value;n.searchIndex=0,n.textSearch(i)}},this.searchKeypressHandler=function(t){n.enableNextButton(!0),n.enablePrevButton(!0),13===t.which?(n.initiateTextSearch(n.searchInput),n.updateSearchInputIcon(!1)):n.resetVariables()},this.searchClickHandler=function(t){n.searchButtonClick(n.searchBtn,n.searchInput)},this.nextButtonOnClick=function(t){n.nextSearch()},this.prevButtonOnClick=function(t){n.prevSearch()},this.pdfViewer=t,this.pdfViewerBase=i}return t.prototype.createTextSearchBox=function(){var t=this;this.searchBox=e.createElement("div",{id:this.pdfViewer.element.id+"_search_box",className:"e-pv-search-bar"});var i=e.createElement("div",{id:this.pdfViewer.element.id+"_search_box_elements",className:"e-pv-search-bar-elements"}),n=e.createElement("div",{id:this.pdfViewer.element.id+"_search_input_container",className:"e-input-group e-pv-search-input"});this.searchInput=e.createElement("input",{id:this.pdfViewer.element.id+"_search_input",className:"e-input"}),this.searchInput.type="text",e.isBlazor()?(r=this.pdfViewer._dotnetInstance.invokeMethodAsync("GetLocaleText","PdfViewer_Findindocument")).then(function(e){t.searchInput.placeholder=e}):this.searchInput.placeholder=this.pdfViewer.localeObj.getConstant("Find in document"),this.searchBtn=e.createElement("span",{id:this.pdfViewer.element.id+"_search_box-icon",className:"e-input-group-icon e-input-search-group-icon e-pv-search-icon"}),n.appendChild(this.searchInput),n.appendChild(this.searchBtn),i.appendChild(n),this.pdfViewer.enableRtl?this.prevSearchBtn=this.createSearchBoxButtons("prev_occurrence","e-pv-next-search"):this.prevSearchBtn=this.createSearchBoxButtons("prev_occurrence","e-pv-prev-search"),this.prevSearchBtn.setAttribute("aria-label","Previous Search text"),i.appendChild(this.prevSearchBtn),this.pdfViewer.enableRtl?this.nextSearchBtn=this.createSearchBoxButtons("next_occurrence","e-pv-prev-search"):this.nextSearchBtn=this.createSearchBoxButtons("next_occurrence","e-pv-next-search"),this.nextSearchBtn.setAttribute("aria-label","Next Search text"),i.appendChild(this.nextSearchBtn);var o=e.createElement("div",{id:this.pdfViewer.element.id+"_match_case_container",className:"e-pv-match-case-container"}),s=e.createElement("input",{id:this.pdfViewer.element.id+"_match_case"});if(s.type="checkbox",e.isBlazor()&&(s.style.height="17px",s.style.width="17px",s.addEventListener("change",this.checkBoxOnChange.bind(this))),o.appendChild(s),this.searchBox.appendChild(i),this.searchBox.appendChild(o),this.pdfViewerBase.mainContainer.appendChild(this.searchBox),e.isBlazor()){var a=e.createElement("span",{id:this.pdfViewer.element.id+"_search_box_text",styles:"position: absolute; padding-top: 3px; padding-left: 8px; padding-right: 8px; font-size: 13px"}),r=this.pdfViewer._dotnetInstance.invokeMethodAsync("GetLocaleText","PdfViewer_Matchcase");r.then(function(t){a.textContent=t}),o.appendChild(a)}else new u.CheckBox({cssClass:"e-pv-match-case",label:this.pdfViewer.localeObj.getConstant("Match case"),change:this.checkBoxOnChange.bind(this)}).appendTo(s);var l=e.createElement("div",{id:this.pdfViewer.element.id+"_textSearchLoadingIndicator"});n.appendChild(l),l.style.position="absolute",l.style.top="15px",l.style.left=n.clientWidth-46+"px",nt({target:l,cssClass:"e-spin-center"}),this.setLoaderProperties(l),this.showSearchBox(!1),this.pdfViewer.enableRtl?(this.searchBox.classList.add("e-rtl"),this.searchBox.style.left="88.3px"):(this.searchBox.classList.remove("e-rtl"),this.searchBox.style.right="88.3px"),this.searchInput.addEventListener("focus",function(){t.searchInput.parentElement.classList.add("e-input-focus")}),this.searchInput.addEventListener("blur",function(){t.searchInput.parentElement.classList.remove("e-input-focus")}),this.searchInput.addEventListener("keydown",this.searchKeypressHandler.bind(this)),this.searchBtn.addEventListener("click",this.searchClickHandler.bind(this)),this.nextSearchBtn.addEventListener("click",this.nextButtonOnClick.bind(this)),this.prevSearchBtn.addEventListener("click",this.prevButtonOnClick.bind(this))},t.prototype.setLoaderProperties=function(t){var e=t.firstChild.firstChild.firstChild;e&&(e.style.height="18px",e.style.width="18px",e.style.transformOrigin="9px 9px 9px")},t.prototype.showLoadingIndicator=function(t){var e=document.getElementById(this.pdfViewer.element.id+"_textSearchLoadingIndicator");e&&(t?Ot(e):Yt(e))},t.prototype.textSearchBoxOnResize=function(){if(this.pdfViewer.toolbarModule&&this.pdfViewer.enableToolbar){var t=this.pdfViewerBase.getElement("_toolbarContainer_popup");t&&t.contains(this.pdfViewerBase.getElement("_search").parentElement)&&(this.searchBox.style.right="0px")}else this.pdfViewerBase.viewerContainer.clientWidth+this.pdfViewerBase.viewerContainer.offsetLeft=this.searchMatches[this.searchPageIndex].length||this.searchPageIndex!==this.pdfViewerBase.currentPageNumber-1?(this.searchIndex=0,this.searchPageIndex=this.searchPageIndex+1M&&!(L<=-1)&&u.push(L)}this.searchMatches&&(this.searchMatches[t]=u)}if(o||(-1===this.searchedPages.indexOf(t)&&this.searchedPages.push(t),this.updateSearchInputIcon(!1)),this.searchMatches&&this.searchMatches[t]&&0!==this.searchMatches[t].length)o||(this.isPrevSearch&&(this.searchIndex=this.searchMatches[t].length-1),this.pdfViewerBase.currentPageNumber-1!==this.searchPageIndex&&(this.searchMatches.length>0&&(0===this.searchIndex||-1===this.searchIndex)&&this.searchPageIndex===this.currentSearchIndex&&(this.isMessagePopupOpened||this.onMessageBoxOpen(),this.searchPageIndex=this.getSearchPage(this.pdfViewerBase.currentPageNumber-1),this.searchedPages=[]),this.pdfViewerBase.updateScrollTop(this.searchPageIndex))),this.highlightSearchedTexts(t,o);else if(!o)if(this.isPrevSearch?this.searchPageIndex=this.searchPageIndex-1<0?this.pdfViewerBase.pageCount-1:this.searchPageIndex-1:this.searchPageIndex=this.searchPageIndex+10&&(0===this.searchIndex||-1===this.searchIndex)&&w===this.currentSearchIndex&&(this.isPrevSearch?(this.isMessagePopupOpened||this.onMessageBoxOpen(),this.searchPageIndex=w,this.searchedPages=[],this.searchIndex=-1):(this.isMessagePopupOpened||this.onMessageBoxOpen(),this.searchPageIndex=w,this.searchedPages=[],this.searchIndex=0),this.highlightSearchedTexts(this.searchPageIndex,o))}},t.prototype.getSearchTextContent=function(t,e,i,n,o,s){var a=i,r=e,l=e.length;this.isMatchCase||(r=e.toLowerCase(),a=i.toLowerCase());for(var u=[],M=-l,L=-l;0!==M&&""!==r&&" "!==r&&r;){if(M=a.indexOf(r,M+l),-1!==r.indexOf(" ")){var d=e.replace(" ","\r\n");(L=a.indexOf(d,L+l))<=-1||LM&&!(L<=-1)&&u.push(L)}0!==u.length&&(this.searchCount=this.searchCount+u.length),this.searchMatches[t]=u},t.prototype.getSearchPage=function(t){var e=null;if(this.isPrevSearch){for(i=t;i>=0;i--)if(i!==t&&this.searchMatches[i]){e=i;break}if(!e)for(n=this.pdfViewerBase.pageCount-1;n>t;n--)if(this.searchMatches[n]){e=n;break}}else{for(var i=t;i(p=e[t]).X&&(d=!0),l=l>(c=(M=Mc+p.Height?l:c+p.Height;for(var C=e[a-1].Y-e[a].Y,j=a+i-1;j>=a;j--)0===(p=e[j]).Width&&(C=p.Y-e[j-1].Y);u+=C}else a+i!==t?(h=!0,e[t-1]&&(u=e[t-1].X-L)):(h=!1,e[t]?u=e[t].X-L:e[t-1]&&(u=e[t-1].X-L));return this.createSearchTextDiv(o,s,l,u,M,L,n,h,r),t},t.prototype.createSearchTextDiv=function(t,i,n,o,s,a,r,l,u){var M="_searchtext_"+i+"_"+t;if(l&&(M+="_"+u),!this.pdfViewerBase.getElement(M)){var L=e.createElement("div",{id:this.pdfViewer.element.id+M});if(L.style.height=n*this.pdfViewerBase.getZoomFactor()+"px",L.style.width=o*this.pdfViewerBase.getZoomFactor()+"px",L.style.top=s*this.pdfViewerBase.getZoomFactor()+"px",L.style.left=a*this.pdfViewerBase.getZoomFactor()+"px",L.classList.add(r),"e-pv-search-text-highlight"===r){L.style.backgroundColor=""===this.pdfViewer.textSearchColorSettings.searchHighlightColor?"#fdd835":this.pdfViewer.textSearchColorSettings.searchHighlightColor;var d={left:a,top:s,width:o,height:n};this.pdfViewer.fireTextSearchHighlight(this.searchString,this.isMatchCase,d,i+1)}else"e-pv-search-text-highlightother"===r&&(L.style.backgroundColor=""===this.pdfViewer.textSearchColorSettings.searchColor?"#8b4c12":this.pdfViewer.textSearchColorSettings.searchColor);var w=this.pdfViewerBase.getElement("_textLayer_"+i);w&&w.appendChild(L)}},t.prototype.isClassAvailable=function(){for(var t=!1,e=0;e0)for(var i=0;i1.5&&(n.scrollLeft=s)),n.scrollTop=o,this.pdfViewerBase.updateMobileScrollerPosition()},t.prototype.resizeSearchElements=function(t){for(var e=document.querySelectorAll('div[id*="'+this.pdfViewer.element.id+"_searchtext_"+t+'"]'),i=0;i0?t:0;var e=this.pdfViewerBase.currentPageNumber+1;return e=e0&&this.clearAllOccurrences()},t.prototype.createRequestForSearch=function(t){var e=this,i=this.pdfViewer.element.clientHeight,n=this.pdfViewerBase.pageSize[t].width,o=(this.pdfViewerBase.pageSize[t].height,this.pdfViewerBase.getTileCount(n)),s=816>=n?1:o,a=816>=n?1:o,r=this.pdfViewer.tileRenderingSettings;r.enableTileRendering&&r.x>0&&r.y>0&&(s=816>=n?1:r.x,a=816>=n?1:r.y);for(var l=0;l=n?e.pdfViewerBase.storeWinData(o,s):e.pdfViewerBase.storeWinData(o,s,o.tileX,o.tileY),e.initSearch(t,!1)}}},this.searchRequestHandler.onFailure=function(t){e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,this.pdfViewer.serverActionSettings.renderPages)},this.searchRequestHandler.onError=function(t){e.pdfViewerBase.openNotificationPopup(),e.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,this.pdfViewer.serverActionSettings.renderPages)}}},t.prototype.getPDFDocumentTexts=function(){var t=50,e=this.pdfViewerBase.pageCount;t>=e&&(t=e),this.createRequestForGetPdfTexts(0,t)},t.prototype.createRequestForGetPdfTexts=function(t,e){var i,n=this;i={pageStartIndex:t,pageEndIndex:e,documentId:n.pdfViewerBase.getDocumentId(),hashId:n.pdfViewerBase.hashId,action:"RenderPdfTexts",elementId:n.pdfViewer.element.id,uniqueId:n.pdfViewerBase.documentId},this.pdfViewerBase.jsonDocumentId&&(i.documentId=this.pdfViewerBase.jsonDocumentId),this.searchRequestHandler=new qe(this.pdfViewer),this.searchRequestHandler.url=this.pdfViewer.serviceUrl+"/"+this.pdfViewer.serverActionSettings.renderTexts,this.searchRequestHandler.responseType="json",this.searchRequestHandler.send(i),this.searchRequestHandler.onSuccess=function(i){var o=i.data;if(o){if("object"!=typeof o)try{o=JSON.parse(o)}catch(t){n.pdfViewerBase.onControlError(500,o,this.pdfViewer.serverActionSettings.renderTexts),o=null}if(o&&o.documentTextCollection&&o.uniqueId===n.pdfViewerBase.documentId){n.documentTextCollection.length>0?(n.documentTextCollection=o.documentTextCollection.concat(n.documentTextCollection),n.documentTextCollection=n.orderPdfTextCollections(n.documentTextCollection)):n.documentTextCollection=o.documentTextCollection;var s=n.pdfViewerBase.pageCount;e!==s?(t=e,(e+=50)>=s&&(e=s),n.createRequestForGetPdfTexts(t,e)):(n.isTextRetrieved=!0,n.pdfViewer.fireTextExtractionCompleted(n.documentTextCollection),n.isTextSearched&&n.searchString.length>0&&(n.textSearch(n.searchString),n.isTextSearched=!1))}}},this.searchRequestHandler.onFailure=function(t){n.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,this.pdfViewer.serverActionSettings.renderTexts)},this.searchRequestHandler.onError=function(t){n.pdfViewerBase.openNotificationPopup(),n.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,this.pdfViewer.serverActionSettings.renderTexts)}},t.prototype.orderPdfTextCollections=function(t){for(var e=[],i=0;iparseInt(Object.keys(e[e.length-1])[0]))e.push(t[i]);else for(var n=0;n0&&(this.printViewerContainer=e.createElement("div",{id:this.pdfViewer.element.id+"_print_viewer_container",className:"e-pv-print-viewer-container"}),"Default"===this.pdfViewer.printMode?(this.pdfViewerBase.showPrintLoadingIndicator(!0),this.iframe=document.createElement("iframe"),this.iframe.className="iframeprint",this.iframe.id="iframePrint",this.iframe.style.position="fixed",this.iframe.style.top="-100000000px",document.body.appendChild(this.iframe),this.frameDoc=this.iframe.contentWindow?this.iframe.contentWindow:this.iframe.contentDocument,this.frameDoc.document.open()):(this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight),this.createPrintLoadingIndicator(this.printWindow.document.body)),setTimeout(function(){for(t=0;ti?(c.drawImage(C,0,0,s.printCanvas.width,s.printCanvas.height),r&&c.drawImage(j,0,0,s.printCanvas.width,s.printCanvas.height)):(c.translate(.5*s.printCanvas.width,.5*s.printCanvas.height),c.rotate(-.5*Math.PI),c.translate(.5*-s.printCanvas.height,.5*-s.printCanvas.width),c.drawImage(C,0,0,s.printCanvas.height,s.printCanvas.width),r&&c.drawImage(j,0,0,s.printCanvas.height,s.printCanvas.width)),p===s.pdfViewerBase.pageCount-1&&s.printWindowOpen(),s.pdfViewer.renderDrawing(null,t)},C.src=a.image,j.src=r,s.printViewerContainer.appendChild(s.printCanvas)}},this.printRequestHandler.onFailure=function(t){s.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,s.pdfViewer.serverActionSettings.print)},this.printRequestHandler.onError=function(t){s.pdfViewerBase.openNotificationPopup(),s.pdfViewer.fireAjaxRequestFailed(t.status,t.statusText,s.pdfViewer.serverActionSettings.print)}},t.prototype.renderFieldsForPrint=function(t,e,i){var n=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields"),o=JSON.parse(n);if(o)for(var s=0;sd.height){l.style.transform="rotate(-90deg)";var w=parseFloat(l.style.left),h=parseFloat(l.style.width)/2,p=parseFloat(l.style.height)/2,c=parseFloat(l.style.top),C=parseFloat(l.style.height);l.style.left=p-h+c+"px",l.style.top=d.width-C-(h-p+w)+"px"}l.style.backgroundColor="transparent",a.IsSignatureField||(l.style.borderColor="transparent"),r.appendChild(l)}}}},t.prototype.applyPosition=function(t,i,n,o,s){if(i){var a=this.pdfViewer.formFieldsModule.ConvertPointToPixel(i.X)/s,r=this.pdfViewer.formFieldsModule.ConvertPointToPixel(i.Y)/o,l=this.pdfViewer.formFieldsModule.ConvertPointToPixel(i.Width)/s,u=this.pdfViewer.formFieldsModule.ConvertPointToPixel(i.Height)/o,M=0;null!==n&&n.Height&&(t.style.fontfamily=n.Name,n.Italic&&(t.style.fontStyle="italic"),n.Bold&&(t.style.fontWeight="Bold"),M=this.pdfViewer.formFieldsModule.ConvertPointToPixel(n.Size)),e.Browser.isIE&&(r-=1),this.pdfViewer.formFieldsModule.setStyleToTextDiv(t,a,r,M,l,u,!0)}},t.prototype.printWindowOpen=function(){var t,i=this,n=navigator.userAgent;t="Default"===this.pdfViewer.printMode?this.frameDoc.document:this.printWindow.document,-1!==n.indexOf("Chrome")||-1!==n.indexOf("Safari")||-1!==n.indexOf("Firefox")?(t.write(""),t.write('
')):(t.write(""),t.write("
"));for(var o=0;o
'),this.pdfViewer.formFieldsModule){var a,r,l=this.pdfViewerBase.pageSize[o].width,u=this.pdfViewerBase.pageSize[o].height;u=0?this.renderSignatureField(o):i?o>=e&&this.renderSignatureField(0):o<=0&&this.renderSignatureField(e-1)},t.prototype.renderSignatureField=function(t){var e,i=t,n=this.signatureFieldCollection;if(i0&&(o[0].focus(),t.preventDefault());else for(var o=document.getElementById(this.pdfViewer.element.id+"_textLayer_0").getElementsByClassName("e-pdfviewer-formFields"),s=0;s=p&&(a=p),r>=c&&(r=c),l<=p&&(l=p),u<=c&&(u=c)}}var C=l-a,j=u-r,g=C/(L=M?M.clientWidth:650),y=j/(d=M?M.clientHeight:300),A=this.pdfViewerBase.getZoomFactor(),S=0,m=0;e?(S=this.pdfViewer.handWrittenSignatureSettings.width?this.pdfViewer.handWrittenSignatureSettings.width:150,m=this.pdfViewer.handWrittenSignatureSettings.height?this.pdfViewer.handWrittenSignatureSettings.height:100):"rotate(90deg)"===n.style.transform||"rotate(270deg)"===n.style.transform?(S=parseFloat(n.style.height)/A,m=parseFloat(n.style.width)/A):(S=parseFloat(n.style.width)/A,m=parseFloat(n.style.height)/A);var f=(L-C)/2,T=(d-j)/2;if(f=f/L*S,T=T/d*m,S*=g,m*=y,e){var N=this.pdfViewerBase.currentPageNumber-1,x=document.getElementById(this.pdfViewer.element.id+"_pageDiv_"+N);return{x:(parseFloat(x.style.width)/2-S/2)/A,y:(parseFloat(x.style.height)/2-m/2)/A,width:S,height:m}}return{left:f,top:T,width:S,height:m}},t.prototype.updateDataInSession=function(t,e,i,n,o){this.pdfViewer.isDocumentEdited=!0;for(var s=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields"),a=JSON.parse(s),r=0;r0){d=t.selectedOptions;l.SelectedList=[];for(var p=0;p0&&(n.maxLength=t.MaxLength),this.addAlignmentPropety(t,n),""!==t.Text?n.value=t.Text:n.value="",this.pdfViewer.enableAutoComplete||(n.autocomplete="off"),n.name=t.FieldName,n},t.prototype.checkIsReadonly=function(t,e){for(var i=!1,n=0;nu.Height/2?u.Height/2:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.height,w=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.width>u.Width/2?u.Width/2:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.width,h=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.fontSize>d/2?10:this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.fontSize;r.style.position="absolute",r.id="signIcon"+i+"_"+n;var p=this.pdfViewerBase.getZoomFactor(),c=this.getAngle(i),C={left:M,top:L,width:w,height:d},j=this.getBounds(C,i);return r.style.transform="rotate("+c+"deg)",r.style.left=j.left*p+"px",r.style.top=j.top*p+"px",e.Browser.isDevice&&!this.pdfViewer.enableDesktopMode?(r.style.height="5px",r.style.width="10px",r.style.fontSize="3px"):(r.style.height=d+"px",r.style.width=w+"px",r.style.fontSize=h+"px",e.isBlazor()&&(r.style.fontSize=h-1+"px")),r.style.padding="2px",r.style.textAlign="center",r.style.boxSizing="content-box",r.innerHTML=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.text?this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.text:"Sign",r.style.color=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.color?this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.color:"black",r.style.backgroundColor=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.backgroundColor?this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.backgroundColor:"orange",r.style.opacity=this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.opacity?this.pdfViewer.signatureFieldSettings.signatureIndicatorSettings.opacity:1,l.appendChild(r),this.addSignaturePath(t),s},t.prototype.addSignaturePath=function(t){this.isSignatureField=!1;for(var e=window.sessionStorage.getItem(this.pdfViewerBase.documentId+"_formfields"),i=JSON.parse(e),n=0;n0?this.getBoundsPosition(i,t,n):this.getBoundsPosition(n.rotation,t,n)},t.prototype.getBoundsPosition=function(t,e,i){var n;switch(t){case 90:n={left:i.width-e.top-e.height,top:e.left,width:e.height,height:e.width};break;case 180:n={left:i.width-e.left-e.width,top:i.height-e.top-e.height,width:e.width,height:e.height};break;case 270:n={left:e.top,top:i.height-e.left-e.width,width:e.height,height:e.width};break;case 0:n=e;break;case 1:n={left:i.width-e.top-e.height-(e.width/2-e.height/2),top:e.left+(e.width/2-e.height/2),width:e.width,height:e.height};break;case 2:n={left:i.width-e.left-e.width,top:i.height-e.top-e.height,width:e.width,height:e.height};break;case 3:n={left:e.top-(e.width/2-e.height/2),top:i.height-e.left-e.width+(e.width/2-e.height/2),width:e.width,height:e.height}}return n||(n=e),n},t.prototype.applyPosition=function(t,e,i,n,o){if(e){var s=0,a={left:this.ConvertPointToPixel(e.X),top:this.ConvertPointToPixel(e.Y),width:this.ConvertPointToPixel(e.Width),height:this.ConvertPointToPixel(e.Height)},r=this.getBounds(a,n,o);null!==i&&i.Height&&(t.style.fontfamily=i.Name,i.Italic&&(t.style.fontStyle="italic"),i.Bold&&(t.style.fontWeight="Bold"),s=this.ConvertPointToPixel(i.Size)),this.setStyleToTextDiv(t,r.left,r.top,s,r.width,r.height,!1)}},t.prototype.setStyleToTextDiv=function(t,e,i,n,o,s,a){var r=this.pdfViewerBase.getZoomFactor();a&&(r=1,t.style.position="absolute"),t.style.left=e*r+"px",t.style.top=i*r+"px",t.style.height=s*r+"px",t.style.width=o*r+"px",t.style.margin="0px",n>0&&(t.style.fontSize=n*r+"px")},t.prototype.renderExistingAnnnot=function(t,e,i){if(!i){var n=void 0;n=t.Bounds&&"ink"!==t.Name?t.Bounds:t.LineBounds;var o=this.ConvertPointToPixel(n.X),s=this.ConvertPointToPixel(n.Y),a=this.ConvertPointToPixel(n.Width),r=this.ConvertPointToPixel(n.Height),l=parseFloat(t.PageIndex),u={left:o,top:s,width:a,height:r},M=this.updateSignatureBounds(u,l),L=void 0,d=t.FontFamily?t.FontFamily:t.fontFamily;t.Value.split("base64,")[1]?L={id:this.pdfViewer.element.id+"input_"+l+"_"+e,bounds:M,pageIndex:l,data:t.Value,modifiedDate:"",shapeAnnotationType:"SignatureImage",opacity:1,rotateAngle:0,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""}}:d?((L={id:this.pdfViewer.element.id+"input_"+l+"_"+e,bounds:M,pageIndex:l,data:t.Value,modifiedDate:"",shapeAnnotationType:"SignatureText",opacity:1,rotateAngle:0,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""},fontFamily:t.FontFamily,fontSize:t.FontSize}).fontFamily=d,L.fontSize=t.FontSize?t.FontSize:t.fontSize):L={id:this.pdfViewer.element.id+"input_"+l+"_"+e,bounds:M,pageIndex:l,data:t.Value,modifiedDate:"",shapeAnnotationType:"Path",opacity:1,rotateAngle:0,annotName:"",comments:[],review:{state:"",stateModel:"",modifiedDate:"",author:""}},this.pdfViewer.add(L),t.Bounds=L.bounds;var w=document.getElementById(this.pdfViewer.element.id+"_annotationCanvas_"+l);this.pdfViewer.renderDrawing(w,l)}},t.prototype.updateSignatureBounds=function(t,e){var i=this.pdfViewerBase.pageSize[e];return i?1===i.rotation?{x:i.width-t.top-t.height,y:t.left,width:t.height,height:t.width}:2===i.rotation?{x:i.width-t.left-t.width,y:i.height-t.top-t.height,width:t.width,height:t.height}:3===i.rotation?{x:t.top,y:i.height-t.left-t.width,width:t.height,height:t.width}:{x:t.left,y:t.top,width:t.width,height:t.height}:{x:t.left,y:t.top,width:t.width,height:t.height}},t.prototype.resetFormFields=function(){for(var t=this.pdfViewer.formFieldCollections,e=0;e