!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsDistBuildPdf=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=93)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unreachable=t.warn=t.utf8StringToString=t.stringToUTF8String=t.stringToPDFString=t.stringToBytes=t.string32=t.shadow=t.setVerbosityLevel=t.ReadableStream=t.removeNullCharacters=t.readUint32=t.readUint16=t.readInt8=t.log2=t.loadJpegStream=t.isEvalSupported=t.isLittleEndian=t.createValidAbsoluteUrl=t.isSameOrigin=t.isNodeJS=t.isSpace=t.isString=t.isNum=t.isEmptyObj=t.isBool=t.isArrayBuffer=t.info=t.getVerbosityLevel=t.getLookupTableFactory=t.deprecated=t.createObjectURL=t.createPromiseCapability=t.createBlob=t.bytesToString=t.assert=t.arraysToBytes=t.arrayByteLength=t.FormatError=t.XRefParseException=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.StatTimer=t.PasswordResponses=t.PasswordException=t.PageViewport=t.NotImplementedException=t.NativeImageDecoding=t.MissingPDFException=t.MissingDataException=t.MessageHandler=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VERBOSITY_LEVELS=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n(94);var r=n(135),a={errors:0,warnings:1,infos:5},o=a.warnings;function s(e){o>=a.warnings&&console.log("Warning: "+e)}function l(e){throw new Error(e)}function c(e,t){e||l(t)}var u=function(){function e(e,t){this.name="PasswordException",this.message=e,this.code=t}return e.prototype=new Error,e.constructor=e,e}(),d=function(){function e(e,t){this.name="UnknownErrorException",this.message=e,this.details=t}return e.prototype=new Error,e.constructor=e,e}(),h=function(){function e(e){this.name="InvalidPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),p=function(){function e(e){this.name="MissingPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),f=function(){function e(e,t){this.name="UnexpectedResponseException",this.message=e,this.status=t}return e.prototype=new Error,e.constructor=e,e}(),m=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="NotImplementedException",e.constructor=e,e}(),v=function(){function e(e,t){this.begin=e,this.end=t,this.message="Missing data ["+e+", "+t+")"}return e.prototype=new Error,e.prototype.name="MissingDataException",e.constructor=e,e}(),g=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="XRefParseException",e.constructor=e,e}(),y=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="FormatError",e.constructor=e,e}(),b=function(){function e(e){this.name="AbortException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),w=/\x00/g;function S(e){c("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,n=new Uint8Array(t),i=0;ie[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t},e.intersect=function(t,n){function i(e,t){return e-t}var r=[t[0],t[2],n[0],n[2]].sort(i),a=[t[1],t[3],n[1],n[3]].sort(i),o=[];return t=e.normalizeRect(t),n=e.normalizeRect(n),(r[0]===t[0]&&r[1]===n[0]||r[0]===n[0]&&r[1]===t[0])&&(o[0]=r[1],o[2]=r[2],(a[0]===t[1]&&a[1]===n[1]||a[0]===n[1]&&a[1]===t[1])&&(o[1]=a[1],o[3]=a[2],o))};var n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];return e.toRoman=function(e,t){c(Number.isInteger(e)&&e>0,"The number should be a positive integer.");for(var i,r=[];e>=1e3;)e-=1e3,r.push("M");i=e/100|0,e%=100,r.push(n[i]),i=e/10|0,e%=10,r.push(n[10+i]),r.push(n[20+e]);var a=r.join("");return t?a.toLowerCase():a},e.appendToArray=function(e,t){Array.prototype.push.apply(e,t)},e.prependToArray=function(e,t){Array.prototype.unshift.apply(e,t)},e.extendObj=function(e,t){for(var n in t)e[n]=t[n]},e.getInheritableProperty=function(e,t,n){for(;e&&!e.has(t);)e=e.get("Parent");return e?n?e.getArray(t):e.get(t):null},e.inherit=function(e,t,n){for(var i in e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n)e.prototype[i]=n[i]},e.loadScript=function(e,t){var n=document.createElement("script"),i=!1;n.setAttribute("src",e),t&&(n.onload=function(){i||t(),i=!0}),document.getElementsByTagName("head")[0].appendChild(n)},e}(),k=function(){function e(e,t,n,i,r,a){this.viewBox=e,this.scale=t,this.rotation=n,this.offsetX=i,this.offsetY=r;var o,s,l,c,u,d,h,p,f=(e[2]+e[0])/2,m=(e[3]+e[1])/2;switch(n=(n%=360)<0?n+360:n){case 180:o=-1,s=0,l=0,c=1;break;case 90:o=0,s=1,l=1,c=0;break;case 270:o=0,s=-1,l=-1,c=0;break;default:o=1,s=0,l=0,c=-1}a&&(l=-l,c=-c),0===o?(u=Math.abs(m-e[1])*t+i,d=Math.abs(f-e[0])*t+r,h=Math.abs(e[3]-e[1])*t,p=Math.abs(e[2]-e[0])*t):(u=Math.abs(f-e[0])*t+i,d=Math.abs(m-e[1])*t+r,h=Math.abs(e[2]-e[0])*t,p=Math.abs(e[3]-e[1])*t),this.transform=[o*t,s*t,l*t,c*t,u-o*t*f-l*t*m,d-s*t*f-c*t*m],this.width=h,this.height=p,this.fontScale=t}return e.prototype={clone:function(t){var n="scale"in(t=t||{})?t.scale:this.scale,i="rotation"in t?t.rotation:this.rotation;return new e(this.viewBox.slice(),n,i,this.offsetX,this.offsetY,t.dontFlip)},convertToViewportPoint:function(e,t){return P.applyTransform([e,t],this.transform)},convertToViewportRectangle:function(e){var t=P.applyTransform([e[0],e[1]],this.transform),n=P.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]},convertToPdfPoint:function(e,t){return P.applyInverseTransform([e,t],this.transform)}},e}(),C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function x(){var e={};return e.promise=new Promise(function(t,n){e.resolve=t,e.reject=n}),e}var T,A=function(){function e(e,t,n){for(;e.lengtha&&(a=o.length)}for(t=0,n=i.length;t2&&void 0!==arguments[2]&&arguments[2])&&URL.createObjectURL){var n=E(e,t);return URL.createObjectURL(n)}for(var i="data:"+t+";base64,",r=0,a=e.length;r>2]+T[(3&o)<<4|s>>4]+T[r+1>6:64]+T[r+22&&void 0!==arguments[2]?arguments[2]:null;return e?new Promise(function(i,r){i(e.apply(n,t))}):Promise.resolve(void 0)}function L(e){if("object"!==(void 0===e?"undefined":i(e)))return e;switch(e.name){case"AbortException":return new b(e.message);case"MissingPDFException":return new p(e.message);case"UnexpectedResponseException":return new f(e.message,e.status);default:return new d(e.message,e.details)}}function M(e,t,n){t?e.resolve():e.reject(n)}function O(e,t,n){var i=this;this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null);var r=this.callbacksCapabilities=Object.create(null),a=this.actionHandler=Object.create(null);this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===i.sourceName)if(t.stream)i._processStreamMessage(t);else if(t.isReply){var o=t.callbackId;if(!(t.callbackId in r))throw new Error("Cannot resolve callback "+o);var s=r[o];delete r[o],"error"in t?s.reject(L(t.error)):s.resolve(t.data)}else{if(!(t.action in a))throw new Error("Unknown action from worker: "+t.action);var l=a[t.action];if(t.callbackId){var c=i.sourceName,u=t.sourceName;Promise.resolve().then(function(){return l[0].call(l[1],t.data)}).then(function(e){n.postMessage({sourceName:c,targetName:u,isReply:!0,callbackId:t.callbackId,data:e})},function(e){n.postMessage({sourceName:c,targetName:u,isReply:!0,callbackId:t.callbackId,error:function(e){return!(e instanceof Error)||e instanceof b||e instanceof p||e instanceof f||e instanceof d?e:new d(e.message,e.toString())}(e)})})}else t.streamId?i._createStreamSink(t):l[0].call(l[1],t.data)}},n.addEventListener("message",this._onComObjOnMessage)}O.prototype={on:function(e,t,n){var i=this.actionHandler;if(i[e])throw new Error('There is already an actionName called "'+e+'"');i[e]=[t,n]},send:function(e,t,n){var i={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t};this.postMessage(i,n)},sendWithPromise:function(e,t,n){var i=this.callbackId++,r={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t,callbackId:i},a=x();this.callbacksCapabilities[i]=a;try{this.postMessage(r,n)}catch(e){a.reject(e)}return a.promise},sendWithStream:function(e,t,n,i){var a=this,o=this.streamId++,s=this.sourceName,l=this.targetName;return new r.ReadableStream({start:function(n){var i=x();return a.streamControllers[o]={controller:n,startCall:i,isClosed:!1},a.postMessage({sourceName:s,targetName:l,action:e,streamId:o,data:t,desiredSize:n.desiredSize}),i.promise},pull:function(e){var t=x();return a.streamControllers[o].pullCall=t,a.postMessage({sourceName:s,targetName:l,stream:"pull",streamId:o,desiredSize:e.desiredSize}),t.promise},cancel:function(e){var t=x();return a.streamControllers[o].cancelCall=t,a.streamControllers[o].isClosed=!0,a.postMessage({sourceName:s,targetName:l,stream:"cancel",reason:e,streamId:o}),t.promise}},n)},_createStreamSink:function(e){var t=this,n=this,i=this.actionHandler[e.action],r=e.streamId,a=e.desiredSize,o=this.sourceName,s=e.sourceName,l=function(e){var n=e.stream,i=e.chunk,a=e.transfers,l=e.success,c=e.reason;t.postMessage({sourceName:o,targetName:s,stream:n,streamId:r,chunk:i,success:l,reason:c},a)},c={enqueue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments[2];if(!this.isCancelled){var i=this.desiredSize;this.desiredSize-=t,i>0&&this.desiredSize<=0&&(this.sinkCapability=x(),this.ready=this.sinkCapability.promise),l({stream:"enqueue",chunk:e,transfers:n})}},close:function(){this.isCancelled||(this.isCancelled=!0,l({stream:"close"}),delete n.streamSinks[r])},error:function(e){this.isCancelled||(this.isCancelled=!0,l({stream:"error",reason:e}))},sinkCapability:x(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:a,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[r]=c,I(i[0],[e.data,c],i[1]).then(function(){l({stream:"start_complete",success:!0})},function(e){l({stream:"start_complete",success:!1,reason:e})})},_processStreamMessage:function(e){var t=this,n=this.sourceName,i=e.sourceName,r=e.streamId,a=function(e){var a=e.stream,o=e.success,s=e.reason;t.comObj.postMessage({sourceName:n,targetName:i,stream:a,success:o,streamId:r,reason:s})},o=function(){Promise.all([t.streamControllers[e.streamId].startCall,t.streamControllers[e.streamId].pullCall,t.streamControllers[e.streamId].cancelCall].map(function(e){return e&&(t=e.promise,Promise.resolve(t).catch(function(){}));var t})).then(function(){delete t.streamControllers[e.streamId]})};switch(e.stream){case"start_complete":M(this.streamControllers[e.streamId].startCall,e.success,L(e.reason));break;case"pull_complete":M(this.streamControllers[e.streamId].pullCall,e.success,L(e.reason));break;case"pull":if(!this.streamSinks[e.streamId]){a({stream:"pull_complete",success:!0});break}this.streamSinks[e.streamId].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[e.streamId].sinkCapability.resolve(),this.streamSinks[e.streamId].desiredSize=e.desiredSize,I(this.streamSinks[e.streamId].onPull).then(function(){a({stream:"pull_complete",success:!0})},function(e){a({stream:"pull_complete",success:!1,reason:e})});break;case"enqueue":c(this.streamControllers[e.streamId],"enqueue should have stream controller"),this.streamControllers[e.streamId].isClosed||this.streamControllers[e.streamId].controller.enqueue(e.chunk);break;case"close":if(c(this.streamControllers[e.streamId],"close should have stream controller"),this.streamControllers[e.streamId].isClosed)break;this.streamControllers[e.streamId].isClosed=!0,this.streamControllers[e.streamId].controller.close(),o();break;case"error":c(this.streamControllers[e.streamId],"error should have stream controller"),this.streamControllers[e.streamId].controller.error(L(e.reason)),o();break;case"cancel_complete":M(this.streamControllers[e.streamId].cancelCall,e.success,L(e.reason)),o();break;case"cancel":if(!this.streamSinks[e.streamId])break;I(this.streamSinks[e.streamId].onCancel,[L(e.reason)]).then(function(){a({stream:"cancel_complete",success:!0})},function(e){a({stream:"cancel_complete",success:!1,reason:e})}),this.streamSinks[e.streamId].sinkCapability.reject(L(e.reason)),this.streamSinks[e.streamId].isCancelled=!0,delete this.streamSinks[e.streamId];break;default:throw new Error("Unexpected stream case")}},postMessage:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)},destroy:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}},t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.VERBOSITY_LEVELS=a,t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.FontType={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},t.AbortException=b,t.InvalidPDFException=h,t.MessageHandler=O,t.MissingDataException=v,t.MissingPDFException=p,t.NativeImageDecoding={NONE:"none",DECODE:"decode",DISPLAY:"display"},t.NotImplementedException=m,t.PageViewport=k,t.PasswordException=u,t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},t.StatTimer=A,t.StreamType={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.UnexpectedResponseException=f,t.UnknownErrorException=d,t.Util=P,t.XRefParseException=g,t.FormatError=y,t.arrayByteLength=_,t.arraysToBytes=function(e){if(1===e.length&&e[0]instanceof Uint8Array)return e[0];var t,n,i,r=0,a=e.length;for(t=0;t=a.infos&&console.log("Info: "+e)},t.isArrayBuffer=function(e){return"object"===(void 0===e?"undefined":i(e))&&null!==e&&void 0!==e.byteLength},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSpace=function(e){return 32===e||9===e||13===e||10===e},t.isNodeJS=function(){return"object"===("undefined"==typeof process?"undefined":i(process))&&process+""=="[object process]"},t.isSameOrigin=function(e,t){try{var n=new URL(e);if(!n.origin||"null"===n.origin)return!1}catch(e){return!1}var i=new URL(t,n);return n.origin===i.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var n=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(n))return n}catch(e){}return null},t.isLittleEndian=function(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]},t.isEvalSupported=function(){try{return new Function(""),!0}catch(e){return!1}},t.loadJpegStream=function(e,t,n){var i=new Image;i.onload=function(){n.resolve(e,i)},i.onerror=function(){n.resolve(e,null),s("Error during JPEG image loading")},i.src=t},t.log2=function(e){for(var t=1,n=0;e>t;)t<<=1,n++;return n},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.removeNullCharacters=function(e){return"string"!=typeof e?(s("The argument for removeNullCharacters must be a string."),e):e.replace(w,"")},t.ReadableStream=r.ReadableStream,t.setVerbosityLevel=function(e){o=e},t.shadow=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!1}),n},t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=S,t.stringToPDFString=function(e){var t,n=e.length,i=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t0?r(i(e),9007199254740991):0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.getDefaultSetting=t.LinkTarget=t.getFilenameFromUrl=t.isValidUrl=t.isExternalLinkTargetSet=t.addLinkAttributes=t.RenderingCancelledException=t.CustomStyle=void 0;var i,r=function(){function e(e,t){for(var n=0;n0&&t>0,"Invalid SVG dimensions");var n=document.createElementNS(u,"svg:svg");return n.setAttribute("version","1.1"),n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px"),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox","0 0 "+e+" "+t),n}},{key:"createElement",value:function(e){return(0,a.assert)("string"==typeof e,"Invalid SVG element type"),document.createElementNS(u,e)}}]),e}(),f=function(){var e=["ms","Moz","Webkit","O"],t=Object.create(null);function n(){}return n.getProp=function(n,i){if(1===arguments.length&&"string"==typeof t[n])return t[n];var r,a,o=(i=i||document.documentElement).style;if("string"==typeof o[n])return t[n]=n;a=n.charAt(0).toUpperCase()+n.slice(1);for(var s=0,l=e.length;s0?t:e.length,n>0?n:e.length);return e.substring(e.lastIndexOf("/",i)+1,i)},t.LinkTarget=v,t.getDefaultSetting=y,t.DEFAULT_LINK_REL=c,t.DOMCanvasFactory=d,t.DOMCMapReaderFactory=h,t.DOMSVGFactory=p},function(e,t,n){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var i=n(9),r=n(59),a=n(39),o=Object.defineProperty;t.f=n(7)?Object.defineProperty:function(e,t,n){if(i(e),t=a(t,!0),i(n),r)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";var i=n(1),r=n(8),a=n(10),o=n(17)("src"),s=n(98),l=(""+s).split("toString");n(4).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(a(n,"name")||r(n,"name",t)),e[t]!==n&&(c&&(a(n,o)||r(n,o,e[t]?""+e[t]:l.join(String(t)))),e===i?e[t]=n:s?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||s.call(this)})},function(e,t,n){"use strict";var i=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++i+r).toString(36))}},function(e,t,n){"use strict";var i=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:i)(e)}},function(e,t,n){"use strict";var i=n(42);e.exports=function(e){return Object(i(e))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFRenderingQueue=t.RenderingStates=void 0;var i=function(){function e(e,t){for(var n=0;n=y?g-(b-y)/2:g,pageY:v}}}return null}window.hightMap={set:function(e,t){this[e]=t},get:function(e){return this[e]},contains:function(e){return null!=this[e]},remove:function(e){delete this[e]},removeAll:function(){for(var e in this)"function"!=typeof this[e]&&delete this[e]}};var v=function(){function e(e,t,n){this.isStamp=!1,this.toolbarButton=e,this.secondaryToolbarButton=t,this.app=n,this.sidebar=n.pdfSidebar,this.fileType=window.KGPdfViewerWebApp.fileType,this.seal=null,this.capability=null,this.touchstartEvent=null,this.pdfStampSeal=new a.PDFStampSeal(o.KGPdfViewerWebApp),this.stampMobileTip=document.getElementById("stamp-mobile-tip"),this.stampMobieCancel=document.getElementById("stamp-mobile-cancel"),this.isContinuityStampCheck=!1,this.continuityRange=null,this.isStampOfQfz=!1,this.tempSeals=[],this.init()}return e.prototype={init:function(){var e=this;window.KGPdfViewerWebApp.btnPositionConfig.toolbar.indexOf("stamp")>-1&&this.toolbarButton.removeAttribute("hidden"),window.KGPdfViewerWebApp.btnPositionConfig.sidebar.indexOf("stamp")>-1&&this.secondaryToolbarButton.removeAttribute("hidden"),this.toolbarButton.onclick=this.secondaryToolbarButton.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.app.secondaryToolbar.close();var n=window.KGPdfViewerWebApp.getSelectSealPrompt();if((e.tempSeals.length||e.isStamp)&&null!==n.seals&&n.seals.length>0){e.isStamp=!1,e.app.KGStampConfirm.hide(),n.open();for(var i=1;i0&&o>0){var u=document.getElementById(i.id+"stamp"),p=a/c-t.seal.width/2,f=o/c-t.seal.height/2,v=(new Date).getTime();u?(u.setAttribute("data-annotation-id",v),u.style.transform="matrix("+c+", 0, 0, "+c+", 0, 0)",u.style.left=p+"px",u.style.top=f+"px",h.setProp("transform",u,"matrix("+c+", 0, 0, "+c+", 0, 0)"),h.setProp("transformOrigin",u,-1*p+"px "+-1*f+"px")):(this.removeStampNode(),(u=this._createSection(this.seal,i.id+"stamp",v,"stamp",p,f,c)).querySelector("img").addEventListener("mousedown",d.eventPreventDefault),l.div.appendChild(u))}else this.removeStampNode()}else this.removeStampNode()}},_createSection:function(e,t,n,i,r,a,o){var s=document.createElement("section");s.setAttribute("data-annotation-id",n),s.id=t,s.className=i,s.style.width=e.width+"px",s.style.height=e.height+"px";var l=document.createElement("img");return l.src=e.imgdata,l.style.width="100%",l.style.height="100%",l.style.opacity="0.8",s.appendChild(l),s.style.transform="matrix("+o+", 0, 0, "+o+", 0, 0)",s.style.left=r+"px",s.style.top=a+"px",h.setProp("transform",s,"matrix("+o+", 0, 0, "+o+", 0, 0)"),h.setProp("transformOrigin",s,-1*r+"px "+-1*a+"px"),s},cancelStamp:function(){this.isStamp&&(this.isStamp=!1,this.stopMoveStamp=!1,document.body.style.cursor="default",document.onmousemove=null,this.removeStampNode(),window.hightMap.removeAll())},clearTempSeals:function(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.app,n=t.pagesCount,i=t.pdfViewer,r=1;r<=n;r++){var a=i.getPageView(r-1),o=a.pdfPage.tempStamps,s=a.annotationLayer;for(var l in o)if(o.hasOwnProperty(l)){if(s&&s.div&&document.getElementById(o[l].id)){var c=!1;if(3===l.split("-").length)o[l].getAttribute("class")||(c=!0);(!c||c&&e)&&s.div.removeChild(o[l])}delete o[l]}}this.tempSeals=[]},removeStampNode:function(){var e=document.getElementsByClassName("stamp");0!==e.length&&e[0].parentNode.removeChild(e[0])},checkPageNum:function(e){var t=window.KGPdfViewerWebApp.getNumPages();if(!/^\d+-\d+$/.test(e))throw new Error("页码格式不正确!");var n=e.split("-"),i=parseInt(n[0]),r=parseInt(n[1]);if(i>r){var a=i;i=r,r=a}return i<1&&(i=1),i>t&&(i=t),r>t&&(r=t),{pages:i+"-"+r,startPage:i,endPage:r}},stampOfXY:function(e,t,n,i){var r=this,a=this.checkPageNum(e),o=a.startPage,l=a.endPage,c=this;if(this.stopMoveStamp=!0,i){var u=c.pdfStampSeal.createAddSealPromise(),d=i;d.left=t,d.top=n,d.page=a.pages,d.isStampOfXY=!0;var h=(0,s.createCapability)(),p={sealdata:[d],capability:h};u.resolve(p),h.promise.then(function(e){if(e.status)for(var r=(new Date).getTime(),a=c.app.pdfViewer.getPageView(0),s=a.viewport.scale,u=c._createSection(i,"",r,"",t,n,s),d=0,h=o;h<=l;h++){a=c.app.pdfViewer.getPageView(h-1);var p=u.cloneNode(!0);p.id=(new Date).getTime()+"-"+d++,c.updatePageView(a,p)}}).finally(function(){r.onDocumentContextmenu()})}else{this.pdfStampSeal.getSealObjet().then(function(e){var i=e.seal,u=c.pdfStampSeal.createAddSealPromise(),d=i;d.left=t,d.top=n,d.page=a.pages,d.isStampOfXY=!0;var h=(0,s.createCapability)(),p={sealdata:[d],capability:h};u.resolve(p),h.promise.then(function(e){if(e.status)for(var r=(new Date).getTime(),a=c.app.pdfViewer.getPageView(0),s=a.viewport.scale,u=c._createSection(i,"",r,"",t,n,s),d=0,h=o;h<=l;h++){a=c.app.pdfViewer.getPageView(h-1);var p=u.cloneNode(!0);p.id=(new Date).getTime()+"-"+d++,c.updatePageView(a,p)}}).finally(function(){r.onDocumentContextmenu()})})}},stampOfText:function(e,t,n){var i=this,r=this.checkPageNum(e),a=this;if(this.stopMoveStamp=!0,n){var o=a.pdfStampSeal.createAddSealPromise(),l=n;l.page=r.pages,l.isStampOfText=!0,l.text=t;var c=(0,s.createCapability)(),u={sealdata:[l],capability:c};o.resolve(u),c.promise.then(function(e){if(e.status)for(var t=e.textPositions,i=(new Date).getTime(),r=0;rb;b++)if((v=t?y(o(f=e[b])[0],f[1]):y(e[b]))===c||v===u)return v}else for(m=g.call(e);!(f=m.next()).done;)if((v=r(m,y,f.value,t))===c||v===u)return v};d.BREAK=c,d.RETURN=u},function(e,t,n){"use strict";var i,r,a,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};o=function(e){return function(){var t=e,n=t.lib.WordArray;t.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,i=this._map;e.clamp();for(var r=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var l=i.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e,t){for(var i=e.length,r=(t=t||this._map,[]),a=0;a>>6-o%4*2,c=s|l;r[a>>>2]|=c<<24-a%4*8,a++}return n.create(r,a)}(e,i,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64},"object"===s(t)?e.exports=t=o(n(36)):(r=[n(36)],void 0===(a="function"==typeof(i=o)?i.apply(t,r):i)||(e.exports=a))},function(e,t,n){"use strict";var i,r,a,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};o=function(){var e=e||function(e,t){var n;"undefined"!=typeof window&&window.crypto&&(n=window.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&"undefined"!=typeof global&&global.crypto&&(n=global.crypto);var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},o=a.lib={},s=o.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=o.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes,r=e.sigBytes;if(this.clamp(),i%4)for(var a=0;a>>2]>>>24-a%4*8&255;t[i+a>>>2]|=o<<24-(i+a)%4*8}else for(a=0;a>>2]=n[a>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-r%4*8&255;i.push((a>>>4).toString(16)),i.push((15&a).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new l.init(n,t/2)}},d=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;r>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(a))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new l.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=o.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,i=this._data,r=i.words,a=i.sigBytes,o=this.blockSize,s=a/(4*o),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,u=e.min(4*c,a);if(c){for(var d=0;d=2)for(var i=1;iS;S++)if((h||S in y)&&(v=b(m=y[S],S,g),e))if(n)_[S]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return S;case 2:_.push(m)}else if(u)return!1;return d?-1:c||u?u:_}}},function(e,t,n){"use strict";var i=n(9),r=n(25),a=n(3)("species");e.exports=function(e,t){var n,o=i(e).constructor;return void 0===o||void 0==(n=i(o)[a])?t:r(n)}},function(e,t,n){"use strict";var i=n(3)("iterator"),r=!1;try{var a=[7][i]();a.return=function(){r=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var a=[7],o=a[i]();o.next=function(){return{done:n=!0}},a[i]=function(){return o},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var i=n(25);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i}),this.resolve=i(t),this.reject=i(n)}(e)}},function(e,t,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(17)("meta"),a=n(2),o=n(10),s=n(15).f,l=0,c=Object.isExtensible||function(){return!0},u=!n(14)(function(){return c(Object.preventExtensions({}))}),d=function(e){s(e,r,{value:{i:"O"+ ++l,w:{}}})},h=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!a(e))return"symbol"==(void 0===e?"undefined":i(e))?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!c(e))return"F";if(!t)return"E";d(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!c(e))return!0;if(!t)return!1;d(e)}return e[r].w},onFreeze:function(e){return u&&h.NEED&&c(e)&&!o(e,r)&&d(e),e}}},function(e,t,n){"use strict";var i=n(2);e.exports=function(e,t){if(!i(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeStampMenu=t.createSealNode=void 0;var i=n(21),r=n(54),a=n(55),o=n(22),s=n(56),l=n(90),c=n(5);function u(e,t,n,i,u,p){var f=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],m=window.KGPdfViewerWebApp.PDFViewerApplication.KGAlertPrompt,v=(0,o.getNumbOfPx)(n.style.left),g=(0,o.getNumbOfPx)(n.style.top),y=(0,o.getNumbOfPx)(n.style.width),b=(0,o.getNumbOfPx)(n.style.height);function w(i){i.preventDefault(),i.stopPropagation();var u=t.pdfViewer.app,d=(e.pageIndex,t.viewport.scale),p=(0,o.convertScreenToViewportPoint)(i,u.pdfSidebar),f=p.pageX/d,v=p.pageY/d,g=window.KGPdfViewerWebApp.PDFViewerApplication,y=g.KG_FJRS,b=g.KG_ScanStamp;if(!0===window.KGPdfViewerWebApp.useCaptcha)(0,l.getPhone)().then(function(i){u.KGCaptcha.okCallback=function(i){h(t,u,e,n,f,v,i)},u.KGCaptcha.open(i)});else if(y&&y.delKeySN)y.deleteScanStamp(function(){h(t,u,e,n,f,v,"")});else if(b)b.getQrCodeImage("delete",function(){h(t,u,e,n,f,v,"")});else{var w=window.KGPdfViewerWebApp.getPasswordPrompt();w.setUpdateCallback(function(i){var o=window.KGPdfViewerWebApp.sealOrigin,l=window.KGPdfViewerWebApp.fileType;if("1"===o.toString())if("OFD"===l){var d=function(r,a){return h(t,u,e,n,f,v,i,r,a)},p=function(e){return(0,c.closeOverlay)().then(function(){return m.open(e)})};!0===window.KGPdfViewerWebApp.useNFSSystem?(0,r.deleteNFSSeal)(i,d,p):(0,a.deleteOfdSeal)(i,d,p)}else{var g=new s.iWebAssist({cilentType:"0"});Promise.all([g.promise]).then(function(){return g.getKeyOtherInfo()}).then(function(r){if(r.result){var a=r.Res,o=a.substring(1,a.length-1);g.verifyPin(i,o).then(function(r){if(!r.result){var a={"-1":"未安装签名组件","-2":"待验证pin的key和当前插入的key不匹配",1:"没有检测到用户key",2:"非法未授权的key",3:"没有找到key驱动文件",4:"插入太多的key",7:"密码错误",8:"非法授权key",9:"网络连接失败"}[r.errcode]||r.errmsg||"未知异常";return window.KGPdfViewerWebApp.getTipPrompt().close(),void m.open(a)}window.KGPdfViewerWebApp.userId=o,h(t,u,e,n,f,v,i)})}else{var s={"-1":"未安装管理组件","-2":"请插入密钥盘","-100":"不支持此类型的信息获取"}[r.errcode]||r.errmsg||"未知异常";m.open(s)}})}else h(t,u,e,n,f,v,i)}),w.open()}}var S=p.querySelector(".delSealNode");function _(n){n.preventDefault(),n.stopPropagation();var i=t.pdfViewer.app,r=t.viewport.scale,a=(0,o.convertScreenToViewportPoint)(n,i.pdfSidebar),l=a.pageX,c=a.pageY,u=l/r,d=c/r;if(f){if(!(u>=v&&u<=v+y&&d>=g&&d<=g+b))return}else{var h=t.getPagePoint(l,c),p=h[0],w=h[1],S=t.viewport.viewBox;if(w=Math.abs(S[3]-S[1])-w,!(p>=v&&p<=v+y&&w>=g&&w<=g+b))return}var _=window.KGPdfViewerWebApp.getTipPrompt();switch(t.pdfViewer.app.l10n._lang){case"zh-TW":_.open("正在驗證印章...");break;case"en-US":_.open("Verifying seal...");break;default:_.open("正在验证印章...")}window.KGPdfViewerWebApp.verifySeal(e.pageIndex+1,u,d).then(function(e){var t=e.data;if(t.status){var i=window.KGPdfViewerWebApp.PDFViewerApplication.KG_VerifySealPrompt,r=t.seal.cert;if(!("OFD"!==window.KGPdfViewerWebApp.fileType||t.seal.effectiveness&&t.seal.cert.sigEffectiveness)){var a=void 0;switch(n.target.nodeName.toUpperCase()){case"DIV":a=n.target;break;case"SVG":a=n.target.parentNode;break;case"SECTION":a=n.target.firstChild}if(a){var o="width:"+(y-2)+"px;height:"+(b-2)+"px";a.innerHTML=''}}if(r&&r.newHash){var l=new s.iWebAssist({cilentType:"0"});return Promise.all([l.promise]).then(function(){return window.KGPdfViewerWebApp.PDFViewerApplication.KG_FJRS?r.bSignByCalibrary?l.setParamByName("FJRSISPHONE","1"):l.setParamByName("FJRSISPHONE","0"):Promise.resolve()}).then(function(){return l.verifySignMessage(r.newHash,r.sigData)}).then(function(e){if(e.result)r.sigEffectiveness=!0;else{if("-8"!=e.errcode)return"-1"==e.errcode?void m.open("未安装签名组件"):void m.open(e.errmsg||"签名验证失败,errcode="+e.errcode);r.sigEffectiveness=!1}_.close().then(function(){return i.open(t)})})}_.close().then(function(){return i.open(t)})}else _.close().then(function(){return m.open(t.message)})})}function P(n){n.preventDefault(),n.stopPropagation();var i=document.getElementById("rightMenu");i&&i.parentNode.removeChild(i);var r=t.pdfViewer.app,a=t.viewport.scale,s=(0,o.convertScreenToViewportPoint)(n,r.pdfSidebar),l=s.pageX,c=s.pageY,u=l/a,h=c/a;if(f){if(!(u>=v&&u<=v+y&&h>=g&&h<=g+b))return}else{var p=t.getPagePoint(l,c),m=p[0],S=p[1],P=t.viewport.viewBox;if(S=Math.abs(P[3]-P[1])-S,!(m>=v&&m<=v+y&&S>=g&&S<=g+b))return}var k=r.KG_FJRS;k&&(k.delKeySN=null),window.KGPdfViewerWebApp.checkLastone(e.pageIndex+1,u,h).then(function(e){var i=document.createElement("div");i.id="rightMenu",i.style.position="absolute",i.style["background-color"]="white",i.style.border="1px solid #999",i.style.zIndex="200",t.viewport.width删除签章',k&&e.keySN&&(k.delKeySN=e.keySN)):i.innerHTML=r,t.div.appendChild(i),t.pdfViewer.app.l10n.translate(i);var a=i.querySelector(".menuVerifySeal"),o=i.querySelector(".menuDeleteSeal");a.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),_(n),d()}),a.oncontextmenu=null,o&&o.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),w(n),d()})})}if(n.onmouseout=function(e){S&&(S.style.display="none"),p.style.border="1px dashed transparent"},n.onmouseover=function(e){p.style.border="1px dashed black",S&&(S.style.display="block")},"0"===window.KGPdfViewerWebApp.mobile.toString()){if(n.addEventListener("click",_),S&&S.addEventListener("click",w),window.KGPdfViewerWebApp.readOnly)return;n.oncontextmenu=P}else n.addEventListener("touchstart",function(e){e.preventDefault(),e.stopPropagation(),window.touchstartEvent=e,window.KGPdfViewerWebApp.readOnly||(window.kgTimer=setTimeout(function(){window.kgTimer=0,P(e)},500))}),n.addEventListener("touchend",function(e){if(e.preventDefault(),e.stopPropagation(),0!=window.kgTimer)return clearTimeout(window.kgTimer),_(window.touchstartEvent),!1})}function d(){var e=document.getElementById("rightMenu");e&&e.parentNode.removeChild(e)}function h(e,t,n,r,a,o,s,l,u){var d=n.pageIndex;window.KGPdfViewerWebApp.deleteSeal(d+1,a,o,s,l,u).then(function(a){return(0,c.closeOverlay)().then(function(){if(a.data.status){if(window.KGPdfViewerWebApp.deleteSealSuccess&&window.KGPdfViewerWebApp.deleteSealSuccess(),!1===window.KGPdfViewerWebApp.useCaptcha)window.KGPdfViewerWebApp.getPasswordPrompt().remember();if("OFD"===window.KGPdfViewerWebApp.fileType)!function(e,t){function n(t){t.renderingState!==i.RenderingStates.RUNNING&&t.renderingState!==i.RenderingStates.PAUSED?(t.deleteStampCallback=function(){var n=t.div.querySelector(".canvasWrapper");n&&t.div.removeChild(n);var r=e.pdfThumbnailViewer.getThumbnail(t.pdfPage.pageIndex);r.renderingState=i.RenderingStates.INITIAL,r.setImage(t)},t.renderingState=i.RenderingStates.INITIAL,t.renderingQueue.renderView(t)):t.reRenderWait=!0}var r=e.pdfViewer,a=e.pagesCount,o=t.getAttribute("data-annotation-id"),s=t.getAttribute("data-goldGridSeal-id");if(s)for(var l=0;l':'',"1"===window.KGPdfViewerWebApp.mobile.toString()?s.innerHTML=o:s.innerHTML=o+"",u(e,t,n,i,r,s,!1)}else console.log("seal is not exist! id = "+h)})}else{var m='';"1"===window.KGPdfViewerWebApp.mobile.toString()?s.innerHTML=m:s.innerHTML=m+"",u(e,t,n,i,r,s)}return s},t.removeStampMenu=d},function(e,t,n){"use strict";var i,r,a,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};o=function(e){return e.enc.Utf8},"object"===s(t)?e.exports=t=o(n(36)):(r=[n(36)],void 0===(a="function"==typeof(i=o)?i.apply(t,r):i)||(e.exports=a))},function(e,t,n){"use strict";function i(e){return new Promise(function(t,n){var i=document.getElementById("SMObj"),r=i.WebGetKeyCount();if(isNaN(Number(r))||1!==Number(r))Number(r)>1?n({message:"插入了太多的密钥盘"}):-1===Number(r)?n({message:o(i,"授权已过期")}):n({message:o(i,"没有插入密钥盘")});else{var a=i.WebOpenKey(0);if(a&&"none"!==a&&"0"!==a.toString()){var s=i.WebKeyIsAdmin(a);if("false"===s||!1===s){var l=i.WebVerifyPin(a,e);l&&"-1"!==l.toString()?t({SMObj:i,keyHandle:a}):n({message:o(i,"密钥盘密码错误,请输入正确的密码")})}else n({message:"没有检测到用户密钥盘"})}else n({message:o(i,"开启密钥盘失败")})}})}function r(e,t){e.WebCloseKey(t)}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise(function(i,r){var a=e.WebGetSealData(t,n);a&&"none"!==a?i(a):r({message:o(e,"获取印章失败(印章索引:"+n+")")})})}function o(e,t){var n=e.WebGetLastErrorMsg();return n&&"none"!==n?n:t}function s(e,t,n){return new Promise(function(i,r){var a=e.WebSign(t,n);a&&"-1"!==a.toString()?i(a):r({message:o(e,"数据签名失败")})})}Object.defineProperty(t,"__esModule",{value:!0}),t.closeNFSKey=r,t.getNFSSeals=function(e,t,n,s){var l=void 0,c=void 0,u=void 0,d=void 0,h=void 0;return i(e).then(function(e){var t=e.SMObj,n=e.keyHandle;return d=t,h=n,new Promise(function(e,t){var n=d.WebGetSealCount(h);!isNaN(Number(n))&&Number(n)>=1?e(n):t({message:o(d,"密钥盘中不存在印章")})})}).then(function(e){for(var t=[],n=0;n1?Promise.reject({message:"插入了太多的密钥盘"}):-1===Number(t)?e.WebGetLastErrorMsg("授权已过期"):Promise.reject({message:"没有插入密钥盘"}):Promise.resolve()})}},{key:"WebKeyIsNotAdmin",value:function(e){var t=this;return this.kg.invoke("WebKeyIsAdmin",e).then(function(e){return"false"===e||!1===e?Promise.resolve():t.WebGetLastErrorMsg("没有检测到用户密钥盘")})}},{key:"WebSign",value:function(e,t){var n=this;return this.kg.invoke("WebSign",e,t).then(function(e){return e?Promise.resolve(e):n.WebGetLastErrorMsg("数据签名失败")})}},{key:"WebVerifyPin",value:function(e,t){var n=this;return this.kg.invoke("WebVerifyPin",e,t).then(function(e){return e&&"0"===e?Promise.resolve():n.WebGetLastErrorMsg("密钥盘密码错误,请输入正确的密码")})}},{key:"WebGetCertData",value:function(e){var t=this;return this.kg.invoke("WebGetCertData",e,0).then(function(e){return e&&"none"!==e?Promise.resolve(e):t.WebGetLastErrorMsg("获取证书失败")})}},{key:"WebGetSealCount",value:function(e){var t=this;return this.kg.invoke("WebGetSealCount",e).then(function(e){return!isNaN(Number(e))&&Number(e)>=1?Promise.resolve(Number(e)):t.WebGetLastErrorMsg("密钥盘中不存在印章")})}},{key:"WebGetSealData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.kg.invoke("WebGetSealData",e,n).then(function(e){return e&&"none"!==e?Promise.resolve(e):t.WebGetLastErrorMsg("获取印章失败(印章索引:"+n+")")})}},{key:"WebGetKeySerialNumber",value:function(e){var t=this;return this.kg.invoke("WebGetKeySerialNumber",e).then(function(e){return e&&"none"!==e?Promise.resolve(e):t.WebGetLastErrorMsg("获取密钥盘序列号失败")})}},{key:"WebGetKeyUnit",value:function(e){var t=this;return this.kg.invoke("WebGetKeyUnit",e).then(function(e){return e&&"none"!==e?Promise.resolve(e):t.WebGetLastErrorMsg("获取用章单位失败")})}},{key:"WebGetLastErrorMsg",value:function(e){return this.kg.invoke("WebGetLastErrorMsg").then(function(t){return t&&"none"!==t?Promise.reject({message:t}):Promise.reject({message:e})})}}]),e}();t.getCert=function(e,t,n,i){var r=new c,a=void 0;r.promise.then(function(){return r.WebGetKeyCount()}).then(function(){return r.WebOpenKey(0)}).then(function(e){return a=e,r.WebKeyIsNotAdmin(a)}).then(function(){return r.WebVerifyPin(a,e)}).then(function(){return r.WebGetCertData(a)}).then(function(e){return t(e)}).then(function(e){n(e)}).catch(function(e){var t=e.message;return i(t),Promise.resolve()}).then(function(){if(null!=a)return r.WebCloseKey(a)})},t.getOfdSeals=function(e,t,n,i){var r=new c,a=void 0,o=void 0,s=void 0,l=void 0;r.promise.then(function(){return r.WebGetKeyCount()}).then(function(){return r.WebOpenKey(0)}).then(function(e){return a=e,r.WebKeyIsNotAdmin(e)}).then(function(){return r.WebVerifyPin(a,e)}).then(function(){return r.WebGetKeySerialNumber(a)}).then(function(e){return o=e,r.WebGetKeyUnit(a)}).then(function(e){return s=e,r.WebGetCertData(a)}).then(function(e){return l=e,r.WebGetSealCount(a)}).then(function(e){for(var t=[],n=0;n>>0,i=0;i0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var W=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,K=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},q={};function U(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(q[e]=r),t&&(q[t[0]]=function(){return G(r.apply(this,arguments),t[1],t[2])}),n&&(q[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function z(e,t){return e.isValid()?(t=H(t,e.localeData()),j[t]=j[t]||function(e){var t,n,i,r=e.match(W);for(t=0,n=r.length;t=0&&K.test(e);)e=e.replace(K,i),K.lastIndex=0,n-=1;return e}var Y=/\d/,X=/\d\d/,J=/\d{3}/,Q=/\d{4}/,Z=/[+-]?\d{6}/,$=/\d\d?/,ee=/\d\d\d\d?/,te=/\d\d\d\d\d\d?/,ne=/\d{1,3}/,ie=/\d{1,4}/,re=/[+-]?\d{1,6}/,ae=/\d+/,oe=/[+-]?\d+/,se=/Z|[+-]\d\d:?\d\d/gi,le=/Z|[+-]\d\d(?::?\d\d)?/gi,ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function de(e,t,n){ue[e]=I(t)?t:function(e,i){return e&&n?n:t}}function he(e,t){return h(ue,e)?ue[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,i,r){return t||n||i||r})))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function me(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),c(t)&&(i=function(e,n){n[t]=k(e)}),n=0;n68?1900:2e3)};var Ee,De=Ie("FullYear",!0);function Ie(e,t){return function(n){return null!=n?(Me(this,e,n),r.updateOffset(this,t),this):Le(this,e)}}function Le(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Me(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Ae(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Oe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Oe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,i=(t%(n=12)+n)%n;return e+=(t-i)/12,1===i?Ae(e)?29:28:31-i%7%2}Ee=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function qe(e,t,n){var i=7+t-n;return-((7+je(e,0,i).getUTCDay()-t)%7)+i-1}function Ue(e,t,n,i,r){var a,o,s=1+7*(t-1)+(7+n-i)%7+qe(e,i,r);return s<=0?o=Te(a=e-1)+s:s>Te(e)?(a=e+1,o=s-Te(e)):(a=e,o=s),{year:a,dayOfYear:o}}function ze(e,t,n){var i,r,a=qe(e.year(),t,n),o=Math.floor((e.dayOfYear()-a-1)/7)+1;return o<1?i=o+He(r=e.year()-1,t,n):o>He(e.year(),t,n)?(i=o-He(e.year(),t,n),r=e.year()+1):(r=e.year(),i=o),{week:i,year:r}}function He(e,t,n){var i=qe(e,t,n),r=qe(e+1,t,n);return(Te(e)-i+r)/7}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),B("week",5),B("isoWeek",5),de("w",$),de("ww",$,X),de("W",$),de("WW",$,X),ve(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=k(e)});function Ye(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("d",0,"do","day"),U("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),U("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),U("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),B("day",11),B("weekday",11),B("isoWeekday",11),de("d",$),de("e",$),de("E",$),de("dd",function(e,t){return t.weekdaysMinRegex(e)}),de("ddd",function(e,t){return t.weekdaysShortRegex(e)}),de("dddd",function(e,t){return t.weekdaysRegex(e)}),ve(["dd","ddd","dddd"],function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:m(n).invalidWeekday=e}),ve(["d","e","E"],function(e,t,n,i){t[i]=k(e)});var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ze=ce;var $e=ce;var et=ce;function tt(){function e(e,t){return t.length-e.length}var t,n,i,r,a,o=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(i),s.push(r),l.push(a),c.push(i),c.push(r),c.push(a);for(o.sort(e),s.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)s[t]=pe(s[t]),l[t]=pe(l[t]),c[t]=pe(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function nt(){return this.hours()%12||12}function it(e,t){U(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function rt(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,nt),U("k",["kk",2],0,function(){return this.hours()||24}),U("hmm",0,0,function(){return""+nt.apply(this)+G(this.minutes(),2)}),U("hmmss",0,0,function(){return""+nt.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+G(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)}),it("a",!0),it("A",!1),N("hour","h"),B("hour",13),de("a",rt),de("A",rt),de("H",$),de("h",$),de("k",$),de("HH",$,X),de("hh",$,X),de("kk",$,X),de("hmm",ee),de("hmmss",te),de("Hmm",ee),de("Hmmss",te),me(["H","HH"],Se),me(["k","kk"],function(e,t,n){var i=k(e);t[Se]=24===i?0:i}),me(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),me(["h","hh"],function(e,t,n){t[Se]=k(e),m(n).bigHour=!0}),me("hmm",function(e,t,n){var i=e.length-2;t[Se]=k(e.substr(0,i)),t[_e]=k(e.substr(i)),m(n).bigHour=!0}),me("hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[Se]=k(e.substr(0,i)),t[_e]=k(e.substr(i,2)),t[Pe]=k(e.substr(r)),m(n).bigHour=!0}),me("Hmm",function(e,t,n){var i=e.length-2;t[Se]=k(e.substr(0,i)),t[_e]=k(e.substr(i))}),me("Hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[Se]=k(e.substr(0,i)),t[_e]=k(e.substr(i,2)),t[Pe]=k(e.substr(r))});var at,ot=Ie("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Re,monthsShort:Fe,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:Qe,weekdaysShort:Je,meridiemParse:/[ap]\.?m?\.?/i},lt={},ct={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function dt(t){var i=null;if(!lt[t]&&void 0!==e&&e&&e.exports)try{i=at._abbr;n(148),ht(i)}catch(e){}return lt[t]}function ht(e,t){var n;return e&&((n=l(t)?ft(e):pt(e,t))?at=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function pt(e,t){if(null!==t){var n,i=st;if(t.abbr=e,null!=lt[e])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=lt[e]._config;else if(null!=t.parentLocale)if(null!=lt[t.parentLocale])i=lt[t.parentLocale]._config;else{if(null==(n=dt(t.parentLocale)))return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;i=n._config}return lt[e]=new M(L(i,t)),ct[e]&&ct[e].forEach(function(e){pt(e.name,e.config)}),ht(e),lt[e]}return delete lt[e],null}function ft(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return at;if(!a(e)){if(t=dt(e))return t;e=[e]}return function(e){for(var t,n,i,r,a=0;a0;){if(i=dt(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&C(r,n,!0)>=t-1)break;t--}a++}return at}(e)}function mt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[be]<0||n[be]>11?be:n[we]<1||n[we]>Oe(n[ye],n[be])?we:n[Se]<0||n[Se]>24||24===n[Se]&&(0!==n[_e]||0!==n[Pe]||0!==n[ke])?Se:n[_e]<0||n[_e]>59?_e:n[Pe]<0||n[Pe]>59?Pe:n[ke]<0||n[ke]>999?ke:-1,m(e)._overflowDayOfYear&&(twe)&&(t=we),m(e)._overflowWeeks&&-1===t&&(t=Ce),m(e)._overflowWeekday&&-1===t&&(t=xe),m(e).overflow=t),e}function vt(e,t,n){return null!=e?e:null!=t?t:n}function gt(e){var t,n,i,a,o,s=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[we]&&null==e._a[be]&&function(e){var t,n,i,r,a,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)a=1,o=4,n=vt(t.GG,e._a[ye],ze(Lt(),1,4).year),i=vt(t.W,1),((r=vt(t.E,1))<1||r>7)&&(l=!0);else{a=e._locale._week.dow,o=e._locale._week.doy;var c=ze(Lt(),a,o);n=vt(t.gg,e._a[ye],c.year),i=vt(t.w,c.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+a,(t.e<0||t.e>6)&&(l=!0)):r=a}i<1||i>He(n,a,o)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(s=Ue(n,i,r,a,o),e._a[ye]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=vt(e._a[ye],i[ye]),(e._dayOfYear>Te(o)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=je(o,0,e._dayOfYear),e._a[be]=n.getUTCMonth(),e._a[we]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Se]&&0===e._a[_e]&&0===e._a[Pe]&&0===e._a[ke]&&(e._nextDay=!0,e._a[Se]=0),e._d=(e._useUTC?je:function(e,t,n,i,r,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,i,r,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,i,r,a,o),s}).apply(null,s),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Se]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(m(e).weekdayMismatch=!0)}}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,St=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],_t=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Pt=/^\/?Date\((\-?\d+)/i;function kt(e){var t,n,i,r,a,o,s=e._i,l=yt.exec(s)||bt.exec(s);if(l){for(m(e).iso=!0,t=0,n=St.length;t0&&m(e).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),c+=n.length),q[a]?(n?m(e).empty=!1:m(e).unusedTokens.push(a),ge(a,n,e)):e._strict&&!n&&m(e).unusedTokens.push(a);m(e).charsLeftOver=l-c,s.length>0&&m(e).unusedInput.push(s),e._a[Se]<=12&&!0===m(e).bigHour&&e._a[Se]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[Se]=function(e,t,n){var i;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}(e._locale,e._a[Se],e._meridiem),gt(e),mt(e)}else At(e);else kt(e)}function Dt(e){var t=e._i,n=e._f;return e._locale=e._locale||ft(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),_(t)?new S(mt(t)):(u(t)?e._d=t:a(n)?function(e){var t,n,i,r,a;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;rthis?this:e:g()});function Nt(e,t){var n,i;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Lt();for(n=t[0],i=1;i=0?new Date(e+400,t,n)-cn:new Date(e,t,n).valueOf()}function hn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-cn:Date.UTC(e,t,n)}function pn(e,t){U(0,[e,e.length],0,t)}function fn(e,t,n,i,r){var a;return null==e?ze(this,i,r).year:(t>(a=He(e,i,r))&&(t=a),function(e,t,n,i,r){var a=Ue(e,t,n,i,r),o=je(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,e,t,n,i,r))}U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),pn("gggg","weekYear"),pn("ggggg","weekYear"),pn("GGGG","isoWeekYear"),pn("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),B("weekYear",1),B("isoWeekYear",1),de("G",oe),de("g",oe),de("GG",$,X),de("gg",$,X),de("GGGG",ie,Q),de("gggg",ie,Q),de("GGGGG",re,Z),de("ggggg",re,Z),ve(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=k(e)}),ve(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),U("Q",0,"Qo","quarter"),N("quarter","Q"),B("quarter",7),de("Q",Y),me("Q",function(e,t){t[be]=3*(k(e)-1)}),U("D",["DD",2],"Do","date"),N("date","D"),B("date",9),de("D",$),de("DD",$,X),de("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),me(["D","DD"],we),me("Do",function(e,t){t[we]=k(e.match($)[0])});var mn=Ie("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),B("dayOfYear",4),de("DDD",ne),de("DDDD",J),me(["DDD","DDDD"],function(e,t,n){n._dayOfYear=k(e)}),U("m",["mm",2],0,"minute"),N("minute","m"),B("minute",14),de("m",$),de("mm",$,X),me(["m","mm"],_e);var vn=Ie("Minutes",!1);U("s",["ss",2],0,"second"),N("second","s"),B("second",15),de("s",$),de("ss",$,X),me(["s","ss"],Pe);var gn,yn=Ie("Seconds",!1);for(U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),N("millisecond","ms"),B("millisecond",16),de("S",ne,Y),de("SS",ne,X),de("SSS",ne,J),gn="SSSS";gn.length<=9;gn+="S")de(gn,ae);function bn(e,t){t[ke]=k(1e3*("0."+e))}for(gn="S";gn.length<=9;gn+="S")me(gn,bn);var wn=Ie("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var Sn=S.prototype;function _n(e){return e}Sn.add=$t,Sn.calendar=function(e,t){var n=e||Lt(),i=jt(n,this).startOf("day"),a=r.calendarFormat(this,i)||"sameElse",o=t&&(I(t[a])?t[a].call(this,n):t[a]);return this.format(o||this.localeData().calendar(a,this,Lt(n)))},Sn.clone=function(){return new S(this)},Sn.diff=function(e,t,n){var i,r,a;if(!this.isValid())return NaN;if(!(i=jt(e,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),t=R(t)){case"year":a=tn(this,i)/12;break;case"month":a=tn(this,i);break;case"quarter":a=tn(this,i)/3;break;case"second":a=(this-i)/1e3;break;case"minute":a=(this-i)/6e4;break;case"hour":a=(this-i)/36e5;break;case"day":a=(this-i-r)/864e5;break;case"week":a=(this-i-r)/6048e5;break;default:a=this-i}return n?a:P(a)},Sn.endOf=function(e){var t;if(void 0===(e=R(e))||"millisecond"===e||!this.isValid())return this;var n=this._isUTC?hn:dn;switch(e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=ln-un(t+(this._isUTC?0:this.utcOffset()*sn),ln)-1;break;case"minute":t=this._d.valueOf(),t+=sn-un(t,sn)-1;break;case"second":t=this._d.valueOf(),t+=on-un(t,on)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},Sn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)},Sn.from=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Lt(e).isValid())?Yt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.fromNow=function(e){return this.from(Lt(),e)},Sn.to=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Lt(e).isValid())?Yt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.toNow=function(e){return this.to(Lt(),e)},Sn.get=function(e){return I(this[e=R(e)])?this[e]():this},Sn.invalidAt=function(){return m(this).overflow},Sn.isAfter=function(e,t){var n=_(e)?e:Lt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?z(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):I(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Sn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=t+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+r)},Sn.toJSON=function(){return this.isValid()?this.toISOString():null},Sn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Sn.unix=function(){return Math.floor(this.valueOf()/1e3)},Sn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Sn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Sn.year=De,Sn.isLeapYear=function(){return Ae(this.year())},Sn.weekYear=function(e){return fn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Sn.isoWeekYear=function(e){return fn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Sn.quarter=Sn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Sn.month=Be,Sn.daysInMonth=function(){return Oe(this.year(),this.month())},Sn.week=Sn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Sn.isoWeek=Sn.isoWeeks=function(e){var t=ze(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Sn.weeksInYear=function(){var e=this.localeData()._week;return He(this.year(),e.dow,e.doy)},Sn.isoWeeksInYear=function(){return He(this.year(),1,4)},Sn.date=mn,Sn.day=Sn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Sn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Sn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Sn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Sn.hour=Sn.hours=ot,Sn.minute=Sn.minutes=vn,Sn.second=Sn.seconds=yn,Sn.millisecond=Sn.milliseconds=wn,Sn.utcOffset=function(e,t,n){var i,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Kt(le,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=qt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==e&&(!t||this._changeInProgress?Zt(this,Yt(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:qt(this)},Sn.utc=function(e){return this.utcOffset(0,e)},Sn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qt(this),"m")),this},Sn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Kt(se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Sn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Lt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Sn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Sn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Sn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Sn.isUtc=Ut,Sn.isUTC=Ut,Sn.zoneAbbr=function(){return this._isUTC?"UTC":""},Sn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Sn.dates=T("dates accessor is deprecated. Use date instead.",mn),Sn.months=T("months accessor is deprecated. Use month instead",Be),Sn.years=T("years accessor is deprecated. Use year instead",De),Sn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Sn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(b(e,this),(e=Dt(e))._a){var t=e._isUTC?f(e._a):Lt(e._a);this._isDSTShifted=this.isValid()&&C(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var Pn=M.prototype;function kn(e,t,n,i){var r=ft(),a=f().set(i,t);return r[n](a,e)}function Cn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return kn(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=kn(e,i,n,"month");return r}function xn(e,t,n,i){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var r,a=ft(),o=e?a._week.dow:0;if(null!=n)return kn(t,(n+o)%7,i,"day");var s=[];for(r=0;r<7;r++)s[r]=kn(t,(r+o)%7,i,"day");return s}Pn.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return I(i)?i.call(t,n):i},Pn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},Pn.invalidDate=function(){return this._invalidDate},Pn.ordinal=function(e){return this._ordinal.replace("%d",e)},Pn.preparse=_n,Pn.postformat=_n,Pn.relativeTime=function(e,t,n,i){var r=this._relativeTime[n];return I(r)?r(e,t,n,i):r.replace(/%d/i,e)},Pn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return I(n)?n(t):n.replace(/%s/i,t)},Pn.set=function(e){var t,n;for(n in e)I(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Pn.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ne).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},Pn.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ne.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Pn.monthsParse=function(e,t,n){var i,r,a;if(this._monthsParseExact)return function(e,t,n){var i,r,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)a=f([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=Ee.call(this._shortMonthsParse,o))?r:null:-1!==(r=Ee.call(this._longMonthsParse,o))?r:null:"MMM"===t?-1!==(r=Ee.call(this._shortMonthsParse,o))?r:-1!==(r=Ee.call(this._longMonthsParse,o))?r:null:-1!==(r=Ee.call(this._longMonthsParse,o))?r:-1!==(r=Ee.call(this._shortMonthsParse,o))?r:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=f([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(a="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},Pn.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ke.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=We),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Pn.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ke.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Ge),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Pn.week=function(e){return ze(e,this._week.dow,this._week.doy).week},Pn.firstDayOfYear=function(){return this._week.doy},Pn.firstDayOfWeek=function(){return this._week.dow},Pn.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ye(n,this._week.dow):e?n[e.day()]:n},Pn.weekdaysMin=function(e){return!0===e?Ye(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Pn.weekdaysShort=function(e){return!0===e?Ye(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Pn.weekdaysParse=function(e,t,n){var i,r,a;if(this._weekdaysParseExact)return function(e,t,n){var i,r,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=Ee.call(this._weekdaysParse,o))?r:null:"ddd"===t?-1!==(r=Ee.call(this._shortWeekdaysParse,o))?r:null:-1!==(r=Ee.call(this._minWeekdaysParse,o))?r:null:"dddd"===t?-1!==(r=Ee.call(this._weekdaysParse,o))?r:-1!==(r=Ee.call(this._shortWeekdaysParse,o))?r:-1!==(r=Ee.call(this._minWeekdaysParse,o))?r:null:"ddd"===t?-1!==(r=Ee.call(this._shortWeekdaysParse,o))?r:-1!==(r=Ee.call(this._weekdaysParse,o))?r:-1!==(r=Ee.call(this._minWeekdaysParse,o))?r:null:-1!==(r=Ee.call(this._minWeekdaysParse,o))?r:-1!==(r=Ee.call(this._weekdaysParse,o))?r:-1!==(r=Ee.call(this._shortWeekdaysParse,o))?r:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=f([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},Pn.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Pn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=$e),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Pn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=et),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Pn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Pn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ht("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=T("moment.lang is deprecated. Use moment.locale instead.",ht),r.langData=T("moment.langData is deprecated. Use moment.localeData instead.",ft);var Tn=Math.abs;function An(e,t,n,i){var r=Yt(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function Dn(e){return 4800*e/146097}function In(e){return 146097*e/4800}function Ln(e){return function(){return this.as(e)}}var Mn=Ln("ms"),On=Ln("s"),Nn=Ln("m"),Rn=Ln("h"),Fn=Ln("d"),Vn=Ln("w"),Bn=Ln("M"),Gn=Ln("Q"),Wn=Ln("y");function Kn(e){return function(){return this.isValid()?this._data[e]:NaN}}var jn=Kn("milliseconds"),qn=Kn("seconds"),Un=Kn("minutes"),zn=Kn("hours"),Hn=Kn("days"),Yn=Kn("months"),Xn=Kn("years");var Jn=Math.round,Qn={ss:44,s:45,m:45,h:22,d:26,M:11};var Zn=Math.abs;function $n(e){return(e>0)-(e<0)||+e}function ei(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Zn(this._milliseconds)/1e3,i=Zn(this._days),r=Zn(this._months);t=P((e=P(n/60))/60),n%=60,e%=60;var a=P(r/12),o=r%=12,s=i,l=t,c=e,u=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",p=$n(this._months)!==$n(d)?"-":"",f=$n(this._days)!==$n(d)?"-":"",m=$n(this._milliseconds)!==$n(d)?"-":"";return h+"P"+(a?p+a+"Y":"")+(o?p+o+"M":"")+(s?f+s+"D":"")+(l||c||u?"T":"")+(l?m+l+"H":"")+(c?m+c+"M":"")+(u?m+u+"S":"")}var ti=Ft.prototype;return ti.isValid=function(){return this._isValid},ti.abs=function(){var e=this._data;return this._milliseconds=Tn(this._milliseconds),this._days=Tn(this._days),this._months=Tn(this._months),e.milliseconds=Tn(e.milliseconds),e.seconds=Tn(e.seconds),e.minutes=Tn(e.minutes),e.hours=Tn(e.hours),e.months=Tn(e.months),e.years=Tn(e.years),this},ti.add=function(e,t){return An(this,e,t,1)},ti.subtract=function(e,t){return An(this,e,t,-1)},ti.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=R(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+Dn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(In(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},ti.asMilliseconds=Mn,ti.asSeconds=On,ti.asMinutes=Nn,ti.asHours=Rn,ti.asDays=Fn,ti.asWeeks=Vn,ti.asMonths=Bn,ti.asQuarters=Gn,ti.asYears=Wn,ti.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},ti._bubble=function(){var e,t,n,i,r,a=this._milliseconds,o=this._days,s=this._months,l=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*En(In(s)+o),o=0,s=0),l.milliseconds=a%1e3,e=P(a/1e3),l.seconds=e%60,t=P(e/60),l.minutes=t%60,n=P(t/60),l.hours=n%24,s+=r=P(Dn(o+=P(n/24))),o-=En(In(r)),i=P(s/12),s%=12,l.days=o,l.months=s,l.years=i,this},ti.clone=function(){return Yt(this)},ti.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},ti.milliseconds=jn,ti.seconds=qn,ti.minutes=Un,ti.hours=zn,ti.days=Hn,ti.weeks=function(){return P(this.days()/7)},ti.months=Yn,ti.years=Xn,ti.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var i=Yt(e).abs(),r=Jn(i.as("s")),a=Jn(i.as("m")),o=Jn(i.as("h")),s=Jn(i.as("d")),l=Jn(i.as("M")),c=Jn(i.as("y")),u=r<=Qn.ss&&["s",r]||r0,u[4]=n,function(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}.apply(null,u)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},ti.toISOString=ei,ti.toString=ei,ti.toJSON=ei,ti.locale=nn,ti.localeData=an,ti.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ei),ti.lang=rn,U("X",0,0,"unix"),U("x",0,0,"valueOf"),de("x",oe),de("X",/[+-]?\d+(\.\d{1,3})?/),me("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),me("x",function(e,t,n){n._d=new Date(k(e))}),r.version="2.24.0",t=Lt,r.fn=Sn,r.min=function(){return Nt("isBefore",[].slice.call(arguments,0))},r.max=function(){return Nt("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return Lt(1e3*e)},r.months=function(e,t){return Cn(e,t,"months")},r.isDate=u,r.locale=ht,r.invalid=g,r.duration=Yt,r.isMoment=_,r.weekdays=function(e,t,n){return xn(e,t,n,"weekdays")},r.parseZone=function(){return Lt.apply(null,arguments).parseZone()},r.localeData=ft,r.isDuration=Vt,r.monthsShort=function(e,t){return Cn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return xn(e,t,n,"weekdaysMin")},r.defineLocale=pt,r.updateLocale=function(e,t){if(null!=t){var n,i,r=st;null!=(i=dt(e))&&(r=i._config),(n=new M(t=L(r,t))).parentLocale=lt[e],lt[e]=n,ht(e)}else null!=lt[e]&&(null!=lt[e].parentLocale?lt[e]=lt[e].parentLocale:null!=lt[e]&&delete lt[e]);return lt[e]},r.locales=function(){return A(lt)},r.weekdaysShort=function(e,t,n){return xn(e,t,n,"weekdaysShort")},r.normalizeUnits=R,r.relativeTimeRounding=function(e){return void 0===e?Jn:"function"==typeof e&&(Jn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==Qn[e]&&(void 0===t?Qn[e]:(Qn[e]=t,"s"===e&&(Qn.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=Sn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r},"object"===o(t)&&void 0!==e?e.exports=a():void 0===(r="function"==typeof(i=a)?i.call(t,n,t,e):i)||(e.exports=r)}).call(t,n(88)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateResponseStatus=t.validateRangeRequestCapabilities=t.createResponseStatusError=void 0;var i=n(0);t.createResponseStatusError=function(e,t){return 404===e||0===e&&/^file:/.test(t)?new i.MissingPDFException('Missing PDF "'+t+'".'):new i.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,n=e.isHttp,r=e.rangeChunkSize,a=e.disableRange;(0,i.assert)(r>0);var o={allowRangeRequests:!1,suggestedLength:void 0};if(a||!n)return o;if("bytes"!==t("Accept-Ranges"))return o;if("identity"!==(t("Content-Encoding")||"identity"))return o;var s=parseInt(t("Content-Length"),10);return Number.isInteger(s)?(o.suggestedLength=s,s<=2*r?o:(o.allowRangeRequests=!0,o)):o},t.validateResponseStatus=function(e){return 200===e||206===e}},function(e,t,n){"use strict";e.exports=!n(7)&&!n(14)(function(){return 7!=Object.defineProperty(n(38)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";for(var i,r=n(1),a=n(8),o=n(17),s=o("typed_array"),l=o("view"),c=!(!r.ArrayBuffer||!r.DataView),u=c,d=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(i=r[h[d++]])?(a(i.prototype,s,!0),a(i.prototype,l,!0)):u=!1;e.exports={ABV:c,CONSTR:u,TYPED:s,VIEW:l}},function(e,t,n){"use strict";var i=n(18),r=n(12);e.exports=function(e){if(void 0===e)return 0;var t=i(e),n=r(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){"use strict";var i=n(63),r=n(44).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},function(e,t,n){"use strict";var i=n(10),r=n(31),a=n(64)(!1),o=n(43)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),l=0,c=[];for(n in s)n!=o&&i(s,n)&&c.push(n);for(;t.length>l;)i(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},function(e,t,n){"use strict";var i=n(31),r=n(12),a=n(32);e.exports=function(e){return function(t,n,o){var s,l=i(t),c=r(l.length),u=a(o,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){"use strict";var i=n(19),r=n(32),a=n(12);e.exports=function(e){for(var t=i(this),n=a(t.length),o=arguments.length,s=r(o>1?arguments[1]:void 0,n),l=o>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);c>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var i=n(20),r=n(3)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[r]===e)}},function(e,t,n){"use strict";var i=n(9),r=n(100),a=n(44),o=n(43)("IE_PROTO"),s=function(){},l=function(){var e,t=n(38)("iframe"),i=a.length;for(t.style.display="none",n(68).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("