UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

8 lines 3.95 MB
/** * DevExpress WebRichEdit (dx.richedit.min.js) * Version: 24.2.6 * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * License: https://www.devexpress.com/Support/EULAs */ /*! For license information please see dx.richedit.min.js.LICENSE.txt */ (function(){"use strict";var __webpack_modules__={9279:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Browser=void 0;var r=function(){function e(){}return e.IdentUserAgent=function(t,r){void 0===r&&(r=!1);var i=["Mozilla","IE","Firefox","Netscape","Safari","Chrome","Opera","Opera10","Edge"],n="IE",o="Win",a={Safari:2,Chrome:.1,Mozilla:1.9,Netscape:8,Firefox:2,Opera:9,IE:6,Edge:12};if(t&&0!==t.length){t=t.toLowerCase(),e.indentPlatformMajorVersion(t);try{for(var s={Windows:"Win",Macintosh:"Mac","Mac OS":"Mac",Mac_PowerPC:"Mac","cpu os":"MacMobile","cpu iphone os":"MacMobile",Android:"Android","!Windows Phone":"WinPhone","!WPDesktop":"WinPhone","!ZuneWP":"WinPhone"},l="(?:/|\\s*)?",d="(\\d+)(?:\\.((?:\\d+?[1-9])|\\d)0*?)?",c="(?:"+d+")?",h={Safari:"applewebkit(?:.*?(?:version/"+d+"[\\.\\w\\d]*?(?:\\s+mobile/\\S*)?\\s+safari))?",Chrome:"(?:chrome|crios)(?!frame)"+l+c,Mozilla:"mozilla(?:.*rv:"+c+".*Gecko)?",Netscape:"(?:netscape|navigator)\\d*/?\\s*"+c,Firefox:"firefox"+l+c,Opera:"(?:opera|\\sopr)"+l+c,Opera10:"opera.*\\s*version"+l+c,IE:"msie\\s*"+c,Edge:"edge"+l+c},u=null,p=-1,g=0;g<i.length;g++){var m=i[g],f=new RegExp(h[m],"i").exec(t);if(f&&f.index>=0){if("IE"===u&&p>=11&&"Safari"===m)continue;"Opera10"===(u=m)&&(u="Opera");var b="trident"+l+c;p=e.GetBrowserVersion(t,f,b,e.getIECompatibleVersionString()),"Mozilla"===u&&p>=11&&(u="IE")}}u||(u=n);var C=-1!==p;C||(p=a[u]);var S=null,I=Number.MAX_VALUE;for(var P in s)if(Object.prototype.hasOwnProperty.call(s,P)){var w="!"===P.substr(0,1),y=t.indexOf((w?P.substr(1):P).toLowerCase());y>=0&&(y<I||w)&&(I=w?0:y,S=s[P])}var x=t.toUpperCase().match("SM-[A-Z]"),T=x&&x.length>0;"WinPhone"===S&&p<9&&(p=Math.floor(e.getVersionFromTrident(t,"trident"+l+c))),!r&&"IE"===u&&p>7&&document.documentMode<p&&(p=document.documentMode),"WinPhone"===S&&(p=Math.max(9,p)),S||(S=o),S!==s["cpu os"]||C||(p=4),e.fillUserAgentInfo(i,u,p,S,T)}catch(t){e.fillUserAgentInfo(i,n,a[n],o)}}else e.fillUserAgentInfo(i,n,a[n],o)},e.GetBrowserVersion=function(t,r,i,n){var o=e.getVersionFromMatches(r);if(n){var a=e.getVersionFromTrident(t,i);if("edge"===n||parseInt(n)===a)return a}return o},e.getIECompatibleVersionString=function(){if(document.compatible)for(var e=0;e<document.compatible.length;e++)if("IE"===document.compatible[e].userAgent&&document.compatible[e].version)return document.compatible[e].version.toLowerCase();return""},e.isTouchEnabled=function(){return e.hasTouchStart()||e.hasMaxTouchPoints()||e.hasMsMaxTouchPoints()},e.hasTouchStart=function(){return"ontouchstart"in window},e.hasMaxTouchPoints=function(){return navigator.maxTouchPoints>0},e.hasMsMaxTouchPoints=function(){return navigator.msMaxTouchPoints>0},e.hasNavigator=function(){return"undefined"!=typeof navigator},e.fillUserAgentInfo=function(t,r,i,n,o){void 0===o&&(o=!1);for(var a=0;a<t.length;a++){var s=t[a];e[s]=s===r}e.Version=Math.floor(10*i)/10,e.MajorVersion=Math.floor(e.Version),e.WindowsPlatform="Win"===n||"WinPhone"===n,e.MacOSMobilePlatform="MacMobile"===n||"Mac"===n&&e.isTouchEnabled(),e.MacOSPlatform="Mac"===n&&!e.MacOSMobilePlatform,e.AndroidMobilePlatform="Android"===n,e.WindowsPhonePlatform="WinPhone"===n,e.WebKitFamily=e.Safari||e.Chrome||e.Opera&&e.MajorVersion>=15,e.NetscapeFamily=e.Netscape||e.Mozilla||e.Firefox,e.WebKitTouchUI=e.MacOSMobilePlatform||e.AndroidMobilePlatform;var l=e.IE&&e.MajorVersion>9&&e.WindowsPlatform&&e.UserAgent.toLowerCase().indexOf("touch")>=0;if(e.MSTouchUI=l||e.Edge&&!!window.navigator.maxTouchPoints,e.TouchUI=e.WebKitTouchUI||e.MSTouchUI,e.MobileUI=e.WebKitTouchUI||e.WindowsPhonePlatform,e.AndroidDefaultBrowser=e.AndroidMobilePlatform&&!e.Chrome,e.AndroidChromeBrowser=e.AndroidMobilePlatform&&e.Chrome,o&&(e.SamsungAndroidDevice=o),e.MSTouchUI){var d=e.UserAgent.toLowerCase().indexOf("arm;")>-1;e.VirtualKeyboardSupported=d||e.WindowsPhonePlatform}else e.VirtualKeyboardSupported=e.WebKitTouchUI;e.fillDocumentElementBrowserTypeClassNames(t)},e.indentPlatformMajorVersion=function(t){var r=/(?:(?:windows nt|macintosh|mac os|cpu os|cpu iphone os|android|windows phone|linux) )(\d+)(?:[-0-9_.])*/.exec(t);r&&(e.PlaformMajorVersion=r[1])},e.getVersionFromMatches=function(e){var t=-1,r="";return e&&(e[1]&&(r+=e[1],e[2]&&(r+="."+e[2])),""!==r&&(t=parseFloat(r),isNaN(t)&&(t=-1))),t},e.getVersionFromTrident=function(t,r){var i=new RegExp(r,"i").exec(t);return e.getVersionFromMatches(i)+4},e.fillDocumentElementBrowserTypeClassNames=function(t){for(var r="",i=t.concat(["WindowsPlatform","MacOSPlatform","MacOSMobilePlatform","AndroidMobilePlatform","WindowsPhonePlatform","WebKitFamily","WebKitTouchUI","MSTouchUI","TouchUI","AndroidDefaultBrowser"]),n=0;n<i.length;n++){var o=i[n];e[o]&&(r+="dx"+o+" ")}r+="dxBrowserVersion-"+e.MajorVersion,"undefined"!=typeof document&&document&&document.documentElement&&(""!==document.documentElement.className&&(r=" "+r),document.documentElement.className+=r,e.Info=r)},e.getUserAgent=function(){return e.hasNavigator()&&navigator.userAgent?navigator.userAgent.toLowerCase():""},e.UserAgent=e.getUserAgent(),e._foo=e.IdentUserAgent(e.UserAgent),e}();t.Browser=r},1772:function(e,t){t.m1=t.IS=void 0;var r=function(){function e(){this.suspendUpdateCount=0,this.occurredEvents=0}return e.prototype.beginUpdate=function(){0===this.suspendUpdateCount&&this.onUpdateLocked(),this.suspendUpdateCount<0?this.suspendUpdateCount--:this.suspendUpdateCount++},e.prototype.endUpdate=function(){if(this.suspendUpdateCount<0?this.suspendUpdateCount++:this.suspendUpdateCount>0&&this.suspendUpdateCount--,!this.isUpdateLocked()){var e=this.occurredEvents;this.occurredEvents=0,this.onUpdateUnlocked(e)}},e.prototype.suspendUpdate=function(){if(this.suspendUpdateCount>0){this.suspendUpdateCount*=-1;var e=this.occurredEvents;this.occurredEvents=0,this.onUpdateUnlocked(e)}},e.prototype.continueUpdate=function(){this.suspendUpdateCount<0&&(this.suspendUpdateCount*=-1)},e.prototype.isUpdateLocked=function(){return this.suspendUpdateCount>0},e.prototype.onUpdateLocked=function(){},e.prototype.registerOccurredEvent=function(e){this.occurredEvents|=e},e.prototype.resetOccurredEvents=function(){this.occurredEvents=0},e.prototype.isLocked=function(){return 0!==this.suspendUpdateCount},e}();t.IS=r;var i=function(){function e(){}return e.prototype.beginUpdate=function(){},e.prototype.endUpdate=function(){},e}();t.m1=i},677:function(e,t){t.T=void 0;var r=function(){function e(e,t){void 0===t&&(t=2e3),this.maxChunkSize=t,this.chunks=[],this._textLength=0,this.pushText(e),this.resetToStart()}return Object.defineProperty(e.prototype,"currChar",{get:function(){return this.chunk[this.posInChunk]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPos",{get:function(){return this._currPos},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textLength",{get:function(){return this._textLength},enumerable:!1,configurable:!0}),e.prototype.resetToStart=function(){this.setChunk(0),this.posInChunk=-1,this._currPos=-1},e.prototype.resetToEnd=function(){this.setChunk(this.chunks.length-1),this.posInChunk=this.chunkLength-1,this._currPos=this._textLength},e.prototype.addText=function(e){this.pushText(e),-1===this._currPos?(this.chunk=this.chunks[0],this.chunkLength=this.chunk.length):this.setPositionTo(this._currPos)},e.prototype.getText=function(){return this.chunks.join("")},e.prototype.moveToNextChar=function(){return this.posInChunk++,this._currPos++,this.posInChunk<this.chunkLength||(this.setChunk(this.chunkIndex+1)?(this.posInChunk=0,!0):(this.posInChunk=this.chunkLength,this._currPos=this._textLength,!1))},e.prototype.moveToPrevChar=function(){return this.posInChunk--,this._currPos--,this.posInChunk>=0||(this.setChunk(this.chunkIndex-1)?(this.posInChunk=this.chunkLength-1,!0):(this.posInChunk=-1,this._currPos=-1,!1))},e.prototype.setPositionTo=function(e){var t=e;this.chunkIndex=0;for(var r=0;;r++){if(!this.setChunk(r))return this.posInChunk=this.chunkLength,void(this._currPos=this._textLength);if(!(t>this.chunkLength))return this.posInChunk=t,void(this._currPos=e);t-=this.chunk.length}},e.prototype.setChunk=function(e){var t=this.chunk;return this.chunk=this.chunks[e],this.chunk?(this.chunkIndex=e,this.chunkLength=this.chunk.length,!0):(this.chunk=t,!1)},e.prototype.pushText=function(e){if(e.length){for(var t=0;t<e.length;){if(0===t){var r=this.chunks.pop();if(r){if(r.length<this.maxChunkSize){var i=this.maxChunkSize-r.length;this.chunks.push(r+e.substr(t,i)),t+=i;continue}this.chunks.push(r)}}this.chunks.push(e.substr(t,this.maxChunkSize)),t+=this.maxChunkSize}this._textLength+=e.length}},e}();t.T=r},6218:function(e,t){t.R=void 0;var r=function(){function e(e){this.action=e,this.reset()}return Object.defineProperty(e.prototype,"actionExecuted",{get:function(){return null===this.actionTimeoutId},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.actionTimeout=void 0,this.actionTimeoutId=void 0,this.actionStartTime=void 0},e.prototype.start=function(e){var t=this;this.actionTimeout=e,this.actionTimeoutId=setTimeout((function(){return t.executeAction()}),this.actionTimeout),this.actionStartTime=Date.now()},e.prototype.executeIfTimerExpired=function(){Date.now()-this.actionStartTime>this.actionTimeout&&this.executeAction()},e.prototype.executeAction=function(){this.actionExecuted||(this.action(),this.stop())},e.prototype.stop=function(){clearTimeout(this.actionTimeoutId),this.actionTimeoutId=null},e}();t.R=r},6136:function(e,t,r){t.$=void 0;var i=r(1632),n=function(e,t,r,i){void 0===i&&(i=!0),this.element=e,this.eventName=t,this.handler=r,this.options=i},o=function(){function e(){this.handlers=[]}return e.prototype.addListener=function(e,t,r,i){void 0===i&&(i=!0),this.handlers.push(new n(e,t,r,i)),e.addEventListener(t,r,i)},e.prototype.addListenerToWindow=function(e,t,r){void 0===r&&(r=!0),this.handlers.push(new n(window,e,t,r)),window.addEventListener(e,t,r)},e.prototype.addListenerToDocument=function(e,t,r){void 0===r&&(r=!0),i.TouchUtils.onEventAttachingToDocument(e,t)&&(this.handlers.push(new n(document,e,t,r)),document.addEventListener(e,t,r))},e.prototype.removeAllListeners=function(){this.handlers.forEach((function(e){return e.element.removeEventListener(e.eventName,e.handler,e.options)})),this.handlers=[]},e}();t.$=o},7820:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Flag=void 0;var r=function(){function e(e){void 0===e&&(e=0),this.value=e}return e.prototype.get=function(e){return(this.value&e)===e},e.prototype.set=function(e,t){return(this.value&e)===e!==t&&(t?this.value|=e:this.value^=e),this},e.prototype.add=function(e){this.value|=e},e.prototype.anyOf=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,i=e;r<i.length;r++){var n=i[r];if((this.value&n)===n)return!0}return!1},e.prototype.getValue=function(){return this.value},e.prototype.clone=function(){return new e(this.value)},e}();t.Flag=r},7496:function(e,t){t.m7=void 0;var r=function(){function e(){}return e.prototype.set=function(e,t){return this[e]=t,this},e}();t.m7=r},6799:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedMinMax=t.ExtendedMax=t.ExtendedMin=t.MinMaxNumber=t.MinMax=void 0;var i=r(2020),n=function(e,t){this.minElement=e,this.maxElement=t};t.MinMax=n;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this.maxElement-this.minElement},enumerable:!1,configurable:!0}),t}(n);t.MinMaxNumber=o;var a=function(e,t){this.minElement=e,this.minValue=t};t.ExtendedMin=a;var s=function(e,t){this.maxElement=e,this.maxValue=t};t.ExtendedMax=s;var l=function(e){function t(t,r,i,n){var o=e.call(this,t,i)||this;return o.minValue=r,o.maxValue=n,o}return i.__extends(t,e),t}(n);t.ExtendedMinMax=l},9094:function(e,t){t.K=void 0;var r=function(){function e(){this.list=[],this._count=0,this.last=void 0}return e.prototype.push=function(e){this.list.push(e),this.last=e,this._count++},e.prototype.pop=function(){this._count--;var e=this.list.pop();return this.last=this.list[this.list.length-1],e},e.prototype.peek=function(){return this.last},Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),e.prototype.getPrevious=function(){return this.list[this._count-2]},e}();t.K=r},9291:function(e,t){t.u=void 0;var r=function(){function e(){}return e.hundredthsOfMillimeterToTwipsRound=function(e){return Math.round(1440*e/2540)},e.documentsToTwips=function(e){return 24*e/5},e.pixelsToTwips=function(t){return Math.round(e.pixelsToTwipsF(t))},e.pixelsToTwipsCustomDpi=function(t,r){return Math.round(e.pixelsToTwipsFCustomDpi(t,r))},e.inchesToTwips=function(t){return Math.round(e.inchesToTwipsF(t))},e.pointsToTwips=function(t){return Math.round(e.pointsToTwipsF(t))},e.picasToTwips=function(t){return Math.round(1440*t/e.PICAS_PER_INCH)},e.centimetersToTwips=function(t){return Math.round(e.centimetersToTwipsF(t))},e.pixelsToTwipsF=function(t){return 1440*t/e.DPI},e.pixelsToTwipsFCustomDpi=function(e,t){return 1440*e/t},e.inchesToTwipsF=function(e){return 1440*e},e.pointsToTwipsF=function(e){return 20*e},e.centimetersToTwipsF=function(t){return 1440*t/e.CENTIMETERS_PER_INCH},e.twipsToDegrees=function(e){return e/6e4},e.twipsToRadians=function(e){return e/6e4*Math.PI/180},e.degreesToTwips=function(e){return 6e4*e},e.radiansToTwips=function(e){return 6e4*e/Math.PI*180},e.radiansToDegrees=function(e){return e/Math.PI*180},e.twipsToFD=function(e){return Math.round(2048*e/1875)},e.fdToTwips=function(e){return Math.round(1875*e/2048)},e.emuToTwips=function(e){return e/635},e.twipsToPixels=function(t){return Math.round(e.twipsToPixelsF(t))},e.inchesToPixels=function(t){return Math.round(e.DPI*t)},e.centimeterToPixel=function(e){return Math.round(this.centimeterToPixelF(e))},e.centimeterToPixelF=function(t){return t*e.DPI/e.CENTIMETERS_PER_INCH},e.millimetersToPixel=function(t){return Math.round(t/(e.CENTIMETERS_PER_INCH/e.DPI)/10)},e.pointsToPixels=function(t){return Math.round(t*e.DPI/72)},e.pointsToPixelsF=function(t){return t*e.DPI/72},e.twipsToPixelsF=function(t){return t*e.DPI/1440},e.pixelsToPoints=function(t){return Math.round(72*t/e.DPI)},e.pixelsToPointsF=function(t){return 72*t/e.DPI},e.twipsToPoints=function(e){return Math.round(this.twipsToPointsF(e))},e.twipsToPointsF=function(e){return e/20},e.twipsToInches=function(e){return e/1440},e.pixelsToInches=function(t){return t/e.DPI},e.twipsToCentimeters=function(t){return t*e.CENTIMETERS_PER_INCH/1440},e.pixelToCentimeters=function(t){return t*e.CENTIMETERS_PER_INCH/e.DPI},e.twipsToHundredthsOfMillimeter=function(e){return Math.round(127*e/72)},e.pixelsToHundredthsOfMillimeter=function(t){return Math.round(2540*t/e.DPI)},e.hundredthsOfMillimeterToTwips=function(e){return 15*e/127},e.twipsToEmu=function(e){return 635*e},e.twipsToDegree=function(e){return e/6e4},e.DPI=96,e.CENTIMETERS_PER_INCH=2.54,e.PICAS_PER_INCH=6,e}();t.u=r},8785:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Int32Constants=t.Constants=void 0;var r=function(){function e(){}return e.MIN_SAFE_INTEGER=-(Math.pow(2,53)-1),e.MAX_SAFE_INTEGER=Math.pow(2,53)-1,e.MAX_BYTE=Math.pow(2,8)-1,e}();t.Constants=r;var i=function(){function e(){}return e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e}();t.Int32Constants=i},7774:function(e,t){t.D=void 0;var r=function(){function e(){}return e.internalExceptionTemplate=function(t){return e.InternalException+" "+t},e.NotImplemented="The method is not implemented.",e.InternalException="Internal exception.",e.ValueCannotBeNull="Value cannot be null.",e}();t.D=r},8889:function(e,t,r){t.J=void 0;var i=r(2020),n=function(){function e(e){this.AMPMKeyword="am/pm",this.options=e}return e.prototype.format=function(e,t){this.date=e,this.formatString=t,this.result="";for(var r=0,i=this.formatString.length;r<i;)r+=this.formatNext(r);return this.result},e.prototype.formatNext=function(e){var t=this.formatString[e],r=this.tryCreateFormattingItem(t);return r?this.processAsFormattingItem(e,r):this.isKeyword(this.AMPMKeyword,e)?this.processAsAMPMKeyword():"'"===t?this.processAsEmbedText(e):this.processAsSingleCharacter(e)},e.prototype.isKeyword=function(e,t){if(e.length>this.formatString.length-t)return!1;var r=this.formatString.substr(t,e.length);return e.toLowerCase()===r.toLowerCase()},e.prototype.processAsAMPMKeyword=function(){var e=this.date.getHours()-12>=0?this.options.pm:this.options.am;return this.result+=e,this.AMPMKeyword.length},e.prototype.processAsEmbedText=function(e){var t=e+1;if(t>=this.formatString.length-1)return 1;var r=this.getCharacterSequenceLength(this.formatString[e],t,this.charsAreNotEqual);return r+t===this.formatString.length?(this.result+="'",1):(this.result+=this.formatString.substr(t,r),r+2)},e.prototype.processAsSingleCharacter=function(e){return this.result+=this.formatString[e],1},e.prototype.processAsFormattingItem=function(e,t){var r=this.getCharacterSequenceLength(this.formatString[e],e,this.charsAreEqual),i=t.getAvailablePatternLength(r),n=t.format(this.date,i);return this.result+=n,Math.min(r,i)},e.prototype.getCharacterSequenceLength=function(e,t,r){for(var i=this.formatString.length,n=t+1;n<i&&r(e,this.formatString[n]);)n++;return n-t},e.prototype.tryCreateFormattingItem=function(e){switch(e){case"h":return new d(this.options);case"H":return new l(this.options);case"m":return new c(this.options);case"S":case"s":return new h(this.options);case"Y":case"y":return new g(this.options);case"M":return new p(this.options);case"D":case"d":return new u(this.options)}return null},e.prototype.charsAreEqual=function(e,t){return e===t},e.prototype.charsAreNotEqual=function(e,t){return e!==t},e}();t.J=n;var o=function(){function e(e){this.options=e}return e.prototype.getAvailablePatternLength=function(e){for(var t=this.patternsLength.length,r=0;r<t;r++)if(this.patternsLength[r]>=e)return this.patternsLength[r];return this.patternsLength[t-1]},e}(),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.patternsLength=[1,2],t}return i.__extends(t,e),t.prototype.formatCore=function(e,t){var r=""+e;return 2===t&&1===r.length?"0"+r:r},t}(o),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.patternsLength=[1,2,3,4],t}return i.__extends(t,e),t.prototype.format=function(e,t){return t<=2?this.formatCore(this.getNumericValue(e),t):3===t?this.getAbbreviatedName(e):this.getFullName(e)},t}(a),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.format=function(e,t){return this.formatCore(e.getHours(),t)},t}(a),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.format=function(e,t){var r=e.getHours()%12;return 0===r&&(r=12),this.formatCore(r,t)},t}(a),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.format=function(e,t){return this.formatCore(e.getMinutes(),t)},t}(a),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.format=function(e,t){return this.formatCore(e.getSeconds(),t)},t}(a),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.getAbbreviatedName=function(e){return this.options.abbrDayNames[this.getDayOfWeek(e)]},t.prototype.getFullName=function(e){return this.options.dayNames[this.getDayOfWeek(e)]},t.prototype.getNumericValue=function(e){return e.getDate()},t.prototype.getDayOfWeek=function(e){return e.getDay()},t}(s),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.getAbbreviatedName=function(e){return this.options.abbrMonthNames[e.getMonth()]},t.prototype.getFullName=function(e){return this.options.monthNames[e.getMonth()]},t.prototype.getNumericValue=function(e){return e.getMonth()+1},t}(s),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.patternsLength=[2,4],t}return i.__extends(t,e),t.prototype.format=function(e,t){var r=e.getFullYear();if(2===t&&r>99){var i=""+r%100;return 1===i.length?"0"+i:i}return""+r},t}(o)},8786:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DateUtils=void 0;var r=function(){function e(){}return e.fixTimezoneGap=function(e,t){var r=t.getHours()-e.getHours();if(0!==r){var i=1===r||-23===r?-1:1,n=new Date(t.getTime()+36e5*i);t.getHours()-n.getHours()===r&&(i>0||n.getDate()===t.getDate())&&t.setTime(n.getTime())}},e.expandTwoDigitYear=function(e,t){return(e+=1900)+99<t.twoDigitYearMax&&(e+=100),e},e.toUtcTime=function(t){var r=new Date;return r.setTime(t.valueOf()+e.getTimeZoneOffset(t)),r},e.getTimeZoneOffset=function(e){var t=e.getUTCFullYear(),r=new Date(t,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return t<100&&r.setFullYear(t),r.valueOf()-e.valueOf()},e}();t.DateUtils=r},5308:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.DateFormatter=void 0;var i=r(2866),n=r(49),o=r(8786),a=function(){function e(e){this.date=new Date(2e3,0,1),this.mask="",this.specifiers={},this.spPositions=[],this.parserKeys=[],this.savedYear=-1,this.isYearParsed=!1,this.parsedMonth=-1,this.knownSpecifiers=["d","M","y","H","h","m","s","f","F","g","t"],this.replacers={d:this.replaceDay,M:this.replaceMonth,y:this.replaceYear,H:this.replaceHours23,h:this.replaceHours12,m:this.replaceMinutes,s:this.replaceSeconds,F:this.replaceMsTrimmed,f:this.replaceMs,g:this.replaceEra,t:this.replaceAmPm},this.parsers={d:this.parseDay,M:this.parseMonth,y:this.parseYear,H:this.parseHours,h:this.parseHours,m:this.parseMinutes,s:this.parseSeconds,F:this.parseMs,f:this.parseMs,g:this.parseEra,t:this.parseAmPm},this.options=e}return e.prototype.setFormatString=function(e){2===e.length&&"%"===e.charAt(0)&&(e=e.charAt(1));var t=!!e&&-1!==e.indexOf(this.options.ds);this.specifiers={},this.spPositions=[],this.mask="";for(var r=0,i=0,n=!1,o=!1,a="",s="",l=0;;l++){var d=e.charAt(l);if(""===d){a.length>0&&this.registerSpecifier(i,a,t);break}"\\"!==d||o?(o||"'"!==d&&'"'!==d?(n||("/"===d?d=this.options.ds:":"===d?d=this.options.ts:this.isKnownSpecifier(d)&&(0===s.length&&(s=d),d===s?a+=d:(a.length>0&&this.registerSpecifier(i,a,t),a=d,i=l-r))),this.mask+=d):(n=!n,r++),o=!1):(o=!0,r++),s=d}this.spPositions.reverse()},e.prototype.format=function(e){this.date=e;for(var t=this.mask,r=0,i=this.spPositions;r<i.length;r++){var n=i[r],o=this.specifiers[n],a=o.substr(0,1);this.replacers[a]&&(t=t.substr(0,n)+this.replacers[a].call(this,o.length)+t.substr(n+o.length))}return t},e.prototype.parse=function(e,t){var r=new Date;this.savedYear=r.getFullYear(),this.isYearParsed=!1,this.parsedMonth=-1,this.date=new Date(2e3,0,r.getDate()),this.strToParse=e,this.catchNumbers(e),this.hasAmPm=!1;for(var i=0,n=this.spPositions;i<n.length;i++){var o=n[i],a=this.specifiers[o],s=a.substr(0,1);if(this.parsers[s]&&(t&&this.parserKeys.push(s),!this.parsers[s].call(this,a.length)))return!1}return!(this.hasAmPm&&!this.fixHours())&&(this.isYearParsed||this.date.setFullYear(this.savedYear),this.parsedMonth<0&&(this.parsedMonth=r.getMonth()),this.applyMonth(),this.date)},e.prototype.hasYear=function(){return this.hasParserKey("y")},e.prototype.hasMonth=function(){return this.hasParserKey("M")},e.prototype.hasDay=function(){return this.hasParserKey("d")},e.prototype.hasHours=function(){return this.hasParserKey("h")||this.hasParserKey("H")},e.prototype.hasMinutes=function(){return this.hasParserKey("m")},e.prototype.hasSeconds=function(){return this.hasParserKey("s")},e.prototype.hasMilliseconds=function(){return this.hasParserKey("f")||this.hasParserKey("F")},e.prototype.hasParserKey=function(e){return-1!==this.parserKeys.indexOf(e)},e.expandPredefinedFormat=function(e,t){switch(e){case"d":return t.shortDate;case"D":return t.longDate;case"t":return t.shortTime;case"T":return t.longTime;case"g":return t.shortDate+" "+t.shortTime;case"f":return t.longDate+" "+t.shortTime;case"G":return t.shortDate+" "+t.longTime;case"F":case"U":return t.longDate+" "+t.longTime;case"M":case"m":return t.monthDay;case"Y":case"y":return t.yearMonth;case"O":case"o":return"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffff";case"R":case"r":return"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'";case"s":return"yyyy'-'MM'-'dd'T'HH':'mm':'ss";case"u":return"yyyy'-'MM'-'dd HH':'mm':'ss'Z'"}return e},e.prototype.applyMonth=function(){for(var e,t=this.date.getDate();(e=new Date).setTime(this.date.getTime()),e.setMonth(this.parsedMonth),e.getMonth()!==this.parsedMonth;)--t,this.date.setDate(t);o.DateUtils.fixTimezoneGap(this.date,e),this.date=e},e.prototype.registerSpecifier=function(e,t,r){if(this.options.ds.length>1&&this.mask&&!r){var i=this.mask.split(this.options.ds);i&&(i.length>0&&""===i[i.length-1]&&i.pop(),e+=(i.length-1)*(this.options.ds.length-1))}this.spPositions.push(e),this.specifiers[e]=t},e.prototype.replaceDay=function(e){if(e<3){var t=this.date.getDate().toString();return 2===e?this.padLeft(t,2):t}return 3===e?this.options.abbrDayNames[this.date.getDay()]:this.options.dayNames[this.date.getDay()]},e.prototype.replaceMonth=function(e){var t=1+this.date.getMonth();switch(e){case 1:return t.toString();case 2:return this.padLeft(t.toString(),2);case 3:return this.options.abbrMonthNames[t-1];default:for(var r in this.specifiers)if(Object.prototype.hasOwnProperty.call(this.specifiers,r)){var i=this.specifiers[r];if("d"===i||"dd"===i)return this.options.genMonthNames[t-1]}return this.options.monthNames[t-1]}},e.prototype.replaceYear=function(e){var t=this.date.getFullYear();return e<=2&&(t%=100),this.padLeft(t.toString(),e)},e.prototype.replaceHours23=function(e){var t=this.date.getHours().toString();return e>1?this.padLeft(t,2):t},e.prototype.replaceHours12=function(e){var t=this.date.getHours()%12;0===t&&(t=12);var r=t.toString();return e>1?this.padLeft(r,2):r},e.prototype.replaceMinutes=function(e){var t=this.date.getMinutes().toString();return e>1?this.padLeft(t,2):t},e.prototype.replaceSeconds=function(e){var t=this.date.getSeconds().toString();return e>1?this.padLeft(t,2):t},e.prototype.replaceMsTrimmed=function(e){return this.formatMs(e,!0)},e.prototype.replaceMs=function(e){return this.formatMs(e,!1)},e.prototype.replaceEra=function(e){return"A.D."},e.prototype.replaceAmPm=function(e){var t=this.date.getHours()<12?this.options.am:this.options.pm;return e<2?t.charAt(0):t},e.prototype.catchNumbers=function(e){var t=this;this.parseNumbers=[];for(var r,n=/\d+/g;r=n.exec(e);)this.parseNumbers.push(this.parseDecInt(r[0]));var o=0,a=new Date;i.StringMapUtils.forEach(this.specifiers,(function(e){if("string"==typeof e&&t.isNumericSpecifier(e)&&(o++,t.parseNumbers.length<o)){var r=0;"y"===e.charAt(0)&&(r=a.getFullYear()),t.parseNumbers.push(r)}}));var s=this.parseNumbers.length-o;s>0&&this.parseNumbers.splice(o,s),this.currentParseNumber=this.parseNumbers.length-1},e.prototype.popParseNumber=function(){return this.parseNumbers[this.currentParseNumber--]},e.prototype.findAbbrMonth=function(){return this.findMonthCore(this.options.abbrMonthNames)},e.prototype.findFullMonth=function(){return this.findMonthCore(this.options.genMonthNames)},e.prototype.findMonthCore=function(e){for(var t=this.strToParse.toLowerCase(),r=0;r<e.length;r++){var i=e[r].toLowerCase();if(i.length>0&&t.indexOf(i)>-1)return this.strToParse=this.strToParse.replace(new RegExp(i,"gi"),n.StringUtils.repeat(" ",i.length)),1+r}return!1},e.prototype.parseDay=function(e){if(e<3){var t=this.popParseNumber();if(t<1||t>31)return!1;this.date.setDate(t)}return!0},e.prototype.parseMonth=function(e){var t;switch(e){case 1:case 2:t=this.popParseNumber();break;case 3:t=this.findAbbrMonth();break;default:t=this.findFullMonth()}return!(!1===t||t<1||t>12)&&(this.parsedMonth=t-1,!0)},e.prototype.parseYear=function(e){var t=this.popParseNumber();return!(t>9999)&&(t<100&&(t=o.DateUtils.expandTwoDigitYear(t,this.options)),this.date.setFullYear(t),this.isYearParsed=!0,!0)},e.prototype.parseHours=function(e){var t=this.popParseNumber();return!(t>23)&&(this.date.setHours(t),!0)},e.prototype.parseMinutes=function(e){var t=this.parseMinSecCore();return-1!==t&&(this.date.setMinutes(t),!0)},e.prototype.parseSeconds=function(e){var t=this.parseMinSecCore();return-1!==t&&(this.date.setSeconds(t),!0)},e.prototype.parseMs=function(e){e>3&&(e=3);for(var t=1,r=0;r<e;r++)t*=10;t-=1;for(var i=this.popParseNumber();i>t;)i/=10;return this.date.setMilliseconds(Math.round(i)),!0},e.prototype.parseEra=function(e){return!0},e.prototype.parseAmPm=function(e){return this.hasAmPm=this.options.am.length>0&&this.options.pm.length>0,!0},e.prototype.parseDecInt=function(e){return parseInt(e,10)},e.prototype.padLeft=function(e,t){for(;e.length<t;)e="0"+e;return e},e.prototype.formatMs=function(e,t){var r=Math.floor(this.date.getMilliseconds()*Math.pow(10,e-3)),i=this.padLeft(r.toString(),e);if(t){for(var n=i.length-1,o=!1;"0"===i.charAt(n);)o=!0,n--;o&&(i=i.substring(0,n+1))}return i},e.prototype.parseMinSecCore=function(){var e=this.popParseNumber();return e>59?-1:e},e.prototype.fixHours=function(){var e=this.getAmPmState(this.strToParse,!1);if(!e)return!0;var t=this.date.getHours();switch(e){case"P":if(t>12)return!1;t<12&&this.date.setHours(12+t);break;case"A":12===t&&this.date.setHours(0)}return!0},e.prototype.getAmPmState=function(e,t){var r=this.options.am.charAt(0).toLowerCase(),i=this.options.pm.charAt(0).toLowerCase(),n=new RegExp(r,"gi").exec(e),o=new RegExp(i,"gi").exec(e),a=n?n.length:0,s=o?o.length:0,l=a>0;return l!==s>0&&a<2&&s<2?l?"A":"P":t?null:(e=e.replace(new RegExp(this.getDayMonthNameReplacePattern(),"gi"),""),this.getAmPmState(e,!0))},e.prototype.getDayMonthNameReplacePattern=function(){return this.dayMonthNameReplacePattern?this.dayMonthNameReplacePattern:this.createDayMonthNameReplacePattern()},e.prototype.createDayMonthNameReplacePattern=function(){var e=[];return e.push("(?:"),e.push(this.createReplacePattern(this.options.monthNames)),e.push(this.createReplacePattern(this.options.genMonthNames)),e.push(this.createReplacePattern(this.options.abbrMonthNames)),e.push(this.createReplacePattern(this.options.abbrDayNames)),e.push(this.createReplacePattern(this.options.dayNames)),e.push(")"),e.join("")},e.prototype.createReplacePattern=function(e){return e&&e.length>0?"\\b"+e.join("\\b|\\b")+"\\b":""},e.prototype.isNumericSpecifier=function(e){var t=e.charAt(0);return!("g"===t||"t"===t||("M"===t||"d"===t)&&e.length>2)},e.prototype.isKnownSpecifier=function(e){return e=e.charAt(0),-1!==this.knownSpecifiers.indexOf(e)},e}();t.DateFormatter=a},1768:function(e,t,r){t.$=void 0;var i=r(2020),n=r(5308),o=r(2004),a=r(5418),s=function(){function e(e){this.options=e,this.dateFormatter=new n.DateFormatter(e),this.numberFormatter=new o.NumberFormatter(e),this.stringFormatter=new a.StringFormatter(this.dateFormatter,this.numberFormatter)}return e.prototype.formatString=function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return(t=this.stringFormatter).format.apply(t,i.__spreadArray([e],r))},e.prototype.formatDate=function(e,t){return this.dateFormatter.setFormatString(e),this.dateFormatter.format(t)},e.prototype.formatNumber=function(e,t){return this.numberFormatter.format(e,t)},e}();t.$=s},2004:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NumberFormatter=void 0;var r=function(){function e(e){this.positive=!0,this.digits=[],this.pointPos=0,this.spec="",this.prec=-1,this.upper=!0,this.custom=!1,this.options=e}return e.prototype.format=function(e,t){if(isNaN(t))return this.options.numNan;if(!isFinite(t))return t>0?this.options.numPosInf:this.options.numNegInf;if(this.fillFormatInfo(e),"X"===this.spec)return this.formatHex(t);switch(this.fillDigitInfo(t),this.spec){case"C":return this.formatCurrency();case"D":return this.formatDecimal();case"E":return this.formatExp();case"F":return this.formatFixed();case"G":return this.formatGeneral();case"N":return this.formatNumber();case"P":return this.formatPercent();default:return this.custom?this.formatCustom(e):"?"}},e.prototype.formatCurrency=function(){this.prec<0&&(this.prec=this.options.currPrec),this.round(this.prec);var e=[];if(this.positive)switch(this.options.currPosPattern){case 0:e.push(this.options.currency);break;case 2:e.push(this.options.currency," ")}else switch(this.options.currNegPattern){case 0:e.push("(",this.options.currency);break;case 1:e.push("-",this.options.currency);break;case 2:e.push(this.options.currency,"-");break;case 3:e.push(this.options.currency);break;case 4:case 15:e.push("(");break;case 5:case 8:e.push("-");break;case 9:e.push("-",this.options.currency," ");break;case 11:e.push(this.options.currency," ");break;case 12:e.push(this.options.currency," -");break;case 14:e.push("(",this.options.currency," ")}if(this.appendGroupedInteger(e,this.options.currGroups,this.options.currGroupSeparator),this.prec>0&&(e.push(this.options.currDecimalPoint),this.appendDigits(e,this.pointPos,this.pointPos+this.prec)),this.positive)switch(this.options.currPosPattern){case 1:e.push(this.options.currency);break;case 3:e.push(" ",this.options.currency)}else switch(this.options.currNegPattern){case 0:case 14:e.push(")");break;case 3:case 11:e.push("-");break;case 4:e.push(this.options.currency,")");break;case 5:e.push(this.options.currency);break;case 6:e.push("-",this.options.currency);break;case 7:e.push(this.options.currency,"-");break;case 8:e.push(" ",this.options.currency);break;case 10:e.push(" ",this.options.currency,"-");break;case 13:e.push("- ",this.options.currency);break;case 15:e.push(" ",this.options.currency,")")}return e.join("")},e.prototype.formatDecimal=function(){if(this.prec<this.pointPos&&(this.prec=this.pointPos),this.prec<1)return"0";var e=[];return this.positive||e.push("-"),this.appendDigits(e,this.pointPos-this.prec,this.pointPos),e.join("")},e.prototype.formatExp=function(){return this.prec<0&&(this.prec=6),this.round(1-this.pointPos+this.prec),this.formatExpCore(3)},e.prototype.formatExpCore=function(e){var t=[];this.positive||t.push("-"),this.appendDigits(t,0,1),this.prec>0&&(t.push(this.options.numDecimalPoint),this.appendDigits(t,1,1+this.prec)),t.push(this.upper?"E":"e");var r=this.pointPos-1;r>=0?t.push("+"):(t.push("-"),r=-r);for(var i=String(r),n=i.length;n<e;n++)t.push(0);return t.push(i),t.join("")},e.prototype.formatFixed=function(){this.prec<0&&(this.prec=this.options.numPrec),this.round(this.prec);var e=[];return this.positive||e.push("-"),this.pointPos<1?e.push(0):this.appendDigits(e,0,this.pointPos),this.prec>0&&(e.push(this.options.numDecimalPoint),this.appendDigits(e,this.pointPos,this.pointPos+this.prec)),e.join("")},e.prototype.formatGeneral=function(){var e,t=this.pointPos<this.digits.length;return this.prec<0?(e=t,this.prec=t?15:10):(e=!0,this.prec<1&&(this.prec=t?15:10),this.round(this.prec-this.pointPos)),e&&(this.pointPos>this.prec||this.pointPos<=-4)?(this.prec=this.digits.length-1,this.formatExpCore(2)):(this.prec=Math.min(this.prec,Math.max(1,this.digits.length))-this.pointPos,this.formatFixed())},e.prototype.formatNumber=function(){this.prec<0&&(this.prec=this.options.numPrec),this.round(this.prec);var e=[];if(!this.positive)switch(this.options.numNegPattern){case 0:e.push("(");break;case 1:e.push("-");break;case 2:e.push("- ")}if(this.appendGroupedInteger(e,this.options.numGroups,this.options.numGroupSeparator),this.prec>0&&(e.push(this.options.numDecimalPoint),this.appendDigits(e,this.pointPos,this.pointPos+this.prec)),!this.positive)switch(this.options.numNegPattern){case 0:e.push(")");break;case 3:e.push("-");break;case 4:e.push(" -")}return e.join("")},e.prototype.formatPercent=function(){this.prec<0&&(this.prec=this.options.numPrec),this.digits.length>0&&(this.pointPos+=2),this.round(this.prec);var e=[];switch(this.positive||e.push("-"),2===this.options.percentPattern&&e.push("%"),this.appendGroupedInteger(e,this.options.numGroups,this.options.numGroupSeparator),this.prec>0&&(e.push(this.options.numDecimalPoint),this.appendDigits(e,this.pointPos,this.pointPos+this.prec)),this.options.percentPattern){case 0:e.push(" %");break;case 1:e.push("%")}return e.join("")},e.prototype.formatHex=function(e){var t=e.toString(16);if(t.indexOf("(")>-1)return t;if(t=this.upper?t.toUpperCase():t.toLowerCase(),this.prec<=t.length)return t;for(var r=[],i=t.length;i<this.prec;i++)r.push(0);return r.push(t),r.join("")},e.prototype.formatCustom=function(t){var r=e.getCustomFormatSections(t),i=this.selectCustomFormatSection(r);if(""===i)return this.positive?"":"-";var n=e.parseCustomFormatSection(i),o=this.createCustomFormatLists(n);r.length>2&&i!==r[2]&&(""===o.i.concat(o.f).join("").split("0").join("")&&(i=r[2],n=e.parseCustomFormatSection(i),o=this.createCustomFormatLists(n)));return this.formatCustomCore(i,n,o)},e.getCustomFormatSections=function(e){for(var t=[],r=!1,i="",n=0,o=0,a=0;a<e.length;a++){var s=e.charAt(a);if(r||""!==i||";"!==s)r?r=!1:s===i?i=""===i?s:"":"\\"===s?r=!0:"'"!==s&&'"'!==s||(i=s),++n;else if(t.push(e.substr(o,n)),n=0,o=a+1,t.length>2)break}return n>0&&t.push(e.substr(o,n)),t.length<1&&t.push(e),t},e.prototype.selectCustomFormatSection=function(e){return!this.positive&&e.length>1&&""!==e[1]?(this.positive=!0,e[1]):this.digits.length<1&&e.length>2&&""!==e[2]?e[2]:e[0]},e.createCustomFormatInfo=function(){return{pointPos:-1,grouping:!1,exp:!1,expShowPlus:!1,percent:!1,scaling:0,intDigits:0,fracDigits:0,expDigits:0,intSharps:0,fracSharps:0,expSharps:0}},e.parseCustomFormatSection=function(t){for(var r="",i="i",n=!0,o=e.createCustomFormatInfo(),a=0,s=0;s<t.length;s++){var l=t.charAt(s);if(l!==r){if(""===r)if("e"!==i||"0"===l||"#"===l)switch(l){case"\\":s++;continue;case"'":case'"':r=l;continue;case"#":case"0":if("#"===l)switch(i){case"i":n&&o.intSharps++;break;case"f":o.fracSharps++;break;case"e":o.expSharps++}else switch(n=!1,i){case"f":o.fracSharps=0;break;case"e":o.expSharps=0}switch(i){case"i":o.intDigits++,a>0&&(o.grouping=!0),a=0;break;case"f":o.fracDigits++;break;case"e":o.expDigits++}break;case"e":case"E":if(o.exp)break;if(o.exp=!0,i="e",s<t.length-1){var d=t.charAt(1+s);"+"===d||"-"===d?("+"===d&&(o.expShowPlus=!0),s++):"0"!==d&&"#"!==d&&(o.exp=!1,o.pointPos<0&&(i="i"))}break;case".":i="f",o.pointPos<0&&(o.pointPos=s);break;case"%":o.percent=!0;break;case",":"i"===i&&o.intDigits>0&&a++}else i=o.pointPos<0?"i":"f",s--}else r=""}return o.expDigits<1?o.exp=!1:o.intSharps=0,o.fracDigits<1&&(o.pointPos=-1),o.scaling=3*a,o},e.prototype.createCustomFormatLists=function(e){var t=[],r=[],i=[];this.digits.length>0&&(e.percent&&(this.pointPos+=2),this.pointPos-=e.scaling);var n=!0;if(e.exp&&(e.intDigits>0||e.fracDigits>0)){var o=0;this.digits.length>0&&(this.round(e.intDigits+e.fracDigits-this.pointPos),o-=this.pointPos-e.intDigits,this.pointPos=e.intDigits),n=o<=0,i=String(o<0?-o:o).split("")}else this.round(e.fracDigits);if(this.digits.length<1||this.pointPos<1?t=[0]:this.appendDigits(t,0,this.pointPos),this.appendDigits(r,this.pointPos,this.digits.length),e.exp){for(;t.length<e.intDigits;)t.unshift(0);for(;i.length<e.expDigits-e.expSharps;)i.unshift(0);n&&e.expShowPlus?i.unshift("+"):n||i.unshift("-")}else{for(;t.length<e.intDigits-e.intSharps;)t.unshift(0);if(e.intSharps>=e.intDigits){for(var a=!0,s=0;s<t.length;s++)if(0!==t[s]){a=!1;break}a&&(t=[])}}for(;r.length<e.fracDigits-e.fracSharps;)r.push(0);return{i:t,f:r,e:i}},e.prototype.formatCustomCore=function(e,t,r){var i=0,n=0,o=0,a=0,s=0;if(t.grouping&&this.options.numGroups.length>0){i=r.i.length;for(var l=0;l<this.options.numGroups.length;l++)n+this.options.numGroups[l]<=i&&(n+=this.options.numGroups[l],o=l);var d=i>n?i-n:0;if(0===(s=this.options.numGroups[o])){for(;o>=0&&0===this.options.numGroups[o];)o--;s=d>0?d:this.options.numGroups[o]}0===d?a=s:(o+=Math.floor(d/s),0===(a=d%s)?a=s:o++)}else t.grouping=!1;var c=[],h="i",u=0,p=0,g=0,m="";for(l=0;l<e.length;l++){var f=e.charAt(l);if(f!==m)if(""===m)switch(f){case"\\":++l<e.length&&c.push(e.charAt(l));continue;case"'":case'"':m=f;continue;case"#":case"0":if("i"===h){if(u++,"0"===f||t.intDigits-u<r.i.length+p)for(;t.intDigits-u+p<r.i.length;)c.push(r.i[p].toString()),p++,t.grouping&&--i>0&&0==--a&&(c.push(this.options.numGroupSeparator),--o<this.options.numGroups.length&&o>=0&&(s=this.options.numGroups[o]),a=s)}else"f"===h&&g<r.f.length&&(c.push(r.f[g].toString()),g++);break;case"e":case"E":if(null==r.e||!t.exp){c.push(f);break}for(var b=l+1;b<e.length&&(b===l+1&&("+"===e.charAt(b)||"-"===e.charAt(b))||"0"===e.charAt(b)||"#"===e.charAt(b));b++);l=b-1,h=t.pointPos<0?"i":"f",c.push(f),c=c.concat(r.e),r.e=null;break;case".":t.pointPos===l&&r.f.length>0&&c.push(this.options.numDecimalPoint),h="f";break;case",":break;default:c.push(f)}else c.push(f);else m=""}return this.positive||c.unshift("-"),c.join("")},e.prototype.fillDigitInfo=function(e){if(this.positive=!0,e<0&&(e=-e,this.positive=!1),this.digits=[],this.pointPos=0,0!==e&&isFinite(e)&&!isNaN(e)){var t=String(e).split("e"),r=t[0];t.length>1&&(this.pointPos=Number(t[1]));for(var i=!1,n=0,o=0;o<r.length;o++){var a=r.charAt(o);"."===a?i=!0:(i&&n++,("0"!==a||this.digits.length>0)&&this.digits.push(Number(a)))}this.pointPos+=this.digits.length-n}else this.pointPos=1},e.prototype.fillFormatInfo=function(e){var t;if(this.upper=!0,this.custom=!1,this.prec=-1,(t=null==e||e.length<1?"G":e.charAt(0))>="a"&&t<="z"&&(t=t.toUpperCase(),this.upper=!1),t>="A"&&t<="Z"){if(null!=e&&e.length>1){var r=Number(e.substr(1));isNaN(r)?this.custom=!0:this.prec=r}}else this.custom=!0;this.spec=this.custom?"0":t},e.prototype.round=function(e){var t=this.digits.length-this.pointPos-e;if(!(t<=0)){var r=this.pointPos+e;if(r<0)return this.digits=[],void(this.pointPos=0);var i=this.digits[r];if(i>4)for(var n=0;n<t;n++){var o=r-1-n;if(o<0&&(this.digits.unshift(0),this.pointPos++,r++,o++),(i=this.digits[o])<9){this.digits[o]=1+i;break}this.digits[o]=0,t++}for(n=r-1;n>=0&&!(this.digits[n]>0);n--)r--;this.digits.splice(r,this.digits.length-r)}},e.prototype.appendGroupedInteger=function(e,t,r){if(this.pointPos<1)e.push(0);else{for(var i=0,n=0,o=0;o<t.length&&i+t[o]<=this.pointPos;o++)i+=t[o],n=o;if(t.length>0&&i>0){var a=void 0,s=t[n],l=this.pointPos>i?this.pointPos-i:0;if(0===s){for(;n>=0&&0===t[n];)n--;s=l>0?l:t[n]}0===l?a=s:(n+=Math.floor(l/s),0===(a=l%s)?a=s:n++);for(o=0;;){if(this.pointPos-o<=a||0===a){this.appendDigits(e,o,this.pointPos);break}this.appendDigits(e,o,o+a),e.push(r),o+=a,--n<t.length&&n>=0&&(s=t[n]),a=s}}else this.appendDigits(e,0,this.pointPos)}},e.prototype.appendDigits=function(e,t,r){for(var i=t;i<r;i++)i<0||i>=this.digits.length?e.push(0):e.push(this.digits[i])},e}();t.NumberFormatter=r},5418:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.StringFormatter=void 0;var i=r(5308),n=r(8786),o=function(){function e(e,t){this.activeDateFormat=null,this.dateFormatter=e,this.numberFormatter=t}return e.prototype.format=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var o=[],a=0,s=0;a<e.length;){var l=e.charAt(a);if(a++,"{"===l){if(o.push(e.substr(s,a-s-1)),"{"===e.charAt(a)){s=a,a++;continue}var d=this.parseSpec(e,a);a=d.pos;var c=t[d.index],h=void 0;if(null==c)h="";else if("number"==typeof c)h=this.numberFormatter.format(d.format,c);else if(c instanceof Date)d.format!==this.activeDateFormat&&(this.activeDateFormat=d.format,""===d.format&&(d.format="G"),1===d.format.length&&(d.format=i.DateFormatter.expandPredefinedFormat(d.format,this.dateFormatter.options)),this.dateFormatter.setFormatString(d.format)),"U"===this.activeDateFormat&&(c=n.DateUtils.toUtcTime(c)),h=this.dateFormatter.format(c);else if(h=String(c),""!==d.format&&h.length>0){var u=Number(h.replace(",","."));isNaN(u)||(h=this.numberFormatter.format(d.format,u))}var p=d.width-h.length;if(p>0){d.left&&o.push(h);for(var g=0;g<p;g++)o.push(" ");d.left||o.push(h)}else o.push(h);s=a}else if("}"===l&&a<e.length&&"}"===e.charAt(a))o.push(e.substr(s,a-s-1)),s=a,a++;else if("}"===l)return""}return s<e.length&&o.push(e.substr(s)),o.join("")},e.prototype.parseSpec=function(e,t){var r,i,n={index:-1,left:!1,width:0,format:"",pos:0};for(r=t;!((i=e.charAt(t))<"0"||i>"9");)t++;if(t>r&&(n.index=Number(e.substr(r,t-r))),","===e.charAt(t)){for(t++;" "===(i=e.charAt(t))||"\t"===i;)t++;for(n.left="-"===e.charAt(t),n.left&&t++,r=t;!((i=e.charAt(t))<"0"||i>"9");)t++;t>r&&(n.width=Number(e.substr(r,t-r)))}if(":"===e.charAt(t)){for(r=++t;"}"!==e.charAt(t);)t++;n.format=e.substr(r,t-r)}return t++,n.pos=t,n},e}();t.StringFormatter=o},3604:function(e,t,r){t.m=void 0;var i=r(2020),n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.empty=function(){return new t(0,0,0,0)},t.prototype.clone=function(){return new t(this.left,this.right,this.top,this.bottom)},t}(r(4125).Offsets);t.m=n},5596:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Metrics=void 0;var r=function(){function e(){}return e.euclideanDistance=function(e,t){var r=e.x-t.x,i=e.y-t.y;return Math.sqrt(r*r+i*i)},e.manhattanDistance=function(e,t){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},e}();t.Metrics=r},4125:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Offsets=void 0;var r=function(){function e(e,t,r,i){this.left=e,this.right=t,this.top=r,this.bottom=i}return e.empty=function(){return new e(0,0,0,0)},Object.defineProperty(e.prototype,"horizontal",{get:function(){return this.left+this.right},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"vertical",{get:function(){return this.top+this.bottom},enumerable:!1,configurable:!0}),e.fromNumber=function(t){return new e(t,t,t,t)},e.fromOffsets=function(t){return new e(t.left,t.right,t.top,t.bottom)},e.fromSide=function(t,r){return new e(t,t,r,r)},e.prototype.normalize=function(){return this.left=Math.max(0,this.left),this.right=Math.max(0,this.right),this.top=Math.max(0,this.top),this.bottom=Math.max(0,this.bottom),this},e.prototype.toString=function(){return JSON.stringify(this)},e.prototype.isEmpty=function(){return 0===this.left&&0===this.right&&0===this.top&&0===this.bottom},e.prototype.offset=function(e){return this.left+=e.left,this.right+=e.right,this.top+=e.top,this.bottom+=e.bottom,this},e.prototype.multiply=function(e,t,r,i){switch(arguments.length){case 1:return this.left*=e,this.right*=e,this.top*=e,this.bottom*=e,this;case 2:return this.left*=e,this.right*=e,this.top*=t,this.bottom*=t,this;case 4:return this.left*=e,this.right*=t,this.top*=r,this.bottom*=i,this}return this},e.prototype.clone=function(){return new e(this.left,this.right,this.top,this.bottom)},e.prototype.copyFrom=function(e){this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom},e.prototype.equals=function(e){return this.top===e.top&&this.bottom===e.bottom&&this.right===e.right&&this.left===e.left},e.prototype.applyConverter=function(e){return this.left=e(this.left),this.right=e(this.right),this.top=e(this.top),this.bottom=e(this.bottom),this},e}();t.Offsets=r},8900:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Point=void 0;var r=function(){function e(e,t){this.x=e,this.y=t}return e.zero=function(){return new e(0,0)},e.fromNumber=function(t){return new e(t,t)},e.prototype.isZero=function(){return 0===this.x&&0===this.y},e.prototype.toString=function(){return JSON.stringify(this)},e.prototype.copyFrom=function(e){this.x=e.x,this.y=e.y},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.equals=function(e){return this.x===e.x&&this.y===e.y},e.prototype.offset=function(e,t){return this.x+=e,this.y+=t,this},e.prototype.offsetByPoint=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.multiply=function(e,t){return this.x*=e,this.y*=t,this},e.prototype.negative=function(){return this.x*=-1,this.y*=-1,this},e.prototype.applyConverter=function(e){return this.x=e(this.x),this.y=e(this.y),this},e.plus=function(t,r){return new e(t.x+r.x,t.y+r.y)},e.minus=function(t,r){return new e(t.x-r.x,t.y-r.y)},e.xComparer=function(e,t){return e.x-t.x},e.yComparer=function(e,t){return e.y-t.y},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();t.Point=r},9210:function(e,t,r){t.VW=t.mg=void 0;var i,n=r(2020),o=r(8900),a=r(9716),s=r(1335),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),Object.defineProperty(t.prototype,"numEdges",{get:function(){return this.points.length},enumerable:!1,configurable:!0}),t.fromRectangle=function(e){var r=e.x+e.width,i=e.y+e.height;return new t([new o.Point(e.x,e.y),new o.Point(r,e.y),new o.Point(r,i),new o.Point(e.x,i)])},t.prototype.getEdge=function(e){return new s.Segment(this.points[e],this.points[(e+1)%this.numEdges])},t.collision=function(e,t){for(var r=e.numEdges,n=t.numEdges,o=!1,s=0;s<r+n;s++){var l=s<r?e.getEdge(s):t.getEdge(s-r),d=a.Vector.fromSegment(l),c=new a.Vector(-d.y,d.x).normalize(),h=e.projection(c),u=t.projection(c),p=h.minValue<u.minValue?u.minValue-h.maxValue:h.minValue-u.maxValue;if(p>0)return i.None;p<0&&(o=!0)}return o?i.Intersect:i.Contact},t}(r(2313).PolygonalChain);t.mg=l,function(e){e[e.None=0]="None",e[e.Intersect=1]="Intersect",e[e.Contact=2]="Contact"}(i=t.VW||(t.VW={}))},2313:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PolygonalChain=void 0;var i=r(2940),n=r(8900),o=r(8011),a=r(1335),s=r(9716),l=function(){function e(e){this.points=[],this.points=e}return e.prototype.getSegment=function(e){return new a.Segment(this.points[e],this.points[e+1])},Object.defineProperty(e.prototype,"bounds",{get:function(){var e=i.ListUtils.minMaxExtended(this.points,(function(e){return e.y})),t=i.ListUt